@shopify/cli 4.0.0 → 4.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (392) hide show
  1. package/README.md +2 -2
  2. package/dist/analytics-CX22YIUZ.js +1 -0
  3. package/dist/analytics-UBWQIQYF.js +1 -0
  4. package/dist/angular-UTTM4Y4S.js +4 -0
  5. package/dist/bootstrap.js +1 -1
  6. package/dist/{chunk-DU4WR4OP.js → chunk-23AMFHXC.js} +1 -1
  7. package/dist/{chunk-LNHLDRC5.js → chunk-2EJCY4CE.js} +1 -1
  8. package/dist/{chunk-YMWHHINU.js → chunk-2KH2S7PI.js} +1 -1
  9. package/dist/chunk-2N4O33VM.js +6 -0
  10. package/dist/{chunk-WZBSLU4Q.js → chunk-2VLMN5QZ.js} +1 -1
  11. package/dist/chunk-2WNODIWJ.js +1 -0
  12. package/dist/chunk-2YXKZWYW.js +1 -0
  13. package/dist/{chunk-GFJ7UV74.js → chunk-3BRUCKZ2.js} +1 -1
  14. package/dist/{chunk-RM5SJJN6.js → chunk-3V63X7WZ.js} +66 -66
  15. package/dist/chunk-3YWUSKWF.js +159 -0
  16. package/dist/chunk-42RMKTCJ.js +8 -0
  17. package/dist/{chunk-V2CNCPIE.js → chunk-4EXYYBQ6.js} +1 -1
  18. package/dist/chunk-4KRT35A2.js +1 -0
  19. package/dist/chunk-4V4DQ6W7.js +836 -0
  20. package/dist/chunk-4Z2WYNTE.js +1 -0
  21. package/dist/chunk-57N2DFIF.js +1 -0
  22. package/dist/chunk-5TIJLYZU.js +3 -0
  23. package/dist/{chunk-GNPS5SBU.js → chunk-6AJZKIZ3.js} +1 -1
  24. package/dist/{chunk-XNO6DZYP.js → chunk-6HZTMQD6.js} +1 -1
  25. package/dist/chunk-6LK6ZP3Q.js +1 -0
  26. package/dist/chunk-6SXOUZ7V.js +1 -0
  27. package/dist/chunk-6TEXPRI2.js +2 -0
  28. package/dist/{chunk-OUOYKNMY.js → chunk-6TORWTD7.js} +1 -1
  29. package/dist/{chunk-IASVAERO.js → chunk-6YAXFS6V.js} +1 -1
  30. package/dist/chunk-6YHJ554P.js +6 -0
  31. package/dist/chunk-6ZIOYXEF.js +3 -0
  32. package/dist/chunk-7BFDUVOG.js +1 -0
  33. package/dist/chunk-7DVOSOEP.js +11 -0
  34. package/dist/chunk-7JESXDF2.js +14 -0
  35. package/dist/chunk-7KJ5TBWG.js +5 -0
  36. package/dist/{chunk-7MUKLZOL.js → chunk-A3VYI4LO.js} +2 -2
  37. package/dist/{chunk-4HHXSMD7.js → chunk-A5SQCM63.js} +2 -2
  38. package/dist/chunk-A6X2IVGT.js +4 -0
  39. package/dist/{chunk-HUZUORYM.js → chunk-AP3RFOPL.js} +10 -10
  40. package/dist/{chunk-3LVGAQB4.js → chunk-ATPFTRCC.js} +1 -1
  41. package/dist/chunk-AWQ5AR2K.js +5 -0
  42. package/dist/chunk-BECEP46I.js +16 -0
  43. package/dist/{chunk-JPGO36XP.js → chunk-BHWEA4V2.js} +1 -1
  44. package/dist/chunk-BPVZ7E63.js +1 -0
  45. package/dist/chunk-C2FFA4O4.js +1 -0
  46. package/dist/chunk-C3LZPAAH.js +3 -0
  47. package/dist/chunk-C6ABJCRG.js +1 -0
  48. package/dist/chunk-CCEA5CUX.js +1 -0
  49. package/dist/chunk-CE6FKJFS.js +1 -0
  50. package/dist/chunk-CW7WJZKR.js +28 -0
  51. package/dist/chunk-D3DDLLNF.js +2 -0
  52. package/dist/chunk-D656BV5Z.js +25 -0
  53. package/dist/chunk-DCBYHVKW.js +1 -0
  54. package/dist/{chunk-RF2DPBA6.js → chunk-DCK2FX6J.js} +1 -1
  55. package/dist/chunk-DERA4K6A.js +32 -0
  56. package/dist/chunk-DNLOSMHL.js +3 -0
  57. package/dist/chunk-E2YBU6D3.js +294 -0
  58. package/dist/{chunk-INEU4XKS.js → chunk-F47MFBKM.js} +1 -1
  59. package/dist/chunk-F6T3UBBL.js +1 -0
  60. package/dist/{chunk-WXVZJJOR.js → chunk-FBVBO5YQ.js} +1 -1
  61. package/dist/chunk-FD5S2O6M.js +7 -0
  62. package/dist/chunk-FFYYJKF7.js +1 -0
  63. package/dist/{chunk-LX3ZOW52.js → chunk-FGVC22EY.js} +1 -1
  64. package/dist/{chunk-NRAFVIU3.js → chunk-FP2NOZSD.js} +1 -1
  65. package/dist/chunk-FQDRVPCY.js +2 -0
  66. package/dist/{chunk-IOLVEXM6.js → chunk-FSTCEWXX.js} +1 -1
  67. package/dist/chunk-FTN7Y6HD.js +7 -0
  68. package/dist/{chunk-52GC6XUT.js → chunk-GVITHCQJ.js} +1 -1
  69. package/dist/chunk-H4W4DFKK.js +1 -0
  70. package/dist/{chunk-72F3YBNA.js → chunk-HD5TYIDZ.js} +1 -1
  71. package/dist/chunk-HHXHOQQP.js +3 -0
  72. package/dist/chunk-HJSYHK4S.js +8 -0
  73. package/dist/chunk-HLMFVORT.js +1 -0
  74. package/dist/chunk-HSYRYSX4.js +3 -0
  75. package/dist/chunk-I3LX25MB.js +1 -0
  76. package/dist/chunk-INFBVFMU.js +4 -0
  77. package/dist/chunk-IOQQUHST.js +18 -0
  78. package/dist/chunk-IVGWFPMA.js +19 -0
  79. package/dist/chunk-IWCPQD7X.js +1382 -0
  80. package/dist/chunk-IWE4RUI7.js +1 -0
  81. package/dist/chunk-IXUVSFW2.js +1 -0
  82. package/dist/chunk-J6VTZEE2.js +15 -0
  83. package/dist/{chunk-MQNYGGAM.js → chunk-K3PGC6DC.js} +1 -1
  84. package/dist/{chunk-MBAFWQSZ.js → chunk-K77WAKOB.js} +1 -1
  85. package/dist/{chunk-UGDBJTLP.js → chunk-K7K6GNF6.js} +1 -1
  86. package/dist/chunk-KFCGMT67.js +1 -0
  87. package/dist/chunk-KLA7AWG6.js +7 -0
  88. package/dist/{chunk-6B53BWJW.js → chunk-KQU6HOJ3.js} +1 -1
  89. package/dist/{chunk-A74GETYC.js → chunk-KU5OPV7U.js} +1 -1
  90. package/dist/chunk-L2VSSINY.js +1 -0
  91. package/dist/chunk-LCCMXY6N.js +1 -0
  92. package/dist/{chunk-GOJ2QHSR.js → chunk-LITB5QQX.js} +1 -1
  93. package/dist/chunk-LKS47US7.js +8 -0
  94. package/dist/{chunk-DJONKJSZ.js → chunk-LQMSF3F7.js} +1 -1
  95. package/dist/chunk-LTWXTDDR.js +5 -0
  96. package/dist/{chunk-D6JARNEH.js → chunk-M2TJICTB.js} +1 -1
  97. package/dist/chunk-M4LOKANA.js +1 -0
  98. package/dist/chunk-M4V2OQAX.js +1 -0
  99. package/dist/chunk-MA52QGHP.js +1 -0
  100. package/dist/chunk-MFLBTJO7.js +1 -0
  101. package/dist/chunk-MGL4YM3S.js +28 -0
  102. package/dist/{chunk-6TZAAS5H.js → chunk-MIO2CV3Q.js} +1 -1
  103. package/dist/{chunk-2APPXD5Z.js → chunk-MKE434RB.js} +1 -1
  104. package/dist/chunk-MZJRNFAU.js +1 -0
  105. package/dist/{chunk-HSK7YMRE.js → chunk-N3YWHJMB.js} +11 -11
  106. package/dist/{chunk-TQYMC7TH.js → chunk-N5ROZKPZ.js} +1 -1
  107. package/dist/chunk-NBYS6YQ2.js +5 -0
  108. package/dist/chunk-NEZEHBT2.js +1 -0
  109. package/dist/chunk-NO5KVFTV.js +22 -0
  110. package/dist/{chunk-3DQIVE24.js → chunk-NP4UFPAX.js} +1 -1
  111. package/dist/chunk-NPM3MFB3.js +7 -0
  112. package/dist/{chunk-JVIKCGDY.js → chunk-NXL6LDJU.js} +1 -1
  113. package/dist/chunk-OA4P6AKS.js +1 -0
  114. package/dist/chunk-OKNBZSGN.js +2 -0
  115. package/dist/chunk-OKOYLEA7.js +278 -0
  116. package/dist/chunk-OLOBQ42K.js +1 -0
  117. package/dist/chunk-OYP7DKPU.js +1 -0
  118. package/dist/{chunk-7UYZQN4V.js → chunk-PBTXPBI6.js} +2 -2
  119. package/dist/chunk-PLQFX5ZP.js +9 -0
  120. package/dist/{chunk-JLBH7RCF.js → chunk-PS25FEBF.js} +1 -1
  121. package/dist/{chunk-OLZHWPZP.js → chunk-PSQFZAF3.js} +1 -1
  122. package/dist/chunk-PUTZFF2Z.js +613 -0
  123. package/dist/chunk-QLQGHMVU.js +15 -0
  124. package/dist/{chunk-XLELNRFF.js → chunk-QTGMS62F.js} +1 -1
  125. package/dist/chunk-R6JNXEB3.js +1 -0
  126. package/dist/chunk-RAH5NW3R.js +1 -0
  127. package/dist/{chunk-R466TU3N.js → chunk-RGNAWKD7.js} +1 -1
  128. package/dist/chunk-RL5BWZ7D.js +15 -0
  129. package/dist/{chunk-Y5JKV2AI.js → chunk-RVMB5LC2.js} +1 -1
  130. package/dist/chunk-SSM346XI.js +5 -0
  131. package/dist/chunk-T5MK7ZSF.js +1 -0
  132. package/dist/{chunk-22PCRFG4.js → chunk-TGACBJIY.js} +1 -1
  133. package/dist/{chunk-KBQ4LGFB.js → chunk-TLSAQ6FG.js} +1 -1
  134. package/dist/chunk-TNQXTZAX.js +32 -0
  135. package/dist/{chunk-ELVFJ7BR.js → chunk-TQGTEVSR.js} +1 -1
  136. package/dist/chunk-TXUTT6UA.js +17 -0
  137. package/dist/chunk-U3ZG675O.js +5 -0
  138. package/dist/chunk-UARVYVLN.js +3 -0
  139. package/dist/chunk-UBKVCI7A.js +3 -0
  140. package/dist/{chunk-SRCQVUMC.js → chunk-UCLSPAVX.js} +1 -1
  141. package/dist/chunk-ULQG3XQS.js +1 -0
  142. package/dist/chunk-UOQ75BL3.js +1 -0
  143. package/dist/{chunk-OXPWCC7I.js → chunk-UOQQNAHX.js} +2 -2
  144. package/dist/chunk-UURFVUAH.js +11 -0
  145. package/dist/chunk-VA5IUGZV.js +2 -0
  146. package/dist/{chunk-YZDDTYTU.js → chunk-VEDZUOVI.js} +3 -3
  147. package/dist/chunk-VICNWPLQ.js +567 -0
  148. package/dist/chunk-VPL2NDH6.js +370 -0
  149. package/dist/chunk-VT77EFRL.js +10 -0
  150. package/dist/chunk-VYXVYOIJ.js +3 -0
  151. package/dist/chunk-WCWNI3ZV.js +283 -0
  152. package/dist/chunk-WNGV4JQS.js +4 -0
  153. package/dist/chunk-WUK5NQSX.js +6 -0
  154. package/dist/chunk-X2TC7S57.js +103 -0
  155. package/dist/chunk-X4CV6TRE.js +1 -0
  156. package/dist/chunk-XDAOLCPN.js +4 -0
  157. package/dist/chunk-XFKCDWXB.js +5 -0
  158. package/dist/chunk-XP6IRAZN.js +1 -0
  159. package/dist/{chunk-JGXWQULI.js → chunk-XX343DDG.js} +1 -1
  160. package/dist/{chunk-Q7ING5F5.js → chunk-XXE7667M.js} +1 -1
  161. package/dist/chunk-YGMVL6NZ.js +6 -0
  162. package/dist/chunk-YJB7P2HC.js +1 -0
  163. package/dist/{chunk-P6XE4MH5.js → chunk-YS6VOQ7I.js} +1 -1
  164. package/dist/chunk-ZZYFG22L.js +26 -0
  165. package/dist/cli/commands/app/app-logs/sources.js +1 -2
  166. package/dist/cli/commands/app/build.js +1 -1
  167. package/dist/cli/commands/app/bulk/cancel.js +1 -1
  168. package/dist/cli/commands/app/bulk/execute.js +1 -9
  169. package/dist/cli/commands/app/bulk/status.js +1 -5
  170. package/dist/cli/commands/app/config/link.js +1 -4
  171. package/dist/cli/commands/app/config/pull.js +1 -1
  172. package/dist/cli/commands/app/config/use.js +1 -1
  173. package/dist/cli/commands/app/config/validate.js +1 -3
  174. package/dist/cli/commands/app/demo/watcher.js +1 -1
  175. package/dist/cli/commands/app/deploy.js +1 -22
  176. package/dist/cli/commands/app/dev/clean.js +1 -5
  177. package/dist/cli/commands/app/dev.js +1 -320
  178. package/dist/cli/commands/app/env/pull.js +1 -11
  179. package/dist/cli/commands/app/env/show.js +1 -1
  180. package/dist/cli/commands/app/execute.js +1 -1
  181. package/dist/cli/commands/app/function/build.js +1 -1
  182. package/dist/cli/commands/app/function/info.js +1 -16
  183. package/dist/cli/commands/app/function/replay.js +1 -5
  184. package/dist/cli/commands/app/function/run.js +1 -1
  185. package/dist/cli/commands/app/function/schema.js +1 -1
  186. package/dist/cli/commands/app/function/typegen.js +1 -1
  187. package/dist/cli/commands/app/generate/extension.js +1 -5
  188. package/dist/cli/commands/app/import-custom-data-definitions.js +1 -4
  189. package/dist/cli/commands/app/import-extensions.js +1 -1
  190. package/dist/cli/commands/app/info.js +1 -11
  191. package/dist/cli/commands/app/init.js +1 -10
  192. package/dist/cli/commands/app/logs.js +1 -2
  193. package/dist/cli/commands/app/release.js +1 -4
  194. package/dist/cli/commands/app/versions/list.js +1 -1
  195. package/dist/cli/commands/app/webhook/trigger.js +1 -25
  196. package/dist/cli/commands/auth/login.js +1 -1
  197. package/dist/cli/commands/auth/logout.js +1 -1
  198. package/dist/cli/commands/cache/clear.js +1 -1
  199. package/dist/cli/commands/config/autoupgrade/off.js +1 -1
  200. package/dist/cli/commands/config/autoupgrade/on.js +1 -1
  201. package/dist/cli/commands/config/autoupgrade/status.js +1 -1
  202. package/dist/cli/commands/debug/command-flags.js +1 -1
  203. package/dist/cli/commands/docs/generate.d.ts +0 -8
  204. package/dist/cli/commands/docs/generate.js +1 -1
  205. package/dist/cli/commands/doctor-release/doctor-release.js +1 -1
  206. package/dist/cli/commands/doctor-release/theme/index.js +1 -1
  207. package/dist/cli/commands/help.js +1 -1
  208. package/dist/cli/commands/kitchen-sink/async.js +1 -1
  209. package/dist/cli/commands/kitchen-sink/index.js +1 -1
  210. package/dist/cli/commands/kitchen-sink/prompts.js +1 -1
  211. package/dist/cli/commands/kitchen-sink/static.js +1 -1
  212. package/dist/cli/commands/notifications/generate.js +1 -1
  213. package/dist/cli/commands/notifications/list.js +1 -1
  214. package/dist/cli/commands/organization/list.js +1 -1
  215. package/dist/cli/commands/search.js +1 -1
  216. package/dist/cli/commands/theme/check.js +1 -1
  217. package/dist/cli/commands/theme/console.js +1 -15
  218. package/dist/cli/commands/theme/delete.js +1 -7
  219. package/dist/cli/commands/theme/dev.js +1 -26
  220. package/dist/cli/commands/theme/duplicate.js +1 -32
  221. package/dist/cli/commands/theme/info.js +1 -1
  222. package/dist/cli/commands/theme/init.js +1 -8
  223. package/dist/cli/commands/theme/language-server.js +1 -1
  224. package/dist/cli/commands/theme/list.js +1 -1
  225. package/dist/cli/commands/theme/metafields/pull.js +1 -3
  226. package/dist/cli/commands/theme/open.js +1 -8
  227. package/dist/cli/commands/theme/package.js +1 -7
  228. package/dist/cli/commands/theme/preview.js +1 -1
  229. package/dist/cli/commands/theme/profile.js +1 -3
  230. package/dist/cli/commands/theme/publish.js +1 -7
  231. package/dist/cli/commands/theme/pull.js +1 -3
  232. package/dist/cli/commands/theme/push.js +1 -28
  233. package/dist/cli/commands/theme/rename.js +1 -6
  234. package/dist/cli/commands/theme/share.js +1 -3
  235. package/dist/cli/commands/upgrade.js +1 -1
  236. package/dist/cli/commands/version.js +1 -1
  237. package/dist/command-registry.js +1 -1
  238. package/dist/conf-store-6QNH5BID.js +1 -0
  239. package/dist/configs/all.yml +3 -0
  240. package/dist/configs/recommended.yml +3 -0
  241. package/dist/{custom-oclif-loader-DVFFWCBV.js → custom-oclif-loader-TSPWW5YF.js} +1 -1
  242. package/dist/data/filters.json +60 -0
  243. package/dist/data/latest.json +1 -1
  244. package/dist/data/setting.json +29 -9
  245. package/dist/data/shopify_system_translations.json +71 -19
  246. package/dist/data/tags.json +3 -3
  247. package/dist/deprecations-F6JWVV2W.js +1 -0
  248. package/dist/{devtools-OLOT2NY4.js → devtools-HCKYP7DQ.js} +1 -1
  249. package/dist/{devtools-UFRKBFGI.js → devtools-VEZNCV6W.js} +1 -1
  250. package/dist/dist-4BD6KOLR.js +1 -0
  251. package/dist/dist-AUABCVPI.js +1 -0
  252. package/dist/environments-RGLI75HN.js +1 -0
  253. package/dist/error-OZALZZ3U.js +1 -0
  254. package/dist/error-handler-V7LSEXHM.js +1 -0
  255. package/dist/{estree-KI7NUW53.js → estree-BYYJYS3A.js} +1 -1
  256. package/dist/fs-YMUQ6JLE.js +1 -0
  257. package/dist/hooks/app-init.js +1 -1
  258. package/dist/hooks/did-you-mean.js +1 -1
  259. package/dist/hooks/hydrogen-init.js +1 -1
  260. package/dist/hooks/plugin-plugins.js +1 -1
  261. package/dist/hooks/postrun.js +1 -1
  262. package/dist/hooks/prerun.js +1 -1
  263. package/dist/hooks/public-metadata.js +1 -1
  264. package/dist/hooks/sensitive-metadata.js +1 -1
  265. package/dist/hooks/tunnel-provider.js +1 -1
  266. package/dist/hooks/tunnel-start.js +1 -1
  267. package/dist/html-HETICZ2F.js +25 -0
  268. package/dist/index.js +9 -1182
  269. package/dist/is-global-BLIZ57HQ.js +1 -0
  270. package/dist/is-wsl-TN2CXYI7.js +1 -0
  271. package/dist/{latest-version-EFWBOTWM.js → latest-version-6OAYLOBL.js} +1 -1
  272. package/dist/{lib-QB6I6CTC.js → lib-AK5EOIKR.js} +1 -1
  273. package/dist/{lib-C3VO2BQW.js → lib-LVUMLZ4H.js} +1 -1
  274. package/dist/lib-ME6554NA.js +1 -0
  275. package/dist/local-GPDAXHE6.js +1 -0
  276. package/dist/local-storage-P66KJG6I.js +1 -0
  277. package/dist/{markdown-PLKL4IZK.js → markdown-5TVCXM53.js} +1 -1
  278. package/dist/{metadata-UDMOTRS7.js → metadata-TRH25EHU.js} +1 -1
  279. package/dist/{morph-EMYAITFM.js → morph-I35VYPBH.js} +4 -4
  280. package/dist/node-package-manager-GO4ZRTKQ.js +1 -0
  281. package/dist/notifications-system-HM6JZ6WJ.js +1 -0
  282. package/dist/{npa-ICFSA3NL.js → npa-VNALV7XY.js} +1 -1
  283. package/dist/output-7IYOMPSA.js +1 -0
  284. package/dist/{postcss-3FJQPJI2.js → postcss-IIK6CGAW.js} +1 -1
  285. package/dist/{prettier-NVRHEAFO.js → prettier-ZSBNNQTK.js} +1 -1
  286. package/dist/system-X5C4EQQH.js +1 -0
  287. package/dist/tsconfig.tsbuildinfo +1 -1
  288. package/dist/ui-H62CMRLG.js +1 -0
  289. package/dist/upgrade-EEOPH464.js +1 -0
  290. package/dist/version-76NBQR4K.js +1 -0
  291. package/dist/version-IGSEISUA.js +1 -0
  292. package/dist/{workerd-L2EJKIAQ.js → workerd-ST6XJKUN.js} +1 -1
  293. package/oclif.manifest.json +142 -7
  294. package/package.json +14 -11
  295. package/dist/analytics-6IHHYAV6.js +0 -1
  296. package/dist/analytics-KKVP5DT3.js +0 -1
  297. package/dist/angular-VRDO2DBE.js +0 -4
  298. package/dist/chunk-26D72ZNV.js +0 -1
  299. package/dist/chunk-2I4PRX2I.js +0 -1
  300. package/dist/chunk-2VQJQ36C.js +0 -103
  301. package/dist/chunk-323UTVMM.js +0 -1
  302. package/dist/chunk-3F6NZK7S.js +0 -2
  303. package/dist/chunk-4G7J6HIV.js +0 -1
  304. package/dist/chunk-66RJ5T7A.js +0 -102
  305. package/dist/chunk-6BMMB2UO.js +0 -1
  306. package/dist/chunk-6HBRBQAN.js +0 -6
  307. package/dist/chunk-74HYYXXE.js +0 -17
  308. package/dist/chunk-7BGM2GAH.js +0 -1
  309. package/dist/chunk-AIV5RI3X.js +0 -1
  310. package/dist/chunk-AKML26N3.js +0 -7
  311. package/dist/chunk-ALKTLKQ6.js +0 -5
  312. package/dist/chunk-B2EHO7ZC.js +0 -847
  313. package/dist/chunk-B2IVY4V5.js +0 -1
  314. package/dist/chunk-BDVAE5MS.js +0 -28
  315. package/dist/chunk-CERXUPGC.js +0 -14
  316. package/dist/chunk-D3TSJA5S.js +0 -1
  317. package/dist/chunk-DFMQWJQ3.js +0 -3
  318. package/dist/chunk-DJQVNH7P.js +0 -567
  319. package/dist/chunk-ELYP4KFP.js +0 -8
  320. package/dist/chunk-FFQ5EWII.js +0 -294
  321. package/dist/chunk-FUOIGXI4.js +0 -1
  322. package/dist/chunk-GD7FWXJ5.js +0 -2
  323. package/dist/chunk-GFEAKSGV.js +0 -374
  324. package/dist/chunk-IIIVWD4R.js +0 -1
  325. package/dist/chunk-IX5ICOBV.js +0 -7
  326. package/dist/chunk-J3KVONB3.js +0 -6
  327. package/dist/chunk-JHPRFW5B.js +0 -19
  328. package/dist/chunk-K2WUCOQJ.js +0 -32
  329. package/dist/chunk-K5YV6UVF.js +0 -4
  330. package/dist/chunk-KGXQS7LS.js +0 -1
  331. package/dist/chunk-KL5Z3T6L.js +0 -1
  332. package/dist/chunk-KNVM7N3U.js +0 -1
  333. package/dist/chunk-KWJ562F2.js +0 -12
  334. package/dist/chunk-LALIKZPS.js +0 -5
  335. package/dist/chunk-LAZJ47DZ.js +0 -6
  336. package/dist/chunk-LDGAHMS7.js +0 -159
  337. package/dist/chunk-LW7U753G.js +0 -1
  338. package/dist/chunk-LXFJDCNG.js +0 -1
  339. package/dist/chunk-N5YIPQ6J.js +0 -1
  340. package/dist/chunk-N7RBSKYT.js +0 -1
  341. package/dist/chunk-NF2ABOOU.js +0 -1
  342. package/dist/chunk-ODNGDO4H.js +0 -50
  343. package/dist/chunk-OHY4ZL3U.js +0 -2
  344. package/dist/chunk-P5VVOLGV.js +0 -1
  345. package/dist/chunk-P7R7FBY2.js +0 -3
  346. package/dist/chunk-QRRNOVJ3.js +0 -1
  347. package/dist/chunk-RFG5RMPL.js +0 -1
  348. package/dist/chunk-RVNMVBPM.js +0 -1
  349. package/dist/chunk-SBEZBZM7.js +0 -144
  350. package/dist/chunk-SGQ6D3LU.js +0 -15
  351. package/dist/chunk-TFSBQ4RY.js +0 -5
  352. package/dist/chunk-UGXYQ23Y.js +0 -1411
  353. package/dist/chunk-VS3T5YOG.js +0 -264
  354. package/dist/chunk-VWYM4OWK.js +0 -1
  355. package/dist/chunk-VY6SNDKW.js +0 -3
  356. package/dist/chunk-WFXRSKRK.js +0 -1
  357. package/dist/chunk-XBXMPFXM.js +0 -1
  358. package/dist/chunk-YC6G4MHD.js +0 -3
  359. package/dist/chunk-YI232QLS.js +0 -1
  360. package/dist/chunk-ZTMSBSYD.js +0 -1
  361. package/dist/chunk-ZV6NCNI4.js +0 -586
  362. package/dist/chunk-ZVJVDCIM.js +0 -1
  363. package/dist/conf-store-U5ZITKJN.js +0 -1
  364. package/dist/deprecations-TU5UQJVV.js +0 -1
  365. package/dist/dist-2Z5TND4U.js +0 -1
  366. package/dist/dist-GYHFDHKP.js +0 -1
  367. package/dist/environments-Z5PR7DSI.js +0 -1
  368. package/dist/error-IJGNYKZ3.js +0 -1
  369. package/dist/error-handler-WSCGNS2P.js +0 -1
  370. package/dist/fs-5BDEA2KD.js +0 -1
  371. package/dist/html-VSSXOZOQ.js +0 -25
  372. package/dist/is-global-V4ZRHQG2.js +0 -1
  373. package/dist/is-wsl-FVUIXDOK.js +0 -1
  374. package/dist/lib-5L7UKDEK.js +0 -1
  375. package/dist/local-6QPX4GCJ.js +0 -1
  376. package/dist/local-storage-JLXBZVWO.js +0 -1
  377. package/dist/node-package-manager-HAFRYGUM.js +0 -1
  378. package/dist/notifications-system-MP7WDOCS.js +0 -1
  379. package/dist/output-YGMHXEIS.js +0 -1
  380. package/dist/system-KLXD4FXF.js +0 -1
  381. package/dist/ui-GHG3UGB3.js +0 -1
  382. package/dist/upgrade-OPZGPM5J.js +0 -1
  383. package/dist/version-D5PJZIRW.js +0 -1
  384. package/dist/version-KRQBMYCH.js +0 -1
  385. /package/dist/{acorn-LOOAJL3S.js → acorn-QBS5IYTX.js} +0 -0
  386. /package/dist/{babel-URCL33XX.js → babel-JS32NLHY.js} +0 -0
  387. /package/dist/{flow-MLHT7MTJ.js → flow-M3Q2HPQT.js} +0 -0
  388. /package/dist/{glimmer-HAJ4HQCW.js → glimmer-3DEJJGOJ.js} +0 -0
  389. /package/dist/{graphql-F7IHGXDT.js → graphql-A4HHE3MB.js} +0 -0
  390. /package/dist/{meriyah-AYZQ3BGY.js → meriyah-23OZNYWC.js} +0 -0
  391. /package/dist/{typescript-ODJ335NU.js → typescript-YKZ232QT.js} +0 -0
  392. /package/dist/{yaml-BIHS2GQW.js → yaml-SJKIH3VD.js} +0 -0
@@ -1 +0,0 @@
1
- import{Ba as C,n as w}from"./chunk-SBEZBZM7.js";import{B as I}from"./chunk-BDVAE5MS.js";import{d as s}from"./chunk-JPGO36XP.js";import{r as D}from"./chunk-LDGAHMS7.js";import{Ib as f,Mb as T,Nb as P,Ta as d,ua as F}from"./chunk-GFEAKSGV.js";import{a as v}from"./chunk-YC6G4MHD.js";import{d as p,f as y,q as S}from"./chunk-IU2ZQ6TE.js";import{e as G,g as m}from"./chunk-VPRTJUIN.js";m();async function x(i){let{extension:t,stdout:n,developerPlatformClient:r,app:o,orgId:e}=i,c=o.configuration.client_id,{api_version:a,type:l,targeting:u}=t.configuration,b=await(!!u?.length?E({localIdentifier:t.localIdentifier,developerPlatformClient:r,apiKey:c,target:u[0].target,version:a,orgId:e}):O({localIdentifier:t.localIdentifier,developerPlatformClient:r,apiKey:c,type:l,version:a,orgId:e})),h=w(b,a);if(n)T(h);else{let g=p(t.directory,"schema.graphql");await F(g,h),P(`GraphQL Schema for ${t.localIdentifier} written to ${g}`)}}async function E({localIdentifier:i,developerPlatformClient:t,apiKey:n,target:r,version:o,orgId:e}){let c={handle:r,version:o},a=await t.targetSchemaDefinition(c,n,e);if(!a)throw new s(f`A schema could not be generated for ${i}`,f`Check that the Function targets and version are valid.`);return a}async function O({localIdentifier:i,developerPlatformClient:t,apiKey:n,version:r,type:o,orgId:e}){let c={version:r,type:o},a=await t.apiSchemaDefinition(c,n,e);if(!a)throw new s(f`A schema could not be generated for ${i}`,f`Check that the Function API type and version are valid.`);return a}m();var A=G(D(),1);var J={path:A.Flags.string({hidden:!1,description:"The path to your function directory.",parse:async i=>y(i),default:async()=>S(),noCacheDefault:!0,env:"SHOPIFY_FLAG_PATH"})};async function M(i,t){let n=i.allExtensions.filter(o=>o.isFunctionExtension),r=n.find(o=>o.directory===t);if(r)return r;if(n.length===1&&n[0])return n[0];if(v())return await I({message:"Which function?",choices:n.map(e=>({label:e.handle,value:e}))});throw new s("Run this command from a function directory or use `--path` to specify a function directory.")}async function N(i,t,n,r,o){let e=p(i.directory,"schema.graphql");if(await d(e))return e;let{app:c,developerPlatformClient:a,organization:l}=await C({directory:t,clientId:n,forceRelink:r,userProvidedConfigName:o});return await x({app:c,developerPlatformClient:a,extension:i,stdout:!1,orgId:l.id}),await d(e)?e:void 0}export{x as a,J as b,M as c,N as d};
@@ -1,7 +0,0 @@
1
- import{g as h}from"./chunk-VPRTJUIN.js";h();h();var Lt=String.fromCharCode;var Y=/\+/g;var Ce=/%2f/gi;function b(e=""){try{return decodeURIComponent(""+e)}catch{return""+e}}function L(e){return b(e.replace(Ce,"%252F"))}function Ae(e){return b(e.replace(Y," "))}function Se(e){return b(e.replace(Y," "))}function xe(e=""){let t=Object.create(null);e[0]==="?"&&(e=e.slice(1));for(let r of e.split("&")){let n=r.match(/([^=]+)=?(.*)/)||[];if(n.length<2)continue;let o=Ae(n[1]);if(o==="__proto__"||o==="constructor")continue;let s=Se(n[2]||"");t[o]===void 0?t[o]=s:Array.isArray(t[o])?t[o].push(s):t[o]=[t[o],s]}return t}var He=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,Pe=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,Ne=/^([/\\]\s*){2,}[^/\\]/;var Oe=/\/$|\/\?|\/#/,Te=/^\.?\//;function Me(e,t={}){return typeof t=="boolean"&&(t={acceptRelative:t}),t.strict?He.test(e):Pe.test(e)||(t.acceptRelative?Ne.test(e):!1)}function q(e="",t){return t?Oe.test(e):e.endsWith("/")}function k(e="",t){if(!t)return(q(e)?e.slice(0,-1):e)||"/";if(!q(e,!0))return e||"/";let r=e,n="",o=e.indexOf("#");o!==-1&&(r=e.slice(0,o),n=e.slice(o));let[s,...a]=r.split("?");return((s.endsWith("/")?s.slice(0,-1):s)||"/")+(a.length>0?`?${a.join("?")}`:"")+n}function qe(e="",t){if(!t)return e.endsWith("/")?e:e+"/";if(q(e,!0))return e||"/";let r=e,n="",o=e.indexOf("#");if(o!==-1&&(r=e.slice(0,o),n=e.slice(o),!r))return n;let[s,...a]=r.split("?");return s+"/"+(a.length>0?`?${a.join("?")}`:"")+n}function Le(e=""){return e.startsWith("/")}function I(e=""){return Le(e)?e:"/"+e}function X(e){return xe(C(e).search)}function ke(e){return e&&e!=="/"}function Z(e,...t){let r=e||"";for(let n of t.filter(o=>ke(o)))if(r){let o=n.replace(Te,"");r=qe(r)+o}else r=n;return r}var Ie=Symbol.for("ufo:protocolRelative");function C(e="",t){let r=e.match(/^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i);if(r){let[,d,l=""]=r;return{protocol:d.toLowerCase(),pathname:l,href:d+l,auth:"",host:"",search:"",hash:""}}if(!Me(e,{acceptRelative:!0}))return t?C(t+e):K(e);let[,n="",o,s=""]=e.replace(/\\/g,"/").match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/)||[],[,a="",u=""]=s.match(/([^#/?]*)(.*)?/)||[];n==="file:"&&(u=u.replace(/\/(?=[A-Za-z]:)/,""));let{pathname:c,search:i,hash:f}=K(u);return{protocol:n.toLowerCase(),auth:o?o.slice(0,Math.max(0,o.length-1)):"",host:a,pathname:c,search:i,hash:f,[Ie]:!n}}function K(e=""){let[t="",r="",n=""]=(e.match(/([^#?]*)(\?[^#]*)?(#.*)?/)||[]).splice(1);return{pathname:t,search:r,hash:n}}h();function v(e,t){if(typeof e!="string")throw new TypeError("argument str must be a string");let r={},n=t||{},o=n.decode||je,s=0;for(;s<e.length;){let a=e.indexOf("=",s);if(a===-1)break;let u=e.indexOf(";",s);if(u===-1)u=e.length;else if(u<a){s=e.lastIndexOf(";",a-1)+1;continue}let c=e.slice(s,a).trim();if(n?.filter&&!n?.filter(c)){s=u+1;continue}if(r[c]===void 0){let i=e.slice(a+1,u).trim();i.codePointAt(0)===34&&(i=i.slice(1,-1)),r[c]=De(i,o)}s=u+1}return r}function je(e){return e.includes("%")?decodeURIComponent(e):e}function De(e,t){try{return t(e)}catch{return e}}h();var y={NORMAL:0,WILDCARD:1,PLACEHOLDER:2};function re(e={}){let t={options:e,rootNode:ne(),staticRoutesMap:{}},r=n=>e.strictTrailingSlash?n:n.replace(/\/$/,"")||"/";if(e.routes)for(let n in e.routes)ee(t,r(n),e.routes[n]);return{ctx:t,lookup:n=>Be(t,r(n)),insert:(n,o)=>ee(t,r(n),o),remove:n=>Fe(t,r(n))}}function Be(e,t){let r=e.staticRoutesMap[t];if(r)return r.data;let n=t.split("/"),o={},s=!1,a=null,u=e.rootNode,c=null;for(let i=0;i<n.length;i++){let f=n[i];u.wildcardChildNode!==null&&(a=u.wildcardChildNode,c=n.slice(i).join("/"));let d=u.children.get(f);if(d===void 0){if(u&&u.placeholderChildren.length>1){let l=n.length-i;u=u.placeholderChildren.find(M=>M.maxDepth===l)||null}else u=u.placeholderChildren[0]||null;if(!u)break;u.paramName&&(o[u.paramName]=f),s=!0}else u=d}return(u===null||u.data===null)&&a!==null&&(u=a,o[u.paramName||"_"]=c,s=!0),u?s?{...u.data,params:s?o:void 0}:u.data:null}function ee(e,t,r){let n=!0,o=t.split("/"),s=e.rootNode,a=0,u=[s];for(let c of o){let i;if(i=s.children.get(c))s=i;else{let f=Ue(c);i=ne({type:f,parent:s}),s.children.set(c,i),f===y.PLACEHOLDER?(i.paramName=c==="*"?`_${a++}`:c.slice(1),s.placeholderChildren.push(i),n=!1):f===y.WILDCARD&&(s.wildcardChildNode=i,i.paramName=c.slice(3)||"_",n=!1),u.push(i),s=i}}for(let[c,i]of u.entries())i.maxDepth=Math.max(u.length-c,i.maxDepth||0);return s.data=r,n===!0&&(e.staticRoutesMap[t]=s),s}function Fe(e,t){let r=!1,n=t.split("/"),o=e.rootNode;for(let s of n)if(o=o.children.get(s),!o)return r;if(o.data){let s=n.at(-1)||"";o.data=null,Object.keys(o.children).length===0&&o.parent&&(o.parent.children.delete(s),o.parent.wildcardChildNode=null,o.parent.placeholderChildren=[]),r=!0}return r}function ne(e={}){return{type:e.type||y.NORMAL,maxDepth:0,parent:e.parent||null,children:new Map,data:e.data||null,paramName:e.paramName||null,wildcardChildNode:null,placeholderChildren:[]}}function Ue(e){return e.startsWith("**")?y.WILDCARD:e[0]===":"||e==="*"?y.PLACEHOLDER:y.NORMAL}function oe(e){let t=ae("",e.ctx.rootNode);return $e(t,e.ctx.options.strictTrailingSlash)}function $e(e,t){return{ctx:{table:e},matchAll:r=>se(r,e,t)}}function We(){return{static:new Map,wildcard:new Map,dynamic:new Map}}function se(e,t,r){r!==!0&&e.endsWith("/")&&(e=e.slice(0,-1)||"/");let n=[];for(let[s,a]of te(t.wildcard))(e===s||e.startsWith(s+"/"))&&n.push(a);for(let[s,a]of te(t.dynamic))if(e.startsWith(s+"/")){let u="/"+e.slice(s.length).split("/").splice(2).join("/");n.push(...se(u,a))}let o=t.static.get(e);return o&&n.push(o),n.filter(Boolean)}function te(e){return[...e.entries()].sort((t,r)=>t[0].length-r[0].length)}function ae(e,t){let r=We();function n(o,s){if(o){if(s.type===y.NORMAL&&!(o.includes("*")||o.includes(":")))s.data&&r.static.set(o,s.data);else if(s.type===y.WILDCARD)r.wildcard.set(o.replace("/**",""),s.data);else if(s.type===y.PLACEHOLDER){let a=ae("",s);s.data&&a.static.set("/",s.data),r.dynamic.set(o.replace(/\/\*|\/:\w+/,""),a);return}}for(let[a,u]of s.children.entries())n(`${o}/${a}`.replace("//","/"),u)}return n(e,t),r}h();function j(e){if(e===null||typeof e!="object")return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)==="[object Module]":!0}function D(e,t,r=".",n){if(!j(t))return D(e,{},r,n);let o=Object.assign({},t);for(let s in e){if(s==="__proto__"||s==="constructor")continue;let a=e[s];a!=null&&(n&&n(o,s,a,r)||(Array.isArray(a)&&Array.isArray(o[s])?o[s]=[...a,...o[s]]:j(a)&&j(o[s])?o[s]=D(a,o[s],(r?`${r}.`:"")+s.toString(),n):o[s]=a))}return o}function B(e){return(...t)=>t.reduce((r,n)=>D(r,n,"",e),{})}var ie=B(),Ut=B((e,t,r)=>{if(e[t]!==void 0&&typeof r=="function")return e[t]=r(e[t]),!0}),$t=B((e,t,r)=>{if(Array.isArray(e[t])&&typeof r=="function")return e[t]=r(e[t]),!0});h();var ze=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,Je=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,Qe=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function Ve(e,t){if(e==="__proto__"||e==="constructor"&&t&&typeof t=="object"&&"prototype"in t){Ge(e);return}return t}function Ge(e){console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`)}function ce(e,t={}){if(typeof e!="string")return e;if(e[0]==='"'&&e[e.length-1]==='"'&&e.indexOf("\\")===-1)return e.slice(1,-1);let r=e.trim();if(r.length<=9)switch(r.toLowerCase()){case"true":return!0;case"false":return!1;case"undefined":return;case"null":return null;case"nan":return Number.NaN;case"infinity":return Number.POSITIVE_INFINITY;case"-infinity":return Number.NEGATIVE_INFINITY}if(!Qe.test(e)){if(t.strict)throw new SyntaxError("[destr] Invalid JSON");return e}try{if(ze.test(e)||Je.test(e)){if(t.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(e,Ve)}return JSON.parse(e)}catch(n){if(t.strict)throw n;return e}}function E(e,t){try{return t in e}catch{return!1}}var N=class extends Error{static __h3_error__=!0;statusCode=500;fatal=!1;unhandled=!1;statusMessage;data;cause;constructor(t,r={}){super(t,r),r.cause&&!this.cause&&(this.cause=r.cause)}toJSON(){let t={message:this.message,statusCode:_(this.statusCode,500)};return this.statusMessage&&(t.statusMessage=O(this.statusMessage)),this.data!==void 0&&(t.data=this.data),t}};function p(e){if(typeof e=="string")return new N(e);if(Q(e))return e;let t=new N(e.message??e.statusMessage??"",{cause:e.cause||e});if(E(e,"stack"))try{Object.defineProperty(t,"stack",{get(){return e.stack}})}catch{try{t.stack=e.stack}catch{}}if(e.data&&(t.data=e.data),e.statusCode?t.statusCode=_(e.statusCode,t.statusCode):e.status&&(t.statusCode=_(e.status,t.statusCode)),e.statusMessage?t.statusMessage=e.statusMessage:e.statusText&&(t.statusMessage=e.statusText),t.statusMessage){let r=t.statusMessage;O(t.statusMessage)!==r&&console.warn("[h3] Please prefer using `message` for longer error messages instead of `statusMessage`. In the future, `statusMessage` will be sanitized by default.")}return e.fatal!==void 0&&(t.fatal=e.fatal),e.unhandled!==void 0&&(t.unhandled=e.unhandled),t}function Ke(e,t,r){if(e.handled)return;let n=Q(t)?t:p(t),o={statusCode:n.statusCode,statusMessage:n.statusMessage,stack:[],data:n.data};if(r&&(o.stack=(n.stack||"").split(`
2
- `).map(a=>a.trim())),e.handled)return;let s=Number.parseInt(n.statusCode);x(e,s,n.statusMessage),e.node.res.setHeader("content-type",S.json),e.node.res.end(JSON.stringify(o,void 0,2))}function Q(e){return e?.constructor?.__h3_error__===!0}function tr(e){return X(e.path||"")}function rr(e,t={}){let r=e.context.params||{};if(t.decode){r={...r};for(let n in r)r[n]=b(r[n])}return r}function Ye(e,t,r){if(r&&e.method==="HEAD")return!0;if(typeof t=="string"){if(e.method===t)return!0}else if(t.includes(e.method))return!0;return!1}function Xe(e,t,r){if(!Ye(e,t,r))throw p({statusCode:405,statusMessage:"HTTP method is not allowed."})}function he(e){let t={};for(let r in e.node.req.headers){let n=e.node.req.headers[r];t[r]=Array.isArray(n)?n.filter(Boolean).join(", "):n}return t}function g(e,t){return he(e)[t.toLowerCase()]}var ue=g;function nr(e,t={}){if(e.context.clientAddress)return e.context.clientAddress;if(t.xForwardedFor){let r=g(e,"x-forwarded-for")?.split(",").shift()?.trim();if(r)return r}if(e.node.req.socket.remoteAddress)return e.node.req.socket.remoteAddress}var $=Symbol.for("h3RawBody"),F=Symbol.for("h3ParsedBody"),pe=["PATCH","POST","PUT","DELETE"];function me(e,t="utf8"){Xe(e,pe);let r=e._requestBody||e.web?.request?.body||e.node.req[$]||e.node.req.rawBody||e.node.req.body;if(r){let s=Promise.resolve(r).then(a=>Buffer.isBuffer(a)?a:typeof a.pipeTo=="function"?new Promise((u,c)=>{let i=[];a.pipeTo(new WritableStream({write(f){i.push(f)},close(){u(Buffer.concat(i))},abort(f){c(f)}})).catch(c)}):typeof a.pipe=="function"?new Promise((u,c)=>{let i=[];a.on("data",f=>{i.push(f)}).on("end",()=>{u(Buffer.concat(i))}).on("error",c)}):a.constructor===Object?Buffer.from(JSON.stringify(a)):a instanceof URLSearchParams?Buffer.from(a.toString()):a instanceof FormData?new Response(a).bytes().then(u=>Buffer.from(u)):Buffer.from(a));return t?s.then(a=>a.toString(t)):s}if(!Number.parseInt(e.node.req.headers["content-length"]||"")&&!/\bchunked\b/i.test(String(e.node.req.headers["transfer-encoding"]??"")))return Promise.resolve(void 0);let n=e.node.req[$]=new Promise((s,a)=>{let u=[];e.node.req.on("error",c=>{a(c)}).on("data",c=>{u.push(c)}).on("end",()=>{s(Buffer.concat(u))})});return t?n.then(s=>s.toString(t)):n}async function or(e,t={}){let r=e.node.req;if(E(r,F))return r[F];let n=r.headers["content-type"]||"",o=await me(e),s;return n==="application/json"?s=fe(o,t.strict??!0):n.startsWith("application/x-www-form-urlencoded")?s=Ze(o):n.startsWith("text/")?s=o:s=fe(o,t.strict??!1),r[F]=s,s}function sr(e){if(!pe.includes(e.method))return;let t=e.web?.request?.body||e._requestBody;return t||($ in e.node.req||"rawBody"in e.node.req||"body"in e.node.req||"__unenv__"in e.node.req?new ReadableStream({async start(n){let o=await me(e,!1);o&&n.enqueue(o),n.close()}}):new ReadableStream({start:n=>{e.node.req.on("data",o=>{n.enqueue(o)}),e.node.req.on("end",()=>{n.close()}),e.node.req.on("error",o=>{n.error(o)})}}))}function fe(e="",t){if(e)try{return ce(e,{strict:t})}catch{throw p({statusCode:400,statusMessage:"Bad Request",message:"Invalid JSON body"})}}function Ze(e){let t=new URLSearchParams(e),r=Object.create(null);for(let[n,o]of t.entries())E(r,n)?(Array.isArray(r[n])||(r[n]=[r[n]]),r[n].push(o)):r[n]=o;return r}var S={html:"text/html",json:"application/json"},ve=/[^\u0009\u0020-\u007E]/g;function O(e=""){return e.replace(ve,"")}function _(e,t=200){return!e||(typeof e=="string"&&(e=Number.parseInt(e,10)),e<100||e>999)?t:e}function et(e){return v(e.node.req.headers.cookie||"")}function ar(e,t){return et(e)[t]}function ye(e){if(Array.isArray(e))return e.flatMap(f=>ye(f));if(typeof e!="string")return[];let t=[],r=0,n,o,s,a,u,c=()=>{for(;r<e.length&&/\s/.test(e.charAt(r));)r+=1;return r<e.length},i=()=>(o=e.charAt(r),o!=="="&&o!==";"&&o!==",");for(;r<e.length;){for(n=r,u=!1;c();)if(o=e.charAt(r),o===","){for(s=r,r+=1,c(),a=r;r<e.length&&i();)r+=1;r<e.length&&e.charAt(r)==="="?(u=!0,r=a,t.push(e.slice(n,s)),n=r):r=s+1}else r+=1;(!u||r>=e.length)&&t.push(e.slice(n))}return t}var tt=typeof setImmediate>"u"?e=>e():setImmediate;function m(e,t,r){return r&&rt(e,r),new Promise(n=>{tt(()=>{e.handled||e.node.res.end(t),n()})})}function ge(e,t){if(e.handled)return;!t&&e.node.res.statusCode!==200&&(t=e.node.res.statusCode);let r=_(t,204);r===204&&e.node.res.removeHeader("content-length"),e.node.res.writeHead(r),e.node.res.end()}function x(e,t,r){t&&(e.node.res.statusCode=_(t,e.node.res.statusCode)),r&&(e.node.res.statusMessage=O(r))}function rt(e,t){t&&e.node.res.statusCode!==304&&!e.node.res.getHeader("content-type")&&e.node.res.setHeader("content-type",t)}function ir(e,t,r=302){e.node.res.statusCode=_(r,e.node.res.statusCode),e.node.res.setHeader("location",t);let o=`<!DOCTYPE html><html><head><meta http-equiv="refresh" content="0; url=${t.replace(/"/g,"%22")}"></head></html>`;return m(e,o,S.html)}function A(e,t){return e.node.res.getHeader(t)}function nt(e,t){for(let[r,n]of Object.entries(t))e.node.res.setHeader(r,n)}function R(e,t,r){e.node.res.setHeader(t,r)}function ot(e,t){for(let[r,n]of Object.entries(t))st(e,r,n)}var w=ot;function st(e,t,r){let n=e.node.res.getHeader(t);if(!n){e.node.res.setHeader(t,r);return}Array.isArray(n)||(n=[n.toString()]),e.node.res.setHeader(t,[...n,r])}function we(e){return!e||typeof e!="object"?!1:typeof e.pipe=="function"&&(typeof e._read=="function"||typeof e.abort=="function")||typeof e.pipeTo=="function"}function at(e){return typeof Response<"u"&&e instanceof Response}function T(e,t){if(!t||typeof t!="object")throw new Error("[h3] Invalid stream provided.");if(e.node.res._data=t,!e.node.res.socket)return e._handled=!0,Promise.resolve();if(E(t,"pipeTo")&&typeof t.pipeTo=="function")return t.pipeTo(new WritableStream({write(r){e.node.res.write(r)}})).then(()=>{e.node.res.end()});if(E(t,"pipe")&&typeof t.pipe=="function")return new Promise((r,n)=>{t.pipe(e.node.res),t.on&&(t.on("end",()=>{e.node.res.end(),r()}),t.on("error",o=>{n(o)})),e.node.res.on("close",()=>{t.abort&&t.abort()})});throw new Error("[h3] Invalid or incompatible stream provided.")}function _e(e,t){for(let[r,n]of t.headers)r==="set-cookie"?e.node.res.appendHeader(r,ye(n)):e.node.res.setHeader(r,n);if(t.status&&(e.node.res.statusCode=_(t.status,e.node.res.statusCode)),t.statusText&&(e.node.res.statusMessage=O(t.statusText)),t.redirected&&e.node.res.setHeader("location",t.url),!t.body){e.node.res.end();return}return T(e,t.body)}function it(e={}){return ie(e,{origin:"*",methods:"*",allowHeaders:"*",exposeHeaders:"*",credentials:!1,maxAge:!1,preflight:{statusCode:204}})}function ct(e){let t=g(e,"origin"),r=g(e,"access-control-request-method");return e.method==="OPTIONS"&&!!t&&!!r}function ut(e,t){let{origin:r}=t;return!e||!r||r==="*"||r==="null"?!0:Array.isArray(r)?r.some(n=>n instanceof RegExp?n.test(e):e===n):r(e)}function Re(e,t){let{origin:r}=t,n=g(e,"origin");return!n||!r||r==="*"?{"access-control-allow-origin":"*"}:typeof r=="string"?{"access-control-allow-origin":r,vary:"origin"}:ut(n,t)?{"access-control-allow-origin":n,vary:"origin"}:{}}function ft(e){let{methods:t}=e;return t?t==="*"?{"access-control-allow-methods":"*"}:t.length>0?{"access-control-allow-methods":t.join(",")}:{}:{}}function Ee(e){let{credentials:t}=e;return t?{"access-control-allow-credentials":"true"}:{}}function dt(e,t){let{allowHeaders:r}=t;if(!r||r==="*"||r.length===0){let n=g(e,"access-control-request-headers");return n?{"access-control-allow-headers":n,vary:"access-control-request-headers"}:{}}return{"access-control-allow-headers":r.join(","),vary:"access-control-request-headers"}}function be(e){let{exposeHeaders:t}=e;return t?t==="*"?{"access-control-expose-headers":t}:{"access-control-expose-headers":t.join(",")}:{}}function lt(e,t){w(e,Re(e,t)),w(e,Ee(t)),w(e,be(t)),w(e,ft(t)),w(e,dt(e,t))}function ht(e,t){w(e,Re(e,t)),w(e,Ee(t)),w(e,be(t))}function cr(e,t){let r=it(t);return ct(e)?(lt(e,t),ge(e,r.preflight.statusCode),!0):(ht(e,t),!1)}var pt=new Set(["transfer-encoding","accept-encoding","connection","keep-alive","upgrade","expect","host","accept"]);function ur(e,t){let r=Object.create(null),n=he(e);for(let o in n)(!pt.has(o)||o==="host"&&t?.host)&&(r[o]=n[o]);return r}function P(e){let t="";e.id&&(t+=`id: ${de(e.id)}
3
- `),e.event&&(t+=`event: ${de(e.event)}
4
- `),typeof e.retry=="number"&&Number.isInteger(e.retry)&&(t+=`retry: ${e.retry}
5
- `);let r=typeof e.data=="string"?e.data:"";for(let n of r.split(/\r\n|\r|\n/))t+=`data: ${n}
6
- `;return t+=`
7
- `,t}function de(e){return e.replace(/[\n\r]/g,"")}function mt(e){let t="";for(let r of e)t+=P(r);return t}function yt(e){let t={"Content-Type":"text/event-stream","Cache-Control":"private, no-cache, no-store, no-transform, must-revalidate, max-age=0","X-Accel-Buffering":"no"};gt(e)||(t.Connection="keep-alive"),nt(e,t)}function gt(e){return ue(e,":path")!==void 0&&ue(e,":method")!==void 0}var W=class{_h3Event;_transformStream=new TransformStream;_writer;_encoder=new TextEncoder;_writerIsClosed=!1;_paused=!1;_unsentData;_disposed=!1;_handled=!1;constructor(t,r={}){this._h3Event=t,this._writer=this._transformStream.writable.getWriter(),this._writer.closed.then(()=>{this._writerIsClosed=!0}),r.autoclose!==!1&&this._h3Event.node.req.on("close",()=>this.close())}async push(t){if(typeof t=="string"){await this._sendEvent({data:t});return}if(Array.isArray(t)){if(t.length===0)return;if(typeof t[0]=="string"){let r=[];for(let n of t)r.push({data:n});await this._sendEvents(r);return}await this._sendEvents(t);return}await this._sendEvent(t)}async _sendEvent(t){if(!this._writerIsClosed){if(this._paused&&!this._unsentData){this._unsentData=P(t);return}if(this._paused){this._unsentData+=P(t);return}await this._writer.write(this._encoder.encode(P(t))).catch()}}async _sendEvents(t){if(this._writerIsClosed)return;let r=mt(t);if(this._paused&&!this._unsentData){this._unsentData=r;return}if(this._paused){this._unsentData+=r;return}await this._writer.write(this._encoder.encode(r)).catch()}pause(){this._paused=!0}get isPaused(){return this._paused}async resume(){this._paused=!1,await this.flush()}async flush(){this._writerIsClosed||this._unsentData?.length&&(await this._writer.write(this._encoder.encode(this._unsentData)),this._unsentData=void 0)}async close(){if(!this._disposed){if(!this._writerIsClosed)try{await this._writer.close()}catch{}this._h3Event._handled&&this._handled&&!this._h3Event.node.res.closed&&this._h3Event.node.res.end(),this._disposed=!0}}onClosed(t){this._writer.closed.then(t)}async send(){yt(this._h3Event),x(this._h3Event,200),this._h3Event._handled=!0,this._handled=!0,await T(this._h3Event,this._transformStream.readable)}};function fr(e,t){return new W(e,t)}async function dr(e,t){if(e.method!=="GET"&&e.method!=="HEAD"){if(!t.fallthrough)throw p({statusMessage:"Method Not Allowed",statusCode:405});return!1}let r=I(k(C(e.path).pathname));if(/(^|[\\/])(\.\.|%2e%2e|%2e\.|\.%2e)($|[\\/])/i.test(r)){if(!t.fallthrough)throw p({statusCode:404});return!1}let n=wt(g(e,"accept-encoding"),t.encodings);n.length>1&&R(e,"vary","accept-encoding");let o=r,s,a=_t(r,n,t.indexNames||["/index.html"]);for(let i of a){let f=await t.getMeta(i);if(f){s=f,o=i;break}}if(!s){if(!t.fallthrough)throw p({statusCode:404});return!1}if(s.etag&&!A(e,"etag")&&R(e,"etag",s.etag),s.etag&&g(e,"if-none-match")===s.etag)return x(e,304,"Not Modified"),m(e,"");if(s.mtime){let i=new Date(s.mtime),f=g(e,"if-modified-since");if(f&&new Date(f)>=i)return x(e,304,"Not Modified"),m(e,null);A(e,"last-modified")||R(e,"last-modified",i.toUTCString())}if(s.type&&!A(e,"content-type")&&R(e,"content-type",s.type),s.encoding&&!A(e,"content-encoding")&&R(e,"content-encoding",s.encoding),s.size!==void 0&&s.size>0&&!A(e,"content-length")&&R(e,"content-length",s.size),e.method==="HEAD")return m(e,null);let c=await t.getContents(o);return we(c)?T(e,c):m(e,c)}function wt(e,t){return!t||!e?[]:String(e||"").split(",").map(r=>t[r.trim()]).filter(Boolean)}function _t(e,t,r){let n=[];for(let o of["",...r])for(let s of[...t,""])n.push(`${e}${o}${s}`);return n}var z=class{__is_event__=!0;node;web;context={};_method;_path;_headers;_requestBody;_handled=!1;_onBeforeResponseCalled;_onAfterResponseCalled;constructor(t,r){this.node={req:t,res:r}}get method(){return this._method||(this._method=(this.node.req.method||"GET").toUpperCase()),this._method}get path(){return this._path||this.node.req.url||"/"}get headers(){return this._headers||(this._headers=Et(this.node.req.headers)),this._headers}get handled(){return this._handled||this.node.res.writableEnded||this.node.res.headersSent}respondWith(t){return Promise.resolve(t).then(r=>_e(this,r))}toString(){return`[${this.method}] ${this.path}`}toJSON(){return this.toString()}get req(){return this.node.req}get res(){return this.node.res}};function Rt(e,t){return new z(e,t)}function Et(e){let t=new Headers;for(let[r,n]of Object.entries(e))if(Array.isArray(n))for(let o of n)t.append(r,o);else n&&t.set(r,n);return t}function bt(e){if(typeof e=="function")return e.__is_handler__=!0,e;let t={onRequest:le(e.onRequest),onBeforeResponse:le(e.onBeforeResponse)},r=n=>Ct(n,e.handler,t);return r.__is_handler__=!0,r.__resolve__=e.handler.__resolve__,r.__websocket__=e.websocket,r}function le(e){return e?Array.isArray(e)?e:[e]:void 0}async function Ct(e,t,r){if(r.onRequest){for(let s of r.onRequest)if(await s(e),e.handled)return}let o={body:await t(e)};if(r.onBeforeResponse)for(let s of r.onBeforeResponse)await s(e,o);return o.body}var V=bt;function At(e){return E(e,"__is_handler__")}function G(e,t,r){return e}function St(e){let t,r,n=()=>r?Promise.resolve(r):(t||(t=Promise.resolve(e()).then(s=>{let a=s.default||s;if(typeof a!="function")throw new TypeError("Invalid lazy handler result. It should be a function:",a);return r={handler:G(s.default||s)},r})),t),o=V(s=>r?r.handler(s):n().then(a=>a.handler(s)));return o.__resolve__=n,o}var xt=St,lr=globalThis.Headers,hr=globalThis.Response;function pr(e={}){let t=[],r=Ht(t,e),n=Pt(t);r.__resolve__=n;let o=Ot(()=>Mt(n,e)),s={use:(a,u,c)=>J(s,a,u,c),resolve:n,handler:r,stack:t,options:e,get websocket(){return o()}};return s}function J(e,t,r,n){if(Array.isArray(t))for(let o of t)J(e,o,r,n);else if(Array.isArray(r))for(let o of r)J(e,t,o,n);else typeof t=="string"?e.stack.push(U({...n,route:t,handler:r})):typeof t=="function"?e.stack.push(U({...r,handler:t})):e.stack.push(U({...t}));return e}function Ht(e,t){let r=t.debug?2:void 0;return V(async n=>{n.node.req.originalUrl=n.node.req.originalUrl||n.node.req.url||"/";let o=Tt(n._path||n.node.req.url||"/");n._path=o;let s;t.onRequest&&await t.onRequest(n);for(let a of e){if(a.route.length>1){if(!o.startsWith(a.route))continue;s=o.slice(a.route.length)||"/"}else s=o;if(a.match&&!a.match(s,n))continue;n._path=s,n.node.req.url=s;let u=await a.handler(n),c=u===void 0?void 0:await u;if(c!==void 0){let i={body:c};t.onBeforeResponse&&(n._onBeforeResponseCalled=!0,await t.onBeforeResponse(n,i)),await Nt(n,i.body,r),t.onAfterResponse&&(n._onAfterResponseCalled=!0,await t.onAfterResponse(n,i));return}if(n.handled){t.onAfterResponse&&(n._onAfterResponseCalled=!0,await t.onAfterResponse(n,void 0));return}}if(!n.handled)throw p({statusCode:404,statusMessage:`Cannot find any path matching ${n.path||"/"}.`});t.onAfterResponse&&(n._onAfterResponseCalled=!0,await t.onAfterResponse(n,void 0))})}function Pt(e){return async t=>{let r;for(let n of e){if(n.route==="/"&&!n.handler.__resolve__||!t.startsWith(n.route)||(r=t.slice(n.route.length)||"/",n.match&&!n.match(r,void 0)))continue;let o={route:n.route,handler:n.handler};if(o.handler.__resolve__){let s=await o.handler.__resolve__(r);if(!s)continue;o={...o,...s,route:Z(o.route||"/",s.route||"/")}}return o}}}function U(e){let t=e.handler;return t.handler&&(t=t.handler),e.lazy?t=xt(t):At(t)||(t=G(t,void 0,e.route)),{route:k(e.route),match:e.match,handler:t}}function Nt(e,t,r){if(t===null)return ge(e);if(t){if(at(t))return _e(e,t);if(we(t))return T(e,t);if(t.buffer)return m(e,t);if(t.arrayBuffer&&typeof t.arrayBuffer=="function")return t.arrayBuffer().then(o=>m(e,Buffer.from(o),t.type));if(t instanceof Error)throw p(t);if(typeof t.end=="function")return!0}let n=typeof t;if(n==="string")return m(e,t,S.html);if(n==="object"||n==="boolean"||n==="number")return m(e,JSON.stringify(t,void 0,r),S.json);if(n==="bigint")return m(e,t.toString(),S.json);throw p({statusCode:500,statusMessage:`[h3] Cannot send ${n} as response.`})}function Ot(e){let t;return()=>(t||(t=e()),t)}function Tt(e){let t=e.indexOf("?"),r=t===-1?e:e.slice(0,t),n=t===-1?"":e.slice(t);return(r.includes("%25")?L(r.replace(/%25/g,"%2525")):L(r))+n}function Mt(e,t){return{...t.websocket,async resolve(r){let n=r.request?.url||r.url||"/",{pathname:o}=typeof n=="string"?C(n):n;return(await e(o))?.handler?.__websocket__||{}}}}var qt=["connect","delete","get","head","options","post","put","trace","patch"];function mr(e={}){let t=re({}),r={},n,o={},s=(c,i,f)=>{let d=r[c];if(d||(r[c]=d={path:c,handlers:{}},t.insert(c,d)),Array.isArray(f))for(let l of f)s(c,i,l);else d.handlers[f]=G(i);return o};o.use=o.add=(c,i,f)=>s(c,i,f||"all");for(let c of qt)o[c]=(i,f)=>o.add(i,f,c);let a=(c="/",i="get")=>{let f=c.indexOf("?");f!==-1&&(c=c.slice(0,Math.max(0,f)));let d=t.lookup(c);if(!d||!d.handlers)return{error:p({statusCode:404,name:"Not Found",statusMessage:`Cannot find any route matching ${c||"/"}.`})};let l=d.handlers[i]||d.handlers.all;if(!l){n||(n=oe(t));let M=n.matchAll(c).reverse();for(let H of M){if(H.handlers[i]){l=H.handlers[i],d.handlers[i]=d.handlers[i]||l;break}if(H.handlers.all){l=H.handlers.all,d.handlers.all=d.handlers.all||l;break}}}return l?{matched:d,handler:l}:{error:p({statusCode:405,name:"Method Not Allowed",statusMessage:`Method ${i} is not allowed on this route.`})}},u=e.preemptive||e.preemtive;return o.handler=V(c=>{let i=a(c.path,c.method.toLowerCase());if("error"in i){if(u)throw i.error;return}c.context.matchedRoute=i.matched;let f=i.matched.params||{};return c.context.params=f,Promise.resolve(i.handler(c)).then(d=>d===void 0&&u?null:d)}),o.handler.__resolve__=async c=>{c=I(c);let i=a(c);if("error"in i)return;let f={route:i.matched.path,handler:i.handler};if(i.handler.__resolve__){let d=await i.handler.__resolve__(c);if(!d)return;f={...f,...d}}return f},o}function yr(e){return async function(r,n){let o=Rt(r,n);try{await e.handler(o)}catch(s){let a=p(s);if(Q(s)||(a.unhandled=!0),x(o,a.statusCode,a.statusMessage),e.options.onError&&await e.options.onError(a,o),o.handled)return;(a.unhandled||a.fatal)&&console.error("[h3]",a.fatal?"[fatal]":"[unhandled]",a),e.options.onBeforeResponse&&!o._onBeforeResponseCalled&&await e.options.onBeforeResponse(o,{body:a}),await Ke(o,a,!!e.options.debug),e.options.onAfterResponse&&!o._onAfterResponseCalled&&await e.options.onAfterResponse(o,{body:a})}}}export{p as a,Ke as b,tr as c,rr as d,he as e,g as f,nr as g,or as h,sr as i,ar as j,m as k,x as l,ir as m,R as n,cr as o,ur as p,fr as q,dr as r,bt as s,St as t,pr as u,mr as v,yr as w};
@@ -1,6 +0,0 @@
1
- import{F as N}from"./chunk-SBEZBZM7.js";import{b as A}from"./chunk-DJQVNH7P.js";import{a as y,b as H}from"./chunk-WFXRSKRK.js";import{j as D}from"./chunk-66RJ5T7A.js";import{a as q}from"./chunk-VBUZWRUL.js";import{b as C,l as k,s as R}from"./chunk-BDVAE5MS.js";import{d as S}from"./chunk-JPGO36XP.js";import{Ca as b,Qb as l,Ta as T,Ua as _,bb as v,na as O,wa as g}from"./chunk-GFEAKSGV.js";import{f as L}from"./chunk-YC6G4MHD.js";import{d as m,e as u,g as w,i as F}from"./chunk-IU2ZQ6TE.js";import{e as X,g as f}from"./chunk-VPRTJUIN.js";f();f();var M=X(q(),1),G=200,K=6e4,U=200,Q=500,I=class{constructor(t,e,n=G){this.currentEvents=[];this.extensionPaths=[];this.ignored={};this.extensionWatchedFiles=new Map;this.emitEvents=()=>{let t=this.currentEvents;this.currentEvents=[];let e=`\u{1F509} ${t.length} EVENTS EMITTED in files: ${t.map(n=>n.path).join(`
2
- `)}`;l(e,this.options.stdout),this.onChangeCallback?.(t)};this.handleFileEvent=(t,e)=>{let n=y(),i=u(e),s=e===this.app.configPath,r=e.endsWith(".extension.toml");if(l(`\u{1F300}: ${t} ${e.replace(this.app.directory,"")}
3
- `),s)this.handleEventForExtension(t,e,this.app.directory,n,!1);else{let a=this.extensionWatchedFiles.get(i),p=a===void 0||a.size===0;if(p&&t==="add"&&!r){let d=this.discoverFileOwners(i);d.size>0&&(this.extensionWatchedFiles.set(i,d),a=d,p=!1)}if(p&&!r&&!s){l(`\u{1F300}: File ${e} is not watched by any extension`,this.options.stdout);return}for(let d of a??[]){let c=this.app.realExtensions.find(E=>E.handle===d),h=c?u(c.directory):this.app.directory;this.handleEventForExtension(t,e,h,n,!1,d)}p&&this.handleEventForExtension(t,e,this.app.directory,n,!0)}this.debouncedEmit()};this.close=()=>{this.watcher&&(l("Closing file watcher",this.options.stdout),this.watcher.close().then(()=>l("File watching closed",this.options.stdout)).catch(t=>l(`File watching failed to close: ${t.message}`,this.options.stderr)))};this.app=t,this.options=e,this.debouncedEmit=R(this.emitEvents.bind(this),n,{leading:!0,trailing:!0}),this.updateApp(t)}onChange(t){this.onChangeCallback=t}async start(){let e=[...this.app.configuration.extension_directories??["extensions"]].map(r=>m(this.app.directory,r));await Promise.all(e.map(async r=>{try{await g(r.replace(/\/\*+$/,""))}catch{}}));let n=[this.app.configPath,...e],i=this.getAllWatchedFiles();n.push(...i),this.close();let{default:s}=await import("./chokidar-G4ONJSK4.js");this.watcher=s.watch(n,{ignored:["**/node_modules/**","**/.git/**"],persistent:!0,ignoreInitial:!0}),this.watcher.on("all",this.handleFileEvent),this.addAbortListener(),l(`File watcher started with ${n.length} paths`,this.options.stdout)}updateApp(t){this.app=t,this.extensionPaths=this.app.nonConfigExtensions.map(e=>u(e.directory)).filter(e=>e!==this.app.directory),this.extensionPaths.forEach(e=>{this.ignored[e]??=this.createIgnoreInstance(e)})}addAbortListener(){this.options.signal.removeEventListener("abort",this.close),this.options.signal.addEventListener("abort",this.close)}getAllWatchedFiles(){this.extensionWatchedFiles.clear();let t=this.app.realExtensions.map(n=>({extension:n,watchedFiles:n.watchedFiles()})),e=new Set;for(let{extension:n,watchedFiles:i}of t)for(let s of i){let r=u(s);e.add(r);let a=this.extensionWatchedFiles.get(r)??new Set;a.add(n.handle),this.extensionWatchedFiles.set(r,a)}return Array.from(e)}pushEvent(t){this.shouldIgnoreEvent(t)||(t.type==="extension_folder_created"&&(this.ignored[t.path]=this.createIgnoreInstance(t.path)),!this.currentEvents.some(e=>e.path===t.path&&e.type===t.type&&e.extensionHandle===t.extensionHandle)&&this.currentEvents.push(t))}shouldIgnoreEvent(t){if(t.type==="extension_folder_deleted"||t.type==="extension_folder_created"||t.extensionHandle&&this.extensionWatchedFiles.get(u(t.path))?.has(t.extensionHandle))return!1;let n=(t.extensionHandle?this.app.realExtensions.find(s=>s.handle===t.extensionHandle):void 0)?.watchedFiles(),i=this.ignored[t.extensionPath];if(n)return!n.some(r=>v(t.path,r));if(i){let s=w(t.extensionPath,t.path);return i.ignores(s)}return!1}discoverFileOwners(t){let e=new Set;for(let n of this.app.realExtensions){let i=u(n.directory);i!==this.app.directory&&t.startsWith(`${i}/`)&&this.pathMatchesWatchPatterns(t,n)&&e.add(n.handle)}return e}pathMatchesWatchPatterns(t,e){let{paths:n,ignore:i}=e.watchPatterns(),s=w(u(e.directory),t);return i.some(r=>v(s,r))?!1:n.some(r=>v(s,r))}handleEventForExtension(t,e,n,i,s,r){let a=e.endsWith(".extension.toml"),p=e===this.app.configPath;switch(t){case"change":if(s)break;a||p?this.pushEvent({type:"extensions_config_updated",path:e,extensionPath:n,extensionHandle:r,startTime:i}):this.pushEvent({type:"file_updated",path:e,extensionPath:n,extensionHandle:r,startTime:i});break;case"add":if(!a){this.pushEvent({type:"file_created",path:e,extensionPath:n,extensionHandle:r,startTime:i});break}let d=0,c=F(e),h=setInterval(()=>{_(m(c,A.lockFile))?(l(`Waiting for extension to complete creation: ${e}
4
- `),d+=U):(clearInterval(h),this.extensionPaths.push(c),this.pushEvent({type:"extension_folder_created",path:c,extensionPath:n,startTime:i}),this.debouncedEmit()),d>=K&&(clearInterval(h),this.options.stderr.write(`Error loading new extension at path: ${e}.
5
- Please restart the process.`))},U);break;case"unlink":if(e.endsWith(A.lockFile))break;p?this.pushEvent({type:"app_config_deleted",path:e,extensionPath:n,startTime:i}):a?(this.extensionPaths=this.extensionPaths.filter(E=>E!==n),this.pushEvent({type:"extension_folder_deleted",path:n,extensionPath:n,startTime:i})):setTimeout(()=>{this.extensionPaths.includes(n)&&(this.pushEvent({type:"file_deleted",path:e,extensionPath:n,extensionHandle:r,startTime:i}),this.extensionWatchedFiles.delete(u(e)),this.debouncedEmit())},Q);break;case"addDir":case"unlinkDir":break}}createIgnoreInstance(t){let e=m(t,".gitignore");if(!_(e))return;let n=O(e).toString().split(`
6
- `).map(i=>i.trim()).filter(i=>i!==""&&!i.startsWith("#"));return M.default.default().add(n)}};f();f();function $(o,t,e=!0){let n=o.realExtensions,i=n.map(c=>c.uid),s=t.realExtensions,r=s.map(c=>c.uid),a=s.filter(c=>!i.includes(c.uid)),p=n.filter(c=>!r.includes(c.uid)),d;return e&&(d=s.filter(c=>{let h=n.find(P=>P.uid===c.uid);if(!h)return!1;let E=JSON.stringify(h.configuration)!==JSON.stringify(c.configuration),x=h.configurationPath!==c.configurationPath;return E||x})),{created:a,updated:d??[],deleted:p}}async function z(o,t,e){if(o[0]===void 0)return;let n=o.some(r=>B.includes(r.type)),i=o.filter(r=>!B.includes(r.type));if(n)return te({event:o[0],app:t,options:e,extensions:[]});let s={app:t,extensionEvents:[],path:o[0].path,startTime:o[0].startTime};for(let r of i){let a=r.extensionHandle?t.realExtensions.filter(d=>d.handle===r.extensionHandle):t.realExtensions.filter(d=>d.directory===r.extensionPath),p=Y[r.type]({event:r,app:s.app,extensions:a,options:e});s.extensionEvents.push(...p.extensionEvents)}return s}var B=["extensions_config_updated","extension_folder_created"],Y={extension_folder_deleted:Z,file_created:W,file_deleted:W,file_updated:W,app_config_deleted:ee,extension_folder_created:j,extensions_config_updated:j};function Z({event:o,app:t,extensions:e}){let n=e.map(i=>(t.removeExtension(i.uid),{type:"deleted",extension:i}));return{app:t,extensionEvents:n,startTime:o.startTime,path:o.path}}function W({event:o,app:t,extensions:e}){let n=e.map(i=>({type:"changed",extension:i}));return{app:t,extensionEvents:n,startTime:o.startTime,path:o.path}}function j(o){return{app:o.app,extensionEvents:[],startTime:o.event.startTime,path:o.event.path}}function ee(o){throw new S("The active app.toml was deleted, exiting")}async function te({event:o,app:t}){let e=await ne(t),n=$(t,e,!0),i=n.created.map(p=>({type:"created",extension:p})),s=n.deleted.map(p=>({type:"deleted",extension:p})),r=n.updated.map(p=>({type:"changed",extension:p})),a=[...i,...s,...r];return{app:e,extensionEvents:a,startTime:o.startTime,path:o.path,appWasReloaded:!0}}async function ne(o){let t=y();try{let e=await N(o);return l(`App reloaded [${H(t)}ms]`),e}catch(e){let n=new Error(`Error reloading app: ${e.message}`);throw n.cause="validation-error",n}}import{formatMessagesSync as ie}from"esbuild";import se from"events";var V=class extends se{constructor(e,n,i,s){super();this.started=!1;this.ready=!1;this.initialEvents=[];this.app=e,this.appURL=n,this.buildOutputPath=i??m(e.directory,".shopify","dev-bundle"),this.options={stdout:process.stdout,stderr:process.stderr,signal:new C},this.fileWatcher=s}async start(e,n=!0){this.started||(this.started=!0,this.options=e??this.options,await T(this.buildOutputPath)&&await b(this.buildOutputPath,{force:!0}),await g(this.buildOutputPath),n&&(this.initialEvents=this.app.realExtensions.map(i=>({type:"changed",extension:i})),await this.buildExtensions(this.initialEvents)),this.fileWatcher=this.fileWatcher??new I(this.app,this.options),this.fileWatcher.onChange(i=>{z(i,this.app,this.options).then(async s=>{if(s?.extensionEvents.length===0&&l("Change detected, but no extensions were affected"),!s)return;this.app=s.app,s.appWasReloaded&&this.fileWatcher?.updateApp(this.app),await this.rescanImports(s);let r=s.extensionEvents.filter(a=>a.type!=="deleted");await this.buildExtensions(r),s.appWasReloaded||await this.app.generateExtensionTypes(),await this.deleteExtensionsBuildOutput(s),this.emit("all",s)}).catch(s=>{this.emit("error",s)})}),await this.fileWatcher.start(),this.ready=!0,this.emit("ready",{app:this.app,extensionEvents:this.initialEvents}))}onEvent(e){return this.addListener("all",e),this}onStart(e){if(this.ready){let n={app:this.app,extensionEvents:this.initialEvents,startTime:[0,0],path:""};e(n)?.catch(()=>{})}else this.once("ready",e);return this}onError(e){return this.addListener("error",e),this}async deleteExtensionsBuildOutput(e){let i=e.extensionEvents.filter(s=>s.type==="deleted").map(s=>s.extension).map(async s=>{let r=m(this.buildOutputPath,s.getOutputFolderId());return b(r,{force:!0})});await Promise.all(i)}async buildExtensions(e){let n=D(e,r=>r.extension.uid),i=[];for(let r of Object.values(n))r.length>0&&r[0]&&i.push({extension:r[0].extension,events:r});let s=i.map(async({extension:r,events:a})=>k({outputPrefix:r.handle,stripAnsi:!1},async()=>{try{await this.buildExtension(r);let p={status:"ok",uid:r.uid};a.forEach(d=>{d.buildResult=p})}catch(p){let d=p.errors??[],c=p.message,h;if(d.length){let x=d[0];c=x?.text,h=x?.location?.file,ie(d,{kind:"error",color:!L()}).forEach(J=>{this.options.stderr.write(J)})}else this.options.stderr.write(p.message);let E={status:"error",error:c,file:h,uid:r.uid};a.forEach(x=>{x.buildResult=E})}}));return Promise.all(s)}async buildExtension(e){let n={app:this.app,stdout:this.options.stdout,stderr:this.options.stderr,useTasks:!1,environment:"development",appURL:this.appURL};await e.buildForBundle(n,this.buildOutputPath)}async rescanImports(e){if(e.path.endsWith(".toml"))return;let i=e.extensionEvents.filter(s=>s.type!=="deleted").map(s=>s.extension);i.length>0&&(await Promise.all(i.map(async a=>a.rescanImports()))).some(a=>a)&&await this.fileWatcher?.start()}};export{V as a};
@@ -1,19 +0,0 @@
1
- import{k as w,q as $}from"./chunk-DFMQWJQ3.js";import{$ as ne,aa as E}from"./chunk-UGXYQ23Y.js";import{r as C}from"./chunk-LAZJ47DZ.js";import{b as P}from"./chunk-323UTVMM.js";import{u as S,v as T}from"./chunk-BDVAE5MS.js";import{r as te}from"./chunk-LDGAHMS7.js";import{$a as I,Mb as p,Nb as A,Ob as N,Qb as L,Ta as R,na as _,ua as F}from"./chunk-GFEAKSGV.js";import{d as k,p as x}from"./chunk-IU2ZQ6TE.js";import{e as O,g as v}from"./chunk-VPRTJUIN.js";v();v();var s=O(E(),1),h=O(ne(),1);function re(t){switch(t){case"error":return s.Severity.ERROR;case"suggestion":case"warning":return s.Severity.WARNING;case"style":case"info":return s.Severity.INFO;case"crash":return}}function G(t){switch(t){case s.Severity.ERROR:return"error";case s.Severity.WARNING:return"warning";case s.Severity.INFO:return"info"}}function ie(t,e,r){let n=s.path.fsPath(t),a=_(n).toString().split(`
2
- `).slice(e,r+1),c=a.length===1;return a.map((f,m)=>{let u=e+m+1,d=c?f.trim():f;return`${u} ${d}`}).join(`
3
- `)}function se(t){switch(t){case s.Severity.ERROR:return{error:`
4
- [error]:`};case s.Severity.WARNING:return{warn:`
5
- [warning]:`};case s.Severity.INFO:return{info:`
6
- [info]:`}}}function oe(t){return t.map((r,n)=>{let{message:i,uri:o,start:a,end:c,check:f,severity:m}=r,u=ie(o,a.line,c.line),d=n===t.length-1?"":`
7
-
8
- `;return[se(m),{bold:f},{subdued:`
9
- ${i}`},`
10
-
11
- ${u}`,d]}).flat()}var ae=(t,e)=>t.severity-e.severity;function j(t){let e=t.reduce((r,n)=>{let{uri:i}=n,o=s.path.fsPath(i);return r[o]??=[],r[o].push(n),r},{});return Object.keys(e).reduce((r,n)=>(r[n]=e[n].sort(ae),r),{})}function W(t){return t.reduce((e,r)=>(!Object.prototype.hasOwnProperty.call(e,r.severity)&&(e[r.severity]=0),e[r.severity]++,e),{})}function H(t,e,r){let n=[`${r.length} files inspected`];if(t.length===0)n.push("with no offenses found.");else{n.push(`with ${t.length} total offenses found across ${Object.keys(e).length} files.`);let i=W(t);i[s.Severity.ERROR]&&n.push(`
12
- ${i[s.Severity.ERROR]} errors.`),i[s.Severity.WARNING]&&n.push(`
13
- ${i[s.Severity.WARNING]} warnings.`),i[s.Severity.INFO]&&n.push(`
14
- ${i[s.Severity.INFO]} info issues.`)}return n}function M(t,e,r){Object.keys(t).sort().forEach(i=>{let o=i.replace(e,"").slice(1);S({headline:r?`[${r}] ${o}`:o,body:oe(t[i])})})}function Y(t,e){return Object.entries(t).map(([r,n])=>{let i=n.map(a=>({check:a.check,severity:G(a.severity),start_row:a.start.line,start_column:a.start.character,end_row:a.end.line,end_column:a.end.character,message:a.message})),o=W(n);return{environment:e,path:r,offenses:i,errorCount:o[s.Severity.ERROR]??0,warningCount:o[s.Severity.WARNING]??0,infoCount:o[s.Severity.INFO]??0}})}function q(t,e){e||process.exit(0);let r=re(e),n=r!==void 0&&t.some(i=>i.severity<=r);process.exit(n?1:0)}function ce(t){return t.split(`
15
- `).map(e=>`# ${e}`).join(`
16
- `)}async function U(t){let e=".theme-check.yml",r=k(t,e);if(await R(r)){A(`${e} already exists at ${t}`);return}let{settings:n}=await(0,s.loadConfig)(void 0,t),i=ce(h.default.stringify(n)),o=h.default.stringify({extends:"theme-check:recommended",ignore:["node_modules/**"]});await F(r,`${o}${i}`),N(`Created ${e} at ${t}`)}var fe=async(t,e)=>{let r=(0,s.applyFixToString)(t.source,e),n=s.path.fsPath(t.uri);await F(n,r)};async function B(t,e){await(0,s.autofix)(t,e,fe)}async function J(t,e,r){let{ignore:n,settings:i,rootUri:o}=await(0,s.loadConfig)(e,t),a={extends:[],ignore:[...new Set(n)],rootUri:o,...i},c=r?{[r]:a}:a;p(h.default.stringify(c))}async function D(t,e,r){let{settings:n,ignore:i,checks:o}=await(0,s.loadConfig)(e,t),a=[...new Set(i)],f=Object.keys(n).reduce((u,d)=>{let{severity:z,enabled:K,...Q}=n[d];if(!K)return u;let X=G(z??s.Severity.INFO),y=o.find(ee=>ee.meta.code===d),Z=y&&y.meta?{description:y.meta.docs.description,doc:y.meta.docs.url}:{};return u[d]={severity:X,...Z,ignored_patterns:`[${a.join(", ")}]`,...Q},u},{}),m=r?{[r]:f}:f;p(h.default.stringify(m))}function V(t){return"_handle"in t&&typeof t._handle=="object"&&t._handle!==null&&typeof t._handle.setBlocking=="function"}var l=O(te(),1);var g=O(E(),1);var b=class extends ${static{this.summary="Validate the theme."}static{this.descriptionWithMarkdown="Calls and runs [Theme Check](https://shopify.dev/docs/themes/tools/theme-check) to analyze your theme code for errors and to ensure that it follows theme and Liquid best practices. [Learn more about the checks that Theme Check runs.](https://shopify.dev/docs/themes/tools/theme-check/checks)"}static{this.description=this.descriptionWithoutMarkdown()}static{this.flags={...P,path:w.path,"auto-correct":l.Flags.boolean({char:"a",required:!1,description:"Automatically fix offenses",env:"SHOPIFY_FLAG_AUTO_CORRECT"}),config:l.Flags.string({char:"C",required:!1,description:`Use the config provided, overriding .theme-check.yml if present
17
- Supports all theme-check: config values, e.g., theme-check:theme-app-extension,
18
- theme-check:recommended, theme-check:all
19
- For backwards compatibility, :theme_app_extension is also supported `,env:"SHOPIFY_FLAG_CONFIG"}),"fail-level":l.Flags.string({required:!1,description:"Minimum severity for exit with error code",env:"SHOPIFY_FLAG_FAIL_LEVEL",options:["crash","error","suggestion","style","warning","info"],default:"error"}),init:l.Flags.boolean({required:!1,description:"Generate a .theme-check.yml file",env:"SHOPIFY_FLAG_INIT"}),list:l.Flags.boolean({required:!1,description:"List enabled checks",env:"SHOPIFY_FLAG_LIST"}),output:l.Flags.string({char:"o",required:!1,description:"The output format to use",env:"SHOPIFY_FLAG_OUTPUT",options:["text","json"],default:"text"}),print:l.Flags.boolean({required:!1,description:"Output active config to STDOUT",env:"SHOPIFY_FLAG_PRINT"}),version:l.Flags.boolean({char:"v",required:!1,description:"Print Theme Check version",env:"SHOPIFY_FLAG_VERSION"}),environment:w.environment}}static{this.multiEnvironmentsFlags=["path"]}async command(e,r,n){let i=e.path,o=e.environment?.[0],c=e.config?.startsWith(":")&&g.LegacyIdentifiers.has(e.config.slice(1))?g.LegacyIdentifiers.get(e.config.slice(1)):e.config;if(e.init){await U(i);return}if(e.version){let u=await I(k("node_modules","@shopify","theme-check-node","package.json"),{type:"file",cwd:x(import.meta.url)}),d="unknown";u&&(d=await C(u)??"unknown"),p(d);return}if(e.print){await J(i,c,o);return}if(e.list){await D(i,c,o);return}let{offenses:f,theme:m}=await ue(i,e.output,c,o);if(e["auto-correct"]&&await B(m,f),!n)return q(f,e["fail-level"])}};async function ue(t,e,r,n){let{offenses:i,theme:o}=await(0,g.themeCheckRun)(t,r,c=>{process.env.SHOPIFY_TMP_FLAG_DEBUG&&L(c)}),a=j(i);if(e==="text"&&(M(a,t,n),(i.length?S:T)({headline:n?`[${n}] Theme Check Summary.`:"Theme Check Summary.",body:H(i,a,o)})),e==="json"){let c=process.stdout;V(c)&&c._handle.setBlocking(!0),p(JSON.stringify(Y(a,n)))}return{offenses:i,theme:o}}export{b as a,ue as b};
@@ -1,32 +0,0 @@
1
- import{c as ep,g as tl}from"./chunk-VPRTJUIN.js";var rp=ep((Ot,ne)=>{tl();(function(){var o,el="4.17.23",Qe=200,rl="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",sn="Expected a function",il="Invalid `variable` option passed into `_.template`",Ve="__lodash_hash_undefined__",ul=500,te="__lodash_placeholder__",qn=1,Ai=2,ct=4,ht=1,ee=2,an=1,nt=2,Ri=4,En=8,gt=16,Tn=32,_t=64,Wn=128,Wt=256,ke=512,fl=30,ll="...",ol=800,sl=16,Ii=1,al=2,cl=3,tt=1/0,Kn=9007199254740991,hl=17976931348623157e292,re=NaN,Ln=4294967295,gl=Ln-1,_l=Ln>>>1,pl=[["ary",Wn],["bind",an],["bindKey",nt],["curry",En],["curryRight",gt],["flip",ke],["partial",Tn],["partialRight",_t],["rearg",Wt]],pt="[object Arguments]",ie="[object Array]",vl="[object AsyncFunction]",bt="[object Boolean]",Pt="[object Date]",dl="[object DOMException]",ue="[object Error]",fe="[object Function]",Si="[object GeneratorFunction]",xn="[object Map]",Bt="[object Number]",wl="[object Null]",bn="[object Object]",yi="[object Promise]",xl="[object Proxy]",Ft="[object RegExp]",An="[object Set]",Mt="[object String]",le="[object Symbol]",Al="[object Undefined]",Ut="[object WeakMap]",Rl="[object WeakSet]",Dt="[object ArrayBuffer]",vt="[object DataView]",je="[object Float32Array]",nr="[object Float64Array]",tr="[object Int8Array]",er="[object Int16Array]",rr="[object Int32Array]",ir="[object Uint8Array]",ur="[object Uint8ClampedArray]",fr="[object Uint16Array]",lr="[object Uint32Array]",Il=/\b__p \+= '';/g,Sl=/\b(__p \+=) '' \+/g,yl=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ei=/&(?:amp|lt|gt|quot|#39);/g,Ti=/[&<>"']/g,El=RegExp(Ei.source),Tl=RegExp(Ti.source),Ll=/<%-([\s\S]+?)%>/g,ml=/<%([\s\S]+?)%>/g,Li=/<%=([\s\S]+?)%>/g,Cl=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ol=/^\w*$/,Wl=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,or=/[\\^$.*+?()[\]{}|]/g,bl=RegExp(or.source),sr=/^\s+/,Pl=/\s/,Bl=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Fl=/\{\n\/\* \[wrapped with (.+)\] \*/,Ml=/,? & /,Ul=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Dl=/[()=,{}\[\]\/\s]/,Nl=/\\(\\)?/g,Gl=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,mi=/\w*$/,Hl=/^[-+]0x[0-9a-f]+$/i,ql=/^0b[01]+$/i,Kl=/^\[object .+?Constructor\]$/,$l=/^0o[0-7]+$/i,zl=/^(?:0|[1-9]\d*)$/,Zl=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,oe=/($^)/,Yl=/['\n\r\u2028\u2029\\]/g,se="\\ud800-\\udfff",Xl="\\u0300-\\u036f",Jl="\\ufe20-\\ufe2f",Ql="\\u20d0-\\u20ff",Ci=Xl+Jl+Ql,Oi="\\u2700-\\u27bf",Wi="a-z\\xdf-\\xf6\\xf8-\\xff",Vl="\\xac\\xb1\\xd7\\xf7",kl="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",jl="\\u2000-\\u206f",no=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",bi="A-Z\\xc0-\\xd6\\xd8-\\xde",Pi="\\ufe0e\\ufe0f",Bi=Vl+kl+jl+no,ar="['\u2019]",to="["+se+"]",Fi="["+Bi+"]",ae="["+Ci+"]",Mi="\\d+",eo="["+Oi+"]",Ui="["+Wi+"]",Di="[^"+se+Bi+Mi+Oi+Wi+bi+"]",cr="\\ud83c[\\udffb-\\udfff]",ro="(?:"+ae+"|"+cr+")",Ni="[^"+se+"]",hr="(?:\\ud83c[\\udde6-\\uddff]){2}",gr="[\\ud800-\\udbff][\\udc00-\\udfff]",dt="["+bi+"]",Gi="\\u200d",Hi="(?:"+Ui+"|"+Di+")",io="(?:"+dt+"|"+Di+")",qi="(?:"+ar+"(?:d|ll|m|re|s|t|ve))?",Ki="(?:"+ar+"(?:D|LL|M|RE|S|T|VE))?",$i=ro+"?",zi="["+Pi+"]?",uo="(?:"+Gi+"(?:"+[Ni,hr,gr].join("|")+")"+zi+$i+")*",fo="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",lo="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Zi=zi+$i+uo,oo="(?:"+[eo,hr,gr].join("|")+")"+Zi,so="(?:"+[Ni+ae+"?",ae,hr,gr,to].join("|")+")",ao=RegExp(ar,"g"),co=RegExp(ae,"g"),_r=RegExp(cr+"(?="+cr+")|"+so+Zi,"g"),ho=RegExp([dt+"?"+Ui+"+"+qi+"(?="+[Fi,dt,"$"].join("|")+")",io+"+"+Ki+"(?="+[Fi,dt+Hi,"$"].join("|")+")",dt+"?"+Hi+"+"+qi,dt+"+"+Ki,lo,fo,Mi,oo].join("|"),"g"),go=RegExp("["+Gi+se+Ci+Pi+"]"),_o=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,po=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],vo=-1,M={};M[je]=M[nr]=M[tr]=M[er]=M[rr]=M[ir]=M[ur]=M[fr]=M[lr]=!0,M[pt]=M[ie]=M[Dt]=M[bt]=M[vt]=M[Pt]=M[ue]=M[fe]=M[xn]=M[Bt]=M[bn]=M[Ft]=M[An]=M[Mt]=M[Ut]=!1;var F={};F[pt]=F[ie]=F[Dt]=F[vt]=F[bt]=F[Pt]=F[je]=F[nr]=F[tr]=F[er]=F[rr]=F[xn]=F[Bt]=F[bn]=F[Ft]=F[An]=F[Mt]=F[le]=F[ir]=F[ur]=F[fr]=F[lr]=!0,F[ue]=F[fe]=F[Ut]=!1;var wo={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},xo={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Ao={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Ro={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Io=parseFloat,So=parseInt,Yi=typeof global=="object"&&global&&global.Object===Object&&global,yo=typeof self=="object"&&self&&self.Object===Object&&self,$=Yi||yo||Function("return this")(),pr=typeof Ot=="object"&&Ot&&!Ot.nodeType&&Ot,et=pr&&typeof ne=="object"&&ne&&!ne.nodeType&&ne,Xi=et&&et.exports===pr,vr=Xi&&Yi.process,cn=(function(){try{var a=et&&et.require&&et.require("util").types;return a||vr&&vr.binding&&vr.binding("util")}catch{}})(),Ji=cn&&cn.isArrayBuffer,Qi=cn&&cn.isDate,Vi=cn&&cn.isMap,ki=cn&&cn.isRegExp,ji=cn&&cn.isSet,nu=cn&&cn.isTypedArray;function en(a,g,h){switch(h.length){case 0:return a.call(g);case 1:return a.call(g,h[0]);case 2:return a.call(g,h[0],h[1]);case 3:return a.call(g,h[0],h[1],h[2])}return a.apply(g,h)}function Eo(a,g,h,w){for(var S=-1,W=a==null?0:a.length;++S<W;){var q=a[S];g(w,q,h(q),a)}return w}function hn(a,g){for(var h=-1,w=a==null?0:a.length;++h<w&&g(a[h],h,a)!==!1;);return a}function To(a,g){for(var h=a==null?0:a.length;h--&&g(a[h],h,a)!==!1;);return a}function tu(a,g){for(var h=-1,w=a==null?0:a.length;++h<w;)if(!g(a[h],h,a))return!1;return!0}function $n(a,g){for(var h=-1,w=a==null?0:a.length,S=0,W=[];++h<w;){var q=a[h];g(q,h,a)&&(W[S++]=q)}return W}function ce(a,g){var h=a==null?0:a.length;return!!h&&wt(a,g,0)>-1}function dr(a,g,h){for(var w=-1,S=a==null?0:a.length;++w<S;)if(h(g,a[w]))return!0;return!1}function U(a,g){for(var h=-1,w=a==null?0:a.length,S=Array(w);++h<w;)S[h]=g(a[h],h,a);return S}function zn(a,g){for(var h=-1,w=g.length,S=a.length;++h<w;)a[S+h]=g[h];return a}function wr(a,g,h,w){var S=-1,W=a==null?0:a.length;for(w&&W&&(h=a[++S]);++S<W;)h=g(h,a[S],S,a);return h}function Lo(a,g,h,w){var S=a==null?0:a.length;for(w&&S&&(h=a[--S]);S--;)h=g(h,a[S],S,a);return h}function xr(a,g){for(var h=-1,w=a==null?0:a.length;++h<w;)if(g(a[h],h,a))return!0;return!1}var mo=Ar("length");function Co(a){return a.split("")}function Oo(a){return a.match(Ul)||[]}function eu(a,g,h){var w;return h(a,function(S,W,q){if(g(S,W,q))return w=W,!1}),w}function he(a,g,h,w){for(var S=a.length,W=h+(w?1:-1);w?W--:++W<S;)if(g(a[W],W,a))return W;return-1}function wt(a,g,h){return g===g?qo(a,g,h):he(a,ru,h)}function Wo(a,g,h,w){for(var S=h-1,W=a.length;++S<W;)if(w(a[S],g))return S;return-1}function ru(a){return a!==a}function iu(a,g){var h=a==null?0:a.length;return h?Ir(a,g)/h:re}function Ar(a){return function(g){return g==null?o:g[a]}}function Rr(a){return function(g){return a==null?o:a[g]}}function uu(a,g,h,w,S){return S(a,function(W,q,B){h=w?(w=!1,W):g(h,W,q,B)}),h}function bo(a,g){var h=a.length;for(a.sort(g);h--;)a[h]=a[h].value;return a}function Ir(a,g){for(var h,w=-1,S=a.length;++w<S;){var W=g(a[w]);W!==o&&(h=h===o?W:h+W)}return h}function Sr(a,g){for(var h=-1,w=Array(a);++h<a;)w[h]=g(h);return w}function Po(a,g){return U(g,function(h){return[h,a[h]]})}function fu(a){return a&&a.slice(0,au(a)+1).replace(sr,"")}function rn(a){return function(g){return a(g)}}function yr(a,g){return U(g,function(h){return a[h]})}function Nt(a,g){return a.has(g)}function lu(a,g){for(var h=-1,w=a.length;++h<w&&wt(g,a[h],0)>-1;);return h}function ou(a,g){for(var h=a.length;h--&&wt(g,a[h],0)>-1;);return h}function Bo(a,g){for(var h=a.length,w=0;h--;)a[h]===g&&++w;return w}var Fo=Rr(wo),Mo=Rr(xo);function Uo(a){return"\\"+Ro[a]}function Do(a,g){return a==null?o:a[g]}function xt(a){return go.test(a)}function No(a){return _o.test(a)}function Go(a){for(var g,h=[];!(g=a.next()).done;)h.push(g.value);return h}function Er(a){var g=-1,h=Array(a.size);return a.forEach(function(w,S){h[++g]=[S,w]}),h}function su(a,g){return function(h){return a(g(h))}}function Zn(a,g){for(var h=-1,w=a.length,S=0,W=[];++h<w;){var q=a[h];(q===g||q===te)&&(a[h]=te,W[S++]=h)}return W}function ge(a){var g=-1,h=Array(a.size);return a.forEach(function(w){h[++g]=w}),h}function Ho(a){var g=-1,h=Array(a.size);return a.forEach(function(w){h[++g]=[w,w]}),h}function qo(a,g,h){for(var w=h-1,S=a.length;++w<S;)if(a[w]===g)return w;return-1}function Ko(a,g,h){for(var w=h+1;w--;)if(a[w]===g)return w;return w}function At(a){return xt(a)?zo(a):mo(a)}function Rn(a){return xt(a)?Zo(a):Co(a)}function au(a){for(var g=a.length;g--&&Pl.test(a.charAt(g)););return g}var $o=Rr(Ao);function zo(a){for(var g=_r.lastIndex=0;_r.test(a);)++g;return g}function Zo(a){return a.match(_r)||[]}function Yo(a){return a.match(ho)||[]}var Xo=(function a(g){g=g==null?$:Yn.defaults($.Object(),g,Yn.pick($,po));var h=g.Array,w=g.Date,S=g.Error,W=g.Function,q=g.Math,B=g.Object,Tr=g.RegExp,Jo=g.String,gn=g.TypeError,_e=h.prototype,Qo=W.prototype,Rt=B.prototype,pe=g["__core-js_shared__"],ve=Qo.toString,b=Rt.hasOwnProperty,Vo=0,cu=(function(){var n=/[^.]+$/.exec(pe&&pe.keys&&pe.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""})(),de=Rt.toString,ko=ve.call(B),jo=$._,ns=Tr("^"+ve.call(b).replace(or,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),we=Xi?g.Buffer:o,Xn=g.Symbol,xe=g.Uint8Array,hu=we?we.allocUnsafe:o,Ae=su(B.getPrototypeOf,B),gu=B.create,_u=Rt.propertyIsEnumerable,Re=_e.splice,pu=Xn?Xn.isConcatSpreadable:o,Gt=Xn?Xn.iterator:o,rt=Xn?Xn.toStringTag:o,Ie=(function(){try{var n=ot(B,"defineProperty");return n({},"",{}),n}catch{}})(),ts=g.clearTimeout!==$.clearTimeout&&g.clearTimeout,es=w&&w.now!==$.Date.now&&w.now,rs=g.setTimeout!==$.setTimeout&&g.setTimeout,Se=q.ceil,ye=q.floor,Lr=B.getOwnPropertySymbols,is=we?we.isBuffer:o,vu=g.isFinite,us=_e.join,fs=su(B.keys,B),K=q.max,Y=q.min,ls=w.now,os=g.parseInt,du=q.random,ss=_e.reverse,mr=ot(g,"DataView"),Ht=ot(g,"Map"),Cr=ot(g,"Promise"),It=ot(g,"Set"),qt=ot(g,"WeakMap"),Kt=ot(B,"create"),Ee=qt&&new qt,St={},as=st(mr),cs=st(Ht),hs=st(Cr),gs=st(It),_s=st(qt),Te=Xn?Xn.prototype:o,$t=Te?Te.valueOf:o,wu=Te?Te.toString:o;function u(n){if(N(n)&&!y(n)&&!(n instanceof C)){if(n instanceof _n)return n;if(b.call(n,"__wrapped__"))return Af(n)}return new _n(n)}var yt=(function(){function n(){}return function(t){if(!D(t))return{};if(gu)return gu(t);n.prototype=t;var e=new n;return n.prototype=o,e}})();function Le(){}function _n(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=o}u.templateSettings={escape:Ll,evaluate:ml,interpolate:Li,variable:"",imports:{_:u}},u.prototype=Le.prototype,u.prototype.constructor=u,_n.prototype=yt(Le.prototype),_n.prototype.constructor=_n;function C(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Ln,this.__views__=[]}function ps(){var n=new C(this.__wrapped__);return n.__actions__=k(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=k(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=k(this.__views__),n}function vs(){if(this.__filtered__){var n=new C(this);n.__dir__=-1,n.__filtered__=!0}else n=this.clone(),n.__dir__*=-1;return n}function ds(){var n=this.__wrapped__.value(),t=this.__dir__,e=y(n),r=t<0,i=e?n.length:0,f=Ca(0,i,this.__views__),l=f.start,s=f.end,c=s-l,_=r?s:l-1,p=this.__iteratees__,v=p.length,d=0,x=Y(c,this.__takeCount__);if(!e||!r&&i==c&&x==c)return qu(n,this.__actions__);var R=[];n:for(;c--&&d<x;){_+=t;for(var T=-1,I=n[_];++T<v;){var m=p[T],O=m.iteratee,ln=m.type,V=O(I);if(ln==al)I=V;else if(!V){if(ln==Ii)continue n;break n}}R[d++]=I}return R}C.prototype=yt(Le.prototype),C.prototype.constructor=C;function it(n){var t=-1,e=n==null?0:n.length;for(this.clear();++t<e;){var r=n[t];this.set(r[0],r[1])}}function ws(){this.__data__=Kt?Kt(null):{},this.size=0}function xs(n){var t=this.has(n)&&delete this.__data__[n];return this.size-=t?1:0,t}function As(n){var t=this.__data__;if(Kt){var e=t[n];return e===Ve?o:e}return b.call(t,n)?t[n]:o}function Rs(n){var t=this.__data__;return Kt?t[n]!==o:b.call(t,n)}function Is(n,t){var e=this.__data__;return this.size+=this.has(n)?0:1,e[n]=Kt&&t===o?Ve:t,this}it.prototype.clear=ws,it.prototype.delete=xs,it.prototype.get=As,it.prototype.has=Rs,it.prototype.set=Is;function Pn(n){var t=-1,e=n==null?0:n.length;for(this.clear();++t<e;){var r=n[t];this.set(r[0],r[1])}}function Ss(){this.__data__=[],this.size=0}function ys(n){var t=this.__data__,e=me(t,n);if(e<0)return!1;var r=t.length-1;return e==r?t.pop():Re.call(t,e,1),--this.size,!0}function Es(n){var t=this.__data__,e=me(t,n);return e<0?o:t[e][1]}function Ts(n){return me(this.__data__,n)>-1}function Ls(n,t){var e=this.__data__,r=me(e,n);return r<0?(++this.size,e.push([n,t])):e[r][1]=t,this}Pn.prototype.clear=Ss,Pn.prototype.delete=ys,Pn.prototype.get=Es,Pn.prototype.has=Ts,Pn.prototype.set=Ls;function Bn(n){var t=-1,e=n==null?0:n.length;for(this.clear();++t<e;){var r=n[t];this.set(r[0],r[1])}}function ms(){this.size=0,this.__data__={hash:new it,map:new(Ht||Pn),string:new it}}function Cs(n){var t=Ge(this,n).delete(n);return this.size-=t?1:0,t}function Os(n){return Ge(this,n).get(n)}function Ws(n){return Ge(this,n).has(n)}function bs(n,t){var e=Ge(this,n),r=e.size;return e.set(n,t),this.size+=e.size==r?0:1,this}Bn.prototype.clear=ms,Bn.prototype.delete=Cs,Bn.prototype.get=Os,Bn.prototype.has=Ws,Bn.prototype.set=bs;function ut(n){var t=-1,e=n==null?0:n.length;for(this.__data__=new Bn;++t<e;)this.add(n[t])}function Ps(n){return this.__data__.set(n,Ve),this}function Bs(n){return this.__data__.has(n)}ut.prototype.add=ut.prototype.push=Ps,ut.prototype.has=Bs;function In(n){var t=this.__data__=new Pn(n);this.size=t.size}function Fs(){this.__data__=new Pn,this.size=0}function Ms(n){var t=this.__data__,e=t.delete(n);return this.size=t.size,e}function Us(n){return this.__data__.get(n)}function Ds(n){return this.__data__.has(n)}function Ns(n,t){var e=this.__data__;if(e instanceof Pn){var r=e.__data__;if(!Ht||r.length<Qe-1)return r.push([n,t]),this.size=++e.size,this;e=this.__data__=new Bn(r)}return e.set(n,t),this.size=e.size,this}In.prototype.clear=Fs,In.prototype.delete=Ms,In.prototype.get=Us,In.prototype.has=Ds,In.prototype.set=Ns;function xu(n,t){var e=y(n),r=!e&&at(n),i=!e&&!r&&jn(n),f=!e&&!r&&!i&&mt(n),l=e||r||i||f,s=l?Sr(n.length,Jo):[],c=s.length;for(var _ in n)(t||b.call(n,_))&&!(l&&(_=="length"||i&&(_=="offset"||_=="parent")||f&&(_=="buffer"||_=="byteLength"||_=="byteOffset")||Dn(_,c)))&&s.push(_);return s}function Au(n){var t=n.length;return t?n[Gr(0,t-1)]:o}function Gs(n,t){return He(k(n),ft(t,0,n.length))}function Hs(n){return He(k(n))}function Or(n,t,e){(e!==o&&!Sn(n[t],e)||e===o&&!(t in n))&&Fn(n,t,e)}function zt(n,t,e){var r=n[t];(!(b.call(n,t)&&Sn(r,e))||e===o&&!(t in n))&&Fn(n,t,e)}function me(n,t){for(var e=n.length;e--;)if(Sn(n[e][0],t))return e;return-1}function qs(n,t,e,r){return Jn(n,function(i,f,l){t(r,i,e(i),l)}),r}function Ru(n,t){return n&&Cn(t,z(t),n)}function Ks(n,t){return n&&Cn(t,nn(t),n)}function Fn(n,t,e){t=="__proto__"&&Ie?Ie(n,t,{configurable:!0,enumerable:!0,value:e,writable:!0}):n[t]=e}function Wr(n,t){for(var e=-1,r=t.length,i=h(r),f=n==null;++e<r;)i[e]=f?o:ci(n,t[e]);return i}function ft(n,t,e){return n===n&&(e!==o&&(n=n<=e?n:e),t!==o&&(n=n>=t?n:t)),n}function pn(n,t,e,r,i,f){var l,s=t&qn,c=t&Ai,_=t&ct;if(e&&(l=i?e(n,r,i,f):e(n)),l!==o)return l;if(!D(n))return n;var p=y(n);if(p){if(l=Wa(n),!s)return k(n,l)}else{var v=X(n),d=v==fe||v==Si;if(jn(n))return zu(n,s);if(v==bn||v==pt||d&&!i){if(l=c||d?{}:cf(n),!s)return c?Aa(n,Ks(l,n)):xa(n,Ru(l,n))}else{if(!F[v])return i?n:{};l=ba(n,v,s)}}f||(f=new In);var x=f.get(n);if(x)return x;f.set(n,l),Gf(n)?n.forEach(function(I){l.add(pn(I,t,e,I,n,f))}):Df(n)&&n.forEach(function(I,m){l.set(m,pn(I,t,e,m,n,f))});var R=_?c?Vr:Qr:c?nn:z,T=p?o:R(n);return hn(T||n,function(I,m){T&&(m=I,I=n[m]),zt(l,m,pn(I,t,e,m,n,f))}),l}function $s(n){var t=z(n);return function(e){return Iu(e,n,t)}}function Iu(n,t,e){var r=e.length;if(n==null)return!r;for(n=B(n);r--;){var i=e[r],f=t[i],l=n[i];if(l===o&&!(i in n)||!f(l))return!1}return!0}function Su(n,t,e){if(typeof n!="function")throw new gn(sn);return kt(function(){n.apply(o,e)},t)}function Zt(n,t,e,r){var i=-1,f=ce,l=!0,s=n.length,c=[],_=t.length;if(!s)return c;e&&(t=U(t,rn(e))),r?(f=dr,l=!1):t.length>=Qe&&(f=Nt,l=!1,t=new ut(t));n:for(;++i<s;){var p=n[i],v=e==null?p:e(p);if(p=r||p!==0?p:0,l&&v===v){for(var d=_;d--;)if(t[d]===v)continue n;c.push(p)}else f(t,v,r)||c.push(p)}return c}var Jn=Qu(mn),yu=Qu(Pr,!0);function zs(n,t){var e=!0;return Jn(n,function(r,i,f){return e=!!t(r,i,f),e}),e}function Ce(n,t,e){for(var r=-1,i=n.length;++r<i;){var f=n[r],l=t(f);if(l!=null&&(s===o?l===l&&!fn(l):e(l,s)))var s=l,c=f}return c}function Zs(n,t,e,r){var i=n.length;for(e=E(e),e<0&&(e=-e>i?0:i+e),r=r===o||r>i?i:E(r),r<0&&(r+=i),r=e>r?0:qf(r);e<r;)n[e++]=t;return n}function Eu(n,t){var e=[];return Jn(n,function(r,i,f){t(r,i,f)&&e.push(r)}),e}function Z(n,t,e,r,i){var f=-1,l=n.length;for(e||(e=Ba),i||(i=[]);++f<l;){var s=n[f];t>0&&e(s)?t>1?Z(s,t-1,e,r,i):zn(i,s):r||(i[i.length]=s)}return i}var br=Vu(),Tu=Vu(!0);function mn(n,t){return n&&br(n,t,z)}function Pr(n,t){return n&&Tu(n,t,z)}function Oe(n,t){return $n(t,function(e){return Nn(n[e])})}function lt(n,t){t=Vn(t,n);for(var e=0,r=t.length;n!=null&&e<r;)n=n[On(t[e++])];return e&&e==r?n:o}function Lu(n,t,e){var r=t(n);return y(n)?r:zn(r,e(n))}function J(n){return n==null?n===o?Al:wl:rt&&rt in B(n)?ma(n):Ha(n)}function Br(n,t){return n>t}function Ys(n,t){return n!=null&&b.call(n,t)}function Xs(n,t){return n!=null&&t in B(n)}function Js(n,t,e){return n>=Y(t,e)&&n<K(t,e)}function Fr(n,t,e){for(var r=e?dr:ce,i=n[0].length,f=n.length,l=f,s=h(f),c=1/0,_=[];l--;){var p=n[l];l&&t&&(p=U(p,rn(t))),c=Y(p.length,c),s[l]=!e&&(t||i>=120&&p.length>=120)?new ut(l&&p):o}p=n[0];var v=-1,d=s[0];n:for(;++v<i&&_.length<c;){var x=p[v],R=t?t(x):x;if(x=e||x!==0?x:0,!(d?Nt(d,R):r(_,R,e))){for(l=f;--l;){var T=s[l];if(!(T?Nt(T,R):r(n[l],R,e)))continue n}d&&d.push(R),_.push(x)}}return _}function Qs(n,t,e,r){return mn(n,function(i,f,l){t(r,e(i),f,l)}),r}function Yt(n,t,e){t=Vn(t,n),n=pf(n,t);var r=n==null?n:n[On(dn(t))];return r==null?o:en(r,n,e)}function mu(n){return N(n)&&J(n)==pt}function Vs(n){return N(n)&&J(n)==Dt}function ks(n){return N(n)&&J(n)==Pt}function Xt(n,t,e,r,i){return n===t?!0:n==null||t==null||!N(n)&&!N(t)?n!==n&&t!==t:js(n,t,e,r,Xt,i)}function js(n,t,e,r,i,f){var l=y(n),s=y(t),c=l?ie:X(n),_=s?ie:X(t);c=c==pt?bn:c,_=_==pt?bn:_;var p=c==bn,v=_==bn,d=c==_;if(d&&jn(n)){if(!jn(t))return!1;l=!0,p=!1}if(d&&!p)return f||(f=new In),l||mt(n)?of(n,t,e,r,i,f):Ta(n,t,c,e,r,i,f);if(!(e&ht)){var x=p&&b.call(n,"__wrapped__"),R=v&&b.call(t,"__wrapped__");if(x||R){var T=x?n.value():n,I=R?t.value():t;return f||(f=new In),i(T,I,e,r,f)}}return d?(f||(f=new In),La(n,t,e,r,i,f)):!1}function na(n){return N(n)&&X(n)==xn}function Mr(n,t,e,r){var i=e.length,f=i,l=!r;if(n==null)return!f;for(n=B(n);i--;){var s=e[i];if(l&&s[2]?s[1]!==n[s[0]]:!(s[0]in n))return!1}for(;++i<f;){s=e[i];var c=s[0],_=n[c],p=s[1];if(l&&s[2]){if(_===o&&!(c in n))return!1}else{var v=new In;if(r)var d=r(_,p,c,n,t,v);if(!(d===o?Xt(p,_,ht|ee,r,v):d))return!1}}return!0}function Cu(n){if(!D(n)||Ma(n))return!1;var t=Nn(n)?ns:Kl;return t.test(st(n))}function ta(n){return N(n)&&J(n)==Ft}function ea(n){return N(n)&&X(n)==An}function ra(n){return N(n)&&Ye(n.length)&&!!M[J(n)]}function Ou(n){return typeof n=="function"?n:n==null?tn:typeof n=="object"?y(n)?Pu(n[0],n[1]):bu(n):jf(n)}function Ur(n){if(!Vt(n))return fs(n);var t=[];for(var e in B(n))b.call(n,e)&&e!="constructor"&&t.push(e);return t}function ia(n){if(!D(n))return Ga(n);var t=Vt(n),e=[];for(var r in n)r=="constructor"&&(t||!b.call(n,r))||e.push(r);return e}function Dr(n,t){return n<t}function Wu(n,t){var e=-1,r=j(n)?h(n.length):[];return Jn(n,function(i,f,l){r[++e]=t(i,f,l)}),r}function bu(n){var t=jr(n);return t.length==1&&t[0][2]?gf(t[0][0],t[0][1]):function(e){return e===n||Mr(e,n,t)}}function Pu(n,t){return ti(n)&&hf(t)?gf(On(n),t):function(e){var r=ci(e,n);return r===o&&r===t?hi(e,n):Xt(t,r,ht|ee)}}function We(n,t,e,r,i){n!==t&&br(t,function(f,l){if(i||(i=new In),D(f))ua(n,t,l,e,We,r,i);else{var s=r?r(ri(n,l),f,l+"",n,t,i):o;s===o&&(s=f),Or(n,l,s)}},nn)}function ua(n,t,e,r,i,f,l){var s=ri(n,e),c=ri(t,e),_=l.get(c);if(_){Or(n,e,_);return}var p=f?f(s,c,e+"",n,t,l):o,v=p===o;if(v){var d=y(c),x=!d&&jn(c),R=!d&&!x&&mt(c);p=c,d||x||R?y(s)?p=s:G(s)?p=k(s):x?(v=!1,p=zu(c,!0)):R?(v=!1,p=Zu(c,!0)):p=[]:jt(c)||at(c)?(p=s,at(s)?p=Kf(s):(!D(s)||Nn(s))&&(p=cf(c))):v=!1}v&&(l.set(c,p),i(p,c,r,f,l),l.delete(c)),Or(n,e,p)}function Bu(n,t){var e=n.length;if(e)return t+=t<0?e:0,Dn(t,e)?n[t]:o}function Fu(n,t,e){t.length?t=U(t,function(f){return y(f)?function(l){return lt(l,f.length===1?f[0]:f)}:f}):t=[tn];var r=-1;t=U(t,rn(A()));var i=Wu(n,function(f,l,s){var c=U(t,function(_){return _(f)});return{criteria:c,index:++r,value:f}});return bo(i,function(f,l){return wa(f,l,e)})}function fa(n,t){return Mu(n,t,function(e,r){return hi(n,r)})}function Mu(n,t,e){for(var r=-1,i=t.length,f={};++r<i;){var l=t[r],s=lt(n,l);e(s,l)&&Jt(f,Vn(l,n),s)}return f}function la(n){return function(t){return lt(t,n)}}function Nr(n,t,e,r){var i=r?Wo:wt,f=-1,l=t.length,s=n;for(n===t&&(t=k(t)),e&&(s=U(n,rn(e)));++f<l;)for(var c=0,_=t[f],p=e?e(_):_;(c=i(s,p,c,r))>-1;)s!==n&&Re.call(s,c,1),Re.call(n,c,1);return n}function Uu(n,t){for(var e=n?t.length:0,r=e-1;e--;){var i=t[e];if(e==r||i!==f){var f=i;Dn(i)?Re.call(n,i,1):Kr(n,i)}}return n}function Gr(n,t){return n+ye(du()*(t-n+1))}function oa(n,t,e,r){for(var i=-1,f=K(Se((t-n)/(e||1)),0),l=h(f);f--;)l[r?f:++i]=n,n+=e;return l}function Hr(n,t){var e="";if(!n||t<1||t>Kn)return e;do t%2&&(e+=n),t=ye(t/2),t&&(n+=n);while(t);return e}function L(n,t){return ii(_f(n,t,tn),n+"")}function sa(n){return Au(Ct(n))}function aa(n,t){var e=Ct(n);return He(e,ft(t,0,e.length))}function Jt(n,t,e,r){if(!D(n))return n;t=Vn(t,n);for(var i=-1,f=t.length,l=f-1,s=n;s!=null&&++i<f;){var c=On(t[i]),_=e;if(c==="__proto__"||c==="constructor"||c==="prototype")return n;if(i!=l){var p=s[c];_=r?r(p,c,s):o,_===o&&(_=D(p)?p:Dn(t[i+1])?[]:{})}zt(s,c,_),s=s[c]}return n}var Du=Ee?function(n,t){return Ee.set(n,t),n}:tn,ca=Ie?function(n,t){return Ie(n,"toString",{configurable:!0,enumerable:!1,value:_i(t),writable:!0})}:tn;function ha(n){return He(Ct(n))}function vn(n,t,e){var r=-1,i=n.length;t<0&&(t=-t>i?0:i+t),e=e>i?i:e,e<0&&(e+=i),i=t>e?0:e-t>>>0,t>>>=0;for(var f=h(i);++r<i;)f[r]=n[r+t];return f}function ga(n,t){var e;return Jn(n,function(r,i,f){return e=t(r,i,f),!e}),!!e}function be(n,t,e){var r=0,i=n==null?r:n.length;if(typeof t=="number"&&t===t&&i<=_l){for(;r<i;){var f=r+i>>>1,l=n[f];l!==null&&!fn(l)&&(e?l<=t:l<t)?r=f+1:i=f}return i}return qr(n,t,tn,e)}function qr(n,t,e,r){var i=0,f=n==null?0:n.length;if(f===0)return 0;t=e(t);for(var l=t!==t,s=t===null,c=fn(t),_=t===o;i<f;){var p=ye((i+f)/2),v=e(n[p]),d=v!==o,x=v===null,R=v===v,T=fn(v);if(l)var I=r||R;else _?I=R&&(r||d):s?I=R&&d&&(r||!x):c?I=R&&d&&!x&&(r||!T):x||T?I=!1:I=r?v<=t:v<t;I?i=p+1:f=p}return Y(f,gl)}function Nu(n,t){for(var e=-1,r=n.length,i=0,f=[];++e<r;){var l=n[e],s=t?t(l):l;if(!e||!Sn(s,c)){var c=s;f[i++]=l===0?0:l}}return f}function Gu(n){return typeof n=="number"?n:fn(n)?re:+n}function un(n){if(typeof n=="string")return n;if(y(n))return U(n,un)+"";if(fn(n))return wu?wu.call(n):"";var t=n+"";return t=="0"&&1/n==-tt?"-0":t}function Qn(n,t,e){var r=-1,i=ce,f=n.length,l=!0,s=[],c=s;if(e)l=!1,i=dr;else if(f>=Qe){var _=t?null:ya(n);if(_)return ge(_);l=!1,i=Nt,c=new ut}else c=t?[]:s;n:for(;++r<f;){var p=n[r],v=t?t(p):p;if(p=e||p!==0?p:0,l&&v===v){for(var d=c.length;d--;)if(c[d]===v)continue n;t&&c.push(v),s.push(p)}else i(c,v,e)||(c!==s&&c.push(v),s.push(p))}return s}function Kr(n,t){t=Vn(t,n);var e=-1,r=t.length;if(!r)return!0;for(var i=n==null||typeof n!="object"&&typeof n!="function";++e<r;){var f=t[e];if(typeof f=="string"){if(f==="__proto__"&&!b.call(n,"__proto__"))return!1;if(f==="constructor"&&e+1<r&&typeof t[e+1]=="string"&&t[e+1]==="prototype"){if(i&&e===0)continue;return!1}}}var l=pf(n,t);return l==null||delete l[On(dn(t))]}function Hu(n,t,e,r){return Jt(n,t,e(lt(n,t)),r)}function Pe(n,t,e,r){for(var i=n.length,f=r?i:-1;(r?f--:++f<i)&&t(n[f],f,n););return e?vn(n,r?0:f,r?f+1:i):vn(n,r?f+1:0,r?i:f)}function qu(n,t){var e=n;return e instanceof C&&(e=e.value()),wr(t,function(r,i){return i.func.apply(i.thisArg,zn([r],i.args))},e)}function $r(n,t,e){var r=n.length;if(r<2)return r?Qn(n[0]):[];for(var i=-1,f=h(r);++i<r;)for(var l=n[i],s=-1;++s<r;)s!=i&&(f[i]=Zt(f[i]||l,n[s],t,e));return Qn(Z(f,1),t,e)}function Ku(n,t,e){for(var r=-1,i=n.length,f=t.length,l={};++r<i;){var s=r<f?t[r]:o;e(l,n[r],s)}return l}function zr(n){return G(n)?n:[]}function Zr(n){return typeof n=="function"?n:tn}function Vn(n,t){return y(n)?n:ti(n,t)?[n]:xf(P(n))}var _a=L;function kn(n,t,e){var r=n.length;return e=e===o?r:e,!t&&e>=r?n:vn(n,t,e)}var $u=ts||function(n){return $.clearTimeout(n)};function zu(n,t){if(t)return n.slice();var e=n.length,r=hu?hu(e):new n.constructor(e);return n.copy(r),r}function Yr(n){var t=new n.constructor(n.byteLength);return new xe(t).set(new xe(n)),t}function pa(n,t){var e=t?Yr(n.buffer):n.buffer;return new n.constructor(e,n.byteOffset,n.byteLength)}function va(n){var t=new n.constructor(n.source,mi.exec(n));return t.lastIndex=n.lastIndex,t}function da(n){return $t?B($t.call(n)):{}}function Zu(n,t){var e=t?Yr(n.buffer):n.buffer;return new n.constructor(e,n.byteOffset,n.length)}function Yu(n,t){if(n!==t){var e=n!==o,r=n===null,i=n===n,f=fn(n),l=t!==o,s=t===null,c=t===t,_=fn(t);if(!s&&!_&&!f&&n>t||f&&l&&c&&!s&&!_||r&&l&&c||!e&&c||!i)return 1;if(!r&&!f&&!_&&n<t||_&&e&&i&&!r&&!f||s&&e&&i||!l&&i||!c)return-1}return 0}function wa(n,t,e){for(var r=-1,i=n.criteria,f=t.criteria,l=i.length,s=e.length;++r<l;){var c=Yu(i[r],f[r]);if(c){if(r>=s)return c;var _=e[r];return c*(_=="desc"?-1:1)}}return n.index-t.index}function Xu(n,t,e,r){for(var i=-1,f=n.length,l=e.length,s=-1,c=t.length,_=K(f-l,0),p=h(c+_),v=!r;++s<c;)p[s]=t[s];for(;++i<l;)(v||i<f)&&(p[e[i]]=n[i]);for(;_--;)p[s++]=n[i++];return p}function Ju(n,t,e,r){for(var i=-1,f=n.length,l=-1,s=e.length,c=-1,_=t.length,p=K(f-s,0),v=h(p+_),d=!r;++i<p;)v[i]=n[i];for(var x=i;++c<_;)v[x+c]=t[c];for(;++l<s;)(d||i<f)&&(v[x+e[l]]=n[i++]);return v}function k(n,t){var e=-1,r=n.length;for(t||(t=h(r));++e<r;)t[e]=n[e];return t}function Cn(n,t,e,r){var i=!e;e||(e={});for(var f=-1,l=t.length;++f<l;){var s=t[f],c=r?r(e[s],n[s],s,e,n):o;c===o&&(c=n[s]),i?Fn(e,s,c):zt(e,s,c)}return e}function xa(n,t){return Cn(n,ni(n),t)}function Aa(n,t){return Cn(n,sf(n),t)}function Be(n,t){return function(e,r){var i=y(e)?Eo:qs,f=t?t():{};return i(e,n,A(r,2),f)}}function Et(n){return L(function(t,e){var r=-1,i=e.length,f=i>1?e[i-1]:o,l=i>2?e[2]:o;for(f=n.length>3&&typeof f=="function"?(i--,f):o,l&&Q(e[0],e[1],l)&&(f=i<3?o:f,i=1),t=B(t);++r<i;){var s=e[r];s&&n(t,s,r,f)}return t})}function Qu(n,t){return function(e,r){if(e==null)return e;if(!j(e))return n(e,r);for(var i=e.length,f=t?i:-1,l=B(e);(t?f--:++f<i)&&r(l[f],f,l)!==!1;);return e}}function Vu(n){return function(t,e,r){for(var i=-1,f=B(t),l=r(t),s=l.length;s--;){var c=l[n?s:++i];if(e(f[c],c,f)===!1)break}return t}}function Ra(n,t,e){var r=t&an,i=Qt(n);function f(){var l=this&&this!==$&&this instanceof f?i:n;return l.apply(r?e:this,arguments)}return f}function ku(n){return function(t){t=P(t);var e=xt(t)?Rn(t):o,r=e?e[0]:t.charAt(0),i=e?kn(e,1).join(""):t.slice(1);return r[n]()+i}}function Tt(n){return function(t){return wr(Vf(Qf(t).replace(ao,"")),n,"")}}function Qt(n){return function(){var t=arguments;switch(t.length){case 0:return new n;case 1:return new n(t[0]);case 2:return new n(t[0],t[1]);case 3:return new n(t[0],t[1],t[2]);case 4:return new n(t[0],t[1],t[2],t[3]);case 5:return new n(t[0],t[1],t[2],t[3],t[4]);case 6:return new n(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new n(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var e=yt(n.prototype),r=n.apply(e,t);return D(r)?r:e}}function Ia(n,t,e){var r=Qt(n);function i(){for(var f=arguments.length,l=h(f),s=f,c=Lt(i);s--;)l[s]=arguments[s];var _=f<3&&l[0]!==c&&l[f-1]!==c?[]:Zn(l,c);if(f-=_.length,f<e)return rf(n,t,Fe,i.placeholder,o,l,_,o,o,e-f);var p=this&&this!==$&&this instanceof i?r:n;return en(p,this,l)}return i}function ju(n){return function(t,e,r){var i=B(t);if(!j(t)){var f=A(e,3);t=z(t),e=function(s){return f(i[s],s,i)}}var l=n(t,e,r);return l>-1?i[f?t[l]:l]:o}}function nf(n){return Un(function(t){var e=t.length,r=e,i=_n.prototype.thru;for(n&&t.reverse();r--;){var f=t[r];if(typeof f!="function")throw new gn(sn);if(i&&!l&&Ne(f)=="wrapper")var l=new _n([],!0)}for(r=l?r:e;++r<e;){f=t[r];var s=Ne(f),c=s=="wrapper"?kr(f):o;c&&ei(c[0])&&c[1]==(Wn|En|Tn|Wt)&&!c[4].length&&c[9]==1?l=l[Ne(c[0])].apply(l,c[3]):l=f.length==1&&ei(f)?l[s]():l.thru(f)}return function(){var _=arguments,p=_[0];if(l&&_.length==1&&y(p))return l.plant(p).value();for(var v=0,d=e?t[v].apply(this,_):p;++v<e;)d=t[v].call(this,d);return d}})}function Fe(n,t,e,r,i,f,l,s,c,_){var p=t&Wn,v=t&an,d=t&nt,x=t&(En|gt),R=t&ke,T=d?o:Qt(n);function I(){for(var m=arguments.length,O=h(m),ln=m;ln--;)O[ln]=arguments[ln];if(x)var V=Lt(I),on=Bo(O,V);if(r&&(O=Xu(O,r,i,x)),f&&(O=Ju(O,f,l,x)),m-=on,x&&m<_){var H=Zn(O,V);return rf(n,t,Fe,I.placeholder,e,O,H,s,c,_-m)}var yn=v?e:this,Hn=d?yn[n]:n;return m=O.length,s?O=qa(O,s):R&&m>1&&O.reverse(),p&&c<m&&(O.length=c),this&&this!==$&&this instanceof I&&(Hn=T||Qt(Hn)),Hn.apply(yn,O)}return I}function tf(n,t){return function(e,r){return Qs(e,n,t(r),{})}}function Me(n,t){return function(e,r){var i;if(e===o&&r===o)return t;if(e!==o&&(i=e),r!==o){if(i===o)return r;typeof e=="string"||typeof r=="string"?(e=un(e),r=un(r)):(e=Gu(e),r=Gu(r)),i=n(e,r)}return i}}function Xr(n){return Un(function(t){return t=U(t,rn(A())),L(function(e){var r=this;return n(t,function(i){return en(i,r,e)})})})}function Ue(n,t){t=t===o?" ":un(t);var e=t.length;if(e<2)return e?Hr(t,n):t;var r=Hr(t,Se(n/At(t)));return xt(t)?kn(Rn(r),0,n).join(""):r.slice(0,n)}function Sa(n,t,e,r){var i=t&an,f=Qt(n);function l(){for(var s=-1,c=arguments.length,_=-1,p=r.length,v=h(p+c),d=this&&this!==$&&this instanceof l?f:n;++_<p;)v[_]=r[_];for(;c--;)v[_++]=arguments[++s];return en(d,i?e:this,v)}return l}function ef(n){return function(t,e,r){return r&&typeof r!="number"&&Q(t,e,r)&&(e=r=o),t=Gn(t),e===o?(e=t,t=0):e=Gn(e),r=r===o?t<e?1:-1:Gn(r),oa(t,e,r,n)}}function De(n){return function(t,e){return typeof t=="string"&&typeof e=="string"||(t=wn(t),e=wn(e)),n(t,e)}}function rf(n,t,e,r,i,f,l,s,c,_){var p=t&En,v=p?l:o,d=p?o:l,x=p?f:o,R=p?o:f;t|=p?Tn:_t,t&=~(p?_t:Tn),t&Ri||(t&=~(an|nt));var T=[n,t,i,x,v,R,d,s,c,_],I=e.apply(o,T);return ei(n)&&vf(I,T),I.placeholder=r,df(I,n,t)}function Jr(n){var t=q[n];return function(e,r){if(e=wn(e),r=r==null?0:Y(E(r),292),r&&vu(e)){var i=(P(e)+"e").split("e"),f=t(i[0]+"e"+(+i[1]+r));return i=(P(f)+"e").split("e"),+(i[0]+"e"+(+i[1]-r))}return t(e)}}var ya=It&&1/ge(new It([,-0]))[1]==tt?function(n){return new It(n)}:di;function uf(n){return function(t){var e=X(t);return e==xn?Er(t):e==An?Ho(t):Po(t,n(t))}}function Mn(n,t,e,r,i,f,l,s){var c=t&nt;if(!c&&typeof n!="function")throw new gn(sn);var _=r?r.length:0;if(_||(t&=~(Tn|_t),r=i=o),l=l===o?l:K(E(l),0),s=s===o?s:E(s),_-=i?i.length:0,t&_t){var p=r,v=i;r=i=o}var d=c?o:kr(n),x=[n,t,e,r,i,p,v,f,l,s];if(d&&Na(x,d),n=x[0],t=x[1],e=x[2],r=x[3],i=x[4],s=x[9]=x[9]===o?c?0:n.length:K(x[9]-_,0),!s&&t&(En|gt)&&(t&=~(En|gt)),!t||t==an)var R=Ra(n,t,e);else t==En||t==gt?R=Ia(n,t,s):(t==Tn||t==(an|Tn))&&!i.length?R=Sa(n,t,e,r):R=Fe.apply(o,x);var T=d?Du:vf;return df(T(R,x),n,t)}function ff(n,t,e,r){return n===o||Sn(n,Rt[e])&&!b.call(r,e)?t:n}function lf(n,t,e,r,i,f){return D(n)&&D(t)&&(f.set(t,n),We(n,t,o,lf,f),f.delete(t)),n}function Ea(n){return jt(n)?o:n}function of(n,t,e,r,i,f){var l=e&ht,s=n.length,c=t.length;if(s!=c&&!(l&&c>s))return!1;var _=f.get(n),p=f.get(t);if(_&&p)return _==t&&p==n;var v=-1,d=!0,x=e&ee?new ut:o;for(f.set(n,t),f.set(t,n);++v<s;){var R=n[v],T=t[v];if(r)var I=l?r(T,R,v,t,n,f):r(R,T,v,n,t,f);if(I!==o){if(I)continue;d=!1;break}if(x){if(!xr(t,function(m,O){if(!Nt(x,O)&&(R===m||i(R,m,e,r,f)))return x.push(O)})){d=!1;break}}else if(!(R===T||i(R,T,e,r,f))){d=!1;break}}return f.delete(n),f.delete(t),d}function Ta(n,t,e,r,i,f,l){switch(e){case vt:if(n.byteLength!=t.byteLength||n.byteOffset!=t.byteOffset)return!1;n=n.buffer,t=t.buffer;case Dt:return!(n.byteLength!=t.byteLength||!f(new xe(n),new xe(t)));case bt:case Pt:case Bt:return Sn(+n,+t);case ue:return n.name==t.name&&n.message==t.message;case Ft:case Mt:return n==t+"";case xn:var s=Er;case An:var c=r&ht;if(s||(s=ge),n.size!=t.size&&!c)return!1;var _=l.get(n);if(_)return _==t;r|=ee,l.set(n,t);var p=of(s(n),s(t),r,i,f,l);return l.delete(n),p;case le:if($t)return $t.call(n)==$t.call(t)}return!1}function La(n,t,e,r,i,f){var l=e&ht,s=Qr(n),c=s.length,_=Qr(t),p=_.length;if(c!=p&&!l)return!1;for(var v=c;v--;){var d=s[v];if(!(l?d in t:b.call(t,d)))return!1}var x=f.get(n),R=f.get(t);if(x&&R)return x==t&&R==n;var T=!0;f.set(n,t),f.set(t,n);for(var I=l;++v<c;){d=s[v];var m=n[d],O=t[d];if(r)var ln=l?r(O,m,d,t,n,f):r(m,O,d,n,t,f);if(!(ln===o?m===O||i(m,O,e,r,f):ln)){T=!1;break}I||(I=d=="constructor")}if(T&&!I){var V=n.constructor,on=t.constructor;V!=on&&"constructor"in n&&"constructor"in t&&!(typeof V=="function"&&V instanceof V&&typeof on=="function"&&on instanceof on)&&(T=!1)}return f.delete(n),f.delete(t),T}function Un(n){return ii(_f(n,o,Sf),n+"")}function Qr(n){return Lu(n,z,ni)}function Vr(n){return Lu(n,nn,sf)}var kr=Ee?function(n){return Ee.get(n)}:di;function Ne(n){for(var t=n.name+"",e=St[t],r=b.call(St,t)?e.length:0;r--;){var i=e[r],f=i.func;if(f==null||f==n)return i.name}return t}function Lt(n){var t=b.call(u,"placeholder")?u:n;return t.placeholder}function A(){var n=u.iteratee||pi;return n=n===pi?Ou:n,arguments.length?n(arguments[0],arguments[1]):n}function Ge(n,t){var e=n.__data__;return Fa(t)?e[typeof t=="string"?"string":"hash"]:e.map}function jr(n){for(var t=z(n),e=t.length;e--;){var r=t[e],i=n[r];t[e]=[r,i,hf(i)]}return t}function ot(n,t){var e=Do(n,t);return Cu(e)?e:o}function ma(n){var t=b.call(n,rt),e=n[rt];try{n[rt]=o;var r=!0}catch{}var i=de.call(n);return r&&(t?n[rt]=e:delete n[rt]),i}var ni=Lr?function(n){return n==null?[]:(n=B(n),$n(Lr(n),function(t){return _u.call(n,t)}))}:wi,sf=Lr?function(n){for(var t=[];n;)zn(t,ni(n)),n=Ae(n);return t}:wi,X=J;(mr&&X(new mr(new ArrayBuffer(1)))!=vt||Ht&&X(new Ht)!=xn||Cr&&X(Cr.resolve())!=yi||It&&X(new It)!=An||qt&&X(new qt)!=Ut)&&(X=function(n){var t=J(n),e=t==bn?n.constructor:o,r=e?st(e):"";if(r)switch(r){case as:return vt;case cs:return xn;case hs:return yi;case gs:return An;case _s:return Ut}return t});function Ca(n,t,e){for(var r=-1,i=e.length;++r<i;){var f=e[r],l=f.size;switch(f.type){case"drop":n+=l;break;case"dropRight":t-=l;break;case"take":t=Y(t,n+l);break;case"takeRight":n=K(n,t-l);break}}return{start:n,end:t}}function Oa(n){var t=n.match(Fl);return t?t[1].split(Ml):[]}function af(n,t,e){t=Vn(t,n);for(var r=-1,i=t.length,f=!1;++r<i;){var l=On(t[r]);if(!(f=n!=null&&e(n,l)))break;n=n[l]}return f||++r!=i?f:(i=n==null?0:n.length,!!i&&Ye(i)&&Dn(l,i)&&(y(n)||at(n)))}function Wa(n){var t=n.length,e=new n.constructor(t);return t&&typeof n[0]=="string"&&b.call(n,"index")&&(e.index=n.index,e.input=n.input),e}function cf(n){return typeof n.constructor=="function"&&!Vt(n)?yt(Ae(n)):{}}function ba(n,t,e){var r=n.constructor;switch(t){case Dt:return Yr(n);case bt:case Pt:return new r(+n);case vt:return pa(n,e);case je:case nr:case tr:case er:case rr:case ir:case ur:case fr:case lr:return Zu(n,e);case xn:return new r;case Bt:case Mt:return new r(n);case Ft:return va(n);case An:return new r;case le:return da(n)}}function Pa(n,t){var e=t.length;if(!e)return n;var r=e-1;return t[r]=(e>1?"& ":"")+t[r],t=t.join(e>2?", ":" "),n.replace(Bl,`{
2
- /* [wrapped with `+t+`] */
3
- `)}function Ba(n){return y(n)||at(n)||!!(pu&&n&&n[pu])}function Dn(n,t){var e=typeof n;return t=t??Kn,!!t&&(e=="number"||e!="symbol"&&zl.test(n))&&n>-1&&n%1==0&&n<t}function Q(n,t,e){if(!D(e))return!1;var r=typeof t;return(r=="number"?j(e)&&Dn(t,e.length):r=="string"&&t in e)?Sn(e[t],n):!1}function ti(n,t){if(y(n))return!1;var e=typeof n;return e=="number"||e=="symbol"||e=="boolean"||n==null||fn(n)?!0:Ol.test(n)||!Cl.test(n)||t!=null&&n in B(t)}function Fa(n){var t=typeof n;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?n!=="__proto__":n===null}function ei(n){var t=Ne(n),e=u[t];if(typeof e!="function"||!(t in C.prototype))return!1;if(n===e)return!0;var r=kr(e);return!!r&&n===r[0]}function Ma(n){return!!cu&&cu in n}var Ua=pe?Nn:xi;function Vt(n){var t=n&&n.constructor,e=typeof t=="function"&&t.prototype||Rt;return n===e}function hf(n){return n===n&&!D(n)}function gf(n,t){return function(e){return e==null?!1:e[n]===t&&(t!==o||n in B(e))}}function Da(n){var t=ze(n,function(r){return e.size===ul&&e.clear(),r}),e=t.cache;return t}function Na(n,t){var e=n[1],r=t[1],i=e|r,f=i<(an|nt|Wn),l=r==Wn&&e==En||r==Wn&&e==Wt&&n[7].length<=t[8]||r==(Wn|Wt)&&t[7].length<=t[8]&&e==En;if(!(f||l))return n;r&an&&(n[2]=t[2],i|=e&an?0:Ri);var s=t[3];if(s){var c=n[3];n[3]=c?Xu(c,s,t[4]):s,n[4]=c?Zn(n[3],te):t[4]}return s=t[5],s&&(c=n[5],n[5]=c?Ju(c,s,t[6]):s,n[6]=c?Zn(n[5],te):t[6]),s=t[7],s&&(n[7]=s),r&Wn&&(n[8]=n[8]==null?t[8]:Y(n[8],t[8])),n[9]==null&&(n[9]=t[9]),n[0]=t[0],n[1]=i,n}function Ga(n){var t=[];if(n!=null)for(var e in B(n))t.push(e);return t}function Ha(n){return de.call(n)}function _f(n,t,e){return t=K(t===o?n.length-1:t,0),function(){for(var r=arguments,i=-1,f=K(r.length-t,0),l=h(f);++i<f;)l[i]=r[t+i];i=-1;for(var s=h(t+1);++i<t;)s[i]=r[i];return s[t]=e(l),en(n,this,s)}}function pf(n,t){return t.length<2?n:lt(n,vn(t,0,-1))}function qa(n,t){for(var e=n.length,r=Y(t.length,e),i=k(n);r--;){var f=t[r];n[r]=Dn(f,e)?i[f]:o}return n}function ri(n,t){if(!(t==="constructor"&&typeof n[t]=="function")&&t!="__proto__")return n[t]}var vf=wf(Du),kt=rs||function(n,t){return $.setTimeout(n,t)},ii=wf(ca);function df(n,t,e){var r=t+"";return ii(n,Pa(r,Ka(Oa(r),e)))}function wf(n){var t=0,e=0;return function(){var r=ls(),i=sl-(r-e);if(e=r,i>0){if(++t>=ol)return arguments[0]}else t=0;return n.apply(o,arguments)}}function He(n,t){var e=-1,r=n.length,i=r-1;for(t=t===o?r:t;++e<t;){var f=Gr(e,i),l=n[f];n[f]=n[e],n[e]=l}return n.length=t,n}var xf=Da(function(n){var t=[];return n.charCodeAt(0)===46&&t.push(""),n.replace(Wl,function(e,r,i,f){t.push(i?f.replace(Nl,"$1"):r||e)}),t});function On(n){if(typeof n=="string"||fn(n))return n;var t=n+"";return t=="0"&&1/n==-tt?"-0":t}function st(n){if(n!=null){try{return ve.call(n)}catch{}try{return n+""}catch{}}return""}function Ka(n,t){return hn(pl,function(e){var r="_."+e[0];t&e[1]&&!ce(n,r)&&n.push(r)}),n.sort()}function Af(n){if(n instanceof C)return n.clone();var t=new _n(n.__wrapped__,n.__chain__);return t.__actions__=k(n.__actions__),t.__index__=n.__index__,t.__values__=n.__values__,t}function $a(n,t,e){(e?Q(n,t,e):t===o)?t=1:t=K(E(t),0);var r=n==null?0:n.length;if(!r||t<1)return[];for(var i=0,f=0,l=h(Se(r/t));i<r;)l[f++]=vn(n,i,i+=t);return l}function za(n){for(var t=-1,e=n==null?0:n.length,r=0,i=[];++t<e;){var f=n[t];f&&(i[r++]=f)}return i}function Za(){var n=arguments.length;if(!n)return[];for(var t=h(n-1),e=arguments[0],r=n;r--;)t[r-1]=arguments[r];return zn(y(e)?k(e):[e],Z(t,1))}var Ya=L(function(n,t){return G(n)?Zt(n,Z(t,1,G,!0)):[]}),Xa=L(function(n,t){var e=dn(t);return G(e)&&(e=o),G(n)?Zt(n,Z(t,1,G,!0),A(e,2)):[]}),Ja=L(function(n,t){var e=dn(t);return G(e)&&(e=o),G(n)?Zt(n,Z(t,1,G,!0),o,e):[]});function Qa(n,t,e){var r=n==null?0:n.length;return r?(t=e||t===o?1:E(t),vn(n,t<0?0:t,r)):[]}function Va(n,t,e){var r=n==null?0:n.length;return r?(t=e||t===o?1:E(t),t=r-t,vn(n,0,t<0?0:t)):[]}function ka(n,t){return n&&n.length?Pe(n,A(t,3),!0,!0):[]}function ja(n,t){return n&&n.length?Pe(n,A(t,3),!0):[]}function nc(n,t,e,r){var i=n==null?0:n.length;return i?(e&&typeof e!="number"&&Q(n,t,e)&&(e=0,r=i),Zs(n,t,e,r)):[]}function Rf(n,t,e){var r=n==null?0:n.length;if(!r)return-1;var i=e==null?0:E(e);return i<0&&(i=K(r+i,0)),he(n,A(t,3),i)}function If(n,t,e){var r=n==null?0:n.length;if(!r)return-1;var i=r-1;return e!==o&&(i=E(e),i=e<0?K(r+i,0):Y(i,r-1)),he(n,A(t,3),i,!0)}function Sf(n){var t=n==null?0:n.length;return t?Z(n,1):[]}function tc(n){var t=n==null?0:n.length;return t?Z(n,tt):[]}function ec(n,t){var e=n==null?0:n.length;return e?(t=t===o?1:E(t),Z(n,t)):[]}function rc(n){for(var t=-1,e=n==null?0:n.length,r={};++t<e;){var i=n[t];r[i[0]]=i[1]}return r}function yf(n){return n&&n.length?n[0]:o}function ic(n,t,e){var r=n==null?0:n.length;if(!r)return-1;var i=e==null?0:E(e);return i<0&&(i=K(r+i,0)),wt(n,t,i)}function uc(n){var t=n==null?0:n.length;return t?vn(n,0,-1):[]}var fc=L(function(n){var t=U(n,zr);return t.length&&t[0]===n[0]?Fr(t):[]}),lc=L(function(n){var t=dn(n),e=U(n,zr);return t===dn(e)?t=o:e.pop(),e.length&&e[0]===n[0]?Fr(e,A(t,2)):[]}),oc=L(function(n){var t=dn(n),e=U(n,zr);return t=typeof t=="function"?t:o,t&&e.pop(),e.length&&e[0]===n[0]?Fr(e,o,t):[]});function sc(n,t){return n==null?"":us.call(n,t)}function dn(n){var t=n==null?0:n.length;return t?n[t-1]:o}function ac(n,t,e){var r=n==null?0:n.length;if(!r)return-1;var i=r;return e!==o&&(i=E(e),i=i<0?K(r+i,0):Y(i,r-1)),t===t?Ko(n,t,i):he(n,ru,i,!0)}function cc(n,t){return n&&n.length?Bu(n,E(t)):o}var hc=L(Ef);function Ef(n,t){return n&&n.length&&t&&t.length?Nr(n,t):n}function gc(n,t,e){return n&&n.length&&t&&t.length?Nr(n,t,A(e,2)):n}function _c(n,t,e){return n&&n.length&&t&&t.length?Nr(n,t,o,e):n}var pc=Un(function(n,t){var e=n==null?0:n.length,r=Wr(n,t);return Uu(n,U(t,function(i){return Dn(i,e)?+i:i}).sort(Yu)),r});function vc(n,t){var e=[];if(!(n&&n.length))return e;var r=-1,i=[],f=n.length;for(t=A(t,3);++r<f;){var l=n[r];t(l,r,n)&&(e.push(l),i.push(r))}return Uu(n,i),e}function ui(n){return n==null?n:ss.call(n)}function dc(n,t,e){var r=n==null?0:n.length;return r?(e&&typeof e!="number"&&Q(n,t,e)?(t=0,e=r):(t=t==null?0:E(t),e=e===o?r:E(e)),vn(n,t,e)):[]}function wc(n,t){return be(n,t)}function xc(n,t,e){return qr(n,t,A(e,2))}function Ac(n,t){var e=n==null?0:n.length;if(e){var r=be(n,t);if(r<e&&Sn(n[r],t))return r}return-1}function Rc(n,t){return be(n,t,!0)}function Ic(n,t,e){return qr(n,t,A(e,2),!0)}function Sc(n,t){var e=n==null?0:n.length;if(e){var r=be(n,t,!0)-1;if(Sn(n[r],t))return r}return-1}function yc(n){return n&&n.length?Nu(n):[]}function Ec(n,t){return n&&n.length?Nu(n,A(t,2)):[]}function Tc(n){var t=n==null?0:n.length;return t?vn(n,1,t):[]}function Lc(n,t,e){return n&&n.length?(t=e||t===o?1:E(t),vn(n,0,t<0?0:t)):[]}function mc(n,t,e){var r=n==null?0:n.length;return r?(t=e||t===o?1:E(t),t=r-t,vn(n,t<0?0:t,r)):[]}function Cc(n,t){return n&&n.length?Pe(n,A(t,3),!1,!0):[]}function Oc(n,t){return n&&n.length?Pe(n,A(t,3)):[]}var Wc=L(function(n){return Qn(Z(n,1,G,!0))}),bc=L(function(n){var t=dn(n);return G(t)&&(t=o),Qn(Z(n,1,G,!0),A(t,2))}),Pc=L(function(n){var t=dn(n);return t=typeof t=="function"?t:o,Qn(Z(n,1,G,!0),o,t)});function Bc(n){return n&&n.length?Qn(n):[]}function Fc(n,t){return n&&n.length?Qn(n,A(t,2)):[]}function Mc(n,t){return t=typeof t=="function"?t:o,n&&n.length?Qn(n,o,t):[]}function fi(n){if(!(n&&n.length))return[];var t=0;return n=$n(n,function(e){if(G(e))return t=K(e.length,t),!0}),Sr(t,function(e){return U(n,Ar(e))})}function Tf(n,t){if(!(n&&n.length))return[];var e=fi(n);return t==null?e:U(e,function(r){return en(t,o,r)})}var Uc=L(function(n,t){return G(n)?Zt(n,t):[]}),Dc=L(function(n){return $r($n(n,G))}),Nc=L(function(n){var t=dn(n);return G(t)&&(t=o),$r($n(n,G),A(t,2))}),Gc=L(function(n){var t=dn(n);return t=typeof t=="function"?t:o,$r($n(n,G),o,t)}),Hc=L(fi);function qc(n,t){return Ku(n||[],t||[],zt)}function Kc(n,t){return Ku(n||[],t||[],Jt)}var $c=L(function(n){var t=n.length,e=t>1?n[t-1]:o;return e=typeof e=="function"?(n.pop(),e):o,Tf(n,e)});function Lf(n){var t=u(n);return t.__chain__=!0,t}function zc(n,t){return t(n),n}function qe(n,t){return t(n)}var Zc=Un(function(n){var t=n.length,e=t?n[0]:0,r=this.__wrapped__,i=function(f){return Wr(f,n)};return t>1||this.__actions__.length||!(r instanceof C)||!Dn(e)?this.thru(i):(r=r.slice(e,+e+(t?1:0)),r.__actions__.push({func:qe,args:[i],thisArg:o}),new _n(r,this.__chain__).thru(function(f){return t&&!f.length&&f.push(o),f}))});function Yc(){return Lf(this)}function Xc(){return new _n(this.value(),this.__chain__)}function Jc(){this.__values__===o&&(this.__values__=Hf(this.value()));var n=this.__index__>=this.__values__.length,t=n?o:this.__values__[this.__index__++];return{done:n,value:t}}function Qc(){return this}function Vc(n){for(var t,e=this;e instanceof Le;){var r=Af(e);r.__index__=0,r.__values__=o,t?i.__wrapped__=r:t=r;var i=r;e=e.__wrapped__}return i.__wrapped__=n,t}function kc(){var n=this.__wrapped__;if(n instanceof C){var t=n;return this.__actions__.length&&(t=new C(this)),t=t.reverse(),t.__actions__.push({func:qe,args:[ui],thisArg:o}),new _n(t,this.__chain__)}return this.thru(ui)}function jc(){return qu(this.__wrapped__,this.__actions__)}var nh=Be(function(n,t,e){b.call(n,e)?++n[e]:Fn(n,e,1)});function th(n,t,e){var r=y(n)?tu:zs;return e&&Q(n,t,e)&&(t=o),r(n,A(t,3))}function eh(n,t){var e=y(n)?$n:Eu;return e(n,A(t,3))}var rh=ju(Rf),ih=ju(If);function uh(n,t){return Z(Ke(n,t),1)}function fh(n,t){return Z(Ke(n,t),tt)}function lh(n,t,e){return e=e===o?1:E(e),Z(Ke(n,t),e)}function mf(n,t){var e=y(n)?hn:Jn;return e(n,A(t,3))}function Cf(n,t){var e=y(n)?To:yu;return e(n,A(t,3))}var oh=Be(function(n,t,e){b.call(n,e)?n[e].push(t):Fn(n,e,[t])});function sh(n,t,e,r){n=j(n)?n:Ct(n),e=e&&!r?E(e):0;var i=n.length;return e<0&&(e=K(i+e,0)),Xe(n)?e<=i&&n.indexOf(t,e)>-1:!!i&&wt(n,t,e)>-1}var ah=L(function(n,t,e){var r=-1,i=typeof t=="function",f=j(n)?h(n.length):[];return Jn(n,function(l){f[++r]=i?en(t,l,e):Yt(l,t,e)}),f}),ch=Be(function(n,t,e){Fn(n,e,t)});function Ke(n,t){var e=y(n)?U:Wu;return e(n,A(t,3))}function hh(n,t,e,r){return n==null?[]:(y(t)||(t=t==null?[]:[t]),e=r?o:e,y(e)||(e=e==null?[]:[e]),Fu(n,t,e))}var gh=Be(function(n,t,e){n[e?0:1].push(t)},function(){return[[],[]]});function _h(n,t,e){var r=y(n)?wr:uu,i=arguments.length<3;return r(n,A(t,4),e,i,Jn)}function ph(n,t,e){var r=y(n)?Lo:uu,i=arguments.length<3;return r(n,A(t,4),e,i,yu)}function vh(n,t){var e=y(n)?$n:Eu;return e(n,Ze(A(t,3)))}function dh(n){var t=y(n)?Au:sa;return t(n)}function wh(n,t,e){(e?Q(n,t,e):t===o)?t=1:t=E(t);var r=y(n)?Gs:aa;return r(n,t)}function xh(n){var t=y(n)?Hs:ha;return t(n)}function Ah(n){if(n==null)return 0;if(j(n))return Xe(n)?At(n):n.length;var t=X(n);return t==xn||t==An?n.size:Ur(n).length}function Rh(n,t,e){var r=y(n)?xr:ga;return e&&Q(n,t,e)&&(t=o),r(n,A(t,3))}var Ih=L(function(n,t){if(n==null)return[];var e=t.length;return e>1&&Q(n,t[0],t[1])?t=[]:e>2&&Q(t[0],t[1],t[2])&&(t=[t[0]]),Fu(n,Z(t,1),[])}),$e=es||function(){return $.Date.now()};function Sh(n,t){if(typeof t!="function")throw new gn(sn);return n=E(n),function(){if(--n<1)return t.apply(this,arguments)}}function Of(n,t,e){return t=e?o:t,t=n&&t==null?n.length:t,Mn(n,Wn,o,o,o,o,t)}function Wf(n,t){var e;if(typeof t!="function")throw new gn(sn);return n=E(n),function(){return--n>0&&(e=t.apply(this,arguments)),n<=1&&(t=o),e}}var li=L(function(n,t,e){var r=an;if(e.length){var i=Zn(e,Lt(li));r|=Tn}return Mn(n,r,t,e,i)}),bf=L(function(n,t,e){var r=an|nt;if(e.length){var i=Zn(e,Lt(bf));r|=Tn}return Mn(t,r,n,e,i)});function Pf(n,t,e){t=e?o:t;var r=Mn(n,En,o,o,o,o,o,t);return r.placeholder=Pf.placeholder,r}function Bf(n,t,e){t=e?o:t;var r=Mn(n,gt,o,o,o,o,o,t);return r.placeholder=Bf.placeholder,r}function Ff(n,t,e){var r,i,f,l,s,c,_=0,p=!1,v=!1,d=!0;if(typeof n!="function")throw new gn(sn);t=wn(t)||0,D(e)&&(p=!!e.leading,v="maxWait"in e,f=v?K(wn(e.maxWait)||0,t):f,d="trailing"in e?!!e.trailing:d);function x(H){var yn=r,Hn=i;return r=i=o,_=H,l=n.apply(Hn,yn),l}function R(H){return _=H,s=kt(m,t),p?x(H):l}function T(H){var yn=H-c,Hn=H-_,nl=t-yn;return v?Y(nl,f-Hn):nl}function I(H){var yn=H-c,Hn=H-_;return c===o||yn>=t||yn<0||v&&Hn>=f}function m(){var H=$e();if(I(H))return O(H);s=kt(m,T(H))}function O(H){return s=o,d&&r?x(H):(r=i=o,l)}function ln(){s!==o&&$u(s),_=0,r=c=i=s=o}function V(){return s===o?l:O($e())}function on(){var H=$e(),yn=I(H);if(r=arguments,i=this,c=H,yn){if(s===o)return R(c);if(v)return $u(s),s=kt(m,t),x(c)}return s===o&&(s=kt(m,t)),l}return on.cancel=ln,on.flush=V,on}var yh=L(function(n,t){return Su(n,1,t)}),Eh=L(function(n,t,e){return Su(n,wn(t)||0,e)});function Th(n){return Mn(n,ke)}function ze(n,t){if(typeof n!="function"||t!=null&&typeof t!="function")throw new gn(sn);var e=function(){var r=arguments,i=t?t.apply(this,r):r[0],f=e.cache;if(f.has(i))return f.get(i);var l=n.apply(this,r);return e.cache=f.set(i,l)||f,l};return e.cache=new(ze.Cache||Bn),e}ze.Cache=Bn;function Ze(n){if(typeof n!="function")throw new gn(sn);return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2:return!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2])}return!n.apply(this,t)}}function Lh(n){return Wf(2,n)}var mh=_a(function(n,t){t=t.length==1&&y(t[0])?U(t[0],rn(A())):U(Z(t,1),rn(A()));var e=t.length;return L(function(r){for(var i=-1,f=Y(r.length,e);++i<f;)r[i]=t[i].call(this,r[i]);return en(n,this,r)})}),oi=L(function(n,t){var e=Zn(t,Lt(oi));return Mn(n,Tn,o,t,e)}),Mf=L(function(n,t){var e=Zn(t,Lt(Mf));return Mn(n,_t,o,t,e)}),Ch=Un(function(n,t){return Mn(n,Wt,o,o,o,t)});function Oh(n,t){if(typeof n!="function")throw new gn(sn);return t=t===o?t:E(t),L(n,t)}function Wh(n,t){if(typeof n!="function")throw new gn(sn);return t=t==null?0:K(E(t),0),L(function(e){var r=e[t],i=kn(e,0,t);return r&&zn(i,r),en(n,this,i)})}function bh(n,t,e){var r=!0,i=!0;if(typeof n!="function")throw new gn(sn);return D(e)&&(r="leading"in e?!!e.leading:r,i="trailing"in e?!!e.trailing:i),Ff(n,t,{leading:r,maxWait:t,trailing:i})}function Ph(n){return Of(n,1)}function Bh(n,t){return oi(Zr(t),n)}function Fh(){if(!arguments.length)return[];var n=arguments[0];return y(n)?n:[n]}function Mh(n){return pn(n,ct)}function Uh(n,t){return t=typeof t=="function"?t:o,pn(n,ct,t)}function Dh(n){return pn(n,qn|ct)}function Nh(n,t){return t=typeof t=="function"?t:o,pn(n,qn|ct,t)}function Gh(n,t){return t==null||Iu(n,t,z(t))}function Sn(n,t){return n===t||n!==n&&t!==t}var Hh=De(Br),qh=De(function(n,t){return n>=t}),at=mu((function(){return arguments})())?mu:function(n){return N(n)&&b.call(n,"callee")&&!_u.call(n,"callee")},y=h.isArray,Kh=Ji?rn(Ji):Vs;function j(n){return n!=null&&Ye(n.length)&&!Nn(n)}function G(n){return N(n)&&j(n)}function $h(n){return n===!0||n===!1||N(n)&&J(n)==bt}var jn=is||xi,zh=Qi?rn(Qi):ks;function Zh(n){return N(n)&&n.nodeType===1&&!jt(n)}function Yh(n){if(n==null)return!0;if(j(n)&&(y(n)||typeof n=="string"||typeof n.splice=="function"||jn(n)||mt(n)||at(n)))return!n.length;var t=X(n);if(t==xn||t==An)return!n.size;if(Vt(n))return!Ur(n).length;for(var e in n)if(b.call(n,e))return!1;return!0}function Xh(n,t){return Xt(n,t)}function Jh(n,t,e){e=typeof e=="function"?e:o;var r=e?e(n,t):o;return r===o?Xt(n,t,o,e):!!r}function si(n){if(!N(n))return!1;var t=J(n);return t==ue||t==dl||typeof n.message=="string"&&typeof n.name=="string"&&!jt(n)}function Qh(n){return typeof n=="number"&&vu(n)}function Nn(n){if(!D(n))return!1;var t=J(n);return t==fe||t==Si||t==vl||t==xl}function Uf(n){return typeof n=="number"&&n==E(n)}function Ye(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=Kn}function D(n){var t=typeof n;return n!=null&&(t=="object"||t=="function")}function N(n){return n!=null&&typeof n=="object"}var Df=Vi?rn(Vi):na;function Vh(n,t){return n===t||Mr(n,t,jr(t))}function kh(n,t,e){return e=typeof e=="function"?e:o,Mr(n,t,jr(t),e)}function jh(n){return Nf(n)&&n!=+n}function ng(n){if(Ua(n))throw new S(rl);return Cu(n)}function tg(n){return n===null}function eg(n){return n==null}function Nf(n){return typeof n=="number"||N(n)&&J(n)==Bt}function jt(n){if(!N(n)||J(n)!=bn)return!1;var t=Ae(n);if(t===null)return!0;var e=b.call(t,"constructor")&&t.constructor;return typeof e=="function"&&e instanceof e&&ve.call(e)==ko}var ai=ki?rn(ki):ta;function rg(n){return Uf(n)&&n>=-Kn&&n<=Kn}var Gf=ji?rn(ji):ea;function Xe(n){return typeof n=="string"||!y(n)&&N(n)&&J(n)==Mt}function fn(n){return typeof n=="symbol"||N(n)&&J(n)==le}var mt=nu?rn(nu):ra;function ig(n){return n===o}function ug(n){return N(n)&&X(n)==Ut}function fg(n){return N(n)&&J(n)==Rl}var lg=De(Dr),og=De(function(n,t){return n<=t});function Hf(n){if(!n)return[];if(j(n))return Xe(n)?Rn(n):k(n);if(Gt&&n[Gt])return Go(n[Gt]());var t=X(n),e=t==xn?Er:t==An?ge:Ct;return e(n)}function Gn(n){if(!n)return n===0?n:0;if(n=wn(n),n===tt||n===-tt){var t=n<0?-1:1;return t*hl}return n===n?n:0}function E(n){var t=Gn(n),e=t%1;return t===t?e?t-e:t:0}function qf(n){return n?ft(E(n),0,Ln):0}function wn(n){if(typeof n=="number")return n;if(fn(n))return re;if(D(n)){var t=typeof n.valueOf=="function"?n.valueOf():n;n=D(t)?t+"":t}if(typeof n!="string")return n===0?n:+n;n=fu(n);var e=ql.test(n);return e||$l.test(n)?So(n.slice(2),e?2:8):Hl.test(n)?re:+n}function Kf(n){return Cn(n,nn(n))}function sg(n){return n?ft(E(n),-Kn,Kn):n===0?n:0}function P(n){return n==null?"":un(n)}var ag=Et(function(n,t){if(Vt(t)||j(t)){Cn(t,z(t),n);return}for(var e in t)b.call(t,e)&&zt(n,e,t[e])}),$f=Et(function(n,t){Cn(t,nn(t),n)}),Je=Et(function(n,t,e,r){Cn(t,nn(t),n,r)}),cg=Et(function(n,t,e,r){Cn(t,z(t),n,r)}),hg=Un(Wr);function gg(n,t){var e=yt(n);return t==null?e:Ru(e,t)}var _g=L(function(n,t){n=B(n);var e=-1,r=t.length,i=r>2?t[2]:o;for(i&&Q(t[0],t[1],i)&&(r=1);++e<r;)for(var f=t[e],l=nn(f),s=-1,c=l.length;++s<c;){var _=l[s],p=n[_];(p===o||Sn(p,Rt[_])&&!b.call(n,_))&&(n[_]=f[_])}return n}),pg=L(function(n){return n.push(o,lf),en(zf,o,n)});function vg(n,t){return eu(n,A(t,3),mn)}function dg(n,t){return eu(n,A(t,3),Pr)}function wg(n,t){return n==null?n:br(n,A(t,3),nn)}function xg(n,t){return n==null?n:Tu(n,A(t,3),nn)}function Ag(n,t){return n&&mn(n,A(t,3))}function Rg(n,t){return n&&Pr(n,A(t,3))}function Ig(n){return n==null?[]:Oe(n,z(n))}function Sg(n){return n==null?[]:Oe(n,nn(n))}function ci(n,t,e){var r=n==null?o:lt(n,t);return r===o?e:r}function yg(n,t){return n!=null&&af(n,t,Ys)}function hi(n,t){return n!=null&&af(n,t,Xs)}var Eg=tf(function(n,t,e){t!=null&&typeof t.toString!="function"&&(t=de.call(t)),n[t]=e},_i(tn)),Tg=tf(function(n,t,e){t!=null&&typeof t.toString!="function"&&(t=de.call(t)),b.call(n,t)?n[t].push(e):n[t]=[e]},A),Lg=L(Yt);function z(n){return j(n)?xu(n):Ur(n)}function nn(n){return j(n)?xu(n,!0):ia(n)}function mg(n,t){var e={};return t=A(t,3),mn(n,function(r,i,f){Fn(e,t(r,i,f),r)}),e}function Cg(n,t){var e={};return t=A(t,3),mn(n,function(r,i,f){Fn(e,i,t(r,i,f))}),e}var Og=Et(function(n,t,e){We(n,t,e)}),zf=Et(function(n,t,e,r){We(n,t,e,r)}),Wg=Un(function(n,t){var e={};if(n==null)return e;var r=!1;t=U(t,function(f){return f=Vn(f,n),r||(r=f.length>1),f}),Cn(n,Vr(n),e),r&&(e=pn(e,qn|Ai|ct,Ea));for(var i=t.length;i--;)Kr(e,t[i]);return e});function bg(n,t){return Zf(n,Ze(A(t)))}var Pg=Un(function(n,t){return n==null?{}:fa(n,t)});function Zf(n,t){if(n==null)return{};var e=U(Vr(n),function(r){return[r]});return t=A(t),Mu(n,e,function(r,i){return t(r,i[0])})}function Bg(n,t,e){t=Vn(t,n);var r=-1,i=t.length;for(i||(i=1,n=o);++r<i;){var f=n==null?o:n[On(t[r])];f===o&&(r=i,f=e),n=Nn(f)?f.call(n):f}return n}function Fg(n,t,e){return n==null?n:Jt(n,t,e)}function Mg(n,t,e,r){return r=typeof r=="function"?r:o,n==null?n:Jt(n,t,e,r)}var Yf=uf(z),Xf=uf(nn);function Ug(n,t,e){var r=y(n),i=r||jn(n)||mt(n);if(t=A(t,4),e==null){var f=n&&n.constructor;i?e=r?new f:[]:D(n)?e=Nn(f)?yt(Ae(n)):{}:e={}}return(i?hn:mn)(n,function(l,s,c){return t(e,l,s,c)}),e}function Dg(n,t){return n==null?!0:Kr(n,t)}function Ng(n,t,e){return n==null?n:Hu(n,t,Zr(e))}function Gg(n,t,e,r){return r=typeof r=="function"?r:o,n==null?n:Hu(n,t,Zr(e),r)}function Ct(n){return n==null?[]:yr(n,z(n))}function Hg(n){return n==null?[]:yr(n,nn(n))}function qg(n,t,e){return e===o&&(e=t,t=o),e!==o&&(e=wn(e),e=e===e?e:0),t!==o&&(t=wn(t),t=t===t?t:0),ft(wn(n),t,e)}function Kg(n,t,e){return t=Gn(t),e===o?(e=t,t=0):e=Gn(e),n=wn(n),Js(n,t,e)}function $g(n,t,e){if(e&&typeof e!="boolean"&&Q(n,t,e)&&(t=e=o),e===o&&(typeof t=="boolean"?(e=t,t=o):typeof n=="boolean"&&(e=n,n=o)),n===o&&t===o?(n=0,t=1):(n=Gn(n),t===o?(t=n,n=0):t=Gn(t)),n>t){var r=n;n=t,t=r}if(e||n%1||t%1){var i=du();return Y(n+i*(t-n+Io("1e-"+((i+"").length-1))),t)}return Gr(n,t)}var zg=Tt(function(n,t,e){return t=t.toLowerCase(),n+(e?Jf(t):t)});function Jf(n){return gi(P(n).toLowerCase())}function Qf(n){return n=P(n),n&&n.replace(Zl,Fo).replace(co,"")}function Zg(n,t,e){n=P(n),t=un(t);var r=n.length;e=e===o?r:ft(E(e),0,r);var i=e;return e-=t.length,e>=0&&n.slice(e,i)==t}function Yg(n){return n=P(n),n&&Tl.test(n)?n.replace(Ti,Mo):n}function Xg(n){return n=P(n),n&&bl.test(n)?n.replace(or,"\\$&"):n}var Jg=Tt(function(n,t,e){return n+(e?"-":"")+t.toLowerCase()}),Qg=Tt(function(n,t,e){return n+(e?" ":"")+t.toLowerCase()}),Vg=ku("toLowerCase");function kg(n,t,e){n=P(n),t=E(t);var r=t?At(n):0;if(!t||r>=t)return n;var i=(t-r)/2;return Ue(ye(i),e)+n+Ue(Se(i),e)}function jg(n,t,e){n=P(n),t=E(t);var r=t?At(n):0;return t&&r<t?n+Ue(t-r,e):n}function n_(n,t,e){n=P(n),t=E(t);var r=t?At(n):0;return t&&r<t?Ue(t-r,e)+n:n}function t_(n,t,e){return e||t==null?t=0:t&&(t=+t),os(P(n).replace(sr,""),t||0)}function e_(n,t,e){return(e?Q(n,t,e):t===o)?t=1:t=E(t),Hr(P(n),t)}function r_(){var n=arguments,t=P(n[0]);return n.length<3?t:t.replace(n[1],n[2])}var i_=Tt(function(n,t,e){return n+(e?"_":"")+t.toLowerCase()});function u_(n,t,e){return e&&typeof e!="number"&&Q(n,t,e)&&(t=e=o),e=e===o?Ln:e>>>0,e?(n=P(n),n&&(typeof t=="string"||t!=null&&!ai(t))&&(t=un(t),!t&&xt(n))?kn(Rn(n),0,e):n.split(t,e)):[]}var f_=Tt(function(n,t,e){return n+(e?" ":"")+gi(t)});function l_(n,t,e){return n=P(n),e=e==null?0:ft(E(e),0,n.length),t=un(t),n.slice(e,e+t.length)==t}function o_(n,t,e){var r=u.templateSettings;e&&Q(n,t,e)&&(t=o),n=P(n),t=Je({},t,r,ff);var i=Je({},t.imports,r.imports,ff),f=z(i),l=yr(i,f),s,c,_=0,p=t.interpolate||oe,v="__p += '",d=Tr((t.escape||oe).source+"|"+p.source+"|"+(p===Li?Gl:oe).source+"|"+(t.evaluate||oe).source+"|$","g"),x="//# sourceURL="+(b.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++vo+"]")+`
4
- `;n.replace(d,function(I,m,O,ln,V,on){return O||(O=ln),v+=n.slice(_,on).replace(Yl,Uo),m&&(s=!0,v+=`' +
5
- __e(`+m+`) +
6
- '`),V&&(c=!0,v+=`';
7
- `+V+`;
8
- __p += '`),O&&(v+=`' +
9
- ((__t = (`+O+`)) == null ? '' : __t) +
10
- '`),_=on+I.length,I}),v+=`';
11
- `;var R=b.call(t,"variable")&&t.variable;if(!R)v=`with (obj) {
12
- `+v+`
13
- }
14
- `;else if(Dl.test(R))throw new S(il);v=(c?v.replace(Il,""):v).replace(Sl,"$1").replace(yl,"$1;"),v="function("+(R||"obj")+`) {
15
- `+(R?"":`obj || (obj = {});
16
- `)+"var __t, __p = ''"+(s?", __e = _.escape":"")+(c?`, __j = Array.prototype.join;
17
- function print() { __p += __j.call(arguments, '') }
18
- `:`;
19
- `)+v+`return __p
20
- }`;var T=kf(function(){return W(f,x+"return "+v).apply(o,l)});if(T.source=v,si(T))throw T;return T}function s_(n){return P(n).toLowerCase()}function a_(n){return P(n).toUpperCase()}function c_(n,t,e){if(n=P(n),n&&(e||t===o))return fu(n);if(!n||!(t=un(t)))return n;var r=Rn(n),i=Rn(t),f=lu(r,i),l=ou(r,i)+1;return kn(r,f,l).join("")}function h_(n,t,e){if(n=P(n),n&&(e||t===o))return n.slice(0,au(n)+1);if(!n||!(t=un(t)))return n;var r=Rn(n),i=ou(r,Rn(t))+1;return kn(r,0,i).join("")}function g_(n,t,e){if(n=P(n),n&&(e||t===o))return n.replace(sr,"");if(!n||!(t=un(t)))return n;var r=Rn(n),i=lu(r,Rn(t));return kn(r,i).join("")}function __(n,t){var e=fl,r=ll;if(D(t)){var i="separator"in t?t.separator:i;e="length"in t?E(t.length):e,r="omission"in t?un(t.omission):r}n=P(n);var f=n.length;if(xt(n)){var l=Rn(n);f=l.length}if(e>=f)return n;var s=e-At(r);if(s<1)return r;var c=l?kn(l,0,s).join(""):n.slice(0,s);if(i===o)return c+r;if(l&&(s+=c.length-s),ai(i)){if(n.slice(s).search(i)){var _,p=c;for(i.global||(i=Tr(i.source,P(mi.exec(i))+"g")),i.lastIndex=0;_=i.exec(p);)var v=_.index;c=c.slice(0,v===o?s:v)}}else if(n.indexOf(un(i),s)!=s){var d=c.lastIndexOf(i);d>-1&&(c=c.slice(0,d))}return c+r}function p_(n){return n=P(n),n&&El.test(n)?n.replace(Ei,$o):n}var v_=Tt(function(n,t,e){return n+(e?" ":"")+t.toUpperCase()}),gi=ku("toUpperCase");function Vf(n,t,e){return n=P(n),t=e?o:t,t===o?No(n)?Yo(n):Oo(n):n.match(t)||[]}var kf=L(function(n,t){try{return en(n,o,t)}catch(e){return si(e)?e:new S(e)}}),d_=Un(function(n,t){return hn(t,function(e){e=On(e),Fn(n,e,li(n[e],n))}),n});function w_(n){var t=n==null?0:n.length,e=A();return n=t?U(n,function(r){if(typeof r[1]!="function")throw new gn(sn);return[e(r[0]),r[1]]}):[],L(function(r){for(var i=-1;++i<t;){var f=n[i];if(en(f[0],this,r))return en(f[1],this,r)}})}function x_(n){return $s(pn(n,qn))}function _i(n){return function(){return n}}function A_(n,t){return n==null||n!==n?t:n}var R_=nf(),I_=nf(!0);function tn(n){return n}function pi(n){return Ou(typeof n=="function"?n:pn(n,qn))}function S_(n){return bu(pn(n,qn))}function y_(n,t){return Pu(n,pn(t,qn))}var E_=L(function(n,t){return function(e){return Yt(e,n,t)}}),T_=L(function(n,t){return function(e){return Yt(n,e,t)}});function vi(n,t,e){var r=z(t),i=Oe(t,r);e==null&&!(D(t)&&(i.length||!r.length))&&(e=t,t=n,n=this,i=Oe(t,z(t)));var f=!(D(e)&&"chain"in e)||!!e.chain,l=Nn(n);return hn(i,function(s){var c=t[s];n[s]=c,l&&(n.prototype[s]=function(){var _=this.__chain__;if(f||_){var p=n(this.__wrapped__),v=p.__actions__=k(this.__actions__);return v.push({func:c,args:arguments,thisArg:n}),p.__chain__=_,p}return c.apply(n,zn([this.value()],arguments))})}),n}function L_(){return $._===this&&($._=jo),this}function di(){}function m_(n){return n=E(n),L(function(t){return Bu(t,n)})}var C_=Xr(U),O_=Xr(tu),W_=Xr(xr);function jf(n){return ti(n)?Ar(On(n)):la(n)}function b_(n){return function(t){return n==null?o:lt(n,t)}}var P_=ef(),B_=ef(!0);function wi(){return[]}function xi(){return!1}function F_(){return{}}function M_(){return""}function U_(){return!0}function D_(n,t){if(n=E(n),n<1||n>Kn)return[];var e=Ln,r=Y(n,Ln);t=A(t),n-=Ln;for(var i=Sr(r,t);++e<n;)t(e);return i}function N_(n){return y(n)?U(n,On):fn(n)?[n]:k(xf(P(n)))}function G_(n){var t=++Vo;return P(n)+t}var H_=Me(function(n,t){return n+t},0),q_=Jr("ceil"),K_=Me(function(n,t){return n/t},1),$_=Jr("floor");function z_(n){return n&&n.length?Ce(n,tn,Br):o}function Z_(n,t){return n&&n.length?Ce(n,A(t,2),Br):o}function Y_(n){return iu(n,tn)}function X_(n,t){return iu(n,A(t,2))}function J_(n){return n&&n.length?Ce(n,tn,Dr):o}function Q_(n,t){return n&&n.length?Ce(n,A(t,2),Dr):o}var V_=Me(function(n,t){return n*t},1),k_=Jr("round"),j_=Me(function(n,t){return n-t},0);function np(n){return n&&n.length?Ir(n,tn):0}function tp(n,t){return n&&n.length?Ir(n,A(t,2)):0}return u.after=Sh,u.ary=Of,u.assign=ag,u.assignIn=$f,u.assignInWith=Je,u.assignWith=cg,u.at=hg,u.before=Wf,u.bind=li,u.bindAll=d_,u.bindKey=bf,u.castArray=Fh,u.chain=Lf,u.chunk=$a,u.compact=za,u.concat=Za,u.cond=w_,u.conforms=x_,u.constant=_i,u.countBy=nh,u.create=gg,u.curry=Pf,u.curryRight=Bf,u.debounce=Ff,u.defaults=_g,u.defaultsDeep=pg,u.defer=yh,u.delay=Eh,u.difference=Ya,u.differenceBy=Xa,u.differenceWith=Ja,u.drop=Qa,u.dropRight=Va,u.dropRightWhile=ka,u.dropWhile=ja,u.fill=nc,u.filter=eh,u.flatMap=uh,u.flatMapDeep=fh,u.flatMapDepth=lh,u.flatten=Sf,u.flattenDeep=tc,u.flattenDepth=ec,u.flip=Th,u.flow=R_,u.flowRight=I_,u.fromPairs=rc,u.functions=Ig,u.functionsIn=Sg,u.groupBy=oh,u.initial=uc,u.intersection=fc,u.intersectionBy=lc,u.intersectionWith=oc,u.invert=Eg,u.invertBy=Tg,u.invokeMap=ah,u.iteratee=pi,u.keyBy=ch,u.keys=z,u.keysIn=nn,u.map=Ke,u.mapKeys=mg,u.mapValues=Cg,u.matches=S_,u.matchesProperty=y_,u.memoize=ze,u.merge=Og,u.mergeWith=zf,u.method=E_,u.methodOf=T_,u.mixin=vi,u.negate=Ze,u.nthArg=m_,u.omit=Wg,u.omitBy=bg,u.once=Lh,u.orderBy=hh,u.over=C_,u.overArgs=mh,u.overEvery=O_,u.overSome=W_,u.partial=oi,u.partialRight=Mf,u.partition=gh,u.pick=Pg,u.pickBy=Zf,u.property=jf,u.propertyOf=b_,u.pull=hc,u.pullAll=Ef,u.pullAllBy=gc,u.pullAllWith=_c,u.pullAt=pc,u.range=P_,u.rangeRight=B_,u.rearg=Ch,u.reject=vh,u.remove=vc,u.rest=Oh,u.reverse=ui,u.sampleSize=wh,u.set=Fg,u.setWith=Mg,u.shuffle=xh,u.slice=dc,u.sortBy=Ih,u.sortedUniq=yc,u.sortedUniqBy=Ec,u.split=u_,u.spread=Wh,u.tail=Tc,u.take=Lc,u.takeRight=mc,u.takeRightWhile=Cc,u.takeWhile=Oc,u.tap=zc,u.throttle=bh,u.thru=qe,u.toArray=Hf,u.toPairs=Yf,u.toPairsIn=Xf,u.toPath=N_,u.toPlainObject=Kf,u.transform=Ug,u.unary=Ph,u.union=Wc,u.unionBy=bc,u.unionWith=Pc,u.uniq=Bc,u.uniqBy=Fc,u.uniqWith=Mc,u.unset=Dg,u.unzip=fi,u.unzipWith=Tf,u.update=Ng,u.updateWith=Gg,u.values=Ct,u.valuesIn=Hg,u.without=Uc,u.words=Vf,u.wrap=Bh,u.xor=Dc,u.xorBy=Nc,u.xorWith=Gc,u.zip=Hc,u.zipObject=qc,u.zipObjectDeep=Kc,u.zipWith=$c,u.entries=Yf,u.entriesIn=Xf,u.extend=$f,u.extendWith=Je,vi(u,u),u.add=H_,u.attempt=kf,u.camelCase=zg,u.capitalize=Jf,u.ceil=q_,u.clamp=qg,u.clone=Mh,u.cloneDeep=Dh,u.cloneDeepWith=Nh,u.cloneWith=Uh,u.conformsTo=Gh,u.deburr=Qf,u.defaultTo=A_,u.divide=K_,u.endsWith=Zg,u.eq=Sn,u.escape=Yg,u.escapeRegExp=Xg,u.every=th,u.find=rh,u.findIndex=Rf,u.findKey=vg,u.findLast=ih,u.findLastIndex=If,u.findLastKey=dg,u.floor=$_,u.forEach=mf,u.forEachRight=Cf,u.forIn=wg,u.forInRight=xg,u.forOwn=Ag,u.forOwnRight=Rg,u.get=ci,u.gt=Hh,u.gte=qh,u.has=yg,u.hasIn=hi,u.head=yf,u.identity=tn,u.includes=sh,u.indexOf=ic,u.inRange=Kg,u.invoke=Lg,u.isArguments=at,u.isArray=y,u.isArrayBuffer=Kh,u.isArrayLike=j,u.isArrayLikeObject=G,u.isBoolean=$h,u.isBuffer=jn,u.isDate=zh,u.isElement=Zh,u.isEmpty=Yh,u.isEqual=Xh,u.isEqualWith=Jh,u.isError=si,u.isFinite=Qh,u.isFunction=Nn,u.isInteger=Uf,u.isLength=Ye,u.isMap=Df,u.isMatch=Vh,u.isMatchWith=kh,u.isNaN=jh,u.isNative=ng,u.isNil=eg,u.isNull=tg,u.isNumber=Nf,u.isObject=D,u.isObjectLike=N,u.isPlainObject=jt,u.isRegExp=ai,u.isSafeInteger=rg,u.isSet=Gf,u.isString=Xe,u.isSymbol=fn,u.isTypedArray=mt,u.isUndefined=ig,u.isWeakMap=ug,u.isWeakSet=fg,u.join=sc,u.kebabCase=Jg,u.last=dn,u.lastIndexOf=ac,u.lowerCase=Qg,u.lowerFirst=Vg,u.lt=lg,u.lte=og,u.max=z_,u.maxBy=Z_,u.mean=Y_,u.meanBy=X_,u.min=J_,u.minBy=Q_,u.stubArray=wi,u.stubFalse=xi,u.stubObject=F_,u.stubString=M_,u.stubTrue=U_,u.multiply=V_,u.nth=cc,u.noConflict=L_,u.noop=di,u.now=$e,u.pad=kg,u.padEnd=jg,u.padStart=n_,u.parseInt=t_,u.random=$g,u.reduce=_h,u.reduceRight=ph,u.repeat=e_,u.replace=r_,u.result=Bg,u.round=k_,u.runInContext=a,u.sample=dh,u.size=Ah,u.snakeCase=i_,u.some=Rh,u.sortedIndex=wc,u.sortedIndexBy=xc,u.sortedIndexOf=Ac,u.sortedLastIndex=Rc,u.sortedLastIndexBy=Ic,u.sortedLastIndexOf=Sc,u.startCase=f_,u.startsWith=l_,u.subtract=j_,u.sum=np,u.sumBy=tp,u.template=o_,u.times=D_,u.toFinite=Gn,u.toInteger=E,u.toLength=qf,u.toLower=s_,u.toNumber=wn,u.toSafeInteger=sg,u.toString=P,u.toUpper=a_,u.trim=c_,u.trimEnd=h_,u.trimStart=g_,u.truncate=__,u.unescape=p_,u.uniqueId=G_,u.upperCase=v_,u.upperFirst=gi,u.each=mf,u.eachRight=Cf,u.first=yf,vi(u,(function(){var n={};return mn(u,function(t,e){b.call(u.prototype,e)||(n[e]=t)}),n})(),{chain:!1}),u.VERSION=el,hn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(n){u[n].placeholder=u}),hn(["drop","take"],function(n,t){C.prototype[n]=function(e){e=e===o?1:K(E(e),0);var r=this.__filtered__&&!t?new C(this):this.clone();return r.__filtered__?r.__takeCount__=Y(e,r.__takeCount__):r.__views__.push({size:Y(e,Ln),type:n+(r.__dir__<0?"Right":"")}),r},C.prototype[n+"Right"]=function(e){return this.reverse()[n](e).reverse()}}),hn(["filter","map","takeWhile"],function(n,t){var e=t+1,r=e==Ii||e==cl;C.prototype[n]=function(i){var f=this.clone();return f.__iteratees__.push({iteratee:A(i,3),type:e}),f.__filtered__=f.__filtered__||r,f}}),hn(["head","last"],function(n,t){var e="take"+(t?"Right":"");C.prototype[n]=function(){return this[e](1).value()[0]}}),hn(["initial","tail"],function(n,t){var e="drop"+(t?"":"Right");C.prototype[n]=function(){return this.__filtered__?new C(this):this[e](1)}}),C.prototype.compact=function(){return this.filter(tn)},C.prototype.find=function(n){return this.filter(n).head()},C.prototype.findLast=function(n){return this.reverse().find(n)},C.prototype.invokeMap=L(function(n,t){return typeof n=="function"?new C(this):this.map(function(e){return Yt(e,n,t)})}),C.prototype.reject=function(n){return this.filter(Ze(A(n)))},C.prototype.slice=function(n,t){n=E(n);var e=this;return e.__filtered__&&(n>0||t<0)?new C(e):(n<0?e=e.takeRight(-n):n&&(e=e.drop(n)),t!==o&&(t=E(t),e=t<0?e.dropRight(-t):e.take(t-n)),e)},C.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},C.prototype.toArray=function(){return this.take(Ln)},mn(C.prototype,function(n,t){var e=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=u[r?"take"+(t=="last"?"Right":""):t],f=r||/^find/.test(t);i&&(u.prototype[t]=function(){var l=this.__wrapped__,s=r?[1]:arguments,c=l instanceof C,_=s[0],p=c||y(l),v=function(m){var O=i.apply(u,zn([m],s));return r&&d?O[0]:O};p&&e&&typeof _=="function"&&_.length!=1&&(c=p=!1);var d=this.__chain__,x=!!this.__actions__.length,R=f&&!d,T=c&&!x;if(!f&&p){l=T?l:new C(this);var I=n.apply(l,s);return I.__actions__.push({func:qe,args:[v],thisArg:o}),new _n(I,d)}return R&&T?n.apply(this,s):(I=this.thru(v),R?r?I.value()[0]:I.value():I)})}),hn(["pop","push","shift","sort","splice","unshift"],function(n){var t=_e[n],e=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",r=/^(?:pop|shift)$/.test(n);u.prototype[n]=function(){var i=arguments;if(r&&!this.__chain__){var f=this.value();return t.apply(y(f)?f:[],i)}return this[e](function(l){return t.apply(y(l)?l:[],i)})}}),mn(C.prototype,function(n,t){var e=u[t];if(e){var r=e.name+"";b.call(St,r)||(St[r]=[]),St[r].push({name:t,func:e})}}),St[Fe(o,nt).name]=[{name:"wrapper",func:o}],C.prototype.clone=ps,C.prototype.reverse=vs,C.prototype.value=ds,u.prototype.at=Zc,u.prototype.chain=Yc,u.prototype.commit=Xc,u.prototype.next=Jc,u.prototype.plant=Vc,u.prototype.reverse=kc,u.prototype.toJSON=u.prototype.valueOf=u.prototype.value=jc,u.prototype.first=u.prototype.head,Gt&&(u.prototype[Gt]=Qc),u}),Yn=Xo();typeof define=="function"&&typeof define.amd=="object"&&define.amd?($._=Yn,define(function(){return Yn})):et?((et.exports=Yn)._=Yn,pr._=Yn):$._=Yn}).call(Ot)});export{rp as a};
21
- /*! Bundled license information:
22
-
23
- lodash/lodash.js:
24
- (**
25
- * @license
26
- * Lodash <https://lodash.com/>
27
- * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
28
- * Released under MIT license <https://lodash.com/license>
29
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
30
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
31
- *)
32
- */
@@ -1,4 +0,0 @@
1
- import{b as f,e as c}from"./chunk-DJQVNH7P.js";import{d as s}from"./chunk-JPGO36XP.js";import{$ as l,Ta as i,qa as m,wa as p}from"./chunk-GFEAKSGV.js";import{d as o}from"./chunk-IU2ZQ6TE.js";import{g as a}from"./chunk-VPRTJUIN.js";a();async function v(t,r){let n=t?.path??"",e=o(r,n);if(!await i(e))throw new s(`
2
- The extension is not available for ${t?.value}`);return e}async function P({name:t,app:r}){let n=l(t),e=o(r.directory,c.extensions.directoryName,n);if(await i(e))throw new s(`
3
- A directory with this name (${n}) already exists.
4
- Choose a new name for your extension.`);return await p(e),await m(o(e,f.lockFile)),e}async function b({localApp:t,developerPlatformClient:r,apiKey:n,organizationId:e}){let{dashboardManagedExtensionRegistrations:h}=(await r.appExtensionRegistrations({id:n,apiKey:n,organizationId:e})).app;return h.length>0||t.allExtensions.filter(x=>x.isThemeExtension).length>0||t.allExtensions.length>0}export{v as a,P as b,b as c};
@@ -1 +0,0 @@
1
- import{a as c}from"./chunk-V2CNCPIE.js";import{g as p}from"./chunk-VPRTJUIN.js";p();var u=!1;function I(){return u}function k(){let a=0,o=!1,r=setInterval(()=>{if(!o){if(I()||a>=12e4){o=!0,clearInterval(r),c(process.pid,"SIGINT",!1,()=>{process.exit(0)});return}a+=100}},100)}var b=async({config:t,Command:e})=>{await M(e);let{reportAnalyticsEvent:a}=await import("./analytics-6IHHYAV6.js");await a({config:t,exitMode:"ok"});let{postrun:o}=await import("./deprecations-TU5UQJVV.js");o(e);let{outputDebug:r}=await import("./output-YGMHXEIS.js"),i=e.id.replace(/:/g," ");r(`Completed command ${i}`),!i.includes("notifications")&&!i.includes("upgrade")&&await v(),u=!0};async function v(){let{versionToAutoUpgrade:t,warnIfUpgradeAvailable:e}=await import("./upgrade-OPZGPM5J.js"),a=t();if(!a){await e();return}if(process.env.SHOPIFY_CLI_FORCE_AUTO_UPGRADE==="1")await d(a);else{let{runAtMinimumInterval:r}=await import("./conf-store-U5ZITKJN.js");await r("auto-upgrade",{days:1},async()=>{await d(a)})}}async function d(t){let[{CLI_KIT_VERSION:e},{isMajorVersionChange:a},{outputWarn:o,outputDebug:r},{getOutputUpdateCLIReminder:i,runCLIUpgrade:l,hasBlockingAutoUpgradeNotification:m},n]=await Promise.all([import("./version-KRQBMYCH.js"),import("./version-D5PJZIRW.js"),import("./output-YGMHXEIS.js"),import("./upgrade-OPZGPM5J.js"),import("./metadata-UDMOTRS7.js")]);if(a(e,t)){o(i(t,!0)),await n.addPublicMetadata(()=>({env_auto_upgrade_skipped_reason:"major_version"}));return}if(await m()){await n.addPublicMetadata(()=>({env_auto_upgrade_skipped_reason:"blocked_by_notification"}));return}try{await l({autoupgrade:!0}),await n.addPublicMetadata(()=>({env_auto_upgrade_success:!0}))}catch(f){let s=`Auto-upgrade failed: ${f}`;r(s),o(i(t)),await n.addPublicMetadata(()=>({env_auto_upgrade_success:!1}));let[{sendErrorToBugsnag:g},{inferPackageManagerForGlobalCLI:w}]=await Promise.all([import("./error-handler-WSCGNS2P.js"),import("./is-global-V4ZRHQG2.js")]),_=Object.assign(new Error(s),{packageManager:w(),platform:process.platform,cliVersion:e});await g(_,"expected_error")}}async function M(t){let e=new Date().getTime();if(t&&"analyticsStopCommand"in t&&typeof t.analyticsStopCommand=="function"){let a=t.analyticsStopCommand();if(a){let o=await import("./metadata-UDMOTRS7.js"),{commandStartOptions:r}=o.getAllSensitiveMetadata();if(!r)return;await o.addSensitiveMetadata(()=>({commandStartOptions:{...r,startTime:e,startCommand:a}}))}}}export{k as a,b};
@@ -1 +0,0 @@
1
- import{P as m}from"./chunk-BDVAE5MS.js";import{d as c}from"./chunk-JPGO36XP.js";import{Gb as l,Ib as n,Qb as a}from"./chunk-GFEAKSGV.js";import{g as s}from"./chunk-VPRTJUIN.js";s();import{createServer as f}from"net";var u=new Set;async function P(r,t){if(r&&await g(r))return a(n`Port ${r.toString()} is free`),r;a(n`Getting a random port...`);let e=await w(()=>d(),t?.maxTries,t?.waitTimeInSeconds);for(let o=0;o<(t?.maxTries??5)&&u.has(e);o++)e=await w(()=>d(),t?.maxTries,t?.waitTimeInSeconds);return a(n`Random port obtained: ${l.raw(`${e}`)}`),u.add(e),e}async function g(r){return new Promise(t=>{let e=f();e.unref(),e.once("error",()=>t(!1)),e.listen(r,"localhost",()=>{e.close(()=>t(!0))})})}function d(){return new Promise((r,t)=>{let e=f();e.unref(),e.once("error",t),e.listen(0,"localhost",()=>{let o=e.address();if(o&&typeof o=="object"){let i=o.port;e.close(()=>r(i))}else e.close(()=>t(new Error("Unable to determine assigned port")))})})}async function w(r,t=5,e=1){let o=1;for(;;)try{return await r()}catch(i){if(o++<t)a(n`Unknown problem getting a random port: ${i.message}`),await m(e);else throw new c(i.message)}}export{P as a,g as b};
@@ -1 +0,0 @@
1
- import{c as d}from"./chunk-RFG5RMPL.js";import{xa as i}from"./chunk-B2EHO7ZC.js";import{A as s,D as u,w as a,x as c}from"./chunk-BDVAE5MS.js";import{g as m}from"./chunk-VPRTJUIN.js";m();function f(e){return[`'${e.name}'`,{subdued:`(#${e.id})`}]}function y(e){return{list:{items:e.map(f)}}}async function b(e,r="It doesn't seem like you're running this command in a theme directory.",o,n){if(e)return!0;if(n)return c({headline:o?`Environment: ${o}`:"",body:r}),!1;if(a({body:r}),!process.stdout.isTTY)return!0;let t=await s({message:"Do you want to proceed?"});return i(`theme-service:confirm-directory:${t}`),t}async function g(e,r,o){if(e.role!==d||!process.stdout.isTTY||o)return!0;let n=`You're about to ${r} on your live theme "${e.name}". This will make changes visible to customers. Are you sure you want to proceed?`,t=await s({message:n,confirmationMessage:"Yes, proceed with live theme",cancellationMessage:"No, cancel"});return i(`theme-service:confirm-live-theme:${t}`),t}async function v(e,r,o=!1){e.length>0&&await u(e,{renderOptions:{stdout:r??process.stderr},noProgressBar:o})}export{f as a,y as b,b as c,g as d,v as e};
@@ -1,12 +0,0 @@
1
- import{a as H}from"./chunk-IX5ICOBV.js";import{k as U,t as F}from"./chunk-RFG5RMPL.js";import{M as T,O as _,o as w,va as p,xa as h}from"./chunk-B2EHO7ZC.js";import{a as C}from"./chunk-7BGM2GAH.js";import{P,x,y as A}from"./chunk-BDVAE5MS.js";import{d as m}from"./chunk-JPGO36XP.js";import{Gb as v,Ib as q,Qb as c}from"./chunk-GFEAKSGV.js";import{v as D}from"./chunk-YC6G4MHD.js";import{g as d}from"./chunk-VPRTJUIN.js";d();d();function O(e){let r=new URLSearchParams;for(let[t,o]of Object.entries(e.replaceTemplates??[]))r.append(`replace_templates[${t}]`,o);for(let[t,o]of Object.entries(e.replaceExtensionTemplates??[])){let s=t.split("/")[0];r.append(`replace_extension_templates[${s}][${t}]`,o)}return r.append("_method",e.method),r}function l(){return{"User-Agent":`Shopify CLI; v=${C}`}}function R(e){return delete e.cookie,delete e.authorization,e}d();function S(e){let r={};return e.split(";").forEach(t=>{let o=t.match(/(.*?)=(.*)$/)??[],s=o[1]?.trim(),n=o[2]?.trim()??"";s&&(r[s]=n)}),r}function k(e){return Object.entries(e).map(([r,t])=>`${r}=${t}`).join("; ")}var y=class extends m{};async function ge(e){return F(e)}async function Se(e,r){let t=z(r),o=new URLSearchParams;o.append("form_type","storefront_password"),o.append("utf8","\u2713"),o.append("password",e??""),h("theme-service:storefront-session:check-storefront-password");let s=await w(`${t}/password`,{headers:{"cache-control":"no-cache","content-type":"application/x-www-form-urlencoded"},body:o.toString(),method:"POST",redirect:"manual"});if(s.status===429)throw p(new m(`Too many incorrect password attempts. Please try again after ${s.headers.get("retry-after")} seconds.`));return j(s,t)}async function L(e,r,t,o,s={}){let n={},i=await I(e,t,s),a=z(r);if(n._shopify_essential=i,h(`theme-service:storefront-session:is-password-protected:${!!o}`),!o)return n;let f=await G(i,e,a,o,s);return{...n,...f}}async function I(e,r,t,o=1){let s=new URLSearchParams({preview_theme_id:r,_fd:"0",pb:"0"}),n=`${e}?${s}`;h("theme-service:storefront-session:get-session-essential-cookie");let i=await w(n,{method:"HEAD",redirect:"manual",headers:{...t,...l()}}),a=i.headers.raw()["set-cookie"]??[],f=E(a,"_shopify_essential");if(!f){if(c(`Failed to obtain _shopify_essential cookie.
2
-
3
- -Request ID: ${i.headers.get("x-request-id")??"unknown"}
4
-
5
- -Body: ${await i.text()}
6
-
7
- -Status: ${i.status}
8
- `),o>3)throw p(new y('Your development session could not be created because the "_shopify_essential" could not be defined. Please, check your internet connection.'));return c("Retrying to obtain the _shopify_essential cookie..."),await P(o),I(e,r,t,o+1)}return f}async function G(e,r,t,o,s){let n=new URLSearchParams({password:o}),i=await w(`${r}/password`,{method:"POST",redirect:"manual",body:n,headers:{...s,...l(),Cookie:k({_shopify_essential:e})}});if(!j(i,t))throw p(new m("Your development session could not be created because the store password is invalid. Please, retry with a different password."));let a=i.headers.raw()["set-cookie"]??[],f=E(a,"storefront_digest"),u=E(a,"_shopify_essential"),g={};return f&&(g.storefront_digest=f),u&&(g._shopify_essential=u),g}function j(e,r){let t=e.headers.get("location")??"",o;try{o=new URL(t,r)}catch(n){if(n instanceof TypeError)return!1;throw n}let s=new URL(r).origin;return e.status===302&&o.origin===s}function E(e,r){let t=e.find(s=>S(s)[r]);return t?S(t)[r]:void 0}function z(e){return`https://${e}`}d();d();function K(e,r){p(r),r instanceof m?(r.message=`${e}
9
- ${r.message}`,A(r)):(x({headline:e,body:r.message}),c(`${e}
10
- ${r.stack??r.message}`))}function be(e,r){let t={delete:`Failed to delete file "${e}" from remote theme.`,upload:`Failed to upload file "${e}" to remote theme.`,default:e}[r??"default"]??e;return o=>{K(t,o)}}function $(e,r){return H({status:e.status??502,statusText:e.statusText??"Bad Gateway",cause:e,data:{url:(r??e.url)?.toString(),requestId:e.headers?.get("x-request-id")??void 0}})}function Ce(e,r="Unexpected error during fetch"){let t=e,o=t.statusCode??502,s=t.statusMessage??"Bad Gateway",n=`${r.replace(/\.$/,"")} with status ${o} (${s}).`;t.data?.requestId&&(n+=`
11
- Request ID: ${t.data.requestId}`),t.data?.url&&(n+=`
12
- URL: ${t.data.url}`);let i=t.cause??e;return{headline:n,body:i.stack??t.stack??t.message??s,status:o,statusText:s,cause:i,requestId:t.data?.requestId,url:t.data?.url}}async function Fe(e,r){let t=J(e,r),o=await V(e,r),s,n=Object.keys({...r.replaceTemplates,...r.replaceExtensionTemplates});if(n.length>0){c(`\u2192 Rendering ${t} (with ${n})...`);let u=O(r);s=await fetch(t,{method:"POST",body:u,headers:{...o,...l()}}).catch(g=>{throw $(p(g),t)})}else c(`\u2192 Rendering ${t}...`),s=await fetch(t,{method:r.method,headers:{...o,...l()}}).catch(u=>{throw $(p(u),t)});let i=s.headers.get("x-request-id");c(`\u2190 ${s.status} (request_id: ${i})`);let f=s.headers.get("Content-Type")?.includes("application/json");return s=new Response(s.body,s),f||s.headers.delete("Content-Type"),s}async function V(e,r){return N(e)?Y(e,r):W(e,r)}async function W(e,r){let t=await B(e,r),o=e.storefrontToken;return R({...r.headers,Authorization:`Bearer ${o}`,Cookie:t})}async function Y(e,r){let t=await B(e,r),o=e.storefrontToken,s={},n=["ACCEPT","CONTENT-TYPE","CONTENT-LENGTH"];for(let[i,a]of Object.entries(r.headers))n.includes(i.toUpperCase())&&(s[i]=a);return R({...s,...Q(e),Authorization:`Bearer ${o}`,Cookie:t})}function B(e,r){let t=S(r.headers.cookie??r.headers.Cookie??""),o=e.sessionCookies??{};return k({...t,...o})}function J(e,{path:r,sectionId:t,appBlockId:o,query:s}){let i=`${b(e)}${r}`,a=new URLSearchParams({_fd:"0",pb:"0"});for(let[f,u]of s)a.append(f,u);return t?a.append("section_id",t):o&&a.append("app_block_id",o),`${i}?${a}`}function b(e){return N(e)?`https://${D()}/cli/sfr`:`https://${e.storeFqdn}`}function N(e){return e.token.startsWith("shptka_")}function Q(e){return{"X-Shopify-Shop":e.storeFqdn,"X-Shopify-Access-Token":e.token}}d();var Z=1800*1e3,M=["layout/theme.liquid","config/settings_schema.json"];async function Ge(e,r,t,o){let s=await X(e,r,t,o);return s.refresh=async()=>{c("Refreshing theme session...");let n=await X(e,r,t,o);return h("theme-service:session:refreshed"),Object.assign(s,n),n},setInterval(()=>{s.refresh&&s.refresh().then(()=>c("Refreshed theme session via auto-refresher...")).catch(()=>c("Session could not be refreshed."))},Z),s}async function X(e,r,t,o){let s=b(r),n=await _(r.storeFqdn,t,[],{forceRefresh:!1,noPrompt:!0}),i=await T([],t,{forceRefresh:!1,noPrompt:!0}),a=await ee(s,e,r,i,o);return{...n,sessionCookies:a,storefrontToken:i}}async function ee(e,r,t,o,s){try{return await L(e,t.storeFqdn,r,s,{"X-Shopify-Shop":t.storeFqdn,"X-Shopify-Access-Token":t.token,Authorization:`Bearer ${o}`})}catch(n){throw n instanceof y&&await re(r,t),n}}async function re(e,r){if(c(`Verifying if theme with id ${e} has required files...`),(await U(Number(e),M,r)).length!==M.length)throw p(new m(q`Theme ${v.cyan(e)} is missing required files. Run ${v.cyan(`shopify theme delete -t ${e}`)} to delete it, then try your command again.`.value));c(`Theme with id ${e} has required files.`)}export{l as a,R as b,ge as c,Se as d,K as e,be as f,$ as g,Ce as h,Fe as i,V as j,B as k,b as l,Ge as m,X as n};
@@ -1,5 +0,0 @@
1
- import{da as p,h as a}from"./chunk-SBEZBZM7.js";import{Gb as e,Ib as r}from"./chunk-GFEAKSGV.js";import{g as i}from"./chunk-VPRTJUIN.js";i();async function P(n,t,o){return u(n,t,o,"text")}async function u(n,t,o,s){return await p(t,o.source),s==="json"?r`${e.json({SHOPIFY_API_KEY:t.apiKey,SHOPIFY_API_SECRET:t.apiSecretKeys[0]?.secret,SCOPES:a(n.configuration)})}`:r`
2
- ${e.green("SHOPIFY_API_KEY")}=${t.apiKey}
3
- ${e.green("SHOPIFY_API_SECRET")}=${t.apiSecretKeys[0]?.secret??""}
4
- ${e.green("SCOPES")}=${a(n.configuration)}
5
- `}export{P as a,u as b};
@@ -1,6 +0,0 @@
1
- import{j as W,l as B}from"./chunk-GOJ2QHSR.js";import{O as v,a as O}from"./chunk-BDVAE5MS.js";import{f as h}from"./chunk-IASVAERO.js";import{d as u,g as T}from"./chunk-JPGO36XP.js";import{a as I}from"./chunk-FUOIGXI4.js";import{$a as S,Cb as L,Gb as o,Ib as s,Qb as d,Ta as w,Ua as i,Wa as D,ma as x,ua as b}from"./chunk-GFEAKSGV.js";import{d as c,i as k}from"./chunk-IU2ZQ6TE.js";import{e as R,g}from"./chunk-VPRTJUIN.js";g();g();function M(e,n){try{return JSON.parse(e)}catch(a){let r=a instanceof Error?a.message:String(a),t=n?` from ${n}`:"";throw new u(`Failed to parse JSON${t}.
2
- ${r}`)}}var l=R(I(),1),N="yarn.lock",j="package-lock.json",J="pnpm-lock.yaml",$="bun.lockb",C="bun.lock",V="pnpm-workspace.yaml",ke=[N,J,j,$,C],we={yarn:[N],npm:[j],pnpm:[J],bun:[$,C],homebrew:[],unknown:[]},E=["yarn","npm","pnpm","bun","homebrew","unknown"],_=class extends u{constructor(){super("Unknown package manager")}},y=class extends u{constructor(n){super(s`The directory ${o.path(n)} doesn't have a package.json.`)}},P=class extends T{constructor(n){super(s`Couldn't find a a package.json traversing directories from ${o.path(n)}`)}};function A(e=process.env){return e.npm_config_user_agent?.includes("yarn")?"yarn":e.npm_config_user_agent?.includes("pnpm")?"pnpm":e.npm_config_user_agent?.includes("bun")?"bun":e.npm_config_user_agent?.includes("npm")?"npm":"unknown"}function U(e){return i(c(e,$))||i(c(e,C))}function G(e){switch(e){case"yarn":case"npm":case"pnpm":case"bun":return e;case"homebrew":case"unknown":return"npm"}}function K(e,n,...a){switch(e){case"npm":return{command:"npm",args:["exec","--",n,...a]};case"pnpm":return{command:"pnpm",args:["exec",n,...a]};case"yarn":return{command:"yarn",args:["run",n,...a]};case"bun":return{command:"bun",args:["x",n,...a]}}}async function F(e){let n=e;for(d(s`Looking for a lockfile in ${o.path(n)}...`);;){if(i(c(n,N)))return"yarn";if(i(c(n,J))||i(c(n,V)))return"pnpm";if(U(n))return"bun";if(i(c(n,j)))return"npm";let r=k(n);if(r===n)break;n=r}let a=A();return a!=="unknown"?a:"npm"}async function he(e,n,...a){let r=G(await F(e));return K(r,n,...a)}async function ye(e){let n=await D(c(e.directory,"**/package.json"),{ignore:[c(e.directory,"node_modules/**/package.json")],cwd:e.directory,onlyFiles:!0,deep:e.deep}),a=new O;try{await Promise.all(n.map(async r=>{let t=k(r);await z({directory:t,packageManager:e.packageManager,stdout:void 0,stderr:void 0,signal:a.signal,args:[]})}))}catch(r){throw a.abort(),r}}async function z(e){let n={cwd:e.directory,stdin:void 0,stdout:e.stdout,stderr:e.stderr,signal:e.signal},a=["install"];e.args&&(a=a.concat(e.args)),await h("cmd_all_timing_network_ms")(async()=>{await v(e.packageManager,a,n)})}async function xe(e){return(await f(e)).name}async function be(e){return(await f(e)).version}async function H(e){let n=await f(e),a=n.dependencies??{},r=n.devDependencies??{};return{...a,...r}}async function ve(e){let n=c(e,"package.json"),a=await f(n),r=c(e,V);return!!a.workspaces||w(r)}async function Me(e,n,{cacheExpiryInHours:a=0}={}){let r=async()=>(d(s`Checking if there's a version of ${e} newer than ${n}`),ne(e)),t=`npm-package-${e}`,p;try{p=await W(t,r,a*3600*1e3)}catch{return}if(p&&new l.SemVer(n).compare(p)<0)return p}function _e(e,n){let a=`npm-package-${e}`,r=B(a)?.value;if(r&&new l.SemVer(n).compare(r)<0)return r}function Pe(e,n){return(0,l.satisfies)(e,n)}async function f(e){if(!await w(e))throw new y(k(e));return M(await x(e),e)}async function Y(e,n){d(s`Adding the following dependencies if needed:
3
- ${o.json(e)}
4
- With options:
5
- ${o.json(n)}
6
- `);let a=c(n.directory,"package.json");if(!await w(a))throw new y(n.directory);let r=Object.keys(await H(a)),t=e.filter(p=>!r.includes(p.name));t.length!==0&&await q(t,n)}async function q(e,n){let a=e.map(r=>r.version?`${r.name}@${r.version}`:r.name);switch(n.stdout?.write(`Installing ${a.join(" ")} with ${n.packageManager}`),n.packageManager){case"npm":for(let r of a)await m(n,Q(r,n.type));break;case"yarn":await m(n,X(a,n.type,!!n.addToRootDirectory));break;case"pnpm":await m(n,Z(a,n.type,!!n.addToRootDirectory));break;case"bun":await m(n,ee(a,n.type)),await m(n,["install"]);break;case"homebrew":throw new u("Homebrew can't be used to install project dependencies. Use npm, yarn, pnpm, or bun.");case"unknown":throw new _}}async function m(e,n){return h("cmd_all_timing_network_ms")(async()=>v(e.packageManager,n,{cwd:e.directory,stdout:e.stdout,stderr:e.stderr,signal:e.signal}))}async function Ne(e,n){await Y(e.map(a=>({name:a,version:void 0})),n)}function Q(e,n){let a=["install"];switch(a=a.concat(e),n){case"dev":a.push("--save-dev");break;case"peer":a.push("--save-peer");break;case"prod":a.push("--save-prod");break}return e.match(/@\d/g)&&a.push("--save-exact"),a}function X(e,n,a=!1){let r=["add"];switch(a&&r.push("-W"),r=r.concat(e),n){case"dev":r.push("--dev");break;case"peer":r.push("--peer");break;case"prod":r.push("--prod");break}return r}function Z(e,n,a=!1){let r=["add"];switch(a&&r.push("-w"),r=r.concat(e),n){case"dev":r.push("--save-dev");break;case"peer":r.push("--save-peer");break;case"prod":r.push("--save-prod");break}return r}function ee(e,n){let a=["add"];switch(a=a.concat(e),n){case"dev":a.push("--development");break;case"peer":a.push("--optional");break;case"prod":break}return a}async function je(e){let n=await S("package.json",{cwd:e,type:"file"});if(n){let a=M(await x(n),n);return{path:n,content:a}}else throw new P(e)}async function Je(e,n){let a=await F(e),r=c(e,"package.json"),t=await f(r);a==="yarn"&&(t.resolutions=t.resolutions?{...t.resolutions,...n}:n),(a==="npm"||a==="pnpm"||a==="bun")&&(t.overrides=t.overrides?{...t.overrides,...n}:n),await b(r,JSON.stringify(t,null,2))}async function ne(e){return d(s`Getting the latest version of NPM package: ${o.raw(e)}`),h("cmd_all_timing_network_ms")(async()=>{let{default:n}=await import("./latest-version-EFWBOTWM.js");return n(e)})}async function $e(e,n){d(s`JSON-encoding and writing content to package.json at ${o.path(e)}...`);let a=c(e,"package.json");await b(a,JSON.stringify(n,null,2))}function Ce(e,n=process.env){if(e&&E.includes(e))return e;let a=A(n);if(a!=="unknown")return a;let r=L();return r!=="unknown"?r:"npm"}export{N as a,j as b,J as c,$ as d,V as e,ke as f,we as g,E as h,_ as i,y as j,P as k,A as l,F as m,he as n,ye as o,z as p,xe as q,be as r,H as s,ve as t,Me as u,_e as v,Pe as w,f as x,Y as y,q as z,Ne as A,je as B,Je as C,$e as D,Ce as E};