shopify 4.6.1 → 4.7.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-5SII3GTA.js +1 -0
- package/dist/analytics-F56E2NGH.js +1 -0
- package/dist/bootstrap.js +1 -1
- package/dist/{chunk-6HQMZ324.js → chunk-22NROZ5X.js} +18 -18
- package/dist/chunk-22NWEE5U.js +5 -0
- package/dist/{chunk-LURVEPYP.js → chunk-26DH5P7S.js} +1 -1
- package/dist/chunk-27UEK3FU.js +6 -0
- package/dist/chunk-2F2DXTRI.js +9 -0
- package/dist/chunk-2S3GOPRL.js +1 -0
- package/dist/{chunk-YR7K4NQT.js → chunk-3HCWJRL6.js} +1 -1
- package/dist/chunk-3KM2GKXH.js +3 -0
- package/dist/chunk-3MN3WLA2.js +1 -0
- package/dist/chunk-3WV7DQMM.js +12 -0
- package/dist/chunk-46BKAF3F.js +7 -0
- package/dist/chunk-4FCS6PJY.js +1 -0
- package/dist/{chunk-NKBSS7YL.js → chunk-4FI2YBRF.js} +1 -1
- package/dist/{chunk-EZBB2ULE.js → chunk-4I7TUB3K.js} +1 -1
- package/dist/chunk-4NXLDIW5.js +1 -0
- package/dist/chunk-4VJ6YK7U.js +1 -0
- package/dist/chunk-4WGJUVXS.js +20 -0
- package/dist/chunk-53IU36CL.js +1 -0
- package/dist/chunk-5HBIIYSK.js +1 -0
- package/dist/{chunk-NKT5U6IJ.js → chunk-5JW4JQWZ.js} +1 -1
- package/dist/chunk-5MD7GNEY.js +7 -0
- package/dist/chunk-5QZHJCZM.js +1 -0
- package/dist/chunk-5WGT45CO.js +10 -0
- package/dist/chunk-6AV6GX5W.js +2 -0
- package/dist/chunk-6ELAWKMY.js +18 -0
- package/dist/chunk-6G5TDB45.js +1 -0
- package/dist/{chunk-STCLJWHD.js → chunk-6K3AJTNO.js} +1 -1
- package/dist/chunk-6QJIGFQJ.js +6 -0
- package/dist/{chunk-GD5IRJBE.js → chunk-6R62DGJG.js} +1 -1
- package/dist/{chunk-K4M32VKU.js → chunk-6SM4RY3I.js} +1 -1
- package/dist/chunk-76NEIDP5.js +1 -0
- package/dist/chunk-77AC3OJQ.js +25 -0
- package/dist/{chunk-7MD5MIGN.js → chunk-7EUIO4ZO.js} +8 -8
- package/dist/chunk-7JIYJMRN.js +16 -0
- package/dist/chunk-7S73765P.js +5 -0
- package/dist/chunk-7Y7AZRL3.js +10 -0
- package/dist/{chunk-Y2PC2BBJ.js → chunk-AEUCDGTB.js} +4 -4
- package/dist/chunk-AFT6ABDE.js +10 -0
- package/dist/chunk-AIA7JVSJ.js +1 -0
- package/dist/chunk-AWHS336T.js +1 -0
- package/dist/chunk-B4OMIONW.js +5 -0
- package/dist/chunk-BI7LE6CZ.js +1 -0
- package/dist/{chunk-LJZIIURR.js → chunk-CNMJ6QXM.js} +1 -1
- package/dist/chunk-CRP4PQU2.js +1 -0
- package/dist/{chunk-DC7TXY4K.js → chunk-CUUCRIGC.js} +1 -1
- package/dist/chunk-DEMZRLX5.js +7 -0
- package/dist/{chunk-LXOBW4AW.js → chunk-DLSUDLXD.js} +1 -1
- package/dist/chunk-DMFEYI4G.js +1 -0
- package/dist/chunk-DPNZWBT5.js +1 -0
- package/dist/chunk-ELSDVDT7.js +1 -0
- package/dist/chunk-EMETQFFJ.js +7 -0
- package/dist/chunk-ESPT6CGE.js +1 -0
- package/dist/chunk-EULSSTWY.js +4 -0
- package/dist/{chunk-RMF3YNWE.js → chunk-EWS2RNM6.js} +1 -1
- package/dist/chunk-FAXNGDWI.js +11 -0
- package/dist/chunk-FELV7GWY.js +1 -0
- package/dist/chunk-FQQXU5IN.js +2 -0
- package/dist/chunk-GFWXVO72.js +317 -0
- package/dist/chunk-GJ4A4QKE.js +1 -0
- package/dist/chunk-GW4JHUIA.js +6 -0
- package/dist/{chunk-H5I7BSNG.js → chunk-GXOFJIKQ.js} +52 -52
- package/dist/chunk-HCQABTQL.js +1 -0
- package/dist/{chunk-MMP3F6LO.js → chunk-HOVIGRE4.js} +1 -1
- package/dist/chunk-HQUWYKSJ.js +19 -0
- package/dist/chunk-HRHNJFAA.js +8 -0
- package/dist/{chunk-X5RH4ALT.js → chunk-HU4GFVEN.js} +1 -1
- package/dist/{chunk-XZ2KUBFJ.js → chunk-I2LNQKIJ.js} +1 -1
- package/dist/chunk-I6XH7XDX.js +2 -0
- package/dist/{chunk-C7LFLIRT.js → chunk-IA3XNJ56.js} +1 -1
- package/dist/{chunk-WE3VLC2S.js → chunk-IENBHP2S.js} +7 -7
- package/dist/{chunk-UTK6V2NE.js → chunk-IF6EYTHG.js} +8 -8
- package/dist/chunk-IQT6LOA2.js +1 -0
- package/dist/chunk-IX4IGE5H.js +1 -0
- package/dist/{chunk-MY2H5XPY.js → chunk-J2VRPZFC.js} +1 -1
- package/dist/chunk-JD5P5RAJ.js +1 -0
- package/dist/chunk-JJSV7HNM.js +1 -0
- package/dist/{chunk-KRZABRYT.js → chunk-JLGA3B7P.js} +1 -1
- package/dist/chunk-JNIPCLAF.js +1 -0
- package/dist/{chunk-U3P5TIIR.js → chunk-JNVCCE6M.js} +1 -1
- package/dist/chunk-JQUEW7CB.js +3 -0
- package/dist/chunk-K3VLFPPI.js +1 -0
- package/dist/chunk-K63FW7Q7.js +1 -0
- package/dist/{chunk-P2P2MAZQ.js → chunk-KBBITJSF.js} +1 -1
- package/dist/chunk-KDBKEVCF.js +3 -0
- package/dist/chunk-KNVHXIEB.js +3 -0
- package/dist/chunk-KRLEEYLL.js +1 -0
- package/dist/chunk-KT5MDCII.js +6 -0
- package/dist/{chunk-W2357IN2.js → chunk-LBREJXT6.js} +1 -1
- package/dist/chunk-LFOBYEWG.js +1 -0
- package/dist/{chunk-FBVNXRVB.js → chunk-LKQ3EJ6Z.js} +1 -1
- package/dist/chunk-LKZQSER3.js +1 -0
- package/dist/{chunk-XWPPBOGF.js → chunk-LQ7ENG4V.js} +1 -1
- package/dist/chunk-M5Q74UZM.js +3 -0
- package/dist/chunk-MK7MOLLI.js +1 -0
- package/dist/{chunk-PCTVUTV3.js → chunk-MTTBBZSR.js} +1 -1
- package/dist/{chunk-QARALFHD.js → chunk-N4KDWHT2.js} +1 -1
- package/dist/chunk-N7425436.js +3 -0
- package/dist/chunk-NSZHEXZK.js +11 -0
- package/dist/chunk-O4G6TE26.js +16 -0
- package/dist/chunk-O4RHWBBM.js +1 -0
- package/dist/chunk-O53YIDJL.js +4 -0
- package/dist/chunk-OF6CV5R4.js +1 -0
- package/dist/chunk-OJSJWGP2.js +19 -0
- package/dist/chunk-OQWMCJLY.js +3 -0
- package/dist/chunk-P5OQUFH6.js +1 -0
- package/dist/{chunk-LDWMX3KZ.js → chunk-P5WLH64A.js} +1 -1
- package/dist/chunk-PE4TV5IJ.js +4 -0
- package/dist/chunk-PEHLR7XP.js +1 -0
- package/dist/chunk-PK73ZSND.js +836 -0
- package/dist/{chunk-J3D4KQOQ.js → chunk-PQG7XSQP.js} +1 -1
- package/dist/chunk-PS2UVFHP.js +4 -0
- package/dist/chunk-PU3NATV4.js +1 -0
- package/dist/{chunk-YHH3JA36.js → chunk-PV6T52KB.js} +1 -1
- package/dist/chunk-QASOHYDS.js +6 -0
- package/dist/chunk-QHLY2IID.js +2 -0
- package/dist/chunk-QT367CYF.js +32 -0
- package/dist/{chunk-EVIO6OWW.js → chunk-R2RULBBV.js} +1 -1
- package/dist/chunk-R5EGWWZH.js +2 -0
- package/dist/{chunk-NENUUNWB.js → chunk-RA3WWB2S.js} +1 -1
- package/dist/chunk-RM3B7AFT.js +1 -0
- package/dist/chunk-RXUOQZ32.js +1 -0
- package/dist/chunk-RY4MPX5A.js +8 -0
- package/dist/chunk-RY4YUBG3.js +15 -0
- package/dist/chunk-S2WUVD7V.js +1 -0
- package/dist/chunk-SCXL5UQ4.js +28 -0
- package/dist/{chunk-5INBKZRD.js → chunk-SGIMJQEM.js} +1 -1
- package/dist/chunk-SJGPJDGH.js +1 -0
- package/dist/{chunk-7EE7YOCR.js → chunk-SPE2D366.js} +5 -5
- package/dist/chunk-SYF6LGQB.js +1 -0
- package/dist/{chunk-7L5AIZOP.js → chunk-TP4Z5OZT.js} +1 -1
- package/dist/{chunk-5QDM4XIK.js → chunk-U3F6GPCE.js} +1 -1
- package/dist/chunk-U46RPVQA.js +1 -0
- package/dist/{chunk-NVQOAHID.js → chunk-UAJBQEGE.js} +1 -1
- package/dist/{chunk-GJEG7VGX.js → chunk-UK4WXL4G.js} +1 -1
- package/dist/chunk-ULR25PTO.js +15 -0
- package/dist/chunk-USBP7H7J.js +3 -0
- package/dist/chunk-UZV5H2JI.js +8 -0
- package/dist/chunk-UZVON6GP.js +1 -0
- package/dist/chunk-VI5FF6SW.js +1 -0
- package/dist/chunk-VPY47DBW.js +3 -0
- package/dist/chunk-VRH3HWYA.js +1 -0
- package/dist/chunk-VXX4EZ7G.js +2 -0
- package/dist/{chunk-HVMEBH24.js → chunk-VXYABRFY.js} +3 -3
- package/dist/{chunk-7TXWKLPY.js → chunk-WEWLPJK2.js} +1 -1
- package/dist/chunk-WMZS3Y4Z.js +1 -0
- package/dist/chunk-WOIAYH5U.js +1 -0
- package/dist/chunk-WR6LRE4I.js +1 -0
- package/dist/chunk-WSCSFFLH.js +375 -0
- package/dist/chunk-WTES5ZXR.js +1 -0
- package/dist/chunk-WXSDPMIZ.js +5 -0
- package/dist/chunk-X5JQU6T7.js +1 -0
- package/dist/{chunk-BDDROQGK.js → chunk-XMJFT4WP.js} +3 -3
- package/dist/chunk-XMQFQUUK.js +6 -0
- package/dist/chunk-XTXYS7LB.js +5 -0
- package/dist/chunk-Y6UZW73M.js +1 -0
- package/dist/{chunk-WOYI6SDK.js → chunk-YCU7ZCIG.js} +1 -1
- package/dist/chunk-YFKEESYB.js +3 -0
- package/dist/chunk-YXDIHVPY.js +5 -0
- package/dist/chunk-YY6TFARF.js +1 -0
- package/dist/chunk-Z66ZSXKB.js +1 -0
- package/dist/{chunk-M5YGJYNI.js → chunk-ZBSC2KZ7.js} +1 -1
- package/dist/chunk-ZDDLEFVO.js +1 -0
- package/dist/chunk-ZULQKYJ6.js +6 -0
- 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/send-analytics.d.ts +5 -0
- package/dist/cli/commands/send-analytics.js +1 -0
- package/dist/cli/commands/theme/check.js +1 -1
- package/dist/cli/commands/theme/console.js +1 -1
- package/dist/cli/commands/theme/delete.js +1 -1
- package/dist/cli/commands/theme/dev.js +1 -1
- package/dist/cli/commands/theme/duplicate.js +1 -1
- package/dist/cli/commands/theme/info.js +1 -1
- package/dist/cli/commands/theme/init.js +1 -1
- package/dist/cli/commands/theme/language-server.js +1 -1
- package/dist/cli/commands/theme/list.js +1 -1
- package/dist/cli/commands/theme/metafields/pull.js +1 -1
- package/dist/cli/commands/theme/open.js +1 -1
- package/dist/cli/commands/theme/package.js +1 -1
- package/dist/cli/commands/theme/preview.js +1 -1
- package/dist/cli/commands/theme/profile.js +1 -1
- package/dist/cli/commands/theme/publish.js +1 -1
- package/dist/cli/commands/theme/pull.js +1 -1
- package/dist/cli/commands/theme/push.js +1 -1
- package/dist/cli/commands/theme/rename.js +1 -1
- package/dist/cli/commands/theme/share.js +1 -1
- package/dist/cli/commands/upgrade.js +1 -1
- package/dist/cli/commands/version.js +1 -1
- package/dist/cli/help.js +1 -1
- package/dist/cli/services/doctor-release/theme/tests/init.js +4 -8
- package/dist/cli/services/doctor-release/theme/tests/push.js +3 -4
- package/dist/command-registry.js +1 -1
- package/dist/conf-store-QQ4DOFI3.js +1 -0
- package/dist/custom-oclif-loader-BWAMUFQ4.js +1 -0
- package/dist/deprecations-43ZQ5RCE.js +1 -0
- package/dist/dist-E7EGYE4D.js +1 -0
- package/dist/dist-WRUROUNV.js +1 -0
- package/dist/environments-RG64VB5R.js +1 -0
- package/dist/error-26WTDNKZ.js +1 -0
- package/dist/error-handler-XFH47Y75.js +1 -0
- package/dist/fs-Y7I3Y5IR.js +1 -0
- 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 +2 -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.d.ts +1 -1
- package/dist/index.js +15 -15
- package/dist/is-global-WBIBPIVZ.js +1 -0
- package/dist/lib-M72BVWQ3.js +1 -0
- package/dist/local-HF4T3FFE.js +1 -0
- package/dist/metadata-CSQPNQP2.js +1 -0
- package/dist/{morph-ABSWZEVT.js → morph-77RHJICZ.js} +1 -1
- package/dist/node-package-manager-CVEU22N7.js +1 -0
- package/dist/notifications-system-L3FMN6EX.js +1 -0
- package/dist/os-VLZLRAHR.js +1 -0
- package/dist/output-E6OGPGXL.js +1 -0
- package/dist/{prettier-6ZMB2MMO.js → prettier-RVUAAWC7.js} +1 -1
- package/dist/system-ZETSJRKS.js +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui-7TVGGEWJ.js +1 -0
- package/dist/upgrade-F77O4ZDT.js +1 -0
- package/dist/version-3L3ANUTL.js +1 -0
- package/dist/version-DL4Y6DRX.js +1 -0
- package/dist/workerd-EHI5ZCEV.js +18 -0
- package/oclif.manifest.json +146 -120
- package/package.json +7 -8
- package/dist/analytics-3ICKUTK2.js +0 -1
- package/dist/analytics-73NVZI4Z.js +0 -1
- package/dist/chunk-25Z36VJG.js +0 -1
- package/dist/chunk-2AVFG5KT.js +0 -1
- package/dist/chunk-2DMTEIS3.js +0 -2
- package/dist/chunk-2GB3EAD3.js +0 -153
- package/dist/chunk-2NB4P6BB.js +0 -5
- package/dist/chunk-2OYQHHKC.js +0 -3
- package/dist/chunk-2VJKXWLG.js +0 -4
- package/dist/chunk-3Q5ESVIY.js +0 -1
- package/dist/chunk-3XCIUG5P.js +0 -1
- package/dist/chunk-445NFHXL.js +0 -3
- package/dist/chunk-4BPFJDH3.js +0 -1
- package/dist/chunk-4E5RGEJO.js +0 -1
- package/dist/chunk-4IHSAT76.js +0 -2
- package/dist/chunk-4TANJ4JK.js +0 -1
- package/dist/chunk-534U3DKZ.js +0 -6
- package/dist/chunk-56T6YCU2.js +0 -1
- package/dist/chunk-5HJTCBBV.js +0 -317
- package/dist/chunk-5Q4WAGQL.js +0 -3
- package/dist/chunk-65CEF3SM.js +0 -8
- package/dist/chunk-6KAWCN3I.js +0 -10
- package/dist/chunk-6ZPHB5U2.js +0 -3
- package/dist/chunk-7AWKXTNS.js +0 -4
- package/dist/chunk-7US4TVO2.js +0 -32
- package/dist/chunk-A4SBXDZB.js +0 -14
- package/dist/chunk-A7IDVXF7.js +0 -1
- package/dist/chunk-AFM3UZQO.js +0 -684
- package/dist/chunk-AHLNB45E.js +0 -3
- package/dist/chunk-ARCAYYRW.js +0 -1
- package/dist/chunk-B3U6GDHL.js +0 -7
- package/dist/chunk-BCZMDFI2.js +0 -370
- package/dist/chunk-BKJMVAI7.js +0 -1
- package/dist/chunk-BPDUBZMU.js +0 -1
- package/dist/chunk-BQOKTPUU.js +0 -1
- package/dist/chunk-CELVG4AL.js +0 -6
- package/dist/chunk-CNI7ZUST.js +0 -3
- package/dist/chunk-CONJQV7M.js +0 -11
- package/dist/chunk-CV5ELBVU.js +0 -1
- package/dist/chunk-DXUISRMZ.js +0 -2
- package/dist/chunk-EHV7EKB3.js +0 -2
- package/dist/chunk-EJDWYASP.js +0 -1
- package/dist/chunk-EQNJ2NQD.js +0 -3
- package/dist/chunk-FG5QXIQH.js +0 -9
- package/dist/chunk-FGG6HXIZ.js +0 -1
- package/dist/chunk-FJCZ4F6J.js +0 -5
- package/dist/chunk-FKH5ZF2C.js +0 -1
- package/dist/chunk-GT6BJ2GK.js +0 -1
- package/dist/chunk-GWNV44NZ.js +0 -18
- package/dist/chunk-GXO2RRV2.js +0 -1
- package/dist/chunk-H5YC3EP6.js +0 -16
- package/dist/chunk-HY3INWPI.js +0 -1
- package/dist/chunk-I6ST5X56.js +0 -1
- package/dist/chunk-ID6ASBGV.js +0 -15
- package/dist/chunk-IDQT2UY7.js +0 -1
- package/dist/chunk-IIOFR25P.js +0 -3
- package/dist/chunk-IJEDTDSJ.js +0 -25
- package/dist/chunk-ILICQWUF.js +0 -1
- package/dist/chunk-IMWEC6NF.js +0 -16
- package/dist/chunk-ITNFDLZ4.js +0 -1
- package/dist/chunk-IU5U6KKO.js +0 -4
- package/dist/chunk-IXCDFXMB.js +0 -2
- package/dist/chunk-JRTJZAFJ.js +0 -19
- package/dist/chunk-JT7YTXJ7.js +0 -1
- package/dist/chunk-JX4HSDDG.js +0 -28
- package/dist/chunk-K5GJNXDK.js +0 -1
- package/dist/chunk-KCNOFNS5.js +0 -11
- package/dist/chunk-KM2R6O7V.js +0 -6
- package/dist/chunk-KNFDN3AP.js +0 -1
- package/dist/chunk-LEDVV6XK.js +0 -1
- package/dist/chunk-LEEVJH4B.js +0 -1
- package/dist/chunk-MDQHEW7V.js +0 -8
- package/dist/chunk-MPYCIVRA.js +0 -7
- package/dist/chunk-N4RYVOXT.js +0 -2
- package/dist/chunk-NB6HHZ36.js +0 -1
- package/dist/chunk-NEK2KNKR.js +0 -8
- package/dist/chunk-NJONAV7V.js +0 -1
- package/dist/chunk-OHQTOHUX.js +0 -15
- package/dist/chunk-PKR6HS4T.js +0 -6
- package/dist/chunk-PKRDBS7O.js +0 -5
- package/dist/chunk-PMD6S7YG.js +0 -1
- package/dist/chunk-PUOCHFFI.js +0 -1
- package/dist/chunk-Q2DPBMV4.js +0 -1
- package/dist/chunk-Q6XT3YKV.js +0 -3
- package/dist/chunk-QEL3F2NY.js +0 -5
- package/dist/chunk-R2W5B7YI.js +0 -3
- package/dist/chunk-REABQXMP.js +0 -1
- package/dist/chunk-RTPVI7LE.js +0 -3
- package/dist/chunk-SFZQFEZB.js +0 -6
- package/dist/chunk-STJ3LWFL.js +0 -1
- package/dist/chunk-STJWHL36.js +0 -7
- package/dist/chunk-SZJHOXS6.js +0 -6
- package/dist/chunk-TEPMNVJN.js +0 -1
- package/dist/chunk-TNSMROUR.js +0 -1
- package/dist/chunk-UDDJQ34Y.js +0 -1
- package/dist/chunk-UKQ7NE5V.js +0 -1
- package/dist/chunk-UOQBCBKY.js +0 -1
- package/dist/chunk-UQWT2PFO.js +0 -1
- package/dist/chunk-V26QBVCN.js +0 -1
- package/dist/chunk-VVEQ4IHW.js +0 -1
- package/dist/chunk-VXBHTSMX.js +0 -20
- package/dist/chunk-WDCCITSG.js +0 -1
- package/dist/chunk-WGMYSPR2.js +0 -10
- package/dist/chunk-WHT2RCAD.js +0 -11
- package/dist/chunk-WW7TENNA.js +0 -1
- package/dist/chunk-WXJGZGQS.js +0 -1
- package/dist/chunk-X4AZV5A2.js +0 -1
- package/dist/chunk-XBBP5BWC.js +0 -7
- package/dist/chunk-XH32NPYG.js +0 -1
- package/dist/chunk-Y7A7Z2V3.js +0 -1
- package/dist/chunk-YE7XCF44.js +0 -1
- package/dist/chunk-YIFT67BD.js +0 -4
- package/dist/chunk-Z36JS7OX.js +0 -6
- package/dist/chunk-ZHPPBTNE.js +0 -28
- package/dist/chunk-ZMSE5SQB.js +0 -1
- package/dist/conf-store-YW3NWYCN.js +0 -1
- package/dist/custom-oclif-loader-4ZAXX5MR.js +0 -1
- package/dist/deprecations-VW7UIMZX.js +0 -1
- package/dist/dist-I3VCRVOE.js +0 -1
- package/dist/dist-MP4AU5F4.js +0 -1
- package/dist/environments-5P57CTOG.js +0 -1
- package/dist/error-U7DOQOWG.js +0 -1
- package/dist/error-handler-AOEXPYI7.js +0 -1
- package/dist/fs-K5NT4W2Q.js +0 -1
- package/dist/hooks/app-init.d.ts +0 -9
- package/dist/hooks/app-init.js +0 -1
- package/dist/is-global-CFYYUAIJ.js +0 -1
- package/dist/is-wsl-UEMXYJPN.js +0 -1
- package/dist/lib-JKLF33A7.js +0 -1
- package/dist/local-BRRQOCGY.js +0 -1
- package/dist/local-storage-FVSI2IBZ.js +0 -1
- package/dist/metadata-HVSGVFUQ.js +0 -1
- package/dist/node-package-manager-6JURLQKU.js +0 -1
- package/dist/notifications-system-BTEFKXCS.js +0 -1
- package/dist/output-EXMTVS2V.js +0 -1
- package/dist/system-DUJDILSL.js +0 -1
- package/dist/ui-AX6ZMY6P.js +0 -1
- package/dist/upgrade-5TEVQNLY.js +0 -1
- package/dist/version-7LKOAVDW.js +0 -1
- package/dist/version-PRFBZAWQ.js +0 -1
- package/dist/workerd-MFV7EBVM.js +0 -18
- /package/dist/{chunk-VDN6MEYI.js → chunk-NJPL5BTN.js} +0 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import{c as ee,e as ne,f as te,g as oe}from"./chunk-6AV6GX5W.js";import{a as J,c as Z,d as Q,e as X}from"./chunk-HOVIGRE4.js";import{b as I}from"./chunk-KBBITJSF.js";import{a as q}from"./chunk-ESPT6CGE.js";import{a as j}from"./chunk-RA3WWB2S.js";import{D as G,G as K,V as W,g as Y,sa as H}from"./chunk-GFWXVO72.js";import{a as z}from"./chunk-HU4GFVEN.js";import{b as V}from"./chunk-IX4IGE5H.js";import{E as U,H as B,M as $,x as O,y as F,z as M}from"./chunk-WSCSFFLH.js";import{d as L}from"./chunk-6K3AJTNO.js";import{h,j as N}from"./chunk-BI7LE6CZ.js";import{a as ce}from"./chunk-CTNBSUVU.js";import{Ca as R,Cb as C,L as D,rb as S,wa as E,xb as A}from"./chunk-HQUWYKSJ.js";import{d as x,i as T}from"./chunk-773TIA5M.js";import{e as pe,g}from"./chunk-VKWPEFWQ.js";g();g();g();async function ie(e){let n,t;e.bundlePath&&(n=await X(e.developerPlatformClient,{id:e.apiKey,apiKey:e.apiKey,organizationId:e.organizationId}),await Q(n,e.bundlePath));let o={appManifest:e.appManifest,appId:e.appId,apiKey:e.apiKey,name:e.name,organizationId:e.organizationId,skipPublish:!e.release,message:e.message,versionTag:e.version,commitReference:e.commitReference};n&&(o.bundleUrl=n),e.appModules.length>0&&(o.appModules=e.appModules);let a=await e.developerPlatformClient.deploy(o);if(!a.appDeploy.appVersion){let i=ue(a.appDeploy.userErrors??[],e.appModuleRegistrationIds,e.appModules,{version:e.version});throw new h({bold:"Version couldn't be created."},null,[],i)}return a.appDeploy.userErrors?.length>0&&(t=a.appDeploy.userErrors.map(i=>i.message).join(", ")),{validationErrors:a.appDeploy.appVersion.appModuleVersions.filter(i=>i.validationErrors.length>0).map(i=>({uuid:i.registrationUuid,errors:i.validationErrors})),versionTag:a.appDeploy.appVersion.versionTag,location:a.appDeploy.appVersion.location,message:a.appDeploy.appVersion.message,deployError:t}}var v=`
|
|
2
|
+
Validation errors`,k=`
|
|
3
|
+
`;function ue(e,n,t,o={}){let a=l=>l.details?.some(y=>y.extension_id)??!1,s=(l,y)=>{let b=l.details?.find(_=>typeof _.extension_id<"u")?.extension_id??"";return Object.values(y).includes(b.toString())},i=l=>{let y=l.on?l.on[0]:void 0;return t.some(b=>b.uid===y?.user_identifier)},[d,u]=I(e,l=>i(l)),[p,c]=I(u,l=>a(l)),[f,r]=I(p,l=>s(l,n));return[...me(c,{version:o.version}),...fe(f,n),...he(r),...ge(d,t)]}function me(e,n={}){return e.length>0?e.filter(t=>t.field&&t.field.includes("version_tag")&&t.message==="has already been taken").length>0&&n.version?[{body:["An app version with the name",{userInput:n.version},"already exists. Deploy again with a different version name."]}]:e.length===1?[{body:e[0]?.message??""}]:[{body:{list:{items:e.map(t=>t.message)}}}]:[]}function fe(e,n){return e.reduce((t,o)=>{let a=(o.field??["unknown"]).join(".").replace("extension_points","extensions.targeting"),s=a==="base"?o.message:`${a}: ${o.message}`,i=o.details.find(r=>typeof r.extension_title<"u")?.extension_title,d=o.details.find(r=>typeof r.specification_identifier<"u")?.specification_identifier,u=o.details.find(r=>typeof r.extension_id<"u")?.extension_id?.toString(),c=Object.keys(n).find(r=>n[r]===u)??i;d==="webhook_subscription"&&(c="Webhook Subscription");let f=t.find(r=>r.title===c);if(f){let r=f.body,m=o.category==="invalid"?r.find(l=>l.list.title===v):r.find(l=>l.list.title===k);m?m.list.items.includes(s)||m.list.items.push(s):r.push({list:{title:o.category==="invalid"?v:k,items:[s]}})}else t.push({title:c,body:[{list:{title:o.category==="invalid"?v:k,items:[s]}}]});return t.forEach(r=>{r.body.sort((m,l)=>m.list.title===v?1:l.list.title===v?-1:0)}),t},[])}function ge(e,n){return e.reduce((t,o)=>{let s=(o.on?o.on[0]:void 0)?.user_identifier,i=n.find(r=>r.uid===s),d=s?`Extension with uid: ${s}`:"Unknown Extension",u=i?.handle??d,c=`${(o.field??["unknown"]).join(".")}: ${o.message}`,f=t.find(r=>r.title===u);if(f){let m=f.body.find(l=>l.list.title===v);m&&(m.list.items.includes(c)||m.list.items.push(c))}else t.push({title:u,body:[{list:{title:v,items:[c]}}]});return t},[])}function he(e){return e.reduce((n,t)=>{let o=t.details.find(s=>typeof s.extension_title<"u")?.extension_title,a=n.find(s=>s.title===o);return a?a.errorCount+=1:n.push({title:o,errorCount:1}),n},[]).map(n=>({title:n.title,body:`
|
|
4
|
+
${n.errorCount} error${n.errorCount>1?"s":""} found in your extensions. Fix these issues and try deploying again.`}))}g();async function ae(e){let n=x(e.app.directory,".shopify","deploy-bundle");await R(n,{force:!0}),await E(n),await J(e.appManifest,n),e.skipBuild||await Y(e.app);let t=e.app.allExtensions.map(a=>({prefix:a.localIdentifier,action:async(s,i,d)=>{await a.buildForBundle({stderr:i,stdout:s,signal:d,app:e.app,environment:"production",skipBuild:e.skipBuild},n)}}));if(await O({processes:t,showTimestamps:!1}),e.app.allExtensions.some(a=>a.hasDeploySteps))return await Z(n,e.bundlePath),e.bundlePath}async function ye(e){let{app:n,remoteApp:t,developerPlatformClient:o,noRelease:a,allowUpdates:s,allowDeletes:i,extensions:d}=e,u=[a,s,i].some(Boolean),p=[`App can't be deployed until Partner Dashboard managed extensions are added to your version or removed from your app:
|
|
5
|
+
`,d.map(m=>` - ${m.title}`).join(`
|
|
6
|
+
`)],c=[`
|
|
7
|
+
|
|
8
|
+
Run `,{command:"shopify app import-extensions"}," to add legacy extensions."];if(u||!$())throw new h(p,c);let f=[`
|
|
9
|
+
|
|
10
|
+
Run `,{command:"shopify app import-extensions"}," to add legacy extensions now?"];if(await U({message:[...p,...f],confirmationMessage:"Yes, add legacy extensions and deploy",cancellationMessage:"No, don't add legacy extensions"}))return await te({app:n,remoteApp:t,developerPlatformClient:o,extensions:d}),G(n);throw new N}async function we(e){let{app:n,remoteApp:t,developerPlatformClient:o}=e,a=await oe({developerPlatformClient:o,apiKey:t.apiKey,organizationId:t.organizationId,extensionTypes:ee,onlyDashboardManaged:!0}),s=ne(e.app,a);return s.length===0?n:ye({...e,extensions:s})}async function se(e){let{remoteApp:n,developerPlatformClient:t,noRelease:o,allowUpdates:a,allowDeletes:s}=e,i=await we({app:e.app,remoteApp:n,developerPlatformClient:t,noRelease:o,allowUpdates:a,allowDeletes:s}),{deployIdentifiers:d,didMigrateExtensionsToDevDash:u}=await W({...e,app:i,developerPlatformClient:t,allowUpdates:a,allowDeletes:s}),p=!o,c=n.apiKey;C(),p?A(`Releasing a new app version as part of ${n.title}`):A(`Creating a new app version as part of ${n.title}`),C();let f,r=x(e.app.directory,".shopify",`deploy-bundle.${t.bundleFormat}`);await E(T(r));let m=await i.manifest(be(i,d.appModuleUuids)),l=await ae({app:i,appManifest:m,bundlePath:r,skipBuild:e.skipBuild}),y;return p?y="Releasing an app version":y="Creating an app version",await B([{title:"Running validation",task:async()=>{await i.preDeployValidation()}},{title:y,task:async()=>{let _=await Promise.all(i.allExtensions.flatMap(de=>de.bundleConfig({appModuleUuids:d.appModuleUuids,developerPlatformClient:t,apiKey:c,appConfiguration:i.configuration})));f=await ie({appManifest:m,appId:n.id,apiKey:c,name:i.name,organizationId:n.organizationId,bundlePath:l,appModules:D(_),release:p,developerPlatformClient:t,appModuleRegistrationIds:d.appModuleRegistrationIds,message:e.message,version:e.version,commitReference:e.commitReference})}}]),await ve({app:i,project:e.project,release:p,uploadExtensionsBundleResult:f,didMigrateExtensionsToDevDash:u}),{app:i}}async function ve({app:e,project:n,release:t,uploadExtensionsBundleResult:o,didMigrateExtensionsToDevDash:a}){let s=[{link:{label:o.versionTag??"version",url:o.location}},o.message?`
|
|
11
|
+
${o.message}`:""],i=[];if(a){let d=await K(e.directory),u=Object.values(d).filter(c=>c!==d[e.configuration.client_id]),p=[];u.length>0&&p.push("\u2022 Map extension IDs to other copies of your app by running",{command:S(n.packageManager,"shopify app deploy")},"for: ",{list:{items:u}}),p.push("\u2022 Commit to source control to ensure your extension IDs aren't regenerated on the next deploy."),i=[{title:"Next steps",body:p},{title:"Reference",body:["\u2022 ",{link:{label:"Migrating from the Partner Dashboard",url:"https://shopify.dev/docs/apps/build/dev-dashboard/migrate-from-partners"}}]}]}return t?o.deployError?F({headline:"New version created, but not released.",body:[...s,`
|
|
12
|
+
|
|
13
|
+
${o.deployError}`],customSections:i}):M({headline:"New version released to users.",body:s,customSections:i}):M({headline:"New version created.",body:s,customSections:i,nextSteps:[["Run",{command:S(n.packageManager,"shopify app release",`--version=${o.versionTag}`)},"to release this version to users."]]})}function be(e,n){return Object.fromEntries(e.allExtensions.filter(t=>t.isUUIDStrategyExtension).map(t=>[t.localIdentifier,n[t.localIdentifier]]))}g();function re(e){if(typeof e>"u")return;let n=["Invalid version name:",{userInput:e}],t=100;if(e.length>t)throw new h(n,`Version name must be ${t} characters or less.`);let o=[".",".."];if(o.find(s=>e===s))throw new h(n,`Version name may not be any of: ${o.map(s=>`'${s}'`).join(" , ")}`);let a=/^[a-zA-Z0-9.\-_]+$/;if(!e.match(a))throw new h(n,["Version name can only contain alphanumeric characters, periods, hyphens, and underscores"])}g();function le(e){if(typeof e>"u")return;let n=["Invalid message:",{userInput:e}],t=200;if(e.length>t)throw new h(n,`Message name must be ${t} characters or less.`)}var w=pe(ce(),1);var P=class e extends q{static summary="Deploy your Shopify app.";static descriptionWithMarkdown=`[Builds the app](https://shopify.dev/docs/api/shopify-cli/app/app-build), then deploys your app configuration and extensions.
|
|
14
|
+
|
|
15
|
+
This command creates an app version, which is a snapshot of your app configuration and all extensions. This version is then released to users.
|
|
16
|
+
|
|
17
|
+
This command doesn't deploy your [web app](https://shopify.dev/docs/apps/tools/cli/structure#web-components). You need to [deploy your web app](https://shopify.dev/docs/apps/deployment/web) to your own hosting solution.
|
|
18
|
+
`;static description=this.descriptionWithoutMarkdown();static flags={...V,...j,"allow-updates":w.Flags.boolean({hidden:!1,description:"Allows adding and updating extensions and configuration without requiring user confirmation. Recommended option for CI/CD environments. In non-interactive environments, provide this flag, --allow-deletes, or --no-release.",env:"SHOPIFY_FLAG_ALLOW_UPDATES"}),"allow-deletes":w.Flags.boolean({hidden:!1,description:"Allows removing extensions and configuration without requiring user confirmation. For CI/CD environments, the recommended flag is --allow-updates. In non-interactive environments, provide this flag, --allow-updates, or --no-release.",env:"SHOPIFY_FLAG_ALLOW_DELETES"}),"no-release":w.Flags.boolean({hidden:!1,description:"Creates a version but doesn't release it - it's not made available to merchants. With this flag, a user confirmation is not required. In non-interactive environments, provide this flag, --allow-updates, or --allow-deletes.",env:"SHOPIFY_FLAG_NO_RELEASE",default:!1,exclusive:["allow-updates","allow-deletes"]}),"no-build":w.Flags.boolean({description:"Use with caution: Skips building any elements of the app that require building. You should ensure your app has been prepared in advance, such as by running `shopify app build` or by caching build artifacts.",env:"SHOPIFY_FLAG_NO_BUILD",default:!1}),message:w.Flags.string({hidden:!1,description:"Optional message that will be associated with this version. This is for internal use only and won't be available externally.",env:"SHOPIFY_FLAG_MESSAGE"}),version:w.Flags.string({hidden:!1,description:"Optional version tag that will be associated with this app version. If not provided, an auto-generated identifier will be generated for this app version.",env:"SHOPIFY_FLAG_VERSION"}),"source-control-url":w.Flags.string({hidden:!1,description:"URL associated with the new app version.",env:"SHOPIFY_FLAG_SOURCE_CONTROL_URL"})};static nonTTYFlagRequirements(){return[{flags:["allow-updates","allow-deletes","no-release"]}]}async run(){let{flags:n}=await this.parse(e);await z.addPublicMetadata(()=>({cmd_deploy_flag_message_used:!!n.message,cmd_deploy_flag_version_used:!!n.version,cmd_deploy_flag_source_url_used:!!n["source-control-url"]})),re(n.version),le(n.message);let t=n["client-id"];await L(()=>({cmd_app_reset_used:n.reset}));let{app:o,project:a,remoteApp:s,developerPlatformClient:i,organization:d}=await H({directory:n.path,clientId:t,forceRelink:n.reset,userProvidedConfigName:n.config}),u=n["no-release"]||n["allow-updates"],p=n["no-release"]||n["allow-deletes"];return{app:(await se({app:o,project:a,remoteApp:s,organization:d,developerPlatformClient:i,reset:n.reset,allowUpdates:u,allowDeletes:p,noRelease:n["no-release"],message:n.message,version:n.version,commitReference:n["source-control-url"],skipBuild:n["no-build"]})).app}}};export{P as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{I as f,ja as v,k as d,ka as A,n as w,v as m}from"./chunk-PK73ZSND.js";import{b as l}from"./chunk-AFT6ABDE.js";import{h as p,k as F}from"./chunk-BI7LE6CZ.js";import{qb as V,sb as h}from"./chunk-HQUWYKSJ.js";import{i as q}from"./chunk-DPNZWBT5.js";import{g as c}from"./chunk-VKWPEFWQ.js";c();c();var g={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"publicApiVersions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"publicApiVersions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"handle"}},{kind:"Field",name:{kind:"Name",value:"supported"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};var S=new Map;async function W(t,r,e,o){let a="Admin",u=o??await b(r),n=r.storeFqdn,s=$(r);l()==="local"&&(s["x-forwarded-host"]=n,n=new m().host("app"));let i=x(n,u,r);return v({query:t,api:a,addedHeaders:s,url:i,token:r.token,variables:e})}async function E(t){let{query:r,session:e,variables:o,version:a,responseOptions:u,preferredBehaviour:n}=t,s=a??S.get(e.storeFqdn);s??=await b(e,n);let i=e.storeFqdn,k=$(e);l()==="local"&&(k["x-forwarded-host"]=i,i=new m().host("app"));let D={url:x(i,s,e),api:"Admin",token:e.token,addedHeaders:k},y;return"refresh"in e&&(y={type:"token_refresh",handler:e.refresh}),A({...D,query:r,variables:o,responseOptions:u,unauthorizedHandler:y,preferredBehaviour:n})}function $(t){return f(t)?{"X-Shopify-Shop":t.storeFqdn,"X-Shopify-Access-Token":t.token}:{}}async function b(t,r){let o=(await N(t,r)).reverse()[0];return S.set(t.storeFqdn,o),o}async function N(t,r){return(await R(t,r)).filter(o=>o.supported).map(o=>o.handle).sort()}async function R(t,r){try{return(await E({query:g,session:t,variables:{},version:"unstable",responseOptions:{handleErrors:!1},preferredBehaviour:r})).publicApiVersions}catch(e){if(e instanceof d&&e.response.status===403){let o=t.storeFqdn.replace(".myshopify.com","");throw new p(h`Looks like you don't have access to this dev store: (${V.link(o,`https://${t.storeFqdn}`)})`,h`If you're not the owner, create a dev store staff account for yourself`)}throw e instanceof d&&(e.response.status===401||e.response.status===404)?new p(`Error connecting to your store ${t.storeFqdn}: ${e.message} ${e.response.status} ${e.response.data}`):w(e)?new p(`Network error connecting to your store ${t.storeFqdn}: ${e instanceof Error?e.message:String(e)}`,"Check your internet connection and try again."):new F(`Unknown error connecting to your store ${t.storeFqdn}: ${e instanceof Error?e.message:String(e)}`)}}function x(t,r,e){let o=r??"unstable";return e&&f(e)?`https://${q}/cli/admin/api/${o}/graphql.json`:`https://${t}/admin/api/${o}/graphql.json`}export{W as a,E as b,N as c,R as d,x as e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as b}from"./chunk-
|
|
1
|
+
import{f as b}from"./chunk-4VJ6YK7U.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-XFH47Y75.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};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{a as f}from"./chunk-P5WLH64A.js";import{a as p}from"./chunk-WEWLPJK2.js";import{f as c,o as v}from"./chunk-K63FW7Q7.js";import{p as l,v as d}from"./chunk-3KM2GKXH.js";import{b as s,f as h}from"./chunk-IX4IGE5H.js";import{z as a}from"./chunk-WSCSFFLH.js";import{a as w}from"./chunk-CTNBSUVU.js";import{e as F,g as r}from"./chunk-VKWPEFWQ.js";r();r();async function u(e,n){let m=e.name??await c("New name for the theme"),i=await f(n,{header:"Select a theme to rename",filter:{theme:e.theme,development:e.development,live:e.live}});await v(i.id,{name:m},n),a({body:[...e.environment?[{subdued:`Environment: ${e.environment}
|
|
2
|
+
|
|
3
|
+
`}]:[],"The theme",...p(i),"was renamed to",`'${m}'`]})}var t=F(w(),1);var o=class extends d{static summary="Renames an existing theme.";static descriptionWithMarkdown=`Renames a theme in your store.
|
|
4
|
+
|
|
5
|
+
If no theme is specified, then you're prompted to select the theme that you want to rename from the list of themes in your store.
|
|
6
|
+
`;static description=this.descriptionWithoutMarkdown();static flags={...s,...l,name:h(t.Flags.string({char:"n",description:"The new name for the theme.",env:"SHOPIFY_FLAG_NEW_NAME",required:!1})),development:t.Flags.boolean({char:"d",description:"Rename your development theme. Use --development, --live, or --theme in non-interactive environments.",env:"SHOPIFY_FLAG_DEVELOPMENT"}),theme:t.Flags.string({char:"t",description:"Theme ID or name of the remote theme. Use --development, --live, or --theme in non-interactive environments.",env:"SHOPIFY_FLAG_THEME_ID"}),live:t.Flags.boolean({char:"l",description:"Rename your remote live theme. Use --development, --live, or --theme in non-interactive environments.",env:"SHOPIFY_FLAG_LIVE"})};static multiEnvironmentsFlags=["store","password","name",["live","development","theme"]];static nonTTYFlagRequirements(){return[{flags:["theme","development","live"]}]}async command(n,m){await u(n,m)}};export{o as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as x,c as D,f as M}from"./chunk-
|
|
1
|
+
import{b as x,c as D,f as M}from"./chunk-OQWMCJLY.js";import{c as w}from"./chunk-PK73ZSND.js";import{D as s,G as h,J as e,z as y}from"./chunk-WSCSFFLH.js";import{a as o}from"./chunk-76NEIDP5.js";import{ua as u,xb as _}from"./chunk-HQUWYKSJ.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();async function $(){let a=new Date,n=`${a.getFullYear()}-${(a.getMonth()+1).toString().padStart(2,"0")}-${a.getDate().toString().padStart(2,"0")}`,i=w(),t=await s({message:"Type of message?",choices:[{label:"Info",value:"info"},{label:"Warning",value:"warning"},{label:"Error",value:"error"}]}),b=await e({message:"Title"}),E=await e({message:"Message"}),S=await s({message:"Frequency",choices:[{label:"Only once",value:"once"},{label:"Once a week",value:"once_a_week"},{label:"Once a day",value:"once_a_day"},{label:"Always",value:"always"}]}),r=await e({message:"Minimum CLI version (optional)",initialAnswer:o,allowEmpty:!0}),l=await e({message:"Maximum CLI version (optional)",initialAnswer:o,allowEmpty:!0}),m=await e({message:"Minimum date in YYYY-MM-DD format (optional)",initialAnswer:n,allowEmpty:!0}),c=await e({message:"Maximum date in YYYY-MM-DD format (optional)",initialAnswer:n,allowEmpty:!0}),f=await e({message:"Surface. E.g.: app, theme, hydrogen, theme_app_extension... (optional)",allowEmpty:!0}),g=await e({message:"Comma separated list of commands. E.g.: app:generate:extension (optional)",allowEmpty:!0}),T=await e({message:"Slack channel of the team who will own this notification"}),d=await x(),v={id:i,type:t,title:b,frequency:S,message:E,minVersion:r.length===0?void 0:r,maxVersion:l.length===0?void 0:l,minDate:m.length===0?void 0:m,maxDate:c.length===0?void 0:c,surface:f.length===0?void 0:f,commands:g.length===0?void 0:g.split(",").map(N=>N.trim()),ownerChannel:T};d.notifications.push(v),await u("./notifications.json",JSON.stringify(d)),y({headline:"notifications.json file updated successfully."})}async function j(){let a=await D(),n={type:{header:"Type",color:"dim"},title:{header:"Title",color:"dim"},message:{header:"Message",color:"dim"},filters:{header:"Filters",color:"dim"}},i=a.notifications.map(t=>({type:t.type,title:t.title??"",message:t.message,filters:M(t)}));h({rows:i,columns:n}),_(`
|
|
2
2
|
`)}export{$ as a,j as b};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Z as a,i}from"./chunk-GFWXVO72.js";import{qb as e,sb as r}from"./chunk-HQUWYKSJ.js";import{g as u}from"./chunk-VKWPEFWQ.js";u();async function f(n,t,o){return c(n,t,o,"text")}async function c(n,t,o,S){return await a(t,o.source),S==="json"?r`${e.json({SHOPIFY_API_KEY:t.apiKey,SHOPIFY_API_SECRET:t.apiSecretKeys[0]?.secret,SCOPES:i(n.configuration)})}`:r`
|
|
2
2
|
${e.green("SHOPIFY_API_KEY")}=${t.apiKey}
|
|
3
3
|
${e.green("SHOPIFY_API_SECRET")}=${t.apiSecretKeys[0]?.secret??""}
|
|
4
4
|
${e.green("SCOPES")}=${i(n.configuration)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as I}from"./chunk-VKWPEFWQ.js";I();var o="4.7.1";export{o as a};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import{a as A,b as S,c as E,d as i,e as k,f as F,g as L,h as M,i as _}from"./chunk-PQG7XSQP.js";import{a as I}from"./chunk-ESPT6CGE.js";import{a as b}from"./chunk-RA3WWB2S.js";import{Y as P,sa as T}from"./chunk-GFWXVO72.js";import{f as l}from"./chunk-IX4IGE5H.js";import{D as p,F as g,J as v}from"./chunk-WSCSFFLH.js";import{a as G}from"./chunk-CTNBSUVU.js";import{Bb as u,Db as w,yb as h}from"./chunk-HQUWYKSJ.js";import{j as y}from"./chunk-773TIA5M.js";import{e as q,g as a}from"./chunk-VKWPEFWQ.js";a();a();a();a();async function H(e,t,r){let o={api_version:t},{webhookTopics:s}=await e.topics(o,r);return s}a();async function V(e){let t=e.map(o=>({label:o,value:o}));return await g({message:"Webhook Topic",choices:t})}async function C(e){return p({message:"Webhook ApiVersion",choices:e.map(t=>({label:t,value:t}))})}async function R(){return p({message:"Delivery method",choices:[{label:"HTTP",value:i.HTTP},{label:"Google Pub/Sub",value:i.PUBSUB},{label:"Amazon EventBridge",value:i.EVENTBRIDGE}]})}async function D(e){return(await v({message:"Address for delivery",validate:r=>{let o=r.trim();if(o.length===0)return"Address can't be empty";if(!k(o,e))return`Invalid address.
|
|
2
|
+
${d(e)}`}})).trim()}function U(e){return e===i.HTTP?["For remote HTTP testing, use a URL that starts with https://","For local HTTP testing, use http://localhost:{port}/{url-path}"]:e===i.PUBSUB?["For Google Pub/Sub, use pubsub://{project-id}:{topic-id}"]:e===i.EVENTBRIDGE?["For Amazon EventBridge, use an Amazon Resource Name (ARN) starting with arn:aws:events:"]:[]}function d(e){return U(e).map(t=>` \xB7 ${w(t)}`).join(`
|
|
3
|
+
`)}async function x(e,t){let{clientSecret:r,clientId:o,remoteApp:s,app:c}=e;return r&&(o||t!==i.EVENTBRIDGE)?{clientSecret:r,apiKey:o}:(P({appName:s.title,configFile:y(c.configPath)}),{clientSecret:s.apiSecretKeys.find(f=>f.secret).secret,apiKey:s.apiKey})}async function O(e,t,r){let o=await A(e,r);return t?L(t,o):C(o)}async function B(e,t,r,o){let s=await H(e,t,o);return r?M(r,t,s):V(s)}async function N(e,t){let r=e??_(t)??await R(),o=t??await D(r);return F(o,r)}async function Y(e){let t=await W(e);await z(t)}async function W(e){let t=await O(e.developerPlatformClient,e.apiVersion,e.organizationId),r=await B(e.developerPlatformClient,t,e.topic,e.organizationId),[o,s]=await N(e.deliveryMethod,e.address),c=await x(e,s);return{topic:r,apiVersion:t,deliveryMethod:s,address:o,apiKey:c.apiKey,clientSecret:c.clientSecret,developerPlatformClient:e.developerPlatformClient,organizationId:e.organizationId}}async function z(e){let t={topic:e.topic,api_version:e.apiVersion,address:e.address,delivery_method:e.deliveryMethod,shared_secret:e.clientSecret,api_key:e.apiKey},r=await S(e.developerPlatformClient,t,e.organizationId);if(!r.success){u(`Request errors:
|
|
4
|
+
${K(r.userErrors)}`);return}if(e.deliveryMethod===i.LOCALHOST){if(await E(e.address,r.samplePayload,r.headers)){h("Localhost delivery sucessful");return}u("Localhost delivery failed");return}r.samplePayload===JSON.stringify({})&&h("Webhook has been enqueued for delivery")}function K(e){try{return e.map(t=>JSON.parse(t.message).map(r=>` \xB7 ${r}`).join(`
|
|
5
|
+
`)).join(`
|
|
6
|
+
`)}catch{return JSON.stringify(e)}}var n=q(G(),1);var m=class e extends I{static summary="Trigger delivery of a sample webhook topic payload to a designated address.";static descriptionWithMarkdown=`
|
|
7
|
+
Triggers the delivery of a sample Admin API event topic payload to a designated address.
|
|
8
|
+
|
|
9
|
+
You should use this command to experiment with webhooks, to initially test your webhook configuration, or for unit testing. However, to test your webhook configuration from end to end, you should always trigger webhooks by performing the related action in Shopify.
|
|
10
|
+
|
|
11
|
+
Because most webhook deliveries use remote endpoints, you can trigger the command from any directory where you can use Shopify CLI, and send the webhook to any of the supported endpoint types. For example, you can run the command from your app's local directory, but send the webhook to a staging environment endpoint.
|
|
12
|
+
|
|
13
|
+
To learn more about using webhooks in a Shopify app, refer to [Webhooks overview](https://shopify.dev/docs/apps/webhooks).
|
|
14
|
+
|
|
15
|
+
### Limitations
|
|
16
|
+
|
|
17
|
+
- Webhooks triggered using this method always have the same payload, so they can't be used to test scenarios that differ based on the payload contents.
|
|
18
|
+
- Webhooks triggered using this method aren't retried when they fail.
|
|
19
|
+
- Trigger requests are rate-limited using the [Partner API rate limit](https://shopify.dev/docs/api/partner#rate_limits).
|
|
20
|
+
- You can't use this method to validate your API webhook subscriptions.
|
|
21
|
+
`;static description=this.descriptionWithoutMarkdown();static flags={...b,help:n.Flags.help({required:!1,hidden:!1,env:"SHOPIFY_FLAG_HELP",description:"This help. When you run the trigger command the CLI will prompt you for any information that isn't passed using flags."}),topic:l(n.Flags.string({required:!1,hidden:!1,env:"SHOPIFY_FLAG_TOPIC",description:"The requested webhook topic."})),"api-version":l(n.Flags.string({required:!1,hidden:!1,env:"SHOPIFY_FLAG_API_VERSION",description:"The API Version of the webhook topic."})),"delivery-method":n.Flags.string({required:!1,hidden:!1,options:[i.HTTP,i.PUBSUB,i.EVENTBRIDGE],env:"SHOPIFY_FLAG_DELIVERY_METHOD",description:"Method chosen to deliver the topic payload. If not passed, it's inferred from the address."}),"client-secret":n.Flags.string({required:!1,hidden:!1,env:"SHOPIFY_FLAG_CLIENT_SECRET",description:"Your app's client secret. This secret allows us to return the X-Shopify-Hmac-SHA256 header that lets you validate the origin of the response that you receive."}),address:l(n.Flags.string({required:!1,hidden:!1,env:"SHOPIFY_FLAG_ADDRESS",description:`The URL where the webhook payload should be sent.
|
|
22
|
+
You will need a different address type for each delivery-method:
|
|
23
|
+
${d(i.HTTP)}
|
|
24
|
+
${d(i.PUBSUB)}
|
|
25
|
+
${d(i.EVENTBRIDGE)}`}))};async run(){let{flags:t}=await this.parse(e),r=await T({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config}),o={...r,topic:t.topic,apiVersion:t["api-version"],deliveryMethod:t["delivery-method"],address:t.address,clientId:t["client-id"],clientSecret:t["client-secret"],path:t.path,config:t.config,organizationId:r.organization.id};return await Y(o),{app:r.app}}};export{m as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as U,b as xt}from"./chunk-
|
|
1
|
+
import{a as U,b as xt}from"./chunk-JLGA3B7P.js";import{a as ht,b as ft,f as Ie,g as ae,h as A,i as ce,k as Et,n as Tt}from"./chunk-5JW4JQWZ.js";import{a as M,l as gt,m as yt}from"./chunk-K63FW7Q7.js";import{s as ie,t as W}from"./chunk-3KM2GKXH.js";import{a as O,b as N,e as nt,g as rt,i as ot,j as it,k as at,n as ct,p as lt,q as dt,r as oe,s as $,u as ut,w as pt}from"./chunk-Q7BOSHWX.js";import{aa as mt}from"./chunk-TP4Z5OZT.js";import{b as Ke,xa as L,za as H}from"./chunk-PK73ZSND.js";import{A as I,B as te,C as tt,T as st,y as et}from"./chunk-WSCSFFLH.js";import{h as se}from"./chunk-BI7LE6CZ.js";import{Ab as F,Bb as D,O as Xe,Ta as P,Wa as C,Z as $e,bb as ke,ma as k,qb as j,sb as ne,ua as be,wa as Ze,xb as re,ya as Qe}from"./chunk-HQUWYKSJ.js";import{d as E,g as V,j as Ve,k as q}from"./chunk-773TIA5M.js";import{e as Ge,g as h}from"./chunk-VKWPEFWQ.js";h();h();h();var rs=".shopifyignore",Rt=/templates\/\*(\.(json|liquid))?$/,St=new Set;function Le(e,t={}){let s=t.ignoreFromFile??[],n=t.ignore??[],r=t.only??[],[o=[],i=[]]=_e(s),[a=[],p=[]]=_e(n),[m=[],c=[]]=_e(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)))),p.length>0&&(l=l.concat(e.filter(B(p,"--ignore",!0)))),c.length>0&&(l=l.filter(B(c,"--only"))),Xe(l,f=>f.key)}function B(e,t,s=!1){return({key:n})=>{if(e.length===0)return!0;let r=e.some(i=>os(n,i)||cs(i)&&as(n,ls(i)));return(s?!r:r)?(F(`Ignoring theme file ${n} via ${t}...`),!1):!0}}async function wt(e){let t=E(e,rs);return await P(t)?(await k(t,{encoding:"utf8"})).split(/(\r\n|\r|\n)/).map(r=>r.trim()).filter(r=>r&&!r.startsWith("#")):[]}function _e(e){let t=e.filter(n=>n.startsWith("!")).map(n=>n.slice(1));return[e.filter(n=>!n.startsWith("!")),t]}function os(e,t){let s={matchBase:!0,noglobstar:!0};return ke(e,t,s)?!0:(!t.includes("*")&&t.endsWith("/")&&!St.has(t)&&(St.add(t),I({headline:"Directory pattern may be misleading.",body:`For more reliable matching, consider using "${t}*" or "${t}*.<file_extension>" instead.`})),is(t)?ke(e,t.replace(Rt,"templates/**/*$1"),s):!1)}function is(e){return Rt.test(e)}function as(e,t){return t.test(e)}function cs(e){return e.startsWith("/")&&e.endsWith("/")}function ls(e){return new RegExp(e.slice(1,-1))}h();import Ft from"fs/promises";var le=class{notifyPath;isValidUrl;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 Ft.writeFile(this.notifyPath,t),await Ft.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 ds from"node:events";var Pt=["assets/**/*.*","locales/**/*.json","blocks/**/*.liquid","snippets/**/*.liquid"];function vt(e){let t=new Map,s=new Set,n=new ds,r=(c,l)=>{n.emit(c,l)},o=async c=>{let l=await ue(e,c),u=de(c,l),f=typeof l=="string"?l:"",T=Buffer.isBuffer(l)?l.toString("base64"):"";return t.set(c,M({key:c,checksum:u,value:f,attachment:T})),l},i=C(Pt,{cwd:e,deep:3,ignore:W}).then(c=>Promise.all(c.map(o))),a=(c,l)=>{let u=V(e,l),f=o(u).then(()=>{let T=t.get(u);return s.add(T.key),T.value??T.attachment??""});st(5).then(()=>{s.delete(u)}).catch(()=>{}),r(c,{fileKey:u,onContent:T=>{f.then(v=>{v&&T(v)}).catch(()=>{})},onSync:T=>{}})},p=c=>{let l=V(e,c);s.delete(l),t.delete(l),r("unlink",{fileKey:l,onSync:u=>u()})},m=new Set(Pt.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-5RWEYTNQ.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",p.bind(null))}}}h();h();var us="https://unpkg.com/@shopify/polaris@13.9.2/build/esm/styles.css";function $t(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function bt(e){return(0,String.raw)`<!DOCTYPE html>
|
|
2
2
|
<html>
|
|
3
3
|
<head>
|
|
4
4
|
<title>${e.title}</title>
|
|
@@ -66,11 +66,11 @@ import{a as U,b as xt}from"./chunk-KRZABRYT.js";import{a as ft,b as ht,f as _e,g
|
|
|
66
66
|
</div>
|
|
67
67
|
</div>
|
|
68
68
|
</body>
|
|
69
|
-
</html>`}
|
|
70
|
-
`)}))}):ce(t.session,{method:s.method,path:n,query:[...new URLSearchParams(r)],themeId:String(e.id),sectionId:"",headers:He(s),replaceExtensionTemplates:
|
|
69
|
+
</html>`}h();h();var ps=/<head(\s[^>]*)?>/i,qe="https://cdn.shopify.com/storefront",ms=`${qe}/standard-events.js`,hs=`${qe}/standard-events.dev.js`,kt=`${qe}/standard-events-inspector.js`,It="shopify-cli-standard-events-inspector",fs=new RegExp(`<script\\b[^>]*(?:\\bid=["']${je(It)}["']|\\bsrc=["']${je(kt)}["'])[^>]*>`,"i"),gs=new RegExp(je(ms),"g");function pe(e){return fs.test(e)?e:e.replace(ps,t=>`${t}<script id="${It}" src="${kt}" defer></script>`)}function _t(e){return e.replace(gs,hs)}function je(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}h();var Lt=80;function X(e,t,s){if(!ys(e)||s.type==="theme-extension")return;let n=e.path.length>Lt?`${e.path.substring(0,Lt)}...`:e.path,o=t.headers.get("server-timing")?.match(/cfRequestDuration;dur=([\d.]+)/)?.[1],i=o?`${Math.round(Number(o))}ms`:"",a=Es(t.status),p=e.method.padStart(6);re(ne`• ${ie.format(new Date)} Request ${j.raw("\xBB")} ${p} ${a(String(t.status))} ${n} ${j.gray(i)}`)}function ys(e){let t=[z,J,"/checkouts","/payments"],s=[".js",".css",".json",".map"];if(t.some(o=>e.path.startsWith(o)))return!1;let[n]=e.path.split("?"),r=q(n);return!s.includes(r)}function Es(e){return e<300?j.green:e<400?j.yellow:j.errorText}var J="/cdn/",z="/ext/cdn/",Ce="/api/collect",Ts=/^\/cart\//,xs=/^\/cart(\/|\.js|\.json|$)/,Ae=/^\/checkouts\/(?!internal\/)/,jt=/^\/account(\/login\/multipass(\/[^/]+)?|\/logout)?\/?$/,Ss=new RegExp(`^${J}`),Rs=new RegExp(`^${z}`),ws=/^\/api\/(unstable|\d{4}-\d{2})\/graphql\.json/,Fs=["/.well-known","/shopify/monorail","/mini-profiler-resources","/web-pixels-manager","/web-pixels@","/wpm","/services/",Ce,"/cdn-cgi/challenge-platform"],qt="_shopify_essential",Ps=new RegExp(`${qt}=([^;]*)(;|$)`);function Ct(e,t){return $(async s=>{if(Fs.some(n=>s.path.startsWith(n)))return null;if(vs(s)){let n=s.path.split("?")[0]??"";return De(s,t).then(async r=>{if(X(s,r,t),r.ok){let o=n.split("/").at(-1)??"";if(t.localThemeFileSystem.files.has(`assets/${o}.liquid`)){let i=Z(await r.text(),t);return new Response(i,r)}}return r}).catch(async r=>{let{status:o,statusText:i,...a}=A(r,`Failed to proxy request to ${n}`);return o>=500&&!n.endsWith(".js.map")&&I(a),new Response(r.message,{status:o,statusText:i})})}})}function vs(e){if(e.method!=="GET"||e.path.match(Ts)||e.path.match(Ae)||e.path.match(jt)||e.path.match(Ss)||e.path.match(Rs))return!0;let[t]=e.path.split("?"),s=q(t),n=e.headers.get("accept")??"*/*";return s===".html"||n.includes("text/html")?!1:!!s||n!=="*/*"}function $s(e){let[t]=e.split("?");return!(xs.test(t)||Ae.test(t)||jt.test(t))}function me(e){return e.session.storeFqdn.replace(/\\/g,"\\\\").replace(/\./g,"\\.")}function bs(e){return ws.test(e.path)}function Z(e,t){let s=e,n=`(data-shs-beacon-endpoint=["'])https://${me(t)}${Ce}`,r=new RegExp(n,"g");s=s.replace(r,`$1${Ce}`);let o=new RegExp(`(https?:)?//${me(t)}${J}`,"g");s=s.replace(o,J);let i=/(?:https?:)?\/\/cdn\.shopify\.com\/(.*?\/(assets\/[^?#"'`>\s]+))/g,a=c=>c.startsWith("assets/"),p=new Set([...t.localThemeFileSystem.files.keys()].filter(a)),m=new Set([...t.localThemeExtensionFileSystem.files.keys()].filter(a));return s=s.replace(i,(c,l,u)=>{let f=u&&p.has(u),T=u&&m.has(u)&&l.startsWith("extensions/");return U(u).startsWith("image/")?c:T?`${z}${l}`:f?`${J}${l}`:c}),t.options.standardEventsDevBundle&&(s=_t(s)),s}function ks(e,t){let s=`http://${t.options.host}:${t.options.port}`,n=new RegExp(`data-base-url=["']((?:https?:)?//${me(t)})[^"']*?["']`,"g");return e.replace(n,(r,o)=>r.replace(o,s))}function Is(e,t){let s=new RegExp(`Domain=${me(t)};\\s*`,"gi");return e.map(n=>n.replace(s,""))}async function Q(e,t,s){let n=Ht(e,t);if(n.status>=300&&n.status<400)return n;t.headers.get("content-type")?.includes("application/json")||n.headers.set("content-type","text/html; charset=utf-8");let i=await n.text();return i=Z(i,e),i=ks(i,e),e.options.standardEventsInspector&&(i=pe(i)),s&&(i=s(i)??i),new Response(i,n)}var At=["connection","keep-alive","proxy-authenticate","proxy-authorization","te","trailer","transfer-encoding","upgrade","expect","content-security-policy","host"];function Ht(e,t){let s=new Response(t.body,t);s.headers.delete("content-length"),s.headers.delete("content-encoding");for(let i of At)s.headers.delete(i);s.headers.delete("access-control-allow-origin"),s.headers.delete("access-control-allow-credentials"),s.headers.delete("access-control-allow-methods"),s.headers.delete("access-control-allow-headers"),s.headers.delete("access-control-expose-headers"),s.headers.delete("access-control-max-age");let n=s.headers.get("Link");n&&s.headers.set("Link",Z(n,e));let r=s.headers.get("Location");if(r){let i=new URL(r,"https://shopify.dev");Ae.test(i.pathname)||(i.searchParams.delete("_fd"),i.searchParams.delete("pb"),s.headers.set("Location",i.href.replace(i.origin,"")))}let o=s.headers.getSetCookie();if(o?.length){s.headers.set("Set-Cookie",Is(o,e).join(","));let i=o.join(",").match(Ps)?.[1];i&&(e.session.sessionCookies[qt]=i)}return s}function He(e){let t=nt(e);for(let n of At)delete t[n];delete t["upgrade-insecure-requests"];let s=rt(e);return s&&(t["X-Forwarded-For"]=s),t}function De(e,t){let s=e.path.replace(new RegExp(z,"g"),"/"),n=e.path.startsWith(z)?"cdn.shopify.com":t.session.storeFqdn,r=new URL(s,`https://${n}`);if(r.hostname!==n)return Promise.reject(new Error(`Request failed: Hostname mismatch. Expected host: ${n}. Resulting URL hostname: ${r.hostname}`));let o=ot(e),i=He(e);return bs(e)||(/\/assets\/[^/]+\.(css|js)$/.test(r.pathname)&&/\?\d+$/.test(r.search)&&(r.search=`?v=${Date.now()}`),r.searchParams.set("_fd","0"),r.searchParams.set("pb","0"),i=ft({...i,...ht(),...n===t.session.storeFqdn?t.session.crawlerSignatureHeaders:{},referer:r.origin,Cookie:Et(t.session,{headers:i}),...t.type==="theme"&&$s(e.path)?{Authorization:`Bearer ${t.session.storefrontToken}`}:{}})),fetch(r,{method:e.method,body:o,duplex:o?"half":void 0,redirect:"manual",headers:i}).then(a=>Ht(t,a)).catch(a=>{throw ae(L(a),r)})}var Oe=0,_s=5;function Ot(e,t){return $(s=>{let[n="/",r=""]=s.path.split("?");return js(s)&&(t.lastRequestedPath=s.path),t.options.errorOverlay!=="silent"&&t.localThemeFileSystem.uploadErrors.size>0?Dt(t,{status:500,statusText:"Internal Server Error"},{title:"Failed to Upload Theme Files",header:"Upload Errors",errors:Array.from(t.localThemeFileSystem.uploadErrors.entries()).map(([i,a])=>({message:i,code:a.join(`
|
|
70
|
+
`)}))}):ce(t.session,{method:s.method,path:n,query:[...new URLSearchParams(r)],themeId:String(e.id),sectionId:"",headers:He(s),replaceExtensionTemplates:fe(t),replaceTemplates:Ne(t,n,it(s,"localization")?.toLowerCase())}).then(async i=>{if(i.status>=400&&i.status<500&&!Ls(s)){let a=await qs(s,t,i);if(a)return X(s,a,t),a}return X(s,i,t),Q(t,i,a=>(Cs(i,a,String(e.id)),Oe=0,We(a,t)))}).catch(async i=>{if(i instanceof he&&(F(`Theme ID mismatch: expected ${i.getExpectedThemeId()} but got ${i.getActualThemeId()}; refreshing session...`),H("theme-service:error-page:theme-id-mismatch"),t.session.refresh)){Oe++,Oe>_s&&(tt(new se(i.getMessage())),process.exit(1)),await t.session.refresh();let f=new URLSearchParams(r),T=new URLSearchParams([...f].filter(([Pe])=>!Pe.startsWith("__sfr"))),v=n+(T.toString()?`?${T}`:"");return new Response(null,{status:302,headers:{Location:v}})}let{status:a,statusText:p,cause:m,...c}=A(i,"Failed to render storefront"),[l,...u]=c.headline.split(`
|
|
71
71
|
`);return te(c),Dt(t,{status:a,statusText:p},{title:l,header:l,errors:[{message:[...u,m.message].join("<br>"),code:m.stack?.replace(`${m.message}
|
|
72
|
-
`,"")??""}]})})})}function Dt(e,t,s){let n=We(bt(s),e);return e.options.standardEventsInspector&&(n=pe(n)),H("theme-service:error-page:rendered"),new Response(n,{...t,headers:t.headers??{"Content-Type":"text/html; charset=utf-8"}})}function Ls(e){let t=new URLSearchParams(e.path.split("?")[1]);return["section_id","sections","app_block_id"].some(s=>t.has(s))}function js(e){return e.headers.get("sec-fetch-mode")==="navigate"}async function qs(e,t,s){F(`Render failed for ${e.path} with ${s.status} (x-request-id: ${s.headers.get("x-request-id")}), trying proxy...`);let n=await De(e,t).catch(r=>new Response(null,A(r)));if(n.status<400)return F(`Proxy status: ${n.status}. Returning proxy response.`),t.options.standardEventsInspector&&(n.headers.get("content-type")??"").includes("text/html")?Q(t,n):n;F(`Proxy status: ${n.status}. Returning render error.`)}function Cs(e,t,s){let n=t.match(/Shopify\.theme\s*=\s*{[^}]+?"id":\s*"?(\d+)"?(}|,)/)?.[1];if(n&&n!==s)throw new
|
|
73
|
-
`)),this.response=n,this.expectedThemeId=t,this.actualThemeId=s}getMessage(){return this.message}getResponse(){return this.response}getExpectedThemeId(){return this.expectedThemeId}getActualThemeId(){return this.actualThemeId}};
|
|
72
|
+
`,"")??""}]})})})}function Dt(e,t,s){let n=We(bt(s),e);return e.options.standardEventsInspector&&(n=pe(n)),H("theme-service:error-page:rendered"),new Response(n,{...t,headers:t.headers??{"Content-Type":"text/html; charset=utf-8"}})}function Ls(e){let t=new URLSearchParams(e.path.split("?")[1]);return["section_id","sections","app_block_id"].some(s=>t.has(s))}function js(e){return e.headers.get("sec-fetch-mode")==="navigate"}async function qs(e,t,s){F(`Render failed for ${e.path} with ${s.status} (x-request-id: ${s.headers.get("x-request-id")}), trying proxy...`);let n=await De(e,t).catch(r=>new Response(null,A(r)));if(n.status<400)return F(`Proxy status: ${n.status}. Returning proxy response.`),t.options.standardEventsInspector&&(n.headers.get("content-type")??"").includes("text/html")?Q(t,n):n;F(`Proxy status: ${n.status}. Returning render error.`)}function Cs(e,t,s){let n=t.match(/Shopify\.theme\s*=\s*{[^}]+?"id":\s*"?(\d+)"?(}|,)/)?.[1];if(n&&n!==s)throw new he(s,n,e)}var he=class extends Error{response;expectedThemeId;actualThemeId;constructor(t,s,n){super([`Theme ID mismatch: expected ${t} but got ${s}.`,`Request ID: ${n.headers.get("x-request-id")}`,`URL: ${n.url}`,"This is likely related to an issue in upstream Shopify APIs.","Please try again in a few minutes and report this issue:","https://community.shopify.dev/c/shopify-cli-libraries/14"].join(`
|
|
73
|
+
`)),this.response=n,this.expectedThemeId=t,this.actualThemeId=s}getMessage(){return this.message}getResponse(){return this.response}getExpectedThemeId(){return this.expectedThemeId}getActualThemeId(){return this.actualThemeId}};h();h();function ge(e,t){let s=new RegExp(`{%-?\\s*${t}\\s*-?%}`),n=new RegExp(`{%-?\\s*end${t}\\s*-?%}`),r=s.exec(e);if(!r)return;let o=r.index+r[0].length;n.lastIndex=o;let i=n.exec(e);if(!i)return;let a=i.index;return e.slice(o,a)}h();function ye(e){let{pathname:t,search:s,searchParams:n}=new URL(e.path,"http://e.c");return{pathname:t,search:s,searchParams:n}}var As={stylesheet:new Map,javascript:new Map};function Nt(e,t){return $(async s=>{if(s.method!=="GET")return;if(Ns(s,t))return Ws(s,t);let{file:n,fileKey:r,isUnsynced:o}=Os(s,t);if(!r)return;let i=U(r);if(i.startsWith("image/")&&s.path.includes("&")&&!o)return;if(ct(s,"X-Local-Asset","true"),!n){o&&N(s,O({statusCode:404,statusMessage:"Not found"}));return}let a=n.value?Buffer.from(Z(n.value,t)):Buffer.from(n.attachment??"","base64");return oe(s,{getContents:()=>a,getMeta:()=>({type:i,size:a.length,mtime:n.stats?.mtime})})})}var Hs=/^(?:\/cdn\/(?!extensions\/).*?)?\/assets\/([^?]+)/,Ds=/^(?:\/(?:ext\/)?cdn\/extensions\/.*?)?\/assets\/([^?]+)/;function Os(e,t){let s=(n,r)=>{let o=e.path.match(n)?.[1];if(o){let i=E("assets",o),a=r.files.get(i),p=r.unsyncedFileKeys.has(i);if(a||p)return{file:a,isUnsynced:p,fileKey:i}}};return s(Hs,t.localThemeFileSystem)??s(Ds,t.localThemeExtensionFileSystem)??{isUnsynced:!1,fileKey:void 0,file:void 0}}function Ns(e,t){return t.type==="theme"&&e.path.includes("/compiled_assets")}function Ws(e,t){switch(ye(e).pathname.split("/").at(-1)){case"styles.css":return Ms(t,e);case"block-scripts.js":return Me(t,e,"block");case"snippet-scripts.js":return Me(t,e,"snippet");case"scripts.js":return Me(t,e,"section");case void 0:break;default:break}}function Ms(e,t){let s=Ee(e,"section"),n=Ee(e,"block"),r=Ee(e,"snippet"),o=[`/*** GENERATED LOCALLY ***/
|
|
74
74
|
`];for(let[,a]of[...s,...n,...r]){let p=Wt(a,"stylesheet");p&&o.push(p)}let i=o.join(`
|
|
75
75
|
`);return oe(t,{getContents:()=>i,getMeta:()=>({type:"text/css",size:Buffer.byteLength(i),mtime:new Date})})}function Me(e,t,s){let n=Ee(e,s),r=`${s}s`,o=[`
|
|
76
76
|
/*** GENERATED LOCALLY ***/
|
|
@@ -96,8 +96,8 @@ import{a as U,b as xt}from"./chunk-KRZABRYT.js";import{a as ft,b as ht,f as _e,g
|
|
|
96
96
|
}
|
|
97
97
|
})();`)}o.push("})();");let i=o.join(`
|
|
98
98
|
`);return oe(t,{getContents:()=>i,getMeta:()=>({type:"text/javascript",size:Buffer.byteLength(i),mtime:new Date})})}function Ee(e,t){return[...e.localThemeFileSystem.files.entries()].filter(([s])=>s.endsWith(".liquid")&&s.startsWith(`${t}s/`)).sort(([s],[n])=>s.localeCompare(n))}function Wt(e,t){let s=As[t],n=s.get(e.key);if(n?.checksum===e.checksum)return n.content;if(s.delete(e.key),!e.value)return;let r=[`/* ${e.key} */`],o=ge(e.value??"",t)?.trimEnd();if(o&&r.push(o),r.length>1){let i=r.join(`
|
|
99
|
-
`);return s.set(e.key,{checksum:e.checksum,content:i}),i}}f();import*as Mt from"node:os";function Us(e,t){let s=new Set,n=`:${t}`,r=e.toLowerCase().trim();if(s.add(`${r}${n}`),["localhost","127.0.0.1","::1","0.0.0.0"].includes(r)&&(s.add(`localhost${n}`),s.add(`127.0.0.1${n}`),s.add(`[::1]${n}`)),r==="0.0.0.0"||r==="::")for(let i of Object.values(Mt.networkInterfaces()))for(let a of i??[]){let p=a.address.toLowerCase().split("%")[0],c=a.family==="IPv6"?`[${p}]`:p;s.add(`${c}${n}`)}return s}function Bs(e){if(e)return e.toLowerCase().replace(/\.(?=:\d|$)/,"")}function Ut(e,t){let s=Us(e,t);return $(n=>{let r=n.node.req.headers.host,o=Bs(r);if(!o||!s.has(o))return N(n,O({statusCode:400,statusMessage:"Bad Request",message:"Invalid Host header"}))})}f();function Bt(){return Jt()}function Cr(){return Jt()}function Jt(){return{root:"",files:new Map,unsyncedFileKeys:new Set,uploadErrors:new Map,ready:()=>Promise.resolve(),delete:async e=>{},read:async e=>"",write:async e=>{},stat:async e=>({mtime:new Date,size:1}),addEventListener:()=>{},startWatcher:async()=>{}}}import{createServer as Js}from"node:http";async function Gr(e,t){let s=await Ys(e,t);return await Gs(e,s),zs(e,s)}function zs(e,t){let s=ut();s.use(Ut(t.options.host,t.options.port)),s.use(zt(e,t)),s.use(Nt(e,t)),s.use(Ct(e,t)),s.use(Ot(e,t));let n=Js(pt(s));return{dispatch:s.handler.bind(s),start:async()=>new Promise(r=>n.listen({port:t.options.port,host:t.options.host},()=>r({close:async()=>{await Promise.all([new Promise(o=>{n.closeAllConnections(),n.close(o)})])}})))}}async function Ys(e,t){let{adminSession:s,storefrontPassword:n,themeExtensionPort:r,themeExtensionDirectory:o,crawlerSignatureHeaders:i}=t,a="127.0.0.1",p=r??9293,m=Bt(),c=vt(o);return await c.ready(),{session:await Tt(e.id.toString(),s,void 0,n,i),localThemeFileSystem:m,localThemeExtensionFileSystem:c,directory:o,type:"theme-extension",lastRequestedPath:"",options:{themeEditorSync:!1,noDelete:!1,ignore:[],only:[],host:a,port:p,liveReload:"hot-reload",standardEventsDevBundle:!1,standardEventsInspector:!1,open:!1,errorOverlay:"default"}}}async function Gs(e,t){let s=t.localThemeExtensionFileSystem,n=({fileKey:r,onContent:o,onSync:i})=>{o(()=>{Te(e,t,i,{type:"update",key:r,payload:{isThemeExtension:!0}})})};return s.addEventListener("add",n),s.addEventListener("change",n),s.ready().then(async()=>s.startWatcher())}function he(e){let t={},s=e.localThemeExtensionFileSystem;for(let n of s.unsyncedFileKeys){let r=s.files.get(n),o=r?.value??r?.attachment;o&&(t[n]=o)}return t}var Re=Ge(mt(),1);import Vs from"node:events";var Ue=new Map,K=new Map;function Yt(e,t){let s=(0,Re.parseJSON)(t,null,!0);if(!s)return;let n=s?.sections;n&&!e.startsWith("locales/")?K.set(e,Object.entries(n||{}).map(([r,{type:o}])=>[o,r])):K.delete(e)}function Be(e){return!e.startsWith("assets/")&&[".liquid",".json"].includes(q(e))}function Ne(e,t,s){let n={},r=/^templates\/.+\.json$/,o=t?`${E("templates",t.replace(/^\//,"").replace(/\.html$/,"")||"index")}.json`:"",i=!!t&&e.localThemeFileSystem.files.has(o),a=/^locales\/.+\.json$/,p=!!s&&(e.localThemeFileSystem.files.has(`locales/${s}.json`)||e.localThemeFileSystem.files.has(`locales/${s}.default.json`));for(let m of e.localThemeFileSystem.unsyncedFileKeys)if(Be(m)){if(i&&r.test(m)){if(m!==o)continue}else if(a.test(m)){if(p){if(!m.startsWith(`locales/${s}.`))continue}else if(!m.includes(".default."))continue}n[m]=e.localThemeFileSystem.files.get(m)?.value??""}return n}function uo(e,t){let s=({fileKey:r,onContent:o,onSync:i})=>{let a=q(r);o(p=>{!en(r)&&Be(r)&&a===".json"&&Yt(r,p),Te(e,t,i,{type:"update",key:r,payload:Qs(r,t)})})},n=({fileKey:r,onSync:o})=>{K.delete(r),Te(e,t,o,{type:"delete",key:r})};return t.localThemeFileSystem.addEventListener("add",s),t.localThemeFileSystem.addEventListener("change",s),t.localThemeFileSystem.addEventListener("unlink",n),t.localThemeFileSystem.ready().then(async()=>{let r=[...t.localThemeFileSystem.files];return Promise.allSettled(r.map(async([o,i])=>{if(o.endsWith(".json")){let a=i.value??await t.localThemeFileSystem.read(o);a&&typeof a=="string"&&Yt(o,a)}else o.endsWith(".liquid")&&Zt(i)}))})}var Xs="1",Vt=new Vs;function Se(e){Vt.emit("hot-reload",{...e,version:Xs})}function zt(e,t){return $(s=>{let n=s.headers.get("accept")==="text/event-stream",r=ye(s).searchParams;if(n){let o=dt(s);return Vt.on("hot-reload",i=>{o.push(JSON.stringify(i)).catch(a=>{_({headline:"Failed to send HotReload event.",body:a.stack})})}),Se({type:"open",pid:String(process.pid),themeId:String(e.id)}),o.send().then(()=>o.flush())}if(r.has("hr-log")){let o=(0,Re.parseJSON)(r.get("hr-log")??"",null);return o&&(o.headline=`[HotReload] ${o.headline}`,o.type==="error"?te(o):o.type==="warn"?_(o):o.type==="info"?et(o):_({headline:`Unknown HotReload log type: ${o.type}`})),null}if(s.path===Xt)return k(we()).then(o=>at(s,o,"application/javascript")).catch(o=>N(s,O({cause:o})));if(r.has("section_id")||r.has("app_block_id")){let o=r.get("section_key")??"",i=r.get("section_id")??"",a=r.get("app_block_id")??"",p=s.path.split("?")[0]??"",m=new URLSearchParams(r);if(m.delete("section_key"),m.delete("section_id"),m.delete("app_block_id"),m.delete("_fd"),m.delete("pb"),i===""&&a==="")return;let c={};if(i){let l=t.localThemeFileSystem.unsyncedFileKeys;if(l.has(o)){let u=t.localThemeFileSystem.files.get(o)?.value;if(!u)return"";c[o]=u}for(let u of l)if(u.endsWith(".json")){for(let[h,T]of K.get(u)??[])if(i.endsWith(`__${T}`)){let v=t.localThemeFileSystem.files.get(u)?.value;v&&(c[u]=v);continue}}}return ce(t.session,{method:s.method,path:p??"/",query:[...m.entries()],themeId:String(e.id),sectionId:i,appBlockId:a,replaceTemplates:c,headers:lt(s),replaceExtensionTemplates:he(t)}).then(async l=>{if(!l.ok)throw H("theme-service:hot-reload:section:render-failed"),ae(l);return Q(t,l)}).catch(async l=>{let{status:u,statusText:h,...T}=A(L(l),"Failed to render section on Hot Reload");return H("theme-service:hot-reload:section:render-error"),a||_(T),new Response(null,{status:u,statusText:h})})}})}var ee=(e,t)=>Se({themeId:String(e),type:"full",key:t});function Te(e,t,s,n){let r=()=>ee(e.id,n.key);if(t.options.liveReload==="off")return;if(t.options.liveReload==="full-page"){s(r);return}let o=String(e.id);Se({sync:"local",themeId:o,...n}),s(()=>Se({sync:"remote",themeId:o,...n}),r)}function Zs(e,t){let s=new Set;if(e.endsWith(".json")){let n=t.localThemeFileSystem.files.get(e)?.value;if(n){let r=(0,Re.parseJSON)(n,null,!0)?.sections;for(let o of Object.keys(r??{}))s.add(o)}}else{let n=e.match(/^sections\/(.+)\.liquid$/)?.[1];if(n)for(let[r,o]of K)for(let[i,a]of o)i===n&&s.add(a)}return[...s]}function Qs(e,t){let[s]=e.split("/"),n=t.localThemeFileSystem.files.get(e);return{sectionNames:s==="sections"?Zs(e,t):[],replaceTemplates:Be(e)?Ne(t):{},updatedFileParts:n&&Zt(n)}}var xe="hot-reload-client",Ks="/cdn/shopifycloud/theme-hot-reload/theme-hot-reload.js",Gt=new RegExp(`<script id="${xe}"[^>]*>[^<]*</script>`),Xt="/@shopify/theme-hot-reload";function We(e,t){return t.options.liveReload==="off"?e.replace(Gt,""):process.env.SHOPIFY_CLI_LOCAL_HOT_RELOAD?e.replace(Gt,"").replace(/<\/head>/,`<script id="${xe}" src="${Xt}" defer></script></head>`):e.includes(`<script id="${xe}"`)?e:e.replace(/<\/head>/,`<script id="${xe}" src="${Ks}" defer></script></head>`)}function en(e){return e.startsWith("assets/")}function Zt(e){if(!(["sections/","snippets/","blocks/"].some(c=>e.key.startsWith(c))&&e.key.endsWith(".liquid")))return;let n={stylesheetTag:!1,javascriptTag:!1,schemaTag:!1,liquid:!1},r={checksum:e.checksum,liquid:"",stylesheetTag:"",javascriptTag:"",schemaTag:""},o=Ue.get(e.key);if(o?.checksum===e.checksum||(Ue.delete(e.key),!e.value))return n;let i=["stylesheet","javascript","schema"],a=c=>c?.replace(/\s+/g," ").trim(),p=e.value,m=(c,l)=>{p=p.replace(l,"");let u=a(l),h=`${c}Tag`;n[h]=!o||u!==o[h],r[h]=u};for(let c of i){let l=ge(e.value??"",c);l&&m(c,l)}return p=a(p.replace(/<!--[\s\S]*?-->/g,"").replace(/{%\s*comment\s*%}[\s\S]*?{%\s*endcomment\s*%}/g,"").replace(/{%\s*doc\s*%}[\s\S]*?{%\s*enddoc\s*%}/g,"")),r.liquid=p,n.liquid=!o||p!==o.liquid,Ue.set(e.key,r),n}f();var Qt=Ge(mt(),1);function tn(e){return(e.startsWith("templates/")||e.startsWith("sections/"))&&e.endsWith(".json")}async function Kt(e,t,s){if(tn(s)){let n=E(e,"listings",t,s);if(await P(n))return n}}async function es(e,t){let s=E(e,"config","settings_data.json"),n=await k(s,{encoding:"utf8"}),r=(0,Qt.parseJSON)(n,null,!0);return r?(r.current=$e(t),JSON.stringify(r,null,2)):n}async function Eo(e,t){let s=E(e,"listings"),n=E(s,t);if(await P(n))return;let o=[];await P(s)&&(o=await C("*",{cwd:s,onlyDirectories:!0,deep:1}));let i=o.length>0?`Available presets: ${o.map(a=>`"${$e(a)}"`).join(", ")}`:'No presets found under "listings/"';throw new se(`Listing preset "${t}" was not found. ${i}.`,`Add the preset to config/settings_data.json and its corresponding "listings/${t}" folder, or remove the --listing flag to use the default theme settings.`)}import sn from"node:events";import{fileURLToPath as nn}from"node:url";var rn=250,ts=["assets/**/*.*","config/**/*.json","layout/**/*.liquid","locales/**/*.json","sections/**/*.{liquid,json}","blocks/**/*.liquid","snippets/**/*.liquid","templates/**/*.{liquid,json}","templates/customers/**/*.{liquid,json}"],b={layoutLiquidRegex:/^layout\/.+\.liquid$/,sectionLiquidRegex:/^sections\/.+\.liquid$/,blockLiquidRegex:/^blocks\/.+\.liquid$/,configSchemaRegex:/^config\/settings_schema\.json$/,configDataRegex:/^config\/settings_data\.json$/,sectionJsonRegex:/^sections\/.+\.json$/,templateJsonRegex:/^templates\/.+\.json$/,jsonRegex:/^(?!config\/).*\.json$/,contextualizedJsonRegex:/\.context\.[^.]+\.json$/i,staticAssetRegex:/^assets\/(?!.*\.liquid$)/};function Ho(e,t){let s=new Map,n=new Map,r=new Set,o={ignoreFromFile:[],ignore:t?.filters?.ignore??[],only:t?.filters?.only??[]},i=new sn,a=(d,g)=>{i.emit(d,g)},p=t?.notify?new le(t.notify):void 0,m=async d=>{let g=t?.listing?await an(e,d,t.listing):await ue(e,d),y=de(d,g);return s.set(d,M({key:d,checksum:y,value:typeof g=="string"?g:"",attachment:Buffer.isBuffer(g)?g.toString("base64"):""})),g},c=C(ts,{cwd:e,deep:3,ignore:W}).then(d=>Promise.all([wt(e),...d.map(m)])).then(([d])=>{Array.isArray(d)&&o.ignoreFromFile.push(...d)}),l=d=>V(e,d),u=d=>Le([{key:d}],o).length===0;function h(d,g,y,x){if(process.env.SHOPIFY_CLI_LOCAL_HOT_RELOAD&&x===we()){ee(g,x);return}let R=l(x);if(t?.listing&&R.startsWith(`listings/${t.listing}/`)){let S=R.replace(`listings/${t.listing}/`,"");if(S.startsWith("templates/")||S.startsWith("sections/"))R=S;else return}T(R).then(()=>{switch(d){case"add":case"change":return v(d,g,y,R);case"unlink":return Pe(g,y,R,n)}}).catch(S=>{D(`Error handling file event for ${R}: ${S}`)})}function T(d){return p?.notify(d)??Promise.resolve()}let v=(d,g,y,x)=>{if(u(x))return;let R=s.get(x)?.checksum,S=m(x).then(async()=>{let w=s.get(x);if(w)return w.checksum!==R&&r.add(x),{value:w.value||void 0,attachment:w.attachment}}),I=S.then(w=>{if(w)return on(r,n,x,g,y)(w)}).catch(_e(x,"upload"));a(d,{fileKey:x,onContent:w=>{S.then(Y=>{r.has(x)&&w(Y?.value??Y?.attachment??"")}).catch(()=>{})},onSync:(w,Y)=>{I.then(G=>{G?w():Y?.()}).catch(()=>{})}})},Pe=(d,g,y,x)=>{if(u(y))return;x.delete(y),s.delete(y),r.add(y);let R=t?.noDelete?Promise.resolve():gt(Number(d),[y],g).then(async S=>{if(!S[0]?.success)throw new Error(`Failed to delete file "${y}" from remote theme.`);return r.delete(y),ss("delete",y),!0}).catch(S=>(_e(y,"delete")(S),!1));a("unlink",{fileKey:y,onSync:S=>{R.then(I=>{I&&S()}).catch(()=>{})}})},ve=new Set(ts.map(d=>E(e,d.split("/").shift()??"")));return t?.listing&&ve.add(E(e,"listings",t.listing)),process.env.SHOPIFY_CLI_LOCAL_HOT_RELOAD&&ve.add(we()),{root:e,files:s,unsyncedFileKeys:r,uploadErrors:n,ready:()=>c,delete:async d=>{s.delete(d),await cn(e,d)},write:async d=>{let g=(d.key.startsWith("templates/")||d.key.startsWith("sections/"))&&d.key.endsWith(".json");if(t?.listing&&g){let y=E("listings",t.listing,d.key),x=E(e,y),R=await P(x);s.set(d.key,M({key:d.key,checksum:d.checksum,value:d.value??"",attachment:d.attachment??""})),R?await Je(e,{...d,key:y}):await Je(e,d);return}s.set(d.key,M({key:d.key,checksum:d.checksum,value:d.value??"",attachment:d.attachment??""})),await Je(e,d)},read:m,applyIgnoreFilters:d=>Le(d,o),addEventListener:(d,g)=>{i.on(d,g)},startWatcher:async(d,g)=>{let{default:y}=await import("./chokidar-5RWEYTNQ.js"),x=y.watch([...ve],{ignored:W,persistent:!process.env.SHOPIFY_UNIT_TEST,ignoreInitial:!0}),R=new Map,S=(I,w)=>{let G=`${l(w)}:${I}`,Ye=R.get(G);Ye&&clearTimeout(Ye);let ns=setTimeout(()=>{R.delete(G),h(I,d,g,w)},rn);R.set(G,ns)};x.on("add",S.bind(null,"add")).on("change",S.bind(null,"change")).on("unlink",S.bind(null,"unlink")).on("error",I=>{D(`File watcher error: ${I}`),L("theme-service:file-watcher:error")})}}}function on(e,t,s,n,r){return async o=>{if(!e.has(s))return!1;let[i]=await yt(Number(n),[{key:s,...o}],r);if(!i?.success){let a=i?.errors?.asset??["Response was not successful."];throw t.set(s,a),ee(n,s),new Error(a.join(`
|
|
100
|
-
`))}return t.delete(s)&&ee(n,s),e.delete(s),ss("update",s),!0}}async function Je(e,{key:t,attachment:s,value:n}){let r=E(e,t);if(await ln(r),s){let o=Buffer.from(s,"base64");await be(r,o,{encoding:"base64"})}else await be(r,n??"")}async function ue(e,t){let s=Fe(t)?{encoding:"utf8"}:{},n=E(e,t);if(!await P(n)){F(`File ${n} can't be read because it doesn't exist...`);return}return k(n,s)}async function an(e,t,s){if(t==="config/settings_data.json")return es(e,s);let n=await Kt(e,s,t);if(n){let r=Fe(t)?{encoding:"utf8"}:{};return k(n,r)}return ue(e,t)}async function cn(e,t){let s=E(e,t);if(!await P(s)){F(`File ${s} can't be removed because it doesn't exist...`);return}await Qe(s)}function Do(e){let t=[],s=[],n=[],r=[],o=[],i=[],a=[],p=[],m=[],c=[],l=[];return e.forEach(u=>{let
|
|
99
|
+
`);return s.set(e.key,{checksum:e.checksum,content:i}),i}}h();import*as Mt from"node:os";function Us(e,t){let s=new Set,n=`:${t}`,r=e.toLowerCase().trim();if(s.add(`${r}${n}`),["localhost","127.0.0.1","::1","0.0.0.0"].includes(r)&&(s.add(`localhost${n}`),s.add(`127.0.0.1${n}`),s.add(`[::1]${n}`)),r==="0.0.0.0"||r==="::")for(let i of Object.values(Mt.networkInterfaces()))for(let a of i??[]){let p=a.address.toLowerCase().split("%")[0],c=a.family==="IPv6"?`[${p}]`:p;s.add(`${c}${n}`)}return s}function Bs(e){if(e)return e.toLowerCase().replace(/\.(?=:\d|$)/,"")}function Ut(e,t){let s=Us(e,t);return $(n=>{let r=n.node.req.headers.host,o=Bs(r);if(!o||!s.has(o))return N(n,O({statusCode:400,statusMessage:"Bad Request",message:"Invalid Host header"}))})}h();function Bt(){return Jt()}function Cr(){return Jt()}function Jt(){return{root:"",files:new Map,unsyncedFileKeys:new Set,uploadErrors:new Map,ready:()=>Promise.resolve(),delete:async e=>{},read:async e=>"",write:async e=>{},stat:async e=>({mtime:new Date,size:1}),addEventListener:()=>{},startWatcher:async()=>{}}}import{createServer as Js}from"node:http";async function Gr(e,t){let s=await Ys(e,t);return await Gs(e,s),zs(e,s)}function zs(e,t){let s=ut();s.use(Ut(t.options.host,t.options.port)),s.use(zt(e,t)),s.use(Nt(e,t)),s.use(Ct(e,t)),s.use(Ot(e,t));let n=Js(pt(s));return{dispatch:s.handler.bind(s),start:async()=>new Promise(r=>n.listen({port:t.options.port,host:t.options.host},()=>r({close:async()=>{await Promise.all([new Promise(o=>{n.closeAllConnections(),n.close(o)})])}})))}}async function Ys(e,t){let{adminSession:s,storefrontPassword:n,themeExtensionPort:r,themeExtensionDirectory:o,crawlerSignatureHeaders:i}=t,a="127.0.0.1",p=r??9293,m=Bt(),c=vt(o);return await c.ready(),{session:await Tt(e.id.toString(),s,void 0,n,i),localThemeFileSystem:m,localThemeExtensionFileSystem:c,directory:o,type:"theme-extension",lastRequestedPath:"",options:{themeEditorSync:!1,noDelete:!1,ignore:[],only:[],host:a,port:p,liveReload:"hot-reload",standardEventsDevBundle:!1,standardEventsInspector:!1,open:!1,errorOverlay:"default"}}}async function Gs(e,t){let s=t.localThemeExtensionFileSystem,n=({fileKey:r,onContent:o,onSync:i})=>{o(()=>{Te(e,t,i,{type:"update",key:r,payload:{isThemeExtension:!0}})})};return s.addEventListener("add",n),s.addEventListener("change",n),s.ready().then(async()=>s.startWatcher())}function fe(e){let t={},s=e.localThemeExtensionFileSystem;for(let n of s.unsyncedFileKeys){let r=s.files.get(n),o=r?.value??r?.attachment;o&&(t[n]=o)}return t}var Re=Ge(mt(),1);import Vs from"node:events";var Ue=new Map,K=new Map;function Yt(e,t){let s=(0,Re.parseJSON)(t,null,!0);if(!s)return;let n=s?.sections;n&&!e.startsWith("locales/")?K.set(e,Object.entries(n||{}).map(([r,{type:o}])=>[o,r])):K.delete(e)}function Be(e){return!e.startsWith("assets/")&&[".liquid",".json"].includes(q(e))}function Ne(e,t,s){let n={},r=/^templates\/.+\.json$/,o=t?`${E("templates",t.replace(/^\//,"").replace(/\.html$/,"")||"index")}.json`:"",i=!!t&&e.localThemeFileSystem.files.has(o),a=/^locales\/.+\.json$/,p=!!s&&(e.localThemeFileSystem.files.has(`locales/${s}.json`)||e.localThemeFileSystem.files.has(`locales/${s}.default.json`));for(let m of e.localThemeFileSystem.unsyncedFileKeys)if(Be(m)){if(i&&r.test(m)){if(m!==o)continue}else if(a.test(m)){if(p){if(!m.startsWith(`locales/${s}.`))continue}else if(!m.includes(".default."))continue}n[m]=e.localThemeFileSystem.files.get(m)?.value??""}return n}function uo(e,t){let s=({fileKey:r,onContent:o,onSync:i})=>{let a=q(r);o(p=>{!en(r)&&Be(r)&&a===".json"&&Yt(r,p),Te(e,t,i,{type:"update",key:r,payload:Qs(r,t)})})},n=({fileKey:r,onSync:o})=>{K.delete(r),Te(e,t,o,{type:"delete",key:r})};return t.localThemeFileSystem.addEventListener("add",s),t.localThemeFileSystem.addEventListener("change",s),t.localThemeFileSystem.addEventListener("unlink",n),t.localThemeFileSystem.ready().then(async()=>{let r=[...t.localThemeFileSystem.files];return Promise.allSettled(r.map(async([o,i])=>{if(o.endsWith(".json")){let a=i.value??await t.localThemeFileSystem.read(o);a&&typeof a=="string"&&Yt(o,a)}else o.endsWith(".liquid")&&Zt(i)}))})}var Xs="1",Vt=new Vs;function Se(e){Vt.emit("hot-reload",{...e,version:Xs})}function zt(e,t){return $(s=>{let n=s.headers.get("accept")==="text/event-stream",r=ye(s).searchParams;if(n){let o=dt(s);return Vt.on("hot-reload",i=>{o.push(JSON.stringify(i)).catch(a=>{I({headline:"Failed to send HotReload event.",body:a.stack})})}),Se({type:"open",pid:String(process.pid),themeId:String(e.id)}),o.send().then(()=>o.flush())}if(r.has("hr-log")){let o=(0,Re.parseJSON)(r.get("hr-log")??"",null);return o&&(o.headline=`[HotReload] ${o.headline}`,o.type==="error"?te(o):o.type==="warn"?I(o):o.type==="info"?et(o):I({headline:`Unknown HotReload log type: ${o.type}`})),null}if(s.path===Xt)return k(we()).then(o=>at(s,o,"application/javascript")).catch(o=>N(s,O({cause:o})));if(r.has("section_id")||r.has("app_block_id")){let o=r.get("section_key")??"",i=r.get("section_id")??"",a=r.get("app_block_id")??"",p=s.path.split("?")[0]??"",m=new URLSearchParams(r);if(m.delete("section_key"),m.delete("section_id"),m.delete("app_block_id"),m.delete("_fd"),m.delete("pb"),i===""&&a==="")return;let c={};if(i){let l=t.localThemeFileSystem.unsyncedFileKeys;if(l.has(o)){let u=t.localThemeFileSystem.files.get(o)?.value;if(!u)return"";c[o]=u}for(let u of l)if(u.endsWith(".json")){for(let[f,T]of K.get(u)??[])if(i.endsWith(`__${T}`)){let v=t.localThemeFileSystem.files.get(u)?.value;v&&(c[u]=v);continue}}}return ce(t.session,{method:s.method,path:p??"/",query:[...m.entries()],themeId:String(e.id),sectionId:i,appBlockId:a,replaceTemplates:c,headers:lt(s),replaceExtensionTemplates:fe(t)}).then(async l=>{if(!l.ok)throw H("theme-service:hot-reload:section:render-failed"),ae(l);return Q(t,l)}).catch(async l=>{let{status:u,statusText:f,...T}=A(L(l),"Failed to render section on Hot Reload");return H("theme-service:hot-reload:section:render-error"),a||I(T),new Response(null,{status:u,statusText:f})})}})}var ee=(e,t)=>Se({themeId:String(e),type:"full",key:t});function Te(e,t,s,n){let r=()=>ee(e.id,n.key);if(t.options.liveReload==="off")return;if(t.options.liveReload==="full-page"){s(r);return}let o=String(e.id);Se({sync:"local",themeId:o,...n}),s(()=>Se({sync:"remote",themeId:o,...n}),r)}function Zs(e,t){let s=new Set;if(e.endsWith(".json")){let n=t.localThemeFileSystem.files.get(e)?.value;if(n){let r=(0,Re.parseJSON)(n,null,!0)?.sections;for(let o of Object.keys(r??{}))s.add(o)}}else{let n=e.match(/^sections\/(.+)\.liquid$/)?.[1];if(n)for(let[r,o]of K)for(let[i,a]of o)i===n&&s.add(a)}return[...s]}function Qs(e,t){let[s]=e.split("/"),n=t.localThemeFileSystem.files.get(e);return{sectionNames:s==="sections"?Zs(e,t):[],replaceTemplates:Be(e)?Ne(t):{},updatedFileParts:n&&Zt(n)}}var xe="hot-reload-client",Ks="/cdn/shopifycloud/theme-hot-reload/theme-hot-reload.js",Gt=new RegExp(`<script id="${xe}"[^>]*>[^<]*</script>`),Xt="/@shopify/theme-hot-reload";function We(e,t){return t.options.liveReload==="off"?e.replace(Gt,""):process.env.SHOPIFY_CLI_LOCAL_HOT_RELOAD?e.replace(Gt,"").replace(/<\/head>/,`<script id="${xe}" src="${Xt}" defer></script></head>`):e.includes(`<script id="${xe}"`)?e:e.replace(/<\/head>/,`<script id="${xe}" src="${Ks}" defer></script></head>`)}function en(e){return e.startsWith("assets/")}function Zt(e){if(!(["sections/","snippets/","blocks/"].some(c=>e.key.startsWith(c))&&e.key.endsWith(".liquid")))return;let n={stylesheetTag:!1,javascriptTag:!1,schemaTag:!1,liquid:!1},r={checksum:e.checksum,liquid:"",stylesheetTag:"",javascriptTag:"",schemaTag:""},o=Ue.get(e.key);if(o?.checksum===e.checksum||(Ue.delete(e.key),!e.value))return n;let i=["stylesheet","javascript","schema"],a=c=>c?.replace(/\s+/g," ").trim(),p=e.value,m=(c,l)=>{p=p.replace(l,"");let u=a(l),f=`${c}Tag`;n[f]=!o||u!==o[f],r[f]=u};for(let c of i){let l=ge(e.value??"",c);l&&m(c,l)}return p=a(p.replace(/<!--[\s\S]*?-->/g,"").replace(/{%\s*comment\s*%}[\s\S]*?{%\s*endcomment\s*%}/g,"").replace(/{%\s*doc\s*%}[\s\S]*?{%\s*enddoc\s*%}/g,"")),r.liquid=p,n.liquid=!o||p!==o.liquid,Ue.set(e.key,r),n}h();var Qt=Ge(mt(),1);function tn(e){return(e.startsWith("templates/")||e.startsWith("sections/"))&&e.endsWith(".json")}async function Kt(e,t,s){if(tn(s)){let n=E(e,"listings",t,s);if(await P(n))return n}}async function es(e,t){let s=E(e,"config","settings_data.json"),n=await k(s,{encoding:"utf8"}),r=(0,Qt.parseJSON)(n,null,!0);return r?(r.current=$e(t),JSON.stringify(r,null,2)):n}async function Eo(e,t){let s=E(e,"listings"),n=E(s,t);if(await P(n))return;let o=[];await P(s)&&(o=await C("*",{cwd:s,onlyDirectories:!0,deep:1}));let i=o.length>0?`Available presets: ${o.map(a=>`"${$e(a)}"`).join(", ")}`:'No presets found under "listings/"';throw new se(`Listing preset "${t}" was not found. ${i}.`,`Add the preset to config/settings_data.json and its corresponding "listings/${t}" folder, or remove the --listing flag to use the default theme settings.`)}import sn from"node:events";import{fileURLToPath as nn}from"node:url";var rn=250,ts=["assets/**/*.*","config/**/*.json","layout/**/*.liquid","locales/**/*.json","sections/**/*.{liquid,json}","blocks/**/*.liquid","snippets/**/*.liquid","templates/**/*.{liquid,json}","templates/customers/**/*.{liquid,json}"],b={layoutLiquidRegex:/^layout\/.+\.liquid$/,sectionLiquidRegex:/^sections\/.+\.liquid$/,blockLiquidRegex:/^blocks\/.+\.liquid$/,configSchemaRegex:/^config\/settings_schema\.json$/,configDataRegex:/^config\/settings_data\.json$/,sectionJsonRegex:/^sections\/.+\.json$/,templateJsonRegex:/^templates\/.+\.json$/,jsonRegex:/^(?!config\/).*\.json$/,contextualizedJsonRegex:/\.context\.[^.]+\.json$/i,staticAssetRegex:/^assets\/(?!.*\.liquid$)/};function Ho(e,t){let s=new Map,n=new Map,r=new Set,o={ignoreFromFile:[],ignore:t?.filters?.ignore??[],only:t?.filters?.only??[]},i=new sn,a=(d,g)=>{i.emit(d,g)},p=t?.notify?new le(t.notify):void 0,m=async d=>{let g=t?.listing?await an(e,d,t.listing):await ue(e,d),y=de(d,g);return s.set(d,M({key:d,checksum:y,value:typeof g=="string"?g:"",attachment:Buffer.isBuffer(g)?g.toString("base64"):""})),g},c=C(ts,{cwd:e,deep:3,ignore:W}).then(d=>Promise.all([wt(e),...d.map(m)])).then(([d])=>{Array.isArray(d)&&o.ignoreFromFile.push(...d)}),l=d=>V(e,d),u=d=>Le([{key:d}],o).length===0;function f(d,g,y,x){if(process.env.SHOPIFY_CLI_LOCAL_HOT_RELOAD&&x===we()){ee(g,x);return}let R=l(x);if(t?.listing&&R.startsWith(`listings/${t.listing}/`)){let S=R.replace(`listings/${t.listing}/`,"");if(S.startsWith("templates/")||S.startsWith("sections/"))R=S;else return}T(R).then(()=>{switch(d){case"add":case"change":return v(d,g,y,R);case"unlink":return Pe(g,y,R,n)}}).catch(S=>{D(`Error handling file event for ${R}: ${S}`)})}function T(d){return p?.notify(d)??Promise.resolve()}let v=(d,g,y,x)=>{if(u(x))return;let R=s.get(x)?.checksum,S=m(x).then(async()=>{let w=s.get(x);if(w)return w.checksum!==R&&r.add(x),{value:w.value||void 0,attachment:w.attachment}}),_=S.then(w=>{if(w)return on(r,n,x,g,y)(w)}).catch(Ie(x,"upload"));a(d,{fileKey:x,onContent:w=>{S.then(Y=>{r.has(x)&&w(Y?.value??Y?.attachment??"")}).catch(()=>{})},onSync:(w,Y)=>{_.then(G=>{G?w():Y?.()}).catch(()=>{})}})},Pe=(d,g,y,x)=>{if(u(y))return;x.delete(y),s.delete(y),r.add(y);let R=t?.noDelete?Promise.resolve():gt(Number(d),[y],g).then(async S=>{if(!S[0]?.success)throw new Error(`Failed to delete file "${y}" from remote theme.`);return r.delete(y),ss("delete",y),!0}).catch(S=>(Ie(y,"delete")(S),!1));a("unlink",{fileKey:y,onSync:S=>{R.then(_=>{_&&S()}).catch(()=>{})}})},ve=new Set(ts.map(d=>E(e,d.split("/").shift()??"")));return t?.listing&&ve.add(E(e,"listings",t.listing)),process.env.SHOPIFY_CLI_LOCAL_HOT_RELOAD&&ve.add(we()),{root:e,files:s,unsyncedFileKeys:r,uploadErrors:n,ready:()=>c,delete:async d=>{s.delete(d),await cn(e,d)},write:async d=>{let g=(d.key.startsWith("templates/")||d.key.startsWith("sections/"))&&d.key.endsWith(".json");if(t?.listing&&g){let y=E("listings",t.listing,d.key),x=E(e,y),R=await P(x);s.set(d.key,M({key:d.key,checksum:d.checksum,value:d.value??"",attachment:d.attachment??""})),R?await Je(e,{...d,key:y}):await Je(e,d);return}s.set(d.key,M({key:d.key,checksum:d.checksum,value:d.value??"",attachment:d.attachment??""})),await Je(e,d)},read:m,applyIgnoreFilters:d=>Le(d,o),addEventListener:(d,g)=>{i.on(d,g)},startWatcher:async(d,g)=>{let{default:y}=await import("./chokidar-5RWEYTNQ.js"),x=y.watch([...ve],{ignored:W,persistent:!process.env.SHOPIFY_UNIT_TEST,ignoreInitial:!0}),R=new Map,S=(_,w)=>{let G=`${l(w)}:${_}`,Ye=R.get(G);Ye&&clearTimeout(Ye);let ns=setTimeout(()=>{R.delete(G),f(_,d,g,w)},rn);R.set(G,ns)};x.on("add",S.bind(null,"add")).on("change",S.bind(null,"change")).on("unlink",S.bind(null,"unlink")).on("error",_=>{D(`File watcher error: ${_}`),L("theme-service:file-watcher:error")})}}}function on(e,t,s,n,r){return async o=>{if(!e.has(s))return!1;let[i]=await yt(Number(n),[{key:s,...o}],r);if(!i?.success){let a=i?.errors?.asset??["Response was not successful."];throw t.set(s,a),ee(n,s),new Error(a.join(`
|
|
100
|
+
`))}return t.delete(s)&&ee(n,s),e.delete(s),ss("update",s),!0}}async function Je(e,{key:t,attachment:s,value:n}){let r=E(e,t);if(await ln(r),s){let o=Buffer.from(s,"base64");await be(r,o,{encoding:"base64"})}else await be(r,n??"")}async function ue(e,t){let s=Fe(t)?{encoding:"utf8"}:{},n=E(e,t);if(!await P(n)){F(`File ${n} can't be read because it doesn't exist...`);return}return k(n,s)}async function an(e,t,s){if(t==="config/settings_data.json")return es(e,s);let n=await Kt(e,s,t);if(n){let r=Fe(t)?{encoding:"utf8"}:{};return k(n,r)}return ue(e,t)}async function cn(e,t){let s=E(e,t);if(!await P(s)){F(`File ${s} can't be removed because it doesn't exist...`);return}await Qe(s)}function Do(e){let t=[],s=[],n=[],r=[],o=[],i=[],a=[],p=[],m=[],c=[],l=[];return e.forEach(u=>{let f=u.key;f.endsWith(".liquid")?b.sectionLiquidRegex.test(f)?t.push(u):b.blockLiquidRegex.test(f)?c.push(u):b.layoutLiquidRegex.test(f)?l.push(u):s.push(u):b.configSchemaRegex.test(f)?a.push(u):b.configDataRegex.test(f)?p.push(u):b.jsonRegex.test(f)?b.contextualizedJsonRegex.test(f)?i.push(u):b.sectionJsonRegex.test(f)?n.push(u):b.templateJsonRegex.test(f)?r.push(u):o.push(u):b.staticAssetRegex.test(f)&&m.push(u)}),{sectionLiquidFiles:t,otherLiquidFiles:s,sectionJsonFiles:n,templateJsonFiles:r,contextualizedJsonFiles:i,otherJsonFiles:o,configSchemaFile:a,configDataFile:p,staticAssetFiles:m,blockLiquidFiles:c,layoutFiles:l}}function Fe(e){return xt({liquid:"application/liquid",sass:"text/x-sass",scss:"text/x-scss"}),["application/javascript","application/json","application/liquid","text/css","text/x-sass","text/x-scss","image/svg+xml"].includes(U(e))}async function Oo(e){let t=new Set(await C("*",{cwd:e,deep:1,onlyDirectories:!0}));return["config","layout","templates"].every(n=>t.has(n))}async function ln(e){let t=dn(e);await P(t)||await Ze(t)}function dn(e){let t=Ve(e),s=e.lastIndexOf(t);return e.substring(0,s)}function ss(e,t){re(ne`• ${ie.format(new Date)} Synced ${j.raw("\xBB")} ${e} ${t}`)}function we(){let e=process.env.SHOPIFY_CLI_LOCAL_HOT_RELOAD;return!e||e==="true"?E(nn(import.meta.url.split("/cli/")[0]??""),"theme-hot-reload/dist/theme-hot-reload.js"):e}function de(e,t){return t?Buffer.isBuffer(t)?ze(t):hn(e)?un(t):pn(e,t):""}function un(e){let t=e;return t=t.replace(/\r\n/g,`
|
|
101
101
|
`),t=t.replace(/\/\*[\s\S]*?\*\//,""),t=mn(t),ze(t)}function pn(e,t){let s=t;return Fe(e)&&(s=s.replace(/\r\n/g,`
|
|
102
102
|
`)),ze(s)}function mn(e){let t=!1,s=!1,n="";for(let r of e)r==='"'&&!s&&(t=!t),!(!t&&(r===" "||r===`
|
|
103
|
-
`))&&(n+=r,s=r==="\\"&&!s);return n}function ze(e){let t=Buffer.isBuffer(e)?e:Buffer.from(e);return Ke(t)}function Bo(e){let t=new Set(e.filter(({key:s})=>s.startsWith("assets/")&&s.endsWith(".liquid")).map(({key:s})=>s));return e.filter(({key:s})=>s.startsWith("assets/")?!t.has(`${s}.liquid`):!0)}function
|
|
103
|
+
`))&&(n+=r,s=r==="\\"&&!s);return n}function ze(e){let t=Buffer.isBuffer(e)?e:Buffer.from(e);return Ke(t)}function Bo(e){let t=new Set(e.filter(({key:s})=>s.startsWith("assets/")&&s.endsWith(".liquid")).map(({key:s})=>s));return e.filter(({key:s})=>s.startsWith("assets/")?!t.has(`${s}.liquid`):!0)}function hn(e){return e.endsWith("/settings_data.json")}export{Bo as a,Ct as b,Ot as c,Nt as d,Ut as e,Cr as f,Gr as g,uo as h,zt as i,ee as j,Eo as k,Ho as l,Do as m,Oo as n};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import{b as N,c as S,d as A}from"./chunk-OF6CV5R4.js";import{a as T}from"./chunk-4NXLDIW5.js";import{a as g}from"./chunk-RA3WWB2S.js";import{b as P,c as y,ta as x}from"./chunk-GFWXVO72.js";import{b as d,c as b}from"./chunk-IX4IGE5H.js";import{y as f}from"./chunk-WSCSFFLH.js";import{qb as h,sb as l,wb as m}from"./chunk-HQUWYKSJ.js";import{d as p}from"./chunk-773TIA5M.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();s();function w(n,t){let o={};return n.targeting?.forEach(e=>{e.target&&(o[e.target]={...e.input_query&&{inputQueryPath:`${t}/${e.input_query}`},...e.export&&{export:e.export}})}),o}function C(n,t,o,e,r,i){return JSON.stringify({handle:t.handle,name:n.name,apiVersion:t.api_version,targeting:o,schemaPath:i,wasmPath:r,functionRunnerPath:e},null,2)}function I(n,t){return{title:`CONFIGURATION
|
|
2
|
+
`,body:{tabularData:[["Handle",n.handle??"N/A"],["Name",t??"N/A"],["API Version",n.api_version??"N/A"]],firstColumnSubdued:!0}}}function j(n){if(Object.keys(n).length===0)return null;let t=[];return Object.entries(n).forEach(([o,e])=>{t.push([l`${h.cyan(o)}`.value,""]),e.inputQueryPath&&t.push([{subdued:" Input Query Path"},{filePath:e.inputQueryPath}]),e.export&&t.push([{subdued:" Export"},e.export])}),{title:`
|
|
3
|
+
TARGETING
|
|
4
|
+
`,body:{tabularData:t}}}function O(n,t){return{title:`
|
|
5
|
+
BUILD
|
|
6
|
+
`,body:{tabularData:[["Schema Path",{filePath:t??"N/A"}],["Wasm Path",{filePath:n}]],firstColumnSubdued:!0}}}function D(n){return{title:`
|
|
7
|
+
FUNCTION RUNNER
|
|
8
|
+
`,body:{tabularData:[["Path",{filePath:n}]],firstColumnSubdued:!0}}}function v(n,t,o,e,r,i){let a=[I(t,n.name)],u=j(o);return u&&a.push(u),a.push(O(r,i),D(e)),a}function R(n,t){let{format:o,functionRunnerPath:e,schemaPath:r}=t,i=n.configuration,a=w(i,n.directory),u=p(n.directory,i.build?.path??n.outputRelativePath);return o==="json"?C(n,i,a,e,u,r):v(n,i,a,e,u,r)}var c=class n extends T{static summary="Print basic information about your function.";static descriptionWithMarkdown=`The information returned includes the following:
|
|
9
|
+
|
|
10
|
+
- The function handle
|
|
11
|
+
- The function name
|
|
12
|
+
- The function API version
|
|
13
|
+
- The targeting configuration
|
|
14
|
+
- The schema path
|
|
15
|
+
- The WASM path
|
|
16
|
+
- The function runner path`;static description=this.descriptionWithoutMarkdown();static flags={...d,...g,...N,...b};async run(){let{flags:t}=await this.parse(n),{app:o}=await x({directory:t.path,userProvidedConfigName:t.config}),e=await S(o,t.path),r=P();await y(r);let i=await A(e,t.path,t["client-id"],t.reset,t.config),a=R(e,{format:t.json?"json":"text",functionRunnerPath:r.path,schemaPath:i});return t.json?m(a):f({customSections:a}),{app:o}}};export{c as a};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{a as h}from"./chunk-4I7TUB3K.js";import{a as l}from"./chunk-ESPT6CGE.js";import{a as m}from"./chunk-RA3WWB2S.js";import{sa as c}from"./chunk-GFWXVO72.js";import{b as d}from"./chunk-IX4IGE5H.js";import{C as a}from"./chunk-PK73ZSND.js";import{z as p}from"./chunk-WSCSFFLH.js";import{h as n}from"./chunk-BI7LE6CZ.js";import{a as C}from"./chunk-CTNBSUVU.js";import{e as g,g as s}from"./chunk-VKWPEFWQ.js";s();s();async function v(t){let e=t.appContextResult.developerPlatformClient,o=t.appContextResult.remoteApp,r=await e.devSessionDelete({shopFqdn:t.store.shopDomain,appId:o.id});if(r.devSessionDelete?.userErrors.length){let u=r.devSessionDelete.userErrors.map(w=>w.message).join(`
|
|
2
|
+
`);throw new n(`Failed to stop the dev preview: ${u}`)}p({headline:"Dev preview stopped.",body:[`The dev preview has been stopped on ${t.store.shopDomain} and the app's active version has been restored.`,"You can start it again with",{command:"shopify app dev"}]})}var f=g(C(),1);var i=class t extends l{static summary="Cleans up the dev preview from the selected store.";static descriptionWithMarkdown=`Stop the dev preview that was started with \`shopify app dev\`.
|
|
3
|
+
|
|
4
|
+
It restores the app's active version to the selected development store.
|
|
5
|
+
`;static description=this.descriptionWithoutMarkdown();static flags={...d,...m,store:f.Flags.string({hidden:!1,char:"s",description:"Store URL. Must be an existing development store.",env:"SHOPIFY_FLAG_STORE",parse:async e=>a(e)})};async run(){let{flags:e}=await this.parse(t),o=await c({directory:e.path,clientId:e["client-id"],forceRelink:e.reset,userProvidedConfigName:e.config}),r=await h({appContextResult:o,storeFqdn:e.store,forceReselectStore:e.reset});return await v({appContextResult:o,store:r}),{app:o.app}}};export{i as a};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import{a as hD}from"./chunk-5HBIIYSK.js";import{b as pD,e as X,g as BD,h as M}from"./chunk-B4OMIONW.js";import{a as fD,c as g,d as dD,e as J,g as i}from"./chunk-VKWPEFWQ.js";var pu=g((It,du)=>{i();du.exports=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g});var yu=g((Qt,Tu)=>{i();var GD=pD(),qD=function(){return GD.Date.now()};Tu.exports=qD});var Su=g((ur,vu)=>{i();var HD=/\s/;function VD(u){for(var D=u.length;D--&&HD.test(u.charAt(D)););return D}vu.exports=VD});var Nu=g((er,$u)=>{i();var UD=Su(),KD=/^\s+/;function zD(u){return u&&u.slice(0,UD(u)+1).replace(KD,"")}$u.exports=zD});var _u=g((rr,Lu)=>{i();var YD=Nu(),Ru=X(),JD=BD(),Wu=NaN,XD=/^[-+]0x[0-9a-f]+$/i,QD=/^0b[01]+$/i,ZD=/^0o[0-7]+$/i,ue=parseInt;function De(u){if(typeof u=="number")return u;if(JD(u))return Wu;if(Ru(u)){var D=typeof u.valueOf=="function"?u.valueOf():u;u=Ru(D)?D+"":D}if(typeof u!="string")return u===0?u:+u;u=YD(u);var e=QD.test(u);return e||ZD.test(u)?ue(u.slice(2),e?2:8):XD.test(u)?Wu:+u}Lu.exports=De});var ku=g((nr,Iu)=>{i();var ee=X(),eu=yu(),Ou=_u(),te="Expected a function",re=Math.max,Fe=Math.min;function ne(u,D,e){var t,r,F,o,n,s,C=0,b=!1,c=!1,p=!0;if(typeof u!="function")throw new TypeError(te);D=Ou(D)||0,ee(e)&&(b=!!e.leading,c="maxWait"in e,F=c?re(Ou(e.maxWait)||0,D):F,p="trailing"in e?!!e.trailing:p);function l(d){var x=t,R=r;return t=r=void 0,C=d,o=u.apply(R,x),o}function B(d){return C=d,n=setTimeout(h,D),b?l(d):o}function f(d){var x=d-s,R=d-C,Eu=D-x;return c?Fe(Eu,F-R):Eu}function m(d){var x=d-s,R=d-C;return s===void 0||x>=D||x<0||c&&R>=F}function h(){var d=eu();if(m(d))return k(d);n=setTimeout(h,f(d))}function k(d){return n=void 0,p&&t?l(d):(t=r=void 0,o)}function Cu(){n!==void 0&&clearTimeout(n),C=0,t=s=r=n=void 0}function lD(){return n===void 0?o:k(eu())}function Y(){var d=eu(),x=m(d);if(t=arguments,r=this,s=d,x){if(n===void 0)return B(s);if(c)return clearTimeout(n),n=setTimeout(h,D),l(s)}return n===void 0&&(n=setTimeout(h,D)),o}return Y.cancel=Cu,Y.flush=lD,Y}Iu.exports=ne});var Ce=g((ir,Mu)=>{i();var oe=ku(),ie=X(),se="Expected a function";function ae(u,D,e){var t=!0,r=!0;if(typeof u!="function")throw new TypeError(se);return ie(e)&&(t="leading"in e?!!e.leading:t,r="trailing"in e?!!e.trailing:r),oe(u,D,{leading:t,maxWait:D,trailing:r})}Mu.exports=ae});var Qu=g((Mr,Fu)=>{"use strict";i();var Xu=(u,D)=>{for(let e of Reflect.ownKeys(D))Object.defineProperty(u,e,Object.getOwnPropertyDescriptor(D,e));return u};Fu.exports=Xu;Fu.exports.default=Xu});var uD=g((Pr,K)=>{"use strict";i();var ze=Qu(),U=new WeakMap,Zu=(u,D={})=>{if(typeof u!="function")throw new TypeError("Expected a function");let e,t=0,r=u.displayName||u.name||"<anonymous>",F=function(...o){if(U.set(F,++t),t===1)e=u.apply(this,o),u=null;else if(D.throw===!0)throw new Error(`Function \`${r}\` can only be called once`);return e};return ze(F,u),U.set(F,t),F};K.exports=Zu;K.exports.default=Zu;K.exports.callCount=u=>{if(!U.has(u))throw new Error(`The given function \`${u.name}\` is not wrapped by the \`onetime\` package`);return U.get(u)}});var nD=g((nF,it)=>{it.exports={single:{topLeft:"\u250C",top:"\u2500",topRight:"\u2510",right:"\u2502",bottomRight:"\u2518",bottom:"\u2500",bottomLeft:"\u2514",left:"\u2502"},double:{topLeft:"\u2554",top:"\u2550",topRight:"\u2557",right:"\u2551",bottomRight:"\u255D",bottom:"\u2550",bottomLeft:"\u255A",left:"\u2551"},round:{topLeft:"\u256D",top:"\u2500",topRight:"\u256E",right:"\u2502",bottomRight:"\u256F",bottom:"\u2500",bottomLeft:"\u2570",left:"\u2502"},bold:{topLeft:"\u250F",top:"\u2501",topRight:"\u2513",right:"\u2503",bottomRight:"\u251B",bottom:"\u2501",bottomLeft:"\u2517",left:"\u2503"},singleDouble:{topLeft:"\u2553",top:"\u2500",topRight:"\u2556",right:"\u2551",bottomRight:"\u255C",bottom:"\u2500",bottomLeft:"\u2559",left:"\u2551"},doubleSingle:{topLeft:"\u2552",top:"\u2550",topRight:"\u2555",right:"\u2502",bottomRight:"\u255B",bottom:"\u2550",bottomLeft:"\u2558",left:"\u2502"},classic:{topLeft:"+",top:"-",topRight:"+",right:"|",bottomRight:"+",bottom:"-",bottomLeft:"+",left:"|"},arrow:{topLeft:"\u2198",top:"\u2193",topRight:"\u2199",right:"\u2190",bottomRight:"\u2196",bottom:"\u2191",bottomLeft:"\u2197",left:"\u2192"}}});var st=g((oF,su)=>{"use strict";i();var oD=nD();su.exports=oD;su.exports.default=oD});var sD=g((sF,iD)=>{"use strict";i();var at=/[|\\{}()[\]^$+*?.-]/g;iD.exports=u=>{if(typeof u!="string")throw new TypeError("Expected a string");return u.replace(at,"\\$&")}});var dt=g((CF,ED)=>{"use strict";i();var Ct=sD(),Et=typeof process=="object"&&process&&typeof process.cwd=="function"?process.cwd():".",CD=[].concat(fD("module").builtinModules,"bootstrap_node","node").map(u=>new RegExp(`(?:\\((?:node:)?${u}(?:\\.js)?:\\d+:\\d+\\)$|^\\s*at (?:node:)?${u}(?:\\.js)?:\\d+:\\d+$)`));CD.push(/\((?:node:)?internal\/[^:]+:\d+:\d+\)$/,/\s*at (?:node:)?internal\/[^:]+:\d+:\d+$/,/\/\.node-spawn-wrap-\w+-\w+\/node:\d+:\d+\)?$/);var au=class u{constructor(D){D={ignoredPackages:[],...D},"internals"in D||(D.internals=u.nodeInternals()),"cwd"in D||(D.cwd=Et),this._cwd=D.cwd.replace(/\\/g,"/"),this._internals=[].concat(D.internals,ct(D.ignoredPackages)),this._wrapCallSite=D.wrapCallSite||!1}static nodeInternals(){return[...CD]}clean(D,e=0){e=" ".repeat(e),Array.isArray(D)||(D=D.split(`
|
|
2
|
+
`)),!/^\s*at /.test(D[0])&&/^\s*at /.test(D[1])&&(D=D.slice(1));let t=!1,r=null,F=[];return D.forEach(o=>{if(o=o.replace(/\\/g,"/"),this._internals.some(s=>s.test(o)))return;let n=/^\s*at /.test(o);t?o=o.trimEnd().replace(/^(\s+)at /,"$1"):(o=o.trim(),n&&(o=o.slice(3))),o=o.replace(`${this._cwd}/`,""),o&&(n?(r&&(F.push(r),r=null),F.push(o)):(t=!0,r=o))}),F.map(o=>`${e}${o}
|
|
3
|
+
`).join("")}captureString(D,e=this.captureString){typeof D=="function"&&(e=D,D=1/0);let{stackTraceLimit:t}=Error;D&&(Error.stackTraceLimit=D);let r={};Error.captureStackTrace(r,e);let{stack:F}=r;return Error.stackTraceLimit=t,this.clean(F)}capture(D,e=this.capture){typeof D=="function"&&(e=D,D=1/0);let{prepareStackTrace:t,stackTraceLimit:r}=Error;Error.prepareStackTrace=(n,s)=>this._wrapCallSite?s.map(this._wrapCallSite):s,D&&(Error.stackTraceLimit=D);let F={};Error.captureStackTrace(F,e);let{stack:o}=F;return Object.assign(Error,{prepareStackTrace:t,stackTraceLimit:r}),o}at(D=this.at){let[e]=this.capture(1,D);if(!e)return{};let t={line:e.getLineNumber(),column:e.getColumnNumber()};aD(t,e.getFileName(),this._cwd),e.isConstructor()&&Object.defineProperty(t,"constructor",{value:!0,configurable:!0}),e.isEval()&&(t.evalOrigin=e.getEvalOrigin()),e.isNative()&&(t.native=!0);let r;try{r=e.getTypeName()}catch{}r&&r!=="Object"&&r!=="[object Object]"&&(t.type=r);let F=e.getFunctionName();F&&(t.function=F);let o=e.getMethodName();return o&&F!==o&&(t.method=o),t}parseLine(D){let e=D&&D.match(lt);if(!e)return null;let t=e[1]==="new",r=e[2],F=e[3],o=e[4],n=Number(e[5]),s=Number(e[6]),C=e[7],b=e[8],c=e[9],p=e[10]==="native",l=e[11]===")",B,f={};if(b&&(f.line=Number(b)),c&&(f.column=Number(c)),l&&C){let m=0;for(let h=C.length-1;h>0;h--)if(C.charAt(h)===")")m++;else if(C.charAt(h)==="("&&C.charAt(h-1)===" "&&(m--,m===-1&&C.charAt(h-1)===" ")){let k=C.slice(0,h-1);C=C.slice(h+1),r+=` (${k}`;break}}if(r){let m=r.match(ft);m&&(r=m[1],B=m[2])}return aD(f,C,this._cwd),t&&Object.defineProperty(f,"constructor",{value:!0,configurable:!0}),F&&(f.evalOrigin=F,f.evalLine=n,f.evalColumn=s,f.evalFile=o&&o.replace(/\\/g,"/")),p&&(f.native=!0),r&&(f.function=r),B&&r!==B&&(f.method=B),f}};function aD(u,D,e){D&&(D=D.replace(/\\/g,"/"),D.startsWith(`${e}/`)&&(D=D.slice(e.length+1)),u.file=D)}function ct(u){if(u.length===0)return[];let D=u.map(e=>Ct(e));return new RegExp(`[/\\\\]node_modules[/\\\\](?:${D.join("|")})[/\\\\][^:]+:\\d+:\\d+`)}var lt=new RegExp("^(?:\\s*at )?(?:(new) )?(?:(.*?) \\()?(?:eval at ([^ ]+) \\((.+?):(\\d+):(\\d+)\\), )?(?:(.+?):(\\d+):(\\d+)|(native))(\\)?)$"),ft=/^(.*?) \[as (.*?)\]$/;ED.exports=au});i();i();i();i();var j=[161,161,164,164,167,168,170,170,173,174,176,180,182,186,188,191,198,198,208,208,215,216,222,225,230,230,232,234,236,237,240,240,242,243,247,250,252,252,254,254,257,257,273,273,275,275,283,283,294,295,299,299,305,307,312,312,319,322,324,324,328,331,333,333,338,339,358,359,363,363,462,462,464,464,466,466,468,468,470,470,472,472,474,474,476,476,593,593,609,609,708,708,711,711,713,715,717,717,720,720,728,731,733,733,735,735,768,879,913,929,931,937,945,961,963,969,1025,1025,1040,1103,1105,1105,8208,8208,8211,8214,8216,8217,8220,8221,8224,8226,8228,8231,8240,8240,8242,8243,8245,8245,8251,8251,8254,8254,8308,8308,8319,8319,8321,8324,8364,8364,8451,8451,8453,8453,8457,8457,8467,8467,8470,8470,8481,8482,8486,8486,8491,8491,8531,8532,8539,8542,8544,8555,8560,8569,8585,8585,8592,8601,8632,8633,8658,8658,8660,8660,8679,8679,8704,8704,8706,8707,8711,8712,8715,8715,8719,8719,8721,8721,8725,8725,8730,8730,8733,8736,8739,8739,8741,8741,8743,8748,8750,8750,8756,8759,8764,8765,8776,8776,8780,8780,8786,8786,8800,8801,8804,8807,8810,8811,8814,8815,8834,8835,8838,8839,8853,8853,8857,8857,8869,8869,8895,8895,8978,8978,9312,9449,9451,9547,9552,9587,9600,9615,9618,9621,9632,9633,9635,9641,9650,9651,9654,9655,9660,9661,9664,9665,9670,9672,9675,9675,9678,9681,9698,9701,9711,9711,9733,9734,9737,9737,9742,9743,9756,9756,9758,9758,9792,9792,9794,9794,9824,9825,9827,9829,9831,9834,9836,9837,9839,9839,9886,9887,9919,9919,9926,9933,9935,9939,9941,9953,9955,9955,9960,9961,9963,9969,9972,9972,9974,9977,9979,9980,9982,9983,10045,10045,10102,10111,11094,11097,12872,12879,57344,63743,65024,65039,65533,65533,127232,127242,127248,127277,127280,127337,127344,127373,127375,127376,127387,127404,917760,917999,983040,1048573,1048576,1114109],P=[12288,12288,65281,65376,65504,65510],Q=[8361,8361,65377,65470,65474,65479,65482,65487,65490,65495,65498,65500,65512,65518],Z=[32,126,162,163,165,166,172,172,175,175,10214,10221,10629,10630],W=[4352,4447,8986,8987,9001,9002,9193,9196,9200,9200,9203,9203,9725,9726,9748,9749,9776,9783,9800,9811,9855,9855,9866,9871,9875,9875,9889,9889,9898,9899,9917,9918,9924,9925,9934,9934,9940,9940,9962,9962,9970,9971,9973,9973,9978,9978,9981,9981,9989,9989,9994,9995,10024,10024,10060,10060,10062,10062,10067,10069,10071,10071,10133,10135,10160,10160,10175,10175,11035,11036,11088,11088,11093,11093,11904,11929,11931,12019,12032,12245,12272,12287,12289,12350,12353,12438,12441,12543,12549,12591,12593,12686,12688,12773,12783,12830,12832,12871,12880,42124,42128,42182,43360,43388,44032,55203,63744,64255,65040,65049,65072,65106,65108,65126,65128,65131,94176,94180,94192,94198,94208,101589,101631,101662,101760,101874,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,119552,119638,119648,119670,126980,126980,127183,127183,127374,127374,127377,127386,127488,127490,127504,127547,127552,127560,127568,127569,127584,127589,127744,127776,127789,127797,127799,127868,127870,127891,127904,127946,127951,127955,127968,127984,127988,127988,127992,128062,128064,128064,128066,128252,128255,128317,128331,128334,128336,128359,128378,128378,128405,128406,128420,128420,128507,128591,128640,128709,128716,128716,128720,128722,128725,128728,128732,128735,128747,128748,128756,128764,128992,129003,129008,129008,129292,129338,129340,129349,129351,129535,129648,129660,129664,129674,129678,129734,129736,129736,129741,129756,129759,129770,129775,129784,131072,196605,196608,262141];i();var G=(u,D)=>{let e=0,t=Math.floor(u.length/2)-1;for(;e<=t;){let r=Math.floor((e+t)/2),F=r*2;if(D<u[F])t=r-1;else if(D>u[F+1])e=r+1;else return!0}return!1};var gD=j[0],mD=j.at(-1),AD=P[0],bD=P.at(-1),Tt=Q[0],yt=Q.at(-1),vt=Z[0],St=Z.at(-1),xD=W[0],wD=W.at(-1),cu=19968,[TD,yD]=vD(W);function vD(u){let D=u[0],e=u[1];for(let t=0;t<u.length;t+=2){let r=u[t],F=u[t+1];if(cu>=r&&cu<=F)return[r,F];F-r>e-D&&(D=r,e=F)}return[D,e]}var lu=u=>u<gD||u>mD?!1:G(j,u),L=u=>u<AD||u>bD?!1:G(P,u);var _=u=>u>=TD&&u<=yD?!0:u<xD||u>wD?!1:G(W,u);function SD(u){if(!Number.isSafeInteger(u))throw new TypeError(`Expected a code point, got \`${typeof u}\`.`)}function fu(u,{ambiguousAsWide:D=!1}={}){return SD(u),L(u)||_(u)||D&&lu(u)?2:1}var Bu=J(pu(),1),$D=new Intl.Segmenter,ND=/^\p{Default_Ignorable_Code_Point}$/u;function w(u,D={}){if(typeof u!="string"||u.length===0)return 0;let{ambiguousIsNarrow:e=!0,countAnsiEscapeCodes:t=!1}=D;if(t||(u=M(u)),u.length===0)return 0;let r=0,F={ambiguousAsWide:!e};for(let{segment:o}of $D.segment(u)){let n=o.codePointAt(0);if(!(n<=31||n>=127&&n<=159)&&!(n>=8203&&n<=8207||n===65279)&&!(n>=768&&n<=879||n>=6832&&n<=6911||n>=7616&&n<=7679||n>=8400&&n<=8447||n>=65056&&n<=65071)&&!(n>=55296&&n<=57343)&&!(n>=65024&&n<=65039)&&!ND.test(o)){if((0,Bu.default)().test(o)){r+=2;continue}r+=fu(n,F)}}return r}i();i();var hu=(u=0)=>D=>`\x1B[${D+u}m`,gu=(u=0)=>D=>`\x1B[${38+u};5;${D}m`,mu=(u=0)=>(D,e,t)=>`\x1B[${38+u};2;${D};${e};${t}m`,E={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},qt=Object.keys(E.modifier),RD=Object.keys(E.color),WD=Object.keys(E.bgColor),Ht=[...RD,...WD];function LD(){let u=new Map;for(let[D,e]of Object.entries(E)){for(let[t,r]of Object.entries(e))E[t]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},e[t]=E[t],u.set(r[0],r[1]);Object.defineProperty(E,D,{value:e,enumerable:!1})}return Object.defineProperty(E,"codes",{value:u,enumerable:!1}),E.color.close="\x1B[39m",E.bgColor.close="\x1B[49m",E.color.ansi=hu(),E.color.ansi256=gu(),E.color.ansi16m=mu(),E.bgColor.ansi=hu(10),E.bgColor.ansi256=gu(10),E.bgColor.ansi16m=mu(10),Object.defineProperties(E,{rgbToAnsi256:{value(D,e,t){return D===e&&e===t?D<8?16:D>248?231:Math.round((D-8)/247*24)+232:16+36*Math.round(D/255*5)+6*Math.round(e/255*5)+Math.round(t/255*5)},enumerable:!1},hexToRgb:{value(D){let e=/[a-f\d]{6}|[a-f\d]{3}/i.exec(D.toString(16));if(!e)return[0,0,0];let[t]=e;t.length===3&&(t=[...t].map(F=>F+F).join(""));let r=Number.parseInt(t,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:D=>E.rgbToAnsi256(...E.hexToRgb(D)),enumerable:!1},ansi256ToAnsi:{value(D){if(D<8)return 30+D;if(D<16)return 90+(D-8);let e,t,r;if(D>=232)e=((D-232)*10+8)/255,t=e,r=e;else{D-=16;let n=D%36;e=Math.floor(D/36)/5,t=Math.floor(n/6)/5,r=n%6/5}let F=Math.max(e,t,r)*2;if(F===0)return 30;let o=30+(Math.round(r)<<2|Math.round(t)<<1|Math.round(e));return F===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(D,e,t)=>E.ansi256ToAnsi(E.rgbToAnsi256(D,e,t)),enumerable:!1},hexToAnsi:{value:D=>E.ansi256ToAnsi(E.hexToAnsi256(D)),enumerable:!1}}),E}var _D=LD(),A=_D;var H=new Set(["\x1B","\x9B"]),OD=39,Du="\x07",xu="[",ID="]",wu="m",q=`${ID}8;;`,Au=u=>`${H.values().next().value}${xu}${u}${wu}`,bu=u=>`${H.values().next().value}${q}${u}${Du}`,kD=u=>u.split(" ").map(D=>w(D)),uu=(u,D,e)=>{let t=[...D],r=!1,F=!1,o=w(M(u.at(-1)));for(let[n,s]of t.entries()){let C=w(s);if(o+C<=e?u[u.length-1]+=s:(u.push(s),o=0),H.has(s)&&(r=!0,F=t.slice(n+1,n+1+q.length).join("")===q),r){F?s===Du&&(r=!1,F=!1):s===wu&&(r=!1);continue}o+=C,o===e&&n<t.length-1&&(u.push(""),o=0)}!o&&u.at(-1).length>0&&u.length>1&&(u[u.length-2]+=u.pop())},MD=u=>{let D=u.split(" "),e=D.length;for(;e>0&&!(w(D[e-1])>0);)e--;return e===D.length?u:D.slice(0,e).join(" ")+D.slice(e).join("")},jD=(u,D,e={})=>{if(e.trim!==!1&&u.trim()==="")return"";let t="",r,F,o=kD(u),n=[""];for(let[c,p]of u.split(" ").entries()){e.trim!==!1&&(n[n.length-1]=n.at(-1).trimStart());let l=w(n.at(-1));if(c!==0&&(l>=D&&(e.wordWrap===!1||e.trim===!1)&&(n.push(""),l=0),(l>0||e.trim===!1)&&(n[n.length-1]+=" ",l++)),e.hard&&o[c]>D){let B=D-l,f=1+Math.floor((o[c]-B-1)/D);Math.floor((o[c]-1)/D)<f&&n.push(""),uu(n,p,D);continue}if(l+o[c]>D&&l>0&&o[c]>0){if(e.wordWrap===!1&&l<D){uu(n,p,D);continue}n.push("")}if(l+o[c]>D&&e.wordWrap===!1){uu(n,p,D);continue}n[n.length-1]+=p}e.trim!==!1&&(n=n.map(c=>MD(c)));let s=n.join(`
|
|
4
|
+
`),C=[...s],b=0;for(let[c,p]of C.entries()){if(t+=p,H.has(p)){let{groups:B}=new RegExp(`(?:\\${xu}(?<code>\\d+)m|\\${q}(?<uri>.*)${Du})`).exec(s.slice(b))||{groups:{}};if(B.code!==void 0){let f=Number.parseFloat(B.code);r=f===OD?void 0:f}else B.uri!==void 0&&(F=B.uri.length===0?void 0:B.uri)}let l=A.codes.get(Number(r));C[c+1]===`
|
|
5
|
+
`?(F&&(t+=bu("")),r&&l&&(t+=Au(l))):p===`
|
|
6
|
+
`&&(r&&l&&(t+=Au(r)),F&&(t+=bu(F))),b+=p.length}return t};function PD(u,D,e){return String(u).normalize().replaceAll(`\r
|
|
7
|
+
`,`
|
|
8
|
+
`).split(`
|
|
9
|
+
`).map(t=>jD(t,D,e)).join(`
|
|
10
|
+
`)}var zu={};dD(zu,{ConEmu:()=>Ku,beep:()=>Pe,beginSynchronizedOutput:()=>Hu,clearScreen:()=>Le,clearTerminal:()=>Ie,clearViewport:()=>_e,cursorBackward:()=>he,cursorDown:()=>pe,cursorForward:()=>Be,cursorGetPosition:()=>Ae,cursorHide:()=>we,cursorLeft:()=>Gu,cursorMove:()=>de,cursorNextLine:()=>be,cursorPrevLine:()=>xe,cursorRestorePosition:()=>me,cursorSavePosition:()=>ge,cursorShow:()=>Te,cursorTo:()=>fe,cursorUp:()=>Pu,endSynchronizedOutput:()=>Vu,enterAlternativeScreen:()=>ke,eraseDown:()=>$e,eraseEndLine:()=>ve,eraseLine:()=>qu,eraseLines:()=>ye,eraseScreen:()=>V,eraseStartLine:()=>Se,eraseUp:()=>Ne,exitAlternativeScreen:()=>Me,iTerm:()=>Uu,image:()=>qe,link:()=>Ge,scrollDown:()=>We,scrollUp:()=>Re,setCwd:()=>He,synchronizedOutput:()=>je});i();import v from"node:process";import Ee from"node:os";i();var y=globalThis.window?.document!==void 0,ar=globalThis.process?.versions?.node!==void 0,Cr=globalThis.process?.versions?.bun!==void 0,Er=globalThis.Deno?.version?.deno!==void 0,cr=globalThis.process?.versions?.electron!==void 0,lr=globalThis.navigator?.userAgent?.includes("jsdom")===!0,fr=typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope,dr=typeof DedicatedWorkerGlobalScope<"u"&&globalThis instanceof DedicatedWorkerGlobalScope,pr=typeof SharedWorkerGlobalScope<"u"&&globalThis instanceof SharedWorkerGlobalScope,Br=typeof ServiceWorkerGlobalScope<"u"&&globalThis instanceof ServiceWorkerGlobalScope,O=globalThis.navigator?.userAgentData?.platform,hr=O==="macOS"||globalThis.navigator?.platform==="MacIntel"||globalThis.navigator?.userAgent?.includes(" Mac ")===!0||globalThis.process?.platform==="darwin",gr=O==="Windows"||globalThis.navigator?.platform==="Win32"||globalThis.process?.platform==="win32",mr=O==="Linux"||globalThis.navigator?.platform?.startsWith("Linux")===!0||globalThis.navigator?.userAgent?.includes(" Linux ")===!0||globalThis.process?.platform==="linux",Ar=O==="iOS"||globalThis.navigator?.platform==="MacIntel"&&globalThis.navigator?.maxTouchPoints>1||/iPad|iPhone|iPod/.test(globalThis.navigator?.platform),br=O==="Android"||globalThis.navigator?.platform==="Android"||globalThis.navigator?.userAgent?.includes(" Android ")===!0||globalThis.process?.platform==="android";var a="\x1B[",S="\x1B]",T="\x07",I=";",ju=!y&&v.env.TERM_PROGRAM==="Apple_Terminal",ce=!y&&v.platform==="win32",le=!y&&(v.env.TERM?.startsWith("screen")||v.env.TERM?.startsWith("tmux")||v.env.TMUX!==void 0),tu=y?()=>{throw new Error("`process.cwd()` only works in Node.js, not the browser.")}:v.cwd,$=u=>le?"\x1BPtmux;"+u.replaceAll("\x1B","\x1B\x1B")+"\x1B\\":u,fe=(u,D)=>{if(typeof u!="number")throw new TypeError("The `x` argument is required");return typeof D!="number"?a+(u+1)+"G":a+(D+1)+I+(u+1)+"H"},de=(u,D)=>{if(typeof u!="number")throw new TypeError("The `x` argument is required");let e="";return u<0?e+=a+-u+"D":u>0&&(e+=a+u+"C"),D<0?e+=a+-D+"A":D>0&&(e+=a+D+"B"),e},Pu=(u=1)=>a+u+"A",pe=(u=1)=>a+u+"B",Be=(u=1)=>a+u+"C",he=(u=1)=>a+u+"D",Gu=a+"G",ge=ju?"\x1B7":a+"s",me=ju?"\x1B8":a+"u",Ae=a+"6n",be=a+"E",xe=a+"F",we=a+"?25l",Te=a+"?25h",ye=u=>{let D="";for(let e=0;e<u;e++)D+=qu+(e<u-1?Pu():"");return u&&(D+=Gu),D},ve=a+"K",Se=a+"1K",qu=a+"2K",$e=a+"J",Ne=a+"1J",V=a+"2J",Re=a+"S",We=a+"T",Le="\x1Bc",_e=`${V}${a}H`,Oe=()=>{if(y||!ce)return!1;let u=Ee.release().split("."),D=Number(u[0]),e=Number(u[2]??0);return D<10||D===10&&e<10586},Ie=Oe()?`${V}${a}0f`:`${V}${a}3J${a}H`,ke=a+"?1049h",Me=a+"?1049l",Hu=a+"?2026h",Vu=a+"?2026l",je=u=>Hu+u+Vu,Pe=T,Ge=(u,D)=>{let e=$(`${S}8${I}${I}${D}${T}`),t=$(`${S}8${I}${I}${T}`);return e+u+t},qe=(u,D={})=>{let e=`${S}1337;File=inline=1`;D.width&&(e+=`;width=${D.width}`),D.height&&(e+=`;height=${D.height}`),D.preserveAspectRatio===!1&&(e+=";preserveAspectRatio=0");let t=Buffer.from(u);return $(e+`;size=${t.byteLength}:`+t.toString("base64")+T)},Uu={setCwd:(u=tu())=>$(`${S}50;CurrentDir=${u}${T}`),annotation(u,D={}){let e=`${S}1337;`,t=D.x!==void 0,r=D.y!==void 0;if((t||r)&&!(t&&r&&D.length!==void 0))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return u=u.replaceAll("|",""),e+=D.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",D.length>0?e+=(t?[u,D.length,D.x,D.y]:[D.length,u]).join("|"):e+=u,$(e+T)}},Ku={setCwd:(u=tu())=>$(`${S}9;9;${u}${T}`)},He=(u=tu())=>Uu.setCwd(u)+Ku.setCwd(u);i();i();var Ve=u=>{let D=new Set;do for(let e of Reflect.ownKeys(u))D.add([u,e]);while((u=Reflect.getPrototypeOf(u))&&u!==Object.prototype);return D};function Ue(u,{include:D,exclude:e}={}){let t=r=>{let F=o=>typeof o=="string"?r===o:o.test(r);return D?D.some(F):e?!e.some(F):!0};for(let[r,F]of Ve(u.constructor.prototype)){if(F==="constructor"||!t(F))continue;let o=Reflect.getOwnPropertyDescriptor(r,F);o&&typeof o.value=="function"&&(u[F]=u[F].bind(u))}return u}i();import{PassThrough as Yu}from"node:stream";var Ju=["assert","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],ru={},Ke=u=>{let D=new Yu,e=new Yu;D.write=r=>{u("stdout",r)},e.write=r=>{u("stderr",r)};let t=new console.Console(D,e);for(let r of Ju)ru[r]=console[r],console[r]=t[r];return()=>{for(let r of Ju)console[r]=ru[r];ru={}}},Or=Ke;i();import rD from"node:process";i();var DD=J(uD(),1),eD=J(hD(),1);import Ye from"node:process";var Je=(0,DD.default)(()=>{(0,eD.default)(()=>{Ye.stderr.write("\x1B[?25h")},{alwaysLast:!0})}),tD=Je;var z=!1,N={};N.show=(u=rD.stderr)=>{u.isTTY&&(z=!1,u.write("\x1B[?25h"))};N.hide=(u=rD.stderr)=>{u.isTTY&&(tD(),z=!0,u.write("\x1B[?25l"))};N.toggle=(u,D)=>{u!==void 0&&(z=u),z?N.show(D):N.hide(D)};var zr=N;i();function Xe(u,D=1,e={}){let{indent:t=" ",includeEmptyLines:r=!1}=e;if(typeof u!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof u}\``);if(typeof D!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof D}\``);if(D<0)throw new RangeError(`Expected \`count\` to be at least 0, got \`${D}\``);if(typeof t!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof t}\``);if(D===0)return u;let F=r?/^/gm:/^(?!\s*$)/gm;return u.replace(F,t.repeat(D))}i();function nu(u){return Number.isInteger(u)?L(u)||_(u):!1}i();var Qe=new Set([27,155]),Ze="0".codePointAt(0),ut="9".codePointAt(0),Dt=19,iu=new Set,ou=new Map;for(let[u,D]of A.codes)iu.add(A.color.ansi(D)),ou.set(A.color.ansi(u),A.color.ansi(D));function et(u){if(iu.has(u))return u;if(ou.has(u))return ou.get(u);u=u.slice(2),u.includes(";")&&(u=u[0]+"0");let D=A.codes.get(Number.parseInt(u,10));return D?A.color.ansi(D):A.reset.open}function tt(u){for(let D=0;D<u.length;D++){let e=u.codePointAt(D);if(e>=Ze&&e<=ut)return D}return-1}function rt(u,D){u=u.slice(D,D+Dt);let e=tt(u);if(e!==-1){let t=u.indexOf("m",e);return t===-1&&(t=u.length),u.slice(0,t+1)}}function Ft(u,D=Number.POSITIVE_INFINITY){let e=[],t=0,r=0;for(;t<u.length;){let F=u.codePointAt(t);if(Qe.has(F)){let s=rt(u,t);if(s){e.push({type:"ansi",code:s,endCode:et(s)}),t+=s.length;continue}}let o=nu(F),n=String.fromCodePoint(F);if(e.push({type:"character",value:n,isFullWidth:o}),t+=n.length,r+=o?2:n.length,r>=D)break}return e}function FD(u){let D=[];for(let e of u)e.code===A.reset.open?D=[]:iu.has(e.code)?D=D.filter(t=>t.endCode!==e.code):(D=D.filter(t=>t.endCode!==e.endCode),D.push(e));return D}function nt(u){return FD(u).map(({endCode:t})=>t).reverse().join("")}function ot(u,D,e){let t=Ft(u,e),r=[],F=0,o="",n=!1;for(let s of t){if(e!==void 0&&F>=e)break;s.type==="ansi"?(r.push(s),n&&(o+=s.code)):(!n&&F>=D&&(n=!0,r=FD(r),o=r.map(({code:C})=>C).join("")),n&&(o+=s.value),F+=s.isFullWidth?2:s.value.length)}return o+=nt(r),o}i();i();var pt=(u,D=2)=>u.replace(/^\t+/gm,e=>" ".repeat(e.length*D)),cD=pt;var Bt=(u,D)=>{let e=[],t=u-D,r=u+D;for(let F=t;F<=r;F++)e.push(F);return e},ht=(u,D,e={})=>{var t;if(typeof u!="string")throw new TypeError("Source code is missing.");if(!D||D<1)throw new TypeError("Line number must start from `1`.");let r=cD(u).split(/\r?\n/);if(!(D>r.length))return Bt(D,(t=e.around)!==null&&t!==void 0?t:3).filter(F=>r[F-1]!==void 0).map(F=>({line:F,value:r[F-1]}))},dF=ht;export{zu as a,Ue as b,Or as c,fu as d,w as e,A as f,PD as g,nu as h,ot as i,Xe as j,st as k,zr as l,dt as m,dF as n,ku as o,Ce as p};
|