hyperframes 0.8.141 → 0.8.143
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/dist/{add-KH2CF4FD.js → add-Q5EYDUAY.js} +18 -17
- package/dist/{animatedGifPrep-QO4BSKR7.js → animatedGifPrep-H2DUQEZ3.js} +15 -15
- package/dist/{asset-4RDZILVJ.js → asset-C7JBYYX4.js} +4 -4
- package/dist/{assetCataloger-WGR4LYYN.js → assetCataloger-FRO4G6OU.js} +8 -7
- package/dist/{auth-WYQCOYE5.js → auth-FRWLCO36.js} +5 -4
- package/dist/{autoUpdate-PC5TN3NL.js → autoUpdate-E4OZXQK6.js} +2 -2
- package/dist/{backgroundChecks-7M3T44EP.js → backgroundChecks-FSUVHN5L.js} +3 -3
- package/dist/backgroundChecksWorker.js +3 -3
- package/dist/{batchRender-GOLLOE4V.js → batchRender-4U73BYTU.js} +11 -10
- package/dist/{beats-XJ7WP6QS.js → beats-U6KJWF35.js} +32 -28
- package/dist/{benchmark-HCGFBEZJ.js → benchmark-5ONT7V7B.js} +15 -14
- package/dist/{browser-VQKO2FKG.js → browser-R4DU46IE.js} +4 -4
- package/dist/{bundleWithLocalizedFonts-FH7PHTTX.js → bundleWithLocalizedFonts-VH55VOAL.js} +2 -2
- package/dist/{capture-TFZZSF6F.js → capture-26G2DPSI.js} +83 -41
- package/dist/{capture-XD3P3YQR.js → capture-OGQAEYKO.js} +24 -8
- package/dist/{catalog-4S33QWJJ.js → catalog-RKORTIUE.js} +19 -18
- package/dist/{catch-up-RW7YXXNT.js → catch-up-4OBERRQO.js} +5 -5
- package/dist/{check-XVTRRN4Y.js → check-P2XDN57S.js} +89 -85
- package/dist/{checkBrowser-HZXJ2EDU.js → checkBrowser-NTGJGAEA.js} +42 -42
- package/dist/{chunk-AVWEIOEN.js → chunk-2LBBHMKT.js} +1 -1
- package/dist/{chunk-E6SDW5FV.js → chunk-33RZPZ4K.js} +192 -45
- package/dist/{chunk-6IFXWJDX.js → chunk-3NE7ZYU2.js} +2 -2
- package/dist/{chunk-TQFG7HTI.js → chunk-3RM2ETQT.js} +0 -168
- package/dist/{chunk-PFCFR3KZ.js → chunk-442JNXRM.js} +1 -1
- package/dist/{chunk-6E6CM7WS.js → chunk-4M4EC7JX.js} +19 -12
- package/dist/{chunk-HKCNZITN.js → chunk-4OA4LDTU.js} +2 -2
- package/dist/{chunk-XTFJOR3K.js → chunk-4SFGME7K.js} +1 -1
- package/dist/{chunk-34TXESM7.js → chunk-5FISWJ37.js} +12 -4
- package/dist/{chunk-JYYOAKHS.js → chunk-6IIGT7BX.js} +1 -1
- package/dist/chunk-6TPZSTCL.js +3681 -0
- package/dist/{chunk-P6E4HFFU.js → chunk-6XMFEICO.js} +263 -75
- package/dist/{chunk-6Q6FR4KH.js → chunk-7UYBQ6NF.js} +296 -89
- package/dist/{chunk-BRITLL56.js → chunk-B4P5VDFQ.js} +1 -1
- package/dist/{chunk-U7E736AJ.js → chunk-BFDJ63J5.js} +32 -14
- package/dist/{chunk-WCJGTLPF.js → chunk-BHVFTYSI.js} +6 -3
- package/dist/{chunk-IO7ZIDRP.js → chunk-BT27OYYX.js} +53 -12
- package/dist/{chunk-KFH6UD26.js → chunk-BYK73CR7.js} +4 -4
- package/dist/{chunk-L3JSAB4L.js → chunk-CLOH4LIB.js} +3 -3
- package/dist/{chunk-R7UDXKI3.js → chunk-DF2BHILQ.js} +3 -3
- package/dist/{chunk-246MOR5U.js → chunk-DKSDVDXG.js} +175 -162
- package/dist/{chunk-35RSNI77.js → chunk-F26LCYRY.js} +42 -34
- package/dist/{chunk-5Z63TBTX.js → chunk-FH7WODJH.js} +1 -1
- package/dist/{chunk-NORZWWLK.js → chunk-FVYXDXEV.js} +2 -2
- package/dist/{chunk-YURXPGAM.js → chunk-GNBGPUJ7.js} +6 -8
- package/dist/{chunk-RVCWIIZ7.js → chunk-GV5R5B7Q.js} +1 -1
- package/dist/{chunk-GS6FE3IW.js → chunk-HC7EVDEL.js} +1 -1
- package/dist/{chunk-K2GOFLTX.js → chunk-HLYOEIWM.js} +14 -6
- package/dist/{chunk-XDSOIJC3.js → chunk-HMT2RPZU.js} +6 -6
- package/dist/{chunk-IKVBTDLO.js → chunk-HW4AKJ5F.js} +1 -1
- package/dist/{chunk-OLDDJS3S.js → chunk-I7QGQAZM.js} +8 -8
- package/dist/{chunk-JFKL3WAE.js → chunk-IWFLMU2N.js} +104 -19
- package/dist/{chunk-IHFUKJOR.js → chunk-K2FLNJVB.js} +8 -2
- package/dist/chunk-KJJLA674.js +121 -0
- package/dist/{chunk-XWVGSEUT.js → chunk-KO5QBV73.js} +1 -1
- package/dist/{chunk-INI3TM6I.js → chunk-KQLGTGE5.js} +3 -3
- package/dist/{chunk-E4BSCXMU.js → chunk-LVX6NK36.js} +3 -3
- package/dist/{chunk-BM5PX3DJ.js → chunk-LW6HO6U3.js} +4 -4
- package/dist/{chunk-OZUQF4NB.js → chunk-MQZVBHEY.js} +123 -8
- package/dist/{chunk-IV7EI5E2.js → chunk-N3DQEVSI.js} +2 -2
- package/dist/{chunk-A4KQZXZI.js → chunk-NE55C6S5.js} +4 -2
- package/dist/{chunk-EDYBFSPE.js → chunk-OBXQRJWQ.js} +7 -10
- package/dist/{chunk-RCFCZT5O.js → chunk-OSSHSIMD.js} +1 -1
- package/dist/chunk-P36MALQF.js +15 -0
- package/dist/{chunk-EKA4ZZBI.js → chunk-P7THMINS.js} +3 -3
- package/dist/{chunk-3NBKW2QJ.js → chunk-PAGIICKN.js} +2 -2
- package/dist/{chunk-O3SKIXQK.js → chunk-PJU63L6W.js} +1 -1
- package/dist/{chunk-RPYPW5NN.js → chunk-POLR33RB.js} +20 -13
- package/dist/{chunk-7M4KAPAA.js → chunk-PUGIRFPX.js} +2 -2
- package/dist/{chunk-7XTZVLE6.js → chunk-QFN7NVWM.js} +1 -1
- package/dist/{chunk-D2KNWIQ6.js → chunk-QFSCCQIR.js} +1 -1
- package/dist/{chunk-J5IPIQU2.js → chunk-QRKLPWEX.js} +1 -1
- package/dist/{chunk-N77KD7ZZ.js → chunk-QVYVUCWD.js} +1 -1
- package/dist/{chunk-GK4AIFIH.js → chunk-SDYDNHEE.js} +34 -3
- package/dist/{chunk-2NCHQUPX.js → chunk-SQLK7SJL.js} +1 -1
- package/dist/{chunk-PMRBLBUP.js → chunk-T42U2W2R.js} +14 -2
- package/dist/{chunk-Q65ZQFF2.js → chunk-TAMQYQGJ.js} +1 -1
- package/dist/{chunk-PXSM4HPB.js → chunk-U3X3TPBW.js} +1 -1
- package/dist/{chunk-3A5AAPMP.js → chunk-UICWP23D.js} +1 -1
- package/dist/{chunk-A7YQNIQT.js → chunk-UM2GRYM3.js} +113 -10
- package/dist/{chunk-TC2FBZJZ.js → chunk-VIVBA6E6.js} +2 -2
- package/dist/{chunk-W6HTOVHU.js → chunk-W35EKBS6.js} +2 -2
- package/dist/{chunk-YEIFI443.js → chunk-WPNE5NEP.js} +1 -1
- package/dist/{chunk-WY5OODN5.js → chunk-XONFUK3M.js} +3693 -28
- package/dist/{chunk-IYFKBFTW.js → chunk-Y6QL2LGO.js} +8 -5
- package/dist/{chunk-THXFSPLV.js → chunk-ZIRIDSDB.js} +1 -1
- package/dist/chunk-ZLW2V65P.js +209 -0
- package/dist/{chunk-4BB7V6AI.js → chunk-ZQQ3SEIE.js} +33 -32
- package/dist/{clean-L2E4VD57.js → clean-YHGPY33K.js} +23 -23
- package/dist/cli.js +57 -159
- package/dist/{cloud-IDUQRYLO.js → cloud-DOFI5ISR.js} +4 -4
- package/dist/{cloudrun-R3JXWXGG.js → cloudrun-KTZ4XDHL.js} +13 -12
- package/dist/commands/contrast-audit.browser.js +60 -4
- package/dist/commands/layout-audit.browser.js +88 -20
- package/dist/{compare-VYBWSP3Y.js → compare-SMMIZN2C.js} +37 -37
- package/dist/{compiler-ACHWOU5N.js → compiler-TEXQWW6N.js} +14 -11
- package/dist/{component-PYYV2V3F.js → component-B3GCNGSS.js} +5 -5
- package/dist/{compositions-B5GQSXH7.js → compositions-OQNZZTKF.js} +38 -34
- package/dist/{delete-EAX2U3WI.js → delete-EL5LVSEP.js} +6 -6
- package/dist/{deterministicFonts-F6WIVL2W.js → deterministicFonts-U2BIMGPG.js} +3 -3
- package/dist/{dist-NZSQCYOF.js → dist-5UVIRMSM.js} +7 -7
- package/dist/{dist-ROUDWGLO.js → dist-XN234YFQ.js} +41 -39
- package/dist/{doctor-PJX7MLFG.js → doctor-UOL3OI2A.js} +17 -17
- package/dist/{dom-IROKGVJI.js → dom-37K6YOH4.js} +2 -2
- package/dist/{events-SBC54MHO.js → events-K2DB2PBC.js} +2 -2
- package/dist/{events-YFFXKAQQ.js → events-NIZBS6S7.js} +3 -3
- package/dist/{feedback-UETLWREV.js → feedback-QMP4E6L7.js} +16 -15
- package/dist/{figma-QDSJPIRW.js → figma-2AUJRNVC.js} +3 -3
- package/dist/fontLocalizeCli.js +18 -18
- package/dist/{get-B5TS6C7H.js → get-P5NC7SRM.js} +6 -6
- package/dist/{gpuPolicy-LYOVBAJP.js → gpuPolicy-7N5MCE2G.js} +15 -15
- package/dist/{grade-compare-LBIHMAUN.js → grade-compare-HV5AFZ6P.js} +37 -37
- package/dist/{help-XBP6A6LT.js → help-3TSTXBLN.js} +1 -1
- package/dist/{history-2S42ZXKL.js → history-D65XFJ6D.js} +6 -6
- package/dist/hyperframe-runtime.js +25 -25
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +25 -25
- package/dist/hyperframes-player.global.js +3 -3
- package/dist/hyperframes-slideshow.global.js +23 -23
- package/dist/{info-I2VDAWT7.js → info-TXV7MLFO.js} +17 -16
- package/dist/{init-BGHSDODI.js → init-OSDMJZJV.js} +38 -38
- package/dist/{inspect-MZK5B5RP.js → inspect-RQQSAYIJ.js} +38 -38
- package/dist/{installer-LL4QAKFW.js → installer-CDOB32HE.js} +11 -10
- package/dist/{keyframes-2EBF7OSS.js → keyframes-V75Q6GRM.js} +10 -10
- package/dist/{lambda-XKFPAOFE.js → lambda-RODV4RCX.js} +12 -11
- package/dist/{layout-TP5ERKEF.js → layout-IZAI5SFC.js} +38 -38
- package/dist/{lint-FQ6CEI7E.js → lint-PLXOXY5R.js} +14 -14
- package/dist/{lintProject-LM3XZRPZ.js → lintProject-OQ6H6XBR.js} +7 -7
- package/dist/{list-FRNUJXZ3.js → list-BQBPNKDZ.js} +7 -7
- package/dist/{login-C25QU3BQ.js → login-NP6F4FHC.js} +20 -24
- package/dist/{logout-GJXZQKOA.js → logout-B4KS4A7S.js} +6 -6
- package/dist/{manager-DXB7JDHU.js → manager-GXYF4AVO.js} +2 -2
- package/dist/{manager-524RPYO7.js → manager-RFZNG5YT.js} +2 -2
- package/dist/{media-treatment-DCANGWSV.js → media-treatment-PXGMZ4A4.js} +55 -34
- package/dist/{models-GOD6ARB3.js → models-CEZM6XZ7.js} +17 -17
- package/dist/{motionShot-FSKETANX.js → motionShot-R4GHYWYM.js} +25 -25
- package/dist/{normalize-IGLHCWTF.js → normalize-H6KUHHEI.js} +18 -7
- package/dist/{normalize-audio-C2IM7OID.js → normalize-audio-MQ7NFCOV.js} +10 -6
- package/dist/{open-VVISXIII.js → open-AKQTGNXF.js} +5 -5
- package/dist/{pipeline-7YHZPYIS.js → pipeline-SYJYP2RM.js} +17 -17
- package/dist/{play-DSELK7G3.js → play-NBH4B7PL.js} +31 -30
- package/dist/{present-N72YFDKP.js → present-XAX55CFS.js} +26 -26
- package/dist/{preview-XTYN4NJ2.js → preview-OLANKNFA.js} +26 -26
- package/dist/{producer-NDCU3MHK.js → producer-Q6YNZZUJ.js} +1 -1
- package/dist/{projectConfig-MH4QU4AC.js → projectConfig-EM26P45P.js} +13 -12
- package/dist/{publication-KUSHI5MG.js → publication-OXWJZKSX.js} +8 -7
- package/dist/{publish-3XEEFWMF.js → publish-4VBWP2UB.js} +23 -22
- package/dist/{refresh-MFITBIKV.js → refresh-PVHBEABE.js} +2 -2
- package/dist/{remove-background-2QKJ7XOD.js → remove-background-REB7427G.js} +19 -19
- package/dist/{render-75E342ZU.js → render-3CVZ2SZG.js} +13 -12
- package/dist/{render-S73DW4KK.js → render-K25YOG3M.js} +22 -21
- package/dist/{render-2DVYTVLQ.js → render-TSE75QUL.js} +35 -35
- package/dist/{render-batch-YURBS54Q.js → render-batch-GGUOK3DS.js} +13 -12
- package/dist/{renderCancellation-373ASJTO.js → renderCancellation-PZRWB53I.js} +15 -15
- package/dist/renderSetupWorker.js +7 -7
- package/dist/{resolver-FE3GBZ4T.js → resolver-S5VK6UCB.js} +10 -9
- package/dist/{screenshotCapture-ECBTLCU6.js → screenshotCapture-TEUIWXWN.js} +53 -33
- package/dist/{sherpa-B2D3AGP6.js → sherpa-LVIUEAGF.js} +18 -18
- package/dist/skills/hyperframes-cli/references/cloud.md +1 -1
- package/dist/skills/hyperframes-cli/references/doctor-browser.md +24 -1
- package/dist/skills/media-use/references/grading.md +4 -2
- package/dist/skills/media-use/scripts/lib/cache.mjs +28 -14
- package/dist/skills/media-use/scripts/lib/cache.test.mjs +110 -0
- package/dist/skills/media-use/scripts/lib/duck.mjs +2 -1
- package/dist/skills/media-use/scripts/lib/duck.test.mjs +87 -0
- package/dist/skills/media-use/scripts/lib/probe.mjs +6 -1
- package/dist/skills/media-use/scripts/lib/probe.test.mjs +73 -0
- package/dist/skills/media-use/scripts/lib/words.mjs +1 -1
- package/dist/{skills-ICJ22CZZ.js → skills-I65FU5HD.js} +5 -5
- package/dist/{skillsUpdateCheck-GXZN56I5.js → skillsUpdateCheck-J57RNNIV.js} +3 -3
- package/dist/{slideshow-EJ4IMY6P.js → slideshow-4OJEPWNZ.js} +1 -1
- package/dist/{snapshot-XHKOAWF4.js → snapshot-YROOGY22.js} +42 -39
- package/dist/{src-I7UC3JTL.js → src-JO5JOV7Y.js} +16 -14
- package/dist/{src-74PFDTDX.js → src-X426BZAG.js} +17 -17
- package/dist/{staticProjectServer-2DGKD6TF.js → staticProjectServer-5VMBS262.js} +23 -23
- package/dist/{status-JA6SKQVH.js → status-LXPGSSKY.js} +6 -4
- package/dist/studio/assets/{hyperframes-player-5Vx2AiUz.js → hyperframes-player-BXSuksFh.js} +3 -3
- package/dist/studio/assets/{index-BAnh7cSQ.js → index-BgOVCqjo.js} +1 -1
- package/dist/studio/assets/{index-P8fgj_Xa.js → index-FgyO_5Kv.js} +1 -1
- package/dist/studio/assets/{index-C0thd4eM.js → index-J7jpL4pj.js} +157 -157
- package/dist/studio/index.html +1 -1
- package/dist/studio/index.js +148 -175
- package/dist/studio/index.js.map +1 -1
- package/dist/{studio-api-PROBO7JG.js → studio-api-VRBZUGAE.js} +22 -18
- package/dist/{studioServer-ID6UV2NE.js → studioServer-DBNKZ6I6.js} +50 -50
- package/dist/{synthesize-77PTU6C5.js → synthesize-C3IWDAXF.js} +2 -2
- package/dist/{telemetry-65LFHIWH.js → telemetry-CXAX3TO3.js} +3 -3
- package/dist/{timeline-6UV3JJXD.js → timeline-VQ34WH7J.js} +91 -70
- package/dist/{tokens-HIL4TZXI.js → tokens-62R7VFAZ.js} +4 -4
- package/dist/{transcribe-TIO6W3EQ.js → transcribe-7KR7IPJA.js} +18 -18
- package/dist/{transcribe-V7F6QDSN.js → transcribe-XOHPPL2O.js} +11 -11
- package/dist/{tts-TOHSPWEG.js → tts-MUV42JXT.js} +6 -6
- package/dist/{updateCheck-GZELANMA.js → updateCheck-POYNH3B5.js} +2 -2
- package/dist/{upgrade-BX3KDDZJ.js → upgrade-NBNOT7J2.js} +2 -2
- package/dist/{urlDownloader-R76OHFIE.js → urlDownloader-3NS63A7B.js} +14 -14
- package/dist/{validate-7UX4I443.js → validate-Y2QDHAEP.js} +40 -28
- package/dist/{video-RVGYEFQU.js → video-SJDMTSTL.js} +15 -15
- package/package.json +1 -1
- package/dist/chunk-24OWOBQH.js +0 -3656
- package/dist/chunk-SYKKFAUW.js +0 -3711
- /package/dist/{chunk-HBBJFK6I.js → chunk-APDLWWFG.js} +0 -0
|
@@ -4,9 +4,6 @@ import { dirname as __hf_dirname } from "node:path";
|
|
|
4
4
|
var require = __hf_createRequire(import.meta.url);
|
|
5
5
|
var __filename = __hf_fileURLToPath(import.meta.url);
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
|
-
import {
|
|
8
|
-
require_dist
|
|
9
|
-
} from "./chunk-24OWOBQH.js";
|
|
10
7
|
import {
|
|
11
8
|
cleanAssetUrl,
|
|
12
9
|
collectSubCompositionSrcs,
|
|
@@ -18,7 +15,7 @@ import {
|
|
|
18
15
|
resolveExistingLocalAsset,
|
|
19
16
|
resolveLocalAssetCandidates,
|
|
20
17
|
resolveProjectRelativeSrc
|
|
21
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-IWFLMU2N.js";
|
|
22
19
|
import {
|
|
23
20
|
COMPOSITION_VARIABLE_TYPES,
|
|
24
21
|
FONT_ALIAS_KEYS,
|
|
@@ -28,7 +25,7 @@ import {
|
|
|
28
25
|
extractMediaSrcMutations,
|
|
29
26
|
isSafeMediaUrl,
|
|
30
27
|
resolveAliasDisplayName
|
|
31
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-APDLWWFG.js";
|
|
32
29
|
import {
|
|
33
30
|
findFfBinary
|
|
34
31
|
} from "./chunk-PJ3HDUCY.js";
|
|
@@ -36,17 +33,19 @@ import {
|
|
|
36
33
|
COMPOSITION_ATTRIBUTES,
|
|
37
34
|
checkSubCompositionUsability,
|
|
38
35
|
parseNumeric,
|
|
39
|
-
readAuthoredDurationSeconds,
|
|
40
36
|
readClipTiming,
|
|
37
|
+
validateColorGradingContract
|
|
38
|
+
} from "./chunk-3RM2ETQT.js";
|
|
39
|
+
import {
|
|
40
|
+
readAuthoredDurationSeconds,
|
|
41
41
|
readDataDurationSeconds,
|
|
42
42
|
resolveMediaDuration,
|
|
43
|
-
rewriteAssetPath
|
|
44
|
-
|
|
45
|
-
} from "./chunk-TQFG7HTI.js";
|
|
43
|
+
rewriteAssetPath
|
|
44
|
+
} from "./chunk-ZLW2V65P.js";
|
|
46
45
|
import {
|
|
47
46
|
Parser,
|
|
48
47
|
parseHTML
|
|
49
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-SDYDNHEE.js";
|
|
50
49
|
import {
|
|
51
50
|
parse,
|
|
52
51
|
simple
|
|
@@ -55,11 +54,3650 @@ import {
|
|
|
55
54
|
isSceneLikeCompositionId,
|
|
56
55
|
parseSlideshowManifest,
|
|
57
56
|
resolveSlideshow
|
|
58
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-T42U2W2R.js";
|
|
59
58
|
import {
|
|
59
|
+
__commonJS,
|
|
60
|
+
__require,
|
|
60
61
|
__toESM
|
|
61
62
|
} from "./chunk-M2WBOQ2Q.js";
|
|
62
63
|
|
|
64
|
+
// ../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/util/unesc.js
|
|
65
|
+
var require_unesc = __commonJS({
|
|
66
|
+
"../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/util/unesc.js"(exports) {
|
|
67
|
+
"use strict";
|
|
68
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
69
|
+
exports.default = unesc;
|
|
70
|
+
function gobbleHex(str) {
|
|
71
|
+
var lower = str.toLowerCase();
|
|
72
|
+
var hex = "";
|
|
73
|
+
var spaceTerminated = false;
|
|
74
|
+
for (var i = 0; i < 6 && lower[i] !== void 0; i++) {
|
|
75
|
+
var code = lower.charCodeAt(i);
|
|
76
|
+
var valid = code >= 97 && code <= 102 || code >= 48 && code <= 57;
|
|
77
|
+
spaceTerminated = code === 32;
|
|
78
|
+
if (!valid) {
|
|
79
|
+
break;
|
|
80
|
+
}
|
|
81
|
+
hex += lower[i];
|
|
82
|
+
}
|
|
83
|
+
if (hex.length === 0) {
|
|
84
|
+
return void 0;
|
|
85
|
+
}
|
|
86
|
+
var codePoint = parseInt(hex, 16);
|
|
87
|
+
var isSurrogate = codePoint >= 55296 && codePoint <= 57343;
|
|
88
|
+
if (isSurrogate || codePoint === 0 || codePoint > 1114111) {
|
|
89
|
+
return ["\uFFFD", hex.length + (spaceTerminated ? 1 : 0)];
|
|
90
|
+
}
|
|
91
|
+
return [String.fromCodePoint(codePoint), hex.length + (spaceTerminated ? 1 : 0)];
|
|
92
|
+
}
|
|
93
|
+
var CONTAINS_ESCAPE = /\\/;
|
|
94
|
+
function unesc(str) {
|
|
95
|
+
var needToProcess = CONTAINS_ESCAPE.test(str);
|
|
96
|
+
if (!needToProcess) {
|
|
97
|
+
return str;
|
|
98
|
+
}
|
|
99
|
+
var ret = "";
|
|
100
|
+
for (var i = 0; i < str.length; i++) {
|
|
101
|
+
if (str[i] === "\\") {
|
|
102
|
+
var gobbled = gobbleHex(str.slice(i + 1, i + 7));
|
|
103
|
+
if (gobbled !== void 0) {
|
|
104
|
+
ret += gobbled[0];
|
|
105
|
+
i += gobbled[1];
|
|
106
|
+
continue;
|
|
107
|
+
}
|
|
108
|
+
if (str[i + 1] === "\\") {
|
|
109
|
+
ret += "\\";
|
|
110
|
+
i++;
|
|
111
|
+
continue;
|
|
112
|
+
}
|
|
113
|
+
if (str.length === i + 1) {
|
|
114
|
+
ret += str[i];
|
|
115
|
+
}
|
|
116
|
+
continue;
|
|
117
|
+
}
|
|
118
|
+
ret += str[i];
|
|
119
|
+
}
|
|
120
|
+
return ret;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
// ../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/util/getProp.js
|
|
126
|
+
var require_getProp = __commonJS({
|
|
127
|
+
"../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/util/getProp.js"(exports) {
|
|
128
|
+
"use strict";
|
|
129
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
130
|
+
exports.default = getProp;
|
|
131
|
+
function getProp(obj) {
|
|
132
|
+
var props = [];
|
|
133
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
134
|
+
props[_i - 1] = arguments[_i];
|
|
135
|
+
}
|
|
136
|
+
while (props.length > 0) {
|
|
137
|
+
var prop = props.shift();
|
|
138
|
+
if (!obj[prop]) {
|
|
139
|
+
return void 0;
|
|
140
|
+
}
|
|
141
|
+
obj = obj[prop];
|
|
142
|
+
}
|
|
143
|
+
return obj;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
// ../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/util/ensureObject.js
|
|
149
|
+
var require_ensureObject = __commonJS({
|
|
150
|
+
"../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/util/ensureObject.js"(exports) {
|
|
151
|
+
"use strict";
|
|
152
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
153
|
+
exports.default = ensureObject;
|
|
154
|
+
function ensureObject(obj) {
|
|
155
|
+
var props = [];
|
|
156
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
157
|
+
props[_i - 1] = arguments[_i];
|
|
158
|
+
}
|
|
159
|
+
while (props.length > 0) {
|
|
160
|
+
var prop = props.shift();
|
|
161
|
+
if (!obj[prop]) {
|
|
162
|
+
obj[prop] = {};
|
|
163
|
+
}
|
|
164
|
+
obj = obj[prop];
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
// ../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/util/stripComments.js
|
|
171
|
+
var require_stripComments = __commonJS({
|
|
172
|
+
"../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/util/stripComments.js"(exports) {
|
|
173
|
+
"use strict";
|
|
174
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
175
|
+
exports.default = stripComments;
|
|
176
|
+
function stripComments(str) {
|
|
177
|
+
var s = "";
|
|
178
|
+
var commentStart = str.indexOf("/*");
|
|
179
|
+
var lastEnd = 0;
|
|
180
|
+
while (commentStart >= 0) {
|
|
181
|
+
s = s + str.slice(lastEnd, commentStart);
|
|
182
|
+
var commentEnd = str.indexOf("*/", commentStart + 2);
|
|
183
|
+
if (commentEnd < 0) {
|
|
184
|
+
return s;
|
|
185
|
+
}
|
|
186
|
+
lastEnd = commentEnd + 2;
|
|
187
|
+
commentStart = str.indexOf("/*", lastEnd);
|
|
188
|
+
}
|
|
189
|
+
s = s + str.slice(lastEnd);
|
|
190
|
+
return s;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
});
|
|
194
|
+
|
|
195
|
+
// ../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/util/maxNestingDepth.js
|
|
196
|
+
var require_maxNestingDepth = __commonJS({
|
|
197
|
+
"../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/util/maxNestingDepth.js"(exports) {
|
|
198
|
+
"use strict";
|
|
199
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
200
|
+
exports.MAX_NESTING_DEPTH = void 0;
|
|
201
|
+
exports.default = resolveMaxNestingDepth;
|
|
202
|
+
exports.MAX_NESTING_DEPTH = 256;
|
|
203
|
+
function resolveMaxNestingDepth(value) {
|
|
204
|
+
return Number.isSafeInteger(value) && value >= 0 ? value : exports.MAX_NESTING_DEPTH;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
});
|
|
208
|
+
|
|
209
|
+
// ../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/util/index.js
|
|
210
|
+
var require_util = __commonJS({
|
|
211
|
+
"../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/util/index.js"(exports) {
|
|
212
|
+
"use strict";
|
|
213
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
214
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
215
|
+
};
|
|
216
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
217
|
+
exports.MAX_NESTING_DEPTH = exports.resolveMaxNestingDepth = exports.stripComments = exports.ensureObject = exports.getProp = exports.unesc = void 0;
|
|
218
|
+
var unesc_1 = require_unesc();
|
|
219
|
+
Object.defineProperty(exports, "unesc", { enumerable: true, get: function() {
|
|
220
|
+
return __importDefault(unesc_1).default;
|
|
221
|
+
} });
|
|
222
|
+
var getProp_1 = require_getProp();
|
|
223
|
+
Object.defineProperty(exports, "getProp", { enumerable: true, get: function() {
|
|
224
|
+
return __importDefault(getProp_1).default;
|
|
225
|
+
} });
|
|
226
|
+
var ensureObject_1 = require_ensureObject();
|
|
227
|
+
Object.defineProperty(exports, "ensureObject", { enumerable: true, get: function() {
|
|
228
|
+
return __importDefault(ensureObject_1).default;
|
|
229
|
+
} });
|
|
230
|
+
var stripComments_1 = require_stripComments();
|
|
231
|
+
Object.defineProperty(exports, "stripComments", { enumerable: true, get: function() {
|
|
232
|
+
return __importDefault(stripComments_1).default;
|
|
233
|
+
} });
|
|
234
|
+
var maxNestingDepth_1 = require_maxNestingDepth();
|
|
235
|
+
Object.defineProperty(exports, "resolveMaxNestingDepth", { enumerable: true, get: function() {
|
|
236
|
+
return __importDefault(maxNestingDepth_1).default;
|
|
237
|
+
} });
|
|
238
|
+
Object.defineProperty(exports, "MAX_NESTING_DEPTH", { enumerable: true, get: function() {
|
|
239
|
+
return maxNestingDepth_1.MAX_NESTING_DEPTH;
|
|
240
|
+
} });
|
|
241
|
+
}
|
|
242
|
+
});
|
|
243
|
+
|
|
244
|
+
// ../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/node.js
|
|
245
|
+
var require_node = __commonJS({
|
|
246
|
+
"../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/node.js"(exports) {
|
|
247
|
+
"use strict";
|
|
248
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
249
|
+
var util_1 = require_util();
|
|
250
|
+
var cloneNode = function(obj, parent, depth) {
|
|
251
|
+
if (depth === void 0) {
|
|
252
|
+
depth = 0;
|
|
253
|
+
}
|
|
254
|
+
if (depth > util_1.MAX_NESTING_DEPTH) {
|
|
255
|
+
throw new Error("Cannot clone selector: nesting depth exceeds the maximum of ".concat(util_1.MAX_NESTING_DEPTH, "."));
|
|
256
|
+
}
|
|
257
|
+
if (typeof obj !== "object" || obj === null) {
|
|
258
|
+
return obj;
|
|
259
|
+
}
|
|
260
|
+
var cloned = new obj.constructor();
|
|
261
|
+
for (var i in obj) {
|
|
262
|
+
if (!obj.hasOwnProperty(i)) {
|
|
263
|
+
continue;
|
|
264
|
+
}
|
|
265
|
+
var value = obj[i];
|
|
266
|
+
var type = typeof value;
|
|
267
|
+
if (i === "parent" && type === "object") {
|
|
268
|
+
if (parent) {
|
|
269
|
+
cloned[i] = parent;
|
|
270
|
+
}
|
|
271
|
+
} else if (value instanceof Array) {
|
|
272
|
+
cloned[i] = value.map(function(j) {
|
|
273
|
+
return cloneNode(j, cloned, depth + 1);
|
|
274
|
+
});
|
|
275
|
+
} else {
|
|
276
|
+
cloned[i] = cloneNode(value, cloned, depth + 1);
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
return cloned;
|
|
280
|
+
};
|
|
281
|
+
var Node = (
|
|
282
|
+
/** @class */
|
|
283
|
+
(function() {
|
|
284
|
+
function Node2(opts) {
|
|
285
|
+
if (opts === void 0) {
|
|
286
|
+
opts = {};
|
|
287
|
+
}
|
|
288
|
+
Object.assign(this, opts);
|
|
289
|
+
this.spaces = this.spaces || {};
|
|
290
|
+
this.spaces.before = this.spaces.before || "";
|
|
291
|
+
this.spaces.after = this.spaces.after || "";
|
|
292
|
+
}
|
|
293
|
+
Node2.prototype.remove = function() {
|
|
294
|
+
if (this.parent) {
|
|
295
|
+
this.parent.removeChild(this);
|
|
296
|
+
}
|
|
297
|
+
this.parent = void 0;
|
|
298
|
+
return this;
|
|
299
|
+
};
|
|
300
|
+
Node2.prototype.replaceWith = function() {
|
|
301
|
+
if (this.parent) {
|
|
302
|
+
for (var index in arguments) {
|
|
303
|
+
this.parent.insertBefore(this, arguments[index]);
|
|
304
|
+
}
|
|
305
|
+
this.remove();
|
|
306
|
+
}
|
|
307
|
+
return this;
|
|
308
|
+
};
|
|
309
|
+
Node2.prototype.next = function() {
|
|
310
|
+
return this.parent.at(this.parent.index(this) + 1);
|
|
311
|
+
};
|
|
312
|
+
Node2.prototype.prev = function() {
|
|
313
|
+
return this.parent.at(this.parent.index(this) - 1);
|
|
314
|
+
};
|
|
315
|
+
Node2.prototype.clone = function(overrides) {
|
|
316
|
+
if (overrides === void 0) {
|
|
317
|
+
overrides = {};
|
|
318
|
+
}
|
|
319
|
+
var cloned = cloneNode(this);
|
|
320
|
+
for (var name in overrides) {
|
|
321
|
+
cloned[name] = overrides[name];
|
|
322
|
+
}
|
|
323
|
+
return cloned;
|
|
324
|
+
};
|
|
325
|
+
Node2.prototype.appendToPropertyAndEscape = function(name, value, valueEscaped) {
|
|
326
|
+
if (!this.raws) {
|
|
327
|
+
this.raws = {};
|
|
328
|
+
}
|
|
329
|
+
var originalValue = this[name];
|
|
330
|
+
var originalEscaped = this.raws[name];
|
|
331
|
+
this[name] = originalValue + value;
|
|
332
|
+
if (originalEscaped || valueEscaped !== value) {
|
|
333
|
+
this.raws[name] = (originalEscaped || originalValue) + valueEscaped;
|
|
334
|
+
} else {
|
|
335
|
+
delete this.raws[name];
|
|
336
|
+
}
|
|
337
|
+
};
|
|
338
|
+
Node2.prototype.setPropertyAndEscape = function(name, value, valueEscaped) {
|
|
339
|
+
if (!this.raws) {
|
|
340
|
+
this.raws = {};
|
|
341
|
+
}
|
|
342
|
+
this[name] = value;
|
|
343
|
+
this.raws[name] = valueEscaped;
|
|
344
|
+
};
|
|
345
|
+
Node2.prototype.setPropertyWithoutEscape = function(name, value) {
|
|
346
|
+
this[name] = value;
|
|
347
|
+
if (this.raws) {
|
|
348
|
+
delete this.raws[name];
|
|
349
|
+
}
|
|
350
|
+
};
|
|
351
|
+
Node2.prototype.isAtPosition = function(line, column) {
|
|
352
|
+
if (this.source && this.source.start && this.source.end) {
|
|
353
|
+
if (this.source.start.line > line) {
|
|
354
|
+
return false;
|
|
355
|
+
}
|
|
356
|
+
if (this.source.end.line < line) {
|
|
357
|
+
return false;
|
|
358
|
+
}
|
|
359
|
+
if (this.source.start.line === line && this.source.start.column > column) {
|
|
360
|
+
return false;
|
|
361
|
+
}
|
|
362
|
+
if (this.source.end.line === line && this.source.end.column < column) {
|
|
363
|
+
return false;
|
|
364
|
+
}
|
|
365
|
+
return true;
|
|
366
|
+
}
|
|
367
|
+
return void 0;
|
|
368
|
+
};
|
|
369
|
+
Node2.prototype.stringifyProperty = function(name) {
|
|
370
|
+
return this.raws && this.raws[name] || this[name];
|
|
371
|
+
};
|
|
372
|
+
Object.defineProperty(Node2.prototype, "rawSpaceBefore", {
|
|
373
|
+
get: function() {
|
|
374
|
+
var rawSpace = this.raws && this.raws.spaces && this.raws.spaces.before;
|
|
375
|
+
if (rawSpace === void 0) {
|
|
376
|
+
rawSpace = this.spaces && this.spaces.before;
|
|
377
|
+
}
|
|
378
|
+
return rawSpace || "";
|
|
379
|
+
},
|
|
380
|
+
set: function(raw) {
|
|
381
|
+
(0, util_1.ensureObject)(this, "raws", "spaces");
|
|
382
|
+
this.raws.spaces.before = raw;
|
|
383
|
+
},
|
|
384
|
+
enumerable: false,
|
|
385
|
+
configurable: true
|
|
386
|
+
});
|
|
387
|
+
Object.defineProperty(Node2.prototype, "rawSpaceAfter", {
|
|
388
|
+
get: function() {
|
|
389
|
+
var rawSpace = this.raws && this.raws.spaces && this.raws.spaces.after;
|
|
390
|
+
if (rawSpace === void 0) {
|
|
391
|
+
rawSpace = this.spaces.after;
|
|
392
|
+
}
|
|
393
|
+
return rawSpace || "";
|
|
394
|
+
},
|
|
395
|
+
set: function(raw) {
|
|
396
|
+
(0, util_1.ensureObject)(this, "raws", "spaces");
|
|
397
|
+
this.raws.spaces.after = raw;
|
|
398
|
+
},
|
|
399
|
+
enumerable: false,
|
|
400
|
+
configurable: true
|
|
401
|
+
});
|
|
402
|
+
Node2.prototype.valueToString = function() {
|
|
403
|
+
return String(this.stringifyProperty("value"));
|
|
404
|
+
};
|
|
405
|
+
Node2.prototype.toString = function() {
|
|
406
|
+
return [this.rawSpaceBefore, this.valueToString(), this.rawSpaceAfter].join("");
|
|
407
|
+
};
|
|
408
|
+
Node2.prototype._stringify = function() {
|
|
409
|
+
return this.toString();
|
|
410
|
+
};
|
|
411
|
+
return Node2;
|
|
412
|
+
})()
|
|
413
|
+
);
|
|
414
|
+
exports.default = Node;
|
|
415
|
+
}
|
|
416
|
+
});
|
|
417
|
+
|
|
418
|
+
// ../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/types.js
|
|
419
|
+
var require_types = __commonJS({
|
|
420
|
+
"../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/types.js"(exports) {
|
|
421
|
+
"use strict";
|
|
422
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
423
|
+
exports.UNIVERSAL = exports.ATTRIBUTE = exports.CLASS = exports.COMBINATOR = exports.COMMENT = exports.ID = exports.NESTING = exports.PSEUDO = exports.ROOT = exports.SELECTOR = exports.STRING = exports.TAG = void 0;
|
|
424
|
+
exports.TAG = "tag";
|
|
425
|
+
exports.STRING = "string";
|
|
426
|
+
exports.SELECTOR = "selector";
|
|
427
|
+
exports.ROOT = "root";
|
|
428
|
+
exports.PSEUDO = "pseudo";
|
|
429
|
+
exports.NESTING = "nesting";
|
|
430
|
+
exports.ID = "id";
|
|
431
|
+
exports.COMMENT = "comment";
|
|
432
|
+
exports.COMBINATOR = "combinator";
|
|
433
|
+
exports.CLASS = "class";
|
|
434
|
+
exports.ATTRIBUTE = "attribute";
|
|
435
|
+
exports.UNIVERSAL = "universal";
|
|
436
|
+
}
|
|
437
|
+
});
|
|
438
|
+
|
|
439
|
+
// ../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/container.js
|
|
440
|
+
var require_container = __commonJS({
|
|
441
|
+
"../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/container.js"(exports) {
|
|
442
|
+
"use strict";
|
|
443
|
+
var __extends = exports && exports.__extends || /* @__PURE__ */ (function() {
|
|
444
|
+
var extendStatics = function(d, b) {
|
|
445
|
+
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
|
|
446
|
+
d2.__proto__ = b2;
|
|
447
|
+
} || function(d2, b2) {
|
|
448
|
+
for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p];
|
|
449
|
+
};
|
|
450
|
+
return extendStatics(d, b);
|
|
451
|
+
};
|
|
452
|
+
return function(d, b) {
|
|
453
|
+
if (typeof b !== "function" && b !== null)
|
|
454
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
455
|
+
extendStatics(d, b);
|
|
456
|
+
function __() {
|
|
457
|
+
this.constructor = d;
|
|
458
|
+
}
|
|
459
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
460
|
+
};
|
|
461
|
+
})();
|
|
462
|
+
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
463
|
+
if (k2 === void 0) k2 = k;
|
|
464
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
465
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
466
|
+
desc = { enumerable: true, get: function() {
|
|
467
|
+
return m[k];
|
|
468
|
+
} };
|
|
469
|
+
}
|
|
470
|
+
Object.defineProperty(o, k2, desc);
|
|
471
|
+
}) : (function(o, m, k, k2) {
|
|
472
|
+
if (k2 === void 0) k2 = k;
|
|
473
|
+
o[k2] = m[k];
|
|
474
|
+
}));
|
|
475
|
+
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) {
|
|
476
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
477
|
+
}) : function(o, v) {
|
|
478
|
+
o["default"] = v;
|
|
479
|
+
});
|
|
480
|
+
var __importStar = exports && exports.__importStar || /* @__PURE__ */ (function() {
|
|
481
|
+
var ownKeys = function(o) {
|
|
482
|
+
ownKeys = Object.getOwnPropertyNames || function(o2) {
|
|
483
|
+
var ar = [];
|
|
484
|
+
for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k;
|
|
485
|
+
return ar;
|
|
486
|
+
};
|
|
487
|
+
return ownKeys(o);
|
|
488
|
+
};
|
|
489
|
+
return function(mod) {
|
|
490
|
+
if (mod && mod.__esModule) return mod;
|
|
491
|
+
var result = {};
|
|
492
|
+
if (mod != null) {
|
|
493
|
+
for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
494
|
+
}
|
|
495
|
+
__setModuleDefault(result, mod);
|
|
496
|
+
return result;
|
|
497
|
+
};
|
|
498
|
+
})();
|
|
499
|
+
var __values = exports && exports.__values || function(o) {
|
|
500
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
501
|
+
if (m) return m.call(o);
|
|
502
|
+
if (o && typeof o.length === "number") return {
|
|
503
|
+
next: function() {
|
|
504
|
+
if (o && i >= o.length) o = void 0;
|
|
505
|
+
return { value: o && o[i++], done: !o };
|
|
506
|
+
}
|
|
507
|
+
};
|
|
508
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
509
|
+
};
|
|
510
|
+
var __read = exports && exports.__read || function(o, n) {
|
|
511
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
512
|
+
if (!m) return o;
|
|
513
|
+
var i = m.call(o), r, ar = [], e;
|
|
514
|
+
try {
|
|
515
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
516
|
+
} catch (error) {
|
|
517
|
+
e = { error };
|
|
518
|
+
} finally {
|
|
519
|
+
try {
|
|
520
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
521
|
+
} finally {
|
|
522
|
+
if (e) throw e.error;
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
return ar;
|
|
526
|
+
};
|
|
527
|
+
var __spreadArray = exports && exports.__spreadArray || function(to, from, pack) {
|
|
528
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
529
|
+
if (ar || !(i in from)) {
|
|
530
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
531
|
+
ar[i] = from[i];
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
535
|
+
};
|
|
536
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
537
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
538
|
+
};
|
|
539
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
540
|
+
var util_1 = require_util();
|
|
541
|
+
var node_1 = __importDefault(require_node());
|
|
542
|
+
var types = __importStar(require_types());
|
|
543
|
+
var Container = (
|
|
544
|
+
/** @class */
|
|
545
|
+
(function(_super) {
|
|
546
|
+
__extends(Container2, _super);
|
|
547
|
+
function Container2(opts) {
|
|
548
|
+
var _this = _super.call(this, opts) || this;
|
|
549
|
+
if (!_this.nodes) {
|
|
550
|
+
_this.nodes = [];
|
|
551
|
+
}
|
|
552
|
+
return _this;
|
|
553
|
+
}
|
|
554
|
+
Container2.prototype.append = function(selector) {
|
|
555
|
+
selector.parent = this;
|
|
556
|
+
this.nodes.push(selector);
|
|
557
|
+
return this;
|
|
558
|
+
};
|
|
559
|
+
Container2.prototype.prepend = function(selector) {
|
|
560
|
+
selector.parent = this;
|
|
561
|
+
this.nodes.unshift(selector);
|
|
562
|
+
for (var id in this.indexes) {
|
|
563
|
+
this.indexes[id]++;
|
|
564
|
+
}
|
|
565
|
+
return this;
|
|
566
|
+
};
|
|
567
|
+
Container2.prototype.at = function(index) {
|
|
568
|
+
return this.nodes[index];
|
|
569
|
+
};
|
|
570
|
+
Container2.prototype.index = function(child) {
|
|
571
|
+
if (typeof child === "number") {
|
|
572
|
+
return child;
|
|
573
|
+
}
|
|
574
|
+
return this.nodes.indexOf(child);
|
|
575
|
+
};
|
|
576
|
+
Object.defineProperty(Container2.prototype, "first", {
|
|
577
|
+
get: function() {
|
|
578
|
+
return this.at(0);
|
|
579
|
+
},
|
|
580
|
+
enumerable: false,
|
|
581
|
+
configurable: true
|
|
582
|
+
});
|
|
583
|
+
Object.defineProperty(Container2.prototype, "last", {
|
|
584
|
+
get: function() {
|
|
585
|
+
return this.at(this.length - 1);
|
|
586
|
+
},
|
|
587
|
+
enumerable: false,
|
|
588
|
+
configurable: true
|
|
589
|
+
});
|
|
590
|
+
Object.defineProperty(Container2.prototype, "length", {
|
|
591
|
+
get: function() {
|
|
592
|
+
return this.nodes.length;
|
|
593
|
+
},
|
|
594
|
+
enumerable: false,
|
|
595
|
+
configurable: true
|
|
596
|
+
});
|
|
597
|
+
Container2.prototype.removeChild = function(child) {
|
|
598
|
+
child = this.index(child);
|
|
599
|
+
this.at(child).parent = void 0;
|
|
600
|
+
this.nodes.splice(child, 1);
|
|
601
|
+
var index;
|
|
602
|
+
for (var id in this.indexes) {
|
|
603
|
+
index = this.indexes[id];
|
|
604
|
+
if (index >= child) {
|
|
605
|
+
this.indexes[id] = index - 1;
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
return this;
|
|
609
|
+
};
|
|
610
|
+
Container2.prototype.removeAll = function() {
|
|
611
|
+
var e_1, _a;
|
|
612
|
+
try {
|
|
613
|
+
for (var _b = __values(this.nodes), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
614
|
+
var node = _c.value;
|
|
615
|
+
node.parent = void 0;
|
|
616
|
+
}
|
|
617
|
+
} catch (e_1_1) {
|
|
618
|
+
e_1 = { error: e_1_1 };
|
|
619
|
+
} finally {
|
|
620
|
+
try {
|
|
621
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
622
|
+
} finally {
|
|
623
|
+
if (e_1) throw e_1.error;
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
this.nodes = [];
|
|
627
|
+
return this;
|
|
628
|
+
};
|
|
629
|
+
Container2.prototype.empty = function() {
|
|
630
|
+
return this.removeAll();
|
|
631
|
+
};
|
|
632
|
+
Container2.prototype.insertAfter = function(oldNode, newNode) {
|
|
633
|
+
var _a;
|
|
634
|
+
newNode.parent = this;
|
|
635
|
+
var oldIndex = this.index(oldNode);
|
|
636
|
+
var resetNode = [];
|
|
637
|
+
for (var i = 2; i < arguments.length; i++) {
|
|
638
|
+
resetNode.push(arguments[i]);
|
|
639
|
+
}
|
|
640
|
+
(_a = this.nodes).splice.apply(_a, __spreadArray([oldIndex + 1, 0, newNode], __read(resetNode), false));
|
|
641
|
+
newNode.parent = this;
|
|
642
|
+
var index;
|
|
643
|
+
for (var id in this.indexes) {
|
|
644
|
+
index = this.indexes[id];
|
|
645
|
+
if (oldIndex < index) {
|
|
646
|
+
this.indexes[id] = index + arguments.length - 1;
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
return this;
|
|
650
|
+
};
|
|
651
|
+
Container2.prototype.insertBefore = function(oldNode, newNode) {
|
|
652
|
+
var _a;
|
|
653
|
+
newNode.parent = this;
|
|
654
|
+
var oldIndex = this.index(oldNode);
|
|
655
|
+
var resetNode = [];
|
|
656
|
+
for (var i = 2; i < arguments.length; i++) {
|
|
657
|
+
resetNode.push(arguments[i]);
|
|
658
|
+
}
|
|
659
|
+
(_a = this.nodes).splice.apply(_a, __spreadArray([oldIndex, 0, newNode], __read(resetNode), false));
|
|
660
|
+
newNode.parent = this;
|
|
661
|
+
var index;
|
|
662
|
+
for (var id in this.indexes) {
|
|
663
|
+
index = this.indexes[id];
|
|
664
|
+
if (index >= oldIndex) {
|
|
665
|
+
this.indexes[id] = index + arguments.length - 1;
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
return this;
|
|
669
|
+
};
|
|
670
|
+
Container2.prototype._findChildAtPosition = function(line, col) {
|
|
671
|
+
var found = void 0;
|
|
672
|
+
this.each(function(node) {
|
|
673
|
+
if (node.atPosition) {
|
|
674
|
+
var foundChild = node.atPosition(line, col);
|
|
675
|
+
if (foundChild) {
|
|
676
|
+
found = foundChild;
|
|
677
|
+
return false;
|
|
678
|
+
}
|
|
679
|
+
} else if (node.isAtPosition(line, col)) {
|
|
680
|
+
found = node;
|
|
681
|
+
return false;
|
|
682
|
+
}
|
|
683
|
+
});
|
|
684
|
+
return found;
|
|
685
|
+
};
|
|
686
|
+
Container2.prototype.atPosition = function(line, col) {
|
|
687
|
+
if (this.isAtPosition(line, col)) {
|
|
688
|
+
return this._findChildAtPosition(line, col) || this;
|
|
689
|
+
} else {
|
|
690
|
+
return void 0;
|
|
691
|
+
}
|
|
692
|
+
};
|
|
693
|
+
Container2.prototype._inferEndPosition = function() {
|
|
694
|
+
if (this.last && this.last.source && this.last.source.end) {
|
|
695
|
+
this.source = this.source || {};
|
|
696
|
+
this.source.end = this.source.end || {};
|
|
697
|
+
Object.assign(this.source.end, this.last.source.end);
|
|
698
|
+
}
|
|
699
|
+
};
|
|
700
|
+
Container2.prototype.each = function(callback) {
|
|
701
|
+
if (!this.lastEach) {
|
|
702
|
+
this.lastEach = 0;
|
|
703
|
+
}
|
|
704
|
+
if (!this.indexes) {
|
|
705
|
+
this.indexes = {};
|
|
706
|
+
}
|
|
707
|
+
this.lastEach++;
|
|
708
|
+
var id = this.lastEach;
|
|
709
|
+
this.indexes[id] = 0;
|
|
710
|
+
if (!this.length) {
|
|
711
|
+
return void 0;
|
|
712
|
+
}
|
|
713
|
+
var index, result;
|
|
714
|
+
while (this.indexes[id] < this.length) {
|
|
715
|
+
index = this.indexes[id];
|
|
716
|
+
result = callback(this.at(index), index);
|
|
717
|
+
if (result === false) {
|
|
718
|
+
break;
|
|
719
|
+
}
|
|
720
|
+
this.indexes[id] += 1;
|
|
721
|
+
}
|
|
722
|
+
delete this.indexes[id];
|
|
723
|
+
if (result === false) {
|
|
724
|
+
return false;
|
|
725
|
+
}
|
|
726
|
+
};
|
|
727
|
+
Container2.prototype.walk = function(callback, depth) {
|
|
728
|
+
if (depth === void 0) {
|
|
729
|
+
depth = 0;
|
|
730
|
+
}
|
|
731
|
+
if (depth > util_1.MAX_NESTING_DEPTH) {
|
|
732
|
+
throw new Error("Cannot walk selector: nesting depth exceeds the maximum of ".concat(util_1.MAX_NESTING_DEPTH, "."));
|
|
733
|
+
}
|
|
734
|
+
return this.each(function(node, i) {
|
|
735
|
+
var result = callback(node, i);
|
|
736
|
+
if (result !== false && node.length) {
|
|
737
|
+
result = node.walk(callback, depth + 1);
|
|
738
|
+
}
|
|
739
|
+
if (result === false) {
|
|
740
|
+
return false;
|
|
741
|
+
}
|
|
742
|
+
});
|
|
743
|
+
};
|
|
744
|
+
Container2.prototype.walkAttributes = function(callback) {
|
|
745
|
+
var _this = this;
|
|
746
|
+
return this.walk(function(selector) {
|
|
747
|
+
if (selector.type === types.ATTRIBUTE) {
|
|
748
|
+
return callback.call(_this, selector);
|
|
749
|
+
}
|
|
750
|
+
});
|
|
751
|
+
};
|
|
752
|
+
Container2.prototype.walkClasses = function(callback) {
|
|
753
|
+
var _this = this;
|
|
754
|
+
return this.walk(function(selector) {
|
|
755
|
+
if (selector.type === types.CLASS) {
|
|
756
|
+
return callback.call(_this, selector);
|
|
757
|
+
}
|
|
758
|
+
});
|
|
759
|
+
};
|
|
760
|
+
Container2.prototype.walkCombinators = function(callback) {
|
|
761
|
+
var _this = this;
|
|
762
|
+
return this.walk(function(selector) {
|
|
763
|
+
if (selector.type === types.COMBINATOR) {
|
|
764
|
+
return callback.call(_this, selector);
|
|
765
|
+
}
|
|
766
|
+
});
|
|
767
|
+
};
|
|
768
|
+
Container2.prototype.walkComments = function(callback) {
|
|
769
|
+
var _this = this;
|
|
770
|
+
return this.walk(function(selector) {
|
|
771
|
+
if (selector.type === types.COMMENT) {
|
|
772
|
+
return callback.call(_this, selector);
|
|
773
|
+
}
|
|
774
|
+
});
|
|
775
|
+
};
|
|
776
|
+
Container2.prototype.walkIds = function(callback) {
|
|
777
|
+
var _this = this;
|
|
778
|
+
return this.walk(function(selector) {
|
|
779
|
+
if (selector.type === types.ID) {
|
|
780
|
+
return callback.call(_this, selector);
|
|
781
|
+
}
|
|
782
|
+
});
|
|
783
|
+
};
|
|
784
|
+
Container2.prototype.walkNesting = function(callback) {
|
|
785
|
+
var _this = this;
|
|
786
|
+
return this.walk(function(selector) {
|
|
787
|
+
if (selector.type === types.NESTING) {
|
|
788
|
+
return callback.call(_this, selector);
|
|
789
|
+
}
|
|
790
|
+
});
|
|
791
|
+
};
|
|
792
|
+
Container2.prototype.walkPseudos = function(callback) {
|
|
793
|
+
var _this = this;
|
|
794
|
+
return this.walk(function(selector) {
|
|
795
|
+
if (selector.type === types.PSEUDO) {
|
|
796
|
+
return callback.call(_this, selector);
|
|
797
|
+
}
|
|
798
|
+
});
|
|
799
|
+
};
|
|
800
|
+
Container2.prototype.walkTags = function(callback) {
|
|
801
|
+
var _this = this;
|
|
802
|
+
return this.walk(function(selector) {
|
|
803
|
+
if (selector.type === types.TAG) {
|
|
804
|
+
return callback.call(_this, selector);
|
|
805
|
+
}
|
|
806
|
+
});
|
|
807
|
+
};
|
|
808
|
+
Container2.prototype.walkUniversals = function(callback) {
|
|
809
|
+
var _this = this;
|
|
810
|
+
return this.walk(function(selector) {
|
|
811
|
+
if (selector.type === types.UNIVERSAL) {
|
|
812
|
+
return callback.call(_this, selector);
|
|
813
|
+
}
|
|
814
|
+
});
|
|
815
|
+
};
|
|
816
|
+
Container2.prototype.split = function(callback) {
|
|
817
|
+
var _this = this;
|
|
818
|
+
var current = [];
|
|
819
|
+
return this.reduce(function(memo, node, index) {
|
|
820
|
+
var split = callback.call(_this, node);
|
|
821
|
+
current.push(node);
|
|
822
|
+
if (split) {
|
|
823
|
+
memo.push(current);
|
|
824
|
+
current = [];
|
|
825
|
+
} else if (index === _this.length - 1) {
|
|
826
|
+
memo.push(current);
|
|
827
|
+
}
|
|
828
|
+
return memo;
|
|
829
|
+
}, []);
|
|
830
|
+
};
|
|
831
|
+
Container2.prototype.map = function(callback) {
|
|
832
|
+
return this.nodes.map(callback);
|
|
833
|
+
};
|
|
834
|
+
Container2.prototype.reduce = function(callback, memo) {
|
|
835
|
+
return this.nodes.reduce(callback, memo);
|
|
836
|
+
};
|
|
837
|
+
Container2.prototype.every = function(callback) {
|
|
838
|
+
return this.nodes.every(callback);
|
|
839
|
+
};
|
|
840
|
+
Container2.prototype.some = function(callback) {
|
|
841
|
+
return this.nodes.some(callback);
|
|
842
|
+
};
|
|
843
|
+
Container2.prototype.filter = function(callback) {
|
|
844
|
+
return this.nodes.filter(callback);
|
|
845
|
+
};
|
|
846
|
+
Container2.prototype.sort = function(callback) {
|
|
847
|
+
return this.nodes.sort(callback);
|
|
848
|
+
};
|
|
849
|
+
Container2.prototype.toString = function(options) {
|
|
850
|
+
if (options === void 0) {
|
|
851
|
+
options = {};
|
|
852
|
+
}
|
|
853
|
+
return this._stringify(options, 0, (0, util_1.resolveMaxNestingDepth)(options.maxNestingDepth));
|
|
854
|
+
};
|
|
855
|
+
Container2.prototype._stringify = function(options, depth, max) {
|
|
856
|
+
var _this = this;
|
|
857
|
+
return this.map(function(child) {
|
|
858
|
+
return _this._stringifyChild(child, options, depth, max);
|
|
859
|
+
}).join("");
|
|
860
|
+
};
|
|
861
|
+
Container2.prototype._stringifyChild = function(child, options, depth, max) {
|
|
862
|
+
return typeof child._stringify === "function" ? child._stringify(options, depth, max) : String(child);
|
|
863
|
+
};
|
|
864
|
+
return Container2;
|
|
865
|
+
})(node_1.default)
|
|
866
|
+
);
|
|
867
|
+
exports.default = Container;
|
|
868
|
+
}
|
|
869
|
+
});
|
|
870
|
+
|
|
871
|
+
// ../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/root.js
|
|
872
|
+
var require_root = __commonJS({
|
|
873
|
+
"../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/root.js"(exports) {
|
|
874
|
+
"use strict";
|
|
875
|
+
var __extends = exports && exports.__extends || /* @__PURE__ */ (function() {
|
|
876
|
+
var extendStatics = function(d, b) {
|
|
877
|
+
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
|
|
878
|
+
d2.__proto__ = b2;
|
|
879
|
+
} || function(d2, b2) {
|
|
880
|
+
for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p];
|
|
881
|
+
};
|
|
882
|
+
return extendStatics(d, b);
|
|
883
|
+
};
|
|
884
|
+
return function(d, b) {
|
|
885
|
+
if (typeof b !== "function" && b !== null)
|
|
886
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
887
|
+
extendStatics(d, b);
|
|
888
|
+
function __() {
|
|
889
|
+
this.constructor = d;
|
|
890
|
+
}
|
|
891
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
892
|
+
};
|
|
893
|
+
})();
|
|
894
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
895
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
896
|
+
};
|
|
897
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
898
|
+
var container_1 = __importDefault(require_container());
|
|
899
|
+
var types_1 = require_types();
|
|
900
|
+
var Root = (
|
|
901
|
+
/** @class */
|
|
902
|
+
(function(_super) {
|
|
903
|
+
__extends(Root2, _super);
|
|
904
|
+
function Root2(opts) {
|
|
905
|
+
var _this = _super.call(this, opts) || this;
|
|
906
|
+
_this.type = types_1.ROOT;
|
|
907
|
+
return _this;
|
|
908
|
+
}
|
|
909
|
+
Root2.prototype._stringify = function(options, depth, max) {
|
|
910
|
+
var _this = this;
|
|
911
|
+
var str = this.reduce(function(memo, selector) {
|
|
912
|
+
memo.push(_this._stringifyChild(selector, options, depth, max));
|
|
913
|
+
return memo;
|
|
914
|
+
}, []).join(",");
|
|
915
|
+
return this.trailingComma ? str + "," : str;
|
|
916
|
+
};
|
|
917
|
+
Root2.prototype.error = function(message, options) {
|
|
918
|
+
if (this._error) {
|
|
919
|
+
return this._error(message, options);
|
|
920
|
+
} else {
|
|
921
|
+
return new Error(message);
|
|
922
|
+
}
|
|
923
|
+
};
|
|
924
|
+
Object.defineProperty(Root2.prototype, "errorGenerator", {
|
|
925
|
+
set: function(handler) {
|
|
926
|
+
this._error = handler;
|
|
927
|
+
},
|
|
928
|
+
enumerable: false,
|
|
929
|
+
configurable: true
|
|
930
|
+
});
|
|
931
|
+
return Root2;
|
|
932
|
+
})(container_1.default)
|
|
933
|
+
);
|
|
934
|
+
exports.default = Root;
|
|
935
|
+
}
|
|
936
|
+
});
|
|
937
|
+
|
|
938
|
+
// ../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/selector.js
|
|
939
|
+
var require_selector = __commonJS({
|
|
940
|
+
"../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/selector.js"(exports) {
|
|
941
|
+
"use strict";
|
|
942
|
+
var __extends = exports && exports.__extends || /* @__PURE__ */ (function() {
|
|
943
|
+
var extendStatics = function(d, b) {
|
|
944
|
+
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
|
|
945
|
+
d2.__proto__ = b2;
|
|
946
|
+
} || function(d2, b2) {
|
|
947
|
+
for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p];
|
|
948
|
+
};
|
|
949
|
+
return extendStatics(d, b);
|
|
950
|
+
};
|
|
951
|
+
return function(d, b) {
|
|
952
|
+
if (typeof b !== "function" && b !== null)
|
|
953
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
954
|
+
extendStatics(d, b);
|
|
955
|
+
function __() {
|
|
956
|
+
this.constructor = d;
|
|
957
|
+
}
|
|
958
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
959
|
+
};
|
|
960
|
+
})();
|
|
961
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
962
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
963
|
+
};
|
|
964
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
965
|
+
var container_1 = __importDefault(require_container());
|
|
966
|
+
var types_1 = require_types();
|
|
967
|
+
var Selector = (
|
|
968
|
+
/** @class */
|
|
969
|
+
(function(_super) {
|
|
970
|
+
__extends(Selector2, _super);
|
|
971
|
+
function Selector2(opts) {
|
|
972
|
+
var _this = _super.call(this, opts) || this;
|
|
973
|
+
_this.type = types_1.SELECTOR;
|
|
974
|
+
return _this;
|
|
975
|
+
}
|
|
976
|
+
return Selector2;
|
|
977
|
+
})(container_1.default)
|
|
978
|
+
);
|
|
979
|
+
exports.default = Selector;
|
|
980
|
+
}
|
|
981
|
+
});
|
|
982
|
+
|
|
983
|
+
// ../../node_modules/.bun/cssesc@3.0.0/node_modules/cssesc/cssesc.js
|
|
984
|
+
var require_cssesc = __commonJS({
|
|
985
|
+
"../../node_modules/.bun/cssesc@3.0.0/node_modules/cssesc/cssesc.js"(exports, module) {
|
|
986
|
+
"use strict";
|
|
987
|
+
var object = {};
|
|
988
|
+
var hasOwnProperty = object.hasOwnProperty;
|
|
989
|
+
var merge = function merge2(options, defaults) {
|
|
990
|
+
if (!options) {
|
|
991
|
+
return defaults;
|
|
992
|
+
}
|
|
993
|
+
var result = {};
|
|
994
|
+
for (var key in defaults) {
|
|
995
|
+
result[key] = hasOwnProperty.call(options, key) ? options[key] : defaults[key];
|
|
996
|
+
}
|
|
997
|
+
return result;
|
|
998
|
+
};
|
|
999
|
+
var regexAnySingleEscape = /[ -,\.\/:-@\[-\^`\{-~]/;
|
|
1000
|
+
var regexSingleEscape = /[ -,\.\/:-@\[\]\^`\{-~]/;
|
|
1001
|
+
var regexExcessiveSpaces = /(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g;
|
|
1002
|
+
var cssesc = function cssesc2(string, options) {
|
|
1003
|
+
options = merge(options, cssesc2.options);
|
|
1004
|
+
if (options.quotes != "single" && options.quotes != "double") {
|
|
1005
|
+
options.quotes = "single";
|
|
1006
|
+
}
|
|
1007
|
+
var quote = options.quotes == "double" ? '"' : "'";
|
|
1008
|
+
var isIdentifier = options.isIdentifier;
|
|
1009
|
+
var firstChar = string.charAt(0);
|
|
1010
|
+
var output = "";
|
|
1011
|
+
var counter = 0;
|
|
1012
|
+
var length = string.length;
|
|
1013
|
+
while (counter < length) {
|
|
1014
|
+
var character = string.charAt(counter++);
|
|
1015
|
+
var codePoint = character.charCodeAt();
|
|
1016
|
+
var value = void 0;
|
|
1017
|
+
if (codePoint < 32 || codePoint > 126) {
|
|
1018
|
+
if (codePoint >= 55296 && codePoint <= 56319 && counter < length) {
|
|
1019
|
+
var extra = string.charCodeAt(counter++);
|
|
1020
|
+
if ((extra & 64512) == 56320) {
|
|
1021
|
+
codePoint = ((codePoint & 1023) << 10) + (extra & 1023) + 65536;
|
|
1022
|
+
} else {
|
|
1023
|
+
counter--;
|
|
1024
|
+
}
|
|
1025
|
+
}
|
|
1026
|
+
value = "\\" + codePoint.toString(16).toUpperCase() + " ";
|
|
1027
|
+
} else {
|
|
1028
|
+
if (options.escapeEverything) {
|
|
1029
|
+
if (regexAnySingleEscape.test(character)) {
|
|
1030
|
+
value = "\\" + character;
|
|
1031
|
+
} else {
|
|
1032
|
+
value = "\\" + codePoint.toString(16).toUpperCase() + " ";
|
|
1033
|
+
}
|
|
1034
|
+
} else if (/[\t\n\f\r\x0B]/.test(character)) {
|
|
1035
|
+
value = "\\" + codePoint.toString(16).toUpperCase() + " ";
|
|
1036
|
+
} else if (character == "\\" || !isIdentifier && (character == '"' && quote == character || character == "'" && quote == character) || isIdentifier && regexSingleEscape.test(character)) {
|
|
1037
|
+
value = "\\" + character;
|
|
1038
|
+
} else {
|
|
1039
|
+
value = character;
|
|
1040
|
+
}
|
|
1041
|
+
}
|
|
1042
|
+
output += value;
|
|
1043
|
+
}
|
|
1044
|
+
if (isIdentifier) {
|
|
1045
|
+
if (/^-[-\d]/.test(output)) {
|
|
1046
|
+
output = "\\-" + output.slice(1);
|
|
1047
|
+
} else if (/\d/.test(firstChar)) {
|
|
1048
|
+
output = "\\3" + firstChar + " " + output.slice(1);
|
|
1049
|
+
}
|
|
1050
|
+
}
|
|
1051
|
+
output = output.replace(regexExcessiveSpaces, function($0, $1, $2) {
|
|
1052
|
+
if ($1 && $1.length % 2) {
|
|
1053
|
+
return $0;
|
|
1054
|
+
}
|
|
1055
|
+
return ($1 || "") + $2;
|
|
1056
|
+
});
|
|
1057
|
+
if (!isIdentifier && options.wrap) {
|
|
1058
|
+
return quote + output + quote;
|
|
1059
|
+
}
|
|
1060
|
+
return output;
|
|
1061
|
+
};
|
|
1062
|
+
cssesc.options = {
|
|
1063
|
+
"escapeEverything": false,
|
|
1064
|
+
"isIdentifier": false,
|
|
1065
|
+
"quotes": "single",
|
|
1066
|
+
"wrap": false
|
|
1067
|
+
};
|
|
1068
|
+
cssesc.version = "3.0.0";
|
|
1069
|
+
module.exports = cssesc;
|
|
1070
|
+
}
|
|
1071
|
+
});
|
|
1072
|
+
|
|
1073
|
+
// ../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/className.js
|
|
1074
|
+
var require_className = __commonJS({
|
|
1075
|
+
"../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/className.js"(exports) {
|
|
1076
|
+
"use strict";
|
|
1077
|
+
var __extends = exports && exports.__extends || /* @__PURE__ */ (function() {
|
|
1078
|
+
var extendStatics = function(d, b) {
|
|
1079
|
+
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
|
|
1080
|
+
d2.__proto__ = b2;
|
|
1081
|
+
} || function(d2, b2) {
|
|
1082
|
+
for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p];
|
|
1083
|
+
};
|
|
1084
|
+
return extendStatics(d, b);
|
|
1085
|
+
};
|
|
1086
|
+
return function(d, b) {
|
|
1087
|
+
if (typeof b !== "function" && b !== null)
|
|
1088
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
1089
|
+
extendStatics(d, b);
|
|
1090
|
+
function __() {
|
|
1091
|
+
this.constructor = d;
|
|
1092
|
+
}
|
|
1093
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
1094
|
+
};
|
|
1095
|
+
})();
|
|
1096
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
1097
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
1098
|
+
};
|
|
1099
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1100
|
+
var cssesc_1 = __importDefault(require_cssesc());
|
|
1101
|
+
var util_1 = require_util();
|
|
1102
|
+
var node_1 = __importDefault(require_node());
|
|
1103
|
+
var types_1 = require_types();
|
|
1104
|
+
var ClassName = (
|
|
1105
|
+
/** @class */
|
|
1106
|
+
(function(_super) {
|
|
1107
|
+
__extends(ClassName2, _super);
|
|
1108
|
+
function ClassName2(opts) {
|
|
1109
|
+
var _this = _super.call(this, opts) || this;
|
|
1110
|
+
_this.type = types_1.CLASS;
|
|
1111
|
+
_this._constructed = true;
|
|
1112
|
+
return _this;
|
|
1113
|
+
}
|
|
1114
|
+
Object.defineProperty(ClassName2.prototype, "value", {
|
|
1115
|
+
get: function() {
|
|
1116
|
+
return this._value;
|
|
1117
|
+
},
|
|
1118
|
+
set: function(v) {
|
|
1119
|
+
if (this._constructed) {
|
|
1120
|
+
var escaped = (0, cssesc_1.default)(v, { isIdentifier: true });
|
|
1121
|
+
if (escaped !== v) {
|
|
1122
|
+
(0, util_1.ensureObject)(this, "raws");
|
|
1123
|
+
this.raws.value = escaped;
|
|
1124
|
+
} else if (this.raws) {
|
|
1125
|
+
delete this.raws.value;
|
|
1126
|
+
}
|
|
1127
|
+
}
|
|
1128
|
+
this._value = v;
|
|
1129
|
+
},
|
|
1130
|
+
enumerable: false,
|
|
1131
|
+
configurable: true
|
|
1132
|
+
});
|
|
1133
|
+
ClassName2.prototype.valueToString = function() {
|
|
1134
|
+
return "." + _super.prototype.valueToString.call(this);
|
|
1135
|
+
};
|
|
1136
|
+
return ClassName2;
|
|
1137
|
+
})(node_1.default)
|
|
1138
|
+
);
|
|
1139
|
+
exports.default = ClassName;
|
|
1140
|
+
}
|
|
1141
|
+
});
|
|
1142
|
+
|
|
1143
|
+
// ../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/comment.js
|
|
1144
|
+
var require_comment = __commonJS({
|
|
1145
|
+
"../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/comment.js"(exports) {
|
|
1146
|
+
"use strict";
|
|
1147
|
+
var __extends = exports && exports.__extends || /* @__PURE__ */ (function() {
|
|
1148
|
+
var extendStatics = function(d, b) {
|
|
1149
|
+
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
|
|
1150
|
+
d2.__proto__ = b2;
|
|
1151
|
+
} || function(d2, b2) {
|
|
1152
|
+
for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p];
|
|
1153
|
+
};
|
|
1154
|
+
return extendStatics(d, b);
|
|
1155
|
+
};
|
|
1156
|
+
return function(d, b) {
|
|
1157
|
+
if (typeof b !== "function" && b !== null)
|
|
1158
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
1159
|
+
extendStatics(d, b);
|
|
1160
|
+
function __() {
|
|
1161
|
+
this.constructor = d;
|
|
1162
|
+
}
|
|
1163
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
1164
|
+
};
|
|
1165
|
+
})();
|
|
1166
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
1167
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
1168
|
+
};
|
|
1169
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1170
|
+
var node_1 = __importDefault(require_node());
|
|
1171
|
+
var types_1 = require_types();
|
|
1172
|
+
var Comment = (
|
|
1173
|
+
/** @class */
|
|
1174
|
+
(function(_super) {
|
|
1175
|
+
__extends(Comment2, _super);
|
|
1176
|
+
function Comment2(opts) {
|
|
1177
|
+
var _this = _super.call(this, opts) || this;
|
|
1178
|
+
_this.type = types_1.COMMENT;
|
|
1179
|
+
return _this;
|
|
1180
|
+
}
|
|
1181
|
+
return Comment2;
|
|
1182
|
+
})(node_1.default)
|
|
1183
|
+
);
|
|
1184
|
+
exports.default = Comment;
|
|
1185
|
+
}
|
|
1186
|
+
});
|
|
1187
|
+
|
|
1188
|
+
// ../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/id.js
|
|
1189
|
+
var require_id = __commonJS({
|
|
1190
|
+
"../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/id.js"(exports) {
|
|
1191
|
+
"use strict";
|
|
1192
|
+
var __extends = exports && exports.__extends || /* @__PURE__ */ (function() {
|
|
1193
|
+
var extendStatics = function(d, b) {
|
|
1194
|
+
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
|
|
1195
|
+
d2.__proto__ = b2;
|
|
1196
|
+
} || function(d2, b2) {
|
|
1197
|
+
for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p];
|
|
1198
|
+
};
|
|
1199
|
+
return extendStatics(d, b);
|
|
1200
|
+
};
|
|
1201
|
+
return function(d, b) {
|
|
1202
|
+
if (typeof b !== "function" && b !== null)
|
|
1203
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
1204
|
+
extendStatics(d, b);
|
|
1205
|
+
function __() {
|
|
1206
|
+
this.constructor = d;
|
|
1207
|
+
}
|
|
1208
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
1209
|
+
};
|
|
1210
|
+
})();
|
|
1211
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
1212
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
1213
|
+
};
|
|
1214
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1215
|
+
var node_1 = __importDefault(require_node());
|
|
1216
|
+
var types_1 = require_types();
|
|
1217
|
+
var ID = (
|
|
1218
|
+
/** @class */
|
|
1219
|
+
(function(_super) {
|
|
1220
|
+
__extends(ID2, _super);
|
|
1221
|
+
function ID2(opts) {
|
|
1222
|
+
var _this = _super.call(this, opts) || this;
|
|
1223
|
+
_this.type = types_1.ID;
|
|
1224
|
+
return _this;
|
|
1225
|
+
}
|
|
1226
|
+
ID2.prototype.valueToString = function() {
|
|
1227
|
+
return "#" + _super.prototype.valueToString.call(this);
|
|
1228
|
+
};
|
|
1229
|
+
return ID2;
|
|
1230
|
+
})(node_1.default)
|
|
1231
|
+
);
|
|
1232
|
+
exports.default = ID;
|
|
1233
|
+
}
|
|
1234
|
+
});
|
|
1235
|
+
|
|
1236
|
+
// ../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/namespace.js
|
|
1237
|
+
var require_namespace = __commonJS({
|
|
1238
|
+
"../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/namespace.js"(exports) {
|
|
1239
|
+
"use strict";
|
|
1240
|
+
var __extends = exports && exports.__extends || /* @__PURE__ */ (function() {
|
|
1241
|
+
var extendStatics = function(d, b) {
|
|
1242
|
+
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
|
|
1243
|
+
d2.__proto__ = b2;
|
|
1244
|
+
} || function(d2, b2) {
|
|
1245
|
+
for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p];
|
|
1246
|
+
};
|
|
1247
|
+
return extendStatics(d, b);
|
|
1248
|
+
};
|
|
1249
|
+
return function(d, b) {
|
|
1250
|
+
if (typeof b !== "function" && b !== null)
|
|
1251
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
1252
|
+
extendStatics(d, b);
|
|
1253
|
+
function __() {
|
|
1254
|
+
this.constructor = d;
|
|
1255
|
+
}
|
|
1256
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
1257
|
+
};
|
|
1258
|
+
})();
|
|
1259
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
1260
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
1261
|
+
};
|
|
1262
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1263
|
+
var cssesc_1 = __importDefault(require_cssesc());
|
|
1264
|
+
var util_1 = require_util();
|
|
1265
|
+
var node_1 = __importDefault(require_node());
|
|
1266
|
+
var Namespace = (
|
|
1267
|
+
/** @class */
|
|
1268
|
+
(function(_super) {
|
|
1269
|
+
__extends(Namespace2, _super);
|
|
1270
|
+
function Namespace2() {
|
|
1271
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
1272
|
+
}
|
|
1273
|
+
Object.defineProperty(Namespace2.prototype, "namespace", {
|
|
1274
|
+
get: function() {
|
|
1275
|
+
return this._namespace;
|
|
1276
|
+
},
|
|
1277
|
+
set: function(namespace) {
|
|
1278
|
+
if (namespace === true || namespace === "*" || namespace === "&") {
|
|
1279
|
+
this._namespace = namespace;
|
|
1280
|
+
if (this.raws) {
|
|
1281
|
+
delete this.raws.namespace;
|
|
1282
|
+
}
|
|
1283
|
+
return;
|
|
1284
|
+
}
|
|
1285
|
+
var escaped = (0, cssesc_1.default)(namespace, { isIdentifier: true });
|
|
1286
|
+
this._namespace = namespace;
|
|
1287
|
+
if (escaped !== namespace) {
|
|
1288
|
+
(0, util_1.ensureObject)(this, "raws");
|
|
1289
|
+
this.raws.namespace = escaped;
|
|
1290
|
+
} else if (this.raws) {
|
|
1291
|
+
delete this.raws.namespace;
|
|
1292
|
+
}
|
|
1293
|
+
},
|
|
1294
|
+
enumerable: false,
|
|
1295
|
+
configurable: true
|
|
1296
|
+
});
|
|
1297
|
+
Object.defineProperty(Namespace2.prototype, "ns", {
|
|
1298
|
+
get: function() {
|
|
1299
|
+
return this._namespace;
|
|
1300
|
+
},
|
|
1301
|
+
set: function(namespace) {
|
|
1302
|
+
this.namespace = namespace;
|
|
1303
|
+
},
|
|
1304
|
+
enumerable: false,
|
|
1305
|
+
configurable: true
|
|
1306
|
+
});
|
|
1307
|
+
Object.defineProperty(Namespace2.prototype, "namespaceString", {
|
|
1308
|
+
get: function() {
|
|
1309
|
+
if (this.namespace) {
|
|
1310
|
+
var ns = this.stringifyProperty("namespace");
|
|
1311
|
+
if (ns === true) {
|
|
1312
|
+
return "";
|
|
1313
|
+
} else {
|
|
1314
|
+
return ns;
|
|
1315
|
+
}
|
|
1316
|
+
} else {
|
|
1317
|
+
return "";
|
|
1318
|
+
}
|
|
1319
|
+
},
|
|
1320
|
+
enumerable: false,
|
|
1321
|
+
configurable: true
|
|
1322
|
+
});
|
|
1323
|
+
Namespace2.prototype.qualifiedName = function(value) {
|
|
1324
|
+
if (this.namespace) {
|
|
1325
|
+
return "".concat(this.namespaceString, "|").concat(value);
|
|
1326
|
+
} else {
|
|
1327
|
+
return value;
|
|
1328
|
+
}
|
|
1329
|
+
};
|
|
1330
|
+
Namespace2.prototype.valueToString = function() {
|
|
1331
|
+
return this.qualifiedName(_super.prototype.valueToString.call(this));
|
|
1332
|
+
};
|
|
1333
|
+
return Namespace2;
|
|
1334
|
+
})(node_1.default)
|
|
1335
|
+
);
|
|
1336
|
+
exports.default = Namespace;
|
|
1337
|
+
}
|
|
1338
|
+
});
|
|
1339
|
+
|
|
1340
|
+
// ../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/tag.js
|
|
1341
|
+
var require_tag = __commonJS({
|
|
1342
|
+
"../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/tag.js"(exports) {
|
|
1343
|
+
"use strict";
|
|
1344
|
+
var __extends = exports && exports.__extends || /* @__PURE__ */ (function() {
|
|
1345
|
+
var extendStatics = function(d, b) {
|
|
1346
|
+
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
|
|
1347
|
+
d2.__proto__ = b2;
|
|
1348
|
+
} || function(d2, b2) {
|
|
1349
|
+
for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p];
|
|
1350
|
+
};
|
|
1351
|
+
return extendStatics(d, b);
|
|
1352
|
+
};
|
|
1353
|
+
return function(d, b) {
|
|
1354
|
+
if (typeof b !== "function" && b !== null)
|
|
1355
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
1356
|
+
extendStatics(d, b);
|
|
1357
|
+
function __() {
|
|
1358
|
+
this.constructor = d;
|
|
1359
|
+
}
|
|
1360
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
1361
|
+
};
|
|
1362
|
+
})();
|
|
1363
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
1364
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
1365
|
+
};
|
|
1366
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1367
|
+
var namespace_1 = __importDefault(require_namespace());
|
|
1368
|
+
var types_1 = require_types();
|
|
1369
|
+
var Tag = (
|
|
1370
|
+
/** @class */
|
|
1371
|
+
(function(_super) {
|
|
1372
|
+
__extends(Tag2, _super);
|
|
1373
|
+
function Tag2(opts) {
|
|
1374
|
+
var _this = _super.call(this, opts) || this;
|
|
1375
|
+
_this.type = types_1.TAG;
|
|
1376
|
+
return _this;
|
|
1377
|
+
}
|
|
1378
|
+
return Tag2;
|
|
1379
|
+
})(namespace_1.default)
|
|
1380
|
+
);
|
|
1381
|
+
exports.default = Tag;
|
|
1382
|
+
}
|
|
1383
|
+
});
|
|
1384
|
+
|
|
1385
|
+
// ../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/string.js
|
|
1386
|
+
var require_string = __commonJS({
|
|
1387
|
+
"../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/string.js"(exports) {
|
|
1388
|
+
"use strict";
|
|
1389
|
+
var __extends = exports && exports.__extends || /* @__PURE__ */ (function() {
|
|
1390
|
+
var extendStatics = function(d, b) {
|
|
1391
|
+
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
|
|
1392
|
+
d2.__proto__ = b2;
|
|
1393
|
+
} || function(d2, b2) {
|
|
1394
|
+
for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p];
|
|
1395
|
+
};
|
|
1396
|
+
return extendStatics(d, b);
|
|
1397
|
+
};
|
|
1398
|
+
return function(d, b) {
|
|
1399
|
+
if (typeof b !== "function" && b !== null)
|
|
1400
|
+
throw new TypeError("Class extends value " + String2(b) + " is not a constructor or null");
|
|
1401
|
+
extendStatics(d, b);
|
|
1402
|
+
function __() {
|
|
1403
|
+
this.constructor = d;
|
|
1404
|
+
}
|
|
1405
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
1406
|
+
};
|
|
1407
|
+
})();
|
|
1408
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
1409
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
1410
|
+
};
|
|
1411
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1412
|
+
var node_1 = __importDefault(require_node());
|
|
1413
|
+
var types_1 = require_types();
|
|
1414
|
+
var String2 = (
|
|
1415
|
+
/** @class */
|
|
1416
|
+
(function(_super) {
|
|
1417
|
+
__extends(String3, _super);
|
|
1418
|
+
function String3(opts) {
|
|
1419
|
+
var _this = _super.call(this, opts) || this;
|
|
1420
|
+
_this.type = types_1.STRING;
|
|
1421
|
+
return _this;
|
|
1422
|
+
}
|
|
1423
|
+
return String3;
|
|
1424
|
+
})(node_1.default)
|
|
1425
|
+
);
|
|
1426
|
+
exports.default = String2;
|
|
1427
|
+
}
|
|
1428
|
+
});
|
|
1429
|
+
|
|
1430
|
+
// ../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/pseudo.js
|
|
1431
|
+
var require_pseudo = __commonJS({
|
|
1432
|
+
"../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/pseudo.js"(exports) {
|
|
1433
|
+
"use strict";
|
|
1434
|
+
var __extends = exports && exports.__extends || /* @__PURE__ */ (function() {
|
|
1435
|
+
var extendStatics = function(d, b) {
|
|
1436
|
+
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
|
|
1437
|
+
d2.__proto__ = b2;
|
|
1438
|
+
} || function(d2, b2) {
|
|
1439
|
+
for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p];
|
|
1440
|
+
};
|
|
1441
|
+
return extendStatics(d, b);
|
|
1442
|
+
};
|
|
1443
|
+
return function(d, b) {
|
|
1444
|
+
if (typeof b !== "function" && b !== null)
|
|
1445
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
1446
|
+
extendStatics(d, b);
|
|
1447
|
+
function __() {
|
|
1448
|
+
this.constructor = d;
|
|
1449
|
+
}
|
|
1450
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
1451
|
+
};
|
|
1452
|
+
})();
|
|
1453
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
1454
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
1455
|
+
};
|
|
1456
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1457
|
+
var container_1 = __importDefault(require_container());
|
|
1458
|
+
var types_1 = require_types();
|
|
1459
|
+
var Pseudo = (
|
|
1460
|
+
/** @class */
|
|
1461
|
+
(function(_super) {
|
|
1462
|
+
__extends(Pseudo2, _super);
|
|
1463
|
+
function Pseudo2(opts) {
|
|
1464
|
+
var _this = _super.call(this, opts) || this;
|
|
1465
|
+
_this.type = types_1.PSEUDO;
|
|
1466
|
+
return _this;
|
|
1467
|
+
}
|
|
1468
|
+
Pseudo2.prototype._stringify = function(options, depth, max) {
|
|
1469
|
+
var _this = this;
|
|
1470
|
+
if (depth >= max) {
|
|
1471
|
+
throw new Error("Cannot serialize selector: nesting depth exceeds the maximum of ".concat(max, "."));
|
|
1472
|
+
}
|
|
1473
|
+
var params = this.length ? "(" + this.map(function(child) {
|
|
1474
|
+
return _this._stringifyChild(child, options, depth + 1, max);
|
|
1475
|
+
}).join(",") + ")" : "";
|
|
1476
|
+
return [this.rawSpaceBefore, this.stringifyProperty("value"), params, this.rawSpaceAfter].join("");
|
|
1477
|
+
};
|
|
1478
|
+
return Pseudo2;
|
|
1479
|
+
})(container_1.default)
|
|
1480
|
+
);
|
|
1481
|
+
exports.default = Pseudo;
|
|
1482
|
+
}
|
|
1483
|
+
});
|
|
1484
|
+
|
|
1485
|
+
// ../../node_modules/.bun/util-deprecate@1.0.2/node_modules/util-deprecate/node.js
|
|
1486
|
+
var require_node2 = __commonJS({
|
|
1487
|
+
"../../node_modules/.bun/util-deprecate@1.0.2/node_modules/util-deprecate/node.js"(exports, module) {
|
|
1488
|
+
"use strict";
|
|
1489
|
+
module.exports = __require("util").deprecate;
|
|
1490
|
+
}
|
|
1491
|
+
});
|
|
1492
|
+
|
|
1493
|
+
// ../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/attribute.js
|
|
1494
|
+
var require_attribute = __commonJS({
|
|
1495
|
+
"../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/attribute.js"(exports) {
|
|
1496
|
+
"use strict";
|
|
1497
|
+
var __extends = exports && exports.__extends || /* @__PURE__ */ (function() {
|
|
1498
|
+
var extendStatics = function(d, b) {
|
|
1499
|
+
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
|
|
1500
|
+
d2.__proto__ = b2;
|
|
1501
|
+
} || function(d2, b2) {
|
|
1502
|
+
for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p];
|
|
1503
|
+
};
|
|
1504
|
+
return extendStatics(d, b);
|
|
1505
|
+
};
|
|
1506
|
+
return function(d, b) {
|
|
1507
|
+
if (typeof b !== "function" && b !== null)
|
|
1508
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
1509
|
+
extendStatics(d, b);
|
|
1510
|
+
function __() {
|
|
1511
|
+
this.constructor = d;
|
|
1512
|
+
}
|
|
1513
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
1514
|
+
};
|
|
1515
|
+
})();
|
|
1516
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
1517
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
1518
|
+
};
|
|
1519
|
+
var _a;
|
|
1520
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1521
|
+
exports.unescapeValue = unescapeValue;
|
|
1522
|
+
var cssesc_1 = __importDefault(require_cssesc());
|
|
1523
|
+
var unesc_1 = __importDefault(require_unesc());
|
|
1524
|
+
var namespace_1 = __importDefault(require_namespace());
|
|
1525
|
+
var types_1 = require_types();
|
|
1526
|
+
var deprecate = require_node2();
|
|
1527
|
+
var WRAPPED_IN_QUOTES = /^('|")([^]*)\1$/;
|
|
1528
|
+
var warnOfDeprecatedValueAssignment = deprecate(function() {
|
|
1529
|
+
}, "Assigning an attribute a value containing characters that might need to be escaped is deprecated. Call attribute.setValue() instead.");
|
|
1530
|
+
var warnOfDeprecatedQuotedAssignment = deprecate(function() {
|
|
1531
|
+
}, "Assigning attr.quoted is deprecated and has no effect. Assign to attr.quoteMark instead.");
|
|
1532
|
+
var warnOfDeprecatedConstructor = deprecate(function() {
|
|
1533
|
+
}, "Constructing an Attribute selector with a value without specifying quoteMark is deprecated. Note: The value should be unescaped now.");
|
|
1534
|
+
function unescapeValue(value) {
|
|
1535
|
+
var deprecatedUsage = false;
|
|
1536
|
+
var quoteMark = null;
|
|
1537
|
+
var unescaped = value;
|
|
1538
|
+
var m = unescaped.match(WRAPPED_IN_QUOTES);
|
|
1539
|
+
if (m) {
|
|
1540
|
+
quoteMark = m[1];
|
|
1541
|
+
unescaped = m[2];
|
|
1542
|
+
}
|
|
1543
|
+
unescaped = (0, unesc_1.default)(unescaped);
|
|
1544
|
+
if (unescaped !== value) {
|
|
1545
|
+
deprecatedUsage = true;
|
|
1546
|
+
}
|
|
1547
|
+
return {
|
|
1548
|
+
deprecatedUsage,
|
|
1549
|
+
unescaped,
|
|
1550
|
+
quoteMark
|
|
1551
|
+
};
|
|
1552
|
+
}
|
|
1553
|
+
function handleDeprecatedContructorOpts(opts) {
|
|
1554
|
+
if (opts.quoteMark !== void 0) {
|
|
1555
|
+
return opts;
|
|
1556
|
+
}
|
|
1557
|
+
if (opts.value === void 0) {
|
|
1558
|
+
return opts;
|
|
1559
|
+
}
|
|
1560
|
+
warnOfDeprecatedConstructor();
|
|
1561
|
+
var _a2 = unescapeValue(opts.value), quoteMark = _a2.quoteMark, unescaped = _a2.unescaped;
|
|
1562
|
+
if (!opts.raws) {
|
|
1563
|
+
opts.raws = {};
|
|
1564
|
+
}
|
|
1565
|
+
if (opts.raws.value === void 0) {
|
|
1566
|
+
opts.raws.value = opts.value;
|
|
1567
|
+
}
|
|
1568
|
+
opts.value = unescaped;
|
|
1569
|
+
opts.quoteMark = quoteMark;
|
|
1570
|
+
return opts;
|
|
1571
|
+
}
|
|
1572
|
+
var Attribute = (
|
|
1573
|
+
/** @class */
|
|
1574
|
+
(function(_super) {
|
|
1575
|
+
__extends(Attribute2, _super);
|
|
1576
|
+
function Attribute2(opts) {
|
|
1577
|
+
if (opts === void 0) {
|
|
1578
|
+
opts = {};
|
|
1579
|
+
}
|
|
1580
|
+
var _this = _super.call(this, handleDeprecatedContructorOpts(opts)) || this;
|
|
1581
|
+
_this.type = types_1.ATTRIBUTE;
|
|
1582
|
+
_this.raws = _this.raws || {};
|
|
1583
|
+
Object.defineProperty(_this.raws, "unquoted", {
|
|
1584
|
+
get: deprecate(function() {
|
|
1585
|
+
return _this.value;
|
|
1586
|
+
}, "attr.raws.unquoted is deprecated. Call attr.value instead."),
|
|
1587
|
+
set: deprecate(function() {
|
|
1588
|
+
return _this.value;
|
|
1589
|
+
}, "Setting attr.raws.unquoted is deprecated and has no effect. attr.value is unescaped by default now.")
|
|
1590
|
+
});
|
|
1591
|
+
_this._constructed = true;
|
|
1592
|
+
return _this;
|
|
1593
|
+
}
|
|
1594
|
+
Attribute2.prototype.getQuotedValue = function(options) {
|
|
1595
|
+
if (options === void 0) {
|
|
1596
|
+
options = {};
|
|
1597
|
+
}
|
|
1598
|
+
var quoteMark = this._determineQuoteMark(options);
|
|
1599
|
+
var cssescopts = CSSESC_QUOTE_OPTIONS[quoteMark];
|
|
1600
|
+
var escaped = (0, cssesc_1.default)(this._value, cssescopts);
|
|
1601
|
+
return escaped;
|
|
1602
|
+
};
|
|
1603
|
+
Attribute2.prototype._determineQuoteMark = function(options) {
|
|
1604
|
+
return options.smart ? this.smartQuoteMark(options) : this.preferredQuoteMark(options);
|
|
1605
|
+
};
|
|
1606
|
+
Attribute2.prototype.setValue = function(value, options) {
|
|
1607
|
+
if (options === void 0) {
|
|
1608
|
+
options = {};
|
|
1609
|
+
}
|
|
1610
|
+
this._value = value;
|
|
1611
|
+
this._quoteMark = this._determineQuoteMark(options);
|
|
1612
|
+
this._syncRawValue();
|
|
1613
|
+
};
|
|
1614
|
+
Attribute2.prototype.smartQuoteMark = function(options) {
|
|
1615
|
+
var v = this.value;
|
|
1616
|
+
var numSingleQuotes = v.replace(/[^']/g, "").length;
|
|
1617
|
+
var numDoubleQuotes = v.replace(/[^"]/g, "").length;
|
|
1618
|
+
if (numSingleQuotes + numDoubleQuotes === 0) {
|
|
1619
|
+
var escaped = (0, cssesc_1.default)(v, { isIdentifier: true });
|
|
1620
|
+
if (escaped === v) {
|
|
1621
|
+
return Attribute2.NO_QUOTE;
|
|
1622
|
+
} else {
|
|
1623
|
+
var pref = this.preferredQuoteMark(options);
|
|
1624
|
+
if (pref === Attribute2.NO_QUOTE) {
|
|
1625
|
+
var quote = this.quoteMark || options.quoteMark || Attribute2.DOUBLE_QUOTE;
|
|
1626
|
+
var opts = CSSESC_QUOTE_OPTIONS[quote];
|
|
1627
|
+
var quoteValue = (0, cssesc_1.default)(v, opts);
|
|
1628
|
+
if (quoteValue.length < escaped.length) {
|
|
1629
|
+
return quote;
|
|
1630
|
+
}
|
|
1631
|
+
}
|
|
1632
|
+
return pref;
|
|
1633
|
+
}
|
|
1634
|
+
} else if (numDoubleQuotes === numSingleQuotes) {
|
|
1635
|
+
return this.preferredQuoteMark(options);
|
|
1636
|
+
} else if (numDoubleQuotes < numSingleQuotes) {
|
|
1637
|
+
return Attribute2.DOUBLE_QUOTE;
|
|
1638
|
+
} else {
|
|
1639
|
+
return Attribute2.SINGLE_QUOTE;
|
|
1640
|
+
}
|
|
1641
|
+
};
|
|
1642
|
+
Attribute2.prototype.preferredQuoteMark = function(options) {
|
|
1643
|
+
var quoteMark = options.preferCurrentQuoteMark ? this.quoteMark : options.quoteMark;
|
|
1644
|
+
if (quoteMark === void 0) {
|
|
1645
|
+
quoteMark = options.preferCurrentQuoteMark ? options.quoteMark : this.quoteMark;
|
|
1646
|
+
}
|
|
1647
|
+
if (quoteMark === void 0) {
|
|
1648
|
+
quoteMark = Attribute2.DOUBLE_QUOTE;
|
|
1649
|
+
}
|
|
1650
|
+
return quoteMark;
|
|
1651
|
+
};
|
|
1652
|
+
Object.defineProperty(Attribute2.prototype, "quoted", {
|
|
1653
|
+
get: function() {
|
|
1654
|
+
var qm = this.quoteMark;
|
|
1655
|
+
return qm === "'" || qm === '"';
|
|
1656
|
+
},
|
|
1657
|
+
set: function(value) {
|
|
1658
|
+
warnOfDeprecatedQuotedAssignment();
|
|
1659
|
+
},
|
|
1660
|
+
enumerable: false,
|
|
1661
|
+
configurable: true
|
|
1662
|
+
});
|
|
1663
|
+
Object.defineProperty(Attribute2.prototype, "quoteMark", {
|
|
1664
|
+
/**
|
|
1665
|
+
* returns a single (`'`) or double (`"`) quote character if the value is quoted.
|
|
1666
|
+
* returns `null` if the value is not quoted.
|
|
1667
|
+
* returns `undefined` if the quotation state is unknown (this can happen when
|
|
1668
|
+
* the attribute is constructed without specifying a quote mark.)
|
|
1669
|
+
*/
|
|
1670
|
+
get: function() {
|
|
1671
|
+
return this._quoteMark;
|
|
1672
|
+
},
|
|
1673
|
+
/**
|
|
1674
|
+
* Set the quote mark to be used by this attribute's value.
|
|
1675
|
+
* If the quote mark changes, the raw (escaped) value at `attr.raws.value` of the attribute
|
|
1676
|
+
* value is updated accordingly.
|
|
1677
|
+
*
|
|
1678
|
+
* @param {"'" | '"' | null} quoteMark The quote mark or `null` if the value should be unquoted.
|
|
1679
|
+
*/
|
|
1680
|
+
set: function(quoteMark) {
|
|
1681
|
+
if (!this._constructed) {
|
|
1682
|
+
this._quoteMark = quoteMark;
|
|
1683
|
+
return;
|
|
1684
|
+
}
|
|
1685
|
+
if (this._quoteMark !== quoteMark) {
|
|
1686
|
+
this._quoteMark = quoteMark;
|
|
1687
|
+
this._syncRawValue();
|
|
1688
|
+
}
|
|
1689
|
+
},
|
|
1690
|
+
enumerable: false,
|
|
1691
|
+
configurable: true
|
|
1692
|
+
});
|
|
1693
|
+
Attribute2.prototype._syncRawValue = function() {
|
|
1694
|
+
var rawValue = (0, cssesc_1.default)(this._value, CSSESC_QUOTE_OPTIONS[this.quoteMark]);
|
|
1695
|
+
if (rawValue === this._value) {
|
|
1696
|
+
if (this.raws) {
|
|
1697
|
+
delete this.raws.value;
|
|
1698
|
+
}
|
|
1699
|
+
} else {
|
|
1700
|
+
this.raws.value = rawValue;
|
|
1701
|
+
}
|
|
1702
|
+
};
|
|
1703
|
+
Object.defineProperty(Attribute2.prototype, "qualifiedAttribute", {
|
|
1704
|
+
get: function() {
|
|
1705
|
+
return this.qualifiedName(this.raws.attribute || this.attribute);
|
|
1706
|
+
},
|
|
1707
|
+
enumerable: false,
|
|
1708
|
+
configurable: true
|
|
1709
|
+
});
|
|
1710
|
+
Object.defineProperty(Attribute2.prototype, "insensitiveFlag", {
|
|
1711
|
+
get: function() {
|
|
1712
|
+
return this.insensitive ? "i" : "";
|
|
1713
|
+
},
|
|
1714
|
+
enumerable: false,
|
|
1715
|
+
configurable: true
|
|
1716
|
+
});
|
|
1717
|
+
Object.defineProperty(Attribute2.prototype, "value", {
|
|
1718
|
+
get: function() {
|
|
1719
|
+
return this._value;
|
|
1720
|
+
},
|
|
1721
|
+
/**
|
|
1722
|
+
* Before 3.0, the value had to be set to an escaped value including any wrapped
|
|
1723
|
+
* quote marks. In 3.0, the semantics of `Attribute.value` changed so that the value
|
|
1724
|
+
* is unescaped during parsing and any quote marks are removed.
|
|
1725
|
+
*
|
|
1726
|
+
* Because the ambiguity of this semantic change, if you set `attr.value = newValue`,
|
|
1727
|
+
* a deprecation warning is raised when the new value contains any characters that would
|
|
1728
|
+
* require escaping (including if it contains wrapped quotes).
|
|
1729
|
+
*
|
|
1730
|
+
* Instead, you should call `attr.setValue(newValue, opts)` and pass options that describe
|
|
1731
|
+
* how the new value is quoted.
|
|
1732
|
+
*/
|
|
1733
|
+
set: function(v) {
|
|
1734
|
+
if (this._constructed) {
|
|
1735
|
+
var _a2 = unescapeValue(v), deprecatedUsage = _a2.deprecatedUsage, unescaped = _a2.unescaped, quoteMark = _a2.quoteMark;
|
|
1736
|
+
if (deprecatedUsage) {
|
|
1737
|
+
warnOfDeprecatedValueAssignment();
|
|
1738
|
+
}
|
|
1739
|
+
if (unescaped === this._value && quoteMark === this._quoteMark) {
|
|
1740
|
+
return;
|
|
1741
|
+
}
|
|
1742
|
+
this._value = unescaped;
|
|
1743
|
+
this._quoteMark = quoteMark;
|
|
1744
|
+
this._syncRawValue();
|
|
1745
|
+
} else {
|
|
1746
|
+
this._value = v;
|
|
1747
|
+
}
|
|
1748
|
+
},
|
|
1749
|
+
enumerable: false,
|
|
1750
|
+
configurable: true
|
|
1751
|
+
});
|
|
1752
|
+
Object.defineProperty(Attribute2.prototype, "insensitive", {
|
|
1753
|
+
get: function() {
|
|
1754
|
+
return this._insensitive;
|
|
1755
|
+
},
|
|
1756
|
+
/**
|
|
1757
|
+
* Set the case insensitive flag.
|
|
1758
|
+
* If the case insensitive flag changes, the raw (escaped) value at `attr.raws.insensitiveFlag`
|
|
1759
|
+
* of the attribute is updated accordingly.
|
|
1760
|
+
*
|
|
1761
|
+
* @param {true | false} insensitive true if the attribute should match case-insensitively.
|
|
1762
|
+
*/
|
|
1763
|
+
set: function(insensitive) {
|
|
1764
|
+
if (!insensitive) {
|
|
1765
|
+
this._insensitive = false;
|
|
1766
|
+
if (this.raws && (this.raws.insensitiveFlag === "I" || this.raws.insensitiveFlag === "i")) {
|
|
1767
|
+
this.raws.insensitiveFlag = void 0;
|
|
1768
|
+
}
|
|
1769
|
+
}
|
|
1770
|
+
this._insensitive = insensitive;
|
|
1771
|
+
},
|
|
1772
|
+
enumerable: false,
|
|
1773
|
+
configurable: true
|
|
1774
|
+
});
|
|
1775
|
+
Object.defineProperty(Attribute2.prototype, "attribute", {
|
|
1776
|
+
get: function() {
|
|
1777
|
+
return this._attribute;
|
|
1778
|
+
},
|
|
1779
|
+
set: function(name) {
|
|
1780
|
+
this._handleEscapes("attribute", name);
|
|
1781
|
+
this._attribute = name;
|
|
1782
|
+
},
|
|
1783
|
+
enumerable: false,
|
|
1784
|
+
configurable: true
|
|
1785
|
+
});
|
|
1786
|
+
Attribute2.prototype._handleEscapes = function(prop, value) {
|
|
1787
|
+
if (this._constructed) {
|
|
1788
|
+
var escaped = (0, cssesc_1.default)(value, { isIdentifier: true });
|
|
1789
|
+
if (escaped !== value) {
|
|
1790
|
+
this.raws[prop] = escaped;
|
|
1791
|
+
} else {
|
|
1792
|
+
delete this.raws[prop];
|
|
1793
|
+
}
|
|
1794
|
+
}
|
|
1795
|
+
};
|
|
1796
|
+
Attribute2.prototype._spacesFor = function(name) {
|
|
1797
|
+
var attrSpaces = { before: "", after: "" };
|
|
1798
|
+
var spaces = this.spaces[name] || {};
|
|
1799
|
+
var rawSpaces = this.raws.spaces && this.raws.spaces[name] || {};
|
|
1800
|
+
return Object.assign(attrSpaces, spaces, rawSpaces);
|
|
1801
|
+
};
|
|
1802
|
+
Attribute2.prototype._stringFor = function(name, spaceName, concat) {
|
|
1803
|
+
if (spaceName === void 0) {
|
|
1804
|
+
spaceName = name;
|
|
1805
|
+
}
|
|
1806
|
+
if (concat === void 0) {
|
|
1807
|
+
concat = defaultAttrConcat;
|
|
1808
|
+
}
|
|
1809
|
+
var attrSpaces = this._spacesFor(spaceName);
|
|
1810
|
+
return concat(this.stringifyProperty(name), attrSpaces);
|
|
1811
|
+
};
|
|
1812
|
+
Attribute2.prototype.offsetOf = function(name) {
|
|
1813
|
+
var count = 1;
|
|
1814
|
+
var attributeSpaces = this._spacesFor("attribute");
|
|
1815
|
+
count += attributeSpaces.before.length;
|
|
1816
|
+
if (name === "namespace" || name === "ns") {
|
|
1817
|
+
return this.namespace ? count : -1;
|
|
1818
|
+
}
|
|
1819
|
+
if (name === "attributeNS") {
|
|
1820
|
+
return count;
|
|
1821
|
+
}
|
|
1822
|
+
count += this.namespaceString.length;
|
|
1823
|
+
if (this.namespace) {
|
|
1824
|
+
count += 1;
|
|
1825
|
+
}
|
|
1826
|
+
if (name === "attribute") {
|
|
1827
|
+
return count;
|
|
1828
|
+
}
|
|
1829
|
+
count += this.stringifyProperty("attribute").length;
|
|
1830
|
+
count += attributeSpaces.after.length;
|
|
1831
|
+
var operatorSpaces = this._spacesFor("operator");
|
|
1832
|
+
count += operatorSpaces.before.length;
|
|
1833
|
+
var operator = this.stringifyProperty("operator");
|
|
1834
|
+
if (name === "operator") {
|
|
1835
|
+
return operator ? count : -1;
|
|
1836
|
+
}
|
|
1837
|
+
count += operator.length;
|
|
1838
|
+
count += operatorSpaces.after.length;
|
|
1839
|
+
var valueSpaces = this._spacesFor("value");
|
|
1840
|
+
count += valueSpaces.before.length;
|
|
1841
|
+
var value = this.stringifyProperty("value");
|
|
1842
|
+
if (name === "value") {
|
|
1843
|
+
return value ? count : -1;
|
|
1844
|
+
}
|
|
1845
|
+
count += value.length;
|
|
1846
|
+
count += valueSpaces.after.length;
|
|
1847
|
+
var insensitiveSpaces = this._spacesFor("insensitive");
|
|
1848
|
+
count += insensitiveSpaces.before.length;
|
|
1849
|
+
if (name === "insensitive") {
|
|
1850
|
+
return this.insensitive ? count : -1;
|
|
1851
|
+
}
|
|
1852
|
+
return -1;
|
|
1853
|
+
};
|
|
1854
|
+
Attribute2.prototype.toString = function() {
|
|
1855
|
+
var _this = this;
|
|
1856
|
+
var selector = [this.rawSpaceBefore, "["];
|
|
1857
|
+
selector.push(this._stringFor("qualifiedAttribute", "attribute"));
|
|
1858
|
+
if (this.operator && (this.value || this.value === "")) {
|
|
1859
|
+
selector.push(this._stringFor("operator"));
|
|
1860
|
+
selector.push(this._stringFor("value"));
|
|
1861
|
+
selector.push(this._stringFor("insensitiveFlag", "insensitive", function(attrValue, attrSpaces) {
|
|
1862
|
+
if (attrValue.length > 0 && !_this.quoted && attrSpaces.before.length === 0 && !(_this.spaces.value && _this.spaces.value.after)) {
|
|
1863
|
+
attrSpaces.before = " ";
|
|
1864
|
+
}
|
|
1865
|
+
return defaultAttrConcat(attrValue, attrSpaces);
|
|
1866
|
+
}));
|
|
1867
|
+
}
|
|
1868
|
+
selector.push("]");
|
|
1869
|
+
selector.push(this.rawSpaceAfter);
|
|
1870
|
+
return selector.join("");
|
|
1871
|
+
};
|
|
1872
|
+
Attribute2.NO_QUOTE = null;
|
|
1873
|
+
Attribute2.SINGLE_QUOTE = "'";
|
|
1874
|
+
Attribute2.DOUBLE_QUOTE = '"';
|
|
1875
|
+
return Attribute2;
|
|
1876
|
+
})(namespace_1.default)
|
|
1877
|
+
);
|
|
1878
|
+
exports.default = Attribute;
|
|
1879
|
+
var CSSESC_QUOTE_OPTIONS = (_a = {
|
|
1880
|
+
"'": { quotes: "single", wrap: true },
|
|
1881
|
+
'"': { quotes: "double", wrap: true }
|
|
1882
|
+
}, _a[null] = { isIdentifier: true }, _a);
|
|
1883
|
+
function defaultAttrConcat(attrValue, attrSpaces) {
|
|
1884
|
+
return "".concat(attrSpaces.before).concat(attrValue).concat(attrSpaces.after);
|
|
1885
|
+
}
|
|
1886
|
+
}
|
|
1887
|
+
});
|
|
1888
|
+
|
|
1889
|
+
// ../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/universal.js
|
|
1890
|
+
var require_universal = __commonJS({
|
|
1891
|
+
"../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/universal.js"(exports) {
|
|
1892
|
+
"use strict";
|
|
1893
|
+
var __extends = exports && exports.__extends || /* @__PURE__ */ (function() {
|
|
1894
|
+
var extendStatics = function(d, b) {
|
|
1895
|
+
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
|
|
1896
|
+
d2.__proto__ = b2;
|
|
1897
|
+
} || function(d2, b2) {
|
|
1898
|
+
for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p];
|
|
1899
|
+
};
|
|
1900
|
+
return extendStatics(d, b);
|
|
1901
|
+
};
|
|
1902
|
+
return function(d, b) {
|
|
1903
|
+
if (typeof b !== "function" && b !== null)
|
|
1904
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
1905
|
+
extendStatics(d, b);
|
|
1906
|
+
function __() {
|
|
1907
|
+
this.constructor = d;
|
|
1908
|
+
}
|
|
1909
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
1910
|
+
};
|
|
1911
|
+
})();
|
|
1912
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
1913
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
1914
|
+
};
|
|
1915
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1916
|
+
var namespace_1 = __importDefault(require_namespace());
|
|
1917
|
+
var types_1 = require_types();
|
|
1918
|
+
var Universal = (
|
|
1919
|
+
/** @class */
|
|
1920
|
+
(function(_super) {
|
|
1921
|
+
__extends(Universal2, _super);
|
|
1922
|
+
function Universal2(opts) {
|
|
1923
|
+
var _this = _super.call(this, opts) || this;
|
|
1924
|
+
_this.type = types_1.UNIVERSAL;
|
|
1925
|
+
_this.value = "*";
|
|
1926
|
+
return _this;
|
|
1927
|
+
}
|
|
1928
|
+
return Universal2;
|
|
1929
|
+
})(namespace_1.default)
|
|
1930
|
+
);
|
|
1931
|
+
exports.default = Universal;
|
|
1932
|
+
}
|
|
1933
|
+
});
|
|
1934
|
+
|
|
1935
|
+
// ../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/combinator.js
|
|
1936
|
+
var require_combinator = __commonJS({
|
|
1937
|
+
"../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/combinator.js"(exports) {
|
|
1938
|
+
"use strict";
|
|
1939
|
+
var __extends = exports && exports.__extends || /* @__PURE__ */ (function() {
|
|
1940
|
+
var extendStatics = function(d, b) {
|
|
1941
|
+
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
|
|
1942
|
+
d2.__proto__ = b2;
|
|
1943
|
+
} || function(d2, b2) {
|
|
1944
|
+
for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p];
|
|
1945
|
+
};
|
|
1946
|
+
return extendStatics(d, b);
|
|
1947
|
+
};
|
|
1948
|
+
return function(d, b) {
|
|
1949
|
+
if (typeof b !== "function" && b !== null)
|
|
1950
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
1951
|
+
extendStatics(d, b);
|
|
1952
|
+
function __() {
|
|
1953
|
+
this.constructor = d;
|
|
1954
|
+
}
|
|
1955
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
1956
|
+
};
|
|
1957
|
+
})();
|
|
1958
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
1959
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
1960
|
+
};
|
|
1961
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1962
|
+
var node_1 = __importDefault(require_node());
|
|
1963
|
+
var types_1 = require_types();
|
|
1964
|
+
var Combinator = (
|
|
1965
|
+
/** @class */
|
|
1966
|
+
(function(_super) {
|
|
1967
|
+
__extends(Combinator2, _super);
|
|
1968
|
+
function Combinator2(opts) {
|
|
1969
|
+
var _this = _super.call(this, opts) || this;
|
|
1970
|
+
_this.type = types_1.COMBINATOR;
|
|
1971
|
+
return _this;
|
|
1972
|
+
}
|
|
1973
|
+
return Combinator2;
|
|
1974
|
+
})(node_1.default)
|
|
1975
|
+
);
|
|
1976
|
+
exports.default = Combinator;
|
|
1977
|
+
}
|
|
1978
|
+
});
|
|
1979
|
+
|
|
1980
|
+
// ../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/nesting.js
|
|
1981
|
+
var require_nesting = __commonJS({
|
|
1982
|
+
"../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/nesting.js"(exports) {
|
|
1983
|
+
"use strict";
|
|
1984
|
+
var __extends = exports && exports.__extends || /* @__PURE__ */ (function() {
|
|
1985
|
+
var extendStatics = function(d, b) {
|
|
1986
|
+
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
|
|
1987
|
+
d2.__proto__ = b2;
|
|
1988
|
+
} || function(d2, b2) {
|
|
1989
|
+
for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p];
|
|
1990
|
+
};
|
|
1991
|
+
return extendStatics(d, b);
|
|
1992
|
+
};
|
|
1993
|
+
return function(d, b) {
|
|
1994
|
+
if (typeof b !== "function" && b !== null)
|
|
1995
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
1996
|
+
extendStatics(d, b);
|
|
1997
|
+
function __() {
|
|
1998
|
+
this.constructor = d;
|
|
1999
|
+
}
|
|
2000
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
2001
|
+
};
|
|
2002
|
+
})();
|
|
2003
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
2004
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
2005
|
+
};
|
|
2006
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2007
|
+
var node_1 = __importDefault(require_node());
|
|
2008
|
+
var types_1 = require_types();
|
|
2009
|
+
var Nesting = (
|
|
2010
|
+
/** @class */
|
|
2011
|
+
(function(_super) {
|
|
2012
|
+
__extends(Nesting2, _super);
|
|
2013
|
+
function Nesting2(opts) {
|
|
2014
|
+
var _this = _super.call(this, opts) || this;
|
|
2015
|
+
_this.type = types_1.NESTING;
|
|
2016
|
+
_this.value = "&";
|
|
2017
|
+
return _this;
|
|
2018
|
+
}
|
|
2019
|
+
return Nesting2;
|
|
2020
|
+
})(node_1.default)
|
|
2021
|
+
);
|
|
2022
|
+
exports.default = Nesting;
|
|
2023
|
+
}
|
|
2024
|
+
});
|
|
2025
|
+
|
|
2026
|
+
// ../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/sortAscending.js
|
|
2027
|
+
var require_sortAscending = __commonJS({
|
|
2028
|
+
"../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/sortAscending.js"(exports) {
|
|
2029
|
+
"use strict";
|
|
2030
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2031
|
+
exports.default = sortAscending;
|
|
2032
|
+
function sortAscending(list) {
|
|
2033
|
+
return list.sort(function(a, b) {
|
|
2034
|
+
return a - b;
|
|
2035
|
+
});
|
|
2036
|
+
}
|
|
2037
|
+
}
|
|
2038
|
+
});
|
|
2039
|
+
|
|
2040
|
+
// ../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/tokenTypes.js
|
|
2041
|
+
var require_tokenTypes = __commonJS({
|
|
2042
|
+
"../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/tokenTypes.js"(exports) {
|
|
2043
|
+
"use strict";
|
|
2044
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2045
|
+
exports.combinator = exports.word = exports.comment = exports.str = exports.tab = exports.newline = exports.feed = exports.cr = exports.backslash = exports.bang = exports.slash = exports.doubleQuote = exports.singleQuote = exports.space = exports.greaterThan = exports.pipe = exports.equals = exports.plus = exports.caret = exports.tilde = exports.dollar = exports.closeSquare = exports.openSquare = exports.closeParenthesis = exports.openParenthesis = exports.semicolon = exports.colon = exports.comma = exports.at = exports.asterisk = exports.ampersand = void 0;
|
|
2046
|
+
exports.ampersand = 38;
|
|
2047
|
+
exports.asterisk = 42;
|
|
2048
|
+
exports.at = 64;
|
|
2049
|
+
exports.comma = 44;
|
|
2050
|
+
exports.colon = 58;
|
|
2051
|
+
exports.semicolon = 59;
|
|
2052
|
+
exports.openParenthesis = 40;
|
|
2053
|
+
exports.closeParenthesis = 41;
|
|
2054
|
+
exports.openSquare = 91;
|
|
2055
|
+
exports.closeSquare = 93;
|
|
2056
|
+
exports.dollar = 36;
|
|
2057
|
+
exports.tilde = 126;
|
|
2058
|
+
exports.caret = 94;
|
|
2059
|
+
exports.plus = 43;
|
|
2060
|
+
exports.equals = 61;
|
|
2061
|
+
exports.pipe = 124;
|
|
2062
|
+
exports.greaterThan = 62;
|
|
2063
|
+
exports.space = 32;
|
|
2064
|
+
exports.singleQuote = 39;
|
|
2065
|
+
exports.doubleQuote = 34;
|
|
2066
|
+
exports.slash = 47;
|
|
2067
|
+
exports.bang = 33;
|
|
2068
|
+
exports.backslash = 92;
|
|
2069
|
+
exports.cr = 13;
|
|
2070
|
+
exports.feed = 12;
|
|
2071
|
+
exports.newline = 10;
|
|
2072
|
+
exports.tab = 9;
|
|
2073
|
+
exports.str = exports.singleQuote;
|
|
2074
|
+
exports.comment = -1;
|
|
2075
|
+
exports.word = -2;
|
|
2076
|
+
exports.combinator = -3;
|
|
2077
|
+
}
|
|
2078
|
+
});
|
|
2079
|
+
|
|
2080
|
+
// ../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/tokenize.js
|
|
2081
|
+
var require_tokenize = __commonJS({
|
|
2082
|
+
"../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/tokenize.js"(exports) {
|
|
2083
|
+
"use strict";
|
|
2084
|
+
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
2085
|
+
if (k2 === void 0) k2 = k;
|
|
2086
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
2087
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
2088
|
+
desc = { enumerable: true, get: function() {
|
|
2089
|
+
return m[k];
|
|
2090
|
+
} };
|
|
2091
|
+
}
|
|
2092
|
+
Object.defineProperty(o, k2, desc);
|
|
2093
|
+
}) : (function(o, m, k, k2) {
|
|
2094
|
+
if (k2 === void 0) k2 = k;
|
|
2095
|
+
o[k2] = m[k];
|
|
2096
|
+
}));
|
|
2097
|
+
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) {
|
|
2098
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
2099
|
+
}) : function(o, v) {
|
|
2100
|
+
o["default"] = v;
|
|
2101
|
+
});
|
|
2102
|
+
var __importStar = exports && exports.__importStar || /* @__PURE__ */ (function() {
|
|
2103
|
+
var ownKeys = function(o) {
|
|
2104
|
+
ownKeys = Object.getOwnPropertyNames || function(o2) {
|
|
2105
|
+
var ar = [];
|
|
2106
|
+
for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k;
|
|
2107
|
+
return ar;
|
|
2108
|
+
};
|
|
2109
|
+
return ownKeys(o);
|
|
2110
|
+
};
|
|
2111
|
+
return function(mod) {
|
|
2112
|
+
if (mod && mod.__esModule) return mod;
|
|
2113
|
+
var result = {};
|
|
2114
|
+
if (mod != null) {
|
|
2115
|
+
for (var k = ownKeys(mod), i2 = 0; i2 < k.length; i2++) if (k[i2] !== "default") __createBinding(result, mod, k[i2]);
|
|
2116
|
+
}
|
|
2117
|
+
__setModuleDefault(result, mod);
|
|
2118
|
+
return result;
|
|
2119
|
+
};
|
|
2120
|
+
})();
|
|
2121
|
+
var _a;
|
|
2122
|
+
var _b;
|
|
2123
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2124
|
+
exports.FIELDS = void 0;
|
|
2125
|
+
exports.default = tokenize;
|
|
2126
|
+
var t = __importStar(require_tokenTypes());
|
|
2127
|
+
var unescapable = (_a = {}, _a[t.tab] = true, _a[t.newline] = true, _a[t.cr] = true, _a[t.feed] = true, _a);
|
|
2128
|
+
var wordDelimiters = (_b = {}, _b[t.space] = true, _b[t.tab] = true, _b[t.newline] = true, _b[t.cr] = true, _b[t.feed] = true, _b[t.ampersand] = true, _b[t.asterisk] = true, _b[t.bang] = true, _b[t.comma] = true, _b[t.colon] = true, _b[t.semicolon] = true, _b[t.openParenthesis] = true, _b[t.closeParenthesis] = true, _b[t.openSquare] = true, _b[t.closeSquare] = true, _b[t.singleQuote] = true, _b[t.doubleQuote] = true, _b[t.plus] = true, _b[t.pipe] = true, _b[t.tilde] = true, _b[t.greaterThan] = true, _b[t.equals] = true, _b[t.dollar] = true, _b[t.caret] = true, _b[t.slash] = true, _b);
|
|
2129
|
+
var hex = {};
|
|
2130
|
+
var hexChars = "0123456789abcdefABCDEF";
|
|
2131
|
+
for (i = 0; i < hexChars.length; i++) {
|
|
2132
|
+
hex[hexChars.charCodeAt(i)] = true;
|
|
2133
|
+
}
|
|
2134
|
+
var i;
|
|
2135
|
+
function consumeWord(css, start) {
|
|
2136
|
+
var next = start;
|
|
2137
|
+
var code;
|
|
2138
|
+
do {
|
|
2139
|
+
code = css.charCodeAt(next);
|
|
2140
|
+
if (wordDelimiters[code]) {
|
|
2141
|
+
return next - 1;
|
|
2142
|
+
} else if (code === t.backslash) {
|
|
2143
|
+
next = consumeEscape(css, next) + 1;
|
|
2144
|
+
} else {
|
|
2145
|
+
next++;
|
|
2146
|
+
}
|
|
2147
|
+
} while (next < css.length);
|
|
2148
|
+
return next - 1;
|
|
2149
|
+
}
|
|
2150
|
+
function consumeEscape(css, start) {
|
|
2151
|
+
var next = start;
|
|
2152
|
+
var code = css.charCodeAt(next + 1);
|
|
2153
|
+
if (unescapable[code]) {
|
|
2154
|
+
} else if (hex[code]) {
|
|
2155
|
+
var hexDigits = 0;
|
|
2156
|
+
do {
|
|
2157
|
+
next++;
|
|
2158
|
+
hexDigits++;
|
|
2159
|
+
code = css.charCodeAt(next + 1);
|
|
2160
|
+
} while (hex[code] && hexDigits < 6);
|
|
2161
|
+
if (hexDigits < 6 && code === t.space) {
|
|
2162
|
+
next++;
|
|
2163
|
+
}
|
|
2164
|
+
} else {
|
|
2165
|
+
next++;
|
|
2166
|
+
}
|
|
2167
|
+
return next;
|
|
2168
|
+
}
|
|
2169
|
+
exports.FIELDS = {
|
|
2170
|
+
TYPE: 0,
|
|
2171
|
+
START_LINE: 1,
|
|
2172
|
+
START_COL: 2,
|
|
2173
|
+
END_LINE: 3,
|
|
2174
|
+
END_COL: 4,
|
|
2175
|
+
START_POS: 5,
|
|
2176
|
+
END_POS: 6
|
|
2177
|
+
};
|
|
2178
|
+
function tokenize(input) {
|
|
2179
|
+
var tokens = [];
|
|
2180
|
+
var css = input.css.valueOf();
|
|
2181
|
+
var length = css.length;
|
|
2182
|
+
var offset = -1;
|
|
2183
|
+
var line = 1;
|
|
2184
|
+
var start = 0;
|
|
2185
|
+
var end = 0;
|
|
2186
|
+
var code, content, endColumn, endLine, escaped, escapePos, last, lines, next, nextLine, nextOffset, quote, tokenType;
|
|
2187
|
+
function unclosed(what, fix) {
|
|
2188
|
+
if (input.safe) {
|
|
2189
|
+
css += fix;
|
|
2190
|
+
next = css.length - 1;
|
|
2191
|
+
} else {
|
|
2192
|
+
throw input.error("Unclosed " + what, line, start - offset, start);
|
|
2193
|
+
}
|
|
2194
|
+
}
|
|
2195
|
+
while (start < length) {
|
|
2196
|
+
code = css.charCodeAt(start);
|
|
2197
|
+
if (code === t.newline) {
|
|
2198
|
+
offset = start;
|
|
2199
|
+
line += 1;
|
|
2200
|
+
}
|
|
2201
|
+
switch (code) {
|
|
2202
|
+
case t.space:
|
|
2203
|
+
case t.tab:
|
|
2204
|
+
case t.newline:
|
|
2205
|
+
case t.cr:
|
|
2206
|
+
case t.feed:
|
|
2207
|
+
next = start;
|
|
2208
|
+
do {
|
|
2209
|
+
next += 1;
|
|
2210
|
+
code = css.charCodeAt(next);
|
|
2211
|
+
if (code === t.newline) {
|
|
2212
|
+
offset = next;
|
|
2213
|
+
line += 1;
|
|
2214
|
+
}
|
|
2215
|
+
} while (code === t.space || code === t.newline || code === t.tab || code === t.cr || code === t.feed);
|
|
2216
|
+
tokenType = t.space;
|
|
2217
|
+
endLine = line;
|
|
2218
|
+
endColumn = next - offset - 1;
|
|
2219
|
+
end = next;
|
|
2220
|
+
break;
|
|
2221
|
+
case t.plus:
|
|
2222
|
+
case t.greaterThan:
|
|
2223
|
+
case t.tilde:
|
|
2224
|
+
case t.pipe:
|
|
2225
|
+
next = start;
|
|
2226
|
+
do {
|
|
2227
|
+
next += 1;
|
|
2228
|
+
code = css.charCodeAt(next);
|
|
2229
|
+
} while (code === t.plus || code === t.greaterThan || code === t.tilde || code === t.pipe);
|
|
2230
|
+
tokenType = t.combinator;
|
|
2231
|
+
endLine = line;
|
|
2232
|
+
endColumn = start - offset;
|
|
2233
|
+
end = next;
|
|
2234
|
+
break;
|
|
2235
|
+
// Consume these characters as single tokens.
|
|
2236
|
+
case t.asterisk:
|
|
2237
|
+
case t.ampersand:
|
|
2238
|
+
case t.bang:
|
|
2239
|
+
case t.comma:
|
|
2240
|
+
case t.equals:
|
|
2241
|
+
case t.dollar:
|
|
2242
|
+
case t.caret:
|
|
2243
|
+
case t.openSquare:
|
|
2244
|
+
case t.closeSquare:
|
|
2245
|
+
case t.colon:
|
|
2246
|
+
case t.semicolon:
|
|
2247
|
+
case t.openParenthesis:
|
|
2248
|
+
case t.closeParenthesis:
|
|
2249
|
+
next = start;
|
|
2250
|
+
tokenType = code;
|
|
2251
|
+
endLine = line;
|
|
2252
|
+
endColumn = start - offset;
|
|
2253
|
+
end = next + 1;
|
|
2254
|
+
break;
|
|
2255
|
+
case t.singleQuote:
|
|
2256
|
+
case t.doubleQuote:
|
|
2257
|
+
quote = code === t.singleQuote ? "'" : '"';
|
|
2258
|
+
next = start;
|
|
2259
|
+
do {
|
|
2260
|
+
escaped = false;
|
|
2261
|
+
next = css.indexOf(quote, next + 1);
|
|
2262
|
+
if (next === -1) {
|
|
2263
|
+
unclosed("quote", quote);
|
|
2264
|
+
}
|
|
2265
|
+
escapePos = next;
|
|
2266
|
+
while (css.charCodeAt(escapePos - 1) === t.backslash) {
|
|
2267
|
+
escapePos -= 1;
|
|
2268
|
+
escaped = !escaped;
|
|
2269
|
+
}
|
|
2270
|
+
} while (escaped);
|
|
2271
|
+
tokenType = t.str;
|
|
2272
|
+
endLine = line;
|
|
2273
|
+
endColumn = start - offset;
|
|
2274
|
+
end = next + 1;
|
|
2275
|
+
break;
|
|
2276
|
+
default:
|
|
2277
|
+
if (code === t.slash && css.charCodeAt(start + 1) === t.asterisk) {
|
|
2278
|
+
next = css.indexOf("*/", start + 2) + 1;
|
|
2279
|
+
if (next === 0) {
|
|
2280
|
+
unclosed("comment", "*/");
|
|
2281
|
+
}
|
|
2282
|
+
content = css.slice(start, next + 1);
|
|
2283
|
+
lines = content.split("\n");
|
|
2284
|
+
last = lines.length - 1;
|
|
2285
|
+
if (last > 0) {
|
|
2286
|
+
nextLine = line + last;
|
|
2287
|
+
nextOffset = next - lines[last].length;
|
|
2288
|
+
} else {
|
|
2289
|
+
nextLine = line;
|
|
2290
|
+
nextOffset = offset;
|
|
2291
|
+
}
|
|
2292
|
+
tokenType = t.comment;
|
|
2293
|
+
line = nextLine;
|
|
2294
|
+
endLine = nextLine;
|
|
2295
|
+
endColumn = next - nextOffset;
|
|
2296
|
+
} else if (code === t.slash) {
|
|
2297
|
+
next = start;
|
|
2298
|
+
tokenType = code;
|
|
2299
|
+
endLine = line;
|
|
2300
|
+
endColumn = start - offset;
|
|
2301
|
+
end = next + 1;
|
|
2302
|
+
} else {
|
|
2303
|
+
next = consumeWord(css, start);
|
|
2304
|
+
tokenType = t.word;
|
|
2305
|
+
endLine = line;
|
|
2306
|
+
endColumn = next - offset;
|
|
2307
|
+
}
|
|
2308
|
+
end = next + 1;
|
|
2309
|
+
break;
|
|
2310
|
+
}
|
|
2311
|
+
tokens.push([
|
|
2312
|
+
tokenType,
|
|
2313
|
+
// [0] Token type
|
|
2314
|
+
line,
|
|
2315
|
+
// [1] Starting line
|
|
2316
|
+
start - offset,
|
|
2317
|
+
// [2] Starting column
|
|
2318
|
+
endLine,
|
|
2319
|
+
// [3] Ending line
|
|
2320
|
+
endColumn,
|
|
2321
|
+
// [4] Ending column
|
|
2322
|
+
start,
|
|
2323
|
+
// [5] Start position / Source index
|
|
2324
|
+
end
|
|
2325
|
+
// [6] End position
|
|
2326
|
+
]);
|
|
2327
|
+
if (nextOffset) {
|
|
2328
|
+
offset = nextOffset;
|
|
2329
|
+
nextOffset = null;
|
|
2330
|
+
}
|
|
2331
|
+
start = end;
|
|
2332
|
+
}
|
|
2333
|
+
return tokens;
|
|
2334
|
+
}
|
|
2335
|
+
}
|
|
2336
|
+
});
|
|
2337
|
+
|
|
2338
|
+
// ../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/parser.js
|
|
2339
|
+
var require_parser = __commonJS({
|
|
2340
|
+
"../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/parser.js"(exports) {
|
|
2341
|
+
"use strict";
|
|
2342
|
+
var __assign = exports && exports.__assign || function() {
|
|
2343
|
+
__assign = Object.assign || function(t) {
|
|
2344
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
2345
|
+
s = arguments[i];
|
|
2346
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
2347
|
+
t[p] = s[p];
|
|
2348
|
+
}
|
|
2349
|
+
return t;
|
|
2350
|
+
};
|
|
2351
|
+
return __assign.apply(this, arguments);
|
|
2352
|
+
};
|
|
2353
|
+
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
2354
|
+
if (k2 === void 0) k2 = k;
|
|
2355
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
2356
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
2357
|
+
desc = { enumerable: true, get: function() {
|
|
2358
|
+
return m[k];
|
|
2359
|
+
} };
|
|
2360
|
+
}
|
|
2361
|
+
Object.defineProperty(o, k2, desc);
|
|
2362
|
+
}) : (function(o, m, k, k2) {
|
|
2363
|
+
if (k2 === void 0) k2 = k;
|
|
2364
|
+
o[k2] = m[k];
|
|
2365
|
+
}));
|
|
2366
|
+
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) {
|
|
2367
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
2368
|
+
}) : function(o, v) {
|
|
2369
|
+
o["default"] = v;
|
|
2370
|
+
});
|
|
2371
|
+
var __importStar = exports && exports.__importStar || /* @__PURE__ */ (function() {
|
|
2372
|
+
var ownKeys = function(o) {
|
|
2373
|
+
ownKeys = Object.getOwnPropertyNames || function(o2) {
|
|
2374
|
+
var ar = [];
|
|
2375
|
+
for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k;
|
|
2376
|
+
return ar;
|
|
2377
|
+
};
|
|
2378
|
+
return ownKeys(o);
|
|
2379
|
+
};
|
|
2380
|
+
return function(mod) {
|
|
2381
|
+
if (mod && mod.__esModule) return mod;
|
|
2382
|
+
var result = {};
|
|
2383
|
+
if (mod != null) {
|
|
2384
|
+
for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
2385
|
+
}
|
|
2386
|
+
__setModuleDefault(result, mod);
|
|
2387
|
+
return result;
|
|
2388
|
+
};
|
|
2389
|
+
})();
|
|
2390
|
+
var __read = exports && exports.__read || function(o, n) {
|
|
2391
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
2392
|
+
if (!m) return o;
|
|
2393
|
+
var i = m.call(o), r, ar = [], e;
|
|
2394
|
+
try {
|
|
2395
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
2396
|
+
} catch (error) {
|
|
2397
|
+
e = { error };
|
|
2398
|
+
} finally {
|
|
2399
|
+
try {
|
|
2400
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
2401
|
+
} finally {
|
|
2402
|
+
if (e) throw e.error;
|
|
2403
|
+
}
|
|
2404
|
+
}
|
|
2405
|
+
return ar;
|
|
2406
|
+
};
|
|
2407
|
+
var __spreadArray = exports && exports.__spreadArray || function(to, from, pack) {
|
|
2408
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
2409
|
+
if (ar || !(i in from)) {
|
|
2410
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
2411
|
+
ar[i] = from[i];
|
|
2412
|
+
}
|
|
2413
|
+
}
|
|
2414
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
2415
|
+
};
|
|
2416
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
2417
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
2418
|
+
};
|
|
2419
|
+
var _a;
|
|
2420
|
+
var _b;
|
|
2421
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2422
|
+
var root_1 = __importDefault(require_root());
|
|
2423
|
+
var selector_1 = __importDefault(require_selector());
|
|
2424
|
+
var className_1 = __importDefault(require_className());
|
|
2425
|
+
var comment_1 = __importDefault(require_comment());
|
|
2426
|
+
var id_1 = __importDefault(require_id());
|
|
2427
|
+
var tag_1 = __importDefault(require_tag());
|
|
2428
|
+
var string_1 = __importDefault(require_string());
|
|
2429
|
+
var pseudo_1 = __importDefault(require_pseudo());
|
|
2430
|
+
var attribute_1 = __importStar(require_attribute());
|
|
2431
|
+
var universal_1 = __importDefault(require_universal());
|
|
2432
|
+
var combinator_1 = __importDefault(require_combinator());
|
|
2433
|
+
var nesting_1 = __importDefault(require_nesting());
|
|
2434
|
+
var sortAscending_1 = __importDefault(require_sortAscending());
|
|
2435
|
+
var tokenize_1 = __importStar(require_tokenize());
|
|
2436
|
+
var tokens = __importStar(require_tokenTypes());
|
|
2437
|
+
var types = __importStar(require_types());
|
|
2438
|
+
var util_1 = require_util();
|
|
2439
|
+
var WHITESPACE_TOKENS = (_a = {}, _a[tokens.space] = true, _a[tokens.cr] = true, _a[tokens.feed] = true, _a[tokens.newline] = true, _a[tokens.tab] = true, _a);
|
|
2440
|
+
var WHITESPACE_EQUIV_TOKENS = __assign(__assign({}, WHITESPACE_TOKENS), (_b = {}, _b[tokens.comment] = true, _b));
|
|
2441
|
+
function tokenStart(token) {
|
|
2442
|
+
return {
|
|
2443
|
+
line: token[tokenize_1.FIELDS.START_LINE],
|
|
2444
|
+
column: token[tokenize_1.FIELDS.START_COL]
|
|
2445
|
+
};
|
|
2446
|
+
}
|
|
2447
|
+
function tokenEnd(token) {
|
|
2448
|
+
return {
|
|
2449
|
+
line: token[tokenize_1.FIELDS.END_LINE],
|
|
2450
|
+
column: token[tokenize_1.FIELDS.END_COL]
|
|
2451
|
+
};
|
|
2452
|
+
}
|
|
2453
|
+
function getSource(startLine, startColumn, endLine, endColumn) {
|
|
2454
|
+
return {
|
|
2455
|
+
start: {
|
|
2456
|
+
line: startLine,
|
|
2457
|
+
column: startColumn
|
|
2458
|
+
},
|
|
2459
|
+
end: {
|
|
2460
|
+
line: endLine,
|
|
2461
|
+
column: endColumn
|
|
2462
|
+
}
|
|
2463
|
+
};
|
|
2464
|
+
}
|
|
2465
|
+
function getTokenSource(token) {
|
|
2466
|
+
return getSource(token[tokenize_1.FIELDS.START_LINE], token[tokenize_1.FIELDS.START_COL], token[tokenize_1.FIELDS.END_LINE], token[tokenize_1.FIELDS.END_COL]);
|
|
2467
|
+
}
|
|
2468
|
+
function getTokenSourceSpan(startToken, endToken) {
|
|
2469
|
+
if (!startToken) {
|
|
2470
|
+
return void 0;
|
|
2471
|
+
}
|
|
2472
|
+
return getSource(startToken[tokenize_1.FIELDS.START_LINE], startToken[tokenize_1.FIELDS.START_COL], endToken[tokenize_1.FIELDS.END_LINE], endToken[tokenize_1.FIELDS.END_COL]);
|
|
2473
|
+
}
|
|
2474
|
+
function unescapeProp(node, prop) {
|
|
2475
|
+
var value = node[prop];
|
|
2476
|
+
if (typeof value !== "string") {
|
|
2477
|
+
return;
|
|
2478
|
+
}
|
|
2479
|
+
if (value.indexOf("\\") !== -1) {
|
|
2480
|
+
(0, util_1.ensureObject)(node, "raws");
|
|
2481
|
+
node[prop] = (0, util_1.unesc)(value);
|
|
2482
|
+
if (node.raws[prop] === void 0) {
|
|
2483
|
+
node.raws[prop] = value;
|
|
2484
|
+
}
|
|
2485
|
+
}
|
|
2486
|
+
return node;
|
|
2487
|
+
}
|
|
2488
|
+
function indexesOf(array, item) {
|
|
2489
|
+
var i = -1;
|
|
2490
|
+
var indexes = [];
|
|
2491
|
+
while ((i = array.indexOf(item, i + 1)) !== -1) {
|
|
2492
|
+
indexes.push(i);
|
|
2493
|
+
}
|
|
2494
|
+
return indexes;
|
|
2495
|
+
}
|
|
2496
|
+
function uniqs() {
|
|
2497
|
+
var list = Array.prototype.concat.apply([], arguments);
|
|
2498
|
+
return list.filter(function(item, i) {
|
|
2499
|
+
return i === list.indexOf(item);
|
|
2500
|
+
});
|
|
2501
|
+
}
|
|
2502
|
+
var Parser2 = (
|
|
2503
|
+
/** @class */
|
|
2504
|
+
(function() {
|
|
2505
|
+
function Parser3(rule, options) {
|
|
2506
|
+
if (options === void 0) {
|
|
2507
|
+
options = {};
|
|
2508
|
+
}
|
|
2509
|
+
this.rule = rule;
|
|
2510
|
+
this.options = Object.assign({ lossy: false, safe: false }, options);
|
|
2511
|
+
this.position = 0;
|
|
2512
|
+
this.nestingDepth = 0;
|
|
2513
|
+
this.maxNestingDepth = (0, util_1.resolveMaxNestingDepth)(this.options.maxNestingDepth);
|
|
2514
|
+
this.css = typeof this.rule === "string" ? this.rule : this.rule.selector;
|
|
2515
|
+
this.tokens = (0, tokenize_1.default)({
|
|
2516
|
+
css: this.css,
|
|
2517
|
+
error: this._errorGenerator(),
|
|
2518
|
+
safe: this.options.safe
|
|
2519
|
+
});
|
|
2520
|
+
var rootSource = getTokenSourceSpan(this.tokens[0], this.tokens[this.tokens.length - 1]);
|
|
2521
|
+
this.root = new root_1.default({ source: rootSource });
|
|
2522
|
+
this.root.errorGenerator = this._errorGenerator();
|
|
2523
|
+
var selector = new selector_1.default({
|
|
2524
|
+
source: { start: { line: 1, column: 1 } },
|
|
2525
|
+
sourceIndex: 0
|
|
2526
|
+
});
|
|
2527
|
+
this.root.append(selector);
|
|
2528
|
+
this.current = selector;
|
|
2529
|
+
this.loop();
|
|
2530
|
+
}
|
|
2531
|
+
Parser3.prototype._errorGenerator = function() {
|
|
2532
|
+
var _this = this;
|
|
2533
|
+
return function(message, errorOptions) {
|
|
2534
|
+
if (typeof _this.rule === "string") {
|
|
2535
|
+
return new Error(message);
|
|
2536
|
+
}
|
|
2537
|
+
return _this.rule.error(message, errorOptions);
|
|
2538
|
+
};
|
|
2539
|
+
};
|
|
2540
|
+
Parser3.prototype.attribute = function() {
|
|
2541
|
+
var attr = [];
|
|
2542
|
+
var startingToken = this.currToken;
|
|
2543
|
+
this.position++;
|
|
2544
|
+
while (this.position < this.tokens.length && this.currToken[tokenize_1.FIELDS.TYPE] !== tokens.closeSquare) {
|
|
2545
|
+
attr.push(this.currToken);
|
|
2546
|
+
this.position++;
|
|
2547
|
+
}
|
|
2548
|
+
if (this.currToken[tokenize_1.FIELDS.TYPE] !== tokens.closeSquare) {
|
|
2549
|
+
return this.expected("closing square bracket", this.currToken[tokenize_1.FIELDS.START_POS]);
|
|
2550
|
+
}
|
|
2551
|
+
var len = attr.length;
|
|
2552
|
+
var node = {
|
|
2553
|
+
source: getSource(startingToken[1], startingToken[2], this.currToken[3], this.currToken[4]),
|
|
2554
|
+
sourceIndex: startingToken[tokenize_1.FIELDS.START_POS]
|
|
2555
|
+
};
|
|
2556
|
+
if (len === 1 && !~[tokens.word].indexOf(attr[0][tokenize_1.FIELDS.TYPE])) {
|
|
2557
|
+
return this.expected("attribute", attr[0][tokenize_1.FIELDS.START_POS]);
|
|
2558
|
+
}
|
|
2559
|
+
var pos = 0;
|
|
2560
|
+
var spaceBefore = "";
|
|
2561
|
+
var commentBefore = "";
|
|
2562
|
+
var lastAdded = null;
|
|
2563
|
+
var spaceAfterMeaningfulToken = false;
|
|
2564
|
+
while (pos < len) {
|
|
2565
|
+
var token = attr[pos];
|
|
2566
|
+
var content = this.content(token);
|
|
2567
|
+
var next = attr[pos + 1];
|
|
2568
|
+
switch (token[tokenize_1.FIELDS.TYPE]) {
|
|
2569
|
+
case tokens.space:
|
|
2570
|
+
spaceAfterMeaningfulToken = true;
|
|
2571
|
+
if (this.options.lossy) {
|
|
2572
|
+
break;
|
|
2573
|
+
}
|
|
2574
|
+
if (lastAdded) {
|
|
2575
|
+
(0, util_1.ensureObject)(node, "spaces", lastAdded);
|
|
2576
|
+
var prevContent = node.spaces[lastAdded].after || "";
|
|
2577
|
+
node.spaces[lastAdded].after = prevContent + content;
|
|
2578
|
+
var existingComment = (0, util_1.getProp)(node, "raws", "spaces", lastAdded, "after") || null;
|
|
2579
|
+
if (existingComment) {
|
|
2580
|
+
node.raws.spaces[lastAdded].after = existingComment + content;
|
|
2581
|
+
}
|
|
2582
|
+
} else {
|
|
2583
|
+
spaceBefore = spaceBefore + content;
|
|
2584
|
+
commentBefore = commentBefore + content;
|
|
2585
|
+
}
|
|
2586
|
+
break;
|
|
2587
|
+
case tokens.asterisk:
|
|
2588
|
+
if (next[tokenize_1.FIELDS.TYPE] === tokens.equals) {
|
|
2589
|
+
node.operator = content;
|
|
2590
|
+
lastAdded = "operator";
|
|
2591
|
+
} else if ((!node.namespace || lastAdded === "namespace" && !spaceAfterMeaningfulToken) && next) {
|
|
2592
|
+
if (spaceBefore) {
|
|
2593
|
+
(0, util_1.ensureObject)(node, "spaces", "attribute");
|
|
2594
|
+
node.spaces.attribute.before = spaceBefore;
|
|
2595
|
+
spaceBefore = "";
|
|
2596
|
+
}
|
|
2597
|
+
if (commentBefore) {
|
|
2598
|
+
(0, util_1.ensureObject)(node, "raws", "spaces", "attribute");
|
|
2599
|
+
node.raws.spaces.attribute.before = spaceBefore;
|
|
2600
|
+
commentBefore = "";
|
|
2601
|
+
}
|
|
2602
|
+
node.namespace = (node.namespace || "") + content;
|
|
2603
|
+
var rawValue = (0, util_1.getProp)(node, "raws", "namespace") || null;
|
|
2604
|
+
if (rawValue) {
|
|
2605
|
+
node.raws.namespace += content;
|
|
2606
|
+
}
|
|
2607
|
+
lastAdded = "namespace";
|
|
2608
|
+
}
|
|
2609
|
+
spaceAfterMeaningfulToken = false;
|
|
2610
|
+
break;
|
|
2611
|
+
case tokens.dollar:
|
|
2612
|
+
if (lastAdded === "value") {
|
|
2613
|
+
var oldRawValue = (0, util_1.getProp)(node, "raws", "value");
|
|
2614
|
+
node.value += "$";
|
|
2615
|
+
if (oldRawValue) {
|
|
2616
|
+
node.raws.value = oldRawValue + "$";
|
|
2617
|
+
}
|
|
2618
|
+
break;
|
|
2619
|
+
}
|
|
2620
|
+
// Falls through
|
|
2621
|
+
case tokens.caret:
|
|
2622
|
+
if (next[tokenize_1.FIELDS.TYPE] === tokens.equals) {
|
|
2623
|
+
node.operator = content;
|
|
2624
|
+
lastAdded = "operator";
|
|
2625
|
+
}
|
|
2626
|
+
spaceAfterMeaningfulToken = false;
|
|
2627
|
+
break;
|
|
2628
|
+
case tokens.combinator:
|
|
2629
|
+
if (content === "~" && next[tokenize_1.FIELDS.TYPE] === tokens.equals) {
|
|
2630
|
+
node.operator = content;
|
|
2631
|
+
lastAdded = "operator";
|
|
2632
|
+
}
|
|
2633
|
+
if (content !== "|") {
|
|
2634
|
+
spaceAfterMeaningfulToken = false;
|
|
2635
|
+
break;
|
|
2636
|
+
}
|
|
2637
|
+
if (next[tokenize_1.FIELDS.TYPE] === tokens.equals) {
|
|
2638
|
+
node.operator = content;
|
|
2639
|
+
lastAdded = "operator";
|
|
2640
|
+
} else if (!node.namespace && !node.attribute) {
|
|
2641
|
+
node.namespace = true;
|
|
2642
|
+
}
|
|
2643
|
+
spaceAfterMeaningfulToken = false;
|
|
2644
|
+
break;
|
|
2645
|
+
case tokens.word:
|
|
2646
|
+
if (next && this.content(next) === "|" && attr[pos + 2] && attr[pos + 2][tokenize_1.FIELDS.TYPE] !== tokens.equals && // this look-ahead probably fails with comment nodes involved.
|
|
2647
|
+
!node.operator && !node.namespace) {
|
|
2648
|
+
node.namespace = content;
|
|
2649
|
+
lastAdded = "namespace";
|
|
2650
|
+
} else if (!node.attribute || lastAdded === "attribute" && !spaceAfterMeaningfulToken) {
|
|
2651
|
+
if (spaceBefore) {
|
|
2652
|
+
(0, util_1.ensureObject)(node, "spaces", "attribute");
|
|
2653
|
+
node.spaces.attribute.before = spaceBefore;
|
|
2654
|
+
spaceBefore = "";
|
|
2655
|
+
}
|
|
2656
|
+
if (commentBefore) {
|
|
2657
|
+
(0, util_1.ensureObject)(node, "raws", "spaces", "attribute");
|
|
2658
|
+
node.raws.spaces.attribute.before = commentBefore;
|
|
2659
|
+
commentBefore = "";
|
|
2660
|
+
}
|
|
2661
|
+
node.attribute = (node.attribute || "") + content;
|
|
2662
|
+
var rawValue = (0, util_1.getProp)(node, "raws", "attribute") || null;
|
|
2663
|
+
if (rawValue) {
|
|
2664
|
+
node.raws.attribute += content;
|
|
2665
|
+
}
|
|
2666
|
+
lastAdded = "attribute";
|
|
2667
|
+
} else if (!node.value && node.value !== "" || lastAdded === "value" && !(spaceAfterMeaningfulToken || node.quoteMark)) {
|
|
2668
|
+
var unescaped_1 = (0, util_1.unesc)(content);
|
|
2669
|
+
var oldRawValue = (0, util_1.getProp)(node, "raws", "value") || "";
|
|
2670
|
+
var oldValue = node.value || "";
|
|
2671
|
+
node.value = oldValue + unescaped_1;
|
|
2672
|
+
node.quoteMark = null;
|
|
2673
|
+
if (unescaped_1 !== content || oldRawValue) {
|
|
2674
|
+
(0, util_1.ensureObject)(node, "raws");
|
|
2675
|
+
node.raws.value = (oldRawValue || oldValue) + content;
|
|
2676
|
+
}
|
|
2677
|
+
lastAdded = "value";
|
|
2678
|
+
} else {
|
|
2679
|
+
var insensitive = content === "i" || content === "I";
|
|
2680
|
+
if ((node.value || node.value === "") && (node.quoteMark || spaceAfterMeaningfulToken)) {
|
|
2681
|
+
node.insensitive = insensitive;
|
|
2682
|
+
if (!insensitive || content === "I") {
|
|
2683
|
+
(0, util_1.ensureObject)(node, "raws");
|
|
2684
|
+
node.raws.insensitiveFlag = content;
|
|
2685
|
+
}
|
|
2686
|
+
lastAdded = "insensitive";
|
|
2687
|
+
if (spaceBefore) {
|
|
2688
|
+
(0, util_1.ensureObject)(node, "spaces", "insensitive");
|
|
2689
|
+
node.spaces.insensitive.before = spaceBefore;
|
|
2690
|
+
spaceBefore = "";
|
|
2691
|
+
}
|
|
2692
|
+
if (commentBefore) {
|
|
2693
|
+
(0, util_1.ensureObject)(node, "raws", "spaces", "insensitive");
|
|
2694
|
+
node.raws.spaces.insensitive.before = commentBefore;
|
|
2695
|
+
commentBefore = "";
|
|
2696
|
+
}
|
|
2697
|
+
} else if (node.value || node.value === "") {
|
|
2698
|
+
lastAdded = "value";
|
|
2699
|
+
node.value += content;
|
|
2700
|
+
if (node.raws.value) {
|
|
2701
|
+
node.raws.value += content;
|
|
2702
|
+
}
|
|
2703
|
+
}
|
|
2704
|
+
}
|
|
2705
|
+
spaceAfterMeaningfulToken = false;
|
|
2706
|
+
break;
|
|
2707
|
+
case tokens.str:
|
|
2708
|
+
if (!node.attribute || !node.operator) {
|
|
2709
|
+
return this.error("Expected an attribute followed by an operator preceding the string.", {
|
|
2710
|
+
index: token[tokenize_1.FIELDS.START_POS]
|
|
2711
|
+
});
|
|
2712
|
+
}
|
|
2713
|
+
var _a2 = (0, attribute_1.unescapeValue)(content), unescaped = _a2.unescaped, quoteMark = _a2.quoteMark;
|
|
2714
|
+
node.value = unescaped;
|
|
2715
|
+
node.quoteMark = quoteMark;
|
|
2716
|
+
lastAdded = "value";
|
|
2717
|
+
(0, util_1.ensureObject)(node, "raws");
|
|
2718
|
+
node.raws.value = content;
|
|
2719
|
+
spaceAfterMeaningfulToken = false;
|
|
2720
|
+
break;
|
|
2721
|
+
case tokens.equals:
|
|
2722
|
+
if (!node.attribute) {
|
|
2723
|
+
return this.expected("attribute", token[tokenize_1.FIELDS.START_POS], content);
|
|
2724
|
+
}
|
|
2725
|
+
if (node.value) {
|
|
2726
|
+
return this.error('Unexpected "=" found; an operator was already defined.', {
|
|
2727
|
+
index: token[tokenize_1.FIELDS.START_POS]
|
|
2728
|
+
});
|
|
2729
|
+
}
|
|
2730
|
+
node.operator = node.operator ? node.operator + content : content;
|
|
2731
|
+
lastAdded = "operator";
|
|
2732
|
+
spaceAfterMeaningfulToken = false;
|
|
2733
|
+
break;
|
|
2734
|
+
case tokens.comment:
|
|
2735
|
+
if (lastAdded) {
|
|
2736
|
+
if (spaceAfterMeaningfulToken || next && next[tokenize_1.FIELDS.TYPE] === tokens.space || lastAdded === "insensitive") {
|
|
2737
|
+
var lastComment = (0, util_1.getProp)(node, "spaces", lastAdded, "after") || "";
|
|
2738
|
+
var rawLastComment = (0, util_1.getProp)(node, "raws", "spaces", lastAdded, "after") || lastComment;
|
|
2739
|
+
(0, util_1.ensureObject)(node, "raws", "spaces", lastAdded);
|
|
2740
|
+
node.raws.spaces[lastAdded].after = rawLastComment + content;
|
|
2741
|
+
} else {
|
|
2742
|
+
var lastValue = node[lastAdded] || "";
|
|
2743
|
+
var rawLastValue = (0, util_1.getProp)(node, "raws", lastAdded) || lastValue;
|
|
2744
|
+
(0, util_1.ensureObject)(node, "raws");
|
|
2745
|
+
node.raws[lastAdded] = rawLastValue + content;
|
|
2746
|
+
}
|
|
2747
|
+
} else {
|
|
2748
|
+
commentBefore = commentBefore + content;
|
|
2749
|
+
}
|
|
2750
|
+
break;
|
|
2751
|
+
default:
|
|
2752
|
+
return this.error('Unexpected "'.concat(content, '" found.'), { index: token[tokenize_1.FIELDS.START_POS] });
|
|
2753
|
+
}
|
|
2754
|
+
pos++;
|
|
2755
|
+
}
|
|
2756
|
+
unescapeProp(node, "attribute");
|
|
2757
|
+
unescapeProp(node, "namespace");
|
|
2758
|
+
this.newNode(new attribute_1.default(node));
|
|
2759
|
+
this.position++;
|
|
2760
|
+
};
|
|
2761
|
+
Parser3.prototype.parseWhitespaceEquivalentTokens = function(stopPosition) {
|
|
2762
|
+
if (stopPosition < 0) {
|
|
2763
|
+
stopPosition = this.tokens.length;
|
|
2764
|
+
}
|
|
2765
|
+
var startPosition = this.position;
|
|
2766
|
+
var nodes = [];
|
|
2767
|
+
var space = "";
|
|
2768
|
+
var lastComment = void 0;
|
|
2769
|
+
do {
|
|
2770
|
+
if (WHITESPACE_TOKENS[this.currToken[tokenize_1.FIELDS.TYPE]]) {
|
|
2771
|
+
if (!this.options.lossy) {
|
|
2772
|
+
space += this.content();
|
|
2773
|
+
}
|
|
2774
|
+
} else if (this.currToken[tokenize_1.FIELDS.TYPE] === tokens.comment) {
|
|
2775
|
+
var spaces = {};
|
|
2776
|
+
if (space) {
|
|
2777
|
+
spaces.before = space;
|
|
2778
|
+
space = "";
|
|
2779
|
+
}
|
|
2780
|
+
lastComment = new comment_1.default({
|
|
2781
|
+
value: this.content(),
|
|
2782
|
+
source: getTokenSource(this.currToken),
|
|
2783
|
+
sourceIndex: this.currToken[tokenize_1.FIELDS.START_POS],
|
|
2784
|
+
spaces
|
|
2785
|
+
});
|
|
2786
|
+
nodes.push(lastComment);
|
|
2787
|
+
}
|
|
2788
|
+
} while (++this.position < stopPosition);
|
|
2789
|
+
if (space) {
|
|
2790
|
+
if (lastComment) {
|
|
2791
|
+
lastComment.spaces.after = space;
|
|
2792
|
+
} else if (!this.options.lossy) {
|
|
2793
|
+
var firstToken = this.tokens[startPosition];
|
|
2794
|
+
var lastToken = this.tokens[this.position - 1];
|
|
2795
|
+
nodes.push(new string_1.default({
|
|
2796
|
+
value: "",
|
|
2797
|
+
source: getSource(firstToken[tokenize_1.FIELDS.START_LINE], firstToken[tokenize_1.FIELDS.START_COL], lastToken[tokenize_1.FIELDS.END_LINE], lastToken[tokenize_1.FIELDS.END_COL]),
|
|
2798
|
+
sourceIndex: firstToken[tokenize_1.FIELDS.START_POS],
|
|
2799
|
+
spaces: { before: space, after: "" }
|
|
2800
|
+
}));
|
|
2801
|
+
}
|
|
2802
|
+
}
|
|
2803
|
+
return nodes;
|
|
2804
|
+
};
|
|
2805
|
+
Parser3.prototype.convertWhitespaceNodesToSpace = function(nodes, requiredSpace) {
|
|
2806
|
+
var _this = this;
|
|
2807
|
+
if (requiredSpace === void 0) {
|
|
2808
|
+
requiredSpace = false;
|
|
2809
|
+
}
|
|
2810
|
+
var space = "";
|
|
2811
|
+
var rawSpace = "";
|
|
2812
|
+
nodes.forEach(function(n) {
|
|
2813
|
+
var spaceBefore = _this.lossySpace(n.spaces.before, requiredSpace);
|
|
2814
|
+
var rawSpaceBefore = _this.lossySpace(n.rawSpaceBefore, requiredSpace);
|
|
2815
|
+
space += spaceBefore + _this.lossySpace(n.spaces.after, requiredSpace && spaceBefore.length === 0);
|
|
2816
|
+
rawSpace += spaceBefore + n.value + _this.lossySpace(n.rawSpaceAfter, requiredSpace && rawSpaceBefore.length === 0);
|
|
2817
|
+
});
|
|
2818
|
+
if (rawSpace === space) {
|
|
2819
|
+
rawSpace = void 0;
|
|
2820
|
+
}
|
|
2821
|
+
var result = { space, rawSpace };
|
|
2822
|
+
return result;
|
|
2823
|
+
};
|
|
2824
|
+
Parser3.prototype.isNamedCombinator = function(position) {
|
|
2825
|
+
if (position === void 0) {
|
|
2826
|
+
position = this.position;
|
|
2827
|
+
}
|
|
2828
|
+
return this.tokens[position + 0] && this.tokens[position + 0][tokenize_1.FIELDS.TYPE] === tokens.slash && this.tokens[position + 1] && this.tokens[position + 1][tokenize_1.FIELDS.TYPE] === tokens.word && this.tokens[position + 2] && this.tokens[position + 2][tokenize_1.FIELDS.TYPE] === tokens.slash;
|
|
2829
|
+
};
|
|
2830
|
+
Parser3.prototype.namedCombinator = function() {
|
|
2831
|
+
if (this.isNamedCombinator()) {
|
|
2832
|
+
var nameRaw = this.content(this.tokens[this.position + 1]);
|
|
2833
|
+
var name = (0, util_1.unesc)(nameRaw).toLowerCase();
|
|
2834
|
+
var raws = {};
|
|
2835
|
+
if (name !== nameRaw) {
|
|
2836
|
+
raws.value = "/".concat(nameRaw, "/");
|
|
2837
|
+
}
|
|
2838
|
+
var node = new combinator_1.default({
|
|
2839
|
+
value: "/".concat(name, "/"),
|
|
2840
|
+
source: getSource(this.currToken[tokenize_1.FIELDS.START_LINE], this.currToken[tokenize_1.FIELDS.START_COL], this.tokens[this.position + 2][tokenize_1.FIELDS.END_LINE], this.tokens[this.position + 2][tokenize_1.FIELDS.END_COL]),
|
|
2841
|
+
sourceIndex: this.currToken[tokenize_1.FIELDS.START_POS],
|
|
2842
|
+
raws
|
|
2843
|
+
});
|
|
2844
|
+
this.position = this.position + 3;
|
|
2845
|
+
return node;
|
|
2846
|
+
} else {
|
|
2847
|
+
this.unexpected();
|
|
2848
|
+
}
|
|
2849
|
+
};
|
|
2850
|
+
Parser3.prototype.combinator = function() {
|
|
2851
|
+
var _this = this;
|
|
2852
|
+
if (this.content() === "|") {
|
|
2853
|
+
return this.namespace();
|
|
2854
|
+
}
|
|
2855
|
+
var nextSigTokenPos = this.locateNextMeaningfulToken(this.position);
|
|
2856
|
+
if (nextSigTokenPos < 0 || this.tokens[nextSigTokenPos][tokenize_1.FIELDS.TYPE] === tokens.comma || this.tokens[nextSigTokenPos][tokenize_1.FIELDS.TYPE] === tokens.closeParenthesis) {
|
|
2857
|
+
var nodes = this.parseWhitespaceEquivalentTokens(nextSigTokenPos);
|
|
2858
|
+
if (nodes.length > 0) {
|
|
2859
|
+
var last = this.current.last;
|
|
2860
|
+
if (last) {
|
|
2861
|
+
var _a2 = this.convertWhitespaceNodesToSpace(nodes), space = _a2.space, rawSpace = _a2.rawSpace;
|
|
2862
|
+
if (rawSpace !== void 0) {
|
|
2863
|
+
last.rawSpaceAfter += rawSpace;
|
|
2864
|
+
}
|
|
2865
|
+
last.spaces.after += space;
|
|
2866
|
+
} else {
|
|
2867
|
+
nodes.forEach(function(n) {
|
|
2868
|
+
return _this.newNode(n);
|
|
2869
|
+
});
|
|
2870
|
+
}
|
|
2871
|
+
}
|
|
2872
|
+
return;
|
|
2873
|
+
}
|
|
2874
|
+
var firstToken = this.currToken;
|
|
2875
|
+
var spaceOrDescendantSelectorNodes = void 0;
|
|
2876
|
+
if (nextSigTokenPos > this.position) {
|
|
2877
|
+
spaceOrDescendantSelectorNodes = this.parseWhitespaceEquivalentTokens(nextSigTokenPos);
|
|
2878
|
+
}
|
|
2879
|
+
var node;
|
|
2880
|
+
if (this.isNamedCombinator()) {
|
|
2881
|
+
node = this.namedCombinator();
|
|
2882
|
+
} else if (this.currToken[tokenize_1.FIELDS.TYPE] === tokens.combinator) {
|
|
2883
|
+
node = new combinator_1.default({
|
|
2884
|
+
value: this.content(),
|
|
2885
|
+
source: getTokenSource(this.currToken),
|
|
2886
|
+
sourceIndex: this.currToken[tokenize_1.FIELDS.START_POS]
|
|
2887
|
+
});
|
|
2888
|
+
this.position++;
|
|
2889
|
+
} else if (WHITESPACE_TOKENS[this.currToken[tokenize_1.FIELDS.TYPE]]) {
|
|
2890
|
+
} else if (!spaceOrDescendantSelectorNodes) {
|
|
2891
|
+
this.unexpected();
|
|
2892
|
+
}
|
|
2893
|
+
if (node) {
|
|
2894
|
+
if (spaceOrDescendantSelectorNodes) {
|
|
2895
|
+
var _b2 = this.convertWhitespaceNodesToSpace(spaceOrDescendantSelectorNodes), space = _b2.space, rawSpace = _b2.rawSpace;
|
|
2896
|
+
node.spaces.before = space;
|
|
2897
|
+
node.rawSpaceBefore = rawSpace;
|
|
2898
|
+
}
|
|
2899
|
+
} else {
|
|
2900
|
+
var _c = this.convertWhitespaceNodesToSpace(spaceOrDescendantSelectorNodes, true), space = _c.space, rawSpace = _c.rawSpace;
|
|
2901
|
+
if (!rawSpace) {
|
|
2902
|
+
rawSpace = space;
|
|
2903
|
+
}
|
|
2904
|
+
var spaces = {};
|
|
2905
|
+
var raws = { spaces: {} };
|
|
2906
|
+
if (space.endsWith(" ") && rawSpace.endsWith(" ")) {
|
|
2907
|
+
spaces.before = space.slice(0, space.length - 1);
|
|
2908
|
+
raws.spaces.before = rawSpace.slice(0, rawSpace.length - 1);
|
|
2909
|
+
} else if (space[0] === " " && rawSpace[0] === " ") {
|
|
2910
|
+
spaces.after = space.slice(1);
|
|
2911
|
+
raws.spaces.after = rawSpace.slice(1);
|
|
2912
|
+
} else {
|
|
2913
|
+
raws.value = rawSpace;
|
|
2914
|
+
}
|
|
2915
|
+
node = new combinator_1.default({
|
|
2916
|
+
value: " ",
|
|
2917
|
+
source: getTokenSourceSpan(firstToken, this.tokens[this.position - 1]),
|
|
2918
|
+
sourceIndex: firstToken[tokenize_1.FIELDS.START_POS],
|
|
2919
|
+
spaces,
|
|
2920
|
+
raws
|
|
2921
|
+
});
|
|
2922
|
+
}
|
|
2923
|
+
if (this.currToken && this.currToken[tokenize_1.FIELDS.TYPE] === tokens.space) {
|
|
2924
|
+
node.spaces.after = this.optionalSpace(this.content());
|
|
2925
|
+
this.position++;
|
|
2926
|
+
}
|
|
2927
|
+
return this.newNode(node);
|
|
2928
|
+
};
|
|
2929
|
+
Parser3.prototype.comma = function() {
|
|
2930
|
+
if (this.position === this.tokens.length - 1) {
|
|
2931
|
+
this.root.trailingComma = true;
|
|
2932
|
+
this.position++;
|
|
2933
|
+
return;
|
|
2934
|
+
}
|
|
2935
|
+
this.current._inferEndPosition();
|
|
2936
|
+
var selector = new selector_1.default({
|
|
2937
|
+
source: {
|
|
2938
|
+
start: tokenStart(this.tokens[this.position + 1])
|
|
2939
|
+
},
|
|
2940
|
+
sourceIndex: this.tokens[this.position + 1][tokenize_1.FIELDS.START_POS]
|
|
2941
|
+
});
|
|
2942
|
+
this.current.parent.append(selector);
|
|
2943
|
+
this.current = selector;
|
|
2944
|
+
this.position++;
|
|
2945
|
+
};
|
|
2946
|
+
Parser3.prototype.comment = function() {
|
|
2947
|
+
var current = this.currToken;
|
|
2948
|
+
this.newNode(new comment_1.default({
|
|
2949
|
+
value: this.content(),
|
|
2950
|
+
source: getTokenSource(current),
|
|
2951
|
+
sourceIndex: current[tokenize_1.FIELDS.START_POS]
|
|
2952
|
+
}));
|
|
2953
|
+
this.position++;
|
|
2954
|
+
};
|
|
2955
|
+
Parser3.prototype.error = function(message, opts) {
|
|
2956
|
+
throw this.root.error(message, opts);
|
|
2957
|
+
};
|
|
2958
|
+
Parser3.prototype.missingBackslash = function() {
|
|
2959
|
+
return this.error("Expected a backslash preceding the semicolon.", {
|
|
2960
|
+
index: this.currToken[tokenize_1.FIELDS.START_POS]
|
|
2961
|
+
});
|
|
2962
|
+
};
|
|
2963
|
+
Parser3.prototype.missingParenthesis = function() {
|
|
2964
|
+
return this.expected("opening parenthesis", this.currToken[tokenize_1.FIELDS.START_POS]);
|
|
2965
|
+
};
|
|
2966
|
+
Parser3.prototype.missingSquareBracket = function() {
|
|
2967
|
+
return this.expected("opening square bracket", this.currToken[tokenize_1.FIELDS.START_POS]);
|
|
2968
|
+
};
|
|
2969
|
+
Parser3.prototype.unexpected = function() {
|
|
2970
|
+
return this.error("Unexpected '".concat(this.content(), "'. Escaping special characters with \\ may help."), this.currToken[tokenize_1.FIELDS.START_POS]);
|
|
2971
|
+
};
|
|
2972
|
+
Parser3.prototype.unexpectedPipe = function() {
|
|
2973
|
+
return this.error("Unexpected '|'.", this.currToken[tokenize_1.FIELDS.START_POS]);
|
|
2974
|
+
};
|
|
2975
|
+
Parser3.prototype.namespace = function() {
|
|
2976
|
+
var before = this.prevToken && this.content(this.prevToken) || true;
|
|
2977
|
+
if (this.nextToken[tokenize_1.FIELDS.TYPE] === tokens.word) {
|
|
2978
|
+
this.position++;
|
|
2979
|
+
return this.word(before);
|
|
2980
|
+
} else if (this.nextToken[tokenize_1.FIELDS.TYPE] === tokens.asterisk) {
|
|
2981
|
+
this.position++;
|
|
2982
|
+
return this.universal(before);
|
|
2983
|
+
}
|
|
2984
|
+
this.unexpectedPipe();
|
|
2985
|
+
};
|
|
2986
|
+
Parser3.prototype.nesting = function() {
|
|
2987
|
+
if (this.nextToken) {
|
|
2988
|
+
var nextContent = this.content(this.nextToken);
|
|
2989
|
+
if (nextContent === "|") {
|
|
2990
|
+
this.position++;
|
|
2991
|
+
return;
|
|
2992
|
+
}
|
|
2993
|
+
}
|
|
2994
|
+
var current = this.currToken;
|
|
2995
|
+
this.newNode(new nesting_1.default({
|
|
2996
|
+
value: this.content(),
|
|
2997
|
+
source: getTokenSource(current),
|
|
2998
|
+
sourceIndex: current[tokenize_1.FIELDS.START_POS]
|
|
2999
|
+
}));
|
|
3000
|
+
this.position++;
|
|
3001
|
+
};
|
|
3002
|
+
Parser3.prototype.parentheses = function() {
|
|
3003
|
+
var last = this.current.last;
|
|
3004
|
+
var unbalanced = 1;
|
|
3005
|
+
this.position++;
|
|
3006
|
+
if (last && last.type === types.PSEUDO) {
|
|
3007
|
+
var selector = new selector_1.default({
|
|
3008
|
+
source: { start: tokenStart(this.tokens[this.position]) },
|
|
3009
|
+
sourceIndex: this.tokens[this.position][tokenize_1.FIELDS.START_POS]
|
|
3010
|
+
});
|
|
3011
|
+
var cache = this.current;
|
|
3012
|
+
last.append(selector);
|
|
3013
|
+
this.current = selector;
|
|
3014
|
+
this.nestingDepth++;
|
|
3015
|
+
try {
|
|
3016
|
+
if (this.nestingDepth > this.maxNestingDepth) {
|
|
3017
|
+
this.error("Cannot parse selector: nesting depth exceeds the maximum of ".concat(this.maxNestingDepth, "."), { index: this.currToken[tokenize_1.FIELDS.START_POS] });
|
|
3018
|
+
}
|
|
3019
|
+
while (this.position < this.tokens.length && unbalanced) {
|
|
3020
|
+
if (this.currToken[tokenize_1.FIELDS.TYPE] === tokens.openParenthesis) {
|
|
3021
|
+
unbalanced++;
|
|
3022
|
+
}
|
|
3023
|
+
if (this.currToken[tokenize_1.FIELDS.TYPE] === tokens.closeParenthesis) {
|
|
3024
|
+
unbalanced--;
|
|
3025
|
+
}
|
|
3026
|
+
if (unbalanced) {
|
|
3027
|
+
this.parse();
|
|
3028
|
+
} else {
|
|
3029
|
+
this.current.source.end = tokenEnd(this.currToken);
|
|
3030
|
+
this.current.parent.source.end = tokenEnd(this.currToken);
|
|
3031
|
+
this.position++;
|
|
3032
|
+
}
|
|
3033
|
+
}
|
|
3034
|
+
} finally {
|
|
3035
|
+
this.nestingDepth--;
|
|
3036
|
+
}
|
|
3037
|
+
this.current = cache;
|
|
3038
|
+
} else {
|
|
3039
|
+
var parenStart = this.currToken;
|
|
3040
|
+
var parenValue = "(";
|
|
3041
|
+
var parenEnd = void 0;
|
|
3042
|
+
while (this.position < this.tokens.length && unbalanced) {
|
|
3043
|
+
if (this.currToken[tokenize_1.FIELDS.TYPE] === tokens.openParenthesis) {
|
|
3044
|
+
unbalanced++;
|
|
3045
|
+
}
|
|
3046
|
+
if (this.currToken[tokenize_1.FIELDS.TYPE] === tokens.closeParenthesis) {
|
|
3047
|
+
unbalanced--;
|
|
3048
|
+
}
|
|
3049
|
+
parenEnd = this.currToken;
|
|
3050
|
+
parenValue += this.parseParenthesisToken(this.currToken);
|
|
3051
|
+
this.position++;
|
|
3052
|
+
}
|
|
3053
|
+
if (last) {
|
|
3054
|
+
last.appendToPropertyAndEscape("value", parenValue, parenValue);
|
|
3055
|
+
} else {
|
|
3056
|
+
this.newNode(new string_1.default({
|
|
3057
|
+
value: parenValue,
|
|
3058
|
+
source: getSource(parenStart[tokenize_1.FIELDS.START_LINE], parenStart[tokenize_1.FIELDS.START_COL], parenEnd[tokenize_1.FIELDS.END_LINE], parenEnd[tokenize_1.FIELDS.END_COL]),
|
|
3059
|
+
sourceIndex: parenStart[tokenize_1.FIELDS.START_POS]
|
|
3060
|
+
}));
|
|
3061
|
+
}
|
|
3062
|
+
}
|
|
3063
|
+
if (unbalanced) {
|
|
3064
|
+
return this.expected("closing parenthesis", this.currToken[tokenize_1.FIELDS.START_POS]);
|
|
3065
|
+
}
|
|
3066
|
+
};
|
|
3067
|
+
Parser3.prototype.pseudo = function() {
|
|
3068
|
+
var _this = this;
|
|
3069
|
+
var pseudoStr = "";
|
|
3070
|
+
var startingToken = this.currToken;
|
|
3071
|
+
while (this.currToken && this.currToken[tokenize_1.FIELDS.TYPE] === tokens.colon) {
|
|
3072
|
+
pseudoStr += this.content();
|
|
3073
|
+
this.position++;
|
|
3074
|
+
}
|
|
3075
|
+
if (!this.currToken) {
|
|
3076
|
+
return this.expected(["pseudo-class", "pseudo-element"], this.position - 1);
|
|
3077
|
+
}
|
|
3078
|
+
if (this.currToken[tokenize_1.FIELDS.TYPE] === tokens.word) {
|
|
3079
|
+
this.splitWord(false, function(first, length) {
|
|
3080
|
+
pseudoStr += first;
|
|
3081
|
+
_this.newNode(new pseudo_1.default({
|
|
3082
|
+
value: pseudoStr,
|
|
3083
|
+
source: getTokenSourceSpan(startingToken, _this.currToken),
|
|
3084
|
+
sourceIndex: startingToken[tokenize_1.FIELDS.START_POS]
|
|
3085
|
+
}));
|
|
3086
|
+
if (length > 1 && _this.nextToken && _this.nextToken[tokenize_1.FIELDS.TYPE] === tokens.openParenthesis) {
|
|
3087
|
+
_this.error("Misplaced parenthesis.", {
|
|
3088
|
+
index: _this.nextToken[tokenize_1.FIELDS.START_POS]
|
|
3089
|
+
});
|
|
3090
|
+
}
|
|
3091
|
+
});
|
|
3092
|
+
} else {
|
|
3093
|
+
return this.expected(["pseudo-class", "pseudo-element"], this.currToken[tokenize_1.FIELDS.START_POS]);
|
|
3094
|
+
}
|
|
3095
|
+
};
|
|
3096
|
+
Parser3.prototype.space = function() {
|
|
3097
|
+
var content = this.content();
|
|
3098
|
+
if (this.position === 0 || this.prevToken[tokenize_1.FIELDS.TYPE] === tokens.comma || this.prevToken[tokenize_1.FIELDS.TYPE] === tokens.openParenthesis || this.current.nodes.every(function(node) {
|
|
3099
|
+
return node.type === "comment";
|
|
3100
|
+
})) {
|
|
3101
|
+
this.spaces = this.optionalSpace(content);
|
|
3102
|
+
this.position++;
|
|
3103
|
+
} else if (this.position === this.tokens.length - 1 || this.nextToken[tokenize_1.FIELDS.TYPE] === tokens.comma || this.nextToken[tokenize_1.FIELDS.TYPE] === tokens.closeParenthesis) {
|
|
3104
|
+
this.current.last.spaces.after = this.optionalSpace(content);
|
|
3105
|
+
this.position++;
|
|
3106
|
+
} else {
|
|
3107
|
+
this.combinator();
|
|
3108
|
+
}
|
|
3109
|
+
};
|
|
3110
|
+
Parser3.prototype.string = function() {
|
|
3111
|
+
var current = this.currToken;
|
|
3112
|
+
this.newNode(new string_1.default({
|
|
3113
|
+
value: this.content(),
|
|
3114
|
+
source: getTokenSource(current),
|
|
3115
|
+
sourceIndex: current[tokenize_1.FIELDS.START_POS]
|
|
3116
|
+
}));
|
|
3117
|
+
this.position++;
|
|
3118
|
+
};
|
|
3119
|
+
Parser3.prototype.universal = function(namespace) {
|
|
3120
|
+
var nextToken = this.nextToken;
|
|
3121
|
+
if (nextToken && this.content(nextToken) === "|") {
|
|
3122
|
+
this.position++;
|
|
3123
|
+
return this.namespace();
|
|
3124
|
+
}
|
|
3125
|
+
var current = this.currToken;
|
|
3126
|
+
this.newNode(new universal_1.default({
|
|
3127
|
+
value: this.content(),
|
|
3128
|
+
source: getTokenSource(current),
|
|
3129
|
+
sourceIndex: current[tokenize_1.FIELDS.START_POS]
|
|
3130
|
+
}), namespace);
|
|
3131
|
+
this.position++;
|
|
3132
|
+
};
|
|
3133
|
+
Parser3.prototype.splitWord = function(namespace, firstCallback) {
|
|
3134
|
+
var _this = this;
|
|
3135
|
+
var nextToken = this.nextToken;
|
|
3136
|
+
var word = this.content();
|
|
3137
|
+
while (nextToken && ~[tokens.dollar, tokens.caret, tokens.equals, tokens.word].indexOf(nextToken[tokenize_1.FIELDS.TYPE])) {
|
|
3138
|
+
this.position++;
|
|
3139
|
+
var current = this.content();
|
|
3140
|
+
word += current;
|
|
3141
|
+
if (current.lastIndexOf("\\") === current.length - 1) {
|
|
3142
|
+
var next = this.nextToken;
|
|
3143
|
+
if (next && next[tokenize_1.FIELDS.TYPE] === tokens.space) {
|
|
3144
|
+
word += this.requiredSpace(this.content(next));
|
|
3145
|
+
this.position++;
|
|
3146
|
+
}
|
|
3147
|
+
}
|
|
3148
|
+
nextToken = this.nextToken;
|
|
3149
|
+
}
|
|
3150
|
+
var hasClass = indexesOf(word, ".").filter(function(i) {
|
|
3151
|
+
var escapedDot = word[i - 1] === "\\";
|
|
3152
|
+
var isKeyframesPercent = /^\d+\.\d+%$/.test(word);
|
|
3153
|
+
return !escapedDot && !isKeyframesPercent;
|
|
3154
|
+
});
|
|
3155
|
+
var hasId = indexesOf(word, "#").filter(function(i) {
|
|
3156
|
+
return word[i - 1] !== "\\";
|
|
3157
|
+
});
|
|
3158
|
+
var interpolations = indexesOf(word, "#{");
|
|
3159
|
+
if (interpolations.length) {
|
|
3160
|
+
hasId = hasId.filter(function(hashIndex) {
|
|
3161
|
+
return !~interpolations.indexOf(hashIndex);
|
|
3162
|
+
});
|
|
3163
|
+
}
|
|
3164
|
+
var indices = (0, sortAscending_1.default)(uniqs(__spreadArray(__spreadArray([0], __read(hasClass), false), __read(hasId), false)));
|
|
3165
|
+
indices.forEach(function(ind, i) {
|
|
3166
|
+
var index = indices[i + 1] || word.length;
|
|
3167
|
+
var value = word.slice(ind, index);
|
|
3168
|
+
if (i === 0 && firstCallback) {
|
|
3169
|
+
return firstCallback.call(_this, value, indices.length);
|
|
3170
|
+
}
|
|
3171
|
+
var node;
|
|
3172
|
+
var current2 = _this.currToken;
|
|
3173
|
+
var sourceIndex = current2[tokenize_1.FIELDS.START_POS] + indices[i];
|
|
3174
|
+
var source = getSource(current2[1], current2[2] + ind, current2[3], current2[2] + (index - 1));
|
|
3175
|
+
if (~hasClass.indexOf(ind)) {
|
|
3176
|
+
var classNameOpts = {
|
|
3177
|
+
value: value.slice(1),
|
|
3178
|
+
source,
|
|
3179
|
+
sourceIndex
|
|
3180
|
+
};
|
|
3181
|
+
node = new className_1.default(unescapeProp(classNameOpts, "value"));
|
|
3182
|
+
} else if (~hasId.indexOf(ind)) {
|
|
3183
|
+
var idOpts = {
|
|
3184
|
+
value: value.slice(1),
|
|
3185
|
+
source,
|
|
3186
|
+
sourceIndex
|
|
3187
|
+
};
|
|
3188
|
+
node = new id_1.default(unescapeProp(idOpts, "value"));
|
|
3189
|
+
} else {
|
|
3190
|
+
var tagOpts = {
|
|
3191
|
+
value,
|
|
3192
|
+
source,
|
|
3193
|
+
sourceIndex
|
|
3194
|
+
};
|
|
3195
|
+
unescapeProp(tagOpts, "value");
|
|
3196
|
+
node = new tag_1.default(tagOpts);
|
|
3197
|
+
}
|
|
3198
|
+
_this.newNode(node, namespace);
|
|
3199
|
+
namespace = null;
|
|
3200
|
+
});
|
|
3201
|
+
this.position++;
|
|
3202
|
+
};
|
|
3203
|
+
Parser3.prototype.word = function(namespace) {
|
|
3204
|
+
var nextToken = this.nextToken;
|
|
3205
|
+
if (nextToken && this.content(nextToken) === "|") {
|
|
3206
|
+
this.position++;
|
|
3207
|
+
return this.namespace();
|
|
3208
|
+
}
|
|
3209
|
+
return this.splitWord(namespace);
|
|
3210
|
+
};
|
|
3211
|
+
Parser3.prototype.loop = function() {
|
|
3212
|
+
while (this.position < this.tokens.length) {
|
|
3213
|
+
this.parse(true);
|
|
3214
|
+
}
|
|
3215
|
+
this.current._inferEndPosition();
|
|
3216
|
+
return this.root;
|
|
3217
|
+
};
|
|
3218
|
+
Parser3.prototype.parse = function(throwOnParenthesis) {
|
|
3219
|
+
switch (this.currToken[tokenize_1.FIELDS.TYPE]) {
|
|
3220
|
+
case tokens.space:
|
|
3221
|
+
this.space();
|
|
3222
|
+
break;
|
|
3223
|
+
case tokens.comment:
|
|
3224
|
+
this.comment();
|
|
3225
|
+
break;
|
|
3226
|
+
case tokens.openParenthesis:
|
|
3227
|
+
this.parentheses();
|
|
3228
|
+
break;
|
|
3229
|
+
case tokens.closeParenthesis:
|
|
3230
|
+
if (throwOnParenthesis) {
|
|
3231
|
+
this.missingParenthesis();
|
|
3232
|
+
}
|
|
3233
|
+
break;
|
|
3234
|
+
case tokens.openSquare:
|
|
3235
|
+
this.attribute();
|
|
3236
|
+
break;
|
|
3237
|
+
case tokens.dollar:
|
|
3238
|
+
case tokens.caret:
|
|
3239
|
+
case tokens.equals:
|
|
3240
|
+
case tokens.word:
|
|
3241
|
+
this.word();
|
|
3242
|
+
break;
|
|
3243
|
+
case tokens.colon:
|
|
3244
|
+
this.pseudo();
|
|
3245
|
+
break;
|
|
3246
|
+
case tokens.comma:
|
|
3247
|
+
this.comma();
|
|
3248
|
+
break;
|
|
3249
|
+
case tokens.asterisk:
|
|
3250
|
+
this.universal();
|
|
3251
|
+
break;
|
|
3252
|
+
case tokens.ampersand:
|
|
3253
|
+
this.nesting();
|
|
3254
|
+
break;
|
|
3255
|
+
case tokens.slash:
|
|
3256
|
+
case tokens.combinator:
|
|
3257
|
+
this.combinator();
|
|
3258
|
+
break;
|
|
3259
|
+
case tokens.str:
|
|
3260
|
+
this.string();
|
|
3261
|
+
break;
|
|
3262
|
+
// These cases throw; no break needed.
|
|
3263
|
+
case tokens.closeSquare:
|
|
3264
|
+
this.missingSquareBracket();
|
|
3265
|
+
case tokens.semicolon:
|
|
3266
|
+
this.missingBackslash();
|
|
3267
|
+
default:
|
|
3268
|
+
this.unexpected();
|
|
3269
|
+
}
|
|
3270
|
+
};
|
|
3271
|
+
Parser3.prototype.expected = function(description, index, found) {
|
|
3272
|
+
if (Array.isArray(description)) {
|
|
3273
|
+
var last = description.pop();
|
|
3274
|
+
description = "".concat(description.join(", "), " or ").concat(last);
|
|
3275
|
+
}
|
|
3276
|
+
var an = /^[aeiou]/.test(description[0]) ? "an" : "a";
|
|
3277
|
+
if (!found) {
|
|
3278
|
+
return this.error("Expected ".concat(an, " ").concat(description, "."), { index });
|
|
3279
|
+
}
|
|
3280
|
+
return this.error("Expected ".concat(an, " ").concat(description, ', found "').concat(found, '" instead.'), { index });
|
|
3281
|
+
};
|
|
3282
|
+
Parser3.prototype.requiredSpace = function(space) {
|
|
3283
|
+
return this.options.lossy ? " " : space;
|
|
3284
|
+
};
|
|
3285
|
+
Parser3.prototype.optionalSpace = function(space) {
|
|
3286
|
+
return this.options.lossy ? "" : space;
|
|
3287
|
+
};
|
|
3288
|
+
Parser3.prototype.lossySpace = function(space, required) {
|
|
3289
|
+
if (this.options.lossy) {
|
|
3290
|
+
return required ? " " : "";
|
|
3291
|
+
} else {
|
|
3292
|
+
return space;
|
|
3293
|
+
}
|
|
3294
|
+
};
|
|
3295
|
+
Parser3.prototype.parseParenthesisToken = function(token) {
|
|
3296
|
+
var content = this.content(token);
|
|
3297
|
+
if (token[tokenize_1.FIELDS.TYPE] === tokens.space) {
|
|
3298
|
+
return this.requiredSpace(content);
|
|
3299
|
+
} else {
|
|
3300
|
+
return content;
|
|
3301
|
+
}
|
|
3302
|
+
};
|
|
3303
|
+
Parser3.prototype.newNode = function(node, namespace) {
|
|
3304
|
+
if (namespace) {
|
|
3305
|
+
if (/^ +$/.test(namespace)) {
|
|
3306
|
+
if (!this.options.lossy) {
|
|
3307
|
+
this.spaces = (this.spaces || "") + namespace;
|
|
3308
|
+
}
|
|
3309
|
+
namespace = true;
|
|
3310
|
+
}
|
|
3311
|
+
node.namespace = namespace;
|
|
3312
|
+
unescapeProp(node, "namespace");
|
|
3313
|
+
}
|
|
3314
|
+
if (this.spaces) {
|
|
3315
|
+
node.spaces.before = this.spaces;
|
|
3316
|
+
this.spaces = "";
|
|
3317
|
+
}
|
|
3318
|
+
return this.current.append(node);
|
|
3319
|
+
};
|
|
3320
|
+
Parser3.prototype.content = function(token) {
|
|
3321
|
+
if (token === void 0) {
|
|
3322
|
+
token = this.currToken;
|
|
3323
|
+
}
|
|
3324
|
+
return this.css.slice(token[tokenize_1.FIELDS.START_POS], token[tokenize_1.FIELDS.END_POS]);
|
|
3325
|
+
};
|
|
3326
|
+
Object.defineProperty(Parser3.prototype, "currToken", {
|
|
3327
|
+
get: function() {
|
|
3328
|
+
return this.tokens[this.position];
|
|
3329
|
+
},
|
|
3330
|
+
enumerable: false,
|
|
3331
|
+
configurable: true
|
|
3332
|
+
});
|
|
3333
|
+
Object.defineProperty(Parser3.prototype, "nextToken", {
|
|
3334
|
+
get: function() {
|
|
3335
|
+
return this.tokens[this.position + 1];
|
|
3336
|
+
},
|
|
3337
|
+
enumerable: false,
|
|
3338
|
+
configurable: true
|
|
3339
|
+
});
|
|
3340
|
+
Object.defineProperty(Parser3.prototype, "prevToken", {
|
|
3341
|
+
get: function() {
|
|
3342
|
+
return this.tokens[this.position - 1];
|
|
3343
|
+
},
|
|
3344
|
+
enumerable: false,
|
|
3345
|
+
configurable: true
|
|
3346
|
+
});
|
|
3347
|
+
Parser3.prototype.locateNextMeaningfulToken = function(startPosition) {
|
|
3348
|
+
if (startPosition === void 0) {
|
|
3349
|
+
startPosition = this.position + 1;
|
|
3350
|
+
}
|
|
3351
|
+
var searchPosition = startPosition;
|
|
3352
|
+
while (searchPosition < this.tokens.length) {
|
|
3353
|
+
if (WHITESPACE_EQUIV_TOKENS[this.tokens[searchPosition][tokenize_1.FIELDS.TYPE]]) {
|
|
3354
|
+
searchPosition++;
|
|
3355
|
+
continue;
|
|
3356
|
+
} else {
|
|
3357
|
+
return searchPosition;
|
|
3358
|
+
}
|
|
3359
|
+
}
|
|
3360
|
+
return -1;
|
|
3361
|
+
};
|
|
3362
|
+
return Parser3;
|
|
3363
|
+
})()
|
|
3364
|
+
);
|
|
3365
|
+
exports.default = Parser2;
|
|
3366
|
+
}
|
|
3367
|
+
});
|
|
3368
|
+
|
|
3369
|
+
// ../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/processor.js
|
|
3370
|
+
var require_processor = __commonJS({
|
|
3371
|
+
"../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/processor.js"(exports) {
|
|
3372
|
+
"use strict";
|
|
3373
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
3374
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
3375
|
+
};
|
|
3376
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3377
|
+
var parser_1 = __importDefault(require_parser());
|
|
3378
|
+
var Processor = (
|
|
3379
|
+
/** @class */
|
|
3380
|
+
(function() {
|
|
3381
|
+
function Processor2(func, options) {
|
|
3382
|
+
this.func = func || function noop() {
|
|
3383
|
+
};
|
|
3384
|
+
this.funcRes = null;
|
|
3385
|
+
this.options = options;
|
|
3386
|
+
}
|
|
3387
|
+
Processor2.prototype._shouldUpdateSelector = function(rule, options) {
|
|
3388
|
+
if (options === void 0) {
|
|
3389
|
+
options = {};
|
|
3390
|
+
}
|
|
3391
|
+
var merged = Object.assign({}, this.options, options);
|
|
3392
|
+
if (merged.updateSelector === false) {
|
|
3393
|
+
return false;
|
|
3394
|
+
} else {
|
|
3395
|
+
return typeof rule !== "string";
|
|
3396
|
+
}
|
|
3397
|
+
};
|
|
3398
|
+
Processor2.prototype._isLossy = function(options) {
|
|
3399
|
+
if (options === void 0) {
|
|
3400
|
+
options = {};
|
|
3401
|
+
}
|
|
3402
|
+
var merged = Object.assign({}, this.options, options);
|
|
3403
|
+
if (merged.lossless === false) {
|
|
3404
|
+
return true;
|
|
3405
|
+
} else {
|
|
3406
|
+
return false;
|
|
3407
|
+
}
|
|
3408
|
+
};
|
|
3409
|
+
Processor2.prototype._root = function(rule, options) {
|
|
3410
|
+
if (options === void 0) {
|
|
3411
|
+
options = {};
|
|
3412
|
+
}
|
|
3413
|
+
var parser = new parser_1.default(rule, this._parseOptions(options));
|
|
3414
|
+
return parser.root;
|
|
3415
|
+
};
|
|
3416
|
+
Processor2.prototype._parseOptions = function(options) {
|
|
3417
|
+
var merged = Object.assign({}, this.options, options);
|
|
3418
|
+
return {
|
|
3419
|
+
lossy: this._isLossy(merged),
|
|
3420
|
+
maxNestingDepth: merged.maxNestingDepth
|
|
3421
|
+
};
|
|
3422
|
+
};
|
|
3423
|
+
Processor2.prototype._stringifyOptions = function(options) {
|
|
3424
|
+
var merged = Object.assign({}, this.options, options);
|
|
3425
|
+
return {
|
|
3426
|
+
maxNestingDepth: merged.maxNestingDepth
|
|
3427
|
+
};
|
|
3428
|
+
};
|
|
3429
|
+
Processor2.prototype._run = function(rule, options) {
|
|
3430
|
+
var _this = this;
|
|
3431
|
+
if (options === void 0) {
|
|
3432
|
+
options = {};
|
|
3433
|
+
}
|
|
3434
|
+
return new Promise(function(resolve2, reject) {
|
|
3435
|
+
try {
|
|
3436
|
+
var root_1 = _this._root(rule, options);
|
|
3437
|
+
Promise.resolve(_this.func(root_1)).then(function(transform) {
|
|
3438
|
+
var string = void 0;
|
|
3439
|
+
if (_this._shouldUpdateSelector(rule, options)) {
|
|
3440
|
+
string = root_1.toString(_this._stringifyOptions(options));
|
|
3441
|
+
rule.selector = string;
|
|
3442
|
+
}
|
|
3443
|
+
return { transform, root: root_1, string };
|
|
3444
|
+
}).then(resolve2, reject);
|
|
3445
|
+
} catch (e) {
|
|
3446
|
+
reject(e);
|
|
3447
|
+
return;
|
|
3448
|
+
}
|
|
3449
|
+
});
|
|
3450
|
+
};
|
|
3451
|
+
Processor2.prototype._runSync = function(rule, options) {
|
|
3452
|
+
if (options === void 0) {
|
|
3453
|
+
options = {};
|
|
3454
|
+
}
|
|
3455
|
+
var root = this._root(rule, options);
|
|
3456
|
+
var transform = this.func(root);
|
|
3457
|
+
if (transform && typeof transform.then === "function") {
|
|
3458
|
+
throw new Error("Selector processor returned a promise to a synchronous call.");
|
|
3459
|
+
}
|
|
3460
|
+
var string = void 0;
|
|
3461
|
+
if (options.updateSelector && typeof rule !== "string") {
|
|
3462
|
+
string = root.toString(this._stringifyOptions(options));
|
|
3463
|
+
rule.selector = string;
|
|
3464
|
+
}
|
|
3465
|
+
return { transform, root, string };
|
|
3466
|
+
};
|
|
3467
|
+
Processor2.prototype.ast = function(rule, options) {
|
|
3468
|
+
return this._run(rule, options).then(function(result) {
|
|
3469
|
+
return result.root;
|
|
3470
|
+
});
|
|
3471
|
+
};
|
|
3472
|
+
Processor2.prototype.astSync = function(rule, options) {
|
|
3473
|
+
return this._runSync(rule, options).root;
|
|
3474
|
+
};
|
|
3475
|
+
Processor2.prototype.transform = function(rule, options) {
|
|
3476
|
+
return this._run(rule, options).then(function(result) {
|
|
3477
|
+
return result.transform;
|
|
3478
|
+
});
|
|
3479
|
+
};
|
|
3480
|
+
Processor2.prototype.transformSync = function(rule, options) {
|
|
3481
|
+
return this._runSync(rule, options).transform;
|
|
3482
|
+
};
|
|
3483
|
+
Processor2.prototype.process = function(rule, options) {
|
|
3484
|
+
var _this = this;
|
|
3485
|
+
return this._run(rule, options).then(function(result) {
|
|
3486
|
+
return result.string || result.root.toString(_this._stringifyOptions(options));
|
|
3487
|
+
});
|
|
3488
|
+
};
|
|
3489
|
+
Processor2.prototype.processSync = function(rule, options) {
|
|
3490
|
+
var result = this._runSync(rule, options);
|
|
3491
|
+
return result.string || result.root.toString(this._stringifyOptions(options));
|
|
3492
|
+
};
|
|
3493
|
+
return Processor2;
|
|
3494
|
+
})()
|
|
3495
|
+
);
|
|
3496
|
+
exports.default = Processor;
|
|
3497
|
+
}
|
|
3498
|
+
});
|
|
3499
|
+
|
|
3500
|
+
// ../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/constructors.js
|
|
3501
|
+
var require_constructors = __commonJS({
|
|
3502
|
+
"../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/constructors.js"(exports) {
|
|
3503
|
+
"use strict";
|
|
3504
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
3505
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
3506
|
+
};
|
|
3507
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3508
|
+
exports.universal = exports.tag = exports.string = exports.selector = exports.root = exports.pseudo = exports.nesting = exports.id = exports.comment = exports.combinator = exports.className = exports.attribute = void 0;
|
|
3509
|
+
var attribute_1 = __importDefault(require_attribute());
|
|
3510
|
+
var className_1 = __importDefault(require_className());
|
|
3511
|
+
var combinator_1 = __importDefault(require_combinator());
|
|
3512
|
+
var comment_1 = __importDefault(require_comment());
|
|
3513
|
+
var id_1 = __importDefault(require_id());
|
|
3514
|
+
var nesting_1 = __importDefault(require_nesting());
|
|
3515
|
+
var pseudo_1 = __importDefault(require_pseudo());
|
|
3516
|
+
var root_1 = __importDefault(require_root());
|
|
3517
|
+
var selector_1 = __importDefault(require_selector());
|
|
3518
|
+
var string_1 = __importDefault(require_string());
|
|
3519
|
+
var tag_1 = __importDefault(require_tag());
|
|
3520
|
+
var universal_1 = __importDefault(require_universal());
|
|
3521
|
+
var attribute = function(opts) {
|
|
3522
|
+
return new attribute_1.default(opts);
|
|
3523
|
+
};
|
|
3524
|
+
exports.attribute = attribute;
|
|
3525
|
+
var className = function(opts) {
|
|
3526
|
+
return new className_1.default(opts);
|
|
3527
|
+
};
|
|
3528
|
+
exports.className = className;
|
|
3529
|
+
var combinator = function(opts) {
|
|
3530
|
+
return new combinator_1.default(opts);
|
|
3531
|
+
};
|
|
3532
|
+
exports.combinator = combinator;
|
|
3533
|
+
var comment = function(opts) {
|
|
3534
|
+
return new comment_1.default(opts);
|
|
3535
|
+
};
|
|
3536
|
+
exports.comment = comment;
|
|
3537
|
+
var id = function(opts) {
|
|
3538
|
+
return new id_1.default(opts);
|
|
3539
|
+
};
|
|
3540
|
+
exports.id = id;
|
|
3541
|
+
var nesting = function(opts) {
|
|
3542
|
+
return new nesting_1.default(opts);
|
|
3543
|
+
};
|
|
3544
|
+
exports.nesting = nesting;
|
|
3545
|
+
var pseudo = function(opts) {
|
|
3546
|
+
return new pseudo_1.default(opts);
|
|
3547
|
+
};
|
|
3548
|
+
exports.pseudo = pseudo;
|
|
3549
|
+
var root = function(opts) {
|
|
3550
|
+
return new root_1.default(opts);
|
|
3551
|
+
};
|
|
3552
|
+
exports.root = root;
|
|
3553
|
+
var selector = function(opts) {
|
|
3554
|
+
return new selector_1.default(opts);
|
|
3555
|
+
};
|
|
3556
|
+
exports.selector = selector;
|
|
3557
|
+
var string = function(opts) {
|
|
3558
|
+
return new string_1.default(opts);
|
|
3559
|
+
};
|
|
3560
|
+
exports.string = string;
|
|
3561
|
+
var tag = function(opts) {
|
|
3562
|
+
return new tag_1.default(opts);
|
|
3563
|
+
};
|
|
3564
|
+
exports.tag = tag;
|
|
3565
|
+
var universal = function(opts) {
|
|
3566
|
+
return new universal_1.default(opts);
|
|
3567
|
+
};
|
|
3568
|
+
exports.universal = universal;
|
|
3569
|
+
}
|
|
3570
|
+
});
|
|
3571
|
+
|
|
3572
|
+
// ../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/guards.js
|
|
3573
|
+
var require_guards = __commonJS({
|
|
3574
|
+
"../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/guards.js"(exports) {
|
|
3575
|
+
"use strict";
|
|
3576
|
+
var _a;
|
|
3577
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3578
|
+
exports.isUniversal = exports.isTag = exports.isString = exports.isSelector = exports.isRoot = exports.isPseudo = exports.isNesting = exports.isIdentifier = exports.isComment = exports.isCombinator = exports.isClassName = exports.isAttribute = void 0;
|
|
3579
|
+
exports.isNode = isNode;
|
|
3580
|
+
exports.isPseudoElement = isPseudoElement;
|
|
3581
|
+
exports.isPseudoClass = isPseudoClass;
|
|
3582
|
+
exports.isContainer = isContainer;
|
|
3583
|
+
exports.isNamespace = isNamespace;
|
|
3584
|
+
var types_1 = require_types();
|
|
3585
|
+
var IS_TYPE = (_a = {}, _a[types_1.ATTRIBUTE] = true, _a[types_1.CLASS] = true, _a[types_1.COMBINATOR] = true, _a[types_1.COMMENT] = true, _a[types_1.ID] = true, _a[types_1.NESTING] = true, _a[types_1.PSEUDO] = true, _a[types_1.ROOT] = true, _a[types_1.SELECTOR] = true, _a[types_1.STRING] = true, _a[types_1.TAG] = true, _a[types_1.UNIVERSAL] = true, _a);
|
|
3586
|
+
function isNode(node) {
|
|
3587
|
+
return typeof node === "object" && IS_TYPE[node.type];
|
|
3588
|
+
}
|
|
3589
|
+
function isNodeType(type, node) {
|
|
3590
|
+
return isNode(node) && node.type === type;
|
|
3591
|
+
}
|
|
3592
|
+
exports.isAttribute = isNodeType.bind(null, types_1.ATTRIBUTE);
|
|
3593
|
+
exports.isClassName = isNodeType.bind(null, types_1.CLASS);
|
|
3594
|
+
exports.isCombinator = isNodeType.bind(null, types_1.COMBINATOR);
|
|
3595
|
+
exports.isComment = isNodeType.bind(null, types_1.COMMENT);
|
|
3596
|
+
exports.isIdentifier = isNodeType.bind(null, types_1.ID);
|
|
3597
|
+
exports.isNesting = isNodeType.bind(null, types_1.NESTING);
|
|
3598
|
+
exports.isPseudo = isNodeType.bind(null, types_1.PSEUDO);
|
|
3599
|
+
exports.isRoot = isNodeType.bind(null, types_1.ROOT);
|
|
3600
|
+
exports.isSelector = isNodeType.bind(null, types_1.SELECTOR);
|
|
3601
|
+
exports.isString = isNodeType.bind(null, types_1.STRING);
|
|
3602
|
+
exports.isTag = isNodeType.bind(null, types_1.TAG);
|
|
3603
|
+
exports.isUniversal = isNodeType.bind(null, types_1.UNIVERSAL);
|
|
3604
|
+
function isPseudoElement(node) {
|
|
3605
|
+
return (0, exports.isPseudo)(node) && node.value && (node.value.startsWith("::") || node.value.toLowerCase() === ":before" || node.value.toLowerCase() === ":after" || node.value.toLowerCase() === ":first-letter" || node.value.toLowerCase() === ":first-line");
|
|
3606
|
+
}
|
|
3607
|
+
function isPseudoClass(node) {
|
|
3608
|
+
return (0, exports.isPseudo)(node) && !isPseudoElement(node);
|
|
3609
|
+
}
|
|
3610
|
+
function isContainer(node) {
|
|
3611
|
+
return !!(isNode(node) && node.walk);
|
|
3612
|
+
}
|
|
3613
|
+
function isNamespace(node) {
|
|
3614
|
+
return (0, exports.isAttribute)(node) || (0, exports.isTag)(node);
|
|
3615
|
+
}
|
|
3616
|
+
}
|
|
3617
|
+
});
|
|
3618
|
+
|
|
3619
|
+
// ../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/index.js
|
|
3620
|
+
var require_selectors = __commonJS({
|
|
3621
|
+
"../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/index.js"(exports) {
|
|
3622
|
+
"use strict";
|
|
3623
|
+
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
3624
|
+
if (k2 === void 0) k2 = k;
|
|
3625
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
3626
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
3627
|
+
desc = { enumerable: true, get: function() {
|
|
3628
|
+
return m[k];
|
|
3629
|
+
} };
|
|
3630
|
+
}
|
|
3631
|
+
Object.defineProperty(o, k2, desc);
|
|
3632
|
+
}) : (function(o, m, k, k2) {
|
|
3633
|
+
if (k2 === void 0) k2 = k;
|
|
3634
|
+
o[k2] = m[k];
|
|
3635
|
+
}));
|
|
3636
|
+
var __exportStar = exports && exports.__exportStar || function(m, exports2) {
|
|
3637
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p)) __createBinding(exports2, m, p);
|
|
3638
|
+
};
|
|
3639
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3640
|
+
__exportStar(require_types(), exports);
|
|
3641
|
+
__exportStar(require_constructors(), exports);
|
|
3642
|
+
__exportStar(require_guards(), exports);
|
|
3643
|
+
}
|
|
3644
|
+
});
|
|
3645
|
+
|
|
3646
|
+
// ../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/index.js
|
|
3647
|
+
var require_dist = __commonJS({
|
|
3648
|
+
"../../node_modules/.bun/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/index.js"(exports, module) {
|
|
3649
|
+
"use strict";
|
|
3650
|
+
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
3651
|
+
if (k2 === void 0) k2 = k;
|
|
3652
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
3653
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
3654
|
+
desc = { enumerable: true, get: function() {
|
|
3655
|
+
return m[k];
|
|
3656
|
+
} };
|
|
3657
|
+
}
|
|
3658
|
+
Object.defineProperty(o, k2, desc);
|
|
3659
|
+
}) : (function(o, m, k, k2) {
|
|
3660
|
+
if (k2 === void 0) k2 = k;
|
|
3661
|
+
o[k2] = m[k];
|
|
3662
|
+
}));
|
|
3663
|
+
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) {
|
|
3664
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
3665
|
+
}) : function(o, v) {
|
|
3666
|
+
o["default"] = v;
|
|
3667
|
+
});
|
|
3668
|
+
var __importStar = exports && exports.__importStar || /* @__PURE__ */ (function() {
|
|
3669
|
+
var ownKeys = function(o) {
|
|
3670
|
+
ownKeys = Object.getOwnPropertyNames || function(o2) {
|
|
3671
|
+
var ar = [];
|
|
3672
|
+
for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k;
|
|
3673
|
+
return ar;
|
|
3674
|
+
};
|
|
3675
|
+
return ownKeys(o);
|
|
3676
|
+
};
|
|
3677
|
+
return function(mod) {
|
|
3678
|
+
if (mod && mod.__esModule) return mod;
|
|
3679
|
+
var result = {};
|
|
3680
|
+
if (mod != null) {
|
|
3681
|
+
for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
3682
|
+
}
|
|
3683
|
+
__setModuleDefault(result, mod);
|
|
3684
|
+
return result;
|
|
3685
|
+
};
|
|
3686
|
+
})();
|
|
3687
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
3688
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
3689
|
+
};
|
|
3690
|
+
var processor_1 = __importDefault(require_processor());
|
|
3691
|
+
var selectors = __importStar(require_selectors());
|
|
3692
|
+
var parser = function(processor) {
|
|
3693
|
+
return new processor_1.default(processor);
|
|
3694
|
+
};
|
|
3695
|
+
Object.assign(parser, selectors);
|
|
3696
|
+
delete parser.__esModule;
|
|
3697
|
+
module.exports = parser;
|
|
3698
|
+
}
|
|
3699
|
+
});
|
|
3700
|
+
|
|
63
3701
|
// ../lint/dist/index.js
|
|
64
3702
|
var import_postcss_selector_parser = __toESM(require_dist(), 1);
|
|
65
3703
|
import postcss from "postcss";
|
|
@@ -233,10 +3871,7 @@ function hasUnquotedLessThan(attrs) {
|
|
|
233
3871
|
return false;
|
|
234
3872
|
}
|
|
235
3873
|
function readAttr(tagSource, attr) {
|
|
236
|
-
|
|
237
|
-
const escaped = attr.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
238
|
-
const match = tagSource.match(new RegExp(`(?<![\\w-])${escaped}\\s*=\\s*["']([^"']+)["']`, "i"));
|
|
239
|
-
return match?.[1] || null;
|
|
3874
|
+
return readAttributeValue(tagSource, attr, false) || null;
|
|
240
3875
|
}
|
|
241
3876
|
function hasAttrName(tagSource, attr) {
|
|
242
3877
|
return readDecodedAttr(tagSource, attr) !== null;
|
|
@@ -259,15 +3894,18 @@ function mediaWindowsOverlap(a, b) {
|
|
|
259
3894
|
return a.start < b.end && b.start < a.end;
|
|
260
3895
|
}
|
|
261
3896
|
function readDecodedAttr(tagSource, attr) {
|
|
3897
|
+
return readAttributeValue(tagSource, attr, true);
|
|
3898
|
+
}
|
|
3899
|
+
function readAttributeValue(tagSource, attr, decodeEntities) {
|
|
262
3900
|
if (!tagSource) return null;
|
|
263
3901
|
let value = null;
|
|
264
3902
|
const parser = new Parser(
|
|
265
3903
|
{
|
|
266
|
-
onattribute(name,
|
|
267
|
-
if (value === null && name.toLowerCase() === attr.toLowerCase()) value =
|
|
3904
|
+
onattribute(name, attributeValue) {
|
|
3905
|
+
if (value === null && name.toLowerCase() === attr.toLowerCase()) value = attributeValue;
|
|
268
3906
|
}
|
|
269
3907
|
},
|
|
270
|
-
{ decodeEntities
|
|
3908
|
+
{ decodeEntities, lowerCaseAttributeNames: false, lowerCaseTags: true }
|
|
271
3909
|
);
|
|
272
3910
|
parser.end(tagSource);
|
|
273
3911
|
return value;
|
|
@@ -858,6 +4496,12 @@ function buildLintContext(html, options = {}) {
|
|
|
858
4496
|
options
|
|
859
4497
|
};
|
|
860
4498
|
}
|
|
4499
|
+
var SCRIPT_SYNTAX_EXEMPT_TYPES = /* @__PURE__ */ new Set([
|
|
4500
|
+
"application/json",
|
|
4501
|
+
"application/hyperframes-slideshow+json",
|
|
4502
|
+
"importmap",
|
|
4503
|
+
"module"
|
|
4504
|
+
]);
|
|
861
4505
|
function repeatedDescendantId(selector) {
|
|
862
4506
|
let repeated = null;
|
|
863
4507
|
const requiredPseudoIds = (pseudo) => {
|
|
@@ -1476,10 +5120,8 @@ var coreRules = [
|
|
|
1476
5120
|
({ scripts, locate }) => {
|
|
1477
5121
|
const findings = [];
|
|
1478
5122
|
for (const script of scripts) {
|
|
1479
|
-
const
|
|
1480
|
-
if (
|
|
1481
|
-
attrs
|
|
1482
|
-
))
|
|
5123
|
+
const type = readDecodedAttr(script.raw, "type")?.trim().toLowerCase() ?? "";
|
|
5124
|
+
if (readDecodedAttr(script.raw, "src") !== null || SCRIPT_SYNTAX_EXEMPT_TYPES.has(type))
|
|
1483
5125
|
continue;
|
|
1484
5126
|
const syntaxError = getInlineScriptSyntaxError(script.content);
|
|
1485
5127
|
if (!syntaxError) continue;
|
|
@@ -1887,6 +5529,7 @@ function findImperativeMediaControlFindings(ctx) {
|
|
|
1887
5529
|
};
|
|
1888
5530
|
if (mediaTags.length === 0 || ctx.scripts.length === 0) return findings;
|
|
1889
5531
|
for (const script of ctx.scripts) {
|
|
5532
|
+
const code = stripJsCode(script.content);
|
|
1890
5533
|
const mediaVars = /* @__PURE__ */ new Map();
|
|
1891
5534
|
const assignmentPatterns = [
|
|
1892
5535
|
{
|
|
@@ -1903,6 +5546,7 @@ function findImperativeMediaControlFindings(ctx) {
|
|
|
1903
5546
|
for (const { pattern, variableIndex, targetIndex } of assignmentPatterns) {
|
|
1904
5547
|
let match;
|
|
1905
5548
|
while ((match = pattern.exec(script.content)) !== null) {
|
|
5549
|
+
if (code[match.index] !== script.content[match.index]) continue;
|
|
1906
5550
|
const variableName = match[variableIndex];
|
|
1907
5551
|
const target = match[targetIndex];
|
|
1908
5552
|
if (!variableName || !target) continue;
|
|
@@ -1913,12 +5557,12 @@ function findImperativeMediaControlFindings(ctx) {
|
|
|
1913
5557
|
}
|
|
1914
5558
|
const directIdPatterns = [
|
|
1915
5559
|
{
|
|
1916
|
-
pattern: /\b(?:document|window\.document)\.getElementById\(\s*["']([^"']+)["']\s*\)
|
|
5560
|
+
pattern: /\b(?:document|window\.document)\.getElementById\(\s*["']([^"']+)["']\s*\)\s*(?:\?\.|\.)\s*play\s*(?:\?\.\s*)?\(/g,
|
|
1917
5561
|
kind: "play()",
|
|
1918
5562
|
targetIndex: 1
|
|
1919
5563
|
},
|
|
1920
5564
|
{
|
|
1921
|
-
pattern: /\b(?:document|window\.document)\.getElementById\(\s*["']([^"']+)["']\s*\)
|
|
5565
|
+
pattern: /\b(?:document|window\.document)\.getElementById\(\s*["']([^"']+)["']\s*\)\s*(?:\?\.|\.)\s*pause\s*(?:\?\.\s*)?\(/g,
|
|
1922
5566
|
kind: "pause()",
|
|
1923
5567
|
targetIndex: 1
|
|
1924
5568
|
},
|
|
@@ -1933,12 +5577,12 @@ function findImperativeMediaControlFindings(ctx) {
|
|
|
1933
5577
|
targetIndex: 1
|
|
1934
5578
|
},
|
|
1935
5579
|
{
|
|
1936
|
-
pattern: /\b(?:document|window\.document)\.querySelector\(\s*(["'])([\s\S]*?)\1\s*\)
|
|
5580
|
+
pattern: /\b(?:document|window\.document)\.querySelector\(\s*(["'])([\s\S]*?)\1\s*\)\s*(?:\?\.|\.)\s*play\s*(?:\?\.\s*)?\(/g,
|
|
1937
5581
|
kind: "play()",
|
|
1938
5582
|
targetIndex: 2
|
|
1939
5583
|
},
|
|
1940
5584
|
{
|
|
1941
|
-
pattern: /\b(?:document|window\.document)\.querySelector\(\s*(["'])([\s\S]*?)\1\s*\)
|
|
5585
|
+
pattern: /\b(?:document|window\.document)\.querySelector\(\s*(["'])([\s\S]*?)\1\s*\)\s*(?:\?\.|\.)\s*pause\s*(?:\?\.\s*)?\(/g,
|
|
1942
5586
|
kind: "pause()",
|
|
1943
5587
|
targetIndex: 2
|
|
1944
5588
|
},
|
|
@@ -1956,6 +5600,7 @@ function findImperativeMediaControlFindings(ctx) {
|
|
|
1956
5600
|
for (const { pattern, kind, targetIndex } of directIdPatterns) {
|
|
1957
5601
|
let match;
|
|
1958
5602
|
while ((match = pattern.exec(script.content)) !== null) {
|
|
5603
|
+
if (code[match.index] !== script.content[match.index]) continue;
|
|
1959
5604
|
const target = match[targetIndex];
|
|
1960
5605
|
if (!target) continue;
|
|
1961
5606
|
const elementId = mediaIndex.ids.has(target) ? target : selectorTargetsManagedMedia(target, mediaIndex) ? void 0 : null;
|
|
@@ -1973,8 +5618,20 @@ function findImperativeMediaControlFindings(ctx) {
|
|
|
1973
5618
|
for (const [variableName, elementId] of mediaVars) {
|
|
1974
5619
|
const escapedVar = escapeRegExp(variableName);
|
|
1975
5620
|
const variablePatterns = [
|
|
1976
|
-
{
|
|
1977
|
-
|
|
5621
|
+
{
|
|
5622
|
+
pattern: new RegExp(
|
|
5623
|
+
`\\b${escapedVar}\\s*(?:\\?\\.|\\.)\\s*play\\s*(?:\\?\\.\\s*)?\\(`,
|
|
5624
|
+
"g"
|
|
5625
|
+
),
|
|
5626
|
+
kind: "play()"
|
|
5627
|
+
},
|
|
5628
|
+
{
|
|
5629
|
+
pattern: new RegExp(
|
|
5630
|
+
`\\b${escapedVar}\\s*(?:\\?\\.|\\.)\\s*pause\\s*(?:\\?\\.\\s*)?\\(`,
|
|
5631
|
+
"g"
|
|
5632
|
+
),
|
|
5633
|
+
kind: "pause()"
|
|
5634
|
+
},
|
|
1978
5635
|
{ pattern: new RegExp(`\\b${escapedVar}\\.currentTime\\s*=`, "g"), kind: "currentTime" },
|
|
1979
5636
|
{
|
|
1980
5637
|
pattern: new RegExp(`\\b${escapedVar}\\.muted\\s*=`, "g"),
|
|
@@ -1984,6 +5641,7 @@ function findImperativeMediaControlFindings(ctx) {
|
|
|
1984
5641
|
for (const { pattern, kind } of variablePatterns) {
|
|
1985
5642
|
let match;
|
|
1986
5643
|
while ((match = pattern.exec(script.content)) !== null) {
|
|
5644
|
+
if (code[match.index] !== script.content[match.index]) continue;
|
|
1987
5645
|
findings.push({
|
|
1988
5646
|
code: "imperative_media_control",
|
|
1989
5647
|
severity: "error",
|
|
@@ -7161,6 +10819,8 @@ function isSnippetFragment(html) {
|
|
|
7161
10819
|
}
|
|
7162
10820
|
|
|
7163
10821
|
export {
|
|
10822
|
+
require_dist,
|
|
10823
|
+
resolveCompositionDuration,
|
|
7164
10824
|
LINT_RULE_COUNT,
|
|
7165
10825
|
LINT_RULE_GROUP_COUNTS,
|
|
7166
10826
|
lintHyperframeHtml,
|
|
@@ -7168,3 +10828,8 @@ export {
|
|
|
7168
10828
|
shouldBlockRender,
|
|
7169
10829
|
lintProject
|
|
7170
10830
|
};
|
|
10831
|
+
/*! Bundled license information:
|
|
10832
|
+
|
|
10833
|
+
cssesc/cssesc.js:
|
|
10834
|
+
(*! https://mths.be/cssesc v3.0.0 by @mathias *)
|
|
10835
|
+
*/
|