shopify 5.1.0 → 5.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/dist/analytics-23GM6KJU.js +1 -0
- package/dist/analytics-743FYOAE.js +1 -0
- package/dist/bootstrap.js +1 -1
- package/dist/{chunk-HSTZV6H7.js → chunk-2EQRXSF6.js} +1 -1
- package/dist/{chunk-AY3AAV77.js → chunk-2IXP3IPE.js} +1 -1
- package/dist/{chunk-OTMYJWIP.js → chunk-2KACAQJS.js} +1 -1
- package/dist/{chunk-24Q6X53V.js → chunk-2OCSYLKZ.js} +1 -1
- package/dist/{chunk-QCLE5REL.js → chunk-2PILNMHJ.js} +1 -1
- package/dist/{chunk-WPDJVUTY.js → chunk-36S6MFJQ.js} +1 -1
- package/dist/{chunk-YNZLLZU2.js → chunk-3DB4EC62.js} +1 -1
- package/dist/{chunk-FQLXQ7WN.js → chunk-3GL3IT4K.js} +1 -1
- package/dist/{chunk-JALDNBTU.js → chunk-3JRB7Q3T.js} +1 -1
- package/dist/{chunk-7A77JCED.js → chunk-3OYMK5X6.js} +1 -1
- package/dist/{chunk-ORMXPSJM.js → chunk-422BGHXN.js} +1 -1
- package/dist/{chunk-ZMU4EYXT.js → chunk-43C32FUQ.js} +1 -1
- package/dist/{chunk-ELR6AZT4.js → chunk-4AN7ECPE.js} +1 -1
- package/dist/chunk-4AWVU2OV.js +1 -0
- package/dist/chunk-4KBOLN7Q.js +8 -0
- package/dist/{chunk-YYWSHRO2.js → chunk-4LJERO23.js} +3 -3
- package/dist/{chunk-4FWPOGPQ.js → chunk-4M5WHOZW.js} +1 -1
- package/dist/{chunk-OWQEFORZ.js → chunk-4RO35FFQ.js} +1 -1
- package/dist/{chunk-6I7DT7QR.js → chunk-4ZS5354G.js} +1 -1
- package/dist/{chunk-ZXZWMXXK.js → chunk-55AWBPKU.js} +1 -1
- package/dist/{chunk-7PHDEILV.js → chunk-5BUYR23E.js} +1 -1
- package/dist/{chunk-AHYI27QL.js → chunk-5EDA7PVE.js} +3 -3
- package/dist/{chunk-5C6CXU74.js → chunk-5P6OELKZ.js} +1 -1
- package/dist/{chunk-SPJM7RTD.js → chunk-5PVXLQNX.js} +1 -1
- package/dist/{chunk-FU7PYW7H.js → chunk-5S2P4MHJ.js} +1 -1
- package/dist/{chunk-SBN3ILXO.js → chunk-5TJJVSCI.js} +1 -1
- package/dist/{chunk-VE3IIC7H.js → chunk-5TOK5OJS.js} +1 -1
- package/dist/{chunk-LGDWE3H3.js → chunk-5ZG2SWU2.js} +1 -1
- package/dist/{chunk-DDZYIC76.js → chunk-62F4ZMSC.js} +1 -1
- package/dist/{chunk-4NFX7YCT.js → chunk-652NT7OW.js} +1 -1
- package/dist/{chunk-5534MHZW.js → chunk-6B5KM3A4.js} +1 -1
- package/dist/{chunk-CRQQCT7F.js → chunk-6LCESSY3.js} +1 -1
- package/dist/chunk-6QHDMCAA.js +1 -0
- package/dist/{chunk-2KUM2RU4.js → chunk-7A4ZE5IS.js} +2 -2
- package/dist/{chunk-R6US7F33.js → chunk-7AQZKPJU.js} +1 -1
- package/dist/{chunk-HMPRWNGG.js → chunk-7FBOMPO5.js} +2 -2
- package/dist/{chunk-DGIIUQH3.js → chunk-7UK565VJ.js} +1 -1
- package/dist/{chunk-DOLVBTCB.js → chunk-A5BSUUNQ.js} +1 -1
- package/dist/{chunk-SCDGLREP.js → chunk-ADGE7MKB.js} +1 -1
- package/dist/{chunk-65NCQJYR.js → chunk-AEWRZ7AE.js} +1 -1
- package/dist/chunk-ALDJTWCO.js +1 -0
- package/dist/chunk-ARL5WBDK.js +1 -0
- package/dist/chunk-AXFEIJC7.js +1 -0
- package/dist/{chunk-JNSVKDBY.js → chunk-AYGL6F3P.js} +1 -1
- package/dist/{chunk-F6IQWX2F.js → chunk-AYTTE7X5.js} +1 -1
- package/dist/{chunk-JIYCZXK5.js → chunk-BDIZUTKC.js} +1 -1
- package/dist/{chunk-Z5WFRYVQ.js → chunk-BQKF4SRH.js} +1 -1
- package/dist/{chunk-7ART2IKU.js → chunk-C2AOCLEZ.js} +1 -1
- package/dist/{chunk-NYMKGE3J.js → chunk-C2SGJ5IG.js} +1 -1
- package/dist/{chunk-LPPEAMI6.js → chunk-C3S3UMV3.js} +1 -1
- package/dist/{chunk-S3RROJGG.js → chunk-C5DKLOW4.js} +1 -1
- package/dist/{chunk-DC7ITY6T.js → chunk-CA3GVT4D.js} +1 -1
- package/dist/{chunk-KFR7HWCG.js → chunk-CCLU5ZRK.js} +1 -1
- package/dist/{chunk-3FZ4LE6A.js → chunk-CE6XQDAG.js} +2 -2
- package/dist/{chunk-RKNVTEO3.js → chunk-CEJ5WS4I.js} +1 -1
- package/dist/chunk-CIBBQO2L.js +6 -0
- package/dist/{chunk-L2PUDV7Y.js → chunk-CKJXJ6HD.js} +1 -1
- package/dist/{chunk-KHZF73BL.js → chunk-COGKVNQB.js} +1 -1
- package/dist/{chunk-OY5M52EF.js → chunk-CQPZOXWO.js} +1 -1
- package/dist/{chunk-AVJJGQOP.js → chunk-CZYQIWNL.js} +1 -1
- package/dist/{chunk-VA2S7W7H.js → chunk-DA5RQFXA.js} +1 -1
- package/dist/{chunk-NUBJ2HK7.js → chunk-DESZFFOK.js} +1 -1
- package/dist/{chunk-WLYXBQ2M.js → chunk-DKR7562G.js} +1 -1
- package/dist/{chunk-KM4LE7K4.js → chunk-DNNTAMC5.js} +1 -1
- package/dist/{chunk-V4FC72R6.js → chunk-DUPQUQ2Z.js} +1 -1
- package/dist/{chunk-FHKK3QU7.js → chunk-DUTIWCJ2.js} +1 -1
- package/dist/chunk-E6JEBSHZ.js +20 -0
- package/dist/{chunk-VQSRU5XL.js → chunk-E6KNAPIY.js} +1 -1
- package/dist/{chunk-MTT6EAQO.js → chunk-E7XCCLQH.js} +1 -1
- package/dist/chunk-EE72PCKT.js +1 -0
- package/dist/{chunk-AGTUAQHX.js → chunk-EEYXBKR7.js} +1 -1
- package/dist/{chunk-H2KGP2FM.js → chunk-EGLA3WLZ.js} +1 -1
- package/dist/{chunk-JMSAHCBU.js → chunk-FDFE3SSG.js} +1 -1
- package/dist/{chunk-TSPJAMYB.js → chunk-FI5TQHUA.js} +1 -1
- package/dist/{chunk-QKPAB245.js → chunk-FIKZQ4RA.js} +1 -1
- package/dist/chunk-FJOVMEPN.js +3 -0
- package/dist/{chunk-5PSQFQL6.js → chunk-FLARCZ5F.js} +1 -1
- package/dist/{chunk-WE5KY6T6.js → chunk-FOMMPAWZ.js} +1 -1
- package/dist/chunk-G3DXNSA2.js +1 -0
- package/dist/{chunk-HYCNYUHW.js → chunk-G7JO3W2R.js} +1 -1
- package/dist/{chunk-C2HJEGTS.js → chunk-GABIWYY3.js} +1 -1
- package/dist/{chunk-OXZR2MB4.js → chunk-GFSEU7PF.js} +1 -1
- package/dist/{chunk-AMVWKHNY.js → chunk-GFVUWVEM.js} +1 -1
- package/dist/{chunk-D7IMC2G4.js → chunk-GHNSXX7R.js} +1 -1
- package/dist/{chunk-7N7KRZOM.js → chunk-GQ3LY7BY.js} +1 -1
- package/dist/{chunk-PJZZZNWR.js → chunk-H45S4MGC.js} +1 -1
- package/dist/{chunk-OJOF6IYG.js → chunk-HEB4YYM6.js} +4 -4
- package/dist/{chunk-I3WRA2LH.js → chunk-HI5FTI3M.js} +1 -1
- package/dist/{chunk-WFPVT2IY.js → chunk-HJ24NEP5.js} +1 -1
- package/dist/{chunk-LFBFPK22.js → chunk-HQFXVVTB.js} +1 -1
- package/dist/{chunk-27JT4NA4.js → chunk-HR6R7JXN.js} +1 -1
- package/dist/{chunk-JVY6CCLE.js → chunk-HRHJA5ZP.js} +1 -1
- package/dist/{chunk-5HOZDOJ7.js → chunk-HT5JQJMB.js} +1 -1
- package/dist/chunk-HT7273V7.js +1 -0
- package/dist/{chunk-ONZULPQH.js → chunk-HUB4HDWN.js} +75 -75
- package/dist/{chunk-HGZ2HRPO.js → chunk-IATNIWOC.js} +1 -1
- package/dist/{chunk-T6C4WC3Z.js → chunk-IHVWDKDV.js} +1 -1
- package/dist/{chunk-DMOLPSXF.js → chunk-IKXUYCK7.js} +1 -1
- package/dist/{chunk-HP4QYSBQ.js → chunk-IVQN2RUP.js} +1 -1
- package/dist/{chunk-FYQE5E6U.js → chunk-J324ZPO6.js} +1 -1
- package/dist/{chunk-3MZ7ELHS.js → chunk-JJQ3DJG5.js} +1 -1
- package/dist/{chunk-RLOEI6VE.js → chunk-JLAN6JXJ.js} +1 -1
- package/dist/{chunk-XRNBCV2B.js → chunk-K2GCCCCV.js} +1 -1
- package/dist/{chunk-ASKBYEO7.js → chunk-K4KKSBUW.js} +1 -1
- package/dist/{chunk-JC37YZ4I.js → chunk-K5UVCBIP.js} +1 -1
- package/dist/{chunk-3C72S6LO.js → chunk-KN2JIDNO.js} +1 -1
- package/dist/{chunk-WBJFTCEJ.js → chunk-KORVOCNN.js} +1 -1
- package/dist/{chunk-MGWCXTGD.js → chunk-KRQCQ57O.js} +1 -1
- package/dist/{chunk-3GD5ESWN.js → chunk-KT2AMFVW.js} +1 -1
- package/dist/{chunk-VRIFLMA3.js → chunk-L23Q53FM.js} +1 -1
- package/dist/{chunk-OXPEBT4I.js → chunk-L3DTONOI.js} +1 -1
- package/dist/{chunk-CEQGOCKX.js → chunk-LRETOC6P.js} +1 -1
- package/dist/{chunk-F5QKMDP3.js → chunk-LXFWK3O2.js} +1 -1
- package/dist/{chunk-KCAWHJGF.js → chunk-LZ2TN7EZ.js} +1 -1
- package/dist/{chunk-EDWIWZWM.js → chunk-MBAPM5HA.js} +1 -1
- package/dist/{chunk-IRLYC626.js → chunk-MGZK5EQW.js} +1 -1
- package/dist/{chunk-GSFWBFFH.js → chunk-MKUXSM33.js} +1 -1
- package/dist/chunk-MQ55QUOJ.js +276 -0
- package/dist/{chunk-A2NSORBM.js → chunk-NAQJMRPT.js} +1 -1
- package/dist/{chunk-Z5QEXS6F.js → chunk-NMXRDF4T.js} +1 -1
- package/dist/{chunk-SODCXZ5U.js → chunk-NOWM3CCG.js} +1 -1
- package/dist/{chunk-TXP6KFWO.js → chunk-NVDFXEQ5.js} +1 -1
- package/dist/{chunk-TP7CTMMT.js → chunk-OCILF2DD.js} +1 -1
- package/dist/{chunk-XWLNCBAG.js → chunk-OGBMFGYC.js} +1 -1
- package/dist/{chunk-ZMOW2YZ4.js → chunk-OIQ5NQ5I.js} +3 -3
- package/dist/{chunk-YTL45RXR.js → chunk-OKRKVVTK.js} +1 -1
- package/dist/{chunk-JQU2BJDH.js → chunk-ONNUEQGR.js} +1 -1
- package/dist/chunk-OSASE35V.js +6 -0
- package/dist/{chunk-6IMTMS2S.js → chunk-OTMTS5L4.js} +1 -1
- package/dist/{chunk-MKFRKNHF.js → chunk-OWPAHXDF.js} +1 -1
- package/dist/{chunk-YVPB7OT6.js → chunk-P7HZGJRU.js} +1 -1
- package/dist/{chunk-5T3ZT6CC.js → chunk-PIU3GVJ4.js} +1 -1
- package/dist/{chunk-DVD7I2TX.js → chunk-PSNCWS3Q.js} +1 -1
- package/dist/{chunk-XEZPN5TR.js → chunk-PSREELSQ.js} +4 -4
- package/dist/{chunk-SURFUFAZ.js → chunk-Q2CKRCPM.js} +1 -1
- package/dist/{chunk-WWCYEZUU.js → chunk-QA2D7DT2.js} +1 -1
- package/dist/{chunk-G3EWGBXR.js → chunk-QDMTJKQ3.js} +1 -1
- package/dist/{chunk-NY5N4ANL.js → chunk-QIJ7D2JS.js} +1 -1
- package/dist/{chunk-7DBKSSDK.js → chunk-QLN6IOOY.js} +1 -1
- package/dist/{chunk-A54TADAZ.js → chunk-QU3USVKT.js} +1 -1
- package/dist/chunk-R2E6TMBE.js +22 -0
- package/dist/chunk-R5COVIJM.js +1 -0
- package/dist/{chunk-S4KNPCW3.js → chunk-RFJ2LI64.js} +1 -1
- package/dist/chunk-RNF6T6IO.js +5 -0
- package/dist/{chunk-DVFVO6ZE.js → chunk-RSNFNZ6F.js} +1 -1
- package/dist/{chunk-7BPT5V24.js → chunk-RZ3UGOV4.js} +2 -2
- package/dist/{chunk-GGCP2TIK.js → chunk-S23ZG2RG.js} +1 -1
- package/dist/{chunk-3PS52ZT4.js → chunk-SAK42CAY.js} +1 -1
- package/dist/{chunk-G3RNO2TC.js → chunk-SBX7CMHM.js} +1 -1
- package/dist/{chunk-TUSS6PXB.js → chunk-SGQTRKYZ.js} +1 -1
- package/dist/{chunk-SQL67BKI.js → chunk-SNPJVVVE.js} +1 -1
- package/dist/{chunk-QUPZOBTB.js → chunk-SNRGS3YU.js} +1 -1
- package/dist/{chunk-FKKJQGYX.js → chunk-SUTSCIXU.js} +1 -1
- package/dist/{chunk-SHOMIS6Q.js → chunk-SWFCT5B7.js} +1 -1
- package/dist/{chunk-WZBZ7FWP.js → chunk-SZ64GAVG.js} +1 -1
- package/dist/{chunk-DTKGI43P.js → chunk-TDHIOONG.js} +1 -1
- package/dist/{chunk-7NRHZG5Y.js → chunk-TLN4BKXJ.js} +1 -1
- package/dist/{chunk-XLMKHTJ5.js → chunk-TXMZPF2U.js} +1 -1
- package/dist/{chunk-6BYHL3DS.js → chunk-TZOB52QK.js} +1 -1
- package/dist/{chunk-HVUMVDUG.js → chunk-U5BKU3OL.js} +1 -1
- package/dist/chunk-UK3BDOHR.js +7 -0
- package/dist/{chunk-YKDRUAY3.js → chunk-UORSJB4A.js} +90 -90
- package/dist/{chunk-Z6ZRS256.js → chunk-UY44O4IZ.js} +1 -1
- package/dist/{chunk-JG4FAT2T.js → chunk-V3H6SYK3.js} +1 -1
- package/dist/{chunk-AE3IQG7S.js → chunk-VBPMVVLV.js} +1 -1
- package/dist/{chunk-SVQDMZJO.js → chunk-VGBCG3I5.js} +1 -1
- package/dist/{chunk-MYMBHVC4.js → chunk-VHRUPKWH.js} +1 -1
- package/dist/{chunk-CZNUBAAG.js → chunk-VVHJ2AUF.js} +1 -1
- package/dist/{chunk-T4ZOTYOY.js → chunk-WB5GRBHW.js} +1 -1
- package/dist/{chunk-YNFQBYSL.js → chunk-WBKQSSWW.js} +1 -1
- package/dist/{chunk-MU7IVBGI.js → chunk-WDXDT7XY.js} +2 -2
- package/dist/{chunk-FAVPTYIR.js → chunk-WHOD5I7N.js} +1 -1
- package/dist/{chunk-7CT3NIXI.js → chunk-WL3M63DG.js} +1 -1
- package/dist/{chunk-25MYHE4W.js → chunk-WLJDMI7E.js} +1 -1
- package/dist/{chunk-VJG7VXFU.js → chunk-WZ3QWPK5.js} +2 -2
- package/dist/{chunk-BPKQA2EO.js → chunk-X5V7AGVU.js} +1 -1
- package/dist/{chunk-UFY4L5KQ.js → chunk-X76AYO36.js} +1 -1
- package/dist/{chunk-WBPP6PO7.js → chunk-XB7H2RYV.js} +1 -1
- package/dist/chunk-XHHAVKKV.js +1 -0
- package/dist/{chunk-4TCXPHKN.js → chunk-XKNDU62O.js} +1 -1
- package/dist/{chunk-7KID5BIR.js → chunk-XVJRGOJA.js} +1 -1
- package/dist/{chunk-CDSDQTNB.js → chunk-Y3ZAQZPH.js} +1 -1
- package/dist/{chunk-Q2LQJYRK.js → chunk-YGN65N6W.js} +1 -1
- package/dist/{chunk-UC4TOM36.js → chunk-YTC367JI.js} +1 -1
- package/dist/{chunk-TTAT62N3.js → chunk-Z2FGYMJ6.js} +1 -1
- package/dist/chunk-Z3QZNLT5.js +1 -0
- package/dist/{chunk-TSVEV2UD.js → chunk-ZC3EDADH.js} +1 -1
- package/dist/{chunk-O7HZ3EIP.js → chunk-ZLITAXPT.js} +1 -1
- package/dist/{chunk-WWVDZ3GC.js → chunk-ZNEQZV5K.js} +1 -1
- package/dist/{chunk-OVJVFB5E.js → chunk-ZOU6SOXW.js} +1 -1
- package/dist/{chunk-KFO2JNF5.js → chunk-ZQNGYJKJ.js} +1 -1
- package/dist/{chunk-MZDBH4XV.js → chunk-ZRM7ESSS.js} +1 -1
- package/dist/{chunk-ORYEDUKM.js → chunk-ZX33FUW3.js} +1 -1
- 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 -1
- package/dist/cli/commands/app/bulk/status.js +1 -1
- package/dist/cli/commands/app/config/link.js +1 -1
- 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 -1
- package/dist/cli/commands/app/demo/watcher.js +1 -1
- package/dist/cli/commands/app/deploy.js +1 -1
- package/dist/cli/commands/app/dev/clean.js +1 -1
- package/dist/cli/commands/app/dev.js +1 -1
- package/dist/cli/commands/app/env/pull.js +1 -1
- 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 -1
- package/dist/cli/commands/app/function/replay.js +1 -1
- 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 -1
- package/dist/cli/commands/app/graphiql.js +1 -1
- package/dist/cli/commands/app/import/channel-config.js +1 -1
- package/dist/cli/commands/app/import/custom-data-definitions.js +1 -1
- package/dist/cli/commands/app/import/dashboard-extensions.js +1 -1
- package/dist/cli/commands/app/import-custom-data-definitions.js +1 -1
- package/dist/cli/commands/app/import-extensions.js +1 -1
- package/dist/cli/commands/app/info.js +1 -1
- package/dist/cli/commands/app/init.js +1 -1
- package/dist/cli/commands/app/logs.js +1 -1
- package/dist/cli/commands/app/release.js +1 -1
- package/dist/cli/commands/app/security/check.js +1 -1
- package/dist/cli/commands/app/security/clean.js +1 -1
- package/dist/cli/commands/app/security/instructions.js +1 -1
- package/dist/cli/commands/app/security/record.js +1 -1
- package/dist/cli/commands/app/security/review.js +1 -1
- package/dist/cli/commands/app/subscription-migrations/cancel.js +1 -1
- package/dist/cli/commands/app/subscription-migrations/list.js +1 -1
- package/dist/cli/commands/app/subscription-migrations/schedule.js +1 -1
- package/dist/cli/commands/app/subscription-migrations/status.js +1 -1
- package/dist/cli/commands/app/subscription-migrations/unschedule.js +1 -1
- package/dist/cli/commands/app/versions/list.js +1 -1
- package/dist/cli/commands/app/webhook/trigger.js +1 -1
- 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/doc/fetch.js +1 -1
- package/dist/cli/commands/doc/search.js +1 -1
- 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/send-analytics.js +1 -1
- package/dist/cli/commands/theme/check.js +1 -1
- package/dist/cli/commands/theme/console.js +1 -1
- package/dist/cli/commands/theme/delete.js +1 -1
- package/dist/cli/commands/theme/dev.js +1 -1
- package/dist/cli/commands/theme/duplicate.js +1 -1
- package/dist/cli/commands/theme/info.js +1 -1
- package/dist/cli/commands/theme/init.js +1 -1
- 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 -1
- package/dist/cli/commands/theme/open.js +1 -1
- package/dist/cli/commands/theme/package.js +1 -1
- package/dist/cli/commands/theme/preview.js +1 -1
- package/dist/cli/commands/theme/profile.js +1 -1
- package/dist/cli/commands/theme/publish.js +1 -1
- package/dist/cli/commands/theme/pull.js +1 -1
- package/dist/cli/commands/theme/push.js +1 -1
- package/dist/cli/commands/theme/rename.js +1 -1
- package/dist/cli/commands/theme/share.js +1 -1
- package/dist/cli/commands/upgrade.js +1 -1
- package/dist/cli/commands/version.js +1 -1
- package/dist/cli/help.js +1 -1
- package/dist/{cli-version-check-V25AVSZ6.js → cli-version-check-BW2CUMX4.js} +1 -1
- package/dist/{command-json-schema-C5UZXP2W.js → command-json-schema-LGR44Q2G.js} +1 -1
- package/dist/command-registry.js +1 -1
- package/dist/{conf-store-OCGEEV4U.js → conf-store-TODPQ2LC.js} +1 -1
- package/dist/configs/all.yml +9 -0
- package/dist/configs/recommended.yml +9 -0
- package/dist/{custom-oclif-loader-ZVUKMRGH.js → custom-oclif-loader-BPE2TH4B.js} +1 -1
- package/dist/data/objects.json +204 -11
- package/dist/data/section.json +14 -0
- package/dist/data/setting.json +9 -5
- package/dist/data/shopify_system_translations.json +84 -21
- package/dist/{deprecations-A5AXXKIK.js → deprecations-5CSI24TV.js} +1 -1
- package/dist/dist-LPKYTX3M.js +1 -0
- package/dist/dist-WT6MPTKJ.js +1 -0
- package/dist/{environments-Y5JEI3U3.js → environments-3HTT5CVC.js} +1 -1
- package/dist/error-PFOKPWFX.js +1 -0
- package/dist/error-handler-23FASAEU.js +1 -0
- package/dist/{fs-UOOLPOHJ.js → fs-RA25PWSJ.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/http-EVDTYINS.js +1 -0
- package/dist/index.js +12 -12
- package/dist/{is-global-CI77T7NE.js → is-global-3DNAMKUU.js} +1 -1
- package/dist/{json-error-6PBUR4LQ.js → json-error-HGCRNJRF.js} +1 -1
- package/dist/{lib-4JVADMNT.js → lib-4ZA53LTZ.js} +1 -1
- package/dist/{lib-L4STV5B2.js → lib-F3MES3XF.js} +1 -1
- package/dist/{lib-LEEN55OD.js → lib-XPJABU24.js} +1 -1
- package/dist/{local-5NIWPWDS.js → local-LNGPIGLG.js} +1 -1
- package/dist/{metadata-IXPNNPNJ.js → metadata-VHLSUKCW.js} +1 -1
- package/dist/{node-package-manager-ALFEGGD6.js → node-package-manager-SSFNUVWB.js} +1 -1
- package/dist/notifications-system-3NQRYYKW.js +1 -0
- package/dist/{os-6TNQTEUN.js → os-KIKVJONE.js} +1 -1
- package/dist/{output-LEOB5LAM.js → output-DUJTSURG.js} +1 -1
- package/dist/{prettier-VLTY4MIE.js → prettier-NOE3TJJ5.js} +1 -1
- package/dist/{system-J4CTESP5.js → system-CGOZSROX.js} +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{ui-YDUI56E3.js → ui-YMBFS3NG.js} +1 -1
- package/dist/upgrade-73RRPDSC.js +1 -0
- package/dist/version-AMUEEBIG.js +1 -0
- package/dist/{version-2YL4YEQ2.js → version-S4MGCKDO.js} +1 -1
- package/dist/{workerd-5UPTEWNI.js → workerd-DRWNY3S4.js} +1 -1
- package/oclif.manifest.json +23 -62
- package/package.json +7 -7
- package/dist/analytics-QFDTQYPM.js +0 -1
- package/dist/analytics-XADBBHOH.js +0 -1
- package/dist/chunk-2BYW3BYX.js +0 -1
- package/dist/chunk-2PD7TNFS.js +0 -275
- package/dist/chunk-3Z75BVGJ.js +0 -1
- package/dist/chunk-4WBWZIN5.js +0 -6
- package/dist/chunk-62NW4EPI.js +0 -17
- package/dist/chunk-ALINJ6J2.js +0 -1
- package/dist/chunk-BFAOTQGH.js +0 -1
- package/dist/chunk-CIGWIKOW.js +0 -1
- package/dist/chunk-DXEMSLI6.js +0 -1
- package/dist/chunk-H4K3F7PP.js +0 -5
- package/dist/chunk-JGLLABZR.js +0 -8
- package/dist/chunk-JIY6XWSC.js +0 -1
- package/dist/chunk-LXIWMYM4.js +0 -1
- package/dist/chunk-MGX7UG44.js +0 -1
- package/dist/chunk-QGQWVA7N.js +0 -1
- package/dist/chunk-RSZAAN37.js +0 -1
- package/dist/chunk-SN3PMWUF.js +0 -6
- package/dist/chunk-TD6JBHUS.js +0 -1
- package/dist/chunk-TIM4CIXZ.js +0 -22
- package/dist/chunk-WNVOEE6T.js +0 -7
- package/dist/chunk-YOYPYB4H.js +0 -1
- package/dist/cli/commands/app/logs-next.js +0 -1
- package/dist/dist-NORLLIHQ.js +0 -1
- package/dist/dist-XBM4XZS4.js +0 -1
- package/dist/error-GI4DXVDU.js +0 -1
- package/dist/error-handler-BS2ZENQV.js +0 -1
- package/dist/http-2OXOS2AW.js +0 -1
- package/dist/notifications-system-FQW3GKH2.js +0 -1
- package/dist/upgrade-LBCZORG2.js +0 -1
- package/dist/version-X2CPQVWQ.js +0 -1
- /package/dist/{chunk-2S3FHQFS.js → chunk-HVECVOIO.js} +0 -0
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
import{a as YE}from"./chunk-IWOTLFOY.js";import{Ja as U9,Ka as KE,e as JE}from"./chunk-UORSJB4A.js";import{b as $9}from"./chunk-UU6UQ2QY.js";import{n as V9}from"./chunk-RFJ2LI64.js";import{a as ce,b as Pe,c as x,d as D_,e as fo,f as j_,g as p}from"./chunk-VKWPEFWQ.js";var F_=x(B_=>{"use strict";p();Object.defineProperty(B_,"__esModule",{value:!0});B_.deepGet=H9;function H9(e,t){return t.reduce((n,r)=>n?.[r],e)}});var QE=x(Is=>{"use strict";p();Object.defineProperty(Is,"__esModule",{value:!0});Is.first=z9;Is.last=W9;Is.findLast=G9;Is.findLastIndex=V_;Is.findLastAndIndex=J9;function z9(e){return e[0]}function W9(e,t=0){return e[e.length-1+t]}function G9(e,t){return e[V_(e,t)]}function V_(e,t){for(let n=e.length-1;n>=0;n--)if(t(e[n]))return n;return-1}function J9(e,t){let n=V_(e,t);return[e[n],n]}});var $_=x((p_e,XE)=>{p();var K9={}.toString;XE.exports=Array.isArray||function(e){return K9.call(e)=="[object Array]"}});var eA=x((g_e,ZE)=>{"use strict";p();var Y9=$_();ZE.exports=function(t){return t!=null&&typeof t=="object"&&Y9(t)===!1}});var U_=x((v_e,tA)=>{"use strict";p();var Q9=$_(),X9=eA(),__e=Array.prototype.slice;tA.exports=ho;function ho(e,t){if(!(this instanceof ho))return typeof t=="number"?new ho(e).fromIndex(t):new ho(e,t);this.str=e||"",this.lineToIndex=Z9(this.str),t=t||{},this.origin=typeof t.origin>"u"?1:t.origin}ho.prototype.fromIndex=function(e){if(e<0||e>=this.str.length||isNaN(e))return null;var t=e7(e,this.lineToIndex);return{line:t+this.origin,col:e-this.lineToIndex[t]+this.origin}};ho.prototype.toIndex=function(e,t){if(typeof t>"u")return Q9(e)&&e.length>=2?this.toIndex(e[0],e[1]):X9(e)&&"line"in e&&("col"in e||"column"in e)?this.toIndex(e.line,"col"in e?e.col:e.column):-1;if(isNaN(e)||isNaN(t))return-1;if(e-=this.origin,t-=this.origin,e>=0&&t>=0&&e<this.lineToIndex.length){var n=this.lineToIndex[e],r=e===this.lineToIndex.length-1?this.str.length:this.lineToIndex[e+1];if(t<r-n)return n+t}return-1};function Z9(e){for(var t=e.split(`
|
|
2
|
+
`),n=new Array(t.length),r=0,i=0,s=t.length;i<s;i++)n[i]=r,r+=t[i].length+1;return n}function e7(e,t){if(e>=t[t.length-1])return t.length-1;for(var n=0,r=t.length-2,i;n<r;)if(i=n+(r-n>>1),e<t[i])r=i-1;else if(e>=t[i+1])n=i+1;else{n=i;break}return n}});var nA=x(po=>{"use strict";p();var t7=po&&po.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(po,"__esModule",{value:!0});po.getPosition=r7;po.getOffset=i7;var n7=t7(U_());function r7(e,t){if(t<0)return{index:t,line:-1,character:-1};let n=Math.min(t,e.length),r=0,i=0;for(let s=e.indexOf(`
|
|
3
|
+
`);s!==-1&&s<n;s=e.indexOf(`
|
|
4
|
+
`,s+1))r++,i=s+1;return{index:t,line:r,character:n-i}}function i7(e,t,n){return(0,n7.default)(e,{origin:1}).toIndex(t,n)}});var id=x(rd=>{"use strict";p();Object.defineProperty(rd,"__esModule",{value:!0});rd.isError=a7;rd.asError=o7;var s7={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 a7(e){return e instanceof Error}function o7(e){return e instanceof Error?e:typeof e=="string"?new Error(e):e&&typeof e=="object"&&"error"in e?new Error(c7(e)):e&&typeof e.toString=="function"?new Error(e.toString()):new Error("An unknown error occurred")}function c7(e){return s7[e.error]||"Unknown parse error."}});var z_=x(H_=>{"use strict";p();Object.defineProperty(H_,"__esModule",{value:!0});H_.assertNever=u7;function u7(e){throw new Error(`We should never reach this code, you are missing a case for ${e}`)}});var G_=x(sd=>{"use strict";p();Object.defineProperty(sd,"__esModule",{value:!0});sd.memo=l7;sd.memoize=f7;var W_=Symbol("Unset");function l7(e){let t=W_,n=(...r)=>(t===W_&&(t=e(...r)),t);return n.clearCache=()=>{t=W_},n}function f7(e,t){let n={},r=(...i)=>{let s=t(...i);return n[s]||(n[s]=e(...i)),n[s]};return r.force=(...i)=>(r.invalidate(...i),r(...i)),r.invalidate=(...i)=>{let s=t(...i);delete n[s]},r.clearCache=()=>{n={}},r}});var K_=x(J_=>{"use strict";p();Object.defineProperty(J_,"__esModule",{value:!0});J_.indexBy=d7;function d7(e,t){let n={};for(let r of t)n[e(r)]=r;return n}});function Ms(e,t=!1){let n=e.length,r=0,i="",s=0,a=16,o=0,c=0,l=0,f=0,h=0;function d(w,y){let A=0,P=0;for(;A<w||!y;){let O=e.charCodeAt(r);if(O>=48&&O<=57)P=P*16+O-48;else if(O>=65&&O<=70)P=P*16+O-65+10;else if(O>=97&&O<=102)P=P*16+O-97+10;else break;r++,A++}return A<w&&(P=-1),P}function g(w){r=w,i="",s=0,a=16,h=0}function v(){let w=r;if(e.charCodeAt(r)===48)r++;else for(r++;r<e.length&&mo(e.charCodeAt(r));)r++;if(r<e.length&&e.charCodeAt(r)===46)if(r++,r<e.length&&mo(e.charCodeAt(r)))for(r++;r<e.length&&mo(e.charCodeAt(r));)r++;else return h=3,e.substring(w,r);let y=r;if(r<e.length&&(e.charCodeAt(r)===69||e.charCodeAt(r)===101))if(r++,(r<e.length&&e.charCodeAt(r)===43||e.charCodeAt(r)===45)&&r++,r<e.length&&mo(e.charCodeAt(r))){for(r++;r<e.length&&mo(e.charCodeAt(r));)r++;y=r}else h=3;return e.substring(w,y)}function b(){let w="",y=r;for(;;){if(r>=n){w+=e.substring(y,r),h=2;break}let A=e.charCodeAt(r);if(A===34){w+=e.substring(y,r),r++;break}if(A===92){if(w+=e.substring(y,r),r++,r>=n){h=2;break}switch(e.charCodeAt(r++)){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+=`
|
|
5
|
+
`;break;case 114:w+="\r";break;case 116:w+=" ";break;case 117:let O=d(4,!0);O>=0?w+=String.fromCharCode(O):h=4;break;default:h=5}y=r;continue}if(A>=0&&A<=31)if(lu(A)){w+=e.substring(y,r),h=2;break}else h=6;r++}return w}function _(){if(i="",h=0,s=r,c=o,f=l,r>=n)return s=n,a=17;let w=e.charCodeAt(r);if(Y_(w)){do r++,i+=String.fromCharCode(w),w=e.charCodeAt(r);while(Y_(w));return a=15}if(lu(w))return r++,i+=String.fromCharCode(w),w===13&&e.charCodeAt(r)===10&&(r++,i+=`
|
|
6
|
+
`),o++,l=r,a=14;switch(w){case 123:return r++,a=1;case 125:return r++,a=2;case 91:return r++,a=3;case 93:return r++,a=4;case 58:return r++,a=6;case 44:return r++,a=5;case 34:return r++,i=b(),a=10;case 47:let y=r-1;if(e.charCodeAt(r+1)===47){for(r+=2;r<n&&!lu(e.charCodeAt(r));)r++;return i=e.substring(y,r),a=12}if(e.charCodeAt(r+1)===42){r+=2;let A=n-1,P=!1;for(;r<A;){let O=e.charCodeAt(r);if(O===42&&e.charCodeAt(r+1)===47){r+=2,P=!0;break}r++,lu(O)&&(O===13&&e.charCodeAt(r)===10&&r++,o++,l=r)}return P||(r++,h=1),i=e.substring(y,r),a=13}return i+=String.fromCharCode(w),r++,a=16;case 45:if(i+=String.fromCharCode(w),r++,r===n||!mo(e.charCodeAt(r)))return a=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return i+=v(),a=11;default:for(;r<n&&k(w);)r++,w=e.charCodeAt(r);if(s!==r){switch(i=e.substring(s,r),i){case"true":return a=8;case"false":return a=9;case"null":return a=7}return a=16}return i+=String.fromCharCode(w),r++,a=16}}function k(w){if(Y_(w)||lu(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 T(){let w;do w=_();while(w>=12&&w<=15);return w}return{setPosition:g,getPosition:()=>r,scan:t?T:_,getToken:()=>a,getTokenValue:()=>i,getTokenOffset:()=>s,getTokenLength:()=>r-s,getTokenStartLine:()=>c,getTokenStartCharacter:()=>s-f,getTokenError:()=>h}}function Y_(e){return e===32||e===9}function lu(e){return e===10||e===13}function mo(e){return e>=48&&e<=57}var rA,ad=Pe(()=>{"use strict";p();(function(e){e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.space=32]="space",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.asterisk=42]="asterisk",e[e.backslash=92]="backslash",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.plus=43]="plus",e[e.slash=47]="slash",e[e.formFeed=12]="formFeed",e[e.tab=9]="tab"})(rA||(rA={}))});var _n,go,Q_,iA,sA=Pe(()=>{p();_n=new Array(20).fill(0).map((e,t)=>" ".repeat(t)),go=200,Q_={" ":{"\n":new Array(go).fill(0).map((e,t)=>`
|
|
7
|
+
`+" ".repeat(t)),"\r":new Array(go).fill(0).map((e,t)=>"\r"+" ".repeat(t)),"\r\n":new Array(go).fill(0).map((e,t)=>`\r
|
|
8
|
+
`+" ".repeat(t))}," ":{"\n":new Array(go).fill(0).map((e,t)=>`
|
|
9
|
+
`+" ".repeat(t)),"\r":new Array(go).fill(0).map((e,t)=>"\r"+" ".repeat(t)),"\r\n":new Array(go).fill(0).map((e,t)=>`\r
|
|
10
|
+
`+" ".repeat(t))}},iA=[`
|
|
11
|
+
`,"\r",`\r
|
|
12
|
+
`]});function od(e,t,n){let r,i,s,a,o;if(t){for(a=t.offset,o=a+t.length,s=a;s>0&&!fu(e,s-1);)s--;let A=o;for(;A<e.length&&!fu(e,A);)A++;i=e.substring(s,A),r=p7(i,n)}else i=e,r=0,s=0,a=0,o=e.length;let c=m7(n,e),l=iA.includes(c),f=0,h=0,d;n.insertSpaces?d=_n[n.tabSize||4]??yo(_n[1],n.tabSize||4):d=" ";let g=d===" "?" ":" ",v=Ms(i,!1),b=!1;function _(){if(f>1)return yo(c,f)+yo(d,r+h);let A=d.length*(r+h);return!l||A>Q_[g][c].length?c+yo(d,r+h):A<=0?c:Q_[g][c][A]}function k(){let A=v.scan();for(f=0;A===15||A===14;)A===14&&n.keepLines?f+=1:A===14&&(f=1),A=v.scan();return b=A===16||v.getTokenError()!==0,A}let T=[];function w(A,P,O){!b&&(!t||P<o&&O>a)&&e.substring(P,O)!==A&&T.push({offset:P,length:O-P,content:A})}let y=k();if(n.keepLines&&f>0&&w(yo(c,f),0,0),y!==17){let A=v.getTokenOffset()+s,P=d.length*r<20&&n.insertSpaces?_n[d.length*r]:yo(d,r);w(P,s,A)}for(;y!==17;){let A=v.getTokenOffset()+v.getTokenLength()+s,P=k(),O="",L=!1;for(;f===0&&(P===12||P===13);){let M=v.getTokenOffset()+s;w(_n[1],A,M),A=v.getTokenOffset()+v.getTokenLength()+s,L=P===12,O=L?_():"",P=k()}if(P===2)y!==1&&h--,n.keepLines&&f>0||!n.keepLines&&y!==1?O=_():n.keepLines&&(O=_n[1]);else if(P===4)y!==3&&h--,n.keepLines&&f>0||!n.keepLines&&y!==3?O=_():n.keepLines&&(O=_n[1]);else{switch(y){case 3:case 1:h++,n.keepLines&&f>0||!n.keepLines?O=_():O=_n[1];break;case 5:n.keepLines&&f>0||!n.keepLines?O=_():O=_n[1];break;case 12:O=_();break;case 13:f>0?O=_():L||(O=_n[1]);break;case 6:n.keepLines&&f>0?O=_():L||(O=_n[1]);break;case 10:n.keepLines&&f>0?O=_():P===6&&!L&&(O="");break;case 7:case 8:case 9:case 11:case 2:case 4:n.keepLines&&f>0?O=_():(P===12||P===13)&&!L?O=_n[1]:P!==5&&P!==17&&(b=!0);break;case 16:b=!0;break}f>0&&(P===12||P===13)&&(O=_())}P===17&&(n.keepLines&&f>0?O=_():O=n.insertFinalNewline?c:"");let D=v.getTokenOffset()+s;w(O,A,D),y=P}return T}function yo(e,t){let n="";for(let r=0;r<t;r++)n+=e;return n}function p7(e,t){let n=0,r=0,i=t.tabSize||4;for(;n<e.length;){let s=e.charAt(n);if(s===_n[1])r++;else if(s===" ")r+=i;else break;n++}return Math.floor(r/i)}function m7(e,t){for(let n=0;n<t.length;n++){let r=t.charAt(n);if(r==="\r")return n+1<t.length&&t.charAt(n+1)===`
|
|
13
|
+
`?`\r
|
|
14
|
+
`:"\r";if(r===`
|
|
15
|
+
`)return`
|
|
16
|
+
`}return e&&e.eol||`
|
|
17
|
+
`}function fu(e,t){return`\r
|
|
18
|
+
`.indexOf(e.charAt(t))!==-1}var X_=Pe(()=>{"use strict";p();ad();sA()});function aA(e,t){let n=[],r=new Object,i,s={value:{},offset:0,length:0,type:"object",parent:void 0},a=!1;function o(c,l,f,h){s.value=c,s.offset=l,s.length=f,s.type=h,s.colonOffset=void 0,i=s}try{pu(e,{onObjectBegin:(c,l)=>{if(t<=c)throw r;i=void 0,a=t>c,n.push("")},onObjectProperty:(c,l,f)=>{if(t<l||(o(c,l,f,"property"),n[n.length-1]=c,t<=l+f))throw r},onObjectEnd:(c,l)=>{if(t<=c)throw r;i=void 0,n.pop()},onArrayBegin:(c,l)=>{if(t<=c)throw r;i=void 0,n.push(0)},onArrayEnd:(c,l)=>{if(t<=c)throw r;i=void 0,n.pop()},onLiteralValue:(c,l,f)=>{if(t<l||(o(c,l,f,uA(c)),t<=l+f))throw r},onSeparator:(c,l,f)=>{if(t<=l)throw r;if(c===":"&&i&&i.type==="property")i.colonOffset=l,a=!1,i=void 0;else if(c===","){let h=n[n.length-1];typeof h=="number"?n[n.length-1]=h+1:(a=!0,n[n.length-1]=""),i=void 0}}})}catch(c){if(c!==r)throw c}return{path:n,previousNode:i,isAtPropertyKey:a,matches:c=>{let l=0;for(let f=0;l<c.length&&f<n.length;f++)if(c[l]===n[f]||c[l]==="*")l++;else if(c[l]!=="**")return!1;return l===c.length}}}function oA(e,t=[],n=du.DEFAULT){let r=null,i=[],s=[];function a(c){Array.isArray(i)?i.push(c):r!==null&&(i[r]=c)}return pu(e,{onObjectBegin:()=>{let c={};a(c),s.push(i),i=c,r=null},onObjectProperty:c=>{r=c},onObjectEnd:()=>{i=s.pop()},onArrayBegin:()=>{let c=[];a(c),s.push(i),i=c,r=null},onArrayEnd:()=>{i=s.pop()},onLiteralValue:a,onError:(c,l,f)=>{t.push({error:c,offset:l,length:f})}},n),i[0]}function ud(e,t=[],n=du.DEFAULT){let r={type:"array",offset:-1,length:-1,children:[],parent:void 0};function i(c){r.type==="property"&&(r.length=c-r.offset,r=r.parent)}function s(c){return r.children.push(c),c}pu(e,{onObjectBegin:c=>{r=s({type:"object",offset:c,length:-1,parent:r,children:[]})},onObjectProperty:(c,l,f)=>{r=s({type:"property",offset:l,length:-1,parent:r,children:[]}),r.children.push({type:"string",value:c,offset:l,length:f,parent:r})},onObjectEnd:(c,l)=>{i(c+l),r.length=c+l-r.offset,r=r.parent,i(c+l)},onArrayBegin:(c,l)=>{r=s({type:"array",offset:c,length:-1,parent:r,children:[]})},onArrayEnd:(c,l)=>{r.length=c+l-r.offset,r=r.parent,i(c+l)},onLiteralValue:(c,l,f)=>{s({type:uA(c),offset:l,length:f,parent:r,value:c}),i(l+f)},onSeparator:(c,l,f)=>{r.type==="property"&&(c===":"?r.colonOffset=l:c===","&&i(l))},onError:(c,l,f)=>{t.push({error:c,offset:l,length:f})}},n);let o=r.children[0];return o&&delete o.parent,o}function hu(e,t){if(!e)return;let n=e;for(let r of t)if(typeof r=="string"){if(n.type!=="object"||!Array.isArray(n.children))return;let i=!1;for(let s of n.children)if(Array.isArray(s.children)&&s.children[0].value===r&&s.children.length===2){n=s.children[1],i=!0;break}if(!i)return}else{let i=r;if(n.type!=="array"||i<0||!Array.isArray(n.children)||i>=n.children.length)return;n=n.children[i]}return n}function Z_(e){if(!e.parent||!e.parent.children)return[];let t=Z_(e.parent);if(e.parent.type==="property"){let n=e.parent.children[0].value;t.push(n)}else if(e.parent.type==="array"){let n=e.parent.children.indexOf(e);n!==-1&&t.push(n)}return t}function cd(e){switch(e.type){case"array":return e.children.map(cd);case"object":let t=Object.create(null);for(let n of e.children){let r=n.children[1];r&&(t[n.children[0].value]=cd(r))}return t;case"null":case"string":case"number":case"boolean":return e.value;default:return}}function y7(e,t,n=!1){return t>=e.offset&&t<e.offset+e.length||n&&t===e.offset+e.length}function ev(e,t,n=!1){if(y7(e,t,n)){let r=e.children;if(Array.isArray(r))for(let i=0;i<r.length&&r[i].offset<=t;i++){let s=ev(r[i],t,n);if(s)return s}return e}}function pu(e,t,n=du.DEFAULT){let r=Ms(e,!1),i=[],s=0;function a($){return $?()=>s===0&&$(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function o($){return $?I=>s===0&&$(I,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function c($){return $?I=>s===0&&$(I,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>i.slice()):()=>!0}function l($){return $?()=>{s>0?s++:$(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>i.slice())===!1&&(s=1)}:()=>!0}function f($){return $?()=>{s>0&&s--,s===0&&$(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter())}:()=>!0}let h=l(t.onObjectBegin),d=c(t.onObjectProperty),g=f(t.onObjectEnd),v=l(t.onArrayBegin),b=f(t.onArrayEnd),_=c(t.onLiteralValue),k=o(t.onSeparator),T=a(t.onComment),w=o(t.onError),y=n&&n.disallowComments,A=n&&n.allowTrailingComma;function P(){for(;;){let $=r.scan();switch(r.getTokenError()){case 4:O(14);break;case 5:O(15);break;case 3:O(13);break;case 1:y||O(11);break;case 2:O(12);break;case 6:O(16);break}switch($){case 12:case 13:y?O(10):T();break;case 16:O(1);break;case 15:case 14:break;default:return $}}}function O($,I=[],B=[]){if(w($),I.length+B.length>0){let U=r.getToken();for(;U!==17;){if(I.indexOf(U)!==-1){P();break}else if(B.indexOf(U)!==-1)break;U=P()}}}function L($){let I=r.getTokenValue();return $?_(I):(d(I),i.push(I)),P(),!0}function D(){switch(r.getToken()){case 11:let $=r.getTokenValue(),I=Number($);isNaN(I)&&(O(2),I=0),_(I);break;case 7:_(null);break;case 8:_(!0);break;case 9:_(!1);break;default:return!1}return P(),!0}function M(){return r.getToken()!==10?(O(3,[],[2,5]),!1):(L(!1),r.getToken()===6?(k(":"),P(),V()||O(4,[],[2,5])):O(5,[],[2,5]),i.pop(),!0)}function C(){h(),P();let $=!1;for(;r.getToken()!==2&&r.getToken()!==17;){if(r.getToken()===5){if($||O(4,[],[]),k(","),P(),r.getToken()===2&&A)break}else $&&O(6,[],[]);M()||O(4,[],[2,5]),$=!0}return g(),r.getToken()!==2?O(7,[2],[]):P(),!0}function q(){v(),P();let $=!0,I=!1;for(;r.getToken()!==4&&r.getToken()!==17;){if(r.getToken()===5){if(I||O(4,[],[]),k(","),P(),r.getToken()===4&&A)break}else I&&O(6,[],[]);$?(i.push(0),$=!1):i[i.length-1]++,V()||O(4,[],[4,5]),I=!0}return b(),$||i.pop(),r.getToken()!==4?O(8,[4],[]):P(),!0}function V(){switch(r.getToken()){case 3:return q();case 1:return C();case 10:return L(!0);default:return D()}}return P(),r.getToken()===17?n.allowEmptyContent?!0:(O(4,[],[]),!1):V()?(r.getToken()!==17&&O(9,[],[]),!0):(O(4,[],[]),!1)}function cA(e,t){let n=Ms(e),r=[],i,s=0,a;do switch(a=n.getPosition(),i=n.scan(),i){case 12:case 13:case 17:s!==a&&r.push(e.substring(s,a)),t!==void 0&&r.push(n.getTokenValue().replace(/[^\r\n]/g,t)),s=n.getPosition();break}while(i!==17);return r.join("")}function uA(e){switch(typeof e){case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"object":{if(e){if(Array.isArray(e))return"array"}else return"null";return"object"}default:return"null"}}var du,tv=Pe(()=>{"use strict";p();ad();(function(e){e.DEFAULT={allowTrailingComma:!1}})(du||(du={}))});function lA(e,t,n,r){let i=t.slice(),a=ud(e,[]),o,c;for(;i.length>0&&(c=i.pop(),o=hu(a,i),o===void 0&&n!==void 0);)typeof c=="string"?n={[c]:n}:n=[n];if(o)if(o.type==="object"&&typeof c=="string"&&Array.isArray(o.children)){let l=hu(o,[c]);if(l!==void 0)if(n===void 0){if(!l.parent)throw new Error("Malformed AST");let f=o.children.indexOf(l.parent),h,d=l.parent.offset+l.parent.length;if(f>0){let g=o.children[f-1];h=g.offset+g.length}else h=o.offset+1,o.children.length>1&&(d=o.children[1].offset);return Rs(e,{offset:h,length:d-h,content:""},r)}else return Rs(e,{offset:l.offset,length:l.length,content:JSON.stringify(n)},r);else{if(n===void 0)return[];let f=`${JSON.stringify(c)}: ${JSON.stringify(n)}`,h=r.getInsertionIndex?r.getInsertionIndex(o.children.map(g=>g.children[0].value)):o.children.length,d;if(h>0){let g=o.children[h-1];d={offset:g.offset+g.length,length:0,content:","+f}}else o.children.length===0?d={offset:o.offset+1,length:0,content:f}:d={offset:o.offset+1,length:0,content:f+","};return Rs(e,d,r)}}else if(o.type==="array"&&typeof c=="number"&&Array.isArray(o.children)){let l=c;if(l===-1){let f=`${JSON.stringify(n)}`,h;if(o.children.length===0)h={offset:o.offset+1,length:0,content:f};else{let d=o.children[o.children.length-1];h={offset:d.offset+d.length,length:0,content:","+f}}return Rs(e,h,r)}else if(n===void 0&&o.children.length>=0){let f=c,h=o.children[f],d;if(o.children.length===1)d={offset:o.offset+1,length:o.length-2,content:""};else if(o.children.length-1===f){let g=o.children[f-1],v=g.offset+g.length,b=o.offset+o.length;d={offset:v,length:b-2-v,content:""}}else d={offset:h.offset,length:o.children[f+1].offset-h.offset,content:""};return Rs(e,d,r)}else if(n!==void 0){let f,h=`${JSON.stringify(n)}`;if(!r.isArrayInsertion&&o.children.length>c){let d=o.children[c];f={offset:d.offset,length:d.length,content:h}}else if(o.children.length===0||c===0)f={offset:o.offset+1,length:0,content:o.children.length===0?h:h+","};else{let d=c>o.children.length?o.children.length:c,g=o.children[d-1];f={offset:g.offset+g.length,length:0,content:","+h}}return Rs(e,f,r)}else throw new Error(`Can not ${n===void 0?"remove":r.isArrayInsertion?"insert":"modify"} Array index ${l} as length is not sufficient`)}else throw new Error(`Can not add ${typeof c!="number"?"index":"property"} to parent of type ${o.type}`);else{if(n===void 0)throw new Error("Can not delete in empty document");return Rs(e,{offset:a?a.offset:0,length:a?a.length:0,content:JSON.stringify(n)},r)}}function Rs(e,t,n){if(!n.formattingOptions)return[t];let r=ld(e,t),i=t.offset,s=t.offset+t.content.length;if(t.length===0||t.content.length===0){for(;i>0&&!fu(r,i-1);)i--;for(;s<r.length&&!fu(r,s);)s++}let a=od(r,{offset:i,length:s-i},{...n.formattingOptions,keepLines:!1});for(let c=a.length-1;c>=0;c--){let l=a[c];r=ld(r,l),i=Math.min(i,l.offset),s=Math.max(s,l.offset+l.length),s+=l.content.length-l.length}let o=e.length-(r.length-s)-i;return[{offset:i,length:o,content:r.substring(i,s)}]}function ld(e,t){return e.substring(0,t.offset)+t.content+e.substring(t.offset+t.length)}var fA=Pe(()=>{"use strict";p();X_();tv()});var _o={};D_(_o,{ParseErrorCode:()=>iv,ScanError:()=>nv,SyntaxKind:()=>rv,applyEdits:()=>A7,createScanner:()=>vn,findNodeAtLocation:()=>S7,findNodeAtOffset:()=>av,format:()=>uv,getLocation:()=>b7,getNodePath:()=>ov,getNodeValue:()=>cv,modify:()=>E7,parse:()=>sv,parseTree:()=>k7,printParseErrorCode:()=>x7,stripComments:()=>w7,visit:()=>T7});function x7(e){switch(e){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 uv(e,t,n){return od(e,t,n)}function E7(e,t,n,r){return lA(e,t,n,r)}function A7(e,t){let n=t.slice(0).sort((i,s)=>{let a=i.offset-s.offset;return a===0?i.length-s.length:a}),r=e.length;for(let i=n.length-1;i>=0;i--){let s=n[i];if(s.offset+s.length<=r)e=ld(e,s);else throw new Error("Overlapping edit");r=s.offset}return e}var vn,nv,rv,b7,sv,k7,S7,av,ov,cv,T7,w7,iv,wr=Pe(()=>{"use strict";p();X_();fA();ad();tv();vn=Ms;(function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter"})(nv||(nv={}));(function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF"})(rv||(rv={}));b7=aA,sv=oA,k7=ud,S7=hu,av=ev,ov=Z_,cv=cd,T7=pu,w7=cA;(function(e){e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",e[e.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=12]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",e[e.InvalidUnicode=14]="InvalidUnicode",e[e.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",e[e.InvalidCharacter=16]="InvalidCharacter"})(iv||(iv={}))});var Be=x(vo=>{"use strict";p();Object.defineProperty(vo,"__esModule",{value:!0});vo.parseJSON=C7;vo.nodeAtPath=L7;vo.getLocStart=q7;vo.getLocEnd=I7;var O7=(wr(),j_(_o)),P7=Ne(),N7={disallowComments:!1,allowTrailingComma:!0,allowEmptyContent:!1};function C7(e,t,n){try{let r=[],i=(0,O7.parse)(e,r,N7);if(r.length&&n)throw r[0];return i}catch(r){return t!==void 0?t:(0,P7.asError)(r)}}function L7(e,t){return t.reduce((n,r)=>{if(n)switch(n.type){case"Object":{let i=n.children.find(s=>s.key.value===r);return i?i.value:void 0}case"Array":return n.children[r];case"Literal":return;case"Identifier":return;case"Property":return}},e)}function q7(e){return e.loc?.start.offset??0}function I7(e){return e.loc?.end.offset??0}});var hA=x((Ds,dA)=>{p();var mu=JE(),M7=mu.default||mu,fd=function(e,t){return/^\/\//.test(e)&&(e="https:"+e),M7.call(this,e,t)};fd.ponyfill=!0;dA.exports=Ds=fd;Ds.fetch=fd;Ds.Headers=mu.Headers;Ds.Request=mu.Request;Ds.Response=mu.Response;Ds.default=fd});var yu=x((gu,lv)=>{p();(function(e,t){if(typeof gu=="object"&&typeof lv=="object")lv.exports=t();else if(typeof define=="function"&&define.amd)define([],t);else{var n=t();for(var r in n)(typeof gu=="object"?gu:e)[r]=n[r]}})(gu,(()=>(()=>{"use strict";var e={975:i=>{function s(c){if(typeof c!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(c))}function a(c,l){for(var f,h="",d=0,g=-1,v=0,b=0;b<=c.length;++b){if(b<c.length)f=c.charCodeAt(b);else{if(f===47)break;f=47}if(f===47){if(!(g===b-1||v===1))if(g!==b-1&&v===2){if(h.length<2||d!==2||h.charCodeAt(h.length-1)!==46||h.charCodeAt(h.length-2)!==46){if(h.length>2){var _=h.lastIndexOf("/");if(_!==h.length-1){_===-1?(h="",d=0):d=(h=h.slice(0,_)).length-1-h.lastIndexOf("/"),g=b,v=0;continue}}else if(h.length===2||h.length===1){h="",d=0,g=b,v=0;continue}}l&&(h.length>0?h+="/..":h="..",d=2)}else h.length>0?h+="/"+c.slice(g+1,b):h=c.slice(g+1,b),d=b-g-1;g=b,v=0}else f===46&&v!==-1?++v:v=-1}return h}var o={resolve:function(){for(var c,l="",f=!1,h=arguments.length-1;h>=-1&&!f;h--){var d;h>=0?d=arguments[h]:(c===void 0&&(c=process.cwd()),d=c),s(d),d.length!==0&&(l=d+"/"+l,f=d.charCodeAt(0)===47)}return l=a(l,!f),f?l.length>0?"/"+l:"/":l.length>0?l:"."},normalize:function(c){if(s(c),c.length===0)return".";var l=c.charCodeAt(0)===47,f=c.charCodeAt(c.length-1)===47;return(c=a(c,!l)).length!==0||l||(c="."),c.length>0&&f&&(c+="/"),l?"/"+c:c},isAbsolute:function(c){return s(c),c.length>0&&c.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var c,l=0;l<arguments.length;++l){var f=arguments[l];s(f),f.length>0&&(c===void 0?c=f:c+="/"+f)}return c===void 0?".":o.normalize(c)},relative:function(c,l){if(s(c),s(l),c===l||(c=o.resolve(c))===(l=o.resolve(l)))return"";for(var f=1;f<c.length&&c.charCodeAt(f)===47;++f);for(var h=c.length,d=h-f,g=1;g<l.length&&l.charCodeAt(g)===47;++g);for(var v=l.length-g,b=d<v?d:v,_=-1,k=0;k<=b;++k){if(k===b){if(v>b){if(l.charCodeAt(g+k)===47)return l.slice(g+k+1);if(k===0)return l.slice(g+k)}else d>b&&(c.charCodeAt(f+k)===47?_=k:k===0&&(_=0));break}var T=c.charCodeAt(f+k);if(T!==l.charCodeAt(g+k))break;T===47&&(_=k)}var w="";for(k=f+_+1;k<=h;++k)k!==h&&c.charCodeAt(k)!==47||(w.length===0?w+="..":w+="/..");return w.length>0?w+l.slice(g+_):(g+=_,l.charCodeAt(g)===47&&++g,l.slice(g))},_makeLong:function(c){return c},dirname:function(c){if(s(c),c.length===0)return".";for(var l=c.charCodeAt(0),f=l===47,h=-1,d=!0,g=c.length-1;g>=1;--g)if((l=c.charCodeAt(g))===47){if(!d){h=g;break}}else d=!1;return h===-1?f?"/":".":f&&h===1?"//":c.slice(0,h)},basename:function(c,l){if(l!==void 0&&typeof l!="string")throw new TypeError('"ext" argument must be a string');s(c);var f,h=0,d=-1,g=!0;if(l!==void 0&&l.length>0&&l.length<=c.length){if(l.length===c.length&&l===c)return"";var v=l.length-1,b=-1;for(f=c.length-1;f>=0;--f){var _=c.charCodeAt(f);if(_===47){if(!g){h=f+1;break}}else b===-1&&(g=!1,b=f+1),v>=0&&(_===l.charCodeAt(v)?--v==-1&&(d=f):(v=-1,d=b))}return h===d?d=b:d===-1&&(d=c.length),c.slice(h,d)}for(f=c.length-1;f>=0;--f)if(c.charCodeAt(f)===47){if(!g){h=f+1;break}}else d===-1&&(g=!1,d=f+1);return d===-1?"":c.slice(h,d)},extname:function(c){s(c);for(var l=-1,f=0,h=-1,d=!0,g=0,v=c.length-1;v>=0;--v){var b=c.charCodeAt(v);if(b!==47)h===-1&&(d=!1,h=v+1),b===46?l===-1?l=v:g!==1&&(g=1):l!==-1&&(g=-1);else if(!d){f=v+1;break}}return l===-1||h===-1||g===0||g===1&&l===h-1&&l===f+1?"":c.slice(l,h)},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(l,f){var h=f.dir||f.root,d=f.base||(f.name||"")+(f.ext||"");return h?h===f.root?h+d:h+"/"+d:d})(0,c)},parse:function(c){s(c);var l={root:"",dir:"",base:"",ext:"",name:""};if(c.length===0)return l;var f,h=c.charCodeAt(0),d=h===47;d?(l.root="/",f=1):f=0;for(var g=-1,v=0,b=-1,_=!0,k=c.length-1,T=0;k>=f;--k)if((h=c.charCodeAt(k))!==47)b===-1&&(_=!1,b=k+1),h===46?g===-1?g=k:T!==1&&(T=1):g!==-1&&(T=-1);else if(!_){v=k+1;break}return g===-1||b===-1||T===0||T===1&&g===b-1&&g===v+1?b!==-1&&(l.base=l.name=v===0&&d?c.slice(1,b):c.slice(v,b)):(v===0&&d?(l.name=c.slice(1,g),l.base=c.slice(1,b)):(l.name=c.slice(v,g),l.base=c.slice(v,b)),l.ext=c.slice(g,b)),v>0?l.dir=c.slice(0,v-1):d&&(l.dir="/"),l},sep:"/",delimiter:":",win32:null,posix:null};o.posix=o,i.exports=o},70:(i,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:(i,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.uriToFsPath=s.URI=void 0;let o=a(70),c=/^\w[\w\d+.-]*$/,l=/^\//,f=/^\/\//;function h(M,C){if(!M.scheme&&C)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${M.authority}", path: "${M.path}", query: "${M.query}", fragment: "${M.fragment}"}`);if(M.scheme&&!c.test(M.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(M.path){if(M.authority){if(!l.test(M.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(M.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}let d="",g="/",v=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class b{static isUri(C){return C instanceof b||!!C&&typeof C.authority=="string"&&typeof C.fragment=="string"&&typeof C.path=="string"&&typeof C.query=="string"&&typeof C.scheme=="string"&&typeof C.fsPath=="string"&&typeof C.with=="function"&&typeof C.toString=="function"}scheme;authority;path;query;fragment;constructor(C,q,V,$,I,B=!1){typeof C=="object"?(this.scheme=C.scheme||d,this.authority=C.authority||d,this.path=C.path||d,this.query=C.query||d,this.fragment=C.fragment||d):(this.scheme=(function(U,K){return U||K?U:"file"})(C,B),this.authority=q||d,this.path=(function(U,K){switch(U){case"https":case"http":case"file":K?K[0]!==g&&(K=g+K):K=g}return K})(this.scheme,V||d),this.query=$||d,this.fragment=I||d,h(this,B))}get fsPath(){return A(this,!1)}with(C){if(!C)return this;let{scheme:q,authority:V,path:$,query:I,fragment:B}=C;return q===void 0?q=this.scheme:q===null&&(q=d),V===void 0?V=this.authority:V===null&&(V=d),$===void 0?$=this.path:$===null&&($=d),I===void 0?I=this.query:I===null&&(I=d),B===void 0?B=this.fragment:B===null&&(B=d),q===this.scheme&&V===this.authority&&$===this.path&&I===this.query&&B===this.fragment?this:new k(q,V,$,I,B)}static parse(C,q=!1){let V=v.exec(C);return V?new k(V[2]||d,D(V[4]||d),D(V[5]||d),D(V[7]||d),D(V[9]||d),q):new k(d,d,d,d,d)}static file(C){let q=d;if(o.isWindows&&(C=C.replace(/\\/g,g)),C[0]===g&&C[1]===g){let V=C.indexOf(g,2);V===-1?(q=C.substring(2),C=g):(q=C.substring(2,V),C=C.substring(V)||g)}return new k("file",q,C,d,d)}static from(C){let q=new k(C.scheme,C.authority,C.path,C.query,C.fragment);return h(q,!0),q}toString(C=!1){return P(this,C)}toJSON(){return this}static revive(C){if(C){if(C instanceof b)return C;{let q=new k(C);return q._formatted=C.external,q._fsPath=C._sep===_?C.fsPath:null,q}}return C}}s.URI=b;let _=o.isWindows?1:void 0;class k extends b{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=A(this,!1)),this._fsPath}toString(C=!1){return C?P(this,!0):(this._formatted||(this._formatted=P(this,!1)),this._formatted)}toJSON(){let C={$mid:1};return this._fsPath&&(C.fsPath=this._fsPath,C._sep=_),this._formatted&&(C.external=this._formatted),this.path&&(C.path=this.path),this.scheme&&(C.scheme=this.scheme),this.authority&&(C.authority=this.authority),this.query&&(C.query=this.query),this.fragment&&(C.fragment=this.fragment),C}}let T={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(M,C,q){let V,$=-1;for(let I=0;I<M.length;I++){let B=M.charCodeAt(I);if(B>=97&&B<=122||B>=65&&B<=90||B>=48&&B<=57||B===45||B===46||B===95||B===126||C&&B===47||q&&B===91||q&&B===93||q&&B===58)$!==-1&&(V+=encodeURIComponent(M.substring($,I)),$=-1),V!==void 0&&(V+=M.charAt(I));else{V===void 0&&(V=M.substr(0,I));let U=T[B];U!==void 0?($!==-1&&(V+=encodeURIComponent(M.substring($,I)),$=-1),V+=U):$===-1&&($=I)}}return $!==-1&&(V+=encodeURIComponent(M.substring($))),V!==void 0?V:M}function y(M){let C;for(let q=0;q<M.length;q++){let V=M.charCodeAt(q);V===35||V===63?(C===void 0&&(C=M.substr(0,q)),C+=T[V]):C!==void 0&&(C+=M[q])}return C!==void 0?C:M}function A(M,C){let q;return q=M.authority&&M.path.length>1&&M.scheme==="file"?`//${M.authority}${M.path}`:M.path.charCodeAt(0)===47&&(M.path.charCodeAt(1)>=65&&M.path.charCodeAt(1)<=90||M.path.charCodeAt(1)>=97&&M.path.charCodeAt(1)<=122)&&M.path.charCodeAt(2)===58?C?M.path.substr(1):M.path[1].toLowerCase()+M.path.substr(2):M.path,o.isWindows&&(q=q.replace(/\//g,"\\")),q}function P(M,C){let q=C?y:w,V="",{scheme:$,authority:I,path:B,query:U,fragment:K}=M;if($&&(V+=$,V+=":"),(I||$==="file")&&(V+=g,V+=g),I){let Q=I.indexOf("@");if(Q!==-1){let Y=I.substr(0,Q);I=I.substr(Q+1),Q=Y.lastIndexOf(":"),Q===-1?V+=q(Y,!1,!1):(V+=q(Y.substr(0,Q),!1,!1),V+=":",V+=q(Y.substr(Q+1),!1,!0)),V+="@"}I=I.toLowerCase(),Q=I.lastIndexOf(":"),Q===-1?V+=q(I,!1,!0):(V+=q(I.substr(0,Q),!1,!0),V+=I.substr(Q))}if(B){if(B.length>=3&&B.charCodeAt(0)===47&&B.charCodeAt(2)===58){let Q=B.charCodeAt(1);Q>=65&&Q<=90&&(B=`/${String.fromCharCode(Q+32)}:${B.substr(3)}`)}else if(B.length>=2&&B.charCodeAt(1)===58){let Q=B.charCodeAt(0);Q>=65&&Q<=90&&(B=`${String.fromCharCode(Q+32)}:${B.substr(2)}`)}V+=q(B,!0,!1)}return U&&(V+="?",V+=q(U,!1,!1)),K&&(V+="#",V+=C?K:w(K,!1,!1)),V}function O(M){try{return decodeURIComponent(M)}catch{return M.length>3?M.substr(0,3)+O(M.substr(3)):M}}s.uriToFsPath=A;let L=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function D(M){return M.match(L)?M.replace(L,(C=>O(C))):M}},552:function(i,s,a){var o=this&&this.__createBinding||(Object.create?function(v,b,_,k){k===void 0&&(k=_);var T=Object.getOwnPropertyDescriptor(b,_);T&&!("get"in T?!b.__esModule:T.writable||T.configurable)||(T={enumerable:!0,get:function(){return b[_]}}),Object.defineProperty(v,k,T)}:function(v,b,_,k){k===void 0&&(k=_),v[k]=b[_]}),c=this&&this.__setModuleDefault||(Object.create?function(v,b){Object.defineProperty(v,"default",{enumerable:!0,value:b})}:function(v,b){v.default=b}),l=this&&this.__importStar||function(v){if(v&&v.__esModule)return v;var b={};if(v!=null)for(var _ in v)_!=="default"&&Object.prototype.hasOwnProperty.call(v,_)&&o(b,v,_);return c(b,v),b};Object.defineProperty(s,"__esModule",{value:!0}),s.Utils=void 0;let f=l(a(975)),h=f.posix||f,d="/";var g;(function(v){v.joinPath=function(b,..._){return b.with({path:h.join(b.path,..._)})},v.resolvePath=function(b,..._){let k=b.path,T=!1;k[0]!==d&&(k=d+k,T=!0);let w=h.resolve(k,..._);return T&&w[0]===d&&!b.authority&&(w=w.substring(1)),b.with({path:w})},v.dirname=function(b){if(b.path.length===0||b.path===d)return b;let _=h.dirname(b.path);return _.length===1&&_.charCodeAt(0)===46&&(_=""),b.with({path:_})},v.basename=function(b){return h.basename(b.path)},v.extname=function(b){return h.extname(b.path)}})(g||(s.Utils=g={}))}},t={};function n(i){var s=t[i];if(s!==void 0)return s.exports;var a=t[i]={exports:{}};return e[i].call(a.exports,a,a.exports,n),a.exports}var r={};return(()=>{var i=r;Object.defineProperty(i,"__esModule",{value:!0}),i.Utils=i.URI=void 0;let s=n(231);Object.defineProperty(i,"URI",{enumerable:!0,get:function(){return s.URI}});let a=n(552);Object.defineProperty(i,"Utils",{enumerable:!0,get:function(){return a.Utils}})})(),r})()))});var Fn=x(sn=>{"use strict";p();Object.defineProperty(sn,"__esModule",{value:!0});sn.Utils=sn.URI=void 0;sn.relative=R7;sn.join=D7;sn.resolve=j7;sn.normalize=_u;sn.dirname=B7;sn.basename=F7;sn.fsPath=V7;sn.fileSystemPath=$7;var xr=yu();Object.defineProperty(sn,"URI",{enumerable:!0,get:function(){return xr.URI}});Object.defineProperty(sn,"Utils",{enumerable:!0,get:function(){return xr.Utils}});function R7(e,t){return _u(e).replace(t,"").replace(/\\\\/g,"/").replace(/^\/+/,"")}function D7(e,...t){return _u(xr.Utils.joinPath(js(e),...t))}function j7(e,t){return _u(xr.Utils.resolvePath(js(e),t))}function _u(e){return js(e).toString(!0).replace(/\\/g,"/")}function B7(e){return _u(xr.Utils.dirname(js(e)))}function F7(e,t){let n=xr.Utils.basename(js(e));return t?n.replace(new RegExp(`${t.replace(/\./g,"\\.")}$`),""):n}function V7(e){return js(e).fsPath}function $7(e){let t=js(e).path.replace(/\\/g,"/");return xr.Utils.joinPath(xr.URI.file("/"),t).path}function js(e){return xr.URI.isUri(e)?e:xr.URI.parse(e)}});var pv=x(hd=>{"use strict";p();Object.defineProperty(hd,"__esModule",{value:!0});hd.toRemoteAssetUrl=U7;hd.isPublicIpAddress=dd;function U7(e){let t;try{t=new URL(e.startsWith("//")?`https:${e}`:e)}catch{return}if(!(t.protocol!=="http:"&&t.protocol!=="https:")&&!(t.username!==""||t.password!=="")&&H7(t.hostname))return t.href}function H7(e){if(e.startsWith("["))return dd(e.slice(1,-1));if(/^\d+\.\d+\.\d+\.\d+$/.test(e))return dd(e);let t=z7(e);return t!=="localhost"&&!t.endsWith(".localhost")}function z7(e){let t=e.length;for(;t>0&&e[t-1]===".";)t--;return e.slice(0,t)}var W7=[["0.0.0.0",8],["10.0.0.0",8],["100.64.0.0",10],["127.0.0.0",8],["169.254.0.0",16],["172.16.0.0",12],["192.0.0.0",24],["192.0.2.0",24],["192.168.0.0",16],["198.18.0.0",15],["198.51.100.0",24],["203.0.113.0",24],["224.0.0.0",4],["240.0.0.0",4]],G7=[["::ffff:0:0",96],["64:ff9b::",96]],J7=[["::",96],["64:ff9b:1::",48],["100::",64],["2001::",23],["2001:db8::",32],["2002::",16],["fc00::",7],["fe80::",10],["fec0::",10],["ff00::",8]];function dd(e){let t=hv(e);if(t)return!W7.some(r=>fv(t,r,hv));let n=dv(e.replace(/%.*$/,""));return n?G7.some(r=>fv(n,r,dv))?dd(n.slice(12).join(".")):!J7.some(r=>fv(n,r,dv)):!1}function fv(e,[t,n],r){let i=r(t);for(let s=0;s<n;s++){let a=128>>s%8,o=Math.floor(s/8);if((e[o]&a)!==(i[o]&a))return!1}return!0}function hv(e){if(!/^\d{1,3}(\.\d{1,3}){3}$/.test(e))return;let t=e.split(".").map(Number);return t.every(n=>n<=255)?t:void 0}function dv(e){let t=e.split("::");if(t.length>2)return;let n=t.map(o=>o===""?[]:o.split(":")),r=n[n.length-1],i=r.length>0?hv(r[r.length-1]):void 0;i&&r.splice(-1,1,(i[0]<<8|i[1]).toString(16),(i[2]<<8|i[3]).toString(16));let s=n.reduce((o,c)=>o+c.length,0);if(n.length===1?s!==8:s>7)return;let a=[...n[0],...Array(8-s).fill("0"),...n[1]??[]];if(a.every(o=>/^[0-9a-f]{1,4}$/i.test(o)))return a.flatMap(o=>{let c=parseInt(o,16);return[c>>8,c&255]})}});var bn=x(an=>{"use strict";p();var K7=an&&an.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Y7=an&&an.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Q7=an&&an.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&K7(n,t,r[i]);return Y7(n,t),n}})();Object.defineProperty(an,"__esModule",{value:!0});an.isAssetFileName=Z7;an.doesFileExist=yA;an.doesFileExceedThreshold=_A;an.getFileSize=e5;an.hasRemoteAssetSizeExceededThreshold=t5;an.hasLocalAssetSizeExceededThreshold=n5;var X7=hA(),pd=Q7(Fn()),mA=pv(),pA=/[/\\]/;function Z7(e,t){let n=e.toUri(`assets/${t}`),r=pd.basename(n);return!pA.test(t)&&!pA.test(r)&&r!=="."&&r!==".."&&pd.dirname(n)===e.toUri("assets")}function gA(e,t){let n=t.indexOf("/"),r=n===-1?"":t.slice(0,n),i=pd.fileSystemPath(e.toUri(r)).replace(/\/?$/,"/");return pd.fileSystemPath(e.toUri(t)).startsWith(i)}async function yA(e,t){if(!gA(e,t))return!1;let n=e.toUri(t);return await e.fileExists(n)}async function _A(e,t,n){let r=e.toUri(t);if(!e.fileSize||!gA(e,t))return[!1,0];let i=await e.fileSize(r);return[i>n,i]}async function e5(e,t={}){let n=(0,mA.toRemoteAssetUrl)(e);if(n===void 0)return 0;let r={...t,method:"HEAD",redirect:"manual"};try{let i=await(0,X7.fetch)(n,r);if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);let s=i.headers.get("Content-Length");return s===null?0:parseFloat(s)}catch{return 0}}async function t5(e,t,n){return(0,mA.toRemoteAssetUrl)(t)===void 0?!1:await e.remoteFileSize(t)>n}async function n5(e,t,n){if(!await yA(e,t))return!1;let[i,s]=await _A(e,t,n);return i}});var wA=x(Ni=>{"use strict";p();Object.defineProperty(Ni,"__esModule",{value:!0});Ni.getBlocks=bA;Ni.isInvalidPresetBlock=kA;Ni.isInvalidDefaultBlock=i5;Ni.validateNestedBlocks=SA;Ni.reportWarning=gv;Ni.validateBlockFileExistence=TA;var mv=Be(),r5=bn();function bA(e){let t=[],n=[],r={},i=[],s=e.blocks,a=e.presets;function o(f,h){if(!f)return;"name"in f?n.push({node:f,path:["blocks",String(h),"type"]}):f.type!=="@app"&&t.push({node:f,path:["blocks",String(h),"type"]})}function c(f,h,d=0){!f||typeof f!="object"||(r[d]||(r[d]=[]),r[d].push({node:f,path:h.concat("type")}),"blocks"in f&&(Array.isArray(f.blocks)?f.blocks.forEach((g,v)=>{c(g,h.concat("blocks",String(v)),d+1)}):typeof f.blocks=="object"&&f.blocks!==null&&Object.entries(f.blocks).forEach(([g,v])=>{c(v,h.concat("blocks",g),d+1)})))}function l(f,h){!f||typeof f!="object"||i.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((d,g)=>{c(d,["presets",String(h),"blocks",String(g)],0)}):typeof f.blocks=="object"&&Object.entries(f.blocks).forEach(([d,g])=>{c(g,["presets",String(h),"blocks",d],0)}))}),"default"in e&&e.default?.blocks?.forEach((f,h)=>{l(f,h)}),{rootLevelThemeBlocks:t,rootLevelLocalBlocks:n,presetLevelBlocks:r,defaultLevelBlocks:i,hasRootBlocksDeclaration:Array.isArray(s)}}function kA(e,t,n,r,i=!0){if(t.static)return!r.some(l=>l.type===t.type&&l.id===e);let s=t.type.startsWith("_");if(s&&!i)return!1;let a=n.some(l=>l.node.type==="@theme"),o=s||!a;return!n.some(l=>l.node.type===t.type)&&o}function i5(e,t,n=!0){let r=e.type.startsWith("_");if(r&&!n)return!1;let i=t.some(o=>o.node.type==="@theme"),s=r||!i;return!t.some(o=>o.node.type===e.type)&&s}async function vA(e,t,n,r,i,s,a,o,c=[]){let l=(0,mv.nodeAtPath)(o,t),f="id"in e?e.id:t.at(-2);if(l){if(kA(f,e,i,c)){let d=!!e.static,g=e.type.startsWith("_"),v=d?`Could not find a static block of type "${e.type}" with id "${f}" in "blocks/${r.type}.liquid".`:g?`Private block type "${e.type}" is not allowed in "${r.type}" blocks.`:`Block type "${e.type}" is not allowed in "${r.type}" blocks. Allowed types are: ${s.join(", ")}.`;gv(v,a,l,n)}await TA(e.type,n)||gv(`Theme block 'blocks/${e.type}.liquid' does not exist.`,a,l,n)}"blocks"in e&&e.blocks&&await SA(n,e,e.blocks,t.slice(0,-1),a,o)}async function SA(e,t,n,r,i,s){if(!n)return;let a=await e.getBlockSchema?.(t.type);if(!a||a instanceof Error)return;let{validSchema:o,staticBlockDefs:c}=a;if(!o||o instanceof Error)return;let{rootLevelThemeBlocks:l}=bA(o),f=l.map(h=>h.node.type);Array.isArray(n)?await Promise.all(n.map((h,d)=>{let g=r.concat(["blocks",String(d),"type"]);return vA(h,g,e,t,l,f,i,s,c)})):typeof n=="object"&&await Promise.all(Object.entries(n).map(([h,d])=>{let g=r.concat(["blocks",h,"type"]);return vA(d,g,e,t,l,f,i,s,c)}))}function gv(e,t,n,r){r.report({message:e,startIndex:t+(0,mv.getLocStart)(n),endIndex:t+(0,mv.getLocEnd)(n)})}async function TA(e,t){if(e==="@theme"||e==="@app")return!0;let n=`blocks/${e}.liquid`;return await(0,r5.doesFileExist)(t,n)}});var ze=x(St=>{"use strict";p();Object.defineProperty(St,"__esModule",{value:!0});St.nonTraversableProperties=St.LoopNamedTags=St.LiquidNodeTypes=St.HtmlNodeTypes=St.Comparators=St.RawTags=St.NamedTags=St.NodeTypes=void 0;var rr;(function(e){e.Document="Document",e.LiquidRawTag="LiquidRawTag",e.LiquidTag="LiquidTag",e.LiquidBranch="LiquidBranch",e.LiquidVariableOutput="LiquidVariableOutput",e.HtmlSelfClosingElement="HtmlSelfClosingElement",e.HtmlVoidElement="HtmlVoidElement",e.HtmlDoctype="HtmlDoctype",e.HtmlComment="HtmlComment",e.HtmlElement="HtmlElement",e.HtmlDanglingMarkerClose="HtmlDanglingMarkerClose",e.HtmlRawNode="HtmlRawNode",e.AttrSingleQuoted="AttrSingleQuoted",e.AttrDoubleQuoted="AttrDoubleQuoted",e.AttrUnquoted="AttrUnquoted",e.AttrEmpty="AttrEmpty",e.TextNode="TextNode",e.YAMLFrontmatter="YAMLFrontmatter",e.LiquidVariable="LiquidVariable",e.LiquidFilter="LiquidFilter",e.NamedArgument="NamedArgument",e.LiquidLiteral="LiquidLiteral",e.BooleanExpression="BooleanExpression",e.String="String",e.Number="Number",e.Range="Range",e.VariableLookup="VariableLookup",e.Comparison="Comparison",e.LogicalExpression="LogicalExpression",e.AssignMarkup="AssignMarkup",e.BlockMarkup="BlockMarkup",e.ContentForMarkup="ContentForMarkup",e.CycleMarkup="CycleMarkup",e.ForMarkup="ForMarkup",e.PaginateMarkup="PaginateMarkup",e.RawMarkup="RawMarkup",e.RenderMarkup="RenderMarkup",e.SectionMarkup="SectionMarkup",e.RenderVariableExpression="RenderVariableExpression",e.RenderAliasExpression="RenderAliasExpression",e.LiquidDocDescriptionNode="LiquidDocDescriptionNode",e.LiquidDocParamNode="LiquidDocParamNode",e.LiquidDocExampleNode="LiquidDocExampleNode",e.LiquidDocPromptNode="LiquidDocPromptNode",e.LiquidErrorNode="LiquidErrorNode"})(rr||(St.NodeTypes=rr={}));var md;(function(e){e.assign="assign",e.block="block",e.capture="capture",e.case="case",e.content_for="content_for",e.cycle="cycle",e.decrement="decrement",e.echo="echo",e.elsif="elsif",e.for="for",e.form="form",e.if="if",e.ifchanged="ifchanged",e.include="include",e.increment="increment",e.layout="layout",e.liquid="liquid",e.paginate="paginate",e.partial="partial",e.render="render",e.section="section",e.sections="sections",e.tablerow="tablerow",e.unless="unless",e.when="when"})(md||(St.NamedTags=md={}));var xA;(function(e){e.comment="comment",e.doc="doc",e.javascript="javascript",e.raw="raw",e.schema="schema",e.style="style",e.stylesheet="stylesheet"})(xA||(St.RawTags=xA={}));var EA;(function(e){e.CONTAINS="contains",e.EQUAL="==",e.GREATER_THAN=">",e.GREATER_THAN_OR_EQUAL=">=",e.LESS_THAN="<",e.LESS_THAN_OR_EQUAL="<=",e.NOT_EQUAL="!="})(EA||(St.Comparators=EA={}));St.HtmlNodeTypes=[rr.HtmlElement,rr.HtmlDanglingMarkerClose,rr.HtmlRawNode,rr.HtmlVoidElement,rr.HtmlSelfClosingElement];St.LiquidNodeTypes=[rr.LiquidTag,rr.LiquidVariableOutput,rr.LiquidBranch,rr.LiquidRawTag];St.LoopNamedTags=[md.for,md.tablerow];St.nonTraversableProperties=new Set(["parentNode","prev","next","firstChild","lastChild"])});var ti=x(Bs=>{"use strict";p();Object.defineProperty(Bs,"__esModule",{value:!0});Bs.assertNever=s5;Bs.locStart=a5;Bs.locEnd=o5;Bs.deepGet=c5;Bs.dropLast=u5;function s5(e){throw new Error(`Unexpected object: ${e.type}`)}function a5(e){return e.position.start}function o5(e){return e.position.end}function c5(e,t){return e.reduce((n,r)=>{if(n&&n[r]!==void 0)return n[r]},t)}function u5(e,t){let n=[...t];for(let r=0;r<e;r++)n.pop();return n}});var Fe=x(vu=>{"use strict";p();Object.defineProperty(vu,"__esModule",{value:!0});vu.TagKind=void 0;vu.isStructuralEndTag=l5;var AA;(function(e){e.Block="block",e.Tag="tag",e.Raw="raw"})(AA||(vu.TagKind=AA={}));function l5(e,t){return t!==void 0}});var bo=x(Ci=>{"use strict";p();Object.defineProperty(Ci,"__esModule",{value:!0});Ci.RawBodyEndCache=void 0;Ci.rawBodyRuleLookup=p5;Ci.liquidTagTokenName=m5;Ci.findRawBodyEnd=CA;Ci.findRawLineBodyEnd=LA;var f5=Fe(),yv="[ \\t\\n\\v\\f\\r]",NA=new RegExp(`^\\{%-?${yv}*(#|\\w+)${yv}*[\\s\\S]*?-?%\\}$`),OA=new RegExp(`\\{%-?${yv}*(\\w+)`,"y"),d5=/^(#|\w+)/,h5=/^[ \t\v\f\r]*$/,PA=/\{[{%]/g;function p5(e){return t=>{let n=e(t);return n?.kind===f5.TagKind.Raw?n.body:void 0}}function m5(e){return NA.exec(e)?.[1]}var _v=class{source;lastIndexes=new Map;known=new Map;constructor(t){this.source=t}absentFrom(t,n){let r=this.lastIndexes.get(t);return r===void 0&&(r=this.source.lastIndexOf(t),this.lastIndexes.set(t,r)),r<n}knownEnds(t,n){let r=this.known.get(t);return r?.rule!==n&&(r={rule:n,ends:new Map},this.known.set(t,r)),r.ends}};Ci.RawBodyEndCache=_v;function CA(e,t,n,r,i,s){let a=`end${n}`;if(s?.absentFrom(a,t))return null;let o=s?.knownEnds(n,r),c=o?.get(t);if(c!==void 0)return c;let l=r.sameName==="nests",f=[],h=[],d=b=>{if(o){for(let _ of f)o.set(_,null);for(let _ of h)o.set(_,b)}return b},g=t,v=1;for(;g<e.length;){if(o&&!l){let T=o.get(g);if(T!==void 0)return d(T);h.push(g)}if(PA.lastIndex=g,e[g]!=="{"||e[g+1]!=="%"&&e[g+1]!=="{"){let T=PA.exec(e);if(!T)return d(null);g=T.index}let b=e[g+1]==="%"?qA(e,g+2):_5(e,g+2),_=e.slice(g,b),k=g5(_,r.delimiter);if(k?.[1]===a){v-=1;let T=g+k.index,w={tagStart:T,tagEnd:b,wsStart:e[T+2]==="-"?"-":"",wsEnd:_[_.length-3]==="-"?"-":""};if(v===0)return d(w);let y=f.pop();o&&y!==void 0&&o.set(y,w)}else if(k?.[1]===n){if(r.sameName==="rejected")return d(null);l&&(v+=1,o&&f.push(b))}else if(k&&r.opaque.includes(k[1])){let T=i(k[1]);if(T){let w=CA(e,b,k[1],T,i,s);if(!w)return d(null);g=w.tagEnd;continue}}g=b}return d(null)}function LA(e,t,n,r,i,s){if(!i.closesInLiquidTag)return null;let a=`end${r}`,o=1;for(let c=n;c<t.length;c++){let l=y5(e,t[c]);if(l===a){if(o-=1,o===0)return c}else if(l===r){if(i.sameName==="rejected")return null;i.sameName==="nests"&&(o+=1)}else if(l!==void 0&&i.opaque.includes(l)){let f=s(l);if(f){let h=LA(e,t,c+1,l,f,s);if(h===null)return null;c=h}}}return null}function g5(e,t){if(e.endsWith("%}")){if(t==="leading")return NA.exec(e)??void 0;for(let n=e.lastIndexOf("{%",e.length-3);n!==-1;n=e.lastIndexOf("{%",n-1)){OA.lastIndex=n;let r=OA.exec(e);if(r)return r;if(n===0)break}}}function y5(e,t){let n=e.lastIndexOf(`
|
|
19
|
+
`,t.nameOffset-1)+1;if(h5.test(e.slice(n,t.nameOffset)))return d5.exec(t.tagName)?.[1]}function qA(e,t){let n=e.indexOf("%}",t);return n===-1?t:n+2}function _5(e,t){let n=t,r=e[n++],i=r;for(;i!==void 0;){for(;r!==void 0&&r!=="}"&&r!=="{";)r=e[n++];if(r===void 0||n>=e.length)return e.length;if(i=e[n++],r==="}")return i==="}"?n:n-1;if(r==="{"&&i==="%")return qA(e,n);r=i}return e.length}});var gd=x(Fs=>{"use strict";p();Object.defineProperty(Fs,"__esModule",{value:!0});Fs.unlessTag=Fs.ifTag=void 0;Fs.elsifBranchParse=v5;var IA=Fe();function MA(e,t,n){return t.conditionalExpression()}Fs.ifTag={kind:IA.TagKind.Block,branches:["elsif","else"],parse:MA};Fs.unlessTag={kind:IA.TagKind.Block,branches:["elsif","else"],parse:MA};function v5(e,t){return t.conditionalExpression()}});var At=x(ku=>{"use strict";p();Object.defineProperty(ku,"__esModule",{value:!0});ku.MarkupTokenType=void 0;ku.tokenizeMarkup=T5;var Ce;(function(e){e.Id="Id",e.String="String",e.Number="Number",e.Dot="Dot",e.DotDot="DotDot",e.Pipe="Pipe",e.Colon="Colon",e.Comma="Comma",e.OpenRound="OpenRound",e.CloseRound="CloseRound",e.OpenSquare="OpenSquare",e.CloseSquare="CloseSquare",e.Dash="Dash",e.Comparison="Comparison",e.Equality="Equality",e.Logical="Logical",e.EndOfString="EndOfString"})(Ce||(ku.MarkupTokenType=Ce={}));var bu=/[a-zA-Z_][\w-]*\??/y,Li=/\d[\d_]*(\.\d[\d_]*)?/y,vv=/\s+/y,b5=/'[^']*'/y,k5=/"[^"]*"/y;function RA(e){return e>=48&&e<=57}function S5(e){return e<=32||e>=160}function T5(e,t=0){let n=[],r=0,i;for(;r<e.length;){if(S5(e.charCodeAt(r))&&(vv.lastIndex=r,vv.test(e))){r=vv.lastIndex;continue}let s=e[r],a=r+1<e.length?e[r+1]:"";if(s==="'"||s==='"'){let c=s==="'"?b5:k5;if(c.lastIndex=r,c.test(e)){let l=e.slice(r,c.lastIndex);n.push({type:Ce.String,value:l,start:r+t,end:c.lastIndex+t}),i=Ce.String,r=c.lastIndex;continue}}if(s==="-"&&RA(e.charCodeAt(r+1))&&(Li.lastIndex=r+1,Li.test(e))){let c=e.slice(r,Li.lastIndex);n.push({type:Ce.Number,value:c,start:r+t,end:Li.lastIndex+t}),i=Ce.Number,r=Li.lastIndex;continue}if(RA(e.charCodeAt(r))&&(Li.lastIndex=r,Li.test(e))){let c=Li.lastIndex,l=e.slice(r,c);n.push({type:Ce.Number,value:l,start:r+t,end:c+t}),i=Ce.Number,r=c;continue}if(bu.lastIndex=r,bu.test(e)){let c=e.slice(r,bu.lastIndex),l=Ce.Id;i!==Ce.Dot&&(c==="contains"?l=Ce.Comparison:(c==="and"||c==="or")&&(l=Ce.Logical)),n.push({type:l,value:c,start:r+t,end:bu.lastIndex+t}),i=l,r=bu.lastIndex;continue}if(a!==""){let c=s+a;if(c==="=="||c==="!="){n.push({type:Ce.Equality,value:c,start:r+t,end:r+2+t}),i=Ce.Equality,r+=2;continue}if(c===">="||c==="<="){n.push({type:Ce.Comparison,value:c,start:r+t,end:r+2+t}),i=Ce.Comparison,r+=2;continue}if(c===".."){n.push({type:Ce.DotDot,value:"..",start:r+t,end:r+2+t}),i=Ce.DotDot,r+=2;continue}}let o=w5(s);if(o!==void 0){n.push({type:o,value:s,start:r+t,end:r+1+t}),i=o,r+=1;continue}r+=1}return n.push({type:Ce.EndOfString,value:"",start:e.length+t,end:e.length+t}),n}function w5(e){switch(e){case".":return Ce.Dot;case"|":return Ce.Pipe;case":":return Ce.Colon;case",":return Ce.Comma;case"(":return Ce.OpenRound;case")":return Ce.CloseRound;case"[":return Ce.OpenSquare;case"]":return Ce.CloseSquare;case"-":return Ce.Dash;case">":return Ce.Comparison;case"<":return Ce.Comparison;case"=":return Ce.Equality;default:return}}});var Tu=x(Su=>{"use strict";p();Object.defineProperty(Su,"__esModule",{value:!0});Su.caseTag=void 0;Su.whenBranchParse=A5;var ko=At(),x5=Fe(),E5=ze();Su.caseTag={kind:x5.TagKind.Block,branches:["when","else"],parse(e,t,n){return t.valueExpression()}};function A5(e,t){let n=[t.valueExpression()];for(;;){if(t.consumeOptional(ko.MarkupTokenType.Comma)){if(t.isLax()&&!t.atValueStart())break;n.push(t.valueExpression());continue}let s=t.peek();if(s.type===ko.MarkupTokenType.Logical&&s.value==="or"){if(t.consume(ko.MarkupTokenType.Logical),t.isLax()&&!t.atValueStart())break;n.push(t.valueExpression());continue}break}let r=t.peek(),i=n[n.length-1];return r.type===ko.MarkupTokenType.Colon&&t.look(ko.MarkupTokenType.EndOfString,1)&&i.type===E5.NodeTypes.String&&i.position.end===r.start&&t.consume(ko.MarkupTokenType.Colon),t.isLax()&&!t.isAtEnd()&&t.discardTrailing(),n}});var FA=x(So=>{"use strict";p();Object.defineProperty(So,"__esModule",{value:!0});So.tablerowTag=So.forTag=void 0;var DA=At(),O5=ze(),jA=Fe();function BA(e,t,n){let r=t.consume(DA.MarkupTokenType.Id);if(!t.id("in"))throw new Error("Expected 'in'");let i=t.valueExpression(),s=t.id("reversed"),a=[];for(;!t.isAtEnd();)if(t.consumeOptional(DA.MarkupTokenType.Comma),t.isLax())try{a.push(t.namedArgument())}catch{break}else a.push(t.namedArgument());return{type:O5.NodeTypes.ForMarkup,variableName:r.value,collection:i,reversed:s,args:a,position:{start:r.start,end:t.peek().start},source:i.source}}So.forTag={kind:jA.TagKind.Block,branches:["else"],parse:BA};So.tablerowTag={kind:jA.TagKind.Block,branches:["else"],parse:BA}});var VA=x(yd=>{"use strict";p();Object.defineProperty(yd,"__esModule",{value:!0});yd.assignTag=void 0;var bv=At(),P5=ze(),N5=Fe();yd.assignTag={kind:N5.TagKind.Tag,parse(e,t,n){let r=t.peek().start,i;if(t.isLax()){let c=t.consumeRawUntil(bv.MarkupTokenType.Equality).match(/[\w\-.[\]()]+/g);if(i=c?c[c.length-1]:"",i.length===0)throw new Error("Expected an assignment target before '=' in assign tag")}else i=t.consume(bv.MarkupTokenType.Id).value;if(t.consume(bv.MarkupTokenType.Equality).value!=="=")throw new Error("Expected '=' in assign tag");let a=t.liquidVariable();return{type:P5.NodeTypes.AssignMarkup,name:i,value:a,position:{start:r,end:t.peek().start},source:a.source}}}});var $A=x(_d=>{"use strict";p();Object.defineProperty(_d,"__esModule",{value:!0});_d.echoTag=void 0;var C5=Fe();_d.echoTag={kind:C5.TagKind.Tag,parse(e,t,n){return t.liquidVariable()}}});var zA=x(To=>{"use strict";p();Object.defineProperty(To,"__esModule",{value:!0});To.includeTag=To.renderTag=void 0;var xu=At(),wu=ze(),UA=Fe();function L5(e){return e.look(xu.MarkupTokenType.Id)&&e.look(xu.MarkupTokenType.Colon,1)}function HA(e,t,n,r=!1){let i=t.valueExpression();if(!r&&i.type!==wu.NodeTypes.String&&i.type!==wu.NodeTypes.VariableLookup)throw new Error(`Expected string or variable lookup for snippet, got ${i.type}`);let s=null,a=null,o=null,c=t.peek().start;if(t.id("for")?o="for":t.id("with")&&(o="with"),o!==null){let d=t.valueExpression();s={type:wu.NodeTypes.RenderVariableExpression,kind:o,name:d,position:{start:c,end:d.position.end},source:d.source}}let l=t.peek().start;if(t.id("as")){let d=t.consume(xu.MarkupTokenType.Id);a={type:wu.NodeTypes.RenderAliasExpression,value:d.value,position:{start:l,end:d.end},source:i.source}}let f=[];for(t.consumeOptional(xu.MarkupTokenType.Comma);L5(t);)f.push(t.namedArgument()),t.consumeOptional(xu.MarkupTokenType.Comma);let h=t.peek().start;return{type:wu.NodeTypes.RenderMarkup,snippet:i,variable:s,alias:a,args:f,position:{start:i.position.start,end:h},source:i.source}}To.renderTag={kind:UA.TagKind.Tag,parse:HA};To.includeTag={kind:UA.TagKind.Tag,parse:(e,t,n)=>HA(e,t,n,!0)}});var GA=x(vd=>{"use strict";p();Object.defineProperty(vd,"__esModule",{value:!0});vd.cycleTag=void 0;var WA=At(),q5=ze(),I5=Fe();vd.cycleTag={kind:I5.TagKind.Tag,parse(e,t,n){let r=t.valueExpression(),i=null,s=[];for(t.consumeOptional(WA.MarkupTokenType.Colon)?(i=r,s.push(t.valueExpression())):s.push(r);t.consumeOptional(WA.MarkupTokenType.Comma)&&!(t.isLax()&&t.isAtEnd());)s.push(t.valueExpression());return{type:q5.NodeTypes.CycleMarkup,groupName:i,args:s,position:{start:r.position.start,end:t.peek().start},source:r.source}}}});var KA=x(bd=>{"use strict";p();Object.defineProperty(bd,"__esModule",{value:!0});bd.sectionTag=void 0;var M5=At(),JA=ze(),R5=Fe();bd.sectionTag={kind:R5.TagKind.Tag,parse(e,t,n){let r=t.valueExpression();if(r.type!==JA.NodeTypes.String)throw new Error(`Expected string for section name, got ${r.type}`);let i=[];return t.consumeOptional(M5.MarkupTokenType.Comma)&&i.push(...t.blockNamedArguments()),{type:JA.NodeTypes.SectionMarkup,name:r,args:i,position:{start:r.position.start,end:t.peek().start},source:r.source}}}});var QA=x(kd=>{"use strict";p();Object.defineProperty(kd,"__esModule",{value:!0});kd.contentForTag=void 0;var kv=At(),YA=ze(),D5=Fe();kd.contentForTag={kind:D5.TagKind.Tag,parse(e,t,n){let r=t.valueExpression();if(r.type!==YA.NodeTypes.String)throw new Error(`Expected string for content_for type, got ${r.type}`);let i=[];for(t.consumeOptional(kv.MarkupTokenType.Comma);t.look(kv.MarkupTokenType.Id);){try{i.push(t.namedArgument())}catch{break}t.consumeOptional(kv.MarkupTokenType.Comma)}return{type:YA.NodeTypes.ContentForMarkup,contentForType:r,args:i,position:{start:r.position.start,end:t.peek().start},source:r.source}}}});var ZA=x(Sd=>{"use strict";p();Object.defineProperty(Sd,"__esModule",{value:!0});Sd.blockTag=void 0;var j5=At(),XA=ze(),B5=Fe(),F5=/^_?[a-zA-Z0-9][\w-]*$/,V5=/^shopify:\/\/apps\/[A-Za-z0-9][A-Za-z0-9_-]*\/blocks\/[A-Za-z0-9][A-Za-z0-9_-]*\/[0-9A-Fa-f]{8}(?:-[0-9A-Fa-f]{4}){3}-[0-9A-Fa-f]{12}$/;Sd.blockTag={kind:B5.TagKind.Block,branches:[],parse(e,t,n){if(t.isAtEnd())throw new Error("in 'block' - missing block type");let r=t.valueExpression();if(r.type!==XA.NodeTypes.String)throw new Error("in 'block' - file name must be a string literal");if(!F5.test(r.value)&&!V5.test(r.value))throw new Error(`in 'block' - '${r.value}' is not a valid block type`);let i=[];if(t.consumeOptional(j5.MarkupTokenType.Comma)&&!t.isAtEnd()&&(i=t.blockNamedArguments()),!t.isAtEnd()){let s=t.peek();throw new Error(`Unexpected token in 'block' tag: ${s.value}`)}return{type:XA.NodeTypes.BlockMarkup,name:r,args:i,position:{start:r.position.start,end:t.peek().start},source:r.source}}}});var tO=x(Td=>{"use strict";p();Object.defineProperty(Td,"__esModule",{value:!0});Td.paginateTag=void 0;var eO=At(),$5=ze(),U5=Fe();Td.paginateTag={kind:U5.TagKind.Block,branches:[],parse(e,t,n){let r=t.valueExpression();if(!t.id("by"))throw new Error("Expected 'by' in paginate tag");let i=t.valueExpression(),s=[];return t.consumeOptional(eO.MarkupTokenType.Comma)?s.push(...t.namedArguments()):t.isTolerant()&&t.peek().type===eO.MarkupTokenType.Id&&s.push(...t.namedArguments()),{type:$5.NodeTypes.PaginateMarkup,collection:r,pageSize:i,args:s,position:{start:r.position.start,end:t.peek().start},source:r.source}}}});var nO=x(wd=>{"use strict";p();Object.defineProperty(wd,"__esModule",{value:!0});wd.formTag=void 0;var H5=Fe();wd.formTag={kind:H5.TagKind.Block,branches:[],parse(e,t,n){return t.arguments()}}});var rO=x(xd=>{"use strict";p();Object.defineProperty(xd,"__esModule",{value:!0});xd.incrementTag=void 0;var z5=Fe();xd.incrementTag={kind:z5.TagKind.Tag,parse(e,t,n){return t.variableLookup()}}});var iO=x(Ed=>{"use strict";p();Object.defineProperty(Ed,"__esModule",{value:!0});Ed.decrementTag=void 0;var W5=Fe();Ed.decrementTag={kind:W5.TagKind.Tag,parse(e,t,n){return t.variableLookup()}}});var sO=x(Ad=>{"use strict";p();Object.defineProperty(Ad,"__esModule",{value:!0});Ad.captureTag=void 0;var G5=ze(),J5=Fe(),K5=/((?:\(?[\w\-.[\]]\)?)+)/;Ad.captureTag={kind:J5.TagKind.Block,branches:[],parse(e,t,n){if(t.isLax()){let{source:r,bodyStart:i,bodyEnd:s}=t.bodyContext(),a=K5.exec(r.slice(i,s));if(a)return{type:G5.NodeTypes.VariableLookup,name:a[1],lookups:[],position:{start:i,end:s},source:r}}return t.variableLookup()}}});var aO=x(Od=>{"use strict";p();Object.defineProperty(Od,"__esModule",{value:!0});Od.layoutTag=void 0;var Y5=Fe();Od.layoutTag={kind:Y5.TagKind.Tag,parse(e,t,n){return t.valueExpression()}}});var oO=x(Pd=>{"use strict";p();Object.defineProperty(Pd,"__esModule",{value:!0});Pd.sectionsTag=void 0;var Q5=ze(),X5=Fe();Pd.sectionsTag={kind:X5.TagKind.Tag,parse(e,t,n){let r=t.valueExpression();if(r.type!==Q5.NodeTypes.String)throw new Error(`Expected string for sections name, got ${r.type}`);return r}}});var cO=x(Nd=>{"use strict";p();Object.defineProperty(Nd,"__esModule",{value:!0});Nd.partialTag=void 0;var Z5=ze(),eH=Fe();Nd.partialTag={kind:eH.TagKind.Block,branches:[],parse(e,t,n){let r=t.valueExpression();if(r.type!==Z5.NodeTypes.String)throw new Error(`Expected string for partial name, got ${r.type}`);return r}}});var uO=x(Cd=>{"use strict";p();Object.defineProperty(Cd,"__esModule",{value:!0});Cd.ifchangedTag=void 0;var tH=Fe();Cd.ifchangedTag={kind:tH.TagKind.Block,branches:[],parse(e,t,n){return null}}});var lO=x(Ld=>{"use strict";p();Object.defineProperty(Ld,"__esModule",{value:!0});Ld.breakTag=void 0;var nH=Fe();Ld.breakTag={kind:nH.TagKind.Tag,parse(e,t,n){if(!t.isAtEnd())throw new Error(`'${e}' tag does not accept markup`);return""}}});var fO=x(qd=>{"use strict";p();Object.defineProperty(qd,"__esModule",{value:!0});qd.continueTag=void 0;var rH=Fe();qd.continueTag={kind:rH.TagKind.Tag,parse(e,t,n){if(!t.isAtEnd())throw new Error(`'${e}' tag does not accept markup`);return""}}});var dO=x(Ht=>{"use strict";p();Object.defineProperty(Ht,"__esModule",{value:!0});Ht.stylesheetRaw=Ht.styleRaw=Ht.schemaRaw=Ht.javascriptRaw=Ht.rawRaw=Ht.docRaw=Ht.commentRaw=void 0;var Vs=Fe(),Eu={delimiter:"trailing",sameName:"ignored",opaque:[],closesInLiquidTag:!1},iH={...Eu,sameName:"rejected"},sH={delimiter:"leading",sameName:"nests",opaque:["raw"],closesInLiquidTag:!0},aH={delimiter:"leading",sameName:"nests",opaque:["comment","doc","javascript","raw","schema","stylesheet"],closesInLiquidTag:!0};function $s(e,t,n){if(!t.isAtEnd())throw new Error(`'${e}' tag does not accept markup`)}Ht.commentRaw={kind:Vs.TagKind.Raw,body:sH,parseLiquidInBody:!1,parse:$s};Ht.docRaw={kind:Vs.TagKind.Raw,body:iH,parse:$s};Ht.rawRaw={kind:Vs.TagKind.Raw,body:Eu,parseLiquidInBody:!1,parse:$s};Ht.javascriptRaw={kind:Vs.TagKind.Raw,body:Eu,parseLiquidInBody:!0,parse:$s};Ht.schemaRaw={kind:Vs.TagKind.Raw,body:Eu,parseLiquidInBody:!1,parse:$s};Ht.styleRaw={kind:Vs.TagKind.Raw,body:aH,parseLiquidInBody:!0,parse:$s};Ht.stylesheetRaw={kind:Vs.TagKind.Raw,body:Eu,parseLiquidInBody:!0,parse:$s}});var hO=x(Id=>{"use strict";p();Object.defineProperty(Id,"__esModule",{value:!0});Id.liquidTag=void 0;var oH=Fe();function cH(e,t){return e.endsWith(",")?/^\w+\s*:/.test(t.trimStart()):!1}function uH(e,t){let n=[],r=e.split(`
|
|
20
|
+
`),i=[],s=0;for(let a=0;a<r.length;a++){let o=r[a],c=t+s;if(i.length>0){let l=i[i.length-1],f=l.raw.trimEnd();if(cH(f,o)){l.raw+=`
|
|
21
|
+
`+o,s+=o.length+1;continue}}i.push({raw:o,startIndex:c}),s+=o.length+1}for(let{raw:a,startIndex:o}of i){let c=a.trimStart(),l=a.length-c.length;if(c.length>0){let f=a.lastIndexOf(`
|
|
22
|
+
`),h=f===-1?a:a.slice(f+1),d=f===-1?o+a.trimEnd().length:o+f+1+h.trimEnd().length,g,v,b,_,k=c.indexOf(`
|
|
23
|
+
`),T=k===-1?c:c.slice(0,k);if(T.startsWith("#"))g="#",v=c.slice(1).replace(/^[ \t]/,""),_=o+l,b=o+l+1+(c.length-1-v.length);else{let w=T.search(/\s/);if(w===-1)g=T,v="",_=o+l,b=o+l+T.length;else{g=T.slice(0,w);let y=c.slice(w);v=y.trimStart(),_=o+l,b=o+l+w+(y.length-v.length)}}n.push({tagName:g,markup:v,markupOffset:b,nameOffset:_,lineEnd:d})}}return n}Id.liquidTag={kind:oH.TagKind.Tag,parse(e,t,n){let{source:r,bodyStart:i,bodyEnd:s}=t.bodyContext(),a=r.slice(i,s),c={lines:uH(a,i),index:0},l=[];for(;c.index<c.lines.length;){let f=c.lines[c.index];c.index++,l.push(n.parseLiquidStatement(f.tagName,f.markup,f.markupOffset,c))}return l}}});var Rd=x(Md=>{"use strict";p();Object.defineProperty(Md,"__esModule",{value:!0});Md.builtinTags=void 0;var pO=gd(),lH=Tu(),mO=FA(),fH=VA(),dH=$A(),gO=zA(),hH=GA(),pH=KA(),mH=QA(),gH=ZA(),yH=tO(),_H=nO(),vH=rO(),bH=iO(),kH=sO(),SH=aO(),TH=oO(),wH=cO(),xH=uO(),EH=lO(),AH=fO(),Us=dO(),OH=hO();Md.builtinTags={assign:fH.assignTag,block:gH.blockTag,break:EH.breakTag,capture:kH.captureTag,case:lH.caseTag,content_for:mH.contentForTag,continue:AH.continueTag,cycle:hH.cycleTag,decrement:bH.decrementTag,echo:dH.echoTag,for:mO.forTag,form:_H.formTag,if:pO.ifTag,ifchanged:xH.ifchangedTag,include:gO.includeTag,increment:vH.incrementTag,layout:SH.layoutTag,liquid:OH.liquidTag,paginate:yH.paginateTag,partial:wH.partialTag,render:gO.renderTag,section:pH.sectionTag,sections:TH.sectionsTag,tablerow:mO.tablerowTag,unless:pO.unlessTag,comment:Us.commentRaw,doc:Us.docRaw,javascript:Us.javascriptRaw,raw:Us.rawRaw,schema:Us.schemaRaw,style:Us.styleRaw,stylesheet:Us.stylesheetRaw}});var ni=x(qi=>{"use strict";p();Object.defineProperty(qi,"__esModule",{value:!0});qi.Environment=qi.isStructuralEndTag=qi.TagKind=void 0;var yO=Fe();Object.defineProperty(qi,"TagKind",{enumerable:!0,get:function(){return yO.TagKind}});Object.defineProperty(qi,"isStructuralEndTag",{enumerable:!0,get:function(){return yO.isStructuralEndTag}});var PH=Fe(),NH=Rd(),Sv=class e{builtins;custom;registryVersion=0;rawTagStates;static _default;constructor(t={}){this.builtins=new Map(Object.entries(t)),this.custom=new Map}tagForName(t){return this.custom.get(t)??this.builtins.get(t)}registerTag(t,n){let r=n.kind===PH.TagKind.Raw?JSON.stringify([!!n.parseLiquidInBody,n.body.delimiter,n.body.sameName,n.body.closesInLiquidTag,n.body.opaque]):void 0;this.custom.get(t)===n&&this.rawTagStates?.get(t)===r||(this.custom.set(t,n),r!==void 0?(this.rawTagStates??=new Map).set(t,r):this.rawTagStates?.delete(t),this.registryVersion++)}get tagRegistryVersion(){return this.registryVersion}usesBuiltinTags(){return this===e._default&&this.custom.size===0&&this.tagForName===e.prototype.tagForName}static default(){return e._default||(e._default=new e(NH.builtinTags)),e._default}static resetDefault(){e._default=void 0}};qi.Environment=Sv});var kn=x(xo=>{"use strict";p();Object.defineProperty(xo,"__esModule",{value:!0});xo.TokenType=void 0;xo.tokenize=qH;xo.tokenizeWithoutFastPath=IH;var bO=ti(),Dd=bo(),Hs=ni(),jd=/\{%-?\s*(raw|comment|doc|schema|javascript|stylesheet|style)(?=\s|-?%})/g,Tv=/\{[{%]|<|-->/g,wv=/\{[{%]/g,CH=/["{]/g,LH=/['{]/g,fe;(function(e){e.Text="Text",e.LiquidTagOpen="LiquidTagOpen",e.LiquidTagClose="LiquidTagClose",e.LiquidVariableOutputOpen="LiquidVariableOutputOpen",e.LiquidVariableOutputClose="LiquidVariableOutputClose",e.HtmlTagOpen="HtmlTagOpen",e.HtmlCloseTagOpen="HtmlCloseTagOpen",e.HtmlTagClose="HtmlTagClose",e.HtmlSelfClose="HtmlSelfClose",e.HtmlCommentOpen="HtmlCommentOpen",e.HtmlCommentClose="HtmlCommentClose",e.HtmlDoctypeOpen="HtmlDoctypeOpen",e.HtmlEquals="HtmlEquals",e.HtmlQuoteOpen="HtmlQuoteOpen",e.HtmlQuoteClose="HtmlQuoteClose",e.YamlFrontmatter="YamlFrontmatter",e.EndOfInput="EndOfInput"})(fe||(xo.TokenType=fe={}));function qH(e,t={}){if(t.builtinRawTags&&t.rawBodyEnds&&(t.rawBodyEnds=void 0),!e.length)return[{type:fe.EndOfInput,start:0,end:0}];if(e[0]==="<"&&e[1]!=="!")return Ws(e,t,wo);let n=e[1]==="%";if(!t.insideHtmlComment&&!t.insideQuotedAttribute&&!t.insideHtmlTag&&e[0]==="{"&&(e[1]==="{"||n)){let r=e[2]==="-"?3:2,i=e.indexOf(n?"%}":"}}",r);if((i===-1||i+2===e.length)&&(!n||!t.rawBodyRule&&(!t.rawTags||t.builtinRawTags)||i===-1)){let s=i===-1?e.length:i>r&&e[i-1]==="-"?i-1:i,a=[{type:n?fe.LiquidTagOpen:fe.LiquidVariableOutputOpen,start:0,end:r}];return s>r&&a.push({type:fe.Text,start:r,end:s}),i!==-1&&a.push({type:n?fe.LiquidTagClose:fe.LiquidVariableOutputClose,start:s,end:i+2}),a.push({type:fe.EndOfInput,start:e.length,end:e.length}),a}return MH(e,t,i)}if(!t.rawText&&!t.insideHtmlComment&&!t.insideQuotedAttribute&&!t.insideHtmlTag&&e.startsWith("<!--")&&e[4]!==">"&&!e.startsWith("->",4)&&e.indexOf("-->",4)===e.length-3&&e.indexOf("--!>",4)===-1&&e.indexOf("<",4)===-1&&e.indexOf("{",4)===-1){let r=e.length-3,i=[{type:fe.HtmlCommentOpen,start:0,end:4}];return r>4&&i.push({type:fe.Text,start:4,end:r}),i.push({type:fe.HtmlCommentClose,start:r,end:e.length}),i.push({type:fe.EndOfInput,start:e.length,end:e.length}),i}if(!t.insideHtmlComment&&!t.insideQuotedAttribute&&!t.insideHtmlTag&&e[0]!=="{"&&e[0]!=="<"&&e[0]!=="-"){let r=t.rawText?wv:Tv;r.lastIndex=0;let i=r.exec(e);return i?Ws(e,t,wo,[{type:fe.Text,start:0,end:i.index}],i.index):[{type:fe.Text,start:0,end:e.length},{type:fe.EndOfInput,start:e.length,end:e.length}]}return Ws(e,t,wo)}function IH(e,t={}){return Ws(e,t,(n,r)=>r)}function MH(e,t,n){let r=[],i=0,s=-1,a="",o=0;for(;i<e.length;){let c=e[o+1]==="%";i=o+(e[o+2]==="-"?3:2);let l=o===0?n:e.indexOf(c?"%}":"}}",i),f;if(c&&t.rawTags&&t.builtinRawTags){if(s<o){jd.lastIndex=o;let v=jd.exec(e);s=v?.index??1/0,a=v?.[1]??""}if(s===o){let v=t.rawTags.tagForName(a);if(v?.kind===Hs.TagKind.Raw&&!v.parseLiquidInBody&&l!==-1&&(f=(0,Dd.findRawBodyEnd)(e,l+2,a,v.body,b=>{let _=t.rawTags.tagForName(b);return _?.kind===Hs.TagKind.Raw?_.body:void 0})??void 0),!f)return Ws(e,t,wo,r,o);s=f.tagEnd-1}}r.push({type:c?fe.LiquidTagOpen:fe.LiquidVariableOutputOpen,start:o,end:i});let h=l===-1?e.length:l>i&&e[l-1]==="-"?l-1:l;if(i<h&&r.push({type:fe.Text,start:i,end:h}),l===-1)break;let d={type:c?fe.LiquidTagClose:fe.LiquidVariableOutputClose,start:h,end:l+2};if(r.push(d),c&&(t.rawBodyRule||t.rawTags&&!t.builtinRawTags)){let v;if(t.rawBodyRule)v=(0,Dd.liquidTagTokenName)(e.slice(o,l+2));else{let k=e.slice(o+(e[o+2]==="-"?3:2),h).trim(),T=k.search(/\s/);v=T===-1?k:k.slice(0,T)}let b=v===void 0?void 0:t.rawTags?.tagForName(v),_=v===void 0?void 0:t.rawBodyRule?.(v)??(b?.kind===Hs.TagKind.Raw?b.body:void 0);if(_)return Ws(e,t,wo,r,l+2,{start:o,name:v,rule:_,definition:b})}if(f&&((t.rawBodyEnds??=[])[r.length-1]=f),i=f?.tagEnd??l+2,i===e.length)break;if(e[i]==="{"&&(e[i+1]==="{"||e[i+1]==="%")){o=i;continue}Tv.lastIndex=i;let g=Tv.exec(e);if(o=g?.index??e.length,i<o&&r.push({type:fe.Text,start:i,end:o}),!g)break;if(g[0]!=="{{"&&g[0]!=="{%")return Ws(e,t,wo,r,o)}return r.push({type:fe.EndOfInput,start:e.length,end:e.length}),r}function Ws(e,t,n,r=[],i=0,s){let a=[],o=Ee.Default,c=i,l=-1;i>0&&r[r.length-1]?.type===fe.Text&&(l=r.pop().start);let f=e,h,d=-1,g=-1,v="",b,_=!1,k="",T=-1,w=-1,y=!1,A=0,P,O="";t.insideHtmlComment?o=Ee.HtmlComment:t.insideQuotedAttribute?(k=t.insideQuotedAttribute,a.push(Ee.HtmlTag),o=Ee.QuotedValue):t.insideHtmlTag?o=Ee.HtmlTag:t.rawText&&(o=Ee.RawText);function L(z){let he=c+z;return he<f.length?e[he]:""}function D(z){return f.startsWith(z,c)}function M(){l!==-1&&(r.push({type:fe.Text,start:l,end:c}),l=-1)}function C(z,he){M(),r.push({type:z,start:c,end:c+he}),c+=he}function q(z){a.push(o),o=z}function V(){o=a.length>0?a.pop():Ee.Default}function $(){l===-1&&(l=c)}if(c===0&&!t.skipFrontmatter&&(D(`---
|
|
24
|
+
`)||D(`---\r
|
|
25
|
+
`))){let z=e.indexOf(`
|
|
26
|
+
`,0)+1,he=e.indexOf(`
|
|
27
|
+
---`,z);if(he!==-1){let me=he+4;me<e.length&&e[me]==="\r"&&me++,me<e.length&&e[me]===`
|
|
28
|
+
`&&me++,r.push({type:fe.YamlFrontmatter,start:0,end:me}),c=me}}function I(){let z=f[c+1];return z==="{"?(C(fe.LiquidVariableOutputOpen,f[c+2]==="-"?3:2),q(Ee.LiquidVariableOutput),!0):z==="%"?(w=c,C(fe.LiquidTagOpen,f[c+2]==="-"?3:2),q(Ee.LiquidTag),!0):!1}function B(z){if(!t.rawTags&&!t.rawBodyRule||y&&t.parseHtml!==!1||c<=d)return;let he;if(z)he=z.name;else if(t.builtinRawTags){if(g<w){jd.lastIndex=w;let yn=jd.exec(e);g=yn?.index??1/0,v=yn?.[1]??""}if(g!==w)return;g=w+1,he=v}else if(t.rawTags){let yn=r[r.length-1],Xr=e.slice(w+(e[w+2]==="-"?3:2),yn.start).trim(),Ls=Xr.search(/\s/);he=Ls===-1?Xr:Xr.slice(0,Ls)}else he=(0,Dd.liquidTagTokenName)(e.slice(w,c));if(he===void 0)return;let me=z?.definition??t.rawTags?.tagForName(he),gn=z?.rule??t.rawBodyRule?.(he)??(me?.kind===Hs.TagKind.Raw?me.body:void 0);if(!gn)return;let Qr=t.rawBodyRule??(yn=>{let Xr=t.rawTags?.tagForName(yn);return Xr?.kind===Hs.TagKind.Raw?Xr.body:void 0});if(h?.get(he)?.has(f.length))return;let yt=(0,Dd.findRawBodyEnd)(f,c,he,gn,Qr);if(!yt){h??=new Map;let yn=h.get(he)??new Set;yn.add(f.length),h.set(he,yn);return}if(t.builtinRawTags&&((t.rawBodyEnds??=[])[r.length-1]=yt,me?.kind===Hs.TagKind.Raw&&!me.parseLiquidInBody)){c=yt.tagEnd;return}wv.lastIndex=c;let Vt=wv.exec(e);if(!Vt||Vt.index+2>yt.tagStart){c<yt.tagStart&&C(fe.Text,yt.tagStart-c);return}let Cs=e.slice(0,yt.tagStart),iu=Vt.index+(Cs[Vt.index+2]==="-"?3:2);if(Vt[0]==="{{"&&Cs.indexOf("}}",iu)===-1){c<Vt.index&&C(fe.Text,Vt.index-c),C(fe.LiquidVariableOutputOpen,iu-Vt.index),c<yt.tagStart&&C(fe.Text,yt.tagStart-c);return}(b??=[]).push({end:yt,mode:o,depth:a.length,quote:k,rawTextTag:O}),me?.kind===Hs.TagKind.Raw&&!me.parseLiquidInBody&&(d=yt.tagStart),f=Cs,o=Ee.RawText,O=""}function U(){if(!b)return!1;for(;c>=f.length;){let z=b.pop();if(!z)return!1;M(),o=z.mode,a.length=z.depth,k=z.quote,O=z.rawTextTag;let he=b[b.length-1];f=he?e.slice(0,he.end.tagStart):e}return!0}function K(z){let he=/^(svg|script|style)(?=[\s/>]|$)/i.exec(e.slice(z,z+7));return he?he[1].toLowerCase():/^svg\{/i.test(e.slice(z,z+4))?"svg":void 0}function Q(z){return/^<\/svg\s*>/i.test(e.slice(z,z+64))}function Y(z){if(O===""||e.slice(z+2,z+2+O.length).toLowerCase()!==O)return!1;let me=z+2+O.length;for(;me<e.length&&/\s/.test(e[me]);)me++;return e[me]===">"}function ge(){let z=P;P=void 0,z==="svg"?A++:z!==void 0&&!A&&o===Ee.Default&&(O=z,q(Ee.RawText))}for(s&&(w=s.start,B(s));c<f.length||U();)switch(o){case Ee.LiquidTag:{D("-%}")?(C(fe.LiquidTagClose,3),V(),B()):D("%}")?(C(fe.LiquidTagClose,2),V(),B()):($(),c=n(f,c+1,o,k,_));break}case Ee.LiquidVariableOutput:{D("-}}")?(C(fe.LiquidVariableOutputClose,3),V()):D("}}")?(C(fe.LiquidVariableOutputClose,2),V()):($(),c=n(f,c+1,o,k,_));break}case Ee.Default:{let z=f.charCodeAt(c);if(z===Vn&&I())continue;if(z===Ii&&D("<!--")&&A){C(fe.HtmlCommentOpen,4);continue}if(z===zs&&D("-->")&&A){C(fe.HtmlCommentClose,3);continue}if(z===Ii&&D("<!--")){C(fe.HtmlCommentOpen,4),q(Ee.HtmlComment),T=c;continue}if(z===Ii&&D("<!")){y=!0,C(fe.HtmlDoctypeOpen,2),q(Ee.HtmlTag);continue}if(z===Ii&&D("</")&&vO(e.charCodeAt(c+2))){A&&Q(c)&&A--,C(fe.HtmlCloseTagOpen,2),q(Ee.HtmlTag);continue}if(z===Ii&&vO(e.charCodeAt(c+1))){P=K(c+1),C(fe.HtmlTagOpen,1),q(Ee.HtmlTag);continue}$(),c=n(f,c+1,o,k,_);break}case Ee.HtmlTag:{let z=f.charCodeAt(c);if(z===Vn&&I())continue;if(z===TO&&D("/>")){C(fe.HtmlSelfClose,2),V(),P=void 0;continue}if(z===xv){C(fe.HtmlTagClose,1),V(),y=!1,ge();continue}if(z===wO){C(fe.HtmlEquals,1);continue}if(z===kO||z===SO||EO(z)){k=L(0),C(fe.HtmlQuoteOpen,1),q(Ee.QuotedValue);continue}let he=xO(z);l!==-1&&he!==_&&M(),l===-1&&(_=he),$(),c=n(f,c+1,o,k,_);break}case Ee.QuotedValue:{let z=f.charCodeAt(c);if(z===Vn&&I())continue;if(z===k.charCodeAt(0)||z===AO(k).charCodeAt(0)){C(fe.HtmlQuoteClose,1),V();continue}$(),c=n(f,c+1,o,k,_);break}case Ee.HtmlComment:{let z=f.charCodeAt(c);if(z===Vn&&I())continue;if(c===T){if(z===xv){C(fe.HtmlCommentClose,1),V();continue}if(z===zs&&D("->")){C(fe.HtmlCommentClose,2),V();continue}}if(z===zs&&D("-->")){C(fe.HtmlCommentClose,3),V();continue}if(z===zs&&D("--!>")){C(fe.HtmlCommentClose,4),V();continue}$(),c=n(f,c+1,o,k,_);break}case Ee.RawText:{let z=f.charCodeAt(c);if(z===Vn&&I())continue;if(z===Ii&&D("</")&&Y(c)){V(),O="",C(fe.HtmlCloseTagOpen,2),q(Ee.HtmlTag);continue}$(),c=n(f,c+1,o,k,_);break}default:(0,bO.assertNever)(o)}return M(),r.push({type:fe.EndOfInput,start:e.length,end:e.length}),r}function wo(e,t,n,r,i){switch(n){case Ee.Default:return RH(e,t);case Ee.HtmlTag:return jH(e,t,i);case Ee.QuotedValue:return BH(e,t,r);case Ee.LiquidTag:return _O(e,t,"%}");case Ee.LiquidVariableOutput:return _O(e,t,"}}");case Ee.RawText:return FH(e,t);case Ee.HtmlComment:return DH(e,t);default:return(0,bO.assertNever)(n)}}var kO=34,SO=39,zs=45,TO=47,Ii=60,wO=61,xv=62,Vn=123;function RH(e,t){for(let n=t;n<e.length;n++){let r=e.charCodeAt(n);if(r===Vn||r===Ii||r===zs)return n}return e.length}function DH(e,t){for(let n=t;n<e.length;n++){let r=e.charCodeAt(n);if(r===Vn||r===zs)return n}return e.length}function jH(e,t,n){for(let r=t;r<e.length;r++){let i=e.charCodeAt(r);if(i===Vn||i===TO||i===xv||i===wO||i===kO||i===SO||EO(i)||xO(i)!==n)return r}return e.length}function BH(e,t,n){let r=n.charCodeAt(0),i=AO(n).charCodeAt(0),s=Math.min(t+16,e.length);for(let o=t;o<s;o++){let c=e.charCodeAt(o);if(c===Vn||c===r||c===i)return o}if(s===e.length)return s;let a=n==='"'?CH:n==="'"?LH:void 0;if(a)return a.lastIndex=s,a.exec(e)?.index??e.length;for(let o=s;o<e.length;o++){let c=e.charCodeAt(o);if(c===Vn||c===r||c===i)return o}return e.length}function FH(e,t){for(let n=t;n<e.length;n++){let r=e.charCodeAt(n);if(r===Vn||r===Ii)return n}return e.length}function _O(e,t,n){let r=e.indexOf(n,t);return r===-1?e.length:r>t&&e.charCodeAt(r-1)===zs?r-1:r}function vO(e){return e>=97&&e<=122||e>=65&&e<=90||e===Vn}function xO(e){return e<160?e===32||e>=9&&e<=13:e===160||e===5760||e>=8192&&e<=8202||e===8232||e===8233||e===8239||e===8287||e===12288||e===65279}var Ee;(function(e){e.Default="Default",e.HtmlTag="HtmlTag",e.QuotedValue="QuotedValue",e.LiquidTag="LiquidTag",e.LiquidVariableOutput="LiquidVariableOutput",e.RawText="RawText",e.HtmlComment="HtmlComment"})(Ee||(Ee={}));function EO(e){return e===8216||e===8217||e===8220||e===8221}function AO(e){switch(e){case"\u201C":return"\u201D";case"\u201D":return"\u201C";case"\u2018":return"\u2019";case"\u2019":return"\u2018";default:return e}}});var ir=x(Eo=>{"use strict";p();var VH=Eo&&Eo.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Eo,"__esModule",{value:!0});Eo.LiquidHTMLASTParsingError=void 0;var $H=VH(U_()),Ev=class extends SyntaxError{loc;unclosed;constructor(t,n,r,i,s){super(t),this.name="LiquidHTMLParsingError",this.unclosed=s??null;let a=(0,$H.default)(n),o=Math.max(0,n.length-1),c=a.fromIndex(Math.min(Math.max(r,0),o)),l=a.fromIndex(Math.min(Math.max(i,0),o));this.loc={start:{line:c?.line??1,column:c?.col??1},end:{line:l?.line??1,column:l?.col??1}}}};Eo.LiquidHTMLASTParsingError=Ev});var OO=x(Bd=>{"use strict";p();Object.defineProperty(Bd,"__esModule",{value:!0});Bd.ParserBase=void 0;var Qt=kn(),UH=ir(),HH=ni(),Av=class{tokenizeOptions;tokens;source;p;rawBodyEnds;constructor(t,n,r,i){this.tokenizeOptions=r,this.tokens=t,this.source=n,this.p=0,i&&(this.rawBodyEnds=i),r?.rawTags&&(this.rawTagVersion=r.rawTags.tagRegistryVersion,this.inspectedRawBodyEnd=0,this.rawTagValidUntil=n.length)}consume(t){let n=this.tokens[this.p];if(n.type!==t)throw new UH.LiquidHTMLASTParsingError(`Expected ${t} but got ${n.type}`,this.source,n.start,n.end);return this.p++,n}accept(t){return this.tokens[this.p].type===t?this.tokens[this.p++]:null}check(t,n=0){let r=this.p+n;return r<this.tokens.length&&this.tokens[r].type===t}peek(){return this.tokens[this.p]}advance(){return this.tokens[this.p++]}isAtEnd(){return this.tokens[this.p].type===Qt.TokenType.EndOfInput}getSource(){return this.source}tokenAt(t){return this.tokens[t]}isTolerant(){return!1}hasToken(t){return t<this.tokens.length}tokenCount(){return this.tokens.length}tokenList(){return this.tokens}getPosition(){return this.p}rawBodyEndFor(t){if(this.tokens[this.p-1]===t)return this.rawBodyEnds?.[this.p-1]}setPosition(t){this.p=t}seekToSourceOffset(t){if(this.tokens[this.p]?.start===t&&this.tokens[this.p-1]?.start!==t)return;if(this.tokens[this.p+3]?.start===t&&this.tokens[this.p+2].start<t){this.p+=3;return}let n=0,r=this.tokens.length;for(;n<r;){let i=n+(r-n>>>1);this.tokens[i].start<t?n=i+1:r=i}this.p=n}ensureRawBoundary(t,n){this.tokenizeOptions?.rawTags&&(this.inspectedRawBodyEnd=Math.max(n,this.inspectedRawBodyEnd),!(this.rawTagVersion===this.tokenizeOptions.rawTags.tagRegistryVersion&&t<this.rawTagValidUntil&&n<=this.rawTagValidUntil)&&(this.rawTagValidUntil=this.recoverRawBoundaries(t,n),this.rawTagVersion=this.tokenizeOptions.rawTags.tagRegistryVersion))}retokenizeRawText(t,n,r){this.rawBodyEnds=void 0;let i=this.tokens.filter(l=>l.end<=t),s=this.tokenizeSlice(t,n,{rawText:!0}),a=this.tokens.findIndex(l=>l.type===Qt.TokenType.HtmlTagClose&&l.end===r),c=a!==-1&&this.tokens[a+1]?.start===r?[...this.tokenizeSlice(n,r),...this.tokens.slice(a+1)]:this.tokenizeSlice(n,this.source.length,{},!0);this.tokens=[...i,...s,...c],this.p=i.length}tokenizeSlice(t,n,r={},i=!1){let s=(0,Qt.tokenize)(this.source.slice(t,n),{...this.tokenizeOptions??{rawTags:HH.Environment.default(),parseHtml:!0},...r,skipFrontmatter:!0});i||s.pop();for(let a of s)a.start+=t,a.end+=t;return s}recoverRawBoundaries(t,n){this.rawBodyEnds=void 0,this.seekToSourceOffset(t);let r=this.tokens.slice(0,this.p),i=r.length-1,s=r[i]?.type===Qt.TokenType.HtmlTagClose?Qt.TokenType.HtmlTagOpen:Qt.TokenType.LiquidTagOpen;for(;i>0&&r[i].type!==s;)i--;let a=r.slice(0,i),o=!1,c=!1,l;for(let g of a)g.type===Qt.TokenType.HtmlCommentOpen?c=!0:g.type===Qt.TokenType.HtmlCommentClose&&(c=!1),g.type===Qt.TokenType.HtmlTagOpen||g.type===Qt.TokenType.HtmlCloseTagOpen||g.type===Qt.TokenType.HtmlDoctypeOpen?o=!0:g.type===Qt.TokenType.HtmlTagClose||g.type===Qt.TokenType.HtmlSelfClose?o=!1:g.type===Qt.TokenType.HtmlQuoteOpen?l=this.source[g.start]:g.type===Qt.TokenType.HtmlQuoteClose&&(l=void 0);let f=this.rawTextBound!==void 0,h=Math.min(this.rawTextBound??this.source.length,this.inspectedRawBodyEnd>n?this.inspectedRawBodyEnd:this.source.length),d=r[i]?.start??t;return this.tokens=a.concat(this.tokenizeSlice(d,h,{insideHtmlTag:!f&&o,insideQuotedAttribute:f?void 0:l,rawText:f,insideHtmlComment:!f&&c},h===this.source.length),h===this.source.length?[]:this.tokens.filter(g=>g.start>=h)),this.seekToSourceOffset(t),h}};Bd.ParserBase=Av});var Er=x(et=>{"use strict";p();Object.defineProperty(et,"__esModule",{value:!0});et.makeDocumentNode=zH;et.envelopeFromTokens=WH;et.makeLiquidTagBaseCase=GH;et.makeLiquidTagNamed=JH;et.makeLiquidBranchUnnamed=KH;et.makeLiquidBranchNamed=YH;et.makeLiquidRawTag=QH;et.makeLiquidVariableOutput=XH;et.makeTextNode=ZH;et.makeRawMarkup=e6;et.makeYamlFrontmatter=t6;et.makeHtmlElement=n6;et.makeHtmlVoidElement=r6;et.makeHtmlSelfClosingElement=i6;et.makeHtmlRawNode=s6;et.makeHtmlComment=a6;et.makeHtmlDoctype=o6;et.makeAttrDoubleQuoted=c6;et.makeAttrSingleQuoted=u6;et.makeAttrUnquoted=l6;et.makeAttrEmpty=f6;et.makeHtmlDanglingMarkerClose=d6;var ut=ze();function zH(e,t){return{type:ut.NodeTypes.Document,children:e,name:"#document",_source:t,position:{start:0,end:t.length},source:t}}function WH(e,t,n){let r=n.slice(e.end,t.start),i=r.trimStart(),s=r.length-i.length,a=i.search(/\s/),o=a===-1?i.trim():i.slice(0,a),l=s+o.length,f=r.slice(l),h=l;for(;h<r.length&&(r[h]===" "||r[h]===" ");)h++;let d=e.end+h,g=e.end-e.start>2?"-":"",v=t.end-t.start>2?"-":"";return{tagName:o,markupString:f,markupOffset:d,markupEnd:t.start,whitespaceStart:g,whitespaceEnd:v,blockStartPosition:{start:e.start,end:t.end},source:n}}function GH(e,t,n,r,i,s=!1){let a=n?n.end:e.blockStartPosition.end;return{type:ut.NodeTypes.LiquidTag,name:e.tagName,markup:s?e.markupString:e.markupString.trim(),children:t,whitespaceStart:e.whitespaceStart,whitespaceEnd:e.whitespaceEnd,delimiterWhitespaceStart:r?.start,delimiterWhitespaceEnd:r?.end,blockStartPosition:e.blockStartPosition,blockEndPosition:n,markupPosition:{start:e.markupOffset,end:e.markupEnd},position:{start:e.blockStartPosition.start,end:a},source:e.source,reason:i}}function JH(e,t,n,r,i){let s=r?r.end:e.blockStartPosition.end;return{type:ut.NodeTypes.LiquidTag,name:e.tagName,markup:t,children:n,whitespaceStart:e.whitespaceStart,whitespaceEnd:e.whitespaceEnd,delimiterWhitespaceStart:i?.start,delimiterWhitespaceEnd:i?.end,blockStartPosition:e.blockStartPosition,blockEndPosition:r,markupPosition:{start:e.markupOffset,end:e.markupEnd},position:{start:e.blockStartPosition.start,end:s},source:e.source}}function KH(e,t){return{type:ut.NodeTypes.LiquidBranch,name:null,markup:"",children:[],whitespaceStart:"",whitespaceEnd:"",markupPosition:{start:e,end:e},blockStartPosition:{start:e,end:e},blockEndPosition:{start:-1,end:-1},position:{start:e,end:e},source:t}}function YH(e,t){return{type:ut.NodeTypes.LiquidBranch,name:e.tagName,markup:t,children:[],whitespaceStart:e.whitespaceStart,whitespaceEnd:e.whitespaceEnd,markupPosition:{start:e.markupOffset,end:e.markupEnd},blockStartPosition:e.blockStartPosition,blockEndPosition:{start:-1,end:-1},position:{start:e.blockStartPosition.start,end:e.blockStartPosition.end},source:e.source}}function QH(e,t,n,r){let i=e.markupEnd;for(;i>e.markupOffset&&(e.source[i-1]===" "||e.source[i-1]===" ");)i--;return{type:ut.NodeTypes.LiquidRawTag,name:e.tagName,markup:e.markupString.trim(),markupPosition:{start:e.markupOffset,end:i},body:t,whitespaceStart:e.whitespaceStart,whitespaceEnd:e.whitespaceEnd,delimiterWhitespaceStart:r.start,delimiterWhitespaceEnd:r.end,blockStartPosition:e.blockStartPosition,blockEndPosition:n,position:{start:e.blockStartPosition.start,end:n.end},source:e.source}}function XH(e,t,n,r){return{type:ut.NodeTypes.LiquidVariableOutput,markup:n,whitespaceStart:e.end-e.start>2?"-":"",whitespaceEnd:t.end-t.start>2?"-":"",markupPosition:{start:e.end,end:t.start},position:{start:e.start,end:t.end},source:r}}function ZH(e,t,n,r){return{type:ut.NodeTypes.TextNode,value:e,position:{start:t,end:n},source:r}}function e6(e,t,n,r,i,s){return{type:ut.NodeTypes.RawMarkup,kind:e,value:t,nodes:n,position:{start:r,end:i},source:s}}function t6(e,t,n,r){return{type:ut.NodeTypes.YAMLFrontmatter,body:e,position:{start:t,end:n},source:r}}function n6(e,t,n,r,i,s){return{type:ut.NodeTypes.HtmlElement,name:e,attributes:t,children:n,blockStartPosition:r,blockEndPosition:i,position:{start:r.start,end:i.end},source:s}}function r6(e,t,n,r){return{type:ut.NodeTypes.HtmlVoidElement,name:e,attributes:t,blockStartPosition:n,position:n,source:r}}function i6(e,t,n,r){return{type:ut.NodeTypes.HtmlSelfClosingElement,name:e,attributes:t,blockStartPosition:n,position:n,source:r}}function s6(e,t,n,r,i,s){return{type:ut.NodeTypes.HtmlRawNode,name:e,attributes:t,body:n,blockStartPosition:r,blockEndPosition:i,position:{start:r.start,end:i.end},source:s}}function a6(e,t,n,r){return{type:ut.NodeTypes.HtmlComment,body:r.slice(t.end,n.start).trim(),children:e,blockStartPosition:t,blockEndPosition:n,position:{start:t.start,end:n.end},source:r}}function o6(e,t,n,r){return{type:ut.NodeTypes.HtmlDoctype,legacyDoctypeString:e,position:{start:t,end:n},source:r}}function c6(e,t,n,r,i,s){return{type:ut.NodeTypes.AttrDoubleQuoted,name:e,value:t,attributePosition:n,position:{start:r,end:i},source:s}}function u6(e,t,n,r,i,s){return{type:ut.NodeTypes.AttrSingleQuoted,name:e,value:t,attributePosition:n,position:{start:r,end:i},source:s}}function l6(e,t,n,r,i,s){return{type:ut.NodeTypes.AttrUnquoted,name:e,value:t,attributePosition:n,position:{start:r,end:i},source:s}}function f6(e,t,n,r){return{type:ut.NodeTypes.AttrEmpty,name:e,position:{start:t,end:n},source:r}}function d6(e,t,n,r){return{type:ut.NodeTypes.HtmlDanglingMarkerClose,name:e,blockStartPosition:{start:t,end:n},position:{start:t,end:n},source:r}}});var Ao=x(ri=>{"use strict";p();Object.defineProperty(ri,"__esModule",{value:!0});ri.ChildFilterMode=void 0;ri.filterChildren=p6;ri.mergeAdjacentTextNodes=Vd;ri.mergeAdjacentTextNodesTrimmed=qO;ri.mergeAdjacentTextNodesStripEdges=IO;ri.compoundNamesMatch=m6;var Fd=ze(),LO=Er(),h6=ti(),Au;(function(e){e[e.Syntactic=0]="Syntactic",e[e.Preserve=1]="Preserve",e[e.StripEdges=2]="StripEdges"})(Au||(ri.ChildFilterMode=Au={}));function p6(e,t,n){switch(e){case Au.Syntactic:return qO(t,n);case Au.Preserve:return Vd(t,n);case Au.StripEdges:return IO(t,n);default:(0,h6.assertNever)(e)}}function Gs(e){return e.type===Fd.NodeTypes.TextNode}function PO(e){return e.type===Fd.NodeTypes.LiquidVariableOutput}function Vd(e,t){if(e.length<=1)return e;let n=[],r=-1;for(let i=0;i<=e.length;i++){let s=e[i],a=r!==-1,o=s!==void 0&&Gs(s);if(o&&!a){r=i;continue}if(!o&&a){let c=i-1;if(r===c)n.push(e[r]);else{let l=e[r],f=e[c];n.push((0,LO.makeTextNode)(t.slice(l.position.start,f.position.end),l.position.start,f.position.end,t))}r=-1}s!==void 0&&!o&&n.push(s)}return n}function qO(e,t){let n=Vd(e,t);if(n.length===0)return n;let r=[];for(let i=0;i<n.length;i++){let s=n[i];if(!Gs(s)){r.push(s);continue}let a=s.value,o=s.position.start,c=s.position.end,l=n[i-1];if(!l||!Gs(l)){let h=a.trimStart(),d=a.length-h.length;a=h,o+=d}let f=n[i+1];if(!f||!Gs(f)){let h=a.trimEnd(),d=a.length-h.length;a=h,c-=d}a.length>0&&r.push((0,LO.makeTextNode)(a,o,c,t))}return r}function IO(e,t){let n=Vd(e,t),r=0,i=n.length;for(;r<i&&NO(n[r]);)r++;for(;i>r&&NO(n[i-1]);)i--;return r===0&&i===n.length?n:n.slice(r,i)}function NO(e){return Gs(e)&&/^\s+$/.test(e.value)}function m6(e,t){if(CO(e)&&CO(t))return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r.type!==i.type)return!1;if(Gs(r)&&Gs(i)){if(r.value!==i.value)return!1;continue}if(PO(r)&&PO(i)){let s=typeof r.markup=="string"?r.markup:r.markup.rawSource,a=typeof i.markup=="string"?i.markup:i.markup.rawSource;if(s!==a)return!1;continue}if(r.type===i.type&&"source"in r&&"source"in i){let s=r.source.slice(r.position.start,r.position.end),a=i.source.slice(i.position.start,i.position.end);if(s!==a)return!1;continue}return!1}return!0}function CO(e){return e.length===1&&(e[0].type===Fd.NodeTypes.LiquidTag||e[0].type===Fd.NodeTypes.LiquidRawTag)}});var RO=x(Ot=>{"use strict";p();Object.defineProperty(Ot,"__esModule",{value:!0});Ot.COMPARISON_OPERATORS=Ot.EQUALITY_OPERATORS=Ot.LOGICAL_OPERATORS=Ot.ComparisonOperator=Ot.EqualityOperator=Ot.LogicalOperator=void 0;Ot.isBinaryExpression=Ov;Ot.adaptConditional=$d;Ot.adaptComplex=_6;var sr=ze(),MO=ti(),Ou;(function(e){e.And="and",e.Or="or"})(Ou||(Ot.LogicalOperator=Ou={}));var Pu;(function(e){e.Equal="==",e.NotEqual="!="})(Pu||(Ot.EqualityOperator=Pu={}));var Mi;(function(e){e.LessThan="<",e.GreaterThan=">",e.LessThanOrEqual="<=",e.GreaterThanOrEqual=">=",e.Contains="contains"})(Mi||(Ot.ComparisonOperator=Mi={}));Ot.LOGICAL_OPERATORS=new Set(Object.values(Ou));Ot.EQUALITY_OPERATORS=new Set(Object.values(Pu));Ot.COMPARISON_OPERATORS=new Set(Object.values(Mi));function Ov(e){return"kind"in e}function g6(e){switch(e){case Ou.And:return"and";case Ou.Or:return"or";default:return(0,MO.assertNever)(e)}}function y6(e){switch(e){case Pu.Equal:return sr.Comparators.EQUAL;case Pu.NotEqual:return sr.Comparators.NOT_EQUAL;case Mi.LessThan:return sr.Comparators.LESS_THAN;case Mi.GreaterThan:return sr.Comparators.GREATER_THAN;case Mi.LessThanOrEqual:return sr.Comparators.LESS_THAN_OR_EQUAL;case Mi.GreaterThanOrEqual:return sr.Comparators.GREATER_THAN_OR_EQUAL;case Mi.Contains:return sr.Comparators.CONTAINS;default:return e}}function $d(e){if(!Ov(e))return e;switch(e.kind){case"logical":{let t=$d(e.right);return t.type===sr.NodeTypes.LogicalExpression&&(t.position={...t.position,start:e.opStart}),{type:sr.NodeTypes.LogicalExpression,relation:g6(e.op),left:$d(e.left),right:t,position:e.position,source:e.source}}case"comparison":return{type:sr.NodeTypes.Comparison,comparator:y6(e.op),left:e.left,right:e.right,position:e.position,source:e.source};default:return(0,MO.assertNever)(e)}}function _6(e){return Ov(e)?{type:sr.NodeTypes.BooleanExpression,condition:$d(e),position:e.position,source:e.source}:e}});var Js=x(Ud=>{"use strict";p();Object.defineProperty(Ud,"__esModule",{value:!0});Ud.MarkupParser=void 0;var Ri=ir(),v6=Ks(),Nu=RO(),pt=ze(),H=At(),Nv=class e{static WORD_SEGMENT_RE=/[\w-]+\??/y;tokens;source;p;markupStart;markupEnd;lax;tolerant;inCondition;constructor(t,n,r,i){this.tokens=t,this.source=n,this.p=0,this.markupStart=r??t[0]?.start??0,this.markupEnd=i??this.computeLastTokenEnd(),this.lax=!1,this.tolerant=!1,this.inCondition=!1}enableLax(){return this.lax=!0,this}isLax(){return this.lax}enableTolerant(){return this.tolerant=!0,this}isTolerant(){return this.tolerant}consumeRawUntil(t){let n=this.peek().start,r=n;for(;!this.isAtEnd()&&this.peek().type!==t;)r=this.peek().end,this.p+=1;return this.source.slice(n,r).trim()}discardRemaining(){for(;!this.isAtEnd();)this.p+=1}discardTrailing(){this.lax&&this.discardRemaining()}atValueStart(){switch(this.peek().type){case H.MarkupTokenType.String:case H.MarkupTokenType.Number:case H.MarkupTokenType.Id:case H.MarkupTokenType.OpenSquare:case H.MarkupTokenType.OpenRound:return!0;case H.MarkupTokenType.Dash:return this.lax;default:return!1}}atArgumentStart(){switch(this.peek().type){case H.MarkupTokenType.String:case H.MarkupTokenType.Number:case H.MarkupTokenType.Id:case H.MarkupTokenType.OpenSquare:case H.MarkupTokenType.OpenRound:return!0;default:return!1}}openSquareContinuesLookup(t,n){return this.lax?!/\S/.test(this.source.slice(t,n.start)):!0}skipToNextPipe(){for(;!this.isAtEnd()&&!this.look(H.MarkupTokenType.Pipe);)this.p+=1}consume(t){let n=this.tokens[this.p];if(n.type!==t)throw new Ri.LiquidHTMLASTParsingError(`Expected ${t} but found ${n.type} (${n.value})`,this.source,n.start,n.end);return this.p+=1,n}consumeOptional(t){let n=this.tokens[this.p];return n.type!==t?null:(this.p+=1,n)}look(t,n=0){let r=this.p+n;return r<0||r>=this.tokens.length?!1:this.tokens[r].type===t}peek(){return this.tokens[this.p]}id(t){let n=this.tokens[this.p];return n.type!==H.MarkupTokenType.Id||n.value!==t?!1:(this.p+=1,!0)}isAtEnd(){return this.tokens[this.p].type===H.MarkupTokenType.EndOfString}eosStart(){return this.tokens[this.tokens.length-1].start}bodyContext(){for(;!this.isAtEnd();)this.p++;return{source:this.source,bodyStart:this.markupStart,bodyEnd:this.markupEnd}}remainingSource(){let t=this.tokens[this.p];if(t.type===H.MarkupTokenType.EndOfString)return"";let n=this.tokens[this.tokens.length-1];return this.source.slice(t.start,n.start).trim()}valueExpression(){let t=this.peek();switch(t.type){case H.MarkupTokenType.String:return this.p+=1,{type:pt.NodeTypes.String,single:t.value[0]==="'",value:t.value.slice(1,-1),position:{start:t.start,end:t.end},source:this.source};case H.MarkupTokenType.Number:{if(this.lax){let n=this.tokens[this.p+1];if(n&&n.type===H.MarkupTokenType.Id&&n.start===t.end)return this.p+=2,{type:pt.NodeTypes.VariableLookup,name:this.source.slice(t.start,n.end),lookups:[],position:{start:t.start,end:n.end},source:this.source};if(this.laxLookupSeparatorFollows(t.end))return this.variableLookup()}return this.p+=1,{type:pt.NodeTypes.Number,value:t.value,position:{start:t.start,end:t.end},source:this.source}}case H.MarkupTokenType.Id:{let n=this.tokens[this.p+1],r=n?.type===H.MarkupTokenType.OpenSquare&&this.openSquareContinuesLookup(t.end,n);return k6(t.value)&&!this.look(H.MarkupTokenType.Dot,1)&&!r&&!(this.lax&&this.laxLookupSeparatorFollows(t.end))?(this.p+=1,{type:pt.NodeTypes.LiquidLiteral,keyword:t.value,value:v6.LiquidLiteralValues[t.value],position:{start:t.start,end:t.end},source:this.source}):this.variableLookup()}case H.MarkupTokenType.OpenSquare:return this.variableLookup();case H.MarkupTokenType.Dot:if(this.lax){let n=this.tokens[this.p+1];if(n&&n.type===H.MarkupTokenType.Number&&n.start===t.end){let r=n.value.split(".")[0],i=n.end,s=2;if(!n.value.includes(".")){let a=this.tokens[this.p+s];for(;a&&a.start===i&&!a.value.includes(".")&&(a.type===H.MarkupTokenType.Id||a.type===H.MarkupTokenType.Dash||a.type===H.MarkupTokenType.Number);)r+=a.value,i=a.end,s+=1,a=this.tokens[this.p+s]}return this.p+=s,{type:pt.NodeTypes.VariableLookup,name:r,lookups:[],position:{start:t.start,end:i},source:this.source}}}throw new Ri.LiquidHTMLASTParsingError(`Expected expression but found ${t.type} (${t.value})`,this.source,t.start,t.end);case H.MarkupTokenType.OpenRound:{let n=this.consume(H.MarkupTokenType.OpenRound);if(this.lax&&!this.parenContainsRange()){let o=this.consumeRawUntil(H.MarkupTokenType.CloseRound);return this.consumeOptional(H.MarkupTokenType.CloseRound),this.discardRemaining(),{type:pt.NodeTypes.VariableLookup,name:o,lookups:[],position:{start:n.start,end:this.eosStart()},source:this.source}}let r=this.valueExpression();if(this.consume(H.MarkupTokenType.DotDot),this.lax)for(;this.look(H.MarkupTokenType.Dot)||this.look(H.MarkupTokenType.DotDot);)this.p+=1;let i=this.valueExpression(),s=this.lax?this.consumeOptional(H.MarkupTokenType.CloseRound):this.consume(H.MarkupTokenType.CloseRound),a=s?s.end:i.position.end;return{type:pt.NodeTypes.Range,start:r,end:i,position:{start:n.start,end:a},source:this.source}}case H.MarkupTokenType.Dash:if(this.lax)return this.p+=1,{type:pt.NodeTypes.VariableLookup,name:"-",lookups:[],position:{start:t.start,end:t.end},source:this.source};throw new Ri.LiquidHTMLASTParsingError(`Expected expression but found ${t.type} (${t.value})`,this.source,t.start,t.end);default:throw new Ri.LiquidHTMLASTParsingError(`Expected expression but found ${t.type} (${t.value})`,this.source,t.start,t.end)}}parenContainsRange(){let t=0;for(let n=this.p;n<this.tokens.length;n++){let r=this.tokens[n];if(r.type===H.MarkupTokenType.EndOfString)break;if(r.type===H.MarkupTokenType.OpenRound)t+=1;else if(r.type===H.MarkupTokenType.CloseRound){if(t===0)break;t-=1}else if(r.type===H.MarkupTokenType.DotDot&&t===0)return!0}return!1}variableLookup(){let t,n,r=this.peek();if(r.type===H.MarkupTokenType.Id){let c=this.consume(H.MarkupTokenType.Id);t=c.value,n=c.start}else if(r.type===H.MarkupTokenType.OpenSquare)t=null,n=r.start;else if(this.lax&&r.type===H.MarkupTokenType.Number&&this.laxLookupSeparatorFollows(r.end))this.p+=1,t=r.value,n=r.start;else throw new Ri.LiquidHTMLASTParsingError(`Expected identifier or [ but found ${r.type} (${r.value})`,this.source,r.start,r.end);let i=[],s=[],a=t!==null?this.tokens[this.p-1].end:n,o=null;for(;!this.isAtEnd();)if(this.consumeOptional(H.MarkupTokenType.Dot)){let c=this.consume(H.MarkupTokenType.Id);i.push({type:pt.NodeTypes.String,value:c.value,position:{start:c.start,end:c.end},source:this.source}),s.push("bareword"),a=c.end}else if(this.look(H.MarkupTokenType.OpenSquare)&&this.openSquareContinuesLookup(a,this.peek())){this.consume(H.MarkupTokenType.OpenSquare);let c=this.valueExpression(),l=this.lax?this.consumeOptional(H.MarkupTokenType.CloseSquare):this.consume(H.MarkupTokenType.CloseSquare);if(i.push(c),s.push("subscript"),a=l?l.end:c.position.end,this.lax&&!l&&!this.look(H.MarkupTokenType.Dot)&&!this.look(H.MarkupTokenType.OpenSquare))break}else if(this.lax&&!this.inCondition&&(o=this.tryConsumeLaxLookupSeparator(a)))i.push({type:pt.NodeTypes.String,value:o.value,position:{start:o.start,end:o.end},source:this.source}),s.push("bareword"),a=o.end;else break;if(this.lax&&t===null&&i.length===1&&i[0].type===pt.NodeTypes.VariableLookup&&i[0].name===null&&i[0].lookups.length===1){let c=i[0].lookupModes?.[0];return{type:pt.NodeTypes.VariableLookup,name:null,lookups:[i[0].lookups[0]],lookupModes:c?[c]:["subscript"],position:{start:n,end:a},source:this.source}}return{type:pt.NodeTypes.VariableLookup,name:t,lookups:i,lookupModes:s,position:{start:n,end:a},source:this.source}}tryConsumeLaxLookupSeparator(t){let n=this.p,r=t;for(;n<this.tokens.length;){let c=this.tokens[n];if(c.type===H.MarkupTokenType.EndOfString||c.start!==r)return null;if(!((c.type===H.MarkupTokenType.Equality||c.type===H.MarkupTokenType.Comparison)&&/^[=<>!]+$/.test(c.value)))break;r=c.end,n+=1}if(n===this.p)return null;e.WORD_SEGMENT_RE.lastIndex=r;let i=e.WORD_SEGMENT_RE.exec(this.source);if(!i||i.index!==r)return null;let s=i[0],a=r+s.length,o=n;for(;o<this.tokens.length&&this.tokens[o].type!==H.MarkupTokenType.EndOfString&&this.tokens[o].start>=r&&this.tokens[o].end<=a;)o+=1;return this.p=o,{value:s,start:r,end:a}}laxLookupSeparatorFollows(t){let n=this.p+1,r=n,i=t;for(;r<this.tokens.length;){let a=this.tokens[r];if(a.type===H.MarkupTokenType.EndOfString||a.start!==i||!((a.type===H.MarkupTokenType.Equality||a.type===H.MarkupTokenType.Comparison)&&/^[=<>!]+$/.test(a.value)))break;i=a.end,r+=1}if(r===n)return!1;if(!this.inCondition)return!0;e.WORD_SEGMENT_RE.lastIndex=i;let s=e.WORD_SEGMENT_RE.exec(this.source);return!!s&&s.index===i}comparison(){this.lax&&this.inCondition&&this.skipLaxConditionParens();let t=this.valueExpression(),n=this.peek();if(this.lax&&this.inCondition&&n.type!==H.MarkupTokenType.Logical){let i=this.laxConditionOperatorRun(t.position.end);if(i&&!Pv(i.value))return this.unknownOperatorComparison(t,i);if(i&&Pv(i.value)&&n.type!==H.MarkupTokenType.Comparison&&n.type!==H.MarkupTokenType.Equality)return this.mergedOperatorComparison(t,i)}if(n.type!==H.MarkupTokenType.Comparison&&n.type!==H.MarkupTokenType.Equality)return this.lax&&this.consumeOptional(H.MarkupTokenType.CloseRound),t;if(!Pv(n.value)){if(this.lax)return t;throw new Ri.LiquidHTMLASTParsingError(`Unknown operator ${n.value}`,this.source,n.start,n.end)}if(this.p+=1,this.lax&&!this.atValueStart())return t;let r=this.valueExpression();return this.lax&&this.consumeOptional(H.MarkupTokenType.CloseRound),{kind:"comparison",left:t,op:n.value,right:r,position:{start:t.position.start,end:r.position.end},source:this.source}}laxConditionOperatorRun(t){let n=t;for(;n<this.markupEnd&&/\s/.test(this.source[n]);)n+=1;let r=/^[=!<>a-z_]+/.exec(this.source.slice(n,this.markupEnd));return r?{value:r[0],start:n,end:n+r[0].length}:null}unknownOperatorComparison(t,n){for(;this.peek().type!==H.MarkupTokenType.EndOfString&&this.peek().start<n.end;)this.p+=1;let r=t;if(this.atValueStart()){let i=this.p;try{r=this.valueExpression()}catch{for(this.p=i;this.peek().type!==H.MarkupTokenType.EndOfString&&this.peek().type!==H.MarkupTokenType.Logical;)this.p+=1;r=t}}return this.consumeOptional(H.MarkupTokenType.CloseRound),{kind:"comparison",left:t,op:n.value,right:r,position:{start:t.position.start,end:r.position.end},source:this.source}}mergedOperatorComparison(t,n){for(;this.peek().type!==H.MarkupTokenType.EndOfString&&this.peek().start<n.end;)this.p+=1;let r=this.source.slice(n.end,this.markupEnd),i=new e((0,H.tokenizeMarkup)(r,n.end),this.source,n.end,this.markupEnd).enableLax(),s={type:pt.NodeTypes.VariableLookup,name:null,lookups:[],position:{start:n.end,end:n.end},source:this.source};for(i.atValueStart()&&(s=i.valueExpression());this.peek().type!==H.MarkupTokenType.EndOfString&&this.peek().start<s.position.end;)this.p+=1;return this.consumeOptional(H.MarkupTokenType.CloseRound),{kind:"comparison",left:t,op:n.value,right:s,position:{start:t.position.start,end:s.position.end},source:this.source}}skipLaxConditionParens(){for(;this.look(H.MarkupTokenType.OpenRound)&&!this.parenAtCursorContainsRange();)this.p+=1}parenAtCursorContainsRange(){let t=0;for(let n=this.p;n<this.tokens.length;n++){let r=this.tokens[n];if(r.type===H.MarkupTokenType.EndOfString)break;if(r.type===H.MarkupTokenType.OpenRound)t+=1;else if(r.type===H.MarkupTokenType.CloseRound){if(t-=1,t===0)break}else if(r.type===H.MarkupTokenType.DotDot&&t===1)return!0}return!1}logicalExpr(){let t=this.comparison(),n=this.peek();if(n.type!==H.MarkupTokenType.Logical)return t;if(!b6(n.value)){if(this.lax)return t;throw new Ri.LiquidHTMLASTParsingError(`Unknown logical operator: ${n.value}`,this.source,n.start,n.end)}let r=n.start;this.p+=1;let i=this.logicalExpr();return{kind:"logical",left:t,op:n.value,right:i,opStart:r,position:{start:t.position.start,end:i.position.end},source:this.source}}conditionalExpression(){let t=this.inCondition;this.inCondition=!0;let n;try{n=(0,Nu.adaptConditional)(this.logicalExpr())}finally{this.inCondition=t}return this.lax&&this.discardRemaining(),n.type===pt.NodeTypes.LogicalExpression&&DO(n,this.eosStart()),n}expression(){return(0,Nu.adaptComplex)(this.logicalExpr())}liquidVariable(){let t=this.expression(),n=this.filters(t.position.end);this.lax&&this.discardRemaining();let r=n.length>0?n[n.length-1].position.end:t.position.end,i=t.position.start,a=this.tokens[this.tokens.length-1].start;return{type:pt.NodeTypes.LiquidVariable,expression:t,filters:n,rawSource:this.source.slice(i,r),position:{start:i,end:a},source:this.source}}filters(t=0){let n=[];for(;this.consumeOptional(H.MarkupTokenType.Pipe);){if((this.lax||this.tolerant)&&!this.look(H.MarkupTokenType.Id)){this.skipToNextPipe();continue}let r=this.filter(t);n.push(r),t=r.position.end,this.lax&&!this.isAtEnd()&&!this.look(H.MarkupTokenType.Pipe)&&this.skipToNextPipe()}return n}filter(t){let n=this.consume(H.MarkupTokenType.Id),r=[],i=n.end,s=this.consumeOptional(H.MarkupTokenType.Colon);if(s){i=s.end;let a=this.isAtEnd()||this.look(H.MarkupTokenType.Pipe),o=!/\S/.test(this.source.slice(s.end,this.peek().start));!(a&&o)&&(!(this.lax||this.tolerant)||this.atArgumentStart())&&(r=this.arguments()),r.length>0&&(i=r[r.length-1].position.end)}return{type:pt.NodeTypes.LiquidFilter,name:n.value,args:r,position:{start:t,end:i},source:this.source}}argument(){return this.look(H.MarkupTokenType.Id)&&this.lookaheadForNamedArgument()?this.namedArgument():this.valueExpression()}lookaheadForNamedArgument(){let t=1;for(;this.look(H.MarkupTokenType.Dot,t)&&this.look(H.MarkupTokenType.Id,t+1);)t+=2;return this.look(H.MarkupTokenType.Colon,t)}namedArgument(){let t=this.consume(H.MarkupTokenType.Id),n=t.value;for(;this.consumeOptional(H.MarkupTokenType.Dot);){let i=this.consume(H.MarkupTokenType.Id);n+="."+i.value}this.consume(H.MarkupTokenType.Colon);let r=this.valueExpression();return{type:pt.NodeTypes.NamedArgument,name:n,value:r,position:{start:t.start,end:r.position.end},source:this.source}}arguments(){let t=[];for(t.push(this.argument());this.consumeOptional(H.MarkupTokenType.Comma)&&!((this.lax||this.tolerant)&&!this.atArgumentStart());)t.push(this.argument());return t}namedArguments(){let t=[];for(t.push(this.namedArgument());this.consumeOptional(H.MarkupTokenType.Comma)&&this.look(H.MarkupTokenType.Id);)t.push(this.namedArgument());return t}blockNamedArguments(){let t=[];for(this.pushBlockNamedArgument(t);this.consumeOptional(H.MarkupTokenType.Comma)&&this.look(H.MarkupTokenType.Id);)this.pushBlockNamedArgument(t);return t}pushBlockNamedArgument(t){let n=this.consume(H.MarkupTokenType.Id),r=n.value;for(;this.consumeOptional(H.MarkupTokenType.Dot);){let a=this.consume(H.MarkupTokenType.Id);r+="."+a.value}this.consume(H.MarkupTokenType.Colon);let i=this.blockValueExpression(),s={start:n.start,end:i.position.end};t.push({type:pt.NodeTypes.NamedArgument,name:r,value:i,position:s,source:this.source})}blockValueExpression(){return this.look(H.MarkupTokenType.OpenSquare)?this.blockArrayLiteral():this.valueExpression()}assertNotNestedArray(){if(this.look(H.MarkupTokenType.OpenSquare)){let t=this.peek();throw new Ri.LiquidHTMLASTParsingError("nested arrays are not supported in block array literal",this.source,t.start,t.end)}}blockArrayLiteral(){let t=this.consume(H.MarkupTokenType.OpenSquare),n=[];for(;!this.look(H.MarkupTokenType.CloseSquare);)this.assertNotNestedArray(),n.push(this.valueExpression()),this.look(H.MarkupTokenType.CloseSquare)||this.consume(H.MarkupTokenType.Comma);let r=this.consume(H.MarkupTokenType.CloseSquare);return{type:"BlockArrayLiteral",elements:n,position:{start:t.start,end:r.end},source:this.source}}computeLastTokenEnd(){for(let t=this.tokens.length-1;t>=0;t--)if(this.tokens[t].type!==H.MarkupTokenType.EndOfString)return this.tokens[t].end;return this.tokens[0]?.start??0}};Ud.MarkupParser=Nv;function DO(e,t){e.type===pt.NodeTypes.LogicalExpression&&(e.position={...e.position,end:t},DO(e.right,t))}function Pv(e){return Nu.EQUALITY_OPERATORS.has(e)||Nu.COMPARISON_OPERATORS.has(e)}function b6(e){return Nu.LOGICAL_OPERATORS.has(e)}function k6(e){switch(e){case"nil":case"null":case"true":case"false":case"blank":case"empty":return!0;default:return!1}}});var jO=x(qv=>{"use strict";p();Object.defineProperty(qv,"__esModule",{value:!0});qv.parseLiquidVariableOutput=w6;var Cv=kn(),Lv=Er(),S6=Js(),T6=At();function w6(e){let t=e.consume(Cv.TokenType.LiquidVariableOutputOpen);e.accept(Cv.TokenType.Text);let n=e.consume(Cv.TokenType.LiquidVariableOutputClose),r=e.getSource(),i=r.slice(t.end,n.start);try{let s=(0,T6.tokenizeMarkup)(i,t.end),a=new S6.MarkupParser(s,r);e.isTolerant()&&a.enableTolerant();let o=a.liquidVariable();return a.isAtEnd()?(0,Lv.makeLiquidVariableOutput)(t,n,o,r):(0,Lv.makeLiquidVariableOutput)(t,n,i.trim(),r)}catch{return(0,Lv.makeLiquidVariableOutput)(t,n,i.trim(),r)}}});var Lu=x(ar=>{"use strict";p();Object.defineProperty(ar,"__esModule",{value:!0});ar.parseBlockTag=P6;ar.parseBlockBody=FO;ar.parseBranchedBody=VO;ar.finalizeBranch=Hd;ar.parseBranchMarkup=$O;ar.peekTagName=Rv;ar.isBlockTerminator=N6;ar.consumeEndTag=C6;ar.isBranchName=HO;var Sn=kn(),Ys=Er(),ii=Ao(),BO=ni(),Oo=ir(),x6=ze(),E6=ti(),Iv=Js(),Mv=At(),A6=gd(),O6=Tu();function P6(e,t,n,r){let i,s=!1,a;try{let c=r.start-n.markupString.length,l=(0,Mv.tokenizeMarkup)(n.markupString,c),f=new Iv.MarkupParser(l,e.getSource());e.isTolerant()&&f.enableTolerant(),i=t.parse(n.tagName,f,e),f.isAtEnd()?s=!0:(i=void 0,a="unexpected tokens after markup")}catch(c){i=void 0,a=c instanceof Error?c.message:"unknown error"}let o=e.blockAllowUnclosedHtml;e.blockAllowUnclosedHtml=L6.has(n.tagName);try{if(t.branches.length===0){let{children:h,endPosition:d,endWhitespace:g}=FO(e,n);return s?(0,Ys.makeLiquidTagNamed)(n,i,h,d,g):(0,Ys.makeLiquidTagBaseCase)(n,h,d,g,a)}let{branches:c,endPosition:l,endWhitespace:f}=VO(e,n,t);return s?(0,Ys.makeLiquidTagNamed)(n,i,c,l,f):(0,Ys.makeLiquidTagBaseCase)(n,c,l,f,a)}finally{e.blockAllowUnclosedHtml=o}}function FO(e,t){let n=t.tagName,r=[];for(;!e.isAtEnd();){if(e.check(Sn.TokenType.LiquidTagOpen)){let s=e.peekTagName();if(s===`end${n}`){let a=e.consumeEndTag();return{children:(0,ii.filterChildren)(ii.ChildFilterMode.Syntactic,r,e.getSource()),endPosition:a.position,endWhitespace:a.whitespace}}if(s&&s.startsWith("end")){let a=s.slice(3);if((0,BO.isStructuralEndTag)(a,e.blockEnv.tagForName(a)))throw new Oo.LiquidHTMLASTParsingError(`Attempting to close LiquidTag '${a}' before LiquidTag '${n}' was closed`,e.getSource(),t.blockStartPosition.start,t.blockStartPosition.end,Cu(t))}if(s&&(s==="else"||s==="elsif"||s==="when"))throw new Oo.LiquidHTMLASTParsingError(`Attempting to open LiquidBranch '${s}' before LiquidTag '${n}' was closed`,e.getSource(),t.blockStartPosition.start,t.blockStartPosition.end,Cu(t))}let i=e.getPosition();if(e.blockInAttributeContext&&!e.blockInAttributeValueContext?r.push(...e.parseBranchAttributes()):r.push(e.parseNodeInScope(r)),e.getPosition()===i){if(e.blockAllowUnclosedDocumentNode||UO(e,n),e.check(Sn.TokenType.LiquidTagOpen)){r.push(e.parseLiquidTag());continue}break}}{let i=(0,ii.filterChildren)(ii.ChildFilterMode.Syntactic,r,e.getSource()),s=e.peek().start,a={start:s,end:s};if(e.blockAllowUnclosedDocumentNode)return{children:i,endPosition:a,endWhitespace:{start:"",end:""}};throw new Oo.LiquidHTMLASTParsingError(`Attempting to end parsing before LiquidTag '${n}' was closed`,e.getSource(),t.blockStartPosition.start,t.blockStartPosition.end,Cu(t))}}function VO(e,t,n){let r=t.tagName,i=t.blockStartPosition.end,s=[],a=(0,Ys.makeLiquidBranchUnnamed)(i,e.getSource()),o=[],c=e.blockInAttributeValueContext?ii.ChildFilterMode.Preserve:ii.ChildFilterMode.Syntactic;for(;!e.isAtEnd();){if(e.check(Sn.TokenType.LiquidTagOpen)){let f=e.peekTagName();if(f===`end${r}`){Hd(a,o,e.peek().start,e.getSource(),c),s.push(a);let h=e.consumeEndTag();return{branches:s,endPosition:h.position,endWhitespace:h.whitespace}}if(HO(f)&&n.branches.includes(f)){Hd(a,o,e.peek().start,e.getSource(),c),s.push(a);let h=e.consume(Sn.TokenType.LiquidTagOpen);e.accept(Sn.TokenType.Text);let d=e.consume(Sn.TokenType.LiquidTagClose),g=(0,Ys.envelopeFromTokens)(h,d,e.getSource()),v=$O(e,f,g);a=(0,Ys.makeLiquidBranchNamed)(g,v),o=[];continue}if(f&&f.startsWith("end")){let h=f.slice(3);if((0,BO.isStructuralEndTag)(h,e.blockEnv.tagForName(h)))throw new Oo.LiquidHTMLASTParsingError(`Attempting to close LiquidTag '${h}' before LiquidTag '${r}' was closed`,e.getSource(),t.blockStartPosition.start,t.blockStartPosition.end,Cu(t))}}let l=e.getPosition();if(e.blockInAttributeContext&&!e.blockInAttributeValueContext?o.push(...e.parseBranchAttributes()):o.push(e.parseNodeInScope(o)),e.getPosition()===l){if(e.blockAllowUnclosedDocumentNode||UO(e,r),e.check(Sn.TokenType.LiquidTagOpen)){o.push(e.parseLiquidTag());continue}break}}{let l=e.peek().start;Hd(a,o,l,e.getSource(),c),s.push(a);let f={start:l,end:l};if(e.blockAllowUnclosedDocumentNode)return{branches:s,endPosition:f,endWhitespace:{start:"",end:""}};throw new Oo.LiquidHTMLASTParsingError(`Attempting to end parsing before LiquidTag '${r}' was closed`,e.getSource(),t.blockStartPosition.start,t.blockStartPosition.end,Cu(t))}}function Hd(e,t,n,r,i=ii.ChildFilterMode.StripEdges){let s=(0,ii.mergeAdjacentTextNodes)(t,r);if(e.children=(0,ii.filterChildren)(i,t,r),e.blockEndPosition={start:n,end:n},e.position.end=n,s.length>0){let a=s[s.length-1].position.end;a>n&&(e.position.end=a)}}function $O(e,t,n){let r=n.whitespaceEnd==="-"?3:2,s=n.blockStartPosition.end-r-n.markupString.length;switch(t){case"elsif":try{let a=(0,Mv.tokenizeMarkup)(n.markupString,s),o=new Iv.MarkupParser(a,e.getSource());e.isTolerant()&&o.enableTolerant();let c=(0,A6.elsifBranchParse)(t,o);return o.isAtEnd()?c:n.markupString.trim()}catch{return n.markupString.trim()}case"when":try{let a=(0,Mv.tokenizeMarkup)(n.markupString,s),o=new Iv.MarkupParser(a,e.getSource());e.isTolerant()&&o.enableTolerant();let c=(0,O6.whenBranchParse)(t,o);return o.isAtEnd()?c:n.markupString.trim()}catch{return n.markupString.trim()}case"else":return"";default:return(0,E6.assertNever)(t)}}function Rv(e){if(!e.check(Sn.TokenType.LiquidTagOpen))return null;let n=(e.check(Sn.TokenType.Text,1)?e.getSource().slice(e.tokenAt(e.getPosition()+1).start,e.tokenAt(e.getPosition()+1).end):"").trimStart(),r=n.search(/\s/);return r===-1?n.trim():n.slice(0,r)}function N6(e){if(!e.check(Sn.TokenType.LiquidTagOpen))return!1;let t=Rv(e);return t?t.startsWith("end")||t==="elsif"||t==="else"||t==="when":!1}function Cu(e){return{type:x6.NodeTypes.LiquidTag,name:e.tagName,blockStartPosition:e.blockStartPosition}}function UO(e,t){let n=e.peek(),r=Rv(e);throw new Oo.LiquidHTMLASTParsingError(`Unexpected Liquid tag '${r??n.type}' inside LiquidTag '${t}'`,e.getSource(),n.start,n.end)}function C6(e){let t=e.consume(Sn.TokenType.LiquidTagOpen);e.accept(Sn.TokenType.Text);let n=e.consume(Sn.TokenType.LiquidTagClose),r=t.end-t.start>2?"-":"",i=n.end-n.start>2?"-":"";return{position:{start:t.start,end:n.end},whitespace:{start:r,end:i}}}function HO(e){return e==="elsif"||e==="else"||e==="when"}var L6=new Set(["if","unless","case"])});var $v=x(ji=>{"use strict";p();Object.defineProperty(ji,"__esModule",{value:!0});ji.ParamTokenType=ji.LiquidDocTokenType=void 0;ji.tokenizeLiquidDoc=q6;ji.tokenizeParamContent=I6;var No;(function(e){e.Annotation="Annotation",e.TextLine="TextLine",e.Newline="Newline",e.EndOfInput="EndOfInput"})(No||(ji.LiquidDocTokenType=No={}));var Di;(function(e){e.Type="Type",e.OptionalName="OptionalName",e.Word="Word",e.Dash="Dash",e.Text="Text",e.EndOfInput="EndOfInput"})(Di||(ji.ParamTokenType=Di={}));function q6(e,t){let n=[],r=0,i=!1;for(;r<e.length;){if(jv.lastIndex=r,jv.test(e)){let f=jv.lastIndex;n.push({type:No.Newline,value:e.slice(r,f),start:r+t,end:f+t}),r=f,i=!1;continue}Po.lastIndex=r;let s=Po.test(e)?Po.lastIndex:r;if(Dv.lastIndex=s,Dv.test(e)){let f=Dv.lastIndex;n.push({type:No.Annotation,value:e.slice(s+1,f),start:s+t,end:f+t}),r=f,i=!0,Po.lastIndex=r,Po.test(e)&&(r=Po.lastIndex);continue}let a=e.indexOf(`
|
|
29
|
+
`,r),o=a===-1?e.length:a,c=o;if(!i){let f=e.slice(r,o);zO.lastIndex=0;let h=zO.exec(f);h&&(c=r+h.index+1)}let l=e.slice(r,c);l.length>0&&n.push({type:No.TextLine,value:l,start:r+t,end:c+t}),r=c,i=!1}return n.push({type:No.EndOfInput,value:"",start:e.length+t,end:e.length+t}),n}function I6(e,t){let n=[],r=0;for(;r<e.length;){if(Vv.lastIndex=r,Vv.test(e)){r=Vv.lastIndex;continue}let i=M6(e,r);if(i!==void 0){n.push({type:Di.Type,value:e.slice(r+1,i-1),start:r+t,end:i+t}),r=i;continue}if(Bv.lastIndex=r,Bv.test(e)){let a=Bv.lastIndex;n.push({type:Di.OptionalName,value:e.slice(r+1,a-1),start:r+t,end:a+t}),r=a;continue}if(e[r]==="-"&&(r+1>=e.length||e[r+1]===" "||e[r+1]===" ")){n.push({type:Di.Dash,value:"-",start:r+t,end:r+1+t}),r+=1;continue}if(Fv.lastIndex=r,Fv.test(e)){let a=Fv.lastIndex;n.push({type:Di.Word,value:e.slice(r,a),start:r+t,end:a+t}),r=a;continue}let s=e.slice(r);n.push({type:Di.Text,value:s,start:r+t,end:e.length+t}),r=e.length}return n.push({type:Di.EndOfInput,value:"",start:e.length+t,end:e.length+t}),n}function M6(e,t){if(e[t]==="{")for(let n=t+1;n<e.length;n++){let r=e[n];if(r==="'"||r==='"'){let i=e.indexOf(r,n+1);if(i===-1){let s=e.indexOf("}",n+1);return s===-1?void 0:s+1}n=i;continue}if(r==="}")return n+1}}var Dv=/@(\w+)/y,Po=/[ \t]+/y,jv=/\r?\n/y,zO=/.@\w+/g,Bv=/\[([^\]]*)\]/y,Fv=/[\w][\w-]*/y,Vv=/[ \t]+/y});var WO=x(Qs=>{"use strict";p();Object.defineProperty(Qs,"__esModule",{value:!0});Qs.makeTextNode=R6;Qs.makeLiquidDocParamNode=D6;Qs.makeLiquidDocDescriptionNode=j6;Qs.makeLiquidDocExampleNode=B6;Qs.makeLiquidDocPromptNode=F6;var qu=ze();function R6(e,t,n,r){return{type:qu.NodeTypes.TextNode,value:e,position:{start:t,end:n},source:r}}function D6(e,t,n,r,i,s,a){return{type:qu.NodeTypes.LiquidDocParamNode,name:"param",paramName:e,paramType:t,paramDescription:n,required:r,position:{start:i,end:s},source:a}}function j6(e,t,n,r,i,s){return{type:qu.NodeTypes.LiquidDocDescriptionNode,name:"description",content:e,isImplicit:t,isInline:n,position:{start:r,end:i},source:s}}function B6(e,t,n,r,i){return{type:qu.NodeTypes.LiquidDocExampleNode,name:"example",content:e,isInline:t,position:{start:n,end:r},source:i}}function F6(e,t,n,r){return{type:qu.NodeTypes.LiquidDocPromptNode,name:"prompt",content:e,position:{start:t,end:n},source:r}}});var JO=x(Iu=>{"use strict";p();Object.defineProperty(Iu,"__esModule",{value:!0});Iu.LiquidDocParser=void 0;Iu.parseLiquidDoc=$6;var we=$v(),GO=$v(),We=WO(),V6=ti();function $6(e,t,n){let r=(0,GO.tokenizeLiquidDoc)(e,t);return new zd(r,n).parse()}var zd=class{tokens;source;p;constructor(t,n){this.tokens=t,this.source=n,this.p=0}parse(){let t=[];for(this.skipBlankLines(),this.check(we.LiquidDocTokenType.TextLine)&&t.push(this.parseImplicitDescription()),this.skipBlankLines();!this.isAtEnd();){if(this.check(we.LiquidDocTokenType.Newline)){this.skipNewlines();continue}if(this.check(we.LiquidDocTokenType.Annotation)){t.push(this.parseAnnotation());continue}if(this.check(we.LiquidDocTokenType.TextLine)&&this.peek().value.trim()===""){this.advance();continue}if(this.check(we.LiquidDocTokenType.TextLine)){let{value:r,startPos:i,endPos:s}=this.collectContentLines({trimTrailingNewlines:!0});r.trim().length>0&&t.push((0,We.makeTextNode)(r,i,s,this.source));continue}let n=this.advance();t.push((0,We.makeTextNode)(n.value,n.start,n.end,this.source))}return t}parseImplicitDescription(){let{value:t,startPos:n,endPos:r}=this.collectContentLines(),i=(0,We.makeTextNode)(t,n,r,this.source);return(0,We.makeLiquidDocDescriptionNode)(i,!0,!0,n,r,this.source)}parseAnnotation(){let t=this.consume(we.LiquidDocTokenType.Annotation),n=t.value;if(n!==Tn.Description&&n.startsWith(Tn.Description))return this.parseGluedDescription(t);if(!U6(n))return this.parseUnsupportedAnnotation(t);switch(n){case Tn.Param:return this.parseParam(t);case Tn.Description:return this.parseDescription(t);case Tn.Example:return this.parseExample(t);case Tn.Prompt:return this.parsePrompt(t);default:(0,V6.assertNever)(n)}}parseParam(t){let n=t.start,r=this.accept(we.LiquidDocTokenType.TextLine);if(!r){let y=(0,We.makeTextNode)("",t.end,t.end,this.source);return(0,We.makeLiquidDocParamNode)(y,null,null,!0,n,t.end,this.source)}let i=new Uv((0,GO.tokenizeParamContent)(r.value,r.start)),s=null,a=i.accept(we.ParamTokenType.Type);a&&(s=(0,We.makeTextNode)(a.value,a.start+1,a.end-1,this.source));let o,c,l=i.accept(we.ParamTokenType.OptionalName);if(l)c=!1,o=(0,We.makeTextNode)(l.value,l.start+1,l.end-1,this.source);else{c=!0;let y=i.accept(we.ParamTokenType.Word);y?o=(0,We.makeTextNode)(y.value,y.start,y.end,this.source):o=(0,We.makeTextNode)("",t.end,t.end,this.source)}let f=null,h=i.accept(we.ParamTokenType.Dash),d=-1,g=-1;for(;!i.isAtEnd();){let y=i.advance();d===-1&&(d=y.start),g=y.end}let v=d!==-1?this.source.slice(d,g):"",{value:b,startPos:_,endPos:k}=this.collectContentLines({stopAtParagraphBreak:!0,trimTrailingNewlines:!0}),T=b.trim().length>0;if(v||T){let y=T?v+b:v,A=d!==-1?d:h?h.end+1:t.end,P=T?k:g;f=(0,We.makeTextNode)(y,A,P,this.source)}let w=f?.position.end??r.end;return(0,We.makeLiquidDocParamNode)(o,s,f,c,n,w,this.source)}parseDescription(t){let n=t.start,r=this.accept(we.LiquidDocTokenType.TextLine);if(r!==null){let{value:f,endPos:h}=this.collectContentLines(),d=f.trim().length>0,g=d?r.value+f:r.value,v=d?h:r.end,b=(0,We.makeTextNode)(g,r.start,v,this.source);return(0,We.makeLiquidDocDescriptionNode)(b,!1,!0,n,v,this.source)}this.skipBlankLines();let{value:s,startPos:a,endPos:o}=this.collectContentLines(),c=s?a:t.end,l=(0,We.makeTextNode)(s||"",c,s?o:c,this.source);return(0,We.makeLiquidDocDescriptionNode)(l,!1,!1,n,s?o:c,this.source)}parseGluedDescription(t){let n=t.start,r=n+1+Tn.Description.length,i=this.accept(we.LiquidDocTokenType.TextLine),{value:s,endPos:a}=this.collectContentLines(),o=s.trim().length>0,c;o?c=a:i?c=i.end:c=t.end;let l=(0,We.makeTextNode)(this.source.slice(r,c),r,c,this.source);return(0,We.makeLiquidDocDescriptionNode)(l,!1,!0,n,c,this.source)}parseExample(t){let n=t.start,r=this.accept(we.LiquidDocTokenType.TextLine);if(r!==null){let{value:f,endPos:h}=this.collectContentLines(),d=f.trim().length>0,g=d?r.value+f:r.value,v=d?h:r.end,b=(0,We.makeTextNode)(g,r.start,v,this.source);return(0,We.makeLiquidDocExampleNode)(b,!0,n,v,this.source)}this.skipBlankLines();let{value:s,startPos:a,endPos:o}=this.collectContentLines(),c=s?a:t.end,l=(0,We.makeTextNode)(s||"",c,s?o:c,this.source);return(0,We.makeLiquidDocExampleNode)(l,!1,n,s?o:c,this.source)}parsePrompt(t){let n=t.start,{value:r,startPos:i,endPos:s}=this.collectContentLines(),a=r?i:t.end,o=(0,We.makeTextNode)(r||"",a,r?s:a,this.source);return(0,We.makeLiquidDocPromptNode)(o,n,r?s:a,this.source)}parseUnsupportedAnnotation(t){let n=t.start,r=this.accept(we.LiquidDocTokenType.TextLine);if(r){let s=this.source.slice(n,r.end);return(0,We.makeTextNode)(s,n,r.end,this.source)}let i="@"+t.value;return(0,We.makeTextNode)(i,n,t.end,this.source)}peek(){return this.tokens[this.p]}consume(t){let n=this.peek();if(n.type!==t)throw new Error(`Expected ${t} but found ${n.type} (${JSON.stringify(n.value)})`);return this.advance(),n}accept(t){return this.peek().type!==t?null:this.advance()}check(t){return this.tokens[this.p].type===t}isAtEnd(){return this.check(we.LiquidDocTokenType.EndOfInput)}advance(){return this.tokens[this.p++]}skipNewlines(){let t=!1;for(;this.check(we.LiquidDocTokenType.Newline);)this.advance(),t=!0;return t}skipBlankLines(){for(;!this.isAtEnd();){if(this.check(we.LiquidDocTokenType.Newline)){this.advance();continue}if(this.check(we.LiquidDocTokenType.TextLine)&&this.peek().value.trim()===""){this.advance();continue}break}}collectContentLines(t={}){let{stopAtParagraphBreak:n=!1,trimTrailingNewlines:r=!1}=t,i="",s=this.tokens[this.p]?.start??this.tokens[this.p-1].end,a=s;for(;!this.isAtEnd();){let o=this.peek();if(this.check(we.LiquidDocTokenType.Annotation))break;if(this.check(we.LiquidDocTokenType.Newline)){let l=this.p+1;for(;l<this.tokens.length;){let h=this.tokens[l];if(h.type===we.LiquidDocTokenType.Newline){l++;continue}if(h.type===we.LiquidDocTokenType.TextLine&&h.value.trim()===""){l++;continue}break}let f=l-this.p;if(n&&f>=2&&l<this.tokens.length&&this.tokens[l].type===we.LiquidDocTokenType.TextLine&&this.tokens[l].value.trim()!=="")break;if(l<this.tokens.length&&this.tokens[l].type===we.LiquidDocTokenType.Annotation){for(;this.p<l&&(this.check(we.LiquidDocTokenType.Newline)||this.check(we.LiquidDocTokenType.TextLine)&&this.peek().value.trim()==="");)r||(this.check(we.LiquidDocTokenType.Newline)&&(i+=`
|
|
30
|
+
`),a=this.peek().end),this.advance();break}if(l>=this.tokens.length||this.tokens[l].type===we.LiquidDocTokenType.EndOfInput){for(;!this.isAtEnd()&&(this.check(we.LiquidDocTokenType.Newline)||this.check(we.LiquidDocTokenType.TextLine)&&this.peek().value.trim()==="");)r||(this.check(we.LiquidDocTokenType.Newline)&&(i+=`
|
|
31
|
+
`),a=this.peek().end),this.advance();break}for(;this.p<l;)this.check(we.LiquidDocTokenType.Newline)&&(i+=`
|
|
32
|
+
`),this.advance();continue}if(this.check(we.LiquidDocTokenType.TextLine)&&o.value.trim()===""){this.advance();continue}if(i===""){let l=o.value.length-o.value.trimStart().length;s=o.start+l}let c=i===""?o.value.trimStart():o.value;i+=c,a=o.end,this.advance()}return{value:i,startPos:s,endPos:a}}};Iu.LiquidDocParser=zd;var Tn;(function(e){e.Param="param",e.Description="description",e.Example="example",e.Prompt="prompt"})(Tn||(Tn={}));function U6(e){return e===Tn.Param||e===Tn.Description||e===Tn.Example||e===Tn.Prompt}var Uv=class{tokens;p=0;constructor(t){this.tokens=t}accept(t){return this.tokens[this.p].type!==t?null:this.tokens[this.p++]}check(t){return this.tokens[this.p].type===t}isAtEnd(){return this.check(we.ParamTokenType.EndOfInput)}current(){return this.tokens[this.p]}advance(){return this.tokens[this.p++]}}});var Gd=x(Lo=>{"use strict";p();Object.defineProperty(Lo,"__esModule",{value:!0});Lo.parseRawTag=G6;Lo.parseLiquidInRange=YO;Lo.parseRawTagBody=QO;Lo.rawMarkupKindForTag=XO;var Co=kn(),Mu=Er(),Wd=Ao(),Bi=Ks(),KO=bo(),H6=ir(),z6=ze(),W6=JO();function G6(e,t,n,r){let i=n.tagName,s=e.rawBodyEndFor(r)??(0,KO.findRawBodyEnd)(e.getSource(),r.end,i,t.body,(0,KO.rawBodyRuleLookup)(d=>e.tagForName(d)),e.rawBodyEndCache());if(!s)throw new H6.LiquidHTMLASTParsingError(`Attempting to end parsing before LiquidRawTag '${i}' was closed`,e.getSource(),n.blockStartPosition.start,n.blockStartPosition.end,{type:z6.NodeTypes.LiquidRawTag,name:i,blockStartPosition:n.blockStartPosition});let a=r.end,o=s.tagStart,c=e.getSource().slice(a,o);e.ensureRawBoundary(a,o);let l=QO(e,t,i,a,o),f=(0,Mu.makeRawMarkup)(XO(i,c),c,l,a,o,e.getSource());e.seekToSourceOffset(s.tagEnd);let h={start:s.tagStart,end:s.tagEnd};return(0,Mu.makeLiquidRawTag)(n,f,h,{start:s.wsStart,end:s.wsEnd})}function YO(e,t,n){let r=[],i=e.getSource(),s=e.rawParseHtml;e.rawParseHtml=!1;let a=e.getPosition();for(;e.hasToken(a)&&e.tokenAt(a).start<n;){let o=e.tokenAt(a);if(o.type===Co.TokenType.LiquidVariableOutputOpen||o.type===Co.TokenType.LiquidTagOpen){let c=o.type===Co.TokenType.LiquidVariableOutputOpen?Co.TokenType.LiquidVariableOutputClose:Co.TokenType.LiquidTagClose,l=a+1;for(;e.hasToken(l)&&e.tokenAt(l).type!==c;)l++;if(!(e.hasToken(l)&&e.tokenAt(l).end<=n)){for(r.push((0,Mu.makeTextNode)(i.slice(o.start,n),o.start,n,i));e.hasToken(a)&&e.tokenAt(a).start<n;)a++;break}e.setPosition(a),r.push(o.type===Co.TokenType.LiquidVariableOutputOpen?e.parseLiquidVariableOutput():e.parseLiquidTag()),a=e.getPosition();continue}r.push((0,Mu.makeTextNode)(i.slice(o.start,o.end),o.start,o.end,i)),a++}return e.rawParseHtml=s,e.setPosition(a),(0,Wd.filterChildren)(Wd.ChildFilterMode.Syntactic,r,i)}function QO(e,t,n,r,i){if(n==="doc"){let c=e.getSource().slice(r,i);return(0,W6.parseLiquidDoc)(c,r,e.getSource())}if(t.parseLiquidInBody===!0)return YO(e,r,i);if(r>=i)return[];let s=e.getSource(),a=s.slice(r,i),o=(0,Mu.makeTextNode)(a,r,i,s);return(0,Wd.filterChildren)(Wd.ChildFilterMode.Syntactic,[o],s)}function XO(e,t=""){switch(e){case"javascript":return Bi.RawMarkupKinds.javascript;case"stylesheet":return/\{[{%]/.test(t)?Bi.RawMarkupKinds.text:Bi.RawMarkupKinds.css;case"style":return/\{[{%]/.test(t)?Bi.RawMarkupKinds.text:Bi.RawMarkupKinds.css;case"schema":return Bi.RawMarkupKinds.json;case"raw":case"comment":case"doc":return Bi.RawMarkupKinds.text;default:return Bi.RawMarkupKinds.text}}});var ZO=x(zv=>{"use strict";p();Object.defineProperty(zv,"__esModule",{value:!0});zv.parseLiquidTag=e8;var Hv=kn(),qo=Er(),Jd=ni(),J6=ir(),K6=ti(),Y6=Js(),Q6=At(),X6=Lu(),Z6=Gd();function e8(e){let t=e.consume(Hv.TokenType.LiquidTagOpen);e.accept(Hv.TokenType.Text);let n=e.consume(Hv.TokenType.LiquidTagClose),r=(0,qo.envelopeFromTokens)(t,n,e.getSource());if(r.tagName.startsWith("#")){let s=r.tagName.slice(1)+r.markupString,a=r.markupEnd-s.length;return(0,qo.makeLiquidTagBaseCase)({...r,tagName:"#",markupString:s,markupOffset:a})}if(r.tagName.startsWith("end")){let s=r.tagName.slice(3),a=e.tagForName(s);if((0,Jd.isStructuralEndTag)(s,a))throw new J6.LiquidHTMLASTParsingError(`Attempting to close LiquidTag '${s}' before it was opened without a matching '${s}'`,e.getSource(),t.start,n.end)}let i=e.tagForName(r.tagName);if(!i)return(0,qo.makeLiquidTagBaseCase)(r);switch(i.kind){case Jd.TagKind.Tag:return t8(e,i,r,n);case Jd.TagKind.Block:return(0,X6.parseBlockTag)(e,i,r,n);case Jd.TagKind.Raw:return(0,Z6.parseRawTag)(e,i,r,n);default:return(0,K6.assertNever)(i)}}function t8(e,t,n,r){let i;try{let s=r.start-n.markupString.length,a=s+n.markupString.length,o=(0,Q6.tokenizeMarkup)(n.markupString,s),c=new Y6.MarkupParser(o,e.getSource(),s,a);e.isTolerant()&&c.enableTolerant();let l=t.parse(n.tagName,c,e);return c.isAtEnd()?(0,qo.makeLiquidTagNamed)(n,l):(0,qo.makeLiquidTagBaseCase)(n,void 0,void 0,void 0,"unexpected tokens after markup")}catch(s){return i=s instanceof Error?s.message:"unknown error",(0,qo.makeLiquidTagBaseCase)(n,void 0,void 0,void 0,i)}}});var Wv=x($n=>{"use strict";p();Object.defineProperty($n,"__esModule",{value:!0});$n.HTML_RAW_TAGS=$n.VOID_ELEMENTS=$n.RAW_TAGS=$n.BLOCKS=$n.TAGS_WITHOUT_MARKUP=void 0;$n.TAGS_WITHOUT_MARKUP=["style","schema","javascript","else","break","continue","comment","raw","doc"];$n.BLOCKS=["if","unless","for","case","tablerow","capture","form","paginate","block","ifchanged","partial"];$n.RAW_TAGS=["raw","javascript","schema","stylesheet","style","comment","doc"];$n.VOID_ELEMENTS=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"];$n.HTML_RAW_TAGS=["script","style","svg"]});var iP=x(Jv=>{"use strict";p();Object.defineProperty(Jv,"__esModule",{value:!0});Jv.closesInnermostBranchOpenedElement=n8;var Xs=ze();function n8(e,t){let n=eP.get(e);for(n===void 0&&(n={read:0,stack:nP},eP.set(e,n));n.read<e.length;)n.stack=rP(n.stack,e[n.read]),n.read+=1;return n.stack.length>0&&n.stack[n.stack.length-1]===t.toLowerCase()}var nP=[],eP=new WeakMap,r8=new Set(["if","unless","case"]),i8="";function Gv(e,t){let n=e;for(let r of t)n=rP(n,r);return n}function rP(e,t){switch(t.type){case Xs.NodeTypes.HtmlElement:{let n=t.blockEndPosition;return n.start!==n.end?e:Gv([...e,tP(t.name)??i8],t.children)}case Xs.NodeTypes.HtmlDanglingMarkerClose:{let n=tP(t.name),r=e[e.length-1];return n!==null&&r===n?e.slice(0,-1):e}case Xs.NodeTypes.LiquidTag:return s8(e,t);default:return e}}function s8(e,t){if(!Array.isArray(t.children)||t.children.length===0)return e;let n=[],r=t.children.every(i=>i.type===Xs.NodeTypes.LiquidBranch);if(r8.has(t.name)&&r){let i=!1;for(let s of t.children)s.type===Xs.NodeTypes.LiquidBranch&&(t.name==="case"&&s.name===null||(s.name==="else"&&(i=!0),n.push(Gv(e,s.children))));i||n.push(e)}else{let i=r?t.children.flatMap(s=>s.type===Xs.NodeTypes.LiquidBranch?s.children:[]):t.children;n.push(Gv(e,i),e)}return a8(n)}function a8(e){let[t,...n]=e;if(t===void 0)return nP;let r=t.length;for(let i of n){r=Math.min(r,i.length);for(let s=0;s<r;s++)if(i[s]!==t[s]){r=s;break}}return r===t.length?t:t.slice(0,r)}function tP(e){if(e.length!==1)return null;let t=e[0];return t.type===Xs.NodeTypes.TextNode?t.value.toLowerCase():null}});var gP=x(Tt=>{"use strict";p();Object.defineProperty(Tt,"__esModule",{value:!0});Tt.parseHtmlElement=c8;Tt.parseHtmlRawBody=sP;Tt.parseHtmlComment=u8;Tt.parseHtmlDoctype=d8;Tt.parseOrphanedHtmlCloseTag=h8;Tt.closesBranchOpenedElement=aP;Tt.parseHtmlDanglingMarkerClose=oP;Tt.parseBranchAttributesImpl=p8;Tt.parseCompoundName=$i;Tt.parseAttributes=cP;Tt.parseQuotedAttributeValue=fP;Tt.parseUnquotedAttributeValue=dP;Tt.extractPlainName=Ru;Tt.peekHtmlCloseTagMatches=k8;Tt.scanForHtmlCloseTag=pP;Tt.rawMarkupKindForHtmlTag=mP;var ae=kn(),zt=Er(),Fi=Ao(),Du=ze(),Vi=Ks(),Yv=Wv(),Zs=ir(),o8=iP(),Qv=bo();function c8(e){let t=e.getSource(),n=e.peek().start;e.consume(ae.TokenType.HtmlTagOpen);let r=$i(e),i=cP(e);if(e.accept(ae.TokenType.HtmlSelfClose)){let b=e.tokenAt(e.getPosition()-1).end,_={start:n,end:b};return(0,zt.makeHtmlSelfClosingElement)(r,i,_,t)}e.consume(ae.TokenType.HtmlTagClose);let s=e.tokenAt(e.getPosition()-1).end,a={start:n,end:s},o=Ru(r);if(o!==null&&Yv.VOID_ELEMENTS.includes(o.toLowerCase()))return(0,zt.makeHtmlVoidElement)(o,i,a,t);if(o!==null&&Yv.HTML_RAW_TAGS.includes(o.toLowerCase()))return sP(e,o,i,a);let c={type:Du.NodeTypes.HtmlElement,name:b8(t,r),blockStartPosition:a},l=[];for(;!e.isAtEnd();){if(e.check(ae.TokenType.HtmlCloseTagOpen)){if(aP(e,l)){l.push(oP(e));continue}break}if(e.isBlockTerminator()){if(!e.htmlAllowUnclosedHtml){let b=e.peekTagName();throw new Zs.LiquidHTMLASTParsingError(`Attempting to close LiquidTag '${b}' before HtmlElement '${o||"compound"}' was closed`,t,n,s,c)}break}l.push(e.parseNode())}if(e.isAtEnd()||e.htmlAllowUnclosedHtml&&e.isBlockTerminator()){if(!e.htmlAllowUnclosedHtml)throw new Zs.LiquidHTMLASTParsingError(`Attempting to end parsing before HtmlElement '${o||"compound"}' was closed`,t,n,s,c);let b=l.length>0?l[l.length-1].position.end:s,_={start:b,end:b},k=(0,Fi.filterChildren)(Fi.ChildFilterMode.Syntactic,l,t);return(0,zt.makeHtmlElement)(r,i,k,a,_,t)}let f=e.peek().start;e.consume(ae.TokenType.HtmlCloseTagOpen);let h=$i(e);for(;e.check(ae.TokenType.Text);){let b=t.slice(e.tokenAt(e.getPosition()).start,e.tokenAt(e.getPosition()).end);if(/^\s*$/.test(b))e.advance();else break}e.consume(ae.TokenType.HtmlTagClose);let d=e.tokenAt(e.getPosition()-1).end;if(!(0,Fi.compoundNamesMatch)(r,h)){let b=Ru(h);throw new Zs.LiquidHTMLASTParsingError(`Attempting to close HtmlElement '${b||"compound"}' before HtmlElement '${o||"compound"}' was closed`,t,f,d,c)}let g={start:f,end:d},v=(0,Fi.filterChildren)(Fi.ChildFilterMode.Syntactic,l,t);return(0,zt.makeHtmlElement)(r,i,v,a,g,t)}function sP(e,t,n,r){let i=e.getSource(),s=r.end,a=!e.htmlUsesBuiltinTags;a&&e.ensureRawBoundary(s,s);let o=pP(e,t),c=(a||o===-1)&&(S8.has(t.toLowerCase())||a&&o===-1&&t.toLowerCase()==="svg")?T8(i,s,t,(0,Qv.rawBodyRuleLookup)(T=>e.tagForName(T))):null;if(c&&(o===-1||e.tokenAt(o).start!==c.start))e.retokenizeRawText(s,c.start,c.end);else if(!c&&o===-1)throw new Zs.LiquidHTMLASTParsingError(`Attempting to end parsing before HtmlRawNode '${t}' was closed`,i,r.start,r.end,{type:Du.NodeTypes.HtmlRawNode,name:t,blockStartPosition:r});let l=c?c.start:e.tokenAt(o).start,f=i.slice(s,l),h=e.rawTextBound;a&&(e.rawTextBound=l);let d=e.parseLiquidInRange(s,l);a&&(e.rawTextBound=h);let g=mP(t,n,f),v=(0,zt.makeRawMarkup)(g,f,d,s,l,i);e.seekToSourceOffset(l);let b=e.peek().start;for(e.consume(ae.TokenType.HtmlCloseTagOpen);e.check(ae.TokenType.Text);)e.advance();let _=e.consume(ae.TokenType.HtmlTagClose).end,k={start:b,end:_};return(0,zt.makeHtmlRawNode)(t,n,v,r,k,i)}function u8(e){if(e.htmlOpaqueComments)return l8(e);let t=e.getSource(),n=e.peek().start,r={start:n,end:n};if(e.check(ae.TokenType.HtmlCommentOpen)){let c=e.consume(ae.TokenType.HtmlCommentOpen);r={start:c.start,end:c.end},e.htmlOpenComment=r}let i=[],s=null,a=e.htmlParseHtml;e.htmlParseHtml=!1;try{for(;e.htmlOpenComment!==null;){if(e.isAtEnd()){e.htmlOpenComment=null;break}if(e.check(ae.TokenType.HtmlCommentClose)){let c=e.consume(ae.TokenType.HtmlCommentClose);s={start:c.start,end:c.end},e.htmlOpenComment=null;break}if(e.isBlockTerminator())break;i.push(e.parseNode())}}finally{e.htmlParseHtml=a}let o=e.peek().start;return(0,zt.makeHtmlComment)((0,Fi.filterChildren)(Fi.ChildFilterMode.Syntactic,i,t),r,s??{start:o,end:o},t)}function l8(e){let t=e.getSource(),n=e.consume(ae.TokenType.HtmlCommentOpen);for(;!e.isAtEnd()&&!e.check(ae.TokenType.HtmlCommentClose);)e.advance();if(e.isAtEnd())throw f8(t,n);let r=e.consume(ae.TokenType.HtmlCommentClose);return(0,zt.makeHtmlComment)([],{start:n.start,end:n.end},{start:r.start,end:r.end},t)}function f8(e,t){return new Zs.LiquidHTMLASTParsingError("Attempting to end parsing before HtmlComment '<!--' was closed",e,t.start,t.end,{type:Du.NodeTypes.HtmlComment,name:"<!--",blockStartPosition:t})}function d8(e){let t=e.getSource(),n=e.consume(ae.TokenType.HtmlDoctypeOpen);for(;!e.isAtEnd()&&!e.check(ae.TokenType.HtmlTagClose);)e.advance();let r=e.consume(ae.TokenType.HtmlTagClose),i=t.slice(n.end,r.start).trim(),s=i.match(/^doctype\s+html\s*(.*)/i),a=s?s[1].length>0?s[1]:null:i;return(0,zt.makeHtmlDoctype)(a,n.start,r.end,t)}function h8(e){let t=e.getSource(),n=e.peek().start;e.consume(ae.TokenType.HtmlCloseTagOpen);let r=$i(e);for(;e.check(ae.TokenType.Text);){let a=t.slice(e.tokenAt(e.getPosition()).start,e.tokenAt(e.getPosition()).end);if(/^\s*$/.test(a))e.advance();else break}let i=e.consume(ae.TokenType.HtmlTagClose).end,s=Ru(r);throw new Zs.LiquidHTMLASTParsingError(`Attempting to close HtmlElement '${s||"compound"}' before it was opened`,t,n,i)}function aP(e,t){if(!e.htmlPairDanglingCloseTags)return!1;let n=e.peek().end,r=/^([A-Za-z][^\s/>{}]*)\s*>/.exec(e.getSource().slice(n,n+256));return r?(0,o8.closesInnermostBranchOpenedElement)(t,r[1]):!1}function oP(e){let t=e.getSource(),n=e.peek().start;e.consume(ae.TokenType.HtmlCloseTagOpen);let r=$i(e);for(;e.check(ae.TokenType.Text);){let s=t.slice(e.tokenAt(e.getPosition()).start,e.tokenAt(e.getPosition()).end);if(/^\s*$/.test(s))e.advance();else break}e.consume(ae.TokenType.HtmlTagClose);let i=e.tokenAt(e.getPosition()-1).end;return(0,zt.makeHtmlDanglingMarkerClose)(r,n,i,t)}function p8(e){let t=[];for(;!e.isAtEnd()&&(Yd(e),!(e.isAtEnd()||e.check(ae.TokenType.HtmlTagClose)||e.check(ae.TokenType.HtmlSelfClose)||e.isBlockTerminator()));){if(e.check(ae.TokenType.LiquidTagOpen)){let i=e.htmlInAttributeContext;e.htmlInAttributeContext=!0,t.push(e.parseLiquidTag()),e.htmlInAttributeContext=i;continue}if(e.check(ae.TokenType.LiquidVariableOutputOpen)){t.push(e.parseLiquidVariableOutput());continue}let n=e.peek().start,r=$i(e);if(r.length===0){e.advance();continue}t.push(uP(e,r,n))}return t}function $i(e){let t=[],n=!1,r=!1,i;for(;!e.isAtEnd();){if(e.check(ae.TokenType.LiquidVariableOutputOpen)){t.push(e.parseLiquidVariableOutput()),r=!0;continue}if(!e.htmlInAttributeContext&&e.check(ae.TokenType.LiquidTagOpen)&&!r&&!g8(e,n,i??=y8())){t.push(e.parseLiquidTag());continue}let s=hP(e);if(s!==null){t.push(s),n=!0;continue}break}return t}function cP(e){let t=e.htmlInAttributeContext;e.htmlInAttributeContext=!0;try{return m8(e)}finally{e.htmlInAttributeContext=t}}function m8(e){let t=[];for(;!e.isAtEnd()&&(Yd(e),!(e.isAtEnd()||e.check(ae.TokenType.HtmlTagClose)||e.check(ae.TokenType.HtmlSelfClose)));){if(e.check(ae.TokenType.LiquidTagOpen)){let i=e.htmlInAttributeContext;e.htmlInAttributeContext=!0,t.push(e.parseLiquidTag()),e.htmlInAttributeContext=i;continue}if(e.check(ae.TokenType.LiquidVariableOutputOpen)){t.push(e.parseLiquidVariableOutput());continue}let n=e.peek().start,r=$i(e);if(r.length===0){e.advance();continue}t.push(uP(e,r,n))}return t}function uP(e,t,n){let r=e.getSource();if(Yd(e),!e.accept(ae.TokenType.HtmlEquals)){let f=t[t.length-1];return(0,zt.makeAttrEmpty)(t,n,f.position.end,r)}Yd(e);let i=e.accept(ae.TokenType.HtmlQuoteOpen);if(!i){let{value:f,end:h}=dP(e),d={start:f.length>0?f[0].position.start:e.peek().start,end:h};return(0,zt.makeAttrUnquoted)(t,f,d,n,h,r)}let s=r[i.start],a=i.end,o=fP(e),c=e.consume(ae.TokenType.HtmlQuoteClose),l={start:a,end:c.start};return s==='"'||s==="\u201C"||s==="\u201D"?(0,zt.makeAttrDoubleQuoted)(t,o,l,n,c.end,r):(0,zt.makeAttrSingleQuoted)(t,o,l,n,c.end,r)}function Yd(e){for(;e.check(ae.TokenType.Text)&&lP(e,e.peek());)e.advance()}function lP(e,t){return/^\s/.test(e.getSource().slice(t.start,t.start+1))}function fP(e){let t=[],n=e.getSource();for(;!e.isAtEnd()&&!e.check(ae.TokenType.HtmlQuoteClose);)if(e.check(ae.TokenType.LiquidVariableOutputOpen))t.push(e.parseLiquidVariableOutput());else if(e.check(ae.TokenType.LiquidTagOpen)){let r=e.peekTagName();if(r&&(E8.has(r)||r.startsWith("end"))){let s=e.peek();throw new Zs.LiquidHTMLASTParsingError(`Unexpected Liquid tag '${r}' inside quoted attribute value`,n,s.start,s.end)}let i=e.htmlInAttributeValueContext;e.htmlInAttributeValueContext=!0,t.push(e.parseLiquidTag()),e.htmlInAttributeValueContext=i}else if(e.check(ae.TokenType.Text)){let r=e.advance();t.push((0,zt.makeTextNode)(n.slice(r.start,r.end),r.start,r.end,n))}else break;return t}function dP(e){let t=[],n=e.peek().start;for(;!e.isAtEnd()&&!(e.check(ae.TokenType.HtmlTagClose)||e.check(ae.TokenType.HtmlSelfClose));){let r=hP(e);if(r){t.push(r),n=r.position.end;continue}if(e.check(ae.TokenType.LiquidVariableOutputOpen)){let i=e.parseLiquidVariableOutput();t.push(i),n=i.position.end;continue}break}return{value:t,end:n}}function hP(e){if(!e.check(ae.TokenType.Text))return null;let t=e.peek();if(lP(e,t))return null;e.advance();let n=e.getSource();return(0,zt.makeTextNode)(n.slice(t.start,t.end),t.start,t.end,n)}function g8(e,t,n){if(!t)return!1;let r=e.peekTagName();return r===null||!Yv.BLOCKS.includes(r)?!1:v8(e,n)}function y8(){return{tokens:[],from:0,to:0,startsWithWhitespace:!1}}function _8(e){return e!==void 0&&(e.type===ae.TokenType.LiquidVariableOutputOpen||e.type===ae.TokenType.LiquidTagOpen)&&e.end-e.start===3}function v8(e,t){let n=e.tokenList(),r=e.getPosition();if(t.tokens===n&&t.from<=r&&r<t.to)return t.startsWithWhitespace;let i=e.getSource(),s=!1,a=!1;for(let o=r;o<n.length;o++){let c=n[o];switch(c.type){case ae.TokenType.LiquidTagOpen:s=!0;break;case ae.TokenType.LiquidTagClose:s=!1,a=c.end-c.start===3;break;case ae.TokenType.Text:if(!s){let l=i.slice(c.start,c.end);if(a&&(l=l.replace(/^\s+/,"")),a=!1,l.length===0||/^\s+$/.test(l)&&_8(n[o+1]))break;return Kd(t,n,r,o,/^\s/.test(l))}break;case ae.TokenType.LiquidVariableOutputOpen:if(!s)return Kd(t,n,r,o,!1);break;case ae.TokenType.HtmlTagClose:case ae.TokenType.HtmlSelfClose:case ae.TokenType.EndOfInput:if(!s)return Kd(t,n,r,o,!1);break}}return Kd(t,n,r,n.length,!1)}function Kd(e,t,n,r,i){return e.tokens=t,e.from=n,e.to=r,e.startsWithWhitespace=i,i}function b8(e,t){return t.length===0?"":e.slice(t[0].position.start,t[t.length-1].position.end)}function Ru(e){return e.length===1&&e[0].type===Du.NodeTypes.TextNode?e[0].value:null}function k8(e,t){if(!e.check(ae.TokenType.HtmlCloseTagOpen))return!1;let n=e.getPosition();e.advance();let r=$i(e);return e.setPosition(n),(0,Fi.compoundNamesMatch)(t,r)}function pP(e,t){let n=t.toLowerCase(),r=e.getSource(),i=e.getPosition(),s=0;for(let a=i;e.hasToken(a);a++){let o=e.tokenAt(a);if(o.type===ae.TokenType.HtmlTagOpen){let f=a+1;if(!e.hasToken(f)||e.tokenAt(f).type!==ae.TokenType.Text)continue;let h=r.slice(e.tokenAt(f).start,e.tokenAt(f).end).trimStart(),d=h.search(/\s/);(d===-1?h.trim():h.slice(0,d)).toLowerCase()===n&&s++;continue}if(o.type!==ae.TokenType.HtmlCloseTagOpen)continue;let c=a+1;for(;e.hasToken(c)&&e.tokenAt(c).type===ae.TokenType.Text;)c++;if(c===a+1)continue;if(r.slice(o.end,e.tokenAt(c-1).end).trim().toLowerCase()===n){if(s===0)return a;s--}}return-1}var S8=new Set(["script","style"]),Kv=/\s*>/y;function T8(e,t,n,r){let i=n.toLowerCase(),s=t;for(;s<e.length;){let a=e.startsWith("{{",s)?"}}":e.startsWith("{%",s)?"%}":null;if(a){let o=e.indexOf(a,s+2);if(o===-1)return null;let c=o+2,l=a==="%}"?(0,Qv.liquidTagTokenName)(e.slice(s,c)):void 0,f=l?r(l):void 0;if(l&&f){let h=(0,Qv.findRawBodyEnd)(e,c,l,f,r);if(!h)return null;s=h.tagEnd}else s=c;continue}if(e.startsWith("</",s)&&e.slice(s+2,s+2+i.length).toLowerCase()===i&&(Kv.lastIndex=s+2+i.length,Kv.test(e)))return{start:s,end:Kv.lastIndex};s++}return null}function mP(e,t=[],n=""){switch(e.toLowerCase()){case"script":return w8(t);case"style":return/\{[{%]/.test(n)?Vi.RawMarkupKinds.text:Vi.RawMarkupKinds.css;default:return Vi.RawMarkupKinds.text}}function w8(e){let t=x8(e,"type");return t===null?Vi.RawMarkupKinds.javascript:t==="text/html"?Vi.RawMarkupKinds.html:t==="text/markdown"?Vi.RawMarkupKinds.markdown:t.endsWith("json")||t.endsWith("importmap")||t==="speculationrules"?Vi.RawMarkupKinds.json:Vi.RawMarkupKinds.javascript}function x8(e,t){for(let n of e){if(!("name"in n)||!("value"in n))continue;let r=n,i=Ru(r.name);if(i===null||i.toLowerCase()!==t)continue;let s=r.value;return s.length===1&&s[0].type===Du.NodeTypes.TextNode?s[0].value:null}return null}var E8=new Set(["else","elsif","when"])});var yP=x(Xv=>{"use strict";p();Object.defineProperty(Xv,"__esModule",{value:!0});Xv.envelopeFromLine=A8;function A8(e,t){return{tagName:e.tagName,markupString:e.markup,markupOffset:e.markupOffset,markupEnd:e.markupOffset+e.markup.length,whitespaceStart:"",whitespaceEnd:"",blockStartPosition:{start:e.nameOffset,end:e.lineEnd},source:t}}});var xP=x(Hi=>{"use strict";p();Object.defineProperty(Hi,"__esModule",{value:!0});Hi.parseLiquidStatement=nh;Hi.parseLineBlockTag=bP;Hi.parseLineRawTag=kP;Hi.parseLineBlockBody=SP;Hi.parseLineBranchedBody=TP;Hi.parseLineBranchMarkup=wP;var on=Er(),O8=Ks(),Xd=ni(),th=ir(),_P=ti(),Zd=Js(),eh=At(),P8=gd(),N8=Tu(),vP=yP(),Qd=Lu(),Ui=Ao(),C8=Gd(),L8=bo();function nh(e,t,n,r,i){let s=i.lines[i.index-1],a=(0,vP.envelopeFromLine)(s,e.getSource());if(t==="#")return(0,on.makeLiquidTagBaseCase)(a,void 0,void 0,void 0,void 0,!0);if(t.startsWith("end"))throw new th.LiquidHTMLASTParsingError(`Unexpected end tag '${t}' in {% liquid %} block`,e.getSource(),s.nameOffset,s.lineEnd);let o=e.lineEnv.tagForName(t);if(!o)return(0,on.makeLiquidTagBaseCase)(a);switch(o.kind){case Xd.TagKind.Tag:{let c;try{let l=(0,eh.tokenizeMarkup)(n,r),f=new Zd.MarkupParser(l,e.getSource(),r,a.markupEnd);e.isTolerant()&&f.enableTolerant();let h=o.parse(t,f,e);return f.isAtEnd()?(0,on.makeLiquidTagNamed)(a,h):(0,on.makeLiquidTagBaseCase)(a,void 0,void 0,void 0,"unexpected tokens after markup")}catch(l){return c=l instanceof Error?l.message:"unknown error",(0,on.makeLiquidTagBaseCase)(a,void 0,void 0,void 0,c)}}case Xd.TagKind.Block:return bP(e,o,a,n,r,i);case Xd.TagKind.Raw:return kP(e,o,a,i);default:return(0,_P.assertNever)(o)}}function bP(e,t,n,r,i,s){let a,o=!1,c;try{let h=(0,eh.tokenizeMarkup)(r,i),d=new Zd.MarkupParser(h,e.getSource());e.isTolerant()&&d.enableTolerant(),a=t.parse(n.tagName,d,e),d.isAtEnd()?o=!0:(a=void 0,c="unexpected tokens after markup")}catch(h){a=void 0,c=h instanceof Error?h.message:"unknown error"}if(t.branches.length===0){let{children:h,endPosition:d}=SP(e,n.tagName,s);return o?(0,on.makeLiquidTagNamed)(n,a,h,d,{start:"",end:""}):(0,on.makeLiquidTagBaseCase)(n,h,d,{start:"",end:""},c)}let{branches:l,endPosition:f}=TP(e,n.tagName,t,s);return o?(0,on.makeLiquidTagNamed)(n,a,l,f,{start:"",end:""}):(0,on.makeLiquidTagBaseCase)(n,l,f,{start:"",end:""},c)}function kP(e,t,n,r){let i=n.tagName,s=`end${i}`,a=r.index>0&&r.index<=r.lines.length?r.lines[r.index-1].lineEnd:n.blockStartPosition.end,o=r.index>0&&r.index<=r.lines.length?r.lines[r.index-1].lineEnd+1:n.blockStartPosition.end,c=(0,L8.findRawLineBodyEnd)(e.getSource(),r.lines,r.index,i,t.body,k=>{let T=e.lineEnv.tagForName(k);return T?.kind===Xd.TagKind.Raw?T.body:void 0})??-1;if(c===-1)throw new th.LiquidHTMLASTParsingError(`Unclosed raw tag '${i}' in {% liquid %} block`,e.getSource(),n.blockStartPosition.start,n.blockStartPosition.end);let l=r.lines[c],f=l.nameOffset,h=e.getSource(),d=h.slice(o,f),g=t.parseLiquidInBody===!0,v=g?q8(e,r,c):o<f?(0,Ui.filterChildren)(Ui.ChildFilterMode.Syntactic,[(0,on.makeTextNode)(d,o,f,h)],h):[],b=(0,on.makeRawMarkup)(g?O8.RawMarkupKinds.text:(0,C8.rawMarkupKindForTag)(i,d),d,v,a,f,h),_={start:l.nameOffset,end:l.nameOffset+s.length};return r.index=c+1,(0,on.makeLiquidRawTag)(n,b,_,{start:"",end:""})}function q8(e,t,n){let r={lines:t.lines.slice(0,n),index:t.index},i=[];for(;r.index<r.lines.length;){let s=r.lines[r.index];r.index++,i.push(nh(e,s.tagName,s.markup,s.markupOffset,r))}return i}function SP(e,t,n){let r=[];for(;n.index<n.lines.length;){let i=n.lines[n.index];if(i.tagName===`end${t}`){n.index++;let s={start:i.nameOffset,end:i.nameOffset+i.tagName.length};return{children:r,endPosition:s}}n.index++,r.push(nh(e,i.tagName,i.markup,i.markupOffset,n))}if(e.lineAllowUnclosedDocumentNode){let i=n.lines.length>0?n.lines[n.lines.length-1].lineEnd:0;return{children:r,endPosition:{start:i,end:i}}}throw new th.LiquidHTMLASTParsingError(`Unclosed block tag '${t}' in {% liquid %} block`,e.getSource(),0,0)}function TP(e,t,n,r){let i=[],s=r.index>0?r.lines[r.index-1].lineEnd:0,a=(0,on.makeLiquidBranchUnnamed)(s,e.getSource()),o=[];for(;r.index<r.lines.length;){let c=r.lines[r.index];if(c.tagName===`end${t}`){(0,Qd.finalizeBranch)(a,o,c.nameOffset,e.getSource(),e.lineParseHtml?Ui.ChildFilterMode.StripEdges:Ui.ChildFilterMode.Syntactic),i.push(a),r.index++;let l={start:c.nameOffset,end:c.nameOffset+c.tagName.length};return{branches:i,endPosition:l}}if((0,Qd.isBranchName)(c.tagName)&&n.branches.includes(c.tagName)){(0,Qd.finalizeBranch)(a,o,c.nameOffset,e.getSource(),e.lineParseHtml?Ui.ChildFilterMode.StripEdges:Ui.ChildFilterMode.Syntactic),i.push(a);let l=(0,vP.envelopeFromLine)(c,e.getSource()),f=wP(c.tagName,l,e.getSource(),e.isTolerant());a=(0,on.makeLiquidBranchNamed)(l,f),o=[],r.index++;continue}r.index++,o.push(nh(e,c.tagName,c.markup,c.markupOffset,r))}if(e.lineAllowUnclosedDocumentNode){let c=r.lines.length>0?r.lines[r.lines.length-1].lineEnd:0;return(0,Qd.finalizeBranch)(a,o,c,e.getSource(),e.lineParseHtml?Ui.ChildFilterMode.StripEdges:Ui.ChildFilterMode.Syntactic),i.push(a),{branches:i,endPosition:{start:c,end:c}}}throw new th.LiquidHTMLASTParsingError(`Unclosed block tag '${t}' in {% liquid %} block`,e.getSource(),0,0)}function wP(e,t,n,r=!1){switch(e){case"elsif":try{let i=(0,eh.tokenizeMarkup)(t.markupString,t.markupOffset),s=new Zd.MarkupParser(i,n);r&&s.enableTolerant();let a=(0,P8.elsifBranchParse)(e,s);return s.isAtEnd()?a:t.markupString.trim()}catch{return t.markupString.trim()}case"when":try{let i=(0,eh.tokenizeMarkup)(t.markupString,t.markupOffset),s=new Zd.MarkupParser(i,n);r&&s.enableTolerant();let a=(0,N8.whenBranchParse)(e,s);return s.isAtEnd()?a:t.markupString.trim()}catch{return t.markupString.trim()}case"else":return"";default:return(0,_P.assertNever)(e)}}});var AP=x(ju=>{"use strict";p();Object.defineProperty(ju,"__esModule",{value:!0});ju.parseNode=R8;ju.parseYamlFrontmatter=EP;ju.advanceAsText=zi;var Pt=kn(),Zv=Er(),I8=ir(),M8=ti();function R8(e){if(e.dispatchParseHtml&&e.dispatchOpenHtmlComment!==null&&!e.isBlockTerminator())return e.parseHtmlComment();let t=e.peek();switch(t.type){case Pt.TokenType.Text:return e.advance(),(0,Zv.makeTextNode)(e.getSource().slice(t.start,t.end),t.start,t.end,e.getSource());case Pt.TokenType.YamlFrontmatter:return EP(e);case Pt.TokenType.EndOfInput:throw new I8.LiquidHTMLASTParsingError("Unexpected end of input in parseNode",e.getSource(),t.start,t.end);case Pt.TokenType.LiquidVariableOutputOpen:return e.parseLiquidVariableOutput();case Pt.TokenType.LiquidTagOpen:return e.parseLiquidTag();case Pt.TokenType.LiquidTagClose:case Pt.TokenType.LiquidVariableOutputClose:return zi(e);case Pt.TokenType.HtmlTagOpen:return e.dispatchParseHtml?e.parseHtmlElement():zi(e);case Pt.TokenType.HtmlCloseTagOpen:return e.dispatchParseHtml&&e.dispatchAllowUnclosedHtml?e.parseHtmlDanglingMarkerClose():e.dispatchParseHtml?e.parseOrphanedHtmlCloseTag():zi(e);case Pt.TokenType.HtmlCommentOpen:return e.dispatchParseHtml?e.parseHtmlComment():(e.dispatchOpenHtmlComment===null&&(e.dispatchOpenHtmlComment={start:t.start,end:t.end}),zi(e));case Pt.TokenType.HtmlDoctypeOpen:return e.dispatchParseHtml?e.parseHtmlDoctype():zi(e);case Pt.TokenType.HtmlCommentClose:return e.dispatchOpenHtmlComment=null,zi(e);case Pt.TokenType.HtmlTagClose:case Pt.TokenType.HtmlSelfClose:case Pt.TokenType.HtmlEquals:case Pt.TokenType.HtmlQuoteOpen:case Pt.TokenType.HtmlQuoteClose:return zi(e);default:return(0,M8.assertNever)(t.type)}}function EP(e){let t=e.advance(),n=e.getSource(),r=n.slice(t.start,t.end),i=r.indexOf(`
|
|
33
|
+
`),s=r.lastIndexOf("---"),a=i!==-1&&s>i?r.slice(i+1,s):"";return(0,Zv.makeYamlFrontmatter)(a,t.start,t.end,n)}function zi(e){let t=e.advance(),n=e.getSource();return(0,Zv.makeTextNode)(n.slice(t.start,t.end),t.start,t.end,n)}});var nb=x(Io=>{"use strict";p();Object.defineProperty(Io,"__esModule",{value:!0});Io.finalizeBranch=Io.DocumentParser=void 0;var OP=kn(),D8=OO(),j8=Er(),PP=Ao();ni();var B8=bo(),F8=jO(),eb=Lu(),V8=Gd(),$8=ZO(),ea=gP(),U8=xP(),NP=AP(),tb=class extends D8.ParserBase{env;_parseHtml;_allowUnclosedHtml;_allowUnclosedDocumentNode;_pairDanglingCloseTags=!1;_inAttributeContext=!1;_inAttributeValueContext=!1;_openHtmlComment=null;_opaqueHtmlComments;constructor(t,n,r,i,s=!1,a=!1,o){super(t,n,r.usesBuiltinTags()?void 0:{rawTags:r,parseHtml:i},o),this.env=r,this._parseHtml=i,this._allowUnclosedHtml=s,this._allowUnclosedDocumentNode=s,this._opaqueHtmlComments=a}get rawParseHtml(){return this._parseHtml}set rawParseHtml(t){this._parseHtml=t}get blockEnv(){return this.env}get blockParseHtml(){return this._parseHtml}get blockAllowUnclosedHtml(){return this._allowUnclosedHtml}set blockAllowUnclosedHtml(t){this._allowUnclosedHtml=t}get blockAllowUnclosedDocumentNode(){return this._allowUnclosedDocumentNode}get blockInAttributeContext(){return this._inAttributeContext}get blockInAttributeValueContext(){return this._inAttributeValueContext}set blockInAttributeValueContext(t){this._inAttributeValueContext=t}get htmlParseHtml(){return this._parseHtml}set htmlParseHtml(t){this._parseHtml=t}get htmlOpenComment(){return this._openHtmlComment}set htmlOpenComment(t){this._openHtmlComment=t}get htmlOpaqueComments(){return this._opaqueHtmlComments}get htmlUsesBuiltinTags(){return this.env.usesBuiltinTags()}get htmlAllowUnclosedHtml(){return this._allowUnclosedHtml}set htmlAllowUnclosedHtml(t){this._allowUnclosedHtml=t}get htmlPairDanglingCloseTags(){return this._pairDanglingCloseTags}set pairDanglingCloseTags(t){this._pairDanglingCloseTags=t}get htmlInAttributeContext(){return this._inAttributeContext}set htmlInAttributeContext(t){this._inAttributeContext=t}get htmlInAttributeValueContext(){return this._inAttributeValueContext}set htmlInAttributeValueContext(t){this._inAttributeValueContext=t}get lineEnv(){return this.env}get lineParseHtml(){return this._parseHtml}get lineAllowUnclosedDocumentNode(){return this._allowUnclosedDocumentNode}get dispatchParseHtml(){return this._parseHtml}get dispatchAllowUnclosedHtml(){return this._allowUnclosedHtml}get dispatchOpenHtmlComment(){return this._openHtmlComment}set dispatchOpenHtmlComment(t){this._openHtmlComment=t}tagForName(t){return this.env.tagForName(t)}_rawBodyEndCache;_rawBodyEndCacheVersion=0;rawBodyEndCache(){let t=this.env.tagRegistryVersion;return(!this._rawBodyEndCache||this._rawBodyEndCacheVersion!==t)&&(this._rawBodyEndCache=new B8.RawBodyEndCache(this.getSource()),this._rawBodyEndCacheVersion=t),this._rawBodyEndCache}parseDocument(){let t=[];for(this.check(OP.TokenType.YamlFrontmatter)&&t.push((0,NP.parseNode)(this));!this.isAtEnd();)t.push(this.parseNodeInScope(t));return this._openHtmlComment=null,(0,j8.makeDocumentNode)((0,PP.filterChildren)(PP.ChildFilterMode.Syntactic,t,this.source),this.source)}parseNode(){return(0,NP.parseNode)(this)}parseNodeInScope(t){return this.check(OP.TokenType.HtmlCloseTagOpen)&&(0,ea.closesBranchOpenedElement)(this,t)?this.parseHtmlDanglingMarkerClose():this.parseNode()}parseLiquidTag(){return(0,$8.parseLiquidTag)(this)}parseLiquidVariableOutput(){return(0,F8.parseLiquidVariableOutput)(this)}peekTagName(){return(0,eb.peekTagName)(this)}isBlockTerminator(){return(0,eb.isBlockTerminator)(this)}consumeEndTag(){return(0,eb.consumeEndTag)(this)}parseLiquidInRange(t,n){return(0,V8.parseLiquidInRange)(this,t,n)}parseBranchAttributes(){return(0,ea.parseBranchAttributesImpl)(this)}parseLiquidStatement(t,n,r,i){return(0,U8.parseLiquidStatement)(this,t,n,r,i)}parseHtmlElement(){return(0,ea.parseHtmlElement)(this)}parseHtmlComment(){return(0,ea.parseHtmlComment)(this)}parseHtmlDoctype(){return(0,ea.parseHtmlDoctype)(this)}parseOrphanedHtmlCloseTag(){return(0,ea.parseOrphanedHtmlCloseTag)(this)}parseHtmlDanglingMarkerClose(){return(0,ea.parseHtmlDanglingMarkerClose)(this)}};Io.DocumentParser=tb;var H8=Lu();Object.defineProperty(Io,"finalizeBranch",{enumerable:!0,get:function(){return H8.finalizeBranch}})});var Ks=x(or=>{"use strict";p();Object.defineProperty(or,"__esModule",{value:!0});or.RawMarkupKinds=or.LiquidLiteralValues=void 0;or.isBranchedTag=z8;or.toLiquidAST=W8;or.toLiquidHtmlAST=G8;or.walk=rb;or.isLiquidHtmlNode=ib;var sb=ze(),LP=nb(),qP=kn(),IP=ni();or.LiquidLiteralValues={nil:null,null:null,true:!0,false:!1,blank:"",empty:""};var CP;(function(e){e.css="css",e.html="html",e.javascript="javascript",e.json="json",e.markdown="markdown",e.typescript="typescript",e.text="text"})(CP||(or.RawMarkupKinds=CP={}));function z8(e){return e.type===sb.NodeTypes.LiquidTag&&["if","for","unless","case"].includes(e.name)}function W8(e,t={allowUnclosedDocumentNode:!0,mode:"tolerant"}){let n=t.environment??IP.Environment.default(),r={rawTags:n,builtinRawTags:n.usesBuiltinTags(),parseHtml:!1},i=(0,qP.tokenize)(e,r);return new LP.DocumentParser(i,e,n,!1,t.allowUnclosedDocumentNode,!1,r.rawBodyEnds).parseDocument()}function G8(e,t={allowUnclosedDocumentNode:!1,mode:"tolerant"}){let n=t.environment??IP.Environment.default(),r={rawTags:n,builtinRawTags:n.usesBuiltinTags(),parseHtml:!0},i=(0,qP.tokenize)(e,r),s=new LP.DocumentParser(i,e,n,!0,t.allowUnclosedDocumentNode,t.opaqueHtmlComments,r.rawBodyEnds);return s.pairDanglingCloseTags=t.pairDanglingCloseTags??!1,s.parseDocument()}function rb(e,t,n){for(let r of Object.keys(e)){if(sb.nonTraversableProperties.has(r))continue;let i=e[r];Array.isArray(i)?i.filter(ib).forEach(s=>rb(s,t,e)):ib(i)&&rb(i,t,e)}t(e,n)}function ib(e){return e!==null&&typeof e=="object"&&"type"in e&&sb.NodeTypes.hasOwnProperty(e.type)}});var DP=x(Ar=>{"use strict";p();Object.defineProperty(Ar,"__esModule",{value:!0});Ar.TolerantDocumentParser=Ar.RESYNC_TOKENS=void 0;Ar.isResyncToken=MP;Ar.tokenTypeName=Q8;Ar.makeLiquidErrorNode=RP;var J8=nb(),Wi=kn(),K8=ze(),Y8=ir();Ar.RESYNC_TOKENS=new Set([Wi.TokenType.LiquidTagOpen,Wi.TokenType.LiquidVariableOutputOpen,Wi.TokenType.HtmlTagOpen,Wi.TokenType.HtmlCloseTagOpen,Wi.TokenType.HtmlCommentOpen,Wi.TokenType.HtmlDoctypeOpen,Wi.TokenType.EndOfInput]);function MP(e){return Ar.RESYNC_TOKENS.has(e)}function Q8(e){return e}function RP(e,t,n,r,i){return{type:K8.NodeTypes.LiquidErrorNode,position:{start:e,end:t},source:n,message:r,found:i}}var ab=class extends J8.DocumentParser{isTolerant(){return!0}parseNode(){let t=this.peek(),n=this.getPosition();try{return super.parseNode()}catch(r){if(!(r instanceof Y8.LiquidHTMLASTParsingError))throw r;let i=this.getSource(),s=this.peek().type;for(this.getPosition()<=n&&this.advance();!this.isAtEnd()&&!this.isResyncPoint();)this.advance();let a=this.peek().start;return RP(t.start,a,i,r.message,s)}}isResyncPoint(){let t=this.peek().type;return MP(t)||t===Wi.TokenType.HtmlCommentClose&&this.htmlOpenComment!==null}};Ar.TolerantDocumentParser=ab});var VP=x(Bu=>{"use strict";p();Object.defineProperty(Bu,"__esModule",{value:!0});Bu.toTolerantLiquidAST=ez;Bu.toTolerantLiquidHtmlAST=tz;Bu.findErrorNodeAtOffset=nz;var X8=Ks(),jP=DP(),BP=kn(),FP=ni(),Z8=ze();function ez(e,t={allowUnclosedDocumentNode:!0,mode:"tolerant"}){let n=t.environment??FP.Environment.default(),r={rawTags:n,builtinRawTags:n.usesBuiltinTags(),parseHtml:!1},i=(0,BP.tokenize)(e,r);return new jP.TolerantDocumentParser(i,e,n,!1,t.allowUnclosedDocumentNode,!1,r.rawBodyEnds).parseDocument()}function tz(e,t={allowUnclosedDocumentNode:!0,mode:"tolerant"}){let n=t.environment??FP.Environment.default(),r={rawTags:n,builtinRawTags:n.usesBuiltinTags(),parseHtml:!0},i=(0,BP.tokenize)(e,r);return new jP.TolerantDocumentParser(i,e,n,!0,t.allowUnclosedDocumentNode,t.opaqueHtmlComments,r.rawBodyEnds).parseDocument()}function nz(e,t){let n=new Map,r=[];if((0,X8.walk)(e,(o,c)=>{n.set(o,c),o.type===Z8.NodeTypes.LiquidErrorNode&&t>=o.position.start&&t<=o.position.end&&r.push(o)}),r.length===0)return null;let i=o=>{let c=[],l=n.get(o);for(;l!==void 0;)c.push(l),l=n.get(l);return c.reverse()},s=r[0],a=i(s).length;for(let o=1;o<r.length;o++){let c=i(r[o]).length;c>a&&(s=r[o],a=c)}return{node:s,ancestors:i(s)}}});var $P=x(rh=>{"use strict";p();Object.defineProperty(rh,"__esModule",{value:!0});rh.getConditionalComment=void 0;var rz=/(<!--\[if[^\]]*]>)((.|\n)*)(<!\[endif\]-->)$/,iz=e=>{let t=e.match(rz);if(t)return{startTag:t[1],body:t[2].trim(),endTag:t[4]}};rh.getConditionalComment=iz});var HP=x(ta=>{"use strict";p();Object.defineProperty(ta,"__esModule",{value:!0});ta.LaxTagRecoveryError=void 0;ta.laxRecoverVariable=cz;ta.laxRecoverTagMarkup=uz;ta.laxRecoverWhenValues=lz;var ob=Js(),cb=At(),sz=Rd(),az=Tu(),UP=Fe(),oz={parseLiquidStatement(e,t,n,r){throw new Error("lax-recover: nested statement parsing is not supported during recovery")}};function cz(e,t,n){try{let r=(0,cb.tokenizeMarkup)(e,n);return new ob.MarkupParser(r,t,n,n+e.length).enableLax().liquidVariable()}catch{return}}function uz(e,t,n,r,i){let s=sz.builtinTags[e];if(!s||s.kind!==UP.TagKind.Tag&&s.kind!==UP.TagKind.Block)throw new ih(`Unknown tag '${e}'`);if((e==="increment"||e==="decrement")&&t.trim()==="")return;let a=(0,cb.tokenizeMarkup)(t,r),o=new ob.MarkupParser(a,n,r,i).enableLax();return s.parse(e,o,oz)}var ih=class extends Error{constructor(t){super(t),this.name="LaxTagRecoveryError"}};ta.LaxTagRecoveryError=ih;function lz(e,t,n,r){try{let i=(0,cb.tokenizeMarkup)(e,n),s=new ob.MarkupParser(i,t,n,r).enableLax();return(0,az.whenBranchParse)("when",s)}catch{return}}});var ue=x(ke=>{"use strict";p();var fz=ke&&ke.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),ub=ke&&ke.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&fz(t,e,n)};Object.defineProperty(ke,"__esModule",{value:!0});ke.LaxTagRecoveryError=ke.laxRecoverWhenValues=ke.laxRecoverTagMarkup=ke.laxRecoverVariable=ke.builtinTags=ke.MarkupParser=ke.MarkupTokenType=ke.tokenizeMarkup=ke.TokenType=ke.tokenize=ke.getConditionalComment=ke.BLOCKS=ke.VOID_ELEMENTS=ke.RAW_TAGS=ke.TAGS_WITHOUT_MARKUP=ke.toTolerantLiquidHtmlAST=ke.toTolerantLiquidAST=ke.findErrorNodeAtOffset=void 0;ub(Ks(),ke);ub(ze(),ke);ub(ir(),ke);var lb=VP();Object.defineProperty(ke,"findErrorNodeAtOffset",{enumerable:!0,get:function(){return lb.findErrorNodeAtOffset}});Object.defineProperty(ke,"toTolerantLiquidAST",{enumerable:!0,get:function(){return lb.toTolerantLiquidAST}});Object.defineProperty(ke,"toTolerantLiquidHtmlAST",{enumerable:!0,get:function(){return lb.toTolerantLiquidHtmlAST}});var sh=Wv();Object.defineProperty(ke,"TAGS_WITHOUT_MARKUP",{enumerable:!0,get:function(){return sh.TAGS_WITHOUT_MARKUP}});Object.defineProperty(ke,"RAW_TAGS",{enumerable:!0,get:function(){return sh.RAW_TAGS}});Object.defineProperty(ke,"VOID_ELEMENTS",{enumerable:!0,get:function(){return sh.VOID_ELEMENTS}});Object.defineProperty(ke,"BLOCKS",{enumerable:!0,get:function(){return sh.BLOCKS}});var dz=$P();Object.defineProperty(ke,"getConditionalComment",{enumerable:!0,get:function(){return dz.getConditionalComment}});var zP=kn();Object.defineProperty(ke,"tokenize",{enumerable:!0,get:function(){return zP.tokenize}});Object.defineProperty(ke,"TokenType",{enumerable:!0,get:function(){return zP.TokenType}});var WP=At();Object.defineProperty(ke,"tokenizeMarkup",{enumerable:!0,get:function(){return WP.tokenizeMarkup}});Object.defineProperty(ke,"MarkupTokenType",{enumerable:!0,get:function(){return WP.MarkupTokenType}});var hz=Js();Object.defineProperty(ke,"MarkupParser",{enumerable:!0,get:function(){return hz.MarkupParser}});var pz=Rd();Object.defineProperty(ke,"builtinTags",{enumerable:!0,get:function(){return pz.builtinTags}});var ah=HP();Object.defineProperty(ke,"laxRecoverVariable",{enumerable:!0,get:function(){return ah.laxRecoverVariable}});Object.defineProperty(ke,"laxRecoverTagMarkup",{enumerable:!0,get:function(){return ah.laxRecoverTagMarkup}});Object.defineProperty(ke,"laxRecoverWhenValues",{enumerable:!0,get:function(){return ah.laxRecoverWhenValues}});Object.defineProperty(ke,"LaxTagRecoveryError",{enumerable:!0,get:function(){return ah.LaxTagRecoveryError}})});var db=x((o0e,fb)=>{p();var ch=process||{},GP=ch.argv||[],oh=ch.env||{},mz=!(oh.NO_COLOR||GP.includes("--no-color"))&&(!!oh.FORCE_COLOR||GP.includes("--color")||ch.platform==="win32"||(ch.stdout||{}).isTTY&&oh.TERM!=="dumb"||!!oh.CI),gz=(e,t,n=e)=>r=>{let i=""+r,s=i.indexOf(t,e.length);return~s?e+yz(i,t,n,s)+t:e+i+t},yz=(e,t,n,r)=>{let i="",s=0;do i+=e.substring(s,r)+n,s=r+t.length,r=e.indexOf(t,s);while(~r);return i+e.substring(s)},JP=(e=mz)=>{let t=e?gz:()=>String;return{isColorSupported:e,reset:t("\x1B[0m","\x1B[0m"),bold:t("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:t("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:t("\x1B[3m","\x1B[23m"),underline:t("\x1B[4m","\x1B[24m"),inverse:t("\x1B[7m","\x1B[27m"),hidden:t("\x1B[8m","\x1B[28m"),strikethrough:t("\x1B[9m","\x1B[29m"),black:t("\x1B[30m","\x1B[39m"),red:t("\x1B[31m","\x1B[39m"),green:t("\x1B[32m","\x1B[39m"),yellow:t("\x1B[33m","\x1B[39m"),blue:t("\x1B[34m","\x1B[39m"),magenta:t("\x1B[35m","\x1B[39m"),cyan:t("\x1B[36m","\x1B[39m"),white:t("\x1B[37m","\x1B[39m"),gray:t("\x1B[90m","\x1B[39m"),bgBlack:t("\x1B[40m","\x1B[49m"),bgRed:t("\x1B[41m","\x1B[49m"),bgGreen:t("\x1B[42m","\x1B[49m"),bgYellow:t("\x1B[43m","\x1B[49m"),bgBlue:t("\x1B[44m","\x1B[49m"),bgMagenta:t("\x1B[45m","\x1B[49m"),bgCyan:t("\x1B[46m","\x1B[49m"),bgWhite:t("\x1B[47m","\x1B[49m"),blackBright:t("\x1B[90m","\x1B[39m"),redBright:t("\x1B[91m","\x1B[39m"),greenBright:t("\x1B[92m","\x1B[39m"),yellowBright:t("\x1B[93m","\x1B[39m"),blueBright:t("\x1B[94m","\x1B[39m"),magentaBright:t("\x1B[95m","\x1B[39m"),cyanBright:t("\x1B[96m","\x1B[39m"),whiteBright:t("\x1B[97m","\x1B[39m"),bgBlackBright:t("\x1B[100m","\x1B[49m"),bgRedBright:t("\x1B[101m","\x1B[49m"),bgGreenBright:t("\x1B[102m","\x1B[49m"),bgYellowBright:t("\x1B[103m","\x1B[49m"),bgBlueBright:t("\x1B[104m","\x1B[49m"),bgMagentaBright:t("\x1B[105m","\x1B[49m"),bgCyanBright:t("\x1B[106m","\x1B[49m"),bgWhiteBright:t("\x1B[107m","\x1B[49m")}};fb.exports=JP();fb.exports.createColors=JP});var fh=x((u0e,YP)=>{"use strict";p();var uh=/[\t\n\f\r "#'()/;[\\\]{}]/g,lh=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,_z=/.[\r\n"'(/\\]/,KP=/[\da-f]/i;YP.exports=function(t,n={}){let r=t.css.valueOf(),i=n.ignoreErrors,s,a,o,c,l,f,h,d,g,v,b=r.length,_=0,k=[],T=[],w=-1;function y(){return _}function A(D){throw t.error("Unclosed "+D,_)}function P(){return T.length===0&&_>=b}function O(D){if(T.length)return T.pop();if(_>=b)return;let M=D?D.ignoreUnclosed:!1;switch(s=r.charCodeAt(_),s){case 10:case 32:case 9:case 13:case 12:{c=_;do c+=1,s=r.charCodeAt(c);while(s===32||s===10||s===9||s===13||s===12);f=["space",r.slice(_,c)],_=c-1;break}case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let C=String.fromCharCode(s);f=[C,C,_];break}case 40:{if(v=k.length?k.pop()[1]:"",g=r.charCodeAt(_+1),v==="url"&&g!==39&&g!==34&&g!==32&&g!==10&&g!==9&&g!==12&&g!==13){c=_;do{if(h=!1,c=r.indexOf(")",c+1),c===-1)if(i||M){c=_;break}else A("bracket");for(d=c;r.charCodeAt(d-1)===92;)d-=1,h=!h}while(h);f=["brackets",r.slice(_,c+1),_,c],_=c}else _<=w?f=["(","(",_]:(c=r.indexOf(")",_+1),a=r.slice(_,c+1),c===-1||_z.test(a)?(w=c===-1?b:c,f=["(","(",_]):(f=["brackets",a,_,c],_=c));break}case 39:case 34:{l=s===39?"'":'"',c=_;do{if(h=!1,c=r.indexOf(l,c+1),c===-1)if(i||M){c=_+1;break}else A("string");for(d=c;r.charCodeAt(d-1)===92;)d-=1,h=!h}while(h);f=["string",r.slice(_,c+1),_,c],_=c;break}case 64:{uh.lastIndex=_+1,uh.test(r),uh.lastIndex===0?c=r.length-1:c=uh.lastIndex-2,f=["at-word",r.slice(_,c+1),_,c],_=c;break}case 92:{for(c=_,o=!0;r.charCodeAt(c+1)===92;)c+=1,o=!o;if(s=r.charCodeAt(c+1),o&&s!==47&&s!==32&&s!==10&&s!==9&&s!==13&&s!==12&&(c+=1,KP.test(r.charAt(c)))){for(;KP.test(r.charAt(c+1));)c+=1;r.charCodeAt(c+1)===32&&(c+=1)}f=["word",r.slice(_,c+1),_,c],_=c;break}default:{s===47&&r.charCodeAt(_+1)===42?(c=r.indexOf("*/",_+2)+1,c===0&&(i||M?c=r.length:A("comment")),f=["comment",r.slice(_,c+1),_,c],_=c):(lh.lastIndex=_+1,lh.test(r),lh.lastIndex===0?c=r.length-1:c=lh.lastIndex-2,f=["word",r.slice(_,c+1),_,c],k.push(f),_=c);break}}return _++,f}function L(D){T.push(D)}return{back:L,endOfFile:P,nextToken:O,position:y}}});var hb=x((f0e,ZP)=>{"use strict";p();var Xt=db(),vz=fh(),QP;function bz(e){QP=e}var kz={";":Xt.yellow,":":Xt.yellow,"(":Xt.cyan,")":Xt.cyan,"[":Xt.yellow,"]":Xt.yellow,"{":Xt.yellow,"}":Xt.yellow,"at-word":Xt.cyan,brackets:Xt.cyan,call:Xt.cyan,class:Xt.yellow,comment:Xt.gray,hash:Xt.magenta,string:Xt.green};function Sz([e,t],n){if(e==="word"){if(t[0]===".")return"class";if(t[0]==="#")return"hash"}if(!n.endOfFile()){let r=n.nextToken();if(n.back(r),r[0]==="brackets"||r[0]==="(")return"call"}return e}function XP(e){let t=vz(new QP(e),{ignoreErrors:!0}),n="";for(;!t.endOfFile();){let r=t.nextToken(),i=kz[Sz(r,t)];i?n+=r[1].split(/\r?\n/).map(s=>i(s)).join(`
|
|
34
|
+
`):n+=r[1]}return n}XP.registerInput=bz;ZP.exports=XP});var dh=x((h0e,nN)=>{"use strict";p();var eN=db(),tN=hb(),Fu=class e extends Error{constructor(t,n,r,i,s,a){super(t),this.name="CssSyntaxError",this.reason=t,s&&(this.file=s),i&&(this.source=i),a&&(this.plugin=a),typeof n<"u"&&typeof r<"u"&&(typeof n=="number"?(this.line=n,this.column=r):(this.line=n.line,this.column=n.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}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(t){if(!this.source)return"";let n=this.source;t==null&&(t=eN.isColorSupported);let r=f=>f,i=f=>f,s=f=>f;if(t){let{bold:f,gray:h,red:d}=eN.createColors(!0);i=g=>f(d(g)),r=g=>h(g),tN&&(s=g=>tN(g))}let a=n.split(/\r?\n/),o=Math.max(this.line-3,0),c=Math.min(this.line+2,a.length),l=String(c).length;return a.slice(o,c).map((f,h)=>{let d=o+1+h,g=" "+(" "+d).slice(-l)+" | ";if(d===this.line){if(f.length>160){let b=20,_=Math.max(0,this.column-b),k=Math.max(this.column+b,this.endColumn+b),T=f.slice(_,k),w=r(g.replace(/\d/g," "))+f.slice(0,Math.min(this.column-1,b-1)).replace(/[^\t]/g," ");return i(">")+r(g)+s(T)+`
|
|
35
|
+
`+w+i("^")}let v=r(g.replace(/\d/g," "))+f.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+r(g)+s(f)+`
|
|
36
|
+
`+v+i("^")}return" "+r(g)+s(f)}).join(`
|
|
37
|
+
`)}toString(){let t=this.showSourceCode();return t&&(t=`
|
|
38
|
+
|
|
39
|
+
`+t+`
|
|
40
|
+
`),this.name+": "+this.message+t}};nN.exports=Fu;Fu.default=Fu});var pb=x((m0e,oN)=>{"use strict";p();var Tz=/(<)(\/?style\b)/gi,wz=/(<)(!--)/g,xz=/[\t\n\f\r "#'()/;[\\\]{}]/;function cr(e){return typeof e!="string"||!e.includes("<")?e:e.replace(Tz,"\\3c $2").replace(wz,"\\3c $2")}var rN={after:`
|
|
41
|
+
`,beforeClose:`
|
|
42
|
+
`,beforeComment:`
|
|
43
|
+
`,beforeDecl:`
|
|
44
|
+
`,beforeOpen:" ",beforeRule:`
|
|
45
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function Ez(e){return e[0].toUpperCase()+e.slice(1)}function iN(e,t){let n="@"+t.name,r=t.params?e.rawValue(t,"params"):"",i=t.raws.afterName;return typeof i>"u"?i=r?" ":"":i===""&&r&&!xz.test(r[0])&&(i=" "),n+i+r}function aN(e,t,n){let r=n.nodes,i=r.length-1;for(;i>0&&r[i].type==="comment";)i-=1;let s=e.raw(n,"semicolon"),a=n.type==="document";for(let o=r.length-1;o>=0;o--){let c=r[o],l=i!==o||s;!l&&o<r.length-1&&(c.type==="atrule"&&!c.nodes||c.type==="decl"&&c.prop.startsWith("--"))&&(l=!0),t.push({document:a,node:c,semicolon:l})}}function sN(e,t,n,r){let i=e.raw(n,"between","beforeOpen");e.builder(cr(r+i)+"{",n,"start");let s=n.nodes&&n.nodes.length,a=()=>{let o=s?e.raw(n,"after"):e.raw(n,"after","emptyBody");o&&e.builder(cr(o)),e.builder("}",n,"end"),n.type==="rule"&&n.raws.ownSemicolon&&e.builder(cr(n.raws.ownSemicolon),n,"end")};s?(t.push(a),aN(e,t,n)):a()}var Vu=class e{constructor(t){this.builder=t}atrule(t,n){let r=iN(this,t);if(t.nodes)this.block(t,r);else{let i=(t.raws.between||"")+(n?";":"");this.builder(cr(r+i),t)}}beforeAfter(t,n){let r;t.type==="decl"?r=this.raw(t,null,"beforeDecl"):t.type==="comment"?r=this.raw(t,null,"beforeComment"):n==="before"?r=this.raw(t,null,"beforeRule"):r=this.raw(t,null,"beforeClose");let i=t.parent,s=0;for(;i&&i.type!=="root";)s+=1,i=i.parent;if(r.includes(`
|
|
46
|
+
`)){let a=this.raw(t,null,"indent");if(a.length)for(let o=0;o<s;o++)r+=a}return r}block(t,n){let r=this.raw(t,"between","beforeOpen");this.builder(cr(n+r)+"{",t,"start");let i;t.nodes&&t.nodes.length?(this.body(t),i=this.raw(t,"after")):i=this.raw(t,"after","emptyBody"),i&&this.builder(cr(i)),this.builder("}",t,"end")}body(t){let n=e.prototype,r=["atrule","block","body","rule","stringify"].every(s=>this[s]===n[s]),i=[];for(aN(this,i,t);i.length>0;){let s=i.pop();if(typeof s=="function"){s();continue}let a=s.node,o=this.raw(a,"before");o&&this.builder(s.document?o:cr(o)),r&&a.type==="rule"?sN(this,i,a,this.rawValue(a,"selector")):r&&a.type==="atrule"&&a.nodes?sN(this,i,a,iN(this,a)):this.stringify(a,s.semicolon)}}comment(t){let n=this.raw(t,"left","commentLeft"),r=this.raw(t,"right","commentRight");this.builder(cr("/*"+n+t.text+r+"*/"),t)}decl(t,n){let r=t.raws,i=this.raw(t,"between","colon"),s=t.prop+i+this.rawValue(t,"value");t.important&&(s+=r.important||" !important"),n&&(s+=";"),this.builder(cr(s),t)}document(t){this.body(t)}raw(t,n,r){let i;if(r||(r=n),n&&(i=t.raws[n],typeof i<"u"))return i;let s=t.parent;if(r==="before"&&(!s||s.type==="root"&&s.first===t||s&&s.type==="document"))return"";if(!s)return rN[r];let a=t.root(),o=a.rawCache||(a.rawCache={});if(typeof o[r]<"u")return o[r];if(r==="before"||r==="after")return this.beforeAfter(t,r);{let c="raw"+Ez(r);this[c]?i=this[c](a,t):a.walk(l=>{if(i=l.raws[n],typeof i<"u")return!1})}return typeof i>"u"&&(i=rN[r]),o[r]=i,i}rawBeforeClose(t){let n;return t.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return n=r.raws.after,n.includes(`
|
|
47
|
+
`)&&(n=n.replace(/[^\n]+$/,"")),!1}),n&&(n=n.replace(/\S/g,"")),n}rawBeforeComment(t,n){let r;return t.walkComments(i=>{if(typeof i.raws.before<"u")return r=i.raws.before,r.includes(`
|
|
48
|
+
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(n,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(t,n){let r;return t.walkDecls(i=>{if(typeof i.raws.before<"u")return r=i.raws.before,r.includes(`
|
|
49
|
+
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(n,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(t){let n;return t.walk(r=>{if(r.type!=="decl"&&(n=r.raws.between,typeof n<"u"))return!1}),n}rawBeforeRule(t){let n;return t.walk(r=>{if(r.nodes&&(r.parent!==t||t.first!==r)&&typeof r.raws.before<"u")return n=r.raws.before,n.includes(`
|
|
50
|
+
`)&&(n=n.replace(/[^\n]+$/,"")),!1}),n&&(n=n.replace(/\S/g,"")),n}rawColon(t){let n;return t.walkDecls(r=>{if(typeof r.raws.between<"u")return n=r.raws.between.replace(/[^\s:]/g,""),!1}),n}rawEmptyBody(t){let n;return t.walk(r=>{if(r.nodes&&r.nodes.length===0&&(n=r.raws.after,typeof n<"u"))return!1}),n}rawIndent(t){if(t.raws.indent)return t.raws.indent;let n;return t.walk(r=>{let i=r.parent;if(i&&i!==t&&i.parent&&i.parent===t&&typeof r.raws.before<"u"){let s=r.raws.before.split(`
|
|
51
|
+
`);return n=s[s.length-1],n=n.replace(/\S/g,""),!1}}),n}rawSemicolon(t){let n;return t.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(n=r.raws.semicolon,typeof n<"u"))return!1}),n}rawValue(t,n){let r=t[n],i=t.raws[n];return i&&i.value===r?i.raw:r}root(t){if(t.source&&t.source.input.hasBOM&&this.builder("\uFEFF",t,"start"),this.body(t),t.raws.after){let n=t.raws.after,r=t.parent&&t.parent.type==="document";this.builder(r?n:cr(n))}}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(cr(t.raws.ownSemicolon),t,"end")}stringify(t,n){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,n)}};oN.exports=Vu;Vu.default=Vu});var $u=x((y0e,cN)=>{"use strict";p();var Az=pb();function mb(e,t){new Az(t).stringify(e)}cN.exports=mb;mb.default=mb});var Uu=x((v0e,gb)=>{"use strict";p();gb.exports.isClean=Symbol("isClean");gb.exports.my=Symbol("my")});var Wu=x((k0e,uN)=>{"use strict";p();var Oz=dh(),Pz=pb(),Nz=$u(),{isClean:Hu,my:Cz}=Uu();function Lz(e,t){let n=new e.constructor,r=[[e,n,t]];for(;r.length>0;){let[i,s,a]=r.pop();for(let o in i){if(!Object.prototype.hasOwnProperty.call(i,o)||o==="proxyCache")continue;let c=i[o],l=typeof c;if(o==="parent"&&l==="object")a&&(s[o]=a);else if(o==="source")s[o]=c;else if(Array.isArray(c)){let f=[];s[o]=f;for(let h of c){let d=new h.constructor;f.push(d),r.push([h,d,s])}}else{if(l==="object"&&c!==null){let f=new c.constructor;r.push([c,f,void 0]),c=f}s[o]=c}}}return n}function Or(e,t){if(t&&typeof t.offset<"u")return t.offset;let n=1,r=1,i=0;for(let s=0;s<e.length;s++){if(r===t.line&&n===t.column){i=s;break}e[s]===`
|
|
52
|
+
`?(n=1,r+=1):n+=1}return i}var zu=class e{get proxyOf(){return this}constructor(t={}){this.raws={},this[Hu]=!1,this[Cz]=!0;for(let n of Object.keys(t))if(n!=="__proto__")if(n==="nodes"){this.nodes=[];for(let r of t[n])typeof r.clone=="function"&&r.parent?this.append(r.clone()):this.append(r)}else this[n]=t[n]}addToError(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){let n=this.source;t.stack=t.stack.replace(/\n\s{4}at /,`$&${n.input.from}:${n.start.line}:${n.start.column}$&`)}return t}after(t){return this.parent.insertAfter(this,t),this}assign(t={}){for(let n in t)this[n]=t[n];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t={}){let n=Lz(this);for(let r in t)n[r]=t[r];return n}cloneAfter(t={}){let n=this.clone(t);return this.parent.insertAfter(this,n),n}cloneBefore(t={}){let n=this.clone(t);return this.parent.insertBefore(this,n),n}error(t,n={}){if(this.source){let{end:r,start:i}=this.rangeBy(n);return this.source.input.error(t,{column:i.column,line:i.line},{column:r.column,line:r.line},n)}return new Oz(t)}getProxyProcessor(){return{get(t,n){return n==="proxyOf"?t:n==="root"?()=>t.root().toProxy():t[n]},set(t,n,r){return t[n]===r||(t[n]=r,(n==="prop"||n==="value"||n==="name"||n==="params"||n==="important"||n==="text")&&t.markDirty()),!0}}}markClean(){this[Hu]=!0}markDirty(){if(this[Hu]){this[Hu]=!1;let t=this;for(;t=t.parent;)t[Hu]=!1}}next(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t+1]}positionBy(t={}){let n="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:Or(n,this.source.start)};if(t.index)r=this.positionInside(t.index);else if(t.word){let s=n.slice(Or(n,this.source.start),Or(n,this.source.end)).indexOf(t.word);s!==-1&&(r=this.positionInside(s))}return r}positionInside(t){let n=this.source.start.column,r=this.source.start.line,i="document"in this.source.input?this.source.input.document:this.source.input.css,s=Or(i,this.source.start),a=s+t;for(let o=s;o<a;o++)i[o]===`
|
|
53
|
+
`?(n=1,r+=1):n+=1;return{column:n,line:r,offset:a}}prev(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t-1]}rangeBy(t={}){let n="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:Or(n,this.source.start)},i=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:Or(n,this.source.end)+1}:{column:r.column+1,line:r.line,offset:r.offset+1};if(t.word){let a=n.slice(Or(n,this.source.start),Or(n,this.source.end)).indexOf(t.word);a!==-1&&(r=this.positionInside(a),i=this.positionInside(a+t.word.length))}else t.start?r={column:t.start.column,line:t.start.line,offset:Or(n,t.start)}:typeof t.index=="number"&&(r=this.positionInside(t.index)),t.end?i={column:t.end.column,line:t.end.line,offset:Or(n,t.end)}:typeof t.endIndex=="number"?i=this.positionInside(t.endIndex):typeof t.index=="number"&&(i=this.positionInside(t.index+1));return(i.line<r.line||i.line===r.line&&i.column<=r.column)&&(i={column:r.column+1,line:r.line,offset:r.offset+1}),{end:i,start:r}}raw(t,n){return new Pz().raw(this,t,n)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...t){if(this.parent){let n=this,r=!1;for(let i of t)i===this?r=!0:r?(this.parent.insertAfter(n,i),n=i):this.parent.insertBefore(n,i);r||this.remove()}return this}root(){let t=this;for(;t.parent&&t.parent.type!=="document";)t=t.parent;return t}toJSON(t,n){let r=n==null;n=n||new Map;let i=[],s=[[this,i,0]];for(let o=0;o<s.length;o++){let[c,l,f]=s[o],h={};l[f]=h;for(let d in c){if(!Object.prototype.hasOwnProperty.call(c,d)||d==="parent"||d==="proxyCache")continue;let g=c[d];if(Array.isArray(g)){let v=[];h[d]=v;for(let b=0;b<g.length;b++){let _=g[b];typeof _=="object"&&_.toJSON?_.toJSON===e.prototype.toJSON?s.push([_,v,b]):v[b]=_.toJSON(null,n):v[b]=_}}else if(typeof g=="object"&&g.toJSON)g.toJSON===e.prototype.toJSON?s.push([g,h,d]):h[d]=g.toJSON(null,n);else if(d==="source"){if(g==null)continue;let v=n.get(g.input);v==null&&(v=n.size,n.set(g.input,v)),h[d]={end:g.end,inputId:v,start:g.start}}else h[d]=g}}let a=i[0];return r&&(a.inputs=[...n.keys()].map(o=>o.toJSON())),a}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t=Nz){t.stringify&&(t=t.stringify);let n="";return t(this,r=>{n+=r}),n}warn(t,n,r={}){let i={node:this};for(let s in r)i[s]=r[s];return t.warn(n,i)}};uN.exports=zu;zu.default=zu});var Mo=x((T0e,lN)=>{"use strict";p();var qz=Wu(),Gu=class extends qz{constructor(t){super(t),this.type="comment"}};lN.exports=Gu;Gu.default=Gu});var Ku=x((x0e,fN)=>{"use strict";p();var Iz=Wu(),Ju=class extends Iz{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(t){t&&typeof t.value<"u"&&typeof t.value!="string"&&(t={...t,value:String(t.value)}),super(t),this.type="decl"}};fN.exports=Ju;Ju.default=Ju});var si=x((A0e,vN)=>{"use strict";p();var hN=Mo(),pN=Ku(),dN=Wu(),{isClean:mN,my:gN}=Uu(),yb,yN,_N,_b;function Mz(e){let t=e.slice();for(;t.length>0;){let n=t.pop();if(delete n.source,n.nodes){n.nodes=n.nodes.slice();for(let r of n.nodes)t.push(r)}}return e.slice()}function Rz(e){let t=[e];for(;t.length>0;){let n=t.pop();if(n[mN]=!1,n.proxyOf.nodes)for(let r of n.proxyOf.nodes)t.push(r)}}var Pr=class e extends dN{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(...t){for(let n of t){let r=this.normalize(n,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(t){let n=[this];for(;n.length>0;){let r=n.pop();if(r!==this&&r.cleanRaws!==e.prototype.cleanRaws){r.cleanRaws(t);continue}if(dN.prototype.cleanRaws.call(r,t),r.nodes)for(let i of r.nodes)n.push(i)}}each(t){if(!this.proxyOf.nodes)return;let n=this.getIterator(),r,i;for(;this.indexes[n]<this.proxyOf.nodes.length&&(r=this.indexes[n],i=t(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[n]+=1;return delete this.indexes[n],i}every(t){return this.nodes.every(t)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let t=this.lastEach;return this.indexes[t]=0,t}getProxyProcessor(){return{get(t,n){return n==="proxyOf"?t:t[n]?n==="each"||typeof n=="string"&&n.startsWith("walk")?(...r)=>t[n](...r.map(i=>typeof i=="function"?(s,a)=>i(s.toProxy(),a):i)):n==="every"||n==="some"?r=>t[n]((i,...s)=>r(i.toProxy(),...s)):n==="root"?()=>t.root().toProxy():n==="nodes"?t.nodes.map(r=>r.toProxy()):n==="first"||n==="last"?t[n].toProxy():t[n]:t[n]},set(t,n,r){return t[n]===r||(t[n]=r,(n==="name"||n==="params"||n==="selector")&&t.markDirty()),!0}}}index(t){return typeof t=="number"?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,n){let r=this.index(t),i=this.normalize(n,this.proxyOf.nodes[r]).reverse();r=this.index(t);for(let a of i)this.proxyOf.nodes.splice(r+1,0,a);let s;for(let a in this.indexes)s=this.indexes[a],r<s&&(this.indexes[a]=s+i.length);return this.markDirty(),this}insertBefore(t,n){let r=this.index(t),i=r===0?"prepend":!1,s=this.normalize(n,this.proxyOf.nodes[r],i).reverse();r=this.index(t);for(let o of s)this.proxyOf.nodes.splice(r,0,o);let a;for(let o in this.indexes)a=this.indexes[o],r<=a&&(this.indexes[o]=a+s.length);return this.markDirty(),this}normalize(t,n){if(typeof t=="string")t=Mz(yN(t).nodes);else if(typeof t>"u")t=[];else if(Array.isArray(t)){t=t.slice(0);for(let i of t)i.parent&&i.parent.removeChild(i,"ignore")}else if(t.type==="root"&&this.type!=="document"){t=t.nodes.slice(0);for(let i of t)i.parent&&i.parent.removeChild(i,"ignore")}else if(t.type)t=[t];else if(t.prop){if(typeof t.value>"u")throw new Error("Value field is missed in node creation");typeof t.value!="string"&&(t.value=String(t.value)),t=[new pN(t)]}else if(t.selector||t.selectors)t=[new _b(t)];else if(t.name)t=[new yb(t)];else if(t.text)t=[new hN(t)];else throw new Error("Unknown node type in node creation");return t.map(i=>(i[gN]||e.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[mN]&&Rz(i),i.raws||(i.raws={}),typeof i.raws.before>"u"&&n&&typeof n.raws.before<"u"&&(i.raws.before=n.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...t){t=t.reverse();for(let n of t){let r=this.normalize(n,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(t){return t.parent=this,this.proxyOf.nodes.push(t),this}removeAll(){for(let t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1);let n;for(let r in this.indexes)n=this.indexes[r],n>=t&&(this.indexes[r]=n-1);return this.markDirty(),this}replaceValues(t,n,r){return r||(r=n,n={}),this.walkDecls(i=>{n.props&&!n.props.includes(i.prop)||n.fast&&!i.value.includes(n.fast)||(i.value=i.value.replace(t,r))}),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){if(!this.proxyOf.nodes)return;let n=[{iterator:this.getIterator(),node:this.proxyOf}];for(;n.length>0;){let{iterator:r,node:i}=n[n.length-1],s=i.indexes[r];if(s>=i.proxyOf.nodes.length){delete i.indexes[r],n.pop();let c=n[n.length-1];c&&(c.node.indexes[c.iterator]+=1);continue}let a=i.proxyOf.nodes[s],o;try{o=t(a,s)}catch(c){throw a.addToError(c)}if(o===!1){for(let c of n)delete c.node.indexes[c.iterator];return!1}a.walk&&a.proxyOf.nodes?n.push({iterator:a.getIterator(),node:a}):i.indexes[r]+=1}}walkAtRules(t,n){return n?t instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&t.test(r.name))return n(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===t)return n(r,i)}):(n=t,this.walk((r,i)=>{if(r.type==="atrule")return n(r,i)}))}walkComments(t){return this.walk((n,r)=>{if(n.type==="comment")return t(n,r)})}walkDecls(t,n){return n?t instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&t.test(r.prop))return n(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===t)return n(r,i)}):(n=t,this.walk((r,i)=>{if(r.type==="decl")return n(r,i)}))}walkRules(t,n){return n?t instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&t.test(r.selector))return n(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===t)return n(r,i)}):(n=t,this.walk((r,i)=>{if(r.type==="rule")return n(r,i)}))}};Pr.registerParse=e=>{yN=e};Pr.registerRule=e=>{_b=e};Pr.registerAtRule=e=>{yb=e};Pr.registerRoot=e=>{_N=e};vN.exports=Pr;Pr.default=Pr;Pr.rebuild=e=>{let t=[e];for(;t.length>0;){let n=t.pop();if(n.type==="atrule"?Object.setPrototypeOf(n,yb.prototype):n.type==="rule"?Object.setPrototypeOf(n,_b.prototype):n.type==="decl"?Object.setPrototypeOf(n,pN.prototype):n.type==="comment"?Object.setPrototypeOf(n,hN.prototype):n.type==="root"&&Object.setPrototypeOf(n,_N.prototype),n[gN]=!0,n.nodes)for(let r of n.nodes)t.push(r)}}});var hh=x((P0e,kN)=>{"use strict";p();var bN=si(),Ro=class extends bN{constructor(t){super(t),this.type="atrule"}append(...t){return this.proxyOf.nodes||(this.nodes=[]),super.append(...t)}prepend(...t){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...t)}};kN.exports=Ro;Ro.default=Ro;bN.registerAtRule(Ro)});var ph=x((C0e,wN)=>{"use strict";p();var Dz=si(),SN,TN,na=class extends Dz{constructor(t){super({type:"document",...t}),this.nodes||(this.nodes=[])}toResult(t={}){return new SN(new TN,this,t).stringify()}};na.registerLazyResult=e=>{SN=e};na.registerProcessor=e=>{TN=e};wN.exports=na;na.default=na});var EN=x((q0e,xN)=>{p();var jz="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Bz=(e,t=21)=>(n=t)=>{let r="",i=n|0;for(;i-- >0;)r+=e[Math.random()*e.length|0];return r},Fz=(e=21)=>{let t="",n=e|0;for(;n-- >0;)t+=jz[Math.random()*64|0];return t};xN.exports={nanoid:Fz,customAlphabet:Bz}});var ON=x(vb=>{p();var AN="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");vb.encode=function(e){if(0<=e&&e<AN.length)return AN[e];throw new TypeError("Must be between 0 and 63: "+e)};vb.decode=function(e){var t=65,n=90,r=97,i=122,s=48,a=57,o=43,c=47,l=26,f=52;return t<=e&&e<=n?e-t:r<=e&&e<=i?e-r+l:s<=e&&e<=a?e-s+f:e==o?62:e==c?63:-1}});var Sb=x(kb=>{p();var PN=ON(),bb=5,NN=1<<bb,CN=NN-1,LN=NN;function Vz(e){return e<0?(-e<<1)+1:(e<<1)+0}function $z(e){var t=(e&1)===1,n=e>>1;return t?-n:n}kb.encode=function(t){var n="",r,i=Vz(t);do r=i&CN,i>>>=bb,i>0&&(r|=LN),n+=PN.encode(r);while(i>0);return n};kb.decode=function(t,n,r){var i=t.length,s=0,a=0,o,c;do{if(n>=i)throw new Error("Expected more digits in base 64 VLQ value.");if(c=PN.decode(t.charCodeAt(n++)),c===-1)throw new Error("Invalid base64 digit: "+t.charAt(n-1));o=!!(c&LN),c&=CN,s=s+(c<<a),a+=bb}while(o);r.value=$z(s),r.rest=n}});var jo=x(wt=>{p();function Uz(e,t,n){if(t in e)return e[t];if(arguments.length===3)return n;throw new Error('"'+t+'" is a required argument.')}wt.getArg=Uz;var qN=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,Hz=/^data:.+\,.+$/;function Yu(e){var t=e.match(qN);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}wt.urlParse=Yu;function Do(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}wt.urlGenerate=Do;var zz=32;function Wz(e){var t=[];return function(n){for(var r=0;r<t.length;r++)if(t[r].input===n){var i=t[0];return t[0]=t[r],t[r]=i,t[0].result}var s=e(n);return t.unshift({input:n,result:s}),t.length>zz&&t.pop(),s}}var Tb=Wz(function(t){var n=t,r=Yu(t);if(r){if(!r.path)return t;n=r.path}for(var i=wt.isAbsolute(n),s=[],a=0,o=0;;)if(a=o,o=n.indexOf("/",a),o===-1){s.push(n.slice(a));break}else for(s.push(n.slice(a,o));o<n.length&&n[o]==="/";)o++;for(var c,l=0,o=s.length-1;o>=0;o--)c=s[o],c==="."?s.splice(o,1):c===".."?l++:l>0&&(c===""?(s.splice(o+1,l),l=0):(s.splice(o,2),l--));return n=s.join("/"),n===""&&(n=i?"/":"."),r?(r.path=n,Do(r)):n});wt.normalize=Tb;function IN(e,t){e===""&&(e="."),t===""&&(t=".");var n=Yu(t),r=Yu(e);if(r&&(e=r.path||"/"),n&&!n.scheme)return r&&(n.scheme=r.scheme),Do(n);if(n||t.match(Hz))return t;if(r&&!r.host&&!r.path)return r.host=t,Do(r);var i=t.charAt(0)==="/"?t:Tb(e.replace(/\/+$/,"")+"/"+t);return r?(r.path=i,Do(r)):i}wt.join=IN;wt.isAbsolute=function(e){return e.charAt(0)==="/"||qN.test(e)};function Gz(e,t){e===""&&(e="."),e=e.replace(/\/$/,"");for(var n=0;t.indexOf(e+"/")!==0;){var r=e.lastIndexOf("/");if(r<0||(e=e.slice(0,r),e.match(/^([^\/]+:\/)?\/*$/)))return t;++n}return Array(n+1).join("../")+t.substr(e.length+1)}wt.relative=Gz;var MN=(function(){var e=Object.create(null);return!("__proto__"in e)})();function RN(e){return e}function Jz(e){return DN(e)?"$"+e:e}wt.toSetString=MN?RN:Jz;function Kz(e){return DN(e)?e.slice(1):e}wt.fromSetString=MN?RN:Kz;function DN(e){if(!e)return!1;var t=e.length;if(t<9||e.charCodeAt(t-1)!==95||e.charCodeAt(t-2)!==95||e.charCodeAt(t-3)!==111||e.charCodeAt(t-4)!==116||e.charCodeAt(t-5)!==111||e.charCodeAt(t-6)!==114||e.charCodeAt(t-7)!==112||e.charCodeAt(t-8)!==95||e.charCodeAt(t-9)!==95)return!1;for(var n=t-10;n>=0;n--)if(e.charCodeAt(n)!==36)return!1;return!0}function Yz(e,t,n){var r=ai(e.source,t.source);return r!==0||(r=e.originalLine-t.originalLine,r!==0)||(r=e.originalColumn-t.originalColumn,r!==0||n)||(r=e.generatedColumn-t.generatedColumn,r!==0)||(r=e.generatedLine-t.generatedLine,r!==0)?r:ai(e.name,t.name)}wt.compareByOriginalPositions=Yz;function Qz(e,t,n){var r;return r=e.originalLine-t.originalLine,r!==0||(r=e.originalColumn-t.originalColumn,r!==0||n)||(r=e.generatedColumn-t.generatedColumn,r!==0)||(r=e.generatedLine-t.generatedLine,r!==0)?r:ai(e.name,t.name)}wt.compareByOriginalPositionsNoSource=Qz;function Xz(e,t,n){var r=e.generatedLine-t.generatedLine;return r!==0||(r=e.generatedColumn-t.generatedColumn,r!==0||n)||(r=ai(e.source,t.source),r!==0)||(r=e.originalLine-t.originalLine,r!==0)||(r=e.originalColumn-t.originalColumn,r!==0)?r:ai(e.name,t.name)}wt.compareByGeneratedPositionsDeflated=Xz;function Zz(e,t,n){var r=e.generatedColumn-t.generatedColumn;return r!==0||n||(r=ai(e.source,t.source),r!==0)||(r=e.originalLine-t.originalLine,r!==0)||(r=e.originalColumn-t.originalColumn,r!==0)?r:ai(e.name,t.name)}wt.compareByGeneratedPositionsDeflatedNoLine=Zz;function ai(e,t){return e===t?0:e===null?1:t===null?-1:e>t?1:-1}function eW(e,t){var n=e.generatedLine-t.generatedLine;return n!==0||(n=e.generatedColumn-t.generatedColumn,n!==0)||(n=ai(e.source,t.source),n!==0)||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0)?n:ai(e.name,t.name)}wt.compareByGeneratedPositionsInflated=eW;function tW(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))}wt.parseSourceMapInput=tW;function nW(e,t,n){if(t=t||"",e&&(e[e.length-1]!=="/"&&t[0]!=="/"&&(e+="/"),t=e+t),n){var r=Yu(n);if(!r)throw new Error("sourceMapURL could not be parsed");if(r.path){var i=r.path.lastIndexOf("/");i>=0&&(r.path=r.path.substring(0,i+1))}t=IN(Do(r),t)}return Tb(t)}wt.computeSourceURL=nW});var Eb=x(jN=>{p();var wb=jo(),xb=Object.prototype.hasOwnProperty,ra=typeof Map<"u";function oi(){this._array=[],this._set=ra?new Map:Object.create(null)}oi.fromArray=function(t,n){for(var r=new oi,i=0,s=t.length;i<s;i++)r.add(t[i],n);return r};oi.prototype.size=function(){return ra?this._set.size:Object.getOwnPropertyNames(this._set).length};oi.prototype.add=function(t,n){var r=ra?t:wb.toSetString(t),i=ra?this.has(t):xb.call(this._set,r),s=this._array.length;(!i||n)&&this._array.push(t),i||(ra?this._set.set(t,s):this._set[r]=s)};oi.prototype.has=function(t){if(ra)return this._set.has(t);var n=wb.toSetString(t);return xb.call(this._set,n)};oi.prototype.indexOf=function(t){if(ra){var n=this._set.get(t);if(n>=0)return n}else{var r=wb.toSetString(t);if(xb.call(this._set,r))return this._set[r]}throw new Error('"'+t+'" is not in the set.')};oi.prototype.at=function(t){if(t>=0&&t<this._array.length)return this._array[t];throw new Error("No element indexed by "+t)};oi.prototype.toArray=function(){return this._array.slice()};jN.ArraySet=oi});var VN=x(FN=>{p();var BN=jo();function rW(e,t){var n=e.generatedLine,r=t.generatedLine,i=e.generatedColumn,s=t.generatedColumn;return r>n||r==n&&s>=i||BN.compareByGeneratedPositionsInflated(e,t)<=0}function mh(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}mh.prototype.unsortedForEach=function(t,n){this._array.forEach(t,n)};mh.prototype.add=function(t){rW(this._last,t)?(this._last=t,this._array.push(t)):(this._sorted=!1,this._array.push(t))};mh.prototype.toArray=function(){return this._sorted||(this._array.sort(BN.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};FN.MappingList=mh});var Ab=x($N=>{p();var Qu=Sb(),lt=jo(),gh=Eb().ArraySet,iW=VN().MappingList;function Un(e){e||(e={}),this._file=lt.getArg(e,"file",null),this._sourceRoot=lt.getArg(e,"sourceRoot",null),this._skipValidation=lt.getArg(e,"skipValidation",!1),this._ignoreInvalidMapping=lt.getArg(e,"ignoreInvalidMapping",!1),this._sources=new gh,this._names=new gh,this._mappings=new iW,this._sourcesContents=null}Un.prototype._version=3;Un.fromSourceMap=function(t,n){var r=t.sourceRoot,i=new Un(Object.assign(n||{},{file:t.file,sourceRoot:r}));return t.eachMapping(function(s){var a={generated:{line:s.generatedLine,column:s.generatedColumn}};s.source!=null&&(a.source=s.source,r!=null&&(a.source=lt.relative(r,a.source)),a.original={line:s.originalLine,column:s.originalColumn},s.name!=null&&(a.name=s.name)),i.addMapping(a)}),t.sources.forEach(function(s){var a=s;r!==null&&(a=lt.relative(r,s)),i._sources.has(a)||i._sources.add(a);var o=t.sourceContentFor(s);o!=null&&i.setSourceContent(s,o)}),i};Un.prototype.addMapping=function(t){var n=lt.getArg(t,"generated"),r=lt.getArg(t,"original",null),i=lt.getArg(t,"source",null),s=lt.getArg(t,"name",null);!this._skipValidation&&this._validateMapping(n,r,i,s)===!1||(i!=null&&(i=String(i),this._sources.has(i)||this._sources.add(i)),s!=null&&(s=String(s),this._names.has(s)||this._names.add(s)),this._mappings.add({generatedLine:n.line,generatedColumn:n.column,originalLine:r!=null&&r.line,originalColumn:r!=null&&r.column,source:i,name:s}))};Un.prototype.setSourceContent=function(t,n){var r=t;this._sourceRoot!=null&&(r=lt.relative(this._sourceRoot,r)),n!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[lt.toSetString(r)]=n):this._sourcesContents&&(delete this._sourcesContents[lt.toSetString(r)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};Un.prototype.applySourceMap=function(t,n,r){var i=n;if(n==null){if(t.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);i=t.file}var s=this._sourceRoot;s!=null&&(i=lt.relative(s,i));var a=new gh,o=new gh;this._mappings.unsortedForEach(function(c){if(c.source===i&&c.originalLine!=null){var l=t.originalPositionFor({line:c.originalLine,column:c.originalColumn});l.source!=null&&(c.source=l.source,r!=null&&(c.source=lt.join(r,c.source)),s!=null&&(c.source=lt.relative(s,c.source)),c.originalLine=l.line,c.originalColumn=l.column,l.name!=null&&(c.name=l.name))}var f=c.source;f!=null&&!a.has(f)&&a.add(f);var h=c.name;h!=null&&!o.has(h)&&o.add(h)},this),this._sources=a,this._names=o,t.sources.forEach(function(c){var l=t.sourceContentFor(c);l!=null&&(r!=null&&(c=lt.join(r,c)),s!=null&&(c=lt.relative(s,c)),this.setSourceContent(c,l))},this)};Un.prototype._validateMapping=function(t,n,r,i){if(n&&typeof n.line!="number"&&typeof n.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(!(t&&"line"in t&&"column"in t&&t.line>0&&t.column>=0&&!n&&!r&&!i)){if(t&&"line"in t&&"column"in t&&n&&"line"in n&&"column"in n&&t.line>0&&t.column>=0&&n.line>0&&n.column>=0&&r)return;var s="Invalid mapping: "+JSON.stringify({generated:t,source:r,original:n,name:i});if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(s),!1;throw new Error(s)}};Un.prototype._serializeMappings=function(){for(var t=0,n=1,r=0,i=0,s=0,a=0,o="",c,l,f,h,d=this._mappings.toArray(),g=0,v=d.length;g<v;g++){if(l=d[g],c="",l.generatedLine!==n){t=0;var b=l.generatedLine-n;c+=b===1?";":";".repeat(b),n=l.generatedLine}else if(g>0){if(!lt.compareByGeneratedPositionsInflated(l,d[g-1]))continue;c+=","}c+=Qu.encode(l.generatedColumn-t),t=l.generatedColumn,l.source!=null&&(h=this._sources.indexOf(l.source),c+=Qu.encode(h-a),a=h,c+=Qu.encode(l.originalLine-1-i),i=l.originalLine-1,c+=Qu.encode(l.originalColumn-r),r=l.originalColumn,l.name!=null&&(f=this._names.indexOf(l.name),c+=Qu.encode(f-s),s=f)),o+=c}return o};Un.prototype._generateSourcesContent=function(t,n){return t.map(function(r){if(!this._sourcesContents)return null;n!=null&&(r=lt.relative(n,r));var i=lt.toSetString(r);return Object.prototype.hasOwnProperty.call(this._sourcesContents,i)?this._sourcesContents[i]:null},this)};Un.prototype.toJSON=function(){var t={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(t.file=this._file),this._sourceRoot!=null&&(t.sourceRoot=this._sourceRoot),this._sourcesContents&&(t.sourcesContent=this._generateSourcesContent(t.sources,t.sourceRoot)),t};Un.prototype.toString=function(){return JSON.stringify(this.toJSON())};$N.SourceMapGenerator=Un});var UN=x(ia=>{p();ia.GREATEST_LOWER_BOUND=1;ia.LEAST_UPPER_BOUND=2;function Ob(e,t,n,r,i,s){var a=Math.floor((t-e)/2)+e,o=i(n,r[a],!0);return o===0?a:o>0?t-a>1?Ob(a,t,n,r,i,s):s==ia.LEAST_UPPER_BOUND?t<r.length?t:-1:a:a-e>1?Ob(e,a,n,r,i,s):s==ia.LEAST_UPPER_BOUND?a:e<0?-1:e}ia.search=function(t,n,r,i){if(n.length===0)return-1;var s=Ob(-1,n.length,t,n,r,i||ia.GREATEST_LOWER_BOUND);if(s<0)return-1;for(;s-1>=0&&r(n[s],n[s-1],!0)===0;)--s;return s}});var GN=x(WN=>{p();function zN(e){function t(i,s,a){var o=i[s];i[s]=i[a],i[a]=o}function n(i,s){return Math.round(i+Math.random()*(s-i))}function r(i,s,a,o){if(a<o){var c=n(a,o),l=a-1;t(i,c,o);for(var f=i[o],h=a;h<o;h++)s(i[h],f,!1)<=0&&(l+=1,t(i,l,h));t(i,l+1,h);var d=l+1;r(i,s,a,d-1),r(i,s,d+1,o)}}return r}function sW(e){let t=zN.toString();return new Function(`return ${t}`)()(e)}var aW=(function(){try{return new Function("return 0")(),!0}catch{return!1}})(),HN=new WeakMap;WN.quickSort=function(e,t,n=0){let r=aW?HN.get(t):zN(t);r===void 0&&(r=sW(t),HN.set(t,r)),r(e,t,n,e.length-1)}});var QN=x(_h=>{p();var se=jo(),Nb=UN(),Bo=Eb().ArraySet,oW=Sb(),Xu=GN().quickSort,yh=1e7;function Ye(e,t){var n=e;return typeof e=="string"&&(n=se.parseSourceMapInput(e)),n.sections!=null?new ur(n,t):new Nt(n,t)}Ye.fromSourceMap=function(e,t){return Nt.fromSourceMap(e,t)};Ye.prototype._version=3;Ye.prototype.__generatedMappings=null;Object.defineProperty(Ye.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});Ye.prototype.__originalMappings=null;Object.defineProperty(Ye.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});Ye.prototype._charIsMappingSeparator=function(t,n){var r=t.charAt(n);return r===";"||r===","};Ye.prototype._parseMappings=function(t,n){throw new Error("Subclasses must implement _parseMappings")};Ye.GENERATED_ORDER=1;Ye.ORIGINAL_ORDER=2;Ye.GREATEST_LOWER_BOUND=1;Ye.LEAST_UPPER_BOUND=2;Ye.prototype.eachMapping=function(t,n,r){var i=n||null,s=r||Ye.GENERATED_ORDER,a;switch(s){case Ye.GENERATED_ORDER:a=this._generatedMappings;break;case Ye.ORIGINAL_ORDER:a=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}for(var o=this.sourceRoot,c=t.bind(i),l=this._names,f=this._sources,h=this._sourceMapURL,d=0,g=a.length;d<g;d++){var v=a[d],b=v.source===null?null:f.at(v.source);b!==null&&(b=se.computeSourceURL(o,b,h)),c({source:b,generatedLine:v.generatedLine,generatedColumn:v.generatedColumn,originalLine:v.originalLine,originalColumn:v.originalColumn,name:v.name===null?null:l.at(v.name)})}};Ye.prototype.allGeneratedPositionsFor=function(t){var n=se.getArg(t,"line"),r={source:se.getArg(t,"source"),originalLine:n,originalColumn:se.getArg(t,"column",0)};if(r.source=this._findSourceIndex(r.source),r.source<0)return[];var i=[],s=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",se.compareByOriginalPositions,Nb.LEAST_UPPER_BOUND);if(s>=0){var a=this._originalMappings[s];if(t.column===void 0)for(var o=a.originalLine;a&&a.originalLine===o;)i.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 c=a.originalColumn;a&&a.originalLine===n&&a.originalColumn==c;)i.push({line:se.getArg(a,"generatedLine",null),column:se.getArg(a,"generatedColumn",null),lastColumn:se.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++s]}return i};_h.SourceMapConsumer=Ye;function Nt(e,t){var n=e;typeof e=="string"&&(n=se.parseSourceMapInput(e));var r=se.getArg(n,"version"),i=se.getArg(n,"sources"),s=se.getArg(n,"names",[]),a=se.getArg(n,"sourceRoot",null),o=se.getArg(n,"sourcesContent",null),c=se.getArg(n,"mappings"),l=se.getArg(n,"file",null);if(r!=this._version)throw new Error("Unsupported version: "+r);a&&(a=se.normalize(a)),i=i.map(String).map(se.normalize).map(function(f){return a&&se.isAbsolute(a)&&se.isAbsolute(f)?se.relative(a,f):f}),this._names=Bo.fromArray(s.map(String),!0),this._sources=Bo.fromArray(i,!0),this._absoluteSources=this._sources.toArray().map(function(f){return se.computeSourceURL(a,f,t)}),this.sourceRoot=a,this.sourcesContent=o,this._mappings=c,this._sourceMapURL=t,this.file=l}Nt.prototype=Object.create(Ye.prototype);Nt.prototype.consumer=Ye;Nt.prototype._findSourceIndex=function(e){var t=e;if(this.sourceRoot!=null&&(t=se.relative(this.sourceRoot,t)),this._sources.has(t))return this._sources.indexOf(t);var n;for(n=0;n<this._absoluteSources.length;++n)if(this._absoluteSources[n]==e)return n;return-1};Nt.fromSourceMap=function(t,n){var r=Object.create(Nt.prototype),i=r._names=Bo.fromArray(t._names.toArray(),!0),s=r._sources=Bo.fromArray(t._sources.toArray(),!0);r.sourceRoot=t._sourceRoot,r.sourcesContent=t._generateSourcesContent(r._sources.toArray(),r.sourceRoot),r.file=t._file,r._sourceMapURL=n,r._absoluteSources=r._sources.toArray().map(function(g){return se.computeSourceURL(r.sourceRoot,g,n)});for(var a=t._mappings.toArray().slice(),o=r.__generatedMappings=[],c=r.__originalMappings=[],l=0,f=a.length;l<f;l++){var h=a[l],d=new YN;d.generatedLine=h.generatedLine,d.generatedColumn=h.generatedColumn,h.source&&(d.source=s.indexOf(h.source),d.originalLine=h.originalLine,d.originalColumn=h.originalColumn,h.name&&(d.name=i.indexOf(h.name)),c.push(d)),o.push(d)}return Xu(r.__originalMappings,se.compareByOriginalPositions),r};Nt.prototype._version=3;Object.defineProperty(Nt.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function YN(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}var Pb=se.compareByGeneratedPositionsDeflatedNoLine;function JN(e,t){let n=e.length,r=e.length-t;if(!(r<=1))if(r==2){let i=e[t],s=e[t+1];Pb(i,s)>0&&(e[t]=s,e[t+1]=i)}else if(r<20)for(let i=t;i<n;i++)for(let s=i;s>t;s--){let a=e[s-1],o=e[s];if(Pb(a,o)<=0)break;e[s-1]=o,e[s]=a}else Xu(e,Pb,t)}Nt.prototype._parseMappings=function(t,n){var r=1,i=0,s=0,a=0,o=0,c=0,l=t.length,f=0,h={},d={},g=[],v=[],b,_,k,T,w;let y=0;for(;f<l;)if(t.charAt(f)===";")r++,f++,i=0,JN(v,y),y=v.length;else if(t.charAt(f)===",")f++;else{for(b=new YN,b.generatedLine=r,T=f;T<l&&!this._charIsMappingSeparator(t,T);T++);for(_=t.slice(f,T),k=[];f<T;)oW.decode(t,f,d),w=d.value,f=d.rest,k.push(w);if(k.length===2)throw new Error("Found a source, but no line and column");if(k.length===3)throw new Error("Found a source and line, but no column");if(b.generatedColumn=i+k[0],i=b.generatedColumn,k.length>1&&(b.source=o+k[1],o+=k[1],b.originalLine=s+k[2],s=b.originalLine,b.originalLine+=1,b.originalColumn=a+k[3],a=b.originalColumn,k.length>4&&(b.name=c+k[4],c+=k[4])),v.push(b),typeof b.originalLine=="number"){let P=b.source;for(;g.length<=P;)g.push(null);g[P]===null&&(g[P]=[]),g[P].push(b)}}JN(v,y),this.__generatedMappings=v;for(var A=0;A<g.length;A++)g[A]!=null&&Xu(g[A],se.compareByOriginalPositionsNoSource);this.__originalMappings=[].concat(...g)};Nt.prototype._findMapping=function(t,n,r,i,s,a){if(t[r]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+t[r]);if(t[i]<0)throw new TypeError("Column must be greater than or equal to 0, got "+t[i]);return Nb.search(t,n,s,a)};Nt.prototype.computeColumnSpans=function(){for(var t=0;t<this._generatedMappings.length;++t){var n=this._generatedMappings[t];if(t+1<this._generatedMappings.length){var r=this._generatedMappings[t+1];if(n.generatedLine===r.generatedLine){n.lastGeneratedColumn=r.generatedColumn-1;continue}}n.lastGeneratedColumn=1/0}};Nt.prototype.originalPositionFor=function(t){var n={generatedLine:se.getArg(t,"line"),generatedColumn:se.getArg(t,"column")},r=this._findMapping(n,this._generatedMappings,"generatedLine","generatedColumn",se.compareByGeneratedPositionsDeflated,se.getArg(t,"bias",Ye.GREATEST_LOWER_BOUND));if(r>=0){var i=this._generatedMappings[r];if(i.generatedLine===n.generatedLine){var s=se.getArg(i,"source",null);s!==null&&(s=this._sources.at(s),s=se.computeSourceURL(this.sourceRoot,s,this._sourceMapURL));var a=se.getArg(i,"name",null);return a!==null&&(a=this._names.at(a)),{source:s,line:se.getArg(i,"originalLine",null),column:se.getArg(i,"originalColumn",null),name:a}}}return{source:null,line:null,column:null,name:null}};Nt.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(t){return t==null}):!1};Nt.prototype.sourceContentFor=function(t,n){if(!this.sourcesContent)return null;var r=this._findSourceIndex(t);if(r>=0)return this.sourcesContent[r];var i=t;this.sourceRoot!=null&&(i=se.relative(this.sourceRoot,i));var s;if(this.sourceRoot!=null&&(s=se.urlParse(this.sourceRoot))){var a=i.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("/"+i))return this.sourcesContent[this._sources.indexOf("/"+i)]}if(n)return null;throw new Error('"'+i+'" is not in the SourceMap.')};Nt.prototype.generatedPositionFor=function(t){var n=se.getArg(t,"source");if(n=this._findSourceIndex(n),n<0)return{line:null,column:null,lastColumn:null};var r={source:n,originalLine:se.getArg(t,"line"),originalColumn:se.getArg(t,"column")},i=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",se.compareByOriginalPositions,se.getArg(t,"bias",Ye.GREATEST_LOWER_BOUND));if(i>=0){var s=this._originalMappings[i];if(s.source===r.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}};_h.BasicSourceMapConsumer=Nt;function ur(e,t){var n=e;typeof e=="string"&&(n=se.parseSourceMapInput(e));var r=se.getArg(n,"version"),i=se.getArg(n,"sections");if(r!=this._version)throw new Error("Unsupported version: "+r);this._sources=new Bo,this._names=new Bo;var s={line:-1,column:0},a=0;this._sections=i.map(function(o){if(o.url)throw new Error("Support for url field in sections not implemented.");var c=se.getArg(o,"offset"),l=se.getArg(c,"line"),f=se.getArg(c,"column");if(!KN(l)||!KN(f))throw new Error("Section offset line and column must be non-negative integers.");if(l>yh)throw new Error("Section offset line must not exceed "+yh+".");if(l<s.line||l===s.line&&f<s.column)throw new Error("Section offsets must be ordered and non-overlapping.");s=c;var h=new Ye(se.getArg(o,"map"),t),d=l+(h._maxOffsetLine||0);if(d>yh)throw new Error("Section offset line must not exceed "+yh+", including offsets of nested sections.");return d>a&&(a=d),{generatedOffset:{generatedLine:l+1,generatedColumn:f+1},consumer:h}}),this._maxOffsetLine=a}function KN(e){return typeof e=="number"&&e>=0&&e<=9007199254740991&&Math.floor(e)===e}ur.prototype=Object.create(Ye.prototype);ur.prototype.constructor=Ye;ur.prototype._version=3;Object.defineProperty(ur.prototype,"sources",{get:function(){for(var e=[],t=0;t<this._sections.length;t++)for(var n=this._sections[t].consumer.sources,r=0;r<n.length;r++)e.push(n[r]);return e}});ur.prototype.originalPositionFor=function(t){var n={generatedLine:se.getArg(t,"line"),generatedColumn:se.getArg(t,"column")},r=Nb.search(n,this._sections,function(s,a){var o=s.generatedLine-a.generatedOffset.generatedLine;return o||s.generatedColumn-a.generatedOffset.generatedColumn}),i=this._sections[r];return i?i.consumer.originalPositionFor({line:n.generatedLine-(i.generatedOffset.generatedLine-1),column:n.generatedColumn-(i.generatedOffset.generatedLine===n.generatedLine?i.generatedOffset.generatedColumn-1:0),bias:t.bias}):{source:null,line:null,column:null,name:null}};ur.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(t){return t.consumer.hasContentsOfAllSources()})};ur.prototype.sourceContentFor=function(t,n){for(var r=0;r<this._sections.length;r++){var i=this._sections[r],s=i.consumer.sourceContentFor(t,!0);if(s||s==="")return s}if(n)return null;throw new Error('"'+t+'" is not in the SourceMap.')};ur.prototype.generatedPositionFor=function(t){for(var n=0;n<this._sections.length;n++){var r=this._sections[n];if(r.consumer._findSourceIndex(se.getArg(t,"source"))!==-1){var i=r.consumer.generatedPositionFor(t);if(i){var s={line:i.line+(r.generatedOffset.generatedLine-1),column:i.column+(r.generatedOffset.generatedLine===i.line?r.generatedOffset.generatedColumn-1:0)};return s}}}return{line:null,column:null}};ur.prototype._parseMappings=function(t,n){this.__generatedMappings=[],this.__originalMappings=[];for(var r=0;r<this._sections.length;r++)for(var i=this._sections[r],s=i.consumer._generatedMappings,a=0;a<s.length;a++){var o=s[a],c=i.consumer._sources.at(o.source);c!==null&&(c=se.computeSourceURL(i.consumer.sourceRoot,c,this._sourceMapURL)),this._sources.add(c),c=this._sources.indexOf(c);var l=null;o.name&&(l=i.consumer._names.at(o.name),this._names.add(l),l=this._names.indexOf(l));var f={source:c,generatedLine:o.generatedLine+(i.generatedOffset.generatedLine-1),generatedColumn:o.generatedColumn+(i.generatedOffset.generatedLine===o.generatedLine?i.generatedOffset.generatedColumn-1:0),originalLine:o.originalLine,originalColumn:o.originalColumn,name:l};this.__generatedMappings.push(f),typeof f.originalLine=="number"&&this.__originalMappings.push(f)}Xu(this.__generatedMappings,se.compareByGeneratedPositionsDeflated),Xu(this.__originalMappings,se.compareByOriginalPositions)};_h.IndexedSourceMapConsumer=ur});var ZN=x(XN=>{p();var cW=Ab().SourceMapGenerator,vh=jo(),uW=/(\r?\n)/,lW=10,Fo="$$$isSourceNode$$$";function wn(e,t,n,r,i){this.children=[],this.sourceContents={},this.line=e??null,this.column=t??null,this.source=n??null,this.name=i??null,this[Fo]=!0,r!=null&&this.add(r)}wn.fromStringWithSourceMap=function(t,n,r){var i=new wn,s=t.split(uW),a=0,o=function(){var d=v(),g=v()||"";return d+g;function v(){return a<s.length?s[a++]:void 0}},c=1,l=0,f=null;return n.eachMapping(function(d){if(f!==null)if(c<d.generatedLine)h(f,o()),c++,l=0;else{var g=s[a]||"",v=g.substr(0,d.generatedColumn-l);s[a]=g.substr(d.generatedColumn-l),l=d.generatedColumn,h(f,v),f=d;return}for(;c<d.generatedLine;){if(a>=s.length){c=d.generatedLine;break}i.add(o()),c++}if(l<d.generatedColumn){var g=s[a]||"";i.add(g.substr(0,d.generatedColumn)),s[a]=g.substr(d.generatedColumn),l=d.generatedColumn}f=d},this),a<s.length&&(f&&h(f,o()),i.add(s.splice(a).join(""))),n.sources.forEach(function(d){var g=n.sourceContentFor(d);g!=null&&(r!=null&&(d=vh.join(r,d)),i.setSourceContent(d,g))}),i;function h(d,g){if(d===null||d.source===void 0)i.add(g);else{var v=r?vh.join(r,d.source):d.source;i.add(new wn(d.originalLine,d.originalColumn,v,g,d.name))}}};wn.prototype.add=function(t){if(Array.isArray(t))t.forEach(function(n){this.add(n)},this);else if(t[Fo]||typeof t=="string")t&&this.children.push(t);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);return this};wn.prototype.prepend=function(t){if(Array.isArray(t))for(var n=t.length-1;n>=0;n--)this.prepend(t[n]);else if(t[Fo]||typeof t=="string")this.children.unshift(t);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);return this};wn.prototype.walk=function(t){for(var n,r=0,i=this.children.length;r<i;r++)n=this.children[r],n[Fo]?n.walk(t):n!==""&&t(n,{source:this.source,line:this.line,column:this.column,name:this.name})};wn.prototype.join=function(t){var n,r,i=this.children.length;if(i>0){for(n=[],r=0;r<i-1;r++)n.push(this.children[r]),n.push(t);n.push(this.children[r]),this.children=n}return this};wn.prototype.replaceRight=function(t,n){var r=this.children[this.children.length-1];return r[Fo]?r.replaceRight(t,n):typeof r=="string"?this.children[this.children.length-1]=r.replace(t,n):this.children.push("".replace(t,n)),this};wn.prototype.setSourceContent=function(t,n){this.sourceContents[vh.toSetString(t)]=n};wn.prototype.walkSourceContents=function(t){for(var n=0,r=this.children.length;n<r;n++)this.children[n][Fo]&&this.children[n].walkSourceContents(t);for(var i=Object.keys(this.sourceContents),n=0,r=i.length;n<r;n++)t(vh.fromSetString(i[n]),this.sourceContents[i[n]])};wn.prototype.toString=function(){var t="";return this.walk(function(n){t+=n}),t};wn.prototype.toStringWithSourceMap=function(t){var n={code:"",line:1,column:0},r=new cW(t),i=!1,s=null,a=null,o=null,c=null;return this.walk(function(l,f){n.code+=l,f.source!==null&&f.line!==null&&f.column!==null?((s!==f.source||a!==f.line||o!==f.column||c!==f.name)&&r.addMapping({source:f.source,original:{line:f.line,column:f.column},generated:{line:n.line,column:n.column},name:f.name}),s=f.source,a=f.line,o=f.column,c=f.name,i=!0):i&&(r.addMapping({generated:{line:n.line,column:n.column}}),s=null,i=!1);for(var h=0,d=l.length;h<d;h++)l.charCodeAt(h)===lW?(n.line++,n.column=0,h+1===d?(s=null,i=!1):i&&r.addMapping({source:f.source,original:{line:f.line,column:f.column},generated:{line:n.line,column:n.column},name:f.name})):n.column++}),this.walkSourceContents(function(l,f){r.setSourceContent(l,f)}),{code:n.code,map:r}};XN.SourceNode=wn});var kh=x(bh=>{p();bh.SourceMapGenerator=Ab().SourceMapGenerator;bh.SourceMapConsumer=QN().SourceMapConsumer;bh.SourceNode=ZN().SourceNode});var Cb=x((rke,rC)=>{"use strict";p();var{existsSync:fW,readFileSync:dW,realpathSync:hW}=ce("fs"),{dirname:Sh,isAbsolute:pW,join:mW,relative:gW,sep:yW}=ce("path"),{SourceMapConsumer:eC,SourceMapGenerator:tC}=kh();function nC(e){try{return hW(e)}catch{return e}}function _W(e){return Buffer?Buffer.from(e,"base64").toString():window.atob(e)}var Zu=class{constructor(t,n){if(n.map===!1)return;n.unsafeMap&&(this.unsafeMap=!0),this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");let r=n.map?n.map.prev:void 0,i=this.loadMap(n.from,r);!this.mapFile&&n.from&&(this.mapFile=n.from),this.mapFile&&(this.root=Sh(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new eC(this.json||this.text)),this.consumerCache}decodeInline(t){let n=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,s=/^data:application\/json,/,a=t.match(i)||t.match(s);if(a)return decodeURIComponent(t.substr(a[0].length));let o=t.match(n)||t.match(r);if(o)return _W(t.substr(o[0].length));let c=t.slice(22);throw c=c.slice(0,c.indexOf(",")),new Error("Unsupported source map encoding "+c)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return typeof t!="object"?!1:typeof t.mappings=="string"||typeof t._mappings=="string"||Array.isArray(t.sections)}loadAnnotation(t){let n=t.match(/\/\*\s*# sourceMappingURL=/g);if(!n)return;let r=t.lastIndexOf(n.pop()),i=t.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(t.substring(r,i)))}loadFile(t,n,r){if(!r&&!this.unsafeMap){if(!/\.map$/i.test(t)||!n)return;let i=gW(nC(Sh(n)),nC(t));if(i===".."||i.startsWith(".."+yW)||pW(i))return}if(this.root=Sh(t),fW(t))return this.mapFile=t,dW(t,"utf-8").toString().trim()}loadMap(t,n){if(n===!1)return!1;if(n){if(typeof n=="string")return n;if(typeof n=="function"){let r=n(t);if(r){let i=this.loadFile(r,t,!0);if(!i)throw new Error("Unable to load previous source map: "+r.toString());return i}}else{if(n instanceof eC)return tC.fromSourceMap(n).toString();if(n instanceof tC)return n.toString();if(this.isMap(n))return JSON.stringify(n);throw new Error("Unsupported previous source map format: "+n.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;t&&(r=mW(Sh(t),r));let i=this.loadFile(r,t,!1);if(i)try{this.json=JSON.parse(i.replace(/^\)]}'[^\n]*\n/,""))}catch{return}return i}}}startWith(t,n){return t?t.substr(0,n.length)===n:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};rC.exports=Zu;Zu.default=Zu});var el=x((ske,cC)=>{"use strict";p();var{nanoid:vW}=EN(),{isAbsolute:Ib,resolve:Mb}=ce("path"),{SourceMapConsumer:bW,SourceMapGenerator:kW}=kh(),{fileURLToPath:iC,pathToFileURL:Th}=ce("url"),sC=dh(),SW=Cb(),Lb=hb(),qb=Symbol("lineToIndexCache"),TW=!!(bW&&kW),aC=!!(Mb&&Ib);function oC(e){if(e[qb])return e[qb];let t=e.css.split(`
|
|
54
|
+
`),n=new Array(t.length),r=0;for(let i=0,s=t.length;i<s;i++)n[i]=r,r+=t[i].length+1;return e[qb]=n,n}var Vo=class{get from(){return this.file||this.id}constructor(t,n={}){if(t===null||typeof t>"u"||typeof t=="object"&&!t.toString)throw new Error(`PostCSS received ${t} instead of CSS string`);if(this.css=t.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,n.document&&(this.document=n.document.toString()),n.from&&(!aC||/^\w+:\/\//.test(n.from)||Ib(n.from)?this.file=n.from:this.file=Mb(n.from)),aC&&TW){let r=new SW(this.css,n);if(r.text){this.map=r;let i=r.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id="<input css "+vW(6)+">"),this.map&&(this.map.file=this.from)}error(t,n,r,i={}){let s,a,o,c,l;if(n&&typeof n=="object"){let h=n,d=r;if(typeof h.offset=="number"){c=h.offset;let g=this.fromOffset(c);n=g.line,r=g.col}else n=h.line,r=h.column,c=this.fromLineAndColumn(n,r);if(typeof d.offset=="number"){o=d.offset;let g=this.fromOffset(o);a=g.line,s=g.col}else a=d.line,s=d.column,o=this.fromLineAndColumn(d.line,d.column)}else if(r)c=this.fromLineAndColumn(n,r);else{c=n;let h=this.fromOffset(c);n=h.line,r=h.col}let f=this.origin(n,r,a,s);return f?l=new sC(t,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,i.plugin):l=new sC(t,a===void 0?n:{column:r,line:n},a===void 0?r:{column:s,line:a},this.css,this.file,i.plugin),l.input={column:r,endColumn:s,endLine:a,endOffset:o,line:n,offset:c,source:this.css},this.file&&(Th&&(l.input.url=Th(this.file).toString()),l.input.file=this.file),l}fromLineAndColumn(t,n){return oC(this)[t-1]+n-1}fromOffset(t){let n=oC(this),r=n[n.length-1],i=0;if(t>=r)i=n.length-1;else{let s=n.length-2,a;for(;i<s;)if(a=i+(s-i>>1),t<n[a])s=a-1;else if(t>=n[a+1])i=a+1;else{i=a;break}}return{col:t-n[i]+1,line:i+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:Mb(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,n,r,i){if(!this.map)return!1;let s=this.map.consumer(),a=s.originalPositionFor({column:n-1,line:t});if(!a.source)return!1;let o;if(typeof r=="number"){let h=s.originalPositionFor({column:i-1,line:r});h.source&&(o=h)}let c;Ib(a.source)?c=Th(a.source):c=new URL(a.source,this.map.consumer().sourceRoot||Th(this.map.mapFile));let l={column:a.column+1,endColumn:o&&o.column+1,endLine:o&&o.line,line:a.line,url:c.toString()};if(c.protocol==="file:")if(iC)l.file=iC(c);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 t={};for(let n of["hasBOM","css","file","id"])this[n]!=null&&(t[n]=this[n]);return this.map&&(t.map={...this.map},t.map.consumerCache&&(t.map.consumerCache=void 0)),t}};cC.exports=Vo;Vo.default=Vo;Lb&&Lb.registerInput&&Lb.registerInput(Vo)});var $o=x((oke,dC)=>{"use strict";p();var uC=si(),lC,fC,Gi=class extends uC{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,n,r){let i=new Set;for(let a of Array.isArray(t)?t:[t])a&&typeof a=="object"&&!a.parent&&a.raws&&typeof a.raws.before<"u"&&i.add(a.raws);let s=super.normalize(t);if(n){if(r==="prepend")this.nodes.length>1?n.raws.before=this.nodes[1].raws.before:delete n.raws.before;else if(this.first!==n)for(let a of s)i.has(a.raws)||(a.raws.before=n.raws.before)}return s}removeChild(t,n){let r=this.index(t);return!n&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(t)}toResult(t={}){return new lC(new fC,this,t).stringify()}};Gi.registerLazyResult=e=>{lC=e};Gi.registerProcessor=e=>{fC=e};dC.exports=Gi;Gi.default=Gi;uC.registerRoot(Gi)});var Rb=x((uke,hC)=>{"use strict";p();var tl={comma(e){return tl.split(e,[","],!0)},space(e){let t=[" ",`
|
|
55
|
+
`," "];return tl.split(e,t)},split(e,t,n){if(typeof e!="string")return[];let r=[],i="",s=!1,a=0,o=!1,c="",l=!1;for(let f of e)l?l=!1:f==="\\"?l=!0:o?f===c&&(o=!1):f==='"'||f==="'"?(o=!0,c=f):f==="("?a+=1:f===")"?a>0&&(a-=1):a===0&&t.includes(f)&&(s=!0),s?(i!==""&&r.push(i.trim()),i="",s=!1):i+=f;return(n||i!=="")&&r.push(i.trim()),r}};hC.exports=tl;tl.default=tl});var wh=x((fke,mC)=>{"use strict";p();var pC=si(),wW=Rb(),Uo=class extends pC{get selectors(){return wW.comma(this.selector)}set selectors(t){let n=this.selector?this.selector.match(/,\s*/):null,r=n?n[0]:","+this.raw("between","beforeOpen");this.selector=t.join(r)}constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}};mC.exports=Uo;Uo.default=Uo;pC.registerRule(Uo)});var _C=x((hke,yC)=>{"use strict";p();var xW=hh(),EW=Mo(),AW=Ku(),OW=el(),PW=Cb(),NW=$o(),CW=wh();function gC(e,t){return e.inputs?e.inputs.map(n=>{let r={...n,__proto__:OW.prototype};return r.map&&(r.map={...r.map,__proto__:PW.prototype}),r}):t}function LW(e,t,n){let r={...e};if(delete r.inputs,delete r.nodes,r.source){let{inputId:s,...a}=r.source;r.source=a,s!=null&&(r.source.input=t[s])}let i;if(r.type==="root")i=new NW(r);else if(r.type==="decl")i=new AW(r);else if(r.type==="rule")i=new CW(r);else if(r.type==="comment")i=new EW(r);else if(r.type==="atrule")i=new xW(r);else throw new Error("Unknown node type: "+e.type);if(n){i.nodes=n;for(let s of n)s.parent=i}return i}function xh(e,t){if(Array.isArray(e))return e.map(i=>xh(i));let n,r=[{childIndex:0,children:[],inputs:gC(e,t),json:e}];for(;r.length>0;){let i=r[r.length-1],s=i.json.nodes;if(s&&i.childIndex<s.length){let o=s[i.childIndex];i.childIndex+=1,r.push({childIndex:0,children:[],inputs:gC(o,i.inputs),json:o});continue}r.pop();let a=LW(i.json,i.inputs,s?i.children:void 0);r.length>0?r[r.length-1].children.push(a):n=a}return n}yC.exports=xh;xh.default=xh});var jb=x((mke,wC)=>{"use strict";p();var{dirname:Eh,relative:bC,resolve:kC,sep:SC}=ce("path"),{SourceMapConsumer:TC,SourceMapGenerator:Ah}=kh(),{pathToFileURL:vC}=ce("url"),qW=el(),IW=!!(TC&&Ah),MW=!!(Eh&&kC&&bC&&SC),Db=class{constructor(t,n,r,i){this.stringify=t,this.mapOpts=r.map||{},this.root=n,this.opts=r,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let t;this.isInline()?t="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?t=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?t=this.mapOpts.annotation(this.opts.to,this.root):t=this.outputFile()+".map";let n=`
|
|
56
|
+
`;this.css.includes(`\r
|
|
57
|
+
`)&&(n=`\r
|
|
58
|
+
`),this.css+=n+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(let t of this.previous()){let n=this.toUrl(this.path(t.file)),r=t.root||Eh(t.file),i;this.mapOpts.sourcesContent===!1?(i=new TC(t.text),i.sourcesContent&&(i.sourcesContent=null)):i=t.consumer(),this.map.applySourceMap(i,n,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1){if(this.root){let t;for(let n=this.root.nodes.length-1;n>=0;n--)t=this.root.nodes[n],t.type==="comment"&&t.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(n)}else if(this.css){let t;for(;(t=this.css.lastIndexOf("/*#"))!==-1;){let n=this.css.indexOf("*/",t+3);if(n===-1)break;for(;t>0&&this.css[t-1]===`
|
|
59
|
+
`;)t--;this.css=this.css.slice(0,t)+this.css.slice(n+2)}}}}generate(){if(this.clearAnnotation(),MW&&IW&&this.isMap())return this.generateMap();{let t="";return this.stringify(this.root,n=>{t+=n}),[t]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=Ah.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new Ah({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 Ah({file:this.outputFile(),ignoreInvalidMapping:!0});let t=1,n=1,r="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},s,a;this.stringify(this.root,(o,c,l)=>{if(this.css+=o,c&&l!=="end"&&(i.generated.line=t,i.generated.column=n-1,c.source&&c.source.start?(i.source=this.sourcePath(c),i.original.line=c.source.start.line,i.original.column=c.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),a=o.match(/\n/g),a?(t+=a.length,s=o.lastIndexOf(`
|
|
60
|
+
`),n=o.length-s):n+=o.length,c&&l!=="start"){let f=c.parent||{raws:{}};(!(c.type==="decl"||c.type==="atrule"&&!c.nodes)||c!==f.last||f.raws.semicolon)&&(c.source&&c.source.end?(i.source=this.sourcePath(c),i.original.line=c.source.end.line,i.original.column=c.source.end.column-1,i.generated.line=t,i.generated.column=n-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=t,i.generated.column=n-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(t=>t.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let t=this.mapOpts.annotation;return typeof t<"u"&&t!==!0?!1:this.previous().length?this.previous().some(n=>n.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(t=>t.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(t){if(this.mapOpts.absolute||t.charCodeAt(0)===60||/^\w+:\/\//.test(t))return t;let n=this.memoizedPaths.get(t);if(n)return n;let r=this.opts.to?Eh(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Eh(kC(r,this.mapOpts.annotation)));let i=bC(r,t);return this.memoizedPaths.set(t,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(t=>{if(t.source&&t.source.input.map){let n=t.source.input.map;this.previousMaps.includes(n)||this.previousMaps.push(n)}});else{let t=new qW(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){let t={};if(this.root)this.root.walk(n=>{if(n.source){let r=n.source.input.from;if(r&&!t[r]){t[r]=!0;let i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,n.source.input.css)}}});else if(this.css){let n=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(n,this.css)}}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){let n=this.memoizedFileURLs.get(t);if(n)return n;if(vC){let r=vC(t).toString();return this.memoizedFileURLs.set(t,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){let n=this.memoizedURLs.get(t);if(n)return n;SC==="\\"&&(t=t.replace(/\\/g,"/"));let r=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,r),r}};wC.exports=Db});var Vb=x((yke,AC)=>{"use strict";p();var RW=hh(),DW=Mo(),jW=Ku(),BW=$o(),xC=wh(),FW=fh(),EC={empty:!0,space:!0};function VW(e){for(let t=e.length-1;t>=0;t--){let n=e[t],r=n[3]||n[2];if(r)return r}}function Bb(e,t,n){let r="";for(let i=t;i<n;i++)r+=e[i][1];return r}var Fb=class{constructor(t){this.input=t,this.root=new BW,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(t){let n=new RW;n.name=t[1].slice(1),n.name===""&&this.unnamedAtrule(n,t),this.init(n,t[2]);let r,i,s,a=!1,o=!1,c=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=this.tokenizer.nextToken(),r=t[0],r==="("||r==="["?l.push(r==="("?")":"]"):r==="{"&&l.length>0?l.push("}"):r===l[l.length-1]&&l.pop(),l.length===0)if(r===";"){n.source.end=this.getPosition(t[2]),n.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){o=!0;break}else if(r==="}"){if(c.length>0){for(s=c.length-1,i=c[s];i&&i[0]==="space";)i=c[--s];i&&(n.source.end=this.getPosition(i[3]||i[2]),n.source.end.offset++)}this.end(t);break}else c.push(t);else c.push(t);if(this.tokenizer.endOfFile()){a=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(c),c.length?(n.raws.afterName=this.spacesAndCommentsFromStart(c),this.raw(n,"params",c),a&&(t=c[c.length-1],n.source.end=this.getPosition(t[3]||t[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),o&&(n.nodes=[],this.current=n)}checkMissedSemicolon(t){let n=this.colon(t);if(n===!1)return;let r=0,i;for(let s=n-1;s>=0&&(i=t[s],!(i[0]!=="space"&&(r+=1,r===2)));s--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(t){let n=0,r,i,s;for(let[a,o]of t.entries()){if(i=o,s=i[0],s==="("&&(n+=1),s===")"&&(n-=1),n===0&&s===":")if(!r)this.doubleColon(i);else{if(r[0]==="word"&&r[1]==="progid")continue;return a}r=i}return!1}comment(t){let n=new DW;this.init(n,t[2]),n.source.end=this.getPosition(t[3]||t[2]),n.source.end.offset++;let r=t[1].slice(2,-2);if(!r.trim())n.text="",n.raws.left=r,n.raws.right="";else{let i=r.match(/^(\s*)([^]*\S)(\s*)$/);n.text=i[2],n.raws.left=i[1],n.raws.right=i[3]}}createTokenizer(){this.tokenizer=FW(this.input)}decl(t,n){let r=new jW;this.init(r,t[0][2]);let i=t[t.length-1];i[0]===";"&&(this.semicolon=!0,t.pop()),r.source.end=this.getPosition(i[3]||i[2]||VW(t)),r.source.end.offset++;let s=0;for(;t[s][0]!=="word";)s===t.length-1&&this.unknownWord([t[s]]),s++;r.raws.before+=Bb(t,0,s),r.source.start=this.getPosition(t[s][2]);let a=s;for(;s<t.length;){let d=t[s][0];if(d===":"||d==="space"||d==="comment")break;s++}r.prop=Bb(t,a,s);let o=s,c;for(;s<t.length&&(c=t[s],s++,c[0]!==":");)c[0]==="word"&&/\w/.test(c[1])&&this.unknownWord([c]);r.raws.between=Bb(t,o,s),(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let l=s;for(;s<t.length;){let d=t[s][0];if(d!=="space"&&d!=="comment")break;s++}let f=t.slice(l,s);t=t.slice(s),this.precheckMissedSemicolon(t);for(let d=t.length-1;d>=0;d--){if(c=t[d],c[1].toLowerCase()==="!important"){r.important=!0;let g=this.stringFrom(t,d);g=this.spacesFromEnd(t)+g,g!==" !important"&&(r.raws.important=g);break}else if(c[1].toLowerCase()==="important"){let g=t.slice(0),v="";for(let b=d;b>0;b--){let _=g[b][0];if(v.trim().startsWith("!")&&_!=="space")break;v=g.pop()[1]+v}v.trim().startsWith("!")&&(r.important=!0,r.raws.important=v,t=g)}if(c[0]!=="space"&&c[0]!=="comment")break}t.some(d=>d[0]!=="space"&&d[0]!=="comment")&&(r.raws.between+=f.map(d=>d[1]).join(""),f=[]),this.raw(r,"value",f.concat(t),n),r.value.includes(":")&&!n&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){let n=new xC;this.init(n,t[2]),n.selector="",n.raws.between="",this.current=n}end(t){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(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}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(t){if(this.spaces+=t[1],this.current.nodes){let n=this.current.nodes[this.current.nodes.length-1];n&&n.type==="rule"&&!n.raws.ownSemicolon&&(n.raws.ownSemicolon=this.spaces,this.spaces="",n.source.end=this.getPosition(t[2]),n.source.end.offset+=n.raws.ownSemicolon.length)}}getPosition(t){let n=this.input.fromOffset(t);return{column:n.col,line:n.line,offset:t}}init(t,n){this.current.push(t),t.source={input:this.input,start:this.getPosition(n)},t.raws.before=this.spaces,this.spaces="",t.type!=="comment"&&(this.semicolon=!1)}other(t){let n=!1,r=null,i=!1,s=null,a=[],o=t[1].startsWith("--"),c=[],l=t;for(;l;){if(r=l[0],c.push(l),r==="("||r==="[")s||(s=l),a.push(r==="("?")":"]");else if(o&&i&&r==="{")s||(s=l),a.push("}");else if(a.length===0)if(r===";")if(i){this.decl(c,o);return}else break;else if(r==="{"){this.rule(c);return}else if(r==="}"){this.tokenizer.back(c.pop()),n=!0;break}else r===":"&&(i=!0);else r===a[a.length-1]&&(a.pop(),a.length===0&&(s=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(n=!0),a.length>0&&this.unclosedBracket(s),n&&i){if(!o)for(;c.length&&(l=c[c.length-1][0],!(l!=="space"&&l!=="comment"));)this.tokenizer.back(c.pop());this.decl(c,o)}else this.unknownWord(c)}parse(){let t;for(;!this.tokenizer.endOfFile();)switch(t=this.tokenizer.nextToken(),t[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t);break}this.endFile()}precheckMissedSemicolon(){}raw(t,n,r,i){let s,a,o=r.length,c="",l=!0,f,h;for(let d=0;d<o;d+=1)s=r[d],a=s[0],a==="space"&&d===o-1&&!i?l=!1:a==="comment"?(h=r[d-1]?r[d-1][0]:"empty",f=r[d+1]?r[d+1][0]:"empty",!EC[h]&&!EC[f]?c.slice(-1)===","?l=!1:c+=s[1]:l=!1):c+=s[1];if(!l){let d=r.reduce((g,v)=>g+v[1],"");t.raws[n]={raw:d,value:c}}t[n]=c}rule(t){t.pop();let n=new xC;this.init(n,t[0][2]),n.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(n,"selector",t),this.current=n}spacesAndCommentsFromEnd(t){let n,r="";for(;t.length&&(n=t[t.length-1][0],!(n!=="space"&&n!=="comment"));)r=t.pop()[1]+r;return r}spacesAndCommentsFromStart(t){let n,r="";for(;t.length&&(n=t[0][0],!(n!=="space"&&n!=="comment"));)r+=t.shift()[1];return r}spacesFromEnd(t){let n,r="";for(;t.length&&(n=t[t.length-1][0],n==="space");)r=t.pop()[1]+r;return r}stringFrom(t,n){let r="";for(let i=n;i<t.length;i++)r+=t[i][1];return t.splice(n,t.length-n),r}unclosedBlock(){let t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word "+t[0][1],{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,n){throw this.input.error("At-rule without name",{offset:n[2]},{offset:n[2]+n[1].length})}};AC.exports=Fb});var Ph=x((vke,OC)=>{"use strict";p();var $W=si(),UW=el(),HW=Vb();function Oh(e,t){let n=new UW(e,t),r=new HW(n);try{r.parse()}catch(i){throw process.env.NODE_ENV!=="production"&&i.name==="CssSyntaxError"&&t&&t.from&&(/\.scss$/i.test(t.from)?i.message+=`
|
|
61
|
+
You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`:/\.sass/i.test(t.from)?i.message+=`
|
|
62
|
+
You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`:/\.less$/i.test(t.from)&&(i.message+=`
|
|
63
|
+
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),i}return r.root}OC.exports=Oh;Oh.default=Oh;$W.registerParse(Oh)});var $b=x((kke,PC)=>{"use strict";p();var zW=si(),{my:WW}=Uu(),nl=class{constructor(t,n={}){if(this.type="warning",this.text=t,n.node&&n.node.source){n.node[WW]||zW.rebuild(n.node);let r=n.node.rangeBy(n);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in n)this[r]=n[r]}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}};PC.exports=nl;nl.default=nl});var Nh=x((Tke,NC)=>{"use strict";p();var GW=$b(),rl=class{get content(){return this.css}constructor(t,n,r){this.processor=t,this.messages=[],this.root=n,this.opts=r,this.css="",this.map=void 0}toString(){return this.css}warn(t,n={}){n.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(n.plugin=this.lastPlugin.postcssPlugin);let r=new GW(t,n);return this.messages.push(r),r}warnings(){return this.messages.filter(t=>t.type==="warning")}};NC.exports=rl;rl.default=rl});var Ub=x((xke,LC)=>{"use strict";p();var CC={};LC.exports=function(t){CC[t]||(CC[t]=!0,typeof console<"u"&&console.warn&&console.warn(t))}});var Wb=x((Ake,RC)=>{"use strict";p();var JW=si(),KW=ph(),YW=jb(),QW=Ph(),qC=Nh(),XW=$o(),ZW=$u(),{isClean:lr,my:eG}=Uu(),tG=Ub(),nG={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},rG={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},iG={Once:!0,postcssPlugin:!0,prepare:!0},Ho=0;function il(e){return typeof e=="object"&&typeof e.then=="function"}function Hb(e){let t=!1,n=nG[e.type];return e.type==="decl"?t=e.prop.toLowerCase():e.type==="atrule"&&(t=e.name.toLowerCase()),t&&e.append?[n,n+"-"+t,Ho,n+"Exit",n+"Exit-"+t]:t?[n,n+"-"+t,n+"Exit",n+"Exit-"+t]:e.append?[n,Ho,n+"Exit"]:[n,n+"Exit"]}function IC(e){let t;return e.type==="document"?t=["Document",Ho,"DocumentExit"]:e.type==="root"?t=["Root",Ho,"RootExit"]:t=Hb(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function MC(e){let t=[e];for(;t.length>0;){let n=t.pop();if(n[lr]=!1,n.nodes)for(let r of n.nodes)t.push(r)}return e}var zb={},Ji=class e{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(t,n,r){this.stringified=!1,this.processed=!1;let i;if(typeof n=="object"&&n!==null&&(n.type==="root"||n.type==="document"))i=MC(n);else if(n instanceof e||n instanceof qC)i=MC(n.root),n.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{let s=QW;r.syntax&&(s=r.syntax.parse),r.parser&&(s=r.parser),s.parse&&(s=s.parse);try{i=s(n,r)}catch(a){this.processed=!0,this.error=a}i&&!i[eG]&&JW.rebuild(i)}this.result=new qC(t,i,r),this.helpers={...zb,postcss:zb,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(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,n){let r=this.result.lastPlugin;try{if(n&&n.addToError(t),this.error=t,t.name==="CssSyntaxError"&&!t.plugin)t.plugin=r.postcssPlugin,t.setMessage();else if(r.postcssVersion&&process.env.NODE_ENV!=="production"){let i=r.postcssPlugin,s=r.postcssVersion,a=this.result.processor.version,o=s.split("."),c=a.split(".");(o[0]!==c[0]||parseInt(o[1])>parseInt(c[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+a+", but "+i+" uses "+s+". Perhaps this is the source of the error below.")}}catch(i){console&&console.error&&console.error(i)}return t}prepareVisitors(){this.listeners={};let t=(n,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([n,i])};for(let n of this.plugins)if(typeof n=="object")for(let r in n){if(!rG[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${n.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!iG[r])if(typeof n[r]=="object")for(let i in n[r])i==="*"?t(n,r,n[r][i]):t(n,r+"-"+i.toLowerCase(),n[r][i]);else typeof n[r]=="function"&&t(n,r,n[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let t=0;t<this.plugins.length;t++){let n=this.plugins[t],r=this.runOnRoot(n);if(il(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[lr];){t[lr]=!0;let n=[IC(t)];for(;n.length>0;){let r=this.visitTick(n);if(il(r))try{await r}catch(i){let s=n[n.length-1].node;throw this.handleError(i,s)}}}if(this.listeners.OnceExit)for(let[n,r]of this.listeners.OnceExit){this.result.lastPlugin=n;try{if(t.type==="document"){let i=t.nodes.map(s=>r(s,this.helpers));await Promise.all(i)}else await r(t,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(t){this.result.lastPlugin=t;try{if(typeof t=="object"&&t.Once){if(this.result.root.type==="document"){let n=this.result.root.nodes.map(r=>t.Once(r,this.helpers));return il(n[0])?Promise.all(n):n}return t.Once(this.result.root,this.helpers)}else if(typeof t=="function")return t(this.result.root,this.result)}catch(n){throw this.handleError(n)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let t=this.result.opts,n=ZW;t.syntax&&(n=t.syntax.stringify),t.stringifier&&(n=t.stringifier),n.stringify&&(n=n.stringify);let r=this.result.root.source;if(t.map===void 0&&!(r&&r.input&&r.input.map)){let a="";return n(this.result.root,o=>{a+=o}),this.result.css=a,this.result}let s=new YW(n,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[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 t of this.plugins){let n=this.runOnRoot(t);if(il(n))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[lr];)t[lr]=!0,this.walkSync(t);if(this.listeners.OnceExit)if(t.type==="document")for(let n of t.nodes)this.visitSync(this.listeners.OnceExit,n);else this.visitSync(this.listeners.OnceExit,t)}return this.result}then(t,n){return process.env.NODE_ENV!=="production"&&("from"in this.opts||tG("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(t,n)}toString(){return this.css}visitSync(t,n){for(let[r,i]of t){this.result.lastPlugin=r;let s;try{s=i(n,this.helpers)}catch(a){throw this.handleError(a,n.proxyOf)}if(n.type!=="root"&&n.type!=="document"&&!n.parent)return!0;if(il(s))throw this.getAsyncError()}}visitTick(t){let n=t[t.length-1],{node:r,visitors:i}=n;if(r.type!=="root"&&r.type!=="document"&&!r.parent){t.pop();return}if(i.length>0&&n.visitorIndex<i.length){let[a,o]=i[n.visitorIndex];n.visitorIndex+=1,n.visitorIndex===i.length&&(n.visitors=[],n.visitorIndex=0),this.result.lastPlugin=a;try{return o(r.toProxy(),this.helpers)}catch(c){throw this.handleError(c,r)}}if(n.iterator!==0){let a=n.iterator;n.descending&&(n.descending=!1,r.indexes[a]+=1);let o;for(;o=r.nodes[r.indexes[a]];){if(!o[lr]){o[lr]=!0,n.descending=!0,t.push(IC(o));return}r.indexes[a]+=1}n.iterator=0,delete r.indexes[a]}let s=n.events;for(;n.eventIndex<s.length;){let a=s[n.eventIndex];if(n.eventIndex+=1,a===Ho){r.nodes&&r.nodes.length&&(r[lr]=!0,n.iterator=r.getIterator());return}else if(this.listeners[a]){n.visitors=this.listeners[a];return}}t.pop()}walkSync(t){t[lr]=!0;let n=[{eventIndex:0,events:Hb(t),iterator:0,node:t}];for(;n.length>0;){let r=n[n.length-1],i=r.node;if(r.iterator!==0){let s=r.iterator;r.descending&&(r.descending=!1,i.indexes[s]+=1);let a,o=!1;for(;a=i.nodes[i.indexes[s]];){if(!a[lr]){a[lr]=!0,r.descending=!0,n.push({eventIndex:0,events:Hb(a),iterator:0,node:a}),o=!0;break}i.indexes[s]+=1}if(o)continue;r.iterator=0,delete i.indexes[s]}if(r.eventIndex<r.events.length){let s=r.events[r.eventIndex];if(r.eventIndex+=1,s===Ho)i.nodes&&i.nodes.length&&(r.iterator=i.getIterator());else{let a=this.listeners[s];a&&this.visitSync(a,i.toProxy())&&n.pop()}continue}n.pop()}}warnings(){return this.sync().warnings()}};Ji.registerPostcss=e=>{zb=e};RC.exports=Ji;Ji.default=Ji;XW.registerLazyResult(Ji);KW.registerLazyResult(Ji)});var jC=x((Pke,DC)=>{"use strict";p();var sG=jb(),aG=Ph(),oG=Nh(),cG=$u(),uG=Ub(),sl=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 t,n=aG;try{t=n(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(t,n,r){n=n.toString(),this.stringified=!1,this._processor=t,this._css=n,this._opts=r,this._map=void 0;let i=cG;this.result=new oG(this._processor,void 0,this._opts),this.result.css=n;let s=this;Object.defineProperty(this.result,"root",{get(){return s.root}});let a=new sG(i,void 0,this._opts,n);if(a.isMap()){let[o,c]=a.generate();o&&(this.result.css=o),c&&(this.result.map=c)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,n){return process.env.NODE_ENV!=="production"&&("from"in this._opts||uG("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(t,n)}toString(){return this._css}warnings(){return[]}};DC.exports=sl;sl.default=sl});var FC=x((Cke,BC)=>{"use strict";p();var lG=ph(),fG=Wb(),dG=jC(),hG=$o(),sa=class{constructor(t=[]){this.version="8.5.26",this.plugins=this.normalize(t)}normalize(t){let n=[];for(let r of t)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))n=n.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)n.push(r);else if(typeof r=="function")n.push(r);else if(typeof r=="object"&&(r.parse||r.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(r+" is not a PostCSS plugin");return n}process(t,n={}){return!this.plugins.length&&!n.parser&&!n.stringifier&&!n.syntax?new dG(this,t,n):new fG(this,t,n)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}};BC.exports=sa;sa.default=sa;hG.registerProcessor(sa);lG.registerProcessor(sa)});var JC=x((qke,GC)=>{"use strict";p();var VC=hh(),$C=Mo(),pG=si(),mG=dh(),UC=Ku(),HC=ph(),gG=_C(),yG=el(),_G=Wb(),vG=Rb(),bG=Wu(),kG=Ph(),Gb=FC(),SG=Nh(),zC=$o(),WC=wh(),TG=$u(),wG=$b();function je(...e){return e.length===1&&Array.isArray(e[0])&&(e=e[0]),new Gb(e)}je.plugin=function(t,n){let r=!1;function i(...a){console&&console.warn&&!r&&(r=!0,console.warn(t+`: postcss.plugin was deprecated. Migration guide:
|
|
64
|
+
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(t+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
|
|
65
|
+
https://www.w3ctech.com/topic/2226`));let o=n(...a);return o.postcssPlugin=t,o.postcssVersion=new Gb().version,o}let s;return Object.defineProperty(i,"postcss",{get(){return s||(s=i()),s}}),i.process=function(a,o,c){return je([i(c)]).process(a,o)},i};je.stringify=TG;je.parse=kG;je.fromJSON=gG;je.list=vG;je.comment=e=>new $C(e);je.atRule=e=>new VC(e);je.decl=e=>new UC(e);je.rule=e=>new WC(e);je.root=e=>new zC(e);je.document=e=>new HC(e);je.CssSyntaxError=mG;je.Declaration=UC;je.Container=pG;je.Processor=Gb;je.Document=HC;je.Comment=$C;je.Warning=wG;je.AtRule=VC;je.Result=SG;je.Input=yG;je.Rule=WC;je.Root=zC;je.Node=bG;_G.registerPostcss(je);GC.exports=je;je.default=je});var YC=x((Mke,KC)=>{p();var xG=Mo(),EG=Vb(),AG=fh(),Jb=class extends EG{checkMissedSemicolon(){}comment(t){let n=new xG;this.init(n,t[2]);let r=this.input.fromOffset(t[3])||this.input.fromOffset(this.input.css.length-1);n.source.end={column:r.col,line:r.line,offset:t[3]+1};let i=t[1].slice(2);if(i.slice(-2)==="*/"&&(i=i.slice(0,-2)),/^\s*$/.test(i))n.text="",n.raws.left=i,n.raws.right="";else{let s=i.match(/^(\s*)([^]*\S)(\s*)$/);n.text=s[2],n.raws.left=s[1],n.raws.right=s[3]}}createTokenizer(){this.tokenizer=AG(this.input,{ignoreErrors:!0})}decl(t){t.length>1&&t.some(n=>n[0]==="word")&&super.decl(t)}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(t){let n=this.colon(t);if(n===!1)return;let r,i;for(r=n-1;r>=0&&t[r][0]!=="word";r--);if(r===0||r<0)return;for(i=r-1;i>=0;i--)if(t[i][0]!=="space"){i+=1;break}let s=t.slice(r),a=t.slice(i,r);t.splice(i,t.length-i),this.spaces=a.map(o=>o[1]).join(""),this.decl(s)}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(t){this.spaces+=t.map(n=>n[1]).join("")}unnamedAtrule(t){t.name=""}};KC.exports=Jb});var XC=x((Dke,QC)=>{p();var{Input:OG}=JC(),PG=YC();QC.exports=function(t,n){let r=new OG(t,n),i=new PG(r);return i.parse(),i.root}});var Yb=x(Kb=>{"use strict";p();Object.defineProperty(Kb,"__esModule",{value:!0});Kb.default=LG;function NG(e){for(var t=e.toLowerCase(),n="",r=!1,i=0;i<6&&t[i]!==void 0;i++){var s=t.charCodeAt(i),a=s>=97&&s<=102||s>=48&&s<=57;if(r=s===32,!a)break;n+=t[i]}if(n.length!==0){var o=parseInt(n,16),c=o>=55296&&o<=57343;return c||o===0||o>1114111?["\uFFFD",n.length+(r?1:0)]:[String.fromCodePoint(o),n.length+(r?1:0)]}}var CG=/\\/;function LG(e){var t=CG.test(e);if(!t)return e;for(var n="",r=0;r<e.length;r++){if(e[r]==="\\"){var i=NG(e.slice(r+1,r+7));if(i!==void 0){n+=i[0],r+=i[1];continue}if(e[r+1]==="\\"){n+="\\",r++;continue}e.length===r+1&&(n+=e[r]);continue}n+=e[r]}return n}});var ZC=x(Qb=>{"use strict";p();Object.defineProperty(Qb,"__esModule",{value:!0});Qb.default=qG;function qG(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(;t.length>0;){var r=t.shift();if(!e[r])return;e=e[r]}return e}});var eL=x(Xb=>{"use strict";p();Object.defineProperty(Xb,"__esModule",{value:!0});Xb.default=IG;function IG(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(;t.length>0;){var r=t.shift();e[r]||(e[r]={}),e=e[r]}}});var tL=x(Zb=>{"use strict";p();Object.defineProperty(Zb,"__esModule",{value:!0});Zb.default=MG;function MG(e){for(var t="",n=e.indexOf("/*"),r=0;n>=0;){t=t+e.slice(r,n);var i=e.indexOf("*/",n+2);if(i<0)return t;r=i+2,n=e.indexOf("/*",r)}return t=t+e.slice(r),t}});var nL=x(zo=>{"use strict";p();Object.defineProperty(zo,"__esModule",{value:!0});zo.MAX_NESTING_DEPTH=void 0;zo.default=RG;zo.MAX_NESTING_DEPTH=256;function RG(e){return Number.isSafeInteger(e)&&e>=0?e:zo.MAX_NESTING_DEPTH}});var Wo=x(Wt=>{"use strict";p();var al=Wt&&Wt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Wt,"__esModule",{value:!0});Wt.MAX_NESTING_DEPTH=Wt.resolveMaxNestingDepth=Wt.stripComments=Wt.ensureObject=Wt.getProp=Wt.unesc=void 0;var DG=Yb();Object.defineProperty(Wt,"unesc",{enumerable:!0,get:function(){return al(DG).default}});var jG=ZC();Object.defineProperty(Wt,"getProp",{enumerable:!0,get:function(){return al(jG).default}});var BG=eL();Object.defineProperty(Wt,"ensureObject",{enumerable:!0,get:function(){return al(BG).default}});var FG=tL();Object.defineProperty(Wt,"stripComments",{enumerable:!0,get:function(){return al(FG).default}});var rL=nL();Object.defineProperty(Wt,"resolveMaxNestingDepth",{enumerable:!0,get:function(){return al(rL).default}});Object.defineProperty(Wt,"MAX_NESTING_DEPTH",{enumerable:!0,get:function(){return rL.MAX_NESTING_DEPTH}})});var ci=x(t0=>{"use strict";p();Object.defineProperty(t0,"__esModule",{value:!0});var Ch=Wo(),e0=function(e,t,n){if(n===void 0&&(n=0),n>Ch.MAX_NESTING_DEPTH)throw new Error("Cannot clone selector: nesting depth exceeds the maximum of ".concat(Ch.MAX_NESTING_DEPTH,"."));if(typeof e!="object"||e===null)return e;var r=new e.constructor;for(var i in e)if(e.hasOwnProperty(i)){var s=e[i],a=typeof s;i==="parent"&&a==="object"?t&&(r[i]=t):s instanceof Array?r[i]=s.map(function(o){return e0(o,r,n+1)}):r[i]=e0(s,r,n+1)}return r},VG=(function(){function e(t){t===void 0&&(t={}),Object.assign(this,t),this.spaces=this.spaces||{},this.spaces.before=this.spaces.before||"",this.spaces.after=this.spaces.after||""}return e.prototype.remove=function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this},e.prototype.replaceWith=function(){if(this.parent){for(var t in arguments)this.parent.insertBefore(this,arguments[t]);this.remove()}return this},e.prototype.next=function(){return this.parent.at(this.parent.index(this)+1)},e.prototype.prev=function(){return this.parent.at(this.parent.index(this)-1)},e.prototype.clone=function(t){t===void 0&&(t={});var n=e0(this);for(var r in t)n[r]=t[r];return n},e.prototype.appendToPropertyAndEscape=function(t,n,r){this.raws||(this.raws={});var i=this[t],s=this.raws[t];this[t]=i+n,s||r!==n?this.raws[t]=(s||i)+r:delete this.raws[t]},e.prototype.setPropertyAndEscape=function(t,n,r){this.raws||(this.raws={}),this[t]=n,this.raws[t]=r},e.prototype.setPropertyWithoutEscape=function(t,n){this[t]=n,this.raws&&delete this.raws[t]},e.prototype.isAtPosition=function(t,n){if(this.source&&this.source.start&&this.source.end)return!(this.source.start.line>t||this.source.end.line<t||this.source.start.line===t&&this.source.start.column>n||this.source.end.line===t&&this.source.end.column<n)},e.prototype.stringifyProperty=function(t){return this.raws&&this.raws[t]||this[t]},Object.defineProperty(e.prototype,"rawSpaceBefore",{get:function(){var t=this.raws&&this.raws.spaces&&this.raws.spaces.before;return t===void 0&&(t=this.spaces&&this.spaces.before),t||""},set:function(t){(0,Ch.ensureObject)(this,"raws","spaces"),this.raws.spaces.before=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rawSpaceAfter",{get:function(){var t=this.raws&&this.raws.spaces&&this.raws.spaces.after;return t===void 0&&(t=this.spaces.after),t||""},set:function(t){(0,Ch.ensureObject)(this,"raws","spaces"),this.raws.spaces.after=t},enumerable:!1,configurable:!0}),e.prototype.valueToString=function(){return String(this.stringifyProperty("value"))},e.prototype.toString=function(){return[this.rawSpaceBefore,this.valueToString(),this.rawSpaceAfter].join("")},e.prototype._stringify=function(){return this.toString()},e})();t0.default=VG});var Ct=x(Ge=>{"use strict";p();Object.defineProperty(Ge,"__esModule",{value:!0});Ge.UNIVERSAL=Ge.ATTRIBUTE=Ge.CLASS=Ge.COMBINATOR=Ge.COMMENT=Ge.ID=Ge.NESTING=Ge.PSEUDO=Ge.ROOT=Ge.SELECTOR=Ge.STRING=Ge.TAG=void 0;Ge.TAG="tag";Ge.STRING="string";Ge.SELECTOR="selector";Ge.ROOT="root";Ge.PSEUDO="pseudo";Ge.NESTING="nesting";Ge.ID="id";Ge.COMMENT="comment";Ge.COMBINATOR="combinator";Ge.CLASS="class";Ge.ATTRIBUTE="attribute";Ge.UNIVERSAL="universal"});var Lh=x(_t=>{"use strict";p();var $G=_t&&_t.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),UG=_t&&_t.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),HG=_t&&_t.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),zG=_t&&_t.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&UG(n,t,r[i]);return HG(n,t),n}})(),WG=_t&&_t.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},iL=_t&&_t.__read||function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,s=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return s},sL=_t&&_t.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))},GG=_t&&_t.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(_t,"__esModule",{value:!0});var n0=Wo(),JG=GG(ci()),ui=zG(Ct()),KG=(function(e){$G(t,e);function t(n){var r=e.call(this,n)||this;return r.nodes||(r.nodes=[]),r}return t.prototype.append=function(n){return n.parent=this,this.nodes.push(n),this},t.prototype.prepend=function(n){n.parent=this,this.nodes.unshift(n);for(var r in this.indexes)this.indexes[r]++;return this},t.prototype.at=function(n){return this.nodes[n]},t.prototype.index=function(n){return typeof n=="number"?n:this.nodes.indexOf(n)},Object.defineProperty(t.prototype,"first",{get:function(){return this.at(0)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"last",{get:function(){return this.at(this.length-1)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"length",{get:function(){return this.nodes.length},enumerable:!1,configurable:!0}),t.prototype.removeChild=function(n){n=this.index(n),this.at(n).parent=void 0,this.nodes.splice(n,1);var r;for(var i in this.indexes)r=this.indexes[i],r>=n&&(this.indexes[i]=r-1);return this},t.prototype.removeAll=function(){var n,r;try{for(var i=WG(this.nodes),s=i.next();!s.done;s=i.next()){var a=s.value;a.parent=void 0}}catch(o){n={error:o}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return this.nodes=[],this},t.prototype.empty=function(){return this.removeAll()},t.prototype.insertAfter=function(n,r){var i;r.parent=this;for(var s=this.index(n),a=[],o=2;o<arguments.length;o++)a.push(arguments[o]);(i=this.nodes).splice.apply(i,sL([s+1,0,r],iL(a),!1)),r.parent=this;var c;for(var l in this.indexes)c=this.indexes[l],s<c&&(this.indexes[l]=c+arguments.length-1);return this},t.prototype.insertBefore=function(n,r){var i;r.parent=this;for(var s=this.index(n),a=[],o=2;o<arguments.length;o++)a.push(arguments[o]);(i=this.nodes).splice.apply(i,sL([s,0,r],iL(a),!1)),r.parent=this;var c;for(var l in this.indexes)c=this.indexes[l],c>=s&&(this.indexes[l]=c+arguments.length-1);return this},t.prototype._findChildAtPosition=function(n,r){var i=void 0;return this.each(function(s){if(s.atPosition){var a=s.atPosition(n,r);if(a)return i=a,!1}else if(s.isAtPosition(n,r))return i=s,!1}),i},t.prototype.atPosition=function(n,r){if(this.isAtPosition(n,r))return this._findChildAtPosition(n,r)||this},t.prototype._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))},t.prototype.each=function(n){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach++;var r=this.lastEach;if(this.indexes[r]=0,!!this.length){for(var i,s;this.indexes[r]<this.length&&(i=this.indexes[r],s=n(this.at(i),i),s!==!1);)this.indexes[r]+=1;if(delete this.indexes[r],s===!1)return!1}},t.prototype.walk=function(n,r){if(r===void 0&&(r=0),r>n0.MAX_NESTING_DEPTH)throw new Error("Cannot walk selector: nesting depth exceeds the maximum of ".concat(n0.MAX_NESTING_DEPTH,"."));return this.each(function(i,s){var a=n(i,s);if(a!==!1&&i.length&&(a=i.walk(n,r+1)),a===!1)return!1})},t.prototype.walkAttributes=function(n){var r=this;return this.walk(function(i){if(i.type===ui.ATTRIBUTE)return n.call(r,i)})},t.prototype.walkClasses=function(n){var r=this;return this.walk(function(i){if(i.type===ui.CLASS)return n.call(r,i)})},t.prototype.walkCombinators=function(n){var r=this;return this.walk(function(i){if(i.type===ui.COMBINATOR)return n.call(r,i)})},t.prototype.walkComments=function(n){var r=this;return this.walk(function(i){if(i.type===ui.COMMENT)return n.call(r,i)})},t.prototype.walkIds=function(n){var r=this;return this.walk(function(i){if(i.type===ui.ID)return n.call(r,i)})},t.prototype.walkNesting=function(n){var r=this;return this.walk(function(i){if(i.type===ui.NESTING)return n.call(r,i)})},t.prototype.walkPseudos=function(n){var r=this;return this.walk(function(i){if(i.type===ui.PSEUDO)return n.call(r,i)})},t.prototype.walkTags=function(n){var r=this;return this.walk(function(i){if(i.type===ui.TAG)return n.call(r,i)})},t.prototype.walkUniversals=function(n){var r=this;return this.walk(function(i){if(i.type===ui.UNIVERSAL)return n.call(r,i)})},t.prototype.split=function(n){var r=this,i=[];return this.reduce(function(s,a,o){var c=n.call(r,a);return i.push(a),c?(s.push(i),i=[]):o===r.length-1&&s.push(i),s},[])},t.prototype.map=function(n){return this.nodes.map(n)},t.prototype.reduce=function(n,r){return this.nodes.reduce(n,r)},t.prototype.every=function(n){return this.nodes.every(n)},t.prototype.some=function(n){return this.nodes.some(n)},t.prototype.filter=function(n){return this.nodes.filter(n)},t.prototype.sort=function(n){return this.nodes.sort(n)},t.prototype.toString=function(n){return n===void 0&&(n={}),this._stringify(n,0,(0,n0.resolveMaxNestingDepth)(n.maxNestingDepth))},t.prototype._stringify=function(n,r,i){var s=this;return this.map(function(a){return s._stringifyChild(a,n,r,i)}).join("")},t.prototype._stringifyChild=function(n,r,i,s){return typeof n._stringify=="function"?n._stringify(r,i,s):String(n)},t})(JG.default);_t.default=KG});var r0=x(aa=>{"use strict";p();var YG=aa&&aa.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),QG=aa&&aa.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(aa,"__esModule",{value:!0});var XG=QG(Lh()),ZG=Ct(),eJ=(function(e){YG(t,e);function t(n){var r=e.call(this,n)||this;return r.type=ZG.ROOT,r}return t.prototype._stringify=function(n,r,i){var s=this,a=this.reduce(function(o,c){return o.push(s._stringifyChild(c,n,r,i)),o},[]).join(",");return this.trailingComma?a+",":a},t.prototype.error=function(n,r){return this._error?this._error(n,r):new Error(n)},Object.defineProperty(t.prototype,"errorGenerator",{set:function(n){this._error=n},enumerable:!1,configurable:!0}),t})(XG.default);aa.default=eJ});var i0=x(oa=>{"use strict";p();var tJ=oa&&oa.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),nJ=oa&&oa.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(oa,"__esModule",{value:!0});var rJ=nJ(Lh()),iJ=Ct(),sJ=(function(e){tJ(t,e);function t(n){var r=e.call(this,n)||this;return r.type=iJ.SELECTOR,r}return t})(rJ.default);oa.default=sJ});var qh=x((oSe,aL)=>{"use strict";p();var aJ={},oJ=aJ.hasOwnProperty,cJ=function(t,n){if(!t)return n;var r={};for(var i in n)r[i]=oJ.call(t,i)?t[i]:n[i];return r},uJ=/[ -,\.\/:-@\[-\^`\{-~]/,lJ=/[ -,\.\/:-@\[\]\^`\{-~]/,fJ=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g,s0=function e(t,n){n=cJ(n,e.options),n.quotes!="single"&&n.quotes!="double"&&(n.quotes="single");for(var r=n.quotes=="double"?'"':"'",i=n.isIdentifier,s=t.charAt(0),a="",o=0,c=t.length;o<c;){var l=t.charAt(o++),f=l.charCodeAt(),h=void 0;if(f<32||f>126){if(f>=55296&&f<=56319&&o<c){var d=t.charCodeAt(o++);(d&64512)==56320?f=((f&1023)<<10)+(d&1023)+65536:o--}h="\\"+f.toString(16).toUpperCase()+" "}else n.escapeEverything?uJ.test(l)?h="\\"+l:h="\\"+f.toString(16).toUpperCase()+" ":/[\t\n\f\r\x0B]/.test(l)?h="\\"+f.toString(16).toUpperCase()+" ":l=="\\"||!i&&(l=='"'&&r==l||l=="'"&&r==l)||i&&lJ.test(l)?h="\\"+l:h=l;a+=h}return i&&(/^-[-\d]/.test(a)?a="\\-"+a.slice(1):/\d/.test(s)&&(a="\\3"+s+" "+a.slice(1))),a=a.replace(fJ,function(g,v,b){return v&&v.length%2?g:(v||"")+b}),!i&&n.wrap?r+a+r:a};s0.options={escapeEverything:!1,isIdentifier:!1,quotes:"single",wrap:!1};s0.version="3.0.0";aL.exports=s0});var a0=x(ca=>{"use strict";p();var dJ=ca&&ca.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),oL=ca&&ca.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ca,"__esModule",{value:!0});var hJ=oL(qh()),pJ=Wo(),mJ=oL(ci()),gJ=Ct(),yJ=(function(e){dJ(t,e);function t(n){var r=e.call(this,n)||this;return r.type=gJ.CLASS,r._constructed=!0,r}return Object.defineProperty(t.prototype,"value",{get:function(){return this._value},set:function(n){if(this._constructed){var r=(0,hJ.default)(n,{isIdentifier:!0});r!==n?((0,pJ.ensureObject)(this,"raws"),this.raws.value=r):this.raws&&delete this.raws.value}this._value=n},enumerable:!1,configurable:!0}),t.prototype.valueToString=function(){return"."+e.prototype.valueToString.call(this)},t})(mJ.default);ca.default=yJ});var o0=x(ua=>{"use strict";p();var _J=ua&&ua.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),vJ=ua&&ua.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ua,"__esModule",{value:!0});var bJ=vJ(ci()),kJ=Ct(),SJ=(function(e){_J(t,e);function t(n){var r=e.call(this,n)||this;return r.type=kJ.COMMENT,r}return t})(bJ.default);ua.default=SJ});var c0=x(la=>{"use strict";p();var TJ=la&&la.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),wJ=la&&la.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(la,"__esModule",{value:!0});var xJ=wJ(ci()),EJ=Ct(),AJ=(function(e){TJ(t,e);function t(n){var r=e.call(this,n)||this;return r.type=EJ.ID,r}return t.prototype.valueToString=function(){return"#"+e.prototype.valueToString.call(this)},t})(xJ.default);la.default=AJ});var Ih=x(fa=>{"use strict";p();var OJ=fa&&fa.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),cL=fa&&fa.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(fa,"__esModule",{value:!0});var PJ=cL(qh()),NJ=Wo(),CJ=cL(ci()),LJ=(function(e){OJ(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return Object.defineProperty(t.prototype,"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 r=(0,PJ.default)(n,{isIdentifier:!0});this._namespace=n,r!==n?((0,NJ.ensureObject)(this,"raws"),this.raws.namespace=r):this.raws&&delete this.raws.namespace},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ns",{get:function(){return this._namespace},set:function(n){this.namespace=n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"namespaceString",{get:function(){if(this.namespace){var n=this.stringifyProperty("namespace");return n===!0?"":n}else return""},enumerable:!1,configurable:!0}),t.prototype.qualifiedName=function(n){return this.namespace?"".concat(this.namespaceString,"|").concat(n):n},t.prototype.valueToString=function(){return this.qualifiedName(e.prototype.valueToString.call(this))},t})(CJ.default);fa.default=LJ});var u0=x(da=>{"use strict";p();var qJ=da&&da.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),IJ=da&&da.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(da,"__esModule",{value:!0});var MJ=IJ(Ih()),RJ=Ct(),DJ=(function(e){qJ(t,e);function t(n){var r=e.call(this,n)||this;return r.type=RJ.TAG,r}return t})(MJ.default);da.default=DJ});var l0=x(ha=>{"use strict";p();var jJ=ha&&ha.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+uL(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),BJ=ha&&ha.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ha,"__esModule",{value:!0});var FJ=BJ(ci()),VJ=Ct(),uL=(function(e){jJ(t,e);function t(n){var r=e.call(this,n)||this;return r.type=VJ.STRING,r}return t})(FJ.default);ha.default=uL});var f0=x(pa=>{"use strict";p();var $J=pa&&pa.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),UJ=pa&&pa.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(pa,"__esModule",{value:!0});var HJ=UJ(Lh()),zJ=Ct(),WJ=(function(e){$J(t,e);function t(n){var r=e.call(this,n)||this;return r.type=zJ.PSEUDO,r}return t.prototype._stringify=function(n,r,i){var s=this;if(r>=i)throw new Error("Cannot serialize selector: nesting depth exceeds the maximum of ".concat(i,"."));var a=this.length?"("+this.map(function(o){return s._stringifyChild(o,n,r+1,i)}).join(",")+")":"";return[this.rawSpaceBefore,this.stringifyProperty("value"),a,this.rawSpaceAfter].join("")},t})(HJ.default);pa.default=WJ});var fL=x((TSe,lL)=>{p();lL.exports=ce("util").deprecate});var g0=x(Ki=>{"use strict";p();var GJ=Ki&&Ki.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),p0=Ki&&Ki.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},d0;Object.defineProperty(Ki,"__esModule",{value:!0});Ki.unescapeValue=m0;var ol=p0(qh()),JJ=p0(Yb()),KJ=p0(Ih()),YJ=Ct(),cl=fL(),QJ=/^('|")([^]*)\1$/,XJ=cl(function(){},"Assigning an attribute a value containing characters that might need to be escaped is deprecated. Call attribute.setValue() instead."),ZJ=cl(function(){},"Assigning attr.quoted is deprecated and has no effect. Assign to attr.quoteMark instead."),eK=cl(function(){},"Constructing an Attribute selector with a value without specifying quoteMark is deprecated. Note: The value should be unescaped now.");function m0(e){var t=!1,n=null,r=e,i=r.match(QJ);return i&&(n=i[1],r=i[2]),r=(0,JJ.default)(r),r!==e&&(t=!0),{deprecatedUsage:t,unescaped:r,quoteMark:n}}function tK(e){if(e.quoteMark!==void 0||e.value===void 0)return e;eK();var t=m0(e.value),n=t.quoteMark,r=t.unescaped;return e.raws||(e.raws={}),e.raws.value===void 0&&(e.raws.value=e.value),e.value=r,e.quoteMark=n,e}var nK=(function(e){GJ(t,e);function t(n){n===void 0&&(n={});var r=e.call(this,tK(n))||this;return r.type=YJ.ATTRIBUTE,r.raws=r.raws||{},Object.defineProperty(r.raws,"unquoted",{get:cl(function(){return r.value},"attr.raws.unquoted is deprecated. Call attr.value instead."),set:cl(function(){return r.value},"Setting attr.raws.unquoted is deprecated and has no effect. attr.value is unescaped by default now.")}),r._constructed=!0,r}return t.prototype.getQuotedValue=function(n){n===void 0&&(n={});var r=this._determineQuoteMark(n),i=h0[r],s=(0,ol.default)(this._value,i);return s},t.prototype._determineQuoteMark=function(n){return n.smart?this.smartQuoteMark(n):this.preferredQuoteMark(n)},t.prototype.setValue=function(n,r){r===void 0&&(r={}),this._value=n,this._quoteMark=this._determineQuoteMark(r),this._syncRawValue()},t.prototype.smartQuoteMark=function(n){var r=this.value,i=r.replace(/[^']/g,"").length,s=r.replace(/[^"]/g,"").length;if(i+s===0){var a=(0,ol.default)(r,{isIdentifier:!0});if(a===r)return t.NO_QUOTE;var o=this.preferredQuoteMark(n);if(o===t.NO_QUOTE){var c=this.quoteMark||n.quoteMark||t.DOUBLE_QUOTE,l=h0[c],f=(0,ol.default)(r,l);if(f.length<a.length)return c}return o}else return s===i?this.preferredQuoteMark(n):s<i?t.DOUBLE_QUOTE:t.SINGLE_QUOTE},t.prototype.preferredQuoteMark=function(n){var r=n.preferCurrentQuoteMark?this.quoteMark:n.quoteMark;return r===void 0&&(r=n.preferCurrentQuoteMark?n.quoteMark:this.quoteMark),r===void 0&&(r=t.DOUBLE_QUOTE),r},Object.defineProperty(t.prototype,"quoted",{get:function(){var n=this.quoteMark;return n==="'"||n==='"'},set:function(n){ZJ()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"quoteMark",{get:function(){return this._quoteMark},set:function(n){if(!this._constructed){this._quoteMark=n;return}this._quoteMark!==n&&(this._quoteMark=n,this._syncRawValue())},enumerable:!1,configurable:!0}),t.prototype._syncRawValue=function(){var n=(0,ol.default)(this._value,h0[this.quoteMark]);n===this._value?this.raws&&delete this.raws.value:this.raws.value=n},Object.defineProperty(t.prototype,"qualifiedAttribute",{get:function(){return this.qualifiedName(this.raws.attribute||this.attribute)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"insensitiveFlag",{get:function(){return this.insensitive?"i":""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this._value},set:function(n){if(this._constructed){var r=m0(n),i=r.deprecatedUsage,s=r.unescaped,a=r.quoteMark;if(i&&XJ(),s===this._value&&a===this._quoteMark)return;this._value=s,this._quoteMark=a,this._syncRawValue()}else this._value=n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"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},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attribute",{get:function(){return this._attribute},set:function(n){this._handleEscapes("attribute",n),this._attribute=n},enumerable:!1,configurable:!0}),t.prototype._handleEscapes=function(n,r){if(this._constructed){var i=(0,ol.default)(r,{isIdentifier:!0});i!==r?this.raws[n]=i:delete this.raws[n]}},t.prototype._spacesFor=function(n){var r={before:"",after:""},i=this.spaces[n]||{},s=this.raws.spaces&&this.raws.spaces[n]||{};return Object.assign(r,i,s)},t.prototype._stringFor=function(n,r,i){r===void 0&&(r=n),i===void 0&&(i=dL);var s=this._spacesFor(r);return i(this.stringifyProperty(n),s)},t.prototype.offsetOf=function(n){var r=1,i=this._spacesFor("attribute");if(r+=i.before.length,n==="namespace"||n==="ns")return this.namespace?r:-1;if(n==="attributeNS"||(r+=this.namespaceString.length,this.namespace&&(r+=1),n==="attribute"))return r;r+=this.stringifyProperty("attribute").length,r+=i.after.length;var s=this._spacesFor("operator");r+=s.before.length;var a=this.stringifyProperty("operator");if(n==="operator")return a?r:-1;r+=a.length,r+=s.after.length;var o=this._spacesFor("value");r+=o.before.length;var c=this.stringifyProperty("value");if(n==="value")return c?r:-1;r+=c.length,r+=o.after.length;var l=this._spacesFor("insensitive");return r+=l.before.length,n==="insensitive"&&this.insensitive?r:-1},t.prototype.toString=function(){var n=this,r=[this.rawSpaceBefore,"["];return r.push(this._stringFor("qualifiedAttribute","attribute")),this.operator&&(this.value||this.value==="")&&(r.push(this._stringFor("operator")),r.push(this._stringFor("value")),r.push(this._stringFor("insensitiveFlag","insensitive",function(i,s){return i.length>0&&!n.quoted&&s.before.length===0&&!(n.spaces.value&&n.spaces.value.after)&&(s.before=" "),dL(i,s)}))),r.push("]"),r.push(this.rawSpaceAfter),r.join("")},t.NO_QUOTE=null,t.SINGLE_QUOTE="'",t.DOUBLE_QUOTE='"',t})(KJ.default);Ki.default=nK;var h0=(d0={"'":{quotes:"single",wrap:!0},'"':{quotes:"double",wrap:!0}},d0[null]={isIdentifier:!0},d0);function dL(e,t){return"".concat(t.before).concat(e).concat(t.after)}});var y0=x(ma=>{"use strict";p();var rK=ma&&ma.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),iK=ma&&ma.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ma,"__esModule",{value:!0});var sK=iK(Ih()),aK=Ct(),oK=(function(e){rK(t,e);function t(n){var r=e.call(this,n)||this;return r.type=aK.UNIVERSAL,r.value="*",r}return t})(sK.default);ma.default=oK});var _0=x(ga=>{"use strict";p();var cK=ga&&ga.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),uK=ga&&ga.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ga,"__esModule",{value:!0});var lK=uK(ci()),fK=Ct(),dK=(function(e){cK(t,e);function t(n){var r=e.call(this,n)||this;return r.type=fK.COMBINATOR,r}return t})(lK.default);ga.default=dK});var v0=x(ya=>{"use strict";p();var hK=ya&&ya.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),pK=ya&&ya.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ya,"__esModule",{value:!0});var mK=pK(ci()),gK=Ct(),yK=(function(e){hK(t,e);function t(n){var r=e.call(this,n)||this;return r.type=gK.NESTING,r.value="&",r}return t})(mK.default);ya.default=yK});var hL=x(b0=>{"use strict";p();Object.defineProperty(b0,"__esModule",{value:!0});b0.default=_K;function _K(e){return e.sort(function(t,n){return t-n})}});var k0=x(ne=>{"use strict";p();Object.defineProperty(ne,"__esModule",{value:!0});ne.combinator=ne.word=ne.comment=ne.str=ne.tab=ne.newline=ne.feed=ne.cr=ne.backslash=ne.bang=ne.slash=ne.doubleQuote=ne.singleQuote=ne.space=ne.greaterThan=ne.pipe=ne.equals=ne.plus=ne.caret=ne.tilde=ne.dollar=ne.closeSquare=ne.openSquare=ne.closeParenthesis=ne.openParenthesis=ne.semicolon=ne.colon=ne.comma=ne.at=ne.asterisk=ne.ampersand=void 0;ne.ampersand=38;ne.asterisk=42;ne.at=64;ne.comma=44;ne.colon=58;ne.semicolon=59;ne.openParenthesis=40;ne.closeParenthesis=41;ne.openSquare=91;ne.closeSquare=93;ne.dollar=36;ne.tilde=126;ne.caret=94;ne.plus=43;ne.equals=61;ne.pipe=124;ne.greaterThan=62;ne.space=32;ne.singleQuote=39;ne.doubleQuote=34;ne.slash=47;ne.bang=33;ne.backslash=92;ne.cr=13;ne.feed=12;ne.newline=10;ne.tab=9;ne.str=ne.singleQuote;ne.comment=-1;ne.word=-2;ne.combinator=-3});var mL=x(fr=>{"use strict";p();var vK=fr&&fr.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),bK=fr&&fr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),kK=fr&&fr.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&vK(n,t,r[i]);return bK(n,t),n}})(),Go,$e;Object.defineProperty(fr,"__esModule",{value:!0});fr.FIELDS=void 0;fr.default=EK;var Z=kK(k0()),SK=(Go={},Go[Z.tab]=!0,Go[Z.newline]=!0,Go[Z.cr]=!0,Go[Z.feed]=!0,Go),TK=($e={},$e[Z.space]=!0,$e[Z.tab]=!0,$e[Z.newline]=!0,$e[Z.cr]=!0,$e[Z.feed]=!0,$e[Z.ampersand]=!0,$e[Z.asterisk]=!0,$e[Z.bang]=!0,$e[Z.comma]=!0,$e[Z.colon]=!0,$e[Z.semicolon]=!0,$e[Z.openParenthesis]=!0,$e[Z.closeParenthesis]=!0,$e[Z.openSquare]=!0,$e[Z.closeSquare]=!0,$e[Z.singleQuote]=!0,$e[Z.doubleQuote]=!0,$e[Z.plus]=!0,$e[Z.pipe]=!0,$e[Z.tilde]=!0,$e[Z.greaterThan]=!0,$e[Z.equals]=!0,$e[Z.dollar]=!0,$e[Z.caret]=!0,$e[Z.slash]=!0,$e),S0={},pL="0123456789abcdefABCDEF";for(Mh=0;Mh<pL.length;Mh++)S0[pL.charCodeAt(Mh)]=!0;var Mh;function wK(e,t){var n=t,r;do{if(r=e.charCodeAt(n),TK[r])return n-1;r===Z.backslash?n=xK(e,n)+1:n++}while(n<e.length);return n-1}function xK(e,t){var n=t,r=e.charCodeAt(n+1);if(!SK[r])if(S0[r]){var i=0;do n++,i++,r=e.charCodeAt(n+1);while(S0[r]&&i<6);i<6&&r===Z.space&&n++}else n++;return n}fr.FIELDS={TYPE:0,START_LINE:1,START_COL:2,END_LINE:3,END_COL:4,START_POS:5,END_POS:6};function EK(e){var t=[],n=e.css.valueOf(),r=n.length,i=-1,s=1,a=0,o=0,c,l,f,h,d,g,v,b,_,k,T,w,y;function A(P,O){if(e.safe)n+=O,_=n.length-1;else throw e.error("Unclosed "+P,s,a-i,a)}for(;a<r;){switch(c=n.charCodeAt(a),c===Z.newline&&(i=a,s+=1),c){case Z.space:case Z.tab:case Z.newline:case Z.cr:case Z.feed:_=a;do _+=1,c=n.charCodeAt(_),c===Z.newline&&(i=_,s+=1);while(c===Z.space||c===Z.newline||c===Z.tab||c===Z.cr||c===Z.feed);y=Z.space,h=s,f=_-i-1,o=_;break;case Z.plus:case Z.greaterThan:case Z.tilde:case Z.pipe:_=a;do _+=1,c=n.charCodeAt(_);while(c===Z.plus||c===Z.greaterThan||c===Z.tilde||c===Z.pipe);y=Z.combinator,h=s,f=a-i,o=_;break;case Z.asterisk:case Z.ampersand:case Z.bang:case Z.comma:case Z.equals:case Z.dollar:case Z.caret:case Z.openSquare:case Z.closeSquare:case Z.colon:case Z.semicolon:case Z.openParenthesis:case Z.closeParenthesis:_=a,y=c,h=s,f=a-i,o=_+1;break;case Z.singleQuote:case Z.doubleQuote:w=c===Z.singleQuote?"'":'"',_=a;do for(d=!1,_=n.indexOf(w,_+1),_===-1&&A("quote",w),g=_;n.charCodeAt(g-1)===Z.backslash;)g-=1,d=!d;while(d);y=Z.str,h=s,f=a-i,o=_+1;break;default:c===Z.slash&&n.charCodeAt(a+1)===Z.asterisk?(_=n.indexOf("*/",a+2)+1,_===0&&A("comment","*/"),l=n.slice(a,_+1),b=l.split(`
|
|
66
|
+
`),v=b.length-1,v>0?(k=s+v,T=_-b[v].length):(k=s,T=i),y=Z.comment,s=k,h=k,f=_-T):c===Z.slash?(_=a,y=c,h=s,f=a-i,o=_+1):(_=wK(n,a),y=Z.word,h=s,f=_-i),o=_+1;break}t.push([y,s,a-i,h,f,a,o]),T&&(i=T,T=null),a=o}return t}});var SL=x(Lt=>{"use strict";p();var Rh=Lt&&Lt.__assign||function(){return Rh=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Rh.apply(this,arguments)},AK=Lt&&Lt.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),OK=Lt&&Lt.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Dh=Lt&&Lt.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&AK(n,t,r[i]);return OK(n,t),n}})(),gL=Lt&&Lt.__read||function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,s=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return s},yL=Lt&&Lt.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))},Hn=Lt&&Lt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},_a,T0;Object.defineProperty(Lt,"__esModule",{value:!0});var PK=Hn(r0()),w0=Hn(i0()),NK=Hn(a0()),_L=Hn(o0()),CK=Hn(c0()),LK=Hn(u0()),x0=Hn(l0()),qK=Hn(f0()),vL=Dh(g0()),IK=Hn(y0()),E0=Hn(_0()),MK=Hn(v0()),RK=Hn(hL()),W=Dh(mL()),ee=Dh(k0()),DK=Dh(Ct()),Qe=Wo(),P0=(_a={},_a[ee.space]=!0,_a[ee.cr]=!0,_a[ee.feed]=!0,_a[ee.newline]=!0,_a[ee.tab]=!0,_a),jK=Rh(Rh({},P0),(T0={},T0[ee.comment]=!0,T0));function bL(e){return{line:e[W.FIELDS.START_LINE],column:e[W.FIELDS.START_COL]}}function kL(e){return{line:e[W.FIELDS.END_LINE],column:e[W.FIELDS.END_COL]}}function va(e,t,n,r){return{start:{line:e,column:t},end:{line:n,column:r}}}function Jo(e){return va(e[W.FIELDS.START_LINE],e[W.FIELDS.START_COL],e[W.FIELDS.END_LINE],e[W.FIELDS.END_COL])}function A0(e,t){if(e)return va(e[W.FIELDS.START_LINE],e[W.FIELDS.START_COL],t[W.FIELDS.END_LINE],t[W.FIELDS.END_COL])}function Ko(e,t){var n=e[t];if(typeof n=="string")return n.indexOf("\\")!==-1&&((0,Qe.ensureObject)(e,"raws"),e[t]=(0,Qe.unesc)(n),e.raws[t]===void 0&&(e.raws[t]=n)),e}function O0(e,t){for(var n=-1,r=[];(n=e.indexOf(t,n+1))!==-1;)r.push(n);return r}function BK(){return Array.from(new Set(Array.prototype.concat.apply([],arguments)))}var FK=(function(){function e(t,n){n===void 0&&(n={}),this.rule=t,this.options=Object.assign({lossy:!1,safe:!1},n),this.position=0,this.nestingDepth=0,this.maxNestingDepth=(0,Qe.resolveMaxNestingDepth)(this.options.maxNestingDepth),this.css=typeof this.rule=="string"?this.rule:this.rule.selector,this.tokens=(0,W.default)({css:this.css,error:this._errorGenerator(),safe:this.options.safe});var r=A0(this.tokens[0],this.tokens[this.tokens.length-1]);this.root=new PK.default({source:r}),this.root.errorGenerator=this._errorGenerator();var i=new w0.default({source:{start:{line:1,column:1}},sourceIndex:0});this.root.append(i),this.current=i,this.loop()}return e.prototype._errorGenerator=function(){var t=this;return function(n,r){return typeof t.rule=="string"?new Error(n):t.rule.error(n,r)}},e.prototype.attribute=function(){var t=[],n=this.currToken;for(this.position++;this.position<this.tokens.length&&this.currToken[W.FIELDS.TYPE]!==ee.closeSquare;)t.push(this.currToken),this.position++;if(!this.currToken)return this.expected("closing square bracket",n[W.FIELDS.START_POS]);if(this.currToken[W.FIELDS.TYPE]!==ee.closeSquare)return this.expected("closing square bracket",this.currToken[W.FIELDS.START_POS]);var r=t.length,i={source:va(n[1],n[2],this.currToken[3],this.currToken[4]),sourceIndex:n[W.FIELDS.START_POS]};if(r===1&&!~[ee.word].indexOf(t[0][W.FIELDS.TYPE]))return this.expected("attribute",t[0][W.FIELDS.START_POS]);for(var s=0,a="",o="",c=null,l=!1;s<r;){var f=t[s],h=this.content(f),d=t[s+1];switch(f[W.FIELDS.TYPE]){case ee.space:if(l=!0,this.options.lossy)break;if(c){(0,Qe.ensureObject)(i,"spaces",c);var g=i.spaces[c].after||"";i.spaces[c].after=g+h;var v=(0,Qe.getProp)(i,"raws","spaces",c,"after")||null;v&&(i.raws.spaces[c].after=v+h)}else a=a+h,o=o+h;break;case ee.asterisk:if(d[W.FIELDS.TYPE]===ee.equals)i.operator=h,c="operator";else if((!i.namespace||c==="namespace"&&!l)&&d){a&&((0,Qe.ensureObject)(i,"spaces","attribute"),i.spaces.attribute.before=a,a=""),o&&((0,Qe.ensureObject)(i,"raws","spaces","attribute"),i.raws.spaces.attribute.before=o,o=""),i.namespace=(i.namespace||"")+h;var b=(0,Qe.getProp)(i,"raws","namespace")||null;b&&(i.raws.namespace+=h),c="namespace"}l=!1;break;case ee.dollar:if(c==="value"){var _=(0,Qe.getProp)(i,"raws","value");i.value+="$",_&&(i.raws.value=_+"$");break}case ee.caret:d[W.FIELDS.TYPE]===ee.equals&&(i.operator=h,c="operator"),l=!1;break;case ee.combinator:if(h==="~"&&d[W.FIELDS.TYPE]===ee.equals&&(i.operator=h,c="operator"),h!=="|"){l=!1;break}d[W.FIELDS.TYPE]===ee.equals?(i.operator=h,c="operator"):!i.namespace&&!i.attribute&&(i.namespace=!0),l=!1;break;case ee.word:if(d&&this.content(d)==="|"&&t[s+2]&&t[s+2][W.FIELDS.TYPE]!==ee.equals&&!i.operator&&!i.namespace)i.namespace=h,c="namespace";else if(!i.attribute||c==="attribute"&&!l){a&&((0,Qe.ensureObject)(i,"spaces","attribute"),i.spaces.attribute.before=a,a=""),o&&((0,Qe.ensureObject)(i,"raws","spaces","attribute"),i.raws.spaces.attribute.before=o,o=""),i.attribute=(i.attribute||"")+h;var b=(0,Qe.getProp)(i,"raws","attribute")||null;b&&(i.raws.attribute+=h),c="attribute"}else if(!i.value&&i.value!==""||c==="value"&&!(l||i.quoteMark)){var k=(0,Qe.unesc)(h),_=(0,Qe.getProp)(i,"raws","value")||"",T=i.value||"";i.value=T+k,i.quoteMark=null,(k!==h||_)&&((0,Qe.ensureObject)(i,"raws"),i.raws.value=(_||T)+h),c="value"}else{var w=h==="i"||h==="I";(i.value||i.value==="")&&(i.quoteMark||l)?(i.insensitive=w,(!w||h==="I")&&((0,Qe.ensureObject)(i,"raws"),i.raws.insensitiveFlag=h),c="insensitive",a&&((0,Qe.ensureObject)(i,"spaces","insensitive"),i.spaces.insensitive.before=a,a=""),o&&((0,Qe.ensureObject)(i,"raws","spaces","insensitive"),i.raws.spaces.insensitive.before=o,o="")):(i.value||i.value==="")&&(c="value",i.value+=h,i.raws.value&&(i.raws.value+=h))}l=!1;break;case ee.str:if(!i.attribute||!i.operator)return this.error("Expected an attribute followed by an operator preceding the string.",{index:f[W.FIELDS.START_POS]});var y=(0,vL.unescapeValue)(h),A=y.unescaped,P=y.quoteMark;i.value=A,i.quoteMark=P,c="value",(0,Qe.ensureObject)(i,"raws"),i.raws.value=h,l=!1;break;case ee.equals:if(!i.attribute)return this.expected("attribute",f[W.FIELDS.START_POS],h);if(i.value)return this.error('Unexpected "=" found; an operator was already defined.',{index:f[W.FIELDS.START_POS]});i.operator=i.operator?i.operator+h:h,c="operator",l=!1;break;case ee.comment:if(c)if(l||d&&d[W.FIELDS.TYPE]===ee.space||c==="insensitive"){var O=(0,Qe.getProp)(i,"spaces",c,"after")||"",L=(0,Qe.getProp)(i,"raws","spaces",c,"after")||O;(0,Qe.ensureObject)(i,"raws","spaces",c),i.raws.spaces[c].after=L+h}else{var D=i[c]||"",M=(0,Qe.getProp)(i,"raws",c)||D;(0,Qe.ensureObject)(i,"raws"),i.raws[c]=M+h}else o=o+h;break;default:return this.error('Unexpected "'.concat(h,'" found.'),{index:f[W.FIELDS.START_POS]})}s++}Ko(i,"attribute"),Ko(i,"namespace"),this.newNode(new vL.default(i)),this.position++},e.prototype.parseWhitespaceEquivalentTokens=function(t){t<0&&(t=this.tokens.length);var n=this.position,r=[],i="",s=void 0;do if(P0[this.currToken[W.FIELDS.TYPE]])this.options.lossy||(i+=this.content());else if(this.currToken[W.FIELDS.TYPE]===ee.comment){var a={};i&&(a.before=i,i=""),s=new _L.default({value:this.content(),source:Jo(this.currToken),sourceIndex:this.currToken[W.FIELDS.START_POS],spaces:a}),r.push(s)}while(++this.position<t);if(i){if(s)s.spaces.after=i;else if(!this.options.lossy){var o=this.tokens[n],c=this.tokens[this.position-1];r.push(new x0.default({value:"",source:va(o[W.FIELDS.START_LINE],o[W.FIELDS.START_COL],c[W.FIELDS.END_LINE],c[W.FIELDS.END_COL]),sourceIndex:o[W.FIELDS.START_POS],spaces:{before:i,after:""}}))}}return r},e.prototype.convertWhitespaceNodesToSpace=function(t,n){var r=this;n===void 0&&(n=!1);var i="",s="";t.forEach(function(o){var c=r.lossySpace(o.spaces.before,n),l=r.lossySpace(o.rawSpaceBefore,n);i+=c+r.lossySpace(o.spaces.after,n&&c.length===0),s+=c+o.value+r.lossySpace(o.rawSpaceAfter,n&&l.length===0)}),s===i&&(s=void 0);var a={space:i,rawSpace:s};return a},e.prototype.isNamedCombinator=function(t){return t===void 0&&(t=this.position),this.tokens[t+0]&&this.tokens[t+0][W.FIELDS.TYPE]===ee.slash&&this.tokens[t+1]&&this.tokens[t+1][W.FIELDS.TYPE]===ee.word&&this.tokens[t+2]&&this.tokens[t+2][W.FIELDS.TYPE]===ee.slash},e.prototype.namedCombinator=function(){if(this.isNamedCombinator()){var t=this.content(this.tokens[this.position+1]),n=(0,Qe.unesc)(t).toLowerCase(),r={};n!==t&&(r.value="/".concat(t,"/"));var i=new E0.default({value:"/".concat(n,"/"),source:va(this.currToken[W.FIELDS.START_LINE],this.currToken[W.FIELDS.START_COL],this.tokens[this.position+2][W.FIELDS.END_LINE],this.tokens[this.position+2][W.FIELDS.END_COL]),sourceIndex:this.currToken[W.FIELDS.START_POS],raws:r});return this.position=this.position+3,i}else this.unexpected()},e.prototype.combinator=function(){var t=this;if(this.content()==="|")return this.namespace();var n=this.locateNextMeaningfulToken(this.position);if(n<0||this.tokens[n][W.FIELDS.TYPE]===ee.comma||this.tokens[n][W.FIELDS.TYPE]===ee.closeParenthesis){var r=this.parseWhitespaceEquivalentTokens(n);if(r.length>0){var i=this.current.last;if(i){var s=this.convertWhitespaceNodesToSpace(r),a=s.space,o=s.rawSpace;o!==void 0&&(i.rawSpaceAfter+=o),i.spaces.after+=a}else r.forEach(function(b){return t.newNode(b)})}return}var c=this.currToken,l=void 0;n>this.position&&(l=this.parseWhitespaceEquivalentTokens(n));var f;if(this.isNamedCombinator()?f=this.namedCombinator():this.currToken[W.FIELDS.TYPE]===ee.combinator?(f=new E0.default({value:this.content(),source:Jo(this.currToken),sourceIndex:this.currToken[W.FIELDS.START_POS]}),this.position++):P0[this.currToken[W.FIELDS.TYPE]]||l||this.unexpected(),f){if(l){var h=this.convertWhitespaceNodesToSpace(l),a=h.space,o=h.rawSpace;f.spaces.before=a,f.rawSpaceBefore=o}}else{var d=this.convertWhitespaceNodesToSpace(l,!0),a=d.space,o=d.rawSpace;o||(o=a);var g={},v={spaces:{}};a.endsWith(" ")&&o.endsWith(" ")?(g.before=a.slice(0,a.length-1),v.spaces.before=o.slice(0,o.length-1)):a[0]===" "&&o[0]===" "?(g.after=a.slice(1),v.spaces.after=o.slice(1)):v.value=o,f=new E0.default({value:" ",source:A0(c,this.tokens[this.position-1]),sourceIndex:c[W.FIELDS.START_POS],spaces:g,raws:v})}return this.currToken&&this.currToken[W.FIELDS.TYPE]===ee.space&&(f.spaces.after=this.optionalSpace(this.content()),this.position++),this.newNode(f)},e.prototype.comma=function(){if(this.position===this.tokens.length-1){this.root.trailingComma=!0,this.position++;return}this.current._inferEndPosition();var t=new w0.default({source:{start:bL(this.tokens[this.position+1])},sourceIndex:this.tokens[this.position+1][W.FIELDS.START_POS]});this.current.parent.append(t),this.current=t,this.position++},e.prototype.comment=function(){var t=this.currToken;this.newNode(new _L.default({value:this.content(),source:Jo(t),sourceIndex:t[W.FIELDS.START_POS]})),this.position++},e.prototype.error=function(t,n){throw this.root.error(t,n)},e.prototype.missingBackslash=function(){return this.error("Expected a backslash preceding the semicolon.",{index:this.currToken[W.FIELDS.START_POS]})},e.prototype.missingParenthesis=function(){return this.expected("opening parenthesis",this.currToken[W.FIELDS.START_POS])},e.prototype.missingSquareBracket=function(){return this.expected("opening square bracket",this.currToken[W.FIELDS.START_POS])},e.prototype.unexpected=function(){return this.error("Unexpected '".concat(this.content(),"'. Escaping special characters with \\ may help."),this.currToken[W.FIELDS.START_POS])},e.prototype.unexpectedPipe=function(){return this.error("Unexpected '|'.",this.currToken[W.FIELDS.START_POS])},e.prototype.namespace=function(){var t=this.prevToken,n=t&&(t[W.FIELDS.TYPE]===ee.word||t[W.FIELDS.TYPE]===ee.asterisk||t[W.FIELDS.TYPE]===ee.ampersand)?this.content(t):!0;if(!this.nextToken)return this.unexpectedPipe();if(this.nextToken[W.FIELDS.TYPE]===ee.word)return this.position++,this.word(n);if(this.nextToken[W.FIELDS.TYPE]===ee.asterisk)return this.position++,this.universal(n);this.unexpectedPipe()},e.prototype.nesting=function(){if(this.nextToken){var t=this.content(this.nextToken);if(t==="|"){this.position++;return}}var n=this.currToken;this.newNode(new MK.default({value:this.content(),source:Jo(n),sourceIndex:n[W.FIELDS.START_POS]})),this.position++},e.prototype.parentheses=function(){var t=this.current.last,n=1,r=this.currToken;if(this.position++,t&&t.type===DK.PSEUDO){var i=new w0.default({source:{start:bL(this.tokens[this.position])},sourceIndex:this.tokens[this.position][W.FIELDS.START_POS]}),s=this.current;t.append(i),this.current=i,this.nestingDepth++;try{for(this.nestingDepth>this.maxNestingDepth&&this.error("Cannot parse selector: nesting depth exceeds the maximum of ".concat(this.maxNestingDepth,"."),{index:this.currToken[W.FIELDS.START_POS]});this.position<this.tokens.length&&n;)this.currToken[W.FIELDS.TYPE]===ee.openParenthesis&&n++,this.currToken[W.FIELDS.TYPE]===ee.closeParenthesis&&n--,n?this.parse():(this.current.source.end=kL(this.currToken),this.current.parent.source.end=kL(this.currToken),this.position++)}finally{this.nestingDepth--}this.current=s}else{for(var a=this.currToken,o="(",c=void 0;this.position<this.tokens.length&&n;)this.currToken[W.FIELDS.TYPE]===ee.openParenthesis&&n++,this.currToken[W.FIELDS.TYPE]===ee.closeParenthesis&&n--,c=this.currToken,o+=this.parseParenthesisToken(this.currToken),this.position++;t?t.appendToPropertyAndEscape("value",o,o):this.newNode(new x0.default({value:o,source:va(a[W.FIELDS.START_LINE],a[W.FIELDS.START_COL],c[W.FIELDS.END_LINE],c[W.FIELDS.END_COL]),sourceIndex:a[W.FIELDS.START_POS]}))}if(n)return this.expected("closing parenthesis",(this.currToken||r)[W.FIELDS.START_POS])},e.prototype.pseudo=function(){for(var t=this,n="",r=this.currToken;this.currToken&&this.currToken[W.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[W.FIELDS.TYPE]===ee.word)this.splitWord(!1,function(i,s){n+=i,t.newNode(new qK.default({value:n,source:A0(r,t.currToken),sourceIndex:r[W.FIELDS.START_POS]})),s>1&&t.nextToken&&t.nextToken[W.FIELDS.TYPE]===ee.openParenthesis&&t.error("Misplaced parenthesis.",{index:t.nextToken[W.FIELDS.START_POS]})});else return this.expected(["pseudo-class","pseudo-element"],this.currToken[W.FIELDS.START_POS])},e.prototype.space=function(){var t=this.content();this.position===0||this.prevToken[W.FIELDS.TYPE]===ee.comma||this.prevToken[W.FIELDS.TYPE]===ee.openParenthesis||this.current.nodes.every(function(n){return n.type==="comment"})?(this.spaces=this.optionalSpace(t),this.position++):this.position===this.tokens.length-1||this.nextToken[W.FIELDS.TYPE]===ee.comma||this.nextToken[W.FIELDS.TYPE]===ee.closeParenthesis?(this.current.last.spaces.after=this.optionalSpace(t),this.position++):this.combinator()},e.prototype.string=function(){var t=this.currToken;this.newNode(new x0.default({value:this.content(),source:Jo(t),sourceIndex:t[W.FIELDS.START_POS]})),this.position++},e.prototype.universal=function(t){var n=this.nextToken;if(n&&this.content(n)==="|")return this.position++,this.namespace();var r=this.currToken;this.newNode(new IK.default({value:this.content(),source:Jo(r),sourceIndex:r[W.FIELDS.START_POS]}),t),this.position++},e.prototype.splitWord=function(t,n){for(var r=this,i=this.nextToken,s=this.content();i&&~[ee.dollar,ee.caret,ee.equals,ee.word].indexOf(i[W.FIELDS.TYPE]);){this.position++;var a=this.content();if(s+=a,a.lastIndexOf("\\")===a.length-1){var o=this.nextToken;o&&o[W.FIELDS.TYPE]===ee.space&&(s+=this.requiredSpace(this.content(o)),this.position++)}i=this.nextToken}var c=O0(s,".").filter(function(b){var _=s[b-1]==="\\",k=/^\d+\.\d+%$/.test(s);return!_&&!k}),l=O0(s,"#").filter(function(b){return s[b-1]!=="\\"}),f=O0(s,"#{");if(f.length){var h=new Set(f);l=l.filter(function(b){return!h.has(b)})}var d=new Set(c),g=new Set(l),v=(0,RK.default)(BK(yL(yL([0],gL(c),!1),gL(l),!1)));v.forEach(function(b,_){var k=v[_+1]||s.length,T=s.slice(b,k);if(_===0&&n)return n.call(r,T,v.length);var w,y=r.currToken,A=y[W.FIELDS.START_POS]+v[_],P=va(y[1],y[2]+b,y[3],y[2]+(k-1));if(d.has(b)){var O={value:T.slice(1),source:P,sourceIndex:A};w=new NK.default(Ko(O,"value"))}else if(g.has(b)){var L={value:T.slice(1),source:P,sourceIndex:A};w=new CK.default(Ko(L,"value"))}else{var D={value:T,source:P,sourceIndex:A};Ko(D,"value"),w=new LK.default(D)}r.newNode(w,t),t=null}),this.position++},e.prototype.word=function(t){var n=this.nextToken;return n&&this.content(n)==="|"?(this.position++,this.namespace()):this.splitWord(t)},e.prototype.loop=function(){for(;this.position<this.tokens.length;)this.parse(!0);return this.current._inferEndPosition(),this.root},e.prototype.parse=function(t){switch(this.currToken[W.FIELDS.TYPE]){case ee.space:this.space();break;case ee.comment:this.comment();break;case ee.openParenthesis:this.parentheses();break;case ee.closeParenthesis:t&&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.prototype.expected=function(t,n,r){if(Array.isArray(t)){var i=t.pop();t="".concat(t.join(", ")," or ").concat(i)}var s=/^[aeiou]/.test(t[0])?"an":"a";return r?this.error("Expected ".concat(s," ").concat(t,', found "').concat(r,'" instead.'),{index:n}):this.error("Expected ".concat(s," ").concat(t,"."),{index:n})},e.prototype.requiredSpace=function(t){return this.options.lossy?" ":t},e.prototype.optionalSpace=function(t){return this.options.lossy?"":t},e.prototype.lossySpace=function(t,n){return this.options.lossy?n?" ":"":t},e.prototype.parseParenthesisToken=function(t){var n=this.content(t);return t[W.FIELDS.TYPE]===ee.space?this.requiredSpace(n):n},e.prototype.newNode=function(t,n){return n&&(/^ +$/.test(n)&&(this.options.lossy||(this.spaces=(this.spaces||"")+n),n=!0),t.namespace=n,Ko(t,"namespace")),this.spaces&&(t.spaces.before=this.spaces,this.spaces=""),this.current.append(t)},e.prototype.content=function(t){return t===void 0&&(t=this.currToken),this.css.slice(t[W.FIELDS.START_POS],t[W.FIELDS.END_POS])},Object.defineProperty(e.prototype,"currToken",{get:function(){return this.tokens[this.position]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextToken",{get:function(){return this.tokens[this.position+1]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"prevToken",{get:function(){return this.tokens[this.position-1]},enumerable:!1,configurable:!0}),e.prototype.locateNextMeaningfulToken=function(t){t===void 0&&(t=this.position+1);for(var n=t;n<this.tokens.length;)if(jK[this.tokens[n][W.FIELDS.TYPE]]){n++;continue}else return n;return-1},e})();Lt.default=FK});var TL=x(ul=>{"use strict";p();var VK=ul&&ul.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ul,"__esModule",{value:!0});var $K=VK(SL()),UK=(function(){function e(t,n){this.func=t||function(){},this.funcRes=null,this.options=n}return e.prototype._shouldUpdateSelector=function(t,n){n===void 0&&(n={});var r=Object.assign({},this.options,n);return r.updateSelector===!1?!1:typeof t!="string"},e.prototype._isLossy=function(t){t===void 0&&(t={});var n=Object.assign({},this.options,t);return n.lossless===!1},e.prototype._root=function(t,n){n===void 0&&(n={});var r=new $K.default(t,this._parseOptions(n));return r.root},e.prototype._parseOptions=function(t){var n=Object.assign({},this.options,t);return{lossy:this._isLossy(n),maxNestingDepth:n.maxNestingDepth}},e.prototype._stringifyOptions=function(t){var n=Object.assign({},this.options,t);return{maxNestingDepth:n.maxNestingDepth}},e.prototype._run=function(t,n){var r=this;return n===void 0&&(n={}),new Promise(function(i,s){try{var a=r._root(t,n);Promise.resolve(r.func(a)).then(function(o){var c=void 0;return r._shouldUpdateSelector(t,n)&&(c=a.toString(r._stringifyOptions(n)),t.selector=c),{transform:o,root:a,string:c}}).then(i,s)}catch(o){s(o);return}})},e.prototype._runSync=function(t,n){n===void 0&&(n={});var r=this._root(t,n),i=this.func(r);if(i&&typeof i.then=="function")throw new Error("Selector processor returned a promise to a synchronous call.");var s=void 0;return n.updateSelector&&typeof t!="string"&&(s=r.toString(this._stringifyOptions(n)),t.selector=s),{transform:i,root:r,string:s}},e.prototype.ast=function(t,n){return this._run(t,n).then(function(r){return r.root})},e.prototype.astSync=function(t,n){return this._runSync(t,n).root},e.prototype.transform=function(t,n){return this._run(t,n).then(function(r){return r.transform})},e.prototype.transformSync=function(t,n){return this._runSync(t,n).transform},e.prototype.process=function(t,n){var r=this;return this._run(t,n).then(function(i){return i.string||i.root.toString(r._stringifyOptions(n))})},e.prototype.processSync=function(t,n){var r=this._runSync(t,n);return r.string||r.root.toString(this._stringifyOptions(n))},e})();ul.default=UK});var wL=x(Ve=>{"use strict";p();var zn=Ve&&Ve.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ve,"__esModule",{value:!0});Ve.universal=Ve.tag=Ve.string=Ve.selector=Ve.root=Ve.pseudo=Ve.nesting=Ve.id=Ve.comment=Ve.combinator=Ve.className=Ve.attribute=void 0;var HK=zn(g0()),zK=zn(a0()),WK=zn(_0()),GK=zn(o0()),JK=zn(c0()),KK=zn(v0()),YK=zn(f0()),QK=zn(r0()),XK=zn(i0()),ZK=zn(l0()),eY=zn(u0()),tY=zn(y0()),nY=function(e){return new HK.default(e)};Ve.attribute=nY;var rY=function(e){return new zK.default(e)};Ve.className=rY;var iY=function(e){return new WK.default(e)};Ve.combinator=iY;var sY=function(e){return new GK.default(e)};Ve.comment=sY;var aY=function(e){return new JK.default(e)};Ve.id=aY;var oY=function(e){return new KK.default(e)};Ve.nesting=oY;var cY=function(e){return new YK.default(e)};Ve.pseudo=cY;var uY=function(e){return new QK.default(e)};Ve.root=uY;var lY=function(e){return new XK.default(e)};Ve.selector=lY;var fY=function(e){return new ZK.default(e)};Ve.string=fY;var dY=function(e){return new eY.default(e)};Ve.tag=dY;var hY=function(e){return new tY.default(e)};Ve.universal=hY});var EL=x(xe=>{"use strict";p();var cn;Object.defineProperty(xe,"__esModule",{value:!0});xe.isUniversal=xe.isTag=xe.isString=xe.isSelector=xe.isRoot=xe.isPseudo=xe.isNesting=xe.isIdentifier=xe.isComment=xe.isCombinator=xe.isClassName=xe.isAttribute=void 0;xe.isNode=N0;xe.isPseudoElement=xL;xe.isPseudoClass=mY;xe.isContainer=gY;xe.isNamespace=yY;var tt=Ct(),pY=(cn={},cn[tt.ATTRIBUTE]=!0,cn[tt.CLASS]=!0,cn[tt.COMBINATOR]=!0,cn[tt.COMMENT]=!0,cn[tt.ID]=!0,cn[tt.NESTING]=!0,cn[tt.PSEUDO]=!0,cn[tt.ROOT]=!0,cn[tt.SELECTOR]=!0,cn[tt.STRING]=!0,cn[tt.TAG]=!0,cn[tt.UNIVERSAL]=!0,cn);function N0(e){return typeof e=="object"&&pY[e.type]}function Wn(e,t){return N0(t)&&t.type===e}xe.isAttribute=Wn.bind(null,tt.ATTRIBUTE);xe.isClassName=Wn.bind(null,tt.CLASS);xe.isCombinator=Wn.bind(null,tt.COMBINATOR);xe.isComment=Wn.bind(null,tt.COMMENT);xe.isIdentifier=Wn.bind(null,tt.ID);xe.isNesting=Wn.bind(null,tt.NESTING);xe.isPseudo=Wn.bind(null,tt.PSEUDO);xe.isRoot=Wn.bind(null,tt.ROOT);xe.isSelector=Wn.bind(null,tt.SELECTOR);xe.isString=Wn.bind(null,tt.STRING);xe.isTag=Wn.bind(null,tt.TAG);xe.isUniversal=Wn.bind(null,tt.UNIVERSAL);function xL(e){return(0,xe.isPseudo)(e)&&e.value&&(e.value.startsWith("::")||e.value.toLowerCase()===":before"||e.value.toLowerCase()===":after"||e.value.toLowerCase()===":first-letter"||e.value.toLowerCase()===":first-line")}function mY(e){return(0,xe.isPseudo)(e)&&!xL(e)}function gY(e){return!!(N0(e)&&e.walk)}function yY(e){return(0,xe.isAttribute)(e)||(0,xe.isTag)(e)}});var AL=x(li=>{"use strict";p();var _Y=li&&li.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),C0=li&&li.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&_Y(t,e,n)};Object.defineProperty(li,"__esModule",{value:!0});C0(Ct(),li);C0(wL(),li);C0(EL(),li)});var PL=x((fi,OL)=>{"use strict";p();var vY=fi&&fi.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),bY=fi&&fi.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),kY=fi&&fi.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&vY(n,t,r[i]);return bY(n,t),n}})(),SY=fi&&fi.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},TY=SY(TL()),wY=kY(AL()),L0=function(e){return new TY.default(e)};Object.assign(L0,wY);delete L0.__esModule;OL.exports=L0});var Ue=x(Zt=>{"use strict";p();Object.defineProperty(Zt,"__esModule",{value:!0});Zt.isNodeOfType=Yi;Zt.isLiquidBranch=xY;Zt.getHtmlNodeName=EY;Zt.isHtmlTag=AY;Zt.isAttr=OY;Zt.isHtmlAttribute=PY;Zt.isValuedHtmlAttribute=NY;Zt.valueIncludes=CY;Zt.hasAttributeValueOf=LY;Zt.isLiquidString=qY;Zt.isLoopScopedVariable=IY;Zt.isLoopLiquidTag=NL;Zt.isWithinRawTagThatDoesNotParseItsContents=DY;var qt=ue();function Yi(e,t){return t?.type===e}function xY(e){return Yi(qt.NodeTypes.LiquidBranch,e)}function EY(e){if(typeof e.name=="string")return e.name;if(e.name.length===1&&Yi(qt.NodeTypes.TextNode,e.name[0]))return e.name[0].value}function AY(e,t){return e.name.length===1&&e.name[0].type===qt.NodeTypes.TextNode&&e.name[0].value===t&&!!e.blockEndPosition}function OY(e,t){return e.name.length===1&&Yi(qt.NodeTypes.TextNode,e.name[0])&&e.name[0].value===t}function PY(e){return[qt.NodeTypes.AttrUnquoted,qt.NodeTypes.AttrDoubleQuoted,qt.NodeTypes.AttrSingleQuoted,qt.NodeTypes.AttrEmpty].some(t=>Yi(t,e))}function NY(e){return[qt.NodeTypes.AttrUnquoted,qt.NodeTypes.AttrDoubleQuoted,qt.NodeTypes.AttrSingleQuoted].some(t=>Yi(t,e))}function CY(e,t){let n=new RegExp(`(^|\\s)${t}(\\s|$)`,"g");return e.value.filter(r=>Yi(qt.NodeTypes.TextNode,r)).some(r=>n.test(r.value))}function LY(e,t){return e.value.length===1&&Yi(qt.NodeTypes.TextNode,e.value[0])&&e.value[0].value===t}function qY(e){return e.type===qt.NodeTypes.String}function IY(e,t){return t.some(n=>n.type===qt.NodeTypes.LiquidTag&&NL(n)&&typeof n.markup!="string"&&n.markup.variableName===e)}function NL(e){return qt.LoopNamedTags.includes(e.name)}var MY=["raw","stylesheet","javascript","schema"];function RY(e){return e.type===qt.NodeTypes.LiquidRawTag&&MY.includes(e.name)}function DY(e){return e.some(RY)}});var Nr=x(Yo=>{"use strict";p();Object.defineProperty(Yo,"__esModule",{value:!0});Yo.visit=jY;Yo.forEachChildNodes=Bh;Yo.findCurrentNode=BY;Yo.findJSONNode=$Y;var jh=ue();function CL(e){return e!==null&&typeof e=="object"&&typeof e.type=="string"}function jY(e,t){let n=[],r=[{node:e,lineage:[]}],i=(s,a)=>r.push({node:s,lineage:a});for(;r.length>0;){let{node:s,lineage:a}=r.pop(),o=t[s.type],c=o?o(s,a):void 0;Array.isArray(c)?n.push(...c):c!==void 0&&n.push(c),Bh(s,a.concat(s),i)}return n}function Bh(e,t,n){for(let r of Object.values(e))if(Array.isArray(r))for(let i=r.length-1;i>=0;i--)CL(r[i])&&n(r[i],t);else CL(r)&&n(r,t)}function BY(e,t){let n,r=e,i=[];for(;r!==n;)n=r,Bh(r,i.concat(r),(s,a)=>{(VY(s)||FY(s,t)&&LL(s)<=LL(r))&&(r=s,i=a)});return[r,i]}function FY(e,t){switch(e.type){case jh.NodeTypes.String:case jh.NodeTypes.VariableLookup:case jh.NodeTypes.LogicalExpression:case jh.NodeTypes.Comparison:return e.position.start<=t&&t<=e.position.end;default:return e.position.start<t&&t<=e.position.end}}function LL(e){return e.position.end-e.position.start}function VY(e){return"blockEndPosition"in e?e.blockEndPosition?.end===-1:"children"in e?e.children.length>0:!1}function $Y(e,t){let n,r=e,i=[],s=t;for(;r!==n;)n=r,Bh(r,i.concat(r),(a,o)=>{a.loc.start.offset<=s&&s<a.loc.end.offset&&(r=a,i=o)});return[r,i]}});var Fh=x(Cr=>{"use strict";p();var qL=Cr&&Cr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Cr,"__esModule",{value:!0});Cr.extractCSSClassNames=q0;Cr.extractCSSClassesFromLiquidAST=ML;Cr.extractCSSClassesFromLiquidUri=WY;Cr.extractCSSClassesFromAssetUri=GY;Cr.collectUsedClasses=ll;Cr.collectUsedClassesFromSvg=KY;var Qo=ue(),UY=qL(XC()),HY=qL(PL()),zY=Ue(),IL=Nr();function q0(e){let t=new Set;return(0,UY.default)(e).walkRules(r=>{try{(0,HY.default)().astSync(r.selector).walk(s=>{s.type==="class"&&t.add(s.value)})}catch{}}),t}function ML(e){let t=new Set,n=(0,IL.visit)(e,{LiquidRawTag(r){if(r.name==="stylesheet")return r.body.value}});for(let r of n)for(let i of q0(r))t.add(i);return t}async function WY(e,t){let n=new Set;try{let r=await t.readFile(e);if(!/\{%-?\s*stylesheet/.test(r))return n;let i=(0,Qo.toLiquidHtmlAST)(r);if(i instanceof Error)return n;for(let s of ML(i))n.add(s)}catch{}return n}async function GY(e,t){try{let n=await t.readFile(e);return q0(n)}catch{return new Set}}function JY(e){return e.name.length===1&&e.name[0].type===Qo.NodeTypes.TextNode&&e.name[0].value.toLowerCase()==="class"}function ll(e,t){for(let n of e){if(!(0,zY.isValuedHtmlAttribute)(n)||!JY(n))continue;let r=n.value;for(let i=0;i<r.length;i++){let s=r[i];if(s.type!==Qo.NodeTypes.TextNode)continue;let a=s,o=a.value,c=a.position.start,l=i>0&&r[i-1].type!==Qo.NodeTypes.TextNode,f=i<r.length-1&&r[i+1].type!==Qo.NodeTypes.TextNode,h=[],d=/\S+/g,g;for(;(g=d.exec(o))!==null;)h.push({className:g[0],startIndex:c+g.index,endIndex:c+g.index+g[0].length});h.length!==0&&(l&&!/^\s/.test(o)&&h.shift(),f&&!/\s$/.test(o)&&h.pop(),t.push(...h))}}}function KY(e,t,n,r){ll(e,r);try{let i=(0,Qo.toLiquidHtmlAST)(t);if(i instanceof Error)return;let s=[],a={HtmlElement(o){ll(o.attributes,s)},HtmlVoidElement(o){ll(o.attributes,s)},HtmlSelfClosingElement(o){ll(o.attributes,s)}};(0,IL.visit)(i,a);for(let o of s)r.push({className:o.className,startIndex:o.startIndex+n,endIndex:o.endIndex+n})}catch{}}});var I0=x(Gn=>{"use strict";p();Object.defineProperty(Gn,"__esModule",{value:!0});Gn.location=Gn.JSONCParseErrors=void 0;Gn.toJSONNode=XY;var YY=Ne(),QY=(wr(),j_(_o)),Vh=class extends Error{errors;constructor(t,n){super(t),this.errors=n}};Gn.JSONCParseErrors=Vh;function XY(e){let t=[],n=(0,QY.parseTree)(e,t,{allowTrailingComma:!0,disallowComments:!1});if(t.length||n===void 0)throw new Vh("Failed to parse JSONC",t);return $h(n)}function $h(e){switch(e.type){case"object":return ZY(e);case"property":return tQ(e);case"array":return eQ(e);case"boolean":case"null":case"number":case"string":return rQ(e);default:(0,YY.assertNever)(e.type)}}function ZY(e){return{type:"Object",children:(e.children??[]).map($h),loc:(0,Gn.location)(e.offset,e.offset+e.length)}}function eQ(e){return{type:"Array",children:e.children.map($h),loc:(0,Gn.location)(e.offset,e.offset+e.length)}}function tQ(e){return{type:"Property",key:nQ(e.children[0]),value:$h(e.children[1]),loc:(0,Gn.location)(e.offset,e.offset+e.length)}}function nQ(e){return{type:"Identifier",value:e.value,raw:JSON.stringify(e.value),loc:(0,Gn.location)(e.offset,e.offset+e.length)}}function rQ(e){return{type:"Literal",value:e.value,raw:JSON.stringify(e.value),loc:(0,Gn.location)(e.offset,e.offset+e.length)}}var iQ=(e,t)=>({start:RL(e),end:RL(t)});Gn.location=iQ;var RL=e=>({offset:e})});var jL=x(DL=>{"use strict";p();Object.defineProperty(DL,"__esModule",{value:!0})});var BL=x(Uh=>{"use strict";p();Object.defineProperty(Uh,"__esModule",{value:!0});Uh.SchemaProp=void 0;var M0=class e{options;constructor(t){this.options=t}static string(t){return new e({type:"string",defaultValue:t})}static number(t){return new e({type:"number",defaultValue:t})}static boolean(t){return new e({type:"boolean",defaultValue:t})}static object(t,n){return new e({type:"object",defaultValue:n,properties:t})}static array(t,n){return new e({type:"array",defaultValue:n,itemType:t})}optional(){return this.options.optional=!0,this}defaultValue(){return this.options.defaultValue}};Uh.SchemaProp=M0});var VL=x(FL=>{"use strict";p();Object.defineProperty(FL,"__esModule",{value:!0})});var UL=x($L=>{"use strict";p();Object.defineProperty($L,"__esModule",{value:!0})});var HL=x(Hh=>{"use strict";p();Object.defineProperty(Hh,"__esModule",{value:!0});Hh.Setting=void 0;var sQ=UL();Object.defineProperty(Hh,"Setting",{enumerable:!0,get:function(){return sQ.Setting}})});var WL=x(di=>{"use strict";p();var aQ=di&&di.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),oQ=di&&di.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&aQ(t,e,n)};Object.defineProperty(di,"__esModule",{value:!0});di.ThemeSchemaType=void 0;oQ(HL(),di);var zL;(function(e){e.AppBlock="app-block",e.Block="block",e.Section="section"})(zL||(di.ThemeSchemaType=zL={}))});var J=x(Ie=>{"use strict";p();var cQ=Ie&&Ie.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),zh=Ie&&Ie.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&cQ(t,e,n)};Object.defineProperty(Ie,"__esModule",{value:!0});Ie.ConfigTarget=Ie.Severity=Ie.LiquidHtmlNodeTypes=Ie.SourceCodeType=Ie.Modes=Ie.isLiteralNode=Ie.isValueNode=Ie.isPropertyNode=Ie.isArrayNode=Ie.isObjectNode=void 0;var uQ=ue();Object.defineProperty(Ie,"LiquidHtmlNodeTypes",{enumerable:!0,get:function(){return uQ.NodeTypes}});zh(jL(),Ie);zh(BL(),Ie);zh(VL(),Ie);zh(WL(),Ie);var lQ=e=>e?.type==="Object";Ie.isObjectNode=lQ;var fQ=e=>e?.type==="Array";Ie.isArrayNode=fQ;var dQ=e=>e?.type==="Property";Ie.isPropertyNode=dQ;var hQ=e=>e?.type==="Value";Ie.isValueNode=hQ;var pQ=e=>e?.type==="Literal";Ie.isLiteralNode=pQ;Ie.Modes=["theme","app"];var GL;(function(e){e.JSON="JSON",e.LiquidHtml="LiquidHtml"})(GL||(Ie.SourceCodeType=GL={}));var JL;(function(e){e[e.ERROR=0]="ERROR",e[e.WARNING=1]="WARNING",e[e.INFO=2]="INFO"})(JL||(Ie.Severity=JL={}));var KL;(function(e){e.All="all",e.Recommended="recommended",e.ThemeAppExtension="theme-app-extension"})(KL||(Ie.ConfigTarget=KL={}))});var Xo=x(dr=>{"use strict";p();var mQ=dr&&dr.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),gQ=dr&&dr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),yQ=dr&&dr.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&mQ(n,t,r[i]);return gQ(n,t),n}})();Object.defineProperty(dr,"__esModule",{value:!0});dr.toLiquidHTMLAST=ZL;dr.toJSONAST=eq;dr.toSourceCode=bQ;var _Q=ue(),vQ=I0(),YL=yQ(Fn()),QL=J(),XL=id();function ZL(e){try{return(0,_Q.toLiquidHtmlAST)(e)}catch(t){return(0,XL.asError)(t)}}function eq(e){try{return(0,vQ.toJSONNode)(e)}catch(t){return(0,XL.asError)(t)}}function bQ(e,t,n){return e.endsWith(".liquid")?{uri:YL.normalize(e),source:t,type:QL.SourceCodeType.LiquidHtml,ast:ZL(t),version:n}:{uri:YL.normalize(e),source:t,type:QL.SourceCodeType.JSON,ast:eq(t),version:n}}});var Le=x(mt=>{"use strict";p();var kQ=mt&&mt.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),SQ=mt&&mt.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),TQ=mt&&mt.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&kQ(n,t,r[i]);return SQ(n,t),n}})();Object.defineProperty(mt,"__esModule",{value:!0});mt.toSchema=wQ;mt.isBlock=Wh;mt.isSection=D0;mt.isSnippet=xQ;mt.isBlockSchema=EQ;mt.isSectionSchema=AQ;mt.toBlockSchema=sq;mt.toSectionSchema=aq;mt.toAppBlockSchema=oq;mt.hasNoSchemaTag=OQ;mt.getSchema=PQ;mt.getSchemaFromJSON=NQ;var R0=ue(),tq=Be(),ba=TQ(Fn()),nq=Xo(),Zo=J(),rq=Nr();async function wQ(e,t,n,r,i=!0){if(n.type===Zo.SourceCodeType.LiquidHtml)switch(!0){case(e==="app"&&Wh(t)):return oq(t,n.ast,i);case(e==="theme"&&Wh(t)):return sq(t,n.ast,r,i);case(e==="theme"&&D0(t)):return aq(t,n.ast,r,i);default:return}}function Wh(e){return ba.dirname(e).endsWith("blocks")}function D0(e){return ba.dirname(e).endsWith("sections")}function xQ(e){return ba.dirname(e).endsWith("snippets")}function EQ(e){return e?.type===Zo.ThemeSchemaType.Block}function AQ(e){return e?.type===Zo.ThemeSchemaType.Section}async function iq(e,t,n,r){return r?t instanceof Error||await r(e,t.body.value)?n:new Error("Invalid schema"):new Error("No JSON validator provided")}async function sq(e,t,n,r){let i=ba.basename(e,".liquid"),s=j0(t),a=uq(t),o=B0(s,r),c=F0(s);return{type:Zo.ThemeSchemaType.Block,validSchema:await iq(e,s,o,n),offset:s instanceof Error?0:s.blockStartPosition.end,name:i,parsed:o,ast:c,value:s instanceof Error?"":s.body.value,staticBlockDefs:a}}async function aq(e,t,n,r){let i=ba.basename(e,".liquid"),s=j0(t),a=uq(t),o=B0(s,r),c=F0(s);return{type:Zo.ThemeSchemaType.Section,validSchema:await iq(e,s,o,n),offset:s instanceof Error?0:s.blockStartPosition.end,name:i,parsed:o,ast:c,value:s instanceof Error?"":s.body.value,staticBlockDefs:a}}async function oq(e,t,n){let r=ba.basename(e,".liquid"),i=j0(t),s=B0(i,n),a=F0(i);return{type:Zo.ThemeSchemaType.AppBlock,offset:i instanceof Error?0:i.blockStartPosition.end,name:r,parsed:s,ast:a,value:i instanceof Error?"":i.body.value}}var cq="No schema tag found";function OQ(e){return e.parsed instanceof Error&&e.parsed.message===cq}function j0(e){return e instanceof Error?e:(0,rq.visit)(e,{LiquidRawTag(t){if(t.name==="schema")return t}})[0]??new Error(cq)}function uq(e){return e instanceof Error?[]:(0,rq.visit)(e,{LiquidTag(t){if(t.name!==R0.NamedTags.content_for||typeof t.markup=="string")return;let n=t.markup;if(n.contentForType.value!=="block")return;let r=n.args.find(s=>s.name==="type"),i=n.args.find(s=>s.name==="id");if(!(!r||!i)&&r.value.type===R0.NodeTypes.String&&i.value.type===R0.NodeTypes.String)return{type:r.value.value,id:i.value.value}}})}function PQ(e){let t=ba.basename(e.file.uri,".liquid");switch(!0){case Wh(e.file.uri):return e.getBlockSchema?.(t);case D0(e.file.uri):return e.getSectionSchema?.(t);default:return}}async function NQ(e){let t=e.file.source,n=(0,tq.parseJSON)(t),r=(0,nq.toJSONAST)(t);return{parsed:n,ast:r}}function B0(e,t){return e instanceof Error?e:(0,tq.parseJSON)(e.body.value,void 0,t)}function F0(e){return e instanceof Error?e:(0,nq.toJSONAST)(e.body.value)}});var dl=x(fl=>{"use strict";p();Object.defineProperty(fl,"__esModule",{value:!0});fl.getAncestorUris=CQ;fl.getAllSnippetDescendantUris=LQ;fl.getRenderedSnippetUris=qQ;var lq=Le();async function CQ(e,t){let n=[],r=new Set,i=[e];for(;i.length>0;){let s=i.shift();if(r.has(s))continue;r.add(s);let a=await t(s);for(let o of a)o.type==="direct"&&!r.has(o.source.uri)&&(n.push(o.source.uri),i.push(o.source.uri))}return n}async function LQ(e,t){let n=[],r=new Set,i=[...e];for(;i.length>0;){let s=i.shift();if(r.has(s))continue;r.add(s),n.push(s);let a=await t(s);for(let o of a)o.type==="direct"&&(0,lq.isSnippet)(o.target.uri)&&!r.has(o.target.uri)&&i.push(o.target.uri)}return n}async function qQ(e,t){return(await t(e)).filter(r=>r.type==="direct"&&(0,lq.isSnippet)(r.target.uri)).map(r=>r.target.uri)}});var Ne=x(Gt=>{"use strict";p();var IQ=Gt&&Gt.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Lr=Gt&&Gt.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&IQ(t,e,n)};Object.defineProperty(Gt,"__esModule",{value:!0});Lr(F_(),Gt);Lr(QE(),Gt);Lr(nA(),Gt);Lr(id(),Gt);Lr(z_(),Gt);Lr(G_(),Gt);Lr(K_(),Gt);Lr(wA(),Gt);Lr(Fh(),Gt);Lr(dl(),Gt)});var $0=x(Gh=>{"use strict";p();Object.defineProperty(Gh,"__esModule",{value:!0});Gh.AugmentedThemeDocset=void 0;var hl=Ne(),fq=e=>({name:e}),MQ=[["camelcase","camelize"],["handle","handleize"],["t","translate"]],RQ=e=>([t,n])=>{let r=e.find(i=>i.name===n);return r?{...r,name:t}:fq(t)},DQ=["_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"],jQ=["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"],dq=(e,t,n)=>({name:e,...t&&{access:t},...n&&{return_type:n}}),BQ=["customer_address","product_variant"],FQ=jQ.map(e=>dq(e,{global:!1,parents:[],template:[]},[{type:"string",name:""}])),VQ=e=>({name:e}),$Q=["elsif","ifchanged","when","schema"],V0=class{themeDocset;constructor(t){this.themeDocset=t}isAugmented=!0;filters=(0,hl.memo)(async()=>{let t=await this.themeDocset.filters();return[...t,...MQ.map(RQ(t)),...DQ.map(fq)]});objects=(0,hl.memo)(async()=>[...await this.themeDocset.objects(),...BQ.map(t=>dq(t)),...FQ]);liquidDrops=(0,hl.memo)(async()=>(await this.themeDocset.objects()).filter(t=>t.access?t.deprecated?!1:!t.access.global||t.access.global&&t.access.parents.length>0:!0));tags=(0,hl.memo)(async()=>[...await this.themeDocset.tags(),...$Q.map(VQ)]);systemTranslations=(0,hl.memo)(async()=>this.themeDocset.systemTranslations())};Gh.AugmentedThemeDocset=V0});var H0=x(ka=>{"use strict";p();Object.defineProperty(ka,"__esModule",{value:!0});ka.parseDocParamType=UQ;ka.parseStringLiterals=hq;ka.parseParamType=pq;ka.normalizeNamedParamType=HQ;ka.parseParamTypeSyntax=U0;function UQ(e,t){let n=hq(t);if(n)return n.length===1?n[0]:{kind:"union",types:n};let r=pq(e,t);if(!r)return;let[i,s]=r;return s?{kind:"array",valueType:i}:{kind:"named",name:i}}function hq(e){if(/[\r\n]/.test(e))return;let t=[],n=0;function r(){for(;e[n]===" "||e[n]===" ";)n++}for(;n<e.length;){r();let i=e[n];if(i!=="'"&&i!=='"')return;let s=e.indexOf(i,n+1);if(s===-1)return;if(t.push({kind:"literal",value:e.slice(n+1,s),raw:e.slice(n,s+1)}),n=s+1,r(),n===e.length)return t;if(e[n]!=="|")return;n++}}function pq(e,t){let n=U0(t);if(!(!n||!e.has(n[0])))return n}function HQ(e){let t=e.toLowerCase();return U0(t)?t:void 0}function U0(e){let t=e.match(/^([a-z_]+)(\[\])?$/);if(t)return[t[1],!!t[2]]}});var Qi=x(it=>{"use strict";p();Object.defineProperty(it,"__esModule",{value:!0});it.SupportedDocTagTypes=it.BasicParamTypes=it.parseStringLiterals=it.parseParamTypeSyntax=it.parseParamType=it.parseDocParamType=it.normalizeNamedParamType=void 0;it.getDefaultValueForType=JQ;it.inferArgumentType=z0;it.isTypeCompatible=yq;it.checkArgumentType=KQ;it.getArgumentTypeMismatchMessage=QQ;it.filePathSupportsLiquidDoc=XQ;it.getValidParamTypes=ZQ;var Sa=ue(),zQ=Ne(),WQ=Le(),GQ=Le(),Jh=H0(),pl=H0();Object.defineProperty(it,"normalizeNamedParamType",{enumerable:!0,get:function(){return pl.normalizeNamedParamType}});Object.defineProperty(it,"parseDocParamType",{enumerable:!0,get:function(){return pl.parseDocParamType}});Object.defineProperty(it,"parseParamType",{enumerable:!0,get:function(){return pl.parseParamType}});Object.defineProperty(it,"parseParamTypeSyntax",{enumerable:!0,get:function(){return pl.parseParamTypeSyntax}});Object.defineProperty(it,"parseStringLiterals",{enumerable:!0,get:function(){return pl.parseStringLiterals}});var Jt;(function(e){e.String="string",e.Number="number",e.Boolean="boolean",e.Object="object"})(Jt||(it.BasicParamTypes=Jt={}));var mq;(function(e){e.Param="param",e.Example="example",e.Description="description"})(mq||(it.SupportedDocTagTypes=mq={}));function JQ(e){let t=e?(0,Jh.parseStringLiterals)(e):void 0;if(t)return t[0].raw;switch(e?.toLowerCase()){case Jt.String:return"''";case Jt.Number:return"0";case Jt.Boolean:return"false";case Jt.Object:default:return""}}function z0(e){switch(e.type){case Sa.NodeTypes.String:return Jt.String;case Sa.NodeTypes.Number:return Jt.Number;case Sa.NodeTypes.LiquidLiteral:return Jt.Boolean;case Sa.NodeTypes.Range:case Sa.NodeTypes.VariableLookup:return Jt.Object;default:return(0,zQ.assertNever)(e)}}function yq(e,t){let n=e.toLowerCase();return n===Jt.Boolean?!0:n===t}function KQ(e,t){if(t.type===Sa.NodeTypes.VariableLookup)return{kind:"unchecked"};let n=(0,Jh.parseStringLiterals)(e);if(n)return gq(t.type===Sa.NodeTypes.String&&n.some(i=>i.value===t.value));if(t.type==="BlockArrayLiteral")return{kind:"unchecked"};let r=(0,Jh.normalizeNamedParamType)(e);return r?YQ(r)?gq(yq(r,z0(t))):{kind:"named-type",type:r}:{kind:"unchecked"}}function gq(e){return e?{kind:"compatible"}:{kind:"incompatible"}}function YQ(e){return Object.values(Jt).some(t=>t===e)}function QQ(e,t,n){if((0,Jh.parseStringLiterals)(t)){let i=n.source.slice(n.position.start,n.position.end);return`Invalid value for argument '${e}': expected ${t.trim()}, got ${i}`}let r=n.type==="BlockArrayLiteral"?"array":z0(n);return`Type mismatch for argument '${e}': expected ${t.toLowerCase()}, got ${r}`}function XQ(e){return(0,WQ.isSnippet)(e)||(0,GQ.isBlock)(e)}function ZQ(e){let t=new Map([[Jt.String,void 0],[Jt.Number,void 0],[Jt.Boolean,void 0],[Jt.Object,"A generic type used to represent any liquid object or primitive value."]]);return e.forEach(n=>t.set(n.name,n.summary||n.description)),t}});var Kh=x(W0=>{"use strict";p();Object.defineProperty(W0,"__esModule",{value:!0});W0.schemaSettingLiquidType=eX;function eX(e){switch(e){case"checkbox":return"boolean";case"number":case"range":return"number";case"color_background":case"color_palette":case"html":case"inline_richtext":case"liquid":case"radio":case"richtext":case"select":case"text":case"text_alignment":case"textarea":case"url":case"video_url":return"string";case"article":case"blog":case"collection":case"color":case"color_scheme":case"page":case"product":case"video":return e;case"font_picker":return"font";case"image_picker":return"image";case"link_list":return"linklist";case"collection_list":return"collection[]";case"product_list":return"product[]";case"article_list":return"article[]";default:return}}});var hi=x(qr=>{"use strict";p();Object.defineProperty(qr,"__esModule",{value:!0});qr.BLOCK_CONTENT_PARAMETER=void 0;qr.makeGetBlockParameters=rX;qr.resolveBlockParameters=G0;qr.liquidDocType=vq;var _q=Qi(),tX=Kh(),nX=Le();qr.BLOCK_CONTENT_PARAMETER="content";function rX({getBlockSchema:e,getDocDefinition:t}){if(!e||!t)return async()=>{};let n=new Map,r=async i=>{let[s,a]=await Promise.all([e(i),t(`blocks/${i}.liquid`)]);if(!(!s||!a))return s.validSchema instanceof Error?(0,nX.hasNoSchemaTag)(s)?G0(void 0,a):void 0:G0(s.validSchema,a)};return i=>(n.has(i)||n.set(i,r(i)),n.get(i))}function G0(e,t){let n=new Map([[qr.BLOCK_CONTENT_PARAMETER,{name:qr.BLOCK_CONTENT_PARAMETER,type:"string",required:!1}]]);for(let r of e?.settings??[])sX(r)&&n.set(r.id,{name:r.id,type:r.id===qr.BLOCK_CONTENT_PARAMETER?"string":(0,tX.schemaSettingLiquidType)(r.type),required:!1,schemaSetting:r});for(let r of t?.liquidDoc?.parameters??[])n.set(r.name,iX(n.get(r.name),r));return n}function vq(e){return e?(0,_q.normalizeNamedParamType)(e):void 0}function iX(e,t){return e?{...e,required:t.required,liquidDoc:t}:{name:t.name,type:t.type&&(0,_q.parseStringLiterals)(t.type)?t.type.trim():vq(t.type),required:t.required,liquidDoc:t}}function sX(e){return typeof e.id=="string"&&e.type!=="header"&&e.type!=="paragraph"}});function Ta(e,t){if(e===t)return!0;if(e==null||t===null||t===void 0||typeof e!=typeof t||typeof e!="object"||Array.isArray(e)!==Array.isArray(t))return!1;let n,r;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(!Ta(e[n],t[n]))return!1}else{let i=[];for(r in e)i.push(r);i.sort();let s=[];for(r in t)s.push(r);if(s.sort(),!Ta(i,s))return!1;for(n=0;n<i.length;n++)if(!Ta(e[i[n]],t[i[n]]))return!1}return!0}function It(e){return typeof e=="number"}function xn(e){return typeof e<"u"}function Jn(e){return typeof e=="boolean"}function Yh(e){return typeof e=="string"}function Ir(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var ml=Pe(()=>{p()});function aX(e,t){if(e.length<t.length)return!1;for(let n=0;n<t.length;n++)if(e[n]!==t[n])return!1;return!0}function Xi(e,t){let n=e.length-t.length;return n>0?e.lastIndexOf(t)===n:n===0?e===t:!1}function wa(e){let t="";aX(e,"(?i)")&&(e=e.substring(4),t="i");try{return new RegExp(e,t+"u")}catch{try{return new RegExp(e,t)}catch{return}}}function J0(e){let t=0;for(let n=0;n<e.length;n++){t++;let r=e.charCodeAt(n);55296<=r&&r<=56319&&n++}return t}var gl=Pe(()=>{p()});var Qh,K0,kq,Xh,He,de,pi,Sq,yl,Zh,ep,Zi,tp,Y0,Mt,Tq,wq,En,es,Kt,Q0,ec,xq,_l,X0,Z0,ek,vl,Eq,np,tk,Aq,Mr,xa,Rt,st,rp,Oq,Pq,Nq,tc,ip,nc,sp,Cq,Lq,ap,op,An,qq,cp,Iq,up,lp,fp,dp,hp,Mq,Rq,pp,Ea,Dq,jq,Bq,Fq,Vq,$q,Uq,nk,rk,Hq,zq,Wq,Gq,Jq,Kq,Yq,Qq,Xq,ik,j,sk=Pe(()=>{"use strict";p();(function(e){function t(n){return typeof n=="string"}e.is=t})(Qh||(Qh={}));(function(e){function t(n){return typeof n=="string"}e.is=t})(K0||(K0={}));(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(kq||(kq={}));(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(Xh||(Xh={}));(function(e){function t(r,i){return r===Number.MAX_VALUE&&(r=Xh.MAX_VALUE),i===Number.MAX_VALUE&&(i=Xh.MAX_VALUE),{line:r,character:i}}e.create=t;function n(r){let i=r;return j.objectLiteral(i)&&j.uinteger(i.line)&&j.uinteger(i.character)}e.is=n})(He||(He={}));(function(e){function t(r,i,s,a){if(j.uinteger(r)&&j.uinteger(i)&&j.uinteger(s)&&j.uinteger(a))return{start:He.create(r,i),end:He.create(s,a)};if(He.is(r)&&He.is(i))return{start:r,end:i};throw new Error(`Range#create called with invalid arguments[${r}, ${i}, ${s}, ${a}]`)}e.create=t;function n(r){let i=r;return j.objectLiteral(i)&&He.is(i.start)&&He.is(i.end)}e.is=n})(de||(de={}));(function(e){function t(r,i){return{uri:r,range:i}}e.create=t;function n(r){let i=r;return j.objectLiteral(i)&&de.is(i.range)&&(j.string(i.uri)||j.undefined(i.uri))}e.is=n})(pi||(pi={}));(function(e){function t(r,i,s,a){return{targetUri:r,targetRange:i,targetSelectionRange:s,originSelectionRange:a}}e.create=t;function n(r){let i=r;return j.objectLiteral(i)&&de.is(i.targetRange)&&j.string(i.targetUri)&&de.is(i.targetSelectionRange)&&(de.is(i.originSelectionRange)||j.undefined(i.originSelectionRange))}e.is=n})(Sq||(Sq={}));(function(e){function t(r,i,s,a){return{red:r,green:i,blue:s,alpha:a}}e.create=t;function n(r){let i=r;return j.objectLiteral(i)&&j.numberRange(i.red,0,1)&&j.numberRange(i.green,0,1)&&j.numberRange(i.blue,0,1)&&j.numberRange(i.alpha,0,1)}e.is=n})(yl||(yl={}));(function(e){function t(r,i){return{range:r,color:i}}e.create=t;function n(r){let i=r;return j.objectLiteral(i)&&de.is(i.range)&&yl.is(i.color)}e.is=n})(Zh||(Zh={}));(function(e){function t(r,i,s){return{label:r,textEdit:i,additionalTextEdits:s}}e.create=t;function n(r){let i=r;return j.objectLiteral(i)&&j.string(i.label)&&(j.undefined(i.textEdit)||Kt.is(i))&&(j.undefined(i.additionalTextEdits)||j.typedArray(i.additionalTextEdits,Kt.is))}e.is=n})(ep||(ep={}));(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(Zi||(Zi={}));(function(e){function t(r,i,s,a,o,c){let l={startLine:r,endLine:i};return j.defined(s)&&(l.startCharacter=s),j.defined(a)&&(l.endCharacter=a),j.defined(o)&&(l.kind=o),j.defined(c)&&(l.collapsedText=c),l}e.create=t;function n(r){let i=r;return j.objectLiteral(i)&&j.uinteger(i.startLine)&&j.uinteger(i.startLine)&&(j.undefined(i.startCharacter)||j.uinteger(i.startCharacter))&&(j.undefined(i.endCharacter)||j.uinteger(i.endCharacter))&&(j.undefined(i.kind)||j.string(i.kind))}e.is=n})(tp||(tp={}));(function(e){function t(r,i){return{location:r,message:i}}e.create=t;function n(r){let i=r;return j.defined(i)&&pi.is(i.location)&&j.string(i.message)}e.is=n})(Y0||(Y0={}));(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(Mt||(Mt={}));(function(e){e.Unnecessary=1,e.Deprecated=2})(Tq||(Tq={}));(function(e){function t(n){let r=n;return j.objectLiteral(r)&&j.string(r.href)}e.is=t})(wq||(wq={}));(function(e){function t(r,i,s,a,o,c){let l={range:r,message:i};return j.defined(s)&&(l.severity=s),j.defined(a)&&(l.code=a),j.defined(o)&&(l.source=o),j.defined(c)&&(l.relatedInformation=c),l}e.create=t;function n(r){var i;let s=r;return j.defined(s)&&de.is(s.range)&&j.string(s.message)&&(j.number(s.severity)||j.undefined(s.severity))&&(j.integer(s.code)||j.string(s.code)||j.undefined(s.code))&&(j.undefined(s.codeDescription)||j.string((i=s.codeDescription)===null||i===void 0?void 0:i.href))&&(j.string(s.source)||j.undefined(s.source))&&(j.undefined(s.relatedInformation)||j.typedArray(s.relatedInformation,Y0.is))}e.is=n})(En||(En={}));(function(e){function t(r,i,...s){let a={title:r,command:i};return j.defined(s)&&s.length>0&&(a.arguments=s),a}e.create=t;function n(r){let i=r;return j.defined(i)&&j.string(i.title)&&j.string(i.command)}e.is=n})(es||(es={}));(function(e){function t(s,a){return{range:s,newText:a}}e.replace=t;function n(s,a){return{range:{start:s,end:s},newText:a}}e.insert=n;function r(s){return{range:s,newText:""}}e.del=r;function i(s){let a=s;return j.objectLiteral(a)&&j.string(a.newText)&&de.is(a.range)}e.is=i})(Kt||(Kt={}));(function(e){function t(r,i,s){let a={label:r};return i!==void 0&&(a.needsConfirmation=i),s!==void 0&&(a.description=s),a}e.create=t;function n(r){let i=r;return j.objectLiteral(i)&&j.string(i.label)&&(j.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(j.string(i.description)||i.description===void 0)}e.is=n})(Q0||(Q0={}));(function(e){function t(n){let r=n;return j.string(r)}e.is=t})(ec||(ec={}));(function(e){function t(s,a,o){return{range:s,newText:a,annotationId:o}}e.replace=t;function n(s,a,o){return{range:{start:s,end:s},newText:a,annotationId:o}}e.insert=n;function r(s,a){return{range:s,newText:"",annotationId:a}}e.del=r;function i(s){let a=s;return Kt.is(a)&&(Q0.is(a.annotationId)||ec.is(a.annotationId))}e.is=i})(xq||(xq={}));(function(e){function t(r,i){return{textDocument:r,edits:i}}e.create=t;function n(r){let i=r;return j.defined(i)&&tk.is(i.textDocument)&&Array.isArray(i.edits)}e.is=n})(_l||(_l={}));(function(e){function t(r,i,s){let a={kind:"create",uri:r};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}e.create=t;function n(r){let i=r;return i&&i.kind==="create"&&j.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||j.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||j.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||ec.is(i.annotationId))}e.is=n})(X0||(X0={}));(function(e){function t(r,i,s,a){let o={kind:"rename",oldUri:r,newUri:i};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(o.options=s),a!==void 0&&(o.annotationId=a),o}e.create=t;function n(r){let i=r;return i&&i.kind==="rename"&&j.string(i.oldUri)&&j.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||j.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||j.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||ec.is(i.annotationId))}e.is=n})(Z0||(Z0={}));(function(e){function t(r,i,s){let a={kind:"delete",uri:r};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}e.create=t;function n(r){let i=r;return i&&i.kind==="delete"&&j.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||j.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||j.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||ec.is(i.annotationId))}e.is=n})(ek||(ek={}));(function(e){function t(n){let r=n;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(i=>j.string(i.kind)?X0.is(i)||Z0.is(i)||ek.is(i):_l.is(i)))}e.is=t})(vl||(vl={}));(function(e){function t(r){return{uri:r}}e.create=t;function n(r){let i=r;return j.defined(i)&&j.string(i.uri)}e.is=n})(Eq||(Eq={}));(function(e){function t(r,i){return{uri:r,version:i}}e.create=t;function n(r){let i=r;return j.defined(i)&&j.string(i.uri)&&j.integer(i.version)}e.is=n})(np||(np={}));(function(e){function t(r,i){return{uri:r,version:i}}e.create=t;function n(r){let i=r;return j.defined(i)&&j.string(i.uri)&&(i.version===null||j.integer(i.version))}e.is=n})(tk||(tk={}));(function(e){function t(r,i,s,a){return{uri:r,languageId:i,version:s,text:a}}e.create=t;function n(r){let i=r;return j.defined(i)&&j.string(i.uri)&&j.string(i.languageId)&&j.integer(i.version)&&j.string(i.text)}e.is=n})(Aq||(Aq={}));(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(n){let r=n;return r===e.PlainText||r===e.Markdown}e.is=t})(Mr||(Mr={}));(function(e){function t(n){let r=n;return j.objectLiteral(n)&&Mr.is(r.kind)&&j.string(r.value)}e.is=t})(xa||(xa={}));(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(Rt||(Rt={}));(function(e){e.PlainText=1,e.Snippet=2})(st||(st={}));(function(e){e.Deprecated=1})(rp||(rp={}));(function(e){function t(r,i,s){return{newText:r,insert:i,replace:s}}e.create=t;function n(r){let i=r;return i&&j.string(i.newText)&&de.is(i.insert)&&de.is(i.replace)}e.is=n})(Oq||(Oq={}));(function(e){e.asIs=1,e.adjustIndentation=2})(Pq||(Pq={}));(function(e){function t(n){let r=n;return r&&(j.string(r.detail)||r.detail===void 0)&&(j.string(r.description)||r.description===void 0)}e.is=t})(Nq||(Nq={}));(function(e){function t(n){return{label:n}}e.create=t})(tc||(tc={}));(function(e){function t(n,r){return{items:n||[],isIncomplete:!!r}}e.create=t})(ip||(ip={}));(function(e){function t(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=t;function n(r){let i=r;return j.string(i)||j.objectLiteral(i)&&j.string(i.language)&&j.string(i.value)}e.is=n})(nc||(nc={}));(function(e){function t(n){let r=n;return!!r&&j.objectLiteral(r)&&(xa.is(r.contents)||nc.is(r.contents)||j.typedArray(r.contents,nc.is))&&(n.range===void 0||de.is(n.range))}e.is=t})(sp||(sp={}));(function(e){function t(n,r){return r?{label:n,documentation:r}:{label:n}}e.create=t})(Cq||(Cq={}));(function(e){function t(n,r,...i){let s={label:n};return j.defined(r)&&(s.documentation=r),j.defined(i)?s.parameters=i:s.parameters=[],s}e.create=t})(Lq||(Lq={}));(function(e){e.Text=1,e.Read=2,e.Write=3})(ap||(ap={}));(function(e){function t(n,r){let i={range:n};return j.number(r)&&(i.kind=r),i}e.create=t})(op||(op={}));(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(An||(An={}));(function(e){e.Deprecated=1})(qq||(qq={}));(function(e){function t(n,r,i,s,a){let o={name:n,kind:r,location:{uri:s,range:i}};return a&&(o.containerName=a),o}e.create=t})(cp||(cp={}));(function(e){function t(n,r,i,s){return s!==void 0?{name:n,kind:r,location:{uri:i,range:s}}:{name:n,kind:r,location:{uri:i}}}e.create=t})(Iq||(Iq={}));(function(e){function t(r,i,s,a,o,c){let l={name:r,detail:i,kind:s,range:a,selectionRange:o};return c!==void 0&&(l.children=c),l}e.create=t;function n(r){let i=r;return i&&j.string(i.name)&&j.number(i.kind)&&de.is(i.range)&&de.is(i.selectionRange)&&(i.detail===void 0||j.string(i.detail))&&(i.deprecated===void 0||j.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}e.is=n})(up||(up={}));(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"})(lp||(lp={}));(function(e){e.Invoked=1,e.Automatic=2})(fp||(fp={}));(function(e){function t(r,i,s){let a={diagnostics:r};return i!=null&&(a.only=i),s!=null&&(a.triggerKind=s),a}e.create=t;function n(r){let i=r;return j.defined(i)&&j.typedArray(i.diagnostics,En.is)&&(i.only===void 0||j.typedArray(i.only,j.string))&&(i.triggerKind===void 0||i.triggerKind===fp.Invoked||i.triggerKind===fp.Automatic)}e.is=n})(dp||(dp={}));(function(e){function t(r,i,s){let a={title:r},o=!0;return typeof i=="string"?(o=!1,a.kind=i):es.is(i)?a.command=i:a.edit=i,o&&s!==void 0&&(a.kind=s),a}e.create=t;function n(r){let i=r;return i&&j.string(i.title)&&(i.diagnostics===void 0||j.typedArray(i.diagnostics,En.is))&&(i.kind===void 0||j.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||es.is(i.command))&&(i.isPreferred===void 0||j.boolean(i.isPreferred))&&(i.edit===void 0||vl.is(i.edit))}e.is=n})(hp||(hp={}));(function(e){function t(r,i){let s={range:r};return j.defined(i)&&(s.data=i),s}e.create=t;function n(r){let i=r;return j.defined(i)&&de.is(i.range)&&(j.undefined(i.command)||es.is(i.command))}e.is=n})(Mq||(Mq={}));(function(e){function t(r,i){return{tabSize:r,insertSpaces:i}}e.create=t;function n(r){let i=r;return j.defined(i)&&j.uinteger(i.tabSize)&&j.boolean(i.insertSpaces)}e.is=n})(Rq||(Rq={}));(function(e){function t(r,i,s){return{range:r,target:i,data:s}}e.create=t;function n(r){let i=r;return j.defined(i)&&de.is(i.range)&&(j.undefined(i.target)||j.string(i.target))}e.is=n})(pp||(pp={}));(function(e){function t(r,i){return{range:r,parent:i}}e.create=t;function n(r){let i=r;return j.objectLiteral(i)&&de.is(i.range)&&(i.parent===void 0||e.is(i.parent))}e.is=n})(Ea||(Ea={}));(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"})(Dq||(Dq={}));(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(jq||(jq={}));(function(e){function t(n){let r=n;return j.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}e.is=t})(Bq||(Bq={}));(function(e){function t(r,i){return{range:r,text:i}}e.create=t;function n(r){let i=r;return i!=null&&de.is(i.range)&&j.string(i.text)}e.is=n})(Fq||(Fq={}));(function(e){function t(r,i,s){return{range:r,variableName:i,caseSensitiveLookup:s}}e.create=t;function n(r){let i=r;return i!=null&&de.is(i.range)&&j.boolean(i.caseSensitiveLookup)&&(j.string(i.variableName)||i.variableName===void 0)}e.is=n})(Vq||(Vq={}));(function(e){function t(r,i){return{range:r,expression:i}}e.create=t;function n(r){let i=r;return i!=null&&de.is(i.range)&&(j.string(i.expression)||i.expression===void 0)}e.is=n})($q||($q={}));(function(e){function t(r,i){return{frameId:r,stoppedLocation:i}}e.create=t;function n(r){let i=r;return j.defined(i)&&de.is(r.stoppedLocation)}e.is=n})(Uq||(Uq={}));(function(e){e.Type=1,e.Parameter=2;function t(n){return n===1||n===2}e.is=t})(nk||(nk={}));(function(e){function t(r){return{value:r}}e.create=t;function n(r){let i=r;return j.objectLiteral(i)&&(i.tooltip===void 0||j.string(i.tooltip)||xa.is(i.tooltip))&&(i.location===void 0||pi.is(i.location))&&(i.command===void 0||es.is(i.command))}e.is=n})(rk||(rk={}));(function(e){function t(r,i,s){let a={position:r,label:i};return s!==void 0&&(a.kind=s),a}e.create=t;function n(r){let i=r;return j.objectLiteral(i)&&He.is(i.position)&&(j.string(i.label)||j.typedArray(i.label,rk.is))&&(i.kind===void 0||nk.is(i.kind))&&i.textEdits===void 0||j.typedArray(i.textEdits,Kt.is)&&(i.tooltip===void 0||j.string(i.tooltip)||xa.is(i.tooltip))&&(i.paddingLeft===void 0||j.boolean(i.paddingLeft))&&(i.paddingRight===void 0||j.boolean(i.paddingRight))}e.is=n})(Hq||(Hq={}));(function(e){function t(n){return{kind:"snippet",value:n}}e.createSnippet=t})(zq||(zq={}));(function(e){function t(n,r,i,s){return{insertText:n,filterText:r,range:i,command:s}}e.create=t})(Wq||(Wq={}));(function(e){function t(n){return{items:n}}e.create=t})(Gq||(Gq={}));(function(e){e.Invoked=0,e.Automatic=1})(Jq||(Jq={}));(function(e){function t(n,r){return{range:n,text:r}}e.create=t})(Kq||(Kq={}));(function(e){function t(n,r){return{triggerKind:n,selectedCompletionInfo:r}}e.create=t})(Yq||(Yq={}));(function(e){function t(n){let r=n;return j.objectLiteral(r)&&K0.is(r.uri)&&j.string(r.name)}e.is=t})(Qq||(Qq={}));(function(e){function t(s,a,o,c){return new ik(s,a,o,c)}e.create=t;function n(s){let a=s;return!!(j.defined(a)&&j.string(a.uri)&&(j.undefined(a.languageId)||j.string(a.languageId))&&j.uinteger(a.lineCount)&&j.func(a.getText)&&j.func(a.positionAt)&&j.func(a.offsetAt))}e.is=n;function r(s,a){let o=s.getText(),c=i(a,(f,h)=>{let d=f.range.start.line-h.range.start.line;return d===0?f.range.start.character-h.range.start.character:d}),l=o.length;for(let f=c.length-1;f>=0;f--){let h=c[f],d=s.offsetAt(h.range.start),g=s.offsetAt(h.range.end);if(g<=l)o=o.substring(0,d)+h.newText+o.substring(g,o.length);else throw new Error("Overlapping edit");l=d}return o}e.applyEdits=r;function i(s,a){if(s.length<=1)return s;let o=s.length/2|0,c=s.slice(0,o),l=s.slice(o);i(c,a),i(l,a);let f=0,h=0,d=0;for(;f<c.length&&h<l.length;)a(c[f],l[h])<=0?s[d++]=c[f++]:s[d++]=l[h++];for(;f<c.length;)s[d++]=c[f++];for(;h<l.length;)s[d++]=l[h++];return s}})(Xq||(Xq={}));ik=class{constructor(t,n,r,i){this._uri=t,this._languageId=n,this._version=r,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){let n=this.offsetAt(t.start),r=this.offsetAt(t.end);return this._content.substring(n,r)}return this._content}update(t,n){this._content=t.text,this._version=n,this._lineOffsets=void 0}getLineOffsets(){if(this._lineOffsets===void 0){let t=[],n=this._content,r=!0;for(let i=0;i<n.length;i++){r&&(t.push(i),r=!1);let s=n.charAt(i);r=s==="\r"||s===`
|
|
67
|
+
`,s==="\r"&&i+1<n.length&&n.charAt(i+1)===`
|
|
68
|
+
`&&i++}r&&n.length>0&&t.push(n.length),this._lineOffsets=t}return this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let n=this.getLineOffsets(),r=0,i=n.length;if(i===0)return He.create(0,t);for(;r<i;){let a=Math.floor((r+i)/2);n[a]>t?i=a:r=a+1}let s=r-1;return He.create(s,t-n[s])}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line],i=t.line+1<n.length?n[t.line+1]:this._content.length;return Math.max(Math.min(r+t.character,i),r)}get lineCount(){return this.getLineOffsets().length}};(function(e){let t=Object.prototype.toString;function n(g){return typeof g<"u"}e.defined=n;function r(g){return typeof g>"u"}e.undefined=r;function i(g){return g===!0||g===!1}e.boolean=i;function s(g){return t.call(g)==="[object String]"}e.string=s;function a(g){return t.call(g)==="[object Number]"}e.number=a;function o(g,v,b){return t.call(g)==="[object Number]"&&v<=g&&g<=b}e.numberRange=o;function c(g){return t.call(g)==="[object Number]"&&-2147483648<=g&&g<=2147483647}e.integer=c;function l(g){return t.call(g)==="[object Number]"&&0<=g&&g<=2147483647}e.uinteger=l;function f(g){return t.call(g)==="[object Function]"}e.func=f;function h(g){return g!==null&&typeof g=="object"}e.objectLiteral=h;function d(g,v){return Array.isArray(g)&&g.every(v)}e.typedArray=d})(j||(j={}))});var cX={};D_(cX,{TextDocument:()=>un});function ak(e,t){if(e.length<=1)return e;let n=e.length/2|0,r=e.slice(0,n),i=e.slice(n);ak(r,t),ak(i,t);let s=0,a=0,o=0;for(;s<r.length&&a<i.length;)t(r[s],i[a])<=0?e[o++]=r[s++]:e[o++]=i[a++];for(;s<r.length;)e[o++]=r[s++];for(;a<i.length;)e[o++]=i[a++];return e}function Zq(e,t,n=0){let r=t?[n]:[];for(let i=0;i<e.length;i++){let s=e.charCodeAt(i);eI(s)&&(s===13&&i+1<e.length&&e.charCodeAt(i+1)===10&&i++,r.push(n+i+1))}return r}function eI(e){return e===13||e===10}function tI(e){let t=e.start,n=e.end;return t.line>n.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function oX(e){let t=tI(e.range);return t!==e.range?{newText:e.newText,range:t}:e}var mp,un,nI=Pe(()=>{"use strict";p();mp=class e{constructor(t,n,r,i){this._uri=t,this._languageId=n,this._version=r,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){let n=this.offsetAt(t.start),r=this.offsetAt(t.end);return this._content.substring(n,r)}return this._content}update(t,n){for(let r of t)if(e.isIncremental(r)){let i=tI(r.range),s=this.offsetAt(i.start),a=this.offsetAt(i.end);this._content=this._content.substring(0,s)+r.text+this._content.substring(a,this._content.length);let o=Math.max(i.start.line,0),c=Math.max(i.end.line,0),l=this._lineOffsets,f=Zq(r.text,!1,s);if(c-o===f.length)for(let d=0,g=f.length;d<g;d++)l[d+o+1]=f[d];else f.length<1e4?l.splice(o+1,c-o,...f):this._lineOffsets=l=l.slice(0,o+1).concat(f,l.slice(c+1));let h=r.text.length-(a-s);if(h!==0)for(let d=o+1+f.length,g=l.length;d<g;d++)l[d]=l[d]+h}else if(e.isFull(r))this._content=r.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received");this._version=n}getLineOffsets(){return this._lineOffsets===void 0&&(this._lineOffsets=Zq(this._content,!0)),this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let n=this.getLineOffsets(),r=0,i=n.length;if(i===0)return{line:0,character:t};for(;r<i;){let a=Math.floor((r+i)/2);n[a]>t?i=a:r=a+1}let s=r-1;return t=this.ensureBeforeEOL(t,n[s]),{line:s,character:t-n[s]}}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line];if(t.character<=0)return r;let i=t.line+1<n.length?n[t.line+1]:this._content.length,s=Math.min(r+t.character,i);return this.ensureBeforeEOL(s,r)}ensureBeforeEOL(t,n){for(;t>n&&eI(this._content.charCodeAt(t-1));)t--;return t}get lineCount(){return this.getLineOffsets().length}static isIncremental(t){let n=t;return n!=null&&typeof n.text=="string"&&n.range!==void 0&&(n.rangeLength===void 0||typeof n.rangeLength=="number")}static isFull(t){let n=t;return n!=null&&typeof n.text=="string"&&n.range===void 0&&n.rangeLength===void 0}};(function(e){function t(i,s,a,o){return new mp(i,s,a,o)}e.create=t;function n(i,s,a){if(i instanceof mp)return i.update(s,a),i;throw new Error("TextDocument.update: document must be created by TextDocument.create")}e.update=n;function r(i,s){let a=i.getText(),o=ak(s.map(oX),(f,h)=>{let d=f.range.start.line-h.range.start.line;return d===0?f.range.start.character-h.range.start.character:d}),c=0,l=[];for(let f of o){let h=i.offsetAt(f.range.start);if(h<c)throw new Error("Overlapping edit");h>c&&l.push(a.substring(c,h)),f.newText.length&&l.push(f.newText),c=i.offsetAt(f.range.end)}return l.push(a.substr(c)),l.join("")}e.applyEdits=r})(un||(un={}))});function uX(e){return e>=_e.SchemaResolveError}var _e,en,ok,On=Pe(()=>{p();sk();nI();(function(e){e[e.Undefined=0]="Undefined",e[e.EnumValueMismatch=1]="EnumValueMismatch",e[e.Deprecated=2]="Deprecated",e[e.UnexpectedEndOfComment=257]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=258]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=259]="UnexpectedEndOfNumber",e[e.InvalidUnicode=260]="InvalidUnicode",e[e.InvalidEscapeCharacter=261]="InvalidEscapeCharacter",e[e.InvalidCharacter=262]="InvalidCharacter",e[e.PropertyExpected=513]="PropertyExpected",e[e.CommaExpected=514]="CommaExpected",e[e.ColonExpected=515]="ColonExpected",e[e.ValueExpected=516]="ValueExpected",e[e.CommaOrCloseBacketExpected=517]="CommaOrCloseBacketExpected",e[e.CommaOrCloseBraceExpected=518]="CommaOrCloseBraceExpected",e[e.TrailingComma=519]="TrailingComma",e[e.DuplicateKey=520]="DuplicateKey",e[e.CommentNotPermitted=521]="CommentNotPermitted",e[e.PropertyKeysMustBeDoublequoted=528]="PropertyKeysMustBeDoublequoted",e[e.SchemaUnsupportedFeature=769]="SchemaUnsupportedFeature",e[e.SchemaResolveError=65536]="SchemaResolveError"})(_e||(_e={}));(function(e){e[e.v3=3]="v3",e[e.v4=4]="v4",e[e.v6=6]="v6",e[e.v7=7]="v7",e[e.v2019_09=19]="v2019_09",e[e.v2020_12=20]="v2020_12"})(en||(en={}));(function(e){e.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[Mr.Markdown,Mr.PlainText],commitCharactersSupport:!0,labelDetailsSupport:!0}}}}})(ok||(ok={}))});var rI,rc,W1e,ck=Pe(()=>{p();(()=>{"use strict";var e={975:C=>{function q(I){if(typeof I!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(I))}function V(I,B){for(var U,K="",Q=0,Y=-1,ge=0,z=0;z<=I.length;++z){if(z<I.length)U=I.charCodeAt(z);else{if(U===47)break;U=47}if(U===47){if(!(Y===z-1||ge===1))if(Y!==z-1&&ge===2){if(K.length<2||Q!==2||K.charCodeAt(K.length-1)!==46||K.charCodeAt(K.length-2)!==46){if(K.length>2){var he=K.lastIndexOf("/");if(he!==K.length-1){he===-1?(K="",Q=0):Q=(K=K.slice(0,he)).length-1-K.lastIndexOf("/"),Y=z,ge=0;continue}}else if(K.length===2||K.length===1){K="",Q=0,Y=z,ge=0;continue}}B&&(K.length>0?K+="/..":K="..",Q=2)}else K.length>0?K+="/"+I.slice(Y+1,z):K=I.slice(Y+1,z),Q=z-Y-1;Y=z,ge=0}else U===46&&ge!==-1?++ge:ge=-1}return K}var $={resolve:function(){for(var I,B="",U=!1,K=arguments.length-1;K>=-1&&!U;K--){var Q;K>=0?Q=arguments[K]:(I===void 0&&(I=process.cwd()),Q=I),q(Q),Q.length!==0&&(B=Q+"/"+B,U=Q.charCodeAt(0)===47)}return B=V(B,!U),U?B.length>0?"/"+B:"/":B.length>0?B:"."},normalize:function(I){if(q(I),I.length===0)return".";var B=I.charCodeAt(0)===47,U=I.charCodeAt(I.length-1)===47;return(I=V(I,!B)).length!==0||B||(I="."),I.length>0&&U&&(I+="/"),B?"/"+I:I},isAbsolute:function(I){return q(I),I.length>0&&I.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var I,B=0;B<arguments.length;++B){var U=arguments[B];q(U),U.length>0&&(I===void 0?I=U:I+="/"+U)}return I===void 0?".":$.normalize(I)},relative:function(I,B){if(q(I),q(B),I===B||(I=$.resolve(I))===(B=$.resolve(B)))return"";for(var U=1;U<I.length&&I.charCodeAt(U)===47;++U);for(var K=I.length,Q=K-U,Y=1;Y<B.length&&B.charCodeAt(Y)===47;++Y);for(var ge=B.length-Y,z=Q<ge?Q:ge,he=-1,me=0;me<=z;++me){if(me===z){if(ge>z){if(B.charCodeAt(Y+me)===47)return B.slice(Y+me+1);if(me===0)return B.slice(Y+me)}else Q>z&&(I.charCodeAt(U+me)===47?he=me:me===0&&(he=0));break}var gn=I.charCodeAt(U+me);if(gn!==B.charCodeAt(Y+me))break;gn===47&&(he=me)}var Qr="";for(me=U+he+1;me<=K;++me)me!==K&&I.charCodeAt(me)!==47||(Qr.length===0?Qr+="..":Qr+="/..");return Qr.length>0?Qr+B.slice(Y+he):(Y+=he,B.charCodeAt(Y)===47&&++Y,B.slice(Y))},_makeLong:function(I){return I},dirname:function(I){if(q(I),I.length===0)return".";for(var B=I.charCodeAt(0),U=B===47,K=-1,Q=!0,Y=I.length-1;Y>=1;--Y)if((B=I.charCodeAt(Y))===47){if(!Q){K=Y;break}}else Q=!1;return K===-1?U?"/":".":U&&K===1?"//":I.slice(0,K)},basename:function(I,B){if(B!==void 0&&typeof B!="string")throw new TypeError('"ext" argument must be a string');q(I);var U,K=0,Q=-1,Y=!0;if(B!==void 0&&B.length>0&&B.length<=I.length){if(B.length===I.length&&B===I)return"";var ge=B.length-1,z=-1;for(U=I.length-1;U>=0;--U){var he=I.charCodeAt(U);if(he===47){if(!Y){K=U+1;break}}else z===-1&&(Y=!1,z=U+1),ge>=0&&(he===B.charCodeAt(ge)?--ge==-1&&(Q=U):(ge=-1,Q=z))}return K===Q?Q=z:Q===-1&&(Q=I.length),I.slice(K,Q)}for(U=I.length-1;U>=0;--U)if(I.charCodeAt(U)===47){if(!Y){K=U+1;break}}else Q===-1&&(Y=!1,Q=U+1);return Q===-1?"":I.slice(K,Q)},extname:function(I){q(I);for(var B=-1,U=0,K=-1,Q=!0,Y=0,ge=I.length-1;ge>=0;--ge){var z=I.charCodeAt(ge);if(z!==47)K===-1&&(Q=!1,K=ge+1),z===46?B===-1?B=ge:Y!==1&&(Y=1):B!==-1&&(Y=-1);else if(!Q){U=ge+1;break}}return B===-1||K===-1||Y===0||Y===1&&B===K-1&&B===U+1?"":I.slice(B,K)},format:function(I){if(I===null||typeof I!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof I);return(function(B,U){var K=U.dir||U.root,Q=U.base||(U.name||"")+(U.ext||"");return K?K===U.root?K+Q:K+"/"+Q:Q})(0,I)},parse:function(I){q(I);var B={root:"",dir:"",base:"",ext:"",name:""};if(I.length===0)return B;var U,K=I.charCodeAt(0),Q=K===47;Q?(B.root="/",U=1):U=0;for(var Y=-1,ge=0,z=-1,he=!0,me=I.length-1,gn=0;me>=U;--me)if((K=I.charCodeAt(me))!==47)z===-1&&(he=!1,z=me+1),K===46?Y===-1?Y=me:gn!==1&&(gn=1):Y!==-1&&(gn=-1);else if(!he){ge=me+1;break}return Y===-1||z===-1||gn===0||gn===1&&Y===z-1&&Y===ge+1?z!==-1&&(B.base=B.name=ge===0&&Q?I.slice(1,z):I.slice(ge,z)):(ge===0&&Q?(B.name=I.slice(1,Y),B.base=I.slice(1,z)):(B.name=I.slice(ge,Y),B.base=I.slice(ge,z)),B.ext=I.slice(Y,z)),ge>0?B.dir=I.slice(0,ge-1):Q&&(B.dir="/"),B},sep:"/",delimiter:":",win32:null,posix:null};$.posix=$,C.exports=$}},t={};function n(C){var q=t[C];if(q!==void 0)return q.exports;var V=t[C]={exports:{}};return e[C](V,V.exports,n),V.exports}n.d=(C,q)=>{for(var V in q)n.o(q,V)&&!n.o(C,V)&&Object.defineProperty(C,V,{enumerable:!0,get:q[V]})},n.o=(C,q)=>Object.prototype.hasOwnProperty.call(C,q),n.r=C=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(C,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(C,"__esModule",{value:!0})};var r={};let i;n.r(r),n.d(r,{URI:()=>d,Utils:()=>M}),typeof process=="object"?i=process.platform==="win32":typeof navigator=="object"&&(i=navigator.userAgent.indexOf("Windows")>=0);let s=/^\w[\w\d+.-]*$/,a=/^\//,o=/^\/\//;function c(C,q){if(!C.scheme&&q)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${C.authority}", path: "${C.path}", query: "${C.query}", fragment: "${C.fragment}"}`);if(C.scheme&&!s.test(C.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(C.path){if(C.authority){if(!a.test(C.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(C.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 d{static isUri(q){return q instanceof d||!!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,V,$,I,B,U=!1){typeof q=="object"?(this.scheme=q.scheme||l,this.authority=q.authority||l,this.path=q.path||l,this.query=q.query||l,this.fragment=q.fragment||l):(this.scheme=(function(K,Q){return K||Q?K:"file"})(q,U),this.authority=V||l,this.path=(function(K,Q){switch(K){case"https":case"http":case"file":Q?Q[0]!==f&&(Q=f+Q):Q=f}return Q})(this.scheme,$||l),this.query=I||l,this.fragment=B||l,c(this,U))}get fsPath(){return T(this,!1)}with(q){if(!q)return this;let{scheme:V,authority:$,path:I,query:B,fragment:U}=q;return V===void 0?V=this.scheme:V===null&&(V=l),$===void 0?$=this.authority:$===null&&($=l),I===void 0?I=this.path:I===null&&(I=l),B===void 0?B=this.query:B===null&&(B=l),U===void 0?U=this.fragment:U===null&&(U=l),V===this.scheme&&$===this.authority&&I===this.path&&B===this.query&&U===this.fragment?this:new v(V,$,I,B,U)}static parse(q,V=!1){let $=h.exec(q);return $?new v($[2]||l,P($[4]||l),P($[5]||l),P($[7]||l),P($[9]||l),V):new v(l,l,l,l,l)}static file(q){let V=l;if(i&&(q=q.replace(/\\/g,f)),q[0]===f&&q[1]===f){let $=q.indexOf(f,2);$===-1?(V=q.substring(2),q=f):(V=q.substring(2,$),q=q.substring($)||f)}return new v("file",V,q,l,l)}static from(q){let V=new v(q.scheme,q.authority,q.path,q.query,q.fragment);return c(V,!0),V}toString(q=!1){return w(this,q)}toJSON(){return this}static revive(q){if(q){if(q instanceof d)return q;{let V=new v(q);return V._formatted=q.external,V._fsPath=q._sep===g?q.fsPath:null,V}}return q}}let g=i?1:void 0;class v extends d{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=T(this,!1)),this._fsPath}toString(q=!1){return q?w(this,!0):(this._formatted||(this._formatted=w(this,!1)),this._formatted)}toJSON(){let q={$mid:1};return this._fsPath&&(q.fsPath=this._fsPath,q._sep=g),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 b={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 _(C,q,V){let $,I=-1;for(let B=0;B<C.length;B++){let U=C.charCodeAt(B);if(U>=97&&U<=122||U>=65&&U<=90||U>=48&&U<=57||U===45||U===46||U===95||U===126||q&&U===47||V&&U===91||V&&U===93||V&&U===58)I!==-1&&($+=encodeURIComponent(C.substring(I,B)),I=-1),$!==void 0&&($+=C.charAt(B));else{$===void 0&&($=C.substr(0,B));let K=b[U];K!==void 0?(I!==-1&&($+=encodeURIComponent(C.substring(I,B)),I=-1),$+=K):I===-1&&(I=B)}}return I!==-1&&($+=encodeURIComponent(C.substring(I))),$!==void 0?$:C}function k(C){let q;for(let V=0;V<C.length;V++){let $=C.charCodeAt(V);$===35||$===63?(q===void 0&&(q=C.substr(0,V)),q+=b[$]):q!==void 0&&(q+=C[V])}return q!==void 0?q:C}function T(C,q){let V;return V=C.authority&&C.path.length>1&&C.scheme==="file"?`//${C.authority}${C.path}`:C.path.charCodeAt(0)===47&&(C.path.charCodeAt(1)>=65&&C.path.charCodeAt(1)<=90||C.path.charCodeAt(1)>=97&&C.path.charCodeAt(1)<=122)&&C.path.charCodeAt(2)===58?q?C.path.substr(1):C.path[1].toLowerCase()+C.path.substr(2):C.path,i&&(V=V.replace(/\//g,"\\")),V}function w(C,q){let V=q?k:_,$="",{scheme:I,authority:B,path:U,query:K,fragment:Q}=C;if(I&&($+=I,$+=":"),(B||I==="file")&&($+=f,$+=f),B){let Y=B.indexOf("@");if(Y!==-1){let ge=B.substr(0,Y);B=B.substr(Y+1),Y=ge.lastIndexOf(":"),Y===-1?$+=V(ge,!1,!1):($+=V(ge.substr(0,Y),!1,!1),$+=":",$+=V(ge.substr(Y+1),!1,!0)),$+="@"}B=B.toLowerCase(),Y=B.lastIndexOf(":"),Y===-1?$+=V(B,!1,!0):($+=V(B.substr(0,Y),!1,!0),$+=B.substr(Y))}if(U){if(U.length>=3&&U.charCodeAt(0)===47&&U.charCodeAt(2)===58){let Y=U.charCodeAt(1);Y>=65&&Y<=90&&(U=`/${String.fromCharCode(Y+32)}:${U.substr(3)}`)}else if(U.length>=2&&U.charCodeAt(1)===58){let Y=U.charCodeAt(0);Y>=65&&Y<=90&&(U=`${String.fromCharCode(Y+32)}:${U.substr(2)}`)}$+=V(U,!0,!1)}return K&&($+="?",$+=V(K,!1,!1)),Q&&($+="#",$+=q?Q:_(Q,!1,!1)),$}function y(C){try{return decodeURIComponent(C)}catch{return C.length>3?C.substr(0,3)+y(C.substr(3)):C}}let A=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function P(C){return C.match(A)?C.replace(A,(q=>y(q))):C}var O=n(975);let L=O.posix||O,D="/";var M;(function(C){C.joinPath=function(q,...V){return q.with({path:L.join(q.path,...V)})},C.resolvePath=function(q,...V){let $=q.path,I=!1;$[0]!==D&&($=D+$,I=!0);let B=L.resolve($,...V);return I&&B[0]===D&&!q.authority&&(B=B.substring(1)),q.with({path:B})},C.dirname=function(q){if(q.path.length===0||q.path===D)return q;let V=L.dirname(q.path);return V.length===1&&V.charCodeAt(0)===46&&(V=""),q.with({path:V})},C.basename=function(q){return L.basename(q.path)},C.extname=function(q){return L.extname(q.path)}})(M||(M={})),rI=r})();({URI:rc,Utils:W1e}=rI)});var Aa=x((K1e,oI)=>{"use strict";p();var uk=Object.defineProperty,lX=Object.getOwnPropertyDescriptor,fX=Object.getOwnPropertyNames,dX=Object.prototype.hasOwnProperty,hX=(e,t)=>{for(var n in t)uk(e,n,{get:t[n],enumerable:!0})},pX=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of fX(t))!dX.call(e,i)&&i!==n&&uk(e,i,{get:()=>t[i],enumerable:!(r=lX(t,i))||r.enumerable});return e},mX=e=>pX(uk({},"__esModule",{value:!0}),e),sI={};hX(sI,{config:()=>bX,t:()=>aI});oI.exports=mX(sI);var gX=ce("fs"),yX=ce("fs/promises");async function _X(e){if(e.protocol==="file:")return await(0,yX.readFile)(e,"utf8");if(e.protocol==="http:"||e.protocol==="https:"){let t=await fetch(e.toString(),{headers:{"Accept-Encoding":"gzip, deflate",Accept:"application/json"},redirect:"follow"});if(!t.ok){let r=`Unexpected ${t.status} response while trying to read ${e}`;try{r+=`: ${await t.text()}`}catch{}throw new Error(r)}return await t.text()}throw new Error("Unsupported protocol")}function vX(e){return(0,gX.readFileSync)(e,"utf8")}var bl;function bX(e){if("contents"in e){typeof e.contents=="string"?bl=JSON.parse(e.contents):bl=e.contents;return}if("fsPath"in e){let t=vX(e.fsPath),n=JSON.parse(t);bl=iI(n)?n.contents.bundle:n;return}if(e.uri){let t=e.uri;return typeof e.uri=="string"&&(t=new URL(e.uri)),new Promise((n,r)=>{_X(t).then(i=>{try{let s=JSON.parse(i);bl=iI(s)?s.contents.bundle:s,n()}catch(s){r(s)}}).catch(i=>{r(i)})})}}function aI(...e){let t=e[0],n,r,i;if(typeof t=="string")n=t,r=t,e.splice(0,1),i=!e||typeof e[0]!="object"?e:e[0];else if(t instanceof Array){let a=e.slice(1);if(t.length!==a.length+1)throw new Error("expected a string as the first argument to l10n.t");let o=t[0];for(let c=1;c<t.length;c++)o+=`{${c-1}}`+t[c];return aI(o,...a)}else r=t.message,n=r,t.comment&&t.comment.length>0&&(n+=`/${Array.isArray(t.comment)?t.comment.join(""):t.comment}`),i=t.args??{};let s=bl?.[n];return s?typeof s=="string"?gp(s,i):s.comment?gp(s.message,i):gp(r,i):gp(r,i)}var kX=/{([^}]+)}/g;function gp(e,t){return Object.keys(t).length===0?e:e.replace(kX,(n,r)=>t[r]??n)}function iI(e){return typeof e?.contents?.bundle=="object"&&typeof e?.version=="string"}});function Dt(e){return Jn(e)?e?{}:{not:{}}:e}function gi(e){e.startsWith(uI)&&(e=TX+e.substring(uI.length));try{return rc.parse(e).toString(!0)}catch{return e}}function gk(e){return wX[gi(e)]??void 0}function fI(e,t=[],n=[]){return new vp(e,t,n)}function Rr(e){return cv(e)}function Sl(e){return ov(e)}function yk(e,t,n=!1){return t>=e.offset&&t<e.offset+e.length||n&&t===e.offset+e.length}function lI(e,t=en.v2020_12){let n=e.$schema;return n?gk(n)??t:t}function xt(e,t,n,r,i){if(!e||!r.include(e))return;if(e.type==="property")return xt(e.valueNode,t,n,r,i);let s=e;switch(a(),s.type){case"object":h(s);break;case"array":f(s);break;case"string":l(s);break;case"number":c(s);break}r.add({node:s,schema:t});function a(){function d(w){return s.type===w||w==="integer"&&s.type==="number"&&s.isInteger}if(Array.isArray(t.type)?t.type.some(d)||n.problems.push({location:{offset:s.offset,length:s.length},message:t.errorMessage||te.t("Incorrect type. Expected one of {0}.",t.type.join(", "))}):t.type&&(d(t.type)||n.problems.push({location:{offset:s.offset,length:s.length},message:t.errorMessage||te.t('Incorrect type. Expected "{0}".',t.type)})),Array.isArray(t.allOf))for(let w of t.allOf){let y=new Et,A=r.newSub();xt(s,Dt(w),y,A,i),n.merge(y),r.merge(A)}let g=Dt(t.not);if(g){let w=new Et,y=r.newSub();xt(s,g,w,y,i),w.hasProblems()||n.problems.push({location:{offset:s.offset,length:s.length},message:t.errorMessage||te.t("Matches a schema that is not allowed.")});for(let A of y.schemas)A.inverted=!A.inverted,r.add(A)}let v=(w,y)=>{let A=[],P=o(w)??w,O;for(let L of P){let D=Dt(L),M=new Et,C=r.newSub();if(xt(s,D,M,C,i),M.hasProblems()||A.push(D),!O)O={schema:D,validationResult:M,matchingSchemas:C};else if(!y&&!M.hasProblems()&&!O.validationResult.hasProblems())O.matchingSchemas.merge(C),O.validationResult.propertiesMatches+=M.propertiesMatches,O.validationResult.propertiesValueMatches+=M.propertiesValueMatches,O.validationResult.mergeProcessedProperties(M);else{let q=M.compare(O.validationResult);q>0?O={schema:D,validationResult:M,matchingSchemas:C}:q===0&&(O.matchingSchemas.merge(C),O.validationResult.mergeEnumValues(M))}}return A.length>1&&y&&n.problems.push({location:{offset:s.offset,length:1},message:te.t("Matches multiple schemas when only one must validate.")}),O&&(O.validationResult.updateEnumMismatchProblemMessages(),n.merge(O.validationResult),r.merge(O.matchingSchemas)),A.length};Array.isArray(t.anyOf)&&v(t.anyOf,!1),Array.isArray(t.oneOf)&&v(t.oneOf,!0);let b=w=>{let y=new Et,A=r.newSub();xt(s,Dt(w),y,A,i),n.merge(y),r.merge(A)},_=(w,y,A)=>{let P=Dt(w),O=new Et,L=r.newSub();xt(s,P,O,L,i),r.merge(L),n.mergeProcessedProperties(O),O.hasProblems()?A&&b(A):y&&b(y)},k=Dt(t.if);if(k&&_(k,Dt(t.then),Dt(t.else)),Array.isArray(t.enum)){let w=Rr(s),y=!1;for(let A of t.enum)if(Ta(w,A)){y=!0;break}n.enumValues=t.enum,n.enumValueMatch=y,y||n.problems.push({location:{offset:s.offset,length:s.length},code:_e.EnumValueMismatch,message:t.errorMessage||te.t("Value is not accepted. Valid values: {0}.",t.enum.map(A=>JSON.stringify(A)).join(", "))})}if(xn(t.const)){let w=Rr(s);Ta(w,t.const)?n.enumValueMatch=!0:(n.problems.push({location:{offset:s.offset,length:s.length},code:_e.EnumValueMismatch,message:t.errorMessage||te.t("Value must be {0}.",JSON.stringify(t.const))}),n.enumValueMatch=!1),n.enumValues=[t.const]}let T=t.deprecationMessage;if(T||t.deprecated){T=T||te.t("Value is deprecated");let w=s.parent?.type==="property"?s.parent:s;n.problems.push({location:{offset:w.offset,length:w.length},severity:Mt.Warning,message:T,code:_e.Deprecated})}}function o(d){if(d.length<2)return;let g=b=>{let _=new Map;for(let k=0;k<d.length;k++){let T=b(Dt(d[k]),k);if(!T)return;T.forEach(([w,y])=>{if(y.const!==void 0){_.has(w)||_.set(w,new Map);let A=_.get(w);A.has(y.const)||A.set(y.const,[]),A.get(y.const).push(k)}})}return _},v=(b,_)=>{for(let[k,T]of b){let w=new Set;if(T.forEach(y=>y.forEach(A=>w.add(A))),w.size===d.length){let y=_(k),A=T.get(y);if(A?.length)return A.map(P=>d[P]);break}}};if(s.type==="object"&&s.properties?.length){let b=g(_=>_.properties?Object.entries(_.properties).map(([k,T])=>[k,Dt(T)]):void 0);if(b)return v(b,_=>{let k=s.properties.find(T=>T.keyNode.value===_);return k?.valueNode?.type==="string"?k.valueNode.value:void 0})}else if(s.type==="array"&&s.items?.length){let b=g(_=>{let k=_.prefixItems||(Array.isArray(_.items)?_.items:void 0);return k?k.map((T,w)=>[w,Dt(T)]):void 0});if(b)return v(b,_=>{let k=s.items[_];return k?.type==="string"?k.value:void 0})}}function c(d){let g=d.value;function v(A){let P=/^(-?\d+)(?:\.(\d+))?(?:e([-+]\d+))?$/.exec(A.toString());return P&&{value:Number(P[1]+(P[2]||"")),multiplier:(P[2]?.length||0)-(parseInt(P[3])||0)}}if(It(t.multipleOf)){let A=-1;if(Number.isInteger(t.multipleOf))A=g%t.multipleOf;else{let P=v(t.multipleOf),O=v(g);if(P&&O){let L=10**Math.abs(O.multiplier-P.multiplier);O.multiplier<P.multiplier?O.value*=L:P.value*=L,A=O.value%P.value}}A!==0&&n.problems.push({location:{offset:d.offset,length:d.length},message:te.t("Value is not divisible by {0}.",t.multipleOf)})}function b(A,P){if(It(P))return P;if(Jn(P)&&P)return A}function _(A,P){if(!Jn(P)||!P)return A}let k=b(t.minimum,t.exclusiveMinimum);It(k)&&g<=k&&n.problems.push({location:{offset:d.offset,length:d.length},message:te.t("Value is below the exclusive minimum of {0}.",k)});let T=b(t.maximum,t.exclusiveMaximum);It(T)&&g>=T&&n.problems.push({location:{offset:d.offset,length:d.length},message:te.t("Value is above the exclusive maximum of {0}.",T)});let w=_(t.minimum,t.exclusiveMinimum);It(w)&&g<w&&n.problems.push({location:{offset:d.offset,length:d.length},message:te.t("Value is below the minimum of {0}.",w)});let y=_(t.maximum,t.exclusiveMaximum);It(y)&&g>y&&n.problems.push({location:{offset:d.offset,length:d.length},message:te.t("Value is above the maximum of {0}.",y)})}function l(d){if(It(t.minLength)&&J0(d.value)<t.minLength&&n.problems.push({location:{offset:d.offset,length:d.length},message:te.t("String is shorter than the minimum length of {0}.",t.minLength)}),It(t.maxLength)&&J0(d.value)>t.maxLength&&n.problems.push({location:{offset:d.offset,length:d.length},message:te.t("String is longer than the maximum length of {0}.",t.maxLength)}),Yh(t.pattern)){let g=wa(t.pattern);g&&!g.test(d.value)&&n.problems.push({location:{offset:d.offset,length:d.length},message:t.patternErrorMessage||t.errorMessage||te.t('String does not match the pattern of "{0}".',t.pattern)})}if(t.format)switch(t.format){case"uri":case"uri-reference":{let v;if(!d.value)v=te.t("URI expected.");else{let b=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/.exec(d.value);b?!b[2]&&t.format==="uri"&&(v=te.t("URI with a scheme is expected.")):v=te.t("URI is expected.")}v&&n.problems.push({location:{offset:d.offset,length:d.length},message:t.patternErrorMessage||t.errorMessage||te.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 g=SX[t.format];(!d.value||!g.pattern.exec(d.value))&&n.problems.push({location:{offset:d.offset,length:d.length},message:t.patternErrorMessage||t.errorMessage||g.errorMessage});default:}}function f(d){let g,v;i.schemaDraft>=en.v2020_12?(g=t.prefixItems,v=Array.isArray(t.items)?void 0:t.items):(g=Array.isArray(t.items)?t.items:void 0,v=Array.isArray(t.items)?t.additionalItems:t.items);let b=0;if(g!==void 0){let T=Math.min(g.length,d.items.length);for(;b<T;b++){let w=g[b],y=Dt(w),A=new Et,P=d.items[b];P&&(xt(P,y,A,r,i),n.mergePropertyMatch(A)),n.processedProperties.add(String(b))}}if(v!==void 0&&b<d.items.length)if(typeof v=="boolean")for(v===!1&&n.problems.push({location:{offset:d.offset,length:d.length},message:te.t("Array has too many items according to schema. Expected {0} or fewer.",b)});b<d.items.length;b++)n.processedProperties.add(String(b)),n.propertiesValueMatches++;else for(;b<d.items.length;b++){let T=new Et;xt(d.items[b],v,T,r,i),n.mergePropertyMatch(T),n.processedProperties.add(String(b))}let _=Dt(t.contains);if(_){let T=0;for(let w=0;w<d.items.length;w++){let y=d.items[w],A=new Et;xt(y,_,A,ic.instance,i),A.hasProblems()||(T++,i.schemaDraft>=en.v2020_12&&n.processedProperties.add(String(w)))}T===0&&!It(t.minContains)&&n.problems.push({location:{offset:d.offset,length:d.length},message:t.errorMessage||te.t("Array does not contain required item.")}),It(t.minContains)&&T<t.minContains&&n.problems.push({location:{offset:d.offset,length:d.length},message:t.errorMessage||te.t("Array has too few items that match the contains contraint. Expected {0} or more.",t.minContains)}),It(t.maxContains)&&T>t.maxContains&&n.problems.push({location:{offset:d.offset,length:d.length},message:t.errorMessage||te.t("Array has too many items that match the contains contraint. Expected {0} or less.",t.maxContains)})}let k=t.unevaluatedItems;if(k!==void 0)for(let T=0;T<d.items.length;T++){if(!n.processedProperties.has(String(T)))if(k===!1)n.problems.push({location:{offset:d.offset,length:d.length},message:te.t("Item does not match any validation rule from the array.")});else{let w=new Et;xt(d.items[T],t.unevaluatedItems,w,r,i),n.mergePropertyMatch(w)}n.processedProperties.add(String(T)),n.propertiesValueMatches++}if(It(t.minItems)&&d.items.length<t.minItems&&n.problems.push({location:{offset:d.offset,length:d.length},message:te.t("Array has too few items. Expected {0} or more.",t.minItems)}),It(t.maxItems)&&d.items.length>t.maxItems&&n.problems.push({location:{offset:d.offset,length:d.length},message:te.t("Array has too many items. Expected {0} or fewer.",t.maxItems)}),t.uniqueItems===!0){let w=function(){for(let y=0;y<T.length-1;y++){let A=T[y];for(let P=y+1;P<T.length;P++)if(Ta(A,T[P]))return!0}return!1},T=Rr(d);w()&&n.problems.push({location:{offset:d.offset,length:d.length},message:te.t("Array has duplicate items.")})}}function h(d){let g=Object.create(null),v=new Set;for(let y of d.properties){let A=y.keyNode.value;g[A]=y.valueNode,v.add(A)}if(Array.isArray(t.required)){for(let y of t.required)if(!g[y]){let A=d.parent&&d.parent.type==="property"&&d.parent.keyNode,P=A?{offset:A.offset,length:A.length}:{offset:d.offset,length:1};n.problems.push({location:P,message:te.t('Missing property "{0}".',y)})}}let b=y=>{v.delete(y),n.processedProperties.add(y)};if(t.properties)for(let y of Object.keys(t.properties)){b(y);let A=t.properties[y],P=g[y];if(P)if(Jn(A))if(A)n.propertiesMatches++,n.propertiesValueMatches++;else{let O=P.parent;n.problems.push({location:{offset:O.keyNode.offset,length:O.keyNode.length},message:t.errorMessage||te.t("Property {0} is not allowed.",y)})}else{let O=new Et;xt(P,A,O,r,i),n.mergePropertyMatch(O)}}if(t.patternProperties)for(let y of Object.keys(t.patternProperties)){let A=wa(y);if(A){let P=[];for(let O of v)if(A.test(O)){P.push(O);let L=g[O];if(L){let D=t.patternProperties[y];if(Jn(D))if(D)n.propertiesMatches++,n.propertiesValueMatches++;else{let M=L.parent;n.problems.push({location:{offset:M.keyNode.offset,length:M.keyNode.length},message:t.errorMessage||te.t("Property {0} is not allowed.",O)})}else{let M=new Et;xt(L,D,M,r,i),n.mergePropertyMatch(M)}}}P.forEach(b)}}let _=t.additionalProperties;if(_!==void 0)for(let y of v){b(y);let A=g[y];if(A){if(_===!1){let P=A.parent;n.problems.push({location:{offset:P.keyNode.offset,length:P.keyNode.length},message:t.errorMessage||te.t("Property {0} is not allowed.",y)})}else if(_!==!0){let P=new Et;xt(A,_,P,r,i),n.mergePropertyMatch(P)}}}let k=t.unevaluatedProperties;if(k!==void 0){let y=[];for(let A of v)if(!n.processedProperties.has(A)){y.push(A);let P=g[A];if(P){if(k===!1){let O=P.parent;n.problems.push({location:{offset:O.keyNode.offset,length:O.keyNode.length},message:t.errorMessage||te.t("Property {0} is not allowed.",A)})}else if(k!==!0){let O=new Et;xt(P,k,O,r,i),n.mergePropertyMatch(O)}}}y.forEach(b)}if(It(t.maxProperties)&&d.properties.length>t.maxProperties&&n.problems.push({location:{offset:d.offset,length:d.length},message:te.t("Object has more properties than limit of {0}.",t.maxProperties)}),It(t.minProperties)&&d.properties.length<t.minProperties&&n.problems.push({location:{offset:d.offset,length:d.length},message:te.t("Object has fewer properties than the required number of {0}",t.minProperties)}),t.dependentRequired)for(let y in t.dependentRequired){let A=g[y],P=t.dependentRequired[y];A&&Array.isArray(P)&&w(y,P)}if(t.dependentSchemas)for(let y in t.dependentSchemas){let A=g[y],P=t.dependentSchemas[y];A&&Ir(P)&&w(y,P)}if(t.dependencies)for(let y in t.dependencies)g[y]&&w(y,t.dependencies[y]);let T=Dt(t.propertyNames);if(T)for(let y of d.properties){let A=y.keyNode;A&&xt(A,T,n,r,i)}function w(y,A){if(Array.isArray(A))for(let P of A)g[P]?n.propertiesValueMatches++:n.problems.push({location:{offset:d.offset,length:d.length},message:te.t("Object is missing property {0} required by property {1}.",P,y)});else{let P=Dt(A);if(P){let O=new Et;xt(d,P,O,r,i),n.mergePropertyMatch(O)}}}}}function dI(e,t){let n=[],r=-1,i=e.getText(),s=vn(i,!1),a=t&&t.collectComments?[]:void 0;function o(){for(;;){let O=s.scan();switch(h(),O){case 12:case 13:Array.isArray(a)&&a.push(de.create(e.positionAt(s.getTokenOffset()),e.positionAt(s.getTokenOffset()+s.getTokenLength())));break;case 15:case 14:break;default:return O}}}function c(O){return s.getToken()===O?(o(),!0):!1}function l(O,L,D,M,C=Mt.Error){if(n.length===0||D!==r){let q=de.create(e.positionAt(D),e.positionAt(M));n.push(En.create(q,O,C,L,e.languageId)),r=D}}function f(O,L,D=void 0,M=[],C=[]){let q=s.getTokenOffset(),V=s.getTokenOffset()+s.getTokenLength();if(q===V&&q>0){for(q--;q>0&&/\s/.test(i.charAt(q));)q--;V=q+1}if(l(O,L,q,V),D&&d(D,!1),M.length+C.length>0){let $=s.getToken();for(;$!==17;){if(M.indexOf($)!==-1){o();break}else if(C.indexOf($)!==-1)break;$=o()}}return D}function h(){switch(s.getTokenError()){case 4:return f(te.t("Invalid unicode sequence in string."),_e.InvalidUnicode),!0;case 5:return f(te.t("Invalid escape character in string."),_e.InvalidEscapeCharacter),!0;case 3:return f(te.t("Unexpected end of number."),_e.UnexpectedEndOfNumber),!0;case 1:return f(te.t("Unexpected end of comment."),_e.UnexpectedEndOfComment),!0;case 2:return f(te.t("Unexpected end of string."),_e.UnexpectedEndOfString),!0;case 6:return f(te.t("Invalid characters in string. Control characters must be escaped."),_e.InvalidCharacter),!0}return!1}function d(O,L){return O.length=s.getTokenOffset()+s.getTokenLength()-O.offset,L&&o(),O}function g(O){if(s.getToken()!==3)return;let L=new fk(O,s.getTokenOffset());o();let D=0,M=!1;for(;s.getToken()!==4&&s.getToken()!==17;){if(s.getToken()===5){M||f(te.t("Value expected"),_e.ValueExpected);let q=s.getTokenOffset();if(o(),s.getToken()===4){M&&l(te.t("Trailing comma"),_e.TrailingComma,q,q+1);continue}}else M&&f(te.t("Expected comma"),_e.CommaExpected);let C=y(L);C?L.items.push(C):f(te.t("Value expected"),_e.ValueExpected,void 0,[],[4,5]),M=!0}return s.getToken()!==4?f(te.t("Expected comma or closing bracket"),_e.CommaOrCloseBacketExpected,L):d(L,!0)}let v=new kl(void 0,0,0);function b(O,L){let D=new hk(O,s.getTokenOffset(),v),M=k(D);if(!M)if(s.getToken()===16){f(te.t("Property keys must be doublequoted"),_e.PropertyKeysMustBeDoublequoted);let q=new kl(D,s.getTokenOffset(),s.getTokenLength());q.value=s.getTokenValue(),M=q,o()}else return;if(D.keyNode=M,M.value!=="//"){let q=L[M.value];q?(l(te.t("Duplicate object key"),_e.DuplicateKey,D.keyNode.offset,D.keyNode.offset+D.keyNode.length,Mt.Warning),Ir(q)&&l(te.t("Duplicate object key"),_e.DuplicateKey,q.keyNode.offset,q.keyNode.offset+q.keyNode.length,Mt.Warning),L[M.value]=!0):L[M.value]=D}if(s.getToken()===6)D.colonOffset=s.getTokenOffset(),o();else if(f(te.t("Colon expected"),_e.ColonExpected),s.getToken()===10&&e.positionAt(M.offset+M.length).line<e.positionAt(s.getTokenOffset()).line)return D.length=M.length,D;let C=y(D);return C?(D.valueNode=C,D.length=C.offset+C.length-D.offset,D):f(te.t("Value expected"),_e.ValueExpected,D,[],[2,5])}function _(O){if(s.getToken()!==1)return;let L=new pk(O,s.getTokenOffset()),D=Object.create(null);o();let M=!1;for(;s.getToken()!==2&&s.getToken()!==17;){if(s.getToken()===5){M||f(te.t("Property expected"),_e.PropertyExpected);let q=s.getTokenOffset();if(o(),s.getToken()===2){M&&l(te.t("Trailing comma"),_e.TrailingComma,q,q+1);continue}}else M&&f(te.t("Expected comma"),_e.CommaExpected);let C=b(L,D);C?L.properties.push(C):f(te.t("Property expected"),_e.PropertyExpected,void 0,[],[2,5]),M=!0}return s.getToken()!==2?f(te.t("Expected comma or closing brace"),_e.CommaOrCloseBraceExpected,L):d(L,!0)}function k(O){if(s.getToken()!==10)return;let L=new kl(O,s.getTokenOffset());return L.value=s.getTokenValue(),d(L,!0)}function T(O){if(s.getToken()!==11)return;let L=new dk(O,s.getTokenOffset());if(s.getTokenError()===0){let D=s.getTokenValue();try{let M=JSON.parse(D);if(!It(M))return f(te.t("Invalid number format."),_e.Undefined,L);L.value=M}catch{return f(te.t("Invalid number format."),_e.Undefined,L)}L.isInteger=D.indexOf(".")===-1}return d(L,!0)}function w(O){let L;switch(s.getToken()){case 7:return d(new lk(O,s.getTokenOffset()),!0);case 8:return d(new yp(O,!0,s.getTokenOffset()),!0);case 9:return d(new yp(O,!1,s.getTokenOffset()),!0);default:return}}function y(O){return g(O)||_(O)||k(O)||T(O)||w(O)}let A;return o()!==17&&(A=y(A),A?s.getToken()!==17&&f(te.t("End of file expected."),_e.Undefined):f(te.t("Expected a JSON object, array or literal."),_e.Undefined)),new vp(A,n,a)}var te,SX,mi,lk,yp,fk,dk,kl,hk,pk,cI,uI,TX,wX,_p,mk,ic,Et,vp,sc=Pe(()=>{p();wr();ml();gl();On();ck();te=fo(Aa()),SX={"color-hex":{errorMessage:te.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:te.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:te.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:te.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:te.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:te.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:te.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:te.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}},mi=class{constructor(t,n,r=0){this.offset=n,this.length=r,this.parent=t}get children(){return[]}toString(){return"type: "+this.type+" ("+this.offset+"/"+this.length+")"+(this.parent?" parent: {"+this.parent.toString()+"}":"")}},lk=class extends mi{constructor(t,n){super(t,n),this.type="null",this.value=null}},yp=class extends mi{constructor(t,n,r){super(t,r),this.type="boolean",this.value=n}},fk=class extends mi{constructor(t,n){super(t,n),this.type="array",this.items=[]}get children(){return this.items}},dk=class extends mi{constructor(t,n){super(t,n),this.type="number",this.isInteger=!0,this.value=Number.NaN}},kl=class extends mi{constructor(t,n,r){super(t,n,r),this.type="string",this.value=""}},hk=class extends mi{constructor(t,n,r){super(t,n),this.type="property",this.colonOffset=-1,this.keyNode=r}get children(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]}},pk=class extends mi{constructor(t,n){super(t,n),this.type="object",this.properties=[]}get children(){return this.properties}};(function(e){e[e.Key=0]="Key",e[e.Enum=1]="Enum"})(cI||(cI={}));uI="http://json-schema.org/",TX="https://json-schema.org/";wX={"https://json-schema.org/draft-03/schema":en.v3,"https://json-schema.org/draft-04/schema":en.v4,"https://json-schema.org/draft-06/schema":en.v6,"https://json-schema.org/draft-07/schema":en.v7,"https://json-schema.org/draft/2019-09/schema":en.v2019_09,"https://json-schema.org/draft/2020-12/schema":en.v2020_12},_p=class{constructor(t){this.schemaDraft=t}},mk=class e{constructor(t=-1,n){this.focusOffset=t,this.exclude=n,this.schemas=[]}add(t){this.schemas.push(t)}merge(t){Array.prototype.push.apply(this.schemas,t.schemas)}include(t){return(this.focusOffset===-1||yk(t,this.focusOffset))&&t!==this.exclude}newSub(){return new e(-1,this.exclude)}},ic=class{constructor(){}get schemas(){return[]}add(t){}merge(t){}include(t){return!0}newSub(){return this}};ic.instance=new ic;Et=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(t){this.problems=this.problems.concat(t.problems),this.propertiesMatches+=t.propertiesMatches,this.propertiesValueMatches+=t.propertiesValueMatches,this.mergeProcessedProperties(t)}mergeEnumValues(t){!this.enumValueMatch&&!t.enumValueMatch&&this.enumValues&&t.enumValues&&(this.enumValues=this.enumValues.concat(t.enumValues))}updateEnumMismatchProblemMessages(){if(!this.enumValueMatch&&this.enumValues)for(let t of this.problems)t.code===_e.EnumValueMismatch&&(t.message=te.t("Value is not accepted. Valid values: {0}.",this.enumValues.map(n=>JSON.stringify(n)).join(", ")))}mergePropertyMatch(t){this.problems=this.problems.concat(t.problems),this.propertiesMatches++,(t.enumValueMatch||!t.hasProblems()&&t.propertiesMatches)&&this.propertiesValueMatches++,t.enumValueMatch&&t.enumValues&&t.enumValues.length===1&&this.primaryValueMatches++}mergeProcessedProperties(t){t.processedProperties.forEach(n=>this.processedProperties.add(n))}compare(t){let n=this.hasProblems();return n!==t.hasProblems()?n?-1:1:this.enumValueMatch!==t.enumValueMatch?t.enumValueMatch?-1:1:this.primaryValueMatches!==t.primaryValueMatches?this.primaryValueMatches-t.primaryValueMatches:this.propertiesValueMatches!==t.propertiesValueMatches?this.propertiesValueMatches-t.propertiesValueMatches:this.propertiesMatches-t.propertiesMatches}};vp=class{constructor(t,n=[],r=[]){this.root=t,this.syntaxErrors=n,this.comments=r}getNodeFromOffset(t,n=!1){if(this.root)return av(this.root,t,n)}visit(t){if(this.root){let n=r=>{let i=t(r),s=r.children;if(Array.isArray(s))for(let a=0;a<s.length&&i;a++)i=n(s[a]);return i};n(this.root)}}validate(t,n,r=Mt.Warning,i){if(this.root&&n){let s=new Et;return xt(this.root,n,s,ic.instance,new _p(i??lI(n))),s.problems.map(a=>{let o=de.create(t.positionAt(a.location.offset),t.positionAt(a.location.offset+a.location.length));return En.create(o,a.message,a.severity??r,a.code)})}}getMatchingSchemas(t,n=-1,r){if(this.root&&t){let i=new mk(n,r),s=lI(t),a=new _p(s);return xt(this.root,t,new Et,i,a),i.schemas}return[]}}});function bp(e,t,n){if(e!==null&&typeof e=="object"){let r=t+" ";if(Array.isArray(e)){if(e.length===0)return"[]";let i=`[
|
|
69
|
+
`;for(let s=0;s<e.length;s++)i+=r+bp(e[s],r,n),s<e.length-1&&(i+=","),i+=`
|
|
70
|
+
`;return i+=t+"]",i}else{let i=Object.keys(e);if(i.length===0)return"{}";let s=`{
|
|
71
|
+
`;for(let a=0;a<i.length;a++){let o=i[a];s+=r+JSON.stringify(o)+": "+bp(e[o],r,n),a<i.length-1&&(s+=","),s+=`
|
|
72
|
+
`}return s+=t+"}",s}}return n(e)}var hI=Pe(()=>{p()});var Tl,xX,EX,kp,pI=Pe(()=>{p();sc();wr();hI();gl();ml();On();Tl=fo(Aa()),xX=[",","}","]"],EX=[":"],kp=class{constructor(t,n=[],r=Promise,i={}){this.schemaService=t,this.contributions=n,this.promiseConstructor=r,this.clientCapabilities=i}doResolve(t){for(let n=this.contributions.length-1;n>=0;n--){let r=this.contributions[n].resolveCompletion;if(r){let i=r(t);if(i)return i}}return this.promiseConstructor.resolve(t)}doComplete(t,n,r){let i={items:[],isIncomplete:!1},s=t.getText(),a=t.offsetAt(n),o=r.getNodeFromOffset(a,!0);if(this.isInComment(t,o?o.offset:0,a))return Promise.resolve(i);if(o&&a===o.offset+o.length&&a>0){let g=s[a-1];(o.type==="object"&&g==="}"||o.type==="array"&&g==="]")&&(o=o.parent)}let c=this.getCurrentWord(t,a),l;if(o&&(o.type==="string"||o.type==="number"||o.type==="boolean"||o.type==="null"))l=de.create(t.positionAt(o.offset),t.positionAt(o.offset+o.length));else{let g=a-c.length;g>0&&s[g-1]==='"'&&g--,l=de.create(t.positionAt(g),n)}let f=!1,h=new Map,d={add:g=>{let v=g.label,b=h.get(v);if(b)b.documentation||(b.documentation=g.documentation),b.detail||(b.detail=g.detail),b.labelDetails||(b.labelDetails=g.labelDetails);else{if(v=v.replace(/[\n]/g,"\u21B5"),v.length>60){let _=v.substr(0,57).trim()+"...";h.has(_)||(v=_)}g.textEdit=Kt.replace(l,g.insertText),f&&(g.commitCharacters=g.kind===Rt.Property?EX:xX),g.label=v,h.set(v,g),i.items.push(g)}},setAsIncomplete:()=>{i.isIncomplete=!0},error:g=>{console.error(g)},getNumberOfProposals:()=>i.items.length};return this.schemaService.getSchemaForResource(t.uri,r).then(g=>{let v=[],b=!0,_="",k;if(o&&o.type==="string"){let w=o.parent;w&&w.type==="property"&&w.keyNode===o&&(b=!w.valueNode,k=w,_=s.substr(o.offset+1,o.length-2),w&&(o=w.parent))}if(o&&o.type==="object"){if(o.offset===a)return i;o.properties.forEach(P=>{(!k||k!==P)&&h.set(P.keyNode.value,tc.create("__"))});let y="";b&&(y=this.evaluateSeparatorAfter(t,t.offsetAt(l.end))),g?this.getPropertyCompletions(g,r,o,b,y,d):this.getSchemaLessPropertyCompletions(r,o,_,d);let A=Sl(o);this.contributions.forEach(P=>{let O=P.collectPropertyCompletions(t.uri,A,c,b,y==="",d);O&&v.push(O)}),!g&&c.length>0&&s.charAt(a-c.length-1)!=='"'&&(d.add({kind:Rt.Property,label:this.getLabelForValue(c),insertText:this.getInsertTextForProperty(c,void 0,!1,y),insertTextFormat:st.Snippet,documentation:""}),d.setAsIncomplete())}let T={};return g?this.getValueCompletions(g,r,o,a,t,d,T):this.getSchemaLessValueCompletions(r,o,a,t,d),this.contributions.length>0&&this.getContributedValueCompletions(r,o,a,t,d,v),this.promiseConstructor.all(v).then(()=>{if(d.getNumberOfProposals()===0){let w=a;o&&(o.type==="string"||o.type==="number"||o.type==="boolean"||o.type==="null")&&(w=o.offset+o.length);let y=this.evaluateSeparatorAfter(t,w);this.addFillerValueCompletions(T,y,d)}return i})})}getPropertyCompletions(t,n,r,i,s,a){n.getMatchingSchemas(t.schema,r.offset).forEach(c=>{if(c.node===r&&!c.inverted){let l=c.schema.properties;l&&Object.keys(l).forEach(h=>{let d=l[h];if(typeof d=="object"&&!d.deprecationMessage&&!d.doNotSuggest){let g={kind:Rt.Property,label:h,insertText:this.getInsertTextForProperty(h,d,i,s),insertTextFormat:st.Snippet,filterText:this.getFilterTextForValue(h),documentation:this.fromMarkup(d.markdownDescription)||d.description||""};d.completionDetail!==void 0&&(g.detail=d.completionDetail),d.suggestSortText!==void 0&&(g.sortText=d.suggestSortText),g.insertText&&Xi(g.insertText,`$1${s}`)&&(g.command={title:"Suggest",command:"editor.action.triggerSuggest"}),a.add(g)}});let f=c.schema.propertyNames;if(typeof f=="object"&&!f.deprecationMessage&&!f.doNotSuggest){let h=(d,g,v,b)=>{let _={kind:Rt.Property,label:d,insertText:this.getInsertTextForProperty(d,void 0,i,s),insertTextFormat:st.Snippet,filterText:this.getFilterTextForValue(d),documentation:g||this.fromMarkup(f.markdownDescription)||f.description||"",sortText:b,detail:v};_.insertText&&Xi(_.insertText,`$1${s}`)&&(_.command={title:"Suggest",command:"editor.action.triggerSuggest"}),a.add(_)};if(f.enum)for(let d=0;d<f.enum.length;d++){let g;f.markdownEnumDescriptions&&d<f.markdownEnumDescriptions.length?g=this.fromMarkup(f.markdownEnumDescriptions[d]):f.enumDescriptions&&d<f.enumDescriptions.length&&(g=f.enumDescriptions[d]);let v=f.enumSortTexts?.[d],b=f.enumDetails?.[d];h(f.enum[d],g,b,v)}if(f.examples)for(let d=0;d<f.examples.length;d++)h(f.examples[d],void 0,void 0,void 0);f.const&&h(f.const,void 0,f.completionDetail,f.suggestSortText)}}})}getSchemaLessPropertyCompletions(t,n,r,i){let s=a=>{a.properties.forEach(o=>{let c=o.keyNode.value;i.add({kind:Rt.Property,label:c,insertText:this.getInsertTextForValue(c,""),insertTextFormat:st.Snippet,filterText:this.getFilterTextForValue(c),documentation:""})})};if(n.parent)if(n.parent.type==="property"){let a=n.parent.keyNode.value;t.visit(o=>(o.type==="property"&&o!==n.parent&&o.keyNode.value===a&&o.valueNode&&o.valueNode.type==="object"&&s(o.valueNode),!0))}else n.parent.type==="array"&&n.parent.items.forEach(a=>{a.type==="object"&&a!==n&&s(a)});else n.type==="object"&&i.add({kind:Rt.Property,label:"$schema",insertText:this.getInsertTextForProperty("$schema",void 0,!0,""),insertTextFormat:st.Snippet,documentation:"",filterText:this.getFilterTextForValue("$schema")})}getSchemaLessValueCompletions(t,n,r,i,s){let a=r;if(n&&(n.type==="string"||n.type==="number"||n.type==="boolean"||n.type==="null")&&(a=n.offset+n.length,n=n.parent),!n){s.add({kind:this.getSuggestionKind("object"),label:"Empty object",insertText:this.getInsertTextForValue({},""),insertTextFormat:st.Snippet,documentation:""}),s.add({kind:this.getSuggestionKind("array"),label:"Empty array",insertText:this.getInsertTextForValue([],""),insertTextFormat:st.Snippet,documentation:""});return}let o=this.evaluateSeparatorAfter(i,a),c=l=>{l.parent&&!yk(l.parent,r,!0)&&s.add({kind:this.getSuggestionKind(l.type),label:this.getLabelTextForMatchingNode(l,i),insertText:this.getInsertTextForMatchingNode(l,i,o),insertTextFormat:st.Snippet,documentation:""}),l.type==="boolean"&&this.addBooleanValueCompletion(!l.value,o,s)};if(n.type==="property"&&r>(n.colonOffset||0)){let l=n.valueNode;if(l&&(r>l.offset+l.length||l.type==="object"||l.type==="array"))return;let f=n.keyNode.value;t.visit(h=>(h.type==="property"&&h.keyNode.value===f&&h.valueNode&&c(h.valueNode),!0)),f==="$schema"&&n.parent&&!n.parent.parent&&this.addDollarSchemaCompletions(o,s)}if(n.type==="array")if(n.parent&&n.parent.type==="property"){let l=n.parent.keyNode.value;t.visit(f=>(f.type==="property"&&f.keyNode.value===l&&f.valueNode&&f.valueNode.type==="array"&&f.valueNode.items.forEach(c),!0))}else n.items.forEach(c)}getValueCompletions(t,n,r,i,s,a,o){let c=i,l,f;if(r&&(r.type==="string"||r.type==="number"||r.type==="boolean"||r.type==="null")&&(c=r.offset+r.length,f=r,r=r.parent),!r){this.addSchemaValueCompletions(t.schema,"",a,o);return}if(r.type==="property"&&i>(r.colonOffset||0)){let h=r.valueNode;if(h&&i>h.offset+h.length)return;l=r.keyNode.value,r=r.parent}if(r&&(l!==void 0||r.type==="array")){let h=this.evaluateSeparatorAfter(s,c),d=n.getMatchingSchemas(t.schema,r.offset,f);for(let g of d)if(g.node===r&&!g.inverted&&g.schema){if(r.type==="array"&&g.schema.items){let v=a;if(g.schema.uniqueItems){let b=new Set;r.children.forEach(_=>{_.type!=="array"&&_.type!=="object"&&b.add(this.getLabelForValue(Rr(_)))}),v={...a,add(_){b.has(_.label)||a.add(_)}}}if(Array.isArray(g.schema.items)){let b=this.findItemAtOffset(r,s,i);b<g.schema.items.length&&this.addSchemaValueCompletions(g.schema.items[b],h,v,o)}else this.addSchemaValueCompletions(g.schema.items,h,v,o)}if(l!==void 0){let v=!1;if(g.schema.properties){let b=g.schema.properties[l];b&&(v=!0,this.addSchemaValueCompletions(b,h,a,o))}if(g.schema.patternProperties&&!v){for(let b of Object.keys(g.schema.patternProperties))if(wa(b)?.test(l)){v=!0;let k=g.schema.patternProperties[b];this.addSchemaValueCompletions(k,h,a,o)}}if(g.schema.additionalProperties&&!v){let b=g.schema.additionalProperties;this.addSchemaValueCompletions(b,h,a,o)}}}l==="$schema"&&!r.parent&&this.addDollarSchemaCompletions(h,a),o.boolean&&(this.addBooleanValueCompletion(!0,h,a),this.addBooleanValueCompletion(!1,h,a)),o.null&&this.addNullValueCompletion(h,a)}}getContributedValueCompletions(t,n,r,i,s,a){if(!n)this.contributions.forEach(o=>{let c=o.collectDefaultCompletions(i.uri,s);c&&a.push(c)});else if((n.type==="string"||n.type==="number"||n.type==="boolean"||n.type==="null")&&(n=n.parent),n&&n.type==="property"&&r>(n.colonOffset||0)){let o=n.keyNode.value,c=n.valueNode;if((!c||r<=c.offset+c.length)&&n.parent){let l=Sl(n.parent);this.contributions.forEach(f=>{let h=f.collectValueCompletions(i.uri,l,o,s);h&&a.push(h)})}}}addSchemaValueCompletions(t,n,r,i){typeof t=="object"&&(this.addEnumValueCompletions(t,n,r),this.addDefaultValueCompletions(t,n,r),this.collectTypes(t,i),Array.isArray(t.allOf)&&t.allOf.forEach(s=>this.addSchemaValueCompletions(s,n,r,i)),Array.isArray(t.anyOf)&&t.anyOf.forEach(s=>this.addSchemaValueCompletions(s,n,r,i)),Array.isArray(t.oneOf)&&t.oneOf.forEach(s=>this.addSchemaValueCompletions(s,n,r,i)))}addDefaultValueCompletions(t,n,r,i=0){let s=!1;if(xn(t.default)){let a=t.type,o=t.default;for(let l=i;l>0;l--)o=[o],a="array";let c={kind:this.getSuggestionKind(a),label:this.getLabelForValue(o),insertText:this.getInsertTextForValue(o,n),insertTextFormat:st.Snippet};this.doesSupportsLabelDetails()?c.labelDetails={description:Tl.t("Default value")}:c.detail=Tl.t("Default value"),r.add(c),s=!0}Array.isArray(t.examples)&&t.examples.forEach(a=>{let o=t.type,c=a;for(let l=i;l>0;l--)c=[c],o="array";r.add({kind:this.getSuggestionKind(o),label:this.getLabelForValue(c),insertText:this.getInsertTextForValue(c,n),insertTextFormat:st.Snippet}),s=!0}),Array.isArray(t.defaultSnippets)&&t.defaultSnippets.forEach(a=>{let o=t.type,c=a.body,l=a.label,f,h;if(xn(c)){let d=t.type;for(let g=i;g>0;g--)c=[c],d="array";f=this.getInsertTextForSnippetValue(c,n),h=this.getFilterTextForSnippetValue(c),l=l||this.getLabelForSnippetValue(c)}else if(typeof a.bodyText=="string"){let d="",g="",v="";for(let b=i;b>0;b--)d=d+v+`[
|
|
73
|
+
`,g=g+`
|
|
74
|
+
`+v+"]",v+=" ",o="array";f=d+v+a.bodyText.split(`
|
|
75
|
+
`).join(`
|
|
76
|
+
`+v)+g+n,l=l||f,h=f.replace(/[\n]/g,"")}else return;r.add({kind:this.getSuggestionKind(o),label:l,documentation:this.fromMarkup(a.markdownDescription)||a.description,insertText:f,insertTextFormat:st.Snippet,filterText:h}),s=!0}),!s&&typeof t.items=="object"&&!Array.isArray(t.items)&&i<5&&this.addDefaultValueCompletions(t.items,n,r,i+1)}addEnumValueCompletions(t,n,r){if(xn(t.const)&&r.add({kind:this.getSuggestionKind(t.type),label:this.getLabelForValue(t.const),insertText:this.getInsertTextForValue(t.const,n),insertTextFormat:st.Snippet,documentation:this.fromMarkup(t.markdownDescription)||t.description}),Array.isArray(t.enum))for(let i=0,s=t.enum.length;i<s;i++){let a=t.enum[i],o=this.fromMarkup(t.markdownDescription)||t.description;t.markdownEnumDescriptions&&i<t.markdownEnumDescriptions.length&&this.doesSupportMarkdown()?o=this.fromMarkup(t.markdownEnumDescriptions[i]):t.enumDescriptions&&i<t.enumDescriptions.length&&(o=t.enumDescriptions[i]),r.add({kind:this.getSuggestionKind(t.type),label:this.getLabelForValue(a),insertText:this.getInsertTextForValue(a,n),insertTextFormat:st.Snippet,sortText:t.enumSortTexts?.[i],detail:t.enumDetails?.[i],documentation:o})}}collectTypes(t,n){if(Array.isArray(t.enum)||xn(t.const))return;let r=t.type;Array.isArray(r)?r.forEach(i=>n[i]=!0):r&&(n[r]=!0)}addFillerValueCompletions(t,n,r){t.object&&r.add({kind:this.getSuggestionKind("object"),label:"{}",insertText:this.getInsertTextForGuessedValue({},n),insertTextFormat:st.Snippet,detail:Tl.t("New object"),documentation:""}),t.array&&r.add({kind:this.getSuggestionKind("array"),label:"[]",insertText:this.getInsertTextForGuessedValue([],n),insertTextFormat:st.Snippet,detail:Tl.t("New array"),documentation:""})}addBooleanValueCompletion(t,n,r){r.add({kind:this.getSuggestionKind("boolean"),label:t?"true":"false",insertText:this.getInsertTextForValue(t,n),insertTextFormat:st.Snippet,documentation:""})}addNullValueCompletion(t,n){n.add({kind:this.getSuggestionKind("null"),label:"null",insertText:"null"+t,insertTextFormat:st.Snippet,documentation:""})}addDollarSchemaCompletions(t,n){this.schemaService.getRegisteredSchemaIds(i=>i==="http"||i==="https").forEach(i=>{i.startsWith("https://json-schema.org/draft-")&&(i=i+"#"),n.add({kind:Rt.Module,label:this.getLabelForValue(i),filterText:this.getFilterTextForValue(i),insertText:this.getInsertTextForValue(i,t),insertTextFormat:st.Snippet,documentation:""})})}getLabelForValue(t){return JSON.stringify(t)}getValueFromLabel(t){return JSON.parse(t)}getFilterTextForValue(t){return JSON.stringify(t)}getFilterTextForSnippetValue(t){return JSON.stringify(t).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")}getLabelForSnippetValue(t){return JSON.stringify(t).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")}getInsertTextForPlainText(t){return t.replace(/[\\\$\}]/g,"\\$&")}getInsertTextForValue(t,n){let r=JSON.stringify(t,null," ");return r==="{}"?"{$1}"+n:r==="[]"?"[$1]"+n:this.getInsertTextForPlainText(r+n)}getInsertTextForSnippetValue(t,n){return bp(t,"",i=>typeof i=="string"&&i[0]==="^"?i.substr(1):JSON.stringify(i))+n}getInsertTextForGuessedValue(t,n){switch(typeof t){case"object":return t===null?"${1:null}"+n:this.getInsertTextForValue(t,n);case"string":let r=JSON.stringify(t);return r=r.substr(1,r.length-2),r=this.getInsertTextForPlainText(r),'"${1:'+r+'}"'+n;case"number":case"boolean":return"${1:"+JSON.stringify(t)+"}"+n}return this.getInsertTextForValue(t,n)}getSuggestionKind(t){if(Array.isArray(t)){let n=t;t=n.length>0?n[0]:void 0}if(!t)return Rt.Value;switch(t){case"string":return Rt.Value;case"object":return Rt.Module;case"property":return Rt.Property;default:return Rt.Value}}getLabelTextForMatchingNode(t,n){switch(t.type){case"array":return"[]";case"object":return"{}";default:return n.getText().substr(t.offset,t.length)}}getInsertTextForMatchingNode(t,n,r){switch(t.type){case"array":return this.getInsertTextForValue([],r);case"object":return this.getInsertTextForValue({},r);default:let i=n.getText().substr(t.offset,t.length)+r;return this.getInsertTextForPlainText(i)}}getInsertTextForProperty(t,n,r,i){let s=this.getInsertTextForValue(t,"");if(!r)return s;let a=s+": ",o,c=0;if(n){if(Array.isArray(n.defaultSnippets)){if(n.defaultSnippets.length===1){let l=n.defaultSnippets[0].body;xn(l)&&(o=this.getInsertTextForSnippetValue(l,""))}c+=n.defaultSnippets.length}if(n.enum&&(!o&&n.enum.length===1&&(o=this.getInsertTextForGuessedValue(n.enum[0],"")),c+=n.enum.length),xn(n.const)&&(o||(o=this.getInsertTextForGuessedValue(n.const,"")),c++),xn(n.default)&&(o||(o=this.getInsertTextForGuessedValue(n.default,"")),c++),Array.isArray(n.examples)&&n.examples.length&&(o||(o=this.getInsertTextForGuessedValue(n.examples[0],"")),c+=n.examples.length),c===0){let l=Array.isArray(n.type)?n.type[0]:n.type;switch(l||(n.properties?l="object":n.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||c>1)&&(o="$1"),a+o+i}getCurrentWord(t,n){let r=n-1,i=t.getText();for(;r>=0&&`
|
|
77
|
+
\r\v":{[,]}`.indexOf(i.charAt(r))===-1;)r--;return i.substring(r+1,n)}evaluateSeparatorAfter(t,n){let r=vn(t.getText(),!0);switch(r.setPosition(n),r.scan()){case 5:case 2:case 4:case 17:return"";default:return","}}findItemAtOffset(t,n,r){let i=vn(n.getText(),!0),s=t.items;for(let a=s.length-1;a>=0;a--){let o=s[a];if(r>o.offset+o.length)return i.setPosition(o.offset+o.length),i.scan()===5&&r>=i.getTokenOffset()+i.getTokenLength()?a+1:a;if(r>=o.offset)return a}return 0}isInComment(t,n,r){let i=vn(t.getText(),!1);i.setPosition(n);let s=i.scan();for(;s!==17&&i.getTokenOffset()+i.getTokenLength()<r;)s=i.scan();return(s===12||s===13)&&i.getTokenOffset()<=r}fromMarkup(t){if(t&&this.doesSupportMarkdown())return{kind:Mr.Markdown,value:t}}doesSupportMarkdown(){if(!xn(this.supportsMarkdown)){let t=this.clientCapabilities.textDocument?.completion?.completionItem?.documentationFormat;this.supportsMarkdown=Array.isArray(t)&&t.indexOf(Mr.Markdown)!==-1}return this.supportsMarkdown}doesSupportsCommitCharacters(){return xn(this.supportsCommitCharacters)||(this.labelDetailsSupport=this.clientCapabilities.textDocument?.completion?.completionItem?.commitCharactersSupport),this.supportsCommitCharacters}doesSupportsLabelDetails(){return xn(this.labelDetailsSupport)||(this.labelDetailsSupport=this.clientCapabilities.textDocument?.completion?.completionItem?.labelDetailsSupport),this.labelDetailsSupport}}});function vk(e){if(e)return e.trim().replace(/[\\`*_{}[\]()<>#+\-.!]/g,"\\$&").replace(/(^ +)/mg,(t,n)=>" ".repeat(n.length)).replace(/( {2,})/g,(t,n)=>" "+" ".repeat(n.length-1)).replace(/(\t+)/g,(t,n)=>" ".repeat(n.length*4)).replace(/\n/g,`\\
|
|
78
|
+
`)}function AX(e){return e.indexOf("`")!==-1?"`` "+e+" ``":e}var Sp,mI=Pe(()=>{p();sc();On();Sp=class{constructor(t,n=[],r){this.schemaService=t,this.contributions=n,this.promise=r||Promise}doHover(t,n,r){let i=t.offsetAt(n),s=r.getNodeFromOffset(i);if(!s||(s.type==="object"||s.type==="array")&&i>s.offset+1&&i<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=de.create(t.positionAt(a.offset),t.positionAt(a.offset+a.length)),c=f=>({contents:f,range:o}),l=Sl(s);for(let f=this.contributions.length-1;f>=0;f--){let d=this.contributions[f].getInfoContribution(t.uri,l);if(d)return d.then(g=>c(g))}return this.schemaService.getSchemaForResource(t.uri,r).then(f=>{if(!f)return null;let h,d,g,v,b=r.getMatchingSchemas(f.schema,s.offset).filter(k=>k.node===s&&!k.inverted).map(k=>k.schema);for(let k of b)if(h=h||k.title,d=d||k.markdownDescription||vk(k.description),k.enum){let T=k.enum.indexOf(Rr(s));k.markdownEnumDescriptions?g=k.markdownEnumDescriptions[T]:k.enumDescriptions&&(g=vk(k.enumDescriptions[T])),g&&(v=k.enum[T],typeof v!="string"&&(v=JSON.stringify(v)))}let _="";return h&&(_=vk(h)),d&&(_.length>0&&(_+=`
|
|
79
|
+
|
|
80
|
+
`),_+=d),g&&(_.length>0&&(_+=`
|
|
81
|
+
|
|
82
|
+
`),_+=`\`${AX(v)}\`: ${g}`),c([_])})}}});function yI(e){if(e&&typeof e=="object"){if(Jn(e.allowComments))return e.allowComments;if(e.allOf)for(let t of e.allOf){let n=yI(t);if(Jn(n))return n}}}function _I(e){if(e&&typeof e=="object"){if(Jn(e.allowTrailingCommas))return e.allowTrailingCommas;let t=e;if(Jn(t.allowsTrailingCommas))return t.allowsTrailingCommas;if(e.allOf)for(let n of e.allOf){let r=_I(n);if(Jn(r))return r}}}function Tp(e){switch(e){case"error":return Mt.Error;case"warning":return Mt.Warning;case"ignore":return}}var gI,wp,OX,vI=Pe(()=>{p();On();gI=fo(Aa());ml();wp=class{constructor(t,n){this.jsonSchemaService=t,this.promise=n,this.validationEnabled=!0}configure(t){t&&(this.validationEnabled=t.validate!==!1,this.commentSeverity=t.allowComments?void 0:Mt.Error)}doValidation(t,n,r,i){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))},c=l=>{let f=r?.trailingCommas?Tp(r.trailingCommas):Mt.Error,h=r?.comments?Tp(r.comments):this.commentSeverity,d=r?.schemaValidation?Tp(r.schemaValidation):Mt.Warning,g=r?.schemaRequest?Tp(r.schemaRequest):Mt.Warning;if(l){let v=(b,_,k)=>{if(n.root&&g){let T=n.root,w=T.type==="object"?T.properties[0]:void 0;if(w&&w.keyNode.value==="$schema"){let y=w.valueNode||w,A=de.create(t.positionAt(y.offset),t.positionAt(y.offset+y.length));o(En.create(A,b,g,_,"json",k))}else{let y=de.create(t.positionAt(T.offset),t.positionAt(T.offset+1));o(En.create(y,b,g,_,"json",k))}}};if(l.errors.length){let b=l.errors[0];v(b.message,b.code,b.relatedInformation)}else if(d){for(let _ of l.warnings)v(_.message,_.code,_.relatedInformation);let b=n.validate(t,l.schema,d,r?.schemaDraft);b&&b.forEach(o)}yI(l.schema)&&(h=void 0),_I(l.schema)&&(f=void 0)}for(let v of n.syntaxErrors){if(v.code===_e.TrailingComma){if(typeof f!="number")continue;v.severity=f}o(v)}if(typeof h=="number"){let v=gI.t("Comments are not permitted in JSON.");n.comments.forEach(b=>{o(En.create(b,v,h,_e.CommentNotPermitted))})}return s};if(i){let l=i.id||"schemaservice://untitled/"+OX++;return this.jsonSchemaService.registerExternalSchema({uri:l,schema:i}).getResolvedSchema().then(h=>c(h))}return this.jsonSchemaService.getSchemaForResource(t.uri,n).then(l=>c(l))}getLanguageStatus(t,n){return{schemas:this.jsonSchemaService.getSchemaURIsForResource(t.uri,n)}}},OX=0});function ft(e){return e<48?0:e<=57?e-48:(e<97&&(e+=32),e>=97&&e<=102?e-97+10:0)}function bI(e){if(e[0]==="#")switch(e.length){case 4:return{red:ft(e.charCodeAt(1))*17/255,green:ft(e.charCodeAt(2))*17/255,blue:ft(e.charCodeAt(3))*17/255,alpha:1};case 5:return{red:ft(e.charCodeAt(1))*17/255,green:ft(e.charCodeAt(2))*17/255,blue:ft(e.charCodeAt(3))*17/255,alpha:ft(e.charCodeAt(4))*17/255};case 7:return{red:(ft(e.charCodeAt(1))*16+ft(e.charCodeAt(2)))/255,green:(ft(e.charCodeAt(3))*16+ft(e.charCodeAt(4)))/255,blue:(ft(e.charCodeAt(5))*16+ft(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(ft(e.charCodeAt(1))*16+ft(e.charCodeAt(2)))/255,green:(ft(e.charCodeAt(3))*16+ft(e.charCodeAt(4)))/255,blue:(ft(e.charCodeAt(5))*16+ft(e.charCodeAt(6)))/255,alpha:(ft(e.charCodeAt(7))*16+ft(e.charCodeAt(8)))/255}}}var kI=Pe(()=>{p()});function ts(e,t){return de.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length))}function SI(e){return Rr(e)||TI.t("<empty>")}var TI,xp,wI=Pe(()=>{p();sc();gl();kI();TI=fo(Aa());On();xp=class{constructor(t){this.schemaService=t}findDocumentSymbols(t,n,r={resultLimit:Number.MAX_VALUE}){let i=n.root;if(!i)return[];let s=r.resultLimit||Number.MAX_VALUE,a=t.uri;if((a==="vscode://defaultsettings/keybindings.json"||Xi(a.toLowerCase(),"/user/keybindings.json"))&&i.type==="array"){let d=[];for(let g of i.items)if(g.type==="object"){for(let v of g.properties)if(v.keyNode.value==="key"&&v.valueNode){let b=pi.create(t.uri,ts(t,g));if(d.push({name:SI(v.valueNode),kind:An.Function,location:b}),s--,s<=0)return r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(a),d}}return d}let o=[{node:i,containerName:""}],c=0,l=!1,f=[],h=(d,g)=>{d.type==="array"?d.items.forEach(v=>{v&&o.push({node:v,containerName:g})}):d.type==="object"&&d.properties.forEach(v=>{let b=v.valueNode;if(b)if(s>0){s--;let _=pi.create(t.uri,ts(t,v)),k=g?g+"."+v.keyNode.value:v.keyNode.value;f.push({name:this.getKeyLabel(v),kind:this.getSymbolKind(b.type),location:_,containerName:g}),o.push({node:b,containerName:k})}else l=!0})};for(;c<o.length;){let d=o[c++];h(d.node,d.containerName)}return l&&r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(a),f}findDocumentSymbols2(t,n,r={resultLimit:Number.MAX_VALUE}){let i=n.root;if(!i)return[];let s=r.resultLimit||Number.MAX_VALUE,a=t.uri;if((a==="vscode://defaultsettings/keybindings.json"||Xi(a.toLowerCase(),"/user/keybindings.json"))&&i.type==="array"){let d=[];for(let g of i.items)if(g.type==="object"){for(let v of g.properties)if(v.keyNode.value==="key"&&v.valueNode){let b=ts(t,g),_=ts(t,v.keyNode);if(d.push({name:SI(v.valueNode),kind:An.Function,range:b,selectionRange:_}),s--,s<=0)return r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(a),d}}return d}let o=[],c=[{node:i,result:o}],l=0,f=!1,h=(d,g)=>{d.type==="array"?d.items.forEach((v,b)=>{if(v)if(s>0){s--;let _=ts(t,v),k=_,w={name:String(b),kind:this.getSymbolKind(v.type),range:_,selectionRange:k,children:[]};g.push(w),c.push({result:w.children,node:v})}else f=!0}):d.type==="object"&&d.properties.forEach(v=>{let b=v.valueNode;if(b)if(s>0){s--;let _=ts(t,v),k=ts(t,v.keyNode),T=[],w={name:this.getKeyLabel(v),kind:this.getSymbolKind(b.type),range:_,selectionRange:k,children:T,detail:this.getDetail(b)};g.push(w),c.push({result:T,node:b})}else f=!0})};for(;l<c.length;){let d=c[l++];h(d.node,d.result)}return f&&r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(a),o}getSymbolKind(t){switch(t){case"object":return An.Module;case"string":return An.String;case"number":return An.Number;case"array":return An.Array;case"boolean":return An.Boolean;default:return An.Variable}}getKeyLabel(t){let n=t.keyNode.value;return n&&(n=n.replace(/[\n]/g,"\u21B5")),n&&n.trim()?n:`"${n}"`}getDetail(t){if(t){if(t.type==="boolean"||t.type==="number"||t.type==="null"||t.type==="string")return String(t.value);if(t.type==="array")return t.children.length?void 0:"[]";if(t.type==="object")return t.children.length?void 0:"{}"}}findDocumentColors(t,n,r){return this.schemaService.getSchemaForResource(t.uri,n).then(i=>{let s=[];if(i){let a=r&&typeof r.resultLimit=="number"?r.resultLimit:Number.MAX_VALUE,o=n.getMatchingSchemas(i.schema),c={};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(!c[f]){let h=bI(Rr(l.node));if(h){let d=ts(t,l.node);s.push({color:h,range:d})}if(c[f]=!0,a--,a<=0)return r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(t.uri),s}}}return s})}getColorPresentations(t,n,r,i){let s=[],a=Math.round(r.red*255),o=Math.round(r.green*255),c=Math.round(r.blue*255);function l(h){let d=h.toString(16);return d.length!==2?"0"+d:d}let f;return r.alpha===1?f=`#${l(a)}${l(o)}${l(c)}`:f=`#${l(a)}${l(o)}${l(c)}${l(Math.round(r.alpha*255))}`,s.push({label:f,textEdit:Kt.replace(i,JSON.stringify(f))}),s}}});var xI,EI=Pe(()=>{p();xI={$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 AI,OI=Pe(()=>{p();AI={$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 ve,Ep,PX,PI=Pe(()=>{p();EI();OI();ve=fo(Aa()),Ep={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":AI,"https://json-schema.org/draft/2019-09/schema":xI}},PX={id:ve.t("A unique identifier for the schema."),$schema:ve.t("The schema to verify this document against."),title:ve.t("A descriptive title of the schema."),description:ve.t("A long description of the schema. Used in hover menus and suggestions."),default:ve.t("A default value. Used by suggestions."),multipleOf:ve.t("A number that should cleanly divide the current value (i.e. have no remainder)."),maximum:ve.t("The maximum numerical value, inclusive by default."),exclusiveMaximum:ve.t("Makes the maximum property exclusive."),minimum:ve.t("The minimum numerical value, inclusive by default."),exclusiveMinimum:ve.t("Makes the minimum property exclusive."),maxLength:ve.t("The maximum length of a string."),minLength:ve.t("The minimum length of a string."),pattern:ve.t("A regular expression to match the string against. It is not implicitly anchored."),additionalItems:ve.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:ve.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:ve.t("The maximum number of items that can be inside an array. Inclusive."),minItems:ve.t("The minimum number of items that can be inside an array. Inclusive."),uniqueItems:ve.t("If all of the items in the array must be unique. Defaults to false."),maxProperties:ve.t("The maximum number of properties an object can have. Inclusive."),minProperties:ve.t("The minimum number of properties an object can have. Inclusive."),required:ve.t("An array of strings that lists the names of all properties required on this object."),additionalProperties:ve.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:ve.t("Not used for validation. Place subschemas here that you wish to reference inline with $ref."),properties:ve.t("A map of property names to schemas for each property."),patternProperties:ve.t("A map of regular expressions on property names to schemas for matching properties."),dependencies:ve.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:ve.t("The set of literal values that are valid."),type:ve.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:ve.t("Describes the format expected for the value. By default, not used for validation"),allOf:ve.t("An array of schemas, all of which must match."),anyOf:ve.t("An array of schemas, where at least one must match."),oneOf:ve.t("An array of schemas, exactly one of which must match."),not:ve.t("A schema which must not match."),$id:ve.t("A unique identifier for the schema."),$ref:ve.t("Reference a definition hosted on any location."),$comment:ve.t("Comments from schema authors to readers or maintainers of the schema."),readOnly:ve.t("Indicates that the value of the instance is managed exclusively by the owning authority."),examples:ve.t("Sample JSON values associated with a particular schema, for the purpose of illustrating usage."),contains:ve.t('An array instance is valid against "contains" if at least one of its elements is valid against the given schema.'),propertyNames:ve.t("If the instance is an object, this keyword validates if every property name in the instance validates against the provided schema."),const:ve.t("An instance validates successfully against this keyword if its value is equal to the value of the keyword."),contentMediaType:ve.t("Describes the media type of a string property."),contentEncoding:ve.t("Describes the content encoding of a string property."),if:ve.t('The validation outcome of the "if" subschema controls which of the "then" or "else" keywords are evaluated.'),then:ve.t('The "then" subschema is used for validation when the "if" subschema succeeds.'),else:ve.t('The "else" subschema is used for validation when the "if" subschema fails.')};for(let e in Ep.schemas){let t=Ep.schemas[e];for(let n in t.properties){let r=t.properties[n];typeof r=="boolean"&&(r=t.properties[n]={});let i=PX[n];i&&(r.description=i)}}});function NI(e,t){if(typeof e!="string")throw new TypeError("Expected a string");let n=String(e),r="",i=t?!!t.extended:!1,s=t?!!t.globstar:!1,a=!1,o=t&&typeof t.flags=="string"?t.flags:"",c;for(let l=0,f=n.length;l<f;l++)switch(c=n[l],c){case"/":case"$":case"^":case"+":case".":case"(":case")":case"=":case"!":case"|":r+="\\"+c;break;case"?":if(i){r+=".";break}case"[":case"]":if(i){r+=c;break}case"{":if(i){a=!0,r+="(";break}case"}":if(i){a=!1,r+=")";break}case",":if(a){r+="|";break}r+="\\"+c;break;case"*":let h=n[l-1],d=1;for(;n[l+1]==="*";)d++,l++;let g=n[l+1];s?d>1&&(h==="/"||h===void 0||h==="{"||h===",")&&(g==="/"||g===void 0||g===","||g==="}")?(g==="/"?l++:h==="/"&&r.endsWith("\\/")&&(r=r.substr(0,r.length-2)),r+="((?:[^/]*(?:/|$))*)"):r+="([^/]*)":r+=".*";break;default:r+=c}return(!o||!~o.indexOf("g"))&&(r="^"+r+"$"),new RegExp(r,o)}var CI=Pe(()=>{p()});function Dr(e,t,n){let r=n?[{location:{uri:n,range:de.create(0,0,0,0)},message:e}]:void 0;return{message:e,code:t,relatedInformation:r}}function LI(e){try{return rc.parse(e).with({fragment:null,query:null}).toString(!0)}catch{return e}}function wl(e){try{let t=rc.parse(e);if(t.scheme==="file")return t.fsPath}catch{}return e}var hr,NX,CX,bk,kk,Oa,Ap,Op,LX,qI=Pe(()=>{p();wr();ck();gl();sc();On();hr=fo(Aa());CI();ml();sk();NX="!",CX="/",bk=class{constructor(t,n,r){this.folderUri=n,this.uris=r,this.globWrappers=[];try{for(let i of t){let s=i[0]!==NX;s||(i=i.substring(1)),i.length>0&&(i[0]===CX&&(i=i.substring(1)),this.globWrappers.push({regexp:NI("**/"+i,{extended:!0,globstar:!0}),include:s}))}n&&(n=LI(n),n.endsWith("/")||(n=n+"/"),this.folderUri=n)}catch{this.globWrappers.length=0,this.uris=[]}}matchesPattern(t){if(this.folderUri&&!t.startsWith(this.folderUri))return!1;let n=!1;for(let{regexp:r,include:i}of this.globWrappers)r.test(t)&&(n=i);return n}getURIs(){return this.uris}},kk=class{constructor(t,n,r){this.service=t,this.uri=n,this.dependencies=new Set,this.anchors=void 0,r&&(this.unresolvedSchema=this.service.promise.resolve(new Oa(r)))}getUnresolvedSchema(){return this.unresolvedSchema||(this.unresolvedSchema=this.service.loadSchema(this.uri)),this.unresolvedSchema}getResolvedSchema(){return this.resolvedSchema||(this.resolvedSchema=this.getUnresolvedSchema().then(t=>this.service.resolveSchemaContent(t,this))),this.resolvedSchema}clearSchema(){let t=!!this.unresolvedSchema;return this.resolvedSchema=void 0,this.unresolvedSchema=void 0,this.dependencies.clear(),this.anchors=void 0,t}},Oa=class{constructor(t,n=[]){this.schema=t,this.errors=n}};Ap=class{constructor(t,n=[],r=[],i){this.schema=t,this.errors=n,this.warnings=r,this.schemaDraft=i}getSection(t){let n=this.getSectionRecursive(t,this.schema);if(n)return Dt(n)}getSectionRecursive(t,n){if(!n||typeof n=="boolean"||t.length===0)return n;let r=t.shift();if(n.properties&&typeof n.properties[r])return this.getSectionRecursive(t,n.properties[r]);if(n.patternProperties){for(let i of Object.keys(n.patternProperties))if(wa(i)?.test(r))return this.getSectionRecursive(t,n.patternProperties[i])}else{if(typeof n.additionalProperties=="object")return this.getSectionRecursive(t,n.additionalProperties);if(r.match("[0-9]+")){if(Array.isArray(n.items)){let i=parseInt(r,10);if(!isNaN(i)&&n.items[i])return this.getSectionRecursive(t,n.items[i])}else if(n.items)return this.getSectionRecursive(t,n.items)}}}},Op=class{constructor(t,n,r){this.contextService=n,this.requestService=t,this.promiseConstructor=r||Promise,this.callOnDispose=[],this.contributionSchemas={},this.contributionAssociations=[],this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={}}getRegisteredSchemaIds(t){return Object.keys(this.registeredSchemasIds).filter(n=>{let r=rc.parse(n).scheme;return r!=="schemaservice"&&(!t||t(r))})}get promise(){return this.promiseConstructor}dispose(){for(;this.callOnDispose.length>0;)this.callOnDispose.pop()()}onResourceChange(t){this.cachedSchemaForResource=void 0;let n=!1;t=gi(t);let r=[t],i=Object.keys(this.schemasById).map(s=>this.schemasById[s]);for(;r.length;){let s=r.pop();for(let a=0;a<i.length;a++){let o=i[a];o&&(o.uri===s||o.dependencies.has(s))&&(o.uri!==s&&r.push(o.uri),o.clearSchema()&&(n=!0),i[a]=void 0)}}return n}setSchemaContributions(t){if(t.schemas){let n=t.schemas;for(let r in n){let i=gi(r);this.contributionSchemas[i]=this.addSchemaHandle(i,n[r])}}if(Array.isArray(t.schemaAssociations)){let n=t.schemaAssociations;for(let r of n){let i=r.uris.map(gi),s=this.addFilePatternAssociation(r.pattern,r.folderUri,i);this.contributionAssociations.push(s)}}}addSchemaHandle(t,n){let r=new kk(this,t,n);return this.schemasById[t]=r,r}getOrAddSchemaHandle(t,n){return this.schemasById[t]||this.addSchemaHandle(t,n)}addFilePatternAssociation(t,n,r){let i=new bk(t,n,r);return this.filePatternAssociations.push(i),i}registerExternalSchema(t){let n=gi(t.uri);return this.registeredSchemasIds[n]=!0,this.cachedSchemaForResource=void 0,t.fileMatch&&t.fileMatch.length&&this.addFilePatternAssociation(t.fileMatch,t.folderUri,[n]),t.schema?this.addSchemaHandle(n,t.schema):this.getOrAddSchemaHandle(n)}clearExternalSchemas(){this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={},this.cachedSchemaForResource=void 0;for(let t in this.contributionSchemas)this.schemasById[t]=this.contributionSchemas[t],this.registeredSchemasIds[t]=!0;for(let t of this.contributionAssociations)this.filePatternAssociations.push(t)}getResolvedSchema(t){let n=gi(t),r=this.schemasById[n];return r?r.getResolvedSchema():this.promise.resolve(void 0)}loadSchema(t){if(!this.requestService){let n=hr.t("Unable to load schema from '{0}'. No schema request service available",wl(t));return this.promise.resolve(new Oa({},[Dr(n,_e.SchemaResolveError,t)]))}return this.requestService(t).then(n=>{if(!n){let a=hr.t("Unable to load schema from '{0}': No content.",wl(t));return new Oa({},[Dr(a,_e.SchemaResolveError,t)])}let r=[];n.charCodeAt(0)===65279&&(r.push(Dr(hr.t("Problem reading content from '{0}': UTF-8 with BOM detected, only UTF 8 is allowed.",wl(t)),_e.SchemaResolveError,t)),n=n.trimStart());let i={},s=[];return i=sv(n,s),s.length&&r.push(Dr(hr.t("Unable to parse content from '{0}': Parse error at offset {1}.",wl(t),s[0].offset),_e.SchemaResolveError,t)),new Oa(i,r)},n=>{let{message:r,code:i}=n;if(typeof r!="string"){let o=n.toString(),c=n.toString().split("Error: ");c.length>1&&(o=c[1]),Xi(o,".")&&(o=o.substr(0,o.length-1)),r=o}let s=_e.SchemaResolveError;typeof i=="number"&&i<65536&&(s+=i);let a=hr.t("Unable to load schema from '{0}': {1}.",wl(t),r);return new Oa({},[Dr(a,s,t)])})}resolveSchemaContent(t,n){let r=t.errors.slice(0),i=t.schema,s=i.$schema?gk(i.$schema):void 0;if(s===en.v3)return this.promise.resolve(new Ap({},[Dr(hr.t("Draft-03 schemas are not supported."),_e.SchemaUnsupportedFeature)],[],s));let a=new Set,o=this.contextService,c=(b,_)=>{_=decodeURIComponent(_);let k=b;return _[0]==="/"&&(_=_.substring(1)),_.split("/").some(T=>(T=T.replace(/~1/g,"/").replace(/~0/g,"~"),k=k[T],!k)),k},l=(b,_,k)=>(_.anchors||(_.anchors=v(b)),_.anchors.get(k)),f=(b,_)=>{for(let k in _)_.hasOwnProperty(k)&&k!=="id"&&k!=="$id"&&(b[k]=_[k])},h=(b,_,k,T)=>{let w;if(T===void 0||T.length===0?w=_:T.charAt(0)==="/"?w=c(_,T):w=l(_,k,T),w)f(b,w);else{let y=hr.t("$ref '{0}' in '{1}' can not be resolved.",T||"",k.uri);r.push(Dr(y,_e.SchemaResolveError))}},d=(b,_,k,T)=>{o&&!/^[A-Za-z][A-Za-z0-9+\-.+]*:\/.*/.test(_)&&(_=o.resolveRelativePath(_,T.uri)),_=gi(_);let w=this.getOrAddSchemaHandle(_);return w.getUnresolvedSchema().then(y=>{if(T.dependencies.add(_),y.errors.length){let A=y.errors[0],P=k?_+"#"+k:_,O=k?hr.t("Problems loading reference '{0}': {1}",k,A.message):A.message;r.push(Dr(O,A.code,_))}return h(b,y.schema,w,k),g(b,y.schema,w)})},g=(b,_,k)=>{let T=[];return this.traverseNodes(b,w=>{let y=new Set;for(;w.$ref;){let A=w.$ref,P=A.split("#",2);if(delete w.$ref,P[0].length>0){T.push(d(w,P[0],P[1],k));return}else if(!y.has(A)){let O=P[1];h(w,_,k,O),y.add(A)}}w.$recursiveRef&&a.add("$recursiveRef"),w.$dynamicRef&&a.add("$dynamicRef")}),this.promise.all(T)},v=b=>{let _=new Map;return this.traverseNodes(b,k=>{let T=k.$id||k.id,w=Yh(T)&&T.charAt(0)==="#"?T.substring(1):k.$anchor;w&&(_.has(w)?r.push(Dr(hr.t("Duplicate anchor declaration: '{0}'",w),_e.SchemaResolveError)):_.set(w,k)),k.$recursiveAnchor&&a.add("$recursiveAnchor"),k.$dynamicAnchor&&a.add("$dynamicAnchor")}),_};return g(i,i,n).then(b=>{let _=[];return a.size&&_.push(Dr(hr.t("The schema uses meta-schema features ({0}) that are not yet supported by the validator.",Array.from(a.keys()).join(", ")),_e.SchemaUnsupportedFeature)),new Ap(i,r,_,s)})}traverseNodes(t,n){if(!t||typeof t!="object")return Promise.resolve(null);let r=new Set,i=(...f)=>{for(let h of f)Ir(h)&&c.push(h)},s=(...f)=>{for(let h of f)if(Ir(h))for(let d in h){let v=h[d];Ir(v)&&c.push(v)}},a=(...f)=>{for(let h of f)if(Array.isArray(h))for(let d of h)Ir(d)&&c.push(d)},o=f=>{if(Array.isArray(f))for(let h of f)Ir(h)&&c.push(h);else Ir(f)&&c.push(f)},c=[t],l=c.pop();for(;l;)r.has(l)||(r.add(l),n(l),i(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=c.pop()}getSchemaFromProperty(t,n){if(n.root?.type==="object"){for(let r of n.root.properties)if(r.keyNode.value==="$schema"&&r.valueNode?.type==="string"){let i=r.valueNode.value;return this.contextService&&!/^\w[\w\d+.-]*:/.test(i)&&(i=this.contextService.resolveRelativePath(i,t)),i}}}getAssociatedSchemas(t){let n=Object.create(null),r=[],i=LI(t);for(let s of this.filePatternAssociations)if(s.matchesPattern(i))for(let a of s.getURIs())n[a]||(r.push(a),n[a]=!0);return r}getSchemaURIsForResource(t,n){let r=n&&this.getSchemaFromProperty(t,n);return r?[r]:this.getAssociatedSchemas(t)}getSchemaForResource(t,n){if(n){let s=this.getSchemaFromProperty(t,n);if(s){let a=gi(s);return this.getOrAddSchemaHandle(a).getResolvedSchema()}}if(this.cachedSchemaForResource&&this.cachedSchemaForResource.resource===t)return this.cachedSchemaForResource.resolvedSchema;let r=this.getAssociatedSchemas(t),i=r.length>0?this.createCombinedSchema(t,r).getResolvedSchema():this.promise.resolve(void 0);return this.cachedSchemaForResource={resource:t,resolvedSchema:i},i}createCombinedSchema(t,n){if(n.length===1)return this.getOrAddSchemaHandle(n[0]);{let r="schemaservice://combinedSchema/"+encodeURIComponent(t),i={allOf:n.map(s=>({$ref:s}))};return this.addSchemaHandle(r,i)}}getMatchingSchemas(t,n,r){if(r){let i=r.id||"schemaservice://untitled/matchingSchemas/"+LX++;return this.addSchemaHandle(i,r).getResolvedSchema().then(a=>n.getMatchingSchemas(a.schema).filter(o=>!o.inverted))}return this.getSchemaForResource(t.uri,n).then(i=>i?n.getMatchingSchemas(i.schema).filter(s=>!s.inverted):[])}},LX=0});function II(e,t){let n=[],r=[],i=[],s=-1,a=vn(e.getText(),!1),o=a.scan();function c(v){n.push(v),r.push(i.length)}for(;o!==17;){switch(o){case 1:case 3:{let v=e.positionAt(a.getTokenOffset()).line,b={startLine:v,endLine:v,kind:o===1?"object":"array"};i.push(b);break}case 2:case 4:{let v=o===2?"object":"array";if(i.length>0&&i[i.length-1].kind===v){let b=i.pop(),_=e.positionAt(a.getTokenOffset()).line;b&&_>b.startLine+1&&s!==b.startLine&&(b.endLine=_-1,c(b),s=b.startLine)}break}case 13:{let v=e.positionAt(a.getTokenOffset()).line,b=e.positionAt(a.getTokenOffset()+a.getTokenLength()).line;a.getTokenError()===1&&v+1<e.lineCount?a.setPosition(e.offsetAt(He.create(v+1,0))):v<b&&(c({startLine:v,endLine:b,kind:Zi.Comment}),s=v);break}case 12:{let b=e.getText().substr(a.getTokenOffset(),a.getTokenLength()).match(/^\/\/\s*#(region\b)|(endregion\b)/);if(b){let _=e.positionAt(a.getTokenOffset()).line;if(b[1]){let k={startLine:_,endLine:_,kind:Zi.Region};i.push(k)}else{let k=i.length-1;for(;k>=0&&i[k].kind!==Zi.Region;)k--;if(k>=0){let T=i[k];i.length=k,_>T.startLine&&s!==T.startLine&&(T.endLine=_,c(T),s=T.startLine)}}}break}}o=a.scan()}let l=t&&t.rangeLimit;if(typeof l!="number"||n.length<=l)return n;t&&t.onRangeLimitExceeded&&t.onRangeLimitExceeded(e.uri);let f=[];for(let v of r)v<30&&(f[v]=(f[v]||0)+1);let h=0,d=0;for(let v=0;v<f.length;v++){let b=f[v];if(b){if(b+h>l){d=v;break}h+=b}}let g=[];for(let v=0;v<n.length;v++){let b=r[v];typeof b=="number"&&(b<d||b===d&&h++<l)&&g.push(n[v])}return g}var MI=Pe(()=>{p();wr();On()});function RI(e,t,n){function r(o){let c=e.offsetAt(o),l=n.getNodeFromOffset(c,!0),f=[];for(;l;){switch(l.type){case"string":case"object":case"array":let d=l.offset+1,g=l.offset+l.length-1;d<g&&c>=d&&c<=g&&f.push(i(d,g)),f.push(i(l.offset,l.offset+l.length));break;case"number":case"boolean":case"null":case"property":f.push(i(l.offset,l.offset+l.length));break}if(l.type==="property"||l.parent&&l.parent.type==="array"){let d=a(l.offset+l.length,5);d!==-1&&f.push(i(l.offset,d))}l=l.parent}let h;for(let d=f.length-1;d>=0;d--)h=Ea.create(f[d],h);return h||(h=Ea.create(de.create(o,o))),h}function i(o,c){return de.create(e.positionAt(o),e.positionAt(c))}let s=vn(e.getText(),!0);function a(o,c){return s.setPosition(o),s.scan()===c?s.getTokenOffset()+s.getTokenLength():-1}return t.map(r)}var DI=Pe(()=>{p();On();wr()});function xl(e,t,n){let r;if(n){let s=e.offsetAt(n.start),a=e.offsetAt(n.end)-s;r={offset:s,length:a}}let i={tabSize:t?t.tabSize:4,insertSpaces:t?.insertSpaces===!0,insertFinalNewline:t?.insertFinalNewline===!0,eol:`
|
|
83
|
+
`,keepLines:t?.keepLines===!0};return uv(e.getText(),r,i).map(s=>Kt.replace(de.create(e.positionAt(s.offset),e.positionAt(s.offset+s.length)),s.content))}var Sk=Pe(()=>{p();wr();On()});function qX(e,t){let n=e.propertyName.toLowerCase(),r=t.propertyName.toLowerCase();return n<r?-1:n>r?1:0}function IX(e,t,n){let r=t.propertyName.toLowerCase(),i=e[0].propertyName.toLowerCase(),s=e[e.length-1].propertyName.toLowerCase();if(r<i)return 0;if(r>s)return e.length;let a=0,o=e.length-1;for(;a<=o;){let c=o+a>>1,l=n(t,e[c]);if(l>0)a=c+1;else if(l<0)o=c-1;else return c}return-a-1}var dt,Pa,jI=Pe(()=>{p();(function(e){e[e.Object=0]="Object",e[e.Array=1]="Array"})(dt||(dt={}));Pa=class{constructor(t,n){this.propertyName=t??"",this.beginningLineNumber=n,this.childrenProperties=[],this.lastProperty=!1,this.noKeyName=!1}addChildProperty(t){if(t.parent=this,this.childrenProperties.length>0){let n=0;t.noKeyName?n=this.childrenProperties.length:n=IX(this.childrenProperties,t,qX),n<0&&(n=n*-1-1),this.childrenProperties.splice(n,0,t)}else this.childrenProperties.push(t);return t}}});function FI(e,t){let n={...t,keepLines:!1},r=un.applyEdits(e,xl(e,n,void 0)),i=un.create("test://test.json","json",0,r),s=MX(i),a=RX(i,s),o=xl(a,n,void 0),c=un.applyEdits(a,o);return[Kt.replace(de.create(He.create(0,0),e.positionAt(e.getText().length)),c)]}function MX(e){let t=e.getText(),n=vn(t,!1),r=new Pa,i=r,s=r,a=r,o,c=0,l=0,f,h,d=-1,g=-1,v=0,b=0,_=[],k=!1,T=!1;for(;(o=n.scan())!==17;){if(k===!0&&o!==14&&o!==15&&o!==12&&o!==13&&s.endLineNumber===void 0){let w=n.getTokenStartLine();h===2||h===4?a.endLineNumber=w-1:s.endLineNumber=w-1,v=w,k=!1}if(T===!0&&o!==14&&o!==15&&o!==12&&o!==13&&(v=n.getTokenStartLine(),T=!1),n.getTokenStartLine()!==c){for(let w=c;w<n.getTokenStartLine();w++){let y=e.getText(de.create(He.create(w,0),He.create(w+1,0))).length;l=l+y}c=n.getTokenStartLine()}switch(o){case 10:{if(f===void 0||f===1||f===5&&_[_.length-1]===dt.Object){let w=new Pa(n.getTokenValue(),v);a=s,s=i.addChildProperty(w)}break}case 3:{if(r.beginningLineNumber===void 0&&(r.beginningLineNumber=n.getTokenStartLine()),_[_.length-1]===dt.Object)i=s;else if(_[_.length-1]===dt.Array){let w=new Pa(n.getTokenValue(),v);w.noKeyName=!0,a=s,s=i.addChildProperty(w),i=s}_.push(dt.Array),s.type=dt.Array,v=n.getTokenStartLine(),v++;break}case 1:{if(r.beginningLineNumber===void 0)r.beginningLineNumber=n.getTokenStartLine();else if(_[_.length-1]===dt.Array){let w=new Pa(n.getTokenValue(),v);w.noKeyName=!0,a=s,s=i.addChildProperty(w)}s.type=dt.Object,_.push(dt.Object),i=s,v=n.getTokenStartLine(),v++;break}case 4:{b=n.getTokenStartLine(),_.pop(),s.endLineNumber===void 0&&(f===2||f===4)&&(s.endLineNumber=b-1,s.lastProperty=!0,s.lineWhereToAddComma=d,s.indexWhereToAddComa=g,a=s,s=s?s.parent:void 0,i=s),r.endLineNumber=b,v=b+1;break}case 2:{b=n.getTokenStartLine(),_.pop(),f!==1&&(s.endLineNumber===void 0&&(s.endLineNumber=b-1,s.lastProperty=!0,s.lineWhereToAddComma=d,s.indexWhereToAddComa=g),a=s,s=s?s.parent:void 0,i=s),r.endLineNumber=n.getTokenStartLine(),v=b+1;break}case 5:{b=n.getTokenStartLine(),s.endLineNumber===void 0&&(_[_.length-1]===dt.Object||_[_.length-1]===dt.Array&&(f===2||f===4))&&(s.endLineNumber=b,s.commaIndex=n.getTokenOffset()-l,s.commaLine=b),(f===2||f===4)&&(a=s,s=s?s.parent:void 0,i=s),v=b+1;break}case 13:{f===5&&d===n.getTokenStartLine()&&(_[_.length-1]===dt.Array&&(h===2||h===4)||_[_.length-1]===dt.Object)&&(_[_.length-1]===dt.Array&&(h===2||h===4)||_[_.length-1]===dt.Object)&&(s.endLineNumber=void 0,k=!0),(f===1||f===3)&&d===n.getTokenStartLine()&&(T=!0);break}}o!==14&&o!==13&&o!==12&&o!==15&&(h=f,f=o,d=n.getTokenStartLine(),g=n.getTokenOffset()+n.getTokenLength()-l)}return r}function RX(e,t){if(t.childrenProperties.length===0)return e;let n=un.create("test://test.json","json",0,e.getText()),r=[];for(BI(r,t,t.beginningLineNumber);r.length>0;){let i=r.shift(),s=i.propertyTreeArray,a=i.beginningLineNumber;for(let o=0;o<s.length;o++){let c=s[o],l=de.create(He.create(c.beginningLineNumber,0),He.create(c.endLineNumber+1,0)),f=e.getText(l),h=un.create("test://test.json","json",0,f);if(c.lastProperty===!0&&o!==s.length-1){let v=c.lineWhereToAddComma-c.beginningLineNumber,b=c.indexWhereToAddComa,_={range:de.create(He.create(v,b),He.create(v,b)),text:","};un.update(h,[_],1)}else if(c.lastProperty===!1&&o===s.length-1){let v=c.commaIndex,_=c.commaLine-c.beginningLineNumber,k={range:de.create(He.create(_,v),He.create(_,v+1)),text:""};un.update(h,[k],1)}let d=c.endLineNumber-c.beginningLineNumber+1,g={range:de.create(He.create(a,0),He.create(a+d,0)),text:h.getText()};un.update(n,[g],1),BI(r,c,a),a=a+d}}return n}function DX(e){e.sort((t,n)=>t.propertyName.localeCompare(n.propertyName))}function BI(e,t,n){if(t.childrenProperties.length!==0)if(t.type===dt.Object){let r=1/0;for(let s of t.childrenProperties)s.beginningLineNumber<r&&(r=s.beginningLineNumber);let i=r-t.beginningLineNumber;n=n+i,DX(t.childrenProperties),e.push(new Pp(n,t.childrenProperties))}else t.type===dt.Array&&VI(e,t,n)}function VI(e,t,n){for(let r of t.childrenProperties){if(r.type===dt.Object){let i=1/0;for(let a of r.childrenProperties)a.beginningLineNumber<i&&(i=a.beginningLineNumber);let s=i-r.beginningLineNumber;e.push(new Pp(n+r.beginningLineNumber-t.beginningLineNumber+s,r.childrenProperties))}r.type===dt.Array&&VI(e,r,n+r.beginningLineNumber-t.beginningLineNumber)}}var Pp,$I=Pe(()=>{p();wr();On();Sk();jI();Pp=class{constructor(t,n){this.beginningLineNumber=t,this.propertyTreeArray=n}}});function UI(e,t){let n=[];return t.visit(r=>{if(r.type==="property"&&r.keyNode.value==="$ref"&&r.valueNode?.type==="string"){let i=r.valueNode.value,s=BX(t,i);if(s){let a=e.positionAt(s.offset);n.push({target:`${e.uri}#${a.line+1},${a.character+1}`,range:jX(e,r.valueNode)})}}return!0}),Promise.resolve(n)}function jX(e,t){return de.create(e.positionAt(t.offset+1),e.positionAt(t.offset+t.length-1))}function BX(e,t){let n=FX(t);return n?Tk(n,e.root):null}function Tk(e,t){if(!t)return null;if(e.length===0)return t;let n=e.shift();if(t&&t.type==="object"){let r=t.properties.find(i=>i.keyNode.value===n);return r?Tk(e,r.valueNode):null}else if(t&&t.type==="array"&&n.match(/^(0|[1-9][0-9]*)$/)){let r=Number.parseInt(n),i=t.items[r];return i?Tk(e,i):null}return null}function FX(e){return e==="#"?[]:e[0]!=="#"||e[1]!=="/"?null:e.substring(2).split(/\//).map(VX)}function VX(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}var HI=Pe(()=>{p();On()});var zI={};D_(zI,{ClientCapabilities:()=>ok,CodeAction:()=>hp,CodeActionContext:()=>dp,CodeActionKind:()=>lp,Color:()=>yl,ColorInformation:()=>Zh,ColorPresentation:()=>ep,Command:()=>es,CompletionItem:()=>tc,CompletionItemKind:()=>Rt,CompletionItemTag:()=>rp,CompletionList:()=>ip,Diagnostic:()=>En,DiagnosticSeverity:()=>Mt,DocumentHighlight:()=>op,DocumentHighlightKind:()=>ap,DocumentLink:()=>pp,DocumentSymbol:()=>up,DocumentUri:()=>Qh,ErrorCode:()=>_e,FoldingRange:()=>tp,FoldingRangeKind:()=>Zi,Hover:()=>sp,InsertTextFormat:()=>st,Location:()=>pi,MarkedString:()=>nc,MarkupContent:()=>xa,MarkupKind:()=>Mr,Position:()=>He,Range:()=>de,SchemaDraft:()=>en,SelectionRange:()=>Ea,SymbolInformation:()=>cp,SymbolKind:()=>An,TextDocument:()=>un,TextDocumentEdit:()=>_l,TextEdit:()=>Kt,VersionedTextDocumentIdentifier:()=>np,WorkspaceEdit:()=>vl,getLanguageService:()=>$X,isSchemaResolveError:()=>uX});function $X(e){let t=e.promiseConstructor||Promise,n=new Op(e.schemaRequestService,e.workspaceContext,t);n.setSchemaContributions(Ep);let r=new kp(n,e.contributions,t,e.clientCapabilities),i=new Sp(n,e.contributions,t),s=new xp(n),a=new wp(n,t);return{configure:o=>{n.clearExternalSchemas(),o.schemas?.forEach(n.registerExternalSchema.bind(n)),a.configure(o)},resetSchema:o=>n.onResourceChange(o),doValidation:a.doValidation.bind(a),getLanguageStatus:a.getLanguageStatus.bind(a),parseJSONDocument:o=>dI(o,{collectComments:!0}),newJSONDocument:(o,c,l)=>fI(o,c,l),getMatchingSchemas:n.getMatchingSchemas.bind(n),doResolve:r.doResolve.bind(r),doComplete:r.doComplete.bind(r),findDocumentSymbols:s.findDocumentSymbols.bind(s),findDocumentSymbols2:s.findDocumentSymbols2.bind(s),findDocumentColors:s.findDocumentColors.bind(s),getColorPresentations:s.getColorPresentations.bind(s),doHover:i.doHover.bind(i),getFoldingRanges:II,getSelectionRanges:RI,findDefinition:()=>Promise.resolve([]),findLinks:UI,format:(o,c,l)=>xl(o,l,c),sort:(o,c)=>FI(o,c)}}var WI=Pe(()=>{p();pI();mI();vI();wI();sc();PI();qI();MI();DI();$I();Sk();HI();On()});var Ek=x(El=>{"use strict";p();Object.defineProperty(El,"__esModule",{value:!0});El.JSONValidator=void 0;El.isValid=GI;var wk=(WI(),j_(zI)),UX=Ne(),xk=class e{service;schemas;static async create(t,n){if(t)return new e(await t.schemas(n.context))}constructor(t){this.schemas=(0,UX.indexBy)(n=>n.uri,t),this.service=(0,wk.getLanguageService)({schemaRequestService:this.getSchemaForURI.bind(this),workspaceContext:{resolveRelativePath:(n,r)=>new URL(n,r).toString()}}),this.service.configure({schemas:t.map(n=>({uri:n.uri,fileMatch:n.fileMatch}))})}validate=async(t,n)=>{let r=wk.TextDocument.create(t,"json",0,n);return(await this.getOffsetDiagnostics(r)).map(s=>({message:s.message,startIndex:r.offsetAt(s.range.start),endIndex:r.offsetAt(s.range.end)}))};isValid=async(t,n)=>GI(this.service,t,n);async getOffsetDiagnostics(t){let n=this.service.parseJSONDocument(t);return this.service.doValidation(t,n,{schemaValidation:"error",trailingCommas:"ignore",comments:"ignore"})}async getSchemaForURI(t){let n=this.schemas[t]?.schema;return n||`No schema for '${t}' found`}};El.JSONValidator=xk;async function GI(e,t,n){let r=wk.TextDocument.create(t,"json",0,n),i=e.parseJSONDocument(r);return(await e.doValidation(r,i,{schemaValidation:"error",trailingCommas:"ignore",comments:"ignore"})).every(a=>a.severity!==1)}});var Ak=x(Np=>{"use strict";p();Object.defineProperty(Np,"__esModule",{value:!0});Np.FileType=void 0;var JI;(function(e){e[e.Unknown=0]="Unknown",e[e.File=1]="File",e[e.Directory=2]="Directory",e[e.SymbolicLink=64]="SymbolicLink"})(JI||(Np.FileType=JI={}))});var Cp=x(Xe=>{"use strict";p();Object.defineProperty(Xe,"__esModule",{value:!0});Xe.makeGetMetafieldDefinitions=Xe.FETCHED_METAFIELD_CATEGORIES=Xe.makeGetDefaultSchemaTranslations=Xe.makeGetDefaultTranslations=Xe.makeGetDefaultSchemaLocale=Xe.makeGetDefaultLocale=Xe.makeGetDefaultSchemaLocaleFileUri=Xe.makeGetDefaultLocaleFileUri=Xe.makeFileSize=Xe.makeFileExists=void 0;Xe.recursiveReadDirectory=rM;Xe.isDirectory=Ok;var KI=yu(),YI=Ak(),Pk=Be(),QI=Fn(),HX=J(),XI=Ne(),zX=e=>async function(n){try{return await e.stat(n),!0}catch{return!1}};Xe.makeFileExists=zX;var WX=e=>async function(n){try{return(await e.stat(n)).size}catch{return 0}};Xe.makeFileSize=WX;Xe.makeGetDefaultLocaleFileUri=ZI("default.json");Xe.makeGetDefaultSchemaLocaleFileUri=ZI(".default.schema.json");function ZI(e=".default.json"){return function(n){return r=>Nk(n,r,e)}}Xe.makeGetDefaultLocale=eM(".default.json");Xe.makeGetDefaultSchemaLocale=eM(".default.schema.json");function eM(e=".default.json"){return function(n,r){return nM(()=>GX(n,r,e))}}Xe.makeGetDefaultTranslations=tM(".default.json");Xe.makeGetDefaultSchemaTranslations=tM(".default.schema.json");function tM(e=".default.json"){return function(n,r,i){return nM(()=>JX(n,r,i,e))}}async function Nk(e,t,n=".default.json"){return(await e.readDirectory((0,QI.join)(t,"locales"))).find(([i])=>i.endsWith(n))?.[0]}async function GX(e,t,n){try{let r=await Nk(e,t,n);return r?KI.Utils.basename(KI.URI.parse(r)).split(".")[0]:"en"}catch(r){return console.error(r),"en"}}async function JX(e,t,n,r){try{let i=KX(t,r);if(i)return i;let s=await Nk(e,n,r);if(!s)return{};let a=await e.readFile(s);return(0,Pk.parseJSON)(a,{})}catch(i){return console.error(i),{}}}function KX(e,t){let n=e.find(i=>i.type===HX.SourceCodeType.JSON&&i.uri.match(/locales/)&&i.uri.endsWith(t));if(!n)return;let r=(0,Pk.parseJSON)(n.source);if(!(0,XI.isError)(r))return r}function nM(e){let t;return async(...n)=>(t||(t=e(...n)),t)}async function rM(e,t,n){let i=(await e.readDirectory(t)).filter(a=>!QX(a)&&(Ok(a)||n(a)));return(await Promise.all(i.map(a=>Ok(a)?rM(e,a[0],n):Promise.resolve([a[0]])))).flat()}function Ok([e,t]){return t===YI.FileType.Directory}var YX=[".git","node_modules","dist","build","tmp","vendor"];function QX([e,t]){return t===YI.FileType.Directory&&YX.some(n=>e.endsWith(n))}Xe.FETCHED_METAFIELD_CATEGORIES=["article","blog","collection","company","company_location","location","market","order","page","product","variant","shop"];var XX=e=>async function(t){let n={article:[],blog:[],collection:[],company:[],company_location:[],location:[],market:[],order:[],page:[],product:[],variant:[],shop:[]};try{let r=await e.readFile((0,QI.join)(t,".shopify","metafields.json")),i=(0,Pk.parseJSON)(r);return(0,XI.isError)(i)?n:Xe.FETCHED_METAFIELD_CATEGORIES.reduce((s,a)=>{try{s[a]=i[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},n)}catch{return n}};Xe.makeGetMetafieldDefinitions=XX});var oM=x(Lp=>{"use strict";p();Object.defineProperty(Lp,"__esModule",{value:!0});Lp.createDisabledChecksModule=tZ;Lp.findNextLinePosition=aM;var sM=J(),ZX=Nr(),eZ=Ne();function tZ(){let e="@all",n=new Map;function r(a,o,c){let[l,f,h]=o.trim().match(/^(?:theme\-check\-(disable-next-line|disable|enable)) ?(.*)/)||[];(h?h.split(/,[ ]*/):[e]).forEach(g=>{let v=n.get(a.uri);if(f==="disable-next-line"&&!(0,eZ.isError)(a.ast)){let b=aM(a.ast,c);b&&(v.has(g)||v.set(g,[]),v.get(g).push({from:b.start,to:b.end}))}if(f==="disable"&&(v.has(g)||v.set(g,[]),v.get(g).push({from:c.position.end})),f==="enable"){let b=v.get(g);if(b)b[b.length-1].to=c.position.start;else if(g===e)for(let _ of v.values())for(let k of _)k.to||(k.to=c.position.start)}})}let i={meta:{schema:{}},create:({file:a})=>({async onCodePathStart(){n.set(a.uri,new Map)},async LiquidRawTag(o){o.name==="comment"&&r(a,o.body.value,o)},async LiquidTag(o){typeof o.markup!="string"||o.name!=="#"||r(a,o.markup,o)}})};function s(a){return[e,a.check].flatMap(c=>n.has(a.uri)?n.get(a.uri).has(c)?n.get(a.uri).get(c):[]:[]).some(c=>a.start.index>=c.from&&(!c.to||a.end.index<=c.to))}return{DisabledChecksVisitor:i,isDisabled:s}}function aM(e,t){let[n,r]=(0,ZX.findCurrentNode)(e,t.position.end),i=r.at(-1),s=r.at(-2),a=iM(i,n);if(!(!a&&(i&&(a=iM(s,i)),!a)))return"blockStartPosition"in a?a.type===sM.LiquidHtmlNodeTypes.LiquidRawTag&&a.name==="doc"?a.position:a.blockStartPosition:a.position}function iM(e,t){if(!e)return;let n=[];e.type===sM.LiquidHtmlNodeTypes.LiquidTag&&Array.isArray(e.markup)?n=e.markup:"children"in e?n=e.children||[]:"nodes"in e&&(n=e.nodes||[]);let r=n.findIndex(s=>s===t);return r===-1?void 0:n.at(r+1)}});var uM=x(qp=>{"use strict";p();Object.defineProperty(qp,"__esModule",{value:!0});qp.numericRange=void 0;var Lk=(e,t)=>e===t?{t:"lit",ch:String(e)}:{t:"class",re:new RegExp(`^[${e}-${t}]$`)},Ck=(e,t)=>t.map(n=>[Lk(e,e),...n]),Al=(e,t)=>{if(!e)return[[]];let n=+e[0],r=+t[0],i=e.slice(1),s=t.slice(1);if(n===r)return Ck(n,Al(i,s));let a="0".repeat(i.length),o="9".repeat(i.length),c=[];i!==a&&c.push(...Ck(n++,Al(i,o)));let l=s===o?[]:Ck(r--,Al(a,s));return n<=r&&c.push([Lk(n,r),...Array.from(i,()=>Lk(0,9))]),c.push(...l),c},cM=(e,t,n)=>{if(n)return Al(String(e).padStart(n,"0"),String(t).padStart(n,"0"));let r=[];for(let i=String(e).length;i<=String(t).length;i++){let s=Math.max(e,i===1?0:10**(i-1)),a=Math.min(t,10**i-1);r.push(...Al(String(s),String(a)))}return r},nZ=(e,t)=>{let n=Number(e),r=Number(t);if(!Number.isSafeInteger(n)||!Number.isSafeInteger(r))return;n>r&&([n,r]=[r,n]);let s=/^-?0\d/.test(e)||/^-?0\d/.test(t)?Math.max(e.length,t.length):0,a=[];if(n<0){let o=cM(Math.max(-r,1),-n,s&&s-1);a.push(...o.map(c=>[{t:"lit",ch:"-"},...c]))}return r>=0&&a.push(...cM(Math.max(n,0),r,s)),a};qp.numericRange=nZ});var lM=x(Ip=>{"use strict";p();Object.defineProperty(Ip,"__esModule",{value:!0});Ip.parseClass=void 0;var rZ={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}"],"[:alpha:]":["\\p{L}\\p{Nl}"],"[:ascii:]":["\\x00-\\x7f"],"[:blank:]":["\\p{Zs}\\t"],"[:cntrl:]":["\\p{Cc}"],"[:digit:]":["\\p{Nd}"],"[:graph:]":["\\p{Z}\\p{C}",!0],"[:lower:]":["\\p{Ll}"],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}\\p{S}"],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f"],"[:upper:]":["\\p{Lu}"],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}"],"[:xdigit:]":["A-Fa-f0-9"]},Ol=e=>e.replace(/[[\]\\-]/g,"\\$&"),qk=/$./,iZ=(e,t,n=!1,r)=>{let i=k=>{let T=r?k.normalize(r):k;return[...T].length===1?T:k},s=t;if(e.charAt(s)!=="[")throw new Error("not in a brace expression");let a=[],o=[],c=s+1,l=!1,f=!1,h=!1,d=s,g="";e:for(;c<e.length;){let k=String.fromCodePoint(e.codePointAt(c));if((k==="!"||k==="^")&&c===s+1){h=!0,c++;continue}if(k==="]"&&l&&!f){d=c+1;break}if(l=!0,k==="\\"&&!f){f=!0,c++;continue}if(k==="["&&!f){for(let[w,[y,A]]of Object.entries(rZ))if(e.startsWith(w,c)){if(g)return[qk,e.length-s];c+=w.length,A?o.push(y):a.push(y);continue e}}f=!1;let T=i(k);if(g){T.codePointAt(0)>g.codePointAt(0)?a.push(Ol(g)+"-"+Ol(T)):T===g&&a.push(Ol(T)),g="",c+=k.length;continue}if(e.startsWith("-]",c+k.length)){a.push(Ol(T+"-")),c+=k.length+1;continue}if(e.startsWith("-",c+k.length)){g=T,c+=k.length+1;continue}a.push(Ol(T)),c+=k.length}if(d<c)return[qk,0];if(!a.length&&!o.length)return[qk,e.length-s];let v="["+(h?"^":"")+a.join("")+"]",b="["+(h?"":"^")+o.join("")+"]",_="^"+(a.length&&o.length?"("+v+"|"+b+")":a.length?v:b);return[new RegExp(_,n?"iu":"u"),d-s]};Ip.parseClass=iZ});var kM=x(Dp=>{"use strict";p();Object.defineProperty(Dp,"__esModule",{value:!0});Dp.Matcher=void 0;var sZ=uM(),aZ=lM(),Ik={t:"match",id:0},oZ="!?+*@",Na=e=>({t:"lit",ch:e}),cZ=e=>e.replace(/[\\^$.*+?()[\]{}|/]/g,"\\$&"),pM=e=>new RegExp(`^${cZ(e)}$`,"iu"),Mp=new Map,mM=e=>{let t=Mp.get(e);return t||(t=pM(e),Mp.size>=1e3&&Mp.clear(),Mp.set(e,t)),t},jk=(e,t)=>{if(t===e.ch)return!0;if(!e.re)return!1;let n=t.charCodeAt(0);if(n>=128)return e.re.test(t);let r=e.ascii??=new Uint8Array(128);return r[n]||=e.re.test(t)?1:2,r[n]===1},uZ=(e,t,n,r,i)=>{let s=[];for(let a=0;a<e.length;){let o=String.fromCodePoint(e.codePointAt(a));if(i){let c=o==="\\"&&e.startsWith(i,a+1)?1:0;if(c||o===i){let l=a+c+i.length,f=e.indexOf(i,l),h=/^(-?\d+)\.\.(-?\d+)$/.exec(e.slice(l,f)),d=f!==-1&&h&&(0,sZ.numericRange)(h[1],h[2]);if(d){s.push({t:"ext",type:"@",alts:d}),a=f+i.length;continue}}}if(o==="\\"){let c=e.codePointAt(a+1),l=c===void 0?o:String.fromCodePoint(c);s.push(Na(l)),a+=1+l.length;continue}if(o==="["){let[c,l]=(0,aZ.parseClass)(e,a,t,r);if(l){s.push({t:"class",re:c}),a+=l;continue}}if(!n&&oZ.includes(o)&&e[a+1]==="("){s.push({t:"open",type:o}),a+=2;continue}s.push(!n&&o==="|"?{t:"bar"}:!n&&o===")"?{t:"close"}:o==="*"?{t:"star"}:o==="?"?{t:"any"}:Na(o)),a+=o.length}return s},lZ=e=>{let t=new Map,n=[];return e.forEach((r,i)=>{r.t==="open"?n.push(i):r.t==="close"&&n.length&&t.set(n.pop(),i)}),t},gM=(e,t,n,r,i)=>{let s=[],a=[s];for(let o=n;o<r;o++){let c=e[o],l=t.get(o);if(c.t==="open"&&l!==void 0){let f=gM(e,t,o+1,l,!1);s.push({t:"ext",type:c.type,alts:f}),o=l}else c.t==="bar"&&!i?a.push(s=[]):c.t==="open"?s.push(Na(c.type),Na("(")):c.t==="bar"?s.push(Na("|")):c.t==="close"?s.push(Na(")")):s.push(c)}return a},yM=(e,t)=>{let n=[],r="",i=()=>{for(let s of r.normalize(t))n.push(Na(s));r=""};for(let s of e){if(s.t==="lit"){r+=s.ch;continue}i(),n.push(s.t==="ext"?{...s,alts:s.alts.map(a=>yM(a,t))}:s)}return i(),n},fZ=(e,t)=>{let n=1,r=o=>({t:"split",id:n++,out:o}),i=(o,c)=>o.reduceRight((l,f)=>s(f,l),c),s=(o,c)=>{switch(o.t){case"lit":let d=t?mM(o.ch):void 0;return{t:"lit",id:n++,ch:o.ch,re:d,next:c};case"any":case"star":return{t:o.t,id:n++,next:c};case"class":return{t:"class",id:n++,re:o.re,next:c}}let l=d=>o.alts.map(g=>i(g,d));switch(o.type){case"@":return r(l(c));case"?":return r([c,...l(c)]);case"!":return{t:"neg",id:n++,sub:r(l(Ik)),next:c}}let f=r([]),h=r(l(f));return f.out.push(c,h),o.type==="*"?f:h};return[i(e,Ik),n]},dZ=e=>{let t=[],n=new Set,r=s=>s.t==="match"?"match":String(s.id),i=(s,a)=>{if(s.t==="match"||n.has(s))return;n.add(s);let o=c=>t.push(`${a}${s.id}: ${c}`);switch(s.t){case"split":o(`split -> ${s.out.map(r).join(", ")}`);for(let c of s.out)i(c,a);return;case"neg":return o(`!(${r(s.sub)}) -> ${r(s.next)}`),i(s.sub,a+" "),i(s.next,a);case"lit":o(`${JSON.stringify(s.ch)} -> ${r(s.next)}`);break;case"class":o(`${s.re} -> ${r(s.next)}`);break;default:o(`${s.t==="any"?"?":"*"} -> ${r(s.next)}`)}i(s.next,a)};return i(e,""),[`start -> ${r(e)}`,...t].join(`
|
|
84
|
+
`)},Mk=class{gen;threads=[];match=!1;runs=[];ids=[];constructor(t){this.gen=t}get dead(){return!this.threads.length&&!this.match&&!this.runs.length}},_M=(e,t)=>e.ids.length!==t.ids.length||e.runs.length!==t.runs.length||e.ids.some((n,r)=>n!==t.ids[r])?!1:e.runs.every(n=>t.runs.some(r=>r.neg===n.neg&&_M(r.state,n.state))),fM=e=>({has:new Float64Array(e),seen:new Float64Array(e),gen:0}),Pl=class{dots;dotStart;#e;constructor(t,n,r){this.dots=t,this.dotStart=n,this.#e=r}state(){return new Mk(++this.#e.gen)}done(t){return t.ids=t.threads.map(n=>n.id).sort((n,r)=>n-r),t.match&&t.ids.unshift(Ik.id),t}#n(t,n){let{seen:r}=this.#e;return r[n.id]===t.gen?!1:(r[n.id]=t.gen,!0)}#t(t,n){let{has:r}=this.#e;return r[n.id]===t.gen?!1:(r[n.id]=t.gen,t.threads.push(n),!0)}restricted(t,n){return n&&(this.dots||this.dotStart&&t===0)}add(t,n,r,i){switch(n.t){case"split":if(!this.#n(t,n))return;for(let a of n.out)this.add(t,a,r,i);return;case"neg":if(!this.#n(t,n))return;let s=this.state();return this.add(s,n.sub,r,!1),this.done(s),this.addRun(t,{t:"run",neg:n,state:s},r,i);case"star":if(this.restricted(r,i))return;this.#t(t,n)&&this.add(t,n.next,r,i);return;case"match":t.match=!0;return;default:this.#t(t,n)}}addRun(t,n,r,i){for(let s of t.runs)if(s.neg===n.neg&&_M(s.state,n.state))return;t.runs.push(n),n.state.match||this.add(t,n.neg.next,r,i)}step(t,n,r,i){let s=this.state();for(let a of t.threads)switch(a.t){case"lit":jk(a,n)&&this.add(s,a.next,r+1,i);break;case"any":this.restricted(r,i)||this.add(s,a.next,r+1,i);break;case"class":!this.restricted(r,i)&&a.re.test(n)&&this.add(s,a.next,r+1,i);break;case"star":this.restricted(r,i)||this.add(s,a,r+1,i)}if(!this.restricted(r,i))for(let a of t.runs){if(a.state.dead){this.addRun(s,a,r+1,i);continue}let o=this.step(a.state,n,r,!1);this.addRun(s,{t:"run",neg:a.neg,state:o},r+1,i)}return this.done(s)}},vM=e=>{let t=e.ids.join();if(!e.runs.length)return t;let n=e.runs.map(r=>`${r.neg.id}(${vM(r.state)})`);return`${t}|${n.sort().join("|")}`},hZ=1<<18,Rk=class{#e;#n=new Map;#t=0;#i;#r;#a;#s;constructor(t,n){this.#e=t,this.#a=new Pl(!1,!1,n),this.#s=new Pl(!1,!0,n)}#c(t){return{state:t,match:t.match,dead:t.dead,next:new Map}}#u(t){let n=vM(t),r=this.#n.get(n);if(r)return r;this.#t>hZ&&this.#d();let i=this.#c(t);return this.#n.set(n,i),this.#t+=n.length+1,i}#d(){this.#n.clear(),this.#t=0,this.#i=void 0,this.#r=void 0}start(t){if(t){if(this.#r)return this.#r;let r=this.#s.state();return this.#s.add(r,this.#e,0,!0),this.#r=this.#c(this.#s.done(r))}if(this.#i)return this.#i;let n=this.#a.state();return this.#a.add(n,this.#e,0,!0),this.#i=this.#u(this.#a.done(n))}next(t,n){let r=n.charCodeAt(0),i=r<128?void 0:t.next.get(n);if(i)return i;let s=t===this.#r?this.#u(this.#s.step(t.state,n,0,!0)):this.#u(this.#a.step(t.state,n,1,!0));return r<128?(t.ascii||(t.ascii=new Array(128),this.#t+=128),t.ascii[r]=s):t.next.set(n,s),this.#t++,s}},pZ=e=>{let t=[];for(let n=e;n.t!=="match";n=n.next){if(n.t==="split"||n.t==="neg")return;t.push(n)}return t},mZ=(e,t,n,r)=>{let i=0,s=n,a=-1,o=0;for(;s<r;){let c=e[i];if(c?.t==="star"){a=i++,o=s;continue}let l=t[s];if(c&&(c.t==="any"||c.t==="lit"&&jk(c,l)||c.t==="class"&&c.re.test(l))){i++,s++;continue}if(a===-1)return!1;i=a+1,s=++o}for(;e[i]?.t==="star";)i++;return i===e.length},bM=e=>{let t=0,n=0;for(let r of e){let[i,s]=gZ(r);t+=i,n+=s}return[t,n]},gZ=e=>{if(e.t==="star")return[0,1/0];if(e.t!=="ext")return[1,1];if(e.type==="!")return[0,1/0];let t=e.alts.map(bM),n=Math.min(...t.map(s=>s[0])),r=Math.max(...t.map(s=>s[1])),i=r===0?0:1/0;return e.type==="@"?[n,r]:e.type==="?"?[0,r]:e.type==="*"?[0,i]:[n,i]},dM=(e,t,n)=>{for(let r=0;r<e.length;r++)if(!jk(e[r],t[n+r]))return!1;return!0},yZ=/[/\ud800-\udfff]/,_Z=/[\ud800-\udfff]/,Rp=e=>_Z.test(e)?[...e]:e,hM=e=>{if(e.includes("/"))throw new Error("can only match a single path portion, got: "+e)},Dk=class{pattern;options;#e;#n;#t;#i;#r;#a=!1;#s;#c;#u=!1;#d=0;#m=1/0;#l=[];#o=[];#h;#g;#_=!1;#v;#f;constructor(t,n={}){if(t.includes("/"))throw new Error("can only match a single path portion, got pattern: "+t);this.pattern=t,this.options=n;let{nocase:r=!1,noext:i=!1,normalize:s}=n;this.#f=s===!0?"NFC":s||void 0;let a=/^[?*+@]\(\)$/.test(t),o=uZ(t,r,i||a,this.#f,n.rangeMark),[c]=gM(o,lZ(o),0,o.length,!0);this.#f&&(c=yM(c,this.#f));let[l,f]=fZ(c,r);if(this.#e=l,this.#n=f,c.every(h=>h.t==="lit"))this.#r=c.map(h=>h.ch).join(""),this.#a=r;else{let h=v=>v.t!=="lit"?void 0:r?{ch:v.ch,re:mM(v.ch)}:{ch:v.ch};for(let v of c){let b=h(v);if(!b)break;this.#l.push(b)}for(let v=c.length-1;v>=0;v--){let b=h(c[v]);if(!b)break;this.#o.unshift(b)}this.#_=!!(this.#l.length||this.#o.length),r||(this.#h=this.#l.map(v=>v.ch).join(""),this.#g=this.#o.map(v=>v.ch).join("")),this.#c=pZ(this.#e)?.slice(this.#l.length,-this.#o.length||void 0),this.#u=!!this.#c?.every(v=>v.t==="star"||v.t==="any");let[d,g]=bM(c);this.#d=d,this.#m=g}}test(t){return this.#f?(hM(t),this.#p(t.normalize(this.#f))):yZ.test(t)?(hM(t),this.#p(t,[...t])):this.#p(t,t)}testUnchecked(t){return this.#p(this.#f?t.normalize(this.#f):t)}#p(t,n){if(this.#r!==void 0)return this.#a?(this.#s??=pM(this.#r)).test(t):t===this.#r;let r=this.#d,i=this.#m;if(n===void 0){let f=t.length,h=f+1>>1;if(f<r||h>i)return!1;(h<r||f>i)&&(n=Rp(t))}if(n!==void 0&&(n.length<r||n.length>i))return!1;let s=this.#l.length;if(this.#_)if(this.#h!==void 0&&this.#g!==void 0){if(!t.startsWith(this.#h)||!t.endsWith(this.#g))return!1}else{n??=Rp(t);let f=n.length-this.#o.length;if(!dM(this.#l,n,0)||!dM(this.#o,n,f))return!1}let a=!this.options.dot&&t.startsWith(".");if(this.#c){if(t==="."||t===".."||a&&!s)return!1;if(this.#u)return!0;n??=Rp(t);let f=n.length-this.#o.length;return mZ(this.#c,n,s,f)}if(n??=Rp(t),t==="."||t===".."){this.#t??=fM(this.#n);let f=this.#i??=new Pl(!0,!1,this.#t),h=f.state();f.add(h,this.#e,0,!0);let d=f.done(h);for(let g=0;g<n.length;g++)d=f.step(d,n[g],g,!0);return d.match}this.#t??=fM(this.#n);let o=this.#v??=new Rk(this.#e,this.#t),c=o.start(a),l=n===t;for(let f=0;f<n.length;f++){if(c.dead)return!1;let h=l?t.charCodeAt(f):n[f].charCodeAt(0);c=c.ascii?.[h]??o.next(c,n[f])}return c.match}toString(){return dZ(this.#e)}};Dp.Matcher=Dk});var SM=x(jp=>{"use strict";p();Object.defineProperty(jp,"__esModule",{value:!0});jp.assertValidPattern=void 0;var vZ=1024*64,bZ=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>vZ)throw new TypeError("pattern is too long")};jp.assertValidPattern=bZ});var Bk=x(Bp=>{"use strict";p();Object.defineProperty(Bp,"__esModule",{value:!0});Bp.escape=void 0;var kZ=(e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!1}={})=>{let r=n?t?e.replace(/[?*()[\]{}]/g,"[$&]"):e.replace(/[?*()[\]\\{}]/g,"\\$&"):t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&"),i=r.charAt(0);return i==="#"?(t?"[#]":"\\#")+r.slice(1):i==="!"?(t?"@(!)":"\\!")+r.slice(1):r};Bp.escape=kZ});var Fk=x(Nl=>{"use strict";p();Object.defineProperty(Nl,"__esModule",{value:!0});Nl.unescape=void 0;var SZ=(e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!0}={})=>t&&e.startsWith("@(!)")?"!"+(0,Nl.unescape)(e.slice(4),{windowsPathsNoEscape:t,magicalBraces:n}):n?t?e.replace(/\[([^/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^/\\])\]/g,"$1$2").replace(/\\([^/])/g,"$1"):t?e.replace(/\[([^/\\{}])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^/\\{}])\]/g,"$1$2").replace(/\\([^/{}])/g,"$1");Nl.unescape=SZ});var Yk=x(oe=>{"use strict";p();Object.defineProperty(oe,"__esModule",{value:!0});oe.unescape=oe.escape=oe.Minimatch=oe.match=oe.braceExpand=oe.defaults=oe.filter=oe.GLOBSTAR=oe.sep=oe.minimatch=void 0;var TZ=V9(),TM=kM(),$p=SM(),wZ=Bk(),xZ=Fk(),NM=1e5,CM=200,Kk="allowWindowsEscape",EZ=(e,t,n)=>((0,$p.assertValidPattern)(t),!n?.nocomment&&t.charAt(0)==="#"?!1:qM(t,n).match(e));oe.minimatch=EZ;var Cl=new Map,wM=new Map,Vk=0,$k=0,AZ=256,OZ=32768,LM=4096,PZ=e=>{let t=e.pattern.length;for(let n of e.globSet)if(t+=n.length+1,t>LM)break;return t},NZ=e=>e===void 0?0:e?2:1,CZ=new Map(Object.keys({nobrace:0,nocomment:0,nonegate:0,noglobstar:0,noext:0,nonull:0,partial:0,dot:0,nocase:0,nocaseMagicOnly:0,magicalBraces:0,matchBase:0,flipNegate:0,preserveMultipleSlashes:0,windowsNoMagicRoot:0}).map((e,t)=>[e,24*3**t])),LZ=e=>{let t=0,n=!1;for(let r in e){let i=e[r];switch(r){case"windowsPathsNoEscape":i&&(n=!0);break;case Kk:i===!1&&(n=!0);break;case"platform":{let s=i||Up;if(s===Up)break;if(s==="darwin")t+=3;else if(s==="win32")t+=6;else if(s==="linux")t+=9;else return JSON.stringify(e);break}case"optimizationLevel":if(i===void 0)break;t+=i>=2?1:i>=1?0:2;break;case"braceExpandMax":if(i!==void 0&&i!==NM)return JSON.stringify(e);break;case"maxGlobstarRecursion":if(i!==void 0&&i!==CM)return JSON.stringify(e);break;case"normalize":if(i!==void 0)return JSON.stringify(e);break;default:t+=(CZ.get(r)??0)*NZ(i)}}return n?t+12:t},qZ=e=>{let t={};for(let n in e)t[n]=e[n];return t},qM=(e,t)=>{let n=t?LZ(t):0,r=Cl.get(n)?.get(e);if(r)return r;r=wM.get(n)?.get(e)??new ac(e,qZ(t));let i=PZ(r);if(i>LM)return r;(Vk>=AZ||$k+i>OZ)&&(wM=Cl,Cl=new Map,Vk=0,$k=0);let s=Cl.get(n);return s||Cl.set(n,s=new Map),s.set(e,r),Vk++,$k+=i,r},Up=typeof process=="object"&&process?process.env?.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",xM={win32:{sep:"\\"},posix:{sep:"/"}};oe.sep=Up==="win32"?xM.win32.sep:xM.posix.sep;oe.minimatch.sep=oe.sep;oe.GLOBSTAR=Symbol("globstar **");oe.minimatch.GLOBSTAR=oe.GLOBSTAR;var IZ=(e,t)=>{let n;return r=>(n??=qM(e,t)).match(r)};oe.filter=IZ;oe.minimatch.filter=oe.filter;var yi=(e,t={})=>Object.assign({},e,t),MZ=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return oe.minimatch;let t=oe.minimatch;return Object.assign((r,i,s={})=>t(r,i,yi(e,s)),{Minimatch:class extends t.Minimatch{constructor(i,s={}){super(i,yi(e,s))}static defaults(i){return t.defaults(yi(e,i)).Minimatch}},unescape:(r,i={})=>t.unescape(r,yi(e,i)),escape:(r,i={})=>t.escape(r,yi(e,i)),filter:(r,i={})=>t.filter(r,yi(e,i)),defaults:r=>t.defaults(yi(e,r)),braceExpand:(r,i={})=>t.braceExpand(r,yi(e,i)),match:(r,i,s={})=>t.match(r,i,yi(e,s)),sep:t.sep,GLOBSTAR:oe.GLOBSTAR})};oe.defaults=MZ;oe.minimatch.defaults=oe.defaults;var RZ=(e,t={})=>{if((0,$p.assertValidPattern)(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e))return[e];let n=e.replace(/\\\\/g,"\\\\\\\\");return(t.windowsPathsNoEscape||t[Kk]===!1)&&(n=n.replace(/\[([{}])\]/g,"[\\$1]")),(0,TZ.expand)(n,{max:t.braceExpandMax})};oe.braceExpand=RZ;oe.minimatch.braceExpand=oe.braceExpand;var DZ=100,jZ=/(?<![\\$])\{(-?\d+)\.\.(-?\d+)\}/g,BZ=(e,t)=>{let n=[];for(let r=0;r<e.length;r++){let i=e.charAt(r);if(i==="\\")r++;else if(i===t){if(n.some(s=>s!=="@"&&s!=="?"))return!0}else e.charAt(r+1)==="("&&"!?+*@".includes(i)?(n.push(i),r++):i===")"&&n.pop()}return!1},FZ=(e,t,n={})=>{let r=new ac(t,n);return e=e.filter(i=>r.match(i)),r.options.nonull&&!e.length&&e.push(t),e};oe.match=FZ;oe.minimatch.match=oe.match;var EM=/[?*]|[+@!]\(.*?\)|\[|\]/,IM=(e,t)=>{let n=t+1;(e.charAt(n)==="!"||e.charAt(n)==="^")&&n++;let r=!1;for(;n<e.length;n++){let i=e.charAt(n);if(i==="]"&&r)return n;r=!0,i==="\\"&&n++}return-1},VZ=(e,t)=>{if(!t&&(e==="+()"||e==="@()"))return e;let n="";for(let r=0;r<e.length;r++){let i=e.charAt(r);if(i==="\\")n+=e.charAt(++r)||i;else{if(i==="*"||i==="?")return;if(i==="["){let s=IM(e,r);if(s===-1){n+=i;continue}let a=e.slice(r+1,s);if(a.startsWith("\\")&&(a=a.slice(1)),[...a].length!==1||"!^".includes(e.charAt(r+1)))return;n+=a,r=s}else{if(!t&&"+@!".includes(i)&&e.charAt(r+1)==="("&&e.includes(")",r+2))return;n+=i}}}return n},MM=256,RM=e=>{let t=0;for(let n=0;n<e.length-1;n++){let r=e.charAt(n);r==="\\"?n++:"+@!?*".includes(r)&&e.charAt(n+1)==="("&&(t++,n++)}return t},$Z=e=>{if(RM(e)>MM)throw new TypeError("pattern has too many extglobs")},UZ=e=>{if(/^[?*+@]\(\)$/.test(e)||e.includes("[:"))return!1;let t=0;for(let n=0;n<e.length;n++){let r=e.charAt(n);if(r==="\\"){if(++n===e.length)return!1}else if(r==="["){let i=IM(e,n);i!==-1&&(n=i)}else if("+@!?*".includes(r)&&e.charAt(n+1)==="(")t++,n++;else if(r===")"){if(!t--)return!1}else if(r==="|"&&!t)return!1}return!t},Uk,AM,ns=(e,t)=>typeof e=="string"?t===e:t!==""&&e.testUnchecked(t),OM=(e,t,n,r,i)=>ns(e,t)?n:r!==void 0&&ns(e,r)?i:-1,Gk=e=>e==="."||e==="..",Hk=e=>typeof e=="string"&&/^[a-z]:$/i.test(e),Vp=e=>typeof e=="string"&&/^unc$/i.test(e),zk=e=>{if(e[0]!==""||e[1]!=="")return-1;let t=e[2]!=="?"?2:Vp(e[3])?4:-1,n=e[t],r=e[t+1];return t!==-1&&n!==void 0&&n!==""&&n!==oe.GLOBSTAR&&r!==void 0&&r!==""&&r!==oe.GLOBSTAR?t:-1},Fp=(e,t)=>!Gk(e)&&(t||!e.startsWith(".")),Ll=(e,t,n,r,i)=>{for(let s=t;s<n;){if(e.charCodeAt(s)===46){if(!r)return!0;let o=e.charCodeAt(s+1)===46?s+2:s+1;if(o>=n||Hp(e.charCodeAt(o),i))return!0}let a=Jk(e,s,i);if(a===-1)return!1;for(s=a+1;s<n&&Hp(e.charCodeAt(s),i);)s++}return!1},Hp=(e,t)=>t==="/"?e===47:t==="\\"?e===92:e===47||e===92,Jk=(e,t,n)=>{if(n!=="both")return e.indexOf(n,t);let r=e.indexOf("/",t),i=e.indexOf("\\",t);return r===-1?i:i===-1?r:Math.min(r,i)},PM=(e,t,n)=>n!=="both"?e.lastIndexOf(n,t):Math.max(e.lastIndexOf("/",t),e.lastIndexOf("\\",t)),Wk={},ac=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;#e;#n;#t;#i;#r=[];#a=[];#s=[];#c=new Map;#u=!1;#d;#m=new WeakMap;constructor(t,n={}){(0,$p.assertValidPattern)(t),n=n||{},this.options=n,this.maxGlobstarRecursion=n.maxGlobstarRecursion??CM,this.pattern=t,this.platform=n.platform||Up,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!n.windowsPathsNoEscape||n[Kk]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!n.preserveMultipleSlashes,this.negate=!1,this.nonegate=!!n.nonegate,this.comment=!1,this.empty=!1,this.partial=!!n.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=n.windowsNoMagicRoot!==void 0?n.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.#e=!this.preserveMultipleSlashes,this.#t=(n.optimizationLevel??1)>=2;let r=n.normalize;this.#i=r===!0?"NFC":r||void 0,this.make();let i=this.set.map(s=>this.#o(s));this.#s=this.set.map((s,a)=>this.#e&&s.length-1>i[a]),this.#r=this.set.map((s,a)=>{let o=this.#s[a]?s.length-1:s.length,c=s.slice(i[a]+1,o).filter(l=>typeof l=="string"&&!!l);return[...new Set(c)]}),this.#n=this.#r.some(s=>s.length),this.#a=this.set.map((s,a)=>{let[o,c,l]=s;if(this.#s[a]&&s.length===2&&o===oe.GLOBSTAR&&c!==oe.GLOBSTAR)return"tail";if(this.#s[a]&&n.matchBase&&s.length===1&&o!==oe.GLOBSTAR&&o!=="")return"base";if(!(!this.#e||i[a]!==-1)){if(s.length===3&&o===oe.GLOBSTAR&&l===oe.GLOBSTAR&&c!==oe.GLOBSTAR&&c!==""&&this.maxGlobstarRecursion>0)return"mid";if(s.length===2&&c===oe.GLOBSTAR&&o!==oe.GLOBSTAR&&o!=="")return"head"}})}#l(t){return this.#i?t.normalize(this.#i):t}#o(t){if(!this.isWindows)return-1;if(Hk(t[0]))return 0;if(t[0]===""&&t[1]===""&&t[2]==="?"&&Hk(t[3]))return 3;let r=zk(t);return r===-1?-1:r+1}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let n of t)if(typeof n!="string")return!0;return!1}make(){let t=this.pattern,n=this.options;if(!n.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.#E())];let r=this.globSet.map(s=>this.#S(s));this.globParts=this.preprocess(r),this.#u=!0;let i=this.globParts.map((s,a,o)=>{if(this.isWindows&&this.windowsNoMagicRoot){let c=s[2]==="?"&&Vp(s[3])?6:4,l=s[0]===""&&s[1]===""&&(s[2]==="?"||!EM.test(s[2]))&&s.slice(3,c).every(h=>!EM.test(h)),f=/^[a-z]:/i.test(s[0]);if(l)return[...s.slice(0,c).map(h=>this.#l(h)),...s.slice(c).map(h=>this.parse(h))];if(f)return[this.#l(s[0]),...s.slice(1).map(h=>this.parse(h))]}return s.map(c=>this.parse(c))});if(this.set=i.filter(s=>s.indexOf(!1)===-1),this.isWindows)for(let s=0;s<this.set.length;s++){let a=this.set[s];a[0]===""&&a[1]===""&&this.globParts[s][2]==="?"&&(Hk(a[3])||Vp(this.globParts[s][3]))&&(Vp(this.globParts[s][3])&&(a[3]="UNC"),a[2]="?")}n.noext||this.mergeRows(),this.#u=!1,this.set.forEach((s,a)=>{for(let o=0;o<s.length;o++)s[o]===Wk&&(s[o]=this.parse(this.globParts[a][o]))})}mergeRows(){let t=!0;for(;t;){if(t=!1,this.set.length<2)return;let n=this.#h(),r=Math.max(0,...this.set.map(i=>i.length));for(let i=0;i<r;i++){let s=new Map,a=this.set.length+1;this.set.forEach((c,l)=>{if(!(c[i]instanceof TM.Matcher||c[i]===Wk)||!UZ(this.globParts[l][i]))return;let{pre:f,suf:h}=n[l],d=f[i]*a+h[i+1],g=s.get(d);g?g.push(l):s.set(d,[l])});let o=new Set;for(let c of s.values()){if(c.length<2)continue;let[l,...f]=c,d=`@(${c.map(g=>this.globParts[g][i]).join("|")})`;if(!(RM(d)>MM)){this.globParts[l][i]=d,this.set[l][i]=this.parse(d);for(let g of f)o.add(g)}}if(o.size){if(t=!0,this.set=this.set.filter((c,l)=>!o.has(l)),this.globParts=this.globParts.filter((c,l)=>!o.has(l)),this.set.length<2)return;n=this.#h()}}}}#h(){let t=new Map,n=this.globParts.map(a=>a.map(o=>{let c=t.get(o);return c===void 0&&t.set(o,c=t.size),c})),r=t.size,i=Math.max(0,...n.map(a=>a.length)),s=n.map(a=>({pre:[0],suf:new Array(a.length+1).fill(0)}));for(let a=0;a<i;a++){let o=new Map;n.forEach((c,l)=>{if(a>=c.length)return;let{pre:f}=s[l],h=f[a]*r+c[a],d=o.get(h);d===void 0&&o.set(h,d=o.size+1),f.push(d)})}for(let a=i-1;a>=0;a--){let o=new Map;n.forEach((c,l)=>{if(a>=c.length)return;let{suf:f}=s[l],h=f[a+1]*r+c[a],d=o.get(h);d===void 0&&o.set(h,d=o.size+1),f[a]=d})}return s}preprocess(t){if(this.options.noglobstar)for(let r of t)for(let i=0;i<r.length;i++)r[i]==="**"&&(r[i]="*");let{optimizationLevel:n=1}=this.options;return n>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):n>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(n=>{let r=-1;for(;(r=n.indexOf("**",r+1))!==-1;){let i=r;for(;n[i+1]==="**";)i++;i!==r&&n.splice(r,i-r)}return n})}levelOneOptimize(t){return t.map(n=>{let r=this.#o(n)+1;return n=n.reduce((i,s)=>{let a=i[i.length-1];return s==="**"&&a==="**"?i:s===".."&&i.length>r&&a&&a!==".."&&a!=="."&&a!=="**"?(i.pop(),i):(i.push(s),i)},[]),n.length===0?[""]:n})}#g(t){let n=!this.isWindows||!t.includes("\\")?"/":t.includes("/")?"both":"\\",r=this.#e?0:-1,i="",s=0,a,o=0,c=!!this.options.dot;e:for(let l=0;l<this.set.length;l++){let f=this.set[l],h=f[f.length-1],d=r!==-1&&this.#s[l]&&h!==oe.GLOBSTAR;if(d&&r===0){let b=PM(t,t.length,n);if(s=b+1,i=t.slice(s),i===""&&b>=0){let k=b;for(;k>0&&Hp(t.charCodeAt(k-1),n);)k--;o=k===0?0:PM(t,k-1,n)+1,a=t.slice(o,k)}let _=this.#t&&(Gk(i)||i===""&&a!==void 0&&Gk(a));r=_?-1:1,d=!_}let g=-1;if(d&&typeof h=="string"&&(g=OM(h,i,s,a,o),g===-1))continue;if(this.#n){for(let b of this.#r[l])if(!t.includes(b))continue e}if(d&&typeof h=="object"&&(g=OM(h,i,s,a,o),g===-1))continue;let v=this.#a[l];if(v==="base"&&d)return"yes";if(v==="tail"&&d){if(this.#t&&Ll(t,0,g,!0,n))return"maybe";if(!Ll(t,0,g,c,n))return"yes";continue}if(v==="mid"||v==="head"){let b=this.#v(t,f,v==="head",c,n);if(b!=="no")return b;continue}return"maybe"}return"no"}#_(t,n,r){let i=!!this.options.dot,s=t.length;if(r==="head"){if(s<2||!ns(n[0],t[0]))return!1;for(let o=1;o<s;o++)if(!Fp(t[o],i))return!1;return!0}let a=n[1];if(r==="tail"){let o=s-1;if(!ns(a,t[o])&&(t[o]!==""||s===1||!ns(a,t[--o])))return!1;for(let c=0;c<o;c++)if(!Fp(t[c],i))return!1;return!0}for(let o=0;o<s;o++){if(ns(a,t[o])&&o+1<s){let c=o+1;for(;c<s&&Fp(t[c],i);)c++;if(c===s)return!0}if(!Fp(t[o],i))return!1}return!1}#v(t,n,r,i,s){if(this.#t&&Ll(t,0,t.length,!0,s))return"maybe";let a=n[r?0:1],o=0;for(let c=Jk(t,o,s);c!==-1;c=Jk(t,o,s)){let l=c+1;for(;l<t.length&&Hp(t.charCodeAt(l),s);)l++;if((typeof a=="string"?c-o===a.length&&t.startsWith(a,o):c>o&&a.testUnchecked(t.slice(o,c)))&&!Ll(t,l,t.length,i,s))return"yes";if(r||Ll(t,o,l,i,s))return"no";o=l}return"no"}#f(t){let n=Uk;return n?.f===t&&n.isWindows===this.isWindows&&n.preserveMultipleSlashes===this.preserveMultipleSlashes&&n.normalize===this.#i?n:void 0}#p(t){let{isWindows:n,preserveMultipleSlashes:r}=this,i=this.#S(n?t.split("\\").join("/"):t),s=this.#i;return s&&(i=i.map(a=>a.normalize(s))),Uk={f:t,isWindows:n,preserveMultipleSlashes:r,normalize:s,parts:i},Uk}#T(t){let n=[...t],r=!1;do{if(r=!1,!this.preserveMultipleSlashes){for(let a=1;a<n.length-1;a++){let o=n[a];a===1&&o===""&&n[0]===""||(o==="."||o==="")&&(r=!0,n.splice(a,1),a--)}n[0]==="."&&n.length===2&&(n[1]==="."||n[1]==="")&&(r=!0,n.pop())}let i=this.#o(n)+1,s=i;for(;(s=n.indexOf("..",s+1))!==-1;){let a=n[s-1];a&&a!=="."&&a!==".."&&a!=="**"&&(r=!0,n.splice(s-1,2),s=Math.max(s-2,i))}}while(r);return n.length===0?[""]:n}firstPhasePreProcess(t){let{braceExpandMax:n=NM}=this.options,r=0,i=1e6,s=!1;do{s=!1;for(let a of t){let o=-1;for(;(o=a.indexOf("**",o+1))!==-1;){let f=o;for(;a[f+1]==="**";)f++;f>o&&a.splice(o+1,f-o);let h=a[o+1],d=a[o+2],g=a[o+3];if(h!==".."||!d||d==="."||d===".."||!g||g==="."||g==="..")continue;let v=a.length-1;if(t.length>=n||r+v>i)throw new RangeError("optimizationLevel 2: too many patterns from '**/..'");s=!0,a.splice(o,1);let b=a.slice(0);b[o]="**",r+=v,t.push(b),o--}if(!this.preserveMultipleSlashes){for(let f=1;f<a.length-1;f++){let h=a[f];f===1&&h===""&&a[0]===""||(h==="."||h==="")&&(s=!0,a.splice(f,1),f--)}a[0]==="."&&a.length===2&&(a[1]==="."||a[1]==="")&&(s=!0,a.pop())}let c=this.#o(a)+1,l=c;for(;(l=a.indexOf("..",l+1))!==-1;){let f=a[l-1];if(f&&f!=="."&&f!==".."&&f!=="**"){s=!0;let d=l===1&&a[l+1]==="**"?["."]:[];a.splice(l-1,2,...d),a.length===0&&a.push(""),l=Math.max(l-2,c)}}}}while(s);return t}secondPhasePreProcess(t){let n=new Set,r=t.filter(a=>{let o=a.join("/");return n.has(o)?!1:(n.add(o),!0)}),i=new Map;for(let a of r){let o=[];for(let c=0;c<a.length;c++)a[c]==="*"&&o.push(c);o.length&&i.set(o.join(","),o)}if(!i.size||r.length*i.size>1e5)return r;let{dot:s}=this.options;return r.filter(a=>{for(let o of i.values()){if(o[o.length-1]>=a.length)continue;let c=[...a],l=!0,f=!1;for(let h of o){let d=a[h];if(d!=="*"){if(!d||d==="**"||!s&&d.startsWith(".")){l=!1;break}c[h]="*",f=!0}}if(l&&f&&n.has(c.join("/")))return!1}return!0})}parseNegate(){if(this.nonegate)return;let t=this.pattern,n=!1,r=0;for(let i=0;i<t.length&&t.charAt(i)==="!";i++)n=!n,r++;r&&(this.pattern=t.slice(r)),this.negate=n}#b(t,n,r,i){let s=0,a=0,o=this.isWindows?zk(n):-1,c=o===-1?-1:zk(r);if(c!==-1){let l=r[c],f=r[c+1];typeof l!="string"||typeof f!="string"?(s=o,a=c):n[o].toLowerCase()===l.toLowerCase()&&n[o+1].toLowerCase()===f.toLowerCase()&&(s=o+2,a=c+2)}else if(this.isWindows){let l=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),f=!l&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),h=typeof r[0]=="string"&&/^[a-z]:$/i.test(r[0]),d=!h&&r[0]===""&&r[1]===""&&r[2]==="?"&&typeof r[3]=="string"&&/^[a-z]:$/i.test(r[3]),g=f?3:l?0:void 0,v=d?3:h?0:void 0;if(typeof g=="number"&&typeof v=="number"){let[b,_]=[t[g],r[v]];b.toLowerCase()===_.toLowerCase()&&(a=v+1,s=g+1)}}return t=n,r.includes(oe.GLOBSTAR)?this.#w(t,r,i,s,a):this.#y(t,r,i,s,a)}#w(t,n,r,i,s){let{head:a,body:o,tail:c,segments:l}=this.#x(n,r,s);if(a.length){let h=i+a.length;if(!this.#y(t,a,r,i,0,h))return!1;i+=a.length,s+=a.length}let f=0;if(c.length){if(c.length+i>t.length)return!1;let h=t.length-c.length;if(this.#y(t,c,r,h,0))f=c.length;else{if(t[t.length-1]!==""||i+c.length===t.length||(h--,!this.#y(t,c,r,h,0)))return!1;f=c.length+1}}if(!o.length){let h=!!f;for(let d=i;d<t.length-f;d++){let g=String(t[d]);if(h=!0,g==="."||g===".."||!this.options.dot&&g.startsWith("."))return!1}return r||h}return!!this.#k(t,l,t.length-f,i,0,r,0,!!f,new Set)}#x(t,n,r){let i=this.#m.get(t);i||(i=[],this.#m.set(t,i));let s=r*2+(n?1:0),a=i[s];if(a)return a;let o=t.indexOf(oe.GLOBSTAR,r),c=t.lastIndexOf(oe.GLOBSTAR),l=t.slice(r,o),f=t.slice(o+1,n?void 0:c),h=n?[]:t.slice(c+1),d=[[[],0]],g=d[0],v=0,b=[0];for(let k of f)k===oe.GLOBSTAR?(b.push(v),g=[[],0],d.push(g)):(g[0].push(k),v++);d.forEach((k,T)=>{k[1]=v-b[T]});let _={head:l,body:f,tail:h,segments:d};return i[s]=_,_}#k(t,n,r,i,s,a,o,c,l){let f=n[s];if(!f){if(a)return i>=r||i===r-1&&t[i]==="";for(let v=i;v<r;v++){c=!0;let b=t[v];if(b==="."||b===".."||!this.options.dot&&b.startsWith("."))return!1}return c}let[h,d]=f,g=a?r:r-d;for(;i<=g;){let v=s*(t.length+1)+i;if(l.has(v))return!1;if(l.add(v),this.#y(t,h,a,i,0,i+h.length)&&o<this.maxGlobstarRecursion){let k=this.#k(t,n,r,i+h.length,s+1,a,o+1,c,l);if(k!==!1)return k}if(i===g)break;let _=t[i];if(_==="."||_===".."||!this.options.dot&&_.startsWith("."))return!1;i++}return a||null}#y(t,n,r,i,s,a=t.length){let o,c,l,f;for(o=i,c=s,f=Math.min(a,t.length),l=n.length;o<f&&c<l;o++,c++){let h=n[c],d=t[o];if(h===!1||h===oe.GLOBSTAR||!ns(h,d))return!1}if(o===f&&c===l)return!0;if(o===f)return r;if(c===l)return o===f-1&&t[o]==="";throw new Error("wtf?")}braceExpand(){return(0,oe.braceExpand)(this.pattern,this.options)}#E(){let{pattern:t}=this;if(this.options.nobrace)return this.braceExpand();let n=57344;for(;t.includes(String.fromCharCode(n));)if(++n>63743)return this.braceExpand();let r=String.fromCharCode(n),i=!1,s=t.replace(jZ,(o,c,l)=>{let f=Number(c),h=Number(l);return!Number.isSafeInteger(f)||!Number.isSafeInteger(h)||Math.abs(f-h)+1<DZ?o:(i=!0,`${r}${c}..${l}${r}`)});if(!i)return this.braceExpand();let a=(0,oe.braceExpand)(s,this.options);for(let o of a)for(let c of o.split("/")){let l=c.indexOf("[");if(l!==-1&&l<c.lastIndexOf(r))return this.braceExpand();if(!this.options.noext&&BZ(c,r))return this.braceExpand()}return this.#d=r,a}parse(t){(0,$p.assertValidPattern)(t);let n=this.options;if(t==="**")return oe.GLOBSTAR;if(t==="")return"";let{nocase:r,nocaseMagicOnly:i,noext:s=!1,dot:a,normalize:o}=n,c=this.#d,l=c&&t.includes(c)?void 0:VZ(t,s);if(l!==void 0&&!(r&&!i&&t.toUpperCase()!==t.toLowerCase()))return this.#l(l);if(this.#u)return Wk;let f=this.#c.get(t);return f||(s||$Z(t),f=new TM.Matcher(t,{nocase:r,noext:s,dot:a,normalize:o,...c&&{rangeMark:c}}),this.#c.set(t,f)),f}#S(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,n=this.partial){if(this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&n)return!0;let r=this.options,i=this.#f(t);if(!i){if(!n&&!this.#i&&(this.#e||this.#n)&&AM!==t){AM=t;let l=this.#g(t);if(l==="no")return r.flipNegate?!1:this.negate;if(l==="yes")return r.flipNegate?!0:!this.negate}i=this.#p(t)}let s=i.parts,a=this.#t?i.resolved??=this.#T(s):s,o=this.set,c=s[s.length-1];if(!c)for(let l=s.length-2;!c&&l>=0;l--)c=s[l];for(let l=0;l<o.length;l++){let f=o[l],h=n?void 0:this.#a[l];if(h==="base"?ns(f[0],c):h?this.#_(a,f,h):r.matchBase&&f.length===1?this.#b([c],[c],f,n):this.#b(s,a,f,n))return r.flipNegate?!0:!this.negate}return r.flipNegate?!1:this.negate}static defaults(t){return oe.minimatch.defaults(t).Minimatch}};oe.Minimatch=ac;var HZ=Bk();Object.defineProperty(oe,"escape",{enumerable:!0,get:function(){return HZ.escape}});var zZ=Fk();Object.defineProperty(oe,"unescape",{enumerable:!0,get:function(){return zZ.unescape}});oe.minimatch.Minimatch=ac;oe.minimatch.escape=wZ.escape;oe.minimatch.unescape=xZ.unescape});var Xk=x(Qk=>{"use strict";p();Object.defineProperty(Qk,"__esModule",{value:!0});Qk.isIgnored=GZ;var WZ=Yk();function GZ(e,t,n){return[...JZ(n,t),...DM(t.ignore)].map(i=>i.replace(/^\//,t.rootUri+"/").replace(/^([^\/])/,"**/$1").replace(/\/\*$/,"/**")).some(i=>(0,WZ.minimatch)(e,i,{dot:!0}))}function JZ(e,t){return e?DM(t.settings[e.meta.code]?.ignore):[]}function DM(e){return e??[]}});var BM=x(Zk=>{"use strict";p();Object.defineProperty(Zk,"__esModule",{value:!0});Zk.visitLiquid=YZ;var KZ=ue();function jM(e){return!!e&&typeof e=="object"&&"type"in e}function YZ(e,t){let n=[{node:e,ancestors:[]}];for(;n.length>0;){let{node:r,ancestors:i}=n.pop(),s=i.concat(r);t(r.type,r,i);for(let a in r){if(!r.hasOwnProperty(a)||KZ.nonTraversableProperties.has(a))continue;let o=r[a];if(Array.isArray(o))for(let c=o.length-1;c>=0;c--){let l=o[c];jM(l)&&n.push({node:l,ancestors:s})}else jM(o)&&n.push({node:o,ancestors:s})}t(`${r.type}:exit`,r,i)}}});var VM=x(eS=>{"use strict";p();Object.defineProperty(eS,"__esModule",{value:!0});eS.visitJSON=XZ;function FM(e){return!!e&&typeof e=="object"&&"type"in e}var QZ=new Set(["loc"]);async function XZ(e,t){let n=[{node:e,ancestors:[]}],r;for(;n.length>0;){let{node:i,ancestors:s}=n.pop(),a=s.concat(i);r=t[i.type],r&&await r(i,s);for(let o in i){if(!i.hasOwnProperty(o)||QZ.has(o))continue;let c=i[o];if(Array.isArray(c))for(let l=c.length-1;l>=0;l--){let f=c[l];FM(f)&&n.push({node:f,ancestors:a})}else FM(c)&&n.push({node:c,ancestors:a})}r=t[`${i.type}:exit`],r&&await r(i,s)}}});var $M=x(oc=>{"use strict";p();Object.defineProperty(oc,"__esModule",{value:!0});oc.visitJSON=oc.visitLiquid=void 0;var ZZ=BM();Object.defineProperty(oc,"visitLiquid",{enumerable:!0,get:function(){return ZZ.visitLiquid}});var eee=VM();Object.defineProperty(oc,"visitJSON",{enumerable:!0,get:function(){return eee.visitJSON}})});var UM=x(cc=>{"use strict";p();Object.defineProperty(cc,"__esModule",{value:!0});cc.AppBlockValidTags=cc.ForbiddenTag=void 0;var tS=J(),nS;(function(e){e.JavaScript="javascript",e.StyleSheet="stylesheet",e.Include="include",e.Layout="layout",e.Section="section",e.Sections="sections"})(nS||(cc.ForbiddenTag=nS={}));var tee=e=>Object.values(nS).includes(e),nee=e=>`Theme app extension blocks cannot contain '${e}' tags`;cc.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:tS.SourceCodeType.LiquidHtml,severity:tS.Severity.ERROR,schema:{},targets:[tS.ConfigTarget.ThemeAppExtension]},create(e){let t=async n=>{if(tee(n.name)){let r=n.blockEndPosition?n.blockEndPosition.end:n.position.end,i=n.blockStartPosition.start,s=nee(n.name);return e.report({message:s,startIndex:i,endIndex:r})}};return{LiquidRawTag:t,LiquidTag:t}}}});var WM=x(zp=>{"use strict";p();Object.defineProperty(zp,"__esModule",{value:!0});zp.AssetPreload=void 0;var zM=ue(),HM=J(),_i=Ue();function ree(e){return(0,_i.isAttr)(e,"rel")&&e.value.some(t=>t.type===zM.NodeTypes.TextNode&&t.value==="preload")}function iee(e){return e.some(t=>(0,_i.isAttr)(t,"as")&&(0,_i.hasAttributeValueOf)(t,"image"))&&e.some(t=>(0,_i.isAttr)(t,"fetchpriority")&&(0,_i.hasAttributeValueOf)(t,"high"))}zp.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:HM.SourceCodeType.LiquidHtml,severity:HM.Severity.WARNING,schema:{},targets:[]},create(e){return{async HtmlVoidElement(t){let n=t.attributes.find(r=>(0,_i.isValuedHtmlAttribute)(r)&&ree(r));if(t.name==="link"&&n){let r=t.attributes.filter(_i.isValuedHtmlAttribute);if(iee(r))return;let s=r.find(o=>(0,_i.isAttr)(o,"as"))?.value.find(o=>(0,_i.isNodeOfType)(zM.NodeTypes.TextNode,o))?.value,a="";s==="style"?a="For better performance, prefer using the preload argument of the stylesheet_tag filter":s==="image"?a="For better performance, prefer using the preload argument of the image_tag filter":a="For better performance, prefer using the preload_tag filter",e.report({message:a,startIndex:t.position.start,endIndex:t.position.end})}}}}}});var GM=x(Gp=>{"use strict";p();Object.defineProperty(Gp,"__esModule",{value:!0});Gp.AssetSizeAppBlockCSS=void 0;var see=Be(),Wp=J(),aee=Ne(),rS=bn(),oee={thresholdInBytes:Wp.SchemaProp.number(1e5)};Gp.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:Wp.SourceCodeType.LiquidHtml,severity:Wp.Severity.ERROR,schema:oee,targets:[Wp.ConfigTarget.ThemeAppExtension]},create(e){return e.fileSize?{async LiquidRawTag(t){if(t.name!=="schema")return;let n=(0,see.parseJSON)(t.body.value);if((0,aee.isError)(n))return;let r=n.stylesheet;if(!r)return;let i=`assets/${r}`,s=e.settings.thresholdInBytes,a=t.body.position.start+t.body.value.indexOf(r),o=a+r.length;if(!(0,rS.isAssetFileName)(e,r)){e.report({message:`'${r}' must be the name of a file in the assets directory.`,startIndex:a,endIndex:o});return}if(!await(0,rS.doesFileExist)(e,i)){e.report({message:`'${r}' does not exist.`,startIndex:a,endIndex:o});return}let[l,f]=await(0,rS.doesFileExceedThreshold)(e,i,s);l&&e.report({message:`The file size for '${r}' (${f} B) exceeds the configured threshold (${s} B)`,startIndex:a,endIndex:o})}}:{}}}});var JM=x(Kp=>{"use strict";p();Object.defineProperty(Kp,"__esModule",{value:!0});Kp.AssetSizeAppBlockJavaScript=void 0;var cee=Be(),Jp=J(),uee=Ne(),iS=bn(),lee={thresholdInBytes:Jp.SchemaProp.number(1e4)};Kp.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:Jp.SourceCodeType.LiquidHtml,severity:Jp.Severity.ERROR,schema:lee,targets:[Jp.ConfigTarget.ThemeAppExtension]},create(e){return e.fileSize?{async LiquidRawTag(t){if(t.name!=="schema")return;let n=(0,cee.parseJSON)(t.body.value);if((0,uee.isError)(n))return;let r=n.javascript;if(!r)return;let i=`assets/${r}`,s=e.settings.thresholdInBytes,a=t.body.position.start+t.body.value.indexOf(r),o=a+r.length;if(!(0,iS.isAssetFileName)(e,r)){e.report({message:`'${r}' must be the name of a file in the assets directory.`,startIndex:a,endIndex:o});return}if(!await(0,iS.doesFileExist)(e,i)){e.report({message:`'${r}' does not exist.`,startIndex:a,endIndex:o});return}let[l,f]=await(0,iS.doesFileExceedThreshold)(e,i,s);l&&e.report({message:`The file size for '${r}' (${f} B) exceeds the configured threshold (${s} B)`,startIndex:a,endIndex:o})}}:{}}}});var YM=x(Yp=>{"use strict";p();Object.defineProperty(Yp,"__esModule",{value:!0});Yp.AssetSizeCSS=void 0;var lc=ue(),sS=J(),fee=Ne(),KM=bn(),uc=Ue(),dee={thresholdInBytes:sS.SchemaProp.number(1e5)};function hee(e){return e.type===lc.NodeTypes.TextNode}function pee(e){return e.type===lc.NodeTypes.LiquidVariableOutput}function mee(e){return typeof e!="string"&&e.type===lc.NodeTypes.LiquidVariable}function gee(e){return e.type===lc.NodeTypes.String}Yp.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:sS.SourceCodeType.LiquidHtml,severity:sS.Severity.ERROR,schema:dee,targets:[]},create(e){if(!e.fileSize)return{};let t=e.settings.thresholdInBytes;async function n(i,s){await(0,KM.hasRemoteAssetSizeExceededThreshold)(e,i,t)&&e.report({message:`The CSS file size exceeds the threshold of ${t} bytes`,startIndex:s.start,endIndex:s.end})}async function r(i,s){await(0,KM.hasLocalAssetSizeExceededThreshold)(e,`assets/${i}`,t)&&e.report({message:`The CSS file size exceeds the threshold of ${t} bytes`,startIndex:s.start,endIndex:s.end})}return{async HtmlVoidElement(i){if(i.name!=="link"||!i.attributes.filter(uc.isValuedHtmlAttribute).find(o=>(0,uc.isAttr)(o,"rel")&&(0,uc.valueIncludes)(o,"stylesheet")))return;let a=i.attributes.filter(uc.isValuedHtmlAttribute).find(o=>(0,uc.isAttr)(o,"href"));if(a&&a.value.length===1){if(hee(a.value[0])&&/(https?:)?\/\//.test(a.value[0].value)){let o=a.value[0].value;await n(o,a.attributePosition)}if(pee(a.value[0])&&mee(a.value[0].markup)&&gee(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 r(o,a.attributePosition)}}},async LiquidFilter(i,s){if(i.name!=="stylesheet_tag")return;let a=(0,fee.last)(s);if(!(!a||!(0,uc.isNodeOfType)(lc.NodeTypes.LiquidVariable,a))&&a.expression.type===lc.NodeTypes.String){if(a.expression.value[0].length==1&&a.filters.length==1&&/(https?:)?\/\//.test(a.expression.value)){let o=a.expression.value;await n(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 r(o,a.position)}}}}}}});var XM=x(Qp=>{"use strict";p();Object.defineProperty(Qp,"__esModule",{value:!0});Qp.AssetSizeJavaScript=void 0;var fc=ue(),oS=J(),yee=Ne(),QM=bn(),aS=Ue(),_ee={thresholdInBytes:oS.SchemaProp.number(1e4)};function vee(e){return e.type===fc.NodeTypes.TextNode}function bee(e){return e.type===fc.NodeTypes.LiquidVariableOutput}function kee(e){return typeof e!="string"&&e.type===fc.NodeTypes.LiquidVariable}function See(e){return e.type===fc.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:oS.SourceCodeType.LiquidHtml,severity:oS.Severity.ERROR,schema:_ee,targets:[]},create(e){if(!e.fileSize)return{};let t=e.settings.thresholdInBytes;async function n(i,s){await(0,QM.hasRemoteAssetSizeExceededThreshold)(e,i,t)&&e.report({message:`JavaScript on every page load exceeds compressed size threshold (${t} Bytes), consider using the import on interaction pattern.`,startIndex:s.start,endIndex:s.end})}async function r(i,s){await(0,QM.hasLocalAssetSizeExceededThreshold)(e,`assets/${i}`,t)&&e.report({message:`JavaScript on every page load exceeds compressed size threshold (${t} Bytes), consider using the import on interaction pattern.`,startIndex:s.start,endIndex:s.end})}return{async HtmlRawNode(i){if(i.name!=="script")return;let s=i.attributes.filter(aS.isValuedHtmlAttribute).find(a=>(0,aS.isAttr)(a,"src"));if(s&&s.value.length===1){if(vee(s.value[0])&&/(https?:)?\/\//.test(s.value[0].value)){let a=s.value[0].value;await n(a,s.attributePosition)}if(bee(s.value[0])&&kee(s.value[0].markup)&&See(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 r(a,s.attributePosition)}}},async LiquidFilter(i,s){if(i.name!=="script_tag")return;let a=(0,yee.last)(s);if(!(!a||!(0,aS.isNodeOfType)(fc.NodeTypes.LiquidVariable,a))&&a.expression.type===fc.NodeTypes.String){if(a.expression.value[0].length==1&&a.filters.length==1&&/(https?:)?\/\//.test(a.expression.value)){let o=a.expression.value;await n(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 r(o,a.position)}}}}}}});var nR=x(Zp=>{"use strict";p();Object.defineProperty(Zp,"__esModule",{value:!0});Zp.BlockIdUsage=void 0;var Xp=ue(),ZM=J();Zp.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:ZM.SourceCodeType.LiquidHtml,severity:ZM.Severity.WARNING,schema:{},targets:[]},create(e){return{async Comparison(t,n){t.comparator==="=="&&t.left.type===Xp.NodeTypes.VariableLookup&&eR(t.left)&&tR(e,t.position)},async VariableLookup(t,n){let r=n.at(-1);r?.type===Xp.NodeTypes.LiquidTag&&r.name==="case"&&eR(t)&&tR(e,t.position)}}}};function eR(e){return e.type==Xp.NodeTypes.VariableLookup&&e.name==="block"&&e.lookups[0]&&e.lookups[0].type===Xp.NodeTypes.String&&e.lookups[0].value==="id"}function tR(e,t){e.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:t.start,endIndex:t.end})}});var iR=x(em=>{"use strict";p();Object.defineProperty(em,"__esModule",{value:!0});em.CdnPreconnect=void 0;var Tee=ue(),rR=J(),Ca=Ue();em.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:rR.SourceCodeType.LiquidHtml,severity:rR.Severity.ERROR,schema:{},targets:[]},create(e){function t(n){(0,Ca.getHtmlNodeName)(n)!=="link"||!n.attributes.filter(Ca.isValuedHtmlAttribute).some(s=>(0,Ca.isAttr)(s,"rel")&&(0,Ca.valueIncludes)(s,"preconnect"))||!n.attributes.filter(Ca.isValuedHtmlAttribute).some(s=>(0,Ca.isAttr)(s,"href")&&xee(s))||e.report({message:"Preconnecting to cdn.shopify.com is unnecessary and can lead to worse performance",startIndex:n.position.start,endIndex:n.position.end})}return{async HtmlVoidElement(n){t(n)},async HtmlSelfClosingElement(n){t(n)}}}};var wee=/^(https?:)?\/\/cdn\.shopify\.com(:443)?/i;function xee(e){let[t,...n]=e.value;if(!t||!(0,Ca.isNodeOfType)(Tee.NodeTypes.TextNode,t))return!1;let r=t.value.trim(),i=r.match(wee);if(!i)return!1;let s=r.slice(i[0].length);return s===""?n.length===0:/^[/?#]/.test(s)}});var oR=x(tm=>{"use strict";p();Object.defineProperty(tm,"__esModule",{value:!0});tm.ContentForHeaderModification=void 0;var sR=ue(),aR=J(),Eee=Ue();function Aee(e){return e.name==="assign"&&typeof e.markup!="string"}function Oee(e){return e.name==="capture"&&typeof e.markup!="string"}function Pee(e){return e.name==="echo"&&typeof e.markup!="string"}tm.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:aR.SourceCodeType.LiquidHtml,severity:aR.Severity.ERROR,schema:{},targets:[]},create(e){function t(n,r){(0,Eee.isNodeOfType)(sR.NodeTypes.VariableLookup,n)&&n.name==="content_for_header"&&e.report({message:"Do not rely on the content of `content_for_header`",startIndex:r.start,endIndex:r.end})}return{async LiquidTag(n){if(Aee(n))t(n.markup.value.expression,n.position);else if(Pee(n))t(n.markup.expression,n.position);else if(Oee(n)&&n.children)for(let r of n.children)r.type===sR.NodeTypes.LiquidVariableOutput&&typeof r.markup!="string"&&t(r.markup.expression,r.position)},async LiquidVariableOutput(n){typeof n.markup!="string"&&n.markup.filters.length&&t(n.markup.expression,n.position)}}}}});var uR=x(nm=>{"use strict";p();Object.defineProperty(nm,"__esModule",{value:!0});nm.DeprecateBgsizes=void 0;var cR=J(),ql=Ue();nm.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:cR.SourceCodeType.LiquidHtml,severity:cR.Severity.WARNING,schema:{},targets:[]},create(e){return{async HtmlElement(t){let n=t.attributes.filter(ql.isValuedHtmlAttribute).find(i=>(0,ql.isAttr)(i,"class")&&(0,ql.valueIncludes)(i,"lazyload"));if(n){let i=n;e.report({message:'Use the native loading="lazy" attribute instead of lazysizes',startIndex:i.attributePosition.start,endIndex:i.attributePosition.end})}let r=t.attributes.find(i=>(0,ql.isValuedHtmlAttribute)(i)&&(0,ql.isAttr)(i,"data-bgset"));r&&e.report({message:"Use the CSS imageset attribute instead of data-bgset",startIndex:r.position.start,endIndex:r.position.end})}}}}});var fR=x(rm=>{"use strict";p();Object.defineProperty(rm,"__esModule",{value:!0});rm.DeprecateLazysizes=void 0;var lR=J(),jr=Ue();function Nee(e){return(0,jr.isAttr)(e,"data-srcset")||(0,jr.isAttr)(e,"data-sizes")}rm.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:lR.SourceCodeType.LiquidHtml,severity:lR.Severity.WARNING,schema:{},targets:[]},create(e){function t(n){if((0,jr.getHtmlNodeName)(n)!=="img")return;let r=n.attributes.filter(jr.isHtmlAttribute),i=r.some(c=>(0,jr.isAttr)(c,"src")),s=r.some(c=>(0,jr.isAttr)(c,"loading"));i&&s||!n.attributes.filter(jr.isValuedHtmlAttribute).some(c=>(0,jr.isAttr)(c,"class")&&(0,jr.valueIncludes)(c,"lazyload"))||!n.attributes.filter(jr.isValuedHtmlAttribute).some(Nee)||e.report({message:'Use the native loading="lazy" attribute instead of lazysizes',startIndex:n.position.start,endIndex:n.position.end})}return{async HtmlVoidElement(n){t(n)},async HtmlSelfClosingElement(n){t(n)}}}}});var gR=x(hc=>{"use strict";p();Object.defineProperty(hc,"__esModule",{value:!0});hc.fixHexToRgba=Cee;hc.suggestImgTagFix=Lee;hc.suggestImgUrlFix=qee;hc.suggestImageUrlFix=Iee;var cm=ue(),um=Ue(),dR=5760,hR={pico:16,icon:32,thumb:50,small:100,compact:160,medium:240,large:480,grande:600,original:1024};function Cee(e){if(e.args.length>1)return;let{start:t,end:n}=lm(e),r=dc(e,0),i;return r?i=` color_to_rgb | color_modify: 'alpha', ${r}`:i=" color_to_rgb",s=>s.replace(t,n,i)}function Lee(e){let t="Replace 'img_tag' with 'image_tag'.",n=dc(e,0),r=dc(e,1),i=dc(e,2),{width:s,height:a}=uS(i,{width:-1,height:-1}),{start:o,end:c}=lm(e),l=lS({width:s,height:a}),f={width:s,height:a,alt:am(n),class:am(r)},h=sm("image_url",l),d=sm("image_tag",f);return[{message:t,fix:g=>{let v=`${h} |${d}`;g.replace(o,c,v)}}]}function qee(e){let t="Replace 'img_url' with 'image_url'.",n=im(e,"crop"),r=im(e,"format"),i=im(e,"scale"),s=dc(e,0),a=e.args.at(0);if(cS(i?.value)||cS(a))return;let{width:o,height:c}=lS(Mee(e,uS(s))),{start:l,end:f}=lm(e),h={width:o,height:c};return om(n?.value)&&(h.crop=am(n.value.value)),om(r?.value)&&(h.format=am(r.value.value)),cS(r?.value)&&(h.format=r.value.name),[{message:t,fix:d=>{let g=sm("image_url",h);d.replace(l,f,g)}}]}function Iee(e,t){let n=`Replace '${e}' with 'image_url'.`,r=dc(t,0),{width:i,height:s}=lS(uS(r)),{start:a,end:o}=lm(t);return[{message:n,fix:c=>{let l=sm("image_url",{width:i,height:s});c.replace(a,o,l)}}]}function uS(e,t={width:100,height:100}){if(!e)return{...t};if(e in hR){let i=hR[e];return{width:i,height:i}}let[n,r]=e.split("x").map(i=>parseInt(i));return pR({width:n,height:r})}function Mee(e,t){let n=parseInt(Ree(e,"scale")||"0")||1;return pR({width:t.width*n,height:t.height*n})}function pR(e){return{width:Math.min(e.width,dR),height:Math.min(e.height,dR)}}function lS(e){let{width:t,height:n}=e;return(!n||n===-1)&&(!t||t===-1)&&(t=100),{width:t,height:n}}function dc(e,t){let n=e.args.at(t);if(mR(n)||om(n))return n.value}function Ree(e,t){let r=im(e,t)?.value;if(mR(r)||om(r))return r.value}function im(e,t){return e.args.find(r=>(0,um.isNodeOfType)(cm.NodeTypes.NamedArgument,r)&&r.name===t)}function sm(e,t){let n=Object.entries(t).filter(([r,i])=>i&&i!==-1).map(([r,i])=>`${r}: ${i}`).join(", ");return n?` ${e}: ${n}`:` ${e}`}function lm(e){let t=e.position,n=e.source.slice(t.start).indexOf("|");return{start:t.start+n+1,end:t.end}}function am(e){return e?`'${e}'`:null}function cS(e){return(0,um.isNodeOfType)(cm.NodeTypes.VariableLookup,e)}function om(e){return(0,um.isNodeOfType)(cm.NodeTypes.String,e)}function mR(e){return(0,um.isNodeOfType)(cm.NodeTypes.Number,e)}});var _R=x(dm=>{"use strict";p();Object.defineProperty(dm,"__esModule",{value:!0});dm.DeprecatedFilter=void 0;var yR=J(),fm=gR();dm.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:yR.SourceCodeType.LiquidHtml,severity:yR.Severity.WARNING,schema:{},targets:[]},create(e){return e.themeDocset?{LiquidFilter:async t=>{let n=await e.themeDocset.filters(),r=n.find(l=>l.deprecated&&l.name===t.name);if(!r)return;let i=Fee(r),s=n.find(l=>l.name===i),a=Bee(r,s),o=Dee(t),c=jee(t);e.report({message:a,suggest:o,fix:c,startIndex:t.position.start+1,endIndex:t.position.end})}}:{}}};function Dee(e){let t=e.name;switch(t){case"img_tag":return(0,fm.suggestImgTagFix)(e);case"img_url":return(0,fm.suggestImgUrlFix)(e);case"article_img_url":case"collection_img_url":case"product_img_url":return(0,fm.suggestImageUrlFix)(t,e);case"currency_selector":return}}function jee(e){if(e.name==="hex_to_rgba")return(0,fm.fixHexToRgba)(e)}function Bee(e,t){return t?`Deprecated filter '${e.name}', consider using '${t.name}'.`:`Deprecated filter '${e.name}'.`}function Fee(e){return e.deprecation_reason?.match(/replaced by \[`(.+?)`\]/)?.[1]}});var pm=x(hm=>{"use strict";p();Object.defineProperty(hm,"__esModule",{value:!0});hm.DEPRECATED_FONT_HANDLES=void 0;hm.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 wR=x(gm=>{"use strict";p();Object.defineProperty(gm,"__esModule",{value:!0});gm.DeprecatedFontsOnSectionsAndBlocks=void 0;var Vee=Le(),vR=J(),mm=Be(),fS=pm();gm.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:vR.SourceCodeType.LiquidHtml,severity:vR.Severity.WARNING,schema:{},targets:[]},create(e){return{async LiquidRawTag(t){if(t.name!=="schema"||t.body.kind!=="json")return;let n=await(0,Vee.getSchema)(e),{validSchema:r,ast:i}=n??{};if(!r||r instanceof Error||!i||i instanceof Error)return;let s=t.blockStartPosition.end;$ee(r,s,i,e),Uee(r,s,i,e),await Hee(r,s,i,e),"default"in r&&await zee(r,s,i,e)}}}};function $ee(e,t,n,r){let i=e.settings;i&&bR(i,t,n,["settings"],r)}function bR(e,t,n,r,i){e.forEach((s,a)=>{if(s.type==="font_picker"&&s.default&&fS.DEPRECATED_FONT_HANDLES.has(s.default)){let o=r.concat([String(a),"default"]);dS(i,t,n,o,`setting '${s.id}' is using deprecated font '${s.default}'`)}})}function Uee(e,t,n,r){let i=e.blocks;i&&i.forEach((s,a)=>{"settings"in s&&s.settings&&bR(s.settings,t,n,["blocks",String(a),"settings"],r)})}async function Hee(e,t,n,r){let i=e.presets;if(i)for(let[s,a]of i.entries()){let o=["presets",String(s)];await kR(a.settings??{},"blocks"in a?a.blocks:void 0,e,t,n,o,r)}}async function kR(e,t,n,r,i,s,a){e&&typeof e=="object"&&Object.entries(e).forEach(([o,c])=>{if(TR(n.settings??[],o)&&fS.DEPRECATED_FONT_HANDLES.has(c)){let l=s.concat(["settings",o]);dS(a,r,i,l,`setting '${o}' is using deprecated font '${c}'`)}}),t&&await SR(t,n,r,i,a,s)}async function SR(e,t,n,r,i,s){let a=Array.isArray(e)?e.entries():Object.entries(e);for(let[o,c]of a){let l=s.concat(["blocks",String(o)]),f=null;if(t.blocks?.forEach(h=>{h.type===c.type&&"name"in h&&(f=h)}),!f){let h=await i.getBlockSchema?.(c.type);if(!h||h instanceof Error||(f=h.validSchema,!f||f instanceof Error))continue}for(let[h,d]of Object.entries(c.settings??{}))d&&fS.DEPRECATED_FONT_HANDLES.has(d)&&TR(f.settings??[],h)&&dS(i,n,r,l.concat(["settings",h]),`setting '${h}' is using deprecated font '${d}'`);"blocks"in c&&c.blocks&&await SR(c.blocks,t,n,r,i,l)}}async function zee(e,t,n,r){let i=e.default;if(!i||typeof i!="object")return;let s=["default"];await kR(i.settings??{},"blocks"in i?i.blocks:void 0,e,t,n,s,r)}function TR(e,t){return e.some(n=>n.id===t&&n.type==="font_picker")}function dS(e,t,n,r,i,s=!0){let a=(0,mm.nodeAtPath)(n,r),o=s?t+(0,mm.getLocStart)(a):t+(0,mm.getLocEnd)(a)-1,c=t+(0,mm.getLocEnd)(a);e.report({message:i,startIndex:o,endIndex:c})}});var AR=x(ym=>{"use strict";p();Object.defineProperty(ym,"__esModule",{value:!0});ym.DeprecatedFontsOnSettingsData=void 0;var xR=J(),ER=Be(),Wee=pm();ym.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:xR.SourceCodeType.JSON,severity:xR.Severity.WARNING,schema:{},targets:[]},create(e){return e.toRelativePath(e.file.uri)!=="config/settings_data.json"?{}:{async Property(n){n.value.type==="Literal"&&typeof n.value.value=="string"&&Wee.DEPRECATED_FONT_HANDLES.has(n.value.value)&&e.report({message:`The font "${n.value.value}" is deprecated`,startIndex:(0,ER.getLocStart)(n.value),endIndex:(0,ER.getLocEnd)(n.value)})}}}}});var PR=x(vm=>{"use strict";p();Object.defineProperty(vm,"__esModule",{value:!0});vm.DeprecatedFontsOnSettingsSchema=void 0;var _m=J(),OR=Be(),Gee=pm();vm.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:_m.SourceCodeType.JSON,severity:_m.Severity.WARNING,schema:{},targets:[]},create(e){return e.toRelativePath(e.file.uri)!=="config/settings_schema.json"?{}:{async Property(n){if(n.key.value==="settings"&&(0,_m.isArrayNode)(n.value)){for(let r of n.value.children)if((0,_m.isObjectNode)(r)){let i=r.children.find(s=>s.key.value==="type");if(i&&i.value.type==="Literal"&&i.value.value==="font_picker"){let s=r.children.find(a=>a.key.value==="default");if(s&&s.value.type==="Literal"&&typeof s.value.value=="string"){let a=s.value.value;Gee.DEPRECATED_FONT_HANDLES.has(a)&&e.report({message:`The font "${a}" is deprecated`,startIndex:(0,OR.getLocStart)(s.value),endIndex:(0,OR.getLocEnd)(s.value)})}}}}}}}}});var CR=x(bm=>{"use strict";p();Object.defineProperty(bm,"__esModule",{value:!0});bm.DeprecatedTag=void 0;var NR=J();bm.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:NR.SourceCodeType.LiquidHtml,severity:NR.Severity.WARNING,schema:{},targets:[]},create(e){return{async LiquidTag(t){if(t.name==="include"){let r=t.source.substring(t.position.start).indexOf("include"),i=r+7,s=t.position.start+r,a=t.position.start+i;e.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 Kn=x(Pn=>{"use strict";p();Object.defineProperty(Pn,"__esModule",{value:!0});Pn.reportUnknownArguments=Jee;Pn.reportMissingArguments=Kee;Pn.reportDuplicateArguments=Yee;Pn.findTypeMismatchParams=Qee;Pn.reportTypeMismatches=Xee;Pn.generateTypeMismatchSuggestions=qR;Pn.getBlockName=ete;Pn.getSnippetName=tte;Pn.getLiquidDocParams=nte;Pn.makeRemoveArgumentCorrector=hS;Pn.makeAddArgumentCorrector=IR;var La=ue(),Il=Qi(),LR=Ue();function Jee(e,t,n,r){let i="";t.type===La.NodeTypes.ContentForMarkup?i=` in content_for tag for static block '${r}'`:t.type===La.NodeTypes.RenderMarkup&&(i=` in render tag for snippet '${r}'`);for(let s of n)e.report({message:`Unknown argument '${s.name}'${i}.`,startIndex:s.position.start,endIndex:s.position.end,suggest:[{message:`Remove '${s.name}'`,fix:hS(t,s)}]})}function Kee(e,t,n,r){let i="";t.type===La.NodeTypes.ContentForMarkup?i=` in content_for tag for static block '${r}'`:t.type===La.NodeTypes.RenderMarkup&&(i=` in render tag for snippet '${r}'`);for(let s of n)e.report({message:`Missing required argument '${s.name}'${i}.`,startIndex:t.position.start,endIndex:t.position.end,suggest:[{message:`Add required argument '${s.name}'`,fix:IR(t,s)}]})}function Yee(e,t,n,r){let i="";t.type===La.NodeTypes.ContentForMarkup?i=` in content_for tag for static block '${r}'`:t.type===La.NodeTypes.RenderMarkup&&(i=` in render tag for snippet '${r}'`);for(let s of n)e.report({message:`Duplicate argument '${s.name}'${i}.`,startIndex:s.position.start,endIndex:s.position.end,suggest:[{message:`Remove duplicate argument '${s.name}'`,fix:hS(t,s)}]})}function Qee(e,t){let n=[];for(let r of t){let i=e.get(r.name);i?.type&&(0,Il.checkArgumentType)(i.type,r.value).kind==="incompatible"&&n.push(r)}return n}function Xee(e,t,n){for(let r of t){let i=n.get(r.name);if(!i||!i.type)continue;let s=qR(i.type,r.value.position.start,r.value.position.end);e.report({message:(0,Il.getArgumentTypeMismatchMessage)(r.name,i.type,r.value),startIndex:r.value.position.start,endIndex:r.value.position.end,suggest:s})}}function qR(e,t,n){let r=(0,Il.parseStringLiterals)(e);if(r)return r.map(a=>({message:`Replace with ${a.raw}`,fix:o=>o.replace(t,n,a.raw)}));e=e.toLowerCase();let i=(0,Il.getDefaultValueForType)(e),s=[];return i!==""&&s.push({message:`Replace with default value '${i}' for ${e}`,fix:a=>a.replace(t,n,i)}),s.push({message:"Remove value",fix:a=>a.remove(t,n)}),s}function Zee(e,t){return e.args.length==1||t.position.start==e.args[e.args.length-1].position.start}function ete(e){if(e.contentForType.value!=="block")return;let t=e.args.find(n=>n.name=="type")?.value;if(!(!t||!(0,LR.isLiquidString)(t)))return t.value}function tte(e){if((0,LR.isLiquidString)(e.snippet))return e.snippet.value}async function nte(e,t){let n=e.getDocDefinition&&await e.getDocDefinition(t);if(n?.liquidDoc?.parameters)return new Map(n.liquidDoc.parameters.map(r=>[r.name,r]))}function hS(e,t){return n=>{let r=MR(e),i=r.slice(e.position.start,t.position.start),a=r.slice(t.position.end,e.position.end).match(/^\s*,\s*/);if(a){if(Zee(e,t)){let l=i.match(/,\s*$/),f=l?t.position.start-l[0].length:t.position.start;return n.remove(f,t.position.end+a[0].replace(/\s+$/,"").length)}return n.remove(t.position.start,t.position.end+a[0].length)}let o=i.match(/,\s*$/),c=o?t.position.start-o[0].length:t.position.start;return n.remove(c,t.position.end)}}function IR(e,t){return n=>{let r=MR(e),i=`, ${t.name}: ${(0,Il.getDefaultValueForType)(t.type)}`;if(e.args.length==0)return n.insert(e.position.end-1,i);let s=e.args[e.args.length-1],o=r.substring(s.position.end,e.position.end).match(/\s*,\s*/);return o?n.replace(s.position.end,s.position.end+o[0].length,`${i} `):n.insert(s.position.end,i)}}function MR(e){return e.source?e.source:e.args.length>0?e.args[0].source:e.type===La.NodeTypes.ContentForMarkup?e.contentForType.source:e.snippet.source}});var jR=x(km=>{"use strict";p();Object.defineProperty(km,"__esModule",{value:!0});km.DuplicateRenderSnippetArguments=void 0;var RR=J(),DR=Kn();km.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:RR.SourceCodeType.LiquidHtml,severity:RR.Severity.WARNING,schema:{},targets:[]},create(e){return{async RenderMarkup(t){let n=(0,DR.getSnippetName)(t);if(!n)return;let r=new Set,i=[];t.alias?.value&&r.add(t.alias.value);for(let s of t.args)r.has(s.name)&&i.push(s),r.add(s.name);(0,DR.reportDuplicateArguments)(e,t,i,n)}}}}});var VR=x(Sm=>{"use strict";p();Object.defineProperty(Sm,"__esModule",{value:!0});Sm.DuplicateContentForArguments=void 0;var BR=J(),FR=Kn();Sm.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:BR.SourceCodeType.LiquidHtml,severity:BR.Severity.WARNING,schema:{},targets:[]},create(e){return{async ContentForMarkup(t){let n=(0,FR.getBlockName)(t);if(!n)return;let r=new Set,i=[];for(let s of t.args)r.has(s.name)&&i.push(s),r.add(s.name);(0,FR.reportDuplicateArguments)(e,t,i,n)}}}}});var UR=x(Tm=>{"use strict";p();Object.defineProperty(Tm,"__esModule",{value:!0});Tm.EmptyBlockContent=void 0;var $R=J(),rte=Le();Tm.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:$R.SourceCodeType.LiquidHtml,severity:$R.Severity.WARNING,schema:{},targets:[]},create(e){let t=!1,n={start:0,end:0};return{async LiquidTag(r){if(r.name!=="content_for")return;let i=r.markup;typeof i=="object"&&i.contentForType.value==="blocks"&&(n.start=r.blockStartPosition.start,n.end=r.blockStartPosition.end,t=!0)},async onCodePathEnd(){let r=await(0,rte.getSchema)(e),{validSchema:i,ast:s}=r??{};if(!i||i instanceof Error||!s||s instanceof Error)return;let a=i.blocks;t&&!a?e.report({message:`The 'content_for "blocks"' tag is present, but the blocks array is not defined.`,startIndex:n.start,endIndex:n.end}):t&&a&&a.length===0&&e.report({message:`The 'content_for "blocks"' tag is present, but the blocks array is empty.`,startIndex:n.start,endIndex:n.end})}}}}});var JR=x(xm=>{"use strict";p();Object.defineProperty(xm,"__esModule",{value:!0});xm.HardcodedRoutes=void 0;var ite=ue(),HR=J(),wm=Ue(),pS={"/":"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"},WR=Object.keys(pS).reverse();xm.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:HR.SourceCodeType.LiquidHtml,severity:HR.Severity.WARNING,schema:{},targets:[]},create(e){return{async HtmlElement(t){let n=t.attributes.filter(wm.isValuedHtmlAttribute).find(r=>((0,wm.isAttr)(r,"action")||(0,wm.isAttr)(r,"href"))&&zR(r));if(n){let r=n,i=zR(r),s=pS[i],a=r.attributePosition.start,o=a+i.length;e.report({message:`Use routes object {{ routes.${s} }} instead of hardcoding ${i}`,startIndex:a,endIndex:o})}},async LiquidFilter(t){if(t.name!=="link_to")return;let n=t.args[0],r=n.type==="String"?n.value:"",i=WR.find(s=>s==="/"?s===r:GR(r,s));if(i){let s=pS[i],a=n.position.start+1;e.report({message:`Use routes object {{ routes.${s} }} instead of hardcoding ${i}`,startIndex:a,endIndex:a+i.length})}}}}};function zR(e){if(!(0,wm.isNodeOfType)(ite.NodeTypes.TextNode,e.value[0]))return;let t=e.value[0].value;return WR.find(n=>n==="/"?n===t&&e.value.length===1:GR(t,n))}function GR(e,t){if(!e.startsWith(t))return!1;let n=e.charAt(t.length);return n===""||n==="/"||n==="?"||n==="#"||n==="."}});var YR=x(Am=>{"use strict";p();Object.defineProperty(Am,"__esModule",{value:!0});Am.ImgWidthAndHeight=void 0;var KR=J(),Em=Ue();Am.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:KR.SourceCodeType.LiquidHtml,severity:KR.Severity.ERROR,schema:{},targets:[]},create(e){return{async HtmlVoidElement(t){if(t.name==="img"){let n=t.attributes.find(s=>(0,Em.isValuedHtmlAttribute)(s)&&(0,Em.isAttr)(s,"width")),r=t.attributes.find(s=>(0,Em.isValuedHtmlAttribute)(s)&&(0,Em.isAttr)(s,"height")),i=[];if(n||i.push("width"),r||i.push("height"),i.length>0){let s=i.length===1?"attribute":"attributes";e.report({message:`Missing ${i.join(" and ")} ${s} on img tag`,startIndex:t.position.start,endIndex:t.position.end})}}}}}}});var ZR=x(Om=>{"use strict";p();Object.defineProperty(Om,"__esModule",{value:!0});Om.isPropertyNode=ate;Om.getAllBlocks=XR;var gS=Be(),ste=bn();function ate(e){return typeof e=="object"&&e!==null}function QR(e){return e.filter(t=>t==="blocks").length>1}function mS(e,t,n,r){r.report({message:e,startIndex:t+(0,gS.getLocStart)(n),endIndex:t+(0,gS.getLocEnd)(n)})}async function ote(e,t){if(e==="@theme"||e==="@app")return!0;let n=`blocks/${e}.liquid`;return await(0,ste.doesFileExist)(t,n)}async function cte(e,t,n){if(typeof e!="string"||!e)return;let r=QR(t)?await n.getBlockSchema?.(e):await n.getSectionSchema?.(e);if(!r||r instanceof Error)return;let{validSchema:i}=r;if(!(!i||i instanceof Error))return Array.isArray(i.blocks)?i.blocks:[]}async function ute(e,t,n,r,i,s,a){let o=await cte(r,i,a);if(!o)return;let c=QR(i)?"blocks":"sections";if(e.startsWith("shopify://apps/")){o.some(h=>!("name"in h)&&h.type==="@app")||mS(`Block type '${e}' is not allowed in '${c}/${r}.liquid'.`,s,n,a);return}if(o.some(h=>"name"in h&&h.type===e))return;let l=o.filter(h=>!("name"in h)&&h.type!=="@app").map(h=>h.type);if(l.length===0)return;if(!await ote(e,a))mS(`Theme block 'blocks/${e}.liquid' does not exist.`,s,n,a);else{if(t)return;{let h=e.startsWith("_"),d=l.includes("@theme"),g=l.includes(e);if(h?g:g||d)return;mS(`Block type '${e}' is not allowed in '${c}/${r}.liquid'.`,s,n,a)}}}async function XR(e,t,n,r,i,s){await Promise.all(Object.entries(r).map(async([a,o])=>{if(typeof o.type=="string"&&o.type){let c=i.concat(a,"type"),l=(0,gS.nodeAtPath)(e,c);l&&await ute(o.type,o.static,l,n,i,t,s)}"blocks"in o&&await XR(e,t,o.type,o.blocks,i.concat(a,"blocks"),s)}))}});var tD=x(Pm=>{"use strict";p();Object.defineProperty(Pm,"__esModule",{value:!0});Pm.JSONMissingBlock=void 0;var lte=Le(),eD=J(),yS=ZR();Pm.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:eD.SourceCodeType.JSON,severity:eD.Severity.ERROR,schema:{},targets:[]},create(e){return e.toRelativePath(e.file.uri).startsWith("templates/")?{async onCodePathEnd(){let n=await(0,lte.getSchemaFromJSON)(e),{ast:r}=n??{};if(!r||r instanceof Error||!n||typeof n.parsed!="object"||n.parsed===null)return;let i=n.parsed.sections;i&&await Promise.all(Object.entries(i).map(async([s,a])=>{(0,yS.isPropertyNode)(a)&&"blocks"in a&&(0,yS.isPropertyNode)(a.blocks)&&"type"in a&&await(0,yS.getAllBlocks)(r,0,a.type,a.blocks,["sections",s,"blocks"],e)}))}}:{}}}});var rD=x(Nm=>{"use strict";p();Object.defineProperty(Nm,"__esModule",{value:!0});Nm.JSONMissingSection=void 0;var _S=Be(),fte=Le(),nD=J(),dte=bn(),hte=["apps","_blocks"];Nm.JSONMissingSection={meta:{code:"JSONMissingSection",name:"Check for missing section files in JSON templates and section groups",docs:{description:"This check ensures that section types in JSON templates and section groups refer to existing section files.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/json-missing-section"},type:nD.SourceCodeType.JSON,severity:nD.Severity.ERROR,schema:{},targets:[]},create(e){let t=e.toRelativePath(e.file.uri),n=t.startsWith("templates/"),r=t.startsWith("sections/");return!n&&!r?{}:{async onCodePathEnd(){let i=await(0,fte.getSchemaFromJSON)(e),{ast:s}=i??{};if(!s||s instanceof Error)return;let a=(0,_S.nodeAtPath)(s,["sections"]);!a||a.type!=="Object"||await Promise.all(a.children.map(async o=>{let c=o.value;if(c.type!=="Object")return;let l=c.children.find(d=>d.key.value==="type")?.value;if(!l||l.type!=="Literal")return;let f=l.value;typeof f!="string"||hte.includes(f)||await(0,dte.doesFileExist)(e,`sections/${f}.liquid`)||e.report({message:`Section type '${f}' does not refer to an existing section file`,startIndex:(0,_S.getLocStart)(l),endIndex:(0,_S.getLocEnd)(l)})}))}}}}});var sD=x(Cm=>{"use strict";p();Object.defineProperty(Cm,"__esModule",{value:!0});Cm.JSONSyntaxError=void 0;var pte=I0(),iD=J(),mte=Ne();function gte(e){return("rawMessage"in e?e.rawMessage:e.message).replace(/\s+at \d+:\d+/,"")}Cm.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:iD.SourceCodeType.JSON,severity:iD.Severity.ERROR,schema:{},targets:[],deprecated:!0},create(e){if(e.validateJSON)return{};let t=e.file.ast;return(0,mte.isError)(t)?{async onCodePathStart(n){if(n.ast instanceof pte.JSONCParseErrors)for(let r of n.ast.errors)e.report({message:yte(r.error),startIndex:r.offset,endIndex:r.offset+r.length});else e.report({message:gte(t),startIndex:0,endIndex:n.source.length})}}:{}}};function yte(e){switch(e){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 cD=x(Lm=>{"use strict";p();Object.defineProperty(Lm,"__esModule",{value:!0});Lm.LiquidFreeSettings=void 0;var _te=Xo(),aD=J(),vte=Nr();Lm.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:aD.SourceCodeType.LiquidHtml,severity:aD.Severity.WARNING,schema:{},targets:[]},create(e){return{async LiquidRawTag(t){if(t.name!=="schema"||t.body.kind!=="json")return;let n=t.source.slice(t.blockStartPosition.end,t.blockEndPosition.start),r=(0,_te.toJSONAST)(n);r instanceof Error||(0,vte.visit)(r,{Property(i,s){if(!kte(s,"settings")||!oD(i.value)||bte(s))return;let{value:a,loc:o}=i.value,c=i.key.value;typeof a=="string"&&c!=="visible_if"&&a.includes("{%")&&a.includes("%}")&&e.report({message:"Settings values cannot contain liquid logic.",startIndex:t.blockStartPosition.end+o.start.offset,endIndex:t.blockStartPosition.end+o.end.offset})}})}}}};function oD(e){return e.type==="Literal"}function bte(e){let t=e.at(-1);return!t||t.type!=="Object"?!1:t.children.some(({key:n,value:r})=>n.value!=="type"||!oD(r)?!1:r.value==="liquid")}function kte(e,t){return e.some((n,r)=>{let i=e[r-1];return(n.type==="Array"||n.type==="Object")&&i?.type==="Property"&&i.key?.value===t})}});var Br=x(vi=>{"use strict";p();Object.defineProperty(vi,"__esModule",{value:!0});vi.INVALID_SYNTAX_MESSAGE=void 0;vi.getValuesInMarkup=Ste;vi.getFragmentsInMarkup=Ete;vi.getRangeMatch=pD;vi.doesFragmentContainUnsupportedParentheses=Ate;vi.fragmentKeyValuePair=Ote;vi.INVALID_SYNTAX_MESSAGE="Syntax is not supported";function Ste(e){return[...e.matchAll(new RegExp(dD,"g"))].map(t=>({value:t[0],index:t.index}))}var Tte='"[^"]*"',wte="'[^']*'",uD="\\s*(-?\\d+(?:\\.\\d+)?|\\w+(?:\\.\\w+)*)\\s*",vS=`\\(\\s*${uD}(\\.{2,})\\s*${uD}\\s*\\)`,lD="[^\\s,]+",fD=`(${Tte}|${wte})`,dD=`(${fD}|${vS}|${lD})`,hD=`(\\S+):\\s*${dD}`,xte=new RegExp(`${fD}|${vS}|${hD}|${lD}`,"g");function Ete(e){return[...e.matchAll(xte)].map(t=>({value:t[0],index:t.index}))}function pD(e){return e.match(vS)}function Ate(e){return pD(e)?!1:e.includes("(")||e.includes(")")}function Ote(e){let t=e.match(new RegExp(hD));if(!t)return;let[,n,r]=t;return{key:n,value:r}}});var gD=x(bS=>{"use strict";p();Object.defineProperty(bS,"__esModule",{value:!0});bS.detectMultipleAssignValues=Pte;var mD=Br();function Pte(e){let t=/([^=]+)(=\s*)([^|]+)(?:\s*\|\s*.*)?$/m;if(e.name!=="assign")return;let n=e.markup;if(typeof n!="string")return;let r=n.match(t);if(!r)return;let[i,s,a,o]=r,c=(0,mD.getValuesInMarkup)(o).at(0)?.value;if(!c)return;let l=(d,g)=>{let v=d.indexOf(n,g);return{startIndex:v+s.length+a.length+c.length,endIndex:v+s.length+a.length+o.trimEnd().length}},{startIndex:f,endIndex:h}=l(e.source,e.position.start);if(!(h<=f)&&!(h<=f))return{message:mD.INVALID_SYNTAX_MESSAGE,startIndex:f,endIndex:h,fix:d=>{d.replace(f,h,"")}}}});var _D=x(kS=>{"use strict";p();Object.defineProperty(kS,"__esModule",{value:!0});kS.detectInvalidBooleanExpressions=Lte;var yD=ue(),Nte=Br(),Cte=Ue();function Lte(e,t){if((0,Cte.isWithinRawTagThatDoesNotParseItsContents)(t))return;let n=e.condition;if(!(n.type!==yD.NodeTypes.Comparison&&n.type!==yD.NodeTypes.LogicalExpression))return{message:Nte.INVALID_SYNTAX_MESSAGE,startIndex:e.position.start,endIndex:e.position.end,fix:r=>{r.replace(e.position.start,e.position.end,e.source.slice(n.left.position.start,n.left.position.end))}}}});var vD=x(TS=>{"use strict";p();Object.defineProperty(TS,"__esModule",{value:!0});TS.detectInvalidEchoValue=Ite;var qte=ue(),SS=Br();function Ite(e){let t=/([^|]*)(?:\s*\|\s*.*)?$/m;if(e.type===qte.NodeTypes.LiquidTag&&e.name!=="echo")return;let n=e.markup;if(typeof n!="string"||!n)return;let r=n.match(t);if(!r)return;let[,i]=r,s=(0,SS.getValuesInMarkup)(i).at(0)?.value;if(!s){let l=e.source.indexOf(n,e.position.start),f=l+n.length;return{message:SS.INVALID_SYNTAX_MESSAGE,startIndex:l,endIndex:f,fix:h=>{h.replace(l,f,"blank")}}}let a=(l,f)=>{let h=l.indexOf(n,f);return{startIndex:h+s.length,endIndex:h+i.trimEnd().length}},{startIndex:o,endIndex:c}=a(e.source,e.position.start);if(!(c<=o))return{message:SS.INVALID_SYNTAX_MESSAGE,startIndex:o,endIndex:c,fix:l=>{l.replace(o,c,"")}}}});var TD=x(wS=>{"use strict";p();Object.defineProperty(wS,"__esModule",{value:!0});wS.detectInvalidConditionalNode=Dte;var SD=Br(),Mte={logical:/^(and|or)$/,comparison:/^(==|!=|>=|<=|>|<|contains)$/,invalid:/^[@#$&]$/,literal:/^(['"][^'"]*['"]|\d+(?:\.\d+)?|true|false|nil|empty|blank)$/};function Rte(e){for(let[t,n]of Object.entries(Mte))if(n.test(e))return t;return"variable"}function Dte(e){if(!("name"in e)||!e.name||!["if","elsif","unless"].includes(String(e.name)))return;let t=e.markup;if(typeof t!="string"||!t.trim())return;let n=Vte(t);if(!n)return;let r=e.blockStartPosition||e.position,s=e.source.slice(r.start,r.end).indexOf(t);if(s<0)return;let a=r.start+s,o=a+t.length;return{message:`${SD.INVALID_SYNTAX_MESSAGE}: ${n.message}`,startIndex:a,endIndex:o,fix:c=>{c.replace(a,o,n.fix)}}}function bD(e){return e.type==="literal"||e.type==="variable"}function kD(e){return e.type==="logical"||e.type==="comparison"}function jte(e){let t=e[0];return e.length===1&&t.value==="contains"?null:t.type==="invalid"||t.type==="comparison"?{message:`Conditional cannot start with '${t.value}'. Use a variable or value instead`,fix:"false"}:null}function Bte(e){for(let r=0;r<=e.length-4;r++){let[i,s,a]=e.slice(r,r+3),o=e.slice(r+3);if(bD(i)&&s.type==="comparison"&&bD(a)&&o.length>0&&o[0].type!=="logical"){let c=e.slice(0,r+3).map(h=>h.value).join(" "),l=o.map(h=>h.value).join(" ");return/&&|\|\|/.test(l)?{message:`Conditional is invalid. Anything after '${c}' will be ignored. Use 'and'/'or' instead of '&&'/'||' for multiple conditions`,fix:c}:{message:`Conditional is invalid. Anything after '${c}' will be ignored`,fix:c}}}return null}function Fte(e){for(let t=0;t<e.length-1;t++){let n=e[t],r=e[t+1];if(n.type==="literal"&&!kD(r)){let i=e.slice(t+1);if(!(i[0]?.type==="variable"&&i.some(kD))){let a=i.map(c=>c.value).join(" ");return/&&|\|\|/.test(a)?{message:`Expression stops at truthy value '${n.value}', and will ignore: '${a}'. Use 'and'/'or' instead of '&&'/'||' for multiple conditions`,fix:n.value}:{message:`Expression stops at truthy value '${n.value}', and will ignore: '${a}'`,fix:n.value}}}}return null}function Vte(e){let t=e.trim();if(!t)return null;let n=(0,SD.getValuesInMarkup)(t).map(({value:r})=>({value:r,type:Rte(r)}));return n.length===0?null:jte(n)||Bte(n)||Fte(n)}});var ED=x(pc=>{"use strict";p();Object.defineProperty(pc,"__esModule",{value:!0});pc.INVALID_LOOP_RANGE_MESSAGE=void 0;pc.detectInvalidLoopRange=Hte;var wD=ue(),$te=Br(),Ute=Ue();pc.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 Hte(e){if(e.type===wD.NodeTypes.LiquidTag&&!(0,Ute.isLoopLiquidTag)(e))return;let t=e.markup;if(t){if(typeof t=="string")return xD(e,t);if(t.collection.type===wD.NodeTypes.Range)return xD(e,e.source.slice(t.collection.position.start,t.collection.position.end))}}function xD(e,t){let n=(0,$te.getRangeMatch)(t);if(!n||n.index===void 0)return;let[r,i,,s]=n,a=i,o=s;!isNaN(Number(i))&&Number(i)%1!==0&&(a=`${Math.trunc(Number(i))}`),!isNaN(Number(s))&&Number(s)%1!==0&&(o=`${Math.trunc(Number(s))}`);let c=`(${a}..${o})`;if(t.slice(n.index,n.index+r.length)===c)return;let f=e.source.indexOf(t,e.position.start)+n.index,h=f+r.length;return{message:pc.INVALID_LOOP_RANGE_MESSAGE,startIndex:f,endIndex:h,fix:d=>{d.replace(f,h,c)}}}});var OD=x(xS=>{"use strict";p();Object.defineProperty(xS,"__esModule",{value:!0});xS.detectInvalidLoopArguments=Gte;var zte=ue(),qm=Br(),Wte=Ue();function Gte(e,t=[]){if(e.type===zte.NodeTypes.LiquidTag&&!(0,Wte.isLoopLiquidTag)(e))return;let n=e.markup;if(!n)return;let r,i;if(typeof n=="string"?(r=e.source.indexOf(n,e.position.start),i=(0,qm.getFragmentsInMarkup)(n).slice(3).map(({value:h,index:d})=>({value:h,index:d}))):(r=n.position.start,i=Jte(n)),i.length===0)return;let s=i.at(-1),a=r+i[0].index,o=r+s.index+s.value.length,c=[],l=!1,f=[];for(let h of i){if(h.key===void 0&&(0,qm.doesFragmentContainUnsupportedParentheses)(h.value)){l=!0,f.push(h.value);continue}let d=h.key??(0,qm.fragmentKeyValuePair)(h.value)?.key;if(d!==void 0){if(l=!0,!AD(t,e.name,d,!1)){f.push(h.value);continue}}else if(l||!AD(t,e.name,h.value,!0)){l=!0,f.push(h.value);continue}c.push(h.value)}if(f.length!==0)return{message:`Arguments must be provided in the format \`${e.name} in <array> <positional arguments> <named arguments>\`. Invalid/Unknown arguments: ${f.join(", ")}`,startIndex:a,endIndex:o,fix:h=>{h.replace(a,o,c.join(" "))}}}function Jte(e){let{source:t}=e,n=e.position.start,r=[],i=e.collection.position.end,s=a=>{for(let{value:o,index:c}of(0,qm.getFragmentsInMarkup)(t.slice(i,a)))r.push({value:o,index:i-n+c})};for(let a of e.args)Kte(t,a)&&(s(a.position.start),r.push({value:t.slice(a.position.start,a.position.end),index:a.position.start-n,key:a.name}),i=a.position.end);return s(e.position.end),r}function Kte(e,t){let n=e.slice(t.position.start,t.value.position.start);return n.startsWith(t.name)&&/^\s*:\s*$/.test(n.slice(t.name.length))&&t.value.position.end===t.position.end}function AD(e,t,n,r){return e.find(i=>i.name===t)?.parameters?.some(i=>i.name===n&&i.positional===r)||!1}});var PD=x(AS=>{"use strict";p();Object.defineProperty(AS,"__esModule",{value:!0});AS.detectConditionalNodeUnsupportedParenthesis=Yte;var ES=Br();function Yte(e){if(!["if","elsif","unless"].includes(e.name)||typeof e.markup!="string"||!e.markup.trim())return;let t=e.source.indexOf(e.markup,e.position.start),r=(0,ES.getFragmentsInMarkup)(e.markup).filter(i=>(0,ES.doesFragmentContainUnsupportedParentheses)(i.value));if(r.length)return{message:ES.INVALID_SYNTAX_MESSAGE,startIndex:t,endIndex:t+e.markup.length,fix:i=>{for(let s of r)i.replace(t+s.index,t+s.index+s.value.length,s.value.replace(/[\(\)]/g,""))}}}});var CD=x(NS=>{"use strict";p();Object.defineProperty(NS,"__esModule",{value:!0});NS.detectInvalidFilterName=Qte;var mc=ue(),ND=Br();async function Qte(e,t){if(!t)return[];if(e.type===mc.NodeTypes.LiquidVariableOutput)return typeof e.markup=="string"?PS(e,e.markup,t):OS(e,e.markup,t);if(e.type===mc.NodeTypes.LiquidTag){if(e.name===mc.NamedTags.echo){if(typeof e.markup=="string")return PS(e,e.markup,t);if(e.markup.type===mc.NodeTypes.LiquidVariable)return OS(e,e.markup,t)}if(e.name===mc.NamedTags.assign){if(typeof e.markup=="string")return PS(e,e.markup,t);if(e.markup.type===mc.NodeTypes.AssignMarkup)return OS(e,e.markup.value,t)}}return[]}async function OS(e,t,n){let r=n,i=e.source,s=t.position.end,a=[];for(let o of t.filters){if(!r.some(d=>d.name===o.name))continue;let c=i.indexOf(o.name,o.position.start);if(c===-1)continue;let l=c+o.name.length,f=i.slice(l,s).match(/^([^\s:|]+)/)?.[1];if(!f)continue;let h=l+f.length;a.push({message:`${ND.INVALID_SYNTAX_MESSAGE} Filter '${o.name}' has trailing characters '${f}' that should be removed.`,startIndex:l,endIndex:h,fix:d=>{d.replace(l,h,"")}})}return a}async function PS(e,t,n){let r=n,i=t.trim(),s=[],a=/\|\s*([a-zA-Z][a-zA-Z0-9_]*)/g,o=Array.from(i.matchAll(a));for(let c of o){let l=c[1];if(!r.some(_=>_.name===l))continue;let f=c.index+c[0].length,d=i.slice(f).match(/^(?!\s*(?::|$|\|\s*[a-zA-Z]|\|\s*\||\s*\|\s*(?:[}%]|$)))([^:|]+?)(?=\s*(?::|$|\|))/)?.[1];if(!d)continue;let v=e.source.indexOf(t,e.position.start)+f,b=v+d.length;s.push({message:`${ND.INVALID_SYNTAX_MESSAGE} Filter '${l}' has trailing characters '${d}' that should be removed.`,startIndex:v,endIndex:b,fix:_=>{_.replace(v,b,"")}})}return s}});var ID=x(CS=>{"use strict";p();Object.defineProperty(CS,"__esModule",{value:!0});CS.detectInvalidPipeSyntax=Xte;var gc=ue(),LD=Br();async function Xte(e){if(e.type===gc.NodeTypes.LiquidVariableOutput)return typeof e.markup!="string"?[]:qD(e,e.markup);if(e.type===gc.NodeTypes.LiquidTag){if(e.name===gc.NamedTags.echo&&typeof e.markup!="string")return[];if(e.name===gc.NamedTags.assign&&typeof e.markup!="string")return[];if(typeof e.markup=="string"&&(e.name===gc.NamedTags.echo||e.name===gc.NamedTags.assign))return qD(e,e.markup)}return[]}async function qD(e,t){let n=[],r=t.trim(),i=/(\|\s*){2,}/g,s=Array.from(r.matchAll(i));for(let c of s){if(c.index+c[0].length===r.length)continue;let l=e.source.indexOf(t,e.position.start);if(l===-1)continue;let f=l+c.index,h=f+c[0].length;n.push({message:`${LD.INVALID_SYNTAX_MESSAGE}. Remove extra \`|\` character(s).`,startIndex:f,endIndex:h,fix:d=>{d.replace(f,h,"| ")}})}let a=/(\s*\|)+\s*$/,o=r.match(a);if(o){let c=e.source.indexOf(t,e.position.start);if(c===-1)return n;let l=o.index,f=c+l,h=f+o[0].length;n.push({message:`${LD.INVALID_SYNTAX_MESSAGE}. Remove the trailing \`|\` character.`,startIndex:f,endIndex:h,fix:d=>{d.replace(f,h,"")}})}return n}});var FD=x(Mm=>{"use strict";p();Object.defineProperty(Mm,"__esModule",{value:!0});Mm.LiquidHTMLSyntaxError=void 0;var MD=J(),LS=Ne(),Zte=gD(),ene=_D(),RD=vD(),DD=TD(),tne=ED(),nne=OD(),rne=PD(),jD=CD(),BD=ID(),Im=Ue();function ine(e){return"name"in e&&e.name==="LiquidHTMLParsingError"&&"loc"in e}function sne(e,t){return e.replace(/Line \d+, col \d+:\s+/,"SyntaxError: ").replace(/(?!<expected ".+",) not .*/,` not "${t}"`)}Mm.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,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/liquid-html-syntax-error"},type:MD.SourceCodeType.LiquidHtml,severity:MD.Severity.ERROR,schema:{},targets:[]},create(e){let t=e.file.ast,n=e.themeDocset?.filters(),r=e.themeDocset?.tags();return(0,LS.isError)(t)?{async onCodePathStart(i){if(ine(t)){let{start:s,end:a}=t.loc,o=(0,LS.getOffset)(i.source,s.line,s.column),c=(0,LS.getOffset)(i.source,a.line,a.column);o===c&&(c+=1);let l=i.source.slice(o,c);e.report({message:sne(t.message,l),startIndex:o,endIndex:c})}else e.report({message:t.message,startIndex:0,endIndex:i.source.length})}}:{async BooleanExpression(i,s){if((0,Im.isWithinRawTagThatDoesNotParseItsContents)(s))return;let a=(0,ene.detectInvalidBooleanExpressions)(i,s);a&&e.report(a)},async LiquidTag(i,s){if((0,Im.isWithinRawTagThatDoesNotParseItsContents)(s))return;let a=[(0,Zte.detectMultipleAssignValues)(i),(0,RD.detectInvalidEchoValue)(i),(0,tne.detectInvalidLoopRange)(i),(0,nne.detectInvalidLoopArguments)(i,await r)].filter(Boolean),o=(0,rne.detectConditionalNodeUnsupportedParenthesis)(i)||(0,DD.detectInvalidConditionalNode)(i);o&&a.push(o),a.forEach(e.report);let c=await(0,jD.detectInvalidFilterName)(i,await n);c.length>0&&c.forEach(f=>e.report(f));let l=await(0,BD.detectInvalidPipeSyntax)(i);l.length>0&&l.forEach(f=>e.report(f))},async LiquidBranch(i,s){if((0,Im.isWithinRawTagThatDoesNotParseItsContents)(s))return;let a=(0,DD.detectInvalidConditionalNode)(i);a&&e.report(a)},async LiquidVariableOutput(i,s){if((0,Im.isWithinRawTagThatDoesNotParseItsContents)(s))return;let a=await(0,jD.detectInvalidFilterName)(i,await n);a.length>0&&a.forEach(l=>e.report(l));let o=await(0,BD.detectInvalidPipeSyntax)(i);o.length>0&&o.forEach(l=>e.report(l));let c=(0,RD.detectInvalidEchoValue)(i);c&&e.report(c)}}}}});var UD=x(Rm=>{"use strict";p();Object.defineProperty(Rm,"__esModule",{value:!0});Rm.MatchingTranslations=void 0;var VD=J(),$D=new Set(["zero","one","two","few","many","other"]);Rm.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:VD.SourceCodeType.JSON,severity:VD.Severity.ERROR,schema:{},targets:[]},create(e){let t=new Set,n=new Set,r=new Map,i=e.file,s=i.uri,a=e.toRelativePath(s),o=i.ast,c=a.startsWith("locales/"),l=s.endsWith(".default.json")||s.endsWith(".default.schema.json"),f=s.endsWith(".schema.json");if(!c||o instanceof Error)return{};let h=()=>t.size>0,d=({type:A})=>A==="Literal",g=A=>$D.has(A.key.value),v=A=>A.startsWith("shopify.")||A.startsWith("customer_accounts."),b=A=>t.has(A)??!1,_=A=>[...$D].some(P=>A.endsWith(P)),k=A=>Object.keys(A).reduce((O,L)=>{if(typeof A[L]!="object")return O.concat(L);let D=A[L],M=k(D);return O.concat(M.map(C=>`${L}.${C}`))},[]),T=A=>A.filter(P=>P.type==="Property").reduce((P,O)=>P.concat(O.key.value),[]).join(".");if(l)return f?{}:{async Property(A,P){let O=A.value;if(O.type!=="Object"||O.children.length===0||P.some(D=>D.type==="Array")||!O.children.every(D=>g(D)&&D.value.type==="Literal"&&typeof D.value.value=="string")||O.children.some(D=>D.key.value==="other"))return;let L=T(P.concat(A));v(L)||L==="shopify"||L==="customer_accounts"||e.report({message:`The pluralized translation '${L}' is missing the 'other' key`,startIndex:A.loc.start.offset,endIndex:A.loc.end.offset})}};let w=(A,P)=>{let O=Math.min(A.length,P.length);for(let L=0;L<O;L++)if(A[L]!==P[L])return L;return O},y=A=>{let P=A.split("."),O="",L=0;for(let D of r.keys()){let M=D.split("."),C=w(M,P);C>L&&(L=C,O=D)}return r.get(O)??o};return{async onCodePathStart(){let P=await(f?e.getDefaultSchemaTranslations:e.getDefaultTranslations)().then(k);P.forEach(Set.prototype.add,t),P.forEach(Set.prototype.add,n)},async Property(A,P){let O=T(P.concat(A));if(r.set(O,A),!!h()&&!g(A)&&d(A.value)&&!v(O)){if(b(O)){n.delete(O);return}e.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(){n.forEach(A=>{let P=y(A);_(A)||v(A)||e.report({message:`The translation for '${A}' is missing`,startIndex:P.loc.start.offset,endIndex:P.loc.end.offset,fix(O){O.add(A,"TODO")}})})}}}}});var zD=x(Dm=>{"use strict";p();Object.defineProperty(Dm,"__esModule",{value:!0});Dm.MissingAsset=void 0;var HD=J(),qS=bn(),ane=Ue();Dm.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:HD.SourceCodeType.LiquidHtml,severity:HD.Severity.ERROR,schema:{},targets:[]},create(e){return{async LiquidVariable(t){if(t.filters.length===0||t.filters[0].name!=="asset_url"||!(0,ane.isLiquidString)(t.expression))return;let n=t.expression,r=`assets/${n.value}`,i=r,s=await(0,qS.doesFileExist)(e,i);s||i.endsWith(".scss.css")&&(i=i.replace(".scss.css",".scss.liquid"),s=await(0,qS.doesFileExist)(e,i),s)||(i.endsWith(".js")||i.endsWith(".css"))&&(i+=".liquid",s=await(0,qS.doesFileExist)(e,i),s)||e.report({message:`'${r}' does not exist`,startIndex:n.position.start,endIndex:n.position.end})}}}}});var GD=x(jm=>{"use strict";p();Object.defineProperty(jm,"__esModule",{value:!0});jm.MissingContentForArguments=void 0;var WD=J(),IS=Kn();jm.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:WD.SourceCodeType.LiquidHtml,severity:WD.Severity.WARNING,schema:{},targets:[]},create(e){return{async ContentForMarkup(t){let n=(0,IS.getBlockName)(t);if(!n)return;let r=await(0,IS.getLiquidDocParams)(e,`blocks/${n}.liquid`);if(!r)return;let i=new Map(t.args.map(a=>[a.name,a])),s=Array.from(r.values()).filter(a=>a.required&&!i.has(a.name));(0,IS.reportMissingArguments)(e,t,s,n)}}}}});var KD=x(Bm=>{"use strict";p();Object.defineProperty(Bm,"__esModule",{value:!0});Bm.MissingRenderSnippetArguments=void 0;var JD=J(),MS=Kn();Bm.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:JD.SourceCodeType.LiquidHtml,severity:JD.Severity.WARNING,schema:{},targets:[]},create(e){return{async RenderMarkup(t){let n=(0,MS.getSnippetName)(t);if(!n)return;let r=await(0,MS.getLiquidDocParams)(e,`snippets/${n}.liquid`);if(!r)return;let i=new Map(t.args.map(o=>[o.name,o])),s=t.alias?.value??(t.variable?n.slice(n.lastIndexOf("/")+1):void 0),a=Array.from(r.values()).filter(o=>o.required&&!i.has(o.name)&&o.name!==s);(0,MS.reportMissingArguments)(e,t,a,n)}}}}});var YD=x(Vm=>{"use strict";p();Object.defineProperty(Vm,"__esModule",{value:!0});Vm.MissingTemplate=void 0;var RS=ue(),one=Yk(),Fm=J(),cne=bn(),une={ignoreMissing:Fm.SchemaProp.array(Fm.SchemaProp.string(),[])};Vm.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:Fm.SourceCodeType.LiquidHtml,severity:Fm.Severity.ERROR,schema:une,targets:[]},create(e){let t=i=>typeof i.markup!="string";function n(i){return e.settings.ignoreMissing.some(s=>(0,one.minimatch)(i,s))}async function r(i,{position:s}){await(0,cne.doesFileExist)(e,i)||n(i)||e.report({message:`'${i}' does not exist`,startIndex:s.start,endIndex:s.end})}return{async RenderMarkup(i){if(i.snippet.type===RS.NodeTypes.VariableLookup||i.snippet.type===RS.NodeTypes.Range)return;let s=i.snippet,a=`snippets/${s.value}.liquid`;await r(a,s)},async LiquidTag(i){if(!t(i)||i.name!==RS.NamedTags.section)return;let s=i.markup.name,a=`sections/${s.value}.liquid`;await r(a,s)}}}}});var XD=x($m=>{"use strict";p();Object.defineProperty($m,"__esModule",{value:!0});$m.OrphanedSnippet=void 0;var lne=Le(),QD=J();$m.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:QD.SourceCodeType.LiquidHtml,severity:QD.Severity.WARNING,schema:{},targets:[]},create(e){return{async onCodePathEnd(){let{getReferences:t}=e;if(!t)return;let n=e.file.uri;(0,lne.isSnippet)(n)&&(await t(n)).length===0&&e.report({message:"This snippet is not referenced by any other files",startIndex:0,endIndex:1})}}}}});var t2=x(Hm=>{"use strict";p();Object.defineProperty(Hm,"__esModule",{value:!0});Hm.PaginationSize=void 0;var DS=ue(),Um=J(),ZD=Ne(),e2=Ue(),fne=Be(),dne={minSize:Um.SchemaProp.number(1),maxSize:Um.SchemaProp.number(250)};Hm.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:Um.SourceCodeType.LiquidHtml,severity:Um.Severity.WARNING,schema:dne,targets:[]},create(e){let t=e.settings.minSize,n=e.settings.maxSize,r=[],i=[];function s(a,o,c=`Pagination size must be a positive integer between ${t} and ${n}.`){t<=o&&o<=n||e.report({message:c,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,e2.isNodeOfType)(DS.NodeTypes.VariableLookup,o)?i.push(o):(0,e2.isNodeOfType)(DS.NodeTypes.Number,o)&&s(o,Number(o.value))},async LiquidRawTag(a){if(a.name==="schema"){let o=(0,fne.parseJSON)(a.body.value);if((0,ZD.isError)(o))return;o.settings&&Array.isArray(o.settings)&&(r=o.settings)}},async onCodePathEnd(){i.forEach(a=>{let o=(0,ZD.last)(a.lookups);if(o===void 0||o.type!==DS.NodeTypes.String)return;let c=o.value,l=r.find(f=>f.id===c);if(l!==void 0){if(l.default===void 0){e.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 ${t} and ${n} but is currently ${l.default}.`)}})}}}}});var r2=x(yc=>{"use strict";p();Object.defineProperty(yc,"__esModule",{value:!0});yc.scriptTagSuggestion=yc.liquidFilterSuggestion=void 0;var hne=Ne(),n2=e=>`Use an HTML script tag with the ${e} attribute instead`,pne=(e,t,n,r)=>({message:n2(e),fix(i){let a=`{{ ${t.source.slice(n.expression.position.start,(0,hne.last)(n.filters,-1)?.position.end??t.position.start)} }}`;i.replace(r.position.start,r.position.end,`<script src="${a}" ${e}></script>`)}});yc.liquidFilterSuggestion=pne;var mne=(e,t)=>({message:n2(e),fix(n){n.insert(t.blockStartPosition.end-1,` ${e}`)}});yc.scriptTagSuggestion=mne});var a2=x(Wm=>{"use strict";p();Object.defineProperty(Wm,"__esModule",{value:!0});Wm.ParserBlockingScript=void 0;var i2=ue(),s2=J(),jS=Ne(),bi=Ue(),zm=r2();Wm.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:s2.SourceCodeType.LiquidHtml,severity:s2.Severity.ERROR,schema:{},targets:[]},create(e){return{LiquidFilter:async(t,n)=>{if(t.name!=="script_tag")return;let i=t.source.slice(t.position.start,t.position.end).indexOf("script_tag"),s=(0,jS.last)(n),a=(0,jS.last)(n,-1);e.report({message:"The script_tag filter is parser-blocking. Use a <script> tag with async or defer for better performance",startIndex:t.position.start+i,endIndex:t.position.end,suggest:a&&a.type===i2.NodeTypes.LiquidVariableOutput&&s&&s.type===i2.NodeTypes.LiquidVariable&&(0,jS.last)(s.filters)===t?[(0,zm.liquidFilterSuggestion)("defer",t,s,a),(0,zm.liquidFilterSuggestion)("async",t,s,a)]:void 0})},HtmlRawNode:async t=>{if(t.name!=="script"||!t.attributes.filter(bi.isValuedHtmlAttribute).some(s=>(0,bi.isAttr)(s,"src")))return;let r=t.attributes.filter(bi.isHtmlAttribute).some(s=>(0,bi.isAttr)(s,"async")||(0,bi.isAttr)(s,"defer")),i=t.attributes.filter(bi.isValuedHtmlAttribute).some(s=>(0,bi.isAttr)(s,"type")&&((0,bi.hasAttributeValueOf)(s,"module")||(0,bi.hasAttributeValueOf)(s,"importmap")));r||i||e.report({message:"Avoid parser blocking scripts by adding `defer` or `async` on this tag",startIndex:t.position.start,endIndex:t.position.end,suggest:[(0,zm.scriptTagSuggestion)("defer",t),(0,zm.scriptTagSuggestion)("async",t)]})}}}}});var u2=x(Km=>{"use strict";p();Object.defineProperty(Km,"__esModule",{value:!0});Km.SchemaPresetsBlockOrder=void 0;var Gm=Be(),gne=Le(),o2=J();Km.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:o2.SourceCodeType.LiquidHtml,severity:o2.Severity.WARNING,schema:{},targets:[]},create(e){return{async LiquidRawTag(t){if(t.name!=="schema"||t.body.kind!=="json")return;let n=t.blockStartPosition.end,r=await(0,gne.getSchema)(e),{validSchema:i,ast:s}=r??{};if(!i||i instanceof Error||!s||s instanceof Error)return;let a=i.presets;a&&a.forEach((o,c)=>{"blocks"in o&&o.blocks&&c2(o,e,n,s,["presets",String(c)])})}}}};function c2(e,t,n,r,i){if("blocks"in e&&typeof e.blocks=="object"&&e.blocks){let s="block_order"in e?e.block_order:void 0;s||yne(e)&&Jm(t,n,r,i,"block_order is missing",!1),s?.forEach((a,o)=>{if(!e.blocks||!Array.isArray(e.blocks)&&!e.blocks[a]){let c=i.concat(["block_order"]).concat([String(o)]);Jm(t,n,r,c,`block '${a}' is missing from 'blocks'`)}});for(let[a,o]of Object.entries(e.blocks)){if(o.static){if(Array.isArray(s)&&s.includes(a)){let c=i.concat(["block_order"]);Jm(t,n,r,c,`static block '${a}' cannot be in the block_order`)}}else if(Array.isArray(s)&&!s.includes(a)){let c=i.concat(["block_order"]);Jm(t,n,r,c,`block '${a}' is missing from the block_order`)}o.blocks&&(i.push("blocks",a),c2(o,t,n,r,i))}}}function yne(e){return"blocks"in e&&typeof e.blocks=="object"&&e.blocks!==null&&!Array.isArray(e.blocks)?Object.entries(e.blocks).some(([t,n])=>n.static!==!0):!1}function Jm(e,t,n,r,i,s=!0){let a=(0,Gm.nodeAtPath)(n,r),o=s?t+(0,Gm.getLocStart)(a):t+(0,Gm.getLocEnd)(a)-1,c=t+(0,Gm.getLocEnd)(a);e.report({message:i,startIndex:o,endIndex:c})}});var Ym=x(BS=>{"use strict";p();Object.defineProperty(BS,"__esModule",{value:!0});BS.isContentForBlock=_ne;function _ne(e){return typeof e=="string"?!1:e.contentForType.value==="block"}});var f2=x(Qm=>{"use strict";p();Object.defineProperty(Qm,"__esModule",{value:!0});Qm.SchemaPresetsStaticBlocks=void 0;var FS=ue(),_c=Be(),vne=Le(),l2=J(),bne=Ym();Qm.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:l2.SourceCodeType.LiquidHtml,severity:l2.Severity.ERROR,schema:{},targets:[]},create(e){let t=[],n=[],r=0;function i(){n.forEach(s=>{t.some(a=>a.id===s.id&&a.type===s.type)||e.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!==FS.NamedTags.content_for||!(0,bne.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!==FS.NodeTypes.String)return;let c=o.value;a?.type===FS.NodeTypes.String&&t.push({id:a.value,type:c})},async LiquidRawTag(s){if(s.name==="schema"&&s.body.kind==="json"){r=s.blockStartPosition.end;let a=await(0,vne.getSchema)(e),{validSchema:o,ast:c}=a??{};if(!o||o instanceof Error||!c||c instanceof Error)return;let l=o.presets;if(!l)return;l.forEach((f,h)=>{if("blocks"in f&&f.blocks){let d=["presets",h,"blocks"];Array.isArray(f.blocks)?f.blocks.forEach((g,v)=>{if(g.static===!0&&g.id){let b=(0,_c.nodeAtPath)(c,d.concat([v]));n.push({id:g.id,type:g.type,startIndex:r+(0,_c.getLocStart)(b),endIndex:r+(0,_c.getLocEnd)(b)})}}):typeof f.blocks=="object"&&Object.entries(f.blocks).forEach(([g,v])=>{if(v.static===!0){let b=(0,_c.nodeAtPath)(c,d.concat(g));n.push({id:g,type:v.type,startIndex:r+(0,_c.getLocStart)(b),endIndex:r+(0,_c.getLocEnd)(b)})}})}})}},async onCodePathEnd(){i()}}}}});var m2=x(Zm=>{"use strict";p();Object.defineProperty(Zm,"__esModule",{value:!0});Zm.RemoteAsset=void 0;var tn=J(),vc=Ue(),kne=Ne(),Sne=["img","link","source","script"],Tne=["fonts.shopifycdn.com","cdn.shopify.com"],wne=["stylesheet_tag","script_tag","image_tag","img_tag"],h2=["product_img_url","article_img_url","collection_img_url","img_url"],p2=["asset_url","image_url","asset_img_url","file_img_url","file_url","global_asset_url","shopify_asset_url","external_video_url","font_url"],xne="canonical_url";function VS(e){return e.type===tn.LiquidHtmlNodeTypes.LiquidVariableOutput}function $S(e){return typeof e!="string"&&e.type===tn.LiquidHtmlNodeTypes.LiquidVariable}function Ene(e){return e.startsWith("#")}function d2(e){return/^data:/i.test(e)}function Ml(e){return e.replace(/[“”‘’]/g,"")}function Ane(e){let t=e.value[0];if(!t||!VS(t))return!1;let n=t.markup;return $S(n)?n.expression.type===tn.LiquidHtmlNodeTypes.VariableLookup:!1}function Xm(e,t=[]){if(/^\/cdn\//.test(e))return!0;try{let n=new URL(e);return[...Tne,...t].includes(n.hostname)}catch{return!1}}function One(e,t=[]){return e.value.some(n=>{if(n.type===tn.LiquidHtmlNodeTypes.TextNode&&/^(https?:)?\/\//.test(Ml(n.value))&&!Xm(Ml(n.value),t))return!0;if(VS(n)){let r=n.markup;if($S(r)){let i=r.expression;if(i.type===tn.LiquidHtmlNodeTypes.String&&/^https?:\/\//.test(i.value)&&!Xm(i.value,t))return!0}}return!1})}function Pne(e){let t=[...h2,...p2],n=[xne];return e.value.some(r=>!VS(r)||!$S(r.markup)?!1:!!(r.markup.filters.some(s=>t.includes(s.name))||(0,vc.isNodeOfType)(tn.LiquidHtmlNodeTypes.VariableLookup,r.markup.expression)&&r.markup.expression.name&&n.includes(r.markup.expression.name)))}function Nne(e){return e.map(t=>{try{return new URL(t).hostname.replace(/^www\./,"")}catch{return}}).filter(t=>t!==void 0)}var Cne={allowedDomains:tn.SchemaProp.array(tn.SchemaProp.string()).optional()};Zm.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:tn.SourceCodeType.LiquidHtml,severity:tn.Severity.WARNING,schema:Cne,targets:[]},create(e){let t=Nne(e.settings.allowedDomains||[]);function n(i){let s=(0,vc.getHtmlNodeName)(i);if(!s||!Sne.includes(s))return;let a=i.attributes.filter(vc.isValuedHtmlAttribute).find(h=>(0,vc.isAttr)(h,"src")||(0,vc.isAttr)(h,"href"));if(!a)return;let o=a.value.find(h=>h.type===tn.LiquidHtmlNodeTypes.TextNode);if(o&&Ene(Ml(o.value))||o&&d2(Ml(o.value))||Ane(a)||a.value.filter(h=>h.type===tn.LiquidHtmlNodeTypes.TextNode).some(h=>Xm(Ml(h.value),t)))return;if(One(a,t)){e.report({message:"Asset should be served by the Shopify CDN for better performance.",startIndex:a.position.start,endIndex:a.position.end});return}Pne(a)||e.report({message:"Use one of the asset_url filters to serve assets for better performance.",startIndex:a.position.start,endIndex:a.position.end})}function r(i,s){let a=i.name;if(!wne.includes(a))return;let o=(0,kne.last)(s);if(!o||!(0,vc.isNodeOfType)(tn.LiquidHtmlNodeTypes.LiquidVariable,o)||o.filters.some(f=>h2.includes(f.name)||p2.includes(f.name)))return;let l=o.expression;l.type===tn.LiquidHtmlNodeTypes.String&&d2(l.value)||(l.type===tn.LiquidHtmlNodeTypes.String&&!Xm(l.value,t)&&e.report({message:"Asset should be served by the Shopify CDN for better performance.",startIndex:l.position.start,endIndex:l.position.end}),e.report({message:"Use one of the asset_url filters to serve assets for better performance.",startIndex:o.expression.position.start,endIndex:i.position.end}))}return{async HtmlVoidElement(i){n(i)},async HtmlSelfClosingElement(i){n(i)},async HtmlRawNode(i){n(i)},async LiquidFilter(i,s){r(i,s)}}}}});var y2=x(tg=>{"use strict";p();Object.defineProperty(tg,"__esModule",{value:!0});tg.RequiredLayoutThemeObject=void 0;var eg=J(),g2=Ue(),Lne=/^layout\/[^/]+\.liquid$/i;tg.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:eg.SourceCodeType.LiquidHtml,severity:eg.Severity.ERROR,schema:{},targets:[eg.ConfigTarget.All,eg.ConfigTarget.Recommended]},create(e){if(!Lne.test(e.toRelativePath(e.file.uri)))return{};let t=["content_for_header","content_for_layout"],n=new Set,r,i;function s(a){a.name&&t.includes(a.name)&&n.add(a.name)}return{async VariableLookup(a){s(a)},async HtmlElement(a){(0,g2.isHtmlTag)(a,"head")?r=a:(0,g2.isHtmlTag)(a,"body")&&(i=a)},async onCodePathEnd(){for(let a of t)if(!n.has(a)){let o=`The required object '{{ ${a} }}' is missing in layout/theme.liquid`,c=a==="content_for_header"?r:i,l=c?.blockEndPosition.start;e.report({message:o,startIndex:c?.position.start??0,endIndex:c?.position.end??0,fix:l!==void 0?f=>f.insert(l,`{{ ${a} }}`):void 0})}}}}}});var v2=x(ng=>{"use strict";p();Object.defineProperty(ng,"__esModule",{value:!0});ng.ReservedDocParamNames=void 0;var qne=ue(),_2=J(),Ine=new Set(Object.keys(qne.LiquidLiteralValues));ng.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:_2.SourceCodeType.LiquidHtml,severity:_2.Severity.ERROR,schema:{},targets:[]},create(e){return{async LiquidDocParamNode(t){let n=t.paramName.value;Ine.has(n)&&e.report({message:`The parameter name '${n}' is reserved because Liquid parses it as a literal.`,startIndex:t.paramName.position.start,endIndex:t.paramName.position.end})}}}}});var k2=x(ig=>{"use strict";p();Object.defineProperty(ig,"__esModule",{value:!0});ig.StaticStylesheetAndJavascriptTags=void 0;var rg=ue(),b2=J();ig.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:b2.SourceCodeType.LiquidHtml,severity:b2.Severity.ERROR,schema:{},targets:[]},create(e){return{async LiquidRawTag(t){if(t.name!=="stylesheet"&&t.name!=="javascript")return;let n=t.body.nodes.filter(r=>r.type===rg.NodeTypes.LiquidVariableOutput||r.type===rg.NodeTypes.LiquidTag||r.type===rg.NodeTypes.LiquidRawTag);for(let r of n){let i=t.name==="stylesheet"?"CSS":"JavaScript",s=r.type===rg.NodeTypes.LiquidVariableOutput?"variable":"tag";e.report({message:`Liquid ${s} found in ${i} block. {% ${t.name} %} tags should only contain static ${i} code.`,startIndex:r.position.start,endIndex:r.position.end})}}}}}});var T2=x(Fr=>{"use strict";p();var Mne=Fr&&Fr.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Rne=Fr&&Fr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Dne=Fr&&Fr.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&Mne(n,t,r[i]);return Rne(n,t),n}})();Object.defineProperty(Fr,"__esModule",{value:!0});Fr.TranslationKeyExists=void 0;var jne=Be(),Bne=Dne(Fn()),Fne=Le(),S2=J(),Vne=Ne();function US(e,t){for(let n of e.split(".")){if(typeof t!="object"||!t.hasOwnProperty(n))return!1;t=t[n]}return!0}Fr.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:S2.SourceCodeType.LiquidHtml,severity:S2.Severity.ERROR,schema:{},targets:[]},create(e){let t=[],n;return{async LiquidVariable(r){r.expression.type==="String"&&r.filters.some(({name:i})=>["t","translate"].includes(i))&&t.push({translationKey:r.expression.value,startIndex:r.expression.position.start,endIndex:r.expression.position.end})},async LiquidRawTag(r){if(r.name!=="schema"||r.body.kind!=="json")return;let i=await e.getDefaultLocale(),s=(0,jne.parseJSON)(r.body.value);(0,Vne.isError)(s)&&s instanceof SyntaxError||(n=s.locales?.[i])},async onCodePathEnd(){let r=await e.getDefaultTranslations(),i=await e.getDefaultLocale(),s=await e.themeDocset?.systemTranslations(),a=Object.keys(s??{});if(!r&&a.length===0)return;let o=(0,Fne.isSection)(e.file.uri)?`sections.${Bne.basename(e.file.uri,".liquid")}.`:void 0;t.forEach(({translationKey:c,startIndex:l,endIndex:f})=>{if(US(c,r)||US(c,n)||o!==void 0&&c.startsWith(o)&&US(c.slice(o.length),n)||a.includes(c))return;let h=`'${c}' does not have a matching entry in 'locales/${i}.default.json'`;n&&(h+=` or '${e.toRelativePath(e.file.uri)}'`),e.report({message:h,startIndex:l,endIndex:f})})}}}}});var P2=x(ag=>{"use strict";p();Object.defineProperty(ag,"__esModule",{value:!0});ag.UnclosedHTMLElement=void 0;var nt=ue(),w2=J(),HS=Ne(),x2=Ue();ag.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:w2.SourceCodeType.LiquidHtml,severity:w2.Severity.WARNING,schema:{},targets:[]},create(e){let t=new Map;return{async HtmlElement(n,r){if($ne(n))return;let[i,s]=(0,HS.findLastAndIndex)(r,x2.isLiquidBranch);if(!i)return;let a=r[s-1],o=r[s-2];if(!a||!o||a.type!==nt.NodeTypes.LiquidTag)return;t.has(o)||t.set(o,{open:new Map,close:new Map,identifiers:new Set});let c=t.get(o),l=E2(i,a);c.identifiers.add(l),c.open.has(l)||c.open.set(l,[]),c.open.get(l).push(n)},async HtmlDanglingMarkerClose(n,r){let[i,s]=(0,HS.findLastAndIndex)(r,x2.isLiquidBranch);if(!i)return;let a=r[s-1],o=r[s-2];if(!a||!o||a.type!==nt.NodeTypes.LiquidTag)return;t.has(o)||t.set(o,{open:new Map,close:new Map,identifiers:new Set});let c=t.get(o),l=E2(i,a);c.identifiers.add(l),c.close.has(l)||c.close.set(l,[]),c.close.get(l).push(n)},async onCodePathEnd(){for(let[n,r]of t){let i=new Map;for(let c of r.identifiers){let l=r.open.get(c)??[],f=r.close.get(c)??[],h=[].concat(l,f).sort((d,g)=>d.position.start-g.position.start);i.set(c,O2(h))}let s=[].concat(...i.values()).sort((c,l)=>c.position.start-l.position.start),a=O2(s),o=new Set(a);for(let[c,l]of i)for(let f of l)o.has(f)&&(f.type===nt.NodeTypes.HtmlDanglingMarkerClose?e.report({message:`Closing tag does not have a matching opening tag for condition \`${c}\` in ${n.type} '${sg(n)}'`,startIndex:f.position.start,endIndex:f.position.end}):e.report({message:`Opening tag does not have a matching closing tag for condition \`${c}\` in ${n.type} '${sg(n)}'`,startIndex:f.blockStartPosition.start,endIndex:f.blockStartPosition.end}))}}}}};function $ne(e){return e.blockEndPosition.start!==e.blockEndPosition.end}function E2(e,t){if(e.name===null)switch(t.name){case nt.NamedTags.if:return nn(t.markup);case nt.NamedTags.unless:return A2(nn(t.markup));default:return"??"}switch(e.name){case"else":switch(t.name){case nt.NamedTags.if:return A2(nn(t.markup));case nt.NamedTags.unless:return nn(t.markup);case nt.NamedTags.case:return`case ${nn(t.markup)}`;default:return"??"}case nt.NamedTags.elsif:return nn(e.markup);case nt.NamedTags.when:return t.name!==nt.NamedTags.case?"??":`case ${nn(t.markup)} == ${Une(e.markup)}`;default:return"??"}}function Une(e){return typeof e=="string"?e:e.map(nn).join(" or ")}function nn(e){if(typeof e=="string")return e;switch(e.type){case nt.NodeTypes.String:return"'"+e.value+"'";case nt.NodeTypes.LiquidLiteral:return e.value===null?"null":e.value.toString();case nt.NodeTypes.Number:return e.value;case nt.NodeTypes.VariableLookup:return`${e.name??""}${e.lookups.map(t=>`[${nn(t)}]`)}`;case nt.NodeTypes.Range:return`(${nn(e.start)}..${nn(e.end)})`;case nt.NodeTypes.Comparison:return[nn(e.left),e.comparator,nn(e.right)].join(" ");case nt.NodeTypes.LogicalExpression:return[nn(e.left),e.relation,nn(e.right)].join(" ");default:return(0,HS.assertNever)(e)}}function A2(e){return e.startsWith("-")?e.slice(1):`-${e}`}function O2(e){let t=[];for(let n of e)n.type===nt.NodeTypes.HtmlElement?t.push(n):t.length>0&&sg(n)===sg(t.at(-1))&&t.at(-1).type===nt.NodeTypes.HtmlElement&&n.type===nt.NodeTypes.HtmlDanglingMarkerClose?t.pop():t.push(n);return t}function sg(e){return e.type===nt.NodeTypes.HtmlElement||e.type===nt.NodeTypes.HtmlDanglingMarkerClose?e.name.length===0?"":e.source.slice(e.name.at(0).position.start,e.name.at(-1).position.end):e.type===nt.NodeTypes.LiquidTag?e.name:e.type}});var zS=x(og=>{"use strict";p();Object.defineProperty(og,"__esModule",{value:!0});og.hasLiquidDoc=Hne;og.extractDocDefinition=zne;var C2=Nr();function Hne(e){let t=!1;return(0,C2.visit)(e,{LiquidRawTag(n){n.name==="doc"&&(t=!0)}}),t}function zne(e,t){let n=!1,r=(0,C2.visit)(t,{LiquidRawTag(o){o.name==="doc"&&(n=!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:N2(o.content.value.trim()),nodeType:"example"}},LiquidDocDescriptionNode(o){return{content:N2(o.content.value.trim()),nodeType:"description"}}});if(!n)return{uri:e};let{parameters:i,examples:s,description:a}=r.reduce((o,c)=>(c.nodeType==="param"?o.parameters.push(c):c.nodeType==="example"?o.examples.push(c):c.nodeType==="description"&&!o.description&&(o.description=c),o),{parameters:[],examples:[],description:void 0});return{uri:e,liquidDoc:{...i.length&&{parameters:i},...s.length&&{examples:s},...a&&{description:a}}}}function N2(e){let t=e.split(`
|
|
85
|
+
`);if(t.length<=1)return e;let r=t.slice(1).filter(s=>s.trim().length>0).map(s=>{let a=s.match(/^\s*/);return a?a[0].length:0});if(r.length===0)return e;let i=Math.min(...r);return[t[0],...t.slice(1).map(s=>s.trim().length===0?s:s.slice(i))].join(`
|
|
86
|
+
`)}});var B2=x($r=>{"use strict";p();var Wne=$r&&$r.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Gne=$r&&$r.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Jne=$r&&$r.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&Wne(n,t,r[i]);return Gne(n,t),n}})();Object.defineProperty($r,"__esModule",{value:!0});$r.UndefinedObject=void 0;var Vr=ue(),Kne=hi(),Yne=Jne(Fn()),Qne=Le(),L2=J(),q2=Ne(),Xne=zS(),Zne=dl(),I2=Ue();$r.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:L2.SourceCodeType.LiquidHtml,severity:L2.Severity.WARNING,schema:{},targets:[]},create(e){let t=e.toRelativePath(e.file.uri),n=e.file.ast;if((0,q2.isError)(n))return{};if(t.startsWith("snippets/")&&!(0,Xne.hasLiquidDoc)(n))return{};if(!e.themeDocset)return{};let r=e.themeDocset,i=new Map,s=new Set(nre(t)),a=[];function o(c,l){if(!c)return;let f=i.get(c)??[];i.set(c,f.concat(l))}return{async LiquidDocParamNode(c){let l=c.paramName?.value;l&&s.add(l)},async LiquidTag(c,l){(0,I2.isWithinRawTagThatDoesNotParseItsContents)(l)||(ore(c)&&o(c.markup.name,{start:c.blockStartPosition.end}),R2(c)&&o(c.markup.name,{start:c.blockEndPosition?.end}),["form","paginate"].includes(c.name)&&o(c.name,{start:c.blockStartPosition.end,end:c.blockEndPosition?.start}),c.name==="layout"&&o("none",{start:c.position.start,end:c.position.end}),(lre(c)||fre(c))&&c.markup.name!==null&&o(c.markup.name,{start:c.position.start}),(cre(c)||ure(c))&&(o(c.markup.variableName,{start:c.blockStartPosition.end,end:c.blockEndPosition?.start}),o(c.name==="for"?"forloop":"tablerowloop",{start:c.blockStartPosition.end,end:c.blockEndPosition?.start})))},async VariableLookup(c,l){if((0,I2.isWithinRawTagThatDoesNotParseItsContents)(l))return;let f=(0,q2.last)(l);j2(f)&&R2(f)||are(c,l)||a.push(c)},async onCodePathEnd(){(await ere(r,e)).forEach(l=>s.add(l.name)),(await rre(e)).forEach(l=>s.add(l)),a.forEach(l=>{!l.name||ire(l.name,l.position,s,i)||e.report({message:`Unknown object '${l.name}' used.`,startIndex:l.position.start,endIndex:l.position.end})})}}}};async function ere(e,t){let n=await e.objects(),r=t.toRelativePath(t.file.uri),i=new Set([...D2(r,t.mode),...await tre(t,r)]);return n.filter(({access:s,name:a})=>i.has(a)||!s||s.global===!0||s.template.length>0)}async function tre(e,t){let{getReferences:n}=e;return!t.startsWith("snippets/")||!n?[]:(await(0,Zne.getAncestorUris)(e.file.uri,async i=>{try{return await n(i)}catch{return[]}})).flatMap(i=>D2(e.toRelativePath(i),e.mode))}function nre(e){return e.startsWith("blocks/")?[Kne.BLOCK_CONTENT_PARAMETER]:[]}async function rre(e){return(0,Qne.isBlock)(e.file.uri)?[...(await e.getBlockParameters(Yne.basename(e.file.uri,".liquid")))?.keys()??[]]:[]}var M2=["app","section","recommendations","block"];function D2(e,t="theme"){return e.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"]:e.startsWith("sections/")?["section","predictive_search","recommendations","comment"]:e.startsWith("blocks/")?M2:e.startsWith("snippets/")?t==="app"?M2:["app","section","block"]:[]}function ire(e,t,n,r){if(n.has(e))return!0;let i=r.get(e);return i?i.some(s=>sre(t,s)):!1}function sre(e,t){let n=e.start,r=!t.start||n>t.start,i=!t.end||n<t.end;return r&&i}function are(e,t){if(e.name!=="continue"||e.lookups.length>0)return!1;let[n,r,i]=t.slice(-3);return i?.type===Vr.NodeTypes.NamedArgument&&i.name==="offset"&&r?.type===Vr.NodeTypes.ForMarkup&&j2(n)&&n.name===Vr.NamedTags.for}function j2(e){return e?.type===Vr.NodeTypes.LiquidTag}function R2(e){return e.name===Vr.NamedTags.capture}function ore(e){return e.name===Vr.NamedTags.assign&&typeof e.markup!="string"}function cre(e){return e.name===Vr.NamedTags.for&&typeof e.markup!="string"}function ure(e){return e.name===Vr.NamedTags.tablerow&&typeof e.markup!="string"}function lre(e){return e.name===Vr.NamedTags.increment&&typeof e.markup!="string"}function fre(e){return e.name===Vr.NamedTags.decrement&&typeof e.markup!="string"}});var V2=x(cg=>{"use strict";p();Object.defineProperty(cg,"__esModule",{value:!0});cg.UniqueDocParamNames=void 0;var F2=J();cg.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:F2.SourceCodeType.LiquidHtml,severity:F2.Severity.ERROR,schema:{},targets:[]},create(e){let t=new Set;return{async LiquidDocParamNode(n){let r=n.paramName.value;if(!t.has(r)){t.add(r);return}e.report({message:`The parameter '${r}' is defined more than once.`,startIndex:n.paramName.position.start,endIndex:n.paramName.position.end})}}}}});var ug=x(rs=>{"use strict";p();Object.defineProperty(rs,"__esModule",{value:!0});rs.CLOSEST_ARGUMENT=rs.REQUIRED_CONTENT_FOR_ARGUMENTS=rs.RESERVED_CONTENT_FOR_ARGUMENTS=void 0;rs.RESERVED_CONTENT_FOR_ARGUMENTS=["attributes","block","blocks","class","context","inherit","resource","resources","schema","section","sections","settings","snippet","snippets","src","style","styles","template","templates"];rs.REQUIRED_CONTENT_FOR_ARGUMENTS=["id","type"];rs.CLOSEST_ARGUMENT="closest."});var H2=x(lg=>{"use strict";p();Object.defineProperty(lg,"__esModule",{value:!0});lg.UniqueStaticBlockId=void 0;var WS=ue(),$2=J(),U2=ug(),dre=Ym(),hre=new Set([...U2.REQUIRED_CONTENT_FOR_ARGUMENTS,...U2.RESERVED_CONTENT_FOR_ARGUMENTS]);lg.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:$2.SourceCodeType.LiquidHtml,severity:$2.Severity.ERROR,schema:{},targets:[]},create(e){let t=new Set;return{async LiquidTag(n){if(n.name!==WS.NamedTags.content_for||!(0,dre.isContentForBlock)(n.markup))return;let r=n.markup.args.find(f=>f.name==="id");if(!r)return;let i=r.value;if(i.type!==WS.NodeTypes.String)return;let s=i.value,a=n.markup.args.filter(f=>!hre.has(f.name)),o=[];for(let f of a){if(f.value.type!==WS.NodeTypes.String)return;o.push(`${f.name}=${f.value.value}`)}o.sort();let c=o.join(","),l=`${s}::${c}`;t.has(l)?e.report({message:`The id '${s}' is already being used by another static block`,startIndex:i.position.start,endIndex:i.position.end,suggest:[]}):t.add(l)}}}}});var W2=x(fg=>{"use strict";p();Object.defineProperty(fg,"__esModule",{value:!0});fg.UnknownFilter=void 0;var z2=J();fg.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:z2.SourceCodeType.LiquidHtml,severity:z2.Severity.ERROR,schema:{},targets:[]},create(e){return e.themeDocset?{async LiquidFilter(t){(await e.themeDocset.filters()).some(r=>r.name===t.name)||e.report({message:`Unknown filter '${t.name}' used.`,startIndex:t.position.start+1,endIndex:t.position.end})}}:{}}}});var J2=x(dg=>{"use strict";p();Object.defineProperty(dg,"__esModule",{value:!0});dg.UnrecognizedContentForArguments=void 0;var G2=J(),GS=Kn(),JS=ug();dg.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:G2.SourceCodeType.LiquidHtml,severity:G2.Severity.WARNING,schema:{},targets:[]},create(e){let t=new Set([...JS.RESERVED_CONTENT_FOR_ARGUMENTS,...JS.REQUIRED_CONTENT_FOR_ARGUMENTS]);return{async ContentForMarkup(n){let r=(0,GS.getBlockName)(n);if(!r)return;let i=await(0,GS.getLiquidDocParams)(e,`blocks/${r}.liquid`);if(!i)return;let s=n.args.filter(a=>!i.has(a.name)).filter(a=>!t.has(a.name)).filter(a=>!a.name.startsWith(JS.CLOSEST_ARGUMENT));(0,GS.reportUnknownArguments)(e,n,s,r)}}}}});var Y2=x(hg=>{"use strict";p();Object.defineProperty(hg,"__esModule",{value:!0});hg.UnrecognizedRenderSnippetArguments=void 0;var K2=J(),KS=Kn();hg.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:K2.SourceCodeType.LiquidHtml,severity:K2.Severity.WARNING,schema:{},targets:[]},create(e){function t(n,r,i){let s=n.alias,a=n.variable;if(s&&!r.has(s.value)&&a){let o=a.position.start;e.report({message:`Unknown argument '${s.value}' in render tag for snippet '${i}'.`,startIndex:o,endIndex:s.position.end,suggest:[{message:`Remove '${s.value}'`,fix:c=>{if(a)return c.remove(a.position.start-1,s.position.end)}}]})}}return{async RenderMarkup(n){let r=(0,KS.getSnippetName)(n);if(!r)return;let i=await(0,KS.getLiquidDocParams)(e,`snippets/${r}.liquid`);if(!i)return;let s=n.args.filter(a=>!i.has(a.name));t(n,i,r),(0,KS.reportUnknownArguments)(e,n,s,r)}}}}});var QS=x(jt=>{"use strict";p();Object.defineProperty(jt,"__esModule",{value:!0});jt.offsetAdjust=jt.adjustedSuffix=jt.adjustedPrefix=jt.variableExpressionMatcher=void 0;jt.getVariableLookupsInExpression=gre;jt.validateLookup=yre;jt.getGlobalSettings=vre;var YS=ue(),pre=Be(),mre=Nr();jt.variableExpressionMatcher=/{{(.+?)}}/;jt.adjustedPrefix="{% if ";jt.adjustedSuffix=" %}{% endif %}";jt.offsetAdjust=2-jt.adjustedPrefix.length;function gre(e){let t=jt.variableExpressionMatcher.exec(e);if(t==null)return{warning:'Invalid visible_if expression. It should take the form "{{ <expression> }}".'};let n=t[1],r=`${jt.adjustedPrefix}${n}${jt.adjustedSuffix}`;try{let i=(0,YS.toLiquidHtmlAST)(r,{mode:"strict",allowUnclosedDocumentNode:!1});if(i.children.length!==1)throw new Error("Unexpected child count for DocumentNode");let s=i.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:"Syntax error: cannot parse visible_if expression."};if(a.type===YS.NodeTypes.LiquidLiteral&&["true","false"].includes(a.keyword))return null;let o=(0,mre.visit)(s,{VariableLookup:c=>c});return o.length===0?{warning:"visible_if expression contains no references to any settings. This is likely an error."}:o}catch(i){return i instanceof SyntaxError?{warning:"Syntax error: cannot parse visible_if expression."}:{warning:String(i)}}}function yre(e,t){let n=_re(e),r=[],i=t;for(;n.length>0;){let s=n.shift();r.push(s);let a=i[s];if(!a)return`Invalid variable: "${r.join(".")}" was not found.`;if(typeof a=="boolean")return n.length>0?`Invalid variable: "${r.join(".")}" refers to a variable, but is being used here as a namespace.`:null;i=a}return`Invalid variable: "${r.join(".")}" refers to a namespace, but is being used here as a variable.`}function _re(e){let t=e.lookups.map(n=>{if(n.type!==YS.NodeTypes.String)throw new Error(`Expected lookups to be String nodes: ${JSON.stringify(n)}`);return n.value});return[e.name,...t]}async function vre(e){let t=[];try{let n=e.toUri("config/settings_schema.json"),r=await e.fs.readFile(n),i=(0,pre.parseJSON)(r);if(Array.isArray(i))for(let s of i)"settings"in s&&Array.isArray(s.settings)&&t.push(...s.settings.map(a=>a.id).filter(a=>a))}catch(n){console.error("Error fetching global settings:",n)}return t}});var ej=x(mg=>{"use strict";p();Object.defineProperty(mg,"__esModule",{value:!0});mg.UnusedAssign=void 0;var Z2=ue(),Q2=J(),bre=Le(),X2=Ue(),kre=QS();mg.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:Q2.SourceCodeType.LiquidHtml,severity:Q2.Severity.WARNING,schema:{},targets:[]},create(e){let t=new Map,n=new Set;function r(i){i.type===Z2.NodeTypes.VariableLookup&&n.add(i.name)}return{async LiquidTag(i,s){(0,X2.isWithinRawTagThatDoesNotParseItsContents)(s)||(Sre(i)||pg(i)&&i.markup.name)&&t.set(i.markup.name,i)},async VariableLookup(i,s){if((0,X2.isWithinRawTagThatDoesNotParseItsContents)(s))return;let a=s.at(-1);a&&pg(a)||r(i)},async LiquidRawTag(i){if(i.name!=="schema"||i.body.kind!=="json")return;let a=(await(0,bre.getSchema)(e))?.validSchema;if(!(!a||a instanceof Error))for(let o of a.settings??[]){if(!("visible_if"in o)||typeof o.visible_if!="string")continue;let c=(0,kre.getVariableLookupsInExpression)(o.visible_if);if(!(!c||"warning"in c))for(let l of c)l.name&&n.add(l.name)}},async onCodePathEnd(){for(let[i,s]of t.entries())!n.has(i)&&!i.startsWith("_")&&e.report({message:`The variable '${i}' is assigned but not used`,startIndex:pg(s)?s.blockStartPosition.start:s.position.start,endIndex:pg(s)?s.blockStartPosition.end:s.position.end,suggest:[{message:`Remove the unused variable '${i}'`,fix:a=>a.remove(s.position.start,s.position.end)}]})}}}};function Sre(e){return e.name==="assign"&&typeof e.markup!="string"}function pg(e){return e.type==Z2.NodeTypes.LiquidTag&&e.name==="capture"&&typeof e.markup!="string"}});var nj=x(gg=>{"use strict";p();Object.defineProperty(gg,"__esModule",{value:!0});gg.UnsupportedDocTag=void 0;var tj=J(),Tre=Qi();gg.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:tj.SourceCodeType.LiquidHtml,severity:tj.Severity.ERROR,schema:{},targets:[]},create(e){return(0,Tre.filePathSupportsLiquidDoc)(e.file.uri)?{}:{async LiquidRawTag(n){n.name==="doc"&&e.report({message:"The `doc` tag can only be used within a snippet or block.",startIndex:n.position.start,endIndex:n.position.end,suggest:[{message:"Remove unsupported `doc` tag",fix:r=>r.remove(n.position.start,n.position.end)}]})}}}}});var ij=x(yg=>{"use strict";p();Object.defineProperty(yg,"__esModule",{value:!0});yg.UnsupportedFilterArguments=void 0;var XS=ue(),rj=J(),wre=[XS.NamedTags.render,XS.NamedTags.include,XS.NamedTags.content_for];function xre(e){let t=null;for(let n=0;n<e.length;n++){let r=e[n];if(t){r===t&&(t=null);continue}if(r==="'"||r==='"'){t=r;continue}if(r==="|")return n}return-1}yg.UnsupportedFilterArguments={meta:{code:"UnsupportedFilterArguments",name:"Unsupported Filter Arguments",docs:{description:"This check warns against using filters on values passed as arguments to a 'render', 'include', or 'content_for' tag. Filters are not applied in that position and the value is passed through unchanged, which silently produces incorrect output.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/unsupported-filter-arguments"},type:rj.SourceCodeType.LiquidHtml,severity:rj.Severity.ERROR,schema:{},targets:[]},create(e){return{async LiquidTag(t){if(!wre.includes(t.name)||typeof t.markup!="string")return;let n=xre(t.markup);if(n===-1)return;let r=t.source.indexOf(t.markup,t.position.start);if(r===-1)return;let i=r+n,s=r+t.markup.length;e.report({message:`Filters cannot be used on arguments passed to the '${t.name}' tag. Apply the filter beforehand (e.g. with {% assign %}) and pass the result instead.`,startIndex:i,endIndex:s})}}}}});var sj=x(_g=>{"use strict";p();Object.defineProperty(_g,"__esModule",{value:!0});_g.UnusedDocParam=void 0;var ZS=ue(),e1=J(),Ere=Ue(),Are=Kn(),Ore=Xo(),Pre=Le(),Nre=Nr();_g.UnusedDocParam={meta:{code:"UnusedDocParam",name:"Prevent unused doc parameters",docs:{description:"This check ensures parameters defined in the `doc` tag are used within the snippet and passed by its callers.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/unused-doc-param"},type:e1.SourceCodeType.LiquidHtml,severity:e1.Severity.WARNING,schema:{},targets:[]},create(e){let t=new Map,n=new Set;return{async LiquidDocParamNode(r){t.set(r.paramName.value,r)},async VariableLookup(r,i){r.type===ZS.NodeTypes.VariableLookup&&r.name&&!(0,Ere.isLoopScopedVariable)(r.name,i)&&n.add(r.name)},async onCodePathEnd(){let i=[...t].some(([s,a])=>!a.required&&n.has(s))?await Cre(e):void 0;for(let[s,a]of t.entries())n.has(s)?!a.required&&i&&!i.has(s)&&e.report({message:`The parameter '${s}' is never passed to this snippet.`,startIndex:a.position.start,endIndex:a.position.end}):e.report({message:`The parameter '${s}' is defined but not used in this file.`,startIndex:a.position.start,endIndex:a.position.end,suggest:[{message:`Remove unused parameter '${s}'`,fix:o=>o.remove(a.position.start,a.position.end)}]})}}}};async function Cre(e){let{getReferences:t,fs:n,file:r,toRelativePath:i}=e;if(!t||!(0,Pre.isSnippet)(r.uri))return;let s=i(r.uri).replace(/^snippets\//,"").replace(/\.liquid$/,""),a;try{a=await t(r.uri)}catch{return}let o=new Set(a.filter(l=>l.type==="direct").map(({source:l})=>l.uri));if(o.size===0)return;let c=new Set;for(let l of o){let f;try{f=await n.readFile(l)}catch{return}let h=(0,Ore.toSourceCode)(l,f);if(h.type!==e1.SourceCodeType.LiquidHtml||!(0,ZS.isLiquidHtmlNode)(h.ast))return;let d=!1;if((0,Nre.visit)(h.ast,{RenderMarkup(g,v){if((0,Are.getSnippetName)(g)!==s)return;let b=v.at(-1);if(b?.type===ZS.NodeTypes.LiquidTag&&b.name==="include"){d=!0;return}g.args.forEach(({name:_})=>c.add(_)),g.variable&&c.add(g.alias?.value??s)}}),d)return}return c}});var oj=x(vg=>{"use strict";p();Object.defineProperty(vg,"__esModule",{value:!0});vg.ValidContentForArguments=void 0;var Lre=ue(),aj=J(),t1=ug();vg.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:aj.SourceCodeType.LiquidHtml,severity:aj.Severity.ERROR,schema:{},targets:[]},create(e){let t={blocks:n=>{let r=n.args.filter(i=>!i.name.startsWith(t1.CLOSEST_ARGUMENT));for(let i of r)e.report({message:`{% content_for "blocks" %} only accepts 'closest.*' arguments`,startIndex:i.position.start,endIndex:i.position.end})},block:n=>{for(let i of t1.REQUIRED_CONTENT_FOR_ARGUMENTS){let s=n.args.find(o=>o.name===i);if(!s){e.report({message:`{% content_for "block" %} requires a '${i}' argument`,startIndex:n.position.start,endIndex:n.position.end,suggest:[]});continue}let a=s.value;a.type!==Lre.NodeTypes.String&&e.report({message:`The '${i}' argument should be a string`,startIndex:a.position.start,endIndex:a.position.end,suggest:[]})}let r=n.args.filter(i=>t1.RESERVED_CONTENT_FOR_ARGUMENTS.includes(i.name));for(let i of r)e.report({message:`{% content_for "block" %} doesn't support '${i.name}' because it's a reserved argument.`,startIndex:i.position.start,endIndex:i.position.end})}};return{async LiquidTag(n){if(n.name!=="content_for"||typeof n.markup=="string")return;let r=n.markup.contentForType.value,i=t[r];i&&i(n.markup)}}}}});var uj=x(kg=>{"use strict";p();Object.defineProperty(kg,"__esModule",{value:!0});kg.ValidContentForArgumentTypes=void 0;var cj=J(),bg=Kn();kg.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:cj.SourceCodeType.LiquidHtml,severity:cj.Severity.WARNING,schema:{},targets:[]},create(e){return{async ContentForMarkup(t){let n=(0,bg.getBlockName)(t);if(!n)return;let r=await(0,bg.getLiquidDocParams)(e,`blocks/${n}.liquid`);if(!r)return;let i=(0,bg.findTypeMismatchParams)(r,t.args);(0,bg.reportTypeMismatches)(e,i,r)}}}}});var dj=x(Tg=>{"use strict";p();Object.defineProperty(Tg,"__esModule",{value:!0});Tg.ValidBlockTarget=void 0;var Sg=Be(),qre=Le(),lj=J(),Nn=Ne();Tg.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:lj.SourceCodeType.LiquidHtml,severity:lj.Severity.ERROR,schema:{},targets:[]},create(e){return{async LiquidRawTag(t){if(t.name!=="schema"||t.body.kind!=="json")return;let n=t.blockStartPosition.end,r=await(0,qre.getSchema)(e),{validSchema:i,ast:s}=r??{};if(!i||i instanceof Error||!s||s instanceof Error||!r)return;let{staticBlockDefs:a}=r,{rootLevelThemeBlocks:o,rootLevelLocalBlocks:c,presetLevelBlocks:l,defaultLevelBlocks:f,hasRootBlocksDeclaration:h}=(0,Nn.getBlocks)(i);if(c.length>0){let g=new Set(c.map(({node:_})=>_.type)),v=new Set(i.blocks?.map(_=>_?.type)),b=[...(l[0]??[]).map(_=>({..._,allowed:g})),...f.map(_=>({..._,allowed:v}))];for(let{node:_,path:k,allowed:T}of b)if(!T.has(_.type)){let w=(0,Sg.nodeAtPath)(s,k);(0,Nn.reportWarning)(`Section block type "${_.type}" must be defined in "blocks" at the root of this schema.`,n,w,e)}return}let d=!1;if(await Promise.all(o.map(async({node:g,path:v})=>{let b=(0,Sg.nodeAtPath)(s,v);await(0,Nn.validateBlockFileExistence)(g.type,e)||(d=!0,(0,Nn.reportWarning)(n1(g.type),n,b,e))})),!d){for(let[g,v]of Object.entries(l))parseInt(g,10)===0&&await Promise.all(v.map(async({node:_,path:k})=>{let T=(0,Sg.nodeAtPath)(s,k),w="id"in _?_.id:k.at(-2),y=!!_.static;if((0,Nn.isInvalidPresetBlock)(w,_,o,a,h)){let P=y?`Could not find a static block of type "${_.type}" with id "${w}" in this file.`:fj(_);(0,Nn.reportWarning)(P,n,T,e)}await(0,Nn.validateBlockFileExistence)(_.type,e)?"blocks"in _&&_.blocks&&await(0,Nn.validateNestedBlocks)(e,_,_.blocks,k.slice(0,-1),n,s):(0,Nn.reportWarning)(n1(_.type),n,T,e)}));await Promise.all(f.map(async({node:g,path:v})=>{let b=(0,Sg.nodeAtPath)(s,v);(0,Nn.isInvalidDefaultBlock)(g,o,h)&&(0,Nn.reportWarning)(fj(g),n,b,e),await(0,Nn.validateBlockFileExistence)(g.type,e)||(0,Nn.reportWarning)(n1(g.type),n,b,e)}))}}}}};function fj(e){return e.type.startsWith("_")?`Theme block type "${e.type}" is a private block so it must be explicitly allowed in "blocks" at the root of this schema.`:`Theme block type "${e.type}" must be allowed in "blocks" at the root of this schema.`}function n1(e){return`Theme block 'blocks/${e}.liquid' does not exist.`}});var mj=x(wg=>{"use strict";p();Object.defineProperty(wg,"__esModule",{value:!0});wg.ValidScopedCSSClass=void 0;var hj=J(),Ire=Cp(),Rl=Fh(),r1=dl();async function pj(e,t,n){let r=new Set;try{let i=t("assets"),a=(await e.readDirectory(i)).filter(([c])=>c.endsWith(".css")).map(([c])=>c),o=await Promise.all(a.map(c=>n(c)));for(let c of o)for(let l of c)r.add(l)}catch{}return r}async function Mre(e,t,n){let r=new Set,i=await pj(e,t,n);for(let s of i)r.add(s);try{let s=t(""),a=await(0,Ire.recursiveReadDirectory)(e,s,([c])=>c.endsWith(".liquid")),o=await Promise.all(a.map(c=>n(c)));for(let c of o)for(let l of c)r.add(l)}catch{}return r}wg.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:hj.SourceCodeType.LiquidHtml,severity:hj.Severity.WARNING,schema:{},targets:[]},create(e){let t=new Set,n=[];return{async LiquidRawTag(r){if(r.name==="stylesheet")for(let i of(0,Rl.extractCSSClassNames)(r.body.value))t.add(i)},async HtmlElement(r){(0,Rl.collectUsedClasses)(r.attributes,n)},async HtmlVoidElement(r){(0,Rl.collectUsedClasses)(r.attributes,n)},async HtmlSelfClosingElement(r){(0,Rl.collectUsedClasses)(r.attributes,n)},async HtmlRawNode(r){r.name==="svg"&&(0,Rl.collectUsedClassesFromSvg)(r.attributes,r.body.value,r.body.position.start,n)},async onCodePathEnd(){if(n.length===0)return;let{getReferences:r,getDependencies:i,getCSSClassesForURI:s,fs:a,toUri:o}=e;if(!r||!i||!s)return;let c=new Set(t),l=await pj(a,o,s);for(let k of l)c.add(k);let f=await(0,r1.getAncestorUris)(e.file.uri,r),h=await Promise.all(f.map(k=>s(k)));for(let k of h)for(let T of k)c.add(T);let d=[e.file.uri,...f],g=[];for(let k of d){let T=await(0,r1.getRenderedSnippetUris)(k,i);g.push(...T)}let v=await(0,r1.getAllSnippetDescendantUris)(g,i),b=await Promise.all(v.map(k=>s(k)));for(let k of b)for(let T of k)c.add(T);let _=await Mre(a,o,s);for(let{className:k,startIndex:T,endIndex:w}of n)_.has(k)&&!c.has(k)&&e.report({message:`CSS class '${k}' may be defined outside the scope of this file.`,startIndex:T,endIndex:w})}}}}});var yj=x(xg=>{"use strict";p();Object.defineProperty(xg,"__esModule",{value:!0});xg.ValidHTMLTranslation=void 0;var gj=J(),Rre=ue();xg.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:gj.SourceCodeType.JSON,severity:gj.Severity.WARNING,schema:{},targets:[]},create(e){return e.toRelativePath(e.file.uri).startsWith("locales/")?{async Literal(n){let r=/<[^>]+>/;if(!(typeof n.value!="string"||!r.test(n.value)))try{(0,Rre.toLiquidHtmlAST)(n.value)}catch(i){let s=n.loc,a={message:`${i}.`,startIndex:s.start.offset,endIndex:s.end.offset};e.report(a)}}}:{}}}});var vj=x(Eg=>{"use strict";p();Object.defineProperty(Eg,"__esModule",{value:!0});Eg.ValidJSON=void 0;var _j=J();Eg.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:_j.SourceCodeType.JSON,severity:_j.Severity.ERROR,schema:{},targets:[]},create(e){if(!e.validateJSON)return{};let t=e.validateJSON;return{async onCodePathStart(n){let r=await t(n.uri,n.source);if(r)for(let i of r)e.report(i)}}}}});var Sj=x(Ag=>{"use strict";p();Object.defineProperty(Ag,"__esModule",{value:!0});Ag.ValidDocParamTypes=void 0;var bj=J(),i1=Qi();Ag.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:bj.SourceCodeType.LiquidHtml,severity:bj.Severity.ERROR,schema:{},targets:[]},create(e){let t=e.themeDocset?.liquidDrops().then(r=>new Set((0,i1.getValidParamTypes)(r).keys()));async function n(r){return Dre(r)?(0,i1.parseStringLiterals)(r)!==void 0:t?(0,i1.parseParamType)(await t,r)!==void 0:!0}return{async LiquidDocParamNode(r){let{paramType:i}=r;!i||await n(i.value)||e.report({message:`The parameter type '${i.value}' is not supported.`,startIndex:i.position.start-1,endIndex:i.position.end+1,suggest:[{message:"Remove invalid parameter type",fix:s=>{let[a,o]=jre(r.source,i);s.replace(a,o," ")}}]})}}}};function Dre(e){return/['"|]/.test(e)}function jre(e,t){let n=t.position.start-1,r=t.position.end+1;for(;kj(e.charAt(n-1));)n--;for(;kj(e.charAt(r));)r++;return[n,r]}function kj(e){return e===" "||e===" "}});var wj=x(Og=>{"use strict";p();Object.defineProperty(Og,"__esModule",{value:!0});Og.getBlocks=Bre;Og.reportWarning=Fre;var Tj=Be();function Bre(e){let t=[],n=[],r=[],i=e.blocks,s=e.presets;function a(o,c,l=!1){if(!o)return;let f="static"in o,h="name"in o;f?t.push({node:o,path:c.concat("type")}):h&&!l?n.push({node:o,path:c.concat("type")}):o.type!=="@app"&&r.push({node:o,path:c.concat("type")}),"blocks"in o&&(Array.isArray(o.blocks)?o.blocks.forEach((d,g)=>{a(d,c.concat("blocks",String(g)),l)}):typeof o.blocks=="object"&&o.blocks!==null&&Object.entries(o.blocks).forEach(([d,g])=>{a(g,c.concat("blocks",d),l)}))}return Array.isArray(i)&&i.forEach((o,c)=>{a(o,["blocks",String(c)])}),s&&s.forEach((o,c)=>{"blocks"in o&&o.blocks&&(Array.isArray(o.blocks)?o.blocks.forEach((l,f)=>{a(l,["presets",String(c),"blocks",String(f)],!0)}):typeof o.blocks=="object"&&Object.entries(o.blocks).forEach(([l,f])=>{a(f,["presets",String(c),"blocks",l],!0)}))}),{staticBlockLocations:t,localBlockLocations:n,themeBlockLocations:r,hasRootLevelThemeBlocks:r.some(o=>o.path[0]==="blocks")}}function Fre(e,t,n,r){r.report({message:e,startIndex:t+(0,Tj.getLocStart)(n),endIndex:t+(0,Tj.getLocEnd)(n)})}});var Aj=x(Ng=>{"use strict";p();Object.defineProperty(Ng,"__esModule",{value:!0});Ng.ValidLocalBlocks=void 0;var xj=J(),s1=Be(),Vre=Le(),Ej=Le(),Pg=wj();Ng.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:xj.SourceCodeType.LiquidHtml,severity:xj.Severity.ERROR,schema:{},targets:[]},create(e){return{async LiquidRawTag(t){if(t.name!=="schema"||t.body.kind!=="json")return;let n=t.blockStartPosition.end,r=await(0,Vre.getSchema)(e),{validSchema:i,ast:s}=r??{};if(!i||i instanceof Error||!s||s instanceof Error||!r)return;let{staticBlockLocations:a,localBlockLocations:o,themeBlockLocations:c,hasRootLevelThemeBlocks:l}=(0,Pg.getBlocks)(i);(0,Ej.isSection)(e.file.uri)&&(a.length>0&&o.length>0&&a.forEach(f=>{let h=(0,s1.nodeAtPath)(s,f.path);(0,Pg.reportWarning)("Sections cannot use static theme blocks together with locally scoped blocks.",n,h,e)}),l&&o.length>0&&c.length>0&&o.forEach(f=>{let h=(0,s1.nodeAtPath)(s,f.path);(0,Pg.reportWarning)("Sections cannot use theme blocks together with locally scoped blocks.",n,h,e)})),(0,Ej.isBlock)(e.file.uri)&&o.length>0&&o.forEach(f=>{let h=(0,s1.nodeAtPath)(s,f.path);(0,Pg.reportWarning)("Local scoped blocks are not supported in theme blocks.",n,h,e)})}}}}});var Pj=x(Lg=>{"use strict";p();Object.defineProperty(Lg,"__esModule",{value:!0});Lg.ValidRenderSnippetArgumentTypes=void 0;var Oj=J(),Cg=Qi(),Dl=Kn();Lg.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:Oj.SourceCodeType.LiquidHtml,severity:Oj.Severity.WARNING,schema:{},targets:[]},create(e){let t;async function n(i,s){if(!i.alias||!i.variable?.name)return;let a=s.get(i.alias.value)?.type;if(!a)return;let o=i.variable.name;await r(a,(0,Cg.checkArgumentType)(a,o))&&e.report({message:(0,Cg.getArgumentTypeMismatchMessage)(i.alias.value,a,o),startIndex:o.position.start,endIndex:o.position.end,suggest:(0,Dl.generateTypeMismatchSuggestions)(a,o.position.start,o.position.end)})}async function r(i,s){switch(s.kind){case"incompatible":return!0;case"named-type":return e.themeDocset?(t??=e.themeDocset.liquidDrops().then(a=>new Set((0,Cg.getValidParamTypes)(a).keys())),(0,Cg.parseParamType)(await t,i)!==void 0):!0;case"compatible":case"unchecked":return!1}}return{async RenderMarkup(i){let s=(0,Dl.getSnippetName)(i);if(!s)return;let a=await(0,Dl.getLiquidDocParams)(e,`snippets/${s}.liquid`);if(!a)return;await n(i,a);let o=(0,Dl.findTypeMismatchParams)(a,i.args);(0,Dl.reportTypeMismatches)(e,o,a)}}}}});var a1=x(is=>{"use strict";p();Object.defineProperty(is,"__esModule",{value:!0});is.EPSILON=void 0;is.isFiniteNumber=qg;is.toRangeSetting=Ure;is.settingDefinitions=Hre;is.literalValues=zre;var $re=J();is.EPSILON=1e-9;function qg(e){return typeof e=="number"&&Number.isFinite(e)}function Ure(e){if(!e||typeof e!="object")return;let{type:t,id:n,min:r,max:i,step:s=1}=e;if(!(t!=="range"||typeof n!="string")&&!(!qg(r)||!qg(i)||!qg(s))&&!(s<=0||i<=r))return{id:n,min:r,max:i,step:s,default:e.default}}function Hre(e){let t=[];return Array.isArray(e.settings)&&t.push({path:["settings"],settings:e.settings}),Array.isArray(e.blocks)&&e.blocks.forEach((n,r)=>{let i=n&&typeof n=="object"?n.settings:void 0;Array.isArray(i)&&t.push({path:["blocks",r,"settings"],settings:i})}),t}function zre(e){let t={};for(let n of e.children)t[n.key.value]=(0,$re.isLiteralNode)(n.value)?n.value.value:null;return t}});var Lj=x(kc=>{"use strict";p();Object.defineProperty(kc,"__esModule",{value:!0});kc.ValidRangeDefaultSettingsSchema=kc.ValidRangeDefault=void 0;var qa=J(),bc=Be(),Nj=Le(),ki=a1(),Cj={code:"ValidRangeDefault",name:"Validate default values and preset values for range settings",docs:{description:"Reports a range setting's default value, or a preset's value for it, that is outside [min, max] or not aligned to the step grid.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-range-default"},severity:qa.Severity.ERROR,schema:{},targets:[]};kc.ValidRangeDefault={meta:{...Cj,type:qa.SourceCodeType.LiquidHtml},create(e){return{async LiquidRawTag(t){if(t.name!=="schema"||t.body.kind!=="json")return;let n=await(0,Nj.getSchema)(e),{validSchema:r,ast:i}=n??{};if(!r||r instanceof Error||!i||i instanceof Error)return;let s=t.blockStartPosition.end,a=(l,f)=>{l&&e.report({message:f,startIndex:s+(0,bc.getLocStart)(l),endIndex:s+(0,bc.getLocEnd)(l)})};for(let{path:l,settings:f}of(0,ki.settingDefinitions)(r))f.forEach((h,d)=>{let g=(0,ki.toRangeSetting)(h);if(!g||!(0,ki.isFiniteNumber)(g.default))return;let v=o1(g,g.default);v&&a((0,bc.nodeAtPath)(i,[...l,d,"default"]),`Default value ${g.default} for range setting "${g.id}" ${v}.`)});let o=new Map;for(let l of Array.isArray(r.settings)?r.settings:[]){let f=(0,ki.toRangeSetting)(l);f&&o.set(f.id,f)}if(o.size===0)return;let c=[];Array.isArray(r.presets)&&r.presets.forEach((l,f)=>c.push(["presets",f,"settings"])),(0,Nj.isSectionSchema)(n)&&c.push(["default","settings"]);for(let l of c){let f=(0,bc.nodeAtPath)(i,l);if(!(!f||!(0,qa.isObjectNode)(f)))for(let h of f.children){let d=o.get(h.key.value);if(!d)continue;let g=h.value;if(!(0,qa.isLiteralNode)(g)||!(0,ki.isFiniteNumber)(g.value))continue;let v=o1(d,g.value);v&&a(g,`Value ${g.value} for range setting "${d.id}" ${v}.`)}}}}}};kc.ValidRangeDefaultSettingsSchema={meta:{...Cj,type:qa.SourceCodeType.JSON},create(e){return e.toRelativePath(e.file.uri)!=="config/settings_schema.json"?{}:{async Property(n){if(!(n.key.value!=="settings"||!(0,qa.isArrayNode)(n.value)))for(let r of n.value.children){if(!(0,qa.isObjectNode)(r))continue;let i=(0,ki.toRangeSetting)((0,ki.literalValues)(r));if(!i||!(0,ki.isFiniteNumber)(i.default))continue;let s=o1(i,i.default);if(!s)continue;let a=r.children.find(o=>o.key.value==="default").value;e.report({message:`Default value ${i.default} for range setting "${i.id}" ${s}.`,startIndex:(0,bc.getLocStart)(a),endIndex:(0,bc.getLocEnd)(a)})}}}}};function o1({min:e,max:t,step:n},r){if(r<e||r>t)return`is outside the range [${e}, ${t}]`;let i=(r-e)/n;if(Math.abs(i-Math.round(i))>=ki.EPSILON)return`is not aligned to step ${n} in range [${e}, ${t}]`}});var jj=x(Tc=>{"use strict";p();Object.defineProperty(Tc,"__esModule",{value:!0});Tc.ValidRangeStepCountSettingsSchema=Tc.ValidRangeStepCount=void 0;var jl=J(),Sc=Be(),Wre=Le(),Bl=a1(),qj=101,Ij={code:"ValidRangeStepCount",name:"Validate that range settings have at most 101 steps",docs:{description:'Reports a range setting with more than 101 discrete steps, which the storefront rejects with "Range settings must have at most 101 steps".',recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-range-step-count"},severity:jl.Severity.ERROR,schema:{},targets:[]};Tc.ValidRangeStepCount={meta:{...Ij,type:jl.SourceCodeType.LiquidHtml},create(e){return{async LiquidRawTag(t){if(t.name!=="schema"||t.body.kind!=="json")return;let n=await(0,Wre.getSchema)(e),{validSchema:r,ast:i}=n??{};if(!r||r instanceof Error||!i||i instanceof Error)return;let s=t.blockStartPosition.end;for(let{path:a,settings:o}of(0,Bl.settingDefinitions)(r))o.forEach((c,l)=>{let f=(0,Bl.toRangeSetting)(c);if(!f||!Rj(f))return;let h=(0,Sc.nodeAtPath)(i,[...a,l,"step"])??(0,Sc.nodeAtPath)(i,[...a,l,"max"]);h&&e.report({message:Dj(f),startIndex:s+(0,Sc.getLocStart)(h),endIndex:s+(0,Sc.getLocEnd)(h)})})}}}};Tc.ValidRangeStepCountSettingsSchema={meta:{...Ij,type:jl.SourceCodeType.JSON},create(e){return e.toRelativePath(e.file.uri)!=="config/settings_schema.json"?{}:{async Property(n){if(!(n.key.value!=="settings"||!(0,jl.isArrayNode)(n.value)))for(let r of n.value.children){if(!(0,jl.isObjectNode)(r))continue;let i=(0,Bl.toRangeSetting)((0,Bl.literalValues)(r));if(!i||!Rj(i))continue;let s=o=>r.children.find(c=>c.key.value===o)?.value,a=s("step")??s("max");e.report({message:Dj(i),startIndex:(0,Sc.getLocStart)(a),endIndex:(0,Sc.getLocEnd)(a)})}}}}};function Mj({min:e,max:t,step:n}){return(t-e)/n+1}function Rj(e){return Mj(e)>qj+Bl.EPSILON}function Dj(e){let{id:t,min:n,max:r,step:i}=e,s=Math.round(Mj(e));return`Range setting "${t}" has ${s} steps (min ${n}, max ${r}, step ${i}). Shopify allows at most ${qj} steps.`}});var Fj=x(Ig=>{"use strict";p();Object.defineProperty(Ig,"__esModule",{value:!0});Ig.ValidSchema=void 0;var Bj=J();Ig.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:Bj.SourceCodeType.LiquidHtml,severity:Bj.Severity.ERROR,schema:{},targets:[]},create(e){return{async LiquidRawTag(t){if(t.name!=="schema"||t.body.kind!=="json"||!e.validateJSON)return;let n=t.source.slice(t.blockStartPosition.end,t.blockEndPosition.start),r=await e.validateJSON(e.file.uri,n);if(r)for(let i of r)e.report({message:i.message,startIndex:t.blockStartPosition.end+i.startIndex,endIndex:t.blockStartPosition.end+i.endIndex})}}}}});var Uj=x(Mg=>{"use strict";p();Object.defineProperty(Mg,"__esModule",{value:!0});Mg.ValidSchemaName=void 0;var c1=Be(),Gre=Le(),Vj=J(),Jre=Ne(),$j=25;Mg.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:Vj.SourceCodeType.LiquidHtml,severity:Vj.Severity.ERROR,schema:{},targets:[]},create(e){return{async LiquidRawTag(t){if(t.name!=="schema"||t.body.kind!=="json")return;let n=t.blockStartPosition.end,r=await(0,Gre.getSchema)(e),{validSchema:i,ast:s}=r??{};if(!i||i instanceof Error||!s||s instanceof Error)return;let a=i.name;if(!a)return;let o=(0,c1.nodeAtPath)(s,["name"]),c=n+(0,c1.getLocStart)(o),l=n+(0,c1.getLocEnd)(o);if(a.startsWith("t:")){let f=await e.getDefaultLocale(),h=a.replace("t:",""),d=await e.getDefaultSchemaTranslations(),g=(0,Jre.deepGet)(d,h.split("."));g!==void 0&&g.length>$j&&e.report({message:`Schema name '${g}' from 'locales/${f}.default.schema.json' is too long (max 25 characters)`,startIndex:c,endIndex:l})}else a.length>$j&&e.report({message:`Schema name '${a}' is too long (max 25 characters)`,startIndex:c,endIndex:l})}}}}});var Wj=x(Rg=>{"use strict";p();Object.defineProperty(Rg,"__esModule",{value:!0});Rg.ValidSchemaTranslations=void 0;var Hj=Be(),Kre=Le(),zj=J(),Yre=Ne();Rg.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:zj.SourceCodeType.LiquidHtml,severity:zj.Severity.ERROR,schema:{},targets:[]},create(e){return{async LiquidRawTag(t){if(t.name!=="schema"||t.body.kind!=="json")return;let n=t.blockStartPosition.end,r=await(0,Kre.getSchema)(e),{ast:i}=r??{};if(!i||i instanceof Error)return;let s=await e.getDefaultLocale(),a=await e.getDefaultSchemaTranslations(),o=u1(i);for(let{value:c,node:l}of o){let f=c.replace("t:","");if((0,Yre.deepGet)(a,f.split("."))===void 0){let d=n+(0,Hj.getLocStart)(l),g=n+(0,Hj.getLocEnd)(l);e.report({message:`'${c}' does not have a matching entry in 'locales/${s}.default.schema.json'`,startIndex:d,endIndex:g})}}}}}};function u1(e){let t=[];switch(e.type){case"Literal":{typeof e.value=="string"&&e.value.startsWith("t:")&&t.push({value:e.value,node:e});break}case"Object":{for(let n of e.children)t.push(...u1(n.value));break}case"Array":{for(let n of e.children)t.push(...u1(n));break}case"Property":case"Identifier":break}return t}});var Qj=x(wc=>{"use strict";p();Object.defineProperty(wc,"__esModule",{value:!0});wc.ValidSelectDefaultSettingsSchema=wc.ValidSelectDefault=void 0;var Cn=J(),pr=Be(),Gj=Le(),Qre=Ne(),Jj={code:"ValidSelectDefault",name:"Validate default values and preset values for select/radio settings",docs:{description:"Warns when a select/radio setting's default value (or a preset's setting value) is not one of the setting's declared options.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-select-default"},severity:Cn.Severity.WARNING,schema:{},targets:[]};wc.ValidSelectDefault={meta:{...Jj,type:Cn.SourceCodeType.LiquidHtml},create(e){return{async LiquidRawTag(t){if(t.name!=="schema"||t.body.kind!=="json")return;let n=await(0,Gj.getSchema)(e),{validSchema:r,ast:i}=n??{};if(!r||r instanceof Error||!i||i instanceof Error)return;let s=t.blockStartPosition.end,a=(h,d)=>e.report({message:h,startIndex:s+(0,pr.getLocStart)(d),endIndex:s+(0,pr.getLocEnd)(d)}),o=(0,pr.nodeAtPath)(i,["settings"]),{rootLevelLocalBlocks:c,presetLevelBlocks:l}=(0,Qre.getBlocks)(r);f1(o,a);for(let{path:h}of c)f1((0,pr.nodeAtPath)(i,d1(h)),a);for(let h=0;h<(r.presets?.length??0);h++)l1((0,pr.nodeAtPath)(i,["presets",h,"settings"]),o,a);let f=async(h,d)=>{let g=await Xre(e,i,c,d);l1((0,pr.nodeAtPath)(i,d1(h)),g,a)};for(let h of Object.values(l))await Promise.all(h.map(({node:d,path:g})=>f(g,d.type)));(0,Gj.isSectionSchema)(n)&&"default"in r&&r.default&&(l1((0,pr.nodeAtPath)(i,["default","settings"]),o,a),await Promise.all((r.default.blocks??[]).map((h,d)=>f(["default","blocks",String(d),"type"],h.type))))}}}};wc.ValidSelectDefaultSettingsSchema={meta:{...Jj,type:Cn.SourceCodeType.JSON},create(e){if(e.toRelativePath(e.file.uri)!=="config/settings_schema.json")return{};let n=(r,i)=>e.report({message:r,startIndex:(0,pr.getLocStart)(i),endIndex:(0,pr.getLocEnd)(i)});return{async Property(r){r.key.value==="settings"&&f1(r.value,n)}}}};function f1(e,t){if((0,Cn.isArrayNode)(e))for(let n of e.children){if(!(0,Cn.isObjectNode)(n))continue;let r=Dg(n,"id"),i=Kj(n),s=n.children.find(o=>o.key.value==="default")?.value;if(typeof r!="string"||!i||!(0,Cn.isLiteralNode)(s))continue;let a=s.value;h1(a)&&!i.includes(String(a))&&t(`Default value ${JSON.stringify(a)} for setting "${r}" is not one of the valid options: ${Yj(i)}.`,s)}}function l1(e,t,n){if(!(!(0,Cn.isObjectNode)(e)||!(0,Cn.isArrayNode)(t)))for(let r of e.children){let i=r.key.value,s=t.children.find(l=>(0,Cn.isObjectNode)(l)&&Dg(l,"id")===i),a=s&&Kj(s),o=r.value;if(!a||!(0,Cn.isLiteralNode)(o))continue;let c=o.value;h1(c)&&!a.includes(String(c))&&n(`Value ${JSON.stringify(c)} for setting "${i}" is not one of the valid options: ${Yj(a)}.`,o)}}async function Xre(e,t,n,r){if(n.length>0){let o=n.find(c=>c.node.type===r);return o&&(0,pr.nodeAtPath)(t,d1(o.path))}if(typeof r!="string")return;let i=await e.getBlockSchema?.(r),{validSchema:s,ast:a}=i??{};if(!(!s||s instanceof Error)&&!(!a||a instanceof Error))return(0,pr.nodeAtPath)(a,["settings"])}function Kj(e){let t=Dg(e,"type");if(t!=="select"&&t!=="radio")return;let n=e.children.find(r=>r.key.value==="options")?.value;if((0,Cn.isArrayNode)(n))return n.children.flatMap(r=>{let i=(0,Cn.isObjectNode)(r)?Dg(r,"value"):void 0;return h1(i)?[String(i)]:[]})}function Dg(e,t){let n=e.children.find(r=>r.key.value===t)?.value;return(0,Cn.isLiteralNode)(n)?n.value:void 0}function h1(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function Yj(e){return e.map(t=>`"${t}"`).join(", ")}function d1(e){return e.slice(0,-1).concat("settings")}});var tB=x(Ec=>{"use strict";p();Object.defineProperty(Ec,"__esModule",{value:!0});Ec.ValidSettingsKeyJSON=Ec.ValidSettingsKey=void 0;var g1=J(),Ia=Be(),p1=Le(),Zj=Ne(),eB={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"},severity:g1.Severity.ERROR,schema:{},targets:[]};Ec.ValidSettingsKey={meta:{...eB,type:g1.SourceCodeType.LiquidHtml},create(e){return{async LiquidRawTag(t){if(t.name!=="schema"||t.body.kind!=="json")return;let n=t.blockStartPosition.end,r=await(0,p1.getSchema)(e),{validSchema:i,ast:s}=r??{};if(!i||i instanceof Error||!s||s instanceof Error)return;let{rootLevelLocalBlocks:a,presetLevelBlocks:o}=(0,Zj.getBlocks)(i);if(i.presets)for(let c=0;c<i.presets.length;c++){let l=(0,Ia.nodeAtPath)(s,["presets",c,"settings"]);Ma(e,n,l,i.settings)}if((0,p1.isSectionSchema)(r)&&"default"in i&&i.default){let c=(0,Ia.nodeAtPath)(s,["default","settings"]);Ma(e,n,c,i.settings),await Promise.all((i.default.blocks??[]).map((l,f)=>{let h=(0,Ia.nodeAtPath)(s,["default","blocks",f,"settings"]);return Xj(e,n,h,a,l)}))}for(let[c,l]of Object.entries(o))await Promise.all(l.map(({node:f,path:h})=>{let d=(0,Ia.nodeAtPath)(s,h.slice(0,-1).concat("settings"));return Xj(e,n,d,a,f)}))}}}};Ec.ValidSettingsKeyJSON={meta:{...eB,type:g1.SourceCodeType.JSON},create(e){return e.toRelativePath(e.file.uri).startsWith("templates/")?{async onCodePathEnd(){let n=await(0,p1.getSchemaFromJSON)(e),{ast:r}=n??{};if(!n||!r||r instanceof Error||!xc(n.parsed))return;let i=n.parsed.sections;i&&await Promise.all(Object.entries(i).map(async([s,a])=>{if(!xc(a)||!("type"in a))return;let o=await e.getSectionSchema?.(a.type),{validSchema:c}=o??{};if(!(!c||c instanceof Error)){if("settings"in a){let l=(0,Ia.nodeAtPath)(r,["sections",s,"settings"]);Ma(e,0,l,c.settings,void 0,`'sections/${a.type}.liquid'`)}"blocks"in a&&xc(a.blocks)&&await m1(e,r,a.blocks,c,["sections",s,"blocks"],`'sections/${a.type}.liquid'`)}}))}}:{}}};async function Xj(e,t,n,r,i){if(r.length>0){let s=r.find(o=>o.node.type===i.type);if(!s)return;let a=s.node;Ma(e,t,n,a.settings)}else{let s=await e.getBlockSchema?.(i.type),{validSchema:a}=s??{};if(!a||a instanceof Error)return;Ma(e,t,n,a.settings,i)}}async function m1(e,t,n,r,i,s){await Promise.all(Object.entries(n).map(async([a,o])=>{if(!xc(o)||!("type"in o))return;let c=i.concat(a),l=r.blocks?.find(g=>g.type===o.type&&"name"in g);if(l){let g=(0,Ia.nodeAtPath)(t,c.concat("settings"));Ma(e,0,g,l.settings,void 0,s),"blocks"in o&&xc(o.blocks)&&await m1(e,t,o.blocks,l,c.concat("blocks"),s);return}let f=await e.getBlockSchema?.(o.type),{validSchema:h}=f??{};if(!h||h instanceof Error)return;let d=(0,Ia.nodeAtPath)(t,c.concat("settings"));Ma(e,0,d,h.settings,o),"blocks"in o&&xc(o.blocks)&&await m1(e,t,o.blocks,h,c.concat("blocks"),`'blocks/${o.type}.liquid'`)}))}function Ma(e,t,n,r,i,s="schema"){if(!(!n||n.type!=="Object")){for(let a of n.children)if(!r?.find(c=>c?.id===a.key.value)){let c=i?`Setting '${a.key.value}' does not exist in 'blocks/${i.type}.liquid'.`:`Setting '${a.key.value}' does not exist in ${s}.`;(0,Zj.reportWarning)(c,t,a.key,e)}}}function xc(e){return typeof e=="object"&&e!==null}});var oB=x(jg=>{"use strict";p();Object.defineProperty(jg,"__esModule",{value:!0});jg.ValidStandardEventData=void 0;var Ra=ue(),nB=J(),Zre="standard_event_data",rB="context",iB="view",y1={product:["page","search","collection","dialog","recommendation"],cart:["page","dialog"]},eie=["collection"],tie=[...new Set(Object.values(y1).flat())];function sB(e,t){return e.type===Ra.NodeTypes.VariableLookup?!1:e.type!==Ra.NodeTypes.String||!t.includes(e.value)}function aB(e){return e.type===Ra.NodeTypes.String?` '${e.value}'`:""}function nie(e,t){if(t?.type!==Ra.NodeTypes.LiquidVariable||t.filters[0]!==e)return;let n=t.expression;if(n.type===Ra.NodeTypes.VariableLookup&&!(n.lookups.length>0))return n.name??void 0}jg.ValidStandardEventData={meta:{code:"ValidStandardEventData",name:"Prevent the use of invalid arguments to the standard_event_data filter",docs:{description:"This check is aimed at preventing the use of invalid arguments for the standard_event_data filter.",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-standard-event-data",recommended:!0},type:nB.SourceCodeType.LiquidHtml,severity:nB.Severity.ERROR,schema:{},targets:[]},create(e){return{async LiquidFilter(t,n){if(t.name!==Zre)return;let r=t.args.find(c=>c.type!==Ra.NodeTypes.NamedArgument);r&&sB(r,[iB])&&e.report({message:`Unsupported event type${aB(r)}. The only supported event type is '${iB}'.`,startIndex:r.position.start,endIndex:r.position.end});let i=nie(t,n[n.length-1]);if(i&&eie.includes(i))return;let a=t.args.find(c=>c.type===Ra.NodeTypes.NamedArgument&&c.name===rB)?.value;if(!a)return;let o=i&&y1[i]||tie;if(sB(a,o)){let c=i&&y1[i]?` for ${i}`:"";e.report({message:`Unsupported context${aB(a)}${c}. Valid values: ${o.join(", ")}. The '${rB}' argument can also be omitted.`,startIndex:a.position.start,endIndex:a.position.end})}}}}}});var uB=x(Bg=>{"use strict";p();Object.defineProperty(Bg,"__esModule",{value:!0});Bg.ValidStaticBlockType=void 0;var rie=ue(),cB=J(),iie=bn(),sie=Ym();Bg.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:cB.SourceCodeType.LiquidHtml,severity:cB.Severity.ERROR,schema:{},targets:[]},create(e){return{async LiquidTag(t){if(t.name!=="content_for"||!(0,sie.isContentForBlock)(t.markup))return;let n=t.markup.args.find(o=>o.name==="type");if(!n)return;let r=n.value;if(r.type!==rie.NodeTypes.String)return;let i=r.value,s=`blocks/${i}.liquid`;await(0,iie.doesFileExist)(e,s)||e.report({message:`'blocks/${i}.liquid' does not exist`,startIndex:r.position.start,endIndex:r.position.end,suggest:[]})}}}}});var fB=x(Oc=>{"use strict";p();Object.defineProperty(Oc,"__esModule",{value:!0});Oc.ValidVisibleIfSettingsSchema=Oc.ValidVisibleIf=void 0;var aie=ue(),v1=J(),_1=Be(),Ac=Le(),oie=Ne(),Ur=QS(),lB={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:v1.Severity.ERROR,schema:{},targets:[]};Oc.ValidVisibleIf={meta:{...lB,type:v1.SourceCodeType.LiquidHtml},create(e){let t={},n;return{async LiquidTag(r){cie(r)&&(t[r.markup.name]=!0)},async LiquidRawTag(r){r.name!=="schema"||r.body.kind!=="json"||(n=r)},async onCodePathEnd(){if(!n)return;let r=await(0,Ac.getSchema)(e),{validSchema:i,ast:s}=r??{};if(!i||i instanceof Error||!i.settings?.some(f=>"visible_if"in f)||!s||s instanceof Error)return;let a=n.blockStartPosition.end,o=Object.fromEntries((await(0,Ur.getGlobalSettings)(e)).map(f=>[f,!0])),c=Object.fromEntries(i.settings.map(f=>[f.id,!0])),l={...t,settings:o};(0,Ac.isSectionSchema)(r)?l.section={settings:c}:(0,Ac.isBlockSchema)(r)&&(l.block={settings:c});for(let[f,h]of i.settings.entries()){if(!("visible_if"in h)||typeof h.visible_if!="string")continue;let d=(0,_1.nodeAtPath)(s,["settings",f,"visible_if"]),g=(0,Ur.getVariableLookupsInExpression)(h.visible_if);if(g===null)continue;if("warning"in g){(0,oie.reportWarning)(g.warning,a,d,e);continue}let v=(b,_)=>{typeof b=="string"&&e.report({message:b,startIndex:a+(0,_1.getLocStart)(d)+_.position.start+Ur.offsetAdjust+1,endIndex:a+(0,_1.getLocStart)(d)+_.position.end+Ur.offsetAdjust+1})};for(let b of g)b.name==="section"&&(0,Ac.isBlockSchema)(r)||(b.name==="section"&&!(0,Ac.isSectionSchema)(r)?v(`Invalid visible_if: can't refer to "section" when not in a section or block file.`,b):b.name==="block"&&!(0,Ac.isBlockSchema)(r)?v(`Invalid visible_if: can't refer to "block" when not in a block file.`,b):v((0,Ur.validateLookup)(b,l),b))}}}}};function cie(e){return e.type===aie.NodeTypes.LiquidTag&&e.name==="assign"&&typeof e.markup!="string"}Oc.ValidVisibleIfSettingsSchema={meta:{...lB,type:v1.SourceCodeType.JSON},create(e){return e.toRelativePath(e.file.uri)!=="config/settings_schema.json"?{}:{async Property(n){if(n.key.value!=="visible_if"||n.value.type!=="Literal")return;let r=n.value.value;if(typeof r!="string")return;let i=n.value.loc.start.offset,s=(0,Ur.getVariableLookupsInExpression)(r);if(s===null)return;if("warning"in s){e.report({message:s.warning,startIndex:n.value.loc.start.offset,endIndex:n.value.loc.end.offset});return}let o={settings:Object.fromEntries((await(0,Ur.getGlobalSettings)(e)).map(l=>[l,!0]))},c=(l,f)=>{typeof l=="string"&&e.report({message:l,startIndex:i+f.position.start+Ur.offsetAdjust+1,endIndex:i+f.position.end+Ur.offsetAdjust+1})};for(let l of s)l.name==="section"?c(`Invalid visible_if: can't refer to "section" when not in a section file.`,l):l.name==="block"?c(`Invalid visible_if: can't refer to "block" when not in a block file.`,l):c((0,Ur.validateLookup)(l,o),l)}}}}});var hB=x(Vg=>{"use strict";p();Object.defineProperty(Vg,"__esModule",{value:!0});Vg.VariableName=void 0;var uie=ue(),b1=J(),Fg=YE(),lie=e=>{let t=(0,Fg.camelCase)(e);return t.charAt(0).toUpperCase()+t.slice(1)},fie=e=>e.name==="assign"&&typeof e.markup!="string",die=e=>e.type==uie.NodeTypes.LiquidTag&&e.name==="capture"&&typeof e.markup!="string",hie={camelCase:Fg.camelCase,PascalCase:lie,snake_case:Fg.snakeCase,"kebab-case":Fg.kebabCase},pie={format:b1.SchemaProp.string("snake_case")},dB=e=>e.replace(/[-_]?\d[-_]?/g,"");Vg.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:b1.SourceCodeType.LiquidHtml,severity:b1.Severity.WARNING,schema:pie,targets:[]},create(e){let t=r=>{if(!r.markup.name)return{valid:!1};let i=hie[e.settings.format],s=r.markup.name.startsWith("_")?"_":"",a=r.markup.name.slice(s.length),o=s+i(a);return{valid:a.length>0&&dB(r.markup.name)===dB(o),suggestion:o}},n=r=>e.report({message:`The variable '${r.markup.name}' uses wrong naming format`,startIndex:r.markup.position.start,endIndex:r.markup.position.end,suggest:[{message:`Change variable '${r.markup.name}' to '${t(r).suggestion}'`,fix:i=>{let{position:s,name:a,source:o}=r.markup;return i.replace(s.start,s.end,o.slice(s.start,s.end).replace(a,t(r).suggestion))}}]});return{async LiquidTag(r){(fie(r)||die(r)&&r.markup.name)&&(t(r).valid||n(r))}}}}});var pB=x($g=>{"use strict";p();Object.defineProperty($g,"__esModule",{value:!0});$g.AppBlockMissingSchema=void 0;var k1=J();$g.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:k1.Severity.ERROR,type:k1.SourceCodeType.LiquidHtml,schema:{},targets:[k1.ConfigTarget.ThemeAppExtension]},create(e){let t=!1;return e.toRelativePath(e.file.uri).startsWith("blocks/")?{async LiquidRawTag(r){r.name=="schema"&&(t=!0)},async onCodePathEnd(){t||e.report({message:"The schema does not exist",startIndex:0,endIndex:0})}}:{}}}});var mB=x(Ug=>{"use strict";p();Object.defineProperty(Ug,"__esModule",{value:!0});Ug.UniqueSettingIds=void 0;var ss=J();Ug.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,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/unique-setting-id"},type:ss.SourceCodeType.JSON,severity:ss.Severity.ERROR,schema:{},targets:[]},create(e){return{async onCodePathEnd(t){if((0,ss.isArrayNode)(t.ast)){let n=[];for(let s of t.ast.children)if((0,ss.isObjectNode)(s)&&s.children){let a=s.children.find(o=>o.key.value==="settings");if(a&&a.value&&(0,ss.isArrayNode)(a.value)){for(let o of a.value.children)if((0,ss.isObjectNode)(o)&&o.children){let c=o.children.find(l=>l.key.value==="id");(0,ss.isPropertyNode)(c)&&n.push(c)}}}let r=new Map;for(let s of n)if((0,ss.isLiteralNode)(s.value)){let a=s.value.value;typeof a=="string"&&(r.has(a)||r.set(a,[]),r.get(a).push(s))}let i=Array.from(r.entries()).filter(([s,a])=>a.length>1);if(i.length>0)for(let[s,a]of i){let o=a[a.length-1];e.report({message:`Duplicate setting id found: "${s}"`,startIndex:o.loc.start.offset,endIndex:o.loc.end.offset})}}}}}}});var yB=x(ln=>{"use strict";p();Object.defineProperty(ln,"__esModule",{value:!0});ln.StylesheetOncePerFile=ln.StylesheetTagInWrongFile=ln.JavascriptOncePerFile=ln.JavascriptTagInWrongFile=ln.SchemaOncePerFile=ln.SchemaSectionOrBlockOnly=void 0;var S1=Le(),Hg=J();function gB(e){return e[0].toUpperCase()+e.slice(1)}function mie({tagName:e,code:t,message:n,url:r}){return{meta:{code:t,name:t,docs:{description:n,recommended:!0,url:r},type:Hg.SourceCodeType.LiquidHtml,severity:Hg.Severity.ERROR,schema:{},targets:[]},create(i){return{async LiquidRawTag(s){s.name===e&&i.report({message:n,startIndex:s.blockStartPosition.start,endIndex:s.blockStartPosition.end})}}}}}function gie(e,{allowSnippets:t,url:n}){let r=t?"section, block, or snippet":"section or block",i=`${gB(e)}${t?"TagInWrongFile":"SectionOrBlockOnly"}`;return mie({tagName:e,code:i,message:`{% ${e} %} is only valid in ${r} files.`,url:n})}function T1(e,{url:t}){let n=`${gB(e)}OncePerFile`,r=`{% ${e} %} can only appear once per file.`;return{meta:{code:n,name:n,docs:{description:r,recommended:!0,url:t},type:Hg.SourceCodeType.LiquidHtml,severity:Hg.Severity.ERROR,schema:{},targets:[]},create(i){let s=0;return{async LiquidRawTag(a){a.name===e&&(s+=1,s!==1&&i.report({message:r,startIndex:a.blockStartPosition.start,endIndex:a.blockStartPosition.end}))}}}}}function w1(e,{allowSnippets:t,url:n}){let r=gie(e,{allowSnippets:t,url:n});return{...r,create(i){let s=i.file.uri;return(0,S1.isSection)(s)||(0,S1.isBlock)(s)?{}:t&&(0,S1.isSnippet)(s)?{}:r.create(i)}}}ln.SchemaSectionOrBlockOnly=w1("schema",{allowSnippets:!1,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/schema-section-or-block-only"});ln.SchemaOncePerFile=T1("schema",{url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/schema-once-per-file"});ln.JavascriptTagInWrongFile=w1("javascript",{allowSnippets:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/javascript-tag-in-wrong-file"});ln.JavascriptOncePerFile=T1("javascript",{url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/javascript-once-per-file"});ln.StylesheetTagInWrongFile=w1("stylesheet",{allowSnippets:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/stylesheet-tag-in-wrong-file"});ln.StylesheetOncePerFile=T1("stylesheet",{url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/stylesheet-once-per-file"})});var vB=x(zg=>{"use strict";p();Object.defineProperty(zg,"__esModule",{value:!0});zg.BlockContentUsage=void 0;var yie=ue(),_ie=hi(),vie=Le(),_B=J(),bie=Ue(),kie="Use the implicit 'content' parameter directly instead of 'block.content'.";zg.BlockContentUsage={meta:{code:"BlockContentUsage",name:"Use `content` instead of `block.content`",docs:{description:"Reports 'block.content' in theme block files, where the built-in 'content' parameter is available as the 'content' variable.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/block-content-usage"},type:_B.SourceCodeType.LiquidHtml,severity:_B.Severity.ERROR,schema:{},targets:[]},create(e){return(0,vie.isBlock)(e.file.uri)?{async VariableLookup(t,n){(0,bie.isWithinRawTagThatDoesNotParseItsContents)(n)||Sie(t)&&e.report({message:kie,startIndex:t.position.start,endIndex:t.position.end})}}:{}}};function Sie(e){let[t]=e.lookups;return e.name==="block"&&t?.type===yie.NodeTypes.String&&t.value===_ie.BLOCK_CONTENT_PARAMETER}});var qe=x(Me=>{"use strict";p();Object.defineProperty(Me,"__esModule",{value:!0});Me.resolveErrorLocation=wie;Me.getOffset=x1;Me.hasBareArrayAccess=Si;Me.argHasBareArrayAccess=bB;Me.variableHasBareArrayAccess=xie;Me.conditionalHasBareArrayAccess=E1;Me.rawMarkup=Eie;Me.hasSkippedCharacters=mr;Me.hasEmptyMarkup=Aie;Me.hasSingleIdMarkup=Oie;Me.hasSingleStringMarkup=Pie;Me.hasRubyValidInlineCommentMarkup=Nie;Me.hasRubyAcceptedCycleTrailingComma=Cie;Me.hasRubyAcceptedLoopTrailingComma=Lie;Me.hasRubyAcceptedPaginateTrailingComma=qie;Me.hasRubyAcceptedEmptyFirstFilterArgument=Iie;Me.hasRubyAcceptedFilterArgumentTrailingComma=Mie;Me.hasRubyAcceptedEmptyAssignRhs=jie;Me.hasRubyAcceptedAssignLhsExtraIdentifier=Bie;Me.hasRubyAcceptedIncludeMarkup=Fie;Me.hasRubyAcceptedRawTagCloserWithMarkup=Vie;Me.liquidTagBodies=Fl;Me.liquidTagMarkup=Wg;Me.hasLiquidTagNamed=Uie;Me.liquidLineTagLocation=Hie;Me.hasSkippedPrefixCharacters=zie;Me.hasRubyAcceptedWhitespaceSeparatedQuotePrefix=Wie;Me.hasUnclosedQuotedString=Gie;var le=ue(),Tie=Ne();function wie(e,t){if("loc"in e&&e.loc){let n=e.loc;return[x1(t,n.start.line,n.start.column),x1(t,n.end.line,n.end.column)]}return[0,t.length]}function x1(e,t,n){let r=1;for(let i=0;i<e.length;i++){if(r===t)return i+(n-1);e[i]===`
|
|
87
|
+
`&&r++}return e.length}function Si(e){return e.type===le.NodeTypes.VariableLookup&&e.name===null}function bB(e){let t=e.type===le.NodeTypes.NamedArgument?e.value:e;return Si(t)}function xie(e){return Si(e.expression)||e.filters.some(t=>t.args.some(bB))}function E1(e){return e.type===le.NodeTypes.LogicalExpression?E1(e.left)||E1(e.right):e.type===le.NodeTypes.Comparison?Si(e.left)||Si(e.right):Si(e)}function Eie(e){return e.source.slice(e.markupPosition.start,e.markupPosition.end)}function mr(e){return Gg(e).length>0}function Aie(e){return gr(e).length===0&&!mr(e)}function Oie(e,t){if(mr(e))return!1;let n=gr(e);return n.length===1&&n[0].type===le.MarkupTokenType.Id&&n[0].value===t}function Pie(e,t){if(mr(e))return!1;let n=gr(e),r=n[0];return n.length!==1||r.type!==le.MarkupTokenType.String?!1:r.value.slice(1,-1)===t}function Nie(e){let t=Jie(e),n=0,r=0;for(let i=1;i<t.length;i++){let s=t[i].firstEvent;s&&(n++,s.type==="uncovered"&&s.value==="#"&&r++)}return n===0||!t[0].firstEvent&&n===1?!0:n===r}function Cie(e){let t=P1(e);return t!==null&&kB(t,e)}function Lie(e){let t=P1(e);if(t===null)return!1;let n=Vl(t,e);try{if(n.consume(le.MarkupTokenType.Id),!n.id("in"))return!1;for(n.valueExpression(),n.id("reversed");!n.isAtEnd();)n.consumeOptional(le.MarkupTokenType.Comma),n.namedArgument()}catch{return!1}return n.isAtEnd()}function qie(e){let t=P1(e);if(t===null)return!1;let n=Vl(t,e);try{if(n.valueExpression(),!n.id("by"))return!1;n.valueExpression(),n.consumeOptional(le.MarkupTokenType.Comma)&&n.namedArguments()}catch{return!1}return n.isAtEnd()}function Iie(e){if(mr(e))return!1;let t=gr(e),n=t.slice(-3);if(!(n.length===3&&n[0].type===le.MarkupTokenType.Pipe&&n[1].type===le.MarkupTokenType.Id&&n[2].type===le.MarkupTokenType.Colon))return!1;let r=t.slice(0,-3);return A1(r,e)||O1(r,e)}function Mie(e){if(mr(e))return!1;let t=Rie(gr(e));return t===null?!1:A1(t,e)||O1(t,e)||Die(t,e)}function Rie(e){let t=!1,n=[];for(let r=0;r<e.length;r++){let i=e[r],s=e[r+1];if(i.type===le.MarkupTokenType.Comma&&(s===void 0||s.type===le.MarkupTokenType.Pipe)){if(!n.slice((0,Tie.findLastIndex)(n,o=>o.type===le.MarkupTokenType.Pipe)+1).some(o=>o.type===le.MarkupTokenType.Colon))return null;let a=n[n.length-1];if(a===void 0||a.type===le.MarkupTokenType.Comma||a.type===le.MarkupTokenType.Colon||a.type===le.MarkupTokenType.Pipe)return null;t=!0;continue}n.push(i)}return t?n:null}function Die(e,t){let n=e.slice(-3);if(!(n.length===3&&n[0].type===le.MarkupTokenType.Pipe&&n[1].type===le.MarkupTokenType.Id&&n[2].type===le.MarkupTokenType.Colon))return!1;let r=e.slice(0,-3);return A1(r,t)||O1(r,t)}function A1(e,t){let n=Vl(e,t);try{n.liquidVariable()}catch{return!1}return n.isAtEnd()}function O1(e,t){if(e.length<3||e[0].type!==le.MarkupTokenType.Id||e[1].type!==le.MarkupTokenType.Equality||e[1].value!=="=")return!1;let n=Vl(e.slice(2),t);try{n.liquidVariable()}catch{return!1}return n.isAtEnd()}function jie(e){if(mr(e))return!1;let t=gr(e);return t.length===2&&t[0].type===le.MarkupTokenType.Id&&t[1].type===le.MarkupTokenType.Equality&&t[1].value==="="}function Bie(e){if(mr(e))return!1;let t=gr(e);return t.length<4||t[0].type!==le.MarkupTokenType.Id||t[1].type!==le.MarkupTokenType.Id||t[2].type!==le.MarkupTokenType.Equality||t[2].value!=="="?!1:kB(t.slice(3),e)}function Fie(e){if(mr(e))return!1;let t=new le.MarkupParser((0,le.tokenizeMarkup)(e),e);try{let n=t.valueExpression();if(Si(n))return!1;if(t.id("for")||t.id("with")){let r=t.valueExpression();if(Si(r))return!1}for(t.id("as")&&t.consume(le.MarkupTokenType.Id),t.consumeOptional(le.MarkupTokenType.Comma);t.look(le.MarkupTokenType.Id);){t.consume(le.MarkupTokenType.Id),t.consume(le.MarkupTokenType.Colon);let r=t.valueExpression();if(Si(r))return!1;if(!t.consumeOptional(le.MarkupTokenType.Comma))break}}catch{return!1}return t.isAtEnd()}function Vie(e,t,n=0){for(let r of Fl(e,n)){let i=Wg(r.body);if(i?.tagName===`end${t}`&&i.remainingTokens.length>0&&!i.hasSkippedCharacters)return $ie(e,t,r.end)}return!1}function $ie(e,t,n){let r=0;for(let i of Fl(e,n)){let s=Wg(i.body);if(!(!s||s.hasSkippedCharacters)){if(s.tagName===t){r++;continue}if(s.tagName===`end${t}`&&(r--,r<0))return!1}}return r===0}function Fl(e,t=0){let n=(0,le.tokenize)(e),r=[];for(let i=0;i<n.length;i++){let s=n[i];if(s.type!==le.TokenType.LiquidTagOpen||s.start<t)continue;let a=n[i+1],o=a?.type===le.TokenType.Text?n[i+2]:a;!o||o.type!==le.TokenType.LiquidTagClose||r.push(Qie(e,s,a?.type===le.TokenType.Text?a:void 0,o))}return r}function Wg(e){let t=gr(e),n=t[0];if(!(!n||n.type!==le.MarkupTokenType.Id))return{tagName:n.value,remainingTokens:t.slice(1),hasSkippedCharacters:mr(e)}}function Uie(e,t){for(let n of Fl(e)){let r=Wg(n.body);if(r?.tagName===t&&!r.hasSkippedCharacters)return!0}return!1}function Hie(e,t){for(let n of Fl(e)){let r=n.body.indexOf(`
|
|
88
|
+
`);if(r===-1)continue;let s=(0,le.tokenizeMarkup)(n.body.slice(0,r),n.bodyStart).filter(o=>o.type!==le.MarkupTokenType.EndOfString)[0];if(s?.type!==le.MarkupTokenType.Id||s.value!=="liquid")continue;let a=n.bodyStart;for(let o of n.body.split(`
|
|
89
|
+
`)){let l=(0,le.tokenizeMarkup)(o,a).filter(f=>f.type!==le.MarkupTokenType.EndOfString)[0];if(l?.type===le.MarkupTokenType.Id&&l.value===t)return[l.start,a+o.length];a+=o.length+1}}return null}function zie(e,t,n){return Gg(e.slice(t,n),!0).length>0}function Wie(e){if(gr(e).length>0)return!1;let t=Gg(e);if(t.length===0||t.some(({value:r})=>!C1(r)))return!1;let n=t[t.length-1];for(let r=n.end;r<e.length;r++)if(N1(e[r]))return!0;return!1}function Gie(e){return Gg(e).some(({value:t})=>C1(t))}function Gg(e,t=!1){let n=(0,le.tokenizeMarkup)(e),r=new Set,i=[];for(let s of n)if(s.type!==le.MarkupTokenType.EndOfString)for(let a=s.start;a<s.end;a++)r.add(a);for(let s=0;s<e.length;s++){let a=e[s];N1(a)||r.has(s)||t&&C1(a)||i.push({value:a,start:s,end:s+1})}return i}function gr(e){return(0,le.tokenizeMarkup)(e).filter(t=>t.type!==le.MarkupTokenType.EndOfString)}function Jie(e){let t=Kie(e),n=[{firstEvent:void 0}],r=n[0];for(let i=0;i<e.length;i++){let s=e[i];if(s===`
|
|
90
|
+
`){r={firstEvent:void 0},n.push(r);continue}if(N1(s)||r.firstEvent)continue;let a=t.get(i);r.firstEvent=a?{type:"token",start:i,end:i+1}:{type:"uncovered",value:s,start:i,end:i+1}}return n}function Kie(e){let t=new Map;for(let n of gr(e))for(let r=n.start;r<n.end;r++)t.set(r,n);return t}function kB(e,t){let n=Vl(e,t);try{n.valueExpression()}catch{return!1}return n.isAtEnd()}function P1(e){if(mr(e))return null;let t=gr(e),n=t[t.length-1],r=t[t.length-2];return t.length<2||n.type!==le.MarkupTokenType.Comma||r.type===le.MarkupTokenType.Comma?null:t.slice(0,-1)}function Vl(e,t){return new le.MarkupParser([...e,Yie(t)],t)}function Yie(e){return{type:le.MarkupTokenType.EndOfString,value:"",start:e.length,end:e.length}}function N1(e){return e===" "||e===`
|
|
91
|
+
`||e==="\r"||e===" "}function C1(e){return e==="'"||e==='"'}function Qie(e,t,n,r){return{start:t.start,body:n?e.slice(n.start,n.end):"",bodyStart:n?.start??t.end,end:r.end}}});var ja=x(Ul=>{"use strict";p();Object.defineProperty(Ul,"__esModule",{value:!0});Ul.checkBlockTag=rse;Ul.blockTagSyntaxError=TB;Ul.checkBlockParserError=ise;var $l=ue(),Pc=qe(),L1="Syntax error in 'block' tag",Xie="Bare bracket access is not allowed in strict2 mode",Zie="Liquid syntax error: in 'block' - Use plain named arguments, for example: block 'name', heading: value",ese="Liquid syntax error: in 'block' - app blocks do not accept content",SB="Attempting to end parsing before LiquidTag 'block' was closed",tse="Unclosed block tag 'block' in {% liquid %} block",nse=new Set([SB,tse,"Attempting to close LiquidTag 'block' before it was opened without a matching 'block'"]);function rse(e,t){let n=TB(e);n&&t.report(n)}function TB(e){if(typeof e.markup=="string")return Da(e.position,L1);let t=e.markup,n=t.args.find(use);if(n)return Da(n.position,lse(n.name));if(sse(t.name.value)){let r=t.args.find(i=>i.name!=="block.name"&&!ase(i.value));if(r)return Da(r.position,`Liquid syntax error: in 'block' - app block settings must be fixed values; '${r.name}' is not a string, number, boolean or array of those`);if(ose(e))return Da(e.position,ese)}if(t.args.some(cse))return Da(e.position,L1);if(t.args.some(r=>r.value.type!=="BlockArrayLiteral"&&(0,Pc.hasBareArrayAccess)(r.value)))return Da(e.position,Xie);if((0,Pc.hasSkippedCharacters)((0,Pc.rawMarkup)(e)))return Da(e.position,L1)}function ise(e,t,n){if(!nse.has(e.message))return;let[r,i]=e.message.includes("Unclosed block tag 'block' in {% liquid %} block")?(0,Pc.liquidLineTagLocation)(n,"block")??(0,Pc.resolveErrorLocation)(e,n):(0,Pc.resolveErrorLocation)(e,n);t.report({message:e.message===SB?"Liquid syntax error: 'block' tag was never closed":e.message,startIndex:r,endIndex:i})}function Da(e,t){return{message:t,startIndex:e.start,endIndex:e.end}}function sse(e){return e.startsWith("shopify://apps/")}function ase(e){return(e.type==="BlockArrayLiteral"?e.elements:[e]).every(n=>n.type===$l.NodeTypes.String||n.type===$l.NodeTypes.Number||n.type===$l.NodeTypes.LiquidLiteral&&(n.keyword==="true"||n.keyword==="false"))}function ose(e){return(e.children??[]).some(t=>t.type!==$l.NodeTypes.TextNode||t.value.trim()!=="")}function cse(e){return e.name==="block.name"&&e.value.type!==$l.NodeTypes.String}function use(e){return e.name!=="block.name"&&e.name.includes(".")}function lse(e){let t=fse(e);return t?`Liquid syntax error: in 'block' - Use '${t}:' instead of '${e}:' when calling a block.`:Zie}function fse(e){let[t,n,r,...i]=e.split(".");if(!(t!=="block"||n!=="settings"||i.length>0))return r}});var xB=x(Jg=>{"use strict";p();Object.defineProperty(Jg,"__esModule",{value:!0});Jg.DuplicateBlockArguments=void 0;var dse=hi(),wB=J(),hse=ja();Jg.DuplicateBlockArguments={meta:{code:"DuplicateBlockArguments",name:"Duplicate Block Arguments",docs:{description:"Reports duplicate block arguments and explicit content arguments overridden by inline body content.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/duplicate-block-arguments"},type:wB.SourceCodeType.LiquidHtml,severity:wB.Severity.WARNING,schema:{},targets:[]},create(e){return{async LiquidTag(t){if(t.name!=="block"||(0,hse.blockTagSyntaxError)(t))return;let n=t.markup,r=new Set,i=!!t.children?.length;for(let s of n.args){let a=r.has(s.name);r.add(s.name),a&&e.report({message:`Duplicate argument '${s.name}' in block tag for '${n.name.value}'.`,startIndex:s.position.start,endIndex:s.position.end}),!(!i||s.name!==dse.BLOCK_CONTENT_PARAMETER)&&e.report({message:"The explicit 'content' argument has no effect because the inline block body takes precedence.",startIndex:s.position.start,endIndex:s.position.end})}}}}}});var EB=x(Ba=>{"use strict";p();Object.defineProperty(Ba,"__esModule",{value:!0});Ba.ExcessiveSettingsCount=Ba.TOLERATED_SETTINGS_COUNT=void 0;var Nc=J(),pse=Xo(),mse=Nr();Ba.TOLERATED_SETTINGS_COUNT=40;var gse={maxSettings:Nc.SchemaProp.number(Ba.TOLERATED_SETTINGS_COUNT)};Ba.ExcessiveSettingsCount={meta:{code:"ExcessiveSettingsCount",name:"ExcessiveSettingsCount",docs:{description:"Reports section or block schemas that declare more top-level settings than the configured maximum.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/excessive-settings-count"},type:Nc.SourceCodeType.LiquidHtml,severity:Nc.Severity.WARNING,schema:gse,targets:[]},create(e){let t=e.settings.maxSettings;return{async onCodePathEnd(){if(e.file.ast instanceof Error)return;let n=(0,mse.visit)(e.file.ast,{LiquidRawTag(a){if(a.name==="schema")return a}})[0];if(!n)return;let r=(0,pse.toJSONAST)(n.body.value);if(r instanceof Error||!(0,Nc.isObjectNode)(r))return;let i=r.children.find(a=>a.key.value==="settings");if(!i||!(0,Nc.isArrayNode)(i.value))return;let s=i.value.children.filter(a=>(0,Nc.isObjectNode)(a)&&a.children.some(o=>o.key.value==="id")).length;s<=t||e.report({message:`This schema declares ${s} settings, which exceeds the maximum of ${t}. Consider splitting this section or block into smaller pieces, or grouping related options with a header.`,startIndex:n.blockStartPosition.start,endIndex:n.blockStartPosition.end})}}}}});var AB=x(Fa=>{"use strict";p();Object.defineProperty(Fa,"__esModule",{value:!0});Fa.LiquidComplexity=Fa.TOLERATED_LIQUID_COMPLEXITY=void 0;var q1=J(),Hl=ue(),yse=Ne();Fa.TOLERATED_LIQUID_COMPLEXITY=120;var _se={maxComplexity:q1.SchemaProp.number(Fa.TOLERATED_LIQUID_COMPLEXITY)},vse=new Set(["if","unless","case","for","tablerow","paginate"]),bse=new Set(["elsif","when"]),kse=new Set(["if","unless"]),Sse=new Set(["elsif"]);Fa.LiquidComplexity={meta:{code:"LiquidComplexity",name:"LiquidComplexity",docs:{description:"Reports Liquid files with high cyclomatic complexity.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/liquid-complexity"},type:q1.SourceCodeType.LiquidHtml,severity:q1.Severity.WARNING,schema:_se,targets:[]},create(e){let t=e.settings.maxComplexity,n={complexity:1},r;function i(c){return"blockStartPosition"in c?{startIndex:c.blockStartPosition.start,endIndex:c.blockStartPosition.end}:{startIndex:c.position.start,endIndex:c.position.end}}function s(c){n.complexity+=1,!r&&n.complexity>t&&(r=i(c))}function a(c){let l=(0,yse.findLastIndex)(c,h=>[Hl.NodeTypes.LiquidTag,Hl.NodeTypes.LiquidBranch,Hl.NodeTypes.LiquidVariableOutput].includes(h.type));if(l===-1)return!1;let f=c[l];return f.type===Hl.NodeTypes.LiquidTag?kse.has(f.name):f.type===Hl.NodeTypes.LiquidBranch?Sse.has(f.name??""):!1}function o(c){return e.file.source.slice(0,c).split(`
|
|
92
|
+
`).length}return{async LiquidTag(c){vse.has(c.name)&&s(c)},async LiquidBranch(c){bse.has(c.name??"")&&s(c)},async LogicalExpression(c,l){a(l)&&s(c)},async onCodePathEnd(){if(n.complexity<=t)return;let c=r??{startIndex:0,endIndex:e.file.source.length},l=o(c.startIndex);e.report({message:`Liquid complexity is ${n.complexity}, which exceeds the maximum of ${t}. The decision at line ${l} pushed it over the limit. Consider simplifying conditional logic, or moving self-contained decision logic into snippets with the render tag.`,startIndex:c.startIndex,endIndex:c.endIndex})}}}}});var PB=x(Va=>{"use strict";p();Object.defineProperty(Va,"__esModule",{value:!0});Va.LiquidNestingDepth=Va.TOLERATED_LIQUID_NESTING_DEPTH=void 0;var I1=J(),Tse=ue();Va.TOLERATED_LIQUID_NESTING_DEPTH=10;var wse={maxDepth:I1.SchemaProp.number(Va.TOLERATED_LIQUID_NESTING_DEPTH)},OB=new Set(["if","unless","for","case","tablerow"]);Va.LiquidNestingDepth={meta:{code:"LiquidNestingDepth",name:"LiquidNestingDepth",docs:{description:"Reports Liquid files with deeply nested control-flow structures.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/liquid-nesting-depth"},type:I1.SourceCodeType.LiquidHtml,severity:I1.Severity.WARNING,schema:wse,targets:[]},create(e){let t=e.settings.maxDepth;function n(r){return r.filter(s=>s.type===Tse.NodeTypes.LiquidTag&&OB.has(s.name)).length+1}return{async LiquidTag(r,i){if(!OB.has(r.name))return;let s=n(i);s<=t||e.report({message:`This Liquid block is nested ${s} levels deep, which exceeds the maximum allowed depth of ${t}.`,startIndex:r.blockStartPosition.start,endIndex:r.blockStartPosition.end})}}}}});var NB=x(M1=>{"use strict";p();Object.defineProperty(M1,"__esModule",{value:!0});M1.checkAssignTag=xse;var Yn=qe();function xse(e,t){if(typeof e.markup=="string"){if((0,Yn.hasRubyAcceptedEmptyAssignRhs)(e.markup)||(0,Yn.hasRubyAcceptedEmptyFirstFilterArgument)(e.markup)||(0,Yn.hasRubyAcceptedFilterArgumentTrailingComma)(e.markup)||(0,Yn.hasRubyAcceptedAssignLhsExtraIdentifier)(e.markup))return;t.report({message:"Syntax error in 'assign' tag",startIndex:e.position.start,endIndex:e.position.end});return}let n=e.markup;if((0,Yn.variableHasBareArrayAccess)(n.value)){t.report({message:"Bare bracket access is not allowed",startIndex:e.position.start,endIndex:e.position.end});return}if((0,Yn.hasSkippedPrefixCharacters)(e.source,e.markupPosition.start,n.position.start)){t.report({message:"Syntax error in 'assign' tag",startIndex:e.position.start,endIndex:e.position.end});return}let r=(0,Yn.rawMarkup)(e);if((0,Yn.hasRubyAcceptedEmptyAssignRhs)(r)||(0,Yn.hasRubyAcceptedEmptyFirstFilterArgument)(r)||(0,Yn.hasRubyAcceptedFilterArgumentTrailingComma)(r)||(0,Yn.hasRubyAcceptedAssignLhsExtraIdentifier)(r))return;let i=e.source.slice(n.position.start,e.markupPosition.end);(0,Yn.hasSkippedCharacters)(i)&&t.report({message:"Syntax error in 'assign' tag",startIndex:e.position.start,endIndex:e.position.end})}});var IB=x(R1=>{"use strict";p();Object.defineProperty(R1,"__esModule",{value:!0});R1.checkBaseTag=Ese;var CB=ue(),Kg=new WeakSet;async function Ese(e,t){if("reason"in e&&typeof e.reason=="string"){t.report({message:e.reason,startIndex:e.position.start,endIndex:e.position.end});return}if(e.name==="liquid"&&Array.isArray(e.markup)){await Ase(e.markup,t);return}let n=await LB(t);Kg.has(e)||qB(e,n)&&(Kg.add(e),t.report({message:`Unknown tag '${e.name}'`,startIndex:e.position.start,endIndex:e.position.end}))}async function Ase(e,t){let n=await LB(t);for(let r of e)r.type===CB.NodeTypes.LiquidTag&&!Kg.has(r)&&qB(r,n)&&(Kg.add(r),t.report({message:`Unknown tag '${r.name}'`,startIndex:r.position.start,endIndex:r.position.end}))}async function LB(e){let t=e.themeDocset?await e.themeDocset.tags():Object.keys(CB.builtinTags).map(n=>({name:n}));return new Set(["#","else","elsif","when",...t.map(n=>n.name)])}function qB(e,t){return e.source.startsWith("{%",e.position.start)?!1:!t.has(e.name)}});var MB=x(Qg=>{"use strict";p();Object.defineProperty(Qg,"__esModule",{value:!0});Qg.checkBranchTag=Pse;Qg.checkMisplacedBranchTag=Nse;var $a=qe(),Ose="Bare bracket access is not allowed in strict2 mode";function Pse(e,t){if(e.name==="elsif"){Lse(e,t);return}e.name==="when"&&Cse(e,t)}function Nse(e,t){t.report({message:`Unknown tag '${e.name}'`,startIndex:e.position.start,endIndex:e.position.end})}function Cse(e,t){if(typeof e.markup=="string"){D1(e,t);return}let n=e.markup,r=e.source.slice(e.markupPosition.start,e.markupPosition.end);if((0,$a.hasUnclosedQuotedString)(r)){D1(e,t);return}if(n.some($a.hasBareArrayAccess)){t.report({message:"Bare bracket access is not allowed",startIndex:e.blockStartPosition.start,endIndex:e.blockStartPosition.end});return}if(n.length===0)return;let i=e.source.slice(n[0].position.start,e.markupPosition.end);(0,$a.hasSkippedCharacters)(i)&&D1(e,t)}function D1(e,t){t.report({message:"Syntax error in 'when' tag",startIndex:e.blockStartPosition.start,endIndex:e.blockStartPosition.end})}function Lse(e,t){if(typeof e.markup=="string"){Yg(e,t);return}let n=e.markup,r=e.source.slice(e.markupPosition.start,e.markupPosition.end);if((0,$a.hasUnclosedQuotedString)(r)){Yg(e,t);return}if((0,$a.conditionalHasBareArrayAccess)(n)){t.report({message:Ose,startIndex:e.blockStartPosition.start,endIndex:e.blockStartPosition.end});return}if((0,$a.hasSkippedPrefixCharacters)(e.source,e.markupPosition.start,n.position.start)){Yg(e,t);return}let i=e.source.slice(n.position.start,e.markupPosition.end);(0,$a.hasSkippedCharacters)(i)&&Yg(e,t)}function Yg(e,t){t.report({message:"Syntax error in 'elsif' tag",startIndex:e.blockStartPosition.start,endIndex:e.blockStartPosition.end})}});var RB=x(B1=>{"use strict";p();Object.defineProperty(B1,"__esModule",{value:!0});B1.checkCaptureTag=qse;var j1=qe();function qse(e,t){if(typeof e.markup=="string"){t.report({message:"Syntax error in 'capture' tag",startIndex:e.position.start,endIndex:e.position.end});return}if((0,j1.hasBareArrayAccess)(e.markup)){t.report({message:"Bare bracket access is not allowed",startIndex:e.position.start,endIndex:e.position.end});return}(0,j1.hasSkippedCharacters)((0,j1.rawMarkup)(e))&&t.report({message:"Syntax error in 'capture' tag",startIndex:e.position.start,endIndex:e.position.end})}});var DB=x(F1=>{"use strict";p();Object.defineProperty(F1,"__esModule",{value:!0});F1.checkCaseTag=Ise;var Xg=qe();function Ise(e,t){if(typeof e.markup=="string"){t.report({message:"Syntax error in 'case' tag",startIndex:e.position.start,endIndex:e.position.end});return}let n=e.markup;if((0,Xg.hasUnclosedQuotedString)((0,Xg.rawMarkup)(e))){t.report({message:"Syntax error in 'case' tag",startIndex:e.position.start,endIndex:e.position.end});return}if((0,Xg.hasBareArrayAccess)(n)){t.report({message:"Bare bracket access is not allowed",startIndex:e.position.start,endIndex:e.position.end});return}(0,Xg.hasSkippedCharacters)(e.source.slice(n.position.start,e.markupPosition.end))&&t.report({message:"Syntax error in 'case' tag",startIndex:e.position.start,endIndex:e.position.end})}});var V1=x(_r=>{"use strict";p();Object.defineProperty(_r,"__esModule",{value:!0});_r.UNMATCHED_RAW_CLOSE_PARSER_ERROR=_r.UNMATCHED_COMMENT_CLOSE_PARSER_ERROR=void 0;_r.checkCommentTag=Rse;_r.checkCommentRawTag=Bse;_r.hasRubyAcceptedInertCommentBodyCloser=VB;var yr=ue(),Hr=qe(),BB="Liquid syntax error: 'comment' tag was never closed";_r.UNMATCHED_COMMENT_CLOSE_PARSER_ERROR="Attempting to close LiquidTag 'comment' before it was opened without a matching 'comment'";_r.UNMATCHED_RAW_CLOSE_PARSER_ERROR="Attempting to close LiquidTag 'raw' before it was opened without a matching 'raw'";var Mse="Attempting to end parsing before LiquidRawTag 'comment' was closed";function Rse(e,t,n){if(!Fse(e,n))return;let[r,i]=(0,Hr.resolveErrorLocation)(e,n);if(e.message===Mse&&jse(Dse(n,r))){t.report({message:BB,startIndex:r,endIndex:i});return}e.message===_r.UNMATCHED_COMMENT_CLOSE_PARSER_ERROR&&VB(n,"comment",r)||t.report({message:e.message,startIndex:r,endIndex:i})}function Dse(e,t){let n=e.indexOf("%}",t);return n===-1?"":e.slice(n+2)}function jse(e){for(let t of(0,Hr.liquidTagBodies)(e)){let n=(0,Hr.liquidTagMarkup)(t.body);if(n?.tagName==="comment"&&!n.hasSkippedCharacters)return!0}return!1}function Bse(e,t){let n=e.body.value;($se(n,e.source,e.blockEndPosition.end)||Use(n,e.source,e.blockEndPosition.end)||Vse(n))&&t.report({message:BB,startIndex:e.body.position.start,endIndex:e.body.position.end})}function Fse(e,t){return!jB(t,"comment")&&!jB(t,"endcomment")?!1:e.message==="Attempting to end parsing before LiquidRawTag 'comment' was closed"||e.message===_r.UNMATCHED_COMMENT_CLOSE_PARSER_ERROR}function Vse(e){let t=(0,yr.tokenize)(e);for(let n=0;n<t.length;n++){let r=t[n],i=t[n+1],s=i?.type===yr.TokenType.Text?t[n+2]:i;if(r.type===yr.TokenType.LiquidTagOpen){if(s?.type!==yr.TokenType.LiquidTagClose)return!0;continue}if(r.type===yr.TokenType.LiquidVariableOutputOpen&&s?.type!==yr.TokenType.LiquidVariableOutputClose)return!0}return!1}function $se(e,t,n){return FB(e,t,n,"comment")}function Use(e,t,n){return FB(e,t,n,"raw")}function FB(e,t,n,r){let i=Hse(e,r);if(i===0)return!1;for(let s of(0,Hr.liquidTagBodies)(t,n)){let a=(0,Hr.liquidTagMarkup)(s.body);if(!(!a||a.hasSkippedCharacters)){if(a.tagName===r){i++;continue}if(a.tagName===`end${r}`&&(i--,i===0))return!1}}return!0}function Hse(e,t){let n=0;for(let r of(0,Hr.liquidTagBodies)(e)){let i=(0,Hr.liquidTagMarkup)(r.body);if(!(!i||i.hasSkippedCharacters)){if(i.tagName===t){n++;continue}i.tagName===`end${t}`&&n>0&&n--}}return n}function Ua(e,t,n=0,r=e.length){return(0,Hr.liquidTagBodies)(e,n).filter(i=>{if(i.bodyStart>=r)return!1;let s=(0,Hr.liquidTagMarkup)(i.body);return s?.tagName===t&&!s.hasSkippedCharacters}).length}function VB(e,t,n){let r=`end${t}`,i=zse(e,n);return i?.tagName!==r||i.hasSkippedCharacters?!1:t==="comment"?Ua(e,"comment",0,n)>Ua(e,"endcomment",0,n):Ua(e,"raw",0,n)>Ua(e,"endraw",0,n)&&Ua(e,"comment",0,n)>0&&Ua(e,"endcomment",n)>0}function jB(e,t){return Ua(e,t)>0}function zse(e,t){let n=(0,yr.tokenize)(e);for(let r=0;r<n.length;r++){let i=n[r];if(i.type!==yr.TokenType.LiquidTagOpen||i.start!==t)continue;let s=n[r+1],a=s?.type===yr.TokenType.Text?n[r+2]:s;return!a||a.type!==yr.TokenType.LiquidTagClose?void 0:(0,Hr.liquidTagMarkup)(Wse(e,s?.type===yr.TokenType.Text?s:void 0))}}function Wse(e,t){return t?e.substring(t.start,t.end):""}});var UB=x(H1=>{"use strict";p();Object.defineProperty(H1,"__esModule",{value:!0});H1.checkContentForTag=Xse;var Zg=ue(),Gse=qe(),Jse=new Set(["block","blocks"]),Kse=new Set(["block","schema"]),U1="closest.",Yse="metaobject.",Qse=new Set(["article","blog","collection","page","product"]);function Xse(e,t){if(typeof e.markup=="string"){t.report({message:"Syntax error in 'content_for' tag",startIndex:e.position.start,endIndex:e.position.end});return}let n=e.markup,r=n.contentForType.value;if(!Jse.has(r)){aae(e,t,r);return}if(Zse(n)){$1(e,t);return}if(r==="block"&&tae(n)){$1(e,t);return}r==="blocks"&&iae(n)&&$1(e,t)}function Zse(e){return eae(e)||e.args.some(Gse.argHasBareArrayAccess)}function eae(e){let t=new Set;for(let n of e.args){if(t.has(n.name))return!0;t.add(n.name)}return!1}function tae(e){return nae(e)||rae(e)||sae(e)}function nae(e){return e.args.some(t=>Kse.has(t.name))}function rae(e){let t=e.args.find(r=>r.name==="type"),n=e.args.find(r=>r.name==="id");return!t||!n||t.value.type!==Zg.NodeTypes.String||n.value.type!==Zg.NodeTypes.String||t.value.value===""||n.value.value===""}function iae(e){let t=0;for(let n of e.args)if(!n.name.startsWith(U1)||n.value.type===Zg.NodeTypes.String||(t+=1,t>1)||!$B(n.name))return!0;return!1}function sae(e){let t=0;for(let n of e.args)if(n.name.startsWith(U1)&&(n.value.type===Zg.NodeTypes.String||(t+=1,t>1)||!$B(n.name)))return!0;return!1}function $B(e){let t=e.slice(U1.length);return Qse.has(t)||t.startsWith(Yse)}function aae(e,t,n){t.report({message:`Invalid content_for type "${n}"; expected "block" or "blocks"`,startIndex:e.position.start,endIndex:e.position.end})}function $1(e,t){t.report({message:"Syntax error in 'content_for' tag",startIndex:e.position.start,endIndex:e.position.end})}});var HB=x(z1=>{"use strict";p();Object.defineProperty(z1,"__esModule",{value:!0});z1.checkCycleTag=oae;var zl=qe();function oae(e,t){if(typeof e.markup=="string"){if((0,zl.hasRubyAcceptedCycleTrailingComma)(e.markup))return;t.report({message:"Syntax error in 'cycle' tag",startIndex:e.position.start,endIndex:e.position.end});return}let n=e.markup;if(n.groupName&&(0,zl.hasBareArrayAccess)(n.groupName)||n.args.some(zl.hasBareArrayAccess)){t.report({message:"Bare bracket access is not allowed",startIndex:e.position.start,endIndex:e.position.end});return}(0,zl.hasSkippedCharacters)((0,zl.rawMarkup)(e))&&t.report({message:"Syntax error in 'cycle' tag",startIndex:e.position.start,endIndex:e.position.end})}});var zB=x(G1=>{"use strict";p();Object.defineProperty(G1,"__esModule",{value:!0});G1.checkDecrementTag=cae;var W1=qe();function cae(e,t){if(typeof e.markup=="string"){t.report({message:"Syntax error in 'decrement' tag",startIndex:e.position.start,endIndex:e.position.end});return}if((0,W1.hasBareArrayAccess)(e.markup)){t.report({message:"Bare bracket access is not allowed",startIndex:e.position.start,endIndex:e.position.end});return}(0,W1.hasSkippedCharacters)((0,W1.rawMarkup)(e))&&t.report({message:"Syntax error in 'decrement' tag",startIndex:e.position.start,endIndex:e.position.end})}});var JB=x(Wl=>{"use strict";p();Object.defineProperty(Wl,"__esModule",{value:!0});Wl.checkDocTag=lae;Wl.checkDocParserError=fae;Wl.isDocParserError=GB;var Cc=qe(),J1="Attempting to end parsing before LiquidRawTag 'doc' was closed",uae="Attempting to close LiquidTag 'doc' before it was opened without a matching 'doc'";function lae(e,t){if(e.markup!==""){t.report({message:"Syntax error in 'doc' tag",startIndex:e.blockStartPosition.start,endIndex:e.blockStartPosition.end});return}WB(e.body.value)&&t.report({message:"Nested doc tags are not allowed",startIndex:e.body.position.start,endIndex:e.body.position.end})}function WB(e){for(let t of(0,Cc.liquidTagBodies)(e)){let n=(0,Cc.liquidTagMarkup)(t.body);if(n?.tagName==="enddoc"&&n.remainingTokens.length>0&&!n.hasSkippedCharacters)return!1;if(n?.tagName==="doc"&&!n.hasSkippedCharacters)return!0}return!1}function fae(e,t,n){if(!GB(e,n))return;let[r,i]=(0,Cc.resolveErrorLocation)(e,n);if(e.message===J1&&WB(dae(n,r))){t.report({message:"Nested doc tags are not allowed",startIndex:r,endIndex:i});return}e.message===J1&&(0,Cc.hasRubyAcceptedRawTagCloserWithMarkup)(n,"doc",r)||t.report({message:e.message,startIndex:r,endIndex:i})}function dae(e,t){let n=e.indexOf("%}",t);return n===-1?"":e.slice(n+2)}function GB(e,t){return!(0,Cc.hasLiquidTagNamed)(t,"doc")&&!(0,Cc.hasLiquidTagNamed)(t,"enddoc")?!1:e.message===J1||e.message===uae}});var KB=x(K1=>{"use strict";p();Object.defineProperty(K1,"__esModule",{value:!0});K1.checkEchoTag=hae;var Ti=qe();function hae(e,t){if(typeof e.markup=="string"){if((0,Ti.hasEmptyMarkup)((0,Ti.rawMarkup)(e))||(0,Ti.hasRubyAcceptedEmptyFirstFilterArgument)(e.markup)||(0,Ti.hasRubyAcceptedFilterArgumentTrailingComma)(e.markup))return;t.report({message:"Syntax error in 'echo' tag",startIndex:e.position.start,endIndex:e.position.end});return}let n=e.markup;if((0,Ti.variableHasBareArrayAccess)(n)){t.report({message:"Bare bracket access is not allowed",startIndex:e.position.start,endIndex:e.position.end});return}let r=(0,Ti.rawMarkup)(e);(0,Ti.hasRubyAcceptedEmptyFirstFilterArgument)(r)||(0,Ti.hasRubyAcceptedFilterArgumentTrailingComma)(r)||(0,Ti.hasSkippedCharacters)(r)&&t.report({message:"Syntax error in 'echo' tag",startIndex:e.position.start,endIndex:e.position.end})}});var QB=x(X1=>{"use strict";p();Object.defineProperty(X1,"__esModule",{value:!0});X1.checkFormTag=mae;var YB=ue(),Y1=qe(),Q1="Syntax error in 'form' tag",pae="Bare bracket access is not allowed in strict2 mode";function mae(e,t){if(typeof e.markup=="string"){ey(e,t,Q1);return}let n=e.markup;if(n.some(Y1.argHasBareArrayAccess)){ey(e,t,pae);return}if(gae(n)){ey(e,t,Q1);return}(0,Y1.hasSkippedCharacters)((0,Y1.rawMarkup)(e))&&ey(e,t,Q1)}function gae(e){if(e.length===0||e[0].type===YB.NodeTypes.NamedArgument)return!0;let t=1,n=!1;for(let r of e.slice(1)){if(r.type===YB.NodeTypes.NamedArgument){n=!0;continue}if(t+=1,n||t>2)return!0}return!1}function ey(e,t,n){t.report({message:n,startIndex:e.position.start,endIndex:e.position.end})}});var XB=x(eT=>{"use strict";p();Object.defineProperty(eT,"__esModule",{value:!0});eT.checkForTag=yae;var Z1=qe();function yae(e,t){if(typeof e.markup=="string"){t.report({message:"Syntax error in 'for' tag",startIndex:e.position.start,endIndex:e.position.end});return}let n=e.markup;if((0,Z1.hasBareArrayAccess)(n.collection)){t.report({message:"Bare bracket access is not allowed",startIndex:e.position.start,endIndex:e.position.end});return}if((0,Z1.hasSkippedPrefixCharacters)(e.source,e.markupPosition.start,n.position.start)){t.report({message:"Syntax error in 'for' tag",startIndex:e.position.start,endIndex:e.position.end});return}let r=e.source.slice(n.position.start,e.markupPosition.end);(0,Z1.hasSkippedCharacters)(r)&&t.report({message:"Syntax error in 'for' tag",startIndex:e.position.start,endIndex:e.position.end})}});var ZB=x(tT=>{"use strict";p();Object.defineProperty(tT,"__esModule",{value:!0});tT.checkIfTag=_ae;var Gl=qe();function _ae(e,t){if(typeof e.markup=="string"){t.report({message:"Syntax error in 'if' tag",startIndex:e.position.start,endIndex:e.position.end});return}let n=e.markup,r=(0,Gl.rawMarkup)(e);if((0,Gl.hasUnclosedQuotedString)(r)){t.report({message:"Syntax error in 'if' tag",startIndex:e.position.start,endIndex:e.position.end});return}if((0,Gl.conditionalHasBareArrayAccess)(n)){t.report({message:"Bare bracket access is not allowed in strict2 mode",startIndex:e.position.start,endIndex:e.position.end});return}if((0,Gl.hasSkippedPrefixCharacters)(e.source,e.markupPosition.start,n.position.start)){t.report({message:"Syntax error in 'if' tag",startIndex:e.position.start,endIndex:e.position.end});return}let i=e.source.slice(n.position.start,e.markupPosition.end);(0,Gl.hasSkippedCharacters)(i)&&t.report({message:"Syntax error in 'if' tag",startIndex:e.position.start,endIndex:e.position.end})}});var eF=x(nT=>{"use strict";p();Object.defineProperty(nT,"__esModule",{value:!0});nT.checkIncludeTag=vae;var Lc=qe();function vae(e,t){if(typeof e.markup=="string"){if((0,Lc.hasRubyAcceptedIncludeMarkup)(e.markup))return;t.report({message:"Syntax error in 'include' tag",startIndex:e.position.start,endIndex:e.position.end});return}let n=e.markup;if((0,Lc.hasBareArrayAccess)(n.snippet)||n.variable&&(0,Lc.hasBareArrayAccess)(n.variable.name)||n.args.some(Lc.argHasBareArrayAccess)){t.report({message:"Bare bracket access is not allowed in strict2 mode",startIndex:e.position.start,endIndex:e.position.end});return}(0,Lc.hasSkippedCharacters)((0,Lc.rawMarkup)(e))&&t.report({message:"Syntax error in 'include' tag",startIndex:e.position.start,endIndex:e.position.end})}});var tF=x(iT=>{"use strict";p();Object.defineProperty(iT,"__esModule",{value:!0});iT.checkIncrementTag=kae;var bae=ue(),rT=qe();function kae(e,t){if(typeof e.markup=="string"){t.report({message:"Syntax error in 'increment' tag",startIndex:e.position.start,endIndex:e.position.end});return}(Sae(e)||(0,rT.hasSkippedCharacters)((0,rT.rawMarkup)(e)))&&t.report({message:"Syntax error in 'increment' tag",startIndex:e.position.start,endIndex:e.position.end})}function Sae(e){return!e.markup||typeof e.markup!="object"||Array.isArray(e.markup)||!("type"in e.markup)?!1:e.markup.type===bae.NodeTypes.VariableLookup&&(0,rT.hasBareArrayAccess)(e.markup)}});var rF=x(sT=>{"use strict";p();Object.defineProperty(sT,"__esModule",{value:!0});sT.checkInlineCommentTag=Tae;var nF=qe();function Tae(e,t){(0,nF.hasRubyValidInlineCommentMarkup)((0,nF.rawMarkup)(e))||t.report({message:"Syntax error in tag '#' - Each line of comments must be prefixed by the '#' character",startIndex:e.position.start,endIndex:e.position.end})}});var aF=x(Jl=>{"use strict";p();Object.defineProperty(Jl,"__esModule",{value:!0});Jl.checkJavascriptTag=Oae;Jl.checkJavascriptParserError=Pae;Jl.hasJavascriptClosingTagAfter=sF;var Qn=qe(),iF="Syntax Error in 'javascript' - Valid syntax: javascript",wae="'javascript' tag was never closed",xae="Unknown tag 'endjavascript'",Eae="Attempting to end parsing before LiquidRawTag 'javascript' was closed",Aae="Attempting to close LiquidTag 'javascript' before it was opened without a matching 'javascript'";function Oae(e,t){(0,Qn.hasEmptyMarkup)((0,Qn.rawMarkup)(e))||t.report({message:iF,startIndex:e.blockStartPosition.start,endIndex:e.blockStartPosition.end})}function Pae(e,t,n){if(!Lae(n))return;if(e.message===Aae){Nae(e,t,n,xae);return}if(e.message!==Eae)return;let r=Cae(n);if(r){t.report({message:iF,startIndex:r.start,endIndex:r.end});return}let[i,s]=(0,Qn.resolveErrorLocation)(e,n);sF(n,i)||t.report({message:wae,startIndex:i,endIndex:s})}function Nae(e,t,n,r){let[i,s]=(0,Qn.resolveErrorLocation)(e,n);t.report({message:r,startIndex:i,endIndex:s})}function Cae(e){for(let t of(0,Qn.liquidTagBodies)(e)){let n=(0,Qn.liquidTagMarkup)(t.body);if(n?.tagName==="javascript"&&(n.remainingTokens.length>0||n.hasSkippedCharacters))return{start:t.start,end:t.end}}return null}function sF(e,t){for(let n of(0,Qn.liquidTagBodies)(e,t))if((0,Qn.liquidTagMarkup)(n.body)?.tagName==="endjavascript")return!0;return!1}function Lae(e){if((0,Qn.hasLiquidTagNamed)(e,"javascript")||(0,Qn.hasLiquidTagNamed)(e,"endjavascript"))return!0;for(let t of(0,Qn.liquidTagBodies)(e)){let n=(0,Qn.liquidTagMarkup)(t.body);if(n?.tagName==="javascript"||n?.tagName==="endjavascript")return!0}return!1}});var oF=x(oT=>{"use strict";p();Object.defineProperty(oT,"__esModule",{value:!0});oT.checkLayoutTag=qae;var aT=qe();function qae(e,t){if(typeof e.markup=="string"){t.report({message:"Syntax error in 'layout' tag",startIndex:e.position.start,endIndex:e.position.end});return}let n=e.markup;if((0,aT.hasBareArrayAccess)(n)){t.report({message:"Bare bracket access is not allowed in strict2 mode",startIndex:e.position.start,endIndex:e.position.end});return}(0,aT.hasSkippedCharacters)((0,aT.rawMarkup)(e))&&t.report({message:"Syntax error in 'layout' tag",startIndex:e.position.start,endIndex:e.position.end})}});var cF=x(cT=>{"use strict";p();Object.defineProperty(cT,"__esModule",{value:!0});cT.checkPaginateTag=Iae;var qc=qe();function Iae(e,t){if(typeof e.markup=="string"){if((0,qc.hasRubyAcceptedPaginateTrailingComma)(e.markup))return;t.report({message:"Syntax error in 'paginate' tag",startIndex:e.blockStartPosition.start,endIndex:e.blockStartPosition.end});return}let n=e.markup;if((0,qc.hasBareArrayAccess)(n.collection)||(0,qc.hasBareArrayAccess)(n.pageSize)||n.args.some(qc.argHasBareArrayAccess)){t.report({message:"Bare bracket access is not allowed",startIndex:e.blockStartPosition.start,endIndex:e.blockStartPosition.end});return}if((0,qc.hasSkippedPrefixCharacters)(e.source,e.markupPosition.start,n.position.start)){t.report({message:"Syntax error in 'paginate' tag",startIndex:e.blockStartPosition.start,endIndex:e.blockStartPosition.end});return}let r=e.source.slice(n.position.start,e.markupPosition.end);(0,qc.hasSkippedCharacters)(r)&&t.report({message:"Syntax error in 'paginate' tag",startIndex:e.blockStartPosition.start,endIndex:e.blockStartPosition.end})}});var fF=x(ty=>{"use strict";p();Object.defineProperty(ty,"__esModule",{value:!0});ty.checkPartialTag=Dae;ty.checkPartialParserError=jae;var Kl=qe(),uF="Syntax error in 'partial' tag",lF="Attempting to end parsing before LiquidTag 'partial' was closed",Mae="Unclosed block tag 'partial' in {% liquid %} block",Rae=new Set([lF,Mae,"Attempting to close LiquidTag 'partial' before it was opened without a matching 'partial'"]);function Dae(e,t){if(typeof e.markup=="string"){uT(e,t,uF);return}let n=e.markup;if(Bae(n.value)){uT(e,t,"Liquid syntax error: Error in tag 'partial' - Valid syntax: partial '[name]'");return}(0,Kl.hasSkippedCharacters)((0,Kl.rawMarkup)(e))&&uT(e,t,uF)}function jae(e,t,n){if(!Rae.has(e.message))return;let[r,i]=e.message.includes("Unclosed block tag 'partial' in {% liquid %} block")?(0,Kl.liquidLineTagLocation)(n,"partial")??(0,Kl.resolveErrorLocation)(e,n):(0,Kl.resolveErrorLocation)(e,n);t.report({message:e.message===lF?"Liquid syntax error: 'partial' tag was never closed":e.message,startIndex:r,endIndex:i})}function Bae(e){return e===""||e.includes("/")}function uT(e,t,n){t.report({message:n,startIndex:e.position.start,endIndex:e.position.end})}});var hF=x(ny=>{"use strict";p();Object.defineProperty(ny,"__esModule",{value:!0});ny.checkRawTag=Vae;ny.checkRawParserError=$ae;var lT=V1(),Yl=qe(),dF="Attempting to end parsing before LiquidRawTag 'raw' was closed",Fae=new Set([dF,lT.UNMATCHED_RAW_CLOSE_PARSER_ERROR,"Unclosed raw tag 'raw' in {% liquid %} block"]);function Vae(e,t){(e.markup!==""||(0,Yl.hasSkippedPrefixCharacters)(e.source,e.markupPosition.start,e.markupPosition.end)||(0,Yl.hasSkippedCharacters)((0,Yl.rawMarkup)(e)))&&t.report({message:"Syntax error in 'raw' tag",startIndex:e.markupPosition.start,endIndex:e.markupPosition.end})}function $ae(e,t,n){if(!Fae.has(e.message))return;let[r,i]=(0,Yl.resolveErrorLocation)(e,n);e.message===dF&&(0,Yl.hasRubyAcceptedRawTagCloserWithMarkup)(n,"raw",r)||e.message===lT.UNMATCHED_RAW_CLOSE_PARSER_ERROR&&(0,lT.hasRubyAcceptedInertCommentBodyCloser)(n,"raw",r)||t.report({message:e.message,startIndex:r,endIndex:i})}});var pF=x(fT=>{"use strict";p();Object.defineProperty(fT,"__esModule",{value:!0});fT.checkRenderTag=zae;var Uae=ue(),Ha=qe(),ry="Syntax error in 'render' tag",Hae="Bare bracket access is not allowed in strict2 mode";function zae(e,t){if(typeof e.markup=="string"){Ql(e,t,ry);return}let n=e.markup;if((0,Ha.hasUnclosedQuotedString)((0,Ha.rawMarkup)(e))){Ql(e,t,ry);return}if(Wae(n)){Ql(e,t,Hae);return}if((0,Ha.hasSkippedPrefixCharacters)(e.source,e.markupPosition.start,n.position.start)){Ql(e,t,ry);return}let r=e.source.slice(n.position.start,e.markupPosition.end);(0,Ha.hasSkippedCharacters)(r)&&Ql(e,t,ry)}function Wae(e){return e.snippet.type===Uae.NodeTypes.VariableLookup&&(0,Ha.hasBareArrayAccess)(e.snippet)||e.variable&&(0,Ha.hasBareArrayAccess)(e.variable.name)?!0:e.args.some(t=>(0,Ha.hasBareArrayAccess)(t.value))}function Ql(e,t,n){t.report({message:n,startIndex:e.position.start,endIndex:e.position.end})}});var mF=x(dT=>{"use strict";p();Object.defineProperty(dT,"__esModule",{value:!0});dT.checkSchemaTag=Gae;function Gae(e,t){e.markup!==""&&t.report({message:"Syntax error in 'schema' tag",startIndex:e.markupPosition.start,endIndex:e.markupPosition.end})}});var yF=x(hT=>{"use strict";p();Object.defineProperty(hT,"__esModule",{value:!0});hT.checkSectionsTag=Jae;var gF=qe();function Jae(e,t){if(typeof e.markup=="string"){t.report({message:"Syntax error in 'sections' tag",startIndex:e.position.start,endIndex:e.position.end});return}(0,gF.hasSkippedCharacters)((0,gF.rawMarkup)(e))&&t.report({message:"Syntax error in 'sections' tag",startIndex:e.position.start,endIndex:e.position.end})}});var _F=x(mT=>{"use strict";p();Object.defineProperty(mT,"__esModule",{value:!0});mT.checkSectionTag=Kae;var pT=qe();function Kae(e,t){if(typeof e.markup=="string"){t.report({message:"Syntax error in 'section' tag",startIndex:e.blockStartPosition.start,endIndex:e.blockStartPosition.end});return}if(e.markup.args.some(r=>r.value.type!=="BlockArrayLiteral"&&(0,pT.hasBareArrayAccess)(r.value))){t.report({message:"Bare bracket access is not allowed in strict2 mode",startIndex:e.blockStartPosition.start,endIndex:e.blockStartPosition.end});return}(0,pT.hasSkippedCharacters)((0,pT.rawMarkup)(e))&&t.report({message:"Syntax error in 'section' tag",startIndex:e.blockStartPosition.start,endIndex:e.blockStartPosition.end})}});var bF=x(gT=>{"use strict";p();Object.defineProperty(gT,"__esModule",{value:!0});gT.checkStyleTag=Yae;var vF=qe();function Yae(e,t){let n=(0,vF.rawMarkup)(e);(0,vF.hasEmptyMarkup)(n)||t.report({message:`'style' tag does not accept any arguments in "${n}"`,startIndex:e.blockStartPosition.start,endIndex:e.blockStartPosition.end})}});var kF=x(_T=>{"use strict";p();Object.defineProperty(_T,"__esModule",{value:!0});_T.checkStylesheetTag=Qae;var yT=qe();function Qae(e,t){let n=(0,yT.rawMarkup)(e);(0,yT.hasEmptyMarkup)(n)||(0,yT.hasSingleStringMarkup)(n,"scss")||t.report({message:`'stylesheet' tag can only accept the string argument 'scss' in "${n}"`,startIndex:e.blockStartPosition.start,endIndex:e.blockStartPosition.end})}});var SF=x(vT=>{"use strict";p();Object.defineProperty(vT,"__esModule",{value:!0});vT.checkTablerowTag=Xae;var Xl=qe();function Xae(e,t){if(typeof e.markup=="string"){if((0,Xl.hasRubyAcceptedLoopTrailingComma)(e.markup))return;t.report({message:"Syntax error in 'tablerow' tag",startIndex:e.position.start,endIndex:e.position.end});return}let n=e.markup;if((0,Xl.hasBareArrayAccess)(n.collection)||n.args.some(Xl.argHasBareArrayAccess)){t.report({message:"Bare bracket access is not allowed",startIndex:e.position.start,endIndex:e.position.end});return}if((0,Xl.hasSkippedPrefixCharacters)(e.source,e.markupPosition.start,n.position.start)){t.report({message:"Syntax error in 'tablerow' tag",startIndex:e.position.start,endIndex:e.position.end});return}let r=e.source.slice(n.position.start,e.markupPosition.end);(0,Xl.hasSkippedCharacters)(r)&&t.report({message:"Syntax error in 'tablerow' tag",startIndex:e.position.start,endIndex:e.position.end})}});var TF=x(bT=>{"use strict";p();Object.defineProperty(bT,"__esModule",{value:!0});bT.checkUnlessTag=Zae;var Zl=qe();function Zae(e,t){if(typeof e.markup=="string"){t.report({message:"Syntax error in 'unless' tag",startIndex:e.position.start,endIndex:e.position.end});return}let n=e.source,r=e.markup,i=(0,Zl.rawMarkup)(e);if((0,Zl.hasUnclosedQuotedString)(i)){t.report({message:"Syntax error in 'unless' tag",startIndex:e.position.start,endIndex:e.position.end});return}if((0,Zl.conditionalHasBareArrayAccess)(r)){t.report({message:"Bare bracket access is not allowed in strict2 mode",startIndex:e.position.start,endIndex:e.position.end});return}if((0,Zl.hasSkippedPrefixCharacters)(n,e.markupPosition.start,r.position.start)){t.report({message:"Syntax error in 'unless' tag",startIndex:e.position.start,endIndex:e.position.end});return}(0,Zl.hasSkippedCharacters)(n.slice(r.position.start,e.markupPosition.end))&&t.report({message:"Syntax error in 'unless' tag",startIndex:e.position.start,endIndex:e.position.end})}});var wF=x(kT=>{"use strict";p();Object.defineProperty(kT,"__esModule",{value:!0});kT.checkVariableOutput=eoe;var as=qe();function eoe(e,t){let n=e.source.slice(e.markupPosition.start,e.markupPosition.end);if(typeof e.markup=="string"){if((0,as.hasEmptyMarkup)(n)||(0,as.hasRubyAcceptedEmptyFirstFilterArgument)(e.markup)||(0,as.hasRubyAcceptedFilterArgumentTrailingComma)(e.markup))return;t.report({message:"Syntax error in variable output",startIndex:e.position.start,endIndex:e.position.end});return}let r=e.markup;if(!(0,as.hasRubyAcceptedEmptyFirstFilterArgument)(n)&&!(0,as.hasRubyAcceptedFilterArgumentTrailingComma)(n)){if((0,as.hasUnclosedQuotedString)(n)){t.report({message:"Syntax error in variable output",startIndex:e.position.start,endIndex:e.position.end});return}if((0,as.variableHasBareArrayAccess)(r)){t.report({message:"Bare bracket access is not allowed in strict2 mode",startIndex:e.position.start,endIndex:e.position.end});return}(0,as.hasSkippedCharacters)(n)&&t.report({message:"Syntax error in variable output",startIndex:e.position.start,endIndex:e.position.end})}}});var LF=x(sy=>{"use strict";p();Object.defineProperty(sy,"__esModule",{value:!0});sy.LiquidSyntaxError=void 0;var xF=J(),toe=NB(),noe=IB(),iy=MB(),EF=ja(),roe=RB(),ioe=DB(),AF=V1(),soe=UB(),aoe=HB(),ooe=zB(),OF=JB(),coe=KB(),uoe=QB(),loe=XB(),foe=ZB(),doe=eF(),hoe=tF(),poe=rF(),PF=aF(),moe=oF(),goe=cF(),NF=fF(),CF=hF(),yoe=pF(),_oe=mF(),voe=yF(),boe=_F(),koe=bF(),Soe=kF(),Toe=SF(),woe=TF(),xoe=wF(),ST=(e,t)=>{},Eoe={"#":poe.checkInlineCommentTag,assign:toe.checkAssignTag,block:EF.checkBlockTag,break:ST,capture:roe.checkCaptureTag,case:ioe.checkCaseTag,continue:ST,content_for:soe.checkContentForTag,cycle:aoe.checkCycleTag,decrement:ooe.checkDecrementTag,echo:coe.checkEchoTag,form:uoe.checkFormTag,for:loe.checkForTag,tablerow:Toe.checkTablerowTag,if:foe.checkIfTag,ifchanged:ST,include:doe.checkIncludeTag,increment:hoe.checkIncrementTag,layout:moe.checkLayoutTag,paginate:goe.checkPaginateTag,partial:NF.checkPartialTag,render:yoe.checkRenderTag,section:boe.checkSectionTag,sections:voe.checkSectionsTag,unless:woe.checkUnlessTag},Aoe={else:iy.checkMisplacedBranchTag,elsif:iy.checkMisplacedBranchTag,when:iy.checkMisplacedBranchTag},Ooe={comment:AF.checkCommentRawTag,doc:OF.checkDocTag,javascript:PF.checkJavascriptTag,schema:_oe.checkSchemaTag,style:koe.checkStyleTag,stylesheet:Soe.checkStylesheetTag,raw:CF.checkRawTag};sy.LiquidSyntaxError={meta:{code:"LiquidSyntaxError",name:"LiquidSyntaxError",docs:{description:"Reports Liquid syntax errors.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/liquid-syntax-error"},type:xF.SourceCodeType.LiquidHtml,severity:xF.Severity.ERROR,schema:{},targets:[]},create(e){if(e.file.ast instanceof Error){let t=e.file.ast;return{async onCodePathStart(n){(0,AF.checkCommentTag)(t,e,n.source),(0,EF.checkBlockParserError)(t,e,n.source),(0,OF.checkDocParserError)(t,e,n.source),(0,NF.checkPartialParserError)(t,e,n.source),(0,CF.checkRawParserError)(t,e,n.source),(0,PF.checkJavascriptParserError)(t,e,n.source)}}}return{async LiquidRawTag(t){let n=Ooe[t.name];n&&n(t,e)},async LiquidTag(t){let n=Eoe[t.name]??Aoe[t.name];if(n){n(t,e);return}await(0,noe.checkBaseTag)(t,e)},async LiquidBranch(t){(0,iy.checkBranchTag)(t,e)},async LiquidVariableOutput(t){(0,xoe.checkVariableOutput)(t,e)}}}}});var DF=x(os=>{"use strict";p();Object.defineProperty(os,"__esModule",{value:!0});os.MaxFileSizeJSON=os.MaxFileSize=void 0;var TT=J(),Xn=1024,ef=1024*Xn,qF="_drafts",MF="full-file-bytes",vr="schemaless-bytes",RF={assets:{bytes:20*ef,measurement:MF},locales:{bytes:1.5*ef,measurement:vr},"config/settings_data.json":{bytes:1.5*ef,measurement:vr},"config/settings_schema.json":{bytes:512*Xn,measurement:vr},"templates/*.json":{bytes:512*Xn,measurement:vr},"sections/*.json":{bytes:512*Xn,measurement:vr},blocks:{bytes:256*Xn,measurement:vr},config:{bytes:256*Xn,measurement:vr},layout:{bytes:256*Xn,measurement:vr},snippets:{bytes:256*Xn,measurement:vr},templates:{bytes:256*Xn,measurement:vr},sections:{bytes:256*Xn,measurement:vr}},Poe=Object.keys(RF),Noe=/{%-?\s*schema\s*-?%}[\s\S]*?{%-?\s*endschema\s*-?%}/g;os.MaxFileSize={meta:{code:"MaxFileSize",name:"MaxFileSize",docs:{description:"Reports theme files that exceed Shopify's maximum file size.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/max-file-size"},type:TT.SourceCodeType.LiquidHtml,severity:TT.Severity.ERROR,schema:{},targets:[]},create(e){return{async onCodePathStart(){let t=Coe(e.toRelativePath(e.file.uri));if(!t)return;let n=Moe(e.file.source,t.measurement);n<=t.bytes||e.report({message:`Theme file is too large. It is ${IF(n)} but the limit is ${IF(t.bytes)}.`,startIndex:0,endIndex:e.file.source.length})}}}};function Coe(e){if(e===qF||e.startsWith(`${qF}/`))return;let t=Loe(e);if(t)return RF[t]}function Loe(e){return Poe.find(t=>{if(t.endsWith("*.json")){let[n,r]=t.split("*");return Ioe(e,n)&&e.toLowerCase().endsWith(r)}return qoe(e,t)})}function qoe(e,t){return e===t||e.startsWith(`${t}/`)||e.endsWith(`/${t}`)||e.includes(`/${t}/`)}function Ioe(e,t){return e.startsWith(t)||e.includes(`/${t}`)}function Moe(e,t){if(t===MF)return Buffer.byteLength(e);let n=[...e.matchAll(Noe)].reduce((r,i)=>r+Buffer.byteLength(i[0]),0);return Buffer.byteLength(e)-n}function IF(e){return e%ef===0?`${e/ef} MB`:e%Xn===0?`${e/Xn} KB`:`${e} bytes`}os.MaxFileSizeJSON={...os.MaxFileSize,meta:{...os.MaxFileSize.meta,type:TT.SourceCodeType.JSON}}});var BF=x(ay=>{"use strict";p();Object.defineProperty(ay,"__esModule",{value:!0});ay.MissingBlockArguments=void 0;var Roe=hi(),jF=J(),Doe=ja();ay.MissingBlockArguments={meta:{code:"MissingBlockArguments",name:"Missing Block Arguments",docs:{description:"Reports required LiquidDoc parameters not provided to a block tag.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/missing-block-arguments"},type:jF.SourceCodeType.LiquidHtml,severity:jF.Severity.WARNING,schema:{},targets:[]},create(e){return{async LiquidTag(t){if(t.name!=="block"||(0,Doe.blockTagSyntaxError)(t))return;let n=t.markup,r=await e.getBlockParameters(n.name.value);if(!r)return;let i=new Set(n.args.map(s=>s.name));t.children?.length&&i.add(Roe.BLOCK_CONTENT_PARAMETER);for(let s of r.values())!s.required||i.has(s.name)||e.report({message:`Missing required argument '${s.name}' in block tag for '${n.name.value}'.`,startIndex:t.blockStartPosition.start,endIndex:t.blockStartPosition.end})}}}}});var VF=x(oy=>{"use strict";p();Object.defineProperty(oy,"__esModule",{value:!0});oy.UnrecognizedBlockArguments=void 0;var FF=J(),joe=ja();oy.UnrecognizedBlockArguments={meta:{code:"UnrecognizedBlockArguments",name:"Unrecognized Block Arguments",docs:{description:"Reports arguments in a block tag that are not part of the block's merged schema, LiquidDoc, and content interface.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/unrecognized-block-arguments"},type:FF.SourceCodeType.LiquidHtml,severity:FF.Severity.WARNING,schema:{},targets:[]},create(e){return{async LiquidTag(t){if(t.name!=="block"||(0,joe.blockTagSyntaxError)(t))return;let n=t.markup,r=await e.getBlockParameters(n.name.value);if(r)for(let i of n.args)i.name==="block.name"||r.has(i.name)||e.report({message:`Unknown argument '${i.name}' in block tag for '${n.name.value}'.`,startIndex:i.position.start,endIndex:i.position.end})}}}}});var HF=x(zr=>{"use strict";p();var Boe=zr&&zr.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Foe=zr&&zr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Voe=zr&&zr.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&Boe(n,t,r[i]);return Foe(n,t),n}})();Object.defineProperty(zr,"__esModule",{value:!0});zr.ValidBlockArgumentTypes=void 0;var wT=hi(),$oe=Kn(),cs=Qi(),Uoe=Voe(Fn()),Hoe=Le(),$F=J(),zoe=ja(),Woe=ue();zr.ValidBlockArgumentTypes={meta:{code:"ValidBlockArgumentTypes",name:"Valid Block Argument Types",docs:{description:"Reports type mismatches in block arguments and declarations from schema, LiquidDoc, and built-in content.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-block-argument-types"},type:$F.SourceCodeType.LiquidHtml,severity:$F.Severity.WARNING,schema:{},targets:[]},create(e){let t=(0,Hoe.isBlock)(e.file.uri)?Uoe.basename(e.file.uri,".liquid"):void 0,n;return{async LiquidTag(r){if(r.name!=="block"||(0,zoe.blockTagSyntaxError)(r))return;let i=r.markup,s=await e.getBlockParameters(i.name.value);if(s)for(let a of i.args){let o=s.get(a.name)?.type;if(o&&(0,cs.parseStringLiterals)(o)){Joe(e,a,o);continue}let c=UF(a.value);!o||!c||Goe(o,c)||e.report({message:`Type mismatch for argument '${a.name}': expected ${o}, got ${c}`,startIndex:a.value.position.start,endIndex:a.value.position.end})}},async LiquidDocParamNode(r){if(!t)return;n??=e.getBlockParameters(t);let i=(await n)?.get(r.paramName.value);i&&Koe(e,r,i)}}}};function UF(e){if(e.type===Woe.NodeTypes.VariableLookup)return;if(e.type!=="BlockArrayLiteral")return(0,cs.inferArgumentType)(e);let t=new Set(e.elements.map(UF));if(!(t.size===0||t.has(void 0)))return t.size===1?`${[...t][0]}[]`:"mixed[]"}function Goe(e,t){return e===cs.BasicParamTypes.Object?!0:t===cs.BasicParamTypes.Object||t.endsWith("[]")?e===t:(0,cs.isTypeCompatible)(e,t)}function Joe(e,t,n){if((0,cs.checkArgumentType)(n,t.value).kind!=="incompatible")return;let{start:r,end:i}=t.value.position;e.report({message:(0,cs.getArgumentTypeMismatchMessage)(t.name,n,t.value),startIndex:r,endIndex:i,suggest:(0,$oe.generateTypeMismatchSuggestions)(n,r,i)})}function Koe(e,t,n){let r=(0,wT.liquidDocType)(t.paramType?.value),i=Qoe(n);if(!t.paramType||!r||!i||r===cs.BasicParamTypes.Object||r===i)return;let s=Yoe(n);e.report({message:`The ${s} '${n.name}' has Liquid type '${i}', but LiquidDoc declares '${r}'. The ${s} type is authoritative.`,startIndex:t.paramType.position.start-1,endIndex:t.paramType.position.end+1})}function Yoe(e){return e.name===wT.BLOCK_CONTENT_PARAMETER?"built-in parameter":"schema setting"}function Qoe(e){if(!(!e.schemaSetting&&e.name!==wT.BLOCK_CONTENT_PARAMETER))return e.type}});var WF=x(Wr=>{"use strict";p();var Xoe=Wr&&Wr.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Zoe=Wr&&Wr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),ece=Wr&&Wr.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&Xoe(n,t,r[i]);return Zoe(n,t),n}})();Object.defineProperty(Wr,"__esModule",{value:!0});Wr.ValidBlockContentSettingType=void 0;var tce=hi(),nce=Be(),rce=ece(Fn()),ice=Kh(),sce=Le(),zF=J(),ace=Ne();Wr.ValidBlockContentSettingType={meta:{code:"ValidBlockContentSettingType",name:"Valid Block Content Setting Type",docs:{description:"Reports a theme block schema setting named 'content' whose Liquid type is not the built-in 'content' parameter's 'string' type.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-block-content-setting-type"},type:zF.SourceCodeType.LiquidHtml,severity:zF.Severity.ERROR,schema:{},targets:[]},create(e){if(!(0,sce.isBlock)(e.file.uri))return{};let t=rce.basename(e.file.uri,".liquid");return{async LiquidRawTag(n){n.name!=="schema"||n.body.kind!=="json"||e.getBlockSchema&&oce(e,await e.getBlockSchema(t))}}}};function oce(e,t){if(!t||t.validSchema instanceof Error||t.ast instanceof Error)return;let n=t.validSchema.settings??[],r=n.findIndex(a=>a.id===tce.BLOCK_CONTENT_PARAMETER);if(r<0)return;let i=(0,ice.schemaSettingLiquidType)(n[r].type),s=(0,nce.nodeAtPath)(t.ast,["settings",r,"type"]);!i||i==="string"||!s||(0,ace.reportWarning)(`Schema setting 'content' has Liquid type '${i}', but the built-in 'content' parameter has type 'string'.`,t.offset,s,e)}});var JF=x(cy=>{"use strict";p();Object.defineProperty(cy,"__esModule",{value:!0});cy.ValidBlockTagPlacement=void 0;var GF=J(),cce=ja(),uce=/^templates\/(?:[^/]+\/)*[^/]+\.liquid$/,lce=/^layout\/[^/]+\.liquid$/,fce="The 'block' tag can only be used in templates/**/*.liquid and layout/*.liquid.";cy.ValidBlockTagPlacement={meta:{code:"ValidBlockTagPlacement",name:"Valid Block Tag Placement",docs:{description:"Reports uses of the 'block' tag outside Liquid templates and layouts.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-block-tag-placement"},type:GF.SourceCodeType.LiquidHtml,severity:GF.Severity.ERROR,schema:{},targets:[]},create(e){let t=e.toRelativePath(e.file.uri),n=uce.test(t)||lce.test(t);return{async LiquidTag(r){r.name!=="block"||(0,cce.blockTagSyntaxError)(r)||n||e.report({message:fce,startIndex:r.position.start,endIndex:r.position.end})}}}}});var tV=x(za=>{"use strict";p();Object.defineProperty(za,"__esModule",{value:!0});za.recommended=za.allChecks=void 0;var dce=J(),hce=UM(),pce=WM(),mce=GM(),gce=JM(),yce=YM(),_ce=XM(),vce=nR(),bce=iR(),kce=oR(),Sce=uR(),Tce=fR(),wce=_R(),xce=wR(),Ece=AR(),Ace=PR(),Oce=CR(),Pce=jR(),Nce=VR(),Cce=UR(),Lce=JR(),qce=YR(),Ice=tD(),Mce=rD(),Rce=sD(),Dce=cD(),jce=FD(),Bce=UD(),Fce=zD(),Vce=GD(),$ce=KD(),Uce=YD(),Hce=XD(),zce=t2(),Wce=a2(),Gce=u2(),Jce=f2(),Kce=m2(),Yce=y2(),Qce=v2(),Xce=k2(),Zce=T2(),eue=P2(),tue=B2(),nue=V2(),rue=H2(),iue=W2(),sue=J2(),aue=Y2(),oue=ej(),cue=nj(),uue=ij(),lue=sj(),fue=oj(),due=uj(),hue=dj(),pue=mj(),mue=yj(),gue=vj(),yue=Sj(),_ue=Aj(),vue=Pj(),KF=Lj(),YF=jj(),bue=Fj(),kue=Uj(),Sue=Wj(),QF=Qj(),XF=tB(),Tue=oB(),wue=uB(),ZF=fB(),xue=hB(),Eue=pB(),Aue=mB(),Ic=yB(),Oue=vB(),Pue=xB(),Nue=EB(),Cue=AB(),Lue=PB(),que=LF(),eV=DF(),Iue=BF(),Mue=VF(),Rue=HF(),Due=WF(),jue=JF();za.allChecks=[hce.AppBlockValidTags,pce.AssetPreload,mce.AssetSizeAppBlockCSS,gce.AssetSizeAppBlockJavaScript,yce.AssetSizeCSS,_ce.AssetSizeJavaScript,vce.BlockIdUsage,bce.CdnPreconnect,kce.ContentForHeaderModification,Sce.DeprecateBgsizes,Tce.DeprecateLazysizes,wce.DeprecatedFilter,xce.DeprecatedFontsOnSectionsAndBlocks,Ece.DeprecatedFontsOnSettingsData,Ace.DeprecatedFontsOnSettingsSchema,Oce.DeprecatedTag,Nce.DuplicateContentForArguments,Pce.DuplicateRenderSnippetArguments,Cce.EmptyBlockContent,Lce.HardcodedRoutes,qce.ImgWidthAndHeight,Ice.JSONMissingBlock,Mce.JSONMissingSection,Rce.JSONSyntaxError,Dce.LiquidFreeSettings,jce.LiquidHTMLSyntaxError,Bce.MatchingTranslations,Fce.MissingAsset,Vce.MissingContentForArguments,$ce.MissingRenderSnippetArguments,Uce.MissingTemplate,uue.UnsupportedFilterArguments,Eue.AppBlockMissingSchema,Hce.OrphanedSnippet,zce.PaginationSize,Wce.ParserBlockingScript,Gce.SchemaPresetsBlockOrder,Jce.SchemaPresetsStaticBlocks,Kce.RemoteAsset,Yce.RequiredLayoutThemeObject,Qce.ReservedDocParamNames,Xce.StaticStylesheetAndJavascriptTags,Zce.TranslationKeyExists,eue.UnclosedHTMLElement,tue.UndefinedObject,nue.UniqueDocParamNames,Aue.UniqueSettingIds,rue.UniqueStaticBlockId,iue.UnknownFilter,sue.UnrecognizedContentForArguments,aue.UnrecognizedRenderSnippetArguments,cue.UnsupportedDocTag,oue.UnusedAssign,lue.UnusedDocParam,hue.ValidBlockTarget,mue.ValidHTMLTranslation,fue.ValidContentForArguments,due.ValidContentForArgumentTypes,pue.ValidScopedCSSClass,gue.ValidJSON,yue.ValidDocParamTypes,_ue.ValidLocalBlocks,KF.ValidRangeDefault,KF.ValidRangeDefaultSettingsSchema,YF.ValidRangeStepCount,YF.ValidRangeStepCountSettingsSchema,vue.ValidRenderSnippetArgumentTypes,bue.ValidSchema,QF.ValidSelectDefault,QF.ValidSelectDefaultSettingsSchema,XF.ValidSettingsKey,XF.ValidSettingsKeyJSON,Tue.ValidStandardEventData,wue.ValidStaticBlockType,ZF.ValidVisibleIf,ZF.ValidVisibleIfSettingsSchema,xue.VariableName,kue.ValidSchemaName,Sue.ValidSchemaTranslations,Ic.JavascriptOncePerFile,Ic.JavascriptTagInWrongFile,Ic.SchemaOncePerFile,Ic.SchemaSectionOrBlockOnly,Ic.StylesheetOncePerFile,Ic.StylesheetTagInWrongFile,Oue.BlockContentUsage,Pue.DuplicateBlockArguments,Nue.ExcessiveSettingsCount,Cue.LiquidComplexity,Lue.LiquidNestingDepth,que.LiquidSyntaxError,eV.MaxFileSize,eV.MaxFileSizeJSON,Iue.MissingBlockArguments,Mue.UnrecognizedBlockArguments,Rue.ValidBlockArgumentTypes,Due.ValidBlockContentSettingType,jue.ValidBlockTagPlacement];za.recommended=za.allChecks.filter(e=>{let t=e.meta.docs.recommended,n=!e.meta.targets||!e.meta.targets.length||e.meta.targets.includes(dce.ConfigTarget.Recommended);return t&&n})});var sV=x(wi=>{"use strict";p();var Bue=wi&&wi.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Fue=wi&&wi.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Vue=wi&&wi.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&Bue(n,t,r[i]);return Fue(n,t),n}})();Object.defineProperty(wi,"__esModule",{value:!0});wi.findRoot=iV;var Ln=Vue(Fn());async function $ue(e,t){return Uue(t(Ln.join(e,"shopify.extension.toml")),t(Ln.join(e,".theme-check.yml")),nV(t(Ln.join(e,".git")),t(Ln.join(e,"assets")),t(Ln.join(e,"snippets"))),nV(t(Ln.join(e,"assets")),t(Ln.join(e,"snippets")),rV(t(Ln.join(Ln.dirname(e),".theme-check.yml"))),rV(t(Ln.join(Ln.dirname(Ln.dirname(e)),".theme-check.yml")))))}async function nV(...e){return(await Promise.all(e)).reduce((n,r)=>n&&r,!0)}async function Uue(...e){return(await Promise.all(e)).reduce((n,r)=>n||r,!1)}async function rV(e){return!await e}async function iV(e,t){if(await $ue(e,t))return e;let r=Ln.dirname(e);return r===e?null:iV(r,t)}});var uy=x(xT=>{"use strict";p();Object.defineProperty(xT,"__esModule",{value:!0});xT.flattenFixes=aV;function aV(e){return Array.isArray(e)?e.flatMap(aV):[e]}});var cV=x(ly=>{"use strict";p();Object.defineProperty(ly,"__esModule",{value:!0});ly.JSONCorrector=void 0;var oV=YE();function Hue(e,t){switch(t.type){case"add":return(0,oV.set)(e,t.path,t.value);case"remove":return(0,oV.unset)(e,t.path),e}}var ET=class{source;patches=[];constructor(t){this.source=t}get fix(){if(this.patches.length===0)return[];let t=this.patches.reduce(Hue,JSON.parse(this.source));return{startIndex:0,endIndex:this.source.length,insert:JSON.stringify(t,null,2)}}add(t,n){this.patches.push({type:"add",path:t,value:n})}replace(t,n){this.patches.push({type:"remove",path:t},{type:"add",path:t,value:n})}remove(t){this.patches.push({type:"remove",path:t})}};ly.JSONCorrector=ET});var uV=x(fy=>{"use strict";p();Object.defineProperty(fy,"__esModule",{value:!0});fy.StringCorrector=void 0;var AT=class{source;fix=[];constructor(t){this.source=t}insert(t,n){this.fix.push({startIndex:t,endIndex:t,insert:n})}replace(t,n,r){this.fix.push({startIndex:t,endIndex:n,insert:r})}remove(t,n){this.fix.push({startIndex:t,endIndex:n,insert:""})}};fy.StringCorrector=AT});var OT=x(Wa=>{"use strict";p();Object.defineProperty(Wa,"__esModule",{value:!0});Wa.StringCorrector=Wa.JSONCorrector=void 0;Wa.createCorrector=zue;var lV=J(),fV=cV();Object.defineProperty(Wa,"JSONCorrector",{enumerable:!0,get:function(){return fV.JSONCorrector}});var dV=uV();Object.defineProperty(Wa,"StringCorrector",{enumerable:!0,get:function(){return dV.StringCorrector}});function zue(e,t){switch(e){case lV.SourceCodeType.JSON:return new fV.JSONCorrector(t);case lV.SourceCodeType.LiquidHtml:return new dV.StringCorrector(t);default:return Wue(e)}}function Wue(e){throw new Error(`Case statement not exhausted: ${e}`)}});var hV=x(PT=>{"use strict";p();Object.defineProperty(PT,"__esModule",{value:!0});PT.autofix=Kue;var Gue=OT(),Jue=uy();async function Kue(e,t,n){let r=t.filter(s=>"fix"in s&&!!s.fix),i=[];for(let s of e){let a=r.filter(c=>c.uri===s.uri);if(a.length===0)continue;let o=(0,Gue.createCorrector)(s.type,s.source);for(let c of a)c.fix(o);i.push(n(s,(0,Jue.flattenFixes)(o.fix)))}await Promise.all(i)}});var pV=x(NT=>{"use strict";p();Object.defineProperty(NT,"__esModule",{value:!0});NT.applyFixToString=Que;var Yue=uy();function Que(e,t){let n=e,r=0,i=(0,Yue.flattenFixes)(t).sort((s,a)=>s.startIndex-a.startIndex);for(let s=0;s<i.length-1;s++){let a=i[s],o=i[s+1];if(a.endIndex>o.startIndex)throw new Error("Overlapping ranges are not allowed")}for(let s of i){let a=s.startIndex+r,o=s.endIndex+r;if(a<0||a>n.length||o<a||o>n.length)throw new Error("Fix description is going overboard");n=n.slice(0,a)+s.insert+n.slice(o),r+=s.insert.length-(o-a)}return n}});var mV=x(fn=>{"use strict";p();Object.defineProperty(fn,"__esModule",{value:!0});fn.applyFixToString=fn.autofix=fn.createCorrector=fn.JSONCorrector=fn.StringCorrector=fn.flattenFixes=void 0;var Xue=uy();Object.defineProperty(fn,"flattenFixes",{enumerable:!0,get:function(){return Xue.flattenFixes}});var CT=OT();Object.defineProperty(fn,"StringCorrector",{enumerable:!0,get:function(){return CT.StringCorrector}});Object.defineProperty(fn,"JSONCorrector",{enumerable:!0,get:function(){return CT.JSONCorrector}});Object.defineProperty(fn,"createCorrector",{enumerable:!0,get:function(){return CT.createCorrector}});var Zue=hV();Object.defineProperty(fn,"autofix",{enumerable:!0,get:function(){return Zue.autofix}});var ele=pV();Object.defineProperty(fn,"applyFixToString",{enumerable:!0,get:function(){return ele.applyFixToString}})});var Yt=x(pe=>{"use strict";p();var SV=pe&&pe.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),tle=pe&&pe.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),TV=pe&&pe.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&SV(n,t,r[i]);return tle(n,t),n}})(),ct=pe&&pe.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&SV(t,e,n)};Object.defineProperty(pe,"__esModule",{value:!0});pe.schemaSettingLiquidType=pe.getBlockName=pe.toRemoteAssetUrl=pe.isPublicIpAddress=pe.getFileSize=pe.path=pe.resolveBlockParameters=pe.makeGetBlockParameters=pe.BLOCK_CONTENT_PARAMETER=void 0;pe.check=fle;var nle=$0(),rle=hi(),ile=Ek(),Ga=Cp(),sle=oM(),gV=Xk(),yV=TV(Fn()),LT=J(),_V=Ne(),ale=bn(),wV=$M();ct(Ak(),pe);ct($0(),pe);var qT=hi();Object.defineProperty(pe,"BLOCK_CONTENT_PARAMETER",{enumerable:!0,get:function(){return qT.BLOCK_CONTENT_PARAMETER}});Object.defineProperty(pe,"makeGetBlockParameters",{enumerable:!0,get:function(){return qT.makeGetBlockParameters}});Object.defineProperty(pe,"resolveBlockParameters",{enumerable:!0,get:function(){return qT.resolveBlockParameters}});ct(tV(),pe);ct(Cp(),pe);ct(sV(),pe);ct(mV(),pe);ct(Xk(),pe);ct(Be(),pe);ct(Ek(),pe);pe.path=TV(Fn());ct(Le(),pe);ct(Xo(),pe);ct(J(),pe);ct(id(),pe);var ole=bn();Object.defineProperty(pe,"getFileSize",{enumerable:!0,get:function(){return ole.getFileSize}});var xV=pv();Object.defineProperty(pe,"isPublicIpAddress",{enumerable:!0,get:function(){return xV.isPublicIpAddress}});Object.defineProperty(pe,"toRemoteAssetUrl",{enumerable:!0,get:function(){return xV.toRemoteAssetUrl}});ct(K_(),pe);ct(G_(),pe);ct(z_(),pe);ct(F_(),pe);ct(Fh(),pe);ct(dl(),pe);ct(Nr(),pe);ct(zS(),pe);var cle=Kn();Object.defineProperty(pe,"getBlockName",{enumerable:!0,get:function(){return cle.getBlockName}});ct(Qi(),pe);var ule=Kh();Object.defineProperty(pe,"schemaSettingLiquidType",{enumerable:!0,get:function(){return ule.schemaSettingLiquidType}});var lle=e=>{};async function fle(e,t,n){let r=[],i=[],{fs:s}=n,{rootUri:a}=t,o={...n,getBlockParameters:(0,rle.makeGetBlockParameters)(n),mode:t.context,fileExists:(0,Ga.makeFileExists)(s),fileSize:(0,Ga.makeFileSize)(s),remoteFileSize:n.remoteFileSize??ale.getFileSize,getDefaultLocale:(0,Ga.makeGetDefaultLocale)(s,a),getDefaultTranslations:(0,Ga.makeGetDefaultTranslations)(s,e,a),getDefaultSchemaLocale:(0,Ga.makeGetDefaultSchemaLocale)(s,a),getDefaultSchemaTranslations:(0,Ga.makeGetDefaultSchemaTranslations)(s,e,a),getMetafieldDefinitions:n.getMetafieldDefinitions??(0,Ga.makeGetMetafieldDefinitions)(s)},{DisabledChecksVisitor:c,isDisabled:l}=(0,sle.createDisabledChecksModule)(),h=(await ile.JSONValidator.create(o.jsonValidationSet,t))?.validate;o.themeDocset&&!o.themeDocset.isAugmented&&(o.themeDocset=new nle.AugmentedThemeDocset(o.themeDocset));for(let g of Object.values(LT.SourceCodeType))switch(g){case LT.SourceCodeType.JSON:{let v=kV(g,e),b=vV(g,t.checks);for(let _ of v)for(let k of b){if((0,gV.isIgnored)(_.uri,t,k))continue;let T=bV(k,_,t,i,o,h);r.push(ple(T,_))}break}case LT.SourceCodeType.LiquidHtml:{let v=kV(g,e),b=[c,...vV(g,t.checks)];for(let _ of v){let k=[];for(let T of b)(0,gV.isIgnored)(_.uri,t,T)||k.push(bV(T,_,t,i,o,h));r.push(...mle(k,_))}break}}let d=t.onError||lle;return await Promise.all(r.map(g=>g.catch(d))),i.filter(g=>!l(g))}function dle(e,t,n,r,i,s){let a=r.settings[e.meta.code];return{...i,validateJSON:s,settings:hle(a,e.meta.schema),toUri:o=>yV.join(r.rootUri,...o.split("/")),toRelativePath:o=>yV.relative(o,r.rootUri),report(o){n.push({type:e.meta.type,check:e.meta.code,message:o.message,uri:t.uri,severity:a?.severity??e.meta.severity,start:(0,_V.getPosition)(t.source,o.startIndex),end:(0,_V.getPosition)(t.source,o.endIndex),fix:o.fix,suggest:o.suggest})},file:t}}function hle(e,t){let n={};for(let[r,i]of Object.entries(t))n[r]=e?.[r]??i.defaultValue();return n}function vV(e,t){return t.filter(n=>n.meta.type===e)}function bV(e,t,n,r,i,s){let a=dle(e,t,r,n,i,s);return e.create(a)}function kV(e,t){return t.filter(n=>n.type===e)}async function ple(e,t){e.onCodePathStart&&await e.onCodePathStart(t),!(t.ast instanceof Error)&&(Object.keys(e).length>0&&await(0,wV.visitJSON)(t.ast,e),e.onCodePathEnd&&await e.onCodePathEnd(t))}function mle(e,t){if(e.length===0)return[];let n=e.map(()=>[]),r=new Map,i=new Map,s=(a,...o)=>{let c=i.get(a);if(!c){c=[];for(let[l,f]of e.entries())try{f[a]&&c.push(l)}catch(h){r.has(l)||r.set(l,h)}i.set(a,c)}for(let l of c)n[l].push([a,o])};return s("onCodePathStart",t),t.ast instanceof Error||((0,wV.visitLiquid)(t.ast,s),s("onCodePathEnd",t)),e.map(async(a,o)=>{if(r.has(o))throw r.get(o);for(let[c,l]of n[o])await a[c](...l)})}});var AV=x((dy,EV)=>{p();(function(e,t){typeof dy=="object"&&typeof EV<"u"?t(dy):typeof define=="function"&&define.amd?define(["exports"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.acorn={}))})(dy,(function(e){"use strict";var t=[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],n=[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],r="\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",i="\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"},c=/^in(stanceof)?$/,l=new RegExp("["+i+"]"),f=new RegExp("["+i+r+"]");function h(u,m){for(var S=65536,E=0;E<m.length;E+=2){if(S+=m[E],S>u)return!1;if(S+=m[E+1],S>=u)return!0}return!1}function d(u,m){return u<65?u===36:u<91?!0:u<97?u===95:u<123?!0:u<=65535?u>=170&&l.test(String.fromCharCode(u)):m===!1?!1:h(u,n)}function g(u,m){return u<48?u===36:u<58?!0:u<65?!1:u<91?!0:u<97?u===95:u<123?!0:u<=65535?u>=170&&f.test(String.fromCharCode(u)):m===!1?!1:h(u,n)||h(u,t)}var v=function(m,S){S===void 0&&(S={}),this.label=m,this.keyword=S.keyword,this.beforeExpr=!!S.beforeExpr,this.startsExpr=!!S.startsExpr,this.isLoop=!!S.isLoop,this.isAssign=!!S.isAssign,this.prefix=!!S.prefix,this.postfix=!!S.postfix,this.binop=S.binop||null,this.updateContext=null};function b(u,m){return new v(u,{beforeExpr:!0,binop:m})}var _={beforeExpr:!0},k={startsExpr:!0},T={};function w(u,m){return m===void 0&&(m={}),m.keyword=u,T[u]=new v(u,m)}var y={num:new v("num",k),regexp:new v("regexp",k),string:new v("string",k),name:new v("name",k),privateId:new v("privateId",k),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(",",_),semi:new v(";",_),colon:new v(":",_),dot:new v("."),question:new v("?",_),questionDot:new v("?."),arrow:new v("=>",_),template:new v("template"),invalidTemplate:new v("invalidTemplate"),ellipsis:new v("...",_),backQuote:new v("`",k),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:b("||",1),logicalAND:b("&&",2),bitwiseOR:b("|",3),bitwiseXOR:b("^",4),bitwiseAND:b("&",5),equality:b("==/!=/===/!==",6),relational:b("</>/<=/>=",7),bitShift:b("<</>>/>>>",8),plusMin:new v("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:b("%",10),star:b("*",10),slash:b("/",10),starstar:new v("**",{beforeExpr:!0}),coalesce:b("??",1),_break:w("break"),_case:w("case",_),_catch:w("catch"),_continue:w("continue"),_debugger:w("debugger"),_default:w("default",_),_do:w("do",{isLoop:!0,beforeExpr:!0}),_else:w("else",_),_finally:w("finally"),_for:w("for",{isLoop:!0}),_function:w("function",k),_if:w("if"),_return:w("return",_),_switch:w("switch"),_throw:w("throw",_),_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",k),_super:w("super",k),_class:w("class",k),_extends:w("extends",_),_export:w("export"),_import:w("import",k),_null:w("null",k),_true:w("true",k),_false:w("false",k),_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/,P=new RegExp(A.source,"g");function O(u){return u===10||u===13||u===8232||u===8233}function L(u,m,S){S===void 0&&(S=u.length);for(var E=m;E<S;E++){var N=u.charCodeAt(E);if(O(N))return E<S-1&&N===13&&u.charCodeAt(E+1)===10?E+2:E+1}return-1}var D=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,M=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,C=Object.prototype,q=C.hasOwnProperty,V=C.toString,$=Object.hasOwn||(function(u,m){return q.call(u,m)}),I=Array.isArray||(function(u){return V.call(u)==="[object Array]"}),B=Object.create(null);function U(u){return B[u]||(B[u]=new RegExp("^(?:"+u.replace(/ /g,"|")+")$"))}function K(u){return u<=65535?String.fromCharCode(u):(u-=65536,String.fromCharCode((u>>10)+55296,(u&1023)+56320))}var Q=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,Y=function(m,S){this.line=m,this.column=S};Y.prototype.offset=function(m){return new Y(this.line,this.column+m)};var ge=function(m,S,E){this.start=S,this.end=E,m.sourceFile!==null&&(this.source=m.sourceFile)};function z(u,m){for(var S=1,E=0;;){var N=L(u,E,m);if(N<0)return new Y(S,m-E);++S,E=N}}var he={ecmaVersion:null,sourceType:"script",strict:!1,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},me=!1;function gn(u){var m={};for(var S in he)m[S]=u&&$(u,S)?u[S]:he[S];if(m.ecmaVersion==="latest"?m.ecmaVersion=1e8:m.ecmaVersion==null?(!me&&typeof console=="object"&&console.warn&&(me=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
|
|
93
|
+
Defaulting to 2020, but this will stop working in the future.`)),m.ecmaVersion=11):m.ecmaVersion>=2015&&(m.ecmaVersion-=2009),m.allowReserved==null&&(m.allowReserved=m.ecmaVersion<5),(!u||u.allowHashBang==null)&&(m.allowHashBang=m.ecmaVersion>=14),I(m.onToken)){var E=m.onToken;m.onToken=function(N){return E.push(N)}}if(I(m.onComment)&&(m.onComment=Qr(m,m.onComment)),m.sourceType==="commonjs"&&m.allowAwaitOutsideFunction)throw new Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");return m}function Qr(u,m){return function(S,E,N,R,F,G){var X={type:S?"Block":"Line",value:E,start:N,end:R};u.locations&&(X.loc=new ge(this,F,G)),u.ranges&&(X.range=[N,R]),m.push(X)}}var yt=1,Vt=2,Cs=4,iu=8,yn=16,Xr=32,Ls=64,yE=128,qs=256,su=512,_E=1024,Jf=yt|Vt|qs;function C_(u,m){return Vt|(u?Cs:0)|(m?iu:0)}var Kf=0,L_=1,Zr=2,vE=3,bE=4,kE=5,ot=function(m,S,E){this.options=m=gn(m),this.sourceFile=m.sourceFile,this.keywords=U(o[m.ecmaVersion>=6?6:m.sourceType==="module"?"5module":5]);var N="";m.allowReserved!==!0&&(N=s[m.ecmaVersion>=6?6:m.ecmaVersion===5?5:3],m.sourceType==="module"&&(N+=" await")),this.reservedWords=U(N);var R=(N?N+" ":"")+s.strict;this.reservedWordsStrict=U(R),this.reservedWordsStrictBind=U(R+" "+s.strictBind),this.input=String(S),this.containsEsc=!1,E?(this.pos=E,this.lineStart=this.input.lastIndexOf(`
|
|
94
|
+
`,E-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(A).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=y.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=m.sourceType==="module",this.strict=this.inModule||m.strict===!0||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&&m.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(this.options.sourceType==="commonjs"?Vt:yt),this.regexpState=null,this.privateNameStack=[]},Rn={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}};ot.prototype.parse=function(){var m=this,S=this.options.program||this.startNode();return this.nextToken(),this.catchStackOverflow(function(){return m.parseTopLevel(S)})},Rn.inFunction.get=function(){return(this.currentVarScope().flags&Vt)>0},Rn.inGenerator.get=function(){return(this.currentVarScope().flags&iu)>0},Rn.inAsync.get=function(){return(this.currentVarScope().flags&Cs)>0},Rn.canAwait.get=function(){for(var u=this.scopeStack.length-1;u>=0;u--){var m=this.scopeStack[u],S=m.flags;if(S&(qs|su))return!1;if(S&Vt)return(S&Cs)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},Rn.allowReturn.get=function(){return!!(this.inFunction||this.options.allowReturnOutsideFunction&&this.currentVarScope().flags&yt)},Rn.allowSuper.get=function(){var u=this.currentThisScope(),m=u.flags;return(m&Ls)>0||this.options.allowSuperOutsideMethod},Rn.allowDirectSuper.get=function(){return(this.currentThisScope().flags&yE)>0},Rn.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},Rn.allowNewDotTarget.get=function(){for(var u=this.scopeStack.length-1;u>=0;u--){var m=this.scopeStack[u],S=m.flags;if(S&(qs|su)||S&Vt&&!(S&yn))return!0}return!1},Rn.allowUsing.get=function(){var u=this.currentScope(),m=u.flags;return!(m&_E||!this.inModule&&m&yt)},Rn.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&qs)>0},ot.extend=function(){for(var m=[],S=arguments.length;S--;)m[S]=arguments[S];for(var E=this,N=0;N<m.length;N++)E=m[N](E);return E},ot.parse=function(m,S){return new this(S,m).parse()},ot.parseExpressionAt=function(m,S,E){var N=new this(E,m,S);return N.nextToken(),N.parseExpression()},ot.tokenizer=function(m,S){return new this(S,m)},Object.defineProperties(ot.prototype,Rn);var $t=ot.prototype,d9=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;$t.strictDirective=function(u){if(this.options.ecmaVersion<5)return!1;for(;;){M.lastIndex=u,u+=M.exec(this.input)[0].length;var m=d9.exec(this.input.slice(u));if(!m)return!1;if((m[1]||m[2])==="use strict"){M.lastIndex=u+m[0].length;var S=M.exec(this.input),E=S.index+S[0].length,N=this.input.charAt(E);return N===";"||N==="}"||A.test(S[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(N)||N==="!"&&this.input.charAt(E+1)==="=")}u+=m[0].length,M.lastIndex=u,u+=M.exec(this.input)[0].length,this.input[u]===";"&&u++}},$t.eat=function(u){return this.type===u?(this.next(),!0):!1},$t.isContextual=function(u){return this.type===y.name&&this.value===u&&!this.containsEsc},$t.eatContextual=function(u){return this.isContextual(u)?(this.next(),!0):!1},$t.catchStackOverflow=function(u){try{return u()}catch(m){if(m instanceof Error&&(/\bstack\b.*\b(exceeded|overflow)\b/i.test(m.message)||/\btoo much recursion\b/i.test(m.message)))this.raise(this.start,"Not enough stack space to parse input");else throw m}},$t.expectContextual=function(u){this.eatContextual(u)||this.unexpected()},$t.canInsertSemicolon=function(){return this.type===y.eof||this.type===y.braceR||A.test(this.input.slice(this.lastTokEnd,this.start))},$t.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},$t.semicolon=function(){!this.eat(y.semi)&&!this.insertSemicolon()&&this.unexpected()},$t.afterTrailingComma=function(u,m){if(this.type===u)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),m||this.next(),!0},$t.expect=function(u){this.eat(u)||this.unexpected()},$t.unexpected=function(u){this.raise(u??this.start,"Unexpected token")};var Yf=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};$t.checkPatternErrors=function(u,m){if(u){u.trailingComma>-1&&this.raiseRecoverable(u.trailingComma,"Comma is not permitted after the rest element");var S=m?u.parenthesizedAssign:u.parenthesizedBind;S>-1&&this.raiseRecoverable(S,m?"Assigning to rvalue":"Parenthesized pattern")}},$t.checkExpressionErrors=function(u,m){if(!u)return!1;var S=u.shorthandAssign,E=u.doubleProto;if(!m)return S>=0||E>=0;S>=0&&this.raise(S,"Shorthand property assignments are valid only in destructuring patterns"),E>=0&&this.raiseRecoverable(E,"Redefinition of __proto__ property")},$t.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")},$t.isSimpleAssignTarget=function(u){return u.type==="ParenthesizedExpression"?this.isSimpleAssignTarget(u.expression):u.type==="Identifier"||u.type==="MemberExpression"};var ie=ot.prototype;ie.parseTopLevel=function(u){var m=Object.create(null);for(u.body||(u.body=[]);this.type!==y.eof;){var S=this.parseStatement(null,!0,m);u.body.push(S)}if(this.inModule)for(var E=0,N=Object.keys(this.undefinedExports);E<N.length;E+=1){var R=N[E];this.raiseRecoverable(this.undefinedExports[R].start,"Export '"+R+"' is not defined")}return this.adaptDirectivePrologue(u.body),this.next(),u.sourceType=this.options.sourceType==="commonjs"?"script":this.options.sourceType,this.finishNode(u,"Program")};var q_={kind:"loop"},h9={kind:"switch"};ie.isLet=function(u){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;M.lastIndex=this.pos;var m=M.exec(this.input),S=this.pos+m[0].length,E=this.fullCharCodeAt(S);if(E===91||E===92)return!0;if(u)return!1;if(E===123)return!0;if(d(E)){var N=S;do S+=E<=65535?1:2;while(g(E=this.fullCharCodeAt(S)));if(E===92)return!0;var R=this.input.slice(N,S);if(!c.test(R))return!0}return!1},ie.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;M.lastIndex=this.pos;var u=M.exec(this.input),m=this.pos+u[0].length,S;return!A.test(this.input.slice(this.pos,m))&&this.input.slice(m,m+8)==="function"&&(m+8===this.input.length||!(g(S=this.fullCharCodeAt(m+8))||S===92))},ie.isUsingKeyword=function(u,m){if(this.options.ecmaVersion<17||!this.isContextual(u?"await":"using"))return!1;M.lastIndex=this.pos;var S=M.exec(this.input),E=this.pos+S[0].length;if(A.test(this.input.slice(this.pos,E)))return!1;if(u){var N=E+5,R;if(this.input.slice(E,N)!=="using"||N===this.input.length||g(R=this.fullCharCodeAt(N))||R===92)return!1;M.lastIndex=N;var F=M.exec(this.input);if(E=N+F[0].length,F&&A.test(this.input.slice(N,E)))return!1}var G=this.fullCharCodeAt(E);if(!d(G)&&G!==92)return!1;var X=E;do E+=G<=65535?1:2;while(g(G=this.fullCharCodeAt(E)));if(G===92)return!0;var ye=this.input.slice(X,E);if(c.test(ye))return!1;if(m&&!u&&ye==="of"){M.lastIndex=E;var Se=M.exec(this.input);if(E=E+Se[0].length,this.input.charCodeAt(E)!==61||(G=this.input.charCodeAt(E+1))===61||G===62)return!1}return!0},ie.isAwaitUsing=function(u){return this.isUsingKeyword(!0,u)},ie.isUsing=function(u){return this.isUsingKeyword(!1,u)},ie.parseStatement=function(u,m,S){var E=this.type,N=this.startNode(),R;switch(this.isLet(u)&&(E=y._var,R="let"),E){case y._break:case y._continue:return this.parseBreakContinueStatement(N,E.keyword);case y._debugger:return this.parseDebuggerStatement(N);case y._do:return this.parseDoStatement(N);case y._for:return this.parseForStatement(N);case y._function:return u&&(this.strict||u!=="if"&&u!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(N,!1,!u);case y._class:return u&&this.unexpected(),this.parseClass(N,!0);case y._if:return this.parseIfStatement(N);case y._return:return this.parseReturnStatement(N);case y._switch:return this.parseSwitchStatement(N);case y._throw:return this.parseThrowStatement(N);case y._try:return this.parseTryStatement(N);case y._const:case y._var:return R=R||this.value,u&&R!=="var"&&this.unexpected(),this.parseVarStatement(N,R);case y._while:return this.parseWhileStatement(N);case y._with:return this.parseWithStatement(N);case y.braceL:return this.parseBlock(!0,N);case y.semi:return this.parseEmptyStatement(N);case y._export:case y._import:if(this.options.ecmaVersion>10&&E===y._import){M.lastIndex=this.pos;var F=M.exec(this.input),G=this.pos+F[0].length,X=this.input.charCodeAt(G);if(X===40||X===46)return this.parseExpressionStatement(N,this.parseExpression())}return this.options.allowImportExportEverywhere||(m||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'")),E===y._import?this.parseImport(N):this.parseExport(N,S);default:if(this.isAsyncFunction())return u&&this.unexpected(),this.next(),this.parseFunctionStatement(N,!0,!u);var ye=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(ye)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"),u&&this.raise(this.start,"Using declaration is not allowed in single-statement positions"),ye==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(N,!1,ye),this.semicolon(),this.finishNode(N,"VariableDeclaration");var Se=this.value,Ke=this.parseExpression();return E===y.name&&Ke.type==="Identifier"&&this.eat(y.colon)?this.parseLabeledStatement(N,Se,Ke,u):this.parseExpressionStatement(N,Ke)}},ie.parseBreakContinueStatement=function(u,m){var S=m==="break";this.next(),this.eat(y.semi)||this.insertSemicolon()?u.label=null:this.type!==y.name?this.unexpected():(u.label=this.parseIdent(),this.semicolon());for(var E=0;E<this.labels.length;++E){var N=this.labels[E];if((u.label==null||N.name===u.label.name)&&(N.kind!=null&&(S||N.kind==="loop")||u.label&&S))break}return E===this.labels.length&&this.raise(u.start,"Unsyntactic "+m),this.finishNode(u,S?"BreakStatement":"ContinueStatement")},ie.parseDebuggerStatement=function(u){return this.next(),this.semicolon(),this.finishNode(u,"DebuggerStatement")},ie.parseDoStatement=function(u){return this.next(),this.labels.push(q_),u.body=this.parseStatement("do"),this.labels.pop(),this.expect(y._while),u.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(y.semi):this.semicolon(),this.finishNode(u,"DoWhileStatement")},ie.parseForStatement=function(u){this.next();var m=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(q_),this.enterScope(0),this.expect(y.parenL),this.type===y.semi)return m>-1&&this.unexpected(m),this.parseFor(u,null);var S=this.isLet();if(this.type===y._var||this.type===y._const||S){var E=this.startNode(),N=S?"let":this.value;return this.next(),this.parseVar(E,!0,N),this.finishNode(E,"VariableDeclaration"),this.parseForAfterInit(u,E,m)}var R=this.isContextual("let"),F=!1,G=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(G){var X=this.startNode();return this.next(),G==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.parseVar(X,!0,G),this.finishNode(X,"VariableDeclaration"),this.parseForAfterInit(u,X,m)}var ye=this.containsEsc,Se=new Yf,Ke=this.start,Ut=m>-1?this.parseExprSubscripts(Se,"await"):this.parseExpression(!0,Se);return this.type===y._in||(F=this.options.ecmaVersion>=6&&this.isContextual("of"))?(m>-1?(this.type===y._in&&this.unexpected(m),u.await=!0):F&&this.options.ecmaVersion>=8&&(Ut.start===Ke&&!ye&&Ut.type==="Identifier"&&Ut.name==="async"?this.unexpected():this.options.ecmaVersion>=9&&(u.await=!1)),R&&F&&this.raise(Ut.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(Ut,!1,Se),this.checkLValPattern(Ut),this.parseForIn(u,Ut)):(this.checkExpressionErrors(Se,!0),m>-1&&this.unexpected(m),this.parseFor(u,Ut))},ie.parseForAfterInit=function(u,m,S){return(this.type===y._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&m.declarations.length===1?(this.type===y._in?((m.kind==="using"||m.kind==="await using")&&!m.declarations[0].init&&this.raise(this.start,"Using declaration is not allowed in for-in loops"),this.options.ecmaVersion>=9&&S>-1&&this.unexpected(S)):this.options.ecmaVersion>=9&&(u.await=S>-1),this.parseForIn(u,m)):(S>-1&&this.unexpected(S),this.parseFor(u,m))},ie.parseFunctionStatement=function(u,m,S){return this.next(),this.parseFunction(u,au|(S?0:I_),!1,m)},ie.parseIfStatement=function(u){return this.next(),u.test=this.parseParenExpression(),u.consequent=this.parseStatement("if"),u.alternate=this.eat(y._else)?this.parseStatement("if"):null,this.finishNode(u,"IfStatement")},ie.parseReturnStatement=function(u){return this.allowReturn||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(y.semi)||this.insertSemicolon()?u.argument=null:(u.argument=this.parseExpression(),this.semicolon()),this.finishNode(u,"ReturnStatement")},ie.parseSwitchStatement=function(u){this.next(),u.discriminant=this.parseParenExpression(),u.cases=[],this.expect(y.braceL),this.labels.push(h9),this.enterScope(_E);for(var m,S=!1;this.type!==y.braceR;)if(this.type===y._case||this.type===y._default){var E=this.type===y._case;m&&this.finishNode(m,"SwitchCase"),u.cases.push(m=this.startNode()),m.consequent=[],this.next(),E?m.test=this.parseExpression():(S&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),S=!0,m.test=null),this.expect(y.colon)}else m||this.unexpected(),m.consequent.push(this.parseStatement(null));return this.exitScope(),m&&this.finishNode(m,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(u,"SwitchStatement")},ie.parseThrowStatement=function(u){return this.next(),A.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),u.argument=this.parseExpression(),this.semicolon(),this.finishNode(u,"ThrowStatement")};var p9=[];ie.parseCatchClauseParam=function(){var u=this.parseBindingAtom(),m=u.type==="Identifier";return this.enterScope(m?Xr:0),this.checkLValPattern(u,m?bE:Zr),this.expect(y.parenR),u},ie.parseTryStatement=function(u){if(this.next(),u.block=this.parseBlock(),u.handler=null,this.type===y._catch){var m=this.startNode();this.next(),this.eat(y.parenL)?m.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),m.param=null,this.enterScope(0)),m.body=this.parseBlock(!1),this.exitScope(),u.handler=this.finishNode(m,"CatchClause")}return u.finalizer=this.eat(y._finally)?this.parseBlock():null,!u.handler&&!u.finalizer&&this.raise(u.start,"Missing catch or finally clause"),this.finishNode(u,"TryStatement")},ie.parseVarStatement=function(u,m,S){return this.next(),this.parseVar(u,!1,m,S),this.semicolon(),this.finishNode(u,"VariableDeclaration")},ie.parseWhileStatement=function(u){return this.next(),u.test=this.parseParenExpression(),this.labels.push(q_),u.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(u,"WhileStatement")},ie.parseWithStatement=function(u){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),u.object=this.parseParenExpression(),u.body=this.parseStatement("with"),this.finishNode(u,"WithStatement")},ie.parseEmptyStatement=function(u){return this.next(),this.finishNode(u,"EmptyStatement")},ie.parseLabeledStatement=function(u,m,S,E){for(var N=0,R=this.labels;N<R.length;N+=1){var F=R[N];F.name===m&&this.raise(S.start,"Label '"+m+"' is already declared")}for(var G=this.type.isLoop?"loop":this.type===y._switch?"switch":null,X=this.labels.length-1;X>=0;X--){var ye=this.labels[X];if(ye.statementStart===u.start)ye.statementStart=this.start,ye.kind=G;else break}return this.labels.push({name:m,kind:G,statementStart:this.start}),u.body=this.parseStatement(E?E.indexOf("label")===-1?E+"label":E:"label"),this.labels.pop(),u.label=S,this.finishNode(u,"LabeledStatement")},ie.parseExpressionStatement=function(u,m){return u.expression=m,this.semicolon(),this.finishNode(u,"ExpressionStatement")},ie.parseBlock=function(u,m,S){for(u===void 0&&(u=!0),m===void 0&&(m=this.startNode()),m.body=[],this.expect(y.braceL),u&&this.enterScope(0);this.type!==y.braceR;){var E=this.parseStatement(null);m.body.push(E)}return S&&(this.strict=!1),this.next(),u&&this.exitScope(),this.finishNode(m,"BlockStatement")},ie.parseFor=function(u,m){return u.init=m,this.expect(y.semi),u.test=this.type===y.semi?null:this.parseExpression(),this.expect(y.semi),u.update=this.type===y.parenR?null:this.parseExpression(),this.expect(y.parenR),u.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(u,"ForStatement")},ie.parseForIn=function(u,m){var S=this.type===y._in;return this.next(),m.type==="VariableDeclaration"&&m.declarations[0].init!=null&&(!S||this.options.ecmaVersion<8||this.strict||m.kind!=="var"||m.declarations[0].id.type!=="Identifier")&&this.raise(m.start,(S?"for-in":"for-of")+" loop variable declaration may not have an initializer"),u.left=m,u.right=S?this.parseExpression():this.parseMaybeAssign(),this.expect(y.parenR),u.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(u,S?"ForInStatement":"ForOfStatement")},ie.parseVar=function(u,m,S,E){for(u.declarations=[],u.kind=S;;){var N=this.startNode();if(this.parseVarId(N,S),this.eat(y.eq)?N.init=this.parseMaybeAssign(m):!E&&S==="const"&&!(this.type===y._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!E&&(S==="using"||S==="await using")&&this.options.ecmaVersion>=17&&this.type!==y._in&&!this.isContextual("of")?this.raise(this.lastTokEnd,"Missing initializer in "+S+" declaration"):!E&&N.id.type!=="Identifier"&&!(m&&(this.type===y._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):N.init=null,u.declarations.push(this.finishNode(N,"VariableDeclarator")),!this.eat(y.comma))break}return u},ie.parseVarId=function(u,m){u.id=m==="using"||m==="await using"?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(u.id,m==="var"?L_:Zr,!1)};var au=1,I_=2,SE=4;ie.parseFunction=function(u,m,S,E,N){this.initFunction(u),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!E)&&(this.type===y.star&&m&I_&&this.unexpected(),u.generator=this.eat(y.star)),this.options.ecmaVersion>=8&&(u.async=!!E),m&au&&(u.id=m&SE&&this.type!==y.name?null:this.parseIdent(),u.id&&!(m&I_)&&this.checkLValSimple(u.id,this.strict||u.generator||u.async?this.treatFunctionsAsVar?L_:Zr:vE));var R=this.yieldPos,F=this.awaitPos,G=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(C_(u.async,u.generator)),m&au||(u.id=this.type===y.name?this.parseIdent():null),this.parseFunctionParams(u),this.parseFunctionBody(u,S,!1,N),this.yieldPos=R,this.awaitPos=F,this.awaitIdentPos=G,this.finishNode(u,m&au?"FunctionDeclaration":"FunctionExpression")},ie.parseFunctionParams=function(u){this.expect(y.parenL),u.params=this.parseBindingList(y.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},ie.parseClass=function(u,m){this.next();var S=this.strict;this.strict=!0,this.parseClassId(u,m),this.parseClassSuper(u);var E=this.enterClassBody(),N=this.startNode(),R=!1;for(N.body=[],this.expect(y.braceL);this.type!==y.braceR;){var F=this.parseClassElement(u.superClass!==null);F&&(N.body.push(F),F.type==="MethodDefinition"&&F.kind==="constructor"?(R&&this.raiseRecoverable(F.start,"Duplicate constructor in the same class"),R=!0):F.key&&F.key.type==="PrivateIdentifier"&&m9(E,F)&&this.raiseRecoverable(F.key.start,"Identifier '#"+F.key.name+"' has already been declared"))}return this.strict=S,this.next(),u.body=this.finishNode(N,"ClassBody"),this.exitClassBody(),this.finishNode(u,m?"ClassDeclaration":"ClassExpression")},ie.parseClassElement=function(u){if(this.eat(y.semi))return null;var m=this.options.ecmaVersion,S=this.startNode(),E="",N=!1,R=!1,F="method",G=!1;if(this.eatContextual("static")){if(m>=13&&this.eat(y.braceL))return this.parseClassStaticBlock(S),S;this.isClassElementNameStart()||this.type===y.star?G=!0:E="static"}if(S.static=G,!E&&m>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===y.star)&&!this.canInsertSemicolon()?R=!0:E="async"),!E&&(m>=9||!R)&&this.eat(y.star)&&(N=!0),!E&&!R&&!N){var X=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?F=X:E=X)}if(E?(S.computed=!1,S.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),S.key.name=E,this.finishNode(S.key,"Identifier")):this.parseClassElementName(S),m<13||this.type===y.parenL||F!=="method"||N||R){var ye=!S.static&&Qf(S,"constructor"),Se=ye&&u;ye&&F!=="method"&&this.raise(S.key.start,"Constructor can't have get/set modifier"),S.kind=ye?"constructor":F,this.parseClassMethod(S,N,R,Se)}else this.parseClassField(S);return S},ie.isClassElementNameStart=function(){return this.type===y.name||this.type===y.privateId||this.type===y.num||this.type===y.string||this.type===y.bracketL||this.type.keyword},ie.parseClassElementName=function(u){this.type===y.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),u.computed=!1,u.key=this.parsePrivateIdent()):this.parsePropertyName(u)},ie.parseClassMethod=function(u,m,S,E){var N=u.key;u.kind==="constructor"?(m&&this.raise(N.start,"Constructor can't be a generator"),S&&this.raise(N.start,"Constructor can't be an async method")):u.static&&Qf(u,"prototype")&&this.raise(N.start,"Classes may not have a static property named prototype");var R=u.value=this.parseMethod(m,S,E);return u.kind==="get"&&R.params.length!==0&&this.raiseRecoverable(R.start,"getter should have no params"),u.kind==="set"&&R.params.length!==1&&this.raiseRecoverable(R.start,"setter should have exactly one param"),u.kind==="set"&&R.params[0].type==="RestElement"&&this.raiseRecoverable(R.params[0].start,"Setter cannot use rest params"),this.finishNode(u,"MethodDefinition")},ie.parseClassField=function(u){return Qf(u,"constructor")?this.raise(u.key.start,"Classes can't have a field named 'constructor'"):u.static&&Qf(u,"prototype")&&this.raise(u.key.start,"Classes can't have a static field named 'prototype'"),this.eat(y.eq)?(this.enterScope(su|Ls),u.value=this.parseMaybeAssign(),this.exitScope()):u.value=null,this.semicolon(),this.finishNode(u,"PropertyDefinition")},ie.parseClassStaticBlock=function(u){u.body=[];var m=this.labels;for(this.labels=[],this.enterScope(qs|Ls);this.type!==y.braceR;){var S=this.parseStatement(null);u.body.push(S)}return this.next(),this.exitScope(),this.labels=m,this.finishNode(u,"StaticBlock")},ie.parseClassId=function(u,m){this.type===y.name?(u.id=this.parseIdent(),m&&this.checkLValSimple(u.id,Zr,!1)):(m===!0&&this.unexpected(),u.id=null)},ie.parseClassSuper=function(u){u.superClass=this.eat(y._extends)?this.parseExprSubscripts(null,!1):null},ie.enterClassBody=function(){var u={declared:Object.create(null),used:[]};return this.privateNameStack.push(u),u.declared},ie.exitClassBody=function(){var u=this.privateNameStack.pop(),m=u.declared,S=u.used;if(this.options.checkPrivateFields)for(var E=this.privateNameStack.length,N=E===0?null:this.privateNameStack[E-1],R=0;R<S.length;++R){var F=S[R];$(m,F.name)||(N?N.used.push(F):this.raiseRecoverable(F.start,"Private field '#"+F.name+"' must be declared in an enclosing class"))}};function m9(u,m){var S=m.key.name,E=u[S],N="true";return m.type==="MethodDefinition"&&(m.kind==="get"||m.kind==="set")&&(N=(m.static?"s":"i")+m.kind),E==="iget"&&N==="iset"||E==="iset"&&N==="iget"||E==="sget"&&N==="sset"||E==="sset"&&N==="sget"?(u[S]="true",!1):E?!0:(u[S]=N,!1)}function Qf(u,m){var S=u.computed,E=u.key;return!S&&(E.type==="Identifier"&&E.name===m||E.type==="Literal"&&E.value===m)}ie.parseExportAllDeclaration=function(u,m){return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(u.exported=this.parseModuleExportName(),this.checkExport(m,u.exported,this.lastTokStart)):u.exported=null),this.expectContextual("from"),this.type!==y.string&&this.unexpected(),u.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(u.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(u,"ExportAllDeclaration")},ie.parseExport=function(u,m){if(this.next(),this.eat(y.star))return this.parseExportAllDeclaration(u,m);if(this.eat(y._default))return this.checkExport(m,"default",this.lastTokStart),u.declaration=this.parseExportDefaultDeclaration(),this.finishNode(u,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())u.declaration=this.parseExportDeclaration(u),u.declaration.type==="VariableDeclaration"?this.checkVariableExport(m,u.declaration.declarations):this.checkExport(m,u.declaration.id,u.declaration.id.start),u.specifiers=[],u.source=null,this.options.ecmaVersion>=16&&(u.attributes=[]);else{if(u.declaration=null,u.specifiers=this.parseExportSpecifiers(m),this.eatContextual("from"))this.type!==y.string&&this.unexpected(),u.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(u.attributes=this.parseWithClause());else{for(var S=0,E=u.specifiers;S<E.length;S+=1){var N=E[S];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`.")}u.source=null,this.options.ecmaVersion>=16&&(u.attributes=[])}this.semicolon()}return this.finishNode(u,"ExportNamedDeclaration")},ie.parseExportDeclaration=function(u){return this.parseStatement(null)},ie.parseExportDefaultDeclaration=function(){var u;if(this.type===y._function||(u=this.isAsyncFunction())){var m=this.startNode();return this.next(),u&&this.next(),this.parseFunction(m,au|SE,!1,u)}else if(this.type===y._class){var S=this.startNode();return this.parseClass(S,"nullableID")}else{var E=this.parseMaybeAssign();return this.semicolon(),E}},ie.checkExport=function(u,m,S){u&&(typeof m!="string"&&(m=m.type==="Identifier"?m.name:m.value),$(u,m)&&this.raiseRecoverable(S,"Duplicate export '"+m+"'"),u[m]=!0)},ie.checkPatternExport=function(u,m){var S=m.type;if(S==="Identifier")this.checkExport(u,m,m.start);else if(S==="ObjectPattern")for(var E=0,N=m.properties;E<N.length;E+=1){var R=N[E];this.checkPatternExport(u,R)}else if(S==="ArrayPattern")for(var F=0,G=m.elements;F<G.length;F+=1){var X=G[F];X&&this.checkPatternExport(u,X)}else S==="Property"?this.checkPatternExport(u,m.value):S==="AssignmentPattern"?this.checkPatternExport(u,m.left):S==="RestElement"&&this.checkPatternExport(u,m.argument)},ie.checkVariableExport=function(u,m){if(u)for(var S=0,E=m;S<E.length;S+=1){var N=E[S];this.checkPatternExport(u,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(u){var m=this.startNode();return m.local=this.parseModuleExportName(),m.exported=this.eatContextual("as")?this.parseModuleExportName():m.local,this.checkExport(u,m.exported,m.exported.start),this.finishNode(m,"ExportSpecifier")},ie.parseExportSpecifiers=function(u){var m=[],S=!0;for(this.expect(y.braceL);!this.eat(y.braceR);){if(S)S=!1;else if(this.expect(y.comma),this.afterTrailingComma(y.braceR))break;m.push(this.parseExportSpecifier(u))}return m},ie.parseImport=function(u){return this.next(),this.type===y.string?(u.specifiers=p9,u.source=this.parseExprAtom()):(u.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),u.source=this.type===y.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(u.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(u,"ImportDeclaration")},ie.parseImportSpecifier=function(){var u=this.startNode();return u.imported=this.parseModuleExportName(),this.eatContextual("as")?u.local=this.parseIdent():(this.checkUnreserved(u.imported),u.local=u.imported),this.checkLValSimple(u.local,Zr),this.finishNode(u,"ImportSpecifier")},ie.parseImportDefaultSpecifier=function(){var u=this.startNode();return u.local=this.parseIdent(),this.checkLValSimple(u.local,Zr),this.finishNode(u,"ImportDefaultSpecifier")},ie.parseImportNamespaceSpecifier=function(){var u=this.startNode();return this.next(),this.expectContextual("as"),u.local=this.parseIdent(),this.checkLValSimple(u.local,Zr),this.finishNode(u,"ImportNamespaceSpecifier")},ie.parseImportSpecifiers=function(){var u=[],m=!0;if(this.type===y.name&&(u.push(this.parseImportDefaultSpecifier()),!this.eat(y.comma)))return u;if(this.type===y.star)return u.push(this.parseImportNamespaceSpecifier()),u;for(this.expect(y.braceL);!this.eat(y.braceR);){if(m)m=!1;else if(this.expect(y.comma),this.afterTrailingComma(y.braceR))break;u.push(this.parseImportSpecifier())}return u},ie.parseWithClause=function(){var u=[];if(!this.eat(y._with))return u;this.expect(y.braceL);for(var m={},S=!0;!this.eat(y.braceR);){if(S)S=!1;else if(this.expect(y.comma),this.afterTrailingComma(y.braceR))break;var E=this.parseImportAttribute(),N=E.key.type==="Identifier"?E.key.name:E.key.value;$(m,N)&&this.raiseRecoverable(E.key.start,"Duplicate attribute key '"+N+"'"),m[N]=!0,u.push(E)}return u},ie.parseImportAttribute=function(){var u=this.startNode();return u.key=this.type===y.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never"),this.expect(y.colon),this.type!==y.string&&this.unexpected(),u.value=this.parseExprAtom(),this.finishNode(u,"ImportAttribute")},ie.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===y.string){var u=this.parseLiteral(this.value);return Q.test(u.value)&&this.raise(u.start,"An export name cannot include a lone surrogate."),u}return this.parseIdent(!0)},ie.adaptDirectivePrologue=function(u){for(var m=0;m<u.length&&this.isDirectiveCandidate(u[m]);++m)u[m].directive=u[m].expression.raw.slice(1,-1)},ie.isDirectiveCandidate=function(u){return this.options.ecmaVersion>=5&&u.type==="ExpressionStatement"&&u.expression.type==="Literal"&&typeof u.expression.value=="string"&&(this.input[u.start]==='"'||this.input[u.start]==="'")};var Dn=ot.prototype;Dn.toAssignable=function(u,m,S){if(this.options.ecmaVersion>=6&&u)switch(u.type){case"Identifier":this.inAsync&&u.name==="await"&&this.raise(u.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":u.type="ObjectPattern",S&&this.checkPatternErrors(S,!0);for(var E=0,N=u.properties;E<N.length;E+=1){var R=N[E];this.toAssignable(R,m),R.type==="RestElement"&&(R.argument.type==="ArrayPattern"||R.argument.type==="ObjectPattern")&&this.raise(R.argument.start,"Unexpected token")}break;case"Property":u.kind!=="init"&&this.raise(u.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(u.value,m);break;case"ArrayExpression":u.type="ArrayPattern",S&&this.checkPatternErrors(S,!0),this.toAssignableList(u.elements,m);break;case"SpreadElement":u.type="RestElement",this.toAssignable(u.argument,m),u.argument.type==="AssignmentPattern"&&this.raise(u.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":u.operator!=="="&&this.raise(u.left.end,"Only '=' operator can be used for specifying default value."),u.type="AssignmentPattern",delete u.operator,this.toAssignable(u.left,m);break;case"ParenthesizedExpression":this.toAssignable(u.expression,m,S);break;case"ChainExpression":this.raiseRecoverable(u.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!m)break;default:this.raise(u.start,"Assigning to rvalue")}else S&&this.checkPatternErrors(S,!0);return u},Dn.toAssignableList=function(u,m){for(var S=u.length,E=0;E<S;E++){var N=u[E];N&&this.toAssignable(N,m)}if(S){var R=u[S-1];this.options.ecmaVersion===6&&m&&R&&R.type==="RestElement"&&R.argument.type!=="Identifier"&&this.unexpected(R.argument.start)}return u},Dn.parseSpread=function(u){var m=this.startNode();return this.next(),m.argument=this.parseMaybeAssign(!1,u),this.finishNode(m,"SpreadElement")},Dn.parseRestBinding=function(){var u=this.startNode();return this.next(),this.options.ecmaVersion===6&&this.type!==y.name&&this.unexpected(),u.argument=this.parseBindingAtom(),this.finishNode(u,"RestElement")},Dn.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case y.bracketL:var u=this.startNode();return this.next(),u.elements=this.parseBindingList(y.bracketR,!0,!0),this.finishNode(u,"ArrayPattern");case y.braceL:return this.parseObj(!0)}return this.parseIdent()},Dn.parseBindingList=function(u,m,S,E){for(var N=[],R=!0;!this.eat(u);)if(R?R=!1:this.expect(y.comma),m&&this.type===y.comma)N.push(null);else{if(S&&this.afterTrailingComma(u))break;if(this.type===y.ellipsis){var F=this.parseRestBinding();this.parseBindingListItem(F),N.push(F),this.type===y.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(u);break}else N.push(this.parseAssignableListItem(E))}return N},Dn.parseAssignableListItem=function(u){var m=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(m),m},Dn.parseBindingListItem=function(u){return u},Dn.parseMaybeDefault=function(u,m,S){if(S=S||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(y.eq))return S;var E=this.startNodeAt(u,m);return E.left=S,E.right=this.parseMaybeAssign(),this.finishNode(E,"AssignmentPattern")},Dn.checkLValSimple=function(u,m,S){m===void 0&&(m=Kf);var E=m!==Kf;switch(u.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(u.name)&&this.raiseRecoverable(u.start,(E?"Binding ":"Assigning to ")+u.name+" in strict mode"),E&&(m===Zr&&u.name==="let"&&this.raiseRecoverable(u.start,"let is disallowed as a lexically bound name"),S&&($(S,u.name)&&this.raiseRecoverable(u.start,"Argument name clash"),S[u.name]=!0),m!==kE&&this.declareName(u.name,m,u.start));break;case"ChainExpression":this.raiseRecoverable(u.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":E&&this.raiseRecoverable(u.start,"Binding member expression");break;case"ParenthesizedExpression":return E&&this.raiseRecoverable(u.start,"Binding parenthesized expression"),this.checkLValSimple(u.expression,m,S);default:this.raise(u.start,(E?"Binding":"Assigning to")+" rvalue")}},Dn.checkLValPattern=function(u,m,S){switch(m===void 0&&(m=Kf),u.type){case"ObjectPattern":for(var E=0,N=u.properties;E<N.length;E+=1){var R=N[E];this.checkLValInnerPattern(R,m,S)}break;case"ArrayPattern":for(var F=0,G=u.elements;F<G.length;F+=1){var X=G[F];X&&this.checkLValInnerPattern(X,m,S)}break;default:this.checkLValSimple(u,m,S)}},Dn.checkLValInnerPattern=function(u,m,S){switch(m===void 0&&(m=Kf),u.type){case"Property":this.checkLValInnerPattern(u.value,m,S);break;case"AssignmentPattern":this.checkLValPattern(u.left,m,S);break;case"RestElement":this.checkLValPattern(u.argument,m,S);break;default:this.checkLValPattern(u,m,S)}};var jn=function(m,S,E,N,R){this.token=m,this.isExpr=!!S,this.preserveSpace=!!E,this.override=N,this.generator=!!R},Je={b_stat:new jn("{",!1),b_expr:new jn("{",!0),b_tmpl:new jn("${",!1),p_stat:new jn("(",!1),p_expr:new jn("(",!0),q_tmpl:new jn("`",!0,!0,function(u){return u.tryReadTemplateToken()}),f_stat:new jn("function",!1),f_expr:new jn("function",!0),f_expr_gen:new jn("function",!0,!1,null,!0),f_gen:new jn("function",!1,!1,null,!0)},oo=ot.prototype;oo.initialContext=function(){return[Je.b_stat]},oo.curContext=function(){return this.context[this.context.length-1]},oo.braceIsBlock=function(u){var m=this.curContext();return m===Je.f_expr||m===Je.f_stat?!0:u===y.colon&&(m===Je.b_stat||m===Je.b_expr)?!m.isExpr:u===y._return||u===y.name&&this.exprAllowed?A.test(this.input.slice(this.lastTokEnd,this.start)):u===y._else||u===y.semi||u===y.eof||u===y.parenR||u===y.arrow?!0:u===y.braceL?m===Je.b_stat:u===y._var||u===y._const||u===y.name?!1:!this.exprAllowed},oo.inGeneratorContext=function(){for(var u=this.context.length-1;u>=1;u--){var m=this.context[u];if(m.token==="function")return m.generator}return!1},oo.updateContext=function(u){var m,S=this.type;S.keyword&&u===y.dot?this.exprAllowed=!1:(m=S.updateContext)?m.call(this,u):this.exprAllowed=S.beforeExpr},oo.overrideContext=function(u){this.curContext()!==u&&(this.context[this.context.length-1]=u)},y.parenR.updateContext=y.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var u=this.context.pop();u===Je.b_stat&&this.curContext().token==="function"&&(u=this.context.pop()),this.exprAllowed=!u.isExpr},y.braceL.updateContext=function(u){this.context.push(this.braceIsBlock(u)?Je.b_stat:Je.b_expr),this.exprAllowed=!0},y.dollarBraceL.updateContext=function(){this.context.push(Je.b_tmpl),this.exprAllowed=!0},y.parenL.updateContext=function(u){var m=u===y._if||u===y._for||u===y._with||u===y._while;this.context.push(m?Je.p_stat:Je.p_expr),this.exprAllowed=!0},y.incDec.updateContext=function(){},y._function.updateContext=y._class.updateContext=function(u){u.beforeExpr&&u!==y._else&&!(u===y.semi&&this.curContext()!==Je.p_stat)&&!(u===y._return&&A.test(this.input.slice(this.lastTokEnd,this.start)))&&!((u===y.colon||u===y.braceL)&&this.curContext()===Je.b_stat)?this.context.push(Je.f_expr):this.context.push(Je.f_stat),this.exprAllowed=!1},y.colon.updateContext=function(){this.curContext().token==="function"&&this.context.pop(),this.exprAllowed=!0},y.backQuote.updateContext=function(){this.curContext()===Je.q_tmpl?this.context.pop():this.context.push(Je.q_tmpl),this.exprAllowed=!1},y.star.updateContext=function(u){if(u===y._function){var m=this.context.length-1;this.context[m]===Je.f_expr?this.context[m]=Je.f_expr_gen:this.context[m]=Je.f_gen}this.exprAllowed=!0},y.name.updateContext=function(u){var m=!1;this.options.ecmaVersion>=6&&u!==y.dot&&(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())&&(m=!0),this.exprAllowed=m};var be=ot.prototype;be.checkPropClash=function(u,m,S){if(!(this.options.ecmaVersion>=9&&u.type==="SpreadElement")&&!(this.options.ecmaVersion>=6&&(u.computed||u.method||u.shorthand))){var E=u.key,N;switch(E.type){case"Identifier":N=E.name;break;case"Literal":N=String(E.value);break;default:return}var R=u.kind;if(this.options.ecmaVersion>=6){N==="__proto__"&&R==="init"&&(m.proto&&(S?S.doubleProto<0&&(S.doubleProto=E.start):this.raiseRecoverable(E.start,"Redefinition of __proto__ property")),m.proto=!0);return}N="$"+N;var F=m[N];if(F){var G;R==="init"?G=this.strict&&F.init||F.get||F.set:G=F.init||F[R],G&&this.raiseRecoverable(E.start,"Redefinition of property")}else F=m[N]={init:!1,get:!1,set:!1};F[R]=!0}},be.parseExpression=function(u,m){var S=this;return this.catchStackOverflow(function(){var E=S.start,N=S.startLoc,R=S.parseMaybeAssign(u,m);if(S.type===y.comma){var F=S.startNodeAt(E,N);for(F.expressions=[R];S.eat(y.comma);)F.expressions.push(S.parseMaybeAssign(u,m));return S.finishNode(F,"SequenceExpression")}return R})},be.parseMaybeAssign=function(u,m,S){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(u);this.exprAllowed=!1}var E=!1,N=-1,R=-1,F=-1;m?(N=m.parenthesizedAssign,R=m.trailingComma,F=m.doubleProto,m.parenthesizedAssign=m.trailingComma=-1):(m=new Yf,E=!0);var G=this.start,X=this.startLoc;(this.type===y.parenL||this.type===y.name)&&(this.potentialArrowAt=this.start,this.potentialArrowInForAwait=u==="await");var ye=this.parseMaybeConditional(u,m);if(S&&(ye=S.call(this,ye,G,X)),this.type.isAssign){var Se=this.startNodeAt(G,X);return Se.operator=this.value,this.type===y.eq&&(ye=this.toAssignable(ye,!1,m)),E||(m.parenthesizedAssign=m.trailingComma=m.doubleProto=-1),m.shorthandAssign>=ye.start&&(m.shorthandAssign=-1),this.type===y.eq?this.checkLValPattern(ye):this.checkLValSimple(ye),Se.left=ye,this.next(),Se.right=this.parseMaybeAssign(u),F>-1&&(m.doubleProto=F),this.finishNode(Se,"AssignmentExpression")}else E&&this.checkExpressionErrors(m,!0);return N>-1&&(m.parenthesizedAssign=N),R>-1&&(m.trailingComma=R),ye},be.parseMaybeConditional=function(u,m){var S=this.start,E=this.startLoc,N=this.parseExprOps(u,m);if(this.checkExpressionErrors(m))return N;if(!(N.type==="ArrowFunctionExpression"&&N.start===S)&&this.eat(y.question)){var R=this.startNodeAt(S,E);return R.test=N,R.consequent=this.parseMaybeAssign(),this.expect(y.colon),R.alternate=this.parseMaybeAssign(u),this.finishNode(R,"ConditionalExpression")}return N},be.parseExprOps=function(u,m){var S=this.start,E=this.startLoc,N=this.parseMaybeUnary(m,!1,!1,u);return this.checkExpressionErrors(m)||N.start===S&&N.type==="ArrowFunctionExpression"?N:this.parseExprOp(N,S,E,-1,u)},be.parseExprOp=function(u,m,S,E,N){var R=this.type.binop;if(R!=null&&(!N||this.type!==y._in)&&R>E){var F=this.type===y.logicalOR||this.type===y.logicalAND,G=this.type===y.coalesce;G&&(R=y.logicalAND.binop);var X=this.value;this.next();var ye=this.start,Se=this.startLoc,Ke=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,N),ye,Se,R,N),Ut=this.buildBinary(m,S,u,Ke,X,F||G);return(F&&this.type===y.coalesce||G&&(this.type===y.logicalOR||this.type===y.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(Ut,m,S,E,N)}return u},be.buildBinary=function(u,m,S,E,N,R){E.type==="PrivateIdentifier"&&this.raise(E.start,"Private identifier can only be left side of binary expression");var F=this.startNodeAt(u,m);return F.left=S,F.operator=N,F.right=E,this.finishNode(F,R?"LogicalExpression":"BinaryExpression")},be.parseMaybeUnary=function(u,m,S,E){var N=this.start,R=this.startLoc,F;if(this.isContextual("await")&&this.canAwait)F=this.parseAwait(E),m=!0;else if(this.type.prefix){var G=this.startNode(),X=this.type===y.incDec;G.operator=this.value,G.prefix=!0,this.next(),G.argument=this.parseMaybeUnary(null,!0,X,E),this.checkExpressionErrors(u,!0),X?this.checkLValSimple(G.argument):this.strict&&G.operator==="delete"&&TE(G.argument)?this.raiseRecoverable(G.start,"Deleting local variable in strict mode"):G.operator==="delete"&&M_(G.argument)?this.raiseRecoverable(G.start,"Private fields can not be deleted"):m=!0,F=this.finishNode(G,X?"UpdateExpression":"UnaryExpression")}else if(!m&&this.type===y.privateId)(E||this.privateNameStack.length===0)&&this.options.checkPrivateFields&&this.unexpected(),F=this.parsePrivateIdent(),this.type!==y._in&&this.unexpected();else{if(F=this.parseExprSubscripts(u,E),this.checkExpressionErrors(u))return F;for(;this.type.postfix&&!this.canInsertSemicolon();){var ye=this.startNodeAt(N,R);ye.operator=this.value,ye.prefix=!1,ye.argument=F,this.checkLValSimple(F),this.next(),F=this.finishNode(ye,"UpdateExpression")}}if(!S&&this.eat(y.starstar))if(m)this.unexpected(this.lastTokStart);else return this.buildBinary(N,R,F,this.parseMaybeUnary(null,!1,!1,E),"**",!1);else return F};function TE(u){return u.type==="Identifier"||u.type==="ParenthesizedExpression"&&TE(u.expression)}function M_(u){return u.type==="MemberExpression"&&u.property.type==="PrivateIdentifier"||u.type==="ChainExpression"&&M_(u.expression)||u.type==="ParenthesizedExpression"&&M_(u.expression)}be.parseExprSubscripts=function(u,m){var S=this.start,E=this.startLoc,N=this.parseExprAtom(u,m);if(N.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")")return N;var R=this.parseSubscripts(N,S,E,!1,m);return u&&R.type==="MemberExpression"&&(u.parenthesizedAssign>=R.start&&(u.parenthesizedAssign=-1),u.parenthesizedBind>=R.start&&(u.parenthesizedBind=-1),u.trailingComma>=R.start&&(u.trailingComma=-1)),R},be.parseSubscripts=function(u,m,S,E,N){for(var R=this.options.ecmaVersion>=8&&u.type==="Identifier"&&u.name==="async"&&this.lastTokEnd===u.end&&!this.canInsertSemicolon()&&u.end-u.start===5&&this.potentialArrowAt===u.start,F=!1;;){var G=this.parseSubscript(u,m,S,E,R,F,N);if(G.optional&&(F=!0),G===u||G.type==="ArrowFunctionExpression"){if(F){var X=this.startNodeAt(m,S);X.expression=G,G=this.finishNode(X,"ChainExpression")}return G}u=G}},be.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(y.arrow)},be.parseSubscriptAsyncArrow=function(u,m,S,E){return this.parseArrowExpression(this.startNodeAt(u,m),S,!0,E)},be.parseSubscript=function(u,m,S,E,N,R,F){var G=this.options.ecmaVersion>=11,X=G&&this.eat(y.questionDot);E&&X&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var ye=this.eat(y.bracketL);if(ye||X&&this.type!==y.parenL&&this.type!==y.backQuote||this.eat(y.dot)){var Se=this.startNodeAt(m,S);Se.object=u,ye?(Se.property=this.parseExpression(),this.expect(y.bracketR)):this.type===y.privateId&&u.type!=="Super"?Se.property=this.parsePrivateIdent():Se.property=this.parseIdent(this.options.allowReserved!=="never"),Se.computed=!!ye,G&&(Se.optional=X),u=this.finishNode(Se,"MemberExpression")}else if(!E&&this.eat(y.parenL)){var Ke=new Yf,Ut=this.yieldPos,uu=this.awaitPos,co=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var nd=this.parseExprList(y.parenR,this.options.ecmaVersion>=8,!1,Ke);if(N&&!X&&this.shouldParseAsyncArrow())return this.checkPatternErrors(Ke,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=Ut,this.awaitPos=uu,this.awaitIdentPos=co,this.parseSubscriptAsyncArrow(m,S,nd,F);this.checkExpressionErrors(Ke,!0),this.yieldPos=Ut||this.yieldPos,this.awaitPos=uu||this.awaitPos,this.awaitIdentPos=co||this.awaitIdentPos;var uo=this.startNodeAt(m,S);uo.callee=u,uo.arguments=nd,G&&(uo.optional=X),u=this.finishNode(uo,"CallExpression")}else if(this.type===y.backQuote){(X||R)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var lo=this.startNodeAt(m,S);lo.tag=u,lo.quasi=this.parseTemplate({isTagged:!0}),u=this.finishNode(lo,"TaggedTemplateExpression")}return u},be.parseExprAtom=function(u,m,S){this.type===y.slash&&this.readRegexp();var E,N=this.potentialArrowAt===this.start;switch(this.type){case y._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),E=this.startNode(),this.next(),this.type===y.parenL&&!this.allowDirectSuper&&this.raise(E.start,"super() call outside constructor of a subclass"),this.type!==y.dot&&this.type!==y.bracketL&&this.type!==y.parenL&&this.unexpected(),this.finishNode(E,"Super");case y._this:return E=this.startNode(),this.next(),this.finishNode(E,"ThisExpression");case y.name:var R=this.start,F=this.startLoc,G=this.containsEsc,X=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!G&&X.name==="async"&&!this.canInsertSemicolon()&&this.eat(y._function))return this.overrideContext(Je.f_expr),this.parseFunction(this.startNodeAt(R,F),0,!1,!0,m);if(N&&!this.canInsertSemicolon()){if(this.eat(y.arrow))return this.parseArrowExpression(this.startNodeAt(R,F),[X],!1,m);if(this.options.ecmaVersion>=8&&X.name==="async"&&this.type===y.name&&!G&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return X=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(y.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(R,F),[X],!0,m)}return X;case y.regexp:var ye=this.value;return E=this.parseLiteral(ye.value),E.regex={pattern:ye.pattern,flags:ye.flags},E;case y.num:case y.string:return this.parseLiteral(this.value);case y._null:case y._true:case y._false:return E=this.startNode(),E.value=this.type===y._null?null:this.type===y._true,E.raw=this.type.keyword,this.next(),this.finishNode(E,"Literal");case y.parenL:var Se=this.start,Ke=this.parseParenAndDistinguishExpression(N,m);return u&&(u.parenthesizedAssign<0&&!this.isSimpleAssignTarget(Ke)&&(u.parenthesizedAssign=Se),u.parenthesizedBind<0&&(u.parenthesizedBind=Se)),Ke;case y.bracketL:return E=this.startNode(),this.next(),E.elements=this.parseExprList(y.bracketR,!0,!0,u),this.finishNode(E,"ArrayExpression");case y.braceL:return this.overrideContext(Je.b_expr),this.parseObj(!1,u);case y._function:return E=this.startNode(),this.next(),this.parseFunction(E,0);case y._class:return this.parseClass(this.startNode(),!1);case y._new:return this.parseNew();case y.backQuote:return this.parseTemplate();case y._import:return this.options.ecmaVersion>=11?this.parseExprImport(S):this.unexpected();default:return this.parseExprAtomDefault()}},be.parseExprAtomDefault=function(){this.unexpected()},be.parseExprImport=function(u){var m=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===y.parenL&&!u)return this.parseDynamicImport(m);if(this.type===y.dot){var S=this.startNodeAt(m.start,m.loc&&m.loc.start);return S.name="import",m.meta=this.finishNode(S,"Identifier"),this.parseImportMeta(m)}else this.unexpected()},be.parseDynamicImport=function(u){if(this.next(),u.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(y.parenR)?u.options=null:(this.expect(y.comma),this.afterTrailingComma(y.parenR)?u.options=null:(u.options=this.parseMaybeAssign(),this.eat(y.parenR)||(this.expect(y.comma),this.afterTrailingComma(y.parenR)||this.unexpected())));else if(!this.eat(y.parenR)){var m=this.start;this.eat(y.comma)&&this.eat(y.parenR)?this.raiseRecoverable(m,"Trailing comma is not allowed in import()"):this.unexpected(m)}return this.finishNode(u,"ImportExpression")},be.parseImportMeta=function(u){this.next();var m=this.containsEsc;return u.property=this.parseIdent(!0),u.property.name!=="meta"&&this.raiseRecoverable(u.property.start,"The only valid meta property for import is 'import.meta'"),m&&this.raiseRecoverable(u.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(u.start,"Cannot use 'import.meta' outside a module"),this.finishNode(u,"MetaProperty")},be.parseLiteral=function(u){var m=this.startNode();return m.value=u,m.raw=this.input.slice(this.start,this.end),m.raw.charCodeAt(m.raw.length-1)===110&&(m.bigint=m.value!=null?m.value.toString():m.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(m,"Literal")},be.parseParenExpression=function(){this.expect(y.parenL);var u=this.parseExpression();return this.expect(y.parenR),u},be.shouldParseArrow=function(u){return!this.canInsertSemicolon()},be.parseParenAndDistinguishExpression=function(u,m){var S=this.start,E=this.startLoc,N,R=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var F=this.start,G=this.startLoc,X=[],ye=!0,Se=!1,Ke=new Yf,Ut=this.yieldPos,uu=this.awaitPos,co;for(this.yieldPos=0,this.awaitPos=0;this.type!==y.parenR;)if(ye?ye=!1:this.expect(y.comma),R&&this.afterTrailingComma(y.parenR,!0)){Se=!0;break}else if(this.type===y.ellipsis){co=this.start,X.push(this.parseParenItem(this.parseRestBinding())),this.type===y.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else X.push(this.parseMaybeAssign(!1,Ke,this.parseParenItem));var nd=this.lastTokEnd,uo=this.lastTokEndLoc;if(this.expect(y.parenR),u&&this.shouldParseArrow(X)&&this.eat(y.arrow))return this.checkPatternErrors(Ke,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=Ut,this.awaitPos=uu,this.parseParenArrowList(S,E,X,m);(!X.length||Se)&&this.unexpected(this.lastTokStart),co&&this.unexpected(co),this.checkExpressionErrors(Ke,!0),this.yieldPos=Ut||this.yieldPos,this.awaitPos=uu||this.awaitPos,X.length>1?(N=this.startNodeAt(F,G),N.expressions=X,this.finishNodeAt(N,"SequenceExpression",nd,uo)):N=X[0]}else N=this.parseParenExpression();if(this.options.preserveParens){var lo=this.startNodeAt(S,E);return lo.expression=N,this.finishNode(lo,"ParenthesizedExpression")}else return N},be.parseParenItem=function(u){return u},be.parseParenArrowList=function(u,m,S,E){return this.parseArrowExpression(this.startNodeAt(u,m),S,!1,E)};var g9=[];be.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var u=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===y.dot){var m=this.startNodeAt(u.start,u.loc&&u.loc.start);m.name="new",u.meta=this.finishNode(m,"Identifier"),this.next();var S=this.containsEsc;return u.property=this.parseIdent(!0),u.property.name!=="target"&&this.raiseRecoverable(u.property.start,"The only valid meta property for new is 'new.target'"),S&&this.raiseRecoverable(u.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(u.start,"'new.target' can only be used in functions and class static block"),this.finishNode(u,"MetaProperty")}var E=this.start,N=this.startLoc;return u.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),E,N,!0,!1),u.callee.type==="Super"&&this.raiseRecoverable(E,"Invalid use of 'super'"),this.eat(y.parenL)?u.arguments=this.parseExprList(y.parenR,this.options.ecmaVersion>=8,!1):u.arguments=g9,this.finishNode(u,"NewExpression")},be.parseTemplateElement=function(u){var m=u.isTagged,S=this.startNode();return this.type===y.invalidTemplate?(m||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),S.value={raw:this.value.replace(/\r\n?/g,`
|
|
95
|
+
`),cooked:null}):S.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
|
|
96
|
+
`),cooked:this.value},this.next(),S.tail=this.type===y.backQuote,this.finishNode(S,"TemplateElement")},be.parseTemplate=function(u){u===void 0&&(u={});var m=u.isTagged;m===void 0&&(m=!1);var S=this.startNode();this.next(),S.expressions=[];var E=this.parseTemplateElement({isTagged:m});for(S.quasis=[E];!E.tail;)this.type===y.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(y.dollarBraceL),S.expressions.push(this.parseExpression()),this.expect(y.braceR),S.quasis.push(E=this.parseTemplateElement({isTagged:m}));return this.next(),this.finishNode(S,"TemplateLiteral")},be.isAsyncProp=function(u){return!u.computed&&u.key.type==="Identifier"&&u.key.name==="async"&&(this.type===y.name||this.type===y.num||this.type===y.string||this.type===y.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===y.star)&&!A.test(this.input.slice(this.lastTokEnd,this.start))},be.parseObj=function(u,m){var S=this.startNode(),E=!0,N={};for(S.properties=[],this.next();!this.eat(y.braceR);){if(E)E=!1;else if(this.expect(y.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(y.braceR))break;var R=this.parseProperty(u,m);u||this.checkPropClash(R,N,m),S.properties.push(R)}return this.finishNode(S,u?"ObjectPattern":"ObjectExpression")},be.parseProperty=function(u,m){var S=this.startNode(),E,N,R,F;if(this.options.ecmaVersion>=9&&this.eat(y.ellipsis))return u?(S.argument=this.parseIdent(!1),this.type===y.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(S,"RestElement")):(S.argument=this.parseMaybeAssign(!1,m),this.type===y.comma&&m&&m.trailingComma<0&&(m.trailingComma=this.start),this.finishNode(S,"SpreadElement"));this.options.ecmaVersion>=6&&(S.method=!1,S.shorthand=!1,(u||m)&&(R=this.start,F=this.startLoc),u||(E=this.eat(y.star)));var G=this.containsEsc;return this.parsePropertyName(S),!u&&!G&&this.options.ecmaVersion>=8&&!E&&this.isAsyncProp(S)?(N=!0,E=this.options.ecmaVersion>=9&&this.eat(y.star),this.parsePropertyName(S)):N=!1,this.parsePropertyValue(S,u,E,N,R,F,m,G),this.finishNode(S,"Property")},be.parseGetterSetter=function(u){var m=u.key.name;this.parsePropertyName(u),u.value=this.parseMethod(!1),u.kind=m;var S=u.kind==="get"?0:1;if(u.value.params.length!==S){var E=u.value.start;u.kind==="get"?this.raiseRecoverable(E,"getter should have no params"):this.raiseRecoverable(E,"setter should have exactly one param")}else u.kind==="set"&&u.value.params[0].type==="RestElement"&&this.raiseRecoverable(u.value.params[0].start,"Setter cannot use rest params")},be.parsePropertyValue=function(u,m,S,E,N,R,F,G){(S||E)&&this.type===y.colon&&this.unexpected(),this.eat(y.colon)?(u.value=m?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,F),u.kind="init"):this.options.ecmaVersion>=6&&this.type===y.parenL?(m&&this.unexpected(),u.method=!0,u.value=this.parseMethod(S,E),u.kind="init"):!m&&!G&&this.options.ecmaVersion>=5&&!u.computed&&u.key.type==="Identifier"&&(u.key.name==="get"||u.key.name==="set")&&this.type!==y.comma&&this.type!==y.braceR&&this.type!==y.eq?((S||E)&&this.unexpected(),this.parseGetterSetter(u)):this.options.ecmaVersion>=6&&!u.computed&&u.key.type==="Identifier"?((S||E)&&this.unexpected(),this.checkUnreserved(u.key),u.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=N),m?u.value=this.parseMaybeDefault(N,R,this.copyNode(u.key)):this.type===y.eq&&F?(F.shorthandAssign<0&&(F.shorthandAssign=this.start),u.value=this.parseMaybeDefault(N,R,this.copyNode(u.key))):u.value=this.copyNode(u.key),u.kind="init",u.shorthand=!0):this.unexpected()},be.parsePropertyName=function(u){if(this.options.ecmaVersion>=6){if(this.eat(y.bracketL))return u.computed=!0,u.key=this.parseMaybeAssign(),this.expect(y.bracketR),u.key;u.computed=!1}return u.key=this.type===y.num||this.type===y.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")},be.initFunction=function(u){u.id=null,this.options.ecmaVersion>=6&&(u.generator=u.expression=!1),this.options.ecmaVersion>=8&&(u.async=!1)},be.parseMethod=function(u,m,S){var E=this.startNode(),N=this.yieldPos,R=this.awaitPos,F=this.awaitIdentPos;return this.initFunction(E),this.options.ecmaVersion>=6&&(E.generator=u),this.options.ecmaVersion>=8&&(E.async=!!m),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(C_(m,E.generator)|Ls|(S?yE:0)),this.expect(y.parenL),E.params=this.parseBindingList(y.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(E,!1,!0,!1),this.yieldPos=N,this.awaitPos=R,this.awaitIdentPos=F,this.finishNode(E,"FunctionExpression")},be.parseArrowExpression=function(u,m,S,E){var N=this.yieldPos,R=this.awaitPos,F=this.awaitIdentPos;return this.enterScope(C_(S,!1)|yn),this.initFunction(u),this.options.ecmaVersion>=8&&(u.async=!!S),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,u.params=this.toAssignableList(m,!0),this.parseFunctionBody(u,!0,!1,E),this.yieldPos=N,this.awaitPos=R,this.awaitIdentPos=F,this.finishNode(u,"ArrowFunctionExpression")},be.parseFunctionBody=function(u,m,S,E){var N=m&&this.type!==y.braceL,R=this.strict,F=!1;if(N)u.body=this.parseMaybeAssign(E),u.expression=!0,this.checkParams(u,!1);else{var G=this.options.ecmaVersion>=7&&!this.isSimpleParamList(u.params);(!R||G)&&(F=this.strictDirective(this.end),F&&G&&this.raiseRecoverable(u.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var X=this.labels;this.labels=[],F&&(this.strict=!0),this.checkParams(u,!R&&!F&&!m&&!S&&this.isSimpleParamList(u.params)),this.strict&&u.id&&this.checkLValSimple(u.id,kE),u.body=this.parseBlock(!1,void 0,F&&!R),u.expression=!1,this.adaptDirectivePrologue(u.body.body),this.labels=X}this.exitScope()},be.isSimpleParamList=function(u){for(var m=0,S=u;m<S.length;m+=1){var E=S[m];if(E.type!=="Identifier")return!1}return!0},be.checkParams=function(u,m){for(var S=Object.create(null),E=0,N=u.params;E<N.length;E+=1){var R=N[E];this.checkLValInnerPattern(R,L_,m?null:S)}},be.parseExprList=function(u,m,S,E){for(var N=[],R=!0;!this.eat(u);){if(R)R=!1;else if(this.expect(y.comma),m&&this.afterTrailingComma(u))break;var F=void 0;S&&this.type===y.comma?F=null:this.type===y.ellipsis?(F=this.parseSpread(E),E&&this.type===y.comma&&E.trailingComma<0&&(E.trailingComma=this.start)):F=this.parseMaybeAssign(!1,E),N.push(F)}return N},be.checkUnreserved=function(u){var m=u.start,S=u.end,E=u.name;if(this.inGenerator&&E==="yield"&&this.raiseRecoverable(m,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&E==="await"&&this.raiseRecoverable(m,"Cannot use 'await' as identifier inside an async function"),!(this.currentThisScope().flags&Jf)&&E==="arguments"&&this.raiseRecoverable(m,"Cannot use 'arguments' in class field initializer"),this.inClassStaticBlock&&(E==="arguments"||E==="await")&&this.raise(m,"Cannot use "+E+" in class static initialization block"),this.keywords.test(E)&&this.raise(m,"Unexpected keyword '"+E+"'"),!(this.options.ecmaVersion<6&&this.input.slice(m,S).indexOf("\\")!==-1)){var N=this.strict?this.reservedWordsStrict:this.reservedWords;N.test(E)&&(!this.inAsync&&E==="await"&&this.raiseRecoverable(m,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(m,"The keyword '"+E+"' is reserved"))}},be.parseIdent=function(u){var m=this.parseIdentNode();return this.next(!!u),this.finishNode(m,"Identifier"),u||(this.checkUnreserved(m),m.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=m.start)),m},be.parseIdentNode=function(){var u=this.startNode();return this.type===y.name?u.name=this.value:this.type.keyword?(u.name=this.type.keyword,(u.name==="class"||u.name==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46)&&this.context.pop(),this.type=y.name):this.unexpected(),u},be.parsePrivateIdent=function(){var u=this.startNode();return this.type===y.privateId?u.name=this.value:this.unexpected(),this.next(),this.finishNode(u,"PrivateIdentifier"),this.options.checkPrivateFields&&(this.privateNameStack.length===0?this.raise(u.start,"Private field '#"+u.name+"' must be declared in an enclosing class"):this.privateNameStack[this.privateNameStack.length-1].used.push(u)),u},be.parseYield=function(u){this.yieldPos||(this.yieldPos=this.start);var m=this.startNode();return this.next(),this.type===y.semi||this.canInsertSemicolon()||this.type!==y.star&&!this.type.startsExpr?(m.delegate=!1,m.argument=null):(m.delegate=this.eat(y.star),m.argument=this.parseMaybeAssign(u)),this.finishNode(m,"YieldExpression")},be.parseAwait=function(u){this.awaitPos||(this.awaitPos=this.start);var m=this.startNode();return this.next(),m.argument=this.parseMaybeUnary(null,!0,!1,u),this.finishNode(m,"AwaitExpression")};var Xf=ot.prototype;Xf.raise=function(u,m){var S=z(this.input,u);m+=" ("+S.line+":"+S.column+")",this.sourceFile&&(m+=" in "+this.sourceFile);var E=new SyntaxError(m);throw E.pos=u,E.loc=S,E.raisedAt=this.pos,E},Xf.raiseRecoverable=Xf.raise,Xf.curPosition=function(){if(this.options.locations)return new Y(this.curLine,this.pos-this.lineStart)};var Pi=ot.prototype,y9=function(m){this.flags=m,this.var=[],this.lexical=[],this.functions=[]};Pi.enterScope=function(u){this.scopeStack.push(new y9(u))},Pi.exitScope=function(){this.scopeStack.pop()},Pi.treatFunctionsAsVarInScope=function(u){return u.flags&Vt||!this.inModule&&u.flags&yt},Pi.declareName=function(u,m,S){var E=!1;if(m===Zr){var N=this.currentScope();E=N.lexical.indexOf(u)>-1||N.functions.indexOf(u)>-1||N.var.indexOf(u)>-1,N.lexical.push(u),this.inModule&&N.flags&yt&&delete this.undefinedExports[u]}else if(m===bE){var R=this.currentScope();R.lexical.push(u)}else if(m===vE){var F=this.currentScope();this.treatFunctionsAsVar?E=F.lexical.indexOf(u)>-1:E=F.lexical.indexOf(u)>-1||F.var.indexOf(u)>-1,F.functions.push(u)}else for(var G=this.scopeStack.length-1;G>=0;--G){var X=this.scopeStack[G];if(X.lexical.indexOf(u)>-1&&!(X.flags&Xr&&X.lexical[0]===u)||!this.treatFunctionsAsVarInScope(X)&&X.functions.indexOf(u)>-1){E=!0;break}if(X.var.push(u),this.inModule&&X.flags&yt&&delete this.undefinedExports[u],X.flags&Jf)break}E&&this.raiseRecoverable(S,"Identifier '"+u+"' has already been declared")},Pi.checkLocalExport=function(u){this.scopeStack[0].lexical.indexOf(u.name)===-1&&this.scopeStack[0].var.indexOf(u.name)===-1&&(this.undefinedExports[u.name]=u)},Pi.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},Pi.currentVarScope=function(){for(var u=this.scopeStack.length-1;;u--){var m=this.scopeStack[u];if(m.flags&(Jf|su|qs))return m}},Pi.currentThisScope=function(){for(var u=this.scopeStack.length-1;;u--){var m=this.scopeStack[u];if(m.flags&(Jf|su|qs)&&!(m.flags&yn))return m}};var ou=function(m,S,E){this.type="",this.start=S,this.end=0,m.options.locations&&(this.loc=new ge(m,E)),m.options.directSourceFile&&(this.sourceFile=m.options.directSourceFile),m.options.ranges&&(this.range=[S,0])},cu=ot.prototype;cu.startNode=function(){return new ou(this,this.start,this.startLoc)},cu.startNodeAt=function(u,m){return new ou(this,u,m)};function wE(u,m,S,E){return u.type=m,u.end=S,this.options.locations&&(u.loc.end=E),this.options.ranges&&(u.range[1]=S),u}cu.finishNode=function(u,m){return wE.call(this,u,m,this.lastTokEnd,this.lastTokEndLoc)},cu.finishNodeAt=function(u,m,S,E){return wE.call(this,u,m,S,E)},cu.copyNode=function(u){var m=new ou(this,u.start,this.startLoc);for(var S in u)m[S]=u[S];return m};var _9="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",xE="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",EE=xE+" Extended_Pictographic",AE=EE,OE=AE+" EBase EComp EMod EPres ExtPict",PE=OE,v9=PE,b9={9:xE,10:EE,11:AE,12:OE,13:PE,14:v9},k9="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",S9={9:"",10:"",11:"",12:"",13:"",14:k9},NE="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",CE="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",LE=CE+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",qE=LE+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",IE=qE+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",ME=IE+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",T9=ME+" "+_9,w9={9:CE,10:LE,11:qE,12:IE,13:ME,14:T9},RE={};function x9(u){var m=RE[u]={binary:U(b9[u]+" "+NE),binaryOfStrings:U(S9[u]),nonBinary:{General_Category:U(NE),Script:U(w9[u])}};m.nonBinary.Script_Extensions=m.nonBinary.Script,m.nonBinary.gc=m.nonBinary.General_Category,m.nonBinary.sc=m.nonBinary.Script,m.nonBinary.scx=m.nonBinary.Script_Extensions}for(var R_=0,DE=[9,10,11,12,13,14];R_<DE.length;R_+=1){var E9=DE[R_];x9(E9)}var re=ot.prototype,Zf=function(m,S){this.parent=m,this.base=S||this};Zf.prototype.separatedFrom=function(m){for(var S=this;S;S=S.parent)for(var E=m;E;E=E.parent)if(S.base===E.base&&S!==E)return!0;return!1},Zf.prototype.sibling=function(){return new Zf(this.parent,this.base)};var Tr=function(m){this.parser=m,this.validFlags="gim"+(m.options.ecmaVersion>=6?"uy":"")+(m.options.ecmaVersion>=9?"s":"")+(m.options.ecmaVersion>=13?"d":"")+(m.options.ecmaVersion>=15?"v":""),this.unicodeProperties=RE[m.options.ecmaVersion>=14?14:m.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};Tr.prototype.reset=function(m,S,E){var N=E.indexOf("v")!==-1,R=E.indexOf("u")!==-1;this.start=m|0,this.source=S+"",this.flags=E,N&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=R&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=R&&this.parser.options.ecmaVersion>=9)},Tr.prototype.raise=function(m){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+m)},Tr.prototype.at=function(m,S){S===void 0&&(S=!1);var E=this.source,N=E.length;if(m>=N)return-1;var R=E.charCodeAt(m);if(!(S||this.switchU)||R<=55295||R>=57344||m+1>=N)return R;var F=E.charCodeAt(m+1);return F>=56320&&F<=57343?(R<<10)+F-56613888:R},Tr.prototype.nextIndex=function(m,S){S===void 0&&(S=!1);var E=this.source,N=E.length;if(m>=N)return N;var R=E.charCodeAt(m),F;return!(S||this.switchU)||R<=55295||R>=57344||m+1>=N||(F=E.charCodeAt(m+1))<56320||F>57343?m+1:m+2},Tr.prototype.current=function(m){return m===void 0&&(m=!1),this.at(this.pos,m)},Tr.prototype.lookahead=function(m){return m===void 0&&(m=!1),this.at(this.nextIndex(this.pos,m),m)},Tr.prototype.advance=function(m){m===void 0&&(m=!1),this.pos=this.nextIndex(this.pos,m)},Tr.prototype.eat=function(m,S){return S===void 0&&(S=!1),this.current(S)===m?(this.advance(S),!0):!1},Tr.prototype.eatChars=function(m,S){S===void 0&&(S=!1);for(var E=this.pos,N=0,R=m;N<R.length;N+=1){var F=R[N],G=this.at(E,S);if(G===-1||G!==F)return!1;E=this.nextIndex(E,S)}return this.pos=E,!0},re.validateRegExpFlags=function(u){for(var m=u.validFlags,S=u.flags,E=!1,N=!1,R=0;R<S.length;R++){var F=S.charAt(R);m.indexOf(F)===-1&&this.raise(u.start,"Invalid regular expression flag"),S.indexOf(F,R+1)>-1&&this.raise(u.start,"Duplicate regular expression flag"),F==="u"&&(E=!0),F==="v"&&(N=!0)}this.options.ecmaVersion>=15&&E&&N&&this.raise(u.start,"Invalid regular expression flag")};function A9(u){for(var m in u)return!0;return!1}re.validateRegExpPattern=function(u){this.regexp_pattern(u),!u.switchN&&this.options.ecmaVersion>=9&&A9(u.groupNames)&&(u.switchN=!0,this.regexp_pattern(u))},re.regexp_pattern=function(u){u.pos=0,u.lastIntValue=0,u.lastStringValue="",u.lastAssertionIsQuantifiable=!1,u.numCapturingParens=0,u.maxBackReference=0,u.groupNames=Object.create(null),u.backReferenceNames.length=0,u.branchID=null,this.regexp_disjunction(u),u.pos!==u.source.length&&(u.eat(41)&&u.raise("Unmatched ')'"),(u.eat(93)||u.eat(125))&&u.raise("Lone quantifier brackets")),u.maxBackReference>u.numCapturingParens&&u.raise("Invalid escape");for(var m=0,S=u.backReferenceNames;m<S.length;m+=1){var E=S[m];u.groupNames[E]||u.raise("Invalid named capture referenced")}},re.regexp_disjunction=function(u){var m=this.options.ecmaVersion>=16;for(m&&(u.branchID=new Zf(u.branchID,null)),this.regexp_alternative(u);u.eat(124);)m&&(u.branchID=u.branchID.sibling()),this.regexp_alternative(u);m&&(u.branchID=u.branchID.parent),this.regexp_eatQuantifier(u,!0)&&u.raise("Nothing to repeat"),u.eat(123)&&u.raise("Lone quantifier brackets")},re.regexp_alternative=function(u){for(;u.pos<u.source.length&&this.regexp_eatTerm(u););},re.regexp_eatTerm=function(u){return this.regexp_eatAssertion(u)?(u.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(u)&&u.switchU&&u.raise("Invalid quantifier"),!0):(u.switchU?this.regexp_eatAtom(u):this.regexp_eatExtendedAtom(u))?(this.regexp_eatQuantifier(u),!0):!1},re.regexp_eatAssertion=function(u){var m=u.pos;if(u.lastAssertionIsQuantifiable=!1,u.eat(94)||u.eat(36))return!0;if(u.eat(92)){if(u.eat(66)||u.eat(98))return!0;u.pos=m}if(u.eat(40)&&u.eat(63)){var S=!1;if(this.options.ecmaVersion>=9&&(S=u.eat(60)),u.eat(61)||u.eat(33))return this.regexp_disjunction(u),u.eat(41)||u.raise("Unterminated group"),u.lastAssertionIsQuantifiable=!S,!0}return u.pos=m,!1},re.regexp_eatQuantifier=function(u,m){return m===void 0&&(m=!1),this.regexp_eatQuantifierPrefix(u,m)?(u.eat(63),!0):!1},re.regexp_eatQuantifierPrefix=function(u,m){return u.eat(42)||u.eat(43)||u.eat(63)||this.regexp_eatBracedQuantifier(u,m)},re.regexp_eatBracedQuantifier=function(u,m){var S=u.pos;if(u.eat(123)){var E=0,N=-1;if(this.regexp_eatDecimalDigits(u)&&(E=u.lastIntValue,u.eat(44)&&this.regexp_eatDecimalDigits(u)&&(N=u.lastIntValue),u.eat(125)))return N!==-1&&N<E&&!m&&u.raise("numbers out of order in {} quantifier"),!0;u.switchU&&!m&&u.raise("Incomplete quantifier"),u.pos=S}return!1},re.regexp_eatAtom=function(u){return this.regexp_eatPatternCharacters(u)||u.eat(46)||this.regexp_eatReverseSolidusAtomEscape(u)||this.regexp_eatCharacterClass(u)||this.regexp_eatUncapturingGroup(u)||this.regexp_eatCapturingGroup(u)},re.regexp_eatReverseSolidusAtomEscape=function(u){var m=u.pos;if(u.eat(92)){if(this.regexp_eatAtomEscape(u))return!0;u.pos=m}return!1},re.regexp_eatUncapturingGroup=function(u){var m=u.pos;if(u.eat(40)){if(u.eat(63)){if(this.options.ecmaVersion>=16){var S=this.regexp_eatModifiers(u),E=u.eat(45);if(S||E){for(var N=0;N<S.length;N++){var R=S.charAt(N);S.indexOf(R,N+1)>-1&&u.raise("Duplicate regular expression modifiers")}if(E){var F=this.regexp_eatModifiers(u);!S&&!F&&u.current()===58&&u.raise("Invalid regular expression modifiers");for(var G=0;G<F.length;G++){var X=F.charAt(G);(F.indexOf(X,G+1)>-1||S.indexOf(X)>-1)&&u.raise("Duplicate regular expression modifiers")}}}}if(u.eat(58)){if(this.regexp_disjunction(u),u.eat(41))return!0;u.raise("Unterminated group")}}u.pos=m}return!1},re.regexp_eatCapturingGroup=function(u){if(u.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(u):u.current()===63&&u.raise("Invalid group"),this.regexp_disjunction(u),u.eat(41))return u.numCapturingParens+=1,!0;u.raise("Unterminated group")}return!1},re.regexp_eatModifiers=function(u){for(var m="",S=0;(S=u.current())!==-1&&O9(S);)m+=K(S),u.advance();return m};function O9(u){return u===105||u===109||u===115}re.regexp_eatExtendedAtom=function(u){return u.eat(46)||this.regexp_eatReverseSolidusAtomEscape(u)||this.regexp_eatCharacterClass(u)||this.regexp_eatUncapturingGroup(u)||this.regexp_eatCapturingGroup(u)||this.regexp_eatInvalidBracedQuantifier(u)||this.regexp_eatExtendedPatternCharacter(u)},re.regexp_eatInvalidBracedQuantifier=function(u){return this.regexp_eatBracedQuantifier(u,!0)&&u.raise("Nothing to repeat"),!1},re.regexp_eatSyntaxCharacter=function(u){var m=u.current();return jE(m)?(u.lastIntValue=m,u.advance(),!0):!1};function jE(u){return u===36||u>=40&&u<=43||u===46||u===63||u>=91&&u<=94||u>=123&&u<=125}re.regexp_eatPatternCharacters=function(u){for(var m=u.pos,S=0;(S=u.current())!==-1&&!jE(S);)u.advance();return u.pos!==m},re.regexp_eatExtendedPatternCharacter=function(u){var m=u.current();return m!==-1&&m!==36&&!(m>=40&&m<=43)&&m!==46&&m!==63&&m!==91&&m!==94&&m!==124?(u.advance(),!0):!1},re.regexp_groupSpecifier=function(u){if(u.eat(63)){this.regexp_eatGroupName(u)||u.raise("Invalid group");var m=this.options.ecmaVersion>=16,S=u.groupNames[u.lastStringValue];if(S)if(m)for(var E=0,N=S;E<N.length;E+=1){var R=N[E];R.separatedFrom(u.branchID)||u.raise("Duplicate capture group name")}else u.raise("Duplicate capture group name");m?(S||(u.groupNames[u.lastStringValue]=[])).push(u.branchID):u.groupNames[u.lastStringValue]=!0}},re.regexp_eatGroupName=function(u){if(u.lastStringValue="",u.eat(60)){if(this.regexp_eatRegExpIdentifierName(u)&&u.eat(62))return!0;u.raise("Invalid capture group name")}return!1},re.regexp_eatRegExpIdentifierName=function(u){if(u.lastStringValue="",this.regexp_eatRegExpIdentifierStart(u)){for(u.lastStringValue+=K(u.lastIntValue);this.regexp_eatRegExpIdentifierPart(u);)u.lastStringValue+=K(u.lastIntValue);return!0}return!1},re.regexp_eatRegExpIdentifierStart=function(u){var m=u.pos,S=this.options.ecmaVersion>=11,E=u.current(S);return u.advance(S),E===92&&this.regexp_eatRegExpUnicodeEscapeSequence(u,S)&&(E=u.lastIntValue),P9(E)?(u.lastIntValue=E,!0):(u.pos=m,!1)};function P9(u){return d(u,!0)||u===36||u===95}re.regexp_eatRegExpIdentifierPart=function(u){var m=u.pos,S=this.options.ecmaVersion>=11,E=u.current(S);return u.advance(S),E===92&&this.regexp_eatRegExpUnicodeEscapeSequence(u,S)&&(E=u.lastIntValue),N9(E)?(u.lastIntValue=E,!0):(u.pos=m,!1)};function N9(u){return g(u,!0)||u===36||u===95||u===8204||u===8205}re.regexp_eatAtomEscape=function(u){return this.regexp_eatBackReference(u)||this.regexp_eatCharacterClassEscape(u)||this.regexp_eatCharacterEscape(u)||u.switchN&&this.regexp_eatKGroupName(u)?!0:(u.switchU&&(u.current()===99&&u.raise("Invalid unicode escape"),u.raise("Invalid escape")),!1)},re.regexp_eatBackReference=function(u){var m=u.pos;if(this.regexp_eatDecimalEscape(u)){var S=u.lastIntValue;if(u.switchU)return S>u.maxBackReference&&(u.maxBackReference=S),!0;if(S<=u.numCapturingParens)return!0;u.pos=m}return!1},re.regexp_eatKGroupName=function(u){if(u.eat(107)){if(this.regexp_eatGroupName(u))return u.backReferenceNames.push(u.lastStringValue),!0;u.raise("Invalid named reference")}return!1},re.regexp_eatCharacterEscape=function(u){return this.regexp_eatControlEscape(u)||this.regexp_eatCControlLetter(u)||this.regexp_eatZero(u)||this.regexp_eatHexEscapeSequence(u)||this.regexp_eatRegExpUnicodeEscapeSequence(u,!1)||!u.switchU&&this.regexp_eatLegacyOctalEscapeSequence(u)||this.regexp_eatIdentityEscape(u)},re.regexp_eatCControlLetter=function(u){var m=u.pos;if(u.eat(99)){if(this.regexp_eatControlLetter(u))return!0;u.pos=m}return!1},re.regexp_eatZero=function(u){return u.current()===48&&!ed(u.lookahead())?(u.lastIntValue=0,u.advance(),!0):!1},re.regexp_eatControlEscape=function(u){var m=u.current();return m===116?(u.lastIntValue=9,u.advance(),!0):m===110?(u.lastIntValue=10,u.advance(),!0):m===118?(u.lastIntValue=11,u.advance(),!0):m===102?(u.lastIntValue=12,u.advance(),!0):m===114?(u.lastIntValue=13,u.advance(),!0):!1},re.regexp_eatControlLetter=function(u){var m=u.current();return BE(m)?(u.lastIntValue=m%32,u.advance(),!0):!1};function BE(u){return u>=65&&u<=90||u>=97&&u<=122}re.regexp_eatRegExpUnicodeEscapeSequence=function(u,m){m===void 0&&(m=!1);var S=u.pos,E=m||u.switchU;if(u.eat(117)){if(this.regexp_eatFixedHexDigits(u,4)){var N=u.lastIntValue;if(E&&N>=55296&&N<=56319){var R=u.pos;if(u.eat(92)&&u.eat(117)&&this.regexp_eatFixedHexDigits(u,4)){var F=u.lastIntValue;if(F>=56320&&F<=57343)return u.lastIntValue=(N-55296)*1024+(F-56320)+65536,!0}u.pos=R,u.lastIntValue=N}return!0}if(E&&u.eat(123)&&this.regexp_eatHexDigits(u)&&u.eat(125)&&C9(u.lastIntValue))return!0;E&&u.raise("Invalid unicode escape"),u.pos=S}return!1};function C9(u){return u>=0&&u<=1114111}re.regexp_eatIdentityEscape=function(u){if(u.switchU)return this.regexp_eatSyntaxCharacter(u)?!0:u.eat(47)?(u.lastIntValue=47,!0):!1;var m=u.current();return m!==99&&(!u.switchN||m!==107)?(u.lastIntValue=m,u.advance(),!0):!1},re.regexp_eatDecimalEscape=function(u){u.lastIntValue=0;var m=u.current();if(m>=49&&m<=57){do u.lastIntValue=10*u.lastIntValue+(m-48),u.advance();while((m=u.current())>=48&&m<=57);return!0}return!1};var FE=0,ei=1,Bn=2;re.regexp_eatCharacterClassEscape=function(u){var m=u.current();if(L9(m))return u.lastIntValue=-1,u.advance(),ei;var S=!1;if(u.switchU&&this.options.ecmaVersion>=9&&((S=m===80)||m===112)){u.lastIntValue=-1,u.advance();var E;if(u.eat(123)&&(E=this.regexp_eatUnicodePropertyValueExpression(u))&&u.eat(125))return S&&E===Bn&&u.raise("Invalid property name"),E;u.raise("Invalid property name")}return FE};function L9(u){return u===100||u===68||u===115||u===83||u===119||u===87}re.regexp_eatUnicodePropertyValueExpression=function(u){var m=u.pos;if(this.regexp_eatUnicodePropertyName(u)&&u.eat(61)){var S=u.lastStringValue;if(this.regexp_eatUnicodePropertyValue(u)){var E=u.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(u,S,E),ei}}if(u.pos=m,this.regexp_eatLoneUnicodePropertyNameOrValue(u)){var N=u.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(u,N)}return FE},re.regexp_validateUnicodePropertyNameAndValue=function(u,m,S){$(u.unicodeProperties.nonBinary,m)||u.raise("Invalid property name"),u.unicodeProperties.nonBinary[m].test(S)||u.raise("Invalid property value")},re.regexp_validateUnicodePropertyNameOrValue=function(u,m){if(u.unicodeProperties.binary.test(m))return ei;if(u.switchV&&u.unicodeProperties.binaryOfStrings.test(m))return Bn;u.raise("Invalid property name")},re.regexp_eatUnicodePropertyName=function(u){var m=0;for(u.lastStringValue="";VE(m=u.current());)u.lastStringValue+=K(m),u.advance();return u.lastStringValue!==""};function VE(u){return BE(u)||u===95}re.regexp_eatUnicodePropertyValue=function(u){var m=0;for(u.lastStringValue="";q9(m=u.current());)u.lastStringValue+=K(m),u.advance();return u.lastStringValue!==""};function q9(u){return VE(u)||ed(u)}re.regexp_eatLoneUnicodePropertyNameOrValue=function(u){return this.regexp_eatUnicodePropertyValue(u)},re.regexp_eatCharacterClass=function(u){if(u.eat(91)){var m=u.eat(94),S=this.regexp_classContents(u);return u.eat(93)||u.raise("Unterminated character class"),m&&S===Bn&&u.raise("Negated character class may contain strings"),!0}return!1},re.regexp_classContents=function(u){return u.current()===93?ei:u.switchV?this.regexp_classSetExpression(u):(this.regexp_nonEmptyClassRanges(u),ei)},re.regexp_nonEmptyClassRanges=function(u){for(;this.regexp_eatClassAtom(u);){var m=u.lastIntValue;if(u.eat(45)&&this.regexp_eatClassAtom(u)){var S=u.lastIntValue;u.switchU&&(m===-1||S===-1)&&u.raise("Invalid character class"),m!==-1&&S!==-1&&m>S&&u.raise("Range out of order in character class")}}},re.regexp_eatClassAtom=function(u){var m=u.pos;if(u.eat(92)){if(this.regexp_eatClassEscape(u))return!0;if(u.switchU){var S=u.current();(S===99||HE(S))&&u.raise("Invalid class escape"),u.raise("Invalid escape")}u.pos=m}var E=u.current();return E!==93?(u.lastIntValue=E,u.advance(),!0):!1},re.regexp_eatClassEscape=function(u){var m=u.pos;if(u.eat(98))return u.lastIntValue=8,!0;if(u.switchU&&u.eat(45))return u.lastIntValue=45,!0;if(!u.switchU&&u.eat(99)){if(this.regexp_eatClassControlLetter(u))return!0;u.pos=m}return this.regexp_eatCharacterClassEscape(u)||this.regexp_eatCharacterEscape(u)},re.regexp_classSetExpression=function(u){var m=ei,S;if(!this.regexp_eatClassSetRange(u))if(S=this.regexp_eatClassSetOperand(u)){S===Bn&&(m=Bn);for(var E=u.pos;u.eatChars([38,38]);){if(u.current()!==38&&(S=this.regexp_eatClassSetOperand(u))){S!==Bn&&(m=ei);continue}u.raise("Invalid character in character class")}if(E!==u.pos)return m;for(;u.eatChars([45,45]);)this.regexp_eatClassSetOperand(u)||u.raise("Invalid character in character class");if(E!==u.pos)return m}else u.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(u)){if(S=this.regexp_eatClassSetOperand(u),!S)return m;S===Bn&&(m=Bn)}},re.regexp_eatClassSetRange=function(u){var m=u.pos;if(this.regexp_eatClassSetCharacter(u)){var S=u.lastIntValue;if(u.eat(45)&&this.regexp_eatClassSetCharacter(u)){var E=u.lastIntValue;return S!==-1&&E!==-1&&S>E&&u.raise("Range out of order in character class"),!0}u.pos=m}return!1},re.regexp_eatClassSetOperand=function(u){return this.regexp_eatClassSetCharacter(u)?ei:this.regexp_eatClassStringDisjunction(u)||this.regexp_eatNestedClass(u)},re.regexp_eatNestedClass=function(u){var m=u.pos;if(u.eat(91)){var S=u.eat(94),E=this.regexp_classContents(u);if(u.eat(93))return S&&E===Bn&&u.raise("Negated character class may contain strings"),E;u.pos=m}if(u.eat(92)){var N=this.regexp_eatCharacterClassEscape(u);if(N)return N;u.pos=m}return null},re.regexp_eatClassStringDisjunction=function(u){var m=u.pos;if(u.eatChars([92,113])){if(u.eat(123)){var S=this.regexp_classStringDisjunctionContents(u);if(u.eat(125))return S}else u.raise("Invalid escape");u.pos=m}return null},re.regexp_classStringDisjunctionContents=function(u){for(var m=this.regexp_classString(u);u.eat(124);)this.regexp_classString(u)===Bn&&(m=Bn);return m},re.regexp_classString=function(u){for(var m=0;this.regexp_eatClassSetCharacter(u);)m++;return m===1?ei:Bn},re.regexp_eatClassSetCharacter=function(u){var m=u.pos;if(u.eat(92))return this.regexp_eatCharacterEscape(u)||this.regexp_eatClassSetReservedPunctuator(u)?!0:u.eat(98)?(u.lastIntValue=8,!0):(u.pos=m,!1);var S=u.current();return S<0||S===u.lookahead()&&I9(S)||M9(S)?!1:(u.advance(),u.lastIntValue=S,!0)};function I9(u){return u===33||u>=35&&u<=38||u>=42&&u<=44||u===46||u>=58&&u<=64||u===94||u===96||u===126}function M9(u){return u===40||u===41||u===45||u===47||u>=91&&u<=93||u>=123&&u<=125}re.regexp_eatClassSetReservedPunctuator=function(u){var m=u.current();return R9(m)?(u.lastIntValue=m,u.advance(),!0):!1};function R9(u){return u===33||u===35||u===37||u===38||u===44||u===45||u>=58&&u<=62||u===64||u===96||u===126}re.regexp_eatClassControlLetter=function(u){var m=u.current();return ed(m)||m===95?(u.lastIntValue=m%32,u.advance(),!0):!1},re.regexp_eatHexEscapeSequence=function(u){var m=u.pos;if(u.eat(120)){if(this.regexp_eatFixedHexDigits(u,2))return!0;u.switchU&&u.raise("Invalid escape"),u.pos=m}return!1},re.regexp_eatDecimalDigits=function(u){var m=u.pos,S=0;for(u.lastIntValue=0;ed(S=u.current());)u.lastIntValue=10*u.lastIntValue+(S-48),u.advance();return u.pos!==m};function ed(u){return u>=48&&u<=57}re.regexp_eatHexDigits=function(u){var m=u.pos,S=0;for(u.lastIntValue=0;$E(S=u.current());)u.lastIntValue=16*u.lastIntValue+UE(S),u.advance();return u.pos!==m};function $E(u){return u>=48&&u<=57||u>=65&&u<=70||u>=97&&u<=102}function UE(u){return u>=65&&u<=70?10+(u-65):u>=97&&u<=102?10+(u-97):u-48}re.regexp_eatLegacyOctalEscapeSequence=function(u){if(this.regexp_eatOctalDigit(u)){var m=u.lastIntValue;if(this.regexp_eatOctalDigit(u)){var S=u.lastIntValue;m<=3&&this.regexp_eatOctalDigit(u)?u.lastIntValue=m*64+S*8+u.lastIntValue:u.lastIntValue=m*8+S}else u.lastIntValue=m;return!0}return!1},re.regexp_eatOctalDigit=function(u){var m=u.current();return HE(m)?(u.lastIntValue=m-48,u.advance(),!0):(u.lastIntValue=0,!1)};function HE(u){return u>=48&&u<=55}re.regexp_eatFixedHexDigits=function(u,m){var S=u.pos;u.lastIntValue=0;for(var E=0;E<m;++E){var N=u.current();if(!$E(N))return u.pos=S,!1;u.lastIntValue=16*u.lastIntValue+UE(N),u.advance()}return!0};var td=function(m){this.type=m.type,this.value=m.value,this.start=m.start,this.end=m.end,m.options.locations&&(this.loc=new ge(m,m.startLoc,m.endLoc)),m.options.ranges&&(this.range=[m.start,m.end])},Te=ot.prototype;Te.next=function(u){!u&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new td(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},Te.getToken=function(){return this.next(),new td(this)},typeof Symbol<"u"&&(Te[Symbol.iterator]=function(){var u=this;return{next:function(){var m=u.getToken();return{done:m.type===y.eof,value:m}}}}),Te.nextToken=function(){var u=this.curContext();if((!u||!u.preserveSpace)&&this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length)return this.finishToken(y.eof);if(u.override)return u.override(this);this.readToken(this.fullCharCodeAtPos())},Te.readToken=function(u){return d(u,this.options.ecmaVersion>=6)||u===92?this.readWord():this.getTokenFromCode(u)},Te.fullCharCodeAt=function(u){var m=this.input.charCodeAt(u);if(m<=55295||m>=56320)return m;var S=this.input.charCodeAt(u+1);return S<=56319||S>=57344?m:(m<<10)+S-56613888},Te.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)},Te.skipBlockComment=function(){var u=this.options.onComment&&this.curPosition(),m=this.pos,S=this.input.indexOf("*/",this.pos+=2);if(S===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=S+2,this.options.locations)for(var E=void 0,N=m;(E=L(this.input,N,this.pos))>-1;)++this.curLine,N=this.lineStart=E;this.options.onComment&&this.options.onComment(!0,this.input.slice(m+2,S),m,this.pos,u,this.curPosition())},Te.skipLineComment=function(u){for(var m=this.pos,S=this.options.onComment&&this.curPosition(),E=this.input.charCodeAt(this.pos+=u);this.pos<this.input.length&&!O(E);)E=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(m+u,this.pos),m,this.pos,S,this.curPosition())},Te.skipSpace=function(){e:for(;this.pos<this.input.length;){var u=this.input.charCodeAt(this.pos);switch(u){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(u>8&&u<14||u>=5760&&D.test(String.fromCharCode(u)))++this.pos;else break e}}},Te.finishToken=function(u,m){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var S=this.type;this.type=u,this.value=m,this.updateContext(S)},Te.readToken_dot=function(){var u=this.input.charCodeAt(this.pos+1);if(u>=48&&u<=57)return this.readNumber(!0);var m=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&u===46&&m===46?(this.pos+=3,this.finishToken(y.ellipsis)):(++this.pos,this.finishToken(y.dot))},Te.readToken_slash=function(){var u=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):u===61?this.finishOp(y.assign,2):this.finishOp(y.slash,1)},Te.readToken_mult_modulo_exp=function(u){var m=this.input.charCodeAt(this.pos+1),S=1,E=u===42?y.star:y.modulo;return this.options.ecmaVersion>=7&&u===42&&m===42&&(++S,E=y.starstar,m=this.input.charCodeAt(this.pos+2)),m===61?this.finishOp(y.assign,S+1):this.finishOp(E,S)},Te.readToken_pipe_amp=function(u){var m=this.input.charCodeAt(this.pos+1);if(m===u){if(this.options.ecmaVersion>=12){var S=this.input.charCodeAt(this.pos+2);if(S===61)return this.finishOp(y.assign,3)}return this.finishOp(u===124?y.logicalOR:y.logicalAND,2)}return m===61?this.finishOp(y.assign,2):this.finishOp(u===124?y.bitwiseOR:y.bitwiseAND,1)},Te.readToken_caret=function(){var u=this.input.charCodeAt(this.pos+1);return u===61?this.finishOp(y.assign,2):this.finishOp(y.bitwiseXOR,1)},Te.readToken_plus_min=function(u){var m=this.input.charCodeAt(this.pos+1);return m===u?m===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(y.incDec,2):m===61?this.finishOp(y.assign,2):this.finishOp(y.plusMin,1)},Te.readToken_lt_gt=function(u){var m=this.input.charCodeAt(this.pos+1),S=1;return m===u?(S=u===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+S)===61?this.finishOp(y.assign,S+1):this.finishOp(y.bitShift,S)):m===33&&u===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(m===61&&(S=2),this.finishOp(y.relational,S))},Te.readToken_eq_excl=function(u){var m=this.input.charCodeAt(this.pos+1);return m===61?this.finishOp(y.equality,this.input.charCodeAt(this.pos+2)===61?3:2):u===61&&m===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(y.arrow)):this.finishOp(u===61?y.eq:y.prefix,1)},Te.readToken_question=function(){var u=this.options.ecmaVersion;if(u>=11){var m=this.input.charCodeAt(this.pos+1);if(m===46){var S=this.input.charCodeAt(this.pos+2);if(S<48||S>57)return this.finishOp(y.questionDot,2)}if(m===63){if(u>=12){var E=this.input.charCodeAt(this.pos+2);if(E===61)return this.finishOp(y.assign,3)}return this.finishOp(y.coalesce,2)}}return this.finishOp(y.question,1)},Te.readToken_numberSign=function(){var u=this.options.ecmaVersion,m=35;if(u>=13&&(++this.pos,m=this.fullCharCodeAtPos(),d(m,!0)||m===92))return this.finishToken(y.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+K(m)+"'")},Te.getTokenFromCode=function(u){switch(u){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(y.parenL);case 41:return++this.pos,this.finishToken(y.parenR);case 59:return++this.pos,this.finishToken(y.semi);case 44:return++this.pos,this.finishToken(y.comma);case 91:return++this.pos,this.finishToken(y.bracketL);case 93:return++this.pos,this.finishToken(y.bracketR);case 123:return++this.pos,this.finishToken(y.braceL);case 125:return++this.pos,this.finishToken(y.braceR);case 58:return++this.pos,this.finishToken(y.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(y.backQuote);case 48:var m=this.input.charCodeAt(this.pos+1);if(m===120||m===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(m===111||m===79)return this.readRadixNumber(8);if(m===98||m===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(u);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(u);case 124:case 38:return this.readToken_pipe_amp(u);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(u);case 60:case 62:return this.readToken_lt_gt(u);case 61:case 33:return this.readToken_eq_excl(u);case 63:return this.readToken_question();case 126:return this.finishOp(y.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+K(u)+"'")},Te.finishOp=function(u,m){var S=this.input.slice(this.pos,this.pos+m);return this.pos+=m,this.finishToken(u,S)},Te.readRegexp=function(){for(var u,m,S=this.pos;;){this.pos>=this.input.length&&this.raise(S,"Unterminated regular expression");var E=this.input.charAt(this.pos);if(A.test(E)&&this.raise(S,"Unterminated regular expression"),u)u=!1;else{if(E==="[")m=!0;else if(E==="]"&&m)m=!1;else if(E==="/"&&!m)break;u=E==="\\"}++this.pos}var N=this.input.slice(S,this.pos);++this.pos;var R=this.pos,F=this.readWord1();this.containsEsc&&this.unexpected(R);var G=this.regexpState||(this.regexpState=new Tr(this));G.reset(S,N,F),this.validateRegExpFlags(G),this.validateRegExpPattern(G);var X=null;try{X=new RegExp(N,F)}catch{}return this.finishToken(y.regexp,{pattern:N,flags:F,value:X})},Te.readInt=function(u,m,S){for(var E=this.options.ecmaVersion>=12&&m===void 0,N=S&&this.input.charCodeAt(this.pos)===48,R=this.pos,F=0,G=0,X=0,ye=m??1/0;X<ye;++X,++this.pos){var Se=this.input.charCodeAt(this.pos),Ke=void 0;if(E&&Se===95){N&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),G===95&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),X===0&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),G=Se;continue}if(Se>=97?Ke=Se-97+10:Se>=65?Ke=Se-65+10:Se>=48&&Se<=57?Ke=Se-48:Ke=1/0,Ke>=u)break;G=Se,F=F*u+Ke}return E&&G===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===R||m!=null&&this.pos-R!==m?null:F};function D9(u,m){return m?parseInt(u,8):parseFloat(u.replace(/_/g,""))}function zE(u){return typeof BigInt!="function"?null:BigInt(u.replace(/_/g,""))}Te.readRadixNumber=function(u){var m=this.pos;this.pos+=2;var S=this.readInt(u);return S==null&&this.raise(this.start+2,"Expected number in radix "+u),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(S=zE(this.input.slice(m,this.pos)),++this.pos):d(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(y.num,S)},Te.readNumber=function(u){var m=this.pos;!u&&this.readInt(10,void 0,!0)===null&&this.raise(m,"Invalid number");var S=this.pos-m>=2&&this.input.charCodeAt(m)===48;S&&this.strict&&this.raise(m,"Invalid number");var E=this.input.charCodeAt(this.pos);if(!S&&!u&&this.options.ecmaVersion>=11&&E===110){var N=zE(this.input.slice(m,this.pos));return++this.pos,d(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(y.num,N)}S&&/[89]/.test(this.input.slice(m,this.pos))&&(S=!1),E===46&&!S&&(++this.pos,this.readInt(10),E=this.input.charCodeAt(this.pos)),(E===69||E===101)&&!S&&(E=this.input.charCodeAt(++this.pos),(E===43||E===45)&&++this.pos,this.readInt(10)===null&&this.raise(m,"Invalid number")),d(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var R=D9(this.input.slice(m,this.pos),S);return this.finishToken(y.num,R)},Te.readCodePoint=function(){var u=this.input.charCodeAt(this.pos),m;if(u===123){this.options.ecmaVersion<6&&this.unexpected();var S=++this.pos;m=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,m>1114111&&this.invalidStringToken(S,"Code point out of bounds")}else m=this.readHexChar(4);return m},Te.readString=function(u){for(var m="",S=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var E=this.input.charCodeAt(this.pos);if(E===u)break;E===92?(m+=this.input.slice(S,this.pos),m+=this.readEscapedChar(!1),S=this.pos):E===8232||E===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(O(E)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return m+=this.input.slice(S,this.pos++),this.finishToken(y.string,m)};var WE={};Te.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(u){if(u===WE)this.readInvalidTemplateToken();else throw u}this.inTemplateElement=!1},Te.invalidStringToken=function(u,m){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw WE;this.raise(u,m)},Te.readTmplToken=function(){for(var u="",m=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var S=this.input.charCodeAt(this.pos);if(S===96||S===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===y.template||this.type===y.invalidTemplate)?S===36?(this.pos+=2,this.finishToken(y.dollarBraceL)):(++this.pos,this.finishToken(y.backQuote)):(u+=this.input.slice(m,this.pos),this.finishToken(y.template,u));if(S===92)u+=this.input.slice(m,this.pos),u+=this.readEscapedChar(!0),m=this.pos;else if(O(S)){switch(u+=this.input.slice(m,this.pos),++this.pos,S){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:u+=`
|
|
97
|
+
`;break;default:u+=String.fromCharCode(S);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),m=this.pos}else++this.pos}},Te.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(y.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":this.input[this.pos+1]===`
|
|
98
|
+
`&&++this.pos;case`
|
|
99
|
+
`:case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,"Unterminated template")},Te.readEscapedChar=function(u){var m=this.input.charCodeAt(++this.pos);switch(++this.pos,m){case 110:return`
|
|
100
|
+
`;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return K(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"),u){var S=this.pos-1;this.invalidStringToken(S,"Invalid escape sequence in template string")}default:if(m>=48&&m<=55){var E=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],N=parseInt(E,8);return N>255&&(E=E.slice(0,-1),N=parseInt(E,8)),this.pos+=E.length-1,m=this.input.charCodeAt(this.pos),(E!=="0"||m===56||m===57)&&(this.strict||u)&&this.invalidStringToken(this.pos-1-E.length,u?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(N)}return O(m)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(m)}},Te.readHexChar=function(u){var m=this.pos,S=this.readInt(16,u);return S===null&&this.invalidStringToken(m,"Bad character escape sequence"),S},Te.readWord1=function(){this.containsEsc=!1;for(var u="",m=!0,S=this.pos,E=this.options.ecmaVersion>=6;this.pos<this.input.length;){var N=this.fullCharCodeAtPos();if(g(N,E))this.pos+=N<=65535?1:2;else if(N===92){this.containsEsc=!0,u+=this.input.slice(S,this.pos);var R=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var F=this.readCodePoint();(m?d:g)(F,E)||this.invalidStringToken(R,"Invalid Unicode escape"),u+=K(F),S=this.pos}else break;m=!1}return u+this.input.slice(S,this.pos)},Te.readWord=function(){var u=this.readWord1(),m=y.name;return this.keywords.test(u)&&(m=T[u]),this.finishToken(m,u)};var GE="8.17.0";ot.acorn={Parser:ot,version:GE,defaultOptions:he,Position:Y,SourceLocation:ge,getLineInfo:z,Node:ou,TokenType:v,tokTypes:y,keywordTypes:T,TokContext:jn,tokContexts:Je,isIdentifierChar:g,isIdentifierStart:d,Token:td,isNewLine:O,lineBreak:A,lineBreakG:P,nonASCIIwhitespace:D};function j9(u,m){return ot.parse(u,m)}function B9(u,m,S){return ot.parseExpressionAt(u,m,S)}function F9(u,m){return ot.tokenizer(u,m)}e.Node=ou,e.Parser=ot,e.Position=Y,e.SourceLocation=ge,e.TokContext=jn,e.Token=td,e.TokenType=v,e.defaultOptions=he,e.getLineInfo=z,e.isIdentifierChar=g,e.isIdentifierStart=d,e.isNewLine=O,e.keywordTypes=T,e.lineBreak=A,e.lineBreakG=P,e.nonASCIIwhitespace=D,e.parse=j9,e.parseExpressionAt=B9,e.tokContexts=Je,e.tokTypes=y,e.tokenizer=F9,e.version=GE}))});var py=x(hy=>{"use strict";p();Object.defineProperty(hy,"__esModule",{value:!0});hy.SUPPORTED_ASSET_IMAGE_EXTENSIONS=void 0;hy.SUPPORTED_ASSET_IMAGE_EXTENSIONS=["jpg","jpeg","png","gif","webp","heic","ico"]});var Mc=x(br=>{"use strict";p();Object.defineProperty(br,"__esModule",{value:!0});br.identity=void 0;br.unique=gle;br.assertNever=yle;br.unexpected=_le;br.isString=ble;br.extname=kle;br.exists=Sle;br.acceptsLocalBlocks=Tle;function gle(e){return[...new Set(e)]}function yle(e){throw new Error(`Unknown module type ${e}`)}function _le(){return new Error("Unexpected code path encountered")}var vle=e=>e;br.identity=vle;function ble(e){return typeof e=="string"}function kle(e){return e.split(".").pop()||""}async function Sle(e,t){return e.stat(t).then(()=>!0).catch(()=>!1)}async function Tle(e,t){let n=await t.getSectionSchema(e).catch(i=>{});if(!n)return new Error("Section does not exist");let r=n.validSchema;return r instanceof Error?r:(r.blocks??[]).some(i=>i.type&&"name"in i&&i.name)}});var MT=x(Ja=>{"use strict";p();Object.defineProperty(Ja,"__esModule",{value:!0});Ja.toCssSourceCode=IT;Ja.toSvgSourceCode=Ale;Ja.toJsSourceCode=PV;Ja.parseJs=NV;Ja.toSourceCode=Ple;var OV=Yt(),wle=AV(),xle=py(),Ele=Mc();async function IT(e,t){return{type:"css",uri:e,source:t,ast:new Error("File parsing not implemented yet")}}async function Ale(e,t){return{type:"svg",uri:e,source:t,ast:new Error("File parsing not implemented yet")}}async function Ole(e,t){return{type:"image",uri:e,source:t,ast:new Error("Image files are not parsed")}}async function PV(e,t){return{type:"javascript",uri:e,source:t,ast:NV(t)}}function NV(e){try{return(0,wle.parse)(e,{ecmaVersion:"latest",sourceType:"module"})}catch(t){return(0,OV.asError)(t)}}async function Ple(e,t){let n=(0,Ele.extname)(e);if(n==="json"||n==="liquid")return(0,OV.toSourceCode)(e,t);if(n==="js")return PV(e,t);if(n==="css")return IT(e,t);if(n==="svg")return IT(e,t);if(xle.SUPPORTED_ASSET_IMAGE_EXTENSIONS.includes(n))return Ole(e,t);throw new Error(`Unknown source code type for ${e}`)}});var CV=x(DT=>{"use strict";p();Object.defineProperty(DT,"__esModule",{value:!0});DT.augmentDependencies=Cle;var Ka=Yt(),Nle=MT(),RT=Mc();function Cle(e,t){return{fs:t.fs,getBlockSchema:(0,Ka.memoize)(t.getBlockSchema,RT.identity),getSectionSchema:(0,Ka.memoize)(t.getSectionSchema,RT.identity),getSourceCode:(0,Ka.memoize)(t.getSourceCode??async function(r){let i=await t.fs.readFile(r);return(0,Nle.toSourceCode)(r,i)},RT.identity),getWebComponentDefinitionReference:t.getWebComponentDefinitionReference,mode:t.mode??"theme",getThemeBlockNames:(0,Ka.memo)(()=>(0,Ka.recursiveReadDirectory)(t.fs,Ka.path.join(e,"blocks"),([n])=>n.endsWith(".liquid")).then(n=>n.map(r=>Ka.path.basename(r,".liquid"))))}}});var my=x(Zn=>{"use strict";p();Object.defineProperty(Zn,"__esModule",{value:!0});Zn.getModule=qle;Zn.getTemplateModule=LV;Zn.getThemeBlockModule=qV;Zn.getSectionModule=IV;Zn.getSectionGroupModule=MV;Zn.getAssetModule=RV;Zn.isLiquidAsset=DV;Zn.assetSources=Ile;Zn.getSnippetModule=jV;Zn.getLayoutModule=BV;var qn=Yt(),Lle=py(),BT=Mc(),jT=new WeakMap;function qle(e,t){let n=FV(e);if(n.has(t))return n.get(t);let r=qn.path.relative(t,e.rootUri);switch(!0){case r.startsWith("assets"):return RV(e,qn.path.basename(t));case r.startsWith("blocks"):return qV(e,qn.path.basename(t,".liquid"));case r.startsWith("layout"):return BV(e,qn.path.basename(t,".liquid"));case r.startsWith("sections"):return r.endsWith(".json")?MV(e,qn.path.basename(t,".json")):IV(e,qn.path.basename(t,".liquid"));case r.startsWith("snippets"):return jV(e,qn.path.basename(t,".liquid"));case r.startsWith("templates"):return LV(e,t)}}function LV(e,t){switch((0,BT.extname)(t)){case"json":return us(e,{type:"JSON",kind:"template",dependencies:[],references:[],uri:t});case"liquid":return us(e,{type:"Liquid",kind:"template",dependencies:[],references:[],uri:t});default:return}}function qV(e,t){let n=qn.path.join(e.rootUri,"blocks",`${t}.liquid`);return us(e,{type:"Liquid",kind:"block",dependencies:[],references:[],uri:n})}function IV(e,t){let n=qn.path.join(e.rootUri,"sections",`${t}.liquid`);return us(e,{type:"Liquid",kind:"section",dependencies:[],references:[],uri:n})}function MV(e,t){let n=qn.path.join(e.rootUri,"sections",`${t}.json`);return us(e,{type:"JSON",kind:"section-group",dependencies:[],references:[],uri:n})}function RV(e,t){let n=(0,BT.extname)(DV(t)?t.slice(0,-7):t),r;if(Lle.SUPPORTED_ASSET_IMAGE_EXTENSIONS.includes(n)?r="Image":n==="js"?r="JavaScript":n==="css"||n==="scss"?r="CSS":n==="svg"&&(r="SVG"),!!r)return us(e,{type:r,kind:"unused",dependencies:[],references:[],uri:qn.path.join(e.rootUri,"assets",t)})}function DV(e){return[".css.liquid",".js.liquid",".scss.liquid"].some(t=>e.endsWith(t))}function Ile(e){if(!["css","js"].includes((0,BT.extname)(e)))return[e];let t=[`${e}.liquid`,e];if(e.endsWith(".scss.css")){let n=e.slice(0,-4);t.push(`${n}.liquid`,n)}return t}function jV(e,t){let n=qn.path.join(e.rootUri,"snippets",`${t}.liquid`);return us(e,{type:"Liquid",kind:"snippet",uri:n,dependencies:[],references:[]})}function BV(e,t="theme"){if(t===!1)return;t===void 0&&(t="theme");let n=qn.path.join(e.rootUri,"layout",`${t}.liquid`);return us(e,{type:"Liquid",kind:"layout",uri:n,dependencies:[],references:[]})}function FV(e){return jT.has(e)||jT.set(e,new Map),jT.get(e)}function us(e,t){let n=FV(e);return n.has(t.uri)||n.set(t.uri,t),n.get(t.uri)}});var WV=x(gy=>{"use strict";p();Object.defineProperty(gy,"__esModule",{value:!0});gy.traverseModule=Gr;gy.bind=Jr;var ls=ue(),vt=Yt(),dn=Mc(),Bt=my();async function Gr(e,t,n){if(!t.modules[e.uri]&&(t.modules[e.uri]=e,e.exists=await(0,dn.exists)(n.fs,e.uri),!!e.exists))switch(e.type){case"Liquid":return Mle(e,t,n);case"JSON":return Fle(e,t,n);case"JavaScript":return;case"CSS":case"SVG":case"Image":return;default:return(0,dn.assertNever)(e)}}async function Mle(e,t,n){let r=await n.getSourceCode(e.uri);if(r.ast instanceof Error)return;let i={LiquidFilter:(f,h)=>{if(["asset_url","asset_img_url","inline_asset_content"].includes(f.name)){let d=h[h.length-1];if(d.type!==ls.NodeTypes.LiquidVariable||d.expression.type!==ls.NodeTypes.String||d.filters[0]!==f)return;let g=d.expression.value,v=(0,Bt.getAssetModule)(t,g);return v?{target:v,sourceRange:[d.position.start,d.position.end]}:void 0}},ContentForMarkup:(f,h)=>{let d=h.at(-1);if(f.contentForType.value!=="block")return;let g=f.args.find(_=>_.name==="type");if(!g)return;let v=g.value;if(v.type!==ls.NodeTypes.String)return;let b=v.value;return{target:(0,Bt.getThemeBlockModule)(t,b),sourceRange:[d.position.start,f.position.end]}},BlockMarkup:(f,h)=>{if(f.name.value.startsWith("shopify://apps/"))return;let d=h.at(-1);return{target:(0,Bt.getThemeBlockModule)(t,f.name.value),sourceRange:[d.position.start,d.position.end]}},HtmlElement:f=>{if(f.name.length!==1||f.name[0].type!==ls.NodeTypes.TextNode)return;let h=f.name[0],d=h.value;if(!d.includes("-"))return;let g=n.getWebComponentDefinitionReference(d);if(!g)return;let{assetName:v,range:b}=g,_=(0,Bt.getAssetModule)(t,v);if(_)return{target:_,sourceRange:[f.blockStartPosition.start,h.position.end],targetRange:b}},RenderMarkup:(f,h)=>{let d=f.snippet,g=h.at(-1);if(!(0,dn.isString)(d)&&d.type===ls.NodeTypes.String)return{target:(0,Bt.getSnippetModule)(t,d.value),sourceRange:[g.position.start,g.position.end]}},LiquidTag:f=>{switch(f.name){case ls.NamedTags.sections:if(!(0,dn.isString)(f.markup)){let h=f.markup.value;return{target:(0,Bt.getSectionGroupModule)(t,h),sourceRange:[f.position.start,f.position.end]}}case ls.NamedTags.section:if(!(0,dn.isString)(f.markup)&&f.markup.type===ls.NodeTypes.SectionMarkup){let h=f.markup.name.value;return{target:(0,Bt.getSectionModule)(t,h),sourceRange:[f.position.start,f.position.end]}}}}},s=(0,vt.visit)(r.ast,i),a=new Map(await Promise.all((0,dn.unique)(s.map(f=>f.target)).map(async f=>[f,await Rle(f,t,n)]))),o=s.map(f=>({...f,target:a.get(f.target)}));for(let f of o)Jr(e,f.target,{sourceRange:f.sourceRange,targetRange:f.targetRange});let l=(0,dn.unique)(o.map(f=>f.target)).map(f=>Gr(f,t,n));if(e.kind==="section"){let f=vt.path.basename(e.uri,".liquid"),h=await n.getSectionSchema(f);l.push(VV(h,e,t,n))}else if(e.kind==="block"&&n.mode==="theme"){let f=vt.path.basename(e.uri,".liquid"),h=await n.getBlockSchema(f);l.push(VV(h,e,t,n))}return Promise.all(l)}async function Rle(e,t,n){if(e.type!=="CSS"&&e.type!=="JavaScript")return e;for(let r of(0,Bt.assetSources)(vt.path.basename(e.uri))){let i=(0,Bt.getAssetModule)(t,r);if(await(0,dn.exists)(n.fs,i.uri))return i}return e}async function VV(e,t,n,r){if(!e||t.kind==="section"&&await(0,dn.acceptsLocalBlocks)(vt.path.basename(t.uri,".liquid"),r))return;let{ast:a,validSchema:o}=e;if(o instanceof Error||a instanceof Error)return;let c=[];return o.blocks&&c.push(Dle(e,t,a,o.blocks,n,r)),o.presets&&c.push(jle(e,t,a,o.presets,n,r)),"default"in o&&o.default&&c.push(Ble(e,t,a,o.default,n,r)),Promise.all(c)}async function Dle(e,t,n,r,i,s){let a=[];for(let[o,c]of Object.entries(r)){let l=["blocks",o],h=(0,vt.nodeAtPath)(n,l).children.find(g=>g.key.value==="type");if(!h)continue;let d=[e.offset+h.loc.start.offset,e.offset+h.loc.end.offset];switch(c.type){case"@theme":{let g=await s.getThemeBlockNames().then(v=>v.filter(b=>!b.startsWith("_")));for(let v of g){let b=(0,Bt.getThemeBlockModule)(i,vt.path.basename(v,".liquid"));Jr(t,b,{sourceRange:d,type:"indirect"}),a.push(Gr(b,i,s))}break}case"@app":break;default:{let g=(0,Bt.getThemeBlockModule)(i,c.type);Jr(t,g,{sourceRange:d}),a.push(Gr(g,i,s))}}}return Promise.all(a)}async function jle(e,t,n,r,i,s){let a=[];for(let[o,c]of r.entries()){if(!("blocks"in c))continue;let l=Array.isArray(c.blocks)?c.blocks.entries():Object.entries(c.blocks);for(let[f,h]of l){let d=["presets",o,"blocks",f],g=(0,vt.nodeAtPath)(n,d),v=(0,Bt.getThemeBlockModule)(i,h.type);if(!v)continue;let b=g.children.find(k=>k.key.value==="type");if(!b)continue;let _=[e.offset+b.loc.start.offset,e.offset+b.loc.end.offset];Jr(t,v,{sourceRange:_,type:"preset"}),a.push(Gr(v,i,s)),h.blocks&&a.push(HV(e,t,n,h.blocks,d,i,s))}}return Promise.all(a)}async function HV(e,t,n,r,i,s,a){let o=[],c=Array.isArray(r)?r.entries():Object.entries(r);for(let[l,f]of c){let h=[...i,"blocks",l],d=(0,vt.nodeAtPath)(n,h),g=(0,Bt.getThemeBlockModule)(s,f.type);if(!g)continue;let v=d.children.find(_=>_.key.value==="type");if(!v)continue;let b=[e.offset+v.loc.start.offset,e.offset+v.loc.end.offset];Jr(t,g,{sourceRange:b,type:"preset"}),o.push(Gr(g,s,a)),f.blocks&&o.push(HV(e,t,n,f.blocks,h,s,a))}return Promise.all(o)}async function Ble(e,t,n,r,i,s){let a=[];if(!("blocks"in r))return;let o=Array.isArray(r.blocks)?r.blocks.entries():Object.entries(r.blocks);for(let[c,l]of o){let f=["default","blocks",c],h=(0,vt.nodeAtPath)(n,f),d=(0,Bt.getThemeBlockModule)(i,l.type);if(!d)continue;let g=h.children.find(b=>b.key.value==="type");if(!g)continue;let v=[e.offset+g.loc.start.offset,e.offset+g.loc.end.offset];Jr(t,d,{sourceRange:v,type:"preset"}),a.push(Gr(d,i,s))}return Promise.all(a)}async function Fle(e,t,n){let r=await n.getSourceCode(e.uri);if(r.type!==vt.SourceCodeType.JSON)throw(0,dn.unexpected)();let i=r.ast;if(!(i instanceof Error))switch(e.kind){case"template":{let s=(0,vt.parseJSON)(r.source),a=await $V(e,s,t,n),o=UV(e,i,s,a,t,n),c=s.layout!==void 0,l=c?s.layout:a?.layout,f=(0,Bt.getLayoutModule)(t,l);if(f){let h;if(c){let d=["layout"],g=(0,vt.nodeAtPath)(i,d);h=[g.loc.start.offset,g.loc.end.offset]}Jr(e,f,{sourceRange:h,type:"indirect"}),o.push(Gr(f,t,n))}return Promise.all(o)}case"section-group":{let s=(0,vt.parseJSON)(r.source),a=await $V(e,s,t,n);return Promise.all(UV(e,i,s,a,t,n))}default:return(0,dn.assertNever)(e.kind)}}async function $V(e,t,n,r){let i=t?.parent;if(!(0,dn.isString)(i))return;let s=e.kind==="template"?"templates":"sections",a=vt.path.join(n.rootUri,s,i),o=await r.getSourceCode(a).catch(()=>{});if(!(o?.type!==vt.SourceCodeType.JSON||o.ast instanceof Error))return(0,vt.parseJSON)(o.source)}function UV(e,t,n,r,i,s){let a=[];for(let[o,c]of Object.entries(n.sections??{})){let l=["sections",o],h=(0,vt.nodeAtPath)(t,l).children.find(v=>v.key.value==="type"),d=r?.sections?.[o]?.type,g=h?c.type:d;if(h){let v=(0,Bt.getSectionModule)(i,c.type),b=[h.loc.start.offset,h.loc.end.offset];Jr(e,v,{sourceRange:b}),a.push(Gr(v,i,s))}a.push(Vle(e,t,l,c,g,i,s))}return a}async function Vle(e,t,n=[],r,i,s,a){if(!(!r.blocks||!(0,dn.isString)(i)||await(0,dn.acceptsLocalBlocks)(i,a)))return zV(e,t,n,r,s,a)}async function zV(e,t,n=[],r,i,s){if(!r.blocks)return;let a=[];for(let[o,c]of Object.entries(r.blocks)){let l=[...n,"blocks",o],h=(0,vt.nodeAtPath)(t,l).children.find(d=>d.key.value==="type");if(h){let d=(0,Bt.getThemeBlockModule)(i,c.type),g=[h.loc.start.offset,h.loc.end.offset];Jr(e,d,{sourceRange:g}),a.push(Gr(d,i,s))}a.push(zV(e,t,l,c,i,s))}return Promise.all(a)}function Jr(e,t,{sourceRange:n,targetRange:r,type:i="direct"}={}){let s={source:{uri:e.uri,range:n},target:{uri:t.uri,range:r},type:i};e.dependencies.push(s),t.references.push(s)}});var GV=x(FT=>{"use strict";p();Object.defineProperty(FT,"__esModule",{value:!0});FT.buildThemeGraph=zle;var Rc=Yt(),$le=CV(),Ule=my(),Hle=WV();async function zle(e,t,n){let r=(0,$le.augmentDependencies)(e,t);n=n??await(0,Rc.recursiveReadDirectory)(r.fs,e,([s])=>{let a=s.startsWith(Rc.path.join(e,"templates")),o=s.startsWith(Rc.path.join(e,"layout"))&&s.endsWith(".liquid"),c=s.startsWith(Rc.path.join(e,"sections"))&&s.endsWith(".liquid"),l=s.startsWith(Rc.path.join(e,"sections"))&&Wle.test(s),f=r.mode==="app"&&s.startsWith(Rc.path.join(e,"blocks"))&&s.endsWith(".liquid");return a||o||c||l||f});let i={entryPoints:[],modules:{},rootUri:e};return i.entryPoints=n.map(s=>(0,Ule.getModule)(i,s)).filter(s=>s!==void 0),await Promise.all(i.entryPoints.map(s=>(0,Hle.traverseModule)(s,i,r))),i}var Wle=/\.context\.[^./]+\.json$/i});var JV=x(VT=>{"use strict";p();Object.defineProperty(VT,"__esModule",{value:!0});VT.serializeThemeGraph=Gle;function Gle(e){let t=Object.values(e.modules).map(r=>({uri:r.uri,type:r.type,kind:r.kind,..."exists"in r?{exists:r.exists}:{}})),n=Object.values(e.modules).flatMap(r=>r.dependencies);return{rootUri:e.rootUri,nodes:t,edges:n}}});var YV=x((yy,KV)=>{p();(function(e,t){typeof yy=="object"&&typeof KV<"u"?t(yy):typeof define=="function"&&define.amd?define(["exports"],t):(e=typeof globalThis<"u"?globalThis:e||self,t((e.acorn=e.acorn||{},e.acorn.walk={})))})(yy,(function(e){"use strict";function t(k,T,w,y,A){w||(w=_),(function P(O,L,D){var M=D||O.type;b(w,M,O,L,P),T[M]&&T[M](O,L)})(k,y,A)}function n(k,T,w,y,A){var P=[];w||(w=_),(function O(L,D,M){var C=M||L.type,q=L!==P[P.length-1];q&&P.push(L),b(w,C,L,D,O),T[C]&&T[C](L,D||P,P),q&&P.pop()})(k,y,A)}function r(k,T,w,y,A){var P=w?d(w,y||void 0):y;(function O(L,D,M){P[M||L.type](L,D,O)})(k,T,A)}function i(k){return typeof k=="string"?function(T){return T===k}:k||function(){return!0}}var s=function(T,w){this.node=T,this.state=w};function a(k,T,w,y,A){w||(w=_);var P;(function O(L,D,M){var C=M||L.type;b(w,C,L,D,O),P!==L&&(T(L,D,C),P=L)})(k,y,A)}function o(k,T,w,y){w||(w=_);var A=[],P;(function O(L,D,M){var C=M||L.type,q=L!==A[A.length-1];q&&A.push(L),b(w,C,L,D,O),P!==L&&(T(L,D||A,A,C),P=L),q&&A.pop()})(k,y)}function c(k,T,w,y,A,P){A||(A=_),y=i(y);try{(function O(L,D,M){var C=M||L.type;if((T==null||L.start<=T)&&(w==null||L.end>=w)&&b(A,C,L,D,O),(T==null||L.start===T)&&(w==null||L.end===w)&&y(C,L))throw new s(L,D)})(k,P)}catch(O){if(O instanceof s)return O;throw O}}function l(k,T,w,y,A){w=i(w),y||(y=_);try{(function P(O,L,D){var M=D||O.type;if(!(O.start>T||O.end<T)&&(b(y,M,O,L,P),w(M,O)))throw new s(O,L)})(k,A)}catch(P){if(P instanceof s)return P;throw P}}function f(k,T,w,y,A){w=i(w),y||(y=_);try{(function P(O,L,D){if(!(O.end<T)){var M=D||O.type;if(O.start>=T&&w(M,O))throw new s(O,L);b(y,M,O,L,P)}})(k,A)}catch(P){if(P instanceof s)return P;throw P}}function h(k,T,w,y,A){w=i(w),y||(y=_);var P;return(function O(L,D,M){if(!(L.start>T)){var C=M||L.type;L.end<=T&&(!P||P.node.end<L.end)&&w(C,L)&&(P=new s(L,D)),b(y,C,L,D,O)}})(k,A),P}function d(k,T){var w=Object.create(T||_);for(var y in k)w[y]=k[y];return w}function g(k,T,w){w(k,T)}function v(k,T,w){}function b(k,T,w,y,A){if(k[T]==null)throw new Error("No walker function defined for node type "+T);k[T](w,y,A)}var _={};_.Program=_.BlockStatement=_.StaticBlock=function(k,T,w){for(var y=0,A=k.body;y<A.length;y+=1){var P=A[y];w(P,T,"Statement")}},_.Statement=g,_.EmptyStatement=v,_.ExpressionStatement=_.ParenthesizedExpression=_.ChainExpression=function(k,T,w){return w(k.expression,T,"Expression")},_.IfStatement=function(k,T,w){w(k.test,T,"Expression"),w(k.consequent,T,"Statement"),k.alternate&&w(k.alternate,T,"Statement")},_.LabeledStatement=function(k,T,w){return w(k.body,T,"Statement")},_.BreakStatement=_.ContinueStatement=v,_.WithStatement=function(k,T,w){w(k.object,T,"Expression"),w(k.body,T,"Statement")},_.SwitchStatement=function(k,T,w){w(k.discriminant,T,"Expression");for(var y=0,A=k.cases;y<A.length;y+=1){var P=A[y];w(P,T)}},_.SwitchCase=function(k,T,w){k.test&&w(k.test,T,"Expression");for(var y=0,A=k.consequent;y<A.length;y+=1){var P=A[y];w(P,T,"Statement")}},_.ReturnStatement=_.YieldExpression=_.AwaitExpression=function(k,T,w){k.argument&&w(k.argument,T,"Expression")},_.ThrowStatement=_.SpreadElement=function(k,T,w){return w(k.argument,T,"Expression")},_.TryStatement=function(k,T,w){w(k.block,T,"Statement"),k.handler&&w(k.handler,T),k.finalizer&&w(k.finalizer,T,"Statement")},_.CatchClause=function(k,T,w){k.param&&w(k.param,T,"Pattern"),w(k.body,T,"Statement")},_.WhileStatement=_.DoWhileStatement=function(k,T,w){w(k.test,T,"Expression"),w(k.body,T,"Statement")},_.ForStatement=function(k,T,w){k.init&&w(k.init,T,"ForInit"),k.test&&w(k.test,T,"Expression"),k.update&&w(k.update,T,"Expression"),w(k.body,T,"Statement")},_.ForInStatement=_.ForOfStatement=function(k,T,w){w(k.left,T,"ForInit"),w(k.right,T,"Expression"),w(k.body,T,"Statement")},_.ForInit=function(k,T,w){k.type==="VariableDeclaration"?w(k,T):w(k,T,"Expression")},_.DebuggerStatement=v,_.FunctionDeclaration=function(k,T,w){return w(k,T,"Function")},_.VariableDeclaration=function(k,T,w){for(var y=0,A=k.declarations;y<A.length;y+=1){var P=A[y];w(P,T)}},_.VariableDeclarator=function(k,T,w){w(k.id,T,"Pattern"),k.init&&w(k.init,T,"Expression")},_.Function=function(k,T,w){k.id&&w(k.id,T,"Pattern");for(var y=0,A=k.params;y<A.length;y+=1){var P=A[y];w(P,T,"Pattern")}w(k.body,T,k.expression?"Expression":"Statement")},_.Pattern=function(k,T,w){k.type==="Identifier"?w(k,T,"VariablePattern"):k.type==="MemberExpression"?w(k,T,"MemberPattern"):w(k,T)},_.VariablePattern=v,_.MemberPattern=g,_.RestElement=function(k,T,w){return w(k.argument,T,"Pattern")},_.ArrayPattern=function(k,T,w){for(var y=0,A=k.elements;y<A.length;y+=1){var P=A[y];P&&w(P,T,"Pattern")}},_.ObjectPattern=function(k,T,w){for(var y=0,A=k.properties;y<A.length;y+=1){var P=A[y];P.type==="Property"?(P.computed&&w(P.key,T,"Expression"),w(P.value,T,"Pattern")):P.type==="RestElement"&&w(P.argument,T,"Pattern")}},_.Expression=g,_.ThisExpression=_.Super=_.MetaProperty=v,_.ArrayExpression=function(k,T,w){for(var y=0,A=k.elements;y<A.length;y+=1){var P=A[y];P&&w(P,T,"Expression")}},_.ObjectExpression=function(k,T,w){for(var y=0,A=k.properties;y<A.length;y+=1){var P=A[y];w(P,T)}},_.FunctionExpression=_.ArrowFunctionExpression=_.FunctionDeclaration,_.SequenceExpression=function(k,T,w){for(var y=0,A=k.expressions;y<A.length;y+=1){var P=A[y];w(P,T,"Expression")}},_.TemplateLiteral=function(k,T,w){for(var y=0,A=k.quasis;y<A.length;y+=1){var P=A[y];w(P,T)}for(var O=0,L=k.expressions;O<L.length;O+=1){var D=L[O];w(D,T,"Expression")}},_.TemplateElement=v,_.UnaryExpression=_.UpdateExpression=function(k,T,w){w(k.argument,T,"Expression")},_.BinaryExpression=_.LogicalExpression=function(k,T,w){w(k.left,T,"Expression"),w(k.right,T,"Expression")},_.AssignmentExpression=_.AssignmentPattern=function(k,T,w){w(k.left,T,"Pattern"),w(k.right,T,"Expression")},_.ConditionalExpression=function(k,T,w){w(k.test,T,"Expression"),w(k.consequent,T,"Expression"),w(k.alternate,T,"Expression")},_.NewExpression=_.CallExpression=function(k,T,w){if(w(k.callee,T,"Expression"),k.arguments)for(var y=0,A=k.arguments;y<A.length;y+=1){var P=A[y];w(P,T,"Expression")}},_.MemberExpression=function(k,T,w){w(k.object,T,"Expression"),k.computed&&w(k.property,T,"Expression")},_.ExportNamedDeclaration=_.ExportDefaultDeclaration=function(k,T,w){if(k.declaration&&w(k.declaration,T,k.type==="ExportNamedDeclaration"||k.declaration.id?"Statement":"Expression"),k.source&&w(k.source,T,"Expression"),k.attributes)for(var y=0,A=k.attributes;y<A.length;y+=1){var P=A[y];w(P,T)}},_.ExportAllDeclaration=function(k,T,w){if(k.exported&&w(k.exported,T),w(k.source,T,"Expression"),k.attributes)for(var y=0,A=k.attributes;y<A.length;y+=1){var P=A[y];w(P,T)}},_.ImportAttribute=function(k,T,w){w(k.value,T,"Expression")},_.ImportDeclaration=function(k,T,w){for(var y=0,A=k.specifiers;y<A.length;y+=1){var P=A[y];w(P,T)}if(w(k.source,T,"Expression"),k.attributes)for(var O=0,L=k.attributes;O<L.length;O+=1){var D=L[O];w(D,T)}},_.ImportExpression=function(k,T,w){w(k.source,T,"Expression"),k.options&&w(k.options,T,"Expression")},_.ImportSpecifier=_.ImportDefaultSpecifier=_.ImportNamespaceSpecifier=_.Identifier=_.PrivateIdentifier=_.Literal=v,_.TaggedTemplateExpression=function(k,T,w){w(k.tag,T,"Expression"),w(k.quasi,T,"Expression")},_.ClassDeclaration=_.ClassExpression=function(k,T,w){return w(k,T,"Class")},_.Class=function(k,T,w){k.id&&w(k.id,T,"Pattern"),k.superClass&&w(k.superClass,T,"Expression"),w(k.body,T)},_.ClassBody=function(k,T,w){for(var y=0,A=k.body;y<A.length;y+=1){var P=A[y];w(P,T)}},_.MethodDefinition=_.PropertyDefinition=_.Property=function(k,T,w){k.computed&&w(k.key,T,"Expression"),k.value&&w(k.value,T,"Expression")},e.ancestor=n,e.base=_,e.findNodeAfter=f,e.findNodeAround=l,e.findNodeAt=c,e.findNodeBefore=h,e.full=a,e.fullAncestor=o,e.make=d,e.recursive=r,e.simple=t}))});var XV=x(_y=>{"use strict";p();Object.defineProperty(_y,"__esModule",{value:!0});_y.getWebComponentMap=Qle;_y.findWebComponentReferences=QV;var $T=Yt(),Jle=YV(),Kle=Mc(),Yle=/^[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 Qle(e,{fs:t,getSourceCode:n}){let r=new Map,i=$T.path.join(e,"assets");if(!await(0,Kle.exists)(t,i))return r;let s=await(0,$T.recursiveReadDirectory)(t,i,([a])=>a.endsWith(".js"));return await Promise.all(s.map(a=>QV(a,i,n,r))),r}async function QV(e,t,n,r){let i=await n(e);if(i.type!=="javascript")return;let s=i.ast;if(!(s instanceof Error))for(let a of s.body)(0,Jle.ancestor)(a,{Literal(o,c,l){if(typeof o.value=="string"&&Yle.test(o.value)){let f=l.at(-2);if(!f||f.type!=="CallExpression")return;let h=f.callee;if(h.type!=="MemberExpression")return;let d=h.property;if(d.type!=="Identifier"||d.name!=="define")return;r.set(o.value,{assetName:$T.path.relative(e,t),range:[d.start,o.end]})}return null}})}});var e$=x(Ze=>{"use strict";p();var Xle=Ze&&Ze.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Zle=Ze&&Ze.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Xle(t,e,n)};Object.defineProperty(Ze,"__esModule",{value:!0});Ze.toSvgSourceCode=Ze.toSourceCode=Ze.toJsSourceCode=Ze.toCssSourceCode=Ze.findWebComponentReferences=Ze.getWebComponentMap=Ze.serializeThemeGraph=Ze.assetSources=Ze.buildThemeGraph=void 0;var efe=GV();Object.defineProperty(Ze,"buildThemeGraph",{enumerable:!0,get:function(){return efe.buildThemeGraph}});var tfe=my();Object.defineProperty(Ze,"assetSources",{enumerable:!0,get:function(){return tfe.assetSources}});var nfe=JV();Object.defineProperty(Ze,"serializeThemeGraph",{enumerable:!0,get:function(){return nfe.serializeThemeGraph}});var ZV=XV();Object.defineProperty(Ze,"getWebComponentMap",{enumerable:!0,get:function(){return ZV.getWebComponentMap}});Object.defineProperty(Ze,"findWebComponentReferences",{enumerable:!0,get:function(){return ZV.findWebComponentReferences}});var vy=MT();Object.defineProperty(Ze,"toCssSourceCode",{enumerable:!0,get:function(){return vy.toCssSourceCode}});Object.defineProperty(Ze,"toJsSourceCode",{enumerable:!0,get:function(){return vy.toJsSourceCode}});Object.defineProperty(Ze,"toSourceCode",{enumerable:!0,get:function(){return vy.toSourceCode}});Object.defineProperty(Ze,"toSvgSourceCode",{enumerable:!0,get:function(){return vy.toSvgSourceCode}});Zle(py(),Ze)});var r$=x((tCe,HT)=>{"use strict";p();var at=ce("path"),t$=ce("os"),fs=t$.homedir(),UT=t$.tmpdir(),{env:Dc}=process,rfe=e=>{let t=at.join(fs,"Library");return{data:at.join(t,"Application Support",e),config:at.join(t,"Preferences",e),cache:at.join(t,"Caches",e),log:at.join(t,"Logs",e),temp:at.join(UT,e)}},ife=e=>{let t=Dc.APPDATA||at.join(fs,"AppData","Roaming"),n=Dc.LOCALAPPDATA||at.join(fs,"AppData","Local");return{data:at.join(n,e,"Data"),config:at.join(t,e,"Config"),cache:at.join(n,e,"Cache"),log:at.join(n,e,"Log"),temp:at.join(UT,e)}},sfe=e=>{let t=at.basename(fs);return{data:at.join(Dc.XDG_DATA_HOME||at.join(fs,".local","share"),e),config:at.join(Dc.XDG_CONFIG_HOME||at.join(fs,".config"),e),cache:at.join(Dc.XDG_CACHE_HOME||at.join(fs,".cache"),e),log:at.join(Dc.XDG_STATE_HOME||at.join(fs,".local","state"),e),temp:at.join(UT,t,e)}},n$=(e,t)=>{if(typeof e!="string")throw new TypeError(`Expected string, got ${typeof e}`);return t=Object.assign({suffix:"nodejs"},t),t.suffix&&(e+=`-${t.suffix}`),process.platform==="darwin"?rfe(e):process.platform==="win32"?ife(e):sfe(e)};HT.exports=n$;HT.exports.default=n$});var zT=x(er=>{"use strict";p();Object.defineProperty(er,"__esModule",{value:!0});er.memoize=er.memo=er.tap=er.identity=er.noop=void 0;var afe=()=>{};er.noop=afe;var ofe=e=>e;er.identity=ofe;var cfe=e=>t=>(e(t),t);er.tap=cfe;var i$=Yt();Object.defineProperty(er,"memo",{enumerable:!0,get:function(){return i$.memo}});Object.defineProperty(er,"memoize",{enumerable:!0,get:function(){return i$.memoize}})});var YT=x(Oe=>{"use strict";p();var Sy=Oe&&Oe.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Oe,"__esModule",{value:!0});Oe.Manifests=Oe.Resources=Oe.ThemeLiquidDocsSchemaRoot=Oe.ThemeLiquidDocsRoot=Oe.root=void 0;Oe.downloadSchema=s$;Oe.downloadResource=a$;Oe.download=GT;Oe.resourcePath=by;Oe.resourceUrl=ky;Oe.schemaPath=JT;Oe.schemaUrl=KT;Oe.exists=o$;Oe.downloadThemeLiquidDocs=c$;Oe.replaceThemeLiquidDocs=hfe;var ufe=Sy(r$()),lfe=Sy(JE()),xi=Sy(ce("node:fs/promises")),WT=Sy(ce("node:path")),tf=zT(),ffe=(0,ufe.default)("theme-liquid-docs");Oe.root=ffe.cache;Oe.ThemeLiquidDocsRoot="https://raw.githubusercontent.com/Shopify/theme-liquid-docs/main";Oe.ThemeLiquidDocsSchemaRoot=`${Oe.ThemeLiquidDocsRoot}/schemas`;Oe.Resources=["filters","objects","tags","shopify_system_translations","manifest_theme","manifest_theme_app_extension"];Oe.Manifests={app:"manifest_theme_app_extension",theme:"manifest_theme"};var dfe={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 s$(e,t=Oe.root,n=tf.noop){let r=KT(e),i=JT(e,t),s=await GT(r,n);return await xi.default.writeFile(i,s,"utf8"),s}async function a$(e,t=Oe.root,n=tf.noop){let r=ky(e),i=by(e,t),s=await GT(r,n);return await xi.default.writeFile(i,s,"utf8"),s}async function GT(e,t){if(e.startsWith("file:"))return await xi.default.readFile(e.replace(/^file:/,""),"utf8").then((0,tf.tap)(()=>t(`Using local file: ${e}`))).catch(n=>{throw t(`Failed to read local file: ${e}`),n});{let n=await(0,lfe.default)(e);if(!n.ok)throw new Error(`${n.status} ${n.statusText}: ${e}`);return n.text()}}function by(e,t=Oe.root){return WT.default.join(t,`${e}.json`)}function ky(e){let t=dfe[e];return`${process.env.SHOPIFY_TLD_ROOT?`file:${process.env.SHOPIFY_TLD_ROOT}`:Oe.ThemeLiquidDocsRoot}/${t}`}function JT(e,t=Oe.root){return WT.default.resolve(t,WT.default.basename(e))}function KT(e){return`${process.env.SHOPIFY_TLD_ROOT?`file:${process.env.SHOPIFY_TLD_ROOT}`:Oe.ThemeLiquidDocsRoot}/schemas/${e}`}async function o$(e){try{return await xi.default.stat(e),!0}catch{return!1}}async function c$(e,t){await o$(e)||await xi.default.mkdir(e);let n=["latest"].concat(Oe.Resources),r=await Promise.all(n.map(a=>a$(a,e,t).then((0,tf.tap)(()=>t(`Successfully downloaded latest resource:
|
|
101
|
+
${ky(a)}
|
|
102
|
+
> ${by(a,e)}`))).catch(o=>{throw t(`Failed to download latest resource:
|
|
103
|
+
${ky(a)} to
|
|
104
|
+
${by(a,e)}
|
|
105
|
+
${o}`),o}))),s=Object.values(Oe.Manifests).map(a=>n.indexOf(a)).map(a=>r[a]).map(a=>JSON.parse(a)).flatMap(a=>a.schemas.map(o=>o.uri));await Promise.all(pfe(s).map(a=>s$(a,e,t).then((0,tf.tap)(()=>t(`Successfully downloaded schema:
|
|
106
|
+
${KT(a)}
|
|
107
|
+
> ${JT(a,e)}`))).catch(o=>{throw t(`Failed to download schema: ${a}, ${o}`),o})))}async function hfe(e,t){let n=`${e}.${process.pid}.${Math.random().toString(36).slice(2)}`,r=`${n}.tmp`,i=`${n}.old`;try{await c$(r,t),await xi.default.rename(e,i).catch(s=>{if(s.code!=="ENOENT")throw s}),await xi.default.rename(r,e)}finally{await xi.default.rm(r,{recursive:!0,force:!0,maxRetries:3}),await xi.default.rm(i,{recursive:!0,force:!0,maxRetries:3})}}function pfe(e){return[...new Set(e).values()]}});var f$=x(jc=>{"use strict";p();var u$=jc&&jc.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(jc,"__esModule",{value:!0});jc.ThemeLiquidDocsManager=void 0;var rf=u$(ce("node:fs/promises")),Ty=u$(ce("node:path")),In=YT(),hn=zT(),QT=class{log;constructor(t=hn.noop){this.log=t}filters=(0,hn.memo)(async()=>ds(this.loaders("filters"),JSON.parse,[],this.log));objects=(0,hn.memo)(async()=>ds(this.loaders("objects"),JSON.parse,[],this.log));liquidDrops=(0,hn.memo)(async()=>ds(this.loaders("objects"),JSON.parse,[],this.log));tags=(0,hn.memo)(async()=>ds(this.loaders("tags"),JSON.parse,[],this.log));systemTranslations=(0,hn.memo)(async()=>ds(this.loaders("shopify_system_translations"),JSON.parse,{},this.log));schemas=(0,hn.memoize)(t=>ds(this.loaders(In.Manifests[t]),JSON.parse,{schemas:[]},this.log).then(n=>Promise.all(n.schemas.map(async r=>({uri:`${In.ThemeLiquidDocsSchemaRoot}/${r.uri}`,fileMatch:r.fileMatch,schema:await ds(this.schemaLoaders(r.uri),hn.identity,"",this.log)})))),hn.identity);setup=(0,hn.memo)(async()=>{try{await(0,In.exists)(In.root)||await rf.default.mkdir(In.root,{recursive:!0});let t=await this.latestRevision(),n=JSON.parse(await(0,In.download)((0,In.resourceUrl)("latest"),this.log)).revision??"";t!==n&&await(0,In.replaceThemeLiquidDocs)(In.root,this.log)}catch(t){t instanceof Error&&this.log(`Failed to setup with the following error: ${t.message}`);return}});async latestRevision(){return(await ds([nf(()=>this.load("latest"),"loadLatestRevision")],JSON.parse,{},this.log)).revision??""}async loadResource(t){return await this.setup(),this.load(t).then((0,hn.tap)(()=>this.log(`Loaded resource from ${(0,In.resourcePath)(t)}`)))}async load(t){return rf.default.readFile((0,In.resourcePath)(t),"utf8")}async loadSchema(t){return rf.default.readFile((0,In.schemaPath)(t),"utf8").then((0,hn.tap)(()=>this.log(`Loaded schema from ${(0,In.schemaPath)(t)}`)))}loaders(t){return[nf(()=>this.loadResource(t),`loadResource(${t})`),nf(()=>mfe(t,this.log),`fallbackResource(${t})`)]}schemaLoaders(t){return[nf(()=>this.loadSchema(t),`loadSchema(${t})`),nf(()=>gfe(t,this.log),`fallbackSchema(${t})`)]}};jc.ThemeLiquidDocsManager=QT;function nf(e,t){return Object.assign(e,{loaderName:t})}async function ds(e,t,n,r){for(let i of e)try{return t(await i())}catch(s){r(`Failed to load or transform ${i.loaderName} with the following error:
|
|
108
|
+
${s instanceof Error?s.message:s}`);continue}return n}function l$(){return Ty.default.resolve(__dirname,"./data")}async function mfe(e,t){let n=Ty.default.resolve(l$(),`${e}.json`);return rf.default.readFile(n,"utf8").then((0,hn.tap)(()=>t(`Loaded fallback resource
|
|
109
|
+
${e} from
|
|
110
|
+
${n}`)))}async function gfe(e,t){let n=Ty.default.resolve(l$(),Ty.default.basename(e));return rf.default.readFile(n,"utf8").then((0,hn.tap)(()=>t(`Loaded fallback schema
|
|
111
|
+
${e} from
|
|
112
|
+
${n}`)))}});var d$=x(tr=>{"use strict";p();Object.defineProperty(tr,"__esModule",{value:!0});tr.root=tr.downloadThemeLiquidDocs=tr.downloadResource=tr.Resources=tr.ThemeLiquidDocsManager=void 0;var yfe=f$();Object.defineProperty(tr,"ThemeLiquidDocsManager",{enumerable:!0,get:function(){return yfe.ThemeLiquidDocsManager}});var wy=YT();Object.defineProperty(tr,"Resources",{enumerable:!0,get:function(){return wy.Resources}});Object.defineProperty(tr,"downloadResource",{enumerable:!0,get:function(){return wy.downloadResource}});Object.defineProperty(tr,"downloadThemeLiquidDocs",{enumerable:!0,get:function(){return wy.downloadThemeLiquidDocs}});Object.defineProperty(tr,"root",{enumerable:!0,get:function(){return wy.root}})});var h$=x(XT=>{p();var Ya=ce("path"),ps=process.platform==="win32",hs=ce("fs"),_fe=process.env.NODE_DEBUG&&/fs/.test(process.env.NODE_DEBUG);function vfe(){var e;if(_fe){var t=new Error;e=n}else e=r;return e;function n(i){i&&(t.message=i.message,i=t,r(i))}function r(i){if(i){if(process.throwDeprecation)throw i;if(!process.noDeprecation){var s="fs: missing callback "+(i.stack||i.message);process.traceDeprecation?console.trace(s):console.error(s)}}}}function bfe(e){return typeof e=="function"?e:vfe()}var fCe=Ya.normalize;ps?Ei=/(.*?)(?:[\/\\]+|$)/g:Ei=/(.*?)(?:[\/]+|$)/g;var Ei;ps?sf=/^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/:sf=/^[\/]*/;var sf;XT.realpathSync=function(t,n){if(t=Ya.resolve(t),n&&Object.prototype.hasOwnProperty.call(n,t))return n[t];var r=t,i={},s={},a,o,c,l;f();function f(){var _=sf.exec(t);a=_[0].length,o=_[0],c=_[0],l="",ps&&!s[c]&&(hs.lstatSync(c),s[c]=!0)}for(;a<t.length;){Ei.lastIndex=a;var h=Ei.exec(t);if(l=o,o+=h[0],c=l+h[1],a=Ei.lastIndex,!(s[c]||n&&n[c]===c)){var d;if(n&&Object.prototype.hasOwnProperty.call(n,c))d=n[c];else{var g=hs.lstatSync(c);if(!g.isSymbolicLink()){s[c]=!0,n&&(n[c]=c);continue}var v=null;if(!ps){var b=g.dev.toString(32)+":"+g.ino.toString(32);i.hasOwnProperty(b)&&(v=i[b])}v===null&&(hs.statSync(c),v=hs.readlinkSync(c)),d=Ya.resolve(l,v),n&&(n[c]=d),ps||(i[b]=v)}t=Ya.resolve(d,t.slice(a)),f()}}return n&&(n[r]=t),t};XT.realpath=function(t,n,r){if(typeof r!="function"&&(r=bfe(n),n=null),t=Ya.resolve(t),n&&Object.prototype.hasOwnProperty.call(n,t))return process.nextTick(r.bind(null,null,n[t]));var i=t,s={},a={},o,c,l,f;h();function h(){var _=sf.exec(t);o=_[0].length,c=_[0],l=_[0],f="",ps&&!a[l]?hs.lstat(l,function(k){if(k)return r(k);a[l]=!0,d()}):process.nextTick(d)}function d(){if(o>=t.length)return n&&(n[i]=t),r(null,t);Ei.lastIndex=o;var _=Ei.exec(t);return f=c,c+=_[0],l=f+_[1],o=Ei.lastIndex,a[l]||n&&n[l]===l?process.nextTick(d):n&&Object.prototype.hasOwnProperty.call(n,l)?b(n[l]):hs.lstat(l,g)}function g(_,k){if(_)return r(_);if(!k.isSymbolicLink())return a[l]=!0,n&&(n[l]=l),process.nextTick(d);if(!ps){var T=k.dev.toString(32)+":"+k.ino.toString(32);if(s.hasOwnProperty(T))return v(null,s[T],l)}hs.stat(l,function(w){if(w)return r(w);hs.readlink(l,function(y,A){ps||(s[T]=A),v(y,A)})})}function v(_,k,T){if(_)return r(_);var w=Ya.resolve(f,k);n&&(n[T]=w),b(w)}function b(_){t=Ya.resolve(_,t.slice(o)),h()}}});var nw=x((pCe,y$)=>{p();y$.exports=ms;ms.realpath=ms;ms.sync=tw;ms.realpathSync=tw;ms.monkeypatch=Sfe;ms.unmonkeypatch=Tfe;var Bc=ce("fs"),ZT=Bc.realpath,ew=Bc.realpathSync,kfe=process.version,p$=/^v[0-5]\./.test(kfe),m$=h$();function g$(e){return e&&e.syscall==="realpath"&&(e.code==="ELOOP"||e.code==="ENOMEM"||e.code==="ENAMETOOLONG")}function ms(e,t,n){if(p$)return ZT(e,t,n);typeof t=="function"&&(n=t,t=null),ZT(e,t,function(r,i){g$(r)?m$.realpath(e,t,n):n(r,i)})}function tw(e,t){if(p$)return ew(e,t);try{return ew(e,t)}catch(n){if(g$(n))return m$.realpathSync(e,t);throw n}}function Sfe(){Bc.realpath=ms,Bc.realpathSync=tw}function Tfe(){Bc.realpath=ZT,Bc.realpathSync=ew}});var v$=x((gCe,_$)=>{p();var wfe=typeof process=="object"&&process&&process.platform==="win32";_$.exports=wfe?{sep:"\\"}:{sep:"/"}});var Ey=x((vCe,ow)=>{p();var Mn=ow.exports=(e,t,n={})=>(xy(t),!n.nocomment&&t.charAt(0)==="#"?!1:new Fc(t,n).match(e));ow.exports=Mn;var sw=v$();Mn.sep=sw.sep;var rn=Symbol("globstar **");Mn.GLOBSTAR=rn;var xfe=$9(),b$={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},aw="[^/]",rw=aw+"*?",Efe="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",Afe="(?:(?!(?:\\/|^)\\.).)*?",T$=e=>e.split("").reduce((t,n)=>(t[n]=!0,t),{}),k$=T$("().*{}+?[]^$\\!"),Ofe=T$("[.("),S$=/\/+/;Mn.filter=(e,t={})=>(n,r,i)=>Mn(n,e,t);var gs=(e,t={})=>{let n={};return Object.keys(e).forEach(r=>n[r]=e[r]),Object.keys(t).forEach(r=>n[r]=t[r]),n};Mn.defaults=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return Mn;let t=Mn,n=(r,i,s)=>t(r,i,gs(e,s));return n.Minimatch=class extends t.Minimatch{constructor(i,s){super(i,gs(e,s))}},n.Minimatch.defaults=r=>t.defaults(gs(e,r)).Minimatch,n.filter=(r,i)=>t.filter(r,gs(e,i)),n.defaults=r=>t.defaults(gs(e,r)),n.makeRe=(r,i)=>t.makeRe(r,gs(e,i)),n.braceExpand=(r,i)=>t.braceExpand(r,gs(e,i)),n.match=(r,i,s)=>t.match(r,i,gs(e,s)),n};Mn.braceExpand=(e,t)=>w$(e,t);var w$=(e,t={})=>(xy(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:xfe(e)),Pfe=1024*64,xy=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>Pfe)throw new TypeError("pattern is too long")},iw=Symbol("subparse");Mn.makeRe=(e,t)=>new Fc(e,t||{}).makeRe();Mn.match=(e,t,n={})=>{let r=new Fc(t,n);return e=e.filter(i=>r.match(i)),r.options.nonull&&!e.length&&e.push(t),e};var Nfe=e=>e.replace(/\\(.)/g,"$1"),Cfe=e=>e.replace(/\\([^-\]])/g,"$1"),Lfe=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),qfe=e=>e.replace(/[[\]\\]/g,"\\$&"),Fc=class{constructor(t,n){xy(t),n||(n={}),this.options=n,this.maxGlobstarRecursion=n.maxGlobstarRecursion!==void 0?n.maxGlobstarRecursion:200,this.set=[],this.pattern=t,this.windowsPathsNoEscape=!!n.windowsPathsNoEscape||n.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!n.partial,this.make()}debug(){}make(){let t=this.pattern,n=this.options;if(!n.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate();let r=this.globSet=this.braceExpand();n.debug&&(this.debug=(...i)=>console.error(...i)),this.debug(this.pattern,r),r=this.globParts=r.map(i=>i.split(S$)),this.debug(this.pattern,r),r=r.map((i,s,a)=>i.map(this.parse,this)),this.debug(this.pattern,r),r=r.filter(i=>i.indexOf(!1)===-1),this.debug(this.pattern,r),this.set=r}parseNegate(){if(this.options.nonegate)return;let t=this.pattern,n=!1,r=0;for(let i=0;i<t.length&&t.charAt(i)==="!";i++)n=!n,r++;r&&(this.pattern=t.slice(r)),this.negate=n}matchOne(t,n,r){return n.indexOf(rn)!==-1?this._matchGlobstar(t,n,r,0,0):this._matchOne(t,n,r,0,0)}_matchGlobstar(t,n,r,i,s){let a=-1;for(let T=s;T<n.length;T++)if(n[T]===rn){a=T;break}let o=-1;for(let T=n.length-1;T>=0;T--)if(n[T]===rn){o=T;break}let c=n.slice(s,a),l=r?n.slice(a+1):n.slice(a+1,o),f=r?[]:n.slice(o+1);if(c.length){let T=t.slice(i,i+c.length);if(!this._matchOne(T,c,r,0,0))return!1;i+=c.length}let h=0;if(f.length){if(f.length+i>t.length)return!1;let T=t.length-f.length;if(this._matchOne(t,f,r,T,0))h=f.length;else{if(t[t.length-1]!==""||i+f.length===t.length||!this._matchOne(t,f,r,T-1,0))return!1;h=f.length+1}}if(!l.length){let T=!!h;for(let w=i;w<t.length-h;w++){let y=String(t[w]);if(T=!0,y==="."||y===".."||!this.options.dot&&y.charAt(0)===".")return!1}return r||T}let d=[[[],0]],g=d[0],v=0,b=[0];for(let T of l)T===rn?(b.push(v),g=[[],0],d.push(g)):(g[0].push(T),v++);let _=d.length-1,k=t.length-h;for(let T of d)T[1]=k-(b[_--]+T[0].length);return!!this._matchGlobStarBodySections(t,d,i,0,r,0,!!h)}_matchGlobStarBodySections(t,n,r,i,s,a,o){let c=n[i];if(!c){for(let h=r;h<t.length;h++){o=!0;let d=t[h];if(d==="."||d===".."||!this.options.dot&&d.charAt(0)===".")return!1}return o}let[l,f]=c;for(;r<=f;){if(this._matchOne(t.slice(0,r+l.length),l,s,r,0)&&a<this.maxGlobstarRecursion){let g=this._matchGlobStarBodySections(t,n,r+l.length,i+1,s,a+1,o);if(g!==!1)return g}let d=t[r];if(d==="."||d===".."||!this.options.dot&&d.charAt(0)===".")return!1;r++}return s||null}_matchOne(t,n,r,i,s){let a,o,c,l;for(a=i,o=s,c=t.length,l=n.length;a<c&&o<l;a++,o++){this.debug("matchOne loop");let f=n[o],h=t[a];if(this.debug(n,f,h),f===!1||f===rn)return!1;let d;if(typeof f=="string"?(d=h===f,this.debug("string match",f,h,d)):(d=h.match(f),this.debug("pattern match",f,h,d)),!d)return!1}if(a===c&&o===l)return!0;if(a===c)return r;if(o===l)return a===c-1&&t[a]==="";throw new Error("wtf?")}braceExpand(){return w$(this.pattern,this.options)}parse(t,n){xy(t);let r=this.options;if(t==="**")if(r.noglobstar)t="*";else return rn;if(t==="")return"";let i="",s=!1,a=!1,o=[],c=[],l,f=!1,h=-1,d=-1,g,v,b,_=t.charAt(0)===".",k=r.dot||_,T=()=>_?"":k?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",w=O=>O.charAt(0)==="."?"":r.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",y=()=>{if(l){switch(l){case"*":i+=rw,s=!0;break;case"?":i+=aw,s=!0;break;default:i+="\\"+l;break}this.debug("clearStateChar %j %j",l,i),l=!1}};for(let O=0,L;O<t.length&&(L=t.charAt(O));O++){if(this.debug("%s %s %s %j",t,O,i,L),a){if(L==="/")return!1;k$[L]&&(i+="\\"),i+=L,a=!1;continue}switch(L){case"/":return!1;case"\\":if(f&&t.charAt(O+1)==="-"){i+=L;continue}y(),a=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s %s %s %j <-- stateChar",t,O,i,L),f){this.debug(" in class"),L==="!"&&O===d+1&&(L="^"),i+=L;continue}if(L==="*"&&l==="*")continue;this.debug("call clearStateChar %j",l),y(),l=L,r.noext&&y();continue;case"(":{if(f){i+="(";continue}if(!l){i+="\\(";continue}let D={type:l,start:O-1,reStart:i.length,open:b$[l].open,close:b$[l].close};this.debug(this.pattern," ",D),o.push(D),i+=D.open,D.start===0&&D.type!=="!"&&(_=!0,i+=w(t.slice(O+1))),this.debug("plType %j %j",l,i),l=!1;continue}case")":{let D=o[o.length-1];if(f||!D){i+="\\)";continue}o.pop(),y(),s=!0,v=D,i+=v.close,v.type==="!"&&c.push(Object.assign(v,{reEnd:i.length}));continue}case"|":{let D=o[o.length-1];if(f||!D){i+="\\|";continue}y(),i+="|",D.start===0&&D.type!=="!"&&(_=!0,i+=w(t.slice(O+1)));continue}case"[":if(y(),f){i+="\\"+L;continue}f=!0,d=O,h=i.length,i+=L;continue;case"]":if(O===d+1||!f){i+="\\"+L;continue}g=t.substring(d+1,O);try{RegExp("["+qfe(Cfe(g))+"]"),i+=L}catch{i=i.substring(0,h)+"(?:$.)"}s=!0,f=!1;continue;default:y(),k$[L]&&!(L==="^"&&f)&&(i+="\\"),i+=L;break}}for(f&&(g=t.slice(d+1),b=this.parse(g,iw),i=i.substring(0,h)+"\\["+b[0],s=s||b[1]),v=o.pop();v;v=o.pop()){let O;O=i.slice(v.reStart+v.open.length),this.debug("setting tail",i,v),O=O.replace(/((?:\\{2}){0,64})(\\?)\|/g,(D,M,C)=>(C||(C="\\"),M+M+C+"|")),this.debug(`tail=%j
|
|
113
|
+
%s`,O,O,v,i);let L=v.type==="*"?rw:v.type==="?"?aw:"\\"+v.type;s=!0,i=i.slice(0,v.reStart)+L+"\\("+O}y(),a&&(i+="\\\\");let A=Ofe[i.charAt(0)];for(let O=c.length-1;O>-1;O--){let L=c[O],D=i.slice(0,L.reStart),M=i.slice(L.reStart,L.reEnd-8),C=i.slice(L.reEnd),q=i.slice(L.reEnd-8,L.reEnd)+C,V=D.split(")").length,$=D.split("(").length-V,I=C;for(let U=0;U<$;U++)I=I.replace(/\)[+*?]?/,"");C=I;let B=C===""&&n!==iw?"(?:$|\\/)":"";i=D+M+C+B+q}if(i!==""&&s&&(i="(?=.)"+i),A&&(i=T()+i),n===iw)return[i,s];if(r.nocase&&!s&&(s=t.toUpperCase()!==t.toLowerCase()),!s)return Nfe(t);let P=r.nocase?"i":"";try{return Object.assign(new RegExp("^"+i+"$",P),{_glob:t,_src:i})}catch{return new RegExp("$.")}}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let n=this.options,r=n.noglobstar?rw:n.dot?Efe:Afe,i=n.nocase?"i":"",s=t.map(a=>(a=a.map(o=>typeof o=="string"?Lfe(o):o===rn?rn:o._src).reduce((o,c)=>(o[o.length-1]===rn&&c===rn||o.push(c),o),[]),a.forEach((o,c)=>{o!==rn||a[c-1]===rn||(c===0?a.length>1?a[c+1]="(?:\\/|"+r+"\\/)?"+a[c+1]:a[c]=r:c===a.length-1?a[c-1]+="(?:\\/|"+r+")?":(a[c-1]+="(?:\\/|\\/"+r+"\\/)"+a[c+1],a[c+1]=rn))}),a.filter(o=>o!==rn).join("/"))).join("|");s="^(?:"+s+")$",this.negate&&(s="^(?!"+s+").*$");try{this.regexp=new RegExp(s,i)}catch{this.regexp=!1}return this.regexp}match(t,n=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&n)return!0;let r=this.options;sw.sep!=="/"&&(t=t.split(sw.sep).join("/")),t=t.split(S$),this.debug(this.pattern,"split",t);let i=this.set;this.debug(this.pattern,"set",i);let s;for(let a=t.length-1;a>=0&&(s=t[a],!s);a--);for(let a=0;a<i.length;a++){let o=i[a],c=t;if(r.matchBase&&o.length===1&&(c=[s]),this.matchOne(c,o,n))return r.flipNegate?!0:!this.negate}return r.flipNegate?!1:this.negate}static defaults(t){return Mn.defaults(t).Minimatch}};Mn.Minimatch=Fc});var x$=x((kCe,cw)=>{p();typeof Object.create=="function"?cw.exports=function(t,n){n&&(t.super_=n,t.prototype=Object.create(n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:cw.exports=function(t,n){if(n){t.super_=n;var r=function(){};r.prototype=n.prototype,t.prototype=new r,t.prototype.constructor=t}}});var E$=x((TCe,lw)=>{p();try{if(uw=ce("util"),typeof uw.inherits!="function")throw"";lw.exports=uw.inherits}catch{lw.exports=x$()}var uw});var dw=x(ys=>{p();ys.setopts=Bfe;ys.ownProp=A$;ys.makeAbs=af;ys.finish=Ffe;ys.mark=Vfe;ys.isIgnored=P$;ys.childrenIgnored=$fe;function A$(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var Ife=ce("fs"),Qa=ce("path"),Mfe=Ey(),O$=ce("path").isAbsolute,fw=Mfe.Minimatch;function Rfe(e,t){return e.localeCompare(t,"en")}function Dfe(e,t){e.ignore=t.ignore||[],Array.isArray(e.ignore)||(e.ignore=[e.ignore]),e.ignore.length&&(e.ignore=e.ignore.map(jfe))}function jfe(e){var t=null;if(e.slice(-3)==="/**"){var n=e.replace(/(\/\*\*)+$/,"");t=new fw(n,{dot:!0})}return{matcher:new fw(e,{dot:!0}),gmatcher:t}}function Bfe(e,t,n){if(n||(n={}),n.matchBase&&t.indexOf("/")===-1){if(n.noglobstar)throw new Error("base matching requires globstar");t="**/"+t}e.windowsPathsNoEscape=!!n.windowsPathsNoEscape||n.allowWindowsEscape===!1,e.windowsPathsNoEscape&&(t=t.replace(/\\/g,"/")),e.silent=!!n.silent,e.pattern=t,e.strict=n.strict!==!1,e.realpath=!!n.realpath,e.realpathCache=n.realpathCache||Object.create(null),e.follow=!!n.follow,e.dot=!!n.dot,e.mark=!!n.mark,e.nodir=!!n.nodir,e.nodir&&(e.mark=!0),e.sync=!!n.sync,e.nounique=!!n.nounique,e.nonull=!!n.nonull,e.nosort=!!n.nosort,e.nocase=!!n.nocase,e.stat=!!n.stat,e.noprocess=!!n.noprocess,e.absolute=!!n.absolute,e.fs=n.fs||Ife,e.maxLength=n.maxLength||1/0,e.cache=n.cache||Object.create(null),e.statCache=n.statCache||Object.create(null),e.symlinks=n.symlinks||Object.create(null),Dfe(e,n),e.changedCwd=!1;var r=process.cwd();A$(n,"cwd")?(e.cwd=Qa.resolve(n.cwd),e.changedCwd=e.cwd!==r):e.cwd=Qa.resolve(r),e.root=n.root||Qa.resolve(e.cwd,"/"),e.root=Qa.resolve(e.root),e.cwdAbs=O$(e.cwd)?e.cwd:af(e,e.cwd),e.nomount=!!n.nomount,process.platform==="win32"&&(e.root=e.root.replace(/\\/g,"/"),e.cwd=e.cwd.replace(/\\/g,"/"),e.cwdAbs=e.cwdAbs.replace(/\\/g,"/")),n.nonegate=!0,n.nocomment=!0,e.minimatch=new fw(t,n),e.options=e.minimatch.options}function Ffe(e){for(var t=e.nounique,n=t?[]:Object.create(null),r=0,i=e.matches.length;r<i;r++){var s=e.matches[r];if(!s||Object.keys(s).length===0){if(e.nonull){var a=e.minimatch.globSet[r];t?n.push(a):n[a]=!0}}else{var o=Object.keys(s);t?n.push.apply(n,o):o.forEach(function(c){n[c]=!0})}}if(t||(n=Object.keys(n)),e.nosort||(n=n.sort(Rfe)),e.mark){for(var r=0;r<n.length;r++)n[r]=e._mark(n[r]);e.nodir&&(n=n.filter(function(c){var l=!/\/$/.test(c),f=e.cache[c]||e.cache[af(e,c)];return l&&f&&(l=f!=="DIR"&&!Array.isArray(f)),l}))}e.ignore.length&&(n=n.filter(function(c){return!P$(e,c)})),e.found=n}function Vfe(e,t){var n=af(e,t),r=e.cache[n],i=t;if(r){var s=r==="DIR"||Array.isArray(r),a=t.slice(-1)==="/";if(s&&!a?i+="/":!s&&a&&(i=i.slice(0,-1)),i!==t){var o=af(e,i);e.statCache[o]=e.statCache[n],e.cache[o]=e.cache[n]}}return i}function af(e,t){var n=t;return t.charAt(0)==="/"?n=Qa.join(e.root,t):O$(t)||t===""?n=t:e.changedCwd?n=Qa.resolve(e.cwd,t):n=Qa.resolve(t),process.platform==="win32"&&(n=n.replace(/\\/g,"/")),n}function P$(e,t){return e.ignore.length?e.ignore.some(function(n){return n.matcher.match(t)||!!(n.gmatcher&&n.gmatcher.match(t))}):!1}function $fe(e,t){return e.ignore.length?e.ignore.some(function(n){return!!(n.gmatcher&&n.gmatcher.match(t))}):!1}});var I$=x((NCe,q$)=>{p();q$.exports=L$;L$.GlobSync=bt;var Ufe=nw(),N$=Ey(),ACe=N$.Minimatch,OCe=Oy().Glob,PCe=ce("util"),hw=ce("path"),C$=ce("assert"),Ay=ce("path").isAbsolute,Xa=dw(),Hfe=Xa.setopts,pw=Xa.ownProp,zfe=Xa.childrenIgnored,Wfe=Xa.isIgnored;function L$(e,t){if(typeof t=="function"||arguments.length===3)throw new TypeError(`callback provided to sync glob
|
|
114
|
+
See: https://github.com/isaacs/node-glob/issues/167`);return new bt(e,t).found}function bt(e,t){if(!e)throw new Error("must provide pattern");if(typeof t=="function"||arguments.length===3)throw new TypeError(`callback provided to sync glob
|
|
115
|
+
See: https://github.com/isaacs/node-glob/issues/167`);if(!(this instanceof bt))return new bt(e,t);if(Hfe(this,e,t),this.noprocess)return this;var n=this.minimatch.set.length;this.matches=new Array(n);for(var r=0;r<n;r++)this._process(this.minimatch.set[r],r,!1);this._finish()}bt.prototype._finish=function(){if(C$.ok(this instanceof bt),this.realpath){var e=this;this.matches.forEach(function(t,n){var r=e.matches[n]=Object.create(null);for(var i in t)try{i=e._makeAbs(i);var s=Ufe.realpathSync(i,e.realpathCache);r[s]=!0}catch(a){if(a.syscall==="stat")r[e._makeAbs(i)]=!0;else throw a}})}Xa.finish(this)};bt.prototype._process=function(e,t,n){C$.ok(this instanceof bt);for(var r=0;typeof e[r]=="string";)r++;var i;switch(r){case e.length:this._processSimple(e.join("/"),t);return;case 0:i=null;break;default:i=e.slice(0,r).join("/");break}var s=e.slice(r),a;i===null?a=".":((Ay(i)||Ay(e.map(function(l){return typeof l=="string"?l:"[*]"}).join("/")))&&(!i||!Ay(i))&&(i="/"+i),a=i);var o=this._makeAbs(a);if(!zfe(this,a)){var c=s[0]===N$.GLOBSTAR;c?this._processGlobStar(i,a,o,s,t,n):this._processReaddir(i,a,o,s,t,n)}};bt.prototype._processReaddir=function(e,t,n,r,i,s){var a=this._readdir(n,s);if(a){for(var o=r[0],c=!!this.minimatch.negate,l=o._glob,f=this.dot||l.charAt(0)===".",h=[],d=0;d<a.length;d++){var g=a[d];if(g.charAt(0)!=="."||f){var v;c&&!e?v=!g.match(o):v=g.match(o),v&&h.push(g)}}var b=h.length;if(b!==0){if(r.length===1&&!this.mark&&!this.stat){this.matches[i]||(this.matches[i]=Object.create(null));for(var d=0;d<b;d++){var g=h[d];e&&(e.slice(-1)!=="/"?g=e+"/"+g:g=e+g),g.charAt(0)==="/"&&!this.nomount&&(g=hw.join(this.root,g)),this._emitMatch(i,g)}return}r.shift();for(var d=0;d<b;d++){var g=h[d],_;e?_=[e,g]:_=[g],this._process(_.concat(r),i,s)}}}};bt.prototype._emitMatch=function(e,t){if(!Wfe(this,t)){var n=this._makeAbs(t);if(this.mark&&(t=this._mark(t)),this.absolute&&(t=n),!this.matches[e][t]){if(this.nodir){var r=this.cache[n];if(r==="DIR"||Array.isArray(r))return}this.matches[e][t]=!0,this.stat&&this._stat(t)}}};bt.prototype._readdirInGlobStar=function(e){if(this.follow)return this._readdir(e,!1);var t,n,r;try{n=this.fs.lstatSync(e)}catch(s){if(s.code==="ENOENT")return null}var i=n&&n.isSymbolicLink();return this.symlinks[e]=i,!i&&n&&!n.isDirectory()?this.cache[e]="FILE":t=this._readdir(e,!1),t};bt.prototype._readdir=function(e,t){var n;if(t&&!pw(this.symlinks,e))return this._readdirInGlobStar(e);if(pw(this.cache,e)){var r=this.cache[e];if(!r||r==="FILE")return null;if(Array.isArray(r))return r}try{return this._readdirEntries(e,this.fs.readdirSync(e))}catch(i){return this._readdirError(e,i),null}};bt.prototype._readdirEntries=function(e,t){if(!this.mark&&!this.stat)for(var n=0;n<t.length;n++){var r=t[n];e==="/"?r=e+r:r=e+"/"+r,this.cache[r]=!0}return this.cache[e]=t,t};bt.prototype._readdirError=function(e,t){switch(t.code){case"ENOTSUP":case"ENOTDIR":var n=this._makeAbs(e);if(this.cache[n]="FILE",n===this.cwdAbs){var r=new Error(t.code+" invalid cwd "+this.cwd);throw r.path=this.cwd,r.code=t.code,r}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(e)]=!1;break;default:if(this.cache[this._makeAbs(e)]=!1,this.strict)throw t;this.silent||console.error("glob error",t);break}};bt.prototype._processGlobStar=function(e,t,n,r,i,s){var a=this._readdir(n,s);if(a){var o=r.slice(1),c=e?[e]:[],l=c.concat(o);this._process(l,i,!1);var f=a.length,h=this.symlinks[n];if(!(h&&s))for(var d=0;d<f;d++){var g=a[d];if(!(g.charAt(0)==="."&&!this.dot)){var v=c.concat(a[d],o);this._process(v,i,!0);var b=c.concat(a[d],r);this._process(b,i,!0)}}}};bt.prototype._processSimple=function(e,t){var n=this._stat(e);if(this.matches[t]||(this.matches[t]=Object.create(null)),!!n){if(e&&Ay(e)&&!this.nomount){var r=/[\/\\]$/.test(e);e.charAt(0)==="/"?e=hw.join(this.root,e):(e=hw.resolve(this.root,e),r&&(e+="/"))}process.platform==="win32"&&(e=e.replace(/\\/g,"/")),this._emitMatch(t,e)}};bt.prototype._stat=function(e){var t=this._makeAbs(e),n=e.slice(-1)==="/";if(e.length>this.maxLength)return!1;if(!this.stat&&pw(this.cache,t)){var a=this.cache[t];if(Array.isArray(a)&&(a="DIR"),!n||a==="DIR")return a;if(n&&a==="FILE")return!1}var r,i=this.statCache[t];if(!i){var s;try{s=this.fs.lstatSync(t)}catch(o){if(o&&(o.code==="ENOENT"||o.code==="ENOTDIR"))return this.statCache[t]=!1,!1}if(s&&s.isSymbolicLink())try{i=this.fs.statSync(t)}catch{i=s}else i=s}this.statCache[t]=i;var a=!0;return i&&(a=i.isDirectory()?"DIR":"FILE"),this.cache[t]=this.cache[t]||a,n&&a==="FILE"?!1:a};bt.prototype._mark=function(e){return Xa.mark(this,e)};bt.prototype._makeAbs=function(e){return Xa.makeAbs(this,e)}});var R$=x((LCe,M$)=>{p();var Gfe=U9(),of=Object.create(null),Jfe=KE();M$.exports=Gfe(Kfe);function Kfe(e,t){return of[e]?(of[e].push(t),null):(of[e]=[t],Yfe(e))}function Yfe(e){return Jfe(function t(){var n=of[e],r=n.length,i=Qfe(arguments);try{for(var s=0;s<r;s++)n[s].apply(null,i)}finally{n.length>r?(n.splice(0,r),process.nextTick(function(){t.apply(null,i)})):delete of[e]}})}function Qfe(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r]=e[r];return n}});var Oy=x((RCe,j$)=>{p();j$.exports=Za;var Xfe=nw(),D$=Ey(),ICe=D$.Minimatch,Zfe=E$(),ede=ce("events").EventEmitter,mw=ce("path"),gw=ce("assert"),cf=ce("path").isAbsolute,_w=I$(),eo=dw(),tde=eo.setopts,yw=eo.ownProp,vw=R$(),MCe=ce("util"),nde=eo.childrenIgnored,rde=eo.isIgnored,ide=KE();function Za(e,t,n){if(typeof t=="function"&&(n=t,t={}),t||(t={}),t.sync){if(n)throw new TypeError("callback provided to sync glob");return _w(e,t)}return new Re(e,t,n)}Za.sync=_w;var sde=Za.GlobSync=_w.GlobSync;Za.glob=Za;function ade(e,t){if(t===null||typeof t!="object")return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}Za.hasMagic=function(e,t){var n=ade({},t);n.noprocess=!0;var r=new Re(e,n),i=r.minimatch.set;if(!e)return!1;if(i.length>1)return!0;for(var s=0;s<i[0].length;s++)if(typeof i[0][s]!="string")return!0;return!1};Za.Glob=Re;Zfe(Re,ede);function Re(e,t,n){if(typeof t=="function"&&(n=t,t=null),t&&t.sync){if(n)throw new TypeError("callback provided to sync glob");return new sde(e,t)}if(!(this instanceof Re))return new Re(e,t,n);tde(this,e,t),this._didRealPath=!1;var r=this.minimatch.set.length;this.matches=new Array(r),typeof n=="function"&&(n=ide(n),this.on("error",n),this.on("end",function(c){n(null,c)}));var i=this;if(this._processing=0,this._emitQueue=[],this._processQueue=[],this.paused=!1,this.noprocess)return this;if(r===0)return o();for(var s=!0,a=0;a<r;a++)this._process(this.minimatch.set[a],a,!1,o);s=!1;function o(){--i._processing,i._processing<=0&&(s?process.nextTick(function(){i._finish()}):i._finish())}}Re.prototype._finish=function(){if(gw(this instanceof Re),!this.aborted){if(this.realpath&&!this._didRealpath)return this._realpath();eo.finish(this),this.emit("end",this.found)}};Re.prototype._realpath=function(){if(this._didRealpath)return;this._didRealpath=!0;var e=this.matches.length;if(e===0)return this._finish();for(var t=this,n=0;n<this.matches.length;n++)this._realpathSet(n,r);function r(){--e===0&&t._finish()}};Re.prototype._realpathSet=function(e,t){var n=this.matches[e];if(!n)return t();var r=Object.keys(n),i=this,s=r.length;if(s===0)return t();var a=this.matches[e]=Object.create(null);r.forEach(function(o,c){o=i._makeAbs(o),Xfe.realpath(o,i.realpathCache,function(l,f){l?l.syscall==="stat"?a[o]=!0:i.emit("error",l):a[f]=!0,--s===0&&(i.matches[e]=a,t())})})};Re.prototype._mark=function(e){return eo.mark(this,e)};Re.prototype._makeAbs=function(e){return eo.makeAbs(this,e)};Re.prototype.abort=function(){this.aborted=!0,this.emit("abort")};Re.prototype.pause=function(){this.paused||(this.paused=!0,this.emit("pause"))};Re.prototype.resume=function(){if(this.paused){if(this.emit("resume"),this.paused=!1,this._emitQueue.length){var e=this._emitQueue.slice(0);this._emitQueue.length=0;for(var t=0;t<e.length;t++){var n=e[t];this._emitMatch(n[0],n[1])}}if(this._processQueue.length){var r=this._processQueue.slice(0);this._processQueue.length=0;for(var t=0;t<r.length;t++){var i=r[t];this._processing--,this._process(i[0],i[1],i[2],i[3])}}}};Re.prototype._process=function(e,t,n,r){if(gw(this instanceof Re),gw(typeof r=="function"),!this.aborted){if(this._processing++,this.paused){this._processQueue.push([e,t,n,r]);return}for(var i=0;typeof e[i]=="string";)i++;var s;switch(i){case e.length:this._processSimple(e.join("/"),t,r);return;case 0:s=null;break;default:s=e.slice(0,i).join("/");break}var a=e.slice(i),o;s===null?o=".":((cf(s)||cf(e.map(function(f){return typeof f=="string"?f:"[*]"}).join("/")))&&(!s||!cf(s))&&(s="/"+s),o=s);var c=this._makeAbs(o);if(nde(this,o))return r();var l=a[0]===D$.GLOBSTAR;l?this._processGlobStar(s,o,c,a,t,n,r):this._processReaddir(s,o,c,a,t,n,r)}};Re.prototype._processReaddir=function(e,t,n,r,i,s,a){var o=this;this._readdir(n,s,function(c,l){return o._processReaddir2(e,t,n,r,i,s,l,a)})};Re.prototype._processReaddir2=function(e,t,n,r,i,s,a,o){if(!a)return o();for(var c=r[0],l=!!this.minimatch.negate,f=c._glob,h=this.dot||f.charAt(0)===".",d=[],g=0;g<a.length;g++){var v=a[g];if(v.charAt(0)!=="."||h){var b;l&&!e?b=!v.match(c):b=v.match(c),b&&d.push(v)}}var _=d.length;if(_===0)return o();if(r.length===1&&!this.mark&&!this.stat){this.matches[i]||(this.matches[i]=Object.create(null));for(var g=0;g<_;g++){var v=d[g];e&&(e!=="/"?v=e+"/"+v:v=e+v),v.charAt(0)==="/"&&!this.nomount&&(v=mw.join(this.root,v)),this._emitMatch(i,v)}return o()}r.shift();for(var g=0;g<_;g++){var v=d[g],k;e&&(e!=="/"?v=e+"/"+v:v=e+v),this._process([v].concat(r),i,s,o)}o()};Re.prototype._emitMatch=function(e,t){if(!this.aborted&&!rde(this,t)){if(this.paused){this._emitQueue.push([e,t]);return}var n=cf(t)?t:this._makeAbs(t);if(this.mark&&(t=this._mark(t)),this.absolute&&(t=n),!this.matches[e][t]){if(this.nodir){var r=this.cache[n];if(r==="DIR"||Array.isArray(r))return}this.matches[e][t]=!0;var i=this.statCache[n];i&&this.emit("stat",t,i),this.emit("match",t)}}};Re.prototype._readdirInGlobStar=function(e,t){if(this.aborted)return;if(this.follow)return this._readdir(e,!1,t);var n="lstat\0"+e,r=this,i=vw(n,s);i&&r.fs.lstat(e,i);function s(a,o){if(a&&a.code==="ENOENT")return t();var c=o&&o.isSymbolicLink();r.symlinks[e]=c,!c&&o&&!o.isDirectory()?(r.cache[e]="FILE",t()):r._readdir(e,!1,t)}};Re.prototype._readdir=function(e,t,n){if(!this.aborted&&(n=vw("readdir\0"+e+"\0"+t,n),!!n)){if(t&&!yw(this.symlinks,e))return this._readdirInGlobStar(e,n);if(yw(this.cache,e)){var r=this.cache[e];if(!r||r==="FILE")return n();if(Array.isArray(r))return n(null,r)}var i=this;i.fs.readdir(e,ode(this,e,n))}};function ode(e,t,n){return function(r,i){r?e._readdirError(t,r,n):e._readdirEntries(t,i,n)}}Re.prototype._readdirEntries=function(e,t,n){if(!this.aborted){if(!this.mark&&!this.stat)for(var r=0;r<t.length;r++){var i=t[r];e==="/"?i=e+i:i=e+"/"+i,this.cache[i]=!0}return this.cache[e]=t,n(null,t)}};Re.prototype._readdirError=function(e,t,n){if(!this.aborted){switch(t.code){case"ENOTSUP":case"ENOTDIR":var r=this._makeAbs(e);if(this.cache[r]="FILE",r===this.cwdAbs){var i=new Error(t.code+" invalid cwd "+this.cwd);i.path=this.cwd,i.code=t.code,this.emit("error",i),this.abort()}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(e)]=!1;break;default:this.cache[this._makeAbs(e)]=!1,this.strict&&(this.emit("error",t),this.abort()),this.silent||console.error("glob error",t);break}return n()}};Re.prototype._processGlobStar=function(e,t,n,r,i,s,a){var o=this;this._readdir(n,s,function(c,l){o._processGlobStar2(e,t,n,r,i,s,l,a)})};Re.prototype._processGlobStar2=function(e,t,n,r,i,s,a,o){if(!a)return o();var c=r.slice(1),l=e?[e]:[],f=l.concat(c);this._process(f,i,!1,o);var h=this.symlinks[n],d=a.length;if(h&&s)return o();for(var g=0;g<d;g++){var v=a[g];if(!(v.charAt(0)==="."&&!this.dot)){var b=l.concat(a[g],c);this._process(b,i,!0,o);var _=l.concat(a[g],r);this._process(_,i,!0,o)}}o()};Re.prototype._processSimple=function(e,t,n){var r=this;this._stat(e,function(i,s){r._processSimple2(e,t,i,s,n)})};Re.prototype._processSimple2=function(e,t,n,r,i){if(this.matches[t]||(this.matches[t]=Object.create(null)),!r)return i();if(e&&cf(e)&&!this.nomount){var s=/[\/\\]$/.test(e);e.charAt(0)==="/"?e=mw.join(this.root,e):(e=mw.resolve(this.root,e),s&&(e+="/"))}process.platform==="win32"&&(e=e.replace(/\\/g,"/")),this._emitMatch(t,e),i()};Re.prototype._stat=function(e,t){var n=this._makeAbs(e),r=e.slice(-1)==="/";if(e.length>this.maxLength)return t();if(!this.stat&&yw(this.cache,n)){var i=this.cache[n];if(Array.isArray(i)&&(i="DIR"),!r||i==="DIR")return t(null,i);if(r&&i==="FILE")return t()}var s,a=this.statCache[n];if(a!==void 0){if(a===!1)return t(null,a);var o=a.isDirectory()?"DIR":"FILE";return r&&o==="FILE"?t():t(null,o,a)}var c=this,l=vw("stat\0"+n,f);l&&c.fs.lstat(n,l);function f(h,d){if(d&&d.isSymbolicLink())return c.fs.stat(n,function(g,v){g?c._stat2(e,n,null,d,t):c._stat2(e,n,g,v,t)});c._stat2(e,n,h,d,t)}};Re.prototype._stat2=function(e,t,n,r,i){if(n&&(n.code==="ENOENT"||n.code==="ENOTDIR"))return this.statCache[t]=!1,i();var s=e.slice(-1)==="/";if(this.statCache[t]=r,t.slice(-1)==="/"&&r&&!r.isDirectory())return i(null,!1,r);var a=!0;return r&&(a=r.isDirectory()?"DIR":"FILE"),this.cache[t]=this.cache[t]||a,s&&a==="FILE"?i():i(null,a,r)}});var B$=x(Vc=>{"use strict";p();Object.defineProperty(Vc,"__esModule",{value:!0});Vc.saveToDiskFixApplicator=void 0;Vc.autofix=lde;var cde=ce("fs/promises"),bw=Yt(),ude=async(e,t)=>{let n=(0,bw.applyFixToString)(e.source,t);await(0,cde.writeFile)(bw.path.fsPath(e.uri),n,"utf8")};Vc.saveToDiskFixApplicator=ude;async function lde(e,t){await(0,bw.autofix)(e,t,Vc.saveToDiskFixApplicator)}});var kw=x(uf=>{"use strict";p();var fde=uf&&uf.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(uf,"__esModule",{value:!0});uf.fileExists=hde;var dde=fde(ce("node:fs/promises"));async function hde(e){try{return await dde.default.stat(e),!0}catch{return!1}}});var V$=x($c=>{"use strict";p();var F$=$c&&$c.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty($c,"__esModule",{value:!0});$c.thisNodeModuleRoot=void 0;var $Ce=F$(ce("node:path")),pde=F$(ce("node:os")),mde=()=>pde.default.tmpdir();$c.thisNodeModuleRoot=mde});var H$=x(Uc=>{"use strict";p();var gde=Uc&&Uc.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Uc,"__esModule",{value:!0});Uc.loadThirdPartyChecks=bde;Uc.findThirdPartyChecks=kde;var yde=gde(Oy()),_de=ce("node:util"),vde=(0,_de.promisify)(yde.default);function bde(e=[]){let t=new Set;for(let n of e)try{let i=ce(n).checks;if(!Array.isArray(i))throw new Error(`Expected the 'checks' export to be an array and got ${typeof i}`);for(let s of i)Sde(s)?t.add(s):console.error(`Expected ${s} to be a CheckDefinition, but it looks like it isn't`)}catch(r){console.error(`Error loading ${n}, ignoring it.
|
|
116
|
+
${r}`)}return[...t]}async function kde(e){let t=[$$(e.replace(/\\/g,"/"),"/node_modules/theme-check-*/"),$$(e.replace(/\\/g,"/"),"/node_modules/@*/theme-check-*/")];return(await Promise.all(t.map(r=>vde(r)))).flat().filter(r=>!/\@shopify\/theme-check-(node|common|browser|docs-updater)/.test(r)&&!/theme-check-vscode/.test(r))}function $$(...e){return e.flatMap(t=>t.replace(/\\/g,"/").replace(/\/+$/,"")).join("/")}function U$(e){return e!==null&&typeof e=="object"}function Sde(e){return U$(e)&&"meta"in e&&"create"in e&&U$(e.meta)&&"code"in e.meta}});var W$=x(ff=>{"use strict";p();var Tde=ff&&ff.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ff,"__esModule",{value:!0});ff.loadConfigDescription=Ade;var Tw=Yt(),lf=Tde(ce("node:path")),z$=kw(),wde=V$(),Sw=H$(),xde=yu(),Ede=e=>e.flat();async function Ade(e,t,n={}){let r=await Ide(t),i=await Promise.all([(0,Sw.findThirdPartyChecks)((0,wde.thisNodeModuleRoot)()),(0,Sw.findThirdPartyChecks)(r)]).then(Ede),s=[...e.require.map(h=>({source:"require",path:h})),...i.map(h=>({source:"discovery",path:h}))].filter((h,d,g)=>g.findIndex(({path:v})=>v===h.path)===d),a=s.length>0&&await n.authorizeCustomChecks?.({root:t,candidates:s})===!0;if(s.length>0&&!a){let h={code:"custom-checks-disabled",level:"warning",message:"Custom Theme Checks are disabled. Explicit authorization is required to execute custom check JavaScript.",root:t,candidates:s};n.onDiagnostic?n.onDiagnostic(h):console.error(h.message)}let o=a?(0,Sw.loadThirdPartyChecks)(s.map(({path:h})=>h)):[],c=Tw.allChecks.concat(o),l=c.filter(Pde(e)),f=xde.URI.file(t);return{settings:Cde(e.checkSettings,c),context:e.context??"theme",checks:l,ignore:e.ignore,rootUri:Ode(f,e.root)}}function Ode(e,t){if(t===void 0)return Tw.path.normalize(e);if(lf.default.isAbsolute(t))throw new Error('the "root" property can only be relative');return Tw.path.resolve(e,t)}var Pde=e=>t=>{let n=e.checkSettings[t.meta.code]??Nde(e,t);return n?n.enabled:!1};function Nde(e,t){if(!t.meta.aliases)return;let n=t.meta.aliases.find(r=>e.checkSettings[r]);if(n)return e.checkSettings[n]}function Cde(e,t){return Object.fromEntries(Object.entries(e).flatMap(([n,r])=>{let i=Lde(n,t);return i===void 0?[]:[[i,r]]}))}function Lde(e,t){return t.find(r=>r.meta.code===e||r.meta.aliases?.find(i=>i===e))?.meta.code}async function qde(e){if(lf.default.dirname(e)===e)return!0;let[t,n]=await Promise.all([(0,z$.fileExists)(lf.default.join(e,"node_modules")),(0,z$.fileExists)(lf.default.join(e,".git"))]);return t||n}async function Ide(e){let t=e;for(;!await qde(t);)t=lf.default.dirname(t);return t}});var Ae=x(Ft=>{"use strict";p();var ww=Symbol.for("yaml.alias"),G$=Symbol.for("yaml.document"),Py=Symbol.for("yaml.map"),J$=Symbol.for("yaml.pair"),xw=Symbol.for("yaml.scalar"),Ny=Symbol.for("yaml.seq"),Ai=Symbol.for("yaml.node.type"),Mde=e=>!!e&&typeof e=="object"&&e[Ai]===ww,Rde=e=>!!e&&typeof e=="object"&&e[Ai]===G$,Dde=e=>!!e&&typeof e=="object"&&e[Ai]===Py,jde=e=>!!e&&typeof e=="object"&&e[Ai]===J$,K$=e=>!!e&&typeof e=="object"&&e[Ai]===xw,Bde=e=>!!e&&typeof e=="object"&&e[Ai]===Ny;function Y$(e){if(e&&typeof e=="object")switch(e[Ai]){case Py:case Ny:return!0}return!1}function Fde(e){if(e&&typeof e=="object")switch(e[Ai]){case ww:case Py:case xw:case Ny:return!0}return!1}var Vde=e=>(K$(e)||Y$(e))&&!!e.anchor;Ft.ALIAS=ww;Ft.DOC=G$;Ft.MAP=Py;Ft.NODE_TYPE=Ai;Ft.PAIR=J$;Ft.SCALAR=xw;Ft.SEQ=Ny;Ft.hasAnchor=Vde;Ft.isAlias=Mde;Ft.isCollection=Y$;Ft.isDocument=Rde;Ft.isMap=Dde;Ft.isNode=Fde;Ft.isPair=jde;Ft.isScalar=K$;Ft.isSeq=Bde});var df=x(Ew=>{"use strict";p();var kt=Ae(),pn=Symbol("break visit"),Q$=Symbol("skip children"),Kr=Symbol("remove node");function Cy(e,t){let n=X$(t);kt.isDocument(e)?Hc(null,e.contents,n,Object.freeze([e]))===Kr&&(e.contents=null):Hc(null,e,n,Object.freeze([]))}Cy.BREAK=pn;Cy.SKIP=Q$;Cy.REMOVE=Kr;function Hc(e,t,n,r){let i=Z$(e,t,n,r);if(kt.isNode(i)||kt.isPair(i))return e4(e,r,i),Hc(e,i,n,r);if(typeof i!="symbol"){if(kt.isCollection(t)){r=Object.freeze(r.concat(t));for(let s=0;s<t.items.length;++s){let a=Hc(s,t.items[s],n,r);if(typeof a=="number")s=a-1;else{if(a===pn)return pn;a===Kr&&(t.items.splice(s,1),s-=1)}}}else if(kt.isPair(t)){r=Object.freeze(r.concat(t));let s=Hc("key",t.key,n,r);if(s===pn)return pn;s===Kr&&(t.key=null);let a=Hc("value",t.value,n,r);if(a===pn)return pn;a===Kr&&(t.value=null)}}return i}async function Ly(e,t){let n=X$(t);kt.isDocument(e)?await zc(null,e.contents,n,Object.freeze([e]))===Kr&&(e.contents=null):await zc(null,e,n,Object.freeze([]))}Ly.BREAK=pn;Ly.SKIP=Q$;Ly.REMOVE=Kr;async function zc(e,t,n,r){let i=await Z$(e,t,n,r);if(kt.isNode(i)||kt.isPair(i))return e4(e,r,i),zc(e,i,n,r);if(typeof i!="symbol"){if(kt.isCollection(t)){r=Object.freeze(r.concat(t));for(let s=0;s<t.items.length;++s){let a=await zc(s,t.items[s],n,r);if(typeof a=="number")s=a-1;else{if(a===pn)return pn;a===Kr&&(t.items.splice(s,1),s-=1)}}}else if(kt.isPair(t)){r=Object.freeze(r.concat(t));let s=await zc("key",t.key,n,r);if(s===pn)return pn;s===Kr&&(t.key=null);let a=await zc("value",t.value,n,r);if(a===pn)return pn;a===Kr&&(t.value=null)}}return i}function X$(e){return typeof e=="object"&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function Z$(e,t,n,r){if(typeof n=="function")return n(e,t,r);if(kt.isMap(t))return n.Map?.(e,t,r);if(kt.isSeq(t))return n.Seq?.(e,t,r);if(kt.isPair(t))return n.Pair?.(e,t,r);if(kt.isScalar(t))return n.Scalar?.(e,t,r);if(kt.isAlias(t))return n.Alias?.(e,t,r)}function e4(e,t,n){let r=t[t.length-1];if(kt.isCollection(r))r.items[e]=n;else if(kt.isPair(r))e==="key"?r.key=n:r.value=n;else if(kt.isDocument(r))r.contents=n;else{let i=kt.isAlias(r)?"alias":"scalar";throw new Error(`Cannot replace node with ${i} parent`)}}Ew.visit=Cy;Ew.visitAsync=Ly});var Aw=x(n4=>{"use strict";p();var t4=Ae(),$de=df(),Ude={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},Hde=e=>e.replace(/[!,[\]{}]/g,t=>Ude[t]),hf=class e{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},e.defaultYaml,t),this.tags=Object.assign({},e.defaultTags,n)}clone(){let t=new e(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){let t=new e(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:e.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},e.defaultTags);break}return t}add(t,n){this.atNextDocument&&(this.yaml={explicit:e.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},e.defaultTags),this.atNextDocument=!1);let r=t.trim().split(/[ \t]+/),i=r.shift();switch(i){case"%TAG":{if(r.length!==2&&(n(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;let[s,a]=r;return this.tags[s]=a,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return n(0,"%YAML directive should contain exactly one part"),!1;let[s]=r;if(s==="1.1"||s==="1.2")return this.yaml.version=s,!0;{let a=/^\d+\.\d+$/.test(s);return n(6,`Unsupported YAML version ${s}`,a),!1}}default:return n(0,`Unknown directive ${i}`,!0),!1}}tagName(t,n){if(t==="!")return"!";if(t[0]!=="!")return n(`Not a valid tag: ${t}`),null;if(t[1]==="<"){let a=t.slice(2,-1);return a==="!"||a==="!!"?(n(`Verbatim tags aren't resolved, so ${t} is invalid.`),null):(t[t.length-1]!==">"&&n("Verbatim tags must end with a >"),a)}let[,r,i]=t.match(/^(.*!)([^!]*)$/s);i||n(`The ${t} tag has no suffix`);let s=this.tags[r];if(s)try{return s+decodeURIComponent(i)}catch(a){return n(String(a)),null}return r==="!"?t:(n(`Could not resolve tag: ${t}`),null)}tagString(t){for(let[n,r]of Object.entries(this.tags))if(t.startsWith(r))return n+Hde(t.substring(r.length));return t[0]==="!"?t:`!<${t}>`}toString(t){let n=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags),i;if(t&&r.length>0&&t4.isNode(t.contents)){let s={};$de.visit(t.contents,(a,o)=>{t4.isNode(o)&&o.tag&&(s[o.tag]=!0)}),i=Object.keys(s)}else i=[];for(let[s,a]of r)s==="!!"&&a==="tag:yaml.org,2002:"||(!t||i.some(o=>o.startsWith(a)))&&n.push(`%TAG ${s} ${a}`);return n.join(`
|
|
117
|
+
`)}};hf.defaultYaml={explicit:!1,version:"1.2"};hf.defaultTags={"!!":"tag:yaml.org,2002:"};n4.Directives=hf});var qy=x(pf=>{"use strict";p();var r4=Ae(),zde=df();function Wde(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let n=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw new Error(n)}return!0}function i4(e){let t=new Set;return zde.visit(e,{Value(n,r){r.anchor&&t.add(r.anchor)}}),t}function s4(e,t){for(let n=1;;++n){let r=`${e}${n}`;if(!t.has(r))return r}}function Gde(e,t){let n=[],r=new Map,i=null;return{onAnchor:s=>{n.push(s),i??(i=i4(e));let a=s4(t,i);return i.add(a),a},setAnchors:()=>{for(let s of n){let a=r.get(s);if(typeof a=="object"&&a.anchor&&(r4.isScalar(a.node)||r4.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:r}}pf.anchorIsValid=Wde;pf.anchorNames=i4;pf.createNodeAnchors=Gde;pf.findNewAnchor=s4});var Ow=x(a4=>{"use strict";p();function mf(e,t,n,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let i=0,s=r.length;i<s;++i){let a=r[i],o=mf(e,r,String(i),a);o===void 0?delete r[i]:o!==a&&(r[i]=o)}else if(r instanceof Map)for(let i of Array.from(r.keys())){let s=r.get(i),a=mf(e,r,i,s);a===void 0?r.delete(i):a!==s&&r.set(i,a)}else if(r instanceof Set)for(let i of Array.from(r)){let s=mf(e,r,i,i);s===void 0?r.delete(i):s!==i&&(r.delete(i),r.add(s))}else for(let[i,s]of Object.entries(r)){let a=mf(e,r,i,s);a===void 0?delete r[i]:a!==s&&(r[i]=a)}return e.call(t,n,r)}a4.applyReviver=mf});var _s=x(c4=>{"use strict";p();var Jde=Ae();function o4(e,t,n){if(Array.isArray(e))return e.map((r,i)=>o4(r,String(i),n));if(e&&typeof e.toJSON=="function"){if(!n||!Jde.hasAnchor(e))return e.toJSON(t,n);let r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=s=>{r.res=s,delete n.onCreate};let i=e.toJSON(t,n);return n.onCreate&&n.onCreate(i),i}return typeof e=="bigint"&&!n?.keep?Number(e):e}c4.toJS=o4});var Iy=x(l4=>{"use strict";p();var Kde=Ow(),u4=Ae(),Yde=_s(),Pw=class{constructor(t){Object.defineProperty(this,u4.NODE_TYPE,{value:t})}clone(){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(t.range=this.range.slice()),t}toJS(t,{mapAsMap:n,maxAliasCount:r,onAnchor:i,reviver:s}={}){if(!u4.isDocument(t))throw new TypeError("A document argument is required");let a={anchors:new Map,doc:t,keep:!0,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},o=Yde.toJS(this,"",a);if(typeof i=="function")for(let{count:c,res:l}of a.anchors.values())i(l,c);return typeof s=="function"?Kde.applyReviver(s,{"":o},"",o):o}};l4.NodeBase=Pw});var gf=x(f4=>{"use strict";p();var Qde=qy(),Xde=df(),Wc=Ae(),Zde=Iy(),ehe=_s(),Nw=class extends Zde.NodeBase{constructor(t){super(Wc.ALIAS),this.source=t,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(t,n){if(n?.maxAliasCount===0)throw new ReferenceError("Alias resolution is disabled");let r;n?.aliasResolveCache?r=n.aliasResolveCache:(r=[],Xde.visit(t,{Node:(s,a)=>{(Wc.isAlias(a)||Wc.hasAnchor(a))&&r.push(a)}}),n&&(n.aliasResolveCache=r));let i;for(let s of r){if(s===this)break;s.anchor===this.source&&(i=s)}return i}toJSON(t,n){if(!n)return{source:this.source};let{anchors:r,doc:i,maxAliasCount:s}=n,a=this.resolve(i,n);if(!a){let c=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(c)}let o=r.get(a);if(o||(ehe.toJS(a,null,n),o=r.get(a)),o?.res===void 0){let c="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(c)}if(s>=0&&(o.count+=1,o.aliasCount===0&&(o.aliasCount=My(i,a,r)),o.count*o.aliasCount>s)){let c="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(c)}return o.res}toString(t,n,r){let i=`*${this.source}`;if(t){if(Qde.anchorIsValid(this.source),t.options.verifyAliasOrder&&!t.anchors.has(this.source)){let s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(s)}if(t.implicitKey)return`${i} `}return i}};function My(e,t,n){if(Wc.isAlias(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}else if(Wc.isCollection(t)){let r=0;for(let i of t.items){let s=My(e,i,n);s>r&&(r=s)}return r}else if(Wc.isPair(t)){let r=My(e,t.key,n),i=My(e,t.value,n);return Math.max(r,i)}return 1}f4.Alias=Nw});var gt=x(Cw=>{"use strict";p();var the=Ae(),nhe=Iy(),rhe=_s(),ihe=e=>!e||typeof e!="function"&&typeof e!="object",vs=class extends nhe.NodeBase{constructor(t){super(the.SCALAR),this.value=t}toJSON(t,n){return n?.keep?this.value:rhe.toJS(this.value,t,n)}toString(){return String(this.value)}};vs.BLOCK_FOLDED="BLOCK_FOLDED";vs.BLOCK_LITERAL="BLOCK_LITERAL";vs.PLAIN="PLAIN";vs.QUOTE_DOUBLE="QUOTE_DOUBLE";vs.QUOTE_SINGLE="QUOTE_SINGLE";Cw.Scalar=vs;Cw.isScalarValue=ihe});var yf=x(h4=>{"use strict";p();var she=gf(),to=Ae(),d4=gt(),ahe="tag:yaml.org,2002:";function ohe(e,t,n){if(t){let r=n.filter(s=>s.tag===t),i=r.find(s=>!s.format)??r[0];if(!i)throw new Error(`Tag ${t} not found`);return i}return n.find(r=>r.identify?.(e)&&!r.format)}function che(e,t,n){if(to.isDocument(e)&&(e=e.contents),to.isNode(e))return e;if(to.isPair(e)){let h=n.schema[to.MAP].createNode?.(n.schema,null,n);return h.items.push(e),h}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<"u"&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:r,onAnchor:i,onTagObj:s,schema:a,sourceObjects:o}=n,c;if(r&&e&&typeof e=="object"){if(c=o.get(e),c)return c.anchor??(c.anchor=i(e)),new she.Alias(c.anchor);c={anchor:null,node:null},o.set(e,c)}t?.startsWith("!!")&&(t=ahe+t.slice(2));let l=ohe(e,t,a.tags);if(!l){if(e&&typeof e.toJSON=="function"&&(e=e.toJSON()),!e||typeof e!="object"){let h=new d4.Scalar(e);return c&&(c.node=h),h}l=e instanceof Map?a[to.MAP]:Symbol.iterator in Object(e)?a[to.SEQ]:a[to.MAP]}s&&(s(l),delete n.onTagObj);let f=l?.createNode?l.createNode(n.schema,e,n):typeof l?.nodeClass?.from=="function"?l.nodeClass.from(n.schema,e,n):new d4.Scalar(e);return t?f.tag=t:l.default||(f.tag=l.tag),c&&(c.node=f),f}h4.createNode=che});var Dy=x(Ry=>{"use strict";p();var uhe=yf(),Yr=Ae(),lhe=Iy();function Lw(e,t,n){let r=n;for(let i=t.length-1;i>=0;--i){let s=t[i];if(typeof s=="number"&&Number.isInteger(s)&&s>=0){let a=[];a[s]=r,r=a}else r=new Map([[s,r]])}return uhe.createNode(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}var p4=e=>e==null||typeof e=="object"&&!!e[Symbol.iterator]().next().done,qw=class extends lhe.NodeBase{constructor(t,n){super(t),Object.defineProperty(this,"schema",{value:n,configurable:!0,enumerable:!1,writable:!0})}clone(t){let n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return t&&(n.schema=t),n.items=n.items.map(r=>Yr.isNode(r)||Yr.isPair(r)?r.clone(t):r),this.range&&(n.range=this.range.slice()),n}addIn(t,n){if(p4(t))this.add(n);else{let[r,...i]=t,s=this.get(r,!0);if(Yr.isCollection(s))s.addIn(i,n);else if(s===void 0&&this.schema)this.set(r,Lw(this.schema,i,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}}deleteIn(t){let[n,...r]=t;if(r.length===0)return this.delete(n);let i=this.get(n,!0);if(Yr.isCollection(i))return i.deleteIn(r);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}getIn(t,n){let[r,...i]=t,s=this.get(r,!0);return i.length===0?!n&&Yr.isScalar(s)?s.value:s:Yr.isCollection(s)?s.getIn(i,n):void 0}hasAllNullValues(t){return this.items.every(n=>{if(!Yr.isPair(n))return!1;let r=n.value;return r==null||t&&Yr.isScalar(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(t){let[n,...r]=t;if(r.length===0)return this.has(n);let i=this.get(n,!0);return Yr.isCollection(i)?i.hasIn(r):!1}setIn(t,n){let[r,...i]=t;if(i.length===0)this.set(r,n);else{let s=this.get(r,!0);if(Yr.isCollection(s))s.setIn(i,n);else if(s===void 0&&this.schema)this.set(r,Lw(this.schema,i,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}}};Ry.Collection=qw;Ry.collectionFromPath=Lw;Ry.isEmptyPath=p4});var _f=x(jy=>{"use strict";p();var fhe=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function Iw(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}var dhe=(e,t,n)=>e.endsWith(`
|
|
118
|
+
`)?Iw(n,t):n.includes(`
|
|
119
|
+
`)?`
|
|
120
|
+
`+Iw(n,t):(e.endsWith(" ")?"":" ")+n;jy.indentComment=Iw;jy.lineComment=dhe;jy.stringifyComment=fhe});var g4=x(vf=>{"use strict";p();var hhe="flow",Mw="block",By="quoted";function phe(e,t,n="flow",{indentAtStart:r,lineWidth:i=80,minContentWidth:s=20,onFold:a,onOverflow:o}={}){if(!i||i<0)return e;i<s&&(s=0);let c=Math.max(1+s,1+i-t.length);if(e.length<=c)return e;let l=[],f={},h=i-t.length;typeof r=="number"&&(r>i-Math.max(2,s)?l.push(0):h=i-r);let d,g,v=!1,b=-1,_=-1,k=-1;n===Mw&&(b=m4(e,b,t.length),b!==-1&&(h=b+c));for(let w;w=e[b+=1];){if(n===By&&w==="\\"){switch(_=b,e[b+1]){case"x":b+=3;break;case"u":b+=5;break;case"U":b+=9;break;default:b+=1}k=b}if(w===`
|
|
121
|
+
`)n===Mw&&(b=m4(e,b,t.length)),h=b+t.length+c,d=void 0;else{if(w===" "&&g&&g!==" "&&g!==`
|
|
122
|
+
`&&g!==" "){let y=e[b+1];y&&y!==" "&&y!==`
|
|
123
|
+
`&&y!==" "&&(d=b)}if(b>=h)if(d)l.push(d),h=d+c,d=void 0;else if(n===By){for(;g===" "||g===" ";)g=w,w=e[b+=1],v=!0;let y=b>k+1?b-2:_-1;if(f[y])return e;l.push(y),f[y]=!0,h=y+c,d=void 0}else v=!0}g=w}if(v&&o&&o(),l.length===0)return e;a&&a();let T=e.slice(0,l[0]);for(let w=0;w<l.length;++w){let y=l[w],A=l[w+1]||e.length;y===0?T=`
|
|
124
|
+
${t}${e.slice(0,A)}`:(n===By&&f[y]&&(T+=`${e[y]}\\`),T+=`
|
|
125
|
+
${t}${e.slice(y+1,A)}`)}return T}function m4(e,t,n){let r=t,i=t+1,s=e[i];for(;s===" "||s===" ";)if(t<i+n)s=e[++t];else{do s=e[++t];while(s&&s!==`
|
|
126
|
+
`);r=t,i=t+1,s=e[i]}return r}vf.FOLD_BLOCK=Mw;vf.FOLD_FLOW=hhe;vf.FOLD_QUOTED=By;vf.foldFlowLines=phe});var kf=x(y4=>{"use strict";p();var kr=gt(),bs=g4(),Vy=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),$y=e=>/^(%|---|\.\.\.)/m.test(e);function mhe(e,t,n){if(!t||t<0)return!1;let r=t-n,i=e.length;if(i<=r)return!1;for(let s=0,a=0;s<i;++s)if(e[s]===`
|
|
127
|
+
`){if(s-a>r)return!0;if(a=s+1,i-a<=r)return!1}return!0}function bf(e,t){let n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;let{implicitKey:r}=t,i=t.options.doubleQuotedMinMultiLineLength,s=t.indent||($y(e)?" ":""),a="",o=0;for(let c=0,l=n[c];l;l=n[++c])if(l===" "&&n[c+1]==="\\"&&n[c+2]==="n"&&(a+=n.slice(o,c)+"\\ ",c+=1,o=c,l="\\"),l==="\\")switch(n[c+1]){case"u":{a+=n.slice(o,c);let f=n.substr(c+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+=n.substr(c,6)}c+=5,o=c+1}break;case"n":if(r||n[c+2]==='"'||n.length<i)c+=1;else{for(a+=n.slice(o,c)+`
|
|
128
|
+
|
|
129
|
+
`;n[c+2]==="\\"&&n[c+3]==="n"&&n[c+4]!=='"';)a+=`
|
|
130
|
+
`,c+=2;a+=s,n[c+2]===" "&&(a+="\\"),c+=1,o=c+1}break;default:c+=1}return a=o?a+n.slice(o):n,r?a:bs.foldFlowLines(a,s,bs.FOLD_QUOTED,Vy(t,!1))}function Rw(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
|
|
131
|
+
`)||/[ \t]\n|\n[ \t]/.test(e))return bf(e,t);let n=t.indent||($y(e)?" ":""),r="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
132
|
+
${n}`)+"'";return t.implicitKey?r:bs.foldFlowLines(r,n,bs.FOLD_FLOW,Vy(t,!1))}function Gc(e,t){let{singleQuote:n}=t.options,r;if(n===!1)r=bf;else{let i=e.includes('"'),s=e.includes("'");i&&!s?r=Rw:s&&!i?r=bf:r=n?Rw:bf}return r(e,t)}var Dw;try{Dw=new RegExp(`(^|(?<!
|
|
133
|
+
))
|
|
134
|
+
+(?!
|
|
135
|
+
|$)`,"g")}catch{Dw=/\n+(?!\n|$)/g}function Fy({comment:e,type:t,value:n},r,i,s){let{blockQuote:a,commentString:o,lineWidth:c}=r.options;if(!a||/\n[\t ]+$/.test(n))return Gc(n,r);let l=r.indent||(r.forceBlockIndent||$y(n)?" ":""),f=a==="literal"?!0:a==="folded"||t===kr.Scalar.BLOCK_FOLDED?!1:t===kr.Scalar.BLOCK_LITERAL?!0:!mhe(n,c,l.length);if(!n)return f?`|
|
|
136
|
+
`:`>
|
|
137
|
+
`;let h,d;for(d=n.length;d>0;--d){let A=n[d-1];if(A!==`
|
|
138
|
+
`&&A!==" "&&A!==" ")break}let g=n.substring(d),v=g.indexOf(`
|
|
139
|
+
`);v===-1?h="-":n===g||v!==g.length-1?(h="+",s&&s()):h="",g&&(n=n.slice(0,-g.length),g[g.length-1]===`
|
|
140
|
+
`&&(g=g.slice(0,-1)),g=g.replace(Dw,`$&${l}`));let b=!1,_,k=-1;for(_=0;_<n.length;++_){let A=n[_];if(A===" ")b=!0;else if(A===`
|
|
141
|
+
`)k=_;else break}let T=n.substring(0,k<_?k+1:_);T&&(n=n.substring(T.length),T=T.replace(/\n+/g,`$&${l}`));let y=(b?l?"2":"1":"")+h;if(e&&(y+=" "+o(e.replace(/ ?[\r\n]+/g," ")),i&&i()),!f){let A=n.replace(/\n+/g,`
|
|
142
|
+
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${l}`),P=!1,O=Vy(r,!0);a!=="folded"&&t!==kr.Scalar.BLOCK_FOLDED&&(O.onOverflow=()=>{P=!0});let L=bs.foldFlowLines(`${T}${A}${g}`,l,bs.FOLD_BLOCK,O);if(!P)return`>${y}
|
|
143
|
+
${l}${L}`}return n=n.replace(/\n+/g,`$&${l}`),`|${y}
|
|
144
|
+
${l}${T}${n}${g}`}function ghe(e,t,n,r){let{type:i,value:s}=e,{actualString:a,implicitKey:o,indent:c,indentStep:l,inFlow:f}=t;if(o&&s.includes(`
|
|
145
|
+
`)||f&&/[[\]{},]/.test(s))return Gc(s,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(s))return o||f||!s.includes(`
|
|
146
|
+
`)?Gc(s,t):Fy(e,t,n,r);if(!o&&!f&&i!==kr.Scalar.PLAIN&&s.includes(`
|
|
147
|
+
`))return Fy(e,t,n,r);if($y(s)){if(c==="")return t.forceBlockIndent=!0,Fy(e,t,n,r);if(o&&c===l)return Gc(s,t)}let h=s.replace(/\n+/g,`$&
|
|
148
|
+
${c}`);if(a){let d=b=>b.default&&b.tag!=="tag:yaml.org,2002:str"&&b.test?.test(h),{compat:g,tags:v}=t.doc.schema;if(v.some(d)||g?.some(d))return Gc(s,t)}return o?h:bs.foldFlowLines(h,c,bs.FOLD_FLOW,Vy(t,!1))}function yhe(e,t,n,r){let{implicitKey:i,inFlow:s}=t,a=typeof e.value=="string"?e:Object.assign({},e,{value:String(e.value)}),{type:o}=e;o!==kr.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(a.value)&&(o=kr.Scalar.QUOTE_DOUBLE);let c=f=>{switch(f){case kr.Scalar.BLOCK_FOLDED:case kr.Scalar.BLOCK_LITERAL:return i||s?Gc(a.value,t):Fy(a,t,n,r);case kr.Scalar.QUOTE_DOUBLE:return bf(a.value,t);case kr.Scalar.QUOTE_SINGLE:return Rw(a.value,t);case kr.Scalar.PLAIN:return ghe(a,t,n,r);default:return null}},l=c(o);if(l===null){let{defaultKeyType:f,defaultStringType:h}=t.options,d=i&&f||h;if(l=c(d),l===null)throw new Error(`Unsupported default string type ${d}`)}return l}y4.stringifyString=yhe});var Sf=x(jw=>{"use strict";p();var _he=qy(),ks=Ae(),vhe=_f(),bhe=kf();function khe(e,t){let n=Object.assign({blockQuote:!0,commentString:vhe.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},e.schema.toStringOptions,t),r;switch(n.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding?" ":"",indent:"",indentStep:typeof n.indent=="number"?" ".repeat(n.indent):" ",inFlow:r,options:n}}function She(e,t){if(t.tag){let i=e.filter(s=>s.tag===t.tag);if(i.length>0)return i.find(s=>s.format===t.format)??i[0]}let n,r;if(ks.isScalar(t)){r=t.value;let i=e.filter(s=>s.identify?.(r));if(i.length>1){let s=i.filter(a=>a.test);s.length>0&&(i=s)}n=i.find(s=>s.format===t.format)??i.find(s=>!s.format)}else r=t,n=e.find(i=>i.nodeClass&&r instanceof i.nodeClass);if(!n){let i=r?.constructor?.name??(r===null?"null":typeof r);throw new Error(`Tag not resolved for ${i} value`)}return n}function The(e,t,{anchors:n,doc:r}){if(!r.directives)return"";let i=[],s=(ks.isScalar(e)||ks.isCollection(e))&&e.anchor;s&&_he.anchorIsValid(s)&&(n.add(s),i.push(`&${s}`));let a=e.tag??(t.default?null:t.tag);return a&&i.push(r.directives.tagString(a)),i.join(" ")}function whe(e,t,n,r){if(ks.isPair(e))return e.toString(t,n,r);if(ks.isAlias(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw new TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let i,s=ks.isNode(e)?e:t.doc.createNode(e,{onTagObj:c=>i=c});i??(i=She(t.doc.schema.tags,s));let a=The(s,i,t);a.length>0&&(t.indentAtStart=(t.indentAtStart??0)+a.length+1);let o=typeof i.stringify=="function"?i.stringify(s,t,n,r):ks.isScalar(s)?bhe.stringifyString(s,t,n,r):s.toString(t,n,r);return a?ks.isScalar(s)||o[0]==="{"||o[0]==="["?`${a} ${o}`:`${a}
|
|
149
|
+
${t.indent}${o}`:o}jw.createStringifyContext=khe;jw.stringify=whe});var k4=x(b4=>{"use strict";p();var Oi=Ae(),_4=gt(),v4=Sf(),Tf=_f();function xhe({key:e,value:t},n,r,i){let{allNullValues:s,doc:a,indent:o,indentStep:c,options:{commentString:l,indentSeq:f,simpleKeys:h}}=n,d=Oi.isNode(e)&&e.comment||null;if(h){if(d)throw new Error("With simple keys, key nodes cannot have comments");if(Oi.isCollection(e)||!Oi.isNode(e)&&typeof e=="object"){let O="With simple keys, collection cannot be used as a key value";throw new Error(O)}}let g=!h&&(!e||d&&t==null&&!n.inFlow||Oi.isCollection(e)||(Oi.isScalar(e)?e.type===_4.Scalar.BLOCK_FOLDED||e.type===_4.Scalar.BLOCK_LITERAL:typeof e=="object"));n=Object.assign({},n,{allNullValues:!1,implicitKey:!g&&(h||!s),indent:o+c});let v=!1,b=!1,_=v4.stringify(e,n,()=>v=!0,()=>b=!0);if(!g&&!n.inFlow&&_.length>1024){if(h)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");g=!0}if(n.inFlow){if(s||t==null)return v&&r&&r(),_===""?"?":g?`? ${_}`:_}else if(s&&!h||t==null&&g)return _=`? ${_}`,d&&!v?_+=Tf.lineComment(_,n.indent,l(d)):b&&i&&i(),_;v&&(d=null),g?(d&&(_+=Tf.lineComment(_,n.indent,l(d))),_=`? ${_}
|
|
150
|
+
${o}:`):(_=`${_}:`,d&&(_+=Tf.lineComment(_,n.indent,l(d))));let k,T,w;Oi.isNode(t)?(k=!!t.spaceBefore,T=t.commentBefore,w=t.comment):(k=!1,T=null,w=null,t&&typeof t=="object"&&(t=a.createNode(t))),n.implicitKey=!1,!g&&!d&&Oi.isScalar(t)&&(n.indentAtStart=_.length+1),b=!1,!f&&c.length>=2&&!n.inFlow&&!g&&Oi.isSeq(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let y=!1,A=v4.stringify(t,n,()=>y=!0,()=>b=!0),P=" ";if(d||k||T){if(P=k?`
|
|
151
|
+
`:"",T){let O=l(T);P+=`
|
|
152
|
+
${Tf.indentComment(O,n.indent)}`}A===""&&!n.inFlow?P===`
|
|
153
|
+
`&&w&&(P=`
|
|
154
|
+
|
|
155
|
+
`):P+=`
|
|
156
|
+
${n.indent}`}else if(!g&&Oi.isCollection(t)){let O=A[0],L=A.indexOf(`
|
|
157
|
+
`),D=L!==-1,M=n.inFlow??t.flow??t.items.length===0;if(D||!M){let C=!1;if(D&&(O==="&"||O==="!")){let q=A.indexOf(" ");O==="&"&&q!==-1&&q<L&&A[q+1]==="!"&&(q=A.indexOf(" ",q+1)),(q===-1||L<q)&&(C=!0)}C||(P=`
|
|
158
|
+
${n.indent}`)}}else(A===""||A[0]===`
|
|
159
|
+
`)&&(P="");return _+=P+A,n.inFlow?y&&r&&r():w&&!y?_+=Tf.lineComment(_,n.indent,l(w)):b&&i&&i(),_}b4.stringifyPair=xhe});var Fw=x(Bw=>{"use strict";p();var S4=ce("process");function Ehe(e,...t){e==="debug"&&console.log(...t)}function Ahe(e,t){(e==="debug"||e==="warn")&&(typeof S4.emitWarning=="function"?S4.emitWarning(t):console.warn(t))}Bw.debug=Ehe;Bw.warn=Ahe});var Gy=x(Wy=>{"use strict";p();var zy=Ae(),T4=gt(),Uy="<<",Hy={identify:e=>e===Uy||typeof e=="symbol"&&e.description===Uy,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new T4.Scalar(Symbol(Uy)),{addToJSMap:w4}),stringify:()=>Uy},Ohe=(e,t)=>(Hy.identify(t)||zy.isScalar(t)&&(!t.type||t.type===T4.Scalar.PLAIN)&&Hy.identify(t.value))&&e?.doc.schema.tags.some(n=>n.tag===Hy.tag&&n.default);function w4(e,t,n){let r=x4(e,n);if(zy.isSeq(r))for(let i of r.items)Vw(e,t,i);else if(Array.isArray(r))for(let i of r)Vw(e,t,i);else Vw(e,t,r)}function Vw(e,t,n){let r=x4(e,n);if(!zy.isMap(r))throw new Error("Merge sources must be maps or map aliases");let i=r.toJSON(null,e,Map);for(let[s,a]of i)t instanceof Map?t.has(s)||t.set(s,a):t instanceof Set?t.add(s):Object.prototype.hasOwnProperty.call(t,s)||Object.defineProperty(t,s,{value:a,writable:!0,enumerable:!0,configurable:!0});return t}function x4(e,t){return e&&zy.isAlias(t)?t.resolve(e.doc,e):t}Wy.addMergeToJSMap=w4;Wy.isMergeKey=Ohe;Wy.merge=Hy});var Uw=x(O4=>{"use strict";p();var Phe=Fw(),E4=Gy(),Nhe=Sf(),A4=Ae(),$w=_s();function Che(e,t,{key:n,value:r}){if(A4.isNode(n)&&n.addToJSMap)n.addToJSMap(e,t,r);else if(E4.isMergeKey(e,n))E4.addMergeToJSMap(e,t,r);else{let i=$w.toJS(n,"",e);if(t instanceof Map)t.set(i,$w.toJS(r,i,e));else if(t instanceof Set)t.add(i);else{let s=Lhe(n,i,e),a=$w.toJS(r,s,e);s in t?Object.defineProperty(t,s,{value:a,writable:!0,enumerable:!0,configurable:!0}):t[s]=a}}return t}function Lhe(e,t,n){if(t===null)return"";if(typeof t!="object")return String(t);if(A4.isNode(e)&&n?.doc){let r=Nhe.createStringifyContext(n.doc,{});r.anchors=new Set;for(let s of n.anchors.keys())r.anchors.add(s.anchor);r.inFlow=!0,r.inStringifyKey=!0;let i=e.toString(r);if(!n.mapKeyWarned){let s=JSON.stringify(i);s.length>40&&(s=s.substring(0,36)+'..."'),Phe.warn(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${s}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return i}return JSON.stringify(t)}O4.addPairToJSMap=Che});var Ss=x(Hw=>{"use strict";p();var P4=yf(),qhe=k4(),Ihe=Uw(),Jy=Ae();function Mhe(e,t,n){let r=P4.createNode(e,void 0,n),i=P4.createNode(t,void 0,n);return new Ky(r,i)}var Ky=class e{constructor(t,n=null){Object.defineProperty(this,Jy.NODE_TYPE,{value:Jy.PAIR}),this.key=t,this.value=n}clone(t){let{key:n,value:r}=this;return Jy.isNode(n)&&(n=n.clone(t)),Jy.isNode(r)&&(r=r.clone(t)),new e(n,r)}toJSON(t,n){let r=n?.mapAsMap?new Map:{};return Ihe.addPairToJSMap(n,r,this)}toString(t,n,r){return t?.doc?qhe.stringifyPair(this,t,n,r):JSON.stringify(this)}};Hw.Pair=Ky;Hw.createPair=Mhe});var zw=x(C4=>{"use strict";p();var no=Ae(),N4=Sf(),Yy=_f();function Rhe(e,t,n){return(t.inFlow??e.flow?jhe:Dhe)(e,t,n)}function Dhe({comment:e,items:t},n,{blockItemPrefix:r,flowChars:i,itemIndent:s,onChompKeep:a,onComment:o}){let{indent:c,options:{commentString:l}}=n,f=Object.assign({},n,{indent:s,type:null}),h=!1,d=[];for(let v=0;v<t.length;++v){let b=t[v],_=null;if(no.isNode(b))!h&&b.spaceBefore&&d.push(""),Qy(n,d,b.commentBefore,h),b.comment&&(_=b.comment);else if(no.isPair(b)){let T=no.isNode(b.key)?b.key:null;T&&(!h&&T.spaceBefore&&d.push(""),Qy(n,d,T.commentBefore,h))}h=!1;let k=N4.stringify(b,f,()=>_=null,()=>h=!0);_&&(k+=Yy.lineComment(k,s,l(_))),h&&_&&(h=!1),d.push(r+k)}let g;if(d.length===0)g=i.start+i.end;else{g=d[0];for(let v=1;v<d.length;++v){let b=d[v];g+=b?`
|
|
160
|
+
${c}${b}`:`
|
|
161
|
+
`}}return e?(g+=`
|
|
162
|
+
`+Yy.indentComment(l(e),c),o&&o()):h&&a&&a(),g}function jhe({items:e},t,{flowChars:n,itemIndent:r}){let{indent:i,indentStep:s,flowCollectionPadding:a,options:{commentString:o}}=t;r+=s;let c=Object.assign({},t,{indent:r,inFlow:!0,type:null}),l=!1,f=0,h=[];for(let v=0;v<e.length;++v){let b=e[v],_=null;if(no.isNode(b))b.spaceBefore&&h.push(""),Qy(t,h,b.commentBefore,!1),b.comment&&(_=b.comment);else if(no.isPair(b)){let T=no.isNode(b.key)?b.key:null;T&&(T.spaceBefore&&h.push(""),Qy(t,h,T.commentBefore,!1),T.comment&&(l=!0));let w=no.isNode(b.value)?b.value:null;w?(w.comment&&(_=w.comment),w.commentBefore&&(l=!0)):b.value==null&&T?.comment&&(_=T.comment)}_&&(l=!0);let k=N4.stringify(b,c,()=>_=null);l||(l=h.length>f||k.includes(`
|
|
163
|
+
`)),v<e.length-1?k+=",":t.options.trailingComma&&(t.options.lineWidth>0&&(l||(l=h.reduce((T,w)=>T+w.length+2,2)+(k.length+2)>t.options.lineWidth)),l&&(k+=",")),_&&(k+=Yy.lineComment(k,r,o(_))),h.push(k),f=h.length}let{start:d,end:g}=n;if(h.length===0)return d+g;if(!l){let v=h.reduce((b,_)=>b+_.length+2,2);l=t.options.lineWidth>0&&v>t.options.lineWidth}if(l){let v=d;for(let b of h)v+=b?`
|
|
164
|
+
${s}${i}${b}`:`
|
|
165
|
+
`;return`${v}
|
|
166
|
+
${i}${g}`}else return`${d}${a}${h.join(" ")}${a}${g}`}function Qy({indent:e,options:{commentString:t}},n,r,i){if(r&&i&&(r=r.replace(/^\n+/,"")),r){let s=Yy.indentComment(t(r),e);n.push(s.trimStart())}}C4.stringifyCollection=Rhe});var ws=x(Gw=>{"use strict";p();var Bhe=zw(),Fhe=Uw(),Vhe=Dy(),Ts=Ae(),Xy=Ss(),$he=gt();function wf(e,t){let n=Ts.isScalar(t)?t.value:t;for(let r of e)if(Ts.isPair(r)&&(r.key===t||r.key===n||Ts.isScalar(r.key)&&r.key.value===n))return r}var Ww=class extends Vhe.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(t){super(Ts.MAP,t),this.items=[]}static from(t,n,r){let{keepUndefined:i,replacer:s}=r,a=new this(t),o=(c,l)=>{if(typeof s=="function")l=s.call(n,c,l);else if(Array.isArray(s)&&!s.includes(c))return;(l!==void 0||i)&&a.items.push(Xy.createPair(c,l,r))};if(n instanceof Map)for(let[c,l]of n)o(c,l);else if(n&&typeof n=="object")for(let c of Object.keys(n))o(c,n[c]);return typeof t.sortMapEntries=="function"&&a.items.sort(t.sortMapEntries),a}add(t,n){let r;Ts.isPair(t)?r=t:!t||typeof t!="object"||!("key"in t)?r=new Xy.Pair(t,t?.value):r=new Xy.Pair(t.key,t.value);let i=wf(this.items,r.key),s=this.schema?.sortMapEntries;if(i){if(!n)throw new Error(`Key ${r.key} already set`);Ts.isScalar(i.value)&&$he.isScalarValue(r.value)?i.value.value=r.value:i.value=r.value}else if(s){let a=this.items.findIndex(o=>s(r,o)<0);a===-1?this.items.push(r):this.items.splice(a,0,r)}else this.items.push(r)}delete(t){let n=wf(this.items,t);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(t,n){let i=wf(this.items,t)?.value;return(!n&&Ts.isScalar(i)?i.value:i)??void 0}has(t){return!!wf(this.items,t)}set(t,n){this.add(new Xy.Pair(t,n),!0)}toJSON(t,n,r){let i=r?new r:n?.mapAsMap?new Map:{};n?.onCreate&&n.onCreate(i);for(let s of this.items)Fhe.addPairToJSMap(n,i,s);return i}toString(t,n,r){if(!t)return JSON.stringify(this);for(let i of this.items)if(!Ts.isPair(i))throw new Error(`Map items must all be pairs; found ${JSON.stringify(i)} instead`);return!t.allNullValues&&this.hasAllNullValues(!1)&&(t=Object.assign({},t,{allNullValues:!0})),Bhe.stringifyCollection(this,t,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:t.indent||"",onChompKeep:r,onComment:n})}};Gw.YAMLMap=Ww;Gw.findPair=wf});var Jc=x(q4=>{"use strict";p();var Uhe=Ae(),L4=ws(),Hhe={collection:"map",default:!0,nodeClass:L4.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(e,t){return Uhe.isMap(e)||t("Expected a mapping for this tag"),e},createNode:(e,t,n)=>L4.YAMLMap.from(e,t,n)};q4.map=Hhe});var xs=x(I4=>{"use strict";p();var zhe=yf(),Whe=zw(),Ghe=Dy(),e_=Ae(),Jhe=gt(),Khe=_s(),Jw=class extends Ghe.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(t){super(e_.SEQ,t),this.items=[]}add(t){this.items.push(t)}delete(t){let n=Zy(t);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(t,n){let r=Zy(t);if(typeof r!="number")return;let i=this.items[r];return!n&&e_.isScalar(i)?i.value:i}has(t){let n=Zy(t);return typeof n=="number"&&n<this.items.length}set(t,n){let r=Zy(t);if(typeof r!="number")throw new Error(`Expected a valid index, not ${t}.`);let i=this.items[r];e_.isScalar(i)&&Jhe.isScalarValue(n)?i.value=n:this.items[r]=n}toJSON(t,n){let r=[];n?.onCreate&&n.onCreate(r);let i=0;for(let s of this.items)r.push(Khe.toJS(s,String(i++),n));return r}toString(t,n,r){return t?Whe.stringifyCollection(this,t,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(t.indent||"")+" ",onChompKeep:r,onComment:n}):JSON.stringify(this)}static from(t,n,r){let{replacer:i}=r,s=new this(t);if(n&&Symbol.iterator in Object(n)){let a=0;for(let o of n){if(typeof i=="function"){let c=n instanceof Set?o:String(a++);o=i.call(n,c,o)}s.items.push(zhe.createNode(o,void 0,r))}}return s}};function Zy(e){let t=e_.isScalar(e)?e.value:e;return t&&typeof t=="string"&&(t=Number(t)),typeof t=="number"&&Number.isInteger(t)&&t>=0?t:null}I4.YAMLSeq=Jw});var Kc=x(R4=>{"use strict";p();var Yhe=Ae(),M4=xs(),Qhe={collection:"seq",default:!0,nodeClass:M4.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(e,t){return Yhe.isSeq(e)||t("Expected a sequence for this tag"),e},createNode:(e,t,n)=>M4.YAMLSeq.from(e,t,n)};R4.seq=Qhe});var xf=x(D4=>{"use strict";p();var Xhe=kf(),Zhe={identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify(e,t,n,r){return t=Object.assign({actualString:!0},t),Xhe.stringifyString(e,t,n,r)}};D4.string=Zhe});var t_=x(F4=>{"use strict";p();var j4=gt(),B4={identify:e=>e==null,createNode:()=>new j4.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new j4.Scalar(null),stringify:({source:e},t)=>typeof e=="string"&&B4.test.test(e)?e:t.options.nullStr};F4.nullTag=B4});var Kw=x($4=>{"use strict";p();var epe=gt(),V4={identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new epe.Scalar(e[0]==="t"||e[0]==="T"),stringify({source:e,value:t},n){if(e&&V4.test.test(e)){let r=e[0]==="t"||e[0]==="T";if(t===r)return e}return t?n.options.trueStr:n.options.falseStr}};$4.boolTag=V4});var Yc=x(U4=>{"use strict";p();function tpe({format:e,minFractionDigits:t,tag:n,value:r}){if(typeof r=="bigint")return String(r);let i=typeof r=="number"?r:Number(r);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";let s=Object.is(r,-0)?"-0":JSON.stringify(r);if(!e&&t&&(!n||n==="tag:yaml.org,2002:float")&&/^-?\d/.test(s)&&!s.includes("e")){let a=s.indexOf(".");a<0&&(a=s.length,s+=".");let o=t-(s.length-a-1);for(;o-- >0;)s+="0"}return s}U4.stringifyNumber=tpe});var Qw=x(n_=>{"use strict";p();var npe=gt(),Yw=Yc(),rpe={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Yw.stringifyNumber},ipe={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():Yw.stringifyNumber(e)}},spe={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){let t=new npe.Scalar(parseFloat(e)),n=e.indexOf(".");return n!==-1&&e[e.length-1]==="0"&&(t.minFractionDigits=e.length-n-1),t},stringify:Yw.stringifyNumber};n_.float=spe;n_.floatExp=ipe;n_.floatNaN=rpe});var Zw=x(i_=>{"use strict";p();var H4=Yc(),r_=e=>typeof e=="bigint"||Number.isInteger(e),Xw=(e,t,n,{intAsBigInt:r})=>r?BigInt(e):parseInt(e.substring(t),n);function z4(e,t,n){let{value:r}=e;return r_(r)&&r>=0?n+r.toString(t):H4.stringifyNumber(e)}var ape={identify:e=>r_(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,n)=>Xw(e,2,8,n),stringify:e=>z4(e,8,"0o")},ope={identify:r_,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>Xw(e,0,10,n),stringify:H4.stringifyNumber},cpe={identify:e=>r_(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,n)=>Xw(e,2,16,n),stringify:e=>z4(e,16,"0x")};i_.int=ope;i_.intHex=cpe;i_.intOct=ape});var G4=x(W4=>{"use strict";p();var upe=Jc(),lpe=t_(),fpe=Kc(),dpe=xf(),hpe=Kw(),ex=Qw(),tx=Zw(),ppe=[upe.map,fpe.seq,dpe.string,lpe.nullTag,hpe.boolTag,tx.intOct,tx.int,tx.intHex,ex.floatNaN,ex.floatExp,ex.float];W4.schema=ppe});var Y4=x(K4=>{"use strict";p();var mpe=gt(),gpe=Jc(),ype=Kc();function J4(e){return typeof e=="bigint"||Number.isInteger(e)}var s_=({value:e})=>JSON.stringify(e),_pe=[{identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:s_},{identify:e=>e==null,createNode:()=>new mpe.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:s_},{identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>e==="true",stringify:s_},{identify:J4,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>J4(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:s_}],vpe={default:!0,tag:"",test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}},bpe=[gpe.map,ype.seq].concat(_pe,vpe);K4.schema=bpe});var rx=x(Q4=>{"use strict";p();var Ef=ce("buffer"),nx=gt(),kpe=kf(),Spe={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if(typeof Ef.Buffer=="function")return Ef.Buffer.from(e,"base64");if(typeof atob=="function"){let n=atob(e.replace(/[\n\r]/g,"")),r=new Uint8Array(n.length);for(let i=0;i<n.length;++i)r[i]=n.charCodeAt(i);return r}else return t("This environment does not support reading binary tags; either Buffer or atob is required"),e},stringify({comment:e,type:t,value:n},r,i,s){if(!n)return"";let a=n,o;if(typeof Ef.Buffer=="function")o=a instanceof Ef.Buffer?a.toString("base64"):Ef.Buffer.from(a.buffer).toString("base64");else if(typeof btoa=="function"){let c="";for(let l=0;l<a.length;++l)c+=String.fromCharCode(a[l]);o=btoa(c)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(t??(t=nx.Scalar.BLOCK_LITERAL),t!==nx.Scalar.QUOTE_DOUBLE){let c=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),l=Math.ceil(o.length/c),f=new Array(l);for(let h=0,d=0;h<l;++h,d+=c)f[h]=o.substr(d,c);o=f.join(t===nx.Scalar.BLOCK_LITERAL?`
|
|
167
|
+
`:" ")}return kpe.stringifyString({comment:e,type:t,value:o},r,i,s)}};Q4.binary=Spe});var c_=x(o_=>{"use strict";p();var a_=Ae(),ix=Ss(),Tpe=gt(),wpe=xs();function X4(e,t){if(a_.isSeq(e))for(let n=0;n<e.items.length;++n){let r=e.items[n];if(!a_.isPair(r)){if(a_.isMap(r)){r.items.length>1&&t("Each pair must have its own sequence indicator");let i=r.items[0]||new ix.Pair(new Tpe.Scalar(null));if(r.commentBefore&&(i.key.commentBefore=i.key.commentBefore?`${r.commentBefore}
|
|
168
|
+
${i.key.commentBefore}`:r.commentBefore),r.comment){let s=i.value??i.key;s.comment=s.comment?`${r.comment}
|
|
169
|
+
${s.comment}`:r.comment}r=i}e.items[n]=a_.isPair(r)?r:new ix.Pair(r)}}else t("Expected a sequence for this tag");return e}function Z4(e,t,n){let{replacer:r}=n,i=new wpe.YAMLSeq(e);i.tag="tag:yaml.org,2002:pairs";let s=0;if(t&&Symbol.iterator in Object(t))for(let a of t){typeof r=="function"&&(a=r.call(t,String(s++),a));let o,c;if(Array.isArray(a))if(a.length===2)o=a[0],c=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],c=a[o];else throw new TypeError(`Expected tuple with one key, not ${l.length} keys`)}else o=a;i.items.push(ix.createPair(o,c,n))}return i}var xpe={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:X4,createNode:Z4};o_.createPairs=Z4;o_.pairs=xpe;o_.resolvePairs=X4});var ox=x(ax=>{"use strict";p();var e3=Ae(),sx=_s(),Af=ws(),Epe=xs(),t3=c_(),ro=class e extends Epe.YAMLSeq{constructor(){super(),this.add=Af.YAMLMap.prototype.add.bind(this),this.delete=Af.YAMLMap.prototype.delete.bind(this),this.get=Af.YAMLMap.prototype.get.bind(this),this.has=Af.YAMLMap.prototype.has.bind(this),this.set=Af.YAMLMap.prototype.set.bind(this),this.tag=e.tag}toJSON(t,n){if(!n)return super.toJSON(t);let r=new Map;n?.onCreate&&n.onCreate(r);for(let i of this.items){let s,a;if(e3.isPair(i)?(s=sx.toJS(i.key,"",n),a=sx.toJS(i.value,s,n)):s=sx.toJS(i,"",n),r.has(s))throw new Error("Ordered maps must not include duplicate keys");r.set(s,a)}return r}static from(t,n,r){let i=t3.createPairs(t,n,r),s=new this;return s.items=i.items,s}};ro.tag="tag:yaml.org,2002:omap";var Ape={collection:"seq",identify:e=>e instanceof Map,nodeClass:ro,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){let n=t3.resolvePairs(e,t),r=[];for(let{key:i}of n.items)e3.isScalar(i)&&(r.includes(i.value)?t(`Ordered maps must not include duplicate keys: ${i.value}`):r.push(i.value));return Object.assign(new ro,n)},createNode:(e,t,n)=>ro.from(e,t,n)};ax.YAMLOMap=ro;ax.omap=Ape});var a3=x(cx=>{"use strict";p();var n3=gt();function r3({value:e,source:t},n){return t&&(e?i3:s3).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}var i3={identify:e=>e===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new n3.Scalar(!0),stringify:r3},s3={identify:e=>e===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new n3.Scalar(!1),stringify:r3};cx.falseTag=s3;cx.trueTag=i3});var o3=x(u_=>{"use strict";p();var Ope=gt(),ux=Yc(),Ppe={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:ux.stringifyNumber},Npe={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():ux.stringifyNumber(e)}},Cpe={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){let t=new Ope.Scalar(parseFloat(e.replace(/_/g,""))),n=e.indexOf(".");if(n!==-1){let r=e.substring(n+1).replace(/_/g,"");r[r.length-1]==="0"&&(t.minFractionDigits=r.length)}return t},stringify:ux.stringifyNumber};u_.float=Cpe;u_.floatExp=Npe;u_.floatNaN=Ppe});var u3=x(Pf=>{"use strict";p();var c3=Yc(),Of=e=>typeof e=="bigint"||Number.isInteger(e);function l_(e,t,n,{intAsBigInt:r}){let i=e[0];if((i==="-"||i==="+")&&(t+=1),e=e.substring(t).replace(/_/g,""),r){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`;break}let a=BigInt(e);return i==="-"?BigInt(-1)*a:a}let s=parseInt(e,n);return i==="-"?-1*s:s}function lx(e,t,n){let{value:r}=e;if(Of(r)){let i=r.toString(t);return r<0?"-"+n+i.substr(1):n+i}return c3.stringifyNumber(e)}var Lpe={identify:Of,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>l_(e,2,2,n),stringify:e=>lx(e,2,"0b")},qpe={identify:Of,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>l_(e,1,8,n),stringify:e=>lx(e,8,"0")},Ipe={identify:Of,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>l_(e,0,10,n),stringify:c3.stringifyNumber},Mpe={identify:Of,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>l_(e,2,16,n),stringify:e=>lx(e,16,"0x")};Pf.int=Ipe;Pf.intBin=Lpe;Pf.intHex=Mpe;Pf.intOct=qpe});var dx=x(fx=>{"use strict";p();var h_=Ae(),f_=Ss(),d_=ws(),io=class e extends d_.YAMLMap{constructor(t){super(t),this.tag=e.tag}add(t){let n;h_.isPair(t)?n=t:t&&typeof t=="object"&&"key"in t&&"value"in t&&t.value===null?n=new f_.Pair(t.key,null):n=new f_.Pair(t,null),d_.findPair(this.items,n.key)||this.items.push(n)}get(t,n){let r=d_.findPair(this.items,t);return!n&&h_.isPair(r)?h_.isScalar(r.key)?r.key.value:r.key:r}set(t,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);let r=d_.findPair(this.items,t);r&&!n?this.items.splice(this.items.indexOf(r),1):!r&&n&&this.items.push(new f_.Pair(t))}toJSON(t,n){return super.toJSON(t,n,Set)}toString(t,n,r){if(!t)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},t,{allNullValues:!0}),n,r);throw new Error("Set items must all have null values")}static from(t,n,r){let{replacer:i}=r,s=new this(t);if(n&&Symbol.iterator in Object(n))for(let a of n)typeof i=="function"&&(a=i.call(n,a,a)),s.items.push(f_.createPair(a,null,r));return s}};io.tag="tag:yaml.org,2002:set";var Rpe={collection:"map",identify:e=>e instanceof Set,nodeClass:io,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,n)=>io.from(e,t,n),resolve(e,t){if(h_.isMap(e)){if(e.hasAllNullValues(!0))return Object.assign(new io,e);t("Set items must all have null values")}else t("Expected a mapping for this tag");return e}};fx.YAMLSet=io;fx.set=Rpe});var px=x(p_=>{"use strict";p();var Dpe=Yc();function hx(e,t){let n=e[0],r=n==="-"||n==="+"?e.substring(1):e,i=a=>t?BigInt(a):Number(a),s=r.replace(/_/g,"").split(":").reduce((a,o)=>a*i(60)+i(o),i(0));return n==="-"?i(-1)*s:s}function l3(e){let{value:t}=e,n=a=>a;if(typeof t=="bigint")n=a=>BigInt(a);else if(isNaN(t)||!isFinite(t))return Dpe.stringifyNumber(e);let r="";t<0&&(r="-",t*=n(-1));let i=n(60),s=[t%i];return t<60?s.unshift(0):(t=(t-s[0])/i,s.unshift(t%i),t>=60&&(t=(t-s[0])/i,s.unshift(t))),r+s.map(a=>String(a).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var jpe={identify:e=>typeof e=="bigint"||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:n})=>hx(e,n),stringify:l3},Bpe={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>hx(e,!1),stringify:l3},f3={identify:e=>e 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(e){let t=e.match(f3.test);if(!t)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,n,r,i,s,a,o]=t.map(Number),c=t[7]?Number((t[7]+"00").substr(1,3)):0,l=Date.UTC(n,r-1,i,s||0,a||0,o||0,c),f=t[8];if(f&&f!=="Z"){let h=hx(f,!1);Math.abs(h)<30&&(h*=60),l-=6e4*h}return new Date(l)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};p_.floatTime=Bpe;p_.intTime=jpe;p_.timestamp=f3});var p3=x(h3=>{"use strict";p();var Fpe=Jc(),Vpe=t_(),$pe=Kc(),Upe=xf(),Hpe=rx(),d3=a3(),mx=o3(),m_=u3(),zpe=Gy(),Wpe=ox(),Gpe=c_(),Jpe=dx(),gx=px(),Kpe=[Fpe.map,$pe.seq,Upe.string,Vpe.nullTag,d3.trueTag,d3.falseTag,m_.intBin,m_.intOct,m_.int,m_.intHex,mx.floatNaN,mx.floatExp,mx.float,Hpe.binary,zpe.merge,Wpe.omap,Gpe.pairs,Jpe.set,gx.intTime,gx.floatTime,gx.timestamp];h3.schema=Kpe});var w3=x(vx=>{"use strict";p();var _3=Jc(),Ype=t_(),v3=Kc(),Qpe=xf(),Xpe=Kw(),yx=Qw(),_x=Zw(),Zpe=G4(),eme=Y4(),b3=rx(),Nf=Gy(),k3=ox(),S3=c_(),m3=p3(),T3=dx(),g_=px(),g3=new Map([["core",Zpe.schema],["failsafe",[_3.map,v3.seq,Qpe.string]],["json",eme.schema],["yaml11",m3.schema],["yaml-1.1",m3.schema]]),y3={binary:b3.binary,bool:Xpe.boolTag,float:yx.float,floatExp:yx.floatExp,floatNaN:yx.floatNaN,floatTime:g_.floatTime,int:_x.int,intHex:_x.intHex,intOct:_x.intOct,intTime:g_.intTime,map:_3.map,merge:Nf.merge,null:Ype.nullTag,omap:k3.omap,pairs:S3.pairs,seq:v3.seq,set:T3.set,timestamp:g_.timestamp},tme={"tag:yaml.org,2002:binary":b3.binary,"tag:yaml.org,2002:merge":Nf.merge,"tag:yaml.org,2002:omap":k3.omap,"tag:yaml.org,2002:pairs":S3.pairs,"tag:yaml.org,2002:set":T3.set,"tag:yaml.org,2002:timestamp":g_.timestamp};function nme(e,t,n){let r=g3.get(t);if(r&&!e)return n&&!r.includes(Nf.merge)?r.concat(Nf.merge):r.slice();let i=r;if(!i)if(Array.isArray(e))i=[];else{let s=Array.from(g3.keys()).filter(a=>a!=="yaml11").map(a=>JSON.stringify(a)).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${s} or define customTags array`)}if(Array.isArray(e))for(let s of e)i=i.concat(s);else typeof e=="function"&&(i=e(i.slice()));return n&&(i=i.concat(Nf.merge)),i.reduce((s,a)=>{let o=typeof a=="string"?y3[a]:a;if(!o){let c=JSON.stringify(a),l=Object.keys(y3).map(f=>JSON.stringify(f)).join(", ");throw new Error(`Unknown custom tag ${c}; use one of ${l}`)}return s.includes(o)||s.push(o),s},[])}vx.coreKnownTags=tme;vx.getTags=nme});var Sx=x(x3=>{"use strict";p();var bx=Ae(),rme=Jc(),ime=Kc(),sme=xf(),y_=w3(),ame=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0,kx=class e{constructor({compat:t,customTags:n,merge:r,resolveKnownTags:i,schema:s,sortMapEntries:a,toStringDefaults:o}){this.compat=Array.isArray(t)?y_.getTags(t,"compat"):t?y_.getTags(null,t):null,this.name=typeof s=="string"&&s||"core",this.knownTags=i?y_.coreKnownTags:{},this.tags=y_.getTags(n,this.name,r),this.toStringOptions=o??null,Object.defineProperty(this,bx.MAP,{value:rme.map}),Object.defineProperty(this,bx.SCALAR,{value:sme.string}),Object.defineProperty(this,bx.SEQ,{value:ime.seq}),this.sortMapEntries=typeof a=="function"?a:a===!0?ame:null}clone(){let t=Object.create(e.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}};x3.Schema=kx});var A3=x(E3=>{"use strict";p();var ome=Ae(),Tx=Sf(),Cf=_f();function cme(e,t){let n=[],r=t.directives===!0;if(t.directives!==!1&&e.directives){let c=e.directives.toString(e);c?(n.push(c),r=!0):e.directives.docStart&&(r=!0)}r&&n.push("---");let i=Tx.createStringifyContext(e,t),{commentString:s}=i.options;if(e.commentBefore){n.length!==1&&n.unshift("");let c=s(e.commentBefore);n.unshift(Cf.indentComment(c,""))}let a=!1,o=null;if(e.contents){if(ome.isNode(e.contents)){if(e.contents.spaceBefore&&r&&n.push(""),e.contents.commentBefore){let f=s(e.contents.commentBefore);n.push(Cf.indentComment(f,""))}i.forceBlockIndent=!!e.comment,o=e.contents.comment}let c=o?void 0:()=>a=!0,l=Tx.stringify(e.contents,i,()=>o=null,c);o&&(l+=Cf.lineComment(l,"",s(o))),(l[0]==="|"||l[0]===">")&&n[n.length-1]==="---"?n[n.length-1]=`--- ${l}`:n.push(l)}else n.push(Tx.stringify(e.contents,i));if(e.directives?.docEnd)if(e.comment){let c=s(e.comment);c.includes(`
|
|
170
|
+
`)?(n.push("..."),n.push(Cf.indentComment(c,""))):n.push(`... ${c}`)}else n.push("...");else{let c=e.comment;c&&a&&(c=c.replace(/^\n+/,"")),c&&((!a||o)&&n[n.length-1]!==""&&n.push(""),n.push(Cf.indentComment(s(c),"")))}return n.join(`
|
|
171
|
+
`)+`
|
|
172
|
+
`}E3.stringifyDocument=cme});var Lf=x(O3=>{"use strict";p();var ume=gf(),Qc=Dy(),nr=Ae(),lme=Ss(),fme=_s(),dme=Sx(),hme=A3(),wx=qy(),pme=Ow(),mme=yf(),xx=Aw(),Ex=class e{constructor(t,n,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,nr.NODE_TYPE,{value:nr.DOC});let i=null;typeof n=="function"||Array.isArray(n)?i=n:r===void 0&&n&&(r=n,n=void 0);let s=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=s;let{version:a}=s;r?._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(a=this.directives.yaml.version)):this.directives=new xx.Directives({version:a}),this.setSchema(a,r),this.contents=t===void 0?null:this.createNode(t,i,r)}clone(){let t=Object.create(e.prototype,{[nr.NODE_TYPE]:{value:nr.DOC}});return t.commentBefore=this.commentBefore,t.comment=this.comment,t.errors=this.errors.slice(),t.warnings=this.warnings.slice(),t.options=Object.assign({},this.options),this.directives&&(t.directives=this.directives.clone()),t.schema=this.schema.clone(),t.contents=nr.isNode(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(t){Xc(this.contents)&&this.contents.add(t)}addIn(t,n){Xc(this.contents)&&this.contents.addIn(t,n)}createAlias(t,n){if(!t.anchor){let r=wx.anchorNames(this);t.anchor=!n||r.has(n)?wx.findNewAnchor(n||"a",r):n}return new ume.Alias(t.anchor)}createNode(t,n,r){let i;if(typeof n=="function")t=n.call({"":t},"",t),i=n;else if(Array.isArray(n)){let _=T=>typeof T=="number"||T instanceof String||T instanceof Number,k=n.filter(_).map(String);k.length>0&&(n=n.concat(k)),i=n}else r===void 0&&n&&(r=n,n=void 0);let{aliasDuplicateObjects:s,anchorPrefix:a,flow:o,keepUndefined:c,onTagObj:l,tag:f}=r??{},{onAnchor:h,setAnchors:d,sourceObjects:g}=wx.createNodeAnchors(this,a||"a"),v={aliasDuplicateObjects:s??!0,keepUndefined:c??!1,onAnchor:h,onTagObj:l,replacer:i,schema:this.schema,sourceObjects:g},b=mme.createNode(t,f,v);return o&&nr.isCollection(b)&&(b.flow=!0),d(),b}createPair(t,n,r={}){let i=this.createNode(t,null,r),s=this.createNode(n,null,r);return new lme.Pair(i,s)}delete(t){return Xc(this.contents)?this.contents.delete(t):!1}deleteIn(t){return Qc.isEmptyPath(t)?this.contents==null?!1:(this.contents=null,!0):Xc(this.contents)?this.contents.deleteIn(t):!1}get(t,n){return nr.isCollection(this.contents)?this.contents.get(t,n):void 0}getIn(t,n){return Qc.isEmptyPath(t)?!n&&nr.isScalar(this.contents)?this.contents.value:this.contents:nr.isCollection(this.contents)?this.contents.getIn(t,n):void 0}has(t){return nr.isCollection(this.contents)?this.contents.has(t):!1}hasIn(t){return Qc.isEmptyPath(t)?this.contents!==void 0:nr.isCollection(this.contents)?this.contents.hasIn(t):!1}set(t,n){this.contents==null?this.contents=Qc.collectionFromPath(this.schema,[t],n):Xc(this.contents)&&this.contents.set(t,n)}setIn(t,n){Qc.isEmptyPath(t)?this.contents=n:this.contents==null?this.contents=Qc.collectionFromPath(this.schema,Array.from(t),n):Xc(this.contents)&&this.contents.setIn(t,n)}setSchema(t,n={}){typeof t=="number"&&(t=String(t));let r;switch(t){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new xx.Directives({version:"1.1"}),r={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=t:this.directives=new xx.Directives({version:t}),r={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=null;break;default:{let i=JSON.stringify(t);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${i}`)}}if(n.schema instanceof Object)this.schema=n.schema;else if(r)this.schema=new dme.Schema(Object.assign(r,n));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:t,jsonArg:n,mapAsMap:r,maxAliasCount:i,onAnchor:s,reviver:a}={}){let o={anchors:new Map,doc:this,keep:!t,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100},c=fme.toJS(this.contents,n??"",o);if(typeof s=="function")for(let{count:l,res:f}of o.anchors.values())s(f,l);return typeof a=="function"?pme.applyReviver(a,{"":c},"",c):c}toJSON(t,n){return this.toJS({json:!0,jsonArg:t,mapAsMap:!1,onAnchor:n})}toString(t={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in t&&(!Number.isInteger(t.indent)||Number(t.indent)<=0)){let n=JSON.stringify(t.indent);throw new Error(`"indent" option must be a positive integer, not ${n}`)}return hme.stringifyDocument(this,t)}};function Xc(e){if(nr.isCollection(e))return!0;throw new Error("Expected a YAML collection as document contents")}O3.Document=Ex});var Mf=x(If=>{"use strict";p();var qf=class extends Error{constructor(t,n,r,i){super(),this.name=t,this.code=r,this.message=i,this.pos=n}},Ax=class extends qf{constructor(t,n,r){super("YAMLParseError",t,n,r)}},Ox=class extends qf{constructor(t,n,r){super("YAMLWarning",t,n,r)}},gme=(e,t)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(o=>t.linePos(o));let{line:r,col:i}=n.linePos[0];n.message+=` at line ${r}, column ${i}`;let s=i-1,a=e.substring(t.lineStarts[r-1],t.lineStarts[r]).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"),r>1&&/^ *$/.test(a.substring(0,s))){let o=e.substring(t.lineStarts[r-2],t.lineStarts[r-1]);o.length>80&&(o=o.substring(0,79)+`\u2026
|
|
173
|
+
`),a=o+a}if(/[^ ]/.test(a)){let o=1,c=n.linePos[1];c?.line===r&&c.col>i&&(o=Math.max(1,Math.min(c.col-i,80-s)));let l=" ".repeat(s)+"^".repeat(o);n.message+=`:
|
|
174
|
+
|
|
175
|
+
${a}
|
|
176
|
+
${l}
|
|
177
|
+
`}};If.YAMLError=qf;If.YAMLParseError=Ax;If.YAMLWarning=Ox;If.prettifyError=gme});var Rf=x(P3=>{"use strict";p();function yme(e,{flow:t,indicator:n,next:r,offset:i,onError:s,parentIndent:a,startOnNewline:o}){let c=!1,l=o,f=o,h="",d="",g=!1,v=!1,b=null,_=null,k=null,T=null,w=null,y=null,A=null;for(let L of e)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),b&&(l&&L.type!=="comment"&&L.type!=="newline"&&s(b,"TAB_AS_INDENT","Tabs are not allowed as indentation"),b=null),L.type){case"space":!t&&(n!=="doc-start"||r?.type!=="flow-collection")&&L.source.includes(" ")&&(b=L),f=!0;break;case"comment":{f||s(L,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let D=L.source.substring(1)||" ";h?h+=d+D:h=D,d="",l=!1;break}case"newline":l?h?h+=L.source:(!y||n!=="seq-item-ind")&&(c=!0):d+=L.source,l=!0,g=!0,(_||k)&&(T=L),f=!0;break;case"anchor":_&&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),_=L,A??(A=L.offset),l=!1,f=!1,v=!0;break;case"tag":{k&&s(L,"MULTIPLE_TAGS","A node can have at most one tag"),k=L,A??(A=L.offset),l=!1,f=!1,v=!0;break}case n:(_||k)&&s(L,"BAD_PROP_ORDER",`Anchors and tags must be after the ${L.source} indicator`),y&&s(L,"UNEXPECTED_TOKEN",`Unexpected ${L.source} in ${t??"collection"}`),y=L,l=n==="seq-item-ind"||n==="explicit-key-ind",f=!1;break;case"comma":if(t){w&&s(L,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),w=L,l=!1,f=!1;break}default:s(L,"UNEXPECTED_TOKEN",`Unexpected ${L.type} token`),l=!1,f=!1}let P=e[e.length-1],O=P?P.offset+P.source.length:i;return v&&r&&r.type!=="space"&&r.type!=="newline"&&r.type!=="comma"&&(r.type!=="scalar"||r.source!=="")&&s(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),b&&(l&&b.indent<=a||r?.type==="block-map"||r?.type==="block-seq")&&s(b,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:w,found:y,spaceBefore:c,comment:h,hasNewline:g,anchor:_,tag:k,newlineAfterProp:T,end:O,start:A??O}}P3.resolveProps=yme});var __=x(N3=>{"use strict";p();function Px(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes(`
|
|
178
|
+
`))return!0;if(e.end){for(let t of e.end)if(t.type==="newline")return!0}return!1;case"flow-collection":for(let t of e.items){for(let n of t.start)if(n.type==="newline")return!0;if(t.sep){for(let n of t.sep)if(n.type==="newline")return!0}if(Px(t.key)||Px(t.value))return!0}return!1;default:return!0}}N3.containsNewline=Px});var Nx=x(C3=>{"use strict";p();var _me=__();function vme(e,t,n){if(t?.type==="flow-collection"){let r=t.end[0];r.indent===e&&(r.source==="]"||r.source==="}")&&_me.containsNewline(t)&&n(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}C3.flowIndentCheck=vme});var Cx=x(q3=>{"use strict";p();var L3=Ae();function bme(e,t,n){let{uniqueKeys:r}=e.options;if(r===!1)return!1;let i=typeof r=="function"?r:(s,a)=>s===a||L3.isScalar(s)&&L3.isScalar(a)&&s.value===a.value;return t.some(s=>i(s.key,n))}q3.mapIncludes=bme});var B3=x(j3=>{"use strict";p();var I3=Ss(),kme=ws(),M3=Rf(),Sme=__(),R3=Nx(),Tme=Cx(),D3="All mapping items must start at the same column";function wme({composeNode:e,composeEmptyNode:t},n,r,i,s){let a=s?.nodeClass??kme.YAMLMap,o=new a(n.schema);n.atRoot&&(n.atRoot=!1);let c=r.offset,l=null;for(let f of r.items){let{start:h,key:d,sep:g,value:v}=f,b=M3.resolveProps(h,{indicator:"explicit-key-ind",next:d??g?.[0],offset:c,onError:i,parentIndent:r.indent,startOnNewline:!0}),_=!b.found;if(_){if(d&&(d.type==="block-seq"?i(c,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in d&&d.indent!==r.indent&&i(c,"BAD_INDENT",D3)),!b.anchor&&!b.tag&&!g){l=b.end,b.comment&&(o.comment?o.comment+=`
|
|
179
|
+
`+b.comment:o.comment=b.comment);continue}(b.newlineAfterProp||Sme.containsNewline(d))&&i(d??h[h.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else b.found?.indent!==r.indent&&i(c,"BAD_INDENT",D3);n.atKey=!0;let k=b.end,T=d?e(n,d,b,i):t(n,k,h,null,b,i);n.schema.compat&&R3.flowIndentCheck(r.indent,d,i),n.atKey=!1,Tme.mapIncludes(n,o.items,T)&&i(k,"DUPLICATE_KEY","Map keys must be unique");let w=M3.resolveProps(g??[],{indicator:"map-value-ind",next:v,offset:T.range[2],onError:i,parentIndent:r.indent,startOnNewline:!d||d.type==="block-scalar"});if(c=w.end,w.found){_&&(v?.type==="block-map"&&!w.hasNewline&&i(c,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),n.options.strict&&b.start<w.found.offset-1024&&i(T.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let y=v?e(n,v,w,i):t(n,c,g,null,w,i);n.schema.compat&&R3.flowIndentCheck(r.indent,v,i),c=y.range[2];let A=new I3.Pair(T,y);n.options.keepSourceTokens&&(A.srcToken=f),o.items.push(A)}else{_&&i(T.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),w.comment&&(T.comment?T.comment+=`
|
|
180
|
+
`+w.comment:T.comment=w.comment);let y=new I3.Pair(T);n.options.keepSourceTokens&&(y.srcToken=f),o.items.push(y)}}return l&&l<c&&i(l,"IMPOSSIBLE","Map comment with trailing content"),o.range=[r.offset,c,l??c],o}j3.resolveBlockMap=wme});var V3=x(F3=>{"use strict";p();var xme=xs(),Eme=Rf(),Ame=Nx();function Ome({composeNode:e,composeEmptyNode:t},n,r,i,s){let a=s?.nodeClass??xme.YAMLSeq,o=new a(n.schema);n.atRoot&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let c=r.offset,l=null;for(let{start:f,value:h}of r.items){let d=Eme.resolveProps(f,{indicator:"seq-item-ind",next:h,offset:c,onError:i,parentIndent:r.indent,startOnNewline:!0});if(!d.found)if(d.anchor||d.tag||h)h?.type==="block-seq"?i(d.end,"BAD_INDENT","All sequence items must start at the same column"):i(c,"MISSING_CHAR","Sequence item without - indicator");else{l=d.end,d.comment&&(o.comment=d.comment);continue}let g=h?e(n,h,d,i):t(n,d.end,f,null,d,i);n.schema.compat&&Ame.flowIndentCheck(r.indent,h,i),c=g.range[2],o.items.push(g)}return o.range=[r.offset,c,l??c],o}F3.resolveBlockSeq=Ome});var Zc=x($3=>{"use strict";p();function Pme(e,t,n,r){let i="";if(e){let s=!1,a="";for(let o of e){let{source:c,type:l}=o;switch(l){case"space":s=!0;break;case"comment":{n&&!s&&r(o,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let f=c.substring(1)||" ";i?i+=a+f:i=f,a="";break}case"newline":i&&(a+=c),s=!0;break;default:r(o,"UNEXPECTED_TOKEN",`Unexpected ${l} at node end`)}t+=c.length}}return{comment:i,offset:t}}$3.resolveEnd=Pme});var W3=x(z3=>{"use strict";p();var Nme=Ae(),Cme=Ss(),U3=ws(),Lme=xs(),qme=Zc(),H3=Rf(),Ime=__(),Mme=Cx(),Lx="Block collections are not allowed within flow collections",qx=e=>e&&(e.type==="block-map"||e.type==="block-seq");function Rme({composeNode:e,composeEmptyNode:t},n,r,i,s){let a=r.start.source==="{",o=a?"flow map":"flow sequence",c=s?.nodeClass??(a?U3.YAMLMap:Lme.YAMLSeq),l=new c(n.schema);l.flow=!0;let f=n.atRoot;f&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let h=r.offset+r.start.source.length;for(let _=0;_<r.items.length;++_){let k=r.items[_],{start:T,key:w,sep:y,value:A}=k,P=H3.resolveProps(T,{flow:o,indicator:"explicit-key-ind",next:w??y?.[0],offset:h,onError:i,parentIndent:r.indent,startOnNewline:!1});if(!P.found){if(!P.anchor&&!P.tag&&!y&&!A){_===0&&P.comma?i(P.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${o}`):_<r.items.length-1&&i(P.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${o}`),P.comment&&(l.comment?l.comment+=`
|
|
181
|
+
`+P.comment:l.comment=P.comment),h=P.end;continue}!a&&n.options.strict&&Ime.containsNewline(w)&&i(w,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(_===0)P.comma&&i(P.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${o}`);else if(P.comma||i(P.start,"MISSING_CHAR",`Missing , between ${o} items`),P.comment){let O="";e:for(let L of T)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];Nme.isPair(L)&&(L=L.value??L.key),L.comment?L.comment+=`
|
|
182
|
+
`+O:L.comment=O,P.comment=P.comment.substring(O.length+1)}}if(!a&&!y&&!P.found){let O=A?e(n,A,P,i):t(n,P.end,y,null,P,i);l.items.push(O),h=O.range[2],qx(A)&&i(O.range,"BLOCK_IN_FLOW",Lx)}else{n.atKey=!0;let O=P.end,L=w?e(n,w,P,i):t(n,O,T,null,P,i);qx(w)&&i(L.range,"BLOCK_IN_FLOW",Lx),n.atKey=!1;let D=H3.resolveProps(y??[],{flow:o,indicator:"map-value-ind",next:A,offset:L.range[2],onError:i,parentIndent:r.indent,startOnNewline:!1});if(D.found){if(!a&&!P.found&&n.options.strict){if(y)for(let q of y){if(q===D.found)break;if(q.type==="newline"){i(q,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}P.start<D.found.offset-1024&&i(D.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]===":"?i(A,"MISSING_CHAR",`Missing space after : in ${o}`):i(D.start,"MISSING_CHAR",`Missing , or : between ${o} items`));let M=A?e(n,A,D,i):D.found?t(n,D.end,y,null,D,i):null;M?qx(A)&&i(M.range,"BLOCK_IN_FLOW",Lx):D.comment&&(L.comment?L.comment+=`
|
|
183
|
+
`+D.comment:L.comment=D.comment);let C=new Cme.Pair(L,M);if(n.options.keepSourceTokens&&(C.srcToken=k),a){let q=l;Mme.mapIncludes(n,q.items,L)&&i(O,"DUPLICATE_KEY","Map keys must be unique"),q.items.push(C)}else{let q=new U3.YAMLMap(n.schema);q.flow=!0,q.items.push(C);let V=(M??L).range;q.range=[L.range[0],V[1],V[2]],l.items.push(q)}h=M?M.range[2]:D.end}}let d=a?"}":"]",[g,...v]=r.end,b=h;if(g?.source===d)b=g.offset+g.source.length;else{let _=o[0].toUpperCase()+o.substring(1),k=f?`${_} must end with a ${d}`:`${_} in block collection must be sufficiently indented and end with a ${d}`;i(h,f?"MISSING_CHAR":"BAD_INDENT",k),g&&g.source.length!==1&&v.unshift(g)}if(v.length>0){let _=qme.resolveEnd(v,b,n.options.strict,i);_.comment&&(l.comment?l.comment+=`
|
|
184
|
+
`+_.comment:l.comment=_.comment),l.range=[r.offset,b,_.offset]}else l.range=[r.offset,b,b];return l}z3.resolveFlowCollection=Rme});var J3=x(G3=>{"use strict";p();var Dme=Ae(),jme=gt(),Bme=ws(),Fme=xs(),Vme=B3(),$me=V3(),Ume=W3();function Ix(e,t,n,r,i,s){let a=n.type==="block-map"?Vme.resolveBlockMap(e,t,n,r,s):n.type==="block-seq"?$me.resolveBlockSeq(e,t,n,r,s):Ume.resolveFlowCollection(e,t,n,r,s),o=a.constructor;return i==="!"||i===o.tagName?(a.tag=o.tagName,a):(i&&(a.tag=i),a)}function Hme(e,t,n,r,i){let s=r.tag,a=s?t.directives.tagName(s.source,d=>i(s,"TAG_RESOLVE_FAILED",d)):null;if(n.type==="block-seq"){let{anchor:d,newlineAfterProp:g}=r,v=d&&s?d.offset>s.offset?d:s:d??s;v&&(!g||g.offset<v.offset)&&i(v,"MISSING_CHAR","Missing newline after block sequence props")}let o=n.type==="block-map"?"map":n.type==="block-seq"?"seq":n.start.source==="{"?"map":"seq";if(!s||!a||a==="!"||a===Bme.YAMLMap.tagName&&o==="map"||a===Fme.YAMLSeq.tagName&&o==="seq")return Ix(e,t,n,i,a);let c=t.schema.tags.find(d=>d.tag===a&&d.collection===o);if(!c){let d=t.schema.knownTags[a];if(d?.collection===o)t.schema.tags.push(Object.assign({},d,{default:!1})),c=d;else return d?i(s,"BAD_COLLECTION_TYPE",`${d.tag} used for ${o} collection, but expects ${d.collection??"scalar"}`,!0):i(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${a}`,!0),Ix(e,t,n,i,a)}let l=Ix(e,t,n,i,a,c),f=c.resolve?.(l,d=>i(s,"TAG_RESOLVE_FAILED",d),t.options)??l,h=Dme.isNode(f)?f:new jme.Scalar(f);return h.range=l.range,h.tag=a,c?.format&&(h.format=c.format),h}G3.composeCollection=Hme});var Rx=x(K3=>{"use strict";p();var Mx=gt();function zme(e,t,n){let r=t.offset,i=Wme(t,e.options.strict,n);if(!i)return{value:"",type:null,comment:"",range:[r,r,r]};let s=i.mode===">"?Mx.Scalar.BLOCK_FOLDED:Mx.Scalar.BLOCK_LITERAL,a=t.source?Gme(t.source):[],o=a.length;for(let b=a.length-1;b>=0;--b){let _=a[b][1];if(_===""||_==="\r")o=b;else break}if(o===0){let b=i.chomp==="+"&&a.length>0?`
|
|
185
|
+
`.repeat(Math.max(1,a.length-1)):"",_=r+i.length;return t.source&&(_+=t.source.length),{value:b,type:s,comment:i.comment,range:[r,_,_]}}let c=t.indent+i.indent,l=t.offset+i.length,f=0;for(let b=0;b<o;++b){let[_,k]=a[b];if(k===""||k==="\r")i.indent===0&&_.length>c&&(c=_.length);else{_.length<c&&n(l+_.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),i.indent===0&&(c=_.length),f=b,c===0&&!e.atRoot&&n(l,"BAD_INDENT","Block scalar values in collections must be indented");break}l+=_.length+k.length+1}for(let b=a.length-1;b>=o;--b)a[b][0].length>c&&(o=b+1);let h="",d="",g=!1;for(let b=0;b<f;++b)h+=a[b][0].slice(c)+`
|
|
186
|
+
`;for(let b=f;b<o;++b){let[_,k]=a[b];l+=_.length+k.length+1;let T=k[k.length-1]==="\r";if(T&&(k=k.slice(0,-1)),k&&_.length<c){let y=`Block scalar lines must not be less indented than their ${i.indent?"explicit indentation indicator":"first line"}`;n(l-k.length-(T?2:1),"BAD_INDENT",y),_=""}s===Mx.Scalar.BLOCK_LITERAL?(h+=d+_.slice(c)+k,d=`
|
|
187
|
+
`):_.length>c||k[0]===" "?(d===" "?d=`
|
|
188
|
+
`:!g&&d===`
|
|
189
|
+
`&&(d=`
|
|
190
|
+
|
|
191
|
+
`),h+=d+_.slice(c)+k,d=`
|
|
192
|
+
`,g=!0):k===""?d===`
|
|
193
|
+
`?h+=`
|
|
194
|
+
`:d=`
|
|
195
|
+
`:(h+=d+k,d=" ",g=!1)}switch(i.chomp){case"-":break;case"+":for(let b=o;b<a.length;++b)h+=`
|
|
196
|
+
`+a[b][0].slice(c);h[h.length-1]!==`
|
|
197
|
+
`&&(h+=`
|
|
198
|
+
`);break;default:h+=`
|
|
199
|
+
`}let v=r+i.length+t.source.length;return{value:h,type:s,comment:i.comment,range:[r,v,v]}}function Wme({offset:e,props:t},n,r){if(t[0].type!=="block-scalar-header")return r(t[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:i}=t[0],s=i[0],a=0,o="",c=-1;for(let d=1;d<i.length;++d){let g=i[d];if(!o&&(g==="-"||g==="+"))o=g;else{let v=Number(g);!a&&v?a=v:c===-1&&(c=e+d)}}c!==-1&&r(c,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${i}`);let l=!1,f="",h=i.length;for(let d=1;d<t.length;++d){let g=t[d];switch(g.type){case"space":l=!0;case"newline":h+=g.source.length;break;case"comment":n&&!l&&r(g,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),h+=g.source.length,f=g.source.substring(1);break;case"error":r(g,"UNEXPECTED_TOKEN",g.message),h+=g.source.length;break;default:{let v=`Unexpected token in block scalar header: ${g.type}`;r(g,"UNEXPECTED_TOKEN",v);let b=g.source;b&&typeof b=="string"&&(h+=b.length)}}}return{mode:s,indent:a,chomp:o,comment:f,length:h}}function Gme(e){let t=e.split(/\n( *)/),n=t[0],r=n.match(/^( *)/),s=[r?.[1]?[r[1],n.slice(r[1].length)]:["",n]];for(let a=1;a<t.length;a+=2)s.push([t[a],t[a+1]]);return s}K3.resolveBlockScalar=zme});var jx=x(Q3=>{"use strict";p();var Dx=gt(),Jme=Zc();function Kme(e,t,n){let{offset:r,type:i,source:s,end:a}=e,o,c,l=(d,g,v)=>n(r+d,g,v);switch(i){case"scalar":o=Dx.Scalar.PLAIN,c=Yme(s,l);break;case"single-quoted-scalar":o=Dx.Scalar.QUOTE_SINGLE,c=Qme(s,l);break;case"double-quoted-scalar":o=Dx.Scalar.QUOTE_DOUBLE,c=Xme(s,l);break;default:return n(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${i}`),{value:"",type:null,comment:"",range:[r,r+s.length,r+s.length]}}let f=r+s.length,h=Jme.resolveEnd(a,f,t,n);return{value:c,type:o,comment:h.comment,range:[r,f,h.offset]}}function Yme(e,t){let n="";switch(e[0]){case" ":n="a tab character";break;case",":n="flow indicator character ,";break;case"%":n="directive indicator character %";break;case"|":case">":{n=`block scalar indicator ${e[0]}`;break}case"@":case"`":{n=`reserved character ${e[0]}`;break}}return n&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`),Y3(e)}function Qme(e,t){return(e[e.length-1]!=="'"||e.length===1)&&t(e.length,"MISSING_CHAR","Missing closing 'quote"),Y3(e.slice(1,-1)).replace(/''/g,"'")}function Y3(e){let t,n;try{t=new RegExp(`(.*?)(?<![ ])[ ]*\r?
|
|
200
|
+
`,"sy"),n=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
|
201
|
+
`,"sy")}catch{t=/(.*?)[ \t]*\r?\n/sy,n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=t.exec(e);if(!r)return e;let i=r[1],s=" ",a=t.lastIndex;for(n.lastIndex=a;r=n.exec(e);)r[1]===""?s===`
|
|
202
|
+
`?i+=s:s=`
|
|
203
|
+
`:(i+=s+r[1],s=" "),a=n.lastIndex;let o=/[ \t]*(.*)/sy;return o.lastIndex=a,r=o.exec(e),i+s+(r?.[1]??"")}function Xme(e,t){let n="";for(let r=1;r<e.length-1;++r){let i=e[r];if(!(i==="\r"&&e[r+1]===`
|
|
204
|
+
`))if(i===`
|
|
205
|
+
`){let{fold:s,offset:a}=Zme(e,r);n+=s,r=a}else if(i==="\\"){let s=e[++r],a=ege[s];if(a)n+=a;else if(s===`
|
|
206
|
+
`)for(s=e[r+1];s===" "||s===" ";)s=e[++r+1];else if(s==="\r"&&e[r+1]===`
|
|
207
|
+
`)for(s=e[++r+1];s===" "||s===" ";)s=e[++r+1];else if(s==="x"||s==="u"||s==="U"){let o=s==="x"?2:s==="u"?4:8;n+=tge(e,r+1,o,t),r+=o}else{let o=e.substr(r-1,2);t(r-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${o}`),n+=o}}else if(i===" "||i===" "){let s=r,a=e[r+1];for(;a===" "||a===" ";)a=e[++r+1];a!==`
|
|
208
|
+
`&&!(a==="\r"&&e[r+2]===`
|
|
209
|
+
`)&&(n+=r>s?e.slice(s,r+1):i)}else n+=i}return(e[e.length-1]!=='"'||e.length===1)&&t(e.length,"MISSING_CHAR",'Missing closing "quote'),n}function Zme(e,t){let n="",r=e[t+1];for(;(r===" "||r===" "||r===`
|
|
210
|
+
`||r==="\r")&&!(r==="\r"&&e[t+2]!==`
|
|
211
|
+
`);)r===`
|
|
212
|
+
`&&(n+=`
|
|
213
|
+
`),t+=1,r=e[t+1];return n||(n=" "),{fold:n,offset:t}}var ege={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
|
|
214
|
+
`,r:"\r",t:" ",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function tge(e,t,n,r){let i=e.substr(t,n),a=i.length===n&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;try{return String.fromCodePoint(a)}catch{let o=e.substr(t-2,n+2);return r(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${o}`),o}}Q3.resolveFlowScalar=Kme});var eU=x(Z3=>{"use strict";p();var so=Ae(),X3=gt(),nge=Rx(),rge=jx();function ige(e,t,n,r){let{value:i,type:s,comment:a,range:o}=t.type==="block-scalar"?nge.resolveBlockScalar(e,t,r):rge.resolveFlowScalar(t,e.options.strict,r),c=n?e.directives.tagName(n.source,h=>r(n,"TAG_RESOLVE_FAILED",h)):null,l;e.options.stringKeys&&e.atKey?l=e.schema[so.SCALAR]:c?l=sge(e.schema,i,c,n,r):t.type==="scalar"?l=age(e,i,t,r):l=e.schema[so.SCALAR];let f;try{let h=l.resolve(i,d=>r(n??t,"TAG_RESOLVE_FAILED",d),e.options);f=so.isScalar(h)?h:new X3.Scalar(h)}catch(h){let d=h instanceof Error?h.message:String(h);r(n??t,"TAG_RESOLVE_FAILED",d),f=new X3.Scalar(i)}return f.range=o,f.source=i,s&&(f.type=s),c&&(f.tag=c),l.format&&(f.format=l.format),a&&(f.comment=a),f}function sge(e,t,n,r,i){if(n==="!")return e[so.SCALAR];let s=[];for(let o of e.tags)if(!o.collection&&o.tag===n)if(o.default&&o.test)s.push(o);else return o;for(let o of s)if(o.test?.test(t))return o;let a=e.knownTags[n];return a&&!a.collection?(e.tags.push(Object.assign({},a,{default:!1,test:void 0})),a):(i(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,n!=="tag:yaml.org,2002:str"),e[so.SCALAR])}function age({atKey:e,directives:t,schema:n},r,i,s){let a=n.tags.find(o=>(o.default===!0||e&&o.default==="key")&&o.test?.test(r))||n[so.SCALAR];if(n.compat){let o=n.compat.find(c=>c.default&&c.test?.test(r))??n[so.SCALAR];if(a.tag!==o.tag){let c=t.tagString(a.tag),l=t.tagString(o.tag),f=`Value may be parsed as either ${c} or ${l}`;s(i,"TAG_RESOLVE_FAILED",f,!0)}}return a}Z3.composeScalar=ige});var nU=x(tU=>{"use strict";p();function oge(e,t,n){if(t){n??(n=t.length);for(let r=n-1;r>=0;--r){let i=t[r];switch(i.type){case"space":case"comment":case"newline":e-=i.source.length;continue}for(i=t[++r];i?.type==="space";)e+=i.source.length,i=t[++r];break}}return e}tU.emptyScalarPosition=oge});var sU=x(Fx=>{"use strict";p();var cge=gf(),uge=Ae(),lge=J3(),rU=eU(),fge=Zc(),dge=nU(),hge={composeNode:iU,composeEmptyNode:Bx};function iU(e,t,n,r){let i=e.atKey,{spaceBefore:s,comment:a,anchor:o,tag:c}=n,l,f=!0;switch(t.type){case"alias":l=pge(e,t,r),(o||c)&&r(t,"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=rU.composeScalar(e,t,c,r),o&&(l.anchor=o.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{l=lge.composeCollection(hge,e,t,n,r),o&&(l.anchor=o.source.substring(1))}catch(h){let d=h instanceof Error?h.message:String(h);r(t,"RESOURCE_EXHAUSTION",d)}break;default:{let h=t.type==="error"?t.message:`Unsupported token (type: ${t.type})`;r(t,"UNEXPECTED_TOKEN",h),f=!1}}return l??(l=Bx(e,t.offset,void 0,null,n,r)),o&&l.anchor===""&&r(o,"BAD_ALIAS","Anchor cannot be an empty string"),i&&e.options.stringKeys&&(!uge.isScalar(l)||typeof l.value!="string"||l.tag&&l.tag!=="tag:yaml.org,2002:str")&&r(c??t,"NON_STRING_KEY","With stringKeys, all keys must be strings"),s&&(l.spaceBefore=!0),a&&(t.type==="scalar"&&t.source===""?l.comment=a:l.commentBefore=a),e.options.keepSourceTokens&&f&&(l.srcToken=t),l}function Bx(e,t,n,r,{spaceBefore:i,comment:s,anchor:a,tag:o,end:c},l){let f={type:"scalar",offset:dge.emptyScalarPosition(t,n,r),indent:-1,source:""},h=rU.composeScalar(e,f,o,l);return a&&(h.anchor=a.source.substring(1),h.anchor===""&&l(a,"BAD_ALIAS","Anchor cannot be an empty string")),i&&(h.spaceBefore=!0),s&&(h.comment=s,h.range[2]=c),h}function pge({options:e},{offset:t,source:n,end:r},i){let s=new cge.Alias(n.substring(1));s.source===""&&i(t,"BAD_ALIAS","Alias cannot be an empty string"),s.source.endsWith(":")&&i(t+n.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let a=t+n.length,o=fge.resolveEnd(r,a,e.strict,i);return s.range=[t,a,o.offset],o.comment&&(s.comment=o.comment),s}Fx.composeEmptyNode=Bx;Fx.composeNode=iU});var cU=x(oU=>{"use strict";p();var mge=Lf(),aU=sU(),gge=Zc(),yge=Rf();function _ge(e,t,{offset:n,start:r,value:i,end:s},a){let o=Object.assign({_directives:t},e),c=new mge.Document(void 0,o),l={atKey:!1,atRoot:!0,directives:c.directives,options:c.options,schema:c.schema},f=yge.resolveProps(r,{indicator:"doc-start",next:i??s?.[0],offset:n,onError:a,parentIndent:0,startOnNewline:!0});f.found&&(c.directives.docStart=!0,i&&(i.type==="block-map"||i.type==="block-seq")&&!f.hasNewline&&a(f.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),c.contents=i?aU.composeNode(l,i,f,a):aU.composeEmptyNode(l,f.end,r,null,f,a);let h=c.contents.range[2],d=gge.resolveEnd(s,h,!1,a);return d.comment&&(c.comment=d.comment),c.range=[n,h,d.offset],c}oU.composeDoc=_ge});var $x=x(fU=>{"use strict";p();var vge=ce("process"),bge=Aw(),kge=Lf(),Df=Mf(),uU=Ae(),Sge=cU(),Tge=Zc();function jf(e){if(typeof e=="number")return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];let{offset:t,source:n}=e;return[t,t+(typeof n=="string"?n.length:1)]}function lU(e){let t="",n=!1,r=!1;for(let i=0;i<e.length;++i){let s=e[i];switch(s[0]){case"#":t+=(t===""?"":r?`
|
|
215
|
+
|
|
216
|
+
`:`
|
|
217
|
+
`)+(s.substring(1)||" "),n=!0,r=!1;break;case"%":e[i+1]?.[0]!=="#"&&(i+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:t,afterEmptyLine:r}}var Vx=class{constructor(t={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(n,r,i,s)=>{let a=jf(n);s?this.warnings.push(new Df.YAMLWarning(a,r,i)):this.errors.push(new Df.YAMLParseError(a,r,i))},this.directives=new bge.Directives({version:t.version||"1.2"}),this.options=t}decorate(t,n){let{comment:r,afterEmptyLine:i}=lU(this.prelude);if(r){let s=t.contents;if(n)t.comment=t.comment?`${t.comment}
|
|
218
|
+
${r}`:r;else if(i||t.directives.docStart||!s)t.commentBefore=r;else if(uU.isCollection(s)&&!s.flow&&s.items.length>0){let a=s.items[0];uU.isPair(a)&&(a=a.key);let o=a.commentBefore;a.commentBefore=o?`${r}
|
|
219
|
+
${o}`:r}else{let a=s.commentBefore;s.commentBefore=a?`${r}
|
|
220
|
+
${a}`:r}}if(n){for(let s=0;s<this.errors.length;++s)t.errors.push(this.errors[s]);for(let s=0;s<this.warnings.length;++s)t.warnings.push(this.warnings[s])}else t.errors=this.errors,t.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:lU(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(t,n=!1,r=-1){for(let i of t)yield*this.next(i);yield*this.end(n,r)}*next(t){switch(vge.env.LOG_STREAM&&console.dir(t,{depth:null}),t.type){case"directive":this.directives.add(t.source,(n,r,i)=>{let s=jf(t);s[0]+=n,this.onError(s,"BAD_DIRECTIVE",r,i)}),this.prelude.push(t.source),this.atDirectives=!0;break;case"document":{let n=Sge.composeDoc(this.options,this.directives,t,this.onError);this.atDirectives&&!n.directives.docStart&&this.onError(t,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(n,!1),this.doc&&(yield this.doc),this.doc=n,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(t.source);break;case"error":{let n=t.source?`${t.message}: ${JSON.stringify(t.source)}`:t.message,r=new Df.YAMLParseError(jf(t),"UNEXPECTED_TOKEN",n);this.atDirectives||!this.doc?this.errors.push(r):this.doc.errors.push(r);break}case"doc-end":{if(!this.doc){let r="Unexpected doc-end without preceding document";this.errors.push(new Df.YAMLParseError(jf(t),"UNEXPECTED_TOKEN",r));break}this.doc.directives.docEnd=!0;let n=Tge.resolveEnd(t.end,t.offset+t.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),n.comment){let r=this.doc.comment;this.doc.comment=r?`${r}
|
|
221
|
+
${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.push(new Df.YAMLParseError(jf(t),"UNEXPECTED_TOKEN",`Unsupported token ${t.type}`))}}*end(t=!1,n=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(t){let r=Object.assign({_directives:this.directives},this.options),i=new kge.Document(void 0,r);this.atDirectives&&this.onError(n,"MISSING_CHAR","Missing directives-end indicator line"),i.range=[0,n,n],this.decorate(i,!1),yield i}}};fU.Composer=Vx});var pU=x(v_=>{"use strict";p();var wge=Rx(),xge=jx(),Ege=Mf(),dU=kf();function Age(e,t=!0,n){if(e){let r=(i,s,a)=>{let o=typeof i=="number"?i:Array.isArray(i)?i[0]:i.offset;if(n)n(o,s,a);else throw new Ege.YAMLParseError([o,o+1],s,a)};switch(e.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return xge.resolveFlowScalar(e,t,r);case"block-scalar":return wge.resolveBlockScalar({options:{strict:t}},e,r)}}return null}function Oge(e,t){let{implicitKey:n=!1,indent:r,inFlow:i=!1,offset:s=-1,type:a="PLAIN"}=t,o=dU.stringifyString({type:a,value:e},{implicitKey:n,indent:r>0?" ".repeat(r):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}}),c=t.end??[{type:"newline",offset:-1,indent:r,source:`
|
|
222
|
+
`}];switch(o[0]){case"|":case">":{let l=o.indexOf(`
|
|
223
|
+
`),f=o.substring(0,l),h=o.substring(l+1)+`
|
|
224
|
+
`,d=[{type:"block-scalar-header",offset:s,indent:r,source:f}];return hU(d,c)||d.push({type:"newline",offset:-1,indent:r,source:`
|
|
225
|
+
`}),{type:"block-scalar",offset:s,indent:r,props:d,source:h}}case'"':return{type:"double-quoted-scalar",offset:s,indent:r,source:o,end:c};case"'":return{type:"single-quoted-scalar",offset:s,indent:r,source:o,end:c};default:return{type:"scalar",offset:s,indent:r,source:o,end:c}}}function Pge(e,t,n={}){let{afterKey:r=!1,implicitKey:i=!1,inFlow:s=!1,type:a}=n,o="indent"in e?e.indent:null;if(r&&typeof o=="number"&&(o+=2),!a)switch(e.type){case"single-quoted-scalar":a="QUOTE_SINGLE";break;case"double-quoted-scalar":a="QUOTE_DOUBLE";break;case"block-scalar":{let l=e.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 c=dU.stringifyString({type:a,value:t},{implicitKey:i||o===null,indent:o!==null&&o>0?" ".repeat(o):"",inFlow:s,options:{blockQuote:!0,lineWidth:-1}});switch(c[0]){case"|":case">":Nge(e,c);break;case'"':Ux(e,c,"double-quoted-scalar");break;case"'":Ux(e,c,"single-quoted-scalar");break;default:Ux(e,c,"scalar")}}function Nge(e,t){let n=t.indexOf(`
|
|
226
|
+
`),r=t.substring(0,n),i=t.substring(n+1)+`
|
|
227
|
+
`;if(e.type==="block-scalar"){let s=e.props[0];if(s.type!=="block-scalar-header")throw new Error("Invalid block scalar header");s.source=r,e.source=i}else{let{offset:s}=e,a="indent"in e?e.indent:-1,o=[{type:"block-scalar-header",offset:s,indent:a,source:r}];hU(o,"end"in e?e.end:void 0)||o.push({type:"newline",offset:-1,indent:a,source:`
|
|
228
|
+
`});for(let c of Object.keys(e))c!=="type"&&c!=="offset"&&delete e[c];Object.assign(e,{type:"block-scalar",indent:a,props:o,source:i})}}function hU(e,t){if(t)for(let n of t)switch(n.type){case"space":case"comment":e.push(n);break;case"newline":return e.push(n),!0}return!1}function Ux(e,t,n){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=n,e.source=t;break;case"block-scalar":{let r=e.props.slice(1),i=t.length;e.props[0].type==="block-scalar-header"&&(i-=e.props[0].source.length);for(let s of r)s.offset+=i;delete e.props,Object.assign(e,{type:n,source:t,end:r});break}case"block-map":case"block-seq":{let i={type:"newline",offset:e.offset+t.length,indent:e.indent,source:`
|
|
229
|
+
`};delete e.items,Object.assign(e,{type:n,source:t,end:[i]});break}default:{let r="indent"in e?e.indent:-1,i="end"in e&&Array.isArray(e.end)?e.end.filter(s=>s.type==="space"||s.type==="comment"||s.type==="newline"):[];for(let s of Object.keys(e))s!=="type"&&s!=="offset"&&delete e[s];Object.assign(e,{type:n,indent:r,source:t,end:i})}}}v_.createScalarToken=Oge;v_.resolveAsScalar=Age;v_.setScalarValue=Pge});var gU=x(mU=>{"use strict";p();var Cge=e=>"type"in e?k_(e):b_(e);function k_(e){switch(e.type){case"block-scalar":{let t="";for(let n of e.props)t+=k_(n);return t+e.source}case"block-map":case"block-seq":{let t="";for(let n of e.items)t+=b_(n);return t}case"flow-collection":{let t=e.start.source;for(let n of e.items)t+=b_(n);for(let n of e.end)t+=n.source;return t}case"document":{let t=b_(e);if(e.end)for(let n of e.end)t+=n.source;return t}default:{let t=e.source;if("end"in e&&e.end)for(let n of e.end)t+=n.source;return t}}}function b_({start:e,key:t,sep:n,value:r}){let i="";for(let s of e)i+=s.source;if(t&&(i+=k_(t)),n)for(let s of n)i+=s.source;return r&&(i+=k_(r)),i}mU.stringify=Cge});var bU=x(vU=>{"use strict";p();var Hx=Symbol("break visit"),Lge=Symbol("skip children"),yU=Symbol("remove item");function ao(e,t){"type"in e&&e.type==="document"&&(e={start:e.start,value:e.value}),_U(Object.freeze([]),e,t)}ao.BREAK=Hx;ao.SKIP=Lge;ao.REMOVE=yU;ao.itemAtPath=(e,t)=>{let n=e;for(let[r,i]of t){let s=n?.[r];if(s&&"items"in s)n=s.items[i];else return}return n};ao.parentCollection=(e,t)=>{let n=ao.itemAtPath(e,t.slice(0,-1)),r=t[t.length-1][0],i=n?.[r];if(i&&"items"in i)return i;throw new Error("Parent collection not found")};function _U(e,t,n){let r=n(t,e);if(typeof r=="symbol")return r;for(let i of["key","value"]){let s=t[i];if(s&&"items"in s){for(let a=0;a<s.items.length;++a){let o=_U(Object.freeze(e.concat([[i,a]])),s.items[a],n);if(typeof o=="number")a=o-1;else{if(o===Hx)return Hx;o===yU&&(s.items.splice(a,1),a-=1)}}typeof r=="function"&&i==="key"&&(r=r(t,e))}}return typeof r=="function"?r(t,e):r}vU.visit=ao});var S_=x(mn=>{"use strict";p();var zx=pU(),qge=gU(),Ige=bU(),Wx="\uFEFF",Gx="",Jx="",Kx="",Mge=e=>!!e&&"items"in e,Rge=e=>!!e&&(e.type==="scalar"||e.type==="single-quoted-scalar"||e.type==="double-quoted-scalar"||e.type==="block-scalar");function Dge(e){switch(e){case Wx:return"<BOM>";case Gx:return"<DOC>";case Jx:return"<FLOW_END>";case Kx:return"<SCALAR>";default:return JSON.stringify(e)}}function jge(e){switch(e){case Wx:return"byte-order-mark";case Gx:return"doc-mode";case Jx:return"flow-error-end";case Kx:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
|
|
230
|
+
`:case`\r
|
|
231
|
+
`: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(e[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}mn.createScalarToken=zx.createScalarToken;mn.resolveAsScalar=zx.resolveAsScalar;mn.setScalarValue=zx.setScalarValue;mn.stringify=qge.stringify;mn.visit=Ige.visit;mn.BOM=Wx;mn.DOCUMENT=Gx;mn.FLOW_END=Jx;mn.SCALAR=Kx;mn.isCollection=Mge;mn.isScalar=Rge;mn.prettyToken=Dge;mn.tokenType=jge});var Xx=x(SU=>{"use strict";p();var Bf=S_();function Sr(e){switch(e){case void 0:case" ":case`
|
|
232
|
+
`:case"\r":case" ":return!0;default:return!1}}var kU=new Set("0123456789ABCDEFabcdef"),Bge=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),T_=new Set(",[]{}"),Fge=new Set(` ,[]{}
|
|
233
|
+
\r `),Yx=e=>!e||Fge.has(e),Qx=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(t,n=!1){if(t){if(typeof t!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+t:t,this.lineEndPos=null}this.atEnd=!n;let r=this.next??"stream";for(;r&&(n||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let t=this.pos,n=this.buffer[t];for(;n===" "||n===" ";)n=this.buffer[++t];return!n||n==="#"||n===`
|
|
234
|
+
`?!0:n==="\r"?this.buffer[t+1]===`
|
|
235
|
+
`:!1}charAt(t){return this.buffer[this.pos+t]}continueScalar(t){let n=this.buffer[t];if(this.indentNext>0){let r=0;for(;n===" ";)n=this.buffer[++r+t];if(n==="\r"){let i=this.buffer[r+t+1];if(i===`
|
|
236
|
+
`||!i&&!this.atEnd)return t+r+1}return n===`
|
|
237
|
+
`||r>=this.indentNext||!n&&!this.atEnd?t+r:-1}if(n==="-"||n==="."){let r=this.buffer.substr(t,3);if((r==="---"||r==="...")&&Sr(this.buffer[t+3]))return-1}return t}getLine(){let t=this.lineEndPos;return(typeof t!="number"||t!==-1&&t<this.pos)&&(t=this.buffer.indexOf(`
|
|
238
|
+
`,this.pos),this.lineEndPos=t),t===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[t-1]==="\r"&&(t-=1),this.buffer.substring(this.pos,t))}hasChars(t){return this.pos+t<=this.buffer.length}setNext(t){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=t,null}peek(t){return this.buffer.substr(this.pos,t)}*parseNext(t){switch(t){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 t=this.getLine();if(t===null)return this.setNext("stream");if(t[0]===Bf.BOM&&(yield*this.pushCount(1),t=t.substring(1)),t[0]==="%"){let n=t.length,r=t.indexOf("#");for(;r!==-1;){let s=t[r-1];if(s===" "||s===" "){n=r-1;break}else r=t.indexOf("#",r+1)}for(;;){let s=t[n-1];if(s===" "||s===" ")n-=1;else break}let i=(yield*this.pushCount(n))+(yield*this.pushSpaces(!0));return yield*this.pushCount(t.length-i),this.pushNewline(),"stream"}if(this.atLineEnd()){let n=yield*this.pushSpaces(!0);return yield*this.pushCount(t.length-n),yield*this.pushNewline(),"stream"}return yield Bf.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){let t=this.charAt(0);if(!t&&!this.atEnd)return this.setNext("line-start");if(t==="-"||t==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let n=this.peek(3);if((n==="---"||n==="...")&&Sr(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,n==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!Sr(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[t,n]=this.peek(2);if(!n&&!this.atEnd)return this.setNext("block-start");if((t==="-"||t==="?"||t===":")&&Sr(n)){let r=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=r,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let t=this.getLine();if(t===null)return this.setNext("doc");let n=yield*this.pushIndicators();switch(t[n]){case"#":yield*this.pushCount(t.length-n);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(Yx),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return n+=yield*this.parseBlockScalarHeader(),n+=yield*this.pushSpaces(!0),yield*this.pushCount(t.length-n),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let t,n,r=-1;do t=yield*this.pushNewline(),t>0?(n=yield*this.pushSpaces(!1),this.indentValue=r=n):n=0,n+=yield*this.pushSpaces(!0);while(t+n>0);let i=this.getLine();if(i===null)return this.setNext("flow");if((r!==-1&&r<this.indentNext&&i[0]!=="#"||r===0&&(i.startsWith("---")||i.startsWith("..."))&&Sr(i[3]))&&!(r===this.indentNext-1&&this.flowLevel===1&&(i[0]==="]"||i[0]==="}")))return this.flowLevel=0,yield Bf.FLOW_END,yield*this.parseLineStart();let s=0;for(;i[s]===",";)s+=yield*this.pushCount(1),s+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(s+=yield*this.pushIndicators(),i[s]){case void 0:return"flow";case"#":return yield*this.pushCount(i.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(Yx),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let a=this.charAt(1);if(this.flowKey||Sr(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 t=this.charAt(0),n=this.buffer.indexOf(t,this.pos+1);if(t==="'")for(;n!==-1&&this.buffer[n+1]==="'";)n=this.buffer.indexOf("'",n+2);else for(;n!==-1;){let s=0;for(;this.buffer[n-1-s]==="\\";)s+=1;if(s%2===0)break;n=this.buffer.indexOf('"',n+1)}let r=this.buffer.substring(0,n),i=r.indexOf(`
|
|
239
|
+
`,this.pos);if(i!==-1){for(;i!==-1;){let s=this.continueScalar(i+1);if(s===-1)break;i=r.indexOf(`
|
|
240
|
+
`,s)}i!==-1&&(n=i-(r[i-1]==="\r"?2:1))}if(n===-1){if(!this.atEnd)return this.setNext("quoted-scalar");n=this.buffer.length}return yield*this.pushToIndex(n+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let t=this.pos;for(;;){let n=this.buffer[++t];if(n==="+")this.blockScalarKeep=!0;else if(n>"0"&&n<="9")this.blockScalarIndent=Number(n)-1;else if(n!=="-")break}return yield*this.pushUntil(n=>Sr(n)||n==="#")}*parseBlockScalar(){let t=this.pos-1,n=0,r;e:for(let s=this.pos;r=this.buffer[s];++s)switch(r){case" ":n+=1;break;case`
|
|
241
|
+
`:t=s,n=0;break;case"\r":{let a=this.buffer[s+1];if(!a&&!this.atEnd)return this.setNext("block-scalar");if(a===`
|
|
242
|
+
`)break}default:break e}if(!r&&!this.atEnd)return this.setNext("block-scalar");if(n>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=n:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let s=this.continueScalar(t+1);if(s===-1)break;t=this.buffer.indexOf(`
|
|
243
|
+
`,s)}while(t!==-1);if(t===-1){if(!this.atEnd)return this.setNext("block-scalar");t=this.buffer.length}}let i=t+1;for(r=this.buffer[i];r===" ";)r=this.buffer[++i];if(r===" "){for(;r===" "||r===" "||r==="\r"||r===`
|
|
244
|
+
`;)r=this.buffer[++i];t=i-1}else if(!this.blockScalarKeep)do{let s=t-1,a=this.buffer[s];a==="\r"&&(a=this.buffer[--s]);let o=s;for(;a===" ";)a=this.buffer[--s];if(a===`
|
|
245
|
+
`&&s>=this.pos&&s+1+n>o)t=s;else break}while(!0);return yield Bf.SCALAR,yield*this.pushToIndex(t+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let t=this.flowLevel>0,n=this.pos-1,r=this.pos-1,i;for(;i=this.buffer[++r];)if(i===":"){let s=this.buffer[r+1];if(Sr(s)||t&&T_.has(s))break;n=r}else if(Sr(i)){let s=this.buffer[r+1];if(i==="\r"&&(s===`
|
|
246
|
+
`?(r+=1,i=`
|
|
247
|
+
`,s=this.buffer[r+1]):n=r),s==="#"||t&&T_.has(s))break;if(i===`
|
|
248
|
+
`){let a=this.continueScalar(r+1);if(a===-1)break;r=Math.max(r,a-2)}}else{if(t&&T_.has(i))break;n=r}return!i&&!this.atEnd?this.setNext("plain-scalar"):(yield Bf.SCALAR,yield*this.pushToIndex(n+1,!0),t?"flow":"doc")}*pushCount(t){return t>0?(yield this.buffer.substr(this.pos,t),this.pos+=t,t):0}*pushToIndex(t,n){let r=this.buffer.slice(this.pos,t);return r?(yield r,this.pos+=r.length,r.length):(n&&(yield""),0)}*pushIndicators(){let t=0;e:for(;;){switch(this.charAt(0)){case"!":t+=yield*this.pushTag(),t+=yield*this.pushSpaces(!0);continue e;case"&":t+=yield*this.pushUntil(Yx),t+=yield*this.pushSpaces(!0);continue e;case"-":case"?":case":":{let n=this.flowLevel>0,r=this.charAt(1);if(Sr(r)||n&&T_.has(r)){n?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,t+=yield*this.pushCount(1),t+=yield*this.pushSpaces(!0);continue e}}}break e}return t}*pushTag(){if(this.charAt(1)==="<"){let t=this.pos+2,n=this.buffer[t];for(;!Sr(n)&&n!==">";)n=this.buffer[++t];return yield*this.pushToIndex(n===">"?t+1:t,!1)}else{let t=this.pos+1,n=this.buffer[t];for(;n;)if(Bge.has(n))n=this.buffer[++t];else if(n==="%"&&kU.has(this.buffer[t+1])&&kU.has(this.buffer[t+2]))n=this.buffer[t+=3];else break;return yield*this.pushToIndex(t,!1)}}*pushNewline(){let t=this.buffer[this.pos];return t===`
|
|
249
|
+
`?yield*this.pushCount(1):t==="\r"&&this.charAt(1)===`
|
|
250
|
+
`?yield*this.pushCount(2):0}*pushSpaces(t){let n=this.pos-1,r;do r=this.buffer[++n];while(r===" "||t&&r===" ");let i=n-this.pos;return i>0&&(yield this.buffer.substr(this.pos,i),this.pos=n),i}*pushUntil(t){let n=this.pos,r=this.buffer[n];for(;!t(r);)r=this.buffer[++n];return yield*this.pushToIndex(n,!1)}};SU.Lexer=Qx});var eE=x(TU=>{"use strict";p();var Zx=class{constructor(){this.lineStarts=[],this.addNewLine=t=>this.lineStarts.push(t),this.linePos=t=>{let n=0,r=this.lineStarts.length;for(;n<r;){let s=n+r>>1;this.lineStarts[s]<t?n=s+1:r=s}if(this.lineStarts[n]===t)return{line:n+1,col:1};if(n===0)return{line:0,col:t};let i=this.lineStarts[n-1];return{line:n,col:t-i+1}}}};TU.LineCounter=Zx});var nE=x(OU=>{"use strict";p();var Vge=ce("process"),wU=S_(),$ge=Xx();function Es(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function xU(e){for(let t=0;t<e.length;++t)switch(e[t].type){case"space":case"comment":case"newline":break;default:return t}return-1}function AU(e){switch(e?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function w_(e){switch(e.type){case"document":return e.start;case"block-map":{let t=e.items[e.items.length-1];return t.sep??t.start}case"block-seq":return e.items[e.items.length-1].start;default:return[]}}function eu(e){if(e.length===0)return[];let t=e.length;e:for(;--t>=0;)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;e[++t]?.type==="space";);return e.splice(t,e.length)}function x_(e,t){if(t.length<1e5)Array.prototype.push.apply(e,t);else for(let n=0;n<t.length;++n)e.push(t[n])}function EU(e){if(e.start.type==="flow-seq-start")for(let t of e.items)t.sep&&!t.value&&!Es(t.start,"explicit-key-ind")&&!Es(t.sep,"map-value-ind")&&(t.key&&(t.value=t.key),delete t.key,AU(t.value)?t.value.end?x_(t.value.end,t.sep):t.value.end=t.sep:x_(t.start,t.sep),delete t.sep)}var tE=class{constructor(t){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new $ge.Lexer,this.onNewLine=t}*parse(t,n=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let r of this.lexer.lex(t,n))yield*this.next(r);n||(yield*this.end())}*next(t){if(this.source=t,Vge.env.LOG_TOKENS&&console.log("|",wU.prettyToken(t)),this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=t.length;return}let n=wU.tokenType(t);if(n)if(n==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=n,yield*this.step(),n){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+t.length);break;case"space":this.atNewLine&&t[0]===" "&&(this.indent+=t.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=t.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=t.length}else{let r=`Not a YAML token: ${t}`;yield*this.pop({type:"error",offset:this.offset,message:r,source:t}),this.offset+=t.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 t=this.peek(1);if(this.type==="doc-end"&&t?.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(!t)return yield*this.stream();switch(t.type){case"document":return yield*this.document(t);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(t);case"block-scalar":return yield*this.blockScalar(t);case"block-map":return yield*this.blockMap(t);case"block-seq":return yield*this.blockSequence(t);case"flow-collection":return yield*this.flowCollection(t);case"doc-end":return yield*this.documentEnd(t)}yield*this.pop()}peek(t){return this.stack[this.stack.length-t]}*pop(t){let n=t??this.stack.pop();if(!n)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield n;else{let r=this.peek(1);switch(n.type==="block-scalar"?n.indent="indent"in r?r.indent:0:n.type==="flow-collection"&&r.type==="document"&&(n.indent=0),n.type==="flow-collection"&&EU(n),r.type){case"document":r.value=n;break;case"block-scalar":r.props.push(n);break;case"block-map":{let i=r.items[r.items.length-1];if(i.value){r.items.push({start:[],key:n,sep:[]}),this.onKeyLine=!0;return}else if(i.sep)i.value=n;else{Object.assign(i,{key:n,sep:[]}),this.onKeyLine=!i.explicitKey;return}break}case"block-seq":{let i=r.items[r.items.length-1];i.value?r.items.push({start:[],value:n}):i.value=n;break}case"flow-collection":{let i=r.items[r.items.length-1];!i||i.value?r.items.push({start:[],key:n,sep:[]}):i.sep?i.value=n:Object.assign(i,{key:n,sep:[]});return}default:yield*this.pop(),yield*this.pop(n)}if((r.type==="document"||r.type==="block-map"||r.type==="block-seq")&&(n.type==="block-map"||n.type==="block-seq")){let i=n.items[n.items.length-1];i&&!i.sep&&!i.value&&i.start.length>0&&xU(i.start)===-1&&(n.indent===0||i.start.every(s=>s.type!=="comment"||s.indent<n.indent))&&(r.type==="document"?r.end=i.start:r.items.push({start:i.start}),n.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 t={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&t.start.push(this.sourceToken),this.stack.push(t);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(t){if(t.value)return yield*this.lineEnd(t);switch(this.type){case"doc-start":{xU(t.start)!==-1?(yield*this.pop(),yield*this.step()):t.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":t.start.push(this.sourceToken);return}let n=this.startBlockValue(t);n?this.stack.push(n):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(t){if(this.type==="map-value-ind"){let n=w_(this.peek(2)),r=eu(n),i;t.end?(i=t.end,i.push(this.sourceToken),delete t.end):i=[this.sourceToken];let s={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:r,key:t,sep:i}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=s}else yield*this.lineEnd(t)}*blockScalar(t){switch(this.type){case"space":case"comment":case"newline":t.props.push(this.sourceToken);return;case"scalar":if(t.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let n=this.source.indexOf(`
|
|
251
|
+
`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
|
|
252
|
+
`,n)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(t){let n=t.items[t.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,n.value){let r="end"in n.value?n.value.end:void 0;(Array.isArray(r)?r[r.length-1]:void 0)?.type==="comment"?r?.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)t.items.push({start:[this.sourceToken]});else if(n.sep)n.sep.push(this.sourceToken);else{if(this.atIndentedComment(n.start,t.indent)){let i=t.items[t.items.length-2]?.value?.end;if(Array.isArray(i)){x_(i,n.start),i.push(this.sourceToken),t.items.pop();return}}n.start.push(this.sourceToken)}return}if(this.indent>=t.indent){let r=!this.onKeyLine&&this.indent===t.indent,i=r&&(n.sep||n.explicitKey)&&this.type!=="seq-item-ind",s=[];if(i&&n.sep&&!n.value){let a=[];for(let o=0;o<n.sep.length;++o){let c=n.sep[o];switch(c.type){case"newline":a.push(o);break;case"space":break;case"comment":c.indent>t.indent&&(a.length=0);break;default:a.length=0}}a.length>=2&&(s=n.sep.splice(a[1]))}switch(this.type){case"anchor":case"tag":i||n.value?(s.push(this.sourceToken),t.items.push({start:s}),this.onKeyLine=!0):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"explicit-key-ind":!n.sep&&!n.explicitKey?(n.start.push(this.sourceToken),n.explicitKey=!0):i||n.value?(s.push(this.sourceToken),t.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(n.explicitKey)if(n.sep)if(n.value)t.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Es(n.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(AU(n.key)&&!Es(n.sep,"newline")){let a=eu(n.start),o=n.key,c=n.sep;c.push(this.sourceToken),delete n.key,delete n.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:o,sep:c}]})}else s.length>0?n.sep=n.sep.concat(s,this.sourceToken):n.sep.push(this.sourceToken);else if(Es(n.start,"newline"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{let a=eu(n.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:null,sep:[this.sourceToken]}]})}else n.sep?n.value||i?t.items.push({start:s,key:null,sep:[this.sourceToken]}):Es(n.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):n.sep.push(this.sourceToken):Object.assign(n,{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);i||n.value?(t.items.push({start:s,key:a,sep:[]}),this.onKeyLine=!0):n.sep?this.stack.push(a):(Object.assign(n,{key:a,sep:[]}),this.onKeyLine=!0);return}default:{let a=this.startBlockValue(t);if(a){if(a.type==="block-seq"){if(!n.explicitKey&&n.sep&&!Es(n.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 r&&t.items.push({start:s});this.stack.push(a);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(t){let n=t.items[t.items.length-1];switch(this.type){case"newline":if(n.value){let r="end"in n.value?n.value.end:void 0;(Array.isArray(r)?r[r.length-1]:void 0)?.type==="comment"?r?.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)t.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(n.start,t.indent)){let i=t.items[t.items.length-2]?.value?.end;if(Array.isArray(i)){x_(i,n.start),i.push(this.sourceToken),t.items.pop();return}}n.start.push(this.sourceToken)}return;case"anchor":case"tag":if(n.value||this.indent<=t.indent)break;n.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==t.indent)break;n.value||Es(n.start,"seq-item-ind")?t.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return}if(this.indent>t.indent){let r=this.startBlockValue(t);if(r){this.stack.push(r);return}}yield*this.pop(),yield*this.step()}*flowCollection(t){let n=t.items[t.items.length-1];if(this.type==="flow-error-end"){let r;do yield*this.pop(),r=this.peek(1);while(r?.type==="flow-collection")}else if(t.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!n||n.sep?t.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return;case"map-value-ind":!n||n.value?t.items.push({start:[],key:null,sep:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!n||n.value?t.items.push({start:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let i=this.flowScalar(this.type);!n||n.value?t.items.push({start:[],key:i,sep:[]}):n.sep?this.stack.push(i):Object.assign(n,{key:i,sep:[]});return}case"flow-map-end":case"flow-seq-end":t.end.push(this.sourceToken);return}let r=this.startBlockValue(t);r?this.stack.push(r):(yield*this.pop(),yield*this.step())}else{let r=this.peek(2);if(r.type==="block-map"&&(this.type==="map-value-ind"&&r.indent===t.indent||this.type==="newline"&&!r.items[r.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&r.type!=="flow-collection"){let i=w_(r),s=eu(i);EU(t);let a=t.end.splice(1,t.end.length);a.push(this.sourceToken);let o={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:s,key:t,sep:a}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}else yield*this.lineEnd(t)}}flowScalar(t){if(this.onNewLine){let n=this.source.indexOf(`
|
|
253
|
+
`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
|
|
254
|
+
`,n)+1}return{type:t,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(t){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 n=w_(t),r=eu(n);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let n=w_(t),r=eu(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(t,n){return this.type!=="comment"||this.indent<=n?!1:t.every(r=>r.type==="newline"||r.type==="space")}*documentEnd(t){this.type!=="doc-mode"&&(t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(t){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:t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};OU.Parser=tE});var qU=x(Vf=>{"use strict";p();var PU=$x(),Uge=Lf(),Ff=Mf(),Hge=Fw(),zge=Ae(),Wge=eE(),NU=nE();function CU(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new Wge.LineCounter||null,prettyErrors:t}}function Gge(e,t={}){let{lineCounter:n,prettyErrors:r}=CU(t),i=new NU.Parser(n?.addNewLine),s=new PU.Composer(t),a=Array.from(s.compose(i.parse(e)));if(r&&n)for(let o of a)o.errors.forEach(Ff.prettifyError(e,n)),o.warnings.forEach(Ff.prettifyError(e,n));return a.length>0?a:Object.assign([],{empty:!0},s.streamInfo())}function LU(e,t={}){let{lineCounter:n,prettyErrors:r}=CU(t),i=new NU.Parser(n?.addNewLine),s=new PU.Composer(t),a=null;for(let o of s.compose(i.parse(e),!0,e.length))if(!a)a=o;else if(a.options.logLevel!=="silent"){a.errors.push(new Ff.YAMLParseError(o.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&n&&(a.errors.forEach(Ff.prettifyError(e,n)),a.warnings.forEach(Ff.prettifyError(e,n))),a}function Jge(e,t,n){let r;typeof t=="function"?r=t:n===void 0&&t&&typeof t=="object"&&(n=t);let i=LU(e,n);if(!i)return null;if(i.warnings.forEach(s=>Hge.warn(i.options.logLevel,s)),i.errors.length>0){if(i.options.logLevel!=="silent")throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:r},n))}function Kge(e,t,n){let r=null;if(typeof t=="function"||Array.isArray(t)?r=t:n===void 0&&t&&(n=t),typeof n=="string"&&(n=n.length),typeof n=="number"){let i=Math.round(n);n=i<1?void 0:i>8?{indent:8}:{indent:i}}if(e===void 0){let{keepUndefined:i}=n??t??{};if(!i)return}return zge.isDocument(e)&&!r?e.toString(n):new Uge.Document(e,r,n).toString(n)}Vf.parse=Jge;Vf.parseAllDocuments=Gge;Vf.parseDocument=LU;Vf.stringify=Kge});var MU=x(De=>{"use strict";p();var Yge=$x(),Qge=Lf(),Xge=Sx(),rE=Mf(),Zge=gf(),As=Ae(),eye=Ss(),tye=gt(),nye=ws(),rye=xs(),iye=S_(),sye=Xx(),aye=eE(),oye=nE(),E_=qU(),IU=df();De.Composer=Yge.Composer;De.Document=Qge.Document;De.Schema=Xge.Schema;De.YAMLError=rE.YAMLError;De.YAMLParseError=rE.YAMLParseError;De.YAMLWarning=rE.YAMLWarning;De.Alias=Zge.Alias;De.isAlias=As.isAlias;De.isCollection=As.isCollection;De.isDocument=As.isDocument;De.isMap=As.isMap;De.isNode=As.isNode;De.isPair=As.isPair;De.isScalar=As.isScalar;De.isSeq=As.isSeq;De.Pair=eye.Pair;De.Scalar=tye.Scalar;De.YAMLMap=nye.YAMLMap;De.YAMLSeq=rye.YAMLSeq;De.CST=iye;De.Lexer=sye.Lexer;De.LineCounter=aye.LineCounter;De.Parser=oye.Parser;De.parse=E_.parse;De.parseAllDocuments=E_.parseAllDocuments;De.parseDocument=E_.parseDocument;De.stringify=E_.stringify;De.visit=IU.visit;De.visitAsync=IU.visitAsync});var A_=x(Os=>{"use strict";p();Object.defineProperty(Os,"__esModule",{value:!0});Os.ConvenienceSeverities=Os.LegacyIdentifiers=Os.ModernIdentifiers=void 0;var $f=Yt();Os.ModernIdentifiers=["theme-check:nothing","theme-check:recommended","theme-check:theme-app-extension","theme-check:all"];Os.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"}));Os.ConvenienceSeverities={suggestion:$f.Severity.WARNING,style:$f.Severity.INFO,error:$f.Severity.ERROR,warning:$f.Severity.WARNING,info:$f.Severity.INFO}});var VU=x(Hf=>{"use strict";p();var DU=Hf&&Hf.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Hf,"__esModule",{value:!0});Hf.readYamlConfigDescription=hye;var jU=Yt(),cye=ce("node:fs"),uye=DU(ce("node:fs/promises")),lye=ce("node:module"),O_=DU(ce("node:path")),fye=MU(),Uf=A_(),sE=class extends Error{constructor(t,n){super(t),this.name="UnresolvedAliasError",this.message=`YAML parsing error: Unresolved alias *${n}.
|
|
255
|
+
Did you forget to wrap your ignore statement in quotes? '*${n}'
|
|
256
|
+
${t}`}};function dye(e,t){try{let n=t.trim()===""?{}:(0,fye.parse)(t);if(!FU(n))throw new Error(`Expecting parsed contents of config file at path '${e}' to be a plain object`);return n}catch(n){if(n instanceof Error&&n.name==="ReferenceError"&&n.message.includes("Unresolved alias")&&/: .*$/m.test(n.message)){let r=/: .*$/m.exec(n.message)[0].slice(2);throw new sE(n.message,r)}else throw n}}async function hye(e,t=!1){let n=O_.default.dirname(e),r=await uye.default.readFile(e,"utf8"),i=dye(e,r),s={checkSettings:{},ignore:[],extends:[],require:[]};i.root&&(s.root=i.root,delete i.root),i.ignore&&(s.ignore=iE(i.ignore),delete i.ignore),i.require&&(s.require=iE(i.require).map(a=>BU(n,a)).filter(aE),delete i.require),i.extends?(s.extends=iE(i.extends).map(a=>RU(n,a)).filter(aE),delete i.extends):t&&(s.extends=[RU(n,"theme-check:recommended")]),i.context&&(jU.Modes.includes(i.context)&&(s.context=i.context),delete i.context),i.include_categories&&delete i.include_categories,i.exclude_categories&&delete i.exclude_categories;for(let[a,o]of Object.entries(i)){if(!FU(o))throw new Error(`Expected a plain object value for ${a} but got ${typeof o}`);s.checkSettings[a]=pye(o)}return s}function RU(e,t){return t.startsWith(":")||Uf.LegacyIdentifiers.has(t)?Uf.LegacyIdentifiers.get(t.replace(/^:/,"")):t.startsWith("theme-check:")?t:BU(e,t)}function BU(e,t){if(O_.default.isAbsolute(t))return t;if(t.startsWith("."))return O_.default.resolve(e,t);let n=(0,lye.createRequire)(O_.default.join(e,"__placeholder"));return(0,cye.realpathSync)(n.resolve(t))}function pye(e){let t={enabled:e.enabled||!0};for(let[n,r]of Object.entries(e))t[_ye(n)]=r;return e.ignore!==void 0&&Array.isArray(e.ignore)&&e.ignore.every(aE)&&(t.ignore=e.ignore),e.severity!==void 0&&(t.severity=mye(e.severity)),t}function mye(e){if(gye(e))return Uf.ConvenienceSeverities[e];if(yye(e))return e;throw new Error(`Unsupported severity: ${e}. Try one of ${Object.keys(Uf.ConvenienceSeverities)}`)}function gye(e){return typeof e=="string"&&e in Uf.ConvenienceSeverities}function yye(e){return typeof e=="number"&&e in jU.Severity}function _ye(e){return e.replace(/_([a-z])/g,(t,n)=>n.toUpperCase())}function FU(e){return Object.prototype.toString.call(e)==="[object Object]"}function aE(e){return typeof e=="string"}function iE(e){return Array.isArray(e)?e:[e]}});var zU=x(oE=>{"use strict";p();Object.defineProperty(oE,"__esModule",{value:!0});oE.mergeFragments=vye;function vye(e,t){return{root:$U(e.map(n=>n.root),t.root),extends:[],ignore:e.flatMap(n=>n.ignore).concat(t.ignore),require:e.flatMap(n=>n.require).concat(t.require),checkSettings:e.map(n=>n.checkSettings).concat(t.checkSettings).reduce(HU),context:$U(e.map(n=>n.context),t.context)??"theme"}}function $U(e,t){return e.concat(t).filter(Boolean).pop()}function HU(e,t){let n={...e};for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(UU(e[r])&&UU(t[r])?n[r]=HU(e[r],t[r]):n[r]=t[r]);return n}function UU(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}});var GU=x(zf=>{"use strict";p();var bye=zf&&zf.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(zf,"__esModule",{value:!0});zf.resolveConfig=cE;var WU=bye(ce("node:path")),kye=VU(),Sye=zU(),Tye=A_(),wye=()=>WU.default.resolve(__dirname,"./configs");async function cE(e,t=!1,n=[]){if(xye(e)){let a=WU.default.join(wye(),e.replace(/^theme-check:/,"")+".yml");return cE(a,!1,n)}let r=[...n,e];if(n.includes(e))throw new Error(`Cyclic extends in theme-check config: ${r.join(" -> ")}`);let i=await(0,kye.readYamlConfigDescription)(e,t),s=await Promise.all(i.extends.map(a=>cE(a,!1,r)));return(0,Sye.mergeFragments)(s,i)}function xye(e){return Tye.ModernIdentifiers.includes(e)}});var JU=x(P_=>{"use strict";p();Object.defineProperty(P_,"__esModule",{value:!0});P_.resolveConfig=void 0;var Eye=GU();Object.defineProperty(P_,"resolveConfig",{enumerable:!0,get:function(){return Eye.resolveConfig}})});var YU=x(dE=>{"use strict";p();Object.defineProperty(dE,"__esModule",{value:!0});dE.validateConfig=Aye;var fE=ce("node:assert");function Aye(e){for(let t of e.checks){let n=e.settings[t.meta.code];(0,fE.strict)(n,`Unexpected missing settings for ${t.meta.code} in validateConfig call`),Oye(t.meta.code,t.meta.schema,n,!0)}}function Oye(e,t,n,r){for(let i in t){let s=t[i],a=n[i];uE(i,a,s)}r&&Pye(n),Nye(e,t,n)}function Pye(e){let{severity:t,enabled:n,ignore:r}=e;t===void 0||lE("severity","number",typeof t),lE("enabled","boolean",typeof n),r===void 0||KU("ignore",r)}function Nye(e,t,n){let r=["enabled","severity","ignore"];for(let i in n)!(i in t)&&!r.includes(i)&&console.error(`Unexpected setting: ${i} for check ${e} found in configuration`)}function uE(e,t,n){let{type:r,optional:i,defaultValue:s,properties:a,itemType:o}=n.options;if(t===void 0){if(i!==!0&&s===void 0)throw new Error(`Missing required setting: ${e}`);return}if(!(s!==void 0&&t===s))switch(r){case"string":case"number":case"boolean":{lE(e,r,typeof t);break}case"object":{if(typeof t!="object"||t===null||Array.isArray(t))throw new Error(`Invalid type for setting ${e}: expected object, got ${typeof t}`);for(let c in a)uE(c,t[c],a[c]);break}case"array":{if(KU(e,t),o)for(let c of t)uE(e,c,o);break}default:throw new Error(`Unexpected setting type: ${r}`)}}function lE(e,t,n){fE.strict.strictEqual(n,t,`Invalid type for setting ${e}: expected ${t}, got ${n}`)}function KU(e,t){fE.strict.ok(Array.isArray(t),`Invalid type for setting ${e}: expected array, got ${typeof t}`)}});var QU=x(Wf=>{"use strict";p();var Cye=Wf&&Wf.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Wf,"__esModule",{value:!0});Wf.loadConfig=Rye;var Lye=W$(),qye=JU(),Iye=YU(),Mye=Cye(ce("fs/promises"));async function Rye(e,t,n={}){if(!t)throw new Error("loadConfig cannot be called without a root argument");let r="theme-check:recommended";e||(await Mye.default.readdir(t)).some(o=>o.endsWith(".extension.toml")||o.endsWith(".app.toml"))&&(r="theme-check:theme-app-extension");let i=await(0,qye.resolveConfig)(e??r,!0),s=await(0,Lye.loadConfigDescription)(i,t,n);return(0,Iye.validateConfig)(s),s}});var XU=x(Gf=>{"use strict";p();var Dye=Gf&&Gf.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gf,"__esModule",{value:!0});Gf.findConfigPath=Vye;var jye=Dye(ce("node:path")),Bye=kw(),Fye=[".theme-check.yml"];function Vye(e){let t=Fye.map(n=>jye.default.join(e,n));return $ye(t,Bye.fileExists)}async function $ye(e,t){for(let n of e)if(await t(n))return n}});var ZU=x(tu=>{"use strict";p();Object.defineProperty(tu,"__esModule",{value:!0});tu.findConfigPath=tu.loadConfig=void 0;var Uye=QU();Object.defineProperty(tu,"loadConfig",{enumerable:!0,get:function(){return Uye.loadConfig}});var Hye=XU();Object.defineProperty(tu,"findConfigPath",{enumerable:!0,get:function(){return Hye.findConfigPath}})});var e9=x(nu=>{"use strict";p();var zye=nu&&nu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(nu,"__esModule",{value:!0});nu.NodeFileSystem=void 0;var Ps=Yt(),hE=zye(ce("node:fs/promises"));nu.NodeFileSystem={async readFile(e){return hE.default.readFile(Ps.path.fsPath(e),"utf8")},async readDirectory(e){return(await hE.default.readdir(Ps.path.fsPath(e),{withFileTypes:!0})).map(n=>[Ps.path.join(e,n.name),n.isDirectory()?Ps.FileType.Directory:Ps.FileType.File])},async stat(e){try{let t=await hE.default.stat(Ps.path.fsPath(e));return{type:t.isDirectory()?Ps.FileType.Directory:Ps.FileType.File,size:t.size}}catch(t){throw new Error(`Failed to get file stat: ${t}`)}}}});var r9=x(Ns=>{"use strict";p();var mE=Ns&&Ns.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ns,"__esModule",{value:!0});Ns.remoteFileSize=void 0;Ns.publicLookup=pE;Ns.makeRemoteFileSize=n9;var t9=Yt(),Wye=mE(ce("node:dns")),Gye=mE(ce("node:http")),Jye=mE(ce("node:https"));function pE(e=Wye.default.lookup){return(t,n,r)=>{e(t,{...n,all:!0},(i,s,a)=>{if(i)return r(i,"");let o=typeof s=="string"?[{address:s,family:a??0}]:s,c=o.find(({address:l})=>!(0,t9.isPublicIpAddress)(l));if(o.length===0||c){let l=c?`${c.address} is not a public address`:"no address";return r(new Error(`${t}: ${l}`),"")}if(n.all)return r(null,o);r(null,o[0].address,o[0].family)})}}function n9(e){let t={http:new Gye.default.Agent({lookup:pE(e)}),https:new Jye.default.Agent({lookup:pE(e)})},n=({protocol:r})=>r==="http:"?t.http:t.https;return r=>(0,t9.getFileSize)(r,{agent:n})}Ns.remoteFileSize=n9()});var u_e=x(rt=>{"use strict";p();var Kye=rt&&rt.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),s9=rt&&rt.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Kye(t,e,n)},a9=rt&&rt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(rt,"__esModule",{value:!0});rt.loadConfig=rt.remoteFileSize=rt.NodeFileSystem=void 0;rt.toSourceCode=c9;rt.check=o_e;rt.checkAndAutofix=c_e;rt.themeCheckRun=gE;rt.getThemeAndConfig=u9;rt.getTheme=l9;rt.getThemeFilesPathPattern=f9;var ht=Yt(),Yye=e$(),Qye=d$(),Xye=ue(),Zye=a9(ce("node:fs/promises")),N_=a9(ce("node:path")),e_e=ce("node:util"),t_e=yu(),n_e=Oy(),r_e=B$(),i9=ZU(),ru=e9();Object.defineProperty(rt,"NodeFileSystem",{enumerable:!0,get:function(){return ru.NodeFileSystem}});var o9=r9();Object.defineProperty(rt,"remoteFileSize",{enumerable:!0,get:function(){return o9.remoteFileSize}});var i_e=ce("node:url"),s_e=(0,e_e.promisify)(n_e);s9(Yt(),rt);s9(A_(),rt);var a_e=async(e,t,n={})=>(e??=await(0,i9.findConfigPath)(t),(0,i9.loadConfig)(e,t,n));rt.loadConfig=a_e;async function c9(e){try{let t=await Zye.default.readFile(e,"utf8");return(0,ht.toSourceCode)(ht.path.normalize(t_e.URI.file(e)),t)}catch{return}}async function o_e(e,t,n={}){return(await gE(e,t,void 0,n)).offenses}async function c_e(e,t,n={}){let{theme:r,offenses:i}=await gE(e,t,void 0,n);await(0,r_e.autofix)(r,i)}async function gE(e,t,n=()=>{},r={}){let{theme:i,config:s}=await u9(e,t,r),a=new Qye.ThemeLiquidDocsManager(n),c=(await ht.JSONValidator.create(a,s))?.isValid,l=i.map(T=>(0,ht.toSchema)(s.context,T.uri,T,c)),f=new Map(i.filter(T=>(0,ht.isBlock)(T.uri)).map(T=>[N_.default.basename(T.uri,".liquid"),(0,ht.memo)(async()=>(0,ht.toSchema)(s.context,T.uri,T,c))])),h=new Map(i.filter(T=>(0,ht.isSection)(T.uri)).map(T=>[N_.default.basename(T.uri,".liquid"),(0,ht.memo)(async()=>(0,ht.toSchema)(s.context,T.uri,T,c))])),d=new Map(i.map(T=>[ht.path.relative(T.uri,s.rootUri),(0,ht.memo)(async()=>{let w=T.ast;if((0,Xye.isLiquidHtmlNode)(w)&&(0,ht.filePathSupportsLiquidDoc)(T.uri))return(0,ht.extractDocDefinition)(T.uri,w)})])),g=new Map(i.filter(T=>T.uri.endsWith(".liquid")).map(T=>[T.uri,(0,ht.memo)(async()=>(0,ht.extractCSSClassesFromLiquidUri)(T.uri,ru.NodeFileSystem))]));try{let T=ht.path.join(s.rootUri,"assets"),w=await ru.NodeFileSystem.readDirectory(T);for(let[y]of w.filter(([A])=>A.endsWith(".css")))g.set(y,(0,ht.memo)(async()=>(0,ht.extractCSSClassesFromAssetUri)(y,ru.NodeFileSystem)))}catch{}let v=async T=>h.get(T)?.(),b=async T=>f.get(T)?.(),_;try{_=await(0,Yye.buildThemeGraph)(s.rootUri,{fs:ru.NodeFileSystem,getSectionSchema:v,getBlockSchema:b,getWebComponentDefinitionReference:()=>{},mode:s.context})}catch{}let k=await(0,ht.check)(i,s,{fs:ru.NodeFileSystem,themeDocset:a,jsonValidationSet:a,remoteFileSize:o9.remoteFileSize,getSectionSchema:v,getBlockSchema:b,getAppBlockSchema:async T=>f.get(T)?.(),getDocDefinition:async T=>d.get(T)?.(),getCSSClassesForURI:async T=>g.get(T)?.()??new Set,async getReferences(T){return _?_.modules[T]?.references??[]:[]},async getDependencies(T){return _?_.modules[T]?.dependencies??[]:[]}});return{theme:i,config:s,offenses:k}}async function u9(e,t,n={}){let r=await(0,rt.loadConfig)(t,e,n);return{theme:await l9(r),config:r}}async function l9(e){let t=f9(e.rootUri),n=await s_e(t,{absolute:!0}).then(i=>i.filter(s=>!(0,ht.isIgnored)(s,e)));return(await Promise.all(n.map(c9))).filter(i=>i!==void 0)}function f9(e){return N_.default.normalize(N_.default.join((0,i_e.fileURLToPath)(e),"**/*.{liquid,json}")).replace(/\\/g,"/")}});export{$_ as a,yu as b,ue as c,fL as d,Qh as e,He as f,de as g,pi as h,yl as i,Zh as j,ep as k,Zi as l,tp as m,Mt as n,En as o,es as p,Kt as q,_l as r,vl as s,np as t,Mr as u,xa as v,Rt as w,st as x,rp as y,tc as z,ip as A,nc as B,sp as C,ap as D,op as E,An as F,cp as G,up as H,lp as I,dp as J,hp as K,pp as L,Ea as M,sk as N,un as O,cX as P,nI as Q,rc as R,W1e as S,ck as T,Aa as U,zI as V,WI as W,Yt as X,e$ as Y,d$ as Z,nw as _,Ey as $,E$ as aa,R$ as ba,MU as ca,u_e as da};
|
|
257
|
+
/*! Bundled license information:
|
|
258
|
+
|
|
259
|
+
isobject/index.js:
|
|
260
|
+
(*!
|
|
261
|
+
* isobject <https://github.com/jonschlinkert/isobject>
|
|
262
|
+
*
|
|
263
|
+
* Copyright (c) 2014-2015, Jon Schlinkert.
|
|
264
|
+
* Licensed under the MIT License.
|
|
265
|
+
*)
|
|
266
|
+
|
|
267
|
+
line-column/lib/line-column.js:
|
|
268
|
+
(**
|
|
269
|
+
* line-column - Convert efficiently index to/from line-column in a string
|
|
270
|
+
* @module lineColumn
|
|
271
|
+
* @license MIT
|
|
272
|
+
*)
|
|
273
|
+
|
|
274
|
+
cssesc/cssesc.js:
|
|
275
|
+
(*! https://mths.be/cssesc v3.0.0 by @mathias *)
|
|
276
|
+
*/
|