@shopify/cli 4.4.0 → 4.5.1
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-DWUYMFHO.js → analytics-CIKTYXZ6.js} +1 -1
- package/dist/{analytics-SOXP4UBD.js → analytics-DM7CBV2M.js} +1 -1
- package/dist/assets/hydrogen/starter/CHANGELOG.md +8 -0
- package/dist/assets/hydrogen/starter/README.md +4 -4
- package/dist/assets/hydrogen/starter/package.json +1 -1
- package/dist/assets/hydrogen/starter/vite.config.ts +6 -0
- package/dist/bootstrap.js +1 -1
- package/dist/{chunk-DLNBTHKL.js → chunk-2FIDORHT.js} +1 -1
- package/dist/{chunk-HA6NISOZ.js → chunk-2GDACKZF.js} +1 -1
- package/dist/{chunk-5W443CKL.js → chunk-2HZMOK4U.js} +2 -2
- package/dist/{chunk-7UOPCYMV.js → chunk-2MNOWKMI.js} +1 -1
- package/dist/{chunk-J3HXFQ2L.js → chunk-2WDKXDFM.js} +1 -1
- package/dist/{chunk-ZEENHLSC.js → chunk-3GMW7IEC.js} +2 -2
- package/dist/{chunk-WRRUFK4Y.js → chunk-3QVXHF6I.js} +1 -1
- package/dist/{chunk-POAICASX.js → chunk-3SJHCEQR.js} +1 -1
- package/dist/{chunk-7LATYPLU.js → chunk-3YCTWCHH.js} +1 -1
- package/dist/{chunk-2EROVVCL.js → chunk-4E354M4H.js} +1 -1
- package/dist/{chunk-47MGPVED.js → chunk-4TC4M4RC.js} +1 -1
- package/dist/{chunk-J5TNYNR5.js → chunk-5JCREGSD.js} +1 -1
- package/dist/{chunk-QPN2M26G.js → chunk-5K4DONQJ.js} +1 -1
- package/dist/{chunk-2NWWMNU5.js → chunk-5NY4HKJF.js} +1 -1
- package/dist/{chunk-BIMOHK2P.js → chunk-5PLLJPEW.js} +1 -1
- package/dist/{chunk-PJYNAUQB.js → chunk-5T3OVTF5.js} +1 -1
- package/dist/{chunk-73W5BGAZ.js → chunk-5U6MXSNY.js} +1 -1
- package/dist/{chunk-AY4GIVME.js → chunk-5UXPTCSD.js} +1 -1
- package/dist/{chunk-G2I2ZUBV.js → chunk-6XLVKD6Q.js} +1 -1
- package/dist/{chunk-DZLA2RJP.js → chunk-6Y3QXASG.js} +1 -1
- package/dist/{chunk-DHBYYHBT.js → chunk-6ZMNEURG.js} +1 -1
- package/dist/chunk-6ZRHK4ON.js +1 -0
- package/dist/{chunk-GTUKM3ZW.js → chunk-72K36DID.js} +1 -1
- package/dist/{chunk-FPLUMESQ.js → chunk-7USHLXEN.js} +1 -1
- package/dist/{chunk-ZAMDXIVC.js → chunk-7XQDZF73.js} +1 -1
- package/dist/{chunk-OORCODNK.js → chunk-7ZLKT2TB.js} +1 -1
- package/dist/{chunk-HCN6HXA5.js → chunk-AH2ZJ73H.js} +1 -1
- package/dist/{chunk-SP2WUATO.js → chunk-AI756VJI.js} +1 -1
- package/dist/{chunk-UYK6CXAU.js → chunk-ALQKJAHP.js} +1 -1
- package/dist/{chunk-PMXCJIBP.js → chunk-APYASWBA.js} +1 -1
- package/dist/{chunk-J2WCMQZZ.js → chunk-ASOT7VNB.js} +1 -1
- package/dist/{chunk-MFLQRQQT.js → chunk-AVMNXIXF.js} +1 -1
- package/dist/{chunk-7SVMAJTR.js → chunk-BEXQB4RT.js} +1 -1
- package/dist/{chunk-Y3WIZSRU.js → chunk-BVFIJSD7.js} +1 -1
- package/dist/{chunk-45MEVWH5.js → chunk-BZAZMLII.js} +1 -1
- package/dist/{chunk-HZYRCG4R.js → chunk-C5U4NLNU.js} +1 -1
- package/dist/{chunk-PETINPMX.js → chunk-CGULQAB5.js} +1 -1
- package/dist/{chunk-HZSAUZBX.js → chunk-CNOL26GA.js} +1 -1
- package/dist/{chunk-V3RZ3DTW.js → chunk-COTYR5RC.js} +1 -1
- package/dist/{chunk-NADNFSKS.js → chunk-DA4LHFJQ.js} +1 -1
- package/dist/{chunk-Y66GQ6V2.js → chunk-DCUAVLTM.js} +1 -1
- package/dist/{chunk-FA4K3JRN.js → chunk-DDVT2K7E.js} +1 -1
- package/dist/{chunk-OQORDQLH.js → chunk-DE3WCNP6.js} +1 -1
- package/dist/{chunk-V6ZSIUO3.js → chunk-DKKBJ4H5.js} +1 -1
- package/dist/{chunk-ZZFZBFVM.js → chunk-DQE7XRCK.js} +1 -1
- package/dist/{chunk-PZYP3MCL.js → chunk-DU5LZYQX.js} +1 -1
- package/dist/{chunk-6EZ7JWBK.js → chunk-E24W34C4.js} +4 -4
- package/dist/{chunk-TKG42KLM.js → chunk-E7OLCSAL.js} +1 -1
- package/dist/{chunk-5QWYIBE6.js → chunk-EAXEV45I.js} +1 -1
- package/dist/{chunk-I73E3BD5.js → chunk-EDSKA6UB.js} +1 -1
- package/dist/{chunk-WKBVT5WG.js → chunk-ELIH6GCC.js} +1 -1
- package/dist/{chunk-QJ7TI6CK.js → chunk-EXQXGSGY.js} +1 -1
- package/dist/{chunk-DONEJHDG.js → chunk-EYDNSYYE.js} +2 -2
- package/dist/{chunk-SKLUHLS2.js → chunk-FO6FNY6P.js} +1 -1
- package/dist/{chunk-UUC5YKAS.js → chunk-FOPGI6GO.js} +1 -1
- package/dist/{chunk-H6WN7GP4.js → chunk-FPCPFECH.js} +1 -1
- package/dist/{chunk-YGKQCEVG.js → chunk-G7QLHXVA.js} +1 -1
- package/dist/{chunk-3OZ6ZZ4T.js → chunk-GAYQKMOM.js} +1 -1
- package/dist/{chunk-SWI3LCPE.js → chunk-GKQ6CSJZ.js} +1 -1
- package/dist/{chunk-IPQH2RHD.js → chunk-GQG6WELZ.js} +1 -1
- package/dist/{chunk-YQH2JHFA.js → chunk-GXUZ3V7S.js} +1 -1
- package/dist/{chunk-TJGUNVRI.js → chunk-H3QZN45D.js} +1 -1
- package/dist/{chunk-X4DIJTIK.js → chunk-H7DDRARV.js} +1 -1
- package/dist/{chunk-G24L7MB3.js → chunk-H7PNMMDO.js} +1 -1
- package/dist/{chunk-733R5OKQ.js → chunk-HHSUBF73.js} +1 -1
- package/dist/{chunk-IX4KP6E3.js → chunk-HXYWEKMS.js} +1 -1
- package/dist/{chunk-GKRCTMWY.js → chunk-IBBFRL3Y.js} +1 -1
- package/dist/{chunk-5GVXMNC4.js → chunk-ICFFBMFB.js} +1 -1
- package/dist/{chunk-UKK5P74A.js → chunk-IDKUJQIG.js} +3 -3
- package/dist/{chunk-EKHWL542.js → chunk-IHUCBI6L.js} +47 -47
- package/dist/{chunk-G2S346IS.js → chunk-IIHPONSQ.js} +1 -1
- package/dist/{chunk-JAW32T6G.js → chunk-IOU6EKTT.js} +1 -1
- package/dist/{chunk-3CYHS4W2.js → chunk-IQYZAALJ.js} +1 -1
- package/dist/{chunk-442S5SDM.js → chunk-IRH6IGFT.js} +1 -1
- package/dist/{chunk-WNWQSHEC.js → chunk-IRTCLR3F.js} +1 -1
- package/dist/chunk-J3KRY2SD.js +1 -0
- package/dist/{chunk-KKUDXLK2.js → chunk-JCNRQYRP.js} +1 -1
- package/dist/{chunk-F5QG42MA.js → chunk-JNEGEJH6.js} +1 -1
- package/dist/{chunk-J7UQBC45.js → chunk-JO4ZHVOD.js} +1 -1
- package/dist/{chunk-JOZXRV5K.js → chunk-JOYM7AEQ.js} +1 -1
- package/dist/{chunk-ZULTG2D2.js → chunk-JVMYTC3J.js} +1 -1
- package/dist/{chunk-PUAMSBXS.js → chunk-KC2TN7AR.js} +1 -1
- package/dist/{chunk-CD5O2BIT.js → chunk-KHXDP3SF.js} +1 -1
- package/dist/{chunk-6YPEONHB.js → chunk-KOB6T6NK.js} +1 -1
- package/dist/{chunk-YLGSM42I.js → chunk-KOUKBXOZ.js} +1 -1
- package/dist/{chunk-KN3FTJDU.js → chunk-LUG2BZJP.js} +1 -1
- package/dist/{chunk-AT2GDXN7.js → chunk-M2AS5BWX.js} +1 -1
- package/dist/{chunk-67KMRBSZ.js → chunk-MCATVWHC.js} +1 -1
- package/dist/{chunk-DQ4HA72R.js → chunk-MKCXLBQ4.js} +1 -1
- package/dist/{chunk-C3CVLSLS.js → chunk-MMKBIMMC.js} +1 -1
- package/dist/{chunk-2MMGFZDP.js → chunk-MOCD7GFI.js} +1 -1
- package/dist/{chunk-XH6ZP7M5.js → chunk-MQXSMZQZ.js} +1 -1
- package/dist/{chunk-VQW35HIQ.js → chunk-MYQQOOGA.js} +1 -1
- package/dist/{chunk-75LJTY7F.js → chunk-N5HGT3TE.js} +1 -1
- package/dist/{chunk-VFWWZMOQ.js → chunk-NGPJXONG.js} +1 -1
- package/dist/{chunk-U73TPLFE.js → chunk-NV5IDANV.js} +1 -1
- package/dist/{chunk-GFCLUGAG.js → chunk-O2PI2PYG.js} +1 -1
- package/dist/{chunk-KSZ5K6LJ.js → chunk-O7MONSF7.js} +1 -1
- package/dist/{chunk-VOJWKGCW.js → chunk-OASPW2P2.js} +1 -1
- package/dist/{chunk-Z4LC3WE5.js → chunk-OCYPWE2O.js} +1 -1
- package/dist/{chunk-SXTDVUT3.js → chunk-ODH2U44N.js} +1 -1
- package/dist/{chunk-4N6YTHFD.js → chunk-OHASEW7T.js} +1 -1
- package/dist/{chunk-IIOIDMG3.js → chunk-OVLTFTZW.js} +1 -1
- package/dist/{chunk-Z74QYLNC.js → chunk-P6S5YLOP.js} +1 -1
- package/dist/{chunk-GUO7S4NW.js → chunk-PGKP7W5T.js} +1 -1
- package/dist/{chunk-LOHUNOQ7.js → chunk-PGN5EZTI.js} +1 -1
- package/dist/chunk-PGODIZ64.js +1 -0
- package/dist/{chunk-D6YDSGR4.js → chunk-PTIJDS6I.js} +1 -1
- package/dist/{chunk-3FBSBMSQ.js → chunk-Q2UHGP2Z.js} +1 -1
- package/dist/{chunk-RF6NUGCU.js → chunk-Q2X7IXPQ.js} +1 -1
- package/dist/{chunk-H5C3QTOO.js → chunk-Q6LCSRIW.js} +1 -1
- package/dist/{chunk-ZIREP3EZ.js → chunk-QDYDB7DY.js} +1 -1
- package/dist/{chunk-WLO5H255.js → chunk-QMSYJIAU.js} +1 -1
- package/dist/{chunk-T5GSCWN5.js → chunk-QPJQ67GU.js} +1 -1
- package/dist/{chunk-QS3FMN67.js → chunk-QPY6WJTT.js} +1 -1
- package/dist/{chunk-WAGAC3YI.js → chunk-QVYZZNAS.js} +1 -1
- package/dist/{chunk-CZXGQ53M.js → chunk-RFDT525K.js} +1 -1
- package/dist/{chunk-NY5OGHM5.js → chunk-RIRSTGFU.js} +1 -1
- package/dist/{chunk-APN3VWN4.js → chunk-SFMXFH33.js} +1 -1
- package/dist/{chunk-NWDP5IZ2.js → chunk-SKM44SK5.js} +1 -1
- package/dist/{chunk-O6KTFMCD.js → chunk-SRAHMYWJ.js} +1 -1
- package/dist/{chunk-OAI7VSLW.js → chunk-T3AJL2M5.js} +1 -1
- package/dist/{chunk-B7S23DLF.js → chunk-T5DF2GGD.js} +1 -1
- package/dist/{chunk-6DIHOMCB.js → chunk-TDCY3BRI.js} +1 -1
- package/dist/{chunk-5JNEWYD5.js → chunk-TDSR2X7X.js} +1 -1
- package/dist/{chunk-IG6LPVS4.js → chunk-TVU4YD2H.js} +1 -1
- package/dist/{chunk-FZKKKGUJ.js → chunk-TXJEP4FB.js} +1 -1
- package/dist/{chunk-LOQIRLTD.js → chunk-U2LQBJJL.js} +1 -1
- package/dist/{chunk-WZVQHMGI.js → chunk-U7ZRDNZU.js} +1 -1
- package/dist/{chunk-RYGZCBO4.js → chunk-UB5BVO76.js} +1 -1
- package/dist/{chunk-LCPD2BYX.js → chunk-UHJ65YFN.js} +1 -1
- package/dist/{chunk-5QQN3SKH.js → chunk-UYNCJGMC.js} +1 -1
- package/dist/{chunk-ATXODH6C.js → chunk-UZ7U322K.js} +1 -1
- package/dist/{chunk-HZMP62GK.js → chunk-VHAZBDFE.js} +1 -1
- package/dist/{chunk-GW3VY3FZ.js → chunk-VRRDIXFQ.js} +2 -2
- package/dist/{chunk-MZMYBFZQ.js → chunk-VSZS3FAJ.js} +1 -1
- package/dist/{chunk-B7BUEEBR.js → chunk-WIXW233Y.js} +1 -1
- package/dist/{chunk-CPE7XCC6.js → chunk-WMDYHUPS.js} +1 -1
- package/dist/{chunk-DO2SHYFU.js → chunk-WO5YOBQ7.js} +1 -1
- package/dist/{chunk-4TST2MNC.js → chunk-XDEAZP2I.js} +1 -1
- package/dist/{chunk-GBZL4TTY.js → chunk-XH5FCMS5.js} +1 -1
- package/dist/chunk-XU6CCL4P.js +278 -0
- package/dist/{chunk-XV3I45NA.js → chunk-XWQ72WTQ.js} +1 -1
- package/dist/chunk-YB3SGPFF.js +1 -0
- package/dist/{chunk-QMXKGSFH.js → chunk-YBFCDINU.js} +1 -1
- package/dist/{chunk-BCD4KTLJ.js → chunk-YJCJDCVP.js} +1 -1
- package/dist/{chunk-TQUSREKP.js → chunk-YYHCPLBX.js} +1 -1
- package/dist/{chunk-6RL7FUPD.js → chunk-YZY4M6IH.js} +1 -1
- package/dist/{chunk-WVHB2HCQ.js → chunk-ZDQNCYRH.js} +1 -1
- package/dist/{chunk-7EJ4UVYI.js → chunk-ZHPXJRHR.js} +1 -1
- package/dist/{chunk-YYL356OX.js → chunk-ZNWFTUFV.js} +1 -1
- package/dist/{chunk-ZQ5JVD5X.js → chunk-ZVQBSXE4.js} +1 -1
- package/dist/cli/commands/app/app-logs/sources.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-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/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/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/command-registry.js +1 -1
- package/dist/{conf-store-C2LOYIOU.js → conf-store-OC4XCP45.js} +1 -1
- package/dist/{deprecations-QOHE6JG6.js → deprecations-M5JGGK47.js} +1 -1
- package/dist/dist-3SP7TISC.js +1 -0
- package/dist/{dist-FF6C4ZHS.js → dist-Z4H2OM7V.js} +1 -1
- package/dist/{environments-EGD263DV.js → environments-ZLSO534C.js} +1 -1
- package/dist/{error-66U2HJ37.js → error-ZBG2MA5U.js} +1 -1
- package/dist/{error-handler-SW2ALZ5Z.js → error-handler-MCUV4RZV.js} +1 -1
- package/dist/{fs-JPQRUGZI.js → fs-7LCRIUF3.js} +1 -1
- package/dist/hooks/app-init.js +1 -1
- package/dist/hooks/did-you-mean.js +1 -1
- package/dist/hooks/hydrogen-init.js +1 -1
- package/dist/hooks/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/index.js +14 -14
- package/dist/{is-global-QWTDUPNR.js → is-global-RURDJZDU.js} +1 -1
- package/dist/{local-FRYN3NWL.js → local-5AKD7T5X.js} +1 -1
- package/dist/{local-storage-DFH3LT5G.js → local-storage-TJU77VRQ.js} +1 -1
- package/dist/{metadata-KZVLHQII.js → metadata-D5GLZOLV.js} +1 -1
- package/dist/{node-package-manager-LVFBY4LY.js → node-package-manager-FA3Y6DPG.js} +1 -1
- package/dist/notifications-system-76GJJAJP.js +1 -0
- package/dist/{output-NH4I5Y3C.js → output-FYS764MJ.js} +1 -1
- package/dist/{system-GNOF6HMI.js → system-KDM2BB7R.js} +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{ui-QOGKADWB.js → ui-QIHGXICT.js} +1 -1
- package/dist/upgrade-DY4L43H4.js +1 -0
- package/dist/{version-FJFTTOZU.js → version-LULWCT5R.js} +1 -1
- package/dist/version-WIERCO5R.js +1 -0
- package/dist/{workerd-U6WWWY73.js → workerd-N25GY5MX.js} +1 -1
- package/oclif.manifest.json +21 -7
- package/package.json +8 -8
- package/dist/chunk-FU232KQ7.js +0 -1
- package/dist/chunk-HM5H7WBE.js +0 -1
- package/dist/chunk-MQICT2LR.js +0 -1
- package/dist/chunk-UMT7DWR4.js +0 -1
- package/dist/chunk-ZIXWWU2N.js +0 -275
- package/dist/dist-Q676YGVI.js +0 -1
- package/dist/notifications-system-DP443VTE.js +0 -1
- package/dist/upgrade-K4S6JW64.js +0 -1
- package/dist/version-ZI4GZX72.js +0 -1
- /package/dist/{morph-CG6HEMCQ.js → morph-QZGREMO2.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Fa as x,p as A}from"./chunk-
|
|
1
|
+
import{Fa as x,p as A}from"./chunk-UZ7U322K.js";import{B as F}from"./chunk-E24W34C4.js";import{d as s}from"./chunk-ELIH6GCC.js";import{Hb as f,Lb as I,Mb as P,Ta as p,ua as v}from"./chunk-EYDNSYYE.js";import{a as S}from"./chunk-JCNRQYRP.js";import{d as m,f as y,q as w}from"./chunk-773TIA5M.js";import{r as D}from"./chunk-T6CC5WUU.js";import{e as E,g as l}from"./chunk-VKWPEFWQ.js";l();async function b(n){let{extension:e,stdout:o,developerPlatformClient:i,app:r,orgId:t}=n,c=r.configuration.client_id,{api_version:a,type:u,targeting:d}=e.configuration,T=await(!!d?.length?_({localIdentifier:e.localIdentifier,developerPlatformClient:i,apiKey:c,target:d[0].target,version:a,orgId:t}):$({localIdentifier:e.localIdentifier,developerPlatformClient:i,apiKey:c,type:u,version:a,orgId:t})),h=A(T,a);if(o)I(h);else{let g=m(e.directory,"schema.graphql");await v(g,h),P(`GraphQL Schema for ${e.localIdentifier} written to ${g}`)}}async function _({localIdentifier:n,developerPlatformClient:e,apiKey:o,target:i,version:r,orgId:t}){let c={handle:i,version:r},a=await e.targetSchemaDefinition(c,o,t);if(!a)throw new s(f`A schema could not be generated for ${n}`,f`Check that the Function targets and version are valid.`);return a}async function $({localIdentifier:n,developerPlatformClient:e,apiKey:o,version:i,type:r,orgId:t}){let c={version:i,type:r},a=await e.apiSchemaDefinition(c,o,t);if(!a)throw new s(f`A schema could not be generated for ${n}`,f`Check that the Function API type and version are valid.`);return a}l();var C=E(D(),1);var J={path:C.Flags.string({hidden:!1,description:"The path to your function directory.",parse:async n=>y(n),default:async()=>w(),noCacheDefault:!0,env:"SHOPIFY_FLAG_PATH"})};async function M(n,e){let o=n.allExtensions.filter(r=>r.isFunctionExtension),i=o.find(r=>r.directory===e);if(i)return i;if(o.length===1&&o[0])return o[0];if(S())return await F({message:"Which function?",choices:o.map(t=>({label:t.handle,value:t}))});throw new s("Run this command from a function directory or use `--path` to specify a function directory.")}async function N(n,e,o,i,r){let t=m(n.directory,"schema.graphql");if(await p(t))return t;let{app:c,developerPlatformClient:a,organization:u}=await x({directory:e,clientId:o,forceRelink:i,userProvidedConfigName:r});return await b({app:c,developerPlatformClient:a,extension:n,stdout:!1,orgId:u.id}),await p(t)?t:void 0}export{b as a,J as b,M as c,N as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as t}from"./chunk-STJ3LWFL.js";import{d as l}from"./chunk-
|
|
1
|
+
import{c as t}from"./chunk-STJ3LWFL.js";import{d as l}from"./chunk-KOB6T6NK.js";import{f as i,m,n as w,o as d,r as f}from"./chunk-PTIJDS6I.js";import{F as n}from"./chunk-E24W34C4.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();async function y(o,r,P){i()||f({store:r});let e=o??m()??await p(["Enter your",{link:{label:"store password",url:t(r)}}]),s=!1;for(;!await l(e,r,P);)s||(d(),s=!0),e=await p(["Incorrect",{link:{label:"store password",url:t(r)}},{char:"."},"Please try again"]);return w(e),e}async function p(o){return n({message:o,password:!0})}export{y as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Ea as cs,Fb as kt,Hb as gs,Pa as hs,Pb as ms,Qa as us,Ta as fs,Wa as ds,bb as ps,ma as wt,pa as be,ua as ls,wa as bt}from"./chunk-
|
|
1
|
+
import{Ea as cs,Fb as kt,Hb as gs,Pa as hs,Pb as ms,Qa as us,Ta as fs,Wa as ds,bb as ps,ma as wt,pa as be,ua as ls,wa as bt}from"./chunk-EYDNSYYE.js";import{d as we,g as yt,i as as}from"./chunk-773TIA5M.js";import{a as X,c as gi,e as mi,g as ye}from"./chunk-VKWPEFWQ.js";var ui=gi(l=>{"use strict";ye();Object.defineProperty(l,"__esModule",{value:!0});var yi=X("stream"),W=X("path"),G=X("fs"),Es=X("crypto"),O=class{constructor(e,s,i,r,n){this.kind=e,this.input=s,this.begin=i,this.end=r,this.file=n}getText(){return this.input.slice(this.begin,this.end)}getPosition(){let[e,s]=[1,1];for(let i=0;i<this.begin;i++)this.input[i]===`
|
|
2
2
|
`?(e++,s=1):s++;return[e,s]}size(){return this.end-this.begin}},D=class{liquidMethodMissing(e,s){}},wi=Object.prototype.toString,ys=String.prototype.toLowerCase,Qt=Object.hasOwnProperty;function d(t){return typeof t=="string"}function x(t){return typeof t=="function"}function bi(t){return t&&x(t.then)}function _e(t){return t&&x(t.next)&&x(t.throw)&&x(t.return)}function Kt(t){return function(...e){return new Promise((s,i)=>{t(...e,(r,n)=>{r?i(r):s(n)})})}}function h(t){return t=m(t),d(t)?t:k(t)?"":S(t)?t.map(e=>h(e)).join(""):String(t)}function ge(t){return t=m(t),S(t)?t:d(t)&&t.length>0?[t]:Ti(t)?Array.from(t):dt(t)?Object.keys(t).map(e=>[e,t[e]]):[]}function L(t){return t=m(t),k(t)?[]:S(t)?t:[t]}function m(t){return t instanceof D&&x(t.valueOf)?t.valueOf():t}function xt(t){return+m(t)||0}function ft(t){return typeof t=="number"}function Vs(t){return t&&x(t.toLiquid)?Vs(t.toLiquid()):t}function k(t){return t==null}function ki(t){return t===void 0}function S(t){return wi.call(t)==="[object Array]"}function Ps(t){return t&&ft(t.length)}function Ti(t){return dt(t)&&Symbol.iterator in t}function ws(t,e){t=t||{};for(let s in t)if(Qt.call(t,s)&&e(t[s],s,t)===!1)break;return t}function xi(t){return t[t.length-1]}function dt(t){let e=typeof t;return t!==null&&(e==="object"||e==="function")}function Cs(t,e,s=1){let i=[];for(let r=t;r<e;r+=s)i.push(r);return i}function oe(t,e,s=" "){return $s(t,e,s,(i,r)=>r+i)}function Si(t,e,s=" "){return $s(t,e,s,(i,r)=>i+r)}function $s(t,e,s,i){t=String(t);let r=e-t.length;return r<=0?t:i(t,s.repeat(r))}function js(t){return t}function _i(t){return[...t].some(s=>s>="a"&&s<="z")?t.toUpperCase():t.toLowerCase()}function Li(t,e){return t.length>e?t.slice(0,e-3)+"...":t}function Fi(t,e){return k(t)&&k(e)?0:k(t)?1:k(e)||t<e?-1:t>e?1:0}function Oi(t,e){return k(t)&&k(e)?0:k(t)?1:k(e)||(t=ys.call(t),e=ys.call(e),t<e)?-1:t>e?1:0}function pt(t){return function(...e){return t.call(this,...e.map(m))}}function V(t){return function(...e){return t.call(this,...e.map(xt))}}function*ke(t){let e=new Set;for(let s of t){let i=JSON.stringify(s);e.has(i)||(e.add(i),yield s)}}var bs="__liquidClass__",E=class extends Error{constructor(e,s){super(typeof e=="string"?e:e.message),this.context="",typeof e!="string"&&Object.defineProperty(this,"originalError",{value:e,enumerable:!1}),Object.defineProperty(this,"token",{value:s,enumerable:!1}),Object.defineProperty(this,bs,{value:"LiquidError",enumerable:!1})}update(){Object.defineProperty(this,"context",{value:vi(this.token),enumerable:!1}),this.message=zi(this.message,this.token),this.stack=this.message+`
|
|
3
3
|
`+this.context+`
|
|
4
4
|
`+this.stack,this.originalError&&(this.stack+=`
|
|
@@ -11,5 +11,5 @@ From `+this.originalError.stack)}static is(e){return e?.[bs]==="LiquidError"}},L
|
|
|
11
11
|
`)}function _r(t){let e=h(t);this.context.memoryLimit.use(e.length);let s=new Map([["<script","</script>"],["<style","</style>"],["<!--","-->"],["<",">"]]),i="",r=0;for(;r<e.length;){let n=e.indexOf("<",r);if(n<0)return i+e.slice(r);i+=e.slice(r,n);for(let[o,a]of s){if(!e.startsWith(o,n))continue;let c=e.indexOf(a,n+o.length);if(c>=0){r=c+a.length;break}s.delete(o)}if(r===n)return i+e.slice(n)}return i}var Lr=Object.freeze({__proto__:null,escape:gt,xml_escape:kr,escape_once:xr,newline_to_br:Sr,strip_html:_r}),It=class{constructor(e){this.mapping=e,this.sep="/"}async exists(e){return this.existsSync(e)}existsSync(e){return!k(this.mapping[e])}async readFile(e){return this.readFileSync(e)}readFileSync(e){let s=this.mapping[e];if(k(s))throw new Error(`ENOENT: ${e}`);return s}dirname(e){let s=e.split(this.sep);return s.pop(),s.join(this.sep)}resolve(e,s,i){if(s+=i,e===".")return s;let r=e.split(/\/+/);for(let n of s.split(this.sep))n==="."||n===""||(n===".."?(r.length>1||r[0]!=="")&&r.pop():r.push(n));return r.join(this.sep)}},Q={root:["."],layouts:["."],partials:["."],relativeReference:!0,jekyllInclude:!1,keyValueSeparator:":",cache:void 0,extname:"",fs:dr,dynamicPartials:!0,jsTruthy:!1,dateFormat:"%A, %B %-e, %Y at %-l:%M %P %z",locale:"",trimTagRight:!1,trimTagLeft:!1,trimOutputRight:!1,trimOutputLeft:!1,greedy:!0,tagDelimiterLeft:"{%",tagDelimiterRight:"%}",outputDelimiterLeft:"{{",outputDelimiterRight:"}}",preserveTimezones:!1,strictFilters:!1,strictVariables:!1,ownPropertyOnly:!0,lenientIf:!1,globals:{},keepOutputType:!1,operators:Zs,memoryLimit:1/0,parseLimit:1/0,renderLimit:1/0};function Fr(t){if(t.hasOwnProperty("root")&&(t.hasOwnProperty("partials")||(t.partials=t.root),t.hasOwnProperty("layouts")||(t.layouts=t.root)),t.hasOwnProperty("cache")){let e;typeof t.cache=="number"?e=t.cache>0?new Pe(t.cache):void 0:typeof t.cache=="object"?e=t.cache:e=t.cache?new Pe(1024):void 0,t.cache=e}return t={...Q,...t.jekyllInclude?{dynamicPartials:!1}:{},...t},(!t.fs.dirname||!t.fs.sep)&&t.relativeReference&&(console.warn("[LiquidJS] `fs.dirname` and `fs.sep` are required for relativeReference, set relativeReference to `false` to suppress this warning"),t.relativeReference=!1),t.root=Se(t.root),t.partials=Se(t.partials),t.layouts=Se(t.layouts),t.outputEscape=t.outputEscape&&Or(t.outputEscape),t.locale||(t.locale=Ws()?.().resolvedOptions().locale??"en-US"),t.templates&&(t.fs=new It(t.templates),t.relativeReference=!0,t.root=t.partials=t.layouts="."),t}function Or(t){return t==="escape"?gt:t==="json"?Qs.json:(_(x(t),"`outputEscape` need to be of type string or function"),t)}function Se(t){let e=[];return S(t)&&(e=t),d(t)&&(e=[t]),e}function vr(t,e){let s=!1;for(let i=0;i<t.length;i++){let r=t[i];ei(r)&&(!s&&r.trimLeft&&zr(t[i-1],e.greedy),J(r)&&(r.name==="raw"?s=!0:r.name==="endraw"&&(s=!1)),!s&&r.trimRight&&Rr(t[i+1],e.greedy))}}function zr(t,e){if(!t||!mt(t))return;let s=e?te:Is;for(;w[t.input.charCodeAt(t.end-1-t.trimRight)]&s;)t.trimRight++}function Rr(t,e){if(!t||!mt(t))return;let s=e?te:Is;for(;w[t.input.charCodeAt(t.begin+t.trimLeft)]&s;)t.trimLeft++;t.input.charAt(t.begin+t.trimLeft)===`
|
|
12
12
|
`&&t.trimLeft++}var z=class{constructor(e,s=Q.operators,i,r){this.input=e,this.file=i,this.rawBeginAt=-1,this.p=r?r[0]:0,this.N=r?r[1]:e.length,this.opTrie=vt(s),this.literalTrie=vt(Bs)}readExpression(){return new Ve(this.readExpressionTokens())}*readExpressionTokens(){for(;this.p<this.N;){let e=this.readOperator();if(e){yield e;continue}let s=this.readValue();if(s){yield s;continue}return}}readOperator(){this.skipBlank();let e=this.matchTrie(this.opTrie);if(e!==-1)return new Mt(this.input,this.p,this.p=e,this.file)}matchTrie(e){let s=e,i=this.p,r;for(;s[this.input[i]]&&i<this.N;)s=s[this.input[i++]],s.end&&(r=s);return!r||r.needBoundary&&Te(this.peek(i-this.p))?-1:i}readFilteredValue(){let e=this.p,s=this.readExpression();this.assert(s.valid(),`invalid value expression: ${this.snapshot()}`);let i=this.readFilters();return new Ct(s,i,this.input,e,this.p,this.file)}readFilters(){let e=[];for(;;){let s=this.readFilter();if(!s)return e;e.push(s)}}readFilter(){if(this.skipBlank(),this.end())return null;this.assert(this.read()==="|",'expected "|" before filter');let e=this.readIdentifier();if(!e.size())return this.assert(this.end(),"expected filter name"),null;let s=[];if(this.skipBlank(),this.peek()===":")do{++this.p;let i=this.readFilterArg();i&&s.push(i),this.skipBlank(),this.assert(this.end()||this.peek()===","||this.peek()==="|",()=>`unexpected character ${this.snapshot()}`)}while(this.peek()===",");else if(!(this.peek()==="|"||this.end()))throw this.error('expected ":" after filter name');return new Ee(e.getText(),s,this.input,e.begin,this.p,this.file)}readFilterArg(){let e=this.readValue();if(!e)return;if(this.skipBlank(),this.peek()!==":")return e;++this.p;let s=this.readValue();return[e.getText(),s]}readTopLevelTokens(e=Q){let s=[];for(;this.p<this.N;){let i=this.readTopLevelToken(e);s.push(i)}return vr(s,e),s}readTopLevelToken(e){let{tagDelimiterLeft:s,outputDelimiterLeft:i}=e;return this.rawBeginAt>-1?this.readEndrawOrRawContent(e):this.match(s)?this.readTagToken(e):this.match(i)?this.readOutputToken(e):this.readHTMLToken([s,i])}readHTMLToken(e){let s=this.p;for(;this.p<this.N&&!e.some(i=>this.match(i));)++this.p;return new Me(this.input,s,this.p,this.file)}readTagToken(e){let{file:s,input:i}=this,r=this.p;if(this.readToDelimiter(e.tagDelimiterRight)===-1)throw this.error(`tag ${this.snapshot(r)} not closed`,r);let n=new ue(i,r,this.p,e,s);return n.name==="raw"&&(this.rawBeginAt=r),n}readToDelimiter(e,s=!1){for(this.skipBlank();this.p<this.N;){if(s&&this.peekType()&ks){this.readQuoted();continue}if(++this.p,this.rmatch(e))return this.p}return-1}readOutputToken(e=Q){let{file:s,input:i}=this,{outputDelimiterRight:r}=e,n=this.p;if(this.readToDelimiter(r,!0)===-1)throw this.error(`output ${this.snapshot(n)} not closed`,n);return new At(i,n,this.p,e,s)}readEndrawOrRawContent(e){let{tagDelimiterLeft:s,tagDelimiterRight:i}=e,r=this.p,n=this.readTo(s)-s.length;for(;this.p<this.N;){if(this.readIdentifier().getText()!=="endraw"){n=this.readTo(s)-s.length;continue}for(;this.p<=this.N;){if(this.rmatch(i)){let o=this.p;return r===n?(this.rawBeginAt=-1,new ue(this.input,r,o,e,this.file)):(this.p=n,new Me(this.input,r,n,this.file))}if(this.rmatch(s))break;this.p++}}throw this.error(`raw ${this.snapshot(this.rawBeginAt)} not closed`,r)}readLiquidTagTokens(e=Q){let s=[];for(;this.p<this.N;){let i=this.readLiquidTagToken(e);i&&s.push(i)}return s}readLiquidTagToken(e){if(this.skipBlank(),this.end())return;let s=this.p;this.readToDelimiter(`
|
|
13
13
|
`);let i=this.p;return new Pt(this.input,s,i,e,this.file)}error(e,s=this.p){return new Le(e,new ie(this.input,s,this.N,this.file))}assert(e,s,i){if(!e)throw this.error(typeof s=="function"?s():s,i)}snapshot(e=this.p){return JSON.stringify(Li(this.input.slice(e,this.N),32))}readWord(){return this.readIdentifier()}readIdentifier(){this.skipBlank();let e=this.p;for(;!this.end()&&Te(this.peek());)++this.p;return new ie(this.input,e,this.p,this.file)}readNonEmptyIdentifier(){let e=this.readIdentifier();return e.size()?e:void 0}readTagName(){return this.skipBlank(),this.input[this.p]==="#"?this.input.slice(this.p,++this.p):this.readIdentifier().getText()}readHashes(e){let s=[];for(;;){let i=this.readHash(e);if(!i)return s;s.push(i)}}readHash(e){this.skipBlank(),this.peek()===","&&++this.p;let s=this.p,i=this.readNonEmptyIdentifier();if(!i)return;let r;this.skipBlank();let n=d(e)?e:e?"=":":";return this.peek()===n&&(++this.p,r=this.readValue()),new Dt(this.input,s,this.p,i,r,this.file)}remaining(){return this.input.slice(this.p,this.N)}advance(e=1){this.p+=e}end(){return this.p>=this.N}read(){return this.input[this.p++]}readTo(e){for(;this.p<this.N;)if(++this.p,this.rmatch(e))return this.p;return-1}readValue(){this.skipBlank();let e=this.p,s=this.readLiteral()||this.readQuoted()||this.readRange()||this.readNumber(),i=this.readProperties(!s);return i.length?new De(s,i,this.input,e,this.p):s}readScopeValue(){this.skipBlank();let e=this.p,s=this.readProperties();if(s.length)return new De(void 0,s,this.input,e,this.p)}readProperties(e=!0){let s=[];for(;;){if(this.peek()==="["){this.p++;let i=this.readValue()||new ie(this.input,this.p,this.p,this.file);this.assert(this.readTo("]")!==-1,"[ not closed"),s.push(i);continue}if(e&&!s.length){let i=this.readNonEmptyIdentifier();if(i){s.push(i);continue}}if(this.peek()==="."&&this.peek(1)!=="."){this.p++;let i=this.readNonEmptyIdentifier();if(!i)break;s.push(i);continue}break}return s}readNumber(){this.skipBlank();let e=!1,s=!1,i=0;for(this.peekType()&Ni&&i++;this.p+i<=this.N;)if(this.peekType(i)&Ai)s=!0,i++;else if(this.peek(i)==="."&&this.peek(i+1)!=="."){if(e||!s)return;e=!0,i++}else break;if(s&&!Te(this.peek(i))){let r=new Nt(this.input,this.p,this.p+i,this.file);return this.advance(i),r}}readLiteral(){this.skipBlank();let e=this.matchTrie(this.literalTrie);if(e===-1)return;let s=new qt(this.input,this.p,e,this.file);return this.p=e,s}readRange(){this.skipBlank();let e=this.p;if(this.peek()!=="(")return;++this.p;let s=this.readValueOrThrow();this.skipBlank(),this.assert(this.read()==="."&&this.read()===".","invalid range syntax");let i=this.readValueOrThrow();return this.skipBlank(),this.assert(this.read()===")","invalid range syntax"),new Vt(this.input,e,this.p,s,i,this.file)}readValueOrThrow(){let e=this.readValue();return this.assert(e,()=>`unexpected token ${this.snapshot()}, value expected`),e}readQuoted(){this.skipBlank();let e=this.p;if(!(this.peekType()&ks))return;++this.p;let s=!1;for(;this.p<this.N&&(++this.p,!(this.input[this.p-1]===this.input[e]&&!s));)s?s=!1:this.input[this.p-1]==="\\"&&(s=!0);return new Et(this.input,e,this.p,this.file)}*readFileNameTemplate(e){let{outputDelimiterLeft:s}=e,i=[","," ","\r",`
|
|
14
|
-
`," ",s],r=new Set(i);for(;this.p<this.N&&!r.has(this.peek());)yield this.match(s)?this.readOutputToken(e):this.readHTMLToken(i)}match(e){for(let s=0;s<e.length;s++)if(e[s]!==this.input[this.p+s])return!1;return!0}rmatch(e){for(let s=0;s<e.length;s++)if(e[e.length-1-s]!==this.input[this.p-1-s])return!1;return!0}peekType(e=0){return this.p+e>=this.N?0:w[this.input.charCodeAt(this.p+e)]}peek(e=0){return this.p+e>=this.N?"":this.input[this.p+e]}skipBlank(){for(;this.peekType()&te;)++this.p}},Ce=class{constructor(e,s){this.handlers={},this.stopRequested=!1,this.tokens=e,this.parseToken=s}on(e,s){return this.handlers[e]=s,this}trigger(e,s){let i=this.handlers[e];return i?(i.call(this,s),!0):!1}start(){this.trigger("start");let e;for(;!this.stopRequested&&(e=this.tokens.shift());){if(this.trigger("token",e)||J(e)&&this.trigger(`tag:${e.name}`,e))continue;let s=this.parseToken(e,this.tokens);this.trigger("template",s)}return this.stopRequested||this.trigger("end"),this}stop(){return this.stopRequested=!0,this}},fe=class{constructor(e){this.token=e}},b=class extends fe{constructor(e,s,i){super(e),this.name=e.name,this.liquid=i,this.tokenizer=e.tokenizer}},j=class{constructor(e,s){this.hash={};let i=e instanceof z?e:new z(e,{});for(let r of i.readHashes(s))this.hash[r.name.content]=r.value}*render(e){let s={};for(let i of Object.keys(this.hash))s[i]=this.hash[i]===void 0?!0:yield T(this.hash[i],e);return s}};function Ar(t){return class extends b{constructor(e,s,i){super(e,s,i),x(t.parse)&&t.parse.call(this,e,s)}*render(e,s){let i=yield new j(this.token.args,e.opts.keyValueSeparator).render(e);return yield t.render.call(this,e,s,i)}}}function Ks(t){return S(t)}var de=class{constructor(e,s,i){this.token=e,this.name=e.name,this.handler=x(s)?s:x(s?.handler)?s.handler:js,this.raw=!x(s)&&!!s?.raw,this.args=e.args,this.liquid=i}*render(e,s){let i=[];for(let r of this.args)Ks(r)?i.push([r[0],yield T(r[1],s)]):i.push(yield T(r,s));return yield this.handler.apply({context:s,token:this.token,liquid:this.liquid},[e,...i])}},F=class{constructor(e,s){this.filters=[];let i=typeof e=="string"?new z(e,s.options.operators).readFilteredValue():e;this.initial=i.initial,this.filters=i.filters.map(r=>new de(r,this.getFilter(s,r.name),s))}*value(e,s){s=s||e.opts.lenientIf&&this.filters.length>0&&this.filters[0].name==="default";let i=yield this.initial.evaluate(e,s);for(let r of this.filters)i=yield r.render(i,e);return i}getFilter(e,s){let i=e.filters[s];return _(i||!e.options.strictFilters,()=>`undefined filter: ${s}`),i}},$e=class extends fe{constructor(e,s){super(e);let i=new z(e.input,s.options.operators,e.file,e.contentRange);this.value=new F(i.readFilteredValue(),s);let r=this.value.filters,n=s.options.outputEscape;if(!r[r.length-1]?.raw&&n){let o=new Ee(toString.call(n),[],"",0,0);r.push(new de(o,n,s))}}*render(e,s){let i=yield this.value.value(e,!1);s.write(i)}*arguments(){yield this.value}},Bt=class extends fe{constructor(e){super(e),this.str=e.getContent()}*render(e,s){s.write(this.str)}},H=class t{constructor(e,s){this.segments=e,this.location=s}toString(){return Ie(this.segments,!0)}toArray(){function*e(...s){for(let i of s)i instanceof t?yield Array.from(e(...i.segments)):yield i}return Array.from(e(...this.segments))}},ne=class{constructor(){this.map=new Map}get(e){let s=Ie([e.segments[0]]);return this.map.has(s)||this.map.set(s,[]),this.map.get(s)}has(e){return this.map.has(Ie([e.segments[0]]))}push(e){this.get(e).push(e)}asObject(){return Object.fromEntries(this.map)}},Gs={partials:!0};function*Xs(t,e,s){let i=new ne,r=new ne,n=new ne,o=new je(new Set),a=new Set;function c(u,p){i.push(u);let g=p.alias(u);if(g!==void 0){let y=g.segments[0];d(y)&&!o.has(y)&&r.push(g)}else{let y=u.segments[0];d(y)&&!p.has(y)&&r.push(u)}for(let y of u.segments)y instanceof H&&c(y,p)}function*f(u,p){if(u.arguments)for(let g of u.arguments())for(let y of Rs(g))c(y,p);if(u.localScope)for(let g of u.localScope()){p.add(g.content),p.deleteAlias(g.content);let[y,se]=g.getPosition();n.push(new H([g.content],{row:y,col:se,file:g.file}))}if(u.children)if(u.partialScope){let g=u.partialScope();if(g===void 0){for(let Z of yield u.children(e,s))yield f(Z,p);return}if(a.has(g.name))return;let y=new Set,se=g.isolated?new je(y):p.push(y);for(let Z of g.scope)if(d(Z))y.add(Z);else{let[ns,pi]=Z;y.add(ns);let os=Array.from(Rs(pi));os.length&&se.setAlias(ns,os[0].segments)}for(let Z of yield u.children(e,s))yield f(Z,se),a.add(g.name);se.pop()}else{u.blockScope&&p.push(new Set(u.blockScope()));for(let g of yield u.children(e,s))yield f(g,p);u.blockScope&&p.pop()}}for(let u of t)yield f(u,o);return{variables:i.asObject(),globals:r.asObject(),locals:n.asObject()}}function P(t,e={}){let s={...Gs,...e};return q(Xs(t,s.partials,!1))}function C(t,e={}){let s={...Gs,...e};return M(Xs(t,s.partials,!0))}var je=class{constructor(e){this.stack=[{names:e,aliases:new Map}]}has(e){for(let s of this.stack)if(s.names.has(e))return!0;return!1}push(e){return this.stack.push({names:e,aliases:new Map}),this}pop(){return this.stack.pop()?.names}add(e){this.stack[0].names.add(e)}alias(e){let s=e.segments[0];if(!d(s))return;let i=this.getAlias(s);if(i!==void 0)return new H([...i,...e.segments.slice(1)],e.location)}setAlias(e,s){this.stack[this.stack.length-1].aliases.set(e,s)}deleteAlias(e){this.stack[this.stack.length-1].aliases.delete(e)}getAlias(e){for(let s of this.stack){if(s.aliases.has(e))return s.aliases.get(e);if(s.names.has(e))return}}};function*Rs(t){v(t)?yield*ee(t):t instanceof F&&(yield*Nr(t))}function*Nr(t){for(let e of t.initial.postfix)v(e)&&(yield*ee(e));for(let e of t.filters)for(let s of e.args)Ks(s)&&s[1]?yield*ee(s[1]):v(s)&&(yield*ee(s))}function*ee(t){Xt(t)?(yield*ee(t.lhs),yield*ee(t.rhs)):pe(t)&&(yield Ut(t))}function Ut(t){let e=[],s=t.file,i=t.props[0];s=s||i.file,Be(i)||Ht(i)||Yt(i)?e.push(i.content):pe(i)&&e.push(...Ut(i).segments);for(let o of t.props.slice(1))s=s||o.file,Be(o)||Ht(o)||Yt(o)?e.push(o.content):pe(o)&&e.push(Ut(o));let[r,n]=t.getPosition();return new H(e,{row:r,col:n,file:s})}var As=/^[\u0080-\uFFFFa-zA-Z_][\u0080-\uFFFFa-zA-Z0-9_-]*$/;function Ie(t,e=!1){let s=[],i=t[0];d(i)&&(!e||i.match(As)?s.push(`${i}`):s.push(`['${i}']`));for(let r of t.slice(1))r instanceof H?s.push(`[${Ie(r.segments)}]`):d(r)?r.match(As)?s.push(`.${r}`):s.push(`['${r}']`):s.push(`[${r}]`);return s.join("")}(function(t){t.Partials="partials",t.Layouts="layouts",t.Root="root"})(l.LookupType||(l.LookupType={}));var Wt=class{constructor(e){if(this.options=e,e.relativeReference){let i=e.fs.sep;_(i,"`fs.sep` is required for relative reference");let r=["."+i,".."+i,"./","../"];this.shouldLoadRelative=n=>r.some(o=>n.startsWith(o))}else this.shouldLoadRelative=i=>!1;let s=e.fs;this.contains=zt(s.contains?.bind(s)||(async()=>!0),s.containsSync?.bind(s)||(()=>!0)),this.exists=zt(s.exists?.bind(s)||(async()=>!1),s.existsSync?.bind(s))}*lookup(e,s,i,r){let n=this.options[s];for(let o of this.candidates(e,n,r)){let a=!1;for(let c of n)if(yield this.contains(!!i,c,o)){a=!0;break}if(a&&(yield this.exists(!!i,o)))return o}throw this.lookupError(e,n)}*candidates(e,s,i){let{fs:r,extname:n}=this.options;this.shouldLoadRelative(e)&&i&&(yield r.resolve(this.dirname(i),e,n));for(let o of s)yield r.resolve(o,e,n);if(r.fallback!==void 0){let o=r.fallback(e);o!==void 0&&(yield o)}}dirname(e){let s=this.options.fs;return _(s.dirname,"`fs.dirname` is required for relative reference"),s.dirname(e)}lookupError(e,s){let i=new Error("ENOENT");return i.message=`ENOENT: Failed to lookup "${e}" in "${s}"`,i.code="ENOENT",i}},N=class{constructor(e){this.liquid=e,this.cache=this.liquid.options.cache,this.fs=this.liquid.options.fs,this.parseFile=this.cache?this._parseFileCached:this._parseFile,this.loader=new Wt(this.liquid.options),this.parseLimit=new ce("parse length",e.options.parseLimit),this.readFile=zt(this.fs.readFile?.bind(this.fs)||(async()=>{throw new Error("readFile not implemented")}),this.fs.readFileSync?.bind(this.fs))}parse(e,s){e=String(e),this.parseLimit.use(e.length);let r=new z(e,this.liquid.options.operators,s).readTopLevelTokens(this.liquid.options);return this.parseTokens(r)}parseTokens(e){let s,i=[],r=[];for(;s=e.shift();)try{i.push(this.parseToken(s,e))}catch(n){if(this.liquid.options.catchAllErrors)r.push(n);else throw n}if(r.length)throw new ve(r);return i}parseToken(e,s){try{if(J(e)){let i=this.liquid.tags[e.name];return _(i,`tag "${e.name}" not found`),new i(e,s,this.liquid,this)}return ti(e)?new $e(e,this.liquid):new Bt(e)}catch(i){throw E.is(i)?i:new Fe(i,e)}}parseStream(e){return new Ce(e,(s,i)=>this.parseToken(s,i))}*_parseFileCached(e,s,i=l.LookupType.Root,r){let n=this.cache,o=this.loader.shouldLoadRelative(e)?r+","+e:i+":"+e,a=yield n.read(o);if(a)return a;let c=this._parseFile(e,s,i,r),f=s?yield c:q(c);n.write(o,f);try{return yield f}catch(u){throw n.remove(o),u}}*_parseFile(e,s,i=l.LookupType.Root,r){let n=yield this.loader.lookup(e,i,s,r);return this.parse(yield this.readFile(!!s,n),n)}};(function(t){t[t.Number=1]="Number",t[t.Literal=2]="Literal",t[t.Tag=4]="Tag",t[t.Output=8]="Output",t[t.HTML=16]="HTML",t[t.Filter=32]="Filter",t[t.Hash=64]="Hash",t[t.PropertyAccess=128]="PropertyAccess",t[t.Word=256]="Word",t[t.Range=512]="Range",t[t.Quoted=1024]="Quoted",t[t.Operator=2048]="Operator",t[t.FilteredValue=4096]="FilteredValue",t[t.Delimited=12]="Delimited"})(l.TokenKind||(l.TokenKind={}));function ei(t){return!!(R(t)&l.TokenKind.Delimited)}function Gt(t){return R(t)===l.TokenKind.Operator}function mt(t){return R(t)===l.TokenKind.HTML}function ti(t){return R(t)===l.TokenKind.Output}function J(t){return R(t)===l.TokenKind.Tag}function Be(t){return R(t)===l.TokenKind.Quoted}function qr(t){return R(t)===l.TokenKind.Literal}function Ht(t){return R(t)===l.TokenKind.Number}function pe(t){return R(t)===l.TokenKind.PropertyAccess}function Yt(t){return R(t)===l.TokenKind.Word}function Xt(t){return R(t)===l.TokenKind.Range}function v(t){return(R(t)&1667)>0}function R(t){return t?t.kind:-1}var Mr=Object.freeze({__proto__:null,isDelimitedToken:ei,isOperatorToken:Gt,isHTMLToken:mt,isOutputToken:ti,isTagToken:J,isQuotedToken:Be,isLiteralToken:qr,isNumberToken:Ht,isPropertyAccessToken:pe,isWordToken:Yt,isRangeToken:Xt,isValueToken:v}),Ue=function(){return Ue=Object.assign||function(e){for(var s,i=1,r=arguments.length;i<r;i++){s=arguments[i];for(var n in s)Object.prototype.hasOwnProperty.call(s,n)&&(e[n]=s[n])}return e},Ue.apply(this,arguments)};function Y(t){let e=Object.create(null);return t&&Object.assign(e,t),e}var B=class t{constructor(e={},s=Q,i={},{memoryLimit:r,renderLimit:n}={}){this.scopes=[Y()],this.registers={},this.breakCalled=!1,this.continueCalled=!1,this.sync=!!i.sync,this.opts=s,this.globals=i.globals??s.globals,this.environments=dt(e)?e:Object(e),this.strictVariables=i.strictVariables??this.opts.strictVariables,this.ownPropertyOnly=i.ownPropertyOnly??s.ownPropertyOnly,this.memoryLimit=r??new ce("memory alloc",i.memoryLimit??s.memoryLimit),this.renderLimit=n??new ce("template render",$t().now()+(i.renderLimit??s.renderLimit))}getRegister(e,s=void 0){return this.registers[e]=this.registers[e]||s}setRegister(e,s){return this.registers[e]=s}saveRegister(...e){return e.map(s=>[s,this.getRegister(s)])}restoreRegister(e){return e.forEach(([s,i])=>this.setRegister(s,i))}getAll(){return[this.globals,this.environments,...this.scopes].reduce((e,s)=>Ue(e,s),{})}get(e){return this.getSync(e)}getSync(e){return M(this._get(e))}*_get(e){let s=this.findScope(e[0]);return yield this._getFromScope(s,e)}getFromScope(e,s){return M(this._getFromScope(e,s))}*_getFromScope(e,s,i=this.strictVariables){d(s)&&(s=s.split("."));for(let r=0;r<s.length;r++)if(e=yield this.readProperty(e,s[r]),i&&ki(e))throw new St(s.slice(0,r+1).join("."));return e}push(e){return this.scopes.push(e)}pop(){return this.scopes.pop()}bottom(){return this.scopes[0]}spawn(e={}){return new t(e,this.opts,{sync:this.sync,globals:this.globals,strictVariables:this.strictVariables,ownPropertyOnly:this.ownPropertyOnly},{renderLimit:this.renderLimit,memoryLimit:this.memoryLimit})}findScope(e){for(let s=this.scopes.length-1;s>=0;s--){let i=this.scopes[s];if(e in i)return i}return e in this.environments?this.environments:this.globals}readProperty(e,s){if(e=Vs(e),s=m(s),k(e))return e;if(S(e)&&s<0)return e[e.length+ +s];let i=Dr(e,s,this.ownPropertyOnly);return i===void 0&&e instanceof D?e.liquidMethodMissing(s,this):x(i)?i.call(e):s==="size"?Pr(e):s==="first"?Er(e):s==="last"?Vr(e):i}};function Dr(t,e,s){if(!(s&&!Qt.call(t,e)&&!(t instanceof D)))return t[e]}function Er(t){return S(t)?t[0]:t.first}function Vr(t){return S(t)?t[t.length-1]:t.last}function Pr(t){if(Qt.call(t,"size")||t.size!==void 0)return t.size;if(S(t)||d(t))return t.length;if(typeof t=="object")return Object.keys(t).length}var K;(function(t){t[t.OUTPUT=0]="OUTPUT",t[t.STORE=1]="STORE"})(K||(K={}));var Cr=V(Math.abs),$r=V(Math.max),jr=V(Math.min),Ir=V(Math.ceil),Br=V((t,e,s=!1)=>s?Math.floor(t/e):t/e),Ur=V(Math.floor),Wr=V((t,e)=>t-e),Hr=V((t,e)=>t+e),Yr=V((t,e)=>t%e),Jr=V((t,e)=>t*e);function Zr(t,e=0){t=xt(t),e=xt(e);let s=Math.pow(10,e),i=t*s;return Math.sign(t)*Math.round(Math.abs(i))/s}var Qr=Object.freeze({__proto__:null,abs:Cr,at_least:$r,at_most:jr,ceil:Ir,divided_by:Br,floor:Ur,minus:Wr,plus:Hr,modulo:Yr,times:Jr,round:Zr}),Kr=t=>decodeURIComponent(h(t)).replace(/\+/g," "),Gr=t=>encodeURIComponent(h(t)).replace(/%20/g,"+"),Xr=t=>encodeURIComponent(h(t)).replace(/%20/g,"+").replace(/[!'()*]/g,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase()),en=t=>encodeURI(h(t)).replace(/%5B/g,"[").replace(/%5D/g,"]"),Ns=/[^\p{M}\p{L}\p{Nd}]+/ug,tn={raw:/\s+/g,default:Ns,pretty:/[^\p{M}\p{L}\p{Nd}._~!$&'()+,;=@]+/ug,ascii:/[^A-Za-z0-9]+/g,latin:Ns,none:null};function sn(t,e="default",s=!1){t=h(t);let i=tn[e];return i&&(e==="latin"&&(t=rn(t)),t=t.replace(i,"-").replace(/^-|-$/g,"")),s?t:t.toLowerCase()}function rn(t){return t.replace(/[àáâãäå]/g,"a").replace(/[æ]/g,"ae").replace(/[ç]/g,"c").replace(/[èéêë]/g,"e").replace(/[ìíîï]/g,"i").replace(/[ð]/g,"d").replace(/[ñ]/g,"n").replace(/[òóôõöø]/g,"o").replace(/[ùúûü]/g,"u").replace(/[ýÿ]/g,"y").replace(/[ß]/g,"ss").replace(/[œ]/g,"oe").replace(/[þ]/g,"th").replace(/[ẞ]/g,"SS").replace(/[Œ]/g,"OE").replace(/[Þ]/g,"TH")}var nn=Object.freeze({__proto__:null,url_decode:Kr,url_encode:Gr,cgi_escape:Xr,uri_escape:en,slugify:sn}),on=pt(function(t,e){let s=L(t),i=k(e)?" ":h(e),r=s.length*(1+i.length);return this.context.memoryLimit.use(r),s.join(i)}),an=pt(t=>Ps(t)?xi(t):""),ln=pt(t=>Ps(t)?t[0]:""),cn=pt(function(t){let e=L(t);return this.context.memoryLimit.use(e.length),[...e].reverse()});function*si(t,e,s){let i=[],r=L(t);this.context.memoryLimit.use(r.length);for(let n of r)i.push([n,e?yield this.context._getFromScope(n,h(e).split("."),!1):n]);return i.sort((n,o)=>s(n[1],o[1])).map(n=>n[0])}function*hn(t,e){return yield*si.call(this,t,e,Fi)}function*un(t,e){return yield*si.call(this,t,e,Oi)}var fn=t=>t&&t.length||0;function*dn(t,e){let s=[],i=L(t);this.context.memoryLimit.use(i.length);for(let r of i)s.push(yield this.context._getFromScope(r,h(e),!1));return s}function*pn(t,e){let s=0,i=L(t);for(let r of i){let n=Number(e?yield this.context._getFromScope(r,h(e),!1):r);s+=Number.isNaN(n)?0:n}return s}function gn(t){let e=L(t);return this.context.memoryLimit.use(e.length),e.filter(s=>!k(m(s)))}function ii(t,e=[]){let s=L(t),i=L(e);return this.context.memoryLimit.use(s.length+i.length),s.concat(i)}function mn(t,e){return ii.call(this,t,[e])}function yn(t,e){let s=L(t);this.context.memoryLimit.use(s.length);let i=[...s];return i.unshift(e),i}function wn(t){let e=[...L(t)];return e.pop(),e}function bn(t){let e=L(t);this.context.memoryLimit.use(e.length);let s=[...e];return s.shift(),s}function kn(t,e,s=1){return t=m(t),k(t)?[]:(S(t)||(t=h(t)),e=e<0?t.length+e:e,this.context.memoryLimit.use(s),t.slice(e,e+s))}function ri(t){return this.context.opts.jekyllWhere?e=>ae.is(t)?$(e,t):S(e)?er(e,t):$(e,t):t===void 0?e=>U(e,this.context):e=>$(e,t)}function*ni(t,e,s,i){let r=[];e=L(e),this.context.memoryLimit.use(e.length);let n=new z(h(s)).readScopeValue();for(let a of e)r.push(yield T(n,this.context.spawn(a)));let o=ri.call(this,i);return e.filter((a,c)=>o(r[c])===t)}function*oi(t,e,s,i){let r=[],n=new F(h(i),this.liquid),o=L(e);this.context.memoryLimit.use(o.length);for(let a of o){this.context.push({[s]:a});let c=yield n.value(this.context);this.context.pop(),c===t&&r.push(a)}return r}function*Tn(t,e,s){return yield*ni.call(this,!0,t,e,s)}function*xn(t,e,s){return yield*ni.call(this,!1,t,e,s)}function*Sn(t,e,s){return yield*oi.call(this,!0,t,e,s)}function*_n(t,e,s){return yield*oi.call(this,!1,t,e,s)}function*Ln(t,e){let s=new Map;t=ge(t);let i=new z(h(e)).readScopeValue();this.context.memoryLimit.use(t.length);for(let r of t){let n=yield T(i,this.context.spawn(r));s.has(n)||s.set(n,[]),s.get(n).push(r)}return[...s.entries()].map(([r,n])=>({name:r,items:n}))}function*Fn(t,e,s){let i=new Map,r=new F(h(s),this.liquid);t=ge(t),this.context.memoryLimit.use(t.length);for(let n of t){this.context.push({[e]:n});let o=yield r.value(this.context);this.context.pop(),i.has(o)||i.set(o,[]),i.get(o).push(n)}return[...i.entries()].map(([n,o])=>({name:n,items:o}))}function*es(t,e,s){let i=new z(h(e)).readScopeValue(),r=L(t),n=ri.call(this,s);for(let o=0;o<r.length;o++){let a=yield T(i,this.context.spawn(r[o]));if(n(a))return[o,r[o]]}}function*ts(t,e,s){let i=new F(h(s),this.liquid),r=L(t);for(let n=0;n<r.length;n++){this.context.push({[e]:r[n]});let o=yield i.value(this.context);if(this.context.pop(),o)return[n,r[n]]}}function*On(t,e,s){return!!(yield*es.call(this,t,e,s))}function*vn(t,e,s){return!!(yield*ts.call(this,t,e,s))}function*zn(t,e,s){let i=yield*es.call(this,t,e,s);return i?i[0]:void 0}function*Rn(t,e,s){let i=yield*ts.call(this,t,e,s);return i?i[0]:void 0}function*An(t,e,s){let i=yield*es.call(this,t,e,s);return i?i[1]:void 0}function*Nn(t,e,s){let i=yield*ts.call(this,t,e,s);return i?i[1]:void 0}function qn(t){return t=L(t),this.context.memoryLimit.use(t.length),[...new Set(t)]}function Mn(t,e=1){if(t=m(t),k(t))return[];S(t)||(t=h(t)),this.context.memoryLimit.use(e);let s=[...t].sort(()=>Math.random()-.5);return e===1?s[0]:s.slice(0,e)}var Dn=Object.freeze({__proto__:null,join:on,last:an,first:ln,reverse:cn,sort:hn,sort_natural:un,size:fn,map:dn,sum:pn,compact:gn,concat:ii,push:mn,unshift:yn,pop:wn,shift:bn,slice:kn,where:Tn,reject:xn,where_exp:Sn,reject_exp:_n,group_by:Ln,group_by_exp:Fn,has:On,has_exp:vn,find_index:zn,find_index_exp:Rn,find:An,find_exp:Nn,uniq:qn,sample:Mn});function ss(t,e,s){let i=(t?.length??0)+(s?.length??0);this.context.memoryLimit.use(i);let r=li(t,this.context.opts,s);return r?(e=m(e),e=k(e)?this.context.opts.dateFormat:h(e),this.context.memoryLimit.use(e.length),xe(r,e,this.context.memoryLimit)):t}function En(t){return ss.call(this,t,"%Y-%m-%dT%H:%M:%S%:z")}function Vn(t){return ss.call(this,t,"%a, %d %b %Y %H:%M:%S %z")}function Pn(t,e,s){return ai.call(this,t,"%b",e,s)}function Cn(t,e,s){return ai.call(this,t,"%B",e,s)}function ai(t,e,s,i){let r=li(t,this.context.opts);if(!r)return t;let n=this.context.memoryLimit;if(s==="ordinal"){let o=r.getDate();return i==="US"?xe(r,`${e} ${o}%q, %Y`,n):xe(r,`${o}%q ${e} %Y`,n)}return xe(r,`%d ${e} %Y`,n)}function li(t,e,s){let i,r=s??e.timezoneOffset,n=e.locale;if(t=m(t),!k(t))return t==="now"||t==="today"?i=new I(Date.now(),n,r):ft(t)?i=new I(t*1e3,n,r):d(t)?/^\d+$/.test(t)?i=new I(+t*1e3,n,r):e.preserveTimezones&&s===void 0?i=I.createDateFixedToTimezone(t,n):i=new I(t,n,r):i=new I(t,n,r),i.valid()?i:void 0}var $n=Object.freeze({__proto__:null,date:ss,date_to_xmlschema:En,date_to_rfc822:Vn,date_to_string:Pn,date_to_long_string:Cn}),Tt=/[\u4E00-\u9FFF\uF900-\uFAFF\u3400-\u4DBF\u3040-\u309F\u30A0-\u30FF\uAC00-\uD7AF]/gu,qs=/[^\u4E00-\u9FFF\uF900-\uFAFF\u3400-\u4DBF\u3040-\u309F\u30A0-\u30FF\uAC00-\uD7AF\s]+/gu;function jn(t,e){_(arguments.length===2,"append expect 2 arguments");let s=h(t),i=h(e);return this.context.memoryLimit.use(s.length+i.length),s+i}function In(t,e){_(arguments.length===2,"prepend expect 2 arguments");let s=h(t),i=h(e);return this.context.memoryLimit.use(s.length+i.length),i+s}function Bn(t,e){let s=h(t);if(this.context.memoryLimit.use(s.length),e){e=h(e),this.context.memoryLimit.use(e.length);for(let i=0,r=new Set(e);i<s.length;i++)if(!r.has(s[i]))return s.slice(i);return""}return s.trimStart()}function Un(t){let e=h(t);return this.context.memoryLimit.use(e.length),e.toLowerCase()}function Wn(t){let e=h(t);return this.context.memoryLimit.use(e.length),h(e).toUpperCase()}function Hn(t,e){let s=h(t);return e=h(e),this.context.memoryLimit.use(s.length+e.length),s.split(e).join("")}function Yn(t,e){let s=h(t);return e=h(e),this.context.memoryLimit.use(s.length+e.length),s.replace(e,"")}function Jn(t,e){let s=h(t),i=h(e);this.context.memoryLimit.use(s.length+i.length);let r=s.lastIndexOf(i);return r===-1?s:s.substring(0,r)+s.substring(r+i.length)}function Zn(t,e){if(t=h(t),this.context.memoryLimit.use(t.length),e){e=h(e),this.context.memoryLimit.use(e.length);for(let s=t.length-1,i=new Set(e);s>=0;s--)if(!i.has(t[s]))return t.slice(0,s+1);return""}return t.trimEnd()}function Qn(t,e){let s=h(t);this.context.memoryLimit.use(s.length);let i=s.split(h(e));for(;i.length&&i[i.length-1]==="";)i.pop();return i}function Kn(t,e){let s=h(t);if(this.context.memoryLimit.use(s.length),e){let i=new Set(h(e));this.context.memoryLimit.use(i.size);let r=0,n=s.length-1;for(;i.has(s[r]);)r++;for(;n>=r&&i.has(s[n]);)n--;return s.slice(r,n+1)}return s.trim()}function Gn(t){let e=h(t);return this.context.memoryLimit.use(e.length),e.replace(/\r?\n/gm,"")}function Xn(t){return t=h(t),this.context.memoryLimit.use(t.length),t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()}function eo(t,e,s){let i=h(t);e=h(e),s=h(s);let r=i.split(e),n=i.length+(r.length-1)*(s.length-e.length);return this.context.memoryLimit.use(n),r.join(s)}function to(t,e,s){let i=h(t);return e=h(e),s=h(s),this.context.memoryLimit.use(i.length+e.length+s.length),i.replace(e,()=>s)}function so(t,e,s){let i=h(t),r=h(e),n=h(s);this.context.memoryLimit.use(i.length+r.length+n.length);let o=i.lastIndexOf(r);return o===-1?i:i.substring(0,o)+n+i.substring(o+r.length)}function io(t,e=50,s="..."){let i=h(t);return s=h(s),this.context.memoryLimit.use(i.length+s.length),i.length<=e?t:i.substring(0,e-s.length)+s}function ro(t,e=15,s="..."){let i=h(t);s=h(s),this.context.memoryLimit.use(i.length+s.length);let r=i.split(/\s+/);e<=0&&(e=1);let n=r.slice(0,e).join(" ");return r.length>=e&&(n+=s),n}function no(t){let e=h(t);return this.context.memoryLimit.use(e.length),e.replace(/\s+/g," ")}function oo(t,e){let s=h(t);if(this.context.memoryLimit.use(s.length),t=s.trim(),!t)return 0;switch(e){case"cjk":return(t.match(Tt)||[]).length+(t.match(qs)||[]).length;case"auto":return Tt.test(t)?t.match(Tt).length+(t.match(qs)||[]).length:t.split(/\s+/).length;default:return t.split(/\s+/).length}}function ao(t,e="and"){switch(e=h(e),this.context.memoryLimit.use(t.length+e.length),t.length){case 0:return"";case 1:return t[0];case 2:return`${t[0]} ${e} ${t[1]}`;default:return`${t.slice(0,-1).join(", ")}, ${e} ${t[t.length-1]}`}}var lo=Object.freeze({__proto__:null,append:jn,prepend:In,lstrip:Bn,downcase:Un,upcase:Wn,remove:Hn,remove_first:Yn,remove_last:Jn,rstrip:Zn,split:Qn,strip:Kn,strip_newlines:Gn,capitalize:Xn,replace:eo,replace_first:to,replace_last:so,truncate:io,truncatewords:ro,normalize_whitespace:no,number_of_words:oo,array_to_sentence_string:ao});function co(t){return Buffer.from(t,"utf8").toString("base64")}function ho(t){return Buffer.from(t,"base64").toString("utf8")}function uo(t){if(typeof Buffer<"u"&&Buffer.isBuffer(t))return this.context.memoryLimit.use(t.byteLength),t.toString("base64");let e=h(t);return this.context.memoryLimit.use(e.length),co(e)}function fo(t){let e=h(t);return this.context.memoryLimit.use(e.length),ho(e)}var po=Object.freeze({__proto__:null,base64_encode:uo,base64_decode:fo});function go(t){return Es.createHash("sha256").update(t,"utf8").digest("hex")}function mo(t,e){return Es.createHmac("sha256",e).update(t,"utf8").digest("hex")}function yo(t){let e=h(t);return this.context.memoryLimit.use(e.length),go(e)}function wo(t,e){let s=h(t),i=h(e);return this.context.memoryLimit.use(s.length+i.length),mo(s,i)}var bo=Object.freeze({__proto__:null,sha256:yo,hmac_sha256:wo}),ci={...Lr,...Qr,...nn,...Dn,...$n,...lo,...po,...bo,...Qs},We=class extends b{constructor(e,s,i){super(e,s,i),this.identifier=this.tokenizer.readIdentifier(),this.key=this.identifier.content,this.tokenizer.assert(this.key,"expected variable name"),this.tokenizer.skipBlank(),this.tokenizer.assert(this.tokenizer.peek()==="=",'expected "="'),this.tokenizer.advance(),this.value=new F(this.tokenizer.readFilteredValue(),this.liquid)}*render(e){e.bottom()[this.key]=yield this.value.value(e,this.liquid.options.lenientIf)}*arguments(){yield this.value}*localScope(){yield this.identifier}},Ms=["offset","limit","reversed"],He=class extends b{constructor(e,s,i,r){super(e,s,i);let n=this.tokenizer.readIdentifier(),o=this.tokenizer.readIdentifier(),a=this.tokenizer.readValue();if(!n.size()||o.content!=="in"||!a)throw new Error(`illegal tag: ${e.getText()}`);this.variable=n.content,this.collection=a,this.hash=new j(this.tokenizer,i.options.keyValueSeparator),this.templates=[],this.elseTemplates=[];let c,f=r.parseStream(s).on("start",()=>c=this.templates).on("tag:else",u=>{Ae(u.args),c=this.elseTemplates}).on("tag:endfor",u=>{Ae(u.args),f.stop()}).on("template",u=>c.push(u)).on("end",()=>{throw new Error(`tag ${e.getText()} not closed`)});f.start()}*render(e,s){let i=this.liquid.renderer,r=ge(yield T(this.collection,e));if(!r.length){yield i.renderTemplates(this.elseTemplates,e,s);return}let n="continue-"+this.variable+"-"+this.collection.getText();e.push(Y({continue:e.getRegister(n,{})}));let o=yield this.hash.render(e);e.pop(),r=(this.liquid.options.orderedFilterParameters?Object.keys(o).filter(f=>Ms.includes(f)):Ms.filter(f=>o[f]!==void 0)).reduce((f,u)=>u==="offset"?To(f,o.offset):u==="limit"?xo(f,o.limit):ko(f),r),e.setRegister(n,(o.offset||0)+r.length);let c=Y({forloop:new le(r.length,this.collection.getText(),this.variable)});e.push(c);for(let f of r){if(c[this.variable]=f,e.continueCalled=e.breakCalled=!1,yield i.renderTemplates(this.templates,e,s),e.breakCalled)break;c.forloop.next()}e.continueCalled=e.breakCalled=!1,e.pop()}*children(){let e=this.templates.slice();return this.elseTemplates&&e.push(...this.elseTemplates),e}*arguments(){yield this.collection;for(let e of Object.values(this.hash.hash))v(e)&&(yield e)}blockScope(){return[this.variable,"forloop"]}};function ko(t){return[...t].reverse()}function To(t,e){return t.slice(e)}function xo(t,e){return t.slice(0,e)}var Ye=class extends b{constructor(e,s,i,r){for(super(e,s,i),this.templates=[],this.identifier=this.readVariable(),this.variable=this.identifier.content;s.length;){let n=s.shift();if(J(n)&&n.name==="endcapture")return;this.templates.push(r.parseToken(n,s))}throw new Error(`tag ${e.getText()} not closed`)}readVariable(){let e=this.tokenizer.readIdentifier();if(e.content||(e=this.tokenizer.readQuoted(),e))return e;throw this.tokenizer.error("invalid capture name")}*render(e){let i=yield this.liquid.renderer.renderTemplates(this.templates,e);e.bottom()[this.variable]=i}*children(){return this.templates}*localScope(){yield this.identifier}},Je=class extends b{constructor(e,s,i,r){super(e,s,i),this.branches=[],this.elseTemplates=[],this.value=new F(this.tokenizer.readFilteredValue(),this.liquid),this.elseTemplates=[];let n=[],o=0,a=r.parseStream(s).on("tag:when",c=>{if(o>0)return;n=[];let f=[];for(;!c.tokenizer.end();)f.push(c.tokenizer.readValueOrThrow()),c.tokenizer.skipBlank(),c.tokenizer.peek()===","?c.tokenizer.readTo(","):c.tokenizer.readTo("or");this.branches.push({values:f,templates:n})}).on("tag:else",()=>{o++,n=this.elseTemplates}).on("tag:endcase",()=>a.stop()).on("template",c=>{(n!==this.elseTemplates||o===1)&&n.push(c)}).on("end",()=>{throw new Error(`tag ${e.getText()} not closed`)});a.start()}*render(e,s){let i=this.liquid.renderer,r=m(yield this.value.value(e,e.opts.lenientIf)),n=!1;for(let o of this.branches)for(let a of o.values){let c=yield T(a,e,e.opts.lenientIf);if($(r,c)){yield i.renderTemplates(o.templates,e,s),n=!0;break}}n||(yield i.renderTemplates(this.elseTemplates,e,s))}*arguments(){yield this.value,yield*this.branches.flatMap(e=>e.values)}*children(){let e=this.branches.flatMap(s=>s.templates);return this.elseTemplates&&e.push(...this.elseTemplates),e}},Ze=class extends b{constructor(e,s,i){for(super(e,s,i);s.length;){let r=s.shift();if(J(r)&&r.name==="endcomment")return}throw new Error(`tag ${e.getText()} not closed`)}render(){}},Qe=class extends b{constructor(e,s,i,r){super(e,s,i);let n=this.tokenizer;for(this.file=is(n,this.liquid,r),this.currentFile=e.file;!n.end();){n.skipBlank();let o=n.p,a=n.readIdentifier();if((a.content==="with"||a.content==="for")&&(n.skipBlank(),n.peek()!==":")){let c=n.readValue();if(c){let f=n.p,u=n.readIdentifier(),p;u.content==="as"?p=n.readIdentifier():n.p=f,this[a.content]={value:c,alias:p&&p.content},n.skipBlank(),n.peek()===","&&n.advance();continue}}n.p=o;break}this.hash=new j(n,i.options.keyValueSeparator)}*render(e,s){let{liquid:i,hash:r}=this,n=yield rs(this.file,e,i);_(n,()=>`illegal file path "${n}"`);let o=e.spawn(),a=o.bottom();if(Ue(a,yield r.render(e)),this.with){let{value:c,alias:f}=this.with;a[f||n]=yield T(c,e)}if(this.for){let{value:c,alias:f}=this.for,u=ge(yield T(c,e));a.forloop=new le(u.length,c.getText(),f);for(let p of u){a[f]=p;let g=yield i._parsePartialFile(n,o.sync,this.currentFile);yield i.renderer.renderTemplates(g,o,s),a.forloop.next()}}else{let c=yield i._parsePartialFile(n,o.sync,this.currentFile);yield i.renderer.renderTemplates(c,o,s)}}*children(e,s){return e&&d(this.file)?yield this.liquid._parsePartialFile(this.file,s,this.currentFile):[]}partialScope(){if(d(this.file)){let e=Object.keys(this.hash.hash);if(this.with){let{value:s,alias:i}=this.with;d(i)?e.push([i,s]):d(this.file)&&e.push([this.file,s])}if(this.for){let{value:s,alias:i}=this.for;d(i)?e.push([i,s]):d(this.file)&&e.push([this.file,s])}return{name:this.file,isolated:!0,scope:e}}}*arguments(){for(let e of Object.values(this.hash.hash))v(e)&&(yield e);if(this.with){let{value:e}=this.with;v(e)&&(yield e)}if(this.for){let{value:e}=this.for;v(e)&&(yield e)}}};function is(t,e,s){if(e.options.dynamicPartials){let n=t.readValue();if(t.assert(n,"illegal file path"),n.getText()==="none")return;if(Be(n)){let o=s.parse(Js(n));return Ds(o)}return n}let i=[...t.readFileNameTemplate(e.options)],r=Ds(s.parseTokens(i));return r==="none"?void 0:r}function Ds(t){return t.length===1&&mt(t[0].token)?t[0].token.getContent():t}function*rs(t,e,s){return typeof t=="string"?t:Array.isArray(t)?s.renderer.renderTemplates(t,e):yield T(t,e)}var Ke=class extends b{constructor(e,s,i,r){super(e,s,i);let{tokenizer:n}=e;this.file=is(n,this.liquid,r),this.currentFile=e.file;let o=n.p;n.readIdentifier().content==="with"?(n.skipBlank(),n.peek()!==":"?this.withVar=n.readValue():n.p=o):n.p=o,this.hash=new j(n,i.options.jekyllInclude||i.options.keyValueSeparator)}*render(e,s){let{liquid:i,hash:r,withVar:n}=this,{renderer:o}=i,a=yield rs(this.file,e,i);_(a,()=>`illegal file path "${a}"`);let c=e.saveRegister("blocks","blockMode");e.setRegister("blocks",{}),e.setRegister("blockMode",K.OUTPUT);let f=Y(yield r.render(e));n&&(f[a]=yield T(n,e));let u=yield i._parsePartialFile(a,e.sync,this.currentFile);e.push(e.opts.jekyllInclude?Y({include:f}):f),yield o.renderTemplates(u,e,s),e.pop(),e.restoreRegister(c)}*children(e,s){return e&&d(this.file)?yield this.liquid._parsePartialFile(this.file,s,this.currentFile):[]}partialScope(){if(d(this.file)){let e;return this.liquid.options.jekyllInclude?e=["include"]:(e=Object.keys(this.hash.hash),this.withVar&&e.push([this.file,this.withVar])),{name:this.file,isolated:!1,scope:e}}}*arguments(){yield*Object.values(this.hash.hash).filter(v),v(this.file)&&(yield this.file),v(this.withVar)&&(yield this.withVar)}},Ge=class extends b{constructor(e,s,i){super(e,s,i),this.identifier=this.tokenizer.readIdentifier(),this.variable=this.identifier.content}render(e,s){let i=e.environments;ft(i[this.variable])||(i[this.variable]=0),s.write(h(--i[this.variable]))}*localScope(){yield this.identifier}},Xe=class extends b{constructor(e,s,i){super(e,s,i),this.candidates=[];let r=this.tokenizer.readValue();for(this.tokenizer.skipBlank(),r&&(this.tokenizer.peek()===":"?(this.group=r,this.tokenizer.advance()):this.candidates.push(r));!this.tokenizer.end();){let n=this.tokenizer.readValue();n&&this.candidates.push(n),this.tokenizer.readTo(",")}this.tokenizer.assert(this.candidates.length,()=>`empty candidates: "${e.getText()}"`)}*render(e,s){let r=`cycle:${yield T(this.group,e)}:`+this.candidates.join(","),n=e.getRegister("cycle",{}),o=n[r];o===void 0&&(o=n[r]=0);let a=this.candidates[o];return o=(o+1)%this.candidates.length,n[r]=o,yield T(a,e)}*arguments(){yield*this.candidates,this.group&&(yield this.group)}},et=class extends b{constructor(e,s,i,r){super(e,s,i),this.branches=[];let n=[];r.parseStream(s).on("start",()=>this.branches.push({value:new F(e.tokenizer.readFilteredValue(),this.liquid),templates:n=[]})).on("tag:elsif",o=>{_(!this.elseTemplates,"unexpected elsif after else"),this.branches.push({value:new F(o.tokenizer.readFilteredValue(),this.liquid),templates:n=[]})}).on("tag:else",o=>{Ae(o.args),_(!this.elseTemplates,"duplicated else"),n=this.elseTemplates=[]}).on("tag:endif",function(o){Ae(o.args),this.stop()}).on("template",o=>n.push(o)).on("end",()=>{throw new Error(`tag ${e.getText()} not closed`)}).start()}*render(e,s){let i=this.liquid.renderer;for(let{value:r,templates:n}of this.branches){let o=yield r.value(e,e.opts.lenientIf);if(U(o,e)){yield i.renderTemplates(n,e,s);return}}yield i.renderTemplates(this.elseTemplates||[],e,s)}*children(){let e=this.branches.flatMap(s=>s.templates);return this.elseTemplates&&e.push(...this.elseTemplates),e}arguments(){return this.branches.map(e=>e.value)}},tt=class extends b{constructor(e,s,i){super(e,s,i),this.identifier=this.tokenizer.readIdentifier(),this.variable=this.identifier.content}render(e,s){let i=e.environments;ft(i[this.variable])||(i[this.variable]=0);let r=i[this.variable];i[this.variable]++,s.write(h(r))}*localScope(){yield this.identifier}},st=class extends b{constructor(e,s,i,r){super(e,s,i),this.file=is(this.tokenizer,this.liquid,r),this.currentFile=e.file,this.args=new j(this.tokenizer,i.options.keyValueSeparator),this.templates=r.parseTokens(s)}*render(e,s){let{liquid:i,args:r,file:n}=this,{renderer:o}=i;if(n===void 0){e.setRegister("blockMode",K.OUTPUT),yield o.renderTemplates(this.templates,e,s);return}let a=yield rs(this.file,e,i);_(a,()=>`illegal file path "${a}"`);let c=yield i._parseLayoutFile(a,e.sync,this.currentFile);e.setRegister("blockMode",K.STORE);let f=yield o.renderTemplates(this.templates,e),u=e.getRegister("blocks",{});u[""]===void 0&&(u[""]=(p,g)=>g.write(f)),e.setRegister("blockMode",K.OUTPUT),e.push(Y(yield r.render(e))),yield o.renderTemplates(c,e,s),e.pop()}*children(e){let s=this.templates.slice();return e&&d(this.file)&&s.push(...yield this.liquid._parsePartialFile(this.file,!0,this.currentFile)),s}*arguments(){for(let e of Object.values(this.args.hash))v(e)&&(yield e);v(this.file)&&(yield this.file)}partialScope(){if(d(this.file))return{name:this.file,isolated:!1,scope:Object.keys(this.args.hash)}}},it=class extends b{constructor(e,s,i,r){super(e,s,i),this.templates=[];let n=/\w+/.exec(e.args);for(this.block=n?n[0]:"";s.length;){let o=s.shift();if(J(o)&&o.name==="endblock")return;let a=r.parseToken(o,s);this.templates.push(a)}throw new Error(`tag ${e.getText()} not closed`)}*render(e,s){let i=this.getBlockRender(e);e.getRegister("blockMode")===K.STORE?e.getRegister("blocks",{})[this.block]=i:yield i(new qe,s)}getBlockRender(e){let s=this,{liquid:i,templates:r}=this,n=e.getRegister("blocks",{})[this.block],o=function*(a,c){let f=e.getRegister("blockStack",[]);if(f.includes(s))throw new Error("block tag cannot be nested");f.push(s),e.push(Y({block:a})),yield i.renderer.renderTemplates(r,e,c),e.pop(),f.pop()};return n?(a,c)=>n(new qe(f=>o(a,f)),c):o}*children(){return this.templates}blockScope(){return["block"]}},rt=class extends b{constructor(e,s,i){for(super(e,s,i),this.tokens=[];s.length;){let r=s.shift();if(J(r)&&r.name==="endraw")return;this.tokens.push(r)}throw new Error(`tag ${e.getText()} not closed`)}render(){return this.tokens.map(e=>e.getText()).join("")}},Jt=class extends le{constructor(e,s,i,r){super(e,i,r),this.length=e,this.cols=s}row(){return Math.floor(this.i/this.cols)+1}col0(){return this.i%this.cols}col(){return this.col0()+1}col_first(){return this.col0()===0}col_last(){return this.col()===this.cols}},nt=class extends b{constructor(e,s,i,r){super(e,s,i);let n=this.tokenizer.readIdentifier();this.tokenizer.skipBlank();let o=this.tokenizer.readIdentifier(),a=this.tokenizer.readValue();if(o.content!=="in"||!a)throw new Error(`illegal tag: ${e.getText()}`);this.variable=n.content,this.collection=a,this.args=new j(this.tokenizer,i.options.keyValueSeparator),this.templates=[];let c,f=r.parseStream(s).on("start",()=>c=this.templates).on("tag:endtablerow",()=>f.stop()).on("template",u=>c.push(u)).on("end",()=>{throw new Error(`tag ${e.getText()} not closed`)});f.start()}*render(e,s){let i=ge(yield T(this.collection,e)),r=yield this.args.render(e),n=r.offset||0,o=r.limit===void 0?i.length:r.limit;i=i.slice(n,n+o);let a=r.cols||i.length,c=this.liquid.renderer,f=new Jt(i.length,a,this.collection.getText(),this.variable),u=Y({tablerowloop:f});e.push(u);for(let p=0;p<i.length;p++,f.next())u[this.variable]=i[p],f.col0()===0&&(f.row()!==1&&s.write("</tr>"),s.write(`<tr class="row${f.row()}">`)),s.write(`<td class="col${f.col()}">`),yield c.renderTemplates(this.templates,e,s),s.write("</td>");i.length&&s.write("</tr>"),e.pop()}*children(){return this.templates}*arguments(){yield this.collection;for(let e of Object.values(this.args.hash))v(e)&&(yield e)}blockScope(){return[this.variable,"tablerowloop"]}},ot=class extends b{constructor(e,s,i,r){super(e,s,i),this.branches=[],this.elseTemplates=[];let n=[],o=0;r.parseStream(s).on("start",()=>this.branches.push({value:new F(e.tokenizer.readFilteredValue(),this.liquid),test:me,templates:n=[]})).on("tag:elsif",a=>{if(o>0){n=[];return}this.branches.push({value:new F(a.tokenizer.readFilteredValue(),this.liquid),test:U,templates:n=[]})}).on("tag:else",()=>{o++,n=this.elseTemplates}).on("tag:endunless",function(){this.stop()}).on("template",a=>{(n!==this.elseTemplates||o===1)&&n.push(a)}).on("end",()=>{throw new Error(`tag ${e.getText()} not closed`)}).start()}*render(e,s){let i=this.liquid.renderer;for(let{value:r,test:n,templates:o}of this.branches){let a=yield r.value(e,e.opts.lenientIf);if(n(a,e)){yield i.renderTemplates(o,e,s);return}}yield i.renderTemplates(this.elseTemplates,e,s)}*children(){let e=this.branches.flatMap(s=>s.templates);return this.elseTemplates&&e.push(...this.elseTemplates),e}arguments(){return this.branches.map(e=>e.value)}},at=class extends b{render(e,s){e.breakCalled=!0}},lt=class extends b{render(e,s){e.continueCalled=!0}},ct=class extends b{constructor(e,s,i){super(e,s,i),this.tokenizer.skipBlank(),this.tokenizer.end()||(this.value=new F(this.tokenizer.readFilteredValue(),this.liquid))}*render(e,s){if(!this.value)return;let i=yield this.value.value(e,!1);s.write(i)}*arguments(){this.value&&(yield this.value)}},ht=class extends b{constructor(e,s,i,r){super(e,s,i);let n=this.tokenizer.readLiquidTagTokens(this.liquid.options);this.templates=r.parseTokens(n)}*render(e,s){yield this.liquid.renderer.renderTemplates(this.templates,e,s)}*children(){return this.templates}},ut=class extends b{constructor(e,s,i){if(super(e,s,i),e.args.search(/\n\s*[^#\s]/g)!==-1)throw new Error("every line of an inline comment must start with a '#' character")}render(){}},hi={assign:We,for:He,capture:Ye,case:Je,comment:Ze,include:Ke,render:Qe,decrement:Ge,increment:tt,cycle:Xe,if:et,layout:st,block:it,raw:rt,tablerow:nt,unless:ot,break:at,continue:lt,echo:ct,liquid:ht,"#":ut},Zt=class t{constructor(e={}){this.renderer=new jt,this.filters=Object.create(null),this.tags=Object.create(null),this.options=Fr(e),this.parser=new N(this),ws(hi,(s,i)=>this.registerTag(i,s)),ws(ci,(s,i)=>this.registerFilter(i,s))}parse(e,s){return new N(this).parse(e,s)}_render(e,s,i){let r=s instanceof B?s:new B(s,this.options,i);return this.renderer.renderTemplates(e,r)}async render(e,s,i){return q(this._render(e,s,{...i,sync:!1}))}renderSync(e,s,i){return M(this._render(e,s,{...i,sync:!0}))}renderToNodeStream(e,s,i={}){let r=new B(s,this.options,i);return this.renderer.renderTemplatesToNodeStream(e,r)}_parseAndRender(e,s,i){let r=this.parse(e);return this._render(r,s,i)}async parseAndRender(e,s,i){return q(this._parseAndRender(e,s,{...i,sync:!1}))}parseAndRenderSync(e,s,i){return M(this._parseAndRender(e,s,{...i,sync:!0}))}_parsePartialFile(e,s,i){return new N(this).parseFile(e,s,l.LookupType.Partials,i)}_parseLayoutFile(e,s,i){return new N(this).parseFile(e,s,l.LookupType.Layouts,i)}_parseFile(e,s,i,r){return new N(this).parseFile(e,s,i,r)}async parseFile(e,s){return q(new N(this).parseFile(e,!1,s))}parseFileSync(e,s){return M(new N(this).parseFile(e,!0,s))}*_renderFile(e,s,i){let r=yield this._parseFile(e,i.sync,i.lookupType);return yield this._render(r,s,i)}async renderFile(e,s,i){return q(this._renderFile(e,s,{...i,sync:!1}))}renderFileSync(e,s,i){return M(this._renderFile(e,s,{...i,sync:!0}))}async renderFileToNodeStream(e,s,i){let r=await this.parseFile(e);return this.renderToNodeStream(r,s,i)}_evalValue(e,s){let i=new F(e,this),r=s instanceof B?s:new B(s,this.options);return i.value(r)}async evalValue(e,s){return q(this._evalValue(e,s))}evalValueSync(e,s){return M(this._evalValue(e,s))}registerFilter(e,s){this.filters[e]=s}registerTag(e,s){this.tags[e]=x(s)?s:Ar(s)}plugin(e){return e.call(this,t)}express(){let e=this,s=!0;return function(i,r,n){if(s){s=!1;let o=Se(this.root);e.options.root.unshift(...o),e.options.layouts.unshift(...o),e.options.partials.unshift(...o)}e.renderFile(i,r).then(o=>n(null,o),n)}}async analyze(e,s={}){return P(e,s)}analyzeSync(e,s={}){return C(e,s)}async parseAndAnalyze(e,s,i={}){return P(this.parse(e,s),i)}parseAndAnalyzeSync(e,s,i={}){return C(this.parse(e,s),i)}async variables(e,s={}){let i=await P(d(e)?this.parse(e):e,s);return Object.keys(i.variables)}variablesSync(e,s={}){let i=C(d(e)?this.parse(e):e,s);return Object.keys(i.variables)}async fullVariables(e,s={}){let i=await P(d(e)?this.parse(e):e,s);return Array.from(new Set(Object.values(i.variables).flatMap(r=>r.map(n=>String(n)))))}fullVariablesSync(e,s={}){let i=C(d(e)?this.parse(e):e,s);return Array.from(new Set(Object.values(i.variables).flatMap(r=>r.map(n=>String(n)))))}async variableSegments(e,s={}){let i=await P(d(e)?this.parse(e):e,s);return Array.from(ke(Object.values(i.variables).flatMap(r=>r.map(n=>n.toArray()))))}variableSegmentsSync(e,s={}){let i=C(d(e)?this.parse(e):e,s);return Array.from(ke(Object.values(i.variables).flatMap(r=>r.map(n=>n.toArray()))))}async globalVariables(e,s={}){let i=await P(d(e)?this.parse(e):e,s);return Object.keys(i.globals)}globalVariablesSync(e,s={}){let i=C(d(e)?this.parse(e):e,s);return Object.keys(i.globals)}async globalFullVariables(e,s={}){let i=await P(d(e)?this.parse(e):e,s);return Array.from(new Set(Object.values(i.globals).flatMap(r=>r.map(n=>String(n)))))}globalFullVariablesSync(e,s={}){let i=C(d(e)?this.parse(e):e,s);return Array.from(new Set(Object.values(i.globals).flatMap(r=>r.map(n=>String(n)))))}async globalVariableSegments(e,s={}){let i=await P(d(e)?this.parse(e):e,s);return Array.from(ke(Object.values(i.globals).flatMap(r=>r.map(n=>n.toArray()))))}globalVariableSegmentsSync(e,s={}){let i=C(d(e)?this.parse(e):e,s);return Array.from(ke(Object.values(i.globals).flatMap(r=>r.map(n=>n.toArray()))))}},So="10.27.0";l.AssertionError=Re;l.AssignTag=We;l.BlockTag=it;l.BreakTag=at;l.CaptureTag=Ye;l.CaseTag=Je;l.CommentTag=Ze;l.Context=B;l.ContinueTag=lt;l.CycleTag=Xe;l.DecrementTag=Ge;l.Drop=D;l.EchoTag=ct;l.Expression=Ve;l.Filter=de;l.ForTag=He;l.Hash=j;l.IfTag=et;l.IncludeTag=Ke;l.IncrementTag=tt;l.InlineCommentTag=ut;l.LayoutTag=st;l.Liquid=Zt;l.LiquidError=E;l.LiquidTag=ht;l.Output=$e;l.ParseError=Fe;l.ParseStream=Ce;l.Parser=N;l.RawTag=rt;l.RenderError=Oe;l.RenderTag=Qe;l.TablerowTag=nt;l.Tag=b;l.TagToken=ue;l.Token=O;l.TokenizationError=Le;l.Tokenizer=z;l.TypeGuards=Mr;l.UndefinedVariableError=ze;l.UnlessTag=ot;l.Value=F;l.Variable=H;l.analyze=P;l.analyzeSync=C;l.assert=_;l.createTrie=vt;l.defaultOperators=Zs;l.defaultOptions=Q;l.evalQuotedToken=Js;l.evalToken=T;l.filters=ci;l.isFalsy=me;l.isTruthy=U;l.tags=hi;l.toPromise=q;l.toValue=m;l.toValueSync=M;l.version=So});ye();var di=mi(ui(),1);function fi(t,e){let s=new di.Liquid;return s.render(s.parse(t),e)}async function Ao(t,e,s){ms(gs`Copying template from directory ${kt.path(t)} to ${kt.path(e)}`);let i=await ds(we(t,"**/*"),{dot:!0}),r=we(t,".cli-liquid-bypass"),n=[];await fs(r)&&(n=(await wt(r)).split(`
|
|
14
|
+
`," ",s],r=new Set(i);for(;this.p<this.N&&!r.has(this.peek());)yield this.match(s)?this.readOutputToken(e):this.readHTMLToken(i)}match(e){for(let s=0;s<e.length;s++)if(e[s]!==this.input[this.p+s])return!1;return!0}rmatch(e){for(let s=0;s<e.length;s++)if(e[e.length-1-s]!==this.input[this.p-1-s])return!1;return!0}peekType(e=0){return this.p+e>=this.N?0:w[this.input.charCodeAt(this.p+e)]}peek(e=0){return this.p+e>=this.N?"":this.input[this.p+e]}skipBlank(){for(;this.peekType()&te;)++this.p}},Ce=class{constructor(e,s){this.handlers={},this.stopRequested=!1,this.tokens=e,this.parseToken=s}on(e,s){return this.handlers[e]=s,this}trigger(e,s){let i=this.handlers[e];return i?(i.call(this,s),!0):!1}start(){this.trigger("start");let e;for(;!this.stopRequested&&(e=this.tokens.shift());){if(this.trigger("token",e)||J(e)&&this.trigger(`tag:${e.name}`,e))continue;let s=this.parseToken(e,this.tokens);this.trigger("template",s)}return this.stopRequested||this.trigger("end"),this}stop(){return this.stopRequested=!0,this}},fe=class{constructor(e){this.token=e}},b=class extends fe{constructor(e,s,i){super(e),this.name=e.name,this.liquid=i,this.tokenizer=e.tokenizer}},j=class{constructor(e,s){this.hash={};let i=e instanceof z?e:new z(e,{});for(let r of i.readHashes(s))this.hash[r.name.content]=r.value}*render(e){let s={};for(let i of Object.keys(this.hash))s[i]=this.hash[i]===void 0?!0:yield T(this.hash[i],e);return s}};function Ar(t){return class extends b{constructor(e,s,i){super(e,s,i),x(t.parse)&&t.parse.call(this,e,s)}*render(e,s){let i=yield new j(this.token.args,e.opts.keyValueSeparator).render(e);return yield t.render.call(this,e,s,i)}}}function Ks(t){return S(t)}var de=class{constructor(e,s,i){this.token=e,this.name=e.name,this.handler=x(s)?s:x(s?.handler)?s.handler:js,this.raw=!x(s)&&!!s?.raw,this.args=e.args,this.liquid=i}*render(e,s){let i=[];for(let r of this.args)Ks(r)?i.push([r[0],yield T(r[1],s)]):i.push(yield T(r,s));return yield this.handler.apply({context:s,token:this.token,liquid:this.liquid},[e,...i])}},F=class{constructor(e,s){this.filters=[];let i=typeof e=="string"?new z(e,s.options.operators).readFilteredValue():e;this.initial=i.initial,this.filters=i.filters.map(r=>new de(r,this.getFilter(s,r.name),s))}*value(e,s){s=s||e.opts.lenientIf&&this.filters.length>0&&this.filters[0].name==="default";let i=yield this.initial.evaluate(e,s);for(let r of this.filters)i=yield r.render(i,e);return i}getFilter(e,s){let i=e.filters[s];return _(i||!e.options.strictFilters,()=>`undefined filter: ${s}`),i}},$e=class extends fe{constructor(e,s){super(e);let i=new z(e.input,s.options.operators,e.file,e.contentRange);this.value=new F(i.readFilteredValue(),s);let r=this.value.filters,n=s.options.outputEscape;if(!r[r.length-1]?.raw&&n){let o=new Ee(toString.call(n),[],"",0,0);r.push(new de(o,n,s))}}*render(e,s){let i=yield this.value.value(e,!1);s.write(i)}*arguments(){yield this.value}},Bt=class extends fe{constructor(e){super(e),this.str=e.getContent()}*render(e,s){s.write(this.str)}},H=class t{constructor(e,s){this.segments=e,this.location=s}toString(){return Ie(this.segments,!0)}toArray(){function*e(...s){for(let i of s)i instanceof t?yield Array.from(e(...i.segments)):yield i}return Array.from(e(...this.segments))}},ne=class{constructor(){this.map=new Map}get(e){let s=Ie([e.segments[0]]);return this.map.has(s)||this.map.set(s,[]),this.map.get(s)}has(e){return this.map.has(Ie([e.segments[0]]))}push(e){this.get(e).push(e)}asObject(){return Object.fromEntries(this.map)}},Gs={partials:!0};function*Xs(t,e,s){let i=new ne,r=new ne,n=new ne,o=new je(new Set),a=new Set;function c(u,p){i.push(u);let g=p.alias(u);if(g!==void 0){let y=g.segments[0];d(y)&&!o.has(y)&&r.push(g)}else{let y=u.segments[0];d(y)&&!p.has(y)&&r.push(u)}for(let y of u.segments)y instanceof H&&c(y,p)}function*f(u,p){if(u.arguments)for(let g of u.arguments())for(let y of Rs(g))c(y,p);if(u.localScope)for(let g of u.localScope()){p.add(g.content),p.deleteAlias(g.content);let[y,se]=g.getPosition();n.push(new H([g.content],{row:y,col:se,file:g.file}))}if(u.children)if(u.partialScope){let g=u.partialScope();if(g===void 0){for(let Z of yield u.children(e,s))yield f(Z,p);return}if(a.has(g.name))return;let y=new Set,se=g.isolated?new je(y):p.push(y);for(let Z of g.scope)if(d(Z))y.add(Z);else{let[ns,pi]=Z;y.add(ns);let os=Array.from(Rs(pi));os.length&&se.setAlias(ns,os[0].segments)}for(let Z of yield u.children(e,s))yield f(Z,se),a.add(g.name);se.pop()}else{u.blockScope&&p.push(new Set(u.blockScope()));for(let g of yield u.children(e,s))yield f(g,p);u.blockScope&&p.pop()}}for(let u of t)yield f(u,o);return{variables:i.asObject(),globals:r.asObject(),locals:n.asObject()}}function P(t,e={}){let s={...Gs,...e};return q(Xs(t,s.partials,!1))}function C(t,e={}){let s={...Gs,...e};return M(Xs(t,s.partials,!0))}var je=class{constructor(e){this.stack=[{names:e,aliases:new Map}]}has(e){for(let s of this.stack)if(s.names.has(e))return!0;return!1}push(e){return this.stack.push({names:e,aliases:new Map}),this}pop(){return this.stack.pop()?.names}add(e){this.stack[0].names.add(e)}alias(e){let s=e.segments[0];if(!d(s))return;let i=this.getAlias(s);if(i!==void 0)return new H([...i,...e.segments.slice(1)],e.location)}setAlias(e,s){this.stack[this.stack.length-1].aliases.set(e,s)}deleteAlias(e){this.stack[this.stack.length-1].aliases.delete(e)}getAlias(e){for(let s of this.stack){if(s.aliases.has(e))return s.aliases.get(e);if(s.names.has(e))return}}};function*Rs(t){v(t)?yield*ee(t):t instanceof F&&(yield*Nr(t))}function*Nr(t){for(let e of t.initial.postfix)v(e)&&(yield*ee(e));for(let e of t.filters)for(let s of e.args)Ks(s)&&s[1]?yield*ee(s[1]):v(s)&&(yield*ee(s))}function*ee(t){Xt(t)?(yield*ee(t.lhs),yield*ee(t.rhs)):pe(t)&&(yield Ut(t))}function Ut(t){let e=[],s=t.file,i=t.props[0];s=s||i.file,Be(i)||Ht(i)||Yt(i)?e.push(i.content):pe(i)&&e.push(...Ut(i).segments);for(let o of t.props.slice(1))s=s||o.file,Be(o)||Ht(o)||Yt(o)?e.push(o.content):pe(o)&&e.push(Ut(o));let[r,n]=t.getPosition();return new H(e,{row:r,col:n,file:s})}var As=/^[\u0080-\uFFFFa-zA-Z_][\u0080-\uFFFFa-zA-Z0-9_-]*$/;function Ie(t,e=!1){let s=[],i=t[0];d(i)&&(!e||i.match(As)?s.push(`${i}`):s.push(`['${i}']`));for(let r of t.slice(1))r instanceof H?s.push(`[${Ie(r.segments)}]`):d(r)?r.match(As)?s.push(`.${r}`):s.push(`['${r}']`):s.push(`[${r}]`);return s.join("")}(function(t){t.Partials="partials",t.Layouts="layouts",t.Root="root"})(l.LookupType||(l.LookupType={}));var Wt=class{constructor(e){if(this.options=e,e.relativeReference){let i=e.fs.sep;_(i,"`fs.sep` is required for relative reference");let r=["."+i,".."+i,"./","../"];this.shouldLoadRelative=n=>r.some(o=>n.startsWith(o))}else this.shouldLoadRelative=i=>!1;let s=e.fs;this.contains=zt(s.contains?.bind(s)||(async()=>!0),s.containsSync?.bind(s)||(()=>!0)),this.exists=zt(s.exists?.bind(s)||(async()=>!1),s.existsSync?.bind(s))}*lookup(e,s,i,r){let n=this.options[s];for(let o of this.candidates(e,n,r)){let a=!1;for(let c of n)if(yield this.contains(!!i,c,o)){a=!0;break}if(a&&(yield this.exists(!!i,o)))return o}throw this.lookupError(e,n)}*candidates(e,s,i){let{fs:r,extname:n}=this.options;this.shouldLoadRelative(e)&&i&&(yield r.resolve(this.dirname(i),e,n));for(let o of s)yield r.resolve(o,e,n);if(r.fallback!==void 0){let o=r.fallback(e);o!==void 0&&(yield o)}}dirname(e){let s=this.options.fs;return _(s.dirname,"`fs.dirname` is required for relative reference"),s.dirname(e)}lookupError(e,s){let i=new Error("ENOENT");return i.message=`ENOENT: Failed to lookup "${e}" in "${s}"`,i.code="ENOENT",i}},N=class{constructor(e){this.liquid=e,this.cache=this.liquid.options.cache,this.fs=this.liquid.options.fs,this.parseFile=this.cache?this._parseFileCached:this._parseFile,this.loader=new Wt(this.liquid.options),this.parseLimit=new ce("parse length",e.options.parseLimit),this.readFile=zt(this.fs.readFile?.bind(this.fs)||(async()=>{throw new Error("readFile not implemented")}),this.fs.readFileSync?.bind(this.fs))}parse(e,s){e=String(e),this.parseLimit.use(e.length);let r=new z(e,this.liquid.options.operators,s).readTopLevelTokens(this.liquid.options);return this.parseTokens(r)}parseTokens(e){let s,i=[],r=[];for(;s=e.shift();)try{i.push(this.parseToken(s,e))}catch(n){if(this.liquid.options.catchAllErrors)r.push(n);else throw n}if(r.length)throw new ve(r);return i}parseToken(e,s){try{if(J(e)){let i=this.liquid.tags[e.name];return _(i,`tag "${e.name}" not found`),new i(e,s,this.liquid,this)}return ti(e)?new $e(e,this.liquid):new Bt(e)}catch(i){throw E.is(i)?i:new Fe(i,e)}}parseStream(e){return new Ce(e,(s,i)=>this.parseToken(s,i))}*_parseFileCached(e,s,i=l.LookupType.Root,r){let n=this.cache,o=this.loader.shouldLoadRelative(e)?r+","+e:i+":"+e,a=yield n.read(o);if(a)return a;let c=this._parseFile(e,s,i,r),f=s?yield c:q(c);n.write(o,f);try{return yield f}catch(u){throw n.remove(o),u}}*_parseFile(e,s,i=l.LookupType.Root,r){let n=yield this.loader.lookup(e,i,s,r);return this.parse(yield this.readFile(!!s,n),n)}};(function(t){t[t.Number=1]="Number",t[t.Literal=2]="Literal",t[t.Tag=4]="Tag",t[t.Output=8]="Output",t[t.HTML=16]="HTML",t[t.Filter=32]="Filter",t[t.Hash=64]="Hash",t[t.PropertyAccess=128]="PropertyAccess",t[t.Word=256]="Word",t[t.Range=512]="Range",t[t.Quoted=1024]="Quoted",t[t.Operator=2048]="Operator",t[t.FilteredValue=4096]="FilteredValue",t[t.Delimited=12]="Delimited"})(l.TokenKind||(l.TokenKind={}));function ei(t){return!!(R(t)&l.TokenKind.Delimited)}function Gt(t){return R(t)===l.TokenKind.Operator}function mt(t){return R(t)===l.TokenKind.HTML}function ti(t){return R(t)===l.TokenKind.Output}function J(t){return R(t)===l.TokenKind.Tag}function Be(t){return R(t)===l.TokenKind.Quoted}function qr(t){return R(t)===l.TokenKind.Literal}function Ht(t){return R(t)===l.TokenKind.Number}function pe(t){return R(t)===l.TokenKind.PropertyAccess}function Yt(t){return R(t)===l.TokenKind.Word}function Xt(t){return R(t)===l.TokenKind.Range}function v(t){return(R(t)&1667)>0}function R(t){return t?t.kind:-1}var Mr=Object.freeze({__proto__:null,isDelimitedToken:ei,isOperatorToken:Gt,isHTMLToken:mt,isOutputToken:ti,isTagToken:J,isQuotedToken:Be,isLiteralToken:qr,isNumberToken:Ht,isPropertyAccessToken:pe,isWordToken:Yt,isRangeToken:Xt,isValueToken:v}),Ue=function(){return Ue=Object.assign||function(e){for(var s,i=1,r=arguments.length;i<r;i++){s=arguments[i];for(var n in s)Object.prototype.hasOwnProperty.call(s,n)&&(e[n]=s[n])}return e},Ue.apply(this,arguments)};function Y(t){let e=Object.create(null);return t&&Object.assign(e,t),e}var B=class t{constructor(e={},s=Q,i={},{memoryLimit:r,renderLimit:n}={}){this.scopes=[Y()],this.registers={},this.breakCalled=!1,this.continueCalled=!1,this.sync=!!i.sync,this.opts=s,this.globals=i.globals??s.globals,this.environments=dt(e)?e:Object(e),this.strictVariables=i.strictVariables??this.opts.strictVariables,this.ownPropertyOnly=i.ownPropertyOnly??s.ownPropertyOnly,this.memoryLimit=r??new ce("memory alloc",i.memoryLimit??s.memoryLimit),this.renderLimit=n??new ce("template render",$t().now()+(i.renderLimit??s.renderLimit))}getRegister(e,s=void 0){return this.registers[e]=this.registers[e]||s}setRegister(e,s){return this.registers[e]=s}saveRegister(...e){return e.map(s=>[s,this.getRegister(s)])}restoreRegister(e){return e.forEach(([s,i])=>this.setRegister(s,i))}getAll(){return[this.globals,this.environments,...this.scopes].reduce((e,s)=>Ue(e,s),{})}get(e){return this.getSync(e)}getSync(e){return M(this._get(e))}*_get(e){let s=this.findScope(e[0]);return yield this._getFromScope(s,e)}getFromScope(e,s){return M(this._getFromScope(e,s))}*_getFromScope(e,s,i=this.strictVariables){d(s)&&(s=s.split("."));for(let r=0;r<s.length;r++)if(e=yield this.readProperty(e,s[r]),i&&ki(e))throw new St(s.slice(0,r+1).join("."));return e}push(e){return this.scopes.push(e)}pop(){return this.scopes.pop()}bottom(){return this.scopes[0]}spawn(e={}){return new t(e,this.opts,{sync:this.sync,globals:this.globals,strictVariables:this.strictVariables,ownPropertyOnly:this.ownPropertyOnly},{renderLimit:this.renderLimit,memoryLimit:this.memoryLimit})}findScope(e){for(let s=this.scopes.length-1;s>=0;s--){let i=this.scopes[s];if(e in i)return i}return e in this.environments?this.environments:this.globals}readProperty(e,s){if(e=Vs(e),s=m(s),k(e))return e;if(S(e)&&s<0)return e[e.length+ +s];let i=Dr(e,s,this.ownPropertyOnly);return i===void 0&&e instanceof D?e.liquidMethodMissing(s,this):x(i)?i.call(e):s==="size"?Pr(e):s==="first"?Er(e):s==="last"?Vr(e):i}};function Dr(t,e,s){if(!(s&&!Qt.call(t,e)&&!(t instanceof D)))return t[e]}function Er(t){return S(t)?t[0]:t.first}function Vr(t){return S(t)?t[t.length-1]:t.last}function Pr(t){if(Qt.call(t,"size")||t.size!==void 0)return t.size;if(S(t)||d(t))return t.length;if(typeof t=="object")return Object.keys(t).length}var K;(function(t){t[t.OUTPUT=0]="OUTPUT",t[t.STORE=1]="STORE"})(K||(K={}));var Cr=V(Math.abs),$r=V(Math.max),jr=V(Math.min),Ir=V(Math.ceil),Br=V((t,e,s=!1)=>s?Math.floor(t/e):t/e),Ur=V(Math.floor),Wr=V((t,e)=>t-e),Hr=V((t,e)=>t+e),Yr=V((t,e)=>t%e),Jr=V((t,e)=>t*e);function Zr(t,e=0){t=xt(t),e=xt(e);let s=Math.pow(10,e),i=t*s;return Math.sign(t)*Math.round(Math.abs(i))/s}var Qr=Object.freeze({__proto__:null,abs:Cr,at_least:$r,at_most:jr,ceil:Ir,divided_by:Br,floor:Ur,minus:Wr,plus:Hr,modulo:Yr,times:Jr,round:Zr}),Kr=t=>decodeURIComponent(h(t)).replace(/\+/g," "),Gr=t=>encodeURIComponent(h(t)).replace(/%20/g,"+"),Xr=t=>encodeURIComponent(h(t)).replace(/%20/g,"+").replace(/[!'()*]/g,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase()),en=t=>encodeURI(h(t)).replace(/%5B/g,"[").replace(/%5D/g,"]"),Ns=/[^\p{M}\p{L}\p{Nd}]+/ug,tn={raw:/\s+/g,default:Ns,pretty:/[^\p{M}\p{L}\p{Nd}._~!$&'()+,;=@]+/ug,ascii:/[^A-Za-z0-9]+/g,latin:Ns,none:null};function sn(t,e="default",s=!1){t=h(t);let i=tn[e];return i&&(e==="latin"&&(t=rn(t)),t=t.replace(i,"-").replace(/^-|-$/g,"")),s?t:t.toLowerCase()}function rn(t){return t.replace(/[àáâãäå]/g,"a").replace(/[æ]/g,"ae").replace(/[ç]/g,"c").replace(/[èéêë]/g,"e").replace(/[ìíîï]/g,"i").replace(/[ð]/g,"d").replace(/[ñ]/g,"n").replace(/[òóôõöø]/g,"o").replace(/[ùúûü]/g,"u").replace(/[ýÿ]/g,"y").replace(/[ß]/g,"ss").replace(/[œ]/g,"oe").replace(/[þ]/g,"th").replace(/[ẞ]/g,"SS").replace(/[Œ]/g,"OE").replace(/[Þ]/g,"TH")}var nn=Object.freeze({__proto__:null,url_decode:Kr,url_encode:Gr,cgi_escape:Xr,uri_escape:en,slugify:sn}),on=pt(function(t,e){let s=L(t),i=k(e)?" ":h(e),r=s.length*(1+i.length);return this.context.memoryLimit.use(r),s.join(i)}),an=pt(t=>Ps(t)?xi(t):""),ln=pt(t=>Ps(t)?t[0]:""),cn=pt(function(t){let e=L(t);return this.context.memoryLimit.use(e.length),[...e].reverse()});function*si(t,e,s){let i=[],r=L(t);this.context.memoryLimit.use(r.length);for(let n of r)i.push([n,e?yield this.context._getFromScope(n,h(e).split("."),!1):n]);return i.sort((n,o)=>s(n[1],o[1])).map(n=>n[0])}function*hn(t,e){return yield*si.call(this,t,e,Fi)}function*un(t,e){return yield*si.call(this,t,e,Oi)}var fn=t=>t&&t.length||0;function*dn(t,e){let s=[],i=L(t);this.context.memoryLimit.use(i.length);for(let r of i)s.push(yield this.context._getFromScope(r,h(e),!1));return s}function*pn(t,e){let s=0,i=L(t);for(let r of i){let n=Number(e?yield this.context._getFromScope(r,h(e),!1):r);s+=Number.isNaN(n)?0:n}return s}function gn(t){let e=L(t);return this.context.memoryLimit.use(e.length),e.filter(s=>!k(m(s)))}function ii(t,e=[]){let s=L(t),i=L(e);return this.context.memoryLimit.use(s.length+i.length),s.concat(i)}function mn(t,e){return ii.call(this,t,[e])}function yn(t,e){let s=L(t);this.context.memoryLimit.use(s.length);let i=[...s];return i.unshift(e),i}function wn(t){let e=[...L(t)];return e.pop(),e}function bn(t){let e=L(t);this.context.memoryLimit.use(e.length);let s=[...e];return s.shift(),s}function kn(t,e,s=1){return t=m(t),k(t)?[]:(S(t)||(t=h(t)),e=e<0?t.length+e:e,this.context.memoryLimit.use(s),t.slice(e,e+s))}function ri(t){return this.context.opts.jekyllWhere?e=>ae.is(t)?$(e,t):S(e)?er(e,t):$(e,t):t===void 0?e=>U(e,this.context):e=>$(e,t)}function*ni(t,e,s,i){let r=[];e=L(e),this.context.memoryLimit.use(e.length);let n=new z(h(s)).readScopeValue();for(let a of e)r.push(yield T(n,this.context.spawn(a)));let o=ri.call(this,i);return e.filter((a,c)=>o(r[c])===t)}function*oi(t,e,s,i){let r=[],n=new F(h(i),this.liquid),o=L(e);this.context.memoryLimit.use(o.length);for(let a of o){this.context.push({[s]:a});let c=yield n.value(this.context);this.context.pop(),c===t&&r.push(a)}return r}function*Tn(t,e,s){return yield*ni.call(this,!0,t,e,s)}function*xn(t,e,s){return yield*ni.call(this,!1,t,e,s)}function*Sn(t,e,s){return yield*oi.call(this,!0,t,e,s)}function*_n(t,e,s){return yield*oi.call(this,!1,t,e,s)}function*Ln(t,e){let s=new Map;t=ge(t);let i=new z(h(e)).readScopeValue();this.context.memoryLimit.use(t.length);for(let r of t){let n=yield T(i,this.context.spawn(r));s.has(n)||s.set(n,[]),s.get(n).push(r)}return[...s.entries()].map(([r,n])=>({name:r,items:n}))}function*Fn(t,e,s){let i=new Map,r=new F(h(s),this.liquid);t=ge(t),this.context.memoryLimit.use(t.length);for(let n of t){this.context.push({[e]:n});let o=yield r.value(this.context);this.context.pop(),i.has(o)||i.set(o,[]),i.get(o).push(n)}return[...i.entries()].map(([n,o])=>({name:n,items:o}))}function*es(t,e,s){let i=new z(h(e)).readScopeValue(),r=L(t),n=ri.call(this,s);for(let o=0;o<r.length;o++){let a=yield T(i,this.context.spawn(r[o]));if(n(a))return[o,r[o]]}}function*ts(t,e,s){let i=new F(h(s),this.liquid),r=L(t);for(let n=0;n<r.length;n++){this.context.push({[e]:r[n]});let o=yield i.value(this.context);if(this.context.pop(),o)return[n,r[n]]}}function*On(t,e,s){return!!(yield*es.call(this,t,e,s))}function*vn(t,e,s){return!!(yield*ts.call(this,t,e,s))}function*zn(t,e,s){let i=yield*es.call(this,t,e,s);return i?i[0]:void 0}function*Rn(t,e,s){let i=yield*ts.call(this,t,e,s);return i?i[0]:void 0}function*An(t,e,s){let i=yield*es.call(this,t,e,s);return i?i[1]:void 0}function*Nn(t,e,s){let i=yield*ts.call(this,t,e,s);return i?i[1]:void 0}function qn(t){return t=L(t),this.context.memoryLimit.use(t.length),[...new Set(t)]}function Mn(t,e=1){if(t=m(t),k(t))return[];S(t)||(t=h(t)),this.context.memoryLimit.use(e);let s=[...t].sort(()=>Math.random()-.5);return e===1?s[0]:s.slice(0,e)}var Dn=Object.freeze({__proto__:null,join:on,last:an,first:ln,reverse:cn,sort:hn,sort_natural:un,size:fn,map:dn,sum:pn,compact:gn,concat:ii,push:mn,unshift:yn,pop:wn,shift:bn,slice:kn,where:Tn,reject:xn,where_exp:Sn,reject_exp:_n,group_by:Ln,group_by_exp:Fn,has:On,has_exp:vn,find_index:zn,find_index_exp:Rn,find:An,find_exp:Nn,uniq:qn,sample:Mn});function ss(t,e,s){let i=(t?.length??0)+(s?.length??0);this.context.memoryLimit.use(i);let r=li(t,this.context.opts,s);return r?(e=m(e),e=k(e)?this.context.opts.dateFormat:h(e),this.context.memoryLimit.use(e.length),xe(r,e,this.context.memoryLimit)):t}function En(t){return ss.call(this,t,"%Y-%m-%dT%H:%M:%S%:z")}function Vn(t){return ss.call(this,t,"%a, %d %b %Y %H:%M:%S %z")}function Pn(t,e,s){return ai.call(this,t,"%b",e,s)}function Cn(t,e,s){return ai.call(this,t,"%B",e,s)}function ai(t,e,s,i){let r=li(t,this.context.opts);if(!r)return t;let n=this.context.memoryLimit;if(s==="ordinal"){let o=r.getDate();return i==="US"?xe(r,`${e} ${o}%q, %Y`,n):xe(r,`${o}%q ${e} %Y`,n)}return xe(r,`%d ${e} %Y`,n)}function li(t,e,s){let i,r=s??e.timezoneOffset,n=e.locale;if(t=m(t),!k(t))return t==="now"||t==="today"?i=new I(Date.now(),n,r):ft(t)?i=new I(t*1e3,n,r):d(t)?/^\d+$/.test(t)?i=new I(+t*1e3,n,r):e.preserveTimezones&&s===void 0?i=I.createDateFixedToTimezone(t,n):i=new I(t,n,r):i=new I(t,n,r),i.valid()?i:void 0}var $n=Object.freeze({__proto__:null,date:ss,date_to_xmlschema:En,date_to_rfc822:Vn,date_to_string:Pn,date_to_long_string:Cn}),Tt=/[\u4E00-\u9FFF\uF900-\uFAFF\u3400-\u4DBF\u3040-\u309F\u30A0-\u30FF\uAC00-\uD7AF]/gu,qs=/[^\u4E00-\u9FFF\uF900-\uFAFF\u3400-\u4DBF\u3040-\u309F\u30A0-\u30FF\uAC00-\uD7AF\s]+/gu;function jn(t,e){_(arguments.length===2,"append expect 2 arguments");let s=h(t),i=h(e);return this.context.memoryLimit.use(s.length+i.length),s+i}function In(t,e){_(arguments.length===2,"prepend expect 2 arguments");let s=h(t),i=h(e);return this.context.memoryLimit.use(s.length+i.length),i+s}function Bn(t,e){let s=h(t);if(this.context.memoryLimit.use(s.length),e){e=h(e),this.context.memoryLimit.use(e.length);for(let i=0,r=new Set(e);i<s.length;i++)if(!r.has(s[i]))return s.slice(i);return""}return s.trimStart()}function Un(t){let e=h(t);return this.context.memoryLimit.use(e.length),e.toLowerCase()}function Wn(t){let e=h(t);return this.context.memoryLimit.use(e.length),h(e).toUpperCase()}function Hn(t,e){let s=h(t);return e=h(e),this.context.memoryLimit.use(s.length+e.length),s.split(e).join("")}function Yn(t,e){let s=h(t);return e=h(e),this.context.memoryLimit.use(s.length+e.length),s.replace(e,"")}function Jn(t,e){let s=h(t),i=h(e);this.context.memoryLimit.use(s.length+i.length);let r=s.lastIndexOf(i);return r===-1?s:s.substring(0,r)+s.substring(r+i.length)}function Zn(t,e){if(t=h(t),this.context.memoryLimit.use(t.length),e){e=h(e),this.context.memoryLimit.use(e.length);for(let s=t.length-1,i=new Set(e);s>=0;s--)if(!i.has(t[s]))return t.slice(0,s+1);return""}return t.trimEnd()}function Qn(t,e){let s=h(t);this.context.memoryLimit.use(s.length);let i=s.split(h(e));for(;i.length&&i[i.length-1]==="";)i.pop();return i}function Kn(t,e){let s=h(t);if(this.context.memoryLimit.use(s.length),e){let i=new Set(h(e));this.context.memoryLimit.use(i.size);let r=0,n=s.length-1;for(;i.has(s[r]);)r++;for(;n>=r&&i.has(s[n]);)n--;return s.slice(r,n+1)}return s.trim()}function Gn(t){let e=h(t);return this.context.memoryLimit.use(e.length),e.replace(/\r?\n/gm,"")}function Xn(t){return t=h(t),this.context.memoryLimit.use(t.length),t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()}function eo(t,e,s){let i=h(t);e=h(e),s=h(s);let r=i.split(e),n=i.length+(r.length-1)*(s.length-e.length);return this.context.memoryLimit.use(n),r.join(s)}function to(t,e,s){let i=h(t);return e=h(e),s=h(s),this.context.memoryLimit.use(i.length+e.length+s.length),i.replace(e,()=>s)}function so(t,e,s){let i=h(t),r=h(e),n=h(s);this.context.memoryLimit.use(i.length+r.length+n.length);let o=i.lastIndexOf(r);return o===-1?i:i.substring(0,o)+n+i.substring(o+r.length)}function io(t,e=50,s="..."){let i=h(t);return s=h(s),this.context.memoryLimit.use(i.length+s.length),i.length<=e?t:i.substring(0,e-s.length)+s}function ro(t,e=15,s="..."){let i=h(t);s=h(s),this.context.memoryLimit.use(i.length+s.length);let r=i.split(/\s+/);e<=0&&(e=1);let n=r.slice(0,e).join(" ");return r.length>=e&&(n+=s),n}function no(t){let e=h(t);return this.context.memoryLimit.use(e.length),e.replace(/\s+/g," ")}function oo(t,e){let s=h(t);if(this.context.memoryLimit.use(s.length),t=s.trim(),!t)return 0;switch(e){case"cjk":return(t.match(Tt)||[]).length+(t.match(qs)||[]).length;case"auto":return Tt.test(t)?t.match(Tt).length+(t.match(qs)||[]).length:t.split(/\s+/).length;default:return t.split(/\s+/).length}}function ao(t,e="and"){switch(e=h(e),this.context.memoryLimit.use(t.length+e.length),t.length){case 0:return"";case 1:return t[0];case 2:return`${t[0]} ${e} ${t[1]}`;default:return`${t.slice(0,-1).join(", ")}, ${e} ${t[t.length-1]}`}}var lo=Object.freeze({__proto__:null,append:jn,prepend:In,lstrip:Bn,downcase:Un,upcase:Wn,remove:Hn,remove_first:Yn,remove_last:Jn,rstrip:Zn,split:Qn,strip:Kn,strip_newlines:Gn,capitalize:Xn,replace:eo,replace_first:to,replace_last:so,truncate:io,truncatewords:ro,normalize_whitespace:no,number_of_words:oo,array_to_sentence_string:ao});function co(t){return Buffer.from(t,"utf8").toString("base64")}function ho(t){return Buffer.from(t,"base64").toString("utf8")}function uo(t){if(typeof Buffer<"u"&&Buffer.isBuffer(t))return this.context.memoryLimit.use(t.byteLength),t.toString("base64");let e=h(t);return this.context.memoryLimit.use(e.length),co(e)}function fo(t){let e=h(t);return this.context.memoryLimit.use(e.length),ho(e)}var po=Object.freeze({__proto__:null,base64_encode:uo,base64_decode:fo});function go(t){return Es.createHash("sha256").update(t,"utf8").digest("hex")}function mo(t,e){return Es.createHmac("sha256",e).update(t,"utf8").digest("hex")}function yo(t){let e=h(t);return this.context.memoryLimit.use(e.length),go(e)}function wo(t,e){let s=h(t),i=h(e);return this.context.memoryLimit.use(s.length+i.length),mo(s,i)}var bo=Object.freeze({__proto__:null,sha256:yo,hmac_sha256:wo}),ci={...Lr,...Qr,...nn,...Dn,...$n,...lo,...po,...bo,...Qs},We=class extends b{constructor(e,s,i){super(e,s,i),this.identifier=this.tokenizer.readIdentifier(),this.key=this.identifier.content,this.tokenizer.assert(this.key,"expected variable name"),this.tokenizer.skipBlank(),this.tokenizer.assert(this.tokenizer.peek()==="=",'expected "="'),this.tokenizer.advance(),this.value=new F(this.tokenizer.readFilteredValue(),this.liquid)}*render(e){e.bottom()[this.key]=yield this.value.value(e,this.liquid.options.lenientIf)}*arguments(){yield this.value}*localScope(){yield this.identifier}},Ms=["offset","limit","reversed"],He=class extends b{constructor(e,s,i,r){super(e,s,i);let n=this.tokenizer.readIdentifier(),o=this.tokenizer.readIdentifier(),a=this.tokenizer.readValue();if(!n.size()||o.content!=="in"||!a)throw new Error(`illegal tag: ${e.getText()}`);this.variable=n.content,this.collection=a,this.hash=new j(this.tokenizer,i.options.keyValueSeparator),this.templates=[],this.elseTemplates=[];let c,f=r.parseStream(s).on("start",()=>c=this.templates).on("tag:else",u=>{Ae(u.args),c=this.elseTemplates}).on("tag:endfor",u=>{Ae(u.args),f.stop()}).on("template",u=>c.push(u)).on("end",()=>{throw new Error(`tag ${e.getText()} not closed`)});f.start()}*render(e,s){let i=this.liquid.renderer,r=ge(yield T(this.collection,e));if(!r.length){yield i.renderTemplates(this.elseTemplates,e,s);return}let n="continue-"+this.variable+"-"+this.collection.getText();e.push(Y({continue:e.getRegister(n,{})}));let o=yield this.hash.render(e);e.pop(),r=(this.liquid.options.orderedFilterParameters?Object.keys(o).filter(f=>Ms.includes(f)):Ms.filter(f=>o[f]!==void 0)).reduce((f,u)=>u==="offset"?To(f,o.offset):u==="limit"?xo(f,o.limit):ko(f),r),e.setRegister(n,(o.offset||0)+r.length);let c=Y({forloop:new le(r.length,this.collection.getText(),this.variable)});e.push(c);for(let f of r){if(c[this.variable]=f,e.continueCalled=e.breakCalled=!1,yield i.renderTemplates(this.templates,e,s),e.breakCalled)break;c.forloop.next()}e.continueCalled=e.breakCalled=!1,e.pop()}*children(){let e=this.templates.slice();return this.elseTemplates&&e.push(...this.elseTemplates),e}*arguments(){yield this.collection;for(let e of Object.values(this.hash.hash))v(e)&&(yield e)}blockScope(){return[this.variable,"forloop"]}};function ko(t){return[...t].reverse()}function To(t,e){return t.slice(e)}function xo(t,e){return t.slice(0,e)}var Ye=class extends b{constructor(e,s,i,r){for(super(e,s,i),this.templates=[],this.identifier=this.readVariable(),this.variable=this.identifier.content;s.length;){let n=s.shift();if(J(n)&&n.name==="endcapture")return;this.templates.push(r.parseToken(n,s))}throw new Error(`tag ${e.getText()} not closed`)}readVariable(){let e=this.tokenizer.readIdentifier();if(e.content||(e=this.tokenizer.readQuoted(),e))return e;throw this.tokenizer.error("invalid capture name")}*render(e){let i=yield this.liquid.renderer.renderTemplates(this.templates,e);e.bottom()[this.variable]=i}*children(){return this.templates}*localScope(){yield this.identifier}},Je=class extends b{constructor(e,s,i,r){super(e,s,i),this.branches=[],this.elseTemplates=[],this.value=new F(this.tokenizer.readFilteredValue(),this.liquid),this.elseTemplates=[];let n=[],o=0,a=r.parseStream(s).on("tag:when",c=>{if(o>0)return;n=[];let f=[];for(;!c.tokenizer.end();)f.push(c.tokenizer.readValueOrThrow()),c.tokenizer.skipBlank(),c.tokenizer.peek()===","?c.tokenizer.readTo(","):c.tokenizer.readTo("or");this.branches.push({values:f,templates:n})}).on("tag:else",()=>{o++,n=this.elseTemplates}).on("tag:endcase",()=>a.stop()).on("template",c=>{(n!==this.elseTemplates||o===1)&&n.push(c)}).on("end",()=>{throw new Error(`tag ${e.getText()} not closed`)});a.start()}*render(e,s){let i=this.liquid.renderer,r=m(yield this.value.value(e,e.opts.lenientIf)),n=!1;for(let o of this.branches)for(let a of o.values){let c=yield T(a,e,e.opts.lenientIf);if($(r,c)){yield i.renderTemplates(o.templates,e,s),n=!0;break}}n||(yield i.renderTemplates(this.elseTemplates,e,s))}*arguments(){yield this.value,yield*this.branches.flatMap(e=>e.values)}*children(){let e=this.branches.flatMap(s=>s.templates);return this.elseTemplates&&e.push(...this.elseTemplates),e}},Ze=class extends b{constructor(e,s,i){for(super(e,s,i);s.length;){let r=s.shift();if(J(r)&&r.name==="endcomment")return}throw new Error(`tag ${e.getText()} not closed`)}render(){}},Qe=class extends b{constructor(e,s,i,r){super(e,s,i);let n=this.tokenizer;for(this.file=is(n,this.liquid,r),this.currentFile=e.file;!n.end();){n.skipBlank();let o=n.p,a=n.readIdentifier();if((a.content==="with"||a.content==="for")&&(n.skipBlank(),n.peek()!==":")){let c=n.readValue();if(c){let f=n.p,u=n.readIdentifier(),p;u.content==="as"?p=n.readIdentifier():n.p=f,this[a.content]={value:c,alias:p&&p.content},n.skipBlank(),n.peek()===","&&n.advance();continue}}n.p=o;break}this.hash=new j(n,i.options.keyValueSeparator)}*render(e,s){let{liquid:i,hash:r}=this,n=yield rs(this.file,e,i);_(n,()=>`illegal file path "${n}"`);let o=e.spawn(),a=o.bottom();if(Ue(a,yield r.render(e)),this.with){let{value:c,alias:f}=this.with;a[f||n]=yield T(c,e)}if(this.for){let{value:c,alias:f}=this.for,u=ge(yield T(c,e));a.forloop=new le(u.length,c.getText(),f);for(let p of u){a[f]=p;let g=yield i._parsePartialFile(n,o.sync,this.currentFile);yield i.renderer.renderTemplates(g,o,s),a.forloop.next()}}else{let c=yield i._parsePartialFile(n,o.sync,this.currentFile);yield i.renderer.renderTemplates(c,o,s)}}*children(e,s){return e&&d(this.file)?yield this.liquid._parsePartialFile(this.file,s,this.currentFile):[]}partialScope(){if(d(this.file)){let e=Object.keys(this.hash.hash);if(this.with){let{value:s,alias:i}=this.with;d(i)?e.push([i,s]):d(this.file)&&e.push([this.file,s])}if(this.for){let{value:s,alias:i}=this.for;d(i)?e.push([i,s]):d(this.file)&&e.push([this.file,s])}return{name:this.file,isolated:!0,scope:e}}}*arguments(){for(let e of Object.values(this.hash.hash))v(e)&&(yield e);if(this.with){let{value:e}=this.with;v(e)&&(yield e)}if(this.for){let{value:e}=this.for;v(e)&&(yield e)}}};function is(t,e,s){if(e.options.dynamicPartials){let n=t.readValue();if(t.assert(n,"illegal file path"),n.getText()==="none")return;if(Be(n)){let o=s.parse(Js(n));return Ds(o)}return n}let i=[...t.readFileNameTemplate(e.options)],r=Ds(s.parseTokens(i));return r==="none"?void 0:r}function Ds(t){return t.length===1&&mt(t[0].token)?t[0].token.getContent():t}function*rs(t,e,s){return typeof t=="string"?t:Array.isArray(t)?s.renderer.renderTemplates(t,e):yield T(t,e)}var Ke=class extends b{constructor(e,s,i,r){super(e,s,i);let{tokenizer:n}=e;this.file=is(n,this.liquid,r),this.currentFile=e.file;let o=n.p;n.readIdentifier().content==="with"?(n.skipBlank(),n.peek()!==":"?this.withVar=n.readValue():n.p=o):n.p=o,this.hash=new j(n,i.options.jekyllInclude||i.options.keyValueSeparator)}*render(e,s){let{liquid:i,hash:r,withVar:n}=this,{renderer:o}=i,a=yield rs(this.file,e,i);_(a,()=>`illegal file path "${a}"`);let c=e.saveRegister("blocks","blockMode");e.setRegister("blocks",{}),e.setRegister("blockMode",K.OUTPUT);let f=Y(yield r.render(e));n&&(f[a]=yield T(n,e));let u=yield i._parsePartialFile(a,e.sync,this.currentFile);e.push(e.opts.jekyllInclude?Y({include:f}):f),yield o.renderTemplates(u,e,s),e.pop(),e.restoreRegister(c)}*children(e,s){return e&&d(this.file)?yield this.liquid._parsePartialFile(this.file,s,this.currentFile):[]}partialScope(){if(d(this.file)){let e;return this.liquid.options.jekyllInclude?e=["include"]:(e=Object.keys(this.hash.hash),this.withVar&&e.push([this.file,this.withVar])),{name:this.file,isolated:!1,scope:e}}}*arguments(){yield*Object.values(this.hash.hash).filter(v),v(this.file)&&(yield this.file),v(this.withVar)&&(yield this.withVar)}},Ge=class extends b{constructor(e,s,i){super(e,s,i),this.identifier=this.tokenizer.readIdentifier(),this.variable=this.identifier.content}render(e,s){let i=e.environments;ft(i[this.variable])||(i[this.variable]=0),s.write(h(--i[this.variable]))}*localScope(){yield this.identifier}},Xe=class extends b{constructor(e,s,i){super(e,s,i),this.candidates=[];let r=this.tokenizer.readValue();for(this.tokenizer.skipBlank(),r&&(this.tokenizer.peek()===":"?(this.group=r,this.tokenizer.advance()):this.candidates.push(r));!this.tokenizer.end();){let n=this.tokenizer.readValue();n&&this.candidates.push(n),this.tokenizer.readTo(",")}this.tokenizer.assert(this.candidates.length,()=>`empty candidates: "${e.getText()}"`)}*render(e,s){let r=`cycle:${yield T(this.group,e)}:`+this.candidates.join(","),n=e.getRegister("cycle",{}),o=n[r];o===void 0&&(o=n[r]=0);let a=this.candidates[o];return o=(o+1)%this.candidates.length,n[r]=o,yield T(a,e)}*arguments(){yield*this.candidates,this.group&&(yield this.group)}},et=class extends b{constructor(e,s,i,r){super(e,s,i),this.branches=[];let n=[];r.parseStream(s).on("start",()=>this.branches.push({value:new F(e.tokenizer.readFilteredValue(),this.liquid),templates:n=[]})).on("tag:elsif",o=>{_(!this.elseTemplates,"unexpected elsif after else"),this.branches.push({value:new F(o.tokenizer.readFilteredValue(),this.liquid),templates:n=[]})}).on("tag:else",o=>{Ae(o.args),_(!this.elseTemplates,"duplicated else"),n=this.elseTemplates=[]}).on("tag:endif",function(o){Ae(o.args),this.stop()}).on("template",o=>n.push(o)).on("end",()=>{throw new Error(`tag ${e.getText()} not closed`)}).start()}*render(e,s){let i=this.liquid.renderer;for(let{value:r,templates:n}of this.branches){let o=yield r.value(e,e.opts.lenientIf);if(U(o,e)){yield i.renderTemplates(n,e,s);return}}yield i.renderTemplates(this.elseTemplates||[],e,s)}*children(){let e=this.branches.flatMap(s=>s.templates);return this.elseTemplates&&e.push(...this.elseTemplates),e}arguments(){return this.branches.map(e=>e.value)}},tt=class extends b{constructor(e,s,i){super(e,s,i),this.identifier=this.tokenizer.readIdentifier(),this.variable=this.identifier.content}render(e,s){let i=e.environments;ft(i[this.variable])||(i[this.variable]=0);let r=i[this.variable];i[this.variable]++,s.write(h(r))}*localScope(){yield this.identifier}},st=class extends b{constructor(e,s,i,r){super(e,s,i),this.file=is(this.tokenizer,this.liquid,r),this.currentFile=e.file,this.args=new j(this.tokenizer,i.options.keyValueSeparator),this.templates=r.parseTokens(s)}*render(e,s){let{liquid:i,args:r,file:n}=this,{renderer:o}=i;if(n===void 0){e.setRegister("blockMode",K.OUTPUT),yield o.renderTemplates(this.templates,e,s);return}let a=yield rs(this.file,e,i);_(a,()=>`illegal file path "${a}"`);let c=yield i._parseLayoutFile(a,e.sync,this.currentFile);e.setRegister("blockMode",K.STORE);let f=yield o.renderTemplates(this.templates,e),u=e.getRegister("blocks",{});u[""]===void 0&&(u[""]=(p,g)=>g.write(f)),e.setRegister("blockMode",K.OUTPUT),e.push(Y(yield r.render(e))),yield o.renderTemplates(c,e,s),e.pop()}*children(e){let s=this.templates.slice();return e&&d(this.file)&&s.push(...yield this.liquid._parsePartialFile(this.file,!0,this.currentFile)),s}*arguments(){for(let e of Object.values(this.args.hash))v(e)&&(yield e);v(this.file)&&(yield this.file)}partialScope(){if(d(this.file))return{name:this.file,isolated:!1,scope:Object.keys(this.args.hash)}}},it=class extends b{constructor(e,s,i,r){super(e,s,i),this.templates=[];let n=/\w+/.exec(e.args);for(this.block=n?n[0]:"";s.length;){let o=s.shift();if(J(o)&&o.name==="endblock")return;let a=r.parseToken(o,s);this.templates.push(a)}throw new Error(`tag ${e.getText()} not closed`)}*render(e,s){let i=this.getBlockRender(e);e.getRegister("blockMode")===K.STORE?e.getRegister("blocks",{})[this.block]=i:yield i(new qe,s)}getBlockRender(e){let s=this,{liquid:i,templates:r}=this,n=e.getRegister("blocks",{})[this.block],o=function*(a,c){let f=e.getRegister("blockStack",[]);if(f.includes(s))throw new Error("block tag cannot be nested");f.push(s),e.push(Y({block:a})),yield i.renderer.renderTemplates(r,e,c),e.pop(),f.pop()};return n?(a,c)=>n(new qe(f=>o(a,f)),c):o}*children(){return this.templates}blockScope(){return["block"]}},rt=class extends b{constructor(e,s,i){for(super(e,s,i),this.tokens=[];s.length;){let r=s.shift();if(J(r)&&r.name==="endraw")return;this.tokens.push(r)}throw new Error(`tag ${e.getText()} not closed`)}render(){return this.tokens.map(e=>e.getText()).join("")}},Jt=class extends le{constructor(e,s,i,r){super(e,i,r),this.length=e,this.cols=s}row(){return Math.floor(this.i/this.cols)+1}col0(){return this.i%this.cols}col(){return this.col0()+1}col_first(){return this.col0()===0}col_last(){return this.col()===this.cols}},nt=class extends b{constructor(e,s,i,r){super(e,s,i);let n=this.tokenizer.readIdentifier();this.tokenizer.skipBlank();let o=this.tokenizer.readIdentifier(),a=this.tokenizer.readValue();if(o.content!=="in"||!a)throw new Error(`illegal tag: ${e.getText()}`);this.variable=n.content,this.collection=a,this.args=new j(this.tokenizer,i.options.keyValueSeparator),this.templates=[];let c,f=r.parseStream(s).on("start",()=>c=this.templates).on("tag:endtablerow",()=>f.stop()).on("template",u=>c.push(u)).on("end",()=>{throw new Error(`tag ${e.getText()} not closed`)});f.start()}*render(e,s){let i=ge(yield T(this.collection,e)),r=yield this.args.render(e),n=r.offset||0,o=r.limit===void 0?i.length:r.limit;i=i.slice(n,n+o);let a=r.cols||i.length,c=this.liquid.renderer,f=new Jt(i.length,a,this.collection.getText(),this.variable),u=Y({tablerowloop:f});e.push(u);for(let p=0;p<i.length;p++,f.next())u[this.variable]=i[p],f.col0()===0&&(f.row()!==1&&s.write("</tr>"),s.write(`<tr class="row${f.row()}">`)),s.write(`<td class="col${f.col()}">`),yield c.renderTemplates(this.templates,e,s),s.write("</td>");i.length&&s.write("</tr>"),e.pop()}*children(){return this.templates}*arguments(){yield this.collection;for(let e of Object.values(this.args.hash))v(e)&&(yield e)}blockScope(){return[this.variable,"tablerowloop"]}},ot=class extends b{constructor(e,s,i,r){super(e,s,i),this.branches=[],this.elseTemplates=[];let n=[],o=0;r.parseStream(s).on("start",()=>this.branches.push({value:new F(e.tokenizer.readFilteredValue(),this.liquid),test:me,templates:n=[]})).on("tag:elsif",a=>{if(o>0){n=[];return}this.branches.push({value:new F(a.tokenizer.readFilteredValue(),this.liquid),test:U,templates:n=[]})}).on("tag:else",()=>{o++,n=this.elseTemplates}).on("tag:endunless",function(){this.stop()}).on("template",a=>{(n!==this.elseTemplates||o===1)&&n.push(a)}).on("end",()=>{throw new Error(`tag ${e.getText()} not closed`)}).start()}*render(e,s){let i=this.liquid.renderer;for(let{value:r,test:n,templates:o}of this.branches){let a=yield r.value(e,e.opts.lenientIf);if(n(a,e)){yield i.renderTemplates(o,e,s);return}}yield i.renderTemplates(this.elseTemplates,e,s)}*children(){let e=this.branches.flatMap(s=>s.templates);return this.elseTemplates&&e.push(...this.elseTemplates),e}arguments(){return this.branches.map(e=>e.value)}},at=class extends b{render(e,s){e.breakCalled=!0}},lt=class extends b{render(e,s){e.continueCalled=!0}},ct=class extends b{constructor(e,s,i){super(e,s,i),this.tokenizer.skipBlank(),this.tokenizer.end()||(this.value=new F(this.tokenizer.readFilteredValue(),this.liquid))}*render(e,s){if(!this.value)return;let i=yield this.value.value(e,!1);s.write(i)}*arguments(){this.value&&(yield this.value)}},ht=class extends b{constructor(e,s,i,r){super(e,s,i);let n=this.tokenizer.readLiquidTagTokens(this.liquid.options);this.templates=r.parseTokens(n)}*render(e,s){yield this.liquid.renderer.renderTemplates(this.templates,e,s)}*children(){return this.templates}},ut=class extends b{constructor(e,s,i){if(super(e,s,i),e.args.search(/\n\s*[^#\s]/g)!==-1)throw new Error("every line of an inline comment must start with a '#' character")}render(){}},hi={assign:We,for:He,capture:Ye,case:Je,comment:Ze,include:Ke,render:Qe,decrement:Ge,increment:tt,cycle:Xe,if:et,layout:st,block:it,raw:rt,tablerow:nt,unless:ot,break:at,continue:lt,echo:ct,liquid:ht,"#":ut},Zt=class t{constructor(e={}){this.renderer=new jt,this.filters=Object.create(null),this.tags=Object.create(null),this.options=Fr(e),this.parser=new N(this),ws(hi,(s,i)=>this.registerTag(i,s)),ws(ci,(s,i)=>this.registerFilter(i,s))}parse(e,s){return new N(this).parse(e,s)}_render(e,s,i){let r=s instanceof B?s:new B(s,this.options,i);return this.renderer.renderTemplates(e,r)}async render(e,s,i){return q(this._render(e,s,{...i,sync:!1}))}renderSync(e,s,i){return M(this._render(e,s,{...i,sync:!0}))}renderToNodeStream(e,s,i={}){let r=new B(s,this.options,i);return this.renderer.renderTemplatesToNodeStream(e,r)}_parseAndRender(e,s,i){let r=this.parse(e);return this._render(r,s,i)}async parseAndRender(e,s,i){return q(this._parseAndRender(e,s,{...i,sync:!1}))}parseAndRenderSync(e,s,i){return M(this._parseAndRender(e,s,{...i,sync:!0}))}_parsePartialFile(e,s,i){return new N(this).parseFile(e,s,l.LookupType.Partials,i)}_parseLayoutFile(e,s,i){return new N(this).parseFile(e,s,l.LookupType.Layouts,i)}_parseFile(e,s,i,r){return new N(this).parseFile(e,s,i,r)}async parseFile(e,s){return q(new N(this).parseFile(e,!1,s))}parseFileSync(e,s){return M(new N(this).parseFile(e,!0,s))}*_renderFile(e,s,i){let r=yield this._parseFile(e,i.sync,i.lookupType);return yield this._render(r,s,i)}async renderFile(e,s,i){return q(this._renderFile(e,s,{...i,sync:!1}))}renderFileSync(e,s,i){return M(this._renderFile(e,s,{...i,sync:!0}))}async renderFileToNodeStream(e,s,i){let r=await this.parseFile(e);return this.renderToNodeStream(r,s,i)}_evalValue(e,s){let i=new F(e,this),r=s instanceof B?s:new B(s,this.options);return i.value(r)}async evalValue(e,s){return q(this._evalValue(e,s))}evalValueSync(e,s){return M(this._evalValue(e,s))}registerFilter(e,s){this.filters[e]=s}registerTag(e,s){this.tags[e]=x(s)?s:Ar(s)}plugin(e){return e.call(this,t)}express(){let e=this,s=!0;return function(i,r,n){if(s){s=!1;let o=Se(this.root);e.options.root.unshift(...o),e.options.layouts.unshift(...o),e.options.partials.unshift(...o)}e.renderFile(i,r).then(o=>n(null,o),n)}}async analyze(e,s={}){return P(e,s)}analyzeSync(e,s={}){return C(e,s)}async parseAndAnalyze(e,s,i={}){return P(this.parse(e,s),i)}parseAndAnalyzeSync(e,s,i={}){return C(this.parse(e,s),i)}async variables(e,s={}){let i=await P(d(e)?this.parse(e):e,s);return Object.keys(i.variables)}variablesSync(e,s={}){let i=C(d(e)?this.parse(e):e,s);return Object.keys(i.variables)}async fullVariables(e,s={}){let i=await P(d(e)?this.parse(e):e,s);return Array.from(new Set(Object.values(i.variables).flatMap(r=>r.map(n=>String(n)))))}fullVariablesSync(e,s={}){let i=C(d(e)?this.parse(e):e,s);return Array.from(new Set(Object.values(i.variables).flatMap(r=>r.map(n=>String(n)))))}async variableSegments(e,s={}){let i=await P(d(e)?this.parse(e):e,s);return Array.from(ke(Object.values(i.variables).flatMap(r=>r.map(n=>n.toArray()))))}variableSegmentsSync(e,s={}){let i=C(d(e)?this.parse(e):e,s);return Array.from(ke(Object.values(i.variables).flatMap(r=>r.map(n=>n.toArray()))))}async globalVariables(e,s={}){let i=await P(d(e)?this.parse(e):e,s);return Object.keys(i.globals)}globalVariablesSync(e,s={}){let i=C(d(e)?this.parse(e):e,s);return Object.keys(i.globals)}async globalFullVariables(e,s={}){let i=await P(d(e)?this.parse(e):e,s);return Array.from(new Set(Object.values(i.globals).flatMap(r=>r.map(n=>String(n)))))}globalFullVariablesSync(e,s={}){let i=C(d(e)?this.parse(e):e,s);return Array.from(new Set(Object.values(i.globals).flatMap(r=>r.map(n=>String(n)))))}async globalVariableSegments(e,s={}){let i=await P(d(e)?this.parse(e):e,s);return Array.from(ke(Object.values(i.globals).flatMap(r=>r.map(n=>n.toArray()))))}globalVariableSegmentsSync(e,s={}){let i=C(d(e)?this.parse(e):e,s);return Array.from(ke(Object.values(i.globals).flatMap(r=>r.map(n=>n.toArray()))))}},So="10.27.0";l.AssertionError=Re;l.AssignTag=We;l.BlockTag=it;l.BreakTag=at;l.CaptureTag=Ye;l.CaseTag=Je;l.CommentTag=Ze;l.Context=B;l.ContinueTag=lt;l.CycleTag=Xe;l.DecrementTag=Ge;l.Drop=D;l.EchoTag=ct;l.Expression=Ve;l.Filter=de;l.ForTag=He;l.Hash=j;l.IfTag=et;l.IncludeTag=Ke;l.IncrementTag=tt;l.InlineCommentTag=ut;l.LayoutTag=st;l.Liquid=Zt;l.LiquidError=E;l.LiquidTag=ht;l.Output=$e;l.ParseError=Fe;l.ParseStream=Ce;l.Parser=N;l.RawTag=rt;l.RenderError=Oe;l.RenderTag=Qe;l.TablerowTag=nt;l.Tag=b;l.TagToken=ue;l.Token=O;l.TokenizationError=Le;l.Tokenizer=z;l.TypeGuards=Mr;l.UndefinedVariableError=ze;l.UnlessTag=ot;l.Value=F;l.Variable=H;l.analyze=P;l.analyzeSync=C;l.assert=_;l.createTrie=vt;l.defaultOperators=Zs;l.defaultOptions=Q;l.evalQuotedToken=Js;l.evalToken=T;l.filters=ci;l.isFalsy=me;l.isTruthy=U;l.tags=hi;l.toPromise=q;l.toValue=m;l.toValueSync=M;l.version=So});ye();var di=mi(ui());function fi(t,e){let s=new di.Liquid;return s.render(s.parse(t),e)}async function Ao(t,e,s){ms(gs`Copying template from directory ${kt.path(t)} to ${kt.path(e)}`);let i=await ds(we(t,"**/*"),{dot:!0}),r=we(t,".cli-liquid-bypass"),n=[];await fs(r)&&(n=(await wt(r)).split(`
|
|
15
15
|
`).filter(a=>a.trim().length>0));let o=i.map(a=>a.split("/")).sort((a,c)=>a.length<c.length?1:-1).map(a=>a.join("/"));await Promise.all(o.map(async a=>{let c=await fi(we(e,yt(t,a)),s),f=n.some(u=>{let p=yt(t,a),g=u.replace(/^\.\//,"");return ps(p,g)||p.startsWith(g)});if(await cs(a))await bt(c);else if(a.endsWith(".liquid")&&!f){await bt(as(c));let u=await wt(a),p=await fi(u,s),g=await us(a),y=c.replace(".liquid","");await be(a,y),await ls(y,p),g&&await hs(y,493)}else if(a.endsWith(".raw")){let u=c.replace(".raw","");await be(a,u)}else await be(a,c)}))}export{fi as a,Ao as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as b}from"./chunk-
|
|
1
|
+
import{f as b}from"./chunk-JCNRQYRP.js";import{g as m}from"./chunk-VKWPEFWQ.js";m();import{performance as u}from"node:perf_hooks";function w(){return b()?"bubble":"mute-and-report"}function h(g={}){let i={sensitive:{},public:{...g}},p=t=>{Object.assign(i.public,t)},M=t=>{Object.assign(i.sensitive,t)},l=async(t,e,n)=>{let r=n==="auto"?w():n,s=async()=>{let c=await e();t(c)};if(r==="bubble")await s();else try{await s()}catch(c){let{sendErrorToBugsnag:o}=await import("./error-handler-MCUV4RZV.js");await o(c,"unexpected_error")}},a=[];return{getAllPublicMetadata:()=>({...i.public}),getAllSensitiveMetadata:()=>({...i.sensitive}),addPublicMetadata:async(t,e="auto")=>l(p,t,e),addSensitiveMetadata:async(t,e="auto")=>l(M,t,e),runWithTimer:t=>async e=>{a.push(0);let n=u.now();try{return await e()}finally{let r=u.now();r=Math.max(n,r);let s=Math.max(r-n,0),c=a.pop(),o=Math.max(s-c,0);a.length>0&&(a[a.length-1]=(a[a.length-1]??0)+s),u.measure(`${t}#measurable`,{start:n,duration:o}),u.measure(`${t}#wall`,{start:n,end:r});let d=i.public[t]||0;d+=o,i.public[t]=d}}}}var y=h({cmd_all_timing_network_ms:0,cmd_all_timing_prompts_ms:0}),{getAllPublicMetadata:S,getAllSensitiveMetadata:f,addPublicMetadata:x,addSensitiveMetadata:A,runWithTimer:P}=y;export{h as a,S as b,f as c,x as d,A as e,P as f};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{C as s,u as e,v as o,w as n,x as i,y as t}from"./chunk-
|
|
1
|
+
import{C as s,u as e,v as o,w as n,x as i,y as t}from"./chunk-E24W34C4.js";import{d,g as l}from"./chunk-ELIH6GCC.js";import{g as r}from"./chunk-VKWPEFWQ.js";r();async function u(){e({headline:"CLI update available.",body:["Run",{command:"npm run shopify upgrade"},{char:"."}]}),e({headline:["To connect this project to your shopify store cd into:",{filePath:"/my-store/hydrogen.config.js"},{char:"."}],body:["You can also try the following steps:",{list:{items:[["Run",{command:"shopify project connect"}],["Run",{command:"hydrogen start"}]]}}]}),e({headline:"About your app.",customSections:[{body:{tabularData:[["Configuration file",{filePath:"shopify.app.scalable-transaction-app.toml"}],["App name",{userInput:"scalable-transaction-app"}],["Access scopes","read_products,write_products"]],firstColumnSubdued:!0}}]}),e({headline:[{userInput:"my-app"},"initialized and ready to build."],nextSteps:[["Run",{command:"cd verification-app"}],["To preview your project, run",{command:"npm app dev"}],["To add extensions, run",{command:"npm generate extension"}]],reference:[["Run",{command:"npm shopify help"}],{link:{label:"Dev docs",url:"https://shopify.dev"}}],customSections:[{title:"Custom section",body:{list:{items:[{link:{label:"Item 1",url:"https://shopify.com"}},"Item 2",{link:{url:"https://community.shopify.com/"}}]}}},{title:"Custom section 2",body:{list:{items:["Item 1","Item 2","Item 3"]}}}]}),o({headline:"CLI updated.",body:"You are now running version 3.47."}),o({headline:"Deployment successful.",body:"Your extensions have been uploaded to your Shopify Partners Dashboard.",nextSteps:[{link:{label:"See your deployment and set it live",url:"https://partners.shopify.com/1797046/apps/4523695/deployments"}}]}),n({headline:"You have reached your limit of checkout extensions for this app.",body:"You can free up space for a new one by deleting an existing one."}),n({headline:"Required access scope update.",body:"The deadline for re-selecting your app scopes is May 1, 2022.",reference:[{link:{label:"Dev docs",url:"https://shopify.dev/app/scopes"}}]});let a=new l("Something went wrong.");a.stack=`
|
|
2
2
|
Error: Unexpected error
|
|
3
3
|
at Module._compile (internal/modules/cjs/loader.js:1137:30)
|
|
4
4
|
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{n as T}from"./chunk-
|
|
1
|
+
import{n as T}from"./chunk-2HZMOK4U.js";import{a as N,b as $,c as w}from"./chunk-APYASWBA.js";import{a as D,b}from"./chunk-ODH2U44N.js";import{O as P,P as k,a as F}from"./chunk-E24W34C4.js";import{g as A}from"./chunk-ELIH6GCC.js";import{Ia as U,La as I,N as x,Pa as O,Pb as u,Ua as p,xa as y,za as _}from"./chunk-EYDNSYYE.js";import{f as h}from"./chunk-JCNRQYRP.js";import{d as m,i as l,j as S}from"./chunk-773TIA5M.js";import{g as f}from"./chunk-VKWPEFWQ.js";f();f();import{fileURLToPath as q}from"url";import Y from"util";import{pipeline as j}from"stream";import{execSync as z,execFileSync as B}from"child_process";var H="2024.8.2",W=`https://github.com/cloudflare/cloudflared/releases/download/${H}/`,G={arm64:"cloudflared-linux-arm64",arm:"cloudflared-linux-arm",x64:"cloudflared-linux-amd64",ia32:"cloudflared-linux-386"},V={arm64:"cloudflared-darwin-arm64.tgz",x64:"cloudflared-darwin-amd64.tgz"},X={x64:"cloudflared-windows-amd64.exe",ia32:"cloudflared-windows-386.exe",arm64:"cloudflared-windows-amd64.exe"},v={linux:G,darwin:V,win32:X};function Z(r=process.platform,t=process.arch){if(!Object.keys(v).includes(r))throw new Error(`Unsupported system platform: ${r}`);let n=v[r][t];if(n===void 0)throw new Error(`Unsupported system arch: ${t}`);return W+n}function J(r=process.env,t=process.platform){return r.SHOPIFY_CLI_CLOUDFLARED_PATH?r.SHOPIFY_CLI_CLOUDFLARED_PATH:m(l(q(import.meta.url)),"..","bin",t==="win32"?"cloudflared.exe":"cloudflared")}async function g(r=process.env,t=process.platform,e=process.arch){if(r.SHOPIFY_CLI_IGNORE_CLOUDFLARED){u("Skipping cloudflared installation because SHOPIFY_CLI_IGNORE_CLOUDFLARED is set");return}let n=Z(t,e),o=J(r,t);if(p(o))try{let a=B(o,["--version"],{encoding:"utf8"}).split(" "),i=a.length>2?a[2]:"0.0.0";if(!K(H,i)){u("cloudflared already installed, skipping");return}}catch{u("version check failed, reinstalling")}if(t==="linux")await Q(n,o);else if(t==="darwin")await rt(n,o);else if(t==="win32")await tt(n,o);else throw new Error(`Unsupported platform: ${t}`)}function K(r,t){let[e,n,o]=r.split(".").map(Number),[a,i,c]=t.split(".").map(Number);return e!==a?(e??0)>(a??0):n!==i?(n??0)>(i??0):(o??0)>(c??0)}async function Q(r,t){await C(r,t),await O(t,"755")}async function tt(r,t){await C(r,t)}async function rt(r,t){await C(r,`${t}.tgz`);let e=S(`${t}.tgz`);z(`tar -xzf ${e}`,{cwd:l(t)}),U(`${t}.tgz`),await _(`${l(t)}/cloudflared`,t)}async function C(r,t){p(l(t))||y(l(t));let e=Y.promisify(j),n=await T(r,{redirect:"follow"},"slow-request");if(!n.ok||!n.body)throw new Error(`Couldn't download file ${r} (${n.status} ${n.statusText})`);let o=I(t);return await e(n.body,o),t}import{Writable as et}from"stream";import{fileURLToPath as nt}from"url";var $t=$({provider:w,action:it}),ot=h()?.2:40,st=5;async function it(r){try{let t=new R(r);return await t.startTunnel(),D(t)}catch(t){let e=new N("unknown",t.message);return b(e)}}var R=class{constructor(t){this.provider=w,this.currentStatus={status:"not-started"},this.abortController=void 0,this.port=t}async startTunnel(){try{await g(),this.tunnel()}catch(t){this.currentStatus={status:"error",message:t.message,tryMessage:d()}}}getTunnelStatus(){return this.currentStatus}stopTunnel(){this.abortController?.abort()}tunnel(t=0){this.abortController=new F;let e=!1;if(t>=st){e=!0,this.currentStatus={status:"error",message:"Could not start Cloudflare tunnel: max retries reached.",tryMessage:d()};return}let n=["tunnel","--url",`http://localhost:${this.port}`,"--no-autoupdate"],o=[],a=!1,i;this.currentStatus={status:"starting"},setTimeout(()=>{if(!e){e=!0;let s=x(o).slice(-5).join(`
|
|
2
2
|
`);s===""?this.currentStatus={status:"error",message:"Could not start Cloudflare tunnel: unknown error.",tryMessage:d()}:this.currentStatus={status:"error",message:s,tryMessage:d()},this.abortController?.abort()}},ot*1e3);let c=this,E=new et({write(s,mt,M){if(u(s.toString()),e)return;i??(i=at(s)),ct(s)&&(a=!0),a&&(i?(e=!0,c.currentStatus={status:"connected",url:i}):c.currentStatus={status:"error",message:"Could not start Cloudflare tunnel: URL not found."});let L=lt(s);L&&o.push(L),M()}});P(dt(),n,{stdout:E,stderr:E,signal:this.abortController.signal,externalErrorHandler:async s=>{if(e)throw new A(`Could not start Cloudflare tunnel: process crashed after stablishing a connection: ${s.message}`,d());u(`Cloudflare tunnel crashed: ${s.message}, restarting...`),h()||await k(1),this.tunnel(t+1)}})}};function d(){return["You can run the command again, or try networking with Shopify via",{command:"--use-localhost"},"or",{command:"--tunnel-url <custom tunnel>"},".",{link:{label:"See documentation for details.",url:"https://shopify.dev/docs/apps/build/cli-for-apps/networking-options"}}]}function at(r){let t=new RegExp(`(https:\\/\\/[^\\s]+\\.${ft()})`),e=r.toString().match(t)??void 0;return e&&e[1]}function lt(r){if([/failed to request quick Tunnel/,/failed to unmarshal quick Tunnel/,/failed to parse quick Tunnel ID/,/failed to provision routing/,/ERR Couldn't start tunnel/,/ERR Failed to serve quic connection/,/ERR Failed to create new quic connection error/].some(n=>n.test(r.toString())))return`Could not start Cloudflare tunnel: ${ut(r.toString())}`}function ut(r){let t=/^[0-9TZ:-]+ (ERR )?/g,e=/connIndex.*/g;return r.replace(t,"").replace(e,"")}function ct(r){let t=r.toString().match(/(INF Registered tunnel connection|INF Connection)/)??void 0;return t&&t[0]}function dt(){return process.env.SHOPIFY_CLI_CLOUDFLARED_PATH?process.env.SHOPIFY_CLI_CLOUDFLARED_PATH:m(l(nt(import.meta.url)),"..","bin",process.platform==="win32"?"cloudflared.exe":"cloudflared")}function ft(){return process.env.SHOPIFY_CLI_CLOUDFLARED_DOMAIN??"trycloudflare.com"}export{$t as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as C,c as F}from"./chunk-
|
|
1
|
+
import{a as C,c as F}from"./chunk-ALQKJAHP.js";import{d as k,f as A,u as q}from"./chunk-5UXPTCSD.js";import{a as N}from"./chunk-6ZRHK4ON.js";import{a as E,c as J}from"./chunk-7XQDZF73.js";import{b as x}from"./chunk-H7PNMMDO.js";import{g as z,h as y}from"./chunk-2HZMOK4U.js";import{b}from"./chunk-Q6LCSRIW.js";import{E as m,v as f,x as S}from"./chunk-E24W34C4.js";import{d as u}from"./chunk-ELIH6GCC.js";import{Fb as c,Hb as n,Lb as O,Ta as v,ma as w,ua as g}from"./chunk-EYDNSYYE.js";import{e as I,g as l}from"./chunk-VKWPEFWQ.js";l();l();var M=I(z(),1);async function D(s,e){if(s)try{return JSON.parse(s)}catch(t){let r=t instanceof Error?t.message:"Unknown error";throw new u(n`Invalid JSON in ${c.yellow("--variables")} flag: ${r}`,"Please provide valid JSON format.")}else if(e){if(!await v(e))throw new u(n`Variable file not found at ${c.path(e)}. Please check the path and try again.`);let t=await w(e,{encoding:"utf8"});try{return JSON.parse(t)}catch(r){let p=r instanceof Error?r.message:"Unknown error";throw new u(n`Invalid JSON in variable file ${c.path(e)}: ${p}`,"Please provide valid JSON format.")}}}async function $(s){let{remoteApp:e,store:t,query:r,variables:p,variableFile:L,version:R,outputFile:d}=s,{adminSession:V,version:G}=await m({title:n`Authenticating`,task:async()=>{let o=await C(e,t.shopDomain),i=await A({adminSession:o,userSpecifiedVersion:R});return{adminSession:o,version:i}},renderOptions:{stdout:process.stderr}}),P=await D(p,L);k(r),F(r,t);try{let o=await m({title:n`Executing GraphQL operation`,task:async()=>x({query:(0,M.parse)(r),session:V,variables:P,version:G,responseOptions:{handleErrors:!1}}),renderOptions:{stdout:process.stderr}}),i=JSON.stringify(o,null,2);d?(await g(d,i),f({headline:"Operation succeeded.",body:`Results written to ${d}`})):(f({headline:"Operation succeeded."}),O(i))}catch(o){if(o instanceof y){let i={errors:o.response.errors},Q=JSON.stringify(i,null,2);S({headline:"GraphQL operation failed.",body:Q});return}throw o}}var h,a=class extends N{async run(){let{flags:e}=await this.parse(h),{query:t,appContextResult:r,store:p}=await q(e);return await $({organization:r.organization,remoteApp:r.remoteApp,store:p,query:t,variables:e.variables,variableFile:e["variable-file"],outputFile:e["output-file"],...e.version&&{version:e.version}}),{app:r.app}}};h=a;a.summary="Execute GraphQL queries and mutations.";a.descriptionWithMarkdown="Executes an Admin API GraphQL query or mutation on the specified store. Mutations are only allowed on dev stores.\n\n For operations that process large amounts of data, use [`bulk execute`](https://shopify.dev/docs/api/shopify-cli/app/app-bulk-execute) instead.";a.description=h.descriptionWithoutMarkdown();a.flags={...b,...E,...J};var oe=a;export{oe as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as ri}from"./chunk-RJ5VF3QY.js";import{d as si,g as ni}from"./chunk-WKBVT5WG.js";import{Ra as Jr,Sa as sr}from"./chunk-DONEJHDG.js";import{b as ti}from"./chunk-NNOSZ447.js";import{i as rr}from"./chunk-773TIA5M.js";import{a as mc}from"./chunk-CX5CC6P5.js";import{c as g,e as Wr,g as u}from"./chunk-VKWPEFWQ.js";var Nt=g(q=>{"use strict";u();Object.defineProperty(q,"__esModule",{value:!0});q.regexpCode=q.getEsmExportName=q.getProperty=q.safeStringify=q.stringify=q.strConcat=q.addCodeArg=q.str=q._=q.nil=q._Code=q.Name=q.IDENTIFIER=q._CodeOrName=void 0;var bt=class{};q._CodeOrName=bt;q.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Ve=class extends bt{constructor(e){if(super(),!q.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};q.Name=Ve;var se=class extends bt{constructor(e){super(),this._items=typeof e=="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((r,s)=>`${r}${s}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((r,s)=>(s instanceof Ve&&(r[s.str]=(r[s.str]||0)+1),r),{})}};q._Code=se;q.nil=new se("");function bi(t,...e){let r=[t[0]],s=0;for(;s<e.length;)os(r,e[s]),r.push(t[++s]);return new se(r)}q._=bi;var is=new se("+");function Pi(t,...e){let r=[Pt(t[0])],s=0;for(;s<e.length;)r.push(is),os(r,e[s]),r.push(is,Pt(t[++s]));return Nc(r),new se(r)}q.str=Pi;function os(t,e){e instanceof se?t.push(...e._items):e instanceof Ve?t.push(e):t.push(Ic(e))}q.addCodeArg=os;function Nc(t){let e=1;for(;e<t.length-1;){if(t[e]===is){let r=Oc(t[e-1],t[e+1]);if(r!==void 0){t.splice(e-1,3,r);continue}t[e++]="+"}e++}}function Oc(t,e){if(e==='""')return t;if(t==='""')return e;if(typeof t=="string")return e instanceof Ve||t[t.length-1]!=='"'?void 0:typeof e!="string"?`${t.slice(0,-1)}${e}"`:e[0]==='"'?t.slice(0,-1)+e.slice(1):void 0;if(typeof e=="string"&&e[0]==='"'&&!(t instanceof Ve))return`"${t}${e.slice(1)}`}function Tc(t,e){return e.emptyStr()?t:t.emptyStr()?e:Pi`${t}${e}`}q.strConcat=Tc;function Ic(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:Pt(Array.isArray(t)?t.join(","):t)}function kc(t){return new se(Pt(t))}q.stringify=kc;function Pt(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}q.safeStringify=Pt;function Rc(t){return typeof t=="string"&&q.IDENTIFIER.test(t)?new se(`.${t}`):bi`[${t}]`}q.getProperty=Rc;function jc(t){if(typeof t=="string"&&q.IDENTIFIER.test(t))return new se(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}q.getEsmExportName=jc;function qc(t){return new se(t.toString())}q.regexpCode=qc});var us=g(Q=>{"use strict";u();Object.defineProperty(Q,"__esModule",{value:!0});Q.ValueScope=Q.ValueScopeName=Q.Scope=Q.varKinds=Q.UsedValueState=void 0;var Z=Nt(),as=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},ar;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(ar||(Q.UsedValueState=ar={}));Q.varKinds={const:new Z.Name("const"),let:new Z.Name("let"),var:new Z.Name("var")};var cr=class{constructor({prefixes:e,parent:r}={}){this._names={},this._prefixes=e,this._parent=r}toName(e){return e instanceof Z.Name?e:this.name(e)}name(e){return new Z.Name(this._newName(e))}_newName(e){let r=this._names[e]||this._nameGroup(e);return`${e}${r.index++}`}_nameGroup(e){var r,s;if(!((s=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||s===void 0)&&s.has(e)||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};Q.Scope=cr;var ur=class extends Z.Name{constructor(e,r){super(r),this.prefix=e}setValue(e,{property:r,itemIndex:s}){this.value=e,this.scopePath=(0,Z._)`.${new Z.Name(r)}[${s}]`}};Q.ValueScopeName=ur;var Ac=(0,Z._)`\n`,cs=class extends cr{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?Ac:Z.nil}}get(){return this._scope}name(e){return new ur(e,this._newName(e))}value(e,r){var s;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let n=this.toName(e),{prefix:i}=n,o=(s=r.key)!==null&&s!==void 0?s:r.ref,a=this._values[i];if(a){let d=a.get(o);if(d)return d}else a=this._values[i]=new Map;a.set(o,n);let c=this._scope[i]||(this._scope[i]=[]),l=c.length;return c[l]=r.ref,n.setValue(r,{property:i,itemIndex:l}),n}getValue(e,r){let s=this._values[e];if(s)return s.get(r)}scopeRefs(e,r=this._values){return this._reduceValues(r,s=>{if(s.scopePath===void 0)throw new Error(`CodeGen: name "${s}" has no value`);return(0,Z._)`${e}${s.scopePath}`})}scopeCode(e=this._values,r,s){return this._reduceValues(e,n=>{if(n.value===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return n.value.code},r,s)}_reduceValues(e,r,s={},n){let i=Z.nil;for(let o in e){let a=e[o];if(!a)continue;let c=s[o]=s[o]||new Map;a.forEach(l=>{if(c.has(l))return;c.set(l,ar.Started);let d=r(l);if(d){let f=this.opts.es5?Q.varKinds.var:Q.varKinds.const;i=(0,Z._)`${i}${f} ${l} = ${d};${this.opts._n}`}else if(d=n?.(l))i=(0,Z._)`${i}${d}${this.opts._n}`;else throw new as(l);c.set(l,ar.Completed)})}return i}};Q.ValueScope=cs});var b=g(P=>{"use strict";u();Object.defineProperty(P,"__esModule",{value:!0});P.or=P.and=P.not=P.CodeGen=P.operators=P.varKinds=P.ValueScopeName=P.ValueScope=P.Scope=P.Name=P.regexpCode=P.stringify=P.getProperty=P.nil=P.strConcat=P.str=P._=void 0;var T=Nt(),ue=us(),Ie=Nt();Object.defineProperty(P,"_",{enumerable:!0,get:function(){return Ie._}});Object.defineProperty(P,"str",{enumerable:!0,get:function(){return Ie.str}});Object.defineProperty(P,"strConcat",{enumerable:!0,get:function(){return Ie.strConcat}});Object.defineProperty(P,"nil",{enumerable:!0,get:function(){return Ie.nil}});Object.defineProperty(P,"getProperty",{enumerable:!0,get:function(){return Ie.getProperty}});Object.defineProperty(P,"stringify",{enumerable:!0,get:function(){return Ie.stringify}});Object.defineProperty(P,"regexpCode",{enumerable:!0,get:function(){return Ie.regexpCode}});Object.defineProperty(P,"Name",{enumerable:!0,get:function(){return Ie.Name}});var hr=us();Object.defineProperty(P,"Scope",{enumerable:!0,get:function(){return hr.Scope}});Object.defineProperty(P,"ValueScope",{enumerable:!0,get:function(){return hr.ValueScope}});Object.defineProperty(P,"ValueScopeName",{enumerable:!0,get:function(){return hr.ValueScopeName}});Object.defineProperty(P,"varKinds",{enumerable:!0,get:function(){return hr.varKinds}});P.operators={GT:new T._Code(">"),GTE:new T._Code(">="),LT:new T._Code("<"),LTE:new T._Code("<="),EQ:new T._Code("==="),NEQ:new T._Code("!=="),NOT:new T._Code("!"),OR:new T._Code("||"),AND:new T._Code("&&"),ADD:new T._Code("+")};var be=class{optimizeNodes(){return this}optimizeNames(e,r){return this}},ls=class extends be{constructor(e,r,s){super(),this.varKind=e,this.name=r,this.rhs=s}render({es5:e,_n:r}){let s=e?ue.varKinds.var:this.varKind,n=this.rhs===void 0?"":` = ${this.rhs}`;return`${s} ${this.name}${n};`+r}optimizeNames(e,r){if(e[this.name.str])return this.rhs&&(this.rhs=rt(this.rhs,e,r)),this}get names(){return this.rhs instanceof T._CodeOrName?this.rhs.names:{}}},lr=class extends be{constructor(e,r,s){super(),this.lhs=e,this.rhs=r,this.sideEffects=s}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,r){if(!(this.lhs instanceof T.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=rt(this.rhs,e,r),this}get names(){let e=this.lhs instanceof T.Name?{}:{...this.lhs.names};return fr(e,this.rhs)}},ds=class extends lr{constructor(e,r,s,n){super(e,s,n),this.op=r}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},fs=class extends be{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},hs=class extends be{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},ps=class extends be{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},ms=class extends be{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,r){return this.code=rt(this.code,e,r),this}get names(){return this.code instanceof T._CodeOrName?this.code.names:{}}},Ot=class extends be{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((r,s)=>r+s.render(e),"")}optimizeNodes(){let{nodes:e}=this,r=e.length;for(;r--;){let s=e[r].optimizeNodes();Array.isArray(s)?e.splice(r,1,...s):s?e[r]=s:e.splice(r,1)}return e.length>0?this:void 0}optimizeNames(e,r){let{nodes:s}=this,n=s.length;for(;n--;){let i=s[n];i.optimizeNames(e,r)||(Cc(e,i.names),s.splice(n,1))}return s.length>0?this:void 0}get names(){return this.nodes.reduce((e,r)=>Ke(e,r.names),{})}},Pe=class extends Ot{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},ys=class extends Ot{},tt=class extends Pe{};tt.kind="else";var Ue=class t extends Pe{constructor(e,r){super(r),this.condition=e}render(e){let r=`if(${this.condition})`+super.render(e);return this.else&&(r+="else "+this.else.render(e)),r}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let r=this.else;if(r){let s=r.optimizeNodes();r=this.else=Array.isArray(s)?new tt(s):s}if(r)return e===!1?r instanceof t?r:r.nodes:this.nodes.length?this:new t(Ni(e),r instanceof t?[r]:r.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,r){var s;if(this.else=(s=this.else)===null||s===void 0?void 0:s.optimizeNames(e,r),!!(super.optimizeNames(e,r)||this.else))return this.condition=rt(this.condition,e,r),this}get names(){let e=super.names;return fr(e,this.condition),this.else&&Ke(e,this.else.names),e}};Ue.kind="if";var Le=class extends Pe{};Le.kind="for";var _s=class extends Le{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iteration=rt(this.iteration,e,r),this}get names(){return Ke(super.names,this.iteration.names)}},gs=class extends Le{constructor(e,r,s,n){super(),this.varKind=e,this.name=r,this.from=s,this.to=n}render(e){let r=e.es5?ue.varKinds.var:this.varKind,{name:s,from:n,to:i}=this;return`for(${r} ${s}=${n}; ${s}<${i}; ${s}++)`+super.render(e)}get names(){let e=fr(super.names,this.from);return fr(e,this.to)}},dr=class extends Le{constructor(e,r,s,n){super(),this.loop=e,this.varKind=r,this.name=s,this.iterable=n}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iterable=rt(this.iterable,e,r),this}get names(){return Ke(super.names,this.iterable.names)}},Tt=class extends Pe{constructor(e,r,s){super(),this.name=e,this.args=r,this.async=s}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};Tt.kind="func";var It=class extends Ot{render(e){return"return "+super.render(e)}};It.kind="return";var $s=class extends Pe{render(e){let r="try"+super.render(e);return this.catch&&(r+=this.catch.render(e)),this.finally&&(r+=this.finally.render(e)),r}optimizeNodes(){var e,r;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(e,r){var s,n;return super.optimizeNames(e,r),(s=this.catch)===null||s===void 0||s.optimizeNames(e,r),(n=this.finally)===null||n===void 0||n.optimizeNames(e,r),this}get names(){let e=super.names;return this.catch&&Ke(e,this.catch.names),this.finally&&Ke(e,this.finally.names),e}},kt=class extends Pe{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};kt.kind="catch";var Rt=class extends Pe{render(e){return"finally"+super.render(e)}};Rt.kind="finally";var vs=class{constructor(e,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
|
|
1
|
+
import{a as ri}from"./chunk-RJ5VF3QY.js";import{d as si,g as ni}from"./chunk-ELIH6GCC.js";import{Ra as Jr,Sa as sr}from"./chunk-EYDNSYYE.js";import{b as ti}from"./chunk-NNOSZ447.js";import{i as rr}from"./chunk-773TIA5M.js";import{a as mc}from"./chunk-CX5CC6P5.js";import{c as g,e as Wr,g as u}from"./chunk-VKWPEFWQ.js";var Nt=g(q=>{"use strict";u();Object.defineProperty(q,"__esModule",{value:!0});q.regexpCode=q.getEsmExportName=q.getProperty=q.safeStringify=q.stringify=q.strConcat=q.addCodeArg=q.str=q._=q.nil=q._Code=q.Name=q.IDENTIFIER=q._CodeOrName=void 0;var bt=class{};q._CodeOrName=bt;q.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Ve=class extends bt{constructor(e){if(super(),!q.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};q.Name=Ve;var se=class extends bt{constructor(e){super(),this._items=typeof e=="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((r,s)=>`${r}${s}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((r,s)=>(s instanceof Ve&&(r[s.str]=(r[s.str]||0)+1),r),{})}};q._Code=se;q.nil=new se("");function bi(t,...e){let r=[t[0]],s=0;for(;s<e.length;)os(r,e[s]),r.push(t[++s]);return new se(r)}q._=bi;var is=new se("+");function Pi(t,...e){let r=[Pt(t[0])],s=0;for(;s<e.length;)r.push(is),os(r,e[s]),r.push(is,Pt(t[++s]));return Nc(r),new se(r)}q.str=Pi;function os(t,e){e instanceof se?t.push(...e._items):e instanceof Ve?t.push(e):t.push(Ic(e))}q.addCodeArg=os;function Nc(t){let e=1;for(;e<t.length-1;){if(t[e]===is){let r=Oc(t[e-1],t[e+1]);if(r!==void 0){t.splice(e-1,3,r);continue}t[e++]="+"}e++}}function Oc(t,e){if(e==='""')return t;if(t==='""')return e;if(typeof t=="string")return e instanceof Ve||t[t.length-1]!=='"'?void 0:typeof e!="string"?`${t.slice(0,-1)}${e}"`:e[0]==='"'?t.slice(0,-1)+e.slice(1):void 0;if(typeof e=="string"&&e[0]==='"'&&!(t instanceof Ve))return`"${t}${e.slice(1)}`}function Tc(t,e){return e.emptyStr()?t:t.emptyStr()?e:Pi`${t}${e}`}q.strConcat=Tc;function Ic(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:Pt(Array.isArray(t)?t.join(","):t)}function kc(t){return new se(Pt(t))}q.stringify=kc;function Pt(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}q.safeStringify=Pt;function Rc(t){return typeof t=="string"&&q.IDENTIFIER.test(t)?new se(`.${t}`):bi`[${t}]`}q.getProperty=Rc;function jc(t){if(typeof t=="string"&&q.IDENTIFIER.test(t))return new se(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}q.getEsmExportName=jc;function qc(t){return new se(t.toString())}q.regexpCode=qc});var us=g(Q=>{"use strict";u();Object.defineProperty(Q,"__esModule",{value:!0});Q.ValueScope=Q.ValueScopeName=Q.Scope=Q.varKinds=Q.UsedValueState=void 0;var Z=Nt(),as=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},ar;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(ar||(Q.UsedValueState=ar={}));Q.varKinds={const:new Z.Name("const"),let:new Z.Name("let"),var:new Z.Name("var")};var cr=class{constructor({prefixes:e,parent:r}={}){this._names={},this._prefixes=e,this._parent=r}toName(e){return e instanceof Z.Name?e:this.name(e)}name(e){return new Z.Name(this._newName(e))}_newName(e){let r=this._names[e]||this._nameGroup(e);return`${e}${r.index++}`}_nameGroup(e){var r,s;if(!((s=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||s===void 0)&&s.has(e)||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};Q.Scope=cr;var ur=class extends Z.Name{constructor(e,r){super(r),this.prefix=e}setValue(e,{property:r,itemIndex:s}){this.value=e,this.scopePath=(0,Z._)`.${new Z.Name(r)}[${s}]`}};Q.ValueScopeName=ur;var Ac=(0,Z._)`\n`,cs=class extends cr{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?Ac:Z.nil}}get(){return this._scope}name(e){return new ur(e,this._newName(e))}value(e,r){var s;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let n=this.toName(e),{prefix:i}=n,o=(s=r.key)!==null&&s!==void 0?s:r.ref,a=this._values[i];if(a){let d=a.get(o);if(d)return d}else a=this._values[i]=new Map;a.set(o,n);let c=this._scope[i]||(this._scope[i]=[]),l=c.length;return c[l]=r.ref,n.setValue(r,{property:i,itemIndex:l}),n}getValue(e,r){let s=this._values[e];if(s)return s.get(r)}scopeRefs(e,r=this._values){return this._reduceValues(r,s=>{if(s.scopePath===void 0)throw new Error(`CodeGen: name "${s}" has no value`);return(0,Z._)`${e}${s.scopePath}`})}scopeCode(e=this._values,r,s){return this._reduceValues(e,n=>{if(n.value===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return n.value.code},r,s)}_reduceValues(e,r,s={},n){let i=Z.nil;for(let o in e){let a=e[o];if(!a)continue;let c=s[o]=s[o]||new Map;a.forEach(l=>{if(c.has(l))return;c.set(l,ar.Started);let d=r(l);if(d){let f=this.opts.es5?Q.varKinds.var:Q.varKinds.const;i=(0,Z._)`${i}${f} ${l} = ${d};${this.opts._n}`}else if(d=n?.(l))i=(0,Z._)`${i}${d}${this.opts._n}`;else throw new as(l);c.set(l,ar.Completed)})}return i}};Q.ValueScope=cs});var b=g(P=>{"use strict";u();Object.defineProperty(P,"__esModule",{value:!0});P.or=P.and=P.not=P.CodeGen=P.operators=P.varKinds=P.ValueScopeName=P.ValueScope=P.Scope=P.Name=P.regexpCode=P.stringify=P.getProperty=P.nil=P.strConcat=P.str=P._=void 0;var T=Nt(),ue=us(),Ie=Nt();Object.defineProperty(P,"_",{enumerable:!0,get:function(){return Ie._}});Object.defineProperty(P,"str",{enumerable:!0,get:function(){return Ie.str}});Object.defineProperty(P,"strConcat",{enumerable:!0,get:function(){return Ie.strConcat}});Object.defineProperty(P,"nil",{enumerable:!0,get:function(){return Ie.nil}});Object.defineProperty(P,"getProperty",{enumerable:!0,get:function(){return Ie.getProperty}});Object.defineProperty(P,"stringify",{enumerable:!0,get:function(){return Ie.stringify}});Object.defineProperty(P,"regexpCode",{enumerable:!0,get:function(){return Ie.regexpCode}});Object.defineProperty(P,"Name",{enumerable:!0,get:function(){return Ie.Name}});var hr=us();Object.defineProperty(P,"Scope",{enumerable:!0,get:function(){return hr.Scope}});Object.defineProperty(P,"ValueScope",{enumerable:!0,get:function(){return hr.ValueScope}});Object.defineProperty(P,"ValueScopeName",{enumerable:!0,get:function(){return hr.ValueScopeName}});Object.defineProperty(P,"varKinds",{enumerable:!0,get:function(){return hr.varKinds}});P.operators={GT:new T._Code(">"),GTE:new T._Code(">="),LT:new T._Code("<"),LTE:new T._Code("<="),EQ:new T._Code("==="),NEQ:new T._Code("!=="),NOT:new T._Code("!"),OR:new T._Code("||"),AND:new T._Code("&&"),ADD:new T._Code("+")};var be=class{optimizeNodes(){return this}optimizeNames(e,r){return this}},ls=class extends be{constructor(e,r,s){super(),this.varKind=e,this.name=r,this.rhs=s}render({es5:e,_n:r}){let s=e?ue.varKinds.var:this.varKind,n=this.rhs===void 0?"":` = ${this.rhs}`;return`${s} ${this.name}${n};`+r}optimizeNames(e,r){if(e[this.name.str])return this.rhs&&(this.rhs=rt(this.rhs,e,r)),this}get names(){return this.rhs instanceof T._CodeOrName?this.rhs.names:{}}},lr=class extends be{constructor(e,r,s){super(),this.lhs=e,this.rhs=r,this.sideEffects=s}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,r){if(!(this.lhs instanceof T.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=rt(this.rhs,e,r),this}get names(){let e=this.lhs instanceof T.Name?{}:{...this.lhs.names};return fr(e,this.rhs)}},ds=class extends lr{constructor(e,r,s,n){super(e,s,n),this.op=r}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},fs=class extends be{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},hs=class extends be{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},ps=class extends be{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},ms=class extends be{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,r){return this.code=rt(this.code,e,r),this}get names(){return this.code instanceof T._CodeOrName?this.code.names:{}}},Ot=class extends be{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((r,s)=>r+s.render(e),"")}optimizeNodes(){let{nodes:e}=this,r=e.length;for(;r--;){let s=e[r].optimizeNodes();Array.isArray(s)?e.splice(r,1,...s):s?e[r]=s:e.splice(r,1)}return e.length>0?this:void 0}optimizeNames(e,r){let{nodes:s}=this,n=s.length;for(;n--;){let i=s[n];i.optimizeNames(e,r)||(Cc(e,i.names),s.splice(n,1))}return s.length>0?this:void 0}get names(){return this.nodes.reduce((e,r)=>Ke(e,r.names),{})}},Pe=class extends Ot{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},ys=class extends Ot{},tt=class extends Pe{};tt.kind="else";var Ue=class t extends Pe{constructor(e,r){super(r),this.condition=e}render(e){let r=`if(${this.condition})`+super.render(e);return this.else&&(r+="else "+this.else.render(e)),r}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let r=this.else;if(r){let s=r.optimizeNodes();r=this.else=Array.isArray(s)?new tt(s):s}if(r)return e===!1?r instanceof t?r:r.nodes:this.nodes.length?this:new t(Ni(e),r instanceof t?[r]:r.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,r){var s;if(this.else=(s=this.else)===null||s===void 0?void 0:s.optimizeNames(e,r),!!(super.optimizeNames(e,r)||this.else))return this.condition=rt(this.condition,e,r),this}get names(){let e=super.names;return fr(e,this.condition),this.else&&Ke(e,this.else.names),e}};Ue.kind="if";var Le=class extends Pe{};Le.kind="for";var _s=class extends Le{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iteration=rt(this.iteration,e,r),this}get names(){return Ke(super.names,this.iteration.names)}},gs=class extends Le{constructor(e,r,s,n){super(),this.varKind=e,this.name=r,this.from=s,this.to=n}render(e){let r=e.es5?ue.varKinds.var:this.varKind,{name:s,from:n,to:i}=this;return`for(${r} ${s}=${n}; ${s}<${i}; ${s}++)`+super.render(e)}get names(){let e=fr(super.names,this.from);return fr(e,this.to)}},dr=class extends Le{constructor(e,r,s,n){super(),this.loop=e,this.varKind=r,this.name=s,this.iterable=n}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iterable=rt(this.iterable,e,r),this}get names(){return Ke(super.names,this.iterable.names)}},Tt=class extends Pe{constructor(e,r,s){super(),this.name=e,this.args=r,this.async=s}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};Tt.kind="func";var It=class extends Ot{render(e){return"return "+super.render(e)}};It.kind="return";var $s=class extends Pe{render(e){let r="try"+super.render(e);return this.catch&&(r+=this.catch.render(e)),this.finally&&(r+=this.finally.render(e)),r}optimizeNodes(){var e,r;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(e,r){var s,n;return super.optimizeNames(e,r),(s=this.catch)===null||s===void 0||s.optimizeNames(e,r),(n=this.finally)===null||n===void 0||n.optimizeNames(e,r),this}get names(){let e=super.names;return this.catch&&Ke(e,this.catch.names),this.finally&&Ke(e,this.finally.names),e}},kt=class extends Pe{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};kt.kind="catch";var Rt=class extends Pe{render(e){return"finally"+super.render(e)}};Rt.kind="finally";var vs=class{constructor(e,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
|
|
2
2
|
`:""},this._extScope=e,this._scope=new ue.Scope({parent:e}),this._nodes=[new ys]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,r){let s=this._extScope.value(e,r);return(this._values[s.prefix]||(this._values[s.prefix]=new Set)).add(s),s}getScopeValue(e,r){return this._extScope.getValue(e,r)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,r,s,n){let i=this._scope.toName(r);return s!==void 0&&n&&(this._constants[i.str]=s),this._leafNode(new ls(e,i,s)),i}const(e,r,s){return this._def(ue.varKinds.const,e,r,s)}let(e,r,s){return this._def(ue.varKinds.let,e,r,s)}var(e,r,s){return this._def(ue.varKinds.var,e,r,s)}assign(e,r,s){return this._leafNode(new lr(e,r,s))}add(e,r){return this._leafNode(new ds(e,P.operators.ADD,r))}code(e){return typeof e=="function"?e():e!==T.nil&&this._leafNode(new ms(e)),this}object(...e){let r=["{"];for(let[s,n]of e)r.length>1&&r.push(","),r.push(s),(s!==n||this.opts.es5)&&(r.push(":"),(0,T.addCodeArg)(r,n));return r.push("}"),new T._Code(r)}if(e,r,s){if(this._blockNode(new Ue(e)),r&&s)this.code(r).else().code(s).endIf();else if(r)this.code(r).endIf();else if(s)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new Ue(e))}else(){return this._elseNode(new tt)}endIf(){return this._endBlockNode(Ue,tt)}_for(e,r){return this._blockNode(e),r&&this.code(r).endFor(),this}for(e,r){return this._for(new _s(e),r)}forRange(e,r,s,n,i=this.opts.es5?ue.varKinds.var:ue.varKinds.let){let o=this._scope.toName(e);return this._for(new gs(i,o,r,s),()=>n(o))}forOf(e,r,s,n=ue.varKinds.const){let i=this._scope.toName(e);if(this.opts.es5){let o=r instanceof T.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,T._)`${o}.length`,a=>{this.var(i,(0,T._)`${o}[${a}]`),s(i)})}return this._for(new dr("of",n,i,r),()=>s(i))}forIn(e,r,s,n=this.opts.es5?ue.varKinds.var:ue.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,T._)`Object.keys(${r})`,s);let i=this._scope.toName(e);return this._for(new dr("in",n,i,r),()=>s(i))}endFor(){return this._endBlockNode(Le)}label(e){return this._leafNode(new fs(e))}break(e){return this._leafNode(new hs(e))}return(e){let r=new It;if(this._blockNode(r),this.code(e),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(It)}try(e,r,s){if(!r&&!s)throw new Error('CodeGen: "try" without "catch" and "finally"');let n=new $s;if(this._blockNode(n),this.code(e),r){let i=this.name("e");this._currNode=n.catch=new kt(i),r(i)}return s&&(this._currNode=n.finally=new Rt,this.code(s)),this._endBlockNode(kt,Rt)}throw(e){return this._leafNode(new ps(e))}block(e,r){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(r),this}endBlock(e){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let s=this._nodes.length-r;if(s<0||e!==void 0&&s!==e)throw new Error(`CodeGen: wrong number of nodes: ${s} vs ${e} expected`);return this._nodes.length=r,this}func(e,r=T.nil,s,n){return this._blockNode(new Tt(e,r,s)),n&&this.code(n).endFunc(),this}endFunc(){return this._endBlockNode(Tt)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,r){let s=this._currNode;if(s instanceof e||r&&s instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${e.kind}/${r.kind}`:e.kind}"`)}_elseNode(e){let r=this._currNode;if(!(r instanceof Ue))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let r=this._nodes;r[r.length-1]=e}};P.CodeGen=vs;function Ke(t,e){for(let r in e)t[r]=(t[r]||0)+(e[r]||0);return t}function fr(t,e){return e instanceof T._CodeOrName?Ke(t,e.names):t}function rt(t,e,r){if(t instanceof T.Name)return s(t);if(!n(t))return t;return new T._Code(t._items.reduce((i,o)=>(o instanceof T.Name&&(o=s(o)),o instanceof T._Code?i.push(...o._items):i.push(o),i),[]));function s(i){let o=r[i.str];return o===void 0||e[i.str]!==1?i:(delete e[i.str],o)}function n(i){return i instanceof T._Code&&i._items.some(o=>o instanceof T.Name&&e[o.str]===1&&r[o.str]!==void 0)}}function Cc(t,e){for(let r in e)t[r]=(t[r]||0)-(e[r]||0)}function Ni(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,T._)`!${ws(t)}`}P.not=Ni;var Mc=Oi(P.operators.AND);function Dc(...t){return t.reduce(Mc)}P.and=Dc;var xc=Oi(P.operators.OR);function zc(...t){return t.reduce(xc)}P.or=zc;function Oi(t){return(e,r)=>e===T.nil?r:r===T.nil?e:(0,T._)`${ws(e)} ${t} ${ws(r)}`}function ws(t){return t instanceof T.Name?t:(0,T._)`(${t})`}});var k=g(N=>{"use strict";u();Object.defineProperty(N,"__esModule",{value:!0});N.checkStrictMode=N.getErrorPath=N.Type=N.useFunc=N.setEvaluated=N.evaluatedPropsToName=N.mergeEvaluated=N.eachItem=N.unescapeJsonPointer=N.escapeJsonPointer=N.escapeFragment=N.unescapeFragment=N.schemaRefOrVal=N.schemaHasRulesButRef=N.schemaHasRules=N.checkUnknownRules=N.alwaysValidSchema=N.toHash=void 0;var C=b(),Fc=Nt();function Vc(t){let e={};for(let r of t)e[r]=!0;return e}N.toHash=Vc;function Uc(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(ki(t,e),!Ri(e,t.self.RULES.all))}N.alwaysValidSchema=Uc;function ki(t,e=t.schema){let{opts:r,self:s}=t;if(!r.strictSchema||typeof e=="boolean")return;let n=s.RULES.keywords;for(let i in e)n[i]||Ai(t,`unknown keyword: "${i}"`)}N.checkUnknownRules=ki;function Ri(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(e[r])return!0;return!1}N.schemaHasRules=Ri;function Lc(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(r!=="$ref"&&e.all[r])return!0;return!1}N.schemaHasRulesButRef=Lc;function Kc({topSchemaRef:t,schemaPath:e},r,s,n){if(!n){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,C._)`${r}`}return(0,C._)`${t}${e}${(0,C.getProperty)(s)}`}N.schemaRefOrVal=Kc;function Gc(t){return ji(decodeURIComponent(t))}N.unescapeFragment=Gc;function Hc(t){return encodeURIComponent(Ss(t))}N.escapeFragment=Hc;function Ss(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}N.escapeJsonPointer=Ss;function ji(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}N.unescapeJsonPointer=ji;function Wc(t,e){if(Array.isArray(t))for(let r of t)e(r);else e(t)}N.eachItem=Wc;function Ti({mergeNames:t,mergeToName:e,mergeValues:r,resultToName:s}){return(n,i,o,a)=>{let c=o===void 0?i:o instanceof C.Name?(i instanceof C.Name?t(n,i,o):e(n,i,o),o):i instanceof C.Name?(e(n,o,i),i):r(i,o);return a===C.Name&&!(c instanceof C.Name)?s(n,c):c}}N.mergeEvaluated={props:Ti({mergeNames:(t,e,r)=>t.if((0,C._)`${r} !== true && ${e} !== undefined`,()=>{t.if((0,C._)`${e} === true`,()=>t.assign(r,!0),()=>t.assign(r,(0,C._)`${r} || {}`).code((0,C._)`Object.assign(${r}, ${e})`))}),mergeToName:(t,e,r)=>t.if((0,C._)`${r} !== true`,()=>{e===!0?t.assign(r,!0):(t.assign(r,(0,C._)`${r} || {}`),bs(t,r,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:qi}),items:Ti({mergeNames:(t,e,r)=>t.if((0,C._)`${r} !== true && ${e} !== undefined`,()=>t.assign(r,(0,C._)`${e} === true ? true : ${r} > ${e} ? ${r} : ${e}`)),mergeToName:(t,e,r)=>t.if((0,C._)`${r} !== true`,()=>t.assign(r,e===!0?!0:(0,C._)`${r} > ${e} ? ${r} : ${e}`)),mergeValues:(t,e)=>t===!0?!0:Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})};function qi(t,e){if(e===!0)return t.var("props",!0);let r=t.var("props",(0,C._)`{}`);return e!==void 0&&bs(t,r,e),r}N.evaluatedPropsToName=qi;function bs(t,e,r){Object.keys(r).forEach(s=>t.assign((0,C._)`${e}${(0,C.getProperty)(s)}`,!0))}N.setEvaluated=bs;var Ii={};function Jc(t,e){return t.scopeValue("func",{ref:e,code:Ii[e.code]||(Ii[e.code]=new Fc._Code(e.code))})}N.useFunc=Jc;var Es;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(Es||(N.Type=Es={}));function Yc(t,e,r){if(t instanceof C.Name){let s=e===Es.Num;return r?s?(0,C._)`"[" + ${t} + "]"`:(0,C._)`"['" + ${t} + "']"`:s?(0,C._)`"/" + ${t}`:(0,C._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,C.getProperty)(t).toString():"/"+Ss(t)}N.getErrorPath=Yc;function Ai(t,e,r=t.opts.strictSchema){if(r){if(e=`strict mode: ${e}`,r===!0)throw new Error(e);t.self.logger.warn(e)}}N.checkStrictMode=Ai});var Ne=g(Ps=>{"use strict";u();Object.defineProperty(Ps,"__esModule",{value:!0});var H=b(),Bc={data:new H.Name("data"),valCxt:new H.Name("valCxt"),instancePath:new H.Name("instancePath"),parentData:new H.Name("parentData"),parentDataProperty:new H.Name("parentDataProperty"),rootData:new H.Name("rootData"),dynamicAnchors:new H.Name("dynamicAnchors"),vErrors:new H.Name("vErrors"),errors:new H.Name("errors"),this:new H.Name("this"),self:new H.Name("self"),scope:new H.Name("scope"),json:new H.Name("json"),jsonPos:new H.Name("jsonPos"),jsonLen:new H.Name("jsonLen"),jsonPart:new H.Name("jsonPart")};Ps.default=Bc});var jt=g(W=>{"use strict";u();Object.defineProperty(W,"__esModule",{value:!0});W.extendErrors=W.resetErrorsCount=W.reportExtraError=W.reportError=W.keyword$DataError=W.keywordError=void 0;var R=b(),pr=k(),Y=Ne();W.keywordError={message:({keyword:t})=>(0,R.str)`must pass "${t}" keyword validation`};W.keyword$DataError={message:({keyword:t,schemaType:e})=>e?(0,R.str)`"${t}" keyword must be ${e} ($data)`:(0,R.str)`"${t}" keyword is invalid ($data)`};function Xc(t,e=W.keywordError,r,s){let{it:n}=t,{gen:i,compositeRule:o,allErrors:a}=n,c=Di(t,e,r);s??(o||a)?Ci(i,c):Mi(n,(0,R._)`[${c}]`)}W.reportError=Xc;function Zc(t,e=W.keywordError,r){let{it:s}=t,{gen:n,compositeRule:i,allErrors:o}=s,a=Di(t,e,r);Ci(n,a),i||o||Mi(s,Y.default.vErrors)}W.reportExtraError=Zc;function Qc(t,e){t.assign(Y.default.errors,e),t.if((0,R._)`${Y.default.vErrors} !== null`,()=>t.if(e,()=>t.assign((0,R._)`${Y.default.vErrors}.length`,e),()=>t.assign(Y.default.vErrors,null)))}W.resetErrorsCount=Qc;function eu({gen:t,keyword:e,schemaValue:r,data:s,errsCount:n,it:i}){if(n===void 0)throw new Error("ajv implementation error");let o=t.name("err");t.forRange("i",n,Y.default.errors,a=>{t.const(o,(0,R._)`${Y.default.vErrors}[${a}]`),t.if((0,R._)`${o}.instancePath === undefined`,()=>t.assign((0,R._)`${o}.instancePath`,(0,R.strConcat)(Y.default.instancePath,i.errorPath))),t.assign((0,R._)`${o}.schemaPath`,(0,R.str)`${i.errSchemaPath}/${e}`),i.opts.verbose&&(t.assign((0,R._)`${o}.schema`,r),t.assign((0,R._)`${o}.data`,s))})}W.extendErrors=eu;function Ci(t,e){let r=t.const("err",e);t.if((0,R._)`${Y.default.vErrors} === null`,()=>t.assign(Y.default.vErrors,(0,R._)`[${r}]`),(0,R._)`${Y.default.vErrors}.push(${r})`),t.code((0,R._)`${Y.default.errors}++`)}function Mi(t,e){let{gen:r,validateName:s,schemaEnv:n}=t;n.$async?r.throw((0,R._)`new ${t.ValidationError}(${e})`):(r.assign((0,R._)`${s}.errors`,e),r.return(!1))}var Ge={keyword:new R.Name("keyword"),schemaPath:new R.Name("schemaPath"),params:new R.Name("params"),propertyName:new R.Name("propertyName"),message:new R.Name("message"),schema:new R.Name("schema"),parentSchema:new R.Name("parentSchema")};function Di(t,e,r){let{createErrors:s}=t.it;return s===!1?(0,R._)`{}`:tu(t,e,r)}function tu(t,e,r={}){let{gen:s,it:n}=t,i=[ru(n,r),su(t,r)];return nu(t,e,i),s.object(...i)}function ru({errorPath:t},{instancePath:e}){let r=e?(0,R.str)`${t}${(0,pr.getErrorPath)(e,pr.Type.Str)}`:t;return[Y.default.instancePath,(0,R.strConcat)(Y.default.instancePath,r)]}function su({keyword:t,it:{errSchemaPath:e}},{schemaPath:r,parentSchema:s}){let n=s?e:(0,R.str)`${e}/${t}`;return r&&(n=(0,R.str)`${n}${(0,pr.getErrorPath)(r,pr.Type.Str)}`),[Ge.schemaPath,n]}function nu(t,{params:e,message:r},s){let{keyword:n,data:i,schemaValue:o,it:a}=t,{opts:c,propertyName:l,topSchemaRef:d,schemaPath:f}=a;s.push([Ge.keyword,n],[Ge.params,typeof e=="function"?e(t):e||(0,R._)`{}`]),c.messages&&s.push([Ge.message,typeof r=="function"?r(t):r]),c.verbose&&s.push([Ge.schema,o],[Ge.parentSchema,(0,R._)`${d}${f}`],[Y.default.data,i]),l&&s.push([Ge.propertyName,l])}});var zi=g(st=>{"use strict";u();Object.defineProperty(st,"__esModule",{value:!0});st.boolOrEmptySchema=st.topBoolOrEmptySchema=void 0;var iu=jt(),ou=b(),au=Ne(),cu={message:"boolean schema is false"};function uu(t){let{gen:e,schema:r,validateName:s}=t;r===!1?xi(t,!1):typeof r=="object"&&r.$async===!0?e.return(au.default.data):(e.assign((0,ou._)`${s}.errors`,null),e.return(!0))}st.topBoolOrEmptySchema=uu;function lu(t,e){let{gen:r,schema:s}=t;s===!1?(r.var(e,!1),xi(t)):r.var(e,!0)}st.boolOrEmptySchema=lu;function xi(t,e){let{gen:r,data:s}=t,n={gen:r,keyword:"false schema",data:s,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,iu.reportError)(n,cu,void 0,e)}});var Ns=g(nt=>{"use strict";u();Object.defineProperty(nt,"__esModule",{value:!0});nt.getRules=nt.isJSONType=void 0;var du=["string","number","integer","boolean","null","object","array"],fu=new Set(du);function hu(t){return typeof t=="string"&&fu.has(t)}nt.isJSONType=hu;function pu(){let t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...t,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}}nt.getRules=pu});var Os=g(ke=>{"use strict";u();Object.defineProperty(ke,"__esModule",{value:!0});ke.shouldUseRule=ke.shouldUseGroup=ke.schemaHasRulesForType=void 0;function mu({schema:t,self:e},r){let s=e.RULES.types[r];return s&&s!==!0&&Fi(t,s)}ke.schemaHasRulesForType=mu;function Fi(t,e){return e.rules.some(r=>Vi(t,r))}ke.shouldUseGroup=Fi;function Vi(t,e){var r;return t[e.keyword]!==void 0||((r=e.definition.implements)===null||r===void 0?void 0:r.some(s=>t[s]!==void 0))}ke.shouldUseRule=Vi});var qt=g(J=>{"use strict";u();Object.defineProperty(J,"__esModule",{value:!0});J.reportTypeError=J.checkDataTypes=J.checkDataType=J.coerceAndCheckDataType=J.getJSONTypes=J.getSchemaTypes=J.DataType=void 0;var yu=Ns(),_u=Os(),gu=jt(),S=b(),Ui=k(),it;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(it||(J.DataType=it={}));function $u(t){let e=Li(t.type);if(e.includes("null")){if(t.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&t.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');t.nullable===!0&&e.push("null")}return e}J.getSchemaTypes=$u;function Li(t){let e=Array.isArray(t)?t:t?[t]:[];if(e.every(yu.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}J.getJSONTypes=Li;function vu(t,e){let{gen:r,data:s,opts:n}=t,i=wu(e,n.coerceTypes),o=e.length>0&&!(i.length===0&&e.length===1&&(0,_u.schemaHasRulesForType)(t,e[0]));if(o){let a=Is(e,s,n.strictNumbers,it.Wrong);r.if(a,()=>{i.length?Eu(t,e,i):ks(t)})}return o}J.coerceAndCheckDataType=vu;var Ki=new Set(["string","number","integer","boolean","null"]);function wu(t,e){return e?t.filter(r=>Ki.has(r)||e==="array"&&r==="array"):[]}function Eu(t,e,r){let{gen:s,data:n,opts:i}=t,o=s.let("dataType",(0,S._)`typeof ${n}`),a=s.let("coerced",(0,S._)`undefined`);i.coerceTypes==="array"&&s.if((0,S._)`${o} == 'object' && Array.isArray(${n}) && ${n}.length == 1`,()=>s.assign(n,(0,S._)`${n}[0]`).assign(o,(0,S._)`typeof ${n}`).if(Is(e,n,i.strictNumbers),()=>s.assign(a,n))),s.if((0,S._)`${a} !== undefined`);for(let l of r)(Ki.has(l)||l==="array"&&i.coerceTypes==="array")&&c(l);s.else(),ks(t),s.endIf(),s.if((0,S._)`${a} !== undefined`,()=>{s.assign(n,a),Su(t,a)});function c(l){switch(l){case"string":s.elseIf((0,S._)`${o} == "number" || ${o} == "boolean"`).assign(a,(0,S._)`"" + ${n}`).elseIf((0,S._)`${n} === null`).assign(a,(0,S._)`""`);return;case"number":s.elseIf((0,S._)`${o} == "boolean" || ${n} === null
|
|
3
3
|
|| (${o} == "string" && ${n} && ${n} == +${n})`).assign(a,(0,S._)`+${n}`);return;case"integer":s.elseIf((0,S._)`${o} === "boolean" || ${n} === null
|
|
4
4
|
|| (${o} === "string" && ${n} && ${n} == +${n} && !(${n} % 1))`).assign(a,(0,S._)`+${n}`);return;case"boolean":s.elseIf((0,S._)`${n} === "false" || ${n} === 0 || ${n} === null`).assign(a,!1).elseIf((0,S._)`${n} === "true" || ${n} === 1`).assign(a,!0);return;case"null":s.elseIf((0,S._)`${n} === "" || ${n} === 0 || ${n} === false`),s.assign(a,null);return;case"array":s.elseIf((0,S._)`${o} === "string" || ${o} === "number"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
1
|
+
import{a as e}from"./chunk-3QVXHF6I.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();var t=e({cmd_app_warning_api_key_deprecation_displayed:!1}),i=t;export{i as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Ga as r}from"./chunk-
|
|
1
|
+
import{Ga as r}from"./chunk-UZ7U322K.js";import{a}from"./chunk-5JCREGSD.js";import{q as i}from"./chunk-773TIA5M.js";import{g as e}from"./chunk-VKWPEFWQ.js";e();var c=3e3;async function n(o){let t;try{if(a.getAllPublicMetadata().api_key!==void 0)return;await Promise.race([r({directory:o,skipPrompts:!0}),new Promise(l=>{t=setTimeout(l,c)})])}catch{}finally{t&&clearTimeout(t)}}var m=async()=>(await n(i()),a.getAllPublicMetadata()),f=m;export{f as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as U,b as xt}from"./chunk-KRZABRYT.js";import{a as mt,b as ht,f as _e,g as ae,h as A,i as ce,k as yt,n as Et}from"./chunk-
|
|
1
|
+
import{a as U,b as xt}from"./chunk-KRZABRYT.js";import{a as mt,b as ht,f as _e,g as ae,h as A,i as ce,k as yt,n as Et}from"./chunk-KOB6T6NK.js";import{a as M,l as ft,m as gt}from"./chunk-5T3OVTF5.js";import{s as ie,t as W}from"./chunk-PTIJDS6I.js";import{a as O,b as N,e as st,g as nt,i as rt,j as ot,k as it,n as at,p as ct,q as lt,r as oe,s as $,u as dt,w as pt}from"./chunk-Q7BOSHWX.js";import{aa as ut}from"./chunk-QPJQ67GU.js";import{va as L,xa as H}from"./chunk-2HZMOK4U.js";import{b as Qe}from"./chunk-5C7HDTHJ.js";import{P as tt,u as Ke,w as _,x as te,y as et}from"./chunk-E24W34C4.js";import{d as se}from"./chunk-ELIH6GCC.js";import{Fb as q,Hb as ne,Mb as re,O as Ve,Pb as F,Qb as D,Ta as v,Wa as C,_ as $e,bb as ke,ma as k,ua as be,wa as Xe,ya as Ze}from"./chunk-EYDNSYYE.js";import{d as E,g as V,j as Ge,k as j}from"./chunk-773TIA5M.js";import{e as Ye,g as h}from"./chunk-VKWPEFWQ.js";h();h();h();var ns=".shopifyignore",wt=/templates\/\*(\.(json|liquid))?$/,Tt=new Set;function Le(e,t={}){let s=t.ignoreFromFile??[],n=t.ignore??[],r=t.only??[],[o=[],i=[]]=Ie(s),[a=[],u=[]]=Ie(n),[m=[],c=[]]=Ie(r),l=e.filter(B(o,".shopifyignore"));return l=l.filter(B(a,"--ignore")),l=l.filter(B(m,"--only",!0)),i.length>0&&(l=l.concat(e.filter(B(i,".shopifyignore",!0)))),u.length>0&&(l=l.concat(e.filter(B(u,"--ignore",!0)))),c.length>0&&(l=l.filter(B(c,"--only"))),Ve(l,f=>f.key)}function B(e,t,s=!1){return({key:n})=>{if(e.length===0)return!0;let r=e.some(i=>rs(n,i)||as(i)&&is(n,cs(i)));return(s?!r:r)?(F(`Ignoring theme file ${n} via ${t}...`),!1):!0}}async function Rt(e){let t=E(e,ns);return await v(t)?(await k(t,{encoding:"utf8"})).split(/(\r\n|\r|\n)/).map(r=>r.trim()).filter(r=>r&&!r.startsWith("#")):[]}function Ie(e){let t=e.filter(n=>n.startsWith("!")).map(n=>n.slice(1));return[e.filter(n=>!n.startsWith("!")),t]}function rs(e,t){let s={matchBase:!0,noglobstar:!0};return ke(e,t,s)?!0:(!t.includes("*")&&t.endsWith("/")&&!Tt.has(t)&&(Tt.add(t),_({headline:"Directory pattern may be misleading.",body:`For more reliable matching, consider using "${t}*" or "${t}*.<file_extension>" instead.`})),os(t)?ke(e,t.replace(wt,"templates/**/*$1"),s):!1)}function os(e){return wt.test(e)}function is(e,t){return t.test(e)}function as(e){return e.startsWith("/")&&e.endsWith("/")}function cs(e){return new RegExp(e.slice(1,-1))}h();import St from"fs/promises";var le=class{constructor(t){this.notifyPath=t,this.isValidUrl=this.validateUrl(t),this.notifyPath===""&&D("Notification skipped: notifyPath is an empty string")}async notify(t){if(this.notifyPath!=="")try{F(`Notifying filechange listener at ${this.notifyPath}...`),this.isValidUrl?await this.notifyUrl(t):await this.notifyFile(t)}catch(s){L(s);let n=`Failed to notify filechange listener at ${this.notifyPath}`;s instanceof Error&&(n=n.concat(`: ${s.message}`)),D(n)}}async notifyUrl(t){let s=await fetch(this.notifyPath,{method:"POST",body:JSON.stringify({files:[t]}),headers:{"Content-Type":"application/json"}});if(!s.ok)throw new Error(s.statusText)}async notifyFile(t){await St.writeFile(this.notifyPath,t),await St.utimes(this.notifyPath,new Date,new Date)}validateUrl(t){try{let s=new URL(t);return s.protocol==="http:"||s.protocol==="https:"}catch{return!1}}};h();h();h();import ls from"node:events";var Ft=["assets/**/*.*","locales/**/*.json","blocks/**/*.liquid","snippets/**/*.liquid"];function vt(e){let t=new Map,s=new Set,n=new ls,r=(c,l)=>{n.emit(c,l)},o=async c=>{let l=await pe(e,c),p=de(c,l),f=typeof l=="string"?l:"",x=Buffer.isBuffer(l)?l.toString("base64"):"";return t.set(c,M({key:c,checksum:p,value:f,attachment:x})),l},i=C(Ft,{cwd:e,deep:3,ignore:W}).then(c=>Promise.all(c.map(o))),a=(c,l)=>{let p=V(e,l),f=o(p).then(()=>{let x=t.get(p);return s.add(x.key),x.value??x.attachment??""});tt(5).then(()=>{s.delete(p)}).catch(()=>{}),r(c,{fileKey:p,onContent:x=>{f.then(P=>{P&&x(P)}).catch(()=>{})},onSync:x=>{}})},u=c=>{let l=V(e,c);s.delete(l),t.delete(l),r("unlink",{fileKey:l,onSync:p=>p()})},m=new Set(Ft.map(c=>E(e,c.split("/").shift()??"")));return{root:e,files:t,unsyncedFileKeys:s,ready:async()=>i.then(()=>{}),delete:async c=>{t.delete(c)},write:async c=>{t.set(c.key,c)},read:o,addEventListener:(c,l)=>{n.on(c,l)},startWatcher:async()=>{let{default:c}=await import("./chokidar-VDIVGBZH.js");c.watch([...m],{ignored:W,persistent:!process.env.SHOPIFY_UNIT_TEST,ignoreInitial:!0}).on("add",a.bind(null,"add")).on("change",a.bind(null,"change")).on("unlink",u.bind(null))}}}h();h();var ds="https://unpkg.com/@shopify/polaris@13.9.2/build/esm/styles.css";function Pt(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function $t(e){return(0,String.raw)`<!DOCTYPE html>
|
|
2
2
|
<html>
|
|
3
3
|
<head>
|
|
4
4
|
<title>${e.title}</title>
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as M}from"./chunk-
|
|
1
|
+
import{a as M}from"./chunk-6ZRHK4ON.js";import{a as S}from"./chunk-7XQDZF73.js";import{A as b,B as A,D as C,E as x,Fa as V}from"./chunk-UZ7U322K.js";import{a as c}from"./chunk-5JCREGSD.js";import{b as j,c as E}from"./chunk-Q6LCSRIW.js";import{v as y,x as u}from"./chunk-E24W34C4.js";import{d as g,f as o}from"./chunk-ELIH6GCC.js";import{Lb as s,Sb as w,Vb as h}from"./chunk-EYDNSYYE.js";import{g as m}from"./chunk-VKWPEFWQ.js";m();m();async function N(f,t){let i=new Set(t.map(n=>n.file)).size;await c.addPublicMetadata(()=>({cmd_app_validate_valid:f,cmd_app_validate_issue_count:t.length,cmd_app_validate_file_count:i}))}async function J(f,t={json:!1}){let i=f.errors;if(!i||i.isEmpty()){if(await N(!0,[]),t.json){s(JSON.stringify({valid:!0,issues:[]},null,2));return}y({headline:"App configuration is valid."});return}let n=i.getErrors();if(await N(!1,n),t.json){let d=n.map(({file:p,message:a,path:r,code:e})=>({file:p,message:a,path:r,code:e}));throw s(JSON.stringify({valid:!1,issues:d},null,2)),new o}throw u({headline:"Validation errors found.",body:n.map(d=>`\u2022 ${x(d)}`).join(`
|
|
2
2
|
`)}),new o}var v;async function _(f,t){await c.addPublicMetadata(()=>({cmd_app_validate_valid:!1,cmd_app_validate_issue_count:f,cmd_app_validate_file_count:t}))}var l=class extends M{async run(){let{flags:t}=await this.parse(v);await c.addPublicMetadata(()=>({cmd_app_validate_json:t.json}));let i;try{i=await b.load(t.path)}catch(a){if(a instanceof g&&t.json){await _(1,1);let r=h(w(a.message)).trim();throw s(JSON.stringify({valid:!1,issues:[{message:r}]},null,2)),new o}throw a}let n;try{n=await C(i,t.config)}catch(a){if(a instanceof g&&t.json){await _(1,1);let r=h(w(a.message)).trim();throw s(JSON.stringify({valid:!1,issues:[{message:r}]},null,2)),new o}throw a}let d=A(i,n.file);if(d.length>0){let a=d.map(e=>({file:e.path,message:e.message})),r=new Set(d.map(e=>e.path)).size;throw await _(a.length,r),t.json?(s(JSON.stringify({valid:!1,issues:a},null,2)),new o):(u({headline:"Validation errors found.",body:a.map(e=>`\u2022 ${e.message}`).join(`
|
|
3
3
|
`)}),new o)}let p;try{p=(await V({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config,unsafeTolerateErrors:!0})).app}catch(a){let r=a instanceof g?h(w(a.message)).trim():"";throw r.startsWith("Validation errors in ")&&t.json?(await _(1,1),s(JSON.stringify({valid:!1,issues:[{message:r}]},null,2)),new o):a}return await J(p,{json:t.json}),{app:p}}};v=l;l.summary="Validate your app configuration and extensions.";l.descriptionWithMarkdown="Validates the selected app configuration file and all extension configurations against their schemas and reports any errors found.";l.description=v.descriptionWithoutMarkdown();l.flags={...j,...S,...E};var X=l;export{X as a};
|