tailwind-clamp 4.3.1 → 4.5.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 +31 -13
- package/dist/index.js +1142 -996
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +1 -1
- package/dist/index.umd.cjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
function
|
|
5
|
-
return { handler:
|
|
1
|
+
var vn = Object.defineProperty;
|
|
2
|
+
var hn = (n, e, t) => e in n ? vn(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
|
+
var y = (n, e, t) => hn(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
function en(n, e) {
|
|
5
|
+
return { handler: n, config: e };
|
|
6
6
|
}
|
|
7
|
-
|
|
8
|
-
function
|
|
9
|
-
return { handler:
|
|
7
|
+
en.withOptions = function(n, e = () => ({})) {
|
|
8
|
+
function t(r) {
|
|
9
|
+
return { handler: n(r), config: e(r) };
|
|
10
10
|
}
|
|
11
|
-
return
|
|
11
|
+
return t.__isOptionsFunction = !0, t;
|
|
12
12
|
};
|
|
13
|
-
var
|
|
14
|
-
const
|
|
15
|
-
switch (
|
|
13
|
+
var yn = en;
|
|
14
|
+
const Cn = (n) => {
|
|
15
|
+
switch (n) {
|
|
16
16
|
// Sizing & Spacing
|
|
17
17
|
case "p":
|
|
18
18
|
return {
|
|
@@ -68,6 +68,18 @@ const ht = (t) => {
|
|
|
68
68
|
key: "padding",
|
|
69
69
|
props: ["paddingBlock"]
|
|
70
70
|
};
|
|
71
|
+
case "pbs":
|
|
72
|
+
return {
|
|
73
|
+
type: "spacing",
|
|
74
|
+
key: "padding",
|
|
75
|
+
props: ["paddingBlockStart"]
|
|
76
|
+
};
|
|
77
|
+
case "pbe":
|
|
78
|
+
return {
|
|
79
|
+
type: "spacing",
|
|
80
|
+
key: "padding",
|
|
81
|
+
props: ["paddingBlockEnd"]
|
|
82
|
+
};
|
|
71
83
|
case "m":
|
|
72
84
|
return {
|
|
73
85
|
type: "spacing",
|
|
@@ -122,6 +134,32 @@ const ht = (t) => {
|
|
|
122
134
|
key: "margin",
|
|
123
135
|
props: ["marginBlock"]
|
|
124
136
|
};
|
|
137
|
+
case "mbs":
|
|
138
|
+
return {
|
|
139
|
+
type: "spacing",
|
|
140
|
+
key: "margin",
|
|
141
|
+
props: ["marginBlockStart"]
|
|
142
|
+
};
|
|
143
|
+
case "mbe":
|
|
144
|
+
return {
|
|
145
|
+
type: "spacing",
|
|
146
|
+
key: "margin",
|
|
147
|
+
props: ["marginBlockEnd"]
|
|
148
|
+
};
|
|
149
|
+
case "space-x":
|
|
150
|
+
return {
|
|
151
|
+
type: "spacing",
|
|
152
|
+
key: "margin",
|
|
153
|
+
selector: "& > :not(:last-child)",
|
|
154
|
+
props: ["marginInlineEnd"]
|
|
155
|
+
};
|
|
156
|
+
case "space-y":
|
|
157
|
+
return {
|
|
158
|
+
type: "spacing",
|
|
159
|
+
key: "margin",
|
|
160
|
+
selector: "& > :not(:last-child)",
|
|
161
|
+
props: ["marginBlockEnd"]
|
|
162
|
+
};
|
|
125
163
|
case "inset":
|
|
126
164
|
return {
|
|
127
165
|
type: "spacing",
|
|
@@ -140,6 +178,18 @@ const ht = (t) => {
|
|
|
140
178
|
key: "inset",
|
|
141
179
|
props: ["insetBlock"]
|
|
142
180
|
};
|
|
181
|
+
case "inset-bs":
|
|
182
|
+
return {
|
|
183
|
+
type: "spacing",
|
|
184
|
+
key: "inset",
|
|
185
|
+
props: ["insetBlockStart"]
|
|
186
|
+
};
|
|
187
|
+
case "inset-be":
|
|
188
|
+
return {
|
|
189
|
+
type: "spacing",
|
|
190
|
+
key: "inset",
|
|
191
|
+
props: ["insetBlockEnd"]
|
|
192
|
+
};
|
|
143
193
|
case "start":
|
|
144
194
|
return {
|
|
145
195
|
type: "spacing",
|
|
@@ -236,6 +286,54 @@ const ht = (t) => {
|
|
|
236
286
|
key: "maxHeight",
|
|
237
287
|
props: ["maxHeight"]
|
|
238
288
|
};
|
|
289
|
+
case "inline":
|
|
290
|
+
return {
|
|
291
|
+
type: "spacing",
|
|
292
|
+
key: "inlineSize",
|
|
293
|
+
props: ["inlineSize"]
|
|
294
|
+
};
|
|
295
|
+
case "min-inline":
|
|
296
|
+
return {
|
|
297
|
+
type: "spacing",
|
|
298
|
+
key: "minInlineSize",
|
|
299
|
+
props: ["minInlineSize"]
|
|
300
|
+
};
|
|
301
|
+
case "max-inline":
|
|
302
|
+
return {
|
|
303
|
+
type: "spacing",
|
|
304
|
+
key: "maxInlineSize",
|
|
305
|
+
props: ["maxInlineSize"]
|
|
306
|
+
};
|
|
307
|
+
case "block":
|
|
308
|
+
return {
|
|
309
|
+
type: "spacing",
|
|
310
|
+
key: "blockSize",
|
|
311
|
+
props: ["blockSize"]
|
|
312
|
+
};
|
|
313
|
+
case "min-block":
|
|
314
|
+
return {
|
|
315
|
+
type: "spacing",
|
|
316
|
+
key: "minBlockSize",
|
|
317
|
+
props: ["minBlockSize"]
|
|
318
|
+
};
|
|
319
|
+
case "max-block":
|
|
320
|
+
return {
|
|
321
|
+
type: "spacing",
|
|
322
|
+
key: "maxBlockSize",
|
|
323
|
+
props: ["maxBlockSize"]
|
|
324
|
+
};
|
|
325
|
+
case "basis":
|
|
326
|
+
return {
|
|
327
|
+
type: "spacing",
|
|
328
|
+
key: "flexBasis",
|
|
329
|
+
props: ["flexBasis"]
|
|
330
|
+
};
|
|
331
|
+
case "indent":
|
|
332
|
+
return {
|
|
333
|
+
type: "spacing",
|
|
334
|
+
key: "textIndent",
|
|
335
|
+
props: ["textIndent"]
|
|
336
|
+
};
|
|
239
337
|
case "scroll-m":
|
|
240
338
|
return {
|
|
241
339
|
type: "spacing",
|
|
@@ -290,6 +388,18 @@ const ht = (t) => {
|
|
|
290
388
|
key: "scrollMargin",
|
|
291
389
|
props: ["scrollMarginRight"]
|
|
292
390
|
};
|
|
391
|
+
case "scroll-mbs":
|
|
392
|
+
return {
|
|
393
|
+
type: "spacing",
|
|
394
|
+
key: "scrollMargin",
|
|
395
|
+
props: ["scrollMarginBlockStart"]
|
|
396
|
+
};
|
|
397
|
+
case "scroll-mbe":
|
|
398
|
+
return {
|
|
399
|
+
type: "spacing",
|
|
400
|
+
key: "scrollMargin",
|
|
401
|
+
props: ["scrollMarginBlockEnd"]
|
|
402
|
+
};
|
|
293
403
|
case "scroll-p":
|
|
294
404
|
return {
|
|
295
405
|
type: "spacing",
|
|
@@ -344,6 +454,18 @@ const ht = (t) => {
|
|
|
344
454
|
key: "scrollPadding",
|
|
345
455
|
props: ["scrollPaddingRight"]
|
|
346
456
|
};
|
|
457
|
+
case "scroll-pbs":
|
|
458
|
+
return {
|
|
459
|
+
type: "spacing",
|
|
460
|
+
key: "scrollPadding",
|
|
461
|
+
props: ["scrollPaddingBlockStart"]
|
|
462
|
+
};
|
|
463
|
+
case "scroll-pbe":
|
|
464
|
+
return {
|
|
465
|
+
type: "spacing",
|
|
466
|
+
key: "scrollPadding",
|
|
467
|
+
props: ["scrollPaddingBlockEnd"]
|
|
468
|
+
};
|
|
347
469
|
case "translate":
|
|
348
470
|
return {
|
|
349
471
|
type: "spacing",
|
|
@@ -439,6 +561,30 @@ const ht = (t) => {
|
|
|
439
561
|
key: "borderWidth",
|
|
440
562
|
props: ["borderBlockWidth"]
|
|
441
563
|
};
|
|
564
|
+
case "border-bs":
|
|
565
|
+
return {
|
|
566
|
+
type: "regular",
|
|
567
|
+
key: "borderWidth",
|
|
568
|
+
props: ["borderBlockStartWidth"]
|
|
569
|
+
};
|
|
570
|
+
case "border-be":
|
|
571
|
+
return {
|
|
572
|
+
type: "regular",
|
|
573
|
+
key: "borderWidth",
|
|
574
|
+
props: ["borderBlockEndWidth"]
|
|
575
|
+
};
|
|
576
|
+
case "outline":
|
|
577
|
+
return {
|
|
578
|
+
type: "regular",
|
|
579
|
+
key: "outlineWidth",
|
|
580
|
+
props: ["outlineWidth"]
|
|
581
|
+
};
|
|
582
|
+
case "outline-offset":
|
|
583
|
+
return {
|
|
584
|
+
type: "regular",
|
|
585
|
+
key: "outlineOffset",
|
|
586
|
+
props: ["outlineOffset"]
|
|
587
|
+
};
|
|
442
588
|
case "decoration":
|
|
443
589
|
return {
|
|
444
590
|
type: "regular",
|
|
@@ -572,211 +718,211 @@ const ht = (t) => {
|
|
|
572
718
|
console.log("\x1B[90m", ...arguments, "\x1B[0m");
|
|
573
719
|
}
|
|
574
720
|
};
|
|
575
|
-
class
|
|
576
|
-
constructor(
|
|
577
|
-
super(
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
721
|
+
class Be extends Error {
|
|
722
|
+
constructor(t, r, o, i) {
|
|
723
|
+
super(t);
|
|
724
|
+
y(this, "sourceStart");
|
|
725
|
+
y(this, "sourceEnd");
|
|
726
|
+
y(this, "parserState");
|
|
581
727
|
this.name = "ParseError", this.sourceStart = r, this.sourceEnd = o, this.parserState = i;
|
|
582
728
|
}
|
|
583
729
|
}
|
|
584
|
-
class Y extends
|
|
585
|
-
constructor(
|
|
586
|
-
super(
|
|
587
|
-
|
|
588
|
-
this.token =
|
|
730
|
+
class Y extends Be {
|
|
731
|
+
constructor(t, r, o, i, a) {
|
|
732
|
+
super(t, r, o, i);
|
|
733
|
+
y(this, "token");
|
|
734
|
+
this.token = a;
|
|
589
735
|
}
|
|
590
736
|
}
|
|
591
737
|
const H = { UnexpectedNewLineInString: "Unexpected newline while consuming a string token.", UnexpectedEOFInString: "Unexpected EOF while consuming a string token.", UnexpectedEOFInComment: "Unexpected EOF while consuming a comment.", UnexpectedEOFInURL: "Unexpected EOF while consuming a url token.", UnexpectedEOFInEscapedCodePoint: "Unexpected EOF while consuming an escaped code point.", UnexpectedCharacterInURL: "Unexpected character while consuming a url token.", InvalidEscapeSequenceInURL: "Invalid escape sequence while consuming a url token.", InvalidEscapeSequenceAfterBackslash: 'Invalid escape sequence after "\\"' };
|
|
592
|
-
function G(...
|
|
738
|
+
function G(...n) {
|
|
593
739
|
let e = "";
|
|
594
|
-
for (let
|
|
740
|
+
for (let t = 0; t < n.length; t++) e += n[t][1];
|
|
595
741
|
return e;
|
|
596
742
|
}
|
|
597
|
-
const
|
|
598
|
-
function
|
|
599
|
-
return
|
|
743
|
+
const te = 13, A = 45, re = 10, oe = 43, Z = 65533;
|
|
744
|
+
function kn(n) {
|
|
745
|
+
return n.source.codePointAt(n.cursor) === 60 && n.source.codePointAt(n.cursor + 1) === 33 && n.source.codePointAt(n.cursor + 2) === A && n.source.codePointAt(n.cursor + 3) === A;
|
|
600
746
|
}
|
|
601
|
-
function W(
|
|
602
|
-
return
|
|
747
|
+
function W(n) {
|
|
748
|
+
return n >= 48 && n <= 57;
|
|
603
749
|
}
|
|
604
|
-
function
|
|
605
|
-
return
|
|
750
|
+
function En(n) {
|
|
751
|
+
return n >= 65 && n <= 90;
|
|
606
752
|
}
|
|
607
|
-
function
|
|
608
|
-
return
|
|
753
|
+
function Pn(n) {
|
|
754
|
+
return n >= 97 && n <= 122;
|
|
609
755
|
}
|
|
610
|
-
function
|
|
611
|
-
return
|
|
756
|
+
function ne(n) {
|
|
757
|
+
return n >= 48 && n <= 57 || n >= 97 && n <= 102 || n >= 65 && n <= 70;
|
|
612
758
|
}
|
|
613
|
-
function
|
|
614
|
-
return
|
|
759
|
+
function bn(n) {
|
|
760
|
+
return Pn(n) || En(n);
|
|
615
761
|
}
|
|
616
|
-
function ie(
|
|
617
|
-
return
|
|
762
|
+
function ie(n) {
|
|
763
|
+
return bn(n) || Sn(n) || n === 95;
|
|
618
764
|
}
|
|
619
|
-
function
|
|
620
|
-
return ie(
|
|
765
|
+
function ze(n) {
|
|
766
|
+
return ie(n) || W(n) || n === A;
|
|
621
767
|
}
|
|
622
|
-
function
|
|
623
|
-
return
|
|
768
|
+
function Sn(n) {
|
|
769
|
+
return n === 183 || n === 8204 || n === 8205 || n === 8255 || n === 8256 || n === 8204 || 192 <= n && n <= 214 || 216 <= n && n <= 246 || 248 <= n && n <= 893 || 895 <= n && n <= 8191 || 8304 <= n && n <= 8591 || 11264 <= n && n <= 12271 || 12289 <= n && n <= 55295 || 63744 <= n && n <= 64975 || 65008 <= n && n <= 65533 || n === 0 || !!se(n) || n >= 65536;
|
|
624
770
|
}
|
|
625
|
-
function be(
|
|
626
|
-
return
|
|
771
|
+
function be(n) {
|
|
772
|
+
return n === re || n === te || n === 12;
|
|
627
773
|
}
|
|
628
|
-
function X(
|
|
629
|
-
return
|
|
774
|
+
function X(n) {
|
|
775
|
+
return n === 32 || n === re || n === 9 || n === te || n === 12;
|
|
630
776
|
}
|
|
631
|
-
function
|
|
632
|
-
return
|
|
777
|
+
function se(n) {
|
|
778
|
+
return n >= 55296 && n <= 57343;
|
|
633
779
|
}
|
|
634
|
-
function
|
|
635
|
-
return
|
|
780
|
+
function pe(n) {
|
|
781
|
+
return n.source.codePointAt(n.cursor) === 92 && !be(n.source.codePointAt(n.cursor + 1) ?? -1);
|
|
636
782
|
}
|
|
637
|
-
function Se(
|
|
638
|
-
return e.source.codePointAt(e.cursor) === A ? e.source.codePointAt(e.cursor + 1) === A || !!ie(e.source.codePointAt(e.cursor + 1) ?? -1) || e.source.codePointAt(e.cursor + 1) === 92 && !be(e.source.codePointAt(e.cursor + 2) ?? -1) : !!ie(e.source.codePointAt(e.cursor) ?? -1) ||
|
|
783
|
+
function Se(n, e) {
|
|
784
|
+
return e.source.codePointAt(e.cursor) === A ? e.source.codePointAt(e.cursor + 1) === A || !!ie(e.source.codePointAt(e.cursor + 1) ?? -1) || e.source.codePointAt(e.cursor + 1) === 92 && !be(e.source.codePointAt(e.cursor + 2) ?? -1) : !!ie(e.source.codePointAt(e.cursor) ?? -1) || pe(e);
|
|
639
785
|
}
|
|
640
|
-
function
|
|
641
|
-
return
|
|
786
|
+
function Ze(n) {
|
|
787
|
+
return n.source.codePointAt(n.cursor) === oe || n.source.codePointAt(n.cursor) === A ? !!W(n.source.codePointAt(n.cursor + 1) ?? -1) || n.source.codePointAt(n.cursor + 1) === 46 && W(n.source.codePointAt(n.cursor + 2) ?? -1) : n.source.codePointAt(n.cursor) === 46 ? W(n.source.codePointAt(n.cursor + 1) ?? -1) : W(n.source.codePointAt(n.cursor) ?? -1);
|
|
642
788
|
}
|
|
643
|
-
function
|
|
644
|
-
return
|
|
789
|
+
function An(n) {
|
|
790
|
+
return n.source.codePointAt(n.cursor) === 47 && n.source.codePointAt(n.cursor + 1) === 42;
|
|
645
791
|
}
|
|
646
|
-
function
|
|
647
|
-
return
|
|
792
|
+
function Bn(n) {
|
|
793
|
+
return n.source.codePointAt(n.cursor) === A && n.source.codePointAt(n.cursor + 1) === A && n.source.codePointAt(n.cursor + 2) === 62;
|
|
648
794
|
}
|
|
649
|
-
var
|
|
650
|
-
function
|
|
651
|
-
switch (
|
|
652
|
-
case
|
|
653
|
-
return
|
|
654
|
-
case
|
|
655
|
-
return
|
|
656
|
-
case
|
|
657
|
-
return
|
|
658
|
-
case
|
|
659
|
-
return
|
|
660
|
-
case
|
|
661
|
-
return
|
|
662
|
-
case
|
|
663
|
-
return
|
|
795
|
+
var s, p, Ae;
|
|
796
|
+
function Dn(n) {
|
|
797
|
+
switch (n) {
|
|
798
|
+
case s.OpenParen:
|
|
799
|
+
return s.CloseParen;
|
|
800
|
+
case s.CloseParen:
|
|
801
|
+
return s.OpenParen;
|
|
802
|
+
case s.OpenCurly:
|
|
803
|
+
return s.CloseCurly;
|
|
804
|
+
case s.CloseCurly:
|
|
805
|
+
return s.OpenCurly;
|
|
806
|
+
case s.OpenSquare:
|
|
807
|
+
return s.CloseSquare;
|
|
808
|
+
case s.CloseSquare:
|
|
809
|
+
return s.OpenSquare;
|
|
664
810
|
default:
|
|
665
811
|
return null;
|
|
666
812
|
}
|
|
667
813
|
}
|
|
668
|
-
function
|
|
669
|
-
switch (
|
|
670
|
-
case
|
|
671
|
-
return [
|
|
672
|
-
case
|
|
673
|
-
return [
|
|
674
|
-
case
|
|
675
|
-
return [
|
|
676
|
-
case
|
|
677
|
-
return [
|
|
678
|
-
case
|
|
679
|
-
return [
|
|
680
|
-
case
|
|
681
|
-
return [
|
|
814
|
+
function Fn(n) {
|
|
815
|
+
switch (n[0]) {
|
|
816
|
+
case s.OpenParen:
|
|
817
|
+
return [s.CloseParen, ")", -1, -1, void 0];
|
|
818
|
+
case s.CloseParen:
|
|
819
|
+
return [s.OpenParen, "(", -1, -1, void 0];
|
|
820
|
+
case s.OpenCurly:
|
|
821
|
+
return [s.CloseCurly, "}", -1, -1, void 0];
|
|
822
|
+
case s.CloseCurly:
|
|
823
|
+
return [s.OpenCurly, "{", -1, -1, void 0];
|
|
824
|
+
case s.OpenSquare:
|
|
825
|
+
return [s.CloseSquare, "]", -1, -1, void 0];
|
|
826
|
+
case s.CloseSquare:
|
|
827
|
+
return [s.OpenSquare, "[", -1, -1, void 0];
|
|
682
828
|
default:
|
|
683
829
|
return null;
|
|
684
830
|
}
|
|
685
831
|
}
|
|
686
|
-
function
|
|
832
|
+
function Nn(n, e) {
|
|
687
833
|
for (e.advanceCodePoint(2); ; ) {
|
|
688
|
-
const
|
|
689
|
-
if (
|
|
690
|
-
const r = [
|
|
691
|
-
return
|
|
834
|
+
const t = e.readCodePoint();
|
|
835
|
+
if (t === void 0) {
|
|
836
|
+
const r = [s.Comment, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, void 0];
|
|
837
|
+
return n.onParseError(new Y(H.UnexpectedEOFInComment, e.representationStart, e.representationEnd, ["4.3.2. Consume comments", "Unexpected EOF"], r)), r;
|
|
692
838
|
}
|
|
693
|
-
if (
|
|
839
|
+
if (t === 42 && e.source.codePointAt(e.cursor) !== void 0 && e.source.codePointAt(e.cursor) === 47) {
|
|
694
840
|
e.advanceCodePoint();
|
|
695
841
|
break;
|
|
696
842
|
}
|
|
697
843
|
}
|
|
698
|
-
return [
|
|
844
|
+
return [s.Comment, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, void 0];
|
|
699
845
|
}
|
|
700
|
-
function
|
|
701
|
-
const
|
|
702
|
-
if (
|
|
703
|
-
if (
|
|
704
|
-
const r = [
|
|
846
|
+
function De(n, e) {
|
|
847
|
+
const t = e.readCodePoint();
|
|
848
|
+
if (t === void 0) return n.onParseError(new Be(H.UnexpectedEOFInEscapedCodePoint, e.representationStart, e.representationEnd, ["4.3.7. Consume an escaped code point", "Unexpected EOF"])), Z;
|
|
849
|
+
if (ne(t)) {
|
|
850
|
+
const r = [t];
|
|
705
851
|
let o;
|
|
706
|
-
for (; (o = e.source.codePointAt(e.cursor)) !== void 0 &&
|
|
707
|
-
X(e.source.codePointAt(e.cursor) ?? -1) && (e.source.codePointAt(e.cursor) ===
|
|
852
|
+
for (; (o = e.source.codePointAt(e.cursor)) !== void 0 && ne(o) && r.length < 6; ) r.push(o), e.advanceCodePoint();
|
|
853
|
+
X(e.source.codePointAt(e.cursor) ?? -1) && (e.source.codePointAt(e.cursor) === te && e.source.codePointAt(e.cursor + 1) === re && e.advanceCodePoint(), e.advanceCodePoint());
|
|
708
854
|
const i = parseInt(String.fromCodePoint(...r), 16);
|
|
709
|
-
return i === 0 ||
|
|
855
|
+
return i === 0 || se(i) || i > 1114111 ? Z : i;
|
|
710
856
|
}
|
|
711
|
-
return
|
|
857
|
+
return t === 0 || se(t) ? Z : t;
|
|
712
858
|
}
|
|
713
|
-
function Fe(
|
|
714
|
-
const
|
|
859
|
+
function Fe(n, e) {
|
|
860
|
+
const t = [];
|
|
715
861
|
for (; ; ) {
|
|
716
862
|
const r = e.source.codePointAt(e.cursor) ?? -1;
|
|
717
|
-
if (r === 0 ||
|
|
718
|
-
else if (
|
|
863
|
+
if (r === 0 || se(r)) t.push(Z), e.advanceCodePoint(+(r > 65535) + 1);
|
|
864
|
+
else if (ze(r)) t.push(r), e.advanceCodePoint(+(r > 65535) + 1);
|
|
719
865
|
else {
|
|
720
|
-
if (!
|
|
721
|
-
e.advanceCodePoint(),
|
|
866
|
+
if (!pe(e)) return t;
|
|
867
|
+
e.advanceCodePoint(), t.push(De(n, e));
|
|
722
868
|
}
|
|
723
869
|
}
|
|
724
870
|
}
|
|
725
|
-
function
|
|
871
|
+
function wn(n, e) {
|
|
726
872
|
e.advanceCodePoint();
|
|
727
|
-
const
|
|
728
|
-
if (
|
|
873
|
+
const t = e.source.codePointAt(e.cursor);
|
|
874
|
+
if (t !== void 0 && (ze(t) || pe(e))) {
|
|
729
875
|
let r = Ae.Unrestricted;
|
|
730
876
|
Se(0, e) && (r = Ae.ID);
|
|
731
|
-
const o = Fe(
|
|
732
|
-
return [
|
|
877
|
+
const o = Fe(n, e);
|
|
878
|
+
return [s.Hash, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: String.fromCodePoint(...o), type: r }];
|
|
733
879
|
}
|
|
734
|
-
return [
|
|
880
|
+
return [s.Delim, "#", e.representationStart, e.representationEnd, { value: "#" }];
|
|
735
881
|
}
|
|
736
|
-
function
|
|
737
|
-
let
|
|
882
|
+
function In(n, e) {
|
|
883
|
+
let t = p.Integer;
|
|
738
884
|
for (e.source.codePointAt(e.cursor) !== oe && e.source.codePointAt(e.cursor) !== A || e.advanceCodePoint(); W(e.source.codePointAt(e.cursor) ?? -1); ) e.advanceCodePoint();
|
|
739
|
-
if (e.source.codePointAt(e.cursor) === 46 && W(e.source.codePointAt(e.cursor + 1) ?? -1)) for (e.advanceCodePoint(2),
|
|
885
|
+
if (e.source.codePointAt(e.cursor) === 46 && W(e.source.codePointAt(e.cursor + 1) ?? -1)) for (e.advanceCodePoint(2), t = p.Number; W(e.source.codePointAt(e.cursor) ?? -1); ) e.advanceCodePoint();
|
|
740
886
|
if (e.source.codePointAt(e.cursor) === 101 || e.source.codePointAt(e.cursor) === 69) {
|
|
741
887
|
if (W(e.source.codePointAt(e.cursor + 1) ?? -1)) e.advanceCodePoint(2);
|
|
742
888
|
else {
|
|
743
|
-
if (e.source.codePointAt(e.cursor + 1) !== A && e.source.codePointAt(e.cursor + 1) !== oe || !W(e.source.codePointAt(e.cursor + 2) ?? -1)) return
|
|
889
|
+
if (e.source.codePointAt(e.cursor + 1) !== A && e.source.codePointAt(e.cursor + 1) !== oe || !W(e.source.codePointAt(e.cursor + 2) ?? -1)) return t;
|
|
744
890
|
e.advanceCodePoint(3);
|
|
745
891
|
}
|
|
746
|
-
for (
|
|
892
|
+
for (t = p.Number; W(e.source.codePointAt(e.cursor) ?? -1); ) e.advanceCodePoint();
|
|
747
893
|
}
|
|
748
|
-
return
|
|
894
|
+
return t;
|
|
749
895
|
}
|
|
750
|
-
function Me(
|
|
751
|
-
let
|
|
896
|
+
function Me(n, e) {
|
|
897
|
+
let t;
|
|
752
898
|
{
|
|
753
899
|
const i = e.source.codePointAt(e.cursor);
|
|
754
|
-
i === A ?
|
|
900
|
+
i === A ? t = "-" : i === oe && (t = "+");
|
|
755
901
|
}
|
|
756
|
-
const r =
|
|
902
|
+
const r = In(0, e), o = parseFloat(e.source.slice(e.representationStart, e.representationEnd + 1));
|
|
757
903
|
if (Se(0, e)) {
|
|
758
|
-
const i = Fe(
|
|
759
|
-
return [
|
|
904
|
+
const i = Fe(n, e);
|
|
905
|
+
return [s.Dimension, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: o, signCharacter: t, type: r, unit: String.fromCodePoint(...i) }];
|
|
760
906
|
}
|
|
761
|
-
return e.source.codePointAt(e.cursor) === 37 ? (e.advanceCodePoint(), [
|
|
907
|
+
return e.source.codePointAt(e.cursor) === 37 ? (e.advanceCodePoint(), [s.Percentage, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: o, signCharacter: t }]) : [s.Number, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: o, signCharacter: t, type: r }];
|
|
762
908
|
}
|
|
763
|
-
function
|
|
764
|
-
for (; X(
|
|
765
|
-
return [
|
|
909
|
+
function xn(n) {
|
|
910
|
+
for (; X(n.source.codePointAt(n.cursor) ?? -1); ) n.advanceCodePoint();
|
|
911
|
+
return [s.Whitespace, n.source.slice(n.representationStart, n.representationEnd + 1), n.representationStart, n.representationEnd, void 0];
|
|
766
912
|
}
|
|
767
|
-
(function(
|
|
768
|
-
|
|
769
|
-
})(
|
|
770
|
-
|
|
771
|
-
})(
|
|
772
|
-
|
|
913
|
+
(function(n) {
|
|
914
|
+
n.Comment = "comment", n.AtKeyword = "at-keyword-token", n.BadString = "bad-string-token", n.BadURL = "bad-url-token", n.CDC = "CDC-token", n.CDO = "CDO-token", n.Colon = "colon-token", n.Comma = "comma-token", n.Delim = "delim-token", n.Dimension = "dimension-token", n.EOF = "EOF-token", n.Function = "function-token", n.Hash = "hash-token", n.Ident = "ident-token", n.Number = "number-token", n.Percentage = "percentage-token", n.Semicolon = "semicolon-token", n.String = "string-token", n.URL = "url-token", n.Whitespace = "whitespace-token", n.OpenParen = "(-token", n.CloseParen = ")-token", n.OpenSquare = "[-token", n.CloseSquare = "]-token", n.OpenCurly = "{-token", n.CloseCurly = "}-token", n.UnicodeRange = "unicode-range-token";
|
|
915
|
+
})(s || (s = {})), (function(n) {
|
|
916
|
+
n.Integer = "integer", n.Number = "number";
|
|
917
|
+
})(p || (p = {})), (function(n) {
|
|
918
|
+
n.Unrestricted = "unrestricted", n.ID = "id";
|
|
773
919
|
})(Ae || (Ae = {}));
|
|
774
|
-
class
|
|
920
|
+
class On {
|
|
775
921
|
constructor(e) {
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
922
|
+
y(this, "cursor", 0);
|
|
923
|
+
y(this, "source", "");
|
|
924
|
+
y(this, "representationStart", 0);
|
|
925
|
+
y(this, "representationEnd", -1);
|
|
780
926
|
this.source = e;
|
|
781
927
|
}
|
|
782
928
|
advanceCodePoint(e = 1) {
|
|
@@ -793,83 +939,83 @@ class It {
|
|
|
793
939
|
this.representationStart = this.cursor, this.representationEnd = -1;
|
|
794
940
|
}
|
|
795
941
|
}
|
|
796
|
-
function
|
|
797
|
-
let
|
|
942
|
+
function Tn(n, e) {
|
|
943
|
+
let t = "";
|
|
798
944
|
const r = e.readCodePoint();
|
|
799
945
|
for (; ; ) {
|
|
800
946
|
const o = e.readCodePoint();
|
|
801
947
|
if (o === void 0) {
|
|
802
|
-
const i = [
|
|
803
|
-
return
|
|
948
|
+
const i = [s.String, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: t }];
|
|
949
|
+
return n.onParseError(new Y(H.UnexpectedEOFInString, e.representationStart, e.representationEnd, ["4.3.5. Consume a string token", "Unexpected EOF"], i)), i;
|
|
804
950
|
}
|
|
805
951
|
if (be(o)) {
|
|
806
952
|
e.unreadCodePoint();
|
|
807
|
-
const i = [
|
|
808
|
-
return
|
|
953
|
+
const i = [s.BadString, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, void 0];
|
|
954
|
+
return n.onParseError(new Y(H.UnexpectedNewLineInString, e.representationStart, e.source.codePointAt(e.cursor) === te && e.source.codePointAt(e.cursor + 1) === re ? e.representationEnd + 2 : e.representationEnd + 1, ["4.3.5. Consume a string token", "Unexpected newline"], i)), i;
|
|
809
955
|
}
|
|
810
|
-
if (o === r) return [
|
|
811
|
-
if (o !== 92) o === 0 ||
|
|
956
|
+
if (o === r) return [s.String, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: t }];
|
|
957
|
+
if (o !== 92) o === 0 || se(o) ? t += String.fromCodePoint(Z) : t += String.fromCodePoint(o);
|
|
812
958
|
else {
|
|
813
959
|
if (e.source.codePointAt(e.cursor) === void 0) continue;
|
|
814
960
|
if (be(e.source.codePointAt(e.cursor) ?? -1)) {
|
|
815
|
-
e.source.codePointAt(e.cursor) ===
|
|
961
|
+
e.source.codePointAt(e.cursor) === te && e.source.codePointAt(e.cursor + 1) === re && e.advanceCodePoint(), e.advanceCodePoint();
|
|
816
962
|
continue;
|
|
817
963
|
}
|
|
818
|
-
|
|
964
|
+
t += String.fromCodePoint(De(n, e));
|
|
819
965
|
}
|
|
820
966
|
}
|
|
821
967
|
}
|
|
822
|
-
function
|
|
823
|
-
return !(
|
|
968
|
+
function Mn(n) {
|
|
969
|
+
return !(n.length !== 3 || n[0] !== 117 && n[0] !== 85 || n[1] !== 114 && n[1] !== 82 || n[2] !== 108 && n[2] !== 76);
|
|
824
970
|
}
|
|
825
|
-
function Re(
|
|
971
|
+
function Re(n, e) {
|
|
826
972
|
for (; ; ) {
|
|
827
|
-
const
|
|
828
|
-
if (
|
|
829
|
-
if (
|
|
830
|
-
|
|
973
|
+
const t = e.source.codePointAt(e.cursor);
|
|
974
|
+
if (t === void 0) return;
|
|
975
|
+
if (t === 41) return void e.advanceCodePoint();
|
|
976
|
+
pe(e) ? (e.advanceCodePoint(), De(n, e)) : e.advanceCodePoint();
|
|
831
977
|
}
|
|
832
978
|
}
|
|
833
|
-
function
|
|
979
|
+
function Rn(n, e) {
|
|
834
980
|
for (; X(e.source.codePointAt(e.cursor) ?? -1); ) e.advanceCodePoint();
|
|
835
|
-
let
|
|
981
|
+
let t = "";
|
|
836
982
|
for (; ; ) {
|
|
837
983
|
if (e.source.codePointAt(e.cursor) === void 0) {
|
|
838
|
-
const i = [
|
|
839
|
-
return
|
|
984
|
+
const i = [s.URL, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: t }];
|
|
985
|
+
return n.onParseError(new Y(H.UnexpectedEOFInURL, e.representationStart, e.representationEnd, ["4.3.6. Consume a url token", "Unexpected EOF"], i)), i;
|
|
840
986
|
}
|
|
841
|
-
if (e.source.codePointAt(e.cursor) === 41) return e.advanceCodePoint(), [
|
|
987
|
+
if (e.source.codePointAt(e.cursor) === 41) return e.advanceCodePoint(), [s.URL, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: t }];
|
|
842
988
|
if (X(e.source.codePointAt(e.cursor) ?? -1)) {
|
|
843
989
|
for (e.advanceCodePoint(); X(e.source.codePointAt(e.cursor) ?? -1); ) e.advanceCodePoint();
|
|
844
990
|
if (e.source.codePointAt(e.cursor) === void 0) {
|
|
845
|
-
const i = [
|
|
846
|
-
return
|
|
991
|
+
const i = [s.URL, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: t }];
|
|
992
|
+
return n.onParseError(new Y(H.UnexpectedEOFInURL, e.representationStart, e.representationEnd, ["4.3.6. Consume a url token", "Consume as much whitespace as possible", "Unexpected EOF"], i)), i;
|
|
847
993
|
}
|
|
848
|
-
return e.source.codePointAt(e.cursor) === 41 ? (e.advanceCodePoint(), [
|
|
994
|
+
return e.source.codePointAt(e.cursor) === 41 ? (e.advanceCodePoint(), [s.URL, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: t }]) : (Re(n, e), [s.BadURL, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, void 0]);
|
|
849
995
|
}
|
|
850
996
|
const o = e.source.codePointAt(e.cursor);
|
|
851
997
|
if (o === 34 || o === 39 || o === 40 || (r = o ?? -1) === 11 || r === 127 || 0 <= r && r <= 8 || 14 <= r && r <= 31) {
|
|
852
|
-
Re(
|
|
853
|
-
const i = [
|
|
854
|
-
return
|
|
998
|
+
Re(n, e);
|
|
999
|
+
const i = [s.BadURL, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, void 0];
|
|
1000
|
+
return n.onParseError(new Y(H.UnexpectedCharacterInURL, e.representationStart, e.representationEnd, ["4.3.6. Consume a url token", `Unexpected U+0022 QUOTATION MARK ("), U+0027 APOSTROPHE ('), U+0028 LEFT PARENTHESIS (() or non-printable code point`], i)), i;
|
|
855
1001
|
}
|
|
856
1002
|
if (o === 92) {
|
|
857
|
-
if (
|
|
858
|
-
e.advanceCodePoint(),
|
|
1003
|
+
if (pe(e)) {
|
|
1004
|
+
e.advanceCodePoint(), t += String.fromCodePoint(De(n, e));
|
|
859
1005
|
continue;
|
|
860
1006
|
}
|
|
861
|
-
Re(
|
|
862
|
-
const i = [
|
|
863
|
-
return
|
|
1007
|
+
Re(n, e);
|
|
1008
|
+
const i = [s.BadURL, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, void 0];
|
|
1009
|
+
return n.onParseError(new Y(H.InvalidEscapeSequenceInURL, e.representationStart, e.representationEnd, ["4.3.6. Consume a url token", "U+005C REVERSE SOLIDUS (\\)", "The input stream does not start with a valid escape sequence"], i)), i;
|
|
864
1010
|
}
|
|
865
|
-
e.source.codePointAt(e.cursor) === 0 ||
|
|
1011
|
+
e.source.codePointAt(e.cursor) === 0 || se(e.source.codePointAt(e.cursor) ?? -1) ? (t += String.fromCodePoint(Z), e.advanceCodePoint()) : (t += e.source[e.cursor], e.advanceCodePoint());
|
|
866
1012
|
}
|
|
867
1013
|
var r;
|
|
868
1014
|
}
|
|
869
|
-
function Ue(
|
|
870
|
-
const
|
|
871
|
-
if (e.source.codePointAt(e.cursor) !== 40) return [
|
|
872
|
-
if (
|
|
1015
|
+
function Ue(n, e) {
|
|
1016
|
+
const t = Fe(n, e);
|
|
1017
|
+
if (e.source.codePointAt(e.cursor) !== 40) return [s.Ident, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: String.fromCodePoint(...t) }];
|
|
1018
|
+
if (Mn(t)) {
|
|
873
1019
|
e.advanceCodePoint();
|
|
874
1020
|
let r = 0;
|
|
875
1021
|
for (; ; ) {
|
|
@@ -878,233 +1024,233 @@ function Ue(t, e) {
|
|
|
878
1024
|
r += 1, e.advanceCodePoint(1);
|
|
879
1025
|
continue;
|
|
880
1026
|
}
|
|
881
|
-
const
|
|
882
|
-
if (
|
|
1027
|
+
const a = o ? e.source.codePointAt(e.cursor + 1) : e.source.codePointAt(e.cursor);
|
|
1028
|
+
if (a === 34 || a === 39) return r > 0 && e.unreadCodePoint(r), [s.Function, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: String.fromCodePoint(...t) }];
|
|
883
1029
|
break;
|
|
884
1030
|
}
|
|
885
|
-
return
|
|
1031
|
+
return Rn(n, e);
|
|
886
1032
|
}
|
|
887
|
-
return e.advanceCodePoint(), [
|
|
1033
|
+
return e.advanceCodePoint(), [s.Function, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { value: String.fromCodePoint(...t) }];
|
|
888
1034
|
}
|
|
889
|
-
function
|
|
890
|
-
return !(
|
|
1035
|
+
function Un(n) {
|
|
1036
|
+
return !(n.source.codePointAt(n.cursor) !== 117 && n.source.codePointAt(n.cursor) !== 85 || n.source.codePointAt(n.cursor + 1) !== oe || n.source.codePointAt(n.cursor + 2) !== 63 && !ne(n.source.codePointAt(n.cursor + 2) ?? -1));
|
|
891
1037
|
}
|
|
892
|
-
function
|
|
1038
|
+
function Wn(n, e) {
|
|
893
1039
|
e.advanceCodePoint(2);
|
|
894
|
-
const
|
|
1040
|
+
const t = [], r = [];
|
|
895
1041
|
let o;
|
|
896
|
-
for (; (o = e.source.codePointAt(e.cursor)) !== void 0 &&
|
|
897
|
-
for (; (o = e.source.codePointAt(e.cursor)) !== void 0 &&
|
|
898
|
-
if (!r.length && e.source.codePointAt(e.cursor) === A &&
|
|
1042
|
+
for (; (o = e.source.codePointAt(e.cursor)) !== void 0 && t.length < 6 && ne(o); ) t.push(o), e.advanceCodePoint();
|
|
1043
|
+
for (; (o = e.source.codePointAt(e.cursor)) !== void 0 && t.length < 6 && o === 63; ) r.length === 0 && r.push(...t), t.push(48), r.push(70), e.advanceCodePoint();
|
|
1044
|
+
if (!r.length && e.source.codePointAt(e.cursor) === A && ne(e.source.codePointAt(e.cursor + 1) ?? -1)) for (e.advanceCodePoint(); (o = e.source.codePointAt(e.cursor)) !== void 0 && r.length < 6 && ne(o); ) r.push(o), e.advanceCodePoint();
|
|
899
1045
|
if (!r.length) {
|
|
900
|
-
const u = parseInt(String.fromCodePoint(...
|
|
901
|
-
return [
|
|
1046
|
+
const u = parseInt(String.fromCodePoint(...t), 16);
|
|
1047
|
+
return [s.UnicodeRange, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { startOfRange: u, endOfRange: u }];
|
|
902
1048
|
}
|
|
903
|
-
const i = parseInt(String.fromCodePoint(...
|
|
904
|
-
return [
|
|
1049
|
+
const i = parseInt(String.fromCodePoint(...t), 16), a = parseInt(String.fromCodePoint(...r), 16);
|
|
1050
|
+
return [s.UnicodeRange, e.source.slice(e.representationStart, e.representationEnd + 1), e.representationStart, e.representationEnd, { startOfRange: i, endOfRange: a }];
|
|
905
1051
|
}
|
|
906
|
-
function
|
|
907
|
-
const
|
|
908
|
-
for (; !
|
|
909
|
-
return r.push(
|
|
1052
|
+
function Ln(n, e) {
|
|
1053
|
+
const t = $n(n), r = [];
|
|
1054
|
+
for (; !t.endOfFile(); ) r.push(t.nextToken());
|
|
1055
|
+
return r.push(t.nextToken()), r;
|
|
910
1056
|
}
|
|
911
|
-
function
|
|
912
|
-
const
|
|
1057
|
+
function $n(n, e) {
|
|
1058
|
+
const t = n.css.valueOf(), r = n.unicodeRangesAllowed ?? !1, o = new On(t), i = { onParseError: zn };
|
|
913
1059
|
return { nextToken: function() {
|
|
914
1060
|
o.resetRepresentation();
|
|
915
1061
|
const u = o.source.codePointAt(o.cursor);
|
|
916
|
-
if (u === void 0) return [
|
|
917
|
-
if (u === 47 &&
|
|
918
|
-
if (r && (u === 117 || u === 85) &&
|
|
1062
|
+
if (u === void 0) return [s.EOF, "", -1, -1, void 0];
|
|
1063
|
+
if (u === 47 && An(o)) return Nn(i, o);
|
|
1064
|
+
if (r && (u === 117 || u === 85) && Un(o)) return Wn(0, o);
|
|
919
1065
|
if (ie(u)) return Ue(i, o);
|
|
920
1066
|
if (W(u)) return Me(i, o);
|
|
921
1067
|
switch (u) {
|
|
922
1068
|
case 44:
|
|
923
|
-
return o.advanceCodePoint(), [
|
|
1069
|
+
return o.advanceCodePoint(), [s.Comma, ",", o.representationStart, o.representationEnd, void 0];
|
|
924
1070
|
case 58:
|
|
925
|
-
return o.advanceCodePoint(), [
|
|
1071
|
+
return o.advanceCodePoint(), [s.Colon, ":", o.representationStart, o.representationEnd, void 0];
|
|
926
1072
|
case 59:
|
|
927
|
-
return o.advanceCodePoint(), [
|
|
1073
|
+
return o.advanceCodePoint(), [s.Semicolon, ";", o.representationStart, o.representationEnd, void 0];
|
|
928
1074
|
case 40:
|
|
929
|
-
return o.advanceCodePoint(), [
|
|
1075
|
+
return o.advanceCodePoint(), [s.OpenParen, "(", o.representationStart, o.representationEnd, void 0];
|
|
930
1076
|
case 41:
|
|
931
|
-
return o.advanceCodePoint(), [
|
|
1077
|
+
return o.advanceCodePoint(), [s.CloseParen, ")", o.representationStart, o.representationEnd, void 0];
|
|
932
1078
|
case 91:
|
|
933
|
-
return o.advanceCodePoint(), [
|
|
1079
|
+
return o.advanceCodePoint(), [s.OpenSquare, "[", o.representationStart, o.representationEnd, void 0];
|
|
934
1080
|
case 93:
|
|
935
|
-
return o.advanceCodePoint(), [
|
|
1081
|
+
return o.advanceCodePoint(), [s.CloseSquare, "]", o.representationStart, o.representationEnd, void 0];
|
|
936
1082
|
case 123:
|
|
937
|
-
return o.advanceCodePoint(), [
|
|
1083
|
+
return o.advanceCodePoint(), [s.OpenCurly, "{", o.representationStart, o.representationEnd, void 0];
|
|
938
1084
|
case 125:
|
|
939
|
-
return o.advanceCodePoint(), [
|
|
1085
|
+
return o.advanceCodePoint(), [s.CloseCurly, "}", o.representationStart, o.representationEnd, void 0];
|
|
940
1086
|
case 39:
|
|
941
1087
|
case 34:
|
|
942
|
-
return
|
|
1088
|
+
return Tn(i, o);
|
|
943
1089
|
case 35:
|
|
944
|
-
return
|
|
1090
|
+
return wn(i, o);
|
|
945
1091
|
case oe:
|
|
946
1092
|
case 46:
|
|
947
|
-
return
|
|
1093
|
+
return Ze(o) ? Me(i, o) : (o.advanceCodePoint(), [s.Delim, o.source[o.representationStart], o.representationStart, o.representationEnd, { value: o.source[o.representationStart] }]);
|
|
948
1094
|
case re:
|
|
949
|
-
case
|
|
1095
|
+
case te:
|
|
950
1096
|
case 12:
|
|
951
1097
|
case 9:
|
|
952
1098
|
case 32:
|
|
953
|
-
return
|
|
1099
|
+
return xn(o);
|
|
954
1100
|
case A:
|
|
955
|
-
return
|
|
1101
|
+
return Ze(o) ? Me(i, o) : Bn(o) ? (o.advanceCodePoint(3), [s.CDC, "-->", o.representationStart, o.representationEnd, void 0]) : Se(0, o) ? Ue(i, o) : (o.advanceCodePoint(), [s.Delim, "-", o.representationStart, o.representationEnd, { value: "-" }]);
|
|
956
1102
|
case 60:
|
|
957
|
-
return
|
|
1103
|
+
return kn(o) ? (o.advanceCodePoint(4), [s.CDO, "<!--", o.representationStart, o.representationEnd, void 0]) : (o.advanceCodePoint(), [s.Delim, "<", o.representationStart, o.representationEnd, { value: "<" }]);
|
|
958
1104
|
case 64:
|
|
959
1105
|
if (o.advanceCodePoint(), Se(0, o)) {
|
|
960
1106
|
const c = Fe(i, o);
|
|
961
|
-
return [
|
|
1107
|
+
return [s.AtKeyword, o.source.slice(o.representationStart, o.representationEnd + 1), o.representationStart, o.representationEnd, { value: String.fromCodePoint(...c) }];
|
|
962
1108
|
}
|
|
963
|
-
return [
|
|
1109
|
+
return [s.Delim, "@", o.representationStart, o.representationEnd, { value: "@" }];
|
|
964
1110
|
case 92: {
|
|
965
|
-
if (
|
|
1111
|
+
if (pe(o)) return Ue(i, o);
|
|
966
1112
|
o.advanceCodePoint();
|
|
967
|
-
const c = [
|
|
1113
|
+
const c = [s.Delim, "\\", o.representationStart, o.representationEnd, { value: "\\" }];
|
|
968
1114
|
return i.onParseError(new Y(H.InvalidEscapeSequenceAfterBackslash, o.representationStart, o.representationEnd, ["4.3.1. Consume a token", "U+005C REVERSE SOLIDUS (\\)", "The input stream does not start with a valid escape sequence"], c)), c;
|
|
969
1115
|
}
|
|
970
1116
|
}
|
|
971
|
-
return o.advanceCodePoint(), [
|
|
1117
|
+
return o.advanceCodePoint(), [s.Delim, o.source[o.representationStart], o.representationStart, o.representationEnd, { value: o.source[o.representationStart] }];
|
|
972
1118
|
}, endOfFile: function() {
|
|
973
1119
|
return o.source.codePointAt(o.cursor) === void 0;
|
|
974
1120
|
} };
|
|
975
1121
|
}
|
|
976
|
-
function
|
|
1122
|
+
function zn() {
|
|
977
1123
|
}
|
|
978
|
-
function
|
|
979
|
-
const
|
|
980
|
-
for (const u of e)
|
|
981
|
-
const r =
|
|
1124
|
+
function qn(n, e) {
|
|
1125
|
+
const t = [];
|
|
1126
|
+
for (const u of e) t.push(u.codePointAt(0));
|
|
1127
|
+
const r = Vn(t);
|
|
982
1128
|
r[0] === 101 && Le(r, 0, r[0]);
|
|
983
|
-
const o = String.fromCodePoint(...r), i =
|
|
984
|
-
|
|
1129
|
+
const o = String.fromCodePoint(...r), i = n[4].signCharacter === "+" ? n[4].signCharacter : "", a = n[4].value.toString();
|
|
1130
|
+
n[1] = `${i}${a}${o}`, n[4].unit = e;
|
|
985
1131
|
}
|
|
986
|
-
function
|
|
1132
|
+
function Vn(n) {
|
|
987
1133
|
let e = 0;
|
|
988
|
-
if (
|
|
989
|
-
else if (
|
|
990
|
-
else if (
|
|
1134
|
+
if (n[0] === 0) n.splice(0, 1, Z), e = 1;
|
|
1135
|
+
else if (n[0] === A && n[1] === A) e = 2;
|
|
1136
|
+
else if (n[0] === A && n[1]) e = 2, ie(n[1]) || (e += Le(n, 1, n[1]));
|
|
991
1137
|
else {
|
|
992
|
-
if (
|
|
993
|
-
ie(
|
|
1138
|
+
if (n[0] === A && !n[1]) return [92, n[0]];
|
|
1139
|
+
ie(n[0]) ? e = 1 : (e = 1, e += Le(n, 0, n[0]));
|
|
994
1140
|
}
|
|
995
|
-
for (let
|
|
996
|
-
return
|
|
1141
|
+
for (let t = e; t < n.length; t++) n[t] !== 0 ? ze(n[t]) || (t += jn(n, t, n[t])) : (n.splice(t, 1, Z), t++);
|
|
1142
|
+
return n;
|
|
997
1143
|
}
|
|
998
|
-
function
|
|
999
|
-
return
|
|
1144
|
+
function jn(n, e, t) {
|
|
1145
|
+
return n.splice(e, 1, 92, t), 1;
|
|
1000
1146
|
}
|
|
1001
|
-
function Le(
|
|
1002
|
-
const r =
|
|
1147
|
+
function Le(n, e, t) {
|
|
1148
|
+
const r = t.toString(16), o = [];
|
|
1003
1149
|
for (const i of r) o.push(i.codePointAt(0));
|
|
1004
|
-
return
|
|
1005
|
-
}
|
|
1006
|
-
const
|
|
1007
|
-
function
|
|
1008
|
-
return !!Array.isArray(
|
|
1009
|
-
}
|
|
1010
|
-
function
|
|
1011
|
-
if (!
|
|
1012
|
-
switch (
|
|
1013
|
-
case
|
|
1014
|
-
case
|
|
1015
|
-
case
|
|
1150
|
+
return n.splice(e, 1, 92, ...o, 32), 1 + o.length;
|
|
1151
|
+
}
|
|
1152
|
+
const Hn = Object.values(s);
|
|
1153
|
+
function nn(n) {
|
|
1154
|
+
return !!Array.isArray(n) && !(n.length < 4) && !!Hn.includes(n[0]) && typeof n[1] == "string" && typeof n[2] == "number" && typeof n[3] == "number";
|
|
1155
|
+
}
|
|
1156
|
+
function B(n) {
|
|
1157
|
+
if (!n) return !1;
|
|
1158
|
+
switch (n[0]) {
|
|
1159
|
+
case s.Dimension:
|
|
1160
|
+
case s.Number:
|
|
1161
|
+
case s.Percentage:
|
|
1016
1162
|
return !0;
|
|
1017
1163
|
default:
|
|
1018
1164
|
return !1;
|
|
1019
1165
|
}
|
|
1020
1166
|
}
|
|
1021
|
-
function
|
|
1022
|
-
if (!
|
|
1023
|
-
switch (
|
|
1024
|
-
case
|
|
1025
|
-
case
|
|
1167
|
+
function tn(n) {
|
|
1168
|
+
if (!n) return !1;
|
|
1169
|
+
switch (n[0]) {
|
|
1170
|
+
case s.Whitespace:
|
|
1171
|
+
case s.Comment:
|
|
1026
1172
|
return !0;
|
|
1027
1173
|
default:
|
|
1028
1174
|
return !1;
|
|
1029
1175
|
}
|
|
1030
1176
|
}
|
|
1031
|
-
function
|
|
1032
|
-
return !!
|
|
1177
|
+
function ae(n) {
|
|
1178
|
+
return !!n && n[0] === s.Comma;
|
|
1033
1179
|
}
|
|
1034
|
-
function
|
|
1035
|
-
return !!
|
|
1180
|
+
function rn(n) {
|
|
1181
|
+
return !!n && n[0] === s.Comment;
|
|
1036
1182
|
}
|
|
1037
|
-
function
|
|
1038
|
-
return !!
|
|
1183
|
+
function Ke(n) {
|
|
1184
|
+
return !!n && n[0] === s.Delim;
|
|
1039
1185
|
}
|
|
1040
|
-
function
|
|
1041
|
-
return !!
|
|
1186
|
+
function P(n) {
|
|
1187
|
+
return !!n && n[0] === s.Dimension;
|
|
1042
1188
|
}
|
|
1043
|
-
function K(
|
|
1044
|
-
return !!
|
|
1189
|
+
function K(n) {
|
|
1190
|
+
return !!n && n[0] === s.EOF;
|
|
1045
1191
|
}
|
|
1046
|
-
function
|
|
1047
|
-
return !!
|
|
1192
|
+
function Gn(n) {
|
|
1193
|
+
return !!n && n[0] === s.Function;
|
|
1048
1194
|
}
|
|
1049
|
-
function
|
|
1050
|
-
return !!
|
|
1195
|
+
function me(n) {
|
|
1196
|
+
return !!n && n[0] === s.Ident;
|
|
1051
1197
|
}
|
|
1052
|
-
function
|
|
1053
|
-
return !!
|
|
1198
|
+
function m(n) {
|
|
1199
|
+
return !!n && n[0] === s.Number;
|
|
1054
1200
|
}
|
|
1055
|
-
function b(
|
|
1056
|
-
return !!
|
|
1201
|
+
function b(n) {
|
|
1202
|
+
return !!n && n[0] === s.Percentage;
|
|
1057
1203
|
}
|
|
1058
|
-
function
|
|
1059
|
-
return !!
|
|
1204
|
+
function qe(n) {
|
|
1205
|
+
return !!n && n[0] === s.Whitespace;
|
|
1060
1206
|
}
|
|
1061
|
-
function
|
|
1062
|
-
return !!
|
|
1207
|
+
function on(n) {
|
|
1208
|
+
return !!n && n[0] === s.OpenParen;
|
|
1063
1209
|
}
|
|
1064
|
-
function
|
|
1065
|
-
return !!
|
|
1210
|
+
function Jn(n) {
|
|
1211
|
+
return !!n && n[0] === s.CloseParen;
|
|
1066
1212
|
}
|
|
1067
|
-
function
|
|
1068
|
-
return !!
|
|
1213
|
+
function Yn(n) {
|
|
1214
|
+
return !!n && n[0] === s.OpenSquare;
|
|
1069
1215
|
}
|
|
1070
|
-
function
|
|
1071
|
-
return !!
|
|
1216
|
+
function Zn(n) {
|
|
1217
|
+
return !!n && n[0] === s.OpenCurly;
|
|
1072
1218
|
}
|
|
1073
1219
|
var $;
|
|
1074
|
-
function
|
|
1075
|
-
let e =
|
|
1076
|
-
return (
|
|
1220
|
+
function sn(n) {
|
|
1221
|
+
let e = n.slice();
|
|
1222
|
+
return (t, r, o) => {
|
|
1077
1223
|
let i = -1;
|
|
1078
|
-
for (let
|
|
1079
|
-
return i === -1 || i === o && r ===
|
|
1224
|
+
for (let a = e.indexOf(r); a < e.length && (i = t.indexOf(e[a]), i === -1 || i < o); a++) ;
|
|
1225
|
+
return i === -1 || i === o && r === t[o] && (i++, i >= t.length) ? -1 : (e = t.slice(), i);
|
|
1080
1226
|
};
|
|
1081
1227
|
}
|
|
1082
|
-
function Ve(
|
|
1083
|
-
const
|
|
1084
|
-
if (
|
|
1085
|
-
const r =
|
|
1228
|
+
function Ve(n, e) {
|
|
1229
|
+
const t = e[0];
|
|
1230
|
+
if (on(t) || Zn(t) || Yn(t)) {
|
|
1231
|
+
const r = Qn(n, e);
|
|
1086
1232
|
return { advance: r.advance, node: r.node };
|
|
1087
1233
|
}
|
|
1088
|
-
if (
|
|
1089
|
-
const r =
|
|
1234
|
+
if (Gn(t)) {
|
|
1235
|
+
const r = Kn(n, e);
|
|
1090
1236
|
return { advance: r.advance, node: r.node };
|
|
1091
1237
|
}
|
|
1092
|
-
if (
|
|
1093
|
-
const r =
|
|
1238
|
+
if (qe(t)) {
|
|
1239
|
+
const r = un(n, e);
|
|
1094
1240
|
return { advance: r.advance, node: r.node };
|
|
1095
1241
|
}
|
|
1096
|
-
if (
|
|
1097
|
-
const r =
|
|
1242
|
+
if (rn(t)) {
|
|
1243
|
+
const r = Xn(n, e);
|
|
1098
1244
|
return { advance: r.advance, node: r.node };
|
|
1099
1245
|
}
|
|
1100
|
-
return { advance: 1, node: new f(
|
|
1246
|
+
return { advance: 1, node: new f(t) };
|
|
1101
1247
|
}
|
|
1102
|
-
(function(
|
|
1103
|
-
|
|
1248
|
+
(function(n) {
|
|
1249
|
+
n.Function = "function", n.SimpleBlock = "simple-block", n.Whitespace = "whitespace", n.Comment = "comment", n.Token = "token";
|
|
1104
1250
|
})($ || ($ = {}));
|
|
1105
|
-
class
|
|
1251
|
+
class an {
|
|
1106
1252
|
constructor() {
|
|
1107
|
-
|
|
1253
|
+
y(this, "value", []);
|
|
1108
1254
|
}
|
|
1109
1255
|
indexOf(e) {
|
|
1110
1256
|
return this.value.indexOf(e);
|
|
@@ -1112,121 +1258,121 @@ class it {
|
|
|
1112
1258
|
at(e) {
|
|
1113
1259
|
if (typeof e == "number") return e < 0 && (e = this.value.length + e), this.value[e];
|
|
1114
1260
|
}
|
|
1115
|
-
forEach(e,
|
|
1261
|
+
forEach(e, t) {
|
|
1116
1262
|
if (this.value.length === 0) return;
|
|
1117
|
-
const r =
|
|
1263
|
+
const r = sn(this.value);
|
|
1118
1264
|
let o = 0;
|
|
1119
1265
|
for (; o < this.value.length; ) {
|
|
1120
1266
|
const i = this.value[o];
|
|
1121
|
-
let
|
|
1122
|
-
if (
|
|
1267
|
+
let a;
|
|
1268
|
+
if (t && (a = { ...t }), e({ node: i, parent: this, state: a }, o) === !1) return !1;
|
|
1123
1269
|
if (o = r(this.value, i, o), o === -1) break;
|
|
1124
1270
|
}
|
|
1125
1271
|
}
|
|
1126
|
-
walk(e,
|
|
1127
|
-
this.value.length !== 0 && this.forEach(((r, o) => e(r, o) !== !1 && (!("walk" in r.node) || !this.value.includes(r.node) || r.node.walk(e, r.state) !== !1) && void 0),
|
|
1272
|
+
walk(e, t) {
|
|
1273
|
+
this.value.length !== 0 && this.forEach(((r, o) => e(r, o) !== !1 && (!("walk" in r.node) || !this.value.includes(r.node) || r.node.walk(e, r.state) !== !1) && void 0), t);
|
|
1128
1274
|
}
|
|
1129
1275
|
}
|
|
1130
|
-
class N extends
|
|
1131
|
-
constructor(
|
|
1276
|
+
class N extends an {
|
|
1277
|
+
constructor(t, r, o) {
|
|
1132
1278
|
super();
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
this.name =
|
|
1279
|
+
y(this, "type", $.Function);
|
|
1280
|
+
y(this, "name");
|
|
1281
|
+
y(this, "endToken");
|
|
1282
|
+
this.name = t, this.endToken = r, this.value = o;
|
|
1137
1283
|
}
|
|
1138
1284
|
getName() {
|
|
1139
1285
|
return this.name[4].value;
|
|
1140
1286
|
}
|
|
1141
1287
|
normalize() {
|
|
1142
|
-
K(this.endToken) && (this.endToken = [
|
|
1288
|
+
K(this.endToken) && (this.endToken = [s.CloseParen, ")", -1, -1, void 0]);
|
|
1143
1289
|
}
|
|
1144
1290
|
tokens() {
|
|
1145
|
-
return K(this.endToken) ? [this.name, ...this.value.flatMap(((
|
|
1291
|
+
return K(this.endToken) ? [this.name, ...this.value.flatMap(((t) => t.tokens()))] : [this.name, ...this.value.flatMap(((t) => t.tokens())), this.endToken];
|
|
1146
1292
|
}
|
|
1147
1293
|
toString() {
|
|
1148
|
-
const
|
|
1149
|
-
return G(this.name) +
|
|
1294
|
+
const t = this.value.map(((r) => nn(r) ? G(r) : r.toString())).join("");
|
|
1295
|
+
return G(this.name) + t + G(this.endToken);
|
|
1150
1296
|
}
|
|
1151
1297
|
toJSON() {
|
|
1152
|
-
return { type: this.type, name: this.getName(), tokens: this.tokens(), value: this.value.map(((
|
|
1298
|
+
return { type: this.type, name: this.getName(), tokens: this.tokens(), value: this.value.map(((t) => t.toJSON())) };
|
|
1153
1299
|
}
|
|
1154
1300
|
isFunctionNode() {
|
|
1155
1301
|
return N.isFunctionNode(this);
|
|
1156
1302
|
}
|
|
1157
|
-
static isFunctionNode(
|
|
1158
|
-
return !!
|
|
1303
|
+
static isFunctionNode(t) {
|
|
1304
|
+
return !!t && t instanceof N && t.type === $.Function;
|
|
1159
1305
|
}
|
|
1160
1306
|
}
|
|
1161
|
-
function
|
|
1162
|
-
const
|
|
1307
|
+
function Kn(n, e) {
|
|
1308
|
+
const t = [];
|
|
1163
1309
|
let r = 1;
|
|
1164
1310
|
for (; ; ) {
|
|
1165
1311
|
const o = e[r];
|
|
1166
|
-
if (!o || K(o)) return
|
|
1167
|
-
if (
|
|
1168
|
-
if (
|
|
1169
|
-
const
|
|
1170
|
-
r +=
|
|
1312
|
+
if (!o || K(o)) return n.onParseError(new Be("Unexpected EOF while consuming a function.", e[0][2], e[e.length - 1][3], ["5.4.9. Consume a function", "Unexpected EOF"])), { advance: e.length, node: new N(e[0], o, t) };
|
|
1313
|
+
if (Jn(o)) return { advance: r + 1, node: new N(e[0], o, t) };
|
|
1314
|
+
if (tn(o)) {
|
|
1315
|
+
const a = cn(n, e.slice(r));
|
|
1316
|
+
r += a.advance, t.push(...a.nodes);
|
|
1171
1317
|
continue;
|
|
1172
1318
|
}
|
|
1173
|
-
const i = Ve(
|
|
1174
|
-
r += i.advance,
|
|
1319
|
+
const i = Ve(n, e.slice(r));
|
|
1320
|
+
r += i.advance, t.push(i.node);
|
|
1175
1321
|
}
|
|
1176
1322
|
}
|
|
1177
|
-
class ue extends
|
|
1178
|
-
constructor(
|
|
1323
|
+
class ue extends an {
|
|
1324
|
+
constructor(t, r, o) {
|
|
1179
1325
|
super();
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
this.startToken =
|
|
1326
|
+
y(this, "type", $.SimpleBlock);
|
|
1327
|
+
y(this, "startToken");
|
|
1328
|
+
y(this, "endToken");
|
|
1329
|
+
this.startToken = t, this.endToken = r, this.value = o;
|
|
1184
1330
|
}
|
|
1185
1331
|
normalize() {
|
|
1186
1332
|
if (K(this.endToken)) {
|
|
1187
|
-
const
|
|
1188
|
-
|
|
1333
|
+
const t = Fn(this.startToken);
|
|
1334
|
+
t && (this.endToken = t);
|
|
1189
1335
|
}
|
|
1190
1336
|
}
|
|
1191
1337
|
tokens() {
|
|
1192
|
-
return K(this.endToken) ? [this.startToken, ...this.value.flatMap(((
|
|
1338
|
+
return K(this.endToken) ? [this.startToken, ...this.value.flatMap(((t) => t.tokens()))] : [this.startToken, ...this.value.flatMap(((t) => t.tokens())), this.endToken];
|
|
1193
1339
|
}
|
|
1194
1340
|
toString() {
|
|
1195
|
-
const
|
|
1196
|
-
return G(this.startToken) +
|
|
1341
|
+
const t = this.value.map(((r) => nn(r) ? G(r) : r.toString())).join("");
|
|
1342
|
+
return G(this.startToken) + t + G(this.endToken);
|
|
1197
1343
|
}
|
|
1198
1344
|
toJSON() {
|
|
1199
|
-
return { type: this.type, startToken: this.startToken, tokens: this.tokens(), value: this.value.map(((
|
|
1345
|
+
return { type: this.type, startToken: this.startToken, tokens: this.tokens(), value: this.value.map(((t) => t.toJSON())) };
|
|
1200
1346
|
}
|
|
1201
1347
|
isSimpleBlockNode() {
|
|
1202
1348
|
return ue.isSimpleBlockNode(this);
|
|
1203
1349
|
}
|
|
1204
|
-
static isSimpleBlockNode(
|
|
1205
|
-
return !!
|
|
1350
|
+
static isSimpleBlockNode(t) {
|
|
1351
|
+
return !!t && t instanceof ue && t.type === $.SimpleBlock;
|
|
1206
1352
|
}
|
|
1207
1353
|
}
|
|
1208
|
-
function
|
|
1209
|
-
const
|
|
1210
|
-
if (!
|
|
1354
|
+
function Qn(n, e) {
|
|
1355
|
+
const t = Dn(e[0][0]);
|
|
1356
|
+
if (!t) throw new Error("Failed to parse, a mirror variant must exist for all block open tokens.");
|
|
1211
1357
|
const r = [];
|
|
1212
1358
|
let o = 1;
|
|
1213
1359
|
for (; ; ) {
|
|
1214
1360
|
const i = e[o];
|
|
1215
|
-
if (!i || K(i)) return
|
|
1216
|
-
if (i[0] ===
|
|
1217
|
-
if (
|
|
1218
|
-
const u =
|
|
1361
|
+
if (!i || K(i)) return n.onParseError(new Be("Unexpected EOF while consuming a simple block.", e[0][2], e[e.length - 1][3], ["5.4.8. Consume a simple block", "Unexpected EOF"])), { advance: e.length, node: new ue(e[0], i, r) };
|
|
1362
|
+
if (i[0] === t) return { advance: o + 1, node: new ue(e[0], i, r) };
|
|
1363
|
+
if (tn(i)) {
|
|
1364
|
+
const u = cn(n, e.slice(o));
|
|
1219
1365
|
o += u.advance, r.push(...u.nodes);
|
|
1220
1366
|
continue;
|
|
1221
1367
|
}
|
|
1222
|
-
const
|
|
1223
|
-
o +=
|
|
1368
|
+
const a = Ve(n, e.slice(o));
|
|
1369
|
+
o += a.advance, r.push(a.node);
|
|
1224
1370
|
}
|
|
1225
1371
|
}
|
|
1226
|
-
class
|
|
1372
|
+
class M {
|
|
1227
1373
|
constructor(e) {
|
|
1228
|
-
|
|
1229
|
-
|
|
1374
|
+
y(this, "type", $.Whitespace);
|
|
1375
|
+
y(this, "value");
|
|
1230
1376
|
this.value = e;
|
|
1231
1377
|
}
|
|
1232
1378
|
tokens() {
|
|
@@ -1239,24 +1385,24 @@ class T {
|
|
|
1239
1385
|
return { type: this.type, tokens: this.tokens() };
|
|
1240
1386
|
}
|
|
1241
1387
|
isWhitespaceNode() {
|
|
1242
|
-
return
|
|
1388
|
+
return M.isWhitespaceNode(this);
|
|
1243
1389
|
}
|
|
1244
1390
|
static isWhitespaceNode(e) {
|
|
1245
|
-
return !!e && e instanceof
|
|
1391
|
+
return !!e && e instanceof M && e.type === $.Whitespace;
|
|
1246
1392
|
}
|
|
1247
1393
|
}
|
|
1248
|
-
function
|
|
1249
|
-
let
|
|
1394
|
+
function un(n, e) {
|
|
1395
|
+
let t = 0;
|
|
1250
1396
|
for (; ; ) {
|
|
1251
|
-
const r = e[
|
|
1252
|
-
if (!
|
|
1253
|
-
|
|
1397
|
+
const r = e[t];
|
|
1398
|
+
if (!qe(r)) return { advance: t, node: new M(e.slice(0, t)) };
|
|
1399
|
+
t++;
|
|
1254
1400
|
}
|
|
1255
1401
|
}
|
|
1256
1402
|
class ce {
|
|
1257
1403
|
constructor(e) {
|
|
1258
|
-
|
|
1259
|
-
|
|
1404
|
+
y(this, "type", $.Comment);
|
|
1405
|
+
y(this, "value");
|
|
1260
1406
|
this.value = e;
|
|
1261
1407
|
}
|
|
1262
1408
|
tokens() {
|
|
@@ -1275,24 +1421,24 @@ class ce {
|
|
|
1275
1421
|
return !!e && e instanceof ce && e.type === $.Comment;
|
|
1276
1422
|
}
|
|
1277
1423
|
}
|
|
1278
|
-
function
|
|
1424
|
+
function Xn(n, e) {
|
|
1279
1425
|
return { advance: 1, node: new ce(e[0]) };
|
|
1280
1426
|
}
|
|
1281
|
-
function
|
|
1282
|
-
const
|
|
1427
|
+
function cn(n, e) {
|
|
1428
|
+
const t = [];
|
|
1283
1429
|
let r = 0;
|
|
1284
|
-
for (; ; ) if (
|
|
1285
|
-
const o =
|
|
1286
|
-
r += o.advance,
|
|
1430
|
+
for (; ; ) if (qe(e[r])) {
|
|
1431
|
+
const o = un(0, e.slice(r));
|
|
1432
|
+
r += o.advance, t.push(o.node);
|
|
1287
1433
|
} else {
|
|
1288
|
-
if (!
|
|
1289
|
-
|
|
1434
|
+
if (!rn(e[r])) return { advance: r, nodes: t };
|
|
1435
|
+
t.push(new ce(e[r])), r++;
|
|
1290
1436
|
}
|
|
1291
1437
|
}
|
|
1292
1438
|
class f {
|
|
1293
1439
|
constructor(e) {
|
|
1294
|
-
|
|
1295
|
-
|
|
1440
|
+
y(this, "type", $.Token);
|
|
1441
|
+
y(this, "value");
|
|
1296
1442
|
this.value = e;
|
|
1297
1443
|
}
|
|
1298
1444
|
tokens() {
|
|
@@ -1311,346 +1457,346 @@ class f {
|
|
|
1311
1457
|
return !!e && e instanceof f && e.type === $.Token;
|
|
1312
1458
|
}
|
|
1313
1459
|
}
|
|
1314
|
-
function
|
|
1315
|
-
const
|
|
1316
|
-
}) }, r = [...
|
|
1317
|
-
if (
|
|
1318
|
-
K(r[r.length - 1]) && r.push([
|
|
1460
|
+
function _n(n, e) {
|
|
1461
|
+
const t = { onParseError: (e == null ? void 0 : e.onParseError) ?? (() => {
|
|
1462
|
+
}) }, r = [...n];
|
|
1463
|
+
if (n.length === 0) return [];
|
|
1464
|
+
K(r[r.length - 1]) && r.push([s.EOF, "", r[r.length - 1][2], r[r.length - 1][3], void 0]);
|
|
1319
1465
|
const o = [];
|
|
1320
|
-
let i = [],
|
|
1466
|
+
let i = [], a = 0;
|
|
1321
1467
|
for (; ; ) {
|
|
1322
|
-
if (!r[
|
|
1323
|
-
if (
|
|
1324
|
-
o.push(i), i = [],
|
|
1468
|
+
if (!r[a] || K(r[a])) return i.length && o.push(i), o;
|
|
1469
|
+
if (ae(r[a])) {
|
|
1470
|
+
o.push(i), i = [], a++;
|
|
1325
1471
|
continue;
|
|
1326
1472
|
}
|
|
1327
|
-
const u = Ve(
|
|
1328
|
-
i.push(u.node),
|
|
1473
|
+
const u = Ve(t, n.slice(a));
|
|
1474
|
+
i.push(u.node), a += u.advance;
|
|
1329
1475
|
}
|
|
1330
1476
|
}
|
|
1331
|
-
function
|
|
1332
|
-
if (
|
|
1333
|
-
const r =
|
|
1477
|
+
function et(n, e, t) {
|
|
1478
|
+
if (n.length === 0) return;
|
|
1479
|
+
const r = sn(n);
|
|
1334
1480
|
let o = 0;
|
|
1335
|
-
for (; o <
|
|
1336
|
-
const i =
|
|
1337
|
-
if (e({ node: i, parent: { value:
|
|
1338
|
-
if (o = r(
|
|
1481
|
+
for (; o < n.length; ) {
|
|
1482
|
+
const i = n[o];
|
|
1483
|
+
if (e({ node: i, parent: { value: n }, state: void 0 }, o) === !1) return !1;
|
|
1484
|
+
if (o = r(n, i, o), o === -1) break;
|
|
1339
1485
|
}
|
|
1340
1486
|
}
|
|
1341
|
-
function
|
|
1342
|
-
|
|
1487
|
+
function nt(n, e, t) {
|
|
1488
|
+
n.length !== 0 && et(n, ((r, o) => e(r, o) !== !1 && (!("walk" in r.node) || !n.includes(r.node) || r.node.walk(e, r.state) !== !1) && void 0));
|
|
1343
1489
|
}
|
|
1344
|
-
function
|
|
1345
|
-
for (let
|
|
1346
|
-
|
|
1490
|
+
function tt(n, e) {
|
|
1491
|
+
for (let t = 0; t < n.length; t++)
|
|
1492
|
+
nt(n[t], ((r, o) => {
|
|
1347
1493
|
if (typeof o != "number") return;
|
|
1348
1494
|
const i = e(r.node);
|
|
1349
1495
|
i && (Array.isArray(i) ? r.parent.value.splice(o, 1, ...i) : r.parent.value.splice(o, 1, i));
|
|
1350
1496
|
}));
|
|
1351
|
-
return
|
|
1497
|
+
return n;
|
|
1352
1498
|
}
|
|
1353
|
-
function
|
|
1354
|
-
return ue.isSimpleBlockNode(
|
|
1499
|
+
function rt(n) {
|
|
1500
|
+
return ue.isSimpleBlockNode(n);
|
|
1355
1501
|
}
|
|
1356
|
-
function
|
|
1357
|
-
return N.isFunctionNode(
|
|
1502
|
+
function de(n) {
|
|
1503
|
+
return N.isFunctionNode(n);
|
|
1358
1504
|
}
|
|
1359
|
-
function
|
|
1360
|
-
return
|
|
1505
|
+
function ln(n) {
|
|
1506
|
+
return M.isWhitespaceNode(n);
|
|
1361
1507
|
}
|
|
1362
|
-
function
|
|
1363
|
-
return ce.isCommentNode(
|
|
1508
|
+
function pn(n) {
|
|
1509
|
+
return ce.isCommentNode(n);
|
|
1364
1510
|
}
|
|
1365
|
-
function _(
|
|
1366
|
-
return
|
|
1511
|
+
function _(n) {
|
|
1512
|
+
return ln(n) || pn(n);
|
|
1367
1513
|
}
|
|
1368
|
-
function h(
|
|
1369
|
-
return f.isTokenNode(
|
|
1514
|
+
function h(n) {
|
|
1515
|
+
return f.isTokenNode(n);
|
|
1370
1516
|
}
|
|
1371
|
-
const
|
|
1372
|
-
function
|
|
1373
|
-
return
|
|
1517
|
+
const ot = /[A-Z]/g;
|
|
1518
|
+
function R(n) {
|
|
1519
|
+
return n.replace(ot, ((e) => String.fromCharCode(e.charCodeAt(0) + 32)));
|
|
1374
1520
|
}
|
|
1375
|
-
const
|
|
1376
|
-
function
|
|
1377
|
-
if (!
|
|
1378
|
-
const
|
|
1379
|
-
if (
|
|
1380
|
-
const o =
|
|
1521
|
+
const it = /* @__PURE__ */ new Map([["cm", (n) => n], ["mm", (n) => 10 * n], ["q", (n) => 40 * n], ["in", (n) => n / 2.54], ["pc", (n) => n / 2.54 * 6], ["pt", (n) => n / 2.54 * 72], ["px", (n) => n / 2.54 * 96]]), Ne = /* @__PURE__ */ new Map([["deg", (n) => n], ["grad", (n) => n / 0.9], ["rad", (n) => n / 180 * Math.PI], ["turn", (n) => n / 360]]), ve = /* @__PURE__ */ new Map([["deg", (n) => 0.9 * n], ["grad", (n) => n], ["rad", (n) => 0.9 * n / 180 * Math.PI], ["turn", (n) => 0.9 * n / 360]]), st = /* @__PURE__ */ new Map([["hz", (n) => n], ["khz", (n) => n / 1e3]]), at = /* @__PURE__ */ new Map([["cm", (n) => 2.54 * n], ["mm", (n) => 25.4 * n], ["q", (n) => 25.4 * n * 4], ["in", (n) => n], ["pc", (n) => 6 * n], ["pt", (n) => 72 * n], ["px", (n) => 96 * n]]), ut = /* @__PURE__ */ new Map([["hz", (n) => 1e3 * n], ["khz", (n) => n]]), ct = /* @__PURE__ */ new Map([["cm", (n) => n / 10], ["mm", (n) => n], ["q", (n) => 4 * n], ["in", (n) => n / 25.4], ["pc", (n) => n / 25.4 * 6], ["pt", (n) => n / 25.4 * 72], ["px", (n) => n / 25.4 * 96]]), lt = /* @__PURE__ */ new Map([["ms", (n) => n], ["s", (n) => n / 1e3]]), pt = /* @__PURE__ */ new Map([["cm", (n) => n / 6 * 2.54], ["mm", (n) => n / 6 * 25.4], ["q", (n) => n / 6 * 25.4 * 4], ["in", (n) => n / 6], ["pc", (n) => n], ["pt", (n) => n / 6 * 72], ["px", (n) => n / 6 * 96]]), dt = /* @__PURE__ */ new Map([["cm", (n) => n / 72 * 2.54], ["mm", (n) => n / 72 * 25.4], ["q", (n) => n / 72 * 25.4 * 4], ["in", (n) => n / 72], ["pc", (n) => n / 72 * 6], ["pt", (n) => n], ["px", (n) => n / 72 * 96]]), ft = /* @__PURE__ */ new Map([["cm", (n) => n / 96 * 2.54], ["mm", (n) => n / 96 * 25.4], ["q", (n) => n / 96 * 25.4 * 4], ["in", (n) => n / 96], ["pc", (n) => n / 96 * 6], ["pt", (n) => n / 96 * 72], ["px", (n) => n]]), gt = /* @__PURE__ */ new Map([["cm", (n) => n / 4 / 10], ["mm", (n) => n / 4], ["q", (n) => n], ["in", (n) => n / 4 / 25.4], ["pc", (n) => n / 4 / 25.4 * 6], ["pt", (n) => n / 4 / 25.4 * 72], ["px", (n) => n / 4 / 25.4 * 96]]), dn = /* @__PURE__ */ new Map([["deg", (n) => 180 * n / Math.PI], ["grad", (n) => 180 * n / Math.PI / 0.9], ["rad", (n) => n], ["turn", (n) => 180 * n / Math.PI / 360]]), mt = /* @__PURE__ */ new Map([["ms", (n) => 1e3 * n], ["s", (n) => n]]), he = /* @__PURE__ */ new Map([["deg", (n) => 360 * n], ["grad", (n) => 360 * n / 0.9], ["rad", (n) => 360 * n / 180 * Math.PI], ["turn", (n) => n]]), vt = /* @__PURE__ */ new Map([["cm", it], ["mm", ct], ["q", gt], ["in", at], ["pc", pt], ["pt", dt], ["px", ft], ["ms", lt], ["s", mt], ["deg", Ne], ["grad", ve], ["rad", dn], ["turn", he], ["hz", st], ["khz", ut]]);
|
|
1522
|
+
function U(n, e) {
|
|
1523
|
+
if (!P(n) || !P(e)) return e;
|
|
1524
|
+
const t = R(n[4].unit), r = R(e[4].unit);
|
|
1525
|
+
if (t === r) return e;
|
|
1526
|
+
const o = vt.get(r);
|
|
1381
1527
|
if (!o) return e;
|
|
1382
|
-
const i = o.get(
|
|
1528
|
+
const i = o.get(t);
|
|
1383
1529
|
if (!i) return e;
|
|
1384
|
-
const
|
|
1385
|
-
return
|
|
1530
|
+
const a = i(e[4].value), u = [s.Dimension, "", e[2], e[3], { ...e[4], signCharacter: a < 0 ? "-" : void 0, type: Number.isInteger(a) ? p.Integer : p.Number, value: a }];
|
|
1531
|
+
return qn(u, n[4].unit), u;
|
|
1386
1532
|
}
|
|
1387
|
-
function
|
|
1388
|
-
if (
|
|
1389
|
-
const e =
|
|
1390
|
-
let
|
|
1391
|
-
if (
|
|
1392
|
-
const r = e[4].value +
|
|
1393
|
-
return new f([
|
|
1533
|
+
function ht(n) {
|
|
1534
|
+
if (n.length !== 2) return -1;
|
|
1535
|
+
const e = n[0].value;
|
|
1536
|
+
let t = n[1].value;
|
|
1537
|
+
if (m(e) && m(t)) {
|
|
1538
|
+
const r = e[4].value + t[4].value;
|
|
1539
|
+
return new f([s.Number, r.toString(), e[2], t[3], { value: r, type: e[4].type === p.Integer && t[4].type === p.Integer ? p.Integer : p.Number }]);
|
|
1394
1540
|
}
|
|
1395
|
-
if (b(e) && b(
|
|
1396
|
-
const r = e[4].value +
|
|
1397
|
-
return new f([
|
|
1541
|
+
if (b(e) && b(t)) {
|
|
1542
|
+
const r = e[4].value + t[4].value;
|
|
1543
|
+
return new f([s.Percentage, r.toString() + "%", e[2], t[3], { value: r }]);
|
|
1398
1544
|
}
|
|
1399
|
-
if (
|
|
1400
|
-
const r = e[4].value +
|
|
1401
|
-
return new f([
|
|
1545
|
+
if (P(e) && P(t) && (t = U(e, t), R(e[4].unit) === R(t[4].unit))) {
|
|
1546
|
+
const r = e[4].value + t[4].value;
|
|
1547
|
+
return new f([s.Dimension, r.toString() + e[4].unit, e[2], t[3], { value: r, type: e[4].type === p.Integer && t[4].type === p.Integer ? p.Integer : p.Number, unit: e[4].unit }]);
|
|
1402
1548
|
}
|
|
1403
1549
|
return -1;
|
|
1404
1550
|
}
|
|
1405
|
-
function
|
|
1406
|
-
if (
|
|
1407
|
-
const e =
|
|
1408
|
-
if (
|
|
1409
|
-
const r = e[4].value /
|
|
1410
|
-
return new f([
|
|
1551
|
+
function yt(n) {
|
|
1552
|
+
if (n.length !== 2) return -1;
|
|
1553
|
+
const e = n[0].value, t = n[1].value;
|
|
1554
|
+
if (m(e) && m(t)) {
|
|
1555
|
+
const r = e[4].value / t[4].value;
|
|
1556
|
+
return new f([s.Number, r.toString(), e[2], t[3], { value: r, type: Number.isInteger(r) ? p.Integer : p.Number }]);
|
|
1411
1557
|
}
|
|
1412
|
-
if (b(e) &&
|
|
1413
|
-
const r = e[4].value /
|
|
1414
|
-
return new f([
|
|
1558
|
+
if (b(e) && m(t)) {
|
|
1559
|
+
const r = e[4].value / t[4].value;
|
|
1560
|
+
return new f([s.Percentage, r.toString() + "%", e[2], t[3], { value: r }]);
|
|
1415
1561
|
}
|
|
1416
|
-
if (
|
|
1417
|
-
const r = e[4].value /
|
|
1418
|
-
return new f([
|
|
1562
|
+
if (P(e) && m(t)) {
|
|
1563
|
+
const r = e[4].value / t[4].value;
|
|
1564
|
+
return new f([s.Dimension, r.toString() + e[4].unit, e[2], t[3], { value: r, type: Number.isInteger(r) ? p.Integer : p.Number, unit: e[4].unit }]);
|
|
1419
1565
|
}
|
|
1420
1566
|
return -1;
|
|
1421
1567
|
}
|
|
1422
|
-
function Q(
|
|
1423
|
-
return !!
|
|
1568
|
+
function Q(n) {
|
|
1569
|
+
return !!n && typeof n == "object" && "inputs" in n && Array.isArray(n.inputs) && "operation" in n;
|
|
1424
1570
|
}
|
|
1425
|
-
function
|
|
1426
|
-
if (
|
|
1571
|
+
function I(n) {
|
|
1572
|
+
if (n === -1) return -1;
|
|
1427
1573
|
const e = [];
|
|
1428
|
-
for (let
|
|
1429
|
-
const r =
|
|
1574
|
+
for (let t = 0; t < n.inputs.length; t++) {
|
|
1575
|
+
const r = n.inputs[t];
|
|
1430
1576
|
if (h(r)) {
|
|
1431
1577
|
e.push(r);
|
|
1432
1578
|
continue;
|
|
1433
1579
|
}
|
|
1434
|
-
const o =
|
|
1580
|
+
const o = I(r);
|
|
1435
1581
|
if (o === -1) return -1;
|
|
1436
1582
|
e.push(o);
|
|
1437
1583
|
}
|
|
1438
|
-
return
|
|
1584
|
+
return n.operation(e);
|
|
1439
1585
|
}
|
|
1440
|
-
function
|
|
1441
|
-
if (
|
|
1442
|
-
const e =
|
|
1443
|
-
if (
|
|
1444
|
-
const r = e[4].value *
|
|
1445
|
-
return new f([
|
|
1586
|
+
function Ct(n) {
|
|
1587
|
+
if (n.length !== 2) return -1;
|
|
1588
|
+
const e = n[0].value, t = n[1].value;
|
|
1589
|
+
if (m(e) && m(t)) {
|
|
1590
|
+
const r = e[4].value * t[4].value;
|
|
1591
|
+
return new f([s.Number, r.toString(), e[2], t[3], { value: r, type: e[4].type === p.Integer && t[4].type === p.Integer ? p.Integer : p.Number }]);
|
|
1446
1592
|
}
|
|
1447
|
-
if (b(e) &&
|
|
1448
|
-
const r = e[4].value *
|
|
1449
|
-
return new f([
|
|
1593
|
+
if (b(e) && m(t)) {
|
|
1594
|
+
const r = e[4].value * t[4].value;
|
|
1595
|
+
return new f([s.Percentage, r.toString() + "%", e[2], t[3], { value: r }]);
|
|
1450
1596
|
}
|
|
1451
|
-
if (
|
|
1452
|
-
const r = e[4].value *
|
|
1453
|
-
return new f([
|
|
1597
|
+
if (m(e) && b(t)) {
|
|
1598
|
+
const r = e[4].value * t[4].value;
|
|
1599
|
+
return new f([s.Percentage, r.toString() + "%", e[2], t[3], { value: r }]);
|
|
1454
1600
|
}
|
|
1455
|
-
if (
|
|
1456
|
-
const r = e[4].value *
|
|
1457
|
-
return new f([
|
|
1601
|
+
if (P(e) && m(t)) {
|
|
1602
|
+
const r = e[4].value * t[4].value;
|
|
1603
|
+
return new f([s.Dimension, r.toString() + e[4].unit, e[2], t[3], { value: r, type: e[4].type === p.Integer && t[4].type === p.Integer ? p.Integer : p.Number, unit: e[4].unit }]);
|
|
1458
1604
|
}
|
|
1459
|
-
if (
|
|
1460
|
-
const r = e[4].value *
|
|
1461
|
-
return new f([
|
|
1605
|
+
if (m(e) && P(t)) {
|
|
1606
|
+
const r = e[4].value * t[4].value;
|
|
1607
|
+
return new f([s.Dimension, r.toString() + t[4].unit, e[2], t[3], { value: r, type: e[4].type === p.Integer && t[4].type === p.Integer ? p.Integer : p.Number, unit: t[4].unit }]);
|
|
1462
1608
|
}
|
|
1463
1609
|
return -1;
|
|
1464
1610
|
}
|
|
1465
|
-
function le(
|
|
1466
|
-
for (let
|
|
1467
|
-
const r = t
|
|
1611
|
+
function le(n, e) {
|
|
1612
|
+
for (let t = 0; t < n.length; t++) {
|
|
1613
|
+
const r = n[t];
|
|
1468
1614
|
if (!h(r)) continue;
|
|
1469
1615
|
const o = r.value;
|
|
1470
|
-
if (!
|
|
1471
|
-
const i =
|
|
1616
|
+
if (!me(o)) continue;
|
|
1617
|
+
const i = R(o[4].value);
|
|
1472
1618
|
switch (i) {
|
|
1473
1619
|
case "e":
|
|
1474
|
-
|
|
1620
|
+
n.splice(t, 1, new f([s.Number, Math.E.toString(), o[2], o[3], { value: Math.E, type: p.Number }]));
|
|
1475
1621
|
break;
|
|
1476
1622
|
case "pi":
|
|
1477
|
-
|
|
1623
|
+
n.splice(t, 1, new f([s.Number, Math.PI.toString(), o[2], o[3], { value: Math.PI, type: p.Number }]));
|
|
1478
1624
|
break;
|
|
1479
1625
|
case "infinity":
|
|
1480
|
-
|
|
1626
|
+
n.splice(t, 1, new f([s.Number, "infinity", o[2], o[3], { value: 1 / 0, type: p.Number }]));
|
|
1481
1627
|
break;
|
|
1482
1628
|
case "-infinity":
|
|
1483
|
-
|
|
1629
|
+
n.splice(t, 1, new f([s.Number, "-infinity", o[2], o[3], { value: -1 / 0, type: p.Number }]));
|
|
1484
1630
|
break;
|
|
1485
1631
|
case "nan":
|
|
1486
|
-
|
|
1632
|
+
n.splice(t, 1, new f([s.Number, "NaN", o[2], o[3], { value: Number.NaN, type: p.Number }]));
|
|
1487
1633
|
break;
|
|
1488
1634
|
default:
|
|
1489
1635
|
if (e.has(i)) {
|
|
1490
|
-
const
|
|
1491
|
-
|
|
1636
|
+
const a = e.get(i);
|
|
1637
|
+
n.splice(t, 1, new f(a));
|
|
1492
1638
|
}
|
|
1493
1639
|
}
|
|
1494
1640
|
}
|
|
1495
|
-
return
|
|
1641
|
+
return n;
|
|
1496
1642
|
}
|
|
1497
|
-
function we(
|
|
1498
|
-
if (
|
|
1499
|
-
const e =
|
|
1500
|
-
return
|
|
1501
|
-
}
|
|
1502
|
-
function
|
|
1503
|
-
return
|
|
1504
|
-
}
|
|
1505
|
-
function
|
|
1506
|
-
const r =
|
|
1507
|
-
return { inputs: [new f([
|
|
1508
|
-
}
|
|
1509
|
-
function
|
|
1510
|
-
const
|
|
1511
|
-
return { inputs: [new f([
|
|
1512
|
-
}
|
|
1513
|
-
function j(
|
|
1514
|
-
const
|
|
1515
|
-
return { inputs: [new f([
|
|
1516
|
-
}
|
|
1517
|
-
function
|
|
1518
|
-
const
|
|
1519
|
-
return
|
|
1520
|
-
}
|
|
1521
|
-
function
|
|
1522
|
-
const
|
|
1523
|
-
return
|
|
1524
|
-
}
|
|
1525
|
-
function
|
|
1526
|
-
const
|
|
1527
|
-
return
|
|
1528
|
-
}
|
|
1529
|
-
function Ie(
|
|
1530
|
-
return
|
|
1531
|
-
}
|
|
1532
|
-
function je(
|
|
1533
|
-
if (
|
|
1534
|
-
const e =
|
|
1535
|
-
if (!
|
|
1536
|
-
if (
|
|
1537
|
-
if (
|
|
1538
|
-
const
|
|
1539
|
-
for (let r = 1; r <
|
|
1540
|
-
const o =
|
|
1541
|
-
if (e[0] !== o[0] ||
|
|
1643
|
+
function we(n) {
|
|
1644
|
+
if (n.length !== 1) return -1;
|
|
1645
|
+
const e = n[0].value;
|
|
1646
|
+
return B(e) ? n[0] : -1;
|
|
1647
|
+
}
|
|
1648
|
+
function x(n, e, t) {
|
|
1649
|
+
return P(e) ? ye(n, e[4].unit, t) : b(e) ? kt(n, t) : m(e) ? j(n, t) : -1;
|
|
1650
|
+
}
|
|
1651
|
+
function ye(n, e, t) {
|
|
1652
|
+
const r = n.tokens();
|
|
1653
|
+
return { inputs: [new f([s.Dimension, t.toString() + e, r[0][2], r[r.length - 1][3], { value: t, type: Number.isInteger(t) ? p.Integer : p.Number, unit: e }])], operation: we };
|
|
1654
|
+
}
|
|
1655
|
+
function kt(n, e) {
|
|
1656
|
+
const t = n.tokens();
|
|
1657
|
+
return { inputs: [new f([s.Percentage, e.toString() + "%", t[0][2], t[t.length - 1][3], { value: e }])], operation: we };
|
|
1658
|
+
}
|
|
1659
|
+
function j(n, e) {
|
|
1660
|
+
const t = n.tokens();
|
|
1661
|
+
return { inputs: [new f([s.Number, e.toString(), t[0][2], t[t.length - 1][3], { value: e, type: Number.isInteger(e) ? p.Integer : p.Number }])], operation: we };
|
|
1662
|
+
}
|
|
1663
|
+
function Et(n, e) {
|
|
1664
|
+
const t = e.value;
|
|
1665
|
+
return m(t) ? ye(n, "rad", Math.acos(t[4].value)) : -1;
|
|
1666
|
+
}
|
|
1667
|
+
function Pt(n, e) {
|
|
1668
|
+
const t = e.value;
|
|
1669
|
+
return m(t) ? ye(n, "rad", Math.asin(t[4].value)) : -1;
|
|
1670
|
+
}
|
|
1671
|
+
function bt(n, e) {
|
|
1672
|
+
const t = e.value;
|
|
1673
|
+
return m(t) ? ye(n, "rad", Math.atan(t[4].value)) : -1;
|
|
1674
|
+
}
|
|
1675
|
+
function Ie(n) {
|
|
1676
|
+
return P(n) || m(n);
|
|
1677
|
+
}
|
|
1678
|
+
function je(n) {
|
|
1679
|
+
if (n.length === 0) return !0;
|
|
1680
|
+
const e = n[0];
|
|
1681
|
+
if (!B(e)) return !1;
|
|
1682
|
+
if (n.length === 1) return !0;
|
|
1683
|
+
if (P(e)) {
|
|
1684
|
+
const t = R(e[4].unit);
|
|
1685
|
+
for (let r = 1; r < n.length; r++) {
|
|
1686
|
+
const o = n[r];
|
|
1687
|
+
if (e[0] !== o[0] || t !== R(o[4].unit)) return !1;
|
|
1542
1688
|
}
|
|
1543
1689
|
return !0;
|
|
1544
1690
|
}
|
|
1545
|
-
for (let
|
|
1546
|
-
const r = t
|
|
1691
|
+
for (let t = 1; t < n.length; t++) {
|
|
1692
|
+
const r = n[t];
|
|
1547
1693
|
if (e[0] !== r[0]) return !1;
|
|
1548
1694
|
}
|
|
1549
1695
|
return !0;
|
|
1550
1696
|
}
|
|
1551
|
-
function J(
|
|
1552
|
-
return !!
|
|
1697
|
+
function J(n, e) {
|
|
1698
|
+
return !!B(n) && (P(n) ? n[0] === e[0] && R(n[4].unit) === R(e[4].unit) : n[0] === e[0]);
|
|
1553
1699
|
}
|
|
1554
|
-
function
|
|
1700
|
+
function St(n, e, t) {
|
|
1555
1701
|
const r = e.value;
|
|
1556
1702
|
if (!Ie(r)) return -1;
|
|
1557
|
-
const o =
|
|
1558
|
-
return J(r, o) ?
|
|
1703
|
+
const o = U(r, t.value);
|
|
1704
|
+
return J(r, o) ? ye(n, "rad", Math.atan2(r[4].value, o[4].value)) : -1;
|
|
1559
1705
|
}
|
|
1560
|
-
function
|
|
1706
|
+
function At(n, e, t) {
|
|
1561
1707
|
const r = e.value;
|
|
1562
|
-
return !
|
|
1708
|
+
return !B(r) || !t.rawPercentages && b(r) ? -1 : x(n, r, Math.abs(r[4].value));
|
|
1563
1709
|
}
|
|
1564
|
-
function
|
|
1565
|
-
if (!h(e) || !h(
|
|
1710
|
+
function Bt(n, e, t, r, o) {
|
|
1711
|
+
if (!h(e) || !h(t) || !h(r)) return -1;
|
|
1566
1712
|
const i = e.value;
|
|
1567
|
-
if (!
|
|
1568
|
-
const
|
|
1569
|
-
if (!J(i,
|
|
1570
|
-
const u =
|
|
1571
|
-
return J(i, u) ?
|
|
1572
|
-
}
|
|
1573
|
-
function
|
|
1574
|
-
const
|
|
1575
|
-
if (!Ie(
|
|
1576
|
-
let r =
|
|
1577
|
-
if (
|
|
1713
|
+
if (!B(i) || !o.rawPercentages && b(i)) return -1;
|
|
1714
|
+
const a = U(i, t.value);
|
|
1715
|
+
if (!J(i, a)) return -1;
|
|
1716
|
+
const u = U(i, r.value);
|
|
1717
|
+
return J(i, u) ? x(n, i, Math.max(i[4].value, Math.min(a[4].value, u[4].value))) : -1;
|
|
1718
|
+
}
|
|
1719
|
+
function Dt(n, e) {
|
|
1720
|
+
const t = e.value;
|
|
1721
|
+
if (!Ie(t)) return -1;
|
|
1722
|
+
let r = t[4].value;
|
|
1723
|
+
if (P(t)) switch (t[4].unit.toLowerCase()) {
|
|
1578
1724
|
case "rad":
|
|
1579
1725
|
break;
|
|
1580
1726
|
case "deg":
|
|
1581
|
-
r = Ne.get("rad")(
|
|
1727
|
+
r = Ne.get("rad")(t[4].value);
|
|
1582
1728
|
break;
|
|
1583
1729
|
case "grad":
|
|
1584
|
-
r =
|
|
1730
|
+
r = ve.get("rad")(t[4].value);
|
|
1585
1731
|
break;
|
|
1586
1732
|
case "turn":
|
|
1587
|
-
r = he.get("rad")(
|
|
1733
|
+
r = he.get("rad")(t[4].value);
|
|
1588
1734
|
break;
|
|
1589
1735
|
default:
|
|
1590
1736
|
return -1;
|
|
1591
1737
|
}
|
|
1592
|
-
return r = Math.cos(r), j(
|
|
1738
|
+
return r = Math.cos(r), j(n, r);
|
|
1593
1739
|
}
|
|
1594
|
-
function
|
|
1595
|
-
const
|
|
1596
|
-
return
|
|
1740
|
+
function Ft(n, e) {
|
|
1741
|
+
const t = e.value;
|
|
1742
|
+
return m(t) ? j(n, Math.exp(t[4].value)) : -1;
|
|
1597
1743
|
}
|
|
1598
|
-
function
|
|
1744
|
+
function Nt(n, e, t) {
|
|
1599
1745
|
if (!e.every(h)) return -1;
|
|
1600
1746
|
const r = e[0].value;
|
|
1601
|
-
if (!
|
|
1602
|
-
const o = e.map(((u) =>
|
|
1747
|
+
if (!B(r) || !t.rawPercentages && b(r)) return -1;
|
|
1748
|
+
const o = e.map(((u) => U(r, u.value)));
|
|
1603
1749
|
if (!je(o)) return -1;
|
|
1604
|
-
const i = o.map(((u) => u[4].value)),
|
|
1605
|
-
return
|
|
1750
|
+
const i = o.map(((u) => u[4].value)), a = Math.hypot(...i);
|
|
1751
|
+
return x(n, r, a);
|
|
1606
1752
|
}
|
|
1607
|
-
function
|
|
1753
|
+
function Qe(n, e, t) {
|
|
1608
1754
|
if (!e.every(h)) return -1;
|
|
1609
1755
|
const r = e[0].value;
|
|
1610
|
-
if (!
|
|
1611
|
-
const o = e.map(((u) =>
|
|
1756
|
+
if (!B(r) || !t.rawPercentages && b(r)) return -1;
|
|
1757
|
+
const o = e.map(((u) => U(r, u.value)));
|
|
1612
1758
|
if (!je(o)) return -1;
|
|
1613
|
-
const i = o.map(((u) => u[4].value)),
|
|
1614
|
-
return
|
|
1759
|
+
const i = o.map(((u) => u[4].value)), a = Math.max(...i);
|
|
1760
|
+
return x(n, r, a);
|
|
1615
1761
|
}
|
|
1616
|
-
function
|
|
1762
|
+
function Xe(n, e, t) {
|
|
1617
1763
|
if (!e.every(h)) return -1;
|
|
1618
1764
|
const r = e[0].value;
|
|
1619
|
-
if (!
|
|
1620
|
-
const o = e.map(((u) =>
|
|
1765
|
+
if (!B(r) || !t.rawPercentages && b(r)) return -1;
|
|
1766
|
+
const o = e.map(((u) => U(r, u.value)));
|
|
1621
1767
|
if (!je(o)) return -1;
|
|
1622
|
-
const i = o.map(((u) => u[4].value)),
|
|
1623
|
-
return
|
|
1768
|
+
const i = o.map(((u) => u[4].value)), a = Math.min(...i);
|
|
1769
|
+
return x(n, r, a);
|
|
1624
1770
|
}
|
|
1625
|
-
function
|
|
1771
|
+
function wt(n, e, t) {
|
|
1626
1772
|
const r = e.value;
|
|
1627
|
-
if (!
|
|
1628
|
-
const o =
|
|
1773
|
+
if (!B(r)) return -1;
|
|
1774
|
+
const o = U(r, t.value);
|
|
1629
1775
|
if (!J(r, o)) return -1;
|
|
1630
1776
|
let i;
|
|
1631
|
-
return i = o[4].value === 0 ? Number.NaN : Number.isFinite(r[4].value) && (Number.isFinite(o[4].value) || (o[4].value !== Number.POSITIVE_INFINITY || r[4].value !== Number.NEGATIVE_INFINITY && !Object.is(0 * r[4].value, -0)) && (o[4].value !== Number.NEGATIVE_INFINITY || r[4].value !== Number.POSITIVE_INFINITY && !Object.is(0 * r[4].value, 0))) ? Number.isFinite(o[4].value) ? (r[4].value % o[4].value + o[4].value) % o[4].value : r[4].value : Number.NaN,
|
|
1777
|
+
return i = o[4].value === 0 ? Number.NaN : Number.isFinite(r[4].value) && (Number.isFinite(o[4].value) || (o[4].value !== Number.POSITIVE_INFINITY || r[4].value !== Number.NEGATIVE_INFINITY && !Object.is(0 * r[4].value, -0)) && (o[4].value !== Number.NEGATIVE_INFINITY || r[4].value !== Number.POSITIVE_INFINITY && !Object.is(0 * r[4].value, 0))) ? Number.isFinite(o[4].value) ? (r[4].value % o[4].value + o[4].value) % o[4].value : r[4].value : Number.NaN, x(n, r, i);
|
|
1632
1778
|
}
|
|
1633
|
-
function
|
|
1634
|
-
const r = e.value, o =
|
|
1635
|
-
return !
|
|
1779
|
+
function It(n, e, t) {
|
|
1780
|
+
const r = e.value, o = t.value;
|
|
1781
|
+
return !m(r) || !J(r, o) ? -1 : j(n, Math.pow(r[4].value, o[4].value));
|
|
1636
1782
|
}
|
|
1637
|
-
function
|
|
1783
|
+
function xt(n, e, t) {
|
|
1638
1784
|
const r = e.value;
|
|
1639
|
-
if (!
|
|
1640
|
-
const o =
|
|
1785
|
+
if (!B(r)) return -1;
|
|
1786
|
+
const o = U(r, t.value);
|
|
1641
1787
|
if (!J(r, o)) return -1;
|
|
1642
1788
|
let i;
|
|
1643
|
-
return i = o[4].value === 0 ? Number.NaN : Number.isFinite(r[4].value) ? Number.isFinite(o[4].value) ? r[4].value % o[4].value : r[4].value : Number.NaN,
|
|
1789
|
+
return i = o[4].value === 0 ? Number.NaN : Number.isFinite(r[4].value) ? Number.isFinite(o[4].value) ? r[4].value % o[4].value : r[4].value : Number.NaN, x(n, r, i);
|
|
1644
1790
|
}
|
|
1645
|
-
function
|
|
1646
|
-
const i =
|
|
1647
|
-
if (!
|
|
1648
|
-
const
|
|
1649
|
-
if (!J(i,
|
|
1791
|
+
function Ot(n, e, t, r, o) {
|
|
1792
|
+
const i = t.value;
|
|
1793
|
+
if (!B(i) || !o.rawPercentages && b(i)) return -1;
|
|
1794
|
+
const a = U(i, r.value);
|
|
1795
|
+
if (!J(i, a)) return -1;
|
|
1650
1796
|
let u;
|
|
1651
|
-
if (
|
|
1652
|
-
else if (Number.isFinite(i[4].value) || Number.isFinite(
|
|
1653
|
-
else if (Number.isFinite(i[4].value) && !Number.isFinite(
|
|
1797
|
+
if (a[4].value === 0) u = Number.NaN;
|
|
1798
|
+
else if (Number.isFinite(i[4].value) || Number.isFinite(a[4].value)) if (!Number.isFinite(i[4].value) && Number.isFinite(a[4].value)) u = i[4].value;
|
|
1799
|
+
else if (Number.isFinite(i[4].value) && !Number.isFinite(a[4].value)) switch (e) {
|
|
1654
1800
|
case "down":
|
|
1655
1801
|
u = i[4].value < 0 ? -1 / 0 : Object.is(-0, 0 * i[4].value) ? -0 : 0;
|
|
1656
1802
|
break;
|
|
@@ -1660,74 +1806,74 @@ function xn(t, e, n, r, o) {
|
|
|
1660
1806
|
default:
|
|
1661
1807
|
u = Object.is(0, 0 * i[4].value) ? 0 : -0;
|
|
1662
1808
|
}
|
|
1663
|
-
else if (Number.isFinite(
|
|
1809
|
+
else if (Number.isFinite(a[4].value)) switch (e) {
|
|
1664
1810
|
case "down":
|
|
1665
|
-
u = Math.floor(i[4].value /
|
|
1811
|
+
u = Math.floor(i[4].value / a[4].value) * a[4].value;
|
|
1666
1812
|
break;
|
|
1667
1813
|
case "up":
|
|
1668
|
-
u = Math.ceil(i[4].value /
|
|
1814
|
+
u = Math.ceil(i[4].value / a[4].value) * a[4].value;
|
|
1669
1815
|
break;
|
|
1670
1816
|
case "to-zero":
|
|
1671
|
-
u = Math.trunc(i[4].value /
|
|
1817
|
+
u = Math.trunc(i[4].value / a[4].value) * a[4].value;
|
|
1672
1818
|
break;
|
|
1673
1819
|
default: {
|
|
1674
|
-
let c = Math.floor(i[4].value /
|
|
1675
|
-
if (c >
|
|
1676
|
-
const
|
|
1677
|
-
c =
|
|
1820
|
+
let c = Math.floor(i[4].value / a[4].value) * a[4].value, d = Math.ceil(i[4].value / a[4].value) * a[4].value;
|
|
1821
|
+
if (c > d) {
|
|
1822
|
+
const C = c;
|
|
1823
|
+
c = d, d = C;
|
|
1678
1824
|
}
|
|
1679
|
-
const l = Math.abs(i[4].value - c),
|
|
1680
|
-
u = l ===
|
|
1825
|
+
const l = Math.abs(i[4].value - c), g = Math.abs(i[4].value - d);
|
|
1826
|
+
u = l === g ? d : l < g ? c : d;
|
|
1681
1827
|
break;
|
|
1682
1828
|
}
|
|
1683
1829
|
}
|
|
1684
1830
|
else u = i[4].value;
|
|
1685
1831
|
else u = Number.NaN;
|
|
1686
|
-
return
|
|
1832
|
+
return x(n, i, u);
|
|
1687
1833
|
}
|
|
1688
|
-
function
|
|
1834
|
+
function Tt(n, e, t) {
|
|
1689
1835
|
const r = e.value;
|
|
1690
|
-
return !
|
|
1836
|
+
return !B(r) || !t.rawPercentages && b(r) ? -1 : j(n, Math.sign(r[4].value));
|
|
1691
1837
|
}
|
|
1692
|
-
function
|
|
1693
|
-
const
|
|
1694
|
-
if (!Ie(
|
|
1695
|
-
let r =
|
|
1696
|
-
if (
|
|
1838
|
+
function Mt(n, e) {
|
|
1839
|
+
const t = e.value;
|
|
1840
|
+
if (!Ie(t)) return -1;
|
|
1841
|
+
let r = t[4].value;
|
|
1842
|
+
if (P(t)) switch (R(t[4].unit)) {
|
|
1697
1843
|
case "rad":
|
|
1698
1844
|
break;
|
|
1699
1845
|
case "deg":
|
|
1700
|
-
r = Ne.get("rad")(
|
|
1846
|
+
r = Ne.get("rad")(t[4].value);
|
|
1701
1847
|
break;
|
|
1702
1848
|
case "grad":
|
|
1703
|
-
r =
|
|
1849
|
+
r = ve.get("rad")(t[4].value);
|
|
1704
1850
|
break;
|
|
1705
1851
|
case "turn":
|
|
1706
|
-
r = he.get("rad")(
|
|
1852
|
+
r = he.get("rad")(t[4].value);
|
|
1707
1853
|
break;
|
|
1708
1854
|
default:
|
|
1709
1855
|
return -1;
|
|
1710
1856
|
}
|
|
1711
|
-
return r = Math.sin(r), j(
|
|
1857
|
+
return r = Math.sin(r), j(n, r);
|
|
1712
1858
|
}
|
|
1713
|
-
function
|
|
1714
|
-
const
|
|
1715
|
-
return
|
|
1859
|
+
function Rt(n, e) {
|
|
1860
|
+
const t = e.value;
|
|
1861
|
+
return m(t) ? j(n, Math.sqrt(t[4].value)) : -1;
|
|
1716
1862
|
}
|
|
1717
|
-
function
|
|
1718
|
-
const
|
|
1719
|
-
if (!Ie(
|
|
1720
|
-
const r =
|
|
1721
|
-
let o = 0, i =
|
|
1722
|
-
if (
|
|
1863
|
+
function Ut(n, e) {
|
|
1864
|
+
const t = e.value;
|
|
1865
|
+
if (!Ie(t)) return -1;
|
|
1866
|
+
const r = t[4].value;
|
|
1867
|
+
let o = 0, i = t[4].value;
|
|
1868
|
+
if (P(t)) switch (R(t[4].unit)) {
|
|
1723
1869
|
case "rad":
|
|
1724
|
-
o =
|
|
1870
|
+
o = dn.get("deg")(r);
|
|
1725
1871
|
break;
|
|
1726
1872
|
case "deg":
|
|
1727
1873
|
o = r, i = Ne.get("rad")(r);
|
|
1728
1874
|
break;
|
|
1729
1875
|
case "grad":
|
|
1730
|
-
o =
|
|
1876
|
+
o = ve.get("deg")(r), i = ve.get("rad")(r);
|
|
1731
1877
|
break;
|
|
1732
1878
|
case "turn":
|
|
1733
1879
|
o = he.get("deg")(r), i = he.get("rad")(r);
|
|
@@ -1735,229 +1881,229 @@ function Rn(t, e) {
|
|
|
1735
1881
|
default:
|
|
1736
1882
|
return -1;
|
|
1737
1883
|
}
|
|
1738
|
-
const
|
|
1739
|
-
return i = o % 90 == 0 &&
|
|
1884
|
+
const a = o / 90;
|
|
1885
|
+
return i = o % 90 == 0 && a % 2 != 0 ? a > 0 ? 1 / 0 : -1 / 0 : Math.tan(i), j(n, i);
|
|
1740
1886
|
}
|
|
1741
|
-
function
|
|
1742
|
-
if (
|
|
1743
|
-
const e =
|
|
1744
|
-
let
|
|
1745
|
-
if (
|
|
1746
|
-
const r = e[4].value -
|
|
1747
|
-
return new f([
|
|
1887
|
+
function Wt(n) {
|
|
1888
|
+
if (n.length !== 2) return -1;
|
|
1889
|
+
const e = n[0].value;
|
|
1890
|
+
let t = n[1].value;
|
|
1891
|
+
if (m(e) && m(t)) {
|
|
1892
|
+
const r = e[4].value - t[4].value;
|
|
1893
|
+
return new f([s.Number, r.toString(), e[2], t[3], { value: r, type: e[4].type === p.Integer && t[4].type === p.Integer ? p.Integer : p.Number }]);
|
|
1748
1894
|
}
|
|
1749
|
-
if (b(e) && b(
|
|
1750
|
-
const r = e[4].value -
|
|
1751
|
-
return new f([
|
|
1895
|
+
if (b(e) && b(t)) {
|
|
1896
|
+
const r = e[4].value - t[4].value;
|
|
1897
|
+
return new f([s.Percentage, r.toString() + "%", e[2], t[3], { value: r }]);
|
|
1752
1898
|
}
|
|
1753
|
-
if (
|
|
1754
|
-
const r = e[4].value -
|
|
1755
|
-
return new f([
|
|
1899
|
+
if (P(e) && P(t) && (t = U(e, t), R(e[4].unit) === R(t[4].unit))) {
|
|
1900
|
+
const r = e[4].value - t[4].value;
|
|
1901
|
+
return new f([s.Dimension, r.toString() + e[4].unit, e[2], t[3], { value: r, type: e[4].type === p.Integer && t[4].type === p.Integer ? p.Integer : p.Number, unit: e[4].unit }]);
|
|
1756
1902
|
}
|
|
1757
1903
|
return -1;
|
|
1758
1904
|
}
|
|
1759
|
-
function
|
|
1905
|
+
function Lt(n, e) {
|
|
1760
1906
|
if (e.length === 1) {
|
|
1761
|
-
const
|
|
1762
|
-
if (!
|
|
1763
|
-
const r =
|
|
1764
|
-
return
|
|
1907
|
+
const t = e[0];
|
|
1908
|
+
if (!t || !h(t)) return -1;
|
|
1909
|
+
const r = t.value;
|
|
1910
|
+
return m(r) ? j(n, Math.log(r[4].value)) : -1;
|
|
1765
1911
|
}
|
|
1766
1912
|
if (e.length === 2) {
|
|
1767
|
-
const
|
|
1768
|
-
if (!
|
|
1769
|
-
const r =
|
|
1770
|
-
if (!
|
|
1913
|
+
const t = e[0];
|
|
1914
|
+
if (!t || !h(t)) return -1;
|
|
1915
|
+
const r = t.value;
|
|
1916
|
+
if (!m(r)) return -1;
|
|
1771
1917
|
const o = e[1];
|
|
1772
1918
|
if (!o || !h(o)) return -1;
|
|
1773
1919
|
const i = o.value;
|
|
1774
|
-
return
|
|
1920
|
+
return m(i) ? j(n, Math.log(r[4].value) / Math.log(i[4].value)) : -1;
|
|
1775
1921
|
}
|
|
1776
1922
|
return -1;
|
|
1777
1923
|
}
|
|
1778
|
-
const
|
|
1779
|
-
function $e(
|
|
1780
|
-
if (Array.isArray(
|
|
1781
|
-
const
|
|
1782
|
-
return
|
|
1924
|
+
const $t = /^none$/i;
|
|
1925
|
+
function $e(n) {
|
|
1926
|
+
if (Array.isArray(n)) {
|
|
1927
|
+
const t = n.filter(((r) => !(ln(r) && pn(r))));
|
|
1928
|
+
return t.length === 1 && $e(t[0]);
|
|
1783
1929
|
}
|
|
1784
|
-
if (!h(
|
|
1785
|
-
const e =
|
|
1786
|
-
return !!
|
|
1930
|
+
if (!h(n)) return !1;
|
|
1931
|
+
const e = n.value;
|
|
1932
|
+
return !!me(e) && $t.test(e[4].value);
|
|
1787
1933
|
}
|
|
1788
|
-
const
|
|
1789
|
-
function
|
|
1790
|
-
var
|
|
1934
|
+
const zt = String.fromCodePoint(0);
|
|
1935
|
+
function qt(n, e, t, r, o, i) {
|
|
1936
|
+
var k;
|
|
1791
1937
|
if (e.fixed === -1 && !i.randomCaching) return -1;
|
|
1792
1938
|
i.randomCaching || (i.randomCaching = { propertyName: "", propertyN: 0, elementID: "", documentID: "" }), i.randomCaching && !i.randomCaching.propertyN && (i.randomCaching.propertyN = 0);
|
|
1793
|
-
const
|
|
1794
|
-
if (!
|
|
1795
|
-
const u =
|
|
1796
|
-
if (!J(
|
|
1939
|
+
const a = t.value;
|
|
1940
|
+
if (!B(a)) return -1;
|
|
1941
|
+
const u = U(a, r.value);
|
|
1942
|
+
if (!J(a, u)) return -1;
|
|
1797
1943
|
let c = null;
|
|
1798
|
-
if (o && (c =
|
|
1799
|
-
if (!Number.isFinite(
|
|
1800
|
-
if (c && !Number.isFinite(c[4].value)) return
|
|
1801
|
-
const
|
|
1802
|
-
let l =
|
|
1803
|
-
if (l >
|
|
1804
|
-
const
|
|
1805
|
-
let
|
|
1944
|
+
if (o && (c = U(a, o.value), !J(a, c))) return -1;
|
|
1945
|
+
if (!Number.isFinite(a[4].value) || !Number.isFinite(u[4].value) || !Number.isFinite(u[4].value - a[4].value)) return x(n, a, Number.NaN);
|
|
1946
|
+
if (c && !Number.isFinite(c[4].value)) return x(n, a, a[4].value);
|
|
1947
|
+
const d = e.fixed === -1 ? Vt(jt([e.dashedIdent ? e.dashedIdent : `${(k = i.randomCaching) == null ? void 0 : k.propertyName} ${i.randomCaching.propertyN++}`, e.elementShared ? "" : i.randomCaching.elementID, i.randomCaching.documentID].join(zt))) : () => e.fixed;
|
|
1948
|
+
let l = a[4].value, g = u[4].value;
|
|
1949
|
+
if (l > g && ([l, g] = [g, l]), c && (c[4].value <= 0 || Math.abs(l - g) / c[4].value > 1e10) && (c = null), c) {
|
|
1950
|
+
const E = Math.max(c[4].value / 1e3, 1e-9), v = [l];
|
|
1951
|
+
let q = 0;
|
|
1806
1952
|
for (; ; ) {
|
|
1807
|
-
|
|
1808
|
-
const
|
|
1809
|
-
if (!(
|
|
1810
|
-
|
|
1953
|
+
q += c[4].value;
|
|
1954
|
+
const O = l + q;
|
|
1955
|
+
if (!(O + E < g)) {
|
|
1956
|
+
v.push(g);
|
|
1811
1957
|
break;
|
|
1812
1958
|
}
|
|
1813
|
-
if (
|
|
1959
|
+
if (v.push(O), O + c[4].value - E > g) break;
|
|
1814
1960
|
}
|
|
1815
|
-
const
|
|
1816
|
-
return
|
|
1961
|
+
const w = d();
|
|
1962
|
+
return x(n, a, Number(v[Math.floor(v.length * w)].toFixed(5)));
|
|
1817
1963
|
}
|
|
1818
|
-
const
|
|
1819
|
-
return
|
|
1964
|
+
const C = d();
|
|
1965
|
+
return x(n, a, Number((C * (g - l) + l).toFixed(5)));
|
|
1820
1966
|
}
|
|
1821
|
-
function
|
|
1967
|
+
function Vt(n = 0.34944106645296036, e = 0.19228640875738723, t = 0.8784393832007205, r = 0.04850964319275053) {
|
|
1822
1968
|
return () => {
|
|
1823
|
-
const o = ((
|
|
1824
|
-
return r = r + 1 | 0,
|
|
1969
|
+
const o = ((n |= 0) + (e |= 0) | 0) + (r |= 0) | 0;
|
|
1970
|
+
return r = r + 1 | 0, n = e ^ e >>> 9, e = (t |= 0) + (t << 3) | 0, t = (t = t << 21 | t >>> 11) + o | 0, (o >>> 0) / 4294967296;
|
|
1825
1971
|
};
|
|
1826
1972
|
}
|
|
1827
|
-
function
|
|
1828
|
-
let e = 0,
|
|
1973
|
+
function jt(n) {
|
|
1974
|
+
let e = 0, t = 0, r = 0;
|
|
1829
1975
|
e ^= -1;
|
|
1830
|
-
for (let o = 0, i =
|
|
1976
|
+
for (let o = 0, i = n.length; o < i; o++) r = 255 & (e ^ n.charCodeAt(o)), t = +("0x" + "00000000 77073096 EE0E612C 990951BA 076DC419 706AF48F E963A535 9E6495A3 0EDB8832 79DCB8A4 E0D5E91E 97D2D988 09B64C2B 7EB17CBD E7B82D07 90BF1D91 1DB71064 6AB020F2 F3B97148 84BE41DE 1ADAD47D 6DDDE4EB F4D4B551 83D385C7 136C9856 646BA8C0 FD62F97A 8A65C9EC 14015C4F 63066CD9 FA0F3D63 8D080DF5 3B6E20C8 4C69105E D56041E4 A2677172 3C03E4D1 4B04D447 D20D85FD A50AB56B 35B5A8FA 42B2986C DBBBC9D6 ACBCF940 32D86CE3 45DF5C75 DCD60DCF ABD13D59 26D930AC 51DE003A C8D75180 BFD06116 21B4F4B5 56B3C423 CFBA9599 B8BDA50F 2802B89E 5F058808 C60CD9B2 B10BE924 2F6F7C87 58684C11 C1611DAB B6662D3D 76DC4190 01DB7106 98D220BC EFD5102A 71B18589 06B6B51F 9FBFE4A5 E8B8D433 7807C9A2 0F00F934 9609A88E E10E9818 7F6A0DBB 086D3D2D 91646C97 E6635C01 6B6B51F4 1C6C6162 856530D8 F262004E 6C0695ED 1B01A57B 8208F4C1 F50FC457 65B0D9C6 12B7E950 8BBEB8EA FCB9887C 62DD1DDF 15DA2D49 8CD37CF3 FBD44C65 4DB26158 3AB551CE A3BC0074 D4BB30E2 4ADFA541 3DD895D7 A4D1C46D D3D6F4FB 4369E96A 346ED9FC AD678846 DA60B8D0 44042D73 33031DE5 AA0A4C5F DD0D7CC9 5005713C 270241AA BE0B1010 C90C2086 5768B525 206F85B3 B966D409 CE61E49F 5EDEF90E 29D9C998 B0D09822 C7D7A8B4 59B33D17 2EB40D81 B7BD5C3B C0BA6CAD EDB88320 9ABFB3B6 03B6E20C 74B1D29A EAD54739 9DD277AF 04DB2615 73DC1683 E3630B12 94643B84 0D6D6A3E 7A6A5AA8 E40ECF0B 9309FF9D 0A00AE27 7D079EB1 F00F9344 8708A3D2 1E01F268 6906C2FE F762575D 806567CB 196C3671 6E6B06E7 FED41B76 89D32BE0 10DA7A5A 67DD4ACC F9B9DF6F 8EBEEFF9 17B7BE43 60B08ED5 D6D6A3E8 A1D1937E 38D8C2C4 4FDFF252 D1BB67F1 A6BC5767 3FB506DD 48B2364B D80D2BDA AF0A1B4C 36034AF6 41047A60 DF60EFC3 A867DF55 316E8EEF 4669BE79 CB61B38C BC66831A 256FD2A0 5268E236 CC0C7795 BB0B4703 220216B9 5505262F C5BA3BBE B2BD0B28 2BB45A92 5CB36A04 C2D7FFA7 B5D0CF31 2CD99E8B 5BDEAE1D 9B64C2B0 EC63F226 756AA39C 026D930A 9C0906A9 EB0E363F 72076785 05005713 95BF4A82 E2B87A14 7BB12BAE 0CB61B38 92D28E9B E5D5BE0D 7CDCEFB7 0BDBDF21 86D3D2D4 F1D4E242 68DDB3F8 1FDA836E 81BE16CD F6B9265B 6FB077E1 18B74777 88085AE6 FF0F6A70 66063BCA 11010B5C 8F659EFF F862AE69 616BFFD3 166CCF45 A00AE278 D70DD2EE 4E048354 3903B3C2 A7672661 D06016F7 4969474D 3E6E77DB AED16A4A D9D65ADC 40DF0B66 37D83BF0 A9BCAE53 DEBB9EC5 47B2CF7F 30B5FFE9 BDBDF21C CABAC28A 53B39330 24B4A3A6 BAD03605 CDD70693 54DE5729 23D967BF B3667A2E C4614AB8 5D681B02 2A6F2B94 B40BBE37 C30C8EA1 5A05DF1B 2D02EF8D".substring(9 * r, 9 * r + 8)), e = e >>> 8 ^ t;
|
|
1831
1977
|
return (-1 ^ e) >>> 0;
|
|
1832
1978
|
}
|
|
1833
|
-
const He = /* @__PURE__ */ new Map([["abs", function(e,
|
|
1834
|
-
return V(e,
|
|
1835
|
-
}], ["acos", function(e,
|
|
1836
|
-
return V(e,
|
|
1837
|
-
}], ["asin", function(e,
|
|
1838
|
-
return V(e,
|
|
1839
|
-
}], ["atan", function(e,
|
|
1840
|
-
return V(e,
|
|
1841
|
-
}], ["atan2", function(e,
|
|
1842
|
-
return
|
|
1843
|
-
}], ["calc", F], ["clamp", function(e,
|
|
1844
|
-
const o = le([...e.value.filter(((
|
|
1979
|
+
const He = /* @__PURE__ */ new Map([["abs", function(e, t, r) {
|
|
1980
|
+
return V(e, t, r, At);
|
|
1981
|
+
}], ["acos", function(e, t, r) {
|
|
1982
|
+
return V(e, t, r, Et);
|
|
1983
|
+
}], ["asin", function(e, t, r) {
|
|
1984
|
+
return V(e, t, r, Pt);
|
|
1985
|
+
}], ["atan", function(e, t, r) {
|
|
1986
|
+
return V(e, t, r, bt);
|
|
1987
|
+
}], ["atan2", function(e, t, r) {
|
|
1988
|
+
return ke(e, t, r, St);
|
|
1989
|
+
}], ["calc", F], ["clamp", function(e, t, r) {
|
|
1990
|
+
const o = le([...e.value.filter(((v) => !_(v)))], t), i = [], a = [], u = [];
|
|
1845
1991
|
{
|
|
1846
|
-
let
|
|
1847
|
-
for (let
|
|
1848
|
-
const
|
|
1849
|
-
if (h(
|
|
1850
|
-
if (
|
|
1851
|
-
if (
|
|
1852
|
-
|
|
1992
|
+
let v = i;
|
|
1993
|
+
for (let q = 0; q < o.length; q++) {
|
|
1994
|
+
const w = o[q];
|
|
1995
|
+
if (h(w) && ae(w.value)) {
|
|
1996
|
+
if (v === u) return -1;
|
|
1997
|
+
if (v === a) {
|
|
1998
|
+
v = u;
|
|
1853
1999
|
continue;
|
|
1854
2000
|
}
|
|
1855
|
-
if (
|
|
1856
|
-
|
|
2001
|
+
if (v === i) {
|
|
2002
|
+
v = a;
|
|
1857
2003
|
continue;
|
|
1858
2004
|
}
|
|
1859
2005
|
return -1;
|
|
1860
2006
|
}
|
|
1861
|
-
|
|
2007
|
+
v.push(w);
|
|
1862
2008
|
}
|
|
1863
2009
|
}
|
|
1864
|
-
const c = $e(i),
|
|
1865
|
-
if (c &&
|
|
1866
|
-
const l =
|
|
2010
|
+
const c = $e(i), d = $e(u);
|
|
2011
|
+
if (c && d) return F(T(a), t, r);
|
|
2012
|
+
const l = I(F(T(a), t, r));
|
|
1867
2013
|
if (l === -1) return -1;
|
|
1868
2014
|
if (c) {
|
|
1869
|
-
const
|
|
1870
|
-
return
|
|
1871
|
-
}
|
|
1872
|
-
if (
|
|
1873
|
-
const
|
|
1874
|
-
return
|
|
1875
|
-
}
|
|
1876
|
-
var
|
|
1877
|
-
const
|
|
1878
|
-
if (
|
|
1879
|
-
const
|
|
1880
|
-
return
|
|
1881
|
-
}], ["cos", function(e,
|
|
1882
|
-
return V(e,
|
|
1883
|
-
}], ["exp", function(e,
|
|
1884
|
-
return V(e,
|
|
1885
|
-
}], ["hypot", function(e,
|
|
1886
|
-
return
|
|
1887
|
-
}], ["log", function(e,
|
|
1888
|
-
return
|
|
1889
|
-
}], ["max", function(e,
|
|
1890
|
-
return
|
|
1891
|
-
}], ["min", function(e,
|
|
1892
|
-
return
|
|
1893
|
-
}], ["mod", function(e,
|
|
1894
|
-
return
|
|
1895
|
-
}], ["pow", function(e,
|
|
1896
|
-
return
|
|
1897
|
-
}], ["random", function(e,
|
|
1898
|
-
const o =
|
|
2015
|
+
const v = I(F(T(u), t, r));
|
|
2016
|
+
return v === -1 ? -1 : Xe((g = l, C = v, new N([s.Function, "min(", -1, -1, { value: "min" }], [s.CloseParen, ")", -1, -1, void 0], [g, new f([s.Comma, ",", -1, -1, void 0]), C])), [l, v], r);
|
|
2017
|
+
}
|
|
2018
|
+
if (d) {
|
|
2019
|
+
const v = I(F(T(i), t, r));
|
|
2020
|
+
return v === -1 ? -1 : Qe(Zt(v, l), [v, l], r);
|
|
2021
|
+
}
|
|
2022
|
+
var g, C;
|
|
2023
|
+
const k = I(F(T(i), t, r));
|
|
2024
|
+
if (k === -1) return -1;
|
|
2025
|
+
const E = I(F(T(u), t, r));
|
|
2026
|
+
return E === -1 ? -1 : Bt(e, k, l, E, r);
|
|
2027
|
+
}], ["cos", function(e, t, r) {
|
|
2028
|
+
return V(e, t, r, Dt);
|
|
2029
|
+
}], ["exp", function(e, t, r) {
|
|
2030
|
+
return V(e, t, r, Ft);
|
|
2031
|
+
}], ["hypot", function(e, t, r) {
|
|
2032
|
+
return Ee(e, e.value, t, r, Nt);
|
|
2033
|
+
}], ["log", function(e, t, r) {
|
|
2034
|
+
return Ee(e, e.value, t, r, Lt);
|
|
2035
|
+
}], ["max", function(e, t, r) {
|
|
2036
|
+
return Ee(e, e.value, t, r, Qe);
|
|
2037
|
+
}], ["min", function(e, t, r) {
|
|
2038
|
+
return Ee(e, e.value, t, r, Xe);
|
|
2039
|
+
}], ["mod", function(e, t, r) {
|
|
2040
|
+
return ke(e, t, r, wt);
|
|
2041
|
+
}], ["pow", function(e, t, r) {
|
|
2042
|
+
return ke(e, t, r, It);
|
|
2043
|
+
}], ["random", function(e, t, r) {
|
|
2044
|
+
const o = Yt(e.value.filter(((g) => !_(g))), t, r);
|
|
1899
2045
|
if (o === -1) return -1;
|
|
1900
|
-
const [i,
|
|
2046
|
+
const [i, a] = o, u = fn(a, t, r);
|
|
1901
2047
|
if (u === -1) return -1;
|
|
1902
|
-
const [c,
|
|
1903
|
-
return !c || !
|
|
1904
|
-
}], ["rem", function(e,
|
|
1905
|
-
return
|
|
1906
|
-
}], ["round", function(e,
|
|
1907
|
-
const o = le([...e.value.filter(((
|
|
1908
|
-
let i = "",
|
|
2048
|
+
const [c, d, l] = u;
|
|
2049
|
+
return !c || !d ? -1 : qt(e, i, c, d, l, r);
|
|
2050
|
+
}], ["rem", function(e, t, r) {
|
|
2051
|
+
return ke(e, t, r, xt);
|
|
2052
|
+
}], ["round", function(e, t, r) {
|
|
2053
|
+
const o = le([...e.value.filter(((g) => !_(g)))], t);
|
|
2054
|
+
let i = "", a = !1;
|
|
1909
2055
|
const u = [], c = [];
|
|
1910
2056
|
{
|
|
1911
|
-
let
|
|
1912
|
-
for (let
|
|
1913
|
-
const
|
|
1914
|
-
if (!i && u.length === 0 && c.length === 0 && h(
|
|
1915
|
-
const
|
|
1916
|
-
if (
|
|
1917
|
-
i =
|
|
2057
|
+
let g = u;
|
|
2058
|
+
for (let C = 0; C < o.length; C++) {
|
|
2059
|
+
const k = o[C];
|
|
2060
|
+
if (!i && u.length === 0 && c.length === 0 && h(k) && me(k.value)) {
|
|
2061
|
+
const E = k.value[4].value.toLowerCase();
|
|
2062
|
+
if (Jt.has(E)) {
|
|
2063
|
+
i = E;
|
|
1918
2064
|
continue;
|
|
1919
2065
|
}
|
|
1920
2066
|
}
|
|
1921
|
-
if (h(
|
|
1922
|
-
if (
|
|
1923
|
-
if (
|
|
1924
|
-
if (
|
|
1925
|
-
|
|
2067
|
+
if (h(k) && ae(k.value)) {
|
|
2068
|
+
if (g === c) return -1;
|
|
2069
|
+
if (g === u && i && u.length === 0) continue;
|
|
2070
|
+
if (g === u) {
|
|
2071
|
+
a = !0, g = c;
|
|
1926
2072
|
continue;
|
|
1927
2073
|
}
|
|
1928
2074
|
return -1;
|
|
1929
2075
|
}
|
|
1930
|
-
|
|
2076
|
+
g.push(k);
|
|
1931
2077
|
}
|
|
1932
2078
|
}
|
|
1933
|
-
const
|
|
1934
|
-
if (
|
|
1935
|
-
|
|
1936
|
-
const l =
|
|
1937
|
-
return l === -1 ? -1 : (i || (i = "nearest"),
|
|
1938
|
-
}], ["sign", function(e,
|
|
1939
|
-
return V(e,
|
|
1940
|
-
}], ["sin", function(e,
|
|
1941
|
-
return V(e,
|
|
1942
|
-
}], ["sqrt", function(e,
|
|
1943
|
-
return V(e,
|
|
1944
|
-
}], ["tan", function(e,
|
|
1945
|
-
return V(e,
|
|
2079
|
+
const d = I(F(T(u), t, r));
|
|
2080
|
+
if (d === -1) return -1;
|
|
2081
|
+
a || c.length !== 0 || c.push(new f([s.Number, "1", -1, -1, { value: 1, type: p.Integer }]));
|
|
2082
|
+
const l = I(F(T(c), t, r));
|
|
2083
|
+
return l === -1 ? -1 : (i || (i = "nearest"), Ot(e, i, d, l, r));
|
|
2084
|
+
}], ["sign", function(e, t, r) {
|
|
2085
|
+
return V(e, t, r, Tt);
|
|
2086
|
+
}], ["sin", function(e, t, r) {
|
|
2087
|
+
return V(e, t, r, Mt);
|
|
2088
|
+
}], ["sqrt", function(e, t, r) {
|
|
2089
|
+
return V(e, t, r, Rt);
|
|
2090
|
+
}], ["tan", function(e, t, r) {
|
|
2091
|
+
return V(e, t, r, Ut);
|
|
1946
2092
|
}]]);
|
|
1947
|
-
function F(
|
|
1948
|
-
const r = le([...
|
|
2093
|
+
function F(n, e, t) {
|
|
2094
|
+
const r = le([...n.value.filter(((i) => !_(i)))], e);
|
|
1949
2095
|
if (r.length === 1 && h(r[0])) return { inputs: [r[0]], operation: we };
|
|
1950
2096
|
let o = 0;
|
|
1951
2097
|
for (; o < r.length; ) {
|
|
1952
2098
|
const i = r[o];
|
|
1953
|
-
if (
|
|
1954
|
-
const
|
|
1955
|
-
if (
|
|
1956
|
-
r.splice(o, 1,
|
|
1957
|
-
} else if (
|
|
1958
|
-
const
|
|
1959
|
-
if (!
|
|
1960
|
-
const u =
|
|
2099
|
+
if (rt(i) && on(i.startToken)) {
|
|
2100
|
+
const a = F(i, e, t);
|
|
2101
|
+
if (a === -1) return -1;
|
|
2102
|
+
r.splice(o, 1, a);
|
|
2103
|
+
} else if (de(i)) {
|
|
2104
|
+
const a = He.get(i.getName().toLowerCase());
|
|
2105
|
+
if (!a) return -1;
|
|
2106
|
+
const u = a(i, e, t);
|
|
1961
2107
|
if (u === -1) return -1;
|
|
1962
2108
|
r.splice(o, 1, u);
|
|
1963
2109
|
} else o++;
|
|
@@ -1969,19 +2115,19 @@ function F(t, e, n) {
|
|
|
1969
2115
|
o++;
|
|
1970
2116
|
continue;
|
|
1971
2117
|
}
|
|
1972
|
-
const
|
|
1973
|
-
if (!
|
|
2118
|
+
const a = r[o + 1];
|
|
2119
|
+
if (!a || !h(a)) {
|
|
1974
2120
|
o++;
|
|
1975
2121
|
continue;
|
|
1976
2122
|
}
|
|
1977
|
-
const u =
|
|
1978
|
-
if (!
|
|
2123
|
+
const u = a.value;
|
|
2124
|
+
if (!Ke(u) || u[4].value !== "*" && u[4].value !== "/") {
|
|
1979
2125
|
o++;
|
|
1980
2126
|
continue;
|
|
1981
2127
|
}
|
|
1982
2128
|
const c = r[o + 2];
|
|
1983
2129
|
if (!c || !h(c) && !Q(c)) return -1;
|
|
1984
|
-
u[4].value !== "*" ? u[4].value !== "/" ? o++ : r.splice(o, 3, { inputs: [i, c], operation:
|
|
2130
|
+
u[4].value !== "*" ? u[4].value !== "/" ? o++ : r.splice(o, 3, { inputs: [i, c], operation: yt }) : r.splice(o, 3, { inputs: [i, c], operation: Ct });
|
|
1985
2131
|
}
|
|
1986
2132
|
if (o = 0, r.length === 1 && Q(r[0])) return r[0];
|
|
1987
2133
|
for (; o < r.length; ) {
|
|
@@ -1990,43 +2136,43 @@ function F(t, e, n) {
|
|
|
1990
2136
|
o++;
|
|
1991
2137
|
continue;
|
|
1992
2138
|
}
|
|
1993
|
-
const
|
|
1994
|
-
if (!
|
|
2139
|
+
const a = r[o + 1];
|
|
2140
|
+
if (!a || !h(a)) {
|
|
1995
2141
|
o++;
|
|
1996
2142
|
continue;
|
|
1997
2143
|
}
|
|
1998
|
-
const u =
|
|
1999
|
-
if (!
|
|
2144
|
+
const u = a.value;
|
|
2145
|
+
if (!Ke(u) || u[4].value !== "+" && u[4].value !== "-") {
|
|
2000
2146
|
o++;
|
|
2001
2147
|
continue;
|
|
2002
2148
|
}
|
|
2003
2149
|
const c = r[o + 2];
|
|
2004
2150
|
if (!c || !h(c) && !Q(c)) return -1;
|
|
2005
|
-
u[4].value !== "+" ? u[4].value !== "-" ? o++ : r.splice(o, 3, { inputs: [i, c], operation:
|
|
2151
|
+
u[4].value !== "+" ? u[4].value !== "-" ? o++ : r.splice(o, 3, { inputs: [i, c], operation: Wt }) : r.splice(o, 3, { inputs: [i, c], operation: ht });
|
|
2006
2152
|
}
|
|
2007
2153
|
return r.length === 1 && Q(r[0]) ? r[0] : -1;
|
|
2008
2154
|
}
|
|
2009
|
-
function V(
|
|
2010
|
-
const o =
|
|
2011
|
-
return o === -1 ? -1 : r(
|
|
2155
|
+
function V(n, e, t, r) {
|
|
2156
|
+
const o = Ht(n.value, e, t);
|
|
2157
|
+
return o === -1 ? -1 : r(n, o, t);
|
|
2012
2158
|
}
|
|
2013
|
-
function
|
|
2014
|
-
const r =
|
|
2159
|
+
function Ht(n, e, t) {
|
|
2160
|
+
const r = I(F(T(le([...n.filter(((o) => !_(o)))], e)), e, t));
|
|
2015
2161
|
return r === -1 ? -1 : r;
|
|
2016
2162
|
}
|
|
2017
|
-
function
|
|
2018
|
-
const o =
|
|
2163
|
+
function ke(n, e, t, r) {
|
|
2164
|
+
const o = Gt(n.value, e, t);
|
|
2019
2165
|
if (o === -1) return -1;
|
|
2020
|
-
const [i,
|
|
2021
|
-
return r(
|
|
2166
|
+
const [i, a] = o;
|
|
2167
|
+
return r(n, i, a, t);
|
|
2022
2168
|
}
|
|
2023
|
-
function
|
|
2024
|
-
const r = le([...
|
|
2169
|
+
function Gt(n, e, t) {
|
|
2170
|
+
const r = le([...n.filter(((c) => !_(c)))], e), o = [], i = [];
|
|
2025
2171
|
{
|
|
2026
2172
|
let c = o;
|
|
2027
|
-
for (let
|
|
2028
|
-
const l = r[
|
|
2029
|
-
if (h(l) &&
|
|
2173
|
+
for (let d = 0; d < r.length; d++) {
|
|
2174
|
+
const l = r[d];
|
|
2175
|
+
if (h(l) && ae(l.value)) {
|
|
2030
2176
|
if (c === i) return -1;
|
|
2031
2177
|
if (c === o) {
|
|
2032
2178
|
c = i;
|
|
@@ -2037,44 +2183,44 @@ function Hn(t, e, n) {
|
|
|
2037
2183
|
c.push(l);
|
|
2038
2184
|
}
|
|
2039
2185
|
}
|
|
2040
|
-
const
|
|
2041
|
-
if (
|
|
2042
|
-
const u =
|
|
2043
|
-
return u === -1 ? -1 : [
|
|
2186
|
+
const a = I(F(T(o), e, t));
|
|
2187
|
+
if (a === -1) return -1;
|
|
2188
|
+
const u = I(F(T(i), e, t));
|
|
2189
|
+
return u === -1 ? -1 : [a, u];
|
|
2044
2190
|
}
|
|
2045
|
-
function
|
|
2046
|
-
const i =
|
|
2047
|
-
return i === -1 ? -1 : o(
|
|
2191
|
+
function Ee(n, e, t, r, o) {
|
|
2192
|
+
const i = fn(n.value, t, r);
|
|
2193
|
+
return i === -1 ? -1 : o(n, i, r);
|
|
2048
2194
|
}
|
|
2049
|
-
function
|
|
2050
|
-
const r = le([...
|
|
2195
|
+
function fn(n, e, t) {
|
|
2196
|
+
const r = le([...n.filter(((i) => !_(i)))], e), o = [];
|
|
2051
2197
|
{
|
|
2052
2198
|
const i = [];
|
|
2053
|
-
let
|
|
2199
|
+
let a = [];
|
|
2054
2200
|
for (let u = 0; u < r.length; u++) {
|
|
2055
2201
|
const c = r[u];
|
|
2056
|
-
h(c) &&
|
|
2202
|
+
h(c) && ae(c.value) ? (i.push(a), a = []) : a.push(c);
|
|
2057
2203
|
}
|
|
2058
|
-
i.push(
|
|
2204
|
+
i.push(a);
|
|
2059
2205
|
for (let u = 0; u < i.length; u++) {
|
|
2060
2206
|
if (i[u].length === 0) return -1;
|
|
2061
|
-
const c =
|
|
2207
|
+
const c = I(F(T(i[u]), e, t));
|
|
2062
2208
|
if (c === -1) return -1;
|
|
2063
2209
|
o.push(c);
|
|
2064
2210
|
}
|
|
2065
2211
|
}
|
|
2066
2212
|
return o;
|
|
2067
2213
|
}
|
|
2068
|
-
const
|
|
2069
|
-
function
|
|
2070
|
-
const r = { isAuto: !1, dashedIdent: "", fixed: -1, elementShared: !1 }, o =
|
|
2071
|
-
if (!h(o) || !
|
|
2072
|
-
for (let i = 0; i <
|
|
2073
|
-
const
|
|
2074
|
-
if (!h(
|
|
2075
|
-
if (
|
|
2076
|
-
if (!
|
|
2077
|
-
const u =
|
|
2214
|
+
const Jt = /* @__PURE__ */ new Set(["nearest", "up", "down", "to-zero"]);
|
|
2215
|
+
function Yt(n, e, t) {
|
|
2216
|
+
const r = { isAuto: !1, dashedIdent: "", fixed: -1, elementShared: !1 }, o = n[0];
|
|
2217
|
+
if (!h(o) || !me(o.value)) return [r, n];
|
|
2218
|
+
for (let i = 0; i < n.length; i++) {
|
|
2219
|
+
const a = n[i];
|
|
2220
|
+
if (!h(a)) return -1;
|
|
2221
|
+
if (ae(a.value)) return [r, n.slice(i + 1)];
|
|
2222
|
+
if (!me(a.value)) return -1;
|
|
2223
|
+
const u = a.value[4].value.toLowerCase();
|
|
2078
2224
|
if (u !== "element-shared") if (u !== "fixed") if (u !== "auto") {
|
|
2079
2225
|
if (u.startsWith("--")) {
|
|
2080
2226
|
if (r.fixed !== -1 || r.isAuto) return -1;
|
|
@@ -2087,11 +2233,11 @@ function Jn(t, e, n) {
|
|
|
2087
2233
|
else {
|
|
2088
2234
|
if (r.elementShared || r.dashedIdent || r.isAuto) return -1;
|
|
2089
2235
|
i++;
|
|
2090
|
-
const c =
|
|
2236
|
+
const c = n[i];
|
|
2091
2237
|
if (!c) return -1;
|
|
2092
|
-
const
|
|
2093
|
-
if (
|
|
2094
|
-
r.fixed = Math.max(0, Math.min(
|
|
2238
|
+
const d = I(F(T([c]), e, t));
|
|
2239
|
+
if (d === -1 || !m(d.value) || d.value[4].value < 0 || d.value[4].value > 1) return -1;
|
|
2240
|
+
r.fixed = Math.max(0, Math.min(d.value[4].value, 1 - 1e-9));
|
|
2095
2241
|
}
|
|
2096
2242
|
else {
|
|
2097
2243
|
if (r.fixed !== -1) return -1;
|
|
@@ -2100,218 +2246,218 @@ function Jn(t, e, n) {
|
|
|
2100
2246
|
}
|
|
2101
2247
|
return -1;
|
|
2102
2248
|
}
|
|
2103
|
-
function
|
|
2104
|
-
return new N([
|
|
2105
|
-
}
|
|
2106
|
-
function
|
|
2107
|
-
return new N([
|
|
2108
|
-
}
|
|
2109
|
-
function
|
|
2110
|
-
if (
|
|
2111
|
-
if (
|
|
2112
|
-
const e =
|
|
2113
|
-
return
|
|
2114
|
-
}
|
|
2115
|
-
function
|
|
2116
|
-
if (
|
|
2117
|
-
if (
|
|
2118
|
-
const e =
|
|
2119
|
-
if (!
|
|
2120
|
-
let
|
|
2121
|
-
return Number.NEGATIVE_INFINITY === e[4].value && (
|
|
2122
|
-
}
|
|
2123
|
-
function
|
|
2124
|
-
if (
|
|
2125
|
-
if (
|
|
2126
|
-
const e =
|
|
2127
|
-
return
|
|
2128
|
-
}
|
|
2129
|
-
function
|
|
2130
|
-
if (
|
|
2131
|
-
if (e <= 0 ||
|
|
2132
|
-
const
|
|
2133
|
-
if (!
|
|
2134
|
-
const r = Number(
|
|
2135
|
-
return
|
|
2136
|
-
}
|
|
2137
|
-
function
|
|
2138
|
-
let
|
|
2139
|
-
return
|
|
2140
|
-
}
|
|
2141
|
-
function
|
|
2249
|
+
function T(n) {
|
|
2250
|
+
return new N([s.Function, "calc(", -1, -1, { value: "calc" }], [s.CloseParen, ")", -1, -1, void 0], n);
|
|
2251
|
+
}
|
|
2252
|
+
function Zt(n, e) {
|
|
2253
|
+
return new N([s.Function, "max(", -1, -1, { value: "max" }], [s.CloseParen, ")", -1, -1, void 0], [n, new f([s.Comma, ",", -1, -1, void 0]), e]);
|
|
2254
|
+
}
|
|
2255
|
+
function Kt(n) {
|
|
2256
|
+
if (n === -1) return -1;
|
|
2257
|
+
if (de(n)) return n;
|
|
2258
|
+
const e = n.value;
|
|
2259
|
+
return B(e) && Number.isNaN(e[4].value) ? m(e) ? new N([s.Function, "calc(", e[2], e[3], { value: "calc" }], [s.CloseParen, ")", e[2], e[3], void 0], [new f([s.Ident, "NaN", e[2], e[3], { value: "NaN" }])]) : P(e) ? new N([s.Function, "calc(", e[2], e[3], { value: "calc" }], [s.CloseParen, ")", e[2], e[3], void 0], [new f([s.Ident, "NaN", e[2], e[3], { value: "NaN" }]), new M([[s.Whitespace, " ", e[2], e[3], void 0]]), new f([s.Delim, "*", e[2], e[3], { value: "*" }]), new M([[s.Whitespace, " ", e[2], e[3], void 0]]), new f([s.Dimension, "1" + e[4].unit, e[2], e[3], { value: 1, type: p.Integer, unit: e[4].unit }])]) : b(e) ? new N([s.Function, "calc(", e[2], e[3], { value: "calc" }], [s.CloseParen, ")", e[2], e[3], void 0], [new f([s.Ident, "NaN", e[2], e[3], { value: "NaN" }]), new M([[s.Whitespace, " ", e[2], e[3], void 0]]), new f([s.Delim, "*", e[2], e[3], { value: "*" }]), new M([[s.Whitespace, " ", e[2], e[3], void 0]]), new f([s.Percentage, "1%", e[2], e[3], { value: 1 }])]) : -1 : n;
|
|
2260
|
+
}
|
|
2261
|
+
function Qt(n) {
|
|
2262
|
+
if (n === -1) return -1;
|
|
2263
|
+
if (de(n)) return n;
|
|
2264
|
+
const e = n.value;
|
|
2265
|
+
if (!B(e) || Number.isFinite(e[4].value) || Number.isNaN(e[4].value)) return n;
|
|
2266
|
+
let t = "";
|
|
2267
|
+
return Number.NEGATIVE_INFINITY === e[4].value && (t = "-"), m(e) ? new N([s.Function, "calc(", e[2], e[3], { value: "calc" }], [s.CloseParen, ")", e[2], e[3], void 0], [new f([s.Ident, t + "infinity", e[2], e[3], { value: t + "infinity" }])]) : P(e) ? new N([s.Function, "calc(", e[2], e[3], { value: "calc" }], [s.CloseParen, ")", e[2], e[3], void 0], [new f([s.Ident, t + "infinity", e[2], e[3], { value: t + "infinity" }]), new M([[s.Whitespace, " ", e[2], e[3], void 0]]), new f([s.Delim, "*", e[2], e[3], { value: "*" }]), new M([[s.Whitespace, " ", e[2], e[3], void 0]]), new f([s.Dimension, "1" + e[4].unit, e[2], e[3], { value: 1, type: p.Integer, unit: e[4].unit }])]) : new N([s.Function, "calc(", e[2], e[3], { value: "calc" }], [s.CloseParen, ")", e[2], e[3], void 0], [new f([s.Ident, t + "infinity", e[2], e[3], { value: t + "infinity" }]), new M([[s.Whitespace, " ", e[2], e[3], void 0]]), new f([s.Delim, "*", e[2], e[3], { value: "*" }]), new M([[s.Whitespace, " ", e[2], e[3], void 0]]), new f([s.Percentage, "1%", e[2], e[3], { value: 1 }])]);
|
|
2268
|
+
}
|
|
2269
|
+
function Xt(n) {
|
|
2270
|
+
if (n === -1) return -1;
|
|
2271
|
+
if (de(n)) return n;
|
|
2272
|
+
const e = n.value;
|
|
2273
|
+
return B(e) && Object.is(-0, e[4].value) && (e[1] === "-0" || (b(e) ? e[1] = "-0%" : P(e) ? e[1] = "-0" + e[4].unit : e[1] = "-0")), n;
|
|
2274
|
+
}
|
|
2275
|
+
function _t(n, e = 13) {
|
|
2276
|
+
if (n === -1) return -1;
|
|
2277
|
+
if (e <= 0 || de(n)) return n;
|
|
2278
|
+
const t = n.value;
|
|
2279
|
+
if (!B(t) || Number.isInteger(t[4].value)) return n;
|
|
2280
|
+
const r = Number(t[4].value.toFixed(e)).toString();
|
|
2281
|
+
return m(t) ? t[1] = r : b(t) ? t[1] = r + "%" : P(t) && (t[1] = r + t[4].unit), n;
|
|
2282
|
+
}
|
|
2283
|
+
function er(n, e) {
|
|
2284
|
+
let t = n;
|
|
2285
|
+
return t = _t(t, e == null ? void 0 : e.precision), t = Xt(t), t = Kt(t), t = Qt(t), t;
|
|
2286
|
+
}
|
|
2287
|
+
function nr(n) {
|
|
2142
2288
|
return /* @__PURE__ */ new Map();
|
|
2143
2289
|
}
|
|
2144
|
-
function tr(
|
|
2145
|
-
return
|
|
2290
|
+
function tr(n, e) {
|
|
2291
|
+
return rr(_n(Ln({ css: n }), {}), e).map(((t) => t.map(((r) => G(...r.tokens()))).join(""))).join(",");
|
|
2146
2292
|
}
|
|
2147
|
-
function
|
|
2148
|
-
const
|
|
2149
|
-
return
|
|
2150
|
-
if (!
|
|
2293
|
+
function rr(n, e) {
|
|
2294
|
+
const t = nr();
|
|
2295
|
+
return tt(n, ((r) => {
|
|
2296
|
+
if (!de(r)) return;
|
|
2151
2297
|
const o = He.get(r.getName().toLowerCase());
|
|
2152
2298
|
if (!o) return;
|
|
2153
|
-
const i =
|
|
2299
|
+
const i = er(I(o(r, t, {})), e);
|
|
2154
2300
|
return i !== -1 ? i : void 0;
|
|
2155
2301
|
}));
|
|
2156
2302
|
}
|
|
2157
2303
|
new Set(He.keys());
|
|
2158
|
-
const L = (
|
|
2159
|
-
const e = `${
|
|
2304
|
+
const L = (n) => {
|
|
2305
|
+
const e = `${n}`, t = parseFloat(e);
|
|
2160
2306
|
let r = "unsupported";
|
|
2161
2307
|
const o = e.match(/px|rem|em/);
|
|
2162
|
-
return o && (r = o[0]),
|
|
2163
|
-
},
|
|
2308
|
+
return o && (r = o[0]), t === 0 && r === "unsupported" && (r = "zero"), { number: t, unit: r };
|
|
2309
|
+
}, _e = (n) => {
|
|
2164
2310
|
const e = {};
|
|
2165
|
-
if (typeof
|
|
2166
|
-
e.fontSize = L(
|
|
2167
|
-
else if (Array.isArray(
|
|
2168
|
-
if (e.fontSize = L(
|
|
2169
|
-
e.lineHeight = L(
|
|
2170
|
-
else if (typeof
|
|
2171
|
-
if ("lineHeight" in
|
|
2172
|
-
let
|
|
2173
|
-
typeof
|
|
2174
|
-
const r = L(
|
|
2311
|
+
if (typeof n == "string")
|
|
2312
|
+
e.fontSize = L(n);
|
|
2313
|
+
else if (Array.isArray(n)) {
|
|
2314
|
+
if (e.fontSize = L(n[0]), typeof n[1] == "string")
|
|
2315
|
+
e.lineHeight = L(n[1]);
|
|
2316
|
+
else if (typeof n[1] == "object") {
|
|
2317
|
+
if ("lineHeight" in n[1]) {
|
|
2318
|
+
let t = n[1].lineHeight;
|
|
2319
|
+
typeof t == "string" && t.includes("calc") && (t = tr(t));
|
|
2320
|
+
const r = L(t);
|
|
2175
2321
|
r.unit === "unsupported" ? e.lineHeight = {
|
|
2176
|
-
number:
|
|
2322
|
+
number: t * e.fontSize.number,
|
|
2177
2323
|
unit: e.fontSize.unit
|
|
2178
2324
|
} : e.lineHeight = r;
|
|
2179
2325
|
}
|
|
2180
|
-
"letterSpacing" in
|
|
2326
|
+
"letterSpacing" in n[1] && (e.letterSpacing = L(n[1].letterSpacing));
|
|
2181
2327
|
}
|
|
2182
2328
|
}
|
|
2183
2329
|
return e;
|
|
2184
|
-
},
|
|
2185
|
-
`Same value for start an end${r ? ` (${r})` : ""}: "clamp-[${
|
|
2186
|
-
), null) :
|
|
2187
|
-
`Units need to match${r ? ` (${r})` : ""}: "clamp-[${
|
|
2188
|
-
), null) :
|
|
2189
|
-
`Only px, rem and em units are supported${r ? ` (${r})` : ""}: "clamp-[${
|
|
2190
|
-
), null) : !0, We = (
|
|
2191
|
-
const i =
|
|
2192
|
-
let u =
|
|
2193
|
-
|
|
2194
|
-
const
|
|
2195
|
-
return
|
|
2196
|
-
},
|
|
2330
|
+
}, ge = (n, e, t, r = null) => n.number === e.number ? (ee.error(
|
|
2331
|
+
`Same value for start an end${r ? ` (${r})` : ""}: "clamp-[${t}]".`
|
|
2332
|
+
), null) : n.unit !== e.unit && n.unit !== "zero" && e.unit !== "zero" ? (ee.error(
|
|
2333
|
+
`Units need to match${r ? ` (${r})` : ""}: "clamp-[${t}]" ${n.unit} !== ${e.unit}.`
|
|
2334
|
+
), null) : n.unit === "unsupported" || e.unit === "unsupported" ? (ee.error(
|
|
2335
|
+
`Only px, rem and em units are supported${r ? ` (${r})` : ""}: "clamp-[${t}]".`
|
|
2336
|
+
), null) : !0, We = (n, e, t = { number: 23.4375, unit: "rem" }, r = { number: 90, unit: "rem" }, o = !1) => {
|
|
2337
|
+
const i = n.unit === "zero" ? e.unit : n.unit, a = i === "px";
|
|
2338
|
+
let u = n.number, c = e.number, d = !1, l = t.number, g = r.number;
|
|
2339
|
+
t.unit !== "px" && a && (l = t.number * 16), t.unit === "px" && !a && (l = t.number / 16), r.unit !== "px" && a && (g = r.number * 16), r.unit === "px" && !a && (g = r.number / 16), c < u && u < 0 && c < 0 ? (u = Math.abs(u), c = Math.abs(c), d = !0) : c < u && u > 0 && c > 0 ? (u = u * -1, c = c * -1, d = !0) : c < u && (u = Math.abs(u) * -1, c = Math.abs(c), d = !0);
|
|
2340
|
+
const C = (c - u) / (g - l), k = `${(u - l * C).toFixed(6)}${i} + ${(100 * C).toFixed(6)}${o ? "cqw" : "vw"}`, E = `clamp(${u}${i}, ${k}, ${c}${i})`;
|
|
2341
|
+
return d ? `calc(${E} * -1)` : E;
|
|
2342
|
+
}, or = {
|
|
2197
2343
|
minSize: "23.4375rem",
|
|
2198
2344
|
maxSize: "90rem"
|
|
2199
2345
|
};
|
|
2200
|
-
function
|
|
2201
|
-
if (!
|
|
2346
|
+
function Pe(n, e, t, r) {
|
|
2347
|
+
if (!n)
|
|
2202
2348
|
return {
|
|
2203
2349
|
...L(e),
|
|
2204
2350
|
isContainer: !1
|
|
2205
2351
|
};
|
|
2206
|
-
const o =
|
|
2352
|
+
const o = n.startsWith("@"), i = o ? n.slice(1) : n, a = o ? r[i] || i : t[i] || i;
|
|
2207
2353
|
return {
|
|
2208
|
-
...L(
|
|
2354
|
+
...L(a),
|
|
2209
2355
|
isContainer: o
|
|
2210
2356
|
};
|
|
2211
2357
|
}
|
|
2212
|
-
const
|
|
2213
|
-
const e = { ...
|
|
2214
|
-
return function({ matchUtilities:
|
|
2215
|
-
const
|
|
2216
|
-
for (const [
|
|
2358
|
+
const ir = (n) => /^-?\d*\.?\d+(px|rem|em)$/.test(n.trim()) || n.trim() === "0", ar = yn.withOptions(function(n = {}) {
|
|
2359
|
+
const e = { ...or, ...n };
|
|
2360
|
+
return function({ matchUtilities: t, addBase: r, theme: o, config: i }) {
|
|
2361
|
+
const a = o("clamp") || {}, u = {}, c = {};
|
|
2362
|
+
for (const [d, l] of Object.entries(a)) {
|
|
2217
2363
|
if (typeof l != "string") continue;
|
|
2218
|
-
const
|
|
2219
|
-
|
|
2364
|
+
const g = l.split(",")[0];
|
|
2365
|
+
ir(g) ? c[d] = l : u[d] = l;
|
|
2220
2366
|
}
|
|
2221
2367
|
if (Object.keys(c).length > 0) {
|
|
2222
|
-
const
|
|
2223
|
-
for (const [
|
|
2224
|
-
const
|
|
2225
|
-
if (
|
|
2368
|
+
const d = o("screens"), l = o("containers"), g = {};
|
|
2369
|
+
for (const [C, k] of Object.entries(c)) {
|
|
2370
|
+
const E = k.split(",").map((Ce) => Ce.trim());
|
|
2371
|
+
if (E.length < 2) {
|
|
2226
2372
|
ee.error(
|
|
2227
|
-
`Theme clamp variable "--clamp-${
|
|
2373
|
+
`Theme clamp variable "--clamp-${C}" requires at least 2 values (start, end).`
|
|
2228
2374
|
);
|
|
2229
2375
|
continue;
|
|
2230
2376
|
}
|
|
2231
|
-
const
|
|
2232
|
-
|
|
2377
|
+
const v = L(E[0]), q = L(E[1]), w = Pe(
|
|
2378
|
+
E[2],
|
|
2233
2379
|
e.minSize,
|
|
2234
|
-
|
|
2380
|
+
d,
|
|
2235
2381
|
l
|
|
2236
|
-
),
|
|
2237
|
-
|
|
2382
|
+
), O = Pe(
|
|
2383
|
+
E[3],
|
|
2238
2384
|
e.maxSize,
|
|
2239
|
-
|
|
2385
|
+
d,
|
|
2240
2386
|
l
|
|
2241
2387
|
);
|
|
2242
|
-
if (!
|
|
2243
|
-
const xe =
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2388
|
+
if (!ge(w, O, `--clamp-${C}`) || !ge(v, q, `--clamp-${C}`)) continue;
|
|
2389
|
+
const xe = w.isContainer;
|
|
2390
|
+
g[`--clamp-${C}`] = We(
|
|
2391
|
+
v,
|
|
2392
|
+
q,
|
|
2393
|
+
w,
|
|
2394
|
+
O,
|
|
2249
2395
|
xe
|
|
2250
2396
|
);
|
|
2251
2397
|
}
|
|
2252
|
-
Object.keys(
|
|
2398
|
+
Object.keys(g).length > 0 && r({ ":root": g });
|
|
2253
2399
|
}
|
|
2254
|
-
|
|
2400
|
+
t(
|
|
2255
2401
|
{
|
|
2256
|
-
clamp: (
|
|
2257
|
-
var
|
|
2258
|
-
const l =
|
|
2402
|
+
clamp: (d) => {
|
|
2403
|
+
var Je, Ye;
|
|
2404
|
+
const l = d.split(",");
|
|
2259
2405
|
if (l.length < 3)
|
|
2260
2406
|
return ee.error(
|
|
2261
|
-
`The clamp utility requires at least 3 arguments: "clamp-[${
|
|
2407
|
+
`The clamp utility requires at least 3 arguments: "clamp-[${d}]".`
|
|
2262
2408
|
), {};
|
|
2263
|
-
const
|
|
2409
|
+
const g = o("screens"), C = o("containers"), k = Pe(
|
|
2264
2410
|
l[3],
|
|
2265
2411
|
e.minSize,
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
),
|
|
2412
|
+
g,
|
|
2413
|
+
C
|
|
2414
|
+
), E = Pe(
|
|
2269
2415
|
l[4],
|
|
2270
2416
|
e.maxSize,
|
|
2271
|
-
|
|
2272
|
-
|
|
2417
|
+
g,
|
|
2418
|
+
C
|
|
2273
2419
|
);
|
|
2274
|
-
if (!
|
|
2420
|
+
if (!ge(k, E, d))
|
|
2275
2421
|
return {};
|
|
2276
|
-
const
|
|
2277
|
-
if (!
|
|
2422
|
+
const v = k.isContainer, w = l[0].startsWith("--") ? { type: "regular", key: null, props: [l[0]] } : Cn(l[0]);
|
|
2423
|
+
if (!w)
|
|
2278
2424
|
return ee.error(
|
|
2279
|
-
`Property "${l[0]}" is not supported: "clamp-[${
|
|
2425
|
+
`Property "${l[0]}" is not supported: "clamp-[${d}]".`
|
|
2280
2426
|
), {};
|
|
2281
|
-
const { key:
|
|
2282
|
-
if (
|
|
2283
|
-
const S =
|
|
2284
|
-
i().theme[
|
|
2285
|
-
),
|
|
2286
|
-
i().theme[
|
|
2427
|
+
const { key: O, props: xe, type: Ce } = w;
|
|
2428
|
+
if (Ce === "fontSize") {
|
|
2429
|
+
const S = _e(
|
|
2430
|
+
i().theme[O][l[1]] || l[1]
|
|
2431
|
+
), z = _e(
|
|
2432
|
+
i().theme[O][l[2]] || l[2]
|
|
2287
2433
|
), fe = {};
|
|
2288
|
-
return Object.keys(S).forEach((
|
|
2289
|
-
if (
|
|
2290
|
-
if ((
|
|
2291
|
-
fe[
|
|
2292
|
-
else if (
|
|
2293
|
-
const
|
|
2294
|
-
S[
|
|
2295
|
-
|
|
2434
|
+
return Object.keys(S).forEach((D) => {
|
|
2435
|
+
if (D in z) {
|
|
2436
|
+
if ((D === "letterSpacing" || D === "lineHeight") && S[D].number === z[D].number && S[D].unit === z[D].unit)
|
|
2437
|
+
fe[D] = `${S[D].number}${S[D].unit}`;
|
|
2438
|
+
else if (ge(S[D], z[D], d, D)) {
|
|
2439
|
+
const mn = We(
|
|
2440
|
+
S[D],
|
|
2441
|
+
z[D],
|
|
2442
|
+
k,
|
|
2296
2443
|
E,
|
|
2297
|
-
|
|
2298
|
-
m
|
|
2444
|
+
v
|
|
2299
2445
|
);
|
|
2300
|
-
fe[
|
|
2446
|
+
fe[D] = mn;
|
|
2301
2447
|
}
|
|
2302
2448
|
}
|
|
2303
2449
|
}), fe;
|
|
2304
2450
|
}
|
|
2305
2451
|
let Oe = L(
|
|
2306
|
-
|
|
2452
|
+
O && ((Je = i().theme[O]) == null ? void 0 : Je[l[1]]) || l[1]
|
|
2307
2453
|
), Te = L(
|
|
2308
|
-
|
|
2454
|
+
O && ((Ye = i().theme[O]) == null ? void 0 : Ye[l[2]]) || l[2]
|
|
2309
2455
|
);
|
|
2310
|
-
if (
|
|
2456
|
+
if (Ce === "spacing") {
|
|
2311
2457
|
const S = L(
|
|
2312
2458
|
typeof o("spacing") == "string" ? o("spacing") : o("spacing.1")
|
|
2313
|
-
),
|
|
2314
|
-
|
|
2459
|
+
), z = /^-?\d*\.?\d+$/.test(l[1]), fe = /^-?\d*\.?\d+$/.test(l[2]);
|
|
2460
|
+
z && (Oe = {
|
|
2315
2461
|
number: S.number * parseFloat(l[1]),
|
|
2316
2462
|
unit: S.unit
|
|
2317
2463
|
}), fe && (Te = {
|
|
@@ -2319,10 +2465,10 @@ const or = (t) => /^-?\d*\.?\d+(px|rem|em)$/.test(t.trim()) || t.trim() === "0",
|
|
|
2319
2465
|
unit: S.unit
|
|
2320
2466
|
});
|
|
2321
2467
|
}
|
|
2322
|
-
if (!
|
|
2468
|
+
if (!ge(Oe, Te, d))
|
|
2323
2469
|
return {};
|
|
2324
|
-
const
|
|
2325
|
-
return
|
|
2470
|
+
const gn = We(Oe, Te, k, E, v), Ge = xe.reduce((S, z) => (typeof z == "string" ? S[z] = gn : S = { ...S, ...z }, S), {});
|
|
2471
|
+
return w.selector ? { [w.selector]: Ge } : Ge;
|
|
2326
2472
|
}
|
|
2327
2473
|
},
|
|
2328
2474
|
{ values: u },
|
|
@@ -2337,6 +2483,6 @@ const or = (t) => /^-?\d*\.?\d+(px|rem|em)$/.test(t.trim()) || t.trim() === "0",
|
|
|
2337
2483
|
};
|
|
2338
2484
|
});
|
|
2339
2485
|
export {
|
|
2340
|
-
|
|
2486
|
+
ar as default
|
|
2341
2487
|
};
|
|
2342
2488
|
//# sourceMappingURL=index.js.map
|