shopify 4.2.0 → 4.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (440) hide show
  1. package/dist/{acorn-QBS5IYTX.js → acorn-7M27BPGP.js} +1 -1
  2. package/dist/analytics-DWUYMFHO.js +1 -0
  3. package/dist/analytics-SOXP4UBD.js +1 -0
  4. package/dist/{angular-UTTM4Y4S.js → angular-DW5TQVCM.js} +1 -1
  5. package/dist/assets/hydrogen/routes/locale-check.ts +3 -3
  6. package/dist/assets/hydrogen/starter/CHANGELOG.md +106 -0
  7. package/dist/assets/hydrogen/starter/app/components/Aside.tsx +4 -2
  8. package/dist/assets/hydrogen/starter/app/components/CartMain.tsx +8 -5
  9. package/dist/assets/hydrogen/starter/app/components/CartSummary.tsx +117 -23
  10. package/dist/assets/hydrogen/starter/app/components/Header.tsx +3 -3
  11. package/dist/assets/hydrogen/starter/app/components/PaginatedResourceSection.tsx +24 -4
  12. package/dist/assets/hydrogen/starter/app/components/ProductPrice.tsx +1 -1
  13. package/dist/assets/hydrogen/starter/app/lib/context.ts +5 -0
  14. package/dist/assets/hydrogen/starter/app/routes/[robots.txt].tsx +14 -53
  15. package/dist/assets/hydrogen/starter/app/routes/_index.tsx +11 -4
  16. package/dist/assets/hydrogen/starter/app/routes/account.$.tsx +1 -1
  17. package/dist/assets/hydrogen/starter/app/routes/account.addresses.tsx +2 -2
  18. package/dist/assets/hydrogen/starter/app/routes/account.profile.tsx +1 -1
  19. package/dist/assets/hydrogen/starter/package.json +9 -10
  20. package/dist/assets/hydrogen/starter/storefrontapi.generated.d.ts +0 -11
  21. package/dist/assets/hydrogen/starter/vite.config.ts +10 -4
  22. package/dist/assets/hydrogen/vite/package.json +1 -2
  23. package/dist/assets/hydrogen/vite/vite.config.js +4 -3
  24. package/dist/{babel-JS32NLHY.js → babel-I2RLWM7N.js} +1 -1
  25. package/dist/bootstrap.js +1 -1
  26. package/dist/{chokidar-G4ONJSK4.js → chokidar-VDIVGBZH.js} +1 -1
  27. package/dist/chunk-2EROVVCL.js +1 -0
  28. package/dist/{chunk-DCBYHVKW.js → chunk-2MMGFZDP.js} +1 -1
  29. package/dist/{chunk-X2TC7S57.js → chunk-2NWWMNU5.js} +8 -8
  30. package/dist/{chunk-PRVQAHWI.js → chunk-2O22LZKV.js} +1 -1
  31. package/dist/{chunk-MFLBTJO7.js → chunk-3CYHS4W2.js} +1 -1
  32. package/dist/{chunk-2EJCY4CE.js → chunk-3FBSBMSQ.js} +1 -1
  33. package/dist/chunk-3OZ6ZZ4T.js +5 -0
  34. package/dist/{chunk-VICNWPLQ.js → chunk-442S5SDM.js} +12 -12
  35. package/dist/{chunk-MKE434RB.js → chunk-45MEVWH5.js} +1 -1
  36. package/dist/{chunk-A5SQCM63.js → chunk-47MGPVED.js} +1 -1
  37. package/dist/chunk-4N6YTHFD.js +1 -0
  38. package/dist/chunk-4TST2MNC.js +1 -0
  39. package/dist/{chunk-JUVAGMIH.js → chunk-5C7HDTHJ.js} +1 -1
  40. package/dist/{chunk-GVITHCQJ.js → chunk-5GVXMNC4.js} +1 -1
  41. package/dist/{chunk-YGMVL6NZ.js → chunk-5JNEWYD5.js} +2 -2
  42. package/dist/{chunk-KU5OPV7U.js → chunk-5QQN3SKH.js} +1 -1
  43. package/dist/{chunk-OKNBZSGN.js → chunk-5QWYIBE6.js} +1 -1
  44. package/dist/chunk-5W443CKL.js +836 -0
  45. package/dist/{chunk-PD5ZHJWI.js → chunk-636CTEW7.js} +1 -1
  46. package/dist/{chunk-L2VSSINY.js → chunk-67KMRBSZ.js} +1 -1
  47. package/dist/{chunk-HJSYHK4S.js → chunk-6DIHOMCB.js} +1 -1
  48. package/dist/{chunk-MGL4YM3S.js → chunk-6EZ7JWBK.js} +5 -5
  49. package/dist/{chunk-NBYS6YQ2.js → chunk-6RL7FUPD.js} +1 -1
  50. package/dist/chunk-6YPEONHB.js +46 -0
  51. package/dist/{chunk-C6ABJCRG.js → chunk-733R5OKQ.js} +1 -1
  52. package/dist/chunk-73W5BGAZ.js +1 -0
  53. package/dist/{chunk-XDAOLCPN.js → chunk-75LJTY7F.js} +1 -1
  54. package/dist/{chunk-IU2ZQ6TE.js → chunk-773TIA5M.js} +1 -1
  55. package/dist/{chunk-TQGTEVSR.js → chunk-7EJ4UVYI.js} +1 -1
  56. package/dist/{chunk-FQDRVPCY.js → chunk-7LATYPLU.js} +1 -1
  57. package/dist/{chunk-XXE7667M.js → chunk-7SVMAJTR.js} +1 -1
  58. package/dist/{chunk-QUTQDXSL.js → chunk-7UNQOKZW.js} +1 -1
  59. package/dist/{chunk-CE6FKJFS.js → chunk-7UOPCYMV.js} +1 -1
  60. package/dist/{chunk-7JESXDF2.js → chunk-A4SBXDZB.js} +1 -1
  61. package/dist/{chunk-Z35BTAM6.js → chunk-AAK376RT.js} +1 -1
  62. package/dist/chunk-APN3VWN4.js +3 -0
  63. package/dist/{chunk-7DVOSOEP.js → chunk-AT2GDXN7.js} +1 -1
  64. package/dist/chunk-ATXODH6C.js +283 -0
  65. package/dist/chunk-AY4GIVME.js +4 -0
  66. package/dist/{chunk-PS25FEBF.js → chunk-B7BUEEBR.js} +1 -1
  67. package/dist/{chunk-6YHJ554P.js → chunk-B7S23DLF.js} +1 -1
  68. package/dist/chunk-BCD4KTLJ.js +1 -0
  69. package/dist/{chunk-C3LZPAAH.js → chunk-BIMOHK2P.js} +1 -1
  70. package/dist/chunk-C3CVLSLS.js +6 -0
  71. package/dist/{chunk-57N2DFIF.js → chunk-CD5O2BIT.js} +1 -1
  72. package/dist/chunk-CPE7XCC6.js +593 -0
  73. package/dist/{chunk-PIBY5DDZ.js → chunk-CRALWNNO.js} +1 -1
  74. package/dist/{chunk-H4W4DFKK.js → chunk-CX5CC6P5.js} +1 -1
  75. package/dist/{chunk-2KH2S7PI.js → chunk-CZXGQ53M.js} +1 -1
  76. package/dist/chunk-D6YDSGR4.js +3 -0
  77. package/dist/{chunk-J6VTZEE2.js → chunk-DHBYYHBT.js} +1 -1
  78. package/dist/chunk-DLNBTHKL.js +5 -0
  79. package/dist/chunk-DO2SHYFU.js +1 -0
  80. package/dist/{chunk-VPL2NDH6.js → chunk-DONEJHDG.js} +35 -35
  81. package/dist/{chunk-5TIJLYZU.js → chunk-DQ4HA72R.js} +1 -1
  82. package/dist/{chunk-NO5KVFTV.js → chunk-DZLA2RJP.js} +3 -3
  83. package/dist/{chunk-YS6VOQ7I.js → chunk-EJDWYASP.js} +1 -1
  84. package/dist/{chunk-N3YWHJMB.js → chunk-EKHWL542.js} +46 -46
  85. package/dist/{chunk-6M3ZYNGO.js → chunk-ET2CGROE.js} +1 -1
  86. package/dist/{chunk-QSTEVZFQ.js → chunk-F3TMLDLC.js} +1 -1
  87. package/dist/{chunk-M4LOKANA.js → chunk-F5QG42MA.js} +1 -1
  88. package/dist/{chunk-FTN7Y6HD.js → chunk-FA4K3JRN.js} +1 -1
  89. package/dist/{chunk-WDC3KIZT.js → chunk-FKIVKNOV.js} +1 -1
  90. package/dist/{chunk-4EXYYBQ6.js → chunk-FPLUMESQ.js} +1 -1
  91. package/dist/chunk-FU232KQ7.js +1 -0
  92. package/dist/{chunk-HLMFVORT.js → chunk-FZKKKGUJ.js} +1 -1
  93. package/dist/chunk-G24L7MB3.js +1 -0
  94. package/dist/{chunk-LQMSF3F7.js → chunk-G2I2ZUBV.js} +1 -1
  95. package/dist/{chunk-FFYYJKF7.js → chunk-G2S346IS.js} +1 -1
  96. package/dist/{chunk-KLMDWDT2.js → chunk-GB3YC4TI.js} +1 -1
  97. package/dist/{chunk-VA5IUGZV.js → chunk-GBZL4TTY.js} +1 -1
  98. package/dist/{chunk-OCOY5MV2.js → chunk-GCN4O7HM.js} +1 -1
  99. package/dist/{chunk-2N4O33VM.js → chunk-GDHD3TGC.js} +1 -1
  100. package/dist/{chunk-TLSAQ6FG.js → chunk-GFCLUGAG.js} +1 -1
  101. package/dist/{chunk-C2FFA4O4.js → chunk-GKRCTMWY.js} +1 -1
  102. package/dist/{chunk-TGACBJIY.js → chunk-GTUKM3ZW.js} +1 -1
  103. package/dist/{chunk-RGNAWKD7.js → chunk-GUO7S4NW.js} +1 -1
  104. package/dist/{chunk-WUK5NQSX.js → chunk-GW3VY3FZ.js} +2 -2
  105. package/dist/{chunk-4KRT35A2.js → chunk-H5C3QTOO.js} +1 -1
  106. package/dist/{chunk-LKS47US7.js → chunk-H6WN7GP4.js} +1 -1
  107. package/dist/{chunk-2WNODIWJ.js → chunk-HA6NISOZ.js} +1 -1
  108. package/dist/{chunk-FBVBO5YQ.js → chunk-HCN6HXA5.js} +1 -1
  109. package/dist/chunk-HM5H7WBE.js +1 -0
  110. package/dist/chunk-HZMP62GK.js +21 -0
  111. package/dist/{chunk-QLQGHMVU.js → chunk-HZSAUZBX.js} +1 -1
  112. package/dist/chunk-HZYRCG4R.js +9 -0
  113. package/dist/{chunk-EENHXSWU.js → chunk-I5A6BPCP.js} +1 -1
  114. package/dist/chunk-I73E3BD5.js +1 -0
  115. package/dist/{chunk-UURFVUAH.js → chunk-IG6LPVS4.js} +1 -1
  116. package/dist/{chunk-BECEP46I.js → chunk-IIOIDMG3.js} +1 -1
  117. package/dist/{chunk-D656BV5Z.js → chunk-IPQH2RHD.js} +1 -1
  118. package/dist/{chunk-TNQXTZAX.js → chunk-IWOTLFOY.js} +1 -1
  119. package/dist/chunk-IX4KP6E3.js +2 -0
  120. package/dist/{chunk-AP3RFOPL.js → chunk-J2WCMQZZ.js} +1 -1
  121. package/dist/chunk-J3HXFQ2L.js +1 -0
  122. package/dist/{chunk-OYP7DKPU.js → chunk-J3JPJCWP.js} +1 -1
  123. package/dist/chunk-J5TNYNR5.js +1 -0
  124. package/dist/{chunk-UBKVCI7A.js → chunk-J7UQBC45.js} +1 -1
  125. package/dist/{chunk-M2TJICTB.js → chunk-JAW32T6G.js} +1 -1
  126. package/dist/{chunk-LCCMXY6N.js → chunk-JOZXRV5K.js} +1 -1
  127. package/dist/{chunk-UARVYVLN.js → chunk-KKUDXLK2.js} +2 -2
  128. package/dist/{chunk-LITB5QQX.js → chunk-KN3FTJDU.js} +1 -1
  129. package/dist/{chunk-3VZEETAV.js → chunk-KRZABRYT.js} +1 -1
  130. package/dist/{chunk-DNLOSMHL.js → chunk-KSZ5K6LJ.js} +1 -1
  131. package/dist/chunk-LCPD2BYX.js +1 -0
  132. package/dist/chunk-LKZ7ARYS.js +18 -0
  133. package/dist/{chunk-3V63X7WZ.js → chunk-LOHUNOQ7.js} +1 -1
  134. package/dist/{chunk-IXUVSFW2.js → chunk-LOQIRLTD.js} +1 -1
  135. package/dist/{chunk-CW7WJZKR.js → chunk-MFLQRQQT.js} +1 -1
  136. package/dist/{chunk-PRKBO42R.js → chunk-MPW2YJWU.js} +1 -1
  137. package/dist/chunk-MQICT2LR.js +1 -0
  138. package/dist/{chunk-VYXVYOIJ.js → chunk-MZMYBFZQ.js} +1 -1
  139. package/dist/{chunk-ZZYFG22L.js → chunk-NADNFSKS.js} +1 -1
  140. package/dist/{chunk-5Y7GIF2W.js → chunk-NJOO5XJV.js} +1 -1
  141. package/dist/{chunk-ULQG3XQS.js → chunk-NNOSZ447.js} +1 -1
  142. package/dist/{chunk-WNGV4JQS.js → chunk-NWDP5IZ2.js} +1 -1
  143. package/dist/{chunk-R6JNXEB3.js → chunk-NY5OGHM5.js} +1 -1
  144. package/dist/chunk-O6KTFMCD.js +1 -0
  145. package/dist/{chunk-3BRUCKZ2.js → chunk-OAI7VSLW.js} +1 -1
  146. package/dist/{chunk-RAH5NW3R.js → chunk-OORCODNK.js} +1 -1
  147. package/dist/chunk-OQORDQLH.js +1 -0
  148. package/dist/{chunk-75VPUOC5.js → chunk-P2OI2P2M.js} +1 -1
  149. package/dist/{chunk-6AJZKIZ3.js → chunk-PETINPMX.js} +1 -1
  150. package/dist/{chunk-MZJRNFAU.js → chunk-PJYNAUQB.js} +1 -1
  151. package/dist/{chunk-HD5TYIDZ.js → chunk-PMXCJIBP.js} +1 -1
  152. package/dist/{chunk-K77WAKOB.js → chunk-POAICASX.js} +1 -1
  153. package/dist/chunk-PUAMSBXS.js +1 -0
  154. package/dist/{chunk-DERA4K6A.js → chunk-PZYP3MCL.js} +1 -1
  155. package/dist/chunk-Q7BOSHWX.js +7 -0
  156. package/dist/{chunk-K7K6GNF6.js → chunk-QJ7TI6CK.js} +1 -1
  157. package/dist/{chunk-M4V2OQAX.js → chunk-QMXKGSFH.js} +1 -1
  158. package/dist/chunk-QPN2M26G.js +1 -0
  159. package/dist/{chunk-UCLSPAVX.js → chunk-QS3FMN67.js} +1 -1
  160. package/dist/chunk-RF6NUGCU.js +1 -0
  161. package/dist/{chunk-5CH3B62S.js → chunk-RJ5VF3QY.js} +1 -1
  162. package/dist/{chunk-XX343DDG.js → chunk-RYGZCBO4.js} +1 -1
  163. package/dist/{chunk-U3ZG675O.js → chunk-SKLUHLS2.js} +1 -1
  164. package/dist/{chunk-F6T3UBBL.js → chunk-SP2WUATO.js} +1 -1
  165. package/dist/{chunk-QFWIDATO.js → chunk-STJ3LWFL.js} +1 -1
  166. package/dist/chunk-SWI3LCPE.js +7 -0
  167. package/dist/{chunk-6HZTMQD6.js → chunk-SXTDVUT3.js} +1 -1
  168. package/dist/{chunk-IWCPQD7X.js → chunk-T5GSCWN5.js} +1 -1
  169. package/dist/{chunk-3YWUSKWF.js → chunk-T6CC5WUU.js} +1 -1
  170. package/dist/{chunk-3TNEIDOD.js → chunk-T7KHS6RF.js} +1 -1
  171. package/dist/{chunk-E2YBU6D3.js → chunk-TC3JOEMA.js} +2 -2
  172. package/dist/{chunk-A6X2IVGT.js → chunk-TJGUNVRI.js} +1 -1
  173. package/dist/{chunk-6ZIOYXEF.js → chunk-TKG42KLM.js} +1 -1
  174. package/dist/{chunk-QYR5VPQA.js → chunk-TOLPNBZK.js} +1 -1
  175. package/dist/{chunk-6TORWTD7.js → chunk-TQUSREKP.js} +1 -1
  176. package/dist/chunk-TU47HMTL.js +1 -0
  177. package/dist/chunk-TYMYIUIQ.js +1 -0
  178. package/dist/{chunk-XP6IRAZN.js → chunk-U73TPLFE.js} +1 -1
  179. package/dist/{chunk-VEDZUOVI.js → chunk-UKK5P74A.js} +3 -3
  180. package/dist/chunk-UMT7DWR4.js +1 -0
  181. package/dist/{chunk-FD5S2O6M.js → chunk-UOHNRH6E.js} +1 -1
  182. package/dist/{chunk-ZR76GGZ6.js → chunk-UQWFDL3F.js} +1 -1
  183. package/dist/chunk-UUC5YKAS.js +2 -0
  184. package/dist/chunk-UYK6CXAU.js +1 -0
  185. package/dist/{chunk-7KJ5TBWG.js → chunk-V3RZ3DTW.js} +1 -1
  186. package/dist/{chunk-6TEXPRI2.js → chunk-V6ZSIUO3.js} +1 -1
  187. package/dist/{chunk-A3VYI4LO.js → chunk-VDN6MEYI.js} +3 -3
  188. package/dist/chunk-VE35YELD.js +1 -0
  189. package/dist/{chunk-6LK6ZP3Q.js → chunk-VFWWZMOQ.js} +1 -1
  190. package/dist/{chunk-VBUZWRUL.js → chunk-VJEKDBGZ.js} +1 -1
  191. package/dist/chunk-VKWPEFWQ.js +1 -0
  192. package/dist/{chunk-7BFDUVOG.js → chunk-VOJWKGCW.js} +1 -1
  193. package/dist/{chunk-LTWXTDDR.js → chunk-VQW35HIQ.js} +1 -1
  194. package/dist/chunk-VUMUCNI7.js +1 -0
  195. package/dist/{chunk-2VLMN5QZ.js → chunk-WAGAC3YI.js} +1 -1
  196. package/dist/chunk-WKBVT5WG.js +1 -0
  197. package/dist/chunk-WLO5H255.js +3 -0
  198. package/dist/chunk-WNWQSHEC.js +10 -0
  199. package/dist/{chunk-6YAXFS6V.js → chunk-WRRUFK4Y.js} +1 -1
  200. package/dist/{chunk-SSM346XI.js → chunk-WVHB2HCQ.js} +1 -1
  201. package/dist/{chunk-MOA33ZFO.js → chunk-WW7TENNA.js} +1 -1
  202. package/dist/chunk-WZVQHMGI.js +1 -0
  203. package/dist/{chunk-NPM3MFB3.js → chunk-X4DIJTIK.js} +1 -1
  204. package/dist/{chunk-42RMKTCJ.js → chunk-XH6ZP7M5.js} +1 -1
  205. package/dist/{chunk-23AMFHXC.js → chunk-XV3I45NA.js} +1 -1
  206. package/dist/{chunk-PSQFZAF3.js → chunk-XWPPBOGF.js} +1 -1
  207. package/dist/{chunk-MIO2CV3Q.js → chunk-Y3WIZSRU.js} +1 -1
  208. package/dist/{chunk-INFBVFMU.js → chunk-Y66GQ6V2.js} +1 -1
  209. package/dist/{chunk-IVGWFPMA.js → chunk-YGKQCEVG.js} +1 -1
  210. package/dist/{chunk-4Z2WYNTE.js → chunk-YLGSM42I.js} +1 -1
  211. package/dist/{chunk-TXUTT6UA.js → chunk-YQH2JHFA.js} +1 -1
  212. package/dist/{chunk-QTGMS62F.js → chunk-YYL356OX.js} +1 -1
  213. package/dist/chunk-Z4LC3WE5.js +7 -0
  214. package/dist/{chunk-OA4P6AKS.js → chunk-Z74QYLNC.js} +1 -1
  215. package/dist/{chunk-DCK2FX6J.js → chunk-ZAMDXIVC.js} +1 -1
  216. package/dist/{chunk-4LNCYIS3.js → chunk-ZDF5N422.js} +1 -1
  217. package/dist/{chunk-RL5BWZ7D.js → chunk-ZEENHLSC.js} +2 -2
  218. package/dist/{chunk-T4M5CWAO.js → chunk-ZG7BVVT2.js} +1 -1
  219. package/dist/{chunk-NKQBEFPS.js → chunk-ZI7LK3LW.js} +1 -1
  220. package/dist/{chunk-UOQQNAHX.js → chunk-ZIREP3EZ.js} +1 -1
  221. package/dist/chunk-ZIXWWU2N.js +275 -0
  222. package/dist/{chunk-NXL6LDJU.js → chunk-ZQ5JVD5X.js} +1 -1
  223. package/dist/{chunk-FGVC22EY.js → chunk-ZULTG2D2.js} +1 -1
  224. package/dist/{chunk-F47MFBKM.js → chunk-ZZFZBFVM.js} +1 -1
  225. package/dist/cli/commands/app/app-logs/sources.js +1 -1
  226. package/dist/cli/commands/app/build.js +1 -1
  227. package/dist/cli/commands/app/bulk/cancel.js +1 -1
  228. package/dist/cli/commands/app/bulk/execute.js +1 -1
  229. package/dist/cli/commands/app/bulk/status.js +1 -1
  230. package/dist/cli/commands/app/config/link.js +1 -1
  231. package/dist/cli/commands/app/config/pull.js +1 -1
  232. package/dist/cli/commands/app/config/use.js +1 -1
  233. package/dist/cli/commands/app/config/validate.js +1 -1
  234. package/dist/cli/commands/app/demo/watcher.js +1 -1
  235. package/dist/cli/commands/app/deploy.js +1 -1
  236. package/dist/cli/commands/app/dev/clean.js +1 -1
  237. package/dist/cli/commands/app/dev.js +1 -1
  238. package/dist/cli/commands/app/env/pull.js +1 -1
  239. package/dist/cli/commands/app/env/show.js +1 -1
  240. package/dist/cli/commands/app/execute.js +1 -1
  241. package/dist/cli/commands/app/function/build.js +1 -1
  242. package/dist/cli/commands/app/function/info.js +1 -1
  243. package/dist/cli/commands/app/function/replay.js +1 -1
  244. package/dist/cli/commands/app/function/run.js +1 -1
  245. package/dist/cli/commands/app/function/schema.js +1 -1
  246. package/dist/cli/commands/app/function/typegen.js +1 -1
  247. package/dist/cli/commands/app/generate/extension.js +1 -1
  248. package/dist/cli/commands/app/graphiql.js +1 -0
  249. package/dist/cli/commands/app/import-custom-data-definitions.js +1 -1
  250. package/dist/cli/commands/app/import-extensions.js +1 -1
  251. package/dist/cli/commands/app/info.js +1 -1
  252. package/dist/cli/commands/app/init.js +1 -1
  253. package/dist/cli/commands/app/logs.js +1 -1
  254. package/dist/cli/commands/app/release.js +1 -1
  255. package/dist/cli/commands/app/versions/list.js +1 -1
  256. package/dist/cli/commands/app/webhook/trigger.js +1 -1
  257. package/dist/cli/commands/auth/login.js +1 -1
  258. package/dist/cli/commands/auth/logout.js +1 -1
  259. package/dist/cli/commands/cache/clear.js +1 -1
  260. package/dist/cli/commands/config/autoupgrade/constants.js +1 -1
  261. package/dist/cli/commands/config/autoupgrade/off.js +1 -1
  262. package/dist/cli/commands/config/autoupgrade/on.js +1 -1
  263. package/dist/cli/commands/config/autoupgrade/status.js +1 -1
  264. package/dist/cli/commands/debug/command-flags.js +1 -1
  265. package/dist/cli/commands/doc/fetch.d.ts +12 -0
  266. package/dist/cli/commands/doc/fetch.js +1 -0
  267. package/dist/cli/commands/doc/search.d.ts +13 -0
  268. package/dist/cli/commands/doc/search.js +1 -0
  269. package/dist/cli/commands/docs/generate.js +1 -1
  270. package/dist/cli/commands/doctor-release/doctor-release.js +1 -1
  271. package/dist/cli/commands/doctor-release/theme/index.js +1 -1
  272. package/dist/cli/commands/help.js +1 -1
  273. package/dist/cli/commands/kitchen-sink/async.js +1 -1
  274. package/dist/cli/commands/kitchen-sink/index.js +1 -1
  275. package/dist/cli/commands/kitchen-sink/prompts.js +1 -1
  276. package/dist/cli/commands/kitchen-sink/static.js +1 -1
  277. package/dist/cli/commands/notifications/generate.js +1 -1
  278. package/dist/cli/commands/notifications/list.js +1 -1
  279. package/dist/cli/commands/organization/list.js +1 -1
  280. package/dist/cli/commands/search.d.ts +4 -0
  281. package/dist/cli/commands/search.js +1 -1
  282. package/dist/cli/commands/theme/check.js +1 -1
  283. package/dist/cli/commands/theme/console.js +1 -1
  284. package/dist/cli/commands/theme/delete.js +1 -1
  285. package/dist/cli/commands/theme/dev.js +1 -1
  286. package/dist/cli/commands/theme/duplicate.js +1 -1
  287. package/dist/cli/commands/theme/info.js +1 -1
  288. package/dist/cli/commands/theme/init.js +1 -1
  289. package/dist/cli/commands/theme/language-server.js +1 -1
  290. package/dist/cli/commands/theme/list.js +1 -1
  291. package/dist/cli/commands/theme/metafields/pull.js +1 -1
  292. package/dist/cli/commands/theme/open.js +1 -1
  293. package/dist/cli/commands/theme/package.js +1 -1
  294. package/dist/cli/commands/theme/preview.js +1 -1
  295. package/dist/cli/commands/theme/profile.js +1 -1
  296. package/dist/cli/commands/theme/publish.js +1 -1
  297. package/dist/cli/commands/theme/pull.js +1 -1
  298. package/dist/cli/commands/theme/push.js +1 -1
  299. package/dist/cli/commands/theme/rename.js +1 -1
  300. package/dist/cli/commands/theme/share.js +1 -1
  301. package/dist/cli/commands/upgrade.js +1 -1
  302. package/dist/cli/commands/version.js +1 -1
  303. package/dist/cli/help.d.ts +38 -0
  304. package/dist/cli/help.js +2 -0
  305. package/dist/cli/services/commands/doc/fetch.d.ts +1 -0
  306. package/dist/cli/services/commands/doc/fetch.js +45 -0
  307. package/dist/cli/services/commands/doc/search.d.ts +1 -0
  308. package/dist/cli/services/commands/doc/search.js +47 -0
  309. package/dist/command-registry.js +1 -1
  310. package/dist/{conf-store-6QNH5BID.js → conf-store-C2LOYIOU.js} +1 -1
  311. package/dist/{custom-oclif-loader-TSPWW5YF.js → custom-oclif-loader-3AICQCNU.js} +1 -1
  312. package/dist/deprecations-QOHE6JG6.js +1 -0
  313. package/dist/{devtools-HCKYP7DQ.js → devtools-37DE4MUR.js} +1 -1
  314. package/dist/{devtools-VEZNCV6W.js → devtools-WAWU5KQL.js} +1 -1
  315. package/dist/dist-FF6C4ZHS.js +1 -0
  316. package/dist/dist-Q676YGVI.js +1 -0
  317. package/dist/environments-EGD263DV.js +1 -0
  318. package/dist/error-66U2HJ37.js +1 -0
  319. package/dist/error-handler-SW2ALZ5Z.js +1 -0
  320. package/dist/{estree-BYYJYS3A.js → estree-JV5M77BA.js} +1 -1
  321. package/dist/{flow-M3Q2HPQT.js → flow-N4JYPYMQ.js} +1 -1
  322. package/dist/{fs-YMUQ6JLE.js → fs-JPQRUGZI.js} +1 -1
  323. package/dist/{glimmer-3DEJJGOJ.js → glimmer-JEV3BXHR.js} +1 -1
  324. package/dist/{graphql-A4HHE3MB.js → graphql-DTF6MHYF.js} +1 -1
  325. package/dist/hooks/app-init.js +1 -1
  326. package/dist/hooks/did-you-mean.js +1 -1
  327. package/dist/hooks/hydrogen-init.js +1 -1
  328. package/dist/hooks/plugin-plugins.js +1 -1
  329. package/dist/hooks/postrun.js +1 -1
  330. package/dist/hooks/prerun.js +1 -1
  331. package/dist/hooks/public-metadata.js +1 -1
  332. package/dist/hooks/sensitive-metadata.js +1 -1
  333. package/dist/hooks/tunnel-provider.js +1 -1
  334. package/dist/hooks/tunnel-start.js +1 -1
  335. package/dist/{html-HETICZ2F.js → html-LVOJ3RQS.js} +1 -1
  336. package/dist/{http-proxy-node16-Q5DZMBHC.js → http-proxy-node16-X2WAMUT5.js} +1 -1
  337. package/dist/index.js +41 -7
  338. package/dist/is-global-QWTDUPNR.js +1 -0
  339. package/dist/{is-wsl-TN2CXYI7.js → is-wsl-UEMXYJPN.js} +1 -1
  340. package/dist/{latest-version-6OAYLOBL.js → latest-version-32HXMWJ7.js} +1 -1
  341. package/dist/lib-NOROGV6N.js +1 -0
  342. package/dist/lib-O5EZ4NVT.js +1 -0
  343. package/dist/lib-QJDPPAWN.js +1 -0
  344. package/dist/lib-UCG2DNMS.js +1 -0
  345. package/dist/{local-GPDAXHE6.js → local-FRYN3NWL.js} +1 -1
  346. package/dist/local-storage-DFH3LT5G.js +1 -0
  347. package/dist/{markdown-5TVCXM53.js → markdown-J6CE6POI.js} +1 -1
  348. package/dist/{meriyah-23OZNYWC.js → meriyah-PNQQZQYI.js} +1 -1
  349. package/dist/metadata-KZVLHQII.js +1 -0
  350. package/dist/{morph-I35VYPBH.js → morph-CG6HEMCQ.js} +4 -4
  351. package/dist/{multipart-parser-Q4QJZK3V.js → multipart-parser-5NSSTW27.js} +1 -1
  352. package/dist/{node-package-manager-GO4ZRTKQ.js → node-package-manager-LVFBY4LY.js} +1 -1
  353. package/dist/notifications-system-DP443VTE.js +1 -0
  354. package/dist/{npa-VNALV7XY.js → npa-A4YSCQ5Q.js} +1 -1
  355. package/dist/{open-VA7TLUIL.js → open-KLSGXBIW.js} +1 -1
  356. package/dist/out-CDCY25QC.js +1 -0
  357. package/dist/{output-7IYOMPSA.js → output-NH4I5Y3C.js} +1 -1
  358. package/dist/{path-CWUNINMX.js → path-MBXP7ZIC.js} +1 -1
  359. package/dist/{postcss-IIK6CGAW.js → postcss-Q36SHOML.js} +1 -1
  360. package/dist/{prettier-ZSBNNQTK.js → prettier-6ZMB2MMO.js} +1 -1
  361. package/dist/{source-map-3K6Y2OMO.js → source-map-E7FCCJL7.js} +1 -1
  362. package/dist/system-GNOF6HMI.js +1 -0
  363. package/dist/tsconfig.tsbuildinfo +1 -1
  364. package/dist/typescript-5R4Y7PXE.js +1 -0
  365. package/dist/{typescript-YKZ232QT.js → typescript-WYPDGPSV.js} +1 -1
  366. package/dist/ui-QOGKADWB.js +1 -0
  367. package/dist/upgrade-K4S6JW64.js +1 -0
  368. package/dist/version-FJFTTOZU.js +1 -0
  369. package/dist/version-ZI4GZX72.js +1 -0
  370. package/dist/{workerd-ST6XJKUN.js → workerd-U6WWWY73.js} +1 -1
  371. package/dist/{yaml-SJKIH3VD.js → yaml-6KWCJ64X.js} +1 -1
  372. package/oclif.manifest.json +964 -74
  373. package/package.json +19 -9
  374. package/dist/analytics-CX22YIUZ.js +0 -1
  375. package/dist/analytics-UBWQIQYF.js +0 -1
  376. package/dist/assets/hydrogen/starter/app/routes/api.$version.[graphql.json].tsx +0 -14
  377. package/dist/chunk-2YXKZWYW.js +0 -1
  378. package/dist/chunk-4V4DQ6W7.js +0 -836
  379. package/dist/chunk-4ZGSSQC6.js +0 -1
  380. package/dist/chunk-6SXOUZ7V.js +0 -1
  381. package/dist/chunk-ATPFTRCC.js +0 -1
  382. package/dist/chunk-AWQ5AR2K.js +0 -5
  383. package/dist/chunk-BHWEA4V2.js +0 -1
  384. package/dist/chunk-BPVZ7E63.js +0 -1
  385. package/dist/chunk-CCEA5CUX.js +0 -1
  386. package/dist/chunk-D3DDLLNF.js +0 -2
  387. package/dist/chunk-FP2NOZSD.js +0 -1
  388. package/dist/chunk-FSTCEWXX.js +0 -1
  389. package/dist/chunk-HHXHOQQP.js +0 -3
  390. package/dist/chunk-HSYRYSX4.js +0 -3
  391. package/dist/chunk-HZA6IAA4.js +0 -1
  392. package/dist/chunk-I3LX25MB.js +0 -1
  393. package/dist/chunk-IOQQUHST.js +0 -18
  394. package/dist/chunk-IWE4RUI7.js +0 -1
  395. package/dist/chunk-K3PGC6DC.js +0 -1
  396. package/dist/chunk-KFCGMT67.js +0 -1
  397. package/dist/chunk-KLA7AWG6.js +0 -7
  398. package/dist/chunk-KQU6HOJ3.js +0 -1
  399. package/dist/chunk-MA52QGHP.js +0 -1
  400. package/dist/chunk-N5ROZKPZ.js +0 -1
  401. package/dist/chunk-NEZEHBT2.js +0 -1
  402. package/dist/chunk-NP4UFPAX.js +0 -9
  403. package/dist/chunk-OKOYLEA7.js +0 -278
  404. package/dist/chunk-OLOBQ42K.js +0 -1
  405. package/dist/chunk-PBTXPBI6.js +0 -18
  406. package/dist/chunk-PLQFX5ZP.js +0 -9
  407. package/dist/chunk-PUTZFF2Z.js +0 -613
  408. package/dist/chunk-RVMB5LC2.js +0 -1
  409. package/dist/chunk-T5MK7ZSF.js +0 -1
  410. package/dist/chunk-UOQ75BL3.js +0 -1
  411. package/dist/chunk-UWJ73J4B.js +0 -1
  412. package/dist/chunk-VPRTJUIN.js +0 -1
  413. package/dist/chunk-VT77EFRL.js +0 -10
  414. package/dist/chunk-WCWNI3ZV.js +0 -283
  415. package/dist/chunk-X4CV6TRE.js +0 -1
  416. package/dist/chunk-XEFQQPL4.js +0 -1
  417. package/dist/chunk-XFKCDWXB.js +0 -5
  418. package/dist/chunk-YJB7P2HC.js +0 -1
  419. package/dist/chunk-YOZNRLFC.js +0 -1
  420. package/dist/deprecations-F6JWVV2W.js +0 -1
  421. package/dist/dist-4BD6KOLR.js +0 -1
  422. package/dist/dist-AUABCVPI.js +0 -1
  423. package/dist/environments-RGLI75HN.js +0 -1
  424. package/dist/error-OZALZZ3U.js +0 -1
  425. package/dist/error-handler-V7LSEXHM.js +0 -1
  426. package/dist/is-global-BLIZ57HQ.js +0 -1
  427. package/dist/lib-AK5EOIKR.js +0 -1
  428. package/dist/lib-LVUMLZ4H.js +0 -1
  429. package/dist/lib-ME6554NA.js +0 -1
  430. package/dist/lib-WU3FEA6I.js +0 -1
  431. package/dist/local-storage-P66KJG6I.js +0 -1
  432. package/dist/metadata-TRH25EHU.js +0 -1
  433. package/dist/notifications-system-HM6JZ6WJ.js +0 -1
  434. package/dist/out-WLY6KV4B.js +0 -1
  435. package/dist/system-X5C4EQQH.js +0 -1
  436. package/dist/typescript-K5CWIA4V.js +0 -1
  437. package/dist/ui-H62CMRLG.js +0 -1
  438. package/dist/upgrade-EEOPH464.js +0 -1
  439. package/dist/version-76NBQR4K.js +0 -1
  440. package/dist/version-IGSEISUA.js +0 -1
@@ -2,13 +2,15 @@ import {defineConfig} from 'vite';
2
2
  import {hydrogen} from '@shopify/hydrogen/vite';
3
3
  import {oxygen} from '@shopify/mini-oxygen/vite';
4
4
  import {reactRouter} from '@react-router/dev/vite';
5
- import tsconfigPaths from 'vite-tsconfig-paths';
6
5
 
7
6
  export default defineConfig({
8
- plugins: [hydrogen(), oxygen(), reactRouter(), tsconfigPaths()],
7
+ plugins: [hydrogen(), oxygen(), reactRouter()],
8
+ resolve: {
9
+ tsconfigPaths: true,
10
+ },
9
11
  build: {
10
12
  // Allow a strict Content-Security-Policy
11
- // withtout inlining assets as base64:
13
+ // without inlining assets as base64:
12
14
  assetsInlineLimit: 0,
13
15
  },
14
16
  ssr: {
@@ -23,7 +25,11 @@ export default defineConfig({
23
25
  * Include 'example-dep' in the array below.
24
26
  * @see https://vitejs.dev/config/dep-optimization-options
25
27
  */
26
- include: ['set-cookie-parser', 'cookie', 'react-router'],
28
+ include: [
29
+ 'react-router > set-cookie-parser',
30
+ 'react-router > cookie',
31
+ 'react-router',
32
+ ],
27
33
  },
28
34
  },
29
35
  server: {
@@ -8,7 +8,6 @@
8
8
  "isbot": "^5.1.21"
9
9
  },
10
10
  "devDependencies": {
11
- "vite": "^6.2.0",
12
- "vite-tsconfig-paths": "^4.3.1"
11
+ "vite": "^8.0.1"
13
12
  }
14
13
  }
@@ -2,9 +2,11 @@ import {defineConfig} from 'vite';
2
2
  import {hydrogen} from '@shopify/hydrogen/vite';
3
3
  import {oxygen} from '@shopify/mini-oxygen/vite';
4
4
  import {vitePlugin as remix} from '@remix-run/dev';
5
- import tsconfigPaths from 'vite-tsconfig-paths';
6
5
 
7
6
  export default defineConfig({
7
+ resolve: {
8
+ tsconfigPaths: true,
9
+ },
8
10
  plugins: [
9
11
  hydrogen(),
10
12
  oxygen(),
@@ -17,11 +19,10 @@ export default defineConfig({
17
19
  v3_routeConfig: false,
18
20
  },
19
21
  }),
20
- tsconfigPaths(),
21
22
  ],
22
23
  build: {
23
24
  // Allow a strict Content-Security-Policy
24
- // withtout inlining assets as base64:
25
+ // without inlining assets as base64:
25
26
  assetsInlineLimit: 0,
26
27
  },
27
28
  ssr: {
@@ -1,4 +1,4 @@
1
- import{b as os,g as Ze}from"./chunk-VPRTJUIN.js";function ps(t,e){if(t==null)return{};var s={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(e.indexOf(i)!==-1)continue;s[i]=t[i]}return s}function D(t,e){let{line:s,column:i,index:r}=t;return new z(s,i+e,r+e)}function st(t,e,s){Object.defineProperty(t,e,{enumerable:!1,configurable:!0,value:s})}function Ps({toMessage:t,code:e,reasonCode:s,syntaxPlugin:i}){let r=s==="MissingPlugin"||s==="MissingOneOfPlugins";return function a(n,o){let l=new SyntaxError;return l.code=e,l.reasonCode=s,l.loc=n,l.pos=n.index,l.syntaxPlugin=i,r&&(l.missingPlugin=o.missingPlugin),st(l,"clone",function(h={}){let{line:u,column:d,index:x}=h.loc??n;return a(new z(u,d,x),Object.assign({},o,h.details))}),st(l,"details",o),Object.defineProperty(l,"message",{configurable:!0,get(){let h=`${t(o)} (${n.line}:${n.column})`;return this.message=h,h},set(h){Object.defineProperty(this,"message",{value:h,writable:!0})}}),l}}function L(t,e){if(Array.isArray(t))return i=>L(i,t[0]);let s={};for(let i of Object.keys(t)){let r=t[i],a=typeof r=="string"?{message:()=>r}:typeof r=="function"?{message:r}:r,{message:n}=a,o=ps(a,xs),l=typeof n=="string"?()=>n:n;s[i]=Ps(Object.assign({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode:i,toMessage:l},e?{syntaxPlugin:e}:{},o))}return s}function As(){return{sourceType:"script",sourceFilename:void 0,startIndex:0,startColumn:0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowNewTargetOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,allowYieldOutsideFunction:!1,plugins:[],strictMode:void 0,ranges:!1,tokens:!1,createImportExpressions:!0,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0}}function gs(t){let e=As();if(t==null)return e;if(t.annexB!=null&&t.annexB!==!1)throw new Error("The `annexB` option can only be set to `false`.");for(let s of Object.keys(e))t[s]!=null&&(e[s]=t[s]);if(e.startLine===1)t.startIndex==null&&e.startColumn>0?e.startIndex=e.startColumn:t.startColumn==null&&e.startIndex>0&&(e.startColumn=e.startIndex);else if(t.startColumn==null||t.startIndex==null)throw new Error("With a `startLine > 1` you must also specify `startIndex` and `startColumn`.");if(e.sourceType==="commonjs"){if(t.allowAwaitOutsideFunction!=null)throw new Error("The `allowAwaitOutsideFunction` option cannot be used with `sourceType: 'commonjs'`.");if(t.allowReturnOutsideFunction!=null)throw new Error("`sourceType: 'commonjs'` implies `allowReturnOutsideFunction: true`, please remove the `allowReturnOutsideFunction` option or use `sourceType: 'script'`.");if(t.allowNewTargetOutsideFunction!=null)throw new Error("`sourceType: 'commonjs'` implies `allowNewTargetOutsideFunction: true`, please remove the `allowNewTargetOutsideFunction` option or use `sourceType: 'script'`.")}return e}function Y(t){return it(t.loc.start,"index"),it(t.loc.end,"index"),t}function b(t,e={}){e.keyword=t;let s=y(t,e);return Re.set(t,s),s}function k(t,e){return y(t,{beforeExpr:g,binop:e})}function y(t,e={}){return++ie,je.push(t),_e.push(e.binop??-1),Ve.push(e.beforeExpr??!1),ze.push(e.startsExpr??!1),He.push(e.prefix??!1),Ue.push(new Nt(t,e)),ie}function T(t,e={}){return++ie,Re.set(t,ie),je.push(t),_e.push(e.binop??-1),Ve.push(e.beforeExpr??!1),ze.push(e.startsExpr??!1),He.push(e.prefix??!1),Ue.push(new Nt("name",e)),ie}function E(t){return t>=93&&t<=133}function Ss(t){return t<=92}function F(t){return t>=58&&t<=133}function kt(t){return t>=58&&t<=137}function ws(t){return Ve[t]}function te(t){return ze[t]}function Is(t){return t>=29&&t<=33}function rt(t){return t>=129&&t<=131}function Ns(t){return t>=90&&t<=92}function qe(t){return t>=58&&t<=92}function ks(t){return t>=39&&t<=59}function vs(t){return t===34}function Ds(t){return He[t]}function Fs(t){return t>=121&&t<=123}function Ls(t){return t>=124&&t<=130}function H(t){return je[t]}function ce(t){return _e[t]}function Ms(t){return t===57}function ke(t){return t>=24&&t<=25}function vt(t){return Ue[t]}function ve(t,e){let s=65536;for(let i=0,r=e.length;i<r;i+=2){if(s+=e[i],s>t)return!1;if(s+=e[i+1],s>=t)return!0}return!1}function M(t){return t<65?t===36:t<=90?!0:t<97?t===95:t<=122?!0:t<=65535?t>=170&&Bs.test(String.fromCharCode(t)):ve(t,Ft)}function $(t){return t<48?t===36:t<58?!0:t<65?!1:t<=90?!0:t<97?t===95:t<=122?!0:t<=65535?t>=170&&Os.test(String.fromCharCode(t)):ve(t,Ft)||ve(t,Rs)}function Lt(t,e){return e&&t==="await"||t==="enum"}function Mt(t,e){return Lt(t,e)||js.has(t)}function Bt(t){return _s.has(t)}function Ot(t,e){return Mt(t,e)||Bt(t)}function Vs(t){return Us.has(t)}function zs(t,e,s){return t===64&&e===64&&M(s)}function qs(t){return Hs.has(t)}function Ws(t){return t.type==="DeclareExportAllDeclaration"||t.type==="DeclareExportDeclaration"&&(!t.declaration||t.declaration.type!=="TypeAlias"&&t.declaration.type!=="InterfaceDeclaration")}function at(t){return t.importKind==="type"||t.importKind==="typeof"}function Gs(t,e){let s=[],i=[];for(let r=0;r<t.length;r++)(e(t[r],r,t)?s:i).push(t[r]);return[s,i]}function W(t){switch(t){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}function nt(t,e,s){for(let i=e;i<s;i++)if(W(t.charCodeAt(i)))return!0;return!1}function ei(t){switch(t){case 9:case 11:case 12:case 32:case 160:case 5760:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8239:case 8287:case 12288:case 65279:return!0;default:return!1}}function _(t){return t?t.type==="JSXOpeningFragment"||t.type==="JSXClosingFragment":!1}function J(t){if(t.type==="JSXIdentifier")return t.name;if(t.type==="JSXNamespacedName")return t.namespace.name+":"+t.name.name;if(t.type==="JSXMemberExpression")return J(t.object)+"."+J(t.property);throw new Error("Node had unexpected type: "+t.type)}function ue(t,e){return(t?2:0)|(e?1:0)}function Rt(t,e){t.trailingComments===void 0?t.trailingComments=e:t.trailingComments.unshift(...e)}function ni(t,e){t.leadingComments===void 0?t.leadingComments=e:t.leadingComments.unshift(...e)}function X(t,e){t.innerComments===void 0?t.innerComments=e:t.innerComments.unshift(...e)}function q(t,e,s){let i=null,r=e.length;for(;i===null&&r>0;)i=e[--r];i===null||i.start>s.start?X(t,s.comments):Rt(i,s.comments)}function ht(t,e,s,i,r,a){let n=s,o=i,l=r,h="",u=null,d=s,{length:x}=e;for(;;){if(s>=x){a.unterminated(n,o,l),h+=e.slice(d,s);break}let A=e.charCodeAt(s);if(pi(t,A,e,s)){h+=e.slice(d,s);break}if(A===92){h+=e.slice(d,s);let I=ci(e,s,i,r,t==="template",a);I.ch===null&&!u?u={pos:s,lineStart:i,curLine:r}:h+=I.ch,{pos:s,lineStart:i,curLine:r}=I,d=s}else A===8232||A===8233?(++s,++r,i=s):A===10||A===13?t==="template"?(h+=e.slice(d,s)+`
1
+ import{b as os,g as Ze}from"./chunk-VKWPEFWQ.js";function ps(t,e){if(t==null)return{};var s={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(e.indexOf(i)!==-1)continue;s[i]=t[i]}return s}function D(t,e){let{line:s,column:i,index:r}=t;return new z(s,i+e,r+e)}function st(t,e,s){Object.defineProperty(t,e,{enumerable:!1,configurable:!0,value:s})}function Ps({toMessage:t,code:e,reasonCode:s,syntaxPlugin:i}){let r=s==="MissingPlugin"||s==="MissingOneOfPlugins";return function a(n,o){let l=new SyntaxError;return l.code=e,l.reasonCode=s,l.loc=n,l.pos=n.index,l.syntaxPlugin=i,r&&(l.missingPlugin=o.missingPlugin),st(l,"clone",function(h={}){let{line:u,column:d,index:x}=h.loc??n;return a(new z(u,d,x),Object.assign({},o,h.details))}),st(l,"details",o),Object.defineProperty(l,"message",{configurable:!0,get(){let h=`${t(o)} (${n.line}:${n.column})`;return this.message=h,h},set(h){Object.defineProperty(this,"message",{value:h,writable:!0})}}),l}}function L(t,e){if(Array.isArray(t))return i=>L(i,t[0]);let s={};for(let i of Object.keys(t)){let r=t[i],a=typeof r=="string"?{message:()=>r}:typeof r=="function"?{message:r}:r,{message:n}=a,o=ps(a,xs),l=typeof n=="string"?()=>n:n;s[i]=Ps(Object.assign({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode:i,toMessage:l},e?{syntaxPlugin:e}:{},o))}return s}function As(){return{sourceType:"script",sourceFilename:void 0,startIndex:0,startColumn:0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowNewTargetOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,allowYieldOutsideFunction:!1,plugins:[],strictMode:void 0,ranges:!1,tokens:!1,createImportExpressions:!0,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0}}function gs(t){let e=As();if(t==null)return e;if(t.annexB!=null&&t.annexB!==!1)throw new Error("The `annexB` option can only be set to `false`.");for(let s of Object.keys(e))t[s]!=null&&(e[s]=t[s]);if(e.startLine===1)t.startIndex==null&&e.startColumn>0?e.startIndex=e.startColumn:t.startColumn==null&&e.startIndex>0&&(e.startColumn=e.startIndex);else if(t.startColumn==null||t.startIndex==null)throw new Error("With a `startLine > 1` you must also specify `startIndex` and `startColumn`.");if(e.sourceType==="commonjs"){if(t.allowAwaitOutsideFunction!=null)throw new Error("The `allowAwaitOutsideFunction` option cannot be used with `sourceType: 'commonjs'`.");if(t.allowReturnOutsideFunction!=null)throw new Error("`sourceType: 'commonjs'` implies `allowReturnOutsideFunction: true`, please remove the `allowReturnOutsideFunction` option or use `sourceType: 'script'`.");if(t.allowNewTargetOutsideFunction!=null)throw new Error("`sourceType: 'commonjs'` implies `allowNewTargetOutsideFunction: true`, please remove the `allowNewTargetOutsideFunction` option or use `sourceType: 'script'`.")}return e}function Y(t){return it(t.loc.start,"index"),it(t.loc.end,"index"),t}function b(t,e={}){e.keyword=t;let s=y(t,e);return Re.set(t,s),s}function k(t,e){return y(t,{beforeExpr:g,binop:e})}function y(t,e={}){return++ie,je.push(t),_e.push(e.binop??-1),Ve.push(e.beforeExpr??!1),ze.push(e.startsExpr??!1),He.push(e.prefix??!1),Ue.push(new Nt(t,e)),ie}function T(t,e={}){return++ie,Re.set(t,ie),je.push(t),_e.push(e.binop??-1),Ve.push(e.beforeExpr??!1),ze.push(e.startsExpr??!1),He.push(e.prefix??!1),Ue.push(new Nt("name",e)),ie}function E(t){return t>=93&&t<=133}function Ss(t){return t<=92}function F(t){return t>=58&&t<=133}function kt(t){return t>=58&&t<=137}function ws(t){return Ve[t]}function te(t){return ze[t]}function Is(t){return t>=29&&t<=33}function rt(t){return t>=129&&t<=131}function Ns(t){return t>=90&&t<=92}function qe(t){return t>=58&&t<=92}function ks(t){return t>=39&&t<=59}function vs(t){return t===34}function Ds(t){return He[t]}function Fs(t){return t>=121&&t<=123}function Ls(t){return t>=124&&t<=130}function H(t){return je[t]}function ce(t){return _e[t]}function Ms(t){return t===57}function ke(t){return t>=24&&t<=25}function vt(t){return Ue[t]}function ve(t,e){let s=65536;for(let i=0,r=e.length;i<r;i+=2){if(s+=e[i],s>t)return!1;if(s+=e[i+1],s>=t)return!0}return!1}function M(t){return t<65?t===36:t<=90?!0:t<97?t===95:t<=122?!0:t<=65535?t>=170&&Bs.test(String.fromCharCode(t)):ve(t,Ft)}function $(t){return t<48?t===36:t<58?!0:t<65?!1:t<=90?!0:t<97?t===95:t<=122?!0:t<=65535?t>=170&&Os.test(String.fromCharCode(t)):ve(t,Ft)||ve(t,Rs)}function Lt(t,e){return e&&t==="await"||t==="enum"}function Mt(t,e){return Lt(t,e)||js.has(t)}function Bt(t){return _s.has(t)}function Ot(t,e){return Mt(t,e)||Bt(t)}function Vs(t){return Us.has(t)}function zs(t,e,s){return t===64&&e===64&&M(s)}function qs(t){return Hs.has(t)}function Ws(t){return t.type==="DeclareExportAllDeclaration"||t.type==="DeclareExportDeclaration"&&(!t.declaration||t.declaration.type!=="TypeAlias"&&t.declaration.type!=="InterfaceDeclaration")}function at(t){return t.importKind==="type"||t.importKind==="typeof"}function Gs(t,e){let s=[],i=[];for(let r=0;r<t.length;r++)(e(t[r],r,t)?s:i).push(t[r]);return[s,i]}function W(t){switch(t){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}function nt(t,e,s){for(let i=e;i<s;i++)if(W(t.charCodeAt(i)))return!0;return!1}function ei(t){switch(t){case 9:case 11:case 12:case 32:case 160:case 5760:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8239:case 8287:case 12288:case 65279:return!0;default:return!1}}function _(t){return t?t.type==="JSXOpeningFragment"||t.type==="JSXClosingFragment":!1}function J(t){if(t.type==="JSXIdentifier")return t.name;if(t.type==="JSXNamespacedName")return t.namespace.name+":"+t.name.name;if(t.type==="JSXMemberExpression")return J(t.object)+"."+J(t.property);throw new Error("Node had unexpected type: "+t.type)}function ue(t,e){return(t?2:0)|(e?1:0)}function Rt(t,e){t.trailingComments===void 0?t.trailingComments=e:t.trailingComments.unshift(...e)}function ni(t,e){t.leadingComments===void 0?t.leadingComments=e:t.leadingComments.unshift(...e)}function X(t,e){t.innerComments===void 0?t.innerComments=e:t.innerComments.unshift(...e)}function q(t,e,s){let i=null,r=e.length;for(;i===null&&r>0;)i=e[--r];i===null||i.start>s.start?X(t,s.comments):Rt(i,s.comments)}function ht(t,e,s,i,r,a){let n=s,o=i,l=r,h="",u=null,d=s,{length:x}=e;for(;;){if(s>=x){a.unterminated(n,o,l),h+=e.slice(d,s);break}let A=e.charCodeAt(s);if(pi(t,A,e,s)){h+=e.slice(d,s);break}if(A===92){h+=e.slice(d,s);let I=ci(e,s,i,r,t==="template",a);I.ch===null&&!u?u={pos:s,lineStart:i,curLine:r}:h+=I.ch,{pos:s,lineStart:i,curLine:r}=I,d=s}else A===8232||A===8233?(++s,++r,i=s):A===10||A===13?t==="template"?(h+=e.slice(d,s)+`
2
2
  `,++s,A===13&&e.charCodeAt(s)===10&&++s,++r,d=i=s):a.unterminated(n,o,l):++s}return{pos:s,str:h,firstInvalidLoc:u,lineStart:i,curLine:r}}function pi(t,e,s,i){return t==="template"?e===96||e===36&&s.charCodeAt(i+1)===123:e===(t==="double"?34:39)}function ci(t,e,s,i,r,a){let n=!r;e++;let o=h=>({pos:e,ch:h,lineStart:s,curLine:i}),l=t.charCodeAt(e++);switch(l){case 110:return o(`
3
3
  `);case 114:return o("\r");case 120:{let h;return{code:h,pos:e}=De(t,e,s,i,2,!1,n,a),o(h===null?null:String.fromCharCode(h))}case 117:{let h;return{code:h,pos:e}=_t(t,e,s,i,n,a),o(h===null?null:String.fromCodePoint(h))}case 116:return o(" ");case 98:return o("\b");case 118:return o("\v");case 102:return o("\f");case 13:t.charCodeAt(e)===10&&++e;case 10:s=e,++i;case 8232:case 8233:return o("");case 56:case 57:if(r)return o(null);a.strictNumericEscape(e-1,s,i);default:if(l>=48&&l<=55){let h=e-1,u=/^[0-7]+/.exec(t.slice(h,e+2))[0],d=parseInt(u,8);d>255&&(u=u.slice(0,-1),d=parseInt(u,8)),e+=u.length-1;let x=t.charCodeAt(e);if(u!=="0"||x===56||x===57){if(r)return o(null);a.strictNumericEscape(h,s,i)}return o(String.fromCharCode(d))}return o(String.fromCharCode(l))}}function De(t,e,s,i,r,a,n,o){let l=e,h;return{n:h,pos:e}=jt(t,e,s,i,16,r,a,!1,o,!n),h===null&&(n?o.invalidEscapeSequence(l,s,i):e=l-1),{code:h,pos:e}}function jt(t,e,s,i,r,a,n,o,l,h){let u=e,d=r===16?ot.hex:ot.decBinOct,x=r===16?he.hex:r===10?he.dec:r===8?he.oct:he.bin,A=!1,I=0;for(let N=0,S=a??1/0;N<S;++N){let w=t.charCodeAt(e),v;if(w===95&&o!=="bail"){let Ae=t.charCodeAt(e-1),ge=t.charCodeAt(e+1);if(o){if(Number.isNaN(ge)||!x(ge)||d.has(Ae)||d.has(ge)){if(h)return{n:null,pos:e};l.unexpectedNumericSeparator(e,s,i)}}else{if(h)return{n:null,pos:e};l.numericSeparatorInEscapeSequence(e,s,i)}++e;continue}if(w>=97?v=w-97+10:w>=65?v=w-65+10:li(w)?v=w-48:v=1/0,v>=r){if(v<=9&&h)return{n:null,pos:e};if(v<=9&&l.invalidDigit(e,s,i,r))v=0;else if(n)v=0,A=!0;else break}++e,I=I*r+v}return e===u||a!=null&&e-u!==a||A?{n:null,pos:e}:{n:I,pos:e}}function _t(t,e,s,i,r,a){let n=t.charCodeAt(e),o;if(n===123){if(++e,{code:o,pos:e}=De(t,e,s,i,t.indexOf("}",e)-e,!0,r,a),++e,o!==null&&o>1114111)if(r)a.invalidCodePoint(e,s,i);else return{code:null,pos:e}}else({code:o,pos:e}=De(t,e,s,i,4,!1,r,a));return{code:o,pos:e}}function Z(t,e,s){return new z(s,t-e,t)}function Pi(){return new ye(3)}function Ai(){return new Vt(1)}function gi(){return new Vt(2)}function zt(){return new ye}function Ci(t){if(t==null)throw new Error(`Unexpected ${t} value.`);return t}function pt(t){if(!t)throw new Error("Assert fail")}function Si(t){switch(t){case"any":return"TSAnyKeyword";case"boolean":return"TSBooleanKeyword";case"bigint":return"TSBigIntKeyword";case"never":return"TSNeverKeyword";case"number":return"TSNumberKeyword";case"object":return"TSObjectKeyword";case"string":return"TSStringKeyword";case"symbol":return"TSSymbolKeyword";case"undefined":return"TSUndefinedKeyword";case"unknown":return"TSUnknownKeyword";default:return}}function ct(t){return t==="private"||t==="public"||t==="protected"}function wi(t){return t==="in"||t==="out"}function Me(t){if(t.extra?.parenthesized)return!1;switch(t.type){case"Identifier":return!0;case"MemberExpression":return!t.computed&&Me(t.object);case"TSInstantiationExpression":return Me(t.expression);default:return!1}}function Ni(t){if(t.type!=="MemberExpression")return!1;let{computed:e,property:s}=t;return e&&s.type!=="StringLiteral"&&(s.type!=="TemplateLiteral"||s.expressions.length>0)?!1:qt(t.object)}function ki(t,e){let{type:s}=t;if(t.extra?.parenthesized)return!1;if(e){if(s==="Literal"){let{value:i}=t;if(typeof i=="string"||typeof i=="boolean")return!0}}else if(s==="StringLiteral"||s==="BooleanLiteral")return!0;return!!(Ht(t,e)||vi(t,e)||s==="TemplateLiteral"&&t.expressions.length===0||Ni(t))}function Ht(t,e){return e?t.type==="Literal"&&(typeof t.value=="number"||"bigint"in t):t.type==="NumericLiteral"||t.type==="BigIntLiteral"}function vi(t,e){if(t.type==="UnaryExpression"){let{operator:s,argument:i}=t;if(s==="-"&&Ht(i,e))return!0}return!1}function qt(t){return t.type==="Identifier"?!0:t.type!=="MemberExpression"||t.computed?!1:qt(t.object)}function Li(t){if(t.has("decorators")){if(t.has("decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");let e=t.get("decorators").decoratorsBeforeExport;if(e!=null&&typeof e!="boolean")throw new Error("'decoratorsBeforeExport' must be a boolean, if specified.");let s=t.get("decorators").allowCallParenthesized;if(s!=null&&typeof s!="boolean")throw new Error("'allowCallParenthesized' must be a boolean.")}if(t.has("flow")&&t.has("typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(t.has("placeholders")&&t.has("v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(t.has("pipelineOperator")){let e=t.get("pipelineOperator").proposal;if(!dt.includes(e)){let s=dt.map(i=>`"${i}"`).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${s}.`)}if(e==="hack"){if(t.has("placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(t.has("v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");let s=t.get("pipelineOperator").topicToken;if(!mt.includes(s)){let i=mt.map(r=>`"${r}"`).join(", ");throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${i}.`)}}}if(t.has("moduleAttributes"))throw new Error("`moduleAttributes` has been removed in Babel 8, please migrate to import attributes instead.");if(t.has("importAssertions"))throw new Error("`importAssertions` has been removed in Babel 8, please use import attributes instead. To use the non-standard `assert` syntax you can enable the `deprecatedImportAssert` parser plugin.");if(!t.has("deprecatedImportAssert")&&t.has("importAttributes")&&t.get("importAttributes").deprecatedAssertSyntax)throw new Error("The 'importAttributes' plugin has been removed in Babel 8. If you need to enable support for the deprecated `assert` syntax, you can enable the `deprecatedImportAssert` parser plugin.");if(t.has("recordAndTuple"))throw new Error("The 'recordAndTuple' plugin has been removed in Babel 8. Please remove it from your configuration.");if(t.has("asyncDoExpressions")&&!t.has("doExpressions")){let e=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw e.missingPlugins="doExpressions",e}if(t.has("optionalChainingAssign")&&t.get("optionalChainingAssign").version!=="2023-07")throw new Error("The 'optionalChainingAssign' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is '2023-07'.");if(t.has("discardBinding")&&t.get("discardBinding").syntaxType!=="void")throw new Error("The 'discardBinding' plugin requires a 'syntaxType' option. Currently the only supported value is 'void'.");{if(t.has("decimal"))throw new Error("The 'decimal' plugin has been removed in Babel 8. Please remove it from your configuration.");if(t.has("importReflection"))throw new Error("The 'importReflection' plugin has been removed in Babel 8. Use 'sourcePhaseImports' instead, and replace 'import module' with 'import source' in your code.")}}function Ui(t,e,s){for(let i=0;i<t.length;i++){let r=t[i],{type:a}=r;typeof a=="number"&&(r.type=vt(a))}return t}function Jt(t,e){if(e?.sourceType==="unambiguous"){e=Object.assign({},e);try{e.sourceType="module";let s=se(e,t),i=s.parse();if(s.sawUnambiguousESM)return i;if(s.ambiguousScriptDifferentAst)try{return e.sourceType="script",se(e,t).parse()}catch{}else i.program.sourceType="script";return i}catch(s){try{return e.sourceType="script",se(e,t).parse()}catch{}throw s}}else return se(e,t).parse()}function Wt(t,e){let s=se(e,t);return s.options.strictMode&&(s.state.strict=!0),s.getExpression()}function _i(t){let e={};for(let s of Object.keys(t))e[s]=vt(t[s]);return e}function se(t,e){let s=Kt,i=new Map;if(t?.plugins){for(let r of t.plugins){let a,n;typeof r=="string"?a=r:[a,n]=r,i.has(a)||i.set(a,n||{})}Li(i),s=Vi(i)}return new s(t,e,i)}function Vi(t){let e=[];for(let r of Mi)t.has(r)&&e.push(r);let s=e.join("|"),i=ft.get(s);if(!i){i=Kt;for(let r of e)i=$t[r](i);ft.set(s,i)}return i}function xe(t){return(e,s,i)=>{let r=!!i?.backwards;if(s===!1)return!1;let{length:a}=e,n=s;for(;n>=0&&n<a;){let o=e.charAt(n);if(t instanceof RegExp){if(!t.test(o))return n}else if(!t.includes(o))return n;r?n--:n++}return n===-1||n===a?n:!1}}function qi(t,e){if(e===!1)return!1;if(t.charAt(e)==="/"&&t.charAt(e+1)==="*"){for(let s=e+2;s<t.length;++s)if(t.charAt(s)==="*"&&t.charAt(s+1)==="/")return s+2}return e}function Ki(t,e,s){let i=!!s?.backwards;if(e===!1)return!1;let r=t.charAt(e);if(i){if(t.charAt(e-1)==="\r"&&r===`
4
4
  `)return e-2;if(yt(r))return e-1}else{if(r==="\r"&&t.charAt(e+1)===`
package/dist/bootstrap.js CHANGED
@@ -1,3 +1,3 @@
1
- import{a as p}from"./chunk-2N4O33VM.js";import{a as e}from"./chunk-4KRT35A2.js";import"./chunk-3TNEIDOD.js";import{a as s}from"./chunk-6TORWTD7.js";import"./chunk-3YWUSKWF.js";import"./chunk-ZR76GGZ6.js";import"./chunk-EENHXSWU.js";import"./chunk-H4W4DFKK.js";import"./chunk-6M3ZYNGO.js";import"./chunk-QYR5VPQA.js";import"./chunk-ULQG3XQS.js";import"./chunk-IU2ZQ6TE.js";import"./chunk-PIBY5DDZ.js";import{e as m,g as t}from"./chunk-VPRTJUIN.js";t();var r=m(p(),1);import n from"fs";(0,r.createGlobalProxyAgent)({environmentVariableNamespace:"SHOPIFY_",forceGlobalAgent:!0,socketConnectionTimeout:6e4});process.on("uncaughtException",async o=>{try{let{FatalError:c}=await import("./error-OZALZZ3U.js");if(o instanceof c){let{renderFatalError:i}=await import("./ui-H62CMRLG.js");i(o)}else n.writeSync(process.stderr.fd,`${o.stack??o.message??o}
1
+ import{a as p}from"./chunk-GDHD3TGC.js";import"./chunk-T7KHS6RF.js";import{a as e}from"./chunk-H5C3QTOO.js";import{a as s}from"./chunk-TQUSREKP.js";import"./chunk-NNOSZ447.js";import"./chunk-773TIA5M.js";import"./chunk-T6CC5WUU.js";import"./chunk-UQWFDL3F.js";import"./chunk-I5A6BPCP.js";import"./chunk-CX5CC6P5.js";import"./chunk-ET2CGROE.js";import"./chunk-TOLPNBZK.js";import"./chunk-CRALWNNO.js";import{e as m,g as t}from"./chunk-VKWPEFWQ.js";t();var r=m(p(),1);import n from"fs";(0,r.createGlobalProxyAgent)({environmentVariableNamespace:"SHOPIFY_",forceGlobalAgent:!0,socketConnectionTimeout:6e4});process.on("uncaughtException",async o=>{try{let{FatalError:c}=await import("./error-66U2HJ37.js");if(o instanceof c){let{renderFatalError:i}=await import("./ui-QOGKADWB.js");i(o)}else n.writeSync(process.stderr.fd,`${o.stack??o.message??o}
2
2
  `)}catch{n.writeSync(process.stderr.fd,`${o.stack??o.message??o}
3
3
  `)}process.exit(1)});var f=["SIGINT","SIGTERM","SIGQUIT"];f.forEach(o=>{process.on(o,()=>{process.exit(1)})});var a=Number(process.env.SHOPIFY_CLI_COLUMNS);isNaN(a)||(process.stdout.columns=a);async function l({development:o}){await e({moduleURL:import.meta.url,development:o,lazyCommandLoader:s})}var S=l;export{S as default};
@@ -1 +1 @@
1
- import{a as vt}from"./chunk-NKQBEFPS.js";import{a as Ee,b as pe,c as ge,e as Ft}from"./chunk-PRVQAHWI.js";import{a as w,c as S,g}from"./chunk-VPRTJUIN.js";var xt=S((ai,Lt)=>{"use strict";g();var A=w("fs"),{Readable:ye}=w("stream"),v=w("path"),{promisify:V}=w("util"),$=Ft(),be=V(A.readdir),Se=V(A.stat),At=V(A.lstat),Re=V(A.realpath),Te="!",kt="READDIRP_RECURSIVE_ERROR",De=new Set(["ENOENT","EPERM","EACCES","ELOOP",kt]),X="files",Wt="directories",C="files_directories",x="all",It=[X,Wt,C,x],Pe=c=>De.has(c.code),[Nt,Fe]=process.versions.node.split(".").slice(0,2).map(c=>Number.parseInt(c,10)),ve=process.platform==="win32"&&(Nt>10||Nt===10&&Fe>=5),Ot=c=>{if(c!==void 0){if(typeof c=="function")return c;if(typeof c=="string"){let t=$(c.trim());return e=>t(e.basename)}if(Array.isArray(c)){let t=[],e=[];for(let s of c){let i=s.trim();i.charAt(0)===Te?e.push($(i.slice(1))):t.push($(i))}return e.length>0?t.length>0?s=>t.some(i=>i(s.basename))&&!e.some(i=>i(s.basename)):s=>!e.some(i=>i(s.basename)):s=>t.some(i=>i(s.basename))}}},M=class c extends ye{static get defaultOptions(){return{root:".",fileFilter:t=>!0,directoryFilter:t=>!0,type:X,lstat:!1,depth:2147483648,alwaysStat:!1}}constructor(t={}){super({objectMode:!0,autoDestroy:!0,highWaterMark:t.highWaterMark||4096});let e={...c.defaultOptions,...t},{root:s,type:i}=e;this._fileFilter=Ot(e.fileFilter),this._directoryFilter=Ot(e.directoryFilter);let o=e.lstat?At:Se;ve?this._stat=n=>o(n,{bigint:!0}):this._stat=o,this._maxDepth=e.depth,this._wantsDir=[Wt,C,x].includes(i),this._wantsFile=[X,C,x].includes(i),this._wantsEverything=i===x,this._root=v.resolve(s),this._isDirent="Dirent"in A&&!e.alwaysStat,this._statsProp=this._isDirent?"dirent":"stats",this._rdOptions={encoding:"utf8",withFileTypes:this._isDirent},this.parents=[this._exploreDir(s,1)],this.reading=!1,this.parent=void 0}async _read(t){if(!this.reading){this.reading=!0;try{for(;!this.destroyed&&t>0;){let{path:e,depth:s,files:i=[]}=this.parent||{};if(i.length>0){let o=i.splice(0,t).map(n=>this._formatEntry(n,e));for(let n of await Promise.all(o)){if(this.destroyed)return;let r=await this._getEntryType(n);r==="directory"&&this._directoryFilter(n)?(s<=this._maxDepth&&this.parents.push(this._exploreDir(n.fullPath,s+1)),this._wantsDir&&(this.push(n),t--)):(r==="file"||this._includeAsFile(n))&&this._fileFilter(n)&&this._wantsFile&&(this.push(n),t--)}}else{let o=this.parents.pop();if(!o){this.push(null);break}if(this.parent=await o,this.destroyed)return}}}catch(e){this.destroy(e)}finally{this.reading=!1}}}async _exploreDir(t,e){let s;try{s=await be(t,this._rdOptions)}catch(i){this._onError(i)}return{files:s,depth:e,path:t}}async _formatEntry(t,e){let s;try{let i=this._isDirent?t.name:t,o=v.resolve(v.join(e,i));s={path:v.relative(this._root,o),fullPath:o,basename:i},s[this._statsProp]=this._isDirent?t:await this._stat(o)}catch(i){this._onError(i)}return s}_onError(t){Pe(t)&&!this.destroyed?this.emit("warn",t):this.destroy(t)}async _getEntryType(t){let e=t&&t[this._statsProp];if(e){if(e.isFile())return"file";if(e.isDirectory())return"directory";if(e&&e.isSymbolicLink()){let s=t.fullPath;try{let i=await Re(s),o=await At(i);if(o.isFile())return"file";if(o.isDirectory()){let n=i.length;if(s.startsWith(i)&&s.substr(n,1)===v.sep){let r=new Error(`Circular symlink detected: "${s}" points to "${i}"`);return r.code=kt,this._onError(r)}return"directory"}}catch(i){this._onError(i)}}}}_includeAsFile(t){let e=t&&t[this._statsProp];return e&&this._wantsEverything&&!e.isDirectory()}},D=(c,t={})=>{let e=t.entryType||t.type;if(e==="both"&&(e=C),e&&(t.type=e),c){if(typeof c!="string")throw new TypeError("readdirp: root argument must be a string. Usage: readdirp(root, options)");if(e&&!It.includes(e))throw new Error(`readdirp: Invalid type passed. Use one of ${It.join(", ")}`)}else throw new Error("readdirp: root argument is required. Usage: readdirp(root, options)");return t.root=c,new M(t)},Ae=(c,t={})=>new Promise((e,s)=>{let i=[];D(c,t).on("data",o=>i.push(o)).on("end",()=>e(i)).on("error",o=>s(o))});D.promise=Ae;D.ReaddirpStream=M;D.default=D;Lt.exports=D});var Yt=S((Ht,Gt)=>{"use strict";g();Object.defineProperty(Ht,"__esModule",{value:!0});var Vt=Ft(),Ie=vt(),Ct="!",Ne={returnIndex:!1},Oe=c=>Array.isArray(c)?c:[c],ke=(c,t)=>{if(typeof c=="function")return c;if(typeof c=="string"){let e=Vt(c,t);return s=>c===s||e(s)}return c instanceof RegExp?e=>c.test(e):e=>!1},Mt=(c,t,e,s)=>{let i=Array.isArray(e),o=i?e[0]:e;if(!i&&typeof o!="string")throw new TypeError("anymatch: second argument must be a string: got "+Object.prototype.toString.call(o));let n=Ie(o,!1);for(let a=0;a<t.length;a++){let l=t[a];if(l(n))return s?-1:!1}let r=i&&[n].concat(e.slice(1));for(let a=0;a<c.length;a++){let l=c[a];if(i?l(...r):l(n))return s?a:!0}return s?-1:!1},Q=(c,t,e=Ne)=>{if(c==null)throw new TypeError("anymatch: specify first argument");let s=typeof e=="boolean"?{returnIndex:e}:e,i=s.returnIndex||!1,o=Oe(c),n=o.filter(a=>typeof a=="string"&&a.charAt(0)===Ct).map(a=>a.slice(1)).map(a=>Vt(a,s)),r=o.filter(a=>typeof a!="string"||typeof a=="string"&&a.charAt(0)!==Ct).map(a=>ke(a,s));return t==null?(a,l=!1)=>Mt(r,n,a,typeof l=="boolean"?l:!1):Mt(r,n,t,i)};Q.default=Q;Gt.exports=Q});var zt=S((li,We)=>{We.exports=["3dm","3ds","3g2","3gp","7z","a","aac","adp","afdesign","afphoto","afpub","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"]});var Ut=S((di,jt)=>{g();jt.exports=zt()});var Bt=S((ui,qt)=>{"use strict";g();var Le=w("path"),xe=Ut(),Ce=new Set(xe);qt.exports=c=>Ce.has(Le.extname(c).slice(1).toLowerCase())});var H=S(u=>{"use strict";g();var{sep:Me}=w("path"),{platform:J}=process,Ve=w("os");u.EV_ALL="all";u.EV_READY="ready";u.EV_ADD="add";u.EV_CHANGE="change";u.EV_ADD_DIR="addDir";u.EV_UNLINK="unlink";u.EV_UNLINK_DIR="unlinkDir";u.EV_RAW="raw";u.EV_ERROR="error";u.STR_DATA="data";u.STR_END="end";u.STR_CLOSE="close";u.FSEVENT_CREATED="created";u.FSEVENT_MODIFIED="modified";u.FSEVENT_DELETED="deleted";u.FSEVENT_MOVED="moved";u.FSEVENT_CLONED="cloned";u.FSEVENT_UNKNOWN="unknown";u.FSEVENT_FLAG_MUST_SCAN_SUBDIRS=1;u.FSEVENT_TYPE_FILE="file";u.FSEVENT_TYPE_DIRECTORY="directory";u.FSEVENT_TYPE_SYMLINK="symlink";u.KEY_LISTENERS="listeners";u.KEY_ERR="errHandlers";u.KEY_RAW="rawEmitters";u.HANDLER_KEYS=[u.KEY_LISTENERS,u.KEY_ERR,u.KEY_RAW];u.DOT_SLASH=`.${Me}`;u.BACK_SLASH_RE=/\\/g;u.DOUBLE_SLASH_RE=/\/\//;u.SLASH_OR_BACK_SLASH_RE=/[/\\]/;u.DOT_RE=/\..*\.(sw[px])$|~$|\.subl.*\.tmp/;u.REPLACER_RE=/^\.[/\\]/;u.SLASH="/";u.SLASH_SLASH="//";u.BRACE_START="{";u.BANG="!";u.ONE_DOT=".";u.TWO_DOTS="..";u.STAR="*";u.GLOBSTAR="**";u.ROOT_GLOBSTAR="/**/*";u.SLASH_GLOBSTAR="/**";u.DIR_SUFFIX="Dir";u.ANYMATCH_OPTS={dot:!0};u.STRING_TYPE="string";u.FUNCTION_TYPE="function";u.EMPTY_STR="";u.EMPTY_FN=()=>{};u.IDENTITY_FN=c=>c;u.isWindows=J==="win32";u.isMacos=J==="darwin";u.isLinux=J==="linux";u.isIBMi=Ve.type()==="OS400"});var Zt=S((Ei,Jt)=>{"use strict";g();var R=w("fs"),E=w("path"),{promisify:k}=w("util"),He=Bt(),{isWindows:Ge,isLinux:Ye,EMPTY_FN:ze,EMPTY_STR:je,KEY_LISTENERS:P,KEY_ERR:Z,KEY_RAW:I,HANDLER_KEYS:Ue,EV_CHANGE:Y,EV_ADD:G,EV_ADD_DIR:qe,EV_ERROR:$t,STR_DATA:Be,STR_END:Ke,BRACE_START:$e,STAR:Xe}=H(),Qe="watch",Je=k(R.open),Xt=k(R.stat),Ze=k(R.lstat),ts=k(R.close),tt=k(R.realpath),es={lstat:Ze,stat:Xt},st=(c,t)=>{c instanceof Set?c.forEach(t):t(c)},N=(c,t,e)=>{let s=c[t];s instanceof Set||(c[t]=s=new Set([s])),s.add(e)},ss=c=>t=>{let e=c[t];e instanceof Set?e.clear():delete c[t]},O=(c,t,e)=>{let s=c[t];s instanceof Set?s.delete(e):s===e&&delete c[t]},Qt=c=>c instanceof Set?c.size===0:!c,z=new Map;function Kt(c,t,e,s,i){let o=(n,r)=>{e(c),i(n,r,{watchedPath:c}),r&&c!==r&&j(E.resolve(c,r),P,E.join(c,r))};try{return R.watch(c,t,o)}catch(n){s(n)}}var j=(c,t,e,s,i)=>{let o=z.get(c);o&&st(o[t],n=>{n(e,s,i)})},is=(c,t,e,s)=>{let{listener:i,errHandler:o,rawEmitter:n}=s,r=z.get(t),a;if(!e.persistent)return a=Kt(c,e,i,o,n),a.close.bind(a);if(r)N(r,P,i),N(r,Z,o),N(r,I,n);else{if(a=Kt(c,e,j.bind(null,t,P),o,j.bind(null,t,I)),!a)return;a.on($t,async l=>{let d=j.bind(null,t,Z);if(r.watcherUnusable=!0,Ge&&l.code==="EPERM")try{let h=await Je(c,"r");await ts(h),d(l)}catch{}else d(l)}),r={listeners:i,errHandlers:o,rawEmitters:n,watcher:a},z.set(t,r)}return()=>{O(r,P,i),O(r,Z,o),O(r,I,n),Qt(r.listeners)&&(r.watcher.close(),z.delete(t),Ue.forEach(ss(r)),r.watcher=void 0,Object.freeze(r))}},et=new Map,rs=(c,t,e,s)=>{let{listener:i,rawEmitter:o}=s,n=et.get(t),r=new Set,a=new Set,l=n&&n.options;return l&&(l.persistent<e.persistent||l.interval>e.interval)&&(r=n.listeners,a=n.rawEmitters,R.unwatchFile(t),n=void 0),n?(N(n,P,i),N(n,I,o)):(n={listeners:i,rawEmitters:o,options:e,watcher:R.watchFile(t,e,(d,h)=>{st(n.rawEmitters,_=>{_(Y,t,{curr:d,prev:h})});let f=d.mtimeMs;(d.size!==h.size||f>h.mtimeMs||f===0)&&st(n.listeners,_=>_(c,d))})},et.set(t,n)),()=>{O(n,P,i),O(n,I,o),Qt(n.listeners)&&(et.delete(t),R.unwatchFile(t),n.options=n.watcher=void 0,Object.freeze(n))}},it=class{constructor(t){this.fsw=t,this._boundHandleError=e=>t._handleError(e)}_watchWithNodeFs(t,e){let s=this.fsw.options,i=E.dirname(t),o=E.basename(t);this.fsw._getWatchedDir(i).add(o);let r=E.resolve(t),a={persistent:s.persistent};e||(e=ze);let l;return s.usePolling?(a.interval=s.enableBinaryInterval&&He(o)?s.binaryInterval:s.interval,l=rs(t,r,a,{listener:e,rawEmitter:this.fsw._emitRaw})):l=is(t,r,a,{listener:e,errHandler:this._boundHandleError,rawEmitter:this.fsw._emitRaw}),l}_handleFile(t,e,s){if(this.fsw.closed)return;let i=E.dirname(t),o=E.basename(t),n=this.fsw._getWatchedDir(i),r=e;if(n.has(o))return;let a=async(d,h)=>{if(this.fsw._throttle(Qe,t,5)){if(!h||h.mtimeMs===0)try{let f=await Xt(t);if(this.fsw.closed)return;let _=f.atimeMs,y=f.mtimeMs;(!_||_<=y||y!==r.mtimeMs)&&this.fsw._emit(Y,t,f),Ye&&r.ino!==f.ino?(this.fsw._closeFile(d),r=f,this.fsw._addPathCloser(d,this._watchWithNodeFs(t,a))):r=f}catch{this.fsw._remove(i,o)}else if(n.has(o)){let f=h.atimeMs,_=h.mtimeMs;(!f||f<=_||_!==r.mtimeMs)&&this.fsw._emit(Y,t,h),r=h}}},l=this._watchWithNodeFs(t,a);if(!(s&&this.fsw.options.ignoreInitial)&&this.fsw._isntIgnored(t)){if(!this.fsw._throttle(G,t,0))return;this.fsw._emit(G,t,e)}return l}async _handleSymlink(t,e,s,i){if(this.fsw.closed)return;let o=t.fullPath,n=this.fsw._getWatchedDir(e);if(!this.fsw.options.followSymlinks){this.fsw._incrReadyCount();let r;try{r=await tt(s)}catch{return this.fsw._emitReady(),!0}return this.fsw.closed?void 0:(n.has(i)?this.fsw._symlinkPaths.get(o)!==r&&(this.fsw._symlinkPaths.set(o,r),this.fsw._emit(Y,s,t.stats)):(n.add(i),this.fsw._symlinkPaths.set(o,r),this.fsw._emit(G,s,t.stats)),this.fsw._emitReady(),!0)}if(this.fsw._symlinkPaths.has(o))return!0;this.fsw._symlinkPaths.set(o,!0)}_handleRead(t,e,s,i,o,n,r){if(t=E.join(t,je),!s.hasGlob&&(r=this.fsw._throttle("readdir",t,1e3),!r))return;let a=this.fsw._getWatchedDir(s.path),l=new Set,d=this.fsw._readdirp(t,{fileFilter:h=>s.filterPath(h),directoryFilter:h=>s.filterDir(h),depth:0}).on(Be,async h=>{if(this.fsw.closed){d=void 0;return}let f=h.path,_=E.join(t,f);if(l.add(f),!(h.stats.isSymbolicLink()&&await this._handleSymlink(h,t,_,f))){if(this.fsw.closed){d=void 0;return}(f===i||!i&&!a.has(f))&&(this.fsw._incrReadyCount(),_=E.join(o,E.relative(o,_)),this._addToNodeFs(_,e,s,n+1))}}).on($t,this._boundHandleError);return new Promise(h=>d.once(Ke,()=>{if(this.fsw.closed){d=void 0;return}let f=r?r.clear():!1;h(),a.getChildren().filter(_=>_!==t&&!l.has(_)&&(!s.hasGlob||s.filterPath({fullPath:E.resolve(t,_)}))).forEach(_=>{this.fsw._remove(t,_)}),d=void 0,f&&this._handleRead(t,!1,s,i,o,n,r)}))}async _handleDir(t,e,s,i,o,n,r){let a=this.fsw._getWatchedDir(E.dirname(t)),l=a.has(E.basename(t));!(s&&this.fsw.options.ignoreInitial)&&!o&&!l&&(!n.hasGlob||n.globFilter(t))&&this.fsw._emit(qe,t,e),a.add(E.basename(t)),this.fsw._getWatchedDir(t);let d,h,f=this.fsw.options.depth;if((f==null||i<=f)&&!this.fsw._symlinkPaths.has(r)){if(!o&&(await this._handleRead(t,s,n,o,t,i,d),this.fsw.closed))return;h=this._watchWithNodeFs(t,(_,y)=>{y&&y.mtimeMs===0||this._handleRead(_,!1,n,o,t,i,d)})}return h}async _addToNodeFs(t,e,s,i,o){let n=this.fsw._emitReady;if(this.fsw._isIgnored(t)||this.fsw.closed)return n(),!1;let r=this.fsw._getWatchHelpers(t,i);!r.hasGlob&&s&&(r.hasGlob=s.hasGlob,r.globFilter=s.globFilter,r.filterPath=a=>s.filterPath(a),r.filterDir=a=>s.filterDir(a));try{let a=await es[r.statMethod](r.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(r.watchPath,a))return n(),!1;let l=this.fsw.options.followSymlinks&&!t.includes(Xe)&&!t.includes($e),d;if(a.isDirectory()){let h=E.resolve(t),f=l?await tt(t):t;if(this.fsw.closed||(d=await this._handleDir(r.watchPath,a,e,i,o,r,f),this.fsw.closed))return;h!==f&&f!==void 0&&this.fsw._symlinkPaths.set(h,f)}else if(a.isSymbolicLink()){let h=l?await tt(t):t;if(this.fsw.closed)return;let f=E.dirname(r.watchPath);if(this.fsw._getWatchedDir(f).add(r.watchPath),this.fsw._emit(G,r.watchPath,a),d=await this._handleDir(f,a,e,i,t,r,h),this.fsw.closed)return;h!==void 0&&this.fsw._symlinkPaths.set(E.resolve(t),h)}else d=this._handleFile(r.watchPath,a,e);return n(),this.fsw._addPathCloser(t,d),!1}catch(a){if(this.fsw._handleError(a))return n(),t}}};Jt.exports=it});var oe=S((gi,dt)=>{"use strict";g();var ht=w("fs"),p=w("path"),{promisify:lt}=w("util"),F;try{F=w("fsevents")}catch(c){process.env.CHOKIDAR_PRINT_FSEVENTS_REQUIRE_ERROR&&console.error(c)}if(F){let c=process.version.match(/v(\d+)\.(\d+)/);if(c&&c[1]&&c[2]){let t=Number.parseInt(c[1],10),e=Number.parseInt(c[2],10);t===8&&e<16&&(F=void 0)}}var{EV_ADD:rt,EV_CHANGE:ns,EV_ADD_DIR:te,EV_UNLINK:U,EV_ERROR:os,STR_DATA:as,STR_END:cs,FSEVENT_CREATED:hs,FSEVENT_MODIFIED:ls,FSEVENT_DELETED:ds,FSEVENT_MOVED:fs,FSEVENT_UNKNOWN:us,FSEVENT_FLAG_MUST_SCAN_SUBDIRS:_s,FSEVENT_TYPE_FILE:ms,FSEVENT_TYPE_DIRECTORY:W,FSEVENT_TYPE_SYMLINK:ne,ROOT_GLOBSTAR:ee,DIR_SUFFIX:ws,DOT_SLASH:se,FUNCTION_TYPE:nt,EMPTY_FN:Es,IDENTITY_FN:ps}=H(),gs=c=>isNaN(c)?{}:{depth:c},at=lt(ht.stat),ys=lt(ht.lstat),ie=lt(ht.realpath),bs={stat:at,lstat:ys},T=new Map,Ss=10,Rs=new Set([69888,70400,71424,72704,73472,131328,131840,262912]),Ts=(c,t)=>({stop:F.watch(c,t)});function Ds(c,t,e,s){let i=p.extname(t)?p.dirname(t):t,o=p.dirname(i),n=T.get(i);Ps(o)&&(i=o);let r=p.resolve(c),a=r!==t,l=(h,f,_)=>{a&&(h=h.replace(t,r)),(h===r||!h.indexOf(r+p.sep))&&e(h,f,_)},d=!1;for(let h of T.keys())if(t.indexOf(p.resolve(h)+p.sep)===0){i=h,n=T.get(i),d=!0;break}return n||d?n.listeners.add(l):(n={listeners:new Set([l]),rawEmitter:s,watcher:Ts(i,(h,f)=>{if(!n.listeners.size||f&_s)return;let _=F.getInfo(h,f);n.listeners.forEach(y=>{y(h,f,_)}),n.rawEmitter(_.event,h,_)})},T.set(i,n)),()=>{let h=n.listeners;if(h.delete(l),!h.size&&(T.delete(i),n.watcher))return n.watcher.stop().then(()=>{n.rawEmitter=n.watcher=void 0,Object.freeze(n)})}}var Ps=c=>{let t=0;for(let e of T.keys())if(e.indexOf(c)===0&&(t++,t>=Ss))return!0;return!1},Fs=()=>F&&T.size<128,ot=(c,t)=>{let e=0;for(;!c.indexOf(t)&&(c=p.dirname(c))!==t;)e++;return e},re=(c,t)=>c.type===W&&t.isDirectory()||c.type===ne&&t.isSymbolicLink()||c.type===ms&&t.isFile(),ct=class{constructor(t){this.fsw=t}checkIgnored(t,e){let s=this.fsw._ignoredPaths;if(this.fsw._isIgnored(t,e))return s.add(t),e&&e.isDirectory()&&s.add(t+ee),!0;s.delete(t),s.delete(t+ee)}addOrChange(t,e,s,i,o,n,r,a){let l=o.has(n)?ns:rt;this.handleEvent(l,t,e,s,i,o,n,r,a)}async checkExists(t,e,s,i,o,n,r,a){try{let l=await at(t);if(this.fsw.closed)return;re(r,l)?this.addOrChange(t,e,s,i,o,n,r,a):this.handleEvent(U,t,e,s,i,o,n,r,a)}catch(l){l.code==="EACCES"?this.addOrChange(t,e,s,i,o,n,r,a):this.handleEvent(U,t,e,s,i,o,n,r,a)}}handleEvent(t,e,s,i,o,n,r,a,l){if(!(this.fsw.closed||this.checkIgnored(e)))if(t===U){let d=a.type===W;(d||n.has(r))&&this.fsw._remove(o,r,d)}else{if(t===rt){if(a.type===W&&this.fsw._getWatchedDir(e),a.type===ne&&l.followSymlinks){let h=l.depth===void 0?void 0:ot(s,i)+1;return this._addToFsEvents(e,!1,!0,h)}this.fsw._getWatchedDir(o).add(r)}let d=a.type===W?t+ws:t;this.fsw._emit(d,e),d===te&&this._addToFsEvents(e,!1,!0)}}_watchWithFsEvents(t,e,s,i){if(this.fsw.closed||this.fsw._isIgnored(t))return;let o=this.fsw.options,r=Ds(t,e,async(a,l,d)=>{if(this.fsw.closed||o.depth!==void 0&&ot(a,e)>o.depth)return;let h=s(p.join(t,p.relative(t,a)));if(i&&!i(h))return;let f=p.dirname(h),_=p.basename(h),y=this.fsw._getWatchedDir(d.type===W?h:f);if(Rs.has(l)||d.event===us)if(typeof o.ignored===nt){let K;try{K=await at(h)}catch{}if(this.fsw.closed||this.checkIgnored(h,K))return;re(d,K)?this.addOrChange(h,a,e,f,y,_,d,o):this.handleEvent(U,h,a,e,f,y,_,d,o)}else this.checkExists(h,a,e,f,y,_,d,o);else switch(d.event){case hs:case ls:return this.addOrChange(h,a,e,f,y,_,d,o);case ds:case fs:return this.checkExists(h,a,e,f,y,_,d,o)}},this.fsw._emitRaw);return this.fsw._emitReady(),r}async _handleFsEventsSymlink(t,e,s,i){if(!(this.fsw.closed||this.fsw._symlinkPaths.has(e))){this.fsw._symlinkPaths.set(e,!0),this.fsw._incrReadyCount();try{let o=await ie(t);if(this.fsw.closed)return;if(this.fsw._isIgnored(o))return this.fsw._emitReady();this.fsw._incrReadyCount(),this._addToFsEvents(o||t,n=>{let r=t;return o&&o!==se?r=n.replace(o,t):n!==se&&(r=p.join(t,n)),s(r)},!1,i)}catch(o){if(this.fsw._handleError(o))return this.fsw._emitReady()}}}emitAdd(t,e,s,i,o){let n=s(t),r=e.isDirectory(),a=this.fsw._getWatchedDir(p.dirname(n)),l=p.basename(n);r&&this.fsw._getWatchedDir(n),!a.has(l)&&(a.add(l),(!i.ignoreInitial||o===!0)&&this.fsw._emit(r?te:rt,n,e))}initWatch(t,e,s,i){if(this.fsw.closed)return;let o=this._watchWithFsEvents(s.watchPath,p.resolve(t||s.watchPath),i,s.globFilter);this.fsw._addPathCloser(e,o)}async _addToFsEvents(t,e,s,i){if(this.fsw.closed)return;let o=this.fsw.options,n=typeof e===nt?e:ps,r=this.fsw._getWatchHelpers(t);try{let a=await bs[r.statMethod](r.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(r.watchPath,a))throw null;if(a.isDirectory()){if(r.globFilter||this.emitAdd(n(t),a,n,o,s),i&&i>o.depth)return;this.fsw._readdirp(r.watchPath,{fileFilter:l=>r.filterPath(l),directoryFilter:l=>r.filterDir(l),...gs(o.depth-(i||0))}).on(as,l=>{if(this.fsw.closed||l.stats.isDirectory()&&!r.filterPath(l))return;let d=p.join(r.watchPath,l.path),{fullPath:h}=l;if(r.followSymlinks&&l.stats.isSymbolicLink()){let f=o.depth===void 0?void 0:ot(d,p.resolve(r.watchPath))+1;this._handleFsEventsSymlink(d,h,n,f)}else this.emitAdd(d,l.stats,n,o,s)}).on(os,Es).on(cs,()=>{this.fsw._emitReady()})}else this.emitAdd(r.watchPath,a,n,o,s),this.fsw._emitReady()}catch(a){(!a||this.fsw._handleError(a))&&(this.fsw._emitReady(),this.fsw._emitReady())}if(o.persistent&&s!==!0)if(typeof e===nt)this.initWatch(void 0,t,r,n);else{let a;try{a=await ie(r.watchPath)}catch{}this.initWatch(a,t,r,n)}}};dt.exports=ct;dt.exports.canUse=Fs});var ni=S(Pt=>{g();var{EventEmitter:vs}=w("events"),Tt=w("fs"),m=w("path"),{promisify:ue}=w("util"),As=xt(),Et=Yt().default,Is=pe(),ft=Ee(),Ns=ge(),Os=vt(),ks=Zt(),ae=oe(),{EV_ALL:ut,EV_READY:Ws,EV_ADD:q,EV_CHANGE:L,EV_UNLINK:ce,EV_ADD_DIR:Ls,EV_UNLINK_DIR:xs,EV_RAW:Cs,EV_ERROR:_t,STR_CLOSE:Ms,STR_END:Vs,BACK_SLASH_RE:Hs,DOUBLE_SLASH_RE:he,SLASH_OR_BACK_SLASH_RE:Gs,DOT_RE:Ys,REPLACER_RE:zs,SLASH:mt,SLASH_SLASH:js,BRACE_START:Us,BANG:pt,ONE_DOT:_e,TWO_DOTS:qs,GLOBSTAR:Bs,SLASH_GLOBSTAR:wt,ANYMATCH_OPTS:gt,STRING_TYPE:Dt,FUNCTION_TYPE:Ks,EMPTY_STR:yt,EMPTY_FN:$s,isWindows:Xs,isMacos:Qs,isIBMi:Js}=H(),Zs=ue(Tt.stat),ti=ue(Tt.readdir),bt=(c=[])=>Array.isArray(c)?c:[c],me=(c,t=[])=>(c.forEach(e=>{Array.isArray(e)?me(e,t):t.push(e)}),t),le=c=>{let t=me(bt(c));if(!t.every(e=>typeof e===Dt))throw new TypeError(`Non-string provided as watch path: ${t}`);return t.map(we)},de=c=>{let t=c.replace(Hs,mt),e=!1;for(t.startsWith(js)&&(e=!0);t.match(he);)t=t.replace(he,mt);return e&&(t=mt+t),t},we=c=>de(m.normalize(de(c))),fe=(c=yt)=>t=>typeof t!==Dt?t:we(m.isAbsolute(t)?t:m.join(c,t)),ei=(c,t)=>m.isAbsolute(c)?c:c.startsWith(pt)?pt+m.join(t,c.slice(1)):m.join(t,c),b=(c,t)=>c[t]===void 0,St=class{constructor(t,e){this.path=t,this._removeWatcher=e,this.items=new Set}add(t){let{items:e}=this;e&&t!==_e&&t!==qs&&e.add(t)}async remove(t){let{items:e}=this;if(!e||(e.delete(t),e.size>0))return;let s=this.path;try{await ti(s)}catch{this._removeWatcher&&this._removeWatcher(m.dirname(s),m.basename(s))}}has(t){let{items:e}=this;if(e)return e.has(t)}getChildren(){let{items:t}=this;if(t)return[...t.values()]}dispose(){this.items.clear(),delete this.path,delete this._removeWatcher,delete this.items,Object.freeze(this)}},si="stat",ii="lstat",Rt=class{constructor(t,e,s,i){this.fsw=i,this.path=t=t.replace(zs,yt),this.watchPath=e,this.fullWatchPath=m.resolve(e),this.hasGlob=e!==t,t===yt&&(this.hasGlob=!1),this.globSymlink=this.hasGlob&&s?void 0:!1,this.globFilter=this.hasGlob?Et(t,void 0,gt):!1,this.dirParts=this.getDirParts(t),this.dirParts.forEach(o=>{o.length>1&&o.pop()}),this.followSymlinks=s,this.statMethod=s?si:ii}checkGlobSymlink(t){return this.globSymlink===void 0&&(this.globSymlink=t.fullParentDir===this.fullWatchPath?!1:{realPath:t.fullParentDir,linkPath:this.fullWatchPath}),this.globSymlink?t.fullPath.replace(this.globSymlink.realPath,this.globSymlink.linkPath):t.fullPath}entryPath(t){return m.join(this.watchPath,m.relative(this.watchPath,this.checkGlobSymlink(t)))}filterPath(t){let{stats:e}=t;if(e&&e.isSymbolicLink())return this.filterDir(t);let s=this.entryPath(t);return(this.hasGlob&&typeof this.globFilter===Ks?this.globFilter(s):!0)&&this.fsw._isntIgnored(s,e)&&this.fsw._hasReadPermissions(e)}getDirParts(t){if(!this.hasGlob)return[];let e=[];return(t.includes(Us)?Ns.expand(t):[t]).forEach(i=>{e.push(m.relative(this.watchPath,i).split(Gs))}),e}filterDir(t){if(this.hasGlob){let e=this.getDirParts(this.checkGlobSymlink(t)),s=!1;this.unmatchedGlob=!this.dirParts.some(i=>i.every((o,n)=>(o===Bs&&(s=!0),s||!e[0][n]||Et(o,e[0][n],gt))))}return!this.unmatchedGlob&&this.fsw._isntIgnored(this.entryPath(t),t.stats)}},B=class extends vs{constructor(t){super();let e={};t&&Object.assign(e,t),this._watched=new Map,this._closers=new Map,this._ignoredPaths=new Set,this._throttled=new Map,this._symlinkPaths=new Map,this._streams=new Set,this.closed=!1,b(e,"persistent")&&(e.persistent=!0),b(e,"ignoreInitial")&&(e.ignoreInitial=!1),b(e,"ignorePermissionErrors")&&(e.ignorePermissionErrors=!1),b(e,"interval")&&(e.interval=100),b(e,"binaryInterval")&&(e.binaryInterval=300),b(e,"disableGlobbing")&&(e.disableGlobbing=!1),e.enableBinaryInterval=e.binaryInterval!==e.interval,b(e,"useFsEvents")&&(e.useFsEvents=!e.usePolling),ae.canUse()||(e.useFsEvents=!1),b(e,"usePolling")&&!e.useFsEvents&&(e.usePolling=Qs),Js&&(e.usePolling=!0);let i=process.env.CHOKIDAR_USEPOLLING;if(i!==void 0){let a=i.toLowerCase();a==="false"||a==="0"?e.usePolling=!1:a==="true"||a==="1"?e.usePolling=!0:e.usePolling=!!a}let o=process.env.CHOKIDAR_INTERVAL;o&&(e.interval=Number.parseInt(o,10)),b(e,"atomic")&&(e.atomic=!e.usePolling&&!e.useFsEvents),e.atomic&&(this._pendingUnlinks=new Map),b(e,"followSymlinks")&&(e.followSymlinks=!0),b(e,"awaitWriteFinish")&&(e.awaitWriteFinish=!1),e.awaitWriteFinish===!0&&(e.awaitWriteFinish={});let n=e.awaitWriteFinish;n&&(n.stabilityThreshold||(n.stabilityThreshold=2e3),n.pollInterval||(n.pollInterval=100),this._pendingWrites=new Map),e.ignored&&(e.ignored=bt(e.ignored));let r=0;this._emitReady=()=>{r++,r>=this._readyCount&&(this._emitReady=$s,this._readyEmitted=!0,process.nextTick(()=>this.emit(Ws)))},this._emitRaw=(...a)=>this.emit(Cs,...a),this._readyEmitted=!1,this.options=e,e.useFsEvents?this._fsEventsHandler=new ae(this):this._nodeFsHandler=new ks(this),Object.freeze(e)}add(t,e,s){let{cwd:i,disableGlobbing:o}=this.options;this.closed=!1;let n=le(t);return i&&(n=n.map(r=>{let a=ei(r,i);return o||!ft(r)?a:Os(a)})),n=n.filter(r=>r.startsWith(pt)?(this._ignoredPaths.add(r.slice(1)),!1):(this._ignoredPaths.delete(r),this._ignoredPaths.delete(r+wt),this._userIgnored=void 0,!0)),this.options.useFsEvents&&this._fsEventsHandler?(this._readyCount||(this._readyCount=n.length),this.options.persistent&&(this._readyCount+=n.length),n.forEach(r=>this._fsEventsHandler._addToFsEvents(r))):(this._readyCount||(this._readyCount=0),this._readyCount+=n.length,Promise.all(n.map(async r=>{let a=await this._nodeFsHandler._addToNodeFs(r,!s,0,0,e);return a&&this._emitReady(),a})).then(r=>{this.closed||r.filter(a=>a).forEach(a=>{this.add(m.dirname(a),m.basename(e||a))})})),this}unwatch(t){if(this.closed)return this;let e=le(t),{cwd:s}=this.options;return e.forEach(i=>{!m.isAbsolute(i)&&!this._closers.has(i)&&(s&&(i=m.join(s,i)),i=m.resolve(i)),this._closePath(i),this._ignoredPaths.add(i),this._watched.has(i)&&this._ignoredPaths.add(i+wt),this._userIgnored=void 0}),this}close(){if(this.closed)return this._closePromise;this.closed=!0,this.removeAllListeners();let t=[];return this._closers.forEach(e=>e.forEach(s=>{let i=s();i instanceof Promise&&t.push(i)})),this._streams.forEach(e=>e.destroy()),this._userIgnored=void 0,this._readyCount=0,this._readyEmitted=!1,this._watched.forEach(e=>e.dispose()),["closers","watched","streams","symlinkPaths","throttled"].forEach(e=>{this[`_${e}`].clear()}),this._closePromise=t.length?Promise.all(t).then(()=>{}):Promise.resolve(),this._closePromise}getWatched(){let t={};return this._watched.forEach((e,s)=>{let i=this.options.cwd?m.relative(this.options.cwd,s):s;t[i||_e]=e.getChildren().sort()}),t}emitWithAll(t,e){this.emit(...e),t!==_t&&this.emit(ut,...e)}async _emit(t,e,s,i,o){if(this.closed)return;let n=this.options;Xs&&(e=m.normalize(e)),n.cwd&&(e=m.relative(n.cwd,e));let r=[t,e];o!==void 0?r.push(s,i,o):i!==void 0?r.push(s,i):s!==void 0&&r.push(s);let a=n.awaitWriteFinish,l;if(a&&(l=this._pendingWrites.get(e)))return l.lastChange=new Date,this;if(n.atomic){if(t===ce)return this._pendingUnlinks.set(e,r),setTimeout(()=>{this._pendingUnlinks.forEach((d,h)=>{this.emit(...d),this.emit(ut,...d),this._pendingUnlinks.delete(h)})},typeof n.atomic=="number"?n.atomic:100),this;t===q&&this._pendingUnlinks.has(e)&&(t=r[0]=L,this._pendingUnlinks.delete(e))}if(a&&(t===q||t===L)&&this._readyEmitted){let d=(h,f)=>{h?(t=r[0]=_t,r[1]=h,this.emitWithAll(t,r)):f&&(r.length>2?r[2]=f:r.push(f),this.emitWithAll(t,r))};return this._awaitWriteFinish(e,a.stabilityThreshold,t,d),this}if(t===L&&!this._throttle(L,e,50))return this;if(n.alwaysStat&&s===void 0&&(t===q||t===Ls||t===L)){let d=n.cwd?m.join(n.cwd,e):e,h;try{h=await Zs(d)}catch{}if(!h||this.closed)return;r.push(h)}return this.emitWithAll(t,r),this}_handleError(t){let e=t&&t.code;return t&&e!=="ENOENT"&&e!=="ENOTDIR"&&(!this.options.ignorePermissionErrors||e!=="EPERM"&&e!=="EACCES")&&this.emit(_t,t),t||this.closed}_throttle(t,e,s){this._throttled.has(t)||this._throttled.set(t,new Map);let i=this._throttled.get(t),o=i.get(e);if(o)return o.count++,!1;let n,r=()=>{let l=i.get(e),d=l?l.count:0;return i.delete(e),clearTimeout(n),l&&clearTimeout(l.timeoutObject),d};n=setTimeout(r,s);let a={timeoutObject:n,clear:r,count:0};return i.set(e,a),a}_incrReadyCount(){return this._readyCount++}_awaitWriteFinish(t,e,s,i){let o,n=t;this.options.cwd&&!m.isAbsolute(t)&&(n=m.join(this.options.cwd,t));let r=new Date,a=l=>{Tt.stat(n,(d,h)=>{if(d||!this._pendingWrites.has(t)){d&&d.code!=="ENOENT"&&i(d);return}let f=Number(new Date);l&&h.size!==l.size&&(this._pendingWrites.get(t).lastChange=f);let _=this._pendingWrites.get(t);f-_.lastChange>=e?(this._pendingWrites.delete(t),i(void 0,h)):o=setTimeout(a,this.options.awaitWriteFinish.pollInterval,h)})};this._pendingWrites.has(t)||(this._pendingWrites.set(t,{lastChange:r,cancelWait:()=>(this._pendingWrites.delete(t),clearTimeout(o),s)}),o=setTimeout(a,this.options.awaitWriteFinish.pollInterval))}_getGlobIgnored(){return[...this._ignoredPaths.values()]}_isIgnored(t,e){if(this.options.atomic&&Ys.test(t))return!0;if(!this._userIgnored){let{cwd:s}=this.options,i=this.options.ignored,o=i&&i.map(fe(s)),n=bt(o).filter(a=>typeof a===Dt&&!ft(a)).map(a=>a+wt),r=this._getGlobIgnored().map(fe(s)).concat(o,n);this._userIgnored=Et(r,void 0,gt)}return this._userIgnored([t,e])}_isntIgnored(t,e){return!this._isIgnored(t,e)}_getWatchHelpers(t,e){let s=e||this.options.disableGlobbing||!ft(t)?t:Is(t),i=this.options.followSymlinks;return new Rt(t,s,i,this)}_getWatchedDir(t){this._boundRemove||(this._boundRemove=this._remove.bind(this));let e=m.resolve(t);return this._watched.has(e)||this._watched.set(e,new St(e,this._boundRemove)),this._watched.get(e)}_hasReadPermissions(t){if(this.options.ignorePermissionErrors)return!0;let s=(t&&Number.parseInt(t.mode,10))&511;return!!(4&Number.parseInt(s.toString(8)[0],10))}_remove(t,e,s){let i=m.join(t,e),o=m.resolve(i);if(s=s??(this._watched.has(i)||this._watched.has(o)),!this._throttle("remove",i,100))return;!s&&!this.options.useFsEvents&&this._watched.size===1&&this.add(t,e,!0),this._getWatchedDir(i).getChildren().forEach(f=>this._remove(i,f));let a=this._getWatchedDir(t),l=a.has(e);a.remove(e),this._symlinkPaths.has(o)&&this._symlinkPaths.delete(o);let d=i;if(this.options.cwd&&(d=m.relative(this.options.cwd,i)),this.options.awaitWriteFinish&&this._pendingWrites.has(d)&&this._pendingWrites.get(d).cancelWait()===q)return;this._watched.delete(i),this._watched.delete(o);let h=s?xs:ce;l&&!this._isIgnored(i)&&this._emit(h,i),this.options.useFsEvents||this._closePath(i)}_closePath(t){this._closeFile(t);let e=m.dirname(t);this._getWatchedDir(e).remove(m.basename(t))}_closeFile(t){let e=this._closers.get(t);e&&(e.forEach(s=>s()),this._closers.delete(t))}_addPathCloser(t,e){if(!e)return;let s=this._closers.get(t);s||(s=[],this._closers.set(t,s)),s.push(e)}_readdirp(t,e){if(this.closed)return;let s={type:ut,alwaysStat:!0,lstat:!0,...e},i=As(t,s);return this._streams.add(i),i.once(Ms,()=>{i=void 0}),i.once(Vs,()=>{i&&(this._streams.delete(i),i=void 0)}),i}};Pt.FSWatcher=B;var ri=(c,t)=>{let e=new B(t);return e.add(c),e};Pt.watch=ri});export default ni();
1
+ import{a as vt}from"./chunk-ZI7LK3LW.js";import{a as Ee,b as pe,c as ge,e as Ft}from"./chunk-2O22LZKV.js";import{a as w,c as S,g}from"./chunk-VKWPEFWQ.js";var xt=S((ai,Lt)=>{"use strict";g();var A=w("fs"),{Readable:ye}=w("stream"),v=w("path"),{promisify:V}=w("util"),$=Ft(),be=V(A.readdir),Se=V(A.stat),At=V(A.lstat),Re=V(A.realpath),Te="!",kt="READDIRP_RECURSIVE_ERROR",De=new Set(["ENOENT","EPERM","EACCES","ELOOP",kt]),X="files",Wt="directories",C="files_directories",x="all",It=[X,Wt,C,x],Pe=c=>De.has(c.code),[Nt,Fe]=process.versions.node.split(".").slice(0,2).map(c=>Number.parseInt(c,10)),ve=process.platform==="win32"&&(Nt>10||Nt===10&&Fe>=5),Ot=c=>{if(c!==void 0){if(typeof c=="function")return c;if(typeof c=="string"){let t=$(c.trim());return e=>t(e.basename)}if(Array.isArray(c)){let t=[],e=[];for(let s of c){let i=s.trim();i.charAt(0)===Te?e.push($(i.slice(1))):t.push($(i))}return e.length>0?t.length>0?s=>t.some(i=>i(s.basename))&&!e.some(i=>i(s.basename)):s=>!e.some(i=>i(s.basename)):s=>t.some(i=>i(s.basename))}}},M=class c extends ye{static get defaultOptions(){return{root:".",fileFilter:t=>!0,directoryFilter:t=>!0,type:X,lstat:!1,depth:2147483648,alwaysStat:!1}}constructor(t={}){super({objectMode:!0,autoDestroy:!0,highWaterMark:t.highWaterMark||4096});let e={...c.defaultOptions,...t},{root:s,type:i}=e;this._fileFilter=Ot(e.fileFilter),this._directoryFilter=Ot(e.directoryFilter);let o=e.lstat?At:Se;ve?this._stat=n=>o(n,{bigint:!0}):this._stat=o,this._maxDepth=e.depth,this._wantsDir=[Wt,C,x].includes(i),this._wantsFile=[X,C,x].includes(i),this._wantsEverything=i===x,this._root=v.resolve(s),this._isDirent="Dirent"in A&&!e.alwaysStat,this._statsProp=this._isDirent?"dirent":"stats",this._rdOptions={encoding:"utf8",withFileTypes:this._isDirent},this.parents=[this._exploreDir(s,1)],this.reading=!1,this.parent=void 0}async _read(t){if(!this.reading){this.reading=!0;try{for(;!this.destroyed&&t>0;){let{path:e,depth:s,files:i=[]}=this.parent||{};if(i.length>0){let o=i.splice(0,t).map(n=>this._formatEntry(n,e));for(let n of await Promise.all(o)){if(this.destroyed)return;let r=await this._getEntryType(n);r==="directory"&&this._directoryFilter(n)?(s<=this._maxDepth&&this.parents.push(this._exploreDir(n.fullPath,s+1)),this._wantsDir&&(this.push(n),t--)):(r==="file"||this._includeAsFile(n))&&this._fileFilter(n)&&this._wantsFile&&(this.push(n),t--)}}else{let o=this.parents.pop();if(!o){this.push(null);break}if(this.parent=await o,this.destroyed)return}}}catch(e){this.destroy(e)}finally{this.reading=!1}}}async _exploreDir(t,e){let s;try{s=await be(t,this._rdOptions)}catch(i){this._onError(i)}return{files:s,depth:e,path:t}}async _formatEntry(t,e){let s;try{let i=this._isDirent?t.name:t,o=v.resolve(v.join(e,i));s={path:v.relative(this._root,o),fullPath:o,basename:i},s[this._statsProp]=this._isDirent?t:await this._stat(o)}catch(i){this._onError(i)}return s}_onError(t){Pe(t)&&!this.destroyed?this.emit("warn",t):this.destroy(t)}async _getEntryType(t){let e=t&&t[this._statsProp];if(e){if(e.isFile())return"file";if(e.isDirectory())return"directory";if(e&&e.isSymbolicLink()){let s=t.fullPath;try{let i=await Re(s),o=await At(i);if(o.isFile())return"file";if(o.isDirectory()){let n=i.length;if(s.startsWith(i)&&s.substr(n,1)===v.sep){let r=new Error(`Circular symlink detected: "${s}" points to "${i}"`);return r.code=kt,this._onError(r)}return"directory"}}catch(i){this._onError(i)}}}}_includeAsFile(t){let e=t&&t[this._statsProp];return e&&this._wantsEverything&&!e.isDirectory()}},D=(c,t={})=>{let e=t.entryType||t.type;if(e==="both"&&(e=C),e&&(t.type=e),c){if(typeof c!="string")throw new TypeError("readdirp: root argument must be a string. Usage: readdirp(root, options)");if(e&&!It.includes(e))throw new Error(`readdirp: Invalid type passed. Use one of ${It.join(", ")}`)}else throw new Error("readdirp: root argument is required. Usage: readdirp(root, options)");return t.root=c,new M(t)},Ae=(c,t={})=>new Promise((e,s)=>{let i=[];D(c,t).on("data",o=>i.push(o)).on("end",()=>e(i)).on("error",o=>s(o))});D.promise=Ae;D.ReaddirpStream=M;D.default=D;Lt.exports=D});var Yt=S((Ht,Gt)=>{"use strict";g();Object.defineProperty(Ht,"__esModule",{value:!0});var Vt=Ft(),Ie=vt(),Ct="!",Ne={returnIndex:!1},Oe=c=>Array.isArray(c)?c:[c],ke=(c,t)=>{if(typeof c=="function")return c;if(typeof c=="string"){let e=Vt(c,t);return s=>c===s||e(s)}return c instanceof RegExp?e=>c.test(e):e=>!1},Mt=(c,t,e,s)=>{let i=Array.isArray(e),o=i?e[0]:e;if(!i&&typeof o!="string")throw new TypeError("anymatch: second argument must be a string: got "+Object.prototype.toString.call(o));let n=Ie(o,!1);for(let a=0;a<t.length;a++){let l=t[a];if(l(n))return s?-1:!1}let r=i&&[n].concat(e.slice(1));for(let a=0;a<c.length;a++){let l=c[a];if(i?l(...r):l(n))return s?a:!0}return s?-1:!1},Q=(c,t,e=Ne)=>{if(c==null)throw new TypeError("anymatch: specify first argument");let s=typeof e=="boolean"?{returnIndex:e}:e,i=s.returnIndex||!1,o=Oe(c),n=o.filter(a=>typeof a=="string"&&a.charAt(0)===Ct).map(a=>a.slice(1)).map(a=>Vt(a,s)),r=o.filter(a=>typeof a!="string"||typeof a=="string"&&a.charAt(0)!==Ct).map(a=>ke(a,s));return t==null?(a,l=!1)=>Mt(r,n,a,typeof l=="boolean"?l:!1):Mt(r,n,t,i)};Q.default=Q;Gt.exports=Q});var zt=S((li,We)=>{We.exports=["3dm","3ds","3g2","3gp","7z","a","aac","adp","afdesign","afphoto","afpub","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"]});var Ut=S((di,jt)=>{g();jt.exports=zt()});var Bt=S((ui,qt)=>{"use strict";g();var Le=w("path"),xe=Ut(),Ce=new Set(xe);qt.exports=c=>Ce.has(Le.extname(c).slice(1).toLowerCase())});var H=S(u=>{"use strict";g();var{sep:Me}=w("path"),{platform:J}=process,Ve=w("os");u.EV_ALL="all";u.EV_READY="ready";u.EV_ADD="add";u.EV_CHANGE="change";u.EV_ADD_DIR="addDir";u.EV_UNLINK="unlink";u.EV_UNLINK_DIR="unlinkDir";u.EV_RAW="raw";u.EV_ERROR="error";u.STR_DATA="data";u.STR_END="end";u.STR_CLOSE="close";u.FSEVENT_CREATED="created";u.FSEVENT_MODIFIED="modified";u.FSEVENT_DELETED="deleted";u.FSEVENT_MOVED="moved";u.FSEVENT_CLONED="cloned";u.FSEVENT_UNKNOWN="unknown";u.FSEVENT_FLAG_MUST_SCAN_SUBDIRS=1;u.FSEVENT_TYPE_FILE="file";u.FSEVENT_TYPE_DIRECTORY="directory";u.FSEVENT_TYPE_SYMLINK="symlink";u.KEY_LISTENERS="listeners";u.KEY_ERR="errHandlers";u.KEY_RAW="rawEmitters";u.HANDLER_KEYS=[u.KEY_LISTENERS,u.KEY_ERR,u.KEY_RAW];u.DOT_SLASH=`.${Me}`;u.BACK_SLASH_RE=/\\/g;u.DOUBLE_SLASH_RE=/\/\//;u.SLASH_OR_BACK_SLASH_RE=/[/\\]/;u.DOT_RE=/\..*\.(sw[px])$|~$|\.subl.*\.tmp/;u.REPLACER_RE=/^\.[/\\]/;u.SLASH="/";u.SLASH_SLASH="//";u.BRACE_START="{";u.BANG="!";u.ONE_DOT=".";u.TWO_DOTS="..";u.STAR="*";u.GLOBSTAR="**";u.ROOT_GLOBSTAR="/**/*";u.SLASH_GLOBSTAR="/**";u.DIR_SUFFIX="Dir";u.ANYMATCH_OPTS={dot:!0};u.STRING_TYPE="string";u.FUNCTION_TYPE="function";u.EMPTY_STR="";u.EMPTY_FN=()=>{};u.IDENTITY_FN=c=>c;u.isWindows=J==="win32";u.isMacos=J==="darwin";u.isLinux=J==="linux";u.isIBMi=Ve.type()==="OS400"});var Zt=S((Ei,Jt)=>{"use strict";g();var R=w("fs"),E=w("path"),{promisify:k}=w("util"),He=Bt(),{isWindows:Ge,isLinux:Ye,EMPTY_FN:ze,EMPTY_STR:je,KEY_LISTENERS:P,KEY_ERR:Z,KEY_RAW:I,HANDLER_KEYS:Ue,EV_CHANGE:Y,EV_ADD:G,EV_ADD_DIR:qe,EV_ERROR:$t,STR_DATA:Be,STR_END:Ke,BRACE_START:$e,STAR:Xe}=H(),Qe="watch",Je=k(R.open),Xt=k(R.stat),Ze=k(R.lstat),ts=k(R.close),tt=k(R.realpath),es={lstat:Ze,stat:Xt},st=(c,t)=>{c instanceof Set?c.forEach(t):t(c)},N=(c,t,e)=>{let s=c[t];s instanceof Set||(c[t]=s=new Set([s])),s.add(e)},ss=c=>t=>{let e=c[t];e instanceof Set?e.clear():delete c[t]},O=(c,t,e)=>{let s=c[t];s instanceof Set?s.delete(e):s===e&&delete c[t]},Qt=c=>c instanceof Set?c.size===0:!c,z=new Map;function Kt(c,t,e,s,i){let o=(n,r)=>{e(c),i(n,r,{watchedPath:c}),r&&c!==r&&j(E.resolve(c,r),P,E.join(c,r))};try{return R.watch(c,t,o)}catch(n){s(n)}}var j=(c,t,e,s,i)=>{let o=z.get(c);o&&st(o[t],n=>{n(e,s,i)})},is=(c,t,e,s)=>{let{listener:i,errHandler:o,rawEmitter:n}=s,r=z.get(t),a;if(!e.persistent)return a=Kt(c,e,i,o,n),a.close.bind(a);if(r)N(r,P,i),N(r,Z,o),N(r,I,n);else{if(a=Kt(c,e,j.bind(null,t,P),o,j.bind(null,t,I)),!a)return;a.on($t,async l=>{let d=j.bind(null,t,Z);if(r.watcherUnusable=!0,Ge&&l.code==="EPERM")try{let h=await Je(c,"r");await ts(h),d(l)}catch{}else d(l)}),r={listeners:i,errHandlers:o,rawEmitters:n,watcher:a},z.set(t,r)}return()=>{O(r,P,i),O(r,Z,o),O(r,I,n),Qt(r.listeners)&&(r.watcher.close(),z.delete(t),Ue.forEach(ss(r)),r.watcher=void 0,Object.freeze(r))}},et=new Map,rs=(c,t,e,s)=>{let{listener:i,rawEmitter:o}=s,n=et.get(t),r=new Set,a=new Set,l=n&&n.options;return l&&(l.persistent<e.persistent||l.interval>e.interval)&&(r=n.listeners,a=n.rawEmitters,R.unwatchFile(t),n=void 0),n?(N(n,P,i),N(n,I,o)):(n={listeners:i,rawEmitters:o,options:e,watcher:R.watchFile(t,e,(d,h)=>{st(n.rawEmitters,_=>{_(Y,t,{curr:d,prev:h})});let f=d.mtimeMs;(d.size!==h.size||f>h.mtimeMs||f===0)&&st(n.listeners,_=>_(c,d))})},et.set(t,n)),()=>{O(n,P,i),O(n,I,o),Qt(n.listeners)&&(et.delete(t),R.unwatchFile(t),n.options=n.watcher=void 0,Object.freeze(n))}},it=class{constructor(t){this.fsw=t,this._boundHandleError=e=>t._handleError(e)}_watchWithNodeFs(t,e){let s=this.fsw.options,i=E.dirname(t),o=E.basename(t);this.fsw._getWatchedDir(i).add(o);let r=E.resolve(t),a={persistent:s.persistent};e||(e=ze);let l;return s.usePolling?(a.interval=s.enableBinaryInterval&&He(o)?s.binaryInterval:s.interval,l=rs(t,r,a,{listener:e,rawEmitter:this.fsw._emitRaw})):l=is(t,r,a,{listener:e,errHandler:this._boundHandleError,rawEmitter:this.fsw._emitRaw}),l}_handleFile(t,e,s){if(this.fsw.closed)return;let i=E.dirname(t),o=E.basename(t),n=this.fsw._getWatchedDir(i),r=e;if(n.has(o))return;let a=async(d,h)=>{if(this.fsw._throttle(Qe,t,5)){if(!h||h.mtimeMs===0)try{let f=await Xt(t);if(this.fsw.closed)return;let _=f.atimeMs,y=f.mtimeMs;(!_||_<=y||y!==r.mtimeMs)&&this.fsw._emit(Y,t,f),Ye&&r.ino!==f.ino?(this.fsw._closeFile(d),r=f,this.fsw._addPathCloser(d,this._watchWithNodeFs(t,a))):r=f}catch{this.fsw._remove(i,o)}else if(n.has(o)){let f=h.atimeMs,_=h.mtimeMs;(!f||f<=_||_!==r.mtimeMs)&&this.fsw._emit(Y,t,h),r=h}}},l=this._watchWithNodeFs(t,a);if(!(s&&this.fsw.options.ignoreInitial)&&this.fsw._isntIgnored(t)){if(!this.fsw._throttle(G,t,0))return;this.fsw._emit(G,t,e)}return l}async _handleSymlink(t,e,s,i){if(this.fsw.closed)return;let o=t.fullPath,n=this.fsw._getWatchedDir(e);if(!this.fsw.options.followSymlinks){this.fsw._incrReadyCount();let r;try{r=await tt(s)}catch{return this.fsw._emitReady(),!0}return this.fsw.closed?void 0:(n.has(i)?this.fsw._symlinkPaths.get(o)!==r&&(this.fsw._symlinkPaths.set(o,r),this.fsw._emit(Y,s,t.stats)):(n.add(i),this.fsw._symlinkPaths.set(o,r),this.fsw._emit(G,s,t.stats)),this.fsw._emitReady(),!0)}if(this.fsw._symlinkPaths.has(o))return!0;this.fsw._symlinkPaths.set(o,!0)}_handleRead(t,e,s,i,o,n,r){if(t=E.join(t,je),!s.hasGlob&&(r=this.fsw._throttle("readdir",t,1e3),!r))return;let a=this.fsw._getWatchedDir(s.path),l=new Set,d=this.fsw._readdirp(t,{fileFilter:h=>s.filterPath(h),directoryFilter:h=>s.filterDir(h),depth:0}).on(Be,async h=>{if(this.fsw.closed){d=void 0;return}let f=h.path,_=E.join(t,f);if(l.add(f),!(h.stats.isSymbolicLink()&&await this._handleSymlink(h,t,_,f))){if(this.fsw.closed){d=void 0;return}(f===i||!i&&!a.has(f))&&(this.fsw._incrReadyCount(),_=E.join(o,E.relative(o,_)),this._addToNodeFs(_,e,s,n+1))}}).on($t,this._boundHandleError);return new Promise(h=>d.once(Ke,()=>{if(this.fsw.closed){d=void 0;return}let f=r?r.clear():!1;h(),a.getChildren().filter(_=>_!==t&&!l.has(_)&&(!s.hasGlob||s.filterPath({fullPath:E.resolve(t,_)}))).forEach(_=>{this.fsw._remove(t,_)}),d=void 0,f&&this._handleRead(t,!1,s,i,o,n,r)}))}async _handleDir(t,e,s,i,o,n,r){let a=this.fsw._getWatchedDir(E.dirname(t)),l=a.has(E.basename(t));!(s&&this.fsw.options.ignoreInitial)&&!o&&!l&&(!n.hasGlob||n.globFilter(t))&&this.fsw._emit(qe,t,e),a.add(E.basename(t)),this.fsw._getWatchedDir(t);let d,h,f=this.fsw.options.depth;if((f==null||i<=f)&&!this.fsw._symlinkPaths.has(r)){if(!o&&(await this._handleRead(t,s,n,o,t,i,d),this.fsw.closed))return;h=this._watchWithNodeFs(t,(_,y)=>{y&&y.mtimeMs===0||this._handleRead(_,!1,n,o,t,i,d)})}return h}async _addToNodeFs(t,e,s,i,o){let n=this.fsw._emitReady;if(this.fsw._isIgnored(t)||this.fsw.closed)return n(),!1;let r=this.fsw._getWatchHelpers(t,i);!r.hasGlob&&s&&(r.hasGlob=s.hasGlob,r.globFilter=s.globFilter,r.filterPath=a=>s.filterPath(a),r.filterDir=a=>s.filterDir(a));try{let a=await es[r.statMethod](r.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(r.watchPath,a))return n(),!1;let l=this.fsw.options.followSymlinks&&!t.includes(Xe)&&!t.includes($e),d;if(a.isDirectory()){let h=E.resolve(t),f=l?await tt(t):t;if(this.fsw.closed||(d=await this._handleDir(r.watchPath,a,e,i,o,r,f),this.fsw.closed))return;h!==f&&f!==void 0&&this.fsw._symlinkPaths.set(h,f)}else if(a.isSymbolicLink()){let h=l?await tt(t):t;if(this.fsw.closed)return;let f=E.dirname(r.watchPath);if(this.fsw._getWatchedDir(f).add(r.watchPath),this.fsw._emit(G,r.watchPath,a),d=await this._handleDir(f,a,e,i,t,r,h),this.fsw.closed)return;h!==void 0&&this.fsw._symlinkPaths.set(E.resolve(t),h)}else d=this._handleFile(r.watchPath,a,e);return n(),this.fsw._addPathCloser(t,d),!1}catch(a){if(this.fsw._handleError(a))return n(),t}}};Jt.exports=it});var oe=S((gi,dt)=>{"use strict";g();var ht=w("fs"),p=w("path"),{promisify:lt}=w("util"),F;try{F=w("fsevents")}catch(c){process.env.CHOKIDAR_PRINT_FSEVENTS_REQUIRE_ERROR&&console.error(c)}if(F){let c=process.version.match(/v(\d+)\.(\d+)/);if(c&&c[1]&&c[2]){let t=Number.parseInt(c[1],10),e=Number.parseInt(c[2],10);t===8&&e<16&&(F=void 0)}}var{EV_ADD:rt,EV_CHANGE:ns,EV_ADD_DIR:te,EV_UNLINK:U,EV_ERROR:os,STR_DATA:as,STR_END:cs,FSEVENT_CREATED:hs,FSEVENT_MODIFIED:ls,FSEVENT_DELETED:ds,FSEVENT_MOVED:fs,FSEVENT_UNKNOWN:us,FSEVENT_FLAG_MUST_SCAN_SUBDIRS:_s,FSEVENT_TYPE_FILE:ms,FSEVENT_TYPE_DIRECTORY:W,FSEVENT_TYPE_SYMLINK:ne,ROOT_GLOBSTAR:ee,DIR_SUFFIX:ws,DOT_SLASH:se,FUNCTION_TYPE:nt,EMPTY_FN:Es,IDENTITY_FN:ps}=H(),gs=c=>isNaN(c)?{}:{depth:c},at=lt(ht.stat),ys=lt(ht.lstat),ie=lt(ht.realpath),bs={stat:at,lstat:ys},T=new Map,Ss=10,Rs=new Set([69888,70400,71424,72704,73472,131328,131840,262912]),Ts=(c,t)=>({stop:F.watch(c,t)});function Ds(c,t,e,s){let i=p.extname(t)?p.dirname(t):t,o=p.dirname(i),n=T.get(i);Ps(o)&&(i=o);let r=p.resolve(c),a=r!==t,l=(h,f,_)=>{a&&(h=h.replace(t,r)),(h===r||!h.indexOf(r+p.sep))&&e(h,f,_)},d=!1;for(let h of T.keys())if(t.indexOf(p.resolve(h)+p.sep)===0){i=h,n=T.get(i),d=!0;break}return n||d?n.listeners.add(l):(n={listeners:new Set([l]),rawEmitter:s,watcher:Ts(i,(h,f)=>{if(!n.listeners.size||f&_s)return;let _=F.getInfo(h,f);n.listeners.forEach(y=>{y(h,f,_)}),n.rawEmitter(_.event,h,_)})},T.set(i,n)),()=>{let h=n.listeners;if(h.delete(l),!h.size&&(T.delete(i),n.watcher))return n.watcher.stop().then(()=>{n.rawEmitter=n.watcher=void 0,Object.freeze(n)})}}var Ps=c=>{let t=0;for(let e of T.keys())if(e.indexOf(c)===0&&(t++,t>=Ss))return!0;return!1},Fs=()=>F&&T.size<128,ot=(c,t)=>{let e=0;for(;!c.indexOf(t)&&(c=p.dirname(c))!==t;)e++;return e},re=(c,t)=>c.type===W&&t.isDirectory()||c.type===ne&&t.isSymbolicLink()||c.type===ms&&t.isFile(),ct=class{constructor(t){this.fsw=t}checkIgnored(t,e){let s=this.fsw._ignoredPaths;if(this.fsw._isIgnored(t,e))return s.add(t),e&&e.isDirectory()&&s.add(t+ee),!0;s.delete(t),s.delete(t+ee)}addOrChange(t,e,s,i,o,n,r,a){let l=o.has(n)?ns:rt;this.handleEvent(l,t,e,s,i,o,n,r,a)}async checkExists(t,e,s,i,o,n,r,a){try{let l=await at(t);if(this.fsw.closed)return;re(r,l)?this.addOrChange(t,e,s,i,o,n,r,a):this.handleEvent(U,t,e,s,i,o,n,r,a)}catch(l){l.code==="EACCES"?this.addOrChange(t,e,s,i,o,n,r,a):this.handleEvent(U,t,e,s,i,o,n,r,a)}}handleEvent(t,e,s,i,o,n,r,a,l){if(!(this.fsw.closed||this.checkIgnored(e)))if(t===U){let d=a.type===W;(d||n.has(r))&&this.fsw._remove(o,r,d)}else{if(t===rt){if(a.type===W&&this.fsw._getWatchedDir(e),a.type===ne&&l.followSymlinks){let h=l.depth===void 0?void 0:ot(s,i)+1;return this._addToFsEvents(e,!1,!0,h)}this.fsw._getWatchedDir(o).add(r)}let d=a.type===W?t+ws:t;this.fsw._emit(d,e),d===te&&this._addToFsEvents(e,!1,!0)}}_watchWithFsEvents(t,e,s,i){if(this.fsw.closed||this.fsw._isIgnored(t))return;let o=this.fsw.options,r=Ds(t,e,async(a,l,d)=>{if(this.fsw.closed||o.depth!==void 0&&ot(a,e)>o.depth)return;let h=s(p.join(t,p.relative(t,a)));if(i&&!i(h))return;let f=p.dirname(h),_=p.basename(h),y=this.fsw._getWatchedDir(d.type===W?h:f);if(Rs.has(l)||d.event===us)if(typeof o.ignored===nt){let K;try{K=await at(h)}catch{}if(this.fsw.closed||this.checkIgnored(h,K))return;re(d,K)?this.addOrChange(h,a,e,f,y,_,d,o):this.handleEvent(U,h,a,e,f,y,_,d,o)}else this.checkExists(h,a,e,f,y,_,d,o);else switch(d.event){case hs:case ls:return this.addOrChange(h,a,e,f,y,_,d,o);case ds:case fs:return this.checkExists(h,a,e,f,y,_,d,o)}},this.fsw._emitRaw);return this.fsw._emitReady(),r}async _handleFsEventsSymlink(t,e,s,i){if(!(this.fsw.closed||this.fsw._symlinkPaths.has(e))){this.fsw._symlinkPaths.set(e,!0),this.fsw._incrReadyCount();try{let o=await ie(t);if(this.fsw.closed)return;if(this.fsw._isIgnored(o))return this.fsw._emitReady();this.fsw._incrReadyCount(),this._addToFsEvents(o||t,n=>{let r=t;return o&&o!==se?r=n.replace(o,t):n!==se&&(r=p.join(t,n)),s(r)},!1,i)}catch(o){if(this.fsw._handleError(o))return this.fsw._emitReady()}}}emitAdd(t,e,s,i,o){let n=s(t),r=e.isDirectory(),a=this.fsw._getWatchedDir(p.dirname(n)),l=p.basename(n);r&&this.fsw._getWatchedDir(n),!a.has(l)&&(a.add(l),(!i.ignoreInitial||o===!0)&&this.fsw._emit(r?te:rt,n,e))}initWatch(t,e,s,i){if(this.fsw.closed)return;let o=this._watchWithFsEvents(s.watchPath,p.resolve(t||s.watchPath),i,s.globFilter);this.fsw._addPathCloser(e,o)}async _addToFsEvents(t,e,s,i){if(this.fsw.closed)return;let o=this.fsw.options,n=typeof e===nt?e:ps,r=this.fsw._getWatchHelpers(t);try{let a=await bs[r.statMethod](r.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(r.watchPath,a))throw null;if(a.isDirectory()){if(r.globFilter||this.emitAdd(n(t),a,n,o,s),i&&i>o.depth)return;this.fsw._readdirp(r.watchPath,{fileFilter:l=>r.filterPath(l),directoryFilter:l=>r.filterDir(l),...gs(o.depth-(i||0))}).on(as,l=>{if(this.fsw.closed||l.stats.isDirectory()&&!r.filterPath(l))return;let d=p.join(r.watchPath,l.path),{fullPath:h}=l;if(r.followSymlinks&&l.stats.isSymbolicLink()){let f=o.depth===void 0?void 0:ot(d,p.resolve(r.watchPath))+1;this._handleFsEventsSymlink(d,h,n,f)}else this.emitAdd(d,l.stats,n,o,s)}).on(os,Es).on(cs,()=>{this.fsw._emitReady()})}else this.emitAdd(r.watchPath,a,n,o,s),this.fsw._emitReady()}catch(a){(!a||this.fsw._handleError(a))&&(this.fsw._emitReady(),this.fsw._emitReady())}if(o.persistent&&s!==!0)if(typeof e===nt)this.initWatch(void 0,t,r,n);else{let a;try{a=await ie(r.watchPath)}catch{}this.initWatch(a,t,r,n)}}};dt.exports=ct;dt.exports.canUse=Fs});var ni=S(Pt=>{g();var{EventEmitter:vs}=w("events"),Tt=w("fs"),m=w("path"),{promisify:ue}=w("util"),As=xt(),Et=Yt().default,Is=pe(),ft=Ee(),Ns=ge(),Os=vt(),ks=Zt(),ae=oe(),{EV_ALL:ut,EV_READY:Ws,EV_ADD:q,EV_CHANGE:L,EV_UNLINK:ce,EV_ADD_DIR:Ls,EV_UNLINK_DIR:xs,EV_RAW:Cs,EV_ERROR:_t,STR_CLOSE:Ms,STR_END:Vs,BACK_SLASH_RE:Hs,DOUBLE_SLASH_RE:he,SLASH_OR_BACK_SLASH_RE:Gs,DOT_RE:Ys,REPLACER_RE:zs,SLASH:mt,SLASH_SLASH:js,BRACE_START:Us,BANG:pt,ONE_DOT:_e,TWO_DOTS:qs,GLOBSTAR:Bs,SLASH_GLOBSTAR:wt,ANYMATCH_OPTS:gt,STRING_TYPE:Dt,FUNCTION_TYPE:Ks,EMPTY_STR:yt,EMPTY_FN:$s,isWindows:Xs,isMacos:Qs,isIBMi:Js}=H(),Zs=ue(Tt.stat),ti=ue(Tt.readdir),bt=(c=[])=>Array.isArray(c)?c:[c],me=(c,t=[])=>(c.forEach(e=>{Array.isArray(e)?me(e,t):t.push(e)}),t),le=c=>{let t=me(bt(c));if(!t.every(e=>typeof e===Dt))throw new TypeError(`Non-string provided as watch path: ${t}`);return t.map(we)},de=c=>{let t=c.replace(Hs,mt),e=!1;for(t.startsWith(js)&&(e=!0);t.match(he);)t=t.replace(he,mt);return e&&(t=mt+t),t},we=c=>de(m.normalize(de(c))),fe=(c=yt)=>t=>typeof t!==Dt?t:we(m.isAbsolute(t)?t:m.join(c,t)),ei=(c,t)=>m.isAbsolute(c)?c:c.startsWith(pt)?pt+m.join(t,c.slice(1)):m.join(t,c),b=(c,t)=>c[t]===void 0,St=class{constructor(t,e){this.path=t,this._removeWatcher=e,this.items=new Set}add(t){let{items:e}=this;e&&t!==_e&&t!==qs&&e.add(t)}async remove(t){let{items:e}=this;if(!e||(e.delete(t),e.size>0))return;let s=this.path;try{await ti(s)}catch{this._removeWatcher&&this._removeWatcher(m.dirname(s),m.basename(s))}}has(t){let{items:e}=this;if(e)return e.has(t)}getChildren(){let{items:t}=this;if(t)return[...t.values()]}dispose(){this.items.clear(),delete this.path,delete this._removeWatcher,delete this.items,Object.freeze(this)}},si="stat",ii="lstat",Rt=class{constructor(t,e,s,i){this.fsw=i,this.path=t=t.replace(zs,yt),this.watchPath=e,this.fullWatchPath=m.resolve(e),this.hasGlob=e!==t,t===yt&&(this.hasGlob=!1),this.globSymlink=this.hasGlob&&s?void 0:!1,this.globFilter=this.hasGlob?Et(t,void 0,gt):!1,this.dirParts=this.getDirParts(t),this.dirParts.forEach(o=>{o.length>1&&o.pop()}),this.followSymlinks=s,this.statMethod=s?si:ii}checkGlobSymlink(t){return this.globSymlink===void 0&&(this.globSymlink=t.fullParentDir===this.fullWatchPath?!1:{realPath:t.fullParentDir,linkPath:this.fullWatchPath}),this.globSymlink?t.fullPath.replace(this.globSymlink.realPath,this.globSymlink.linkPath):t.fullPath}entryPath(t){return m.join(this.watchPath,m.relative(this.watchPath,this.checkGlobSymlink(t)))}filterPath(t){let{stats:e}=t;if(e&&e.isSymbolicLink())return this.filterDir(t);let s=this.entryPath(t);return(this.hasGlob&&typeof this.globFilter===Ks?this.globFilter(s):!0)&&this.fsw._isntIgnored(s,e)&&this.fsw._hasReadPermissions(e)}getDirParts(t){if(!this.hasGlob)return[];let e=[];return(t.includes(Us)?Ns.expand(t):[t]).forEach(i=>{e.push(m.relative(this.watchPath,i).split(Gs))}),e}filterDir(t){if(this.hasGlob){let e=this.getDirParts(this.checkGlobSymlink(t)),s=!1;this.unmatchedGlob=!this.dirParts.some(i=>i.every((o,n)=>(o===Bs&&(s=!0),s||!e[0][n]||Et(o,e[0][n],gt))))}return!this.unmatchedGlob&&this.fsw._isntIgnored(this.entryPath(t),t.stats)}},B=class extends vs{constructor(t){super();let e={};t&&Object.assign(e,t),this._watched=new Map,this._closers=new Map,this._ignoredPaths=new Set,this._throttled=new Map,this._symlinkPaths=new Map,this._streams=new Set,this.closed=!1,b(e,"persistent")&&(e.persistent=!0),b(e,"ignoreInitial")&&(e.ignoreInitial=!1),b(e,"ignorePermissionErrors")&&(e.ignorePermissionErrors=!1),b(e,"interval")&&(e.interval=100),b(e,"binaryInterval")&&(e.binaryInterval=300),b(e,"disableGlobbing")&&(e.disableGlobbing=!1),e.enableBinaryInterval=e.binaryInterval!==e.interval,b(e,"useFsEvents")&&(e.useFsEvents=!e.usePolling),ae.canUse()||(e.useFsEvents=!1),b(e,"usePolling")&&!e.useFsEvents&&(e.usePolling=Qs),Js&&(e.usePolling=!0);let i=process.env.CHOKIDAR_USEPOLLING;if(i!==void 0){let a=i.toLowerCase();a==="false"||a==="0"?e.usePolling=!1:a==="true"||a==="1"?e.usePolling=!0:e.usePolling=!!a}let o=process.env.CHOKIDAR_INTERVAL;o&&(e.interval=Number.parseInt(o,10)),b(e,"atomic")&&(e.atomic=!e.usePolling&&!e.useFsEvents),e.atomic&&(this._pendingUnlinks=new Map),b(e,"followSymlinks")&&(e.followSymlinks=!0),b(e,"awaitWriteFinish")&&(e.awaitWriteFinish=!1),e.awaitWriteFinish===!0&&(e.awaitWriteFinish={});let n=e.awaitWriteFinish;n&&(n.stabilityThreshold||(n.stabilityThreshold=2e3),n.pollInterval||(n.pollInterval=100),this._pendingWrites=new Map),e.ignored&&(e.ignored=bt(e.ignored));let r=0;this._emitReady=()=>{r++,r>=this._readyCount&&(this._emitReady=$s,this._readyEmitted=!0,process.nextTick(()=>this.emit(Ws)))},this._emitRaw=(...a)=>this.emit(Cs,...a),this._readyEmitted=!1,this.options=e,e.useFsEvents?this._fsEventsHandler=new ae(this):this._nodeFsHandler=new ks(this),Object.freeze(e)}add(t,e,s){let{cwd:i,disableGlobbing:o}=this.options;this.closed=!1;let n=le(t);return i&&(n=n.map(r=>{let a=ei(r,i);return o||!ft(r)?a:Os(a)})),n=n.filter(r=>r.startsWith(pt)?(this._ignoredPaths.add(r.slice(1)),!1):(this._ignoredPaths.delete(r),this._ignoredPaths.delete(r+wt),this._userIgnored=void 0,!0)),this.options.useFsEvents&&this._fsEventsHandler?(this._readyCount||(this._readyCount=n.length),this.options.persistent&&(this._readyCount+=n.length),n.forEach(r=>this._fsEventsHandler._addToFsEvents(r))):(this._readyCount||(this._readyCount=0),this._readyCount+=n.length,Promise.all(n.map(async r=>{let a=await this._nodeFsHandler._addToNodeFs(r,!s,0,0,e);return a&&this._emitReady(),a})).then(r=>{this.closed||r.filter(a=>a).forEach(a=>{this.add(m.dirname(a),m.basename(e||a))})})),this}unwatch(t){if(this.closed)return this;let e=le(t),{cwd:s}=this.options;return e.forEach(i=>{!m.isAbsolute(i)&&!this._closers.has(i)&&(s&&(i=m.join(s,i)),i=m.resolve(i)),this._closePath(i),this._ignoredPaths.add(i),this._watched.has(i)&&this._ignoredPaths.add(i+wt),this._userIgnored=void 0}),this}close(){if(this.closed)return this._closePromise;this.closed=!0,this.removeAllListeners();let t=[];return this._closers.forEach(e=>e.forEach(s=>{let i=s();i instanceof Promise&&t.push(i)})),this._streams.forEach(e=>e.destroy()),this._userIgnored=void 0,this._readyCount=0,this._readyEmitted=!1,this._watched.forEach(e=>e.dispose()),["closers","watched","streams","symlinkPaths","throttled"].forEach(e=>{this[`_${e}`].clear()}),this._closePromise=t.length?Promise.all(t).then(()=>{}):Promise.resolve(),this._closePromise}getWatched(){let t={};return this._watched.forEach((e,s)=>{let i=this.options.cwd?m.relative(this.options.cwd,s):s;t[i||_e]=e.getChildren().sort()}),t}emitWithAll(t,e){this.emit(...e),t!==_t&&this.emit(ut,...e)}async _emit(t,e,s,i,o){if(this.closed)return;let n=this.options;Xs&&(e=m.normalize(e)),n.cwd&&(e=m.relative(n.cwd,e));let r=[t,e];o!==void 0?r.push(s,i,o):i!==void 0?r.push(s,i):s!==void 0&&r.push(s);let a=n.awaitWriteFinish,l;if(a&&(l=this._pendingWrites.get(e)))return l.lastChange=new Date,this;if(n.atomic){if(t===ce)return this._pendingUnlinks.set(e,r),setTimeout(()=>{this._pendingUnlinks.forEach((d,h)=>{this.emit(...d),this.emit(ut,...d),this._pendingUnlinks.delete(h)})},typeof n.atomic=="number"?n.atomic:100),this;t===q&&this._pendingUnlinks.has(e)&&(t=r[0]=L,this._pendingUnlinks.delete(e))}if(a&&(t===q||t===L)&&this._readyEmitted){let d=(h,f)=>{h?(t=r[0]=_t,r[1]=h,this.emitWithAll(t,r)):f&&(r.length>2?r[2]=f:r.push(f),this.emitWithAll(t,r))};return this._awaitWriteFinish(e,a.stabilityThreshold,t,d),this}if(t===L&&!this._throttle(L,e,50))return this;if(n.alwaysStat&&s===void 0&&(t===q||t===Ls||t===L)){let d=n.cwd?m.join(n.cwd,e):e,h;try{h=await Zs(d)}catch{}if(!h||this.closed)return;r.push(h)}return this.emitWithAll(t,r),this}_handleError(t){let e=t&&t.code;return t&&e!=="ENOENT"&&e!=="ENOTDIR"&&(!this.options.ignorePermissionErrors||e!=="EPERM"&&e!=="EACCES")&&this.emit(_t,t),t||this.closed}_throttle(t,e,s){this._throttled.has(t)||this._throttled.set(t,new Map);let i=this._throttled.get(t),o=i.get(e);if(o)return o.count++,!1;let n,r=()=>{let l=i.get(e),d=l?l.count:0;return i.delete(e),clearTimeout(n),l&&clearTimeout(l.timeoutObject),d};n=setTimeout(r,s);let a={timeoutObject:n,clear:r,count:0};return i.set(e,a),a}_incrReadyCount(){return this._readyCount++}_awaitWriteFinish(t,e,s,i){let o,n=t;this.options.cwd&&!m.isAbsolute(t)&&(n=m.join(this.options.cwd,t));let r=new Date,a=l=>{Tt.stat(n,(d,h)=>{if(d||!this._pendingWrites.has(t)){d&&d.code!=="ENOENT"&&i(d);return}let f=Number(new Date);l&&h.size!==l.size&&(this._pendingWrites.get(t).lastChange=f);let _=this._pendingWrites.get(t);f-_.lastChange>=e?(this._pendingWrites.delete(t),i(void 0,h)):o=setTimeout(a,this.options.awaitWriteFinish.pollInterval,h)})};this._pendingWrites.has(t)||(this._pendingWrites.set(t,{lastChange:r,cancelWait:()=>(this._pendingWrites.delete(t),clearTimeout(o),s)}),o=setTimeout(a,this.options.awaitWriteFinish.pollInterval))}_getGlobIgnored(){return[...this._ignoredPaths.values()]}_isIgnored(t,e){if(this.options.atomic&&Ys.test(t))return!0;if(!this._userIgnored){let{cwd:s}=this.options,i=this.options.ignored,o=i&&i.map(fe(s)),n=bt(o).filter(a=>typeof a===Dt&&!ft(a)).map(a=>a+wt),r=this._getGlobIgnored().map(fe(s)).concat(o,n);this._userIgnored=Et(r,void 0,gt)}return this._userIgnored([t,e])}_isntIgnored(t,e){return!this._isIgnored(t,e)}_getWatchHelpers(t,e){let s=e||this.options.disableGlobbing||!ft(t)?t:Is(t),i=this.options.followSymlinks;return new Rt(t,s,i,this)}_getWatchedDir(t){this._boundRemove||(this._boundRemove=this._remove.bind(this));let e=m.resolve(t);return this._watched.has(e)||this._watched.set(e,new St(e,this._boundRemove)),this._watched.get(e)}_hasReadPermissions(t){if(this.options.ignorePermissionErrors)return!0;let s=(t&&Number.parseInt(t.mode,10))&511;return!!(4&Number.parseInt(s.toString(8)[0],10))}_remove(t,e,s){let i=m.join(t,e),o=m.resolve(i);if(s=s??(this._watched.has(i)||this._watched.has(o)),!this._throttle("remove",i,100))return;!s&&!this.options.useFsEvents&&this._watched.size===1&&this.add(t,e,!0),this._getWatchedDir(i).getChildren().forEach(f=>this._remove(i,f));let a=this._getWatchedDir(t),l=a.has(e);a.remove(e),this._symlinkPaths.has(o)&&this._symlinkPaths.delete(o);let d=i;if(this.options.cwd&&(d=m.relative(this.options.cwd,i)),this.options.awaitWriteFinish&&this._pendingWrites.has(d)&&this._pendingWrites.get(d).cancelWait()===q)return;this._watched.delete(i),this._watched.delete(o);let h=s?xs:ce;l&&!this._isIgnored(i)&&this._emit(h,i),this.options.useFsEvents||this._closePath(i)}_closePath(t){this._closeFile(t);let e=m.dirname(t);this._getWatchedDir(e).remove(m.basename(t))}_closeFile(t){let e=this._closers.get(t);e&&(e.forEach(s=>s()),this._closers.delete(t))}_addPathCloser(t,e){if(!e)return;let s=this._closers.get(t);s||(s=[],this._closers.set(t,s)),s.push(e)}_readdirp(t,e){if(this.closed)return;let s={type:ut,alwaysStat:!0,lstat:!0,...e},i=As(t,s);return this._streams.add(i),i.once(Ms,()=>{i=void 0}),i.once(Vs,()=>{i&&(this._streams.delete(i),i=void 0)}),i}};Pt.FSWatcher=B;var ri=(c,t)=>{let e=new B(t);return e.add(c),e};Pt.watch=ri});export default ni();
@@ -0,0 +1 @@
1
+ import{a as C,c as F}from"./chunk-UYK6CXAU.js";import{d as k,f as A,u as q}from"./chunk-AY4GIVME.js";import{a as N}from"./chunk-HM5H7WBE.js";import{a as E,c as J}from"./chunk-ZAMDXIVC.js";import{b as x}from"./chunk-G24L7MB3.js";import{g as z,h as y}from"./chunk-5W443CKL.js";import{b}from"./chunk-H5C3QTOO.js";import{E as m,v as f,x as S}from"./chunk-6EZ7JWBK.js";import{d as u}from"./chunk-WKBVT5WG.js";import{Fb as c,Hb as n,Lb as O,Ta as v,ma as w,ua as g}from"./chunk-DONEJHDG.js";import{e as I,g as l}from"./chunk-VKWPEFWQ.js";l();l();var M=I(z(),1);async function D(s,e){if(s)try{return JSON.parse(s)}catch(t){let r=t instanceof Error?t.message:"Unknown error";throw new u(n`Invalid JSON in ${c.yellow("--variables")} flag: ${r}`,"Please provide valid JSON format.")}else if(e){if(!await v(e))throw new u(n`Variable file not found at ${c.path(e)}. Please check the path and try again.`);let t=await w(e,{encoding:"utf8"});try{return JSON.parse(t)}catch(r){let p=r instanceof Error?r.message:"Unknown error";throw new u(n`Invalid JSON in variable file ${c.path(e)}: ${p}`,"Please provide valid JSON format.")}}}async function $(s){let{remoteApp:e,store:t,query:r,variables:p,variableFile:L,version:R,outputFile:d}=s,{adminSession:V,version:G}=await m({title:n`Authenticating`,task:async()=>{let o=await C(e,t.shopDomain),i=await A({adminSession:o,userSpecifiedVersion:R});return{adminSession:o,version:i}},renderOptions:{stdout:process.stderr}}),P=await D(p,L);k(r),F(r,t);try{let o=await m({title:n`Executing GraphQL operation`,task:async()=>x({query:(0,M.parse)(r),session:V,variables:P,version:G,responseOptions:{handleErrors:!1}}),renderOptions:{stdout:process.stderr}}),i=JSON.stringify(o,null,2);d?(await g(d,i),f({headline:"Operation succeeded.",body:`Results written to ${d}`})):(f({headline:"Operation succeeded."}),O(i))}catch(o){if(o instanceof y){let i={errors:o.response.errors},Q=JSON.stringify(i,null,2);S({headline:"GraphQL operation failed.",body:Q});return}throw o}}var h,a=class extends N{async run(){let{flags:e}=await this.parse(h),{query:t,appContextResult:r,store:p}=await q(e);return await $({organization:r.organization,remoteApp:r.remoteApp,store:p,query:t,variables:e.variables,variableFile:e["variable-file"],outputFile:e["output-file"],...e.version&&{version:e.version}}),{app:r.app}}};h=a;a.summary="Execute GraphQL queries and mutations.";a.descriptionWithMarkdown="Executes an Admin API GraphQL query or mutation on the specified store. Mutations are only allowed on dev stores.\n\n For operations that process large amounts of data, use [`bulk execute`](https://shopify.dev/docs/api/shopify-cli/app/app-bulk-execute) instead.";a.description=h.descriptionWithoutMarkdown();a.flags={...b,...E,...J};var oe=a;export{oe as a};
@@ -1 +1 @@
1
- import{o as n}from"./chunk-WUK5NQSX.js";import{D as s}from"./chunk-MGL4YM3S.js";import{g as a}from"./chunk-VPRTJUIN.js";a();async function c(e){await s([{title:"Installing dependencies",task:async()=>{await n({packageManager:e.packageManager,directory:e.directory,deep:3})}}])}export{c as a};
1
+ import{o as n}from"./chunk-GW3VY3FZ.js";import{D as s}from"./chunk-6EZ7JWBK.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();async function c(e){await s([{title:"Installing dependencies",task:async()=>{await n({packageManager:e.packageManager,directory:e.directory,deep:3})}}])}export{c as a};
@@ -1,4 +1,4 @@
1
- import{a as U,b as xt}from"./chunk-3VZEETAV.js";import{A as gt,C as _e,D as ae,E as A,F as ce,H as yt,J as Et,a as nt,b as rt,e as W,f as M,i as at,k as ct,m as lt,n as dt,o as pt,r as ut,t as mt,u as ht,v as ie,w as $,y as ft}from"./chunk-IOQQUHST.js";import{a as N,l as ot,m as it}from"./chunk-MZJRNFAU.js";import{n as oe,o as O}from"./chunk-HHXHOQQP.js";import{aa as st}from"./chunk-IWCPQD7X.js";import{va as L,xa as H}from"./chunk-4V4DQ6W7.js";import{b as Qe}from"./chunk-JUVAGMIH.js";import{P as tt,u as Ke,w as _,x as te,y as et}from"./chunk-MGL4YM3S.js";import{d as se}from"./chunk-BHWEA4V2.js";import{Fb as q,Hb as ne,Mb as re,O as Ve,Pb as F,Qb as D,Ta as v,Wa as C,_ as $e,bb as ke,ma as k,ua as be,wa as Xe,ya as Ze}from"./chunk-VPL2NDH6.js";import{d as E,g as V,j as Ge,k as j}from"./chunk-IU2ZQ6TE.js";import{e as Ye,g as h}from"./chunk-VPRTJUIN.js";h();h();h();var ns=".shopifyignore",Rt=/templates\/\*(\.(json|liquid))?$/,Tt=new Set;function Le(e,t={}){let s=t.ignoreFromFile??[],n=t.ignore??[],r=t.only??[],[o=[],i=[]]=Ie(s),[a=[],u=[]]=Ie(n),[m=[],c=[]]=Ie(r),l=e.filter(B(o,".shopifyignore"));return l=l.filter(B(a,"--ignore")),l=l.filter(B(m,"--only",!0)),i.length>0&&(l=l.concat(e.filter(B(i,".shopifyignore",!0)))),u.length>0&&(l=l.concat(e.filter(B(u,"--ignore",!0)))),c.length>0&&(l=l.filter(B(c,"--only"))),Ve(l,f=>f.key)}function B(e,t,s=!1){return({key:n})=>{if(e.length===0)return!0;let r=e.some(i=>rs(n,i)||as(i)&&is(n,cs(i)));return(s?!r:r)?(F(`Ignoring theme file ${n} via ${t}...`),!1):!0}}async function wt(e){let t=E(e,ns);return await v(t)?(await k(t,{encoding:"utf8"})).split(/(\r\n|\r|\n)/).map(r=>r.trim()).filter(r=>r&&!r.startsWith("#")):[]}function Ie(e){let t=e.filter(n=>n.startsWith("!")).map(n=>n.slice(1));return[e.filter(n=>!n.startsWith("!")),t]}function rs(e,t){let s={matchBase:!0,noglobstar:!0};return ke(e,t,s)?!0:(!t.includes("*")&&t.endsWith("/")&&!Tt.has(t)&&(Tt.add(t),_({headline:"Directory pattern may be misleading.",body:`For more reliable matching, consider using "${t}*" or "${t}*.<file_extension>" instead.`})),os(t)?ke(e,t.replace(Rt,"templates/**/*$1"),s):!1)}function os(e){return Rt.test(e)}function is(e,t){return t.test(e)}function as(e){return e.startsWith("/")&&e.endsWith("/")}function cs(e){return new RegExp(e.slice(1,-1))}h();import St from"fs/promises";var le=class{constructor(t){this.notifyPath=t,this.isValidUrl=this.validateUrl(t),this.notifyPath===""&&D("Notification skipped: notifyPath is an empty string")}async notify(t){if(this.notifyPath!=="")try{F(`Notifying filechange listener at ${this.notifyPath}...`),this.isValidUrl?await this.notifyUrl(t):await this.notifyFile(t)}catch(s){L(s);let n=`Failed to notify filechange listener at ${this.notifyPath}`;s instanceof Error&&(n=n.concat(`: ${s.message}`)),D(n)}}async notifyUrl(t){let s=await fetch(this.notifyPath,{method:"POST",body:JSON.stringify({files:[t]}),headers:{"Content-Type":"application/json"}});if(!s.ok)throw new Error(s.statusText)}async notifyFile(t){await St.writeFile(this.notifyPath,t),await St.utimes(this.notifyPath,new Date,new Date)}validateUrl(t){try{let s=new URL(t);return s.protocol==="http:"||s.protocol==="https:"}catch{return!1}}};h();h();h();import ls from"node:events";var Ft=["assets/**/*.*","locales/**/*.json","blocks/**/*.liquid","snippets/**/*.liquid"];function vt(e){let t=new Map,s=new Set,n=new ls,r=(c,l)=>{n.emit(c,l)},o=async c=>{let l=await pe(e,c),p=de(c,l),f=typeof l=="string"?l:"",x=Buffer.isBuffer(l)?l.toString("base64"):"";return t.set(c,N({key:c,checksum:p,value:f,attachment:x})),l},i=C(Ft,{cwd:e,deep:3,ignore:O}).then(c=>Promise.all(c.map(o))),a=(c,l)=>{let p=V(e,l),f=o(p).then(()=>{let x=t.get(p);return s.add(x.key),x.value??x.attachment??""});tt(5).then(()=>{s.delete(p)}).catch(()=>{}),r(c,{fileKey:p,onContent:x=>{f.then(P=>{P&&x(P)}).catch(()=>{})},onSync:x=>{}})},u=c=>{let l=V(e,c);s.delete(l),t.delete(l),r("unlink",{fileKey:l,onSync:p=>p()})},m=new Set(Ft.map(c=>E(e,c.split("/").shift()??"")));return{root:e,files:t,unsyncedFileKeys:s,ready:async()=>i.then(()=>{}),delete:async c=>{t.delete(c)},write:async c=>{t.set(c.key,c)},read:o,addEventListener:(c,l)=>{n.on(c,l)},startWatcher:async()=>{let{default:c}=await import("./chokidar-G4ONJSK4.js");c.watch([...m],{ignored:O,persistent:!process.env.SHOPIFY_UNIT_TEST,ignoreInitial:!0}).on("add",a.bind(null,"add")).on("change",a.bind(null,"change")).on("unlink",u.bind(null))}}}h();h();var ds="https://unpkg.com/@shopify/polaris@13.9.2/build/esm/styles.css";function Pt(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function $t(e){return(0,String.raw)`<!DOCTYPE html>
1
+ import{a as U,b as xt}from"./chunk-KRZABRYT.js";import{a as mt,b as ht,f as _e,g as ae,h as A,i as ce,k as yt,n as Et}from"./chunk-6YPEONHB.js";import{a as M,l as ft,m as gt}from"./chunk-PJYNAUQB.js";import{s as ie,t as W}from"./chunk-D6YDSGR4.js";import{a as O,b as N,e as st,g as nt,i as rt,j as ot,k as it,n as at,p as ct,q as lt,r as oe,s as $,u as dt,w as pt}from"./chunk-Q7BOSHWX.js";import{aa as ut}from"./chunk-T5GSCWN5.js";import{va as L,xa as H}from"./chunk-5W443CKL.js";import{b as Qe}from"./chunk-5C7HDTHJ.js";import{P as tt,u as Ke,w as _,x as te,y as et}from"./chunk-6EZ7JWBK.js";import{d as se}from"./chunk-WKBVT5WG.js";import{Fb as q,Hb as ne,Mb as re,O as Ve,Pb as F,Qb as D,Ta as v,Wa as C,_ as $e,bb as ke,ma as k,ua as be,wa as Xe,ya as Ze}from"./chunk-DONEJHDG.js";import{d as E,g as V,j as Ge,k as j}from"./chunk-773TIA5M.js";import{e as Ye,g as h}from"./chunk-VKWPEFWQ.js";h();h();h();var ns=".shopifyignore",wt=/templates\/\*(\.(json|liquid))?$/,Tt=new Set;function Le(e,t={}){let s=t.ignoreFromFile??[],n=t.ignore??[],r=t.only??[],[o=[],i=[]]=Ie(s),[a=[],u=[]]=Ie(n),[m=[],c=[]]=Ie(r),l=e.filter(B(o,".shopifyignore"));return l=l.filter(B(a,"--ignore")),l=l.filter(B(m,"--only",!0)),i.length>0&&(l=l.concat(e.filter(B(i,".shopifyignore",!0)))),u.length>0&&(l=l.concat(e.filter(B(u,"--ignore",!0)))),c.length>0&&(l=l.filter(B(c,"--only"))),Ve(l,f=>f.key)}function B(e,t,s=!1){return({key:n})=>{if(e.length===0)return!0;let r=e.some(i=>rs(n,i)||as(i)&&is(n,cs(i)));return(s?!r:r)?(F(`Ignoring theme file ${n} via ${t}...`),!1):!0}}async function Rt(e){let t=E(e,ns);return await v(t)?(await k(t,{encoding:"utf8"})).split(/(\r\n|\r|\n)/).map(r=>r.trim()).filter(r=>r&&!r.startsWith("#")):[]}function Ie(e){let t=e.filter(n=>n.startsWith("!")).map(n=>n.slice(1));return[e.filter(n=>!n.startsWith("!")),t]}function rs(e,t){let s={matchBase:!0,noglobstar:!0};return ke(e,t,s)?!0:(!t.includes("*")&&t.endsWith("/")&&!Tt.has(t)&&(Tt.add(t),_({headline:"Directory pattern may be misleading.",body:`For more reliable matching, consider using "${t}*" or "${t}*.<file_extension>" instead.`})),os(t)?ke(e,t.replace(wt,"templates/**/*$1"),s):!1)}function os(e){return wt.test(e)}function is(e,t){return t.test(e)}function as(e){return e.startsWith("/")&&e.endsWith("/")}function cs(e){return new RegExp(e.slice(1,-1))}h();import St from"fs/promises";var le=class{constructor(t){this.notifyPath=t,this.isValidUrl=this.validateUrl(t),this.notifyPath===""&&D("Notification skipped: notifyPath is an empty string")}async notify(t){if(this.notifyPath!=="")try{F(`Notifying filechange listener at ${this.notifyPath}...`),this.isValidUrl?await this.notifyUrl(t):await this.notifyFile(t)}catch(s){L(s);let n=`Failed to notify filechange listener at ${this.notifyPath}`;s instanceof Error&&(n=n.concat(`: ${s.message}`)),D(n)}}async notifyUrl(t){let s=await fetch(this.notifyPath,{method:"POST",body:JSON.stringify({files:[t]}),headers:{"Content-Type":"application/json"}});if(!s.ok)throw new Error(s.statusText)}async notifyFile(t){await St.writeFile(this.notifyPath,t),await St.utimes(this.notifyPath,new Date,new Date)}validateUrl(t){try{let s=new URL(t);return s.protocol==="http:"||s.protocol==="https:"}catch{return!1}}};h();h();h();import ls from"node:events";var Ft=["assets/**/*.*","locales/**/*.json","blocks/**/*.liquid","snippets/**/*.liquid"];function vt(e){let t=new Map,s=new Set,n=new ls,r=(c,l)=>{n.emit(c,l)},o=async c=>{let l=await pe(e,c),p=de(c,l),f=typeof l=="string"?l:"",x=Buffer.isBuffer(l)?l.toString("base64"):"";return t.set(c,M({key:c,checksum:p,value:f,attachment:x})),l},i=C(Ft,{cwd:e,deep:3,ignore:W}).then(c=>Promise.all(c.map(o))),a=(c,l)=>{let p=V(e,l),f=o(p).then(()=>{let x=t.get(p);return s.add(x.key),x.value??x.attachment??""});tt(5).then(()=>{s.delete(p)}).catch(()=>{}),r(c,{fileKey:p,onContent:x=>{f.then(P=>{P&&x(P)}).catch(()=>{})},onSync:x=>{}})},u=c=>{let l=V(e,c);s.delete(l),t.delete(l),r("unlink",{fileKey:l,onSync:p=>p()})},m=new Set(Ft.map(c=>E(e,c.split("/").shift()??"")));return{root:e,files:t,unsyncedFileKeys:s,ready:async()=>i.then(()=>{}),delete:async c=>{t.delete(c)},write:async c=>{t.set(c.key,c)},read:o,addEventListener:(c,l)=>{n.on(c,l)},startWatcher:async()=>{let{default:c}=await import("./chokidar-VDIVGBZH.js");c.watch([...m],{ignored:W,persistent:!process.env.SHOPIFY_UNIT_TEST,ignoreInitial:!0}).on("add",a.bind(null,"add")).on("change",a.bind(null,"change")).on("unlink",u.bind(null))}}}h();h();var ds="https://unpkg.com/@shopify/polaris@13.9.2/build/esm/styles.css";function Pt(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function $t(e){return(0,String.raw)`<!DOCTYPE html>
2
2
  <html>
3
3
  <head>
4
4
  <title>${e.title}</title>
@@ -66,13 +66,13 @@ import{a as U,b as xt}from"./chunk-3VZEETAV.js";import{A as gt,C as _e,D as ae,E
66
66
  </div>
67
67
  </div>
68
68
  </body>
69
- </html>`}h();h();var ps=/<head(\s[^>]*)?>/i,je="https://cdn.shopify.com/storefront",us=`${je}/standard-events.js`,ms=`${je}/standard-events.dev.js`,bt=`${je}/standard-events-inspector.js`,kt="shopify-cli-standard-events-inspector",hs=new RegExp(`<script\\b[^>]*(?:\\bid=["']${qe(kt)}["']|\\bsrc=["']${qe(bt)}["'])[^>]*>`,"i"),fs=new RegExp(qe(us),"g");function ue(e){return hs.test(e)?e:e.replace(ps,t=>`${t}<script id="${kt}" src="${bt}" defer></script>`)}function _t(e){return e.replace(fs,ms)}function qe(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}h();var It=80;function X(e,t,s){if(!gs(e)||s.type==="theme-extension")return;let n=e.path.length>It?`${e.path.substring(0,It)}...`:e.path,o=t.headers.get("server-timing")?.match(/cfRequestDuration;dur=([\d.]+)/)?.[1],i=o?`${Math.round(Number(o))}ms`:"",a=ys(t.status),u=e.method.padStart(6);re(ne`• ${oe.format(new Date)} Request ${q.raw("\xBB")} ${u} ${a(String(t.status))} ${n} ${q.gray(i)}`)}function gs(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=j(n);return!s.includes(r)}function ys(e){return e<300?q.green:e<400?q.yellow:q.errorText}var J="/cdn/",z="/ext/cdn/",Ce="/api/collect",Es=/^\/cart\//,Lt=/^\/checkouts\/(?!internal\/)/,xs=/^\/account(\/login\/multipass(\/[^/]+)?|\/logout)?\/?$/,Ts=new RegExp(`^${J}`),Rs=new RegExp(`^${z}`),ws=/^\/api\/(unstable|\d{4}-\d{2})\/graphql\.json/,Ss=["/.well-known","/shopify/monorail","/mini-profiler-resources","/web-pixels-manager","/web-pixels@","/wpm","/services/",Ce,"/cdn-cgi/challenge-platform"],qt="_shopify_essential",Fs=new RegExp(`${qt}=([^;]*)(;|$)`);function jt(e,t){return $(async s=>{if(Ss.some(n=>s.path.startsWith(n)))return null;if(vs(s)){let n=s.path.split("?")[0]??"";return He(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")&&_(a),new Response(r.message,{status:o,statusText:i})})}})}function vs(e){if(e.method!=="GET"||e.path.match(Es)||e.path.match(Lt)||e.path.match(xs)||e.path.match(Ts)||e.path.match(Rs))return!0;let[t]=e.path.split("?"),s=j(t),n=e.headers.get("accept")??"*/*";return s===".html"||n.includes("text/html")?!1:!!s||n!=="*/*"}function me(e){return e.session.storeFqdn.replace(/\\/g,"\\\\").replace(/\./g,"\\.")}function Ps(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/"),u=new Set([...t.localThemeFileSystem.files.keys()].filter(a)),m=new Set([...t.localThemeExtensionFileSystem.files.keys()].filter(a));return s=s.replace(i,(c,l,p)=>{let f=p&&u.has(p),x=p&&m.has(p)&&l.startsWith("extensions/");return U(p).startsWith("image/")?c:x?`${z}${l}`:f?`${J}${l}`:c}),t.options.standardEventsDevBundle&&(s=_t(s)),s}function $s(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 bs(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=At(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=$s(i,e),e.options.standardEventsInspector&&(i=ue(i)),s&&(i=s(i)??i),new Response(i,n)}var Ct=["connection","keep-alive","proxy-authenticate","proxy-authorization","te","trailer","transfer-encoding","upgrade","expect","content-security-policy","host"];function At(e,t){let s=new Response(t.body,t);s.headers.delete("content-length"),s.headers.delete("content-encoding");for(let i of Ct)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");Lt.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",bs(o,e).join(","));let i=o.join(",").match(Fs)?.[1];i&&(e.session.sessionCookies[qt]=i)}return s}function Ae(e){let t=at(e);for(let n of Ct)delete t[n];delete t["upgrade-insecure-requests"];let s=ct(e);return s&&(t["X-Forwarded-For"]=s),t}function He(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=lt(e),i=Ae(e);return Ps(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=rt({...i,...nt(),referer:r.origin,Cookie:yt(t.session,{headers:i}),...t.type==="theme"?{Authorization:`Bearer ${t.session.storefrontToken}`}:{}})),fetch(r,{method:e.method,body:o,duplex:o?"half":void 0,redirect:"manual",headers:i}).then(a=>At(t,a)).catch(a=>{throw ae(L(a),r)})}var De=0,ks=5;function Dt(e,t){return $(s=>{let[n="/",r=""]=s.path.split("?");return Is(s)&&(t.lastRequestedPath=s.path),t.options.errorOverlay!=="silent"&&t.localThemeFileSystem.uploadErrors.size>0?Ht(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:Ae(s),replaceExtensionTemplates:fe(t),replaceTemplates:Oe(t,n,dt(s,"localization")?.toLowerCase())}).then(async i=>{if(i.status>=400&&i.status<500&&!_s(s)){let a=await Ls(s,t,i);if(a)return X(s,a,t),a}return X(s,i,t),Q(t,i,a=>(qs(i,a,String(e.id)),De=0,Ne(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)){De++,De>ks&&(et(new se(i.getMessage())),process.exit(1)),await t.session.refresh();let f=new URLSearchParams(r),x=new URLSearchParams([...f].filter(([ve])=>!ve.startsWith("__sfr"))),P=n+(x.toString()?`?${x}`:"");return new Response(null,{status:302,headers:{Location:P}})}let{status:a,statusText:u,cause:m,...c}=A(i,"Failed to render storefront"),[l,...p]=c.headline.split(`
69
+ </html>`}h();h();var ps=/<head(\s[^>]*)?>/i,je="https://cdn.shopify.com/storefront",us=`${je}/standard-events.js`,ms=`${je}/standard-events.dev.js`,bt=`${je}/standard-events-inspector.js`,kt="shopify-cli-standard-events-inspector",hs=new RegExp(`<script\\b[^>]*(?:\\bid=["']${qe(kt)}["']|\\bsrc=["']${qe(bt)}["'])[^>]*>`,"i"),fs=new RegExp(qe(us),"g");function ue(e){return hs.test(e)?e:e.replace(ps,t=>`${t}<script id="${kt}" src="${bt}" defer></script>`)}function _t(e){return e.replace(fs,ms)}function qe(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}h();var It=80;function X(e,t,s){if(!gs(e)||s.type==="theme-extension")return;let n=e.path.length>It?`${e.path.substring(0,It)}...`:e.path,o=t.headers.get("server-timing")?.match(/cfRequestDuration;dur=([\d.]+)/)?.[1],i=o?`${Math.round(Number(o))}ms`:"",a=ys(t.status),u=e.method.padStart(6);re(ne`• ${ie.format(new Date)} Request ${q.raw("\xBB")} ${u} ${a(String(t.status))} ${n} ${q.gray(i)}`)}function gs(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=j(n);return!s.includes(r)}function ys(e){return e<300?q.green:e<400?q.yellow:q.errorText}var J="/cdn/",z="/ext/cdn/",Ce="/api/collect",Es=/^\/cart\//,Lt=/^\/checkouts\/(?!internal\/)/,xs=/^\/account(\/login\/multipass(\/[^/]+)?|\/logout)?\/?$/,Ts=new RegExp(`^${J}`),ws=new RegExp(`^${z}`),Rs=/^\/api\/(unstable|\d{4}-\d{2})\/graphql\.json/,Ss=["/.well-known","/shopify/monorail","/mini-profiler-resources","/web-pixels-manager","/web-pixels@","/wpm","/services/",Ce,"/cdn-cgi/challenge-platform"],qt="_shopify_essential",Fs=new RegExp(`${qt}=([^;]*)(;|$)`);function jt(e,t){return $(async s=>{if(Ss.some(n=>s.path.startsWith(n)))return null;if(vs(s)){let n=s.path.split("?")[0]??"";return He(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")&&_(a),new Response(r.message,{status:o,statusText:i})})}})}function vs(e){if(e.method!=="GET"||e.path.match(Es)||e.path.match(Lt)||e.path.match(xs)||e.path.match(Ts)||e.path.match(ws))return!0;let[t]=e.path.split("?"),s=j(t),n=e.headers.get("accept")??"*/*";return s===".html"||n.includes("text/html")?!1:!!s||n!=="*/*"}function me(e){return e.session.storeFqdn.replace(/\\/g,"\\\\").replace(/\./g,"\\.")}function Ps(e){return Rs.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/"),u=new Set([...t.localThemeFileSystem.files.keys()].filter(a)),m=new Set([...t.localThemeExtensionFileSystem.files.keys()].filter(a));return s=s.replace(i,(c,l,p)=>{let f=p&&u.has(p),x=p&&m.has(p)&&l.startsWith("extensions/");return U(p).startsWith("image/")?c:x?`${z}${l}`:f?`${J}${l}`:c}),t.options.standardEventsDevBundle&&(s=_t(s)),s}function $s(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 bs(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=At(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=$s(i,e),e.options.standardEventsInspector&&(i=ue(i)),s&&(i=s(i)??i),new Response(i,n)}var Ct=["connection","keep-alive","proxy-authenticate","proxy-authorization","te","trailer","transfer-encoding","upgrade","expect","content-security-policy","host"];function At(e,t){let s=new Response(t.body,t);s.headers.delete("content-length"),s.headers.delete("content-encoding");for(let i of Ct)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");Lt.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",bs(o,e).join(","));let i=o.join(",").match(Fs)?.[1];i&&(e.session.sessionCookies[qt]=i)}return s}function Ae(e){let t=st(e);for(let n of Ct)delete t[n];delete t["upgrade-insecure-requests"];let s=nt(e);return s&&(t["X-Forwarded-For"]=s),t}function He(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=rt(e),i=Ae(e);return Ps(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=ht({...i,...mt(),...n===t.session.storeFqdn?t.session.crawlerSignatureHeaders:{},referer:r.origin,Cookie:yt(t.session,{headers:i}),...t.type==="theme"?{Authorization:`Bearer ${t.session.storefrontToken}`}:{}})),fetch(r,{method:e.method,body:o,duplex:o?"half":void 0,redirect:"manual",headers:i}).then(a=>At(t,a)).catch(a=>{throw ae(L(a),r)})}var De=0,ks=5;function Dt(e,t){return $(s=>{let[n="/",r=""]=s.path.split("?");return Is(s)&&(t.lastRequestedPath=s.path),t.options.errorOverlay!=="silent"&&t.localThemeFileSystem.uploadErrors.size>0?Ht(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:Ae(s),replaceExtensionTemplates:fe(t),replaceTemplates:Oe(t,n,ot(s,"localization")?.toLowerCase())}).then(async i=>{if(i.status>=400&&i.status<500&&!_s(s)){let a=await Ls(s,t,i);if(a)return X(s,a,t),a}return X(s,i,t),Q(t,i,a=>(qs(i,a,String(e.id)),De=0,Ne(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)){De++,De>ks&&(et(new se(i.getMessage())),process.exit(1)),await t.session.refresh();let f=new URLSearchParams(r),x=new URLSearchParams([...f].filter(([ve])=>!ve.startsWith("__sfr"))),P=n+(x.toString()?`?${x}`:"");return new Response(null,{status:302,headers:{Location:P}})}let{status:a,statusText:u,cause:m,...c}=A(i,"Failed to render storefront"),[l,...p]=c.headline.split(`
71
71
  `);return te(c),Ht(t,{status:a,statusText:u},{title:l,header:l,errors:[{message:[...p,m.message].join("<br>"),code:m.stack?.replace(`${m.message}
72
72
  `,"")??""}]})})})}function Ht(e,t,s){let n=Ne($t(s),e);return e.options.standardEventsInspector&&(n=ue(n)),H("theme-service:error-page:rendered"),new Response(n,{...t,headers:t.headers??{"Content-Type":"text/html; charset=utf-8"}})}function _s(e){let t=new URLSearchParams(e.path.split("?")[1]);return["section_id","sections","app_block_id"].some(s=>t.has(s))}function Is(e){return e.headers.get("sec-fetch-mode")==="navigate"}async function Ls(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 He(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 qs(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{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 js={stylesheet:new Map,javascript:new Map};function Ot(e,t){return $(async s=>{if(s.method!=="GET")return;if(Ds(s,t))return Os(s,t);let{file:n,fileKey:r,isUnsynced:o}=Hs(s,t);if(!r)return;let i=U(r);if(i.startsWith("image/")&&s.path.includes("&")&&!o)return;if(ut(s,"X-Local-Asset","true"),!n){o&&M(s,W({statusCode:404,statusMessage:"Not found"}));return}let a=n.value?Buffer.from(Z(n.value,t)):Buffer.from(n.attachment??"","base64");return ie(s,{getContents:()=>a,getMeta:()=>({type:i,size:a.length,mtime:n.stats?.mtime})})})}var Cs=/^(?:\/cdn\/(?!extensions\/).*?)?\/assets\/([^?]+)/,As=/^(?:\/(?:ext\/)?cdn\/extensions\/.*?)?\/assets\/([^?]+)/;function Hs(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),u=r.unsyncedFileKeys.has(i);if(a||u)return{file:a,isUnsynced:u,fileKey:i}}};return s(Cs,t.localThemeFileSystem)??s(As,t.localThemeExtensionFileSystem)??{isUnsynced:!1,fileKey:void 0,file:void 0}}function Ds(e,t){return t.type==="theme"&&e.path.includes("/compiled_assets")}function Os(e,t){switch(ye(e).pathname.split("/").at(-1)){case"styles.css":return Ns(t,e);case"block-scripts.js":return We(t,e,"block");case"snippet-scripts.js":return We(t,e,"snippet");case"scripts.js":return We(t,e,"section");case void 0:break;default:break}}function Ns(e,t){let s=Ee(e,"section"),n=Ee(e,"block"),r=Ee(e,"snippet"),o=[`/*** GENERATED LOCALLY ***/
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 js={stylesheet:new Map,javascript:new Map};function Ot(e,t){return $(async s=>{if(s.method!=="GET")return;if(Ds(s,t))return Os(s,t);let{file:n,fileKey:r,isUnsynced:o}=Hs(s,t);if(!r)return;let i=U(r);if(i.startsWith("image/")&&s.path.includes("&")&&!o)return;if(at(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 Cs=/^(?:\/cdn\/(?!extensions\/).*?)?\/assets\/([^?]+)/,As=/^(?:\/(?:ext\/)?cdn\/extensions\/.*?)?\/assets\/([^?]+)/;function Hs(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),u=r.unsyncedFileKeys.has(i);if(a||u)return{file:a,isUnsynced:u,fileKey:i}}};return s(Cs,t.localThemeFileSystem)??s(As,t.localThemeExtensionFileSystem)??{isUnsynced:!1,fileKey:void 0,file:void 0}}function Ds(e,t){return t.type==="theme"&&e.path.includes("/compiled_assets")}function Os(e,t){switch(ye(e).pathname.split("/").at(-1)){case"styles.css":return Ns(t,e);case"block-scripts.js":return We(t,e,"block");case"snippet-scripts.js":return We(t,e,"snippet");case"scripts.js":return We(t,e,"section");case void 0:break;default:break}}function Ns(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 u=Nt(a,"stylesheet");u&&o.push(u)}let i=o.join(`
75
- `);return ie(t,{getContents:()=>i,getMeta:()=>({type:"text/css",size:Buffer.byteLength(i),mtime:new Date})})}function We(e,t,s){let n=Ee(e,s),r=`${s}s`,o=[`
75
+ `);return oe(t,{getContents:()=>i,getMeta:()=>({type:"text/css",size:Buffer.byteLength(i),mtime:new Date})})}function We(e,t,s){let n=Ee(e,s),r=`${s}s`,o=[`
76
76
  /*** GENERATED LOCALLY ***/
77
77
 
78
78
  (function () {
@@ -95,9 +95,9 @@ import{a as U,b as xt}from"./chunk-3VZEETAV.js";import{A as gt,C as _e,D as ae,E
95
95
  console.error(e);
96
96
  }
97
97
  })();`)}o.push("})();");let i=o.join(`
98
- `);return ie(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 Nt(e,t){let s=js[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}}h();import*as Wt from"node:os";function Ws(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(Wt.networkInterfaces()))for(let a of i??[]){let u=a.address.toLowerCase().split("%")[0],c=a.family==="IPv6"?`[${u}]`:u;s.add(`${c}${n}`)}return s}function Ms(e){if(e)return e.toLowerCase().replace(/\.(?=:\d|$)/,"")}function Mt(e,t){let s=Ws(e,t);return $(n=>{let r=n.node.req.headers.host,o=Ms(r);if(!o||!s.has(o))return M(n,W({statusCode:400,statusMessage:"Bad Request",message:"Invalid Host header"}))})}h();function Ut(){return Bt()}function qr(){return Bt()}function Bt(){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 Us}from"node:http";async function zr(e,t){let s=await Js(e,t);return await zs(e,s),Bs(e,s)}function Bs(e,t){let s=ft();s.use(Mt(t.options.host,t.options.port)),s.use(Jt(e,t)),s.use(Ot(e,t)),s.use(jt(e,t)),s.use(Dt(e,t));let n=Us(gt(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 Js(e,t){let{adminSession:s,storefrontPassword:n,themeExtensionPort:r,themeExtensionDirectory:o}=t,i="127.0.0.1",a=r??9293,u=Ut(),m=vt(o);return await m.ready(),{session:await Et(e.id.toString(),s,void 0,n),localThemeFileSystem:u,localThemeExtensionFileSystem:m,directory:o,type:"theme-extension",lastRequestedPath:"",options:{themeEditorSync:!1,noDelete:!1,ignore:[],only:[],host:i,port:a,liveReload:"hot-reload",standardEventsDevBundle:!1,standardEventsInspector:!1,open:!1,errorOverlay:"default"}}}async function zs(e,t){let s=t.localThemeExtensionFileSystem,n=({fileKey:r,onContent:o,onSync:i})=>{o(()=>{xe(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 we=Ye(st(),1);import Ys from"node:events";var Me=new Map,K=new Map;function zt(e,t){let s=(0,we.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 Ue(e){return!e.startsWith("assets/")&&[".liquid",".json"].includes(j(e))}function Oe(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$/,u=!!s&&(e.localThemeFileSystem.files.has(`locales/${s}.json`)||e.localThemeFileSystem.files.has(`locales/${s}.default.json`));for(let m of e.localThemeFileSystem.unsyncedFileKeys)if(Ue(m)){if(i&&r.test(m)){if(m!==o)continue}else if(a.test(m)){if(u){if(!m.startsWith(`locales/${s}.`))continue}else if(!m.includes(".default."))continue}n[m]=e.localThemeFileSystem.files.get(m)?.value??""}return n}function co(e,t){let s=({fileKey:r,onContent:o,onSync:i})=>{let a=j(r);o(u=>{!Qs(r)&&Ue(r)&&a===".json"&&zt(r,u),xe(e,t,i,{type:"update",key:r,payload:Xs(r,t)})})},n=({fileKey:r,onSync:o})=>{K.delete(r),xe(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"&&zt(o,a)}else o.endsWith(".liquid")&&Xt(i)}))})}var Gs="1",Gt=new Ys;function Re(e){Gt.emit("hot-reload",{...e,version:Gs})}function Jt(e,t){return $(s=>{let n=s.headers.get("accept")==="text/event-stream",r=ye(s).searchParams;if(n){let o=ht(s);return Gt.on("hot-reload",i=>{o.push(JSON.stringify(i)).catch(a=>{_({headline:"Failed to send HotReload event.",body:a.stack})})}),Re({type:"open",pid:String(process.pid),themeId:String(e.id)}),o.send().then(()=>o.flush())}if(r.has("hr-log")){let o=(0,we.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"?Ke(o):_({headline:`Unknown HotReload log type: ${o.type}`})),null}if(s.path===Vt)return k(Se()).then(o=>pt(s,o,"application/javascript")).catch(o=>M(s,W({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")??"",u=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 p=t.localThemeFileSystem.files.get(o)?.value;if(!p)return"";c[o]=p}for(let p of l)if(p.endsWith(".json")){for(let[f,x]of K.get(p)??[])if(i.endsWith(`__${x}`)){let P=t.localThemeFileSystem.files.get(p)?.value;P&&(c[p]=P);continue}}}return ce(t.session,{method:s.method,path:u??"/",query:[...m.entries()],themeId:String(e.id),sectionId:i,appBlockId:a,replaceTemplates:c,headers:mt(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:p,statusText:f,...x}=A(L(l),"Failed to render section on Hot Reload");return H("theme-service:hot-reload:section:render-error"),a||_(x),new Response(null,{status:p,statusText:f})})}})}var ee=(e,t)=>Re({themeId:String(e),type:"full",key:t});function xe(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);Re({sync:"local",themeId:o,...n}),s(()=>Re({sync:"remote",themeId:o,...n}),r)}function Vs(e,t){let s=new Set;if(e.endsWith(".json")){let n=t.localThemeFileSystem.files.get(e)?.value;if(n){let r=(0,we.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 Xs(e,t){let[s]=e.split("/"),n=t.localThemeFileSystem.files.get(e);return{sectionNames:s==="sections"?Vs(e,t):[],replaceTemplates:Ue(e)?Oe(t):{},updatedFileParts:n&&Xt(n)}}var Te="hot-reload-client",Zs="/cdn/shopifycloud/theme-hot-reload/theme-hot-reload.js",Yt=new RegExp(`<script id="${Te}"[^>]*>[^<]*</script>`),Vt="/@shopify/theme-hot-reload";function Ne(e,t){return t.options.liveReload==="off"?e.replace(Yt,""):process.env.SHOPIFY_CLI_LOCAL_HOT_RELOAD?e.replace(Yt,"").replace(/<\/head>/,`<script id="${Te}" src="${Vt}" defer></script></head>`):e.includes(`<script id="${Te}"`)?e:e.replace(/<\/head>/,`<script id="${Te}" src="${Zs}" defer></script></head>`)}function Qs(e){return e.startsWith("assets/")}function Xt(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=Me.get(e.key);if(o?.checksum===e.checksum||(Me.delete(e.key),!e.value))return n;let i=["stylesheet","javascript","schema"],a=c=>c?.replace(/\s+/g," ").trim(),u=e.value,m=(c,l)=>{u=u.replace(l,"");let p=a(l),f=`${c}Tag`;n[f]=!o||p!==o[f],r[f]=p};for(let c of i){let l=ge(e.value??"",c);l&&m(c,l)}return u=a(u.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=u,n.liquid=!o||u!==o.liquid,Me.set(e.key,r),n}h();var Zt=Ye(st(),1);function Ks(e){return(e.startsWith("templates/")||e.startsWith("sections/"))&&e.endsWith(".json")}async function Qt(e,t,s){if(Ks(s)){let n=E(e,"listings",t,s);if(await v(n))return n}}async function Kt(e,t){let s=E(e,"config","settings_data.json"),n=await k(s,{encoding:"utf8"}),r=(0,Zt.parseJSON)(n,null,!0);return r?(r.current=$e(t),JSON.stringify(r,null,2)):n}async function go(e,t){let s=E(e,"listings"),n=E(s,t);if(await v(n))return;let o=[];await v(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 en from"node:events";import{fileURLToPath as tn}from"node:url";var sn=250,es=["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 Co(e,t){let s=new Map,n=new Map,r=new Set,o={ignoreFromFile:[],ignore:t?.filters?.ignore??[],only:t?.filters?.only??[]},i=new en,a=(d,g)=>{i.emit(d,g)},u=t?.notify?new le(t.notify):void 0,m=async d=>{let g=t?.listing?await rn(e,d,t.listing):await pe(e,d),y=de(d,g);return s.set(d,N({key:d,checksum:y,value:typeof g=="string"?g:"",attachment:Buffer.isBuffer(g)?g.toString("base64"):""})),g},c=C(es,{cwd:e,deep:3,ignore:O}).then(d=>Promise.all([wt(e),...d.map(m)])).then(([d])=>{Array.isArray(d)&&o.ignoreFromFile.push(...d)}),l=d=>V(e,d),p=d=>Le([{key:d}],o).length===0;function f(d,g,y,T){if(process.env.SHOPIFY_CLI_LOCAL_HOT_RELOAD&&T===Se()){ee(g,T);return}let w=l(T);if(t?.listing&&w.startsWith(`listings/${t.listing}/`)){let R=w.replace(`listings/${t.listing}/`,"");if(R.startsWith("templates/")||R.startsWith("sections/"))w=R;else return}x(w).then(()=>{switch(d){case"add":case"change":return P(d,g,y,w);case"unlink":return ve(g,y,w,n)}}).catch(R=>{D(`Error handling file event for ${w}: ${R}`)})}function x(d){return u?.notify(d)??Promise.resolve()}let P=(d,g,y,T)=>{if(p(T))return;let w=s.get(T)?.checksum,R=m(T).then(async()=>{let S=s.get(T);if(S)return S.checksum!==w&&r.add(T),{value:S.value||void 0,attachment:S.attachment}}),I=R.then(S=>{if(S)return nn(r,n,T,g,y)(S)}).catch(_e(T,"upload"));a(d,{fileKey:T,onContent:S=>{R.then(Y=>{r.has(T)&&S(Y?.value??Y?.attachment??"")}).catch(()=>{})},onSync:(S,Y)=>{I.then(G=>{G?S():Y?.()}).catch(()=>{})}})},ve=(d,g,y,T)=>{if(p(y))return;T.delete(y),s.delete(y),r.add(y);let w=t?.noDelete?Promise.resolve():ot(Number(d),[y],g).then(async R=>{if(!R[0]?.success)throw new Error(`Failed to delete file "${y}" from remote theme.`);return r.delete(y),ts("delete",y),!0}).catch(R=>(_e(y,"delete")(R),!1));a("unlink",{fileKey:y,onSync:R=>{w.then(I=>{I&&R()}).catch(()=>{})}})},Pe=new Set(es.map(d=>E(e,d.split("/").shift()??"")));return t?.listing&&Pe.add(E(e,"listings",t.listing)),process.env.SHOPIFY_CLI_LOCAL_HOT_RELOAD&&Pe.add(Se()),{root:e,files:s,unsyncedFileKeys:r,uploadErrors:n,ready:()=>c,delete:async d=>{s.delete(d),await on(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),T=E(e,y),w=await v(T);s.set(d.key,N({key:d.key,checksum:d.checksum,value:d.value??"",attachment:d.attachment??""})),w?await Be(e,{...d,key:y}):await Be(e,d);return}s.set(d.key,N({key:d.key,checksum:d.checksum,value:d.value??"",attachment:d.attachment??""})),await Be(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-G4ONJSK4.js"),T=y.watch([...Pe],{ignored:O,persistent:!process.env.SHOPIFY_UNIT_TEST,ignoreInitial:!0}),w=new Map,R=(I,S)=>{let G=`${l(S)}:${I}`,ze=w.get(G);ze&&clearTimeout(ze);let ss=setTimeout(()=>{w.delete(G),f(I,d,g,S)},sn);w.set(G,ss)};T.on("add",R.bind(null,"add")).on("change",R.bind(null,"change")).on("unlink",R.bind(null,"unlink")).on("error",I=>{D(`File watcher error: ${I}`),L("theme-service:file-watcher:error")})}}}function nn(e,t,s,n,r){return async o=>{if(!e.has(s))return!1;let[i]=await it(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),ts("update",s),!0}}async function Be(e,{key:t,attachment:s,value:n}){let r=E(e,t);if(await an(r),s){let o=Buffer.from(s,"base64");await be(r,o,{encoding:"base64"})}else await be(r,n??"")}async function pe(e,t){let s=Fe(t)?{encoding:"utf8"}:{},n=E(e,t);if(!await v(n)){F(`File ${n} can't be read because it doesn't exist...`);return}return k(n,s)}async function rn(e,t,s){if(t==="config/settings_data.json")return Kt(e,s);let n=await Qt(e,s,t);if(n){let r=Fe(t)?{encoding:"utf8"}:{};return k(n,r)}return pe(e,t)}async function on(e,t){let s=E(e,t);if(!await v(s)){F(`File ${s} can't be removed because it doesn't exist...`);return}await Ze(s)}function Ao(e){let t=[],s=[],n=[],r=[],o=[],i=[],a=[],u=[],m=[],c=[],l=[];return e.forEach(p=>{let f=p.key;f.endsWith(".liquid")?b.sectionLiquidRegex.test(f)?t.push(p):b.blockLiquidRegex.test(f)?c.push(p):b.layoutLiquidRegex.test(f)?l.push(p):s.push(p):b.configSchemaRegex.test(f)?a.push(p):b.configDataRegex.test(f)?u.push(p):b.jsonRegex.test(f)?b.contextualizedJsonRegex.test(f)?i.push(p):b.sectionJsonRegex.test(f)?n.push(p):b.templateJsonRegex.test(f)?r.push(p):o.push(p):b.staticAssetRegex.test(f)&&m.push(p)}),{sectionLiquidFiles:t,otherLiquidFiles:s,sectionJsonFiles:n,templateJsonFiles:r,contextualizedJsonFiles:i,otherJsonFiles:o,configSchemaFile:a,configDataFile:u,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 Ho(e){let t=new Set(await C("*",{cwd:e,deep:1,onlyDirectories:!0}));return["config","layout","sections","templates"].every(n=>t.has(n))}async function an(e){let t=cn(e);await v(t)||await Xe(t)}function cn(e){let t=Ge(e),s=e.lastIndexOf(t);return e.substring(0,s)}function ts(e,t){re(ne`• ${oe.format(new Date)} Synced ${q.raw("\xBB")} ${e} ${t}`)}function Se(){let e=process.env.SHOPIFY_CLI_LOCAL_HOT_RELOAD;return!e||e==="true"?E(tn(import.meta.url.split("/cli/")[0]??""),"theme-hot-reload/dist/theme-hot-reload.js"):e}function de(e,t){return t?Buffer.isBuffer(t)?Je(t):un(e)?ln(t):dn(e,t):""}function ln(e){let t=e;return t=t.replace(/\r\n/g,`
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 Nt(e,t){let s=js[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}}h();import*as Wt from"node:os";function Ws(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(Wt.networkInterfaces()))for(let a of i??[]){let u=a.address.toLowerCase().split("%")[0],c=a.family==="IPv6"?`[${u}]`:u;s.add(`${c}${n}`)}return s}function Ms(e){if(e)return e.toLowerCase().replace(/\.(?=:\d|$)/,"")}function Mt(e,t){let s=Ws(e,t);return $(n=>{let r=n.node.req.headers.host,o=Ms(r);if(!o||!s.has(o))return N(n,O({statusCode:400,statusMessage:"Bad Request",message:"Invalid Host header"}))})}h();function Ut(){return Bt()}function qr(){return Bt()}function Bt(){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 Us}from"node:http";async function zr(e,t){let s=await Js(e,t);return await zs(e,s),Bs(e,s)}function Bs(e,t){let s=dt();s.use(Mt(t.options.host,t.options.port)),s.use(Jt(e,t)),s.use(Ot(e,t)),s.use(jt(e,t)),s.use(Dt(e,t));let n=Us(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 Js(e,t){let{adminSession:s,storefrontPassword:n,themeExtensionPort:r,themeExtensionDirectory:o,crawlerSignatureHeaders:i}=t,a="127.0.0.1",u=r??9293,m=Ut(),c=vt(o);return await c.ready(),{session:await Et(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:u,liveReload:"hot-reload",standardEventsDevBundle:!1,standardEventsInspector:!1,open:!1,errorOverlay:"default"}}}async function zs(e,t){let s=t.localThemeExtensionFileSystem,n=({fileKey:r,onContent:o,onSync:i})=>{o(()=>{xe(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=Ye(ut(),1);import Ys from"node:events";var Me=new Map,K=new Map;function zt(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 Ue(e){return!e.startsWith("assets/")&&[".liquid",".json"].includes(j(e))}function Oe(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$/,u=!!s&&(e.localThemeFileSystem.files.has(`locales/${s}.json`)||e.localThemeFileSystem.files.has(`locales/${s}.default.json`));for(let m of e.localThemeFileSystem.unsyncedFileKeys)if(Ue(m)){if(i&&r.test(m)){if(m!==o)continue}else if(a.test(m)){if(u){if(!m.startsWith(`locales/${s}.`))continue}else if(!m.includes(".default."))continue}n[m]=e.localThemeFileSystem.files.get(m)?.value??""}return n}function co(e,t){let s=({fileKey:r,onContent:o,onSync:i})=>{let a=j(r);o(u=>{!Qs(r)&&Ue(r)&&a===".json"&&zt(r,u),xe(e,t,i,{type:"update",key:r,payload:Xs(r,t)})})},n=({fileKey:r,onSync:o})=>{K.delete(r),xe(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"&&zt(o,a)}else o.endsWith(".liquid")&&Xt(i)}))})}var Gs="1",Gt=new Ys;function we(e){Gt.emit("hot-reload",{...e,version:Gs})}function Jt(e,t){return $(s=>{let n=s.headers.get("accept")==="text/event-stream",r=ye(s).searchParams;if(n){let o=lt(s);return Gt.on("hot-reload",i=>{o.push(JSON.stringify(i)).catch(a=>{_({headline:"Failed to send HotReload event.",body:a.stack})})}),we({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"?Ke(o):_({headline:`Unknown HotReload log type: ${o.type}`})),null}if(s.path===Vt)return k(Se()).then(o=>it(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")??"",u=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 p=t.localThemeFileSystem.files.get(o)?.value;if(!p)return"";c[o]=p}for(let p of l)if(p.endsWith(".json")){for(let[f,x]of K.get(p)??[])if(i.endsWith(`__${x}`)){let P=t.localThemeFileSystem.files.get(p)?.value;P&&(c[p]=P);continue}}}return ce(t.session,{method:s.method,path:u??"/",query:[...m.entries()],themeId:String(e.id),sectionId:i,appBlockId:a,replaceTemplates:c,headers:ct(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:p,statusText:f,...x}=A(L(l),"Failed to render section on Hot Reload");return H("theme-service:hot-reload:section:render-error"),a||_(x),new Response(null,{status:p,statusText:f})})}})}var ee=(e,t)=>we({themeId:String(e),type:"full",key:t});function xe(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);we({sync:"local",themeId:o,...n}),s(()=>we({sync:"remote",themeId:o,...n}),r)}function Vs(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 Xs(e,t){let[s]=e.split("/"),n=t.localThemeFileSystem.files.get(e);return{sectionNames:s==="sections"?Vs(e,t):[],replaceTemplates:Ue(e)?Oe(t):{},updatedFileParts:n&&Xt(n)}}var Te="hot-reload-client",Zs="/cdn/shopifycloud/theme-hot-reload/theme-hot-reload.js",Yt=new RegExp(`<script id="${Te}"[^>]*>[^<]*</script>`),Vt="/@shopify/theme-hot-reload";function Ne(e,t){return t.options.liveReload==="off"?e.replace(Yt,""):process.env.SHOPIFY_CLI_LOCAL_HOT_RELOAD?e.replace(Yt,"").replace(/<\/head>/,`<script id="${Te}" src="${Vt}" defer></script></head>`):e.includes(`<script id="${Te}"`)?e:e.replace(/<\/head>/,`<script id="${Te}" src="${Zs}" defer></script></head>`)}function Qs(e){return e.startsWith("assets/")}function Xt(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=Me.get(e.key);if(o?.checksum===e.checksum||(Me.delete(e.key),!e.value))return n;let i=["stylesheet","javascript","schema"],a=c=>c?.replace(/\s+/g," ").trim(),u=e.value,m=(c,l)=>{u=u.replace(l,"");let p=a(l),f=`${c}Tag`;n[f]=!o||p!==o[f],r[f]=p};for(let c of i){let l=ge(e.value??"",c);l&&m(c,l)}return u=a(u.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=u,n.liquid=!o||u!==o.liquid,Me.set(e.key,r),n}h();var Zt=Ye(ut(),1);function Ks(e){return(e.startsWith("templates/")||e.startsWith("sections/"))&&e.endsWith(".json")}async function Qt(e,t,s){if(Ks(s)){let n=E(e,"listings",t,s);if(await v(n))return n}}async function Kt(e,t){let s=E(e,"config","settings_data.json"),n=await k(s,{encoding:"utf8"}),r=(0,Zt.parseJSON)(n,null,!0);return r?(r.current=$e(t),JSON.stringify(r,null,2)):n}async function go(e,t){let s=E(e,"listings"),n=E(s,t);if(await v(n))return;let o=[];await v(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 en from"node:events";import{fileURLToPath as tn}from"node:url";var sn=250,es=["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 Co(e,t){let s=new Map,n=new Map,r=new Set,o={ignoreFromFile:[],ignore:t?.filters?.ignore??[],only:t?.filters?.only??[]},i=new en,a=(d,g)=>{i.emit(d,g)},u=t?.notify?new le(t.notify):void 0,m=async d=>{let g=t?.listing?await rn(e,d,t.listing):await pe(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(es,{cwd:e,deep:3,ignore:W}).then(d=>Promise.all([Rt(e),...d.map(m)])).then(([d])=>{Array.isArray(d)&&o.ignoreFromFile.push(...d)}),l=d=>V(e,d),p=d=>Le([{key:d}],o).length===0;function f(d,g,y,T){if(process.env.SHOPIFY_CLI_LOCAL_HOT_RELOAD&&T===Se()){ee(g,T);return}let R=l(T);if(t?.listing&&R.startsWith(`listings/${t.listing}/`)){let w=R.replace(`listings/${t.listing}/`,"");if(w.startsWith("templates/")||w.startsWith("sections/"))R=w;else return}x(R).then(()=>{switch(d){case"add":case"change":return P(d,g,y,R);case"unlink":return ve(g,y,R,n)}}).catch(w=>{D(`Error handling file event for ${R}: ${w}`)})}function x(d){return u?.notify(d)??Promise.resolve()}let P=(d,g,y,T)=>{if(p(T))return;let R=s.get(T)?.checksum,w=m(T).then(async()=>{let S=s.get(T);if(S)return S.checksum!==R&&r.add(T),{value:S.value||void 0,attachment:S.attachment}}),I=w.then(S=>{if(S)return nn(r,n,T,g,y)(S)}).catch(_e(T,"upload"));a(d,{fileKey:T,onContent:S=>{w.then(Y=>{r.has(T)&&S(Y?.value??Y?.attachment??"")}).catch(()=>{})},onSync:(S,Y)=>{I.then(G=>{G?S():Y?.()}).catch(()=>{})}})},ve=(d,g,y,T)=>{if(p(y))return;T.delete(y),s.delete(y),r.add(y);let R=t?.noDelete?Promise.resolve():ft(Number(d),[y],g).then(async w=>{if(!w[0]?.success)throw new Error(`Failed to delete file "${y}" from remote theme.`);return r.delete(y),ts("delete",y),!0}).catch(w=>(_e(y,"delete")(w),!1));a("unlink",{fileKey:y,onSync:w=>{R.then(I=>{I&&w()}).catch(()=>{})}})},Pe=new Set(es.map(d=>E(e,d.split("/").shift()??"")));return t?.listing&&Pe.add(E(e,"listings",t.listing)),process.env.SHOPIFY_CLI_LOCAL_HOT_RELOAD&&Pe.add(Se()),{root:e,files:s,unsyncedFileKeys:r,uploadErrors:n,ready:()=>c,delete:async d=>{s.delete(d),await on(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),T=E(e,y),R=await v(T);s.set(d.key,M({key:d.key,checksum:d.checksum,value:d.value??"",attachment:d.attachment??""})),R?await Be(e,{...d,key:y}):await Be(e,d);return}s.set(d.key,M({key:d.key,checksum:d.checksum,value:d.value??"",attachment:d.attachment??""})),await Be(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-VDIVGBZH.js"),T=y.watch([...Pe],{ignored:W,persistent:!process.env.SHOPIFY_UNIT_TEST,ignoreInitial:!0}),R=new Map,w=(I,S)=>{let G=`${l(S)}:${I}`,ze=R.get(G);ze&&clearTimeout(ze);let ss=setTimeout(()=>{R.delete(G),f(I,d,g,S)},sn);R.set(G,ss)};T.on("add",w.bind(null,"add")).on("change",w.bind(null,"change")).on("unlink",w.bind(null,"unlink")).on("error",I=>{D(`File watcher error: ${I}`),L("theme-service:file-watcher:error")})}}}function nn(e,t,s,n,r){return async o=>{if(!e.has(s))return!1;let[i]=await gt(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),ts("update",s),!0}}async function Be(e,{key:t,attachment:s,value:n}){let r=E(e,t);if(await an(r),s){let o=Buffer.from(s,"base64");await be(r,o,{encoding:"base64"})}else await be(r,n??"")}async function pe(e,t){let s=Fe(t)?{encoding:"utf8"}:{},n=E(e,t);if(!await v(n)){F(`File ${n} can't be read because it doesn't exist...`);return}return k(n,s)}async function rn(e,t,s){if(t==="config/settings_data.json")return Kt(e,s);let n=await Qt(e,s,t);if(n){let r=Fe(t)?{encoding:"utf8"}:{};return k(n,r)}return pe(e,t)}async function on(e,t){let s=E(e,t);if(!await v(s)){F(`File ${s} can't be removed because it doesn't exist...`);return}await Ze(s)}function Ao(e){let t=[],s=[],n=[],r=[],o=[],i=[],a=[],u=[],m=[],c=[],l=[];return e.forEach(p=>{let f=p.key;f.endsWith(".liquid")?b.sectionLiquidRegex.test(f)?t.push(p):b.blockLiquidRegex.test(f)?c.push(p):b.layoutLiquidRegex.test(f)?l.push(p):s.push(p):b.configSchemaRegex.test(f)?a.push(p):b.configDataRegex.test(f)?u.push(p):b.jsonRegex.test(f)?b.contextualizedJsonRegex.test(f)?i.push(p):b.sectionJsonRegex.test(f)?n.push(p):b.templateJsonRegex.test(f)?r.push(p):o.push(p):b.staticAssetRegex.test(f)&&m.push(p)}),{sectionLiquidFiles:t,otherLiquidFiles:s,sectionJsonFiles:n,templateJsonFiles:r,contextualizedJsonFiles:i,otherJsonFiles:o,configSchemaFile:a,configDataFile:u,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 Ho(e){let t=new Set(await C("*",{cwd:e,deep:1,onlyDirectories:!0}));return["config","layout","sections","templates"].every(n=>t.has(n))}async function an(e){let t=cn(e);await v(t)||await Xe(t)}function cn(e){let t=Ge(e),s=e.lastIndexOf(t);return e.substring(0,s)}function ts(e,t){re(ne`• ${ie.format(new Date)} Synced ${q.raw("\xBB")} ${e} ${t}`)}function Se(){let e=process.env.SHOPIFY_CLI_LOCAL_HOT_RELOAD;return!e||e==="true"?E(tn(import.meta.url.split("/cli/")[0]??""),"theme-hot-reload/dist/theme-hot-reload.js"):e}function de(e,t){return t?Buffer.isBuffer(t)?Je(t):un(e)?ln(t):dn(e,t):""}function ln(e){let t=e;return t=t.replace(/\r\n/g,`
101
101
  `),t=t.replace(/\/\*[\s\S]*?\*\//,""),t=pn(t),Je(t)}function dn(e,t){let s=t;return Fe(e)&&(s=s.replace(/\r\n/g,`
102
102
  `)),Je(s)}function pn(e){let t=!1,s=!1,n="";for(let r of e)r==='"'&&!s&&(t=!t),!(!t&&(r===" "||r===`
103
103
  `))&&(n+=r,s=r==="\\"&&!s);return n}function Je(e){let t=Buffer.isBuffer(e)?e:Buffer.from(e);return Qe(t)}function Mo(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 un(e){return e.endsWith("/settings_data.json")}export{Mo as a,jt as b,Dt as c,Ot as d,Mt as e,qr as f,zr as g,co as h,Jt as i,ee as j,go as k,Co as l,Ao as m,Ho as n};