@shopify/cli 4.0.0 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/analytics-CX22YIUZ.js +1 -0
- package/dist/analytics-UBWQIQYF.js +1 -0
- package/dist/angular-UTTM4Y4S.js +4 -0
- package/dist/bootstrap.js +1 -1
- package/dist/{chunk-DU4WR4OP.js → chunk-23AMFHXC.js} +1 -1
- package/dist/{chunk-LNHLDRC5.js → chunk-2EJCY4CE.js} +1 -1
- package/dist/{chunk-YMWHHINU.js → chunk-2KH2S7PI.js} +1 -1
- package/dist/chunk-2N4O33VM.js +6 -0
- package/dist/{chunk-WZBSLU4Q.js → chunk-2VLMN5QZ.js} +1 -1
- package/dist/chunk-2WNODIWJ.js +1 -0
- package/dist/chunk-2YXKZWYW.js +1 -0
- package/dist/{chunk-GFJ7UV74.js → chunk-3BRUCKZ2.js} +1 -1
- package/dist/{chunk-RM5SJJN6.js → chunk-3V63X7WZ.js} +66 -66
- package/dist/chunk-3YWUSKWF.js +159 -0
- package/dist/chunk-42RMKTCJ.js +8 -0
- package/dist/{chunk-V2CNCPIE.js → chunk-4EXYYBQ6.js} +1 -1
- package/dist/chunk-4KRT35A2.js +1 -0
- package/dist/chunk-4V4DQ6W7.js +836 -0
- package/dist/chunk-4Z2WYNTE.js +1 -0
- package/dist/chunk-57N2DFIF.js +1 -0
- package/dist/chunk-5TIJLYZU.js +3 -0
- package/dist/{chunk-GNPS5SBU.js → chunk-6AJZKIZ3.js} +1 -1
- package/dist/{chunk-XNO6DZYP.js → chunk-6HZTMQD6.js} +1 -1
- package/dist/chunk-6LK6ZP3Q.js +1 -0
- package/dist/chunk-6SXOUZ7V.js +1 -0
- package/dist/chunk-6TEXPRI2.js +2 -0
- package/dist/{chunk-OUOYKNMY.js → chunk-6TORWTD7.js} +1 -1
- package/dist/{chunk-IASVAERO.js → chunk-6YAXFS6V.js} +1 -1
- package/dist/chunk-6YHJ554P.js +6 -0
- package/dist/chunk-6ZIOYXEF.js +3 -0
- package/dist/chunk-7BFDUVOG.js +1 -0
- package/dist/chunk-7DVOSOEP.js +11 -0
- package/dist/chunk-7JESXDF2.js +14 -0
- package/dist/chunk-7KJ5TBWG.js +5 -0
- package/dist/{chunk-7MUKLZOL.js → chunk-A3VYI4LO.js} +2 -2
- package/dist/{chunk-4HHXSMD7.js → chunk-A5SQCM63.js} +2 -2
- package/dist/chunk-A6X2IVGT.js +4 -0
- package/dist/{chunk-HUZUORYM.js → chunk-AP3RFOPL.js} +10 -10
- package/dist/{chunk-3LVGAQB4.js → chunk-ATPFTRCC.js} +1 -1
- package/dist/chunk-AWQ5AR2K.js +5 -0
- package/dist/chunk-BECEP46I.js +16 -0
- package/dist/{chunk-JPGO36XP.js → chunk-BHWEA4V2.js} +1 -1
- package/dist/chunk-BPVZ7E63.js +1 -0
- package/dist/chunk-C2FFA4O4.js +1 -0
- package/dist/chunk-C3LZPAAH.js +3 -0
- package/dist/chunk-C6ABJCRG.js +1 -0
- package/dist/chunk-CCEA5CUX.js +1 -0
- package/dist/chunk-CE6FKJFS.js +1 -0
- package/dist/chunk-CW7WJZKR.js +28 -0
- package/dist/chunk-D3DDLLNF.js +2 -0
- package/dist/chunk-D656BV5Z.js +25 -0
- package/dist/chunk-DCBYHVKW.js +1 -0
- package/dist/{chunk-RF2DPBA6.js → chunk-DCK2FX6J.js} +1 -1
- package/dist/chunk-DERA4K6A.js +32 -0
- package/dist/chunk-DNLOSMHL.js +3 -0
- package/dist/chunk-E2YBU6D3.js +294 -0
- package/dist/{chunk-INEU4XKS.js → chunk-F47MFBKM.js} +1 -1
- package/dist/chunk-F6T3UBBL.js +1 -0
- package/dist/{chunk-WXVZJJOR.js → chunk-FBVBO5YQ.js} +1 -1
- package/dist/chunk-FD5S2O6M.js +7 -0
- package/dist/chunk-FFYYJKF7.js +1 -0
- package/dist/{chunk-LX3ZOW52.js → chunk-FGVC22EY.js} +1 -1
- package/dist/{chunk-NRAFVIU3.js → chunk-FP2NOZSD.js} +1 -1
- package/dist/chunk-FQDRVPCY.js +2 -0
- package/dist/{chunk-IOLVEXM6.js → chunk-FSTCEWXX.js} +1 -1
- package/dist/chunk-FTN7Y6HD.js +7 -0
- package/dist/{chunk-52GC6XUT.js → chunk-GVITHCQJ.js} +1 -1
- package/dist/chunk-H4W4DFKK.js +1 -0
- package/dist/{chunk-72F3YBNA.js → chunk-HD5TYIDZ.js} +1 -1
- package/dist/chunk-HHXHOQQP.js +3 -0
- package/dist/chunk-HJSYHK4S.js +8 -0
- package/dist/chunk-HLMFVORT.js +1 -0
- package/dist/chunk-HSYRYSX4.js +3 -0
- package/dist/chunk-I3LX25MB.js +1 -0
- package/dist/chunk-INFBVFMU.js +4 -0
- package/dist/chunk-IOQQUHST.js +18 -0
- package/dist/chunk-IVGWFPMA.js +19 -0
- package/dist/chunk-IWCPQD7X.js +1382 -0
- package/dist/chunk-IWE4RUI7.js +1 -0
- package/dist/chunk-IXUVSFW2.js +1 -0
- package/dist/chunk-J6VTZEE2.js +15 -0
- package/dist/{chunk-MQNYGGAM.js → chunk-K3PGC6DC.js} +1 -1
- package/dist/{chunk-MBAFWQSZ.js → chunk-K77WAKOB.js} +1 -1
- package/dist/{chunk-UGDBJTLP.js → chunk-K7K6GNF6.js} +1 -1
- package/dist/chunk-KFCGMT67.js +1 -0
- package/dist/chunk-KLA7AWG6.js +7 -0
- package/dist/{chunk-6B53BWJW.js → chunk-KQU6HOJ3.js} +1 -1
- package/dist/{chunk-A74GETYC.js → chunk-KU5OPV7U.js} +1 -1
- package/dist/chunk-L2VSSINY.js +1 -0
- package/dist/chunk-LCCMXY6N.js +1 -0
- package/dist/{chunk-GOJ2QHSR.js → chunk-LITB5QQX.js} +1 -1
- package/dist/chunk-LKS47US7.js +8 -0
- package/dist/{chunk-DJONKJSZ.js → chunk-LQMSF3F7.js} +1 -1
- package/dist/chunk-LTWXTDDR.js +5 -0
- package/dist/{chunk-D6JARNEH.js → chunk-M2TJICTB.js} +1 -1
- package/dist/chunk-M4LOKANA.js +1 -0
- package/dist/chunk-M4V2OQAX.js +1 -0
- package/dist/chunk-MA52QGHP.js +1 -0
- package/dist/chunk-MFLBTJO7.js +1 -0
- package/dist/chunk-MGL4YM3S.js +28 -0
- package/dist/{chunk-6TZAAS5H.js → chunk-MIO2CV3Q.js} +1 -1
- package/dist/{chunk-2APPXD5Z.js → chunk-MKE434RB.js} +1 -1
- package/dist/chunk-MZJRNFAU.js +1 -0
- package/dist/{chunk-HSK7YMRE.js → chunk-N3YWHJMB.js} +11 -11
- package/dist/{chunk-TQYMC7TH.js → chunk-N5ROZKPZ.js} +1 -1
- package/dist/chunk-NBYS6YQ2.js +5 -0
- package/dist/chunk-NEZEHBT2.js +1 -0
- package/dist/chunk-NO5KVFTV.js +22 -0
- package/dist/{chunk-3DQIVE24.js → chunk-NP4UFPAX.js} +1 -1
- package/dist/chunk-NPM3MFB3.js +7 -0
- package/dist/{chunk-JVIKCGDY.js → chunk-NXL6LDJU.js} +1 -1
- package/dist/chunk-OA4P6AKS.js +1 -0
- package/dist/chunk-OKNBZSGN.js +2 -0
- package/dist/chunk-OKOYLEA7.js +278 -0
- package/dist/chunk-OLOBQ42K.js +1 -0
- package/dist/chunk-OYP7DKPU.js +1 -0
- package/dist/{chunk-7UYZQN4V.js → chunk-PBTXPBI6.js} +2 -2
- package/dist/chunk-PLQFX5ZP.js +9 -0
- package/dist/{chunk-JLBH7RCF.js → chunk-PS25FEBF.js} +1 -1
- package/dist/{chunk-OLZHWPZP.js → chunk-PSQFZAF3.js} +1 -1
- package/dist/chunk-PUTZFF2Z.js +613 -0
- package/dist/chunk-QLQGHMVU.js +15 -0
- package/dist/{chunk-XLELNRFF.js → chunk-QTGMS62F.js} +1 -1
- package/dist/chunk-R6JNXEB3.js +1 -0
- package/dist/chunk-RAH5NW3R.js +1 -0
- package/dist/{chunk-R466TU3N.js → chunk-RGNAWKD7.js} +1 -1
- package/dist/chunk-RL5BWZ7D.js +15 -0
- package/dist/{chunk-Y5JKV2AI.js → chunk-RVMB5LC2.js} +1 -1
- package/dist/chunk-SSM346XI.js +5 -0
- package/dist/chunk-T5MK7ZSF.js +1 -0
- package/dist/{chunk-22PCRFG4.js → chunk-TGACBJIY.js} +1 -1
- package/dist/{chunk-KBQ4LGFB.js → chunk-TLSAQ6FG.js} +1 -1
- package/dist/chunk-TNQXTZAX.js +32 -0
- package/dist/{chunk-ELVFJ7BR.js → chunk-TQGTEVSR.js} +1 -1
- package/dist/chunk-TXUTT6UA.js +17 -0
- package/dist/chunk-U3ZG675O.js +5 -0
- package/dist/chunk-UARVYVLN.js +3 -0
- package/dist/chunk-UBKVCI7A.js +3 -0
- package/dist/{chunk-SRCQVUMC.js → chunk-UCLSPAVX.js} +1 -1
- package/dist/chunk-ULQG3XQS.js +1 -0
- package/dist/chunk-UOQ75BL3.js +1 -0
- package/dist/{chunk-OXPWCC7I.js → chunk-UOQQNAHX.js} +2 -2
- package/dist/chunk-UURFVUAH.js +11 -0
- package/dist/chunk-VA5IUGZV.js +2 -0
- package/dist/{chunk-YZDDTYTU.js → chunk-VEDZUOVI.js} +3 -3
- package/dist/chunk-VICNWPLQ.js +567 -0
- package/dist/chunk-VPL2NDH6.js +370 -0
- package/dist/chunk-VT77EFRL.js +10 -0
- package/dist/chunk-VYXVYOIJ.js +3 -0
- package/dist/chunk-WCWNI3ZV.js +283 -0
- package/dist/chunk-WNGV4JQS.js +4 -0
- package/dist/chunk-WUK5NQSX.js +6 -0
- package/dist/chunk-X2TC7S57.js +103 -0
- package/dist/chunk-X4CV6TRE.js +1 -0
- package/dist/chunk-XDAOLCPN.js +4 -0
- package/dist/chunk-XFKCDWXB.js +5 -0
- package/dist/chunk-XP6IRAZN.js +1 -0
- package/dist/{chunk-JGXWQULI.js → chunk-XX343DDG.js} +1 -1
- package/dist/{chunk-Q7ING5F5.js → chunk-XXE7667M.js} +1 -1
- package/dist/chunk-YGMVL6NZ.js +6 -0
- package/dist/chunk-YJB7P2HC.js +1 -0
- package/dist/{chunk-P6XE4MH5.js → chunk-YS6VOQ7I.js} +1 -1
- package/dist/chunk-ZZYFG22L.js +26 -0
- package/dist/cli/commands/app/app-logs/sources.js +1 -2
- package/dist/cli/commands/app/build.js +1 -1
- package/dist/cli/commands/app/bulk/cancel.js +1 -1
- package/dist/cli/commands/app/bulk/execute.js +1 -9
- package/dist/cli/commands/app/bulk/status.js +1 -5
- package/dist/cli/commands/app/config/link.js +1 -4
- package/dist/cli/commands/app/config/pull.js +1 -1
- package/dist/cli/commands/app/config/use.js +1 -1
- package/dist/cli/commands/app/config/validate.js +1 -3
- package/dist/cli/commands/app/demo/watcher.js +1 -1
- package/dist/cli/commands/app/deploy.js +1 -22
- package/dist/cli/commands/app/dev/clean.js +1 -5
- package/dist/cli/commands/app/dev.js +1 -320
- package/dist/cli/commands/app/env/pull.js +1 -11
- package/dist/cli/commands/app/env/show.js +1 -1
- package/dist/cli/commands/app/execute.js +1 -1
- package/dist/cli/commands/app/function/build.js +1 -1
- package/dist/cli/commands/app/function/info.js +1 -16
- package/dist/cli/commands/app/function/replay.js +1 -5
- package/dist/cli/commands/app/function/run.js +1 -1
- package/dist/cli/commands/app/function/schema.js +1 -1
- package/dist/cli/commands/app/function/typegen.js +1 -1
- package/dist/cli/commands/app/generate/extension.js +1 -5
- package/dist/cli/commands/app/import-custom-data-definitions.js +1 -4
- package/dist/cli/commands/app/import-extensions.js +1 -1
- package/dist/cli/commands/app/info.js +1 -11
- package/dist/cli/commands/app/init.js +1 -10
- package/dist/cli/commands/app/logs.js +1 -2
- package/dist/cli/commands/app/release.js +1 -4
- package/dist/cli/commands/app/versions/list.js +1 -1
- package/dist/cli/commands/app/webhook/trigger.js +1 -25
- package/dist/cli/commands/auth/login.js +1 -1
- package/dist/cli/commands/auth/logout.js +1 -1
- package/dist/cli/commands/cache/clear.js +1 -1
- package/dist/cli/commands/config/autoupgrade/off.js +1 -1
- package/dist/cli/commands/config/autoupgrade/on.js +1 -1
- package/dist/cli/commands/config/autoupgrade/status.js +1 -1
- package/dist/cli/commands/debug/command-flags.js +1 -1
- package/dist/cli/commands/docs/generate.d.ts +0 -8
- package/dist/cli/commands/docs/generate.js +1 -1
- package/dist/cli/commands/doctor-release/doctor-release.js +1 -1
- package/dist/cli/commands/doctor-release/theme/index.js +1 -1
- package/dist/cli/commands/help.js +1 -1
- package/dist/cli/commands/kitchen-sink/async.js +1 -1
- package/dist/cli/commands/kitchen-sink/index.js +1 -1
- package/dist/cli/commands/kitchen-sink/prompts.js +1 -1
- package/dist/cli/commands/kitchen-sink/static.js +1 -1
- package/dist/cli/commands/notifications/generate.js +1 -1
- package/dist/cli/commands/notifications/list.js +1 -1
- package/dist/cli/commands/organization/list.js +1 -1
- package/dist/cli/commands/search.js +1 -1
- package/dist/cli/commands/theme/check.js +1 -1
- package/dist/cli/commands/theme/console.js +1 -15
- package/dist/cli/commands/theme/delete.js +1 -7
- package/dist/cli/commands/theme/dev.js +1 -26
- package/dist/cli/commands/theme/duplicate.js +1 -32
- package/dist/cli/commands/theme/info.js +1 -1
- package/dist/cli/commands/theme/init.js +1 -8
- package/dist/cli/commands/theme/language-server.js +1 -1
- package/dist/cli/commands/theme/list.js +1 -1
- package/dist/cli/commands/theme/metafields/pull.js +1 -3
- package/dist/cli/commands/theme/open.js +1 -8
- package/dist/cli/commands/theme/package.js +1 -7
- package/dist/cli/commands/theme/preview.js +1 -1
- package/dist/cli/commands/theme/profile.js +1 -3
- package/dist/cli/commands/theme/publish.js +1 -7
- package/dist/cli/commands/theme/pull.js +1 -3
- package/dist/cli/commands/theme/push.js +1 -28
- package/dist/cli/commands/theme/rename.js +1 -6
- package/dist/cli/commands/theme/share.js +1 -3
- package/dist/cli/commands/upgrade.js +1 -1
- package/dist/cli/commands/version.js +1 -1
- package/dist/command-registry.js +1 -1
- package/dist/conf-store-6QNH5BID.js +1 -0
- package/dist/configs/all.yml +3 -0
- package/dist/configs/recommended.yml +3 -0
- package/dist/{custom-oclif-loader-DVFFWCBV.js → custom-oclif-loader-TSPWW5YF.js} +1 -1
- package/dist/data/filters.json +60 -0
- package/dist/data/latest.json +1 -1
- package/dist/data/setting.json +29 -9
- package/dist/data/shopify_system_translations.json +71 -19
- package/dist/data/tags.json +3 -3
- package/dist/deprecations-F6JWVV2W.js +1 -0
- package/dist/{devtools-OLOT2NY4.js → devtools-HCKYP7DQ.js} +1 -1
- package/dist/{devtools-UFRKBFGI.js → devtools-VEZNCV6W.js} +1 -1
- package/dist/dist-4BD6KOLR.js +1 -0
- package/dist/dist-AUABCVPI.js +1 -0
- package/dist/environments-RGLI75HN.js +1 -0
- package/dist/error-OZALZZ3U.js +1 -0
- package/dist/error-handler-V7LSEXHM.js +1 -0
- package/dist/{estree-KI7NUW53.js → estree-BYYJYS3A.js} +1 -1
- package/dist/fs-YMUQ6JLE.js +1 -0
- package/dist/hooks/app-init.js +1 -1
- package/dist/hooks/did-you-mean.js +1 -1
- package/dist/hooks/hydrogen-init.js +1 -1
- package/dist/hooks/plugin-plugins.js +1 -1
- package/dist/hooks/postrun.js +1 -1
- package/dist/hooks/prerun.js +1 -1
- package/dist/hooks/public-metadata.js +1 -1
- package/dist/hooks/sensitive-metadata.js +1 -1
- package/dist/hooks/tunnel-provider.js +1 -1
- package/dist/hooks/tunnel-start.js +1 -1
- package/dist/html-HETICZ2F.js +25 -0
- package/dist/index.js +9 -1182
- package/dist/is-global-BLIZ57HQ.js +1 -0
- package/dist/is-wsl-TN2CXYI7.js +1 -0
- package/dist/{latest-version-EFWBOTWM.js → latest-version-6OAYLOBL.js} +1 -1
- package/dist/{lib-QB6I6CTC.js → lib-AK5EOIKR.js} +1 -1
- package/dist/{lib-C3VO2BQW.js → lib-LVUMLZ4H.js} +1 -1
- package/dist/lib-ME6554NA.js +1 -0
- package/dist/local-GPDAXHE6.js +1 -0
- package/dist/local-storage-P66KJG6I.js +1 -0
- package/dist/{markdown-PLKL4IZK.js → markdown-5TVCXM53.js} +1 -1
- package/dist/{metadata-UDMOTRS7.js → metadata-TRH25EHU.js} +1 -1
- package/dist/{morph-EMYAITFM.js → morph-I35VYPBH.js} +4 -4
- package/dist/node-package-manager-GO4ZRTKQ.js +1 -0
- package/dist/notifications-system-HM6JZ6WJ.js +1 -0
- package/dist/{npa-ICFSA3NL.js → npa-VNALV7XY.js} +1 -1
- package/dist/output-7IYOMPSA.js +1 -0
- package/dist/{postcss-3FJQPJI2.js → postcss-IIK6CGAW.js} +1 -1
- package/dist/{prettier-NVRHEAFO.js → prettier-ZSBNNQTK.js} +1 -1
- package/dist/system-X5C4EQQH.js +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui-H62CMRLG.js +1 -0
- package/dist/upgrade-EEOPH464.js +1 -0
- package/dist/version-76NBQR4K.js +1 -0
- package/dist/version-IGSEISUA.js +1 -0
- package/dist/{workerd-L2EJKIAQ.js → workerd-ST6XJKUN.js} +1 -1
- package/oclif.manifest.json +142 -7
- package/package.json +14 -11
- package/dist/analytics-6IHHYAV6.js +0 -1
- package/dist/analytics-KKVP5DT3.js +0 -1
- package/dist/angular-VRDO2DBE.js +0 -4
- package/dist/chunk-26D72ZNV.js +0 -1
- package/dist/chunk-2I4PRX2I.js +0 -1
- package/dist/chunk-2VQJQ36C.js +0 -103
- package/dist/chunk-323UTVMM.js +0 -1
- package/dist/chunk-3F6NZK7S.js +0 -2
- package/dist/chunk-4G7J6HIV.js +0 -1
- package/dist/chunk-66RJ5T7A.js +0 -102
- package/dist/chunk-6BMMB2UO.js +0 -1
- package/dist/chunk-6HBRBQAN.js +0 -6
- package/dist/chunk-74HYYXXE.js +0 -17
- package/dist/chunk-7BGM2GAH.js +0 -1
- package/dist/chunk-AIV5RI3X.js +0 -1
- package/dist/chunk-AKML26N3.js +0 -7
- package/dist/chunk-ALKTLKQ6.js +0 -5
- package/dist/chunk-B2EHO7ZC.js +0 -847
- package/dist/chunk-B2IVY4V5.js +0 -1
- package/dist/chunk-BDVAE5MS.js +0 -28
- package/dist/chunk-CERXUPGC.js +0 -14
- package/dist/chunk-D3TSJA5S.js +0 -1
- package/dist/chunk-DFMQWJQ3.js +0 -3
- package/dist/chunk-DJQVNH7P.js +0 -567
- package/dist/chunk-ELYP4KFP.js +0 -8
- package/dist/chunk-FFQ5EWII.js +0 -294
- package/dist/chunk-FUOIGXI4.js +0 -1
- package/dist/chunk-GD7FWXJ5.js +0 -2
- package/dist/chunk-GFEAKSGV.js +0 -374
- package/dist/chunk-IIIVWD4R.js +0 -1
- package/dist/chunk-IX5ICOBV.js +0 -7
- package/dist/chunk-J3KVONB3.js +0 -6
- package/dist/chunk-JHPRFW5B.js +0 -19
- package/dist/chunk-K2WUCOQJ.js +0 -32
- package/dist/chunk-K5YV6UVF.js +0 -4
- package/dist/chunk-KGXQS7LS.js +0 -1
- package/dist/chunk-KL5Z3T6L.js +0 -1
- package/dist/chunk-KNVM7N3U.js +0 -1
- package/dist/chunk-KWJ562F2.js +0 -12
- package/dist/chunk-LALIKZPS.js +0 -5
- package/dist/chunk-LAZJ47DZ.js +0 -6
- package/dist/chunk-LDGAHMS7.js +0 -159
- package/dist/chunk-LW7U753G.js +0 -1
- package/dist/chunk-LXFJDCNG.js +0 -1
- package/dist/chunk-N5YIPQ6J.js +0 -1
- package/dist/chunk-N7RBSKYT.js +0 -1
- package/dist/chunk-NF2ABOOU.js +0 -1
- package/dist/chunk-ODNGDO4H.js +0 -50
- package/dist/chunk-OHY4ZL3U.js +0 -2
- package/dist/chunk-P5VVOLGV.js +0 -1
- package/dist/chunk-P7R7FBY2.js +0 -3
- package/dist/chunk-QRRNOVJ3.js +0 -1
- package/dist/chunk-RFG5RMPL.js +0 -1
- package/dist/chunk-RVNMVBPM.js +0 -1
- package/dist/chunk-SBEZBZM7.js +0 -144
- package/dist/chunk-SGQ6D3LU.js +0 -15
- package/dist/chunk-TFSBQ4RY.js +0 -5
- package/dist/chunk-UGXYQ23Y.js +0 -1411
- package/dist/chunk-VS3T5YOG.js +0 -264
- package/dist/chunk-VWYM4OWK.js +0 -1
- package/dist/chunk-VY6SNDKW.js +0 -3
- package/dist/chunk-WFXRSKRK.js +0 -1
- package/dist/chunk-XBXMPFXM.js +0 -1
- package/dist/chunk-YC6G4MHD.js +0 -3
- package/dist/chunk-YI232QLS.js +0 -1
- package/dist/chunk-ZTMSBSYD.js +0 -1
- package/dist/chunk-ZV6NCNI4.js +0 -586
- package/dist/chunk-ZVJVDCIM.js +0 -1
- package/dist/conf-store-U5ZITKJN.js +0 -1
- package/dist/deprecations-TU5UQJVV.js +0 -1
- package/dist/dist-2Z5TND4U.js +0 -1
- package/dist/dist-GYHFDHKP.js +0 -1
- package/dist/environments-Z5PR7DSI.js +0 -1
- package/dist/error-IJGNYKZ3.js +0 -1
- package/dist/error-handler-WSCGNS2P.js +0 -1
- package/dist/fs-5BDEA2KD.js +0 -1
- package/dist/html-VSSXOZOQ.js +0 -25
- package/dist/is-global-V4ZRHQG2.js +0 -1
- package/dist/is-wsl-FVUIXDOK.js +0 -1
- package/dist/lib-5L7UKDEK.js +0 -1
- package/dist/local-6QPX4GCJ.js +0 -1
- package/dist/local-storage-JLXBZVWO.js +0 -1
- package/dist/node-package-manager-HAFRYGUM.js +0 -1
- package/dist/notifications-system-MP7WDOCS.js +0 -1
- package/dist/output-YGMHXEIS.js +0 -1
- package/dist/system-KLXD4FXF.js +0 -1
- package/dist/ui-GHG3UGB3.js +0 -1
- package/dist/upgrade-OPZGPM5J.js +0 -1
- package/dist/version-D5PJZIRW.js +0 -1
- package/dist/version-KRQBMYCH.js +0 -1
- /package/dist/{acorn-LOOAJL3S.js → acorn-QBS5IYTX.js} +0 -0
- /package/dist/{babel-URCL33XX.js → babel-JS32NLHY.js} +0 -0
- /package/dist/{flow-MLHT7MTJ.js → flow-M3Q2HPQT.js} +0 -0
- /package/dist/{glimmer-HAJ4HQCW.js → glimmer-3DEJJGOJ.js} +0 -0
- /package/dist/{graphql-F7IHGXDT.js → graphql-A4HHE3MB.js} +0 -0
- /package/dist/{meriyah-AYZQ3BGY.js → meriyah-23OZNYWC.js} +0 -0
- /package/dist/{typescript-ODJ335NU.js → typescript-YKZ232QT.js} +0 -0
- /package/dist/{yaml-BIHS2GQW.js → yaml-SJKIH3VD.js} +0 -0
|
@@ -0,0 +1,1382 @@
|
|
|
1
|
+
import{a as xw}from"./chunk-TNQXTZAX.js";import{a as ww,b as l4,c as f4}from"./chunk-QSTEVZFQ.js";import{Ca as c4,Da as Sw,i as bw}from"./chunk-4V4DQ6W7.js";import{p as vw}from"./chunk-3YWUSKWF.js";import{b as u4}from"./chunk-5Y7GIF2W.js";import{a as ae,b as Ae,c as T,d as Ym,e as ia,f as Xm,g as y}from"./chunk-VPRTJUIN.js";var eg=T(Zm=>{"use strict";y();Object.defineProperty(Zm,"__esModule",{value:!0});Zm.deepGet=p4;function p4(t,e){return e.reduce((r,i)=>r?.[i],t)}});var kw=T(rs=>{"use strict";y();Object.defineProperty(rs,"__esModule",{value:!0});rs.first=h4;rs.last=d4;rs.findLast=m4;rs.findLastIndex=tg;rs.findLastAndIndex=g4;function h4(t){return t[0]}function d4(t,e=0){return t[t.length-1+e]}function m4(t,e){return t[tg(t,e)]}function tg(t,e){for(let r=t.length-1;r>=0;r--)if(e(t[r]))return r;return-1}function g4(t,e){let r=tg(t,e);return[t[r],r]}});var Aw=T((Rie,Iw)=>{"use strict";y();var y4=ww();Iw.exports=function(e){return e!=null&&typeof e=="object"&&y4(e)===!1}});var rg=T((Fie,Tw)=>{"use strict";y();var _4=ww(),v4=Aw(),Die=Array.prototype.slice;Tw.exports=na;function na(t,e){if(!(this instanceof na))return typeof e=="number"?new na(t).fromIndex(e):new na(t,e);this.str=t||"",this.lineToIndex=b4(this.str),e=e||{},this.origin=typeof e.origin>"u"?1:e.origin}na.prototype.fromIndex=function(t){if(t<0||t>=this.str.length||isNaN(t))return null;var e=S4(t,this.lineToIndex);return{line:e+this.origin,col:t-this.lineToIndex[e]+this.origin}};na.prototype.toIndex=function(t,e){if(typeof e>"u")return _4(t)&&t.length>=2?this.toIndex(t[0],t[1]):v4(t)&&"line"in t&&("col"in t||"column"in t)?this.toIndex(t.line,"col"in t?t.col:t.column):-1;if(isNaN(t)||isNaN(e))return-1;if(t-=this.origin,e-=this.origin,t>=0&&e>=0&&t<this.lineToIndex.length){var r=this.lineToIndex[t],i=t===this.lineToIndex.length-1?this.str.length:this.lineToIndex[t+1];if(e<i-r)return r+e}return-1};function b4(t){for(var e=t.split(`
|
|
2
|
+
`),r=new Array(e.length),i=0,n=0,s=e.length;n<s;n++)r[n]=i,i+=e[n].length+1;return r}function S4(t,e){if(t>=e[e.length-1])return e.length-1;for(var r=0,i=e.length-2,n;r<i;)if(n=r+(i-r>>1),t<e[n])i=n-1;else if(t>=e[n+1])r=n+1;else{r=n;break}return r}});var Ow=T(sa=>{"use strict";y();var w4=sa&&sa.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(sa,"__esModule",{value:!0});sa.getPosition=x4;sa.getOffset=k4;var Ew=w4(rg());function x4(t,e){let r=(0,Ew.default)(t,{origin:0}).fromIndex(Math.min(e,t.length-1));return{index:e,line:r?r.line:-1,character:r?r.col:-1}}function k4(t,e,r){return(0,Ew.default)(t,{origin:1}).toIndex(e,r)}});var pl=T(fl=>{"use strict";y();Object.defineProperty(fl,"__esModule",{value:!0});fl.isError=A4;fl.asError=T4;var I4={1:"Invalid symbol found in the input.",2:"Invalid number format detected.",3:"Property name expected but not found.",4:"A value was expected but not found.",5:"Colon `:` expected after the property name.",6:"Comma `,` expected between elements and properties.",7:"Closing brace `}` expected.",8:"Closing bracket `]` expected.",9:"End of file expected.",10:"Invalid comment token found.",11:"Unexpected end of comment.",12:"Unexpected end of string.",13:"Unexpected end of number.",14:"Invalid Unicode escape sequence.",15:"Invalid escape character found.",16:"Invalid character found in the input."};function A4(t){return t instanceof Error}function T4(t){return t instanceof Error?t:typeof t=="string"?new Error(t):t&&typeof t=="object"&&"error"in t?new Error(E4(t)):t&&typeof t.toString=="function"?new Error(t.toString()):new Error("An unknown error occurred")}function E4(t){return I4[t.error]||"Unknown parse error."}});var ng=T(ig=>{"use strict";y();Object.defineProperty(ig,"__esModule",{value:!0});ig.assertNever=O4;function O4(t){throw new Error(`We should never reach this code, you are missing a case for ${t}`)}});var ag=T(hl=>{"use strict";y();Object.defineProperty(hl,"__esModule",{value:!0});hl.memo=N4;hl.memoize=L4;var sg=Symbol("Unset");function N4(t){let e=sg,r=(...i)=>(e===sg&&(e=t(...i)),e);return r.clearCache=()=>{e=sg},r}function L4(t,e){let r={},i=(...n)=>{let s=e(...n);return r[s]||(r[s]=t(...n)),r[s]};return i.force=(...n)=>(i.invalidate(...n),i(...n)),i.invalidate=(...n)=>{let s=e(...n);delete r[s]},i.clearCache=()=>{r={}},i}});var ug=T(og=>{"use strict";y();Object.defineProperty(og,"__esModule",{value:!0});og.indexBy=P4;function P4(t,e){let r={};for(let i of e)r[t(i)]=i;return r}});function is(t,e=!1){let r=t.length,i=0,n="",s=0,a=16,o=0,u=0,l=0,f=0,h=0;function p(w,_){let A=0,E=0;for(;A<w||!_;){let O=t.charCodeAt(i);if(O>=48&&O<=57)E=E*16+O-48;else if(O>=65&&O<=70)E=E*16+O-65+10;else if(O>=97&&O<=102)E=E*16+O-97+10;else break;i++,A++}return A<w&&(E=-1),E}function m(w){i=w,n="",s=0,a=16,h=0}function v(){let w=i;if(t.charCodeAt(i)===48)i++;else for(i++;i<t.length&&aa(t.charCodeAt(i));)i++;if(i<t.length&&t.charCodeAt(i)===46)if(i++,i<t.length&&aa(t.charCodeAt(i)))for(i++;i<t.length&&aa(t.charCodeAt(i));)i++;else return h=3,t.substring(w,i);let _=i;if(i<t.length&&(t.charCodeAt(i)===69||t.charCodeAt(i)===101))if(i++,(i<t.length&&t.charCodeAt(i)===43||t.charCodeAt(i)===45)&&i++,i<t.length&&aa(t.charCodeAt(i))){for(i++;i<t.length&&aa(t.charCodeAt(i));)i++;_=i}else h=3;return t.substring(w,_)}function S(){let w="",_=i;for(;;){if(i>=r){w+=t.substring(_,i),h=2;break}let A=t.charCodeAt(i);if(A===34){w+=t.substring(_,i),i++;break}if(A===92){if(w+=t.substring(_,i),i++,i>=r){h=2;break}switch(t.charCodeAt(i++)){case 34:w+='"';break;case 92:w+="\\";break;case 47:w+="/";break;case 98:w+="\b";break;case 102:w+="\f";break;case 110:w+=`
|
|
3
|
+
`;break;case 114:w+="\r";break;case 116:w+=" ";break;case 117:let O=p(4,!0);O>=0?w+=String.fromCharCode(O):h=4;break;default:h=5}_=i;continue}if(A>=0&&A<=31)if(qo(A)){w+=t.substring(_,i),h=2;break}else h=6;i++}return w}function b(){if(n="",h=0,s=i,u=o,f=l,i>=r)return s=r,a=17;let w=t.charCodeAt(i);if(cg(w)){do i++,n+=String.fromCharCode(w),w=t.charCodeAt(i);while(cg(w));return a=15}if(qo(w))return i++,n+=String.fromCharCode(w),w===13&&t.charCodeAt(i)===10&&(i++,n+=`
|
|
4
|
+
`),o++,l=i,a=14;switch(w){case 123:return i++,a=1;case 125:return i++,a=2;case 91:return i++,a=3;case 93:return i++,a=4;case 58:return i++,a=6;case 44:return i++,a=5;case 34:return i++,n=S(),a=10;case 47:let _=i-1;if(t.charCodeAt(i+1)===47){for(i+=2;i<r&&!qo(t.charCodeAt(i));)i++;return n=t.substring(_,i),a=12}if(t.charCodeAt(i+1)===42){i+=2;let A=r-1,E=!1;for(;i<A;){let O=t.charCodeAt(i);if(O===42&&t.charCodeAt(i+1)===47){i+=2,E=!0;break}i++,qo(O)&&(O===13&&t.charCodeAt(i)===10&&i++,o++,l=i)}return E||(i++,h=1),n=t.substring(_,i),a=13}return n+=String.fromCharCode(w),i++,a=16;case 45:if(n+=String.fromCharCode(w),i++,i===r||!aa(t.charCodeAt(i)))return a=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return n+=v(),a=11;default:for(;i<r&&g(w);)i++,w=t.charCodeAt(i);if(s!==i){switch(n=t.substring(s,i),n){case"true":return a=8;case"false":return a=9;case"null":return a=7}return a=16}return n+=String.fromCharCode(w),i++,a=16}}function g(w){if(cg(w)||qo(w))return!1;switch(w){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function k(){let w;do w=b();while(w>=12&&w<=15);return w}return{setPosition:m,getPosition:()=>i,scan:e?k:b,getToken:()=>a,getTokenValue:()=>n,getTokenOffset:()=>s,getTokenLength:()=>i-s,getTokenStartLine:()=>u,getTokenStartCharacter:()=>s-f,getTokenError:()=>h}}function cg(t){return t===32||t===9}function qo(t){return t===10||t===13}function aa(t){return t>=48&&t<=57}var Nw,dl=Ae(()=>{"use strict";y();(function(t){t[t.lineFeed=10]="lineFeed",t[t.carriageReturn=13]="carriageReturn",t[t.space=32]="space",t[t._0=48]="_0",t[t._1=49]="_1",t[t._2=50]="_2",t[t._3=51]="_3",t[t._4=52]="_4",t[t._5=53]="_5",t[t._6=54]="_6",t[t._7=55]="_7",t[t._8=56]="_8",t[t._9=57]="_9",t[t.a=97]="a",t[t.b=98]="b",t[t.c=99]="c",t[t.d=100]="d",t[t.e=101]="e",t[t.f=102]="f",t[t.g=103]="g",t[t.h=104]="h",t[t.i=105]="i",t[t.j=106]="j",t[t.k=107]="k",t[t.l=108]="l",t[t.m=109]="m",t[t.n=110]="n",t[t.o=111]="o",t[t.p=112]="p",t[t.q=113]="q",t[t.r=114]="r",t[t.s=115]="s",t[t.t=116]="t",t[t.u=117]="u",t[t.v=118]="v",t[t.w=119]="w",t[t.x=120]="x",t[t.y=121]="y",t[t.z=122]="z",t[t.A=65]="A",t[t.B=66]="B",t[t.C=67]="C",t[t.D=68]="D",t[t.E=69]="E",t[t.F=70]="F",t[t.G=71]="G",t[t.H=72]="H",t[t.I=73]="I",t[t.J=74]="J",t[t.K=75]="K",t[t.L=76]="L",t[t.M=77]="M",t[t.N=78]="N",t[t.O=79]="O",t[t.P=80]="P",t[t.Q=81]="Q",t[t.R=82]="R",t[t.S=83]="S",t[t.T=84]="T",t[t.U=85]="U",t[t.V=86]="V",t[t.W=87]="W",t[t.X=88]="X",t[t.Y=89]="Y",t[t.Z=90]="Z",t[t.asterisk=42]="asterisk",t[t.backslash=92]="backslash",t[t.closeBrace=125]="closeBrace",t[t.closeBracket=93]="closeBracket",t[t.colon=58]="colon",t[t.comma=44]="comma",t[t.dot=46]="dot",t[t.doubleQuote=34]="doubleQuote",t[t.minus=45]="minus",t[t.openBrace=123]="openBrace",t[t.openBracket=91]="openBracket",t[t.plus=43]="plus",t[t.slash=47]="slash",t[t.formFeed=12]="formFeed",t[t.tab=9]="tab"})(Nw||(Nw={}))});var Or,oa,lg,Lw,Pw=Ae(()=>{y();Or=new Array(20).fill(0).map((t,e)=>" ".repeat(e)),oa=200,lg={" ":{"\n":new Array(oa).fill(0).map((t,e)=>`
|
|
5
|
+
`+" ".repeat(e)),"\r":new Array(oa).fill(0).map((t,e)=>"\r"+" ".repeat(e)),"\r\n":new Array(oa).fill(0).map((t,e)=>`\r
|
|
6
|
+
`+" ".repeat(e))}," ":{"\n":new Array(oa).fill(0).map((t,e)=>`
|
|
7
|
+
`+" ".repeat(e)),"\r":new Array(oa).fill(0).map((t,e)=>"\r"+" ".repeat(e)),"\r\n":new Array(oa).fill(0).map((t,e)=>`\r
|
|
8
|
+
`+" ".repeat(e))}},Lw=[`
|
|
9
|
+
`,"\r",`\r
|
|
10
|
+
`]});function ml(t,e,r){let i,n,s,a,o;if(e){for(a=e.offset,o=a+e.length,s=a;s>0&&!Co(t,s-1);)s--;let A=o;for(;A<t.length&&!Co(t,A);)A++;n=t.substring(s,A),i=C4(n,r)}else n=t,i=0,s=0,a=0,o=t.length;let u=R4(r,t),l=Lw.includes(u),f=0,h=0,p;r.insertSpaces?p=Or[r.tabSize||4]??ua(Or[1],r.tabSize||4):p=" ";let m=p===" "?" ":" ",v=is(n,!1),S=!1;function b(){if(f>1)return ua(u,f)+ua(p,i+h);let A=p.length*(i+h);return!l||A>lg[m][u].length?u+ua(p,i+h):A<=0?u:lg[m][u][A]}function g(){let A=v.scan();for(f=0;A===15||A===14;)A===14&&r.keepLines?f+=1:A===14&&(f=1),A=v.scan();return S=A===16||v.getTokenError()!==0,A}let k=[];function w(A,E,O){!S&&(!e||E<o&&O>a)&&t.substring(E,O)!==A&&k.push({offset:E,length:O-E,content:A})}let _=g();if(r.keepLines&&f>0&&w(ua(u,f),0,0),_!==17){let A=v.getTokenOffset()+s,E=p.length*i<20&&r.insertSpaces?Or[p.length*i]:ua(p,i);w(E,s,A)}for(;_!==17;){let A=v.getTokenOffset()+v.getTokenLength()+s,E=g(),O="",L=!1;for(;f===0&&(E===12||E===13);){let R=v.getTokenOffset()+s;w(Or[1],A,R),A=v.getTokenOffset()+v.getTokenLength()+s,L=E===12,O=L?b():"",E=g()}if(E===2)_!==1&&h--,r.keepLines&&f>0||!r.keepLines&&_!==1?O=b():r.keepLines&&(O=Or[1]);else if(E===4)_!==3&&h--,r.keepLines&&f>0||!r.keepLines&&_!==3?O=b():r.keepLines&&(O=Or[1]);else{switch(_){case 3:case 1:h++,r.keepLines&&f>0||!r.keepLines?O=b():O=Or[1];break;case 5:r.keepLines&&f>0||!r.keepLines?O=b():O=Or[1];break;case 12:O=b();break;case 13:f>0?O=b():L||(O=Or[1]);break;case 6:r.keepLines&&f>0?O=b():L||(O=Or[1]);break;case 10:r.keepLines&&f>0?O=b():E===6&&!L&&(O="");break;case 7:case 8:case 9:case 11:case 2:case 4:r.keepLines&&f>0?O=b():(E===12||E===13)&&!L?O=Or[1]:E!==5&&E!==17&&(S=!0);break;case 16:S=!0;break}f>0&&(E===12||E===13)&&(O=b())}E===17&&(r.keepLines&&f>0?O=b():O=r.insertFinalNewline?u:"");let B=v.getTokenOffset()+s;w(O,A,B),_=E}return k}function ua(t,e){let r="";for(let i=0;i<e;i++)r+=t;return r}function C4(t,e){let r=0,i=0,n=e.tabSize||4;for(;r<t.length;){let s=t.charAt(r);if(s===Or[1])i++;else if(s===" ")i+=n;else break;r++}return Math.floor(i/n)}function R4(t,e){for(let r=0;r<e.length;r++){let i=e.charAt(r);if(i==="\r")return r+1<e.length&&e.charAt(r+1)===`
|
|
11
|
+
`?`\r
|
|
12
|
+
`:"\r";if(i===`
|
|
13
|
+
`)return`
|
|
14
|
+
`}return t&&t.eol||`
|
|
15
|
+
`}function Co(t,e){return`\r
|
|
16
|
+
`.indexOf(t.charAt(e))!==-1}var fg=Ae(()=>{"use strict";y();dl();Pw()});function qw(t,e){let r=[],i=new Object,n,s={value:{},offset:0,length:0,type:"object",parent:void 0},a=!1;function o(u,l,f,h){s.value=u,s.offset=l,s.length=f,s.type=h,s.colonOffset=void 0,n=s}try{Do(t,{onObjectBegin:(u,l)=>{if(e<=u)throw i;n=void 0,a=e>u,r.push("")},onObjectProperty:(u,l,f)=>{if(e<l||(o(u,l,f,"property"),r[r.length-1]=u,e<=l+f))throw i},onObjectEnd:(u,l)=>{if(e<=u)throw i;n=void 0,r.pop()},onArrayBegin:(u,l)=>{if(e<=u)throw i;n=void 0,r.push(0)},onArrayEnd:(u,l)=>{if(e<=u)throw i;n=void 0,r.pop()},onLiteralValue:(u,l,f)=>{if(e<l||(o(u,l,f,Mw(u)),e<=l+f))throw i},onSeparator:(u,l,f)=>{if(e<=l)throw i;if(u===":"&&n&&n.type==="property")n.colonOffset=l,a=!1,n=void 0;else if(u===","){let h=r[r.length-1];typeof h=="number"?r[r.length-1]=h+1:(a=!0,r[r.length-1]=""),n=void 0}}})}catch(u){if(u!==i)throw u}return{path:r,previousNode:n,isAtPropertyKey:a,matches:u=>{let l=0;for(let f=0;l<u.length&&f<r.length;f++)if(u[l]===r[f]||u[l]==="*")l++;else if(u[l]!=="**")return!1;return l===u.length}}}function Cw(t,e=[],r=Ro.DEFAULT){let i=null,n=[],s=[];function a(u){Array.isArray(n)?n.push(u):i!==null&&(n[i]=u)}return Do(t,{onObjectBegin:()=>{let u={};a(u),s.push(n),n=u,i=null},onObjectProperty:u=>{i=u},onObjectEnd:()=>{n=s.pop()},onArrayBegin:()=>{let u=[];a(u),s.push(n),n=u,i=null},onArrayEnd:()=>{n=s.pop()},onLiteralValue:a,onError:(u,l,f)=>{e.push({error:u,offset:l,length:f})}},r),n[0]}function yl(t,e=[],r=Ro.DEFAULT){let i={type:"array",offset:-1,length:-1,children:[],parent:void 0};function n(u){i.type==="property"&&(i.length=u-i.offset,i=i.parent)}function s(u){return i.children.push(u),u}Do(t,{onObjectBegin:u=>{i=s({type:"object",offset:u,length:-1,parent:i,children:[]})},onObjectProperty:(u,l,f)=>{i=s({type:"property",offset:l,length:-1,parent:i,children:[]}),i.children.push({type:"string",value:u,offset:l,length:f,parent:i})},onObjectEnd:(u,l)=>{n(u+l),i.length=u+l-i.offset,i=i.parent,n(u+l)},onArrayBegin:(u,l)=>{i=s({type:"array",offset:u,length:-1,parent:i,children:[]})},onArrayEnd:(u,l)=>{i.length=u+l-i.offset,i=i.parent,n(u+l)},onLiteralValue:(u,l,f)=>{s({type:Mw(u),offset:l,length:f,parent:i,value:u}),n(l+f)},onSeparator:(u,l,f)=>{i.type==="property"&&(u===":"?i.colonOffset=l:u===","&&n(l))},onError:(u,l,f)=>{e.push({error:u,offset:l,length:f})}},r);let o=i.children[0];return o&&delete o.parent,o}function Mo(t,e){if(!t)return;let r=t;for(let i of e)if(typeof i=="string"){if(r.type!=="object"||!Array.isArray(r.children))return;let n=!1;for(let s of r.children)if(Array.isArray(s.children)&&s.children[0].value===i&&s.children.length===2){r=s.children[1],n=!0;break}if(!n)return}else{let n=i;if(r.type!=="array"||n<0||!Array.isArray(r.children)||n>=r.children.length)return;r=r.children[n]}return r}function pg(t){if(!t.parent||!t.parent.children)return[];let e=pg(t.parent);if(t.parent.type==="property"){let r=t.parent.children[0].value;e.push(r)}else if(t.parent.type==="array"){let r=t.parent.children.indexOf(t);r!==-1&&e.push(r)}return e}function gl(t){switch(t.type){case"array":return t.children.map(gl);case"object":let e=Object.create(null);for(let r of t.children){let i=r.children[1];i&&(e[r.children[0].value]=gl(i))}return e;case"null":case"string":case"number":case"boolean":return t.value;default:return}}function D4(t,e,r=!1){return e>=t.offset&&e<t.offset+t.length||r&&e===t.offset+t.length}function hg(t,e,r=!1){if(D4(t,e,r)){let i=t.children;if(Array.isArray(i))for(let n=0;n<i.length&&i[n].offset<=e;n++){let s=hg(i[n],e,r);if(s)return s}return t}}function Do(t,e,r=Ro.DEFAULT){let i=is(t,!1),n=[],s=0;function a(V){return V?()=>s===0&&V(i.getTokenOffset(),i.getTokenLength(),i.getTokenStartLine(),i.getTokenStartCharacter()):()=>!0}function o(V){return V?C=>s===0&&V(C,i.getTokenOffset(),i.getTokenLength(),i.getTokenStartLine(),i.getTokenStartCharacter()):()=>!0}function u(V){return V?C=>s===0&&V(C,i.getTokenOffset(),i.getTokenLength(),i.getTokenStartLine(),i.getTokenStartCharacter(),()=>n.slice()):()=>!0}function l(V){return V?()=>{s>0?s++:V(i.getTokenOffset(),i.getTokenLength(),i.getTokenStartLine(),i.getTokenStartCharacter(),()=>n.slice())===!1&&(s=1)}:()=>!0}function f(V){return V?()=>{s>0&&s--,s===0&&V(i.getTokenOffset(),i.getTokenLength(),i.getTokenStartLine(),i.getTokenStartCharacter())}:()=>!0}let h=l(e.onObjectBegin),p=u(e.onObjectProperty),m=f(e.onObjectEnd),v=l(e.onArrayBegin),S=f(e.onArrayEnd),b=u(e.onLiteralValue),g=o(e.onSeparator),k=a(e.onComment),w=o(e.onError),_=r&&r.disallowComments,A=r&&r.allowTrailingComma;function E(){for(;;){let V=i.scan();switch(i.getTokenError()){case 4:O(14);break;case 5:O(15);break;case 3:O(13);break;case 1:_||O(11);break;case 2:O(12);break;case 6:O(16);break}switch(V){case 12:case 13:_?O(10):k();break;case 16:O(1);break;case 15:case 14:break;default:return V}}}function O(V,C=[],F=[]){if(w(V),C.length+F.length>0){let U=i.getToken();for(;U!==17;){if(C.indexOf(U)!==-1){E();break}else if(F.indexOf(U)!==-1)break;U=E()}}}function L(V){let C=i.getTokenValue();return V?b(C):(p(C),n.push(C)),E(),!0}function B(){switch(i.getToken()){case 11:let V=i.getTokenValue(),C=Number(V);isNaN(C)&&(O(2),C=0),b(C);break;case 7:b(null);break;case 8:b(!0);break;case 9:b(!1);break;default:return!1}return E(),!0}function R(){return i.getToken()!==10?(O(3,[],[2,5]),!1):(L(!1),i.getToken()===6?(g(":"),E(),$()||O(4,[],[2,5])):O(5,[],[2,5]),n.pop(),!0)}function q(){h(),E();let V=!1;for(;i.getToken()!==2&&i.getToken()!==17;){if(i.getToken()===5){if(V||O(4,[],[]),g(","),E(),i.getToken()===2&&A)break}else V&&O(6,[],[]);R()||O(4,[],[2,5]),V=!0}return m(),i.getToken()!==2?O(7,[2],[]):E(),!0}function P(){v(),E();let V=!0,C=!1;for(;i.getToken()!==4&&i.getToken()!==17;){if(i.getToken()===5){if(C||O(4,[],[]),g(","),E(),i.getToken()===4&&A)break}else C&&O(6,[],[]);V?(n.push(0),V=!1):n[n.length-1]++,$()||O(4,[],[4,5]),C=!0}return S(),V||n.pop(),i.getToken()!==4?O(8,[4],[]):E(),!0}function $(){switch(i.getToken()){case 3:return P();case 1:return q();case 10:return L(!0);default:return B()}}return E(),i.getToken()===17?r.allowEmptyContent?!0:(O(4,[],[]),!1):$()?(i.getToken()!==17&&O(9,[],[]),!0):(O(4,[],[]),!1)}function Rw(t,e){let r=is(t),i=[],n,s=0,a;do switch(a=r.getPosition(),n=r.scan(),n){case 12:case 13:case 17:s!==a&&i.push(t.substring(s,a)),e!==void 0&&i.push(r.getTokenValue().replace(/[^\r\n]/g,e)),s=r.getPosition();break}while(n!==17);return i.join("")}function Mw(t){switch(typeof t){case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"object":{if(t){if(Array.isArray(t))return"array"}else return"null";return"object"}default:return"null"}}var Ro,dg=Ae(()=>{"use strict";y();dl();(function(t){t.DEFAULT={allowTrailingComma:!1}})(Ro||(Ro={}))});function Dw(t,e,r,i){let n=e.slice(),a=yl(t,[]),o,u;for(;n.length>0&&(u=n.pop(),o=Mo(a,n),o===void 0&&r!==void 0);)typeof u=="string"?r={[u]:r}:r=[r];if(o)if(o.type==="object"&&typeof u=="string"&&Array.isArray(o.children)){let l=Mo(o,[u]);if(l!==void 0)if(r===void 0){if(!l.parent)throw new Error("Malformed AST");let f=o.children.indexOf(l.parent),h,p=l.parent.offset+l.parent.length;if(f>0){let m=o.children[f-1];h=m.offset+m.length}else h=o.offset+1,o.children.length>1&&(p=o.children[1].offset);return ns(t,{offset:h,length:p-h,content:""},i)}else return ns(t,{offset:l.offset,length:l.length,content:JSON.stringify(r)},i);else{if(r===void 0)return[];let f=`${JSON.stringify(u)}: ${JSON.stringify(r)}`,h=i.getInsertionIndex?i.getInsertionIndex(o.children.map(m=>m.children[0].value)):o.children.length,p;if(h>0){let m=o.children[h-1];p={offset:m.offset+m.length,length:0,content:","+f}}else o.children.length===0?p={offset:o.offset+1,length:0,content:f}:p={offset:o.offset+1,length:0,content:f+","};return ns(t,p,i)}}else if(o.type==="array"&&typeof u=="number"&&Array.isArray(o.children)){let l=u;if(l===-1){let f=`${JSON.stringify(r)}`,h;if(o.children.length===0)h={offset:o.offset+1,length:0,content:f};else{let p=o.children[o.children.length-1];h={offset:p.offset+p.length,length:0,content:","+f}}return ns(t,h,i)}else if(r===void 0&&o.children.length>=0){let f=u,h=o.children[f],p;if(o.children.length===1)p={offset:o.offset+1,length:o.length-2,content:""};else if(o.children.length-1===f){let m=o.children[f-1],v=m.offset+m.length,S=o.offset+o.length;p={offset:v,length:S-2-v,content:""}}else p={offset:h.offset,length:o.children[f+1].offset-h.offset,content:""};return ns(t,p,i)}else if(r!==void 0){let f,h=`${JSON.stringify(r)}`;if(!i.isArrayInsertion&&o.children.length>u){let p=o.children[u];f={offset:p.offset,length:p.length,content:h}}else if(o.children.length===0||u===0)f={offset:o.offset+1,length:0,content:o.children.length===0?h:h+","};else{let p=u>o.children.length?o.children.length:u,m=o.children[p-1];f={offset:m.offset+m.length,length:0,content:","+h}}return ns(t,f,i)}else throw new Error(`Can not ${r===void 0?"remove":i.isArrayInsertion?"insert":"modify"} Array index ${l} as length is not sufficient`)}else throw new Error(`Can not add ${typeof u!="number"?"index":"property"} to parent of type ${o.type}`);else{if(r===void 0)throw new Error("Can not delete in empty document");return ns(t,{offset:a?a.offset:0,length:a?a.length:0,content:JSON.stringify(r)},i)}}function ns(t,e,r){if(!r.formattingOptions)return[e];let i=_l(t,e),n=e.offset,s=e.offset+e.content.length;if(e.length===0||e.content.length===0){for(;n>0&&!Co(i,n-1);)n--;for(;s<i.length&&!Co(i,s);)s++}let a=ml(i,{offset:n,length:s-n},{...r.formattingOptions,keepLines:!1});for(let u=a.length-1;u>=0;u--){let l=a[u];i=_l(i,l),n=Math.min(n,l.offset),s=Math.max(s,l.offset+l.length),s+=l.content.length-l.length}let o=t.length-(i.length-s)-n;return[{offset:n,length:o,content:i.substring(n,s)}]}function _l(t,e){return t.substring(0,e.offset)+e.content+t.substring(e.offset+e.length)}var Fw=Ae(()=>{"use strict";y();fg();dg()});var ca={};Ym(ca,{ParseErrorCode:()=>yg,ScanError:()=>mg,SyntaxKind:()=>gg,applyEdits:()=>z4,createScanner:()=>Nr,findNodeAtLocation:()=>$4,findNodeAtOffset:()=>vg,format:()=>wg,getLocation:()=>B4,getNodePath:()=>bg,getNodeValue:()=>Sg,modify:()=>W4,parse:()=>_g,parseTree:()=>V4,printParseErrorCode:()=>G4,stripComments:()=>H4,visit:()=>U4});function G4(t){switch(t){case 1:return"InvalidSymbol";case 2:return"InvalidNumberFormat";case 3:return"PropertyNameExpected";case 4:return"ValueExpected";case 5:return"ColonExpected";case 6:return"CommaExpected";case 7:return"CloseBraceExpected";case 8:return"CloseBracketExpected";case 9:return"EndOfFileExpected";case 10:return"InvalidCommentToken";case 11:return"UnexpectedEndOfComment";case 12:return"UnexpectedEndOfString";case 13:return"UnexpectedEndOfNumber";case 14:return"InvalidUnicode";case 15:return"InvalidEscapeCharacter";case 16:return"InvalidCharacter"}return"<unknown ParseErrorCode>"}function wg(t,e,r){return ml(t,e,r)}function W4(t,e,r,i){return Dw(t,e,r,i)}function z4(t,e){let r=e.slice(0).sort((n,s)=>{let a=n.offset-s.offset;return a===0?n.length-s.length:a}),i=t.length;for(let n=r.length-1;n>=0;n--){let s=r[n];if(s.offset+s.length<=i)t=_l(t,s);else throw new Error("Overlapping edit");i=s.offset}return t}var Nr,mg,gg,B4,_g,V4,$4,vg,bg,Sg,U4,H4,yg,xi=Ae(()=>{"use strict";y();fg();Fw();dl();dg();Nr=is;(function(t){t[t.None=0]="None",t[t.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",t[t.UnexpectedEndOfString=2]="UnexpectedEndOfString",t[t.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",t[t.InvalidUnicode=4]="InvalidUnicode",t[t.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",t[t.InvalidCharacter=6]="InvalidCharacter"})(mg||(mg={}));(function(t){t[t.OpenBraceToken=1]="OpenBraceToken",t[t.CloseBraceToken=2]="CloseBraceToken",t[t.OpenBracketToken=3]="OpenBracketToken",t[t.CloseBracketToken=4]="CloseBracketToken",t[t.CommaToken=5]="CommaToken",t[t.ColonToken=6]="ColonToken",t[t.NullKeyword=7]="NullKeyword",t[t.TrueKeyword=8]="TrueKeyword",t[t.FalseKeyword=9]="FalseKeyword",t[t.StringLiteral=10]="StringLiteral",t[t.NumericLiteral=11]="NumericLiteral",t[t.LineCommentTrivia=12]="LineCommentTrivia",t[t.BlockCommentTrivia=13]="BlockCommentTrivia",t[t.LineBreakTrivia=14]="LineBreakTrivia",t[t.Trivia=15]="Trivia",t[t.Unknown=16]="Unknown",t[t.EOF=17]="EOF"})(gg||(gg={}));B4=qw,_g=Cw,V4=yl,$4=Mo,vg=hg,bg=pg,Sg=gl,U4=Do,H4=Rw;(function(t){t[t.InvalidSymbol=1]="InvalidSymbol",t[t.InvalidNumberFormat=2]="InvalidNumberFormat",t[t.PropertyNameExpected=3]="PropertyNameExpected",t[t.ValueExpected=4]="ValueExpected",t[t.ColonExpected=5]="ColonExpected",t[t.CommaExpected=6]="CommaExpected",t[t.CloseBraceExpected=7]="CloseBraceExpected",t[t.CloseBracketExpected=8]="CloseBracketExpected",t[t.EndOfFileExpected=9]="EndOfFileExpected",t[t.InvalidCommentToken=10]="InvalidCommentToken",t[t.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",t[t.UnexpectedEndOfString=12]="UnexpectedEndOfString",t[t.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",t[t.InvalidUnicode=14]="InvalidUnicode",t[t.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",t[t.InvalidCharacter=16]="InvalidCharacter"})(yg||(yg={}))});var ze=T(la=>{"use strict";y();Object.defineProperty(la,"__esModule",{value:!0});la.parseJSON=Y4;la.nodeAtPath=X4;la.getLocStart=Z4;la.getLocEnd=e3;var J4=(xi(),Xm(ca)),K4=Ce(),Q4={disallowComments:!1,allowTrailingComma:!0,allowEmptyContent:!1};function Y4(t,e,r){try{let i=[],n=(0,J4.parse)(t,i,Q4);if(i.length&&r)throw i[0];return n}catch(i){return e!==void 0?e:(0,K4.asError)(i)}}function X4(t,e){return e.reduce((r,i)=>{if(r)switch(r.type){case"Object":{let n=r.children.find(s=>s.key.value===i);return n?n.value:void 0}case"Array":return r.children[i];case"Literal":return;case"Identifier":return;case"Property":return}},t)}function Z4(t){return t.loc?.start.offset??0}function e3(t){return t.loc?.end.offset??0}});var Bw=T((ss,jw)=>{y();var Fo=bw(),t3=Fo.default||Fo,vl=function(t,e){return/^\/\//.test(t)&&(t="https:"+t),t3.call(this,t,e)};vl.ponyfill=!0;jw.exports=ss=vl;ss.fetch=vl;ss.Headers=Fo.Headers;ss.Request=Fo.Request;ss.Response=Fo.Response;ss.default=vl});var ki=T(as=>{"use strict";y();Object.defineProperty(as,"__esModule",{value:!0});as.doesFileExist=Vw;as.doesFileExceedThreshold=$w;as.getFileSize=Uw;as.hasRemoteAssetSizeExceededThreshold=i3;as.hasLocalAssetSizeExceededThreshold=n3;var r3=Bw();async function Vw(t,e){let r=t.toUri(e);return await t.fileExists(r)}async function $w(t,e,r){let i=t.toUri(e);if(!t.fileSize)return[!1,0];let n=await t.fileSize(i);return[n>r,n]}async function Uw(t){try{let e=await(0,r3.fetch)(t,{method:"HEAD"});if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);let r=e.headers.get("Content-Length");return r===null?0:parseFloat(r)}catch{return 0}}async function i3(t,e){return await Uw(t)>e}async function n3(t,e,r){if(!await Vw(t,e))return!1;let[n,s]=await $w(t,e,r);return n}});var Kw=T(mn=>{"use strict";y();Object.defineProperty(mn,"__esModule",{value:!0});mn.getBlocks=Gw;mn.isInvalidPresetBlock=Ww;mn.isInvalidDefaultBlock=a3;mn.validateNestedBlocks=zw;mn.reportWarning=kg;mn.validateBlockFileExistence=Jw;var xg=ze(),s3=ki();function Gw(t){let e=[],r=[],i={},n=[],s=t.blocks,a=t.presets;function o(f,h){if(!f)return;"name"in f?r.push({node:f,path:["blocks",String(h),"type"]}):f.type!=="@app"&&e.push({node:f,path:["blocks",String(h),"type"]})}function u(f,h,p=0){f&&(i[p]||(i[p]=[]),i[p].push({node:f,path:h.concat("type")}),"blocks"in f&&(Array.isArray(f.blocks)?f.blocks.forEach((m,v)=>{u(m,h.concat("blocks",String(v)),p+1)}):typeof f.blocks=="object"&&f.blocks!==null&&Object.entries(f.blocks).forEach(([m,v])=>{u(v,h.concat("blocks",m),p+1)})))}function l(f,h){"name"in f&&n.push({node:f,path:["default","blocks",String(h),"type"]})}return Array.isArray(s)&&s.forEach((f,h)=>{o(f,h)}),a&&a.forEach((f,h)=>{"blocks"in f&&f.blocks&&(Array.isArray(f.blocks)?f.blocks.forEach((p,m)=>{u(p,["presets",String(h),"blocks",String(m)],0)}):typeof f.blocks=="object"&&Object.entries(f.blocks).forEach(([p,m])=>{u(m,["presets",String(h),"blocks",p],0)}))}),"default"in t&&t.default?.blocks?.forEach((f,h)=>{l(f,h)}),{rootLevelThemeBlocks:e,rootLevelLocalBlocks:r,presetLevelBlocks:i,defaultLevelBlocks:n,hasRootBlocksDeclaration:Array.isArray(s)}}function Ww(t,e,r,i,n=!0){if(e.static)return!i.some(l=>l.type===e.type&&l.id===t);let s=e.type.startsWith("_");if(s&&!n)return!1;let a=r.some(l=>l.node.type==="@theme"),o=s||!a;return!r.some(l=>l.node.type===e.type)&&o}function a3(t,e,r=!0){let i=t.type.startsWith("_");if(i&&!r)return!1;let n=e.some(o=>o.node.type==="@theme"),s=i||!n;return!e.some(o=>o.node.type===t.type)&&s}async function Hw(t,e,r,i,n,s,a,o,u=[]){let l=(0,xg.nodeAtPath)(o,e),f="id"in t?t.id:e.at(-2);if(l){if(Ww(f,t,n,u)){let p=!!t.static,m=t.type.startsWith("_"),v=p?`Could not find a static block of type "${t.type}" with id "${f}" in "blocks/${i.type}.liquid".`:m?`Private block type "${t.type}" is not allowed in "${i.type}" blocks.`:`Block type "${t.type}" is not allowed in "${i.type}" blocks. Allowed types are: ${s.join(", ")}.`;kg(v,a,l,r)}await Jw(t.type,r)||kg(`Theme block 'blocks/${t.type}.liquid' does not exist.`,a,l,r)}"blocks"in t&&t.blocks&&zw(r,t,t.blocks,e.slice(0,-1),a,o)}async function zw(t,e,r,i,n,s){if(!r)return;let a=await t.getBlockSchema?.(e.type);if(!a||a instanceof Error)return;let{validSchema:o,staticBlockDefs:u}=a;if(!o||o instanceof Error)return;let{rootLevelThemeBlocks:l}=Gw(o),f=l.map(h=>h.node.type);Array.isArray(r)?Promise.all(r.map((h,p)=>{let m=i.concat(["blocks",String(p),"type"]);return Hw(h,m,t,e,l,f,n,s,u)})):typeof r=="object"&&Promise.all(Object.entries(r).map(([h,p])=>{let m=i.concat(["blocks",h,"type"]);return Hw(p,m,t,e,l,f,n,s,u)}))}function kg(t,e,r,i){i.report({message:t,startIndex:e+(0,xg.getLocStart)(r),endIndex:e+(0,xg.getLocEnd)(r)})}async function Jw(t,e){if(t==="@theme"||t==="@app")return!0;let r=`blocks/${t}.liquid`;return await(0,s3.doesFileExist)(e,r)}});var Fx=T(Wi=>{"use strict";y();Object.defineProperty(Wi,"__esModule",{value:!0});function ar(t){let e=t||"";return function(){throw new Error("this method "+e+" is abstract! (it has no implementation in class "+this.constructor.name+")")}}function sr(t,e){if(!t)throw new Error(e||"Assertion failed")}function Eg(t,e,r){let i;Object.defineProperty(t,e,{get(){return i||(i=r.call(this)),i}})}function o3(t){return t&&Object.assign({},t)}function mx(t,e){let r=[];for(;e-- >0;)r.push(t());return r}function gx(t,e){return new Array(e+1).join(t)}function Al(t,e){return mx(()=>t,e)}function Og(t){let e=[];for(let r=0;r<t.length;r++){let i=t[r];t.lastIndexOf(i)!==r&&e.indexOf(i)<0&&e.push(i)}return e}function yx(t){let e=[];return t.forEach(r=>{e.indexOf(r)<0&&e.push(r)}),e}function os(t){let e=t[0];return e===e.toUpperCase()}function _x(t){return!os(t)}function vx(t,e,r){let i=r||" ";return t.length<e?gx(i,e-t.length)+t:t}function ls(){this.strings=[]}ls.prototype.append=function(t){this.strings.push(t)};ls.prototype.contents=function(){return this.strings.join("")};var Ig=t=>String.fromCodePoint(parseInt(t,16));function bx(t){if(t.charAt(0)==="\\")switch(t.charAt(1)){case"b":return"\b";case"f":return"\f";case"n":return`
|
|
17
|
+
`;case"r":return"\r";case"t":return" ";case"v":return"\v";case"x":return Ig(t.slice(2,4));case"u":return t.charAt(2)==="{"?Ig(t.slice(3,-1)):Ig(t.slice(2,6));default:return t.charAt(1)}else return t}function $g(t){if(t==null)return String(t);let e=Object.prototype.toString.call(t);try{let r;return t.constructor&&t.constructor.name?r=t.constructor.name:e.indexOf("[object ")===0?r=e.slice(8,-1):r=typeof t,r+": "+JSON.stringify(String(t))}catch{return e}}function Sx(t,e="unexpected null value"){if(t==null)throw new Error(e);return t}var u3=Object.freeze({__proto__:null,abstract:ar,assert:sr,defineLazyProperty:Eg,clone:o3,repeatFn:mx,repeatStr:gx,repeat:Al,getDuplicates:Og,copyWithoutDuplicates:yx,isSyntactic:os,isLexical:_x,padLeft:vx,StringBuffer:ls,unescapeCodePoint:bx,unexpectedObjToString:$g,checkNotNull:Sx});function c3(t){let e=0;return t.map(i=>{let n=i.toString();return e=Math.max(e,n.length),n}).map(i=>vx(i,e))}function Qw(t,e,r){let i=t.length,n=t.slice(0,r),s=t.slice(r+e.length);return(n+e+s).substr(0,i)}function l3(...t){let e=this,{offset:r}=e,{repeatStr:i}=u3,n=new ls;n.append("Line "+e.lineNum+", col "+e.colNum+`:
|
|
18
|
+
`);let s=c3([e.prevLine==null?0:e.lineNum-1,e.lineNum,e.nextLine==null?0:e.lineNum+1]),a=(f,h,p)=>{n.append(p+s[f]+" | "+h+`
|
|
19
|
+
`)};e.prevLine!=null&&a(0,e.prevLine," "),a(1,e.line,"> ");let o=e.line.length,u=i(" ",o+1);for(let f=0;f<t.length;++f){let h=t[f][0],p=t[f][1];sr(h>=0&&h<=p,"range start must be >= 0 and <= end");let m=r-e.colNum+1;h=Math.max(0,h-m),p=Math.min(p-m,o),u=Qw(u,i("~",p-h),h)}let l=2+s[1].length+3;return n.append(i(" ",l)),u=Qw(u,"^",e.colNum-1),n.append(u.replace(/ +$/,"")+`
|
|
20
|
+
`),e.nextLine!=null&&a(2,e.nextLine," "),n.contents()}var Ng=[];function wx(t){Ng.push(t)}function f3(t){Ng.forEach(e=>{e(t)}),Ng=null}function Tl(t,e){let r=1,i=1,n=0,s=0,a=null,o=null,u=-1;for(;n<e;){let h=t.charAt(n++);h===`
|
|
21
|
+
`?(r++,i=1,u=s,s=n):h!=="\r"&&i++}let l=t.indexOf(`
|
|
22
|
+
`,s);if(l===-1)l=t.length;else{let h=t.indexOf(`
|
|
23
|
+
`,l+1);a=h===-1?t.slice(l):t.slice(l,h),a=a.replace(/^\r?\n/,"").replace(/\r$/,"")}u>=0&&(o=t.slice(u,s).replace(/\r?\n$/,""));let f=t.slice(s,l).replace(/\r$/,"");return{offset:e,lineNum:r,colNum:i,line:f,prevLine:o,nextLine:a,toString:l3}}function Ug(t,e,...r){return Tl(t,e).toString(...r)}var Yw=(()=>{let t=0;return e=>""+e+t++})();function p3(t,e,r){return r(e[t])}function h3(t,e,r){return e[t].map(r)}function Xw(t){let e=t.split(/ ?\[\]/);return e.length===2?h3.bind(null,e[0]):p3.bind(null,t)}function Zw(t,e,r){return t.map(i=>i(e,r))}function d3(t){return typeof t=="string"?Zw.bind(null,[Xw(t)]):Array.isArray(t)?Zw.bind(null,t.map(Xw)):(sr(typeof t=="function","Expected a string, Array, or function"),sr(t.length===2,"Expected a function of arity 2, got "+t.length),t)}function ex(t){return/^[a-zA-Z_][0-9a-zA-Z_]*$/.test(t)}function tx(t){return t.trim()}function m3(t){let e=t.split(/[()]/).map(tx);if(e.length===3&&e[2]===""){let r=e[0],i=[];if(e[1].length>0&&(i=e[1].split(",").map(tx)),ex(r)&&i.every(ex))return{name:r,formals:i}}throw new Error("Invalid operation signature: "+t)}var Lg=class{constructor(e){this._shapes=e.shapes,this._getTag=e.getTag,this.Adapter=function(r,i){this._adaptee=r,this._family=i},this.Adapter.prototype.valueOf=function(){throw new Error("heeey!")},this.operations={},this._arities=Object.create(null),this._getChildren=Object.create(null),Object.keys(this._shapes).forEach(r=>{let i=this._shapes[r];this._getChildren[r]=d3(i),typeof i!="function"&&(this._arities[r]=Array.isArray(i)?i.length:1)}),this._wrap=r=>new this.Adapter(r,this)}wrap(e){return this._wrap(e)}_checkActionDict(e){Object.keys(e).forEach(r=>{sr(r in this._getChildren,"Unrecognized action name '"+r+"'");let i=e[r];if(sr(typeof i=="function","Key '"+r+"': expected function, got "+i),r in this._arities){let n=this._arities[r],s=e[r].length;sr(s===n,"Action '"+r+"' has the wrong arity: expected "+n+", got "+s)}})}addOperation(e,r){let i=m3(e),{name:n}=i;this._checkActionDict(r),this.operations[n]={name:n,formals:i.formals,actions:r};let s=this;return this.Adapter.prototype[n]=function(...a){let o=s._getTag(this._adaptee);sr(o in s._getChildren,"getTag returned unrecognized tag '"+o+"'"),sr(o in r,"No action for '"+o+"' in operation '"+n+"'");let u=Object.create(null);for(let[h,p]of Object.entries(a))u[i.formals[h]]=p;let l=this.args;this.args=u;let f=r[o].apply(this,s._getChildren[o](this._adaptee,s._wrap));return this.args=l,f},this}};function rx(t){return t.toAST(this.args.mapping)}function ix(){return[]}function nx(t,e,r){return[t.toAST(this.args.mapping)].concat(r.toAST(this.args.mapping))}var g3={listOf:rx,ListOf:rx,emptyListOf:ix,EmptyListOf:ix,nonemptyListOf:nx,NonemptyListOf:nx},xx={_terminal(){return this.sourceString},_nonterminal(...t){let{ctorName:e}=this._node,{mapping:r}=this.args;if(!Object.prototype.hasOwnProperty.call(r,e)){if(this.isLexical())return this.sourceString;let s=t.filter(a=>!a.isTerminal());if(s.length===1)return s[0].toAST(r)}if(typeof r[e]=="number")return t[r[e]].toAST(r);let i=r[e]||t,n={type:e};for(let s in i){let a=r[e]&&r[e][s];typeof a=="number"?n[s]=t[a].toAST(r):typeof a=="string"||typeof a=="boolean"||a===null?n[s]=a:typeof a=="object"&&a instanceof Number?n[s]=Number(a):typeof a=="function"?n[s]=a.call(this,t):a===void 0&&(t[s]&&!t[s].isTerminal()?n[s]=t[s].toAST(r):delete n[s])}return n},_iter(...t){return this._node.isOptional()?this.numChildren===0?null:t[0].toAST(this.args.mapping):t.map(e=>e.toAST(this.args.mapping))}};function y3(t,e){if(typeof t.failed!="function"||t.failed())throw new Error("toAST() expects a succesful MatchResult as first parameter");e=Object.assign({},g3,e);let r=Object.assign({},xx);for(let s in e)typeof e[s]=="function"&&(r[s]=e[s],delete e[s]);return t._cst.grammar.createSemantics().addOperation("toAST(mapping)",r)(t).toAST(e)}function _3(t){if(typeof t.createSemantics!="function")throw new Error("semanticsToAST() expects a Grammar as parameter");return t.createSemantics().addOperation("toAST(mapping)",xx)}var kx=t=>new RegExp(String.raw`\p{${t}}`,"u"),Pg=Object.fromEntries(["Cc","Cf","Cn","Co","Cs","Ll","Lm","Lo","Lt","Lu","Mc","Me","Mn","Nd","Nl","No","Pc","Pd","Pe","Pf","Pi","Po","Ps","Sc","Sk","Sm","So","Zl","Zp","Zs"].map(t=>[t,kx(t)]));Pg.Ltmo=/\p{Lt}|\p{Lm}|\p{Lo}/u;var sx=Object.fromEntries(["XID_Start","XID_Continue","White_Space"].map(t=>[t,kx(t)])),me=class t{constructor(){if(this.constructor===t)throw new Error("PExpr cannot be instantiated -- it's abstract")}withSource(e){return e&&(this.source=e.trimmed()),this}},Qt=Object.create(me.prototype),Yt=Object.create(me.prototype),_t=class extends me{constructor(e){super(),this.obj=e}},At=class extends me{constructor(e,r){super(),this.from=e,this.to=r,this.matchCodePoint=e.length>1||r.length>1}},Tt=class extends me{constructor(e){super(),this.index=e}},st=class extends me{constructor(e){super(),this.terms=e}},fa=class extends st{constructor(e,r,i){let n=e.rules[r].body;super([i,n]),this.superGrammar=e,this.name=r,this.body=i}},pa=class extends st{constructor(e,r,i,n){let s=e.rules[r].body;super([...i,s,...n]),this.superGrammar=e,this.ruleName=r,this.expansionPos=i.length}},lt=class extends me{constructor(e){super(),this.factors=e}},qt=class extends me{constructor(e){super(),this.expr=e}},Hi=class extends qt{},gn=class extends qt{},oi=class extends qt{};Hi.prototype.operator="*";gn.prototype.operator="+";oi.prototype.operator="?";Hi.prototype.minNumMatches=0;gn.prototype.minNumMatches=1;oi.prototype.minNumMatches=0;Hi.prototype.maxNumMatches=Number.POSITIVE_INFINITY;gn.prototype.maxNumMatches=Number.POSITIVE_INFINITY;oi.prototype.maxNumMatches=1;var gt=class extends me{constructor(e){super(),this.expr=e}},Ct=class extends me{constructor(e){super(),this.expr=e}},Kt=class extends me{constructor(e){super(),this.expr=e}},Te=class extends me{constructor(e,r=[]){super(),this.ruleName=e,this.args=r}isSyntactic(){return os(this.ruleName)}toMemoKey(){return this._memoKey||Object.defineProperty(this,"_memoKey",{value:this.toString()}),this._memoKey}},yt=class extends me{constructor(e){if(super(),this.categoryOrProp=e,e in Pg)this.pattern=Pg[e];else if(e in sx)this.pattern=sx[e];else throw new Error(`Invalid Unicode category or property name: ${JSON.stringify(e)}`)}};function Ze(t,e){let r;return e?(r=new Error(e.getLineAndColumnMessage()+t),r.shortMessage=t,r.interval=e):r=new Error(t),r}function qg(){return Ze("Interval sources don't match")}function v3(t){let e=new Error;return Object.defineProperty(e,"message",{enumerable:!0,get(){return t.message}}),Object.defineProperty(e,"shortMessage",{enumerable:!0,get(){return"Expected "+t.getExpectedText()}}),e.interval=t.getInterval(),e}function b3(t,e,r){let i=e?`Grammar ${t} is not declared in namespace '${e}'`:"Undeclared grammar "+t;return Ze(i,r)}function S3(t,e){return Ze("Grammar "+t.name+" is already declared in this namespace")}function w3(t){return Ze(`Grammar '${t.name}' does not support incremental parsing`)}function Ix(t,e,r){return Ze("Rule "+t+" is not declared in grammar "+e,r)}function x3(t,e,r){return Ze("Cannot override rule "+t+" because it is not declared in "+e,r)}function k3(t,e,r){return Ze("Cannot extend rule "+t+" because it is not declared in "+e,r)}function ax(t,e,r,i){let n="Duplicate declaration for rule '"+t+"' in grammar '"+e+"'";return e!==r&&(n+=" (originally declared in '"+r+"')"),Ze(n,i)}function Ax(t,e,r,i){return Ze("Wrong number of parameters for rule "+t+" (expected "+e+", got "+r+")",i)}function I3(t,e,r,i){return Ze("Wrong number of arguments for rule "+t+" (expected "+e+", got "+r+")",i)}function ox(t,e,r){return Ze("Duplicate parameter names in rule "+t+": "+e.join(", "),r)}function A3(t,e){return Ze("Invalid parameter to rule "+t+": "+e+" has arity "+e.getArity()+", but parameter expressions must have arity 1",e.source)}var T3="NOTE: A _syntactic rule_ is a rule whose name begins with a capital letter. See https://ohmjs.org/d/svl for more details.";function E3(t,e){return Ze("Cannot apply syntactic rule "+t+" from here (inside a lexical context)",e.source)}function O3(t){let{ruleName:e}=t;return Ze(`applySyntactic is for syntactic rules, but '${e}' is a lexical rule. `+T3,t.source)}function N3(t){return Ze("applySyntactic is not required here (in a syntactic context)",t.source)}function ux(t,e){return Ze("Incorrect argument type: expected "+t,e.source)}function L3(t){return Ze("'...' can appear at most once in a rule body",t.source)}function P3(t){let e=t._node;sr(e&&e.isNonterminal()&&e.ctorName==="escapeChar_unicodeCodePoint");let r=t.children.slice(1,-1).map(n=>n.source),i=r[0].coverageWith(...r.slice(1));return Ze(`U+${i.contents} is not a valid Unicode code point`,i)}function Tx(t,e){let r=e.length>0?e[e.length-1].args:[],n="Nullable expression "+t.expr.substituteParams(r)+" is not allowed inside '"+t.operator+"' (possible infinite loop)";if(e.length>0){let s=e.map(a=>new Te(a.ruleName,a.args)).join(`
|
|
24
|
+
`);n+=`
|
|
25
|
+
Application stack (most recent application last):
|
|
26
|
+
`+s}return Ze(n,t.expr.source)}function Ex(t,e,r,i){return Ze("Rule "+t+" involves an alternation which has inconsistent arity (expected "+e+", got "+r+")",i.source)}function q3(t){let e=t.map(r=>r.message);return Ze(["Errors:"].concat(e).join(`
|
|
27
|
+
- `),t[0].interval)}function C3(t,e,r,i){let n=i.slice(0,-1).map(u=>{let l=" "+u[0].name+" > "+u[1];return u.length===3?l+" for '"+u[2]+"'":l}).join(`
|
|
28
|
+
`);n+=`
|
|
29
|
+
`+e+" > "+t;let s="";t==="_iter"&&(s=[`
|
|
30
|
+
NOTE: as of Ohm v16, there is no default action for iteration nodes \u2014 see `," https://ohmjs.org/d/dsa for details."].join(`
|
|
31
|
+
`));let a=[`Missing semantic action for '${t}' in ${r} '${e}'.${s}`,"Action stack (most recent call last):",n].join(`
|
|
32
|
+
`),o=Ze(a);return o.name="missingSemanticAction",o}function R3(t){if(t.length===1)throw t[0];if(t.length>1)throw q3(t)}var us=class t{constructor(e,r,i){Object.defineProperty(this,"_sourceString",{value:e,configurable:!1,enumerable:!1,writable:!1}),this.startIdx=r,this.endIdx=i}get sourceString(){return this._sourceString}get contents(){return this._contents===void 0&&(this._contents=this.sourceString.slice(this.startIdx,this.endIdx)),this._contents}get length(){return this.endIdx-this.startIdx}coverageWith(...e){return t.coverage(...e,this)}collapsedLeft(){return new t(this.sourceString,this.startIdx,this.startIdx)}collapsedRight(){return new t(this.sourceString,this.endIdx,this.endIdx)}getLineAndColumn(){return Tl(this.sourceString,this.startIdx)}getLineAndColumnMessage(){let e=[this.startIdx,this.endIdx];return Ug(this.sourceString,this.startIdx,e)}minus(e){if(this.sourceString!==e.sourceString)throw qg();return this.startIdx===e.startIdx&&this.endIdx===e.endIdx?[]:this.startIdx<e.startIdx&&e.endIdx<this.endIdx?[new t(this.sourceString,this.startIdx,e.startIdx),new t(this.sourceString,e.endIdx,this.endIdx)]:this.startIdx<e.endIdx&&e.endIdx<this.endIdx?[new t(this.sourceString,e.endIdx,this.endIdx)]:this.startIdx<e.startIdx&&e.startIdx<this.endIdx?[new t(this.sourceString,this.startIdx,e.startIdx)]:[this]}relativeTo(e){if(this.sourceString!==e.sourceString)throw qg();return sr(this.startIdx>=e.startIdx&&this.endIdx<=e.endIdx,"other interval does not cover this one"),new t(this.sourceString,this.startIdx-e.startIdx,this.endIdx-e.startIdx)}trimmed(){let{contents:e}=this,r=this.startIdx+e.match(/^\s*/)[0].length,i=this.endIdx-e.match(/\s*$/)[0].length;return new t(this.sourceString,r,i)}subInterval(e,r){let i=this.startIdx+e;return new t(this.sourceString,i,i+r)}};us.coverage=function(t,...e){let{startIdx:r,endIdx:i}=t;for(let n of e){if(n.sourceString!==t.sourceString)throw qg();r=Math.min(r,n.startIdx),i=Math.max(i,n.endIdx)}return new us(t.sourceString,r,i)};var M3=65535,D3=1114111,ha=class{constructor(e){this.source=e,this.pos=0,this.examinedLength=0}atEnd(){let e=this.pos>=this.source.length;return this.examinedLength=Math.max(this.examinedLength,this.pos+1),e}next(){let e=this.source[this.pos++];return this.examinedLength=Math.max(this.examinedLength,this.pos),e}nextCharCode(){let e=this.next();return e&&e.charCodeAt(0)}nextCodePoint(){let e=this.source.slice(this.pos++).codePointAt(0);return e>M3&&(this.pos+=1),this.examinedLength=Math.max(this.examinedLength,this.pos),e}matchString(e,r){let i;if(r){for(i=0;i<e.length;i++){let n=this.next(),s=e[i];if(n==null||n.toUpperCase()!==s.toUpperCase())return!1}return!0}for(i=0;i<e.length;i++)if(this.next()!==e[i])return!1;return!0}sourceSlice(e,r){return this.source.slice(e,r)}interval(e,r){return new us(this.source,e,r||this.pos)}},bl=class{constructor(e,r,i,n,s,a,o){this.matcher=e,this.input=r,this.startExpr=i,this._cst=n,this._cstOffset=s,this._rightmostFailurePosition=a,this._rightmostFailures=o,this.failed()&&(Eg(this,"message",function(){let u="Expected "+this.getExpectedText();return Ug(this.input,this.getRightmostFailurePosition())+u}),Eg(this,"shortMessage",function(){let u="expected "+this.getExpectedText(),l=Tl(this.input,this.getRightmostFailurePosition());return"Line "+l.lineNum+", col "+l.colNum+": "+u}))}succeeded(){return!!this._cst}failed(){return!this.succeeded()}getRightmostFailurePosition(){return this._rightmostFailurePosition}getRightmostFailures(){if(!this._rightmostFailures){this.matcher.setInput(this.input);let e=this.matcher._match(this.startExpr,{tracing:!1,positionToRecordFailures:this.getRightmostFailurePosition()});this._rightmostFailures=e.getRightmostFailures()}return this._rightmostFailures}toString(){return this.succeeded()?"[match succeeded]":"[match failed at position "+this.getRightmostFailurePosition()+"]"}getExpectedText(){if(this.succeeded())throw new Error("cannot get expected text of a successful MatchResult");let e=new ls,r=this.getRightmostFailures();r=r.filter(i=>!i.isFluffy());for(let i=0;i<r.length;i++)i>0&&(i===r.length-1?e.append(r.length>2?", or ":" or "):e.append(", ")),e.append(r[i].toString());return e.contents()}getInterval(){let e=this.getRightmostFailurePosition();return new us(this.input,e,e)}},Cg=class{constructor(){this.applicationMemoKeyStack=[],this.memo={},this.maxExaminedLength=0,this.maxRightmostFailureOffset=-1,this.currentLeftRecursion=void 0}isActive(e){return this.applicationMemoKeyStack.indexOf(e.toMemoKey())>=0}enter(e){this.applicationMemoKeyStack.push(e.toMemoKey())}exit(){this.applicationMemoKeyStack.pop()}startLeftRecursion(e,r){r.isLeftRecursion=!0,r.headApplication=e,r.nextLeftRecursion=this.currentLeftRecursion,this.currentLeftRecursion=r;let{applicationMemoKeyStack:i}=this,n=i.indexOf(e.toMemoKey())+1,s=i.slice(n);r.isInvolved=function(a){return s.indexOf(a)>=0},r.updateInvolvedApplicationMemoKeys=function(){for(let a=n;a<i.length;a++){let o=i[a];this.isInvolved(o)||s.push(o)}}}endLeftRecursion(){this.currentLeftRecursion=this.currentLeftRecursion.nextLeftRecursion}shouldUseMemoizedResult(e){if(!e.isLeftRecursion)return!0;let{applicationMemoKeyStack:r}=this;for(let i=0;i<r.length;i++){let n=r[i];if(e.isInvolved(n))return!1}return!0}memoize(e,r){return this.memo[e]=r,this.maxExaminedLength=Math.max(this.maxExaminedLength,r.examinedLength),this.maxRightmostFailureOffset=Math.max(this.maxRightmostFailureOffset,r.rightmostFailureOffset),r}clearObsoleteEntries(e,r){if(e+this.maxExaminedLength<=r)return;let{memo:i}=this;this.maxExaminedLength=0,this.maxRightmostFailureOffset=-1,Object.keys(i).forEach(n=>{let s=i[n];e+s.examinedLength>r?delete i[n]:(this.maxExaminedLength=Math.max(this.maxExaminedLength,s.examinedLength),this.maxRightmostFailureOffset=Math.max(this.maxRightmostFailureOffset,s.rightmostFailureOffset))})}},F3="\u2717",j3="\u2713",B3="\u22C5",V3="\u21D2",$3="\u2409",U3="\u240A",H3="\u240D",Rg={succeeded:1,isRootNode:2,isImplicitSpaces:4,isMemoized:8,isHeadOfLeftRecursion:16,terminatesLR:32};function G3(t){return Al(" ",t).join("")}function W3(t,e,r){let i=Ox(t.slice(e,e+r));return i.length<r?i+Al(" ",r-i.length).join(""):i}function Ox(t){return typeof t=="string"?t.replace(/ /g,B3).replace(/\t/g,$3).replace(/\n/g,U3).replace(/\r/g,H3):String(t)}var da=class t{constructor(e,r,i,n,s,a,o){this.input=e,this.pos=this.pos1=r,this.pos2=i,this.source=new us(e,r,i),this.expr=n,this.bindings=a,this.children=o||[],this.terminatingLREntry=null,this._flags=s?Rg.succeeded:0}get displayString(){return this.expr.toDisplayString()}clone(){return this.cloneWithExpr(this.expr)}cloneWithExpr(e){let r=new t(this.input,this.pos,this.pos2,e,this.succeeded,this.bindings,this.children);return r.isHeadOfLeftRecursion=this.isHeadOfLeftRecursion,r.isImplicitSpaces=this.isImplicitSpaces,r.isMemoized=this.isMemoized,r.isRootNode=this.isRootNode,r.terminatesLR=this.terminatesLR,r.terminatingLREntry=this.terminatingLREntry,r}recordLRTermination(e,r){this.terminatingLREntry=new t(this.input,this.pos,this.pos2,this.expr,!1,[r],[e]),this.terminatingLREntry.terminatesLR=!0}walk(e,r){let i=e;typeof i=="function"&&(i={enter:i});function n(s,a,o){let u=!0;i.enter&&i.enter.call(r,s,a,o)===t.prototype.SKIP&&(u=!1),u&&(s.children.forEach(l=>{n(l,s,o+1)}),i.exit&&i.exit.call(r,s,a,o))}this.isRootNode?this.children.forEach(s=>{n(s,null,0)}):n(this,null,0)}toString(){let e=new ls;return this.walk((r,i,n)=>{if(!r)return this.SKIP;if(r.expr.constructor.name!=="Alt"){if(e.append(W3(r.input,r.pos,10)+G3(n*2+1)),e.append((r.succeeded?j3:F3)+" "+r.displayString),r.isHeadOfLeftRecursion&&e.append(" (LR)"),r.succeeded){let a=Ox(r.source.contents);e.append(" "+V3+" "),e.append(typeof a=="string"?'"'+a+'"':a)}e.append(`
|
|
33
|
+
`)}}),e.contents()}};da.prototype.SKIP={};Object.keys(Rg).forEach(t=>{let e=Rg[t];Object.defineProperty(da.prototype,t,{get(){return(this._flags&e)!==0},set(r){r?this._flags|=e:this._flags&=~e}})});me.prototype.allowsSkippingPrecedingSpace=ar("allowsSkippingPrecedingSpace");Qt.allowsSkippingPrecedingSpace=Yt.allowsSkippingPrecedingSpace=Te.prototype.allowsSkippingPrecedingSpace=_t.prototype.allowsSkippingPrecedingSpace=At.prototype.allowsSkippingPrecedingSpace=yt.prototype.allowsSkippingPrecedingSpace=function(){return!0};st.prototype.allowsSkippingPrecedingSpace=qt.prototype.allowsSkippingPrecedingSpace=Kt.prototype.allowsSkippingPrecedingSpace=Ct.prototype.allowsSkippingPrecedingSpace=gt.prototype.allowsSkippingPrecedingSpace=Tt.prototype.allowsSkippingPrecedingSpace=lt.prototype.allowsSkippingPrecedingSpace=function(){return!1};var jo;wx(t=>{jo=t});var Sl;me.prototype.assertAllApplicationsAreValid=function(t,e){Sl=0,this._assertAllApplicationsAreValid(t,e)};me.prototype._assertAllApplicationsAreValid=ar("_assertAllApplicationsAreValid");Qt._assertAllApplicationsAreValid=Yt._assertAllApplicationsAreValid=_t.prototype._assertAllApplicationsAreValid=At.prototype._assertAllApplicationsAreValid=Tt.prototype._assertAllApplicationsAreValid=yt.prototype._assertAllApplicationsAreValid=function(t,e){};Kt.prototype._assertAllApplicationsAreValid=function(t,e){Sl++,this.expr._assertAllApplicationsAreValid(t,e),Sl--};st.prototype._assertAllApplicationsAreValid=function(t,e){for(let r=0;r<this.terms.length;r++)this.terms[r]._assertAllApplicationsAreValid(t,e)};lt.prototype._assertAllApplicationsAreValid=function(t,e){for(let r=0;r<this.factors.length;r++)this.factors[r]._assertAllApplicationsAreValid(t,e)};qt.prototype._assertAllApplicationsAreValid=gt.prototype._assertAllApplicationsAreValid=Ct.prototype._assertAllApplicationsAreValid=function(t,e){this.expr._assertAllApplicationsAreValid(t,e)};Te.prototype._assertAllApplicationsAreValid=function(t,e,r=!1){let i=e.rules[this.ruleName],n=os(t)&&Sl===0;if(!i)throw Ix(this.ruleName,e.name,this.source);if(!r&&os(this.ruleName)&&!n)throw E3(this.ruleName,this);let s=this.args.length,a=i.formals.length;if(s!==a)throw I3(this.ruleName,a,s,this.source);let o=jo&&i===jo.rules.applySyntactic;if(jo&&i===jo.rules.caseInsensitive&&!(this.args[0]instanceof _t))throw ux('a Terminal (e.g. "abc")',this.args[0]);if(o){let l=this.args[0];if(!(l instanceof Te))throw ux("a syntactic rule application",l);if(!os(l.ruleName))throw O3(l);if(n)throw N3(this)}this.args.forEach(l=>{if(l._assertAllApplicationsAreValid(t,e,o),l.getArity()!==1)throw A3(this.ruleName,l)})};me.prototype.assertChoicesHaveUniformArity=ar("assertChoicesHaveUniformArity");Qt.assertChoicesHaveUniformArity=Yt.assertChoicesHaveUniformArity=_t.prototype.assertChoicesHaveUniformArity=At.prototype.assertChoicesHaveUniformArity=Tt.prototype.assertChoicesHaveUniformArity=Kt.prototype.assertChoicesHaveUniformArity=yt.prototype.assertChoicesHaveUniformArity=function(t){};st.prototype.assertChoicesHaveUniformArity=function(t){if(this.terms.length===0)return;let e=this.terms[0].getArity();for(let r=0;r<this.terms.length;r++){let i=this.terms[r];i.assertChoicesHaveUniformArity();let n=i.getArity();if(e!==n)throw Ex(t,e,n,i)}};fa.prototype.assertChoicesHaveUniformArity=function(t){let e=this.terms[0].getArity(),r=this.terms[1].getArity();if(e!==r)throw Ex(t,r,e,this.terms[0])};lt.prototype.assertChoicesHaveUniformArity=function(t){for(let e=0;e<this.factors.length;e++)this.factors[e].assertChoicesHaveUniformArity(t)};qt.prototype.assertChoicesHaveUniformArity=function(t){this.expr.assertChoicesHaveUniformArity(t)};gt.prototype.assertChoicesHaveUniformArity=function(t){};Ct.prototype.assertChoicesHaveUniformArity=function(t){this.expr.assertChoicesHaveUniformArity(t)};Te.prototype.assertChoicesHaveUniformArity=function(t){};me.prototype.assertIteratedExprsAreNotNullable=ar("assertIteratedExprsAreNotNullable");Qt.assertIteratedExprsAreNotNullable=Yt.assertIteratedExprsAreNotNullable=_t.prototype.assertIteratedExprsAreNotNullable=At.prototype.assertIteratedExprsAreNotNullable=Tt.prototype.assertIteratedExprsAreNotNullable=yt.prototype.assertIteratedExprsAreNotNullable=function(t){};st.prototype.assertIteratedExprsAreNotNullable=function(t){for(let e=0;e<this.terms.length;e++)this.terms[e].assertIteratedExprsAreNotNullable(t)};lt.prototype.assertIteratedExprsAreNotNullable=function(t){for(let e=0;e<this.factors.length;e++)this.factors[e].assertIteratedExprsAreNotNullable(t)};qt.prototype.assertIteratedExprsAreNotNullable=function(t){if(this.expr.assertIteratedExprsAreNotNullable(t),this.expr.isNullable(t))throw Tx(this,[])};oi.prototype.assertIteratedExprsAreNotNullable=gt.prototype.assertIteratedExprsAreNotNullable=Ct.prototype.assertIteratedExprsAreNotNullable=Kt.prototype.assertIteratedExprsAreNotNullable=function(t){this.expr.assertIteratedExprsAreNotNullable(t)};Te.prototype.assertIteratedExprsAreNotNullable=function(t){this.args.forEach(e=>{e.assertIteratedExprsAreNotNullable(t)})};var Vo=class{constructor(e){this.matchLength=e}get ctorName(){throw new Error("subclass responsibility")}numChildren(){return this.children?this.children.length:0}childAt(e){if(this.children)return this.children[e]}indexOfChild(e){return this.children.indexOf(e)}hasChildren(){return this.numChildren()>0}hasNoChildren(){return!this.hasChildren()}onlyChild(){if(this.numChildren()!==1)throw new Error("cannot get only child of a node of type "+this.ctorName+" (it has "+this.numChildren()+" children)");return this.firstChild()}firstChild(){if(this.hasNoChildren())throw new Error("cannot get first child of a "+this.ctorName+" node, which has no children");return this.childAt(0)}lastChild(){if(this.hasNoChildren())throw new Error("cannot get last child of a "+this.ctorName+" node, which has no children");return this.childAt(this.numChildren()-1)}childBefore(e){let r=this.indexOfChild(e);if(r<0)throw new Error("Node.childBefore() called w/ an argument that is not a child");if(r===0)throw new Error("cannot get child before first child");return this.childAt(r-1)}childAfter(e){let r=this.indexOfChild(e);if(r<0)throw new Error("Node.childAfter() called w/ an argument that is not a child");if(r===this.numChildren()-1)throw new Error("cannot get child after last child");return this.childAt(r+1)}isTerminal(){return!1}isNonterminal(){return!1}isIteration(){return!1}isOptional(){return!1}},Gi=class extends Vo{get ctorName(){return"_terminal"}isTerminal(){return!0}get primitiveValue(){throw new Error("The `primitiveValue` property was removed in Ohm v17.")}},Mg=class extends Vo{constructor(e,r,i,n){super(n),this.ruleName=e,this.children=r,this.childOffsets=i}get ctorName(){return this.ruleName}isNonterminal(){return!0}isLexical(){return _x(this.ctorName)}isSyntactic(){return os(this.ctorName)}},wl=class extends Vo{constructor(e,r,i,n){super(i),this.children=e,this.childOffsets=r,this.optional=n}get ctorName(){return"_iter"}isIteration(){return!0}isOptional(){return this.optional}};me.prototype.eval=ar("eval");Qt.eval=function(t){let{inputStream:e}=t,r=e.pos,i=e.nextCodePoint();return i!==void 0?(t.pushBinding(new Gi(String.fromCodePoint(i).length),r),!0):(t.processFailure(r,this),!1)};Yt.eval=function(t){let{inputStream:e}=t,r=e.pos;return e.atEnd()?(t.pushBinding(new Gi(0),r),!0):(t.processFailure(r,this),!1)};_t.prototype.eval=function(t){let{inputStream:e}=t,r=e.pos;return e.matchString(this.obj)?(t.pushBinding(new Gi(this.obj.length),r),!0):(t.processFailure(r,this),!1)};At.prototype.eval=function(t){let{inputStream:e}=t,r=e.pos,i=this.matchCodePoint?e.nextCodePoint():e.nextCharCode();return i!==void 0&&this.from.codePointAt(0)<=i&&i<=this.to.codePointAt(0)?(t.pushBinding(new Gi(String.fromCodePoint(i).length),r),!0):(t.processFailure(r,this),!1)};Tt.prototype.eval=function(t){return t.eval(t.currentApplication().args[this.index])};Kt.prototype.eval=function(t){t.enterLexifiedContext();let e=t.eval(this.expr);return t.exitLexifiedContext(),e};st.prototype.eval=function(t){for(let e=0;e<this.terms.length;e++)if(t.eval(this.terms[e]))return!0;return!1};lt.prototype.eval=function(t){for(let e=0;e<this.factors.length;e++){let r=this.factors[e];if(!t.eval(r))return!1}return!0};qt.prototype.eval=function(t){let{inputStream:e}=t,r=e.pos,i=this.getArity(),n=[],s=[];for(;n.length<i;)n.push([]),s.push([]);let a=0,o=r,u;for(;a<this.maxNumMatches&&t.eval(this.expr);){if(e.pos===o)throw Tx(this,t._applicationStack);o=e.pos,a++;let p=t._bindings.splice(t._bindings.length-i,i),m=t._bindingOffsets.splice(t._bindingOffsets.length-i,i);for(u=0;u<p.length;u++)n[u].push(p[u]),s[u].push(m[u])}if(a<this.minNumMatches)return!1;let l=t.posToOffset(r),f=0;if(a>0){let p=n[i-1],m=s[i-1],v=m[m.length-1]+p[p.length-1].matchLength;l=s[0][0],f=v-l}let h=this instanceof oi;for(u=0;u<n.length;u++)t._bindings.push(new wl(n[u],s[u],f,h)),t._bindingOffsets.push(l);return!0};gt.prototype.eval=function(t){let{inputStream:e}=t,r=e.pos;t.pushFailuresInfo();let i=t.eval(this.expr);return t.popFailuresInfo(),i?(t.processFailure(r,this),!1):(e.pos=r,!0)};Ct.prototype.eval=function(t){let{inputStream:e}=t,r=e.pos;return t.eval(this.expr)?(e.pos=r,!0):!1};Te.prototype.eval=function(t){let e=t.currentApplication(),r=e?e.args:[],i=this.substituteParams(r),n=t.getCurrentPosInfo();if(n.isActive(i))return i.handleCycle(t);let s=i.toMemoKey(),a=n.memo[s];if(a&&n.shouldUseMemoizedResult(a)){if(t.hasNecessaryInfo(a))return t.useMemoizedResult(t.inputStream.pos,a);delete n.memo[s]}return i.reallyEval(t)};Te.prototype.handleCycle=function(t){let e=t.getCurrentPosInfo(),{currentLeftRecursion:r}=e,i=this.toMemoKey(),n=e.memo[i];return r&&r.headApplication.toMemoKey()===i?n.updateInvolvedApplicationMemoKeys():n||(n=e.memoize(i,{matchLength:0,examinedLength:0,value:!1,rightmostFailureOffset:-1}),e.startLeftRecursion(this,n)),t.useMemoizedResult(t.inputStream.pos,n)};Te.prototype.reallyEval=function(t){let{inputStream:e}=t,r=e.pos,i=t.getCurrentPosInfo(),n=t.grammar.rules[this.ruleName],{body:s}=n,{description:a}=n;t.enterApplication(i,this),a&&t.pushFailuresInfo();let o=e.examinedLength;e.examinedLength=0;let u=this.evalOnce(s,t),l=i.currentLeftRecursion,f=this.toMemoKey(),h=l&&l.headApplication.toMemoKey()===f,p;t.doNotMemoize?t.doNotMemoize=!1:h?(u=this.growSeedResult(s,t,r,l,u),i.endLeftRecursion(),p=l,p.examinedLength=e.examinedLength-r,p.rightmostFailureOffset=t._getRightmostFailureOffset(),i.memoize(f,p)):(!l||!l.isInvolved(f))&&(p=i.memoize(f,{matchLength:e.pos-r,examinedLength:e.examinedLength-r,value:u,failuresAtRightmostPosition:t.cloneRecordedFailures(),rightmostFailureOffset:t._getRightmostFailureOffset()}));let m=!!u;if(a&&(t.popFailuresInfo(),m||t.processFailure(r,this),p&&(p.failuresAtRightmostPosition=t.cloneRecordedFailures(),p.rightmostFailureOffset=t._getRightmostFailureOffset())),t.isTracing()&&p){let v=t.getTraceEntry(r,this,m,m?[u]:[]);h&&(sr(v.terminatingLREntry!=null||!m),v.isHeadOfLeftRecursion=!0),p.traceEntry=v}return e.examinedLength=Math.max(e.examinedLength,o),t.exitApplication(i,u),m};Te.prototype.evalOnce=function(t,e){let{inputStream:r}=e,i=r.pos;if(e.eval(t)){let n=t.getArity(),s=e._bindings.splice(e._bindings.length-n,n),a=e._bindingOffsets.splice(e._bindingOffsets.length-n,n),o=r.pos-i;return new Mg(this.ruleName,s,a,o)}else return!1};Te.prototype.growSeedResult=function(t,e,r,i,n){if(!n)return!1;let{inputStream:s}=e;for(;;){if(i.matchLength=s.pos-r,i.value=n,i.failuresAtRightmostPosition=e.cloneRecordedFailures(),e.isTracing()){let a=e.trace[e.trace.length-1];i.traceEntry=new da(e.input,r,s.pos,this,!0,[n],[a.clone()])}if(s.pos=r,n=this.evalOnce(t,e),s.pos-r<=i.matchLength)break;e.isTracing()&&e.trace.splice(-2,1)}return e.isTracing()&&i.traceEntry.recordLRTermination(e.trace.pop(),n),s.pos=r+i.matchLength,i.value};yt.prototype.eval=function(t){let{inputStream:e}=t,r=e.pos,i=e.nextCodePoint();if(i!==void 0&&i<=D3){let n=String.fromCodePoint(i);if(this.pattern.test(n))return t.pushBinding(new Gi(n.length),r),!0}return t.processFailure(r,this),!1};me.prototype.getArity=ar("getArity");Qt.getArity=Yt.getArity=_t.prototype.getArity=At.prototype.getArity=Tt.prototype.getArity=Te.prototype.getArity=yt.prototype.getArity=function(){return 1};st.prototype.getArity=function(){return this.terms.length===0?0:this.terms[0].getArity()};lt.prototype.getArity=function(){let t=0;for(let e=0;e<this.factors.length;e++)t+=this.factors[e].getArity();return t};qt.prototype.getArity=function(){return this.expr.getArity()};gt.prototype.getArity=function(){return 0};Ct.prototype.getArity=Kt.prototype.getArity=function(){return this.expr.getArity()};function ui(t,e){let r={};if(t.source&&e){let i=t.source.relativeTo(e);r.sourceInterval=[i.startIdx,i.endIdx]}return r}me.prototype.outputRecipe=ar("outputRecipe");Qt.outputRecipe=function(t,e){return["any",ui(this,e)]};Yt.outputRecipe=function(t,e){return["end",ui(this,e)]};_t.prototype.outputRecipe=function(t,e){return["terminal",ui(this,e),this.obj]};At.prototype.outputRecipe=function(t,e){return["range",ui(this,e),this.from,this.to]};Tt.prototype.outputRecipe=function(t,e){return["param",ui(this,e),this.index]};st.prototype.outputRecipe=function(t,e){return["alt",ui(this,e)].concat(this.terms.map(r=>r.outputRecipe(t,e)))};fa.prototype.outputRecipe=function(t,e){return this.terms[0].outputRecipe(t,e)};pa.prototype.outputRecipe=function(t,e){let r=this.terms.slice(0,this.expansionPos),i=this.terms.slice(this.expansionPos+1);return["splice",ui(this,e),r.map(n=>n.outputRecipe(t,e)),i.map(n=>n.outputRecipe(t,e))]};lt.prototype.outputRecipe=function(t,e){return["seq",ui(this,e)].concat(this.factors.map(r=>r.outputRecipe(t,e)))};Hi.prototype.outputRecipe=gn.prototype.outputRecipe=oi.prototype.outputRecipe=gt.prototype.outputRecipe=Ct.prototype.outputRecipe=Kt.prototype.outputRecipe=function(t,e){return[this.constructor.name.toLowerCase(),ui(this,e),this.expr.outputRecipe(t,e)]};Te.prototype.outputRecipe=function(t,e){return["app",ui(this,e),this.ruleName,this.args.map(r=>r.outputRecipe(t,e))]};yt.prototype.outputRecipe=function(t,e){return["unicodeChar",ui(this,e),this.categoryOrProp]};me.prototype.introduceParams=ar("introduceParams");Qt.introduceParams=Yt.introduceParams=_t.prototype.introduceParams=At.prototype.introduceParams=Tt.prototype.introduceParams=yt.prototype.introduceParams=function(t){return this};st.prototype.introduceParams=function(t){return this.terms.forEach((e,r,i)=>{i[r]=e.introduceParams(t)}),this};lt.prototype.introduceParams=function(t){return this.factors.forEach((e,r,i)=>{i[r]=e.introduceParams(t)}),this};qt.prototype.introduceParams=gt.prototype.introduceParams=Ct.prototype.introduceParams=Kt.prototype.introduceParams=function(t){return this.expr=this.expr.introduceParams(t),this};Te.prototype.introduceParams=function(t){let e=t.indexOf(this.ruleName);if(e>=0){if(this.args.length>0)throw new Error("Parameterized rules cannot be passed as arguments to another rule.");return new Tt(e).withSource(this.source)}else return this.args.forEach((r,i,n)=>{n[i]=r.introduceParams(t)}),this};me.prototype.isNullable=function(t){return this._isNullable(t,Object.create(null))};me.prototype._isNullable=ar("_isNullable");Qt._isNullable=At.prototype._isNullable=Tt.prototype._isNullable=gn.prototype._isNullable=yt.prototype._isNullable=function(t,e){return!1};Yt._isNullable=function(t,e){return!0};_t.prototype._isNullable=function(t,e){return typeof this.obj=="string"?this.obj==="":!1};st.prototype._isNullable=function(t,e){return this.terms.length===0||this.terms.some(r=>r._isNullable(t,e))};lt.prototype._isNullable=function(t,e){return this.factors.every(r=>r._isNullable(t,e))};Hi.prototype._isNullable=oi.prototype._isNullable=gt.prototype._isNullable=Ct.prototype._isNullable=function(t,e){return!0};Kt.prototype._isNullable=function(t,e){return this.expr._isNullable(t,e)};Te.prototype._isNullable=function(t,e){let r=this.toMemoKey();if(!Object.prototype.hasOwnProperty.call(e,r)){let{body:i}=t.rules[this.ruleName],n=i.substituteParams(this.args);e[r]=!1,e[r]=n._isNullable(t,e)}return e[r]};me.prototype.substituteParams=ar("substituteParams");Qt.substituteParams=Yt.substituteParams=_t.prototype.substituteParams=At.prototype.substituteParams=yt.prototype.substituteParams=function(t){return this};Tt.prototype.substituteParams=function(t){return Sx(t[this.index])};st.prototype.substituteParams=function(t){return new st(this.terms.map(e=>e.substituteParams(t)))};lt.prototype.substituteParams=function(t){return new lt(this.factors.map(e=>e.substituteParams(t)))};qt.prototype.substituteParams=gt.prototype.substituteParams=Ct.prototype.substituteParams=Kt.prototype.substituteParams=function(t){return new this.constructor(this.expr.substituteParams(t))};Te.prototype.substituteParams=function(t){if(this.args.length===0)return this;{let e=this.args.map(r=>r.substituteParams(t));return new Te(this.ruleName,e)}};function cx(t){return/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(t)}function Hg(t){let e=Object.create(null);t.forEach(r=>{e[r]=(e[r]||0)+1}),Object.keys(e).forEach(r=>{if(e[r]<=1)return;let i=1;t.forEach((n,s)=>{n===r&&(t[s]=n+"_"+i++)})})}me.prototype.toArgumentNameList=ar("toArgumentNameList");Qt.toArgumentNameList=function(t,e){return["any"]};Yt.toArgumentNameList=function(t,e){return["end"]};_t.prototype.toArgumentNameList=function(t,e){return typeof this.obj=="string"&&/^[_a-zA-Z0-9]+$/.test(this.obj)?["_"+this.obj]:["$"+t]};At.prototype.toArgumentNameList=function(t,e){let r=this.from+"_to_"+this.to;return cx(r)||(r="_"+r),cx(r)||(r="$"+t),[r]};st.prototype.toArgumentNameList=function(t,e){let r=this.terms.map(s=>s.toArgumentNameList(t,!0)),i=[],n=r[0].length;for(let s=0;s<n;s++){let a=[];for(let u=0;u<this.terms.length;u++)a.push(r[u][s]);let o=yx(a);i.push(o.join("_or_"))}return e||Hg(i),i};lt.prototype.toArgumentNameList=function(t,e){let r=[];return this.factors.forEach(i=>{let n=i.toArgumentNameList(t,!0);r=r.concat(n),t+=n.length}),e||Hg(r),r};qt.prototype.toArgumentNameList=function(t,e){let r=this.expr.toArgumentNameList(t,e).map(i=>i[i.length-1]==="s"?i+"es":i+"s");return e||Hg(r),r};oi.prototype.toArgumentNameList=function(t,e){return this.expr.toArgumentNameList(t,e).map(r=>"opt"+r[0].toUpperCase()+r.slice(1))};gt.prototype.toArgumentNameList=function(t,e){return[]};Ct.prototype.toArgumentNameList=Kt.prototype.toArgumentNameList=function(t,e){return this.expr.toArgumentNameList(t,e)};Te.prototype.toArgumentNameList=function(t,e){return[this.ruleName]};yt.prototype.toArgumentNameList=function(t,e){return["$"+t]};Tt.prototype.toArgumentNameList=function(t,e){return["param"+this.index]};me.prototype.toDisplayString=ar("toDisplayString");st.prototype.toDisplayString=lt.prototype.toDisplayString=function(){return this.source?this.source.trimmed().contents:"["+this.constructor.name+"]"};Qt.toDisplayString=Yt.toDisplayString=qt.prototype.toDisplayString=gt.prototype.toDisplayString=Ct.prototype.toDisplayString=Kt.prototype.toDisplayString=_t.prototype.toDisplayString=At.prototype.toDisplayString=Tt.prototype.toDisplayString=function(){return this.toString()};Te.prototype.toDisplayString=function(){if(this.args.length>0){let t=this.args.map(e=>e.toDisplayString());return this.ruleName+"<"+t.join(",")+">"}else return this.ruleName};yt.prototype.toDisplayString=function(){return"Unicode ["+this.categoryOrProp+"] character"};function z3(t){return t==="description"||t==="string"||t==="code"}var yr=class t{constructor(e,r,i){if(!z3(i))throw new Error("invalid Failure type: "+i);this.pexpr=e,this.text=r,this.type=i,this.fluffy=!1}getPExpr(){return this.pexpr}getText(){return this.text}getType(){return this.type}isDescription(){return this.type==="description"}isStringTerminal(){return this.type==="string"}isCode(){return this.type==="code"}isFluffy(){return this.fluffy}makeFluffy(){this.fluffy=!0}clearFluffy(){this.fluffy=!1}subsumes(e){return this.getText()===e.getText()&&this.type===e.type&&(!this.isFluffy()||this.isFluffy()&&e.isFluffy())}toString(){return this.type==="string"?JSON.stringify(this.getText()):this.getText()}clone(){let e=new t(this.pexpr,this.text,this.type);return this.isFluffy()&&e.makeFluffy(),e}toKey(){return this.toString()+"#"+this.type}};me.prototype.toFailure=ar("toFailure");Qt.toFailure=function(t){return new yr(this,"any object","description")};Yt.toFailure=function(t){return new yr(this,"end of input","description")};_t.prototype.toFailure=function(t){return new yr(this,this.obj,"string")};At.prototype.toFailure=function(t){return new yr(this,JSON.stringify(this.from)+".."+JSON.stringify(this.to),"code")};gt.prototype.toFailure=function(t){let e=this.expr===Qt?"nothing":"not "+this.expr.toFailure(t);return new yr(this,e,"description")};Ct.prototype.toFailure=function(t){return this.expr.toFailure(t)};Te.prototype.toFailure=function(t){let{description:e}=t.rules[this.ruleName];return e||(e=(/^[aeiouAEIOU]/.test(this.ruleName)?"an":"a")+" "+this.ruleName),new yr(this,e,"description")};yt.prototype.toFailure=function(t){return new yr(this,"a Unicode ["+this.categoryOrProp+"] character","description")};st.prototype.toFailure=function(t){let r="("+this.terms.map(i=>i.toFailure(t)).join(" or ")+")";return new yr(this,r,"description")};lt.prototype.toFailure=function(t){let r="("+this.factors.map(i=>i.toFailure(t)).join(" ")+")";return new yr(this,r,"description")};qt.prototype.toFailure=function(t){let e="("+this.expr.toFailure(t)+this.operator+")";return new yr(this,e,"description")};me.prototype.toString=ar("toString");Qt.toString=function(){return"any"};Yt.toString=function(){return"end"};_t.prototype.toString=function(){return JSON.stringify(this.obj)};At.prototype.toString=function(){return JSON.stringify(this.from)+".."+JSON.stringify(this.to)};Tt.prototype.toString=function(){return"$"+this.index};Kt.prototype.toString=function(){return"#("+this.expr.toString()+")"};st.prototype.toString=function(){return this.terms.length===1?this.terms[0].toString():"("+this.terms.map(t=>t.toString()).join(" | ")+")"};lt.prototype.toString=function(){return this.factors.length===1?this.factors[0].toString():"("+this.factors.map(t=>t.toString()).join(" ")+")"};qt.prototype.toString=function(){return this.expr+this.operator};gt.prototype.toString=function(){return"~"+this.expr};Ct.prototype.toString=function(){return"&"+this.expr};Te.prototype.toString=function(){if(this.args.length>0){let t=this.args.map(e=>e.toString());return this.ruleName+"<"+t.join(",")+">"}else return this.ruleName};yt.prototype.toString=function(){return"\\p{"+this.categoryOrProp+"}"};var Dg=class t extends me{constructor(e){super(),this.obj=e}_getString(e){let r=e.currentApplication().args[this.obj.index];return sr(r instanceof _t,"expected a Terminal expression"),r.obj}allowsSkippingPrecedingSpace(){return!0}eval(e){let{inputStream:r}=e,i=r.pos,n=this._getString(e);return r.matchString(n,!0)?(e.pushBinding(new Gi(n.length),i),!0):(e.processFailure(i,this),!1)}getArity(){return 1}substituteParams(e){return new t(this.obj.substituteParams(e))}toDisplayString(){return this.obj.toDisplayString()+" (case-insensitive)"}toFailure(e){return new yr(this,this.obj.toFailure(e)+" (case-insensitive)","description")}_isNullable(e,r){return this.obj._isNullable(e,r)}},Nx;wx(t=>{Nx=t.rules.applySyntactic.body});var Ag=new Te("spaces"),Fg=class{constructor(e,r,i){this.matcher=e,this.startExpr=r,this.grammar=e.grammar,this.input=e.getInput(),this.inputStream=new ha(this.input),this.memoTable=e._memoTable,this.userData=void 0,this.doNotMemoize=!1,this._bindings=[],this._bindingOffsets=[],this._applicationStack=[],this._posStack=[0],this.inLexifiedContextStack=[!1],this.rightmostFailurePosition=-1,this._rightmostFailurePositionStack=[],this._recordedFailuresStack=[],i!==void 0&&(this.positionToRecordFailures=i,this.recordedFailures=Object.create(null))}posToOffset(e){return e-this._posStack[this._posStack.length-1]}enterApplication(e,r){this._posStack.push(this.inputStream.pos),this._applicationStack.push(r),this.inLexifiedContextStack.push(!1),e.enter(r),this._rightmostFailurePositionStack.push(this.rightmostFailurePosition),this.rightmostFailurePosition=-1}exitApplication(e,r){let i=this._posStack.pop();this._applicationStack.pop(),this.inLexifiedContextStack.pop(),e.exit(),this.rightmostFailurePosition=Math.max(this.rightmostFailurePosition,this._rightmostFailurePositionStack.pop()),r&&this.pushBinding(r,i)}enterLexifiedContext(){this.inLexifiedContextStack.push(!0)}exitLexifiedContext(){this.inLexifiedContextStack.pop()}currentApplication(){return this._applicationStack[this._applicationStack.length-1]}inSyntacticContext(){let e=this.currentApplication();return e?e.isSyntactic()&&!this.inLexifiedContext():this.startExpr.factors[0].isSyntactic()}inLexifiedContext(){return this.inLexifiedContextStack[this.inLexifiedContextStack.length-1]}skipSpaces(){return this.pushFailuresInfo(),this.eval(Ag),this.popBinding(),this.popFailuresInfo(),this.inputStream.pos}skipSpacesIfInSyntacticContext(){return this.inSyntacticContext()?this.skipSpaces():this.inputStream.pos}maybeSkipSpacesBefore(e){return e.allowsSkippingPrecedingSpace()&&e!==Ag?this.skipSpacesIfInSyntacticContext():this.inputStream.pos}pushBinding(e,r){this._bindings.push(e),this._bindingOffsets.push(this.posToOffset(r))}popBinding(){this._bindings.pop(),this._bindingOffsets.pop()}numBindings(){return this._bindings.length}truncateBindings(e){for(;this._bindings.length>e;)this.popBinding()}getCurrentPosInfo(){return this.getPosInfo(this.inputStream.pos)}getPosInfo(e){let r=this.memoTable[e];return r||(r=this.memoTable[e]=new Cg),r}processFailure(e,r){if(this.rightmostFailurePosition=Math.max(this.rightmostFailurePosition,e),this.recordedFailures&&e===this.positionToRecordFailures){let i=this.currentApplication();i&&(r=r.substituteParams(i.args)),this.recordFailure(r.toFailure(this.grammar),!1)}}recordFailure(e,r){let i=e.toKey();this.recordedFailures[i]?this.recordedFailures[i].isFluffy()&&!e.isFluffy()&&this.recordedFailures[i].clearFluffy():this.recordedFailures[i]=r?e.clone():e}recordFailures(e,r){Object.keys(e).forEach(i=>{this.recordFailure(e[i],r)})}cloneRecordedFailures(){if(!this.recordedFailures)return;let e=Object.create(null);return Object.keys(this.recordedFailures).forEach(r=>{e[r]=this.recordedFailures[r].clone()}),e}getRightmostFailurePosition(){return this.rightmostFailurePosition}_getRightmostFailureOffset(){return this.rightmostFailurePosition>=0?this.posToOffset(this.rightmostFailurePosition):-1}getMemoizedTraceEntry(e,r){let i=this.memoTable[e];if(i&&r instanceof Te){let n=i.memo[r.toMemoKey()];if(n&&n.traceEntry){let s=n.traceEntry.cloneWithExpr(r);return s.isMemoized=!0,s}}return null}getTraceEntry(e,r,i,n){if(r instanceof Te){let s=this.currentApplication(),a=s?s.args:[];r=r.substituteParams(a)}return this.getMemoizedTraceEntry(e,r)||new da(this.input,e,this.inputStream.pos,r,i,n,this.trace)}isTracing(){return!!this.trace}hasNecessaryInfo(e){return this.trace&&!e.traceEntry?!1:this.recordedFailures&&this.inputStream.pos+e.rightmostFailureOffset===this.positionToRecordFailures?!!e.failuresAtRightmostPosition:!0}useMemoizedResult(e,r){this.trace&&this.trace.push(r.traceEntry);let i=this.inputStream.pos+r.rightmostFailureOffset;return this.rightmostFailurePosition=Math.max(this.rightmostFailurePosition,i),this.recordedFailures&&this.positionToRecordFailures===i&&r.failuresAtRightmostPosition&&this.recordFailures(r.failuresAtRightmostPosition,!0),this.inputStream.examinedLength=Math.max(this.inputStream.examinedLength,r.examinedLength+e),r.value?(this.inputStream.pos+=r.matchLength,this.pushBinding(r.value,e),!0):!1}eval(e){let{inputStream:r}=this,i=this._bindings.length,n=this.userData,s;this.recordedFailures&&(s=this.recordedFailures,this.recordedFailures=Object.create(null));let a=r.pos,o=this.maybeSkipSpacesBefore(e),u;this.trace&&(u=this.trace,this.trace=[]);let l=e.eval(this);if(this.trace){let f=this._bindings.slice(i),h=this.getTraceEntry(o,e,l,f);h.isImplicitSpaces=e===Ag,h.isRootNode=e===this.startExpr,u.push(h),this.trace=u}return l?this.recordedFailures&&r.pos===this.positionToRecordFailures&&Object.keys(this.recordedFailures).forEach(f=>{this.recordedFailures[f].makeFluffy()}):(r.pos=a,this.truncateBindings(i),this.userData=n),this.recordedFailures&&this.recordFailures(s,!1),e===Nx&&this.skipSpaces(),l}getMatchResult(){this.grammar._setUpMatchState(this),this.eval(this.startExpr);let e;this.recordedFailures&&(e=Object.keys(this.recordedFailures).map(i=>this.recordedFailures[i]));let r=this._bindings[0];return r&&(r.grammar=this.grammar),new bl(this.matcher,this.input,this.startExpr,r,this._bindingOffsets[0],this.rightmostFailurePosition,e)}getTrace(){this.trace=[];let e=this.getMatchResult(),r=this.trace[this.trace.length-1];return r.result=e,r}pushFailuresInfo(){this._rightmostFailurePositionStack.push(this.rightmostFailurePosition),this._recordedFailuresStack.push(this.recordedFailures)}popFailuresInfo(){this.rightmostFailurePosition=this._rightmostFailurePositionStack.pop(),this.recordedFailures=this._recordedFailuresStack.pop()}},jg=class{constructor(e){this.grammar=e,this._memoTable=[],this._input="",this._isMemoTableStale=!1}_resetMemoTable(){this._memoTable=[],this._isMemoTableStale=!1}getInput(){return this._input}setInput(e){return this._input!==e&&this.replaceInputRange(0,this._input.length,e),this}replaceInputRange(e,r,i){let n=this._input,s=this._memoTable;if(e<0||e>n.length||r<0||r>n.length||e>r)throw new Error("Invalid indices: "+e+" and "+r);this._input=n.slice(0,e)+i+n.slice(r),this._input!==n&&s.length>0&&(this._isMemoTableStale=!0);let a=s.slice(r);s.length=e;for(let o=0;o<i.length;o++)s.push(void 0);for(let o of a)s.push(o);for(let o=0;o<e;o++){let u=s[o];u&&u.clearObsoleteEntries(o,e)}return this}match(e,r={incremental:!0}){return this._match(this._getStartExpr(e),{incremental:r.incremental,tracing:!1})}trace(e,r={incremental:!0}){return this._match(this._getStartExpr(e),{incremental:r.incremental,tracing:!0})}_match(e,r={}){let i={tracing:!1,incremental:!0,positionToRecordFailures:void 0,...r};if(!i.incremental)this._resetMemoTable();else if(this._isMemoTableStale&&!this.grammar.supportsIncrementalParsing)throw w3(this.grammar);let n=new Fg(this,e,i.positionToRecordFailures);return i.tracing?n.getTrace():n.getMatchResult()}_getStartExpr(e){let r=e||this.grammar.defaultStartRule;if(!r)throw new Error("Missing start rule argument -- the grammar has no default start rule.");let i=this.grammar.parseApplication(r);return new lt([i,Yt])}},Bo=[],Bg=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),xl=class{constructor(e,r,i){this._node=e,this.source=r,this._baseInterval=i,e.isNonterminal()&&sr(r===i),this._childWrappers=[]}_forgetMemoizedResultFor(e){delete this._node[this._semantics.attributeKeys[e]],this.children.forEach(r=>{r._forgetMemoizedResultFor(e)})}child(e){if(!(0<=e&&e<this._node.numChildren()))return;let r=this._childWrappers[e];if(!r){let i=this._node.childAt(e),n=this._node.childOffsets[e],s=this._baseInterval.subInterval(n,i.matchLength),a=i.isNonterminal()?s:this._baseInterval;r=this._childWrappers[e]=this._semantics.wrap(i,s,a)}return r}_children(){for(let e=0;e<this._node.numChildren();e++)this.child(e);return this._childWrappers}isIteration(){return this._node.isIteration()}isTerminal(){return this._node.isTerminal()}isNonterminal(){return this._node.isNonterminal()}isSyntactic(){return this.isNonterminal()&&this._node.isSyntactic()}isLexical(){return this.isNonterminal()&&this._node.isLexical()}isOptional(){return this._node.isOptional()}iteration(e){let r=e||[],i=r.map(a=>a._node),n=new wl(i,[],-1,!1),s=this._semantics.wrap(n,null,null);return s._childWrappers=r,s}get children(){return this._children()}get ctorName(){return this._node.ctorName}get numChildren(){return this._node.numChildren()}get sourceString(){return this.source.contents}},mr=class t{constructor(e,r){let i=this;if(this.grammar=e,this.checkedActionDicts=!1,this.Wrapper=class extends(r?r.Wrapper:xl){constructor(n,s,a){super(n,s,a),i.checkActionDictsIfHaventAlready(),this._semantics=i}toString(){return"[semantics wrapper for "+i.grammar.name+"]"}},this.super=r,r){if(!(e.equals(this.super.grammar)||e._inheritsFrom(this.super.grammar)))throw new Error("Cannot extend a semantics for grammar '"+this.super.grammar.name+"' for use with grammar '"+e.name+"' (not a sub-grammar)");this.operations=Object.create(this.super.operations),this.attributes=Object.create(this.super.attributes),this.attributeKeys=Object.create(null);for(let n in this.attributes)Object.defineProperty(this.attributeKeys,n,{value:Yw(n)})}else this.operations=Object.create(null),this.attributes=Object.create(null),this.attributeKeys=Object.create(null)}toString(){return"[semantics for "+this.grammar.name+"]"}checkActionDictsIfHaventAlready(){this.checkedActionDicts||(this.checkActionDicts(),this.checkedActionDicts=!0)}checkActionDicts(){let e;for(e in this.operations)this.operations[e].checkActionDict(this.grammar);for(e in this.attributes)this.attributes[e].checkActionDict(this.grammar)}toRecipe(e){function r(n){return n.super!==t.BuiltInSemantics._getSemantics()}let i=`(function(g) {
|
|
34
|
+
`;if(r(this)){i+=" var semantics = "+this.super.toRecipe(!0)+"(g";let n=this.super.grammar,s=this.grammar;for(;s!==n;)i+=".superGrammar",s=s.superGrammar;i+=`);
|
|
35
|
+
`,i+=" return g.extendSemantics(semantics)"}else i+=" return g.createSemantics()";return["Operation","Attribute"].forEach(n=>{let s=this[n.toLowerCase()+"s"];Object.keys(s).forEach(a=>{let{actionDict:o,formals:u,builtInDefault:l}=s[a],f=a;u.length>0&&(f+="("+u.join(", ")+")");let h;r(this)&&this.super[n.toLowerCase()+"s"][a]?h="extend"+n:h="add"+n,i+=`
|
|
36
|
+
.`+h+"("+JSON.stringify(f)+", {";let p=[];Object.keys(o).forEach(m=>{if(o[m]!==l){let v=o[m].toString().trim();v=v.replace(/^.*\(/,"function("),p.push(`
|
|
37
|
+
`+JSON.stringify(m)+": "+v)}}),i+=p.join(",")+`
|
|
38
|
+
})`})}),i+=`;
|
|
39
|
+
})`,e||(i=`(function() {
|
|
40
|
+
var grammar = this.fromRecipe(`+this.grammar.toRecipe()+`);
|
|
41
|
+
var semantics = `+i+`(grammar);
|
|
42
|
+
return semantics;
|
|
43
|
+
});
|
|
44
|
+
`),i}addOperationOrAttribute(e,r,i){let n=e+"s",s=lx(r,e),{name:a}=s,{formals:o}=s;this.assertNewName(a,e);let u=J3(e,a,h),l={_default:u};Object.keys(i).forEach(p=>{l[p]=i[p]});let f=e==="operation"?new cs(a,o,l,u):new $o(a,l,u);f.checkActionDict(this.grammar),this[n][a]=f;function h(...p){let m=this._semantics[n][a];if(arguments.length!==m.formals.length)throw new Error("Invalid number of arguments passed to "+a+" "+e+" (expected "+m.formals.length+", got "+arguments.length+")");let v=Object.create(null);for(let[g,k]of Object.entries(p)){let w=m.formals[g];v[w]=k}let S=this.args;this.args=v;let b=m.execute(this._semantics,this);return this.args=S,b}e==="operation"?(this.Wrapper.prototype[a]=h,this.Wrapper.prototype[a].toString=function(){return"["+a+" operation]"}):(Object.defineProperty(this.Wrapper.prototype,a,{get:h,configurable:!0}),Object.defineProperty(this.attributeKeys,a,{value:Yw(a)}))}extendOperationOrAttribute(e,r,i){let n=e+"s";if(lx(r,"attribute"),!(this.super&&r in this.super[n]))throw new Error("Cannot extend "+e+" '"+r+"': did not inherit an "+e+" with that name");if(Bg(this[n],r))throw new Error("Cannot extend "+e+" '"+r+"' again");let s=this[n][r].formals,a=this[n][r].actionDict,o=Object.create(a);Object.keys(i).forEach(u=>{o[u]=i[u]}),this[n][r]=e==="operation"?new cs(r,s,o):new $o(r,o),this[n][r].checkActionDict(this.grammar)}assertNewName(e,r){if(Bg(xl.prototype,e))throw new Error("Cannot add "+r+" '"+e+"': that's a reserved name");if(e in this.operations)throw new Error("Cannot add "+r+" '"+e+"': an operation with that name already exists");if(e in this.attributes)throw new Error("Cannot add "+r+" '"+e+"': an attribute with that name already exists")}wrap(e,r,i){let n=i||r;return e instanceof this.Wrapper?e:new this.Wrapper(e,r,n)}};function lx(t,e){if(!mr.prototypeGrammar)return sr(t.indexOf("(")===-1),{name:t,formals:[]};let r=mr.prototypeGrammar.match(t,e==="operation"?"OperationSignature":"AttributeSignature");if(r.failed())throw new Error(r.message);return mr.prototypeGrammarSemantics(r).parse()}function J3(t,e,r){return function(...i){let s=(this._semantics.operations[e]||this._semantics.attributes[e]).formals.map(a=>this.args[a]);if(!this.isIteration()&&i.length===1)return r.apply(i[0],s);throw C3(this.ctorName,e,t,Bo)}}mr.createSemantics=function(t,e){let r=new mr(t,e!==void 0?e:mr.BuiltInSemantics._getSemantics()),i=function(s){if(!(s instanceof bl))throw new TypeError("Semantics expected a MatchResult, but got "+$g(s));if(s.failed())throw new TypeError("cannot apply Semantics to "+s.toString());let a=s._cst;if(a.grammar!==t)throw new Error("Cannot use a MatchResult from grammar '"+a.grammar.name+"' with a semantics for '"+t.name+"'");let o=new ha(s.input);return r.wrap(a,o.interval(s._cstOffset,s.input.length))};return i.addOperation=function(n,s){return r.addOperationOrAttribute("operation",n,s),i},i.extendOperation=function(n,s){return r.extendOperationOrAttribute("operation",n,s),i},i.addAttribute=function(n,s){return r.addOperationOrAttribute("attribute",n,s),i},i.extendAttribute=function(n,s){return r.extendOperationOrAttribute("attribute",n,s),i},i._getActionDict=function(n){let s=r.operations[n]||r.attributes[n];if(!s)throw new Error('"'+n+'" is not a valid operation or attribute name in this semantics for "'+t.name+'"');return s.actionDict},i._remove=function(n){let s;return n in r.operations?(s=r.operations[n],delete r.operations[n]):n in r.attributes&&(s=r.attributes[n],delete r.attributes[n]),delete r.Wrapper.prototype[n],s},i.getOperationNames=function(){return Object.keys(r.operations)},i.getAttributeNames=function(){return Object.keys(r.attributes)},i.getGrammar=function(){return r.grammar},i.toRecipe=function(n){return r.toRecipe(n)},i.toString=r.toString.bind(r),i._getSemantics=function(){return r},i};var cs=class{constructor(e,r,i,n){this.name=e,this.formals=r,this.actionDict=i,this.builtInDefault=n}checkActionDict(e){e._checkTopDownActionDict(this.typeName,this.name,this.actionDict)}execute(e,r){try{let{ctorName:i}=r._node,n=this.actionDict[i];return n?(Bo.push([this,i]),n.apply(r,r._children())):r.isNonterminal()&&(n=this.actionDict._nonterminal,n)?(Bo.push([this,"_nonterminal",i]),n.apply(r,r._children())):(Bo.push([this,"default action",i]),this.actionDict._default.apply(r,r._children()))}finally{Bo.pop()}}};cs.prototype.typeName="operation";var $o=class extends cs{constructor(e,r,i){super(e,[],r,i)}execute(e,r){let i=r._node,n=e.attributeKeys[this.name];return Bg(i,n)||(i[n]=cs.prototype.execute.call(this,e,r)),i[n]}};$o.prototype.typeName="attribute";var fx=["_iter","_terminal","_nonterminal","_default"];function px(t){return Object.keys(t.rules).sort().map(e=>t.rules[e])}var K3=t=>t.replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029"),Lx,Px,gr=class t{constructor(e,r,i,n){if(this.name=e,this.superGrammar=r,this.rules=i,n){if(!(n in i))throw new Error("Invalid start rule: '"+n+"' is not a rule in grammar '"+e+"'");this.defaultStartRule=n}this._matchStateInitializer=void 0,this.supportsIncrementalParsing=!0}matcher(){return new jg(this)}isBuiltIn(){return this===t.ProtoBuiltInRules||this===t.BuiltInRules}equals(e){if(this===e)return!0;if(e==null||this.name!==e.name||this.defaultStartRule!==e.defaultStartRule||!(this.superGrammar===e.superGrammar||this.superGrammar.equals(e.superGrammar)))return!1;let r=px(this),i=px(e);return r.length===i.length&&r.every((n,s)=>n.description===i[s].description&&n.formals.join(",")===i[s].formals.join(",")&&n.body.toString()===i[s].body.toString())}match(e,r){let i=this.matcher();return i.replaceInputRange(0,0,e),i.match(r)}trace(e,r){let i=this.matcher();return i.replaceInputRange(0,0,e),i.trace(r)}createSemantics(){return mr.createSemantics(this)}extendSemantics(e){return mr.createSemantics(this,e._getSemantics())}_checkTopDownActionDict(e,r,i){let n=[];for(let s in i){let a=i[s];if(!fx.includes(s)&&!(s in this.rules)){n.push(`'${s}' is not a valid semantic action for '${this.name}'`);continue}if(typeof a!="function"){n.push(`'${s}' must be a function in an action dictionary for '${this.name}'`);continue}let u=a.length,l=this._topDownActionArity(s);if(u!==l){let f;s==="_iter"||s==="_nonterminal"?f=`it should use a rest parameter, e.g. \`${s}(...children) {}\`. NOTE: this is new in Ohm v16 \u2014 see https://ohmjs.org/d/ati for details.`:f=`expected ${l}, got ${u}`,n.push(`Semantic action '${s}' has the wrong arity: ${f}`)}}if(n.length>0){let s=n.map(o=>"- "+o),a=new Error([`Found errors in the action dictionary of the '${r}' ${e}:`,...s].join(`
|
|
45
|
+
`));throw a.problems=n,a}}_topDownActionArity(e){return fx.includes(e)?0:this.rules[e].body.getArity()}_inheritsFrom(e){let r=this.superGrammar;for(;r;){if(r.equals(e,!0))return!0;r=r.superGrammar}return!1}toRecipe(e=void 0){let r={};this.source&&(r.source=this.source.contents);let i=null;this.defaultStartRule&&(i=this.defaultStartRule);let n={};Object.keys(this.rules).forEach(o=>{let u=this.rules[o],{body:l}=u,f=!this.superGrammar||!this.superGrammar.rules[o],h;f?h="define":h=l instanceof fa?"extend":"override";let p={};if(u.source&&this.source){let S=u.source.relativeTo(this.source);p.sourceInterval=[S.startIdx,S.endIdx]}let m=f?u.description:null,v=l.outputRecipe(u.formals,this.source);n[o]=[h,p,m,u.formals,v]});let s="null";e?s=e:this.superGrammar&&!this.superGrammar.isBuiltIn()&&(s=this.superGrammar.toRecipe());let a=[...["grammar",r,this.name].map(JSON.stringify),s,...[i,n].map(JSON.stringify)];return K3(`[${a.join(",")}]`)}toOperationActionDictionaryTemplate(){return this._toOperationOrAttributeActionDictionaryTemplate()}toAttributeActionDictionaryTemplate(){return this._toOperationOrAttributeActionDictionaryTemplate()}_toOperationOrAttributeActionDictionaryTemplate(){let e=new ls;e.append("{");let r=!0;for(let i in this.rules){let{body:n}=this.rules[i];r?r=!1:e.append(","),e.append(`
|
|
46
|
+
`),e.append(" "),this.addSemanticActionTemplate(i,n,e)}return e.append(`
|
|
47
|
+
}`),e.contents()}addSemanticActionTemplate(e,r,i){i.append(e),i.append(": function(");let n=this._topDownActionArity(e);i.append(Al("_",n).join(", ")),i.append(`) {
|
|
48
|
+
`),i.append(" }")}parseApplication(e){let r;if(e.indexOf("<")===-1)r=new Te(e);else{let n=Lx.match(e,"Base_application");r=Px(n,{})}if(!(r.ruleName in this.rules))throw Ix(r.ruleName,this.name);let{formals:i}=this.rules[r.ruleName];if(i.length!==r.args.length){let{source:n}=this.rules[r.ruleName];throw Ax(r.ruleName,i.length,r.args.length,n)}return r}_setUpMatchState(e){this._matchStateInitializer&&this._matchStateInitializer(e)}};gr.ProtoBuiltInRules=new gr("ProtoBuiltInRules",void 0,{any:{body:Qt,formals:[],description:"any character",primitive:!0},end:{body:Yt,formals:[],description:"end of input",primitive:!0},caseInsensitive:{body:new Dg(new Tt(0)),formals:["str"],primitive:!0},lower:{body:new yt("Ll"),formals:[],description:"a lowercase letter",primitive:!0},upper:{body:new yt("Lu"),formals:[],description:"an uppercase letter",primitive:!0},unicodeLtmo:{body:new yt("Ltmo"),formals:[],description:"a Unicode character in Lt, Lm, or Lo",primitive:!0},spaces:{body:new Hi(new Te("space")),formals:[]},space:{body:new At("\0"," "),formals:[],description:"a space"}});gr.initApplicationParser=function(t,e){Lx=t,Px=e};var kl=class{constructor(e){this.name=e}sourceInterval(e,r){return this.source.subInterval(e,r-e)}ensureSuperGrammar(){return this.superGrammar||this.withSuperGrammar(this.name==="BuiltInRules"?gr.ProtoBuiltInRules:gr.BuiltInRules),this.superGrammar}ensureSuperGrammarRuleForOverriding(e,r){let i=this.ensureSuperGrammar().rules[e];if(!i)throw x3(e,this.superGrammar.name,r);return i}installOverriddenOrExtendedRule(e,r,i,n){let s=Og(r);if(s.length>0)throw ox(e,s,n);let a=this.ensureSuperGrammar().rules[e],o=a.formals,u=o?o.length:0;if(r.length!==u)throw Ax(e,u,r.length,n);return this.install(e,r,i,a.description,n)}install(e,r,i,n,s,a=!1){return this.rules[e]={body:i.introduceParams(r),formals:r,description:n,source:s,primitive:a},this}withSuperGrammar(e){if(this.superGrammar)throw new Error("the super grammar of a GrammarDecl cannot be set more than once");return this.superGrammar=e,this.rules=Object.create(e.rules),e.isBuiltIn()||(this.defaultStartRule=e.defaultStartRule),this}withDefaultStartRule(e){return this.defaultStartRule=e,this}withSource(e){return this.source=new ha(e).interval(0,e.length),this}build(){let e=new gr(this.name,this.ensureSuperGrammar(),this.rules,this.defaultStartRule);e._matchStateInitializer=e.superGrammar._matchStateInitializer,e.supportsIncrementalParsing=e.superGrammar.supportsIncrementalParsing;let r=[],i=!1;return Object.keys(e.rules).forEach(n=>{let{body:s}=e.rules[n];try{s.assertChoicesHaveUniformArity(n)}catch(a){r.push(a)}try{s.assertAllApplicationsAreValid(n,e)}catch(a){r.push(a),i=!0}}),i||Object.keys(e.rules).forEach(n=>{let{body:s}=e.rules[n];try{s.assertIteratedExprsAreNotNullable(e,[])}catch(a){r.push(a)}}),r.length>0&&R3(r),this.source&&(e.source=this.source),e}define(e,r,i,n,s,a){if(this.ensureSuperGrammar(),this.superGrammar.rules[e])throw ax(e,this.name,this.superGrammar.name,s);if(this.rules[e])throw ax(e,this.name,this.name,s);let o=Og(r);if(o.length>0)throw ox(e,o,s);return this.install(e,r,i,n,s,a)}override(e,r,i,n,s){return this.ensureSuperGrammarRuleForOverriding(e,s),this.installOverriddenOrExtendedRule(e,r,i,s),this}extend(e,r,i,n,s){if(!this.ensureSuperGrammar().rules[e])throw k3(e,this.superGrammar.name,s);let o=new fa(this.superGrammar,e,i);return o.source=i.source,this.installOverriddenOrExtendedRule(e,r,o,s),this}},ma=class{constructor(e){this.currentDecl=null,this.currentRuleName=null,this.options=e||{}}newGrammar(e){return new kl(e)}grammar(e,r,i,n,s){let a=new kl(r);return i&&a.withSuperGrammar(i instanceof gr?i:this.fromRecipe(i)),n&&a.withDefaultStartRule(n),e&&e.source&&a.withSource(e.source),this.currentDecl=a,Object.keys(s).forEach(o=>{this.currentRuleName=o;let u=s[o],l=u[0],f=u[1],h=u[2],p=u[3],m=this.fromRecipe(u[4]),v;a.source&&f&&f.sourceInterval&&(v=a.source.subInterval(f.sourceInterval[0],f.sourceInterval[1]-f.sourceInterval[0])),a[l](o,p,m,h,v)}),this.currentRuleName=this.currentDecl=null,a.build()}terminal(e){return new _t(e)}range(e,r){return new At(e,r)}param(e){return new Tt(e)}alt(...e){let r=[];for(let i of e)i instanceof me||(i=this.fromRecipe(i)),i instanceof st?r=r.concat(i.terms):r.push(i);return r.length===1?r[0]:new st(r)}seq(...e){let r=[];for(let i of e)i instanceof me||(i=this.fromRecipe(i)),i instanceof lt?r=r.concat(i.factors):r.push(i);return r.length===1?r[0]:new lt(r)}star(e){return e instanceof me||(e=this.fromRecipe(e)),new Hi(e)}plus(e){return e instanceof me||(e=this.fromRecipe(e)),new gn(e)}opt(e){return e instanceof me||(e=this.fromRecipe(e)),new oi(e)}not(e){return e instanceof me||(e=this.fromRecipe(e)),new gt(e)}lookahead(e){return e instanceof me||(e=this.fromRecipe(e)),this.options.eliminateLookaheads?new gt(new gt(e)):new Ct(e)}lex(e){return e instanceof me||(e=this.fromRecipe(e)),new Kt(e)}app(e,r){return r&&r.length>0&&(r=r.map(function(i){return i instanceof me?i:this.fromRecipe(i)},this)),new Te(e,r)}splice(e,r){return new pa(this.currentDecl.superGrammar,this.currentRuleName,e.map(i=>this.fromRecipe(i)),r.map(i=>this.fromRecipe(i)))}fromRecipe(e){let r=e[0]==="grammar"?e.slice(1):e.slice(2),i=this[e[0]](...r),n=e[1];return n&&n.sourceInterval&&this.currentDecl&&i.withSource(this.currentDecl.sourceInterval(...n.sourceInterval)),i}};function Gg(t){return typeof t=="function"?t.call(new ma):(typeof t=="string"&&(t=JSON.parse(t)),new ma().fromRecipe(t))}var Wg=Gg(["grammar",{source:`BuiltInRules {
|
|
49
|
+
|
|
50
|
+
alnum (an alpha-numeric character)
|
|
51
|
+
= letter
|
|
52
|
+
| digit
|
|
53
|
+
|
|
54
|
+
letter (a letter)
|
|
55
|
+
= lower
|
|
56
|
+
| upper
|
|
57
|
+
| unicodeLtmo
|
|
58
|
+
|
|
59
|
+
digit (a digit)
|
|
60
|
+
= "0".."9"
|
|
61
|
+
|
|
62
|
+
hexDigit (a hexadecimal digit)
|
|
63
|
+
= digit
|
|
64
|
+
| "a".."f"
|
|
65
|
+
| "A".."F"
|
|
66
|
+
|
|
67
|
+
ListOf<elem, sep>
|
|
68
|
+
= NonemptyListOf<elem, sep>
|
|
69
|
+
| EmptyListOf<elem, sep>
|
|
70
|
+
|
|
71
|
+
NonemptyListOf<elem, sep>
|
|
72
|
+
= elem (sep elem)*
|
|
73
|
+
|
|
74
|
+
EmptyListOf<elem, sep>
|
|
75
|
+
= /* nothing */
|
|
76
|
+
|
|
77
|
+
listOf<elem, sep>
|
|
78
|
+
= nonemptyListOf<elem, sep>
|
|
79
|
+
| emptyListOf<elem, sep>
|
|
80
|
+
|
|
81
|
+
nonemptyListOf<elem, sep>
|
|
82
|
+
= elem (sep elem)*
|
|
83
|
+
|
|
84
|
+
emptyListOf<elem, sep>
|
|
85
|
+
= /* nothing */
|
|
86
|
+
|
|
87
|
+
// Allows a syntactic rule application within a lexical context.
|
|
88
|
+
applySyntactic<app> = app
|
|
89
|
+
}`},"BuiltInRules",null,null,{alnum:["define",{sourceInterval:[18,78]},"an alpha-numeric character",[],["alt",{sourceInterval:[60,78]},["app",{sourceInterval:[60,66]},"letter",[]],["app",{sourceInterval:[73,78]},"digit",[]]]],letter:["define",{sourceInterval:[82,142]},"a letter",[],["alt",{sourceInterval:[107,142]},["app",{sourceInterval:[107,112]},"lower",[]],["app",{sourceInterval:[119,124]},"upper",[]],["app",{sourceInterval:[131,142]},"unicodeLtmo",[]]]],digit:["define",{sourceInterval:[146,177]},"a digit",[],["range",{sourceInterval:[169,177]},"0","9"]],hexDigit:["define",{sourceInterval:[181,254]},"a hexadecimal digit",[],["alt",{sourceInterval:[219,254]},["app",{sourceInterval:[219,224]},"digit",[]],["range",{sourceInterval:[231,239]},"a","f"],["range",{sourceInterval:[246,254]},"A","F"]]],ListOf:["define",{sourceInterval:[258,336]},null,["elem","sep"],["alt",{sourceInterval:[282,336]},["app",{sourceInterval:[282,307]},"NonemptyListOf",[["param",{sourceInterval:[297,301]},0],["param",{sourceInterval:[303,306]},1]]],["app",{sourceInterval:[314,336]},"EmptyListOf",[["param",{sourceInterval:[326,330]},0],["param",{sourceInterval:[332,335]},1]]]]],NonemptyListOf:["define",{sourceInterval:[340,388]},null,["elem","sep"],["seq",{sourceInterval:[372,388]},["param",{sourceInterval:[372,376]},0],["star",{sourceInterval:[377,388]},["seq",{sourceInterval:[378,386]},["param",{sourceInterval:[378,381]},1],["param",{sourceInterval:[382,386]},0]]]]],EmptyListOf:["define",{sourceInterval:[392,434]},null,["elem","sep"],["seq",{sourceInterval:[438,438]}]],listOf:["define",{sourceInterval:[438,516]},null,["elem","sep"],["alt",{sourceInterval:[462,516]},["app",{sourceInterval:[462,487]},"nonemptyListOf",[["param",{sourceInterval:[477,481]},0],["param",{sourceInterval:[483,486]},1]]],["app",{sourceInterval:[494,516]},"emptyListOf",[["param",{sourceInterval:[506,510]},0],["param",{sourceInterval:[512,515]},1]]]]],nonemptyListOf:["define",{sourceInterval:[520,568]},null,["elem","sep"],["seq",{sourceInterval:[552,568]},["param",{sourceInterval:[552,556]},0],["star",{sourceInterval:[557,568]},["seq",{sourceInterval:[558,566]},["param",{sourceInterval:[558,561]},1],["param",{sourceInterval:[562,566]},0]]]]],emptyListOf:["define",{sourceInterval:[572,682]},null,["elem","sep"],["seq",{sourceInterval:[685,685]}]],applySyntactic:["define",{sourceInterval:[685,710]},null,["app"],["param",{sourceInterval:[707,710]},0]]}]);gr.BuiltInRules=Wg;f3(gr.BuiltInRules);var El=Gg(["grammar",{source:`Ohm {
|
|
90
|
+
|
|
91
|
+
Grammars
|
|
92
|
+
= Grammar*
|
|
93
|
+
|
|
94
|
+
Grammar
|
|
95
|
+
= ident SuperGrammar? "{" Rule* "}"
|
|
96
|
+
|
|
97
|
+
SuperGrammar
|
|
98
|
+
= "<:" ident
|
|
99
|
+
|
|
100
|
+
Rule
|
|
101
|
+
= ident Formals? ruleDescr? "=" RuleBody -- define
|
|
102
|
+
| ident Formals? ":=" OverrideRuleBody -- override
|
|
103
|
+
| ident Formals? "+=" RuleBody -- extend
|
|
104
|
+
|
|
105
|
+
RuleBody
|
|
106
|
+
= "|"? NonemptyListOf<TopLevelTerm, "|">
|
|
107
|
+
|
|
108
|
+
TopLevelTerm
|
|
109
|
+
= Seq caseName -- inline
|
|
110
|
+
| Seq
|
|
111
|
+
|
|
112
|
+
OverrideRuleBody
|
|
113
|
+
= "|"? NonemptyListOf<OverrideTopLevelTerm, "|">
|
|
114
|
+
|
|
115
|
+
OverrideTopLevelTerm
|
|
116
|
+
= "..." -- superSplice
|
|
117
|
+
| TopLevelTerm
|
|
118
|
+
|
|
119
|
+
Formals
|
|
120
|
+
= "<" ListOf<ident, ","> ">"
|
|
121
|
+
|
|
122
|
+
Params
|
|
123
|
+
= "<" ListOf<Seq, ","> ">"
|
|
124
|
+
|
|
125
|
+
Alt
|
|
126
|
+
= NonemptyListOf<Seq, "|">
|
|
127
|
+
|
|
128
|
+
Seq
|
|
129
|
+
= Iter*
|
|
130
|
+
|
|
131
|
+
Iter
|
|
132
|
+
= Pred "*" -- star
|
|
133
|
+
| Pred "+" -- plus
|
|
134
|
+
| Pred "?" -- opt
|
|
135
|
+
| Pred
|
|
136
|
+
|
|
137
|
+
Pred
|
|
138
|
+
= "~" Lex -- not
|
|
139
|
+
| "&" Lex -- lookahead
|
|
140
|
+
| Lex
|
|
141
|
+
|
|
142
|
+
Lex
|
|
143
|
+
= "#" Base -- lex
|
|
144
|
+
| Base
|
|
145
|
+
|
|
146
|
+
Base
|
|
147
|
+
= ident Params? ~(ruleDescr? "=" | ":=" | "+=") -- application
|
|
148
|
+
| oneCharTerminal ".." oneCharTerminal -- range
|
|
149
|
+
| terminal -- terminal
|
|
150
|
+
| "(" Alt ")" -- paren
|
|
151
|
+
|
|
152
|
+
ruleDescr (a rule description)
|
|
153
|
+
= "(" ruleDescrText ")"
|
|
154
|
+
|
|
155
|
+
ruleDescrText
|
|
156
|
+
= (~")" any)*
|
|
157
|
+
|
|
158
|
+
caseName
|
|
159
|
+
= "--" (~"\\n" space)* name (~"\\n" space)* ("\\n" | &"}")
|
|
160
|
+
|
|
161
|
+
name (a name)
|
|
162
|
+
= nameFirst nameRest*
|
|
163
|
+
|
|
164
|
+
nameFirst
|
|
165
|
+
= "_"
|
|
166
|
+
| letter
|
|
167
|
+
|
|
168
|
+
nameRest
|
|
169
|
+
= "_"
|
|
170
|
+
| alnum
|
|
171
|
+
|
|
172
|
+
ident (an identifier)
|
|
173
|
+
= name
|
|
174
|
+
|
|
175
|
+
terminal
|
|
176
|
+
= "\\"" terminalChar* "\\""
|
|
177
|
+
|
|
178
|
+
oneCharTerminal
|
|
179
|
+
= "\\"" terminalChar "\\""
|
|
180
|
+
|
|
181
|
+
terminalChar
|
|
182
|
+
= escapeChar
|
|
183
|
+
| ~"\\\\" ~"\\"" ~"\\n" "\\u{0}".."\\u{10FFFF}"
|
|
184
|
+
|
|
185
|
+
escapeChar (an escape sequence)
|
|
186
|
+
= "\\\\\\\\" -- backslash
|
|
187
|
+
| "\\\\\\"" -- doubleQuote
|
|
188
|
+
| "\\\\\\'" -- singleQuote
|
|
189
|
+
| "\\\\b" -- backspace
|
|
190
|
+
| "\\\\n" -- lineFeed
|
|
191
|
+
| "\\\\r" -- carriageReturn
|
|
192
|
+
| "\\\\t" -- tab
|
|
193
|
+
| "\\\\u{" hexDigit hexDigit? hexDigit?
|
|
194
|
+
hexDigit? hexDigit? hexDigit? "}" -- unicodeCodePoint
|
|
195
|
+
| "\\\\u" hexDigit hexDigit hexDigit hexDigit -- unicodeEscape
|
|
196
|
+
| "\\\\x" hexDigit hexDigit -- hexEscape
|
|
197
|
+
|
|
198
|
+
space
|
|
199
|
+
+= comment
|
|
200
|
+
|
|
201
|
+
comment
|
|
202
|
+
= "//" (~"\\n" any)* &("\\n" | end) -- singleLine
|
|
203
|
+
| "/*" (~"*/" any)* "*/" -- multiLine
|
|
204
|
+
|
|
205
|
+
tokens = token*
|
|
206
|
+
|
|
207
|
+
token = caseName | comment | ident | operator | punctuation | terminal | any
|
|
208
|
+
|
|
209
|
+
operator = "<:" | "=" | ":=" | "+=" | "*" | "+" | "?" | "~" | "&"
|
|
210
|
+
|
|
211
|
+
punctuation = "<" | ">" | "," | "--"
|
|
212
|
+
}`},"Ohm",null,"Grammars",{Grammars:["define",{sourceInterval:[9,32]},null,[],["star",{sourceInterval:[24,32]},["app",{sourceInterval:[24,31]},"Grammar",[]]]],Grammar:["define",{sourceInterval:[36,83]},null,[],["seq",{sourceInterval:[50,83]},["app",{sourceInterval:[50,55]},"ident",[]],["opt",{sourceInterval:[56,69]},["app",{sourceInterval:[56,68]},"SuperGrammar",[]]],["terminal",{sourceInterval:[70,73]},"{"],["star",{sourceInterval:[74,79]},["app",{sourceInterval:[74,78]},"Rule",[]]],["terminal",{sourceInterval:[80,83]},"}"]]],SuperGrammar:["define",{sourceInterval:[87,116]},null,[],["seq",{sourceInterval:[106,116]},["terminal",{sourceInterval:[106,110]},"<:"],["app",{sourceInterval:[111,116]},"ident",[]]]],Rule_define:["define",{sourceInterval:[131,181]},null,[],["seq",{sourceInterval:[131,170]},["app",{sourceInterval:[131,136]},"ident",[]],["opt",{sourceInterval:[137,145]},["app",{sourceInterval:[137,144]},"Formals",[]]],["opt",{sourceInterval:[146,156]},["app",{sourceInterval:[146,155]},"ruleDescr",[]]],["terminal",{sourceInterval:[157,160]},"="],["app",{sourceInterval:[162,170]},"RuleBody",[]]]],Rule_override:["define",{sourceInterval:[188,248]},null,[],["seq",{sourceInterval:[188,235]},["app",{sourceInterval:[188,193]},"ident",[]],["opt",{sourceInterval:[194,202]},["app",{sourceInterval:[194,201]},"Formals",[]]],["terminal",{sourceInterval:[214,218]},":="],["app",{sourceInterval:[219,235]},"OverrideRuleBody",[]]]],Rule_extend:["define",{sourceInterval:[255,305]},null,[],["seq",{sourceInterval:[255,294]},["app",{sourceInterval:[255,260]},"ident",[]],["opt",{sourceInterval:[261,269]},["app",{sourceInterval:[261,268]},"Formals",[]]],["terminal",{sourceInterval:[281,285]},"+="],["app",{sourceInterval:[286,294]},"RuleBody",[]]]],Rule:["define",{sourceInterval:[120,305]},null,[],["alt",{sourceInterval:[131,305]},["app",{sourceInterval:[131,170]},"Rule_define",[]],["app",{sourceInterval:[188,235]},"Rule_override",[]],["app",{sourceInterval:[255,294]},"Rule_extend",[]]]],RuleBody:["define",{sourceInterval:[309,362]},null,[],["seq",{sourceInterval:[324,362]},["opt",{sourceInterval:[324,328]},["terminal",{sourceInterval:[324,327]},"|"]],["app",{sourceInterval:[329,362]},"NonemptyListOf",[["app",{sourceInterval:[344,356]},"TopLevelTerm",[]],["terminal",{sourceInterval:[358,361]},"|"]]]]],TopLevelTerm_inline:["define",{sourceInterval:[385,408]},null,[],["seq",{sourceInterval:[385,397]},["app",{sourceInterval:[385,388]},"Seq",[]],["app",{sourceInterval:[389,397]},"caseName",[]]]],TopLevelTerm:["define",{sourceInterval:[366,418]},null,[],["alt",{sourceInterval:[385,418]},["app",{sourceInterval:[385,397]},"TopLevelTerm_inline",[]],["app",{sourceInterval:[415,418]},"Seq",[]]]],OverrideRuleBody:["define",{sourceInterval:[422,491]},null,[],["seq",{sourceInterval:[445,491]},["opt",{sourceInterval:[445,449]},["terminal",{sourceInterval:[445,448]},"|"]],["app",{sourceInterval:[450,491]},"NonemptyListOf",[["app",{sourceInterval:[465,485]},"OverrideTopLevelTerm",[]],["terminal",{sourceInterval:[487,490]},"|"]]]]],OverrideTopLevelTerm_superSplice:["define",{sourceInterval:[522,543]},null,[],["terminal",{sourceInterval:[522,527]},"..."]],OverrideTopLevelTerm:["define",{sourceInterval:[495,562]},null,[],["alt",{sourceInterval:[522,562]},["app",{sourceInterval:[522,527]},"OverrideTopLevelTerm_superSplice",[]],["app",{sourceInterval:[550,562]},"TopLevelTerm",[]]]],Formals:["define",{sourceInterval:[566,606]},null,[],["seq",{sourceInterval:[580,606]},["terminal",{sourceInterval:[580,583]},"<"],["app",{sourceInterval:[584,602]},"ListOf",[["app",{sourceInterval:[591,596]},"ident",[]],["terminal",{sourceInterval:[598,601]},","]]],["terminal",{sourceInterval:[603,606]},">"]]],Params:["define",{sourceInterval:[610,647]},null,[],["seq",{sourceInterval:[623,647]},["terminal",{sourceInterval:[623,626]},"<"],["app",{sourceInterval:[627,643]},"ListOf",[["app",{sourceInterval:[634,637]},"Seq",[]],["terminal",{sourceInterval:[639,642]},","]]],["terminal",{sourceInterval:[644,647]},">"]]],Alt:["define",{sourceInterval:[651,685]},null,[],["app",{sourceInterval:[661,685]},"NonemptyListOf",[["app",{sourceInterval:[676,679]},"Seq",[]],["terminal",{sourceInterval:[681,684]},"|"]]]],Seq:["define",{sourceInterval:[689,704]},null,[],["star",{sourceInterval:[699,704]},["app",{sourceInterval:[699,703]},"Iter",[]]]],Iter_star:["define",{sourceInterval:[719,736]},null,[],["seq",{sourceInterval:[719,727]},["app",{sourceInterval:[719,723]},"Pred",[]],["terminal",{sourceInterval:[724,727]},"*"]]],Iter_plus:["define",{sourceInterval:[743,760]},null,[],["seq",{sourceInterval:[743,751]},["app",{sourceInterval:[743,747]},"Pred",[]],["terminal",{sourceInterval:[748,751]},"+"]]],Iter_opt:["define",{sourceInterval:[767,783]},null,[],["seq",{sourceInterval:[767,775]},["app",{sourceInterval:[767,771]},"Pred",[]],["terminal",{sourceInterval:[772,775]},"?"]]],Iter:["define",{sourceInterval:[708,794]},null,[],["alt",{sourceInterval:[719,794]},["app",{sourceInterval:[719,727]},"Iter_star",[]],["app",{sourceInterval:[743,751]},"Iter_plus",[]],["app",{sourceInterval:[767,775]},"Iter_opt",[]],["app",{sourceInterval:[790,794]},"Pred",[]]]],Pred_not:["define",{sourceInterval:[809,824]},null,[],["seq",{sourceInterval:[809,816]},["terminal",{sourceInterval:[809,812]},"~"],["app",{sourceInterval:[813,816]},"Lex",[]]]],Pred_lookahead:["define",{sourceInterval:[831,852]},null,[],["seq",{sourceInterval:[831,838]},["terminal",{sourceInterval:[831,834]},"&"],["app",{sourceInterval:[835,838]},"Lex",[]]]],Pred:["define",{sourceInterval:[798,862]},null,[],["alt",{sourceInterval:[809,862]},["app",{sourceInterval:[809,816]},"Pred_not",[]],["app",{sourceInterval:[831,838]},"Pred_lookahead",[]],["app",{sourceInterval:[859,862]},"Lex",[]]]],Lex_lex:["define",{sourceInterval:[876,892]},null,[],["seq",{sourceInterval:[876,884]},["terminal",{sourceInterval:[876,879]},"#"],["app",{sourceInterval:[880,884]},"Base",[]]]],Lex:["define",{sourceInterval:[866,903]},null,[],["alt",{sourceInterval:[876,903]},["app",{sourceInterval:[876,884]},"Lex_lex",[]],["app",{sourceInterval:[899,903]},"Base",[]]]],Base_application:["define",{sourceInterval:[918,979]},null,[],["seq",{sourceInterval:[918,963]},["app",{sourceInterval:[918,923]},"ident",[]],["opt",{sourceInterval:[924,931]},["app",{sourceInterval:[924,930]},"Params",[]]],["not",{sourceInterval:[932,963]},["alt",{sourceInterval:[934,962]},["seq",{sourceInterval:[934,948]},["opt",{sourceInterval:[934,944]},["app",{sourceInterval:[934,943]},"ruleDescr",[]]],["terminal",{sourceInterval:[945,948]},"="]],["terminal",{sourceInterval:[951,955]},":="],["terminal",{sourceInterval:[958,962]},"+="]]]]],Base_range:["define",{sourceInterval:[986,1041]},null,[],["seq",{sourceInterval:[986,1022]},["app",{sourceInterval:[986,1001]},"oneCharTerminal",[]],["terminal",{sourceInterval:[1002,1006]},".."],["app",{sourceInterval:[1007,1022]},"oneCharTerminal",[]]]],Base_terminal:["define",{sourceInterval:[1048,1106]},null,[],["app",{sourceInterval:[1048,1056]},"terminal",[]]],Base_paren:["define",{sourceInterval:[1113,1168]},null,[],["seq",{sourceInterval:[1113,1124]},["terminal",{sourceInterval:[1113,1116]},"("],["app",{sourceInterval:[1117,1120]},"Alt",[]],["terminal",{sourceInterval:[1121,1124]},")"]]],Base:["define",{sourceInterval:[907,1168]},null,[],["alt",{sourceInterval:[918,1168]},["app",{sourceInterval:[918,963]},"Base_application",[]],["app",{sourceInterval:[986,1022]},"Base_range",[]],["app",{sourceInterval:[1048,1056]},"Base_terminal",[]],["app",{sourceInterval:[1113,1124]},"Base_paren",[]]]],ruleDescr:["define",{sourceInterval:[1172,1231]},"a rule description",[],["seq",{sourceInterval:[1210,1231]},["terminal",{sourceInterval:[1210,1213]},"("],["app",{sourceInterval:[1214,1227]},"ruleDescrText",[]],["terminal",{sourceInterval:[1228,1231]},")"]]],ruleDescrText:["define",{sourceInterval:[1235,1266]},null,[],["star",{sourceInterval:[1255,1266]},["seq",{sourceInterval:[1256,1264]},["not",{sourceInterval:[1256,1260]},["terminal",{sourceInterval:[1257,1260]},")"]],["app",{sourceInterval:[1261,1264]},"any",[]]]]],caseName:["define",{sourceInterval:[1270,1338]},null,[],["seq",{sourceInterval:[1285,1338]},["terminal",{sourceInterval:[1285,1289]},"--"],["star",{sourceInterval:[1290,1304]},["seq",{sourceInterval:[1291,1302]},["not",{sourceInterval:[1291,1296]},["terminal",{sourceInterval:[1292,1296]},`
|
|
213
|
+
`]],["app",{sourceInterval:[1297,1302]},"space",[]]]],["app",{sourceInterval:[1305,1309]},"name",[]],["star",{sourceInterval:[1310,1324]},["seq",{sourceInterval:[1311,1322]},["not",{sourceInterval:[1311,1316]},["terminal",{sourceInterval:[1312,1316]},`
|
|
214
|
+
`]],["app",{sourceInterval:[1317,1322]},"space",[]]]],["alt",{sourceInterval:[1326,1337]},["terminal",{sourceInterval:[1326,1330]},`
|
|
215
|
+
`],["lookahead",{sourceInterval:[1333,1337]},["terminal",{sourceInterval:[1334,1337]},"}"]]]]],name:["define",{sourceInterval:[1342,1382]},"a name",[],["seq",{sourceInterval:[1363,1382]},["app",{sourceInterval:[1363,1372]},"nameFirst",[]],["star",{sourceInterval:[1373,1382]},["app",{sourceInterval:[1373,1381]},"nameRest",[]]]]],nameFirst:["define",{sourceInterval:[1386,1418]},null,[],["alt",{sourceInterval:[1402,1418]},["terminal",{sourceInterval:[1402,1405]},"_"],["app",{sourceInterval:[1412,1418]},"letter",[]]]],nameRest:["define",{sourceInterval:[1422,1452]},null,[],["alt",{sourceInterval:[1437,1452]},["terminal",{sourceInterval:[1437,1440]},"_"],["app",{sourceInterval:[1447,1452]},"alnum",[]]]],ident:["define",{sourceInterval:[1456,1489]},"an identifier",[],["app",{sourceInterval:[1485,1489]},"name",[]]],terminal:["define",{sourceInterval:[1493,1531]},null,[],["seq",{sourceInterval:[1508,1531]},["terminal",{sourceInterval:[1508,1512]},'"'],["star",{sourceInterval:[1513,1526]},["app",{sourceInterval:[1513,1525]},"terminalChar",[]]],["terminal",{sourceInterval:[1527,1531]},'"']]],oneCharTerminal:["define",{sourceInterval:[1535,1579]},null,[],["seq",{sourceInterval:[1557,1579]},["terminal",{sourceInterval:[1557,1561]},'"'],["app",{sourceInterval:[1562,1574]},"terminalChar",[]],["terminal",{sourceInterval:[1575,1579]},'"']]],terminalChar:["define",{sourceInterval:[1583,1660]},null,[],["alt",{sourceInterval:[1602,1660]},["app",{sourceInterval:[1602,1612]},"escapeChar",[]],["seq",{sourceInterval:[1621,1660]},["not",{sourceInterval:[1621,1626]},["terminal",{sourceInterval:[1622,1626]},"\\"]],["not",{sourceInterval:[1627,1632]},["terminal",{sourceInterval:[1628,1632]},'"']],["not",{sourceInterval:[1633,1638]},["terminal",{sourceInterval:[1634,1638]},`
|
|
216
|
+
`]],["range",{sourceInterval:[1639,1660]},"\0","\u{10FFFF}"]]]],escapeChar_backslash:["define",{sourceInterval:[1703,1758]},null,[],["terminal",{sourceInterval:[1703,1709]},"\\\\"]],escapeChar_doubleQuote:["define",{sourceInterval:[1765,1822]},null,[],["terminal",{sourceInterval:[1765,1771]},'\\"']],escapeChar_singleQuote:["define",{sourceInterval:[1829,1886]},null,[],["terminal",{sourceInterval:[1829,1835]},"\\'"]],escapeChar_backspace:["define",{sourceInterval:[1893,1948]},null,[],["terminal",{sourceInterval:[1893,1898]},"\\b"]],escapeChar_lineFeed:["define",{sourceInterval:[1955,2009]},null,[],["terminal",{sourceInterval:[1955,1960]},"\\n"]],escapeChar_carriageReturn:["define",{sourceInterval:[2016,2076]},null,[],["terminal",{sourceInterval:[2016,2021]},"\\r"]],escapeChar_tab:["define",{sourceInterval:[2083,2132]},null,[],["terminal",{sourceInterval:[2083,2088]},"\\t"]],escapeChar_unicodeCodePoint:["define",{sourceInterval:[2139,2243]},null,[],["seq",{sourceInterval:[2139,2221]},["terminal",{sourceInterval:[2139,2145]},"\\u{"],["app",{sourceInterval:[2146,2154]},"hexDigit",[]],["opt",{sourceInterval:[2155,2164]},["app",{sourceInterval:[2155,2163]},"hexDigit",[]]],["opt",{sourceInterval:[2165,2174]},["app",{sourceInterval:[2165,2173]},"hexDigit",[]]],["opt",{sourceInterval:[2188,2197]},["app",{sourceInterval:[2188,2196]},"hexDigit",[]]],["opt",{sourceInterval:[2198,2207]},["app",{sourceInterval:[2198,2206]},"hexDigit",[]]],["opt",{sourceInterval:[2208,2217]},["app",{sourceInterval:[2208,2216]},"hexDigit",[]]],["terminal",{sourceInterval:[2218,2221]},"}"]]],escapeChar_unicodeEscape:["define",{sourceInterval:[2250,2309]},null,[],["seq",{sourceInterval:[2250,2291]},["terminal",{sourceInterval:[2250,2255]},"\\u"],["app",{sourceInterval:[2256,2264]},"hexDigit",[]],["app",{sourceInterval:[2265,2273]},"hexDigit",[]],["app",{sourceInterval:[2274,2282]},"hexDigit",[]],["app",{sourceInterval:[2283,2291]},"hexDigit",[]]]],escapeChar_hexEscape:["define",{sourceInterval:[2316,2371]},null,[],["seq",{sourceInterval:[2316,2339]},["terminal",{sourceInterval:[2316,2321]},"\\x"],["app",{sourceInterval:[2322,2330]},"hexDigit",[]],["app",{sourceInterval:[2331,2339]},"hexDigit",[]]]],escapeChar:["define",{sourceInterval:[1664,2371]},"an escape sequence",[],["alt",{sourceInterval:[1703,2371]},["app",{sourceInterval:[1703,1709]},"escapeChar_backslash",[]],["app",{sourceInterval:[1765,1771]},"escapeChar_doubleQuote",[]],["app",{sourceInterval:[1829,1835]},"escapeChar_singleQuote",[]],["app",{sourceInterval:[1893,1898]},"escapeChar_backspace",[]],["app",{sourceInterval:[1955,1960]},"escapeChar_lineFeed",[]],["app",{sourceInterval:[2016,2021]},"escapeChar_carriageReturn",[]],["app",{sourceInterval:[2083,2088]},"escapeChar_tab",[]],["app",{sourceInterval:[2139,2221]},"escapeChar_unicodeCodePoint",[]],["app",{sourceInterval:[2250,2291]},"escapeChar_unicodeEscape",[]],["app",{sourceInterval:[2316,2339]},"escapeChar_hexEscape",[]]]],space:["extend",{sourceInterval:[2375,2394]},null,[],["app",{sourceInterval:[2387,2394]},"comment",[]]],comment_singleLine:["define",{sourceInterval:[2412,2458]},null,[],["seq",{sourceInterval:[2412,2443]},["terminal",{sourceInterval:[2412,2416]},"//"],["star",{sourceInterval:[2417,2429]},["seq",{sourceInterval:[2418,2427]},["not",{sourceInterval:[2418,2423]},["terminal",{sourceInterval:[2419,2423]},`
|
|
217
|
+
`]],["app",{sourceInterval:[2424,2427]},"any",[]]]],["lookahead",{sourceInterval:[2430,2443]},["alt",{sourceInterval:[2432,2442]},["terminal",{sourceInterval:[2432,2436]},`
|
|
218
|
+
`],["app",{sourceInterval:[2439,2442]},"end",[]]]]]],comment_multiLine:["define",{sourceInterval:[2465,2501]},null,[],["seq",{sourceInterval:[2465,2487]},["terminal",{sourceInterval:[2465,2469]},"/*"],["star",{sourceInterval:[2470,2482]},["seq",{sourceInterval:[2471,2480]},["not",{sourceInterval:[2471,2476]},["terminal",{sourceInterval:[2472,2476]},"*/"]],["app",{sourceInterval:[2477,2480]},"any",[]]]],["terminal",{sourceInterval:[2483,2487]},"*/"]]],comment:["define",{sourceInterval:[2398,2501]},null,[],["alt",{sourceInterval:[2412,2501]},["app",{sourceInterval:[2412,2443]},"comment_singleLine",[]],["app",{sourceInterval:[2465,2487]},"comment_multiLine",[]]]],tokens:["define",{sourceInterval:[2505,2520]},null,[],["star",{sourceInterval:[2514,2520]},["app",{sourceInterval:[2514,2519]},"token",[]]]],token:["define",{sourceInterval:[2524,2600]},null,[],["alt",{sourceInterval:[2532,2600]},["app",{sourceInterval:[2532,2540]},"caseName",[]],["app",{sourceInterval:[2543,2550]},"comment",[]],["app",{sourceInterval:[2553,2558]},"ident",[]],["app",{sourceInterval:[2561,2569]},"operator",[]],["app",{sourceInterval:[2572,2583]},"punctuation",[]],["app",{sourceInterval:[2586,2594]},"terminal",[]],["app",{sourceInterval:[2597,2600]},"any",[]]]],operator:["define",{sourceInterval:[2604,2669]},null,[],["alt",{sourceInterval:[2615,2669]},["terminal",{sourceInterval:[2615,2619]},"<:"],["terminal",{sourceInterval:[2622,2625]},"="],["terminal",{sourceInterval:[2628,2632]},":="],["terminal",{sourceInterval:[2635,2639]},"+="],["terminal",{sourceInterval:[2642,2645]},"*"],["terminal",{sourceInterval:[2648,2651]},"+"],["terminal",{sourceInterval:[2654,2657]},"?"],["terminal",{sourceInterval:[2660,2663]},"~"],["terminal",{sourceInterval:[2666,2669]},"&"]]],punctuation:["define",{sourceInterval:[2673,2709]},null,[],["alt",{sourceInterval:[2687,2709]},["terminal",{sourceInterval:[2687,2690]},"<"],["terminal",{sourceInterval:[2693,2696]},">"],["terminal",{sourceInterval:[2699,2702]},","],["terminal",{sourceInterval:[2705,2709]},"--"]]]}]),Tg=Object.create(me.prototype);function hx(t,e){for(let r in t)if(r===e)return!0;return!1}function qx(t,e,r,i){let n=new ma(i),s,a,o,u=!1;return(r||El).createSemantics().addOperation("visit",{Grammars(h){return h.children.map(p=>p.visit())},Grammar(h,p,m,v,S){let b=h.visit();s=n.newGrammar(b),p.child(0)&&p.child(0).visit(),v.children.map(k=>k.visit());let g=s.build();if(g.source=this.source.trimmed(),hx(e,b))throw S3(g);return e[b]=g,g},SuperGrammar(h,p){let m=p.visit();if(m==="null")s.withSuperGrammar(null);else{if(!e||!hx(e,m))throw b3(m,e,p.source);s.withSuperGrammar(e[m])}},Rule_define(h,p,m,v,S){a=h.visit(),o=p.children.map(w=>w.visit())[0]||[],!s.defaultStartRule&&s.ensureSuperGrammar()!==gr.ProtoBuiltInRules&&s.withDefaultStartRule(a);let b=S.visit(),g=m.children.map(w=>w.visit())[0],k=this.source.trimmed();return s.define(a,o,b,g,k)},Rule_override(h,p,m,v){a=h.visit(),o=p.children.map(g=>g.visit())[0]||[];let S=this.source.trimmed();s.ensureSuperGrammarRuleForOverriding(a,S),u=!0;let b=v.visit();return u=!1,s.override(a,o,b,null,S)},Rule_extend(h,p,m,v){a=h.visit(),o=p.children.map(g=>g.visit())[0]||[];let S=v.visit(),b=this.source.trimmed();return s.extend(a,o,S,null,b)},RuleBody(h,p){return n.alt(...p.visit()).withSource(this.source)},OverrideRuleBody(h,p){let m=p.visit(),v=m.indexOf(Tg);if(v>=0){let S=m.slice(0,v),b=m.slice(v+1);return b.forEach(g=>{if(g===Tg)throw L3(g)}),new pa(s.superGrammar,a,S,b).withSource(this.source)}else return n.alt(...m).withSource(this.source)},Formals(h,p,m){return p.visit()},Params(h,p,m){return p.visit()},Alt(h){return n.alt(...h.visit()).withSource(this.source)},TopLevelTerm_inline(h,p){let m=a+"_"+p.visit(),v=h.visit(),S=this.source.trimmed(),b=!(s.superGrammar&&s.superGrammar.rules[m]);u&&!b?s.override(m,o,v,null,S):s.define(m,o,v,null,S);let g=o.map(k=>n.app(k));return n.app(m,g).withSource(v.source)},OverrideTopLevelTerm_superSplice(h){return Tg},Seq(h){return n.seq(...h.children.map(p=>p.visit())).withSource(this.source)},Iter_star(h,p){return n.star(h.visit()).withSource(this.source)},Iter_plus(h,p){return n.plus(h.visit()).withSource(this.source)},Iter_opt(h,p){return n.opt(h.visit()).withSource(this.source)},Pred_not(h,p){return n.not(p.visit()).withSource(this.source)},Pred_lookahead(h,p){return n.lookahead(p.visit()).withSource(this.source)},Lex_lex(h,p){return n.lex(p.visit()).withSource(this.source)},Base_application(h,p){let m=p.children.map(v=>v.visit())[0]||[];return n.app(h.visit(),m).withSource(this.source)},Base_range(h,p,m){return n.range(h.visit(),m.visit()).withSource(this.source)},Base_terminal(h){return n.terminal(h.visit()).withSource(this.source)},Base_paren(h,p,m){return p.visit()},ruleDescr(h,p,m){return p.visit()},ruleDescrText(h){return this.sourceString.trim()},caseName(h,p,m,v,S){return m.visit()},name(h,p){return this.sourceString},nameFirst(h){},nameRest(h){},terminal(h,p,m){return p.children.map(v=>v.visit()).join("")},oneCharTerminal(h,p,m){return p.visit()},escapeChar(h){try{return bx(this.sourceString)}catch(p){throw p instanceof RangeError&&p.message.startsWith("Invalid code point ")?P3(h):p}},NonemptyListOf(h,p,m){return[h.visit()].concat(m.children.map(v=>v.visit()))},EmptyListOf(){return[]},_terminal(){return this.sourceString}})(t).visit()}var Q3=Gg(["grammar",{source:`OperationsAndAttributes {
|
|
219
|
+
|
|
220
|
+
AttributeSignature =
|
|
221
|
+
name
|
|
222
|
+
|
|
223
|
+
OperationSignature =
|
|
224
|
+
name Formals?
|
|
225
|
+
|
|
226
|
+
Formals
|
|
227
|
+
= "(" ListOf<name, ","> ")"
|
|
228
|
+
|
|
229
|
+
name (a name)
|
|
230
|
+
= nameFirst nameRest*
|
|
231
|
+
|
|
232
|
+
nameFirst
|
|
233
|
+
= "_"
|
|
234
|
+
| letter
|
|
235
|
+
|
|
236
|
+
nameRest
|
|
237
|
+
= "_"
|
|
238
|
+
| alnum
|
|
239
|
+
|
|
240
|
+
}`},"OperationsAndAttributes",null,"AttributeSignature",{AttributeSignature:["define",{sourceInterval:[29,58]},null,[],["app",{sourceInterval:[54,58]},"name",[]]],OperationSignature:["define",{sourceInterval:[62,100]},null,[],["seq",{sourceInterval:[87,100]},["app",{sourceInterval:[87,91]},"name",[]],["opt",{sourceInterval:[92,100]},["app",{sourceInterval:[92,99]},"Formals",[]]]]],Formals:["define",{sourceInterval:[104,143]},null,[],["seq",{sourceInterval:[118,143]},["terminal",{sourceInterval:[118,121]},"("],["app",{sourceInterval:[122,139]},"ListOf",[["app",{sourceInterval:[129,133]},"name",[]],["terminal",{sourceInterval:[135,138]},","]]],["terminal",{sourceInterval:[140,143]},")"]]],name:["define",{sourceInterval:[147,187]},"a name",[],["seq",{sourceInterval:[168,187]},["app",{sourceInterval:[168,177]},"nameFirst",[]],["star",{sourceInterval:[178,187]},["app",{sourceInterval:[178,186]},"nameRest",[]]]]],nameFirst:["define",{sourceInterval:[191,223]},null,[],["alt",{sourceInterval:[207,223]},["terminal",{sourceInterval:[207,210]},"_"],["app",{sourceInterval:[217,223]},"letter",[]]]],nameRest:["define",{sourceInterval:[227,257]},null,[],["alt",{sourceInterval:[242,257]},["terminal",{sourceInterval:[242,245]},"_"],["app",{sourceInterval:[252,257]},"alnum",[]]]]}]);Y3(gr.BuiltInRules);X3(Q3);function Y3(t){let e={empty(){return this.iteration()},nonEmpty(r,i,n){return this.iteration([r].concat(n.children))},self(...r){return this}};mr.BuiltInSemantics=mr.createSemantics(t,null).addOperation("asIteration",{emptyListOf:e.empty,nonemptyListOf:e.nonEmpty,EmptyListOf:e.empty,NonemptyListOf:e.nonEmpty,_iter:e.self})}function X3(t){mr.prototypeGrammarSemantics=t.createSemantics().addOperation("parse",{AttributeSignature(e){return{name:e.parse(),formals:[]}},OperationSignature(e,r){return{name:e.parse(),formals:r.children.map(i=>i.parse())[0]||[]}},Formals(e,r,i){return r.asIteration().children.map(n=>n.parse())},name(e,r){return this.sourceString}}),mr.prototypeGrammar=t}function Z3(t){let e=0,r=[0],i=()=>r[r.length-1],n={},s=/( *).*(?:$|\r?\n|\r)/g,a;for(;(a=s.exec(t))!=null;){let[o,u]=a;if(o.length===0)break;let l=u.length,f=i(),h=e+l;if(l>f)r.push(l),n[h]=1;else if(l<f){let p=r.length;for(;i()!==l;)r.pop();n[h]=-1*(p-r.length)}e+=o.length}return r.length>1&&(n[e]=1-r.length),n}var Cx="an indented block",Rx="a dedent",dx=1114112,Vg=class extends ha{constructor(e){super(e.input),this.state=e}_indentationAt(e){return this.state.userData[e]||0}atEnd(){return super.atEnd()&&this._indentationAt(this.pos)===0}next(){if(this._indentationAt(this.pos)!==0){this.examinedLength=Math.max(this.examinedLength,this.pos);return}return super.next()}nextCharCode(){return this._indentationAt(this.pos)!==0?(this.examinedLength=Math.max(this.examinedLength,this.pos),dx):super.nextCharCode()}nextCodePoint(){return this._indentationAt(this.pos)!==0?(this.examinedLength=Math.max(this.examinedLength,this.pos),dx):super.nextCodePoint()}},Il=class extends me{constructor(e=!0){super(),this.isIndent=e}allowsSkippingPrecedingSpace(){return!0}eval(e){let{inputStream:r}=e,i=e.userData;e.doNotMemoize=!0;let n=r.pos,s=this.isIndent?1:-1;return(i[n]||0)*s>0?(e.userData=Object.create(i),e.userData[n]-=s,e.pushBinding(new Gi(0),n),!0):(e.processFailure(n,this),!1)}getArity(){return 1}_assertAllApplicationsAreValid(e,r){}_isNullable(e,r){return!1}assertChoicesHaveUniformArity(e){}assertIteratedExprsAreNotNullable(e){}introduceParams(e){return this}substituteParams(e){return this}toString(){return this.isIndent?"indent":"dedent"}toDisplayString(){return this.toString()}toFailure(e){let r=this.isIndent?Cx:Rx;return new yr(this,r,"description")}},ej=new Te("indent"),tj=new Te("dedent"),rj=new pa(Wg,"any",[ej,tj],[]),ij=new ma().newGrammar("IndentationSensitive").withSuperGrammar(Wg).define("indent",[],new Il(!0),Cx,void 0,!0).define("dedent",[],new Il(!1),Rx,void 0,!0).extend("any",[],rj,"any character",void 0).build();Object.assign(ij,{_matchStateInitializer(t){t.userData=Z3(t.input),t.inputStream=new Vg(t)},supportsIncrementalParsing:!1});gr.initApplicationParser(El,qx);var nj=t=>!!t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t);function sj(t,e,r){let i=El.match(t,"Grammars");if(i.failed())throw v3(i);return qx(i,e,void 0,r)}function aj(t,e,r){let i=Object.create(e||{});if(typeof t!="string")if(nj(t))t=t.toString();else throw new TypeError("Expected string as first argument, got "+$g(t));return sj(t,i,r),i}function oj(t,e){return aj(t,e)}var uj=String.raw`
|
|
241
|
+
/*
|
|
242
|
+
Superset of the Ohm grammar that allows examples to be embedded in comments.
|
|
243
|
+
Any valid Ohm grammar will also be matched by this grammar.
|
|
244
|
+
*/
|
|
245
|
+
|
|
246
|
+
// Example:
|
|
247
|
+
//+ "//+ \"x\"\nG {\n//- \"\"\nstart = \"x\"}"
|
|
248
|
+
OhmWithExamples <: Ohm {
|
|
249
|
+
Grammar := ident SuperGrammar? "{" (#exampleComments Rule)* #exampleComments "}"
|
|
250
|
+
|
|
251
|
+
exampleComments = (spacesNoExampleComment exampleComment)*
|
|
252
|
+
|
|
253
|
+
// Examples:
|
|
254
|
+
//+ "//+ \"blah\""
|
|
255
|
+
//+ "//- \"one\", \"two\""
|
|
256
|
+
//- "// - \"x\", "//-\"x\"
|
|
257
|
+
exampleComment
|
|
258
|
+
= "//+" examples -- positive
|
|
259
|
+
| "//-" examples -- negative
|
|
260
|
+
|
|
261
|
+
examples = spaceNoNl+ nonemptyListOf<jsonString, exampleSep> spaceNoNl*
|
|
262
|
+
exampleSep = "," spaces
|
|
263
|
+
|
|
264
|
+
exampleCommentPrefix = "//+" | "//-"
|
|
265
|
+
|
|
266
|
+
spaceNoNl = ~"\n" space
|
|
267
|
+
spacesNoExampleComment = (~exampleCommentPrefix space)*
|
|
268
|
+
|
|
269
|
+
jsonString = "\"" jsonChar* "\""
|
|
270
|
+
|
|
271
|
+
jsonChar
|
|
272
|
+
= jsonEscape
|
|
273
|
+
| ~"\\" ~"\"" "\u{0020}".."\u{10FFFF}"
|
|
274
|
+
|
|
275
|
+
//+ "\\n", "\\u1234"
|
|
276
|
+
jsonEscape (a JSON escape sequence)
|
|
277
|
+
= "\\\""
|
|
278
|
+
| "\\\\"
|
|
279
|
+
| "\\/"
|
|
280
|
+
| "\\b"
|
|
281
|
+
| "\\f"
|
|
282
|
+
| "\\n"
|
|
283
|
+
| "\\r"
|
|
284
|
+
| "\\t"
|
|
285
|
+
| "\\u" hexDigit hexDigit hexDigit hexDigit -- unicodeEscape
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
/*
|
|
289
|
+
A stricter version of the grammar that prevents many malformed example
|
|
290
|
+
comments from being parsed as regular comments.
|
|
291
|
+
*/
|
|
292
|
+
OhmWithExamplesStrict <: OhmWithExamples {
|
|
293
|
+
// Redefine 'comment' to avoid malformed example comments from silently
|
|
294
|
+
// being parsed as regular comments.
|
|
295
|
+
comment :=
|
|
296
|
+
| ~exampleCommentPrefix comment_singleLine
|
|
297
|
+
| comment_multiLine
|
|
298
|
+
}
|
|
299
|
+
`,Mx=oj(uj,{Ohm:El}),Ol=Mx.OhmWithExamples.createSemantics().addOperation("hasExamples",{_iter(...t){return t.some(e=>e.hasExamples())},exampleComments(t,e){return e.numChildren>0}});Ol.addOperation("examples",{Grammars(t){return t.children.flatMap(e=>e.examples())},Grammar(t,e,r,i,n,s,a){let o=[],u=this.grammarName();for(let l=0;l<n.numChildren;l++){let f=n.child(l).ruleName(),p=i.child(l).examples().map(m=>({...m,grammar:u,rule:f}));o.push(...p)}if(s.hasExamples()){let l=s.examples();o.push(...l.map(f=>({...f,grammar:u,rule:""})))}return o},exampleComments(t,e){return e.children.flatMap(r=>r.examples())},exampleComment_positive(t,e){return e.examples().map(r=>({...r,shouldMatch:!0}))},exampleComment_negative(t,e){return e.examples().map(r=>({...r,shouldMatch:!1}))},examples(t,e,r){return e.asIteration().children.map(i=>({example:JSON.parse(i.sourceString)}))},comment_singleLine(t,e,r){return[]},comment_multiLine(t,e,r){return[]}});Ol.addOperation("grammarName",{Grammar(t,e,r,i,n,s,a){return t.sourceString}});Ol.addOperation("ruleName",{Rule_define(t,e,r,i,n){return t.sourceString},Rule_override(t,e,r,i){return t.sourceString},Rule_extend(t,e,r,i){return t.sourceString}});function cj(t){let e=Mx.OhmWithExamples.match(t);if(e.failed())throw new Error(e.message);return Ol(e).examples()}var lj=(t,e)=>e.isIteration()&&e.source.startIdx===t.source.startIdx&&e.source.endIdx===t.source.endIdx&&e.children.length===t.children.length;function fj(t){let e=[];for(let r=0;r<t.length;r++){let i=t[r];if(!i.isIteration()){e.push({kind:"node",node:i});continue}let n=[i];for(let s=r+1;s<t.length&&lj(i,t[s]);s++)n.push(t[s]),r=s;e.push({kind:"iter",siblings:n})}return e}function Dx(t,e=0){let r=[];for(let i of fj(t)){if(i.kind==="node"){r.push(i.node);continue}let{siblings:n}=i,s=[],a=n[0].children.length;for(let o=0;o<a;o++)s.push(...n.map(u=>u.children[o]));r.push(...Dx(s,e+1))}return r}Wi.VisitorFamily=Lg;Wi.extractExamples=cj;Wi.getLineAndColumn=Tl;Wi.getLineAndColumnMessage=Ug;Wi.recoverSourceOrder=Dx;Wi.semanticsForToAST=_3;Wi.toAST=y3});var _k=T(Ai=>{"use strict";y();Object.defineProperty(Ai,"__esModule",{value:!0});function or(t){let e=t||"";return function(){throw new Error("this method "+e+" is abstract! (it has no implementation in class "+this.constructor.name+")")}}function yn(t,e){if(!t)throw new Error(e||"Assertion failed")}function Qg(t,e,r){let i;Object.defineProperty(t,e,{get(){return i||(i=r.call(this)),i}})}function pj(t){return t&&Object.assign({},t)}function Yx(t,e){let r=[];for(;e-- >0;)r.push(t());return r}function Xx(t,e){return new Array(e+1).join(t)}function Dl(t,e){return Yx(()=>t,e)}function Yg(t){let e=[];for(let r=0;r<t.length;r++){let i=t[r];t.lastIndexOf(i)!==r&&e.indexOf(i)<0&&e.push(i)}return e}function Zx(t){let e=[];return t.forEach(r=>{e.indexOf(r)<0&&e.push(r)}),e}function fs(t){let e=t[0];return e===e.toUpperCase()}function ek(t){return!fs(t)}function tk(t,e,r){let i=r||" ";return t.length<e?Xx(i,e-t.length)+t:t}function gs(){this.strings=[]}gs.prototype.append=function(t){this.strings.push(t)};gs.prototype.contents=function(){return this.strings.join("")};var zg=t=>String.fromCodePoint(parseInt(t,16));function rk(t){if(t.charAt(0)==="\\")switch(t.charAt(1)){case"b":return"\b";case"f":return"\f";case"n":return`
|
|
300
|
+
`;case"r":return"\r";case"t":return" ";case"v":return"\v";case"x":return zg(t.slice(2,4));case"u":return t.charAt(2)==="{"?zg(t.slice(3,-1)):zg(t.slice(2,6));default:return t.charAt(1)}else return t}function uy(t){if(t==null)return String(t);let e=Object.prototype.toString.call(t);try{let r;return t.constructor&&t.constructor.name?r=t.constructor.name:e.indexOf("[object ")===0?r=e.slice(8,-1):r=typeof t,r+": "+JSON.stringify(String(t))}catch{return e}}function ik(t,e="unexpected null value"){if(t==null)throw new Error(e);return t}var hj=Object.freeze({__proto__:null,abstract:or,assert:yn,defineLazyProperty:Qg,clone:pj,repeatFn:Yx,repeatStr:Xx,repeat:Dl,getDuplicates:Yg,copyWithoutDuplicates:Zx,isSyntactic:fs,isLexical:ek,padLeft:tk,StringBuffer:gs,unescapeCodePoint:rk,unexpectedObjToString:uy,checkNotNull:ik}),nk=t=>new RegExp(String.raw`\p{${t}}`,"u"),Xg=Object.fromEntries(["Cc","Cf","Cn","Co","Cs","Ll","Lm","Lo","Lt","Lu","Mc","Me","Mn","Nd","Nl","No","Pc","Pd","Pe","Pf","Pi","Po","Ps","Sc","Sk","Sm","So","Zl","Zp","Zs"].map(t=>[t,nk(t)]));Xg.Ltmo=/\p{Lt}|\p{Lm}|\p{Lo}/u;var jx=Object.fromEntries(["XID_Start","XID_Continue","White_Space"].map(t=>[t,nk(t)])),he=class t{constructor(){if(this.constructor===t)throw new Error("PExpr cannot be instantiated -- it's abstract")}withSource(e){return e&&(this.source=e.trimmed()),this}},Mt=Object.create(he.prototype),Dt=Object.create(he.prototype),ht=class extends he{constructor(e){super(),this.obj=e}},vt=class extends he{constructor(e,r){super(),this.from=e,this.to=r,this.matchCodePoint=e.length>1||r.length>1}},bt=class extends he{constructor(e){super(),this.index=e}},et=class extends he{constructor(e){super(),this.terms=e}},ps=class extends et{constructor(e,r,i){let n=e.rules[r].body;super([i,n]),this.superGrammar=e,this.name=r,this.body=i}},hs=class extends et{constructor(e,r,i,n){let s=e.rules[r].body;super([...i,s,...n]),this.superGrammar=e,this.ruleName=r,this.expansionPos=i.length}},at=class extends he{constructor(e){super(),this.factors=e}},Et=class extends he{constructor(e){super(),this.expr=e}},Ii=class extends Et{},zi=class extends Et{},Wr=class extends Et{};Ii.prototype.operator="*";zi.prototype.operator="+";Wr.prototype.operator="?";Ii.prototype.minNumMatches=0;zi.prototype.minNumMatches=1;Wr.prototype.minNumMatches=0;Ii.prototype.maxNumMatches=Number.POSITIVE_INFINITY;zi.prototype.maxNumMatches=Number.POSITIVE_INFINITY;Wr.prototype.maxNumMatches=1;var ft=class extends he{constructor(e){super(),this.expr=e}},Ot=class extends he{constructor(e){super(),this.expr=e}},Rt=class extends he{constructor(e){super(),this.expr=e}},ke=class extends he{constructor(e,r=[]){super(),this.ruleName=e,this.args=r}isSyntactic(){return fs(this.ruleName)}toMemoKey(){return this._memoKey||Object.defineProperty(this,"_memoKey",{value:this.toString()}),this._memoKey}},pt=class extends he{constructor(e){if(super(),this.categoryOrProp=e,e in Xg)this.pattern=Xg[e];else if(e in jx)this.pattern=jx[e];else throw new Error(`Invalid Unicode category or property name: ${JSON.stringify(e)}`)}};function tt(t,e){let r;return e?(r=new Error(e.getLineAndColumnMessage()+t),r.shortMessage=t,r.interval=e):r=new Error(t),r}function Zg(){return tt("Interval sources don't match")}function dj(t){let e=new Error;return Object.defineProperty(e,"message",{enumerable:!0,get(){return t.message}}),Object.defineProperty(e,"shortMessage",{enumerable:!0,get(){return"Expected "+t.getExpectedText()}}),e.interval=t.getInterval(),e}function mj(t,e,r){let i=e?`Grammar ${t} is not declared in namespace '${e}'`:"Undeclared grammar "+t;return tt(i,r)}function gj(t,e){return tt("Grammar "+t.name+" is already declared in this namespace")}function yj(t){return tt(`Grammar '${t.name}' does not support incremental parsing`)}function sk(t,e,r){return tt("Rule "+t+" is not declared in grammar "+e,r)}function _j(t,e,r){return tt("Cannot override rule "+t+" because it is not declared in "+e,r)}function vj(t,e,r){return tt("Cannot extend rule "+t+" because it is not declared in "+e,r)}function Bx(t,e,r,i){let n="Duplicate declaration for rule '"+t+"' in grammar '"+e+"'";return e!==r&&(n+=" (originally declared in '"+r+"')"),tt(n,i)}function ak(t,e,r,i){return tt("Wrong number of parameters for rule "+t+" (expected "+e+", got "+r+")",i)}function bj(t,e,r,i){return tt("Wrong number of arguments for rule "+t+" (expected "+e+", got "+r+")",i)}function Vx(t,e,r){return tt("Duplicate parameter names in rule "+t+": "+e.join(", "),r)}function Sj(t,e){return tt("Invalid parameter to rule "+t+": "+e+" has arity "+e.getArity()+", but parameter expressions must have arity 1",e.source)}var wj="NOTE: A _syntactic rule_ is a rule whose name begins with a capital letter. See https://ohmjs.org/d/svl for more details.";function xj(t,e){return tt("Cannot apply syntactic rule "+t+" from here (inside a lexical context)",e.source)}function kj(t){let{ruleName:e}=t;return tt(`applySyntactic is for syntactic rules, but '${e}' is a lexical rule. `+wj,t.source)}function Ij(t){return tt("applySyntactic is not required here (in a syntactic context)",t.source)}function $x(t,e){return tt("Incorrect argument type: expected "+t,e.source)}function Aj(t){return tt("'...' can appear at most once in a rule body",t.source)}function Tj(t){let e=t._node;yn(e&&e.isNonterminal()&&e.ctorName==="escapeChar_unicodeCodePoint");let r=t.children.slice(1,-1).map(n=>n.source),i=r[0].coverageWith(...r.slice(1));return tt(`U+${i.contents} is not a valid Unicode code point`,i)}function ok(t,e){let r=e.length>0?e[e.length-1].args:[],n="Nullable expression "+t.expr.substituteParams(r)+" is not allowed inside '"+t.operator+"' (possible infinite loop)";if(e.length>0){let s=e.map(a=>new ke(a.ruleName,a.args)).join(`
|
|
301
|
+
`);n+=`
|
|
302
|
+
Application stack (most recent application last):
|
|
303
|
+
`+s}return tt(n,t.expr.source)}function uk(t,e,r,i){return tt("Rule "+t+" involves an alternation which has inconsistent arity (expected "+e+", got "+r+")",i.source)}function Ej(t){let e=t.map(r=>r.message);return tt(["Errors:"].concat(e).join(`
|
|
304
|
+
- `),t[0].interval)}function Oj(t,e,r,i){let n=i.slice(0,-1).map(u=>{let l=" "+u[0].name+" > "+u[1];return u.length===3?l+" for '"+u[2]+"'":l}).join(`
|
|
305
|
+
`);n+=`
|
|
306
|
+
`+e+" > "+t;let s="";t==="_iter"&&(s=[`
|
|
307
|
+
NOTE: as of Ohm v16, there is no default action for iteration nodes \u2014 see `," https://ohmjs.org/d/dsa for details."].join(`
|
|
308
|
+
`));let a=[`Missing semantic action for '${t}' in ${r} '${e}'.${s}`,"Action stack (most recent call last):",n].join(`
|
|
309
|
+
`),o=tt(a);return o.name="missingSemanticAction",o}function Nj(t){if(t.length===1)throw t[0];if(t.length>1)throw Ej(t)}function Lj(t){let e=0;return t.map(i=>{let n=i.toString();return e=Math.max(e,n.length),n}).map(i=>tk(i,e))}function Ux(t,e,r){let i=t.length,n=t.slice(0,r),s=t.slice(r+e.length);return(n+e+s).substr(0,i)}function Pj(...t){let e=this,{offset:r}=e,{repeatStr:i}=hj,n=new gs;n.append("Line "+e.lineNum+", col "+e.colNum+`:
|
|
310
|
+
`);let s=Lj([e.prevLine==null?0:e.lineNum-1,e.lineNum,e.nextLine==null?0:e.lineNum+1]),a=(f,h,p)=>{n.append(p+s[f]+" | "+h+`
|
|
311
|
+
`)};e.prevLine!=null&&a(0,e.prevLine," "),a(1,e.line,"> ");let o=e.line.length,u=i(" ",o+1);for(let f=0;f<t.length;++f){let h=t[f][0],p=t[f][1];yn(h>=0&&h<=p,"range start must be >= 0 and <= end");let m=r-e.colNum+1;h=Math.max(0,h-m),p=Math.min(p-m,o),u=Ux(u,i("~",p-h),h)}let l=2+s[1].length+3;return n.append(i(" ",l)),u=Ux(u,"^",e.colNum-1),n.append(u.replace(/ +$/,"")+`
|
|
312
|
+
`),e.nextLine!=null&&a(2,e.nextLine," "),n.contents()}var ey=[];function ck(t){ey.push(t)}function qj(t){ey.forEach(e=>{e(t)}),ey=null}function cy(t,e){let r=1,i=1,n=0,s=0,a=null,o=null,u=-1;for(;n<e;){let h=t.charAt(n++);h===`
|
|
313
|
+
`?(r++,i=1,u=s,s=n):h!=="\r"&&i++}let l=t.indexOf(`
|
|
314
|
+
`,s);if(l===-1)l=t.length;else{let h=t.indexOf(`
|
|
315
|
+
`,l+1);a=h===-1?t.slice(l):t.slice(l,h),a=a.replace(/^\r?\n/,"").replace(/\r$/,"")}u>=0&&(o=t.slice(u,s).replace(/\r?\n$/,""));let f=t.slice(s,l).replace(/\r$/,"");return{offset:e,lineNum:r,colNum:i,line:f,prevLine:o,nextLine:a,toString:Pj}}function ly(t,e,...r){return cy(t,e).toString(...r)}var Hx=(()=>{let t=0;return e=>""+e+t++})(),ds=class t{constructor(e,r,i){Object.defineProperty(this,"_sourceString",{value:e,configurable:!1,enumerable:!1,writable:!1}),this.startIdx=r,this.endIdx=i}get sourceString(){return this._sourceString}get contents(){return this._contents===void 0&&(this._contents=this.sourceString.slice(this.startIdx,this.endIdx)),this._contents}get length(){return this.endIdx-this.startIdx}coverageWith(...e){return t.coverage(...e,this)}collapsedLeft(){return new t(this.sourceString,this.startIdx,this.startIdx)}collapsedRight(){return new t(this.sourceString,this.endIdx,this.endIdx)}getLineAndColumn(){return cy(this.sourceString,this.startIdx)}getLineAndColumnMessage(){let e=[this.startIdx,this.endIdx];return ly(this.sourceString,this.startIdx,e)}minus(e){if(this.sourceString!==e.sourceString)throw Zg();return this.startIdx===e.startIdx&&this.endIdx===e.endIdx?[]:this.startIdx<e.startIdx&&e.endIdx<this.endIdx?[new t(this.sourceString,this.startIdx,e.startIdx),new t(this.sourceString,e.endIdx,this.endIdx)]:this.startIdx<e.endIdx&&e.endIdx<this.endIdx?[new t(this.sourceString,e.endIdx,this.endIdx)]:this.startIdx<e.startIdx&&e.startIdx<this.endIdx?[new t(this.sourceString,this.startIdx,e.startIdx)]:[this]}relativeTo(e){if(this.sourceString!==e.sourceString)throw Zg();return yn(this.startIdx>=e.startIdx&&this.endIdx<=e.endIdx,"other interval does not cover this one"),new t(this.sourceString,this.startIdx-e.startIdx,this.endIdx-e.startIdx)}trimmed(){let{contents:e}=this,r=this.startIdx+e.match(/^\s*/)[0].length,i=this.endIdx-e.match(/\s*$/)[0].length;return new t(this.sourceString,r,i)}subInterval(e,r){let i=this.startIdx+e;return new t(this.sourceString,i,i+r)}};ds.coverage=function(t,...e){let{startIdx:r,endIdx:i}=t;for(let n of e){if(n.sourceString!==t.sourceString)throw Zg();r=Math.min(r,n.startIdx),i=Math.max(i,n.endIdx)}return new ds(t.sourceString,r,i)};var Cj=65535,Rj=1114111,ga=class{constructor(e){this.source=e,this.pos=0,this.examinedLength=0}atEnd(){let e=this.pos>=this.source.length;return this.examinedLength=Math.max(this.examinedLength,this.pos+1),e}next(){let e=this.source[this.pos++];return this.examinedLength=Math.max(this.examinedLength,this.pos),e}nextCharCode(){let e=this.next();return e&&e.charCodeAt(0)}nextCodePoint(){let e=this.source.slice(this.pos++).codePointAt(0);return e>Cj&&(this.pos+=1),this.examinedLength=Math.max(this.examinedLength,this.pos),e}matchString(e,r){let i;if(r){for(i=0;i<e.length;i++){let n=this.next(),s=e[i];if(n==null||n.toUpperCase()!==s.toUpperCase())return!1}return!0}for(i=0;i<e.length;i++)if(this.next()!==e[i])return!1;return!0}sourceSlice(e,r){return this.source.slice(e,r)}interval(e,r){return new ds(this.source,e,r||this.pos)}},Nl=class{constructor(e,r,i,n,s,a,o){this.matcher=e,this.input=r,this.startExpr=i,this._cst=n,this._cstOffset=s,this._rightmostFailurePosition=a,this._rightmostFailures=o,this.failed()&&(Qg(this,"message",function(){let u="Expected "+this.getExpectedText();return ly(this.input,this.getRightmostFailurePosition())+u}),Qg(this,"shortMessage",function(){let u="expected "+this.getExpectedText(),l=cy(this.input,this.getRightmostFailurePosition());return"Line "+l.lineNum+", col "+l.colNum+": "+u}))}succeeded(){return!!this._cst}failed(){return!this.succeeded()}getRightmostFailurePosition(){return this._rightmostFailurePosition}getRightmostFailures(){if(!this._rightmostFailures){this.matcher.setInput(this.input);let e=this.matcher._match(this.startExpr,{tracing:!1,positionToRecordFailures:this.getRightmostFailurePosition()});this._rightmostFailures=e.getRightmostFailures()}return this._rightmostFailures}toString(){return this.succeeded()?"[match succeeded]":"[match failed at position "+this.getRightmostFailurePosition()+"]"}getExpectedText(){if(this.succeeded())throw new Error("cannot get expected text of a successful MatchResult");let e=new gs,r=this.getRightmostFailures();r=r.filter(i=>!i.isFluffy());for(let i=0;i<r.length;i++)i>0&&(i===r.length-1?e.append(r.length>2?", or ":" or "):e.append(", ")),e.append(r[i].toString());return e.contents()}getInterval(){let e=this.getRightmostFailurePosition();return new ds(this.input,e,e)}},ty=class{constructor(){this.applicationMemoKeyStack=[],this.memo={},this.maxExaminedLength=0,this.maxRightmostFailureOffset=-1,this.currentLeftRecursion=void 0}isActive(e){return this.applicationMemoKeyStack.indexOf(e.toMemoKey())>=0}enter(e){this.applicationMemoKeyStack.push(e.toMemoKey())}exit(){this.applicationMemoKeyStack.pop()}startLeftRecursion(e,r){r.isLeftRecursion=!0,r.headApplication=e,r.nextLeftRecursion=this.currentLeftRecursion,this.currentLeftRecursion=r;let{applicationMemoKeyStack:i}=this,n=i.indexOf(e.toMemoKey())+1,s=i.slice(n);r.isInvolved=function(a){return s.indexOf(a)>=0},r.updateInvolvedApplicationMemoKeys=function(){for(let a=n;a<i.length;a++){let o=i[a];this.isInvolved(o)||s.push(o)}}}endLeftRecursion(){this.currentLeftRecursion=this.currentLeftRecursion.nextLeftRecursion}shouldUseMemoizedResult(e){if(!e.isLeftRecursion)return!0;let{applicationMemoKeyStack:r}=this;for(let i=0;i<r.length;i++){let n=r[i];if(e.isInvolved(n))return!1}return!0}memoize(e,r){return this.memo[e]=r,this.maxExaminedLength=Math.max(this.maxExaminedLength,r.examinedLength),this.maxRightmostFailureOffset=Math.max(this.maxRightmostFailureOffset,r.rightmostFailureOffset),r}clearObsoleteEntries(e,r){if(e+this.maxExaminedLength<=r)return;let{memo:i}=this;this.maxExaminedLength=0,this.maxRightmostFailureOffset=-1,Object.keys(i).forEach(n=>{let s=i[n];e+s.examinedLength>r?delete i[n]:(this.maxExaminedLength=Math.max(this.maxExaminedLength,s.examinedLength),this.maxRightmostFailureOffset=Math.max(this.maxRightmostFailureOffset,s.rightmostFailureOffset))})}},Mj="\u2717",Dj="\u2713",Fj="\u22C5",jj="\u21D2",Bj="\u2409",Vj="\u240A",$j="\u240D",ry={succeeded:1,isRootNode:2,isImplicitSpaces:4,isMemoized:8,isHeadOfLeftRecursion:16,terminatesLR:32};function Uj(t){return Dl(" ",t).join("")}function Hj(t,e,r){let i=lk(t.slice(e,e+r));return i.length<r?i+Dl(" ",r-i.length).join(""):i}function lk(t){return typeof t=="string"?t.replace(/ /g,Fj).replace(/\t/g,Bj).replace(/\n/g,Vj).replace(/\r/g,$j):String(t)}var ya=class t{constructor(e,r,i,n,s,a,o){this.input=e,this.pos=this.pos1=r,this.pos2=i,this.source=new ds(e,r,i),this.expr=n,this.bindings=a,this.children=o||[],this.terminatingLREntry=null,this._flags=s?ry.succeeded:0}get displayString(){return this.expr.toDisplayString()}clone(){return this.cloneWithExpr(this.expr)}cloneWithExpr(e){let r=new t(this.input,this.pos,this.pos2,e,this.succeeded,this.bindings,this.children);return r.isHeadOfLeftRecursion=this.isHeadOfLeftRecursion,r.isImplicitSpaces=this.isImplicitSpaces,r.isMemoized=this.isMemoized,r.isRootNode=this.isRootNode,r.terminatesLR=this.terminatesLR,r.terminatingLREntry=this.terminatingLREntry,r}recordLRTermination(e,r){this.terminatingLREntry=new t(this.input,this.pos,this.pos2,this.expr,!1,[r],[e]),this.terminatingLREntry.terminatesLR=!0}walk(e,r){let i=e;typeof i=="function"&&(i={enter:i});function n(s,a,o){let u=!0;i.enter&&i.enter.call(r,s,a,o)===t.prototype.SKIP&&(u=!1),u&&(s.children.forEach(l=>{n(l,s,o+1)}),i.exit&&i.exit.call(r,s,a,o))}this.isRootNode?this.children.forEach(s=>{n(s,null,0)}):n(this,null,0)}toString(){let e=new gs;return this.walk((r,i,n)=>{if(!r)return this.SKIP;if(r.expr.constructor.name!=="Alt"){if(e.append(Hj(r.input,r.pos,10)+Uj(n*2+1)),e.append((r.succeeded?Dj:Mj)+" "+r.displayString),r.isHeadOfLeftRecursion&&e.append(" (LR)"),r.succeeded){let a=lk(r.source.contents);e.append(" "+jj+" "),e.append(typeof a=="string"?'"'+a+'"':a)}e.append(`
|
|
316
|
+
`)}}),e.contents()}};ya.prototype.SKIP={};Object.keys(ry).forEach(t=>{let e=ry[t];Object.defineProperty(ya.prototype,t,{get(){return(this._flags&e)!==0},set(r){r?this._flags|=e:this._flags&=~e}})});he.prototype.allowsSkippingPrecedingSpace=or("allowsSkippingPrecedingSpace");Mt.allowsSkippingPrecedingSpace=Dt.allowsSkippingPrecedingSpace=ke.prototype.allowsSkippingPrecedingSpace=ht.prototype.allowsSkippingPrecedingSpace=vt.prototype.allowsSkippingPrecedingSpace=pt.prototype.allowsSkippingPrecedingSpace=function(){return!0};et.prototype.allowsSkippingPrecedingSpace=Et.prototype.allowsSkippingPrecedingSpace=Rt.prototype.allowsSkippingPrecedingSpace=Ot.prototype.allowsSkippingPrecedingSpace=ft.prototype.allowsSkippingPrecedingSpace=bt.prototype.allowsSkippingPrecedingSpace=at.prototype.allowsSkippingPrecedingSpace=function(){return!1};var Uo;ck(t=>{Uo=t});var Ll;he.prototype.assertAllApplicationsAreValid=function(t,e){Ll=0,this._assertAllApplicationsAreValid(t,e)};he.prototype._assertAllApplicationsAreValid=or("_assertAllApplicationsAreValid");Mt._assertAllApplicationsAreValid=Dt._assertAllApplicationsAreValid=ht.prototype._assertAllApplicationsAreValid=vt.prototype._assertAllApplicationsAreValid=bt.prototype._assertAllApplicationsAreValid=pt.prototype._assertAllApplicationsAreValid=function(t,e){};Rt.prototype._assertAllApplicationsAreValid=function(t,e){Ll++,this.expr._assertAllApplicationsAreValid(t,e),Ll--};et.prototype._assertAllApplicationsAreValid=function(t,e){for(let r=0;r<this.terms.length;r++)this.terms[r]._assertAllApplicationsAreValid(t,e)};at.prototype._assertAllApplicationsAreValid=function(t,e){for(let r=0;r<this.factors.length;r++)this.factors[r]._assertAllApplicationsAreValid(t,e)};Et.prototype._assertAllApplicationsAreValid=ft.prototype._assertAllApplicationsAreValid=Ot.prototype._assertAllApplicationsAreValid=function(t,e){this.expr._assertAllApplicationsAreValid(t,e)};ke.prototype._assertAllApplicationsAreValid=function(t,e,r=!1){let i=e.rules[this.ruleName],n=fs(t)&&Ll===0;if(!i)throw sk(this.ruleName,e.name,this.source);if(!r&&fs(this.ruleName)&&!n)throw xj(this.ruleName,this);let s=this.args.length,a=i.formals.length;if(s!==a)throw bj(this.ruleName,a,s,this.source);let o=Uo&&i===Uo.rules.applySyntactic;if(Uo&&i===Uo.rules.caseInsensitive&&!(this.args[0]instanceof ht))throw $x('a Terminal (e.g. "abc")',this.args[0]);if(o){let l=this.args[0];if(!(l instanceof ke))throw $x("a syntactic rule application",l);if(!fs(l.ruleName))throw kj(l);if(n)throw Ij(this)}this.args.forEach(l=>{if(l._assertAllApplicationsAreValid(t,e,o),l.getArity()!==1)throw Sj(this.ruleName,l)})};he.prototype.assertChoicesHaveUniformArity=or("assertChoicesHaveUniformArity");Mt.assertChoicesHaveUniformArity=Dt.assertChoicesHaveUniformArity=ht.prototype.assertChoicesHaveUniformArity=vt.prototype.assertChoicesHaveUniformArity=bt.prototype.assertChoicesHaveUniformArity=Rt.prototype.assertChoicesHaveUniformArity=pt.prototype.assertChoicesHaveUniformArity=function(t){};et.prototype.assertChoicesHaveUniformArity=function(t){if(this.terms.length===0)return;let e=this.terms[0].getArity();for(let r=0;r<this.terms.length;r++){let i=this.terms[r];i.assertChoicesHaveUniformArity();let n=i.getArity();if(e!==n)throw uk(t,e,n,i)}};ps.prototype.assertChoicesHaveUniformArity=function(t){let e=this.terms[0].getArity(),r=this.terms[1].getArity();if(e!==r)throw uk(t,r,e,this.terms[0])};at.prototype.assertChoicesHaveUniformArity=function(t){for(let e=0;e<this.factors.length;e++)this.factors[e].assertChoicesHaveUniformArity(t)};Et.prototype.assertChoicesHaveUniformArity=function(t){this.expr.assertChoicesHaveUniformArity(t)};ft.prototype.assertChoicesHaveUniformArity=function(t){};Ot.prototype.assertChoicesHaveUniformArity=function(t){this.expr.assertChoicesHaveUniformArity(t)};ke.prototype.assertChoicesHaveUniformArity=function(t){};he.prototype.assertIteratedExprsAreNotNullable=or("assertIteratedExprsAreNotNullable");Mt.assertIteratedExprsAreNotNullable=Dt.assertIteratedExprsAreNotNullable=ht.prototype.assertIteratedExprsAreNotNullable=vt.prototype.assertIteratedExprsAreNotNullable=bt.prototype.assertIteratedExprsAreNotNullable=pt.prototype.assertIteratedExprsAreNotNullable=function(t){};et.prototype.assertIteratedExprsAreNotNullable=function(t){for(let e=0;e<this.terms.length;e++)this.terms[e].assertIteratedExprsAreNotNullable(t)};at.prototype.assertIteratedExprsAreNotNullable=function(t){for(let e=0;e<this.factors.length;e++)this.factors[e].assertIteratedExprsAreNotNullable(t)};Et.prototype.assertIteratedExprsAreNotNullable=function(t){if(this.expr.assertIteratedExprsAreNotNullable(t),this.expr.isNullable(t))throw ok(this,[])};Wr.prototype.assertIteratedExprsAreNotNullable=ft.prototype.assertIteratedExprsAreNotNullable=Ot.prototype.assertIteratedExprsAreNotNullable=Rt.prototype.assertIteratedExprsAreNotNullable=function(t){this.expr.assertIteratedExprsAreNotNullable(t)};ke.prototype.assertIteratedExprsAreNotNullable=function(t){this.args.forEach(e=>{e.assertIteratedExprsAreNotNullable(t)})};var Go=class{constructor(e){this.matchLength=e}get ctorName(){throw new Error("subclass responsibility")}numChildren(){return this.children?this.children.length:0}childAt(e){if(this.children)return this.children[e]}indexOfChild(e){return this.children.indexOf(e)}hasChildren(){return this.numChildren()>0}hasNoChildren(){return!this.hasChildren()}onlyChild(){if(this.numChildren()!==1)throw new Error("cannot get only child of a node of type "+this.ctorName+" (it has "+this.numChildren()+" children)");return this.firstChild()}firstChild(){if(this.hasNoChildren())throw new Error("cannot get first child of a "+this.ctorName+" node, which has no children");return this.childAt(0)}lastChild(){if(this.hasNoChildren())throw new Error("cannot get last child of a "+this.ctorName+" node, which has no children");return this.childAt(this.numChildren()-1)}childBefore(e){let r=this.indexOfChild(e);if(r<0)throw new Error("Node.childBefore() called w/ an argument that is not a child");if(r===0)throw new Error("cannot get child before first child");return this.childAt(r-1)}childAfter(e){let r=this.indexOfChild(e);if(r<0)throw new Error("Node.childAfter() called w/ an argument that is not a child");if(r===this.numChildren()-1)throw new Error("cannot get child after last child");return this.childAt(r+1)}isTerminal(){return!1}isNonterminal(){return!1}isIteration(){return!1}isOptional(){return!1}},Ji=class extends Go{get ctorName(){return"_terminal"}isTerminal(){return!0}get primitiveValue(){throw new Error("The `primitiveValue` property was removed in Ohm v17.")}},iy=class extends Go{constructor(e,r,i,n){super(n),this.ruleName=e,this.children=r,this.childOffsets=i}get ctorName(){return this.ruleName}isNonterminal(){return!0}isLexical(){return ek(this.ctorName)}isSyntactic(){return fs(this.ctorName)}},Pl=class extends Go{constructor(e,r,i,n){super(i),this.children=e,this.childOffsets=r,this.optional=n}get ctorName(){return"_iter"}isIteration(){return!0}isOptional(){return this.optional}};he.prototype.eval=or("eval");Mt.eval=function(t){let{inputStream:e}=t,r=e.pos,i=e.nextCodePoint();return i!==void 0?(t.pushBinding(new Ji(String.fromCodePoint(i).length),r),!0):(t.processFailure(r,this),!1)};Dt.eval=function(t){let{inputStream:e}=t,r=e.pos;return e.atEnd()?(t.pushBinding(new Ji(0),r),!0):(t.processFailure(r,this),!1)};ht.prototype.eval=function(t){let{inputStream:e}=t,r=e.pos;return e.matchString(this.obj)?(t.pushBinding(new Ji(this.obj.length),r),!0):(t.processFailure(r,this),!1)};vt.prototype.eval=function(t){let{inputStream:e}=t,r=e.pos,i=this.matchCodePoint?e.nextCodePoint():e.nextCharCode();return i!==void 0&&this.from.codePointAt(0)<=i&&i<=this.to.codePointAt(0)?(t.pushBinding(new Ji(String.fromCodePoint(i).length),r),!0):(t.processFailure(r,this),!1)};bt.prototype.eval=function(t){return t.eval(t.currentApplication().args[this.index])};Rt.prototype.eval=function(t){t.enterLexifiedContext();let e=t.eval(this.expr);return t.exitLexifiedContext(),e};et.prototype.eval=function(t){for(let e=0;e<this.terms.length;e++)if(t.eval(this.terms[e]))return!0;return!1};at.prototype.eval=function(t){for(let e=0;e<this.factors.length;e++){let r=this.factors[e];if(!t.eval(r))return!1}return!0};Et.prototype.eval=function(t){let{inputStream:e}=t,r=e.pos,i=this.getArity(),n=[],s=[];for(;n.length<i;)n.push([]),s.push([]);let a=0,o=r,u;for(;a<this.maxNumMatches&&t.eval(this.expr);){if(e.pos===o)throw ok(this,t._applicationStack);o=e.pos,a++;let p=t._bindings.splice(t._bindings.length-i,i),m=t._bindingOffsets.splice(t._bindingOffsets.length-i,i);for(u=0;u<p.length;u++)n[u].push(p[u]),s[u].push(m[u])}if(a<this.minNumMatches)return!1;let l=t.posToOffset(r),f=0;if(a>0){let p=n[i-1],m=s[i-1],v=m[m.length-1]+p[p.length-1].matchLength;l=s[0][0],f=v-l}let h=this instanceof Wr;for(u=0;u<n.length;u++)t._bindings.push(new Pl(n[u],s[u],f,h)),t._bindingOffsets.push(l);return!0};ft.prototype.eval=function(t){let{inputStream:e}=t,r=e.pos;t.pushFailuresInfo();let i=t.eval(this.expr);return t.popFailuresInfo(),i?(t.processFailure(r,this),!1):(e.pos=r,!0)};Ot.prototype.eval=function(t){let{inputStream:e}=t,r=e.pos;return t.eval(this.expr)?(e.pos=r,!0):!1};ke.prototype.eval=function(t){let e=t.currentApplication(),r=e?e.args:[],i=this.substituteParams(r),n=t.getCurrentPosInfo();if(n.isActive(i))return i.handleCycle(t);let s=i.toMemoKey(),a=n.memo[s];if(a&&n.shouldUseMemoizedResult(a)){if(t.hasNecessaryInfo(a))return t.useMemoizedResult(t.inputStream.pos,a);delete n.memo[s]}return i.reallyEval(t)};ke.prototype.handleCycle=function(t){let e=t.getCurrentPosInfo(),{currentLeftRecursion:r}=e,i=this.toMemoKey(),n=e.memo[i];return r&&r.headApplication.toMemoKey()===i?n.updateInvolvedApplicationMemoKeys():n||(n=e.memoize(i,{matchLength:0,examinedLength:0,value:!1,rightmostFailureOffset:-1}),e.startLeftRecursion(this,n)),t.useMemoizedResult(t.inputStream.pos,n)};ke.prototype.reallyEval=function(t){let{inputStream:e}=t,r=e.pos,i=t.getCurrentPosInfo(),n=t.grammar.rules[this.ruleName],{body:s}=n,{description:a}=n;t.enterApplication(i,this),a&&t.pushFailuresInfo();let o=e.examinedLength;e.examinedLength=0;let u=this.evalOnce(s,t),l=i.currentLeftRecursion,f=this.toMemoKey(),h=l&&l.headApplication.toMemoKey()===f,p;t.doNotMemoize?t.doNotMemoize=!1:h?(u=this.growSeedResult(s,t,r,l,u),i.endLeftRecursion(),p=l,p.examinedLength=e.examinedLength-r,p.rightmostFailureOffset=t._getRightmostFailureOffset(),i.memoize(f,p)):(!l||!l.isInvolved(f))&&(p=i.memoize(f,{matchLength:e.pos-r,examinedLength:e.examinedLength-r,value:u,failuresAtRightmostPosition:t.cloneRecordedFailures(),rightmostFailureOffset:t._getRightmostFailureOffset()}));let m=!!u;if(a&&(t.popFailuresInfo(),m||t.processFailure(r,this),p&&(p.failuresAtRightmostPosition=t.cloneRecordedFailures(),p.rightmostFailureOffset=t._getRightmostFailureOffset())),t.isTracing()&&p){let v=t.getTraceEntry(r,this,m,m?[u]:[]);h&&(yn(v.terminatingLREntry!=null||!m),v.isHeadOfLeftRecursion=!0),p.traceEntry=v}return e.examinedLength=Math.max(e.examinedLength,o),t.exitApplication(i,u),m};ke.prototype.evalOnce=function(t,e){let{inputStream:r}=e,i=r.pos;if(e.eval(t)){let n=t.getArity(),s=e._bindings.splice(e._bindings.length-n,n),a=e._bindingOffsets.splice(e._bindingOffsets.length-n,n),o=r.pos-i;return new iy(this.ruleName,s,a,o)}else return!1};ke.prototype.growSeedResult=function(t,e,r,i,n){if(!n)return!1;let{inputStream:s}=e;for(;;){if(i.matchLength=s.pos-r,i.value=n,i.failuresAtRightmostPosition=e.cloneRecordedFailures(),e.isTracing()){let a=e.trace[e.trace.length-1];i.traceEntry=new ya(e.input,r,s.pos,this,!0,[n],[a.clone()])}if(s.pos=r,n=this.evalOnce(t,e),s.pos-r<=i.matchLength)break;e.isTracing()&&e.trace.splice(-2,1)}return e.isTracing()&&i.traceEntry.recordLRTermination(e.trace.pop(),n),s.pos=r+i.matchLength,i.value};pt.prototype.eval=function(t){let{inputStream:e}=t,r=e.pos,i=e.nextCodePoint();if(i!==void 0&&i<=Rj){let n=String.fromCodePoint(i);if(this.pattern.test(n))return t.pushBinding(new Ji(n.length),r),!0}return t.processFailure(r,this),!1};he.prototype.getArity=or("getArity");Mt.getArity=Dt.getArity=ht.prototype.getArity=vt.prototype.getArity=bt.prototype.getArity=ke.prototype.getArity=pt.prototype.getArity=function(){return 1};et.prototype.getArity=function(){return this.terms.length===0?0:this.terms[0].getArity()};at.prototype.getArity=function(){let t=0;for(let e=0;e<this.factors.length;e++)t+=this.factors[e].getArity();return t};Et.prototype.getArity=function(){return this.expr.getArity()};ft.prototype.getArity=function(){return 0};Ot.prototype.getArity=Rt.prototype.getArity=function(){return this.expr.getArity()};function ci(t,e){let r={};if(t.source&&e){let i=t.source.relativeTo(e);r.sourceInterval=[i.startIdx,i.endIdx]}return r}he.prototype.outputRecipe=or("outputRecipe");Mt.outputRecipe=function(t,e){return["any",ci(this,e)]};Dt.outputRecipe=function(t,e){return["end",ci(this,e)]};ht.prototype.outputRecipe=function(t,e){return["terminal",ci(this,e),this.obj]};vt.prototype.outputRecipe=function(t,e){return["range",ci(this,e),this.from,this.to]};bt.prototype.outputRecipe=function(t,e){return["param",ci(this,e),this.index]};et.prototype.outputRecipe=function(t,e){return["alt",ci(this,e)].concat(this.terms.map(r=>r.outputRecipe(t,e)))};ps.prototype.outputRecipe=function(t,e){return this.terms[0].outputRecipe(t,e)};hs.prototype.outputRecipe=function(t,e){let r=this.terms.slice(0,this.expansionPos),i=this.terms.slice(this.expansionPos+1);return["splice",ci(this,e),r.map(n=>n.outputRecipe(t,e)),i.map(n=>n.outputRecipe(t,e))]};at.prototype.outputRecipe=function(t,e){return["seq",ci(this,e)].concat(this.factors.map(r=>r.outputRecipe(t,e)))};Ii.prototype.outputRecipe=zi.prototype.outputRecipe=Wr.prototype.outputRecipe=ft.prototype.outputRecipe=Ot.prototype.outputRecipe=Rt.prototype.outputRecipe=function(t,e){return[this.constructor.name.toLowerCase(),ci(this,e),this.expr.outputRecipe(t,e)]};ke.prototype.outputRecipe=function(t,e){return["app",ci(this,e),this.ruleName,this.args.map(r=>r.outputRecipe(t,e))]};pt.prototype.outputRecipe=function(t,e){return["unicodeChar",ci(this,e),this.categoryOrProp]};he.prototype.introduceParams=or("introduceParams");Mt.introduceParams=Dt.introduceParams=ht.prototype.introduceParams=vt.prototype.introduceParams=bt.prototype.introduceParams=pt.prototype.introduceParams=function(t){return this};et.prototype.introduceParams=function(t){return this.terms.forEach((e,r,i)=>{i[r]=e.introduceParams(t)}),this};at.prototype.introduceParams=function(t){return this.factors.forEach((e,r,i)=>{i[r]=e.introduceParams(t)}),this};Et.prototype.introduceParams=ft.prototype.introduceParams=Ot.prototype.introduceParams=Rt.prototype.introduceParams=function(t){return this.expr=this.expr.introduceParams(t),this};ke.prototype.introduceParams=function(t){let e=t.indexOf(this.ruleName);if(e>=0){if(this.args.length>0)throw new Error("Parameterized rules cannot be passed as arguments to another rule.");return new bt(e).withSource(this.source)}else return this.args.forEach((r,i,n)=>{n[i]=r.introduceParams(t)}),this};he.prototype.isNullable=function(t){return this._isNullable(t,Object.create(null))};he.prototype._isNullable=or("_isNullable");Mt._isNullable=vt.prototype._isNullable=bt.prototype._isNullable=zi.prototype._isNullable=pt.prototype._isNullable=function(t,e){return!1};Dt._isNullable=function(t,e){return!0};ht.prototype._isNullable=function(t,e){return typeof this.obj=="string"?this.obj==="":!1};et.prototype._isNullable=function(t,e){return this.terms.length===0||this.terms.some(r=>r._isNullable(t,e))};at.prototype._isNullable=function(t,e){return this.factors.every(r=>r._isNullable(t,e))};Ii.prototype._isNullable=Wr.prototype._isNullable=ft.prototype._isNullable=Ot.prototype._isNullable=function(t,e){return!0};Rt.prototype._isNullable=function(t,e){return this.expr._isNullable(t,e)};ke.prototype._isNullable=function(t,e){let r=this.toMemoKey();if(!Object.prototype.hasOwnProperty.call(e,r)){let{body:i}=t.rules[this.ruleName],n=i.substituteParams(this.args);e[r]=!1,e[r]=n._isNullable(t,e)}return e[r]};he.prototype.substituteParams=or("substituteParams");Mt.substituteParams=Dt.substituteParams=ht.prototype.substituteParams=vt.prototype.substituteParams=pt.prototype.substituteParams=function(t){return this};bt.prototype.substituteParams=function(t){return ik(t[this.index])};et.prototype.substituteParams=function(t){return new et(this.terms.map(e=>e.substituteParams(t)))};at.prototype.substituteParams=function(t){return new at(this.factors.map(e=>e.substituteParams(t)))};Et.prototype.substituteParams=ft.prototype.substituteParams=Ot.prototype.substituteParams=Rt.prototype.substituteParams=function(t){return new this.constructor(this.expr.substituteParams(t))};ke.prototype.substituteParams=function(t){if(this.args.length===0)return this;{let e=this.args.map(r=>r.substituteParams(t));return new ke(this.ruleName,e)}};function Gx(t){return/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(t)}function fy(t){let e=Object.create(null);t.forEach(r=>{e[r]=(e[r]||0)+1}),Object.keys(e).forEach(r=>{if(e[r]<=1)return;let i=1;t.forEach((n,s)=>{n===r&&(t[s]=n+"_"+i++)})})}he.prototype.toArgumentNameList=or("toArgumentNameList");Mt.toArgumentNameList=function(t,e){return["any"]};Dt.toArgumentNameList=function(t,e){return["end"]};ht.prototype.toArgumentNameList=function(t,e){return typeof this.obj=="string"&&/^[_a-zA-Z0-9]+$/.test(this.obj)?["_"+this.obj]:["$"+t]};vt.prototype.toArgumentNameList=function(t,e){let r=this.from+"_to_"+this.to;return Gx(r)||(r="_"+r),Gx(r)||(r="$"+t),[r]};et.prototype.toArgumentNameList=function(t,e){let r=this.terms.map(s=>s.toArgumentNameList(t,!0)),i=[],n=r[0].length;for(let s=0;s<n;s++){let a=[];for(let u=0;u<this.terms.length;u++)a.push(r[u][s]);let o=Zx(a);i.push(o.join("_or_"))}return e||fy(i),i};at.prototype.toArgumentNameList=function(t,e){let r=[];return this.factors.forEach(i=>{let n=i.toArgumentNameList(t,!0);r=r.concat(n),t+=n.length}),e||fy(r),r};Et.prototype.toArgumentNameList=function(t,e){let r=this.expr.toArgumentNameList(t,e).map(i=>i[i.length-1]==="s"?i+"es":i+"s");return e||fy(r),r};Wr.prototype.toArgumentNameList=function(t,e){return this.expr.toArgumentNameList(t,e).map(r=>"opt"+r[0].toUpperCase()+r.slice(1))};ft.prototype.toArgumentNameList=function(t,e){return[]};Ot.prototype.toArgumentNameList=Rt.prototype.toArgumentNameList=function(t,e){return this.expr.toArgumentNameList(t,e)};ke.prototype.toArgumentNameList=function(t,e){return[this.ruleName]};pt.prototype.toArgumentNameList=function(t,e){return["$"+t]};bt.prototype.toArgumentNameList=function(t,e){return["param"+this.index]};he.prototype.toDisplayString=or("toDisplayString");et.prototype.toDisplayString=at.prototype.toDisplayString=function(){return this.source?this.source.trimmed().contents:"["+this.constructor.name+"]"};Mt.toDisplayString=Dt.toDisplayString=Et.prototype.toDisplayString=ft.prototype.toDisplayString=Ot.prototype.toDisplayString=Rt.prototype.toDisplayString=ht.prototype.toDisplayString=vt.prototype.toDisplayString=bt.prototype.toDisplayString=function(){return this.toString()};ke.prototype.toDisplayString=function(){if(this.args.length>0){let t=this.args.map(e=>e.toDisplayString());return this.ruleName+"<"+t.join(",")+">"}else return this.ruleName};pt.prototype.toDisplayString=function(){return"Unicode ["+this.categoryOrProp+"] character"};function Gj(t){return t==="description"||t==="string"||t==="code"}var br=class t{constructor(e,r,i){if(!Gj(i))throw new Error("invalid Failure type: "+i);this.pexpr=e,this.text=r,this.type=i,this.fluffy=!1}getPExpr(){return this.pexpr}getText(){return this.text}getType(){return this.type}isDescription(){return this.type==="description"}isStringTerminal(){return this.type==="string"}isCode(){return this.type==="code"}isFluffy(){return this.fluffy}makeFluffy(){this.fluffy=!0}clearFluffy(){this.fluffy=!1}subsumes(e){return this.getText()===e.getText()&&this.type===e.type&&(!this.isFluffy()||this.isFluffy()&&e.isFluffy())}toString(){return this.type==="string"?JSON.stringify(this.getText()):this.getText()}clone(){let e=new t(this.pexpr,this.text,this.type);return this.isFluffy()&&e.makeFluffy(),e}toKey(){return this.toString()+"#"+this.type}};he.prototype.toFailure=or("toFailure");Mt.toFailure=function(t){return new br(this,"any object","description")};Dt.toFailure=function(t){return new br(this,"end of input","description")};ht.prototype.toFailure=function(t){return new br(this,this.obj,"string")};vt.prototype.toFailure=function(t){return new br(this,JSON.stringify(this.from)+".."+JSON.stringify(this.to),"code")};ft.prototype.toFailure=function(t){let e=this.expr===Mt?"nothing":"not "+this.expr.toFailure(t);return new br(this,e,"description")};Ot.prototype.toFailure=function(t){return this.expr.toFailure(t)};ke.prototype.toFailure=function(t){let{description:e}=t.rules[this.ruleName];return e||(e=(/^[aeiouAEIOU]/.test(this.ruleName)?"an":"a")+" "+this.ruleName),new br(this,e,"description")};pt.prototype.toFailure=function(t){return new br(this,"a Unicode ["+this.categoryOrProp+"] character","description")};et.prototype.toFailure=function(t){let r="("+this.terms.map(i=>i.toFailure(t)).join(" or ")+")";return new br(this,r,"description")};at.prototype.toFailure=function(t){let r="("+this.factors.map(i=>i.toFailure(t)).join(" ")+")";return new br(this,r,"description")};Et.prototype.toFailure=function(t){let e="("+this.expr.toFailure(t)+this.operator+")";return new br(this,e,"description")};he.prototype.toString=or("toString");Mt.toString=function(){return"any"};Dt.toString=function(){return"end"};ht.prototype.toString=function(){return JSON.stringify(this.obj)};vt.prototype.toString=function(){return JSON.stringify(this.from)+".."+JSON.stringify(this.to)};bt.prototype.toString=function(){return"$"+this.index};Rt.prototype.toString=function(){return"#("+this.expr.toString()+")"};et.prototype.toString=function(){return this.terms.length===1?this.terms[0].toString():"("+this.terms.map(t=>t.toString()).join(" | ")+")"};at.prototype.toString=function(){return this.factors.length===1?this.factors[0].toString():"("+this.factors.map(t=>t.toString()).join(" ")+")"};Et.prototype.toString=function(){return this.expr+this.operator};ft.prototype.toString=function(){return"~"+this.expr};Ot.prototype.toString=function(){return"&"+this.expr};ke.prototype.toString=function(){if(this.args.length>0){let t=this.args.map(e=>e.toString());return this.ruleName+"<"+t.join(",")+">"}else return this.ruleName};pt.prototype.toString=function(){return"\\p{"+this.categoryOrProp+"}"};var ql=class t extends he{constructor(e){super(),this.obj=e}_getString(e){let r=e.currentApplication().args[this.obj.index];return yn(r instanceof ht,"expected a Terminal expression"),r.obj}allowsSkippingPrecedingSpace(){return!0}eval(e){let{inputStream:r}=e,i=r.pos,n=this._getString(e);return r.matchString(n,!0)?(e.pushBinding(new Ji(n.length),i),!0):(e.processFailure(i,this),!1)}getArity(){return 1}substituteParams(e){return new t(this.obj.substituteParams(e))}toDisplayString(){return this.obj.toDisplayString()+" (case-insensitive)"}toFailure(e){return new br(this,this.obj.toFailure(e)+" (case-insensitive)","description")}_isNullable(e,r){return this.obj._isNullable(e,r)}},Wj=Object.freeze({__proto__:null,CaseInsensitiveTerminal:ql,PExpr:he,any:Mt,end:Dt,Terminal:ht,Range:vt,Param:bt,Alt:et,Extend:ps,Splice:hs,Seq:at,Iter:Et,Star:Ii,Plus:zi,Opt:Wr,Not:ft,Lookahead:Ot,Lex:Rt,Apply:ke,UnicodeChar:pt}),fk;ck(t=>{fk=t.rules.applySyntactic.body});var Jg=new ke("spaces"),ny=class{constructor(e,r,i){this.matcher=e,this.startExpr=r,this.grammar=e.grammar,this.input=e.getInput(),this.inputStream=new ga(this.input),this.memoTable=e._memoTable,this.userData=void 0,this.doNotMemoize=!1,this._bindings=[],this._bindingOffsets=[],this._applicationStack=[],this._posStack=[0],this.inLexifiedContextStack=[!1],this.rightmostFailurePosition=-1,this._rightmostFailurePositionStack=[],this._recordedFailuresStack=[],i!==void 0&&(this.positionToRecordFailures=i,this.recordedFailures=Object.create(null))}posToOffset(e){return e-this._posStack[this._posStack.length-1]}enterApplication(e,r){this._posStack.push(this.inputStream.pos),this._applicationStack.push(r),this.inLexifiedContextStack.push(!1),e.enter(r),this._rightmostFailurePositionStack.push(this.rightmostFailurePosition),this.rightmostFailurePosition=-1}exitApplication(e,r){let i=this._posStack.pop();this._applicationStack.pop(),this.inLexifiedContextStack.pop(),e.exit(),this.rightmostFailurePosition=Math.max(this.rightmostFailurePosition,this._rightmostFailurePositionStack.pop()),r&&this.pushBinding(r,i)}enterLexifiedContext(){this.inLexifiedContextStack.push(!0)}exitLexifiedContext(){this.inLexifiedContextStack.pop()}currentApplication(){return this._applicationStack[this._applicationStack.length-1]}inSyntacticContext(){let e=this.currentApplication();return e?e.isSyntactic()&&!this.inLexifiedContext():this.startExpr.factors[0].isSyntactic()}inLexifiedContext(){return this.inLexifiedContextStack[this.inLexifiedContextStack.length-1]}skipSpaces(){return this.pushFailuresInfo(),this.eval(Jg),this.popBinding(),this.popFailuresInfo(),this.inputStream.pos}skipSpacesIfInSyntacticContext(){return this.inSyntacticContext()?this.skipSpaces():this.inputStream.pos}maybeSkipSpacesBefore(e){return e.allowsSkippingPrecedingSpace()&&e!==Jg?this.skipSpacesIfInSyntacticContext():this.inputStream.pos}pushBinding(e,r){this._bindings.push(e),this._bindingOffsets.push(this.posToOffset(r))}popBinding(){this._bindings.pop(),this._bindingOffsets.pop()}numBindings(){return this._bindings.length}truncateBindings(e){for(;this._bindings.length>e;)this.popBinding()}getCurrentPosInfo(){return this.getPosInfo(this.inputStream.pos)}getPosInfo(e){let r=this.memoTable[e];return r||(r=this.memoTable[e]=new ty),r}processFailure(e,r){if(this.rightmostFailurePosition=Math.max(this.rightmostFailurePosition,e),this.recordedFailures&&e===this.positionToRecordFailures){let i=this.currentApplication();i&&(r=r.substituteParams(i.args)),this.recordFailure(r.toFailure(this.grammar),!1)}}recordFailure(e,r){let i=e.toKey();this.recordedFailures[i]?this.recordedFailures[i].isFluffy()&&!e.isFluffy()&&this.recordedFailures[i].clearFluffy():this.recordedFailures[i]=r?e.clone():e}recordFailures(e,r){Object.keys(e).forEach(i=>{this.recordFailure(e[i],r)})}cloneRecordedFailures(){if(!this.recordedFailures)return;let e=Object.create(null);return Object.keys(this.recordedFailures).forEach(r=>{e[r]=this.recordedFailures[r].clone()}),e}getRightmostFailurePosition(){return this.rightmostFailurePosition}_getRightmostFailureOffset(){return this.rightmostFailurePosition>=0?this.posToOffset(this.rightmostFailurePosition):-1}getMemoizedTraceEntry(e,r){let i=this.memoTable[e];if(i&&r instanceof ke){let n=i.memo[r.toMemoKey()];if(n&&n.traceEntry){let s=n.traceEntry.cloneWithExpr(r);return s.isMemoized=!0,s}}return null}getTraceEntry(e,r,i,n){if(r instanceof ke){let s=this.currentApplication(),a=s?s.args:[];r=r.substituteParams(a)}return this.getMemoizedTraceEntry(e,r)||new ya(this.input,e,this.inputStream.pos,r,i,n,this.trace)}isTracing(){return!!this.trace}hasNecessaryInfo(e){return this.trace&&!e.traceEntry?!1:this.recordedFailures&&this.inputStream.pos+e.rightmostFailureOffset===this.positionToRecordFailures?!!e.failuresAtRightmostPosition:!0}useMemoizedResult(e,r){this.trace&&this.trace.push(r.traceEntry);let i=this.inputStream.pos+r.rightmostFailureOffset;return this.rightmostFailurePosition=Math.max(this.rightmostFailurePosition,i),this.recordedFailures&&this.positionToRecordFailures===i&&r.failuresAtRightmostPosition&&this.recordFailures(r.failuresAtRightmostPosition,!0),this.inputStream.examinedLength=Math.max(this.inputStream.examinedLength,r.examinedLength+e),r.value?(this.inputStream.pos+=r.matchLength,this.pushBinding(r.value,e),!0):!1}eval(e){let{inputStream:r}=this,i=this._bindings.length,n=this.userData,s;this.recordedFailures&&(s=this.recordedFailures,this.recordedFailures=Object.create(null));let a=r.pos,o=this.maybeSkipSpacesBefore(e),u;this.trace&&(u=this.trace,this.trace=[]);let l=e.eval(this);if(this.trace){let f=this._bindings.slice(i),h=this.getTraceEntry(o,e,l,f);h.isImplicitSpaces=e===Jg,h.isRootNode=e===this.startExpr,u.push(h),this.trace=u}return l?this.recordedFailures&&r.pos===this.positionToRecordFailures&&Object.keys(this.recordedFailures).forEach(f=>{this.recordedFailures[f].makeFluffy()}):(r.pos=a,this.truncateBindings(i),this.userData=n),this.recordedFailures&&this.recordFailures(s,!1),e===fk&&this.skipSpaces(),l}getMatchResult(){this.grammar._setUpMatchState(this),this.eval(this.startExpr);let e;this.recordedFailures&&(e=Object.keys(this.recordedFailures).map(i=>this.recordedFailures[i]));let r=this._bindings[0];return r&&(r.grammar=this.grammar),new Nl(this.matcher,this.input,this.startExpr,r,this._bindingOffsets[0],this.rightmostFailurePosition,e)}getTrace(){this.trace=[];let e=this.getMatchResult(),r=this.trace[this.trace.length-1];return r.result=e,r}pushFailuresInfo(){this._rightmostFailurePositionStack.push(this.rightmostFailurePosition),this._recordedFailuresStack.push(this.recordedFailures)}popFailuresInfo(){this.rightmostFailurePosition=this._rightmostFailurePositionStack.pop(),this.recordedFailures=this._recordedFailuresStack.pop()}},sy=class{constructor(e){this.grammar=e,this._memoTable=[],this._input="",this._isMemoTableStale=!1}_resetMemoTable(){this._memoTable=[],this._isMemoTableStale=!1}getInput(){return this._input}setInput(e){return this._input!==e&&this.replaceInputRange(0,this._input.length,e),this}replaceInputRange(e,r,i){let n=this._input,s=this._memoTable;if(e<0||e>n.length||r<0||r>n.length||e>r)throw new Error("Invalid indices: "+e+" and "+r);this._input=n.slice(0,e)+i+n.slice(r),this._input!==n&&s.length>0&&(this._isMemoTableStale=!0);let a=s.slice(r);s.length=e;for(let o=0;o<i.length;o++)s.push(void 0);for(let o of a)s.push(o);for(let o=0;o<e;o++){let u=s[o];u&&u.clearObsoleteEntries(o,e)}return this}match(e,r={incremental:!0}){return this._match(this._getStartExpr(e),{incremental:r.incremental,tracing:!1})}trace(e,r={incremental:!0}){return this._match(this._getStartExpr(e),{incremental:r.incremental,tracing:!0})}_match(e,r={}){let i={tracing:!1,incremental:!0,positionToRecordFailures:void 0,...r};if(!i.incremental)this._resetMemoTable();else if(this._isMemoTableStale&&!this.grammar.supportsIncrementalParsing)throw yj(this.grammar);let n=new ny(this,e,i.positionToRecordFailures);return i.tracing?n.getTrace():n.getMatchResult()}_getStartExpr(e){let r=e||this.grammar.defaultStartRule;if(!r)throw new Error("Missing start rule argument -- the grammar has no default start rule.");let i=this.grammar.parseApplication(r);return new at([i,Dt])}},Ho=[],ay=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),Cl=class{constructor(e,r,i){this._node=e,this.source=r,this._baseInterval=i,e.isNonterminal()&&yn(r===i),this._childWrappers=[]}_forgetMemoizedResultFor(e){delete this._node[this._semantics.attributeKeys[e]],this.children.forEach(r=>{r._forgetMemoizedResultFor(e)})}child(e){if(!(0<=e&&e<this._node.numChildren()))return;let r=this._childWrappers[e];if(!r){let i=this._node.childAt(e),n=this._node.childOffsets[e],s=this._baseInterval.subInterval(n,i.matchLength),a=i.isNonterminal()?s:this._baseInterval;r=this._childWrappers[e]=this._semantics.wrap(i,s,a)}return r}_children(){for(let e=0;e<this._node.numChildren();e++)this.child(e);return this._childWrappers}isIteration(){return this._node.isIteration()}isTerminal(){return this._node.isTerminal()}isNonterminal(){return this._node.isNonterminal()}isSyntactic(){return this.isNonterminal()&&this._node.isSyntactic()}isLexical(){return this.isNonterminal()&&this._node.isLexical()}isOptional(){return this._node.isOptional()}iteration(e){let r=e||[],i=r.map(a=>a._node),n=new Pl(i,[],-1,!1),s=this._semantics.wrap(n,null,null);return s._childWrappers=r,s}get children(){return this._children()}get ctorName(){return this._node.ctorName}get numChildren(){return this._node.numChildren()}get sourceString(){return this.source.contents}},_r=class t{constructor(e,r){let i=this;if(this.grammar=e,this.checkedActionDicts=!1,this.Wrapper=class extends(r?r.Wrapper:Cl){constructor(n,s,a){super(n,s,a),i.checkActionDictsIfHaventAlready(),this._semantics=i}toString(){return"[semantics wrapper for "+i.grammar.name+"]"}},this.super=r,r){if(!(e.equals(this.super.grammar)||e._inheritsFrom(this.super.grammar)))throw new Error("Cannot extend a semantics for grammar '"+this.super.grammar.name+"' for use with grammar '"+e.name+"' (not a sub-grammar)");this.operations=Object.create(this.super.operations),this.attributes=Object.create(this.super.attributes),this.attributeKeys=Object.create(null);for(let n in this.attributes)Object.defineProperty(this.attributeKeys,n,{value:Hx(n)})}else this.operations=Object.create(null),this.attributes=Object.create(null),this.attributeKeys=Object.create(null)}toString(){return"[semantics for "+this.grammar.name+"]"}checkActionDictsIfHaventAlready(){this.checkedActionDicts||(this.checkActionDicts(),this.checkedActionDicts=!0)}checkActionDicts(){let e;for(e in this.operations)this.operations[e].checkActionDict(this.grammar);for(e in this.attributes)this.attributes[e].checkActionDict(this.grammar)}toRecipe(e){function r(n){return n.super!==t.BuiltInSemantics._getSemantics()}let i=`(function(g) {
|
|
317
|
+
`;if(r(this)){i+=" var semantics = "+this.super.toRecipe(!0)+"(g";let n=this.super.grammar,s=this.grammar;for(;s!==n;)i+=".superGrammar",s=s.superGrammar;i+=`);
|
|
318
|
+
`,i+=" return g.extendSemantics(semantics)"}else i+=" return g.createSemantics()";return["Operation","Attribute"].forEach(n=>{let s=this[n.toLowerCase()+"s"];Object.keys(s).forEach(a=>{let{actionDict:o,formals:u,builtInDefault:l}=s[a],f=a;u.length>0&&(f+="("+u.join(", ")+")");let h;r(this)&&this.super[n.toLowerCase()+"s"][a]?h="extend"+n:h="add"+n,i+=`
|
|
319
|
+
.`+h+"("+JSON.stringify(f)+", {";let p=[];Object.keys(o).forEach(m=>{if(o[m]!==l){let v=o[m].toString().trim();v=v.replace(/^.*\(/,"function("),p.push(`
|
|
320
|
+
`+JSON.stringify(m)+": "+v)}}),i+=p.join(",")+`
|
|
321
|
+
})`})}),i+=`;
|
|
322
|
+
})`,e||(i=`(function() {
|
|
323
|
+
var grammar = this.fromRecipe(`+this.grammar.toRecipe()+`);
|
|
324
|
+
var semantics = `+i+`(grammar);
|
|
325
|
+
return semantics;
|
|
326
|
+
});
|
|
327
|
+
`),i}addOperationOrAttribute(e,r,i){let n=e+"s",s=Wx(r,e),{name:a}=s,{formals:o}=s;this.assertNewName(a,e);let u=zj(e,a,h),l={_default:u};Object.keys(i).forEach(p=>{l[p]=i[p]});let f=e==="operation"?new ms(a,o,l,u):new Wo(a,l,u);f.checkActionDict(this.grammar),this[n][a]=f;function h(...p){let m=this._semantics[n][a];if(arguments.length!==m.formals.length)throw new Error("Invalid number of arguments passed to "+a+" "+e+" (expected "+m.formals.length+", got "+arguments.length+")");let v=Object.create(null);for(let[g,k]of Object.entries(p)){let w=m.formals[g];v[w]=k}let S=this.args;this.args=v;let b=m.execute(this._semantics,this);return this.args=S,b}e==="operation"?(this.Wrapper.prototype[a]=h,this.Wrapper.prototype[a].toString=function(){return"["+a+" operation]"}):(Object.defineProperty(this.Wrapper.prototype,a,{get:h,configurable:!0}),Object.defineProperty(this.attributeKeys,a,{value:Hx(a)}))}extendOperationOrAttribute(e,r,i){let n=e+"s";if(Wx(r,"attribute"),!(this.super&&r in this.super[n]))throw new Error("Cannot extend "+e+" '"+r+"': did not inherit an "+e+" with that name");if(ay(this[n],r))throw new Error("Cannot extend "+e+" '"+r+"' again");let s=this[n][r].formals,a=this[n][r].actionDict,o=Object.create(a);Object.keys(i).forEach(u=>{o[u]=i[u]}),this[n][r]=e==="operation"?new ms(r,s,o):new Wo(r,o),this[n][r].checkActionDict(this.grammar)}assertNewName(e,r){if(ay(Cl.prototype,e))throw new Error("Cannot add "+r+" '"+e+"': that's a reserved name");if(e in this.operations)throw new Error("Cannot add "+r+" '"+e+"': an operation with that name already exists");if(e in this.attributes)throw new Error("Cannot add "+r+" '"+e+"': an attribute with that name already exists")}wrap(e,r,i){let n=i||r;return e instanceof this.Wrapper?e:new this.Wrapper(e,r,n)}};function Wx(t,e){if(!_r.prototypeGrammar)return yn(t.indexOf("(")===-1),{name:t,formals:[]};let r=_r.prototypeGrammar.match(t,e==="operation"?"OperationSignature":"AttributeSignature");if(r.failed())throw new Error(r.message);return _r.prototypeGrammarSemantics(r).parse()}function zj(t,e,r){return function(...i){let s=(this._semantics.operations[e]||this._semantics.attributes[e]).formals.map(a=>this.args[a]);if(!this.isIteration()&&i.length===1)return r.apply(i[0],s);throw Oj(this.ctorName,e,t,Ho)}}_r.createSemantics=function(t,e){let r=new _r(t,e!==void 0?e:_r.BuiltInSemantics._getSemantics()),i=function(s){if(!(s instanceof Nl))throw new TypeError("Semantics expected a MatchResult, but got "+uy(s));if(s.failed())throw new TypeError("cannot apply Semantics to "+s.toString());let a=s._cst;if(a.grammar!==t)throw new Error("Cannot use a MatchResult from grammar '"+a.grammar.name+"' with a semantics for '"+t.name+"'");let o=new ga(s.input);return r.wrap(a,o.interval(s._cstOffset,s.input.length))};return i.addOperation=function(n,s){return r.addOperationOrAttribute("operation",n,s),i},i.extendOperation=function(n,s){return r.extendOperationOrAttribute("operation",n,s),i},i.addAttribute=function(n,s){return r.addOperationOrAttribute("attribute",n,s),i},i.extendAttribute=function(n,s){return r.extendOperationOrAttribute("attribute",n,s),i},i._getActionDict=function(n){let s=r.operations[n]||r.attributes[n];if(!s)throw new Error('"'+n+'" is not a valid operation or attribute name in this semantics for "'+t.name+'"');return s.actionDict},i._remove=function(n){let s;return n in r.operations?(s=r.operations[n],delete r.operations[n]):n in r.attributes&&(s=r.attributes[n],delete r.attributes[n]),delete r.Wrapper.prototype[n],s},i.getOperationNames=function(){return Object.keys(r.operations)},i.getAttributeNames=function(){return Object.keys(r.attributes)},i.getGrammar=function(){return r.grammar},i.toRecipe=function(n){return r.toRecipe(n)},i.toString=r.toString.bind(r),i._getSemantics=function(){return r},i};var ms=class{constructor(e,r,i,n){this.name=e,this.formals=r,this.actionDict=i,this.builtInDefault=n}checkActionDict(e){e._checkTopDownActionDict(this.typeName,this.name,this.actionDict)}execute(e,r){try{let{ctorName:i}=r._node,n=this.actionDict[i];return n?(Ho.push([this,i]),n.apply(r,r._children())):r.isNonterminal()&&(n=this.actionDict._nonterminal,n)?(Ho.push([this,"_nonterminal",i]),n.apply(r,r._children())):(Ho.push([this,"default action",i]),this.actionDict._default.apply(r,r._children()))}finally{Ho.pop()}}};ms.prototype.typeName="operation";var Wo=class extends ms{constructor(e,r,i){super(e,[],r,i)}execute(e,r){let i=r._node,n=e.attributeKeys[this.name];return ay(i,n)||(i[n]=ms.prototype.execute.call(this,e,r)),i[n]}};Wo.prototype.typeName="attribute";var zx=["_iter","_terminal","_nonterminal","_default"];function Jx(t){return Object.keys(t.rules).sort().map(e=>t.rules[e])}var Jj=t=>t.replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029"),pk,hk,vr=class t{constructor(e,r,i,n){if(this.name=e,this.superGrammar=r,this.rules=i,n){if(!(n in i))throw new Error("Invalid start rule: '"+n+"' is not a rule in grammar '"+e+"'");this.defaultStartRule=n}this._matchStateInitializer=void 0,this.supportsIncrementalParsing=!0}matcher(){return new sy(this)}isBuiltIn(){return this===t.ProtoBuiltInRules||this===t.BuiltInRules}equals(e){if(this===e)return!0;if(e==null||this.name!==e.name||this.defaultStartRule!==e.defaultStartRule||!(this.superGrammar===e.superGrammar||this.superGrammar.equals(e.superGrammar)))return!1;let r=Jx(this),i=Jx(e);return r.length===i.length&&r.every((n,s)=>n.description===i[s].description&&n.formals.join(",")===i[s].formals.join(",")&&n.body.toString()===i[s].body.toString())}match(e,r){let i=this.matcher();return i.replaceInputRange(0,0,e),i.match(r)}trace(e,r){let i=this.matcher();return i.replaceInputRange(0,0,e),i.trace(r)}createSemantics(){return _r.createSemantics(this)}extendSemantics(e){return _r.createSemantics(this,e._getSemantics())}_checkTopDownActionDict(e,r,i){let n=[];for(let s in i){let a=i[s];if(!zx.includes(s)&&!(s in this.rules)){n.push(`'${s}' is not a valid semantic action for '${this.name}'`);continue}if(typeof a!="function"){n.push(`'${s}' must be a function in an action dictionary for '${this.name}'`);continue}let u=a.length,l=this._topDownActionArity(s);if(u!==l){let f;s==="_iter"||s==="_nonterminal"?f=`it should use a rest parameter, e.g. \`${s}(...children) {}\`. NOTE: this is new in Ohm v16 \u2014 see https://ohmjs.org/d/ati for details.`:f=`expected ${l}, got ${u}`,n.push(`Semantic action '${s}' has the wrong arity: ${f}`)}}if(n.length>0){let s=n.map(o=>"- "+o),a=new Error([`Found errors in the action dictionary of the '${r}' ${e}:`,...s].join(`
|
|
328
|
+
`));throw a.problems=n,a}}_topDownActionArity(e){return zx.includes(e)?0:this.rules[e].body.getArity()}_inheritsFrom(e){let r=this.superGrammar;for(;r;){if(r.equals(e,!0))return!0;r=r.superGrammar}return!1}toRecipe(e=void 0){let r={};this.source&&(r.source=this.source.contents);let i=null;this.defaultStartRule&&(i=this.defaultStartRule);let n={};Object.keys(this.rules).forEach(o=>{let u=this.rules[o],{body:l}=u,f=!this.superGrammar||!this.superGrammar.rules[o],h;f?h="define":h=l instanceof ps?"extend":"override";let p={};if(u.source&&this.source){let S=u.source.relativeTo(this.source);p.sourceInterval=[S.startIdx,S.endIdx]}let m=f?u.description:null,v=l.outputRecipe(u.formals,this.source);n[o]=[h,p,m,u.formals,v]});let s="null";e?s=e:this.superGrammar&&!this.superGrammar.isBuiltIn()&&(s=this.superGrammar.toRecipe());let a=[...["grammar",r,this.name].map(JSON.stringify),s,...[i,n].map(JSON.stringify)];return Jj(`[${a.join(",")}]`)}toOperationActionDictionaryTemplate(){return this._toOperationOrAttributeActionDictionaryTemplate()}toAttributeActionDictionaryTemplate(){return this._toOperationOrAttributeActionDictionaryTemplate()}_toOperationOrAttributeActionDictionaryTemplate(){let e=new gs;e.append("{");let r=!0;for(let i in this.rules){let{body:n}=this.rules[i];r?r=!1:e.append(","),e.append(`
|
|
329
|
+
`),e.append(" "),this.addSemanticActionTemplate(i,n,e)}return e.append(`
|
|
330
|
+
}`),e.contents()}addSemanticActionTemplate(e,r,i){i.append(e),i.append(": function(");let n=this._topDownActionArity(e);i.append(Dl("_",n).join(", ")),i.append(`) {
|
|
331
|
+
`),i.append(" }")}parseApplication(e){let r;if(e.indexOf("<")===-1)r=new ke(e);else{let n=pk.match(e,"Base_application");r=hk(n,{})}if(!(r.ruleName in this.rules))throw sk(r.ruleName,this.name);let{formals:i}=this.rules[r.ruleName];if(i.length!==r.args.length){let{source:n}=this.rules[r.ruleName];throw ak(r.ruleName,i.length,r.args.length,n)}return r}_setUpMatchState(e){this._matchStateInitializer&&this._matchStateInitializer(e)}};vr.ProtoBuiltInRules=new vr("ProtoBuiltInRules",void 0,{any:{body:Mt,formals:[],description:"any character",primitive:!0},end:{body:Dt,formals:[],description:"end of input",primitive:!0},caseInsensitive:{body:new ql(new bt(0)),formals:["str"],primitive:!0},lower:{body:new pt("Ll"),formals:[],description:"a lowercase letter",primitive:!0},upper:{body:new pt("Lu"),formals:[],description:"an uppercase letter",primitive:!0},unicodeLtmo:{body:new pt("Ltmo"),formals:[],description:"a Unicode character in Lt, Lm, or Lo",primitive:!0},spaces:{body:new Ii(new ke("space")),formals:[]},space:{body:new vt("\0"," "),formals:[],description:"a space"}});vr.initApplicationParser=function(t,e){pk=t,hk=e};var Rl=class{constructor(e){this.name=e}sourceInterval(e,r){return this.source.subInterval(e,r-e)}ensureSuperGrammar(){return this.superGrammar||this.withSuperGrammar(this.name==="BuiltInRules"?vr.ProtoBuiltInRules:vr.BuiltInRules),this.superGrammar}ensureSuperGrammarRuleForOverriding(e,r){let i=this.ensureSuperGrammar().rules[e];if(!i)throw _j(e,this.superGrammar.name,r);return i}installOverriddenOrExtendedRule(e,r,i,n){let s=Yg(r);if(s.length>0)throw Vx(e,s,n);let a=this.ensureSuperGrammar().rules[e],o=a.formals,u=o?o.length:0;if(r.length!==u)throw ak(e,u,r.length,n);return this.install(e,r,i,a.description,n)}install(e,r,i,n,s,a=!1){return this.rules[e]={body:i.introduceParams(r),formals:r,description:n,source:s,primitive:a},this}withSuperGrammar(e){if(this.superGrammar)throw new Error("the super grammar of a GrammarDecl cannot be set more than once");return this.superGrammar=e,this.rules=Object.create(e.rules),e.isBuiltIn()||(this.defaultStartRule=e.defaultStartRule),this}withDefaultStartRule(e){return this.defaultStartRule=e,this}withSource(e){return this.source=new ga(e).interval(0,e.length),this}build(){let e=new vr(this.name,this.ensureSuperGrammar(),this.rules,this.defaultStartRule);e._matchStateInitializer=e.superGrammar._matchStateInitializer,e.supportsIncrementalParsing=e.superGrammar.supportsIncrementalParsing;let r=[],i=!1;return Object.keys(e.rules).forEach(n=>{let{body:s}=e.rules[n];try{s.assertChoicesHaveUniformArity(n)}catch(a){r.push(a)}try{s.assertAllApplicationsAreValid(n,e)}catch(a){r.push(a),i=!0}}),i||Object.keys(e.rules).forEach(n=>{let{body:s}=e.rules[n];try{s.assertIteratedExprsAreNotNullable(e,[])}catch(a){r.push(a)}}),r.length>0&&Nj(r),this.source&&(e.source=this.source),e}define(e,r,i,n,s,a){if(this.ensureSuperGrammar(),this.superGrammar.rules[e])throw Bx(e,this.name,this.superGrammar.name,s);if(this.rules[e])throw Bx(e,this.name,this.name,s);let o=Yg(r);if(o.length>0)throw Vx(e,o,s);return this.install(e,r,i,n,s,a)}override(e,r,i,n,s){return this.ensureSuperGrammarRuleForOverriding(e,s),this.installOverriddenOrExtendedRule(e,r,i,s),this}extend(e,r,i,n,s){if(!this.ensureSuperGrammar().rules[e])throw vj(e,this.superGrammar.name,s);let o=new ps(this.superGrammar,e,i);return o.source=i.source,this.installOverriddenOrExtendedRule(e,r,o,s),this}},_a=class{constructor(e){this.currentDecl=null,this.currentRuleName=null,this.options=e||{}}newGrammar(e){return new Rl(e)}grammar(e,r,i,n,s){let a=new Rl(r);return i&&a.withSuperGrammar(i instanceof vr?i:this.fromRecipe(i)),n&&a.withDefaultStartRule(n),e&&e.source&&a.withSource(e.source),this.currentDecl=a,Object.keys(s).forEach(o=>{this.currentRuleName=o;let u=s[o],l=u[0],f=u[1],h=u[2],p=u[3],m=this.fromRecipe(u[4]),v;a.source&&f&&f.sourceInterval&&(v=a.source.subInterval(f.sourceInterval[0],f.sourceInterval[1]-f.sourceInterval[0])),a[l](o,p,m,h,v)}),this.currentRuleName=this.currentDecl=null,a.build()}terminal(e){return new ht(e)}range(e,r){return new vt(e,r)}param(e){return new bt(e)}alt(...e){let r=[];for(let i of e)i instanceof he||(i=this.fromRecipe(i)),i instanceof et?r=r.concat(i.terms):r.push(i);return r.length===1?r[0]:new et(r)}seq(...e){let r=[];for(let i of e)i instanceof he||(i=this.fromRecipe(i)),i instanceof at?r=r.concat(i.factors):r.push(i);return r.length===1?r[0]:new at(r)}star(e){return e instanceof he||(e=this.fromRecipe(e)),new Ii(e)}plus(e){return e instanceof he||(e=this.fromRecipe(e)),new zi(e)}opt(e){return e instanceof he||(e=this.fromRecipe(e)),new Wr(e)}not(e){return e instanceof he||(e=this.fromRecipe(e)),new ft(e)}lookahead(e){return e instanceof he||(e=this.fromRecipe(e)),this.options.eliminateLookaheads?new ft(new ft(e)):new Ot(e)}lex(e){return e instanceof he||(e=this.fromRecipe(e)),new Rt(e)}app(e,r){return r&&r.length>0&&(r=r.map(function(i){return i instanceof he?i:this.fromRecipe(i)},this)),new ke(e,r)}splice(e,r){return new hs(this.currentDecl.superGrammar,this.currentRuleName,e.map(i=>this.fromRecipe(i)),r.map(i=>this.fromRecipe(i)))}fromRecipe(e){let r=e[0]==="grammar"?e.slice(1):e.slice(2),i=this[e[0]](...r),n=e[1];return n&&n.sourceInterval&&this.currentDecl&&i.withSource(this.currentDecl.sourceInterval(...n.sourceInterval)),i}};function Fl(t){return typeof t=="function"?t.call(new _a):(typeof t=="string"&&(t=JSON.parse(t)),new _a().fromRecipe(t))}var py=Fl(["grammar",{source:`BuiltInRules {
|
|
332
|
+
|
|
333
|
+
alnum (an alpha-numeric character)
|
|
334
|
+
= letter
|
|
335
|
+
| digit
|
|
336
|
+
|
|
337
|
+
letter (a letter)
|
|
338
|
+
= lower
|
|
339
|
+
| upper
|
|
340
|
+
| unicodeLtmo
|
|
341
|
+
|
|
342
|
+
digit (a digit)
|
|
343
|
+
= "0".."9"
|
|
344
|
+
|
|
345
|
+
hexDigit (a hexadecimal digit)
|
|
346
|
+
= digit
|
|
347
|
+
| "a".."f"
|
|
348
|
+
| "A".."F"
|
|
349
|
+
|
|
350
|
+
ListOf<elem, sep>
|
|
351
|
+
= NonemptyListOf<elem, sep>
|
|
352
|
+
| EmptyListOf<elem, sep>
|
|
353
|
+
|
|
354
|
+
NonemptyListOf<elem, sep>
|
|
355
|
+
= elem (sep elem)*
|
|
356
|
+
|
|
357
|
+
EmptyListOf<elem, sep>
|
|
358
|
+
= /* nothing */
|
|
359
|
+
|
|
360
|
+
listOf<elem, sep>
|
|
361
|
+
= nonemptyListOf<elem, sep>
|
|
362
|
+
| emptyListOf<elem, sep>
|
|
363
|
+
|
|
364
|
+
nonemptyListOf<elem, sep>
|
|
365
|
+
= elem (sep elem)*
|
|
366
|
+
|
|
367
|
+
emptyListOf<elem, sep>
|
|
368
|
+
= /* nothing */
|
|
369
|
+
|
|
370
|
+
// Allows a syntactic rule application within a lexical context.
|
|
371
|
+
applySyntactic<app> = app
|
|
372
|
+
}`},"BuiltInRules",null,null,{alnum:["define",{sourceInterval:[18,78]},"an alpha-numeric character",[],["alt",{sourceInterval:[60,78]},["app",{sourceInterval:[60,66]},"letter",[]],["app",{sourceInterval:[73,78]},"digit",[]]]],letter:["define",{sourceInterval:[82,142]},"a letter",[],["alt",{sourceInterval:[107,142]},["app",{sourceInterval:[107,112]},"lower",[]],["app",{sourceInterval:[119,124]},"upper",[]],["app",{sourceInterval:[131,142]},"unicodeLtmo",[]]]],digit:["define",{sourceInterval:[146,177]},"a digit",[],["range",{sourceInterval:[169,177]},"0","9"]],hexDigit:["define",{sourceInterval:[181,254]},"a hexadecimal digit",[],["alt",{sourceInterval:[219,254]},["app",{sourceInterval:[219,224]},"digit",[]],["range",{sourceInterval:[231,239]},"a","f"],["range",{sourceInterval:[246,254]},"A","F"]]],ListOf:["define",{sourceInterval:[258,336]},null,["elem","sep"],["alt",{sourceInterval:[282,336]},["app",{sourceInterval:[282,307]},"NonemptyListOf",[["param",{sourceInterval:[297,301]},0],["param",{sourceInterval:[303,306]},1]]],["app",{sourceInterval:[314,336]},"EmptyListOf",[["param",{sourceInterval:[326,330]},0],["param",{sourceInterval:[332,335]},1]]]]],NonemptyListOf:["define",{sourceInterval:[340,388]},null,["elem","sep"],["seq",{sourceInterval:[372,388]},["param",{sourceInterval:[372,376]},0],["star",{sourceInterval:[377,388]},["seq",{sourceInterval:[378,386]},["param",{sourceInterval:[378,381]},1],["param",{sourceInterval:[382,386]},0]]]]],EmptyListOf:["define",{sourceInterval:[392,434]},null,["elem","sep"],["seq",{sourceInterval:[438,438]}]],listOf:["define",{sourceInterval:[438,516]},null,["elem","sep"],["alt",{sourceInterval:[462,516]},["app",{sourceInterval:[462,487]},"nonemptyListOf",[["param",{sourceInterval:[477,481]},0],["param",{sourceInterval:[483,486]},1]]],["app",{sourceInterval:[494,516]},"emptyListOf",[["param",{sourceInterval:[506,510]},0],["param",{sourceInterval:[512,515]},1]]]]],nonemptyListOf:["define",{sourceInterval:[520,568]},null,["elem","sep"],["seq",{sourceInterval:[552,568]},["param",{sourceInterval:[552,556]},0],["star",{sourceInterval:[557,568]},["seq",{sourceInterval:[558,566]},["param",{sourceInterval:[558,561]},1],["param",{sourceInterval:[562,566]},0]]]]],emptyListOf:["define",{sourceInterval:[572,682]},null,["elem","sep"],["seq",{sourceInterval:[685,685]}]],applySyntactic:["define",{sourceInterval:[685,710]},null,["app"],["param",{sourceInterval:[707,710]},0]]}]);vr.BuiltInRules=py;qj(vr.BuiltInRules);var jl=Fl(["grammar",{source:`Ohm {
|
|
373
|
+
|
|
374
|
+
Grammars
|
|
375
|
+
= Grammar*
|
|
376
|
+
|
|
377
|
+
Grammar
|
|
378
|
+
= ident SuperGrammar? "{" Rule* "}"
|
|
379
|
+
|
|
380
|
+
SuperGrammar
|
|
381
|
+
= "<:" ident
|
|
382
|
+
|
|
383
|
+
Rule
|
|
384
|
+
= ident Formals? ruleDescr? "=" RuleBody -- define
|
|
385
|
+
| ident Formals? ":=" OverrideRuleBody -- override
|
|
386
|
+
| ident Formals? "+=" RuleBody -- extend
|
|
387
|
+
|
|
388
|
+
RuleBody
|
|
389
|
+
= "|"? NonemptyListOf<TopLevelTerm, "|">
|
|
390
|
+
|
|
391
|
+
TopLevelTerm
|
|
392
|
+
= Seq caseName -- inline
|
|
393
|
+
| Seq
|
|
394
|
+
|
|
395
|
+
OverrideRuleBody
|
|
396
|
+
= "|"? NonemptyListOf<OverrideTopLevelTerm, "|">
|
|
397
|
+
|
|
398
|
+
OverrideTopLevelTerm
|
|
399
|
+
= "..." -- superSplice
|
|
400
|
+
| TopLevelTerm
|
|
401
|
+
|
|
402
|
+
Formals
|
|
403
|
+
= "<" ListOf<ident, ","> ">"
|
|
404
|
+
|
|
405
|
+
Params
|
|
406
|
+
= "<" ListOf<Seq, ","> ">"
|
|
407
|
+
|
|
408
|
+
Alt
|
|
409
|
+
= NonemptyListOf<Seq, "|">
|
|
410
|
+
|
|
411
|
+
Seq
|
|
412
|
+
= Iter*
|
|
413
|
+
|
|
414
|
+
Iter
|
|
415
|
+
= Pred "*" -- star
|
|
416
|
+
| Pred "+" -- plus
|
|
417
|
+
| Pred "?" -- opt
|
|
418
|
+
| Pred
|
|
419
|
+
|
|
420
|
+
Pred
|
|
421
|
+
= "~" Lex -- not
|
|
422
|
+
| "&" Lex -- lookahead
|
|
423
|
+
| Lex
|
|
424
|
+
|
|
425
|
+
Lex
|
|
426
|
+
= "#" Base -- lex
|
|
427
|
+
| Base
|
|
428
|
+
|
|
429
|
+
Base
|
|
430
|
+
= ident Params? ~(ruleDescr? "=" | ":=" | "+=") -- application
|
|
431
|
+
| oneCharTerminal ".." oneCharTerminal -- range
|
|
432
|
+
| terminal -- terminal
|
|
433
|
+
| "(" Alt ")" -- paren
|
|
434
|
+
|
|
435
|
+
ruleDescr (a rule description)
|
|
436
|
+
= "(" ruleDescrText ")"
|
|
437
|
+
|
|
438
|
+
ruleDescrText
|
|
439
|
+
= (~")" any)*
|
|
440
|
+
|
|
441
|
+
caseName
|
|
442
|
+
= "--" (~"\\n" space)* name (~"\\n" space)* ("\\n" | &"}")
|
|
443
|
+
|
|
444
|
+
name (a name)
|
|
445
|
+
= nameFirst nameRest*
|
|
446
|
+
|
|
447
|
+
nameFirst
|
|
448
|
+
= "_"
|
|
449
|
+
| letter
|
|
450
|
+
|
|
451
|
+
nameRest
|
|
452
|
+
= "_"
|
|
453
|
+
| alnum
|
|
454
|
+
|
|
455
|
+
ident (an identifier)
|
|
456
|
+
= name
|
|
457
|
+
|
|
458
|
+
terminal
|
|
459
|
+
= "\\"" terminalChar* "\\""
|
|
460
|
+
|
|
461
|
+
oneCharTerminal
|
|
462
|
+
= "\\"" terminalChar "\\""
|
|
463
|
+
|
|
464
|
+
terminalChar
|
|
465
|
+
= escapeChar
|
|
466
|
+
| ~"\\\\" ~"\\"" ~"\\n" "\\u{0}".."\\u{10FFFF}"
|
|
467
|
+
|
|
468
|
+
escapeChar (an escape sequence)
|
|
469
|
+
= "\\\\\\\\" -- backslash
|
|
470
|
+
| "\\\\\\"" -- doubleQuote
|
|
471
|
+
| "\\\\\\'" -- singleQuote
|
|
472
|
+
| "\\\\b" -- backspace
|
|
473
|
+
| "\\\\n" -- lineFeed
|
|
474
|
+
| "\\\\r" -- carriageReturn
|
|
475
|
+
| "\\\\t" -- tab
|
|
476
|
+
| "\\\\u{" hexDigit hexDigit? hexDigit?
|
|
477
|
+
hexDigit? hexDigit? hexDigit? "}" -- unicodeCodePoint
|
|
478
|
+
| "\\\\u" hexDigit hexDigit hexDigit hexDigit -- unicodeEscape
|
|
479
|
+
| "\\\\x" hexDigit hexDigit -- hexEscape
|
|
480
|
+
|
|
481
|
+
space
|
|
482
|
+
+= comment
|
|
483
|
+
|
|
484
|
+
comment
|
|
485
|
+
= "//" (~"\\n" any)* &("\\n" | end) -- singleLine
|
|
486
|
+
| "/*" (~"*/" any)* "*/" -- multiLine
|
|
487
|
+
|
|
488
|
+
tokens = token*
|
|
489
|
+
|
|
490
|
+
token = caseName | comment | ident | operator | punctuation | terminal | any
|
|
491
|
+
|
|
492
|
+
operator = "<:" | "=" | ":=" | "+=" | "*" | "+" | "?" | "~" | "&"
|
|
493
|
+
|
|
494
|
+
punctuation = "<" | ">" | "," | "--"
|
|
495
|
+
}`},"Ohm",null,"Grammars",{Grammars:["define",{sourceInterval:[9,32]},null,[],["star",{sourceInterval:[24,32]},["app",{sourceInterval:[24,31]},"Grammar",[]]]],Grammar:["define",{sourceInterval:[36,83]},null,[],["seq",{sourceInterval:[50,83]},["app",{sourceInterval:[50,55]},"ident",[]],["opt",{sourceInterval:[56,69]},["app",{sourceInterval:[56,68]},"SuperGrammar",[]]],["terminal",{sourceInterval:[70,73]},"{"],["star",{sourceInterval:[74,79]},["app",{sourceInterval:[74,78]},"Rule",[]]],["terminal",{sourceInterval:[80,83]},"}"]]],SuperGrammar:["define",{sourceInterval:[87,116]},null,[],["seq",{sourceInterval:[106,116]},["terminal",{sourceInterval:[106,110]},"<:"],["app",{sourceInterval:[111,116]},"ident",[]]]],Rule_define:["define",{sourceInterval:[131,181]},null,[],["seq",{sourceInterval:[131,170]},["app",{sourceInterval:[131,136]},"ident",[]],["opt",{sourceInterval:[137,145]},["app",{sourceInterval:[137,144]},"Formals",[]]],["opt",{sourceInterval:[146,156]},["app",{sourceInterval:[146,155]},"ruleDescr",[]]],["terminal",{sourceInterval:[157,160]},"="],["app",{sourceInterval:[162,170]},"RuleBody",[]]]],Rule_override:["define",{sourceInterval:[188,248]},null,[],["seq",{sourceInterval:[188,235]},["app",{sourceInterval:[188,193]},"ident",[]],["opt",{sourceInterval:[194,202]},["app",{sourceInterval:[194,201]},"Formals",[]]],["terminal",{sourceInterval:[214,218]},":="],["app",{sourceInterval:[219,235]},"OverrideRuleBody",[]]]],Rule_extend:["define",{sourceInterval:[255,305]},null,[],["seq",{sourceInterval:[255,294]},["app",{sourceInterval:[255,260]},"ident",[]],["opt",{sourceInterval:[261,269]},["app",{sourceInterval:[261,268]},"Formals",[]]],["terminal",{sourceInterval:[281,285]},"+="],["app",{sourceInterval:[286,294]},"RuleBody",[]]]],Rule:["define",{sourceInterval:[120,305]},null,[],["alt",{sourceInterval:[131,305]},["app",{sourceInterval:[131,170]},"Rule_define",[]],["app",{sourceInterval:[188,235]},"Rule_override",[]],["app",{sourceInterval:[255,294]},"Rule_extend",[]]]],RuleBody:["define",{sourceInterval:[309,362]},null,[],["seq",{sourceInterval:[324,362]},["opt",{sourceInterval:[324,328]},["terminal",{sourceInterval:[324,327]},"|"]],["app",{sourceInterval:[329,362]},"NonemptyListOf",[["app",{sourceInterval:[344,356]},"TopLevelTerm",[]],["terminal",{sourceInterval:[358,361]},"|"]]]]],TopLevelTerm_inline:["define",{sourceInterval:[385,408]},null,[],["seq",{sourceInterval:[385,397]},["app",{sourceInterval:[385,388]},"Seq",[]],["app",{sourceInterval:[389,397]},"caseName",[]]]],TopLevelTerm:["define",{sourceInterval:[366,418]},null,[],["alt",{sourceInterval:[385,418]},["app",{sourceInterval:[385,397]},"TopLevelTerm_inline",[]],["app",{sourceInterval:[415,418]},"Seq",[]]]],OverrideRuleBody:["define",{sourceInterval:[422,491]},null,[],["seq",{sourceInterval:[445,491]},["opt",{sourceInterval:[445,449]},["terminal",{sourceInterval:[445,448]},"|"]],["app",{sourceInterval:[450,491]},"NonemptyListOf",[["app",{sourceInterval:[465,485]},"OverrideTopLevelTerm",[]],["terminal",{sourceInterval:[487,490]},"|"]]]]],OverrideTopLevelTerm_superSplice:["define",{sourceInterval:[522,543]},null,[],["terminal",{sourceInterval:[522,527]},"..."]],OverrideTopLevelTerm:["define",{sourceInterval:[495,562]},null,[],["alt",{sourceInterval:[522,562]},["app",{sourceInterval:[522,527]},"OverrideTopLevelTerm_superSplice",[]],["app",{sourceInterval:[550,562]},"TopLevelTerm",[]]]],Formals:["define",{sourceInterval:[566,606]},null,[],["seq",{sourceInterval:[580,606]},["terminal",{sourceInterval:[580,583]},"<"],["app",{sourceInterval:[584,602]},"ListOf",[["app",{sourceInterval:[591,596]},"ident",[]],["terminal",{sourceInterval:[598,601]},","]]],["terminal",{sourceInterval:[603,606]},">"]]],Params:["define",{sourceInterval:[610,647]},null,[],["seq",{sourceInterval:[623,647]},["terminal",{sourceInterval:[623,626]},"<"],["app",{sourceInterval:[627,643]},"ListOf",[["app",{sourceInterval:[634,637]},"Seq",[]],["terminal",{sourceInterval:[639,642]},","]]],["terminal",{sourceInterval:[644,647]},">"]]],Alt:["define",{sourceInterval:[651,685]},null,[],["app",{sourceInterval:[661,685]},"NonemptyListOf",[["app",{sourceInterval:[676,679]},"Seq",[]],["terminal",{sourceInterval:[681,684]},"|"]]]],Seq:["define",{sourceInterval:[689,704]},null,[],["star",{sourceInterval:[699,704]},["app",{sourceInterval:[699,703]},"Iter",[]]]],Iter_star:["define",{sourceInterval:[719,736]},null,[],["seq",{sourceInterval:[719,727]},["app",{sourceInterval:[719,723]},"Pred",[]],["terminal",{sourceInterval:[724,727]},"*"]]],Iter_plus:["define",{sourceInterval:[743,760]},null,[],["seq",{sourceInterval:[743,751]},["app",{sourceInterval:[743,747]},"Pred",[]],["terminal",{sourceInterval:[748,751]},"+"]]],Iter_opt:["define",{sourceInterval:[767,783]},null,[],["seq",{sourceInterval:[767,775]},["app",{sourceInterval:[767,771]},"Pred",[]],["terminal",{sourceInterval:[772,775]},"?"]]],Iter:["define",{sourceInterval:[708,794]},null,[],["alt",{sourceInterval:[719,794]},["app",{sourceInterval:[719,727]},"Iter_star",[]],["app",{sourceInterval:[743,751]},"Iter_plus",[]],["app",{sourceInterval:[767,775]},"Iter_opt",[]],["app",{sourceInterval:[790,794]},"Pred",[]]]],Pred_not:["define",{sourceInterval:[809,824]},null,[],["seq",{sourceInterval:[809,816]},["terminal",{sourceInterval:[809,812]},"~"],["app",{sourceInterval:[813,816]},"Lex",[]]]],Pred_lookahead:["define",{sourceInterval:[831,852]},null,[],["seq",{sourceInterval:[831,838]},["terminal",{sourceInterval:[831,834]},"&"],["app",{sourceInterval:[835,838]},"Lex",[]]]],Pred:["define",{sourceInterval:[798,862]},null,[],["alt",{sourceInterval:[809,862]},["app",{sourceInterval:[809,816]},"Pred_not",[]],["app",{sourceInterval:[831,838]},"Pred_lookahead",[]],["app",{sourceInterval:[859,862]},"Lex",[]]]],Lex_lex:["define",{sourceInterval:[876,892]},null,[],["seq",{sourceInterval:[876,884]},["terminal",{sourceInterval:[876,879]},"#"],["app",{sourceInterval:[880,884]},"Base",[]]]],Lex:["define",{sourceInterval:[866,903]},null,[],["alt",{sourceInterval:[876,903]},["app",{sourceInterval:[876,884]},"Lex_lex",[]],["app",{sourceInterval:[899,903]},"Base",[]]]],Base_application:["define",{sourceInterval:[918,979]},null,[],["seq",{sourceInterval:[918,963]},["app",{sourceInterval:[918,923]},"ident",[]],["opt",{sourceInterval:[924,931]},["app",{sourceInterval:[924,930]},"Params",[]]],["not",{sourceInterval:[932,963]},["alt",{sourceInterval:[934,962]},["seq",{sourceInterval:[934,948]},["opt",{sourceInterval:[934,944]},["app",{sourceInterval:[934,943]},"ruleDescr",[]]],["terminal",{sourceInterval:[945,948]},"="]],["terminal",{sourceInterval:[951,955]},":="],["terminal",{sourceInterval:[958,962]},"+="]]]]],Base_range:["define",{sourceInterval:[986,1041]},null,[],["seq",{sourceInterval:[986,1022]},["app",{sourceInterval:[986,1001]},"oneCharTerminal",[]],["terminal",{sourceInterval:[1002,1006]},".."],["app",{sourceInterval:[1007,1022]},"oneCharTerminal",[]]]],Base_terminal:["define",{sourceInterval:[1048,1106]},null,[],["app",{sourceInterval:[1048,1056]},"terminal",[]]],Base_paren:["define",{sourceInterval:[1113,1168]},null,[],["seq",{sourceInterval:[1113,1124]},["terminal",{sourceInterval:[1113,1116]},"("],["app",{sourceInterval:[1117,1120]},"Alt",[]],["terminal",{sourceInterval:[1121,1124]},")"]]],Base:["define",{sourceInterval:[907,1168]},null,[],["alt",{sourceInterval:[918,1168]},["app",{sourceInterval:[918,963]},"Base_application",[]],["app",{sourceInterval:[986,1022]},"Base_range",[]],["app",{sourceInterval:[1048,1056]},"Base_terminal",[]],["app",{sourceInterval:[1113,1124]},"Base_paren",[]]]],ruleDescr:["define",{sourceInterval:[1172,1231]},"a rule description",[],["seq",{sourceInterval:[1210,1231]},["terminal",{sourceInterval:[1210,1213]},"("],["app",{sourceInterval:[1214,1227]},"ruleDescrText",[]],["terminal",{sourceInterval:[1228,1231]},")"]]],ruleDescrText:["define",{sourceInterval:[1235,1266]},null,[],["star",{sourceInterval:[1255,1266]},["seq",{sourceInterval:[1256,1264]},["not",{sourceInterval:[1256,1260]},["terminal",{sourceInterval:[1257,1260]},")"]],["app",{sourceInterval:[1261,1264]},"any",[]]]]],caseName:["define",{sourceInterval:[1270,1338]},null,[],["seq",{sourceInterval:[1285,1338]},["terminal",{sourceInterval:[1285,1289]},"--"],["star",{sourceInterval:[1290,1304]},["seq",{sourceInterval:[1291,1302]},["not",{sourceInterval:[1291,1296]},["terminal",{sourceInterval:[1292,1296]},`
|
|
496
|
+
`]],["app",{sourceInterval:[1297,1302]},"space",[]]]],["app",{sourceInterval:[1305,1309]},"name",[]],["star",{sourceInterval:[1310,1324]},["seq",{sourceInterval:[1311,1322]},["not",{sourceInterval:[1311,1316]},["terminal",{sourceInterval:[1312,1316]},`
|
|
497
|
+
`]],["app",{sourceInterval:[1317,1322]},"space",[]]]],["alt",{sourceInterval:[1326,1337]},["terminal",{sourceInterval:[1326,1330]},`
|
|
498
|
+
`],["lookahead",{sourceInterval:[1333,1337]},["terminal",{sourceInterval:[1334,1337]},"}"]]]]],name:["define",{sourceInterval:[1342,1382]},"a name",[],["seq",{sourceInterval:[1363,1382]},["app",{sourceInterval:[1363,1372]},"nameFirst",[]],["star",{sourceInterval:[1373,1382]},["app",{sourceInterval:[1373,1381]},"nameRest",[]]]]],nameFirst:["define",{sourceInterval:[1386,1418]},null,[],["alt",{sourceInterval:[1402,1418]},["terminal",{sourceInterval:[1402,1405]},"_"],["app",{sourceInterval:[1412,1418]},"letter",[]]]],nameRest:["define",{sourceInterval:[1422,1452]},null,[],["alt",{sourceInterval:[1437,1452]},["terminal",{sourceInterval:[1437,1440]},"_"],["app",{sourceInterval:[1447,1452]},"alnum",[]]]],ident:["define",{sourceInterval:[1456,1489]},"an identifier",[],["app",{sourceInterval:[1485,1489]},"name",[]]],terminal:["define",{sourceInterval:[1493,1531]},null,[],["seq",{sourceInterval:[1508,1531]},["terminal",{sourceInterval:[1508,1512]},'"'],["star",{sourceInterval:[1513,1526]},["app",{sourceInterval:[1513,1525]},"terminalChar",[]]],["terminal",{sourceInterval:[1527,1531]},'"']]],oneCharTerminal:["define",{sourceInterval:[1535,1579]},null,[],["seq",{sourceInterval:[1557,1579]},["terminal",{sourceInterval:[1557,1561]},'"'],["app",{sourceInterval:[1562,1574]},"terminalChar",[]],["terminal",{sourceInterval:[1575,1579]},'"']]],terminalChar:["define",{sourceInterval:[1583,1660]},null,[],["alt",{sourceInterval:[1602,1660]},["app",{sourceInterval:[1602,1612]},"escapeChar",[]],["seq",{sourceInterval:[1621,1660]},["not",{sourceInterval:[1621,1626]},["terminal",{sourceInterval:[1622,1626]},"\\"]],["not",{sourceInterval:[1627,1632]},["terminal",{sourceInterval:[1628,1632]},'"']],["not",{sourceInterval:[1633,1638]},["terminal",{sourceInterval:[1634,1638]},`
|
|
499
|
+
`]],["range",{sourceInterval:[1639,1660]},"\0","\u{10FFFF}"]]]],escapeChar_backslash:["define",{sourceInterval:[1703,1758]},null,[],["terminal",{sourceInterval:[1703,1709]},"\\\\"]],escapeChar_doubleQuote:["define",{sourceInterval:[1765,1822]},null,[],["terminal",{sourceInterval:[1765,1771]},'\\"']],escapeChar_singleQuote:["define",{sourceInterval:[1829,1886]},null,[],["terminal",{sourceInterval:[1829,1835]},"\\'"]],escapeChar_backspace:["define",{sourceInterval:[1893,1948]},null,[],["terminal",{sourceInterval:[1893,1898]},"\\b"]],escapeChar_lineFeed:["define",{sourceInterval:[1955,2009]},null,[],["terminal",{sourceInterval:[1955,1960]},"\\n"]],escapeChar_carriageReturn:["define",{sourceInterval:[2016,2076]},null,[],["terminal",{sourceInterval:[2016,2021]},"\\r"]],escapeChar_tab:["define",{sourceInterval:[2083,2132]},null,[],["terminal",{sourceInterval:[2083,2088]},"\\t"]],escapeChar_unicodeCodePoint:["define",{sourceInterval:[2139,2243]},null,[],["seq",{sourceInterval:[2139,2221]},["terminal",{sourceInterval:[2139,2145]},"\\u{"],["app",{sourceInterval:[2146,2154]},"hexDigit",[]],["opt",{sourceInterval:[2155,2164]},["app",{sourceInterval:[2155,2163]},"hexDigit",[]]],["opt",{sourceInterval:[2165,2174]},["app",{sourceInterval:[2165,2173]},"hexDigit",[]]],["opt",{sourceInterval:[2188,2197]},["app",{sourceInterval:[2188,2196]},"hexDigit",[]]],["opt",{sourceInterval:[2198,2207]},["app",{sourceInterval:[2198,2206]},"hexDigit",[]]],["opt",{sourceInterval:[2208,2217]},["app",{sourceInterval:[2208,2216]},"hexDigit",[]]],["terminal",{sourceInterval:[2218,2221]},"}"]]],escapeChar_unicodeEscape:["define",{sourceInterval:[2250,2309]},null,[],["seq",{sourceInterval:[2250,2291]},["terminal",{sourceInterval:[2250,2255]},"\\u"],["app",{sourceInterval:[2256,2264]},"hexDigit",[]],["app",{sourceInterval:[2265,2273]},"hexDigit",[]],["app",{sourceInterval:[2274,2282]},"hexDigit",[]],["app",{sourceInterval:[2283,2291]},"hexDigit",[]]]],escapeChar_hexEscape:["define",{sourceInterval:[2316,2371]},null,[],["seq",{sourceInterval:[2316,2339]},["terminal",{sourceInterval:[2316,2321]},"\\x"],["app",{sourceInterval:[2322,2330]},"hexDigit",[]],["app",{sourceInterval:[2331,2339]},"hexDigit",[]]]],escapeChar:["define",{sourceInterval:[1664,2371]},"an escape sequence",[],["alt",{sourceInterval:[1703,2371]},["app",{sourceInterval:[1703,1709]},"escapeChar_backslash",[]],["app",{sourceInterval:[1765,1771]},"escapeChar_doubleQuote",[]],["app",{sourceInterval:[1829,1835]},"escapeChar_singleQuote",[]],["app",{sourceInterval:[1893,1898]},"escapeChar_backspace",[]],["app",{sourceInterval:[1955,1960]},"escapeChar_lineFeed",[]],["app",{sourceInterval:[2016,2021]},"escapeChar_carriageReturn",[]],["app",{sourceInterval:[2083,2088]},"escapeChar_tab",[]],["app",{sourceInterval:[2139,2221]},"escapeChar_unicodeCodePoint",[]],["app",{sourceInterval:[2250,2291]},"escapeChar_unicodeEscape",[]],["app",{sourceInterval:[2316,2339]},"escapeChar_hexEscape",[]]]],space:["extend",{sourceInterval:[2375,2394]},null,[],["app",{sourceInterval:[2387,2394]},"comment",[]]],comment_singleLine:["define",{sourceInterval:[2412,2458]},null,[],["seq",{sourceInterval:[2412,2443]},["terminal",{sourceInterval:[2412,2416]},"//"],["star",{sourceInterval:[2417,2429]},["seq",{sourceInterval:[2418,2427]},["not",{sourceInterval:[2418,2423]},["terminal",{sourceInterval:[2419,2423]},`
|
|
500
|
+
`]],["app",{sourceInterval:[2424,2427]},"any",[]]]],["lookahead",{sourceInterval:[2430,2443]},["alt",{sourceInterval:[2432,2442]},["terminal",{sourceInterval:[2432,2436]},`
|
|
501
|
+
`],["app",{sourceInterval:[2439,2442]},"end",[]]]]]],comment_multiLine:["define",{sourceInterval:[2465,2501]},null,[],["seq",{sourceInterval:[2465,2487]},["terminal",{sourceInterval:[2465,2469]},"/*"],["star",{sourceInterval:[2470,2482]},["seq",{sourceInterval:[2471,2480]},["not",{sourceInterval:[2471,2476]},["terminal",{sourceInterval:[2472,2476]},"*/"]],["app",{sourceInterval:[2477,2480]},"any",[]]]],["terminal",{sourceInterval:[2483,2487]},"*/"]]],comment:["define",{sourceInterval:[2398,2501]},null,[],["alt",{sourceInterval:[2412,2501]},["app",{sourceInterval:[2412,2443]},"comment_singleLine",[]],["app",{sourceInterval:[2465,2487]},"comment_multiLine",[]]]],tokens:["define",{sourceInterval:[2505,2520]},null,[],["star",{sourceInterval:[2514,2520]},["app",{sourceInterval:[2514,2519]},"token",[]]]],token:["define",{sourceInterval:[2524,2600]},null,[],["alt",{sourceInterval:[2532,2600]},["app",{sourceInterval:[2532,2540]},"caseName",[]],["app",{sourceInterval:[2543,2550]},"comment",[]],["app",{sourceInterval:[2553,2558]},"ident",[]],["app",{sourceInterval:[2561,2569]},"operator",[]],["app",{sourceInterval:[2572,2583]},"punctuation",[]],["app",{sourceInterval:[2586,2594]},"terminal",[]],["app",{sourceInterval:[2597,2600]},"any",[]]]],operator:["define",{sourceInterval:[2604,2669]},null,[],["alt",{sourceInterval:[2615,2669]},["terminal",{sourceInterval:[2615,2619]},"<:"],["terminal",{sourceInterval:[2622,2625]},"="],["terminal",{sourceInterval:[2628,2632]},":="],["terminal",{sourceInterval:[2635,2639]},"+="],["terminal",{sourceInterval:[2642,2645]},"*"],["terminal",{sourceInterval:[2648,2651]},"+"],["terminal",{sourceInterval:[2654,2657]},"?"],["terminal",{sourceInterval:[2660,2663]},"~"],["terminal",{sourceInterval:[2666,2669]},"&"]]],punctuation:["define",{sourceInterval:[2673,2709]},null,[],["alt",{sourceInterval:[2687,2709]},["terminal",{sourceInterval:[2687,2690]},"<"],["terminal",{sourceInterval:[2693,2696]},">"],["terminal",{sourceInterval:[2699,2702]},","],["terminal",{sourceInterval:[2705,2709]},"--"]]]}]),Kg=Object.create(he.prototype);function Kx(t,e){for(let r in t)if(r===e)return!0;return!1}function hy(t,e,r,i){let n=new _a(i),s,a,o,u=!1;return(r||jl).createSemantics().addOperation("visit",{Grammars(h){return h.children.map(p=>p.visit())},Grammar(h,p,m,v,S){let b=h.visit();s=n.newGrammar(b),p.child(0)&&p.child(0).visit(),v.children.map(k=>k.visit());let g=s.build();if(g.source=this.source.trimmed(),Kx(e,b))throw gj(g);return e[b]=g,g},SuperGrammar(h,p){let m=p.visit();if(m==="null")s.withSuperGrammar(null);else{if(!e||!Kx(e,m))throw mj(m,e,p.source);s.withSuperGrammar(e[m])}},Rule_define(h,p,m,v,S){a=h.visit(),o=p.children.map(w=>w.visit())[0]||[],!s.defaultStartRule&&s.ensureSuperGrammar()!==vr.ProtoBuiltInRules&&s.withDefaultStartRule(a);let b=S.visit(),g=m.children.map(w=>w.visit())[0],k=this.source.trimmed();return s.define(a,o,b,g,k)},Rule_override(h,p,m,v){a=h.visit(),o=p.children.map(g=>g.visit())[0]||[];let S=this.source.trimmed();s.ensureSuperGrammarRuleForOverriding(a,S),u=!0;let b=v.visit();return u=!1,s.override(a,o,b,null,S)},Rule_extend(h,p,m,v){a=h.visit(),o=p.children.map(g=>g.visit())[0]||[];let S=v.visit(),b=this.source.trimmed();return s.extend(a,o,S,null,b)},RuleBody(h,p){return n.alt(...p.visit()).withSource(this.source)},OverrideRuleBody(h,p){let m=p.visit(),v=m.indexOf(Kg);if(v>=0){let S=m.slice(0,v),b=m.slice(v+1);return b.forEach(g=>{if(g===Kg)throw Aj(g)}),new hs(s.superGrammar,a,S,b).withSource(this.source)}else return n.alt(...m).withSource(this.source)},Formals(h,p,m){return p.visit()},Params(h,p,m){return p.visit()},Alt(h){return n.alt(...h.visit()).withSource(this.source)},TopLevelTerm_inline(h,p){let m=a+"_"+p.visit(),v=h.visit(),S=this.source.trimmed(),b=!(s.superGrammar&&s.superGrammar.rules[m]);u&&!b?s.override(m,o,v,null,S):s.define(m,o,v,null,S);let g=o.map(k=>n.app(k));return n.app(m,g).withSource(v.source)},OverrideTopLevelTerm_superSplice(h){return Kg},Seq(h){return n.seq(...h.children.map(p=>p.visit())).withSource(this.source)},Iter_star(h,p){return n.star(h.visit()).withSource(this.source)},Iter_plus(h,p){return n.plus(h.visit()).withSource(this.source)},Iter_opt(h,p){return n.opt(h.visit()).withSource(this.source)},Pred_not(h,p){return n.not(p.visit()).withSource(this.source)},Pred_lookahead(h,p){return n.lookahead(p.visit()).withSource(this.source)},Lex_lex(h,p){return n.lex(p.visit()).withSource(this.source)},Base_application(h,p){let m=p.children.map(v=>v.visit())[0]||[];return n.app(h.visit(),m).withSource(this.source)},Base_range(h,p,m){return n.range(h.visit(),m.visit()).withSource(this.source)},Base_terminal(h){return n.terminal(h.visit()).withSource(this.source)},Base_paren(h,p,m){return p.visit()},ruleDescr(h,p,m){return p.visit()},ruleDescrText(h){return this.sourceString.trim()},caseName(h,p,m,v,S){return m.visit()},name(h,p){return this.sourceString},nameFirst(h){},nameRest(h){},terminal(h,p,m){return p.children.map(v=>v.visit()).join("")},oneCharTerminal(h,p,m){return p.visit()},escapeChar(h){try{return rk(this.sourceString)}catch(p){throw p instanceof RangeError&&p.message.startsWith("Invalid code point ")?Tj(h):p}},NonemptyListOf(h,p,m){return[h.visit()].concat(m.children.map(v=>v.visit()))},EmptyListOf(){return[]},_terminal(){return this.sourceString}})(t).visit()}var Kj=Fl(["grammar",{source:`OperationsAndAttributes {
|
|
502
|
+
|
|
503
|
+
AttributeSignature =
|
|
504
|
+
name
|
|
505
|
+
|
|
506
|
+
OperationSignature =
|
|
507
|
+
name Formals?
|
|
508
|
+
|
|
509
|
+
Formals
|
|
510
|
+
= "(" ListOf<name, ","> ")"
|
|
511
|
+
|
|
512
|
+
name (a name)
|
|
513
|
+
= nameFirst nameRest*
|
|
514
|
+
|
|
515
|
+
nameFirst
|
|
516
|
+
= "_"
|
|
517
|
+
| letter
|
|
518
|
+
|
|
519
|
+
nameRest
|
|
520
|
+
= "_"
|
|
521
|
+
| alnum
|
|
522
|
+
|
|
523
|
+
}`},"OperationsAndAttributes",null,"AttributeSignature",{AttributeSignature:["define",{sourceInterval:[29,58]},null,[],["app",{sourceInterval:[54,58]},"name",[]]],OperationSignature:["define",{sourceInterval:[62,100]},null,[],["seq",{sourceInterval:[87,100]},["app",{sourceInterval:[87,91]},"name",[]],["opt",{sourceInterval:[92,100]},["app",{sourceInterval:[92,99]},"Formals",[]]]]],Formals:["define",{sourceInterval:[104,143]},null,[],["seq",{sourceInterval:[118,143]},["terminal",{sourceInterval:[118,121]},"("],["app",{sourceInterval:[122,139]},"ListOf",[["app",{sourceInterval:[129,133]},"name",[]],["terminal",{sourceInterval:[135,138]},","]]],["terminal",{sourceInterval:[140,143]},")"]]],name:["define",{sourceInterval:[147,187]},"a name",[],["seq",{sourceInterval:[168,187]},["app",{sourceInterval:[168,177]},"nameFirst",[]],["star",{sourceInterval:[178,187]},["app",{sourceInterval:[178,186]},"nameRest",[]]]]],nameFirst:["define",{sourceInterval:[191,223]},null,[],["alt",{sourceInterval:[207,223]},["terminal",{sourceInterval:[207,210]},"_"],["app",{sourceInterval:[217,223]},"letter",[]]]],nameRest:["define",{sourceInterval:[227,257]},null,[],["alt",{sourceInterval:[242,257]},["terminal",{sourceInterval:[242,245]},"_"],["app",{sourceInterval:[252,257]},"alnum",[]]]]}]);Qj(vr.BuiltInRules);Yj(Kj);function Qj(t){let e={empty(){return this.iteration()},nonEmpty(r,i,n){return this.iteration([r].concat(n.children))},self(...r){return this}};_r.BuiltInSemantics=_r.createSemantics(t,null).addOperation("asIteration",{emptyListOf:e.empty,nonemptyListOf:e.nonEmpty,EmptyListOf:e.empty,NonemptyListOf:e.nonEmpty,_iter:e.self})}function Yj(t){_r.prototypeGrammarSemantics=t.createSemantics().addOperation("parse",{AttributeSignature(e){return{name:e.parse(),formals:[]}},OperationSignature(e,r){return{name:e.parse(),formals:r.children.map(i=>i.parse())[0]||[]}},Formals(e,r,i){return r.asIteration().children.map(n=>n.parse())},name(e,r){return this.sourceString}}),_r.prototypeGrammar=t}function Xj(t){let e=0,r=[0],i=()=>r[r.length-1],n={},s=/( *).*(?:$|\r?\n|\r)/g,a;for(;(a=s.exec(t))!=null;){let[o,u]=a;if(o.length===0)break;let l=u.length,f=i(),h=e+l;if(l>f)r.push(l),n[h]=1;else if(l<f){let p=r.length;for(;i()!==l;)r.pop();n[h]=-1*(p-r.length)}e+=o.length}return r.length>1&&(n[e]=1-r.length),n}var dk="an indented block",mk="a dedent",Qx=1114112,oy=class extends ga{constructor(e){super(e.input),this.state=e}_indentationAt(e){return this.state.userData[e]||0}atEnd(){return super.atEnd()&&this._indentationAt(this.pos)===0}next(){if(this._indentationAt(this.pos)!==0){this.examinedLength=Math.max(this.examinedLength,this.pos);return}return super.next()}nextCharCode(){return this._indentationAt(this.pos)!==0?(this.examinedLength=Math.max(this.examinedLength,this.pos),Qx):super.nextCharCode()}nextCodePoint(){return this._indentationAt(this.pos)!==0?(this.examinedLength=Math.max(this.examinedLength,this.pos),Qx):super.nextCodePoint()}},Ml=class extends he{constructor(e=!0){super(),this.isIndent=e}allowsSkippingPrecedingSpace(){return!0}eval(e){let{inputStream:r}=e,i=e.userData;e.doNotMemoize=!0;let n=r.pos,s=this.isIndent?1:-1;return(i[n]||0)*s>0?(e.userData=Object.create(i),e.userData[n]-=s,e.pushBinding(new Ji(0),n),!0):(e.processFailure(n,this),!1)}getArity(){return 1}_assertAllApplicationsAreValid(e,r){}_isNullable(e,r){return!1}assertChoicesHaveUniformArity(e){}assertIteratedExprsAreNotNullable(e){}introduceParams(e){return this}substituteParams(e){return this}toString(){return this.isIndent?"indent":"dedent"}toDisplayString(){return this.toString()}toFailure(e){let r=this.isIndent?dk:mk;return new br(this,r,"description")}},Zj=new ke("indent"),e6=new ke("dedent"),t6=new hs(py,"any",[Zj,e6],[]),gk=new _a().newGrammar("IndentationSensitive").withSuperGrammar(py).define("indent",[],new Ml(!0),dk,void 0,!0).define("dedent",[],new Ml(!1),mk,void 0,!0).extend("any",[],t6,"any character",void 0).build();Object.assign(gk,{_matchStateInitializer(t){t.userData=Xj(t.input),t.inputStream=new oy(t)},supportsIncrementalParsing:!1});var r6="17.5.0";vr.initApplicationParser(jl,hy);var i6=t=>!!t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t);function n6(t,e,r){let i=jl.match(t,"Grammars");if(i.failed())throw dj(i);return hy(i,e,void 0,r)}function s6(t,e,r){let i=yk(t,e,r),n=Object.keys(i);if(n.length===0)throw new Error("Missing grammar definition");if(n.length>1){let a=i[n[1]].source;throw new Error(ly(a.sourceString,a.startIdx)+"Found more than one grammar definition -- use ohm.grammars() instead.")}return i[n[0]]}function yk(t,e,r){let i=Object.create(e||{});if(typeof t!="string")if(i6(t))t=t.toString();else throw new TypeError("Expected string as first argument, got "+uy(t));return n6(t,i,r),i}function a6(t,e){return s6(t,e)}function o6(t,e){return yk(t,e)}Ai.ExperimentalIndentationSensitive=gk;Ai._buildGrammar=hy;Ai.grammar=a6;Ai.grammars=o6;Ai.makeRecipe=Fl;Ai.ohmGrammar=jl;Ai.pexprs=Wj;Ai.version=r6});var bk=T((Sne,vk)=>{y();vk.exports=String.raw`Helpers {
|
|
524
|
+
Node = TextNode*
|
|
525
|
+
TextNode = AnyExceptPlus<openControl>
|
|
526
|
+
openControl = end
|
|
527
|
+
|
|
528
|
+
empty = /* nothing */
|
|
529
|
+
anyExcept<lit> = (~ lit any)
|
|
530
|
+
anyExceptStar<lit> = (~ lit any)*
|
|
531
|
+
anyExceptPlus<lit> = (~ lit any)+
|
|
532
|
+
AnyExcept<lit> = (~ lit any)
|
|
533
|
+
AnyExceptPlus<lit> = (~ lit any)+
|
|
534
|
+
AnyExceptStar<lit> = (~ lit any)*
|
|
535
|
+
identifierCharacter = alnum | "_" | "-"
|
|
536
|
+
|
|
537
|
+
orderedListOf<a, b, sep> =
|
|
538
|
+
| nonemptyOrderedListOf<a, b, sep>
|
|
539
|
+
| emptyListOf<a, sep>
|
|
540
|
+
nonemptyOrderedListOf<a, b, sep> =
|
|
541
|
+
| nonemptyListOf<b, sep>
|
|
542
|
+
| nonemptyOrderedListOfBoth<a, b, sep>
|
|
543
|
+
| nonemptyListOf<a, sep>
|
|
544
|
+
nonemptyOrderedListOfBoth<a, b, sep> =
|
|
545
|
+
nonemptyListOf<a, sep> (sep nonemptyListOf<b, sep>)
|
|
546
|
+
|
|
547
|
+
singleQuote = "'" | "‘" | "’"
|
|
548
|
+
doubleQuote = "\"" | "“" | "”"
|
|
549
|
+
controls = "\u{007F}".."\u{009F}"
|
|
550
|
+
noncharacters = "\u{FDD0}".."\u{FDEF}"
|
|
551
|
+
newline = "\r"? "\n"
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
Liquid <: Helpers {
|
|
555
|
+
Node := (liquidNode | TextNode)*
|
|
556
|
+
openControl := "{{" | "{%"
|
|
557
|
+
endOfTagName = &("-%}" | "-}}" | "%}" | "}}")
|
|
558
|
+
endOfVarName = ~identifierCharacter
|
|
559
|
+
endOfIdentifier = endOfTagName | endOfVarName
|
|
560
|
+
|
|
561
|
+
liquidNode =
|
|
562
|
+
| liquidDoc
|
|
563
|
+
| liquidBlockComment
|
|
564
|
+
| liquidRawTag
|
|
565
|
+
| liquidDrop
|
|
566
|
+
| liquidTagClose
|
|
567
|
+
| liquidTagOpen
|
|
568
|
+
| liquidTag
|
|
569
|
+
| liquidInlineComment
|
|
570
|
+
|
|
571
|
+
liquidTagStrict =
|
|
572
|
+
| liquidTagAssign
|
|
573
|
+
| liquidTagBreak
|
|
574
|
+
| liquidTagContinue
|
|
575
|
+
| liquidTagCycle
|
|
576
|
+
| liquidTagContentFor
|
|
577
|
+
| liquidTagDecrement
|
|
578
|
+
| liquidTagEcho
|
|
579
|
+
| liquidTagElse
|
|
580
|
+
| liquidTagElsif
|
|
581
|
+
| liquidTagInclude
|
|
582
|
+
| liquidTagIncrement
|
|
583
|
+
| liquidTagLayout
|
|
584
|
+
| liquidTagLiquid
|
|
585
|
+
| liquidTagRender
|
|
586
|
+
| liquidTagSection
|
|
587
|
+
| liquidTagSections
|
|
588
|
+
| liquidTagWhen
|
|
589
|
+
|
|
590
|
+
liquidTag =
|
|
591
|
+
| liquidTagStrict
|
|
592
|
+
| liquidTagBaseCase
|
|
593
|
+
|
|
594
|
+
liquidTagOpenStrict =
|
|
595
|
+
| liquidTagOpenCase
|
|
596
|
+
| liquidTagOpenCapture
|
|
597
|
+
| liquidTagOpenForm
|
|
598
|
+
| liquidTagOpenFor
|
|
599
|
+
| liquidTagOpenTablerow
|
|
600
|
+
| liquidTagOpenIf
|
|
601
|
+
| liquidTagOpenPaginate
|
|
602
|
+
| liquidTagOpenUnless
|
|
603
|
+
|
|
604
|
+
liquidTagOpen =
|
|
605
|
+
| liquidTagOpenStrict
|
|
606
|
+
| liquidTagOpenBaseCase
|
|
607
|
+
|
|
608
|
+
liquidTagClose = "{%" "-"? space* "end" blockName space* tagMarkup "-"? "%}"
|
|
609
|
+
|
|
610
|
+
// These two are the same but transformed differently
|
|
611
|
+
liquidTagRule<name, markup> =
|
|
612
|
+
"{%" "-"? space* (name endOfIdentifier) space* markup "-"? "%}"
|
|
613
|
+
liquidTagOpenRule<name, markup> =
|
|
614
|
+
"{%" "-"? space* (name endOfIdentifier) space* markup "-"? "%}"
|
|
615
|
+
|
|
616
|
+
liquidTagBaseCase = liquidTagRule<liquidTagName, tagMarkup>
|
|
617
|
+
|
|
618
|
+
liquidTagEcho = liquidTagRule<"echo", liquidTagEchoMarkup>
|
|
619
|
+
liquidTagEchoMarkup = liquidVariable<delimTag>
|
|
620
|
+
|
|
621
|
+
liquidTagAssign = liquidTagRule<"assign", liquidTagAssignMarkup>
|
|
622
|
+
liquidTagAssignMarkup = variableSegment space* "=" space* liquidVariable<delimTag>
|
|
623
|
+
|
|
624
|
+
liquidTagCycle = liquidTagRule<"cycle", liquidTagCycleMarkup>
|
|
625
|
+
liquidTagCycleMarkup = (liquidExpression<delimTag> ":")? space* nonemptyListOf<liquidExpression<delimTag>, argumentSeparator> space*
|
|
626
|
+
|
|
627
|
+
liquidTagIncrement = liquidTagRule<"increment", variableSegmentAsLookupMarkup>
|
|
628
|
+
liquidTagDecrement = liquidTagRule<"decrement", variableSegmentAsLookupMarkup>
|
|
629
|
+
liquidTagOpenCapture = liquidTagOpenRule<"capture", variableSegmentAsLookupMarkup>
|
|
630
|
+
variableSegmentAsLookupMarkup = variableSegmentAsLookup space*
|
|
631
|
+
|
|
632
|
+
liquidTagSection = liquidTagRule<"section", liquidTagSectionMarkup>
|
|
633
|
+
liquidTagSectionMarkup = liquidString<delimTag> space*
|
|
634
|
+
|
|
635
|
+
liquidTagSections = liquidTagRule<"sections", liquidTagSectionsMarkup>
|
|
636
|
+
liquidTagSectionsMarkup = liquidString<delimTag> space*
|
|
637
|
+
|
|
638
|
+
liquidTagLayout = liquidTagRule<"layout", liquidTagLayoutMarkup>
|
|
639
|
+
liquidTagLayoutMarkup = liquidExpression<delimTag> space*
|
|
640
|
+
|
|
641
|
+
// We'll black hole the statement and switch parser in the cst builder
|
|
642
|
+
// We do this because it's technically the same grammar (with minor redefinitions)
|
|
643
|
+
// and it would be a huge chore and maintenance hell to rewrite all the rules with
|
|
644
|
+
// hspace = " " | "\t"
|
|
645
|
+
//
|
|
646
|
+
// The alternative is that this grammar parses the {% liquid tagMarkup %} as its own string,
|
|
647
|
+
// and then we switch to the LiquidStatement grammar that
|
|
648
|
+
// redefines liquidTagOpenRule, liquidTagRule, and space.
|
|
649
|
+
liquidTagLiquid = liquidTagRule<"liquid", liquidTagLiquidMarkup>
|
|
650
|
+
liquidTagLiquidMarkup = tagMarkup
|
|
651
|
+
|
|
652
|
+
liquidTagContentFor = liquidTagRule<"content_for", liquidTagContentForMarkup>
|
|
653
|
+
|
|
654
|
+
liquidTagContentForMarkup =
|
|
655
|
+
contentForType (argumentSeparatorOptionalComma contentForTagArgument) (space* ",")? space*
|
|
656
|
+
|
|
657
|
+
contentForTagArgument = listOf<contentForNamedArgument<delimTag>, argumentSeparatorOptionalComma>
|
|
658
|
+
completionModeContentForTagArgument = listOf<contentForNamedArgument<delimTag>, argumentSeparatorOptionalComma> (argumentSeparator? (liquidVariableLookup<delimTag>))?
|
|
659
|
+
contentForNamedArgument<delim> = (variableSegment ("." variableSegment)*) space* ":" space* (liquidExpression<delim>)
|
|
660
|
+
|
|
661
|
+
contentForType = liquidString<delimTag>
|
|
662
|
+
|
|
663
|
+
liquidTagInclude = liquidTagRule<"include", liquidTagRenderMarkup>
|
|
664
|
+
liquidTagRender = liquidTagRule<"render", liquidTagRenderMarkup>
|
|
665
|
+
liquidTagRenderMarkup =
|
|
666
|
+
snippetExpression renderVariableExpression? renderAliasExpression? renderArguments
|
|
667
|
+
|
|
668
|
+
renderArguments = (argumentSeparatorOptionalComma tagArguments) (space* ",")? space*
|
|
669
|
+
completionModeRenderArguments = (argumentSeparatorOptionalComma tagArguments) (space* ",")? space* (argumentSeparator? liquidVariableLookup<delimTag> space*)?
|
|
670
|
+
snippetExpression = liquidString<delimTag> | variableSegmentAsLookup
|
|
671
|
+
renderVariableExpression = space+ ("for" | "with") space+ liquidExpression<delimTag>
|
|
672
|
+
renderAliasExpression = space+ "as" space+ variableSegment
|
|
673
|
+
|
|
674
|
+
liquidTagOpenBaseCase = liquidTagOpenRule<blockName, tagMarkup>
|
|
675
|
+
|
|
676
|
+
liquidTagOpenForm = liquidTagOpenRule<"form", liquidTagOpenFormMarkup>
|
|
677
|
+
liquidTagOpenFormMarkup = arguments<delimTag> (space* ",")? space*
|
|
678
|
+
|
|
679
|
+
liquidTagOpenFor = liquidTagOpenRule<"for", liquidTagOpenForMarkup>
|
|
680
|
+
liquidTagOpenForMarkup =
|
|
681
|
+
variableSegment space* "in" space* liquidExpression<delimTag>
|
|
682
|
+
(space* "reversed")? argumentSeparatorOptionalComma
|
|
683
|
+
tagArguments (space* ",")? space*
|
|
684
|
+
|
|
685
|
+
// It's the same, the difference is support for different named arguments<delim>
|
|
686
|
+
liquidTagOpenTablerow = liquidTagOpenRule<"tablerow", liquidTagOpenForMarkup>
|
|
687
|
+
|
|
688
|
+
liquidTagOpenCase = liquidTagOpenRule<"case", liquidTagOpenCaseMarkup>
|
|
689
|
+
liquidTagOpenCaseMarkup = liquidExpression<delimTag> space*
|
|
690
|
+
|
|
691
|
+
liquidTagWhen = liquidTagRule<"when", liquidTagWhenMarkup>
|
|
692
|
+
liquidTagWhenMarkup = nonemptyListOf<liquidExpression<delimTag>, whenMarkupSep> space*
|
|
693
|
+
whenMarkupSep = space* ("," | "or" ~identifier) space*
|
|
694
|
+
|
|
695
|
+
liquidTagOpenIf = liquidTagOpenRule<"if", liquidTagOpenConditionalMarkup>
|
|
696
|
+
liquidTagOpenUnless = liquidTagOpenRule<"unless", liquidTagOpenConditionalMarkup>
|
|
697
|
+
liquidTagElsif = liquidTagRule<"elsif", liquidTagOpenConditionalMarkup>
|
|
698
|
+
|
|
699
|
+
liquidTagBreak = liquidTagRule<"break", empty>
|
|
700
|
+
liquidTagContinue = liquidTagRule<"continue", empty>
|
|
701
|
+
liquidTagElse = liquidTagRule<"else", empty>
|
|
702
|
+
|
|
703
|
+
liquidTagOpenConditionalMarkup = nonemptyListOf<condition<delimTag>, conditionSeparator> space*
|
|
704
|
+
conditionSeparator = &logicalOperator
|
|
705
|
+
condition<delim> = logicalOperator? space* (comparison<delim> | liquidExpression<delim>) space*
|
|
706
|
+
logicalOperator = ("and" | "or") ~identifier
|
|
707
|
+
comparison<delim> = liquidExpression<delim> space* comparator space* liquidExpression<delim>
|
|
708
|
+
comparator =
|
|
709
|
+
( "=="
|
|
710
|
+
| "!="
|
|
711
|
+
| ">="
|
|
712
|
+
| "<="
|
|
713
|
+
| ">"
|
|
714
|
+
| "<")
|
|
715
|
+
| ("contains" ~identifier)
|
|
716
|
+
|
|
717
|
+
liquidTagOpenPaginate = liquidTagOpenRule<"paginate", liquidTagOpenPaginateMarkup>
|
|
718
|
+
liquidTagOpenPaginateMarkup =
|
|
719
|
+
liquidExpression<delimTag> space+ "by" space+ liquidExpression<delimTag> argumentSeparatorOptionalComma tagArguments (space* ",")? space*
|
|
720
|
+
|
|
721
|
+
liquidDrop = "{{" "-"? space* liquidDropCases "-"? "}}"
|
|
722
|
+
liquidDropCases = liquidVariable<delimVO> | liquidDropBaseCase
|
|
723
|
+
liquidDropBaseCase = anyExceptStar<delimVO>
|
|
724
|
+
liquidInlineComment = "{%" "-"? space* "#" space? tagMarkup "-"? "%}"
|
|
725
|
+
|
|
726
|
+
liquidRawTag =
|
|
727
|
+
| liquidRawTagImpl<"raw">
|
|
728
|
+
| liquidRawTagImpl<"javascript">
|
|
729
|
+
| liquidRawTagImpl<"schema">
|
|
730
|
+
| liquidRawTagImpl<"stylesheet">
|
|
731
|
+
| liquidRawTagImpl<"style">
|
|
732
|
+
liquidRawTagImpl<name> =
|
|
733
|
+
"{%" "-"? space* (name endOfIdentifier) space* tagMarkup "-"? "%}"
|
|
734
|
+
anyExceptStar<liquidRawTagClose<name>>
|
|
735
|
+
"{%" "-"? space* "end" (name endOfIdentifier) space* "-"? "%}"
|
|
736
|
+
liquidRawTagClose<name> =
|
|
737
|
+
"{%" "-"? space* "end" (name endOfIdentifier) space* "-"? "%}"
|
|
738
|
+
|
|
739
|
+
liquidBlockComment =
|
|
740
|
+
commentBlockStart
|
|
741
|
+
(liquidBlockComment | anyExceptPlus<(commentBlockStart | commentBlockEnd)>)*
|
|
742
|
+
commentBlockEnd
|
|
743
|
+
commentBlockStart = "{%" "-"? space* ("comment" endOfIdentifier) space* tagMarkup "-"? "%}"
|
|
744
|
+
commentBlockEnd = "{%" "-"? space* ("endcomment" endOfIdentifier) space* tagMarkup "-"? "%}"
|
|
745
|
+
|
|
746
|
+
liquidDoc =
|
|
747
|
+
liquidDocStart
|
|
748
|
+
liquidDocBody
|
|
749
|
+
liquidDocEnd
|
|
750
|
+
|
|
751
|
+
liquidDocStart = "{%" "-"? space* ("doc" endOfIdentifier) space* tagMarkup "-"? "%}"
|
|
752
|
+
liquidDocEnd = "{%" "-"? space* ("enddoc" endOfIdentifier) space* tagMarkup "-"? "%}"
|
|
753
|
+
liquidDocBody = anyExceptStar<(liquidDocStart | liquidDocEnd)>
|
|
754
|
+
|
|
755
|
+
// In order for the grammar to "fallback" to the base case, this
|
|
756
|
+
// rule must pass if and only if we support what we parse. This
|
|
757
|
+
// implies that—since we don't support filters yet—we have a
|
|
758
|
+
// positive lookahead on "-}}" or "}}" in the rule. We do this
|
|
759
|
+
// because we'd otherwise positively match the following string
|
|
760
|
+
// instead of falling back to the other rule:
|
|
761
|
+
// {{ 'string' | some_filter }}
|
|
762
|
+
liquidVariable<delim> = liquidComplexExpression<delim> liquidFilter<delim>* space* &delim
|
|
763
|
+
|
|
764
|
+
liquidExpression<delim> =
|
|
765
|
+
| liquidString<delim>
|
|
766
|
+
| liquidNumber
|
|
767
|
+
| liquidLiteral
|
|
768
|
+
| liquidRange<delim>
|
|
769
|
+
| liquidVariableLookup<delim>
|
|
770
|
+
|
|
771
|
+
liquidComplexExpression<delim> =
|
|
772
|
+
| liquidBooleanExpression<delim>
|
|
773
|
+
| liquidExpression<delim>
|
|
774
|
+
|
|
775
|
+
liquidBooleanExpression<delim> = booleanExpressionCondition<delim> listOf<booleanExpressionSubsequentCondition<delim>, conditionSeparator>
|
|
776
|
+
|
|
777
|
+
// This might over-capture things since the conditions below can contain any ${"`"}liquidExpression${"`"}s.
|
|
778
|
+
// We will need to clean this up in CST. If we restrict the conditions to only contain comparisons and
|
|
779
|
+
// variable lookups, we can't support "truthy" expressions like ${"`"}{{ some_var and 'this' }}${"`"}
|
|
780
|
+
booleanExpressionSubsequentCondition<delim> = space* logicalOperator space* (comparison<delim> | liquidExpression<delim>) space*
|
|
781
|
+
booleanExpressionCondition<delim> = comparison<delim> | liquidExpression<delim>
|
|
782
|
+
|
|
783
|
+
liquidString<delim> = liquidSingleQuotedString<delim> | liquidDoubleQuotedString<delim>
|
|
784
|
+
liquidSingleQuotedString<delim> = "'" anyExceptStar<("'"| delim)> "'"
|
|
785
|
+
liquidDoubleQuotedString<delim> = "\"" anyExceptStar<("\""| delim)> "\""
|
|
786
|
+
|
|
787
|
+
liquidNumber = liquidFloat | liquidInteger
|
|
788
|
+
liquidInteger = "-"? digit+
|
|
789
|
+
liquidFloat = "-"? digit+ "." digit+
|
|
790
|
+
|
|
791
|
+
liquidLiteral =
|
|
792
|
+
( "true"
|
|
793
|
+
| "false"
|
|
794
|
+
| "blank"
|
|
795
|
+
| "empty"
|
|
796
|
+
| "nil"
|
|
797
|
+
| "null"
|
|
798
|
+
) endOfIdentifier
|
|
799
|
+
|
|
800
|
+
liquidRange<delim> =
|
|
801
|
+
"(" space* liquidExpression<delim> space* ".." space* liquidExpression<delim> space* ")"
|
|
802
|
+
|
|
803
|
+
liquidVariableLookup<delim> =
|
|
804
|
+
| variableSegment lookup<delim>*
|
|
805
|
+
| empty lookup<delim>+
|
|
806
|
+
lookup<delim> =
|
|
807
|
+
| indexLookup<delim>
|
|
808
|
+
| dotLookup
|
|
809
|
+
indexLookup<delim> = space* "[" space* liquidExpression<delim> space* "]"
|
|
810
|
+
dotLookup = space* "." space* identifier
|
|
811
|
+
|
|
812
|
+
liquidFilter<delim> = space* "|" space* identifier (space* ":" space* arguments<delim> (space* ",")?)?
|
|
813
|
+
|
|
814
|
+
arguments<delim> = nonemptyOrderedListOf<positionalArgument<delim>, namedArgument<delim>, argumentSeparator>
|
|
815
|
+
argumentSeparator = space* "," space*
|
|
816
|
+
argumentSeparatorOptionalComma = space* ","? space*
|
|
817
|
+
positionalArgument<delim> = liquidExpression<delim> ~(space* ":")
|
|
818
|
+
namedArgument<delim> = variableSegment space* ":" space* liquidExpression<delim>
|
|
819
|
+
tagArguments = listOf<namedArgument<delimTag>, argumentSeparatorOptionalComma>
|
|
820
|
+
filterArguments<delim> =
|
|
821
|
+
| complexArguments<delim>
|
|
822
|
+
| simpleArgument<delim>
|
|
823
|
+
complexArguments<delim> = arguments<delim> (space* "," space* simpleArgument<delim>)?
|
|
824
|
+
simpleArgument<delim> = liquidVariableLookup<delim>
|
|
825
|
+
|
|
826
|
+
variableSegment = (letter | "_") (~endOfTagName identifierCharacter)*
|
|
827
|
+
variableSegmentAsLookup = variableSegment
|
|
828
|
+
identifier = variableSegment "?"?
|
|
829
|
+
|
|
830
|
+
tagMarkup = anyExceptStar<delimTag>
|
|
831
|
+
|
|
832
|
+
liquidTagName =
|
|
833
|
+
letter (alnum | "_")*
|
|
834
|
+
|
|
835
|
+
blockName =
|
|
836
|
+
// Shopify blocks
|
|
837
|
+
( "form"
|
|
838
|
+
| "paginate"
|
|
839
|
+
// Base blocks
|
|
840
|
+
| "capture"
|
|
841
|
+
| "case"
|
|
842
|
+
| "for"
|
|
843
|
+
| "ifchanged"
|
|
844
|
+
| "if"
|
|
845
|
+
| "unless"
|
|
846
|
+
| "tablerow"
|
|
847
|
+
) endOfIdentifier
|
|
848
|
+
|
|
849
|
+
delimTag = "-%}" | "%}"
|
|
850
|
+
delimVO = "-}}" | "}}"
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
LiquidStatement <: Liquid {
|
|
854
|
+
Node := listOf<LiquidStatement, statementSep> (space | newline)*
|
|
855
|
+
|
|
856
|
+
// This is the big brains moment: we redefine space to exclude newlines.
|
|
857
|
+
//
|
|
858
|
+
// Which means that all our other Liquid rules can be reused
|
|
859
|
+
// without modification(!)
|
|
860
|
+
//
|
|
861
|
+
// We don't need to maintain rules like this:
|
|
862
|
+
// - liquidVariable<space>
|
|
863
|
+
// - liquidExpression<space>
|
|
864
|
+
// - variableLookup<space>
|
|
865
|
+
// - ... long list of stuff that takes space as param
|
|
866
|
+
// - liquidString<space>
|
|
867
|
+
//
|
|
868
|
+
// All we need is this little, VERY IMPORTANT, part right here that
|
|
869
|
+
// make it so we can parse the same way in Liquid tags.
|
|
870
|
+
//
|
|
871
|
+
// I'm putting in this huge comment so that it's more obvious.
|
|
872
|
+
space := " " | "\t"
|
|
873
|
+
|
|
874
|
+
LiquidStatement =
|
|
875
|
+
| liquidBlockComment
|
|
876
|
+
| liquidRawTag
|
|
877
|
+
| liquidTagClose
|
|
878
|
+
| liquidTagOpen
|
|
879
|
+
| liquidTag
|
|
880
|
+
| liquidInlineComment
|
|
881
|
+
|
|
882
|
+
liquidTagOpenRule<name, markup>
|
|
883
|
+
:= (name ~identifierCharacter) space* markup &liquidStatementEnd
|
|
884
|
+
|
|
885
|
+
liquidTagRule<name, markup>
|
|
886
|
+
:= (name ~identifierCharacter) space* markup &liquidStatementEnd
|
|
887
|
+
|
|
888
|
+
liquidTagClose
|
|
889
|
+
:= "end" (blockName ~identifierCharacter) space* tagMarkup &liquidStatementEnd
|
|
890
|
+
|
|
891
|
+
liquidRawTagImpl<name>
|
|
892
|
+
:= (name ~identifierCharacter) space* tagMarkup newline
|
|
893
|
+
anyExceptStar<liquidRawTagClose<name>>
|
|
894
|
+
"end" name space* &liquidStatementEnd
|
|
895
|
+
|
|
896
|
+
liquidRawTagClose<name>
|
|
897
|
+
:= "end" name space* &liquidStatementEnd
|
|
898
|
+
|
|
899
|
+
liquidBlockComment :=
|
|
900
|
+
commentBlockStart statementSep
|
|
901
|
+
(listOf<liquidCommentBlockStatement, statementSep> statementSep)?
|
|
902
|
+
commentBlockEnd
|
|
903
|
+
|
|
904
|
+
liquidCommentBlockStatement =
|
|
905
|
+
| liquidBlockComment
|
|
906
|
+
| nonTerminalCommentLine
|
|
907
|
+
|
|
908
|
+
commentBlockStart
|
|
909
|
+
:= ("comment" ~identifierCharacter) space* tagMarkup
|
|
910
|
+
|
|
911
|
+
commentBlockEnd
|
|
912
|
+
:= ("endcomment" ~identifierCharacter) space* tagMarkup
|
|
913
|
+
|
|
914
|
+
nonTerminalCommentLine
|
|
915
|
+
= ~commentBlockEnd anyExceptPlus<newline>
|
|
916
|
+
|
|
917
|
+
liquidInlineComment
|
|
918
|
+
:= "#" space? tagMarkup &liquidStatementEnd
|
|
919
|
+
|
|
920
|
+
tagMarkup := anyExceptStar<liquidStatementEnd>
|
|
921
|
+
|
|
922
|
+
// trailing whitespace, newline, + anything else before the next tag
|
|
923
|
+
statementSep = space* newline (space | newline)*
|
|
924
|
+
|
|
925
|
+
liquidStatementEnd = newline | end
|
|
926
|
+
delimTag := liquidStatementEnd
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
LiquidDoc <: Helpers {
|
|
930
|
+
Node := ImplicitDescription (LiquidDocNode | TextNode)*
|
|
931
|
+
LiquidDocNode =
|
|
932
|
+
| paramNode
|
|
933
|
+
| exampleNode
|
|
934
|
+
| descriptionNode
|
|
935
|
+
| promptNode
|
|
936
|
+
| fallbackNode
|
|
937
|
+
|
|
938
|
+
endOfDescription = strictSpace* openControl
|
|
939
|
+
descriptionContent = anyExceptStar<endOfDescription>
|
|
940
|
+
ImplicitDescription = descriptionContent
|
|
941
|
+
|
|
942
|
+
// By default, space matches new lines as well. We override it here to make writing rules easier.
|
|
943
|
+
strictSpace = " " | "\t"
|
|
944
|
+
// We use this as an escape hatch to stop matching TextNode and try again when one of these characters is encountered
|
|
945
|
+
openControl:= strictSpace* ("@" | end)
|
|
946
|
+
// List of supported tags we use to identify boundaries
|
|
947
|
+
supportedTags = "@prompt" | "@example" | "@description" | "@param"
|
|
948
|
+
|
|
949
|
+
|
|
950
|
+
paramNode = "@param" strictSpace* paramType? strictSpace* (optionalParamName | paramName) (strictSpace* "-")? strictSpace* paramDescription
|
|
951
|
+
paramType = "{" strictSpace* paramTypeContent strictSpace* "}"
|
|
952
|
+
paramTypeContent = anyExceptStar<("}"| strictSpace)>
|
|
953
|
+
|
|
954
|
+
paramName = textValue
|
|
955
|
+
optionalParamName = "[" strictSpace* textValue strictSpace* "]"
|
|
956
|
+
textValue = identifierCharacter+
|
|
957
|
+
|
|
958
|
+
paramDescription = (~"]" anyExceptStar<endOfParam>)
|
|
959
|
+
endOfParam = strictSpace* (newline | end)
|
|
960
|
+
|
|
961
|
+
// Prompt node is system-controlled, so we don't strip the leading spaces to maintain indentation
|
|
962
|
+
promptNode = "@prompt" multilineTextContent
|
|
963
|
+
exampleNode = "@example" space* multilineTextContent
|
|
964
|
+
descriptionNode = "@description" space* multilineTextContent
|
|
965
|
+
|
|
966
|
+
// We want multilineTextContent to be free-form, so instead of terminating the match at "@" we explicitly look for a suppported tag
|
|
967
|
+
// This means that malformed tags will be considered part of the multilineTextContent
|
|
968
|
+
multilineTextContent = anyExceptStar<endOfMultilineText>
|
|
969
|
+
endOfMultilineText = strictSpace* (supportedTags | end)
|
|
970
|
+
|
|
971
|
+
fallbackNode = "@" anyExceptStar<endOfParam>
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
LiquidHTML <: Liquid {
|
|
975
|
+
Node := yamlFrontmatter? (HtmlNode | liquidNode | TextNode)*
|
|
976
|
+
openControl += "<"
|
|
977
|
+
|
|
978
|
+
yamlFrontmatter =
|
|
979
|
+
"---" newline anyExceptStar<"---"> "---" newline
|
|
980
|
+
|
|
981
|
+
HtmlNode =
|
|
982
|
+
| HtmlDoctype
|
|
983
|
+
| HtmlComment
|
|
984
|
+
| HtmlRawTag
|
|
985
|
+
| HtmlVoidElement
|
|
986
|
+
| HtmlSelfClosingElement
|
|
987
|
+
| HtmlTagClose
|
|
988
|
+
| HtmlTagOpen
|
|
989
|
+
|
|
990
|
+
// https://html.spec.whatwg.org/multipage/syntax.html#the-doctype
|
|
991
|
+
HtmlDoctype =
|
|
992
|
+
#("<!" caseInsensitive<"doctype"> space+ caseInsensitive<"html">) legacyDoctypeString? ">"
|
|
993
|
+
legacyDoctypeString
|
|
994
|
+
= anyExceptPlus<">">
|
|
995
|
+
|
|
996
|
+
HtmlComment = "<!--" #(anyExceptStar<"-->"> "-->")
|
|
997
|
+
|
|
998
|
+
// These are black holes, we'll ignore what's in them
|
|
999
|
+
HtmlRawTag =
|
|
1000
|
+
| HtmlRawTagImpl<"script">
|
|
1001
|
+
| HtmlRawTagImpl<"style">
|
|
1002
|
+
| HtmlRawTagImpl<"svg">
|
|
1003
|
+
|
|
1004
|
+
HtmlRawTagImpl<name> =
|
|
1005
|
+
TagStart<name>
|
|
1006
|
+
(HtmlRawTagImpl<name> | AnyExceptPlus<(TagStart<name> | TagEnd<name>)>)*
|
|
1007
|
+
TagEnd<name>
|
|
1008
|
+
TagStart<name> = "<" name AttrList ">"
|
|
1009
|
+
TagEnd<name> = "</" name ">"
|
|
1010
|
+
|
|
1011
|
+
HtmlVoidElement =
|
|
1012
|
+
#("<" voidElementName &(space | "/" | ">")) AttrList "/"? ">"
|
|
1013
|
+
|
|
1014
|
+
HtmlSelfClosingElement =
|
|
1015
|
+
#("<" tagName) AttrList "/>"
|
|
1016
|
+
|
|
1017
|
+
HtmlTagOpen =
|
|
1018
|
+
#("<" tagName) AttrList ">"
|
|
1019
|
+
|
|
1020
|
+
HtmlTagClose =
|
|
1021
|
+
#("</" tagName) ">"
|
|
1022
|
+
|
|
1023
|
+
tagName = leadingTagNamePart trailingTagNamePart*
|
|
1024
|
+
|
|
1025
|
+
// The difference here is that the first text part must start
|
|
1026
|
+
// with a letter, but trailing text parts don't have that
|
|
1027
|
+
// requirement
|
|
1028
|
+
leadingTagNamePart =
|
|
1029
|
+
| liquidDrop
|
|
1030
|
+
| leadingTagNameTextNode
|
|
1031
|
+
|
|
1032
|
+
trailingTagNamePart =
|
|
1033
|
+
| liquidDrop
|
|
1034
|
+
| trailingTagNameTextNode
|
|
1035
|
+
|
|
1036
|
+
leadingTagNameTextNode = letter (alnum | "-" | ":")*
|
|
1037
|
+
trailingTagNameTextNode = (alnum | "-" | ":")+
|
|
1038
|
+
|
|
1039
|
+
AttrList = Attr*
|
|
1040
|
+
|
|
1041
|
+
Attr =
|
|
1042
|
+
AttrSingleQuoted | AttrDoubleQuoted | AttrUnquoted | liquidNode | attrEmpty
|
|
1043
|
+
|
|
1044
|
+
attrEmpty = attrName
|
|
1045
|
+
|
|
1046
|
+
AttrUnquoted = attrName "=" attrUnquotedValue
|
|
1047
|
+
AttrSingleQuoted = attrName "=" singleQuote #(attrSingleQuotedValue singleQuote)
|
|
1048
|
+
AttrDoubleQuoted = attrName "=" doubleQuote #(attrDoubleQuotedValue doubleQuote)
|
|
1049
|
+
|
|
1050
|
+
attrName = (liquidDrop | attrNameTextNode)+
|
|
1051
|
+
|
|
1052
|
+
// https://html.spec.whatwg.org/#attributes-2
|
|
1053
|
+
attrNameTextNode = anyExceptPlus<(space | quotes | "=" | ">" | "/>" | "{{" | "{%" | controls | noncharacters)>
|
|
1054
|
+
attrUnquotedValue = (liquidDrop | attrUnquotedTextNode)*
|
|
1055
|
+
attrSingleQuotedValue = (liquidNode | attrSingleQuotedTextNode)*
|
|
1056
|
+
attrDoubleQuotedValue = (liquidNode | attrDoubleQuotedTextNode)*
|
|
1057
|
+
|
|
1058
|
+
attrUnquotedTextNode = anyExceptPlus<(space | quotes | "=" | "<" | ">" | "${"`"}" | "{{" | "{%")>
|
|
1059
|
+
attrSingleQuotedTextNode = anyExceptPlus<(singleQuote | "{{" | "{%")>
|
|
1060
|
+
attrDoubleQuotedTextNode = anyExceptPlus<(doubleQuote | "{{" | "{%")>
|
|
1061
|
+
|
|
1062
|
+
quotes = singleQuote | doubleQuote
|
|
1063
|
+
|
|
1064
|
+
// https://www.w3.org/TR/2011/WD-html-markup-20110113/syntax.html#void-element
|
|
1065
|
+
voidElementName =
|
|
1066
|
+
( caseInsensitive<"area">
|
|
1067
|
+
| caseInsensitive<"base">
|
|
1068
|
+
| caseInsensitive<"br">
|
|
1069
|
+
| caseInsensitive<"col">
|
|
1070
|
+
| caseInsensitive<"command">
|
|
1071
|
+
| caseInsensitive<"embed">
|
|
1072
|
+
| caseInsensitive<"hr">
|
|
1073
|
+
| caseInsensitive<"img">
|
|
1074
|
+
| caseInsensitive<"input">
|
|
1075
|
+
| caseInsensitive<"keygen">
|
|
1076
|
+
| caseInsensitive<"link">
|
|
1077
|
+
| caseInsensitive<"meta">
|
|
1078
|
+
| caseInsensitive<"param">
|
|
1079
|
+
| caseInsensitive<"source">
|
|
1080
|
+
| caseInsensitive<"track">
|
|
1081
|
+
| caseInsensitive<"wbr">
|
|
1082
|
+
) ~identifierCharacter
|
|
1083
|
+
}
|
|
1084
|
+
|
|
1085
|
+
StrictLiquid <: Liquid {
|
|
1086
|
+
liquidTag := liquidTagStrict
|
|
1087
|
+
liquidTagOpen := liquidTagOpenStrict
|
|
1088
|
+
}
|
|
1089
|
+
|
|
1090
|
+
StrictLiquidStatement <: LiquidStatement {
|
|
1091
|
+
liquidTag := liquidTagStrict
|
|
1092
|
+
liquidTagOpen := liquidTagOpenStrict
|
|
1093
|
+
}
|
|
1094
|
+
|
|
1095
|
+
StrictLiquidHTML <: LiquidHTML {
|
|
1096
|
+
liquidTag := liquidTagStrict
|
|
1097
|
+
liquidTagOpen := liquidTagOpenStrict
|
|
1098
|
+
}
|
|
1099
|
+
|
|
1100
|
+
WithPlaceholderLiquid <: Liquid {
|
|
1101
|
+
liquidFilter<delim> := space* "|" space* identifier (space* ":" space* filterArguments<delim> (space* ",")?)?
|
|
1102
|
+
liquidTagContentForMarkup :=
|
|
1103
|
+
contentForType (argumentSeparatorOptionalComma completionModeContentForTagArgument) (space* ",")? space*
|
|
1104
|
+
liquidTagRenderMarkup :=
|
|
1105
|
+
snippetExpression renderVariableExpression? renderAliasExpression? completionModeRenderArguments
|
|
1106
|
+
liquidTagName := (letter | "█") (alnum | "_")*
|
|
1107
|
+
variableSegment := (letter | "_" | "█") (identifierCharacter | "█")*
|
|
1108
|
+
liquidDoc :=
|
|
1109
|
+
liquidDocStart
|
|
1110
|
+
liquidDocBody
|
|
1111
|
+
liquidDocEnd?
|
|
1112
|
+
}
|
|
1113
|
+
|
|
1114
|
+
WithPlaceholderLiquidStatement <: LiquidStatement {
|
|
1115
|
+
liquidFilter<delim> := space* "|" space* identifier (space* ":" space* filterArguments<delim> (space* ",")?)?
|
|
1116
|
+
liquidTagContentForMarkup :=
|
|
1117
|
+
contentForType (argumentSeparatorOptionalComma completionModeContentForTagArgument) (space* ",")? space*
|
|
1118
|
+
liquidTagRenderMarkup :=
|
|
1119
|
+
snippetExpression renderVariableExpression? renderAliasExpression? completionModeRenderArguments
|
|
1120
|
+
liquidTagName := (letter | "█") (alnum | "_")*
|
|
1121
|
+
variableSegment := (letter | "_" | "█") (identifierCharacter | "█")*
|
|
1122
|
+
liquidDoc :=
|
|
1123
|
+
liquidDocStart
|
|
1124
|
+
liquidDocBody
|
|
1125
|
+
liquidDocEnd?
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1128
|
+
WithPlaceholderLiquidHTML <: LiquidHTML {
|
|
1129
|
+
liquidFilter<delim> := space* "|" space* identifier (space* ":" space* filterArguments<delim> (space* ",")?)?
|
|
1130
|
+
liquidTagContentForMarkup :=
|
|
1131
|
+
contentForType (argumentSeparatorOptionalComma completionModeContentForTagArgument) (space* ",")? space*
|
|
1132
|
+
liquidTagRenderMarkup :=
|
|
1133
|
+
snippetExpression renderVariableExpression? renderAliasExpression? completionModeRenderArguments
|
|
1134
|
+
liquidTagName := (letter | "█") (alnum | "_")*
|
|
1135
|
+
variableSegment := (letter | "_" | "█") (identifierCharacter | "█")*
|
|
1136
|
+
leadingTagNameTextNode := (letter | "█") (alnum | "-" | ":" | "█")*
|
|
1137
|
+
trailingTagNameTextNode := (alnum | "-" | ":" | "█")+
|
|
1138
|
+
liquidDoc :=
|
|
1139
|
+
liquidDocStart
|
|
1140
|
+
liquidDocBody
|
|
1141
|
+
liquidDocEnd?
|
|
1142
|
+
}
|
|
1143
|
+
`});var Bl=T(we=>{"use strict";y();Object.defineProperty(we,"__esModule",{value:!0});we.TAGS_WITHOUT_MARKUP=we.VOID_ELEMENTS=we.RAW_TAGS=we.BLOCKS=we.placeholderGrammars=we.tolerantGrammars=we.strictGrammars=we.LiquidDocGrammar=we.TextNodeGrammar=we.liquidHtmlGrammars=void 0;var u6=_k();we.liquidHtmlGrammars=(0,u6.grammars)(bk());we.TextNodeGrammar=we.liquidHtmlGrammars.Helpers;we.LiquidDocGrammar=we.liquidHtmlGrammars.LiquidDoc;we.strictGrammars={Liquid:we.liquidHtmlGrammars.StrictLiquid,LiquidHTML:we.liquidHtmlGrammars.StrictLiquidHTML,LiquidStatement:we.liquidHtmlGrammars.StrictLiquidStatement};we.tolerantGrammars={Liquid:we.liquidHtmlGrammars.Liquid,LiquidHTML:we.liquidHtmlGrammars.LiquidHTML,LiquidStatement:we.liquidHtmlGrammars.LiquidStatement};we.placeholderGrammars={Liquid:we.liquidHtmlGrammars.WithPlaceholderLiquid,LiquidHTML:we.liquidHtmlGrammars.WithPlaceholderLiquidHTML,LiquidStatement:we.liquidHtmlGrammars.WithPlaceholderLiquidStatement};we.BLOCKS=we.strictGrammars.LiquidHTML.rules.blockName.body.factors[0].terms.map(t=>t.obj);we.RAW_TAGS=we.strictGrammars.LiquidHTML.rules.liquidRawTag.body.terms.map(t=>t.args[0].obj).concat("comment");we.VOID_ELEMENTS=we.strictGrammars.LiquidHTML.rules.voidElementName.body.factors[0].terms.map(t=>t.args[0].obj);we.TAGS_WITHOUT_MARKUP=["style","schema","javascript","else","break","continue","comment","raw","doc"]});var Vl=T(_n=>{"use strict";y();var c6=_n&&_n.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(_n,"__esModule",{value:!0});_n.LiquidHTMLASTParsingError=_n.LiquidHTMLCSTParsingError=void 0;var Sk=c6(rg()),dy=class extends SyntaxError{constructor(e){super(e.shortMessage),this.name="LiquidHTMLParsingError";let r=e.input,i=e._rightmostFailurePosition,n=(0,Sk.default)(r).fromIndex(Math.min(i,r.length-1));n&&(this.loc={start:{line:n.line,column:n.col},end:{line:n.line,column:n.col}})}};_n.LiquidHTMLCSTParsingError=dy;var my=class extends SyntaxError{constructor(e,r,i,n,s){super(e),this.name="LiquidHTMLParsingError",this.unclosed=s??null;let a=(0,Sk.default)(r),o=a.fromIndex(i),u=a.fromIndex(Math.min(n,r.length-1));this.loc={start:{line:o.line,column:o.col},end:{line:u.line,column:u.col}}}};_n.LiquidHTMLASTParsingError=my});var Ul=T(Xt=>{"use strict";y();Object.defineProperty(Xt,"__esModule",{value:!0});Xt.nonTraversableProperties=Xt.LoopNamedTags=Xt.LiquidNodeTypes=Xt.HtmlNodeTypes=Xt.Comparators=Xt.NamedTags=Xt.NodeTypes=void 0;var li;(function(t){t.Document="Document",t.LiquidRawTag="LiquidRawTag",t.LiquidTag="LiquidTag",t.LiquidBranch="LiquidBranch",t.LiquidVariableOutput="LiquidVariableOutput",t.HtmlSelfClosingElement="HtmlSelfClosingElement",t.HtmlVoidElement="HtmlVoidElement",t.HtmlDoctype="HtmlDoctype",t.HtmlComment="HtmlComment",t.HtmlElement="HtmlElement",t.HtmlDanglingMarkerClose="HtmlDanglingMarkerClose",t.HtmlRawNode="HtmlRawNode",t.AttrSingleQuoted="AttrSingleQuoted",t.AttrDoubleQuoted="AttrDoubleQuoted",t.AttrUnquoted="AttrUnquoted",t.AttrEmpty="AttrEmpty",t.TextNode="TextNode",t.YAMLFrontmatter="YAMLFrontmatter",t.LiquidVariable="LiquidVariable",t.LiquidFilter="LiquidFilter",t.NamedArgument="NamedArgument",t.LiquidLiteral="LiquidLiteral",t.BooleanExpression="BooleanExpression",t.String="String",t.Number="Number",t.Range="Range",t.VariableLookup="VariableLookup",t.Comparison="Comparison",t.LogicalExpression="LogicalExpression",t.AssignMarkup="AssignMarkup",t.ContentForMarkup="ContentForMarkup",t.CycleMarkup="CycleMarkup",t.ForMarkup="ForMarkup",t.PaginateMarkup="PaginateMarkup",t.RawMarkup="RawMarkup",t.RenderMarkup="RenderMarkup",t.RenderVariableExpression="RenderVariableExpression",t.RenderAliasExpression="RenderAliasExpression",t.LiquidDocDescriptionNode="LiquidDocDescriptionNode",t.LiquidDocParamNode="LiquidDocParamNode",t.LiquidDocExampleNode="LiquidDocExampleNode",t.LiquidDocPromptNode="LiquidDocPromptNode"})(li||(Xt.NodeTypes=li={}));var $l;(function(t){t.assign="assign",t.capture="capture",t.case="case",t.content_for="content_for",t.cycle="cycle",t.decrement="decrement",t.echo="echo",t.elsif="elsif",t.for="for",t.form="form",t.if="if",t.include="include",t.increment="increment",t.layout="layout",t.liquid="liquid",t.paginate="paginate",t.render="render",t.section="section",t.sections="sections",t.tablerow="tablerow",t.unless="unless",t.when="when"})($l||(Xt.NamedTags=$l={}));var wk;(function(t){t.CONTAINS="contains",t.EQUAL="==",t.GREATER_THAN=">",t.GREATER_THAN_OR_EQUAL=">=",t.LESS_THAN="<",t.LESS_THAN_OR_EQUAL="<=",t.NOT_EQUAL="!="})(wk||(Xt.Comparators=wk={}));Xt.HtmlNodeTypes=[li.HtmlElement,li.HtmlDanglingMarkerClose,li.HtmlRawNode,li.HtmlVoidElement,li.HtmlSelfClosingElement];Xt.LiquidNodeTypes=[li.LiquidTag,li.LiquidVariableOutput,li.LiquidBranch,li.LiquidRawTag];Xt.LoopNamedTags=[$l.for,$l.tablerow];Xt.nonTraversableProperties=new Set(["parentNode","prev","next","firstChild","lastChild"])});var gy=T(Qi=>{"use strict";y();Object.defineProperty(Qi,"__esModule",{value:!0});Qi.LiquidLiteralValues=Qi.ConcreteNodeTypes=void 0;Qi.toLiquidHtmlCST=f6;Qi.toLiquidCST=p6;var kk=Fx(),vn=Bl(),Ik=Vl(),Hl=Ul(),ne;(function(t){t.HtmlDoctype="HtmlDoctype",t.HtmlComment="HtmlComment",t.HtmlRawTag="HtmlRawTag",t.HtmlVoidElement="HtmlVoidElement",t.HtmlSelfClosingElement="HtmlSelfClosingElement",t.HtmlTagOpen="HtmlTagOpen",t.HtmlTagClose="HtmlTagClose",t.AttrSingleQuoted="AttrSingleQuoted",t.AttrDoubleQuoted="AttrDoubleQuoted",t.AttrUnquoted="AttrUnquoted",t.AttrEmpty="AttrEmpty",t.LiquidVariableOutput="LiquidVariableOutput",t.LiquidRawTag="LiquidRawTag",t.LiquidTag="LiquidTag",t.LiquidTagOpen="LiquidTagOpen",t.LiquidTagClose="LiquidTagClose",t.TextNode="TextNode",t.YAMLFrontmatter="YAMLFrontmatter",t.LiquidVariable="LiquidVariable",t.LiquidFilter="LiquidFilter",t.NamedArgument="NamedArgument",t.LiquidLiteral="LiquidLiteral",t.VariableLookup="VariableLookup",t.BooleanExpression="BooleanExpression",t.String="String",t.Number="Number",t.Range="Range",t.Comparison="Comparison",t.Condition="Condition",t.AssignMarkup="AssignMarkup",t.ContentForMarkup="ContentForMarkup",t.CycleMarkup="CycleMarkup",t.ForMarkup="ForMarkup",t.RenderMarkup="RenderMarkup",t.PaginateMarkup="PaginateMarkup",t.RenderVariableExpression="RenderVariableExpression",t.RenderAliasExpression="RenderAliasExpression",t.ContentForNamedArgument="ContentForNamedArgument",t.LiquidDocParamNode="LiquidDocParamNode",t.LiquidDocParamNameNode="LiquidDocParamNameNode",t.LiquidDocDescriptionNode="LiquidDocDescriptionNode",t.LiquidDocExampleNode="LiquidDocExampleNode",t.LiquidDocPromptNode="LiquidDocPromptNode"})(ne||(Qi.ConcreteNodeTypes=ne={}));Qi.LiquidLiteralValues={nil:null,null:null,true:!0,false:!1,blank:"",empty:""};var l6=t=>e=>e[t].sourceString.trim(),xk=t=>e=>e[t].sourceString.trimEnd(),Ak={strict:vn.strictGrammars,tolerant:vn.tolerantGrammars,completion:vn.placeholderGrammars};function f6(t,e={mode:"tolerant"}){let r=Ak[e.mode],i=r.LiquidHTML;return Ki(t,r,i,["HelperMappings","LiquidMappings","LiquidHTMLMappings"])}function p6(t,e={mode:"tolerant"}){let r=Ak[e.mode],i=r.Liquid;return Ki(t,r,i,["HelperMappings","LiquidMappings"])}function Ki(t,e,r,i,n=t,s=0){let a=g=>s+g[0].source.startIdx,o=g=>s+g[g.length-1].source.endIdx,u=g=>s+g[g.length-2].source.endIdx,l={type:ne.TextNode,value:function(){return this.sourceString},locStart:a,locEnd:o,source:t},f=r.match(n,"Node");if(f.failed())throw new Ik.LiquidHTMLCSTParsingError(f);let h={Node:0,TextNode:l,orderedListOf:0,empty:()=>null,nonemptyOrderedListOf:0,nonemptyOrderedListOfBoth(g,k,w){let _=this;return g.toAST(_.args.mapping).concat(w.toAST(_.args.mapping))}},p={liquidNode:0,liquidRawTag:0,liquidRawTagImpl:{type:ne.LiquidRawTag,name:3,body:9,children:g=>{let k=g[3],w=g[9];switch(k.sourceString){case"schema":case"raw":return Ki(t,e,vn.TextNodeGrammar,["HelperMappings"],w.sourceString,s+w.source.startIdx);default:return Ki(t,e,e.Liquid,["HelperMappings","LiquidMappings"],w.sourceString,s+w.source.startIdx)}},markup:6,whitespaceStart:1,whitespaceEnd:7,delimiterWhitespaceStart:11,delimiterWhitespaceEnd:17,locStart:a,locEnd:o,source:t,blockStartLocStart:g=>g[0].source.startIdx,blockStartLocEnd:g=>g[8].source.endIdx,blockEndLocStart:g=>g[10].source.startIdx,blockEndLocEnd:g=>g[18].source.endIdx},liquidBlockComment:{type:ne.LiquidRawTag,name:"comment",body:g=>g[1].sourceString,children:g=>Ki(t,e,vn.TextNodeGrammar,["HelperMappings"],g[1].sourceString,s+g[1].source.startIdx),whitespaceStart:g=>g[0].children[1].sourceString,whitespaceEnd:g=>g[0].children[7].sourceString,delimiterWhitespaceStart:g=>g[2].children[1].sourceString,delimiterWhitespaceEnd:g=>g[2].children[7].sourceString,locStart:a,locEnd:o,source:t,blockStartLocStart:g=>g[0].source.startIdx,blockStartLocEnd:g=>g[0].source.endIdx,blockEndLocStart:g=>g[2].source.startIdx,blockEndLocEnd:g=>g[2].source.endIdx},liquidDoc:{type:ne.LiquidRawTag,name:"doc",body:g=>g[1].sourceString,children:g=>{let k=g[1];return h6(t,k.sourceString,s+k.source.startIdx)},whitespaceStart:g=>g[0].children[1].sourceString,whitespaceEnd:g=>g[0].children[7].sourceString,delimiterWhitespaceStart:g=>{var k;return((k=g[2].children[1])===null||k===void 0?void 0:k.sourceString)||""},delimiterWhitespaceEnd:g=>{var k;return((k=g[2].children[7])===null||k===void 0?void 0:k.sourceString)||""},locStart:a,locEnd:o,source:t,blockStartLocStart:g=>g[0].source.startIdx,blockStartLocEnd:g=>g[0].source.endIdx,blockEndLocStart:g=>g[2].source.startIdx,blockEndLocEnd:g=>g[2].source.endIdx},liquidInlineComment:{type:ne.LiquidTag,name:3,markup:xk(5),whitespaceStart:1,whitespaceEnd:6,locStart:a,locEnd:o,source:t},liquidTagOpen:0,liquidTagOpenStrict:0,liquidTagOpenBaseCase:0,liquidTagOpenRule:{type:ne.LiquidTagOpen,name:3,markup(g){let k=g[6],w=g[3];return Hl.NamedTags.hasOwnProperty(w.sourceString)?k.toAST(this.args.mapping):k.sourceString.trim()},whitespaceStart:1,whitespaceEnd:7,locStart:a,locEnd:o,source:t},liquidTagOpenCapture:0,liquidTagOpenForm:0,liquidTagOpenFormMarkup:0,liquidTagOpenFor:0,liquidTagOpenForMarkup:{type:ne.ForMarkup,variableName:0,collection:4,reversed:6,args:8,locStart:a,locEnd:o,source:t},liquidTagBreak:0,liquidTagContinue:0,liquidTagOpenTablerow:0,liquidTagOpenPaginate:0,liquidTagOpenPaginateMarkup:{type:ne.PaginateMarkup,collection:0,pageSize:4,args:6,locStart:a,locEnd:o,source:t},liquidTagOpenCase:0,liquidTagOpenCaseMarkup:0,liquidTagWhen:0,liquidTagWhenMarkup:0,liquidTagOpenIf:0,liquidTagOpenUnless:0,liquidTagElsif:0,liquidTagElse:0,liquidTagOpenConditionalMarkup:0,condition:{type:ne.Condition,relation:0,expression:2,locStart:a,locEnd:o,source:t},comparison:{type:ne.Comparison,comparator:2,left:0,right:4,locStart:a,locEnd:o,source:t},liquidTagClose:{type:ne.LiquidTagClose,name:4,whitespaceStart:1,whitespaceEnd:7,locStart:a,locEnd:o,source:t},liquidTag:0,liquidTagStrict:0,liquidTagBaseCase:0,liquidTagAssign:0,liquidTagEcho:0,liquidTagContentFor:0,liquidTagCycle:0,liquidTagIncrement:0,liquidTagDecrement:0,liquidTagRender:0,liquidTagInclude:0,liquidTagSection:0,liquidTagSections:0,liquidTagLayout:0,liquidTagRule:{type:ne.LiquidTag,name:3,markup(g){let k=g[6],w=g[3];return Hl.NamedTags.hasOwnProperty(w.sourceString)?k.toAST(this.args.mapping):k.sourceString.trim()},whitespaceStart:1,whitespaceEnd:7,source:t,locStart:a,locEnd:o},liquidTagLiquid:0,liquidTagLiquidMarkup(g){return Ki(t,e,e.LiquidStatement,["HelperMappings","LiquidMappings","LiquidStatement"],g.sourceString,s+g.source.startIdx)},liquidTagEchoMarkup:0,liquidTagSectionMarkup:0,liquidTagSectionsMarkup:0,liquidTagLayoutMarkup:0,liquidTagAssignMarkup:{type:ne.AssignMarkup,name:0,value:4,locStart:a,locEnd:o,source:t},liquidTagCycleMarkup:{type:ne.CycleMarkup,groupName:0,args:3,locStart:a,locEnd:o,source:t},liquidTagContentForMarkup:{type:ne.ContentForMarkup,contentForType:0,args:2,locStart:a,locEnd:o,source:t},contentForType:0,liquidTagRenderMarkup:{type:ne.RenderMarkup,snippet:0,variable:1,alias:2,renderArguments:3,locStart:a,locEnd:o,source:t},renderArguments:1,completionModeRenderArguments:function(g,k,w,_,A,E,O,L){let B=this;return k.toAST(B.args.mapping).concat(O.sourceString===""?[]:O.toAST(B.args.mapping))},snippetExpression:0,renderVariableExpression:{type:ne.RenderVariableExpression,kind:1,name:3,locStart:a,locEnd:o,source:t},renderAliasExpression:{type:ne.RenderAliasExpression,value:3,locStart:a,locEnd:o,source:t},liquidDrop:{type:ne.LiquidVariableOutput,markup:3,whitespaceStart:1,whitespaceEnd:4,locStart:a,locEnd:o,source:t},liquidDropCases:0,liquidExpression:0,liquidComplexExpression:0,liquidDropBaseCase:g=>g.sourceString.trimEnd(),liquidVariable:{type:ne.LiquidVariable,expression:0,filters:1,rawSource:g=>t.slice(a(g),g[g.length-2].source.endIdx).trimEnd(),locStart:a,locEnd:u,source:t},liquidFilter:{type:ne.LiquidFilter,name:3,locStart:a,locEnd:o,source:t,args(g){return g[7].sourceString===""?[]:g[7].toAST(this.args.mapping)}},filterArguments:0,arguments:0,complexArguments:function(g,k,w,_,A){let E=this;return g.toAST(E.args.mapping).concat(A.sourceString===""?[]:A.toAST(E.args.mapping))},simpleArgument:0,tagArguments:0,contentForTagArgument:0,completionModeContentForTagArgument:function(g,k,w){let _=this;return g.toAST(_.args.mapping).concat(w.sourceString===""?[]:w.toAST(_.args.mapping))},positionalArgument:0,namedArgument:{type:ne.NamedArgument,name:0,value:4,locStart:a,locEnd:o,source:t},contentForNamedArgument:{type:ne.NamedArgument,name:g=>g[0].sourceString+g[1].sourceString,value:6,locStart:a,locEnd:o,source:t},liquidBooleanExpression(g,k){let w=g.toAST(this.args.mapping),_=k.toAST(this.args.mapping);if(_.length===0&&w.expression.type!==ne.Comparison)return w.expression;let A=[w,..._];return{type:ne.BooleanExpression,conditions:A,locStart:A.at(0).locStart,locEnd:A.at(-1).locEnd,source:t}},booleanExpressionCondition:{type:ne.Condition,relation:null,expression:0,locStart:a,locEnd:o,source:t},booleanExpressionSubsequentCondition:{type:ne.Condition,relation:1,expression:3,locStart:a,locEnd:o,source:t},liquidString:0,liquidDoubleQuotedString:{type:ne.String,single:()=>!1,value:1,locStart:a,locEnd:o,source:t},liquidSingleQuotedString:{type:ne.String,single:()=>!0,value:1,locStart:a,locEnd:o,source:t},liquidNumber:{type:ne.Number,value:0,locStart:a,locEnd:o,source:t},liquidLiteral:{type:ne.LiquidLiteral,value:g=>{let k=g[0].sourceString;return Qi.LiquidLiteralValues[k]},keyword:0,locStart:a,locEnd:o,source:t},liquidRange:{type:ne.Range,start:2,end:6,locStart:a,locEnd:o,source:t},liquidVariableLookup:{type:ne.VariableLookup,name:0,lookups:1,locStart:a,locEnd:o,source:t},variableSegmentAsLookupMarkup:0,variableSegmentAsLookup:{type:ne.VariableLookup,name:0,lookups:()=>[],locStart:a,locEnd:o,source:t},lookup:0,indexLookup:3,dotLookup:{type:ne.String,value:3,locStart:g=>s+g[2].source.startIdx,locEnd:g=>s+g[g.length-1].source.endIdx,source:t},tagMarkup:g=>g.sourceString.trim()},m={LiquidStatement:0,liquidTagOpenRule:{type:ne.LiquidTagOpen,name:0,markup(g){let k=g[2],w=g[0];return Hl.NamedTags.hasOwnProperty(w.sourceString)?k.toAST(this.args.mapping):k.sourceString.trim()},whitespaceStart:null,whitespaceEnd:null,locStart:a,locEnd:u,source:t},liquidTagClose:{type:ne.LiquidTagClose,name:1,whitespaceStart:null,whitespaceEnd:null,locStart:a,locEnd:u,source:t},liquidTagRule:{type:ne.LiquidTag,name:0,markup(g){let k=g[2],w=g[0];return Hl.NamedTags.hasOwnProperty(w.sourceString)?k.toAST(this.args.mapping):k.sourceString.trim()},whitespaceStart:null,whitespaceEnd:null,locStart:a,locEnd:u,source:t},liquidRawTagImpl:{type:ne.LiquidRawTag,name:0,body:4,children(g){return Ki(t,e,vn.TextNodeGrammar,["HelperMappings"],g[4].sourceString,s+g[4].source.startIdx)},whitespaceStart:null,whitespaceEnd:null,delimiterWhitespaceStart:null,delimiterWhitespaceEnd:null,locStart:a,locEnd:u,source:t,blockStartLocStart:g=>s+g[0].source.startIdx,blockStartLocEnd:g=>s+g[2].source.endIdx,blockEndLocStart:g=>s+g[5].source.startIdx,blockEndLocEnd:g=>s+g[5].source.endIdx},liquidBlockComment:{type:ne.LiquidRawTag,name:"comment",body:g=>g[1].sourceString.slice(1)+g[2].sourceString,children(g){let k=g[1].sourceString.slice(1)+g[2].sourceString;return Ki(t,e,vn.TextNodeGrammar,["HelperMappings"],k,s+g[1].source.startIdx+1)},whitespaceStart:"",whitespaceEnd:"",delimiterWhitespaceStart:"",delimiterWhitespaceEnd:"",locStart:a,locEnd:o,source:t,blockStartLocStart:g=>s+g[0].source.startIdx,blockStartLocEnd:g=>s+g[0].source.endIdx,blockEndLocStart:g=>s+g[4].source.startIdx,blockEndLocEnd:g=>s+g[4].source.endIdx},liquidInlineComment:{type:ne.LiquidTag,name:0,markup:xk(2),whitespaceStart:null,whitespaceEnd:null,locStart:a,locEnd:u,source:t}},v={Node(g,k){let w=this;return(g.sourceString.length===0?[]:[g.toAST(w.args.mapping)]).concat(k.toAST(w.args.mapping))},yamlFrontmatter:{type:ne.YAMLFrontmatter,body:2,locStart:a,locEnd:o,source:t},HtmlDoctype:{type:ne.HtmlDoctype,legacyDoctypeString:4,locStart:a,locEnd:o,source:t},HtmlComment:{type:ne.HtmlComment,body:l6(1),locStart:a,locEnd:o,source:t},HtmlRawTagImpl:{type:ne.HtmlRawTag,name:g=>g[0].children[1].sourceString,attrList(g){let k=this.args.mapping;return g[0].children[2].toAST(k)},body:g=>t.slice(g[0].source.endIdx,g[2].source.startIdx),children:g=>{let k=t.slice(g[0].source.endIdx,g[2].source.startIdx);return Ki(t,e,e.Liquid,["HelperMappings","LiquidMappings"],k,g[0].source.endIdx)},locStart:a,locEnd:o,source:t,blockStartLocStart:g=>g[0].source.startIdx,blockStartLocEnd:g=>g[0].source.endIdx,blockEndLocStart:g=>g[2].source.startIdx,blockEndLocEnd:g=>g[2].source.endIdx},HtmlVoidElement:{type:ne.HtmlVoidElement,name:1,attrList:3,locStart:a,locEnd:o,source:t},HtmlSelfClosingElement:{type:ne.HtmlSelfClosingElement,name:1,attrList:2,locStart:a,locEnd:o,source:t},HtmlTagOpen:{type:ne.HtmlTagOpen,name:1,attrList:2,locStart:a,locEnd:o,source:t},HtmlTagClose:{type:ne.HtmlTagClose,name:1,locStart:a,locEnd:o,source:t},leadingTagNamePart:0,leadingTagNameTextNode:l,trailingTagNamePart:0,trailingTagNameTextNode:l,tagName(g,k){let w=this.args.mapping;return[g.toAST(w)].concat(k.toAST(w))},AttrUnquoted:{type:ne.AttrUnquoted,name:0,value:2,locStart:a,locEnd:o,source:t},AttrSingleQuoted:{type:ne.AttrSingleQuoted,name:0,value:3,locStart:a,locEnd:o,source:t},AttrDoubleQuoted:{type:ne.AttrDoubleQuoted,name:0,value:3,locStart:a,locEnd:o,source:t},attrEmpty:{type:ne.AttrEmpty,name:0,locStart:a,locEnd:o,source:t},attrName:0,attrNameTextNode:l,attrDoubleQuotedValue:0,attrSingleQuotedValue:0,attrUnquotedValue:0,attrDoubleQuotedTextNode:l,attrSingleQuotedTextNode:l,attrUnquotedTextNode:l},S={HelperMappings:h,LiquidMappings:p,LiquidHTMLMappings:v,LiquidStatement:m},b=i.reduce((g,k)=>({...g,...S[k]}),{});return(0,kk.toAST)(f,b)}function h6(t,e,r){let i=u=>r+u[0].source.startIdx,n=u=>r+u[u.length-1].source.endIdx,s=vn.LiquidDocGrammar.match(e,"Node");if(s.failed())throw new Ik.LiquidHTMLCSTParsingError(s);let a=()=>({type:ne.TextNode,value:function(){return this.sourceString},locStart:i,locEnd:n,source:t}),o={Node(u,l){let f=this;return(u.sourceString.length===0?[]:[u.toAST(f.args.mapping)]).concat(l.toAST(f.args.mapping))},ImplicitDescription:{type:ne.LiquidDocDescriptionNode,name:"description",locStart:i,locEnd:n,source:t,content:0,isImplicit:!0,isInline:!0},TextNode:a(),paramNode:{type:ne.LiquidDocParamNode,name:"param",locStart:i,locEnd:n,source:t,paramType:2,paramName:4,paramDescription:8},descriptionNode:{type:ne.LiquidDocDescriptionNode,name:"description",locStart:i,locEnd:n,source:t,content:2,isImplicit:!1,isInline:function(){return!this.children[1].sourceString.includes(`
|
|
1144
|
+
`)}},descriptionContent:a(),paramType:2,paramTypeContent:a(),paramName:{type:ne.LiquidDocParamNameNode,content:0,locStart:i,locEnd:n,source:t,required:!0},optionalParamName:{type:ne.LiquidDocParamNameNode,content:2,locStart:i,locEnd:n,source:t,required:!1},paramDescription:a(),exampleNode:{type:ne.LiquidDocExampleNode,name:"example",locStart:i,locEnd:n,source:t,content:2,isInline:function(){return!this.children[1].sourceString.includes(`
|
|
1145
|
+
`)}},promptNode:{type:ne.LiquidDocPromptNode,name:"prompt",locStart:i,locEnd:n,source:t,content:1},multilineTextContent:a(),textValue:a(),fallbackNode:a()};return(0,kk.toAST)(s,o)}});var Tk=T(ys=>{"use strict";y();Object.defineProperty(ys,"__esModule",{value:!0});ys.assertNever=d6;ys.locStart=m6;ys.locEnd=g6;ys.deepGet=y6;ys.dropLast=_6;function d6(t){throw new Error(`Unexpected object: ${t.type}`)}function m6(t){return t.position.start}function g6(t){return t.position.end}function y6(t,e){return t.reduce((r,i)=>{if(r&&r[i]!==void 0)return r[i]},e)}function _6(t,e){let r=[...e];for(let i=0;i<t;i++)r.pop();return r}});var Dk=T(pi=>{"use strict";y();Object.defineProperty(pi,"__esModule",{value:!0});pi.RawMarkupKinds=void 0;pi.isBranchedTag=Ck;pi.toLiquidAST=w6;pi.toLiquidHtmlAST=x6;pi.getName=Sr;pi.cstToAst=zr;pi.walk=vy;pi.isLiquidHtmlNode=by;var ve=gy(),z=Ul(),fi=Tk(),Gl=Vl(),v6=Bl(),b6=gy(),Zt;(function(t){t.css="css",t.html="html",t.javascript="javascript",t.json="json",t.markdown="markdown",t.typescript="typescript",t.text="text"})(Zt||(pi.RawMarkupKinds=Zt={}));function Ck(t){return t.type===z.NodeTypes.LiquidTag&&["if","for","unless","case"].includes(t.name)}function S6(t){return t.type===ve.ConcreteNodeTypes.LiquidTag&&["else","elsif","when"].includes(t.name)}function w6(t,e={allowUnclosedDocumentNode:!0,mode:"tolerant"}){let r=(0,b6.toLiquidCST)(t,{mode:e.mode});return{type:z.NodeTypes.Document,source:t,_source:t,children:zr(r,e),name:"#document",position:{start:0,end:t.length}}}function x6(t,e={allowUnclosedDocumentNode:!1,mode:"tolerant"}){let r=(0,ve.toLiquidHtmlCST)(t,{mode:e.mode});return{type:z.NodeTypes.Document,source:t,_source:t,children:zr(r,e),name:"#document",position:{start:0,end:t.length}}}var yy=class{constructor(e){this.ast=[],this.cursor=[],this.source=e}get current(){return(0,fi.deepGet)(this.cursor,this.ast)}get currentPosition(){return(this.current||[]).length-1}get parent(){if(this.cursor.length!=0)return(0,fi.deepGet)((0,fi.dropLast)(1,this.cursor),this.ast)}get grandparent(){if(!(this.cursor.length<4))return(0,fi.deepGet)((0,fi.dropLast)(3,this.cursor),this.ast)}open(e){this.current.push(e),this.cursor.push(this.currentPosition),this.cursor.push("children"),Ck(e)&&this.open(N6(e))}push(e){if(e.type===z.NodeTypes.LiquidBranch){let r=this.findCloseableParentBranch(e);if(r){for(r.blockEndPosition={start:e.position.start,end:e.position.start};this.parent&&this.parent!==r&&this.parent.type===z.NodeTypes.HtmlElement;)this.parent.blockEndPosition={start:e.position.start,end:e.position.start},this.closeParentWith(e);this.closeParentWith(e)}this.open(e)}else this.current.push(e)}close(e,r){var i,n;if(k6(this.parent)&&(this.parent.blockEndPosition={start:e.locStart,end:e.locStart},this.closeParentWith(e)),!this.parent)throw new Gl.LiquidHTMLASTParsingError(`Attempting to close ${r} '${Sr(e)}' before it was opened`,this.source,e.locStart,e.locEnd);if(Sr(this.parent)!==Sr(e)||this.parent.type!==r){let s=this.findCloseableParentNode(e);if(this.parent.type===z.NodeTypes.HtmlElement&&s)for(;this.parent!==s;)this.parent.blockEndPosition={start:e.locStart,end:e.locStart},this.closeParentWith(e);else throw new Gl.LiquidHTMLASTParsingError(`Attempting to close ${r} '${Sr(e)}' before ${this.parent.type} '${Sr(this.parent)}' was closed`,this.source,this.parent.position.start,e.locEnd,Mk(this.parent))}this.parent.position.end=e.locEnd,this.parent.blockEndPosition=de(e),this.parent.type==z.NodeTypes.LiquidTag&&e.type==ve.ConcreteNodeTypes.LiquidTagClose&&(this.parent.delimiterWhitespaceStart=(i=e.whitespaceStart)!==null&&i!==void 0?i:"",this.parent.delimiterWhitespaceEnd=(n=e.whitespaceEnd)!==null&&n!==void 0?n:""),this.cursor.pop(),this.cursor.pop()}findCloseableParentBranch(e){for(let r=this.cursor.length-1;r>0;r-=2){let i=(0,fi.deepGet)(this.cursor.slice(0,r),this.ast),n=this.cursor[r],s=i.type===z.NodeTypes.HtmlElement&&n==="children";if(i.type===z.NodeTypes.LiquidBranch)return i;if(!s)throw new Gl.LiquidHTMLASTParsingError(`Attempting to open LiquidBranch '${e.name}' before ${i.type} '${Sr(i)}' was closed`,this.source,i.position.start,e.position.end)}return null}findCloseableParentNode(e){for(let r=this.cursor.length-1;r>0;r-=2){let i=(0,fi.deepGet)(this.cursor.slice(0,r),this.ast);if(Sr(i)===Sr(e)&&i.type===z.NodeTypes.LiquidTag&&["if","unless","case"].includes(i.name))return i;if(i.type===z.NodeTypes.LiquidTag)return null}return null}closeParentWith(e){this.parent&&("locStart"in e?this.parent.position.end=e.locStart:this.parent.position.end=e.position.start),this.cursor.pop(),this.cursor.pop()}};function k6(t){return!!t&&t.type===z.NodeTypes.LiquidBranch}function Sr(t){if(!t)return null;switch(t.type){case z.NodeTypes.HtmlElement:case z.NodeTypes.HtmlDanglingMarkerClose:case z.NodeTypes.HtmlSelfClosingElement:case ve.ConcreteNodeTypes.HtmlTagClose:return t.name.map(e=>e.type===z.NodeTypes.TextNode||e.type==ve.ConcreteNodeTypes.TextNode?e.value:typeof e.markup=="string"?`{{${e.markup.trim()}}}`:`{{${e.markup.rawSource}}}`).join("");case z.NodeTypes.AttrEmpty:case z.NodeTypes.AttrUnquoted:case z.NodeTypes.AttrDoubleQuoted:case z.NodeTypes.AttrSingleQuoted:return t.name.map(e=>typeof e=="string"?e:e.source.slice(e.position.start,e.position.end)).join("");default:return t.name}}function zr(t,e){var r;if(t.length===0)return[];let i=I6(t,e);if(!e.allowUnclosedDocumentNode&&i.cursor.length!==0)throw new Gl.LiquidHTMLASTParsingError(`Attempting to end parsing before ${(r=i.parent)===null||r===void 0?void 0:r.type} '${Sr(i.parent)}' was closed`,i.source,i.source.length-1,i.source.length,Mk(i.parent,i.grandparent));return i.ast}function I6(t,e){var r,i,n,s;let a=new yy(t[0].source);for(let o=0;o<t.length;o++){let u=t[o];switch(u.type){case ve.ConcreteNodeTypes.TextNode:{a.push(va(u));break}case ve.ConcreteNodeTypes.LiquidVariableOutput:{a.push(U6(u));break}case ve.ConcreteNodeTypes.LiquidTagOpen:{a.open(Nk(u,{...e,isBlockTag:!0}));break}case ve.ConcreteNodeTypes.LiquidTagClose:{a.close(u,z.NodeTypes.LiquidTag);break}case ve.ConcreteNodeTypes.LiquidTag:{a.push(Nk(u,{...e,isBlockTag:!1}));break}case ve.ConcreteNodeTypes.LiquidRawTag:{a.push({type:z.NodeTypes.LiquidRawTag,markup:_y(u.name,u.markup),name:u.name,body:Lk(u,e),whitespaceStart:(r=u.whitespaceStart)!==null&&r!==void 0?r:"",whitespaceEnd:(i=u.whitespaceEnd)!==null&&i!==void 0?i:"",delimiterWhitespaceStart:(n=u.delimiterWhitespaceStart)!==null&&n!==void 0?n:"",delimiterWhitespaceEnd:(s=u.delimiterWhitespaceEnd)!==null&&s!==void 0?s:"",position:de(u),blockStartPosition:{start:u.blockStartLocStart,end:u.blockStartLocEnd},blockEndPosition:{start:u.blockEndLocStart,end:u.blockEndLocEnd},source:u.source});break}case ve.ConcreteNodeTypes.HtmlTagOpen:{a.open(W6(u,e));break}case ve.ConcreteNodeTypes.HtmlTagClose:{Q6(a,t,o,e.mode)?a.push(z6(u,e)):a.close(u,z.NodeTypes.HtmlElement);break}case ve.ConcreteNodeTypes.HtmlVoidElement:{a.push(J6(u,e));break}case ve.ConcreteNodeTypes.HtmlSelfClosingElement:{a.push(K6(u,e));break}case ve.ConcreteNodeTypes.HtmlDoctype:{a.push({type:z.NodeTypes.HtmlDoctype,legacyDoctypeString:u.legacyDoctypeString,position:de(u),source:u.source});break}case ve.ConcreteNodeTypes.HtmlComment:{a.push({type:z.NodeTypes.HtmlComment,body:u.body,position:de(u),source:u.source});break}case ve.ConcreteNodeTypes.HtmlRawTag:{a.push({type:z.NodeTypes.HtmlRawNode,name:u.name,body:Lk(u,e),attributes:zl(u.attrList||[],e),position:de(u),source:u.source,blockStartPosition:{start:u.blockStartLocStart,end:u.blockStartLocEnd},blockEndPosition:{start:u.blockEndLocStart,end:u.blockEndLocEnd}});break}case ve.ConcreteNodeTypes.AttrEmpty:{a.push({type:z.NodeTypes.AttrEmpty,name:zr(u.name,e),position:de(u),source:u.source});break}case ve.ConcreteNodeTypes.AttrSingleQuoted:case ve.ConcreteNodeTypes.AttrDoubleQuoted:case ve.ConcreteNodeTypes.AttrUnquoted:{let l={type:u.type,name:zr(u.name,e),position:de(u),source:u.source,attributePosition:{start:-1,end:-1},value:[]},f=T6(u.value,e);l.value=f,l.attributePosition=A6(u,f),a.push(l);break}case ve.ConcreteNodeTypes.YAMLFrontmatter:{a.push({type:z.NodeTypes.YAMLFrontmatter,body:u.body,position:de(u),source:u.source});break}case ve.ConcreteNodeTypes.LiquidDocParamNode:{a.push({type:z.NodeTypes.LiquidDocParamNode,name:u.name,position:de(u),source:u.source,paramName:va(u.paramName.content),paramDescription:qk(u.paramDescription),paramType:qk(u.paramType),required:u.paramName.required});break}case ve.ConcreteNodeTypes.LiquidDocDescriptionNode:{a.push({type:z.NodeTypes.LiquidDocDescriptionNode,name:u.name,position:de(u),source:u.source,content:va(u.content),isImplicit:u.isImplicit,isInline:u.isInline});break}case ve.ConcreteNodeTypes.LiquidDocExampleNode:{a.push({type:z.NodeTypes.LiquidDocExampleNode,name:u.name,position:de(u),source:u.source,content:va(u.content),isInline:u.isInline});break}case ve.ConcreteNodeTypes.LiquidDocPromptNode:{a.push({type:z.NodeTypes.LiquidDocPromptNode,name:u.name,position:de(u),source:u.source,content:va(u.content)});break}default:(0,fi.assertNever)(u)}}return a}function Ek(t){let e=t.at(0);return t.at(-1).locEnd-e.locStart}function A6(t,e){return e.length===0?{start:t.locStart+Ek(t.name)+1+1,end:t.locStart+Ek(t.name)+1+1}:{start:e[0].position.start,end:e[e.length-1].position.end}}function T6(t,e){return zr(t,e)}function zl(t,e){return zr(t,e)}function Ft(t){var e,r;return{type:z.NodeTypes.LiquidTag,position:de(t),whitespaceStart:(e=t.whitespaceStart)!==null&&e!==void 0?e:"",whitespaceEnd:(r=t.whitespaceEnd)!==null&&r!==void 0?r:"",blockStartPosition:de(t),source:t.source}}function Ok(t){var e,r;return{type:z.NodeTypes.LiquidBranch,children:[],position:de(t),whitespaceStart:(e=t.whitespaceStart)!==null&&e!==void 0?e:"",whitespaceEnd:(r=t.whitespaceEnd)!==null&&r!==void 0?r:"",blockStartPosition:de(t),blockEndPosition:{start:-1,end:-1},source:t.source}}function Nk(t,e){return typeof t.markup!="string"?E6(t,e):S6(t)?O6(t):e.isBlockTag?{name:t.name,markup:_y(t.name,t.markup),children:e.isBlockTag?[]:void 0,...Ft(t)}:{name:t.name,markup:_y(t.name,t.markup),...Ft(t)}}function E6(t,e){switch(t.name){case z.NamedTags.echo:return{...Ft(t),name:z.NamedTags.echo,markup:Sy(t.markup)};case z.NamedTags.assign:return{...Ft(t),name:z.NamedTags.assign,markup:L6(t.markup)};case z.NamedTags.cycle:return{...Ft(t),name:t.name,markup:P6(t.markup)};case z.NamedTags.increment:case z.NamedTags.decrement:return{...Ft(t),name:t.name,markup:Je(t.markup)};case z.NamedTags.capture:return{...Ft(t),name:t.name,markup:Je(t.markup),children:[]};case z.NamedTags.content_for:return{...Ft(t),name:t.name,markup:F6(t.markup)};case z.NamedTags.include:case z.NamedTags.render:return{...Ft(t),name:t.name,markup:j6(t.markup)};case z.NamedTags.layout:case z.NamedTags.section:return{...Ft(t),name:t.name,markup:Je(t.markup)};case z.NamedTags.sections:return{...Ft(t),name:t.name,markup:Je(t.markup)};case z.NamedTags.form:return{...Ft(t),name:t.name,markup:t.markup.map(Jl),children:[]};case z.NamedTags.tablerow:case z.NamedTags.for:return{...Ft(t),name:t.name,markup:q6(t.markup),children:[]};case z.NamedTags.paginate:return{...Ft(t),name:t.name,markup:C6(t.markup),children:[]};case z.NamedTags.if:case z.NamedTags.unless:return{...Ft(t),name:t.name,markup:Wl(t.markup),blockEndPosition:{start:-1,end:-1},children:[]};case z.NamedTags.elsif:return{...Ok(t),name:t.name,markup:Wl(t.markup)};case z.NamedTags.case:return{...Ft(t),name:t.name,markup:Je(t.markup),children:[]};case z.NamedTags.when:return{...Ok(t),name:t.name,markup:t.markup.map(Je)};case z.NamedTags.liquid:return{...Ft(t),name:t.name,markup:zr(t.markup,e)};default:return(0,fi.assertNever)(t)}}function O6(t){var e,r;return{name:t.name,type:z.NodeTypes.LiquidBranch,markup:t.name!=="else"?t.markup:"",position:{start:t.locStart,end:t.locEnd},children:[],blockStartPosition:{start:t.locStart,end:t.locEnd},blockEndPosition:{start:-1,end:-1},whitespaceStart:(e=t.whitespaceStart)!==null&&e!==void 0?e:"",whitespaceEnd:(r=t.whitespaceEnd)!==null&&r!==void 0?r:"",source:t.source}}function N6(t){return{type:z.NodeTypes.LiquidBranch,name:null,markup:"",position:{start:t.position.end,end:t.position.end},blockStartPosition:{start:t.position.end,end:t.position.end},blockEndPosition:{start:-1,end:-1},children:[],whitespaceStart:"",whitespaceEnd:"",source:t.source}}function L6(t){return{type:z.NodeTypes.AssignMarkup,name:t.name,value:Sy(t.value),position:de(t),source:t.source}}function P6(t){return{type:z.NodeTypes.CycleMarkup,groupName:t.groupName?Je(t.groupName):null,args:t.args.map(Je),position:de(t),source:t.source}}function q6(t){return{type:z.NodeTypes.ForMarkup,variableName:t.variableName,collection:Je(t.collection),args:t.args.map(wy),reversed:!!t.reversed,position:de(t),source:t.source}}function C6(t){return{type:z.NodeTypes.PaginateMarkup,collection:Je(t.collection),pageSize:Je(t.pageSize),position:de(t),args:t.args?t.args.map(wy):[],source:t.source}}function Lk(t,e){return{type:z.NodeTypes.RawMarkup,kind:R6(t),nodes:zr(t.children,e),value:t.body,position:{start:t.blockStartLocEnd,end:t.blockEndLocStart},source:t.source}}function R6(t){switch(t.type){case ve.ConcreteNodeTypes.HtmlRawTag:return M6(t);case ve.ConcreteNodeTypes.LiquidRawTag:return D6(t);default:return(0,fi.assertNever)(t)}}var Rk=/(\{%|\{\{)-?/g;function M6(t){var e;switch(t.name){case"script":{let r=(e=t.attrList)===null||e===void 0?void 0:e.find(n=>"name"in n&&typeof n.name!="string"&&n.name.length===1&&n.name[0].type===ve.ConcreteNodeTypes.TextNode&&n.name[0].value==="type");if(!r||!("value"in r)||r.value.length===0||r.value[0].type!==ve.ConcreteNodeTypes.TextNode)return Zt.javascript;let i=r.value[0].value;return i==="text/markdown"?Zt.markdown:i==="application/x-typescript"?Zt.typescript:i==="text/html"?Zt.html:i&&(i.endsWith("json")||i.endsWith("importmap"))||i==="speculationrules"?Zt.json:Zt.javascript}case"style":return Rk.test(t.body)?Zt.text:Zt.css;default:return Zt.text}}function D6(t){switch(t.name){case"javascript":return Zt.javascript;case"stylesheet":case"style":return Rk.test(t.body)?Zt.text:Zt.css;case"schema":return Zt.json;default:return Zt.text}}function F6(t){return{type:z.NodeTypes.ContentForMarkup,contentForType:Je(t.contentForType),args:t.args.map(Jl),position:de(t),source:t.source}}function j6(t){return{type:z.NodeTypes.RenderMarkup,snippet:Je(t.snippet),alias:V6(t.alias),variable:B6(t.variable),args:t.renderArguments.map(Jl),position:de(t),source:t.source}}function B6(t){return t?{type:z.NodeTypes.RenderVariableExpression,kind:t.kind,name:Je(t.name),position:de(t),source:t.source}:null}function V6(t){return t?{type:z.NodeTypes.RenderAliasExpression,value:t.value,position:de(t),source:t.source}:null}function Wl(t){if(t.length===1)return Pk(t[0]);let[e,r]=t,[,...i]=t;return{type:z.NodeTypes.LogicalExpression,relation:r.relation,left:Pk(e),right:Wl(i),position:{start:e.locStart,end:t[t.length-1].locEnd},source:e.source}}function Pk(t){let e=t.expression;return e.type===ve.ConcreteNodeTypes.Comparison?$6(e):Je(e)}function $6(t){return{type:z.NodeTypes.Comparison,comparator:t.comparator,left:Je(t.left),right:Je(t.right),position:de(t),source:t.source}}function U6(t){var e,r;return{type:z.NodeTypes.LiquidVariableOutput,markup:typeof t.markup=="string"?t.markup:Sy(t.markup),whitespaceStart:(e=t.whitespaceStart)!==null&&e!==void 0?e:"",whitespaceEnd:(r=t.whitespaceEnd)!==null&&r!==void 0?r:"",position:de(t),source:t.source}}function Sy(t){return{type:z.NodeTypes.LiquidVariable,expression:H6(t.expression),filters:t.filters.map(G6),position:de(t),rawSource:t.rawSource,source:t.source}}function H6(t){return t.type===ve.ConcreteNodeTypes.BooleanExpression?{type:z.NodeTypes.BooleanExpression,position:de(t),condition:Wl(t.conditions),source:t.source}:Je(t)}function Je(t){switch(t.type){case ve.ConcreteNodeTypes.String:return{type:z.NodeTypes.String,position:de(t),single:t.single,value:t.value,source:t.source};case ve.ConcreteNodeTypes.Number:return{type:z.NodeTypes.Number,position:de(t),value:t.value,source:t.source};case ve.ConcreteNodeTypes.LiquidLiteral:return{type:z.NodeTypes.LiquidLiteral,position:de(t),value:t.value,keyword:t.keyword,source:t.source};case ve.ConcreteNodeTypes.Range:return{type:z.NodeTypes.Range,start:Je(t.start),end:Je(t.end),position:de(t),source:t.source};case ve.ConcreteNodeTypes.VariableLookup:return{type:z.NodeTypes.VariableLookup,name:t.name,lookups:t.lookups.map(Je),position:de(t),source:t.source};default:return(0,fi.assertNever)(t)}}function G6(t){return{type:z.NodeTypes.LiquidFilter,name:t.name,args:t.args.map(Jl),position:de(t),source:t.source}}function Jl(t){return t.type===ve.ConcreteNodeTypes.NamedArgument?wy(t):Je(t)}function wy(t){return{type:z.NodeTypes.NamedArgument,name:t.name,value:Je(t.value),position:de(t),source:t.source}}function W6(t,e){return{type:z.NodeTypes.HtmlElement,name:zr(t.name,e),attributes:zl(t.attrList||[],e),position:de(t),blockStartPosition:de(t),blockEndPosition:{start:-1,end:-1},children:[],source:t.source}}function z6(t,e){return{type:z.NodeTypes.HtmlDanglingMarkerClose,name:zr(t.name,e),position:de(t),blockStartPosition:de(t),source:t.source}}function J6(t,e){return{type:z.NodeTypes.HtmlVoidElement,name:t.name,attributes:zl(t.attrList||[],e),position:de(t),blockStartPosition:de(t),source:t.source}}function K6(t,e){return{type:z.NodeTypes.HtmlSelfClosingElement,name:zr(t.name,e),attributes:zl(t.attrList||[],e),position:de(t),blockStartPosition:de(t),source:t.source}}function qk(t){return!t||t.value===""?null:va(t)}function va(t){return{type:z.NodeTypes.TextNode,value:t.value,position:de(t),source:t.source}}function Q6(t,e,r,i){if(i==="completion"){let n=e[r];return!(t.parent&&t.parent.type===z.NodeTypes.HtmlElement&&Sr(t.parent)===Sr(n))}return Y6(t)}function Y6(t){let{parent:e,grandparent:r}=t;return!e||!r?!1:e.type===z.NodeTypes.LiquidBranch&&r.type===z.NodeTypes.LiquidTag&&["if","unless","case"].includes(r.name)}function _y(t,e){return v6.TAGS_WITHOUT_MARKUP.includes(t)?"":e}function de(t){return{start:t.locStart,end:t.locEnd}}function vy(t,e,r){for(let i of Object.keys(t)){if(z.nonTraversableProperties.has(i))continue;let n=t[i];Array.isArray(n)?n.filter(by).forEach(s=>vy(s,e,t)):by(n)&&vy(n,e,t)}e(t,r)}function by(t){return t!==null&&typeof t=="object"&&"type"in t&&z.NodeTypes.hasOwnProperty(t.type)}function Mk(t,e){var r;if(t)return Sr(t)===null&&e&&(t=e),{type:t.type,name:(r=Sr(t))!==null&&r!==void 0?r:"",blockStartPosition:"blockStartPosition"in t?t.blockStartPosition:t.position}}});var Fk=T(Kl=>{"use strict";y();Object.defineProperty(Kl,"__esModule",{value:!0});Kl.getConditionalComment=void 0;var X6=/(<!--\[if[^\]]*]>)((.|\n)*)(<!\[endif\]-->)$/,Z6=t=>{let e=t.match(X6);if(e)return{startTag:e[1],body:e[2].trim(),endTag:e[4]}};Kl.getConditionalComment=Z6});var ge=T(St=>{"use strict";y();var e5=St&&St.__createBinding||(Object.create?(function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n)}):(function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]})),xy=St&&St.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&e5(e,t,r)};Object.defineProperty(St,"__esModule",{value:!0});St.getConditionalComment=St.BLOCKS=St.VOID_ELEMENTS=St.RAW_TAGS=St.TAGS_WITHOUT_MARKUP=void 0;xy(Dk(),St);xy(Ul(),St);xy(Vl(),St);var Ql=Bl();Object.defineProperty(St,"TAGS_WITHOUT_MARKUP",{enumerable:!0,get:function(){return Ql.TAGS_WITHOUT_MARKUP}});Object.defineProperty(St,"RAW_TAGS",{enumerable:!0,get:function(){return Ql.RAW_TAGS}});Object.defineProperty(St,"VOID_ELEMENTS",{enumerable:!0,get:function(){return Ql.VOID_ELEMENTS}});Object.defineProperty(St,"BLOCKS",{enumerable:!0,get:function(){return Ql.BLOCKS}});var t5=Fk();Object.defineProperty(St,"getConditionalComment",{enumerable:!0,get:function(){return t5.getConditionalComment}})});var Iy=T((jne,ky)=>{y();var Xl=process||{},jk=Xl.argv||[],Yl=Xl.env||{},r5=!(Yl.NO_COLOR||jk.includes("--no-color"))&&(!!Yl.FORCE_COLOR||jk.includes("--color")||Xl.platform==="win32"||(Xl.stdout||{}).isTTY&&Yl.TERM!=="dumb"||!!Yl.CI),i5=(t,e,r=t)=>i=>{let n=""+i,s=n.indexOf(e,t.length);return~s?t+n5(n,e,r,s)+e:t+n+e},n5=(t,e,r,i)=>{let n="",s=0;do n+=t.substring(s,i)+r,s=i+e.length,i=t.indexOf(e,s);while(~i);return n+t.substring(s)},Bk=(t=r5)=>{let e=t?i5:()=>String;return{isColorSupported:t,reset:e("\x1B[0m","\x1B[0m"),bold:e("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:e("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:e("\x1B[3m","\x1B[23m"),underline:e("\x1B[4m","\x1B[24m"),inverse:e("\x1B[7m","\x1B[27m"),hidden:e("\x1B[8m","\x1B[28m"),strikethrough:e("\x1B[9m","\x1B[29m"),black:e("\x1B[30m","\x1B[39m"),red:e("\x1B[31m","\x1B[39m"),green:e("\x1B[32m","\x1B[39m"),yellow:e("\x1B[33m","\x1B[39m"),blue:e("\x1B[34m","\x1B[39m"),magenta:e("\x1B[35m","\x1B[39m"),cyan:e("\x1B[36m","\x1B[39m"),white:e("\x1B[37m","\x1B[39m"),gray:e("\x1B[90m","\x1B[39m"),bgBlack:e("\x1B[40m","\x1B[49m"),bgRed:e("\x1B[41m","\x1B[49m"),bgGreen:e("\x1B[42m","\x1B[49m"),bgYellow:e("\x1B[43m","\x1B[49m"),bgBlue:e("\x1B[44m","\x1B[49m"),bgMagenta:e("\x1B[45m","\x1B[49m"),bgCyan:e("\x1B[46m","\x1B[49m"),bgWhite:e("\x1B[47m","\x1B[49m"),blackBright:e("\x1B[90m","\x1B[39m"),redBright:e("\x1B[91m","\x1B[39m"),greenBright:e("\x1B[92m","\x1B[39m"),yellowBright:e("\x1B[93m","\x1B[39m"),blueBright:e("\x1B[94m","\x1B[39m"),magentaBright:e("\x1B[95m","\x1B[39m"),cyanBright:e("\x1B[96m","\x1B[39m"),whiteBright:e("\x1B[97m","\x1B[39m"),bgBlackBright:e("\x1B[100m","\x1B[49m"),bgRedBright:e("\x1B[101m","\x1B[49m"),bgGreenBright:e("\x1B[102m","\x1B[49m"),bgYellowBright:e("\x1B[103m","\x1B[49m"),bgBlueBright:e("\x1B[104m","\x1B[49m"),bgMagentaBright:e("\x1B[105m","\x1B[49m"),bgCyanBright:e("\x1B[106m","\x1B[49m"),bgWhiteBright:e("\x1B[107m","\x1B[49m")}};ky.exports=Bk();ky.exports.createColors=Bk});var tf=T((Vne,$k)=>{"use strict";y();var Zl=/[\t\n\f\r "#'()/;[\\\]{}]/g,ef=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,s5=/.[\r\n"'(/\\]/,Vk=/[\da-f]/i;$k.exports=function(e,r={}){let i=e.css.valueOf(),n=r.ignoreErrors,s,a,o,u,l,f,h,p,m,v,S=i.length,b=0,g=[],k=[];function w(){return b}function _(L){throw e.error("Unclosed "+L,b)}function A(){return k.length===0&&b>=S}function E(L){if(k.length)return k.pop();if(b>=S)return;let B=L?L.ignoreUnclosed:!1;switch(s=i.charCodeAt(b),s){case 10:case 32:case 9:case 13:case 12:{u=b;do u+=1,s=i.charCodeAt(u);while(s===32||s===10||s===9||s===13||s===12);f=["space",i.slice(b,u)],b=u-1;break}case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let R=String.fromCharCode(s);f=[R,R,b];break}case 40:{if(v=g.length?g.pop()[1]:"",m=i.charCodeAt(b+1),v==="url"&&m!==39&&m!==34&&m!==32&&m!==10&&m!==9&&m!==12&&m!==13){u=b;do{if(h=!1,u=i.indexOf(")",u+1),u===-1)if(n||B){u=b;break}else _("bracket");for(p=u;i.charCodeAt(p-1)===92;)p-=1,h=!h}while(h);f=["brackets",i.slice(b,u+1),b,u],b=u}else u=i.indexOf(")",b+1),a=i.slice(b,u+1),u===-1||s5.test(a)?f=["(","(",b]:(f=["brackets",a,b,u],b=u);break}case 39:case 34:{l=s===39?"'":'"',u=b;do{if(h=!1,u=i.indexOf(l,u+1),u===-1)if(n||B){u=b+1;break}else _("string");for(p=u;i.charCodeAt(p-1)===92;)p-=1,h=!h}while(h);f=["string",i.slice(b,u+1),b,u],b=u;break}case 64:{Zl.lastIndex=b+1,Zl.test(i),Zl.lastIndex===0?u=i.length-1:u=Zl.lastIndex-2,f=["at-word",i.slice(b,u+1),b,u],b=u;break}case 92:{for(u=b,o=!0;i.charCodeAt(u+1)===92;)u+=1,o=!o;if(s=i.charCodeAt(u+1),o&&s!==47&&s!==32&&s!==10&&s!==9&&s!==13&&s!==12&&(u+=1,Vk.test(i.charAt(u)))){for(;Vk.test(i.charAt(u+1));)u+=1;i.charCodeAt(u+1)===32&&(u+=1)}f=["word",i.slice(b,u+1),b,u],b=u;break}default:{s===47&&i.charCodeAt(b+1)===42?(u=i.indexOf("*/",b+2)+1,u===0&&(n||B?u=i.length:_("comment")),f=["comment",i.slice(b,u+1),b,u],b=u):(ef.lastIndex=b+1,ef.test(i),ef.lastIndex===0?u=i.length-1:u=ef.lastIndex-2,f=["word",i.slice(b,u+1),b,u],g.push(f),b=u);break}}return b++,f}function O(L){k.push(L)}return{back:O,endOfFile:A,nextToken:E,position:w}}});var Ay=T((Une,Gk)=>{"use strict";y();var ur=Iy(),a5=tf(),Uk;function o5(t){Uk=t}var u5={";":ur.yellow,":":ur.yellow,"(":ur.cyan,")":ur.cyan,"[":ur.yellow,"]":ur.yellow,"{":ur.yellow,"}":ur.yellow,"at-word":ur.cyan,brackets:ur.cyan,call:ur.cyan,class:ur.yellow,comment:ur.gray,hash:ur.magenta,string:ur.green};function c5([t,e],r){if(t==="word"){if(e[0]===".")return"class";if(e[0]==="#")return"hash"}if(!r.endOfFile()){let i=r.nextToken();if(r.back(i),i[0]==="brackets"||i[0]==="(")return"call"}return t}function Hk(t){let e=a5(new Uk(t),{ignoreErrors:!0}),r="";for(;!e.endOfFile();){let i=e.nextToken(),n=u5[c5(i,e)];n?r+=i[1].split(/\r?\n/).map(s=>n(s)).join(`
|
|
1146
|
+
`):r+=i[1]}return r}Hk.registerInput=o5;Gk.exports=Hk});var rf=T((Gne,Jk)=>{"use strict";y();var Wk=Iy(),zk=Ay(),zo=class t extends Error{constructor(e,r,i,n,s,a){super(e),this.name="CssSyntaxError",this.reason=e,s&&(this.file=s),n&&(this.source=n),a&&(this.plugin=a),typeof r<"u"&&typeof i<"u"&&(typeof r=="number"?(this.line=r,this.column=i):(this.line=r.line,this.column=r.column,this.endLine=i.line,this.endColumn=i.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,t)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let r=this.source;e==null&&(e=Wk.isColorSupported);let i=f=>f,n=f=>f,s=f=>f;if(e){let{bold:f,gray:h,red:p}=Wk.createColors(!0);n=m=>f(p(m)),i=m=>h(m),zk&&(s=m=>zk(m))}let a=r.split(/\r?\n/),o=Math.max(this.line-3,0),u=Math.min(this.line+2,a.length),l=String(u).length;return a.slice(o,u).map((f,h)=>{let p=o+1+h,m=" "+(" "+p).slice(-l)+" | ";if(p===this.line){if(f.length>160){let S=20,b=Math.max(0,this.column-S),g=Math.max(this.column+S,this.endColumn+S),k=f.slice(b,g),w=i(m.replace(/\d/g," "))+f.slice(0,Math.min(this.column-1,S-1)).replace(/[^\t]/g," ");return n(">")+i(m)+s(k)+`
|
|
1147
|
+
`+w+n("^")}let v=i(m.replace(/\d/g," "))+f.slice(0,this.column-1).replace(/[^\t]/g," ");return n(">")+i(m)+s(f)+`
|
|
1148
|
+
`+v+n("^")}return" "+i(m)+s(f)}).join(`
|
|
1149
|
+
`)}toString(){let e=this.showSourceCode();return e&&(e=`
|
|
1150
|
+
|
|
1151
|
+
`+e+`
|
|
1152
|
+
`),this.name+": "+this.message+e}};Jk.exports=zo;zo.default=zo});var Ty=T((zne,Qk)=>{"use strict";y();var l5=/(<)(\/?style\b)/gi,f5=/(<)(!--)/g;function bn(t){return typeof t!="string"||!t.includes("<")?t:t.replace(l5,"\\3c $2").replace(f5,"\\3c $2")}var Kk={after:`
|
|
1153
|
+
`,beforeClose:`
|
|
1154
|
+
`,beforeComment:`
|
|
1155
|
+
`,beforeDecl:`
|
|
1156
|
+
`,beforeOpen:" ",beforeRule:`
|
|
1157
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function p5(t){return t[0].toUpperCase()+t.slice(1)}var Jo=class{constructor(e){this.builder=e}atrule(e,r){let i="@"+e.name,n=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?i+=e.raws.afterName:n&&(i+=" "),e.nodes)this.block(e,i+n);else{let s=(e.raws.between||"")+(r?";":"");this.builder(bn(i+n+s),e)}}beforeAfter(e,r){let i;e.type==="decl"?i=this.raw(e,null,"beforeDecl"):e.type==="comment"?i=this.raw(e,null,"beforeComment"):r==="before"?i=this.raw(e,null,"beforeRule"):i=this.raw(e,null,"beforeClose");let n=e.parent,s=0;for(;n&&n.type!=="root";)s+=1,n=n.parent;if(i.includes(`
|
|
1158
|
+
`)){let a=this.raw(e,null,"indent");if(a.length)for(let o=0;o<s;o++)i+=a}return i}block(e,r){let i=this.raw(e,"between","beforeOpen");this.builder(bn(r+i)+"{",e,"start");let n;e.nodes&&e.nodes.length?(this.body(e),n=this.raw(e,"after")):n=this.raw(e,"after","emptyBody"),n&&this.builder(bn(n)),this.builder("}",e,"end")}body(e){let r=e.nodes.length-1;for(;r>0&&e.nodes[r].type==="comment";)r-=1;let i=this.raw(e,"semicolon"),n=e.type==="document";for(let s=0;s<e.nodes.length;s++){let a=e.nodes[s],o=this.raw(a,"before");o&&this.builder(n?o:bn(o)),this.stringify(a,r!==s||i)}}comment(e){let r=this.raw(e,"left","commentLeft"),i=this.raw(e,"right","commentRight");this.builder(bn("/*"+r+e.text+i+"*/"),e)}decl(e,r){let i=this.raw(e,"between","colon"),n=e.prop+i+this.rawValue(e,"value");e.important&&(n+=e.raws.important||" !important"),r&&(n+=";"),this.builder(bn(n),e)}document(e){this.body(e)}raw(e,r,i){let n;if(i||(i=r),r&&(n=e.raws[r],typeof n<"u"))return n;let s=e.parent;if(i==="before"&&(!s||s.type==="root"&&s.first===e||s&&s.type==="document"))return"";if(!s)return Kk[i];let a=e.root();if(a.rawCache||(a.rawCache={}),typeof a.rawCache[i]<"u")return a.rawCache[i];if(i==="before"||i==="after")return this.beforeAfter(e,i);{let o="raw"+p5(i);this[o]?n=this[o](a,e):a.walk(u=>{if(n=u.raws[r],typeof n<"u")return!1})}return typeof n>"u"&&(n=Kk[i]),a.rawCache[i]=n,n}rawBeforeClose(e){let r;return e.walk(i=>{if(i.nodes&&i.nodes.length>0&&typeof i.raws.after<"u")return r=i.raws.after,r.includes(`
|
|
1159
|
+
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),r&&(r=r.replace(/\S/g,"")),r}rawBeforeComment(e,r){let i;return e.walkComments(n=>{if(typeof n.raws.before<"u")return i=n.raws.before,i.includes(`
|
|
1160
|
+
`)&&(i=i.replace(/[^\n]+$/,"")),!1}),typeof i>"u"?i=this.raw(r,null,"beforeDecl"):i&&(i=i.replace(/\S/g,"")),i}rawBeforeDecl(e,r){let i;return e.walkDecls(n=>{if(typeof n.raws.before<"u")return i=n.raws.before,i.includes(`
|
|
1161
|
+
`)&&(i=i.replace(/[^\n]+$/,"")),!1}),typeof i>"u"?i=this.raw(r,null,"beforeRule"):i&&(i=i.replace(/\S/g,"")),i}rawBeforeOpen(e){let r;return e.walk(i=>{if(i.type!=="decl"&&(r=i.raws.between,typeof r<"u"))return!1}),r}rawBeforeRule(e){let r;return e.walk(i=>{if(i.nodes&&(i.parent!==e||e.first!==i)&&typeof i.raws.before<"u")return r=i.raws.before,r.includes(`
|
|
1162
|
+
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),r&&(r=r.replace(/\S/g,"")),r}rawColon(e){let r;return e.walkDecls(i=>{if(typeof i.raws.between<"u")return r=i.raws.between.replace(/[^\s:]/g,""),!1}),r}rawEmptyBody(e){let r;return e.walk(i=>{if(i.nodes&&i.nodes.length===0&&(r=i.raws.after,typeof r<"u"))return!1}),r}rawIndent(e){if(e.raws.indent)return e.raws.indent;let r;return e.walk(i=>{let n=i.parent;if(n&&n!==e&&n.parent&&n.parent===e&&typeof i.raws.before<"u"){let s=i.raws.before.split(`
|
|
1163
|
+
`);return r=s[s.length-1],r=r.replace(/\S/g,""),!1}}),r}rawSemicolon(e){let r;return e.walk(i=>{if(i.nodes&&i.nodes.length&&i.last.type==="decl"&&(r=i.raws.semicolon,typeof r<"u"))return!1}),r}rawValue(e,r){let i=e[r],n=e.raws[r];return n&&n.value===i?n.raw:i}root(e){if(this.body(e),e.raws.after){let r=e.raws.after,i=e.parent&&e.parent.type==="document";this.builder(i?r:bn(r))}}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(bn(e.raws.ownSemicolon),e,"end")}stringify(e,r){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,r)}};Qk.exports=Jo;Jo.default=Jo});var Ko=T((Kne,Yk)=>{"use strict";y();var h5=Ty();function Ey(t,e){new h5(e).stringify(t)}Yk.exports=Ey;Ey.default=Ey});var nf=T((Yne,Oy)=>{"use strict";y();Oy.exports.isClean=Symbol("isClean");Oy.exports.my=Symbol("my")});var Xo=T((Zne,Xk)=>{"use strict";y();var d5=rf(),m5=Ty(),g5=Ko(),{isClean:Qo,my:y5}=nf();function Ny(t,e){let r=new t.constructor;for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i)||i==="proxyCache")continue;let n=t[i],s=typeof n;i==="parent"&&s==="object"?e&&(r[i]=e):i==="source"?r[i]=n:Array.isArray(n)?r[i]=n.map(a=>Ny(a,r)):(s==="object"&&n!==null&&(n=Ny(n)),r[i]=n)}return r}function Yi(t,e){if(e&&typeof e.offset<"u")return e.offset;let r=1,i=1,n=0;for(let s=0;s<t.length;s++){if(i===e.line&&r===e.column){n=s;break}t[s]===`
|
|
1164
|
+
`?(r=1,i+=1):r+=1}return n}var Yo=class{get proxyOf(){return this}constructor(e={}){this.raws={},this[Qo]=!1,this[y5]=!0;for(let r in e)if(r==="nodes"){this.nodes=[];for(let i of e[r])typeof i.clone=="function"?this.append(i.clone()):this.append(i)}else this[r]=e[r]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let r=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${r.input.from}:${r.start.line}:${r.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let r in e)this[r]=e[r];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let r=Ny(this);for(let i in e)r[i]=e[i];return r}cloneAfter(e={}){let r=this.clone(e);return this.parent.insertAfter(this,r),r}cloneBefore(e={}){let r=this.clone(e);return this.parent.insertBefore(this,r),r}error(e,r={}){if(this.source){let{end:i,start:n}=this.rangeBy(r);return this.source.input.error(e,{column:n.column,line:n.line},{column:i.column,line:i.line},r)}return new d5(e)}getProxyProcessor(){return{get(e,r){return r==="proxyOf"?e:r==="root"?()=>e.root().toProxy():e[r]},set(e,r,i){return e[r]===i||(e[r]=i,(r==="prop"||r==="value"||r==="name"||r==="params"||r==="important"||r==="text")&&e.markDirty()),!0}}}markClean(){this[Qo]=!0}markDirty(){if(this[Qo]){this[Qo]=!1;let e=this;for(;e=e.parent;)e[Qo]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e={}){let r=this.source.start;if(e.index)r=this.positionInside(e.index);else if(e.word){let i="document"in this.source.input?this.source.input.document:this.source.input.css,s=i.slice(Yi(i,this.source.start),Yi(i,this.source.end)).indexOf(e.word);s!==-1&&(r=this.positionInside(s))}return r}positionInside(e){let r=this.source.start.column,i=this.source.start.line,n="document"in this.source.input?this.source.input.document:this.source.input.css,s=Yi(n,this.source.start),a=s+e;for(let o=s;o<a;o++)n[o]===`
|
|
1165
|
+
`?(r=1,i+=1):r+=1;return{column:r,line:i,offset:a}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e={}){let r="document"in this.source.input?this.source.input.document:this.source.input.css,i={column:this.source.start.column,line:this.source.start.line,offset:Yi(r,this.source.start)},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:Yi(r,this.source.end)+1}:{column:i.column+1,line:i.line,offset:i.offset+1};if(e.word){let a=r.slice(Yi(r,this.source.start),Yi(r,this.source.end)).indexOf(e.word);a!==-1&&(i=this.positionInside(a),n=this.positionInside(a+e.word.length))}else e.start?i={column:e.start.column,line:e.start.line,offset:Yi(r,e.start)}:e.index&&(i=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line,offset:Yi(r,e.end)}:typeof e.endIndex=="number"?n=this.positionInside(e.endIndex):e.index&&(n=this.positionInside(e.index+1));return(n.line<i.line||n.line===i.line&&n.column<=i.column)&&(n={column:i.column+1,line:i.line,offset:i.offset+1}),{end:n,start:i}}raw(e,r){return new m5().raw(this,e,r)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let r=this,i=!1;for(let n of e)n===this?i=!0:i?(this.parent.insertAfter(r,n),r=n):this.parent.insertBefore(r,n);i||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,r){let i={},n=r==null;r=r||new Map;let s=0;for(let a in this){if(!Object.prototype.hasOwnProperty.call(this,a)||a==="parent"||a==="proxyCache")continue;let o=this[a];if(Array.isArray(o))i[a]=o.map(u=>typeof u=="object"&&u.toJSON?u.toJSON(null,r):u);else if(typeof o=="object"&&o.toJSON)i[a]=o.toJSON(null,r);else if(a==="source"){if(o==null)continue;let u=r.get(o.input);u==null&&(u=s,r.set(o.input,s),s++),i[a]={end:o.end,inputId:u,start:o.start}}else i[a]=o}return n&&(i.inputs=[...r.keys()].map(a=>a.toJSON())),i}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=g5){e.stringify&&(e=e.stringify);let r="";return e(this,i=>{r+=i}),r}warn(e,r,i={}){let n={node:this};for(let s in i)n[s]=i[s];return e.warn(r,n)}};Xk.exports=Yo;Yo.default=Yo});var ba=T((tse,Zk)=>{"use strict";y();var _5=Xo(),Zo=class extends _5{constructor(e){super(e),this.type="comment"}};Zk.exports=Zo;Zo.default=Zo});var tu=T((ise,eI)=>{"use strict";y();var v5=Xo(),eu=class extends v5{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}};eI.exports=eu;eu.default=eu});var Sn=T((sse,cI)=>{"use strict";y();var tI=ba(),rI=tu(),b5=Xo(),{isClean:iI,my:nI}=nf(),Ly,sI,aI,Py;function oI(t){return t.map(e=>(e.nodes&&(e.nodes=oI(e.nodes)),delete e.source,e))}function uI(t){if(t[iI]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)uI(e)}var hi=class t extends b5{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...e){for(let r of e){let i=this.normalize(r,this.last);for(let n of i)this.proxyOf.nodes.push(n)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let r of this.nodes)r.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let r=this.getIterator(),i,n;for(;this.indexes[r]<this.proxyOf.nodes.length&&(i=this.indexes[r],n=e(this.proxyOf.nodes[i],i),n!==!1);)this.indexes[r]+=1;return delete this.indexes[r],n}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,r){return r==="proxyOf"?e:e[r]?r==="each"||typeof r=="string"&&r.startsWith("walk")?(...i)=>e[r](...i.map(n=>typeof n=="function"?(s,a)=>n(s.toProxy(),a):n)):r==="every"||r==="some"?i=>e[r]((n,...s)=>i(n.toProxy(),...s)):r==="root"?()=>e.root().toProxy():r==="nodes"?e.nodes.map(i=>i.toProxy()):r==="first"||r==="last"?e[r].toProxy():e[r]:e[r]},set(e,r,i){return e[r]===i||(e[r]=i,(r==="name"||r==="params"||r==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,r){let i=this.index(e),n=this.normalize(r,this.proxyOf.nodes[i]).reverse();i=this.index(e);for(let a of n)this.proxyOf.nodes.splice(i+1,0,a);let s;for(let a in this.indexes)s=this.indexes[a],i<s&&(this.indexes[a]=s+n.length);return this.markDirty(),this}insertBefore(e,r){let i=this.index(e),n=i===0?"prepend":!1,s=this.normalize(r,this.proxyOf.nodes[i],n).reverse();i=this.index(e);for(let o of s)this.proxyOf.nodes.splice(i,0,o);let a;for(let o in this.indexes)a=this.indexes[o],i<=a&&(this.indexes[o]=a+s.length);return this.markDirty(),this}normalize(e,r){if(typeof e=="string")e=oI(sI(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let n of e)n.parent&&n.parent.removeChild(n,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let n of e)n.parent&&n.parent.removeChild(n,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new rI(e)]}else if(e.selector||e.selectors)e=[new Py(e)];else if(e.name)e=[new Ly(e)];else if(e.text)e=[new tI(e)];else throw new Error("Unknown node type in node creation");return e.map(n=>(n[nI]||t.rebuild(n),n=n.proxyOf,n.parent&&n.parent.removeChild(n),n[iI]&&uI(n),n.raws||(n.raws={}),typeof n.raws.before>"u"&&r&&typeof r.raws.before<"u"&&(n.raws.before=r.raws.before.replace(/\S/g,"")),n.parent=this.proxyOf,n))}prepend(...e){e=e.reverse();for(let r of e){let i=this.normalize(r,this.first,"prepend").reverse();for(let n of i)this.proxyOf.nodes.unshift(n);for(let n in this.indexes)this.indexes[n]=this.indexes[n]+i.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let r;for(let i in this.indexes)r=this.indexes[i],r>=e&&(this.indexes[i]=r-1);return this.markDirty(),this}replaceValues(e,r,i){return i||(i=r,r={}),this.walkDecls(n=>{r.props&&!r.props.includes(n.prop)||r.fast&&!n.value.includes(r.fast)||(n.value=n.value.replace(e,i))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((r,i)=>{let n;try{n=e(r,i)}catch(s){throw r.addToError(s)}return n!==!1&&r.walk&&(n=r.walk(e)),n})}walkAtRules(e,r){return r?e instanceof RegExp?this.walk((i,n)=>{if(i.type==="atrule"&&e.test(i.name))return r(i,n)}):this.walk((i,n)=>{if(i.type==="atrule"&&i.name===e)return r(i,n)}):(r=e,this.walk((i,n)=>{if(i.type==="atrule")return r(i,n)}))}walkComments(e){return this.walk((r,i)=>{if(r.type==="comment")return e(r,i)})}walkDecls(e,r){return r?e instanceof RegExp?this.walk((i,n)=>{if(i.type==="decl"&&e.test(i.prop))return r(i,n)}):this.walk((i,n)=>{if(i.type==="decl"&&i.prop===e)return r(i,n)}):(r=e,this.walk((i,n)=>{if(i.type==="decl")return r(i,n)}))}walkRules(e,r){return r?e instanceof RegExp?this.walk((i,n)=>{if(i.type==="rule"&&e.test(i.selector))return r(i,n)}):this.walk((i,n)=>{if(i.type==="rule"&&i.selector===e)return r(i,n)}):(r=e,this.walk((i,n)=>{if(i.type==="rule")return r(i,n)}))}};hi.registerParse=t=>{sI=t};hi.registerRule=t=>{Py=t};hi.registerAtRule=t=>{Ly=t};hi.registerRoot=t=>{aI=t};cI.exports=hi;hi.default=hi;hi.rebuild=t=>{t.type==="atrule"?Object.setPrototypeOf(t,Ly.prototype):t.type==="rule"?Object.setPrototypeOf(t,Py.prototype):t.type==="decl"?Object.setPrototypeOf(t,rI.prototype):t.type==="comment"?Object.setPrototypeOf(t,tI.prototype):t.type==="root"&&Object.setPrototypeOf(t,aI.prototype),t[nI]=!0,t.nodes&&t.nodes.forEach(e=>{hi.rebuild(e)})}});var sf=T((ose,fI)=>{"use strict";y();var lI=Sn(),Sa=class extends lI{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};fI.exports=Sa;Sa.default=Sa;lI.registerAtRule(Sa)});var af=T((cse,dI)=>{"use strict";y();var S5=Sn(),pI,hI,_s=class extends S5{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new pI(new hI,this,e).stringify()}};_s.registerLazyResult=t=>{pI=t};_s.registerProcessor=t=>{hI=t};dI.exports=_s;_s.default=_s});var gI=T((fse,mI)=>{y();var w5="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",x5=(t,e=21)=>(r=e)=>{let i="",n=r|0;for(;n--;)i+=t[Math.random()*t.length|0];return i},k5=(t=21)=>{let e="",r=t|0;for(;r--;)e+=w5[Math.random()*64|0];return e};mI.exports={nanoid:k5,customAlphabet:x5}});var _I=T(qy=>{y();var yI="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");qy.encode=function(t){if(0<=t&&t<yI.length)return yI[t];throw new TypeError("Must be between 0 and 63: "+t)};qy.decode=function(t){var e=65,r=90,i=97,n=122,s=48,a=57,o=43,u=47,l=26,f=52;return e<=t&&t<=r?t-e:i<=t&&t<=n?t-i+l:s<=t&&t<=a?t-s+f:t==o?62:t==u?63:-1}});var My=T(Ry=>{y();var vI=_I(),Cy=5,bI=1<<Cy,SI=bI-1,wI=bI;function I5(t){return t<0?(-t<<1)+1:(t<<1)+0}function A5(t){var e=(t&1)===1,r=t>>1;return e?-r:r}Ry.encode=function(e){var r="",i,n=I5(e);do i=n&SI,n>>>=Cy,n>0&&(i|=wI),r+=vI.encode(i);while(n>0);return r};Ry.decode=function(e,r,i){var n=e.length,s=0,a=0,o,u;do{if(r>=n)throw new Error("Expected more digits in base 64 VLQ value.");if(u=vI.decode(e.charCodeAt(r++)),u===-1)throw new Error("Invalid base64 digit: "+e.charAt(r-1));o=!!(u&wI),u&=SI,s=s+(u<<a),a+=Cy}while(o);i.value=A5(s),i.rest=r}});var xa=T(Nt=>{y();function T5(t,e,r){if(e in t)return t[e];if(arguments.length===3)return r;throw new Error('"'+e+'" is a required argument.')}Nt.getArg=T5;var xI=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,E5=/^data:.+\,.+$/;function ru(t){var e=t.match(xI);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}Nt.urlParse=ru;function wa(t){var e="";return t.scheme&&(e+=t.scheme+":"),e+="//",t.auth&&(e+=t.auth+"@"),t.host&&(e+=t.host),t.port&&(e+=":"+t.port),t.path&&(e+=t.path),e}Nt.urlGenerate=wa;var O5=32;function N5(t){var e=[];return function(r){for(var i=0;i<e.length;i++)if(e[i].input===r){var n=e[0];return e[0]=e[i],e[i]=n,e[0].result}var s=t(r);return e.unshift({input:r,result:s}),e.length>O5&&e.pop(),s}}var Dy=N5(function(e){var r=e,i=ru(e);if(i){if(!i.path)return e;r=i.path}for(var n=Nt.isAbsolute(r),s=[],a=0,o=0;;)if(a=o,o=r.indexOf("/",a),o===-1){s.push(r.slice(a));break}else for(s.push(r.slice(a,o));o<r.length&&r[o]==="/";)o++;for(var u,l=0,o=s.length-1;o>=0;o--)u=s[o],u==="."?s.splice(o,1):u===".."?l++:l>0&&(u===""?(s.splice(o+1,l),l=0):(s.splice(o,2),l--));return r=s.join("/"),r===""&&(r=n?"/":"."),i?(i.path=r,wa(i)):r});Nt.normalize=Dy;function kI(t,e){t===""&&(t="."),e===""&&(e=".");var r=ru(e),i=ru(t);if(i&&(t=i.path||"/"),r&&!r.scheme)return i&&(r.scheme=i.scheme),wa(r);if(r||e.match(E5))return e;if(i&&!i.host&&!i.path)return i.host=e,wa(i);var n=e.charAt(0)==="/"?e:Dy(t.replace(/\/+$/,"")+"/"+e);return i?(i.path=n,wa(i)):n}Nt.join=kI;Nt.isAbsolute=function(t){return t.charAt(0)==="/"||xI.test(t)};function L5(t,e){t===""&&(t="."),t=t.replace(/\/$/,"");for(var r=0;e.indexOf(t+"/")!==0;){var i=t.lastIndexOf("/");if(i<0||(t=t.slice(0,i),t.match(/^([^\/]+:\/)?\/*$/)))return e;++r}return Array(r+1).join("../")+e.substr(t.length+1)}Nt.relative=L5;var II=(function(){var t=Object.create(null);return!("__proto__"in t)})();function AI(t){return t}function P5(t){return TI(t)?"$"+t:t}Nt.toSetString=II?AI:P5;function q5(t){return TI(t)?t.slice(1):t}Nt.fromSetString=II?AI:q5;function TI(t){if(!t)return!1;var e=t.length;if(e<9||t.charCodeAt(e-1)!==95||t.charCodeAt(e-2)!==95||t.charCodeAt(e-3)!==111||t.charCodeAt(e-4)!==116||t.charCodeAt(e-5)!==111||t.charCodeAt(e-6)!==114||t.charCodeAt(e-7)!==112||t.charCodeAt(e-8)!==95||t.charCodeAt(e-9)!==95)return!1;for(var r=e-10;r>=0;r--)if(t.charCodeAt(r)!==36)return!1;return!0}function C5(t,e,r){var i=Xi(t.source,e.source);return i!==0||(i=t.originalLine-e.originalLine,i!==0)||(i=t.originalColumn-e.originalColumn,i!==0||r)||(i=t.generatedColumn-e.generatedColumn,i!==0)||(i=t.generatedLine-e.generatedLine,i!==0)?i:Xi(t.name,e.name)}Nt.compareByOriginalPositions=C5;function R5(t,e,r){var i;return i=t.originalLine-e.originalLine,i!==0||(i=t.originalColumn-e.originalColumn,i!==0||r)||(i=t.generatedColumn-e.generatedColumn,i!==0)||(i=t.generatedLine-e.generatedLine,i!==0)?i:Xi(t.name,e.name)}Nt.compareByOriginalPositionsNoSource=R5;function M5(t,e,r){var i=t.generatedLine-e.generatedLine;return i!==0||(i=t.generatedColumn-e.generatedColumn,i!==0||r)||(i=Xi(t.source,e.source),i!==0)||(i=t.originalLine-e.originalLine,i!==0)||(i=t.originalColumn-e.originalColumn,i!==0)?i:Xi(t.name,e.name)}Nt.compareByGeneratedPositionsDeflated=M5;function D5(t,e,r){var i=t.generatedColumn-e.generatedColumn;return i!==0||r||(i=Xi(t.source,e.source),i!==0)||(i=t.originalLine-e.originalLine,i!==0)||(i=t.originalColumn-e.originalColumn,i!==0)?i:Xi(t.name,e.name)}Nt.compareByGeneratedPositionsDeflatedNoLine=D5;function Xi(t,e){return t===e?0:t===null?1:e===null?-1:t>e?1:-1}function F5(t,e){var r=t.generatedLine-e.generatedLine;return r!==0||(r=t.generatedColumn-e.generatedColumn,r!==0)||(r=Xi(t.source,e.source),r!==0)||(r=t.originalLine-e.originalLine,r!==0)||(r=t.originalColumn-e.originalColumn,r!==0)?r:Xi(t.name,e.name)}Nt.compareByGeneratedPositionsInflated=F5;function j5(t){return JSON.parse(t.replace(/^\)]}'[^\n]*\n/,""))}Nt.parseSourceMapInput=j5;function B5(t,e,r){if(e=e||"",t&&(t[t.length-1]!=="/"&&e[0]!=="/"&&(t+="/"),e=t+e),r){var i=ru(r);if(!i)throw new Error("sourceMapURL could not be parsed");if(i.path){var n=i.path.lastIndexOf("/");n>=0&&(i.path=i.path.substring(0,n+1))}e=kI(wa(i),e)}return Dy(e)}Nt.computeSourceURL=B5});var By=T(EI=>{y();var Fy=xa(),jy=Object.prototype.hasOwnProperty,vs=typeof Map<"u";function Zi(){this._array=[],this._set=vs?new Map:Object.create(null)}Zi.fromArray=function(e,r){for(var i=new Zi,n=0,s=e.length;n<s;n++)i.add(e[n],r);return i};Zi.prototype.size=function(){return vs?this._set.size:Object.getOwnPropertyNames(this._set).length};Zi.prototype.add=function(e,r){var i=vs?e:Fy.toSetString(e),n=vs?this.has(e):jy.call(this._set,i),s=this._array.length;(!n||r)&&this._array.push(e),n||(vs?this._set.set(e,s):this._set[i]=s)};Zi.prototype.has=function(e){if(vs)return this._set.has(e);var r=Fy.toSetString(e);return jy.call(this._set,r)};Zi.prototype.indexOf=function(e){if(vs){var r=this._set.get(e);if(r>=0)return r}else{var i=Fy.toSetString(e);if(jy.call(this._set,i))return this._set[i]}throw new Error('"'+e+'" is not in the set.')};Zi.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)};Zi.prototype.toArray=function(){return this._array.slice()};EI.ArraySet=Zi});var LI=T(NI=>{y();var OI=xa();function V5(t,e){var r=t.generatedLine,i=e.generatedLine,n=t.generatedColumn,s=e.generatedColumn;return i>r||i==r&&s>=n||OI.compareByGeneratedPositionsInflated(t,e)<=0}function of(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}of.prototype.unsortedForEach=function(e,r){this._array.forEach(e,r)};of.prototype.add=function(e){V5(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))};of.prototype.toArray=function(){return this._sorted||(this._array.sort(OI.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};NI.MappingList=of});var Vy=T(PI=>{y();var iu=My(),ot=xa(),uf=By().ArraySet,$5=LI().MappingList;function Jr(t){t||(t={}),this._file=ot.getArg(t,"file",null),this._sourceRoot=ot.getArg(t,"sourceRoot",null),this._skipValidation=ot.getArg(t,"skipValidation",!1),this._ignoreInvalidMapping=ot.getArg(t,"ignoreInvalidMapping",!1),this._sources=new uf,this._names=new uf,this._mappings=new $5,this._sourcesContents=null}Jr.prototype._version=3;Jr.fromSourceMap=function(e,r){var i=e.sourceRoot,n=new Jr(Object.assign(r||{},{file:e.file,sourceRoot:i}));return e.eachMapping(function(s){var a={generated:{line:s.generatedLine,column:s.generatedColumn}};s.source!=null&&(a.source=s.source,i!=null&&(a.source=ot.relative(i,a.source)),a.original={line:s.originalLine,column:s.originalColumn},s.name!=null&&(a.name=s.name)),n.addMapping(a)}),e.sources.forEach(function(s){var a=s;i!==null&&(a=ot.relative(i,s)),n._sources.has(a)||n._sources.add(a);var o=e.sourceContentFor(s);o!=null&&n.setSourceContent(s,o)}),n};Jr.prototype.addMapping=function(e){var r=ot.getArg(e,"generated"),i=ot.getArg(e,"original",null),n=ot.getArg(e,"source",null),s=ot.getArg(e,"name",null);!this._skipValidation&&this._validateMapping(r,i,n,s)===!1||(n!=null&&(n=String(n),this._sources.has(n)||this._sources.add(n)),s!=null&&(s=String(s),this._names.has(s)||this._names.add(s)),this._mappings.add({generatedLine:r.line,generatedColumn:r.column,originalLine:i!=null&&i.line,originalColumn:i!=null&&i.column,source:n,name:s}))};Jr.prototype.setSourceContent=function(e,r){var i=e;this._sourceRoot!=null&&(i=ot.relative(this._sourceRoot,i)),r!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[ot.toSetString(i)]=r):this._sourcesContents&&(delete this._sourcesContents[ot.toSetString(i)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};Jr.prototype.applySourceMap=function(e,r,i){var n=r;if(r==null){if(e.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);n=e.file}var s=this._sourceRoot;s!=null&&(n=ot.relative(s,n));var a=new uf,o=new uf;this._mappings.unsortedForEach(function(u){if(u.source===n&&u.originalLine!=null){var l=e.originalPositionFor({line:u.originalLine,column:u.originalColumn});l.source!=null&&(u.source=l.source,i!=null&&(u.source=ot.join(i,u.source)),s!=null&&(u.source=ot.relative(s,u.source)),u.originalLine=l.line,u.originalColumn=l.column,l.name!=null&&(u.name=l.name))}var f=u.source;f!=null&&!a.has(f)&&a.add(f);var h=u.name;h!=null&&!o.has(h)&&o.add(h)},this),this._sources=a,this._names=o,e.sources.forEach(function(u){var l=e.sourceContentFor(u);l!=null&&(i!=null&&(u=ot.join(i,u)),s!=null&&(u=ot.relative(s,u)),this.setSourceContent(u,l))},this)};Jr.prototype._validateMapping=function(e,r,i,n){if(r&&typeof r.line!="number"&&typeof r.column!="number"){var s="original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.";if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(s),!1;throw new Error(s)}if(!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!r&&!i&&!n)){if(e&&"line"in e&&"column"in e&&r&&"line"in r&&"column"in r&&e.line>0&&e.column>=0&&r.line>0&&r.column>=0&&i)return;var s="Invalid mapping: "+JSON.stringify({generated:e,source:i,original:r,name:n});if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(s),!1;throw new Error(s)}};Jr.prototype._serializeMappings=function(){for(var e=0,r=1,i=0,n=0,s=0,a=0,o="",u,l,f,h,p=this._mappings.toArray(),m=0,v=p.length;m<v;m++){if(l=p[m],u="",l.generatedLine!==r)for(e=0;l.generatedLine!==r;)u+=";",r++;else if(m>0){if(!ot.compareByGeneratedPositionsInflated(l,p[m-1]))continue;u+=","}u+=iu.encode(l.generatedColumn-e),e=l.generatedColumn,l.source!=null&&(h=this._sources.indexOf(l.source),u+=iu.encode(h-a),a=h,u+=iu.encode(l.originalLine-1-n),n=l.originalLine-1,u+=iu.encode(l.originalColumn-i),i=l.originalColumn,l.name!=null&&(f=this._names.indexOf(l.name),u+=iu.encode(f-s),s=f)),o+=u}return o};Jr.prototype._generateSourcesContent=function(e,r){return e.map(function(i){if(!this._sourcesContents)return null;r!=null&&(i=ot.relative(r,i));var n=ot.toSetString(i);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null},this)};Jr.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(e.file=this._file),this._sourceRoot!=null&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e};Jr.prototype.toString=function(){return JSON.stringify(this.toJSON())};PI.SourceMapGenerator=Jr});var qI=T(bs=>{y();bs.GREATEST_LOWER_BOUND=1;bs.LEAST_UPPER_BOUND=2;function $y(t,e,r,i,n,s){var a=Math.floor((e-t)/2)+t,o=n(r,i[a],!0);return o===0?a:o>0?e-a>1?$y(a,e,r,i,n,s):s==bs.LEAST_UPPER_BOUND?e<i.length?e:-1:a:a-t>1?$y(t,a,r,i,n,s):s==bs.LEAST_UPPER_BOUND?a:t<0?-1:t}bs.search=function(e,r,i,n){if(r.length===0)return-1;var s=$y(-1,r.length,e,r,i,n||bs.GREATEST_LOWER_BOUND);if(s<0)return-1;for(;s-1>=0&&i(r[s],r[s-1],!0)===0;)--s;return s}});var MI=T(RI=>{y();function U5(t){function e(n,s,a){var o=n[s];n[s]=n[a],n[a]=o}function r(n,s){return Math.round(n+Math.random()*(s-n))}function i(n,s,a,o){if(a<o){var u=r(a,o),l=a-1;e(n,u,o);for(var f=n[o],h=a;h<o;h++)s(n[h],f,!1)<=0&&(l+=1,e(n,l,h));e(n,l+1,h);var p=l+1;i(n,s,a,p-1),i(n,s,p+1,o)}}return i}function H5(t){let e=U5.toString();return new Function(`return ${e}`)()(t)}var CI=new WeakMap;RI.quickSort=function(t,e,r=0){let i=CI.get(e);i===void 0&&(i=H5(e),CI.set(e,i)),i(t,e,r,t.length-1)}});var jI=T(cf=>{y();var se=xa(),Hy=qI(),ka=By().ArraySet,G5=My(),nu=MI().quickSort;function $e(t,e){var r=t;return typeof t=="string"&&(r=se.parseSourceMapInput(t)),r.sections!=null?new di(r,e):new jt(r,e)}$e.fromSourceMap=function(t,e){return jt.fromSourceMap(t,e)};$e.prototype._version=3;$e.prototype.__generatedMappings=null;Object.defineProperty($e.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});$e.prototype.__originalMappings=null;Object.defineProperty($e.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});$e.prototype._charIsMappingSeparator=function(e,r){var i=e.charAt(r);return i===";"||i===","};$e.prototype._parseMappings=function(e,r){throw new Error("Subclasses must implement _parseMappings")};$e.GENERATED_ORDER=1;$e.ORIGINAL_ORDER=2;$e.GREATEST_LOWER_BOUND=1;$e.LEAST_UPPER_BOUND=2;$e.prototype.eachMapping=function(e,r,i){var n=r||null,s=i||$e.GENERATED_ORDER,a;switch(s){case $e.GENERATED_ORDER:a=this._generatedMappings;break;case $e.ORIGINAL_ORDER:a=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}for(var o=this.sourceRoot,u=e.bind(n),l=this._names,f=this._sources,h=this._sourceMapURL,p=0,m=a.length;p<m;p++){var v=a[p],S=v.source===null?null:f.at(v.source);S!==null&&(S=se.computeSourceURL(o,S,h)),u({source:S,generatedLine:v.generatedLine,generatedColumn:v.generatedColumn,originalLine:v.originalLine,originalColumn:v.originalColumn,name:v.name===null?null:l.at(v.name)})}};$e.prototype.allGeneratedPositionsFor=function(e){var r=se.getArg(e,"line"),i={source:se.getArg(e,"source"),originalLine:r,originalColumn:se.getArg(e,"column",0)};if(i.source=this._findSourceIndex(i.source),i.source<0)return[];var n=[],s=this._findMapping(i,this._originalMappings,"originalLine","originalColumn",se.compareByOriginalPositions,Hy.LEAST_UPPER_BOUND);if(s>=0){var a=this._originalMappings[s];if(e.column===void 0)for(var o=a.originalLine;a&&a.originalLine===o;)n.push({line:se.getArg(a,"generatedLine",null),column:se.getArg(a,"generatedColumn",null),lastColumn:se.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++s];else for(var u=a.originalColumn;a&&a.originalLine===r&&a.originalColumn==u;)n.push({line:se.getArg(a,"generatedLine",null),column:se.getArg(a,"generatedColumn",null),lastColumn:se.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++s]}return n};cf.SourceMapConsumer=$e;function jt(t,e){var r=t;typeof t=="string"&&(r=se.parseSourceMapInput(t));var i=se.getArg(r,"version"),n=se.getArg(r,"sources"),s=se.getArg(r,"names",[]),a=se.getArg(r,"sourceRoot",null),o=se.getArg(r,"sourcesContent",null),u=se.getArg(r,"mappings"),l=se.getArg(r,"file",null);if(i!=this._version)throw new Error("Unsupported version: "+i);a&&(a=se.normalize(a)),n=n.map(String).map(se.normalize).map(function(f){return a&&se.isAbsolute(a)&&se.isAbsolute(f)?se.relative(a,f):f}),this._names=ka.fromArray(s.map(String),!0),this._sources=ka.fromArray(n,!0),this._absoluteSources=this._sources.toArray().map(function(f){return se.computeSourceURL(a,f,e)}),this.sourceRoot=a,this.sourcesContent=o,this._mappings=u,this._sourceMapURL=e,this.file=l}jt.prototype=Object.create($e.prototype);jt.prototype.consumer=$e;jt.prototype._findSourceIndex=function(t){var e=t;if(this.sourceRoot!=null&&(e=se.relative(this.sourceRoot,e)),this._sources.has(e))return this._sources.indexOf(e);var r;for(r=0;r<this._absoluteSources.length;++r)if(this._absoluteSources[r]==t)return r;return-1};jt.fromSourceMap=function(e,r){var i=Object.create(jt.prototype),n=i._names=ka.fromArray(e._names.toArray(),!0),s=i._sources=ka.fromArray(e._sources.toArray(),!0);i.sourceRoot=e._sourceRoot,i.sourcesContent=e._generateSourcesContent(i._sources.toArray(),i.sourceRoot),i.file=e._file,i._sourceMapURL=r,i._absoluteSources=i._sources.toArray().map(function(m){return se.computeSourceURL(i.sourceRoot,m,r)});for(var a=e._mappings.toArray().slice(),o=i.__generatedMappings=[],u=i.__originalMappings=[],l=0,f=a.length;l<f;l++){var h=a[l],p=new FI;p.generatedLine=h.generatedLine,p.generatedColumn=h.generatedColumn,h.source&&(p.source=s.indexOf(h.source),p.originalLine=h.originalLine,p.originalColumn=h.originalColumn,h.name&&(p.name=n.indexOf(h.name)),u.push(p)),o.push(p)}return nu(i.__originalMappings,se.compareByOriginalPositions),i};jt.prototype._version=3;Object.defineProperty(jt.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function FI(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}var Uy=se.compareByGeneratedPositionsDeflatedNoLine;function DI(t,e){let r=t.length,i=t.length-e;if(!(i<=1))if(i==2){let n=t[e],s=t[e+1];Uy(n,s)>0&&(t[e]=s,t[e+1]=n)}else if(i<20)for(let n=e;n<r;n++)for(let s=n;s>e;s--){let a=t[s-1],o=t[s];if(Uy(a,o)<=0)break;t[s-1]=o,t[s]=a}else nu(t,Uy,e)}jt.prototype._parseMappings=function(e,r){var i=1,n=0,s=0,a=0,o=0,u=0,l=e.length,f=0,h={},p={},m=[],v=[],S,b,g,k,w;let _=0;for(;f<l;)if(e.charAt(f)===";")i++,f++,n=0,DI(v,_),_=v.length;else if(e.charAt(f)===",")f++;else{for(S=new FI,S.generatedLine=i,k=f;k<l&&!this._charIsMappingSeparator(e,k);k++);for(b=e.slice(f,k),g=[];f<k;)G5.decode(e,f,p),w=p.value,f=p.rest,g.push(w);if(g.length===2)throw new Error("Found a source, but no line and column");if(g.length===3)throw new Error("Found a source and line, but no column");if(S.generatedColumn=n+g[0],n=S.generatedColumn,g.length>1&&(S.source=o+g[1],o+=g[1],S.originalLine=s+g[2],s=S.originalLine,S.originalLine+=1,S.originalColumn=a+g[3],a=S.originalColumn,g.length>4&&(S.name=u+g[4],u+=g[4])),v.push(S),typeof S.originalLine=="number"){let E=S.source;for(;m.length<=E;)m.push(null);m[E]===null&&(m[E]=[]),m[E].push(S)}}DI(v,_),this.__generatedMappings=v;for(var A=0;A<m.length;A++)m[A]!=null&&nu(m[A],se.compareByOriginalPositionsNoSource);this.__originalMappings=[].concat(...m)};jt.prototype._findMapping=function(e,r,i,n,s,a){if(e[i]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[i]);if(e[n]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[n]);return Hy.search(e,r,s,a)};jt.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var r=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var i=this._generatedMappings[e+1];if(r.generatedLine===i.generatedLine){r.lastGeneratedColumn=i.generatedColumn-1;continue}}r.lastGeneratedColumn=1/0}};jt.prototype.originalPositionFor=function(e){var r={generatedLine:se.getArg(e,"line"),generatedColumn:se.getArg(e,"column")},i=this._findMapping(r,this._generatedMappings,"generatedLine","generatedColumn",se.compareByGeneratedPositionsDeflated,se.getArg(e,"bias",$e.GREATEST_LOWER_BOUND));if(i>=0){var n=this._generatedMappings[i];if(n.generatedLine===r.generatedLine){var s=se.getArg(n,"source",null);s!==null&&(s=this._sources.at(s),s=se.computeSourceURL(this.sourceRoot,s,this._sourceMapURL));var a=se.getArg(n,"name",null);return a!==null&&(a=this._names.at(a)),{source:s,line:se.getArg(n,"originalLine",null),column:se.getArg(n,"originalColumn",null),name:a}}}return{source:null,line:null,column:null,name:null}};jt.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null}):!1};jt.prototype.sourceContentFor=function(e,r){if(!this.sourcesContent)return null;var i=this._findSourceIndex(e);if(i>=0)return this.sourcesContent[i];var n=e;this.sourceRoot!=null&&(n=se.relative(this.sourceRoot,n));var s;if(this.sourceRoot!=null&&(s=se.urlParse(this.sourceRoot))){var a=n.replace(/^file:\/\//,"");if(s.scheme=="file"&&this._sources.has(a))return this.sourcesContent[this._sources.indexOf(a)];if((!s.path||s.path=="/")&&this._sources.has("/"+n))return this.sourcesContent[this._sources.indexOf("/"+n)]}if(r)return null;throw new Error('"'+n+'" is not in the SourceMap.')};jt.prototype.generatedPositionFor=function(e){var r=se.getArg(e,"source");if(r=this._findSourceIndex(r),r<0)return{line:null,column:null,lastColumn:null};var i={source:r,originalLine:se.getArg(e,"line"),originalColumn:se.getArg(e,"column")},n=this._findMapping(i,this._originalMappings,"originalLine","originalColumn",se.compareByOriginalPositions,se.getArg(e,"bias",$e.GREATEST_LOWER_BOUND));if(n>=0){var s=this._originalMappings[n];if(s.source===i.source)return{line:se.getArg(s,"generatedLine",null),column:se.getArg(s,"generatedColumn",null),lastColumn:se.getArg(s,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};cf.BasicSourceMapConsumer=jt;function di(t,e){var r=t;typeof t=="string"&&(r=se.parseSourceMapInput(t));var i=se.getArg(r,"version"),n=se.getArg(r,"sections");if(i!=this._version)throw new Error("Unsupported version: "+i);this._sources=new ka,this._names=new ka;var s={line:-1,column:0};this._sections=n.map(function(a){if(a.url)throw new Error("Support for url field in sections not implemented.");var o=se.getArg(a,"offset"),u=se.getArg(o,"line"),l=se.getArg(o,"column");if(u<s.line||u===s.line&&l<s.column)throw new Error("Section offsets must be ordered and non-overlapping.");return s=o,{generatedOffset:{generatedLine:u+1,generatedColumn:l+1},consumer:new $e(se.getArg(a,"map"),e)}})}di.prototype=Object.create($e.prototype);di.prototype.constructor=$e;di.prototype._version=3;Object.defineProperty(di.prototype,"sources",{get:function(){for(var t=[],e=0;e<this._sections.length;e++)for(var r=0;r<this._sections[e].consumer.sources.length;r++)t.push(this._sections[e].consumer.sources[r]);return t}});di.prototype.originalPositionFor=function(e){var r={generatedLine:se.getArg(e,"line"),generatedColumn:se.getArg(e,"column")},i=Hy.search(r,this._sections,function(s,a){var o=s.generatedLine-a.generatedOffset.generatedLine;return o||s.generatedColumn-a.generatedOffset.generatedColumn}),n=this._sections[i];return n?n.consumer.originalPositionFor({line:r.generatedLine-(n.generatedOffset.generatedLine-1),column:r.generatedColumn-(n.generatedOffset.generatedLine===r.generatedLine?n.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}};di.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})};di.prototype.sourceContentFor=function(e,r){for(var i=0;i<this._sections.length;i++){var n=this._sections[i],s=n.consumer.sourceContentFor(e,!0);if(s||s==="")return s}if(r)return null;throw new Error('"'+e+'" is not in the SourceMap.')};di.prototype.generatedPositionFor=function(e){for(var r=0;r<this._sections.length;r++){var i=this._sections[r];if(i.consumer._findSourceIndex(se.getArg(e,"source"))!==-1){var n=i.consumer.generatedPositionFor(e);if(n){var s={line:n.line+(i.generatedOffset.generatedLine-1),column:n.column+(i.generatedOffset.generatedLine===n.line?i.generatedOffset.generatedColumn-1:0)};return s}}}return{line:null,column:null}};di.prototype._parseMappings=function(e,r){this.__generatedMappings=[],this.__originalMappings=[];for(var i=0;i<this._sections.length;i++)for(var n=this._sections[i],s=n.consumer._generatedMappings,a=0;a<s.length;a++){var o=s[a],u=n.consumer._sources.at(o.source);u!==null&&(u=se.computeSourceURL(n.consumer.sourceRoot,u,this._sourceMapURL)),this._sources.add(u),u=this._sources.indexOf(u);var l=null;o.name&&(l=n.consumer._names.at(o.name),this._names.add(l),l=this._names.indexOf(l));var f={source:u,generatedLine:o.generatedLine+(n.generatedOffset.generatedLine-1),generatedColumn:o.generatedColumn+(n.generatedOffset.generatedLine===o.generatedLine?n.generatedOffset.generatedColumn-1:0),originalLine:o.originalLine,originalColumn:o.originalColumn,name:l};this.__generatedMappings.push(f),typeof f.originalLine=="number"&&this.__originalMappings.push(f)}nu(this.__generatedMappings,se.compareByGeneratedPositionsDeflated),nu(this.__originalMappings,se.compareByOriginalPositions)};cf.IndexedSourceMapConsumer=di});var VI=T(BI=>{y();var W5=Vy().SourceMapGenerator,lf=xa(),z5=/(\r?\n)/,J5=10,Ia="$$$isSourceNode$$$";function Lr(t,e,r,i,n){this.children=[],this.sourceContents={},this.line=t??null,this.column=e??null,this.source=r??null,this.name=n??null,this[Ia]=!0,i!=null&&this.add(i)}Lr.fromStringWithSourceMap=function(e,r,i){var n=new Lr,s=e.split(z5),a=0,o=function(){var p=v(),m=v()||"";return p+m;function v(){return a<s.length?s[a++]:void 0}},u=1,l=0,f=null;return r.eachMapping(function(p){if(f!==null)if(u<p.generatedLine)h(f,o()),u++,l=0;else{var m=s[a]||"",v=m.substr(0,p.generatedColumn-l);s[a]=m.substr(p.generatedColumn-l),l=p.generatedColumn,h(f,v),f=p;return}for(;u<p.generatedLine;)n.add(o()),u++;if(l<p.generatedColumn){var m=s[a]||"";n.add(m.substr(0,p.generatedColumn)),s[a]=m.substr(p.generatedColumn),l=p.generatedColumn}f=p},this),a<s.length&&(f&&h(f,o()),n.add(s.splice(a).join(""))),r.sources.forEach(function(p){var m=r.sourceContentFor(p);m!=null&&(i!=null&&(p=lf.join(i,p)),n.setSourceContent(p,m))}),n;function h(p,m){if(p===null||p.source===void 0)n.add(m);else{var v=i?lf.join(i,p.source):p.source;n.add(new Lr(p.originalLine,p.originalColumn,v,m,p.name))}}};Lr.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(r){this.add(r)},this);else if(e[Ia]||typeof e=="string")e&&this.children.push(e);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);return this};Lr.prototype.prepend=function(e){if(Array.isArray(e))for(var r=e.length-1;r>=0;r--)this.prepend(e[r]);else if(e[Ia]||typeof e=="string")this.children.unshift(e);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);return this};Lr.prototype.walk=function(e){for(var r,i=0,n=this.children.length;i<n;i++)r=this.children[i],r[Ia]?r.walk(e):r!==""&&e(r,{source:this.source,line:this.line,column:this.column,name:this.name})};Lr.prototype.join=function(e){var r,i,n=this.children.length;if(n>0){for(r=[],i=0;i<n-1;i++)r.push(this.children[i]),r.push(e);r.push(this.children[i]),this.children=r}return this};Lr.prototype.replaceRight=function(e,r){var i=this.children[this.children.length-1];return i[Ia]?i.replaceRight(e,r):typeof i=="string"?this.children[this.children.length-1]=i.replace(e,r):this.children.push("".replace(e,r)),this};Lr.prototype.setSourceContent=function(e,r){this.sourceContents[lf.toSetString(e)]=r};Lr.prototype.walkSourceContents=function(e){for(var r=0,i=this.children.length;r<i;r++)this.children[r][Ia]&&this.children[r].walkSourceContents(e);for(var n=Object.keys(this.sourceContents),r=0,i=n.length;r<i;r++)e(lf.fromSetString(n[r]),this.sourceContents[n[r]])};Lr.prototype.toString=function(){var e="";return this.walk(function(r){e+=r}),e};Lr.prototype.toStringWithSourceMap=function(e){var r={code:"",line:1,column:0},i=new W5(e),n=!1,s=null,a=null,o=null,u=null;return this.walk(function(l,f){r.code+=l,f.source!==null&&f.line!==null&&f.column!==null?((s!==f.source||a!==f.line||o!==f.column||u!==f.name)&&i.addMapping({source:f.source,original:{line:f.line,column:f.column},generated:{line:r.line,column:r.column},name:f.name}),s=f.source,a=f.line,o=f.column,u=f.name,n=!0):n&&(i.addMapping({generated:{line:r.line,column:r.column}}),s=null,n=!1);for(var h=0,p=l.length;h<p;h++)l.charCodeAt(h)===J5?(r.line++,r.column=0,h+1===p?(s=null,n=!1):n&&i.addMapping({source:f.source,original:{line:f.line,column:f.column},generated:{line:r.line,column:r.column},name:f.name})):r.column++}),this.walkSourceContents(function(l,f){i.setSourceContent(l,f)}),{code:r.code,map:i}};BI.SourceNode=Lr});var pf=T(ff=>{y();ff.SourceMapGenerator=Vy().SourceMapGenerator;ff.SourceMapConsumer=jI().SourceMapConsumer;ff.SourceNode=VI().SourceNode});var Wy=T((Rse,HI)=>{"use strict";y();var{existsSync:K5,readFileSync:Q5}=ae("fs"),{dirname:Gy,join:Y5}=ae("path"),{SourceMapConsumer:$I,SourceMapGenerator:UI}=pf();function X5(t){return Buffer?Buffer.from(t,"base64").toString():window.atob(t)}var su=class{constructor(e,r){if(r.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let i=r.map?r.map.prev:void 0,n=this.loadMap(r.from,i);!this.mapFile&&r.from&&(this.mapFile=r.from),this.mapFile&&(this.root=Gy(this.mapFile)),n&&(this.text=n)}consumer(){return this.consumerCache||(this.consumerCache=new $I(this.text)),this.consumerCache}decodeInline(e){let r=/^data:application\/json;charset=utf-?8;base64,/,i=/^data:application\/json;base64,/,n=/^data:application\/json;charset=utf-?8,/,s=/^data:application\/json,/,a=e.match(n)||e.match(s);if(a)return decodeURIComponent(e.substr(a[0].length));let o=e.match(r)||e.match(i);if(o)return X5(e.substr(o[0].length));let u=e.slice(22);throw u=u.slice(0,u.indexOf(",")),new Error("Unsupported source map encoding "+u)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let r=e.match(/\/\*\s*# sourceMappingURL=/g);if(!r)return;let i=e.lastIndexOf(r.pop()),n=e.indexOf("*/",i);i>-1&&n>-1&&(this.annotation=this.getAnnotationURL(e.substring(i,n)))}loadFile(e){if(this.root=Gy(e),K5(e))return this.mapFile=e,Q5(e,"utf-8").toString().trim()}loadMap(e,r){if(r===!1)return!1;if(r){if(typeof r=="string")return r;if(typeof r=="function"){let i=r(e);if(i){let n=this.loadFile(i);if(!n)throw new Error("Unable to load previous source map: "+i.toString());return n}}else{if(r instanceof $I)return UI.fromSourceMap(r).toString();if(r instanceof UI)return r.toString();if(this.isMap(r))return JSON.stringify(r);throw new Error("Unsupported previous source map format: "+r.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let i=this.annotation;return e&&(i=Y5(Gy(e),i)),this.loadFile(i)}}}startWith(e,r){return e?e.substr(0,r.length)===r:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};HI.exports=su;su.default=su});var au=T((Dse,KI)=>{"use strict";y();var{nanoid:Z5}=gI(),{isAbsolute:Ky,resolve:Qy}=ae("path"),{SourceMapConsumer:e7,SourceMapGenerator:t7}=pf(),{fileURLToPath:GI,pathToFileURL:hf}=ae("url"),WI=rf(),r7=Wy(),zy=Ay(),Jy=Symbol("lineToIndexCache"),i7=!!(e7&&t7),zI=!!(Qy&&Ky);function JI(t){if(t[Jy])return t[Jy];let e=t.css.split(`
|
|
1166
|
+
`),r=new Array(e.length),i=0;for(let n=0,s=e.length;n<s;n++)r[n]=i,i+=e[n].length+1;return t[Jy]=r,r}var Aa=class{get from(){return this.file||this.id}constructor(e,r={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,r.document&&(this.document=r.document.toString()),r.from&&(!zI||/^\w+:\/\//.test(r.from)||Ky(r.from)?this.file=r.from:this.file=Qy(r.from)),zI&&i7){let i=new r7(this.css,r);if(i.text){this.map=i;let n=i.consumer().file;!this.file&&n&&(this.file=this.mapResolve(n))}}this.file||(this.id="<input css "+Z5(6)+">"),this.map&&(this.map.file=this.from)}error(e,r,i,n={}){let s,a,o,u,l;if(r&&typeof r=="object"){let h=r,p=i;if(typeof h.offset=="number"){u=h.offset;let m=this.fromOffset(u);r=m.line,i=m.col}else r=h.line,i=h.column,u=this.fromLineAndColumn(r,i);if(typeof p.offset=="number"){o=p.offset;let m=this.fromOffset(o);a=m.line,s=m.col}else a=p.line,s=p.column,o=this.fromLineAndColumn(p.line,p.column)}else if(i)u=this.fromLineAndColumn(r,i);else{u=r;let h=this.fromOffset(u);r=h.line,i=h.col}let f=this.origin(r,i,a,s);return f?l=new WI(e,f.endLine===void 0?f.line:{column:f.column,line:f.line},f.endLine===void 0?f.column:{column:f.endColumn,line:f.endLine},f.source,f.file,n.plugin):l=new WI(e,a===void 0?r:{column:i,line:r},a===void 0?i:{column:s,line:a},this.css,this.file,n.plugin),l.input={column:i,endColumn:s,endLine:a,endOffset:o,line:r,offset:u,source:this.css},this.file&&(hf&&(l.input.url=hf(this.file).toString()),l.input.file=this.file),l}fromLineAndColumn(e,r){return JI(this)[e-1]+r-1}fromOffset(e){let r=JI(this),i=r[r.length-1],n=0;if(e>=i)n=r.length-1;else{let s=r.length-2,a;for(;n<s;)if(a=n+(s-n>>1),e<r[a])s=a-1;else if(e>=r[a+1])n=a+1;else{n=a;break}}return{col:e-r[n]+1,line:n+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Qy(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,r,i,n){if(!this.map)return!1;let s=this.map.consumer(),a=s.originalPositionFor({column:r,line:e});if(!a.source)return!1;let o;typeof i=="number"&&(o=s.originalPositionFor({column:n,line:i}));let u;Ky(a.source)?u=hf(a.source):u=new URL(a.source,this.map.consumer().sourceRoot||hf(this.map.mapFile));let l={column:a.column,endColumn:o&&o.column,endLine:o&&o.line,line:a.line,url:u.toString()};if(u.protocol==="file:")if(GI)l.file=GI(u);else throw new Error("file: protocol is not available in this PostCSS build");let f=s.sourceContentFor(a.source);return f&&(l.source=f),l}toJSON(){let e={};for(let r of["hasBOM","css","file","id"])this[r]!=null&&(e[r]=this[r]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}};KI.exports=Aa;Aa.default=Aa;zy&&zy.registerInput&&zy.registerInput(Aa)});var Ta=T((jse,ZI)=>{"use strict";y();var QI=Sn(),YI,XI,wn=class extends QI{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,r,i){let n=super.normalize(e);if(r){if(i==="prepend")this.nodes.length>1?r.raws.before=this.nodes[1].raws.before:delete r.raws.before;else if(this.first!==r)for(let s of n)s.raws.before=r.raws.before}return n}removeChild(e,r){let i=this.index(e);return!r&&i===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[i].raws.before),super.removeChild(e)}toResult(e={}){return new YI(new XI,this,e).stringify()}};wn.registerLazyResult=t=>{YI=t};wn.registerProcessor=t=>{XI=t};ZI.exports=wn;wn.default=wn;QI.registerRoot(wn)});var Yy=T((Vse,eA)=>{"use strict";y();var ou={comma(t){return ou.split(t,[","],!0)},space(t){let e=[" ",`
|
|
1167
|
+
`," "];return ou.split(t,e)},split(t,e,r){let i=[],n="",s=!1,a=0,o=!1,u="",l=!1;for(let f of t)l?l=!1:f==="\\"?l=!0:o?f===u&&(o=!1):f==='"'||f==="'"?(o=!0,u=f):f==="("?a+=1:f===")"?a>0&&(a-=1):a===0&&e.includes(f)&&(s=!0),s?(n!==""&&i.push(n.trim()),n="",s=!1):n+=f;return(r||n!=="")&&i.push(n.trim()),i}};eA.exports=ou;ou.default=ou});var df=T((Use,rA)=>{"use strict";y();var tA=Sn(),n7=Yy(),Ea=class extends tA{get selectors(){return n7.comma(this.selector)}set selectors(e){let r=this.selector?this.selector.match(/,\s*/):null,i=r?r[0]:","+this.raw("between","beforeOpen");this.selector=e.join(i)}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}};rA.exports=Ea;Ea.default=Ea;tA.registerRule(Ea)});var nA=T((Gse,iA)=>{"use strict";y();var s7=sf(),a7=ba(),o7=tu(),u7=au(),c7=Wy(),l7=Ta(),f7=df();function uu(t,e){if(Array.isArray(t))return t.map(n=>uu(n));let{inputs:r,...i}=t;if(r){e=[];for(let n of r){let s={...n,__proto__:u7.prototype};s.map&&(s.map={...s.map,__proto__:c7.prototype}),e.push(s)}}if(i.nodes&&(i.nodes=t.nodes.map(n=>uu(n,e))),i.source){let{inputId:n,...s}=i.source;i.source=s,n!=null&&(i.source.input=e[n])}if(i.type==="root")return new l7(i);if(i.type==="decl")return new o7(i);if(i.type==="rule")return new f7(i);if(i.type==="comment")return new a7(i);if(i.type==="atrule")return new s7(i);throw new Error("Unknown node type: "+t.type)}iA.exports=uu;uu.default=uu});var Zy=T((zse,lA)=>{"use strict";y();var{dirname:mf,relative:aA,resolve:oA,sep:uA}=ae("path"),{SourceMapConsumer:cA,SourceMapGenerator:gf}=pf(),{pathToFileURL:sA}=ae("url"),p7=au(),h7=!!(cA&&gf),d7=!!(mf&&oA&&aA&&uA),Xy=class{constructor(e,r,i,n){this.stringify=e,this.mapOpts=i.map||{},this.root=r,this.opts=i,this.css=n,this.originalCSS=n,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let r=`
|
|
1168
|
+
`;this.css.includes(`\r
|
|
1169
|
+
`)&&(r=`\r
|
|
1170
|
+
`),this.css+=r+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let r=this.toUrl(this.path(e.file)),i=e.root||mf(e.file),n;this.mapOpts.sourcesContent===!1?(n=new cA(e.text),n.sourcesContent&&(n.sourcesContent=null)):n=e.consumer(),this.map.applySourceMap(n,r,this.toUrl(this.path(i)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1){if(this.root){let e;for(let r=this.root.nodes.length-1;r>=0;r--)e=this.root.nodes[r],e.type==="comment"&&e.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(r)}else if(this.css){let e;for(;(e=this.css.lastIndexOf("/*#"))!==-1;){let r=this.css.indexOf("*/",e+3);if(r===-1)break;for(;e>0&&this.css[e-1]===`
|
|
1171
|
+
`;)e--;this.css=this.css.slice(0,e)+this.css.slice(r+2)}}}}generate(){if(this.clearAnnotation(),d7&&h7&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,r=>{e+=r}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=gf.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new gf({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new gf({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,r=1,i="<no source>",n={generated:{column:0,line:0},original:{column:0,line:0},source:""},s,a;this.stringify(this.root,(o,u,l)=>{if(this.css+=o,u&&l!=="end"&&(n.generated.line=e,n.generated.column=r-1,u.source&&u.source.start?(n.source=this.sourcePath(u),n.original.line=u.source.start.line,n.original.column=u.source.start.column-1,this.map.addMapping(n)):(n.source=i,n.original.line=1,n.original.column=0,this.map.addMapping(n))),a=o.match(/\n/g),a?(e+=a.length,s=o.lastIndexOf(`
|
|
1172
|
+
`),r=o.length-s):r+=o.length,u&&l!=="start"){let f=u.parent||{raws:{}};(!(u.type==="decl"||u.type==="atrule"&&!u.nodes)||u!==f.last||f.raws.semicolon)&&(u.source&&u.source.end?(n.source=this.sourcePath(u),n.original.line=u.source.end.line,n.original.column=u.source.end.column-1,n.generated.line=e,n.generated.column=r-2,this.map.addMapping(n)):(n.source=i,n.original.line=1,n.original.column=0,n.generated.line=e,n.generated.column=r-1,this.map.addMapping(n)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(r=>r.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let r=this.memoizedPaths.get(e);if(r)return r;let i=this.opts.to?mf(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(i=mf(oA(i,this.mapOpts.annotation)));let n=aA(i,e);return this.memoizedPaths.set(e,n),n}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let r=e.source.input.map;this.previousMaps.includes(r)||this.previousMaps.push(r)}});else{let e=new p7(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(r=>{if(r.source){let i=r.source.input.from;if(i&&!e[i]){e[i]=!0;let n=this.usesFileUrls?this.toFileUrl(i):this.toUrl(this.path(i));this.map.setSourceContent(n,r.source.input.css)}}});else if(this.css){let r=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(r,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let r=this.memoizedFileURLs.get(e);if(r)return r;if(sA){let i=sA(e).toString();return this.memoizedFileURLs.set(e,i),i}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let r=this.memoizedURLs.get(e);if(r)return r;uA==="\\"&&(e=e.replace(/\\/g,"/"));let i=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,i),i}};lA.exports=Xy});var t_=T((Kse,hA)=>{"use strict";y();var m7=sf(),g7=ba(),y7=tu(),_7=Ta(),fA=df(),v7=tf(),pA={empty:!0,space:!0};function b7(t){for(let e=t.length-1;e>=0;e--){let r=t[e],i=r[3]||r[2];if(i)return i}}var e_=class{constructor(e){this.input=e,this.root=new _7,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let r=new m7;r.name=e[1].slice(1),r.name===""&&this.unnamedAtrule(r,e),this.init(r,e[2]);let i,n,s,a=!1,o=!1,u=[],l=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),i=e[0],i==="("||i==="["?l.push(i==="("?")":"]"):i==="{"&&l.length>0?l.push("}"):i===l[l.length-1]&&l.pop(),l.length===0)if(i===";"){r.source.end=this.getPosition(e[2]),r.source.end.offset++,this.semicolon=!0;break}else if(i==="{"){o=!0;break}else if(i==="}"){if(u.length>0){for(s=u.length-1,n=u[s];n&&n[0]==="space";)n=u[--s];n&&(r.source.end=this.getPosition(n[3]||n[2]),r.source.end.offset++)}this.end(e);break}else u.push(e);else u.push(e);if(this.tokenizer.endOfFile()){a=!0;break}}r.raws.between=this.spacesAndCommentsFromEnd(u),u.length?(r.raws.afterName=this.spacesAndCommentsFromStart(u),this.raw(r,"params",u),a&&(e=u[u.length-1],r.source.end=this.getPosition(e[3]||e[2]),r.source.end.offset++,this.spaces=r.raws.between,r.raws.between="")):(r.raws.afterName="",r.params=""),o&&(r.nodes=[],this.current=r)}checkMissedSemicolon(e){let r=this.colon(e);if(r===!1)return;let i=0,n;for(let s=r-1;s>=0&&(n=e[s],!(n[0]!=="space"&&(i+=1,i===2)));s--);throw this.input.error("Missed semicolon",n[0]==="word"?n[3]+1:n[2])}colon(e){let r=0,i,n,s;for(let[a,o]of e.entries()){if(n=o,s=n[0],s==="("&&(r+=1),s===")"&&(r-=1),r===0&&s===":")if(!i)this.doubleColon(n);else{if(i[0]==="word"&&i[1]==="progid")continue;return a}i=n}return!1}comment(e){let r=new g7;this.init(r,e[2]),r.source.end=this.getPosition(e[3]||e[2]),r.source.end.offset++;let i=e[1].slice(2,-2);if(!i.trim())r.text="",r.raws.left=i,r.raws.right="";else{let n=i.match(/^(\s*)([^]*\S)(\s*)$/);r.text=n[2],r.raws.left=n[1],r.raws.right=n[3]}}createTokenizer(){this.tokenizer=v7(this.input)}decl(e,r){let i=new y7;this.init(i,e[0][2]);let n=e[e.length-1];for(n[0]===";"&&(this.semicolon=!0,e.pop()),i.source.end=this.getPosition(n[3]||n[2]||b7(e)),i.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),i.raws.before+=e.shift()[1];for(i.source.start=this.getPosition(e[0][2]),i.prop="";e.length;){let l=e[0][0];if(l===":"||l==="space"||l==="comment")break;i.prop+=e.shift()[1]}i.raws.between="";let s;for(;e.length;)if(s=e.shift(),s[0]===":"){i.raws.between+=s[1];break}else s[0]==="word"&&/\w/.test(s[1])&&this.unknownWord([s]),i.raws.between+=s[1];(i.prop[0]==="_"||i.prop[0]==="*")&&(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));let a=[],o;for(;e.length&&(o=e[0][0],!(o!=="space"&&o!=="comment"));)a.push(e.shift());this.precheckMissedSemicolon(e);for(let l=e.length-1;l>=0;l--){if(s=e[l],s[1].toLowerCase()==="!important"){i.important=!0;let f=this.stringFrom(e,l);f=this.spacesFromEnd(e)+f,f!==" !important"&&(i.raws.important=f);break}else if(s[1].toLowerCase()==="important"){let f=e.slice(0),h="";for(let p=l;p>0;p--){let m=f[p][0];if(h.trim().startsWith("!")&&m!=="space")break;h=f.pop()[1]+h}h.trim().startsWith("!")&&(i.important=!0,i.raws.important=h,e=f)}if(s[0]!=="space"&&s[0]!=="comment")break}e.some(l=>l[0]!=="space"&&l[0]!=="comment")&&(i.raws.between+=a.map(l=>l[1]).join(""),a=[]),this.raw(i,"value",a.concat(e),r),i.value.includes(":")&&!r&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let r=new fA;this.init(r,e[2]),r.selector="",r.raws.between="",this.current=r}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let r=this.current.nodes[this.current.nodes.length-1];r&&r.type==="rule"&&!r.raws.ownSemicolon&&(r.raws.ownSemicolon=this.spaces,this.spaces="",r.source.end=this.getPosition(e[2]),r.source.end.offset+=r.raws.ownSemicolon.length)}}getPosition(e){let r=this.input.fromOffset(e);return{column:r.col,line:r.line,offset:e}}init(e,r){this.current.push(e),e.source={input:this.input,start:this.getPosition(r)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let r=!1,i=null,n=!1,s=null,a=[],o=e[1].startsWith("--"),u=[],l=e;for(;l;){if(i=l[0],u.push(l),i==="("||i==="[")s||(s=l),a.push(i==="("?")":"]");else if(o&&n&&i==="{")s||(s=l),a.push("}");else if(a.length===0)if(i===";")if(n){this.decl(u,o);return}else break;else if(i==="{"){this.rule(u);return}else if(i==="}"){this.tokenizer.back(u.pop()),r=!0;break}else i===":"&&(n=!0);else i===a[a.length-1]&&(a.pop(),a.length===0&&(s=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(r=!0),a.length>0&&this.unclosedBracket(s),r&&n){if(!o)for(;u.length&&(l=u[u.length-1][0],!(l!=="space"&&l!=="comment"));)this.tokenizer.back(u.pop());this.decl(u,o)}else this.unknownWord(u)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,r,i,n){let s,a,o=i.length,u="",l=!0,f,h;for(let p=0;p<o;p+=1)s=i[p],a=s[0],a==="space"&&p===o-1&&!n?l=!1:a==="comment"?(h=i[p-1]?i[p-1][0]:"empty",f=i[p+1]?i[p+1][0]:"empty",!pA[h]&&!pA[f]?u.slice(-1)===","?l=!1:u+=s[1]:l=!1):u+=s[1];if(!l){let p=i.reduce((m,v)=>m+v[1],"");e.raws[r]={raw:p,value:u}}e[r]=u}rule(e){e.pop();let r=new fA;this.init(r,e[0][2]),r.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(r,"selector",e),this.current=r}spacesAndCommentsFromEnd(e){let r,i="";for(;e.length&&(r=e[e.length-1][0],!(r!=="space"&&r!=="comment"));)i=e.pop()[1]+i;return i}spacesAndCommentsFromStart(e){let r,i="";for(;e.length&&(r=e[0][0],!(r!=="space"&&r!=="comment"));)i+=e.shift()[1];return i}spacesFromEnd(e){let r,i="";for(;e.length&&(r=e[e.length-1][0],r==="space");)i=e.pop()[1]+i;return i}stringFrom(e,r){let i="";for(let n=r;n<e.length;n++)i+=e[n][1];return e.splice(r,e.length-r),i}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word "+e[0][1],{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,r){throw this.input.error("At-rule without name",{offset:r[2]},{offset:r[2]+r[1].length})}};hA.exports=e_});var _f=T((Yse,dA)=>{"use strict";y();var S7=Sn(),w7=au(),x7=t_();function yf(t,e){let r=new w7(t,e),i=new x7(r);try{i.parse()}catch(n){throw process.env.NODE_ENV!=="production"&&n.name==="CssSyntaxError"&&e&&e.from&&(/\.scss$/i.test(e.from)?n.message+=`
|
|
1173
|
+
You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`:/\.sass/i.test(e.from)?n.message+=`
|
|
1174
|
+
You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`:/\.less$/i.test(e.from)&&(n.message+=`
|
|
1175
|
+
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),n}return i.root}dA.exports=yf;yf.default=yf;S7.registerParse(yf)});var r_=T((Zse,mA)=>{"use strict";y();var cu=class{constructor(e,r={}){if(this.type="warning",this.text=e,r.node&&r.node.source){let i=r.node.rangeBy(r);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in r)this[i]=r[i]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};mA.exports=cu;cu.default=cu});var vf=T((tae,gA)=>{"use strict";y();var k7=r_(),lu=class{get content(){return this.css}constructor(e,r,i){this.processor=e,this.messages=[],this.root=r,this.opts=i,this.css="",this.map=void 0}toString(){return this.css}warn(e,r={}){r.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(r.plugin=this.lastPlugin.postcssPlugin);let i=new k7(e,r);return this.messages.push(i),i}warnings(){return this.messages.filter(e=>e.type==="warning")}};gA.exports=lu;lu.default=lu});var i_=T((iae,_A)=>{"use strict";y();var yA={};_A.exports=function(e){yA[e]||(yA[e]=!0,typeof console<"u"&&console.warn&&console.warn(e))}});var a_=T((sae,wA)=>{"use strict";y();var I7=Sn(),A7=af(),T7=Zy(),E7=_f(),vA=vf(),O7=Ta(),N7=Ko(),{isClean:Ti,my:L7}=nf(),P7=i_(),q7={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},C7={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},R7={Once:!0,postcssPlugin:!0,prepare:!0},Oa=0;function fu(t){return typeof t=="object"&&typeof t.then=="function"}function SA(t){let e=!1,r=q7[t.type];return t.type==="decl"?e=t.prop.toLowerCase():t.type==="atrule"&&(e=t.name.toLowerCase()),e&&t.append?[r,r+"-"+e,Oa,r+"Exit",r+"Exit-"+e]:e?[r,r+"-"+e,r+"Exit",r+"Exit-"+e]:t.append?[r,Oa,r+"Exit"]:[r,r+"Exit"]}function bA(t){let e;return t.type==="document"?e=["Document",Oa,"DocumentExit"]:t.type==="root"?e=["Root",Oa,"RootExit"]:e=SA(t),{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function n_(t){return t[Ti]=!1,t.nodes&&t.nodes.forEach(e=>n_(e)),t}var s_={},xn=class t{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(e,r,i){this.stringified=!1,this.processed=!1;let n;if(typeof r=="object"&&r!==null&&(r.type==="root"||r.type==="document"))n=n_(r);else if(r instanceof t||r instanceof vA)n=n_(r.root),r.map&&(typeof i.map>"u"&&(i.map={}),i.map.inline||(i.map.inline=!1),i.map.prev=r.map);else{let s=E7;i.syntax&&(s=i.syntax.parse),i.parser&&(s=i.parser),s.parse&&(s=s.parse);try{n=s(r,i)}catch(a){this.processed=!0,this.error=a}n&&!n[L7]&&I7.rebuild(n)}this.result=new vA(e,n,i),this.helpers={...s_,postcss:s_,result:this.result},this.plugins=this.processor.plugins.map(s=>typeof s=="object"&&s.prepare?{...s,...s.prepare(this.result)}:s)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,r){let i=this.result.lastPlugin;try{if(r&&r.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin)e.plugin=i.postcssPlugin,e.setMessage();else if(i.postcssVersion&&process.env.NODE_ENV!=="production"){let n=i.postcssPlugin,s=i.postcssVersion,a=this.result.processor.version,o=s.split("."),u=a.split(".");(o[0]!==u[0]||parseInt(o[1])>parseInt(u[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+a+", but "+n+" uses "+s+". Perhaps this is the source of the error below.")}}catch(n){console&&console.error&&console.error(n)}return e}prepareVisitors(){this.listeners={};let e=(r,i,n)=>{this.listeners[i]||(this.listeners[i]=[]),this.listeners[i].push([r,n])};for(let r of this.plugins)if(typeof r=="object")for(let i in r){if(!C7[i]&&/^[A-Z]/.test(i))throw new Error(`Unknown event ${i} in ${r.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!R7[i])if(typeof r[i]=="object")for(let n in r[i])n==="*"?e(r,i,r[i][n]):e(r,i+"-"+n.toLowerCase(),r[i][n]);else typeof r[i]=="function"&&e(r,i,r[i])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let r=this.plugins[e],i=this.runOnRoot(r);if(fu(i))try{await i}catch(n){throw this.handleError(n)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Ti];){e[Ti]=!0;let r=[bA(e)];for(;r.length>0;){let i=this.visitTick(r);if(fu(i))try{await i}catch(n){let s=r[r.length-1].node;throw this.handleError(n,s)}}}if(this.listeners.OnceExit)for(let[r,i]of this.listeners.OnceExit){this.result.lastPlugin=r;try{if(e.type==="document"){let n=e.nodes.map(s=>i(s,this.helpers));await Promise.all(n)}else await i(e,this.helpers)}catch(n){throw this.handleError(n)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let r=this.result.root.nodes.map(i=>e.Once(i,this.helpers));return fu(r[0])?Promise.all(r):r}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(r){throw this.handleError(r)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,r=N7;e.syntax&&(r=e.syntax.stringify),e.stringifier&&(r=e.stringifier),r.stringify&&(r=r.stringify);let n=new T7(r,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let r=this.runOnRoot(e);if(fu(r))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Ti];)e[Ti]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let r of e.nodes)this.visitSync(this.listeners.OnceExit,r);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,r){return process.env.NODE_ENV!=="production"&&("from"in this.opts||P7("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,r)}toString(){return this.css}visitSync(e,r){for(let[i,n]of e){this.result.lastPlugin=i;let s;try{s=n(r,this.helpers)}catch(a){throw this.handleError(a,r.proxyOf)}if(r.type!=="root"&&r.type!=="document"&&!r.parent)return!0;if(fu(s))throw this.getAsyncError()}}visitTick(e){let r=e[e.length-1],{node:i,visitors:n}=r;if(i.type!=="root"&&i.type!=="document"&&!i.parent){e.pop();return}if(n.length>0&&r.visitorIndex<n.length){let[a,o]=n[r.visitorIndex];r.visitorIndex+=1,r.visitorIndex===n.length&&(r.visitors=[],r.visitorIndex=0),this.result.lastPlugin=a;try{return o(i.toProxy(),this.helpers)}catch(u){throw this.handleError(u,i)}}if(r.iterator!==0){let a=r.iterator,o;for(;o=i.nodes[i.indexes[a]];)if(i.indexes[a]+=1,!o[Ti]){o[Ti]=!0,e.push(bA(o));return}r.iterator=0,delete i.indexes[a]}let s=r.events;for(;r.eventIndex<s.length;){let a=s[r.eventIndex];if(r.eventIndex+=1,a===Oa){i.nodes&&i.nodes.length&&(i[Ti]=!0,r.iterator=i.getIterator());return}else if(this.listeners[a]){r.visitors=this.listeners[a];return}}e.pop()}walkSync(e){e[Ti]=!0;let r=SA(e);for(let i of r)if(i===Oa)e.nodes&&e.each(n=>{n[Ti]||this.walkSync(n)});else{let n=this.listeners[i];if(n&&this.visitSync(n,e.toProxy()))return}}warnings(){return this.sync().warnings()}};xn.registerPostcss=t=>{s_=t};wA.exports=xn;xn.default=xn;O7.registerLazyResult(xn);A7.registerLazyResult(xn)});var kA=T((oae,xA)=>{"use strict";y();var M7=Zy(),D7=_f(),F7=vf(),j7=Ko(),B7=i_(),pu=class{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,r=D7;try{e=r(this._css,this._opts)}catch(i){this.error=i}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(e,r,i){r=r.toString(),this.stringified=!1,this._processor=e,this._css=r,this._opts=i,this._map=void 0;let n=j7;this.result=new F7(this._processor,void 0,this._opts),this.result.css=r;let s=this;Object.defineProperty(this.result,"root",{get(){return s.root}});let a=new M7(n,void 0,this._opts,r);if(a.isMap()){let[o,u]=a.generate();o&&(this.result.css=o),u&&(this.result.map=u)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,r){return process.env.NODE_ENV!=="production"&&("from"in this._opts||B7("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,r)}toString(){return this._css}warnings(){return[]}};xA.exports=pu;pu.default=pu});var AA=T((cae,IA)=>{"use strict";y();var V7=af(),$7=a_(),U7=kA(),H7=Ta(),Ss=class{constructor(e=[]){this.version="8.5.10",this.plugins=this.normalize(e)}normalize(e){let r=[];for(let i of e)if(i.postcss===!0?i=i():i.postcss&&(i=i.postcss),typeof i=="object"&&Array.isArray(i.plugins))r=r.concat(i.plugins);else if(typeof i=="object"&&i.postcssPlugin)r.push(i);else if(typeof i=="function")r.push(i);else if(typeof i=="object"&&(i.parse||i.stringify)){if(process.env.NODE_ENV!=="production")throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}else throw new Error(i+" is not a PostCSS plugin");return r}process(e,r={}){return!this.plugins.length&&!r.parser&&!r.stringifier&&!r.syntax?new U7(this,e,r):new $7(this,e,r)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};IA.exports=Ss;Ss.default=Ss;H7.registerProcessor(Ss);V7.registerProcessor(Ss)});var CA=T((fae,qA)=>{"use strict";y();var TA=sf(),EA=ba(),G7=Sn(),W7=rf(),OA=tu(),NA=af(),z7=nA(),J7=au(),K7=a_(),Q7=Yy(),Y7=Xo(),X7=_f(),o_=AA(),Z7=vf(),LA=Ta(),PA=df(),e9=Ko(),t9=r_();function Pe(...t){return t.length===1&&Array.isArray(t[0])&&(t=t[0]),new o_(t)}Pe.plugin=function(e,r){let i=!1;function n(...a){console&&console.warn&&!i&&(i=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
1176
|
+
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
|
|
1177
|
+
https://www.w3ctech.com/topic/2226`));let o=r(...a);return o.postcssPlugin=e,o.postcssVersion=new o_().version,o}let s;return Object.defineProperty(n,"postcss",{get(){return s||(s=n()),s}}),n.process=function(a,o,u){return Pe([n(u)]).process(a,o)},n};Pe.stringify=e9;Pe.parse=X7;Pe.fromJSON=z7;Pe.list=Q7;Pe.comment=t=>new EA(t);Pe.atRule=t=>new TA(t);Pe.decl=t=>new OA(t);Pe.rule=t=>new PA(t);Pe.root=t=>new LA(t);Pe.document=t=>new NA(t);Pe.CssSyntaxError=W7;Pe.Declaration=OA;Pe.Container=G7;Pe.Processor=o_;Pe.Document=NA;Pe.Comment=EA;Pe.Warning=t9;Pe.AtRule=TA;Pe.Result=Z7;Pe.Input=J7;Pe.Rule=PA;Pe.Root=LA;Pe.Node=Y7;K7.registerPostcss(Pe);qA.exports=Pe;Pe.default=Pe});var MA=T((hae,RA)=>{y();var r9=ba(),i9=t_(),n9=tf(),u_=class extends i9{checkMissedSemicolon(){}comment(e){let r=new r9;this.init(r,e[2]);let i=this.input.fromOffset(e[3])||this.input.fromOffset(this.input.css.length-1);r.source.end={column:i.col,line:i.line,offset:e[3]+1};let n=e[1].slice(2);if(n.slice(-2)==="*/"&&(n=n.slice(0,-2)),/^\s*$/.test(n))r.text="",r.raws.left=n,r.raws.right="";else{let s=n.match(/^(\s*)([^]*\S)(\s*)$/);r.text=s[2],r.raws.left=s[1],r.raws.right=s[3]}}createTokenizer(){this.tokenizer=n9(this.input,{ignoreErrors:!0})}decl(e){e.length>1&&e.some(r=>r[0]==="word")&&super.decl(e)}doubleColon(){}endFile(){for(this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces;this.current.parent;)this.current=this.current.parent,this.current.raws.after="";this.root.source.end=this.getPosition(this.tokenizer.position())}precheckMissedSemicolon(e){let r=this.colon(e);if(r===!1)return;let i,n;for(i=r-1;i>=0&&e[i][0]!=="word";i--);if(i===0||i<0)return;for(n=i-1;n>=0;n--)if(e[n][0]!=="space"){n+=1;break}let s=e.slice(i),a=e.slice(n,i);e.splice(n,e.length-n),this.spaces=a.map(o=>o[1]).join(""),this.decl(s)}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(e){this.spaces+=e.map(r=>r[1]).join("")}unnamedAtrule(e){e.name=""}};RA.exports=u_});var FA=T((mae,DA)=>{y();var{Input:s9}=CA(),a9=MA();DA.exports=function(e,r){let i=new s9(e,r),n=new a9(i);return n.parse(),n.root}});var c_=T((bf,jA)=>{"use strict";y();bf.__esModule=!0;bf.default=c9;function o9(t){for(var e=t.toLowerCase(),r="",i=!1,n=0;n<6&&e[n]!==void 0;n++){var s=e.charCodeAt(n),a=s>=97&&s<=102||s>=48&&s<=57;if(i=s===32,!a)break;r+=e[n]}if(r.length!==0){var o=parseInt(r,16),u=o>=55296&&o<=57343;return u||o===0||o>1114111?["\uFFFD",r.length+(i?1:0)]:[String.fromCodePoint(o),r.length+(i?1:0)]}}var u9=/\\/;function c9(t){var e=u9.test(t);if(!e)return t;for(var r="",i=0;i<t.length;i++){if(t[i]==="\\"){var n=o9(t.slice(i+1,i+7));if(n!==void 0){r+=n[0],i+=n[1];continue}if(t[i+1]==="\\"){r+="\\",i++;continue}t.length===i+1&&(r+=t[i]);continue}r+=t[i]}return r}jA.exports=bf.default});var VA=T((Sf,BA)=>{"use strict";y();Sf.__esModule=!0;Sf.default=l9;function l9(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];for(;r.length>0;){var n=r.shift();if(!t[n])return;t=t[n]}return t}BA.exports=Sf.default});var UA=T((wf,$A)=>{"use strict";y();wf.__esModule=!0;wf.default=f9;function f9(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];for(;r.length>0;){var n=r.shift();t[n]||(t[n]={}),t=t[n]}}$A.exports=wf.default});var GA=T((xf,HA)=>{"use strict";y();xf.__esModule=!0;xf.default=p9;function p9(t){for(var e="",r=t.indexOf("/*"),i=0;r>=0;){e=e+t.slice(i,r);var n=t.indexOf("*/",r+2);if(n<0)return e;i=n+2,r=t.indexOf("/*",i)}return e=e+t.slice(i),e}HA.exports=xf.default});var hu=T(Ei=>{"use strict";y();Ei.__esModule=!0;Ei.unesc=Ei.stripComments=Ei.getProp=Ei.ensureObject=void 0;var h9=kf(c_());Ei.unesc=h9.default;var d9=kf(VA());Ei.getProp=d9.default;var m9=kf(UA());Ei.ensureObject=m9.default;var g9=kf(GA());Ei.stripComments=g9.default;function kf(t){return t&&t.__esModule?t:{default:t}}});var en=T((du,JA)=>{"use strict";y();du.__esModule=!0;du.default=void 0;var WA=hu();function zA(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function y9(t,e,r){return e&&zA(t.prototype,e),r&&zA(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}var _9=function t(e,r){if(typeof e!="object"||e===null)return e;var i=new e.constructor;for(var n in e)if(e.hasOwnProperty(n)){var s=e[n],a=typeof s;n==="parent"&&a==="object"?r&&(i[n]=r):s instanceof Array?i[n]=s.map(function(o){return t(o,i)}):i[n]=t(s,i)}return i},v9=(function(){function t(r){r===void 0&&(r={}),Object.assign(this,r),this.spaces=this.spaces||{},this.spaces.before=this.spaces.before||"",this.spaces.after=this.spaces.after||""}var e=t.prototype;return e.remove=function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this},e.replaceWith=function(){if(this.parent){for(var i in arguments)this.parent.insertBefore(this,arguments[i]);this.remove()}return this},e.next=function(){return this.parent.at(this.parent.index(this)+1)},e.prev=function(){return this.parent.at(this.parent.index(this)-1)},e.clone=function(i){i===void 0&&(i={});var n=_9(this);for(var s in i)n[s]=i[s];return n},e.appendToPropertyAndEscape=function(i,n,s){this.raws||(this.raws={});var a=this[i],o=this.raws[i];this[i]=a+n,o||s!==n?this.raws[i]=(o||a)+s:delete this.raws[i]},e.setPropertyAndEscape=function(i,n,s){this.raws||(this.raws={}),this[i]=n,this.raws[i]=s},e.setPropertyWithoutEscape=function(i,n){this[i]=n,this.raws&&delete this.raws[i]},e.isAtPosition=function(i,n){if(this.source&&this.source.start&&this.source.end)return!(this.source.start.line>i||this.source.end.line<i||this.source.start.line===i&&this.source.start.column>n||this.source.end.line===i&&this.source.end.column<n)},e.stringifyProperty=function(i){return this.raws&&this.raws[i]||this[i]},e.valueToString=function(){return String(this.stringifyProperty("value"))},e.toString=function(){return[this.rawSpaceBefore,this.valueToString(),this.rawSpaceAfter].join("")},y9(t,[{key:"rawSpaceBefore",get:function(){var i=this.raws&&this.raws.spaces&&this.raws.spaces.before;return i===void 0&&(i=this.spaces&&this.spaces.before),i||""},set:function(i){(0,WA.ensureObject)(this,"raws","spaces"),this.raws.spaces.before=i}},{key:"rawSpaceAfter",get:function(){var i=this.raws&&this.raws.spaces&&this.raws.spaces.after;return i===void 0&&(i=this.spaces.after),i||""},set:function(i){(0,WA.ensureObject)(this,"raws","spaces"),this.raws.spaces.after=i}}]),t})();du.default=v9;JA.exports=du.default});var Bt=T(De=>{"use strict";y();De.__esModule=!0;De.UNIVERSAL=De.TAG=De.STRING=De.SELECTOR=De.ROOT=De.PSEUDO=De.NESTING=De.ID=De.COMMENT=De.COMBINATOR=De.CLASS=De.ATTRIBUTE=void 0;var b9="tag";De.TAG=b9;var S9="string";De.STRING=S9;var w9="selector";De.SELECTOR=w9;var x9="root";De.ROOT=x9;var k9="pseudo";De.PSEUDO=k9;var I9="nesting";De.NESTING=I9;var A9="id";De.ID=A9;var T9="comment";De.COMMENT=T9;var E9="combinator";De.COMBINATOR=E9;var O9="class";De.CLASS=O9;var N9="attribute";De.ATTRIBUTE=N9;var L9="universal";De.UNIVERSAL=L9});var If=T((mu,XA)=>{"use strict";y();mu.__esModule=!0;mu.default=void 0;var P9=C9(en()),tn=q9(Bt());function YA(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,r=new WeakMap;return(YA=function(n){return n?r:e})(t)}function q9(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||typeof t!="object"&&typeof t!="function")return{default:t};var r=YA(e);if(r&&r.has(t))return r.get(t);var i={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if(s!=="default"&&Object.prototype.hasOwnProperty.call(t,s)){var a=n?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=t[s]}return i.default=t,r&&r.set(t,i),i}function C9(t){return t&&t.__esModule?t:{default:t}}function R9(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=M9(t))||e&&t&&typeof t.length=="number"){r&&(t=r);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
1178
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function M9(t,e){if(t){if(typeof t=="string")return KA(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return KA(t,e)}}function KA(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,i=new Array(e);r<e;r++)i[r]=t[r];return i}function QA(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function D9(t,e,r){return e&&QA(t.prototype,e),r&&QA(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function F9(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,l_(t,e)}function l_(t,e){return l_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},l_(t,e)}var j9=(function(t){F9(e,t);function e(i){var n;return n=t.call(this,i)||this,n.nodes||(n.nodes=[]),n}var r=e.prototype;return r.append=function(n){return n.parent=this,this.nodes.push(n),this},r.prepend=function(n){n.parent=this,this.nodes.unshift(n);for(var s in this.indexes)this.indexes[s]++;return this},r.at=function(n){return this.nodes[n]},r.index=function(n){return typeof n=="number"?n:this.nodes.indexOf(n)},r.removeChild=function(n){n=this.index(n),this.at(n).parent=void 0,this.nodes.splice(n,1);var s;for(var a in this.indexes)s=this.indexes[a],s>=n&&(this.indexes[a]=s-1);return this},r.removeAll=function(){for(var n=R9(this.nodes),s;!(s=n()).done;){var a=s.value;a.parent=void 0}return this.nodes=[],this},r.empty=function(){return this.removeAll()},r.insertAfter=function(n,s){var a;s.parent=this;for(var o=this.index(n),u=[],l=2;l<arguments.length;l++)u.push(arguments[l]);(a=this.nodes).splice.apply(a,[o+1,0,s].concat(u)),s.parent=this;var f;for(var h in this.indexes)f=this.indexes[h],o<f&&(this.indexes[h]=f+arguments.length-1);return this},r.insertBefore=function(n,s){var a;s.parent=this;for(var o=this.index(n),u=[],l=2;l<arguments.length;l++)u.push(arguments[l]);(a=this.nodes).splice.apply(a,[o,0,s].concat(u)),s.parent=this;var f;for(var h in this.indexes)f=this.indexes[h],f>=o&&(this.indexes[h]=f+arguments.length-1);return this},r._findChildAtPosition=function(n,s){var a=void 0;return this.each(function(o){if(o.atPosition){var u=o.atPosition(n,s);if(u)return a=u,!1}else if(o.isAtPosition(n,s))return a=o,!1}),a},r.atPosition=function(n,s){if(this.isAtPosition(n,s))return this._findChildAtPosition(n,s)||this},r._inferEndPosition=function(){this.last&&this.last.source&&this.last.source.end&&(this.source=this.source||{},this.source.end=this.source.end||{},Object.assign(this.source.end,this.last.source.end))},r.each=function(n){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach++;var s=this.lastEach;if(this.indexes[s]=0,!!this.length){for(var a,o;this.indexes[s]<this.length&&(a=this.indexes[s],o=n(this.at(a),a),o!==!1);)this.indexes[s]+=1;if(delete this.indexes[s],o===!1)return!1}},r.walk=function(n){return this.each(function(s,a){var o=n(s,a);if(o!==!1&&s.length&&(o=s.walk(n)),o===!1)return!1})},r.walkAttributes=function(n){var s=this;return this.walk(function(a){if(a.type===tn.ATTRIBUTE)return n.call(s,a)})},r.walkClasses=function(n){var s=this;return this.walk(function(a){if(a.type===tn.CLASS)return n.call(s,a)})},r.walkCombinators=function(n){var s=this;return this.walk(function(a){if(a.type===tn.COMBINATOR)return n.call(s,a)})},r.walkComments=function(n){var s=this;return this.walk(function(a){if(a.type===tn.COMMENT)return n.call(s,a)})},r.walkIds=function(n){var s=this;return this.walk(function(a){if(a.type===tn.ID)return n.call(s,a)})},r.walkNesting=function(n){var s=this;return this.walk(function(a){if(a.type===tn.NESTING)return n.call(s,a)})},r.walkPseudos=function(n){var s=this;return this.walk(function(a){if(a.type===tn.PSEUDO)return n.call(s,a)})},r.walkTags=function(n){var s=this;return this.walk(function(a){if(a.type===tn.TAG)return n.call(s,a)})},r.walkUniversals=function(n){var s=this;return this.walk(function(a){if(a.type===tn.UNIVERSAL)return n.call(s,a)})},r.split=function(n){var s=this,a=[];return this.reduce(function(o,u,l){var f=n.call(s,u);return a.push(u),f?(o.push(a),a=[]):l===s.length-1&&o.push(a),o},[])},r.map=function(n){return this.nodes.map(n)},r.reduce=function(n,s){return this.nodes.reduce(n,s)},r.every=function(n){return this.nodes.every(n)},r.some=function(n){return this.nodes.some(n)},r.filter=function(n){return this.nodes.filter(n)},r.sort=function(n){return this.nodes.sort(n)},r.toString=function(){return this.map(String).join("")},D9(e,[{key:"first",get:function(){return this.at(0)}},{key:"last",get:function(){return this.at(this.length-1)}},{key:"length",get:function(){return this.nodes.length}}]),e})(P9.default);mu.default=j9;XA.exports=mu.default});var p_=T((gu,eT)=>{"use strict";y();gu.__esModule=!0;gu.default=void 0;var B9=$9(If()),V9=Bt();function $9(t){return t&&t.__esModule?t:{default:t}}function ZA(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function U9(t,e,r){return e&&ZA(t.prototype,e),r&&ZA(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function H9(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,f_(t,e)}function f_(t,e){return f_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},f_(t,e)}var G9=(function(t){H9(e,t);function e(i){var n;return n=t.call(this,i)||this,n.type=V9.ROOT,n}var r=e.prototype;return r.toString=function(){var n=this.reduce(function(s,a){return s.push(String(a)),s},[]).join(",");return this.trailingComma?n+",":n},r.error=function(n,s){return this._error?this._error(n,s):new Error(n)},U9(e,[{key:"errorGenerator",set:function(n){this._error=n}}]),e})(B9.default);gu.default=G9;eT.exports=gu.default});var d_=T((yu,tT)=>{"use strict";y();yu.__esModule=!0;yu.default=void 0;var W9=J9(If()),z9=Bt();function J9(t){return t&&t.__esModule?t:{default:t}}function K9(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,h_(t,e)}function h_(t,e){return h_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},h_(t,e)}var Q9=(function(t){K9(e,t);function e(r){var i;return i=t.call(this,r)||this,i.type=z9.SELECTOR,i}return e})(W9.default);yu.default=Q9;tT.exports=yu.default});var Af=T((Oae,rT)=>{"use strict";y();var Y9={},X9=Y9.hasOwnProperty,Z9=function(e,r){if(!e)return r;var i={};for(var n in r)i[n]=X9.call(e,n)?e[n]:r[n];return i},eB=/[ -,\.\/:-@\[-\^`\{-~]/,tB=/[ -,\.\/:-@\[\]\^`\{-~]/,rB=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g,m_=function t(e,r){r=Z9(r,t.options),r.quotes!="single"&&r.quotes!="double"&&(r.quotes="single");for(var i=r.quotes=="double"?'"':"'",n=r.isIdentifier,s=e.charAt(0),a="",o=0,u=e.length;o<u;){var l=e.charAt(o++),f=l.charCodeAt(),h=void 0;if(f<32||f>126){if(f>=55296&&f<=56319&&o<u){var p=e.charCodeAt(o++);(p&64512)==56320?f=((f&1023)<<10)+(p&1023)+65536:o--}h="\\"+f.toString(16).toUpperCase()+" "}else r.escapeEverything?eB.test(l)?h="\\"+l:h="\\"+f.toString(16).toUpperCase()+" ":/[\t\n\f\r\x0B]/.test(l)?h="\\"+f.toString(16).toUpperCase()+" ":l=="\\"||!n&&(l=='"'&&i==l||l=="'"&&i==l)||n&&tB.test(l)?h="\\"+l:h=l;a+=h}return n&&(/^-[-\d]/.test(a)?a="\\-"+a.slice(1):/\d/.test(s)&&(a="\\3"+s+" "+a.slice(1))),a=a.replace(rB,function(m,v,S){return v&&v.length%2?m:(v||"")+S}),!n&&r.wrap?i+a+i:a};m_.options={escapeEverything:!1,isIdentifier:!1,quotes:"single",wrap:!1};m_.version="3.0.0";rT.exports=m_});var y_=T((_u,sT)=>{"use strict";y();_u.__esModule=!0;_u.default=void 0;var iB=nT(Af()),nB=hu(),sB=nT(en()),aB=Bt();function nT(t){return t&&t.__esModule?t:{default:t}}function iT(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function oB(t,e,r){return e&&iT(t.prototype,e),r&&iT(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function uB(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,g_(t,e)}function g_(t,e){return g_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},g_(t,e)}var cB=(function(t){uB(e,t);function e(i){var n;return n=t.call(this,i)||this,n.type=aB.CLASS,n._constructed=!0,n}var r=e.prototype;return r.valueToString=function(){return"."+t.prototype.valueToString.call(this)},oB(e,[{key:"value",get:function(){return this._value},set:function(n){if(this._constructed){var s=(0,iB.default)(n,{isIdentifier:!0});s!==n?((0,nB.ensureObject)(this,"raws"),this.raws.value=s):this.raws&&delete this.raws.value}this._value=n}}]),e})(sB.default);_u.default=cB;sT.exports=_u.default});var v_=T((vu,aT)=>{"use strict";y();vu.__esModule=!0;vu.default=void 0;var lB=pB(en()),fB=Bt();function pB(t){return t&&t.__esModule?t:{default:t}}function hB(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,__(t,e)}function __(t,e){return __=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},__(t,e)}var dB=(function(t){hB(e,t);function e(r){var i;return i=t.call(this,r)||this,i.type=fB.COMMENT,i}return e})(lB.default);vu.default=dB;aT.exports=vu.default});var S_=T((bu,oT)=>{"use strict";y();bu.__esModule=!0;bu.default=void 0;var mB=yB(en()),gB=Bt();function yB(t){return t&&t.__esModule?t:{default:t}}function _B(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,b_(t,e)}function b_(t,e){return b_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},b_(t,e)}var vB=(function(t){_B(e,t);function e(i){var n;return n=t.call(this,i)||this,n.type=gB.ID,n}var r=e.prototype;return r.valueToString=function(){return"#"+t.prototype.valueToString.call(this)},e})(mB.default);bu.default=vB;oT.exports=bu.default});var Tf=T((Su,lT)=>{"use strict";y();Su.__esModule=!0;Su.default=void 0;var bB=cT(Af()),SB=hu(),wB=cT(en());function cT(t){return t&&t.__esModule?t:{default:t}}function uT(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function xB(t,e,r){return e&&uT(t.prototype,e),r&&uT(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function kB(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,w_(t,e)}function w_(t,e){return w_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},w_(t,e)}var IB=(function(t){kB(e,t);function e(){return t.apply(this,arguments)||this}var r=e.prototype;return r.qualifiedName=function(n){return this.namespace?this.namespaceString+"|"+n:n},r.valueToString=function(){return this.qualifiedName(t.prototype.valueToString.call(this))},xB(e,[{key:"namespace",get:function(){return this._namespace},set:function(n){if(n===!0||n==="*"||n==="&"){this._namespace=n,this.raws&&delete this.raws.namespace;return}var s=(0,bB.default)(n,{isIdentifier:!0});this._namespace=n,s!==n?((0,SB.ensureObject)(this,"raws"),this.raws.namespace=s):this.raws&&delete this.raws.namespace}},{key:"ns",get:function(){return this._namespace},set:function(n){this.namespace=n}},{key:"namespaceString",get:function(){if(this.namespace){var n=this.stringifyProperty("namespace");return n===!0?"":n}else return""}}]),e})(wB.default);Su.default=IB;lT.exports=Su.default});var k_=T((wu,fT)=>{"use strict";y();wu.__esModule=!0;wu.default=void 0;var AB=EB(Tf()),TB=Bt();function EB(t){return t&&t.__esModule?t:{default:t}}function OB(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,x_(t,e)}function x_(t,e){return x_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},x_(t,e)}var NB=(function(t){OB(e,t);function e(r){var i;return i=t.call(this,r)||this,i.type=TB.TAG,i}return e})(AB.default);wu.default=NB;fT.exports=wu.default});var A_=T((xu,pT)=>{"use strict";y();xu.__esModule=!0;xu.default=void 0;var LB=qB(en()),PB=Bt();function qB(t){return t&&t.__esModule?t:{default:t}}function CB(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,I_(t,e)}function I_(t,e){return I_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},I_(t,e)}var RB=(function(t){CB(e,t);function e(r){var i;return i=t.call(this,r)||this,i.type=PB.STRING,i}return e})(LB.default);xu.default=RB;pT.exports=xu.default});var E_=T((ku,hT)=>{"use strict";y();ku.__esModule=!0;ku.default=void 0;var MB=FB(If()),DB=Bt();function FB(t){return t&&t.__esModule?t:{default:t}}function jB(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,T_(t,e)}function T_(t,e){return T_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},T_(t,e)}var BB=(function(t){jB(e,t);function e(i){var n;return n=t.call(this,i)||this,n.type=DB.PSEUDO,n}var r=e.prototype;return r.toString=function(){var n=this.length?"("+this.map(String).join(",")+")":"";return[this.rawSpaceBefore,this.stringifyProperty("value"),n,this.rawSpaceAfter].join("")},e})(MB.default);ku.default=BB;hT.exports=ku.default});var C_=T(Tu=>{"use strict";y();Tu.__esModule=!0;Tu.default=void 0;Tu.unescapeValue=q_;var Iu=P_(Af()),VB=P_(c_()),$B=P_(Tf()),UB=Bt(),O_;function P_(t){return t&&t.__esModule?t:{default:t}}function dT(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function HB(t,e,r){return e&&dT(t.prototype,e),r&&dT(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function GB(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,L_(t,e)}function L_(t,e){return L_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},L_(t,e)}var Au=l4(),WB=/^('|")([^]*)\1$/,zB=Au(function(){},"Assigning an attribute a value containing characters that might need to be escaped is deprecated. Call attribute.setValue() instead."),JB=Au(function(){},"Assigning attr.quoted is deprecated and has no effect. Assign to attr.quoteMark instead."),KB=Au(function(){},"Constructing an Attribute selector with a value without specifying quoteMark is deprecated. Note: The value should be unescaped now.");function q_(t){var e=!1,r=null,i=t,n=i.match(WB);return n&&(r=n[1],i=n[2]),i=(0,VB.default)(i),i!==t&&(e=!0),{deprecatedUsage:e,unescaped:i,quoteMark:r}}function QB(t){if(t.quoteMark!==void 0||t.value===void 0)return t;KB();var e=q_(t.value),r=e.quoteMark,i=e.unescaped;return t.raws||(t.raws={}),t.raws.value===void 0&&(t.raws.value=t.value),t.value=i,t.quoteMark=r,t}var Ef=(function(t){GB(e,t);function e(i){var n;return i===void 0&&(i={}),n=t.call(this,QB(i))||this,n.type=UB.ATTRIBUTE,n.raws=n.raws||{},Object.defineProperty(n.raws,"unquoted",{get:Au(function(){return n.value},"attr.raws.unquoted is deprecated. Call attr.value instead."),set:Au(function(){return n.value},"Setting attr.raws.unquoted is deprecated and has no effect. attr.value is unescaped by default now.")}),n._constructed=!0,n}var r=e.prototype;return r.getQuotedValue=function(n){n===void 0&&(n={});var s=this._determineQuoteMark(n),a=N_[s],o=(0,Iu.default)(this._value,a);return o},r._determineQuoteMark=function(n){return n.smart?this.smartQuoteMark(n):this.preferredQuoteMark(n)},r.setValue=function(n,s){s===void 0&&(s={}),this._value=n,this._quoteMark=this._determineQuoteMark(s),this._syncRawValue()},r.smartQuoteMark=function(n){var s=this.value,a=s.replace(/[^']/g,"").length,o=s.replace(/[^"]/g,"").length;if(a+o===0){var u=(0,Iu.default)(s,{isIdentifier:!0});if(u===s)return e.NO_QUOTE;var l=this.preferredQuoteMark(n);if(l===e.NO_QUOTE){var f=this.quoteMark||n.quoteMark||e.DOUBLE_QUOTE,h=N_[f],p=(0,Iu.default)(s,h);if(p.length<u.length)return f}return l}else return o===a?this.preferredQuoteMark(n):o<a?e.DOUBLE_QUOTE:e.SINGLE_QUOTE},r.preferredQuoteMark=function(n){var s=n.preferCurrentQuoteMark?this.quoteMark:n.quoteMark;return s===void 0&&(s=n.preferCurrentQuoteMark?n.quoteMark:this.quoteMark),s===void 0&&(s=e.DOUBLE_QUOTE),s},r._syncRawValue=function(){var n=(0,Iu.default)(this._value,N_[this.quoteMark]);n===this._value?this.raws&&delete this.raws.value:this.raws.value=n},r._handleEscapes=function(n,s){if(this._constructed){var a=(0,Iu.default)(s,{isIdentifier:!0});a!==s?this.raws[n]=a:delete this.raws[n]}},r._spacesFor=function(n){var s={before:"",after:""},a=this.spaces[n]||{},o=this.raws.spaces&&this.raws.spaces[n]||{};return Object.assign(s,a,o)},r._stringFor=function(n,s,a){s===void 0&&(s=n),a===void 0&&(a=mT);var o=this._spacesFor(s);return a(this.stringifyProperty(n),o)},r.offsetOf=function(n){var s=1,a=this._spacesFor("attribute");if(s+=a.before.length,n==="namespace"||n==="ns")return this.namespace?s:-1;if(n==="attributeNS"||(s+=this.namespaceString.length,this.namespace&&(s+=1),n==="attribute"))return s;s+=this.stringifyProperty("attribute").length,s+=a.after.length;var o=this._spacesFor("operator");s+=o.before.length;var u=this.stringifyProperty("operator");if(n==="operator")return u?s:-1;s+=u.length,s+=o.after.length;var l=this._spacesFor("value");s+=l.before.length;var f=this.stringifyProperty("value");if(n==="value")return f?s:-1;s+=f.length,s+=l.after.length;var h=this._spacesFor("insensitive");return s+=h.before.length,n==="insensitive"&&this.insensitive?s:-1},r.toString=function(){var n=this,s=[this.rawSpaceBefore,"["];return s.push(this._stringFor("qualifiedAttribute","attribute")),this.operator&&(this.value||this.value==="")&&(s.push(this._stringFor("operator")),s.push(this._stringFor("value")),s.push(this._stringFor("insensitiveFlag","insensitive",function(a,o){return a.length>0&&!n.quoted&&o.before.length===0&&!(n.spaces.value&&n.spaces.value.after)&&(o.before=" "),mT(a,o)}))),s.push("]"),s.push(this.rawSpaceAfter),s.join("")},HB(e,[{key:"quoted",get:function(){var n=this.quoteMark;return n==="'"||n==='"'},set:function(n){JB()}},{key:"quoteMark",get:function(){return this._quoteMark},set:function(n){if(!this._constructed){this._quoteMark=n;return}this._quoteMark!==n&&(this._quoteMark=n,this._syncRawValue())}},{key:"qualifiedAttribute",get:function(){return this.qualifiedName(this.raws.attribute||this.attribute)}},{key:"insensitiveFlag",get:function(){return this.insensitive?"i":""}},{key:"value",get:function(){return this._value},set:function(n){if(this._constructed){var s=q_(n),a=s.deprecatedUsage,o=s.unescaped,u=s.quoteMark;if(a&&zB(),o===this._value&&u===this._quoteMark)return;this._value=o,this._quoteMark=u,this._syncRawValue()}else this._value=n}},{key:"insensitive",get:function(){return this._insensitive},set:function(n){n||(this._insensitive=!1,this.raws&&(this.raws.insensitiveFlag==="I"||this.raws.insensitiveFlag==="i")&&(this.raws.insensitiveFlag=void 0)),this._insensitive=n}},{key:"attribute",get:function(){return this._attribute},set:function(n){this._handleEscapes("attribute",n),this._attribute=n}}]),e})($B.default);Tu.default=Ef;Ef.NO_QUOTE=null;Ef.SINGLE_QUOTE="'";Ef.DOUBLE_QUOTE='"';var N_=(O_={"'":{quotes:"single",wrap:!0},'"':{quotes:"double",wrap:!0}},O_[null]={isIdentifier:!0},O_);function mT(t,e){return""+e.before+t+e.after}});var M_=T((Eu,gT)=>{"use strict";y();Eu.__esModule=!0;Eu.default=void 0;var YB=ZB(Tf()),XB=Bt();function ZB(t){return t&&t.__esModule?t:{default:t}}function e8(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,R_(t,e)}function R_(t,e){return R_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},R_(t,e)}var t8=(function(t){e8(e,t);function e(r){var i;return i=t.call(this,r)||this,i.type=XB.UNIVERSAL,i.value="*",i}return e})(YB.default);Eu.default=t8;gT.exports=Eu.default});var F_=T((Ou,yT)=>{"use strict";y();Ou.__esModule=!0;Ou.default=void 0;var r8=n8(en()),i8=Bt();function n8(t){return t&&t.__esModule?t:{default:t}}function s8(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,D_(t,e)}function D_(t,e){return D_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},D_(t,e)}var a8=(function(t){s8(e,t);function e(r){var i;return i=t.call(this,r)||this,i.type=i8.COMBINATOR,i}return e})(r8.default);Ou.default=a8;yT.exports=Ou.default});var B_=T((Nu,_T)=>{"use strict";y();Nu.__esModule=!0;Nu.default=void 0;var o8=c8(en()),u8=Bt();function c8(t){return t&&t.__esModule?t:{default:t}}function l8(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,j_(t,e)}function j_(t,e){return j_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},j_(t,e)}var f8=(function(t){l8(e,t);function e(r){var i;return i=t.call(this,r)||this,i.type=u8.NESTING,i.value="&",i}return e})(o8.default);Nu.default=f8;_T.exports=Nu.default});var bT=T((Of,vT)=>{"use strict";y();Of.__esModule=!0;Of.default=p8;function p8(t){return t.sort(function(e,r){return e-r})}vT.exports=Of.default});var V_=T(re=>{"use strict";y();re.__esModule=!0;re.word=re.tilde=re.tab=re.str=re.space=re.slash=re.singleQuote=re.semicolon=re.plus=re.pipe=re.openSquare=re.openParenthesis=re.newline=re.greaterThan=re.feed=re.equals=re.doubleQuote=re.dollar=re.cr=re.comment=re.comma=re.combinator=re.colon=re.closeSquare=re.closeParenthesis=re.caret=re.bang=re.backslash=re.at=re.asterisk=re.ampersand=void 0;var h8=38;re.ampersand=h8;var d8=42;re.asterisk=d8;var m8=64;re.at=m8;var g8=44;re.comma=g8;var y8=58;re.colon=y8;var _8=59;re.semicolon=_8;var v8=40;re.openParenthesis=v8;var b8=41;re.closeParenthesis=b8;var S8=91;re.openSquare=S8;var w8=93;re.closeSquare=w8;var x8=36;re.dollar=x8;var k8=126;re.tilde=k8;var I8=94;re.caret=I8;var A8=43;re.plus=A8;var T8=61;re.equals=T8;var E8=124;re.pipe=E8;var O8=62;re.greaterThan=O8;var N8=32;re.space=N8;var ST=39;re.singleQuote=ST;var L8=34;re.doubleQuote=L8;var P8=47;re.slash=P8;var q8=33;re.bang=q8;var C8=92;re.backslash=C8;var R8=13;re.cr=R8;var M8=12;re.feed=M8;var D8=10;re.newline=D8;var F8=9;re.tab=F8;var j8=ST;re.str=j8;var B8=-1;re.comment=B8;var V8=-2;re.word=V8;var $8=-3;re.combinator=$8});var kT=T(Lu=>{"use strict";y();Lu.__esModule=!0;Lu.FIELDS=void 0;Lu.default=K8;var X=U8(V_()),Na,Re;function xT(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,r=new WeakMap;return(xT=function(n){return n?r:e})(t)}function U8(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||typeof t!="object"&&typeof t!="function")return{default:t};var r=xT(e);if(r&&r.has(t))return r.get(t);var i={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if(s!=="default"&&Object.prototype.hasOwnProperty.call(t,s)){var a=n?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=t[s]}return i.default=t,r&&r.set(t,i),i}var H8=(Na={},Na[X.tab]=!0,Na[X.newline]=!0,Na[X.cr]=!0,Na[X.feed]=!0,Na),G8=(Re={},Re[X.space]=!0,Re[X.tab]=!0,Re[X.newline]=!0,Re[X.cr]=!0,Re[X.feed]=!0,Re[X.ampersand]=!0,Re[X.asterisk]=!0,Re[X.bang]=!0,Re[X.comma]=!0,Re[X.colon]=!0,Re[X.semicolon]=!0,Re[X.openParenthesis]=!0,Re[X.closeParenthesis]=!0,Re[X.openSquare]=!0,Re[X.closeSquare]=!0,Re[X.singleQuote]=!0,Re[X.doubleQuote]=!0,Re[X.plus]=!0,Re[X.pipe]=!0,Re[X.tilde]=!0,Re[X.greaterThan]=!0,Re[X.equals]=!0,Re[X.dollar]=!0,Re[X.caret]=!0,Re[X.slash]=!0,Re),$_={},wT="0123456789abcdefABCDEF";for(Nf=0;Nf<wT.length;Nf++)$_[wT.charCodeAt(Nf)]=!0;var Nf;function W8(t,e){var r=e,i;do{if(i=t.charCodeAt(r),G8[i])return r-1;i===X.backslash?r=z8(t,r)+1:r++}while(r<t.length);return r-1}function z8(t,e){var r=e,i=t.charCodeAt(r+1);if(!H8[i])if($_[i]){var n=0;do r++,n++,i=t.charCodeAt(r+1);while($_[i]&&n<6);n<6&&i===X.space&&r++}else r++;return r}var J8={TYPE:0,START_LINE:1,START_COL:2,END_LINE:3,END_COL:4,START_POS:5,END_POS:6};Lu.FIELDS=J8;function K8(t){var e=[],r=t.css.valueOf(),i=r,n=i.length,s=-1,a=1,o=0,u=0,l,f,h,p,m,v,S,b,g,k,w,_,A;function E(O,L){if(t.safe)r+=L,g=r.length-1;else throw t.error("Unclosed "+O,a,o-s,o)}for(;o<n;){switch(l=r.charCodeAt(o),l===X.newline&&(s=o,a+=1),l){case X.space:case X.tab:case X.newline:case X.cr:case X.feed:g=o;do g+=1,l=r.charCodeAt(g),l===X.newline&&(s=g,a+=1);while(l===X.space||l===X.newline||l===X.tab||l===X.cr||l===X.feed);A=X.space,p=a,h=g-s-1,u=g;break;case X.plus:case X.greaterThan:case X.tilde:case X.pipe:g=o;do g+=1,l=r.charCodeAt(g);while(l===X.plus||l===X.greaterThan||l===X.tilde||l===X.pipe);A=X.combinator,p=a,h=o-s,u=g;break;case X.asterisk:case X.ampersand:case X.bang:case X.comma:case X.equals:case X.dollar:case X.caret:case X.openSquare:case X.closeSquare:case X.colon:case X.semicolon:case X.openParenthesis:case X.closeParenthesis:g=o,A=l,p=a,h=o-s,u=g+1;break;case X.singleQuote:case X.doubleQuote:_=l===X.singleQuote?"'":'"',g=o;do for(m=!1,g=r.indexOf(_,g+1),g===-1&&E("quote",_),v=g;r.charCodeAt(v-1)===X.backslash;)v-=1,m=!m;while(m);A=X.str,p=a,h=o-s,u=g+1;break;default:l===X.slash&&r.charCodeAt(o+1)===X.asterisk?(g=r.indexOf("*/",o+2)+1,g===0&&E("comment","*/"),f=r.slice(o,g+1),b=f.split(`
|
|
1179
|
+
`),S=b.length-1,S>0?(k=a+S,w=g-b[S].length):(k=a,w=s),A=X.comment,a=k,p=k,h=g-w):l===X.slash?(g=o,A=l,p=a,h=o-s,u=g+1):(g=W8(r,o),A=X.word,p=a,h=g-s),u=g+1;break}e.push([A,a,o-s,p,h,o,u]),w&&(s=w,w=null),o=u}return e}});var PT=T((Pu,LT)=>{"use strict";y();Pu.__esModule=!0;Pu.default=void 0;var Q8=Kr(p_()),U_=Kr(d_()),Y8=Kr(y_()),IT=Kr(v_()),X8=Kr(S_()),Z8=Kr(k_()),H_=Kr(A_()),eV=Kr(E_()),AT=Lf(C_()),tV=Kr(M_()),G_=Kr(F_()),rV=Kr(B_()),iV=Kr(bT()),G=Lf(kT()),ee=Lf(V_()),nV=Lf(Bt()),He=hu(),ws,W_;function NT(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,r=new WeakMap;return(NT=function(n){return n?r:e})(t)}function Lf(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||typeof t!="object"&&typeof t!="function")return{default:t};var r=NT(e);if(r&&r.has(t))return r.get(t);var i={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if(s!=="default"&&Object.prototype.hasOwnProperty.call(t,s)){var a=n?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=t[s]}return i.default=t,r&&r.set(t,i),i}function Kr(t){return t&&t.__esModule?t:{default:t}}function TT(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function sV(t,e,r){return e&&TT(t.prototype,e),r&&TT(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}var K_=(ws={},ws[ee.space]=!0,ws[ee.cr]=!0,ws[ee.feed]=!0,ws[ee.newline]=!0,ws[ee.tab]=!0,ws),aV=Object.assign({},K_,(W_={},W_[ee.comment]=!0,W_));function ET(t){return{line:t[G.FIELDS.START_LINE],column:t[G.FIELDS.START_COL]}}function OT(t){return{line:t[G.FIELDS.END_LINE],column:t[G.FIELDS.END_COL]}}function xs(t,e,r,i){return{start:{line:t,column:e},end:{line:r,column:i}}}function La(t){return xs(t[G.FIELDS.START_LINE],t[G.FIELDS.START_COL],t[G.FIELDS.END_LINE],t[G.FIELDS.END_COL])}function z_(t,e){if(t)return xs(t[G.FIELDS.START_LINE],t[G.FIELDS.START_COL],e[G.FIELDS.END_LINE],e[G.FIELDS.END_COL])}function Pa(t,e){var r=t[e];if(typeof r=="string")return r.indexOf("\\")!==-1&&((0,He.ensureObject)(t,"raws"),t[e]=(0,He.unesc)(r),t.raws[e]===void 0&&(t.raws[e]=r)),t}function J_(t,e){for(var r=-1,i=[];(r=t.indexOf(e,r+1))!==-1;)i.push(r);return i}function oV(){var t=Array.prototype.concat.apply([],arguments);return t.filter(function(e,r){return r===t.indexOf(e)})}var uV=(function(){function t(r,i){i===void 0&&(i={}),this.rule=r,this.options=Object.assign({lossy:!1,safe:!1},i),this.position=0,this.css=typeof this.rule=="string"?this.rule:this.rule.selector,this.tokens=(0,G.default)({css:this.css,error:this._errorGenerator(),safe:this.options.safe});var n=z_(this.tokens[0],this.tokens[this.tokens.length-1]);this.root=new Q8.default({source:n}),this.root.errorGenerator=this._errorGenerator();var s=new U_.default({source:{start:{line:1,column:1}},sourceIndex:0});this.root.append(s),this.current=s,this.loop()}var e=t.prototype;return e._errorGenerator=function(){var i=this;return function(n,s){return typeof i.rule=="string"?new Error(n):i.rule.error(n,s)}},e.attribute=function(){var i=[],n=this.currToken;for(this.position++;this.position<this.tokens.length&&this.currToken[G.FIELDS.TYPE]!==ee.closeSquare;)i.push(this.currToken),this.position++;if(this.currToken[G.FIELDS.TYPE]!==ee.closeSquare)return this.expected("closing square bracket",this.currToken[G.FIELDS.START_POS]);var s=i.length,a={source:xs(n[1],n[2],this.currToken[3],this.currToken[4]),sourceIndex:n[G.FIELDS.START_POS]};if(s===1&&!~[ee.word].indexOf(i[0][G.FIELDS.TYPE]))return this.expected("attribute",i[0][G.FIELDS.START_POS]);for(var o=0,u="",l="",f=null,h=!1;o<s;){var p=i[o],m=this.content(p),v=i[o+1];switch(p[G.FIELDS.TYPE]){case ee.space:if(h=!0,this.options.lossy)break;if(f){(0,He.ensureObject)(a,"spaces",f);var S=a.spaces[f].after||"";a.spaces[f].after=S+m;var b=(0,He.getProp)(a,"raws","spaces",f,"after")||null;b&&(a.raws.spaces[f].after=b+m)}else u=u+m,l=l+m;break;case ee.asterisk:if(v[G.FIELDS.TYPE]===ee.equals)a.operator=m,f="operator";else if((!a.namespace||f==="namespace"&&!h)&&v){u&&((0,He.ensureObject)(a,"spaces","attribute"),a.spaces.attribute.before=u,u=""),l&&((0,He.ensureObject)(a,"raws","spaces","attribute"),a.raws.spaces.attribute.before=u,l=""),a.namespace=(a.namespace||"")+m;var g=(0,He.getProp)(a,"raws","namespace")||null;g&&(a.raws.namespace+=m),f="namespace"}h=!1;break;case ee.dollar:if(f==="value"){var k=(0,He.getProp)(a,"raws","value");a.value+="$",k&&(a.raws.value=k+"$");break}case ee.caret:v[G.FIELDS.TYPE]===ee.equals&&(a.operator=m,f="operator"),h=!1;break;case ee.combinator:if(m==="~"&&v[G.FIELDS.TYPE]===ee.equals&&(a.operator=m,f="operator"),m!=="|"){h=!1;break}v[G.FIELDS.TYPE]===ee.equals?(a.operator=m,f="operator"):!a.namespace&&!a.attribute&&(a.namespace=!0),h=!1;break;case ee.word:if(v&&this.content(v)==="|"&&i[o+2]&&i[o+2][G.FIELDS.TYPE]!==ee.equals&&!a.operator&&!a.namespace)a.namespace=m,f="namespace";else if(!a.attribute||f==="attribute"&&!h){u&&((0,He.ensureObject)(a,"spaces","attribute"),a.spaces.attribute.before=u,u=""),l&&((0,He.ensureObject)(a,"raws","spaces","attribute"),a.raws.spaces.attribute.before=l,l=""),a.attribute=(a.attribute||"")+m;var w=(0,He.getProp)(a,"raws","attribute")||null;w&&(a.raws.attribute+=m),f="attribute"}else if(!a.value&&a.value!==""||f==="value"&&!(h||a.quoteMark)){var _=(0,He.unesc)(m),A=(0,He.getProp)(a,"raws","value")||"",E=a.value||"";a.value=E+_,a.quoteMark=null,(_!==m||A)&&((0,He.ensureObject)(a,"raws"),a.raws.value=(A||E)+m),f="value"}else{var O=m==="i"||m==="I";(a.value||a.value==="")&&(a.quoteMark||h)?(a.insensitive=O,(!O||m==="I")&&((0,He.ensureObject)(a,"raws"),a.raws.insensitiveFlag=m),f="insensitive",u&&((0,He.ensureObject)(a,"spaces","insensitive"),a.spaces.insensitive.before=u,u=""),l&&((0,He.ensureObject)(a,"raws","spaces","insensitive"),a.raws.spaces.insensitive.before=l,l="")):(a.value||a.value==="")&&(f="value",a.value+=m,a.raws.value&&(a.raws.value+=m))}h=!1;break;case ee.str:if(!a.attribute||!a.operator)return this.error("Expected an attribute followed by an operator preceding the string.",{index:p[G.FIELDS.START_POS]});var L=(0,AT.unescapeValue)(m),B=L.unescaped,R=L.quoteMark;a.value=B,a.quoteMark=R,f="value",(0,He.ensureObject)(a,"raws"),a.raws.value=m,h=!1;break;case ee.equals:if(!a.attribute)return this.expected("attribute",p[G.FIELDS.START_POS],m);if(a.value)return this.error('Unexpected "=" found; an operator was already defined.',{index:p[G.FIELDS.START_POS]});a.operator=a.operator?a.operator+m:m,f="operator",h=!1;break;case ee.comment:if(f)if(h||v&&v[G.FIELDS.TYPE]===ee.space||f==="insensitive"){var q=(0,He.getProp)(a,"spaces",f,"after")||"",P=(0,He.getProp)(a,"raws","spaces",f,"after")||q;(0,He.ensureObject)(a,"raws","spaces",f),a.raws.spaces[f].after=P+m}else{var $=a[f]||"",V=(0,He.getProp)(a,"raws",f)||$;(0,He.ensureObject)(a,"raws"),a.raws[f]=V+m}else l=l+m;break;default:return this.error('Unexpected "'+m+'" found.',{index:p[G.FIELDS.START_POS]})}o++}Pa(a,"attribute"),Pa(a,"namespace"),this.newNode(new AT.default(a)),this.position++},e.parseWhitespaceEquivalentTokens=function(i){i<0&&(i=this.tokens.length);var n=this.position,s=[],a="",o=void 0;do if(K_[this.currToken[G.FIELDS.TYPE]])this.options.lossy||(a+=this.content());else if(this.currToken[G.FIELDS.TYPE]===ee.comment){var u={};a&&(u.before=a,a=""),o=new IT.default({value:this.content(),source:La(this.currToken),sourceIndex:this.currToken[G.FIELDS.START_POS],spaces:u}),s.push(o)}while(++this.position<i);if(a){if(o)o.spaces.after=a;else if(!this.options.lossy){var l=this.tokens[n],f=this.tokens[this.position-1];s.push(new H_.default({value:"",source:xs(l[G.FIELDS.START_LINE],l[G.FIELDS.START_COL],f[G.FIELDS.END_LINE],f[G.FIELDS.END_COL]),sourceIndex:l[G.FIELDS.START_POS],spaces:{before:a,after:""}}))}}return s},e.convertWhitespaceNodesToSpace=function(i,n){var s=this;n===void 0&&(n=!1);var a="",o="";i.forEach(function(l){var f=s.lossySpace(l.spaces.before,n),h=s.lossySpace(l.rawSpaceBefore,n);a+=f+s.lossySpace(l.spaces.after,n&&f.length===0),o+=f+l.value+s.lossySpace(l.rawSpaceAfter,n&&h.length===0)}),o===a&&(o=void 0);var u={space:a,rawSpace:o};return u},e.isNamedCombinator=function(i){return i===void 0&&(i=this.position),this.tokens[i+0]&&this.tokens[i+0][G.FIELDS.TYPE]===ee.slash&&this.tokens[i+1]&&this.tokens[i+1][G.FIELDS.TYPE]===ee.word&&this.tokens[i+2]&&this.tokens[i+2][G.FIELDS.TYPE]===ee.slash},e.namedCombinator=function(){if(this.isNamedCombinator()){var i=this.content(this.tokens[this.position+1]),n=(0,He.unesc)(i).toLowerCase(),s={};n!==i&&(s.value="/"+i+"/");var a=new G_.default({value:"/"+n+"/",source:xs(this.currToken[G.FIELDS.START_LINE],this.currToken[G.FIELDS.START_COL],this.tokens[this.position+2][G.FIELDS.END_LINE],this.tokens[this.position+2][G.FIELDS.END_COL]),sourceIndex:this.currToken[G.FIELDS.START_POS],raws:s});return this.position=this.position+3,a}else this.unexpected()},e.combinator=function(){var i=this;if(this.content()==="|")return this.namespace();var n=this.locateNextMeaningfulToken(this.position);if(n<0||this.tokens[n][G.FIELDS.TYPE]===ee.comma||this.tokens[n][G.FIELDS.TYPE]===ee.closeParenthesis){var s=this.parseWhitespaceEquivalentTokens(n);if(s.length>0){var a=this.current.last;if(a){var o=this.convertWhitespaceNodesToSpace(s),u=o.space,l=o.rawSpace;l!==void 0&&(a.rawSpaceAfter+=l),a.spaces.after+=u}else s.forEach(function(A){return i.newNode(A)})}return}var f=this.currToken,h=void 0;n>this.position&&(h=this.parseWhitespaceEquivalentTokens(n));var p;if(this.isNamedCombinator()?p=this.namedCombinator():this.currToken[G.FIELDS.TYPE]===ee.combinator?(p=new G_.default({value:this.content(),source:La(this.currToken),sourceIndex:this.currToken[G.FIELDS.START_POS]}),this.position++):K_[this.currToken[G.FIELDS.TYPE]]||h||this.unexpected(),p){if(h){var m=this.convertWhitespaceNodesToSpace(h),v=m.space,S=m.rawSpace;p.spaces.before=v,p.rawSpaceBefore=S}}else{var b=this.convertWhitespaceNodesToSpace(h,!0),g=b.space,k=b.rawSpace;k||(k=g);var w={},_={spaces:{}};g.endsWith(" ")&&k.endsWith(" ")?(w.before=g.slice(0,g.length-1),_.spaces.before=k.slice(0,k.length-1)):g[0]===" "&&k[0]===" "?(w.after=g.slice(1),_.spaces.after=k.slice(1)):_.value=k,p=new G_.default({value:" ",source:z_(f,this.tokens[this.position-1]),sourceIndex:f[G.FIELDS.START_POS],spaces:w,raws:_})}return this.currToken&&this.currToken[G.FIELDS.TYPE]===ee.space&&(p.spaces.after=this.optionalSpace(this.content()),this.position++),this.newNode(p)},e.comma=function(){if(this.position===this.tokens.length-1){this.root.trailingComma=!0,this.position++;return}this.current._inferEndPosition();var i=new U_.default({source:{start:ET(this.tokens[this.position+1])},sourceIndex:this.tokens[this.position+1][G.FIELDS.START_POS]});this.current.parent.append(i),this.current=i,this.position++},e.comment=function(){var i=this.currToken;this.newNode(new IT.default({value:this.content(),source:La(i),sourceIndex:i[G.FIELDS.START_POS]})),this.position++},e.error=function(i,n){throw this.root.error(i,n)},e.missingBackslash=function(){return this.error("Expected a backslash preceding the semicolon.",{index:this.currToken[G.FIELDS.START_POS]})},e.missingParenthesis=function(){return this.expected("opening parenthesis",this.currToken[G.FIELDS.START_POS])},e.missingSquareBracket=function(){return this.expected("opening square bracket",this.currToken[G.FIELDS.START_POS])},e.unexpected=function(){return this.error("Unexpected '"+this.content()+"'. Escaping special characters with \\ may help.",this.currToken[G.FIELDS.START_POS])},e.unexpectedPipe=function(){return this.error("Unexpected '|'.",this.currToken[G.FIELDS.START_POS])},e.namespace=function(){var i=this.prevToken&&this.content(this.prevToken)||!0;if(this.nextToken[G.FIELDS.TYPE]===ee.word)return this.position++,this.word(i);if(this.nextToken[G.FIELDS.TYPE]===ee.asterisk)return this.position++,this.universal(i);this.unexpectedPipe()},e.nesting=function(){if(this.nextToken){var i=this.content(this.nextToken);if(i==="|"){this.position++;return}}var n=this.currToken;this.newNode(new rV.default({value:this.content(),source:La(n),sourceIndex:n[G.FIELDS.START_POS]})),this.position++},e.parentheses=function(){var i=this.current.last,n=1;if(this.position++,i&&i.type===nV.PSEUDO){var s=new U_.default({source:{start:ET(this.tokens[this.position])},sourceIndex:this.tokens[this.position][G.FIELDS.START_POS]}),a=this.current;for(i.append(s),this.current=s;this.position<this.tokens.length&&n;)this.currToken[G.FIELDS.TYPE]===ee.openParenthesis&&n++,this.currToken[G.FIELDS.TYPE]===ee.closeParenthesis&&n--,n?this.parse():(this.current.source.end=OT(this.currToken),this.current.parent.source.end=OT(this.currToken),this.position++);this.current=a}else{for(var o=this.currToken,u="(",l;this.position<this.tokens.length&&n;)this.currToken[G.FIELDS.TYPE]===ee.openParenthesis&&n++,this.currToken[G.FIELDS.TYPE]===ee.closeParenthesis&&n--,l=this.currToken,u+=this.parseParenthesisToken(this.currToken),this.position++;i?i.appendToPropertyAndEscape("value",u,u):this.newNode(new H_.default({value:u,source:xs(o[G.FIELDS.START_LINE],o[G.FIELDS.START_COL],l[G.FIELDS.END_LINE],l[G.FIELDS.END_COL]),sourceIndex:o[G.FIELDS.START_POS]}))}if(n)return this.expected("closing parenthesis",this.currToken[G.FIELDS.START_POS])},e.pseudo=function(){for(var i=this,n="",s=this.currToken;this.currToken&&this.currToken[G.FIELDS.TYPE]===ee.colon;)n+=this.content(),this.position++;if(!this.currToken)return this.expected(["pseudo-class","pseudo-element"],this.position-1);if(this.currToken[G.FIELDS.TYPE]===ee.word)this.splitWord(!1,function(a,o){n+=a,i.newNode(new eV.default({value:n,source:z_(s,i.currToken),sourceIndex:s[G.FIELDS.START_POS]})),o>1&&i.nextToken&&i.nextToken[G.FIELDS.TYPE]===ee.openParenthesis&&i.error("Misplaced parenthesis.",{index:i.nextToken[G.FIELDS.START_POS]})});else return this.expected(["pseudo-class","pseudo-element"],this.currToken[G.FIELDS.START_POS])},e.space=function(){var i=this.content();this.position===0||this.prevToken[G.FIELDS.TYPE]===ee.comma||this.prevToken[G.FIELDS.TYPE]===ee.openParenthesis||this.current.nodes.every(function(n){return n.type==="comment"})?(this.spaces=this.optionalSpace(i),this.position++):this.position===this.tokens.length-1||this.nextToken[G.FIELDS.TYPE]===ee.comma||this.nextToken[G.FIELDS.TYPE]===ee.closeParenthesis?(this.current.last.spaces.after=this.optionalSpace(i),this.position++):this.combinator()},e.string=function(){var i=this.currToken;this.newNode(new H_.default({value:this.content(),source:La(i),sourceIndex:i[G.FIELDS.START_POS]})),this.position++},e.universal=function(i){var n=this.nextToken;if(n&&this.content(n)==="|")return this.position++,this.namespace();var s=this.currToken;this.newNode(new tV.default({value:this.content(),source:La(s),sourceIndex:s[G.FIELDS.START_POS]}),i),this.position++},e.splitWord=function(i,n){for(var s=this,a=this.nextToken,o=this.content();a&&~[ee.dollar,ee.caret,ee.equals,ee.word].indexOf(a[G.FIELDS.TYPE]);){this.position++;var u=this.content();if(o+=u,u.lastIndexOf("\\")===u.length-1){var l=this.nextToken;l&&l[G.FIELDS.TYPE]===ee.space&&(o+=this.requiredSpace(this.content(l)),this.position++)}a=this.nextToken}var f=J_(o,".").filter(function(v){var S=o[v-1]==="\\",b=/^\d+\.\d+%$/.test(o);return!S&&!b}),h=J_(o,"#").filter(function(v){return o[v-1]!=="\\"}),p=J_(o,"#{");p.length&&(h=h.filter(function(v){return!~p.indexOf(v)}));var m=(0,iV.default)(oV([0].concat(f,h)));m.forEach(function(v,S){var b=m[S+1]||o.length,g=o.slice(v,b);if(S===0&&n)return n.call(s,g,m.length);var k,w=s.currToken,_=w[G.FIELDS.START_POS]+m[S],A=xs(w[1],w[2]+v,w[3],w[2]+(b-1));if(~f.indexOf(v)){var E={value:g.slice(1),source:A,sourceIndex:_};k=new Y8.default(Pa(E,"value"))}else if(~h.indexOf(v)){var O={value:g.slice(1),source:A,sourceIndex:_};k=new X8.default(Pa(O,"value"))}else{var L={value:g,source:A,sourceIndex:_};Pa(L,"value"),k=new Z8.default(L)}s.newNode(k,i),i=null}),this.position++},e.word=function(i){var n=this.nextToken;return n&&this.content(n)==="|"?(this.position++,this.namespace()):this.splitWord(i)},e.loop=function(){for(;this.position<this.tokens.length;)this.parse(!0);return this.current._inferEndPosition(),this.root},e.parse=function(i){switch(this.currToken[G.FIELDS.TYPE]){case ee.space:this.space();break;case ee.comment:this.comment();break;case ee.openParenthesis:this.parentheses();break;case ee.closeParenthesis:i&&this.missingParenthesis();break;case ee.openSquare:this.attribute();break;case ee.dollar:case ee.caret:case ee.equals:case ee.word:this.word();break;case ee.colon:this.pseudo();break;case ee.comma:this.comma();break;case ee.asterisk:this.universal();break;case ee.ampersand:this.nesting();break;case ee.slash:case ee.combinator:this.combinator();break;case ee.str:this.string();break;case ee.closeSquare:this.missingSquareBracket();case ee.semicolon:this.missingBackslash();default:this.unexpected()}},e.expected=function(i,n,s){if(Array.isArray(i)){var a=i.pop();i=i.join(", ")+" or "+a}var o=/^[aeiou]/.test(i[0])?"an":"a";return s?this.error("Expected "+o+" "+i+', found "'+s+'" instead.',{index:n}):this.error("Expected "+o+" "+i+".",{index:n})},e.requiredSpace=function(i){return this.options.lossy?" ":i},e.optionalSpace=function(i){return this.options.lossy?"":i},e.lossySpace=function(i,n){return this.options.lossy?n?" ":"":i},e.parseParenthesisToken=function(i){var n=this.content(i);return i[G.FIELDS.TYPE]===ee.space?this.requiredSpace(n):n},e.newNode=function(i,n){return n&&(/^ +$/.test(n)&&(this.options.lossy||(this.spaces=(this.spaces||"")+n),n=!0),i.namespace=n,Pa(i,"namespace")),this.spaces&&(i.spaces.before=this.spaces,this.spaces=""),this.current.append(i)},e.content=function(i){return i===void 0&&(i=this.currToken),this.css.slice(i[G.FIELDS.START_POS],i[G.FIELDS.END_POS])},e.locateNextMeaningfulToken=function(i){i===void 0&&(i=this.position+1);for(var n=i;n<this.tokens.length;)if(aV[this.tokens[n][G.FIELDS.TYPE]]){n++;continue}else return n;return-1},sV(t,[{key:"currToken",get:function(){return this.tokens[this.position]}},{key:"nextToken",get:function(){return this.tokens[this.position+1]}},{key:"prevToken",get:function(){return this.tokens[this.position-1]}}]),t})();Pu.default=uV;LT.exports=Pu.default});var CT=T((qu,qT)=>{"use strict";y();qu.__esModule=!0;qu.default=void 0;var cV=lV(PT());function lV(t){return t&&t.__esModule?t:{default:t}}var fV=(function(){function t(r,i){this.func=r||function(){},this.funcRes=null,this.options=i}var e=t.prototype;return e._shouldUpdateSelector=function(i,n){n===void 0&&(n={});var s=Object.assign({},this.options,n);return s.updateSelector===!1?!1:typeof i!="string"},e._isLossy=function(i){i===void 0&&(i={});var n=Object.assign({},this.options,i);return n.lossless===!1},e._root=function(i,n){n===void 0&&(n={});var s=new cV.default(i,this._parseOptions(n));return s.root},e._parseOptions=function(i){return{lossy:this._isLossy(i)}},e._run=function(i,n){var s=this;return n===void 0&&(n={}),new Promise(function(a,o){try{var u=s._root(i,n);Promise.resolve(s.func(u)).then(function(l){var f=void 0;return s._shouldUpdateSelector(i,n)&&(f=u.toString(),i.selector=f),{transform:l,root:u,string:f}}).then(a,o)}catch(l){o(l);return}})},e._runSync=function(i,n){n===void 0&&(n={});var s=this._root(i,n),a=this.func(s);if(a&&typeof a.then=="function")throw new Error("Selector processor returned a promise to a synchronous call.");var o=void 0;return n.updateSelector&&typeof i!="string"&&(o=s.toString(),i.selector=o),{transform:a,root:s,string:o}},e.ast=function(i,n){return this._run(i,n).then(function(s){return s.root})},e.astSync=function(i,n){return this._runSync(i,n).root},e.transform=function(i,n){return this._run(i,n).then(function(s){return s.transform})},e.transformSync=function(i,n){return this._runSync(i,n).transform},e.process=function(i,n){return this._run(i,n).then(function(s){return s.string||s.root.toString()})},e.processSync=function(i,n){var s=this._runSync(i,n);return s.string||s.root.toString()},t})();qu.default=fV;qT.exports=qu.default});var RT=T(Fe=>{"use strict";y();Fe.__esModule=!0;Fe.universal=Fe.tag=Fe.string=Fe.selector=Fe.root=Fe.pseudo=Fe.nesting=Fe.id=Fe.comment=Fe.combinator=Fe.className=Fe.attribute=void 0;var pV=Qr(C_()),hV=Qr(y_()),dV=Qr(F_()),mV=Qr(v_()),gV=Qr(S_()),yV=Qr(B_()),_V=Qr(E_()),vV=Qr(p_()),bV=Qr(d_()),SV=Qr(A_()),wV=Qr(k_()),xV=Qr(M_());function Qr(t){return t&&t.__esModule?t:{default:t}}var kV=function(e){return new pV.default(e)};Fe.attribute=kV;var IV=function(e){return new hV.default(e)};Fe.className=IV;var AV=function(e){return new dV.default(e)};Fe.combinator=AV;var TV=function(e){return new mV.default(e)};Fe.comment=TV;var EV=function(e){return new gV.default(e)};Fe.id=EV;var OV=function(e){return new yV.default(e)};Fe.nesting=OV;var NV=function(e){return new _V.default(e)};Fe.pseudo=NV;var LV=function(e){return new vV.default(e)};Fe.root=LV;var PV=function(e){return new bV.default(e)};Fe.selector=PV;var qV=function(e){return new SV.default(e)};Fe.string=qV;var CV=function(e){return new wV.default(e)};Fe.tag=CV;var RV=function(e){return new xV.default(e)};Fe.universal=RV});var jT=T(Ee=>{"use strict";y();Ee.__esModule=!0;Ee.isComment=Ee.isCombinator=Ee.isClassName=Ee.isAttribute=void 0;Ee.isContainer=zV;Ee.isIdentifier=void 0;Ee.isNamespace=JV;Ee.isNesting=void 0;Ee.isNode=Q_;Ee.isPseudo=void 0;Ee.isPseudoClass=WV;Ee.isPseudoElement=FT;Ee.isUniversal=Ee.isTag=Ee.isString=Ee.isSelector=Ee.isRoot=void 0;var Ge=Bt(),wr,MV=(wr={},wr[Ge.ATTRIBUTE]=!0,wr[Ge.CLASS]=!0,wr[Ge.COMBINATOR]=!0,wr[Ge.COMMENT]=!0,wr[Ge.ID]=!0,wr[Ge.NESTING]=!0,wr[Ge.PSEUDO]=!0,wr[Ge.ROOT]=!0,wr[Ge.SELECTOR]=!0,wr[Ge.STRING]=!0,wr[Ge.TAG]=!0,wr[Ge.UNIVERSAL]=!0,wr);function Q_(t){return typeof t=="object"&&MV[t.type]}function Yr(t,e){return Q_(e)&&e.type===t}var MT=Yr.bind(null,Ge.ATTRIBUTE);Ee.isAttribute=MT;var DV=Yr.bind(null,Ge.CLASS);Ee.isClassName=DV;var FV=Yr.bind(null,Ge.COMBINATOR);Ee.isCombinator=FV;var jV=Yr.bind(null,Ge.COMMENT);Ee.isComment=jV;var BV=Yr.bind(null,Ge.ID);Ee.isIdentifier=BV;var VV=Yr.bind(null,Ge.NESTING);Ee.isNesting=VV;var Y_=Yr.bind(null,Ge.PSEUDO);Ee.isPseudo=Y_;var $V=Yr.bind(null,Ge.ROOT);Ee.isRoot=$V;var UV=Yr.bind(null,Ge.SELECTOR);Ee.isSelector=UV;var HV=Yr.bind(null,Ge.STRING);Ee.isString=HV;var DT=Yr.bind(null,Ge.TAG);Ee.isTag=DT;var GV=Yr.bind(null,Ge.UNIVERSAL);Ee.isUniversal=GV;function FT(t){return Y_(t)&&t.value&&(t.value.startsWith("::")||t.value.toLowerCase()===":before"||t.value.toLowerCase()===":after"||t.value.toLowerCase()===":first-letter"||t.value.toLowerCase()===":first-line")}function WV(t){return Y_(t)&&!FT(t)}function zV(t){return!!(Q_(t)&&t.walk)}function JV(t){return MT(t)||DT(t)}});var BT=T(mi=>{"use strict";y();mi.__esModule=!0;var X_=Bt();Object.keys(X_).forEach(function(t){t==="default"||t==="__esModule"||t in mi&&mi[t]===X_[t]||(mi[t]=X_[t])});var Z_=RT();Object.keys(Z_).forEach(function(t){t==="default"||t==="__esModule"||t in mi&&mi[t]===Z_[t]||(mi[t]=Z_[t])});var ev=jT();Object.keys(ev).forEach(function(t){t==="default"||t==="__esModule"||t in mi&&mi[t]===ev[t]||(mi[t]=ev[t])})});var UT=T((Cu,$T)=>{"use strict";y();Cu.__esModule=!0;Cu.default=void 0;var KV=XV(CT()),QV=YV(BT());function VT(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,r=new WeakMap;return(VT=function(n){return n?r:e})(t)}function YV(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||typeof t!="object"&&typeof t!="function")return{default:t};var r=VT(e);if(r&&r.has(t))return r.get(t);var i={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if(s!=="default"&&Object.prototype.hasOwnProperty.call(t,s)){var a=n?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=t[s]}return i.default=t,r&&r.set(t,i),i}function XV(t){return t&&t.__esModule?t:{default:t}}var tv=function(e){return new KV.default(e)};Object.assign(tv,QV);delete tv.__esModule;var ZV=tv;Cu.default=ZV;$T.exports=Cu.default});var je=T(xr=>{"use strict";y();Object.defineProperty(xr,"__esModule",{value:!0});xr.isNodeOfType=ks;xr.isLiquidBranch=e$;xr.isHtmlTag=t$;xr.isAttr=r$;xr.isHtmlAttribute=i$;xr.isValuedHtmlAttribute=n$;xr.valueIncludes=s$;xr.hasAttributeValueOf=a$;xr.isLiquidString=o$;xr.isLoopScopedVariable=u$;xr.isLoopLiquidTag=HT;xr.isWithinRawTagThatDoesNotParseItsContents=f$;var er=ge();function ks(t,e){return e?.type===t}function e$(t){return ks(er.NodeTypes.LiquidBranch,t)}function t$(t,e){return t.name.length===1&&t.name[0].type===er.NodeTypes.TextNode&&t.name[0].value===e&&!!t.blockEndPosition}function r$(t,e){return t.name.length===1&&ks(er.NodeTypes.TextNode,t.name[0])&&t.name[0].value===e}function i$(t){return[er.NodeTypes.AttrUnquoted,er.NodeTypes.AttrDoubleQuoted,er.NodeTypes.AttrSingleQuoted,er.NodeTypes.AttrEmpty].some(e=>ks(e,t))}function n$(t){return[er.NodeTypes.AttrUnquoted,er.NodeTypes.AttrDoubleQuoted,er.NodeTypes.AttrSingleQuoted].some(e=>ks(e,t))}function s$(t,e){let r=new RegExp(`(^|\\s)${e}(\\s|$)`,"g");return t.value.filter(i=>ks(er.NodeTypes.TextNode,i)).some(i=>r.test(i.value))}function a$(t,e){return t.value.length===1&&ks(er.NodeTypes.TextNode,t.value[0])&&t.value[0].value===e}function o$(t){return t.type===er.NodeTypes.String}function u$(t,e){return e.some(r=>r.type===er.NodeTypes.LiquidTag&&HT(r)&&typeof r.markup!="string"&&r.markup.variableName===t)}function HT(t){return er.LoopNamedTags.includes(t.name)}var c$=["raw","stylesheet","javascript","schema"];function l$(t){return t.type===er.NodeTypes.LiquidRawTag&&c$.includes(t.name)}function f$(t){return t.some(l$)}});var kn=T(qa=>{"use strict";y();Object.defineProperty(qa,"__esModule",{value:!0});qa.visit=h$;qa.forEachChildNodes=qf;qa.findCurrentNode=d$;qa.findJSONNode=y$;var Pf=ge();function p$(t){return t!==null&&typeof t=="object"&&typeof t.type=="string"}function h$(t,e){let r=[],i=[{node:t,lineage:[]}],n=(s,a)=>i.push({node:s,lineage:a});for(;i.length>0;){let{node:s,lineage:a}=i.pop(),o=e[s.type],u=o?o(s,a):void 0;Array.isArray(u)?r.push(...u):u!==void 0&&r.push(u),qf(s,a.concat(s),n)}return r}function qf(t,e,r){for(let i of Object.values(t))if(Array.isArray(i))for(let n=i.length-1;n>=0;n--)r(i[n],e);else p$(i)&&r(i,e)}function d$(t,e){let r,i=t,n=[];for(;i!==r;)r=i,qf(i,n.concat(i),(s,a)=>{(g$(s)||m$(s,e)&>(s)<=GT(i))&&(i=s,n=a)});return[i,n]}function m$(t,e){switch(t.type){case Pf.NodeTypes.String:case Pf.NodeTypes.VariableLookup:case Pf.NodeTypes.LogicalExpression:case Pf.NodeTypes.Comparison:return t.position.start<=e&&e<=t.position.end;default:return t.position.start<e&&e<=t.position.end}}function GT(t){return t.position.end-t.position.start}function g$(t){return"blockEndPosition"in t?t.blockEndPosition?.end===-1:"children"in t?t.children.length>0:!1}function y$(t,e){let r,i=t,n=[],s=e;for(;i!==r;)r=i,qf(i,n.concat(i),(a,o)=>{a.loc.start.offset<=s&&s<a.loc.end.offset&&(i=a,n=o)});return[i,n]}});var Cf=T(Oi=>{"use strict";y();var WT=Oi&&Oi.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Oi,"__esModule",{value:!0});Oi.extractCSSClassNames=rv;Oi.extractCSSClassesFromLiquidAST=JT;Oi.extractCSSClassesFromLiquidUri=S$;Oi.extractCSSClassesFromAssetUri=w$;Oi.collectUsedClasses=Ru;Oi.collectUsedClassesFromSvg=k$;var Ca=ge(),_$=WT(FA()),v$=WT(UT()),b$=je(),zT=kn();function rv(t){let e=new Set;return(0,_$.default)(t).walkRules(i=>{try{(0,v$.default)().astSync(i.selector).walk(s=>{s.type==="class"&&e.add(s.value)})}catch{}}),e}function JT(t){let e=new Set,r=(0,zT.visit)(t,{LiquidRawTag(i){if(i.name==="stylesheet")return i.body.value}});for(let i of r)for(let n of rv(i))e.add(n);return e}async function S$(t,e){let r=new Set;try{let i=await e.readFile(t);if(!/\{%-?\s*stylesheet/.test(i))return r;let n=(0,Ca.toLiquidHtmlAST)(i);if(n instanceof Error)return r;for(let s of JT(n))r.add(s)}catch{}return r}async function w$(t,e){try{let r=await e.readFile(t);return rv(r)}catch{return new Set}}function x$(t){return t.name.length===1&&t.name[0].type===Ca.NodeTypes.TextNode&&t.name[0].value.toLowerCase()==="class"}function Ru(t,e){for(let r of t){if(!(0,b$.isValuedHtmlAttribute)(r)||!x$(r))continue;let i=r.value;for(let n=0;n<i.length;n++){let s=i[n];if(s.type!==Ca.NodeTypes.TextNode)continue;let a=s,o=a.value,u=a.position.start,l=n>0&&i[n-1].type!==Ca.NodeTypes.TextNode,f=n<i.length-1&&i[n+1].type!==Ca.NodeTypes.TextNode,h=[],p=/\S+/g,m;for(;(m=p.exec(o))!==null;)h.push({className:m[0],startIndex:u+m.index,endIndex:u+m.index+m[0].length});h.length!==0&&(l&&!/^\s/.test(o)&&h.shift(),f&&!/\s$/.test(o)&&h.pop(),e.push(...h))}}}function k$(t,e,r,i){Ru(t,i);try{let n=(0,Ca.toLiquidHtmlAST)(e);if(n instanceof Error)return;let s=[],a={HtmlElement(o){Ru(o.attributes,s)},HtmlVoidElement(o){Ru(o.attributes,s)},HtmlSelfClosingElement(o){Ru(o.attributes,s)}};(0,zT.visit)(n,a);for(let o of s)i.push({className:o.className,startIndex:o.startIndex+r,endIndex:o.endIndex+r})}catch{}}});var Du=T((Mu,iv)=>{y();(function(t,e){if(typeof Mu=="object"&&typeof iv=="object")iv.exports=e();else if(typeof define=="function"&&define.amd)define([],e);else{var r=e();for(var i in r)(typeof Mu=="object"?Mu:t)[i]=r[i]}})(Mu,(()=>(()=>{"use strict";var t={975:n=>{function s(u){if(typeof u!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(u))}function a(u,l){for(var f,h="",p=0,m=-1,v=0,S=0;S<=u.length;++S){if(S<u.length)f=u.charCodeAt(S);else{if(f===47)break;f=47}if(f===47){if(!(m===S-1||v===1))if(m!==S-1&&v===2){if(h.length<2||p!==2||h.charCodeAt(h.length-1)!==46||h.charCodeAt(h.length-2)!==46){if(h.length>2){var b=h.lastIndexOf("/");if(b!==h.length-1){b===-1?(h="",p=0):p=(h=h.slice(0,b)).length-1-h.lastIndexOf("/"),m=S,v=0;continue}}else if(h.length===2||h.length===1){h="",p=0,m=S,v=0;continue}}l&&(h.length>0?h+="/..":h="..",p=2)}else h.length>0?h+="/"+u.slice(m+1,S):h=u.slice(m+1,S),p=S-m-1;m=S,v=0}else f===46&&v!==-1?++v:v=-1}return h}var o={resolve:function(){for(var u,l="",f=!1,h=arguments.length-1;h>=-1&&!f;h--){var p;h>=0?p=arguments[h]:(u===void 0&&(u=process.cwd()),p=u),s(p),p.length!==0&&(l=p+"/"+l,f=p.charCodeAt(0)===47)}return l=a(l,!f),f?l.length>0?"/"+l:"/":l.length>0?l:"."},normalize:function(u){if(s(u),u.length===0)return".";var l=u.charCodeAt(0)===47,f=u.charCodeAt(u.length-1)===47;return(u=a(u,!l)).length!==0||l||(u="."),u.length>0&&f&&(u+="/"),l?"/"+u:u},isAbsolute:function(u){return s(u),u.length>0&&u.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var u,l=0;l<arguments.length;++l){var f=arguments[l];s(f),f.length>0&&(u===void 0?u=f:u+="/"+f)}return u===void 0?".":o.normalize(u)},relative:function(u,l){if(s(u),s(l),u===l||(u=o.resolve(u))===(l=o.resolve(l)))return"";for(var f=1;f<u.length&&u.charCodeAt(f)===47;++f);for(var h=u.length,p=h-f,m=1;m<l.length&&l.charCodeAt(m)===47;++m);for(var v=l.length-m,S=p<v?p:v,b=-1,g=0;g<=S;++g){if(g===S){if(v>S){if(l.charCodeAt(m+g)===47)return l.slice(m+g+1);if(g===0)return l.slice(m+g)}else p>S&&(u.charCodeAt(f+g)===47?b=g:g===0&&(b=0));break}var k=u.charCodeAt(f+g);if(k!==l.charCodeAt(m+g))break;k===47&&(b=g)}var w="";for(g=f+b+1;g<=h;++g)g!==h&&u.charCodeAt(g)!==47||(w.length===0?w+="..":w+="/..");return w.length>0?w+l.slice(m+b):(m+=b,l.charCodeAt(m)===47&&++m,l.slice(m))},_makeLong:function(u){return u},dirname:function(u){if(s(u),u.length===0)return".";for(var l=u.charCodeAt(0),f=l===47,h=-1,p=!0,m=u.length-1;m>=1;--m)if((l=u.charCodeAt(m))===47){if(!p){h=m;break}}else p=!1;return h===-1?f?"/":".":f&&h===1?"//":u.slice(0,h)},basename:function(u,l){if(l!==void 0&&typeof l!="string")throw new TypeError('"ext" argument must be a string');s(u);var f,h=0,p=-1,m=!0;if(l!==void 0&&l.length>0&&l.length<=u.length){if(l.length===u.length&&l===u)return"";var v=l.length-1,S=-1;for(f=u.length-1;f>=0;--f){var b=u.charCodeAt(f);if(b===47){if(!m){h=f+1;break}}else S===-1&&(m=!1,S=f+1),v>=0&&(b===l.charCodeAt(v)?--v==-1&&(p=f):(v=-1,p=S))}return h===p?p=S:p===-1&&(p=u.length),u.slice(h,p)}for(f=u.length-1;f>=0;--f)if(u.charCodeAt(f)===47){if(!m){h=f+1;break}}else p===-1&&(m=!1,p=f+1);return p===-1?"":u.slice(h,p)},extname:function(u){s(u);for(var l=-1,f=0,h=-1,p=!0,m=0,v=u.length-1;v>=0;--v){var S=u.charCodeAt(v);if(S!==47)h===-1&&(p=!1,h=v+1),S===46?l===-1?l=v:m!==1&&(m=1):l!==-1&&(m=-1);else if(!p){f=v+1;break}}return l===-1||h===-1||m===0||m===1&&l===h-1&&l===f+1?"":u.slice(l,h)},format:function(u){if(u===null||typeof u!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof u);return(function(l,f){var h=f.dir||f.root,p=f.base||(f.name||"")+(f.ext||"");return h?h===f.root?h+p:h+"/"+p:p})(0,u)},parse:function(u){s(u);var l={root:"",dir:"",base:"",ext:"",name:""};if(u.length===0)return l;var f,h=u.charCodeAt(0),p=h===47;p?(l.root="/",f=1):f=0;for(var m=-1,v=0,S=-1,b=!0,g=u.length-1,k=0;g>=f;--g)if((h=u.charCodeAt(g))!==47)S===-1&&(b=!1,S=g+1),h===46?m===-1?m=g:k!==1&&(k=1):m!==-1&&(k=-1);else if(!b){v=g+1;break}return m===-1||S===-1||k===0||k===1&&m===S-1&&m===v+1?S!==-1&&(l.base=l.name=v===0&&p?u.slice(1,S):u.slice(v,S)):(v===0&&p?(l.name=u.slice(1,m),l.base=u.slice(1,S)):(l.name=u.slice(v,m),l.base=u.slice(v,S)),l.ext=u.slice(m,S)),v>0?l.dir=u.slice(0,v-1):p&&(l.dir="/"),l},sep:"/",delimiter:":",win32:null,posix:null};o.posix=o,n.exports=o},70:(n,s)=>{if(Object.defineProperty(s,"__esModule",{value:!0}),s.isWindows=void 0,typeof process=="object")s.isWindows=process.platform==="win32";else if(typeof navigator=="object"){let a=navigator.userAgent;s.isWindows=a.indexOf("Windows")>=0}},231:(n,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.uriToFsPath=s.URI=void 0;let o=a(70),u=/^\w[\w\d+.-]*$/,l=/^\//,f=/^\/\//;function h(R,q){if(!R.scheme&&q)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${R.authority}", path: "${R.path}", query: "${R.query}", fragment: "${R.fragment}"}`);if(R.scheme&&!u.test(R.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(R.path){if(R.authority){if(!l.test(R.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(f.test(R.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}let p="",m="/",v=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class S{static isUri(q){return q instanceof S||!!q&&typeof q.authority=="string"&&typeof q.fragment=="string"&&typeof q.path=="string"&&typeof q.query=="string"&&typeof q.scheme=="string"&&typeof q.fsPath=="string"&&typeof q.with=="function"&&typeof q.toString=="function"}scheme;authority;path;query;fragment;constructor(q,P,$,V,C,F=!1){typeof q=="object"?(this.scheme=q.scheme||p,this.authority=q.authority||p,this.path=q.path||p,this.query=q.query||p,this.fragment=q.fragment||p):(this.scheme=(function(U,W){return U||W?U:"file"})(q,F),this.authority=P||p,this.path=(function(U,W){switch(U){case"https":case"http":case"file":W?W[0]!==m&&(W=m+W):W=m}return W})(this.scheme,$||p),this.query=V||p,this.fragment=C||p,h(this,F))}get fsPath(){return A(this,!1)}with(q){if(!q)return this;let{scheme:P,authority:$,path:V,query:C,fragment:F}=q;return P===void 0?P=this.scheme:P===null&&(P=p),$===void 0?$=this.authority:$===null&&($=p),V===void 0?V=this.path:V===null&&(V=p),C===void 0?C=this.query:C===null&&(C=p),F===void 0?F=this.fragment:F===null&&(F=p),P===this.scheme&&$===this.authority&&V===this.path&&C===this.query&&F===this.fragment?this:new g(P,$,V,C,F)}static parse(q,P=!1){let $=v.exec(q);return $?new g($[2]||p,B($[4]||p),B($[5]||p),B($[7]||p),B($[9]||p),P):new g(p,p,p,p,p)}static file(q){let P=p;if(o.isWindows&&(q=q.replace(/\\/g,m)),q[0]===m&&q[1]===m){let $=q.indexOf(m,2);$===-1?(P=q.substring(2),q=m):(P=q.substring(2,$),q=q.substring($)||m)}return new g("file",P,q,p,p)}static from(q){let P=new g(q.scheme,q.authority,q.path,q.query,q.fragment);return h(P,!0),P}toString(q=!1){return E(this,q)}toJSON(){return this}static revive(q){if(q){if(q instanceof S)return q;{let P=new g(q);return P._formatted=q.external,P._fsPath=q._sep===b?q.fsPath:null,P}}return q}}s.URI=S;let b=o.isWindows?1:void 0;class g extends S{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=A(this,!1)),this._fsPath}toString(q=!1){return q?E(this,!0):(this._formatted||(this._formatted=E(this,!1)),this._formatted)}toJSON(){let q={$mid:1};return this._fsPath&&(q.fsPath=this._fsPath,q._sep=b),this._formatted&&(q.external=this._formatted),this.path&&(q.path=this.path),this.scheme&&(q.scheme=this.scheme),this.authority&&(q.authority=this.authority),this.query&&(q.query=this.query),this.fragment&&(q.fragment=this.fragment),q}}let k={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function w(R,q,P){let $,V=-1;for(let C=0;C<R.length;C++){let F=R.charCodeAt(C);if(F>=97&&F<=122||F>=65&&F<=90||F>=48&&F<=57||F===45||F===46||F===95||F===126||q&&F===47||P&&F===91||P&&F===93||P&&F===58)V!==-1&&($+=encodeURIComponent(R.substring(V,C)),V=-1),$!==void 0&&($+=R.charAt(C));else{$===void 0&&($=R.substr(0,C));let U=k[F];U!==void 0?(V!==-1&&($+=encodeURIComponent(R.substring(V,C)),V=-1),$+=U):V===-1&&(V=C)}}return V!==-1&&($+=encodeURIComponent(R.substring(V))),$!==void 0?$:R}function _(R){let q;for(let P=0;P<R.length;P++){let $=R.charCodeAt(P);$===35||$===63?(q===void 0&&(q=R.substr(0,P)),q+=k[$]):q!==void 0&&(q+=R[P])}return q!==void 0?q:R}function A(R,q){let P;return P=R.authority&&R.path.length>1&&R.scheme==="file"?`//${R.authority}${R.path}`:R.path.charCodeAt(0)===47&&(R.path.charCodeAt(1)>=65&&R.path.charCodeAt(1)<=90||R.path.charCodeAt(1)>=97&&R.path.charCodeAt(1)<=122)&&R.path.charCodeAt(2)===58?q?R.path.substr(1):R.path[1].toLowerCase()+R.path.substr(2):R.path,o.isWindows&&(P=P.replace(/\//g,"\\")),P}function E(R,q){let P=q?_:w,$="",{scheme:V,authority:C,path:F,query:U,fragment:W}=R;if(V&&($+=V,$+=":"),(C||V==="file")&&($+=m,$+=m),C){let Q=C.indexOf("@");if(Q!==-1){let K=C.substr(0,Q);C=C.substr(Q+1),Q=K.lastIndexOf(":"),Q===-1?$+=P(K,!1,!1):($+=P(K.substr(0,Q),!1,!1),$+=":",$+=P(K.substr(Q+1),!1,!0)),$+="@"}C=C.toLowerCase(),Q=C.lastIndexOf(":"),Q===-1?$+=P(C,!1,!0):($+=P(C.substr(0,Q),!1,!0),$+=C.substr(Q))}if(F){if(F.length>=3&&F.charCodeAt(0)===47&&F.charCodeAt(2)===58){let Q=F.charCodeAt(1);Q>=65&&Q<=90&&(F=`/${String.fromCharCode(Q+32)}:${F.substr(3)}`)}else if(F.length>=2&&F.charCodeAt(1)===58){let Q=F.charCodeAt(0);Q>=65&&Q<=90&&(F=`${String.fromCharCode(Q+32)}:${F.substr(2)}`)}$+=P(F,!0,!1)}return U&&($+="?",$+=P(U,!1,!1)),W&&($+="#",$+=q?W:w(W,!1,!1)),$}function O(R){try{return decodeURIComponent(R)}catch{return R.length>3?R.substr(0,3)+O(R.substr(3)):R}}s.uriToFsPath=A;let L=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function B(R){return R.match(L)?R.replace(L,(q=>O(q))):R}},552:function(n,s,a){var o=this&&this.__createBinding||(Object.create?function(v,S,b,g){g===void 0&&(g=b);var k=Object.getOwnPropertyDescriptor(S,b);k&&!("get"in k?!S.__esModule:k.writable||k.configurable)||(k={enumerable:!0,get:function(){return S[b]}}),Object.defineProperty(v,g,k)}:function(v,S,b,g){g===void 0&&(g=b),v[g]=S[b]}),u=this&&this.__setModuleDefault||(Object.create?function(v,S){Object.defineProperty(v,"default",{enumerable:!0,value:S})}:function(v,S){v.default=S}),l=this&&this.__importStar||function(v){if(v&&v.__esModule)return v;var S={};if(v!=null)for(var b in v)b!=="default"&&Object.prototype.hasOwnProperty.call(v,b)&&o(S,v,b);return u(S,v),S};Object.defineProperty(s,"__esModule",{value:!0}),s.Utils=void 0;let f=l(a(975)),h=f.posix||f,p="/";var m;(function(v){v.joinPath=function(S,...b){return S.with({path:h.join(S.path,...b)})},v.resolvePath=function(S,...b){let g=S.path,k=!1;g[0]!==p&&(g=p+g,k=!0);let w=h.resolve(g,...b);return k&&w[0]===p&&!S.authority&&(w=w.substring(1)),S.with({path:w})},v.dirname=function(S){if(S.path.length===0||S.path===p)return S;let b=h.dirname(S.path);return b.length===1&&b.charCodeAt(0)===46&&(b=""),S.with({path:b})},v.basename=function(S){return h.basename(S.path)},v.extname=function(S){return h.extname(S.path)}})(m||(s.Utils=m={}))}},e={};function r(n){var s=e[n];if(s!==void 0)return s.exports;var a=e[n]={exports:{}};return t[n].call(a.exports,a,a.exports,r),a.exports}var i={};return(()=>{var n=i;Object.defineProperty(n,"__esModule",{value:!0}),n.Utils=n.URI=void 0;let s=r(231);Object.defineProperty(n,"URI",{enumerable:!0,get:function(){return s.URI}});let a=r(552);Object.defineProperty(n,"Utils",{enumerable:!0,get:function(){return a.Utils}})})(),i})()))});var Is=T(Pr=>{"use strict";y();Object.defineProperty(Pr,"__esModule",{value:!0});Pr.Utils=Pr.URI=void 0;Pr.relative=I$;Pr.join=A$;Pr.resolve=T$;Pr.normalize=Fu;Pr.dirname=E$;Pr.basename=O$;Pr.fsPath=N$;var In=Du();Object.defineProperty(Pr,"URI",{enumerable:!0,get:function(){return In.URI}});Object.defineProperty(Pr,"Utils",{enumerable:!0,get:function(){return In.Utils}});function I$(t,e){return Fu(t).replace(e,"").replace(/\\\\/g,"/").replace(/^\/+/,"")}function A$(t,...e){return Fu(In.Utils.joinPath(Ra(t),...e))}function T$(t,e){return Fu(In.Utils.resolvePath(Ra(t),e))}function Fu(t){return Ra(t).toString(!0).replace(/\\/g,"/")}function E$(t){return Fu(In.Utils.dirname(Ra(t)))}function O$(t,e){let r=In.Utils.basename(Ra(t));return e?r.replace(new RegExp(`${e.replace(/\./g,"\\.")}$`),""):r}function N$(t){return Ra(t).fsPath}function Ra(t){return In.URI.isUri(t)?t:In.URI.parse(t)}});var nv=T(Xr=>{"use strict";y();Object.defineProperty(Xr,"__esModule",{value:!0});Xr.location=Xr.JSONCParseErrors=void 0;Xr.toJSONNode=q$;var L$=Ce(),P$=(xi(),Xm(ca)),Rf=class extends Error{errors;constructor(e,r){super(e),this.errors=r}};Xr.JSONCParseErrors=Rf;function q$(t){let e=[],r=(0,P$.parseTree)(t,e,{allowTrailingComma:!0,disallowComments:!1});if(e.length||r===void 0)throw new Rf("Failed to parse JSONC",e);return Mf(r)}function Mf(t){switch(t.type){case"object":return C$(t);case"property":return M$(t);case"array":return R$(t);case"boolean":case"null":case"number":case"string":return F$(t);default:(0,L$.assertNever)(t.type)}}function C$(t){return{type:"Object",children:(t.children??[]).map(Mf),loc:(0,Xr.location)(t.offset,t.offset+t.length)}}function R$(t){return{type:"Array",children:t.children.map(Mf),loc:(0,Xr.location)(t.offset,t.offset+t.length)}}function M$(t){return{type:"Property",key:D$(t.children[0]),value:Mf(t.children[1]),loc:(0,Xr.location)(t.offset,t.offset+t.length)}}function D$(t){return{type:"Identifier",value:t.value,raw:JSON.stringify(t.value),loc:(0,Xr.location)(t.offset,t.offset+t.length)}}function F$(t){return{type:"Literal",value:t.value,raw:JSON.stringify(t.value),loc:(0,Xr.location)(t.offset,t.offset+t.length)}}var j$=(t,e)=>({start:KT(t),end:KT(e)});Xr.location=j$;var KT=t=>({offset:t})});var YT=T(QT=>{"use strict";y();Object.defineProperty(QT,"__esModule",{value:!0})});var XT=T(Df=>{"use strict";y();Object.defineProperty(Df,"__esModule",{value:!0});Df.SchemaProp=void 0;var sv=class t{options;constructor(e){this.options=e}static string(e){return new t({type:"string",defaultValue:e})}static number(e){return new t({type:"number",defaultValue:e})}static boolean(e){return new t({type:"boolean",defaultValue:e})}static object(e,r){return new t({type:"object",defaultValue:r,properties:e})}static array(e,r){return new t({type:"array",defaultValue:r,itemType:e})}optional(){return this.options.optional=!0,this}defaultValue(){return this.options.defaultValue}};Df.SchemaProp=sv});var eE=T(ZT=>{"use strict";y();Object.defineProperty(ZT,"__esModule",{value:!0})});var rE=T(tE=>{"use strict";y();Object.defineProperty(tE,"__esModule",{value:!0})});var iE=T(Ff=>{"use strict";y();Object.defineProperty(Ff,"__esModule",{value:!0});Ff.Setting=void 0;var B$=rE();Object.defineProperty(Ff,"Setting",{enumerable:!0,get:function(){return B$.Setting}})});var sE=T(rn=>{"use strict";y();var V$=rn&&rn.__createBinding||(Object.create?(function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n)}):(function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]})),$$=rn&&rn.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&V$(e,t,r)};Object.defineProperty(rn,"__esModule",{value:!0});rn.ThemeSchemaType=void 0;$$(iE(),rn);var nE;(function(t){t.AppBlock="app-block",t.Block="block",t.Section="section"})(nE||(rn.ThemeSchemaType=nE={}))});var Y=T(Oe=>{"use strict";y();var U$=Oe&&Oe.__createBinding||(Object.create?(function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n)}):(function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]})),jf=Oe&&Oe.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&U$(e,t,r)};Object.defineProperty(Oe,"__esModule",{value:!0});Oe.ConfigTarget=Oe.Severity=Oe.LiquidHtmlNodeTypes=Oe.SourceCodeType=Oe.Modes=Oe.isLiteralNode=Oe.isValueNode=Oe.isPropertyNode=Oe.isArrayNode=Oe.isObjectNode=void 0;var H$=ge();Object.defineProperty(Oe,"LiquidHtmlNodeTypes",{enumerable:!0,get:function(){return H$.NodeTypes}});jf(YT(),Oe);jf(XT(),Oe);jf(eE(),Oe);jf(sE(),Oe);var G$=t=>t?.type==="Object";Oe.isObjectNode=G$;var W$=t=>t?.type==="Array";Oe.isArrayNode=W$;var z$=t=>t?.type==="Property";Oe.isPropertyNode=z$;var J$=t=>t?.type==="Value";Oe.isValueNode=J$;var K$=t=>t?.type==="Literal";Oe.isLiteralNode=K$;Oe.Modes=["theme","app"];var aE;(function(t){t.JSON="JSON",t.LiquidHtml="LiquidHtml"})(aE||(Oe.SourceCodeType=aE={}));var oE;(function(t){t[t.ERROR=0]="ERROR",t[t.WARNING=1]="WARNING",t[t.INFO=2]="INFO"})(oE||(Oe.Severity=oE={}));var uE;(function(t){t.All="all",t.Recommended="recommended",t.ThemeAppExtension="theme-app-extension"})(uE||(Oe.ConfigTarget=uE={}))});var Bf=T(gi=>{"use strict";y();var Q$=gi&&gi.__createBinding||(Object.create?(function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n)}):(function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]})),Y$=gi&&gi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),X$=gi&&gi.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var i=[];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(i[i.length]=n);return i},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var i=t(e),n=0;n<i.length;n++)i[n]!=="default"&&Q$(r,e,i[n]);return Y$(r,e),r}})();Object.defineProperty(gi,"__esModule",{value:!0});gi.toLiquidHTMLAST=pE;gi.toJSONAST=hE;gi.toSourceCode=tU;var Z$=ge(),eU=nv(),cE=X$(Is()),lE=Y(),fE=pl();function pE(t){try{return(0,Z$.toLiquidHtmlAST)(t)}catch(e){return(0,fE.asError)(e)}}function hE(t){try{return(0,eU.toJSONNode)(t)}catch(e){return(0,fE.asError)(e)}}function tU(t,e,r){return t.endsWith(".liquid")?{uri:cE.normalize(t),source:e,type:lE.SourceCodeType.LiquidHtml,ast:pE(e),version:r}:{uri:cE.normalize(t),source:e,type:lE.SourceCodeType.JSON,ast:hE(e),version:r}}});var xt=T(wt=>{"use strict";y();var rU=wt&&wt.__createBinding||(Object.create?(function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n)}):(function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]})),iU=wt&&wt.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),nU=wt&&wt.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var i=[];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(i[i.length]=n);return i},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var i=t(e),n=0;n<i.length;n++)i[n]!=="default"&&rU(r,e,i[n]);return iU(r,e),r}})();Object.defineProperty(wt,"__esModule",{value:!0});wt.toSchema=sU;wt.isBlock=Vf;wt.isSection=ov;wt.isSnippet=aU;wt.isBlockSchema=oU;wt.isSectionSchema=uU;wt.toBlockSchema=_E;wt.toSectionSchema=vE;wt.toAppBlockSchema=bE;wt.getSchema=cU;wt.getSchemaFromJSON=lU;var av=ge(),dE=ze(),As=nU(Is()),mE=Bf(),Ma=Y(),gE=kn();async function sU(t,e,r,i,n=!0){if(r.type===Ma.SourceCodeType.LiquidHtml)switch(!0){case(t==="app"&&Vf(e)):return bE(e,r.ast,n);case(t==="theme"&&Vf(e)):return _E(e,r.ast,i,n);case(t==="theme"&&ov(e)):return vE(e,r.ast,i,n);default:return}}function Vf(t){return As.dirname(t).endsWith("blocks")}function ov(t){return As.dirname(t).endsWith("sections")}function aU(t){return As.dirname(t).endsWith("snippets")}function oU(t){return t?.type===Ma.ThemeSchemaType.Block}function uU(t){return t?.type===Ma.ThemeSchemaType.Section}async function yE(t,e,r,i){return i?e instanceof Error||await i(t,e.body.value)?r:new Error("Invalid schema"):new Error("No JSON validator provided")}async function _E(t,e,r,i){let n=As.basename(t,".liquid"),s=uv(e),a=SE(e),o=cv(s,i),u=lv(s);return{type:Ma.ThemeSchemaType.Block,validSchema:await yE(t,s,o,r),offset:s instanceof Error?0:s.blockStartPosition.end,name:n,parsed:o,ast:u,value:s instanceof Error?"":s.body.value,staticBlockDefs:a}}async function vE(t,e,r,i){let n=As.basename(t,".liquid"),s=uv(e),a=SE(e),o=cv(s,i),u=lv(s);return{type:Ma.ThemeSchemaType.Section,validSchema:await yE(t,s,o,r),offset:s instanceof Error?0:s.blockStartPosition.end,name:n,parsed:o,ast:u,value:s instanceof Error?"":s.body.value,staticBlockDefs:a}}async function bE(t,e,r){let i=As.basename(t,".liquid"),n=uv(e),s=cv(n,r),a=lv(n);return{type:Ma.ThemeSchemaType.AppBlock,offset:n instanceof Error?0:n.blockStartPosition.end,name:i,parsed:s,ast:a,value:n instanceof Error?"":n.body.value}}function uv(t){return t instanceof Error?t:(0,gE.visit)(t,{LiquidRawTag(e){if(e.name==="schema")return e}})[0]??new Error("No schema tag found")}function SE(t){return t instanceof Error?[]:(0,gE.visit)(t,{LiquidTag(e){if(e.name!==av.NamedTags.content_for||typeof e.markup=="string")return;let r=e.markup;if(r.contentForType.value!=="block")return;let i=r.args.find(s=>s.name==="type"),n=r.args.find(s=>s.name==="id");if(!(!i||!n)&&i.value.type===av.NodeTypes.String&&n.value.type===av.NodeTypes.String)return{type:i.value.value,id:n.value.value}}})}function cU(t){let e=As.basename(t.file.uri,".liquid");switch(!0){case Vf(t.file.uri):return t.getBlockSchema?.(e);case ov(t.file.uri):return t.getSectionSchema?.(e);default:return}}async function lU(t){let e=t.file.source,r=(0,dE.parseJSON)(e),i=(0,mE.toJSONAST)(e);return{parsed:r,ast:i}}function cv(t,e){return t instanceof Error?t:(0,dE.parseJSON)(t.body.value,void 0,e)}function lv(t){return t instanceof Error?t:(0,mE.toJSONAST)(t.body.value)}});var $f=T(ju=>{"use strict";y();Object.defineProperty(ju,"__esModule",{value:!0});ju.getAncestorUris=fU;ju.getAllSnippetDescendantUris=pU;ju.getRenderedSnippetUris=hU;var wE=xt();async function fU(t,e){let r=[],i=new Set,n=[t];for(;n.length>0;){let s=n.shift();if(i.has(s))continue;i.add(s);let a=await e(s);for(let o of a)o.type==="direct"&&!i.has(o.source.uri)&&(r.push(o.source.uri),n.push(o.source.uri))}return r}async function pU(t,e){let r=[],i=new Set,n=[...t];for(;n.length>0;){let s=n.shift();if(i.has(s))continue;i.add(s),r.push(s);let a=await e(s);for(let o of a)o.type==="direct"&&(0,wE.isSnippet)(o.target.uri)&&!i.has(o.target.uri)&&n.push(o.target.uri)}return r}async function hU(t,e){return(await e(t)).filter(i=>i.type==="direct"&&(0,wE.isSnippet)(i.target.uri)).map(i=>i.target.uri)}});var Ce=T(tr=>{"use strict";y();var dU=tr&&tr.__createBinding||(Object.create?(function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n)}):(function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]})),Ni=tr&&tr.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&dU(e,t,r)};Object.defineProperty(tr,"__esModule",{value:!0});Ni(eg(),tr);Ni(kw(),tr);Ni(Ow(),tr);Ni(pl(),tr);Ni(ng(),tr);Ni(ag(),tr);Ni(ug(),tr);Ni(Kw(),tr);Ni(Cf(),tr);Ni($f(),tr)});var pv=T(Uf=>{"use strict";y();Object.defineProperty(Uf,"__esModule",{value:!0});Uf.AugmentedThemeDocset=void 0;var Bu=Ce(),xE=t=>({name:t}),mU=[["camelcase","camelize"],["handle","handleize"],["t","translate"]],gU=t=>([e,r])=>{let i=t.find(n=>n.name===r);return i?{...i,name:e}:xE(e)},yU=["_online_store_editor_live_setting","addresses_url","app_block_path?","app_block_path_for","app_extension_path?","app_snippet_path?","cancel_customer_order_link","debug","delete_customer_address_link","dev_shop?","distance_from","edit_customer_address_link","encode_url_component","excerpt","format_code","global_block_type?","h","handle_from","installments_pricing","link_to_theme","login_button","login_url","logout_url","pad_spaces","paragraphize","recover_password_link","recover_url","register_url","registration_uuid_from","root_account_url","sentence","theme_url","unit","weight"],_U=["locale","direction","skip_to_content_link","checkout_html_classes","checkout_stylesheets","checkout_scripts","content_for_logo","breadcrumb","order_summary_toggle","content_for_order_summary","alternative_payment_methods","content_for_footer","tracking_code"],kE=(t,e,r)=>({name:t,...e&&{access:e},...r&&{return_type:r}}),vU=["customer_address","product_variant"],bU=_U.map(t=>kE(t,{global:!1,parents:[],template:[]},[{type:"string",name:""}])),SU=t=>({name:t}),wU=["elsif","ifchanged","when","schema"],fv=class{themeDocset;constructor(e){this.themeDocset=e}isAugmented=!0;filters=(0,Bu.memo)(async()=>{let e=await this.themeDocset.filters();return[...e,...mU.map(gU(e)),...yU.map(xE)]});objects=(0,Bu.memo)(async()=>[...await this.themeDocset.objects(),...vU.map(e=>kE(e)),...bU]);liquidDrops=(0,Bu.memo)(async()=>(await this.themeDocset.objects()).filter(e=>e.access?e.deprecated?!1:!e.access.global||e.access.global&&e.access.parents.length>0:!0));tags=(0,Bu.memo)(async()=>[...await this.themeDocset.tags(),...wU.map(SU)]);systemTranslations=(0,Bu.memo)(async()=>this.themeDocset.systemTranslations())};Uf.AugmentedThemeDocset=fv});function Ts(t,e){if(t===e)return!0;if(t==null||e===null||e===void 0||typeof t!=typeof e||typeof t!="object"||Array.isArray(t)!==Array.isArray(e))return!1;let r,i;if(Array.isArray(t)){if(t.length!==e.length)return!1;for(r=0;r<t.length;r++)if(!Ts(t[r],e[r]))return!1}else{let n=[];for(i in t)n.push(i);n.sort();let s=[];for(i in e)s.push(i);if(s.sort(),!Ts(n,s))return!1;for(r=0;r<n.length;r++)if(!Ts(t[n[r]],e[n[r]]))return!1}return!0}function Vt(t){return typeof t=="number"}function qr(t){return typeof t<"u"}function Zr(t){return typeof t=="boolean"}function Hf(t){return typeof t=="string"}function Li(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}var Vu=Ae(()=>{y()});function xU(t,e){if(t.length<e.length)return!1;for(let r=0;r<e.length;r++)if(t[r]!==e[r])return!1;return!0}function An(t,e){let r=t.length-e.length;return r>0?t.lastIndexOf(e)===r:r===0?t===e:!1}function Es(t){let e="";xU(t,"(?i)")&&(t=t.substring(4),e="i");try{return new RegExp(t,e+"u")}catch{try{return new RegExp(t,e)}catch{return}}}function hv(t){let e=0;for(let r=0;r<t.length;r++){e++;let i=t.charCodeAt(r);55296<=i&&i<=56319&&r++}return e}var $u=Ae(()=>{y()});var Gf,dv,AE,Wf,Me,oe,nn,TE,Uu,zf,Jf,Tn,Kf,mv,$t,EE,OE,Cr,En,rr,gv,Da,NE,Hu,yv,_v,vv,Gu,LE,Qf,bv,PE,Pi,Os,Ut,Ke,Yf,qE,CE,RE,Fa,Xf,ja,Zf,ME,DE,ep,tp,Rr,FE,rp,jE,ip,np,sp,ap,op,BE,VE,up,Ns,$E,UE,HE,GE,WE,zE,JE,Sv,wv,KE,QE,YE,XE,ZE,eO,tO,rO,iO,xv,D,kv=Ae(()=>{"use strict";y();(function(t){function e(r){return typeof r=="string"}t.is=e})(Gf||(Gf={}));(function(t){function e(r){return typeof r=="string"}t.is=e})(dv||(dv={}));(function(t){t.MIN_VALUE=-2147483648,t.MAX_VALUE=2147483647;function e(r){return typeof r=="number"&&t.MIN_VALUE<=r&&r<=t.MAX_VALUE}t.is=e})(AE||(AE={}));(function(t){t.MIN_VALUE=0,t.MAX_VALUE=2147483647;function e(r){return typeof r=="number"&&t.MIN_VALUE<=r&&r<=t.MAX_VALUE}t.is=e})(Wf||(Wf={}));(function(t){function e(i,n){return i===Number.MAX_VALUE&&(i=Wf.MAX_VALUE),n===Number.MAX_VALUE&&(n=Wf.MAX_VALUE),{line:i,character:n}}t.create=e;function r(i){let n=i;return D.objectLiteral(n)&&D.uinteger(n.line)&&D.uinteger(n.character)}t.is=r})(Me||(Me={}));(function(t){function e(i,n,s,a){if(D.uinteger(i)&&D.uinteger(n)&&D.uinteger(s)&&D.uinteger(a))return{start:Me.create(i,n),end:Me.create(s,a)};if(Me.is(i)&&Me.is(n))return{start:i,end:n};throw new Error(`Range#create called with invalid arguments[${i}, ${n}, ${s}, ${a}]`)}t.create=e;function r(i){let n=i;return D.objectLiteral(n)&&Me.is(n.start)&&Me.is(n.end)}t.is=r})(oe||(oe={}));(function(t){function e(i,n){return{uri:i,range:n}}t.create=e;function r(i){let n=i;return D.objectLiteral(n)&&oe.is(n.range)&&(D.string(n.uri)||D.undefined(n.uri))}t.is=r})(nn||(nn={}));(function(t){function e(i,n,s,a){return{targetUri:i,targetRange:n,targetSelectionRange:s,originSelectionRange:a}}t.create=e;function r(i){let n=i;return D.objectLiteral(n)&&oe.is(n.targetRange)&&D.string(n.targetUri)&&oe.is(n.targetSelectionRange)&&(oe.is(n.originSelectionRange)||D.undefined(n.originSelectionRange))}t.is=r})(TE||(TE={}));(function(t){function e(i,n,s,a){return{red:i,green:n,blue:s,alpha:a}}t.create=e;function r(i){let n=i;return D.objectLiteral(n)&&D.numberRange(n.red,0,1)&&D.numberRange(n.green,0,1)&&D.numberRange(n.blue,0,1)&&D.numberRange(n.alpha,0,1)}t.is=r})(Uu||(Uu={}));(function(t){function e(i,n){return{range:i,color:n}}t.create=e;function r(i){let n=i;return D.objectLiteral(n)&&oe.is(n.range)&&Uu.is(n.color)}t.is=r})(zf||(zf={}));(function(t){function e(i,n,s){return{label:i,textEdit:n,additionalTextEdits:s}}t.create=e;function r(i){let n=i;return D.objectLiteral(n)&&D.string(n.label)&&(D.undefined(n.textEdit)||rr.is(n))&&(D.undefined(n.additionalTextEdits)||D.typedArray(n.additionalTextEdits,rr.is))}t.is=r})(Jf||(Jf={}));(function(t){t.Comment="comment",t.Imports="imports",t.Region="region"})(Tn||(Tn={}));(function(t){function e(i,n,s,a,o,u){let l={startLine:i,endLine:n};return D.defined(s)&&(l.startCharacter=s),D.defined(a)&&(l.endCharacter=a),D.defined(o)&&(l.kind=o),D.defined(u)&&(l.collapsedText=u),l}t.create=e;function r(i){let n=i;return D.objectLiteral(n)&&D.uinteger(n.startLine)&&D.uinteger(n.startLine)&&(D.undefined(n.startCharacter)||D.uinteger(n.startCharacter))&&(D.undefined(n.endCharacter)||D.uinteger(n.endCharacter))&&(D.undefined(n.kind)||D.string(n.kind))}t.is=r})(Kf||(Kf={}));(function(t){function e(i,n){return{location:i,message:n}}t.create=e;function r(i){let n=i;return D.defined(n)&&nn.is(n.location)&&D.string(n.message)}t.is=r})(mv||(mv={}));(function(t){t.Error=1,t.Warning=2,t.Information=3,t.Hint=4})($t||($t={}));(function(t){t.Unnecessary=1,t.Deprecated=2})(EE||(EE={}));(function(t){function e(r){let i=r;return D.objectLiteral(i)&&D.string(i.href)}t.is=e})(OE||(OE={}));(function(t){function e(i,n,s,a,o,u){let l={range:i,message:n};return D.defined(s)&&(l.severity=s),D.defined(a)&&(l.code=a),D.defined(o)&&(l.source=o),D.defined(u)&&(l.relatedInformation=u),l}t.create=e;function r(i){var n;let s=i;return D.defined(s)&&oe.is(s.range)&&D.string(s.message)&&(D.number(s.severity)||D.undefined(s.severity))&&(D.integer(s.code)||D.string(s.code)||D.undefined(s.code))&&(D.undefined(s.codeDescription)||D.string((n=s.codeDescription)===null||n===void 0?void 0:n.href))&&(D.string(s.source)||D.undefined(s.source))&&(D.undefined(s.relatedInformation)||D.typedArray(s.relatedInformation,mv.is))}t.is=r})(Cr||(Cr={}));(function(t){function e(i,n,...s){let a={title:i,command:n};return D.defined(s)&&s.length>0&&(a.arguments=s),a}t.create=e;function r(i){let n=i;return D.defined(n)&&D.string(n.title)&&D.string(n.command)}t.is=r})(En||(En={}));(function(t){function e(s,a){return{range:s,newText:a}}t.replace=e;function r(s,a){return{range:{start:s,end:s},newText:a}}t.insert=r;function i(s){return{range:s,newText:""}}t.del=i;function n(s){let a=s;return D.objectLiteral(a)&&D.string(a.newText)&&oe.is(a.range)}t.is=n})(rr||(rr={}));(function(t){function e(i,n,s){let a={label:i};return n!==void 0&&(a.needsConfirmation=n),s!==void 0&&(a.description=s),a}t.create=e;function r(i){let n=i;return D.objectLiteral(n)&&D.string(n.label)&&(D.boolean(n.needsConfirmation)||n.needsConfirmation===void 0)&&(D.string(n.description)||n.description===void 0)}t.is=r})(gv||(gv={}));(function(t){function e(r){let i=r;return D.string(i)}t.is=e})(Da||(Da={}));(function(t){function e(s,a,o){return{range:s,newText:a,annotationId:o}}t.replace=e;function r(s,a,o){return{range:{start:s,end:s},newText:a,annotationId:o}}t.insert=r;function i(s,a){return{range:s,newText:"",annotationId:a}}t.del=i;function n(s){let a=s;return rr.is(a)&&(gv.is(a.annotationId)||Da.is(a.annotationId))}t.is=n})(NE||(NE={}));(function(t){function e(i,n){return{textDocument:i,edits:n}}t.create=e;function r(i){let n=i;return D.defined(n)&&bv.is(n.textDocument)&&Array.isArray(n.edits)}t.is=r})(Hu||(Hu={}));(function(t){function e(i,n,s){let a={kind:"create",uri:i};return n!==void 0&&(n.overwrite!==void 0||n.ignoreIfExists!==void 0)&&(a.options=n),s!==void 0&&(a.annotationId=s),a}t.create=e;function r(i){let n=i;return n&&n.kind==="create"&&D.string(n.uri)&&(n.options===void 0||(n.options.overwrite===void 0||D.boolean(n.options.overwrite))&&(n.options.ignoreIfExists===void 0||D.boolean(n.options.ignoreIfExists)))&&(n.annotationId===void 0||Da.is(n.annotationId))}t.is=r})(yv||(yv={}));(function(t){function e(i,n,s,a){let o={kind:"rename",oldUri:i,newUri:n};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(o.options=s),a!==void 0&&(o.annotationId=a),o}t.create=e;function r(i){let n=i;return n&&n.kind==="rename"&&D.string(n.oldUri)&&D.string(n.newUri)&&(n.options===void 0||(n.options.overwrite===void 0||D.boolean(n.options.overwrite))&&(n.options.ignoreIfExists===void 0||D.boolean(n.options.ignoreIfExists)))&&(n.annotationId===void 0||Da.is(n.annotationId))}t.is=r})(_v||(_v={}));(function(t){function e(i,n,s){let a={kind:"delete",uri:i};return n!==void 0&&(n.recursive!==void 0||n.ignoreIfNotExists!==void 0)&&(a.options=n),s!==void 0&&(a.annotationId=s),a}t.create=e;function r(i){let n=i;return n&&n.kind==="delete"&&D.string(n.uri)&&(n.options===void 0||(n.options.recursive===void 0||D.boolean(n.options.recursive))&&(n.options.ignoreIfNotExists===void 0||D.boolean(n.options.ignoreIfNotExists)))&&(n.annotationId===void 0||Da.is(n.annotationId))}t.is=r})(vv||(vv={}));(function(t){function e(r){let i=r;return i&&(i.changes!==void 0||i.documentChanges!==void 0)&&(i.documentChanges===void 0||i.documentChanges.every(n=>D.string(n.kind)?yv.is(n)||_v.is(n)||vv.is(n):Hu.is(n)))}t.is=e})(Gu||(Gu={}));(function(t){function e(i){return{uri:i}}t.create=e;function r(i){let n=i;return D.defined(n)&&D.string(n.uri)}t.is=r})(LE||(LE={}));(function(t){function e(i,n){return{uri:i,version:n}}t.create=e;function r(i){let n=i;return D.defined(n)&&D.string(n.uri)&&D.integer(n.version)}t.is=r})(Qf||(Qf={}));(function(t){function e(i,n){return{uri:i,version:n}}t.create=e;function r(i){let n=i;return D.defined(n)&&D.string(n.uri)&&(n.version===null||D.integer(n.version))}t.is=r})(bv||(bv={}));(function(t){function e(i,n,s,a){return{uri:i,languageId:n,version:s,text:a}}t.create=e;function r(i){let n=i;return D.defined(n)&&D.string(n.uri)&&D.string(n.languageId)&&D.integer(n.version)&&D.string(n.text)}t.is=r})(PE||(PE={}));(function(t){t.PlainText="plaintext",t.Markdown="markdown";function e(r){let i=r;return i===t.PlainText||i===t.Markdown}t.is=e})(Pi||(Pi={}));(function(t){function e(r){let i=r;return D.objectLiteral(r)&&Pi.is(i.kind)&&D.string(i.value)}t.is=e})(Os||(Os={}));(function(t){t.Text=1,t.Method=2,t.Function=3,t.Constructor=4,t.Field=5,t.Variable=6,t.Class=7,t.Interface=8,t.Module=9,t.Property=10,t.Unit=11,t.Value=12,t.Enum=13,t.Keyword=14,t.Snippet=15,t.Color=16,t.File=17,t.Reference=18,t.Folder=19,t.EnumMember=20,t.Constant=21,t.Struct=22,t.Event=23,t.Operator=24,t.TypeParameter=25})(Ut||(Ut={}));(function(t){t.PlainText=1,t.Snippet=2})(Ke||(Ke={}));(function(t){t.Deprecated=1})(Yf||(Yf={}));(function(t){function e(i,n,s){return{newText:i,insert:n,replace:s}}t.create=e;function r(i){let n=i;return n&&D.string(n.newText)&&oe.is(n.insert)&&oe.is(n.replace)}t.is=r})(qE||(qE={}));(function(t){t.asIs=1,t.adjustIndentation=2})(CE||(CE={}));(function(t){function e(r){let i=r;return i&&(D.string(i.detail)||i.detail===void 0)&&(D.string(i.description)||i.description===void 0)}t.is=e})(RE||(RE={}));(function(t){function e(r){return{label:r}}t.create=e})(Fa||(Fa={}));(function(t){function e(r,i){return{items:r||[],isIncomplete:!!i}}t.create=e})(Xf||(Xf={}));(function(t){function e(i){return i.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}t.fromPlainText=e;function r(i){let n=i;return D.string(n)||D.objectLiteral(n)&&D.string(n.language)&&D.string(n.value)}t.is=r})(ja||(ja={}));(function(t){function e(r){let i=r;return!!i&&D.objectLiteral(i)&&(Os.is(i.contents)||ja.is(i.contents)||D.typedArray(i.contents,ja.is))&&(r.range===void 0||oe.is(r.range))}t.is=e})(Zf||(Zf={}));(function(t){function e(r,i){return i?{label:r,documentation:i}:{label:r}}t.create=e})(ME||(ME={}));(function(t){function e(r,i,...n){let s={label:r};return D.defined(i)&&(s.documentation=i),D.defined(n)?s.parameters=n:s.parameters=[],s}t.create=e})(DE||(DE={}));(function(t){t.Text=1,t.Read=2,t.Write=3})(ep||(ep={}));(function(t){function e(r,i){let n={range:r};return D.number(i)&&(n.kind=i),n}t.create=e})(tp||(tp={}));(function(t){t.File=1,t.Module=2,t.Namespace=3,t.Package=4,t.Class=5,t.Method=6,t.Property=7,t.Field=8,t.Constructor=9,t.Enum=10,t.Interface=11,t.Function=12,t.Variable=13,t.Constant=14,t.String=15,t.Number=16,t.Boolean=17,t.Array=18,t.Object=19,t.Key=20,t.Null=21,t.EnumMember=22,t.Struct=23,t.Event=24,t.Operator=25,t.TypeParameter=26})(Rr||(Rr={}));(function(t){t.Deprecated=1})(FE||(FE={}));(function(t){function e(r,i,n,s,a){let o={name:r,kind:i,location:{uri:s,range:n}};return a&&(o.containerName=a),o}t.create=e})(rp||(rp={}));(function(t){function e(r,i,n,s){return s!==void 0?{name:r,kind:i,location:{uri:n,range:s}}:{name:r,kind:i,location:{uri:n}}}t.create=e})(jE||(jE={}));(function(t){function e(i,n,s,a,o,u){let l={name:i,detail:n,kind:s,range:a,selectionRange:o};return u!==void 0&&(l.children=u),l}t.create=e;function r(i){let n=i;return n&&D.string(n.name)&&D.number(n.kind)&&oe.is(n.range)&&oe.is(n.selectionRange)&&(n.detail===void 0||D.string(n.detail))&&(n.deprecated===void 0||D.boolean(n.deprecated))&&(n.children===void 0||Array.isArray(n.children))&&(n.tags===void 0||Array.isArray(n.tags))}t.is=r})(ip||(ip={}));(function(t){t.Empty="",t.QuickFix="quickfix",t.Refactor="refactor",t.RefactorExtract="refactor.extract",t.RefactorInline="refactor.inline",t.RefactorRewrite="refactor.rewrite",t.Source="source",t.SourceOrganizeImports="source.organizeImports",t.SourceFixAll="source.fixAll"})(np||(np={}));(function(t){t.Invoked=1,t.Automatic=2})(sp||(sp={}));(function(t){function e(i,n,s){let a={diagnostics:i};return n!=null&&(a.only=n),s!=null&&(a.triggerKind=s),a}t.create=e;function r(i){let n=i;return D.defined(n)&&D.typedArray(n.diagnostics,Cr.is)&&(n.only===void 0||D.typedArray(n.only,D.string))&&(n.triggerKind===void 0||n.triggerKind===sp.Invoked||n.triggerKind===sp.Automatic)}t.is=r})(ap||(ap={}));(function(t){function e(i,n,s){let a={title:i},o=!0;return typeof n=="string"?(o=!1,a.kind=n):En.is(n)?a.command=n:a.edit=n,o&&s!==void 0&&(a.kind=s),a}t.create=e;function r(i){let n=i;return n&&D.string(n.title)&&(n.diagnostics===void 0||D.typedArray(n.diagnostics,Cr.is))&&(n.kind===void 0||D.string(n.kind))&&(n.edit!==void 0||n.command!==void 0)&&(n.command===void 0||En.is(n.command))&&(n.isPreferred===void 0||D.boolean(n.isPreferred))&&(n.edit===void 0||Gu.is(n.edit))}t.is=r})(op||(op={}));(function(t){function e(i,n){let s={range:i};return D.defined(n)&&(s.data=n),s}t.create=e;function r(i){let n=i;return D.defined(n)&&oe.is(n.range)&&(D.undefined(n.command)||En.is(n.command))}t.is=r})(BE||(BE={}));(function(t){function e(i,n){return{tabSize:i,insertSpaces:n}}t.create=e;function r(i){let n=i;return D.defined(n)&&D.uinteger(n.tabSize)&&D.boolean(n.insertSpaces)}t.is=r})(VE||(VE={}));(function(t){function e(i,n,s){return{range:i,target:n,data:s}}t.create=e;function r(i){let n=i;return D.defined(n)&&oe.is(n.range)&&(D.undefined(n.target)||D.string(n.target))}t.is=r})(up||(up={}));(function(t){function e(i,n){return{range:i,parent:n}}t.create=e;function r(i){let n=i;return D.objectLiteral(n)&&oe.is(n.range)&&(n.parent===void 0||t.is(n.parent))}t.is=r})(Ns||(Ns={}));(function(t){t.namespace="namespace",t.type="type",t.class="class",t.enum="enum",t.interface="interface",t.struct="struct",t.typeParameter="typeParameter",t.parameter="parameter",t.variable="variable",t.property="property",t.enumMember="enumMember",t.event="event",t.function="function",t.method="method",t.macro="macro",t.keyword="keyword",t.modifier="modifier",t.comment="comment",t.string="string",t.number="number",t.regexp="regexp",t.operator="operator",t.decorator="decorator"})($E||($E={}));(function(t){t.declaration="declaration",t.definition="definition",t.readonly="readonly",t.static="static",t.deprecated="deprecated",t.abstract="abstract",t.async="async",t.modification="modification",t.documentation="documentation",t.defaultLibrary="defaultLibrary"})(UE||(UE={}));(function(t){function e(r){let i=r;return D.objectLiteral(i)&&(i.resultId===void 0||typeof i.resultId=="string")&&Array.isArray(i.data)&&(i.data.length===0||typeof i.data[0]=="number")}t.is=e})(HE||(HE={}));(function(t){function e(i,n){return{range:i,text:n}}t.create=e;function r(i){let n=i;return n!=null&&oe.is(n.range)&&D.string(n.text)}t.is=r})(GE||(GE={}));(function(t){function e(i,n,s){return{range:i,variableName:n,caseSensitiveLookup:s}}t.create=e;function r(i){let n=i;return n!=null&&oe.is(n.range)&&D.boolean(n.caseSensitiveLookup)&&(D.string(n.variableName)||n.variableName===void 0)}t.is=r})(WE||(WE={}));(function(t){function e(i,n){return{range:i,expression:n}}t.create=e;function r(i){let n=i;return n!=null&&oe.is(n.range)&&(D.string(n.expression)||n.expression===void 0)}t.is=r})(zE||(zE={}));(function(t){function e(i,n){return{frameId:i,stoppedLocation:n}}t.create=e;function r(i){let n=i;return D.defined(n)&&oe.is(i.stoppedLocation)}t.is=r})(JE||(JE={}));(function(t){t.Type=1,t.Parameter=2;function e(r){return r===1||r===2}t.is=e})(Sv||(Sv={}));(function(t){function e(i){return{value:i}}t.create=e;function r(i){let n=i;return D.objectLiteral(n)&&(n.tooltip===void 0||D.string(n.tooltip)||Os.is(n.tooltip))&&(n.location===void 0||nn.is(n.location))&&(n.command===void 0||En.is(n.command))}t.is=r})(wv||(wv={}));(function(t){function e(i,n,s){let a={position:i,label:n};return s!==void 0&&(a.kind=s),a}t.create=e;function r(i){let n=i;return D.objectLiteral(n)&&Me.is(n.position)&&(D.string(n.label)||D.typedArray(n.label,wv.is))&&(n.kind===void 0||Sv.is(n.kind))&&n.textEdits===void 0||D.typedArray(n.textEdits,rr.is)&&(n.tooltip===void 0||D.string(n.tooltip)||Os.is(n.tooltip))&&(n.paddingLeft===void 0||D.boolean(n.paddingLeft))&&(n.paddingRight===void 0||D.boolean(n.paddingRight))}t.is=r})(KE||(KE={}));(function(t){function e(r){return{kind:"snippet",value:r}}t.createSnippet=e})(QE||(QE={}));(function(t){function e(r,i,n,s){return{insertText:r,filterText:i,range:n,command:s}}t.create=e})(YE||(YE={}));(function(t){function e(r){return{items:r}}t.create=e})(XE||(XE={}));(function(t){t.Invoked=0,t.Automatic=1})(ZE||(ZE={}));(function(t){function e(r,i){return{range:r,text:i}}t.create=e})(eO||(eO={}));(function(t){function e(r,i){return{triggerKind:r,selectedCompletionInfo:i}}t.create=e})(tO||(tO={}));(function(t){function e(r){let i=r;return D.objectLiteral(i)&&dv.is(i.uri)&&D.string(i.name)}t.is=e})(rO||(rO={}));(function(t){function e(s,a,o,u){return new xv(s,a,o,u)}t.create=e;function r(s){let a=s;return!!(D.defined(a)&&D.string(a.uri)&&(D.undefined(a.languageId)||D.string(a.languageId))&&D.uinteger(a.lineCount)&&D.func(a.getText)&&D.func(a.positionAt)&&D.func(a.offsetAt))}t.is=r;function i(s,a){let o=s.getText(),u=n(a,(f,h)=>{let p=f.range.start.line-h.range.start.line;return p===0?f.range.start.character-h.range.start.character:p}),l=o.length;for(let f=u.length-1;f>=0;f--){let h=u[f],p=s.offsetAt(h.range.start),m=s.offsetAt(h.range.end);if(m<=l)o=o.substring(0,p)+h.newText+o.substring(m,o.length);else throw new Error("Overlapping edit");l=p}return o}t.applyEdits=i;function n(s,a){if(s.length<=1)return s;let o=s.length/2|0,u=s.slice(0,o),l=s.slice(o);n(u,a),n(l,a);let f=0,h=0,p=0;for(;f<u.length&&h<l.length;)a(u[f],l[h])<=0?s[p++]=u[f++]:s[p++]=l[h++];for(;f<u.length;)s[p++]=u[f++];for(;h<l.length;)s[p++]=l[h++];return s}})(iO||(iO={}));xv=class{constructor(e,r,i,n){this._uri=e,this._languageId=r,this._version=i,this._content=n,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let r=this.offsetAt(e.start),i=this.offsetAt(e.end);return this._content.substring(r,i)}return this._content}update(e,r){this._content=e.text,this._version=r,this._lineOffsets=void 0}getLineOffsets(){if(this._lineOffsets===void 0){let e=[],r=this._content,i=!0;for(let n=0;n<r.length;n++){i&&(e.push(n),i=!1);let s=r.charAt(n);i=s==="\r"||s===`
|
|
1180
|
+
`,s==="\r"&&n+1<r.length&&r.charAt(n+1)===`
|
|
1181
|
+
`&&n++}i&&r.length>0&&e.push(r.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let r=this.getLineOffsets(),i=0,n=r.length;if(n===0)return Me.create(0,e);for(;i<n;){let a=Math.floor((i+n)/2);r[a]>e?n=a:i=a+1}let s=i-1;return Me.create(s,e-r[s])}offsetAt(e){let r=this.getLineOffsets();if(e.line>=r.length)return this._content.length;if(e.line<0)return 0;let i=r[e.line],n=e.line+1<r.length?r[e.line+1]:this._content.length;return Math.max(Math.min(i+e.character,n),i)}get lineCount(){return this.getLineOffsets().length}};(function(t){let e=Object.prototype.toString;function r(m){return typeof m<"u"}t.defined=r;function i(m){return typeof m>"u"}t.undefined=i;function n(m){return m===!0||m===!1}t.boolean=n;function s(m){return e.call(m)==="[object String]"}t.string=s;function a(m){return e.call(m)==="[object Number]"}t.number=a;function o(m,v,S){return e.call(m)==="[object Number]"&&v<=m&&m<=S}t.numberRange=o;function u(m){return e.call(m)==="[object Number]"&&-2147483648<=m&&m<=2147483647}t.integer=u;function l(m){return e.call(m)==="[object Number]"&&0<=m&&m<=2147483647}t.uinteger=l;function f(m){return e.call(m)==="[object Function]"}t.func=f;function h(m){return m!==null&&typeof m=="object"}t.objectLiteral=h;function p(m,v){return Array.isArray(m)&&m.every(v)}t.typedArray=p})(D||(D={}))});var IU={};Ym(IU,{TextDocument:()=>kr});function Iv(t,e){if(t.length<=1)return t;let r=t.length/2|0,i=t.slice(0,r),n=t.slice(r);Iv(i,e),Iv(n,e);let s=0,a=0,o=0;for(;s<i.length&&a<n.length;)e(i[s],n[a])<=0?t[o++]=i[s++]:t[o++]=n[a++];for(;s<i.length;)t[o++]=i[s++];for(;a<n.length;)t[o++]=n[a++];return t}function nO(t,e,r=0){let i=e?[r]:[];for(let n=0;n<t.length;n++){let s=t.charCodeAt(n);sO(s)&&(s===13&&n+1<t.length&&t.charCodeAt(n+1)===10&&n++,i.push(r+n+1))}return i}function sO(t){return t===13||t===10}function aO(t){let e=t.start,r=t.end;return e.line>r.line||e.line===r.line&&e.character>r.character?{start:r,end:e}:t}function kU(t){let e=aO(t.range);return e!==t.range?{newText:t.newText,range:e}:t}var cp,kr,oO=Ae(()=>{"use strict";y();cp=class t{constructor(e,r,i,n){this._uri=e,this._languageId=r,this._version=i,this._content=n,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let r=this.offsetAt(e.start),i=this.offsetAt(e.end);return this._content.substring(r,i)}return this._content}update(e,r){for(let i of e)if(t.isIncremental(i)){let n=aO(i.range),s=this.offsetAt(n.start),a=this.offsetAt(n.end);this._content=this._content.substring(0,s)+i.text+this._content.substring(a,this._content.length);let o=Math.max(n.start.line,0),u=Math.max(n.end.line,0),l=this._lineOffsets,f=nO(i.text,!1,s);if(u-o===f.length)for(let p=0,m=f.length;p<m;p++)l[p+o+1]=f[p];else f.length<1e4?l.splice(o+1,u-o,...f):this._lineOffsets=l=l.slice(0,o+1).concat(f,l.slice(u+1));let h=i.text.length-(a-s);if(h!==0)for(let p=o+1+f.length,m=l.length;p<m;p++)l[p]=l[p]+h}else if(t.isFull(i))this._content=i.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received");this._version=r}getLineOffsets(){return this._lineOffsets===void 0&&(this._lineOffsets=nO(this._content,!0)),this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let r=this.getLineOffsets(),i=0,n=r.length;if(n===0)return{line:0,character:e};for(;i<n;){let a=Math.floor((i+n)/2);r[a]>e?n=a:i=a+1}let s=i-1;return e=this.ensureBeforeEOL(e,r[s]),{line:s,character:e-r[s]}}offsetAt(e){let r=this.getLineOffsets();if(e.line>=r.length)return this._content.length;if(e.line<0)return 0;let i=r[e.line];if(e.character<=0)return i;let n=e.line+1<r.length?r[e.line+1]:this._content.length,s=Math.min(i+e.character,n);return this.ensureBeforeEOL(s,i)}ensureBeforeEOL(e,r){for(;e>r&&sO(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){let r=e;return r!=null&&typeof r.text=="string"&&r.range!==void 0&&(r.rangeLength===void 0||typeof r.rangeLength=="number")}static isFull(e){let r=e;return r!=null&&typeof r.text=="string"&&r.range===void 0&&r.rangeLength===void 0}};(function(t){function e(n,s,a,o){return new cp(n,s,a,o)}t.create=e;function r(n,s,a){if(n instanceof cp)return n.update(s,a),n;throw new Error("TextDocument.update: document must be created by TextDocument.create")}t.update=r;function i(n,s){let a=n.getText(),o=Iv(s.map(kU),(f,h)=>{let p=f.range.start.line-h.range.start.line;return p===0?f.range.start.character-h.range.start.character:p}),u=0,l=[];for(let f of o){let h=n.offsetAt(f.range.start);if(h<u)throw new Error("Overlapping edit");h>u&&l.push(a.substring(u,h)),f.newText.length&&l.push(f.newText),u=n.offsetAt(f.range.end)}return l.push(a.substr(u)),l.join("")}t.applyEdits=i})(kr||(kr={}))});function AU(t){return t>=ce.SchemaResolveError}var ce,cr,Av,Mr=Ae(()=>{y();kv();oO();(function(t){t[t.Undefined=0]="Undefined",t[t.EnumValueMismatch=1]="EnumValueMismatch",t[t.Deprecated=2]="Deprecated",t[t.UnexpectedEndOfComment=257]="UnexpectedEndOfComment",t[t.UnexpectedEndOfString=258]="UnexpectedEndOfString",t[t.UnexpectedEndOfNumber=259]="UnexpectedEndOfNumber",t[t.InvalidUnicode=260]="InvalidUnicode",t[t.InvalidEscapeCharacter=261]="InvalidEscapeCharacter",t[t.InvalidCharacter=262]="InvalidCharacter",t[t.PropertyExpected=513]="PropertyExpected",t[t.CommaExpected=514]="CommaExpected",t[t.ColonExpected=515]="ColonExpected",t[t.ValueExpected=516]="ValueExpected",t[t.CommaOrCloseBacketExpected=517]="CommaOrCloseBacketExpected",t[t.CommaOrCloseBraceExpected=518]="CommaOrCloseBraceExpected",t[t.TrailingComma=519]="TrailingComma",t[t.DuplicateKey=520]="DuplicateKey",t[t.CommentNotPermitted=521]="CommentNotPermitted",t[t.PropertyKeysMustBeDoublequoted=528]="PropertyKeysMustBeDoublequoted",t[t.SchemaUnsupportedFeature=769]="SchemaUnsupportedFeature",t[t.SchemaResolveError=65536]="SchemaResolveError"})(ce||(ce={}));(function(t){t[t.v3=3]="v3",t[t.v4=4]="v4",t[t.v6=6]="v6",t[t.v7=7]="v7",t[t.v2019_09=19]="v2019_09",t[t.v2020_12=20]="v2020_12"})(cr||(cr={}));(function(t){t.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[Pi.Markdown,Pi.PlainText],commitCharactersSupport:!0,labelDetailsSupport:!0}}}}})(Av||(Av={}))});var uO,Ba,Joe,Tv=Ae(()=>{y();(()=>{"use strict";var t={975:q=>{function P(C){if(typeof C!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(C))}function $(C,F){for(var U,W="",Q=0,K=-1,pe=0,ye=0;ye<=C.length;++ye){if(ye<C.length)U=C.charCodeAt(ye);else{if(U===47)break;U=47}if(U===47){if(!(K===ye-1||pe===1))if(K!==ye-1&&pe===2){if(W.length<2||Q!==2||W.charCodeAt(W.length-1)!==46||W.charCodeAt(W.length-2)!==46){if(W.length>2){var nt=W.lastIndexOf("/");if(nt!==W.length-1){nt===-1?(W="",Q=0):Q=(W=W.slice(0,nt)).length-1-W.lastIndexOf("/"),K=ye,pe=0;continue}}else if(W.length===2||W.length===1){W="",Q=0,K=ye,pe=0;continue}}F&&(W.length>0?W+="/..":W="..",Q=2)}else W.length>0?W+="/"+C.slice(K+1,ye):W=C.slice(K+1,ye),Q=ye-K-1;K=ye,pe=0}else U===46&&pe!==-1?++pe:pe=-1}return W}var V={resolve:function(){for(var C,F="",U=!1,W=arguments.length-1;W>=-1&&!U;W--){var Q;W>=0?Q=arguments[W]:(C===void 0&&(C=process.cwd()),Q=C),P(Q),Q.length!==0&&(F=Q+"/"+F,U=Q.charCodeAt(0)===47)}return F=$(F,!U),U?F.length>0?"/"+F:"/":F.length>0?F:"."},normalize:function(C){if(P(C),C.length===0)return".";var F=C.charCodeAt(0)===47,U=C.charCodeAt(C.length-1)===47;return(C=$(C,!F)).length!==0||F||(C="."),C.length>0&&U&&(C+="/"),F?"/"+C:C},isAbsolute:function(C){return P(C),C.length>0&&C.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var C,F=0;F<arguments.length;++F){var U=arguments[F];P(U),U.length>0&&(C===void 0?C=U:C+="/"+U)}return C===void 0?".":V.normalize(C)},relative:function(C,F){if(P(C),P(F),C===F||(C=V.resolve(C))===(F=V.resolve(F)))return"";for(var U=1;U<C.length&&C.charCodeAt(U)===47;++U);for(var W=C.length,Q=W-U,K=1;K<F.length&&F.charCodeAt(K)===47;++K);for(var pe=F.length-K,ye=Q<pe?Q:pe,nt=-1,qe=0;qe<=ye;++qe){if(qe===ye){if(pe>ye){if(F.charCodeAt(K+qe)===47)return F.slice(K+qe+1);if(qe===0)return F.slice(K+qe)}else Q>ye&&(C.charCodeAt(U+qe)===47?nt=qe:qe===0&&(nt=0));break}var Si=C.charCodeAt(U+qe);if(Si!==F.charCodeAt(K+qe))break;Si===47&&(nt=qe)}var Xn="";for(qe=U+nt+1;qe<=W;++qe)qe!==W&&C.charCodeAt(qe)!==47||(Xn.length===0?Xn+="..":Xn+="/..");return Xn.length>0?Xn+F.slice(K+nt):(K+=nt,F.charCodeAt(K)===47&&++K,F.slice(K))},_makeLong:function(C){return C},dirname:function(C){if(P(C),C.length===0)return".";for(var F=C.charCodeAt(0),U=F===47,W=-1,Q=!0,K=C.length-1;K>=1;--K)if((F=C.charCodeAt(K))===47){if(!Q){W=K;break}}else Q=!1;return W===-1?U?"/":".":U&&W===1?"//":C.slice(0,W)},basename:function(C,F){if(F!==void 0&&typeof F!="string")throw new TypeError('"ext" argument must be a string');P(C);var U,W=0,Q=-1,K=!0;if(F!==void 0&&F.length>0&&F.length<=C.length){if(F.length===C.length&&F===C)return"";var pe=F.length-1,ye=-1;for(U=C.length-1;U>=0;--U){var nt=C.charCodeAt(U);if(nt===47){if(!K){W=U+1;break}}else ye===-1&&(K=!1,ye=U+1),pe>=0&&(nt===F.charCodeAt(pe)?--pe==-1&&(Q=U):(pe=-1,Q=ye))}return W===Q?Q=ye:Q===-1&&(Q=C.length),C.slice(W,Q)}for(U=C.length-1;U>=0;--U)if(C.charCodeAt(U)===47){if(!K){W=U+1;break}}else Q===-1&&(K=!1,Q=U+1);return Q===-1?"":C.slice(W,Q)},extname:function(C){P(C);for(var F=-1,U=0,W=-1,Q=!0,K=0,pe=C.length-1;pe>=0;--pe){var ye=C.charCodeAt(pe);if(ye!==47)W===-1&&(Q=!1,W=pe+1),ye===46?F===-1?F=pe:K!==1&&(K=1):F!==-1&&(K=-1);else if(!Q){U=pe+1;break}}return F===-1||W===-1||K===0||K===1&&F===W-1&&F===U+1?"":C.slice(F,W)},format:function(C){if(C===null||typeof C!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof C);return(function(F,U){var W=U.dir||U.root,Q=U.base||(U.name||"")+(U.ext||"");return W?W===U.root?W+Q:W+"/"+Q:Q})(0,C)},parse:function(C){P(C);var F={root:"",dir:"",base:"",ext:"",name:""};if(C.length===0)return F;var U,W=C.charCodeAt(0),Q=W===47;Q?(F.root="/",U=1):U=0;for(var K=-1,pe=0,ye=-1,nt=!0,qe=C.length-1,Si=0;qe>=U;--qe)if((W=C.charCodeAt(qe))!==47)ye===-1&&(nt=!1,ye=qe+1),W===46?K===-1?K=qe:Si!==1&&(Si=1):K!==-1&&(Si=-1);else if(!nt){pe=qe+1;break}return K===-1||ye===-1||Si===0||Si===1&&K===ye-1&&K===pe+1?ye!==-1&&(F.base=F.name=pe===0&&Q?C.slice(1,ye):C.slice(pe,ye)):(pe===0&&Q?(F.name=C.slice(1,K),F.base=C.slice(1,ye)):(F.name=C.slice(pe,K),F.base=C.slice(pe,ye)),F.ext=C.slice(K,ye)),pe>0?F.dir=C.slice(0,pe-1):Q&&(F.dir="/"),F},sep:"/",delimiter:":",win32:null,posix:null};V.posix=V,q.exports=V}},e={};function r(q){var P=e[q];if(P!==void 0)return P.exports;var $=e[q]={exports:{}};return t[q]($,$.exports,r),$.exports}r.d=(q,P)=>{for(var $ in P)r.o(P,$)&&!r.o(q,$)&&Object.defineProperty(q,$,{enumerable:!0,get:P[$]})},r.o=(q,P)=>Object.prototype.hasOwnProperty.call(q,P),r.r=q=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(q,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(q,"__esModule",{value:!0})};var i={};let n;r.r(i),r.d(i,{URI:()=>p,Utils:()=>R}),typeof process=="object"?n=process.platform==="win32":typeof navigator=="object"&&(n=navigator.userAgent.indexOf("Windows")>=0);let s=/^\w[\w\d+.-]*$/,a=/^\//,o=/^\/\//;function u(q,P){if(!q.scheme&&P)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${q.authority}", path: "${q.path}", query: "${q.query}", fragment: "${q.fragment}"}`);if(q.scheme&&!s.test(q.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(q.path){if(q.authority){if(!a.test(q.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(o.test(q.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}let l="",f="/",h=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class p{static isUri(P){return P instanceof p||!!P&&typeof P.authority=="string"&&typeof P.fragment=="string"&&typeof P.path=="string"&&typeof P.query=="string"&&typeof P.scheme=="string"&&typeof P.fsPath=="string"&&typeof P.with=="function"&&typeof P.toString=="function"}scheme;authority;path;query;fragment;constructor(P,$,V,C,F,U=!1){typeof P=="object"?(this.scheme=P.scheme||l,this.authority=P.authority||l,this.path=P.path||l,this.query=P.query||l,this.fragment=P.fragment||l):(this.scheme=(function(W,Q){return W||Q?W:"file"})(P,U),this.authority=$||l,this.path=(function(W,Q){switch(W){case"https":case"http":case"file":Q?Q[0]!==f&&(Q=f+Q):Q=f}return Q})(this.scheme,V||l),this.query=C||l,this.fragment=F||l,u(this,U))}get fsPath(){return k(this,!1)}with(P){if(!P)return this;let{scheme:$,authority:V,path:C,query:F,fragment:U}=P;return $===void 0?$=this.scheme:$===null&&($=l),V===void 0?V=this.authority:V===null&&(V=l),C===void 0?C=this.path:C===null&&(C=l),F===void 0?F=this.query:F===null&&(F=l),U===void 0?U=this.fragment:U===null&&(U=l),$===this.scheme&&V===this.authority&&C===this.path&&F===this.query&&U===this.fragment?this:new v($,V,C,F,U)}static parse(P,$=!1){let V=h.exec(P);return V?new v(V[2]||l,E(V[4]||l),E(V[5]||l),E(V[7]||l),E(V[9]||l),$):new v(l,l,l,l,l)}static file(P){let $=l;if(n&&(P=P.replace(/\\/g,f)),P[0]===f&&P[1]===f){let V=P.indexOf(f,2);V===-1?($=P.substring(2),P=f):($=P.substring(2,V),P=P.substring(V)||f)}return new v("file",$,P,l,l)}static from(P){let $=new v(P.scheme,P.authority,P.path,P.query,P.fragment);return u($,!0),$}toString(P=!1){return w(this,P)}toJSON(){return this}static revive(P){if(P){if(P instanceof p)return P;{let $=new v(P);return $._formatted=P.external,$._fsPath=P._sep===m?P.fsPath:null,$}}return P}}let m=n?1:void 0;class v extends p{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=k(this,!1)),this._fsPath}toString(P=!1){return P?w(this,!0):(this._formatted||(this._formatted=w(this,!1)),this._formatted)}toJSON(){let P={$mid:1};return this._fsPath&&(P.fsPath=this._fsPath,P._sep=m),this._formatted&&(P.external=this._formatted),this.path&&(P.path=this.path),this.scheme&&(P.scheme=this.scheme),this.authority&&(P.authority=this.authority),this.query&&(P.query=this.query),this.fragment&&(P.fragment=this.fragment),P}}let S={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function b(q,P,$){let V,C=-1;for(let F=0;F<q.length;F++){let U=q.charCodeAt(F);if(U>=97&&U<=122||U>=65&&U<=90||U>=48&&U<=57||U===45||U===46||U===95||U===126||P&&U===47||$&&U===91||$&&U===93||$&&U===58)C!==-1&&(V+=encodeURIComponent(q.substring(C,F)),C=-1),V!==void 0&&(V+=q.charAt(F));else{V===void 0&&(V=q.substr(0,F));let W=S[U];W!==void 0?(C!==-1&&(V+=encodeURIComponent(q.substring(C,F)),C=-1),V+=W):C===-1&&(C=F)}}return C!==-1&&(V+=encodeURIComponent(q.substring(C))),V!==void 0?V:q}function g(q){let P;for(let $=0;$<q.length;$++){let V=q.charCodeAt($);V===35||V===63?(P===void 0&&(P=q.substr(0,$)),P+=S[V]):P!==void 0&&(P+=q[$])}return P!==void 0?P:q}function k(q,P){let $;return $=q.authority&&q.path.length>1&&q.scheme==="file"?`//${q.authority}${q.path}`:q.path.charCodeAt(0)===47&&(q.path.charCodeAt(1)>=65&&q.path.charCodeAt(1)<=90||q.path.charCodeAt(1)>=97&&q.path.charCodeAt(1)<=122)&&q.path.charCodeAt(2)===58?P?q.path.substr(1):q.path[1].toLowerCase()+q.path.substr(2):q.path,n&&($=$.replace(/\//g,"\\")),$}function w(q,P){let $=P?g:b,V="",{scheme:C,authority:F,path:U,query:W,fragment:Q}=q;if(C&&(V+=C,V+=":"),(F||C==="file")&&(V+=f,V+=f),F){let K=F.indexOf("@");if(K!==-1){let pe=F.substr(0,K);F=F.substr(K+1),K=pe.lastIndexOf(":"),K===-1?V+=$(pe,!1,!1):(V+=$(pe.substr(0,K),!1,!1),V+=":",V+=$(pe.substr(K+1),!1,!0)),V+="@"}F=F.toLowerCase(),K=F.lastIndexOf(":"),K===-1?V+=$(F,!1,!0):(V+=$(F.substr(0,K),!1,!0),V+=F.substr(K))}if(U){if(U.length>=3&&U.charCodeAt(0)===47&&U.charCodeAt(2)===58){let K=U.charCodeAt(1);K>=65&&K<=90&&(U=`/${String.fromCharCode(K+32)}:${U.substr(3)}`)}else if(U.length>=2&&U.charCodeAt(1)===58){let K=U.charCodeAt(0);K>=65&&K<=90&&(U=`${String.fromCharCode(K+32)}:${U.substr(2)}`)}V+=$(U,!0,!1)}return W&&(V+="?",V+=$(W,!1,!1)),Q&&(V+="#",V+=P?Q:b(Q,!1,!1)),V}function _(q){try{return decodeURIComponent(q)}catch{return q.length>3?q.substr(0,3)+_(q.substr(3)):q}}let A=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function E(q){return q.match(A)?q.replace(A,(P=>_(P))):q}var O=r(975);let L=O.posix||O,B="/";var R;(function(q){q.joinPath=function(P,...$){return P.with({path:L.join(P.path,...$)})},q.resolvePath=function(P,...$){let V=P.path,C=!1;V[0]!==B&&(V=B+V,C=!0);let F=L.resolve(V,...$);return C&&F[0]===B&&!P.authority&&(F=F.substring(1)),P.with({path:F})},q.dirname=function(P){if(P.path.length===0||P.path===B)return P;let $=L.dirname(P.path);return $.length===1&&$.charCodeAt(0)===46&&($=""),P.with({path:$})},q.basename=function(P){return L.basename(P.path)},q.extname=function(P){return L.extname(P.path)}})(R||(R={})),uO=i})();({URI:Ba,Utils:Joe}=uO)});var Ls=T((Yoe,pO)=>{"use strict";y();var Ev=Object.defineProperty,TU=Object.getOwnPropertyDescriptor,EU=Object.getOwnPropertyNames,OU=Object.prototype.hasOwnProperty,NU=(t,e)=>{for(var r in e)Ev(t,r,{get:e[r],enumerable:!0})},LU=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of EU(e))!OU.call(t,n)&&n!==r&&Ev(t,n,{get:()=>e[n],enumerable:!(i=TU(e,n))||i.enumerable});return t},PU=t=>LU(Ev({},"__esModule",{value:!0}),t),lO={};NU(lO,{config:()=>DU,t:()=>fO});pO.exports=PU(lO);var qU=ae("fs"),CU=ae("fs/promises");async function RU(t){if(t.protocol==="file:")return await(0,CU.readFile)(t,"utf8");if(t.protocol==="http:"||t.protocol==="https:"){let e=await fetch(t.toString(),{headers:{"Accept-Encoding":"gzip, deflate",Accept:"application/json"},redirect:"follow"});if(!e.ok){let i=`Unexpected ${e.status} response while trying to read ${t}`;try{i+=`: ${await e.text()}`}catch{}throw new Error(i)}return await e.text()}throw new Error("Unsupported protocol")}function MU(t){return(0,qU.readFileSync)(t,"utf8")}var Wu;function DU(t){if("contents"in t){typeof t.contents=="string"?Wu=JSON.parse(t.contents):Wu=t.contents;return}if("fsPath"in t){let e=MU(t.fsPath),r=JSON.parse(e);Wu=cO(r)?r.contents.bundle:r;return}if(t.uri){let e=t.uri;return typeof t.uri=="string"&&(e=new URL(t.uri)),new Promise((r,i)=>{RU(e).then(n=>{try{let s=JSON.parse(n);Wu=cO(s)?s.contents.bundle:s,r()}catch(s){i(s)}}).catch(n=>{i(n)})})}}function fO(...t){let e=t[0],r,i,n;if(typeof e=="string")r=e,i=e,t.splice(0,1),n=!t||typeof t[0]!="object"?t:t[0];else if(e instanceof Array){let a=t.slice(1);if(e.length!==a.length+1)throw new Error("expected a string as the first argument to l10n.t");let o=e[0];for(let u=1;u<e.length;u++)o+=`{${u-1}}`+e[u];return fO(o,...a)}else i=e.message,r=i,e.comment&&e.comment.length>0&&(r+=`/${Array.isArray(e.comment)?e.comment.join(""):e.comment}`),n=e.args??{};let s=Wu?.[r];return s?typeof s=="string"?lp(s,n):s.comment?lp(s.message,n):lp(i,n):lp(i,n)}var FU=/{([^}]+)}/g;function lp(t,e){return Object.keys(e).length===0?t:t.replace(FU,(r,i)=>e[i]??r)}function cO(t){return typeof t?.contents?.bundle=="object"&&typeof t?.version=="string"}});function Ht(t){return Zr(t)?t?{}:{not:{}}:t}function an(t){t.startsWith(dO)&&(t=BU+t.substring(dO.length));try{return Ba.parse(t).toString(!0)}catch{return t}}function Rv(t){return VU[an(t)]??void 0}function gO(t,e=[],r=[]){return new hp(t,e,r)}function qi(t){return Sg(t)}function Ju(t){return bg(t)}function Mv(t,e,r=!1){return e>=t.offset&&e<t.offset+t.length||r&&e===t.offset+t.length}function mO(t,e=cr.v2020_12){let r=t.$schema;return r?Rv(r)??e:e}function Lt(t,e,r,i,n){if(!t||!i.include(t))return;if(t.type==="property")return Lt(t.valueNode,e,r,i,n);let s=t;switch(a(),s.type){case"object":h(s);break;case"array":f(s);break;case"string":l(s);break;case"number":u(s);break}i.add({node:s,schema:e});function a(){function p(w){return s.type===w||w==="integer"&&s.type==="number"&&s.isInteger}if(Array.isArray(e.type)?e.type.some(p)||r.problems.push({location:{offset:s.offset,length:s.length},message:e.errorMessage||Z.t("Incorrect type. Expected one of {0}.",e.type.join(", "))}):e.type&&(p(e.type)||r.problems.push({location:{offset:s.offset,length:s.length},message:e.errorMessage||Z.t('Incorrect type. Expected "{0}".',e.type)})),Array.isArray(e.allOf))for(let w of e.allOf){let _=new Pt,A=i.newSub();Lt(s,Ht(w),_,A,n),r.merge(_),i.merge(A)}let m=Ht(e.not);if(m){let w=new Pt,_=i.newSub();Lt(s,m,w,_,n),w.hasProblems()||r.problems.push({location:{offset:s.offset,length:s.length},message:e.errorMessage||Z.t("Matches a schema that is not allowed.")});for(let A of _.schemas)A.inverted=!A.inverted,i.add(A)}let v=(w,_)=>{let A=[],E=o(w)??w,O;for(let L of E){let B=Ht(L),R=new Pt,q=i.newSub();if(Lt(s,B,R,q,n),R.hasProblems()||A.push(B),!O)O={schema:B,validationResult:R,matchingSchemas:q};else if(!_&&!R.hasProblems()&&!O.validationResult.hasProblems())O.matchingSchemas.merge(q),O.validationResult.propertiesMatches+=R.propertiesMatches,O.validationResult.propertiesValueMatches+=R.propertiesValueMatches,O.validationResult.mergeProcessedProperties(R);else{let P=R.compare(O.validationResult);P>0?O={schema:B,validationResult:R,matchingSchemas:q}:P===0&&(O.matchingSchemas.merge(q),O.validationResult.mergeEnumValues(R))}}return A.length>1&&_&&r.problems.push({location:{offset:s.offset,length:1},message:Z.t("Matches multiple schemas when only one must validate.")}),O&&(O.validationResult.updateEnumMismatchProblemMessages(),r.merge(O.validationResult),i.merge(O.matchingSchemas)),A.length};Array.isArray(e.anyOf)&&v(e.anyOf,!1),Array.isArray(e.oneOf)&&v(e.oneOf,!0);let S=w=>{let _=new Pt,A=i.newSub();Lt(s,Ht(w),_,A,n),r.merge(_),i.merge(A)},b=(w,_,A)=>{let E=Ht(w),O=new Pt,L=i.newSub();Lt(s,E,O,L,n),i.merge(L),r.mergeProcessedProperties(O),O.hasProblems()?A&&S(A):_&&S(_)},g=Ht(e.if);if(g&&b(g,Ht(e.then),Ht(e.else)),Array.isArray(e.enum)){let w=qi(s),_=!1;for(let A of e.enum)if(Ts(w,A)){_=!0;break}r.enumValues=e.enum,r.enumValueMatch=_,_||r.problems.push({location:{offset:s.offset,length:s.length},code:ce.EnumValueMismatch,message:e.errorMessage||Z.t("Value is not accepted. Valid values: {0}.",e.enum.map(A=>JSON.stringify(A)).join(", "))})}if(qr(e.const)){let w=qi(s);Ts(w,e.const)?r.enumValueMatch=!0:(r.problems.push({location:{offset:s.offset,length:s.length},code:ce.EnumValueMismatch,message:e.errorMessage||Z.t("Value must be {0}.",JSON.stringify(e.const))}),r.enumValueMatch=!1),r.enumValues=[e.const]}let k=e.deprecationMessage;if(k||e.deprecated){k=k||Z.t("Value is deprecated");let w=s.parent?.type==="property"?s.parent:s;r.problems.push({location:{offset:w.offset,length:w.length},severity:$t.Warning,message:k,code:ce.Deprecated})}}function o(p){if(p.length<2)return;let m=S=>{let b=new Map;for(let g=0;g<p.length;g++){let k=S(Ht(p[g]),g);if(!k)return;k.forEach(([w,_])=>{if(_.const!==void 0){b.has(w)||b.set(w,new Map);let A=b.get(w);A.has(_.const)||A.set(_.const,[]),A.get(_.const).push(g)}})}return b},v=(S,b)=>{for(let[g,k]of S){let w=new Set;if(k.forEach(_=>_.forEach(A=>w.add(A))),w.size===p.length){let _=b(g),A=k.get(_);if(A?.length)return A.map(E=>p[E]);break}}};if(s.type==="object"&&s.properties?.length){let S=m(b=>b.properties?Object.entries(b.properties).map(([g,k])=>[g,Ht(k)]):void 0);if(S)return v(S,b=>{let g=s.properties.find(k=>k.keyNode.value===b);return g?.valueNode?.type==="string"?g.valueNode.value:void 0})}else if(s.type==="array"&&s.items?.length){let S=m(b=>{let g=b.prefixItems||(Array.isArray(b.items)?b.items:void 0);return g?g.map((k,w)=>[w,Ht(k)]):void 0});if(S)return v(S,b=>{let g=s.items[b];return g?.type==="string"?g.value:void 0})}}function u(p){let m=p.value;function v(A){let E=/^(-?\d+)(?:\.(\d+))?(?:e([-+]\d+))?$/.exec(A.toString());return E&&{value:Number(E[1]+(E[2]||"")),multiplier:(E[2]?.length||0)-(parseInt(E[3])||0)}}if(Vt(e.multipleOf)){let A=-1;if(Number.isInteger(e.multipleOf))A=m%e.multipleOf;else{let E=v(e.multipleOf),O=v(m);if(E&&O){let L=10**Math.abs(O.multiplier-E.multiplier);O.multiplier<E.multiplier?O.value*=L:E.value*=L,A=O.value%E.value}}A!==0&&r.problems.push({location:{offset:p.offset,length:p.length},message:Z.t("Value is not divisible by {0}.",e.multipleOf)})}function S(A,E){if(Vt(E))return E;if(Zr(E)&&E)return A}function b(A,E){if(!Zr(E)||!E)return A}let g=S(e.minimum,e.exclusiveMinimum);Vt(g)&&m<=g&&r.problems.push({location:{offset:p.offset,length:p.length},message:Z.t("Value is below the exclusive minimum of {0}.",g)});let k=S(e.maximum,e.exclusiveMaximum);Vt(k)&&m>=k&&r.problems.push({location:{offset:p.offset,length:p.length},message:Z.t("Value is above the exclusive maximum of {0}.",k)});let w=b(e.minimum,e.exclusiveMinimum);Vt(w)&&m<w&&r.problems.push({location:{offset:p.offset,length:p.length},message:Z.t("Value is below the minimum of {0}.",w)});let _=b(e.maximum,e.exclusiveMaximum);Vt(_)&&m>_&&r.problems.push({location:{offset:p.offset,length:p.length},message:Z.t("Value is above the maximum of {0}.",_)})}function l(p){if(Vt(e.minLength)&&hv(p.value)<e.minLength&&r.problems.push({location:{offset:p.offset,length:p.length},message:Z.t("String is shorter than the minimum length of {0}.",e.minLength)}),Vt(e.maxLength)&&hv(p.value)>e.maxLength&&r.problems.push({location:{offset:p.offset,length:p.length},message:Z.t("String is longer than the maximum length of {0}.",e.maxLength)}),Hf(e.pattern)){let m=Es(e.pattern);m&&!m.test(p.value)&&r.problems.push({location:{offset:p.offset,length:p.length},message:e.patternErrorMessage||e.errorMessage||Z.t('String does not match the pattern of "{0}".',e.pattern)})}if(e.format)switch(e.format){case"uri":case"uri-reference":{let v;if(!p.value)v=Z.t("URI expected.");else{let S=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/.exec(p.value);S?!S[2]&&e.format==="uri"&&(v=Z.t("URI with a scheme is expected.")):v=Z.t("URI is expected.")}v&&r.problems.push({location:{offset:p.offset,length:p.length},message:e.patternErrorMessage||e.errorMessage||Z.t("String is not a URI: {0}",v)})}break;case"color-hex":case"date-time":case"date":case"time":case"email":case"hostname":case"ipv4":case"ipv6":let m=jU[e.format];(!p.value||!m.pattern.exec(p.value))&&r.problems.push({location:{offset:p.offset,length:p.length},message:e.patternErrorMessage||e.errorMessage||m.errorMessage});default:}}function f(p){let m,v;n.schemaDraft>=cr.v2020_12?(m=e.prefixItems,v=Array.isArray(e.items)?void 0:e.items):(m=Array.isArray(e.items)?e.items:void 0,v=Array.isArray(e.items)?e.additionalItems:e.items);let S=0;if(m!==void 0){let k=Math.min(m.length,p.items.length);for(;S<k;S++){let w=m[S],_=Ht(w),A=new Pt,E=p.items[S];E&&(Lt(E,_,A,i,n),r.mergePropertyMatch(A)),r.processedProperties.add(String(S))}}if(v!==void 0&&S<p.items.length)if(typeof v=="boolean")for(v===!1&&r.problems.push({location:{offset:p.offset,length:p.length},message:Z.t("Array has too many items according to schema. Expected {0} or fewer.",S)});S<p.items.length;S++)r.processedProperties.add(String(S)),r.propertiesValueMatches++;else for(;S<p.items.length;S++){let k=new Pt;Lt(p.items[S],v,k,i,n),r.mergePropertyMatch(k),r.processedProperties.add(String(S))}let b=Ht(e.contains);if(b){let k=0;for(let w=0;w<p.items.length;w++){let _=p.items[w],A=new Pt;Lt(_,b,A,Va.instance,n),A.hasProblems()||(k++,n.schemaDraft>=cr.v2020_12&&r.processedProperties.add(String(w)))}k===0&&!Vt(e.minContains)&&r.problems.push({location:{offset:p.offset,length:p.length},message:e.errorMessage||Z.t("Array does not contain required item.")}),Vt(e.minContains)&&k<e.minContains&&r.problems.push({location:{offset:p.offset,length:p.length},message:e.errorMessage||Z.t("Array has too few items that match the contains contraint. Expected {0} or more.",e.minContains)}),Vt(e.maxContains)&&k>e.maxContains&&r.problems.push({location:{offset:p.offset,length:p.length},message:e.errorMessage||Z.t("Array has too many items that match the contains contraint. Expected {0} or less.",e.maxContains)})}let g=e.unevaluatedItems;if(g!==void 0)for(let k=0;k<p.items.length;k++){if(!r.processedProperties.has(String(k)))if(g===!1)r.problems.push({location:{offset:p.offset,length:p.length},message:Z.t("Item does not match any validation rule from the array.")});else{let w=new Pt;Lt(p.items[k],e.unevaluatedItems,w,i,n),r.mergePropertyMatch(w)}r.processedProperties.add(String(k)),r.propertiesValueMatches++}if(Vt(e.minItems)&&p.items.length<e.minItems&&r.problems.push({location:{offset:p.offset,length:p.length},message:Z.t("Array has too few items. Expected {0} or more.",e.minItems)}),Vt(e.maxItems)&&p.items.length>e.maxItems&&r.problems.push({location:{offset:p.offset,length:p.length},message:Z.t("Array has too many items. Expected {0} or fewer.",e.maxItems)}),e.uniqueItems===!0){let w=function(){for(let _=0;_<k.length-1;_++){let A=k[_];for(let E=_+1;E<k.length;E++)if(Ts(A,k[E]))return!0}return!1},k=qi(p);w()&&r.problems.push({location:{offset:p.offset,length:p.length},message:Z.t("Array has duplicate items.")})}}function h(p){let m=Object.create(null),v=new Set;for(let _ of p.properties){let A=_.keyNode.value;m[A]=_.valueNode,v.add(A)}if(Array.isArray(e.required)){for(let _ of e.required)if(!m[_]){let A=p.parent&&p.parent.type==="property"&&p.parent.keyNode,E=A?{offset:A.offset,length:A.length}:{offset:p.offset,length:1};r.problems.push({location:E,message:Z.t('Missing property "{0}".',_)})}}let S=_=>{v.delete(_),r.processedProperties.add(_)};if(e.properties)for(let _ of Object.keys(e.properties)){S(_);let A=e.properties[_],E=m[_];if(E)if(Zr(A))if(A)r.propertiesMatches++,r.propertiesValueMatches++;else{let O=E.parent;r.problems.push({location:{offset:O.keyNode.offset,length:O.keyNode.length},message:e.errorMessage||Z.t("Property {0} is not allowed.",_)})}else{let O=new Pt;Lt(E,A,O,i,n),r.mergePropertyMatch(O)}}if(e.patternProperties)for(let _ of Object.keys(e.patternProperties)){let A=Es(_);if(A){let E=[];for(let O of v)if(A.test(O)){E.push(O);let L=m[O];if(L){let B=e.patternProperties[_];if(Zr(B))if(B)r.propertiesMatches++,r.propertiesValueMatches++;else{let R=L.parent;r.problems.push({location:{offset:R.keyNode.offset,length:R.keyNode.length},message:e.errorMessage||Z.t("Property {0} is not allowed.",O)})}else{let R=new Pt;Lt(L,B,R,i,n),r.mergePropertyMatch(R)}}}E.forEach(S)}}let b=e.additionalProperties;if(b!==void 0)for(let _ of v){S(_);let A=m[_];if(A){if(b===!1){let E=A.parent;r.problems.push({location:{offset:E.keyNode.offset,length:E.keyNode.length},message:e.errorMessage||Z.t("Property {0} is not allowed.",_)})}else if(b!==!0){let E=new Pt;Lt(A,b,E,i,n),r.mergePropertyMatch(E)}}}let g=e.unevaluatedProperties;if(g!==void 0){let _=[];for(let A of v)if(!r.processedProperties.has(A)){_.push(A);let E=m[A];if(E){if(g===!1){let O=E.parent;r.problems.push({location:{offset:O.keyNode.offset,length:O.keyNode.length},message:e.errorMessage||Z.t("Property {0} is not allowed.",A)})}else if(g!==!0){let O=new Pt;Lt(E,g,O,i,n),r.mergePropertyMatch(O)}}}_.forEach(S)}if(Vt(e.maxProperties)&&p.properties.length>e.maxProperties&&r.problems.push({location:{offset:p.offset,length:p.length},message:Z.t("Object has more properties than limit of {0}.",e.maxProperties)}),Vt(e.minProperties)&&p.properties.length<e.minProperties&&r.problems.push({location:{offset:p.offset,length:p.length},message:Z.t("Object has fewer properties than the required number of {0}",e.minProperties)}),e.dependentRequired)for(let _ in e.dependentRequired){let A=m[_],E=e.dependentRequired[_];A&&Array.isArray(E)&&w(_,E)}if(e.dependentSchemas)for(let _ in e.dependentSchemas){let A=m[_],E=e.dependentSchemas[_];A&&Li(E)&&w(_,E)}if(e.dependencies)for(let _ in e.dependencies)m[_]&&w(_,e.dependencies[_]);let k=Ht(e.propertyNames);if(k)for(let _ of p.properties){let A=_.keyNode;A&&Lt(A,k,r,i,n)}function w(_,A){if(Array.isArray(A))for(let E of A)m[E]?r.propertiesValueMatches++:r.problems.push({location:{offset:p.offset,length:p.length},message:Z.t("Object is missing property {0} required by property {1}.",E,_)});else{let E=Ht(A);if(E){let O=new Pt;Lt(p,E,O,i,n),r.mergePropertyMatch(O)}}}}}function yO(t,e){let r=[],i=-1,n=t.getText(),s=Nr(n,!1),a=e&&e.collectComments?[]:void 0;function o(){for(;;){let O=s.scan();switch(h(),O){case 12:case 13:Array.isArray(a)&&a.push(oe.create(t.positionAt(s.getTokenOffset()),t.positionAt(s.getTokenOffset()+s.getTokenLength())));break;case 15:case 14:break;default:return O}}}function u(O){return s.getToken()===O?(o(),!0):!1}function l(O,L,B,R,q=$t.Error){if(r.length===0||B!==i){let P=oe.create(t.positionAt(B),t.positionAt(R));r.push(Cr.create(P,O,q,L,t.languageId)),i=B}}function f(O,L,B=void 0,R=[],q=[]){let P=s.getTokenOffset(),$=s.getTokenOffset()+s.getTokenLength();if(P===$&&P>0){for(P--;P>0&&/\s/.test(n.charAt(P));)P--;$=P+1}if(l(O,L,P,$),B&&p(B,!1),R.length+q.length>0){let V=s.getToken();for(;V!==17;){if(R.indexOf(V)!==-1){o();break}else if(q.indexOf(V)!==-1)break;V=o()}}return B}function h(){switch(s.getTokenError()){case 4:return f(Z.t("Invalid unicode sequence in string."),ce.InvalidUnicode),!0;case 5:return f(Z.t("Invalid escape character in string."),ce.InvalidEscapeCharacter),!0;case 3:return f(Z.t("Unexpected end of number."),ce.UnexpectedEndOfNumber),!0;case 1:return f(Z.t("Unexpected end of comment."),ce.UnexpectedEndOfComment),!0;case 2:return f(Z.t("Unexpected end of string."),ce.UnexpectedEndOfString),!0;case 6:return f(Z.t("Invalid characters in string. Control characters must be escaped."),ce.InvalidCharacter),!0}return!1}function p(O,L){return O.length=s.getTokenOffset()+s.getTokenLength()-O.offset,L&&o(),O}function m(O){if(s.getToken()!==3)return;let L=new Nv(O,s.getTokenOffset());o();let B=0,R=!1;for(;s.getToken()!==4&&s.getToken()!==17;){if(s.getToken()===5){R||f(Z.t("Value expected"),ce.ValueExpected);let P=s.getTokenOffset();if(o(),s.getToken()===4){R&&l(Z.t("Trailing comma"),ce.TrailingComma,P,P+1);continue}}else R&&f(Z.t("Expected comma"),ce.CommaExpected);let q=_(L);q?L.items.push(q):f(Z.t("Value expected"),ce.ValueExpected,void 0,[],[4,5]),R=!0}return s.getToken()!==4?f(Z.t("Expected comma or closing bracket"),ce.CommaOrCloseBacketExpected,L):p(L,!0)}let v=new zu(void 0,0,0);function S(O,L){let B=new Pv(O,s.getTokenOffset(),v),R=g(B);if(!R)if(s.getToken()===16){f(Z.t("Property keys must be doublequoted"),ce.PropertyKeysMustBeDoublequoted);let P=new zu(B,s.getTokenOffset(),s.getTokenLength());P.value=s.getTokenValue(),R=P,o()}else return;if(B.keyNode=R,R.value!=="//"){let P=L[R.value];P?(l(Z.t("Duplicate object key"),ce.DuplicateKey,B.keyNode.offset,B.keyNode.offset+B.keyNode.length,$t.Warning),Li(P)&&l(Z.t("Duplicate object key"),ce.DuplicateKey,P.keyNode.offset,P.keyNode.offset+P.keyNode.length,$t.Warning),L[R.value]=!0):L[R.value]=B}if(s.getToken()===6)B.colonOffset=s.getTokenOffset(),o();else if(f(Z.t("Colon expected"),ce.ColonExpected),s.getToken()===10&&t.positionAt(R.offset+R.length).line<t.positionAt(s.getTokenOffset()).line)return B.length=R.length,B;let q=_(B);return q?(B.valueNode=q,B.length=q.offset+q.length-B.offset,B):f(Z.t("Value expected"),ce.ValueExpected,B,[],[2,5])}function b(O){if(s.getToken()!==1)return;let L=new qv(O,s.getTokenOffset()),B=Object.create(null);o();let R=!1;for(;s.getToken()!==2&&s.getToken()!==17;){if(s.getToken()===5){R||f(Z.t("Property expected"),ce.PropertyExpected);let P=s.getTokenOffset();if(o(),s.getToken()===2){R&&l(Z.t("Trailing comma"),ce.TrailingComma,P,P+1);continue}}else R&&f(Z.t("Expected comma"),ce.CommaExpected);let q=S(L,B);q?L.properties.push(q):f(Z.t("Property expected"),ce.PropertyExpected,void 0,[],[2,5]),R=!0}return s.getToken()!==2?f(Z.t("Expected comma or closing brace"),ce.CommaOrCloseBraceExpected,L):p(L,!0)}function g(O){if(s.getToken()!==10)return;let L=new zu(O,s.getTokenOffset());return L.value=s.getTokenValue(),p(L,!0)}function k(O){if(s.getToken()!==11)return;let L=new Lv(O,s.getTokenOffset());if(s.getTokenError()===0){let B=s.getTokenValue();try{let R=JSON.parse(B);if(!Vt(R))return f(Z.t("Invalid number format."),ce.Undefined,L);L.value=R}catch{return f(Z.t("Invalid number format."),ce.Undefined,L)}L.isInteger=B.indexOf(".")===-1}return p(L,!0)}function w(O){let L;switch(s.getToken()){case 7:return p(new Ov(O,s.getTokenOffset()),!0);case 8:return p(new fp(O,!0,s.getTokenOffset()),!0);case 9:return p(new fp(O,!1,s.getTokenOffset()),!0);default:return}}function _(O){return m(O)||b(O)||g(O)||k(O)||w(O)}let A;return o()!==17&&(A=_(A),A?s.getToken()!==17&&f(Z.t("End of file expected."),ce.Undefined):f(Z.t("Expected a JSON object, array or literal."),ce.Undefined)),new hp(A,r,a)}var Z,jU,sn,Ov,fp,Nv,Lv,zu,Pv,qv,hO,dO,BU,VU,pp,Cv,Va,Pt,hp,$a=Ae(()=>{y();xi();Vu();$u();Mr();Tv();Z=ia(Ls()),jU={"color-hex":{errorMessage:Z.t("Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA."),pattern:/^#([0-9A-Fa-f]{3,4}|([0-9A-Fa-f]{2}){3,4})$/},"date-time":{errorMessage:Z.t("String is not a RFC3339 date-time."),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},date:{errorMessage:Z.t("String is not a RFC3339 date."),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/i},time:{errorMessage:Z.t("String is not a RFC3339 time."),pattern:/^([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},email:{errorMessage:Z.t("String is not an e-mail address."),pattern:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}))$/},hostname:{errorMessage:Z.t("String is not a hostname."),pattern:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i},ipv4:{errorMessage:Z.t("String is not an IPv4 address."),pattern:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/},ipv6:{errorMessage:Z.t("String is not an IPv6 address."),pattern:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i}},sn=class{constructor(e,r,i=0){this.offset=r,this.length=i,this.parent=e}get children(){return[]}toString(){return"type: "+this.type+" ("+this.offset+"/"+this.length+")"+(this.parent?" parent: {"+this.parent.toString()+"}":"")}},Ov=class extends sn{constructor(e,r){super(e,r),this.type="null",this.value=null}},fp=class extends sn{constructor(e,r,i){super(e,i),this.type="boolean",this.value=r}},Nv=class extends sn{constructor(e,r){super(e,r),this.type="array",this.items=[]}get children(){return this.items}},Lv=class extends sn{constructor(e,r){super(e,r),this.type="number",this.isInteger=!0,this.value=Number.NaN}},zu=class extends sn{constructor(e,r,i){super(e,r,i),this.type="string",this.value=""}},Pv=class extends sn{constructor(e,r,i){super(e,r),this.type="property",this.colonOffset=-1,this.keyNode=i}get children(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]}},qv=class extends sn{constructor(e,r){super(e,r),this.type="object",this.properties=[]}get children(){return this.properties}};(function(t){t[t.Key=0]="Key",t[t.Enum=1]="Enum"})(hO||(hO={}));dO="http://json-schema.org/",BU="https://json-schema.org/";VU={"https://json-schema.org/draft-03/schema":cr.v3,"https://json-schema.org/draft-04/schema":cr.v4,"https://json-schema.org/draft-06/schema":cr.v6,"https://json-schema.org/draft-07/schema":cr.v7,"https://json-schema.org/draft/2019-09/schema":cr.v2019_09,"https://json-schema.org/draft/2020-12/schema":cr.v2020_12},pp=class{constructor(e){this.schemaDraft=e}},Cv=class t{constructor(e=-1,r){this.focusOffset=e,this.exclude=r,this.schemas=[]}add(e){this.schemas.push(e)}merge(e){Array.prototype.push.apply(this.schemas,e.schemas)}include(e){return(this.focusOffset===-1||Mv(e,this.focusOffset))&&e!==this.exclude}newSub(){return new t(-1,this.exclude)}},Va=class{constructor(){}get schemas(){return[]}add(e){}merge(e){}include(e){return!0}newSub(){return this}};Va.instance=new Va;Pt=class{constructor(){this.problems=[],this.propertiesMatches=0,this.processedProperties=new Set,this.propertiesValueMatches=0,this.primaryValueMatches=0,this.enumValueMatch=!1,this.enumValues=void 0}hasProblems(){return!!this.problems.length}merge(e){this.problems=this.problems.concat(e.problems),this.propertiesMatches+=e.propertiesMatches,this.propertiesValueMatches+=e.propertiesValueMatches,this.mergeProcessedProperties(e)}mergeEnumValues(e){!this.enumValueMatch&&!e.enumValueMatch&&this.enumValues&&e.enumValues&&(this.enumValues=this.enumValues.concat(e.enumValues))}updateEnumMismatchProblemMessages(){if(!this.enumValueMatch&&this.enumValues)for(let e of this.problems)e.code===ce.EnumValueMismatch&&(e.message=Z.t("Value is not accepted. Valid values: {0}.",this.enumValues.map(r=>JSON.stringify(r)).join(", ")))}mergePropertyMatch(e){this.problems=this.problems.concat(e.problems),this.propertiesMatches++,(e.enumValueMatch||!e.hasProblems()&&e.propertiesMatches)&&this.propertiesValueMatches++,e.enumValueMatch&&e.enumValues&&e.enumValues.length===1&&this.primaryValueMatches++}mergeProcessedProperties(e){e.processedProperties.forEach(r=>this.processedProperties.add(r))}compare(e){let r=this.hasProblems();return r!==e.hasProblems()?r?-1:1:this.enumValueMatch!==e.enumValueMatch?e.enumValueMatch?-1:1:this.primaryValueMatches!==e.primaryValueMatches?this.primaryValueMatches-e.primaryValueMatches:this.propertiesValueMatches!==e.propertiesValueMatches?this.propertiesValueMatches-e.propertiesValueMatches:this.propertiesMatches-e.propertiesMatches}};hp=class{constructor(e,r=[],i=[]){this.root=e,this.syntaxErrors=r,this.comments=i}getNodeFromOffset(e,r=!1){if(this.root)return vg(this.root,e,r)}visit(e){if(this.root){let r=i=>{let n=e(i),s=i.children;if(Array.isArray(s))for(let a=0;a<s.length&&n;a++)n=r(s[a]);return n};r(this.root)}}validate(e,r,i=$t.Warning,n){if(this.root&&r){let s=new Pt;return Lt(this.root,r,s,Va.instance,new pp(n??mO(r))),s.problems.map(a=>{let o=oe.create(e.positionAt(a.location.offset),e.positionAt(a.location.offset+a.location.length));return Cr.create(o,a.message,a.severity??i,a.code)})}}getMatchingSchemas(e,r=-1,i){if(this.root&&e){let n=new Cv(r,i),s=mO(e),a=new pp(s);return Lt(this.root,e,new Pt,n,a),n.schemas}return[]}}});function dp(t,e,r){if(t!==null&&typeof t=="object"){let i=e+" ";if(Array.isArray(t)){if(t.length===0)return"[]";let n=`[
|
|
1182
|
+
`;for(let s=0;s<t.length;s++)n+=i+dp(t[s],i,r),s<t.length-1&&(n+=","),n+=`
|
|
1183
|
+
`;return n+=e+"]",n}else{let n=Object.keys(t);if(n.length===0)return"{}";let s=`{
|
|
1184
|
+
`;for(let a=0;a<n.length;a++){let o=n[a];s+=i+JSON.stringify(o)+": "+dp(t[o],i,r),a<n.length-1&&(s+=","),s+=`
|
|
1185
|
+
`}return s+=e+"}",s}}return r(t)}var _O=Ae(()=>{y()});var Ku,$U,UU,mp,vO=Ae(()=>{y();$a();xi();_O();$u();Vu();Mr();Ku=ia(Ls()),$U=[",","}","]"],UU=[":"],mp=class{constructor(e,r=[],i=Promise,n={}){this.schemaService=e,this.contributions=r,this.promiseConstructor=i,this.clientCapabilities=n}doResolve(e){for(let r=this.contributions.length-1;r>=0;r--){let i=this.contributions[r].resolveCompletion;if(i){let n=i(e);if(n)return n}}return this.promiseConstructor.resolve(e)}doComplete(e,r,i){let n={items:[],isIncomplete:!1},s=e.getText(),a=e.offsetAt(r),o=i.getNodeFromOffset(a,!0);if(this.isInComment(e,o?o.offset:0,a))return Promise.resolve(n);if(o&&a===o.offset+o.length&&a>0){let m=s[a-1];(o.type==="object"&&m==="}"||o.type==="array"&&m==="]")&&(o=o.parent)}let u=this.getCurrentWord(e,a),l;if(o&&(o.type==="string"||o.type==="number"||o.type==="boolean"||o.type==="null"))l=oe.create(e.positionAt(o.offset),e.positionAt(o.offset+o.length));else{let m=a-u.length;m>0&&s[m-1]==='"'&&m--,l=oe.create(e.positionAt(m),r)}let f=!1,h=new Map,p={add:m=>{let v=m.label,S=h.get(v);if(S)S.documentation||(S.documentation=m.documentation),S.detail||(S.detail=m.detail),S.labelDetails||(S.labelDetails=m.labelDetails);else{if(v=v.replace(/[\n]/g,"\u21B5"),v.length>60){let b=v.substr(0,57).trim()+"...";h.has(b)||(v=b)}m.textEdit=rr.replace(l,m.insertText),f&&(m.commitCharacters=m.kind===Ut.Property?UU:$U),m.label=v,h.set(v,m),n.items.push(m)}},setAsIncomplete:()=>{n.isIncomplete=!0},error:m=>{console.error(m)},getNumberOfProposals:()=>n.items.length};return this.schemaService.getSchemaForResource(e.uri,i).then(m=>{let v=[],S=!0,b="",g;if(o&&o.type==="string"){let w=o.parent;w&&w.type==="property"&&w.keyNode===o&&(S=!w.valueNode,g=w,b=s.substr(o.offset+1,o.length-2),w&&(o=w.parent))}if(o&&o.type==="object"){if(o.offset===a)return n;o.properties.forEach(E=>{(!g||g!==E)&&h.set(E.keyNode.value,Fa.create("__"))});let _="";S&&(_=this.evaluateSeparatorAfter(e,e.offsetAt(l.end))),m?this.getPropertyCompletions(m,i,o,S,_,p):this.getSchemaLessPropertyCompletions(i,o,b,p);let A=Ju(o);this.contributions.forEach(E=>{let O=E.collectPropertyCompletions(e.uri,A,u,S,_==="",p);O&&v.push(O)}),!m&&u.length>0&&s.charAt(a-u.length-1)!=='"'&&(p.add({kind:Ut.Property,label:this.getLabelForValue(u),insertText:this.getInsertTextForProperty(u,void 0,!1,_),insertTextFormat:Ke.Snippet,documentation:""}),p.setAsIncomplete())}let k={};return m?this.getValueCompletions(m,i,o,a,e,p,k):this.getSchemaLessValueCompletions(i,o,a,e,p),this.contributions.length>0&&this.getContributedValueCompletions(i,o,a,e,p,v),this.promiseConstructor.all(v).then(()=>{if(p.getNumberOfProposals()===0){let w=a;o&&(o.type==="string"||o.type==="number"||o.type==="boolean"||o.type==="null")&&(w=o.offset+o.length);let _=this.evaluateSeparatorAfter(e,w);this.addFillerValueCompletions(k,_,p)}return n})})}getPropertyCompletions(e,r,i,n,s,a){r.getMatchingSchemas(e.schema,i.offset).forEach(u=>{if(u.node===i&&!u.inverted){let l=u.schema.properties;l&&Object.keys(l).forEach(h=>{let p=l[h];if(typeof p=="object"&&!p.deprecationMessage&&!p.doNotSuggest){let m={kind:Ut.Property,label:h,insertText:this.getInsertTextForProperty(h,p,n,s),insertTextFormat:Ke.Snippet,filterText:this.getFilterTextForValue(h),documentation:this.fromMarkup(p.markdownDescription)||p.description||""};p.completionDetail!==void 0&&(m.detail=p.completionDetail),p.suggestSortText!==void 0&&(m.sortText=p.suggestSortText),m.insertText&&An(m.insertText,`$1${s}`)&&(m.command={title:"Suggest",command:"editor.action.triggerSuggest"}),a.add(m)}});let f=u.schema.propertyNames;if(typeof f=="object"&&!f.deprecationMessage&&!f.doNotSuggest){let h=(p,m,v,S)=>{let b={kind:Ut.Property,label:p,insertText:this.getInsertTextForProperty(p,void 0,n,s),insertTextFormat:Ke.Snippet,filterText:this.getFilterTextForValue(p),documentation:m||this.fromMarkup(f.markdownDescription)||f.description||"",sortText:S,detail:v};b.insertText&&An(b.insertText,`$1${s}`)&&(b.command={title:"Suggest",command:"editor.action.triggerSuggest"}),a.add(b)};if(f.enum)for(let p=0;p<f.enum.length;p++){let m;f.markdownEnumDescriptions&&p<f.markdownEnumDescriptions.length?m=this.fromMarkup(f.markdownEnumDescriptions[p]):f.enumDescriptions&&p<f.enumDescriptions.length&&(m=f.enumDescriptions[p]);let v=f.enumSortTexts?.[p],S=f.enumDetails?.[p];h(f.enum[p],m,S,v)}if(f.examples)for(let p=0;p<f.examples.length;p++)h(f.examples[p],void 0,void 0,void 0);f.const&&h(f.const,void 0,f.completionDetail,f.suggestSortText)}}})}getSchemaLessPropertyCompletions(e,r,i,n){let s=a=>{a.properties.forEach(o=>{let u=o.keyNode.value;n.add({kind:Ut.Property,label:u,insertText:this.getInsertTextForValue(u,""),insertTextFormat:Ke.Snippet,filterText:this.getFilterTextForValue(u),documentation:""})})};if(r.parent)if(r.parent.type==="property"){let a=r.parent.keyNode.value;e.visit(o=>(o.type==="property"&&o!==r.parent&&o.keyNode.value===a&&o.valueNode&&o.valueNode.type==="object"&&s(o.valueNode),!0))}else r.parent.type==="array"&&r.parent.items.forEach(a=>{a.type==="object"&&a!==r&&s(a)});else r.type==="object"&&n.add({kind:Ut.Property,label:"$schema",insertText:this.getInsertTextForProperty("$schema",void 0,!0,""),insertTextFormat:Ke.Snippet,documentation:"",filterText:this.getFilterTextForValue("$schema")})}getSchemaLessValueCompletions(e,r,i,n,s){let a=i;if(r&&(r.type==="string"||r.type==="number"||r.type==="boolean"||r.type==="null")&&(a=r.offset+r.length,r=r.parent),!r){s.add({kind:this.getSuggestionKind("object"),label:"Empty object",insertText:this.getInsertTextForValue({},""),insertTextFormat:Ke.Snippet,documentation:""}),s.add({kind:this.getSuggestionKind("array"),label:"Empty array",insertText:this.getInsertTextForValue([],""),insertTextFormat:Ke.Snippet,documentation:""});return}let o=this.evaluateSeparatorAfter(n,a),u=l=>{l.parent&&!Mv(l.parent,i,!0)&&s.add({kind:this.getSuggestionKind(l.type),label:this.getLabelTextForMatchingNode(l,n),insertText:this.getInsertTextForMatchingNode(l,n,o),insertTextFormat:Ke.Snippet,documentation:""}),l.type==="boolean"&&this.addBooleanValueCompletion(!l.value,o,s)};if(r.type==="property"&&i>(r.colonOffset||0)){let l=r.valueNode;if(l&&(i>l.offset+l.length||l.type==="object"||l.type==="array"))return;let f=r.keyNode.value;e.visit(h=>(h.type==="property"&&h.keyNode.value===f&&h.valueNode&&u(h.valueNode),!0)),f==="$schema"&&r.parent&&!r.parent.parent&&this.addDollarSchemaCompletions(o,s)}if(r.type==="array")if(r.parent&&r.parent.type==="property"){let l=r.parent.keyNode.value;e.visit(f=>(f.type==="property"&&f.keyNode.value===l&&f.valueNode&&f.valueNode.type==="array"&&f.valueNode.items.forEach(u),!0))}else r.items.forEach(u)}getValueCompletions(e,r,i,n,s,a,o){let u=n,l,f;if(i&&(i.type==="string"||i.type==="number"||i.type==="boolean"||i.type==="null")&&(u=i.offset+i.length,f=i,i=i.parent),!i){this.addSchemaValueCompletions(e.schema,"",a,o);return}if(i.type==="property"&&n>(i.colonOffset||0)){let h=i.valueNode;if(h&&n>h.offset+h.length)return;l=i.keyNode.value,i=i.parent}if(i&&(l!==void 0||i.type==="array")){let h=this.evaluateSeparatorAfter(s,u),p=r.getMatchingSchemas(e.schema,i.offset,f);for(let m of p)if(m.node===i&&!m.inverted&&m.schema){if(i.type==="array"&&m.schema.items){let v=a;if(m.schema.uniqueItems){let S=new Set;i.children.forEach(b=>{b.type!=="array"&&b.type!=="object"&&S.add(this.getLabelForValue(qi(b)))}),v={...a,add(b){S.has(b.label)||a.add(b)}}}if(Array.isArray(m.schema.items)){let S=this.findItemAtOffset(i,s,n);S<m.schema.items.length&&this.addSchemaValueCompletions(m.schema.items[S],h,v,o)}else this.addSchemaValueCompletions(m.schema.items,h,v,o)}if(l!==void 0){let v=!1;if(m.schema.properties){let S=m.schema.properties[l];S&&(v=!0,this.addSchemaValueCompletions(S,h,a,o))}if(m.schema.patternProperties&&!v){for(let S of Object.keys(m.schema.patternProperties))if(Es(S)?.test(l)){v=!0;let g=m.schema.patternProperties[S];this.addSchemaValueCompletions(g,h,a,o)}}if(m.schema.additionalProperties&&!v){let S=m.schema.additionalProperties;this.addSchemaValueCompletions(S,h,a,o)}}}l==="$schema"&&!i.parent&&this.addDollarSchemaCompletions(h,a),o.boolean&&(this.addBooleanValueCompletion(!0,h,a),this.addBooleanValueCompletion(!1,h,a)),o.null&&this.addNullValueCompletion(h,a)}}getContributedValueCompletions(e,r,i,n,s,a){if(!r)this.contributions.forEach(o=>{let u=o.collectDefaultCompletions(n.uri,s);u&&a.push(u)});else if((r.type==="string"||r.type==="number"||r.type==="boolean"||r.type==="null")&&(r=r.parent),r&&r.type==="property"&&i>(r.colonOffset||0)){let o=r.keyNode.value,u=r.valueNode;if((!u||i<=u.offset+u.length)&&r.parent){let l=Ju(r.parent);this.contributions.forEach(f=>{let h=f.collectValueCompletions(n.uri,l,o,s);h&&a.push(h)})}}}addSchemaValueCompletions(e,r,i,n){typeof e=="object"&&(this.addEnumValueCompletions(e,r,i),this.addDefaultValueCompletions(e,r,i),this.collectTypes(e,n),Array.isArray(e.allOf)&&e.allOf.forEach(s=>this.addSchemaValueCompletions(s,r,i,n)),Array.isArray(e.anyOf)&&e.anyOf.forEach(s=>this.addSchemaValueCompletions(s,r,i,n)),Array.isArray(e.oneOf)&&e.oneOf.forEach(s=>this.addSchemaValueCompletions(s,r,i,n)))}addDefaultValueCompletions(e,r,i,n=0){let s=!1;if(qr(e.default)){let a=e.type,o=e.default;for(let l=n;l>0;l--)o=[o],a="array";let u={kind:this.getSuggestionKind(a),label:this.getLabelForValue(o),insertText:this.getInsertTextForValue(o,r),insertTextFormat:Ke.Snippet};this.doesSupportsLabelDetails()?u.labelDetails={description:Ku.t("Default value")}:u.detail=Ku.t("Default value"),i.add(u),s=!0}Array.isArray(e.examples)&&e.examples.forEach(a=>{let o=e.type,u=a;for(let l=n;l>0;l--)u=[u],o="array";i.add({kind:this.getSuggestionKind(o),label:this.getLabelForValue(u),insertText:this.getInsertTextForValue(u,r),insertTextFormat:Ke.Snippet}),s=!0}),Array.isArray(e.defaultSnippets)&&e.defaultSnippets.forEach(a=>{let o=e.type,u=a.body,l=a.label,f,h;if(qr(u)){let p=e.type;for(let m=n;m>0;m--)u=[u],p="array";f=this.getInsertTextForSnippetValue(u,r),h=this.getFilterTextForSnippetValue(u),l=l||this.getLabelForSnippetValue(u)}else if(typeof a.bodyText=="string"){let p="",m="",v="";for(let S=n;S>0;S--)p=p+v+`[
|
|
1186
|
+
`,m=m+`
|
|
1187
|
+
`+v+"]",v+=" ",o="array";f=p+v+a.bodyText.split(`
|
|
1188
|
+
`).join(`
|
|
1189
|
+
`+v)+m+r,l=l||f,h=f.replace(/[\n]/g,"")}else return;i.add({kind:this.getSuggestionKind(o),label:l,documentation:this.fromMarkup(a.markdownDescription)||a.description,insertText:f,insertTextFormat:Ke.Snippet,filterText:h}),s=!0}),!s&&typeof e.items=="object"&&!Array.isArray(e.items)&&n<5&&this.addDefaultValueCompletions(e.items,r,i,n+1)}addEnumValueCompletions(e,r,i){if(qr(e.const)&&i.add({kind:this.getSuggestionKind(e.type),label:this.getLabelForValue(e.const),insertText:this.getInsertTextForValue(e.const,r),insertTextFormat:Ke.Snippet,documentation:this.fromMarkup(e.markdownDescription)||e.description}),Array.isArray(e.enum))for(let n=0,s=e.enum.length;n<s;n++){let a=e.enum[n],o=this.fromMarkup(e.markdownDescription)||e.description;e.markdownEnumDescriptions&&n<e.markdownEnumDescriptions.length&&this.doesSupportMarkdown()?o=this.fromMarkup(e.markdownEnumDescriptions[n]):e.enumDescriptions&&n<e.enumDescriptions.length&&(o=e.enumDescriptions[n]),i.add({kind:this.getSuggestionKind(e.type),label:this.getLabelForValue(a),insertText:this.getInsertTextForValue(a,r),insertTextFormat:Ke.Snippet,sortText:e.enumSortTexts?.[n],detail:e.enumDetails?.[n],documentation:o})}}collectTypes(e,r){if(Array.isArray(e.enum)||qr(e.const))return;let i=e.type;Array.isArray(i)?i.forEach(n=>r[n]=!0):i&&(r[i]=!0)}addFillerValueCompletions(e,r,i){e.object&&i.add({kind:this.getSuggestionKind("object"),label:"{}",insertText:this.getInsertTextForGuessedValue({},r),insertTextFormat:Ke.Snippet,detail:Ku.t("New object"),documentation:""}),e.array&&i.add({kind:this.getSuggestionKind("array"),label:"[]",insertText:this.getInsertTextForGuessedValue([],r),insertTextFormat:Ke.Snippet,detail:Ku.t("New array"),documentation:""})}addBooleanValueCompletion(e,r,i){i.add({kind:this.getSuggestionKind("boolean"),label:e?"true":"false",insertText:this.getInsertTextForValue(e,r),insertTextFormat:Ke.Snippet,documentation:""})}addNullValueCompletion(e,r){r.add({kind:this.getSuggestionKind("null"),label:"null",insertText:"null"+e,insertTextFormat:Ke.Snippet,documentation:""})}addDollarSchemaCompletions(e,r){this.schemaService.getRegisteredSchemaIds(n=>n==="http"||n==="https").forEach(n=>{n.startsWith("https://json-schema.org/draft-")&&(n=n+"#"),r.add({kind:Ut.Module,label:this.getLabelForValue(n),filterText:this.getFilterTextForValue(n),insertText:this.getInsertTextForValue(n,e),insertTextFormat:Ke.Snippet,documentation:""})})}getLabelForValue(e){return JSON.stringify(e)}getValueFromLabel(e){return JSON.parse(e)}getFilterTextForValue(e){return JSON.stringify(e)}getFilterTextForSnippetValue(e){return JSON.stringify(e).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")}getLabelForSnippetValue(e){return JSON.stringify(e).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")}getInsertTextForPlainText(e){return e.replace(/[\\\$\}]/g,"\\$&")}getInsertTextForValue(e,r){let i=JSON.stringify(e,null," ");return i==="{}"?"{$1}"+r:i==="[]"?"[$1]"+r:this.getInsertTextForPlainText(i+r)}getInsertTextForSnippetValue(e,r){return dp(e,"",n=>typeof n=="string"&&n[0]==="^"?n.substr(1):JSON.stringify(n))+r}getInsertTextForGuessedValue(e,r){switch(typeof e){case"object":return e===null?"${1:null}"+r:this.getInsertTextForValue(e,r);case"string":let i=JSON.stringify(e);return i=i.substr(1,i.length-2),i=this.getInsertTextForPlainText(i),'"${1:'+i+'}"'+r;case"number":case"boolean":return"${1:"+JSON.stringify(e)+"}"+r}return this.getInsertTextForValue(e,r)}getSuggestionKind(e){if(Array.isArray(e)){let r=e;e=r.length>0?r[0]:void 0}if(!e)return Ut.Value;switch(e){case"string":return Ut.Value;case"object":return Ut.Module;case"property":return Ut.Property;default:return Ut.Value}}getLabelTextForMatchingNode(e,r){switch(e.type){case"array":return"[]";case"object":return"{}";default:return r.getText().substr(e.offset,e.length)}}getInsertTextForMatchingNode(e,r,i){switch(e.type){case"array":return this.getInsertTextForValue([],i);case"object":return this.getInsertTextForValue({},i);default:let n=r.getText().substr(e.offset,e.length)+i;return this.getInsertTextForPlainText(n)}}getInsertTextForProperty(e,r,i,n){let s=this.getInsertTextForValue(e,"");if(!i)return s;let a=s+": ",o,u=0;if(r){if(Array.isArray(r.defaultSnippets)){if(r.defaultSnippets.length===1){let l=r.defaultSnippets[0].body;qr(l)&&(o=this.getInsertTextForSnippetValue(l,""))}u+=r.defaultSnippets.length}if(r.enum&&(!o&&r.enum.length===1&&(o=this.getInsertTextForGuessedValue(r.enum[0],"")),u+=r.enum.length),qr(r.const)&&(o||(o=this.getInsertTextForGuessedValue(r.const,"")),u++),qr(r.default)&&(o||(o=this.getInsertTextForGuessedValue(r.default,"")),u++),Array.isArray(r.examples)&&r.examples.length&&(o||(o=this.getInsertTextForGuessedValue(r.examples[0],"")),u+=r.examples.length),u===0){let l=Array.isArray(r.type)?r.type[0]:r.type;switch(l||(r.properties?l="object":r.items&&(l="array")),l){case"boolean":o="$1";break;case"string":o='"$1"';break;case"object":o="{$1}";break;case"array":o="[$1]";break;case"number":case"integer":o="${1:0}";break;case"null":o="${1:null}";break;default:return s}}}return(!o||u>1)&&(o="$1"),a+o+n}getCurrentWord(e,r){let i=r-1,n=e.getText();for(;i>=0&&`
|
|
1190
|
+
\r\v":{[,]}`.indexOf(n.charAt(i))===-1;)i--;return n.substring(i+1,r)}evaluateSeparatorAfter(e,r){let i=Nr(e.getText(),!0);switch(i.setPosition(r),i.scan()){case 5:case 2:case 4:case 17:return"";default:return","}}findItemAtOffset(e,r,i){let n=Nr(r.getText(),!0),s=e.items;for(let a=s.length-1;a>=0;a--){let o=s[a];if(i>o.offset+o.length)return n.setPosition(o.offset+o.length),n.scan()===5&&i>=n.getTokenOffset()+n.getTokenLength()?a+1:a;if(i>=o.offset)return a}return 0}isInComment(e,r,i){let n=Nr(e.getText(),!1);n.setPosition(r);let s=n.scan();for(;s!==17&&n.getTokenOffset()+n.getTokenLength()<i;)s=n.scan();return(s===12||s===13)&&n.getTokenOffset()<=i}fromMarkup(e){if(e&&this.doesSupportMarkdown())return{kind:Pi.Markdown,value:e}}doesSupportMarkdown(){if(!qr(this.supportsMarkdown)){let e=this.clientCapabilities.textDocument?.completion?.completionItem?.documentationFormat;this.supportsMarkdown=Array.isArray(e)&&e.indexOf(Pi.Markdown)!==-1}return this.supportsMarkdown}doesSupportsCommitCharacters(){return qr(this.supportsCommitCharacters)||(this.labelDetailsSupport=this.clientCapabilities.textDocument?.completion?.completionItem?.commitCharactersSupport),this.supportsCommitCharacters}doesSupportsLabelDetails(){return qr(this.labelDetailsSupport)||(this.labelDetailsSupport=this.clientCapabilities.textDocument?.completion?.completionItem?.labelDetailsSupport),this.labelDetailsSupport}}});function Fv(t){if(t)return t.trim().replace(/[\\`*_{}[\]()<>#+\-.!]/g,"\\$&").replace(/(^ +)/mg,(e,r)=>" ".repeat(r.length)).replace(/( {2,})/g,(e,r)=>" "+" ".repeat(r.length-1)).replace(/(\t+)/g,(e,r)=>" ".repeat(r.length*4)).replace(/\n/g,`\\
|
|
1191
|
+
`)}function HU(t){return t.indexOf("`")!==-1?"`` "+t+" ``":t}var gp,bO=Ae(()=>{y();$a();Mr();gp=class{constructor(e,r=[],i){this.schemaService=e,this.contributions=r,this.promise=i||Promise}doHover(e,r,i){let n=e.offsetAt(r),s=i.getNodeFromOffset(n);if(!s||(s.type==="object"||s.type==="array")&&n>s.offset+1&&n<s.offset+s.length-1)return this.promise.resolve(null);let a=s;if(s.type==="string"){let f=s.parent;if(f&&f.type==="property"&&f.keyNode===s&&(s=f.valueNode,!s))return this.promise.resolve(null)}let o=oe.create(e.positionAt(a.offset),e.positionAt(a.offset+a.length)),u=f=>({contents:f,range:o}),l=Ju(s);for(let f=this.contributions.length-1;f>=0;f--){let p=this.contributions[f].getInfoContribution(e.uri,l);if(p)return p.then(m=>u(m))}return this.schemaService.getSchemaForResource(e.uri,i).then(f=>{if(!f)return null;let h,p,m,v,S=i.getMatchingSchemas(f.schema,s.offset).filter(g=>g.node===s&&!g.inverted).map(g=>g.schema);for(let g of S)if(h=h||g.title,p=p||g.markdownDescription||Fv(g.description),g.enum){let k=g.enum.indexOf(qi(s));g.markdownEnumDescriptions?m=g.markdownEnumDescriptions[k]:g.enumDescriptions&&(m=Fv(g.enumDescriptions[k])),m&&(v=g.enum[k],typeof v!="string"&&(v=JSON.stringify(v)))}let b="";return h&&(b=Fv(h)),p&&(b.length>0&&(b+=`
|
|
1192
|
+
|
|
1193
|
+
`),b+=p),m&&(b.length>0&&(b+=`
|
|
1194
|
+
|
|
1195
|
+
`),b+=`\`${HU(v)}\`: ${m}`),u([b])})}}});function wO(t){if(t&&typeof t=="object"){if(Zr(t.allowComments))return t.allowComments;if(t.allOf)for(let e of t.allOf){let r=wO(e);if(Zr(r))return r}}}function xO(t){if(t&&typeof t=="object"){if(Zr(t.allowTrailingCommas))return t.allowTrailingCommas;let e=t;if(Zr(e.allowsTrailingCommas))return e.allowsTrailingCommas;if(t.allOf)for(let r of t.allOf){let i=xO(r);if(Zr(i))return i}}}function yp(t){switch(t){case"error":return $t.Error;case"warning":return $t.Warning;case"ignore":return}}var SO,_p,GU,kO=Ae(()=>{y();Mr();SO=ia(Ls());Vu();_p=class{constructor(e,r){this.jsonSchemaService=e,this.promise=r,this.validationEnabled=!0}configure(e){e&&(this.validationEnabled=e.validate!==!1,this.commentSeverity=e.allowComments?void 0:$t.Error)}doValidation(e,r,i,n){if(!this.validationEnabled)return this.promise.resolve([]);let s=[],a={},o=l=>{let f=l.range.start.line+" "+l.range.start.character+" "+l.message;a[f]||(a[f]=!0,s.push(l))},u=l=>{let f=i?.trailingCommas?yp(i.trailingCommas):$t.Error,h=i?.comments?yp(i.comments):this.commentSeverity,p=i?.schemaValidation?yp(i.schemaValidation):$t.Warning,m=i?.schemaRequest?yp(i.schemaRequest):$t.Warning;if(l){let v=(S,b,g)=>{if(r.root&&m){let k=r.root,w=k.type==="object"?k.properties[0]:void 0;if(w&&w.keyNode.value==="$schema"){let _=w.valueNode||w,A=oe.create(e.positionAt(_.offset),e.positionAt(_.offset+_.length));o(Cr.create(A,S,m,b,"json",g))}else{let _=oe.create(e.positionAt(k.offset),e.positionAt(k.offset+1));o(Cr.create(_,S,m,b,"json",g))}}};if(l.errors.length){let S=l.errors[0];v(S.message,S.code,S.relatedInformation)}else if(p){for(let b of l.warnings)v(b.message,b.code,b.relatedInformation);let S=r.validate(e,l.schema,p,i?.schemaDraft);S&&S.forEach(o)}wO(l.schema)&&(h=void 0),xO(l.schema)&&(f=void 0)}for(let v of r.syntaxErrors){if(v.code===ce.TrailingComma){if(typeof f!="number")continue;v.severity=f}o(v)}if(typeof h=="number"){let v=SO.t("Comments are not permitted in JSON.");r.comments.forEach(S=>{o(Cr.create(S,v,h,ce.CommentNotPermitted))})}return s};if(n){let l=n.id||"schemaservice://untitled/"+GU++;return this.jsonSchemaService.registerExternalSchema({uri:l,schema:n}).getResolvedSchema().then(h=>u(h))}return this.jsonSchemaService.getSchemaForResource(e.uri,r).then(l=>u(l))}getLanguageStatus(e,r){return{schemas:this.jsonSchemaService.getSchemaURIsForResource(e.uri,r)}}},GU=0});function ut(t){return t<48?0:t<=57?t-48:(t<97&&(t+=32),t>=97&&t<=102?t-97+10:0)}function IO(t){if(t[0]==="#")switch(t.length){case 4:return{red:ut(t.charCodeAt(1))*17/255,green:ut(t.charCodeAt(2))*17/255,blue:ut(t.charCodeAt(3))*17/255,alpha:1};case 5:return{red:ut(t.charCodeAt(1))*17/255,green:ut(t.charCodeAt(2))*17/255,blue:ut(t.charCodeAt(3))*17/255,alpha:ut(t.charCodeAt(4))*17/255};case 7:return{red:(ut(t.charCodeAt(1))*16+ut(t.charCodeAt(2)))/255,green:(ut(t.charCodeAt(3))*16+ut(t.charCodeAt(4)))/255,blue:(ut(t.charCodeAt(5))*16+ut(t.charCodeAt(6)))/255,alpha:1};case 9:return{red:(ut(t.charCodeAt(1))*16+ut(t.charCodeAt(2)))/255,green:(ut(t.charCodeAt(3))*16+ut(t.charCodeAt(4)))/255,blue:(ut(t.charCodeAt(5))*16+ut(t.charCodeAt(6)))/255,alpha:(ut(t.charCodeAt(7))*16+ut(t.charCodeAt(8)))/255}}}var AO=Ae(()=>{y()});function On(t,e){return oe.create(t.positionAt(e.offset),t.positionAt(e.offset+e.length))}function TO(t){return qi(t)||EO.t("<empty>")}var EO,vp,OO=Ae(()=>{y();$a();$u();AO();EO=ia(Ls());Mr();vp=class{constructor(e){this.schemaService=e}findDocumentSymbols(e,r,i={resultLimit:Number.MAX_VALUE}){let n=r.root;if(!n)return[];let s=i.resultLimit||Number.MAX_VALUE,a=e.uri;if((a==="vscode://defaultsettings/keybindings.json"||An(a.toLowerCase(),"/user/keybindings.json"))&&n.type==="array"){let p=[];for(let m of n.items)if(m.type==="object"){for(let v of m.properties)if(v.keyNode.value==="key"&&v.valueNode){let S=nn.create(e.uri,On(e,m));if(p.push({name:TO(v.valueNode),kind:Rr.Function,location:S}),s--,s<=0)return i&&i.onResultLimitExceeded&&i.onResultLimitExceeded(a),p}}return p}let o=[{node:n,containerName:""}],u=0,l=!1,f=[],h=(p,m)=>{p.type==="array"?p.items.forEach(v=>{v&&o.push({node:v,containerName:m})}):p.type==="object"&&p.properties.forEach(v=>{let S=v.valueNode;if(S)if(s>0){s--;let b=nn.create(e.uri,On(e,v)),g=m?m+"."+v.keyNode.value:v.keyNode.value;f.push({name:this.getKeyLabel(v),kind:this.getSymbolKind(S.type),location:b,containerName:m}),o.push({node:S,containerName:g})}else l=!0})};for(;u<o.length;){let p=o[u++];h(p.node,p.containerName)}return l&&i&&i.onResultLimitExceeded&&i.onResultLimitExceeded(a),f}findDocumentSymbols2(e,r,i={resultLimit:Number.MAX_VALUE}){let n=r.root;if(!n)return[];let s=i.resultLimit||Number.MAX_VALUE,a=e.uri;if((a==="vscode://defaultsettings/keybindings.json"||An(a.toLowerCase(),"/user/keybindings.json"))&&n.type==="array"){let p=[];for(let m of n.items)if(m.type==="object"){for(let v of m.properties)if(v.keyNode.value==="key"&&v.valueNode){let S=On(e,m),b=On(e,v.keyNode);if(p.push({name:TO(v.valueNode),kind:Rr.Function,range:S,selectionRange:b}),s--,s<=0)return i&&i.onResultLimitExceeded&&i.onResultLimitExceeded(a),p}}return p}let o=[],u=[{node:n,result:o}],l=0,f=!1,h=(p,m)=>{p.type==="array"?p.items.forEach((v,S)=>{if(v)if(s>0){s--;let b=On(e,v),g=b,w={name:String(S),kind:this.getSymbolKind(v.type),range:b,selectionRange:g,children:[]};m.push(w),u.push({result:w.children,node:v})}else f=!0}):p.type==="object"&&p.properties.forEach(v=>{let S=v.valueNode;if(S)if(s>0){s--;let b=On(e,v),g=On(e,v.keyNode),k=[],w={name:this.getKeyLabel(v),kind:this.getSymbolKind(S.type),range:b,selectionRange:g,children:k,detail:this.getDetail(S)};m.push(w),u.push({result:k,node:S})}else f=!0})};for(;l<u.length;){let p=u[l++];h(p.node,p.result)}return f&&i&&i.onResultLimitExceeded&&i.onResultLimitExceeded(a),o}getSymbolKind(e){switch(e){case"object":return Rr.Module;case"string":return Rr.String;case"number":return Rr.Number;case"array":return Rr.Array;case"boolean":return Rr.Boolean;default:return Rr.Variable}}getKeyLabel(e){let r=e.keyNode.value;return r&&(r=r.replace(/[\n]/g,"\u21B5")),r&&r.trim()?r:`"${r}"`}getDetail(e){if(e){if(e.type==="boolean"||e.type==="number"||e.type==="null"||e.type==="string")return String(e.value);if(e.type==="array")return e.children.length?void 0:"[]";if(e.type==="object")return e.children.length?void 0:"{}"}}findDocumentColors(e,r,i){return this.schemaService.getSchemaForResource(e.uri,r).then(n=>{let s=[];if(n){let a=i&&typeof i.resultLimit=="number"?i.resultLimit:Number.MAX_VALUE,o=r.getMatchingSchemas(n.schema),u={};for(let l of o)if(!l.inverted&&l.schema&&(l.schema.format==="color"||l.schema.format==="color-hex")&&l.node&&l.node.type==="string"){let f=String(l.node.offset);if(!u[f]){let h=IO(qi(l.node));if(h){let p=On(e,l.node);s.push({color:h,range:p})}if(u[f]=!0,a--,a<=0)return i&&i.onResultLimitExceeded&&i.onResultLimitExceeded(e.uri),s}}}return s})}getColorPresentations(e,r,i,n){let s=[],a=Math.round(i.red*255),o=Math.round(i.green*255),u=Math.round(i.blue*255);function l(h){let p=h.toString(16);return p.length!==2?"0"+p:p}let f;return i.alpha===1?f=`#${l(a)}${l(o)}${l(u)}`:f=`#${l(a)}${l(o)}${l(u)}${l(Math.round(i.alpha*255))}`,s.push({label:f,textEdit:rr.replace(n,JSON.stringify(f))}),s}}});var NO,LO=Ae(()=>{y();NO={$id:"https://json-schema.org/draft/2019-09/schema",$schema:"https://json-schema.org/draft/2019-09/schema",title:"(Flattened static) Core and Validation specifications meta-schema",type:["object","boolean"],properties:{definitions:{$comment:"While no longer an official keyword as it is replaced by $defs, this keyword is retained in the meta-schema to prevent incompatible extensions as it remains in common use.",type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{$comment:'"dependencies" is no longer a keyword, but schema authors should avoid redefining it to facilitate a smooth transition to "dependentSchemas" and "dependentRequired"',type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/$defs/stringArray"}]}},$id:{type:"string",format:"uri-reference",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{type:"string",format:"uri"},$anchor:{type:"string",pattern:"^[A-Za-z][-A-Za-z0-9.:_]*$"},$ref:{type:"string",format:"uri-reference"},$recursiveAnchor:{type:"boolean",default:!1},$vocabulary:{type:"object",propertyNames:{type:"string",format:"uri"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$ref:"#"},default:{}},additionalItems:{$ref:"#"},unevaluatedItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/$defs/schemaArray"}]},contains:{$ref:"#"},additionalProperties:{$ref:"#"},unevaluatedProperties:{$ref:"#"},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$ref:"#"}},propertyNames:{$ref:"#"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$ref:"#"},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}},const:!0,enum:{type:"array",items:!0},type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},contentSchema:{$ref:"#"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}}});var PO,qO=Ae(()=>{y();PO={$id:"https://json-schema.org/draft/2020-12/schema",$schema:"https://json-schema.org/draft/2020-12/schema",title:"(Flattened static) Core and Validation specifications meta-schema",type:["object","boolean"],properties:{definitions:{$comment:"While no longer an official keyword as it is replaced by $defs, this keyword is retained in the meta-schema to prevent incompatible extensions as it remains in common use.",type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{$comment:'"dependencies" is no longer a keyword, but schema authors should avoid redefining it to facilitate a smooth transition to "dependentSchemas" and "dependentRequired"',type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/$defs/stringArray"}]}},$id:{type:"string",format:"uri-reference",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{type:"string",format:"uri"},$anchor:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},$ref:{type:"string",format:"uri-reference"},$dynamicRef:{type:"string",format:"uri-reference"},$vocabulary:{type:"object",propertyNames:{type:"string",format:"uri"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$ref:"#"},default:{}},prefixItems:{$ref:"#/$defs/schemaArray"},items:{$ref:"#"},contains:{$ref:"#"},additionalProperties:{$ref:"#"},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$ref:"#"}},propertyNames:{$ref:"#"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$ref:"#"},unevaluatedItems:{$ref:"#"},unevaluatedProperties:{$ref:"#"},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}},const:!0,enum:{type:"array",items:!0},type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},contentSchema:{$ref:"#"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}}});var le,bp,WU,CO=Ae(()=>{y();LO();qO();le=ia(Ls()),bp={schemaAssociations:[],schemas:{"https://json-schema.org/draft-04/schema":{definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{type:"string",enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},type:"object",properties:{id:{type:"string",format:"uri"},$schema:{type:"string",format:"uri"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minLength:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minItems:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},uniqueItems:{type:"boolean",default:!1},maxProperties:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minProperties:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},required:{allOf:[{$ref:"#/definitions/stringArray"}]},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{anyOf:[{type:"string",enum:["date-time","uri","email","hostname","ipv4","ipv6","regex"]},{type:"string"}]},allOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},anyOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},oneOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},not:{allOf:[{$ref:"#"}]}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},default:{}},"https://json-schema.org/draft-07/schema":{definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0},"https://json-schema.org/draft/2020-12/schema":PO,"https://json-schema.org/draft/2019-09/schema":NO}},WU={id:le.t("A unique identifier for the schema."),$schema:le.t("The schema to verify this document against."),title:le.t("A descriptive title of the schema."),description:le.t("A long description of the schema. Used in hover menus and suggestions."),default:le.t("A default value. Used by suggestions."),multipleOf:le.t("A number that should cleanly divide the current value (i.e. have no remainder)."),maximum:le.t("The maximum numerical value, inclusive by default."),exclusiveMaximum:le.t("Makes the maximum property exclusive."),minimum:le.t("The minimum numerical value, inclusive by default."),exclusiveMinimum:le.t("Makes the minimum property exclusive."),maxLength:le.t("The maximum length of a string."),minLength:le.t("The minimum length of a string."),pattern:le.t("A regular expression to match the string against. It is not implicitly anchored."),additionalItems:le.t("For arrays, only when items is set as an array. If items are a schema, this schema validates items after the ones specified by the items schema. If false, additional items will cause validation to fail."),items:le.t("For arrays. Can either be a schema to validate every element against or an array of schemas to validate each item against in order (the first schema will validate the first element, the second schema will validate the second element, and so on."),maxItems:le.t("The maximum number of items that can be inside an array. Inclusive."),minItems:le.t("The minimum number of items that can be inside an array. Inclusive."),uniqueItems:le.t("If all of the items in the array must be unique. Defaults to false."),maxProperties:le.t("The maximum number of properties an object can have. Inclusive."),minProperties:le.t("The minimum number of properties an object can have. Inclusive."),required:le.t("An array of strings that lists the names of all properties required on this object."),additionalProperties:le.t("Either a schema or a boolean. If a schema, used to validate all properties not matched by 'properties', 'propertyNames', or 'patternProperties'. If false, any properties not defined by the adjacent keywords will cause this schema to fail."),definitions:le.t("Not used for validation. Place subschemas here that you wish to reference inline with $ref."),properties:le.t("A map of property names to schemas for each property."),patternProperties:le.t("A map of regular expressions on property names to schemas for matching properties."),dependencies:le.t("A map of property names to either an array of property names or a schema. An array of property names means the property named in the key depends on the properties in the array being present in the object in order to be valid. If the value is a schema, then the schema is only applied to the object if the property in the key exists on the object."),enum:le.t("The set of literal values that are valid."),type:le.t("Either a string of one of the basic schema types (number, integer, null, array, object, boolean, string) or an array of strings specifying a subset of those types."),format:le.t("Describes the format expected for the value. By default, not used for validation"),allOf:le.t("An array of schemas, all of which must match."),anyOf:le.t("An array of schemas, where at least one must match."),oneOf:le.t("An array of schemas, exactly one of which must match."),not:le.t("A schema which must not match."),$id:le.t("A unique identifier for the schema."),$ref:le.t("Reference a definition hosted on any location."),$comment:le.t("Comments from schema authors to readers or maintainers of the schema."),readOnly:le.t("Indicates that the value of the instance is managed exclusively by the owning authority."),examples:le.t("Sample JSON values associated with a particular schema, for the purpose of illustrating usage."),contains:le.t('An array instance is valid against "contains" if at least one of its elements is valid against the given schema.'),propertyNames:le.t("If the instance is an object, this keyword validates if every property name in the instance validates against the provided schema."),const:le.t("An instance validates successfully against this keyword if its value is equal to the value of the keyword."),contentMediaType:le.t("Describes the media type of a string property."),contentEncoding:le.t("Describes the content encoding of a string property."),if:le.t('The validation outcome of the "if" subschema controls which of the "then" or "else" keywords are evaluated.'),then:le.t('The "then" subschema is used for validation when the "if" subschema succeeds.'),else:le.t('The "else" subschema is used for validation when the "if" subschema fails.')};for(let t in bp.schemas){let e=bp.schemas[t];for(let r in e.properties){let i=e.properties[r];typeof i=="boolean"&&(i=e.properties[r]={});let n=WU[r];n&&(i.description=n)}}});function RO(t,e){if(typeof t!="string")throw new TypeError("Expected a string");let r=String(t),i="",n=e?!!e.extended:!1,s=e?!!e.globstar:!1,a=!1,o=e&&typeof e.flags=="string"?e.flags:"",u;for(let l=0,f=r.length;l<f;l++)switch(u=r[l],u){case"/":case"$":case"^":case"+":case".":case"(":case")":case"=":case"!":case"|":i+="\\"+u;break;case"?":if(n){i+=".";break}case"[":case"]":if(n){i+=u;break}case"{":if(n){a=!0,i+="(";break}case"}":if(n){a=!1,i+=")";break}case",":if(a){i+="|";break}i+="\\"+u;break;case"*":let h=r[l-1],p=1;for(;r[l+1]==="*";)p++,l++;let m=r[l+1];s?p>1&&(h==="/"||h===void 0||h==="{"||h===",")&&(m==="/"||m===void 0||m===","||m==="}")?(m==="/"?l++:h==="/"&&i.endsWith("\\/")&&(i=i.substr(0,i.length-2)),i+="((?:[^/]*(?:/|$))*)"):i+="([^/]*)":i+=".*";break;default:i+=u}return(!o||!~o.indexOf("g"))&&(i="^"+i+"$"),new RegExp(i,o)}var MO=Ae(()=>{y()});function Ci(t,e,r){let i=r?[{location:{uri:r,range:oe.create(0,0,0,0)},message:t}]:void 0;return{message:t,code:e,relatedInformation:i}}function DO(t){try{return Ba.parse(t).with({fragment:null,query:null}).toString(!0)}catch{return t}}function Qu(t){try{let e=Ba.parse(t);if(e.scheme==="file")return e.fsPath}catch{}return t}var yi,zU,JU,jv,Bv,Ps,Sp,wp,KU,FO=Ae(()=>{y();xi();Tv();$u();$a();Mr();yi=ia(Ls());MO();Vu();kv();zU="!",JU="/",jv=class{constructor(e,r,i){this.folderUri=r,this.uris=i,this.globWrappers=[];try{for(let n of e){let s=n[0]!==zU;s||(n=n.substring(1)),n.length>0&&(n[0]===JU&&(n=n.substring(1)),this.globWrappers.push({regexp:RO("**/"+n,{extended:!0,globstar:!0}),include:s}))}r&&(r=DO(r),r.endsWith("/")||(r=r+"/"),this.folderUri=r)}catch{this.globWrappers.length=0,this.uris=[]}}matchesPattern(e){if(this.folderUri&&!e.startsWith(this.folderUri))return!1;let r=!1;for(let{regexp:i,include:n}of this.globWrappers)i.test(e)&&(r=n);return r}getURIs(){return this.uris}},Bv=class{constructor(e,r,i){this.service=e,this.uri=r,this.dependencies=new Set,this.anchors=void 0,i&&(this.unresolvedSchema=this.service.promise.resolve(new Ps(i)))}getUnresolvedSchema(){return this.unresolvedSchema||(this.unresolvedSchema=this.service.loadSchema(this.uri)),this.unresolvedSchema}getResolvedSchema(){return this.resolvedSchema||(this.resolvedSchema=this.getUnresolvedSchema().then(e=>this.service.resolveSchemaContent(e,this))),this.resolvedSchema}clearSchema(){let e=!!this.unresolvedSchema;return this.resolvedSchema=void 0,this.unresolvedSchema=void 0,this.dependencies.clear(),this.anchors=void 0,e}},Ps=class{constructor(e,r=[]){this.schema=e,this.errors=r}};Sp=class{constructor(e,r=[],i=[],n){this.schema=e,this.errors=r,this.warnings=i,this.schemaDraft=n}getSection(e){let r=this.getSectionRecursive(e,this.schema);if(r)return Ht(r)}getSectionRecursive(e,r){if(!r||typeof r=="boolean"||e.length===0)return r;let i=e.shift();if(r.properties&&typeof r.properties[i])return this.getSectionRecursive(e,r.properties[i]);if(r.patternProperties){for(let n of Object.keys(r.patternProperties))if(Es(n)?.test(i))return this.getSectionRecursive(e,r.patternProperties[n])}else{if(typeof r.additionalProperties=="object")return this.getSectionRecursive(e,r.additionalProperties);if(i.match("[0-9]+")){if(Array.isArray(r.items)){let n=parseInt(i,10);if(!isNaN(n)&&r.items[n])return this.getSectionRecursive(e,r.items[n])}else if(r.items)return this.getSectionRecursive(e,r.items)}}}},wp=class{constructor(e,r,i){this.contextService=r,this.requestService=e,this.promiseConstructor=i||Promise,this.callOnDispose=[],this.contributionSchemas={},this.contributionAssociations=[],this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={}}getRegisteredSchemaIds(e){return Object.keys(this.registeredSchemasIds).filter(r=>{let i=Ba.parse(r).scheme;return i!=="schemaservice"&&(!e||e(i))})}get promise(){return this.promiseConstructor}dispose(){for(;this.callOnDispose.length>0;)this.callOnDispose.pop()()}onResourceChange(e){this.cachedSchemaForResource=void 0;let r=!1;e=an(e);let i=[e],n=Object.keys(this.schemasById).map(s=>this.schemasById[s]);for(;i.length;){let s=i.pop();for(let a=0;a<n.length;a++){let o=n[a];o&&(o.uri===s||o.dependencies.has(s))&&(o.uri!==s&&i.push(o.uri),o.clearSchema()&&(r=!0),n[a]=void 0)}}return r}setSchemaContributions(e){if(e.schemas){let r=e.schemas;for(let i in r){let n=an(i);this.contributionSchemas[n]=this.addSchemaHandle(n,r[i])}}if(Array.isArray(e.schemaAssociations)){let r=e.schemaAssociations;for(let i of r){let n=i.uris.map(an),s=this.addFilePatternAssociation(i.pattern,i.folderUri,n);this.contributionAssociations.push(s)}}}addSchemaHandle(e,r){let i=new Bv(this,e,r);return this.schemasById[e]=i,i}getOrAddSchemaHandle(e,r){return this.schemasById[e]||this.addSchemaHandle(e,r)}addFilePatternAssociation(e,r,i){let n=new jv(e,r,i);return this.filePatternAssociations.push(n),n}registerExternalSchema(e){let r=an(e.uri);return this.registeredSchemasIds[r]=!0,this.cachedSchemaForResource=void 0,e.fileMatch&&e.fileMatch.length&&this.addFilePatternAssociation(e.fileMatch,e.folderUri,[r]),e.schema?this.addSchemaHandle(r,e.schema):this.getOrAddSchemaHandle(r)}clearExternalSchemas(){this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={},this.cachedSchemaForResource=void 0;for(let e in this.contributionSchemas)this.schemasById[e]=this.contributionSchemas[e],this.registeredSchemasIds[e]=!0;for(let e of this.contributionAssociations)this.filePatternAssociations.push(e)}getResolvedSchema(e){let r=an(e),i=this.schemasById[r];return i?i.getResolvedSchema():this.promise.resolve(void 0)}loadSchema(e){if(!this.requestService){let r=yi.t("Unable to load schema from '{0}'. No schema request service available",Qu(e));return this.promise.resolve(new Ps({},[Ci(r,ce.SchemaResolveError,e)]))}return this.requestService(e).then(r=>{if(!r){let a=yi.t("Unable to load schema from '{0}': No content.",Qu(e));return new Ps({},[Ci(a,ce.SchemaResolveError,e)])}let i=[];r.charCodeAt(0)===65279&&(i.push(Ci(yi.t("Problem reading content from '{0}': UTF-8 with BOM detected, only UTF 8 is allowed.",Qu(e)),ce.SchemaResolveError,e)),r=r.trimStart());let n={},s=[];return n=_g(r,s),s.length&&i.push(Ci(yi.t("Unable to parse content from '{0}': Parse error at offset {1}.",Qu(e),s[0].offset),ce.SchemaResolveError,e)),new Ps(n,i)},r=>{let{message:i,code:n}=r;if(typeof i!="string"){let o=r.toString(),u=r.toString().split("Error: ");u.length>1&&(o=u[1]),An(o,".")&&(o=o.substr(0,o.length-1)),i=o}let s=ce.SchemaResolveError;typeof n=="number"&&n<65536&&(s+=n);let a=yi.t("Unable to load schema from '{0}': {1}.",Qu(e),i);return new Ps({},[Ci(a,s,e)])})}resolveSchemaContent(e,r){let i=e.errors.slice(0),n=e.schema,s=n.$schema?Rv(n.$schema):void 0;if(s===cr.v3)return this.promise.resolve(new Sp({},[Ci(yi.t("Draft-03 schemas are not supported."),ce.SchemaUnsupportedFeature)],[],s));let a=new Set,o=this.contextService,u=(S,b)=>{b=decodeURIComponent(b);let g=S;return b[0]==="/"&&(b=b.substring(1)),b.split("/").some(k=>(k=k.replace(/~1/g,"/").replace(/~0/g,"~"),g=g[k],!g)),g},l=(S,b,g)=>(b.anchors||(b.anchors=v(S)),b.anchors.get(g)),f=(S,b)=>{for(let g in b)b.hasOwnProperty(g)&&g!=="id"&&g!=="$id"&&(S[g]=b[g])},h=(S,b,g,k)=>{let w;if(k===void 0||k.length===0?w=b:k.charAt(0)==="/"?w=u(b,k):w=l(b,g,k),w)f(S,w);else{let _=yi.t("$ref '{0}' in '{1}' can not be resolved.",k||"",g.uri);i.push(Ci(_,ce.SchemaResolveError))}},p=(S,b,g,k)=>{o&&!/^[A-Za-z][A-Za-z0-9+\-.+]*:\/.*/.test(b)&&(b=o.resolveRelativePath(b,k.uri)),b=an(b);let w=this.getOrAddSchemaHandle(b);return w.getUnresolvedSchema().then(_=>{if(k.dependencies.add(b),_.errors.length){let A=_.errors[0],E=g?b+"#"+g:b,O=g?yi.t("Problems loading reference '{0}': {1}",g,A.message):A.message;i.push(Ci(O,A.code,b))}return h(S,_.schema,w,g),m(S,_.schema,w)})},m=(S,b,g)=>{let k=[];return this.traverseNodes(S,w=>{let _=new Set;for(;w.$ref;){let A=w.$ref,E=A.split("#",2);if(delete w.$ref,E[0].length>0){k.push(p(w,E[0],E[1],g));return}else if(!_.has(A)){let O=E[1];h(w,b,g,O),_.add(A)}}w.$recursiveRef&&a.add("$recursiveRef"),w.$dynamicRef&&a.add("$dynamicRef")}),this.promise.all(k)},v=S=>{let b=new Map;return this.traverseNodes(S,g=>{let k=g.$id||g.id,w=Hf(k)&&k.charAt(0)==="#"?k.substring(1):g.$anchor;w&&(b.has(w)?i.push(Ci(yi.t("Duplicate anchor declaration: '{0}'",w),ce.SchemaResolveError)):b.set(w,g)),g.$recursiveAnchor&&a.add("$recursiveAnchor"),g.$dynamicAnchor&&a.add("$dynamicAnchor")}),b};return m(n,n,r).then(S=>{let b=[];return a.size&&b.push(Ci(yi.t("The schema uses meta-schema features ({0}) that are not yet supported by the validator.",Array.from(a.keys()).join(", ")),ce.SchemaUnsupportedFeature)),new Sp(n,i,b,s)})}traverseNodes(e,r){if(!e||typeof e!="object")return Promise.resolve(null);let i=new Set,n=(...f)=>{for(let h of f)Li(h)&&u.push(h)},s=(...f)=>{for(let h of f)if(Li(h))for(let p in h){let v=h[p];Li(v)&&u.push(v)}},a=(...f)=>{for(let h of f)if(Array.isArray(h))for(let p of h)Li(p)&&u.push(p)},o=f=>{if(Array.isArray(f))for(let h of f)Li(h)&&u.push(h);else Li(f)&&u.push(f)},u=[e],l=u.pop();for(;l;)i.has(l)||(i.add(l),r(l),n(l.additionalItems,l.additionalProperties,l.not,l.contains,l.propertyNames,l.if,l.then,l.else,l.unevaluatedItems,l.unevaluatedProperties),s(l.definitions,l.$defs,l.properties,l.patternProperties,l.dependencies,l.dependentSchemas),a(l.anyOf,l.allOf,l.oneOf,l.prefixItems),o(l.items)),l=u.pop()}getSchemaFromProperty(e,r){if(r.root?.type==="object"){for(let i of r.root.properties)if(i.keyNode.value==="$schema"&&i.valueNode?.type==="string"){let n=i.valueNode.value;return this.contextService&&!/^\w[\w\d+.-]*:/.test(n)&&(n=this.contextService.resolveRelativePath(n,e)),n}}}getAssociatedSchemas(e){let r=Object.create(null),i=[],n=DO(e);for(let s of this.filePatternAssociations)if(s.matchesPattern(n))for(let a of s.getURIs())r[a]||(i.push(a),r[a]=!0);return i}getSchemaURIsForResource(e,r){let i=r&&this.getSchemaFromProperty(e,r);return i?[i]:this.getAssociatedSchemas(e)}getSchemaForResource(e,r){if(r){let s=this.getSchemaFromProperty(e,r);if(s){let a=an(s);return this.getOrAddSchemaHandle(a).getResolvedSchema()}}if(this.cachedSchemaForResource&&this.cachedSchemaForResource.resource===e)return this.cachedSchemaForResource.resolvedSchema;let i=this.getAssociatedSchemas(e),n=i.length>0?this.createCombinedSchema(e,i).getResolvedSchema():this.promise.resolve(void 0);return this.cachedSchemaForResource={resource:e,resolvedSchema:n},n}createCombinedSchema(e,r){if(r.length===1)return this.getOrAddSchemaHandle(r[0]);{let i="schemaservice://combinedSchema/"+encodeURIComponent(e),n={allOf:r.map(s=>({$ref:s}))};return this.addSchemaHandle(i,n)}}getMatchingSchemas(e,r,i){if(i){let n=i.id||"schemaservice://untitled/matchingSchemas/"+KU++;return this.addSchemaHandle(n,i).getResolvedSchema().then(a=>r.getMatchingSchemas(a.schema).filter(o=>!o.inverted))}return this.getSchemaForResource(e.uri,r).then(n=>n?r.getMatchingSchemas(n.schema).filter(s=>!s.inverted):[])}},KU=0});function jO(t,e){let r=[],i=[],n=[],s=-1,a=Nr(t.getText(),!1),o=a.scan();function u(v){r.push(v),i.push(n.length)}for(;o!==17;){switch(o){case 1:case 3:{let v=t.positionAt(a.getTokenOffset()).line,S={startLine:v,endLine:v,kind:o===1?"object":"array"};n.push(S);break}case 2:case 4:{let v=o===2?"object":"array";if(n.length>0&&n[n.length-1].kind===v){let S=n.pop(),b=t.positionAt(a.getTokenOffset()).line;S&&b>S.startLine+1&&s!==S.startLine&&(S.endLine=b-1,u(S),s=S.startLine)}break}case 13:{let v=t.positionAt(a.getTokenOffset()).line,S=t.positionAt(a.getTokenOffset()+a.getTokenLength()).line;a.getTokenError()===1&&v+1<t.lineCount?a.setPosition(t.offsetAt(Me.create(v+1,0))):v<S&&(u({startLine:v,endLine:S,kind:Tn.Comment}),s=v);break}case 12:{let S=t.getText().substr(a.getTokenOffset(),a.getTokenLength()).match(/^\/\/\s*#(region\b)|(endregion\b)/);if(S){let b=t.positionAt(a.getTokenOffset()).line;if(S[1]){let g={startLine:b,endLine:b,kind:Tn.Region};n.push(g)}else{let g=n.length-1;for(;g>=0&&n[g].kind!==Tn.Region;)g--;if(g>=0){let k=n[g];n.length=g,b>k.startLine&&s!==k.startLine&&(k.endLine=b,u(k),s=k.startLine)}}}break}}o=a.scan()}let l=e&&e.rangeLimit;if(typeof l!="number"||r.length<=l)return r;e&&e.onRangeLimitExceeded&&e.onRangeLimitExceeded(t.uri);let f=[];for(let v of i)v<30&&(f[v]=(f[v]||0)+1);let h=0,p=0;for(let v=0;v<f.length;v++){let S=f[v];if(S){if(S+h>l){p=v;break}h+=S}}let m=[];for(let v=0;v<r.length;v++){let S=i[v];typeof S=="number"&&(S<p||S===p&&h++<l)&&m.push(r[v])}return m}var BO=Ae(()=>{y();xi();Mr()});function VO(t,e,r){function i(o){let u=t.offsetAt(o),l=r.getNodeFromOffset(u,!0),f=[];for(;l;){switch(l.type){case"string":case"object":case"array":let p=l.offset+1,m=l.offset+l.length-1;p<m&&u>=p&&u<=m&&f.push(n(p,m)),f.push(n(l.offset,l.offset+l.length));break;case"number":case"boolean":case"null":case"property":f.push(n(l.offset,l.offset+l.length));break}if(l.type==="property"||l.parent&&l.parent.type==="array"){let p=a(l.offset+l.length,5);p!==-1&&f.push(n(l.offset,p))}l=l.parent}let h;for(let p=f.length-1;p>=0;p--)h=Ns.create(f[p],h);return h||(h=Ns.create(oe.create(o,o))),h}function n(o,u){return oe.create(t.positionAt(o),t.positionAt(u))}let s=Nr(t.getText(),!0);function a(o,u){return s.setPosition(o),s.scan()===u?s.getTokenOffset()+s.getTokenLength():-1}return e.map(i)}var $O=Ae(()=>{y();Mr();xi()});function Yu(t,e,r){let i;if(r){let s=t.offsetAt(r.start),a=t.offsetAt(r.end)-s;i={offset:s,length:a}}let n={tabSize:e?e.tabSize:4,insertSpaces:e?.insertSpaces===!0,insertFinalNewline:e?.insertFinalNewline===!0,eol:`
|
|
1196
|
+
`,keepLines:e?.keepLines===!0};return wg(t.getText(),i,n).map(s=>rr.replace(oe.create(t.positionAt(s.offset),t.positionAt(s.offset+s.length)),s.content))}var Vv=Ae(()=>{y();xi();Mr()});function QU(t,e){let r=t.propertyName.toLowerCase(),i=e.propertyName.toLowerCase();return r<i?-1:r>i?1:0}function YU(t,e,r){let i=e.propertyName.toLowerCase(),n=t[0].propertyName.toLowerCase(),s=t[t.length-1].propertyName.toLowerCase();if(i<n)return 0;if(i>s)return t.length;let a=0,o=t.length-1;for(;a<=o;){let u=o+a>>1,l=r(e,t[u]);if(l>0)a=u+1;else if(l<0)o=u-1;else return u}return-a-1}var ct,qs,UO=Ae(()=>{y();(function(t){t[t.Object=0]="Object",t[t.Array=1]="Array"})(ct||(ct={}));qs=class{constructor(e,r){this.propertyName=e??"",this.beginningLineNumber=r,this.childrenProperties=[],this.lastProperty=!1,this.noKeyName=!1}addChildProperty(e){if(e.parent=this,this.childrenProperties.length>0){let r=0;e.noKeyName?r=this.childrenProperties.length:r=YU(this.childrenProperties,e,QU),r<0&&(r=r*-1-1),this.childrenProperties.splice(r,0,e)}else this.childrenProperties.push(e);return e}}});function GO(t,e){let r={...e,keepLines:!1},i=kr.applyEdits(t,Yu(t,r,void 0)),n=kr.create("test://test.json","json",0,i),s=XU(n),a=ZU(n,s),o=Yu(a,r,void 0),u=kr.applyEdits(a,o);return[rr.replace(oe.create(Me.create(0,0),t.positionAt(t.getText().length)),u)]}function XU(t){let e=t.getText(),r=Nr(e,!1),i=new qs,n=i,s=i,a=i,o,u=0,l=0,f,h,p=-1,m=-1,v=0,S=0,b=[],g=!1,k=!1;for(;(o=r.scan())!==17;){if(g===!0&&o!==14&&o!==15&&o!==12&&o!==13&&s.endLineNumber===void 0){let w=r.getTokenStartLine();h===2||h===4?a.endLineNumber=w-1:s.endLineNumber=w-1,v=w,g=!1}if(k===!0&&o!==14&&o!==15&&o!==12&&o!==13&&(v=r.getTokenStartLine(),k=!1),r.getTokenStartLine()!==u){for(let w=u;w<r.getTokenStartLine();w++){let _=t.getText(oe.create(Me.create(w,0),Me.create(w+1,0))).length;l=l+_}u=r.getTokenStartLine()}switch(o){case 10:{if(f===void 0||f===1||f===5&&b[b.length-1]===ct.Object){let w=new qs(r.getTokenValue(),v);a=s,s=n.addChildProperty(w)}break}case 3:{if(i.beginningLineNumber===void 0&&(i.beginningLineNumber=r.getTokenStartLine()),b[b.length-1]===ct.Object)n=s;else if(b[b.length-1]===ct.Array){let w=new qs(r.getTokenValue(),v);w.noKeyName=!0,a=s,s=n.addChildProperty(w),n=s}b.push(ct.Array),s.type=ct.Array,v=r.getTokenStartLine(),v++;break}case 1:{if(i.beginningLineNumber===void 0)i.beginningLineNumber=r.getTokenStartLine();else if(b[b.length-1]===ct.Array){let w=new qs(r.getTokenValue(),v);w.noKeyName=!0,a=s,s=n.addChildProperty(w)}s.type=ct.Object,b.push(ct.Object),n=s,v=r.getTokenStartLine(),v++;break}case 4:{S=r.getTokenStartLine(),b.pop(),s.endLineNumber===void 0&&(f===2||f===4)&&(s.endLineNumber=S-1,s.lastProperty=!0,s.lineWhereToAddComma=p,s.indexWhereToAddComa=m,a=s,s=s?s.parent:void 0,n=s),i.endLineNumber=S,v=S+1;break}case 2:{S=r.getTokenStartLine(),b.pop(),f!==1&&(s.endLineNumber===void 0&&(s.endLineNumber=S-1,s.lastProperty=!0,s.lineWhereToAddComma=p,s.indexWhereToAddComa=m),a=s,s=s?s.parent:void 0,n=s),i.endLineNumber=r.getTokenStartLine(),v=S+1;break}case 5:{S=r.getTokenStartLine(),s.endLineNumber===void 0&&(b[b.length-1]===ct.Object||b[b.length-1]===ct.Array&&(f===2||f===4))&&(s.endLineNumber=S,s.commaIndex=r.getTokenOffset()-l,s.commaLine=S),(f===2||f===4)&&(a=s,s=s?s.parent:void 0,n=s),v=S+1;break}case 13:{f===5&&p===r.getTokenStartLine()&&(b[b.length-1]===ct.Array&&(h===2||h===4)||b[b.length-1]===ct.Object)&&(b[b.length-1]===ct.Array&&(h===2||h===4)||b[b.length-1]===ct.Object)&&(s.endLineNumber=void 0,g=!0),(f===1||f===3)&&p===r.getTokenStartLine()&&(k=!0);break}}o!==14&&o!==13&&o!==12&&o!==15&&(h=f,f=o,p=r.getTokenStartLine(),m=r.getTokenOffset()+r.getTokenLength()-l)}return i}function ZU(t,e){if(e.childrenProperties.length===0)return t;let r=kr.create("test://test.json","json",0,t.getText()),i=[];for(HO(i,e,e.beginningLineNumber);i.length>0;){let n=i.shift(),s=n.propertyTreeArray,a=n.beginningLineNumber;for(let o=0;o<s.length;o++){let u=s[o],l=oe.create(Me.create(u.beginningLineNumber,0),Me.create(u.endLineNumber+1,0)),f=t.getText(l),h=kr.create("test://test.json","json",0,f);if(u.lastProperty===!0&&o!==s.length-1){let v=u.lineWhereToAddComma-u.beginningLineNumber,S=u.indexWhereToAddComa,b={range:oe.create(Me.create(v,S),Me.create(v,S)),text:","};kr.update(h,[b],1)}else if(u.lastProperty===!1&&o===s.length-1){let v=u.commaIndex,b=u.commaLine-u.beginningLineNumber,g={range:oe.create(Me.create(b,v),Me.create(b,v+1)),text:""};kr.update(h,[g],1)}let p=u.endLineNumber-u.beginningLineNumber+1,m={range:oe.create(Me.create(a,0),Me.create(a+p,0)),text:h.getText()};kr.update(r,[m],1),HO(i,u,a),a=a+p}}return r}function eH(t){t.sort((e,r)=>e.propertyName.localeCompare(r.propertyName))}function HO(t,e,r){if(e.childrenProperties.length!==0)if(e.type===ct.Object){let i=1/0;for(let s of e.childrenProperties)s.beginningLineNumber<i&&(i=s.beginningLineNumber);let n=i-e.beginningLineNumber;r=r+n,eH(e.childrenProperties),t.push(new xp(r,e.childrenProperties))}else e.type===ct.Array&&WO(t,e,r)}function WO(t,e,r){for(let i of e.childrenProperties){if(i.type===ct.Object){let n=1/0;for(let a of i.childrenProperties)a.beginningLineNumber<n&&(n=a.beginningLineNumber);let s=n-i.beginningLineNumber;t.push(new xp(r+i.beginningLineNumber-e.beginningLineNumber+s,i.childrenProperties))}i.type===ct.Array&&WO(t,i,r+i.beginningLineNumber-e.beginningLineNumber)}}var xp,zO=Ae(()=>{y();xi();Mr();Vv();UO();xp=class{constructor(e,r){this.beginningLineNumber=e,this.propertyTreeArray=r}}});function JO(t,e){let r=[];return e.visit(i=>{if(i.type==="property"&&i.keyNode.value==="$ref"&&i.valueNode?.type==="string"){let n=i.valueNode.value,s=rH(e,n);if(s){let a=t.positionAt(s.offset);r.push({target:`${t.uri}#${a.line+1},${a.character+1}`,range:tH(t,i.valueNode)})}}return!0}),Promise.resolve(r)}function tH(t,e){return oe.create(t.positionAt(e.offset+1),t.positionAt(e.offset+e.length-1))}function rH(t,e){let r=iH(e);return r?$v(r,t.root):null}function $v(t,e){if(!e)return null;if(t.length===0)return e;let r=t.shift();if(e&&e.type==="object"){let i=e.properties.find(n=>n.keyNode.value===r);return i?$v(t,i.valueNode):null}else if(e&&e.type==="array"&&r.match(/^(0|[1-9][0-9]*)$/)){let i=Number.parseInt(r),n=e.items[i];return n?$v(t,n):null}return null}function iH(t){return t==="#"?[]:t[0]!=="#"||t[1]!=="/"?null:t.substring(2).split(/\//).map(nH)}function nH(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}var KO=Ae(()=>{y();Mr()});var QO={};Ym(QO,{ClientCapabilities:()=>Av,CodeAction:()=>op,CodeActionContext:()=>ap,CodeActionKind:()=>np,Color:()=>Uu,ColorInformation:()=>zf,ColorPresentation:()=>Jf,Command:()=>En,CompletionItem:()=>Fa,CompletionItemKind:()=>Ut,CompletionItemTag:()=>Yf,CompletionList:()=>Xf,Diagnostic:()=>Cr,DiagnosticSeverity:()=>$t,DocumentHighlight:()=>tp,DocumentHighlightKind:()=>ep,DocumentLink:()=>up,DocumentSymbol:()=>ip,DocumentUri:()=>Gf,ErrorCode:()=>ce,FoldingRange:()=>Kf,FoldingRangeKind:()=>Tn,Hover:()=>Zf,InsertTextFormat:()=>Ke,Location:()=>nn,MarkedString:()=>ja,MarkupContent:()=>Os,MarkupKind:()=>Pi,Position:()=>Me,Range:()=>oe,SchemaDraft:()=>cr,SelectionRange:()=>Ns,SymbolInformation:()=>rp,SymbolKind:()=>Rr,TextDocument:()=>kr,TextDocumentEdit:()=>Hu,TextEdit:()=>rr,VersionedTextDocumentIdentifier:()=>Qf,WorkspaceEdit:()=>Gu,getLanguageService:()=>sH,isSchemaResolveError:()=>AU});function sH(t){let e=t.promiseConstructor||Promise,r=new wp(t.schemaRequestService,t.workspaceContext,e);r.setSchemaContributions(bp);let i=new mp(r,t.contributions,e,t.clientCapabilities),n=new gp(r,t.contributions,e),s=new vp(r),a=new _p(r,e);return{configure:o=>{r.clearExternalSchemas(),o.schemas?.forEach(r.registerExternalSchema.bind(r)),a.configure(o)},resetSchema:o=>r.onResourceChange(o),doValidation:a.doValidation.bind(a),getLanguageStatus:a.getLanguageStatus.bind(a),parseJSONDocument:o=>yO(o,{collectComments:!0}),newJSONDocument:(o,u,l)=>gO(o,u,l),getMatchingSchemas:r.getMatchingSchemas.bind(r),doResolve:i.doResolve.bind(i),doComplete:i.doComplete.bind(i),findDocumentSymbols:s.findDocumentSymbols.bind(s),findDocumentSymbols2:s.findDocumentSymbols2.bind(s),findDocumentColors:s.findDocumentColors.bind(s),getColorPresentations:s.getColorPresentations.bind(s),doHover:n.doHover.bind(n),getFoldingRanges:jO,getSelectionRanges:VO,findDefinition:()=>Promise.resolve([]),findLinks:JO,format:(o,u,l)=>Yu(o,l,u),sort:(o,u)=>GO(o,u)}}var YO=Ae(()=>{y();vO();bO();kO();OO();$a();CO();FO();BO();$O();zO();Vv();KO();Mr()});var Gv=T(Xu=>{"use strict";y();Object.defineProperty(Xu,"__esModule",{value:!0});Xu.JSONValidator=void 0;Xu.isValid=XO;var Uv=(YO(),Xm(QO)),aH=Ce(),Hv=class t{service;schemas;static async create(e,r){if(e)return new t(await e.schemas(r.context))}constructor(e){this.schemas=(0,aH.indexBy)(r=>r.uri,e),this.service=(0,Uv.getLanguageService)({schemaRequestService:this.getSchemaForURI.bind(this),workspaceContext:{resolveRelativePath:(r,i)=>new URL(r,i).toString()}}),this.service.configure({schemas:e.map(r=>({uri:r.uri,fileMatch:r.fileMatch}))})}validate=async(e,r)=>{let i=Uv.TextDocument.create(e,"json",0,r);return(await this.getOffsetDiagnostics(i)).map(s=>({message:s.message,startIndex:i.offsetAt(s.range.start),endIndex:i.offsetAt(s.range.end)}))};isValid=async(e,r)=>XO(this.service,e,r);async getOffsetDiagnostics(e){let r=this.service.parseJSONDocument(e);return this.service.doValidation(e,r,{schemaValidation:"error",trailingCommas:"ignore",comments:"ignore"})}async getSchemaForURI(e){let r=this.schemas[e]?.schema;return r||`No schema for '${e}' found`}};Xu.JSONValidator=Hv;async function XO(t,e,r){let i=Uv.TextDocument.create(e,"json",0,r),n=t.parseJSONDocument(i);return(await t.doValidation(i,n,{schemaValidation:"error",trailingCommas:"ignore",comments:"ignore"})).every(a=>a.severity!==1)}});var Wv=T(kp=>{"use strict";y();Object.defineProperty(kp,"__esModule",{value:!0});kp.FileType=void 0;var ZO;(function(t){t[t.Unknown=0]="Unknown",t[t.File=1]="File",t[t.Directory=2]="Directory",t[t.SymbolicLink=64]="SymbolicLink"})(ZO||(kp.FileType=ZO={}))});var Ip=T(Ue=>{"use strict";y();Object.defineProperty(Ue,"__esModule",{value:!0});Ue.makeGetMetafieldDefinitions=Ue.FETCHED_METAFIELD_CATEGORIES=Ue.makeGetDefaultSchemaTranslations=Ue.makeGetDefaultTranslations=Ue.makeGetDefaultSchemaLocale=Ue.makeGetDefaultLocale=Ue.makeGetDefaultSchemaLocaleFileUri=Ue.makeGetDefaultLocaleFileUri=Ue.makeFileSize=Ue.makeFileExists=void 0;Ue.recursiveReadDirectory=uN;Ue.isDirectory=zv;var eN=Du(),tN=Wv(),Jv=ze(),rN=Is(),oH=Y(),iN=Ce(),uH=t=>async function(r){try{return await t.stat(r),!0}catch{return!1}};Ue.makeFileExists=uH;var cH=t=>async function(r){try{return(await t.stat(r)).size}catch{return 0}};Ue.makeFileSize=cH;Ue.makeGetDefaultLocaleFileUri=nN("default.json");Ue.makeGetDefaultSchemaLocaleFileUri=nN(".default.schema.json");function nN(t=".default.json"){return function(r){return i=>Kv(r,i,t)}}Ue.makeGetDefaultLocale=sN(".default.json");Ue.makeGetDefaultSchemaLocale=sN(".default.schema.json");function sN(t=".default.json"){return function(r,i){return oN(()=>lH(r,i,t))}}Ue.makeGetDefaultTranslations=aN(".default.json");Ue.makeGetDefaultSchemaTranslations=aN(".default.schema.json");function aN(t=".default.json"){return function(r,i,n){return oN(()=>fH(r,i,n,t))}}async function Kv(t,e,r=".default.json"){return(await t.readDirectory((0,rN.join)(e,"locales"))).find(([n])=>n.endsWith(r))?.[0]}async function lH(t,e,r){try{let i=await Kv(t,e,r);return i?eN.Utils.basename(eN.URI.parse(i)).split(".")[0]:"en"}catch(i){return console.error(i),"en"}}async function fH(t,e,r,i){try{let n=pH(e,i);if(n)return n;let s=await Kv(t,r,i);if(!s)return{};let a=await t.readFile(s);return(0,Jv.parseJSON)(a,{})}catch(n){return console.error(n),{}}}function pH(t,e){let r=t.find(n=>n.type===oH.SourceCodeType.JSON&&n.uri.match(/locales/)&&n.uri.endsWith(e));if(!r)return;let i=(0,Jv.parseJSON)(r.source);if(!(0,iN.isError)(i))return i}function oN(t){let e;return async(...r)=>(e||(e=t(...r)),e)}async function uN(t,e,r){let n=(await t.readDirectory(e)).filter(a=>!dH(a)&&(zv(a)||r(a)));return(await Promise.all(n.map(a=>zv(a)?uN(t,a[0],r):Promise.resolve([a[0]])))).flat()}function zv([t,e]){return e===tN.FileType.Directory}var hH=[".git","node_modules","dist","build","tmp","vendor"];function dH([t,e]){return e===tN.FileType.Directory&&hH.some(r=>t.endsWith(r))}Ue.FETCHED_METAFIELD_CATEGORIES=["article","blog","collection","company","company_location","location","market","order","page","product","variant","shop"];var mH=t=>async function(e){let r={article:[],blog:[],collection:[],company:[],company_location:[],location:[],market:[],order:[],page:[],product:[],variant:[],shop:[]};try{let i=await t.readFile((0,rN.join)(e,".shopify","metafields.json")),n=(0,Jv.parseJSON)(i);return(0,iN.isError)(n)?r:Ue.FETCHED_METAFIELD_CATEGORIES.reduce((s,a)=>{try{s[a]=n[a].map(o=>({key:o.key,name:o.name,namespace:o.namespace,description:o.description,type:{category:o.type.category,name:o.type.name}}))}catch{}return s},r)}catch{return r}};Ue.makeGetMetafieldDefinitions=mH});var pN=T(Ap=>{"use strict";y();Object.defineProperty(Ap,"__esModule",{value:!0});Ap.createDisabledChecksModule=_H;Ap.findNextLinePosition=fN;var lN=Y(),gH=kn(),yH=Ce();function _H(){let t="@all",r=new Map;function i(a,o,u){let[l,f,h]=o.trim().match(/^(?:theme\-check\-(disable-next-line|disable|enable)) ?(.*)/)||[];(h?h.split(/,[ ]*/):[t]).forEach(m=>{let v=r.get(a.uri);if(f==="disable-next-line"&&!(0,yH.isError)(a.ast)){let S=fN(a.ast,u);S&&(v.has(m)||v.set(m,[]),v.get(m).push({from:S.start,to:S.end}))}if(f==="disable"&&(v.has(m)||v.set(m,[]),v.get(m).push({from:u.position.end})),f==="enable"){let S=v.get(m);if(S)S[S.length-1].to=u.position.start;else if(m===t)for(let b of v.values())for(let g of b)g.to||(g.to=u.position.start)}})}let n={meta:{schema:{}},create:({file:a})=>({async onCodePathStart(){r.set(a.uri,new Map)},async LiquidRawTag(o){o.name==="comment"&&i(a,o.body.value,o)},async LiquidTag(o){typeof o.markup!="string"||o.name!=="#"||i(a,o.markup,o)}})};function s(a){return[t,a.check].flatMap(u=>r.has(a.uri)?r.get(a.uri).has(u)?r.get(a.uri).get(u):[]:[]).some(u=>a.start.index>=u.from&&(!u.to||a.end.index<=u.to))}return{DisabledChecksVisitor:n,isDisabled:s}}function fN(t,e){let[r,i]=(0,gH.findCurrentNode)(t,e.position.end),n=i.at(-1),s=i.at(-2),a=cN(n,r);if(!(!a&&(n&&(a=cN(s,n)),!a)))return"blockStartPosition"in a?a.type===lN.LiquidHtmlNodeTypes.LiquidRawTag&&a.name==="doc"?a.position:a.blockStartPosition:a.position}function cN(t,e){if(!t)return;let r=[];t.type===lN.LiquidHtmlNodeTypes.LiquidTag&&Array.isArray(t.markup)?r=t.markup:"children"in t&&(r=t.children||[]);let i=r.findIndex(s=>s===e);return i===-1?void 0:r.at(i+1)}});var Yv=T(Qv=>{"use strict";y();Object.defineProperty(Qv,"__esModule",{value:!0});Qv.isIgnored=bH;var vH=vw();function bH(t,e,r){return[...SH(r,e),...hN(e.ignore)].map(n=>n.replace(/^\//,e.rootUri+"/").replace(/^([^\/])/,"**/$1").replace(/\/\*$/,"/**")).some(n=>(0,vH.minimatch)(t,n))}function SH(t,e){return t?hN(e.settings[t.meta.code]?.ignore):[]}function hN(t){return t??[]}});var mN=T(Xv=>{"use strict";y();Object.defineProperty(Xv,"__esModule",{value:!0});Xv.visitLiquid=xH;var wH=ge();function dN(t){return!!t&&typeof t=="object"&&"type"in t}async function xH(t,e){let r=[{node:t,ancestors:[]}],i;for(;r.length>0;){let{node:n,ancestors:s}=r.pop(),a=s.concat(n);i=e[n.type],i&&await i(n,s);for(let o in n){if(!n.hasOwnProperty(o)||wH.nonTraversableProperties.has(o))continue;let u=n[o];if(Array.isArray(u))for(let l=u.length-1;l>=0;l--){let f=u[l];dN(f)&&r.push({node:f,ancestors:a})}else dN(u)&&r.push({node:u,ancestors:a})}i=e[`${n.type}:exit`],i&&await i(n,s)}}});var yN=T(Zv=>{"use strict";y();Object.defineProperty(Zv,"__esModule",{value:!0});Zv.visitJSON=IH;function gN(t){return!!t&&typeof t=="object"&&"type"in t}var kH=new Set(["loc"]);async function IH(t,e){let r=[{node:t,ancestors:[]}],i;for(;r.length>0;){let{node:n,ancestors:s}=r.pop(),a=s.concat(n);i=e[n.type],i&&await i(n,s);for(let o in n){if(!n.hasOwnProperty(o)||kH.has(o))continue;let u=n[o];if(Array.isArray(u))for(let l=u.length-1;l>=0;l--){let f=u[l];gN(f)&&r.push({node:f,ancestors:a})}else gN(u)&&r.push({node:u,ancestors:a})}i=e[`${n.type}:exit`],i&&await i(n,s)}}});var _N=T(Ua=>{"use strict";y();Object.defineProperty(Ua,"__esModule",{value:!0});Ua.visitJSON=Ua.visitLiquid=void 0;var AH=mN();Object.defineProperty(Ua,"visitLiquid",{enumerable:!0,get:function(){return AH.visitLiquid}});var TH=yN();Object.defineProperty(Ua,"visitJSON",{enumerable:!0,get:function(){return TH.visitJSON}})});var vN=T(Ha=>{"use strict";y();Object.defineProperty(Ha,"__esModule",{value:!0});Ha.AppBlockValidTags=Ha.ForbiddenTag=void 0;var eb=Y(),tb;(function(t){t.JavaScript="javascript",t.StyleSheet="stylesheet",t.Include="include",t.Layout="layout",t.Section="section",t.Sections="sections"})(tb||(Ha.ForbiddenTag=tb={}));var EH=t=>Object.values(tb).includes(t),OH=t=>`Theme app extension blocks cannot contain '${t}' tags`;Ha.AppBlockValidTags={meta:{code:"AppBlockValidTags",name:"App Block Valid Tags",docs:{description:"Identifies forbidden Liquid tags in theme app extension app block and app embed block code.",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/app-block-valid-tags",recommended:!1},type:eb.SourceCodeType.LiquidHtml,severity:eb.Severity.ERROR,schema:{},targets:[eb.ConfigTarget.ThemeAppExtension]},create(t){let e=async r=>{if(EH(r.name)){let i=r.blockEndPosition?r.blockEndPosition.end:r.position.end,n=r.blockStartPosition.start,s=OH(r.name);return t.report({message:s,startIndex:n,endIndex:i})}};return{LiquidRawTag:e,LiquidTag:e}}}});var wN=T(Tp=>{"use strict";y();Object.defineProperty(Tp,"__esModule",{value:!0});Tp.AssetPreload=void 0;var SN=ge(),bN=Y(),Zu=je();function NH(t){return(0,Zu.isAttr)(t,"rel")&&t.value.some(e=>e.type===SN.NodeTypes.TextNode&&e.value==="preload")}Tp.AssetPreload={meta:{code:"AssetPreload",name:"Prevent Manual Preloading of Assets",docs:{description:"This check is aimed at discouraging the manual preloading of assets and encourages the use of appropriate Shopify filters.",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/asset-preload",recommended:!0},type:bN.SourceCodeType.LiquidHtml,severity:bN.Severity.WARNING,schema:{},targets:[]},create(t){return{async HtmlVoidElement(e){let r=e.attributes.find(i=>(0,Zu.isValuedHtmlAttribute)(i)&&NH(i));if(e.name==="link"&&r){let n=e.attributes.filter(Zu.isValuedHtmlAttribute).find(a=>(0,Zu.isAttr)(a,"as"))?.value.find(a=>(0,Zu.isNodeOfType)(SN.NodeTypes.TextNode,a))?.value,s="";n==="style"?s="For better performance, prefer using the preload argument of the stylesheet_tag filter":n==="image"?s="For better performance, prefer using the preload argument of the image_tag filter":s="For better performance, prefer using the preload_tag filter",t.report({message:s,startIndex:e.position.start,endIndex:e.position.end})}}}}}});var kN=T(Op=>{"use strict";y();Object.defineProperty(Op,"__esModule",{value:!0});Op.AssetSizeAppBlockCSS=void 0;var LH=ze(),Ep=Y(),PH=Ce(),xN=ki(),qH={thresholdInBytes:Ep.SchemaProp.number(1e5)};Op.AssetSizeAppBlockCSS={meta:{code:"AssetSizeAppBlockCSS",name:"Asset Size App Block CSS",docs:{description:"This check is aimed at preventing large CSS bundles from being included via Theme App Extensions.",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/asset-size-app-block-css",recommended:!0},type:Ep.SourceCodeType.LiquidHtml,severity:Ep.Severity.ERROR,schema:qH,targets:[Ep.ConfigTarget.ThemeAppExtension]},create(t){return t.fileSize?{async LiquidRawTag(e){if(e.name!=="schema")return;let r=(0,LH.parseJSON)(e.body.value);if((0,PH.isError)(r))return;let i=r.stylesheet;if(!i)return;let n=`assets/${i}`,s=t.settings.thresholdInBytes,a=e.body.position.start+e.body.value.indexOf(i),o=a+i.length;if(!await(0,xN.doesFileExist)(t,n)){t.report({message:`'${i}' does not exist.`,startIndex:a,endIndex:o});return}let[l,f]=await(0,xN.doesFileExceedThreshold)(t,n,s);l&&t.report({message:`The file size for '${i}' (${f} B) exceeds the configured threshold (${s} B)`,startIndex:a,endIndex:o})}}:{}}}});var AN=T(Lp=>{"use strict";y();Object.defineProperty(Lp,"__esModule",{value:!0});Lp.AssetSizeAppBlockJavaScript=void 0;var CH=ze(),Np=Y(),RH=Ce(),IN=ki(),MH={thresholdInBytes:Np.SchemaProp.number(1e4)};Lp.AssetSizeAppBlockJavaScript={meta:{code:"AssetSizeAppBlockJavaScript",name:"Asset Size App Block JavaScript",docs:{description:"This check is aimed at preventing large JavaScript bundles from being included via Theme App Extensions.",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/asset-size-app-block-javascript",recommended:!0},type:Np.SourceCodeType.LiquidHtml,severity:Np.Severity.ERROR,schema:MH,targets:[Np.ConfigTarget.ThemeAppExtension]},create(t){return t.fileSize?{async LiquidRawTag(e){if(e.name!=="schema")return;let r=(0,CH.parseJSON)(e.body.value);if((0,RH.isError)(r))return;let i=r.javascript;if(!i)return;let n=`assets/${i}`,s=t.settings.thresholdInBytes,a=e.body.position.start+e.body.value.indexOf(i),o=a+i.length;if(!await(0,IN.doesFileExist)(t,n)){t.report({message:`'${i}' does not exist.`,startIndex:a,endIndex:o});return}let[l,f]=await(0,IN.doesFileExceedThreshold)(t,n,s);l&&t.report({message:`The file size for '${i}' (${f} B) exceeds the configured threshold (${s} B)`,startIndex:a,endIndex:o})}}:{}}}});var EN=T(Pp=>{"use strict";y();Object.defineProperty(Pp,"__esModule",{value:!0});Pp.AssetSizeCSS=void 0;var Wa=ge(),rb=Y(),DH=Ce(),TN=ki(),Ga=je(),FH={thresholdInBytes:rb.SchemaProp.number(1e5)};function jH(t){return t.type===Wa.NodeTypes.TextNode}function BH(t){return t.type===Wa.NodeTypes.LiquidVariableOutput}function VH(t){return typeof t!="string"&&t.type===Wa.NodeTypes.LiquidVariable}function $H(t){return t.type===Wa.NodeTypes.String}Pp.AssetSizeCSS={meta:{code:"AssetSizeCSS",aliases:["AssetSizeCSSStylesheetTag"],name:"Prevent Large CSS bundles",docs:{description:"This check is aimed at preventing large CSS bundles for speed.",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/asset-size-css",recommended:!1},type:rb.SourceCodeType.LiquidHtml,severity:rb.Severity.ERROR,schema:FH,targets:[]},create(t){if(!t.fileSize)return{};let e=t.settings.thresholdInBytes;async function r(n,s){await(0,TN.hasRemoteAssetSizeExceededThreshold)(n,e)&&t.report({message:`The CSS file size exceeds the threshold of ${e} bytes`,startIndex:s.start,endIndex:s.end})}async function i(n,s){await(0,TN.hasLocalAssetSizeExceededThreshold)(t,`assets/${n}`,e)&&t.report({message:`The CSS file size exceeds the threshold of ${e} bytes`,startIndex:s.start,endIndex:s.end})}return{async HtmlVoidElement(n){if(n.name!=="link"||!n.attributes.filter(Ga.isValuedHtmlAttribute).find(o=>(0,Ga.isAttr)(o,"rel")&&(0,Ga.valueIncludes)(o,"stylesheet")))return;let a=n.attributes.filter(Ga.isValuedHtmlAttribute).find(o=>(0,Ga.isAttr)(o,"href"));if(a&&a.value.length===1){if(jH(a.value[0])&&/(https?:)?\/\//.test(a.value[0].value)){let o=a.value[0].value;await r(o,a.attributePosition)}if(BH(a.value[0])&&VH(a.value[0].markup)&&$H(a.value[0].markup.expression)&&a.value[0].markup.filters.length===1&&a.value[0].markup.filters[0].name==="asset_url"){let o=a.value[0].markup.expression.value;await i(o,a.attributePosition)}}},async LiquidFilter(n,s){if(n.name!=="stylesheet_tag")return;let a=(0,DH.last)(s);if(!(!a||!(0,Ga.isNodeOfType)(Wa.NodeTypes.LiquidVariable,a))&&a.expression.type===Wa.NodeTypes.String){if(a.expression.value[0].length==1&&a.filters.length==1&&/(https?:)?\/\//.test(a.expression.value)){let o=a.expression.value;await r(o,a.expression.position)}if(a.expression.value[0].length==1&&a.filters.length==2&&a.filters[0].name==="asset_url"&&a.filters[1].name==="stylesheet_tag"){let o=a.expression.value;await i(o,a.position)}}}}}}});var NN=T(qp=>{"use strict";y();Object.defineProperty(qp,"__esModule",{value:!0});qp.AssetSizeJavaScript=void 0;var za=ge(),nb=Y(),UH=Ce(),ON=ki(),ib=je(),HH={thresholdInBytes:nb.SchemaProp.number(1e4)};function GH(t){return t.type===za.NodeTypes.TextNode}function WH(t){return t.type===za.NodeTypes.LiquidVariableOutput}function zH(t){return typeof t!="string"&&t.type===za.NodeTypes.LiquidVariable}function JH(t){return t.type===za.NodeTypes.String}qp.AssetSizeJavaScript={meta:{code:"AssetSizeJavaScript",name:"Prevent Large JavaScript bundles",docs:{description:"This check is aimed at preventing large JavaScript bundles for speed.",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/asset-size-javascript",recommended:!1},type:nb.SourceCodeType.LiquidHtml,severity:nb.Severity.ERROR,schema:HH,targets:[]},create(t){if(!t.fileSize)return{};let e=t.settings.thresholdInBytes;async function r(n,s){await(0,ON.hasRemoteAssetSizeExceededThreshold)(n,e)&&t.report({message:`JavaScript on every page load exceeds compressed size threshold (${e} Bytes), consider using the import on interaction pattern.`,startIndex:s.start,endIndex:s.end})}async function i(n,s){await(0,ON.hasLocalAssetSizeExceededThreshold)(t,`assets/${n}`,e)&&t.report({message:`JavaScript on every page load exceeds compressed size threshold (${e} Bytes), consider using the import on interaction pattern.`,startIndex:s.start,endIndex:s.end})}return{async HtmlRawNode(n){if(n.name!=="script")return;let s=n.attributes.filter(ib.isValuedHtmlAttribute).find(a=>(0,ib.isAttr)(a,"src"));if(s&&s.value.length===1){if(GH(s.value[0])&&/(https?:)?\/\//.test(s.value[0].value)){let a=s.value[0].value;await r(a,s.attributePosition)}if(WH(s.value[0])&&zH(s.value[0].markup)&&JH(s.value[0].markup.expression)&&s.value[0].markup.filters.length===1&&s.value[0].markup.filters[0].name==="asset_url"){let a=s.value[0].markup.expression.value;await i(a,s.attributePosition)}}},async LiquidFilter(n,s){if(n.name!=="script_tag")return;let a=(0,UH.last)(s);if(!(!a||!(0,ib.isNodeOfType)(za.NodeTypes.LiquidVariable,a))&&a.expression.type===za.NodeTypes.String){if(a.expression.value[0].length==1&&a.filters.length==1&&/(https?:)?\/\//.test(a.expression.value)){let o=a.expression.value;await r(o,a.expression.position)}if(a.expression.value[0].length==1&&a.filters.length==2&&a.filters[0].name==="asset_url"&&a.filters[1].name==="script_tag"){let o=a.expression.value;await i(o,a.position)}}}}}}});var CN=T(Rp=>{"use strict";y();Object.defineProperty(Rp,"__esModule",{value:!0});Rp.BlockIdUsage=void 0;var Cp=ge(),LN=Y();Rp.BlockIdUsage={meta:{code:"BlockIdUsage",name:"Do not rely on `block.id` in if/else/unless/case",docs:{description:"The ID is dynamically generated by Shopify and is subject to change. You should avoid relying on a literal value of this ID.",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/block-id-usage",recommended:!0},type:LN.SourceCodeType.LiquidHtml,severity:LN.Severity.WARNING,schema:{},targets:[]},create(t){return{async Comparison(e,r){e.comparator==="=="&&e.left.type===Cp.NodeTypes.VariableLookup&&PN(e.left)&&qN(t,e.position)},async VariableLookup(e,r){let i=r.at(-1);i?.type===Cp.NodeTypes.LiquidTag&&i.name==="case"&&PN(e)&&qN(t,e.position)}}}};function PN(t){return t.type==Cp.NodeTypes.VariableLookup&&t.name==="block"&&t.lookups[0]&&t.lookups[0].type===Cp.NodeTypes.String&&t.lookups[0].value==="id"}function qN(t,e){t.report({message:"The ID is dynamically generated by Shopify and is subject to change. You should avoid relying on a literal value of this ID.",startIndex:e.start,endIndex:e.end})}});var MN=T(Mp=>{"use strict";y();Object.defineProperty(Mp,"__esModule",{value:!0});Mp.CdnPreconnect=void 0;var RN=Y(),Ja=je();Mp.CdnPreconnect={meta:{code:"CdnPreconnect",name:"CDN Preconnect",docs:{description:"This check is aimed at signaling the redundant preconnect to Shopify's CDN",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/cdn-preconnect"},type:RN.SourceCodeType.LiquidHtml,severity:RN.Severity.ERROR,schema:{},targets:[]},create(t){return{async HtmlVoidElement(e){e.name!=="link"||!e.attributes.filter(Ja.isValuedHtmlAttribute).some(n=>(0,Ja.isAttr)(n,"rel")&&(0,Ja.valueIncludes)(n,"preconnect"))||!e.attributes.filter(Ja.isValuedHtmlAttribute).some(n=>(0,Ja.isAttr)(n,"href")&&(0,Ja.valueIncludes)(n,".+cdn.shopify.com.+"))||t.report({message:"Preconnecting to cdn.shopify.com is unnecessary and can lead to worse performance",startIndex:e.position.start,endIndex:e.position.end})}}}}});var jN=T(Dp=>{"use strict";y();Object.defineProperty(Dp,"__esModule",{value:!0});Dp.ContentForHeaderModification=void 0;var DN=ge(),FN=Y(),KH=je();function QH(t){return t.name==="assign"&&typeof t.markup!="string"}function YH(t){return t.name==="capture"&&typeof t.markup!="string"}function XH(t){return t.name==="echo"&&typeof t.markup!="string"}Dp.ContentForHeaderModification={meta:{code:"ContentForHeaderModification",name:"Do not depend on the content of content_for_header",docs:{description:"Do not rely on the content of content_for_header as it might change in the future, which could cause your Liquid code behavior to change.",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/content-for-header-modification",recommended:!0},type:FN.SourceCodeType.LiquidHtml,severity:FN.Severity.ERROR,schema:{},targets:[]},create(t){function e(r,i){(0,KH.isNodeOfType)(DN.NodeTypes.VariableLookup,r)&&r.name==="content_for_header"&&t.report({message:"Do not rely on the content of `content_for_header`",startIndex:i.start,endIndex:i.end})}return{async LiquidTag(r){if(QH(r))e(r.markup.value.expression,r.position);else if(XH(r))e(r.markup.expression,r.position);else if(YH(r)&&r.children)for(let i of r.children)i.type===DN.NodeTypes.LiquidVariableOutput&&typeof i.markup!="string"&&e(i.markup.expression,i.position)},async LiquidVariableOutput(r){typeof r.markup!="string"&&r.markup.filters.length&&e(r.markup.expression,r.position)}}}}});var VN=T(Fp=>{"use strict";y();Object.defineProperty(Fp,"__esModule",{value:!0});Fp.DeprecateBgsizes=void 0;var BN=Y(),ec=je();Fp.DeprecateBgsizes={meta:{code:"DeprecateBgsizes",name:"Deprecate Bgsizes",docs:{description:"This check is aimed at discouraging the use of the lazySizes bgset plugin.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/deprecate-bgsizes"},type:BN.SourceCodeType.LiquidHtml,severity:BN.Severity.WARNING,schema:{},targets:[]},create(t){return{async HtmlElement(e){let r=e.attributes.filter(ec.isValuedHtmlAttribute).find(n=>(0,ec.isAttr)(n,"class")&&(0,ec.valueIncludes)(n,"lazyload"));if(r){let n=r;t.report({message:'Use the native loading="lazy" attribute instead of lazysizes',startIndex:n.attributePosition.start,endIndex:n.attributePosition.end})}let i=e.attributes.find(n=>(0,ec.isValuedHtmlAttribute)(n)&&(0,ec.isAttr)(n,"data-bgset"));i&&t.report({message:"Use the CSS imageset attribute instead of data-bgset",startIndex:i.position.start,endIndex:i.position.end})}}}}});var UN=T(jp=>{"use strict";y();Object.defineProperty(jp,"__esModule",{value:!0});jp.DeprecateLazysizes=void 0;var $N=Y(),on=je();function ZH(t){return(0,on.isAttr)(t,"data-srcset")||(0,on.isAttr)(t,"data-sizes")}jp.DeprecateLazysizes={meta:{code:"DeprecateLazysizes",name:"Deprecate Lazysizes",docs:{description:"This check is aimed at discouraging the use of the lazysizes JavaScript library",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/deprecate-lazysizes"},type:$N.SourceCodeType.LiquidHtml,severity:$N.Severity.WARNING,schema:{},targets:[]},create(t){return{async HtmlVoidElement(e){if(e.name!=="img")return;let r=e.attributes.filter(on.isHtmlAttribute),i=r.some(o=>(0,on.isAttr)(o,"src")),n=r.some(o=>(0,on.isAttr)(o,"loading"));i&&n||!e.attributes.filter(on.isValuedHtmlAttribute).some(o=>(0,on.isAttr)(o,"class")&&(0,on.valueIncludes)(o,"lazyload"))||!e.attributes.filter(on.isValuedHtmlAttribute).some(ZH)||t.report({message:'Use the native loading="lazy" attribute instead of lazysizes',startIndex:e.position.start,endIndex:e.position.end})}}}}});var JN=T(Qa=>{"use strict";y();Object.defineProperty(Qa,"__esModule",{value:!0});Qa.fixHexToRgba=eG;Qa.suggestImgTagFix=tG;Qa.suggestImgUrlFix=rG;Qa.suggestImageUrlFix=iG;var Hp=ge(),Gp=je(),HN=5760,GN={pico:16,icon:32,thumb:50,small:100,compact:160,medium:240,large:480,grande:600,original:1024};function eG(t){if(t.args.length>1)return;let{start:e,end:r}=Wp(t),i=Ka(t,0),n;return i?n=` color_to_rgb | color_modify: 'alpha', ${i}`:n=" color_to_rgb",s=>s.replace(e,r,n)}function tG(t){let e="Replace 'img_tag' with 'image_tag'.",r=Ka(t,0),i=Ka(t,1),n=Ka(t,2),{width:s,height:a}=ab(n,{width:-1,height:-1}),{start:o,end:u}=Wp(t),l=ob({width:s,height:a}),f={width:s,height:a,alt:$p(r),class:$p(i)},h=Vp("image_url",l),p=Vp("image_tag",f);return[{message:e,fix:m=>{let v=`${h} |${p}`;m.replace(o,u,v)}}]}function rG(t){let e="Replace 'img_url' with 'image_url'.",r=Bp(t,"crop"),i=Bp(t,"format"),n=Bp(t,"scale"),s=Ka(t,0),a=t.args.at(0);if(sb(n?.value)||sb(a))return;let{width:o,height:u}=ob(nG(t,ab(s))),{start:l,end:f}=Wp(t),h={width:o,height:u};return Up(r?.value)&&(h.crop=$p(r.value.value)),Up(i?.value)&&(h.format=$p(i.value.value)),sb(i?.value)&&(h.format=i.value.name),[{message:e,fix:p=>{let m=Vp("image_url",h);p.replace(l,f,m)}}]}function iG(t,e){let r=`Replace '${t}' with 'image_url'.`,i=Ka(e,0),{width:n,height:s}=ob(ab(i)),{start:a,end:o}=Wp(e);return[{message:r,fix:u=>{let l=Vp("image_url",{width:n,height:s});u.replace(a,o,l)}}]}function ab(t,e={width:100,height:100}){if(!t)return{...e};if(t in GN){let n=GN[t];return{width:n,height:n}}let[r,i]=t.split("x").map(n=>parseInt(n));return WN({width:r,height:i})}function nG(t,e){let r=parseInt(sG(t,"scale")||"0")||1;return WN({width:e.width*r,height:e.height*r})}function WN(t){return{width:Math.min(t.width,HN),height:Math.min(t.height,HN)}}function ob(t){let{width:e,height:r}=t;return(!r||r===-1)&&(!e||e===-1)&&(e=100),{width:e,height:r}}function Ka(t,e){let r=t.args.at(e);if(zN(r)||Up(r))return r.value}function sG(t,e){let i=Bp(t,e)?.value;if(zN(i)||Up(i))return i.value}function Bp(t,e){return t.args.find(i=>(0,Gp.isNodeOfType)(Hp.NodeTypes.NamedArgument,i)&&i.name===e)}function Vp(t,e){let r=Object.entries(e).filter(([i,n])=>n&&n!==-1).map(([i,n])=>`${i}: ${n}`).join(", ");return r?` ${t}: ${r}`:` ${t}`}function Wp(t){let e=t.position,r=t.source.slice(e.start).indexOf("|");return{start:e.start+r+1,end:e.end}}function $p(t){return t?`'${t}'`:null}function sb(t){return(0,Gp.isNodeOfType)(Hp.NodeTypes.VariableLookup,t)}function Up(t){return(0,Gp.isNodeOfType)(Hp.NodeTypes.String,t)}function zN(t){return(0,Gp.isNodeOfType)(Hp.NodeTypes.Number,t)}});var QN=T(Jp=>{"use strict";y();Object.defineProperty(Jp,"__esModule",{value:!0});Jp.DeprecatedFilter=void 0;var KN=Y(),zp=JN();Jp.DeprecatedFilter={meta:{code:"DeprecatedFilter",aliases:["DeprecatedFilters"],name:"Deprecated Filter",docs:{description:"Discourages using deprecated filters in themes.",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/deprecated-filter",recommended:!0},type:KN.SourceCodeType.LiquidHtml,severity:KN.Severity.WARNING,schema:{},targets:[]},create(t){return t.themeDocset?{LiquidFilter:async e=>{let r=await t.themeDocset.filters(),i=r.find(l=>l.deprecated&&l.name===e.name);if(!i)return;let n=cG(i),s=r.find(l=>l.name===n),a=uG(i,s),o=aG(e),u=oG(e);t.report({message:a,suggest:o,fix:u,startIndex:e.position.start+1,endIndex:e.position.end})}}:{}}};function aG(t){let e=t.name;switch(e){case"img_tag":return(0,zp.suggestImgTagFix)(t);case"img_url":return(0,zp.suggestImgUrlFix)(t);case"article_img_url":case"collection_img_url":case"product_img_url":return(0,zp.suggestImageUrlFix)(e,t);case"currency_selector":return}}function oG(t){if(t.name==="hex_to_rgba")return(0,zp.fixHexToRgba)(t)}function uG(t,e){return e?`Deprecated filter '${t.name}', consider using '${e.name}'.`:`Deprecated filter '${t.name}'.`}function cG(t){return t.deprecation_reason?.match(/replaced by \[`(.+?)`\]/)?.[1]}});var Qp=T(Kp=>{"use strict";y();Object.defineProperty(Kp,"__esModule",{value:!0});Kp.DEPRECATED_FONT_HANDLES=void 0;Kp.DEPRECATED_FONT_HANDLES=new Set(["agmena_i3","agmena_i4","agmena_i6","agmena_i7","agmena_n3","agmena_n4","agmena_n6","agmena_n7","akko_i2","akko_i3","akko_i4","akko_i5","akko_i7","akko_i9","akko_n2","akko_n3","akko_n4","akko_n5","akko_n7","akko_n9","alfie_n4","americana_i4","americana_n4","americana_n7","americana_n8","antique_olive_i4","antique_olive_n3","antique_olive_n4","antique_olive_n7","antique_olive_n9","armata_n4","avenir_next_i1","avenir_next_i2","avenir_next_i3","avenir_next_i4","avenir_next_i5","avenir_next_i6","avenir_next_i7","avenir_next_i8","avenir_next_n1","avenir_next_n2","avenir_next_n3","avenir_next_n4","avenir_next_n5","avenir_next_n6","avenir_next_n7","avenir_next_n8","avenir_next_rounded_i4","avenir_next_rounded_i5","avenir_next_rounded_i6","avenir_next_rounded_i7","avenir_next_rounded_n4","avenir_next_rounded_n5","avenir_next_rounded_n6","avenir_next_rounded_n7","azbuka_i3","azbuka_i4","azbuka_i5","azbuka_i6","azbuka_i7","azbuka_n2","azbuka_n3","azbuka_n4","azbuka_n5","azbuka_n6","azbuka_n7","azbuka_n8","azbuka_n9","basic_commercial_i3","basic_commercial_i4","basic_commercial_i7","basic_commercial_i8","basic_commercial_n3","basic_commercial_n4","basic_commercial_n7","basic_commercial_n8","basic_commercial_soft_rounded_n4","basic_commercial_soft_rounded_n7","basic_commercial_soft_rounded_n9","baskerville_no_2_i4","baskerville_no_2_i7","baskerville_no_2_n4","baskerville_no_2_n7","bauer_bodoni_i4","bauer_bodoni_i7","bauer_bodoni_i9","bauer_bodoni_n4","bauer_bodoni_n7","bauer_bodoni_n9","beefcakes_i4","beefcakes_n4","bembo_book_i4","bembo_book_i7","bembo_book_n4","bembo_book_n7","bernhard_modern_i4","bernhard_modern_i7","bernhard_modern_n4","bernhard_modern_n7","bio_rhyme_n2","bio_rhyme_n3","bio_rhyme_n4","bio_rhyme_n5","bio_rhyme_n6","bio_rhyme_n7","bio_rhyme_n8","bodoni_poster_i9","bodoni_poster_n9","burlingame_i1","burlingame_i2","burlingame_i3","burlingame_i4","burlingame_i5","burlingame_i6","burlingame_i7","burlingame_i8","burlingame_i9","burlingame_n1","burlingame_n2","burlingame_n3","burlingame_n4","burlingame_n5","burlingame_n6","burlingame_n7","burlingame_n8","burlingame_n9","cachet_i1","cachet_i2","cachet_i3","cachet_i4","cachet_i5","cachet_i6","cachet_i7","cachet_i8","cachet_n1","cachet_n2","cachet_n3","cachet_n4","cachet_n5","cachet_n6","cachet_n7","cachet_n8","cardamon_i4","cardamon_i5","cardamon_i6","cardamon_i7","cardamon_n4","cardamon_n5","cardamon_n6","cardamon_n7","carter_sans_i4","carter_sans_i5","carter_sans_i6","carter_sans_i7","carter_sans_n4","carter_sans_n5","carter_sans_n6","carter_sans_n7","caslon_bold_i4","caslon_bold_n4","caslon_old_face_i4","caslon_old_face_n4","caslon_old_face_n7","centaur_i4","centaur_i7","centaur_n4","centaur_n7","century_gothic_i4","century_gothic_i7","century_gothic_n4","century_gothic_n7","chong_modern_i3","chong_modern_i4","chong_modern_i7","chong_modern_n3","chong_modern_n4","chong_modern_n7","claire_news_n3","claire_news_n7","cooper_bt_i2","cooper_bt_i5","cooper_bt_i7","cooper_bt_i9","cooper_bt_n2","cooper_bt_n5","cooper_bt_n7","cooper_bt_n9","daytona_i2","daytona_i3","daytona_i4","daytona_i6","daytona_i7","daytona_n2","daytona_n3","daytona_n4","daytona_n6","daytona_n7","din_neuzeit_grotesk_n3","din_neuzeit_grotesk_n7","din_next_i2","din_next_i3","din_next_i4","din_next_i5","din_next_i7","din_next_i8","din_next_i9","din_next_n2","din_next_n3","din_next_n4","din_next_n5","din_next_n7","din_next_n8","din_next_n9","din_next_slab_i2","din_next_slab_i3","din_next_slab_i4","din_next_slab_i5","din_next_slab_i7","din_next_slab_i8","din_next_slab_i9","din_next_slab_n2","din_next_slab_n3","din_next_slab_n4","din_next_slab_n5","din_next_slab_n7","din_next_slab_n8","din_next_slab_n9","electra_i4","electra_i7","electra_n4","electra_n7","eurostile_next_i2","eurostile_next_i3","eurostile_next_i4","eurostile_next_i6","eurostile_next_i7","eurostile_next_n2","eurostile_next_n3","eurostile_next_n4","eurostile_next_n6","eurostile_next_n7","fette_gotisch_n4","ff_meta_i1","ff_meta_i2","ff_meta_i3","ff_meta_i4","ff_meta_i5","ff_meta_i6","ff_meta_i7","ff_meta_i9","ff_meta_n1","ff_meta_n2","ff_meta_n3","ff_meta_n4","ff_meta_n5","ff_meta_n6","ff_meta_n7","ff_meta_n9","ff_meta_serif_i3","ff_meta_serif_i4","ff_meta_serif_i5","ff_meta_serif_i7","ff_meta_serif_i8","ff_meta_serif_i9","ff_meta_serif_n3","ff_meta_serif_n4","ff_meta_serif_n5","ff_meta_serif_n7","ff_meta_serif_n8","ff_meta_serif_n9","ff_tisa_i2","ff_tisa_i3","ff_tisa_i4","ff_tisa_i5","ff_tisa_i7","ff_tisa_i8","ff_tisa_i9","ff_tisa_n2","ff_tisa_n3","ff_tisa_n4","ff_tisa_n5","ff_tisa_n7","ff_tisa_n8","ff_tisa_n9","ff_tisa_sans_i2","ff_tisa_sans_i3","ff_tisa_sans_i4","ff_tisa_sans_i5","ff_tisa_sans_i7","ff_tisa_sans_i8","ff_tisa_sans_i9","ff_tisa_sans_n2","ff_tisa_sans_n3","ff_tisa_sans_n4","ff_tisa_sans_n5","ff_tisa_sans_n7","ff_tisa_sans_n8","ff_tisa_sans_n9","ff_unit_i2","ff_unit_i3","ff_unit_i4","ff_unit_i5","ff_unit_i7","ff_unit_i8","ff_unit_i9","ff_unit_n2","ff_unit_n3","ff_unit_n4","ff_unit_n5","ff_unit_n7","ff_unit_n8","ff_unit_n9","ff_unit_rounded_i3","ff_unit_rounded_i4","ff_unit_rounded_i5","ff_unit_rounded_i7","ff_unit_rounded_i8","ff_unit_rounded_i9","ff_unit_rounded_n3","ff_unit_rounded_n4","ff_unit_rounded_n5","ff_unit_rounded_n7","ff_unit_rounded_n8","ff_unit_rounded_n9","ff_unit_slab_i2","ff_unit_slab_i3","ff_unit_slab_i4","ff_unit_slab_i5","ff_unit_slab_i7","ff_unit_slab_i8","ff_unit_slab_i9","ff_unit_slab_n2","ff_unit_slab_n3","ff_unit_slab_n4","ff_unit_slab_n5","ff_unit_slab_n7","ff_unit_slab_n8","ff_unit_slab_n9","friz_quadrata_i4","friz_quadrata_i7","friz_quadrata_n4","friz_quadrata_n7","frutiger_serif_i3","frutiger_serif_i4","frutiger_serif_i5","frutiger_serif_i7","frutiger_serif_i8","frutiger_serif_n3","frutiger_serif_n4","frutiger_serif_n5","frutiger_serif_n7","frutiger_serif_n8","fs_kim_i4","fs_kim_i5","fs_kim_i7","fs_kim_i8","fs_kim_i9","fs_kim_n4","fs_kim_n5","fs_kim_n7","fs_kim_n8","fs_kim_n9","fs_koopman_i1","fs_koopman_i3","fs_koopman_i4","fs_koopman_i5","fs_koopman_i7","fs_koopman_i8","fs_koopman_i9","fs_koopman_n1","fs_koopman_n3","fs_koopman_n4","fs_koopman_n5","fs_koopman_n7","fs_koopman_n8","fs_koopman_n9","fs_siena_i1","fs_siena_i2","fs_siena_i3","fs_siena_i4","fs_siena_i5","fs_siena_i6","fs_siena_i7","fs_siena_n1","fs_siena_n2","fs_siena_n3","fs_siena_n4","fs_siena_n5","fs_siena_n6","fs_siena_n7","futura_black_n4","futura_n3","futura_n4","futura_n5","futura_n6","futura_n7","futura_n8","futura_n9","futura_o3","futura_o4","futura_o5","futura_o6","futura_o7","futura_o8","geometric_415_i4","geometric_415_i6","geometric_415_i7","geometric_415_n4","geometric_415_n6","geometric_415_n7","georgia_pro_i3","georgia_pro_i4","georgia_pro_i6","georgia_pro_i7","georgia_pro_i9","georgia_pro_n3","georgia_pro_n4","georgia_pro_n6","georgia_pro_n7","georgia_pro_n9","gill_sans_nova_i1","gill_sans_nova_i2","gill_sans_nova_i3","gill_sans_nova_i4","gill_sans_nova_i5","gill_sans_nova_i6","gill_sans_nova_i7","gill_sans_nova_n1","gill_sans_nova_n2","gill_sans_nova_n3","gill_sans_nova_n4","gill_sans_nova_n5","gill_sans_nova_n6","gill_sans_nova_n7","gill_sans_nova_n8","gill_sans_nova_n9","glegoo_n4","glegoo_n7","goudy_old_style_i4","goudy_old_style_i7","goudy_old_style_n4","goudy_old_style_n7","goudy_old_style_n8","harmonia_sans_i3","harmonia_sans_i4","harmonia_sans_i6","harmonia_sans_i7","harmonia_sans_i9","harmonia_sans_n3","harmonia_sans_n4","harmonia_sans_n6","harmonia_sans_n7","harmonia_sans_n9","helvetica_n3","helvetica_n4","helvetica_n7","helvetica_n9","helvetica_o3","helvetica_o4","helvetica_o7","helvetica_o9","hope_sans_i1","hope_sans_i2","hope_sans_i3","hope_sans_i4","hope_sans_i6","hope_sans_i7","hope_sans_n1","hope_sans_n2","hope_sans_n3","hope_sans_n4","hope_sans_n6","hope_sans_n7","humanist_521_i2","humanist_521_i4","humanist_521_i7","humanist_521_n2","humanist_521_n4","humanist_521_n7","humanist_521_n8","humanist_521_n9","itc_avant_garde_gothic_n2","itc_avant_garde_gothic_n4","itc_avant_garde_gothic_n5","itc_avant_garde_gothic_n6","itc_avant_garde_gothic_n7","itc_avant_garde_gothic_o2","itc_avant_garde_gothic_o4","itc_avant_garde_gothic_o5","itc_avant_garde_gothic_o6","itc_avant_garde_gothic_o7","itc_benguiat_i4","itc_benguiat_i5","itc_benguiat_i7","itc_benguiat_n4","itc_benguiat_n5","itc_benguiat_n7","itc_berkeley_old_style_i4","itc_berkeley_old_style_i5","itc_berkeley_old_style_i7","itc_berkeley_old_style_i9","itc_berkeley_old_style_n4","itc_berkeley_old_style_n5","itc_berkeley_old_style_n7","itc_berkeley_old_style_n9","itc_bodoni_seventytwo_i4","itc_bodoni_seventytwo_i7","itc_bodoni_seventytwo_n4","itc_bodoni_seventytwo_n7","itc_bodoni_twelve_i4","itc_bodoni_twelve_i7","itc_bodoni_twelve_n4","itc_bodoni_twelve_n7","itc_caslon_no_224_i4","itc_caslon_no_224_i5","itc_caslon_no_224_i7","itc_caslon_no_224_i9","itc_caslon_no_224_n4","itc_caslon_no_224_n5","itc_caslon_no_224_n7","itc_caslon_no_224_n9","itc_charter_i4","itc_charter_i7","itc_charter_i9","itc_charter_n4","itc_charter_n7","itc_charter_n9","itc_cheltenham_i3","itc_cheltenham_i4","itc_cheltenham_i7","itc_cheltenham_i9","itc_cheltenham_n3","itc_cheltenham_n4","itc_cheltenham_n7","itc_cheltenham_n9","itc_clearface_i4","itc_clearface_i7","itc_clearface_i8","itc_clearface_i9","itc_clearface_n4","itc_clearface_n7","itc_clearface_n8","itc_clearface_n9","itc_conduit_i2","itc_conduit_i3","itc_conduit_i4","itc_conduit_i5","itc_conduit_i7","itc_conduit_i8","itc_conduit_i9","itc_conduit_n2","itc_conduit_n3","itc_conduit_n4","itc_conduit_n5","itc_conduit_n7","itc_conduit_n8","itc_conduit_n9","itc_esprit_i4","itc_esprit_i5","itc_esprit_i7","itc_esprit_i9","itc_esprit_n4","itc_esprit_n5","itc_esprit_n7","itc_esprit_n9","itc_founders_caslon_i4","itc_founders_caslon_n4","itc_franklin_gothic_i4","itc_franklin_gothic_i5","itc_franklin_gothic_i7","itc_franklin_gothic_i9","itc_franklin_gothic_n4","itc_franklin_gothic_n5","itc_franklin_gothic_n7","itc_franklin_gothic_n9","itc_galliard_i4","itc_galliard_i7","itc_galliard_i8","itc_galliard_i9","itc_galliard_n4","itc_galliard_n7","itc_galliard_n8","itc_galliard_n9","itc_gamma_i4","itc_gamma_i5","itc_gamma_i7","itc_gamma_i8","itc_gamma_n4","itc_gamma_n5","itc_gamma_n7","itc_gamma_n8","itc_goudy_sans_i4","itc_goudy_sans_i5","itc_goudy_sans_i7","itc_goudy_sans_i9","itc_goudy_sans_n4","itc_goudy_sans_n5","itc_goudy_sans_n7","itc_goudy_sans_n9","itc_johnston_i3","itc_johnston_i5","itc_johnston_i7","itc_johnston_n3","itc_johnston_n5","itc_johnston_n7","itc_mendoza_roman_i4","itc_mendoza_roman_i5","itc_mendoza_roman_i7","itc_mendoza_roman_n4","itc_mendoza_roman_n5","itc_mendoza_roman_n7","itc_modern_no_216_i3","itc_modern_no_216_i5","itc_modern_no_216_i7","itc_modern_no_216_i8","itc_modern_no_216_n3","itc_modern_no_216_n5","itc_modern_no_216_n7","itc_modern_no_216_n8","itc_new_baskerville_i4","itc_new_baskerville_i6","itc_new_baskerville_i7","itc_new_baskerville_i9","itc_new_baskerville_n4","itc_new_baskerville_n6","itc_new_baskerville_n7","itc_new_baskerville_n9","itc_new_esprit_i4","itc_new_esprit_i5","itc_new_esprit_i7","itc_new_esprit_i8","itc_new_esprit_n4","itc_new_esprit_n5","itc_new_esprit_n7","itc_new_esprit_n8","itc_new_veljovic_i3","itc_new_veljovic_i4","itc_new_veljovic_i5","itc_new_veljovic_i7","itc_new_veljovic_i9","itc_new_veljovic_n3","itc_new_veljovic_n4","itc_new_veljovic_n5","itc_new_veljovic_n7","itc_new_veljovic_n9","itc_novarese_i4","itc_novarese_i5","itc_novarese_i7","itc_novarese_n4","itc_novarese_n5","itc_novarese_n7","itc_novarese_n9","itc_officina_sans_i4","itc_officina_sans_i5","itc_officina_sans_i7","itc_officina_sans_i8","itc_officina_sans_i9","itc_officina_sans_n4","itc_officina_sans_n5","itc_officina_sans_n7","itc_officina_sans_n8","itc_officina_sans_n9","itc_officina_serif_i4","itc_officina_serif_i5","itc_officina_serif_i7","itc_officina_serif_i8","itc_officina_serif_i9","itc_officina_serif_n4","itc_officina_serif_n5","itc_officina_serif_n7","itc_officina_serif_n8","itc_officina_serif_n9","itc_stepp_i3","itc_stepp_i5","itc_stepp_i7","itc_stepp_i9","itc_stepp_n3","itc_stepp_n4","itc_stepp_n7","itc_stepp_n9","itc_stone_humanist_i5","itc_stone_humanist_i6","itc_stone_humanist_i7","itc_stone_humanist_n5","itc_stone_humanist_n6","itc_stone_humanist_n7","itc_stone_informal_i4","itc_stone_informal_i6","itc_stone_informal_i7","itc_stone_informal_n4","itc_stone_informal_n6","itc_stone_informal_n7","itc_stone_sans_ii_i3","itc_stone_sans_ii_i4","itc_stone_sans_ii_i5","itc_stone_sans_ii_i6","itc_stone_sans_ii_i7","itc_stone_sans_ii_i8","itc_stone_sans_ii_n3","itc_stone_sans_ii_n4","itc_stone_sans_ii_n5","itc_stone_sans_ii_n6","itc_stone_sans_ii_n7","itc_stone_sans_ii_n8","itc_stone_serif_i4","itc_stone_serif_i6","itc_stone_serif_i7","itc_stone_serif_n4","itc_stone_serif_n6","itc_stone_serif_n7","itc_tapioca_n5","joanna_nova_i1","joanna_nova_i2","joanna_nova_i3","joanna_nova_i4","joanna_nova_i5","joanna_nova_i6","joanna_nova_i7","joanna_nova_i8","joanna_nova_i9","joanna_nova_n1","joanna_nova_n2","joanna_nova_n3","joanna_nova_n4","joanna_nova_n5","joanna_nova_n6","joanna_nova_n7","joanna_nova_n8","joanna_nova_n9","joanna_sans_nova_i1","joanna_sans_nova_i2","joanna_sans_nova_i3","joanna_sans_nova_i4","joanna_sans_nova_i5","joanna_sans_nova_i7","joanna_sans_nova_i8","joanna_sans_nova_i9","joanna_sans_nova_n1","joanna_sans_nova_n2","joanna_sans_nova_n3","joanna_sans_nova_n4","joanna_sans_nova_n5","joanna_sans_nova_n7","joanna_sans_nova_n8","joanna_sans_nova_n9","kairos_i1","kairos_i2","kairos_i3","kairos_i4","kairos_i5","kairos_i7","kairos_i8","kairos_i9","kairos_n1","kairos_n2","kairos_n3","kairos_n4","kairos_n5","kairos_n7","kairos_n8","kairos_n9","laurentian_i4","laurentian_i6","laurentian_n4","laurentian_n6","laurentian_n7","libelle_n4","linotype_didot_i4","linotype_didot_i7","linotype_didot_n4","linotype_didot_n7","linotype_gianotten_i3","linotype_gianotten_i4","linotype_gianotten_i5","linotype_gianotten_i7","linotype_gianotten_i8","linotype_gianotten_n3","linotype_gianotten_n4","linotype_gianotten_n5","linotype_gianotten_n7","linotype_gianotten_n8","linotype_gianotten_n9","linotype_really_i5","linotype_really_i6","linotype_really_n5","linotype_really_n6","linotype_syntax_serif_i3","linotype_syntax_serif_i4","linotype_syntax_serif_i5","linotype_syntax_serif_i7","linotype_syntax_serif_i8","linotype_syntax_serif_i9","linotype_syntax_serif_n3","linotype_syntax_serif_n4","linotype_syntax_serif_n5","linotype_syntax_serif_n7","linotype_syntax_serif_n8","linotype_syntax_serif_n9","lobster_n4","lucia_n4","luthersche_fraktur_n4","madera_i1","madera_i2","madera_i3","madera_i4","madera_i5","madera_i6","madera_i7","madera_i8","madera_n1","madera_n2","madera_n3","madera_n4","madera_n5","madera_n6","madera_n7","madera_n8","malabar_i4","malabar_i7","malabar_i9","malabar_n4","malabar_n7","malabar_n9","mariposa_sans_i4","mariposa_sans_n4","mariposa_sans_n5","mariposa_sans_n7","mariposa_sans_n9","megrim_n4","melior_i4","melior_i7","melior_n4","melior_n7","memphis_i3","memphis_i5","memphis_i7","memphis_n3","memphis_n5","memphis_n7","memphis_n8","memphis_soft_rounded_n5","memphis_soft_rounded_n7","memphis_soft_rounded_n8","mentor_sans_i3","mentor_sans_i4","mentor_sans_i7","mentor_sans_i9","mentor_sans_n3","mentor_sans_n4","mentor_sans_n7","mentor_sans_n9","metro_nova_i2","metro_nova_i3","metro_nova_i4","metro_nova_i5","metro_nova_i7","metro_nova_i8","metro_nova_i9","metro_nova_n2","metro_nova_n3","metro_nova_n4","metro_nova_n5","metro_nova_n7","metro_nova_n8","metro_nova_n9","modern_no_20_i4","modern_no_20_n4","monotype_baskerville_i4","monotype_baskerville_i6","monotype_baskerville_i7","monotype_baskerville_n4","monotype_baskerville_n6","monotype_baskerville_n7","monotype_bodoni_i4","monotype_bodoni_i5","monotype_bodoni_i7","monotype_bodoni_i8","monotype_bodoni_i9","monotype_bodoni_n4","monotype_bodoni_n5","monotype_bodoni_n7","monotype_bodoni_n8","monotype_bodoni_n9","monotype_century_old_style_i5","monotype_century_old_style_i7","monotype_century_old_style_n5","monotype_century_old_style_n7","monotype_goudy_i4","monotype_goudy_i7","monotype_goudy_modern_i4","monotype_goudy_modern_i7","monotype_goudy_modern_n4","monotype_goudy_modern_n7","monotype_goudy_n4","monotype_goudy_n7","monotype_goudy_n8","monotype_italian_old_style_i4","monotype_italian_old_style_i7","monotype_italian_old_style_n4","monotype_italian_old_style_n7","monotype_new_clarendon_n5","monotype_new_clarendon_n7","monotype_news_gothic_i4","monotype_news_gothic_i7","monotype_news_gothic_n4","monotype_news_gothic_n7","monotype_sabon_i4","monotype_sabon_i6","monotype_sabon_n4","monotype_sabon_n6","mouse_memoirs_n4","mundo_sans_i2","mundo_sans_i3","mundo_sans_i4","mundo_sans_i5","mundo_sans_i7","mundo_sans_i8","mundo_sans_i9","mundo_sans_n2","mundo_sans_n3","mundo_sans_n4","mundo_sans_n5","mundo_sans_n7","mundo_sans_n8","mundo_sans_n9","neo_sans_i3","neo_sans_i4","neo_sans_i5","neo_sans_i7","neo_sans_i8","neo_sans_i9","neo_sans_n3","neo_sans_n4","neo_sans_n5","neo_sans_n7","neo_sans_n8","neo_sans_n9","neue_aachen_i1","neue_aachen_i2","neue_aachen_i3","neue_aachen_i4","neue_aachen_i5","neue_aachen_i6","neue_aachen_i7","neue_aachen_i8","neue_aachen_i9","neue_aachen_n1","neue_aachen_n2","neue_aachen_n3","neue_aachen_n4","neue_aachen_n5","neue_aachen_n6","neue_aachen_n7","neue_aachen_n8","neue_aachen_n9","neue_frutiger_1450_i3","neue_frutiger_1450_i4","neue_frutiger_1450_i6","neue_frutiger_1450_i7","neue_frutiger_1450_n3","neue_frutiger_1450_n4","neue_frutiger_1450_n6","neue_frutiger_1450_n7","neue_haas_unica_i1","neue_haas_unica_i2","neue_haas_unica_i3","neue_haas_unica_i4","neue_haas_unica_i5","neue_haas_unica_i6","neue_haas_unica_i7","neue_haas_unica_i8","neue_haas_unica_i9","neue_haas_unica_n1","neue_haas_unica_n2","neue_haas_unica_n3","neue_haas_unica_n4","neue_haas_unica_n5","neue_haas_unica_n6","neue_haas_unica_n7","neue_haas_unica_n8","neue_haas_unica_n9","neue_plak_i2","neue_plak_i3","neue_plak_i4","neue_plak_i6","neue_plak_i7","neue_plak_i9","neue_plak_n2","neue_plak_n3","neue_plak_n4","neue_plak_n6","neue_plak_n7","neue_plak_n9","neue_swift_i3","neue_swift_i4","neue_swift_i5","neue_swift_i6","neue_swift_i7","neue_swift_n3","neue_swift_n4","neue_swift_n5","neue_swift_n6","neue_swift_n7","neuzeit_office_i4","neuzeit_office_i7","neuzeit_office_n4","neuzeit_office_n7","neuzeit_office_soft_rounded_n4","neuzeit_office_soft_rounded_n7","neuzeit_s_n4","neuzeit_s_n9","new_century_schoolbook_i4","new_century_schoolbook_i7","new_century_schoolbook_n4","new_century_schoolbook_n7","news_702_i4","news_702_i7","news_702_n4","news_702_n7","news_705_i4","news_705_i7","news_705_n4","news_705_n7","news_cycle_n4","news_cycle_n7","news_gothic_no_2_i2","news_gothic_no_2_i3","news_gothic_no_2_i4","news_gothic_no_2_i5","news_gothic_no_2_i7","news_gothic_no_2_i8","news_gothic_no_2_n2","news_gothic_no_2_n3","news_gothic_no_2_n4","news_gothic_no_2_n5","news_gothic_no_2_n7","news_gothic_no_2_n8","news_plantin_i4","news_plantin_i7","news_plantin_n4","news_plantin_n7","noticia_text_i4","noticia_text_i7","noticia_text_n4","noticia_text_n7","optima_nova_i3","optima_nova_i4","optima_nova_i5","optima_nova_i6","optima_nova_i7","optima_nova_i8","optima_nova_i9","optima_nova_n3","optima_nova_n4","optima_nova_n5","optima_nova_n6","optima_nova_n7","optima_nova_n8","optima_nova_n9","oxygen_n3","oxygen_n4","oxygen_n7","parma_i4","parma_n4","parma_n7","perpetua_i4","perpetua_i7","perpetua_n4","perpetua_n7","plantin_i3","plantin_i4","plantin_i6","plantin_i7","plantin_n3","plantin_n4","plantin_n6","plantin_n7","pmn_caecilia_i3","pmn_caecilia_i4","pmn_caecilia_i7","pmn_caecilia_i9","pmn_caecilia_n3","pmn_caecilia_n4","pmn_caecilia_n7","pmn_caecilia_n9","prata_n4","pt_mono_n4","pt_sans_narrow_n4","pt_sans_narrow_n7","quattrocento_n4","quattrocento_n7","quire_sans_i1","quire_sans_i2","quire_sans_i3","quire_sans_i4","quire_sans_i5","quire_sans_i6","quire_sans_i7","quire_sans_i8","quire_sans_i9","quire_sans_n1","quire_sans_n2","quire_sans_n3","quire_sans_n4","quire_sans_n5","quire_sans_n6","quire_sans_n7","quire_sans_n8","quire_sans_n9","really_no_2_i3","really_no_2_i4","really_no_2_i5","really_no_2_i6","really_no_2_i7","really_no_2_i8","really_no_2_i9","really_no_2_n3","really_no_2_n4","really_no_2_n5","really_no_2_n6","really_no_2_n7","really_no_2_n8","really_no_2_n9","righteous_n4","rockwell_i4","rockwell_i7","rockwell_n4","rockwell_n7","rockwell_n8","sabon_next_i4","sabon_next_i6","sabon_next_i7","sabon_next_i8","sabon_next_i9","sabon_next_n4","sabon_next_n6","sabon_next_n7","sabon_next_n8","sabon_next_n9","sackers_square_gothic_n4","sagrantino_n4","scene_i3","scene_i4","scene_i5","scene_i7","scene_i8","scene_i9","scene_n3","scene_n4","scene_n5","scene_n7","scene_n8","scene_n9","scherzo_i4","scherzo_i6","scherzo_i7","scherzo_n4","scherzo_n6","scherzo_n7","slabo_13px_n4","slate_i2","slate_i3","slate_i4","slate_i5","slate_i7","slate_i9","slate_n2","slate_n3","slate_n4","slate_n5","slate_n7","slate_n9","soho_gothic_i2","soho_gothic_i3","soho_gothic_i4","soho_gothic_i5","soho_gothic_i7","soho_gothic_i8","soho_gothic_i9","soho_gothic_n2","soho_gothic_n3","soho_gothic_n4","soho_gothic_n5","soho_gothic_n7","soho_gothic_n8","soho_gothic_n9","soho_i1","soho_i2","soho_i3","soho_i4","soho_i5","soho_i6","soho_i7","soho_i8","soho_i9","soho_n1","soho_n2","soho_n3","soho_n4","soho_n5","soho_n6","soho_n7","soho_n8","soho_n9","stempel_schneidler_i3","stempel_schneidler_i4","stempel_schneidler_i5","stempel_schneidler_i7","stempel_schneidler_i8","stempel_schneidler_n3","stempel_schneidler_n4","stempel_schneidler_n5","stempel_schneidler_n7","stempel_schneidler_n8","swiss_721_i1","swiss_721_i2","swiss_721_i4","swiss_721_i5","swiss_721_i7","swiss_721_i8","swiss_721_i9","swiss_721_n1","swiss_721_n2","swiss_721_n4","swiss_721_n5","swiss_721_n7","swiss_721_n8","swiss_721_n9","swiss_721_rounded_n7","swiss_721_rounded_n9","tiemann_n3","tiemann_n4","tinos_i4","tinos_i7","tinos_n4","tinos_n7","trade_gothic_n3","trade_gothic_n4","trade_gothic_n7","trade_gothic_next_i3","trade_gothic_next_i4","trade_gothic_next_i7","trade_gothic_next_i8","trade_gothic_next_n3","trade_gothic_next_n4","trade_gothic_next_n7","trade_gothic_next_n8","trade_gothic_o3","trade_gothic_o4","trade_gothic_o7","twentieth_century_i3","twentieth_century_i5","twentieth_century_i7","twentieth_century_i8","twentieth_century_i9","twentieth_century_n3","twentieth_century_n4","twentieth_century_n5","twentieth_century_n6","twentieth_century_n7","twentieth_century_n8","twentieth_century_n9","univers_next_i1","univers_next_i2","univers_next_i3","univers_next_i4","univers_next_i5","univers_next_i6","univers_next_i7","univers_next_i8","univers_next_i9","univers_next_n1","univers_next_n2","univers_next_n3","univers_next_n4","univers_next_n5","univers_next_n6","univers_next_n7","univers_next_n8","univers_next_n9","univers_next_typewriter_i4","univers_next_typewriter_i7","univers_next_typewriter_n4","univers_next_typewriter_n7","unna_i4","unna_i7","unna_n4","unna_n7","vala_n4","varela_n4","varela_round_n4","verdana_pro_i3","verdana_pro_i4","verdana_pro_i6","verdana_pro_i7","verdana_pro_i9","verdana_pro_n3","verdana_pro_n4","verdana_pro_n6","verdana_pro_n7","verdana_pro_n9","vidaloka_n4","volkhov_i4","vollkorn_i5","volkhov_i7","vollkorn_i8","volkhov_n4","volkhov_n7","vollkorn_i4","vollkorn_i6","vollkorn_i7","vollkorn_i9","vollkorn_n4","vollkorn_n5","vollkorn_n6","vollkorn_n7","vollkorn_n8","vollkorn_n9","waza_n4","wola_n4","ysobel_i3","ysobel_i4","ysobel_i6","ysobel_i7","ysobel_n3","ysobel_n4","ysobel_n6","ysobel_n7","zurich_extended_n4","zurich_extended_n7","zurich_extended_n8","zurich_extended_n9","zurich_i3","zurich_i4","zurich_i7","zurich_i8","zurich_n3","zurich_n4","zurich_n7","zurich_n8","zurich_n9"])});var rL=T(Xp=>{"use strict";y();Object.defineProperty(Xp,"__esModule",{value:!0});Xp.DeprecatedFontsOnSectionsAndBlocks=void 0;var lG=xt(),YN=Y(),Yp=ze(),ub=Qp();Xp.DeprecatedFontsOnSectionsAndBlocks={meta:{code:"DeprecatedFontsOnSectionsAndBlocks",name:"Check for deprecated fonts in section and block schema settings values",docs:{description:"Warns on deprecated fonts in section and block schema settings values.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/deprecated-fonts-on-sections-and-blocks"},type:YN.SourceCodeType.LiquidHtml,severity:YN.Severity.WARNING,schema:{},targets:[]},create(t){return{async LiquidRawTag(e){if(e.name!=="schema"||e.body.kind!=="json")return;let r=await(0,lG.getSchema)(t),{validSchema:i,ast:n}=r??{};if(!i||i instanceof Error||!n||n instanceof Error)return;let s=e.blockStartPosition.end;fG(i,s,n,t),pG(i,s,n,t),await hG(i,s,n,t),"default"in i&&await dG(i,s,n,t)}}}};function fG(t,e,r,i){let n=t.settings;n&&XN(n,e,r,["settings"],i)}function XN(t,e,r,i,n){t.forEach((s,a)=>{if(s.type==="font_picker"&&s.default&&ub.DEPRECATED_FONT_HANDLES.has(s.default)){let o=i.concat([String(a),"default"]);cb(n,e,r,o,`setting '${s.id}' is using deprecated font '${s.default}'`)}})}function pG(t,e,r,i){let n=t.blocks;n&&n.forEach((s,a)=>{"settings"in s&&s.settings&&XN(s.settings,e,r,["blocks",String(a),"settings"],i)})}async function hG(t,e,r,i){let n=t.presets;if(n)for(let[s,a]of n.entries()){let o=["presets",String(s)];await ZN(a.settings??{},"blocks"in a?a.blocks:void 0,t,e,r,o,i)}}async function ZN(t,e,r,i,n,s,a){t&&typeof t=="object"&&Object.entries(t).forEach(([o,u])=>{if(tL(r.settings??[],o)&&ub.DEPRECATED_FONT_HANDLES.has(u)){let l=s.concat(["settings",o]);cb(a,i,n,l,`setting '${o}' is using deprecated font '${u}'`)}}),e&&await eL(e,r,i,n,a,s)}async function eL(t,e,r,i,n,s){let a=Array.isArray(t)?t.entries():Object.entries(t);for(let[o,u]of a){let l=s.concat(["blocks",String(o)]),f=null;if(e.blocks?.forEach(h=>{h.type===u.type&&"name"in h&&(f=h)}),!f){let h=await n.getBlockSchema?.(u.type);if(!h||h instanceof Error||(f=h.validSchema,!f||f instanceof Error))continue}for(let[h,p]of Object.entries(u.settings??{}))p&&ub.DEPRECATED_FONT_HANDLES.has(p)&&tL(f.settings??[],h)&&cb(n,r,i,l.concat(["settings",h]),`setting '${h}' is using deprecated font '${p}'`);"blocks"in u&&u.blocks&&await eL(u.blocks,e,r,i,n,l)}}async function dG(t,e,r,i){let n=t.default;if(!n||typeof n!="object")return;let s=["default"];await ZN(n.settings??{},"blocks"in n?n.blocks:void 0,t,e,r,s,i)}function tL(t,e){return t.some(r=>r.id===e&&r.type==="font_picker")}function cb(t,e,r,i,n,s=!0){let a=(0,Yp.nodeAtPath)(r,i),o=s?e+(0,Yp.getLocStart)(a):e+(0,Yp.getLocEnd)(a)-1,u=e+(0,Yp.getLocEnd)(a);t.report({message:n,startIndex:o,endIndex:u})}});var sL=T(Zp=>{"use strict";y();Object.defineProperty(Zp,"__esModule",{value:!0});Zp.DeprecatedFontsOnSettingsData=void 0;var iL=Y(),nL=ze(),mG=Qp();Zp.DeprecatedFontsOnSettingsData={meta:{code:"DeprecatedFontsOnSettingsData",name:"Check for deprecated fonts in settings_data settings values",docs:{description:"Warns on deprecated fonts in settings_data settings values.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/deprecated-fonts-on-settings-data"},type:iL.SourceCodeType.JSON,severity:iL.Severity.WARNING,schema:{},targets:[]},create(t){return t.toRelativePath(t.file.uri)!=="config/settings_data.json"?{}:{async Property(r){r.value.type==="Literal"&&typeof r.value.value=="string"&&mG.DEPRECATED_FONT_HANDLES.has(r.value.value)&&t.report({message:`The font "${r.value.value}" is deprecated`,startIndex:(0,nL.getLocStart)(r.value),endIndex:(0,nL.getLocEnd)(r.value)})}}}}});var oL=T(th=>{"use strict";y();Object.defineProperty(th,"__esModule",{value:!0});th.DeprecatedFontsOnSettingsSchema=void 0;var eh=Y(),aL=ze(),gG=Qp();th.DeprecatedFontsOnSettingsSchema={meta:{code:"DeprecatedFontsOnSettingsSchema",name:"Check for deprecated fonts in settings_schema settings values",docs:{description:"Warns on deprecated fonts in settings_schema settings values.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/deprecated-fonts-on-settings-schema"},type:eh.SourceCodeType.JSON,severity:eh.Severity.WARNING,schema:{},targets:[]},create(t){return t.toRelativePath(t.file.uri)!=="config/settings_schema.json"?{}:{async Property(r){if(r.key.value==="settings"&&(0,eh.isArrayNode)(r.value)){for(let i of r.value.children)if((0,eh.isObjectNode)(i)){let n=i.children.find(s=>s.key.value==="type");if(n&&n.value.type==="Literal"&&n.value.value==="font_picker"){let s=i.children.find(a=>a.key.value==="default");if(s&&s.value.type==="Literal"&&typeof s.value.value=="string"){let a=s.value.value;gG.DEPRECATED_FONT_HANDLES.has(a)&&t.report({message:`The font "${a}" is deprecated`,startIndex:(0,aL.getLocStart)(s.value),endIndex:(0,aL.getLocEnd)(s.value)})}}}}}}}}});var cL=T(rh=>{"use strict";y();Object.defineProperty(rh,"__esModule",{value:!0});rh.DeprecatedTag=void 0;var uL=Y();rh.DeprecatedTag={meta:{code:"DeprecatedTag",aliases:["DeprecatedTags"],name:"Deprecated Tag",docs:{description:"This check is aimed at eliminating the use of deprecated tags.",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/deprecated-tag",recommended:!0},type:uL.SourceCodeType.LiquidHtml,severity:uL.Severity.WARNING,schema:{},targets:[]},create(t){return{async LiquidTag(e){if(e.name==="include"){let i=e.source.substring(e.position.start).indexOf("include"),n=i+7,s=e.position.start+i,a=e.position.start+n;t.report({message:"Use the 'render' tag instead of 'include'",startIndex:s,endIndex:a,suggest:[{message:"Replace 'include' with 'render'",fix:o=>{o.replace(s,a,"render")}}]})}}}}}});var Ya=T(ei=>{"use strict";y();Object.defineProperty(ei,"__esModule",{value:!0});ei.SupportedDocTagTypes=ei.BasicParamTypes=void 0;ei.getDefaultValueForType=bG;ei.inferArgumentType=SG;ei.isTypeCompatible=wG;ei.filePathSupportsLiquidDoc=xG;ei.getValidParamTypes=kG;ei.parseParamType=IG;var tc=ge(),yG=Ce(),_G=xt(),vG=xt(),lr;(function(t){t.String="string",t.Number="number",t.Boolean="boolean",t.Object="object"})(lr||(ei.BasicParamTypes=lr={}));var lL;(function(t){t.Param="param",t.Example="example",t.Description="description"})(lL||(ei.SupportedDocTagTypes=lL={}));function bG(t){switch(t?.toLowerCase()){case lr.String:return"''";case lr.Number:return"0";case lr.Boolean:return"false";case lr.Object:default:return""}}function SG(t){switch(t.type){case tc.NodeTypes.String:return lr.String;case tc.NodeTypes.Number:return lr.Number;case tc.NodeTypes.LiquidLiteral:return lr.Boolean;case tc.NodeTypes.Range:case tc.NodeTypes.VariableLookup:return lr.Object;default:return(0,yG.assertNever)(t)}}function wG(t,e){let r=t.toLowerCase();return r===lr.Boolean?!0:r===e}function xG(t){return(0,_G.isSnippet)(t)||(0,vG.isBlock)(t)}function kG(t){let e=new Map([[lr.String,void 0],[lr.Number,void 0],[lr.Boolean,void 0],[lr.Object,"A generic type used to represent any liquid object or primitive value."]]);return t.forEach(r=>e.set(r.name,r.summary||r.description)),e}function IG(t,e){let r=e.match(/^([a-z_]+)(\[\])?$/);if(!r)return;let i=r[1],n=!!r[2];if(t.has(i))return[i,n]}});var Ri=T(Dr=>{"use strict";y();Object.defineProperty(Dr,"__esModule",{value:!0});Dr.reportUnknownArguments=AG;Dr.reportMissingArguments=TG;Dr.reportDuplicateArguments=EG;Dr.findTypeMismatchParams=OG;Dr.reportTypeMismatches=NG;Dr.generateTypeMismatchSuggestions=pL;Dr.getBlockName=PG;Dr.getSnippetName=qG;Dr.getLiquidDocParams=CG;Dr.makeRemoveArgumentCorrector=lb;Dr.makeAddArgumentCorrector=hL;var Cs=ge(),Xa=Ya(),fL=je();function AG(t,e,r,i){let n="";e.type===Cs.NodeTypes.ContentForMarkup?n=` in content_for tag for static block '${i}'`:e.type===Cs.NodeTypes.RenderMarkup&&(n=` in render tag for snippet '${i}'`);for(let s of r)t.report({message:`Unknown argument '${s.name}'${n}.`,startIndex:s.position.start,endIndex:s.position.end,suggest:[{message:`Remove '${s.name}'`,fix:lb(e,s)}]})}function TG(t,e,r,i){let n="";e.type===Cs.NodeTypes.ContentForMarkup?n=` in content_for tag for static block '${i}'`:e.type===Cs.NodeTypes.RenderMarkup&&(n=` in render tag for snippet '${i}'`);for(let s of r)t.report({message:`Missing required argument '${s.name}'${n}.`,startIndex:e.position.start,endIndex:e.position.end,suggest:[{message:`Add required argument '${s.name}'`,fix:hL(e,s)}]})}function EG(t,e,r,i){let n="";e.type===Cs.NodeTypes.ContentForMarkup?n=` in content_for tag for static block '${i}'`:e.type===Cs.NodeTypes.RenderMarkup&&(n=` in render tag for snippet '${i}'`);for(let s of r)t.report({message:`Duplicate argument '${s.name}'${n}.`,startIndex:s.position.start,endIndex:s.position.end,suggest:[{message:`Remove duplicate argument '${s.name}'`,fix:lb(e,s)}]})}function OG(t,e){let r=[];for(let i of e){if(i.value.type===Cs.NodeTypes.VariableLookup)continue;let n=t.get(i.name);if(n&&n.type){let s=n.type.toLowerCase();if(!Object.keys(Xa.BasicParamTypes).map(o=>o.toLowerCase()).includes(s))continue;(0,Xa.isTypeCompatible)(s,(0,Xa.inferArgumentType)(i.value))||r.push(i)}}return r}function NG(t,e,r){for(let i of e){let n=r.get(i.name);if(!n||!n.type)continue;let s=n.type.toLowerCase(),a=(0,Xa.inferArgumentType)(i.value),o=pL(s,i.value.position.start,i.value.position.end);t.report({message:`Type mismatch for argument '${i.name}': expected ${s}, got ${a}`,startIndex:i.value.position.start,endIndex:i.value.position.end,suggest:o})}}function pL(t,e,r){let i=(0,Xa.getDefaultValueForType)(t),n=[];return i!==""&&n.push({message:`Replace with default value '${i}' for ${t}`,fix:s=>s.replace(e,r,i)}),n.push({message:"Remove value",fix:s=>s.remove(e,r)}),n}function LG(t,e){return t.args.length==1||e.position.start==t.args[t.args.length-1].position.start}function PG(t){if(t.contentForType.value!=="block")return;let e=t.args.find(r=>r.name=="type")?.value;if(!(!e||!(0,fL.isLiquidString)(e)))return e.value}function qG(t){if((0,fL.isLiquidString)(t.snippet))return t.snippet.value}async function CG(t,e){let r=t.getDocDefinition&&await t.getDocDefinition(e);if(r?.liquidDoc?.parameters)return new Map(r.liquidDoc.parameters.map(i=>[i.name,i]))}function lb(t,e){return r=>{let n=t.source.slice(t.position.start,e.position.start).match(/,\s*/g),s=n?.[n.length-1],a=s?e.position.start-(s.length-1):e.position.start;LG(t,e)&&(a-=1);let u=t.source.substring(e.position.end,t.position.end).match(/\s*,/);return u?r.remove(a,e.position.end+u[0].length):r.remove(a,e.position.end)}}function hL(t,e){return r=>{let i=`, ${e.name}: ${(0,Xa.getDefaultValueForType)(e.type)}`;if(t.args.length==0)return r.insert(t.position.end-1,i);let n=t.args[t.args.length-1],a=t.source.substring(n.position.end,t.position.end).match(/\s*,\s*/);return a?r.replace(n.position.end,n.position.end+a[0].length,`${i} `):r.insert(n.position.end,i)}}});var gL=T(ih=>{"use strict";y();Object.defineProperty(ih,"__esModule",{value:!0});ih.DuplicateRenderSnippetArguments=void 0;var dL=Y(),mL=Ri();ih.DuplicateRenderSnippetArguments={meta:{code:"DuplicateRenderSnippetArguments",name:"Duplicate Render Snippet Arguments",aliases:["DuplicateRenderSnippetParams"],docs:{description:"This check ensures that no duplicate argument names are provided when rendering a snippet.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/duplicate-render-snippet-arguments"},type:dL.SourceCodeType.LiquidHtml,severity:dL.Severity.WARNING,schema:{},targets:[]},create(t){return{async RenderMarkup(e){let r=(0,mL.getSnippetName)(e);if(!r)return;let i=new Set,n=[];e.alias?.value&&i.add(e.alias.value);for(let s of e.args)i.has(s.name)&&n.push(s),i.add(s.name);(0,mL.reportDuplicateArguments)(t,e,n,r)}}}}});var vL=T(nh=>{"use strict";y();Object.defineProperty(nh,"__esModule",{value:!0});nh.DuplicateContentForArguments=void 0;var yL=Y(),_L=Ri();nh.DuplicateContentForArguments={meta:{code:"DuplicateContentForArguments",name:"Duplicate ContentFor Arguments",docs:{description:"This check ensures that no duplicate argument names are provided when rendering a static block.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/duplicate-content-for-arguments"},type:yL.SourceCodeType.LiquidHtml,severity:yL.Severity.WARNING,schema:{},targets:[]},create(t){return{async ContentForMarkup(e){let r=(0,_L.getBlockName)(e);if(!r)return;let i=new Set,n=[];for(let s of e.args)i.has(s.name)&&n.push(s),i.add(s.name);(0,_L.reportDuplicateArguments)(t,e,n,r)}}}}});var SL=T(sh=>{"use strict";y();Object.defineProperty(sh,"__esModule",{value:!0});sh.EmptyBlockContent=void 0;var bL=Y(),RG=xt();sh.EmptyBlockContent={meta:{code:"EmptyBlockContent",name:"Prevent empty block content",docs:{description:"This check exists to warn you when the blocks array at the root level of the schema is empty.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/empty-block-content"},type:bL.SourceCodeType.LiquidHtml,severity:bL.Severity.WARNING,schema:{},targets:[]},create(t){let e=!1,r={start:0,end:0};return{async LiquidTag(i){if(i.name!=="content_for")return;let n=i.markup;typeof n=="object"&&n.contentForType.value==="blocks"&&(r.start=i.blockStartPosition.start,r.end=i.blockStartPosition.end,e=!0)},async onCodePathEnd(){let i=await(0,RG.getSchema)(t),{validSchema:n,ast:s}=i??{};if(!n||n instanceof Error||!s||s instanceof Error)return;let a=n.blocks;e&&!a?t.report({message:`The 'content_for "blocks"' tag is present, but the blocks array is not defined.`,startIndex:r.start,endIndex:r.end}):e&&a&&a.length===0&&t.report({message:`The 'content_for "blocks"' tag is present, but the blocks array is empty.`,startIndex:r.start,endIndex:r.end})}}}}});var IL=T(oh=>{"use strict";y();Object.defineProperty(oh,"__esModule",{value:!0});oh.HardcodedRoutes=void 0;var MG=ge(),wL=Y(),ah=je(),fb={"/":"root_url","/account":"account_url","/account/addresses":"account_addresses_url","/account/login":"account_login_url","/account/logout":"account_logout_url","/account/recover":"account_recover_url","/account/register":"account_register_url","/cart":"cart_url","/cart/add":"cart_add_url","/cart/change":"cart_change_url","/cart/clear":"cart_clear_url","/cart/update":"cart_update_url","/collections":"collections_url","/collections/all":"all_products_collection_url","/customer_authentication/login":"storefront_login_url","/recommendations/products":"product_recommendations_url","/search":"search_url","/search/suggest":"predictive_search_url"},kL=Object.keys(fb).reverse();oh.HardcodedRoutes={meta:{code:"HardcodedRoutes",name:"Hardcoded Routes",docs:{description:"This check encourages using the routes object instead of hardcoding URLs.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/hardcoded-routes"},type:wL.SourceCodeType.LiquidHtml,severity:wL.Severity.WARNING,schema:{},targets:[]},create(t){return{async HtmlElement(e){let r=e.attributes.filter(ah.isValuedHtmlAttribute).find(i=>((0,ah.isAttr)(i,"action")||(0,ah.isAttr)(i,"href"))&&xL(i));if(r){let i=r,n=xL(i),s=fb[n],a=i.attributePosition.start,o=a+n.length;t.report({message:`Use routes object {{ routes.${s} }} instead of hardcoding ${n}`,startIndex:a,endIndex:o})}},async LiquidFilter(e){if(e.name!=="link_to")return;let r=e.args[0],i=r.type==="String"?r.value:"",n=kL.find(s=>s==="/"?s===i:i.startsWith(s));if(n){let s=fb[n],a=r.position.start+1;t.report({message:`Use routes object {{ routes.${s} }} instead of hardcoding ${n}`,startIndex:a,endIndex:a+n.length})}}}}};function xL(t){if(!(0,ah.isNodeOfType)(MG.NodeTypes.TextNode,t.value[0]))return;let e=t.value[0].value;return kL.find(r=>r==="/"?r===e&&t.value.length===1:e.startsWith(r))}});var TL=T(ch=>{"use strict";y();Object.defineProperty(ch,"__esModule",{value:!0});ch.ImgWidthAndHeight=void 0;var AL=Y(),uh=je();ch.ImgWidthAndHeight={meta:{code:"ImgWidthAndHeight",name:"Width and height attributes on image tags",docs:{description:"This check is aimed at eliminating content layout shift in themes by enforcing the use of the width and height attributes on img tags.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/img-width-and-height"},type:AL.SourceCodeType.LiquidHtml,severity:AL.Severity.ERROR,schema:{},targets:[]},create(t){return{async HtmlVoidElement(e){if(e.name==="img"){let r=e.attributes.find(s=>(0,uh.isValuedHtmlAttribute)(s)&&(0,uh.isAttr)(s,"width")),i=e.attributes.find(s=>(0,uh.isValuedHtmlAttribute)(s)&&(0,uh.isAttr)(s,"height")),n=[];if(r||n.push("width"),i||n.push("height"),n.length>0){let s=n.length===1?"attribute":"attributes";t.report({message:`Missing ${n.join(" and ")} ${s} on img tag`,startIndex:e.position.start,endIndex:e.position.end})}}}}}}});var LL=T(lh=>{"use strict";y();Object.defineProperty(lh,"__esModule",{value:!0});lh.isPropertyNode=FG;lh.getAllBlocks=NL;var pb=ze(),DG=ki();function FG(t){return typeof t=="object"&&t!==null}function OL(t){return t.filter(e=>e==="blocks").length>1}function EL(t,e,r,i){i.report({message:t,startIndex:e+(0,pb.getLocStart)(r),endIndex:e+(0,pb.getLocEnd)(r)})}async function jG(t,e){if(t==="@theme"||t==="@app")return!0;let r=`blocks/${t}.liquid`;return await(0,DG.doesFileExist)(e,r)}async function BG(t,e,r){let i=[];if(!t)return i;let n=OL(e)?await r.getBlockSchema?.(t):await r.getSectionSchema?.(t);if(!n||n instanceof Error)return i;let{validSchema:s}=n;return!s||s instanceof Error||Array.isArray(s.blocks)&&s.blocks.forEach(a=>{!("name"in a)&&a.type!=="@app"&&i.push(a.type)}),i}async function VG(t,e,r,i,n,s,a){let o=await BG(i,n,a);if(o.length===0)return;if(!await jG(t,a))EL(`Theme block 'blocks/${t}.liquid' does not exist.`,s,r,a);else{if(e)return;{let l=t.startsWith("_"),f=o.includes("@theme"),h=o.includes(t);if(l?h:h||f)return;{let p=OL(n)?"blocks":"sections";EL(`Block type '${t}' is not allowed in '${p}/${i}.liquid'.`,s,r,a)}}}}async function NL(t,e,r,i,n,s){await Promise.all(Object.entries(i).map(async([a,o])=>{if(o.type){let u=n.concat(a,"type"),l=(0,pb.nodeAtPath)(t,u);l&&await VG(o.type,o.static,l,r,n,e,s)}"blocks"in o&&await NL(t,e,o.type,o.blocks,n.concat(a,"blocks"),s)}))}});var qL=T(fh=>{"use strict";y();Object.defineProperty(fh,"__esModule",{value:!0});fh.JSONMissingBlock=void 0;var $G=xt(),PL=Y(),hb=LL();fh.JSONMissingBlock={meta:{code:"JSONMissingBlock",name:"Check for missing blocks types in JSON templates",docs:{description:"This check ensures that JSON templates contain valid block types.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/json-missing-block"},type:PL.SourceCodeType.JSON,severity:PL.Severity.ERROR,schema:{},targets:[]},create(t){return t.toRelativePath(t.file.uri).startsWith("templates/")?{async onCodePathEnd(){let r=await(0,$G.getSchemaFromJSON)(t),{ast:i}=r??{};if(!i||i instanceof Error||!r)return;let n=r.parsed.sections;n&&await Promise.all(Object.entries(n).map(async([s,a])=>{(0,hb.isPropertyNode)(a)&&"blocks"in a&&(0,hb.isPropertyNode)(a.blocks)&&"type"in a&&await(0,hb.getAllBlocks)(i,0,a.type,a.blocks,["sections",s,"blocks"],t)}))}}:{}}}});var RL=T(ph=>{"use strict";y();Object.defineProperty(ph,"__esModule",{value:!0});ph.JSONSyntaxError=void 0;var UG=nv(),CL=Y(),HG=Ce();function GG(t){return("rawMessage"in t?t.rawMessage:t.message).replace(/\s+at \d+:\d+/,"")}ph.JSONSyntaxError={meta:{code:"JSONSyntaxError",name:"Enforce valid JSON",docs:{description:"This check exists to prevent invalid JSON files in themes.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/json-syntax-error"},type:CL.SourceCodeType.JSON,severity:CL.Severity.ERROR,schema:{},targets:[],deprecated:!0},create(t){if(t.validateJSON)return{};let e=t.file.ast;return(0,HG.isError)(e)?{async onCodePathStart(r){if(r.ast instanceof UG.JSONCParseErrors)for(let i of r.ast.errors)t.report({message:WG(i.error),startIndex:i.offset,endIndex:i.offset+i.length});else t.report({message:GG(e),startIndex:0,endIndex:r.source.length})}}:{}}};function WG(t){switch(t){case 1:return"Invalid symbol";case 2:return"Invalid number format";case 3:return"Property name expected";case 4:return"Expecting a value";case 5:return"Expecting a colon after a property name (:)";case 6:return"Expecting a comma";case 7:return"Expecting a closing brace (})";case 8:return"Expecting a closing bracket (])";case 9:return"Expecting end of file";case 10:return"Invalid comment token";case 11:return"Unexpected end of comment";case 12:return"Unexpected end of string";case 13:return"Unexpected end of number";case 14:return"Invalid unicode";case 15:return"Invalid escape character";case 16:return"Invalid character";default:return"Something went wrong with this JSON"}}});var FL=T(hh=>{"use strict";y();Object.defineProperty(hh,"__esModule",{value:!0});hh.LiquidFreeSettings=void 0;var zG=Bf(),ML=Y(),JG=kn();hh.LiquidFreeSettings={meta:{code:"LiquidFreeSettings",name:"Check for liquid free settings values",docs:{description:"Ensures settings values are liquid free.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/liquid-free-settings"},type:ML.SourceCodeType.LiquidHtml,severity:ML.Severity.WARNING,schema:{},targets:[]},create(t){return{async LiquidRawTag(e){if(e.name!=="schema"||e.body.kind!=="json")return;let r=e.source.slice(e.blockStartPosition.end,e.blockEndPosition.start),i=(0,zG.toJSONAST)(r);i instanceof Error||(0,JG.visit)(i,{Property(n,s){if(!QG(s,"settings")||!DL(n.value)||KG(s))return;let{value:a,loc:o}=n.value,u=n.key.value;typeof a=="string"&&u!=="visible_if"&&a.includes("{%")&&a.includes("%}")&&t.report({message:"Settings values cannot contain liquid logic.",startIndex:e.blockStartPosition.end+o.start.offset,endIndex:e.blockStartPosition.end+o.end.offset})}})}}}};function DL(t){return t.type==="Literal"}function KG(t){let e=t.at(-1);return!e||e.type!=="Object"?!1:e.children.some(({key:r,value:i})=>r.value!=="type"||!DL(i)?!1:i.value==="liquid")}function QG(t,e){return t.some((r,i)=>{let n=t[i-1];return(r.type==="Array"||r.type==="Object")&&n?.type==="Property"&&n.key?.value===e})}});var Mi=T(un=>{"use strict";y();Object.defineProperty(un,"__esModule",{value:!0});un.INVALID_SYNTAX_MESSAGE=void 0;un.getValuesInMarkup=YG;un.getFragmentsInMarkup=tW;un.getRangeMatch=HL;un.doesFragmentContainUnsupportedParentheses=rW;un.fragmentKeyValuePair=iW;un.INVALID_SYNTAX_MESSAGE="Syntax is not supported";function YG(t){return[...t.matchAll(new RegExp($L,"g"))].map(e=>({value:e[0],index:e.index}))}var XG='"[^"]*"',ZG="'[^']*'",jL="\\s*(-?\\d+(?:\\.\\d+)?|\\w+(?:\\.\\w+)*)\\s*",db=`\\(\\s*${jL}(\\.{2,})\\s*${jL}\\s*\\)`,BL="[^\\s,]+",VL=`(${XG}|${ZG})`,$L=`(${VL}|${db}|${BL})`,UL=`(\\S+):\\s*${$L}`,eW=new RegExp(`${VL}|${db}|${UL}|${BL}`,"g");function tW(t){return[...t.matchAll(eW)].map(e=>({value:e[0],index:e.index}))}function HL(t){return t.match(db)}function rW(t){return HL(t)?!1:t.includes("(")||t.includes(")")}function iW(t){let e=t.match(new RegExp(UL));if(!e)return;let[,r,i]=e;return{key:r,value:i}}});var WL=T(mb=>{"use strict";y();Object.defineProperty(mb,"__esModule",{value:!0});mb.detectMultipleAssignValues=nW;var GL=Mi();function nW(t){let e=/([^=]+)(=\s*)([^|]+)(?:\s*\|\s*.*)?$/m;if(t.name!=="assign")return;let r=t.markup;if(typeof r!="string")return;let i=r.match(e);if(!i)return;let[n,s,a,o]=i,u=(0,GL.getValuesInMarkup)(o).at(0)?.value;if(!u)return;let l=(p,m)=>{let v=p.indexOf(r,m);return{startIndex:v+s.length+a.length+u.length,endIndex:v+s.length+a.length+o.trimEnd().length}},{startIndex:f,endIndex:h}=l(t.source,t.position.start);if(!(h<=f)&&!(h<=f))return{message:GL.INVALID_SYNTAX_MESSAGE,startIndex:f,endIndex:h,fix:p=>{p.replace(f,h,"")}}}});var JL=T(gb=>{"use strict";y();Object.defineProperty(gb,"__esModule",{value:!0});gb.detectInvalidBooleanExpressions=oW;var zL=ge(),sW=Mi(),aW=je();function oW(t,e){if((0,aW.isWithinRawTagThatDoesNotParseItsContents)(e))return;let r=t.condition;if(!(r.type!==zL.NodeTypes.Comparison&&r.type!==zL.NodeTypes.LogicalExpression))return{message:sW.INVALID_SYNTAX_MESSAGE,startIndex:t.position.start,endIndex:t.position.end,fix:i=>{i.replace(t.position.start,t.position.end,t.source.slice(r.left.position.start,r.left.position.end))}}}});var KL=T(_b=>{"use strict";y();Object.defineProperty(_b,"__esModule",{value:!0});_b.detectInvalidEchoValue=cW;var uW=ge(),yb=Mi();function cW(t){let e=/([^|]*)(?:\s*\|\s*.*)?$/m;if(t.type===uW.NodeTypes.LiquidTag&&t.name!=="echo")return;let r=t.markup;if(typeof r!="string"||!r)return;let i=r.match(e);if(!i)return;let[,n]=i,s=(0,yb.getValuesInMarkup)(n).at(0)?.value;if(!s){let l=t.source.indexOf(r,t.position.start),f=l+r.length;return{message:yb.INVALID_SYNTAX_MESSAGE,startIndex:l,endIndex:f,fix:h=>{h.replace(l,f,"blank")}}}let a=(l,f)=>{let h=l.indexOf(r,f);return{startIndex:h+s.length,endIndex:h+n.trimEnd().length}},{startIndex:o,endIndex:u}=a(t.source,t.position.start);if(!(u<=o))return{message:yb.INVALID_SYNTAX_MESSAGE,startIndex:o,endIndex:u,fix:l=>{l.replace(o,u,"")}}}});var ZL=T(vb=>{"use strict";y();Object.defineProperty(vb,"__esModule",{value:!0});vb.detectInvalidConditionalNode=pW;var XL=Mi(),lW={logical:/^(and|or)$/,comparison:/^(==|!=|>=|<=|>|<|contains)$/,invalid:/^[@#$&]$/,literal:/^(['"][^'"]*['"]|\d+(?:\.\d+)?|true|false|nil|empty|blank)$/};function fW(t){for(let[e,r]of Object.entries(lW))if(r.test(t))return e;return"variable"}function pW(t){if(!("name"in t)||!t.name||!["if","elsif","unless"].includes(String(t.name)))return;let e=t.markup;if(typeof e!="string"||!e.trim())return;let r=gW(e);if(!r)return;let i=t.blockStartPosition||t.position,s=t.source.slice(i.start,i.end).indexOf(e);if(s<0)return;let a=i.start+s,o=a+e.length;return{message:`${XL.INVALID_SYNTAX_MESSAGE}: ${r.message}`,startIndex:a,endIndex:o,fix:u=>{u.replace(a,o,r.fix)}}}function QL(t){return t.type==="literal"||t.type==="variable"}function YL(t){return t.type==="logical"||t.type==="comparison"}function hW(t){let e=t[0];return e.type==="invalid"||e.type==="comparison"?{message:`Conditional cannot start with '${e.value}'. Use a variable or value instead`,fix:"false"}:null}function dW(t){for(let i=0;i<=t.length-4;i++){let[n,s,a]=t.slice(i,i+3),o=t.slice(i+3);if(QL(n)&&s.type==="comparison"&&QL(a)&&o.length>0&&o[0].type!=="logical"){let u=t.slice(0,i+3).map(h=>h.value).join(" "),l=o.map(h=>h.value).join(" ");return/&&|\|\|/.test(l)?{message:`Conditional is invalid. Anything after '${u}' will be ignored. Use 'and'/'or' instead of '&&'/'||' for multiple conditions`,fix:u}:{message:`Conditional is invalid. Anything after '${u}' will be ignored`,fix:u}}}return null}function mW(t){for(let e=0;e<t.length-1;e++){let r=t[e],i=t[e+1];if(r.type==="literal"&&!YL(i)){let n=t.slice(e+1);if(!(n[0]?.type==="variable"&&n.some(YL))){let a=n.map(u=>u.value).join(" ");return/&&|\|\|/.test(a)?{message:`Expression stops at truthy value '${r.value}', and will ignore: '${a}'. Use 'and'/'or' instead of '&&'/'||' for multiple conditions`,fix:r.value}:{message:`Expression stops at truthy value '${r.value}', and will ignore: '${a}'`,fix:r.value}}}}return null}function gW(t){let e=t.trim();if(!e)return null;let r=(0,XL.getValuesInMarkup)(e).map(({value:i})=>({value:i,type:fW(i)}));return r.length===0?null:hW(r)||dW(r)||mW(r)}});var rP=T(Za=>{"use strict";y();Object.defineProperty(Za,"__esModule",{value:!0});Za.INVALID_LOOP_RANGE_MESSAGE=void 0;Za.detectInvalidLoopRange=vW;var eP=ge(),yW=Mi(),_W=je();Za.INVALID_LOOP_RANGE_MESSAGE="Ranges must be in the format `(<start>..<end>)`. The start and end of the range must be whole numbers or variables.";function vW(t){if(t.type===eP.NodeTypes.LiquidTag&&!(0,_W.isLoopLiquidTag)(t))return;let e=t.markup;if(e){if(typeof e=="string")return tP(t,e);if(e.collection.type===eP.NodeTypes.Range)return tP(t,t.source.slice(e.collection.position.start,e.collection.position.end))}}function tP(t,e){let r=(0,yW.getRangeMatch)(e);if(!r||r.index===void 0)return;let[i,n,,s]=r,a=n,o=s;!isNaN(Number(n))&&Number(n)%1!==0&&(a=`${Math.trunc(Number(n))}`),!isNaN(Number(s))&&Number(s)%1!==0&&(o=`${Math.trunc(Number(s))}`);let u=`(${a}..${o})`;if(e.slice(r.index,r.index+i.length)===u)return;let f=t.source.indexOf(e,t.position.start)+r.index,h=f+i.length;return{message:Za.INVALID_LOOP_RANGE_MESSAGE,startIndex:f,endIndex:h,fix:p=>{p.replace(f,h,u)}}}});var nP=T(Sb=>{"use strict";y();Object.defineProperty(Sb,"__esModule",{value:!0});Sb.detectInvalidLoopArguments=wW;var bW=ge(),bb=Mi(),SW=je();function wW(t,e=[]){if(t.type===bW.NodeTypes.LiquidTag&&!(0,SW.isLoopLiquidTag)(t))return;let r=t.markup;if(!r)return;typeof r!="string"&&(r=r.source.slice(r.position.start,r.position.end));let i=(0,bb.getFragmentsInMarkup)(r);if(i.length<=3)return;let n=t.source.indexOf(r,t.position.start),s=n+i.at(3).index,a=n+i.at(-1).index+i.at(-1).value.length,o=[],u=!1,l=[];for(let f=3;f<i.length;f++){let h=i[f];if((0,bb.doesFragmentContainUnsupportedParentheses)(h.value)){u=!0,l.push(h.value);continue}let p=(0,bb.fragmentKeyValuePair)(h.value);if(p){if(u=!0,!iP(e,t.name,p.key,!1)){l.push(h.value);continue}}else if(u||!iP(e,t.name,h.value,!0)){u=!0,l.push(h.value);continue}o.push(h.value)}if(l.length!==0)return{message:`Arguments must be provided in the format \`${t.name} in <array> <positional arguments> <named arguments>\`. Invalid/Unknown arguments: ${l.join(", ")}`,startIndex:s,endIndex:a,fix:f=>{f.replace(s,a,o.join(" "))}}}function iP(t,e,r,i){return t.find(n=>n.name===e)?.parameters?.some(n=>n.name===r&&n.positional===i)||!1}});var sP=T(xb=>{"use strict";y();Object.defineProperty(xb,"__esModule",{value:!0});xb.detectConditionalNodeUnsupportedParenthesis=xW;var wb=Mi();function xW(t){if(!["if","elsif","unless"].includes(t.name)||typeof t.markup!="string"||!t.markup.trim())return;let e=t.source.indexOf(t.markup,t.position.start),i=(0,wb.getFragmentsInMarkup)(t.markup).filter(n=>(0,wb.doesFragmentContainUnsupportedParentheses)(n.value));if(i.length)return{message:wb.INVALID_SYNTAX_MESSAGE,startIndex:e,endIndex:e+t.markup.length,fix:n=>{for(let s of i)n.replace(e+s.index,e+s.index+s.value.length,s.value.replace(/[\(\)]/g,""))}}}});var oP=T(kb=>{"use strict";y();Object.defineProperty(kb,"__esModule",{value:!0});kb.detectInvalidFilterName=IW;var eo=ge(),kW=Mi();async function IW(t,e){if(!e)return[];if(t.type===eo.NodeTypes.LiquidVariableOutput)return typeof t.markup!="string"?[]:aP(t,t.markup,e);if(t.type===eo.NodeTypes.LiquidTag){if(t.name===eo.NamedTags.echo&&typeof t.markup!="string")return[];if(t.name===eo.NamedTags.assign&&typeof t.markup!="string")return[];if(typeof t.markup=="string"&&(t.name===eo.NamedTags.echo||t.name===eo.NamedTags.assign))return aP(t,t.markup,e)}return[]}async function aP(t,e,r){let i=r,n=e.trim(),s=[],a=/\|\s*([a-zA-Z][a-zA-Z0-9_]*)/g,o=Array.from(n.matchAll(a));for(let u of o){let l=u[1];if(!i.some(b=>b.name===l))continue;let f=u.index+u[0].length,p=n.slice(f).match(/^(?!\s*(?::|$|\|\s*[a-zA-Z]|\|\s*\||\s*\|\s*(?:[}%]|$)))([^:|]+?)(?=\s*(?::|$|\|))/)?.[1];if(!p)continue;let v=t.source.indexOf(e,t.position.start)+f,S=v+p.length;s.push({message:`${kW.INVALID_SYNTAX_MESSAGE} Filter '${l}' has trailing characters '${p}' that should be removed.`,startIndex:v,endIndex:S,fix:b=>{b.replace(v,S,"")}})}return s}});var lP=T(Ib=>{"use strict";y();Object.defineProperty(Ib,"__esModule",{value:!0});Ib.detectInvalidPipeSyntax=AW;var to=ge(),uP=Mi();async function AW(t){if(t.type===to.NodeTypes.LiquidVariableOutput)return typeof t.markup!="string"?[]:cP(t,t.markup);if(t.type===to.NodeTypes.LiquidTag){if(t.name===to.NamedTags.echo&&typeof t.markup!="string")return[];if(t.name===to.NamedTags.assign&&typeof t.markup!="string")return[];if(typeof t.markup=="string"&&(t.name===to.NamedTags.echo||t.name===to.NamedTags.assign))return cP(t,t.markup)}return[]}async function cP(t,e){let r=[],i=e.trim(),n=/(\|\s*){2,}/g,s=Array.from(i.matchAll(n));for(let u of s){let l=t.source.indexOf(e,t.position.start);if(l===-1)continue;let f=l+u.index,h=f+u[0].length;r.push({message:`${uP.INVALID_SYNTAX_MESSAGE}. Remove extra \`|\` character(s).`,startIndex:f,endIndex:h,fix:p=>{p.replace(f,h,"| ")}})}let a=/\s*\|\s*$/,o=i.match(a);if(o){let u=t.source.indexOf(e,t.position.start);if(u===-1)return r;let l=o.index,f=u+l,h=f+o[0].length;r.push({message:`${uP.INVALID_SYNTAX_MESSAGE}. Remove the trailing \`|\` character.`,startIndex:f,endIndex:h,fix:p=>{p.replace(f,h,"")}})}return r}});var gP=T(mh=>{"use strict";y();Object.defineProperty(mh,"__esModule",{value:!0});mh.LiquidHTMLSyntaxError=void 0;var fP=Y(),Ab=Ce(),TW=WL(),EW=JL(),pP=KL(),hP=ZL(),OW=rP(),NW=nP(),LW=sP(),dP=oP(),mP=lP(),dh=je();function PW(t){return"name"in t&&t.name==="LiquidHTMLParsingError"&&"loc"in t}function qW(t,e){return t.replace(/Line \d+, col \d+:\s+/,"SyntaxError: ").replace(/(?!<expected ".+",) not .*/,` not "${e}"`)}mh.LiquidHTMLSyntaxError={meta:{code:"LiquidHTMLSyntaxError",aliases:["SyntaxError","HtmlParsingError"],name:"Prevent LiquidHTML Syntax Errors",docs:{description:"This check exists to inform the user of Liquid HTML syntax errors.",recommended:!0},type:fP.SourceCodeType.LiquidHtml,severity:fP.Severity.ERROR,schema:{},targets:[]},create(t){let e=t.file.ast,r=t.themeDocset?.filters(),i=t.themeDocset?.tags();return(0,Ab.isError)(e)?{async onCodePathStart(n){if(PW(e)){let{start:s,end:a}=e.loc,o=(0,Ab.getOffset)(n.source,s.line,s.column),u=(0,Ab.getOffset)(n.source,a.line,a.column);o===u&&(u+=1);let l=n.source.slice(o,u);t.report({message:qW(e.message,l),startIndex:o,endIndex:u})}else t.report({message:e.message,startIndex:0,endIndex:n.source.length})}}:{async BooleanExpression(n,s){if((0,dh.isWithinRawTagThatDoesNotParseItsContents)(s))return;let a=(0,EW.detectInvalidBooleanExpressions)(n,s);a&&t.report(a)},async LiquidTag(n,s){if((0,dh.isWithinRawTagThatDoesNotParseItsContents)(s))return;let a=[(0,TW.detectMultipleAssignValues)(n),(0,pP.detectInvalidEchoValue)(n),(0,OW.detectInvalidLoopRange)(n),(0,NW.detectInvalidLoopArguments)(n,await i)].filter(Boolean),o=(0,LW.detectConditionalNodeUnsupportedParenthesis)(n)||(0,hP.detectInvalidConditionalNode)(n);o&&a.push(o),a.forEach(t.report);let u=await(0,dP.detectInvalidFilterName)(n,await r);u.length>0&&u.forEach(f=>t.report(f));let l=await(0,mP.detectInvalidPipeSyntax)(n);l.length>0&&l.forEach(f=>t.report(f))},async LiquidBranch(n,s){if((0,dh.isWithinRawTagThatDoesNotParseItsContents)(s))return;let a=(0,hP.detectInvalidConditionalNode)(n);a&&t.report(a)},async LiquidVariableOutput(n,s){if((0,dh.isWithinRawTagThatDoesNotParseItsContents)(s))return;let a=await(0,dP.detectInvalidFilterName)(n,await r);a.length>0&&a.forEach(l=>t.report(l));let o=await(0,mP.detectInvalidPipeSyntax)(n);o.length>0&&o.forEach(l=>t.report(l));let u=(0,pP.detectInvalidEchoValue)(n);u&&t.report(u)}}}}});var vP=T(gh=>{"use strict";y();Object.defineProperty(gh,"__esModule",{value:!0});gh.MatchingTranslations=void 0;var yP=Y(),_P=new Set(["zero","one","two","few","many","other"]);gh.MatchingTranslations={meta:{code:"MatchingTranslations",name:"Translation files should have the same keys",docs:{description:"TODO",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/matching-translations"},type:yP.SourceCodeType.JSON,severity:yP.Severity.ERROR,schema:{},targets:[]},create(t){let e=new Set,r=new Set,i=new Map,n=t.file,s=n.uri,a=t.toRelativePath(s),o=n.ast,u=a.startsWith("locales/"),l=s.endsWith(".default.json")||s.endsWith(".default.schema.json"),f=s.endsWith(".schema.json");if(!u||l||o instanceof Error)return{};let h=()=>e.size>0,p=({type:A})=>A==="Literal",m=A=>_P.has(A.key.value),v=A=>A.startsWith("shopify.")||A.startsWith("customer_accounts."),S=A=>e.has(A)??!1,b=A=>[..._P].some(E=>A.endsWith(E)),g=A=>Object.keys(A).reduce((O,L)=>{if(typeof A[L]!="object")return O.concat(L);let B=A[L],R=g(B);return O.concat(R.map(q=>`${L}.${q}`))},[]),k=A=>A.filter(E=>E.type==="Property").reduce((E,O)=>E.concat(O.key.value),[]).join("."),w=(A,E)=>{let O=Math.min(A.length,E.length);for(let L=0;L<O;L++)if(A[L]!==E[L])return L;return O},_=A=>{let E=A.split("."),O="",L=0;for(let B of i.keys()){let R=B.split("."),q=w(R,E);q>L&&(L=q,O=B)}return i.get(O)??o};return{async onCodePathStart(){let E=await(f?t.getDefaultSchemaTranslations:t.getDefaultTranslations)().then(g);E.forEach(Set.prototype.add,e),E.forEach(Set.prototype.add,r)},async Property(A,E){let O=k(E.concat(A));if(i.set(O,A),!!h()&&!m(A)&&p(A.value)&&!v(O)){if(S(O)){r.delete(O);return}t.report({message:`A default translation for '${O}' does not exist`,startIndex:A.loc.start.offset,endIndex:A.loc.end.offset,suggest:[{message:"Delete unneeded translation key",fix(L){L.remove(O)}}]})}},async onCodePathEnd(){r.forEach(A=>{let E=_(A);b(A)||v(A)||t.report({message:`The translation for '${A}' is missing`,startIndex:E.loc.start.offset,endIndex:E.loc.end.offset,fix(O){O.add(A,"TODO")}})})}}}}});var SP=T(yh=>{"use strict";y();Object.defineProperty(yh,"__esModule",{value:!0});yh.MissingAsset=void 0;var bP=Y(),Tb=ki(),CW=je();yh.MissingAsset={meta:{code:"MissingAsset",name:"Avoid rendering missing asset files",docs:{description:"Reports missing asset files",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/missing-asset"},type:bP.SourceCodeType.LiquidHtml,severity:bP.Severity.ERROR,schema:{},targets:[]},create(t){return{async LiquidVariable(e){if(e.filters.length===0||e.filters[0].name!=="asset_url"||!(0,CW.isLiquidString)(e.expression))return;let r=e.expression,i=`assets/${r.value}`,n=i,s=await(0,Tb.doesFileExist)(t,n);s||n.endsWith(".scss.css")&&(n=n.replace(".scss.css",".scss.liquid"),s=await(0,Tb.doesFileExist)(t,n),s)||(n.endsWith(".js")||n.endsWith(".css"))&&(n+=".liquid",s=await(0,Tb.doesFileExist)(t,n),s)||t.report({message:`'${i}' does not exist`,startIndex:r.position.start,endIndex:r.position.end})}}}}});var xP=T(_h=>{"use strict";y();Object.defineProperty(_h,"__esModule",{value:!0});_h.MissingContentForArguments=void 0;var wP=Y(),Eb=Ri();_h.MissingContentForArguments={meta:{code:"MissingContentForArguments",name:"Missing ContentFor Arguments",docs:{description:"This check ensures that all required arguments are provided when rendering a static block.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/missing-content-for-arguments"},type:wP.SourceCodeType.LiquidHtml,severity:wP.Severity.WARNING,schema:{},targets:[]},create(t){return{async ContentForMarkup(e){let r=(0,Eb.getBlockName)(e);if(!r)return;let i=await(0,Eb.getLiquidDocParams)(t,`blocks/${r}.liquid`);if(!i)return;let n=new Map(e.args.map(a=>[a.name,a])),s=Array.from(i.values()).filter(a=>a.required&&!n.has(a.name));(0,Eb.reportMissingArguments)(t,e,s,r)}}}}});var IP=T(vh=>{"use strict";y();Object.defineProperty(vh,"__esModule",{value:!0});vh.MissingRenderSnippetArguments=void 0;var kP=Y(),Ob=Ri();vh.MissingRenderSnippetArguments={meta:{code:"MissingRenderSnippetArguments",name:"Missing Render Snippet Arguments",aliases:["MissingRenderSnippetParams"],docs:{description:"This check ensures that all required arguments are provided when rendering a snippet.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/missing-render-snippet-arguments"},type:kP.SourceCodeType.LiquidHtml,severity:kP.Severity.WARNING,schema:{},targets:[]},create(t){return{async RenderMarkup(e){let r=(0,Ob.getSnippetName)(e);if(!r)return;let i=await(0,Ob.getLiquidDocParams)(t,`snippets/${r}.liquid`);if(!i)return;let n=new Map(e.args.map(a=>[a.name,a])),s=Array.from(i.values()).filter(a=>a.required&&!n.has(a.name)&&a.name!==e.alias?.value);(0,Ob.reportMissingArguments)(t,e,s,r)}}}}});var TP=T(Sh=>{"use strict";y();Object.defineProperty(Sh,"__esModule",{value:!0});Sh.MissingTemplate=void 0;var AP=ge(),RW=vw(),bh=Y(),MW=ki(),DW={ignoreMissing:bh.SchemaProp.array(bh.SchemaProp.string(),[])};Sh.MissingTemplate={meta:{code:"MissingTemplate",name:"Avoid rendering missing templates",docs:{description:"Reports missing include/render/section liquid file",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/missing-template"},type:bh.SourceCodeType.LiquidHtml,severity:bh.Severity.ERROR,schema:DW,targets:[]},create(t){let e=n=>typeof n.markup!="string";function r(n){return t.settings.ignoreMissing.some(s=>(0,RW.minimatch)(n,s))}async function i(n,{position:s}){await(0,MW.doesFileExist)(t,n)||r(n)||t.report({message:`'${n}' does not exist`,startIndex:s.start,endIndex:s.end})}return{async RenderMarkup(n){if(n.snippet.type===AP.NodeTypes.VariableLookup)return;let s=n.snippet,a=`snippets/${s.value}.liquid`;await i(a,s)},async LiquidTag(n){if(!e(n)||n.name!==AP.NamedTags.section)return;let s=n.markup,a=`sections/${s.value}.liquid`;await i(a,s)}}}}});var OP=T(wh=>{"use strict";y();Object.defineProperty(wh,"__esModule",{value:!0});wh.OrphanedSnippet=void 0;var FW=xt(),EP=Y();wh.OrphanedSnippet={meta:{code:"OrphanedSnippet",name:"Prevent orphaned snippets",docs:{description:"This check exists to prevent orphaned snippets in themes.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/orphaned-snippet"},type:EP.SourceCodeType.LiquidHtml,severity:EP.Severity.WARNING,schema:{},targets:[]},create(t){return{async onCodePathEnd(){let{getReferences:e}=t;if(!e)return;let r=t.file.uri;(0,FW.isSnippet)(r)&&(await e(r)).length===0&&t.report({message:"This snippet is not referenced by any other files",startIndex:0,endIndex:1})}}}}});var PP=T(kh=>{"use strict";y();Object.defineProperty(kh,"__esModule",{value:!0});kh.PaginationSize=void 0;var Nb=ge(),xh=Y(),NP=Ce(),LP=je(),jW=ze(),BW={minSize:xh.SchemaProp.number(1),maxSize:xh.SchemaProp.number(250)};kh.PaginationSize={meta:{code:"PaginationSize",name:"Ensure paginate tags are used with performant sizes",docs:{description:"This check is aimed at keeping response times low.",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/pagination-size",recommended:!0},type:xh.SourceCodeType.LiquidHtml,severity:xh.Severity.WARNING,schema:BW,targets:[]},create(t){let e=t.settings.minSize,r=t.settings.maxSize,i=[],n=[];function s(a,o,u=`Pagination size must be a positive integer between ${e} and ${r}.`){e<=o&&o<=r||t.report({message:u,startIndex:a.position.start,endIndex:a.position.end})}return{async LiquidTag(a){if(typeof a.markup=="string"||a.name!=="paginate")return;let o=a.markup.pageSize;(0,LP.isNodeOfType)(Nb.NodeTypes.VariableLookup,o)?n.push(o):(0,LP.isNodeOfType)(Nb.NodeTypes.Number,o)&&s(o,Number(o.value))},async LiquidRawTag(a){if(a.name==="schema"){let o=(0,jW.parseJSON)(a.body.value);if((0,NP.isError)(o))return;o.settings&&Array.isArray(o.settings)&&(i=o.settings)}},async onCodePathEnd(){n.forEach(a=>{let o=(0,NP.last)(a.lookups);if(o===void 0||o.type!==Nb.NodeTypes.String)return;let u=o.value,l=i.find(f=>f.id===u);if(l!==void 0){if(l.default===void 0){t.report({message:"Default pagination size should be defined in the section settings.",startIndex:a.position.start,endIndex:a.position.end});return}s(a,l.default,`This setting's default value should be between ${e} and ${r} but is currently ${l.default}.`)}})}}}}});var CP=T(ro=>{"use strict";y();Object.defineProperty(ro,"__esModule",{value:!0});ro.scriptTagSuggestion=ro.liquidFilterSuggestion=void 0;var VW=Ce(),qP=t=>`Use an HTML script tag with the ${t} attribute instead`,$W=(t,e,r,i)=>({message:qP(t),fix(n){let a=`{{ ${e.source.slice(r.expression.position.start,(0,VW.last)(r.filters,-1)?.position.end??e.position.start)} }}`;n.replace(i.position.start,i.position.end,`<script src="${a}" ${t}></script>`)}});ro.liquidFilterSuggestion=$W;var UW=(t,e)=>({message:qP(t),fix(r){r.insert(e.blockStartPosition.end-1,` ${t}`)}});ro.scriptTagSuggestion=UW});var DP=T(Ah=>{"use strict";y();Object.defineProperty(Ah,"__esModule",{value:!0});Ah.ParserBlockingScript=void 0;var RP=ge(),MP=Y(),Lb=Ce(),cn=je(),Ih=CP();Ah.ParserBlockingScript={meta:{code:"ParserBlockingScript",aliases:["ParserBlockingScriptTag"],name:"Avoid parser blocking scripts",docs:{description:"They are bad ok?",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/parser-blocking-javascript"},type:MP.SourceCodeType.LiquidHtml,severity:MP.Severity.ERROR,schema:{},targets:[]},create(t){return{LiquidFilter:async(e,r)=>{if(e.name!=="script_tag")return;let n=e.source.slice(e.position.start,e.position.end).indexOf("script_tag"),s=(0,Lb.last)(r),a=(0,Lb.last)(r,-1);t.report({message:"The script_tag filter is parser-blocking. Use a <script> tag with async or defer for better performance",startIndex:e.position.start+n,endIndex:e.position.end,suggest:a&&a.type===RP.NodeTypes.LiquidVariableOutput&&s&&s.type===RP.NodeTypes.LiquidVariable&&(0,Lb.last)(s.filters)===e?[(0,Ih.liquidFilterSuggestion)("defer",e,s,a),(0,Ih.liquidFilterSuggestion)("async",e,s,a)]:void 0})},HtmlRawNode:async e=>{if(e.name!=="script"||!e.attributes.filter(cn.isValuedHtmlAttribute).some(s=>(0,cn.isAttr)(s,"src")))return;let i=e.attributes.filter(cn.isHtmlAttribute).some(s=>(0,cn.isAttr)(s,"async")||(0,cn.isAttr)(s,"defer")),n=e.attributes.filter(cn.isValuedHtmlAttribute).some(s=>(0,cn.isAttr)(s,"type")&&((0,cn.hasAttributeValueOf)(s,"module")||(0,cn.hasAttributeValueOf)(s,"importmap")));i||n||t.report({message:"Avoid parser blocking scripts by adding `defer` or `async` on this tag",startIndex:e.position.start,endIndex:e.position.end,suggest:[(0,Ih.scriptTagSuggestion)("defer",e),(0,Ih.scriptTagSuggestion)("async",e)]})}}}}});var BP=T(Oh=>{"use strict";y();Object.defineProperty(Oh,"__esModule",{value:!0});Oh.SchemaPresetsBlockOrder=void 0;var Th=ze(),HW=xt(),FP=Y();Oh.SchemaPresetsBlockOrder={meta:{code:"SchemaPresetsBlockOrder",name:"Gives recommendations and validations for block_order",docs:{description:"Gives recommendations and validations for block_order for preset blocks as a hash.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/schema-presets-block-order"},type:FP.SourceCodeType.LiquidHtml,severity:FP.Severity.WARNING,schema:{},targets:[]},create(t){return{async LiquidRawTag(e){if(e.name!=="schema"||e.body.kind!=="json")return;let r=e.blockStartPosition.end,i=await(0,HW.getSchema)(t),{validSchema:n,ast:s}=i??{};if(!n||n instanceof Error||!s||s instanceof Error)return;let a=n.presets;a&&a.forEach((o,u)=>{"blocks"in o&&o.blocks&&jP(o,t,r,s,["presets",String(u)])})}}}};function jP(t,e,r,i,n){if("blocks"in t&&typeof t.blocks=="object"&&t.blocks){let s="block_order"in t?t.block_order:void 0;s||GW(t)&&Eh(e,r,i,n,"block_order is missing",!1),s?.forEach((a,o)=>{if(!t.blocks||!Array.isArray(t.blocks)&&!t.blocks[a]){let u=n.concat(["block_order"]).concat([String(o)]);Eh(e,r,i,u,`block '${a}' is missing from 'blocks'`)}});for(let[a,o]of Object.entries(t.blocks)){if(o.static){if(Array.isArray(s)&&s.includes(a)){let u=n.concat(["block_order"]);Eh(e,r,i,u,`static block '${a}' cannot be in the block_order`)}}else if(Array.isArray(s)&&!s.includes(a)){let u=n.concat(["block_order"]);Eh(e,r,i,u,`block '${a}' is missing from the block_order`)}o.blocks&&(n.push("blocks",a),jP(o,e,r,i,n))}}}function GW(t){return"blocks"in t&&typeof t.blocks=="object"&&t.blocks!==null&&!Array.isArray(t.blocks)?Object.entries(t.blocks).some(([e,r])=>r.static!==!0):!1}function Eh(t,e,r,i,n,s=!0){let a=(0,Th.nodeAtPath)(r,i),o=s?e+(0,Th.getLocStart)(a):e+(0,Th.getLocEnd)(a)-1,u=e+(0,Th.getLocEnd)(a);t.report({message:n,startIndex:o,endIndex:u})}});var Nh=T(Pb=>{"use strict";y();Object.defineProperty(Pb,"__esModule",{value:!0});Pb.isContentForBlock=WW;function WW(t){return typeof t=="string"?!1:t.contentForType.value==="block"}});var $P=T(Lh=>{"use strict";y();Object.defineProperty(Lh,"__esModule",{value:!0});Lh.SchemaPresetsStaticBlocks=void 0;var qb=ge(),io=ze(),zW=xt(),VP=Y(),JW=Nh();Lh.SchemaPresetsStaticBlocks={meta:{code:"SchemaPresetsStaticBlocks",name:"Ensure the preset static blocks are used in the liquid",docs:{description:'Warns if a preset static block does not have a corresponding content_for "block" tag.',recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/schema-presets-static-blocks"},type:VP.SourceCodeType.LiquidHtml,severity:VP.Severity.ERROR,schema:{},targets:[]},create(t){let e=[],r=[],i=0;function n(){r.forEach(s=>{e.some(a=>a.id===s.id&&a.type===s.type)||t.report({message:`Static block ${s.id} is missing a corresponding content_for "block" tag.`,startIndex:s.startIndex,endIndex:s.endIndex})})}return{async LiquidTag(s){if(s.name!==qb.NamedTags.content_for||!(0,JW.isContentForBlock)(s.markup))return;let a=s.markup.args.find(l=>l.name==="id")?.value,o=s.markup.args.find(l=>l.name==="type")?.value;if(!o||o.type!==qb.NodeTypes.String)return;let u=o.value;a?.type===qb.NodeTypes.String&&e.push({id:a.value,type:u})},async LiquidRawTag(s){if(s.name==="schema"&&s.body.kind==="json"){i=s.blockStartPosition.end;let a=await(0,zW.getSchema)(t),{validSchema:o,ast:u}=a??{};if(!o||o instanceof Error||!u||u instanceof Error)return;let l=o.presets;if(!l)return;l.forEach((f,h)=>{if("blocks"in f&&f.blocks){let p=["presets",h,"blocks"];Array.isArray(f.blocks)?f.blocks.forEach((m,v)=>{if(m.static===!0&&m.id){let S=(0,io.nodeAtPath)(u,p.concat([v]));r.push({id:m.id,type:m.type,startIndex:i+(0,io.getLocStart)(S),endIndex:i+(0,io.getLocEnd)(S)})}}):typeof f.blocks=="object"&&Object.entries(f.blocks).forEach(([m,v])=>{if(v.static===!0){let S=(0,io.nodeAtPath)(u,p.concat(m));r.push({id:m,type:v.type,startIndex:i+(0,io.getLocStart)(S),endIndex:i+(0,io.getLocEnd)(S)})}})}})}},async onCodePathEnd(){n()}}}}});var WP=T(qh=>{"use strict";y();Object.defineProperty(qh,"__esModule",{value:!0});qh.RemoteAsset=void 0;var fr=Y(),rc=je(),KW=Ce(),QW=["img","link","source","script"],YW=["fonts.shopifycdn.com","cdn.shopify.com"],XW=["stylesheet_tag","script_tag","image_tag","img_tag"],HP=["product_img_url","article_img_url","collection_img_url","img_url"],GP=["asset_url","image_url","asset_img_url","file_img_url","file_url","global_asset_url","shopify_asset_url","external_video_url","font_url"],ZW="canonical_url";function Cb(t){return t.type===fr.LiquidHtmlNodeTypes.LiquidVariableOutput}function Rb(t){return typeof t!="string"&&t.type===fr.LiquidHtmlNodeTypes.LiquidVariable}function ez(t){return t.startsWith("#")}function UP(t){return/^data:/i.test(t)}function tz(t){let e=t.value[0];if(!e||!Cb(e))return!1;let r=e.markup;return Rb(r)?r.expression.type===fr.LiquidHtmlNodeTypes.VariableLookup:!1}function Ph(t,e=[]){if(/^\/cdn\//.test(t))return!0;try{let r=new URL(t);return[...YW,...e].includes(r.hostname)}catch{return!1}}function rz(t,e=[]){return t.value.some(r=>{if(r.type===fr.LiquidHtmlNodeTypes.TextNode&&/^(https?:)?\/\//.test(r.value)&&!Ph(r.value,e))return!0;if(Cb(r)){let i=r.markup;if(Rb(i)){let n=i.expression;if(n.type===fr.LiquidHtmlNodeTypes.String&&/^https?:\/\//.test(n.value)&&!Ph(n.value,e))return!0}}return!1})}function iz(t){let e=[...HP,...GP],r=[ZW];return t.value.some(i=>!Cb(i)||!Rb(i.markup)?!1:!!(i.markup.filters.some(s=>e.includes(s.name))||(0,rc.isNodeOfType)(fr.LiquidHtmlNodeTypes.VariableLookup,i.markup.expression)&&i.markup.expression.name&&r.includes(i.markup.expression.name)))}function nz(t){return t.map(e=>{try{return new URL(e).hostname.replace(/^www\./,"")}catch{return}}).filter(e=>e!==void 0)}var sz={allowedDomains:fr.SchemaProp.array(fr.SchemaProp.string()).optional()};qh.RemoteAsset={meta:{code:"RemoteAsset",aliases:["AssetUrlFilters"],name:"Remote Asset",docs:{description:"This check is aimed at eliminating unnecessary HTTP connections.",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/remote-asset",recommended:!0},type:fr.SourceCodeType.LiquidHtml,severity:fr.Severity.WARNING,schema:sz,targets:[]},create(t){let e=nz(t.settings.allowedDomains||[]);function r(n){if(!QW.includes(n.name))return;let s=n.attributes.filter(rc.isValuedHtmlAttribute).find(f=>(0,rc.isAttr)(f,"src")||(0,rc.isAttr)(f,"href"));if(!s)return;let a=s.value.find(f=>f.type===fr.LiquidHtmlNodeTypes.TextNode);if(a&&ez(a.value)||a&&UP(a.value)||tz(s)||s.value.filter(f=>f.type===fr.LiquidHtmlNodeTypes.TextNode).some(f=>Ph(f.value,e)))return;if(rz(s,e)){t.report({message:"Asset should be served by the Shopify CDN for better performance.",startIndex:s.position.start,endIndex:s.position.end});return}iz(s)||t.report({message:"Use one of the asset_url filters to serve assets for better performance.",startIndex:s.position.start,endIndex:s.position.end})}function i(n,s){let a=n.name;if(!XW.includes(a))return;let o=(0,KW.last)(s);if(!o||!(0,rc.isNodeOfType)(fr.LiquidHtmlNodeTypes.LiquidVariable,o)||o.filters.some(f=>HP.includes(f.name)||GP.includes(f.name)))return;let l=o.expression;l.type===fr.LiquidHtmlNodeTypes.String&&UP(l.value)||(l.type===fr.LiquidHtmlNodeTypes.String&&!Ph(l.value,e)&&t.report({message:"Asset should be served by the Shopify CDN for better performance.",startIndex:l.position.start,endIndex:l.position.end}),t.report({message:"Use one of the asset_url filters to serve assets for better performance.",startIndex:o.expression.position.start,endIndex:n.position.end}))}return{async HtmlVoidElement(n){r(n)},async HtmlRawNode(n){r(n)},async LiquidFilter(n,s){i(n,s)}}}}});var JP=T(Rh=>{"use strict";y();Object.defineProperty(Rh,"__esModule",{value:!0});Rh.RequiredLayoutThemeObject=void 0;var Ch=Y(),zP=je();Rh.RequiredLayoutThemeObject={meta:{code:"RequiredLayoutThemeObject",name:"Prevent missing required objects in theme.liquid",docs:{description:"This check prevents missing {{ content_for_header }} and {{ content_for_layout }} objects in layout/theme.liquid.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/required-layout-theme-object"},type:Ch.SourceCodeType.LiquidHtml,severity:Ch.Severity.ERROR,schema:{},targets:[Ch.ConfigTarget.All,Ch.ConfigTarget.Recommended]},create(t){if(t.toRelativePath(t.file.uri)!=="layout/theme.liquid")return{};let e=["content_for_header","content_for_layout"],r=new Set,i,n;function s(a){a.name&&e.includes(a.name)&&r.add(a.name)}return{async VariableLookup(a){s(a)},async HtmlElement(a){(0,zP.isHtmlTag)(a,"head")?i=a:(0,zP.isHtmlTag)(a,"body")&&(n=a)},async onCodePathEnd(){for(let a of e)if(!r.has(a)){let o=`The required object '{{ ${a} }}' is missing in layout/theme.liquid`,u=a==="content_for_header"?i:n,l=u?.blockEndPosition.start;t.report({message:o,startIndex:u?.position.start??0,endIndex:u?.position.end??0,fix:l!==void 0?f=>f.insert(l,`{{ ${a} }}`):void 0})}}}}}});var ic=T(Nn=>{"use strict";y();Object.defineProperty(Nn,"__esModule",{value:!0});Nn.CLOSEST_ARGUMENT=Nn.REQUIRED_CONTENT_FOR_ARGUMENTS=Nn.RESERVED_CONTENT_FOR_ARGUMENTS=void 0;Nn.RESERVED_CONTENT_FOR_ARGUMENTS=["attributes","block","blocks","class","context","inherit","resource","resources","schema","section","sections","settings","snippet","snippets","src","style","styles","template","templates"];Nn.REQUIRED_CONTENT_FOR_ARGUMENTS=["id","type"];Nn.CLOSEST_ARGUMENT="closest."});var YP=T(Mh=>{"use strict";y();Object.defineProperty(Mh,"__esModule",{value:!0});Mh.ReservedDocParamNames=void 0;var KP=Y(),az=xt(),QP=ic();Mh.ReservedDocParamNames={meta:{code:"ReservedDocParamNames",name:"Valid doc parameter names",docs:{description:"This check exists to ensure any parameter names defined in LiquidDoc do not collide with reserved words.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/reserved-doc-param-names"},type:KP.SourceCodeType.LiquidHtml,severity:KP.Severity.ERROR,schema:{},targets:[]},create(t){if(!(0,az.isBlock)(t.file.uri))return{};let e=[...QP.REQUIRED_CONTENT_FOR_ARGUMENTS,...QP.RESERVED_CONTENT_FOR_ARGUMENTS];return{async LiquidDocParamNode(r){let i=r.paramName.value;e.includes(i)&&oz(t,"The parameter name is not supported because it's a reserved argument for 'content_for' tags.",r.paramName)}}}};function oz(t,e,r){t.report({message:e,startIndex:r.position.start,endIndex:r.position.end})}});var ZP=T(Fh=>{"use strict";y();Object.defineProperty(Fh,"__esModule",{value:!0});Fh.StaticStylesheetAndJavascriptTags=void 0;var Dh=ge(),XP=Y();Fh.StaticStylesheetAndJavascriptTags={meta:{code:"StaticStylesheetAndJavascriptTags",name:"Reports non static stylesheet and javascript tags",docs:{description:"Reports the usage of Liquid within {% stylesheet %} and {% javascript %} tags, which should only contain static content.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/static-stylesheet-and-javascript-tags"},type:XP.SourceCodeType.LiquidHtml,severity:XP.Severity.ERROR,schema:{},targets:[]},create(t){return{async LiquidRawTag(e){if(e.name!=="stylesheet"&&e.name!=="javascript")return;let r=e.body.nodes.filter(i=>i.type===Dh.NodeTypes.LiquidVariableOutput||i.type===Dh.NodeTypes.LiquidTag||i.type===Dh.NodeTypes.LiquidRawTag);for(let i of r){let n=e.name==="stylesheet"?"CSS":"JavaScript",s=i.type===Dh.NodeTypes.LiquidVariableOutput?"variable":"tag";t.report({message:`Liquid ${s} found in ${n} block. {% ${e.name} %} tags should only contain static ${n} code.`,startIndex:i.position.start,endIndex:i.position.end})}}}}}});var rq=T(jh=>{"use strict";y();Object.defineProperty(jh,"__esModule",{value:!0});jh.TranslationKeyExists=void 0;var uz=ze(),eq=Y(),cz=Ce();function tq(t,e){for(let r of t.split(".")){if(typeof e!="object"||!e.hasOwnProperty(r))return!1;e=e[r]}return!0}jh.TranslationKeyExists={meta:{code:"TranslationKeyExists",name:"Reports missing translation keys",docs:{description:"Reports missing translation keys",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/translation-key-exists"},type:eq.SourceCodeType.LiquidHtml,severity:eq.Severity.ERROR,schema:{},targets:[]},create(t){let e=[],r;return{async LiquidVariable(i){i.expression.type==="String"&&i.filters.some(({name:n})=>["t","translate"].includes(n))&&e.push({translationKey:i.expression.value,startIndex:i.expression.position.start,endIndex:i.expression.position.end})},async LiquidRawTag(i){if(i.name!=="schema"||i.body.kind!=="json")return;let n=await t.getDefaultLocale(),s=(0,uz.parseJSON)(i.body.value);(0,cz.isError)(s)&&s instanceof SyntaxError||(r=s.locales?.[n])},async onCodePathEnd(){let i=await t.getDefaultTranslations(),n=await t.getDefaultLocale(),s=await t.themeDocset?.systemTranslations(),a=Object.keys(s??{});!i&&a.length===0||e.forEach(({translationKey:o,startIndex:u,endIndex:l})=>{if(tq(o,i)||tq(o,r)||a.includes(o))return;let f=`'${o}' does not have a matching entry in 'locales/${n}.default.json'`;r&&(f+=` or '${t.toRelativePath(t.file.uri)}'`),t.report({message:f,startIndex:u,endIndex:l})})}}}}});var uq=T(Vh=>{"use strict";y();Object.defineProperty(Vh,"__esModule",{value:!0});Vh.UnclosedHTMLElement=void 0;var We=ge(),iq=Y(),Mb=Ce(),nq=je();Vh.UnclosedHTMLElement={meta:{code:"UnclosedHTMLElement",aliases:["UnclosedHTMLElement"],name:"Unclosed HTML Element",docs:{description:"Warns you of unbalanced HTML tags in branching code",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/unclosed-html-element"},type:iq.SourceCodeType.LiquidHtml,severity:iq.Severity.WARNING,schema:{},targets:[]},create(t){let e=new Map;return{async HtmlElement(r,i){if(lz(r))return;let[n,s]=(0,Mb.findLastAndIndex)(i,nq.isLiquidBranch);if(!n)return;let a=i[s-1],o=i[s-2];if(!a||!o||a.type!==We.NodeTypes.LiquidTag)return;e.has(o)||e.set(o,{open:new Map,close:new Map,identifiers:new Set});let u=e.get(o),l=sq(n,a);u.identifiers.add(l),u.open.has(l)||u.open.set(l,[]),u.open.get(l).push(r)},async HtmlDanglingMarkerClose(r,i){let[n,s]=(0,Mb.findLastAndIndex)(i,nq.isLiquidBranch);if(!n)return;let a=i[s-1],o=i[s-2];if(!a||!o||a.type!==We.NodeTypes.LiquidTag)return;e.has(o)||e.set(o,{open:new Map,close:new Map,identifiers:new Set});let u=e.get(o),l=sq(n,a);u.identifiers.add(l),u.close.has(l)||u.close.set(l,[]),u.close.get(l).push(r)},async onCodePathEnd(){for(let[r,i]of e){let n=new Map;for(let u of i.identifiers){let l=i.open.get(u)??[],f=i.close.get(u)??[],h=[].concat(l,f).sort((p,m)=>p.position.start-m.position.start);n.set(u,oq(h))}let s=[].concat(...n.values()).sort((u,l)=>u.position.start-l.position.start),a=oq(s),o=new Set(a);for(let[u,l]of n)for(let f of l)o.has(f)&&(f.type===We.NodeTypes.HtmlDanglingMarkerClose?t.report({message:`Closing tag does not have a matching opening tag for condition \`${u}\` in ${r.type} '${Bh(r)}'`,startIndex:f.position.start,endIndex:f.position.end}):t.report({message:`Opening tag does not have a matching closing tag for condition \`${u}\` in ${r.type} '${Bh(r)}'`,startIndex:f.blockStartPosition.start,endIndex:f.blockStartPosition.end}))}}}}};function lz(t){return t.blockEndPosition.start!==t.blockEndPosition.end}function sq(t,e){if(t.name===null)switch(e.name){case We.NamedTags.if:return pr(e.markup);case We.NamedTags.unless:return aq(pr(e.markup));default:return"??"}switch(t.name){case"else":switch(e.name){case We.NamedTags.if:return aq(pr(e.markup));case We.NamedTags.unless:return pr(e.markup);case We.NamedTags.case:return`case ${pr(e.markup)}`;default:return"??"}case We.NamedTags.elsif:return pr(t.markup);case We.NamedTags.when:return e.name!==We.NamedTags.case?"??":`case ${pr(e.markup)} == ${fz(t.markup)}`;default:return"??"}}function fz(t){return typeof t=="string"?t:t.map(pr).join(" or ")}function pr(t){if(typeof t=="string")return t;switch(t.type){case We.NodeTypes.String:return"'"+t.value+"'";case We.NodeTypes.LiquidLiteral:return t.value===null?"null":t.value.toString();case We.NodeTypes.Number:return t.value;case We.NodeTypes.VariableLookup:return`${t.name??""}${t.lookups.map(e=>`[${pr(e)}]`)}`;case We.NodeTypes.Range:return`(${pr(t.start)}..${pr(t.end)})`;case We.NodeTypes.Comparison:return[pr(t.left),t.comparator,pr(t.right)].join(" ");case We.NodeTypes.LogicalExpression:return[pr(t.left),t.relation,pr(t.right)].join(" ");default:return(0,Mb.assertNever)(t)}}function aq(t){return t.startsWith("-")?t.slice(1):`-${t}`}function oq(t){let e=[];for(let r of t)r.type===We.NodeTypes.HtmlElement?e.push(r):e.length>0&&Bh(r)===Bh(e.at(-1))&&e.at(-1).type===We.NodeTypes.HtmlElement&&r.type===We.NodeTypes.HtmlDanglingMarkerClose?e.pop():e.push(r);return e}function Bh(t){return t.type===We.NodeTypes.HtmlElement||t.type===We.NodeTypes.HtmlDanglingMarkerClose?t.name.length===0?"":t.source.slice(t.name.at(0).position.start,t.name.at(-1).position.end):t.type===We.NodeTypes.LiquidTag?t.name:t.type}});var Db=T($h=>{"use strict";y();Object.defineProperty($h,"__esModule",{value:!0});$h.hasLiquidDoc=pz;$h.extractDocDefinition=hz;var lq=kn();function pz(t){let e=!1;return(0,lq.visit)(t,{LiquidRawTag(r){r.name==="doc"&&(e=!0)}}),e}function hz(t,e){let r=!1,i=(0,lq.visit)(e,{LiquidRawTag(o){o.name==="doc"&&(r=!0)},LiquidDocParamNode(o){return{name:o.paramName.value,description:o.paramDescription?.value??null,type:o.paramType?.value??null,required:o.required,nodeType:"param"}},LiquidDocExampleNode(o){return{content:cq(o.content.value.trim()),nodeType:"example"}},LiquidDocDescriptionNode(o){return{content:cq(o.content.value.trim()),nodeType:"description"}}});if(!r)return{uri:t};let{parameters:n,examples:s,description:a}=i.reduce((o,u)=>(u.nodeType==="param"?o.parameters.push(u):u.nodeType==="example"?o.examples.push(u):u.nodeType==="description"&&!o.description&&(o.description=u),o),{parameters:[],examples:[],description:void 0});return{uri:t,liquidDoc:{...n.length&&{parameters:n},...s.length&&{examples:s},...a&&{description:a}}}}function cq(t){let e=t.split(`
|
|
1197
|
+
`);if(e.length<=1)return t;let i=e.slice(1).filter(s=>s.trim().length>0).map(s=>{let a=s.match(/^\s*/);return a?a[0].length:0});if(i.length===0)return t;let n=Math.min(...i);return[e[0],...e.slice(1).map(s=>s.trim().length===0?s:s.slice(n))].join(`
|
|
1198
|
+
`)}});var gq=T(Uh=>{"use strict";y();Object.defineProperty(Uh,"__esModule",{value:!0});Uh.UndefinedObject=void 0;var Rs=ge(),fq=Y(),pq=Ce(),dz=Db(),hq=je();Uh.UndefinedObject={meta:{code:"UndefinedObject",name:"Undefined Object",docs:{description:"This check exists to identify references to undefined Liquid objects.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/undefined-object"},type:fq.SourceCodeType.LiquidHtml,severity:fq.Severity.WARNING,schema:{},targets:[]},create(t){let e=t.toRelativePath(t.file.uri),r=t.file.ast;if((0,pq.isError)(r))return{};if(e.startsWith("snippets/")&&!(0,dz.hasLiquidDoc)(r))return{};if(!t.themeDocset)return{};let i=t.themeDocset,n=new Map,s=new Set,a=[];function o(u,l){if(!u)return;let f=n.get(u)??[];n.set(u,f.concat(l))}return{async LiquidDocParamNode(u){let l=u.paramName?.value;l&&s.add(l)},async LiquidTag(u,l){(0,hq.isWithinRawTagThatDoesNotParseItsContents)(l)||(bz(u)&&o(u.markup.name,{start:u.blockStartPosition.end}),mq(u)&&o(u.markup.name,{start:u.blockEndPosition?.end}),["form","paginate"].includes(u.name)&&o(u.name,{start:u.blockStartPosition.end,end:u.blockEndPosition?.start}),u.name==="layout"&&o("none",{start:u.position.start,end:u.position.end}),(xz(u)||kz(u))&&u.markup.name!==null&&o(u.markup.name,{start:u.position.start}),(Sz(u)||wz(u))&&(o(u.markup.variableName,{start:u.blockStartPosition.end,end:u.blockEndPosition?.start}),o(u.name==="for"?"forloop":"tablerowloop",{start:u.blockStartPosition.end,end:u.blockEndPosition?.start})))},async VariableLookup(u,l){if((0,hq.isWithinRawTagThatDoesNotParseItsContents)(l))return;let f=(0,pq.last)(l);vz(f)&&mq(f)||a.push(u)},async onCodePathEnd(){(await mz(i,e,t.mode)).forEach(l=>s.add(l.name)),a.forEach(l=>{!l.name||yz(l.name,l.position,s,n)||t.report({message:`Unknown object '${l.name}' used.`,startIndex:l.position.start,endIndex:l.position.end})})}}}};async function mz(t,e,r="theme"){let i=await t.objects(),n=gz(e,r);return i.filter(({access:a,name:o})=>n.includes(o)||!a||a.global===!0||a.template.length>0)}var dq=["app","section","recommendations","block"];function gz(t,e="theme"){return t.startsWith("layout/checkout.liquid")?["locale","direction","skip_to_content_link","checkout_html_classes","checkout_stylesheets","checkout_scripts","content_for_logo","breadcrumb","order_summary_toggle","content_for_order_summary","alternative_payment_methods","content_for_footer","tracking_code"]:t.startsWith("sections/")?["section","predictive_search","recommendations","comment"]:t.startsWith("blocks/")?dq:t.startsWith("snippets/")?e==="app"?dq:["app"]:[]}function yz(t,e,r,i){if(r.has(t))return!0;let n=i.get(t);return n?n.some(s=>_z(e,s)):!1}function _z(t,e){let r=t.start,i=!e.start||r>e.start,n=!e.end||r<e.end;return i&&n}function vz(t){return t?.type===Rs.NodeTypes.LiquidTag}function mq(t){return t.name===Rs.NamedTags.capture}function bz(t){return t.name===Rs.NamedTags.assign&&typeof t.markup!="string"}function Sz(t){return t.name===Rs.NamedTags.for&&typeof t.markup!="string"}function wz(t){return t.name===Rs.NamedTags.tablerow&&typeof t.markup!="string"}function xz(t){return t.name===Rs.NamedTags.increment&&typeof t.markup!="string"}function kz(t){return t.name===Rs.NamedTags.decrement&&typeof t.markup!="string"}});var _q=T(Hh=>{"use strict";y();Object.defineProperty(Hh,"__esModule",{value:!0});Hh.UniqueDocParamNames=void 0;var yq=Y();Hh.UniqueDocParamNames={meta:{code:"UniqueDocParamNames",name:"Unique doc parameter names",docs:{description:"This check exists to ensure any parameter names defined in the `doc` tag are unique.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/unique-doc-param-names"},type:yq.SourceCodeType.LiquidHtml,severity:yq.Severity.ERROR,schema:{},targets:[]},create(t){let e=new Set;return{async LiquidDocParamNode(r){let i=r.paramName.value;if(!e.has(i)){e.add(i);return}t.report({message:`The parameter '${i}' is defined more than once.`,startIndex:r.paramName.position.start,endIndex:r.paramName.position.end})}}}}});var Sq=T(Gh=>{"use strict";y();Object.defineProperty(Gh,"__esModule",{value:!0});Gh.UniqueStaticBlockId=void 0;var Fb=ge(),vq=Y(),bq=ic(),Iz=Nh(),Az=new Set([...bq.REQUIRED_CONTENT_FOR_ARGUMENTS,...bq.RESERVED_CONTENT_FOR_ARGUMENTS]);Gh.UniqueStaticBlockId={meta:{code:"UniqueStaticBlockId",name:"Prevent use of duplicated ids for blocks rendered statically",docs:{description:"This check is aimed at preventing the use of duplicated ids for blocks rendered statically.",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/unique-static-block-id",recommended:!0},type:vq.SourceCodeType.LiquidHtml,severity:vq.Severity.ERROR,schema:{},targets:[]},create(t){let e=new Set;return{async LiquidTag(r){if(r.name!==Fb.NamedTags.content_for||!(0,Iz.isContentForBlock)(r.markup))return;let i=r.markup.args.find(f=>f.name==="id");if(!i)return;let n=i.value;if(n.type!==Fb.NodeTypes.String)return;let s=n.value,a=r.markup.args.filter(f=>!Az.has(f.name)),o=[];for(let f of a){if(f.value.type!==Fb.NodeTypes.String)return;o.push(`${f.name}=${f.value.value}`)}o.sort();let u=o.join(","),l=`${s}::${u}`;e.has(l)?t.report({message:`The id '${s}' is already being used by another static block`,startIndex:n.position.start,endIndex:n.position.end,suggest:[]}):e.add(l)}}}}});var xq=T(Wh=>{"use strict";y();Object.defineProperty(Wh,"__esModule",{value:!0});Wh.UnknownFilter=void 0;var wq=Y();Wh.UnknownFilter={meta:{code:"UnknownFilter",name:"Prevent use of unknown filters",docs:{description:"This check is aimed at preventing the use of unknown filters.",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/unknown-filter",recommended:!0},type:wq.SourceCodeType.LiquidHtml,severity:wq.Severity.ERROR,schema:{},targets:[]},create(t){return t.themeDocset?{async LiquidFilter(e){(await t.themeDocset.filters()).some(i=>i.name===e.name)||t.report({message:`Unknown filter '${e.name}' used.`,startIndex:e.position.start+1,endIndex:e.position.end})}}:{}}}});var Iq=T(zh=>{"use strict";y();Object.defineProperty(zh,"__esModule",{value:!0});zh.UnrecognizedContentForArguments=void 0;var kq=Y(),jb=Ri(),Bb=ic();zh.UnrecognizedContentForArguments={meta:{code:"UnrecognizedContentForArguments",name:"Unrecognized ContentFor Arguments",docs:{description:"This check ensures that no unknown arguments are used when rendering a static block.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/unrecognized-content-for-arguments"},type:kq.SourceCodeType.LiquidHtml,severity:kq.Severity.WARNING,schema:{},targets:[]},create(t){let e=new Set([...Bb.RESERVED_CONTENT_FOR_ARGUMENTS,...Bb.REQUIRED_CONTENT_FOR_ARGUMENTS]);return{async ContentForMarkup(r){let i=(0,jb.getBlockName)(r);if(!i)return;let n=await(0,jb.getLiquidDocParams)(t,`blocks/${i}.liquid`);if(!n)return;let s=r.args.filter(a=>!n.has(a.name)).filter(a=>!e.has(a.name)).filter(a=>!a.name.startsWith(Bb.CLOSEST_ARGUMENT));(0,jb.reportUnknownArguments)(t,r,s,i)}}}}});var Tq=T(Jh=>{"use strict";y();Object.defineProperty(Jh,"__esModule",{value:!0});Jh.UnrecognizedRenderSnippetArguments=void 0;var Aq=Y(),Vb=Ri();Jh.UnrecognizedRenderSnippetArguments={meta:{code:"UnrecognizedRenderSnippetArguments",name:"Unrecognized Render Snippet Arguments",aliases:["UnrecognizedRenderSnippetParams"],docs:{description:"This check ensures that no unknown arguments are used when rendering a snippet.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/unrecognized-render-snippet-arguments"},type:Aq.SourceCodeType.LiquidHtml,severity:Aq.Severity.WARNING,schema:{},targets:[]},create(t){function e(r,i,n){let s=r.alias,a=r.variable;if(s&&!i.has(s.value)&&a){let o=a.position.start+1;t.report({message:`Unknown argument '${s.value}' in render tag for snippet '${n}'.`,startIndex:o,endIndex:s.position.end,suggest:[{message:`Remove '${s.value}'`,fix:u=>{if(a)return u.remove(a.position.start,s.position.end)}}]})}}return{async RenderMarkup(r){let i=(0,Vb.getSnippetName)(r);if(!i)return;let n=await(0,Vb.getLiquidDocParams)(t,`snippets/${i}.liquid`);if(!n)return;let s=r.args.filter(a=>!n.has(a.name));e(r,n,i),(0,Vb.reportUnknownArguments)(t,r,s,i)}}}}});var Lq=T(Qh=>{"use strict";y();Object.defineProperty(Qh,"__esModule",{value:!0});Qh.UnusedAssign=void 0;var Nq=ge(),Eq=Y(),Oq=je();Qh.UnusedAssign={meta:{code:"UnusedAssign",name:"Prevent unused assigns",docs:{description:"This check exists to prevent bloat in themes by surfacing variable definitions that are not used.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/unused-assign"},type:Eq.SourceCodeType.LiquidHtml,severity:Eq.Severity.WARNING,schema:{},targets:[]},create(t){let e=new Map,r=new Set;function i(n){n.type===Nq.NodeTypes.VariableLookup&&r.add(n.name)}return{async LiquidTag(n,s){(0,Oq.isWithinRawTagThatDoesNotParseItsContents)(s)||(Tz(n)||Kh(n)&&n.markup.name)&&e.set(n.markup.name,n)},async VariableLookup(n,s){if((0,Oq.isWithinRawTagThatDoesNotParseItsContents)(s))return;let a=s.at(-1);a&&Kh(a)||i(n)},async onCodePathEnd(){for(let[n,s]of e.entries())!r.has(n)&&!n.startsWith("_")&&t.report({message:`The variable '${n}' is assigned but not used`,startIndex:Kh(s)?s.blockStartPosition.start:s.position.start,endIndex:Kh(s)?s.blockStartPosition.end:s.position.end,suggest:[{message:`Remove the unused variable '${n}'`,fix:a=>a.remove(s.position.start,s.position.end)}]})}}}};function Tz(t){return t.name==="assign"&&typeof t.markup!="string"}function Kh(t){return t.type==Nq.NodeTypes.LiquidTag&&t.name==="capture"&&typeof t.markup!="string"}});var qq=T(Yh=>{"use strict";y();Object.defineProperty(Yh,"__esModule",{value:!0});Yh.UnsupportedDocTag=void 0;var Pq=Y(),Ez=Ya();Yh.UnsupportedDocTag={meta:{code:"UnsupportedDocTag",name:"Prevent unsupported doc tag usage",docs:{description:"This check exists to prevent use of `doc` tag outside of snippet file.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/unsupported-doc-tag"},type:Pq.SourceCodeType.LiquidHtml,severity:Pq.Severity.ERROR,schema:{},targets:[]},create(t){return(0,Ez.filePathSupportsLiquidDoc)(t.file.uri)?{}:{async LiquidRawTag(r){r.name==="doc"&&t.report({message:"The `doc` tag can only be used within a snippet or block.",startIndex:r.position.start,endIndex:r.position.end,suggest:[{message:"Remove unsupported `doc` tag",fix:i=>i.remove(r.position.start,r.position.end)}]})}}}}});var Rq=T(Xh=>{"use strict";y();Object.defineProperty(Xh,"__esModule",{value:!0});Xh.UnusedDocParam=void 0;var Oz=ge(),Cq=Y(),Nz=je();Xh.UnusedDocParam={meta:{code:"UnusedDocParam",name:"Prevent unused doc parameters",docs:{description:"This check exists to ensure any parameters defined in the `doc` tag are used within the snippet.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/unused-doc-param"},type:Cq.SourceCodeType.LiquidHtml,severity:Cq.Severity.WARNING,schema:{},targets:[]},create(t){let e=new Map,r=new Set;return{async LiquidDocParamNode(i){e.set(i.paramName.value,i)},async VariableLookup(i,n){i.type===Oz.NodeTypes.VariableLookup&&i.name&&!(0,Nz.isLoopScopedVariable)(i.name,n)&&r.add(i.name)},async onCodePathEnd(){for(let[i,n]of e.entries())r.has(i)||t.report({message:`The parameter '${i}' is defined but not used in this file.`,startIndex:n.position.start,endIndex:n.position.end,suggest:[{message:`Remove unused parameter '${i}'`,fix:s=>s.remove(n.position.start,n.position.end)}]})}}}}});var Dq=T(Zh=>{"use strict";y();Object.defineProperty(Zh,"__esModule",{value:!0});Zh.ValidContentForArguments=void 0;var Lz=ge(),Mq=Y(),$b=ic();Zh.ValidContentForArguments={meta:{code:"ValidContentForArguments",name:"Prevent the use of invalid arguments to the content_for tag",docs:{description:"This check is aimed at preventing the use of invalid arguments for the content_for tag.",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-content-for-arguments",recommended:!0},type:Mq.SourceCodeType.LiquidHtml,severity:Mq.Severity.ERROR,schema:{},targets:[]},create(t){let e={blocks:r=>{let i=r.args.filter(n=>!n.name.startsWith($b.CLOSEST_ARGUMENT));for(let n of i)t.report({message:`{% content_for "blocks" %} only accepts 'closest.*' arguments`,startIndex:n.position.start,endIndex:n.position.end})},block:r=>{for(let n of $b.REQUIRED_CONTENT_FOR_ARGUMENTS){let s=r.args.find(o=>o.name===n);if(!s){t.report({message:`{% content_for "block" %} requires a '${n}' argument`,startIndex:r.position.start,endIndex:r.position.end,suggest:[]});continue}let a=s.value;a.type!==Lz.NodeTypes.String&&t.report({message:`The '${n}' argument should be a string`,startIndex:a.position.start,endIndex:a.position.end,suggest:[]})}let i=r.args.filter(n=>$b.RESERVED_CONTENT_FOR_ARGUMENTS.includes(n.name));for(let n of i)t.report({message:`{% content_for "block" %} doesn't support '${n.name}' because it's a reserved argument.`,startIndex:n.position.start,endIndex:n.position.end})}};return{async LiquidTag(r){if(r.name!=="content_for"||typeof r.markup=="string")return;let i=r.markup.contentForType.value,n=e[i];n&&n(r.markup)}}}}});var jq=T(td=>{"use strict";y();Object.defineProperty(td,"__esModule",{value:!0});td.ValidContentForArgumentTypes=void 0;var Fq=Y(),ed=Ri();td.ValidContentForArgumentTypes={meta:{code:"ValidContentForArgumentTypes",name:"Valid ContentFor Argument Types",docs:{description:"This check ensures that arguments passed to static blocks match the expected types defined in the liquidDoc header if present.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-content-for-argument-types"},type:Fq.SourceCodeType.LiquidHtml,severity:Fq.Severity.WARNING,schema:{},targets:[]},create(t){return{async ContentForMarkup(e){let r=(0,ed.getBlockName)(e);if(!r)return;let i=await(0,ed.getLiquidDocParams)(t,`blocks/${r}.liquid`);if(!i)return;let n=(0,ed.findTypeMismatchParams)(i,e.args);(0,ed.reportTypeMismatches)(t,n,i)}}}}});var $q=T(rd=>{"use strict";y();Object.defineProperty(rd,"__esModule",{value:!0});rd.ValidBlockTarget=void 0;var Ub=ze(),Pz=xt(),Bq=Y(),ti=Ce();rd.ValidBlockTarget={meta:{code:"ValidBlockTarget",name:"Validate block targeting in presets",docs:{description:"Ensures block types only reference valid block types and respect parent-child relationships",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-block-target"},type:Bq.SourceCodeType.LiquidHtml,severity:Bq.Severity.ERROR,schema:{},targets:[]},create(t){return{async LiquidRawTag(e){if(e.name!=="schema"||e.body.kind!=="json")return;let r=e.blockStartPosition.end,i=await(0,Pz.getSchema)(t),{validSchema:n,ast:s}=i??{};if(!n||n instanceof Error||!s||s instanceof Error||!i)return;let{staticBlockDefs:a}=i,{rootLevelThemeBlocks:o,rootLevelLocalBlocks:u,presetLevelBlocks:l,defaultLevelBlocks:f,hasRootBlocksDeclaration:h}=(0,ti.getBlocks)(n);if(u.length>0)return;let p=!1;if(await Promise.all(o.map(async({node:m,path:v})=>{let S=(0,Ub.nodeAtPath)(s,v);await(0,ti.validateBlockFileExistence)(m.type,t)||(p=!0,(0,ti.reportWarning)(Hb(m.type),r,S,t))})),!p){for(let[m,v]of Object.entries(l))parseInt(m,10)===0&&await Promise.all(v.map(async({node:b,path:g})=>{let k=(0,Ub.nodeAtPath)(s,g),w="id"in b?b.id:g.at(-2),_=!!b.static;if((0,ti.isInvalidPresetBlock)(w,b,o,a,h)){let E=_?`Could not find a static block of type "${b.type}" with id "${w}" in this file.`:Vq(b);(0,ti.reportWarning)(E,r,k,t)}await(0,ti.validateBlockFileExistence)(b.type,t)?"blocks"in b&&b.blocks&&await(0,ti.validateNestedBlocks)(t,b,b.blocks,g.slice(0,-1),r,s):(0,ti.reportWarning)(Hb(b.type),r,k,t)}));await Promise.all(f.map(async({node:m,path:v})=>{let S=(0,Ub.nodeAtPath)(s,v);(0,ti.isInvalidDefaultBlock)(m,o,h)&&(0,ti.reportWarning)(Vq(m),r,S,t),await(0,ti.validateBlockFileExistence)(m.type,t)||(0,ti.reportWarning)(Hb(m.type),r,S,t)}))}}}}};function Vq(t){return t.type.startsWith("_")?`Theme block type "${t.type}" is a private block so it must be explicitly allowed in "blocks" at the root of this schema.`:`Theme block type "${t.type}" must be allowed in "blocks" at the root of this schema.`}function Hb(t){return`Theme block 'blocks/${t}.liquid' does not exist.`}});var Gq=T(id=>{"use strict";y();Object.defineProperty(id,"__esModule",{value:!0});id.ValidScopedCSSClass=void 0;var Uq=Y(),qz=Ip(),nc=Cf(),Gb=$f();async function Hq(t,e,r){let i=new Set;try{let n=e("assets"),a=(await t.readDirectory(n)).filter(([u])=>u.endsWith(".css")).map(([u])=>u),o=await Promise.all(a.map(u=>r(u)));for(let u of o)for(let l of u)i.add(l)}catch{}return i}async function Cz(t,e,r){let i=new Set,n=await Hq(t,e,r);for(let s of n)i.add(s);try{let s=e(""),a=await(0,qz.recursiveReadDirectory)(t,s,([u])=>u.endsWith(".liquid")),o=await Promise.all(a.map(u=>r(u)));for(let u of o)for(let l of u)i.add(l)}catch{}return i}id.ValidScopedCSSClass={meta:{code:"ValidScopedCSSClass",name:"Validates CSS classes used in class attributes are defined in an in-scope stylesheet",docs:{description:"Reports CSS classes used in HTML class attributes that are not defined in any in-scope stylesheet tag or CSS asset file.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-scoped-css-class"},type:Uq.SourceCodeType.LiquidHtml,severity:Uq.Severity.WARNING,schema:{},targets:[]},create(t){let e=new Set,r=[];return{async LiquidRawTag(i){if(i.name==="stylesheet")for(let n of(0,nc.extractCSSClassNames)(i.body.value))e.add(n)},async HtmlElement(i){(0,nc.collectUsedClasses)(i.attributes,r)},async HtmlVoidElement(i){(0,nc.collectUsedClasses)(i.attributes,r)},async HtmlSelfClosingElement(i){(0,nc.collectUsedClasses)(i.attributes,r)},async HtmlRawNode(i){i.name==="svg"&&(0,nc.collectUsedClassesFromSvg)(i.attributes,i.body.value,i.body.position.start,r)},async onCodePathEnd(){if(r.length===0)return;let{getReferences:i,getDependencies:n,getCSSClassesForURI:s,fs:a,toUri:o}=t;if(!i||!n||!s)return;let u=new Set(e),l=await Hq(a,o,s);for(let g of l)u.add(g);let f=await(0,Gb.getAncestorUris)(t.file.uri,i),h=await Promise.all(f.map(g=>s(g)));for(let g of h)for(let k of g)u.add(k);let p=[t.file.uri,...f],m=[];for(let g of p){let k=await(0,Gb.getRenderedSnippetUris)(g,n);m.push(...k)}let v=await(0,Gb.getAllSnippetDescendantUris)(m,n),S=await Promise.all(v.map(g=>s(g)));for(let g of S)for(let k of g)u.add(k);let b=await Cz(a,o,s);for(let{className:g,startIndex:k,endIndex:w}of r)b.has(g)&&!u.has(g)&&t.report({message:`CSS class '${g}' may be defined outside the scope of this file.`,startIndex:k,endIndex:w})}}}}});var zq=T(nd=>{"use strict";y();Object.defineProperty(nd,"__esModule",{value:!0});nd.ValidHTMLTranslation=void 0;var Wq=Y(),Rz=ge();nd.ValidHTMLTranslation={meta:{code:"ValidHTMLTranslation",name:"Valid HTML Translation",docs:{description:"This check exists to prevent invalid HTML inside translations.",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-html-translation",recommended:!0},type:Wq.SourceCodeType.JSON,severity:Wq.Severity.WARNING,schema:{},targets:[]},create(t){return t.toRelativePath(t.file.uri).startsWith("locales/")?{async Literal(r){let i=/<[^>]+>/;if(!(typeof r.value!="string"||!i.test(r.value)))try{(0,Rz.toLiquidHtmlAST)(r.value)}catch(n){let s=r.loc,a={message:`${n}.`,startIndex:s.start.offset,endIndex:s.end.offset};t.report(a)}}}:{}}}});var Kq=T(sd=>{"use strict";y();Object.defineProperty(sd,"__esModule",{value:!0});sd.ValidJSON=void 0;var Jq=Y();sd.ValidJSON={meta:{code:"ValidJSON",aliases:["ValidJson"],name:"Enforce valid JSON",docs:{description:"This check exists to prevent invalid JSON files in themes. Will check against schema if available.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/json-syntax-error"},type:Jq.SourceCodeType.JSON,severity:Jq.Severity.ERROR,schema:{},targets:[]},create(t){if(!t.validateJSON)return{};let e=t.validateJSON;return{async onCodePathStart(r){let i=await e(r.uri,r.source);if(i)for(let n of i)t.report(n)}}}}});var Xq=T(ad=>{"use strict";y();Object.defineProperty(ad,"__esModule",{value:!0});ad.ValidDocParamTypes=void 0;var Qq=Y(),Yq=Ya();ad.ValidDocParamTypes={meta:{code:"ValidDocParamTypes",name:"Valid doc parameter types",docs:{description:"This check exists to ensure any parameter types defined in the `doc` tag are valid.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-doc-param-types"},type:Qq.SourceCodeType.LiquidHtml,severity:Qq.Severity.ERROR,schema:{},targets:[]},create(t){if(!t.themeDocset)return{};let e=t.themeDocset.liquidDrops().then(r=>new Set((0,Yq.getValidParamTypes)(r).keys()));return{async LiquidDocParamNode(r){!r.paramType||(0,Yq.parseParamType)(await e,r.paramType.value)||t.report({message:`The parameter type '${r.paramType.value}' is not supported.`,startIndex:r.paramType.position.start-1,endIndex:r.paramType.position.end+1,suggest:[{message:"Remove invalid parameter type",fix:n=>{r.paramType&&n.replace(r.position.start,r.position.end,r.source.slice(r.position.start,r.position.end).replace(/\s*\{\s*[^\s]+\s*\}\s*/," "))}}]})}}}}});var eC=T(od=>{"use strict";y();Object.defineProperty(od,"__esModule",{value:!0});od.getBlocks=Mz;od.reportWarning=Dz;var Zq=ze();function Mz(t){let e=[],r=[],i=[],n=t.blocks,s=t.presets;function a(o,u,l=!1){if(!o)return;let f="static"in o,h="name"in o;f?e.push({node:o,path:u.concat("type")}):h&&!l?r.push({node:o,path:u.concat("type")}):o.type!=="@app"&&i.push({node:o,path:u.concat("type")}),"blocks"in o&&(Array.isArray(o.blocks)?o.blocks.forEach((p,m)=>{a(p,u.concat("blocks",String(m)),l)}):typeof o.blocks=="object"&&o.blocks!==null&&Object.entries(o.blocks).forEach(([p,m])=>{a(m,u.concat("blocks",p),l)}))}return Array.isArray(n)&&n.forEach((o,u)=>{a(o,["blocks",String(u)])}),s&&s.forEach((o,u)=>{"blocks"in o&&o.blocks&&(Array.isArray(o.blocks)?o.blocks.forEach((l,f)=>{a(l,["presets",String(u),"blocks",String(f)],!0)}):typeof o.blocks=="object"&&Object.entries(o.blocks).forEach(([l,f])=>{a(f,["presets",String(u),"blocks",l],!0)}))}),{staticBlockLocations:e,localBlockLocations:r,themeBlockLocations:i,hasRootLevelThemeBlocks:i.some(o=>o.path[0]==="blocks")}}function Dz(t,e,r,i){i.report({message:t,startIndex:e+(0,Zq.getLocStart)(r),endIndex:e+(0,Zq.getLocEnd)(r)})}});var iC=T(cd=>{"use strict";y();Object.defineProperty(cd,"__esModule",{value:!0});cd.ValidLocalBlocks=void 0;var tC=Y(),Wb=ze(),Fz=xt(),rC=xt(),ud=eC();cd.ValidLocalBlocks={meta:{code:"ValidLocalBlocks",name:"Prevent mixing static and local blocks in non-theme sections",docs:{description:"Ensures sections without theme block support do not mix static and local blocks",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-local-blocks"},type:tC.SourceCodeType.LiquidHtml,severity:tC.Severity.ERROR,schema:{},targets:[]},create(t){return{async LiquidRawTag(e){if(e.name!=="schema"||e.body.kind!=="json")return;let r=e.blockStartPosition.end,i=await(0,Fz.getSchema)(t),{validSchema:n,ast:s}=i??{};if(!n||n instanceof Error||!s||s instanceof Error||!i)return;let{staticBlockLocations:a,localBlockLocations:o,themeBlockLocations:u,hasRootLevelThemeBlocks:l}=(0,ud.getBlocks)(n);(0,rC.isSection)(t.file.uri)&&(a.length>0&&o.length>0&&a.forEach(f=>{let h=(0,Wb.nodeAtPath)(s,f.path);(0,ud.reportWarning)("Sections cannot use static theme blocks together with locally scoped blocks.",r,h,t)}),l&&o.length>0&&u.length>0&&o.forEach(f=>{let h=(0,Wb.nodeAtPath)(s,f.path);(0,ud.reportWarning)("Sections cannot use theme blocks together with locally scoped blocks.",r,h,t)})),(0,rC.isBlock)(t.file.uri)&&o.length>0&&o.forEach(f=>{let h=(0,Wb.nodeAtPath)(s,f.path);(0,ud.reportWarning)("Local scoped blocks are not supported in theme blocks.",r,h,t)})}}}}});var aC=T(ld=>{"use strict";y();Object.defineProperty(ld,"__esModule",{value:!0});ld.ValidRenderSnippetArgumentTypes=void 0;var nC=Y(),jz=ge(),sC=Ya(),sc=Ri();ld.ValidRenderSnippetArgumentTypes={meta:{code:"ValidRenderSnippetArgumentTypes",name:"Valid Render Snippet Argument Types",aliases:["ValidRenderSnippetParamTypes"],docs:{description:"This check ensures that arguments passed to snippet match the expected types defined in the liquidDoc header if present.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-render-snippet-argument-types"},type:nC.SourceCodeType.LiquidHtml,severity:nC.Severity.WARNING,schema:{},targets:[]},create(t){function e(r,i){if(r.alias&&r.variable?.name&&r.variable.name.type!==jz.NodeTypes.VariableLookup){let n=i.get(r.alias.value)?.type?.toLowerCase();if(n){let s=(0,sC.inferArgumentType)(r.variable.name);if(!(0,sC.isTypeCompatible)(n,s)){let a=(0,sc.generateTypeMismatchSuggestions)(n,r.variable.name.position.start,r.variable.name.position.end);t.report({message:`Type mismatch for argument '${r.alias.value}': expected ${n}, got ${s}`,startIndex:r.variable.name.position.start,endIndex:r.variable.name.position.end,suggest:a})}}}}return{async RenderMarkup(r){let i=(0,sc.getSnippetName)(r);if(!i)return;let n=await(0,sc.getLiquidDocParams)(t,`snippets/${i}.liquid`);if(!n)return;e(r,n);let s=(0,sc.findTypeMismatchParams)(n,r.args);(0,sc.reportTypeMismatches)(t,s,n)}}}}});var uC=T(fd=>{"use strict";y();Object.defineProperty(fd,"__esModule",{value:!0});fd.ValidSchema=void 0;var oC=Y();fd.ValidSchema={meta:{code:"ValidSchema",name:"Prevent invalid JSON in {% schema %} tags",docs:{description:"This check is aimed at eliminating JSON errors in schema tags.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-schema"},type:oC.SourceCodeType.LiquidHtml,severity:oC.Severity.ERROR,schema:{},targets:[]},create(t){return{async LiquidRawTag(e){if(e.name!=="schema"||e.body.kind!=="json"||!t.validateJSON)return;let r=e.source.slice(e.blockStartPosition.end,e.blockEndPosition.start),i=await t.validateJSON(t.file.uri,r);if(i)for(let n of i)t.report({message:n.message,startIndex:e.blockStartPosition.end+n.startIndex,endIndex:e.blockStartPosition.end+n.endIndex})}}}}});var fC=T(pd=>{"use strict";y();Object.defineProperty(pd,"__esModule",{value:!0});pd.ValidSchemaName=void 0;var zb=ze(),Bz=xt(),cC=Y(),Vz=Ce(),lC=25;pd.ValidSchemaName={meta:{code:"ValidSchemaName",name:"Enforce valid schema name",docs:{description:"This check is aimed at ensuring a valid schema name.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-schema-name"},type:cC.SourceCodeType.LiquidHtml,severity:cC.Severity.ERROR,schema:{},targets:[]},create(t){return{async LiquidRawTag(e){if(e.name!=="schema"||e.body.kind!=="json")return;let r=e.blockStartPosition.end,i=await(0,Bz.getSchema)(t),{validSchema:n,ast:s}=i??{};if(!n||n instanceof Error||!s||s instanceof Error)return;let a=n.name;if(!a)return;let o=(0,zb.nodeAtPath)(s,["name"]),u=r+(0,zb.getLocStart)(o),l=r+(0,zb.getLocEnd)(o);if(a.startsWith("t:")){let f=await t.getDefaultLocale(),h=a.replace("t:",""),p=await t.getDefaultSchemaTranslations(),m=(0,Vz.deepGet)(p,h.split("."));m!==void 0&&m.length>lC&&t.report({message:`Schema name '${m}' from 'locales/${f}.default.schema.json' is too long (max 25 characters)`,startIndex:u,endIndex:l})}else a.length>lC&&t.report({message:`Schema name '${a}' is too long (max 25 characters)`,startIndex:u,endIndex:l})}}}}});var dC=T(hd=>{"use strict";y();Object.defineProperty(hd,"__esModule",{value:!0});hd.ValidSchemaTranslations=void 0;var pC=ze(),$z=xt(),hC=Y(),Uz=Ce();hd.ValidSchemaTranslations={meta:{code:"ValidSchemaTranslations",name:"Reports missing translation keys in schema",docs:{description:"This check ensures all translation keys (t:) in schema have matching entries in the default schema translations file.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-schema-translations"},type:hC.SourceCodeType.LiquidHtml,severity:hC.Severity.ERROR,schema:{},targets:[]},create(t){return{async LiquidRawTag(e){if(e.name!=="schema"||e.body.kind!=="json")return;let r=e.blockStartPosition.end,i=await(0,$z.getSchema)(t),{ast:n}=i??{};if(!n||n instanceof Error)return;let s=await t.getDefaultLocale(),a=await t.getDefaultSchemaTranslations(),o=Jb(n);for(let{value:u,node:l}of o){let f=u.replace("t:","");if((0,Uz.deepGet)(a,f.split("."))===void 0){let p=r+(0,pC.getLocStart)(l),m=r+(0,pC.getLocEnd)(l);t.report({message:`'${u}' does not have a matching entry in 'locales/${s}.default.schema.json'`,startIndex:p,endIndex:m})}}}}}};function Jb(t){let e=[];switch(t.type){case"Literal":{typeof t.value=="string"&&t.value.startsWith("t:")&&e.push({value:t.value,node:t});break}case"Object":{for(let r of t.children)e.push(...Jb(r.value));break}case"Array":{for(let r of t.children)e.push(...Jb(r));break}case"Property":case"Identifier":break}return e}});var vC=T(gd=>{"use strict";y();Object.defineProperty(gd,"__esModule",{value:!0});gd.ValidSettingsKey=void 0;var mC=Y(),dd=ze(),gC=xt(),_C=Ce();gd.ValidSettingsKey={meta:{code:"ValidSettingsKey",name:"Validate settings key in presets",docs:{description:"Ensures settings key only references valid settings defined in its respective schema",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-settings-key"},type:mC.SourceCodeType.LiquidHtml,severity:mC.Severity.ERROR,schema:{},targets:[]},create(t){return{async LiquidRawTag(e){if(e.name!=="schema"||e.body.kind!=="json")return;let r=e.blockStartPosition.end,i=await(0,gC.getSchema)(t),{validSchema:n,ast:s}=i??{};if(!n||n instanceof Error||!s||s instanceof Error)return;let{rootLevelLocalBlocks:a,presetLevelBlocks:o}=(0,_C.getBlocks)(n);if(n.presets)for(let u=0;u<n.presets.length;u++){let l=(0,dd.nodeAtPath)(s,["presets",u,"settings"]);md(t,r,l,n.settings)}if((0,gC.isSectionSchema)(i)&&"default"in n&&n.default){let u=(0,dd.nodeAtPath)(s,["default","settings"]);md(t,r,u,n.settings),n.default.blocks?.forEach((l,f)=>{let h=(0,dd.nodeAtPath)(s,["default","blocks",f,"settings"]);yC(t,r,h,a,l)})}for(let[u,l]of Object.entries(o))l.forEach(({node:f,path:h})=>{let p=(0,dd.nodeAtPath)(s,h.slice(0,-1).concat("settings"));yC(t,r,p,a,f)})}}}};async function yC(t,e,r,i,n){if(i.length>0){let s=i.find(o=>o.node.type===n.type);if(!s)return;let a=s.node;md(t,e,r,a.settings)}else{let s=await t.getBlockSchema?.(n.type),{validSchema:a}=s??{};if(!a||a instanceof Error)return;md(t,e,r,a.settings,n)}}function md(t,e,r,i,n){if(!(!r||r.type!=="Object")){for(let s of r.children)if(!i?.find(o=>o?.id===s.key.value)){let o=n?`Setting '${s.key.value}' does not exist in 'blocks/${n.type}.liquid'.`:`Setting '${s.key.value}' does not exist in schema.`;(0,_C.reportWarning)(o,e,s.key,t)}}}});var SC=T(yd=>{"use strict";y();Object.defineProperty(yd,"__esModule",{value:!0});yd.ValidStaticBlockType=void 0;var Hz=ge(),bC=Y(),Gz=ki(),Wz=Nh();yd.ValidStaticBlockType={meta:{code:"ValidStaticBlockType",name:"Prevent use of type that is not valid for static blocks",docs:{description:"This check is aimed at preventing the use of an invalid type for blocks rendered statically.",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-static-block-type",recommended:!0},type:bC.SourceCodeType.LiquidHtml,severity:bC.Severity.ERROR,schema:{},targets:[]},create(t){return{async LiquidTag(e){if(e.name!=="content_for"||!(0,Wz.isContentForBlock)(e.markup))return;let r=e.markup.args.find(o=>o.name==="type");if(!r)return;let i=r.value;if(i.type!==Hz.NodeTypes.String)return;let n=i.value,s=`blocks/${n}.liquid`;await(0,Gz.doesFileExist)(t,s)||t.report({message:`'blocks/${n}.liquid' does not exist`,startIndex:i.position.start,endIndex:i.position.end,suggest:[]})}}}}});var wC=T(Gt=>{"use strict";y();Object.defineProperty(Gt,"__esModule",{value:!0});Gt.offsetAdjust=Gt.adjustedSuffix=Gt.adjustedPrefix=Gt.variableExpressionMatcher=void 0;Gt.getVariableLookupsInExpression=Kz;Gt.validateLookup=Qz;Gt.getGlobalSettings=Xz;var Kb=ge(),zz=ze(),Jz=kn();Gt.variableExpressionMatcher=/{{(.+?)}}/;Gt.adjustedPrefix="{% if ";Gt.adjustedSuffix=" %}{% endif %}";Gt.offsetAdjust=2-Gt.adjustedPrefix.length;function Kz(t){let e=Gt.variableExpressionMatcher.exec(t);if(e==null)return{warning:'Invalid visible_if expression. It should take the form "{{ <expression> }}".'};let r=e[1],i=`${Gt.adjustedPrefix}${r}${Gt.adjustedSuffix}`;try{let n=(0,Kb.toLiquidHtmlAST)(i,{mode:"strict",allowUnclosedDocumentNode:!1});if(n.children.length!==1)throw new Error("Unexpected child count for DocumentNode");let s=n.children[0];if(s.type!=="LiquidTag"||s.name!=="if")throw new Error("Expected DocumentNode to contain 'if' tag");let a=s.markup;if(typeof a=="string")return{warning:"Invalid visible_if expression."};if(a.type===Kb.NodeTypes.LiquidLiteral&&["true","false"].includes(a.keyword))return null;let o=(0,Jz.visit)(s,{VariableLookup:u=>u});return o.length===0?{warning:"visible_if expression contains no references to any settings. This is likely an error."}:o}catch(n){return n instanceof SyntaxError?{warning:"Syntax error: cannot parse visible_if expression."}:{warning:String(n)}}}function Qz(t,e){let r=Yz(t),i=[],n=e;for(;r.length>0;){let s=r.shift();i.push(s);let a=n[s];if(!a)return`Invalid variable: "${i.join(".")}" was not found.`;if(typeof a=="boolean")return r.length>0?`Invalid variable: "${i.join(".")}" refers to a variable, but is being used here as a namespace.`:null;n=a}return`Invalid variable: "${i.join(".")}" refers to a namespace, but is being used here as a variable.`}function Yz(t){let e=t.lookups.map(r=>{if(r.type!==Kb.NodeTypes.String)throw new Error(`Expected lookups to be String nodes: ${JSON.stringify(r)}`);return r.value});return[t.name,...e]}async function Xz(t){let e=[];try{let r=t.toUri("config/settings_schema.json"),i=await t.fs.readFile(r),n=(0,zz.parseJSON)(i);if(Array.isArray(n))for(let s of n)"settings"in s&&Array.isArray(s.settings)&&e.push(...s.settings.map(a=>a.id).filter(a=>a))}catch(r){console.error("Error fetching global settings:",r)}return e}});var kC=T(so=>{"use strict";y();Object.defineProperty(so,"__esModule",{value:!0});so.ValidVisibleIfSettingsSchema=so.ValidVisibleIf=void 0;var Yb=Y(),Qb=ze(),no=xt(),Zz=Ce(),Di=wC(),xC={code:"ValidVisibleIf",name:"Validate visible_if expressions",docs:{description:"Ensures visible_if expressions are well-formed and only reference settings keys that are defined",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-visible-if"},severity:Yb.Severity.ERROR,schema:{},targets:[]};so.ValidVisibleIf={meta:{...xC,type:Yb.SourceCodeType.LiquidHtml},create(t){return{async LiquidRawTag(e){if(e.name!=="schema"||e.body.kind!=="json")return;let r=await(0,no.getSchema)(t),{validSchema:i,ast:n}=r??{};if(!i||i instanceof Error||!i.settings?.some(l=>"visible_if"in l)||!n||n instanceof Error)return;let s=e.blockStartPosition.end,a=Object.fromEntries((await(0,Di.getGlobalSettings)(t)).map(l=>[l,!0])),o=Object.fromEntries(i.settings.map(l=>[l.id,!0])),u={settings:a};(0,no.isSectionSchema)(r)?u.section={settings:o}:(0,no.isBlockSchema)(r)&&(u.block={settings:o});for(let[l,f]of i.settings.entries()){if(!("visible_if"in f)||typeof f.visible_if!="string")continue;let h=(0,Qb.nodeAtPath)(n,["settings",l,"visible_if"]),p=(0,Di.getVariableLookupsInExpression)(f.visible_if);if(p===null)continue;if("warning"in p){(0,Zz.reportWarning)(p.warning,s,h,t);continue}let m=(v,S)=>{typeof v=="string"&&t.report({message:v,startIndex:s+(0,Qb.getLocStart)(h)+S.position.start+Di.offsetAdjust+1,endIndex:s+(0,Qb.getLocStart)(h)+S.position.end+Di.offsetAdjust+1})};for(let v of p)v.name==="section"&&(0,no.isBlockSchema)(r)||(v.name==="section"&&!(0,no.isSectionSchema)(r)?m(`Invalid visible_if: can't refer to "section" when not in a section or block file.`,v):v.name==="block"&&!(0,no.isBlockSchema)(r)?m(`Invalid visible_if: can't refer to "block" when not in a block file.`,v):m((0,Di.validateLookup)(v,u),v))}}}}};so.ValidVisibleIfSettingsSchema={meta:{...xC,type:Yb.SourceCodeType.JSON},create(t){return t.toRelativePath(t.file.uri)!=="config/settings_schema.json"?{}:{async Property(r){if(r.key.value!=="visible_if"||r.value.type!=="Literal")return;let i=r.value.value;if(typeof i!="string")return;let n=r.value.loc.start.offset,s=(0,Di.getVariableLookupsInExpression)(i);if(s===null)return;if("warning"in s){t.report({message:s.warning,startIndex:r.value.loc.start.offset,endIndex:r.value.loc.end.offset});return}let o={settings:Object.fromEntries((await(0,Di.getGlobalSettings)(t)).map(l=>[l,!0]))},u=(l,f)=>{typeof l=="string"&&t.report({message:l,startIndex:n+f.position.start+Di.offsetAdjust+1,endIndex:n+f.position.end+Di.offsetAdjust+1})};for(let l of s)l.name==="section"?u(`Invalid visible_if: can't refer to "section" when not in a section file.`,l):l.name==="block"?u(`Invalid visible_if: can't refer to "block" when not in a block file.`,l):u((0,Di.validateLookup)(l,o),l)}}}}});var AC=T(vd=>{"use strict";y();Object.defineProperty(vd,"__esModule",{value:!0});vd.VariableName=void 0;var eJ=ge(),Xb=Y(),_d=xw(),tJ=t=>{let e=(0,_d.camelCase)(t);return e.charAt(0).toUpperCase()+e.slice(1)},rJ=t=>t.name==="assign"&&typeof t.markup!="string",iJ=t=>t.type==eJ.NodeTypes.LiquidTag&&t.name==="capture"&&typeof t.markup!="string",nJ={camelCase:_d.camelCase,PascalCase:tJ,snake_case:_d.snakeCase,"kebab-case":_d.kebabCase},sJ={format:Xb.SchemaProp.string("snake_case")},IC=t=>t.replace(/[-_]?\d[-_]?/g,"");vd.VariableName={meta:{code:"VariableName",name:"Invalid variable naming format",docs:{description:"This check is aimed at using certain variable naming conventions",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/variable-name",recommended:!0},type:Xb.SourceCodeType.LiquidHtml,severity:Xb.Severity.WARNING,schema:sJ,targets:[]},create(t){let e=i=>{if(!i.markup.name)return{valid:!1};let n=nJ[t.settings.format],s=n(i.markup.name);return{valid:IC(i.markup.name)===IC(s),suggestion:s}},r=i=>t.report({message:`The variable '${i.markup.name}' uses wrong naming format`,startIndex:i.markup.position.start,endIndex:i.markup.position.end,suggest:[{message:`Change variable '${i.markup.name}' to '${e(i).suggestion}'`,fix:n=>{let{position:s,name:a,source:o}=i.markup;return n.replace(s.start,s.end,o.slice(s.start,s.end).replace(a,e(i).suggestion))}}]});return{async LiquidTag(i){(rJ(i)||iJ(i)&&i.markup.name)&&(e(i).valid||r(i))}}}}});var TC=T(bd=>{"use strict";y();Object.defineProperty(bd,"__esModule",{value:!0});bd.AppBlockMissingSchema=void 0;var Zb=Y();bd.AppBlockMissingSchema={meta:{code:"AppBlockMissingSchema",name:"Missing schema definitions in theme app extensions app blocks should be avoided",docs:{description:"Report missing schema definitions in theme app extensions app blocks",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/app-block-missing-schema"},severity:Zb.Severity.ERROR,type:Zb.SourceCodeType.LiquidHtml,schema:{},targets:[Zb.ConfigTarget.ThemeAppExtension]},create(t){let e=!1;return t.toRelativePath(t.file.uri).startsWith("blocks/")?{async LiquidRawTag(i){i.name=="schema"&&(e=!0)},async onCodePathEnd(){e||t.report({message:"The schema does not exist",startIndex:0,endIndex:0})}}:{}}}});var EC=T(Sd=>{"use strict";y();Object.defineProperty(Sd,"__esModule",{value:!0});Sd.UniqueSettingIds=void 0;var Ln=Y();Sd.UniqueSettingIds={meta:{code:"UniqueSettingId",name:"Prevent duplicate Ids in setting_schema",docs:{description:"This check is aimed at eliminating duplicate Ids in settings_schema.json",recommended:!0},type:Ln.SourceCodeType.JSON,severity:Ln.Severity.ERROR,schema:{},targets:[]},create(t){return{async onCodePathEnd(e){if((0,Ln.isArrayNode)(e.ast)){let r=[];for(let s of e.ast.children)if((0,Ln.isObjectNode)(s)&&s.children){let a=s.children.find(o=>o.key.value==="settings");if(a&&a.value&&(0,Ln.isArrayNode)(a.value)){for(let o of a.value.children)if((0,Ln.isObjectNode)(o)&&o.children){let u=o.children.find(l=>l.key.value==="id");(0,Ln.isPropertyNode)(u)&&r.push(u)}}}let i=new Map;for(let s of r)if((0,Ln.isLiteralNode)(s.value)){let a=s.value.value;typeof a=="string"&&(i.has(a)||i.set(a,[]),i.get(a).push(s))}let n=Array.from(i.entries()).filter(([s,a])=>a.length>1);if(n.length>0)for(let[s,a]of n){let o=a[a.length-1];t.report({message:`Duplicate setting id found: "${s}"`,startIndex:o.loc.start.offset,endIndex:o.loc.end.offset})}}}}}}});var NC=T(Ms=>{"use strict";y();Object.defineProperty(Ms,"__esModule",{value:!0});Ms.recommended=Ms.allChecks=void 0;var aJ=Y(),oJ=vN(),uJ=wN(),cJ=kN(),lJ=AN(),fJ=EN(),pJ=NN(),hJ=CN(),dJ=MN(),mJ=jN(),gJ=VN(),yJ=UN(),_J=QN(),vJ=rL(),bJ=sL(),SJ=oL(),wJ=cL(),xJ=gL(),kJ=vL(),IJ=SL(),AJ=IL(),TJ=TL(),EJ=qL(),OJ=RL(),NJ=FL(),LJ=gP(),PJ=vP(),qJ=SP(),CJ=xP(),RJ=IP(),MJ=TP(),DJ=OP(),FJ=PP(),jJ=DP(),BJ=BP(),VJ=$P(),$J=WP(),UJ=JP(),HJ=YP(),GJ=ZP(),WJ=rq(),zJ=uq(),JJ=gq(),KJ=_q(),QJ=Sq(),YJ=xq(),XJ=Iq(),ZJ=Tq(),eK=Lq(),tK=qq(),rK=Rq(),iK=Dq(),nK=jq(),sK=$q(),aK=Gq(),oK=zq(),uK=Kq(),cK=Xq(),lK=iC(),fK=aC(),pK=uC(),hK=fC(),dK=dC(),mK=vC(),gK=SC(),OC=kC(),yK=AC(),_K=TC(),vK=EC();Ms.allChecks=[oJ.AppBlockValidTags,uJ.AssetPreload,cJ.AssetSizeAppBlockCSS,lJ.AssetSizeAppBlockJavaScript,fJ.AssetSizeCSS,pJ.AssetSizeJavaScript,hJ.BlockIdUsage,dJ.CdnPreconnect,mJ.ContentForHeaderModification,gJ.DeprecateBgsizes,yJ.DeprecateLazysizes,_J.DeprecatedFilter,vJ.DeprecatedFontsOnSectionsAndBlocks,bJ.DeprecatedFontsOnSettingsData,SJ.DeprecatedFontsOnSettingsSchema,wJ.DeprecatedTag,kJ.DuplicateContentForArguments,xJ.DuplicateRenderSnippetArguments,IJ.EmptyBlockContent,AJ.HardcodedRoutes,TJ.ImgWidthAndHeight,EJ.JSONMissingBlock,OJ.JSONSyntaxError,NJ.LiquidFreeSettings,LJ.LiquidHTMLSyntaxError,PJ.MatchingTranslations,qJ.MissingAsset,CJ.MissingContentForArguments,RJ.MissingRenderSnippetArguments,MJ.MissingTemplate,_K.AppBlockMissingSchema,DJ.OrphanedSnippet,FJ.PaginationSize,jJ.ParserBlockingScript,BJ.SchemaPresetsBlockOrder,VJ.SchemaPresetsStaticBlocks,$J.RemoteAsset,UJ.RequiredLayoutThemeObject,HJ.ReservedDocParamNames,GJ.StaticStylesheetAndJavascriptTags,WJ.TranslationKeyExists,zJ.UnclosedHTMLElement,JJ.UndefinedObject,KJ.UniqueDocParamNames,vK.UniqueSettingIds,QJ.UniqueStaticBlockId,YJ.UnknownFilter,XJ.UnrecognizedContentForArguments,ZJ.UnrecognizedRenderSnippetArguments,tK.UnsupportedDocTag,eK.UnusedAssign,rK.UnusedDocParam,sK.ValidBlockTarget,oK.ValidHTMLTranslation,iK.ValidContentForArguments,nK.ValidContentForArgumentTypes,aK.ValidScopedCSSClass,uK.ValidJSON,cK.ValidDocParamTypes,lK.ValidLocalBlocks,fK.ValidRenderSnippetArgumentTypes,pK.ValidSchema,mK.ValidSettingsKey,gK.ValidStaticBlockType,OC.ValidVisibleIf,OC.ValidVisibleIfSettingsSchema,yK.VariableName,hK.ValidSchemaName,dK.ValidSchemaTranslations];Ms.recommended=Ms.allChecks.filter(t=>{let e=t.meta.docs.recommended,r=!t.meta.targets||!t.meta.targets.length||t.meta.targets.includes(aJ.ConfigTarget.Recommended);return e&&r})});var CC=T(ln=>{"use strict";y();var bK=ln&&ln.__createBinding||(Object.create?(function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n)}):(function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]})),SK=ln&&ln.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),wK=ln&&ln.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var i=[];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(i[i.length]=n);return i},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var i=t(e),n=0;n<i.length;n++)i[n]!=="default"&&bK(r,e,i[n]);return SK(r,e),r}})();Object.defineProperty(ln,"__esModule",{value:!0});ln.findRoot=qC;var Fr=wK(Is());async function xK(t,e){return kK(e(Fr.join(t,"shopify.extension.toml")),e(Fr.join(t,".theme-check.yml")),LC(e(Fr.join(t,".git")),e(Fr.join(t,"assets")),e(Fr.join(t,"snippets"))),LC(e(Fr.join(t,"assets")),e(Fr.join(t,"snippets")),PC(e(Fr.join(Fr.dirname(t),".theme-check.yml"))),PC(e(Fr.join(Fr.dirname(Fr.dirname(t)),".theme-check.yml")))))}async function LC(...t){return(await Promise.all(t)).reduce((r,i)=>r&&i,!0)}async function kK(...t){return(await Promise.all(t)).reduce((r,i)=>r||i,!1)}async function PC(t){return!await t}async function qC(t,e){if(await xK(t,e))return t;let i=Fr.dirname(t);return i===t?null:qC(i,e)}});var wd=T(e0=>{"use strict";y();Object.defineProperty(e0,"__esModule",{value:!0});e0.flattenFixes=RC;function RC(t){return Array.isArray(t)?t.flatMap(RC):[t]}});var DC=T(xd=>{"use strict";y();Object.defineProperty(xd,"__esModule",{value:!0});xd.JSONCorrector=void 0;var MC=xw();function IK(t,e){switch(e.type){case"add":return(0,MC.set)(t,e.path,e.value);case"remove":return(0,MC.unset)(t,e.path),t}}var t0=class{source;patches=[];constructor(e){this.source=e}get fix(){if(this.patches.length===0)return[];let e=this.patches.reduce(IK,JSON.parse(this.source));return{startIndex:0,endIndex:this.source.length,insert:JSON.stringify(e,null,2)}}add(e,r){this.patches.push({type:"add",path:e,value:r})}replace(e,r){this.patches.push({type:"remove",path:e},{type:"add",path:e,value:r})}remove(e){this.patches.push({type:"remove",path:e})}};xd.JSONCorrector=t0});var FC=T(kd=>{"use strict";y();Object.defineProperty(kd,"__esModule",{value:!0});kd.StringCorrector=void 0;var r0=class{source;fix=[];constructor(e){this.source=e}insert(e,r){this.fix.push({startIndex:e,endIndex:e,insert:r})}replace(e,r,i){this.fix.push({startIndex:e,endIndex:r,insert:i})}remove(e,r){this.fix.push({startIndex:e,endIndex:r,insert:""})}};kd.StringCorrector=r0});var i0=T(Ds=>{"use strict";y();Object.defineProperty(Ds,"__esModule",{value:!0});Ds.StringCorrector=Ds.JSONCorrector=void 0;Ds.createCorrector=AK;var jC=Y(),BC=DC();Object.defineProperty(Ds,"JSONCorrector",{enumerable:!0,get:function(){return BC.JSONCorrector}});var VC=FC();Object.defineProperty(Ds,"StringCorrector",{enumerable:!0,get:function(){return VC.StringCorrector}});function AK(t,e){switch(t){case jC.SourceCodeType.JSON:return new BC.JSONCorrector(e);case jC.SourceCodeType.LiquidHtml:return new VC.StringCorrector(e);default:return TK(t)}}function TK(t){throw new Error(`Case statement not exhausted: ${t}`)}});var $C=T(n0=>{"use strict";y();Object.defineProperty(n0,"__esModule",{value:!0});n0.autofix=NK;var EK=i0(),OK=wd();async function NK(t,e,r){let i=e.filter(s=>"fix"in s&&!!s.fix),n=[];for(let s of t){let a=i.filter(u=>u.uri===s.uri);if(a.length===0)continue;let o=(0,EK.createCorrector)(s.type,s.source);for(let u of a)u.fix(o);n.push(r(s,(0,OK.flattenFixes)(o.fix)))}await Promise.all(n)}});var UC=T(s0=>{"use strict";y();Object.defineProperty(s0,"__esModule",{value:!0});s0.applyFixToString=PK;var LK=wd();function PK(t,e){let r=t,i=0,n=(0,LK.flattenFixes)(e).sort((s,a)=>s.startIndex-a.startIndex);for(let s=0;s<n.length-1;s++){let a=n[s],o=n[s+1];if(a.endIndex>o.startIndex)throw new Error("Overlapping ranges are not allowed")}for(let s of n){let a=s.startIndex+i,o=s.endIndex+i;if(a<0||a>r.length||o<a||o>r.length)throw new Error("Fix description is going overboard");r=r.slice(0,a)+s.insert+r.slice(o),i+=s.insert.length-(o-a)}return r}});var HC=T(Ir=>{"use strict";y();Object.defineProperty(Ir,"__esModule",{value:!0});Ir.applyFixToString=Ir.autofix=Ir.createCorrector=Ir.JSONCorrector=Ir.StringCorrector=Ir.flattenFixes=void 0;var qK=wd();Object.defineProperty(Ir,"flattenFixes",{enumerable:!0,get:function(){return qK.flattenFixes}});var a0=i0();Object.defineProperty(Ir,"StringCorrector",{enumerable:!0,get:function(){return a0.StringCorrector}});Object.defineProperty(Ir,"JSONCorrector",{enumerable:!0,get:function(){return a0.JSONCorrector}});Object.defineProperty(Ir,"createCorrector",{enumerable:!0,get:function(){return a0.createCorrector}});var CK=$C();Object.defineProperty(Ir,"autofix",{enumerable:!0,get:function(){return CK.autofix}});var RK=UC();Object.defineProperty(Ir,"applyFixToString",{enumerable:!0,get:function(){return RK.applyFixToString}})});var hr=T(Se=>{"use strict";y();var YC=Se&&Se.__createBinding||(Object.create?(function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n)}):(function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]})),MK=Se&&Se.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),XC=Se&&Se.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var i=[];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(i[i.length]=n);return i},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var i=t(e),n=0;n<i.length;n++)i[n]!=="default"&&YC(r,e,i[n]);return MK(r,e),r}})(),rt=Se&&Se.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&YC(e,t,r)};Object.defineProperty(Se,"__esModule",{value:!0});Se.getBlockName=Se.path=void 0;Se.check=$K;var DK=pv(),FK=Gv(),Fs=Ip(),jK=pN(),GC=Yv(),WC=XC(Is()),o0=Y(),zC=Ce(),ZC=_N();rt(Wv(),Se);rt(pv(),Se);rt(NC(),Se);rt(Ip(),Se);rt(CC(),Se);rt(HC(),Se);rt(Yv(),Se);rt(ze(),Se);rt(Gv(),Se);Se.path=XC(Is());rt(xt(),Se);rt(Bf(),Se);rt(Y(),Se);rt(pl(),Se);rt(ug(),Se);rt(ag(),Se);rt(ng(),Se);rt(eg(),Se);rt(Cf(),Se);rt($f(),Se);rt(kn(),Se);rt(Db(),Se);var BK=Ri();Object.defineProperty(Se,"getBlockName",{enumerable:!0,get:function(){return BK.getBlockName}});rt(Ya(),Se);var VK=t=>{};async function $K(t,e,r){let i=[],n=[],{fs:s}=r,{rootUri:a}=e,o={...r,mode:e.context,fileExists:(0,Fs.makeFileExists)(s),fileSize:(0,Fs.makeFileSize)(s),getDefaultLocale:(0,Fs.makeGetDefaultLocale)(s,a),getDefaultTranslations:(0,Fs.makeGetDefaultTranslations)(s,t,a),getDefaultSchemaLocale:(0,Fs.makeGetDefaultSchemaLocale)(s,a),getDefaultSchemaTranslations:(0,Fs.makeGetDefaultSchemaTranslations)(s,t,a),getMetafieldDefinitions:r.getMetafieldDefinitions??(0,Fs.makeGetMetafieldDefinitions)(s)},{DisabledChecksVisitor:u,isDisabled:l}=(0,jK.createDisabledChecksModule)(),h=(await FK.JSONValidator.create(o.jsonValidationSet,e))?.validate;o.themeDocset&&!o.themeDocset.isAugmented&&(o.themeDocset=new DK.AugmentedThemeDocset(o.themeDocset));for(let m of Object.values(o0.SourceCodeType))switch(m){case o0.SourceCodeType.JSON:{let v=QC(m,t),S=JC(m,e.checks);for(let b of v)for(let g of S){if((0,GC.isIgnored)(b.uri,e,g))continue;let k=KC(g,b,e,n,o,h);i.push(GK(k,b))}break}case o0.SourceCodeType.LiquidHtml:{let v=QC(m,t),S=[u,...JC(m,e.checks)];for(let b of v)for(let g of S){if((0,GC.isIgnored)(b.uri,e,g))continue;let k=KC(g,b,e,n,o,h);i.push(WK(k,b))}break}}let p=e.onError||VK;return await Promise.all(i.map(m=>m.catch(p))),n.filter(m=>!l(m))}function UK(t,e,r,i,n,s){let a=i.settings[t.meta.code];return{...n,validateJSON:s,settings:HK(a,t.meta.schema),toUri:o=>WC.join(i.rootUri,...o.split("/")),toRelativePath:o=>WC.relative(o,i.rootUri),report(o){r.push({type:t.meta.type,check:t.meta.code,message:o.message,uri:e.uri,severity:a?.severity??t.meta.severity,start:(0,zC.getPosition)(e.source,o.startIndex),end:(0,zC.getPosition)(e.source,o.endIndex),fix:o.fix,suggest:o.suggest})},file:e}}function HK(t,e){let r={};for(let[i,n]of Object.entries(e))r[i]=t?.[i]??n.defaultValue();return r}function JC(t,e){return e.filter(r=>r.meta.type===t)}function KC(t,e,r,i,n,s){let a=UK(t,e,i,r,n,s);return t.create(a)}function QC(t,e){return e.filter(r=>r.type===t)}async function GK(t,e){t.onCodePathStart&&await t.onCodePathStart(e),!(e.ast instanceof Error)&&(Object.keys(t).length>0&&await(0,ZC.visitJSON)(e.ast,t),t.onCodePathEnd&&await t.onCodePathEnd(e))}async function WK(t,e){t.onCodePathStart&&await t.onCodePathStart(e),!(e.ast instanceof Error)&&(Object.keys(t).length>0&&await(0,ZC.visitLiquid)(e.ast,t),t.onCodePathEnd&&await t.onCodePathEnd(e))}});var t2=T((Id,e2)=>{y();(function(t,e){typeof Id=="object"&&typeof e2<"u"?e(Id):typeof define=="function"&&define.amd?define(["exports"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.acorn={}))})(Id,(function(t){"use strict";var e=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239],r=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,57,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],i="\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ADD\u1AE0-\u1AEB\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65",n="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088F\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5C\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DC\uA7F1-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",s={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},a="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",o={5:a,"5module":a+" export import",6:a+" const class extends export import super"},u=/^in(stanceof)?$/,l=new RegExp("["+n+"]"),f=new RegExp("["+n+i+"]");function h(c,d){for(var x=65536,I=0;I<d.length;I+=2){if(x+=d[I],x>c)return!1;if(x+=d[I+1],x>=c)return!0}return!1}function p(c,d){return c<65?c===36:c<91?!0:c<97?c===95:c<123?!0:c<=65535?c>=170&&l.test(String.fromCharCode(c)):d===!1?!1:h(c,r)}function m(c,d){return c<48?c===36:c<58?!0:c<65?!1:c<91?!0:c<97?c===95:c<123?!0:c<=65535?c>=170&&f.test(String.fromCharCode(c)):d===!1?!1:h(c,r)||h(c,e)}var v=function(d,x){x===void 0&&(x={}),this.label=d,this.keyword=x.keyword,this.beforeExpr=!!x.beforeExpr,this.startsExpr=!!x.startsExpr,this.isLoop=!!x.isLoop,this.isAssign=!!x.isAssign,this.prefix=!!x.prefix,this.postfix=!!x.postfix,this.binop=x.binop||null,this.updateContext=null};function S(c,d){return new v(c,{beforeExpr:!0,binop:d})}var b={beforeExpr:!0},g={startsExpr:!0},k={};function w(c,d){return d===void 0&&(d={}),d.keyword=c,k[c]=new v(c,d)}var _={num:new v("num",g),regexp:new v("regexp",g),string:new v("string",g),name:new v("name",g),privateId:new v("privateId",g),eof:new v("eof"),bracketL:new v("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new v("]"),braceL:new v("{",{beforeExpr:!0,startsExpr:!0}),braceR:new v("}"),parenL:new v("(",{beforeExpr:!0,startsExpr:!0}),parenR:new v(")"),comma:new v(",",b),semi:new v(";",b),colon:new v(":",b),dot:new v("."),question:new v("?",b),questionDot:new v("?."),arrow:new v("=>",b),template:new v("template"),invalidTemplate:new v("invalidTemplate"),ellipsis:new v("...",b),backQuote:new v("`",g),dollarBraceL:new v("${",{beforeExpr:!0,startsExpr:!0}),eq:new v("=",{beforeExpr:!0,isAssign:!0}),assign:new v("_=",{beforeExpr:!0,isAssign:!0}),incDec:new v("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new v("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:S("||",1),logicalAND:S("&&",2),bitwiseOR:S("|",3),bitwiseXOR:S("^",4),bitwiseAND:S("&",5),equality:S("==/!=/===/!==",6),relational:S("</>/<=/>=",7),bitShift:S("<</>>/>>>",8),plusMin:new v("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:S("%",10),star:S("*",10),slash:S("/",10),starstar:new v("**",{beforeExpr:!0}),coalesce:S("??",1),_break:w("break"),_case:w("case",b),_catch:w("catch"),_continue:w("continue"),_debugger:w("debugger"),_default:w("default",b),_do:w("do",{isLoop:!0,beforeExpr:!0}),_else:w("else",b),_finally:w("finally"),_for:w("for",{isLoop:!0}),_function:w("function",g),_if:w("if"),_return:w("return",b),_switch:w("switch"),_throw:w("throw",b),_try:w("try"),_var:w("var"),_const:w("const"),_while:w("while",{isLoop:!0}),_with:w("with"),_new:w("new",{beforeExpr:!0,startsExpr:!0}),_this:w("this",g),_super:w("super",g),_class:w("class",g),_extends:w("extends",b),_export:w("export"),_import:w("import",g),_null:w("null",g),_true:w("true",g),_false:w("false",g),_in:w("in",{beforeExpr:!0,binop:7}),_instanceof:w("instanceof",{beforeExpr:!0,binop:7}),_typeof:w("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:w("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:w("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},A=/\r\n?|\n|\u2028|\u2029/,E=new RegExp(A.source,"g");function O(c){return c===10||c===13||c===8232||c===8233}function L(c,d,x){x===void 0&&(x=c.length);for(var I=d;I<x;I++){var N=c.charCodeAt(I);if(O(N))return I<x-1&&N===13&&c.charCodeAt(I+1)===10?I+2:I+1}return-1}var B=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,R=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,q=Object.prototype,P=q.hasOwnProperty,$=q.toString,V=Object.hasOwn||(function(c,d){return P.call(c,d)}),C=Array.isArray||(function(c){return $.call(c)==="[object Array]"}),F=Object.create(null);function U(c){return F[c]||(F[c]=new RegExp("^(?:"+c.replace(/ /g,"|")+")$"))}function W(c){return c<=65535?String.fromCharCode(c):(c-=65536,String.fromCharCode((c>>10)+55296,(c&1023)+56320))}var Q=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,K=function(d,x){this.line=d,this.column=x};K.prototype.offset=function(d){return new K(this.line,this.column+d)};var pe=function(d,x,I){this.start=x,this.end=I,d.sourceFile!==null&&(this.source=d.sourceFile)};function ye(c,d){for(var x=1,I=0;;){var N=L(c,I,d);if(N<0)return new K(x,d-I);++x,I=N}}var nt={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},qe=!1;function Si(c){var d={};for(var x in nt)d[x]=c&&V(c,x)?c[x]:nt[x];if(d.ecmaVersion==="latest"?d.ecmaVersion=1e8:d.ecmaVersion==null?(!qe&&typeof console=="object"&&console.warn&&(qe=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
|
|
1199
|
+
Defaulting to 2020, but this will stop working in the future.`)),d.ecmaVersion=11):d.ecmaVersion>=2015&&(d.ecmaVersion-=2009),d.allowReserved==null&&(d.allowReserved=d.ecmaVersion<5),(!c||c.allowHashBang==null)&&(d.allowHashBang=d.ecmaVersion>=14),C(d.onToken)){var I=d.onToken;d.onToken=function(N){return I.push(N)}}if(C(d.onComment)&&(d.onComment=Xn(d,d.onComment)),d.sourceType==="commonjs"&&d.allowAwaitOutsideFunction)throw new Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");return d}function Xn(c,d){return function(x,I,N,M,j,H){var J={type:x?"Block":"Line",value:I,start:N,end:M};c.locations&&(J.loc=new pe(this,j,H)),c.ranges&&(J.range=[N,M]),d.push(J)}}var Zn=1,es=2,Um=4,B1=8,Hm=16,V1=32,tl=64,$1=128,ts=256,Eo=512,U1=1024,rl=Zn|es|ts;function Gm(c,d){return es|(c?Um:0)|(d?B1:0)}var il=0,Wm=1,$i=2,H1=3,G1=4,W1=5,Xe=function(d,x,I){this.options=d=Si(d),this.sourceFile=d.sourceFile,this.keywords=U(o[d.ecmaVersion>=6?6:d.sourceType==="module"?"5module":5]);var N="";d.allowReserved!==!0&&(N=s[d.ecmaVersion>=6?6:d.ecmaVersion===5?5:3],d.sourceType==="module"&&(N+=" await")),this.reservedWords=U(N);var M=(N?N+" ":"")+s.strict;this.reservedWordsStrict=U(M),this.reservedWordsStrictBind=U(M+" "+s.strictBind),this.input=String(x),this.containsEsc=!1,I?(this.pos=I,this.lineStart=this.input.lastIndexOf(`
|
|
1200
|
+
`,I-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(A).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=_.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=d.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&d.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(this.options.sourceType==="commonjs"?es:Zn),this.regexpState=null,this.privateNameStack=[]},$r={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowReturn:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},allowUsing:{configurable:!0},inClassStaticBlock:{configurable:!0}};Xe.prototype.parse=function(){var d=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(d)},$r.inFunction.get=function(){return(this.currentVarScope().flags&es)>0},$r.inGenerator.get=function(){return(this.currentVarScope().flags&B1)>0},$r.inAsync.get=function(){return(this.currentVarScope().flags&Um)>0},$r.canAwait.get=function(){for(var c=this.scopeStack.length-1;c>=0;c--){var d=this.scopeStack[c],x=d.flags;if(x&(ts|Eo))return!1;if(x&es)return(x&Um)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},$r.allowReturn.get=function(){return!!(this.inFunction||this.options.allowReturnOutsideFunction&&this.currentVarScope().flags&Zn)},$r.allowSuper.get=function(){var c=this.currentThisScope(),d=c.flags;return(d&tl)>0||this.options.allowSuperOutsideMethod},$r.allowDirectSuper.get=function(){return(this.currentThisScope().flags&$1)>0},$r.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},$r.allowNewDotTarget.get=function(){for(var c=this.scopeStack.length-1;c>=0;c--){var d=this.scopeStack[c],x=d.flags;if(x&(ts|Eo)||x&es&&!(x&Hm))return!0}return!1},$r.allowUsing.get=function(){var c=this.currentScope(),d=c.flags;return!(d&U1||!this.inModule&&d&Zn)},$r.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&ts)>0},Xe.extend=function(){for(var d=[],x=arguments.length;x--;)d[x]=arguments[x];for(var I=this,N=0;N<d.length;N++)I=d[N](I);return I},Xe.parse=function(d,x){return new this(x,d).parse()},Xe.parseExpressionAt=function(d,x,I){var N=new this(I,d,x);return N.nextToken(),N.parseExpression()},Xe.tokenizer=function(d,x){return new this(x,d)},Object.defineProperties(Xe.prototype,$r);var nr=Xe.prototype,qF=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;nr.strictDirective=function(c){if(this.options.ecmaVersion<5)return!1;for(;;){R.lastIndex=c,c+=R.exec(this.input)[0].length;var d=qF.exec(this.input.slice(c));if(!d)return!1;if((d[1]||d[2])==="use strict"){R.lastIndex=c+d[0].length;var x=R.exec(this.input),I=x.index+x[0].length,N=this.input.charAt(I);return N===";"||N==="}"||A.test(x[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(N)||N==="!"&&this.input.charAt(I+1)==="=")}c+=d[0].length,R.lastIndex=c,c+=R.exec(this.input)[0].length,this.input[c]===";"&&c++}},nr.eat=function(c){return this.type===c?(this.next(),!0):!1},nr.isContextual=function(c){return this.type===_.name&&this.value===c&&!this.containsEsc},nr.eatContextual=function(c){return this.isContextual(c)?(this.next(),!0):!1},nr.expectContextual=function(c){this.eatContextual(c)||this.unexpected()},nr.canInsertSemicolon=function(){return this.type===_.eof||this.type===_.braceR||A.test(this.input.slice(this.lastTokEnd,this.start))},nr.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},nr.semicolon=function(){!this.eat(_.semi)&&!this.insertSemicolon()&&this.unexpected()},nr.afterTrailingComma=function(c,d){if(this.type===c)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),d||this.next(),!0},nr.expect=function(c){this.eat(c)||this.unexpected()},nr.unexpected=function(c){this.raise(c??this.start,"Unexpected token")};var nl=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};nr.checkPatternErrors=function(c,d){if(c){c.trailingComma>-1&&this.raiseRecoverable(c.trailingComma,"Comma is not permitted after the rest element");var x=d?c.parenthesizedAssign:c.parenthesizedBind;x>-1&&this.raiseRecoverable(x,d?"Assigning to rvalue":"Parenthesized pattern")}},nr.checkExpressionErrors=function(c,d){if(!c)return!1;var x=c.shorthandAssign,I=c.doubleProto;if(!d)return x>=0||I>=0;x>=0&&this.raise(x,"Shorthand property assignments are valid only in destructuring patterns"),I>=0&&this.raiseRecoverable(I,"Redefinition of __proto__ property")},nr.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")},nr.isSimpleAssignTarget=function(c){return c.type==="ParenthesizedExpression"?this.isSimpleAssignTarget(c.expression):c.type==="Identifier"||c.type==="MemberExpression"};var ie=Xe.prototype;ie.parseTopLevel=function(c){var d=Object.create(null);for(c.body||(c.body=[]);this.type!==_.eof;){var x=this.parseStatement(null,!0,d);c.body.push(x)}if(this.inModule)for(var I=0,N=Object.keys(this.undefinedExports);I<N.length;I+=1){var M=N[I];this.raiseRecoverable(this.undefinedExports[M].start,"Export '"+M+"' is not defined")}return this.adaptDirectivePrologue(c.body),this.next(),c.sourceType=this.options.sourceType==="commonjs"?"script":this.options.sourceType,this.finishNode(c,"Program")};var zm={kind:"loop"},CF={kind:"switch"};ie.isLet=function(c){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;R.lastIndex=this.pos;var d=R.exec(this.input),x=this.pos+d[0].length,I=this.fullCharCodeAt(x);if(I===91||I===92)return!0;if(c)return!1;if(I===123)return!0;if(p(I)){var N=x;do x+=I<=65535?1:2;while(m(I=this.fullCharCodeAt(x)));if(I===92)return!0;var M=this.input.slice(N,x);if(!u.test(M))return!0}return!1},ie.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;R.lastIndex=this.pos;var c=R.exec(this.input),d=this.pos+c[0].length,x;return!A.test(this.input.slice(this.pos,d))&&this.input.slice(d,d+8)==="function"&&(d+8===this.input.length||!(m(x=this.fullCharCodeAt(d+8))||x===92))},ie.isUsingKeyword=function(c,d){if(this.options.ecmaVersion<17||!this.isContextual(c?"await":"using"))return!1;R.lastIndex=this.pos;var x=R.exec(this.input),I=this.pos+x[0].length;if(A.test(this.input.slice(this.pos,I)))return!1;if(c){var N=I+5,M;if(this.input.slice(I,N)!=="using"||N===this.input.length||m(M=this.fullCharCodeAt(N))||M===92)return!1;R.lastIndex=N;var j=R.exec(this.input);if(I=N+j[0].length,j&&A.test(this.input.slice(N,I)))return!1}var H=this.fullCharCodeAt(I);if(!p(H)&&H!==92)return!1;var J=I;do I+=H<=65535?1:2;while(m(H=this.fullCharCodeAt(I)));if(H===92)return!0;var ue=this.input.slice(J,I);return!(u.test(ue)||d&&ue==="of")},ie.isAwaitUsing=function(c){return this.isUsingKeyword(!0,c)},ie.isUsing=function(c){return this.isUsingKeyword(!1,c)},ie.parseStatement=function(c,d,x){var I=this.type,N=this.startNode(),M;switch(this.isLet(c)&&(I=_._var,M="let"),I){case _._break:case _._continue:return this.parseBreakContinueStatement(N,I.keyword);case _._debugger:return this.parseDebuggerStatement(N);case _._do:return this.parseDoStatement(N);case _._for:return this.parseForStatement(N);case _._function:return c&&(this.strict||c!=="if"&&c!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(N,!1,!c);case _._class:return c&&this.unexpected(),this.parseClass(N,!0);case _._if:return this.parseIfStatement(N);case _._return:return this.parseReturnStatement(N);case _._switch:return this.parseSwitchStatement(N);case _._throw:return this.parseThrowStatement(N);case _._try:return this.parseTryStatement(N);case _._const:case _._var:return M=M||this.value,c&&M!=="var"&&this.unexpected(),this.parseVarStatement(N,M);case _._while:return this.parseWhileStatement(N);case _._with:return this.parseWithStatement(N);case _.braceL:return this.parseBlock(!0,N);case _.semi:return this.parseEmptyStatement(N);case _._export:case _._import:if(this.options.ecmaVersion>10&&I===_._import){R.lastIndex=this.pos;var j=R.exec(this.input),H=this.pos+j[0].length,J=this.input.charCodeAt(H);if(J===40||J===46)return this.parseExpressionStatement(N,this.parseExpression())}return this.options.allowImportExportEverywhere||(d||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),I===_._import?this.parseImport(N):this.parseExport(N,x);default:if(this.isAsyncFunction())return c&&this.unexpected(),this.next(),this.parseFunctionStatement(N,!0,!c);var ue=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(ue)return this.allowUsing||this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement"),ue==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(N,!1,ue),this.semicolon(),this.finishNode(N,"VariableDeclaration");var _e=this.value,Ve=this.parseExpression();return I===_.name&&Ve.type==="Identifier"&&this.eat(_.colon)?this.parseLabeledStatement(N,_e,Ve,c):this.parseExpressionStatement(N,Ve)}},ie.parseBreakContinueStatement=function(c,d){var x=d==="break";this.next(),this.eat(_.semi)||this.insertSemicolon()?c.label=null:this.type!==_.name?this.unexpected():(c.label=this.parseIdent(),this.semicolon());for(var I=0;I<this.labels.length;++I){var N=this.labels[I];if((c.label==null||N.name===c.label.name)&&(N.kind!=null&&(x||N.kind==="loop")||c.label&&x))break}return I===this.labels.length&&this.raise(c.start,"Unsyntactic "+d),this.finishNode(c,x?"BreakStatement":"ContinueStatement")},ie.parseDebuggerStatement=function(c){return this.next(),this.semicolon(),this.finishNode(c,"DebuggerStatement")},ie.parseDoStatement=function(c){return this.next(),this.labels.push(zm),c.body=this.parseStatement("do"),this.labels.pop(),this.expect(_._while),c.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(_.semi):this.semicolon(),this.finishNode(c,"DoWhileStatement")},ie.parseForStatement=function(c){this.next();var d=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(zm),this.enterScope(0),this.expect(_.parenL),this.type===_.semi)return d>-1&&this.unexpected(d),this.parseFor(c,null);var x=this.isLet();if(this.type===_._var||this.type===_._const||x){var I=this.startNode(),N=x?"let":this.value;return this.next(),this.parseVar(I,!0,N),this.finishNode(I,"VariableDeclaration"),this.parseForAfterInit(c,I,d)}var M=this.isContextual("let"),j=!1,H=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(H){var J=this.startNode();return this.next(),H==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.parseVar(J,!0,H),this.finishNode(J,"VariableDeclaration"),this.parseForAfterInit(c,J,d)}var ue=this.containsEsc,_e=new nl,Ve=this.start,Jt=d>-1?this.parseExprSubscripts(_e,"await"):this.parseExpression(!0,_e);return this.type===_._in||(j=this.options.ecmaVersion>=6&&this.isContextual("of"))?(d>-1?(this.type===_._in&&this.unexpected(d),c.await=!0):j&&this.options.ecmaVersion>=8&&(Jt.start===Ve&&!ue&&Jt.type==="Identifier"&&Jt.name==="async"?this.unexpected():this.options.ecmaVersion>=9&&(c.await=!1)),M&&j&&this.raise(Jt.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(Jt,!1,_e),this.checkLValPattern(Jt),this.parseForIn(c,Jt)):(this.checkExpressionErrors(_e,!0),d>-1&&this.unexpected(d),this.parseFor(c,Jt))},ie.parseForAfterInit=function(c,d,x){return(this.type===_._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&d.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===_._in?x>-1&&this.unexpected(x):c.await=x>-1),this.parseForIn(c,d)):(x>-1&&this.unexpected(x),this.parseFor(c,d))},ie.parseFunctionStatement=function(c,d,x){return this.next(),this.parseFunction(c,Oo|(x?0:Jm),!1,d)},ie.parseIfStatement=function(c){return this.next(),c.test=this.parseParenExpression(),c.consequent=this.parseStatement("if"),c.alternate=this.eat(_._else)?this.parseStatement("if"):null,this.finishNode(c,"IfStatement")},ie.parseReturnStatement=function(c){return this.allowReturn||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(_.semi)||this.insertSemicolon()?c.argument=null:(c.argument=this.parseExpression(),this.semicolon()),this.finishNode(c,"ReturnStatement")},ie.parseSwitchStatement=function(c){this.next(),c.discriminant=this.parseParenExpression(),c.cases=[],this.expect(_.braceL),this.labels.push(CF),this.enterScope(U1);for(var d,x=!1;this.type!==_.braceR;)if(this.type===_._case||this.type===_._default){var I=this.type===_._case;d&&this.finishNode(d,"SwitchCase"),c.cases.push(d=this.startNode()),d.consequent=[],this.next(),I?d.test=this.parseExpression():(x&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),x=!0,d.test=null),this.expect(_.colon)}else d||this.unexpected(),d.consequent.push(this.parseStatement(null));return this.exitScope(),d&&this.finishNode(d,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(c,"SwitchStatement")},ie.parseThrowStatement=function(c){return this.next(),A.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),c.argument=this.parseExpression(),this.semicolon(),this.finishNode(c,"ThrowStatement")};var RF=[];ie.parseCatchClauseParam=function(){var c=this.parseBindingAtom(),d=c.type==="Identifier";return this.enterScope(d?V1:0),this.checkLValPattern(c,d?G1:$i),this.expect(_.parenR),c},ie.parseTryStatement=function(c){if(this.next(),c.block=this.parseBlock(),c.handler=null,this.type===_._catch){var d=this.startNode();this.next(),this.eat(_.parenL)?d.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),d.param=null,this.enterScope(0)),d.body=this.parseBlock(!1),this.exitScope(),c.handler=this.finishNode(d,"CatchClause")}return c.finalizer=this.eat(_._finally)?this.parseBlock():null,!c.handler&&!c.finalizer&&this.raise(c.start,"Missing catch or finally clause"),this.finishNode(c,"TryStatement")},ie.parseVarStatement=function(c,d,x){return this.next(),this.parseVar(c,!1,d,x),this.semicolon(),this.finishNode(c,"VariableDeclaration")},ie.parseWhileStatement=function(c){return this.next(),c.test=this.parseParenExpression(),this.labels.push(zm),c.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(c,"WhileStatement")},ie.parseWithStatement=function(c){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),c.object=this.parseParenExpression(),c.body=this.parseStatement("with"),this.finishNode(c,"WithStatement")},ie.parseEmptyStatement=function(c){return this.next(),this.finishNode(c,"EmptyStatement")},ie.parseLabeledStatement=function(c,d,x,I){for(var N=0,M=this.labels;N<M.length;N+=1){var j=M[N];j.name===d&&this.raise(x.start,"Label '"+d+"' is already declared")}for(var H=this.type.isLoop?"loop":this.type===_._switch?"switch":null,J=this.labels.length-1;J>=0;J--){var ue=this.labels[J];if(ue.statementStart===c.start)ue.statementStart=this.start,ue.kind=H;else break}return this.labels.push({name:d,kind:H,statementStart:this.start}),c.body=this.parseStatement(I?I.indexOf("label")===-1?I+"label":I:"label"),this.labels.pop(),c.label=x,this.finishNode(c,"LabeledStatement")},ie.parseExpressionStatement=function(c,d){return c.expression=d,this.semicolon(),this.finishNode(c,"ExpressionStatement")},ie.parseBlock=function(c,d,x){for(c===void 0&&(c=!0),d===void 0&&(d=this.startNode()),d.body=[],this.expect(_.braceL),c&&this.enterScope(0);this.type!==_.braceR;){var I=this.parseStatement(null);d.body.push(I)}return x&&(this.strict=!1),this.next(),c&&this.exitScope(),this.finishNode(d,"BlockStatement")},ie.parseFor=function(c,d){return c.init=d,this.expect(_.semi),c.test=this.type===_.semi?null:this.parseExpression(),this.expect(_.semi),c.update=this.type===_.parenR?null:this.parseExpression(),this.expect(_.parenR),c.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(c,"ForStatement")},ie.parseForIn=function(c,d){var x=this.type===_._in;return this.next(),d.type==="VariableDeclaration"&&d.declarations[0].init!=null&&(!x||this.options.ecmaVersion<8||this.strict||d.kind!=="var"||d.declarations[0].id.type!=="Identifier")&&this.raise(d.start,(x?"for-in":"for-of")+" loop variable declaration may not have an initializer"),c.left=d,c.right=x?this.parseExpression():this.parseMaybeAssign(),this.expect(_.parenR),c.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(c,x?"ForInStatement":"ForOfStatement")},ie.parseVar=function(c,d,x,I){for(c.declarations=[],c.kind=x;;){var N=this.startNode();if(this.parseVarId(N,x),this.eat(_.eq)?N.init=this.parseMaybeAssign(d):!I&&x==="const"&&!(this.type===_._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!I&&(x==="using"||x==="await using")&&this.options.ecmaVersion>=17&&this.type!==_._in&&!this.isContextual("of")?this.raise(this.lastTokEnd,"Missing initializer in "+x+" declaration"):!I&&N.id.type!=="Identifier"&&!(d&&(this.type===_._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):N.init=null,c.declarations.push(this.finishNode(N,"VariableDeclarator")),!this.eat(_.comma))break}return c},ie.parseVarId=function(c,d){c.id=d==="using"||d==="await using"?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(c.id,d==="var"?Wm:$i,!1)};var Oo=1,Jm=2,z1=4;ie.parseFunction=function(c,d,x,I,N){this.initFunction(c),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!I)&&(this.type===_.star&&d&Jm&&this.unexpected(),c.generator=this.eat(_.star)),this.options.ecmaVersion>=8&&(c.async=!!I),d&Oo&&(c.id=d&z1&&this.type!==_.name?null:this.parseIdent(),c.id&&!(d&Jm)&&this.checkLValSimple(c.id,this.strict||c.generator||c.async?this.treatFunctionsAsVar?Wm:$i:H1));var M=this.yieldPos,j=this.awaitPos,H=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Gm(c.async,c.generator)),d&Oo||(c.id=this.type===_.name?this.parseIdent():null),this.parseFunctionParams(c),this.parseFunctionBody(c,x,!1,N),this.yieldPos=M,this.awaitPos=j,this.awaitIdentPos=H,this.finishNode(c,d&Oo?"FunctionDeclaration":"FunctionExpression")},ie.parseFunctionParams=function(c){this.expect(_.parenL),c.params=this.parseBindingList(_.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},ie.parseClass=function(c,d){this.next();var x=this.strict;this.strict=!0,this.parseClassId(c,d),this.parseClassSuper(c);var I=this.enterClassBody(),N=this.startNode(),M=!1;for(N.body=[],this.expect(_.braceL);this.type!==_.braceR;){var j=this.parseClassElement(c.superClass!==null);j&&(N.body.push(j),j.type==="MethodDefinition"&&j.kind==="constructor"?(M&&this.raiseRecoverable(j.start,"Duplicate constructor in the same class"),M=!0):j.key&&j.key.type==="PrivateIdentifier"&&MF(I,j)&&this.raiseRecoverable(j.key.start,"Identifier '#"+j.key.name+"' has already been declared"))}return this.strict=x,this.next(),c.body=this.finishNode(N,"ClassBody"),this.exitClassBody(),this.finishNode(c,d?"ClassDeclaration":"ClassExpression")},ie.parseClassElement=function(c){if(this.eat(_.semi))return null;var d=this.options.ecmaVersion,x=this.startNode(),I="",N=!1,M=!1,j="method",H=!1;if(this.eatContextual("static")){if(d>=13&&this.eat(_.braceL))return this.parseClassStaticBlock(x),x;this.isClassElementNameStart()||this.type===_.star?H=!0:I="static"}if(x.static=H,!I&&d>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===_.star)&&!this.canInsertSemicolon()?M=!0:I="async"),!I&&(d>=9||!M)&&this.eat(_.star)&&(N=!0),!I&&!M&&!N){var J=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?j=J:I=J)}if(I?(x.computed=!1,x.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),x.key.name=I,this.finishNode(x.key,"Identifier")):this.parseClassElementName(x),d<13||this.type===_.parenL||j!=="method"||N||M){var ue=!x.static&&sl(x,"constructor"),_e=ue&&c;ue&&j!=="method"&&this.raise(x.key.start,"Constructor can't have get/set modifier"),x.kind=ue?"constructor":j,this.parseClassMethod(x,N,M,_e)}else this.parseClassField(x);return x},ie.isClassElementNameStart=function(){return this.type===_.name||this.type===_.privateId||this.type===_.num||this.type===_.string||this.type===_.bracketL||this.type.keyword},ie.parseClassElementName=function(c){this.type===_.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),c.computed=!1,c.key=this.parsePrivateIdent()):this.parsePropertyName(c)},ie.parseClassMethod=function(c,d,x,I){var N=c.key;c.kind==="constructor"?(d&&this.raise(N.start,"Constructor can't be a generator"),x&&this.raise(N.start,"Constructor can't be an async method")):c.static&&sl(c,"prototype")&&this.raise(N.start,"Classes may not have a static property named prototype");var M=c.value=this.parseMethod(d,x,I);return c.kind==="get"&&M.params.length!==0&&this.raiseRecoverable(M.start,"getter should have no params"),c.kind==="set"&&M.params.length!==1&&this.raiseRecoverable(M.start,"setter should have exactly one param"),c.kind==="set"&&M.params[0].type==="RestElement"&&this.raiseRecoverable(M.params[0].start,"Setter cannot use rest params"),this.finishNode(c,"MethodDefinition")},ie.parseClassField=function(c){return sl(c,"constructor")?this.raise(c.key.start,"Classes can't have a field named 'constructor'"):c.static&&sl(c,"prototype")&&this.raise(c.key.start,"Classes can't have a static field named 'prototype'"),this.eat(_.eq)?(this.enterScope(Eo|tl),c.value=this.parseMaybeAssign(),this.exitScope()):c.value=null,this.semicolon(),this.finishNode(c,"PropertyDefinition")},ie.parseClassStaticBlock=function(c){c.body=[];var d=this.labels;for(this.labels=[],this.enterScope(ts|tl);this.type!==_.braceR;){var x=this.parseStatement(null);c.body.push(x)}return this.next(),this.exitScope(),this.labels=d,this.finishNode(c,"StaticBlock")},ie.parseClassId=function(c,d){this.type===_.name?(c.id=this.parseIdent(),d&&this.checkLValSimple(c.id,$i,!1)):(d===!0&&this.unexpected(),c.id=null)},ie.parseClassSuper=function(c){c.superClass=this.eat(_._extends)?this.parseExprSubscripts(null,!1):null},ie.enterClassBody=function(){var c={declared:Object.create(null),used:[]};return this.privateNameStack.push(c),c.declared},ie.exitClassBody=function(){var c=this.privateNameStack.pop(),d=c.declared,x=c.used;if(this.options.checkPrivateFields)for(var I=this.privateNameStack.length,N=I===0?null:this.privateNameStack[I-1],M=0;M<x.length;++M){var j=x[M];V(d,j.name)||(N?N.used.push(j):this.raiseRecoverable(j.start,"Private field '#"+j.name+"' must be declared in an enclosing class"))}};function MF(c,d){var x=d.key.name,I=c[x],N="true";return d.type==="MethodDefinition"&&(d.kind==="get"||d.kind==="set")&&(N=(d.static?"s":"i")+d.kind),I==="iget"&&N==="iset"||I==="iset"&&N==="iget"||I==="sget"&&N==="sset"||I==="sset"&&N==="sget"?(c[x]="true",!1):I?!0:(c[x]=N,!1)}function sl(c,d){var x=c.computed,I=c.key;return!x&&(I.type==="Identifier"&&I.name===d||I.type==="Literal"&&I.value===d)}ie.parseExportAllDeclaration=function(c,d){return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(c.exported=this.parseModuleExportName(),this.checkExport(d,c.exported,this.lastTokStart)):c.exported=null),this.expectContextual("from"),this.type!==_.string&&this.unexpected(),c.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(c.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(c,"ExportAllDeclaration")},ie.parseExport=function(c,d){if(this.next(),this.eat(_.star))return this.parseExportAllDeclaration(c,d);if(this.eat(_._default))return this.checkExport(d,"default",this.lastTokStart),c.declaration=this.parseExportDefaultDeclaration(),this.finishNode(c,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())c.declaration=this.parseExportDeclaration(c),c.declaration.type==="VariableDeclaration"?this.checkVariableExport(d,c.declaration.declarations):this.checkExport(d,c.declaration.id,c.declaration.id.start),c.specifiers=[],c.source=null,this.options.ecmaVersion>=16&&(c.attributes=[]);else{if(c.declaration=null,c.specifiers=this.parseExportSpecifiers(d),this.eatContextual("from"))this.type!==_.string&&this.unexpected(),c.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(c.attributes=this.parseWithClause());else{for(var x=0,I=c.specifiers;x<I.length;x+=1){var N=I[x];this.checkUnreserved(N.local),this.checkLocalExport(N.local),N.local.type==="Literal"&&this.raise(N.local.start,"A string literal cannot be used as an exported binding without `from`.")}c.source=null,this.options.ecmaVersion>=16&&(c.attributes=[])}this.semicolon()}return this.finishNode(c,"ExportNamedDeclaration")},ie.parseExportDeclaration=function(c){return this.parseStatement(null)},ie.parseExportDefaultDeclaration=function(){var c;if(this.type===_._function||(c=this.isAsyncFunction())){var d=this.startNode();return this.next(),c&&this.next(),this.parseFunction(d,Oo|z1,!1,c)}else if(this.type===_._class){var x=this.startNode();return this.parseClass(x,"nullableID")}else{var I=this.parseMaybeAssign();return this.semicolon(),I}},ie.checkExport=function(c,d,x){c&&(typeof d!="string"&&(d=d.type==="Identifier"?d.name:d.value),V(c,d)&&this.raiseRecoverable(x,"Duplicate export '"+d+"'"),c[d]=!0)},ie.checkPatternExport=function(c,d){var x=d.type;if(x==="Identifier")this.checkExport(c,d,d.start);else if(x==="ObjectPattern")for(var I=0,N=d.properties;I<N.length;I+=1){var M=N[I];this.checkPatternExport(c,M)}else if(x==="ArrayPattern")for(var j=0,H=d.elements;j<H.length;j+=1){var J=H[j];J&&this.checkPatternExport(c,J)}else x==="Property"?this.checkPatternExport(c,d.value):x==="AssignmentPattern"?this.checkPatternExport(c,d.left):x==="RestElement"&&this.checkPatternExport(c,d.argument)},ie.checkVariableExport=function(c,d){if(c)for(var x=0,I=d;x<I.length;x+=1){var N=I[x];this.checkPatternExport(c,N.id)}},ie.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()},ie.parseExportSpecifier=function(c){var d=this.startNode();return d.local=this.parseModuleExportName(),d.exported=this.eatContextual("as")?this.parseModuleExportName():d.local,this.checkExport(c,d.exported,d.exported.start),this.finishNode(d,"ExportSpecifier")},ie.parseExportSpecifiers=function(c){var d=[],x=!0;for(this.expect(_.braceL);!this.eat(_.braceR);){if(x)x=!1;else if(this.expect(_.comma),this.afterTrailingComma(_.braceR))break;d.push(this.parseExportSpecifier(c))}return d},ie.parseImport=function(c){return this.next(),this.type===_.string?(c.specifiers=RF,c.source=this.parseExprAtom()):(c.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),c.source=this.type===_.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(c.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(c,"ImportDeclaration")},ie.parseImportSpecifier=function(){var c=this.startNode();return c.imported=this.parseModuleExportName(),this.eatContextual("as")?c.local=this.parseIdent():(this.checkUnreserved(c.imported),c.local=c.imported),this.checkLValSimple(c.local,$i),this.finishNode(c,"ImportSpecifier")},ie.parseImportDefaultSpecifier=function(){var c=this.startNode();return c.local=this.parseIdent(),this.checkLValSimple(c.local,$i),this.finishNode(c,"ImportDefaultSpecifier")},ie.parseImportNamespaceSpecifier=function(){var c=this.startNode();return this.next(),this.expectContextual("as"),c.local=this.parseIdent(),this.checkLValSimple(c.local,$i),this.finishNode(c,"ImportNamespaceSpecifier")},ie.parseImportSpecifiers=function(){var c=[],d=!0;if(this.type===_.name&&(c.push(this.parseImportDefaultSpecifier()),!this.eat(_.comma)))return c;if(this.type===_.star)return c.push(this.parseImportNamespaceSpecifier()),c;for(this.expect(_.braceL);!this.eat(_.braceR);){if(d)d=!1;else if(this.expect(_.comma),this.afterTrailingComma(_.braceR))break;c.push(this.parseImportSpecifier())}return c},ie.parseWithClause=function(){var c=[];if(!this.eat(_._with))return c;this.expect(_.braceL);for(var d={},x=!0;!this.eat(_.braceR);){if(x)x=!1;else if(this.expect(_.comma),this.afterTrailingComma(_.braceR))break;var I=this.parseImportAttribute(),N=I.key.type==="Identifier"?I.key.name:I.key.value;V(d,N)&&this.raiseRecoverable(I.key.start,"Duplicate attribute key '"+N+"'"),d[N]=!0,c.push(I)}return c},ie.parseImportAttribute=function(){var c=this.startNode();return c.key=this.type===_.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never"),this.expect(_.colon),this.type!==_.string&&this.unexpected(),c.value=this.parseExprAtom(),this.finishNode(c,"ImportAttribute")},ie.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===_.string){var c=this.parseLiteral(this.value);return Q.test(c.value)&&this.raise(c.start,"An export name cannot include a lone surrogate."),c}return this.parseIdent(!0)},ie.adaptDirectivePrologue=function(c){for(var d=0;d<c.length&&this.isDirectiveCandidate(c[d]);++d)c[d].directive=c[d].expression.raw.slice(1,-1)},ie.isDirectiveCandidate=function(c){return this.options.ecmaVersion>=5&&c.type==="ExpressionStatement"&&c.expression.type==="Literal"&&typeof c.expression.value=="string"&&(this.input[c.start]==='"'||this.input[c.start]==="'")};var Ur=Xe.prototype;Ur.toAssignable=function(c,d,x){if(this.options.ecmaVersion>=6&&c)switch(c.type){case"Identifier":this.inAsync&&c.name==="await"&&this.raise(c.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":c.type="ObjectPattern",x&&this.checkPatternErrors(x,!0);for(var I=0,N=c.properties;I<N.length;I+=1){var M=N[I];this.toAssignable(M,d),M.type==="RestElement"&&(M.argument.type==="ArrayPattern"||M.argument.type==="ObjectPattern")&&this.raise(M.argument.start,"Unexpected token")}break;case"Property":c.kind!=="init"&&this.raise(c.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(c.value,d);break;case"ArrayExpression":c.type="ArrayPattern",x&&this.checkPatternErrors(x,!0),this.toAssignableList(c.elements,d);break;case"SpreadElement":c.type="RestElement",this.toAssignable(c.argument,d),c.argument.type==="AssignmentPattern"&&this.raise(c.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":c.operator!=="="&&this.raise(c.left.end,"Only '=' operator can be used for specifying default value."),c.type="AssignmentPattern",delete c.operator,this.toAssignable(c.left,d);break;case"ParenthesizedExpression":this.toAssignable(c.expression,d,x);break;case"ChainExpression":this.raiseRecoverable(c.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!d)break;default:this.raise(c.start,"Assigning to rvalue")}else x&&this.checkPatternErrors(x,!0);return c},Ur.toAssignableList=function(c,d){for(var x=c.length,I=0;I<x;I++){var N=c[I];N&&this.toAssignable(N,d)}if(x){var M=c[x-1];this.options.ecmaVersion===6&&d&&M&&M.type==="RestElement"&&M.argument.type!=="Identifier"&&this.unexpected(M.argument.start)}return c},Ur.parseSpread=function(c){var d=this.startNode();return this.next(),d.argument=this.parseMaybeAssign(!1,c),this.finishNode(d,"SpreadElement")},Ur.parseRestBinding=function(){var c=this.startNode();return this.next(),this.options.ecmaVersion===6&&this.type!==_.name&&this.unexpected(),c.argument=this.parseBindingAtom(),this.finishNode(c,"RestElement")},Ur.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case _.bracketL:var c=this.startNode();return this.next(),c.elements=this.parseBindingList(_.bracketR,!0,!0),this.finishNode(c,"ArrayPattern");case _.braceL:return this.parseObj(!0)}return this.parseIdent()},Ur.parseBindingList=function(c,d,x,I){for(var N=[],M=!0;!this.eat(c);)if(M?M=!1:this.expect(_.comma),d&&this.type===_.comma)N.push(null);else{if(x&&this.afterTrailingComma(c))break;if(this.type===_.ellipsis){var j=this.parseRestBinding();this.parseBindingListItem(j),N.push(j),this.type===_.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(c);break}else N.push(this.parseAssignableListItem(I))}return N},Ur.parseAssignableListItem=function(c){var d=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(d),d},Ur.parseBindingListItem=function(c){return c},Ur.parseMaybeDefault=function(c,d,x){if(x=x||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(_.eq))return x;var I=this.startNodeAt(c,d);return I.left=x,I.right=this.parseMaybeAssign(),this.finishNode(I,"AssignmentPattern")},Ur.checkLValSimple=function(c,d,x){d===void 0&&(d=il);var I=d!==il;switch(c.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(c.name)&&this.raiseRecoverable(c.start,(I?"Binding ":"Assigning to ")+c.name+" in strict mode"),I&&(d===$i&&c.name==="let"&&this.raiseRecoverable(c.start,"let is disallowed as a lexically bound name"),x&&(V(x,c.name)&&this.raiseRecoverable(c.start,"Argument name clash"),x[c.name]=!0),d!==W1&&this.declareName(c.name,d,c.start));break;case"ChainExpression":this.raiseRecoverable(c.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":I&&this.raiseRecoverable(c.start,"Binding member expression");break;case"ParenthesizedExpression":return I&&this.raiseRecoverable(c.start,"Binding parenthesized expression"),this.checkLValSimple(c.expression,d,x);default:this.raise(c.start,(I?"Binding":"Assigning to")+" rvalue")}},Ur.checkLValPattern=function(c,d,x){switch(d===void 0&&(d=il),c.type){case"ObjectPattern":for(var I=0,N=c.properties;I<N.length;I+=1){var M=N[I];this.checkLValInnerPattern(M,d,x)}break;case"ArrayPattern":for(var j=0,H=c.elements;j<H.length;j+=1){var J=H[j];J&&this.checkLValInnerPattern(J,d,x)}break;default:this.checkLValSimple(c,d,x)}},Ur.checkLValInnerPattern=function(c,d,x){switch(d===void 0&&(d=il),c.type){case"Property":this.checkLValInnerPattern(c.value,d,x);break;case"AssignmentPattern":this.checkLValPattern(c.left,d,x);break;case"RestElement":this.checkLValPattern(c.argument,d,x);break;default:this.checkLValPattern(c,d,x)}};var Hr=function(d,x,I,N,M){this.token=d,this.isExpr=!!x,this.preserveSpace=!!I,this.override=N,this.generator=!!M},Be={b_stat:new Hr("{",!1),b_expr:new Hr("{",!0),b_tmpl:new Hr("${",!1),p_stat:new Hr("(",!1),p_expr:new Hr("(",!0),q_tmpl:new Hr("`",!0,!0,function(c){return c.tryReadTemplateToken()}),f_stat:new Hr("function",!1),f_expr:new Hr("function",!0),f_expr_gen:new Hr("function",!0,!1,null,!0),f_gen:new Hr("function",!1,!1,null,!0)},Zs=Xe.prototype;Zs.initialContext=function(){return[Be.b_stat]},Zs.curContext=function(){return this.context[this.context.length-1]},Zs.braceIsBlock=function(c){var d=this.curContext();return d===Be.f_expr||d===Be.f_stat?!0:c===_.colon&&(d===Be.b_stat||d===Be.b_expr)?!d.isExpr:c===_._return||c===_.name&&this.exprAllowed?A.test(this.input.slice(this.lastTokEnd,this.start)):c===_._else||c===_.semi||c===_.eof||c===_.parenR||c===_.arrow?!0:c===_.braceL?d===Be.b_stat:c===_._var||c===_._const||c===_.name?!1:!this.exprAllowed},Zs.inGeneratorContext=function(){for(var c=this.context.length-1;c>=1;c--){var d=this.context[c];if(d.token==="function")return d.generator}return!1},Zs.updateContext=function(c){var d,x=this.type;x.keyword&&c===_.dot?this.exprAllowed=!1:(d=x.updateContext)?d.call(this,c):this.exprAllowed=x.beforeExpr},Zs.overrideContext=function(c){this.curContext()!==c&&(this.context[this.context.length-1]=c)},_.parenR.updateContext=_.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var c=this.context.pop();c===Be.b_stat&&this.curContext().token==="function"&&(c=this.context.pop()),this.exprAllowed=!c.isExpr},_.braceL.updateContext=function(c){this.context.push(this.braceIsBlock(c)?Be.b_stat:Be.b_expr),this.exprAllowed=!0},_.dollarBraceL.updateContext=function(){this.context.push(Be.b_tmpl),this.exprAllowed=!0},_.parenL.updateContext=function(c){var d=c===_._if||c===_._for||c===_._with||c===_._while;this.context.push(d?Be.p_stat:Be.p_expr),this.exprAllowed=!0},_.incDec.updateContext=function(){},_._function.updateContext=_._class.updateContext=function(c){c.beforeExpr&&c!==_._else&&!(c===_.semi&&this.curContext()!==Be.p_stat)&&!(c===_._return&&A.test(this.input.slice(this.lastTokEnd,this.start)))&&!((c===_.colon||c===_.braceL)&&this.curContext()===Be.b_stat)?this.context.push(Be.f_expr):this.context.push(Be.f_stat),this.exprAllowed=!1},_.colon.updateContext=function(){this.curContext().token==="function"&&this.context.pop(),this.exprAllowed=!0},_.backQuote.updateContext=function(){this.curContext()===Be.q_tmpl?this.context.pop():this.context.push(Be.q_tmpl),this.exprAllowed=!1},_.star.updateContext=function(c){if(c===_._function){var d=this.context.length-1;this.context[d]===Be.f_expr?this.context[d]=Be.f_expr_gen:this.context[d]=Be.f_gen}this.exprAllowed=!0},_.name.updateContext=function(c){var d=!1;this.options.ecmaVersion>=6&&c!==_.dot&&(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())&&(d=!0),this.exprAllowed=d};var fe=Xe.prototype;fe.checkPropClash=function(c,d,x){if(!(this.options.ecmaVersion>=9&&c.type==="SpreadElement")&&!(this.options.ecmaVersion>=6&&(c.computed||c.method||c.shorthand))){var I=c.key,N;switch(I.type){case"Identifier":N=I.name;break;case"Literal":N=String(I.value);break;default:return}var M=c.kind;if(this.options.ecmaVersion>=6){N==="__proto__"&&M==="init"&&(d.proto&&(x?x.doubleProto<0&&(x.doubleProto=I.start):this.raiseRecoverable(I.start,"Redefinition of __proto__ property")),d.proto=!0);return}N="$"+N;var j=d[N];if(j){var H;M==="init"?H=this.strict&&j.init||j.get||j.set:H=j.init||j[M],H&&this.raiseRecoverable(I.start,"Redefinition of property")}else j=d[N]={init:!1,get:!1,set:!1};j[M]=!0}},fe.parseExpression=function(c,d){var x=this.start,I=this.startLoc,N=this.parseMaybeAssign(c,d);if(this.type===_.comma){var M=this.startNodeAt(x,I);for(M.expressions=[N];this.eat(_.comma);)M.expressions.push(this.parseMaybeAssign(c,d));return this.finishNode(M,"SequenceExpression")}return N},fe.parseMaybeAssign=function(c,d,x){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(c);this.exprAllowed=!1}var I=!1,N=-1,M=-1,j=-1;d?(N=d.parenthesizedAssign,M=d.trailingComma,j=d.doubleProto,d.parenthesizedAssign=d.trailingComma=-1):(d=new nl,I=!0);var H=this.start,J=this.startLoc;(this.type===_.parenL||this.type===_.name)&&(this.potentialArrowAt=this.start,this.potentialArrowInForAwait=c==="await");var ue=this.parseMaybeConditional(c,d);if(x&&(ue=x.call(this,ue,H,J)),this.type.isAssign){var _e=this.startNodeAt(H,J);return _e.operator=this.value,this.type===_.eq&&(ue=this.toAssignable(ue,!1,d)),I||(d.parenthesizedAssign=d.trailingComma=d.doubleProto=-1),d.shorthandAssign>=ue.start&&(d.shorthandAssign=-1),this.type===_.eq?this.checkLValPattern(ue):this.checkLValSimple(ue),_e.left=ue,this.next(),_e.right=this.parseMaybeAssign(c),j>-1&&(d.doubleProto=j),this.finishNode(_e,"AssignmentExpression")}else I&&this.checkExpressionErrors(d,!0);return N>-1&&(d.parenthesizedAssign=N),M>-1&&(d.trailingComma=M),ue},fe.parseMaybeConditional=function(c,d){var x=this.start,I=this.startLoc,N=this.parseExprOps(c,d);if(this.checkExpressionErrors(d))return N;if(this.eat(_.question)){var M=this.startNodeAt(x,I);return M.test=N,M.consequent=this.parseMaybeAssign(),this.expect(_.colon),M.alternate=this.parseMaybeAssign(c),this.finishNode(M,"ConditionalExpression")}return N},fe.parseExprOps=function(c,d){var x=this.start,I=this.startLoc,N=this.parseMaybeUnary(d,!1,!1,c);return this.checkExpressionErrors(d)||N.start===x&&N.type==="ArrowFunctionExpression"?N:this.parseExprOp(N,x,I,-1,c)},fe.parseExprOp=function(c,d,x,I,N){var M=this.type.binop;if(M!=null&&(!N||this.type!==_._in)&&M>I){var j=this.type===_.logicalOR||this.type===_.logicalAND,H=this.type===_.coalesce;H&&(M=_.logicalAND.binop);var J=this.value;this.next();var ue=this.start,_e=this.startLoc,Ve=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,N),ue,_e,M,N),Jt=this.buildBinary(d,x,c,Ve,J,j||H);return(j&&this.type===_.coalesce||H&&(this.type===_.logicalOR||this.type===_.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(Jt,d,x,I,N)}return c},fe.buildBinary=function(c,d,x,I,N,M){I.type==="PrivateIdentifier"&&this.raise(I.start,"Private identifier can only be left side of binary expression");var j=this.startNodeAt(c,d);return j.left=x,j.operator=N,j.right=I,this.finishNode(j,M?"LogicalExpression":"BinaryExpression")},fe.parseMaybeUnary=function(c,d,x,I){var N=this.start,M=this.startLoc,j;if(this.isContextual("await")&&this.canAwait)j=this.parseAwait(I),d=!0;else if(this.type.prefix){var H=this.startNode(),J=this.type===_.incDec;H.operator=this.value,H.prefix=!0,this.next(),H.argument=this.parseMaybeUnary(null,!0,J,I),this.checkExpressionErrors(c,!0),J?this.checkLValSimple(H.argument):this.strict&&H.operator==="delete"&&J1(H.argument)?this.raiseRecoverable(H.start,"Deleting local variable in strict mode"):H.operator==="delete"&&Km(H.argument)?this.raiseRecoverable(H.start,"Private fields can not be deleted"):d=!0,j=this.finishNode(H,J?"UpdateExpression":"UnaryExpression")}else if(!d&&this.type===_.privateId)(I||this.privateNameStack.length===0)&&this.options.checkPrivateFields&&this.unexpected(),j=this.parsePrivateIdent(),this.type!==_._in&&this.unexpected();else{if(j=this.parseExprSubscripts(c,I),this.checkExpressionErrors(c))return j;for(;this.type.postfix&&!this.canInsertSemicolon();){var ue=this.startNodeAt(N,M);ue.operator=this.value,ue.prefix=!1,ue.argument=j,this.checkLValSimple(j),this.next(),j=this.finishNode(ue,"UpdateExpression")}}if(!x&&this.eat(_.starstar))if(d)this.unexpected(this.lastTokStart);else return this.buildBinary(N,M,j,this.parseMaybeUnary(null,!1,!1,I),"**",!1);else return j};function J1(c){return c.type==="Identifier"||c.type==="ParenthesizedExpression"&&J1(c.expression)}function Km(c){return c.type==="MemberExpression"&&c.property.type==="PrivateIdentifier"||c.type==="ChainExpression"&&Km(c.expression)||c.type==="ParenthesizedExpression"&&Km(c.expression)}fe.parseExprSubscripts=function(c,d){var x=this.start,I=this.startLoc,N=this.parseExprAtom(c,d);if(N.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")")return N;var M=this.parseSubscripts(N,x,I,!1,d);return c&&M.type==="MemberExpression"&&(c.parenthesizedAssign>=M.start&&(c.parenthesizedAssign=-1),c.parenthesizedBind>=M.start&&(c.parenthesizedBind=-1),c.trailingComma>=M.start&&(c.trailingComma=-1)),M},fe.parseSubscripts=function(c,d,x,I,N){for(var M=this.options.ecmaVersion>=8&&c.type==="Identifier"&&c.name==="async"&&this.lastTokEnd===c.end&&!this.canInsertSemicolon()&&c.end-c.start===5&&this.potentialArrowAt===c.start,j=!1;;){var H=this.parseSubscript(c,d,x,I,M,j,N);if(H.optional&&(j=!0),H===c||H.type==="ArrowFunctionExpression"){if(j){var J=this.startNodeAt(d,x);J.expression=H,H=this.finishNode(J,"ChainExpression")}return H}c=H}},fe.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(_.arrow)},fe.parseSubscriptAsyncArrow=function(c,d,x,I){return this.parseArrowExpression(this.startNodeAt(c,d),x,!0,I)},fe.parseSubscript=function(c,d,x,I,N,M,j){var H=this.options.ecmaVersion>=11,J=H&&this.eat(_.questionDot);I&&J&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var ue=this.eat(_.bracketL);if(ue||J&&this.type!==_.parenL&&this.type!==_.backQuote||this.eat(_.dot)){var _e=this.startNodeAt(d,x);_e.object=c,ue?(_e.property=this.parseExpression(),this.expect(_.bracketR)):this.type===_.privateId&&c.type!=="Super"?_e.property=this.parsePrivateIdent():_e.property=this.parseIdent(this.options.allowReserved!=="never"),_e.computed=!!ue,H&&(_e.optional=J),c=this.finishNode(_e,"MemberExpression")}else if(!I&&this.eat(_.parenL)){var Ve=new nl,Jt=this.yieldPos,Po=this.awaitPos,ea=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var ll=this.parseExprList(_.parenR,this.options.ecmaVersion>=8,!1,Ve);if(N&&!J&&this.shouldParseAsyncArrow())return this.checkPatternErrors(Ve,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=Jt,this.awaitPos=Po,this.awaitIdentPos=ea,this.parseSubscriptAsyncArrow(d,x,ll,j);this.checkExpressionErrors(Ve,!0),this.yieldPos=Jt||this.yieldPos,this.awaitPos=Po||this.awaitPos,this.awaitIdentPos=ea||this.awaitIdentPos;var ta=this.startNodeAt(d,x);ta.callee=c,ta.arguments=ll,H&&(ta.optional=J),c=this.finishNode(ta,"CallExpression")}else if(this.type===_.backQuote){(J||M)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var ra=this.startNodeAt(d,x);ra.tag=c,ra.quasi=this.parseTemplate({isTagged:!0}),c=this.finishNode(ra,"TaggedTemplateExpression")}return c},fe.parseExprAtom=function(c,d,x){this.type===_.slash&&this.readRegexp();var I,N=this.potentialArrowAt===this.start;switch(this.type){case _._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),I=this.startNode(),this.next(),this.type===_.parenL&&!this.allowDirectSuper&&this.raise(I.start,"super() call outside constructor of a subclass"),this.type!==_.dot&&this.type!==_.bracketL&&this.type!==_.parenL&&this.unexpected(),this.finishNode(I,"Super");case _._this:return I=this.startNode(),this.next(),this.finishNode(I,"ThisExpression");case _.name:var M=this.start,j=this.startLoc,H=this.containsEsc,J=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!H&&J.name==="async"&&!this.canInsertSemicolon()&&this.eat(_._function))return this.overrideContext(Be.f_expr),this.parseFunction(this.startNodeAt(M,j),0,!1,!0,d);if(N&&!this.canInsertSemicolon()){if(this.eat(_.arrow))return this.parseArrowExpression(this.startNodeAt(M,j),[J],!1,d);if(this.options.ecmaVersion>=8&&J.name==="async"&&this.type===_.name&&!H&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return J=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(_.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(M,j),[J],!0,d)}return J;case _.regexp:var ue=this.value;return I=this.parseLiteral(ue.value),I.regex={pattern:ue.pattern,flags:ue.flags},I;case _.num:case _.string:return this.parseLiteral(this.value);case _._null:case _._true:case _._false:return I=this.startNode(),I.value=this.type===_._null?null:this.type===_._true,I.raw=this.type.keyword,this.next(),this.finishNode(I,"Literal");case _.parenL:var _e=this.start,Ve=this.parseParenAndDistinguishExpression(N,d);return c&&(c.parenthesizedAssign<0&&!this.isSimpleAssignTarget(Ve)&&(c.parenthesizedAssign=_e),c.parenthesizedBind<0&&(c.parenthesizedBind=_e)),Ve;case _.bracketL:return I=this.startNode(),this.next(),I.elements=this.parseExprList(_.bracketR,!0,!0,c),this.finishNode(I,"ArrayExpression");case _.braceL:return this.overrideContext(Be.b_expr),this.parseObj(!1,c);case _._function:return I=this.startNode(),this.next(),this.parseFunction(I,0);case _._class:return this.parseClass(this.startNode(),!1);case _._new:return this.parseNew();case _.backQuote:return this.parseTemplate();case _._import:return this.options.ecmaVersion>=11?this.parseExprImport(x):this.unexpected();default:return this.parseExprAtomDefault()}},fe.parseExprAtomDefault=function(){this.unexpected()},fe.parseExprImport=function(c){var d=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===_.parenL&&!c)return this.parseDynamicImport(d);if(this.type===_.dot){var x=this.startNodeAt(d.start,d.loc&&d.loc.start);return x.name="import",d.meta=this.finishNode(x,"Identifier"),this.parseImportMeta(d)}else this.unexpected()},fe.parseDynamicImport=function(c){if(this.next(),c.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(_.parenR)?c.options=null:(this.expect(_.comma),this.afterTrailingComma(_.parenR)?c.options=null:(c.options=this.parseMaybeAssign(),this.eat(_.parenR)||(this.expect(_.comma),this.afterTrailingComma(_.parenR)||this.unexpected())));else if(!this.eat(_.parenR)){var d=this.start;this.eat(_.comma)&&this.eat(_.parenR)?this.raiseRecoverable(d,"Trailing comma is not allowed in import()"):this.unexpected(d)}return this.finishNode(c,"ImportExpression")},fe.parseImportMeta=function(c){this.next();var d=this.containsEsc;return c.property=this.parseIdent(!0),c.property.name!=="meta"&&this.raiseRecoverable(c.property.start,"The only valid meta property for import is 'import.meta'"),d&&this.raiseRecoverable(c.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(c.start,"Cannot use 'import.meta' outside a module"),this.finishNode(c,"MetaProperty")},fe.parseLiteral=function(c){var d=this.startNode();return d.value=c,d.raw=this.input.slice(this.start,this.end),d.raw.charCodeAt(d.raw.length-1)===110&&(d.bigint=d.value!=null?d.value.toString():d.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(d,"Literal")},fe.parseParenExpression=function(){this.expect(_.parenL);var c=this.parseExpression();return this.expect(_.parenR),c},fe.shouldParseArrow=function(c){return!this.canInsertSemicolon()},fe.parseParenAndDistinguishExpression=function(c,d){var x=this.start,I=this.startLoc,N,M=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var j=this.start,H=this.startLoc,J=[],ue=!0,_e=!1,Ve=new nl,Jt=this.yieldPos,Po=this.awaitPos,ea;for(this.yieldPos=0,this.awaitPos=0;this.type!==_.parenR;)if(ue?ue=!1:this.expect(_.comma),M&&this.afterTrailingComma(_.parenR,!0)){_e=!0;break}else if(this.type===_.ellipsis){ea=this.start,J.push(this.parseParenItem(this.parseRestBinding())),this.type===_.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else J.push(this.parseMaybeAssign(!1,Ve,this.parseParenItem));var ll=this.lastTokEnd,ta=this.lastTokEndLoc;if(this.expect(_.parenR),c&&this.shouldParseArrow(J)&&this.eat(_.arrow))return this.checkPatternErrors(Ve,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=Jt,this.awaitPos=Po,this.parseParenArrowList(x,I,J,d);(!J.length||_e)&&this.unexpected(this.lastTokStart),ea&&this.unexpected(ea),this.checkExpressionErrors(Ve,!0),this.yieldPos=Jt||this.yieldPos,this.awaitPos=Po||this.awaitPos,J.length>1?(N=this.startNodeAt(j,H),N.expressions=J,this.finishNodeAt(N,"SequenceExpression",ll,ta)):N=J[0]}else N=this.parseParenExpression();if(this.options.preserveParens){var ra=this.startNodeAt(x,I);return ra.expression=N,this.finishNode(ra,"ParenthesizedExpression")}else return N},fe.parseParenItem=function(c){return c},fe.parseParenArrowList=function(c,d,x,I){return this.parseArrowExpression(this.startNodeAt(c,d),x,!1,I)};var DF=[];fe.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var c=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===_.dot){var d=this.startNodeAt(c.start,c.loc&&c.loc.start);d.name="new",c.meta=this.finishNode(d,"Identifier"),this.next();var x=this.containsEsc;return c.property=this.parseIdent(!0),c.property.name!=="target"&&this.raiseRecoverable(c.property.start,"The only valid meta property for new is 'new.target'"),x&&this.raiseRecoverable(c.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(c.start,"'new.target' can only be used in functions and class static block"),this.finishNode(c,"MetaProperty")}var I=this.start,N=this.startLoc;return c.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),I,N,!0,!1),this.eat(_.parenL)?c.arguments=this.parseExprList(_.parenR,this.options.ecmaVersion>=8,!1):c.arguments=DF,this.finishNode(c,"NewExpression")},fe.parseTemplateElement=function(c){var d=c.isTagged,x=this.startNode();return this.type===_.invalidTemplate?(d||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),x.value={raw:this.value.replace(/\r\n?/g,`
|
|
1201
|
+
`),cooked:null}):x.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
|
|
1202
|
+
`),cooked:this.value},this.next(),x.tail=this.type===_.backQuote,this.finishNode(x,"TemplateElement")},fe.parseTemplate=function(c){c===void 0&&(c={});var d=c.isTagged;d===void 0&&(d=!1);var x=this.startNode();this.next(),x.expressions=[];var I=this.parseTemplateElement({isTagged:d});for(x.quasis=[I];!I.tail;)this.type===_.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(_.dollarBraceL),x.expressions.push(this.parseExpression()),this.expect(_.braceR),x.quasis.push(I=this.parseTemplateElement({isTagged:d}));return this.next(),this.finishNode(x,"TemplateLiteral")},fe.isAsyncProp=function(c){return!c.computed&&c.key.type==="Identifier"&&c.key.name==="async"&&(this.type===_.name||this.type===_.num||this.type===_.string||this.type===_.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===_.star)&&!A.test(this.input.slice(this.lastTokEnd,this.start))},fe.parseObj=function(c,d){var x=this.startNode(),I=!0,N={};for(x.properties=[],this.next();!this.eat(_.braceR);){if(I)I=!1;else if(this.expect(_.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(_.braceR))break;var M=this.parseProperty(c,d);c||this.checkPropClash(M,N,d),x.properties.push(M)}return this.finishNode(x,c?"ObjectPattern":"ObjectExpression")},fe.parseProperty=function(c,d){var x=this.startNode(),I,N,M,j;if(this.options.ecmaVersion>=9&&this.eat(_.ellipsis))return c?(x.argument=this.parseIdent(!1),this.type===_.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(x,"RestElement")):(x.argument=this.parseMaybeAssign(!1,d),this.type===_.comma&&d&&d.trailingComma<0&&(d.trailingComma=this.start),this.finishNode(x,"SpreadElement"));this.options.ecmaVersion>=6&&(x.method=!1,x.shorthand=!1,(c||d)&&(M=this.start,j=this.startLoc),c||(I=this.eat(_.star)));var H=this.containsEsc;return this.parsePropertyName(x),!c&&!H&&this.options.ecmaVersion>=8&&!I&&this.isAsyncProp(x)?(N=!0,I=this.options.ecmaVersion>=9&&this.eat(_.star),this.parsePropertyName(x)):N=!1,this.parsePropertyValue(x,c,I,N,M,j,d,H),this.finishNode(x,"Property")},fe.parseGetterSetter=function(c){var d=c.key.name;this.parsePropertyName(c),c.value=this.parseMethod(!1),c.kind=d;var x=c.kind==="get"?0:1;if(c.value.params.length!==x){var I=c.value.start;c.kind==="get"?this.raiseRecoverable(I,"getter should have no params"):this.raiseRecoverable(I,"setter should have exactly one param")}else c.kind==="set"&&c.value.params[0].type==="RestElement"&&this.raiseRecoverable(c.value.params[0].start,"Setter cannot use rest params")},fe.parsePropertyValue=function(c,d,x,I,N,M,j,H){(x||I)&&this.type===_.colon&&this.unexpected(),this.eat(_.colon)?(c.value=d?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,j),c.kind="init"):this.options.ecmaVersion>=6&&this.type===_.parenL?(d&&this.unexpected(),c.method=!0,c.value=this.parseMethod(x,I),c.kind="init"):!d&&!H&&this.options.ecmaVersion>=5&&!c.computed&&c.key.type==="Identifier"&&(c.key.name==="get"||c.key.name==="set")&&this.type!==_.comma&&this.type!==_.braceR&&this.type!==_.eq?((x||I)&&this.unexpected(),this.parseGetterSetter(c)):this.options.ecmaVersion>=6&&!c.computed&&c.key.type==="Identifier"?((x||I)&&this.unexpected(),this.checkUnreserved(c.key),c.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=N),d?c.value=this.parseMaybeDefault(N,M,this.copyNode(c.key)):this.type===_.eq&&j?(j.shorthandAssign<0&&(j.shorthandAssign=this.start),c.value=this.parseMaybeDefault(N,M,this.copyNode(c.key))):c.value=this.copyNode(c.key),c.kind="init",c.shorthand=!0):this.unexpected()},fe.parsePropertyName=function(c){if(this.options.ecmaVersion>=6){if(this.eat(_.bracketL))return c.computed=!0,c.key=this.parseMaybeAssign(),this.expect(_.bracketR),c.key;c.computed=!1}return c.key=this.type===_.num||this.type===_.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")},fe.initFunction=function(c){c.id=null,this.options.ecmaVersion>=6&&(c.generator=c.expression=!1),this.options.ecmaVersion>=8&&(c.async=!1)},fe.parseMethod=function(c,d,x){var I=this.startNode(),N=this.yieldPos,M=this.awaitPos,j=this.awaitIdentPos;return this.initFunction(I),this.options.ecmaVersion>=6&&(I.generator=c),this.options.ecmaVersion>=8&&(I.async=!!d),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Gm(d,I.generator)|tl|(x?$1:0)),this.expect(_.parenL),I.params=this.parseBindingList(_.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(I,!1,!0,!1),this.yieldPos=N,this.awaitPos=M,this.awaitIdentPos=j,this.finishNode(I,"FunctionExpression")},fe.parseArrowExpression=function(c,d,x,I){var N=this.yieldPos,M=this.awaitPos,j=this.awaitIdentPos;return this.enterScope(Gm(x,!1)|Hm),this.initFunction(c),this.options.ecmaVersion>=8&&(c.async=!!x),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,c.params=this.toAssignableList(d,!0),this.parseFunctionBody(c,!0,!1,I),this.yieldPos=N,this.awaitPos=M,this.awaitIdentPos=j,this.finishNode(c,"ArrowFunctionExpression")},fe.parseFunctionBody=function(c,d,x,I){var N=d&&this.type!==_.braceL,M=this.strict,j=!1;if(N)c.body=this.parseMaybeAssign(I),c.expression=!0,this.checkParams(c,!1);else{var H=this.options.ecmaVersion>=7&&!this.isSimpleParamList(c.params);(!M||H)&&(j=this.strictDirective(this.end),j&&H&&this.raiseRecoverable(c.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var J=this.labels;this.labels=[],j&&(this.strict=!0),this.checkParams(c,!M&&!j&&!d&&!x&&this.isSimpleParamList(c.params)),this.strict&&c.id&&this.checkLValSimple(c.id,W1),c.body=this.parseBlock(!1,void 0,j&&!M),c.expression=!1,this.adaptDirectivePrologue(c.body.body),this.labels=J}this.exitScope()},fe.isSimpleParamList=function(c){for(var d=0,x=c;d<x.length;d+=1){var I=x[d];if(I.type!=="Identifier")return!1}return!0},fe.checkParams=function(c,d){for(var x=Object.create(null),I=0,N=c.params;I<N.length;I+=1){var M=N[I];this.checkLValInnerPattern(M,Wm,d?null:x)}},fe.parseExprList=function(c,d,x,I){for(var N=[],M=!0;!this.eat(c);){if(M)M=!1;else if(this.expect(_.comma),d&&this.afterTrailingComma(c))break;var j=void 0;x&&this.type===_.comma?j=null:this.type===_.ellipsis?(j=this.parseSpread(I),I&&this.type===_.comma&&I.trailingComma<0&&(I.trailingComma=this.start)):j=this.parseMaybeAssign(!1,I),N.push(j)}return N},fe.checkUnreserved=function(c){var d=c.start,x=c.end,I=c.name;if(this.inGenerator&&I==="yield"&&this.raiseRecoverable(d,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&I==="await"&&this.raiseRecoverable(d,"Cannot use 'await' as identifier inside an async function"),!(this.currentThisScope().flags&rl)&&I==="arguments"&&this.raiseRecoverable(d,"Cannot use 'arguments' in class field initializer"),this.inClassStaticBlock&&(I==="arguments"||I==="await")&&this.raise(d,"Cannot use "+I+" in class static initialization block"),this.keywords.test(I)&&this.raise(d,"Unexpected keyword '"+I+"'"),!(this.options.ecmaVersion<6&&this.input.slice(d,x).indexOf("\\")!==-1)){var N=this.strict?this.reservedWordsStrict:this.reservedWords;N.test(I)&&(!this.inAsync&&I==="await"&&this.raiseRecoverable(d,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(d,"The keyword '"+I+"' is reserved"))}},fe.parseIdent=function(c){var d=this.parseIdentNode();return this.next(!!c),this.finishNode(d,"Identifier"),c||(this.checkUnreserved(d),d.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=d.start)),d},fe.parseIdentNode=function(){var c=this.startNode();return this.type===_.name?c.name=this.value:this.type.keyword?(c.name=this.type.keyword,(c.name==="class"||c.name==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46)&&this.context.pop(),this.type=_.name):this.unexpected(),c},fe.parsePrivateIdent=function(){var c=this.startNode();return this.type===_.privateId?c.name=this.value:this.unexpected(),this.next(),this.finishNode(c,"PrivateIdentifier"),this.options.checkPrivateFields&&(this.privateNameStack.length===0?this.raise(c.start,"Private field '#"+c.name+"' must be declared in an enclosing class"):this.privateNameStack[this.privateNameStack.length-1].used.push(c)),c},fe.parseYield=function(c){this.yieldPos||(this.yieldPos=this.start);var d=this.startNode();return this.next(),this.type===_.semi||this.canInsertSemicolon()||this.type!==_.star&&!this.type.startsExpr?(d.delegate=!1,d.argument=null):(d.delegate=this.eat(_.star),d.argument=this.parseMaybeAssign(c)),this.finishNode(d,"YieldExpression")},fe.parseAwait=function(c){this.awaitPos||(this.awaitPos=this.start);var d=this.startNode();return this.next(),d.argument=this.parseMaybeUnary(null,!0,!1,c),this.finishNode(d,"AwaitExpression")};var al=Xe.prototype;al.raise=function(c,d){var x=ye(this.input,c);d+=" ("+x.line+":"+x.column+")",this.sourceFile&&(d+=" in "+this.sourceFile);var I=new SyntaxError(d);throw I.pos=c,I.loc=x,I.raisedAt=this.pos,I},al.raiseRecoverable=al.raise,al.curPosition=function(){if(this.options.locations)return new K(this.curLine,this.pos-this.lineStart)};var dn=Xe.prototype,FF=function(d){this.flags=d,this.var=[],this.lexical=[],this.functions=[]};dn.enterScope=function(c){this.scopeStack.push(new FF(c))},dn.exitScope=function(){this.scopeStack.pop()},dn.treatFunctionsAsVarInScope=function(c){return c.flags&es||!this.inModule&&c.flags&Zn},dn.declareName=function(c,d,x){var I=!1;if(d===$i){var N=this.currentScope();I=N.lexical.indexOf(c)>-1||N.functions.indexOf(c)>-1||N.var.indexOf(c)>-1,N.lexical.push(c),this.inModule&&N.flags&Zn&&delete this.undefinedExports[c]}else if(d===G1){var M=this.currentScope();M.lexical.push(c)}else if(d===H1){var j=this.currentScope();this.treatFunctionsAsVar?I=j.lexical.indexOf(c)>-1:I=j.lexical.indexOf(c)>-1||j.var.indexOf(c)>-1,j.functions.push(c)}else for(var H=this.scopeStack.length-1;H>=0;--H){var J=this.scopeStack[H];if(J.lexical.indexOf(c)>-1&&!(J.flags&V1&&J.lexical[0]===c)||!this.treatFunctionsAsVarInScope(J)&&J.functions.indexOf(c)>-1){I=!0;break}if(J.var.push(c),this.inModule&&J.flags&Zn&&delete this.undefinedExports[c],J.flags&rl)break}I&&this.raiseRecoverable(x,"Identifier '"+c+"' has already been declared")},dn.checkLocalExport=function(c){this.scopeStack[0].lexical.indexOf(c.name)===-1&&this.scopeStack[0].var.indexOf(c.name)===-1&&(this.undefinedExports[c.name]=c)},dn.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},dn.currentVarScope=function(){for(var c=this.scopeStack.length-1;;c--){var d=this.scopeStack[c];if(d.flags&(rl|Eo|ts))return d}},dn.currentThisScope=function(){for(var c=this.scopeStack.length-1;;c--){var d=this.scopeStack[c];if(d.flags&(rl|Eo|ts)&&!(d.flags&Hm))return d}};var No=function(d,x,I){this.type="",this.start=x,this.end=0,d.options.locations&&(this.loc=new pe(d,I)),d.options.directSourceFile&&(this.sourceFile=d.options.directSourceFile),d.options.ranges&&(this.range=[x,0])},Lo=Xe.prototype;Lo.startNode=function(){return new No(this,this.start,this.startLoc)},Lo.startNodeAt=function(c,d){return new No(this,c,d)};function K1(c,d,x,I){return c.type=d,c.end=x,this.options.locations&&(c.loc.end=I),this.options.ranges&&(c.range[1]=x),c}Lo.finishNode=function(c,d){return K1.call(this,c,d,this.lastTokEnd,this.lastTokEndLoc)},Lo.finishNodeAt=function(c,d,x,I){return K1.call(this,c,d,x,I)},Lo.copyNode=function(c){var d=new No(this,c.start,this.startLoc);for(var x in c)d[x]=c[x];return d};var jF="Berf Beria_Erfe Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sidetic Sidt Sunu Sunuwar Tai_Yo Tayo Todhri Todr Tolong_Siki Tols Tulu_Tigalari Tutg Unknown Zzzz",Q1="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",Y1=Q1+" Extended_Pictographic",X1=Y1,Z1=X1+" EBase EComp EMod EPres ExtPict",ew=Z1,BF=ew,VF={9:Q1,10:Y1,11:X1,12:Z1,13:ew,14:BF},$F="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",UF={9:"",10:"",11:"",12:"",13:"",14:$F},tw="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",rw="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",iw=rw+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",nw=iw+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",sw=nw+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",aw=sw+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",HF=aw+" "+jF,GF={9:rw,10:iw,11:nw,12:sw,13:aw,14:HF},ow={};function WF(c){var d=ow[c]={binary:U(VF[c]+" "+tw),binaryOfStrings:U(UF[c]),nonBinary:{General_Category:U(tw),Script:U(GF[c])}};d.nonBinary.Script_Extensions=d.nonBinary.Script,d.nonBinary.gc=d.nonBinary.General_Category,d.nonBinary.sc=d.nonBinary.Script,d.nonBinary.scx=d.nonBinary.Script_Extensions}for(var Qm=0,uw=[9,10,11,12,13,14];Qm<uw.length;Qm+=1){var zF=uw[Qm];WF(zF)}var te=Xe.prototype,ol=function(d,x){this.parent=d,this.base=x||this};ol.prototype.separatedFrom=function(d){for(var x=this;x;x=x.parent)for(var I=d;I;I=I.parent)if(x.base===I.base&&x!==I)return!0;return!1},ol.prototype.sibling=function(){return new ol(this.parent,this.base)};var wi=function(d){this.parser=d,this.validFlags="gim"+(d.options.ecmaVersion>=6?"uy":"")+(d.options.ecmaVersion>=9?"s":"")+(d.options.ecmaVersion>=13?"d":"")+(d.options.ecmaVersion>=15?"v":""),this.unicodeProperties=ow[d.options.ecmaVersion>=14?14:d.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};wi.prototype.reset=function(d,x,I){var N=I.indexOf("v")!==-1,M=I.indexOf("u")!==-1;this.start=d|0,this.source=x+"",this.flags=I,N&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=M&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=M&&this.parser.options.ecmaVersion>=9)},wi.prototype.raise=function(d){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+d)},wi.prototype.at=function(d,x){x===void 0&&(x=!1);var I=this.source,N=I.length;if(d>=N)return-1;var M=I.charCodeAt(d);if(!(x||this.switchU)||M<=55295||M>=57344||d+1>=N)return M;var j=I.charCodeAt(d+1);return j>=56320&&j<=57343?(M<<10)+j-56613888:M},wi.prototype.nextIndex=function(d,x){x===void 0&&(x=!1);var I=this.source,N=I.length;if(d>=N)return N;var M=I.charCodeAt(d),j;return!(x||this.switchU)||M<=55295||M>=57344||d+1>=N||(j=I.charCodeAt(d+1))<56320||j>57343?d+1:d+2},wi.prototype.current=function(d){return d===void 0&&(d=!1),this.at(this.pos,d)},wi.prototype.lookahead=function(d){return d===void 0&&(d=!1),this.at(this.nextIndex(this.pos,d),d)},wi.prototype.advance=function(d){d===void 0&&(d=!1),this.pos=this.nextIndex(this.pos,d)},wi.prototype.eat=function(d,x){return x===void 0&&(x=!1),this.current(x)===d?(this.advance(x),!0):!1},wi.prototype.eatChars=function(d,x){x===void 0&&(x=!1);for(var I=this.pos,N=0,M=d;N<M.length;N+=1){var j=M[N],H=this.at(I,x);if(H===-1||H!==j)return!1;I=this.nextIndex(I,x)}return this.pos=I,!0},te.validateRegExpFlags=function(c){for(var d=c.validFlags,x=c.flags,I=!1,N=!1,M=0;M<x.length;M++){var j=x.charAt(M);d.indexOf(j)===-1&&this.raise(c.start,"Invalid regular expression flag"),x.indexOf(j,M+1)>-1&&this.raise(c.start,"Duplicate regular expression flag"),j==="u"&&(I=!0),j==="v"&&(N=!0)}this.options.ecmaVersion>=15&&I&&N&&this.raise(c.start,"Invalid regular expression flag")};function JF(c){for(var d in c)return!0;return!1}te.validateRegExpPattern=function(c){this.regexp_pattern(c),!c.switchN&&this.options.ecmaVersion>=9&&JF(c.groupNames)&&(c.switchN=!0,this.regexp_pattern(c))},te.regexp_pattern=function(c){c.pos=0,c.lastIntValue=0,c.lastStringValue="",c.lastAssertionIsQuantifiable=!1,c.numCapturingParens=0,c.maxBackReference=0,c.groupNames=Object.create(null),c.backReferenceNames.length=0,c.branchID=null,this.regexp_disjunction(c),c.pos!==c.source.length&&(c.eat(41)&&c.raise("Unmatched ')'"),(c.eat(93)||c.eat(125))&&c.raise("Lone quantifier brackets")),c.maxBackReference>c.numCapturingParens&&c.raise("Invalid escape");for(var d=0,x=c.backReferenceNames;d<x.length;d+=1){var I=x[d];c.groupNames[I]||c.raise("Invalid named capture referenced")}},te.regexp_disjunction=function(c){var d=this.options.ecmaVersion>=16;for(d&&(c.branchID=new ol(c.branchID,null)),this.regexp_alternative(c);c.eat(124);)d&&(c.branchID=c.branchID.sibling()),this.regexp_alternative(c);d&&(c.branchID=c.branchID.parent),this.regexp_eatQuantifier(c,!0)&&c.raise("Nothing to repeat"),c.eat(123)&&c.raise("Lone quantifier brackets")},te.regexp_alternative=function(c){for(;c.pos<c.source.length&&this.regexp_eatTerm(c););},te.regexp_eatTerm=function(c){return this.regexp_eatAssertion(c)?(c.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(c)&&c.switchU&&c.raise("Invalid quantifier"),!0):(c.switchU?this.regexp_eatAtom(c):this.regexp_eatExtendedAtom(c))?(this.regexp_eatQuantifier(c),!0):!1},te.regexp_eatAssertion=function(c){var d=c.pos;if(c.lastAssertionIsQuantifiable=!1,c.eat(94)||c.eat(36))return!0;if(c.eat(92)){if(c.eat(66)||c.eat(98))return!0;c.pos=d}if(c.eat(40)&&c.eat(63)){var x=!1;if(this.options.ecmaVersion>=9&&(x=c.eat(60)),c.eat(61)||c.eat(33))return this.regexp_disjunction(c),c.eat(41)||c.raise("Unterminated group"),c.lastAssertionIsQuantifiable=!x,!0}return c.pos=d,!1},te.regexp_eatQuantifier=function(c,d){return d===void 0&&(d=!1),this.regexp_eatQuantifierPrefix(c,d)?(c.eat(63),!0):!1},te.regexp_eatQuantifierPrefix=function(c,d){return c.eat(42)||c.eat(43)||c.eat(63)||this.regexp_eatBracedQuantifier(c,d)},te.regexp_eatBracedQuantifier=function(c,d){var x=c.pos;if(c.eat(123)){var I=0,N=-1;if(this.regexp_eatDecimalDigits(c)&&(I=c.lastIntValue,c.eat(44)&&this.regexp_eatDecimalDigits(c)&&(N=c.lastIntValue),c.eat(125)))return N!==-1&&N<I&&!d&&c.raise("numbers out of order in {} quantifier"),!0;c.switchU&&!d&&c.raise("Incomplete quantifier"),c.pos=x}return!1},te.regexp_eatAtom=function(c){return this.regexp_eatPatternCharacters(c)||c.eat(46)||this.regexp_eatReverseSolidusAtomEscape(c)||this.regexp_eatCharacterClass(c)||this.regexp_eatUncapturingGroup(c)||this.regexp_eatCapturingGroup(c)},te.regexp_eatReverseSolidusAtomEscape=function(c){var d=c.pos;if(c.eat(92)){if(this.regexp_eatAtomEscape(c))return!0;c.pos=d}return!1},te.regexp_eatUncapturingGroup=function(c){var d=c.pos;if(c.eat(40)){if(c.eat(63)){if(this.options.ecmaVersion>=16){var x=this.regexp_eatModifiers(c),I=c.eat(45);if(x||I){for(var N=0;N<x.length;N++){var M=x.charAt(N);x.indexOf(M,N+1)>-1&&c.raise("Duplicate regular expression modifiers")}if(I){var j=this.regexp_eatModifiers(c);!x&&!j&&c.current()===58&&c.raise("Invalid regular expression modifiers");for(var H=0;H<j.length;H++){var J=j.charAt(H);(j.indexOf(J,H+1)>-1||x.indexOf(J)>-1)&&c.raise("Duplicate regular expression modifiers")}}}}if(c.eat(58)){if(this.regexp_disjunction(c),c.eat(41))return!0;c.raise("Unterminated group")}}c.pos=d}return!1},te.regexp_eatCapturingGroup=function(c){if(c.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(c):c.current()===63&&c.raise("Invalid group"),this.regexp_disjunction(c),c.eat(41))return c.numCapturingParens+=1,!0;c.raise("Unterminated group")}return!1},te.regexp_eatModifiers=function(c){for(var d="",x=0;(x=c.current())!==-1&&KF(x);)d+=W(x),c.advance();return d};function KF(c){return c===105||c===109||c===115}te.regexp_eatExtendedAtom=function(c){return c.eat(46)||this.regexp_eatReverseSolidusAtomEscape(c)||this.regexp_eatCharacterClass(c)||this.regexp_eatUncapturingGroup(c)||this.regexp_eatCapturingGroup(c)||this.regexp_eatInvalidBracedQuantifier(c)||this.regexp_eatExtendedPatternCharacter(c)},te.regexp_eatInvalidBracedQuantifier=function(c){return this.regexp_eatBracedQuantifier(c,!0)&&c.raise("Nothing to repeat"),!1},te.regexp_eatSyntaxCharacter=function(c){var d=c.current();return cw(d)?(c.lastIntValue=d,c.advance(),!0):!1};function cw(c){return c===36||c>=40&&c<=43||c===46||c===63||c>=91&&c<=94||c>=123&&c<=125}te.regexp_eatPatternCharacters=function(c){for(var d=c.pos,x=0;(x=c.current())!==-1&&!cw(x);)c.advance();return c.pos!==d},te.regexp_eatExtendedPatternCharacter=function(c){var d=c.current();return d!==-1&&d!==36&&!(d>=40&&d<=43)&&d!==46&&d!==63&&d!==91&&d!==94&&d!==124?(c.advance(),!0):!1},te.regexp_groupSpecifier=function(c){if(c.eat(63)){this.regexp_eatGroupName(c)||c.raise("Invalid group");var d=this.options.ecmaVersion>=16,x=c.groupNames[c.lastStringValue];if(x)if(d)for(var I=0,N=x;I<N.length;I+=1){var M=N[I];M.separatedFrom(c.branchID)||c.raise("Duplicate capture group name")}else c.raise("Duplicate capture group name");d?(x||(c.groupNames[c.lastStringValue]=[])).push(c.branchID):c.groupNames[c.lastStringValue]=!0}},te.regexp_eatGroupName=function(c){if(c.lastStringValue="",c.eat(60)){if(this.regexp_eatRegExpIdentifierName(c)&&c.eat(62))return!0;c.raise("Invalid capture group name")}return!1},te.regexp_eatRegExpIdentifierName=function(c){if(c.lastStringValue="",this.regexp_eatRegExpIdentifierStart(c)){for(c.lastStringValue+=W(c.lastIntValue);this.regexp_eatRegExpIdentifierPart(c);)c.lastStringValue+=W(c.lastIntValue);return!0}return!1},te.regexp_eatRegExpIdentifierStart=function(c){var d=c.pos,x=this.options.ecmaVersion>=11,I=c.current(x);return c.advance(x),I===92&&this.regexp_eatRegExpUnicodeEscapeSequence(c,x)&&(I=c.lastIntValue),QF(I)?(c.lastIntValue=I,!0):(c.pos=d,!1)};function QF(c){return p(c,!0)||c===36||c===95}te.regexp_eatRegExpIdentifierPart=function(c){var d=c.pos,x=this.options.ecmaVersion>=11,I=c.current(x);return c.advance(x),I===92&&this.regexp_eatRegExpUnicodeEscapeSequence(c,x)&&(I=c.lastIntValue),YF(I)?(c.lastIntValue=I,!0):(c.pos=d,!1)};function YF(c){return m(c,!0)||c===36||c===95||c===8204||c===8205}te.regexp_eatAtomEscape=function(c){return this.regexp_eatBackReference(c)||this.regexp_eatCharacterClassEscape(c)||this.regexp_eatCharacterEscape(c)||c.switchN&&this.regexp_eatKGroupName(c)?!0:(c.switchU&&(c.current()===99&&c.raise("Invalid unicode escape"),c.raise("Invalid escape")),!1)},te.regexp_eatBackReference=function(c){var d=c.pos;if(this.regexp_eatDecimalEscape(c)){var x=c.lastIntValue;if(c.switchU)return x>c.maxBackReference&&(c.maxBackReference=x),!0;if(x<=c.numCapturingParens)return!0;c.pos=d}return!1},te.regexp_eatKGroupName=function(c){if(c.eat(107)){if(this.regexp_eatGroupName(c))return c.backReferenceNames.push(c.lastStringValue),!0;c.raise("Invalid named reference")}return!1},te.regexp_eatCharacterEscape=function(c){return this.regexp_eatControlEscape(c)||this.regexp_eatCControlLetter(c)||this.regexp_eatZero(c)||this.regexp_eatHexEscapeSequence(c)||this.regexp_eatRegExpUnicodeEscapeSequence(c,!1)||!c.switchU&&this.regexp_eatLegacyOctalEscapeSequence(c)||this.regexp_eatIdentityEscape(c)},te.regexp_eatCControlLetter=function(c){var d=c.pos;if(c.eat(99)){if(this.regexp_eatControlLetter(c))return!0;c.pos=d}return!1},te.regexp_eatZero=function(c){return c.current()===48&&!ul(c.lookahead())?(c.lastIntValue=0,c.advance(),!0):!1},te.regexp_eatControlEscape=function(c){var d=c.current();return d===116?(c.lastIntValue=9,c.advance(),!0):d===110?(c.lastIntValue=10,c.advance(),!0):d===118?(c.lastIntValue=11,c.advance(),!0):d===102?(c.lastIntValue=12,c.advance(),!0):d===114?(c.lastIntValue=13,c.advance(),!0):!1},te.regexp_eatControlLetter=function(c){var d=c.current();return lw(d)?(c.lastIntValue=d%32,c.advance(),!0):!1};function lw(c){return c>=65&&c<=90||c>=97&&c<=122}te.regexp_eatRegExpUnicodeEscapeSequence=function(c,d){d===void 0&&(d=!1);var x=c.pos,I=d||c.switchU;if(c.eat(117)){if(this.regexp_eatFixedHexDigits(c,4)){var N=c.lastIntValue;if(I&&N>=55296&&N<=56319){var M=c.pos;if(c.eat(92)&&c.eat(117)&&this.regexp_eatFixedHexDigits(c,4)){var j=c.lastIntValue;if(j>=56320&&j<=57343)return c.lastIntValue=(N-55296)*1024+(j-56320)+65536,!0}c.pos=M,c.lastIntValue=N}return!0}if(I&&c.eat(123)&&this.regexp_eatHexDigits(c)&&c.eat(125)&&XF(c.lastIntValue))return!0;I&&c.raise("Invalid unicode escape"),c.pos=x}return!1};function XF(c){return c>=0&&c<=1114111}te.regexp_eatIdentityEscape=function(c){if(c.switchU)return this.regexp_eatSyntaxCharacter(c)?!0:c.eat(47)?(c.lastIntValue=47,!0):!1;var d=c.current();return d!==99&&(!c.switchN||d!==107)?(c.lastIntValue=d,c.advance(),!0):!1},te.regexp_eatDecimalEscape=function(c){c.lastIntValue=0;var d=c.current();if(d>=49&&d<=57){do c.lastIntValue=10*c.lastIntValue+(d-48),c.advance();while((d=c.current())>=48&&d<=57);return!0}return!1};var fw=0,Ui=1,Gr=2;te.regexp_eatCharacterClassEscape=function(c){var d=c.current();if(ZF(d))return c.lastIntValue=-1,c.advance(),Ui;var x=!1;if(c.switchU&&this.options.ecmaVersion>=9&&((x=d===80)||d===112)){c.lastIntValue=-1,c.advance();var I;if(c.eat(123)&&(I=this.regexp_eatUnicodePropertyValueExpression(c))&&c.eat(125))return x&&I===Gr&&c.raise("Invalid property name"),I;c.raise("Invalid property name")}return fw};function ZF(c){return c===100||c===68||c===115||c===83||c===119||c===87}te.regexp_eatUnicodePropertyValueExpression=function(c){var d=c.pos;if(this.regexp_eatUnicodePropertyName(c)&&c.eat(61)){var x=c.lastStringValue;if(this.regexp_eatUnicodePropertyValue(c)){var I=c.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(c,x,I),Ui}}if(c.pos=d,this.regexp_eatLoneUnicodePropertyNameOrValue(c)){var N=c.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(c,N)}return fw},te.regexp_validateUnicodePropertyNameAndValue=function(c,d,x){V(c.unicodeProperties.nonBinary,d)||c.raise("Invalid property name"),c.unicodeProperties.nonBinary[d].test(x)||c.raise("Invalid property value")},te.regexp_validateUnicodePropertyNameOrValue=function(c,d){if(c.unicodeProperties.binary.test(d))return Ui;if(c.switchV&&c.unicodeProperties.binaryOfStrings.test(d))return Gr;c.raise("Invalid property name")},te.regexp_eatUnicodePropertyName=function(c){var d=0;for(c.lastStringValue="";pw(d=c.current());)c.lastStringValue+=W(d),c.advance();return c.lastStringValue!==""};function pw(c){return lw(c)||c===95}te.regexp_eatUnicodePropertyValue=function(c){var d=0;for(c.lastStringValue="";e4(d=c.current());)c.lastStringValue+=W(d),c.advance();return c.lastStringValue!==""};function e4(c){return pw(c)||ul(c)}te.regexp_eatLoneUnicodePropertyNameOrValue=function(c){return this.regexp_eatUnicodePropertyValue(c)},te.regexp_eatCharacterClass=function(c){if(c.eat(91)){var d=c.eat(94),x=this.regexp_classContents(c);return c.eat(93)||c.raise("Unterminated character class"),d&&x===Gr&&c.raise("Negated character class may contain strings"),!0}return!1},te.regexp_classContents=function(c){return c.current()===93?Ui:c.switchV?this.regexp_classSetExpression(c):(this.regexp_nonEmptyClassRanges(c),Ui)},te.regexp_nonEmptyClassRanges=function(c){for(;this.regexp_eatClassAtom(c);){var d=c.lastIntValue;if(c.eat(45)&&this.regexp_eatClassAtom(c)){var x=c.lastIntValue;c.switchU&&(d===-1||x===-1)&&c.raise("Invalid character class"),d!==-1&&x!==-1&&d>x&&c.raise("Range out of order in character class")}}},te.regexp_eatClassAtom=function(c){var d=c.pos;if(c.eat(92)){if(this.regexp_eatClassEscape(c))return!0;if(c.switchU){var x=c.current();(x===99||mw(x))&&c.raise("Invalid class escape"),c.raise("Invalid escape")}c.pos=d}var I=c.current();return I!==93?(c.lastIntValue=I,c.advance(),!0):!1},te.regexp_eatClassEscape=function(c){var d=c.pos;if(c.eat(98))return c.lastIntValue=8,!0;if(c.switchU&&c.eat(45))return c.lastIntValue=45,!0;if(!c.switchU&&c.eat(99)){if(this.regexp_eatClassControlLetter(c))return!0;c.pos=d}return this.regexp_eatCharacterClassEscape(c)||this.regexp_eatCharacterEscape(c)},te.regexp_classSetExpression=function(c){var d=Ui,x;if(!this.regexp_eatClassSetRange(c))if(x=this.regexp_eatClassSetOperand(c)){x===Gr&&(d=Gr);for(var I=c.pos;c.eatChars([38,38]);){if(c.current()!==38&&(x=this.regexp_eatClassSetOperand(c))){x!==Gr&&(d=Ui);continue}c.raise("Invalid character in character class")}if(I!==c.pos)return d;for(;c.eatChars([45,45]);)this.regexp_eatClassSetOperand(c)||c.raise("Invalid character in character class");if(I!==c.pos)return d}else c.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(c)){if(x=this.regexp_eatClassSetOperand(c),!x)return d;x===Gr&&(d=Gr)}},te.regexp_eatClassSetRange=function(c){var d=c.pos;if(this.regexp_eatClassSetCharacter(c)){var x=c.lastIntValue;if(c.eat(45)&&this.regexp_eatClassSetCharacter(c)){var I=c.lastIntValue;return x!==-1&&I!==-1&&x>I&&c.raise("Range out of order in character class"),!0}c.pos=d}return!1},te.regexp_eatClassSetOperand=function(c){return this.regexp_eatClassSetCharacter(c)?Ui:this.regexp_eatClassStringDisjunction(c)||this.regexp_eatNestedClass(c)},te.regexp_eatNestedClass=function(c){var d=c.pos;if(c.eat(91)){var x=c.eat(94),I=this.regexp_classContents(c);if(c.eat(93))return x&&I===Gr&&c.raise("Negated character class may contain strings"),I;c.pos=d}if(c.eat(92)){var N=this.regexp_eatCharacterClassEscape(c);if(N)return N;c.pos=d}return null},te.regexp_eatClassStringDisjunction=function(c){var d=c.pos;if(c.eatChars([92,113])){if(c.eat(123)){var x=this.regexp_classStringDisjunctionContents(c);if(c.eat(125))return x}else c.raise("Invalid escape");c.pos=d}return null},te.regexp_classStringDisjunctionContents=function(c){for(var d=this.regexp_classString(c);c.eat(124);)this.regexp_classString(c)===Gr&&(d=Gr);return d},te.regexp_classString=function(c){for(var d=0;this.regexp_eatClassSetCharacter(c);)d++;return d===1?Ui:Gr},te.regexp_eatClassSetCharacter=function(c){var d=c.pos;if(c.eat(92))return this.regexp_eatCharacterEscape(c)||this.regexp_eatClassSetReservedPunctuator(c)?!0:c.eat(98)?(c.lastIntValue=8,!0):(c.pos=d,!1);var x=c.current();return x<0||x===c.lookahead()&&t4(x)||r4(x)?!1:(c.advance(),c.lastIntValue=x,!0)};function t4(c){return c===33||c>=35&&c<=38||c>=42&&c<=44||c===46||c>=58&&c<=64||c===94||c===96||c===126}function r4(c){return c===40||c===41||c===45||c===47||c>=91&&c<=93||c>=123&&c<=125}te.regexp_eatClassSetReservedPunctuator=function(c){var d=c.current();return i4(d)?(c.lastIntValue=d,c.advance(),!0):!1};function i4(c){return c===33||c===35||c===37||c===38||c===44||c===45||c>=58&&c<=62||c===64||c===96||c===126}te.regexp_eatClassControlLetter=function(c){var d=c.current();return ul(d)||d===95?(c.lastIntValue=d%32,c.advance(),!0):!1},te.regexp_eatHexEscapeSequence=function(c){var d=c.pos;if(c.eat(120)){if(this.regexp_eatFixedHexDigits(c,2))return!0;c.switchU&&c.raise("Invalid escape"),c.pos=d}return!1},te.regexp_eatDecimalDigits=function(c){var d=c.pos,x=0;for(c.lastIntValue=0;ul(x=c.current());)c.lastIntValue=10*c.lastIntValue+(x-48),c.advance();return c.pos!==d};function ul(c){return c>=48&&c<=57}te.regexp_eatHexDigits=function(c){var d=c.pos,x=0;for(c.lastIntValue=0;hw(x=c.current());)c.lastIntValue=16*c.lastIntValue+dw(x),c.advance();return c.pos!==d};function hw(c){return c>=48&&c<=57||c>=65&&c<=70||c>=97&&c<=102}function dw(c){return c>=65&&c<=70?10+(c-65):c>=97&&c<=102?10+(c-97):c-48}te.regexp_eatLegacyOctalEscapeSequence=function(c){if(this.regexp_eatOctalDigit(c)){var d=c.lastIntValue;if(this.regexp_eatOctalDigit(c)){var x=c.lastIntValue;d<=3&&this.regexp_eatOctalDigit(c)?c.lastIntValue=d*64+x*8+c.lastIntValue:c.lastIntValue=d*8+x}else c.lastIntValue=d;return!0}return!1},te.regexp_eatOctalDigit=function(c){var d=c.current();return mw(d)?(c.lastIntValue=d-48,c.advance(),!0):(c.lastIntValue=0,!1)};function mw(c){return c>=48&&c<=55}te.regexp_eatFixedHexDigits=function(c,d){var x=c.pos;c.lastIntValue=0;for(var I=0;I<d;++I){var N=c.current();if(!hw(N))return c.pos=x,!1;c.lastIntValue=16*c.lastIntValue+dw(N),c.advance()}return!0};var cl=function(d){this.type=d.type,this.value=d.value,this.start=d.start,this.end=d.end,d.options.locations&&(this.loc=new pe(d,d.startLoc,d.endLoc)),d.options.ranges&&(this.range=[d.start,d.end])},be=Xe.prototype;be.next=function(c){!c&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new cl(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},be.getToken=function(){return this.next(),new cl(this)},typeof Symbol<"u"&&(be[Symbol.iterator]=function(){var c=this;return{next:function(){var d=c.getToken();return{done:d.type===_.eof,value:d}}}}),be.nextToken=function(){var c=this.curContext();if((!c||!c.preserveSpace)&&this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length)return this.finishToken(_.eof);if(c.override)return c.override(this);this.readToken(this.fullCharCodeAtPos())},be.readToken=function(c){return p(c,this.options.ecmaVersion>=6)||c===92?this.readWord():this.getTokenFromCode(c)},be.fullCharCodeAt=function(c){var d=this.input.charCodeAt(c);if(d<=55295||d>=56320)return d;var x=this.input.charCodeAt(c+1);return x<=56319||x>=57344?d:(d<<10)+x-56613888},be.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)},be.skipBlockComment=function(){var c=this.options.onComment&&this.curPosition(),d=this.pos,x=this.input.indexOf("*/",this.pos+=2);if(x===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=x+2,this.options.locations)for(var I=void 0,N=d;(I=L(this.input,N,this.pos))>-1;)++this.curLine,N=this.lineStart=I;this.options.onComment&&this.options.onComment(!0,this.input.slice(d+2,x),d,this.pos,c,this.curPosition())},be.skipLineComment=function(c){for(var d=this.pos,x=this.options.onComment&&this.curPosition(),I=this.input.charCodeAt(this.pos+=c);this.pos<this.input.length&&!O(I);)I=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(d+c,this.pos),d,this.pos,x,this.curPosition())},be.skipSpace=function(){e:for(;this.pos<this.input.length;){var c=this.input.charCodeAt(this.pos);switch(c){case 32:case 160:++this.pos;break;case 13:this.input.charCodeAt(this.pos+1)===10&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(c>8&&c<14||c>=5760&&B.test(String.fromCharCode(c)))++this.pos;else break e}}},be.finishToken=function(c,d){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var x=this.type;this.type=c,this.value=d,this.updateContext(x)},be.readToken_dot=function(){var c=this.input.charCodeAt(this.pos+1);if(c>=48&&c<=57)return this.readNumber(!0);var d=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&c===46&&d===46?(this.pos+=3,this.finishToken(_.ellipsis)):(++this.pos,this.finishToken(_.dot))},be.readToken_slash=function(){var c=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):c===61?this.finishOp(_.assign,2):this.finishOp(_.slash,1)},be.readToken_mult_modulo_exp=function(c){var d=this.input.charCodeAt(this.pos+1),x=1,I=c===42?_.star:_.modulo;return this.options.ecmaVersion>=7&&c===42&&d===42&&(++x,I=_.starstar,d=this.input.charCodeAt(this.pos+2)),d===61?this.finishOp(_.assign,x+1):this.finishOp(I,x)},be.readToken_pipe_amp=function(c){var d=this.input.charCodeAt(this.pos+1);if(d===c){if(this.options.ecmaVersion>=12){var x=this.input.charCodeAt(this.pos+2);if(x===61)return this.finishOp(_.assign,3)}return this.finishOp(c===124?_.logicalOR:_.logicalAND,2)}return d===61?this.finishOp(_.assign,2):this.finishOp(c===124?_.bitwiseOR:_.bitwiseAND,1)},be.readToken_caret=function(){var c=this.input.charCodeAt(this.pos+1);return c===61?this.finishOp(_.assign,2):this.finishOp(_.bitwiseXOR,1)},be.readToken_plus_min=function(c){var d=this.input.charCodeAt(this.pos+1);return d===c?d===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||A.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(_.incDec,2):d===61?this.finishOp(_.assign,2):this.finishOp(_.plusMin,1)},be.readToken_lt_gt=function(c){var d=this.input.charCodeAt(this.pos+1),x=1;return d===c?(x=c===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+x)===61?this.finishOp(_.assign,x+1):this.finishOp(_.bitShift,x)):d===33&&c===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(d===61&&(x=2),this.finishOp(_.relational,x))},be.readToken_eq_excl=function(c){var d=this.input.charCodeAt(this.pos+1);return d===61?this.finishOp(_.equality,this.input.charCodeAt(this.pos+2)===61?3:2):c===61&&d===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(_.arrow)):this.finishOp(c===61?_.eq:_.prefix,1)},be.readToken_question=function(){var c=this.options.ecmaVersion;if(c>=11){var d=this.input.charCodeAt(this.pos+1);if(d===46){var x=this.input.charCodeAt(this.pos+2);if(x<48||x>57)return this.finishOp(_.questionDot,2)}if(d===63){if(c>=12){var I=this.input.charCodeAt(this.pos+2);if(I===61)return this.finishOp(_.assign,3)}return this.finishOp(_.coalesce,2)}}return this.finishOp(_.question,1)},be.readToken_numberSign=function(){var c=this.options.ecmaVersion,d=35;if(c>=13&&(++this.pos,d=this.fullCharCodeAtPos(),p(d,!0)||d===92))return this.finishToken(_.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+W(d)+"'")},be.getTokenFromCode=function(c){switch(c){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(_.parenL);case 41:return++this.pos,this.finishToken(_.parenR);case 59:return++this.pos,this.finishToken(_.semi);case 44:return++this.pos,this.finishToken(_.comma);case 91:return++this.pos,this.finishToken(_.bracketL);case 93:return++this.pos,this.finishToken(_.bracketR);case 123:return++this.pos,this.finishToken(_.braceL);case 125:return++this.pos,this.finishToken(_.braceR);case 58:return++this.pos,this.finishToken(_.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(_.backQuote);case 48:var d=this.input.charCodeAt(this.pos+1);if(d===120||d===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(d===111||d===79)return this.readRadixNumber(8);if(d===98||d===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(c);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(c);case 124:case 38:return this.readToken_pipe_amp(c);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(c);case 60:case 62:return this.readToken_lt_gt(c);case 61:case 33:return this.readToken_eq_excl(c);case 63:return this.readToken_question();case 126:return this.finishOp(_.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+W(c)+"'")},be.finishOp=function(c,d){var x=this.input.slice(this.pos,this.pos+d);return this.pos+=d,this.finishToken(c,x)},be.readRegexp=function(){for(var c,d,x=this.pos;;){this.pos>=this.input.length&&this.raise(x,"Unterminated regular expression");var I=this.input.charAt(this.pos);if(A.test(I)&&this.raise(x,"Unterminated regular expression"),c)c=!1;else{if(I==="[")d=!0;else if(I==="]"&&d)d=!1;else if(I==="/"&&!d)break;c=I==="\\"}++this.pos}var N=this.input.slice(x,this.pos);++this.pos;var M=this.pos,j=this.readWord1();this.containsEsc&&this.unexpected(M);var H=this.regexpState||(this.regexpState=new wi(this));H.reset(x,N,j),this.validateRegExpFlags(H),this.validateRegExpPattern(H);var J=null;try{J=new RegExp(N,j)}catch{}return this.finishToken(_.regexp,{pattern:N,flags:j,value:J})},be.readInt=function(c,d,x){for(var I=this.options.ecmaVersion>=12&&d===void 0,N=x&&this.input.charCodeAt(this.pos)===48,M=this.pos,j=0,H=0,J=0,ue=d??1/0;J<ue;++J,++this.pos){var _e=this.input.charCodeAt(this.pos),Ve=void 0;if(I&&_e===95){N&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),H===95&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),J===0&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),H=_e;continue}if(_e>=97?Ve=_e-97+10:_e>=65?Ve=_e-65+10:_e>=48&&_e<=57?Ve=_e-48:Ve=1/0,Ve>=c)break;H=_e,j=j*c+Ve}return I&&H===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===M||d!=null&&this.pos-M!==d?null:j};function n4(c,d){return d?parseInt(c,8):parseFloat(c.replace(/_/g,""))}function gw(c){return typeof BigInt!="function"?null:BigInt(c.replace(/_/g,""))}be.readRadixNumber=function(c){var d=this.pos;this.pos+=2;var x=this.readInt(c);return x==null&&this.raise(this.start+2,"Expected number in radix "+c),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(x=gw(this.input.slice(d,this.pos)),++this.pos):p(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(_.num,x)},be.readNumber=function(c){var d=this.pos;!c&&this.readInt(10,void 0,!0)===null&&this.raise(d,"Invalid number");var x=this.pos-d>=2&&this.input.charCodeAt(d)===48;x&&this.strict&&this.raise(d,"Invalid number");var I=this.input.charCodeAt(this.pos);if(!x&&!c&&this.options.ecmaVersion>=11&&I===110){var N=gw(this.input.slice(d,this.pos));return++this.pos,p(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(_.num,N)}x&&/[89]/.test(this.input.slice(d,this.pos))&&(x=!1),I===46&&!x&&(++this.pos,this.readInt(10),I=this.input.charCodeAt(this.pos)),(I===69||I===101)&&!x&&(I=this.input.charCodeAt(++this.pos),(I===43||I===45)&&++this.pos,this.readInt(10)===null&&this.raise(d,"Invalid number")),p(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var M=n4(this.input.slice(d,this.pos),x);return this.finishToken(_.num,M)},be.readCodePoint=function(){var c=this.input.charCodeAt(this.pos),d;if(c===123){this.options.ecmaVersion<6&&this.unexpected();var x=++this.pos;d=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,d>1114111&&this.invalidStringToken(x,"Code point out of bounds")}else d=this.readHexChar(4);return d},be.readString=function(c){for(var d="",x=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var I=this.input.charCodeAt(this.pos);if(I===c)break;I===92?(d+=this.input.slice(x,this.pos),d+=this.readEscapedChar(!1),x=this.pos):I===8232||I===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(O(I)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return d+=this.input.slice(x,this.pos++),this.finishToken(_.string,d)};var yw={};be.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(c){if(c===yw)this.readInvalidTemplateToken();else throw c}this.inTemplateElement=!1},be.invalidStringToken=function(c,d){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw yw;this.raise(c,d)},be.readTmplToken=function(){for(var c="",d=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var x=this.input.charCodeAt(this.pos);if(x===96||x===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===_.template||this.type===_.invalidTemplate)?x===36?(this.pos+=2,this.finishToken(_.dollarBraceL)):(++this.pos,this.finishToken(_.backQuote)):(c+=this.input.slice(d,this.pos),this.finishToken(_.template,c));if(x===92)c+=this.input.slice(d,this.pos),c+=this.readEscapedChar(!0),d=this.pos;else if(O(x)){switch(c+=this.input.slice(d,this.pos),++this.pos,x){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:c+=`
|
|
1203
|
+
`;break;default:c+=String.fromCharCode(x);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),d=this.pos}else++this.pos}},be.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if(this.input[this.pos+1]!=="{")break;case"`":return this.finishToken(_.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":this.input[this.pos+1]===`
|
|
1204
|
+
`&&++this.pos;case`
|
|
1205
|
+
`:case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,"Unterminated template")},be.readEscapedChar=function(c){var d=this.input.charCodeAt(++this.pos);switch(++this.pos,d){case 110:return`
|
|
1206
|
+
`;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return W(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),c){var x=this.pos-1;this.invalidStringToken(x,"Invalid escape sequence in template string")}default:if(d>=48&&d<=55){var I=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],N=parseInt(I,8);return N>255&&(I=I.slice(0,-1),N=parseInt(I,8)),this.pos+=I.length-1,d=this.input.charCodeAt(this.pos),(I!=="0"||d===56||d===57)&&(this.strict||c)&&this.invalidStringToken(this.pos-1-I.length,c?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(N)}return O(d)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(d)}},be.readHexChar=function(c){var d=this.pos,x=this.readInt(16,c);return x===null&&this.invalidStringToken(d,"Bad character escape sequence"),x},be.readWord1=function(){this.containsEsc=!1;for(var c="",d=!0,x=this.pos,I=this.options.ecmaVersion>=6;this.pos<this.input.length;){var N=this.fullCharCodeAtPos();if(m(N,I))this.pos+=N<=65535?1:2;else if(N===92){this.containsEsc=!0,c+=this.input.slice(x,this.pos);var M=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var j=this.readCodePoint();(d?p:m)(j,I)||this.invalidStringToken(M,"Invalid Unicode escape"),c+=W(j),x=this.pos}else break;d=!1}return c+this.input.slice(x,this.pos)},be.readWord=function(){var c=this.readWord1(),d=_.name;return this.keywords.test(c)&&(d=k[c]),this.finishToken(d,c)};var _w="8.16.0";Xe.acorn={Parser:Xe,version:_w,defaultOptions:nt,Position:K,SourceLocation:pe,getLineInfo:ye,Node:No,TokenType:v,tokTypes:_,keywordTypes:k,TokContext:Hr,tokContexts:Be,isIdentifierChar:m,isIdentifierStart:p,Token:cl,isNewLine:O,lineBreak:A,lineBreakG:E,nonASCIIwhitespace:B};function s4(c,d){return Xe.parse(c,d)}function a4(c,d,x){return Xe.parseExpressionAt(c,d,x)}function o4(c,d){return Xe.tokenizer(c,d)}t.Node=No,t.Parser=Xe,t.Position=K,t.SourceLocation=pe,t.TokContext=Hr,t.Token=cl,t.TokenType=v,t.defaultOptions=nt,t.getLineInfo=ye,t.isIdentifierChar=m,t.isIdentifierStart=p,t.isNewLine=O,t.keywordTypes=k,t.lineBreak=A,t.lineBreakG=E,t.nonASCIIwhitespace=B,t.parse=s4,t.parseExpressionAt=a4,t.tokContexts=Be,t.tokTypes=_,t.tokenizer=o4,t.version=_w}))});var Td=T(Ad=>{"use strict";y();Object.defineProperty(Ad,"__esModule",{value:!0});Ad.SUPPORTED_ASSET_IMAGE_EXTENSIONS=void 0;Ad.SUPPORTED_ASSET_IMAGE_EXTENSIONS=["jpg","jpeg","png","gif","webp","heic","ico"]});var ac=T(_i=>{"use strict";y();Object.defineProperty(_i,"__esModule",{value:!0});_i.identity=void 0;_i.unique=zK;_i.assertNever=JK;_i.unexpected=KK;_i.isString=YK;_i.extname=XK;_i.exists=ZK;_i.acceptsLocalBlocks=eQ;function zK(t){return[...new Set(t)]}function JK(t){throw new Error(`Unknown module type ${t}`)}function KK(){return new Error("Unexpected code path encountered")}var QK=t=>t;_i.identity=QK;function YK(t){return typeof t=="string"}function XK(t){return t.split(".").pop()||""}async function ZK(t,e){return t.stat(e).then(()=>!0).catch(()=>!1)}async function eQ(t,e){let r=await e.getSectionSchema(t).catch(n=>{});if(!r)return new Error("Section does not exist");let i=r.validSchema;return i instanceof Error?i:(i.blocks??[]).some(n=>n.type&&"name"in n&&n.name)}});var c0=T(js=>{"use strict";y();Object.defineProperty(js,"__esModule",{value:!0});js.toCssSourceCode=u0;js.toSvgSourceCode=nQ;js.toJsSourceCode=i2;js.parseJs=n2;js.toSourceCode=aQ;var r2=hr(),tQ=t2(),rQ=Td(),iQ=ac();async function u0(t,e){return{type:"css",uri:t,source:e,ast:new Error("File parsing not implemented yet")}}async function nQ(t,e){return{type:"svg",uri:t,source:e,ast:new Error("File parsing not implemented yet")}}async function sQ(t,e){return{type:"image",uri:t,source:e,ast:new Error("Image files are not parsed")}}async function i2(t,e){return{type:"javascript",uri:t,source:e,ast:n2(e)}}function n2(t){try{return(0,tQ.parse)(t,{ecmaVersion:"latest",sourceType:"module"})}catch(e){return(0,r2.asError)(e)}}async function aQ(t,e){let r=(0,iQ.extname)(t);if(r==="json"||r==="liquid")return(0,r2.toSourceCode)(t,e);if(r==="js")return i2(t,e);if(r==="css")return u0(t,e);if(r==="svg")return u0(t,e);if(rQ.SUPPORTED_ASSET_IMAGE_EXTENSIONS.includes(r))return sQ(t,e);throw new Error(`Unknown source code type for ${t}`)}});var s2=T(f0=>{"use strict";y();Object.defineProperty(f0,"__esModule",{value:!0});f0.augmentDependencies=uQ;var Bs=hr(),oQ=c0(),l0=ac();function uQ(t,e){return{fs:e.fs,getBlockSchema:(0,Bs.memoize)(e.getBlockSchema,l0.identity),getSectionSchema:(0,Bs.memoize)(e.getSectionSchema,l0.identity),getSourceCode:(0,Bs.memoize)(e.getSourceCode??async function(i){let n=await e.fs.readFile(i);return(0,oQ.toSourceCode)(i,n)},l0.identity),getWebComponentDefinitionReference:e.getWebComponentDefinitionReference,mode:e.mode??"theme",getThemeBlockNames:(0,Bs.memo)(()=>(0,Bs.recursiveReadDirectory)(e.fs,Bs.path.join(t,"blocks"),([r])=>r.endsWith(".liquid")).then(r=>r.map(i=>Bs.path.basename(i,".liquid"))))}}});var h0=T(Fi=>{"use strict";y();Object.defineProperty(Fi,"__esModule",{value:!0});Fi.getModule=lQ;Fi.getTemplateModule=o2;Fi.getThemeBlockModule=u2;Fi.getSectionModule=c2;Fi.getSectionGroupModule=l2;Fi.getAssetModule=f2;Fi.getSnippetModule=p2;Fi.getLayoutModule=h2;var jr=hr(),cQ=Td(),a2=ac(),p0=new WeakMap;function lQ(t,e){let r=d2(t);if(r.has(e))return r.get(e);let i=jr.path.relative(e,t.rootUri);switch(!0){case i.startsWith("assets"):return f2(t,jr.path.basename(e));case i.startsWith("blocks"):return u2(t,jr.path.basename(e,".liquid"));case i.startsWith("layout"):return h2(t,jr.path.basename(e,".liquid"));case i.startsWith("sections"):return i.endsWith(".json")?l2(t,jr.path.basename(e,".json")):c2(t,jr.path.basename(e,".liquid"));case i.startsWith("snippets"):return p2(t,jr.path.basename(e,".liquid"));case i.startsWith("templates"):return o2(t,e)}}function o2(t,e){switch((0,a2.extname)(e)){case"json":return Pn(t,{type:"JSON",kind:"template",dependencies:[],references:[],uri:e});case"liquid":return Pn(t,{type:"Liquid",kind:"template",dependencies:[],references:[],uri:e});default:throw new Error(`Unknown template type for ${e}`)}}function u2(t,e){let r=jr.path.join(t.rootUri,"blocks",`${e}.liquid`);return Pn(t,{type:"Liquid",kind:"block",dependencies:[],references:[],uri:r})}function c2(t,e){let r=jr.path.join(t.rootUri,"sections",`${e}.liquid`);return Pn(t,{type:"Liquid",kind:"section",dependencies:[],references:[],uri:r})}function l2(t,e){let r=jr.path.join(t.rootUri,"sections",`${e}.json`);return Pn(t,{type:"JSON",kind:"section-group",dependencies:[],references:[],uri:r})}function f2(t,e){let r=(0,a2.extname)(e),i;if(cQ.SUPPORTED_ASSET_IMAGE_EXTENSIONS.includes(r)?i="Image":r==="js"?i="JavaScript":r==="css"?i="CSS":r==="svg"&&(i="SVG"),!!i)return Pn(t,{type:i,kind:"unused",dependencies:[],references:[],uri:jr.path.join(t.rootUri,"assets",e)})}function p2(t,e){let r=jr.path.join(t.rootUri,"snippets",`${e}.liquid`);return Pn(t,{type:"Liquid",kind:"snippet",uri:r,dependencies:[],references:[]})}function h2(t,e="theme"){if(e===!1)return;e===void 0&&(e="theme");let r=jr.path.join(t.rootUri,"layout",`${e}.liquid`);return Pn(t,{type:"Liquid",kind:"layout",uri:r,dependencies:[],references:[]})}function d2(t){return p0.has(t)||p0.set(t,new Map),p0.get(t)}function Pn(t,e){let r=d2(t);return r.has(e.uri)||r.set(e.uri,e),r.get(e.uri)}});var v2=T(Ed=>{"use strict";y();Object.defineProperty(Ed,"__esModule",{value:!0});Ed.traverseModule=ri;Ed.bind=ii;var Vs=ge(),Wt=hr(),ji=ac(),ir=h0();async function ri(t,e,r){if(!e.modules[t.uri]&&(e.modules[t.uri]=t,t.exists=await(0,ji.exists)(r.fs,t.uri),!!t.exists))switch(t.type){case"Liquid":return fQ(t,e,r);case"JSON":return mQ(t,e,r);case"JavaScript":return;case"CSS":case"SVG":case"Image":return;default:return(0,ji.assertNever)(t)}}async function fQ(t,e,r){let i=await r.getSourceCode(t.uri);if(i.ast instanceof Error)return;let n={LiquidFilter:(u,l)=>{if(["asset_url","asset_img_url","inline_asset_content"].includes(u.name)){let f=l[l.length-1];if(f.type!==Vs.NodeTypes.LiquidVariable||f.expression.type!==Vs.NodeTypes.String||f.filters[0]!==u)return;let h=f.expression.value,p=(0,ir.getAssetModule)(e,h);return p?{target:p,sourceRange:[f.position.start,f.position.end]}:void 0}},ContentForMarkup:(u,l)=>{let f=l.at(-1);if(u.contentForType.value!=="block")return;let h=u.args.find(v=>v.name==="type");if(!h)return;let p=h.value;if(p.type!==Vs.NodeTypes.String)return;let m=p.value;return{target:(0,ir.getThemeBlockModule)(e,m),sourceRange:[f.position.start,u.position.end]}},HtmlElement:u=>{if(u.name.length!==1||u.name[0].type!==Vs.NodeTypes.TextNode)return;let l=u.name[0],f=l.value;if(!f.includes("-"))return;let h=r.getWebComponentDefinitionReference(f);if(!h)return;let{assetName:p,range:m}=h,v=(0,ir.getAssetModule)(e,p);if(v)return{target:v,sourceRange:[u.blockStartPosition.start,l.position.end],targetRange:m}},RenderMarkup:(u,l)=>{let f=u.snippet,h=l.at(-1);if(!(0,ji.isString)(f)&&f.type===Vs.NodeTypes.String)return{target:(0,ir.getSnippetModule)(e,f.value),sourceRange:[h.position.start,h.position.end]}},LiquidTag:u=>{switch(u.name){case Vs.NamedTags.sections:if(!(0,ji.isString)(u.markup)){let l=u.markup.value;return{target:(0,ir.getSectionGroupModule)(e,l),sourceRange:[u.position.start,u.position.end]}}case Vs.NamedTags.section:if(!(0,ji.isString)(u.markup)){let l=u.markup.value;return{target:(0,ir.getSectionModule)(e,l),sourceRange:[u.position.start,u.position.end]}}}}},s=(0,Wt.visit)(i.ast,n);for(let u of s)ii(t,u.target,{sourceRange:u.sourceRange,targetRange:u.targetRange});let o=(0,ji.unique)(s.map(u=>u.target)).map(u=>ri(u,e,r));if(t.kind==="section"){let u=Wt.path.basename(t.uri,".liquid"),l=await r.getSectionSchema(u);o.push(m2(l,t,e,r))}else if(t.kind==="block"&&r.mode==="theme"){let u=Wt.path.basename(t.uri,".liquid"),l=await r.getBlockSchema(u);o.push(m2(l,t,e,r))}return Promise.all(o)}async function m2(t,e,r,i){if(!t||e.kind==="section"&&await(0,ji.acceptsLocalBlocks)(Wt.path.basename(e.uri,".liquid"),i))return;let{ast:a,validSchema:o}=t;if(o instanceof Error||a instanceof Error)return;let u=[];return o.blocks&&u.push(pQ(t,e,a,o.blocks,r,i)),o.presets&&u.push(hQ(t,e,a,o.presets,r,i)),"default"in o&&o.default&&u.push(dQ(t,e,a,o.default,r,i)),Promise.all(u)}async function pQ(t,e,r,i,n,s){let a=[];for(let[o,u]of Object.entries(i)){let l=["blocks",o],h=(0,Wt.nodeAtPath)(r,l).children.find(m=>m.key.value==="type");if(!h)continue;let p=[t.offset+h.loc.start.offset,t.offset+h.loc.end.offset];switch(u.type){case"@theme":{let m=await s.getThemeBlockNames().then(v=>v.filter(S=>!S.startsWith("_")));for(let v of m){let S=(0,ir.getThemeBlockModule)(n,Wt.path.basename(v,".liquid"));ii(e,S,{sourceRange:p,type:"indirect"}),a.push(ri(S,n,s))}break}case"@app":break;default:{let m=(0,ir.getThemeBlockModule)(n,u.type);ii(e,m,{sourceRange:p}),a.push(ri(m,n,s))}}}return Promise.all(a)}async function hQ(t,e,r,i,n,s){let a=[];for(let[o,u]of i.entries()){if(!("blocks"in u))continue;let l=Array.isArray(u.blocks)?u.blocks.entries():Object.entries(u.blocks);for(let[f,h]of l){let p=["presets",o,"blocks",f],m=(0,Wt.nodeAtPath)(r,p),v=(0,ir.getThemeBlockModule)(n,h.type);if(!v)continue;let S=m.children.find(g=>g.key.value==="type");if(!S)continue;let b=[t.offset+S.loc.start.offset,t.offset+S.loc.end.offset];ii(e,v,{sourceRange:b,type:"preset"}),a.push(ri(v,n,s)),h.blocks&&a.push(y2(t,e,r,h.blocks,p,n,s))}}return Promise.all(a)}async function y2(t,e,r,i,n,s,a){let o=[],u=Array.isArray(i)?i.entries():Object.entries(i);for(let[l,f]of u){let h=[...n,"blocks",l],p=(0,Wt.nodeAtPath)(r,h),m=(0,ir.getThemeBlockModule)(s,f.type);if(!m)continue;let v=p.children.find(b=>b.key.value==="type");if(!v)continue;let S=[t.offset+v.loc.start.offset,t.offset+v.loc.end.offset];ii(e,m,{sourceRange:S,type:"preset"}),o.push(ri(m,s,a)),f.blocks&&o.push(y2(t,e,r,f.blocks,h,s,a))}return Promise.all(o)}async function dQ(t,e,r,i,n,s){let a=[];if(!("blocks"in i))return;let o=Array.isArray(i.blocks)?i.blocks.entries():Object.entries(i.blocks);for(let[u,l]of o){let f=["default","blocks",u],h=(0,Wt.nodeAtPath)(r,f),p=(0,ir.getThemeBlockModule)(n,l.type);if(!p)continue;let m=h.children.find(S=>S.key.value==="type");if(!m)continue;let v=[t.offset+m.loc.start.offset,t.offset+m.loc.end.offset];ii(e,p,{sourceRange:v,type:"preset"}),a.push(ri(p,n,s))}return Promise.all(a)}async function mQ(t,e,r){let i=await r.getSourceCode(t.uri);if(i.type!==Wt.SourceCodeType.JSON)throw(0,ji.unexpected)();let n=i.ast;if(!(n instanceof Error))switch(t.kind){case"template":{let s=(0,Wt.parseJSON)(i.source),a=[];for(let[l,f]of Object.entries(s.sections)){let h=f.type,p=["sections",l],m=(0,Wt.nodeAtPath)(n,p),v=(0,ir.getSectionModule)(e,h),S=m.children.find(w=>w.key.value==="type"),b=S.loc.start.offset,g=S.loc.end.offset;ii(t,v,{sourceRange:[b,g]}),a.push(ri(v,e,r),g2(t,n,p,f,e,r))}let o=s.layout,u=(0,ir.getLayoutModule)(e,s.layout);if(u){let l,f=!0;if(o!==!1&&o!==void 0){let h=["layout"],p=(0,Wt.nodeAtPath)(n,h);l=[p.loc.start.offset,p.loc.end.offset],f=!1}ii(t,u,{sourceRange:l,type:"indirect"}),a.push(ri(u,e,r))}return Promise.all(a)}case"section-group":{let s=(0,Wt.parseJSON)(i.source),a=[];for(let[o,u]of Object.entries(s.sections)){let l=u.type,f=["sections",o],h=(0,Wt.nodeAtPath)(n,f),p=(0,ir.getSectionModule)(e,l),m=h.children.find(g=>g.key.value==="type"),v=m.loc.start.offset,S=m.loc.end.offset;ii(t,p,{sourceRange:[v,S]}),a.push(ri(p,e,r),g2(t,n,f,u,e,r))}return Promise.all(a)}default:return(0,ji.assertNever)(t.kind)}}async function g2(t,e,r=[],i,n,s){if(!i.blocks||await(0,ji.acceptsLocalBlocks)(i.type,s))return;let o=[];for(let[u,l]of Object.entries(i.blocks)){let f=l.type,h=(0,ir.getThemeBlockModule)(n,f),p=[...r,"blocks",u],v=(0,Wt.nodeAtPath)(e,p).children.find(k=>k.key.value==="type"),S=v.loc.start.offset,b=v.loc.end.offset;ii(t,h,{sourceRange:[S,b]}),o.push(ri(h,n,s),_2(t,e,p,l,n,s))}return Promise.all(o)}async function _2(t,e,r=[],i,n,s){if(!i.blocks)return;let a=[];for(let[o,u]of Object.entries(i.blocks)){let l=u.type,f=(0,ir.getThemeBlockModule)(n,l),h=[...r,"blocks",o],m=(0,Wt.nodeAtPath)(e,h).children.find(g=>g.key.value==="type"),v=m.loc.start.offset,S=m.loc.end.offset;ii(t,f,{sourceRange:[v,S]}),a.push(ri(f,n,s),_2(t,e,h,u,n,s))}return Promise.all(a)}function ii(t,e,{sourceRange:r,targetRange:i,type:n="direct"}={}){let s={source:{uri:t.uri,range:r},target:{uri:e.uri,range:i},type:n};t.dependencies.push(s),e.references.push(s)}});var b2=T(d0=>{"use strict";y();Object.defineProperty(d0,"__esModule",{value:!0});d0.buildThemeGraph=vQ;var Od=hr(),gQ=s2(),yQ=h0(),_Q=v2();async function vQ(t,e,r){let i=(0,gQ.augmentDependencies)(t,e);r=r??await(0,Od.recursiveReadDirectory)(i.fs,t,([s])=>{let a=s.startsWith(Od.path.join(t,"templates")),o=s.startsWith(Od.path.join(t,"sections"))&&s.endsWith(".liquid"),u=i.mode==="app"&&s.startsWith(Od.path.join(t,"blocks"))&&s.endsWith(".liquid");return a||o||u});let n={entryPoints:[],modules:{},rootUri:t};return n.entryPoints=r.map(s=>(0,yQ.getModule)(n,s)).filter(s=>s!==void 0),await Promise.all(n.entryPoints.map(s=>(0,_Q.traverseModule)(s,n,i))),n}});var S2=T(m0=>{"use strict";y();Object.defineProperty(m0,"__esModule",{value:!0});m0.serializeThemeGraph=bQ;function bQ(t){let e=Object.values(t.modules).map(i=>({uri:i.uri,type:i.type,kind:i.kind,..."exists"in i?{exists:i.exists}:{}})),r=Object.values(t.modules).flatMap(i=>i.dependencies);return{rootUri:t.rootUri,nodes:e,edges:r}}});var x2=T((Nd,w2)=>{y();(function(t,e){typeof Nd=="object"&&typeof w2<"u"?e(Nd):typeof define=="function"&&define.amd?define(["exports"],e):(t=typeof globalThis<"u"?globalThis:t||self,e((t.acorn=t.acorn||{},t.acorn.walk={})))})(Nd,(function(t){"use strict";function e(g,k,w,_,A){w||(w=b),(function E(O,L,B){var R=B||O.type;S(w,R,O,L,E),k[R]&&k[R](O,L)})(g,_,A)}function r(g,k,w,_,A){var E=[];w||(w=b),(function O(L,B,R){var q=R||L.type,P=L!==E[E.length-1];P&&E.push(L),S(w,q,L,B,O),k[q]&&k[q](L,B||E,E),P&&E.pop()})(g,_,A)}function i(g,k,w,_,A){var E=w?p(w,_||void 0):_;(function O(L,B,R){E[R||L.type](L,B,O)})(g,k,A)}function n(g){return typeof g=="string"?function(k){return k===g}:g||function(){return!0}}var s=function(k,w){this.node=k,this.state=w};function a(g,k,w,_,A){w||(w=b);var E;(function O(L,B,R){var q=R||L.type;S(w,q,L,B,O),E!==L&&(k(L,B,q),E=L)})(g,_,A)}function o(g,k,w,_){w||(w=b);var A=[],E;(function O(L,B,R){var q=R||L.type,P=L!==A[A.length-1];P&&A.push(L),S(w,q,L,B,O),E!==L&&(k(L,B||A,A,q),E=L),P&&A.pop()})(g,_)}function u(g,k,w,_,A,E){A||(A=b),_=n(_);try{(function O(L,B,R){var q=R||L.type;if((k==null||L.start<=k)&&(w==null||L.end>=w)&&S(A,q,L,B,O),(k==null||L.start===k)&&(w==null||L.end===w)&&_(q,L))throw new s(L,B)})(g,E)}catch(O){if(O instanceof s)return O;throw O}}function l(g,k,w,_,A){w=n(w),_||(_=b);try{(function E(O,L,B){var R=B||O.type;if(!(O.start>k||O.end<k)&&(S(_,R,O,L,E),w(R,O)))throw new s(O,L)})(g,A)}catch(E){if(E instanceof s)return E;throw E}}function f(g,k,w,_,A){w=n(w),_||(_=b);try{(function E(O,L,B){if(!(O.end<k)){var R=B||O.type;if(O.start>=k&&w(R,O))throw new s(O,L);S(_,R,O,L,E)}})(g,A)}catch(E){if(E instanceof s)return E;throw E}}function h(g,k,w,_,A){w=n(w),_||(_=b);var E;return(function O(L,B,R){if(!(L.start>k)){var q=R||L.type;L.end<=k&&(!E||E.node.end<L.end)&&w(q,L)&&(E=new s(L,B)),S(_,q,L,B,O)}})(g,A),E}function p(g,k){var w=Object.create(k||b);for(var _ in g)w[_]=g[_];return w}function m(g,k,w){w(g,k)}function v(g,k,w){}function S(g,k,w,_,A){if(g[k]==null)throw new Error("No walker function defined for node type "+k);g[k](w,_,A)}var b={};b.Program=b.BlockStatement=b.StaticBlock=function(g,k,w){for(var _=0,A=g.body;_<A.length;_+=1){var E=A[_];w(E,k,"Statement")}},b.Statement=m,b.EmptyStatement=v,b.ExpressionStatement=b.ParenthesizedExpression=b.ChainExpression=function(g,k,w){return w(g.expression,k,"Expression")},b.IfStatement=function(g,k,w){w(g.test,k,"Expression"),w(g.consequent,k,"Statement"),g.alternate&&w(g.alternate,k,"Statement")},b.LabeledStatement=function(g,k,w){return w(g.body,k,"Statement")},b.BreakStatement=b.ContinueStatement=v,b.WithStatement=function(g,k,w){w(g.object,k,"Expression"),w(g.body,k,"Statement")},b.SwitchStatement=function(g,k,w){w(g.discriminant,k,"Expression");for(var _=0,A=g.cases;_<A.length;_+=1){var E=A[_];w(E,k)}},b.SwitchCase=function(g,k,w){g.test&&w(g.test,k,"Expression");for(var _=0,A=g.consequent;_<A.length;_+=1){var E=A[_];w(E,k,"Statement")}},b.ReturnStatement=b.YieldExpression=b.AwaitExpression=function(g,k,w){g.argument&&w(g.argument,k,"Expression")},b.ThrowStatement=b.SpreadElement=function(g,k,w){return w(g.argument,k,"Expression")},b.TryStatement=function(g,k,w){w(g.block,k,"Statement"),g.handler&&w(g.handler,k),g.finalizer&&w(g.finalizer,k,"Statement")},b.CatchClause=function(g,k,w){g.param&&w(g.param,k,"Pattern"),w(g.body,k,"Statement")},b.WhileStatement=b.DoWhileStatement=function(g,k,w){w(g.test,k,"Expression"),w(g.body,k,"Statement")},b.ForStatement=function(g,k,w){g.init&&w(g.init,k,"ForInit"),g.test&&w(g.test,k,"Expression"),g.update&&w(g.update,k,"Expression"),w(g.body,k,"Statement")},b.ForInStatement=b.ForOfStatement=function(g,k,w){w(g.left,k,"ForInit"),w(g.right,k,"Expression"),w(g.body,k,"Statement")},b.ForInit=function(g,k,w){g.type==="VariableDeclaration"?w(g,k):w(g,k,"Expression")},b.DebuggerStatement=v,b.FunctionDeclaration=function(g,k,w){return w(g,k,"Function")},b.VariableDeclaration=function(g,k,w){for(var _=0,A=g.declarations;_<A.length;_+=1){var E=A[_];w(E,k)}},b.VariableDeclarator=function(g,k,w){w(g.id,k,"Pattern"),g.init&&w(g.init,k,"Expression")},b.Function=function(g,k,w){g.id&&w(g.id,k,"Pattern");for(var _=0,A=g.params;_<A.length;_+=1){var E=A[_];w(E,k,"Pattern")}w(g.body,k,g.expression?"Expression":"Statement")},b.Pattern=function(g,k,w){g.type==="Identifier"?w(g,k,"VariablePattern"):g.type==="MemberExpression"?w(g,k,"MemberPattern"):w(g,k)},b.VariablePattern=v,b.MemberPattern=m,b.RestElement=function(g,k,w){return w(g.argument,k,"Pattern")},b.ArrayPattern=function(g,k,w){for(var _=0,A=g.elements;_<A.length;_+=1){var E=A[_];E&&w(E,k,"Pattern")}},b.ObjectPattern=function(g,k,w){for(var _=0,A=g.properties;_<A.length;_+=1){var E=A[_];E.type==="Property"?(E.computed&&w(E.key,k,"Expression"),w(E.value,k,"Pattern")):E.type==="RestElement"&&w(E.argument,k,"Pattern")}},b.Expression=m,b.ThisExpression=b.Super=b.MetaProperty=v,b.ArrayExpression=function(g,k,w){for(var _=0,A=g.elements;_<A.length;_+=1){var E=A[_];E&&w(E,k,"Expression")}},b.ObjectExpression=function(g,k,w){for(var _=0,A=g.properties;_<A.length;_+=1){var E=A[_];w(E,k)}},b.FunctionExpression=b.ArrowFunctionExpression=b.FunctionDeclaration,b.SequenceExpression=function(g,k,w){for(var _=0,A=g.expressions;_<A.length;_+=1){var E=A[_];w(E,k,"Expression")}},b.TemplateLiteral=function(g,k,w){for(var _=0,A=g.quasis;_<A.length;_+=1){var E=A[_];w(E,k)}for(var O=0,L=g.expressions;O<L.length;O+=1){var B=L[O];w(B,k,"Expression")}},b.TemplateElement=v,b.UnaryExpression=b.UpdateExpression=function(g,k,w){w(g.argument,k,"Expression")},b.BinaryExpression=b.LogicalExpression=function(g,k,w){w(g.left,k,"Expression"),w(g.right,k,"Expression")},b.AssignmentExpression=b.AssignmentPattern=function(g,k,w){w(g.left,k,"Pattern"),w(g.right,k,"Expression")},b.ConditionalExpression=function(g,k,w){w(g.test,k,"Expression"),w(g.consequent,k,"Expression"),w(g.alternate,k,"Expression")},b.NewExpression=b.CallExpression=function(g,k,w){if(w(g.callee,k,"Expression"),g.arguments)for(var _=0,A=g.arguments;_<A.length;_+=1){var E=A[_];w(E,k,"Expression")}},b.MemberExpression=function(g,k,w){w(g.object,k,"Expression"),g.computed&&w(g.property,k,"Expression")},b.ExportNamedDeclaration=b.ExportDefaultDeclaration=function(g,k,w){if(g.declaration&&w(g.declaration,k,g.type==="ExportNamedDeclaration"||g.declaration.id?"Statement":"Expression"),g.source&&w(g.source,k,"Expression"),g.attributes)for(var _=0,A=g.attributes;_<A.length;_+=1){var E=A[_];w(E,k)}},b.ExportAllDeclaration=function(g,k,w){if(g.exported&&w(g.exported,k),w(g.source,k,"Expression"),g.attributes)for(var _=0,A=g.attributes;_<A.length;_+=1){var E=A[_];w(E,k)}},b.ImportAttribute=function(g,k,w){w(g.value,k,"Expression")},b.ImportDeclaration=function(g,k,w){for(var _=0,A=g.specifiers;_<A.length;_+=1){var E=A[_];w(E,k)}if(w(g.source,k,"Expression"),g.attributes)for(var O=0,L=g.attributes;O<L.length;O+=1){var B=L[O];w(B,k)}},b.ImportExpression=function(g,k,w){w(g.source,k,"Expression"),g.options&&w(g.options,k,"Expression")},b.ImportSpecifier=b.ImportDefaultSpecifier=b.ImportNamespaceSpecifier=b.Identifier=b.PrivateIdentifier=b.Literal=v,b.TaggedTemplateExpression=function(g,k,w){w(g.tag,k,"Expression"),w(g.quasi,k,"Expression")},b.ClassDeclaration=b.ClassExpression=function(g,k,w){return w(g,k,"Class")},b.Class=function(g,k,w){g.id&&w(g.id,k,"Pattern"),g.superClass&&w(g.superClass,k,"Expression"),w(g.body,k)},b.ClassBody=function(g,k,w){for(var _=0,A=g.body;_<A.length;_+=1){var E=A[_];w(E,k)}},b.MethodDefinition=b.PropertyDefinition=b.Property=function(g,k,w){g.computed&&w(g.key,k,"Expression"),g.value&&w(g.value,k,"Expression")},t.ancestor=r,t.base=b,t.findNodeAfter=f,t.findNodeAround=l,t.findNodeAt=u,t.findNodeBefore=h,t.full=a,t.fullAncestor=o,t.make=p,t.recursive=i,t.simple=e}))});var I2=T(Ld=>{"use strict";y();Object.defineProperty(Ld,"__esModule",{value:!0});Ld.getWebComponentMap=xQ;Ld.findWebComponentReferences=k2;var g0=hr(),SQ=x2(),wQ=/^[a-z][-.\d_a-z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]*([-][-.\d_a-z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]*)$/u;async function xQ(t,{fs:e,getSourceCode:r}){let i=new Map,n=g0.path.join(t,"assets"),s=await(0,g0.recursiveReadDirectory)(e,n,([a])=>a.endsWith(".js"));return await Promise.all(s.map(a=>k2(a,n,r,i))),i}async function k2(t,e,r,i){let n=await r(t);if(n.type!=="javascript")return;let s=n.ast;if(!(s instanceof Error))for(let a of s.body)(0,SQ.ancestor)(a,{Literal(o,u,l){if(typeof o.value=="string"&&wQ.test(o.value)){let f=l.at(-2);if(!f||f.type!=="CallExpression")return;let h=f.callee;if(h.type!=="MemberExpression")return;let p=h.property;if(p.type!=="Identifier"||p.name!=="define")return;i.set(o.value,{assetName:g0.path.relative(t,e),range:[p.start,o.end]})}return null}})}});var T2=T(Qe=>{"use strict";y();var kQ=Qe&&Qe.__createBinding||(Object.create?(function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n)}):(function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]})),IQ=Qe&&Qe.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&kQ(e,t,r)};Object.defineProperty(Qe,"__esModule",{value:!0});Qe.toSvgSourceCode=Qe.toSourceCode=Qe.toJsSourceCode=Qe.toCssSourceCode=Qe.findWebComponentReferences=Qe.getWebComponentMap=Qe.serializeThemeGraph=Qe.buildThemeGraph=void 0;var AQ=b2();Object.defineProperty(Qe,"buildThemeGraph",{enumerable:!0,get:function(){return AQ.buildThemeGraph}});var TQ=S2();Object.defineProperty(Qe,"serializeThemeGraph",{enumerable:!0,get:function(){return TQ.serializeThemeGraph}});var A2=I2();Object.defineProperty(Qe,"getWebComponentMap",{enumerable:!0,get:function(){return A2.getWebComponentMap}});Object.defineProperty(Qe,"findWebComponentReferences",{enumerable:!0,get:function(){return A2.findWebComponentReferences}});var Pd=c0();Object.defineProperty(Qe,"toCssSourceCode",{enumerable:!0,get:function(){return Pd.toCssSourceCode}});Object.defineProperty(Qe,"toJsSourceCode",{enumerable:!0,get:function(){return Pd.toJsSourceCode}});Object.defineProperty(Qe,"toSourceCode",{enumerable:!0,get:function(){return Pd.toSourceCode}});Object.defineProperty(Qe,"toSvgSourceCode",{enumerable:!0,get:function(){return Pd.toSvgSourceCode}});IQ(Td(),Qe)});var N2=T((Whe,_0)=>{"use strict";y();var Ye=ae("path"),E2=ae("os"),qn=E2.homedir(),y0=E2.tmpdir(),{env:ao}=process,EQ=t=>{let e=Ye.join(qn,"Library");return{data:Ye.join(e,"Application Support",t),config:Ye.join(e,"Preferences",t),cache:Ye.join(e,"Caches",t),log:Ye.join(e,"Logs",t),temp:Ye.join(y0,t)}},OQ=t=>{let e=ao.APPDATA||Ye.join(qn,"AppData","Roaming"),r=ao.LOCALAPPDATA||Ye.join(qn,"AppData","Local");return{data:Ye.join(r,t,"Data"),config:Ye.join(e,t,"Config"),cache:Ye.join(r,t,"Cache"),log:Ye.join(r,t,"Log"),temp:Ye.join(y0,t)}},NQ=t=>{let e=Ye.basename(qn);return{data:Ye.join(ao.XDG_DATA_HOME||Ye.join(qn,".local","share"),t),config:Ye.join(ao.XDG_CONFIG_HOME||Ye.join(qn,".config"),t),cache:Ye.join(ao.XDG_CACHE_HOME||Ye.join(qn,".cache"),t),log:Ye.join(ao.XDG_STATE_HOME||Ye.join(qn,".local","state"),t),temp:Ye.join(y0,e,t)}},O2=(t,e)=>{if(typeof t!="string")throw new TypeError(`Expected string, got ${typeof t}`);return e=Object.assign({suffix:"nodejs"},e),e.suffix&&(t+=`-${e.suffix}`),process.platform==="darwin"?EQ(t):process.platform==="win32"?OQ(t):NQ(t)};_0.exports=O2;_0.exports.default=O2});var v0=T(ni=>{"use strict";y();Object.defineProperty(ni,"__esModule",{value:!0});ni.memoize=ni.memo=ni.tap=ni.identity=ni.noop=void 0;var LQ=()=>{};ni.noop=LQ;var PQ=t=>t;ni.identity=PQ;var qQ=t=>e=>(t(e),e);ni.tap=qQ;var L2=hr();Object.defineProperty(ni,"memo",{enumerable:!0,get:function(){return L2.memo}});Object.defineProperty(ni,"memoize",{enumerable:!0,get:function(){return L2.memoize}})});var k0=T(Ie=>{"use strict";y();var Rd=Ie&&Ie.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ie,"__esModule",{value:!0});Ie.Manifests=Ie.Resources=Ie.ThemeLiquidDocsSchemaRoot=Ie.ThemeLiquidDocsRoot=Ie.root=void 0;Ie.downloadSchema=P2;Ie.downloadResource=q2;Ie.download=S0;Ie.resourcePath=qd;Ie.resourceUrl=Cd;Ie.schemaPath=w0;Ie.schemaUrl=x0;Ie.exists=C2;Ie.downloadThemeLiquidDocs=FQ;var CQ=Rd(N2()),RQ=Rd(bw()),uc=Rd(ae("node:fs/promises")),b0=Rd(ae("node:path")),oc=v0(),MQ=(0,CQ.default)("theme-liquid-docs");Ie.root=MQ.cache;Ie.ThemeLiquidDocsRoot="https://raw.githubusercontent.com/Shopify/theme-liquid-docs/main";Ie.ThemeLiquidDocsSchemaRoot=`${Ie.ThemeLiquidDocsRoot}/schemas`;Ie.Resources=["filters","objects","tags","shopify_system_translations","manifest_theme","manifest_theme_app_extension"];Ie.Manifests={app:"manifest_theme_app_extension",theme:"manifest_theme"};var DQ={filters:"data/filters.json",objects:"data/objects.json",tags:"data/tags.json",latest:"data/latest.json",shopify_system_translations:"data/shopify_system_translations.json",manifest_theme:"schemas/manifest_theme.json",manifest_theme_app_extension:"schemas/manifest_theme_app_extension.json"};async function P2(t,e=Ie.root,r=oc.noop){let i=x0(t),n=w0(t,e),s=await S0(i,r);return await uc.default.writeFile(n,s,"utf8"),s}async function q2(t,e=Ie.root,r=oc.noop){let i=Cd(t),n=qd(t,e),s=await S0(i,r);return await uc.default.writeFile(n,s,"utf8"),s}async function S0(t,e){return t.startsWith("file:")?await uc.default.readFile(t.replace(/^file:/,""),"utf8").then((0,oc.tap)(()=>e(`Using local file: ${t}`))).catch(r=>{throw e(`Failed to read local file: ${t}`),r}):(await(0,RQ.default)(t)).text()}function qd(t,e=Ie.root){return b0.default.join(e,`${t}.json`)}function Cd(t){let e=DQ[t];return`${process.env.SHOPIFY_TLD_ROOT?`file:${process.env.SHOPIFY_TLD_ROOT}`:Ie.ThemeLiquidDocsRoot}/${e}`}function w0(t,e=Ie.root){return b0.default.resolve(e,b0.default.basename(t))}function x0(t){return`${process.env.SHOPIFY_TLD_ROOT?`file:${process.env.SHOPIFY_TLD_ROOT}`:Ie.ThemeLiquidDocsRoot}/schemas/${t}`}async function C2(t){try{return await uc.default.stat(t),!0}catch{return!1}}async function FQ(t,e){await C2(t)||await uc.default.mkdir(t);let r=["latest"].concat(Ie.Resources),i=await Promise.all(r.map(a=>q2(a,t,e).then((0,oc.tap)(()=>e(`Successfully downloaded latest resource:
|
|
1207
|
+
${Cd(a)}
|
|
1208
|
+
> ${qd(a,t)}`))).catch(o=>{throw e(`Failed to download latest resource:
|
|
1209
|
+
${Cd(a)} to
|
|
1210
|
+
${qd(a,t)}
|
|
1211
|
+
${o}`),o}))),s=Object.values(Ie.Manifests).map(a=>r.indexOf(a)).map(a=>i[a]).map(a=>JSON.parse(a)).flatMap(a=>a.schemas.map(o=>o.uri));await Promise.all(jQ(s).map(a=>P2(a,t,e).then((0,oc.tap)(()=>e(`Successfully downloaded schema:
|
|
1212
|
+
${x0(a)}
|
|
1213
|
+
> ${w0(a,t)}`))).catch(o=>{throw e(`Failed to download schema: ${a}, ${o}`),o})))}function jQ(t){return[...new Set(t).values()]}});var D2=T(oo=>{"use strict";y();var R2=oo&&oo.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(oo,"__esModule",{value:!0});oo.ThemeLiquidDocsManager=void 0;var lc=R2(ae("node:fs/promises")),Md=R2(ae("node:path")),Br=k0(),Ar=v0(),I0=class{log;constructor(e=Ar.noop){this.log=e}filters=(0,Ar.memo)(async()=>Cn(this.loaders("filters"),JSON.parse,[],this.log));objects=(0,Ar.memo)(async()=>Cn(this.loaders("objects"),JSON.parse,[],this.log));liquidDrops=(0,Ar.memo)(async()=>Cn(this.loaders("objects"),JSON.parse,[],this.log));tags=(0,Ar.memo)(async()=>Cn(this.loaders("tags"),JSON.parse,[],this.log));systemTranslations=(0,Ar.memo)(async()=>Cn(this.loaders("shopify_system_translations"),JSON.parse,{},this.log));schemas=(0,Ar.memoize)(e=>Cn(this.loaders(Br.Manifests[e]),JSON.parse,{schemas:[]},this.log).then(r=>Promise.all(r.schemas.map(async i=>({uri:`${Br.ThemeLiquidDocsSchemaRoot}/${i.uri}`,fileMatch:i.fileMatch,schema:await Cn(this.schemaLoaders(i.uri),Ar.identity,"",this.log)})))),Ar.identity);setup=(0,Ar.memo)(async()=>{try{await(0,Br.exists)(Br.root)||await lc.default.mkdir(Br.root,{recursive:!0});let e=await this.latestRevision();await(0,Br.downloadResource)("latest",Br.root,this.log);let r=await this.latestRevision();e!==r&&await(0,Br.downloadThemeLiquidDocs)(Br.root,this.log)}catch(e){e instanceof Error&&this.log(`Failed to setup with the following error: ${e.message}`);return}});async latestRevision(){return(await Cn([cc(()=>this.load("latest"),"loadLatestRevision")],JSON.parse,{},this.log)).revision??""}async loadResource(e){return await this.setup(),this.load(e).then((0,Ar.tap)(()=>this.log(`Loaded resource from ${(0,Br.resourcePath)(e)}`)))}async load(e){return lc.default.readFile((0,Br.resourcePath)(e),"utf8")}async loadSchema(e){return lc.default.readFile((0,Br.schemaPath)(e),"utf8").then((0,Ar.tap)(()=>this.log(`Loaded schema from ${(0,Br.schemaPath)(e)}`)))}loaders(e){return[cc(()=>this.loadResource(e),`loadResource(${e})`),cc(()=>BQ(e,this.log),`fallbackResource(${e})`)]}schemaLoaders(e){return[cc(()=>this.loadSchema(e),`loadSchema(${e})`),cc(()=>VQ(e,this.log),`fallbackSchema(${e})`)]}};oo.ThemeLiquidDocsManager=I0;function cc(t,e){return Object.assign(t,{loaderName:e})}async function Cn(t,e,r,i){for(let n of t)try{return e(await n())}catch(s){i(`Failed to load or transform ${n.loaderName} with the following error:
|
|
1214
|
+
${s instanceof Error?s.message:s}`);continue}return r}function M2(){return Md.default.resolve(__dirname,"./data")}async function BQ(t,e){let r=Md.default.resolve(M2(),`${t}.json`);return lc.default.readFile(r,"utf8").then((0,Ar.tap)(()=>e(`Loaded fallback resource
|
|
1215
|
+
${t} from
|
|
1216
|
+
${r}`)))}async function VQ(t,e){let r=Md.default.resolve(M2(),Md.default.basename(t));return lc.default.readFile(r,"utf8").then((0,Ar.tap)(()=>e(`Loaded fallback schema
|
|
1217
|
+
${t} from
|
|
1218
|
+
${r}`)))}});var F2=T(si=>{"use strict";y();Object.defineProperty(si,"__esModule",{value:!0});si.root=si.downloadThemeLiquidDocs=si.downloadResource=si.Resources=si.ThemeLiquidDocsManager=void 0;var $Q=D2();Object.defineProperty(si,"ThemeLiquidDocsManager",{enumerable:!0,get:function(){return $Q.ThemeLiquidDocsManager}});var Dd=k0();Object.defineProperty(si,"Resources",{enumerable:!0,get:function(){return Dd.Resources}});Object.defineProperty(si,"downloadResource",{enumerable:!0,get:function(){return Dd.downloadResource}});Object.defineProperty(si,"downloadThemeLiquidDocs",{enumerable:!0,get:function(){return Dd.downloadThemeLiquidDocs}});Object.defineProperty(si,"root",{enumerable:!0,get:function(){return Dd.root}})});var j2=T(A0=>{y();var $s=ae("path"),Mn=process.platform==="win32",Rn=ae("fs"),UQ=process.env.NODE_DEBUG&&/fs/.test(process.env.NODE_DEBUG);function HQ(){var t;if(UQ){var e=new Error;t=r}else t=i;return t;function r(n){n&&(e.message=n.message,n=e,i(n))}function i(n){if(n){if(process.throwDeprecation)throw n;if(!process.noDeprecation){var s="fs: missing callback "+(n.stack||n.message);process.traceDeprecation?console.trace(s):console.error(s)}}}}function GQ(t){return typeof t=="function"?t:HQ()}var rde=$s.normalize;Mn?fn=/(.*?)(?:[\/\\]+|$)/g:fn=/(.*?)(?:[\/]+|$)/g;var fn;Mn?fc=/^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/:fc=/^[\/]*/;var fc;A0.realpathSync=function(e,r){if(e=$s.resolve(e),r&&Object.prototype.hasOwnProperty.call(r,e))return r[e];var i=e,n={},s={},a,o,u,l;f();function f(){var b=fc.exec(e);a=b[0].length,o=b[0],u=b[0],l="",Mn&&!s[u]&&(Rn.lstatSync(u),s[u]=!0)}for(;a<e.length;){fn.lastIndex=a;var h=fn.exec(e);if(l=o,o+=h[0],u=l+h[1],a=fn.lastIndex,!(s[u]||r&&r[u]===u)){var p;if(r&&Object.prototype.hasOwnProperty.call(r,u))p=r[u];else{var m=Rn.lstatSync(u);if(!m.isSymbolicLink()){s[u]=!0,r&&(r[u]=u);continue}var v=null;if(!Mn){var S=m.dev.toString(32)+":"+m.ino.toString(32);n.hasOwnProperty(S)&&(v=n[S])}v===null&&(Rn.statSync(u),v=Rn.readlinkSync(u)),p=$s.resolve(l,v),r&&(r[u]=p),Mn||(n[S]=v)}e=$s.resolve(p,e.slice(a)),f()}}return r&&(r[i]=e),e};A0.realpath=function(e,r,i){if(typeof i!="function"&&(i=GQ(r),r=null),e=$s.resolve(e),r&&Object.prototype.hasOwnProperty.call(r,e))return process.nextTick(i.bind(null,null,r[e]));var n=e,s={},a={},o,u,l,f;h();function h(){var b=fc.exec(e);o=b[0].length,u=b[0],l=b[0],f="",Mn&&!a[l]?Rn.lstat(l,function(g){if(g)return i(g);a[l]=!0,p()}):process.nextTick(p)}function p(){if(o>=e.length)return r&&(r[n]=e),i(null,e);fn.lastIndex=o;var b=fn.exec(e);return f=u,u+=b[0],l=f+b[1],o=fn.lastIndex,a[l]||r&&r[l]===l?process.nextTick(p):r&&Object.prototype.hasOwnProperty.call(r,l)?S(r[l]):Rn.lstat(l,m)}function m(b,g){if(b)return i(b);if(!g.isSymbolicLink())return a[l]=!0,r&&(r[l]=l),process.nextTick(p);if(!Mn){var k=g.dev.toString(32)+":"+g.ino.toString(32);if(s.hasOwnProperty(k))return v(null,s[k],l)}Rn.stat(l,function(w){if(w)return i(w);Rn.readlink(l,function(_,A){Mn||(s[k]=A),v(_,A)})})}function v(b,g,k){if(b)return i(b);var w=$s.resolve(f,g);r&&(r[k]=w),S(w)}function S(b){e=$s.resolve(b,e.slice(o)),h()}}});var N0=T((sde,U2)=>{y();U2.exports=Dn;Dn.realpath=Dn;Dn.sync=O0;Dn.realpathSync=O0;Dn.monkeypatch=zQ;Dn.unmonkeypatch=JQ;var uo=ae("fs"),T0=uo.realpath,E0=uo.realpathSync,WQ=process.version,B2=/^v[0-5]\./.test(WQ),V2=j2();function $2(t){return t&&t.syscall==="realpath"&&(t.code==="ELOOP"||t.code==="ENOMEM"||t.code==="ENAMETOOLONG")}function Dn(t,e,r){if(B2)return T0(t,e,r);typeof e=="function"&&(r=e,e=null),T0(t,e,function(i,n){$2(i)?V2.realpath(t,e,r):r(i,n)})}function O0(t,e){if(B2)return E0(t,e);try{return E0(t,e)}catch(r){if($2(r))return V2.realpathSync(t,e);throw r}}function zQ(){uo.realpath=Dn,uo.realpathSync=O0}function JQ(){uo.realpath=T0,uo.realpathSync=E0}});var G2=T((ode,H2)=>{y();var KQ=typeof process=="object"&&process&&process.platform==="win32";H2.exports=KQ?{sep:"\\"}:{sep:"/"}});var jd=T((lde,R0)=>{y();var Vr=R0.exports=(t,e,r={})=>(Fd(e),!r.nocomment&&e.charAt(0)==="#"?!1:new co(e,r).match(t));R0.exports=Vr;var q0=G2();Vr.sep=q0.sep;var dr=Symbol("globstar **");Vr.GLOBSTAR=dr;var QQ=u4(),W2={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},C0="[^/]",L0=C0+"*?",YQ="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",XQ="(?:(?!(?:\\/|^)\\.).)*?",K2=t=>t.split("").reduce((e,r)=>(e[r]=!0,e),{}),z2=K2("().*{}+?[]^$\\!"),ZQ=K2("[.("),J2=/\/+/;Vr.filter=(t,e={})=>(r,i,n)=>Vr(r,t,e);var Fn=(t,e={})=>{let r={};return Object.keys(t).forEach(i=>r[i]=t[i]),Object.keys(e).forEach(i=>r[i]=e[i]),r};Vr.defaults=t=>{if(!t||typeof t!="object"||!Object.keys(t).length)return Vr;let e=Vr,r=(i,n,s)=>e(i,n,Fn(t,s));return r.Minimatch=class extends e.Minimatch{constructor(n,s){super(n,Fn(t,s))}},r.Minimatch.defaults=i=>e.defaults(Fn(t,i)).Minimatch,r.filter=(i,n)=>e.filter(i,Fn(t,n)),r.defaults=i=>e.defaults(Fn(t,i)),r.makeRe=(i,n)=>e.makeRe(i,Fn(t,n)),r.braceExpand=(i,n)=>e.braceExpand(i,Fn(t,n)),r.match=(i,n,s)=>e.match(i,n,Fn(t,s)),r};Vr.braceExpand=(t,e)=>Q2(t,e);var Q2=(t,e={})=>(Fd(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:QQ(t)),eY=1024*64,Fd=t=>{if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>eY)throw new TypeError("pattern is too long")},P0=Symbol("subparse");Vr.makeRe=(t,e)=>new co(t,e||{}).makeRe();Vr.match=(t,e,r={})=>{let i=new co(e,r);return t=t.filter(n=>i.match(n)),i.options.nonull&&!t.length&&t.push(e),t};var tY=t=>t.replace(/\\(.)/g,"$1"),rY=t=>t.replace(/\\([^-\]])/g,"$1"),iY=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),nY=t=>t.replace(/[[\]\\]/g,"\\$&"),co=class{constructor(e,r){Fd(e),r||(r={}),this.options=r,this.maxGlobstarRecursion=r.maxGlobstarRecursion!==void 0?r.maxGlobstarRecursion:200,this.set=[],this.pattern=e,this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.make()}debug(){}make(){let e=this.pattern,r=this.options;if(!r.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate();let i=this.globSet=this.braceExpand();r.debug&&(this.debug=(...n)=>console.error(...n)),this.debug(this.pattern,i),i=this.globParts=i.map(n=>n.split(J2)),this.debug(this.pattern,i),i=i.map((n,s,a)=>n.map(this.parse,this)),this.debug(this.pattern,i),i=i.filter(n=>n.indexOf(!1)===-1),this.debug(this.pattern,i),this.set=i}parseNegate(){if(this.options.nonegate)return;let e=this.pattern,r=!1,i=0;for(let n=0;n<e.length&&e.charAt(n)==="!";n++)r=!r,i++;i&&(this.pattern=e.slice(i)),this.negate=r}matchOne(e,r,i){return r.indexOf(dr)!==-1?this._matchGlobstar(e,r,i,0,0):this._matchOne(e,r,i,0,0)}_matchGlobstar(e,r,i,n,s){let a=-1;for(let k=s;k<r.length;k++)if(r[k]===dr){a=k;break}let o=-1;for(let k=r.length-1;k>=0;k--)if(r[k]===dr){o=k;break}let u=r.slice(s,a),l=i?r.slice(a+1):r.slice(a+1,o),f=i?[]:r.slice(o+1);if(u.length){let k=e.slice(n,n+u.length);if(!this._matchOne(k,u,i,0,0))return!1;n+=u.length}let h=0;if(f.length){if(f.length+n>e.length)return!1;let k=e.length-f.length;if(this._matchOne(e,f,i,k,0))h=f.length;else{if(e[e.length-1]!==""||n+f.length===e.length||!this._matchOne(e,f,i,k-1,0))return!1;h=f.length+1}}if(!l.length){let k=!!h;for(let w=n;w<e.length-h;w++){let _=String(e[w]);if(k=!0,_==="."||_===".."||!this.options.dot&&_.charAt(0)===".")return!1}return i||k}let p=[[[],0]],m=p[0],v=0,S=[0];for(let k of l)k===dr?(S.push(v),m=[[],0],p.push(m)):(m[0].push(k),v++);let b=p.length-1,g=e.length-h;for(let k of p)k[1]=g-(S[b--]+k[0].length);return!!this._matchGlobStarBodySections(e,p,n,0,i,0,!!h)}_matchGlobStarBodySections(e,r,i,n,s,a,o){let u=r[n];if(!u){for(let h=i;h<e.length;h++){o=!0;let p=e[h];if(p==="."||p===".."||!this.options.dot&&p.charAt(0)===".")return!1}return o}let[l,f]=u;for(;i<=f;){if(this._matchOne(e.slice(0,i+l.length),l,s,i,0)&&a<this.maxGlobstarRecursion){let m=this._matchGlobStarBodySections(e,r,i+l.length,n+1,s,a+1,o);if(m!==!1)return m}let p=e[i];if(p==="."||p===".."||!this.options.dot&&p.charAt(0)===".")return!1;i++}return s||null}_matchOne(e,r,i,n,s){let a,o,u,l;for(a=n,o=s,u=e.length,l=r.length;a<u&&o<l;a++,o++){this.debug("matchOne loop");let f=r[o],h=e[a];if(this.debug(r,f,h),f===!1||f===dr)return!1;let p;if(typeof f=="string"?(p=h===f,this.debug("string match",f,h,p)):(p=h.match(f),this.debug("pattern match",f,h,p)),!p)return!1}if(a===u&&o===l)return!0;if(a===u)return i;if(o===l)return a===u-1&&e[a]==="";throw new Error("wtf?")}braceExpand(){return Q2(this.pattern,this.options)}parse(e,r){Fd(e);let i=this.options;if(e==="**")if(i.noglobstar)e="*";else return dr;if(e==="")return"";let n="",s=!1,a=!1,o=[],u=[],l,f=!1,h=-1,p=-1,m,v,S,b=e.charAt(0)===".",g=i.dot||b,k=()=>b?"":g?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",w=O=>O.charAt(0)==="."?"":i.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",_=()=>{if(l){switch(l){case"*":n+=L0,s=!0;break;case"?":n+=C0,s=!0;break;default:n+="\\"+l;break}this.debug("clearStateChar %j %j",l,n),l=!1}};for(let O=0,L;O<e.length&&(L=e.charAt(O));O++){if(this.debug("%s %s %s %j",e,O,n,L),a){if(L==="/")return!1;z2[L]&&(n+="\\"),n+=L,a=!1;continue}switch(L){case"/":return!1;case"\\":if(f&&e.charAt(O+1)==="-"){n+=L;continue}_(),a=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s %s %s %j <-- stateChar",e,O,n,L),f){this.debug(" in class"),L==="!"&&O===p+1&&(L="^"),n+=L;continue}if(L==="*"&&l==="*")continue;this.debug("call clearStateChar %j",l),_(),l=L,i.noext&&_();continue;case"(":{if(f){n+="(";continue}if(!l){n+="\\(";continue}let B={type:l,start:O-1,reStart:n.length,open:W2[l].open,close:W2[l].close};this.debug(this.pattern," ",B),o.push(B),n+=B.open,B.start===0&&B.type!=="!"&&(b=!0,n+=w(e.slice(O+1))),this.debug("plType %j %j",l,n),l=!1;continue}case")":{let B=o[o.length-1];if(f||!B){n+="\\)";continue}o.pop(),_(),s=!0,v=B,n+=v.close,v.type==="!"&&u.push(Object.assign(v,{reEnd:n.length}));continue}case"|":{let B=o[o.length-1];if(f||!B){n+="\\|";continue}_(),n+="|",B.start===0&&B.type!=="!"&&(b=!0,n+=w(e.slice(O+1)));continue}case"[":if(_(),f){n+="\\"+L;continue}f=!0,p=O,h=n.length,n+=L;continue;case"]":if(O===p+1||!f){n+="\\"+L;continue}m=e.substring(p+1,O);try{RegExp("["+nY(rY(m))+"]"),n+=L}catch{n=n.substring(0,h)+"(?:$.)"}s=!0,f=!1;continue;default:_(),z2[L]&&!(L==="^"&&f)&&(n+="\\"),n+=L;break}}for(f&&(m=e.slice(p+1),S=this.parse(m,P0),n=n.substring(0,h)+"\\["+S[0],s=s||S[1]),v=o.pop();v;v=o.pop()){let O;O=n.slice(v.reStart+v.open.length),this.debug("setting tail",n,v),O=O.replace(/((?:\\{2}){0,64})(\\?)\|/g,(B,R,q)=>(q||(q="\\"),R+R+q+"|")),this.debug(`tail=%j
|
|
1219
|
+
%s`,O,O,v,n);let L=v.type==="*"?L0:v.type==="?"?C0:"\\"+v.type;s=!0,n=n.slice(0,v.reStart)+L+"\\("+O}_(),a&&(n+="\\\\");let A=ZQ[n.charAt(0)];for(let O=u.length-1;O>-1;O--){let L=u[O],B=n.slice(0,L.reStart),R=n.slice(L.reStart,L.reEnd-8),q=n.slice(L.reEnd),P=n.slice(L.reEnd-8,L.reEnd)+q,$=B.split(")").length,V=B.split("(").length-$,C=q;for(let U=0;U<V;U++)C=C.replace(/\)[+*?]?/,"");q=C;let F=q===""&&r!==P0?"(?:$|\\/)":"";n=B+R+q+F+P}if(n!==""&&s&&(n="(?=.)"+n),A&&(n=k()+n),r===P0)return[n,s];if(i.nocase&&!s&&(s=e.toUpperCase()!==e.toLowerCase()),!s)return tY(e);let E=i.nocase?"i":"";try{return Object.assign(new RegExp("^"+n+"$",E),{_glob:e,_src:n})}catch{return new RegExp("$.")}}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let r=this.options,i=r.noglobstar?L0:r.dot?YQ:XQ,n=r.nocase?"i":"",s=e.map(a=>(a=a.map(o=>typeof o=="string"?iY(o):o===dr?dr:o._src).reduce((o,u)=>(o[o.length-1]===dr&&u===dr||o.push(u),o),[]),a.forEach((o,u)=>{o!==dr||a[u-1]===dr||(u===0?a.length>1?a[u+1]="(?:\\/|"+i+"\\/)?"+a[u+1]:a[u]=i:u===a.length-1?a[u-1]+="(?:\\/|"+i+")?":(a[u-1]+="(?:\\/|\\/"+i+"\\/)"+a[u+1],a[u+1]=dr))}),a.filter(o=>o!==dr).join("/"))).join("|");s="^(?:"+s+")$",this.negate&&(s="^(?!"+s+").*$");try{this.regexp=new RegExp(s,n)}catch{this.regexp=!1}return this.regexp}match(e,r=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;let i=this.options;q0.sep!=="/"&&(e=e.split(q0.sep).join("/")),e=e.split(J2),this.debug(this.pattern,"split",e);let n=this.set;this.debug(this.pattern,"set",n);let s;for(let a=e.length-1;a>=0&&(s=e[a],!s);a--);for(let a=0;a<n.length;a++){let o=n[a],u=e;if(i.matchBase&&o.length===1&&(u=[s]),this.matchOne(u,o,r))return i.flipNegate?!0:!this.negate}return i.flipNegate?!1:this.negate}static defaults(e){return Vr.defaults(e).Minimatch}};Vr.Minimatch=co});var D0=T(jn=>{y();jn.setopts=lY;jn.ownProp=Y2;jn.makeAbs=pc;jn.finish=fY;jn.mark=pY;jn.isIgnored=Z2;jn.childrenIgnored=hY;function Y2(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var sY=ae("fs"),Us=ae("path"),aY=jd(),X2=ae("path").isAbsolute,M0=aY.Minimatch;function oY(t,e){return t.localeCompare(e,"en")}function uY(t,e){t.ignore=e.ignore||[],Array.isArray(t.ignore)||(t.ignore=[t.ignore]),t.ignore.length&&(t.ignore=t.ignore.map(cY))}function cY(t){var e=null;if(t.slice(-3)==="/**"){var r=t.replace(/(\/\*\*)+$/,"");e=new M0(r,{dot:!0})}return{matcher:new M0(t,{dot:!0}),gmatcher:e}}function lY(t,e,r){if(r||(r={}),r.matchBase&&e.indexOf("/")===-1){if(r.noglobstar)throw new Error("base matching requires globstar");e="**/"+e}t.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,t.windowsPathsNoEscape&&(e=e.replace(/\\/g,"/")),t.silent=!!r.silent,t.pattern=e,t.strict=r.strict!==!1,t.realpath=!!r.realpath,t.realpathCache=r.realpathCache||Object.create(null),t.follow=!!r.follow,t.dot=!!r.dot,t.mark=!!r.mark,t.nodir=!!r.nodir,t.nodir&&(t.mark=!0),t.sync=!!r.sync,t.nounique=!!r.nounique,t.nonull=!!r.nonull,t.nosort=!!r.nosort,t.nocase=!!r.nocase,t.stat=!!r.stat,t.noprocess=!!r.noprocess,t.absolute=!!r.absolute,t.fs=r.fs||sY,t.maxLength=r.maxLength||1/0,t.cache=r.cache||Object.create(null),t.statCache=r.statCache||Object.create(null),t.symlinks=r.symlinks||Object.create(null),uY(t,r),t.changedCwd=!1;var i=process.cwd();Y2(r,"cwd")?(t.cwd=Us.resolve(r.cwd),t.changedCwd=t.cwd!==i):t.cwd=Us.resolve(i),t.root=r.root||Us.resolve(t.cwd,"/"),t.root=Us.resolve(t.root),t.cwdAbs=X2(t.cwd)?t.cwd:pc(t,t.cwd),t.nomount=!!r.nomount,process.platform==="win32"&&(t.root=t.root.replace(/\\/g,"/"),t.cwd=t.cwd.replace(/\\/g,"/"),t.cwdAbs=t.cwdAbs.replace(/\\/g,"/")),r.nonegate=!0,r.nocomment=!0,t.minimatch=new M0(e,r),t.options=t.minimatch.options}function fY(t){for(var e=t.nounique,r=e?[]:Object.create(null),i=0,n=t.matches.length;i<n;i++){var s=t.matches[i];if(!s||Object.keys(s).length===0){if(t.nonull){var a=t.minimatch.globSet[i];e?r.push(a):r[a]=!0}}else{var o=Object.keys(s);e?r.push.apply(r,o):o.forEach(function(u){r[u]=!0})}}if(e||(r=Object.keys(r)),t.nosort||(r=r.sort(oY)),t.mark){for(var i=0;i<r.length;i++)r[i]=t._mark(r[i]);t.nodir&&(r=r.filter(function(u){var l=!/\/$/.test(u),f=t.cache[u]||t.cache[pc(t,u)];return l&&f&&(l=f!=="DIR"&&!Array.isArray(f)),l}))}t.ignore.length&&(r=r.filter(function(u){return!Z2(t,u)})),t.found=r}function pY(t,e){var r=pc(t,e),i=t.cache[r],n=e;if(i){var s=i==="DIR"||Array.isArray(i),a=e.slice(-1)==="/";if(s&&!a?n+="/":!s&&a&&(n=n.slice(0,-1)),n!==e){var o=pc(t,n);t.statCache[o]=t.statCache[r],t.cache[o]=t.cache[r]}}return n}function pc(t,e){var r=e;return e.charAt(0)==="/"?r=Us.join(t.root,e):X2(e)||e===""?r=e:t.changedCwd?r=Us.resolve(t.cwd,e):r=Us.resolve(e),process.platform==="win32"&&(r=r.replace(/\\/g,"/")),r}function Z2(t,e){return t.ignore.length?t.ignore.some(function(r){return r.matcher.match(e)||!!(r.gmatcher&&r.gmatcher.match(e))}):!1}function hY(t,e){return t.ignore.length?t.ignore.some(function(r){return!!(r.gmatcher&&r.gmatcher.match(e))}):!1}});var nR=T((yde,iR)=>{y();iR.exports=rR;rR.GlobSync=kt;var dY=N0(),eR=jd(),dde=eR.Minimatch,mde=Vd().Glob,gde=ae("util"),F0=ae("path"),tR=ae("assert"),Bd=ae("path").isAbsolute,Hs=D0(),mY=Hs.setopts,j0=Hs.ownProp,gY=Hs.childrenIgnored,yY=Hs.isIgnored;function rR(t,e){if(typeof e=="function"||arguments.length===3)throw new TypeError(`callback provided to sync glob
|
|
1220
|
+
See: https://github.com/isaacs/node-glob/issues/167`);return new kt(t,e).found}function kt(t,e){if(!t)throw new Error("must provide pattern");if(typeof e=="function"||arguments.length===3)throw new TypeError(`callback provided to sync glob
|
|
1221
|
+
See: https://github.com/isaacs/node-glob/issues/167`);if(!(this instanceof kt))return new kt(t,e);if(mY(this,t,e),this.noprocess)return this;var r=this.minimatch.set.length;this.matches=new Array(r);for(var i=0;i<r;i++)this._process(this.minimatch.set[i],i,!1);this._finish()}kt.prototype._finish=function(){if(tR.ok(this instanceof kt),this.realpath){var t=this;this.matches.forEach(function(e,r){var i=t.matches[r]=Object.create(null);for(var n in e)try{n=t._makeAbs(n);var s=dY.realpathSync(n,t.realpathCache);i[s]=!0}catch(a){if(a.syscall==="stat")i[t._makeAbs(n)]=!0;else throw a}})}Hs.finish(this)};kt.prototype._process=function(t,e,r){tR.ok(this instanceof kt);for(var i=0;typeof t[i]=="string";)i++;var n;switch(i){case t.length:this._processSimple(t.join("/"),e);return;case 0:n=null;break;default:n=t.slice(0,i).join("/");break}var s=t.slice(i),a;n===null?a=".":((Bd(n)||Bd(t.map(function(l){return typeof l=="string"?l:"[*]"}).join("/")))&&(!n||!Bd(n))&&(n="/"+n),a=n);var o=this._makeAbs(a);if(!gY(this,a)){var u=s[0]===eR.GLOBSTAR;u?this._processGlobStar(n,a,o,s,e,r):this._processReaddir(n,a,o,s,e,r)}};kt.prototype._processReaddir=function(t,e,r,i,n,s){var a=this._readdir(r,s);if(a){for(var o=i[0],u=!!this.minimatch.negate,l=o._glob,f=this.dot||l.charAt(0)===".",h=[],p=0;p<a.length;p++){var m=a[p];if(m.charAt(0)!=="."||f){var v;u&&!t?v=!m.match(o):v=m.match(o),v&&h.push(m)}}var S=h.length;if(S!==0){if(i.length===1&&!this.mark&&!this.stat){this.matches[n]||(this.matches[n]=Object.create(null));for(var p=0;p<S;p++){var m=h[p];t&&(t.slice(-1)!=="/"?m=t+"/"+m:m=t+m),m.charAt(0)==="/"&&!this.nomount&&(m=F0.join(this.root,m)),this._emitMatch(n,m)}return}i.shift();for(var p=0;p<S;p++){var m=h[p],b;t?b=[t,m]:b=[m],this._process(b.concat(i),n,s)}}}};kt.prototype._emitMatch=function(t,e){if(!yY(this,e)){var r=this._makeAbs(e);if(this.mark&&(e=this._mark(e)),this.absolute&&(e=r),!this.matches[t][e]){if(this.nodir){var i=this.cache[r];if(i==="DIR"||Array.isArray(i))return}this.matches[t][e]=!0,this.stat&&this._stat(e)}}};kt.prototype._readdirInGlobStar=function(t){if(this.follow)return this._readdir(t,!1);var e,r,i;try{r=this.fs.lstatSync(t)}catch(s){if(s.code==="ENOENT")return null}var n=r&&r.isSymbolicLink();return this.symlinks[t]=n,!n&&r&&!r.isDirectory()?this.cache[t]="FILE":e=this._readdir(t,!1),e};kt.prototype._readdir=function(t,e){var r;if(e&&!j0(this.symlinks,t))return this._readdirInGlobStar(t);if(j0(this.cache,t)){var i=this.cache[t];if(!i||i==="FILE")return null;if(Array.isArray(i))return i}try{return this._readdirEntries(t,this.fs.readdirSync(t))}catch(n){return this._readdirError(t,n),null}};kt.prototype._readdirEntries=function(t,e){if(!this.mark&&!this.stat)for(var r=0;r<e.length;r++){var i=e[r];t==="/"?i=t+i:i=t+"/"+i,this.cache[i]=!0}return this.cache[t]=e,e};kt.prototype._readdirError=function(t,e){switch(e.code){case"ENOTSUP":case"ENOTDIR":var r=this._makeAbs(t);if(this.cache[r]="FILE",r===this.cwdAbs){var i=new Error(e.code+" invalid cwd "+this.cwd);throw i.path=this.cwd,i.code=e.code,i}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(t)]=!1;break;default:if(this.cache[this._makeAbs(t)]=!1,this.strict)throw e;this.silent||console.error("glob error",e);break}};kt.prototype._processGlobStar=function(t,e,r,i,n,s){var a=this._readdir(r,s);if(a){var o=i.slice(1),u=t?[t]:[],l=u.concat(o);this._process(l,n,!1);var f=a.length,h=this.symlinks[r];if(!(h&&s))for(var p=0;p<f;p++){var m=a[p];if(!(m.charAt(0)==="."&&!this.dot)){var v=u.concat(a[p],o);this._process(v,n,!0);var S=u.concat(a[p],i);this._process(S,n,!0)}}}};kt.prototype._processSimple=function(t,e){var r=this._stat(t);if(this.matches[e]||(this.matches[e]=Object.create(null)),!!r){if(t&&Bd(t)&&!this.nomount){var i=/[\/\\]$/.test(t);t.charAt(0)==="/"?t=F0.join(this.root,t):(t=F0.resolve(this.root,t),i&&(t+="/"))}process.platform==="win32"&&(t=t.replace(/\\/g,"/")),this._emitMatch(e,t)}};kt.prototype._stat=function(t){var e=this._makeAbs(t),r=t.slice(-1)==="/";if(t.length>this.maxLength)return!1;if(!this.stat&&j0(this.cache,e)){var a=this.cache[e];if(Array.isArray(a)&&(a="DIR"),!r||a==="DIR")return a;if(r&&a==="FILE")return!1}var i,n=this.statCache[e];if(!n){var s;try{s=this.fs.lstatSync(e)}catch(o){if(o&&(o.code==="ENOENT"||o.code==="ENOTDIR"))return this.statCache[e]=!1,!1}if(s&&s.isSymbolicLink())try{n=this.fs.statSync(e)}catch{n=s}else n=s}this.statCache[e]=n;var a=!0;return n&&(a=n.isDirectory()?"DIR":"FILE"),this.cache[e]=this.cache[e]||a,r&&a==="FILE"?!1:a};kt.prototype._mark=function(t){return Hs.mark(this,t)};kt.prototype._makeAbs=function(t){return Hs.makeAbs(this,t)}});var aR=T((vde,sR)=>{y();var _Y=c4(),hc=Object.create(null),vY=Sw();sR.exports=_Y(bY);function bY(t,e){return hc[t]?(hc[t].push(e),null):(hc[t]=[e],SY(t))}function SY(t){return vY(function e(){var r=hc[t],i=r.length,n=wY(arguments);try{for(var s=0;s<i;s++)r[s].apply(null,n)}finally{r.length>i?(r.splice(0,i),process.nextTick(function(){e.apply(null,n)})):delete hc[t]}})}function wY(t){for(var e=t.length,r=[],i=0;i<e;i++)r[i]=t[i];return r}});var Vd=T((xde,uR)=>{y();uR.exports=Gs;var xY=N0(),oR=jd(),Sde=oR.Minimatch,kY=f4(),IY=ae("events").EventEmitter,B0=ae("path"),V0=ae("assert"),dc=ae("path").isAbsolute,U0=nR(),Ws=D0(),AY=Ws.setopts,$0=Ws.ownProp,H0=aR(),wde=ae("util"),TY=Ws.childrenIgnored,EY=Ws.isIgnored,OY=Sw();function Gs(t,e,r){if(typeof e=="function"&&(r=e,e={}),e||(e={}),e.sync){if(r)throw new TypeError("callback provided to sync glob");return U0(t,e)}return new Ne(t,e,r)}Gs.sync=U0;var NY=Gs.GlobSync=U0.GlobSync;Gs.glob=Gs;function LY(t,e){if(e===null||typeof e!="object")return t;for(var r=Object.keys(e),i=r.length;i--;)t[r[i]]=e[r[i]];return t}Gs.hasMagic=function(t,e){var r=LY({},e);r.noprocess=!0;var i=new Ne(t,r),n=i.minimatch.set;if(!t)return!1;if(n.length>1)return!0;for(var s=0;s<n[0].length;s++)if(typeof n[0][s]!="string")return!0;return!1};Gs.Glob=Ne;kY(Ne,IY);function Ne(t,e,r){if(typeof e=="function"&&(r=e,e=null),e&&e.sync){if(r)throw new TypeError("callback provided to sync glob");return new NY(t,e)}if(!(this instanceof Ne))return new Ne(t,e,r);AY(this,t,e),this._didRealPath=!1;var i=this.minimatch.set.length;this.matches=new Array(i),typeof r=="function"&&(r=OY(r),this.on("error",r),this.on("end",function(u){r(null,u)}));var n=this;if(this._processing=0,this._emitQueue=[],this._processQueue=[],this.paused=!1,this.noprocess)return this;if(i===0)return o();for(var s=!0,a=0;a<i;a++)this._process(this.minimatch.set[a],a,!1,o);s=!1;function o(){--n._processing,n._processing<=0&&(s?process.nextTick(function(){n._finish()}):n._finish())}}Ne.prototype._finish=function(){if(V0(this instanceof Ne),!this.aborted){if(this.realpath&&!this._didRealpath)return this._realpath();Ws.finish(this),this.emit("end",this.found)}};Ne.prototype._realpath=function(){if(this._didRealpath)return;this._didRealpath=!0;var t=this.matches.length;if(t===0)return this._finish();for(var e=this,r=0;r<this.matches.length;r++)this._realpathSet(r,i);function i(){--t===0&&e._finish()}};Ne.prototype._realpathSet=function(t,e){var r=this.matches[t];if(!r)return e();var i=Object.keys(r),n=this,s=i.length;if(s===0)return e();var a=this.matches[t]=Object.create(null);i.forEach(function(o,u){o=n._makeAbs(o),xY.realpath(o,n.realpathCache,function(l,f){l?l.syscall==="stat"?a[o]=!0:n.emit("error",l):a[f]=!0,--s===0&&(n.matches[t]=a,e())})})};Ne.prototype._mark=function(t){return Ws.mark(this,t)};Ne.prototype._makeAbs=function(t){return Ws.makeAbs(this,t)};Ne.prototype.abort=function(){this.aborted=!0,this.emit("abort")};Ne.prototype.pause=function(){this.paused||(this.paused=!0,this.emit("pause"))};Ne.prototype.resume=function(){if(this.paused){if(this.emit("resume"),this.paused=!1,this._emitQueue.length){var t=this._emitQueue.slice(0);this._emitQueue.length=0;for(var e=0;e<t.length;e++){var r=t[e];this._emitMatch(r[0],r[1])}}if(this._processQueue.length){var i=this._processQueue.slice(0);this._processQueue.length=0;for(var e=0;e<i.length;e++){var n=i[e];this._processing--,this._process(n[0],n[1],n[2],n[3])}}}};Ne.prototype._process=function(t,e,r,i){if(V0(this instanceof Ne),V0(typeof i=="function"),!this.aborted){if(this._processing++,this.paused){this._processQueue.push([t,e,r,i]);return}for(var n=0;typeof t[n]=="string";)n++;var s;switch(n){case t.length:this._processSimple(t.join("/"),e,i);return;case 0:s=null;break;default:s=t.slice(0,n).join("/");break}var a=t.slice(n),o;s===null?o=".":((dc(s)||dc(t.map(function(f){return typeof f=="string"?f:"[*]"}).join("/")))&&(!s||!dc(s))&&(s="/"+s),o=s);var u=this._makeAbs(o);if(TY(this,o))return i();var l=a[0]===oR.GLOBSTAR;l?this._processGlobStar(s,o,u,a,e,r,i):this._processReaddir(s,o,u,a,e,r,i)}};Ne.prototype._processReaddir=function(t,e,r,i,n,s,a){var o=this;this._readdir(r,s,function(u,l){return o._processReaddir2(t,e,r,i,n,s,l,a)})};Ne.prototype._processReaddir2=function(t,e,r,i,n,s,a,o){if(!a)return o();for(var u=i[0],l=!!this.minimatch.negate,f=u._glob,h=this.dot||f.charAt(0)===".",p=[],m=0;m<a.length;m++){var v=a[m];if(v.charAt(0)!=="."||h){var S;l&&!t?S=!v.match(u):S=v.match(u),S&&p.push(v)}}var b=p.length;if(b===0)return o();if(i.length===1&&!this.mark&&!this.stat){this.matches[n]||(this.matches[n]=Object.create(null));for(var m=0;m<b;m++){var v=p[m];t&&(t!=="/"?v=t+"/"+v:v=t+v),v.charAt(0)==="/"&&!this.nomount&&(v=B0.join(this.root,v)),this._emitMatch(n,v)}return o()}i.shift();for(var m=0;m<b;m++){var v=p[m],g;t&&(t!=="/"?v=t+"/"+v:v=t+v),this._process([v].concat(i),n,s,o)}o()};Ne.prototype._emitMatch=function(t,e){if(!this.aborted&&!EY(this,e)){if(this.paused){this._emitQueue.push([t,e]);return}var r=dc(e)?e:this._makeAbs(e);if(this.mark&&(e=this._mark(e)),this.absolute&&(e=r),!this.matches[t][e]){if(this.nodir){var i=this.cache[r];if(i==="DIR"||Array.isArray(i))return}this.matches[t][e]=!0;var n=this.statCache[r];n&&this.emit("stat",e,n),this.emit("match",e)}}};Ne.prototype._readdirInGlobStar=function(t,e){if(this.aborted)return;if(this.follow)return this._readdir(t,!1,e);var r="lstat\0"+t,i=this,n=H0(r,s);n&&i.fs.lstat(t,n);function s(a,o){if(a&&a.code==="ENOENT")return e();var u=o&&o.isSymbolicLink();i.symlinks[t]=u,!u&&o&&!o.isDirectory()?(i.cache[t]="FILE",e()):i._readdir(t,!1,e)}};Ne.prototype._readdir=function(t,e,r){if(!this.aborted&&(r=H0("readdir\0"+t+"\0"+e,r),!!r)){if(e&&!$0(this.symlinks,t))return this._readdirInGlobStar(t,r);if($0(this.cache,t)){var i=this.cache[t];if(!i||i==="FILE")return r();if(Array.isArray(i))return r(null,i)}var n=this;n.fs.readdir(t,PY(this,t,r))}};function PY(t,e,r){return function(i,n){i?t._readdirError(e,i,r):t._readdirEntries(e,n,r)}}Ne.prototype._readdirEntries=function(t,e,r){if(!this.aborted){if(!this.mark&&!this.stat)for(var i=0;i<e.length;i++){var n=e[i];t==="/"?n=t+n:n=t+"/"+n,this.cache[n]=!0}return this.cache[t]=e,r(null,e)}};Ne.prototype._readdirError=function(t,e,r){if(!this.aborted){switch(e.code){case"ENOTSUP":case"ENOTDIR":var i=this._makeAbs(t);if(this.cache[i]="FILE",i===this.cwdAbs){var n=new Error(e.code+" invalid cwd "+this.cwd);n.path=this.cwd,n.code=e.code,this.emit("error",n),this.abort()}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(t)]=!1;break;default:this.cache[this._makeAbs(t)]=!1,this.strict&&(this.emit("error",e),this.abort()),this.silent||console.error("glob error",e);break}return r()}};Ne.prototype._processGlobStar=function(t,e,r,i,n,s,a){var o=this;this._readdir(r,s,function(u,l){o._processGlobStar2(t,e,r,i,n,s,l,a)})};Ne.prototype._processGlobStar2=function(t,e,r,i,n,s,a,o){if(!a)return o();var u=i.slice(1),l=t?[t]:[],f=l.concat(u);this._process(f,n,!1,o);var h=this.symlinks[r],p=a.length;if(h&&s)return o();for(var m=0;m<p;m++){var v=a[m];if(!(v.charAt(0)==="."&&!this.dot)){var S=l.concat(a[m],u);this._process(S,n,!0,o);var b=l.concat(a[m],i);this._process(b,n,!0,o)}}o()};Ne.prototype._processSimple=function(t,e,r){var i=this;this._stat(t,function(n,s){i._processSimple2(t,e,n,s,r)})};Ne.prototype._processSimple2=function(t,e,r,i,n){if(this.matches[e]||(this.matches[e]=Object.create(null)),!i)return n();if(t&&dc(t)&&!this.nomount){var s=/[\/\\]$/.test(t);t.charAt(0)==="/"?t=B0.join(this.root,t):(t=B0.resolve(this.root,t),s&&(t+="/"))}process.platform==="win32"&&(t=t.replace(/\\/g,"/")),this._emitMatch(e,t),n()};Ne.prototype._stat=function(t,e){var r=this._makeAbs(t),i=t.slice(-1)==="/";if(t.length>this.maxLength)return e();if(!this.stat&&$0(this.cache,r)){var n=this.cache[r];if(Array.isArray(n)&&(n="DIR"),!i||n==="DIR")return e(null,n);if(i&&n==="FILE")return e()}var s,a=this.statCache[r];if(a!==void 0){if(a===!1)return e(null,a);var o=a.isDirectory()?"DIR":"FILE";return i&&o==="FILE"?e():e(null,o,a)}var u=this,l=H0("stat\0"+r,f);l&&u.fs.lstat(r,l);function f(h,p){if(p&&p.isSymbolicLink())return u.fs.stat(r,function(m,v){m?u._stat2(t,r,null,p,e):u._stat2(t,r,m,v,e)});u._stat2(t,r,h,p,e)}};Ne.prototype._stat2=function(t,e,r,i,n){if(r&&(r.code==="ENOENT"||r.code==="ENOTDIR"))return this.statCache[e]=!1,n();var s=t.slice(-1)==="/";if(this.statCache[e]=i,e.slice(-1)==="/"&&i&&!i.isDirectory())return n(null,!1,i);var a=!0;return i&&(a=i.isDirectory()?"DIR":"FILE"),this.cache[e]=this.cache[e]||a,s&&a==="FILE"?n():n(null,a,i)}});var cR=T(lo=>{"use strict";y();Object.defineProperty(lo,"__esModule",{value:!0});lo.saveToDiskFixApplicator=void 0;lo.autofix=RY;var qY=ae("fs/promises"),G0=hr(),CY=async(t,e)=>{let r=(0,G0.applyFixToString)(t.source,e);await(0,qY.writeFile)(G0.path.fsPath(t.uri),r,"utf8")};lo.saveToDiskFixApplicator=CY;async function RY(t,e){await(0,G0.autofix)(t,e,lo.saveToDiskFixApplicator)}});var W0=T(mc=>{"use strict";y();var MY=mc&&mc.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(mc,"__esModule",{value:!0});mc.fileExists=FY;var DY=MY(ae("node:fs/promises"));async function FY(t){try{return await DY.default.stat(t),!0}catch{return!1}}});var fR=T(fo=>{"use strict";y();var lR=fo&&fo.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(fo,"__esModule",{value:!0});fo.thisNodeModuleRoot=void 0;var Ode=lR(ae("node:path")),jY=lR(ae("node:os")),BY=()=>jY.default.tmpdir();fo.thisNodeModuleRoot=BY});var dR=T(po=>{"use strict";y();var VY=po&&po.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(po,"__esModule",{value:!0});po.loadThirdPartyChecks=GY;po.findThirdPartyChecks=WY;var $Y=VY(Vd()),UY=ae("node:util"),HY=(0,UY.promisify)($Y.default);function GY(t=[]){let e=new Set;for(let r of t)try{let n=ae(r).checks;if(!Array.isArray(n))throw new Error(`Expected the 'checks' export to be an array and got ${typeof n}`);for(let s of n)zY(s)?e.add(s):console.error(`Expected ${s} to be a CheckDefinition, but it looks like it isn't`)}catch(i){console.error(`Error loading ${r}, ignoring it.
|
|
1222
|
+
${i}`)}return[...e]}async function WY(t){let e=[pR(t.replace(/\\/g,"/"),"/node_modules/theme-check-*/"),pR(t.replace(/\\/g,"/"),"/node_modules/@*/theme-check-*/")];return(await Promise.all(e.map(i=>HY(i)))).flat().filter(i=>!/\@shopify\/theme-check-(node|common|browser|docs-updater)/.test(i)&&!/theme-check-vscode/.test(i))}function pR(...t){return t.flatMap(e=>e.replace(/\\/g,"/").replace(/\/+$/,"")).join("/")}function hR(t){return t!==null&&typeof t=="object"}function zY(t){return hR(t)&&"meta"in t&&"create"in t&&hR(t.meta)&&"code"in t.meta}});var gR=T(yc=>{"use strict";y();var JY=yc&&yc.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(yc,"__esModule",{value:!0});yc.loadConfigDescription=XY;var J0=hr(),gc=JY(ae("node:path")),mR=W0(),KY=fR(),z0=dR(),QY=Du(),YY=t=>t.flat();async function XY(t,e){let r=await sX(e),i=await Promise.all([(0,z0.findThirdPartyChecks)((0,KY.thisNodeModuleRoot)()),(0,z0.findThirdPartyChecks)(r)]).then(YY),n=(0,z0.loadThirdPartyChecks)([...t.require,...i]),s=J0.allChecks.concat(n).filter(eX(t)),a=QY.URI.file(e);return{settings:rX(t.checkSettings,s),context:t.context??"theme",checks:s,ignore:t.ignore,rootUri:ZY(a,t.root)}}function ZY(t,e){if(e===void 0)return J0.path.normalize(t);if(gc.default.isAbsolute(e))throw new Error('the "root" property can only be relative');return J0.path.resolve(t,e)}var eX=t=>e=>{let r=t.checkSettings[e.meta.code]??tX(t,e);return r?r.enabled:!1};function tX(t,e){if(!e.meta.aliases)return;let r=e.meta.aliases.find(i=>t.checkSettings[i]);if(r)return t.checkSettings[r]}function rX(t,e){return Object.fromEntries(Object.entries(t).map(([r,i])=>[iX(r,e),i]))}function iX(t,e){return e.find(i=>i.meta.code===t||i.meta.aliases?.find(n=>n===t))?.meta.code}async function nX(t){if(gc.default.dirname(t)===t)return!0;let[e,r]=await Promise.all([(0,mR.fileExists)(gc.default.join(t,"node_modules")),(0,mR.fileExists)(gc.default.join(t,".git"))]);return e||r}async function sX(t){let e=t;for(;!await nX(e);)e=gc.default.dirname(e);return e}});var xe=T(zt=>{"use strict";y();var K0=Symbol.for("yaml.alias"),yR=Symbol.for("yaml.document"),$d=Symbol.for("yaml.map"),_R=Symbol.for("yaml.pair"),Q0=Symbol.for("yaml.scalar"),Ud=Symbol.for("yaml.seq"),pn=Symbol.for("yaml.node.type"),aX=t=>!!t&&typeof t=="object"&&t[pn]===K0,oX=t=>!!t&&typeof t=="object"&&t[pn]===yR,uX=t=>!!t&&typeof t=="object"&&t[pn]===$d,cX=t=>!!t&&typeof t=="object"&&t[pn]===_R,vR=t=>!!t&&typeof t=="object"&&t[pn]===Q0,lX=t=>!!t&&typeof t=="object"&&t[pn]===Ud;function bR(t){if(t&&typeof t=="object")switch(t[pn]){case $d:case Ud:return!0}return!1}function fX(t){if(t&&typeof t=="object")switch(t[pn]){case K0:case $d:case Q0:case Ud:return!0}return!1}var pX=t=>(vR(t)||bR(t))&&!!t.anchor;zt.ALIAS=K0;zt.DOC=yR;zt.MAP=$d;zt.NODE_TYPE=pn;zt.PAIR=_R;zt.SCALAR=Q0;zt.SEQ=Ud;zt.hasAnchor=pX;zt.isAlias=aX;zt.isCollection=bR;zt.isDocument=oX;zt.isMap=uX;zt.isNode=fX;zt.isPair=cX;zt.isScalar=vR;zt.isSeq=lX});var _c=T(Y0=>{"use strict";y();var It=xe(),Tr=Symbol("break visit"),SR=Symbol("skip children"),Bi=Symbol("remove node");function Hd(t,e){let r=wR(e);It.isDocument(t)?ho(null,t.contents,r,Object.freeze([t]))===Bi&&(t.contents=null):ho(null,t,r,Object.freeze([]))}Hd.BREAK=Tr;Hd.SKIP=SR;Hd.REMOVE=Bi;function ho(t,e,r,i){let n=xR(t,e,r,i);if(It.isNode(n)||It.isPair(n))return kR(t,i,n),ho(t,n,r,i);if(typeof n!="symbol"){if(It.isCollection(e)){i=Object.freeze(i.concat(e));for(let s=0;s<e.items.length;++s){let a=ho(s,e.items[s],r,i);if(typeof a=="number")s=a-1;else{if(a===Tr)return Tr;a===Bi&&(e.items.splice(s,1),s-=1)}}}else if(It.isPair(e)){i=Object.freeze(i.concat(e));let s=ho("key",e.key,r,i);if(s===Tr)return Tr;s===Bi&&(e.key=null);let a=ho("value",e.value,r,i);if(a===Tr)return Tr;a===Bi&&(e.value=null)}}return n}async function Gd(t,e){let r=wR(e);It.isDocument(t)?await mo(null,t.contents,r,Object.freeze([t]))===Bi&&(t.contents=null):await mo(null,t,r,Object.freeze([]))}Gd.BREAK=Tr;Gd.SKIP=SR;Gd.REMOVE=Bi;async function mo(t,e,r,i){let n=await xR(t,e,r,i);if(It.isNode(n)||It.isPair(n))return kR(t,i,n),mo(t,n,r,i);if(typeof n!="symbol"){if(It.isCollection(e)){i=Object.freeze(i.concat(e));for(let s=0;s<e.items.length;++s){let a=await mo(s,e.items[s],r,i);if(typeof a=="number")s=a-1;else{if(a===Tr)return Tr;a===Bi&&(e.items.splice(s,1),s-=1)}}}else if(It.isPair(e)){i=Object.freeze(i.concat(e));let s=await mo("key",e.key,r,i);if(s===Tr)return Tr;s===Bi&&(e.key=null);let a=await mo("value",e.value,r,i);if(a===Tr)return Tr;a===Bi&&(e.value=null)}}return n}function wR(t){return typeof t=="object"&&(t.Collection||t.Node||t.Value)?Object.assign({Alias:t.Node,Map:t.Node,Scalar:t.Node,Seq:t.Node},t.Value&&{Map:t.Value,Scalar:t.Value,Seq:t.Value},t.Collection&&{Map:t.Collection,Seq:t.Collection},t):t}function xR(t,e,r,i){if(typeof r=="function")return r(t,e,i);if(It.isMap(e))return r.Map?.(t,e,i);if(It.isSeq(e))return r.Seq?.(t,e,i);if(It.isPair(e))return r.Pair?.(t,e,i);if(It.isScalar(e))return r.Scalar?.(t,e,i);if(It.isAlias(e))return r.Alias?.(t,e,i)}function kR(t,e,r){let i=e[e.length-1];if(It.isCollection(i))i.items[t]=r;else if(It.isPair(i))t==="key"?i.key=r:i.value=r;else if(It.isDocument(i))i.contents=r;else{let n=It.isAlias(i)?"alias":"scalar";throw new Error(`Cannot replace node with ${n} parent`)}}Y0.visit=Hd;Y0.visitAsync=Gd});var X0=T(AR=>{"use strict";y();var IR=xe(),hX=_c(),dX={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},mX=t=>t.replace(/[!,[\]{}]/g,e=>dX[e]),vc=class t{constructor(e,r){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},t.defaultYaml,e),this.tags=Object.assign({},t.defaultTags,r)}clone(){let e=new t(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new t(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:t.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},t.defaultTags);break}return e}add(e,r){this.atNextDocument&&(this.yaml={explicit:t.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},t.defaultTags),this.atNextDocument=!1);let i=e.trim().split(/[ \t]+/),n=i.shift();switch(n){case"%TAG":{if(i.length!==2&&(r(0,"%TAG directive should contain exactly two parts"),i.length<2))return!1;let[s,a]=i;return this.tags[s]=a,!0}case"%YAML":{if(this.yaml.explicit=!0,i.length!==1)return r(0,"%YAML directive should contain exactly one part"),!1;let[s]=i;if(s==="1.1"||s==="1.2")return this.yaml.version=s,!0;{let a=/^\d+\.\d+$/.test(s);return r(6,`Unsupported YAML version ${s}`,a),!1}}default:return r(0,`Unknown directive ${n}`,!0),!1}}tagName(e,r){if(e==="!")return"!";if(e[0]!=="!")return r(`Not a valid tag: ${e}`),null;if(e[1]==="<"){let a=e.slice(2,-1);return a==="!"||a==="!!"?(r(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&r("Verbatim tags must end with a >"),a)}let[,i,n]=e.match(/^(.*!)([^!]*)$/s);n||r(`The ${e} tag has no suffix`);let s=this.tags[i];if(s)try{return s+decodeURIComponent(n)}catch(a){return r(String(a)),null}return i==="!"?e:(r(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[r,i]of Object.entries(this.tags))if(e.startsWith(i))return r+mX(e.substring(i.length));return e[0]==="!"?e:`!<${e}>`}toString(e){let r=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],i=Object.entries(this.tags),n;if(e&&i.length>0&&IR.isNode(e.contents)){let s={};hX.visit(e.contents,(a,o)=>{IR.isNode(o)&&o.tag&&(s[o.tag]=!0)}),n=Object.keys(s)}else n=[];for(let[s,a]of i)s==="!!"&&a==="tag:yaml.org,2002:"||(!e||n.some(o=>o.startsWith(a)))&&r.push(`%TAG ${s} ${a}`);return r.join(`
|
|
1223
|
+
`)}};vc.defaultYaml={explicit:!1,version:"1.2"};vc.defaultTags={"!!":"tag:yaml.org,2002:"};AR.Directives=vc});var Wd=T(bc=>{"use strict";y();var TR=xe(),gX=_c();function yX(t){if(/[\x00-\x19\s,[\]{}]/.test(t)){let r=`Anchor must not contain whitespace or control characters: ${JSON.stringify(t)}`;throw new Error(r)}return!0}function ER(t){let e=new Set;return gX.visit(t,{Value(r,i){i.anchor&&e.add(i.anchor)}}),e}function OR(t,e){for(let r=1;;++r){let i=`${t}${r}`;if(!e.has(i))return i}}function _X(t,e){let r=[],i=new Map,n=null;return{onAnchor:s=>{r.push(s),n??(n=ER(t));let a=OR(e,n);return n.add(a),a},setAnchors:()=>{for(let s of r){let a=i.get(s);if(typeof a=="object"&&a.anchor&&(TR.isScalar(a.node)||TR.isCollection(a.node)))a.node.anchor=a.anchor;else{let o=new Error("Failed to resolve repeated object (this should not happen)");throw o.source=s,o}}},sourceObjects:i}}bc.anchorIsValid=yX;bc.anchorNames=ER;bc.createNodeAnchors=_X;bc.findNewAnchor=OR});var Z0=T(NR=>{"use strict";y();function Sc(t,e,r,i){if(i&&typeof i=="object")if(Array.isArray(i))for(let n=0,s=i.length;n<s;++n){let a=i[n],o=Sc(t,i,String(n),a);o===void 0?delete i[n]:o!==a&&(i[n]=o)}else if(i instanceof Map)for(let n of Array.from(i.keys())){let s=i.get(n),a=Sc(t,i,n,s);a===void 0?i.delete(n):a!==s&&i.set(n,a)}else if(i instanceof Set)for(let n of Array.from(i)){let s=Sc(t,i,n,n);s===void 0?i.delete(n):s!==n&&(i.delete(n),i.add(s))}else for(let[n,s]of Object.entries(i)){let a=Sc(t,i,n,s);a===void 0?delete i[n]:a!==s&&(i[n]=a)}return t.call(e,r,i)}NR.applyReviver=Sc});var Bn=T(PR=>{"use strict";y();var vX=xe();function LR(t,e,r){if(Array.isArray(t))return t.map((i,n)=>LR(i,String(n),r));if(t&&typeof t.toJSON=="function"){if(!r||!vX.hasAnchor(t))return t.toJSON(e,r);let i={aliasCount:0,count:1,res:void 0};r.anchors.set(t,i),r.onCreate=s=>{i.res=s,delete r.onCreate};let n=t.toJSON(e,r);return r.onCreate&&r.onCreate(n),n}return typeof t=="bigint"&&!r?.keep?Number(t):t}PR.toJS=LR});var zd=T(CR=>{"use strict";y();var bX=Z0(),qR=xe(),SX=Bn(),eS=class{constructor(e){Object.defineProperty(this,qR.NODE_TYPE,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:r,maxAliasCount:i,onAnchor:n,reviver:s}={}){if(!qR.isDocument(e))throw new TypeError("A document argument is required");let a={anchors:new Map,doc:e,keep:!0,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100},o=SX.toJS(this,"",a);if(typeof n=="function")for(let{count:u,res:l}of a.anchors.values())n(l,u);return typeof s=="function"?bX.applyReviver(s,{"":o},"",o):o}};CR.NodeBase=eS});var wc=T(RR=>{"use strict";y();var wX=Wd(),xX=_c(),go=xe(),kX=zd(),IX=Bn(),tS=class extends kX.NodeBase{constructor(e){super(go.ALIAS),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,r){if(r?.maxAliasCount===0)throw new ReferenceError("Alias resolution is disabled");let i;r?.aliasResolveCache?i=r.aliasResolveCache:(i=[],xX.visit(e,{Node:(s,a)=>{(go.isAlias(a)||go.hasAnchor(a))&&i.push(a)}}),r&&(r.aliasResolveCache=i));let n;for(let s of i){if(s===this)break;s.anchor===this.source&&(n=s)}return n}toJSON(e,r){if(!r)return{source:this.source};let{anchors:i,doc:n,maxAliasCount:s}=r,a=this.resolve(n,r);if(!a){let u=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(u)}let o=i.get(a);if(o||(IX.toJS(a,null,r),o=i.get(a)),o?.res===void 0){let u="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(u)}if(s>=0&&(o.count+=1,o.aliasCount===0&&(o.aliasCount=Jd(n,a,i)),o.count*o.aliasCount>s)){let u="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(u)}return o.res}toString(e,r,i){let n=`*${this.source}`;if(e){if(wX.anchorIsValid(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(s)}if(e.implicitKey)return`${n} `}return n}};function Jd(t,e,r){if(go.isAlias(e)){let i=e.resolve(t),n=r&&i&&r.get(i);return n?n.count*n.aliasCount:0}else if(go.isCollection(e)){let i=0;for(let n of e.items){let s=Jd(t,n,r);s>i&&(i=s)}return i}else if(go.isPair(e)){let i=Jd(t,e.key,r),n=Jd(t,e.value,r);return Math.max(i,n)}return 1}RR.Alias=tS});var dt=T(rS=>{"use strict";y();var AX=xe(),TX=zd(),EX=Bn(),OX=t=>!t||typeof t!="function"&&typeof t!="object",Vn=class extends TX.NodeBase{constructor(e){super(AX.SCALAR),this.value=e}toJSON(e,r){return r?.keep?this.value:EX.toJS(this.value,e,r)}toString(){return String(this.value)}};Vn.BLOCK_FOLDED="BLOCK_FOLDED";Vn.BLOCK_LITERAL="BLOCK_LITERAL";Vn.PLAIN="PLAIN";Vn.QUOTE_DOUBLE="QUOTE_DOUBLE";Vn.QUOTE_SINGLE="QUOTE_SINGLE";rS.Scalar=Vn;rS.isScalarValue=OX});var xc=T(DR=>{"use strict";y();var NX=wc(),zs=xe(),MR=dt(),LX="tag:yaml.org,2002:";function PX(t,e,r){if(e){let i=r.filter(s=>s.tag===e),n=i.find(s=>!s.format)??i[0];if(!n)throw new Error(`Tag ${e} not found`);return n}return r.find(i=>i.identify?.(t)&&!i.format)}function qX(t,e,r){if(zs.isDocument(t)&&(t=t.contents),zs.isNode(t))return t;if(zs.isPair(t)){let h=r.schema[zs.MAP].createNode?.(r.schema,null,r);return h.items.push(t),h}(t instanceof String||t instanceof Number||t instanceof Boolean||typeof BigInt<"u"&&t instanceof BigInt)&&(t=t.valueOf());let{aliasDuplicateObjects:i,onAnchor:n,onTagObj:s,schema:a,sourceObjects:o}=r,u;if(i&&t&&typeof t=="object"){if(u=o.get(t),u)return u.anchor??(u.anchor=n(t)),new NX.Alias(u.anchor);u={anchor:null,node:null},o.set(t,u)}e?.startsWith("!!")&&(e=LX+e.slice(2));let l=PX(t,e,a.tags);if(!l){if(t&&typeof t.toJSON=="function"&&(t=t.toJSON()),!t||typeof t!="object"){let h=new MR.Scalar(t);return u&&(u.node=h),h}l=t instanceof Map?a[zs.MAP]:Symbol.iterator in Object(t)?a[zs.SEQ]:a[zs.MAP]}s&&(s(l),delete r.onTagObj);let f=l?.createNode?l.createNode(r.schema,t,r):typeof l?.nodeClass?.from=="function"?l.nodeClass.from(r.schema,t,r):new MR.Scalar(t);return e?f.tag=e:l.default||(f.tag=l.tag),u&&(u.node=f),f}DR.createNode=qX});var Qd=T(Kd=>{"use strict";y();var CX=xc(),Vi=xe(),RX=zd();function iS(t,e,r){let i=r;for(let n=e.length-1;n>=0;--n){let s=e[n];if(typeof s=="number"&&Number.isInteger(s)&&s>=0){let a=[];a[s]=i,i=a}else i=new Map([[s,i]])}return CX.createNode(i,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:t,sourceObjects:new Map})}var FR=t=>t==null||typeof t=="object"&&!!t[Symbol.iterator]().next().done,nS=class extends RX.NodeBase{constructor(e,r){super(e),Object.defineProperty(this,"schema",{value:r,configurable:!0,enumerable:!1,writable:!0})}clone(e){let r=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(r.schema=e),r.items=r.items.map(i=>Vi.isNode(i)||Vi.isPair(i)?i.clone(e):i),this.range&&(r.range=this.range.slice()),r}addIn(e,r){if(FR(e))this.add(r);else{let[i,...n]=e,s=this.get(i,!0);if(Vi.isCollection(s))s.addIn(n,r);else if(s===void 0&&this.schema)this.set(i,iS(this.schema,n,r));else throw new Error(`Expected YAML collection at ${i}. Remaining path: ${n}`)}}deleteIn(e){let[r,...i]=e;if(i.length===0)return this.delete(r);let n=this.get(r,!0);if(Vi.isCollection(n))return n.deleteIn(i);throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}getIn(e,r){let[i,...n]=e,s=this.get(i,!0);return n.length===0?!r&&Vi.isScalar(s)?s.value:s:Vi.isCollection(s)?s.getIn(n,r):void 0}hasAllNullValues(e){return this.items.every(r=>{if(!Vi.isPair(r))return!1;let i=r.value;return i==null||e&&Vi.isScalar(i)&&i.value==null&&!i.commentBefore&&!i.comment&&!i.tag})}hasIn(e){let[r,...i]=e;if(i.length===0)return this.has(r);let n=this.get(r,!0);return Vi.isCollection(n)?n.hasIn(i):!1}setIn(e,r){let[i,...n]=e;if(n.length===0)this.set(i,r);else{let s=this.get(i,!0);if(Vi.isCollection(s))s.setIn(n,r);else if(s===void 0&&this.schema)this.set(i,iS(this.schema,n,r));else throw new Error(`Expected YAML collection at ${i}. Remaining path: ${n}`)}}};Kd.Collection=nS;Kd.collectionFromPath=iS;Kd.isEmptyPath=FR});var kc=T(Yd=>{"use strict";y();var MX=t=>t.replace(/^(?!$)(?: $)?/gm,"#");function sS(t,e){return/^\n+$/.test(t)?t.substring(1):e?t.replace(/^(?! *$)/gm,e):t}var DX=(t,e,r)=>t.endsWith(`
|
|
1224
|
+
`)?sS(r,e):r.includes(`
|
|
1225
|
+
`)?`
|
|
1226
|
+
`+sS(r,e):(t.endsWith(" ")?"":" ")+r;Yd.indentComment=sS;Yd.lineComment=DX;Yd.stringifyComment=MX});var BR=T(Ic=>{"use strict";y();var FX="flow",aS="block",Xd="quoted";function jX(t,e,r="flow",{indentAtStart:i,lineWidth:n=80,minContentWidth:s=20,onFold:a,onOverflow:o}={}){if(!n||n<0)return t;n<s&&(s=0);let u=Math.max(1+s,1+n-e.length);if(t.length<=u)return t;let l=[],f={},h=n-e.length;typeof i=="number"&&(i>n-Math.max(2,s)?l.push(0):h=n-i);let p,m,v=!1,S=-1,b=-1,g=-1;r===aS&&(S=jR(t,S,e.length),S!==-1&&(h=S+u));for(let w;w=t[S+=1];){if(r===Xd&&w==="\\"){switch(b=S,t[S+1]){case"x":S+=3;break;case"u":S+=5;break;case"U":S+=9;break;default:S+=1}g=S}if(w===`
|
|
1227
|
+
`)r===aS&&(S=jR(t,S,e.length)),h=S+e.length+u,p=void 0;else{if(w===" "&&m&&m!==" "&&m!==`
|
|
1228
|
+
`&&m!==" "){let _=t[S+1];_&&_!==" "&&_!==`
|
|
1229
|
+
`&&_!==" "&&(p=S)}if(S>=h)if(p)l.push(p),h=p+u,p=void 0;else if(r===Xd){for(;m===" "||m===" ";)m=w,w=t[S+=1],v=!0;let _=S>g+1?S-2:b-1;if(f[_])return t;l.push(_),f[_]=!0,h=_+u,p=void 0}else v=!0}m=w}if(v&&o&&o(),l.length===0)return t;a&&a();let k=t.slice(0,l[0]);for(let w=0;w<l.length;++w){let _=l[w],A=l[w+1]||t.length;_===0?k=`
|
|
1230
|
+
${e}${t.slice(0,A)}`:(r===Xd&&f[_]&&(k+=`${t[_]}\\`),k+=`
|
|
1231
|
+
${e}${t.slice(_+1,A)}`)}return k}function jR(t,e,r){let i=e,n=e+1,s=t[n];for(;s===" "||s===" ";)if(e<n+r)s=t[++e];else{do s=t[++e];while(s&&s!==`
|
|
1232
|
+
`);i=e,n=e+1,s=t[n]}return i}Ic.FOLD_BLOCK=aS;Ic.FOLD_FLOW=FX;Ic.FOLD_QUOTED=Xd;Ic.foldFlowLines=jX});var Tc=T(VR=>{"use strict";y();var vi=dt(),$n=BR(),em=(t,e)=>({indentAtStart:e?t.indent.length:t.indentAtStart,lineWidth:t.options.lineWidth,minContentWidth:t.options.minContentWidth}),tm=t=>/^(%|---|\.\.\.)/m.test(t);function BX(t,e,r){if(!e||e<0)return!1;let i=e-r,n=t.length;if(n<=i)return!1;for(let s=0,a=0;s<n;++s)if(t[s]===`
|
|
1233
|
+
`){if(s-a>i)return!0;if(a=s+1,n-a<=i)return!1}return!0}function Ac(t,e){let r=JSON.stringify(t);if(e.options.doubleQuotedAsJSON)return r;let{implicitKey:i}=e,n=e.options.doubleQuotedMinMultiLineLength,s=e.indent||(tm(t)?" ":""),a="",o=0;for(let u=0,l=r[u];l;l=r[++u])if(l===" "&&r[u+1]==="\\"&&r[u+2]==="n"&&(a+=r.slice(o,u)+"\\ ",u+=1,o=u,l="\\"),l==="\\")switch(r[u+1]){case"u":{a+=r.slice(o,u);let f=r.substr(u+2,4);switch(f){case"0000":a+="\\0";break;case"0007":a+="\\a";break;case"000b":a+="\\v";break;case"001b":a+="\\e";break;case"0085":a+="\\N";break;case"00a0":a+="\\_";break;case"2028":a+="\\L";break;case"2029":a+="\\P";break;default:f.substr(0,2)==="00"?a+="\\x"+f.substr(2):a+=r.substr(u,6)}u+=5,o=u+1}break;case"n":if(i||r[u+2]==='"'||r.length<n)u+=1;else{for(a+=r.slice(o,u)+`
|
|
1234
|
+
|
|
1235
|
+
`;r[u+2]==="\\"&&r[u+3]==="n"&&r[u+4]!=='"';)a+=`
|
|
1236
|
+
`,u+=2;a+=s,r[u+2]===" "&&(a+="\\"),u+=1,o=u+1}break;default:u+=1}return a=o?a+r.slice(o):r,i?a:$n.foldFlowLines(a,s,$n.FOLD_QUOTED,em(e,!1))}function oS(t,e){if(e.options.singleQuote===!1||e.implicitKey&&t.includes(`
|
|
1237
|
+
`)||/[ \t]\n|\n[ \t]/.test(t))return Ac(t,e);let r=e.indent||(tm(t)?" ":""),i="'"+t.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
1238
|
+
${r}`)+"'";return e.implicitKey?i:$n.foldFlowLines(i,r,$n.FOLD_FLOW,em(e,!1))}function yo(t,e){let{singleQuote:r}=e.options,i;if(r===!1)i=Ac;else{let n=t.includes('"'),s=t.includes("'");n&&!s?i=oS:s&&!n?i=Ac:i=r?oS:Ac}return i(t,e)}var uS;try{uS=new RegExp(`(^|(?<!
|
|
1239
|
+
))
|
|
1240
|
+
+(?!
|
|
1241
|
+
|$)`,"g")}catch{uS=/\n+(?!\n|$)/g}function Zd({comment:t,type:e,value:r},i,n,s){let{blockQuote:a,commentString:o,lineWidth:u}=i.options;if(!a||/\n[\t ]+$/.test(r))return yo(r,i);let l=i.indent||(i.forceBlockIndent||tm(r)?" ":""),f=a==="literal"?!0:a==="folded"||e===vi.Scalar.BLOCK_FOLDED?!1:e===vi.Scalar.BLOCK_LITERAL?!0:!BX(r,u,l.length);if(!r)return f?`|
|
|
1242
|
+
`:`>
|
|
1243
|
+
`;let h,p;for(p=r.length;p>0;--p){let A=r[p-1];if(A!==`
|
|
1244
|
+
`&&A!==" "&&A!==" ")break}let m=r.substring(p),v=m.indexOf(`
|
|
1245
|
+
`);v===-1?h="-":r===m||v!==m.length-1?(h="+",s&&s()):h="",m&&(r=r.slice(0,-m.length),m[m.length-1]===`
|
|
1246
|
+
`&&(m=m.slice(0,-1)),m=m.replace(uS,`$&${l}`));let S=!1,b,g=-1;for(b=0;b<r.length;++b){let A=r[b];if(A===" ")S=!0;else if(A===`
|
|
1247
|
+
`)g=b;else break}let k=r.substring(0,g<b?g+1:b);k&&(r=r.substring(k.length),k=k.replace(/\n+/g,`$&${l}`));let _=(S?l?"2":"1":"")+h;if(t&&(_+=" "+o(t.replace(/ ?[\r\n]+/g," ")),n&&n()),!f){let A=r.replace(/\n+/g,`
|
|
1248
|
+
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${l}`),E=!1,O=em(i,!0);a!=="folded"&&e!==vi.Scalar.BLOCK_FOLDED&&(O.onOverflow=()=>{E=!0});let L=$n.foldFlowLines(`${k}${A}${m}`,l,$n.FOLD_BLOCK,O);if(!E)return`>${_}
|
|
1249
|
+
${l}${L}`}return r=r.replace(/\n+/g,`$&${l}`),`|${_}
|
|
1250
|
+
${l}${k}${r}${m}`}function VX(t,e,r,i){let{type:n,value:s}=t,{actualString:a,implicitKey:o,indent:u,indentStep:l,inFlow:f}=e;if(o&&s.includes(`
|
|
1251
|
+
`)||f&&/[[\]{},]/.test(s))return yo(s,e);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(s))return o||f||!s.includes(`
|
|
1252
|
+
`)?yo(s,e):Zd(t,e,r,i);if(!o&&!f&&n!==vi.Scalar.PLAIN&&s.includes(`
|
|
1253
|
+
`))return Zd(t,e,r,i);if(tm(s)){if(u==="")return e.forceBlockIndent=!0,Zd(t,e,r,i);if(o&&u===l)return yo(s,e)}let h=s.replace(/\n+/g,`$&
|
|
1254
|
+
${u}`);if(a){let p=S=>S.default&&S.tag!=="tag:yaml.org,2002:str"&&S.test?.test(h),{compat:m,tags:v}=e.doc.schema;if(v.some(p)||m?.some(p))return yo(s,e)}return o?h:$n.foldFlowLines(h,u,$n.FOLD_FLOW,em(e,!1))}function $X(t,e,r,i){let{implicitKey:n,inFlow:s}=e,a=typeof t.value=="string"?t:Object.assign({},t,{value:String(t.value)}),{type:o}=t;o!==vi.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(a.value)&&(o=vi.Scalar.QUOTE_DOUBLE);let u=f=>{switch(f){case vi.Scalar.BLOCK_FOLDED:case vi.Scalar.BLOCK_LITERAL:return n||s?yo(a.value,e):Zd(a,e,r,i);case vi.Scalar.QUOTE_DOUBLE:return Ac(a.value,e);case vi.Scalar.QUOTE_SINGLE:return oS(a.value,e);case vi.Scalar.PLAIN:return VX(a,e,r,i);default:return null}},l=u(o);if(l===null){let{defaultKeyType:f,defaultStringType:h}=e.options,p=n&&f||h;if(l=u(p),l===null)throw new Error(`Unsupported default string type ${p}`)}return l}VR.stringifyString=$X});var Ec=T(cS=>{"use strict";y();var UX=Wd(),Un=xe(),HX=kc(),GX=Tc();function WX(t,e){let r=Object.assign({blockQuote:!0,commentString:HX.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},t.schema.toStringOptions,e),i;switch(r.collectionStyle){case"block":i=!1;break;case"flow":i=!0;break;default:i=null}return{anchors:new Set,doc:t,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:typeof r.indent=="number"?" ".repeat(r.indent):" ",inFlow:i,options:r}}function zX(t,e){if(e.tag){let n=t.filter(s=>s.tag===e.tag);if(n.length>0)return n.find(s=>s.format===e.format)??n[0]}let r,i;if(Un.isScalar(e)){i=e.value;let n=t.filter(s=>s.identify?.(i));if(n.length>1){let s=n.filter(a=>a.test);s.length>0&&(n=s)}r=n.find(s=>s.format===e.format)??n.find(s=>!s.format)}else i=e,r=t.find(n=>n.nodeClass&&i instanceof n.nodeClass);if(!r){let n=i?.constructor?.name??(i===null?"null":typeof i);throw new Error(`Tag not resolved for ${n} value`)}return r}function JX(t,e,{anchors:r,doc:i}){if(!i.directives)return"";let n=[],s=(Un.isScalar(t)||Un.isCollection(t))&&t.anchor;s&&UX.anchorIsValid(s)&&(r.add(s),n.push(`&${s}`));let a=t.tag??(e.default?null:e.tag);return a&&n.push(i.directives.tagString(a)),n.join(" ")}function KX(t,e,r,i){if(Un.isPair(t))return t.toString(e,r,i);if(Un.isAlias(t)){if(e.doc.directives)return t.toString(e);if(e.resolvedAliases?.has(t))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(t):e.resolvedAliases=new Set([t]),t=t.resolve(e.doc)}let n,s=Un.isNode(t)?t:e.doc.createNode(t,{onTagObj:u=>n=u});n??(n=zX(e.doc.schema.tags,s));let a=JX(s,n,e);a.length>0&&(e.indentAtStart=(e.indentAtStart??0)+a.length+1);let o=typeof n.stringify=="function"?n.stringify(s,e,r,i):Un.isScalar(s)?GX.stringifyString(s,e,r,i):s.toString(e,r,i);return a?Un.isScalar(s)||o[0]==="{"||o[0]==="["?`${a} ${o}`:`${a}
|
|
1255
|
+
${e.indent}${o}`:o}cS.createStringifyContext=WX;cS.stringify=KX});var GR=T(HR=>{"use strict";y();var hn=xe(),$R=dt(),UR=Ec(),Oc=kc();function QX({key:t,value:e},r,i,n){let{allNullValues:s,doc:a,indent:o,indentStep:u,options:{commentString:l,indentSeq:f,simpleKeys:h}}=r,p=hn.isNode(t)&&t.comment||null;if(h){if(p)throw new Error("With simple keys, key nodes cannot have comments");if(hn.isCollection(t)||!hn.isNode(t)&&typeof t=="object"){let O="With simple keys, collection cannot be used as a key value";throw new Error(O)}}let m=!h&&(!t||p&&e==null&&!r.inFlow||hn.isCollection(t)||(hn.isScalar(t)?t.type===$R.Scalar.BLOCK_FOLDED||t.type===$R.Scalar.BLOCK_LITERAL:typeof t=="object"));r=Object.assign({},r,{allNullValues:!1,implicitKey:!m&&(h||!s),indent:o+u});let v=!1,S=!1,b=UR.stringify(t,r,()=>v=!0,()=>S=!0);if(!m&&!r.inFlow&&b.length>1024){if(h)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");m=!0}if(r.inFlow){if(s||e==null)return v&&i&&i(),b===""?"?":m?`? ${b}`:b}else if(s&&!h||e==null&&m)return b=`? ${b}`,p&&!v?b+=Oc.lineComment(b,r.indent,l(p)):S&&n&&n(),b;v&&(p=null),m?(p&&(b+=Oc.lineComment(b,r.indent,l(p))),b=`? ${b}
|
|
1256
|
+
${o}:`):(b=`${b}:`,p&&(b+=Oc.lineComment(b,r.indent,l(p))));let g,k,w;hn.isNode(e)?(g=!!e.spaceBefore,k=e.commentBefore,w=e.comment):(g=!1,k=null,w=null,e&&typeof e=="object"&&(e=a.createNode(e))),r.implicitKey=!1,!m&&!p&&hn.isScalar(e)&&(r.indentAtStart=b.length+1),S=!1,!f&&u.length>=2&&!r.inFlow&&!m&&hn.isSeq(e)&&!e.flow&&!e.tag&&!e.anchor&&(r.indent=r.indent.substring(2));let _=!1,A=UR.stringify(e,r,()=>_=!0,()=>S=!0),E=" ";if(p||g||k){if(E=g?`
|
|
1257
|
+
`:"",k){let O=l(k);E+=`
|
|
1258
|
+
${Oc.indentComment(O,r.indent)}`}A===""&&!r.inFlow?E===`
|
|
1259
|
+
`&&w&&(E=`
|
|
1260
|
+
|
|
1261
|
+
`):E+=`
|
|
1262
|
+
${r.indent}`}else if(!m&&hn.isCollection(e)){let O=A[0],L=A.indexOf(`
|
|
1263
|
+
`),B=L!==-1,R=r.inFlow??e.flow??e.items.length===0;if(B||!R){let q=!1;if(B&&(O==="&"||O==="!")){let P=A.indexOf(" ");O==="&"&&P!==-1&&P<L&&A[P+1]==="!"&&(P=A.indexOf(" ",P+1)),(P===-1||L<P)&&(q=!0)}q||(E=`
|
|
1264
|
+
${r.indent}`)}}else(A===""||A[0]===`
|
|
1265
|
+
`)&&(E="");return b+=E+A,r.inFlow?_&&i&&i():w&&!_?b+=Oc.lineComment(b,r.indent,l(w)):S&&n&&n(),b}HR.stringifyPair=QX});var fS=T(lS=>{"use strict";y();var WR=ae("process");function YX(t,...e){t==="debug"&&console.log(...e)}function XX(t,e){(t==="debug"||t==="warn")&&(typeof WR.emitWarning=="function"?WR.emitWarning(e):console.warn(e))}lS.debug=YX;lS.warn=XX});var am=T(sm=>{"use strict";y();var nm=xe(),zR=dt(),rm="<<",im={identify:t=>t===rm||typeof t=="symbol"&&t.description===rm,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new zR.Scalar(Symbol(rm)),{addToJSMap:JR}),stringify:()=>rm},ZX=(t,e)=>(im.identify(e)||nm.isScalar(e)&&(!e.type||e.type===zR.Scalar.PLAIN)&&im.identify(e.value))&&t?.doc.schema.tags.some(r=>r.tag===im.tag&&r.default);function JR(t,e,r){let i=KR(t,r);if(nm.isSeq(i))for(let n of i.items)pS(t,e,n);else if(Array.isArray(i))for(let n of i)pS(t,e,n);else pS(t,e,i)}function pS(t,e,r){let i=KR(t,r);if(!nm.isMap(i))throw new Error("Merge sources must be maps or map aliases");let n=i.toJSON(null,t,Map);for(let[s,a]of n)e instanceof Map?e.has(s)||e.set(s,a):e instanceof Set?e.add(s):Object.prototype.hasOwnProperty.call(e,s)||Object.defineProperty(e,s,{value:a,writable:!0,enumerable:!0,configurable:!0});return e}function KR(t,e){return t&&nm.isAlias(e)?e.resolve(t.doc,t):e}sm.addMergeToJSMap=JR;sm.isMergeKey=ZX;sm.merge=im});var dS=T(XR=>{"use strict";y();var eZ=fS(),QR=am(),tZ=Ec(),YR=xe(),hS=Bn();function rZ(t,e,{key:r,value:i}){if(YR.isNode(r)&&r.addToJSMap)r.addToJSMap(t,e,i);else if(QR.isMergeKey(t,r))QR.addMergeToJSMap(t,e,i);else{let n=hS.toJS(r,"",t);if(e instanceof Map)e.set(n,hS.toJS(i,n,t));else if(e instanceof Set)e.add(n);else{let s=iZ(r,n,t),a=hS.toJS(i,s,t);s in e?Object.defineProperty(e,s,{value:a,writable:!0,enumerable:!0,configurable:!0}):e[s]=a}}return e}function iZ(t,e,r){if(e===null)return"";if(typeof e!="object")return String(e);if(YR.isNode(t)&&r?.doc){let i=tZ.createStringifyContext(r.doc,{});i.anchors=new Set;for(let s of r.anchors.keys())i.anchors.add(s.anchor);i.inFlow=!0,i.inStringifyKey=!0;let n=t.toString(i);if(!r.mapKeyWarned){let s=JSON.stringify(n);s.length>40&&(s=s.substring(0,36)+'..."'),eZ.warn(r.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${s}. Set mapAsMap: true to use object keys.`),r.mapKeyWarned=!0}return n}return JSON.stringify(e)}XR.addPairToJSMap=rZ});var Hn=T(mS=>{"use strict";y();var ZR=xc(),nZ=GR(),sZ=dS(),om=xe();function aZ(t,e,r){let i=ZR.createNode(t,void 0,r),n=ZR.createNode(e,void 0,r);return new um(i,n)}var um=class t{constructor(e,r=null){Object.defineProperty(this,om.NODE_TYPE,{value:om.PAIR}),this.key=e,this.value=r}clone(e){let{key:r,value:i}=this;return om.isNode(r)&&(r=r.clone(e)),om.isNode(i)&&(i=i.clone(e)),new t(r,i)}toJSON(e,r){let i=r?.mapAsMap?new Map:{};return sZ.addPairToJSMap(r,i,this)}toString(e,r,i){return e?.doc?nZ.stringifyPair(this,e,r,i):JSON.stringify(this)}};mS.Pair=um;mS.createPair=aZ});var gS=T(tM=>{"use strict";y();var Js=xe(),eM=Ec(),cm=kc();function oZ(t,e,r){return(e.inFlow??t.flow?cZ:uZ)(t,e,r)}function uZ({comment:t,items:e},r,{blockItemPrefix:i,flowChars:n,itemIndent:s,onChompKeep:a,onComment:o}){let{indent:u,options:{commentString:l}}=r,f=Object.assign({},r,{indent:s,type:null}),h=!1,p=[];for(let v=0;v<e.length;++v){let S=e[v],b=null;if(Js.isNode(S))!h&&S.spaceBefore&&p.push(""),lm(r,p,S.commentBefore,h),S.comment&&(b=S.comment);else if(Js.isPair(S)){let k=Js.isNode(S.key)?S.key:null;k&&(!h&&k.spaceBefore&&p.push(""),lm(r,p,k.commentBefore,h))}h=!1;let g=eM.stringify(S,f,()=>b=null,()=>h=!0);b&&(g+=cm.lineComment(g,s,l(b))),h&&b&&(h=!1),p.push(i+g)}let m;if(p.length===0)m=n.start+n.end;else{m=p[0];for(let v=1;v<p.length;++v){let S=p[v];m+=S?`
|
|
1266
|
+
${u}${S}`:`
|
|
1267
|
+
`}}return t?(m+=`
|
|
1268
|
+
`+cm.indentComment(l(t),u),o&&o()):h&&a&&a(),m}function cZ({items:t},e,{flowChars:r,itemIndent:i}){let{indent:n,indentStep:s,flowCollectionPadding:a,options:{commentString:o}}=e;i+=s;let u=Object.assign({},e,{indent:i,inFlow:!0,type:null}),l=!1,f=0,h=[];for(let v=0;v<t.length;++v){let S=t[v],b=null;if(Js.isNode(S))S.spaceBefore&&h.push(""),lm(e,h,S.commentBefore,!1),S.comment&&(b=S.comment);else if(Js.isPair(S)){let k=Js.isNode(S.key)?S.key:null;k&&(k.spaceBefore&&h.push(""),lm(e,h,k.commentBefore,!1),k.comment&&(l=!0));let w=Js.isNode(S.value)?S.value:null;w?(w.comment&&(b=w.comment),w.commentBefore&&(l=!0)):S.value==null&&k?.comment&&(b=k.comment)}b&&(l=!0);let g=eM.stringify(S,u,()=>b=null);l||(l=h.length>f||g.includes(`
|
|
1269
|
+
`)),v<t.length-1?g+=",":e.options.trailingComma&&(e.options.lineWidth>0&&(l||(l=h.reduce((k,w)=>k+w.length+2,2)+(g.length+2)>e.options.lineWidth)),l&&(g+=",")),b&&(g+=cm.lineComment(g,i,o(b))),h.push(g),f=h.length}let{start:p,end:m}=r;if(h.length===0)return p+m;if(!l){let v=h.reduce((S,b)=>S+b.length+2,2);l=e.options.lineWidth>0&&v>e.options.lineWidth}if(l){let v=p;for(let S of h)v+=S?`
|
|
1270
|
+
${s}${n}${S}`:`
|
|
1271
|
+
`;return`${v}
|
|
1272
|
+
${n}${m}`}else return`${p}${a}${h.join(" ")}${a}${m}`}function lm({indent:t,options:{commentString:e}},r,i,n){if(i&&n&&(i=i.replace(/^\n+/,"")),i){let s=cm.indentComment(e(i),t);r.push(s.trimStart())}}tM.stringifyCollection=oZ});var Wn=T(_S=>{"use strict";y();var lZ=gS(),fZ=dS(),pZ=Qd(),Gn=xe(),fm=Hn(),hZ=dt();function Nc(t,e){let r=Gn.isScalar(e)?e.value:e;for(let i of t)if(Gn.isPair(i)&&(i.key===e||i.key===r||Gn.isScalar(i.key)&&i.key.value===r))return i}var yS=class extends pZ.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(Gn.MAP,e),this.items=[]}static from(e,r,i){let{keepUndefined:n,replacer:s}=i,a=new this(e),o=(u,l)=>{if(typeof s=="function")l=s.call(r,u,l);else if(Array.isArray(s)&&!s.includes(u))return;(l!==void 0||n)&&a.items.push(fm.createPair(u,l,i))};if(r instanceof Map)for(let[u,l]of r)o(u,l);else if(r&&typeof r=="object")for(let u of Object.keys(r))o(u,r[u]);return typeof e.sortMapEntries=="function"&&a.items.sort(e.sortMapEntries),a}add(e,r){let i;Gn.isPair(e)?i=e:!e||typeof e!="object"||!("key"in e)?i=new fm.Pair(e,e?.value):i=new fm.Pair(e.key,e.value);let n=Nc(this.items,i.key),s=this.schema?.sortMapEntries;if(n){if(!r)throw new Error(`Key ${i.key} already set`);Gn.isScalar(n.value)&&hZ.isScalarValue(i.value)?n.value.value=i.value:n.value=i.value}else if(s){let a=this.items.findIndex(o=>s(i,o)<0);a===-1?this.items.push(i):this.items.splice(a,0,i)}else this.items.push(i)}delete(e){let r=Nc(this.items,e);return r?this.items.splice(this.items.indexOf(r),1).length>0:!1}get(e,r){let n=Nc(this.items,e)?.value;return(!r&&Gn.isScalar(n)?n.value:n)??void 0}has(e){return!!Nc(this.items,e)}set(e,r){this.add(new fm.Pair(e,r),!0)}toJSON(e,r,i){let n=i?new i:r?.mapAsMap?new Map:{};r?.onCreate&&r.onCreate(n);for(let s of this.items)fZ.addPairToJSMap(r,n,s);return n}toString(e,r,i){if(!e)return JSON.stringify(this);for(let n of this.items)if(!Gn.isPair(n))throw new Error(`Map items must all be pairs; found ${JSON.stringify(n)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),lZ.stringifyCollection(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:i,onComment:r})}};_S.YAMLMap=yS;_S.findPair=Nc});var _o=T(iM=>{"use strict";y();var dZ=xe(),rM=Wn(),mZ={collection:"map",default:!0,nodeClass:rM.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(t,e){return dZ.isMap(t)||e("Expected a mapping for this tag"),t},createNode:(t,e,r)=>rM.YAMLMap.from(t,e,r)};iM.map=mZ});var zn=T(nM=>{"use strict";y();var gZ=xc(),yZ=gS(),_Z=Qd(),hm=xe(),vZ=dt(),bZ=Bn(),vS=class extends _Z.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(hm.SEQ,e),this.items=[]}add(e){this.items.push(e)}delete(e){let r=pm(e);return typeof r!="number"?!1:this.items.splice(r,1).length>0}get(e,r){let i=pm(e);if(typeof i!="number")return;let n=this.items[i];return!r&&hm.isScalar(n)?n.value:n}has(e){let r=pm(e);return typeof r=="number"&&r<this.items.length}set(e,r){let i=pm(e);if(typeof i!="number")throw new Error(`Expected a valid index, not ${e}.`);let n=this.items[i];hm.isScalar(n)&&vZ.isScalarValue(r)?n.value=r:this.items[i]=r}toJSON(e,r){let i=[];r?.onCreate&&r.onCreate(i);let n=0;for(let s of this.items)i.push(bZ.toJS(s,String(n++),r));return i}toString(e,r,i){return e?yZ.stringifyCollection(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:i,onComment:r}):JSON.stringify(this)}static from(e,r,i){let{replacer:n}=i,s=new this(e);if(r&&Symbol.iterator in Object(r)){let a=0;for(let o of r){if(typeof n=="function"){let u=r instanceof Set?o:String(a++);o=n.call(r,u,o)}s.items.push(gZ.createNode(o,void 0,i))}}return s}};function pm(t){let e=hm.isScalar(t)?t.value:t;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}nM.YAMLSeq=vS});var vo=T(aM=>{"use strict";y();var SZ=xe(),sM=zn(),wZ={collection:"seq",default:!0,nodeClass:sM.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(t,e){return SZ.isSeq(t)||e("Expected a sequence for this tag"),t},createNode:(t,e,r)=>sM.YAMLSeq.from(t,e,r)};aM.seq=wZ});var Lc=T(oM=>{"use strict";y();var xZ=Tc(),kZ={identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify(t,e,r,i){return e=Object.assign({actualString:!0},e),xZ.stringifyString(t,e,r,i)}};oM.string=kZ});var dm=T(lM=>{"use strict";y();var uM=dt(),cM={identify:t=>t==null,createNode:()=>new uM.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new uM.Scalar(null),stringify:({source:t},e)=>typeof t=="string"&&cM.test.test(t)?t:e.options.nullStr};lM.nullTag=cM});var bS=T(pM=>{"use strict";y();var IZ=dt(),fM={identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>new IZ.Scalar(t[0]==="t"||t[0]==="T"),stringify({source:t,value:e},r){if(t&&fM.test.test(t)){let i=t[0]==="t"||t[0]==="T";if(e===i)return t}return e?r.options.trueStr:r.options.falseStr}};pM.boolTag=fM});var bo=T(hM=>{"use strict";y();function AZ({format:t,minFractionDigits:e,tag:r,value:i}){if(typeof i=="bigint")return String(i);let n=typeof i=="number"?i:Number(i);if(!isFinite(n))return isNaN(n)?".nan":n<0?"-.inf":".inf";let s=Object.is(i,-0)?"-0":JSON.stringify(i);if(!t&&e&&(!r||r==="tag:yaml.org,2002:float")&&/^-?\d/.test(s)&&!s.includes("e")){let a=s.indexOf(".");a<0&&(a=s.length,s+=".");let o=e-(s.length-a-1);for(;o-- >0;)s+="0"}return s}hM.stringifyNumber=AZ});var wS=T(mm=>{"use strict";y();var TZ=dt(),SS=bo(),EZ={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:SS.stringifyNumber},OZ={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t),stringify(t){let e=Number(t.value);return isFinite(e)?e.toExponential():SS.stringifyNumber(t)}},NZ={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(t){let e=new TZ.Scalar(parseFloat(t)),r=t.indexOf(".");return r!==-1&&t[t.length-1]==="0"&&(e.minFractionDigits=t.length-r-1),e},stringify:SS.stringifyNumber};mm.float=NZ;mm.floatExp=OZ;mm.floatNaN=EZ});var kS=T(ym=>{"use strict";y();var dM=bo(),gm=t=>typeof t=="bigint"||Number.isInteger(t),xS=(t,e,r,{intAsBigInt:i})=>i?BigInt(t):parseInt(t.substring(e),r);function mM(t,e,r){let{value:i}=t;return gm(i)&&i>=0?r+i.toString(e):dM.stringifyNumber(t)}var LZ={identify:t=>gm(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(t,e,r)=>xS(t,2,8,r),stringify:t=>mM(t,8,"0o")},PZ={identify:gm,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(t,e,r)=>xS(t,0,10,r),stringify:dM.stringifyNumber},qZ={identify:t=>gm(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(t,e,r)=>xS(t,2,16,r),stringify:t=>mM(t,16,"0x")};ym.int=PZ;ym.intHex=qZ;ym.intOct=LZ});var yM=T(gM=>{"use strict";y();var CZ=_o(),RZ=dm(),MZ=vo(),DZ=Lc(),FZ=bS(),IS=wS(),AS=kS(),jZ=[CZ.map,MZ.seq,DZ.string,RZ.nullTag,FZ.boolTag,AS.intOct,AS.int,AS.intHex,IS.floatNaN,IS.floatExp,IS.float];gM.schema=jZ});var bM=T(vM=>{"use strict";y();var BZ=dt(),VZ=_o(),$Z=vo();function _M(t){return typeof t=="bigint"||Number.isInteger(t)}var _m=({value:t})=>JSON.stringify(t),UZ=[{identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify:_m},{identify:t=>t==null,createNode:()=>new BZ.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:_m},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:t=>t==="true",stringify:_m},{identify:_M,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(t,e,{intAsBigInt:r})=>r?BigInt(t):parseInt(t,10),stringify:({value:t})=>_M(t)?t.toString():JSON.stringify(t)},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:t=>parseFloat(t),stringify:_m}],HZ={default:!0,tag:"",test:/^/,resolve(t,e){return e(`Unresolved plain scalar ${JSON.stringify(t)}`),t}},GZ=[VZ.map,$Z.seq].concat(UZ,HZ);vM.schema=GZ});var ES=T(SM=>{"use strict";y();var Pc=ae("buffer"),TS=dt(),WZ=Tc(),zZ={identify:t=>t instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(t,e){if(typeof Pc.Buffer=="function")return Pc.Buffer.from(t,"base64");if(typeof atob=="function"){let r=atob(t.replace(/[\n\r]/g,"")),i=new Uint8Array(r.length);for(let n=0;n<r.length;++n)i[n]=r.charCodeAt(n);return i}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),t},stringify({comment:t,type:e,value:r},i,n,s){if(!r)return"";let a=r,o;if(typeof Pc.Buffer=="function")o=a instanceof Pc.Buffer?a.toString("base64"):Pc.Buffer.from(a.buffer).toString("base64");else if(typeof btoa=="function"){let u="";for(let l=0;l<a.length;++l)u+=String.fromCharCode(a[l]);o=btoa(u)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e??(e=TS.Scalar.BLOCK_LITERAL),e!==TS.Scalar.QUOTE_DOUBLE){let u=Math.max(i.options.lineWidth-i.indent.length,i.options.minContentWidth),l=Math.ceil(o.length/u),f=new Array(l);for(let h=0,p=0;h<l;++h,p+=u)f[h]=o.substr(p,u);o=f.join(e===TS.Scalar.BLOCK_LITERAL?`
|
|
1273
|
+
`:" ")}return WZ.stringifyString({comment:t,type:e,value:o},i,n,s)}};SM.binary=zZ});var Sm=T(bm=>{"use strict";y();var vm=xe(),OS=Hn(),JZ=dt(),KZ=zn();function wM(t,e){if(vm.isSeq(t))for(let r=0;r<t.items.length;++r){let i=t.items[r];if(!vm.isPair(i)){if(vm.isMap(i)){i.items.length>1&&e("Each pair must have its own sequence indicator");let n=i.items[0]||new OS.Pair(new JZ.Scalar(null));if(i.commentBefore&&(n.key.commentBefore=n.key.commentBefore?`${i.commentBefore}
|
|
1274
|
+
${n.key.commentBefore}`:i.commentBefore),i.comment){let s=n.value??n.key;s.comment=s.comment?`${i.comment}
|
|
1275
|
+
${s.comment}`:i.comment}i=n}t.items[r]=vm.isPair(i)?i:new OS.Pair(i)}}else e("Expected a sequence for this tag");return t}function xM(t,e,r){let{replacer:i}=r,n=new KZ.YAMLSeq(t);n.tag="tag:yaml.org,2002:pairs";let s=0;if(e&&Symbol.iterator in Object(e))for(let a of e){typeof i=="function"&&(a=i.call(e,String(s++),a));let o,u;if(Array.isArray(a))if(a.length===2)o=a[0],u=a[1];else throw new TypeError(`Expected [key, value] tuple: ${a}`);else if(a&&a instanceof Object){let l=Object.keys(a);if(l.length===1)o=l[0],u=a[o];else throw new TypeError(`Expected tuple with one key, not ${l.length} keys`)}else o=a;n.items.push(OS.createPair(o,u,r))}return n}var QZ={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:wM,createNode:xM};bm.createPairs=xM;bm.pairs=QZ;bm.resolvePairs=wM});var PS=T(LS=>{"use strict";y();var kM=xe(),NS=Bn(),qc=Wn(),YZ=zn(),IM=Sm(),Ks=class t extends YZ.YAMLSeq{constructor(){super(),this.add=qc.YAMLMap.prototype.add.bind(this),this.delete=qc.YAMLMap.prototype.delete.bind(this),this.get=qc.YAMLMap.prototype.get.bind(this),this.has=qc.YAMLMap.prototype.has.bind(this),this.set=qc.YAMLMap.prototype.set.bind(this),this.tag=t.tag}toJSON(e,r){if(!r)return super.toJSON(e);let i=new Map;r?.onCreate&&r.onCreate(i);for(let n of this.items){let s,a;if(kM.isPair(n)?(s=NS.toJS(n.key,"",r),a=NS.toJS(n.value,s,r)):s=NS.toJS(n,"",r),i.has(s))throw new Error("Ordered maps must not include duplicate keys");i.set(s,a)}return i}static from(e,r,i){let n=IM.createPairs(e,r,i),s=new this;return s.items=n.items,s}};Ks.tag="tag:yaml.org,2002:omap";var XZ={collection:"seq",identify:t=>t instanceof Map,nodeClass:Ks,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,e){let r=IM.resolvePairs(t,e),i=[];for(let{key:n}of r.items)kM.isScalar(n)&&(i.includes(n.value)?e(`Ordered maps must not include duplicate keys: ${n.value}`):i.push(n.value));return Object.assign(new Ks,r)},createNode:(t,e,r)=>Ks.from(t,e,r)};LS.YAMLOMap=Ks;LS.omap=XZ});var NM=T(qS=>{"use strict";y();var AM=dt();function TM({value:t,source:e},r){return e&&(t?EM:OM).test.test(e)?e:t?r.options.trueStr:r.options.falseStr}var EM={identify:t=>t===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new AM.Scalar(!0),stringify:TM},OM={identify:t=>t===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new AM.Scalar(!1),stringify:TM};qS.falseTag=OM;qS.trueTag=EM});var LM=T(wm=>{"use strict";y();var ZZ=dt(),CS=bo(),eee={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:CS.stringifyNumber},tee={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t.replace(/_/g,"")),stringify(t){let e=Number(t.value);return isFinite(e)?e.toExponential():CS.stringifyNumber(t)}},ree={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){let e=new ZZ.Scalar(parseFloat(t.replace(/_/g,""))),r=t.indexOf(".");if(r!==-1){let i=t.substring(r+1).replace(/_/g,"");i[i.length-1]==="0"&&(e.minFractionDigits=i.length)}return e},stringify:CS.stringifyNumber};wm.float=ree;wm.floatExp=tee;wm.floatNaN=eee});var qM=T(Rc=>{"use strict";y();var PM=bo(),Cc=t=>typeof t=="bigint"||Number.isInteger(t);function xm(t,e,r,{intAsBigInt:i}){let n=t[0];if((n==="-"||n==="+")&&(e+=1),t=t.substring(e).replace(/_/g,""),i){switch(r){case 2:t=`0b${t}`;break;case 8:t=`0o${t}`;break;case 16:t=`0x${t}`;break}let a=BigInt(t);return n==="-"?BigInt(-1)*a:a}let s=parseInt(t,r);return n==="-"?-1*s:s}function RS(t,e,r){let{value:i}=t;if(Cc(i)){let n=i.toString(e);return i<0?"-"+r+n.substr(1):r+n}return PM.stringifyNumber(t)}var iee={identify:Cc,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(t,e,r)=>xm(t,2,2,r),stringify:t=>RS(t,2,"0b")},nee={identify:Cc,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(t,e,r)=>xm(t,1,8,r),stringify:t=>RS(t,8,"0")},see={identify:Cc,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(t,e,r)=>xm(t,0,10,r),stringify:PM.stringifyNumber},aee={identify:Cc,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(t,e,r)=>xm(t,2,16,r),stringify:t=>RS(t,16,"0x")};Rc.int=see;Rc.intBin=iee;Rc.intHex=aee;Rc.intOct=nee});var DS=T(MS=>{"use strict";y();var Am=xe(),km=Hn(),Im=Wn(),Qs=class t extends Im.YAMLMap{constructor(e){super(e),this.tag=t.tag}add(e){let r;Am.isPair(e)?r=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?r=new km.Pair(e.key,null):r=new km.Pair(e,null),Im.findPair(this.items,r.key)||this.items.push(r)}get(e,r){let i=Im.findPair(this.items,e);return!r&&Am.isPair(i)?Am.isScalar(i.key)?i.key.value:i.key:i}set(e,r){if(typeof r!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof r}`);let i=Im.findPair(this.items,e);i&&!r?this.items.splice(this.items.indexOf(i),1):!i&&r&&this.items.push(new km.Pair(e))}toJSON(e,r){return super.toJSON(e,r,Set)}toString(e,r,i){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),r,i);throw new Error("Set items must all have null values")}static from(e,r,i){let{replacer:n}=i,s=new this(e);if(r&&Symbol.iterator in Object(r))for(let a of r)typeof n=="function"&&(a=n.call(r,a,a)),s.items.push(km.createPair(a,null,i));return s}};Qs.tag="tag:yaml.org,2002:set";var oee={collection:"map",identify:t=>t instanceof Set,nodeClass:Qs,default:!1,tag:"tag:yaml.org,2002:set",createNode:(t,e,r)=>Qs.from(t,e,r),resolve(t,e){if(Am.isMap(t)){if(t.hasAllNullValues(!0))return Object.assign(new Qs,t);e("Set items must all have null values")}else e("Expected a mapping for this tag");return t}};MS.YAMLSet=Qs;MS.set=oee});var jS=T(Tm=>{"use strict";y();var uee=bo();function FS(t,e){let r=t[0],i=r==="-"||r==="+"?t.substring(1):t,n=a=>e?BigInt(a):Number(a),s=i.replace(/_/g,"").split(":").reduce((a,o)=>a*n(60)+n(o),n(0));return r==="-"?n(-1)*s:s}function CM(t){let{value:e}=t,r=a=>a;if(typeof e=="bigint")r=a=>BigInt(a);else if(isNaN(e)||!isFinite(e))return uee.stringifyNumber(t);let i="";e<0&&(i="-",e*=r(-1));let n=r(60),s=[e%n];return e<60?s.unshift(0):(e=(e-s[0])/n,s.unshift(e%n),e>=60&&(e=(e-s[0])/n,s.unshift(e))),i+s.map(a=>String(a).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var cee={identify:t=>typeof t=="bigint"||Number.isInteger(t),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(t,e,{intAsBigInt:r})=>FS(t,r),stringify:CM},lee={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:t=>FS(t,!1),stringify:CM},RM={identify:t=>t instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(t){let e=t.match(RM.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,r,i,n,s,a,o]=e.map(Number),u=e[7]?Number((e[7]+"00").substr(1,3)):0,l=Date.UTC(r,i-1,n,s||0,a||0,o||0,u),f=e[8];if(f&&f!=="Z"){let h=FS(f,!1);Math.abs(h)<30&&(h*=60),l-=6e4*h}return new Date(l)},stringify:({value:t})=>t?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};Tm.floatTime=lee;Tm.intTime=cee;Tm.timestamp=RM});var FM=T(DM=>{"use strict";y();var fee=_o(),pee=dm(),hee=vo(),dee=Lc(),mee=ES(),MM=NM(),BS=LM(),Em=qM(),gee=am(),yee=PS(),_ee=Sm(),vee=DS(),VS=jS(),bee=[fee.map,hee.seq,dee.string,pee.nullTag,MM.trueTag,MM.falseTag,Em.intBin,Em.intOct,Em.int,Em.intHex,BS.floatNaN,BS.floatExp,BS.float,mee.binary,gee.merge,yee.omap,_ee.pairs,vee.set,VS.intTime,VS.floatTime,VS.timestamp];DM.schema=bee});var JM=T(HS=>{"use strict";y();var $M=_o(),See=dm(),UM=vo(),wee=Lc(),xee=bS(),$S=wS(),US=kS(),kee=yM(),Iee=bM(),HM=ES(),Mc=am(),GM=PS(),WM=Sm(),jM=FM(),zM=DS(),Om=jS(),BM=new Map([["core",kee.schema],["failsafe",[$M.map,UM.seq,wee.string]],["json",Iee.schema],["yaml11",jM.schema],["yaml-1.1",jM.schema]]),VM={binary:HM.binary,bool:xee.boolTag,float:$S.float,floatExp:$S.floatExp,floatNaN:$S.floatNaN,floatTime:Om.floatTime,int:US.int,intHex:US.intHex,intOct:US.intOct,intTime:Om.intTime,map:$M.map,merge:Mc.merge,null:See.nullTag,omap:GM.omap,pairs:WM.pairs,seq:UM.seq,set:zM.set,timestamp:Om.timestamp},Aee={"tag:yaml.org,2002:binary":HM.binary,"tag:yaml.org,2002:merge":Mc.merge,"tag:yaml.org,2002:omap":GM.omap,"tag:yaml.org,2002:pairs":WM.pairs,"tag:yaml.org,2002:set":zM.set,"tag:yaml.org,2002:timestamp":Om.timestamp};function Tee(t,e,r){let i=BM.get(e);if(i&&!t)return r&&!i.includes(Mc.merge)?i.concat(Mc.merge):i.slice();let n=i;if(!n)if(Array.isArray(t))n=[];else{let s=Array.from(BM.keys()).filter(a=>a!=="yaml11").map(a=>JSON.stringify(a)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${s} or define customTags array`)}if(Array.isArray(t))for(let s of t)n=n.concat(s);else typeof t=="function"&&(n=t(n.slice()));return r&&(n=n.concat(Mc.merge)),n.reduce((s,a)=>{let o=typeof a=="string"?VM[a]:a;if(!o){let u=JSON.stringify(a),l=Object.keys(VM).map(f=>JSON.stringify(f)).join(", ");throw new Error(`Unknown custom tag ${u}; use one of ${l}`)}return s.includes(o)||s.push(o),s},[])}HS.coreKnownTags=Aee;HS.getTags=Tee});var zS=T(KM=>{"use strict";y();var GS=xe(),Eee=_o(),Oee=vo(),Nee=Lc(),Nm=JM(),Lee=(t,e)=>t.key<e.key?-1:t.key>e.key?1:0,WS=class t{constructor({compat:e,customTags:r,merge:i,resolveKnownTags:n,schema:s,sortMapEntries:a,toStringDefaults:o}){this.compat=Array.isArray(e)?Nm.getTags(e,"compat"):e?Nm.getTags(null,e):null,this.name=typeof s=="string"&&s||"core",this.knownTags=n?Nm.coreKnownTags:{},this.tags=Nm.getTags(r,this.name,i),this.toStringOptions=o??null,Object.defineProperty(this,GS.MAP,{value:Eee.map}),Object.defineProperty(this,GS.SCALAR,{value:Nee.string}),Object.defineProperty(this,GS.SEQ,{value:Oee.seq}),this.sortMapEntries=typeof a=="function"?a:a===!0?Lee:null}clone(){let e=Object.create(t.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}};KM.Schema=WS});var YM=T(QM=>{"use strict";y();var Pee=xe(),JS=Ec(),Dc=kc();function qee(t,e){let r=[],i=e.directives===!0;if(e.directives!==!1&&t.directives){let u=t.directives.toString(t);u?(r.push(u),i=!0):t.directives.docStart&&(i=!0)}i&&r.push("---");let n=JS.createStringifyContext(t,e),{commentString:s}=n.options;if(t.commentBefore){r.length!==1&&r.unshift("");let u=s(t.commentBefore);r.unshift(Dc.indentComment(u,""))}let a=!1,o=null;if(t.contents){if(Pee.isNode(t.contents)){if(t.contents.spaceBefore&&i&&r.push(""),t.contents.commentBefore){let f=s(t.contents.commentBefore);r.push(Dc.indentComment(f,""))}n.forceBlockIndent=!!t.comment,o=t.contents.comment}let u=o?void 0:()=>a=!0,l=JS.stringify(t.contents,n,()=>o=null,u);o&&(l+=Dc.lineComment(l,"",s(o))),(l[0]==="|"||l[0]===">")&&r[r.length-1]==="---"?r[r.length-1]=`--- ${l}`:r.push(l)}else r.push(JS.stringify(t.contents,n));if(t.directives?.docEnd)if(t.comment){let u=s(t.comment);u.includes(`
|
|
1276
|
+
`)?(r.push("..."),r.push(Dc.indentComment(u,""))):r.push(`... ${u}`)}else r.push("...");else{let u=t.comment;u&&a&&(u=u.replace(/^\n+/,"")),u&&((!a||o)&&r[r.length-1]!==""&&r.push(""),r.push(Dc.indentComment(s(u),"")))}return r.join(`
|
|
1277
|
+
`)+`
|
|
1278
|
+
`}QM.stringifyDocument=qee});var Fc=T(XM=>{"use strict";y();var Cee=wc(),So=Qd(),ai=xe(),Ree=Hn(),Mee=Bn(),Dee=zS(),Fee=YM(),KS=Wd(),jee=Z0(),Bee=xc(),QS=X0(),YS=class t{constructor(e,r,i){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,ai.NODE_TYPE,{value:ai.DOC});let n=null;typeof r=="function"||Array.isArray(r)?n=r:i===void 0&&r&&(i=r,r=void 0);let s=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},i);this.options=s;let{version:a}=s;i?._directives?(this.directives=i._directives.atDocument(),this.directives.yaml.explicit&&(a=this.directives.yaml.version)):this.directives=new QS.Directives({version:a}),this.setSchema(a,i),this.contents=e===void 0?null:this.createNode(e,n,i)}clone(){let e=Object.create(t.prototype,{[ai.NODE_TYPE]:{value:ai.DOC}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=ai.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){wo(this.contents)&&this.contents.add(e)}addIn(e,r){wo(this.contents)&&this.contents.addIn(e,r)}createAlias(e,r){if(!e.anchor){let i=KS.anchorNames(this);e.anchor=!r||i.has(r)?KS.findNewAnchor(r||"a",i):r}return new Cee.Alias(e.anchor)}createNode(e,r,i){let n;if(typeof r=="function")e=r.call({"":e},"",e),n=r;else if(Array.isArray(r)){let b=k=>typeof k=="number"||k instanceof String||k instanceof Number,g=r.filter(b).map(String);g.length>0&&(r=r.concat(g)),n=r}else i===void 0&&r&&(i=r,r=void 0);let{aliasDuplicateObjects:s,anchorPrefix:a,flow:o,keepUndefined:u,onTagObj:l,tag:f}=i??{},{onAnchor:h,setAnchors:p,sourceObjects:m}=KS.createNodeAnchors(this,a||"a"),v={aliasDuplicateObjects:s??!0,keepUndefined:u??!1,onAnchor:h,onTagObj:l,replacer:n,schema:this.schema,sourceObjects:m},S=Bee.createNode(e,f,v);return o&&ai.isCollection(S)&&(S.flow=!0),p(),S}createPair(e,r,i={}){let n=this.createNode(e,null,i),s=this.createNode(r,null,i);return new Ree.Pair(n,s)}delete(e){return wo(this.contents)?this.contents.delete(e):!1}deleteIn(e){return So.isEmptyPath(e)?this.contents==null?!1:(this.contents=null,!0):wo(this.contents)?this.contents.deleteIn(e):!1}get(e,r){return ai.isCollection(this.contents)?this.contents.get(e,r):void 0}getIn(e,r){return So.isEmptyPath(e)?!r&&ai.isScalar(this.contents)?this.contents.value:this.contents:ai.isCollection(this.contents)?this.contents.getIn(e,r):void 0}has(e){return ai.isCollection(this.contents)?this.contents.has(e):!1}hasIn(e){return So.isEmptyPath(e)?this.contents!==void 0:ai.isCollection(this.contents)?this.contents.hasIn(e):!1}set(e,r){this.contents==null?this.contents=So.collectionFromPath(this.schema,[e],r):wo(this.contents)&&this.contents.set(e,r)}setIn(e,r){So.isEmptyPath(e)?this.contents=r:this.contents==null?this.contents=So.collectionFromPath(this.schema,Array.from(e),r):wo(this.contents)&&this.contents.setIn(e,r)}setSchema(e,r={}){typeof e=="number"&&(e=String(e));let i;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new QS.Directives({version:"1.1"}),i={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new QS.Directives({version:e}),i={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,i=null;break;default:{let n=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${n}`)}}if(r.schema instanceof Object)this.schema=r.schema;else if(i)this.schema=new Dee.Schema(Object.assign(i,r));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:r,mapAsMap:i,maxAliasCount:n,onAnchor:s,reviver:a}={}){let o={anchors:new Map,doc:this,keep:!e,mapAsMap:i===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},u=Mee.toJS(this.contents,r??"",o);if(typeof s=="function")for(let{count:l,res:f}of o.anchors.values())s(f,l);return typeof a=="function"?jee.applyReviver(a,{"":u},"",u):u}toJSON(e,r){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:r})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let r=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${r}`)}return Fee.stringifyDocument(this,e)}};function wo(t){if(ai.isCollection(t))return!0;throw new Error("Expected a YAML collection as document contents")}XM.Document=YS});var Vc=T(Bc=>{"use strict";y();var jc=class extends Error{constructor(e,r,i,n){super(),this.name=e,this.code=i,this.message=n,this.pos=r}},XS=class extends jc{constructor(e,r,i){super("YAMLParseError",e,r,i)}},ZS=class extends jc{constructor(e,r,i){super("YAMLWarning",e,r,i)}},Vee=(t,e)=>r=>{if(r.pos[0]===-1)return;r.linePos=r.pos.map(o=>e.linePos(o));let{line:i,col:n}=r.linePos[0];r.message+=` at line ${i}, column ${n}`;let s=n-1,a=t.substring(e.lineStarts[i-1],e.lineStarts[i]).replace(/[\n\r]+$/,"");if(s>=60&&a.length>80){let o=Math.min(s-39,a.length-79);a="\u2026"+a.substring(o),s-=o-1}if(a.length>80&&(a=a.substring(0,79)+"\u2026"),i>1&&/^ *$/.test(a.substring(0,s))){let o=t.substring(e.lineStarts[i-2],e.lineStarts[i-1]);o.length>80&&(o=o.substring(0,79)+`\u2026
|
|
1279
|
+
`),a=o+a}if(/[^ ]/.test(a)){let o=1,u=r.linePos[1];u?.line===i&&u.col>n&&(o=Math.max(1,Math.min(u.col-n,80-s)));let l=" ".repeat(s)+"^".repeat(o);r.message+=`:
|
|
1280
|
+
|
|
1281
|
+
${a}
|
|
1282
|
+
${l}
|
|
1283
|
+
`}};Bc.YAMLError=jc;Bc.YAMLParseError=XS;Bc.YAMLWarning=ZS;Bc.prettifyError=Vee});var $c=T(ZM=>{"use strict";y();function $ee(t,{flow:e,indicator:r,next:i,offset:n,onError:s,parentIndent:a,startOnNewline:o}){let u=!1,l=o,f=o,h="",p="",m=!1,v=!1,S=null,b=null,g=null,k=null,w=null,_=null,A=null;for(let L of t)switch(v&&(L.type!=="space"&&L.type!=="newline"&&L.type!=="comma"&&s(L.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),v=!1),S&&(l&&L.type!=="comment"&&L.type!=="newline"&&s(S,"TAB_AS_INDENT","Tabs are not allowed as indentation"),S=null),L.type){case"space":!e&&(r!=="doc-start"||i?.type!=="flow-collection")&&L.source.includes(" ")&&(S=L),f=!0;break;case"comment":{f||s(L,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let B=L.source.substring(1)||" ";h?h+=p+B:h=B,p="",l=!1;break}case"newline":l?h?h+=L.source:(!_||r!=="seq-item-ind")&&(u=!0):p+=L.source,l=!0,m=!0,(b||g)&&(k=L),f=!0;break;case"anchor":b&&s(L,"MULTIPLE_ANCHORS","A node can have at most one anchor"),L.source.endsWith(":")&&s(L.offset+L.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),b=L,A??(A=L.offset),l=!1,f=!1,v=!0;break;case"tag":{g&&s(L,"MULTIPLE_TAGS","A node can have at most one tag"),g=L,A??(A=L.offset),l=!1,f=!1,v=!0;break}case r:(b||g)&&s(L,"BAD_PROP_ORDER",`Anchors and tags must be after the ${L.source} indicator`),_&&s(L,"UNEXPECTED_TOKEN",`Unexpected ${L.source} in ${e??"collection"}`),_=L,l=r==="seq-item-ind"||r==="explicit-key-ind",f=!1;break;case"comma":if(e){w&&s(L,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),w=L,l=!1,f=!1;break}default:s(L,"UNEXPECTED_TOKEN",`Unexpected ${L.type} token`),l=!1,f=!1}let E=t[t.length-1],O=E?E.offset+E.source.length:n;return v&&i&&i.type!=="space"&&i.type!=="newline"&&i.type!=="comma"&&(i.type!=="scalar"||i.source!=="")&&s(i.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),S&&(l&&S.indent<=a||i?.type==="block-map"||i?.type==="block-seq")&&s(S,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:w,found:_,spaceBefore:u,comment:h,hasNewline:m,anchor:b,tag:g,newlineAfterProp:k,end:O,start:A??O}}ZM.resolveProps=$ee});var Lm=T(eD=>{"use strict";y();function e1(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes(`
|
|
1284
|
+
`))return!0;if(t.end){for(let e of t.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(let e of t.items){for(let r of e.start)if(r.type==="newline")return!0;if(e.sep){for(let r of e.sep)if(r.type==="newline")return!0}if(e1(e.key)||e1(e.value))return!0}return!1;default:return!0}}eD.containsNewline=e1});var t1=T(tD=>{"use strict";y();var Uee=Lm();function Hee(t,e,r){if(e?.type==="flow-collection"){let i=e.end[0];i.indent===t&&(i.source==="]"||i.source==="}")&&Uee.containsNewline(e)&&r(i,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}tD.flowIndentCheck=Hee});var r1=T(iD=>{"use strict";y();var rD=xe();function Gee(t,e,r){let{uniqueKeys:i}=t.options;if(i===!1)return!1;let n=typeof i=="function"?i:(s,a)=>s===a||rD.isScalar(s)&&rD.isScalar(a)&&s.value===a.value;return e.some(s=>n(s.key,r))}iD.mapIncludes=Gee});var cD=T(uD=>{"use strict";y();var nD=Hn(),Wee=Wn(),sD=$c(),zee=Lm(),aD=t1(),Jee=r1(),oD="All mapping items must start at the same column";function Kee({composeNode:t,composeEmptyNode:e},r,i,n,s){let a=s?.nodeClass??Wee.YAMLMap,o=new a(r.schema);r.atRoot&&(r.atRoot=!1);let u=i.offset,l=null;for(let f of i.items){let{start:h,key:p,sep:m,value:v}=f,S=sD.resolveProps(h,{indicator:"explicit-key-ind",next:p??m?.[0],offset:u,onError:n,parentIndent:i.indent,startOnNewline:!0}),b=!S.found;if(b){if(p&&(p.type==="block-seq"?n(u,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in p&&p.indent!==i.indent&&n(u,"BAD_INDENT",oD)),!S.anchor&&!S.tag&&!m){l=S.end,S.comment&&(o.comment?o.comment+=`
|
|
1285
|
+
`+S.comment:o.comment=S.comment);continue}(S.newlineAfterProp||zee.containsNewline(p))&&n(p??h[h.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else S.found?.indent!==i.indent&&n(u,"BAD_INDENT",oD);r.atKey=!0;let g=S.end,k=p?t(r,p,S,n):e(r,g,h,null,S,n);r.schema.compat&&aD.flowIndentCheck(i.indent,p,n),r.atKey=!1,Jee.mapIncludes(r,o.items,k)&&n(g,"DUPLICATE_KEY","Map keys must be unique");let w=sD.resolveProps(m??[],{indicator:"map-value-ind",next:v,offset:k.range[2],onError:n,parentIndent:i.indent,startOnNewline:!p||p.type==="block-scalar"});if(u=w.end,w.found){b&&(v?.type==="block-map"&&!w.hasNewline&&n(u,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),r.options.strict&&S.start<w.found.offset-1024&&n(k.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let _=v?t(r,v,w,n):e(r,u,m,null,w,n);r.schema.compat&&aD.flowIndentCheck(i.indent,v,n),u=_.range[2];let A=new nD.Pair(k,_);r.options.keepSourceTokens&&(A.srcToken=f),o.items.push(A)}else{b&&n(k.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),w.comment&&(k.comment?k.comment+=`
|
|
1286
|
+
`+w.comment:k.comment=w.comment);let _=new nD.Pair(k);r.options.keepSourceTokens&&(_.srcToken=f),o.items.push(_)}}return l&&l<u&&n(l,"IMPOSSIBLE","Map comment with trailing content"),o.range=[i.offset,u,l??u],o}uD.resolveBlockMap=Kee});var fD=T(lD=>{"use strict";y();var Qee=zn(),Yee=$c(),Xee=t1();function Zee({composeNode:t,composeEmptyNode:e},r,i,n,s){let a=s?.nodeClass??Qee.YAMLSeq,o=new a(r.schema);r.atRoot&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let u=i.offset,l=null;for(let{start:f,value:h}of i.items){let p=Yee.resolveProps(f,{indicator:"seq-item-ind",next:h,offset:u,onError:n,parentIndent:i.indent,startOnNewline:!0});if(!p.found)if(p.anchor||p.tag||h)h?.type==="block-seq"?n(p.end,"BAD_INDENT","All sequence items must start at the same column"):n(u,"MISSING_CHAR","Sequence item without - indicator");else{l=p.end,p.comment&&(o.comment=p.comment);continue}let m=h?t(r,h,p,n):e(r,p.end,f,null,p,n);r.schema.compat&&Xee.flowIndentCheck(i.indent,h,n),u=m.range[2],o.items.push(m)}return o.range=[i.offset,u,l??u],o}lD.resolveBlockSeq=Zee});var xo=T(pD=>{"use strict";y();function ete(t,e,r,i){let n="";if(t){let s=!1,a="";for(let o of t){let{source:u,type:l}=o;switch(l){case"space":s=!0;break;case"comment":{r&&!s&&i(o,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let f=u.substring(1)||" ";n?n+=a+f:n=f,a="";break}case"newline":n&&(a+=u),s=!0;break;default:i(o,"UNEXPECTED_TOKEN",`Unexpected ${l} at node end`)}e+=u.length}}return{comment:n,offset:e}}pD.resolveEnd=ete});var gD=T(mD=>{"use strict";y();var tte=xe(),rte=Hn(),hD=Wn(),ite=zn(),nte=xo(),dD=$c(),ste=Lm(),ate=r1(),i1="Block collections are not allowed within flow collections",n1=t=>t&&(t.type==="block-map"||t.type==="block-seq");function ote({composeNode:t,composeEmptyNode:e},r,i,n,s){let a=i.start.source==="{",o=a?"flow map":"flow sequence",u=s?.nodeClass??(a?hD.YAMLMap:ite.YAMLSeq),l=new u(r.schema);l.flow=!0;let f=r.atRoot;f&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let h=i.offset+i.start.source.length;for(let b=0;b<i.items.length;++b){let g=i.items[b],{start:k,key:w,sep:_,value:A}=g,E=dD.resolveProps(k,{flow:o,indicator:"explicit-key-ind",next:w??_?.[0],offset:h,onError:n,parentIndent:i.indent,startOnNewline:!1});if(!E.found){if(!E.anchor&&!E.tag&&!_&&!A){b===0&&E.comma?n(E.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${o}`):b<i.items.length-1&&n(E.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${o}`),E.comment&&(l.comment?l.comment+=`
|
|
1287
|
+
`+E.comment:l.comment=E.comment),h=E.end;continue}!a&&r.options.strict&&ste.containsNewline(w)&&n(w,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(b===0)E.comma&&n(E.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${o}`);else if(E.comma||n(E.start,"MISSING_CHAR",`Missing , between ${o} items`),E.comment){let O="";e:for(let L of k)switch(L.type){case"comma":case"space":break;case"comment":O=L.source.substring(1);break e;default:break e}if(O){let L=l.items[l.items.length-1];tte.isPair(L)&&(L=L.value??L.key),L.comment?L.comment+=`
|
|
1288
|
+
`+O:L.comment=O,E.comment=E.comment.substring(O.length+1)}}if(!a&&!_&&!E.found){let O=A?t(r,A,E,n):e(r,E.end,_,null,E,n);l.items.push(O),h=O.range[2],n1(A)&&n(O.range,"BLOCK_IN_FLOW",i1)}else{r.atKey=!0;let O=E.end,L=w?t(r,w,E,n):e(r,O,k,null,E,n);n1(w)&&n(L.range,"BLOCK_IN_FLOW",i1),r.atKey=!1;let B=dD.resolveProps(_??[],{flow:o,indicator:"map-value-ind",next:A,offset:L.range[2],onError:n,parentIndent:i.indent,startOnNewline:!1});if(B.found){if(!a&&!E.found&&r.options.strict){if(_)for(let P of _){if(P===B.found)break;if(P.type==="newline"){n(P,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}E.start<B.found.offset-1024&&n(B.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else A&&("source"in A&&A.source?.[0]===":"?n(A,"MISSING_CHAR",`Missing space after : in ${o}`):n(B.start,"MISSING_CHAR",`Missing , or : between ${o} items`));let R=A?t(r,A,B,n):B.found?e(r,B.end,_,null,B,n):null;R?n1(A)&&n(R.range,"BLOCK_IN_FLOW",i1):B.comment&&(L.comment?L.comment+=`
|
|
1289
|
+
`+B.comment:L.comment=B.comment);let q=new rte.Pair(L,R);if(r.options.keepSourceTokens&&(q.srcToken=g),a){let P=l;ate.mapIncludes(r,P.items,L)&&n(O,"DUPLICATE_KEY","Map keys must be unique"),P.items.push(q)}else{let P=new hD.YAMLMap(r.schema);P.flow=!0,P.items.push(q);let $=(R??L).range;P.range=[L.range[0],$[1],$[2]],l.items.push(P)}h=R?R.range[2]:B.end}}let p=a?"}":"]",[m,...v]=i.end,S=h;if(m?.source===p)S=m.offset+m.source.length;else{let b=o[0].toUpperCase()+o.substring(1),g=f?`${b} must end with a ${p}`:`${b} in block collection must be sufficiently indented and end with a ${p}`;n(h,f?"MISSING_CHAR":"BAD_INDENT",g),m&&m.source.length!==1&&v.unshift(m)}if(v.length>0){let b=nte.resolveEnd(v,S,r.options.strict,n);b.comment&&(l.comment?l.comment+=`
|
|
1290
|
+
`+b.comment:l.comment=b.comment),l.range=[i.offset,S,b.offset]}else l.range=[i.offset,S,S];return l}mD.resolveFlowCollection=ote});var _D=T(yD=>{"use strict";y();var ute=xe(),cte=dt(),lte=Wn(),fte=zn(),pte=cD(),hte=fD(),dte=gD();function s1(t,e,r,i,n,s){let a=r.type==="block-map"?pte.resolveBlockMap(t,e,r,i,s):r.type==="block-seq"?hte.resolveBlockSeq(t,e,r,i,s):dte.resolveFlowCollection(t,e,r,i,s),o=a.constructor;return n==="!"||n===o.tagName?(a.tag=o.tagName,a):(n&&(a.tag=n),a)}function mte(t,e,r,i,n){let s=i.tag,a=s?e.directives.tagName(s.source,p=>n(s,"TAG_RESOLVE_FAILED",p)):null;if(r.type==="block-seq"){let{anchor:p,newlineAfterProp:m}=i,v=p&&s?p.offset>s.offset?p:s:p??s;v&&(!m||m.offset<v.offset)&&n(v,"MISSING_CHAR","Missing newline after block sequence props")}let o=r.type==="block-map"?"map":r.type==="block-seq"?"seq":r.start.source==="{"?"map":"seq";if(!s||!a||a==="!"||a===lte.YAMLMap.tagName&&o==="map"||a===fte.YAMLSeq.tagName&&o==="seq")return s1(t,e,r,n,a);let u=e.schema.tags.find(p=>p.tag===a&&p.collection===o);if(!u){let p=e.schema.knownTags[a];if(p?.collection===o)e.schema.tags.push(Object.assign({},p,{default:!1})),u=p;else return p?n(s,"BAD_COLLECTION_TYPE",`${p.tag} used for ${o} collection, but expects ${p.collection??"scalar"}`,!0):n(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${a}`,!0),s1(t,e,r,n,a)}let l=s1(t,e,r,n,a,u),f=u.resolve?.(l,p=>n(s,"TAG_RESOLVE_FAILED",p),e.options)??l,h=ute.isNode(f)?f:new cte.Scalar(f);return h.range=l.range,h.tag=a,u?.format&&(h.format=u.format),h}yD.composeCollection=mte});var o1=T(vD=>{"use strict";y();var a1=dt();function gte(t,e,r){let i=e.offset,n=yte(e,t.options.strict,r);if(!n)return{value:"",type:null,comment:"",range:[i,i,i]};let s=n.mode===">"?a1.Scalar.BLOCK_FOLDED:a1.Scalar.BLOCK_LITERAL,a=e.source?_te(e.source):[],o=a.length;for(let S=a.length-1;S>=0;--S){let b=a[S][1];if(b===""||b==="\r")o=S;else break}if(o===0){let S=n.chomp==="+"&&a.length>0?`
|
|
1291
|
+
`.repeat(Math.max(1,a.length-1)):"",b=i+n.length;return e.source&&(b+=e.source.length),{value:S,type:s,comment:n.comment,range:[i,b,b]}}let u=e.indent+n.indent,l=e.offset+n.length,f=0;for(let S=0;S<o;++S){let[b,g]=a[S];if(g===""||g==="\r")n.indent===0&&b.length>u&&(u=b.length);else{b.length<u&&r(l+b.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),n.indent===0&&(u=b.length),f=S,u===0&&!t.atRoot&&r(l,"BAD_INDENT","Block scalar values in collections must be indented");break}l+=b.length+g.length+1}for(let S=a.length-1;S>=o;--S)a[S][0].length>u&&(o=S+1);let h="",p="",m=!1;for(let S=0;S<f;++S)h+=a[S][0].slice(u)+`
|
|
1292
|
+
`;for(let S=f;S<o;++S){let[b,g]=a[S];l+=b.length+g.length+1;let k=g[g.length-1]==="\r";if(k&&(g=g.slice(0,-1)),g&&b.length<u){let _=`Block scalar lines must not be less indented than their ${n.indent?"explicit indentation indicator":"first line"}`;r(l-g.length-(k?2:1),"BAD_INDENT",_),b=""}s===a1.Scalar.BLOCK_LITERAL?(h+=p+b.slice(u)+g,p=`
|
|
1293
|
+
`):b.length>u||g[0]===" "?(p===" "?p=`
|
|
1294
|
+
`:!m&&p===`
|
|
1295
|
+
`&&(p=`
|
|
1296
|
+
|
|
1297
|
+
`),h+=p+b.slice(u)+g,p=`
|
|
1298
|
+
`,m=!0):g===""?p===`
|
|
1299
|
+
`?h+=`
|
|
1300
|
+
`:p=`
|
|
1301
|
+
`:(h+=p+g,p=" ",m=!1)}switch(n.chomp){case"-":break;case"+":for(let S=o;S<a.length;++S)h+=`
|
|
1302
|
+
`+a[S][0].slice(u);h[h.length-1]!==`
|
|
1303
|
+
`&&(h+=`
|
|
1304
|
+
`);break;default:h+=`
|
|
1305
|
+
`}let v=i+n.length+e.source.length;return{value:h,type:s,comment:n.comment,range:[i,v,v]}}function yte({offset:t,props:e},r,i){if(e[0].type!=="block-scalar-header")return i(e[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:n}=e[0],s=n[0],a=0,o="",u=-1;for(let p=1;p<n.length;++p){let m=n[p];if(!o&&(m==="-"||m==="+"))o=m;else{let v=Number(m);!a&&v?a=v:u===-1&&(u=t+p)}}u!==-1&&i(u,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${n}`);let l=!1,f="",h=n.length;for(let p=1;p<e.length;++p){let m=e[p];switch(m.type){case"space":l=!0;case"newline":h+=m.source.length;break;case"comment":r&&!l&&i(m,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),h+=m.source.length,f=m.source.substring(1);break;case"error":i(m,"UNEXPECTED_TOKEN",m.message),h+=m.source.length;break;default:{let v=`Unexpected token in block scalar header: ${m.type}`;i(m,"UNEXPECTED_TOKEN",v);let S=m.source;S&&typeof S=="string"&&(h+=S.length)}}}return{mode:s,indent:a,chomp:o,comment:f,length:h}}function _te(t){let e=t.split(/\n( *)/),r=e[0],i=r.match(/^( *)/),s=[i?.[1]?[i[1],r.slice(i[1].length)]:["",r]];for(let a=1;a<e.length;a+=2)s.push([e[a],e[a+1]]);return s}vD.resolveBlockScalar=gte});var c1=T(SD=>{"use strict";y();var u1=dt(),vte=xo();function bte(t,e,r){let{offset:i,type:n,source:s,end:a}=t,o,u,l=(p,m,v)=>r(i+p,m,v);switch(n){case"scalar":o=u1.Scalar.PLAIN,u=Ste(s,l);break;case"single-quoted-scalar":o=u1.Scalar.QUOTE_SINGLE,u=wte(s,l);break;case"double-quoted-scalar":o=u1.Scalar.QUOTE_DOUBLE,u=xte(s,l);break;default:return r(t,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${n}`),{value:"",type:null,comment:"",range:[i,i+s.length,i+s.length]}}let f=i+s.length,h=vte.resolveEnd(a,f,e,r);return{value:u,type:o,comment:h.comment,range:[i,f,h.offset]}}function Ste(t,e){let r="";switch(t[0]){case" ":r="a tab character";break;case",":r="flow indicator character ,";break;case"%":r="directive indicator character %";break;case"|":case">":{r=`block scalar indicator ${t[0]}`;break}case"@":case"`":{r=`reserved character ${t[0]}`;break}}return r&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${r}`),bD(t)}function wte(t,e){return(t[t.length-1]!=="'"||t.length===1)&&e(t.length,"MISSING_CHAR","Missing closing 'quote"),bD(t.slice(1,-1)).replace(/''/g,"'")}function bD(t){let e,r;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r?
|
|
1306
|
+
`,"sy"),r=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
|
1307
|
+
`,"sy")}catch{e=/(.*?)[ \t]*\r?\n/sy,r=/[ \t]*(.*?)[ \t]*\r?\n/sy}let i=e.exec(t);if(!i)return t;let n=i[1],s=" ",a=e.lastIndex;for(r.lastIndex=a;i=r.exec(t);)i[1]===""?s===`
|
|
1308
|
+
`?n+=s:s=`
|
|
1309
|
+
`:(n+=s+i[1],s=" "),a=r.lastIndex;let o=/[ \t]*(.*)/sy;return o.lastIndex=a,i=o.exec(t),n+s+(i?.[1]??"")}function xte(t,e){let r="";for(let i=1;i<t.length-1;++i){let n=t[i];if(!(n==="\r"&&t[i+1]===`
|
|
1310
|
+
`))if(n===`
|
|
1311
|
+
`){let{fold:s,offset:a}=kte(t,i);r+=s,i=a}else if(n==="\\"){let s=t[++i],a=Ite[s];if(a)r+=a;else if(s===`
|
|
1312
|
+
`)for(s=t[i+1];s===" "||s===" ";)s=t[++i+1];else if(s==="\r"&&t[i+1]===`
|
|
1313
|
+
`)for(s=t[++i+1];s===" "||s===" ";)s=t[++i+1];else if(s==="x"||s==="u"||s==="U"){let o=s==="x"?2:s==="u"?4:8;r+=Ate(t,i+1,o,e),i+=o}else{let o=t.substr(i-1,2);e(i-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${o}`),r+=o}}else if(n===" "||n===" "){let s=i,a=t[i+1];for(;a===" "||a===" ";)a=t[++i+1];a!==`
|
|
1314
|
+
`&&!(a==="\r"&&t[i+2]===`
|
|
1315
|
+
`)&&(r+=i>s?t.slice(s,i+1):n)}else r+=n}return(t[t.length-1]!=='"'||t.length===1)&&e(t.length,"MISSING_CHAR",'Missing closing "quote'),r}function kte(t,e){let r="",i=t[e+1];for(;(i===" "||i===" "||i===`
|
|
1316
|
+
`||i==="\r")&&!(i==="\r"&&t[e+2]!==`
|
|
1317
|
+
`);)i===`
|
|
1318
|
+
`&&(r+=`
|
|
1319
|
+
`),e+=1,i=t[e+1];return r||(r=" "),{fold:r,offset:e}}var Ite={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
|
|
1320
|
+
`,r:"\r",t:" ",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function Ate(t,e,r,i){let n=t.substr(e,r),a=n.length===r&&/^[0-9a-fA-F]+$/.test(n)?parseInt(n,16):NaN;try{return String.fromCodePoint(a)}catch{let o=t.substr(e-2,r+2);return i(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${o}`),o}}SD.resolveFlowScalar=bte});var kD=T(xD=>{"use strict";y();var Ys=xe(),wD=dt(),Tte=o1(),Ete=c1();function Ote(t,e,r,i){let{value:n,type:s,comment:a,range:o}=e.type==="block-scalar"?Tte.resolveBlockScalar(t,e,i):Ete.resolveFlowScalar(e,t.options.strict,i),u=r?t.directives.tagName(r.source,h=>i(r,"TAG_RESOLVE_FAILED",h)):null,l;t.options.stringKeys&&t.atKey?l=t.schema[Ys.SCALAR]:u?l=Nte(t.schema,n,u,r,i):e.type==="scalar"?l=Lte(t,n,e,i):l=t.schema[Ys.SCALAR];let f;try{let h=l.resolve(n,p=>i(r??e,"TAG_RESOLVE_FAILED",p),t.options);f=Ys.isScalar(h)?h:new wD.Scalar(h)}catch(h){let p=h instanceof Error?h.message:String(h);i(r??e,"TAG_RESOLVE_FAILED",p),f=new wD.Scalar(n)}return f.range=o,f.source=n,s&&(f.type=s),u&&(f.tag=u),l.format&&(f.format=l.format),a&&(f.comment=a),f}function Nte(t,e,r,i,n){if(r==="!")return t[Ys.SCALAR];let s=[];for(let o of t.tags)if(!o.collection&&o.tag===r)if(o.default&&o.test)s.push(o);else return o;for(let o of s)if(o.test?.test(e))return o;let a=t.knownTags[r];return a&&!a.collection?(t.tags.push(Object.assign({},a,{default:!1,test:void 0})),a):(n(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,r!=="tag:yaml.org,2002:str"),t[Ys.SCALAR])}function Lte({atKey:t,directives:e,schema:r},i,n,s){let a=r.tags.find(o=>(o.default===!0||t&&o.default==="key")&&o.test?.test(i))||r[Ys.SCALAR];if(r.compat){let o=r.compat.find(u=>u.default&&u.test?.test(i))??r[Ys.SCALAR];if(a.tag!==o.tag){let u=e.tagString(a.tag),l=e.tagString(o.tag),f=`Value may be parsed as either ${u} or ${l}`;s(n,"TAG_RESOLVE_FAILED",f,!0)}}return a}xD.composeScalar=Ote});var AD=T(ID=>{"use strict";y();function Pte(t,e,r){if(e){r??(r=e.length);for(let i=r-1;i>=0;--i){let n=e[i];switch(n.type){case"space":case"comment":case"newline":t-=n.source.length;continue}for(n=e[++i];n?.type==="space";)t+=n.source.length,n=e[++i];break}}return t}ID.emptyScalarPosition=Pte});var OD=T(f1=>{"use strict";y();var qte=wc(),Cte=xe(),Rte=_D(),TD=kD(),Mte=xo(),Dte=AD(),Fte={composeNode:ED,composeEmptyNode:l1};function ED(t,e,r,i){let n=t.atKey,{spaceBefore:s,comment:a,anchor:o,tag:u}=r,l,f=!0;switch(e.type){case"alias":l=jte(t,e,i),(o||u)&&i(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":l=TD.composeScalar(t,e,u,i),o&&(l.anchor=o.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{l=Rte.composeCollection(Fte,t,e,r,i),o&&(l.anchor=o.source.substring(1))}catch(h){let p=h instanceof Error?h.message:String(h);i(e,"RESOURCE_EXHAUSTION",p)}break;default:{let h=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;i(e,"UNEXPECTED_TOKEN",h),f=!1}}return l??(l=l1(t,e.offset,void 0,null,r,i)),o&&l.anchor===""&&i(o,"BAD_ALIAS","Anchor cannot be an empty string"),n&&t.options.stringKeys&&(!Cte.isScalar(l)||typeof l.value!="string"||l.tag&&l.tag!=="tag:yaml.org,2002:str")&&i(u??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),s&&(l.spaceBefore=!0),a&&(e.type==="scalar"&&e.source===""?l.comment=a:l.commentBefore=a),t.options.keepSourceTokens&&f&&(l.srcToken=e),l}function l1(t,e,r,i,{spaceBefore:n,comment:s,anchor:a,tag:o,end:u},l){let f={type:"scalar",offset:Dte.emptyScalarPosition(e,r,i),indent:-1,source:""},h=TD.composeScalar(t,f,o,l);return a&&(h.anchor=a.source.substring(1),h.anchor===""&&l(a,"BAD_ALIAS","Anchor cannot be an empty string")),n&&(h.spaceBefore=!0),s&&(h.comment=s,h.range[2]=u),h}function jte({options:t},{offset:e,source:r,end:i},n){let s=new qte.Alias(r.substring(1));s.source===""&&n(e,"BAD_ALIAS","Alias cannot be an empty string"),s.source.endsWith(":")&&n(e+r.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let a=e+r.length,o=Mte.resolveEnd(i,a,t.strict,n);return s.range=[e,a,o.offset],o.comment&&(s.comment=o.comment),s}f1.composeEmptyNode=l1;f1.composeNode=ED});var PD=T(LD=>{"use strict";y();var Bte=Fc(),ND=OD(),Vte=xo(),$te=$c();function Ute(t,e,{offset:r,start:i,value:n,end:s},a){let o=Object.assign({_directives:e},t),u=new Bte.Document(void 0,o),l={atKey:!1,atRoot:!0,directives:u.directives,options:u.options,schema:u.schema},f=$te.resolveProps(i,{indicator:"doc-start",next:n??s?.[0],offset:r,onError:a,parentIndent:0,startOnNewline:!0});f.found&&(u.directives.docStart=!0,n&&(n.type==="block-map"||n.type==="block-seq")&&!f.hasNewline&&a(f.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),u.contents=n?ND.composeNode(l,n,f,a):ND.composeEmptyNode(l,f.end,i,null,f,a);let h=u.contents.range[2],p=Vte.resolveEnd(s,h,!1,a);return p.comment&&(u.comment=p.comment),u.range=[r,h,p.offset],u}LD.composeDoc=Ute});var h1=T(RD=>{"use strict";y();var Hte=ae("process"),Gte=X0(),Wte=Fc(),Uc=Vc(),qD=xe(),zte=PD(),Jte=xo();function Hc(t){if(typeof t=="number")return[t,t+1];if(Array.isArray(t))return t.length===2?t:[t[0],t[1]];let{offset:e,source:r}=t;return[e,e+(typeof r=="string"?r.length:1)]}function CD(t){let e="",r=!1,i=!1;for(let n=0;n<t.length;++n){let s=t[n];switch(s[0]){case"#":e+=(e===""?"":i?`
|
|
1321
|
+
|
|
1322
|
+
`:`
|
|
1323
|
+
`)+(s.substring(1)||" "),r=!0,i=!1;break;case"%":t[n+1]?.[0]!=="#"&&(n+=1),r=!1;break;default:r||(i=!0),r=!1}}return{comment:e,afterEmptyLine:i}}var p1=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(r,i,n,s)=>{let a=Hc(r);s?this.warnings.push(new Uc.YAMLWarning(a,i,n)):this.errors.push(new Uc.YAMLParseError(a,i,n))},this.directives=new Gte.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,r){let{comment:i,afterEmptyLine:n}=CD(this.prelude);if(i){let s=e.contents;if(r)e.comment=e.comment?`${e.comment}
|
|
1324
|
+
${i}`:i;else if(n||e.directives.docStart||!s)e.commentBefore=i;else if(qD.isCollection(s)&&!s.flow&&s.items.length>0){let a=s.items[0];qD.isPair(a)&&(a=a.key);let o=a.commentBefore;a.commentBefore=o?`${i}
|
|
1325
|
+
${o}`:i}else{let a=s.commentBefore;s.commentBefore=a?`${i}
|
|
1326
|
+
${a}`:i}}if(r){for(let s=0;s<this.errors.length;++s)e.errors.push(this.errors[s]);for(let s=0;s<this.warnings.length;++s)e.warnings.push(this.warnings[s])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:CD(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,r=!1,i=-1){for(let n of e)yield*this.next(n);yield*this.end(r,i)}*next(e){switch(Hte.env.LOG_STREAM&&console.dir(e,{depth:null}),e.type){case"directive":this.directives.add(e.source,(r,i,n)=>{let s=Hc(e);s[0]+=r,this.onError(s,"BAD_DIRECTIVE",i,n)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let r=zte.composeDoc(this.options,this.directives,e,this.onError);this.atDirectives&&!r.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(r,!1),this.doc&&(yield this.doc),this.doc=r,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{let r=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,i=new Uc.YAMLParseError(Hc(e),"UNEXPECTED_TOKEN",r);this.atDirectives||!this.doc?this.errors.push(i):this.doc.errors.push(i);break}case"doc-end":{if(!this.doc){let i="Unexpected doc-end without preceding document";this.errors.push(new Uc.YAMLParseError(Hc(e),"UNEXPECTED_TOKEN",i));break}this.doc.directives.docEnd=!0;let r=Jte.resolveEnd(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),r.comment){let i=this.doc.comment;this.doc.comment=i?`${i}
|
|
1327
|
+
${r.comment}`:r.comment}this.doc.range[2]=r.offset;break}default:this.errors.push(new Uc.YAMLParseError(Hc(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,r=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let i=Object.assign({_directives:this.directives},this.options),n=new Wte.Document(void 0,i);this.atDirectives&&this.onError(r,"MISSING_CHAR","Missing directives-end indicator line"),n.range=[0,r,r],this.decorate(n,!1),yield n}}};RD.Composer=p1});var FD=T(Pm=>{"use strict";y();var Kte=o1(),Qte=c1(),Yte=Vc(),MD=Tc();function Xte(t,e=!0,r){if(t){let i=(n,s,a)=>{let o=typeof n=="number"?n:Array.isArray(n)?n[0]:n.offset;if(r)r(o,s,a);else throw new Yte.YAMLParseError([o,o+1],s,a)};switch(t.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return Qte.resolveFlowScalar(t,e,i);case"block-scalar":return Kte.resolveBlockScalar({options:{strict:e}},t,i)}}return null}function Zte(t,e){let{implicitKey:r=!1,indent:i,inFlow:n=!1,offset:s=-1,type:a="PLAIN"}=e,o=MD.stringifyString({type:a,value:t},{implicitKey:r,indent:i>0?" ".repeat(i):"",inFlow:n,options:{blockQuote:!0,lineWidth:-1}}),u=e.end??[{type:"newline",offset:-1,indent:i,source:`
|
|
1328
|
+
`}];switch(o[0]){case"|":case">":{let l=o.indexOf(`
|
|
1329
|
+
`),f=o.substring(0,l),h=o.substring(l+1)+`
|
|
1330
|
+
`,p=[{type:"block-scalar-header",offset:s,indent:i,source:f}];return DD(p,u)||p.push({type:"newline",offset:-1,indent:i,source:`
|
|
1331
|
+
`}),{type:"block-scalar",offset:s,indent:i,props:p,source:h}}case'"':return{type:"double-quoted-scalar",offset:s,indent:i,source:o,end:u};case"'":return{type:"single-quoted-scalar",offset:s,indent:i,source:o,end:u};default:return{type:"scalar",offset:s,indent:i,source:o,end:u}}}function ere(t,e,r={}){let{afterKey:i=!1,implicitKey:n=!1,inFlow:s=!1,type:a}=r,o="indent"in t?t.indent:null;if(i&&typeof o=="number"&&(o+=2),!a)switch(t.type){case"single-quoted-scalar":a="QUOTE_SINGLE";break;case"double-quoted-scalar":a="QUOTE_DOUBLE";break;case"block-scalar":{let l=t.props[0];if(l.type!=="block-scalar-header")throw new Error("Invalid block scalar header");a=l.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:a="PLAIN"}let u=MD.stringifyString({type:a,value:e},{implicitKey:n||o===null,indent:o!==null&&o>0?" ".repeat(o):"",inFlow:s,options:{blockQuote:!0,lineWidth:-1}});switch(u[0]){case"|":case">":tre(t,u);break;case'"':d1(t,u,"double-quoted-scalar");break;case"'":d1(t,u,"single-quoted-scalar");break;default:d1(t,u,"scalar")}}function tre(t,e){let r=e.indexOf(`
|
|
1332
|
+
`),i=e.substring(0,r),n=e.substring(r+1)+`
|
|
1333
|
+
`;if(t.type==="block-scalar"){let s=t.props[0];if(s.type!=="block-scalar-header")throw new Error("Invalid block scalar header");s.source=i,t.source=n}else{let{offset:s}=t,a="indent"in t?t.indent:-1,o=[{type:"block-scalar-header",offset:s,indent:a,source:i}];DD(o,"end"in t?t.end:void 0)||o.push({type:"newline",offset:-1,indent:a,source:`
|
|
1334
|
+
`});for(let u of Object.keys(t))u!=="type"&&u!=="offset"&&delete t[u];Object.assign(t,{type:"block-scalar",indent:a,props:o,source:n})}}function DD(t,e){if(e)for(let r of e)switch(r.type){case"space":case"comment":t.push(r);break;case"newline":return t.push(r),!0}return!1}function d1(t,e,r){switch(t.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":t.type=r,t.source=e;break;case"block-scalar":{let i=t.props.slice(1),n=e.length;t.props[0].type==="block-scalar-header"&&(n-=t.props[0].source.length);for(let s of i)s.offset+=n;delete t.props,Object.assign(t,{type:r,source:e,end:i});break}case"block-map":case"block-seq":{let n={type:"newline",offset:t.offset+e.length,indent:t.indent,source:`
|
|
1335
|
+
`};delete t.items,Object.assign(t,{type:r,source:e,end:[n]});break}default:{let i="indent"in t?t.indent:-1,n="end"in t&&Array.isArray(t.end)?t.end.filter(s=>s.type==="space"||s.type==="comment"||s.type==="newline"):[];for(let s of Object.keys(t))s!=="type"&&s!=="offset"&&delete t[s];Object.assign(t,{type:r,indent:i,source:e,end:n})}}}Pm.createScalarToken=Zte;Pm.resolveAsScalar=Xte;Pm.setScalarValue=ere});var BD=T(jD=>{"use strict";y();var rre=t=>"type"in t?Cm(t):qm(t);function Cm(t){switch(t.type){case"block-scalar":{let e="";for(let r of t.props)e+=Cm(r);return e+t.source}case"block-map":case"block-seq":{let e="";for(let r of t.items)e+=qm(r);return e}case"flow-collection":{let e=t.start.source;for(let r of t.items)e+=qm(r);for(let r of t.end)e+=r.source;return e}case"document":{let e=qm(t);if(t.end)for(let r of t.end)e+=r.source;return e}default:{let e=t.source;if("end"in t&&t.end)for(let r of t.end)e+=r.source;return e}}}function qm({start:t,key:e,sep:r,value:i}){let n="";for(let s of t)n+=s.source;if(e&&(n+=Cm(e)),r)for(let s of r)n+=s.source;return i&&(n+=Cm(i)),n}jD.stringify=rre});var HD=T(UD=>{"use strict";y();var m1=Symbol("break visit"),ire=Symbol("skip children"),VD=Symbol("remove item");function Xs(t,e){"type"in t&&t.type==="document"&&(t={start:t.start,value:t.value}),$D(Object.freeze([]),t,e)}Xs.BREAK=m1;Xs.SKIP=ire;Xs.REMOVE=VD;Xs.itemAtPath=(t,e)=>{let r=t;for(let[i,n]of e){let s=r?.[i];if(s&&"items"in s)r=s.items[n];else return}return r};Xs.parentCollection=(t,e)=>{let r=Xs.itemAtPath(t,e.slice(0,-1)),i=e[e.length-1][0],n=r?.[i];if(n&&"items"in n)return n;throw new Error("Parent collection not found")};function $D(t,e,r){let i=r(e,t);if(typeof i=="symbol")return i;for(let n of["key","value"]){let s=e[n];if(s&&"items"in s){for(let a=0;a<s.items.length;++a){let o=$D(Object.freeze(t.concat([[n,a]])),s.items[a],r);if(typeof o=="number")a=o-1;else{if(o===m1)return m1;o===VD&&(s.items.splice(a,1),a-=1)}}typeof i=="function"&&n==="key"&&(i=i(e,t))}}return typeof i=="function"?i(e,t):i}UD.visit=Xs});var Rm=T(Er=>{"use strict";y();var g1=FD(),nre=BD(),sre=HD(),y1="\uFEFF",_1="",v1="",b1="",are=t=>!!t&&"items"in t,ore=t=>!!t&&(t.type==="scalar"||t.type==="single-quoted-scalar"||t.type==="double-quoted-scalar"||t.type==="block-scalar");function ure(t){switch(t){case y1:return"<BOM>";case _1:return"<DOC>";case v1:return"<FLOW_END>";case b1:return"<SCALAR>";default:return JSON.stringify(t)}}function cre(t){switch(t){case y1:return"byte-order-mark";case _1:return"doc-mode";case v1:return"flow-error-end";case b1:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
|
|
1336
|
+
`:case`\r
|
|
1337
|
+
`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(t[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}Er.createScalarToken=g1.createScalarToken;Er.resolveAsScalar=g1.resolveAsScalar;Er.setScalarValue=g1.setScalarValue;Er.stringify=nre.stringify;Er.visit=sre.visit;Er.BOM=y1;Er.DOCUMENT=_1;Er.FLOW_END=v1;Er.SCALAR=b1;Er.isCollection=are;Er.isScalar=ore;Er.prettyToken=ure;Er.tokenType=cre});var x1=T(WD=>{"use strict";y();var Gc=Rm();function bi(t){switch(t){case void 0:case" ":case`
|
|
1338
|
+
`:case"\r":case" ":return!0;default:return!1}}var GD=new Set("0123456789ABCDEFabcdef"),lre=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Mm=new Set(",[]{}"),fre=new Set(` ,[]{}
|
|
1339
|
+
\r `),S1=t=>!t||fre.has(t),w1=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,r=!1){if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!r;let i=this.next??"stream";for(;i&&(r||this.hasChars(1));)i=yield*this.parseNext(i)}atLineEnd(){let e=this.pos,r=this.buffer[e];for(;r===" "||r===" ";)r=this.buffer[++e];return!r||r==="#"||r===`
|
|
1340
|
+
`?!0:r==="\r"?this.buffer[e+1]===`
|
|
1341
|
+
`:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let r=this.buffer[e];if(this.indentNext>0){let i=0;for(;r===" ";)r=this.buffer[++i+e];if(r==="\r"){let n=this.buffer[i+e+1];if(n===`
|
|
1342
|
+
`||!n&&!this.atEnd)return e+i+1}return r===`
|
|
1343
|
+
`||i>=this.indentNext||!r&&!this.atEnd?e+i:-1}if(r==="-"||r==="."){let i=this.buffer.substr(e,3);if((i==="---"||i==="...")&&bi(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
|
|
1344
|
+
`,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]===Gc.BOM&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let r=e.length,i=e.indexOf("#");for(;i!==-1;){let s=e[i-1];if(s===" "||s===" "){r=i-1;break}else i=e.indexOf("#",i+1)}for(;;){let s=e[r-1];if(s===" "||s===" ")r-=1;else break}let n=(yield*this.pushCount(r))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-n),this.pushNewline(),"stream"}if(this.atLineEnd()){let r=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-r),yield*this.pushNewline(),"stream"}return yield Gc.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if(e==="-"||e==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let r=this.peek(3);if((r==="---"||r==="...")&&bi(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,r==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!bi(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,r]=this.peek(2);if(!r&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&bi(r)){let i=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=i,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext("doc");let r=yield*this.pushIndicators();switch(e[r]){case"#":yield*this.pushCount(e.length-r);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(S1),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return r+=yield*this.parseBlockScalarHeader(),r+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-r),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,r,i=-1;do e=yield*this.pushNewline(),e>0?(r=yield*this.pushSpaces(!1),this.indentValue=i=r):r=0,r+=yield*this.pushSpaces(!0);while(e+r>0);let n=this.getLine();if(n===null)return this.setNext("flow");if((i!==-1&&i<this.indentNext&&n[0]!=="#"||i===0&&(n.startsWith("---")||n.startsWith("..."))&&bi(n[3]))&&!(i===this.indentNext-1&&this.flowLevel===1&&(n[0]==="]"||n[0]==="}")))return this.flowLevel=0,yield Gc.FLOW_END,yield*this.parseLineStart();let s=0;for(;n[s]===",";)s+=yield*this.pushCount(1),s+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(s+=yield*this.pushIndicators(),n[s]){case void 0:return"flow";case"#":return yield*this.pushCount(n.length-s),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(S1),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let a=this.charAt(1);if(this.flowKey||bi(a)||a===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),r=this.buffer.indexOf(e,this.pos+1);if(e==="'")for(;r!==-1&&this.buffer[r+1]==="'";)r=this.buffer.indexOf("'",r+2);else for(;r!==-1;){let s=0;for(;this.buffer[r-1-s]==="\\";)s+=1;if(s%2===0)break;r=this.buffer.indexOf('"',r+1)}let i=this.buffer.substring(0,r),n=i.indexOf(`
|
|
1345
|
+
`,this.pos);if(n!==-1){for(;n!==-1;){let s=this.continueScalar(n+1);if(s===-1)break;n=i.indexOf(`
|
|
1346
|
+
`,s)}n!==-1&&(r=n-(i[n-1]==="\r"?2:1))}if(r===-1){if(!this.atEnd)return this.setNext("quoted-scalar");r=this.buffer.length}return yield*this.pushToIndex(r+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let r=this.buffer[++e];if(r==="+")this.blockScalarKeep=!0;else if(r>"0"&&r<="9")this.blockScalarIndent=Number(r)-1;else if(r!=="-")break}return yield*this.pushUntil(r=>bi(r)||r==="#")}*parseBlockScalar(){let e=this.pos-1,r=0,i;e:for(let s=this.pos;i=this.buffer[s];++s)switch(i){case" ":r+=1;break;case`
|
|
1347
|
+
`:e=s,r=0;break;case"\r":{let a=this.buffer[s+1];if(!a&&!this.atEnd)return this.setNext("block-scalar");if(a===`
|
|
1348
|
+
`)break}default:break e}if(!i&&!this.atEnd)return this.setNext("block-scalar");if(r>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=r:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let s=this.continueScalar(e+1);if(s===-1)break;e=this.buffer.indexOf(`
|
|
1349
|
+
`,s)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let n=e+1;for(i=this.buffer[n];i===" ";)i=this.buffer[++n];if(i===" "){for(;i===" "||i===" "||i==="\r"||i===`
|
|
1350
|
+
`;)i=this.buffer[++n];e=n-1}else if(!this.blockScalarKeep)do{let s=e-1,a=this.buffer[s];a==="\r"&&(a=this.buffer[--s]);let o=s;for(;a===" ";)a=this.buffer[--s];if(a===`
|
|
1351
|
+
`&&s>=this.pos&&s+1+r>o)e=s;else break}while(!0);return yield Gc.SCALAR,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,r=this.pos-1,i=this.pos-1,n;for(;n=this.buffer[++i];)if(n===":"){let s=this.buffer[i+1];if(bi(s)||e&&Mm.has(s))break;r=i}else if(bi(n)){let s=this.buffer[i+1];if(n==="\r"&&(s===`
|
|
1352
|
+
`?(i+=1,n=`
|
|
1353
|
+
`,s=this.buffer[i+1]):r=i),s==="#"||e&&Mm.has(s))break;if(n===`
|
|
1354
|
+
`){let a=this.continueScalar(i+1);if(a===-1)break;i=Math.max(i,a-2)}}else{if(e&&Mm.has(n))break;r=i}return!n&&!this.atEnd?this.setNext("plain-scalar"):(yield Gc.SCALAR,yield*this.pushToIndex(r+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,r){let i=this.buffer.slice(this.pos,e);return i?(yield i,this.pos+=i.length,i.length):(r&&(yield""),0)}*pushIndicators(){let e=0;e:for(;;){switch(this.charAt(0)){case"!":e+=yield*this.pushTag(),e+=yield*this.pushSpaces(!0);continue e;case"&":e+=yield*this.pushUntil(S1),e+=yield*this.pushSpaces(!0);continue e;case"-":case"?":case":":{let r=this.flowLevel>0,i=this.charAt(1);if(bi(i)||r&&Mm.has(i)){r?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,e+=yield*this.pushCount(1),e+=yield*this.pushSpaces(!0);continue e}}}break e}return e}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,r=this.buffer[e];for(;!bi(r)&&r!==">";)r=this.buffer[++e];return yield*this.pushToIndex(r===">"?e+1:e,!1)}else{let e=this.pos+1,r=this.buffer[e];for(;r;)if(lre.has(r))r=this.buffer[++e];else if(r==="%"&&GD.has(this.buffer[e+1])&&GD.has(this.buffer[e+2]))r=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e===`
|
|
1355
|
+
`?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
|
|
1356
|
+
`?yield*this.pushCount(2):0}*pushSpaces(e){let r=this.pos-1,i;do i=this.buffer[++r];while(i===" "||e&&i===" ");let n=r-this.pos;return n>0&&(yield this.buffer.substr(this.pos,n),this.pos=r),n}*pushUntil(e){let r=this.pos,i=this.buffer[r];for(;!e(i);)i=this.buffer[++r];return yield*this.pushToIndex(r,!1)}};WD.Lexer=w1});var I1=T(zD=>{"use strict";y();var k1=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let r=0,i=this.lineStarts.length;for(;r<i;){let s=r+i>>1;this.lineStarts[s]<e?r=s+1:i=s}if(this.lineStarts[r]===e)return{line:r+1,col:1};if(r===0)return{line:0,col:e};let n=this.lineStarts[r-1];return{line:r,col:e-n+1}}}};zD.LineCounter=k1});var T1=T(XD=>{"use strict";y();var pre=ae("process"),JD=Rm(),hre=x1();function Jn(t,e){for(let r=0;r<t.length;++r)if(t[r].type===e)return!0;return!1}function KD(t){for(let e=0;e<t.length;++e)switch(t[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function YD(t){switch(t?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function Dm(t){switch(t.type){case"document":return t.start;case"block-map":{let e=t.items[t.items.length-1];return e.sep??e.start}case"block-seq":return t.items[t.items.length-1].start;default:return[]}}function ko(t){if(t.length===0)return[];let e=t.length;e:for(;--e>=0;)switch(t[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;t[++e]?.type==="space";);return t.splice(e,t.length)}function Fm(t,e){if(e.length<1e5)Array.prototype.push.apply(t,e);else for(let r=0;r<e.length;++r)t.push(e[r])}function QD(t){if(t.start.type==="flow-seq-start")for(let e of t.items)e.sep&&!e.value&&!Jn(e.start,"explicit-key-ind")&&!Jn(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,YD(e.value)?e.value.end?Fm(e.value.end,e.sep):e.value.end=e.sep:Fm(e.start,e.sep),delete e.sep)}var A1=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new hre.Lexer,this.onNewLine=e}*parse(e,r=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let i of this.lexer.lex(e,r))yield*this.next(i);r||(yield*this.end())}*next(e){if(this.source=e,pre.env.LOG_TOKENS&&console.log("|",JD.prettyToken(e)),this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let r=JD.tokenType(e);if(r)if(r==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=r,yield*this.step(),r){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{let i=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:i,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type==="doc-end"&&e?.type!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let r=e??this.stack.pop();if(!r)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield r;else{let i=this.peek(1);switch(r.type==="block-scalar"?r.indent="indent"in i?i.indent:0:r.type==="flow-collection"&&i.type==="document"&&(r.indent=0),r.type==="flow-collection"&&QD(r),i.type){case"document":i.value=r;break;case"block-scalar":i.props.push(r);break;case"block-map":{let n=i.items[i.items.length-1];if(n.value){i.items.push({start:[],key:r,sep:[]}),this.onKeyLine=!0;return}else if(n.sep)n.value=r;else{Object.assign(n,{key:r,sep:[]}),this.onKeyLine=!n.explicitKey;return}break}case"block-seq":{let n=i.items[i.items.length-1];n.value?i.items.push({start:[],value:r}):n.value=r;break}case"flow-collection":{let n=i.items[i.items.length-1];!n||n.value?i.items.push({start:[],key:r,sep:[]}):n.sep?n.value=r:Object.assign(n,{key:r,sep:[]});return}default:yield*this.pop(),yield*this.pop(r)}if((i.type==="document"||i.type==="block-map"||i.type==="block-seq")&&(r.type==="block-map"||r.type==="block-seq")){let n=r.items[r.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&KD(n.start)===-1&&(r.indent===0||n.start.every(s=>s.type!=="comment"||s.indent<r.indent))&&(i.type==="document"?i.end=n.start:i.items.push({start:n.start}),r.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{let e={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":{KD(e.start)!==-1?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}let r=this.startBlockValue(e);r?this.stack.push(r):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type==="map-value-ind"){let r=Dm(this.peek(2)),i=ko(r),n;e.end?(n=e.end,n.push(this.sourceToken),delete e.end):n=[this.sourceToken];let s={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:i,key:e,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=s}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let r=this.source.indexOf(`
|
|
1357
|
+
`)+1;for(;r!==0;)this.onNewLine(this.offset+r),r=this.source.indexOf(`
|
|
1358
|
+
`,r)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let r=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,r.value){let i="end"in r.value?r.value.end:void 0;(Array.isArray(i)?i[i.length-1]:void 0)?.type==="comment"?i?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"space":case"comment":if(r.value)e.items.push({start:[this.sourceToken]});else if(r.sep)r.sep.push(this.sourceToken);else{if(this.atIndentedComment(r.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){Fm(n,r.start),n.push(this.sourceToken),e.items.pop();return}}r.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let i=!this.onKeyLine&&this.indent===e.indent,n=i&&(r.sep||r.explicitKey)&&this.type!=="seq-item-ind",s=[];if(n&&r.sep&&!r.value){let a=[];for(let o=0;o<r.sep.length;++o){let u=r.sep[o];switch(u.type){case"newline":a.push(o);break;case"space":break;case"comment":u.indent>e.indent&&(a.length=0);break;default:a.length=0}}a.length>=2&&(s=r.sep.splice(a[1]))}switch(this.type){case"anchor":case"tag":n||r.value?(s.push(this.sourceToken),e.items.push({start:s}),this.onKeyLine=!0):r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"explicit-key-ind":!r.sep&&!r.explicitKey?(r.start.push(this.sourceToken),r.explicitKey=!0):n||r.value?(s.push(this.sourceToken),e.items.push({start:s,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(r.explicitKey)if(r.sep)if(r.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Jn(r.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]});else if(YD(r.key)&&!Jn(r.sep,"newline")){let a=ko(r.start),o=r.key,u=r.sep;u.push(this.sourceToken),delete r.key,delete r.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:o,sep:u}]})}else s.length>0?r.sep=r.sep.concat(s,this.sourceToken):r.sep.push(this.sourceToken);else if(Jn(r.start,"newline"))Object.assign(r,{key:null,sep:[this.sourceToken]});else{let a=ko(r.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:null,sep:[this.sourceToken]}]})}else r.sep?r.value||n?e.items.push({start:s,key:null,sep:[this.sourceToken]}):Jn(r.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):r.sep.push(this.sourceToken):Object.assign(r,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let a=this.flowScalar(this.type);n||r.value?(e.items.push({start:s,key:a,sep:[]}),this.onKeyLine=!0):r.sep?this.stack.push(a):(Object.assign(r,{key:a,sep:[]}),this.onKeyLine=!0);return}default:{let a=this.startBlockValue(e);if(a){if(a.type==="block-seq"){if(!r.explicitKey&&r.sep&&!Jn(r.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else i&&e.items.push({start:s});this.stack.push(a);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let r=e.items[e.items.length-1];switch(this.type){case"newline":if(r.value){let i="end"in r.value?r.value.end:void 0;(Array.isArray(i)?i[i.length-1]:void 0)?.type==="comment"?i?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else r.start.push(this.sourceToken);return;case"space":case"comment":if(r.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(r.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){Fm(n,r.start),n.push(this.sourceToken),e.items.pop();return}}r.start.push(this.sourceToken)}return;case"anchor":case"tag":if(r.value||this.indent<=e.indent)break;r.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;r.value||Jn(r.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken);return}if(this.indent>e.indent){let i=this.startBlockValue(e);if(i){this.stack.push(i);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let r=e.items[e.items.length-1];if(this.type==="flow-error-end"){let i;do yield*this.pop(),i=this.peek(1);while(i?.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!r||r.sep?e.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken);return;case"map-value-ind":!r||r.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):r.sep?r.sep.push(this.sourceToken):Object.assign(r,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!r||r.value?e.items.push({start:[this.sourceToken]}):r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let n=this.flowScalar(this.type);!r||r.value?e.items.push({start:[],key:n,sep:[]}):r.sep?this.stack.push(n):Object.assign(r,{key:n,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}let i=this.startBlockValue(e);i?this.stack.push(i):(yield*this.pop(),yield*this.step())}else{let i=this.peek(2);if(i.type==="block-map"&&(this.type==="map-value-ind"&&i.indent===e.indent||this.type==="newline"&&!i.items[i.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&i.type!=="flow-collection"){let n=Dm(i),s=ko(n);QD(e);let a=e.end.splice(1,e.end.length);a.push(this.sourceToken);let o={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:s,key:e,sep:a}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let r=this.source.indexOf(`
|
|
1359
|
+
`)+1;for(;r!==0;)this.onNewLine(this.offset+r),r=this.source.indexOf(`
|
|
1360
|
+
`,r)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let r=Dm(e),i=ko(r);return i.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let r=Dm(e),i=ko(r);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,r){return this.type!=="comment"||this.indent<=r?!1:e.every(i=>i.type==="newline"||i.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};XD.Parser=A1});var iF=T(zc=>{"use strict";y();var ZD=h1(),dre=Fc(),Wc=Vc(),mre=fS(),gre=xe(),yre=I1(),eF=T1();function tF(t){let e=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||e&&new yre.LineCounter||null,prettyErrors:e}}function _re(t,e={}){let{lineCounter:r,prettyErrors:i}=tF(e),n=new eF.Parser(r?.addNewLine),s=new ZD.Composer(e),a=Array.from(s.compose(n.parse(t)));if(i&&r)for(let o of a)o.errors.forEach(Wc.prettifyError(t,r)),o.warnings.forEach(Wc.prettifyError(t,r));return a.length>0?a:Object.assign([],{empty:!0},s.streamInfo())}function rF(t,e={}){let{lineCounter:r,prettyErrors:i}=tF(e),n=new eF.Parser(r?.addNewLine),s=new ZD.Composer(e),a=null;for(let o of s.compose(n.parse(t),!0,t.length))if(!a)a=o;else if(a.options.logLevel!=="silent"){a.errors.push(new Wc.YAMLParseError(o.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return i&&r&&(a.errors.forEach(Wc.prettifyError(t,r)),a.warnings.forEach(Wc.prettifyError(t,r))),a}function vre(t,e,r){let i;typeof e=="function"?i=e:r===void 0&&e&&typeof e=="object"&&(r=e);let n=rF(t,r);if(!n)return null;if(n.warnings.forEach(s=>mre.warn(n.options.logLevel,s)),n.errors.length>0){if(n.options.logLevel!=="silent")throw n.errors[0];n.errors=[]}return n.toJS(Object.assign({reviver:i},r))}function bre(t,e,r){let i=null;if(typeof e=="function"||Array.isArray(e)?i=e:r===void 0&&e&&(r=e),typeof r=="string"&&(r=r.length),typeof r=="number"){let n=Math.round(r);r=n<1?void 0:n>8?{indent:8}:{indent:n}}if(t===void 0){let{keepUndefined:n}=r??e??{};if(!n)return}return gre.isDocument(t)&&!i?t.toString(r):new dre.Document(t,i,r).toString(r)}zc.parse=vre;zc.parseAllDocuments=_re;zc.parseDocument=rF;zc.stringify=bre});var sF=T(Le=>{"use strict";y();var Sre=h1(),wre=Fc(),xre=zS(),E1=Vc(),kre=wc(),Kn=xe(),Ire=Hn(),Are=dt(),Tre=Wn(),Ere=zn(),Ore=Rm(),Nre=x1(),Lre=I1(),Pre=T1(),jm=iF(),nF=_c();Le.Composer=Sre.Composer;Le.Document=wre.Document;Le.Schema=xre.Schema;Le.YAMLError=E1.YAMLError;Le.YAMLParseError=E1.YAMLParseError;Le.YAMLWarning=E1.YAMLWarning;Le.Alias=kre.Alias;Le.isAlias=Kn.isAlias;Le.isCollection=Kn.isCollection;Le.isDocument=Kn.isDocument;Le.isMap=Kn.isMap;Le.isNode=Kn.isNode;Le.isPair=Kn.isPair;Le.isScalar=Kn.isScalar;Le.isSeq=Kn.isSeq;Le.Pair=Ire.Pair;Le.Scalar=Are.Scalar;Le.YAMLMap=Tre.YAMLMap;Le.YAMLSeq=Ere.YAMLSeq;Le.CST=Ore;Le.Lexer=Nre.Lexer;Le.LineCounter=Lre.LineCounter;Le.Parser=Pre.Parser;Le.parse=jm.parse;Le.parseAllDocuments=jm.parseAllDocuments;Le.parseDocument=jm.parseDocument;Le.stringify=jm.stringify;Le.visit=nF.visit;Le.visitAsync=nF.visitAsync});var Bm=T(Qn=>{"use strict";y();Object.defineProperty(Qn,"__esModule",{value:!0});Qn.ConvenienceSeverities=Qn.LegacyIdentifiers=Qn.ModernIdentifiers=void 0;var Jc=hr();Qn.ModernIdentifiers=["theme-check:nothing","theme-check:recommended","theme-check:theme-app-extension","theme-check:all"];Qn.LegacyIdentifiers=new Map(Object.entries({default:"theme-check:recommended",recommended:"theme-check:recommended",all:"theme-check:all",nothing:"theme-check:nothing",theme_app_extension:"theme-check:theme-app-extension",theme_app_extensions:"theme-check:theme-app-extension","theme-app-extension":"theme-check:theme-app-extension","theme-app-extensions":"theme-check:theme-app-extension"}));Qn.ConvenienceSeverities={suggestion:Jc.Severity.WARNING,style:Jc.Severity.INFO,error:Jc.Severity.ERROR,warning:Jc.Severity.WARNING,info:Jc.Severity.INFO}});var fF=T(Qc=>{"use strict";y();var oF=Qc&&Qc.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Qc,"__esModule",{value:!0});Qc.readYamlConfigDescription=Fre;var uF=hr(),qre=ae("node:fs"),Cre=oF(ae("node:fs/promises")),Rre=ae("node:module"),Vm=oF(ae("node:path")),Mre=sF(),Kc=Bm(),N1=class extends Error{constructor(e,r){super(e),this.name="UnresolvedAliasError",this.message=`YAML parsing error: Unresolved alias *${r}.
|
|
1361
|
+
Did you forget to wrap your ignore statement in quotes? '*${r}'
|
|
1362
|
+
${e}`}};function Dre(t,e){try{let r=e.trim()===""?{}:(0,Mre.parse)(e);if(!lF(r))throw new Error(`Expecting parsed contents of config file at path '${t}' to be a plain object`);return r}catch(r){if(r instanceof Error&&r.name==="ReferenceError"&&r.message.includes("Unresolved alias")&&/: .*$/m.test(r.message)){let i=/: .*$/m.exec(r.message)[0].slice(2);throw new N1(r.message,i)}else throw r}}async function Fre(t,e=!1){let r=Vm.default.dirname(t),i=await Cre.default.readFile(t,"utf8"),n=Dre(t,i),s={checkSettings:{},ignore:[],extends:[],require:[]};n.root&&(s.root=n.root,delete n.root),n.ignore&&(s.ignore=O1(n.ignore),delete n.ignore),n.require&&(s.require=O1(n.require).map(a=>cF(r,a)).filter(L1),delete n.require),n.extends?(s.extends=O1(n.extends).map(a=>aF(r,a)).filter(L1),delete n.extends):e&&(s.extends=[aF(r,"theme-check:recommended")]),n.context&&(uF.Modes.includes(n.context)&&(s.context=n.context),delete n.context),n.include_categories&&delete n.include_categories,n.exclude_categories&&delete n.exclude_categories;for(let[a,o]of Object.entries(n)){if(!lF(o))throw new Error(`Expected a plain object value for ${a} but got ${typeof o}`);s.checkSettings[a]=jre(o)}return s}function aF(t,e){return e.startsWith(":")||Kc.LegacyIdentifiers.has(e)?Kc.LegacyIdentifiers.get(e.replace(/^:/,"")):e.startsWith("theme-check:")?e:cF(t,e)}function cF(t,e){if(Vm.default.isAbsolute(e))return e;if(e.startsWith("."))return Vm.default.resolve(t,e);let r=(0,Rre.createRequire)(Vm.default.join(t,"__placeholder"));return(0,qre.realpathSync)(r.resolve(e))}function jre(t){let e={enabled:t.enabled||!0};for(let[r,i]of Object.entries(t))e[Ure(r)]=i;return t.ignore!==void 0&&Array.isArray(t.ignore)&&t.ignore.every(L1)&&(e.ignore=t.ignore),t.severity!==void 0&&(e.severity=Bre(t.severity)),e}function Bre(t){if(Vre(t))return Kc.ConvenienceSeverities[t];if($re(t))return t;throw new Error(`Unsupported severity: ${t}. Try one of ${Object.keys(Kc.ConvenienceSeverities)}`)}function Vre(t){return typeof t=="string"&&t in Kc.ConvenienceSeverities}function $re(t){return typeof t=="number"&&t in uF.Severity}function Ure(t){return t.replace(/_([a-z])/g,(e,r)=>r.toUpperCase())}function lF(t){return Object.prototype.toString.call(t)==="[object Object]"}function L1(t){return typeof t=="string"}function O1(t){return Array.isArray(t)?t:[t]}});var mF=T(P1=>{"use strict";y();Object.defineProperty(P1,"__esModule",{value:!0});P1.mergeFragments=Hre;function Hre(t,e){return{root:pF(t.map(r=>r.root),e.root),extends:[],ignore:t.flatMap(r=>r.ignore).concat(e.ignore),require:t.flatMap(r=>r.require).concat(e.require),checkSettings:t.map(r=>r.checkSettings).concat(e.checkSettings).reduce(dF),context:pF(t.map(r=>r.context),e.context)??"theme"}}function pF(t,e){return t.concat(e).filter(Boolean).pop()}function dF(t,e){let r={...t};for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(hF(t[i])&&hF(e[i])?r[i]=dF(t[i],e[i]):r[i]=e[i]);return r}function hF(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}});var yF=T(Yc=>{"use strict";y();var Gre=Yc&&Yc.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Yc,"__esModule",{value:!0});Yc.resolveConfig=q1;var gF=Gre(ae("node:path")),Wre=fF(),zre=mF(),Jre=Bm(),Kre=()=>gF.default.resolve(__dirname,"./configs");async function q1(t,e=!1){if(Qre(t)){let n=gF.default.join(Kre(),t.replace(/^theme-check:/,"")+".yml");return q1(n)}let r=await(0,Wre.readYamlConfigDescription)(t,e),i=await Promise.all(r.extends.map(n=>q1(n)));return(0,zre.mergeFragments)(i,r)}function Qre(t){return Jre.ModernIdentifiers.includes(t)}});var _F=T($m=>{"use strict";y();Object.defineProperty($m,"__esModule",{value:!0});$m.resolveConfig=void 0;var Yre=yF();Object.defineProperty($m,"resolveConfig",{enumerable:!0,get:function(){return Yre.resolveConfig}})});var bF=T(D1=>{"use strict";y();Object.defineProperty(D1,"__esModule",{value:!0});D1.validateConfig=Xre;var M1=ae("node:assert");function Xre(t){for(let e of t.checks){let r=t.settings[e.meta.code];(0,M1.strict)(r,`Unexpected missing settings for ${e.meta.code} in validateConfig call`),Zre(e.meta.code,e.meta.schema,r,!0)}}function Zre(t,e,r,i){for(let n in e){let s=e[n],a=r[n];C1(n,a,s)}i&&eie(r),tie(t,e,r)}function eie(t){let{severity:e,enabled:r,ignore:i}=t;e===void 0||R1("severity","number",typeof e),R1("enabled","boolean",typeof r),i===void 0||vF("ignore",i)}function tie(t,e,r){let i=["enabled","severity","ignore"];for(let n in r)!(n in e)&&!i.includes(n)&&console.error(`Unexpected setting: ${n} for check ${t} found in configuration`)}function C1(t,e,r){let{type:i,optional:n,defaultValue:s,properties:a,itemType:o}=r.options;if(e===void 0){if(n!==!0&&s===void 0)throw new Error(`Missing required setting: ${t}`);return}if(!(s!==void 0&&e===s))switch(i){case"string":case"number":case"boolean":{R1(t,i,typeof e);break}case"object":{if(typeof e!="object"||e===null||Array.isArray(e))throw new Error(`Invalid type for setting ${t}: expected object, got ${typeof e}`);for(let u in a)C1(u,e[u],a[u]);break}case"array":{if(vF(t,e),o)for(let u of e)C1(t,u,o);break}default:throw new Error(`Unexpected setting type: ${i}`)}}function R1(t,e,r){M1.strict.strictEqual(r,e,`Invalid type for setting ${t}: expected ${e}, got ${r}`)}function vF(t,e){M1.strict.ok(Array.isArray(e),`Invalid type for setting ${t}: expected array, got ${typeof e}`)}});var SF=T(Xc=>{"use strict";y();var rie=Xc&&Xc.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Xc,"__esModule",{value:!0});Xc.loadConfig=oie;var iie=gR(),nie=_F(),sie=bF(),aie=rie(ae("fs/promises"));async function oie(t,e){if(!e)throw new Error("loadConfig cannot be called without a root argument");let r="theme-check:recommended";t||(await aie.default.readdir(e)).some(a=>a.endsWith(".extension.toml")||a.endsWith(".app.toml"))&&(r="theme-check:theme-app-extension");let i=await(0,nie.resolveConfig)(t??r,!0),n=await(0,iie.loadConfigDescription)(i,e);return(0,sie.validateConfig)(n),n}});var wF=T(Zc=>{"use strict";y();var uie=Zc&&Zc.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Zc,"__esModule",{value:!0});Zc.findConfigPath=pie;var cie=uie(ae("node:path")),lie=W0(),fie=[".theme-check.yml"];function pie(t){let e=fie.map(r=>cie.default.join(t,r));return hie(e,lie.fileExists)}async function hie(t,e){for(let r of t)if(await e(r))return r}});var xF=T(Io=>{"use strict";y();Object.defineProperty(Io,"__esModule",{value:!0});Io.findConfigPath=Io.loadConfig=void 0;var die=SF();Object.defineProperty(Io,"loadConfig",{enumerable:!0,get:function(){return die.loadConfig}});var mie=wF();Object.defineProperty(Io,"findConfigPath",{enumerable:!0,get:function(){return mie.findConfigPath}})});var kF=T(Ao=>{"use strict";y();var gie=Ao&&Ao.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ao,"__esModule",{value:!0});Ao.NodeFileSystem=void 0;var Yn=hr(),F1=gie(ae("node:fs/promises"));Ao.NodeFileSystem={async readFile(t){return F1.default.readFile(Yn.path.fsPath(t),"utf8")},async readDirectory(t){return(await F1.default.readdir(Yn.path.fsPath(t),{withFileTypes:!0})).map(r=>[Yn.path.join(t,r.name),r.isDirectory()?Yn.FileType.Directory:Yn.FileType.File])},async stat(t){try{let e=await F1.default.stat(Yn.path.fsPath(t));return{type:e.isDirectory()?Yn.FileType.Directory:Yn.FileType.File,size:e.size}}catch(e){throw new Error(`Failed to get file stat: ${e}`)}}}});var Nie=T(it=>{"use strict";y();var yie=it&&it.__createBinding||(Object.create?(function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n)}):(function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]})),AF=it&&it.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&yie(e,t,r)},TF=it&&it.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(it,"__esModule",{value:!0});it.loadConfig=it.NodeFileSystem=void 0;it.toSourceCode=OF;it.check=Eie;it.checkAndAutofix=Oie;it.themeCheckRun=j1;it.getThemeAndConfig=NF;it.getTheme=LF;it.getThemeFilesPathPattern=PF;var mt=hr(),_ie=T2(),vie=F2(),bie=ge(),Sie=TF(ae("node:fs/promises")),el=TF(ae("node:path")),wie=ae("node:util"),EF=Du(),xie=Vd(),kie=cR(),IF=xF(),To=kF();Object.defineProperty(it,"NodeFileSystem",{enumerable:!0,get:function(){return To.NodeFileSystem}});var Iie=ae("node:url"),Aie=(0,wie.promisify)(xie);AF(hr(),it);AF(Bm(),it);var Tie=async(t,e)=>(t??=await(0,IF.findConfigPath)(e),(0,IF.loadConfig)(t,e));it.loadConfig=Tie;async function OF(t){try{let e=await Sie.default.readFile(t,"utf8");return(0,mt.toSourceCode)(mt.path.normalize(EF.URI.file(t)),e)}catch{return}}async function Eie(t,e){return(await j1(t,e)).offenses}async function Oie(t,e){let{theme:r,offenses:i}=await j1(t,e);await(0,kie.autofix)(r,i)}async function j1(t,e,r=()=>{}){let{theme:i,config:n}=await NF(t,e),s=new vie.ThemeLiquidDocsManager(r),o=(await mt.JSONValidator.create(s,n))?.isValid,u=i.map(g=>(0,mt.toSchema)(n.context,g.uri,g,o)),l=new Map(i.filter(g=>(0,mt.isBlock)(g.uri)).map(g=>[el.default.basename(g.uri,".liquid"),(0,mt.memo)(async()=>(0,mt.toSchema)(n.context,g.uri,g,o))])),f=new Map(i.filter(g=>(0,mt.isSection)(g.uri)).map(g=>[el.default.basename(g.uri,".liquid"),(0,mt.memo)(async()=>(0,mt.toSchema)(n.context,g.uri,g,o))])),h=new Map(i.map(g=>[el.default.relative(EF.URI.file(t).toString(),g.uri),(0,mt.memo)(async()=>{let k=g.ast;if((0,bie.isLiquidHtmlNode)(k)&&(0,mt.filePathSupportsLiquidDoc)(g.uri))return(0,mt.extractDocDefinition)(g.uri,k)})])),p=new Map(i.filter(g=>g.uri.endsWith(".liquid")).map(g=>[g.uri,(0,mt.memo)(async()=>(0,mt.extractCSSClassesFromLiquidUri)(g.uri,To.NodeFileSystem))]));try{let g=mt.path.join(n.rootUri,"assets"),k=await To.NodeFileSystem.readDirectory(g);for(let[w]of k.filter(([_])=>_.endsWith(".css")))p.set(w,(0,mt.memo)(async()=>(0,mt.extractCSSClassesFromAssetUri)(w,To.NodeFileSystem)))}catch{}let m=async g=>f.get(g)?.(),v=async g=>l.get(g)?.(),S;try{S=await(0,_ie.buildThemeGraph)(n.rootUri,{fs:To.NodeFileSystem,getSectionSchema:m,getBlockSchema:v,getWebComponentDefinitionReference:()=>{},mode:n.context})}catch{}let b=await(0,mt.check)(i,n,{fs:To.NodeFileSystem,themeDocset:s,jsonValidationSet:s,getSectionSchema:m,getBlockSchema:v,getAppBlockSchema:async g=>l.get(g)?.(),getDocDefinition:async g=>h.get(g)?.(),getCSSClassesForURI:async g=>p.get(g)?.()??new Set,async getReferences(g){return S?S.modules[g]?.references??[]:[]},async getDependencies(g){return S?S.modules[g]?.dependencies??[]:[]}});return{theme:i,config:n,offenses:b}}async function NF(t,e){let r=await(0,it.loadConfig)(e,t);return{theme:await LF(r),config:r}}async function LF(t){let e=PF(t.rootUri),r=await Aie(e,{absolute:!0}).then(n=>n.filter(s=>!(0,mt.isIgnored)(s,t)));return(await Promise.all(r.map(OF))).filter(n=>n!==void 0)}function PF(t){return el.default.normalize(el.default.join((0,Iie.fileURLToPath)(t),"**/*.{liquid,json}")).replace(/\\/g,"/")}});export{ge as a,Du as b,Gf as c,Me as d,oe as e,nn as f,Uu as g,zf as h,Jf as i,Tn as j,Kf as k,$t as l,Cr as m,En as n,rr as o,Hu as p,Gu as q,Qf as r,Pi as s,Os as t,Ut as u,Ke as v,Yf as w,Fa as x,Xf as y,ja as z,Zf as A,ep as B,tp as C,Rr as D,rp as E,ip as F,np as G,ap as H,op as I,up as J,Ns as K,kv as L,kr as M,IU as N,oO as O,Ba as P,Joe as Q,Tv as R,Ls as S,QO as T,YO as U,hr as V,T2 as W,F2 as X,N0 as Y,jd as Z,aR as _,sF as $,Nie as aa};
|
|
1363
|
+
/*! Bundled license information:
|
|
1364
|
+
|
|
1365
|
+
isobject/index.js:
|
|
1366
|
+
(*!
|
|
1367
|
+
* isobject <https://github.com/jonschlinkert/isobject>
|
|
1368
|
+
*
|
|
1369
|
+
* Copyright (c) 2014-2015, Jon Schlinkert.
|
|
1370
|
+
* Licensed under the MIT License.
|
|
1371
|
+
*)
|
|
1372
|
+
|
|
1373
|
+
line-column/lib/line-column.js:
|
|
1374
|
+
(**
|
|
1375
|
+
* line-column - Convert efficiently index to/from line-column in a string
|
|
1376
|
+
* @module lineColumn
|
|
1377
|
+
* @license MIT
|
|
1378
|
+
*)
|
|
1379
|
+
|
|
1380
|
+
cssesc/cssesc.js:
|
|
1381
|
+
(*! https://mths.be/cssesc v3.0.0 by @mathias *)
|
|
1382
|
+
*/
|