shopify 4.2.0 → 4.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{acorn-QBS5IYTX.js → acorn-7M27BPGP.js} +1 -1
- package/dist/analytics-DWUYMFHO.js +1 -0
- package/dist/analytics-SOXP4UBD.js +1 -0
- package/dist/{angular-UTTM4Y4S.js → angular-DW5TQVCM.js} +1 -1
- package/dist/assets/hydrogen/routes/locale-check.ts +3 -3
- package/dist/assets/hydrogen/starter/CHANGELOG.md +106 -0
- package/dist/assets/hydrogen/starter/app/components/Aside.tsx +4 -2
- package/dist/assets/hydrogen/starter/app/components/CartMain.tsx +8 -5
- package/dist/assets/hydrogen/starter/app/components/CartSummary.tsx +117 -23
- package/dist/assets/hydrogen/starter/app/components/Header.tsx +3 -3
- package/dist/assets/hydrogen/starter/app/components/PaginatedResourceSection.tsx +24 -4
- package/dist/assets/hydrogen/starter/app/components/ProductPrice.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/lib/context.ts +5 -0
- package/dist/assets/hydrogen/starter/app/routes/[robots.txt].tsx +14 -53
- package/dist/assets/hydrogen/starter/app/routes/_index.tsx +11 -4
- package/dist/assets/hydrogen/starter/app/routes/account.$.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/routes/account.addresses.tsx +2 -2
- package/dist/assets/hydrogen/starter/app/routes/account.profile.tsx +1 -1
- package/dist/assets/hydrogen/starter/package.json +9 -10
- package/dist/assets/hydrogen/starter/storefrontapi.generated.d.ts +0 -11
- package/dist/assets/hydrogen/starter/vite.config.ts +10 -4
- package/dist/assets/hydrogen/vite/package.json +1 -2
- package/dist/assets/hydrogen/vite/vite.config.js +4 -3
- package/dist/{babel-JS32NLHY.js → babel-I2RLWM7N.js} +1 -1
- package/dist/bootstrap.js +1 -1
- package/dist/{chokidar-G4ONJSK4.js → chokidar-VDIVGBZH.js} +1 -1
- package/dist/chunk-2EROVVCL.js +1 -0
- package/dist/{chunk-DCBYHVKW.js → chunk-2MMGFZDP.js} +1 -1
- package/dist/{chunk-X2TC7S57.js → chunk-2NWWMNU5.js} +8 -8
- package/dist/{chunk-PRVQAHWI.js → chunk-2O22LZKV.js} +1 -1
- package/dist/{chunk-MFLBTJO7.js → chunk-3CYHS4W2.js} +1 -1
- package/dist/{chunk-2EJCY4CE.js → chunk-3FBSBMSQ.js} +1 -1
- package/dist/chunk-3OZ6ZZ4T.js +5 -0
- package/dist/{chunk-VICNWPLQ.js → chunk-442S5SDM.js} +12 -12
- package/dist/{chunk-MKE434RB.js → chunk-45MEVWH5.js} +1 -1
- package/dist/{chunk-A5SQCM63.js → chunk-47MGPVED.js} +1 -1
- package/dist/chunk-4N6YTHFD.js +1 -0
- package/dist/chunk-4TST2MNC.js +1 -0
- package/dist/{chunk-JUVAGMIH.js → chunk-5C7HDTHJ.js} +1 -1
- package/dist/{chunk-GVITHCQJ.js → chunk-5GVXMNC4.js} +1 -1
- package/dist/{chunk-YGMVL6NZ.js → chunk-5JNEWYD5.js} +2 -2
- package/dist/{chunk-KU5OPV7U.js → chunk-5QQN3SKH.js} +1 -1
- package/dist/{chunk-OKNBZSGN.js → chunk-5QWYIBE6.js} +1 -1
- package/dist/chunk-5W443CKL.js +836 -0
- package/dist/{chunk-PD5ZHJWI.js → chunk-636CTEW7.js} +1 -1
- package/dist/{chunk-L2VSSINY.js → chunk-67KMRBSZ.js} +1 -1
- package/dist/{chunk-HJSYHK4S.js → chunk-6DIHOMCB.js} +1 -1
- package/dist/{chunk-MGL4YM3S.js → chunk-6EZ7JWBK.js} +5 -5
- package/dist/{chunk-NBYS6YQ2.js → chunk-6RL7FUPD.js} +1 -1
- package/dist/chunk-6YPEONHB.js +46 -0
- package/dist/{chunk-C6ABJCRG.js → chunk-733R5OKQ.js} +1 -1
- package/dist/chunk-73W5BGAZ.js +1 -0
- package/dist/{chunk-XDAOLCPN.js → chunk-75LJTY7F.js} +1 -1
- package/dist/{chunk-IU2ZQ6TE.js → chunk-773TIA5M.js} +1 -1
- package/dist/{chunk-TQGTEVSR.js → chunk-7EJ4UVYI.js} +1 -1
- package/dist/{chunk-FQDRVPCY.js → chunk-7LATYPLU.js} +1 -1
- package/dist/{chunk-XXE7667M.js → chunk-7SVMAJTR.js} +1 -1
- package/dist/{chunk-QUTQDXSL.js → chunk-7UNQOKZW.js} +1 -1
- package/dist/{chunk-CE6FKJFS.js → chunk-7UOPCYMV.js} +1 -1
- package/dist/{chunk-7JESXDF2.js → chunk-A4SBXDZB.js} +1 -1
- package/dist/{chunk-Z35BTAM6.js → chunk-AAK376RT.js} +1 -1
- package/dist/chunk-APN3VWN4.js +3 -0
- package/dist/{chunk-7DVOSOEP.js → chunk-AT2GDXN7.js} +1 -1
- package/dist/chunk-ATXODH6C.js +283 -0
- package/dist/chunk-AY4GIVME.js +4 -0
- package/dist/{chunk-PS25FEBF.js → chunk-B7BUEEBR.js} +1 -1
- package/dist/{chunk-6YHJ554P.js → chunk-B7S23DLF.js} +1 -1
- package/dist/chunk-BCD4KTLJ.js +1 -0
- package/dist/{chunk-C3LZPAAH.js → chunk-BIMOHK2P.js} +1 -1
- package/dist/chunk-C3CVLSLS.js +6 -0
- package/dist/{chunk-57N2DFIF.js → chunk-CD5O2BIT.js} +1 -1
- package/dist/chunk-CPE7XCC6.js +593 -0
- package/dist/{chunk-PIBY5DDZ.js → chunk-CRALWNNO.js} +1 -1
- package/dist/{chunk-H4W4DFKK.js → chunk-CX5CC6P5.js} +1 -1
- package/dist/{chunk-2KH2S7PI.js → chunk-CZXGQ53M.js} +1 -1
- package/dist/chunk-D6YDSGR4.js +3 -0
- package/dist/{chunk-J6VTZEE2.js → chunk-DHBYYHBT.js} +1 -1
- package/dist/chunk-DLNBTHKL.js +5 -0
- package/dist/chunk-DO2SHYFU.js +1 -0
- package/dist/{chunk-VPL2NDH6.js → chunk-DONEJHDG.js} +35 -35
- package/dist/{chunk-5TIJLYZU.js → chunk-DQ4HA72R.js} +1 -1
- package/dist/{chunk-NO5KVFTV.js → chunk-DZLA2RJP.js} +3 -3
- package/dist/{chunk-YS6VOQ7I.js → chunk-EJDWYASP.js} +1 -1
- package/dist/{chunk-N3YWHJMB.js → chunk-EKHWL542.js} +46 -46
- package/dist/{chunk-6M3ZYNGO.js → chunk-ET2CGROE.js} +1 -1
- package/dist/{chunk-QSTEVZFQ.js → chunk-F3TMLDLC.js} +1 -1
- package/dist/{chunk-M4LOKANA.js → chunk-F5QG42MA.js} +1 -1
- package/dist/{chunk-FTN7Y6HD.js → chunk-FA4K3JRN.js} +1 -1
- package/dist/{chunk-WDC3KIZT.js → chunk-FKIVKNOV.js} +1 -1
- package/dist/{chunk-4EXYYBQ6.js → chunk-FPLUMESQ.js} +1 -1
- package/dist/chunk-FU232KQ7.js +1 -0
- package/dist/{chunk-HLMFVORT.js → chunk-FZKKKGUJ.js} +1 -1
- package/dist/chunk-G24L7MB3.js +1 -0
- package/dist/{chunk-LQMSF3F7.js → chunk-G2I2ZUBV.js} +1 -1
- package/dist/{chunk-FFYYJKF7.js → chunk-G2S346IS.js} +1 -1
- package/dist/{chunk-KLMDWDT2.js → chunk-GB3YC4TI.js} +1 -1
- package/dist/{chunk-VA5IUGZV.js → chunk-GBZL4TTY.js} +1 -1
- package/dist/{chunk-OCOY5MV2.js → chunk-GCN4O7HM.js} +1 -1
- package/dist/{chunk-2N4O33VM.js → chunk-GDHD3TGC.js} +1 -1
- package/dist/{chunk-TLSAQ6FG.js → chunk-GFCLUGAG.js} +1 -1
- package/dist/{chunk-C2FFA4O4.js → chunk-GKRCTMWY.js} +1 -1
- package/dist/{chunk-TGACBJIY.js → chunk-GTUKM3ZW.js} +1 -1
- package/dist/{chunk-RGNAWKD7.js → chunk-GUO7S4NW.js} +1 -1
- package/dist/{chunk-WUK5NQSX.js → chunk-GW3VY3FZ.js} +2 -2
- package/dist/{chunk-4KRT35A2.js → chunk-H5C3QTOO.js} +1 -1
- package/dist/{chunk-LKS47US7.js → chunk-H6WN7GP4.js} +1 -1
- package/dist/{chunk-2WNODIWJ.js → chunk-HA6NISOZ.js} +1 -1
- package/dist/{chunk-FBVBO5YQ.js → chunk-HCN6HXA5.js} +1 -1
- package/dist/chunk-HM5H7WBE.js +1 -0
- package/dist/chunk-HZMP62GK.js +21 -0
- package/dist/{chunk-QLQGHMVU.js → chunk-HZSAUZBX.js} +1 -1
- package/dist/chunk-HZYRCG4R.js +9 -0
- package/dist/{chunk-EENHXSWU.js → chunk-I5A6BPCP.js} +1 -1
- package/dist/chunk-I73E3BD5.js +1 -0
- package/dist/{chunk-UURFVUAH.js → chunk-IG6LPVS4.js} +1 -1
- package/dist/{chunk-BECEP46I.js → chunk-IIOIDMG3.js} +1 -1
- package/dist/{chunk-D656BV5Z.js → chunk-IPQH2RHD.js} +1 -1
- package/dist/{chunk-TNQXTZAX.js → chunk-IWOTLFOY.js} +1 -1
- package/dist/chunk-IX4KP6E3.js +2 -0
- package/dist/{chunk-AP3RFOPL.js → chunk-J2WCMQZZ.js} +1 -1
- package/dist/chunk-J3HXFQ2L.js +1 -0
- package/dist/{chunk-OYP7DKPU.js → chunk-J3JPJCWP.js} +1 -1
- package/dist/chunk-J5TNYNR5.js +1 -0
- package/dist/{chunk-UBKVCI7A.js → chunk-J7UQBC45.js} +1 -1
- package/dist/{chunk-M2TJICTB.js → chunk-JAW32T6G.js} +1 -1
- package/dist/{chunk-LCCMXY6N.js → chunk-JOZXRV5K.js} +1 -1
- package/dist/{chunk-UARVYVLN.js → chunk-KKUDXLK2.js} +2 -2
- package/dist/{chunk-LITB5QQX.js → chunk-KN3FTJDU.js} +1 -1
- package/dist/{chunk-3VZEETAV.js → chunk-KRZABRYT.js} +1 -1
- package/dist/{chunk-DNLOSMHL.js → chunk-KSZ5K6LJ.js} +1 -1
- package/dist/chunk-LCPD2BYX.js +1 -0
- package/dist/chunk-LKZ7ARYS.js +18 -0
- package/dist/{chunk-3V63X7WZ.js → chunk-LOHUNOQ7.js} +1 -1
- package/dist/{chunk-IXUVSFW2.js → chunk-LOQIRLTD.js} +1 -1
- package/dist/{chunk-CW7WJZKR.js → chunk-MFLQRQQT.js} +1 -1
- package/dist/{chunk-PRKBO42R.js → chunk-MPW2YJWU.js} +1 -1
- package/dist/chunk-MQICT2LR.js +1 -0
- package/dist/{chunk-VYXVYOIJ.js → chunk-MZMYBFZQ.js} +1 -1
- package/dist/{chunk-ZZYFG22L.js → chunk-NADNFSKS.js} +1 -1
- package/dist/{chunk-5Y7GIF2W.js → chunk-NJOO5XJV.js} +1 -1
- package/dist/{chunk-ULQG3XQS.js → chunk-NNOSZ447.js} +1 -1
- package/dist/{chunk-WNGV4JQS.js → chunk-NWDP5IZ2.js} +1 -1
- package/dist/{chunk-R6JNXEB3.js → chunk-NY5OGHM5.js} +1 -1
- package/dist/chunk-O6KTFMCD.js +1 -0
- package/dist/{chunk-3BRUCKZ2.js → chunk-OAI7VSLW.js} +1 -1
- package/dist/{chunk-RAH5NW3R.js → chunk-OORCODNK.js} +1 -1
- package/dist/chunk-OQORDQLH.js +1 -0
- package/dist/{chunk-75VPUOC5.js → chunk-P2OI2P2M.js} +1 -1
- package/dist/{chunk-6AJZKIZ3.js → chunk-PETINPMX.js} +1 -1
- package/dist/{chunk-MZJRNFAU.js → chunk-PJYNAUQB.js} +1 -1
- package/dist/{chunk-HD5TYIDZ.js → chunk-PMXCJIBP.js} +1 -1
- package/dist/{chunk-K77WAKOB.js → chunk-POAICASX.js} +1 -1
- package/dist/chunk-PUAMSBXS.js +1 -0
- package/dist/{chunk-DERA4K6A.js → chunk-PZYP3MCL.js} +1 -1
- package/dist/chunk-Q7BOSHWX.js +7 -0
- package/dist/{chunk-K7K6GNF6.js → chunk-QJ7TI6CK.js} +1 -1
- package/dist/{chunk-M4V2OQAX.js → chunk-QMXKGSFH.js} +1 -1
- package/dist/chunk-QPN2M26G.js +1 -0
- package/dist/{chunk-UCLSPAVX.js → chunk-QS3FMN67.js} +1 -1
- package/dist/chunk-RF6NUGCU.js +1 -0
- package/dist/{chunk-5CH3B62S.js → chunk-RJ5VF3QY.js} +1 -1
- package/dist/{chunk-XX343DDG.js → chunk-RYGZCBO4.js} +1 -1
- package/dist/{chunk-U3ZG675O.js → chunk-SKLUHLS2.js} +1 -1
- package/dist/{chunk-F6T3UBBL.js → chunk-SP2WUATO.js} +1 -1
- package/dist/{chunk-QFWIDATO.js → chunk-STJ3LWFL.js} +1 -1
- package/dist/chunk-SWI3LCPE.js +7 -0
- package/dist/{chunk-6HZTMQD6.js → chunk-SXTDVUT3.js} +1 -1
- package/dist/{chunk-IWCPQD7X.js → chunk-T5GSCWN5.js} +1 -1
- package/dist/{chunk-3YWUSKWF.js → chunk-T6CC5WUU.js} +1 -1
- package/dist/{chunk-3TNEIDOD.js → chunk-T7KHS6RF.js} +1 -1
- package/dist/{chunk-E2YBU6D3.js → chunk-TC3JOEMA.js} +2 -2
- package/dist/{chunk-A6X2IVGT.js → chunk-TJGUNVRI.js} +1 -1
- package/dist/{chunk-6ZIOYXEF.js → chunk-TKG42KLM.js} +1 -1
- package/dist/{chunk-QYR5VPQA.js → chunk-TOLPNBZK.js} +1 -1
- package/dist/{chunk-6TORWTD7.js → chunk-TQUSREKP.js} +1 -1
- package/dist/chunk-TU47HMTL.js +1 -0
- package/dist/chunk-TYMYIUIQ.js +1 -0
- package/dist/{chunk-XP6IRAZN.js → chunk-U73TPLFE.js} +1 -1
- package/dist/{chunk-VEDZUOVI.js → chunk-UKK5P74A.js} +3 -3
- package/dist/chunk-UMT7DWR4.js +1 -0
- package/dist/{chunk-FD5S2O6M.js → chunk-UOHNRH6E.js} +1 -1
- package/dist/{chunk-ZR76GGZ6.js → chunk-UQWFDL3F.js} +1 -1
- package/dist/chunk-UUC5YKAS.js +2 -0
- package/dist/chunk-UYK6CXAU.js +1 -0
- package/dist/{chunk-7KJ5TBWG.js → chunk-V3RZ3DTW.js} +1 -1
- package/dist/{chunk-6TEXPRI2.js → chunk-V6ZSIUO3.js} +1 -1
- package/dist/{chunk-A3VYI4LO.js → chunk-VDN6MEYI.js} +3 -3
- package/dist/chunk-VE35YELD.js +1 -0
- package/dist/{chunk-6LK6ZP3Q.js → chunk-VFWWZMOQ.js} +1 -1
- package/dist/{chunk-VBUZWRUL.js → chunk-VJEKDBGZ.js} +1 -1
- package/dist/chunk-VKWPEFWQ.js +1 -0
- package/dist/{chunk-7BFDUVOG.js → chunk-VOJWKGCW.js} +1 -1
- package/dist/{chunk-LTWXTDDR.js → chunk-VQW35HIQ.js} +1 -1
- package/dist/chunk-VUMUCNI7.js +1 -0
- package/dist/{chunk-2VLMN5QZ.js → chunk-WAGAC3YI.js} +1 -1
- package/dist/chunk-WKBVT5WG.js +1 -0
- package/dist/chunk-WLO5H255.js +3 -0
- package/dist/chunk-WNWQSHEC.js +10 -0
- package/dist/{chunk-6YAXFS6V.js → chunk-WRRUFK4Y.js} +1 -1
- package/dist/{chunk-SSM346XI.js → chunk-WVHB2HCQ.js} +1 -1
- package/dist/{chunk-MOA33ZFO.js → chunk-WW7TENNA.js} +1 -1
- package/dist/chunk-WZVQHMGI.js +1 -0
- package/dist/{chunk-NPM3MFB3.js → chunk-X4DIJTIK.js} +1 -1
- package/dist/{chunk-42RMKTCJ.js → chunk-XH6ZP7M5.js} +1 -1
- package/dist/{chunk-23AMFHXC.js → chunk-XV3I45NA.js} +1 -1
- package/dist/{chunk-PSQFZAF3.js → chunk-XWPPBOGF.js} +1 -1
- package/dist/{chunk-MIO2CV3Q.js → chunk-Y3WIZSRU.js} +1 -1
- package/dist/{chunk-INFBVFMU.js → chunk-Y66GQ6V2.js} +1 -1
- package/dist/{chunk-IVGWFPMA.js → chunk-YGKQCEVG.js} +1 -1
- package/dist/{chunk-4Z2WYNTE.js → chunk-YLGSM42I.js} +1 -1
- package/dist/{chunk-TXUTT6UA.js → chunk-YQH2JHFA.js} +1 -1
- package/dist/{chunk-QTGMS62F.js → chunk-YYL356OX.js} +1 -1
- package/dist/chunk-Z4LC3WE5.js +7 -0
- package/dist/{chunk-OA4P6AKS.js → chunk-Z74QYLNC.js} +1 -1
- package/dist/{chunk-DCK2FX6J.js → chunk-ZAMDXIVC.js} +1 -1
- package/dist/{chunk-4LNCYIS3.js → chunk-ZDF5N422.js} +1 -1
- package/dist/{chunk-RL5BWZ7D.js → chunk-ZEENHLSC.js} +2 -2
- package/dist/{chunk-T4M5CWAO.js → chunk-ZG7BVVT2.js} +1 -1
- package/dist/{chunk-NKQBEFPS.js → chunk-ZI7LK3LW.js} +1 -1
- package/dist/{chunk-UOQQNAHX.js → chunk-ZIREP3EZ.js} +1 -1
- package/dist/chunk-ZIXWWU2N.js +275 -0
- package/dist/{chunk-NXL6LDJU.js → chunk-ZQ5JVD5X.js} +1 -1
- package/dist/{chunk-FGVC22EY.js → chunk-ZULTG2D2.js} +1 -1
- package/dist/{chunk-F47MFBKM.js → chunk-ZZFZBFVM.js} +1 -1
- package/dist/cli/commands/app/app-logs/sources.js +1 -1
- package/dist/cli/commands/app/build.js +1 -1
- package/dist/cli/commands/app/bulk/cancel.js +1 -1
- package/dist/cli/commands/app/bulk/execute.js +1 -1
- package/dist/cli/commands/app/bulk/status.js +1 -1
- package/dist/cli/commands/app/config/link.js +1 -1
- package/dist/cli/commands/app/config/pull.js +1 -1
- package/dist/cli/commands/app/config/use.js +1 -1
- package/dist/cli/commands/app/config/validate.js +1 -1
- package/dist/cli/commands/app/demo/watcher.js +1 -1
- package/dist/cli/commands/app/deploy.js +1 -1
- package/dist/cli/commands/app/dev/clean.js +1 -1
- package/dist/cli/commands/app/dev.js +1 -1
- package/dist/cli/commands/app/env/pull.js +1 -1
- package/dist/cli/commands/app/env/show.js +1 -1
- package/dist/cli/commands/app/execute.js +1 -1
- package/dist/cli/commands/app/function/build.js +1 -1
- package/dist/cli/commands/app/function/info.js +1 -1
- package/dist/cli/commands/app/function/replay.js +1 -1
- package/dist/cli/commands/app/function/run.js +1 -1
- package/dist/cli/commands/app/function/schema.js +1 -1
- package/dist/cli/commands/app/function/typegen.js +1 -1
- package/dist/cli/commands/app/generate/extension.js +1 -1
- package/dist/cli/commands/app/graphiql.js +1 -0
- package/dist/cli/commands/app/import-custom-data-definitions.js +1 -1
- package/dist/cli/commands/app/import-extensions.js +1 -1
- package/dist/cli/commands/app/info.js +1 -1
- package/dist/cli/commands/app/init.js +1 -1
- package/dist/cli/commands/app/logs.js +1 -1
- package/dist/cli/commands/app/release.js +1 -1
- package/dist/cli/commands/app/versions/list.js +1 -1
- package/dist/cli/commands/app/webhook/trigger.js +1 -1
- package/dist/cli/commands/auth/login.js +1 -1
- package/dist/cli/commands/auth/logout.js +1 -1
- package/dist/cli/commands/cache/clear.js +1 -1
- package/dist/cli/commands/config/autoupgrade/constants.js +1 -1
- package/dist/cli/commands/config/autoupgrade/off.js +1 -1
- package/dist/cli/commands/config/autoupgrade/on.js +1 -1
- package/dist/cli/commands/config/autoupgrade/status.js +1 -1
- package/dist/cli/commands/debug/command-flags.js +1 -1
- package/dist/cli/commands/doc/fetch.d.ts +12 -0
- package/dist/cli/commands/doc/fetch.js +1 -0
- package/dist/cli/commands/doc/search.d.ts +13 -0
- package/dist/cli/commands/doc/search.js +1 -0
- package/dist/cli/commands/docs/generate.js +1 -1
- package/dist/cli/commands/doctor-release/doctor-release.js +1 -1
- package/dist/cli/commands/doctor-release/theme/index.js +1 -1
- package/dist/cli/commands/help.js +1 -1
- package/dist/cli/commands/kitchen-sink/async.js +1 -1
- package/dist/cli/commands/kitchen-sink/index.js +1 -1
- package/dist/cli/commands/kitchen-sink/prompts.js +1 -1
- package/dist/cli/commands/kitchen-sink/static.js +1 -1
- package/dist/cli/commands/notifications/generate.js +1 -1
- package/dist/cli/commands/notifications/list.js +1 -1
- package/dist/cli/commands/organization/list.js +1 -1
- package/dist/cli/commands/search.d.ts +4 -0
- package/dist/cli/commands/search.js +1 -1
- package/dist/cli/commands/theme/check.js +1 -1
- package/dist/cli/commands/theme/console.js +1 -1
- package/dist/cli/commands/theme/delete.js +1 -1
- package/dist/cli/commands/theme/dev.js +1 -1
- package/dist/cli/commands/theme/duplicate.js +1 -1
- package/dist/cli/commands/theme/info.js +1 -1
- package/dist/cli/commands/theme/init.js +1 -1
- package/dist/cli/commands/theme/language-server.js +1 -1
- package/dist/cli/commands/theme/list.js +1 -1
- package/dist/cli/commands/theme/metafields/pull.js +1 -1
- package/dist/cli/commands/theme/open.js +1 -1
- package/dist/cli/commands/theme/package.js +1 -1
- package/dist/cli/commands/theme/preview.js +1 -1
- package/dist/cli/commands/theme/profile.js +1 -1
- package/dist/cli/commands/theme/publish.js +1 -1
- package/dist/cli/commands/theme/pull.js +1 -1
- package/dist/cli/commands/theme/push.js +1 -1
- package/dist/cli/commands/theme/rename.js +1 -1
- package/dist/cli/commands/theme/share.js +1 -1
- package/dist/cli/commands/upgrade.js +1 -1
- package/dist/cli/commands/version.js +1 -1
- package/dist/cli/help.d.ts +38 -0
- package/dist/cli/help.js +2 -0
- package/dist/cli/services/commands/doc/fetch.d.ts +1 -0
- package/dist/cli/services/commands/doc/fetch.js +45 -0
- package/dist/cli/services/commands/doc/search.d.ts +1 -0
- package/dist/cli/services/commands/doc/search.js +47 -0
- package/dist/command-registry.js +1 -1
- package/dist/{conf-store-6QNH5BID.js → conf-store-C2LOYIOU.js} +1 -1
- package/dist/{custom-oclif-loader-TSPWW5YF.js → custom-oclif-loader-3AICQCNU.js} +1 -1
- package/dist/deprecations-QOHE6JG6.js +1 -0
- package/dist/{devtools-HCKYP7DQ.js → devtools-37DE4MUR.js} +1 -1
- package/dist/{devtools-VEZNCV6W.js → devtools-WAWU5KQL.js} +1 -1
- package/dist/dist-FF6C4ZHS.js +1 -0
- package/dist/dist-Q676YGVI.js +1 -0
- package/dist/environments-EGD263DV.js +1 -0
- package/dist/error-66U2HJ37.js +1 -0
- package/dist/error-handler-SW2ALZ5Z.js +1 -0
- package/dist/{estree-BYYJYS3A.js → estree-JV5M77BA.js} +1 -1
- package/dist/{flow-M3Q2HPQT.js → flow-N4JYPYMQ.js} +1 -1
- package/dist/{fs-YMUQ6JLE.js → fs-JPQRUGZI.js} +1 -1
- package/dist/{glimmer-3DEJJGOJ.js → glimmer-JEV3BXHR.js} +1 -1
- package/dist/{graphql-A4HHE3MB.js → graphql-DTF6MHYF.js} +1 -1
- package/dist/hooks/app-init.js +1 -1
- package/dist/hooks/did-you-mean.js +1 -1
- package/dist/hooks/hydrogen-init.js +1 -1
- package/dist/hooks/plugin-plugins.js +1 -1
- package/dist/hooks/postrun.js +1 -1
- package/dist/hooks/prerun.js +1 -1
- package/dist/hooks/public-metadata.js +1 -1
- package/dist/hooks/sensitive-metadata.js +1 -1
- package/dist/hooks/tunnel-provider.js +1 -1
- package/dist/hooks/tunnel-start.js +1 -1
- package/dist/{html-HETICZ2F.js → html-LVOJ3RQS.js} +1 -1
- package/dist/{http-proxy-node16-Q5DZMBHC.js → http-proxy-node16-X2WAMUT5.js} +1 -1
- package/dist/index.js +41 -7
- package/dist/is-global-QWTDUPNR.js +1 -0
- package/dist/{is-wsl-TN2CXYI7.js → is-wsl-UEMXYJPN.js} +1 -1
- package/dist/{latest-version-6OAYLOBL.js → latest-version-32HXMWJ7.js} +1 -1
- package/dist/lib-NOROGV6N.js +1 -0
- package/dist/lib-O5EZ4NVT.js +1 -0
- package/dist/lib-QJDPPAWN.js +1 -0
- package/dist/lib-UCG2DNMS.js +1 -0
- package/dist/{local-GPDAXHE6.js → local-FRYN3NWL.js} +1 -1
- package/dist/local-storage-DFH3LT5G.js +1 -0
- package/dist/{markdown-5TVCXM53.js → markdown-J6CE6POI.js} +1 -1
- package/dist/{meriyah-23OZNYWC.js → meriyah-PNQQZQYI.js} +1 -1
- package/dist/metadata-KZVLHQII.js +1 -0
- package/dist/{morph-I35VYPBH.js → morph-CG6HEMCQ.js} +4 -4
- package/dist/{multipart-parser-Q4QJZK3V.js → multipart-parser-5NSSTW27.js} +1 -1
- package/dist/{node-package-manager-GO4ZRTKQ.js → node-package-manager-LVFBY4LY.js} +1 -1
- package/dist/notifications-system-DP443VTE.js +1 -0
- package/dist/{npa-VNALV7XY.js → npa-A4YSCQ5Q.js} +1 -1
- package/dist/{open-VA7TLUIL.js → open-KLSGXBIW.js} +1 -1
- package/dist/out-CDCY25QC.js +1 -0
- package/dist/{output-7IYOMPSA.js → output-NH4I5Y3C.js} +1 -1
- package/dist/{path-CWUNINMX.js → path-MBXP7ZIC.js} +1 -1
- package/dist/{postcss-IIK6CGAW.js → postcss-Q36SHOML.js} +1 -1
- package/dist/{prettier-ZSBNNQTK.js → prettier-6ZMB2MMO.js} +1 -1
- package/dist/{source-map-3K6Y2OMO.js → source-map-E7FCCJL7.js} +1 -1
- package/dist/system-GNOF6HMI.js +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/typescript-5R4Y7PXE.js +1 -0
- package/dist/{typescript-YKZ232QT.js → typescript-WYPDGPSV.js} +1 -1
- package/dist/ui-QOGKADWB.js +1 -0
- package/dist/upgrade-K4S6JW64.js +1 -0
- package/dist/version-FJFTTOZU.js +1 -0
- package/dist/version-ZI4GZX72.js +1 -0
- package/dist/{workerd-ST6XJKUN.js → workerd-U6WWWY73.js} +1 -1
- package/dist/{yaml-SJKIH3VD.js → yaml-6KWCJ64X.js} +1 -1
- package/oclif.manifest.json +964 -74
- package/package.json +19 -9
- package/dist/analytics-CX22YIUZ.js +0 -1
- package/dist/analytics-UBWQIQYF.js +0 -1
- package/dist/assets/hydrogen/starter/app/routes/api.$version.[graphql.json].tsx +0 -14
- package/dist/chunk-2YXKZWYW.js +0 -1
- package/dist/chunk-4V4DQ6W7.js +0 -836
- package/dist/chunk-4ZGSSQC6.js +0 -1
- package/dist/chunk-6SXOUZ7V.js +0 -1
- package/dist/chunk-ATPFTRCC.js +0 -1
- package/dist/chunk-AWQ5AR2K.js +0 -5
- package/dist/chunk-BHWEA4V2.js +0 -1
- package/dist/chunk-BPVZ7E63.js +0 -1
- package/dist/chunk-CCEA5CUX.js +0 -1
- package/dist/chunk-D3DDLLNF.js +0 -2
- package/dist/chunk-FP2NOZSD.js +0 -1
- package/dist/chunk-FSTCEWXX.js +0 -1
- package/dist/chunk-HHXHOQQP.js +0 -3
- package/dist/chunk-HSYRYSX4.js +0 -3
- package/dist/chunk-HZA6IAA4.js +0 -1
- package/dist/chunk-I3LX25MB.js +0 -1
- package/dist/chunk-IOQQUHST.js +0 -18
- package/dist/chunk-IWE4RUI7.js +0 -1
- package/dist/chunk-K3PGC6DC.js +0 -1
- package/dist/chunk-KFCGMT67.js +0 -1
- package/dist/chunk-KLA7AWG6.js +0 -7
- package/dist/chunk-KQU6HOJ3.js +0 -1
- package/dist/chunk-MA52QGHP.js +0 -1
- package/dist/chunk-N5ROZKPZ.js +0 -1
- package/dist/chunk-NEZEHBT2.js +0 -1
- package/dist/chunk-NP4UFPAX.js +0 -9
- package/dist/chunk-OKOYLEA7.js +0 -278
- package/dist/chunk-OLOBQ42K.js +0 -1
- package/dist/chunk-PBTXPBI6.js +0 -18
- package/dist/chunk-PLQFX5ZP.js +0 -9
- package/dist/chunk-PUTZFF2Z.js +0 -613
- package/dist/chunk-RVMB5LC2.js +0 -1
- package/dist/chunk-T5MK7ZSF.js +0 -1
- package/dist/chunk-UOQ75BL3.js +0 -1
- package/dist/chunk-UWJ73J4B.js +0 -1
- package/dist/chunk-VPRTJUIN.js +0 -1
- package/dist/chunk-VT77EFRL.js +0 -10
- package/dist/chunk-WCWNI3ZV.js +0 -283
- package/dist/chunk-X4CV6TRE.js +0 -1
- package/dist/chunk-XEFQQPL4.js +0 -1
- package/dist/chunk-XFKCDWXB.js +0 -5
- package/dist/chunk-YJB7P2HC.js +0 -1
- package/dist/chunk-YOZNRLFC.js +0 -1
- package/dist/deprecations-F6JWVV2W.js +0 -1
- package/dist/dist-4BD6KOLR.js +0 -1
- package/dist/dist-AUABCVPI.js +0 -1
- package/dist/environments-RGLI75HN.js +0 -1
- package/dist/error-OZALZZ3U.js +0 -1
- package/dist/error-handler-V7LSEXHM.js +0 -1
- package/dist/is-global-BLIZ57HQ.js +0 -1
- package/dist/lib-AK5EOIKR.js +0 -1
- package/dist/lib-LVUMLZ4H.js +0 -1
- package/dist/lib-ME6554NA.js +0 -1
- package/dist/lib-WU3FEA6I.js +0 -1
- package/dist/local-storage-P66KJG6I.js +0 -1
- package/dist/metadata-TRH25EHU.js +0 -1
- package/dist/notifications-system-HM6JZ6WJ.js +0 -1
- package/dist/out-WLY6KV4B.js +0 -1
- package/dist/system-X5C4EQQH.js +0 -1
- package/dist/typescript-K5CWIA4V.js +0 -1
- package/dist/ui-H62CMRLG.js +0 -1
- package/dist/upgrade-EEOPH464.js +0 -1
- package/dist/version-76NBQR4K.js +0 -1
- package/dist/version-IGSEISUA.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as g,c as E,e as P,g as d}from"./chunk-VPRTJUIN.js";var k=E((vr,ze)=>{"use strict";d();var je=["nodebuffer","arraybuffer","fragments"],Ve=typeof Blob<"u";Ve&&je.push("blob");ze.exports={BINARY_TYPES:je,CLOSE_TIMEOUT:3e4,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:Ve,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}});var Z=E((wr,ie)=>{"use strict";d();var{EMPTY_BUFFER:Kt}=k(),Se=Buffer[Symbol.species];function Xt(t,e){if(t.length===0)return Kt;if(t.length===1)return t[0];let s=Buffer.allocUnsafe(e),r=0;for(let i=0;i<t.length;i++){let n=t[i];s.set(n,r),r+=n.length}return r<e?new Se(s.buffer,s.byteOffset,r):s}function He(t,e,s,r,i){for(let n=0;n<i;n++)s[r+n]=t[n]^e[n&3]}function Ye(t,e){for(let s=0;s<t.length;s++)t[s]^=e[s&3]}function Zt(t){return t.length===t.buffer.byteLength?t.buffer:t.buffer.slice(t.byteOffset,t.byteOffset+t.length)}function Ee(t){if(Ee.readOnly=!0,Buffer.isBuffer(t))return t;let e;return t instanceof ArrayBuffer?e=new Se(t):ArrayBuffer.isView(t)?e=new Se(t.buffer,t.byteOffset,t.byteLength):(e=Buffer.from(t),Ee.readOnly=!1),e}ie.exports={concat:Xt,mask:He,toArrayBuffer:Zt,toBuffer:Ee,unmask:Ye};if(!process.env.WS_NO_BUFFER_UTIL)try{let t=g("bufferutil");ie.exports.mask=function(e,s,r,i,n){n<48?He(e,s,r,i,n):t.mask(e,s,r,i,n)},ie.exports.unmask=function(e,s){e.length<32?Ye(e,s):t.unmask(e,s)}}catch{}});var Ze=E((Tr,Xe)=>{"use strict";d();var Ke=Symbol("kDone"),ve=Symbol("kRun"),be=class{constructor(e){this[Ke]=()=>{this.pending--,this[ve]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[ve]()}[ve](){if(this.pending!==this.concurrency&&this.jobs.length){let e=this.jobs.shift();this.pending++,e(this[Ke])}}};Xe.exports=be});var $=E((Cr,tt)=>{"use strict";d();var Q=g("zlib"),Qe=Z(),Qt=Ze(),{kStatusCode:Je}=k(),Jt=Buffer[Symbol.species],es=Buffer.from([0,0,255,255]),oe=Symbol("permessage-deflate"),C=Symbol("total-length"),q=Symbol("callback"),B=Symbol("buffers"),G=Symbol("error"),ne,we=class{constructor(e){if(this._options=e||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._maxPayload=this._options.maxPayload|0,this._isServer=!!this._options.isServer,this._deflate=null,this._inflate=null,this.params=null,!ne){let s=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;ne=new Qt(s)}}static get extensionName(){return"permessage-deflate"}offer(){let e={};return this._options.serverNoContextTakeover&&(e.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(e.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?e.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits==null&&(e.client_max_window_bits=!0),e}accept(e){return e=this.normalizeParams(e),this.params=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let e=this._deflate[q];this._deflate.close(),this._deflate=null,e&&e(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(e){let s=this._options,r=e.find(i=>!(s.serverNoContextTakeover===!1&&i.server_no_context_takeover||i.server_max_window_bits&&(s.serverMaxWindowBits===!1||typeof s.serverMaxWindowBits=="number"&&s.serverMaxWindowBits>i.server_max_window_bits)||typeof s.clientMaxWindowBits=="number"&&!i.client_max_window_bits));if(!r)throw new Error("None of the extension offers can be accepted");return s.serverNoContextTakeover&&(r.server_no_context_takeover=!0),s.clientNoContextTakeover&&(r.client_no_context_takeover=!0),typeof s.serverMaxWindowBits=="number"&&(r.server_max_window_bits=s.serverMaxWindowBits),typeof s.clientMaxWindowBits=="number"?r.client_max_window_bits=s.clientMaxWindowBits:(r.client_max_window_bits===!0||s.clientMaxWindowBits===!1)&&delete r.client_max_window_bits,r}acceptAsClient(e){let s=e[0];if(this._options.clientNoContextTakeover===!1&&s.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(!s.client_max_window_bits)typeof this._options.clientMaxWindowBits=="number"&&(s.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits=="number"&&s.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"');return s}normalizeParams(e){return e.forEach(s=>{Object.keys(s).forEach(r=>{let i=s[r];if(i.length>1)throw new Error(`Parameter "${r}" must have only a single value`);if(i=i[0],r==="client_max_window_bits"){if(i!==!0){let n=+i;if(!Number.isInteger(n)||n<8||n>15)throw new TypeError(`Invalid value for parameter "${r}": ${i}`);i=n}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${r}": ${i}`)}else if(r==="server_max_window_bits"){let n=+i;if(!Number.isInteger(n)||n<8||n>15)throw new TypeError(`Invalid value for parameter "${r}": ${i}`);i=n}else if(r==="client_no_context_takeover"||r==="server_no_context_takeover"){if(i!==!0)throw new TypeError(`Invalid value for parameter "${r}": ${i}`)}else throw new Error(`Unknown parameter "${r}"`);s[r]=i})}),e}decompress(e,s,r){ne.add(i=>{this._decompress(e,s,(n,o)=>{i(),r(n,o)})})}compress(e,s,r){ne.add(i=>{this._compress(e,s,(n,o)=>{i(),r(n,o)})})}_decompress(e,s,r){let i=this._isServer?"client":"server";if(!this._inflate){let n=`${i}_max_window_bits`,o=typeof this.params[n]!="number"?Q.Z_DEFAULT_WINDOWBITS:this.params[n];this._inflate=Q.createInflateRaw({...this._options.zlibInflateOptions,windowBits:o}),this._inflate[oe]=this,this._inflate[C]=0,this._inflate[B]=[],this._inflate.on("error",ss),this._inflate.on("data",et)}this._inflate[q]=r,this._inflate.write(e),s&&this._inflate.write(es),this._inflate.flush(()=>{let n=this._inflate[G];if(n){this._inflate.close(),this._inflate=null,r(n);return}let o=Qe.concat(this._inflate[B],this._inflate[C]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[C]=0,this._inflate[B]=[],s&&this.params[`${i}_no_context_takeover`]&&this._inflate.reset()),r(null,o)})}_compress(e,s,r){let i=this._isServer?"server":"client";if(!this._deflate){let n=`${i}_max_window_bits`,o=typeof this.params[n]!="number"?Q.Z_DEFAULT_WINDOWBITS:this.params[n];this._deflate=Q.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:o}),this._deflate[C]=0,this._deflate[B]=[],this._deflate.on("data",ts)}this._deflate[q]=r,this._deflate.write(e),this._deflate.flush(Q.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let n=Qe.concat(this._deflate[B],this._deflate[C]);s&&(n=new Jt(n.buffer,n.byteOffset,n.length-4)),this._deflate[q]=null,this._deflate[C]=0,this._deflate[B]=[],s&&this.params[`${i}_no_context_takeover`]&&this._deflate.reset(),r(null,n)})}};tt.exports=we;function ts(t){this[B].push(t),this[C]+=t.length}function et(t){if(this[C]+=t.length,this[oe]._maxPayload<1||this[C]<=this[oe]._maxPayload){this[B].push(t);return}this[G]=new RangeError("Max payload size exceeded"),this[G].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[G][Je]=1009,this.removeListener("data",et),this.reset()}function ss(t){if(this[oe]._inflate=null,this[G]){this[q](this[G]);return}t[Je]=1007,this[q](t)}});var j=E((Nr,ae)=>{"use strict";d();var{isUtf8:st}=g("buffer"),{hasBlob:rs}=k(),is=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function ns(t){return t>=1e3&&t<=1014&&t!==1004&&t!==1005&&t!==1006||t>=3e3&&t<=4999}function Oe(t){let e=t.length,s=0;for(;s<e;)if((t[s]&128)===0)s++;else if((t[s]&224)===192){if(s+1===e||(t[s+1]&192)!==128||(t[s]&254)===192)return!1;s+=2}else if((t[s]&240)===224){if(s+2>=e||(t[s+1]&192)!==128||(t[s+2]&192)!==128||t[s]===224&&(t[s+1]&224)===128||t[s]===237&&(t[s+1]&224)===160)return!1;s+=3}else if((t[s]&248)===240){if(s+3>=e||(t[s+1]&192)!==128||(t[s+2]&192)!==128||(t[s+3]&192)!==128||t[s]===240&&(t[s+1]&240)===128||t[s]===244&&t[s+1]>143||t[s]>244)return!1;s+=4}else return!1;return!0}function os(t){return rs&&typeof t=="object"&&typeof t.arrayBuffer=="function"&&typeof t.type=="string"&&typeof t.stream=="function"&&(t[Symbol.toStringTag]==="Blob"||t[Symbol.toStringTag]==="File")}ae.exports={isBlob:os,isValidStatusCode:ns,isValidUTF8:Oe,tokenChars:is};if(st)ae.exports.isValidUTF8=function(t){return t.length<24?Oe(t):st(t)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let t=g("utf-8-validate");ae.exports.isValidUTF8=function(e){return e.length<32?Oe(e):t(e)}}catch{}});var Ne=E((Br,lt)=>{"use strict";d();var{Writable:as}=g("stream"),rt=$(),{BINARY_TYPES:fs,EMPTY_BUFFER:it,kStatusCode:ls,kWebSocket:hs}=k(),{concat:Te,toArrayBuffer:cs,unmask:us}=Z(),{isValidStatusCode:ds,isValidUTF8:nt}=j(),fe=Buffer[Symbol.species],b=0,ot=1,at=2,ft=3,ke=4,Ce=5,le=6,Le=class extends as{constructor(e={}){super(),this._allowSynchronousEvents=e.allowSynchronousEvents!==void 0?e.allowSynchronousEvents:!0,this._binaryType=e.binaryType||fs[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxBufferedChunks=e.maxBufferedChunks|0,this._maxFragments=e.maxFragments|0,this._maxPayload=e.maxPayload|0,this._skipUTF8Validation=!!e.skipUTF8Validation,this[hs]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=b}_write(e,s,r){if(this._opcode===8&&this._state==b)return r();if(this._maxBufferedChunks>0&&this._buffers.length>=this._maxBufferedChunks){r(this.createError(RangeError,"Too many buffered chunks",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS"));return}this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(r)}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){let r=this._buffers[0];return this._buffers[0]=new fe(r.buffer,r.byteOffset+e,r.length-e),new fe(r.buffer,r.byteOffset,e)}let s=Buffer.allocUnsafe(e);do{let r=this._buffers[0],i=s.length-e;e>=r.length?s.set(this._buffers.shift(),i):(s.set(new Uint8Array(r.buffer,r.byteOffset,e),i),this._buffers[0]=new fe(r.buffer,r.byteOffset+e,r.length-e)),e-=r.length}while(e>0);return s}startLoop(e){this._loop=!0;do switch(this._state){case b:this.getInfo(e);break;case ot:this.getPayloadLength16(e);break;case at:this.getPayloadLength64(e);break;case ft:this.getMask();break;case ke:this.getData(e);break;case Ce:case le:this._loop=!1;return}while(this._loop);this._errored||e()}getInfo(e){if(this._bufferedBytes<2){this._loop=!1;return}let s=this.consume(2);if((s[0]&48)!==0){let i=this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");e(i);return}let r=(s[0]&64)===64;if(r&&!this._extensions[rt.extensionName]){let i=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(i);return}if(this._fin=(s[0]&128)===128,this._opcode=s[0]&15,this._payloadLength=s[1]&127,this._opcode===0){if(r){let i=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(i);return}if(!this._fragmented){let i=this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");e(i);return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){let i=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(i);return}this._compressed=r}else if(this._opcode>7&&this._opcode<11){if(!this._fin){let i=this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");e(i);return}if(r){let i=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(i);return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){let i=this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");e(i);return}}else{let i=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(i);return}if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(s[1]&128)===128,this._isServer){if(!this._masked){let i=this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK");e(i);return}}else if(this._masked){let i=this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");e(i);return}this._payloadLength===126?this._state=ot:this._payloadLength===127?this._state=at:this.haveLength(e)}getPayloadLength16(e){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(e)}getPayloadLength64(e){if(this._bufferedBytes<8){this._loop=!1;return}let s=this.consume(8),r=s.readUInt32BE(0);if(r>Math.pow(2,21)-1){let i=this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH");e(i);return}this._payloadLength=r*Math.pow(2,32)+s.readUInt32BE(4),this.haveLength(e)}haveLength(e){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){let s=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");e(s);return}this._masked?this._state=ft:this._state=ke}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=ke}getData(e){let s=it;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}s=this.consume(this._payloadLength),this._masked&&(this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3])!==0&&us(s,this._mask)}if(this._opcode>7){this.controlMessage(s,e);return}if(this._compressed){this._state=Ce,this.decompress(s,e);return}if(s.length){if(this._maxFragments>0&&this._fragments.length>=this._maxFragments){let r=this.createError(RangeError,"Too many message fragments",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS");e(r);return}this._messageLength=this._totalPayloadLength,this._fragments.push(s)}this.dataMessage(e)}decompress(e,s){this._extensions[rt.extensionName].decompress(e,this._fin,(i,n)=>{if(i)return s(i);if(n.length){if(this._messageLength+=n.length,this._messageLength>this._maxPayload&&this._maxPayload>0){let o=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");s(o);return}if(this._maxFragments>0&&this._fragments.length>=this._maxFragments){let o=this.createError(RangeError,"Too many message fragments",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS");s(o);return}this._fragments.push(n)}this.dataMessage(s),this._state===b&&this.startLoop(s)})}dataMessage(e){if(!this._fin){this._state=b;return}let s=this._messageLength,r=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let i;this._binaryType==="nodebuffer"?i=Te(r,s):this._binaryType==="arraybuffer"?i=cs(Te(r,s)):this._binaryType==="blob"?i=new Blob(r):i=r,this._allowSynchronousEvents?(this.emit("message",i,!0),this._state=b):(this._state=le,setImmediate(()=>{this.emit("message",i,!0),this._state=b,this.startLoop(e)}))}else{let i=Te(r,s);if(!this._skipUTF8Validation&&!nt(i)){let n=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");e(n);return}this._state===Ce||this._allowSynchronousEvents?(this.emit("message",i,!1),this._state=b):(this._state=le,setImmediate(()=>{this.emit("message",i,!1),this._state=b,this.startLoop(e)}))}}controlMessage(e,s){if(this._opcode===8){if(e.length===0)this._loop=!1,this.emit("conclude",1005,it),this.end();else{let r=e.readUInt16BE(0);if(!ds(r)){let n=this.createError(RangeError,`invalid status code ${r}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");s(n);return}let i=new fe(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!nt(i)){let n=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");s(n);return}this._loop=!1,this.emit("conclude",r,i),this.end()}this._state=b;return}this._allowSynchronousEvents?(this.emit(this._opcode===9?"ping":"pong",e),this._state=b):(this._state=le,setImmediate(()=>{this.emit(this._opcode===9?"ping":"pong",e),this._state=b,this.startLoop(s)}))}createError(e,s,r,i,n){this._loop=!1,this._errored=!0;let o=new e(r?`Invalid WebSocket frame: ${s}`:s);return Error.captureStackTrace(o,this.createError),o.code=n,o[ls]=i,o}};lt.exports=Le});var Re=E((Ir,ut)=>{"use strict";d();var{Duplex:Ur}=g("stream"),{randomFillSync:_s}=g("crypto"),{types:{isUint8Array:ms}}=g("util"),ht=$(),{EMPTY_BUFFER:ps,kWebSocket:gs,NOOP:ys}=k(),{isBlob:V,isValidStatusCode:xs}=j(),{mask:ct,toBuffer:U}=Z(),w=Symbol("kByteLength"),Ss=Buffer.alloc(4),he=8*1024,I,z=he,O=0,Es=1,vs=2,Pe=class t{constructor(e,s,r){this._extensions=s||{},r&&(this._generateMask=r,this._maskBuffer=Buffer.alloc(4)),this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=O,this.onerror=ys,this[gs]=void 0}static frame(e,s){let r,i=!1,n=2,o=!1;s.mask&&(r=s.maskBuffer||Ss,s.generateMask?s.generateMask(r):(z===he&&(I===void 0&&(I=Buffer.alloc(he)),_s(I,0,he),z=0),r[0]=I[z++],r[1]=I[z++],r[2]=I[z++],r[3]=I[z++]),o=(r[0]|r[1]|r[2]|r[3])===0,n=6);let f;typeof e=="string"?(!s.mask||o)&&s[w]!==void 0?f=s[w]:(e=Buffer.from(e),f=e.length):(f=e.length,i=s.mask&&s.readOnly&&!o);let l=f;f>=65536?(n+=8,l=127):f>125&&(n+=2,l=126);let a=Buffer.allocUnsafe(i?f+n:n);return a[0]=s.fin?s.opcode|128:s.opcode,s.rsv1&&(a[0]|=64),a[1]=l,l===126?a.writeUInt16BE(f,2):l===127&&(a[2]=a[3]=0,a.writeUIntBE(f,4,6)),s.mask?(a[1]|=128,a[n-4]=r[0],a[n-3]=r[1],a[n-2]=r[2],a[n-1]=r[3],o?[a,e]:i?(ct(e,r,a,n,f),[a]):(ct(e,r,e,0,f),[a,e])):[a,e]}close(e,s,r,i){let n;if(e===void 0)n=ps;else{if(typeof e!="number"||!xs(e))throw new TypeError("First argument must be a valid error code number");if(s===void 0||!s.length)n=Buffer.allocUnsafe(2),n.writeUInt16BE(e,0);else{let f=Buffer.byteLength(s);if(f>123)throw new RangeError("The message must not be greater than 123 bytes");if(n=Buffer.allocUnsafe(2+f),n.writeUInt16BE(e,0),typeof s=="string")n.write(s,2);else if(ms(s))n.set(s,2);else throw new TypeError("Second argument must be a string or a Uint8Array")}}let o={[w]:n.length,fin:!0,generateMask:this._generateMask,mask:r,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._state!==O?this.enqueue([this.dispatch,n,!1,o,i]):this.sendFrame(t.frame(n,o),i)}ping(e,s,r){let i,n;if(typeof e=="string"?(i=Buffer.byteLength(e),n=!1):V(e)?(i=e.size,n=!1):(e=U(e),i=e.length,n=U.readOnly),i>125)throw new RangeError("The data size must not be greater than 125 bytes");let o={[w]:i,fin:!0,generateMask:this._generateMask,mask:s,maskBuffer:this._maskBuffer,opcode:9,readOnly:n,rsv1:!1};V(e)?this._state!==O?this.enqueue([this.getBlobData,e,!1,o,r]):this.getBlobData(e,!1,o,r):this._state!==O?this.enqueue([this.dispatch,e,!1,o,r]):this.sendFrame(t.frame(e,o),r)}pong(e,s,r){let i,n;if(typeof e=="string"?(i=Buffer.byteLength(e),n=!1):V(e)?(i=e.size,n=!1):(e=U(e),i=e.length,n=U.readOnly),i>125)throw new RangeError("The data size must not be greater than 125 bytes");let o={[w]:i,fin:!0,generateMask:this._generateMask,mask:s,maskBuffer:this._maskBuffer,opcode:10,readOnly:n,rsv1:!1};V(e)?this._state!==O?this.enqueue([this.getBlobData,e,!1,o,r]):this.getBlobData(e,!1,o,r):this._state!==O?this.enqueue([this.dispatch,e,!1,o,r]):this.sendFrame(t.frame(e,o),r)}send(e,s,r){let i=this._extensions[ht.extensionName],n=s.binary?2:1,o=s.compress,f,l;typeof e=="string"?(f=Buffer.byteLength(e),l=!1):V(e)?(f=e.size,l=!1):(e=U(e),f=e.length,l=U.readOnly),this._firstFragment?(this._firstFragment=!1,o&&i&&i.params[i._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(o=f>=i._threshold),this._compress=o):(o=!1,n=0),s.fin&&(this._firstFragment=!0);let a={[w]:f,fin:s.fin,generateMask:this._generateMask,mask:s.mask,maskBuffer:this._maskBuffer,opcode:n,readOnly:l,rsv1:o};V(e)?this._state!==O?this.enqueue([this.getBlobData,e,this._compress,a,r]):this.getBlobData(e,this._compress,a,r):this._state!==O?this.enqueue([this.dispatch,e,this._compress,a,r]):this.dispatch(e,this._compress,a,r)}getBlobData(e,s,r,i){this._bufferedBytes+=r[w],this._state=vs,e.arrayBuffer().then(n=>{if(this._socket.destroyed){let f=new Error("The socket was closed while the blob was being read");process.nextTick(Be,this,f,i);return}this._bufferedBytes-=r[w];let o=U(n);s?this.dispatch(o,s,r,i):(this._state=O,this.sendFrame(t.frame(o,r),i),this.dequeue())}).catch(n=>{process.nextTick(bs,this,n,i)})}dispatch(e,s,r,i){if(!s){this.sendFrame(t.frame(e,r),i);return}let n=this._extensions[ht.extensionName];this._bufferedBytes+=r[w],this._state=Es,n.compress(e,r.fin,(o,f)=>{if(this._socket.destroyed){let l=new Error("The socket was closed while data was being compressed");Be(this,l,i);return}this._bufferedBytes-=r[w],this._state=O,r.readOnly=!1,this.sendFrame(t.frame(f,r),i),this.dequeue()})}dequeue(){for(;this._state===O&&this._queue.length;){let e=this._queue.shift();this._bufferedBytes-=e[3][w],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][w],this._queue.push(e)}sendFrame(e,s){e.length===2?(this._socket.cork(),this._socket.write(e[0]),this._socket.write(e[1],s),this._socket.uncork()):this._socket.write(e[0],s)}};ut.exports=Pe;function Be(t,e,s){typeof s=="function"&&s(e);for(let r=0;r<t._queue.length;r++){let i=t._queue[r],n=i[i.length-1];typeof n=="function"&&n(e)}}function bs(t,e,s){Be(t,e,s),t.onerror(e)}});var Et=E((Mr,St)=>{"use strict";d();var{kForOnEventAttribute:J,kListener:Ue}=k(),dt=Symbol("kCode"),_t=Symbol("kData"),mt=Symbol("kError"),pt=Symbol("kMessage"),gt=Symbol("kReason"),H=Symbol("kTarget"),yt=Symbol("kType"),xt=Symbol("kWasClean"),L=class{constructor(e){this[H]=null,this[yt]=e}get target(){return this[H]}get type(){return this[yt]}};Object.defineProperty(L.prototype,"target",{enumerable:!0});Object.defineProperty(L.prototype,"type",{enumerable:!0});var D=class extends L{constructor(e,s={}){super(e),this[dt]=s.code===void 0?0:s.code,this[gt]=s.reason===void 0?"":s.reason,this[xt]=s.wasClean===void 0?!1:s.wasClean}get code(){return this[dt]}get reason(){return this[gt]}get wasClean(){return this[xt]}};Object.defineProperty(D.prototype,"code",{enumerable:!0});Object.defineProperty(D.prototype,"reason",{enumerable:!0});Object.defineProperty(D.prototype,"wasClean",{enumerable:!0});var Y=class extends L{constructor(e,s={}){super(e),this[mt]=s.error===void 0?null:s.error,this[pt]=s.message===void 0?"":s.message}get error(){return this[mt]}get message(){return this[pt]}};Object.defineProperty(Y.prototype,"error",{enumerable:!0});Object.defineProperty(Y.prototype,"message",{enumerable:!0});var ee=class extends L{constructor(e,s={}){super(e),this[_t]=s.data===void 0?null:s.data}get data(){return this[_t]}};Object.defineProperty(ee.prototype,"data",{enumerable:!0});var ws={addEventListener(t,e,s={}){for(let i of this.listeners(t))if(!s[J]&&i[Ue]===e&&!i[J])return;let r;if(t==="message")r=function(n,o){let f=new ee("message",{data:o?n:n.toString()});f[H]=this,ce(e,this,f)};else if(t==="close")r=function(n,o){let f=new D("close",{code:n,reason:o.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});f[H]=this,ce(e,this,f)};else if(t==="error")r=function(n){let o=new Y("error",{error:n,message:n.message});o[H]=this,ce(e,this,o)};else if(t==="open")r=function(){let n=new L("open");n[H]=this,ce(e,this,n)};else return;r[J]=!!s[J],r[Ue]=e,s.once?this.once(t,r):this.on(t,r)},removeEventListener(t,e){for(let s of this.listeners(t))if(s[Ue]===e&&!s[J]){this.removeListener(t,s);break}}};St.exports={CloseEvent:D,ErrorEvent:Y,Event:L,EventTarget:ws,MessageEvent:ee};function ce(t,e,s){typeof t=="object"&&t.handleEvent?t.handleEvent.call(t,s):t.call(e,s)}});var ue=E((Ar,vt)=>{"use strict";d();var{tokenChars:te}=j();function T(t,e,s){t[e]===void 0?t[e]=[s]:t[e].push(s)}function Os(t){let e=Object.create(null),s=Object.create(null),r=!1,i=!1,n=!1,o,f,l=-1,a=-1,h=-1,c=0;for(;c<t.length;c++)if(a=t.charCodeAt(c),o===void 0)if(h===-1&&te[a]===1)l===-1&&(l=c);else if(c!==0&&(a===32||a===9))h===-1&&l!==-1&&(h=c);else if(a===59||a===44){if(l===-1)throw new SyntaxError(`Unexpected character at index ${c}`);h===-1&&(h=c);let y=t.slice(l,h);a===44?(T(e,y,s),s=Object.create(null)):o=y,l=h=-1}else throw new SyntaxError(`Unexpected character at index ${c}`);else if(f===void 0)if(h===-1&&te[a]===1)l===-1&&(l=c);else if(a===32||a===9)h===-1&&l!==-1&&(h=c);else if(a===59||a===44){if(l===-1)throw new SyntaxError(`Unexpected character at index ${c}`);h===-1&&(h=c),T(s,t.slice(l,h),!0),a===44&&(T(e,o,s),s=Object.create(null),o=void 0),l=h=-1}else if(a===61&&l!==-1&&h===-1)f=t.slice(l,c),l=h=-1;else throw new SyntaxError(`Unexpected character at index ${c}`);else if(i){if(te[a]!==1)throw new SyntaxError(`Unexpected character at index ${c}`);l===-1?l=c:r||(r=!0),i=!1}else if(n)if(te[a]===1)l===-1&&(l=c);else if(a===34&&l!==-1)n=!1,h=c;else if(a===92)i=!0;else throw new SyntaxError(`Unexpected character at index ${c}`);else if(a===34&&t.charCodeAt(c-1)===61)n=!0;else if(h===-1&&te[a]===1)l===-1&&(l=c);else if(l!==-1&&(a===32||a===9))h===-1&&(h=c);else if(a===59||a===44){if(l===-1)throw new SyntaxError(`Unexpected character at index ${c}`);h===-1&&(h=c);let y=t.slice(l,h);r&&(y=y.replace(/\\/g,""),r=!1),T(s,f,y),a===44&&(T(e,o,s),s=Object.create(null),o=void 0),f=void 0,l=h=-1}else throw new SyntaxError(`Unexpected character at index ${c}`);if(l===-1||n||a===32||a===9)throw new SyntaxError("Unexpected end of input");h===-1&&(h=c);let m=t.slice(l,h);return o===void 0?T(e,m,s):(f===void 0?T(s,m,!0):r?T(s,f,m.replace(/\\/g,"")):T(s,f,m),T(e,o,s)),e}function Ts(t){return Object.keys(t).map(e=>{let s=t[e];return Array.isArray(s)||(s=[s]),s.map(r=>[e].concat(Object.keys(r).map(i=>{let n=r[i];return Array.isArray(n)||(n=[n]),n.map(o=>o===!0?i:`${i}=${o}`).join("; ")})).join("; ")).join(", ")}).join(", ")}vt.exports={format:Ts,parse:Os}});var pe=E(($r,Ut)=>{"use strict";d();var ks=g("events"),Cs=g("https"),Ls=g("http"),Ot=g("net"),Ns=g("tls"),{randomBytes:Ps,createHash:Bs}=g("crypto"),{Duplex:qr,Readable:Gr}=g("stream"),{URL:Ie}=g("url"),R=$(),Rs=Ne(),Us=Re(),{isBlob:Is}=j(),{BINARY_TYPES:bt,CLOSE_TIMEOUT:Ds,EMPTY_BUFFER:de,GUID:Ms,kForOnEventAttribute:De,kListener:Fs,kStatusCode:As,kWebSocket:x,NOOP:Tt}=k(),{EventTarget:{addEventListener:Ws,removeEventListener:qs}}=Et(),{format:Gs,parse:$s}=ue(),{toBuffer:js}=Z(),kt=Symbol("kAborted"),Me=[8,13],N=["CONNECTING","OPEN","CLOSING","CLOSED"],Vs=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,_=class t extends ks{constructor(e,s,r){super(),this._binaryType=bt[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=de,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol="",this._readyState=t.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,e!==null?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,s===void 0?s=[]:Array.isArray(s)||(typeof s=="object"&&s!==null?(r=s,s=[]):s=[s]),Ct(this,e,s,r)):(this._autoPong=r.autoPong,this._closeTimeout=r.closeTimeout,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(e){bt.includes(e)&&(this._binaryType=e,this._receiver&&(this._receiver._binaryType=e))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(e,s,r){let i=new Rs({allowSynchronousEvents:r.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxBufferedChunks:r.maxBufferedChunks,maxFragments:r.maxFragments,maxPayload:r.maxPayload,skipUTF8Validation:r.skipUTF8Validation}),n=new Us(e,this._extensions,r.generateMask);this._receiver=i,this._sender=n,this._socket=e,i[x]=this,n[x]=this,e[x]=this,i.on("conclude",Ys),i.on("drain",Ks),i.on("error",Xs),i.on("message",Zs),i.on("ping",Qs),i.on("pong",Js),n.onerror=er,e.setTimeout&&e.setTimeout(0),e.setNoDelay&&e.setNoDelay(),s.length>0&&e.unshift(s),e.on("close",Pt),e.on("data",me),e.on("end",Bt),e.on("error",Rt),this._readyState=t.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=t.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[R.extensionName]&&this._extensions[R.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=t.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(e,s){if(this.readyState!==t.CLOSED){if(this.readyState===t.CONNECTING){v(this,this._req,"WebSocket was closed before the connection was established");return}if(this.readyState===t.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=t.CLOSING,this._sender.close(e,s,!this._isServer,r=>{r||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),Nt(this)}}pause(){this.readyState===t.CONNECTING||this.readyState===t.CLOSED||(this._paused=!0,this._socket.pause())}ping(e,s,r){if(this.readyState===t.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(r=e,e=s=void 0):typeof s=="function"&&(r=s,s=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==t.OPEN){Fe(this,e,r);return}s===void 0&&(s=!this._isServer),this._sender.ping(e||de,s,r)}pong(e,s,r){if(this.readyState===t.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(r=e,e=s=void 0):typeof s=="function"&&(r=s,s=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==t.OPEN){Fe(this,e,r);return}s===void 0&&(s=!this._isServer),this._sender.pong(e||de,s,r)}resume(){this.readyState===t.CONNECTING||this.readyState===t.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(e,s,r){if(this.readyState===t.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof s=="function"&&(r=s,s={}),typeof e=="number"&&(e=e.toString()),this.readyState!==t.OPEN){Fe(this,e,r);return}let i={binary:typeof e!="string",mask:!this._isServer,compress:!0,fin:!0,...s};this._extensions[R.extensionName]||(i.compress=!1),this._sender.send(e||de,i,r)}terminate(){if(this.readyState!==t.CLOSED){if(this.readyState===t.CONNECTING){v(this,this._req,"WebSocket was closed before the connection was established");return}this._socket&&(this._readyState=t.CLOSING,this._socket.destroy())}}};Object.defineProperty(_,"CONNECTING",{enumerable:!0,value:N.indexOf("CONNECTING")});Object.defineProperty(_.prototype,"CONNECTING",{enumerable:!0,value:N.indexOf("CONNECTING")});Object.defineProperty(_,"OPEN",{enumerable:!0,value:N.indexOf("OPEN")});Object.defineProperty(_.prototype,"OPEN",{enumerable:!0,value:N.indexOf("OPEN")});Object.defineProperty(_,"CLOSING",{enumerable:!0,value:N.indexOf("CLOSING")});Object.defineProperty(_.prototype,"CLOSING",{enumerable:!0,value:N.indexOf("CLOSING")});Object.defineProperty(_,"CLOSED",{enumerable:!0,value:N.indexOf("CLOSED")});Object.defineProperty(_.prototype,"CLOSED",{enumerable:!0,value:N.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(t=>{Object.defineProperty(_.prototype,t,{enumerable:!0})});["open","error","close","message"].forEach(t=>{Object.defineProperty(_.prototype,`on${t}`,{enumerable:!0,get(){for(let e of this.listeners(t))if(e[De])return e[Fs];return null},set(e){for(let s of this.listeners(t))if(s[De]){this.removeListener(t,s);break}typeof e=="function"&&this.addEventListener(t,e,{[De]:!0})}})});_.prototype.addEventListener=Ws;_.prototype.removeEventListener=qs;Ut.exports=_;function Ct(t,e,s,r){let i={allowSynchronousEvents:!0,autoPong:!0,closeTimeout:Ds,protocolVersion:Me[1],maxBufferedChunks:1048576,maxFragments:131072,maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...r,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(t._autoPong=i.autoPong,t._closeTimeout=i.closeTimeout,!Me.includes(i.protocolVersion))throw new RangeError(`Unsupported protocol version: ${i.protocolVersion} (supported versions: ${Me.join(", ")})`);let n;if(e instanceof Ie)n=e;else try{n=new Ie(e)}catch{throw new SyntaxError(`Invalid URL: ${e}`)}n.protocol==="http:"?n.protocol="ws:":n.protocol==="https:"&&(n.protocol="wss:"),t._url=n.href;let o=n.protocol==="wss:",f=n.protocol==="ws+unix:",l;if(n.protocol!=="ws:"&&!o&&!f?l=`The URL's protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"`:f&&!n.pathname?l="The URL's pathname is empty":n.hash&&(l="The URL contains a fragment identifier"),l){let u=new SyntaxError(l);if(t._redirects===0)throw u;_e(t,u);return}let a=o?443:80,h=Ps(16).toString("base64"),c=o?Cs.request:Ls.request,m=new Set,y;if(i.createConnection=i.createConnection||(o?Hs:zs),i.defaultPort=i.defaultPort||a,i.port=n.port||a,i.host=n.hostname.startsWith("[")?n.hostname.slice(1,-1):n.hostname,i.headers={...i.headers,"Sec-WebSocket-Version":i.protocolVersion,"Sec-WebSocket-Key":h,Connection:"Upgrade",Upgrade:"websocket"},i.path=n.pathname+n.search,i.timeout=i.handshakeTimeout,i.perMessageDeflate&&(y=new R({...i.perMessageDeflate,isServer:!1,maxPayload:i.maxPayload}),i.headers["Sec-WebSocket-Extensions"]=Gs({[R.extensionName]:y.offer()})),s.length){for(let u of s){if(typeof u!="string"||!Vs.test(u)||m.has(u))throw new SyntaxError("An invalid or duplicated subprotocol was specified");m.add(u)}i.headers["Sec-WebSocket-Protocol"]=s.join(",")}if(i.origin&&(i.protocolVersion<13?i.headers["Sec-WebSocket-Origin"]=i.origin:i.headers.Origin=i.origin),(n.username||n.password)&&(i.auth=`${n.username}:${n.password}`),f){let u=i.path.split(":");i.socketPath=u[0],i.path=u[1]}let p;if(i.followRedirects){if(t._redirects===0){t._originalIpc=f,t._originalSecure=o,t._originalHostOrSocketPath=f?i.socketPath:n.host;let u=r&&r.headers;if(r={...r,headers:{}},u)for(let[S,A]of Object.entries(u))r.headers[S.toLowerCase()]=A}else if(t.listenerCount("redirect")===0){let u=f?t._originalIpc?i.socketPath===t._originalHostOrSocketPath:!1:t._originalIpc?!1:n.host===t._originalHostOrSocketPath;(!u||t._originalSecure&&!o)&&(delete i.headers.authorization,delete i.headers.cookie,u||delete i.headers.host,i.auth=void 0)}i.auth&&!r.headers.authorization&&(r.headers.authorization="Basic "+Buffer.from(i.auth).toString("base64")),p=t._req=c(i),t._redirects&&t.emit("redirect",t.url,p)}else p=t._req=c(i);i.timeout&&p.on("timeout",()=>{v(t,p,"Opening handshake has timed out")}),p.on("error",u=>{p===null||p[kt]||(p=t._req=null,_e(t,u))}),p.on("response",u=>{let S=u.headers.location,A=u.statusCode;if(S&&i.followRedirects&&A>=300&&A<400){if(++t._redirects>i.maxRedirects){v(t,p,"Maximum redirects exceeded");return}p.abort();let K;try{K=new Ie(S,e)}catch{let W=new SyntaxError(`Invalid URL: ${S}`);_e(t,W);return}Ct(t,K,s,r)}else t.emit("unexpected-response",p,u)||v(t,p,`Unexpected server response: ${u.statusCode}`)}),p.on("upgrade",(u,S,A)=>{if(t.emit("upgrade",u),t.readyState!==_.CONNECTING)return;p=t._req=null;let K=u.headers.upgrade;if(K===void 0||K.toLowerCase()!=="websocket"){v(t,S,"Invalid Upgrade header");return}let qe=Bs("sha1").update(h+Ms).digest("base64");if(u.headers["sec-websocket-accept"]!==qe){v(t,S,"Invalid Sec-WebSocket-Accept header");return}let W=u.headers["sec-websocket-protocol"],X;if(W!==void 0?m.size?m.has(W)||(X="Server sent an invalid subprotocol"):X="Server sent a subprotocol but none was requested":m.size&&(X="Server sent no subprotocol"),X){v(t,S,X);return}W&&(t._protocol=W);let Ge=u.headers["sec-websocket-extensions"];if(Ge!==void 0){if(!y){v(t,S,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let ye;try{ye=$s(Ge)}catch{v(t,S,"Invalid Sec-WebSocket-Extensions header");return}let $e=Object.keys(ye);if($e.length!==1||$e[0]!==R.extensionName){v(t,S,"Server indicated an extension that was not requested");return}try{y.accept(ye[R.extensionName])}catch{v(t,S,"Invalid Sec-WebSocket-Extensions header");return}t._extensions[R.extensionName]=y}t.setSocket(S,A,{allowSynchronousEvents:i.allowSynchronousEvents,generateMask:i.generateMask,maxBufferedChunks:i.maxBufferedChunks,maxFragments:i.maxFragments,maxPayload:i.maxPayload,skipUTF8Validation:i.skipUTF8Validation})}),i.finishRequest?i.finishRequest(p,t):p.end()}function _e(t,e){t._readyState=_.CLOSING,t._errorEmitted=!0,t.emit("error",e),t.emitClose()}function zs(t){return t.path=t.socketPath,Ot.connect(t)}function Hs(t){return t.path=void 0,!t.servername&&t.servername!==""&&(t.servername=Ot.isIP(t.host)?"":t.host),Ns.connect(t)}function v(t,e,s){t._readyState=_.CLOSING;let r=new Error(s);Error.captureStackTrace(r,v),e.setHeader?(e[kt]=!0,e.abort(),e.socket&&!e.socket.destroyed&&e.socket.destroy(),process.nextTick(_e,t,r)):(e.destroy(r),e.once("error",t.emit.bind(t,"error")),e.once("close",t.emitClose.bind(t)))}function Fe(t,e,s){if(e){let r=Is(e)?e.size:js(e).length;t._socket?t._sender._bufferedBytes+=r:t._bufferedAmount+=r}if(s){let r=new Error(`WebSocket is not open: readyState ${t.readyState} (${N[t.readyState]})`);process.nextTick(s,r)}}function Ys(t,e){let s=this[x];s._closeFrameReceived=!0,s._closeMessage=e,s._closeCode=t,s._socket[x]!==void 0&&(s._socket.removeListener("data",me),process.nextTick(Lt,s._socket),t===1005?s.close():s.close(t,e))}function Ks(){let t=this[x];t.isPaused||t._socket.resume()}function Xs(t){let e=this[x];e._socket[x]!==void 0&&(e._socket.removeListener("data",me),process.nextTick(Lt,e._socket),e.close(t[As])),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",t))}function wt(){this[x].emitClose()}function Zs(t,e){this[x].emit("message",t,e)}function Qs(t){let e=this[x];e._autoPong&&e.pong(t,!this._isServer,Tt),e.emit("ping",t)}function Js(t){this[x].emit("pong",t)}function Lt(t){t.resume()}function er(t){let e=this[x];e.readyState!==_.CLOSED&&(e.readyState===_.OPEN&&(e._readyState=_.CLOSING,Nt(e)),this._socket.end(),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",t)))}function Nt(t){t._closeTimer=setTimeout(t._socket.destroy.bind(t._socket),t._closeTimeout)}function Pt(){let t=this[x];if(this.removeListener("close",Pt),this.removeListener("data",me),this.removeListener("end",Bt),t._readyState=_.CLOSING,!this._readableState.endEmitted&&!t._closeFrameReceived&&!t._receiver._writableState.errorEmitted&&this._readableState.length!==0){let e=this.read(this._readableState.length);t._receiver.write(e)}t._receiver.end(),this[x]=void 0,clearTimeout(t._closeTimer),t._receiver._writableState.finished||t._receiver._writableState.errorEmitted?t.emitClose():(t._receiver.on("error",wt),t._receiver.on("finish",wt))}function me(t){this[x]._receiver.write(t)||this.pause()}function Bt(){let t=this[x];t._readyState=_.CLOSING,t._receiver.end(),this.end()}function Rt(){let t=this[x];this.removeListener("error",Rt),this.on("error",Tt),t&&(t._readyState=_.CLOSING,this.destroy())}});var Ft=E((zr,Mt)=>{"use strict";d();var Vr=pe(),{Duplex:tr}=g("stream");function It(t){t.emit("close")}function sr(){!this.destroyed&&this._writableState.finished&&this.destroy()}function Dt(t){this.removeListener("error",Dt),this.destroy(),this.listenerCount("error")===0&&this.emit("error",t)}function rr(t,e){let s=!0,r=new tr({...e,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return t.on("message",function(n,o){let f=!o&&r._readableState.objectMode?n.toString():n;r.push(f)||t.pause()}),t.once("error",function(n){r.destroyed||(s=!1,r.destroy(n))}),t.once("close",function(){r.destroyed||r.push(null)}),r._destroy=function(i,n){if(t.readyState===t.CLOSED){n(i),process.nextTick(It,r);return}let o=!1;t.once("error",function(l){o=!0,n(l)}),t.once("close",function(){o||n(i),process.nextTick(It,r)}),s&&t.terminate()},r._final=function(i){if(t.readyState===t.CONNECTING){t.once("open",function(){r._final(i)});return}t._socket!==null&&(t._socket._writableState.finished?(i(),r._readableState.endEmitted&&r.destroy()):(t._socket.once("finish",function(){i()}),t.close()))},r._read=function(){t.isPaused&&t.resume()},r._write=function(i,n,o){if(t.readyState===t.CONNECTING){t.once("open",function(){r._write(i,n,o)});return}t.send(i,o)},r.on("end",sr),r.on("error",Dt),r}Mt.exports=rr});var Ae=E((Yr,At)=>{"use strict";d();var{tokenChars:ir}=j();function nr(t){let e=new Set,s=-1,r=-1,i=0;for(i;i<t.length;i++){let o=t.charCodeAt(i);if(r===-1&&ir[o]===1)s===-1&&(s=i);else if(i!==0&&(o===32||o===9))r===-1&&s!==-1&&(r=i);else if(o===44){if(s===-1)throw new SyntaxError(`Unexpected character at index ${i}`);r===-1&&(r=i);let f=t.slice(s,r);if(e.has(f))throw new SyntaxError(`The "${f}" subprotocol is duplicated`);e.add(f),s=r=-1}else throw new SyntaxError(`Unexpected character at index ${i}`)}if(s===-1||r!==-1)throw new SyntaxError("Unexpected end of input");let n=t.slice(s,i);if(e.has(n))throw new SyntaxError(`The "${n}" subprotocol is duplicated`);return e.add(n),e}At.exports={parse:nr}});var zt=E((Zr,Vt)=>{"use strict";d();var or=g("events"),ge=g("http"),{Duplex:Xr}=g("stream"),{createHash:ar}=g("crypto"),Wt=ue(),M=$(),fr=Ae(),lr=pe(),{CLOSE_TIMEOUT:hr,GUID:cr,kWebSocket:ur}=k(),dr=/^[+/0-9A-Za-z]{22}==$/,qt=0,Gt=1,jt=2,We=class extends or{constructor(e,s){if(super(),e={allowSynchronousEvents:!0,autoPong:!0,maxBufferedChunks:1024*1024,maxFragments:128*1024,maxPayload:100*1024*1024,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,closeTimeout:hr,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:lr,...e},e.port==null&&!e.server&&!e.noServer||e.port!=null&&(e.server||e.noServer)||e.server&&e.noServer)throw new TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(e.port!=null?(this._server=ge.createServer((r,i)=>{let n=ge.STATUS_CODES[426];i.writeHead(426,{"Content-Length":n.length,"Content-Type":"text/plain"}),i.end(n)}),this._server.listen(e.port,e.host,e.backlog,s)):e.server&&(this._server=e.server),this._server){let r=this.emit.bind(this,"connection");this._removeListeners=_r(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(i,n,o)=>{this.handleUpgrade(i,n,o,r)}})}e.perMessageDeflate===!0&&(e.perMessageDeflate={}),e.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=e,this._state=qt}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(e){if(this._state===jt){e&&this.once("close",()=>{e(new Error("The server is not running"))}),process.nextTick(se,this);return}if(e&&this.once("close",e),this._state!==Gt)if(this._state=Gt,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients?this.clients.size?this._shouldEmitClose=!0:process.nextTick(se,this):process.nextTick(se,this);else{let s=this._server;this._removeListeners(),this._removeListeners=this._server=null,s.close(()=>{se(this)})}}shouldHandle(e){if(this.options.path){let s=e.url.indexOf("?");if((s!==-1?e.url.slice(0,s):e.url)!==this.options.path)return!1}return!0}handleUpgrade(e,s,r,i){s.on("error",$t);let n=e.headers["sec-websocket-key"],o=e.headers.upgrade,f=+e.headers["sec-websocket-version"];if(e.method!=="GET"){F(this,e,s,405,"Invalid HTTP method");return}if(o===void 0||o.toLowerCase()!=="websocket"){F(this,e,s,400,"Invalid Upgrade header");return}if(n===void 0||!dr.test(n)){F(this,e,s,400,"Missing or invalid Sec-WebSocket-Key header");return}if(f!==13&&f!==8){F(this,e,s,400,"Missing or invalid Sec-WebSocket-Version header",{"Sec-WebSocket-Version":"13, 8"});return}if(!this.shouldHandle(e)){re(s,400);return}let l=e.headers["sec-websocket-protocol"],a=new Set;if(l!==void 0)try{a=fr.parse(l)}catch{F(this,e,s,400,"Invalid Sec-WebSocket-Protocol header");return}let h=e.headers["sec-websocket-extensions"],c={};if(this.options.perMessageDeflate&&h!==void 0){let m=new M({...this.options.perMessageDeflate,isServer:!0,maxPayload:this.options.maxPayload});try{let y=Wt.parse(h);y[M.extensionName]&&(m.accept(y[M.extensionName]),c[M.extensionName]=m)}catch{F(this,e,s,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let m={origin:e.headers[`${f===8?"sec-websocket-origin":"origin"}`],secure:!!(e.socket.authorized||e.socket.encrypted),req:e};if(this.options.verifyClient.length===2){this.options.verifyClient(m,(y,p,u,S)=>{if(!y)return re(s,p||401,u,S);this.completeUpgrade(c,n,a,e,s,r,i)});return}if(!this.options.verifyClient(m))return re(s,401)}this.completeUpgrade(c,n,a,e,s,r,i)}completeUpgrade(e,s,r,i,n,o,f){if(!n.readable||!n.writable)return n.destroy();if(n[ur])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>qt)return re(n,503);let a=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${ar("sha1").update(s+cr).digest("base64")}`],h=new this.options.WebSocket(null,void 0,this.options);if(r.size){let c=this.options.handleProtocols?this.options.handleProtocols(r,i):r.values().next().value;c&&(a.push(`Sec-WebSocket-Protocol: ${c}`),h._protocol=c)}if(e[M.extensionName]){let c=e[M.extensionName].params,m=Wt.format({[M.extensionName]:[c]});a.push(`Sec-WebSocket-Extensions: ${m}`),h._extensions=e}this.emit("headers",a,i),n.write(a.concat(`\r
|
|
1
|
+
import{a as g,c as E,e as P,g as d}from"./chunk-VKWPEFWQ.js";var k=E((vr,ze)=>{"use strict";d();var je=["nodebuffer","arraybuffer","fragments"],Ve=typeof Blob<"u";Ve&&je.push("blob");ze.exports={BINARY_TYPES:je,CLOSE_TIMEOUT:3e4,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:Ve,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}});var Z=E((wr,ie)=>{"use strict";d();var{EMPTY_BUFFER:Kt}=k(),Se=Buffer[Symbol.species];function Xt(t,e){if(t.length===0)return Kt;if(t.length===1)return t[0];let s=Buffer.allocUnsafe(e),r=0;for(let i=0;i<t.length;i++){let n=t[i];s.set(n,r),r+=n.length}return r<e?new Se(s.buffer,s.byteOffset,r):s}function He(t,e,s,r,i){for(let n=0;n<i;n++)s[r+n]=t[n]^e[n&3]}function Ye(t,e){for(let s=0;s<t.length;s++)t[s]^=e[s&3]}function Zt(t){return t.length===t.buffer.byteLength?t.buffer:t.buffer.slice(t.byteOffset,t.byteOffset+t.length)}function Ee(t){if(Ee.readOnly=!0,Buffer.isBuffer(t))return t;let e;return t instanceof ArrayBuffer?e=new Se(t):ArrayBuffer.isView(t)?e=new Se(t.buffer,t.byteOffset,t.byteLength):(e=Buffer.from(t),Ee.readOnly=!1),e}ie.exports={concat:Xt,mask:He,toArrayBuffer:Zt,toBuffer:Ee,unmask:Ye};if(!process.env.WS_NO_BUFFER_UTIL)try{let t=g("bufferutil");ie.exports.mask=function(e,s,r,i,n){n<48?He(e,s,r,i,n):t.mask(e,s,r,i,n)},ie.exports.unmask=function(e,s){e.length<32?Ye(e,s):t.unmask(e,s)}}catch{}});var Ze=E((Tr,Xe)=>{"use strict";d();var Ke=Symbol("kDone"),ve=Symbol("kRun"),be=class{constructor(e){this[Ke]=()=>{this.pending--,this[ve]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[ve]()}[ve](){if(this.pending!==this.concurrency&&this.jobs.length){let e=this.jobs.shift();this.pending++,e(this[Ke])}}};Xe.exports=be});var $=E((Cr,tt)=>{"use strict";d();var Q=g("zlib"),Qe=Z(),Qt=Ze(),{kStatusCode:Je}=k(),Jt=Buffer[Symbol.species],es=Buffer.from([0,0,255,255]),oe=Symbol("permessage-deflate"),C=Symbol("total-length"),q=Symbol("callback"),B=Symbol("buffers"),G=Symbol("error"),ne,we=class{constructor(e){if(this._options=e||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._maxPayload=this._options.maxPayload|0,this._isServer=!!this._options.isServer,this._deflate=null,this._inflate=null,this.params=null,!ne){let s=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;ne=new Qt(s)}}static get extensionName(){return"permessage-deflate"}offer(){let e={};return this._options.serverNoContextTakeover&&(e.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(e.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?e.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits==null&&(e.client_max_window_bits=!0),e}accept(e){return e=this.normalizeParams(e),this.params=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let e=this._deflate[q];this._deflate.close(),this._deflate=null,e&&e(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(e){let s=this._options,r=e.find(i=>!(s.serverNoContextTakeover===!1&&i.server_no_context_takeover||i.server_max_window_bits&&(s.serverMaxWindowBits===!1||typeof s.serverMaxWindowBits=="number"&&s.serverMaxWindowBits>i.server_max_window_bits)||typeof s.clientMaxWindowBits=="number"&&!i.client_max_window_bits));if(!r)throw new Error("None of the extension offers can be accepted");return s.serverNoContextTakeover&&(r.server_no_context_takeover=!0),s.clientNoContextTakeover&&(r.client_no_context_takeover=!0),typeof s.serverMaxWindowBits=="number"&&(r.server_max_window_bits=s.serverMaxWindowBits),typeof s.clientMaxWindowBits=="number"?r.client_max_window_bits=s.clientMaxWindowBits:(r.client_max_window_bits===!0||s.clientMaxWindowBits===!1)&&delete r.client_max_window_bits,r}acceptAsClient(e){let s=e[0];if(this._options.clientNoContextTakeover===!1&&s.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(!s.client_max_window_bits)typeof this._options.clientMaxWindowBits=="number"&&(s.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits=="number"&&s.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"');return s}normalizeParams(e){return e.forEach(s=>{Object.keys(s).forEach(r=>{let i=s[r];if(i.length>1)throw new Error(`Parameter "${r}" must have only a single value`);if(i=i[0],r==="client_max_window_bits"){if(i!==!0){let n=+i;if(!Number.isInteger(n)||n<8||n>15)throw new TypeError(`Invalid value for parameter "${r}": ${i}`);i=n}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${r}": ${i}`)}else if(r==="server_max_window_bits"){let n=+i;if(!Number.isInteger(n)||n<8||n>15)throw new TypeError(`Invalid value for parameter "${r}": ${i}`);i=n}else if(r==="client_no_context_takeover"||r==="server_no_context_takeover"){if(i!==!0)throw new TypeError(`Invalid value for parameter "${r}": ${i}`)}else throw new Error(`Unknown parameter "${r}"`);s[r]=i})}),e}decompress(e,s,r){ne.add(i=>{this._decompress(e,s,(n,o)=>{i(),r(n,o)})})}compress(e,s,r){ne.add(i=>{this._compress(e,s,(n,o)=>{i(),r(n,o)})})}_decompress(e,s,r){let i=this._isServer?"client":"server";if(!this._inflate){let n=`${i}_max_window_bits`,o=typeof this.params[n]!="number"?Q.Z_DEFAULT_WINDOWBITS:this.params[n];this._inflate=Q.createInflateRaw({...this._options.zlibInflateOptions,windowBits:o}),this._inflate[oe]=this,this._inflate[C]=0,this._inflate[B]=[],this._inflate.on("error",ss),this._inflate.on("data",et)}this._inflate[q]=r,this._inflate.write(e),s&&this._inflate.write(es),this._inflate.flush(()=>{let n=this._inflate[G];if(n){this._inflate.close(),this._inflate=null,r(n);return}let o=Qe.concat(this._inflate[B],this._inflate[C]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[C]=0,this._inflate[B]=[],s&&this.params[`${i}_no_context_takeover`]&&this._inflate.reset()),r(null,o)})}_compress(e,s,r){let i=this._isServer?"server":"client";if(!this._deflate){let n=`${i}_max_window_bits`,o=typeof this.params[n]!="number"?Q.Z_DEFAULT_WINDOWBITS:this.params[n];this._deflate=Q.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:o}),this._deflate[C]=0,this._deflate[B]=[],this._deflate.on("data",ts)}this._deflate[q]=r,this._deflate.write(e),this._deflate.flush(Q.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let n=Qe.concat(this._deflate[B],this._deflate[C]);s&&(n=new Jt(n.buffer,n.byteOffset,n.length-4)),this._deflate[q]=null,this._deflate[C]=0,this._deflate[B]=[],s&&this.params[`${i}_no_context_takeover`]&&this._deflate.reset(),r(null,n)})}};tt.exports=we;function ts(t){this[B].push(t),this[C]+=t.length}function et(t){if(this[C]+=t.length,this[oe]._maxPayload<1||this[C]<=this[oe]._maxPayload){this[B].push(t);return}this[G]=new RangeError("Max payload size exceeded"),this[G].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[G][Je]=1009,this.removeListener("data",et),this.reset()}function ss(t){if(this[oe]._inflate=null,this[G]){this[q](this[G]);return}t[Je]=1007,this[q](t)}});var j=E((Nr,ae)=>{"use strict";d();var{isUtf8:st}=g("buffer"),{hasBlob:rs}=k(),is=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function ns(t){return t>=1e3&&t<=1014&&t!==1004&&t!==1005&&t!==1006||t>=3e3&&t<=4999}function Oe(t){let e=t.length,s=0;for(;s<e;)if((t[s]&128)===0)s++;else if((t[s]&224)===192){if(s+1===e||(t[s+1]&192)!==128||(t[s]&254)===192)return!1;s+=2}else if((t[s]&240)===224){if(s+2>=e||(t[s+1]&192)!==128||(t[s+2]&192)!==128||t[s]===224&&(t[s+1]&224)===128||t[s]===237&&(t[s+1]&224)===160)return!1;s+=3}else if((t[s]&248)===240){if(s+3>=e||(t[s+1]&192)!==128||(t[s+2]&192)!==128||(t[s+3]&192)!==128||t[s]===240&&(t[s+1]&240)===128||t[s]===244&&t[s+1]>143||t[s]>244)return!1;s+=4}else return!1;return!0}function os(t){return rs&&typeof t=="object"&&typeof t.arrayBuffer=="function"&&typeof t.type=="string"&&typeof t.stream=="function"&&(t[Symbol.toStringTag]==="Blob"||t[Symbol.toStringTag]==="File")}ae.exports={isBlob:os,isValidStatusCode:ns,isValidUTF8:Oe,tokenChars:is};if(st)ae.exports.isValidUTF8=function(t){return t.length<24?Oe(t):st(t)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let t=g("utf-8-validate");ae.exports.isValidUTF8=function(e){return e.length<32?Oe(e):t(e)}}catch{}});var Ne=E((Br,lt)=>{"use strict";d();var{Writable:as}=g("stream"),rt=$(),{BINARY_TYPES:fs,EMPTY_BUFFER:it,kStatusCode:ls,kWebSocket:hs}=k(),{concat:Te,toArrayBuffer:cs,unmask:us}=Z(),{isValidStatusCode:ds,isValidUTF8:nt}=j(),fe=Buffer[Symbol.species],b=0,ot=1,at=2,ft=3,ke=4,Ce=5,le=6,Le=class extends as{constructor(e={}){super(),this._allowSynchronousEvents=e.allowSynchronousEvents!==void 0?e.allowSynchronousEvents:!0,this._binaryType=e.binaryType||fs[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxBufferedChunks=e.maxBufferedChunks|0,this._maxFragments=e.maxFragments|0,this._maxPayload=e.maxPayload|0,this._skipUTF8Validation=!!e.skipUTF8Validation,this[hs]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=b}_write(e,s,r){if(this._opcode===8&&this._state==b)return r();if(this._maxBufferedChunks>0&&this._buffers.length>=this._maxBufferedChunks){r(this.createError(RangeError,"Too many buffered chunks",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS"));return}this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(r)}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){let r=this._buffers[0];return this._buffers[0]=new fe(r.buffer,r.byteOffset+e,r.length-e),new fe(r.buffer,r.byteOffset,e)}let s=Buffer.allocUnsafe(e);do{let r=this._buffers[0],i=s.length-e;e>=r.length?s.set(this._buffers.shift(),i):(s.set(new Uint8Array(r.buffer,r.byteOffset,e),i),this._buffers[0]=new fe(r.buffer,r.byteOffset+e,r.length-e)),e-=r.length}while(e>0);return s}startLoop(e){this._loop=!0;do switch(this._state){case b:this.getInfo(e);break;case ot:this.getPayloadLength16(e);break;case at:this.getPayloadLength64(e);break;case ft:this.getMask();break;case ke:this.getData(e);break;case Ce:case le:this._loop=!1;return}while(this._loop);this._errored||e()}getInfo(e){if(this._bufferedBytes<2){this._loop=!1;return}let s=this.consume(2);if((s[0]&48)!==0){let i=this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");e(i);return}let r=(s[0]&64)===64;if(r&&!this._extensions[rt.extensionName]){let i=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(i);return}if(this._fin=(s[0]&128)===128,this._opcode=s[0]&15,this._payloadLength=s[1]&127,this._opcode===0){if(r){let i=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(i);return}if(!this._fragmented){let i=this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");e(i);return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){let i=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(i);return}this._compressed=r}else if(this._opcode>7&&this._opcode<11){if(!this._fin){let i=this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");e(i);return}if(r){let i=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(i);return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){let i=this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");e(i);return}}else{let i=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(i);return}if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(s[1]&128)===128,this._isServer){if(!this._masked){let i=this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK");e(i);return}}else if(this._masked){let i=this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");e(i);return}this._payloadLength===126?this._state=ot:this._payloadLength===127?this._state=at:this.haveLength(e)}getPayloadLength16(e){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(e)}getPayloadLength64(e){if(this._bufferedBytes<8){this._loop=!1;return}let s=this.consume(8),r=s.readUInt32BE(0);if(r>Math.pow(2,21)-1){let i=this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH");e(i);return}this._payloadLength=r*Math.pow(2,32)+s.readUInt32BE(4),this.haveLength(e)}haveLength(e){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){let s=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");e(s);return}this._masked?this._state=ft:this._state=ke}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=ke}getData(e){let s=it;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}s=this.consume(this._payloadLength),this._masked&&(this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3])!==0&&us(s,this._mask)}if(this._opcode>7){this.controlMessage(s,e);return}if(this._compressed){this._state=Ce,this.decompress(s,e);return}if(s.length){if(this._maxFragments>0&&this._fragments.length>=this._maxFragments){let r=this.createError(RangeError,"Too many message fragments",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS");e(r);return}this._messageLength=this._totalPayloadLength,this._fragments.push(s)}this.dataMessage(e)}decompress(e,s){this._extensions[rt.extensionName].decompress(e,this._fin,(i,n)=>{if(i)return s(i);if(n.length){if(this._messageLength+=n.length,this._messageLength>this._maxPayload&&this._maxPayload>0){let o=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");s(o);return}if(this._maxFragments>0&&this._fragments.length>=this._maxFragments){let o=this.createError(RangeError,"Too many message fragments",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS");s(o);return}this._fragments.push(n)}this.dataMessage(s),this._state===b&&this.startLoop(s)})}dataMessage(e){if(!this._fin){this._state=b;return}let s=this._messageLength,r=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let i;this._binaryType==="nodebuffer"?i=Te(r,s):this._binaryType==="arraybuffer"?i=cs(Te(r,s)):this._binaryType==="blob"?i=new Blob(r):i=r,this._allowSynchronousEvents?(this.emit("message",i,!0),this._state=b):(this._state=le,setImmediate(()=>{this.emit("message",i,!0),this._state=b,this.startLoop(e)}))}else{let i=Te(r,s);if(!this._skipUTF8Validation&&!nt(i)){let n=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");e(n);return}this._state===Ce||this._allowSynchronousEvents?(this.emit("message",i,!1),this._state=b):(this._state=le,setImmediate(()=>{this.emit("message",i,!1),this._state=b,this.startLoop(e)}))}}controlMessage(e,s){if(this._opcode===8){if(e.length===0)this._loop=!1,this.emit("conclude",1005,it),this.end();else{let r=e.readUInt16BE(0);if(!ds(r)){let n=this.createError(RangeError,`invalid status code ${r}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");s(n);return}let i=new fe(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!nt(i)){let n=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");s(n);return}this._loop=!1,this.emit("conclude",r,i),this.end()}this._state=b;return}this._allowSynchronousEvents?(this.emit(this._opcode===9?"ping":"pong",e),this._state=b):(this._state=le,setImmediate(()=>{this.emit(this._opcode===9?"ping":"pong",e),this._state=b,this.startLoop(s)}))}createError(e,s,r,i,n){this._loop=!1,this._errored=!0;let o=new e(r?`Invalid WebSocket frame: ${s}`:s);return Error.captureStackTrace(o,this.createError),o.code=n,o[ls]=i,o}};lt.exports=Le});var Re=E((Ir,ut)=>{"use strict";d();var{Duplex:Ur}=g("stream"),{randomFillSync:_s}=g("crypto"),{types:{isUint8Array:ms}}=g("util"),ht=$(),{EMPTY_BUFFER:ps,kWebSocket:gs,NOOP:ys}=k(),{isBlob:V,isValidStatusCode:xs}=j(),{mask:ct,toBuffer:U}=Z(),w=Symbol("kByteLength"),Ss=Buffer.alloc(4),he=8*1024,I,z=he,O=0,Es=1,vs=2,Pe=class t{constructor(e,s,r){this._extensions=s||{},r&&(this._generateMask=r,this._maskBuffer=Buffer.alloc(4)),this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=O,this.onerror=ys,this[gs]=void 0}static frame(e,s){let r,i=!1,n=2,o=!1;s.mask&&(r=s.maskBuffer||Ss,s.generateMask?s.generateMask(r):(z===he&&(I===void 0&&(I=Buffer.alloc(he)),_s(I,0,he),z=0),r[0]=I[z++],r[1]=I[z++],r[2]=I[z++],r[3]=I[z++]),o=(r[0]|r[1]|r[2]|r[3])===0,n=6);let f;typeof e=="string"?(!s.mask||o)&&s[w]!==void 0?f=s[w]:(e=Buffer.from(e),f=e.length):(f=e.length,i=s.mask&&s.readOnly&&!o);let l=f;f>=65536?(n+=8,l=127):f>125&&(n+=2,l=126);let a=Buffer.allocUnsafe(i?f+n:n);return a[0]=s.fin?s.opcode|128:s.opcode,s.rsv1&&(a[0]|=64),a[1]=l,l===126?a.writeUInt16BE(f,2):l===127&&(a[2]=a[3]=0,a.writeUIntBE(f,4,6)),s.mask?(a[1]|=128,a[n-4]=r[0],a[n-3]=r[1],a[n-2]=r[2],a[n-1]=r[3],o?[a,e]:i?(ct(e,r,a,n,f),[a]):(ct(e,r,e,0,f),[a,e])):[a,e]}close(e,s,r,i){let n;if(e===void 0)n=ps;else{if(typeof e!="number"||!xs(e))throw new TypeError("First argument must be a valid error code number");if(s===void 0||!s.length)n=Buffer.allocUnsafe(2),n.writeUInt16BE(e,0);else{let f=Buffer.byteLength(s);if(f>123)throw new RangeError("The message must not be greater than 123 bytes");if(n=Buffer.allocUnsafe(2+f),n.writeUInt16BE(e,0),typeof s=="string")n.write(s,2);else if(ms(s))n.set(s,2);else throw new TypeError("Second argument must be a string or a Uint8Array")}}let o={[w]:n.length,fin:!0,generateMask:this._generateMask,mask:r,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._state!==O?this.enqueue([this.dispatch,n,!1,o,i]):this.sendFrame(t.frame(n,o),i)}ping(e,s,r){let i,n;if(typeof e=="string"?(i=Buffer.byteLength(e),n=!1):V(e)?(i=e.size,n=!1):(e=U(e),i=e.length,n=U.readOnly),i>125)throw new RangeError("The data size must not be greater than 125 bytes");let o={[w]:i,fin:!0,generateMask:this._generateMask,mask:s,maskBuffer:this._maskBuffer,opcode:9,readOnly:n,rsv1:!1};V(e)?this._state!==O?this.enqueue([this.getBlobData,e,!1,o,r]):this.getBlobData(e,!1,o,r):this._state!==O?this.enqueue([this.dispatch,e,!1,o,r]):this.sendFrame(t.frame(e,o),r)}pong(e,s,r){let i,n;if(typeof e=="string"?(i=Buffer.byteLength(e),n=!1):V(e)?(i=e.size,n=!1):(e=U(e),i=e.length,n=U.readOnly),i>125)throw new RangeError("The data size must not be greater than 125 bytes");let o={[w]:i,fin:!0,generateMask:this._generateMask,mask:s,maskBuffer:this._maskBuffer,opcode:10,readOnly:n,rsv1:!1};V(e)?this._state!==O?this.enqueue([this.getBlobData,e,!1,o,r]):this.getBlobData(e,!1,o,r):this._state!==O?this.enqueue([this.dispatch,e,!1,o,r]):this.sendFrame(t.frame(e,o),r)}send(e,s,r){let i=this._extensions[ht.extensionName],n=s.binary?2:1,o=s.compress,f,l;typeof e=="string"?(f=Buffer.byteLength(e),l=!1):V(e)?(f=e.size,l=!1):(e=U(e),f=e.length,l=U.readOnly),this._firstFragment?(this._firstFragment=!1,o&&i&&i.params[i._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(o=f>=i._threshold),this._compress=o):(o=!1,n=0),s.fin&&(this._firstFragment=!0);let a={[w]:f,fin:s.fin,generateMask:this._generateMask,mask:s.mask,maskBuffer:this._maskBuffer,opcode:n,readOnly:l,rsv1:o};V(e)?this._state!==O?this.enqueue([this.getBlobData,e,this._compress,a,r]):this.getBlobData(e,this._compress,a,r):this._state!==O?this.enqueue([this.dispatch,e,this._compress,a,r]):this.dispatch(e,this._compress,a,r)}getBlobData(e,s,r,i){this._bufferedBytes+=r[w],this._state=vs,e.arrayBuffer().then(n=>{if(this._socket.destroyed){let f=new Error("The socket was closed while the blob was being read");process.nextTick(Be,this,f,i);return}this._bufferedBytes-=r[w];let o=U(n);s?this.dispatch(o,s,r,i):(this._state=O,this.sendFrame(t.frame(o,r),i),this.dequeue())}).catch(n=>{process.nextTick(bs,this,n,i)})}dispatch(e,s,r,i){if(!s){this.sendFrame(t.frame(e,r),i);return}let n=this._extensions[ht.extensionName];this._bufferedBytes+=r[w],this._state=Es,n.compress(e,r.fin,(o,f)=>{if(this._socket.destroyed){let l=new Error("The socket was closed while data was being compressed");Be(this,l,i);return}this._bufferedBytes-=r[w],this._state=O,r.readOnly=!1,this.sendFrame(t.frame(f,r),i),this.dequeue()})}dequeue(){for(;this._state===O&&this._queue.length;){let e=this._queue.shift();this._bufferedBytes-=e[3][w],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][w],this._queue.push(e)}sendFrame(e,s){e.length===2?(this._socket.cork(),this._socket.write(e[0]),this._socket.write(e[1],s),this._socket.uncork()):this._socket.write(e[0],s)}};ut.exports=Pe;function Be(t,e,s){typeof s=="function"&&s(e);for(let r=0;r<t._queue.length;r++){let i=t._queue[r],n=i[i.length-1];typeof n=="function"&&n(e)}}function bs(t,e,s){Be(t,e,s),t.onerror(e)}});var Et=E((Mr,St)=>{"use strict";d();var{kForOnEventAttribute:J,kListener:Ue}=k(),dt=Symbol("kCode"),_t=Symbol("kData"),mt=Symbol("kError"),pt=Symbol("kMessage"),gt=Symbol("kReason"),H=Symbol("kTarget"),yt=Symbol("kType"),xt=Symbol("kWasClean"),L=class{constructor(e){this[H]=null,this[yt]=e}get target(){return this[H]}get type(){return this[yt]}};Object.defineProperty(L.prototype,"target",{enumerable:!0});Object.defineProperty(L.prototype,"type",{enumerable:!0});var D=class extends L{constructor(e,s={}){super(e),this[dt]=s.code===void 0?0:s.code,this[gt]=s.reason===void 0?"":s.reason,this[xt]=s.wasClean===void 0?!1:s.wasClean}get code(){return this[dt]}get reason(){return this[gt]}get wasClean(){return this[xt]}};Object.defineProperty(D.prototype,"code",{enumerable:!0});Object.defineProperty(D.prototype,"reason",{enumerable:!0});Object.defineProperty(D.prototype,"wasClean",{enumerable:!0});var Y=class extends L{constructor(e,s={}){super(e),this[mt]=s.error===void 0?null:s.error,this[pt]=s.message===void 0?"":s.message}get error(){return this[mt]}get message(){return this[pt]}};Object.defineProperty(Y.prototype,"error",{enumerable:!0});Object.defineProperty(Y.prototype,"message",{enumerable:!0});var ee=class extends L{constructor(e,s={}){super(e),this[_t]=s.data===void 0?null:s.data}get data(){return this[_t]}};Object.defineProperty(ee.prototype,"data",{enumerable:!0});var ws={addEventListener(t,e,s={}){for(let i of this.listeners(t))if(!s[J]&&i[Ue]===e&&!i[J])return;let r;if(t==="message")r=function(n,o){let f=new ee("message",{data:o?n:n.toString()});f[H]=this,ce(e,this,f)};else if(t==="close")r=function(n,o){let f=new D("close",{code:n,reason:o.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});f[H]=this,ce(e,this,f)};else if(t==="error")r=function(n){let o=new Y("error",{error:n,message:n.message});o[H]=this,ce(e,this,o)};else if(t==="open")r=function(){let n=new L("open");n[H]=this,ce(e,this,n)};else return;r[J]=!!s[J],r[Ue]=e,s.once?this.once(t,r):this.on(t,r)},removeEventListener(t,e){for(let s of this.listeners(t))if(s[Ue]===e&&!s[J]){this.removeListener(t,s);break}}};St.exports={CloseEvent:D,ErrorEvent:Y,Event:L,EventTarget:ws,MessageEvent:ee};function ce(t,e,s){typeof t=="object"&&t.handleEvent?t.handleEvent.call(t,s):t.call(e,s)}});var ue=E((Ar,vt)=>{"use strict";d();var{tokenChars:te}=j();function T(t,e,s){t[e]===void 0?t[e]=[s]:t[e].push(s)}function Os(t){let e=Object.create(null),s=Object.create(null),r=!1,i=!1,n=!1,o,f,l=-1,a=-1,h=-1,c=0;for(;c<t.length;c++)if(a=t.charCodeAt(c),o===void 0)if(h===-1&&te[a]===1)l===-1&&(l=c);else if(c!==0&&(a===32||a===9))h===-1&&l!==-1&&(h=c);else if(a===59||a===44){if(l===-1)throw new SyntaxError(`Unexpected character at index ${c}`);h===-1&&(h=c);let y=t.slice(l,h);a===44?(T(e,y,s),s=Object.create(null)):o=y,l=h=-1}else throw new SyntaxError(`Unexpected character at index ${c}`);else if(f===void 0)if(h===-1&&te[a]===1)l===-1&&(l=c);else if(a===32||a===9)h===-1&&l!==-1&&(h=c);else if(a===59||a===44){if(l===-1)throw new SyntaxError(`Unexpected character at index ${c}`);h===-1&&(h=c),T(s,t.slice(l,h),!0),a===44&&(T(e,o,s),s=Object.create(null),o=void 0),l=h=-1}else if(a===61&&l!==-1&&h===-1)f=t.slice(l,c),l=h=-1;else throw new SyntaxError(`Unexpected character at index ${c}`);else if(i){if(te[a]!==1)throw new SyntaxError(`Unexpected character at index ${c}`);l===-1?l=c:r||(r=!0),i=!1}else if(n)if(te[a]===1)l===-1&&(l=c);else if(a===34&&l!==-1)n=!1,h=c;else if(a===92)i=!0;else throw new SyntaxError(`Unexpected character at index ${c}`);else if(a===34&&t.charCodeAt(c-1)===61)n=!0;else if(h===-1&&te[a]===1)l===-1&&(l=c);else if(l!==-1&&(a===32||a===9))h===-1&&(h=c);else if(a===59||a===44){if(l===-1)throw new SyntaxError(`Unexpected character at index ${c}`);h===-1&&(h=c);let y=t.slice(l,h);r&&(y=y.replace(/\\/g,""),r=!1),T(s,f,y),a===44&&(T(e,o,s),s=Object.create(null),o=void 0),f=void 0,l=h=-1}else throw new SyntaxError(`Unexpected character at index ${c}`);if(l===-1||n||a===32||a===9)throw new SyntaxError("Unexpected end of input");h===-1&&(h=c);let m=t.slice(l,h);return o===void 0?T(e,m,s):(f===void 0?T(s,m,!0):r?T(s,f,m.replace(/\\/g,"")):T(s,f,m),T(e,o,s)),e}function Ts(t){return Object.keys(t).map(e=>{let s=t[e];return Array.isArray(s)||(s=[s]),s.map(r=>[e].concat(Object.keys(r).map(i=>{let n=r[i];return Array.isArray(n)||(n=[n]),n.map(o=>o===!0?i:`${i}=${o}`).join("; ")})).join("; ")).join(", ")}).join(", ")}vt.exports={format:Ts,parse:Os}});var pe=E(($r,Ut)=>{"use strict";d();var ks=g("events"),Cs=g("https"),Ls=g("http"),Ot=g("net"),Ns=g("tls"),{randomBytes:Ps,createHash:Bs}=g("crypto"),{Duplex:qr,Readable:Gr}=g("stream"),{URL:Ie}=g("url"),R=$(),Rs=Ne(),Us=Re(),{isBlob:Is}=j(),{BINARY_TYPES:bt,CLOSE_TIMEOUT:Ds,EMPTY_BUFFER:de,GUID:Ms,kForOnEventAttribute:De,kListener:Fs,kStatusCode:As,kWebSocket:x,NOOP:Tt}=k(),{EventTarget:{addEventListener:Ws,removeEventListener:qs}}=Et(),{format:Gs,parse:$s}=ue(),{toBuffer:js}=Z(),kt=Symbol("kAborted"),Me=[8,13],N=["CONNECTING","OPEN","CLOSING","CLOSED"],Vs=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,_=class t extends ks{constructor(e,s,r){super(),this._binaryType=bt[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=de,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol="",this._readyState=t.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,e!==null?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,s===void 0?s=[]:Array.isArray(s)||(typeof s=="object"&&s!==null?(r=s,s=[]):s=[s]),Ct(this,e,s,r)):(this._autoPong=r.autoPong,this._closeTimeout=r.closeTimeout,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(e){bt.includes(e)&&(this._binaryType=e,this._receiver&&(this._receiver._binaryType=e))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(e,s,r){let i=new Rs({allowSynchronousEvents:r.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxBufferedChunks:r.maxBufferedChunks,maxFragments:r.maxFragments,maxPayload:r.maxPayload,skipUTF8Validation:r.skipUTF8Validation}),n=new Us(e,this._extensions,r.generateMask);this._receiver=i,this._sender=n,this._socket=e,i[x]=this,n[x]=this,e[x]=this,i.on("conclude",Ys),i.on("drain",Ks),i.on("error",Xs),i.on("message",Zs),i.on("ping",Qs),i.on("pong",Js),n.onerror=er,e.setTimeout&&e.setTimeout(0),e.setNoDelay&&e.setNoDelay(),s.length>0&&e.unshift(s),e.on("close",Pt),e.on("data",me),e.on("end",Bt),e.on("error",Rt),this._readyState=t.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=t.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[R.extensionName]&&this._extensions[R.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=t.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(e,s){if(this.readyState!==t.CLOSED){if(this.readyState===t.CONNECTING){v(this,this._req,"WebSocket was closed before the connection was established");return}if(this.readyState===t.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=t.CLOSING,this._sender.close(e,s,!this._isServer,r=>{r||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),Nt(this)}}pause(){this.readyState===t.CONNECTING||this.readyState===t.CLOSED||(this._paused=!0,this._socket.pause())}ping(e,s,r){if(this.readyState===t.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(r=e,e=s=void 0):typeof s=="function"&&(r=s,s=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==t.OPEN){Fe(this,e,r);return}s===void 0&&(s=!this._isServer),this._sender.ping(e||de,s,r)}pong(e,s,r){if(this.readyState===t.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(r=e,e=s=void 0):typeof s=="function"&&(r=s,s=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==t.OPEN){Fe(this,e,r);return}s===void 0&&(s=!this._isServer),this._sender.pong(e||de,s,r)}resume(){this.readyState===t.CONNECTING||this.readyState===t.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(e,s,r){if(this.readyState===t.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof s=="function"&&(r=s,s={}),typeof e=="number"&&(e=e.toString()),this.readyState!==t.OPEN){Fe(this,e,r);return}let i={binary:typeof e!="string",mask:!this._isServer,compress:!0,fin:!0,...s};this._extensions[R.extensionName]||(i.compress=!1),this._sender.send(e||de,i,r)}terminate(){if(this.readyState!==t.CLOSED){if(this.readyState===t.CONNECTING){v(this,this._req,"WebSocket was closed before the connection was established");return}this._socket&&(this._readyState=t.CLOSING,this._socket.destroy())}}};Object.defineProperty(_,"CONNECTING",{enumerable:!0,value:N.indexOf("CONNECTING")});Object.defineProperty(_.prototype,"CONNECTING",{enumerable:!0,value:N.indexOf("CONNECTING")});Object.defineProperty(_,"OPEN",{enumerable:!0,value:N.indexOf("OPEN")});Object.defineProperty(_.prototype,"OPEN",{enumerable:!0,value:N.indexOf("OPEN")});Object.defineProperty(_,"CLOSING",{enumerable:!0,value:N.indexOf("CLOSING")});Object.defineProperty(_.prototype,"CLOSING",{enumerable:!0,value:N.indexOf("CLOSING")});Object.defineProperty(_,"CLOSED",{enumerable:!0,value:N.indexOf("CLOSED")});Object.defineProperty(_.prototype,"CLOSED",{enumerable:!0,value:N.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(t=>{Object.defineProperty(_.prototype,t,{enumerable:!0})});["open","error","close","message"].forEach(t=>{Object.defineProperty(_.prototype,`on${t}`,{enumerable:!0,get(){for(let e of this.listeners(t))if(e[De])return e[Fs];return null},set(e){for(let s of this.listeners(t))if(s[De]){this.removeListener(t,s);break}typeof e=="function"&&this.addEventListener(t,e,{[De]:!0})}})});_.prototype.addEventListener=Ws;_.prototype.removeEventListener=qs;Ut.exports=_;function Ct(t,e,s,r){let i={allowSynchronousEvents:!0,autoPong:!0,closeTimeout:Ds,protocolVersion:Me[1],maxBufferedChunks:1048576,maxFragments:131072,maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...r,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(t._autoPong=i.autoPong,t._closeTimeout=i.closeTimeout,!Me.includes(i.protocolVersion))throw new RangeError(`Unsupported protocol version: ${i.protocolVersion} (supported versions: ${Me.join(", ")})`);let n;if(e instanceof Ie)n=e;else try{n=new Ie(e)}catch{throw new SyntaxError(`Invalid URL: ${e}`)}n.protocol==="http:"?n.protocol="ws:":n.protocol==="https:"&&(n.protocol="wss:"),t._url=n.href;let o=n.protocol==="wss:",f=n.protocol==="ws+unix:",l;if(n.protocol!=="ws:"&&!o&&!f?l=`The URL's protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"`:f&&!n.pathname?l="The URL's pathname is empty":n.hash&&(l="The URL contains a fragment identifier"),l){let u=new SyntaxError(l);if(t._redirects===0)throw u;_e(t,u);return}let a=o?443:80,h=Ps(16).toString("base64"),c=o?Cs.request:Ls.request,m=new Set,y;if(i.createConnection=i.createConnection||(o?Hs:zs),i.defaultPort=i.defaultPort||a,i.port=n.port||a,i.host=n.hostname.startsWith("[")?n.hostname.slice(1,-1):n.hostname,i.headers={...i.headers,"Sec-WebSocket-Version":i.protocolVersion,"Sec-WebSocket-Key":h,Connection:"Upgrade",Upgrade:"websocket"},i.path=n.pathname+n.search,i.timeout=i.handshakeTimeout,i.perMessageDeflate&&(y=new R({...i.perMessageDeflate,isServer:!1,maxPayload:i.maxPayload}),i.headers["Sec-WebSocket-Extensions"]=Gs({[R.extensionName]:y.offer()})),s.length){for(let u of s){if(typeof u!="string"||!Vs.test(u)||m.has(u))throw new SyntaxError("An invalid or duplicated subprotocol was specified");m.add(u)}i.headers["Sec-WebSocket-Protocol"]=s.join(",")}if(i.origin&&(i.protocolVersion<13?i.headers["Sec-WebSocket-Origin"]=i.origin:i.headers.Origin=i.origin),(n.username||n.password)&&(i.auth=`${n.username}:${n.password}`),f){let u=i.path.split(":");i.socketPath=u[0],i.path=u[1]}let p;if(i.followRedirects){if(t._redirects===0){t._originalIpc=f,t._originalSecure=o,t._originalHostOrSocketPath=f?i.socketPath:n.host;let u=r&&r.headers;if(r={...r,headers:{}},u)for(let[S,A]of Object.entries(u))r.headers[S.toLowerCase()]=A}else if(t.listenerCount("redirect")===0){let u=f?t._originalIpc?i.socketPath===t._originalHostOrSocketPath:!1:t._originalIpc?!1:n.host===t._originalHostOrSocketPath;(!u||t._originalSecure&&!o)&&(delete i.headers.authorization,delete i.headers.cookie,u||delete i.headers.host,i.auth=void 0)}i.auth&&!r.headers.authorization&&(r.headers.authorization="Basic "+Buffer.from(i.auth).toString("base64")),p=t._req=c(i),t._redirects&&t.emit("redirect",t.url,p)}else p=t._req=c(i);i.timeout&&p.on("timeout",()=>{v(t,p,"Opening handshake has timed out")}),p.on("error",u=>{p===null||p[kt]||(p=t._req=null,_e(t,u))}),p.on("response",u=>{let S=u.headers.location,A=u.statusCode;if(S&&i.followRedirects&&A>=300&&A<400){if(++t._redirects>i.maxRedirects){v(t,p,"Maximum redirects exceeded");return}p.abort();let K;try{K=new Ie(S,e)}catch{let W=new SyntaxError(`Invalid URL: ${S}`);_e(t,W);return}Ct(t,K,s,r)}else t.emit("unexpected-response",p,u)||v(t,p,`Unexpected server response: ${u.statusCode}`)}),p.on("upgrade",(u,S,A)=>{if(t.emit("upgrade",u),t.readyState!==_.CONNECTING)return;p=t._req=null;let K=u.headers.upgrade;if(K===void 0||K.toLowerCase()!=="websocket"){v(t,S,"Invalid Upgrade header");return}let qe=Bs("sha1").update(h+Ms).digest("base64");if(u.headers["sec-websocket-accept"]!==qe){v(t,S,"Invalid Sec-WebSocket-Accept header");return}let W=u.headers["sec-websocket-protocol"],X;if(W!==void 0?m.size?m.has(W)||(X="Server sent an invalid subprotocol"):X="Server sent a subprotocol but none was requested":m.size&&(X="Server sent no subprotocol"),X){v(t,S,X);return}W&&(t._protocol=W);let Ge=u.headers["sec-websocket-extensions"];if(Ge!==void 0){if(!y){v(t,S,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let ye;try{ye=$s(Ge)}catch{v(t,S,"Invalid Sec-WebSocket-Extensions header");return}let $e=Object.keys(ye);if($e.length!==1||$e[0]!==R.extensionName){v(t,S,"Server indicated an extension that was not requested");return}try{y.accept(ye[R.extensionName])}catch{v(t,S,"Invalid Sec-WebSocket-Extensions header");return}t._extensions[R.extensionName]=y}t.setSocket(S,A,{allowSynchronousEvents:i.allowSynchronousEvents,generateMask:i.generateMask,maxBufferedChunks:i.maxBufferedChunks,maxFragments:i.maxFragments,maxPayload:i.maxPayload,skipUTF8Validation:i.skipUTF8Validation})}),i.finishRequest?i.finishRequest(p,t):p.end()}function _e(t,e){t._readyState=_.CLOSING,t._errorEmitted=!0,t.emit("error",e),t.emitClose()}function zs(t){return t.path=t.socketPath,Ot.connect(t)}function Hs(t){return t.path=void 0,!t.servername&&t.servername!==""&&(t.servername=Ot.isIP(t.host)?"":t.host),Ns.connect(t)}function v(t,e,s){t._readyState=_.CLOSING;let r=new Error(s);Error.captureStackTrace(r,v),e.setHeader?(e[kt]=!0,e.abort(),e.socket&&!e.socket.destroyed&&e.socket.destroy(),process.nextTick(_e,t,r)):(e.destroy(r),e.once("error",t.emit.bind(t,"error")),e.once("close",t.emitClose.bind(t)))}function Fe(t,e,s){if(e){let r=Is(e)?e.size:js(e).length;t._socket?t._sender._bufferedBytes+=r:t._bufferedAmount+=r}if(s){let r=new Error(`WebSocket is not open: readyState ${t.readyState} (${N[t.readyState]})`);process.nextTick(s,r)}}function Ys(t,e){let s=this[x];s._closeFrameReceived=!0,s._closeMessage=e,s._closeCode=t,s._socket[x]!==void 0&&(s._socket.removeListener("data",me),process.nextTick(Lt,s._socket),t===1005?s.close():s.close(t,e))}function Ks(){let t=this[x];t.isPaused||t._socket.resume()}function Xs(t){let e=this[x];e._socket[x]!==void 0&&(e._socket.removeListener("data",me),process.nextTick(Lt,e._socket),e.close(t[As])),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",t))}function wt(){this[x].emitClose()}function Zs(t,e){this[x].emit("message",t,e)}function Qs(t){let e=this[x];e._autoPong&&e.pong(t,!this._isServer,Tt),e.emit("ping",t)}function Js(t){this[x].emit("pong",t)}function Lt(t){t.resume()}function er(t){let e=this[x];e.readyState!==_.CLOSED&&(e.readyState===_.OPEN&&(e._readyState=_.CLOSING,Nt(e)),this._socket.end(),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",t)))}function Nt(t){t._closeTimer=setTimeout(t._socket.destroy.bind(t._socket),t._closeTimeout)}function Pt(){let t=this[x];if(this.removeListener("close",Pt),this.removeListener("data",me),this.removeListener("end",Bt),t._readyState=_.CLOSING,!this._readableState.endEmitted&&!t._closeFrameReceived&&!t._receiver._writableState.errorEmitted&&this._readableState.length!==0){let e=this.read(this._readableState.length);t._receiver.write(e)}t._receiver.end(),this[x]=void 0,clearTimeout(t._closeTimer),t._receiver._writableState.finished||t._receiver._writableState.errorEmitted?t.emitClose():(t._receiver.on("error",wt),t._receiver.on("finish",wt))}function me(t){this[x]._receiver.write(t)||this.pause()}function Bt(){let t=this[x];t._readyState=_.CLOSING,t._receiver.end(),this.end()}function Rt(){let t=this[x];this.removeListener("error",Rt),this.on("error",Tt),t&&(t._readyState=_.CLOSING,this.destroy())}});var Ft=E((zr,Mt)=>{"use strict";d();var Vr=pe(),{Duplex:tr}=g("stream");function It(t){t.emit("close")}function sr(){!this.destroyed&&this._writableState.finished&&this.destroy()}function Dt(t){this.removeListener("error",Dt),this.destroy(),this.listenerCount("error")===0&&this.emit("error",t)}function rr(t,e){let s=!0,r=new tr({...e,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return t.on("message",function(n,o){let f=!o&&r._readableState.objectMode?n.toString():n;r.push(f)||t.pause()}),t.once("error",function(n){r.destroyed||(s=!1,r.destroy(n))}),t.once("close",function(){r.destroyed||r.push(null)}),r._destroy=function(i,n){if(t.readyState===t.CLOSED){n(i),process.nextTick(It,r);return}let o=!1;t.once("error",function(l){o=!0,n(l)}),t.once("close",function(){o||n(i),process.nextTick(It,r)}),s&&t.terminate()},r._final=function(i){if(t.readyState===t.CONNECTING){t.once("open",function(){r._final(i)});return}t._socket!==null&&(t._socket._writableState.finished?(i(),r._readableState.endEmitted&&r.destroy()):(t._socket.once("finish",function(){i()}),t.close()))},r._read=function(){t.isPaused&&t.resume()},r._write=function(i,n,o){if(t.readyState===t.CONNECTING){t.once("open",function(){r._write(i,n,o)});return}t.send(i,o)},r.on("end",sr),r.on("error",Dt),r}Mt.exports=rr});var Ae=E((Yr,At)=>{"use strict";d();var{tokenChars:ir}=j();function nr(t){let e=new Set,s=-1,r=-1,i=0;for(i;i<t.length;i++){let o=t.charCodeAt(i);if(r===-1&&ir[o]===1)s===-1&&(s=i);else if(i!==0&&(o===32||o===9))r===-1&&s!==-1&&(r=i);else if(o===44){if(s===-1)throw new SyntaxError(`Unexpected character at index ${i}`);r===-1&&(r=i);let f=t.slice(s,r);if(e.has(f))throw new SyntaxError(`The "${f}" subprotocol is duplicated`);e.add(f),s=r=-1}else throw new SyntaxError(`Unexpected character at index ${i}`)}if(s===-1||r!==-1)throw new SyntaxError("Unexpected end of input");let n=t.slice(s,i);if(e.has(n))throw new SyntaxError(`The "${n}" subprotocol is duplicated`);return e.add(n),e}At.exports={parse:nr}});var zt=E((Zr,Vt)=>{"use strict";d();var or=g("events"),ge=g("http"),{Duplex:Xr}=g("stream"),{createHash:ar}=g("crypto"),Wt=ue(),M=$(),fr=Ae(),lr=pe(),{CLOSE_TIMEOUT:hr,GUID:cr,kWebSocket:ur}=k(),dr=/^[+/0-9A-Za-z]{22}==$/,qt=0,Gt=1,jt=2,We=class extends or{constructor(e,s){if(super(),e={allowSynchronousEvents:!0,autoPong:!0,maxBufferedChunks:1024*1024,maxFragments:128*1024,maxPayload:100*1024*1024,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,closeTimeout:hr,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:lr,...e},e.port==null&&!e.server&&!e.noServer||e.port!=null&&(e.server||e.noServer)||e.server&&e.noServer)throw new TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(e.port!=null?(this._server=ge.createServer((r,i)=>{let n=ge.STATUS_CODES[426];i.writeHead(426,{"Content-Length":n.length,"Content-Type":"text/plain"}),i.end(n)}),this._server.listen(e.port,e.host,e.backlog,s)):e.server&&(this._server=e.server),this._server){let r=this.emit.bind(this,"connection");this._removeListeners=_r(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(i,n,o)=>{this.handleUpgrade(i,n,o,r)}})}e.perMessageDeflate===!0&&(e.perMessageDeflate={}),e.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=e,this._state=qt}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(e){if(this._state===jt){e&&this.once("close",()=>{e(new Error("The server is not running"))}),process.nextTick(se,this);return}if(e&&this.once("close",e),this._state!==Gt)if(this._state=Gt,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients?this.clients.size?this._shouldEmitClose=!0:process.nextTick(se,this):process.nextTick(se,this);else{let s=this._server;this._removeListeners(),this._removeListeners=this._server=null,s.close(()=>{se(this)})}}shouldHandle(e){if(this.options.path){let s=e.url.indexOf("?");if((s!==-1?e.url.slice(0,s):e.url)!==this.options.path)return!1}return!0}handleUpgrade(e,s,r,i){s.on("error",$t);let n=e.headers["sec-websocket-key"],o=e.headers.upgrade,f=+e.headers["sec-websocket-version"];if(e.method!=="GET"){F(this,e,s,405,"Invalid HTTP method");return}if(o===void 0||o.toLowerCase()!=="websocket"){F(this,e,s,400,"Invalid Upgrade header");return}if(n===void 0||!dr.test(n)){F(this,e,s,400,"Missing or invalid Sec-WebSocket-Key header");return}if(f!==13&&f!==8){F(this,e,s,400,"Missing or invalid Sec-WebSocket-Version header",{"Sec-WebSocket-Version":"13, 8"});return}if(!this.shouldHandle(e)){re(s,400);return}let l=e.headers["sec-websocket-protocol"],a=new Set;if(l!==void 0)try{a=fr.parse(l)}catch{F(this,e,s,400,"Invalid Sec-WebSocket-Protocol header");return}let h=e.headers["sec-websocket-extensions"],c={};if(this.options.perMessageDeflate&&h!==void 0){let m=new M({...this.options.perMessageDeflate,isServer:!0,maxPayload:this.options.maxPayload});try{let y=Wt.parse(h);y[M.extensionName]&&(m.accept(y[M.extensionName]),c[M.extensionName]=m)}catch{F(this,e,s,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let m={origin:e.headers[`${f===8?"sec-websocket-origin":"origin"}`],secure:!!(e.socket.authorized||e.socket.encrypted),req:e};if(this.options.verifyClient.length===2){this.options.verifyClient(m,(y,p,u,S)=>{if(!y)return re(s,p||401,u,S);this.completeUpgrade(c,n,a,e,s,r,i)});return}if(!this.options.verifyClient(m))return re(s,401)}this.completeUpgrade(c,n,a,e,s,r,i)}completeUpgrade(e,s,r,i,n,o,f){if(!n.readable||!n.writable)return n.destroy();if(n[ur])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>qt)return re(n,503);let a=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${ar("sha1").update(s+cr).digest("base64")}`],h=new this.options.WebSocket(null,void 0,this.options);if(r.size){let c=this.options.handleProtocols?this.options.handleProtocols(r,i):r.values().next().value;c&&(a.push(`Sec-WebSocket-Protocol: ${c}`),h._protocol=c)}if(e[M.extensionName]){let c=e[M.extensionName].params,m=Wt.format({[M.extensionName]:[c]});a.push(`Sec-WebSocket-Extensions: ${m}`),h._extensions=e}this.emit("headers",a,i),n.write(a.concat(`\r
|
|
2
2
|
`).join(`\r
|
|
3
3
|
`)),n.removeListener("error",$t),h.setSocket(n,o,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxBufferedChunks:this.options.maxBufferedChunks,maxFragments:this.options.maxFragments,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(h),h.on("close",()=>{this.clients.delete(h),this._shouldEmitClose&&!this.clients.size&&process.nextTick(se,this)})),f(h,i)}};Vt.exports=We;function _r(t,e){for(let s of Object.keys(e))t.on(s,e[s]);return function(){for(let r of Object.keys(e))t.removeListener(r,e[r])}}function se(t){t._state=jt,t.emit("close")}function $t(){this.destroy()}function re(t,e,s,r){s=s||ge.STATUS_CODES[e],r={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(s),...r},t.once("finish",t.destroy),t.end(`HTTP/1.1 ${e} ${ge.STATUS_CODES[e]}\r
|
|
4
4
|
`+Object.keys(r).map(i=>`${i}: ${r[i]}`).join(`\r
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as X}from"./chunk-
|
|
1
|
+
import{a as X}from"./chunk-CRALWNNO.js";import{a as x,c as O,g as p}from"./chunk-VKWPEFWQ.js";var q=O((Re,j)=>{p();var w=1e3,v=w*60,E=v*60,y=E*24,ee=y*7,re=y*365.25;j.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return te(e);if(r==="number"&&isFinite(e))return t.long?se(e):ne(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function te(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),o=(t[2]||"ms").toLowerCase();switch(o){case"years":case"year":case"yrs":case"yr":case"y":return r*re;case"weeks":case"week":case"w":return r*ee;case"days":case"day":case"d":return r*y;case"hours":case"hour":case"hrs":case"hr":case"h":return r*E;case"minutes":case"minute":case"mins":case"min":case"m":return r*v;case"seconds":case"second":case"secs":case"sec":case"s":return r*w;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function ne(e){var t=Math.abs(e);return t>=y?Math.round(e/y)+"d":t>=E?Math.round(e/E)+"h":t>=v?Math.round(e/v)+"m":t>=w?Math.round(e/w)+"s":e+"ms"}function se(e){var t=Math.abs(e);return t>=y?T(e,t,y,"day"):t>=E?T(e,t,E,"hour"):t>=v?T(e,t,v,"minute"):t>=w?T(e,t,w,"second"):e+" ms"}function T(e,t,r,o){var l=t>=r*1.5;return Math.round(e/r)+" "+o+(l?"s":"")}});var k=O((Te,G)=>{p();function oe(e){r.debug=r,r.default=r,r.coerce=W,r.disable=F,r.enable=l,r.enabled=J,r.humanize=q(),r.destroy=Z,Object.keys(e).forEach(n=>{r[n]=e[n]}),r.names=[],r.skips=[],r.formatters={};function t(n){let s=0;for(let i=0;i<n.length;i++)s=(s<<5)-s+n.charCodeAt(i),s|=0;return r.colors[Math.abs(s)%r.colors.length]}r.selectColor=t;function r(n){let s,i=null,a,b;function f(...d){if(!f.enabled)return;let g=f,I=Number(new Date),H=I-(s||I);g.diff=H,g.prev=s,g.curr=I,s=I,d[0]=r.coerce(d[0]),typeof d[0]!="string"&&d.unshift("%O");let R=0;d[0]=d[0].replace(/%([a-zA-Z%])/g,(N,K)=>{if(N==="%%")return"%";R++;let D=r.formatters[K];if(typeof D=="function"){let Q=d[R];N=D.call(g,Q),d.splice(R,1),R--}return N}),r.formatArgs.call(g,d),(g.log||r.log).apply(g,d)}return f.namespace=n,f.useColors=r.useColors(),f.color=r.selectColor(n),f.extend=o,f.destroy=r.destroy,Object.defineProperty(f,"enabled",{enumerable:!0,configurable:!1,get:()=>i!==null?i:(a!==r.namespaces&&(a=r.namespaces,b=r.enabled(n)),b),set:d=>{i=d}}),typeof r.init=="function"&&r.init(f),f}function o(n,s){let i=r(this.namespace+(typeof s>"u"?":":s)+n);return i.log=this.log,i}function l(n){r.save(n),r.namespaces=n,r.names=[],r.skips=[];let s=(typeof n=="string"?n:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let i of s)i[0]==="-"?r.skips.push(i.slice(1)):r.names.push(i)}function m(n,s){let i=0,a=0,b=-1,f=0;for(;i<n.length;)if(a<s.length&&(s[a]===n[i]||s[a]==="*"))s[a]==="*"?(b=a,f=i,a++):(i++,a++);else if(b!==-1)a=b+1,f++,i=f;else return!1;for(;a<s.length&&s[a]==="*";)a++;return a===s.length}function F(){let n=[...r.names,...r.skips.map(s=>"-"+s)].join(",");return r.enable(""),n}function J(n){for(let s of r.skips)if(m(n,s))return!1;for(let s of r.names)if(m(n,s))return!0;return!1}function W(n){return n instanceof Error?n.stack||n.message:n}function Z(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}G.exports=oe});var U=O((C,A)=>{p();C.formatArgs=ce;C.save=ue;C.load=ae;C.useColors=ie;C.storage=le();C.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();C.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function ie(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function ce(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+A.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,o=0;e[0].replace(/%[a-zA-Z%]/g,l=>{l!=="%%"&&(r++,l==="%c"&&(o=r))}),e.splice(o,0,t)}C.log=console.debug||console.log||(()=>{});function ue(e){try{e?C.storage.setItem("debug",e):C.storage.removeItem("debug")}catch{}}function ae(){let e;try{e=C.storage.getItem("debug")||C.storage.getItem("DEBUG")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function le(){try{return localStorage}catch{}}A.exports=k()(C);var{formatters:fe}=A.exports;fe.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var z=O((_e,Y)=>{"use strict";p();var Ce=x("os"),P=x("tty"),h=X(),{env:c}=process,M;h("no-color")||h("no-colors")||h("color=false")||h("color=never")?M=0:(h("color")||h("colors")||h("color=true")||h("color=always"))&&(M=1);function de(){if("FORCE_COLOR"in c)return c.FORCE_COLOR==="true"?1:c.FORCE_COLOR==="false"?0:c.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(c.FORCE_COLOR,10),3)}function pe(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function he(e,{streamIsTTY:t,sniffFlags:r=!0}={}){let o=de();o!==void 0&&(M=o);let l=r?M:o;if(l===0)return 0;if(r){if(h("color=16m")||h("color=full")||h("color=truecolor"))return 3;if(h("color=256"))return 2}if(e&&!t&&l===void 0)return 0;let m=l||0;if(c.TERM==="dumb")return m;if(process.platform==="win32"){let F=Ce.release().split(".");return Number(F[0])>=10&&Number(F[2])>=10586?Number(F[2])>=14931?3:2:1}if("CI"in c)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(F=>F in c)||c.CI_NAME==="codeship"?1:m;if("TEAMCITY_VERSION"in c)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(c.TEAMCITY_VERSION)?1:0;if(c.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in c){let F=Number.parseInt((c.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(c.TERM_PROGRAM){case"iTerm.app":return F>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(c.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(c.TERM)||"COLORTERM"in c?1:m}function B(e,t={}){let r=he(e,{streamIsTTY:e&&e.isTTY,...t});return pe(r)}Y.exports={supportsColor:B,stdout:B({isTTY:P.isatty(1)}),stderr:B({isTTY:P.isatty(2)})}});var V=O((u,L)=>{p();var me=x("tty"),_=x("util");u.init=ve;u.log=be;u.formatArgs=ge;u.save=Oe;u.load=we;u.useColors=Fe;u.destroy=_.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");u.colors=[6,2,3,4,5,1];try{let e=z();e&&(e.stderr||e).level>=2&&(u.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}u.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(l,m)=>m.toUpperCase()),o=process.env[t];return/^(yes|on|true|enabled)$/i.test(o)?o=!0:/^(no|off|false|disabled)$/i.test(o)?o=!1:o==="null"?o=null:o=Number(o),e[r]=o,e},{});function Fe(){return"colors"in u.inspectOpts?!!u.inspectOpts.colors:me.isatty(process.stderr.fd)}function ge(e){let{namespace:t,useColors:r}=this;if(r){let o=this.color,l="\x1B[3"+(o<8?o:"8;5;"+o),m=` ${l};1m${t} \x1B[0m`;e[0]=m+e[0].split(`
|
|
2
2
|
`).join(`
|
|
3
3
|
`+m),e.push(l+"m+"+L.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=ye()+t+" "+e[0]}function ye(){return u.inspectOpts.hideDate?"":new Date().toISOString()+" "}function be(...e){return process.stderr.write(_.formatWithOptions(u.inspectOpts,...e)+`
|
|
4
4
|
`)}function Oe(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function we(){return process.env.DEBUG}function ve(e){e.inspectOpts={};let t=Object.keys(u.inspectOpts);for(let r=0;r<t.length;r++)e.inspectOpts[t[r]]=u.inspectOpts[t[r]]}L.exports=k()(u);var{formatters:$}=L.exports;$.o=function(e){return this.inspectOpts.colors=this.useColors,_.inspect(e,this.inspectOpts).split(`
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as B,b as E}from"./chunk-UYK6CXAU.js";import{b as y,c as A,l as C,n as F,o as S,t as x}from"./chunk-AY4GIVME.js";import{a as D}from"./chunk-HM5H7WBE.js";import{a as w}from"./chunk-ZAMDXIVC.js";import{z as f}from"./chunk-5W443CKL.js";import{b as O}from"./chunk-H5C3QTOO.js";import{u as l,v as k,w as b,x as g}from"./chunk-6EZ7JWBK.js";import{Fb as h,Hb as I}from"./chunk-DONEJHDG.js";import{r as _}from"./chunk-T6CC5WUU.js";import{e as z,g as s}from"./chunk-VKWPEFWQ.js";s();s();async function T(n){let{organization:a,storeFqdn:o,operationId:r,remoteApp:u}=n;l({headline:"Canceling bulk operation.",body:[{list:{items:[`ID: ${r}`,...E({organization:a,remoteApp:u,storeFqdn:o})]}}]});let v=await B(u,o),p=await C({adminSession:v,operationId:r});if(p?.userErrors?.length){F(p.userErrors,"Failed to cancel bulk operation.");return}let i=p?.bulkOperation;if(i){let t=S(i),d=i.status==="CANCELING"?[`This may take a few moments. Check the status with:
|
|
2
|
+
`,{command:`shopify app bulk status --id=${A(i.id)}`}]:t.body,c={headline:t.headline,...d&&{body:d},...t.customSections&&{customSections:t.customSections}};switch(t.renderType){case"success":k(c);break;case"warning":b(c);break;case"info":l(c);break}}else g({headline:"Bulk operation not found or could not be canceled.",body:I`ID: ${h.yellow(r)}`.value})}var m=z(_(),1);var q,e=class extends D{async run(){let{flags:a}=await this.parse(q),{appContextResult:o,store:r}=await x(a);return await T({organization:o.organization,storeFqdn:r.shopDomain,operationId:y(a.id),remoteApp:o.remoteApp}),{app:o.app}}};q=e;e.summary="Cancel a bulk operation.";e.description="Cancels a running bulk operation by ID.";e.flags={...O,...w,id:m.Flags.string({description:"The bulk operation ID to cancel (numeric ID or full GID).",env:"SHOPIFY_FLAG_ID",required:!0}),store:m.Flags.string({char:"s",description:"The store domain. Must be an existing dev store.",env:"SHOPIFY_FLAG_STORE",parse:async n=>f(n)})};var K=e;export{K as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as c}from"./chunk-AY4GIVME.js";import{R as s}from"./chunk-5W443CKL.js";import{d as p,g as a}from"./chunk-WKBVT5WG.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();async function v(e,t){let o=e.apiSecretKeys[0]?.secret;if(!o)throw new a("No API secret keys found for app");return s(t,e.apiKey,o)}function y(e){let{organization:t,remoteApp:o,storeFqdn:u,version:r}=e,n=[`Organization: ${t.businessName}`,`App: ${o.title}`,`Store: ${u}`];return r&&n.push(`API version: ${r}`),n}function S(e,t){if(c(e)&&t.storeType!=="APP_DEVELOPMENT")throw new p("Mutations can only be executed on dev stores.")}export{v as a,y as b,S as c};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as D}from"./chunk-
|
|
1
|
+
import{a as D}from"./chunk-HA6NISOZ.js";import{b as ne,c as re}from"./chunk-7UOPCYMV.js";import{c as ee,d as te}from"./chunk-5JNEWYD5.js";import{A as T}from"./chunk-6RL7FUPD.js";import{a as Z}from"./chunk-HM5H7WBE.js";import{a as Q}from"./chunk-ZAMDXIVC.js";import{Fa as X}from"./chunk-ATXODH6C.js";import{b as Y,c as V}from"./chunk-H5C3QTOO.js";import{B as q,a as S,i as K,j as U,k as b,p as C}from"./chunk-6EZ7JWBK.js";import{a as J}from"./chunk-FPLUMESQ.js";import{d as M}from"./chunk-WKBVT5WG.js";import{eb as O,fb as l,gb as s,ib as j,jb as G,kb as H,ma as N}from"./chunk-DONEJHDG.js";import{f as z}from"./chunk-KKUDXLK2.js";import{d as I}from"./chunk-773TIA5M.js";import{r as ye}from"./chunk-T6CC5WUU.js";import{e as R,g as c}from"./chunk-VKWPEFWQ.js";c();c();c();c();c();var y=R(O(),1);import{Writable as oe}from"stream";function ie({selectedRun:e,abortController:t,app:o,extension:r,appWatcher:i}){let a={type:"functionRun",input:e.payload.input,output:e.payload.output,logs:e.payload.logs,name:e.source,size:0,memory_usage:0,instructions:e.payload.fuelConsumed},[u,f]=(0,y.useState)([]),[p,m]=(0,y.useState)([a,a]),[w,d]=(0,y.useState)(void 0),{input:E,export:$}=e.payload,[fe,L]=(0,y.useState)(`Watching for changes to ${e.source}...`);return(0,y.useEffect)(()=>{let A=new S;t.signal.addEventListener("abort",()=>{A.abort()});let B=async()=>{let F=await we(r,JSON.stringify(E),$);m(h=>[F,h[0]]),L(`Watching for changes to ${e.source}...`),f(h=>[...h,F])},de=async()=>{L("Replaying log with local function..."),await B()},ge=async()=>{i.onEvent(async h=>{let x=h.extensionEvents.find(v=>v.extension.handle===r.handle);if(!(!x||x.type!==ee.Updated)){if(x.buildResult?.status==="error"){d(`Error while reloading and building extension: ${x.buildResult?.error}`);return}d(void 0),L("Re-running with latest changes..."),await B()}});let F=new oe({write(h,x,v){f(he=>[...he,{type:"systemMessage",message:h.toString()}]),v()}});await i.start({stdout:F,stderr:F,signal:A.signal},!1)};return de().then(()=>{ge()}),()=>{A.abort()}},[E,$,o,r]),C(t.signal,async()=>{setTimeout(()=>{z()||J(process.pid,"SIGINT",!1,()=>{process.exit(0)})},2e3)}),{logs:u,statusMessage:fe,recentFunctionRuns:p,error:w}}async function we(e,t,o){let r="",i=new oe({write(u,f,p){r+=u,p()}});return await D({functionExtension:e,input:t,export:o,stdout:i,json:!0}),{...JSON.parse(r),type:"functionRun"}}var n=R(O(),1);var ae=({selectedRun:e,abortController:t,app:o,extension:r})=>{let{isAborted:i}=C(t.signal),{isRawModeSupported:a}=G(),u=new te(o),{logs:f,statusMessage:p,recentFunctionRuns:m,error:w}=ie({selectedRun:e,abortController:t,app:o,extension:r,appWatcher:u});return H((d,E)=>{U(d,E,()=>t.abort()),d==="q"&&t.abort()},{isActive:!!a}),n.default.createElement(n.default.Fragment,null,n.default.createElement(j,{items:f},(d,E)=>n.default.createElement(l,{key:`replayOutputScrollerLog${E}`,flexDirection:"column"},n.default.createElement(Se,{log:d}))),i?null:n.default.createElement(l,{marginY:1,paddingTop:1,flexDirection:"column",flexGrow:1,borderStyle:"single",borderBottom:!1,borderLeft:!1,borderRight:!1,borderTop:!0},a?n.default.createElement(l,{flexDirection:"column"},n.default.createElement(l,{flexDirection:"row"},n.default.createElement(s,null,b.pointerSmall," ",p)),n.default.createElement(Re,{recentFunctionRuns:m}),n.default.createElement(s,null,b.pointerSmall," Press ",n.default.createElement(s,{bold:!0},"q")," ",b.lineVertical," quit")):null,w?n.default.createElement(s,{color:"red"},w):null))};function k({title:e,backgroundColor:t}){let o=Math.max(Math.round((28-e.length)/2),0),r=" ".repeat(o);return n.default.createElement(s,{backgroundColor:t,color:"black"},`
|
|
2
2
|
|
|
3
3
|
`,r,e,r,`
|
|
4
4
|
`)}function Ee({input:e}){return n.default.createElement(l,{flexDirection:"column"},n.default.createElement(k,{title:"Input",backgroundColor:"yellow"}),n.default.createElement(s,null,T(e)))}function Fe({logs:e}){return n.default.createElement(l,{flexDirection:"column"},n.default.createElement(k,{title:"Logs",backgroundColor:"blueBright"}),n.default.createElement(s,null,e))}function xe({output:e}){return n.default.createElement(l,{flexDirection:"column"},n.default.createElement(k,{title:"Output",backgroundColor:"greenBright"}),n.default.createElement(s,null,T(e)))}function be({functionRun:e}){return n.default.createElement(l,{flexDirection:"column"},n.default.createElement(k,{title:"Benchmark Results",backgroundColor:"green"}),n.default.createElement(s,null,"Name: ",e.name),n.default.createElement(s,null,"Linear Memory Usage: ",e.memory_usage,"KB"),n.default.createElement(s,null,"Instructions: ",e.instructions/1e3,"K"),n.default.createElement(s,null,"Size: ",e.size,"KB"))}function Re({recentFunctionRuns:e}){let t=e[0].instructions-e[1].instructions;return n.default.createElement(l,{flexDirection:"column"},n.default.createElement(s,null,b.pointerSmall," Instruction count change: ",t>0?"+":"",t))}function Se({log:e}){switch(e.type){case"functionRun":return n.default.createElement(l,{flexDirection:"column"},n.default.createElement(Ee,{input:e.input}),n.default.createElement(Fe,{logs:e.logs}),n.default.createElement(xe,{output:e.output}),n.default.createElement(be,{functionRun:e}),n.default.createElement(s,null,"\xA0"));case"systemMessage":return n.default.createElement(s,null,e.message);default:return null}}var se=R(O(),1);async function ce({selectedRun:e,abortController:t,app:o,extension:r}){return K(se.default.createElement(ae,{selectedRun:e,abortController:t,app:o,extension:r}),{exitOnCtrlC:!1})}c();async function le(e){if(e.length===0)return;let t=i=>({label:`${i.logTimestamp} (${i.status}) - ${i.identifier}`,value:i}),o=e.map(t);return await q({message:"Which function run would you like to replay locally?",choices:o})}import{existsSync as Ce,readdirSync as De}from"fs";var _=100;async function ue(e){let{watch:t,extension:o,app:r}=e,i=new S;try{let a=r.getLogsDir(),u=e.log?await ke(a,o.handle,e.log):await Ae(a,o.handle),{input:f,export:p}=u.payload;t?await ce({selectedRun:u,abortController:i,app:r,extension:o}):await D({functionExtension:o,json:e.json,input:JSON.stringify(f),export:p})}catch(a){throw i.abort(),a}}async function ke(e,t,o){let r=await Le(e,t,o);if(r===void 0)throw new M(`No log found for '${o}'.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{$ as z,la as j,ma as J,na as k,oa as W,pa as A,qa as q,ra as N,sa as B,ta as L,ua as K,va as R,wa as Q,xa as O,ya as Y}from"./chunk-
|
|
1
|
+
import{$ as z,la as j,ma as J,na as k,oa as W,pa as A,qa as q,ra as N,sa as B,ta as L,ua as K,va as R,wa as Q,xa as O,ya as Y}from"./chunk-ATXODH6C.js";import{f as v,i as X,p as c}from"./chunk-442S5SDM.js";import{c as G}from"./chunk-J2WCMQZZ.js";import{v as U,z as w}from"./chunk-6EZ7JWBK.js";import{d as E,f as $}from"./chunk-WKBVT5WG.js";import{$ as b,Hb as H,Ta as P,Y as a,qa as I,wa as D,ya as V}from"./chunk-DONEJHDG.js";import{d as C,j as F}from"./chunk-773TIA5M.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();s();function Z(e){switch(e){case d.Offsite:return k;case d.CreditCard:return R;case d.CustomCreditCard:return L;case d.CustomOnsite:return N;case d.Redeemable:return A;case d.CardPresent:return O}}var d;(function(e){e.Offsite="payments_app",e.CreditCard="payments_app_credit_card",e.CustomCreditCard="payments_app_custom_credit_card",e.CustomOnsite="payments_app_custom_onsite",e.Redeemable="payments_app_redeemable",e.CardPresent="payments_app_card_present"})(d||(d={}));function ee(e,t){let i=e.activeVersion?.context??e.draftVersion?.context??Z(e.type);switch(i){case k:return x(e,t,W);case R:return x(e,t,Q);case L:return x(e,t,K);case N:return x(e,t,B);case A:return x(e,t,q);case O:return x(e,t,Y);default:throw new Error(`Unsupported extension: ${i}`)}}function x(e,t,i){let o=(e.activeVersion??e.draftVersion)?.config;if(!o)throw new Error("No config found for extension");let r=JSON.parse(o),l=i(r,t);l&&delete l.api_version;let p=e.activeVersion?.context??e.draftVersion?.context??Z(e.type);return{api_version:r.api_version,extensions:[{name:e.title,type:"payments_extension",handle:a(e.title.substring(0,c)),...l,targeting:[{target:`${p}`}]}]}}s();s();var fe=new Map(J.map(e=>[e[1],e[0]])),ue=(e,t)=>{let i=fe.get(e.uiType);if(!i)throw new E(`Field type ${e.uiType} is not supported`);let n={key:e.name,description:e.description??void 0,type:i};return t==="flow_action_definition"&&(n.name=e.label,n.required=e.required),n},me=(e,t)=>{let o={type:t==="flow_action_definition"?`${e.name.replace("_id","")}_reference`:`${e.uiType}_reference`};return t==="flow_action_definition"&&(o.required=e.required),e.uiType==="marketing-activity-id"&&(o.marketingActivityCreateUrl=e.marketingActivityCreateUrl,o.marketingActivityDeleteUrl=e.marketingActivityDeleteUrl),o},te=(e,t)=>t?t.map(n=>n.uiType==="commerce-object-id"||n.uiType==="marketing-activity-id"||j.includes(n.uiType)?me(n,e):ue(n,e)):[];function ie(e){let t=e.activeVersion?.config??e.draftVersion?.config;if(!t)throw new Error("No config found for extension");let i=e.type==="flow_action_definition"?"https://url.com/api/execute":void 0,n;if(e.type==="flow_trigger_discovery_webhook"){let o=JSON.parse(t);n={extensions:[{type:"flow_trigger_lifecycle_callback",name:e.title,handle:a(e.title.substring(0,c)),url:o.url}]}}else{let o=JSON.parse(t),r=te(e.type,o.fields??[]);n={extensions:[{type:e.type.replace("_definition",""),name:o.title,handle:a(e.title.substring(0,c)),description:o.description,runtime_url:o.url??i,config_page_url:o.custom_configuration_page_url,config_page_preview_url:o.custom_configuration_page_preview_url,validation_url:o.validation_url}],settings:(r?.length??0)>0?{fields:r}:void 0}}return n}s();s();var ne=e=>{let t=e.split("#");if(t.length!==2||t.some(l=>l===""||l===void 0))throw new Error("Invalid context");let i="admin",n=ge(t[0]??""),o=de(t[1]??""),r="link";return o==="selection"?[i,`${n}-index`,`${o}-action`,r].join("."):[i,`${n}-${o}`,"action",r].join(".")},de=e=>{switch(e.toLocaleLowerCase()){case"show":return"details";case"index":return"index";case"action":return"selection";case"fulfilled_card":return"fulfilled-card";default:throw new Error(`Invalid context location: ${e}`)}},ge=e=>e.toLocaleLowerCase()==="variants"?"product-variant":b(e.toLocaleLowerCase().replace(new RegExp("(s)$"),""));function oe(e,t,i){let n=e.activeVersion?.config??e.draftVersion?.config;if(!n)throw new Error("No config found for extension");let o=e.activeVersion?.context??e.draftVersion?.context;if(!o)throw new Error("No context found for link extension");let r=JSON.parse(n);if(i.embedded)try{let p=new URL(r.url),f=p.pathname.startsWith("/")?p.pathname.substring(1):p.pathname,u=new URL(`app://${f}`);u.search=p.search,u.hash=p.hash,r.url=u.toString()}catch{}return{extensions:[{type:"admin_link",name:r.text,handle:a(e.title.substring(0,c)),targeting:[{url:r.url,target:ne(o)}]}]}}s();var _e={facebook:"social",instagram:"social",google:"search",pinterest:"social",bing:"search",email:"email",snapchat:"social",sms:"sms",verizon_media:"display",ebay:"marketplace",tiktok:"social",flow:"email"},ye={facebook:"facebook.com",instagram:"instagram.com",google:"google.com",pinterest:"pinterest.com",bing:"bing.com",snapchat:"snapchat.com",verizon_media:null,email:null,sms:null,ebay:"ebay.com",tiktok:"tiktok.com",flow:null};function Ce(e){let t=new URL(e);return t.pathname+t.search+t.hash}function re(e){let t=e.activeVersion?.config??e.draftVersion?.config;if(!t)throw new Error("No config found for extension");let i=JSON.parse(t);return{extensions:[{type:"marketing_activity",name:e.title,handle:a(e.title.substring(0,c)),title:i.title,description:i.description,api_path:Ce(i.app_api_url),tactic:i.tactic,marketing_channel:_e[i.platform]??"",referring_domain:ye[i.platform]??"",is_automation:i.is_automation,use_external_editor:i.use_external_editor,preview_data:i.preview_data,fields:i.fields.map(({id:o,...r})=>r)}]}}s();function se(e){let t=e.activeVersion?.config??e.draftVersion?.config;if(!t)throw new Error("No config found for extension");let i=JSON.parse(t);return{extensions:[{type:"subscription_link_extension",name:e.title,handle:a(e.title.substring(0,c)),pattern:i.pattern}]}}var S=[{label:"Payments Extensions",value:"payments",extensionTypes:["payments_app","payments_app_credit_card","payments_app_custom_credit_card","payments_app_custom_onsite","payments_app_redeemable","payments_extension"],buildExtensionConfig:ee},{label:"Flow Extensions",value:"flow",extensionTypes:["flow_action_definition","flow_trigger_definition","flow_trigger_discovery_webhook"],buildExtensionConfig:ie},{label:"Marketing Activity Extensions",value:"marketing activity",extensionTypes:["marketing_activity_extension"],buildExtensionConfig:re},{label:"Subscription Link Extensions",value:"subscription link",extensionTypes:["subscription_link","subscription_link_extension"],buildExtensionConfig:se},{label:"Admin Link extensions",value:"link extension",extensionTypes:["app_link","bulk_action"],buildExtensionConfig:oe}];function ae(e){return S.filter(t=>t.extensionTypes.some(i=>e.some(n=>n.type.toLowerCase()===i.toLowerCase())))}async function ut(e){if(e.length===1&&e[0])return e[0];let t=e.map(o=>({label:o.label,value:o.value})),i=await w({message:"Extension type to migrate",choices:t}),n=e.find(o=>o.value===i);if(n===void 0)throw new E("Invalid migration choice");return n}s();var kt=S.flatMap(e=>e.extensionTypes),g;(function(e){e.Write="write",e.Skip="skip",e.Cancel="cancel"})(g||(g={}));async function Ee({name:e,app:t}){let i=b(e),n=C(t.directory,X.extensions.directoryName,i);if(await P(n)){let o=[{label:"Overwrite local TOML with remote configuration",value:g.Write},{label:"Keep local TOML",value:g.Skip},{label:"Cancel",value:g.Cancel}],r=await w({message:`Directory "${i}" already exists. What would you like to do?`,choices:o});if(r===g.Cancel)throw new $;return{directory:n,action:r}}return await D(n),await I(C(n,v.lockFile)),{directory:n,action:g.Write}}async function xe(e){let{app:t,remoteApp:i,developerPlatformClient:n,extensionTypes:o,extensions:r,buildExtensionConfig:l,all:p}=e,f=r.filter(m=>o.includes(m.type.toLowerCase()));if(f=we(t,f),f.length===0)throw new E("No extensions to migrate");if(!p){let m=f.map(y=>({label:y.title,value:y.uuid}));f.length>1&&m.push({label:"All",value:"All"});let _=await w({message:"Extensions to migrate",choices:m});_!=="All"&&(f=[f.find(y=>y?.uuid===_)])}let u={},h=f.map(async m=>{let{directory:_,action:y}=await Ee({app:t,name:m.title}),ce=a(m.title.substring(0,c));if(u[ce]=m.uuid,y===g.Write){let M=l(m,r,t.configuration),le=C(_,"shopify.extension.toml");await new G(le,M).replace(M);let pe=C(_,v.lockFile);await V(pe)}return{extension:m,directory:C("extensions",F(_))}}),T=await Promise.all(h);be(T),await z({app:t,identifiers:{extensions:u,app:i.apiKey},command:"import-extensions",developerPlatformClient:n})}function we(e,t){let i=e.dotenv?.variables??{},n=e.allExtensions.map(o=>i[o.idEnvironmentVariableName]);return t.filter(o=>!n.includes(o.uuid))}async function At(e){let t=ae(e.extensions);await Promise.all(t.map(async i=>xe({...e,extensionTypes:i.extensionTypes,buildExtensionConfig:i.buildExtensionConfig,all:!0})))}function be(e){U({headline:["Imported the following extensions from the dashboard:"],body:e.map(t=>H`• "${t.extension.title}" at: ${t.directory}`.value).join(`
|
|
2
2
|
`)})}s();async function Rt({developerPlatformClient:e,apiKey:t,organizationId:i,extensionTypes:n,onlyDashboardManaged:o=!1}){let r=await e.appExtensionRegistrations({id:t,apiKey:t,organizationId:i}),{dashboardManagedExtensionRegistrations:l,extensionRegistrations:p}=r.app;return(o?l:p.concat(l)).filter(u=>{let h=n.includes(u.type.toLowerCase()),T=u.activeVersion&&u.activeVersion.config,m=u.draftVersion&&u.draftVersion.config;return h&&(T??m)})}export{ae as a,ut as b,kt as c,xe as d,we as e,At as f,Rt as g};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as Ur,d as Za,g as Vt}from"./chunk-
|
|
1
|
+
import{b as Ur,d as Za,g as Vt}from"./chunk-VKWPEFWQ.js";var Tu={};Za(Tu,{builders:()=>Ne,default:()=>Vr,printer:()=>Jt,utils:()=>Qt});function rs(e){return this[e<0?this.length+e:e]}function as(e){let t=e.length;for(;t>0&&(e[t-1]==="\r"||e[t-1]===`
|
|
2
2
|
`);)t--;return t<e.length?e.slice(0,t):e}function ss(e){if(typeof e=="string")return st;if(Array.isArray(e))return $e;if(!e)return;let{type:t}=e;if(Kr.has(t))return t}function Ds(e){let t=e===null?"null":typeof e;if(t!=="string"&&t!=="object")return`Unexpected doc '${t}',
|
|
3
3
|
Expected it to be 'string' or 'object'.`;if(Dt(e))throw new Error("doc is valid.");let u=Object.prototype.toString.call(e);if(u!=="[object Object]")return`Unexpected doc '${u}'.`;let r=os([...Kr].map(n=>`'${n}'`));return`Unexpected doc.type '${e.type}'.
|
|
4
4
|
Expected it to be ${r}.`}function ls(e,t,u,r){let n=[e];for(;n.length>0;){let i=n.pop();if(i===Gr){u(n.pop());continue}u&&n.push(i,Gr);let a=Dt(i);if(!a)throw new Ct(i);if(t?.(i)!==!1)switch(a){case $e:case Xe:{let s=a===$e?i:i.parts;for(let o=s.length,D=o-1;D>=0;--D)n.push(s[D]);break}case we:n.push(i.flatContents,i.breakContents);break;case be:if(r&&i.expandedStates)for(let s=i.expandedStates.length,o=s-1;o>=0;--o)n.push(i.expandedStates[o]);else n.push(i.contents);break;case We:case qe:case Ke:case Je:case Ye:n.push(i.contents);break;case st:case ot:case Ve:case ze:case ve:case Ie:break;default:throw new Ct(i)}}}function zt(e,t){if(typeof e=="string")return t(e);let u=new Map;return r(e);function r(i){if(u.has(i))return u.get(i);let a=n(i);return u.set(i,a),a}function n(i){switch(Dt(i)){case $e:return t(i.map(r));case Xe:return t({...i,parts:i.parts.map(r)});case we:return t({...i,breakContents:r(i.breakContents),flatContents:r(i.flatContents)});case be:{let{expandedStates:a,contents:s}=i;return a?(a=a.map(r),s=a[0]):s=r(s),t({...i,contents:s,expandedStates:a})}case We:case qe:case Ke:case Je:case Ye:return t({...i,contents:r(i.contents)});case st:case ot:case Ve:case ze:case ve:case Ie:return t(i);default:throw new Ct(i)}}}function wu(e,t,u){let r=u,n=!1;function i(a){if(n)return!1;let s=t(a);s!==void 0&&(n=!0,r=s)}return Su(e,i),r}function fs(e){if(e.type===be&&e.break||e.type===ve&&e.hard||e.type===Ie)return!0}function ds(e){return wu(e,fs,!1)}function qr(e){if(e.length>0){let t=je(0,e,-1);!t.expandedStates&&!t.break&&(t.break="propagated")}return null}function hs(e){let t=new Set,u=[];function r(i){if(i.type===Ie&&qr(u),i.type===be){if(u.push(i),t.has(i))return!1;t.add(i)}}function n(i){i.type===be&&u.pop().break&&qr(u)}Su(e,r,n,!0)}function Fs(e){return e.type===ve&&!e.hard?e.soft?"":" ":e.type===we?e.flatContents:e}function ps(e){return zt(e,Fs)}function Wr(e){for(e=[...e];e.length>=2&&je(0,e,-2).type===ve&&je(0,e,-1).type===Ie;)e.length-=2;if(e.length>0){let t=Tt(je(0,e,-1));e[e.length-1]=t}return e}function Tt(e){switch(Dt(e)){case qe:case Ke:case be:case Ye:case Je:{let t=Tt(e.contents);return{...e,contents:t}}case we:return{...e,breakContents:Tt(e.breakContents),flatContents:Tt(e.flatContents)};case Xe:return{...e,parts:Wr(e.parts)};case $e:return Wr(e);case st:return as(e);case We:case ot:case Ve:case ze:case ve:case Ie:break;default:throw new Ct(e)}return e}function Es(e){return Tt(Cs(e))}function ms(e){switch(Dt(e)){case Xe:if(e.parts.every(t=>t===""))return"";break;case be:if(!e.contents&&!e.id&&!e.break&&!e.expandedStates)return"";if(e.contents.type===be&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case We:case qe:case Ke:case Ye:if(!e.contents)return"";break;case we:if(!e.flatContents&&!e.breakContents)return"";break;case $e:{let t=[];for(let u of e){if(!u)continue;let[r,...n]=Array.isArray(u)?u:[u];typeof r=="string"&&typeof je(0,t,-1)=="string"?t[t.length-1]+=r:t.push(r),t.push(...n)}return t.length===0?"":t.length===1?t[0]:t}case st:case ot:case Ve:case ze:case ve:case Je:case Ie:break;default:throw new Ct(e)}return e}function Cs(e){return zt(e,t=>ms(t))}function gs(e,t=Zr){return zt(e,u=>typeof u=="string"?Jr(t,u.split(`
|
|
@@ -45,7 +45,7 @@ ${f}`),r?n.reset(f):f}function ml(e,t,u){let r=t===0?-1:e.lastIndexOf(`
|
|
|
45
45
|
`)throw new te("newlines are not allowed in inline tables",o);if(a==="#")throw new te("inline tables cannot contain comments",o);if(a===",")throw new te("expected key-value, found comma",o);if(a!==" "&&a!==" "){let D,c=n,l=!1,[f,d]=er(e,t-1);for(let P=0;P<f.length;P++){if(P&&(c=l?c[D]:c[D]={}),D=f[P],(l=Object.hasOwn(c,D))&&(typeof c[D]!="object"||i.has(c[D])))throw new te("trying to redefine an already defined value",{toml:e,ptr:t});!l&&D==="__proto__"&&Object.defineProperty(c,D,{enumerable:!0,configurable:!0,writable:!0})}if(l)throw new te("trying to redefine an already defined value",{toml:e,ptr:t});let[h,F]=vr(e,d,"}",u-1,r);i.add(h),c[D]=h,t=F,s=e[t-1]===","?t-1:0}}if(s)throw new te("trailing commas are not allowed in inline tables",{toml:e,ptr:s});if(!a)throw new te("unfinished table encountered",{toml:e,ptr:t});return[n,t]}function $l(e,t,u,r){let n=[],i;for(t++;(i=e[t++])!=="]"&&i;){if(i===",")throw new te("expected value, found comma",{toml:e,ptr:t-1});if(i==="#")t=Ar(e,t);else if(i!==" "&&i!==" "&&i!==`
|
|
46
46
|
`&&i!=="\r"){let a=vr(e,t-1,"]",u-1,r);n.push(a[0]),t=a[1]}}if(!i)throw new te("unfinished array encountered",{toml:e,ptr:t});return[n,t]}function Sn(e,t,u,r){let n=t,i=u,a,s=!1,o;for(let D=0;D<e.length;D++){if(D){if(n=s?n[a]:n[a]={},i=(o=i[a]).c,r===0&&(o.t===1||o.t===2))return null;if(o.t===2){let c=n.length-1;n=n[c],i=i[c].c}}if(a=e[D],(s=Object.hasOwn(n,a))&&i[a]?.t===0&&i[a]?.d)return null;s||(a==="__proto__"&&(Object.defineProperty(n,a,{enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(i,a,{enumerable:!0,configurable:!0,writable:!0})),i[a]={t:D<e.length-1&&r===2?3:r,d:!1,i:0,c:{}})}if(o=i[a],o.t!==r&&!(r===1&&o.t===3)||(r===2&&(o.d||(o.d=!0,n[a]=[]),n[a].push(n={}),o.c[o.i++]=o={t:1,d:!1,i:0,c:{}}),o.d))return null;if(o.d=!0,r===1)n=s?n[a]:n[a]={};else if(r===0&&s)return null;return[a,n,o.c]}function Ml(e,{maxDepth:t=1e3,integersAsBigInt:u}={}){let r={},n={},i=r,a=n;for(let s=Ge(e,0);s<e.length;){if(e[s]==="["){let o=e[++s]==="[",D=er(e,s+=+o,"]");if(o){if(e[D[1]-1]!=="]")throw new te("expected end of table declaration",{toml:e,ptr:D[1]-1});D[1]++}let c=Sn(D[0],r,n,o?2:1);if(!c)throw new te("trying to redefine an already defined table or value",{toml:e,ptr:s});a=c[2],i=c[1],s=D[1]}else{let o=er(e,s),D=Sn(o[0],i,a,0);if(!D)throw new te("trying to redefine an already defined table or value",{toml:e,ptr:s});let c=vr(e,o[1],void 0,t,u);D[1][D[0]]=c[0],s=c[1]}if(s=Ge(e,s,!0),e[s]&&e[s]!==`
|
|
47
47
|
`&&e[s]!=="\r")throw new te("each key-value declaration must be followed by an end-of-line",{toml:e,ptr:s});s=Ge(e,s)}return r}async function Hl(e){wi(e)&&(e=new URL(e));try{return await xl.readFile(e,"utf8")}catch(t){if(t.code==="ENOENT")return;throw new Error(`Unable to read '${e}': ${t.message}`)}}async function _r(e){let t=await Ht(e);try{return yl(t)}catch(u){throw u.message=`JSON Error in ${e}:
|
|
48
|
-
${u.message}`,u}}async function dt(e){return(await import(Vc(e).href)).default}async function Ul(e){try{return await _r(e)}catch(t){try{return await dt(e)}catch{}throw t}}async function Wi(e){let{prettier:t}=await au(e);return t}async function au(e){let t=await Ht(e);ju||({__parsePrettierYamlConfig:ju}=await import("./yaml-
|
|
48
|
+
${u.message}`,u}}async function dt(e){return(await import(Vc(e).href)).default}async function Ul(e){try{return await _r(e)}catch(t){try{return await dt(e)}catch{}throw t}}async function Wi(e){let{prettier:t}=await au(e);return t}async function au(e){let t=await Ht(e);ju||({__parsePrettierYamlConfig:ju}=await import("./yaml-6KWCJ64X.js"));try{return ju(t)}catch(u){throw u.message=`YAML Error in ${e}:
|
|
49
49
|
${u.message}`,u}}async function Gl(e){let t=await Ht(e);try{return Ml(t)}catch(u){throw u.message=`TOML Error in ${e}:
|
|
50
50
|
${u.message}`,u}}async function ql(e){let t=await Ht(e);try{return ul.parse(t)}catch(u){throw u.message=`JSON5 Error in ${e}:
|
|
51
51
|
${u.message}`,u}}async function Kl({name:e,path:t}){if(e==="package.json")try{return!!await qi(t)}catch{return!1}if(e==="package.yaml")try{return!!await Wi(t)}catch{return!1}return!0}function Yl(e){return new kc(Xl,{filter:Kl,stopDirectory:e})}function $u(e,t="and"){return e.length<3?e.join(` ${t} `):`${e.slice(0,-1).join(", ")}, ${t} ${e[e.length-1]}`}function Se(e,t,u){return Yi.set(e,t),cf(u,e)}function cf(e,t){return u;function u(...r){let n=Error.stackTraceLimit;rr()&&(Error.stackTraceLimit=0);let i=new e;rr()&&(Error.stackTraceLimit=n);let a=df(t,r,i);return Object.defineProperties(i,{message:{value:a,enumerable:!1,writable:!0,configurable:!0},toString:{value(){return`${this.name} [${t}]: ${this.message}`},enumerable:!1,writable:!0,configurable:!0}}),ff(i),i.code=t,i}}function rr(){try{if(rf.startupSnapshot.isBuildingSnapshot())return!1}catch{}let e=Object.getOwnPropertyDescriptor(Error,"stackTraceLimit");return e===void 0?Object.isExtensible(Error):af.call(e,"writable")&&e.writable!==void 0?e.writable:e.set!==void 0}function lf(e){let t=Df+e.name;return Object.defineProperty(e,"name",{value:t}),e}function df(e,t,u){let r=Yi.get(e);if(Et.ok(r!==void 0,"expected `message` to be found"),typeof r=="function")return Et.ok(r.length<=t.length,`Code: ${e}; The provided arguments length (${t.length}) does not match the required ones (${r.length}).`),Reflect.apply(r,u,t);let n=/%[dfijoOs]/g,i=0;for(;n.exec(r)!==null;)i++;return Et.ok(i===t.length,`Code: ${e}; The provided arguments length (${t.length}) does not match the required ones (${i}).`),t.length===0?r:(t.unshift(r),Reflect.apply(nf,null,t))}function hf(e){if(e==null)return String(e);if(typeof e=="function"&&e.name)return`function ${e.name}`;if(typeof e=="object")return e.constructor&&e.constructor.name?`an instance of ${e.constructor.name}`:`${ur(e,{depth:-1})}`;let t=ur(e,{colors:!1});return t.length>28&&(t=`${t.slice(0,25)}...`),`type ${typeof e} (${t})`}function zi(e,{base:t,specifier:u}){let r=Rn.get(e);if(r)return r;let n;try{n=tf.readFileSync(uf.toNamespacedPath(e),"utf8")}catch(a){let s=a;if(s.code!=="ENOENT")throw s}let i={exists:!1,pjsonPath:e,main:void 0,name:void 0,type:"none",exports:void 0,imports:void 0};if(n!==void 0){let a;try{a=JSON.parse(n)}catch(s){let o=s,D=new Ff(e,(t?`"${u}" from `:"")+tr(t||u),o.message);throw D.cause=o,D}i.exists=!0,Ot.call(a,"name")&&typeof a.name=="string"&&(i.name=a.name),Ot.call(a,"main")&&typeof a.main=="string"&&(i.main=a.main),Ot.call(a,"exports")&&(i.exports=a.exports),Ot.call(a,"imports")&&(i.imports=a.imports),Ot.call(a,"type")&&(a.type==="commonjs"||a.type==="module")&&(i.type=a.type)}return Rn.set(e,i),i}function br(e){let t=new URL("package.json",e);for(;!t.pathname.endsWith("node_modules/package.json");){let n=zi(tr(t),{specifier:e});if(n.exists)return n;let i=t;if(t=new URL("../package.json",t),t.pathname===i.pathname)break}return{pjsonPath:tr(t),exists:!1,type:"none"}}function Pn(e){return br(e).type}function Cf(e){return e&&/\s*(text|application)\/javascript\s*(;\s*charset=utf-?8\s*)?/i.test(e)?"module":e==="application/json"?"json":null}function gf(e){let{1:t}=/^([^/]+\/[^;,]+)[^,]*?(;base64)?,/.exec(e.pathname)||[null,null,null];return Cf(t)}function Af(e){let t=e.pathname,u=t.length;for(;u--;){let r=t.codePointAt(u);if(r===47)return"";if(r===46)return t.codePointAt(u-1)===47?"":t.slice(u)}return""}function vf(e,t,u){let r=Af(e);if(r===".js"){let a=Pn(e);return a!=="none"?a:"commonjs"}if(r===""){let a=Pn(e);return a==="none"||a==="commonjs"?"commonjs":"module"}let n=mf[r];if(n)return n;if(u)return;let i=ef(e);throw new pf(r,i)}function On(){}function Ji(e,t){let u=e.protocol;return Ef.call(Tn,u)&&Tn[u](e,t,!0)||null}function Bf(){return Qi}function bf(){return yf}function Zi(e){if(e!==void 0&&e!==Bf()){if(!Array.isArray(e))throw new _f("conditions",e,"expected an array");return new Set(e)}return bf()}function jn(e,t,u,r,n,i,a){if(pt.noDeprecation)return;let s=se(r),o=If.exec(a?e:t)!==null;pt.emitWarning(`Use of deprecated ${o?"double slash":"leading or trailing slash matching"} resolving "${e}" for module request "${t}" ${t===u?"":`matched to "${u}" `}in the "${n?"imports":"exports"}" field module resolution of the package at ${s}${i?` imported from ${se(i)}`:""}.`,"DeprecationWarning","DEP0166")}function $n(e,t,u,r){if(pt.noDeprecation||Ji(e,{parentURL:u.href})!=="module")return;let i=se(e.href),a=se(new URL(".",t)),s=se(u);r?Ki.resolve(a,r)!==i&&pt.emitWarning(`Package ${a} has a "main" field set to "${r}", excluding the full filename and extension to the resolved file at "${i.slice(a.length)}", imported from ${s}.
|
|
@@ -96,4 +96,4 @@ ${n}`,t),this.line=u,this.column=r,this.codeblock=n}};wl=/^(\d{4}-\d{2}-\d{2})?[
|
|
|
96
96
|
`||e==="\r"||e==="\u2028"||e==="\u2029";mt=J0;et=Q0;Ca=Z0;Aa=ga;va=new WeakMap;Uu=()=>!1;ya=e=>!/[\S\n\u2028\u2029]/u.test(e);Ir=ad,{breakParent:sd,hardline:Mt,indent:qp,join:Wp,line:od,lineSuffix:Wn}=Ne;hd=()=>R0,Fd={checkIgnorePragma:{category:"Special",type:"boolean",default:!1,description:"Check whether the file's first docblock comment contains '@noprettier' or '@noformat' to determine if it should be formatted.",cliCategory:"Other"},cursorOffset:{category:"Special",type:"int",default:-1,range:{start:-1,end:1/0,step:1},description:"Print (to stderr) where a cursor at the given position would move to after formatting.",cliCategory:"Editor"},endOfLine:{category:"Global",type:"choice",default:"lf",description:"Which end of line characters to apply.",choices:[{value:"lf",description:"Line Feed only (\\n), common on Linux and macOS as well as inside git repos"},{value:"crlf",description:"Carriage Return + Line Feed characters (\\r\\n), common on Windows"},{value:"cr",description:"Carriage Return character only (\\r), used very rarely"},{value:"auto",description:`Maintain existing
|
|
97
97
|
(mixed values within one file are normalised by looking at what's used after the first line)`}]},filepath:{category:"Special",type:"path",description:"Specify the input filepath. This will be used to do parser inference.",cliName:"stdin-filepath",cliCategory:"Other",cliDescription:"Path to the file to pretend that stdin comes from."},insertPragma:{category:"Special",type:"boolean",default:!1,description:"Insert @format pragma into file's first docblock comment.",cliCategory:"Other"},parser:{category:"Global",type:"choice",default:void 0,description:"Which parser to use.",exception:e=>typeof e=="string"||typeof e=="function",choices:[{value:"flow",description:"Flow"},{value:"babel",description:"JavaScript"},{value:"babel-flow",description:"Flow"},{value:"babel-ts",description:"TypeScript"},{value:"typescript",description:"TypeScript"},{value:"acorn",description:"JavaScript"},{value:"espree",description:"JavaScript"},{value:"meriyah",description:"JavaScript"},{value:"css",description:"CSS"},{value:"less",description:"Less"},{value:"scss",description:"SCSS"},{value:"json",description:"JSON"},{value:"json5",description:"JSON5"},{value:"jsonc",description:"JSON with Comments"},{value:"json-stringify",description:"JSON.stringify"},{value:"graphql",description:"GraphQL"},{value:"markdown",description:"Markdown"},{value:"mdx",description:"MDX"},{value:"vue",description:"Vue"},{value:"yaml",description:"YAML"},{value:"glimmer",description:"Ember / Handlebars"},{value:"html",description:"HTML"},{value:"angular",description:"Angular"},{value:"lwc",description:"Lightning Web Components"},{value:"mjml",description:"MJML"}]},plugins:{type:"path",array:!0,default:[{value:[]}],category:"Global",description:"Add a plugin. Multiple plugins can be passed as separate `--plugin`s.",exception:e=>typeof e=="string"||typeof e=="object",cliName:"plugin",cliCategory:"Config"},printWidth:{category:"Global",type:"int",default:80,description:"The line length where Prettier will try wrap.",range:{start:0,end:1/0,step:1}},rangeEnd:{category:"Special",type:"int",default:1/0,range:{start:0,end:1/0,step:1},description:`Format code ending at a given character offset (exclusive).
|
|
98
98
|
The range will extend forwards to the end of the selected statement.`,cliCategory:"Editor"},rangeStart:{category:"Special",type:"int",default:0,range:{start:0,end:1/0,step:1},description:`Format code starting at a given character offset.
|
|
99
|
-
The range will extend backwards to the start of the first line containing the selected statement.`,cliCategory:"Editor"},requirePragma:{category:"Special",type:"boolean",default:!1,description:"Require either '@prettier' or '@format' to be present in the file's first docblock comment in order for it to be formatted.",cliCategory:"Other"},tabWidth:{type:"int",category:"Global",default:2,description:"Number of spaces per indentation level.",range:{start:0,end:1/0,step:1}},useTabs:{category:"Global",type:"boolean",default:!1,description:"Indent with tabs instead of spaces."},embeddedLanguageFormatting:{category:"Global",type:"choice",default:"auto",description:"Control how Prettier formats quoted code embedded in the file.",choices:[{value:"auto",description:"Format embedded code if Prettier can automatically identify it."},{value:"off",description:"Never automatically format embedded code."}]}};Ed=Array.prototype.toReversed??function(){return[...this].reverse()},md=Ut("toReversed",function(){if(Array.isArray(this))return Ed}),Cd=md,Ad=Pe(kD(),1);_d=vd,Sa=e=>{try{return gd.basename(wt(e))}catch{return""}};Sd=bd;_u=wd;wa=Rd,Od=Array.prototype.findLast??function(e){for(let t=this.length-1;t>=0;t--){let u=this[t];if(e(u,t,this))return u}},Id=Ut("findLast",function(){if(Array.isArray(this))return Od}),Ra=Id,Nd=Symbol.for("PRETTIER_IS_FRONT_MATTER"),Ld=[];Lr=kd,{hardline:Kn,markAsRoot:jd}=Ne,Pa=new Set(["yaml","toml"]),Ta=({node:e})=>Lr(e)&&Pa.has(e.language);xd=Md;Ud=Hd,Oa=new Set(["tokens","comments","parent","enclosingNode","precedingNode","followingNode"]),Gd=e=>Object.keys(e).filter(t=>!Oa.has(t));Yn=qd;Wu=new WeakMap;Kd=["clean","embed","print"],Yd=Object.fromEntries(Kd.map(e=>[e,!1]));nr={astFormat:"estree",printer:{},originalText:void 0,locStart:null,locEnd:null,getVisitorKeys:null};Pt=Qd;qt=Zd,{stripTrailingHardline:th}=Qt;ih=nh,{cursor:yt}=Ne;ka=ah;oh=sh,Dh=Array.prototype.findLastIndex??function(e){for(let t=this.length-1;t>=0;t--){let u=this[t];if(e(u,t,this))return t}return-1},ch=Ut("findLastIndex",function(){if(Array.isArray(this))return Dh}),lh=ch,fh=({parser:e})=>e==="json"||e==="json5"||e==="jsonc"||e==="json-stringify";ja=new Set(["JsonRoot","ObjectExpression","ArrayExpression","StringLiteral","NumericLiteral","BooleanLiteral","NullLiteral","UnaryExpression","TemplateLiteral"]),ph=new Set(["OperationDefinition","FragmentDefinition","VariableDefinition","TypeExtensionDefinition","ObjectTypeDefinition","FieldDefinition","DirectiveDefinition","EnumTypeDefinition","EnumValueDefinition","InputValueDefinition","InputObjectTypeDefinition","SchemaDefinition","OperationTypeDefinition","InterfaceTypeDefinition","UnionTypeDefinition","ScalarTypeDefinition"]);({addAlignmentToDoc:mh,hardline:Ch}=Ne),{printDocToString:jr}=Jt,$a="\uFEFF",Zn=Symbol("cursor");Ua={};Fu(Ua,{CATEGORY_CONFIG:()=>Sh,CATEGORY_EDITOR:()=>wh,CATEGORY_FORMAT:()=>Rh,CATEGORY_GLOBAL:()=>Oh,CATEGORY_OTHER:()=>Ph,CATEGORY_OUTPUT:()=>Th,CATEGORY_SPECIAL:()=>Ih});Sh="Config",wh="Editor",Rh="Format",Ph="Other",Th="Output",Oh="Global",Ih="Special",Nh=[{name:"CSS",type:"markup",aceMode:"css",extensions:[".css",".wxss"],tmScope:"source.css",codemirrorMode:"css",codemirrorMimeType:"text/css",parsers:["css"],vscodeLanguageIds:["css"],linguistLanguageId:50},{name:"PostCSS",type:"markup",aceMode:"text",extensions:[".pcss",".postcss"],tmScope:"source.postcss",group:"CSS",parsers:["css"],vscodeLanguageIds:["postcss"],linguistLanguageId:262764437},{name:"Less",type:"markup",aceMode:"less",extensions:[".less"],tmScope:"source.css.less",aliases:["less-css"],codemirrorMode:"css",codemirrorMimeType:"text/x-less",parsers:["less"],vscodeLanguageIds:["less"],linguistLanguageId:198},{name:"SCSS",type:"markup",aceMode:"scss",extensions:[".scss"],tmScope:"source.css.scss",codemirrorMode:"css",codemirrorMimeType:"text/x-scss",parsers:["scss"],vscodeLanguageIds:["scss"],linguistLanguageId:329}],Be={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},objectWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap object literals.",choices:[{value:"preserve",description:"Keep as multi-line, if there is a newline between the opening brace and first property."},{value:"collapse",description:"Fit to a single line when possible."}]},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}},Lh={singleQuote:Be.singleQuote},kh=Lh,jh=[{name:"GraphQL",type:"data",aceMode:"graphqlschema",extensions:[".graphql",".gql",".graphqls"],tmScope:"source.graphql",parsers:["graphql"],vscodeLanguageIds:["graphql"],linguistLanguageId:139}],$h={bracketSpacing:Be.bracketSpacing},Mh=$h,xh=[{name:"Handlebars",type:"markup",aceMode:"handlebars",extensions:[".handlebars",".hbs"],tmScope:"text.html.handlebars",aliases:["hbs","htmlbars"],parsers:["glimmer"],vscodeLanguageIds:["handlebars"],linguistLanguageId:155}],Hh=[{name:"Angular",type:"markup",aceMode:"html",extensions:[".component.html"],tmScope:"text.html.basic",aliases:["xhtml"],codemirrorMode:"htmlmixed",codemirrorMimeType:"text/html",parsers:["angular"],vscodeLanguageIds:["html"],filenames:[],linguistLanguageId:146},{name:"HTML",type:"markup",aceMode:"html",extensions:[".html",".hta",".htm",".html.hl",".inc",".xht",".xhtml"],tmScope:"text.html.basic",aliases:["xhtml"],codemirrorMode:"htmlmixed",codemirrorMimeType:"text/html",parsers:["html"],vscodeLanguageIds:["html"],linguistLanguageId:146},{name:"Lightning Web Components",type:"markup",aceMode:"html",extensions:[],tmScope:"text.html.basic",aliases:["xhtml"],codemirrorMode:"htmlmixed",codemirrorMimeType:"text/html",parsers:["lwc"],vscodeLanguageIds:["html"],filenames:[],linguistLanguageId:146},{name:"MJML",type:"markup",aceMode:"html",extensions:[".mjml"],tmScope:"text.mjml.basic",aliases:["MJML","mjml"],codemirrorMode:"htmlmixed",codemirrorMimeType:"text/html",parsers:["mjml"],filenames:[],vscodeLanguageIds:["mjml"],linguistLanguageId:146},{name:"Vue",type:"markup",aceMode:"vue",extensions:[".vue"],tmScope:"source.vue",codemirrorMode:"vue",codemirrorMimeType:"text/x-vue",parsers:["vue"],vscodeLanguageIds:["vue"],linguistLanguageId:391}],ui="HTML",Uh={bracketSameLine:Be.bracketSameLine,htmlWhitespaceSensitivity:{category:ui,type:"choice",default:"css",description:"How to handle whitespaces in HTML.",choices:[{value:"css",description:"Respect the default value of CSS display property."},{value:"strict",description:"Whitespaces are considered sensitive."},{value:"ignore",description:"Whitespaces are considered insensitive."}]},singleAttributePerLine:Be.singleAttributePerLine,vueIndentScriptAndStyle:{category:ui,type:"boolean",default:!1,description:"Indent script and style tags in Vue files."}},Gh=Uh,qh=[{name:"JavaScript",type:"programming",aceMode:"javascript",extensions:[".js","._js",".bones",".cjs",".es",".es6",".gs",".jake",".javascript",".jsb",".jscad",".jsfl",".jslib",".jsm",".jspre",".jss",".mjs",".njs",".pac",".sjs",".ssjs",".xsjs",".xsjslib",".start.frag",".end.frag",".wxs"],filenames:["Jakefile","start.frag","end.frag"],tmScope:"source.js",aliases:["js","node"],codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",interpreters:["chakra","d8","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell","zx"],parsers:["babel","acorn","espree","meriyah","babel-flow","babel-ts","flow","typescript"],vscodeLanguageIds:["javascript","mongo"],linguistLanguageId:183},{name:"Flow",type:"programming",aceMode:"javascript",extensions:[".js.flow"],filenames:[],tmScope:"source.js",aliases:[],codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",interpreters:["chakra","d8","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell"],parsers:["flow","babel-flow"],vscodeLanguageIds:["javascript"],linguistLanguageId:183},{name:"JSX",type:"programming",aceMode:"javascript",extensions:[".jsx"],filenames:void 0,tmScope:"source.js.jsx",aliases:void 0,codemirrorMode:"jsx",codemirrorMimeType:"text/jsx",interpreters:void 0,parsers:["babel","babel-flow","babel-ts","flow","typescript","espree","meriyah"],vscodeLanguageIds:["javascriptreact"],group:"JavaScript",linguistLanguageId:183},{name:"TypeScript",type:"programming",aceMode:"typescript",extensions:[".ts",".cts",".mts"],tmScope:"source.ts",aliases:["ts"],codemirrorMode:"javascript",codemirrorMimeType:"application/typescript",interpreters:["bun","deno","ts-node","tsx"],parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescript"],linguistLanguageId:378},{name:"TSX",type:"programming",aceMode:"tsx",extensions:[".tsx"],tmScope:"source.tsx",codemirrorMode:"jsx",codemirrorMimeType:"text/typescript-jsx",group:"TypeScript",parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescriptreact"],linguistLanguageId:94901924}],Qe="JavaScript",Wh={arrowParens:{category:Qe,type:"choice",default:"always",description:"Include parentheses around a sole arrow function parameter.",choices:[{value:"always",description:"Always include parens. Example: `(x) => x`"},{value:"avoid",description:"Omit parens when possible. Example: `x => x`"}]},bracketSameLine:Be.bracketSameLine,objectWrap:Be.objectWrap,bracketSpacing:Be.bracketSpacing,jsxBracketSameLine:{category:Qe,type:"boolean",description:"Put > on the last line instead of at a new line.",deprecated:"2.4.0"},semi:{category:Qe,type:"boolean",default:!0,description:"Print semicolons.",oppositeDescription:"Do not print semicolons, except at the beginning of lines which may need them."},experimentalOperatorPosition:{category:Qe,type:"choice",default:"end",description:"Where to print operators when binary expressions wrap lines.",choices:[{value:"start",description:"Print operators at the start of new lines."},{value:"end",description:"Print operators at the end of previous lines."}]},experimentalTernaries:{category:Qe,type:"boolean",default:!1,description:"Use curious ternaries, with the question mark after the condition.",oppositeDescription:"Default behavior of ternaries; keep question marks on the same line as the consequent."},singleQuote:Be.singleQuote,jsxSingleQuote:{category:Qe,type:"boolean",default:!1,description:"Use single quotes in JSX."},quoteProps:{category:Qe,type:"choice",default:"as-needed",description:"Change when properties in objects are quoted.",choices:[{value:"as-needed",description:"Only add quotes around object properties where required."},{value:"consistent",description:"If at least one property in an object requires quotes, quote all properties."},{value:"preserve",description:"Respect the input use of quotes in object properties."}]},trailingComma:{category:Qe,type:"choice",default:"all",description:"Print trailing commas wherever possible when multi-line.",choices:[{value:"all",description:"Trailing commas wherever possible (including function arguments)."},{value:"es5",description:"Trailing commas where valid in ES5 (objects, arrays, etc.)"},{value:"none",description:"No trailing commas."}]},singleAttributePerLine:Be.singleAttributePerLine},Vh=Wh,Xh=[{name:"JSON.stringify",type:"data",aceMode:"json",extensions:[".importmap"],filenames:["package.json","package-lock.json","composer.json"],tmScope:"source.json",aliases:["geojson","jsonl","sarif","topojson"],codemirrorMode:"javascript",codemirrorMimeType:"application/json",parsers:["json-stringify"],vscodeLanguageIds:["json"],linguistLanguageId:174},{name:"JSON",type:"data",aceMode:"json",extensions:[".json",".4DForm",".4DProject",".avsc",".geojson",".gltf",".har",".ice",".JSON-tmLanguage",".json.example",".mcmeta",".sarif",".tact",".tfstate",".tfstate.backup",".topojson",".webapp",".webmanifest",".yy",".yyp"],filenames:[".all-contributorsrc",".arcconfig",".auto-changelog",".c8rc",".htmlhintrc",".imgbotconfig",".nycrc",".tern-config",".tern-project",".watchmanconfig",".babelrc",".jscsrc",".jshintrc",".jslintrc",".swcrc"],tmScope:"source.json",aliases:["geojson","jsonl","sarif","topojson"],codemirrorMode:"javascript",codemirrorMimeType:"application/json",parsers:["json"],vscodeLanguageIds:["json"],linguistLanguageId:174},{name:"JSON with Comments",type:"data",aceMode:"javascript",extensions:[".jsonc",".code-snippets",".code-workspace",".sublime-build",".sublime-color-scheme",".sublime-commands",".sublime-completions",".sublime-keymap",".sublime-macro",".sublime-menu",".sublime-mousemap",".sublime-project",".sublime-settings",".sublime-theme",".sublime-workspace",".sublime_metrics",".sublime_session"],filenames:[],tmScope:"source.json.comments",aliases:["jsonc"],codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",group:"JSON",parsers:["jsonc"],vscodeLanguageIds:["jsonc"],linguistLanguageId:423},{name:"JSON5",type:"data",aceMode:"json5",extensions:[".json5"],tmScope:"source.js",codemirrorMode:"javascript",codemirrorMimeType:"application/json",parsers:["json5"],vscodeLanguageIds:["json5"],linguistLanguageId:175}],Kh=[{name:"Markdown",type:"prose",aceMode:"markdown",extensions:[".md",".livemd",".markdown",".mdown",".mdwn",".mkd",".mkdn",".mkdown",".ronn",".scd",".workbook"],filenames:["contents.lr","README"],tmScope:"text.md",aliases:["md","pandoc"],codemirrorMode:"gfm",codemirrorMimeType:"text/x-gfm",wrap:!0,parsers:["markdown"],vscodeLanguageIds:["markdown"],linguistLanguageId:222},{name:"MDX",type:"prose",aceMode:"markdown",extensions:[".mdx"],filenames:[],tmScope:"text.md",aliases:["md","pandoc"],codemirrorMode:"gfm",codemirrorMimeType:"text/x-gfm",wrap:!0,parsers:["mdx"],vscodeLanguageIds:["mdx"],linguistLanguageId:222}],Yh={proseWrap:Be.proseWrap,singleQuote:Be.singleQuote},zh=Yh,Jh=[{name:"YAML",type:"data",aceMode:"yaml",extensions:[".yml",".mir",".reek",".rviz",".sublime-syntax",".syntax",".yaml",".yaml-tmlanguage",".yaml.sed",".yml.mysql"],filenames:[".clang-format",".clang-tidy",".clangd",".gemrc","CITATION.cff","glide.lock","pixi.lock",".prettierrc",".stylelintrc",".lintstagedrc"],tmScope:"source.yaml",aliases:["yml"],codemirrorMode:"yaml",codemirrorMimeType:"text/x-yaml",parsers:["yaml"],vscodeLanguageIds:["yaml","ansible","dockercompose","github-actions-workflow","home-assistant"],linguistLanguageId:407}],Qh={bracketSpacing:Be.bracketSpacing,singleQuote:Be.singleQuote,proseWrap:Be.proseWrap},Zh=Qh;eF=Ga([{importPlugin:()=>import("./estree-BYYJYS3A.js"),printers:["estree","estree-json"]}]),tF={...kh,...Mh,...Gh,...Vh,...zh,...Zh},uF=[...Nh,...jh,...xh,...Hh,...qh,...Xh,...Kh,...Jh],{parsers:rF,printers:nF}=Ga([{importPlugin:()=>import("./acorn-QBS5IYTX.js"),parsers:["acorn","espree"]},{importPlugin:()=>import("./angular-UTTM4Y4S.js"),parsers:["__ng_action","__ng_binding","__ng_interpolation","__ng_directive"]},{importPlugin:()=>import("./babel-JS32NLHY.js"),parsers:["babel","babel-flow","babel-ts","__js_expression","__ts_expression","__vue_expression","__vue_ts_expression","__vue_event_binding","__vue_ts_event_binding","__babel_estree","json","json5","jsonc","json-stringify"]},{importPlugin:()=>import("./flow-M3Q2HPQT.js"),parsers:["flow"]},{importPlugin:()=>import("./glimmer-3DEJJGOJ.js"),parsers:["glimmer"],printers:["glimmer"]},{importPlugin:()=>import("./graphql-A4HHE3MB.js"),parsers:["graphql"],printers:["graphql"]},{importPlugin:()=>import("./html-HETICZ2F.js"),parsers:["html","angular","vue","lwc","mjml"],printers:["html"]},{importPlugin:()=>import("./markdown-5TVCXM53.js"),parsers:["markdown","mdx","remark"],printers:["mdast"]},{importPlugin:()=>import("./meriyah-23OZNYWC.js"),parsers:["meriyah"]},{importPlugin:()=>import("./postcss-IIK6CGAW.js"),parsers:["css","less","scss"],printers:["postcss"]},{importPlugin:()=>import("./typescript-YKZ232QT.js"),parsers:["typescript"]},{importPlugin:()=>import("./yaml-SJKIH3VD.js"),parsers:["yaml"],printers:["yaml"]}]),iF=[eF,{options:tF,languages:uF,parsers:rF,printers:nF}];qa=aF;DF=oF;cu=new Map;Wa=hF,FF=Pe(jD(),1),EF=lu.sep==="\\"?e=>gu(0,e,"\\","/"):e=>e;vF=AF;BF=_F,bF="3.8.4",Xa={};Fu(Xa,{addDanglingComment:()=>ht,addLeadingComment:()=>jt,addTrailingComment:()=>$t,getAlignmentSize:()=>Pr,getIndentSize:()=>OF,getMaxContinuousCount:()=>LF,getNextNonSpaceNonCommentCharacter:()=>jF,getNextNonSpaceNonCommentCharacterIndex:()=>KF,getPreferredQuote:()=>UF,getStringWidth:()=>W0,hasNewline:()=>et,hasNewlineInRange:()=>qF,hasSpaces:()=>VF,isNextLineEmpty:()=>ZF,isNextLineEmptyAfterIndex:()=>Hr,isPreviousLineEmpty:()=>zF,makeString:()=>QF,skip:()=>Gt,skipEverythingButNewLine:()=>ma,skipInlineComment:()=>$r,skipNewline:()=>mt,skipSpaces:()=>rt,skipToLineEnd:()=>Ea,skipTrailingComment:()=>Mr,skipWhitespace:()=>z0});$r=SF;Mr=wF;xr=RF;Hr=PF;OF=TF;LF=NF;jF=kF,Ka="'",$F='"',Ya=Object.freeze({character:Ka,codePoint:39}),za=Object.freeze({character:$F,codePoint:34}),MF=Object.freeze({preferred:Ya,alternate:za}),xF=Object.freeze({preferred:za,alternate:Ya});UF=HF;qF=GF;VF=WF;Ja=Ze(Ha);up=Ze(Nr,0),rp=Ze((e,t)=>_u(t,{physicalFile:e})),np={errors:yi,optionCategories:Ua,createIsIgnoredFunction:Va,formatOptionsHiddenDefaults:nr,normalizeOptions:wa,getSupportInfoWithoutPlugins:Nr,normalizeOptionSettings:ba,inferParser:(e,t)=>Promise.resolve(t?.parser??rp(e,t)),vnopts:{ChoiceSchema:_i,apiDescriptor:Ft},fastGlob:XD.default,createTwoFilesPatch:WD,picocolors:KD.default,closetLevenshteinMatch:Ei,utilities:{omit:vF,createMockable:Bi}},ip={parse:Ze(vh),formatAST:Ze(_h),formatDoc:Ze(yh),printToDoc:Ze(Bh),printDocToString:Ze(bh),mockable:bi}});export{Tu as a,$D as b,sa as c,f0 as d,BF as e,bF as f,Xa as g,Ja as h,Qa as i,ep as j,tp as k,up as l,np as m,ip as n,ap as o};
|
|
99
|
+
The range will extend backwards to the start of the first line containing the selected statement.`,cliCategory:"Editor"},requirePragma:{category:"Special",type:"boolean",default:!1,description:"Require either '@prettier' or '@format' to be present in the file's first docblock comment in order for it to be formatted.",cliCategory:"Other"},tabWidth:{type:"int",category:"Global",default:2,description:"Number of spaces per indentation level.",range:{start:0,end:1/0,step:1}},useTabs:{category:"Global",type:"boolean",default:!1,description:"Indent with tabs instead of spaces."},embeddedLanguageFormatting:{category:"Global",type:"choice",default:"auto",description:"Control how Prettier formats quoted code embedded in the file.",choices:[{value:"auto",description:"Format embedded code if Prettier can automatically identify it."},{value:"off",description:"Never automatically format embedded code."}]}};Ed=Array.prototype.toReversed??function(){return[...this].reverse()},md=Ut("toReversed",function(){if(Array.isArray(this))return Ed}),Cd=md,Ad=Pe(kD(),1);_d=vd,Sa=e=>{try{return gd.basename(wt(e))}catch{return""}};Sd=bd;_u=wd;wa=Rd,Od=Array.prototype.findLast??function(e){for(let t=this.length-1;t>=0;t--){let u=this[t];if(e(u,t,this))return u}},Id=Ut("findLast",function(){if(Array.isArray(this))return Od}),Ra=Id,Nd=Symbol.for("PRETTIER_IS_FRONT_MATTER"),Ld=[];Lr=kd,{hardline:Kn,markAsRoot:jd}=Ne,Pa=new Set(["yaml","toml"]),Ta=({node:e})=>Lr(e)&&Pa.has(e.language);xd=Md;Ud=Hd,Oa=new Set(["tokens","comments","parent","enclosingNode","precedingNode","followingNode"]),Gd=e=>Object.keys(e).filter(t=>!Oa.has(t));Yn=qd;Wu=new WeakMap;Kd=["clean","embed","print"],Yd=Object.fromEntries(Kd.map(e=>[e,!1]));nr={astFormat:"estree",printer:{},originalText:void 0,locStart:null,locEnd:null,getVisitorKeys:null};Pt=Qd;qt=Zd,{stripTrailingHardline:th}=Qt;ih=nh,{cursor:yt}=Ne;ka=ah;oh=sh,Dh=Array.prototype.findLastIndex??function(e){for(let t=this.length-1;t>=0;t--){let u=this[t];if(e(u,t,this))return t}return-1},ch=Ut("findLastIndex",function(){if(Array.isArray(this))return Dh}),lh=ch,fh=({parser:e})=>e==="json"||e==="json5"||e==="jsonc"||e==="json-stringify";ja=new Set(["JsonRoot","ObjectExpression","ArrayExpression","StringLiteral","NumericLiteral","BooleanLiteral","NullLiteral","UnaryExpression","TemplateLiteral"]),ph=new Set(["OperationDefinition","FragmentDefinition","VariableDefinition","TypeExtensionDefinition","ObjectTypeDefinition","FieldDefinition","DirectiveDefinition","EnumTypeDefinition","EnumValueDefinition","InputValueDefinition","InputObjectTypeDefinition","SchemaDefinition","OperationTypeDefinition","InterfaceTypeDefinition","UnionTypeDefinition","ScalarTypeDefinition"]);({addAlignmentToDoc:mh,hardline:Ch}=Ne),{printDocToString:jr}=Jt,$a="\uFEFF",Zn=Symbol("cursor");Ua={};Fu(Ua,{CATEGORY_CONFIG:()=>Sh,CATEGORY_EDITOR:()=>wh,CATEGORY_FORMAT:()=>Rh,CATEGORY_GLOBAL:()=>Oh,CATEGORY_OTHER:()=>Ph,CATEGORY_OUTPUT:()=>Th,CATEGORY_SPECIAL:()=>Ih});Sh="Config",wh="Editor",Rh="Format",Ph="Other",Th="Output",Oh="Global",Ih="Special",Nh=[{name:"CSS",type:"markup",aceMode:"css",extensions:[".css",".wxss"],tmScope:"source.css",codemirrorMode:"css",codemirrorMimeType:"text/css",parsers:["css"],vscodeLanguageIds:["css"],linguistLanguageId:50},{name:"PostCSS",type:"markup",aceMode:"text",extensions:[".pcss",".postcss"],tmScope:"source.postcss",group:"CSS",parsers:["css"],vscodeLanguageIds:["postcss"],linguistLanguageId:262764437},{name:"Less",type:"markup",aceMode:"less",extensions:[".less"],tmScope:"source.css.less",aliases:["less-css"],codemirrorMode:"css",codemirrorMimeType:"text/x-less",parsers:["less"],vscodeLanguageIds:["less"],linguistLanguageId:198},{name:"SCSS",type:"markup",aceMode:"scss",extensions:[".scss"],tmScope:"source.css.scss",codemirrorMode:"css",codemirrorMimeType:"text/x-scss",parsers:["scss"],vscodeLanguageIds:["scss"],linguistLanguageId:329}],Be={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},objectWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap object literals.",choices:[{value:"preserve",description:"Keep as multi-line, if there is a newline between the opening brace and first property."},{value:"collapse",description:"Fit to a single line when possible."}]},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}},Lh={singleQuote:Be.singleQuote},kh=Lh,jh=[{name:"GraphQL",type:"data",aceMode:"graphqlschema",extensions:[".graphql",".gql",".graphqls"],tmScope:"source.graphql",parsers:["graphql"],vscodeLanguageIds:["graphql"],linguistLanguageId:139}],$h={bracketSpacing:Be.bracketSpacing},Mh=$h,xh=[{name:"Handlebars",type:"markup",aceMode:"handlebars",extensions:[".handlebars",".hbs"],tmScope:"text.html.handlebars",aliases:["hbs","htmlbars"],parsers:["glimmer"],vscodeLanguageIds:["handlebars"],linguistLanguageId:155}],Hh=[{name:"Angular",type:"markup",aceMode:"html",extensions:[".component.html"],tmScope:"text.html.basic",aliases:["xhtml"],codemirrorMode:"htmlmixed",codemirrorMimeType:"text/html",parsers:["angular"],vscodeLanguageIds:["html"],filenames:[],linguistLanguageId:146},{name:"HTML",type:"markup",aceMode:"html",extensions:[".html",".hta",".htm",".html.hl",".inc",".xht",".xhtml"],tmScope:"text.html.basic",aliases:["xhtml"],codemirrorMode:"htmlmixed",codemirrorMimeType:"text/html",parsers:["html"],vscodeLanguageIds:["html"],linguistLanguageId:146},{name:"Lightning Web Components",type:"markup",aceMode:"html",extensions:[],tmScope:"text.html.basic",aliases:["xhtml"],codemirrorMode:"htmlmixed",codemirrorMimeType:"text/html",parsers:["lwc"],vscodeLanguageIds:["html"],filenames:[],linguistLanguageId:146},{name:"MJML",type:"markup",aceMode:"html",extensions:[".mjml"],tmScope:"text.mjml.basic",aliases:["MJML","mjml"],codemirrorMode:"htmlmixed",codemirrorMimeType:"text/html",parsers:["mjml"],filenames:[],vscodeLanguageIds:["mjml"],linguistLanguageId:146},{name:"Vue",type:"markup",aceMode:"vue",extensions:[".vue"],tmScope:"source.vue",codemirrorMode:"vue",codemirrorMimeType:"text/x-vue",parsers:["vue"],vscodeLanguageIds:["vue"],linguistLanguageId:391}],ui="HTML",Uh={bracketSameLine:Be.bracketSameLine,htmlWhitespaceSensitivity:{category:ui,type:"choice",default:"css",description:"How to handle whitespaces in HTML.",choices:[{value:"css",description:"Respect the default value of CSS display property."},{value:"strict",description:"Whitespaces are considered sensitive."},{value:"ignore",description:"Whitespaces are considered insensitive."}]},singleAttributePerLine:Be.singleAttributePerLine,vueIndentScriptAndStyle:{category:ui,type:"boolean",default:!1,description:"Indent script and style tags in Vue files."}},Gh=Uh,qh=[{name:"JavaScript",type:"programming",aceMode:"javascript",extensions:[".js","._js",".bones",".cjs",".es",".es6",".gs",".jake",".javascript",".jsb",".jscad",".jsfl",".jslib",".jsm",".jspre",".jss",".mjs",".njs",".pac",".sjs",".ssjs",".xsjs",".xsjslib",".start.frag",".end.frag",".wxs"],filenames:["Jakefile","start.frag","end.frag"],tmScope:"source.js",aliases:["js","node"],codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",interpreters:["chakra","d8","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell","zx"],parsers:["babel","acorn","espree","meriyah","babel-flow","babel-ts","flow","typescript"],vscodeLanguageIds:["javascript","mongo"],linguistLanguageId:183},{name:"Flow",type:"programming",aceMode:"javascript",extensions:[".js.flow"],filenames:[],tmScope:"source.js",aliases:[],codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",interpreters:["chakra","d8","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell"],parsers:["flow","babel-flow"],vscodeLanguageIds:["javascript"],linguistLanguageId:183},{name:"JSX",type:"programming",aceMode:"javascript",extensions:[".jsx"],filenames:void 0,tmScope:"source.js.jsx",aliases:void 0,codemirrorMode:"jsx",codemirrorMimeType:"text/jsx",interpreters:void 0,parsers:["babel","babel-flow","babel-ts","flow","typescript","espree","meriyah"],vscodeLanguageIds:["javascriptreact"],group:"JavaScript",linguistLanguageId:183},{name:"TypeScript",type:"programming",aceMode:"typescript",extensions:[".ts",".cts",".mts"],tmScope:"source.ts",aliases:["ts"],codemirrorMode:"javascript",codemirrorMimeType:"application/typescript",interpreters:["bun","deno","ts-node","tsx"],parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescript"],linguistLanguageId:378},{name:"TSX",type:"programming",aceMode:"tsx",extensions:[".tsx"],tmScope:"source.tsx",codemirrorMode:"jsx",codemirrorMimeType:"text/typescript-jsx",group:"TypeScript",parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescriptreact"],linguistLanguageId:94901924}],Qe="JavaScript",Wh={arrowParens:{category:Qe,type:"choice",default:"always",description:"Include parentheses around a sole arrow function parameter.",choices:[{value:"always",description:"Always include parens. Example: `(x) => x`"},{value:"avoid",description:"Omit parens when possible. Example: `x => x`"}]},bracketSameLine:Be.bracketSameLine,objectWrap:Be.objectWrap,bracketSpacing:Be.bracketSpacing,jsxBracketSameLine:{category:Qe,type:"boolean",description:"Put > on the last line instead of at a new line.",deprecated:"2.4.0"},semi:{category:Qe,type:"boolean",default:!0,description:"Print semicolons.",oppositeDescription:"Do not print semicolons, except at the beginning of lines which may need them."},experimentalOperatorPosition:{category:Qe,type:"choice",default:"end",description:"Where to print operators when binary expressions wrap lines.",choices:[{value:"start",description:"Print operators at the start of new lines."},{value:"end",description:"Print operators at the end of previous lines."}]},experimentalTernaries:{category:Qe,type:"boolean",default:!1,description:"Use curious ternaries, with the question mark after the condition.",oppositeDescription:"Default behavior of ternaries; keep question marks on the same line as the consequent."},singleQuote:Be.singleQuote,jsxSingleQuote:{category:Qe,type:"boolean",default:!1,description:"Use single quotes in JSX."},quoteProps:{category:Qe,type:"choice",default:"as-needed",description:"Change when properties in objects are quoted.",choices:[{value:"as-needed",description:"Only add quotes around object properties where required."},{value:"consistent",description:"If at least one property in an object requires quotes, quote all properties."},{value:"preserve",description:"Respect the input use of quotes in object properties."}]},trailingComma:{category:Qe,type:"choice",default:"all",description:"Print trailing commas wherever possible when multi-line.",choices:[{value:"all",description:"Trailing commas wherever possible (including function arguments)."},{value:"es5",description:"Trailing commas where valid in ES5 (objects, arrays, etc.)"},{value:"none",description:"No trailing commas."}]},singleAttributePerLine:Be.singleAttributePerLine},Vh=Wh,Xh=[{name:"JSON.stringify",type:"data",aceMode:"json",extensions:[".importmap"],filenames:["package.json","package-lock.json","composer.json"],tmScope:"source.json",aliases:["geojson","jsonl","sarif","topojson"],codemirrorMode:"javascript",codemirrorMimeType:"application/json",parsers:["json-stringify"],vscodeLanguageIds:["json"],linguistLanguageId:174},{name:"JSON",type:"data",aceMode:"json",extensions:[".json",".4DForm",".4DProject",".avsc",".geojson",".gltf",".har",".ice",".JSON-tmLanguage",".json.example",".mcmeta",".sarif",".tact",".tfstate",".tfstate.backup",".topojson",".webapp",".webmanifest",".yy",".yyp"],filenames:[".all-contributorsrc",".arcconfig",".auto-changelog",".c8rc",".htmlhintrc",".imgbotconfig",".nycrc",".tern-config",".tern-project",".watchmanconfig",".babelrc",".jscsrc",".jshintrc",".jslintrc",".swcrc"],tmScope:"source.json",aliases:["geojson","jsonl","sarif","topojson"],codemirrorMode:"javascript",codemirrorMimeType:"application/json",parsers:["json"],vscodeLanguageIds:["json"],linguistLanguageId:174},{name:"JSON with Comments",type:"data",aceMode:"javascript",extensions:[".jsonc",".code-snippets",".code-workspace",".sublime-build",".sublime-color-scheme",".sublime-commands",".sublime-completions",".sublime-keymap",".sublime-macro",".sublime-menu",".sublime-mousemap",".sublime-project",".sublime-settings",".sublime-theme",".sublime-workspace",".sublime_metrics",".sublime_session"],filenames:[],tmScope:"source.json.comments",aliases:["jsonc"],codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",group:"JSON",parsers:["jsonc"],vscodeLanguageIds:["jsonc"],linguistLanguageId:423},{name:"JSON5",type:"data",aceMode:"json5",extensions:[".json5"],tmScope:"source.js",codemirrorMode:"javascript",codemirrorMimeType:"application/json",parsers:["json5"],vscodeLanguageIds:["json5"],linguistLanguageId:175}],Kh=[{name:"Markdown",type:"prose",aceMode:"markdown",extensions:[".md",".livemd",".markdown",".mdown",".mdwn",".mkd",".mkdn",".mkdown",".ronn",".scd",".workbook"],filenames:["contents.lr","README"],tmScope:"text.md",aliases:["md","pandoc"],codemirrorMode:"gfm",codemirrorMimeType:"text/x-gfm",wrap:!0,parsers:["markdown"],vscodeLanguageIds:["markdown"],linguistLanguageId:222},{name:"MDX",type:"prose",aceMode:"markdown",extensions:[".mdx"],filenames:[],tmScope:"text.md",aliases:["md","pandoc"],codemirrorMode:"gfm",codemirrorMimeType:"text/x-gfm",wrap:!0,parsers:["mdx"],vscodeLanguageIds:["mdx"],linguistLanguageId:222}],Yh={proseWrap:Be.proseWrap,singleQuote:Be.singleQuote},zh=Yh,Jh=[{name:"YAML",type:"data",aceMode:"yaml",extensions:[".yml",".mir",".reek",".rviz",".sublime-syntax",".syntax",".yaml",".yaml-tmlanguage",".yaml.sed",".yml.mysql"],filenames:[".clang-format",".clang-tidy",".clangd",".gemrc","CITATION.cff","glide.lock","pixi.lock",".prettierrc",".stylelintrc",".lintstagedrc"],tmScope:"source.yaml",aliases:["yml"],codemirrorMode:"yaml",codemirrorMimeType:"text/x-yaml",parsers:["yaml"],vscodeLanguageIds:["yaml","ansible","dockercompose","github-actions-workflow","home-assistant"],linguistLanguageId:407}],Qh={bracketSpacing:Be.bracketSpacing,singleQuote:Be.singleQuote,proseWrap:Be.proseWrap},Zh=Qh;eF=Ga([{importPlugin:()=>import("./estree-JV5M77BA.js"),printers:["estree","estree-json"]}]),tF={...kh,...Mh,...Gh,...Vh,...zh,...Zh},uF=[...Nh,...jh,...xh,...Hh,...qh,...Xh,...Kh,...Jh],{parsers:rF,printers:nF}=Ga([{importPlugin:()=>import("./acorn-7M27BPGP.js"),parsers:["acorn","espree"]},{importPlugin:()=>import("./angular-DW5TQVCM.js"),parsers:["__ng_action","__ng_binding","__ng_interpolation","__ng_directive"]},{importPlugin:()=>import("./babel-I2RLWM7N.js"),parsers:["babel","babel-flow","babel-ts","__js_expression","__ts_expression","__vue_expression","__vue_ts_expression","__vue_event_binding","__vue_ts_event_binding","__babel_estree","json","json5","jsonc","json-stringify"]},{importPlugin:()=>import("./flow-N4JYPYMQ.js"),parsers:["flow"]},{importPlugin:()=>import("./glimmer-JEV3BXHR.js"),parsers:["glimmer"],printers:["glimmer"]},{importPlugin:()=>import("./graphql-DTF6MHYF.js"),parsers:["graphql"],printers:["graphql"]},{importPlugin:()=>import("./html-LVOJ3RQS.js"),parsers:["html","angular","vue","lwc","mjml"],printers:["html"]},{importPlugin:()=>import("./markdown-J6CE6POI.js"),parsers:["markdown","mdx","remark"],printers:["mdast"]},{importPlugin:()=>import("./meriyah-PNQQZQYI.js"),parsers:["meriyah"]},{importPlugin:()=>import("./postcss-Q36SHOML.js"),parsers:["css","less","scss"],printers:["postcss"]},{importPlugin:()=>import("./typescript-WYPDGPSV.js"),parsers:["typescript"]},{importPlugin:()=>import("./yaml-6KWCJ64X.js"),parsers:["yaml"],printers:["yaml"]}]),iF=[eF,{options:tF,languages:uF,parsers:rF,printers:nF}];qa=aF;DF=oF;cu=new Map;Wa=hF,FF=Pe(jD(),1),EF=lu.sep==="\\"?e=>gu(0,e,"\\","/"):e=>e;vF=AF;BF=_F,bF="3.8.4",Xa={};Fu(Xa,{addDanglingComment:()=>ht,addLeadingComment:()=>jt,addTrailingComment:()=>$t,getAlignmentSize:()=>Pr,getIndentSize:()=>OF,getMaxContinuousCount:()=>LF,getNextNonSpaceNonCommentCharacter:()=>jF,getNextNonSpaceNonCommentCharacterIndex:()=>KF,getPreferredQuote:()=>UF,getStringWidth:()=>W0,hasNewline:()=>et,hasNewlineInRange:()=>qF,hasSpaces:()=>VF,isNextLineEmpty:()=>ZF,isNextLineEmptyAfterIndex:()=>Hr,isPreviousLineEmpty:()=>zF,makeString:()=>QF,skip:()=>Gt,skipEverythingButNewLine:()=>ma,skipInlineComment:()=>$r,skipNewline:()=>mt,skipSpaces:()=>rt,skipToLineEnd:()=>Ea,skipTrailingComment:()=>Mr,skipWhitespace:()=>z0});$r=SF;Mr=wF;xr=RF;Hr=PF;OF=TF;LF=NF;jF=kF,Ka="'",$F='"',Ya=Object.freeze({character:Ka,codePoint:39}),za=Object.freeze({character:$F,codePoint:34}),MF=Object.freeze({preferred:Ya,alternate:za}),xF=Object.freeze({preferred:za,alternate:Ya});UF=HF;qF=GF;VF=WF;Ja=Ze(Ha);up=Ze(Nr,0),rp=Ze((e,t)=>_u(t,{physicalFile:e})),np={errors:yi,optionCategories:Ua,createIsIgnoredFunction:Va,formatOptionsHiddenDefaults:nr,normalizeOptions:wa,getSupportInfoWithoutPlugins:Nr,normalizeOptionSettings:ba,inferParser:(e,t)=>Promise.resolve(t?.parser??rp(e,t)),vnopts:{ChoiceSchema:_i,apiDescriptor:Ft},fastGlob:XD.default,createTwoFilesPatch:WD,picocolors:KD.default,closetLevenshteinMatch:Ei,utilities:{omit:vF,createMockable:Bi}},ip={parse:Ze(vh),formatAST:Ze(_h),formatDoc:Ze(yh),printToDoc:Ze(Bh),printDocToString:Ze(bh),mockable:bi}});export{Tu as a,$D as b,sa as c,f0 as d,BF as e,bF as f,Xa as g,Ja as h,Qa as i,ep as j,tp as k,up as l,np as m,ip as n,ap as o};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as a}from"./chunk-VKWPEFWQ.js";a();
|