@shopify/cli 4.9.5 → 5.0.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/analytics-Q6QDIDYT.js +1 -0
- package/dist/analytics-VKKJNJ62.js +1 -0
- package/dist/assets/hydrogen/starter/CHANGELOG.md +7 -0
- package/dist/assets/hydrogen/starter/package.json +2 -2
- package/dist/assets/hydrogen/vite/package.json +3 -4
- package/dist/assets/hydrogen/vite/vite.config.js +3 -3
- package/dist/bootstrap.js +1 -1
- package/dist/{chunk-MZL6VM3W.js → chunk-24NUJTIH.js} +1 -1
- package/dist/chunk-2CMEKSI7.js +1 -0
- package/dist/chunk-2DID73ML.js +1 -0
- package/dist/chunk-2ORRV7GH.js +1 -0
- package/dist/chunk-2VSNFOKD.js +1 -0
- package/dist/chunk-335BUVBP.js +1 -0
- package/dist/{chunk-PT3OZEBI.js → chunk-3A3DZVEJ.js} +1 -1
- package/dist/chunk-3C6VLJ5D.js +319 -0
- package/dist/{chunk-LCMDVUVO.js → chunk-3G4HJO72.js} +30 -30
- package/dist/chunk-3LVCG4JB.js +1 -0
- package/dist/chunk-43KLFFP7.js +1 -0
- package/dist/{chunk-QLHPTMIH.js → chunk-43R5VGKT.js} +1 -1
- package/dist/chunk-46MSIQ6Z.js +1 -0
- package/dist/chunk-4ARCB6DT.js +1 -0
- package/dist/chunk-4C2DAX5T.js +1 -0
- package/dist/chunk-4CRBTSVP.js +2 -0
- package/dist/chunk-4GCI2YCZ.js +8 -0
- package/dist/chunk-4GOJQKY5.js +1 -0
- package/dist/chunk-4RDFMBRG.js +9 -0
- package/dist/chunk-4SS6DXC7.js +5 -0
- package/dist/{chunk-Z4DESIR5.js → chunk-4TI7U2PN.js} +1 -1
- package/dist/{chunk-7BWSN3SG.js → chunk-52FDK2LC.js} +1 -1
- package/dist/chunk-53BG3NLH.js +3 -0
- package/dist/{chunk-LD6ZCTZ3.js → chunk-5B76DT7X.js} +1 -1
- package/dist/{chunk-YN4FSUFF.js → chunk-5NEGOQT6.js} +1 -1
- package/dist/{chunk-PFXDXD5O.js → chunk-5OMJFPQW.js} +1 -1
- package/dist/chunk-5TB52UUV.js +2 -0
- package/dist/chunk-5UWMXOHM.js +7 -0
- package/dist/chunk-6BNKBCCU.js +1 -0
- package/dist/chunk-6DXP7PQ7.js +1 -0
- package/dist/chunk-6PUU6ZNQ.js +1 -0
- package/dist/chunk-7GHSE7SG.js +1 -0
- package/dist/{chunk-5O7JTVO2.js → chunk-7IFE4UQY.js} +1 -1
- package/dist/chunk-7LAKWAKX.js +25 -0
- package/dist/chunk-7MVWDCI3.js +1 -0
- package/dist/chunk-7NSK77WG.js +3 -0
- package/dist/chunk-7QUZWCJZ.js +3 -0
- package/dist/chunk-7RPFJZLP.js +1 -0
- package/dist/{chunk-35NTERVR.js → chunk-7UOA4DI7.js} +2 -2
- package/dist/chunk-7WPUV7GY.js +6 -0
- package/dist/chunk-7Y7AZRL3.js +10 -0
- package/dist/{chunk-SEXH4EP5.js → chunk-ACA2BGAD.js} +1 -1
- package/dist/chunk-AJMDF3QC.js +1 -0
- package/dist/{chunk-CEQ5S3HH.js → chunk-AXC2MHHO.js} +1 -1
- package/dist/{chunk-5GFVMGAZ.js → chunk-AYL6KBPE.js} +1 -1
- package/dist/chunk-BAHIL37I.js +1 -0
- package/dist/{chunk-S6A7TMR4.js → chunk-BCYTZ7LM.js} +1 -1
- package/dist/{chunk-4VS7YD53.js → chunk-BJPDJIS4.js} +1 -1
- package/dist/{chunk-AJMJQA4J.js → chunk-BN7ZXAZJ.js} +1 -1
- package/dist/chunk-BVSKBX7T.js +16 -0
- package/dist/chunk-BWRNXCVN.js +4 -0
- package/dist/{chunk-ANG44FIF.js → chunk-C3KEDG33.js} +1 -1
- package/dist/{chunk-4BXQTW5G.js → chunk-C7V755IT.js} +1 -1
- package/dist/chunk-CCMDZX35.js +7 -0
- package/dist/chunk-CCQNP5YR.js +1 -0
- package/dist/chunk-CEIJKJOF.js +11 -0
- package/dist/chunk-CIK5BF7V.js +1 -0
- package/dist/{chunk-YIZAQABE.js → chunk-CVVQQLCF.js} +1 -1
- package/dist/chunk-CW2T7EOQ.js +1 -0
- package/dist/chunk-CZ22VZDA.js +376 -0
- package/dist/{chunk-VSFZEGIK.js → chunk-D7NB7YR6.js} +1 -1
- package/dist/{chunk-2VGPNRHH.js → chunk-DFQ4WTET.js} +2 -2
- package/dist/chunk-DJAZBPYA.js +3 -0
- package/dist/chunk-DNMXVMJM.js +47 -0
- package/dist/{chunk-G362JEAV.js → chunk-EGCWR5AS.js} +1 -1
- package/dist/{chunk-7LB6DPB6.js → chunk-EITIW5OX.js} +1 -1
- package/dist/chunk-EMSF57ZB.js +1 -0
- package/dist/{chunk-2II4W4ZF.js → chunk-EXFBZPZS.js} +1 -1
- package/dist/chunk-FDXHQZTO.js +26 -0
- package/dist/{chunk-YLCYRG2T.js → chunk-FFHH5LOR.js} +1 -1
- package/dist/{chunk-KOS53Z7E.js → chunk-FNLECT7B.js} +1 -1
- package/dist/{chunk-MTBABHUB.js → chunk-FWB3GLMW.js} +1 -1
- package/dist/chunk-FZCGRIOM.js +1 -0
- package/dist/{chunk-ND6O6KT6.js → chunk-G6ZMSWEU.js} +1 -1
- package/dist/chunk-GAMC2BNY.js +7 -0
- package/dist/chunk-GB6E3ATN.js +4 -0
- package/dist/chunk-GCNA3HXH.js +8 -0
- package/dist/{chunk-PIGERIRY.js → chunk-GFVKTWFT.js} +1 -1
- package/dist/chunk-GQNOVEKP.js +2 -0
- package/dist/{chunk-WGO2GC6I.js → chunk-GRGFA26K.js} +1 -1
- package/dist/chunk-GXORLBVN.js +2 -0
- package/dist/{chunk-HB4YI2PF.js → chunk-H4V55Y3Z.js} +118 -118
- package/dist/chunk-HCZG7YJ6.js +16 -0
- package/dist/chunk-HF4NDEX3.js +1 -0
- package/dist/chunk-HIRTL45Q.js +1 -0
- package/dist/chunk-I4OVLRQR.js +1 -0
- package/dist/{chunk-RUDHGUIM.js → chunk-I6FRVYGE.js} +1 -1
- package/dist/chunk-IEQ4UOH3.js +4 -0
- package/dist/{chunk-PIZDYS7T.js → chunk-IILLQOUC.js} +60 -60
- package/dist/{chunk-LG6DGIFX.js → chunk-IQVRP7CT.js} +1 -1
- package/dist/{chunk-5VRB3FBD.js → chunk-IUP7POIE.js} +1 -1
- package/dist/chunk-IUTZIN2T.js +10 -0
- package/dist/chunk-IWEKM5Y3.js +1 -0
- package/dist/chunk-IWTNUJGY.js +2 -0
- package/dist/chunk-J6TW43TG.js +1 -0
- package/dist/chunk-JDR6UVZA.js +8 -0
- package/dist/{chunk-NHE46R6C.js → chunk-JEA3C7ON.js} +1 -1
- package/dist/chunk-JOJV5E2K.js +1 -0
- package/dist/chunk-JYMDWR25.js +1 -0
- package/dist/{chunk-EAVD3OH2.js → chunk-KDPQXURV.js} +1 -1
- package/dist/{chunk-DO5YFMTJ.js → chunk-KGRIYAMA.js} +1 -1
- package/dist/chunk-KJQDS5HI.js +1 -0
- package/dist/chunk-KKPOOIE4.js +2 -0
- package/dist/{chunk-4IAGBAQD.js → chunk-KSDU4YOB.js} +1 -1
- package/dist/chunk-L7MSPGDS.js +5 -0
- package/dist/{chunk-JPFHPVIO.js → chunk-LDU5T3DN.js} +1 -1
- package/dist/chunk-LHKVXJPX.js +1 -0
- package/dist/{chunk-VG5ZDVDQ.js → chunk-LMQGNECW.js} +86 -200
- package/dist/{chunk-TQ7URMGS.js → chunk-LQ7ENG4V.js} +1 -1
- package/dist/chunk-LVLAOBJM.js +103 -0
- package/dist/chunk-LWCTKI4Z.js +18 -0
- package/dist/chunk-M3ACZWMR.js +1 -0
- package/dist/chunk-M4BVLMPH.js +31 -0
- package/dist/{chunk-WKVFVT3H.js → chunk-M5TGCSUK.js} +1 -1
- package/dist/chunk-M7LPHCP2.js +274 -0
- package/dist/{chunk-QBIYAMSH.js → chunk-MDRVCBDO.js} +1 -1
- package/dist/chunk-MR2AUT7Q.js +1 -0
- package/dist/chunk-MXJAH2GW.js +5 -0
- package/dist/{chunk-EO422KZZ.js → chunk-MYAIWSOO.js} +1 -1
- package/dist/{chunk-Y5VFOLNQ.js → chunk-N2RFDHRY.js} +1 -1
- package/dist/{chunk-7DSH4CRU.js → chunk-NB4BRW3H.js} +1 -1
- package/dist/chunk-NDKSG4CC.js +97 -0
- package/dist/chunk-NK2MGR6A.js +1 -0
- package/dist/chunk-NOH63WC6.js +12 -0
- package/dist/{chunk-3XAD2E55.js → chunk-OGWPS55W.js} +1 -1
- package/dist/chunk-OQ5CLM2H.js +4 -0
- package/dist/{chunk-MQ4WV4B6.js → chunk-OQU3HLAE.js} +1 -1
- package/dist/chunk-OVWUGAEU.js +11 -0
- package/dist/chunk-OX7UVDSU.js +6 -0
- package/dist/chunk-P33TONYG.js +1 -0
- package/dist/chunk-PEVIRAMR.js +6 -0
- package/dist/{chunk-LLNUIGHP.js → chunk-PGLWZMJU.js} +4 -4
- package/dist/chunk-PIAD3F6M.js +16 -0
- package/dist/chunk-PMHP57MH.js +20 -0
- package/dist/{chunk-XTOOTN4P.js → chunk-POKY4RWR.js} +1 -1
- package/dist/chunk-PSSYLJG4.js +2 -0
- package/dist/chunk-PYIICTLX.js +1 -0
- package/dist/chunk-PZUGDE7N.js +2 -0
- package/dist/{chunk-SUTVPAJF.js → chunk-Q2SZCZE7.js} +1 -1
- package/dist/{chunk-EZG5EB7D.js → chunk-Q2XRITUG.js} +1 -1
- package/dist/chunk-Q5MEFIMV.js +4 -0
- package/dist/chunk-Q66CI37F.js +7 -0
- package/dist/chunk-QFWWCZOI.js +1 -0
- package/dist/{chunk-TR4OWSEX.js → chunk-QFYLJVJW.js} +1 -1
- package/dist/chunk-QKVVJXWS.js +3 -0
- package/dist/chunk-QN3774QI.js +1 -0
- package/dist/chunk-R2BDABJD.js +213 -0
- package/dist/{chunk-RW3P3UMU.js → chunk-R7EMV77H.js} +2 -2
- package/dist/chunk-RFGEM5JC.js +3 -0
- package/dist/{chunk-HY6EXJBZ.js → chunk-RVQV6G5M.js} +1 -1
- package/dist/chunk-S67I4E7M.js +5 -0
- package/dist/chunk-SFPXYHHL.js +1 -0
- package/dist/{chunk-XPDHT3Z4.js → chunk-SFQEHDJY.js} +1 -1
- package/dist/chunk-SL3VBI62.js +3 -0
- package/dist/{chunk-5XTJ4OL4.js → chunk-SNNZ4U2W.js} +1 -1
- package/dist/chunk-T2IUXXCT.js +1 -0
- package/dist/chunk-TPSA4JN5.js +1 -0
- package/dist/chunk-TTEF7GTX.js +1 -0
- package/dist/{chunk-BAHM64B4.js → chunk-U25W35TX.js} +1 -1
- package/dist/chunk-UIQL5ZF3.js +1 -0
- package/dist/chunk-UK6576EO.js +1 -0
- package/dist/chunk-ULD7CIOY.js +4 -0
- package/dist/{chunk-65GNYRYR.js → chunk-UOS2XLGG.js} +2 -2
- package/dist/{chunk-VNG2I7NM.js → chunk-UVRKTMF7.js} +1 -1
- package/dist/{chunk-BD2L6YE5.js → chunk-UWMZ5CSB.js} +1 -1
- package/dist/chunk-UZROQRLX.js +2 -0
- package/dist/{chunk-5BGUKF7L.js → chunk-V75WUEFU.js} +1 -1
- package/dist/chunk-VB7YQMAM.js +5 -0
- package/dist/chunk-VHUD3CBC.js +3 -0
- package/dist/chunk-VMMUJN4T.js +17 -0
- package/dist/{chunk-T3UCIWRH.js → chunk-VW6QS7DO.js} +1 -1
- package/dist/chunk-VWH3VPYI.js +1 -0
- package/dist/{chunk-4TF7ER72.js → chunk-WBJ6ZHYH.js} +1 -1
- package/dist/chunk-WDFCOZAY.js +16 -0
- package/dist/chunk-WFWISGLS.js +1 -0
- package/dist/chunk-WGUOLSMG.js +1 -0
- package/dist/{chunk-VTOPYXHO.js → chunk-WJSUIUBW.js} +2 -2
- package/dist/{chunk-762IKULK.js → chunk-WMAFG2JD.js} +1 -1
- package/dist/chunk-X2H6I2WW.js +5 -0
- package/dist/{chunk-MWWULCLD.js → chunk-X7HVAVSZ.js} +1 -1
- package/dist/{chunk-MF7IHOM5.js → chunk-XBQDMGUN.js} +1 -1
- package/dist/chunk-XITZIDCL.js +18 -0
- package/dist/chunk-XKRJKUA7.js +1 -0
- package/dist/{chunk-K6FH5JSY.js → chunk-XM7YUXTF.js} +2 -2
- package/dist/chunk-XMODGI45.js +1 -0
- package/dist/{chunk-5NCWBBRW.js → chunk-XNNKLUTN.js} +1 -1
- package/dist/chunk-XTREQ4A2.js +1 -0
- package/dist/chunk-YGYEM6QO.js +1 -0
- package/dist/{chunk-XVFQ6CNO.js → chunk-YKS7MH3F.js} +9 -6
- package/dist/chunk-YTUDXZLN.js +1 -0
- package/dist/{chunk-I3J63RFV.js → chunk-YTUUU33R.js} +1 -1
- package/dist/chunk-YVVU4J5O.js +3 -0
- package/dist/{chunk-QUO4RD3W.js → chunk-YVY32DNA.js} +1 -1
- package/dist/chunk-Z5SILNH2.js +7 -0
- package/dist/chunk-ZAA2DXK5.js +5 -0
- package/dist/chunk-ZDQO6CNY.js +1 -0
- package/dist/chunk-ZGV3HNEV.js +1 -0
- package/dist/chunk-ZQDDRIBA.js +22 -0
- package/dist/{chunk-AODTY2BL.js → chunk-ZT5WFUKJ.js} +4 -4
- package/dist/chunk-ZYQ2XWC5.js +5 -0
- package/dist/cli/commands/app/build.js +1 -1
- package/dist/cli/commands/app/bulk/cancel.js +1 -1
- package/dist/cli/commands/app/bulk/execute.js +1 -1
- package/dist/cli/commands/app/bulk/status.js +1 -1
- package/dist/cli/commands/app/config/link.js +1 -1
- package/dist/cli/commands/app/config/pull.js +1 -1
- package/dist/cli/commands/app/config/use.js +1 -1
- package/dist/cli/commands/app/config/validate.js +1 -1
- package/dist/cli/commands/app/demo/watcher.js +1 -1
- package/dist/cli/commands/app/deploy.js +1 -1
- package/dist/cli/commands/app/dev/clean.js +1 -1
- package/dist/cli/commands/app/dev.js +1 -1
- package/dist/cli/commands/app/env/pull.js +1 -1
- package/dist/cli/commands/app/env/show.js +1 -1
- package/dist/cli/commands/app/execute.js +1 -1
- package/dist/cli/commands/app/function/build.js +1 -1
- package/dist/cli/commands/app/function/info.js +1 -1
- package/dist/cli/commands/app/function/replay.js +1 -1
- package/dist/cli/commands/app/function/run.js +1 -1
- package/dist/cli/commands/app/function/schema.js +1 -1
- package/dist/cli/commands/app/function/typegen.js +1 -1
- package/dist/cli/commands/app/generate/extension.js +1 -1
- package/dist/cli/commands/app/graphiql.js +1 -1
- package/dist/cli/commands/app/import/channel-config.js +1 -1
- package/dist/cli/commands/app/import/custom-data-definitions.js +1 -1
- package/dist/cli/commands/app/import/dashboard-extensions.js +1 -1
- package/dist/cli/commands/app/import-custom-data-definitions.js +1 -1
- package/dist/cli/commands/app/import-extensions.js +1 -1
- package/dist/cli/commands/app/info.js +1 -1
- package/dist/cli/commands/app/init.js +1 -1
- package/dist/cli/commands/app/logs.js +1 -1
- package/dist/cli/commands/app/release.js +1 -1
- package/dist/cli/commands/app/security/check.js +1 -1
- package/dist/cli/commands/app/security/clean.js +1 -1
- package/dist/cli/commands/app/security/instructions.js +1 -1
- package/dist/cli/commands/app/security/record.js +1 -1
- package/dist/cli/commands/app/security/review.js +1 -1
- package/dist/cli/commands/app/subscription-migrations/cancel.js +1 -1
- package/dist/cli/commands/app/subscription-migrations/list.js +1 -1
- package/dist/cli/commands/app/subscription-migrations/schedule.js +1 -1
- package/dist/cli/commands/app/subscription-migrations/status.js +1 -1
- package/dist/cli/commands/app/subscription-migrations/unschedule.js +1 -1
- package/dist/cli/commands/app/versions/list.js +1 -1
- package/dist/cli/commands/app/webhook/trigger.js +1 -1
- package/dist/cli/commands/auth/login.js +1 -1
- package/dist/cli/commands/auth/logout.js +1 -1
- package/dist/cli/commands/cache/clear.js +1 -1
- package/dist/cli/commands/config/autoupgrade/off.js +1 -1
- package/dist/cli/commands/config/autoupgrade/on.js +1 -1
- package/dist/cli/commands/config/autoupgrade/status.js +1 -1
- package/dist/cli/commands/debug/command-flags.js +1 -1
- package/dist/cli/commands/doc/fetch.d.ts +34 -1
- package/dist/cli/commands/doc/fetch.js +1 -1
- package/dist/cli/commands/doc/search.d.ts +53 -1
- package/dist/cli/commands/doc/search.js +1 -1
- package/dist/cli/commands/docs/generate.js +1 -1
- package/dist/cli/commands/doctor-release/doctor-release.js +1 -1
- package/dist/cli/commands/doctor-release/theme/index.js +1 -1
- package/dist/cli/commands/help.d.ts +6 -6
- package/dist/cli/commands/help.js +1 -1
- package/dist/cli/commands/kitchen-sink/async.js +1 -1
- package/dist/cli/commands/kitchen-sink/index.js +1 -1
- package/dist/cli/commands/kitchen-sink/prompts.js +1 -1
- package/dist/cli/commands/kitchen-sink/static.js +1 -1
- package/dist/cli/commands/notifications/generate.js +1 -1
- package/dist/cli/commands/notifications/list.js +1 -1
- package/dist/cli/commands/organization/list.js +1 -1
- package/dist/cli/commands/search.js +1 -1
- package/dist/cli/commands/send-analytics.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.d.ts +64 -0
- package/dist/cli/commands/upgrade.js +1 -1
- package/dist/cli/commands/version.js +1 -1
- package/dist/cli/help.js +1 -1
- package/dist/cli/services/commands/doc/fetch-result.d.ts +2 -0
- package/dist/cli/services/commands/doc/fetch-result.js +22 -0
- package/dist/cli/services/commands/doc/fetch.d.ts +2 -1
- package/dist/cli/services/commands/doc/fetch.js +2 -15
- package/dist/cli/services/commands/doc/search-result.d.ts +2 -0
- package/dist/cli/services/commands/doc/search-result.js +14 -0
- package/dist/cli/services/commands/doc/search.d.ts +9 -1
- package/dist/cli/services/commands/doc/search.js +27 -2
- package/dist/cli/services/commands/doc/types.d.ts +107 -0
- package/dist/cli/services/commands/doc/types.js +47 -0
- package/dist/cli/services/commands/help/types.d.ts +6 -6
- package/dist/command-event-context-LFUZ7UCA.js +1 -0
- package/dist/command-json-schema-2UMKY7MY.js +1 -0
- package/dist/command-registry.js +1 -1
- package/dist/conf-store-RI3TL6I4.js +1 -0
- package/dist/custom-oclif-loader-IZCKN67O.js +1 -0
- package/dist/deprecations-IFVUXXDB.js +1 -0
- package/dist/dist-4H2B7BMN.js +1 -0
- package/dist/dist-QNWOGQN3.js +1 -0
- package/dist/{environment-RSUK27TA.js → environment-O7ECODHU.js} +1 -1
- package/dist/environments-CYMEN7NV.js +1 -0
- package/dist/error-IL6WQMSW.js +1 -0
- package/dist/error-handler-74HKA23T.js +1 -0
- package/dist/fs-AINFLJ2E.js +1 -0
- 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/index.js +13 -13
- package/dist/is-global-2VLKV46Q.js +1 -0
- package/dist/json-error-HZB5YIHV.js +1 -0
- package/dist/{lib-TYM5B75S.js → lib-PJHT4MKY.js} +1 -1
- package/dist/{lib-55QUD4AJ.js → lib-VKSQ65BQ.js} +1 -1
- package/dist/{lib-PH52G55H.js → lib-YEZOHXF3.js} +1 -1
- package/dist/{local-ZZGRGYUP.js → local-KOZETREJ.js} +1 -1
- package/dist/{metadata-YQNVKC2R.js → metadata-IBPHZB7N.js} +1 -1
- package/dist/{morph-BABFBRSW.js → morph-CRY35DIK.js} +1 -1
- package/dist/node-package-manager-DXSRNEDC.js +1 -0
- package/dist/notifications-system-XA3EBOGJ.js +1 -0
- package/dist/os-X73O7BAB.js +1 -0
- package/dist/out-B2GISN65.js +1 -0
- package/dist/output-3OYXK3Z5.js +1 -0
- package/dist/{path-CPAYTWQW.js → path-3L2QRACZ.js} +1 -1
- package/dist/system-JWYYT4PM.js +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui-PCG5D6RZ.js +1 -0
- package/dist/upgrade-7U2TUNC4.js +1 -0
- package/dist/version-7DGU2KYH.js +1 -0
- package/dist/version-SXQTRBXB.js +1 -0
- package/dist/workerd-MQZ3NKJI.js +18 -0
- package/oclif.manifest.json +1664 -427
- package/package.json +8 -8
- package/dist/analytics-PBZEKUGU.js +0 -1
- package/dist/analytics-WVGBNFGK.js +0 -1
- package/dist/chunk-2EC5SUGK.js +0 -19
- package/dist/chunk-2QENUJVG.js +0 -1
- package/dist/chunk-2RONPKOD.js +0 -1
- package/dist/chunk-2WDJXERZ.js +0 -25
- package/dist/chunk-32NWVYUC.js +0 -1
- package/dist/chunk-32RRWGNS.js +0 -1
- package/dist/chunk-32VQQ6EU.js +0 -1
- package/dist/chunk-34RFTE5T.js +0 -4
- package/dist/chunk-35VQQKVX.js +0 -1
- package/dist/chunk-3N6NKC2U.js +0 -1
- package/dist/chunk-3Q5BAPQK.js +0 -7
- package/dist/chunk-42DMJGOW.js +0 -2
- package/dist/chunk-4CTTWXUX.js +0 -32
- package/dist/chunk-4HBKQUKY.js +0 -1
- package/dist/chunk-4MQXMIWQ.js +0 -7
- package/dist/chunk-5APLAJCB.js +0 -3
- package/dist/chunk-5AQNISGC.js +0 -1
- package/dist/chunk-5OM72O4N.js +0 -1
- package/dist/chunk-5SLKHURV.js +0 -1
- package/dist/chunk-62GA7XR3.js +0 -18
- package/dist/chunk-62LMVFR7.js +0 -1
- package/dist/chunk-6IDEDOXW.js +0 -2
- package/dist/chunk-72CBJYAG.js +0 -16
- package/dist/chunk-7E4MJCVE.js +0 -10
- package/dist/chunk-7HZU7CYS.js +0 -1
- package/dist/chunk-7Q4EKY3E.js +0 -3
- package/dist/chunk-7YXHILW4.js +0 -383
- package/dist/chunk-7Z6IX7MU.js +0 -1
- package/dist/chunk-A4XREDFZ.js +0 -1
- package/dist/chunk-AHNLGCHF.js +0 -5
- package/dist/chunk-ARRRFY6S.js +0 -4
- package/dist/chunk-BAP2CHI2.js +0 -1
- package/dist/chunk-BQWK222Q.js +0 -1
- package/dist/chunk-C3PXIZY3.js +0 -8
- package/dist/chunk-C6HGU77I.js +0 -1
- package/dist/chunk-CBFAU5AF.js +0 -5
- package/dist/chunk-COP2Q2YT.js +0 -1
- package/dist/chunk-CSWDRG3E.js +0 -1
- package/dist/chunk-CVBWEUWX.js +0 -1
- package/dist/chunk-D3NVUE65.js +0 -1
- package/dist/chunk-DCKRQZLE.js +0 -20
- package/dist/chunk-DYH3ZXJS.js +0 -15
- package/dist/chunk-EBX6DYDX.js +0 -2
- package/dist/chunk-EDRCFY3K.js +0 -16
- package/dist/chunk-EEAY7HFW.js +0 -317
- package/dist/chunk-EJMLNBZA.js +0 -275
- package/dist/chunk-EO3S2TFI.js +0 -2
- package/dist/chunk-EOIGDOUD.js +0 -7
- package/dist/chunk-EYKXHMEJ.js +0 -6
- package/dist/chunk-FHV2H3Z2.js +0 -12
- package/dist/chunk-FOAV642V.js +0 -1
- package/dist/chunk-FVTP7EO4.js +0 -46
- package/dist/chunk-FYIC4JHB.js +0 -26
- package/dist/chunk-GF36WNMH.js +0 -5
- package/dist/chunk-GJ3QUZO6.js +0 -1
- package/dist/chunk-GJZVUEMP.js +0 -11
- package/dist/chunk-GP6O7YRO.js +0 -20
- package/dist/chunk-GW424AJO.js +0 -7
- package/dist/chunk-GXSF6NCR.js +0 -1
- package/dist/chunk-GYVQIRBD.js +0 -1
- package/dist/chunk-H3ZPYOQV.js +0 -1
- package/dist/chunk-H7YSZKZ2.js +0 -1
- package/dist/chunk-HILYTMVA.js +0 -1
- package/dist/chunk-HMWQOQAQ.js +0 -2
- package/dist/chunk-HNSRF4SQ.js +0 -1
- package/dist/chunk-HTODXNY6.js +0 -3
- package/dist/chunk-IUYVJJKE.js +0 -9
- package/dist/chunk-JM2CQP64.js +0 -97
- package/dist/chunk-K4AF7A25.js +0 -1
- package/dist/chunk-KDV4WR5A.js +0 -4
- package/dist/chunk-KF7NL5YM.js +0 -8
- package/dist/chunk-KMJTO7CU.js +0 -103
- package/dist/chunk-KN3MUEWA.js +0 -4
- package/dist/chunk-KYB4JX76.js +0 -5
- package/dist/chunk-LJAU6YHF.js +0 -10
- package/dist/chunk-LMQOFVRC.js +0 -17
- package/dist/chunk-LQSD25YS.js +0 -3
- package/dist/chunk-M2HQFHNO.js +0 -1
- package/dist/chunk-M5WBYWSQ.js +0 -7
- package/dist/chunk-N47RQHEI.js +0 -2
- package/dist/chunk-NRG2WPSM.js +0 -1
- package/dist/chunk-O2CP7DQE.js +0 -1
- package/dist/chunk-O6FXUKI2.js +0 -2
- package/dist/chunk-OHJUEUSA.js +0 -1
- package/dist/chunk-OOKTWSGP.js +0 -4
- package/dist/chunk-OONMCK7X.js +0 -1
- package/dist/chunk-OWK2RI4O.js +0 -6
- package/dist/chunk-P2UEQJJ4.js +0 -5
- package/dist/chunk-QBJ74XPX.js +0 -18
- package/dist/chunk-QGFJOTOH.js +0 -4
- package/dist/chunk-RIO5HKD5.js +0 -1
- package/dist/chunk-S7EKUSO6.js +0 -3
- package/dist/chunk-SJ2ROSXG.js +0 -1
- package/dist/chunk-SNTRSP5K.js +0 -359
- package/dist/chunk-SYCN2GT2.js +0 -3
- package/dist/chunk-TBNEN73P.js +0 -1
- package/dist/chunk-TVI7TQ4C.js +0 -16
- package/dist/chunk-TYMYIUIQ.js +0 -1
- package/dist/chunk-UEQT7TA4.js +0 -1
- package/dist/chunk-UUM367NR.js +0 -5
- package/dist/chunk-V5FZRNXI.js +0 -1
- package/dist/chunk-VE35YELD.js +0 -1
- package/dist/chunk-WEICJ4GW.js +0 -1
- package/dist/chunk-WJJXJNNP.js +0 -3
- package/dist/chunk-XAQUXFN5.js +0 -1
- package/dist/chunk-XE6EUHSS.js +0 -2
- package/dist/chunk-XFEJS652.js +0 -16
- package/dist/chunk-XI4QEULN.js +0 -1
- package/dist/chunk-XP63T4KZ.js +0 -5
- package/dist/chunk-XRCAUZAZ.js +0 -8
- package/dist/chunk-XSRZWJIJ.js +0 -1
- package/dist/chunk-YFJELEVH.js +0 -1
- package/dist/chunk-YNJIDLI3.js +0 -7
- package/dist/chunk-YRX4E67D.js +0 -6
- package/dist/chunk-Z2NL6XQK.js +0 -6
- package/dist/chunk-Z6Z5DPKS.js +0 -1
- package/dist/chunk-ZOE6WXW6.js +0 -1
- package/dist/cli/commands/app/app-logs/sources.js +0 -1
- package/dist/command-json-schema-3RP5P43D.js +0 -1
- package/dist/conf-store-XORTWCKZ.js +0 -1
- package/dist/custom-oclif-loader-ZRYPPYIP.js +0 -1
- package/dist/deprecations-AZDMCRNN.js +0 -1
- package/dist/dist-DTBXLVHF.js +0 -1
- package/dist/dist-SOYIDACZ.js +0 -1
- package/dist/environments-L42SEHB4.js +0 -1
- package/dist/error-H6B5BHYC.js +0 -1
- package/dist/error-handler-JB752NKM.js +0 -1
- package/dist/fs-XHZY6MNM.js +0 -1
- package/dist/is-global-2NBDZWLC.js +0 -1
- package/dist/json-error-OHV2KQFY.js +0 -1
- package/dist/node-package-manager-LN2Y7FQ2.js +0 -1
- package/dist/notifications-system-HWJ3F44U.js +0 -1
- package/dist/os-MHOCCDIB.js +0 -1
- package/dist/out-53ABAVL7.js +0 -1
- package/dist/output-GILH4S6M.js +0 -1
- package/dist/system-6WYK24ET.js +0 -1
- package/dist/ui-RP6SVJUK.js +0 -1
- package/dist/upgrade-5G7FBJJV.js +0 -1
- package/dist/version-TOBC7X2C.js +0 -1
- package/dist/version-UIRCT6RC.js +0 -1
- package/dist/workerd-ARH2OCYL.js +0 -18
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
import{a as w0,b as b0}from"./chunk-7UOA4DI7.js";import{b as C0,o as H8}from"./chunk-YLQ3LNNY.js";import{$ as B0,A as Bd,B as Rd,D as Nr,E as S0,F as Di,G as x0,H as Nd,I as P0,J as Je,K as Go,L as Vo,M as O0,N as io,O as Jo,P as Ko,Q as pr,R as Gc,S as $n,T as Ie,U as mi,V as dr,W as vs,X as T0,Y as Vc,_ as I0,aa as Jc,ca as Yo,da as R0,ea as N0,fa as M0,g as _0,ga as j0,ja as $0,ka as L0,la as U0,ma as k0,o as y0,oa as q0,p as F0,pa as Md,q as E0,qa as W0,r as Id,s as jn,t as zo,ta as H0,ua as Kc,x as Hc,y as zc,z as A0}from"./chunk-WDFCOZAY.js";import{a as v0}from"./chunk-D7NB7YR6.js";import{da as q8}from"./chunk-M5TGCSUK.js";import{a as g0}from"./chunk-AJMDF3QC.js";import{a as W8}from"./chunk-VJEKDBGZ.js";import{c as Es,d as wt}from"./chunk-UOS2XLGG.js";import{a as Qy,b as e0}from"./chunk-WMAFG2JD.js";import{a as m0}from"./chunk-POKY4RWR.js";import{a as _n}from"./chunk-IQVRP7CT.js";import{$ as Mc,B as Hy,G as zy,H as Gy,J as Sd,M as Vy,U as j8,V as Jy,W as $8,X as L8,Y as Ky,Z as U8,_ as fr,b as N8,ba as Yy,ca as Ct,e as di,ea as _s,fa as Xy,j as $y,ka as Zy,l as Ly,o as Uy,u as ky}from"./chunk-H4V55Y3Z.js";import{m as jc,n as n0,s as r0,t as i0,w as $c,x as Lc}from"./chunk-IUP7POIE.js";import{d as M8,e as qy,q as Wy}from"./chunk-ZT5WFUKJ.js";import{a as Ed}from"./chunk-4C2DAX5T.js";import{a as Br,b as to}from"./chunk-GRGFA26K.js";import{A as ys,B as Uc,E as u0,F as Mn,G as Pd,I as s0,K as Fs,L as a0,N as c0,T as hi,W as kc,z as no}from"./chunk-CZ22VZDA.js";import{a as k8}from"./chunk-5HBIIYSK.js";import{b as gs,d as Rc,e as Nc}from"./chunk-335BUVBP.js";import{a as bc}from"./chunk-BN7ZXAZJ.js";import{f as xd}from"./chunk-X7HVAVSZ.js";import{h as k,j as ro,k as tn}from"./chunk-2VSNFOKD.js";import{Aa as Iy,Ab as d0,Bb as ce,Cb as Rr,Da as pi,Ea as By,Eb as h0,Fa as Oc,Fb as D0,Ja as Ry,Ka as Ny,L as fi,N as Bt,Na as Tc,Oa as My,Q as B8,R as R8,Sa as K,T as xy,Ta as Rt,V as hs,Va as Ge,Wa as jy,X as vt,Y as wd,_ as bd,_a as lr,aa as xc,ab as Ic,b as A8,c as S8,cb as Bc,da as Py,ea as Ho,f as x8,ha as Oy,i as P8,ib as t0,ja as Ds,k as O8,la as $e,m as by,ma as eo,n as Ay,na as ms,oa as Rn,pa as Pc,q as T8,qb as Se,rb as qc,sb as xe,ta as mt,u as Sy,ua as Ty,v as I8,va as Nn,w as Cd,wb as Wc,yb as p0}from"./chunk-LWCTKI4Z.js";import{b as w8,c as b8,e as Cy,f as wy,i as o0}from"./chunk-B4OMIONW.js";import{b as y,j as Ad}from"./chunk-FZCGRIOM.js";import{g as l0,l as Od,m as Td,n as f0}from"./chunk-3A3DZVEJ.js";import{a as ds}from"./chunk-JD5P5RAJ.js";import{c as B,d as Qi,e as ot,f as Te,g as Wo,h as De,i as ye,j as Ac,k as Fy,m as Sc,n as Ey,r as vy,s as vd}from"./chunk-IWTNUJGY.js";import{a as ze,c as N,e as li,f as C8,g as d}from"./chunk-VKWPEFWQ.js";var iF=N((Xc,rF)=>{d();(function(e,t){typeof Xc=="object"&&typeof rF<"u"?t(Xc,(R8(),C8(B8)),N8()):typeof define=="function"&&define.amd?define(["exports","tslib","graphql"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e["graphql-tag"]={},e.tslib,e.graphql))})(Xc,(function(e,t,n){"use strict";var r=new Map,o=new Map,s=!0,a=!1;function l(q){return q.replace(/[\s,]+/g," ").trim()}function p(q){return l(q.source.body.substring(q.start,q.end))}function D(q){var X=new Set,Q=[];return q.definitions.forEach(function(fe){if(fe.kind==="FragmentDefinition"){var Fe=fe.name.value,We=p(fe.loc),gt=o.get(Fe);gt&&!gt.has(We)?s&&console.warn("Warning: fragment with name "+Fe+` already exists.
|
|
2
|
+
graphql-tag enforces all fragment names across your application to be unique; read more about
|
|
3
|
+
this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):gt||o.set(Fe,gt=new Set),gt.add(We),X.has(We)||(X.add(We),Q.push(fe))}else Q.push(fe)}),t.__assign(t.__assign({},q),{definitions:Q})}function g(q){var X=new Set(q.definitions);X.forEach(function(fe){fe.loc&&delete fe.loc,Object.keys(fe).forEach(function(Fe){var We=fe[Fe];We&&typeof We=="object"&&X.add(We)})});var Q=q.loc;return Q&&(delete Q.startToken,delete Q.endToken),q}function E(q){var X=l(q);if(!r.has(X)){var Q=n.parse(q,{experimentalFragmentVariables:a,allowLegacyFragmentVariables:a,experimentalFragmentArguments:a});if(!Q||Q.kind!=="Document")throw new Error("Not a valid GraphQL document.");r.set(X,g(D(Q)))}return r.get(X)}function w(q){for(var X=[],Q=1;Q<arguments.length;Q++)X[Q-1]=arguments[Q];typeof q=="string"&&(q=[q]);var fe=q[0];return X.forEach(function(Fe,We){Fe&&Fe.kind==="Document"?fe+=Fe.loc.source.body:fe+=Fe,fe+=q[We+1]}),E(fe)}function v(){r.clear(),o.clear()}function S(){s=!1}function O(){a=!0}function P(){a=!1}var I={gql:w,resetCaches:v,disableFragmentWarnings:S,enableExperimentalFragmentVariables:O,disableExperimentalFragmentVariables:P};(function(q){q.gql=I.gql,q.resetCaches=I.resetCaches,q.disableFragmentWarnings=I.disableFragmentWarnings,q.enableExperimentalFragmentVariables=I.enableExperimentalFragmentVariables,q.disableExperimentalFragmentVariables=I.disableExperimentalFragmentVariables})(w||(w={})),w.default=w;var U=w;e.default=U,e.disableExperimentalFragmentVariables=P,e.disableFragmentWarnings=S,e.enableExperimentalFragmentVariables=O,e.gql=w,e.resetCaches=v,Object.defineProperty(e,"__esModule",{value:!0})}))});var uF=N((oz,oF)=>{d();oF.exports=iF().gql});var hF=N(dF=>{d();var rB=Object.create,Zc=Object.defineProperty,iB=Object.getPrototypeOf,oB=Object.prototype.hasOwnProperty,uB=Object.getOwnPropertyNames,sB=Object.getOwnPropertyDescriptor,aF=e=>Zc(e,"__esModule",{value:!0}),aB=(e,t)=>{aF(e);for(var n in t)Zc(e,n,{get:t[n],enumerable:!0})},cB=(e,t,n)=>{if(aF(e),t&&typeof t=="object"||typeof t=="function")for(let r of uB(t))!oB.call(e,r)&&r!=="default"&&Zc(e,r,{get:()=>t[r],enumerable:!(n=sB(t,r))||n.enumerable});return e},Qc=e=>e&&e.__esModule?e:cB(Zc(e!=null?rB(iB(e)):{},"default",{value:e,enumerable:!0}),e);aB(dF,{default:()=>_B,generateContentsFromGraphqlString:()=>pF,generateGraphQLString:()=>lF});var lB=Qc(ze("fs")),fB=Qc(uF()),pB=Qc(ze("readline")),sF=Qc(ze("path")),cF=(e,t)=>{let n=t?t(e):e;return JSON.stringify(n,(r,o)=>o===void 0?"__undefined":o).replace(/"__undefined"/g,"undefined")},dB=(e,t)=>{let n=new Set,r=[],o=s=>{n.has(s)||(n.add(s),s.imports.forEach(a=>{let l=t[a.absolutePath];o(l)}),r.unshift(s))};return e.forEach(o),r},hB=e=>new Promise(t=>{let n=pB.default.createInterface({input:lB.default.createReadStream(e)}),r="",o=[],s=!1,a=(l,p)=>{let D=p.replace(l,""),g=D.replace(/"|'/g,""),E=sF.default.join(sF.default.dirname(e),g);o.push({absolutePath:E,relativePath:D})};n.on("line",l=>{l.startsWith("#import ")?a("#import ",l):l.startsWith("# import ")?a("# import ",l):s?r+=l+`
|
|
4
|
+
`:l[0]!=="#"&&l!==""&&(s=!0,r+=l+`
|
|
5
|
+
`)}),n.on("close",()=>{t({body:r.trim(),filePath:e,imports:o})})}),lF=e=>{let t={},n=[],r=new Set,o=s=>t[s]?Promise.resolve(null):new Promise(a=>{hB(s).then(l=>{t[l.filePath]=l,l.imports.forEach(D=>{r.has(D.absolutePath)||(r.add(D.absolutePath),n.push(o(D.absolutePath)))});let p=n.shift();return p?p.then(a):a(null)})});return o(e).then(()=>dB(Object.values(t),t).reduce((l,p)=>p.body+`
|
|
6
|
+
|
|
7
|
+
`+l,""))},DB=(e,t,n)=>{let r={kind:"Document",definitions:[e,...t]};return cF(r,n)},mB=e=>((n,r)=>(n.forEach(o=>{o.kind==="FragmentDefinition"&&(r[o.name.value]=o)}),r))(e.definitions,{}),fF=(e,t)=>{let n=[],r=o=>{if(o.kind==="FragmentSpread"){let s=t[o.name.value],a=fF(s,t);n.push(...a,o.name.value)}};return e.kind==="OperationDefinition"?e.selectionSet.selections.forEach(o=>{var s;o.kind==="Field"&&((s=o.selectionSet)==null||s.selections.forEach(r))}):e.selectionSet.selections.forEach(r),n},pF=(e,t)=>{let n=fB.default(e),r=cF(n,t),o=mB(n),s=n.definitions.reduce((a,l)=>{if(l.kind==="OperationDefinition"&&l.name&&l.name.value){let p=l.name.value,g=fF(l,o).map(w=>{let v=o[w];if(!v)throw new Error(`Expected to find fragment definition for ${w}`);return v}),E=DB(l,g,t);a.push(`export const ${p} = ${E};`)}return a},[`const documentNode = ${r};`]);return s.push("export default documentNode;"),s.join(`
|
|
8
|
+
`)},gB=(e={})=>({name:"graphql-loader",setup(t){t.onLoad({filter:e.filterRegex||/\.graphql$|\.gql$/},n=>lF(n.path).then(r=>({contents:pF(r,e.mapDocumentNode)})))}}),_B=gB});var PF=N((zz,xF)=>{d();function yn(e,t){typeof t=="boolean"&&(t={forever:t}),this._originalTimeouts=JSON.parse(JSON.stringify(e)),this._timeouts=e,this._options=t||{},this._maxRetryTime=t&&t.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}xF.exports=yn;yn.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts};yn.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timeouts=[],this._cachedTimeouts=null};yn.prototype.retry=function(e){if(this._timeout&&clearTimeout(this._timeout),!e)return!1;var t=new Date().getTime();if(e&&t-this._operationStart>=this._maxRetryTime)return this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(e);var n=this._timeouts.shift();if(n===void 0)if(this._cachedTimeouts)this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),n=this._timeouts.shift();else return!1;var r=this,o=setTimeout(function(){r._attempts++,r._operationTimeoutCb&&(r._timeout=setTimeout(function(){r._operationTimeoutCb(r._attempts)},r._operationTimeout),r._options.unref&&r._timeout.unref()),r._fn(r._attempts)},n);return this._options.unref&&o.unref(),!0};yn.prototype.attempt=function(e,t){this._fn=e,t&&(t.timeout&&(this._operationTimeout=t.timeout),t.cb&&(this._operationTimeoutCb=t.cb));var n=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){n._operationTimeoutCb()},n._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)};yn.prototype.try=function(e){console.log("Using RetryOperation.try() is deprecated"),this.attempt(e)};yn.prototype.start=function(e){console.log("Using RetryOperation.start() is deprecated"),this.attempt(e)};yn.prototype.start=yn.prototype.try;yn.prototype.errors=function(){return this._errors};yn.prototype.attempts=function(){return this._attempts};yn.prototype.mainError=function(){if(this._errors.length===0)return null;for(var e={},t=null,n=0,r=0;r<this._errors.length;r++){var o=this._errors[r],s=o.message,a=(e[s]||0)+1;e[s]=a,a>=n&&(t=o,n=a)}return t}});var OF=N(uo=>{d();var BB=PF();uo.operation=function(e){var t=uo.timeouts(e);return new BB(t,{forever:e&&e.forever,unref:e&&e.unref,maxRetryTime:e&&e.maxRetryTime})};uo.timeouts=function(e){if(e instanceof Array)return[].concat(e);var t={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var n in e)t[n]=e[n];if(t.minTimeout>t.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var r=[],o=0;o<t.retries;o++)r.push(this.createTimeout(o,t));return e&&e.forever&&!r.length&&r.push(this.createTimeout(o,t)),r.sort(function(s,a){return s-a}),r};uo.createTimeout=function(e,t){var n=t.randomize?Math.random()+1:1,r=Math.round(n*t.minTimeout*Math.pow(t.factor,e));return r=Math.min(r,t.maxTimeout),r};uo.wrap=function(e,t,n){if(t instanceof Array&&(n=t,t=null),!n){n=[];for(var r in e)typeof e[r]=="function"&&n.push(r)}for(var o=0;o<n.length;o++){var s=n[o],a=e[s];e[s]=function(p){var D=uo.operation(t),g=Array.prototype.slice.call(arguments,1),E=g.pop();g.push(function(w){D.retry(w)||(w&&(arguments[0]=D.mainError()),E.apply(this,arguments))}),D.attempt(function(){p.apply(e,g)})}.bind(e,a),e[s].options=t}}});var IF=N((Kz,TF)=>{d();TF.exports=OF()});var RF=N((Xz,Vd)=>{"use strict";d();var BF=Symbol();function RB(e,t,n){let r=t[BF];if(r)return t.stat(e,(s,a)=>{if(s)return n(s);n(null,a.mtime,r)});let o=new Date(Math.ceil(Date.now()/1e3)*1e3+5);t.utimes(e,o,o,s=>{if(s)return n(s);t.stat(e,(a,l)=>{if(a)return n(a);let p=l.mtime.getTime()%1e3===0?"s":"ms";Object.defineProperty(t,BF,{value:p}),n(null,l.mtime,p)})})}function NB(e){let t=Date.now();return e==="s"&&(t=Math.ceil(t/1e3)*1e3),new Date(t)}Vd.exports.probe=RB;Vd.exports.getMtime=NB});var LF=N((Qz,Ps)=>{"use strict";d();var MB=ze("path"),Yd=Oy(),jB=IF(),$B=k8(),NF=RF(),Mr={};function xs(e,t){return t.lockfilePath||`${e}.lock`}function Xd(e,t,n){if(!t.realpath)return n(null,MB.resolve(e));t.fs.realpath(e,n)}function Kd(e,t,n){let r=xs(e,t);t.fs.mkdir(r,o=>{if(!o)return NF.probe(r,t.fs,(s,a,l)=>{if(s)return t.fs.rmdir(r,()=>{}),n(s);n(null,a,l)});if(o.code!=="EEXIST")return n(o);if(t.stale<=0)return n(Object.assign(new Error("Lock file is already being held"),{code:"ELOCKED",file:e}));t.fs.stat(r,(s,a)=>{if(s)return s.code==="ENOENT"?Kd(e,{...t,stale:0},n):n(s);if(!MF(a,t))return n(Object.assign(new Error("Lock file is already being held"),{code:"ELOCKED",file:e}));jF(e,t,l=>{if(l)return n(l);Kd(e,{...t,stale:0},n)})})})}function MF(e,t){return e.mtime.getTime()<Date.now()-t.stale}function jF(e,t,n){t.fs.rmdir(xs(e,t),r=>{if(r&&r.code!=="ENOENT")return n(r);n()})}function tl(e,t){let n=Mr[e];n.updateTimeout||(n.updateDelay=n.updateDelay||t.update,n.updateTimeout=setTimeout(()=>{n.updateTimeout=null,t.fs.stat(n.lockfilePath,(r,o)=>{let s=n.lastUpdate+t.stale<Date.now();if(r)return r.code==="ENOENT"||s?Jd(e,n,Object.assign(r,{code:"ECOMPROMISED"})):(n.updateDelay=1e3,tl(e,t));if(!(n.mtime.getTime()===o.mtime.getTime()))return Jd(e,n,Object.assign(new Error("Unable to update lock within the stale threshold"),{code:"ECOMPROMISED"}));let l=NF.getMtime(n.mtimePrecision);t.fs.utimes(n.lockfilePath,l,l,p=>{let D=n.lastUpdate+t.stale<Date.now();if(!n.released){if(p)return p.code==="ENOENT"||D?Jd(e,n,Object.assign(p,{code:"ECOMPROMISED"})):(n.updateDelay=1e3,tl(e,t));n.mtime=l,n.lastUpdate=Date.now(),n.updateDelay=null,tl(e,t)}})})},n.updateDelay),n.updateTimeout.unref&&n.updateTimeout.unref())}function Jd(e,t,n){t.released=!0,t.updateTimeout&&clearTimeout(t.updateTimeout),Mr[e]===t&&delete Mr[e],t.options.onCompromised(n)}function LB(e,t,n){t={stale:1e4,update:null,realpath:!0,retries:0,fs:Yd,onCompromised:r=>{throw r},...t},t.retries=t.retries||0,t.retries=typeof t.retries=="number"?{retries:t.retries}:t.retries,t.stale=Math.max(t.stale||0,2e3),t.update=t.update==null?t.stale/2:t.update||0,t.update=Math.max(Math.min(t.update,t.stale/2),1e3),Xd(e,t,(r,o)=>{if(r)return n(r);let s=jB.operation(t.retries);s.attempt(()=>{Kd(o,t,(a,l,p)=>{if(s.retry(a))return;if(a)return n(s.mainError());let D=Mr[o]={lockfilePath:xs(o,t),mtime:l,mtimePrecision:p,options:t,lastUpdate:Date.now()};tl(o,t),n(null,g=>{if(D.released)return g&&g(Object.assign(new Error("Lock is already released"),{code:"ERELEASED"}));$F(o,{...t,realpath:!1},g)})})})})}function $F(e,t,n){t={fs:Yd,realpath:!0,...t},Xd(e,t,(r,o)=>{if(r)return n(r);let s=Mr[o];if(!s)return n(Object.assign(new Error("Lock is not acquired/owned by you"),{code:"ENOTACQUIRED"}));s.updateTimeout&&clearTimeout(s.updateTimeout),s.released=!0,delete Mr[o],jF(o,t,n)})}function UB(e,t,n){t={stale:1e4,realpath:!0,fs:Yd,...t},t.stale=Math.max(t.stale||0,2e3),Xd(e,t,(r,o)=>{if(r)return n(r);t.fs.stat(xs(o,t),(s,a)=>s?s.code==="ENOENT"?n(null,!1):n(s):n(null,!MF(a,t)))})}function kB(){return Mr}$B(()=>{for(let e in Mr){let t=Mr[e].options;try{t.fs.rmdirSync(xs(e,t))}catch{}}});Ps.exports.lock=LB;Ps.exports.unlock=$F;Ps.exports.check=UB;Ps.exports.getLocks=kB});var kF=N((tG,UF)=>{"use strict";d();var qB=Oy();function WB(e){let t=["mkdir","realpath","stat","rmdir","utimes"],n={...e};return t.forEach(r=>{n[r]=(...o)=>{let s=o.pop(),a;try{a=e[`${r}Sync`](...o)}catch(l){return s(l)}s(null,a)}}),n}function HB(e){return(...t)=>new Promise((n,r)=>{t.push((o,s)=>{o?r(o):n(s)}),e(...t)})}function zB(e){return(...t)=>{let n,r;if(t.push((o,s)=>{n=o,r=s}),e(...t),n)throw n;return r}}function GB(e){if(e={...e},e.fs=WB(e.fs||qB),typeof e.retries=="number"&&e.retries>0||e.retries&&typeof e.retries.retries=="number"&&e.retries.retries>0)throw Object.assign(new Error("Cannot use retries with the sync api"),{code:"ESYNC"});return e}UF.exports={toPromise:HB,toSync:zB,toSyncOptions:GB}});var WF=N((rG,gi)=>{"use strict";d();var Xo=LF(),{toPromise:nl,toSync:rl,toSyncOptions:Zd}=kF();async function qF(e,t){let n=await nl(Xo.lock)(e,t);return nl(n)}function VB(e,t){let n=rl(Xo.lock)(e,Zd(t));return rl(n)}function JB(e,t){return nl(Xo.unlock)(e,t)}function KB(e,t){return rl(Xo.unlock)(e,Zd(t))}function YB(e,t){return nl(Xo.check)(e,t)}function XB(e,t){return rl(Xo.check)(e,Zd(t))}gi.exports=qF;gi.exports.lock=qF;gi.exports.unlock=JB;gi.exports.lockSync=VB;gi.exports.unlockSync=KB;gi.exports.check=YB;gi.exports.checkSync=XB});var $r=N((uu,Ls)=>{d();(function(){var e,t="4.17.23",n=200,r="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",o="Expected a function",s="Invalid `variable` option passed into `_.template`",a="__lodash_hash_undefined__",l=500,p="__lodash_placeholder__",D=1,g=2,E=4,w=1,v=2,S=1,O=2,P=4,I=8,U=16,q=32,X=64,Q=128,fe=256,Fe=512,We=30,gt="...",nr=800,dt=16,xn=1,sn=2,va=3,Fr=1/0,rr=9007199254740991,Er=17976931348623157e292,bo=NaN,an=4294967295,$f=an-1,Kr=an>>>1,Ca=[["ary",Q],["bind",S],["bindKey",O],["curry",I],["curryRight",U],["flip",Fe],["partial",q],["partialRight",X],["rearg",fe]],Yr="[object Arguments]",Xr="[object Array]",Ao="[object AsyncFunction]",vr="[object Boolean]",Bi="[object Date]",Lf="[object DOMException]",Ri="[object Error]",So="[object Function]",wa="[object GeneratorFunction]",zt="[object Map]",Zr="[object Number]",Ni="[object Null]",Pn="[object Object]",ba="[object Promise]",Uf="[object Proxy]",Mi="[object RegExp]",Gt="[object Set]",ji="[object String]",xt="[object Symbol]",Aa="[object Undefined]",$i="[object WeakMap]",kf="[object WeakSet]",ir="[object ArrayBuffer]",Vt="[object DataView]",Nu="[object Float32Array]",Mu="[object Float64Array]",ju="[object Int8Array]",$u="[object Int16Array]",Li="[object Int32Array]",Lu="[object Uint8Array]",Uu="[object Uint8ClampedArray]",xo="[object Uint16Array]",ku="[object Uint32Array]",qf=/\b__p \+= '';/g,Wf=/\b(__p \+=) '' \+/g,Sa=/(__e\(.*?\)|\b__t\)) \+\n'';/g,xa=/&(?:amp|lt|gt|quot|#39);/g,Pa=/[&<>"']/g,Hf=RegExp(xa.source),qu=RegExp(Pa.source),zf=/<%-([\s\S]+?)%>/g,Oa=/<%([\s\S]+?)%>/g,Wu=/<%=([\s\S]+?)%>/g,Gf=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Vf=/^\w*$/,Jf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Hu=/[\\^$.*+?()[\]{}|]/g,Kf=RegExp(Hu.source),zu=/^\s+/,Yf=/\s/,Xf=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Zf=/\{\n\/\* \[wrapped with (.+)\] \*/,Qf=/,? & /,ep=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,tp=/[()=,{}\[\]\/\s]/,np=/\\(\\)?/g,rp=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ta=/\w*$/,ip=/^[-+]0x[0-9a-f]+$/i,op=/^0b[01]+$/i,up=/^\[object .+?Constructor\]$/,sp=/^0o[0-7]+$/i,ap=/^(?:0|[1-9]\d*)$/,Ia=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ui=/($^)/,Ba=/['\n\r\u2028\u2029\\]/g,ki="\\ud800-\\udfff",Ra="\\u0300-\\u036f",cp="\\ufe20-\\ufe2f",lp="\\u20d0-\\u20ff",Gu=Ra+cp+lp,Vu="\\u2700-\\u27bf",Na="a-z\\xdf-\\xf6\\xf8-\\xff",fp="\\xac\\xb1\\xd7\\xf7",pp="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Ma="\\u2000-\\u206f",_t=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Jt="A-Z\\xc0-\\xd6\\xd8-\\xde",Po="\\ufe0e\\ufe0f",qi=fp+pp+Ma+_t,Ju="['\u2019]",dp="["+ki+"]",ja="["+qi+"]",Oo="["+Gu+"]",h="\\d+",R="["+Vu+"]",W="["+Na+"]",z="[^"+ki+qi+h+Vu+Na+Jt+"]",ie="\\ud83c[\\udffb-\\udfff]",V="(?:"+Oo+"|"+ie+")",Y="[^"+ki+"]",ge="(?:\\ud83c[\\udde6-\\uddff]){2}",ke="[\\ud800-\\udbff][\\udc00-\\udfff]",we="["+Jt+"]",nt="\\u200d",Be="(?:"+W+"|"+z+")",or="(?:"+we+"|"+z+")",st="(?:"+Ju+"(?:d|ll|m|re|s|t|ve))?",Ne="(?:"+Ju+"(?:D|LL|M|RE|S|T|VE))?",Pt=V+"?",Ku="["+Po+"]?",$a="(?:"+nt+"(?:"+[Y,ge,ke].join("|")+")"+Ku+Pt+")*",Ee="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ht="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",re=Ku+Pt+$a,at="(?:"+[R,ge,ke].join("|")+")"+re,yt="(?:"+[Y+Oo+"?",Oo,ge,ke,dp].join("|")+")",Cr=RegExp(Ju,"g"),Qr=RegExp(Oo,"g"),cn=RegExp(ie+"(?="+ie+")|"+yt+re,"g"),Wi=RegExp([we+"?"+W+"+"+st+"(?="+[ja,we,"$"].join("|")+")",or+"+"+Ne+"(?="+[ja,we+Be,"$"].join("|")+")",we+"?"+Be+"+"+st,we+"+"+Ne,ht,Ee,h,at].join("|"),"g"),ur=RegExp("["+nt+ki+Gu+Po+"]"),Yu=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Xu=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],La=-1,Pe={};Pe[Nu]=Pe[Mu]=Pe[ju]=Pe[$u]=Pe[Li]=Pe[Lu]=Pe[Uu]=Pe[xo]=Pe[ku]=!0,Pe[Yr]=Pe[Xr]=Pe[ir]=Pe[vr]=Pe[Vt]=Pe[Bi]=Pe[Ri]=Pe[So]=Pe[zt]=Pe[Zr]=Pe[Pn]=Pe[Mi]=Pe[Gt]=Pe[ji]=Pe[$i]=!1;var Oe={};Oe[Yr]=Oe[Xr]=Oe[ir]=Oe[Vt]=Oe[vr]=Oe[Bi]=Oe[Nu]=Oe[Mu]=Oe[ju]=Oe[$u]=Oe[Li]=Oe[zt]=Oe[Zr]=Oe[Pn]=Oe[Mi]=Oe[Gt]=Oe[ji]=Oe[xt]=Oe[Lu]=Oe[Uu]=Oe[xo]=Oe[ku]=!0,Oe[Ri]=Oe[So]=Oe[$i]=!1;var hp={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},pg={"&":"&","<":"<",">":">",'"':""","'":"'"},Dp={"&":"&","<":"<",">":">",""":'"',"'":"'"},qS={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},WS=parseFloat,HS=parseInt,dg=typeof global=="object"&&global&&global.Object===Object&&global,zS=typeof self=="object"&&self&&self.Object===Object&&self,ct=dg||zS||Function("return this")(),mp=typeof uu=="object"&&uu&&!uu.nodeType&&uu,Hi=mp&&typeof Ls=="object"&&Ls&&!Ls.nodeType&&Ls,hg=Hi&&Hi.exports===mp,gp=hg&&dg.process,ln=(function(){try{var A=Hi&&Hi.require&&Hi.require("util").types;return A||gp&&gp.binding&&gp.binding("util")}catch{}})(),Dg=ln&&ln.isArrayBuffer,mg=ln&&ln.isDate,gg=ln&&ln.isMap,_g=ln&&ln.isRegExp,yg=ln&&ln.isSet,Fg=ln&&ln.isTypedArray;function Kt(A,M,T){switch(T.length){case 0:return A.call(M);case 1:return A.call(M,T[0]);case 2:return A.call(M,T[0],T[1]);case 3:return A.call(M,T[0],T[1],T[2])}return A.apply(M,T)}function GS(A,M,T,G){for(var se=-1,Ce=A==null?0:A.length;++se<Ce;){var rt=A[se];M(G,rt,T(rt),A)}return G}function fn(A,M){for(var T=-1,G=A==null?0:A.length;++T<G&&M(A[T],T,A)!==!1;);return A}function VS(A,M){for(var T=A==null?0:A.length;T--&&M(A[T],T,A)!==!1;);return A}function Eg(A,M){for(var T=-1,G=A==null?0:A.length;++T<G;)if(!M(A[T],T,A))return!1;return!0}function ei(A,M){for(var T=-1,G=A==null?0:A.length,se=0,Ce=[];++T<G;){var rt=A[T];M(rt,T,A)&&(Ce[se++]=rt)}return Ce}function Ua(A,M){var T=A==null?0:A.length;return!!T&&To(A,M,0)>-1}function _p(A,M,T){for(var G=-1,se=A==null?0:A.length;++G<se;)if(T(M,A[G]))return!0;return!1}function qe(A,M){for(var T=-1,G=A==null?0:A.length,se=Array(G);++T<G;)se[T]=M(A[T],T,A);return se}function ti(A,M){for(var T=-1,G=M.length,se=A.length;++T<G;)A[se+T]=M[T];return A}function yp(A,M,T,G){var se=-1,Ce=A==null?0:A.length;for(G&&Ce&&(T=A[++se]);++se<Ce;)T=M(T,A[se],se,A);return T}function JS(A,M,T,G){var se=A==null?0:A.length;for(G&&se&&(T=A[--se]);se--;)T=M(T,A[se],se,A);return T}function Fp(A,M){for(var T=-1,G=A==null?0:A.length;++T<G;)if(M(A[T],T,A))return!0;return!1}var KS=Ep("length");function YS(A){return A.split("")}function XS(A){return A.match(ep)||[]}function vg(A,M,T){var G;return T(A,function(se,Ce,rt){if(M(se,Ce,rt))return G=Ce,!1}),G}function ka(A,M,T,G){for(var se=A.length,Ce=T+(G?1:-1);G?Ce--:++Ce<se;)if(M(A[Ce],Ce,A))return Ce;return-1}function To(A,M,T){return M===M?cx(A,M,T):ka(A,Cg,T)}function ZS(A,M,T,G){for(var se=T-1,Ce=A.length;++se<Ce;)if(G(A[se],M))return se;return-1}function Cg(A){return A!==A}function wg(A,M){var T=A==null?0:A.length;return T?Cp(A,M)/T:bo}function Ep(A){return function(M){return M==null?e:M[A]}}function vp(A){return function(M){return A==null?e:A[M]}}function bg(A,M,T,G,se){return se(A,function(Ce,rt,Re){T=G?(G=!1,Ce):M(T,Ce,rt,Re)}),T}function QS(A,M){var T=A.length;for(A.sort(M);T--;)A[T]=A[T].value;return A}function Cp(A,M){for(var T,G=-1,se=A.length;++G<se;){var Ce=M(A[G]);Ce!==e&&(T=T===e?Ce:T+Ce)}return T}function wp(A,M){for(var T=-1,G=Array(A);++T<A;)G[T]=M(T);return G}function ex(A,M){return qe(M,function(T){return[T,A[T]]})}function Ag(A){return A&&A.slice(0,Og(A)+1).replace(zu,"")}function Yt(A){return function(M){return A(M)}}function bp(A,M){return qe(M,function(T){return A[T]})}function Zu(A,M){return A.has(M)}function Sg(A,M){for(var T=-1,G=A.length;++T<G&&To(M,A[T],0)>-1;);return T}function xg(A,M){for(var T=A.length;T--&&To(M,A[T],0)>-1;);return T}function tx(A,M){for(var T=A.length,G=0;T--;)A[T]===M&&++G;return G}var nx=vp(hp),rx=vp(pg);function ix(A){return"\\"+qS[A]}function ox(A,M){return A==null?e:A[M]}function Io(A){return ur.test(A)}function ux(A){return Yu.test(A)}function sx(A){for(var M,T=[];!(M=A.next()).done;)T.push(M.value);return T}function Ap(A){var M=-1,T=Array(A.size);return A.forEach(function(G,se){T[++M]=[se,G]}),T}function Pg(A,M){return function(T){return A(M(T))}}function ni(A,M){for(var T=-1,G=A.length,se=0,Ce=[];++T<G;){var rt=A[T];(rt===M||rt===p)&&(A[T]=p,Ce[se++]=T)}return Ce}function qa(A){var M=-1,T=Array(A.size);return A.forEach(function(G){T[++M]=G}),T}function ax(A){var M=-1,T=Array(A.size);return A.forEach(function(G){T[++M]=[G,G]}),T}function cx(A,M,T){for(var G=T-1,se=A.length;++G<se;)if(A[G]===M)return G;return-1}function lx(A,M,T){for(var G=T+1;G--;)if(A[G]===M)return G;return G}function Bo(A){return Io(A)?px(A):KS(A)}function On(A){return Io(A)?dx(A):YS(A)}function Og(A){for(var M=A.length;M--&&Yf.test(A.charAt(M)););return M}var fx=vp(Dp);function px(A){for(var M=cn.lastIndex=0;cn.test(A);)++M;return M}function dx(A){return A.match(cn)||[]}function hx(A){return A.match(Wi)||[]}var Dx=(function A(M){M=M==null?ct:ri.defaults(ct.Object(),M,ri.pick(ct,Xu));var T=M.Array,G=M.Date,se=M.Error,Ce=M.Function,rt=M.Math,Re=M.Object,Sp=M.RegExp,mx=M.String,pn=M.TypeError,Wa=T.prototype,gx=Ce.prototype,Ro=Re.prototype,Ha=M["__core-js_shared__"],za=gx.toString,be=Ro.hasOwnProperty,_x=0,Tg=(function(){var i=/[^.]+$/.exec(Ha&&Ha.keys&&Ha.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""})(),Ga=Ro.toString,yx=za.call(Re),Fx=ct._,Ex=Sp("^"+za.call(be).replace(Hu,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Va=hg?M.Buffer:e,ii=M.Symbol,Ja=M.Uint8Array,Ig=Va?Va.allocUnsafe:e,Ka=Pg(Re.getPrototypeOf,Re),Bg=Re.create,Rg=Ro.propertyIsEnumerable,Ya=Wa.splice,Ng=ii?ii.isConcatSpreadable:e,Qu=ii?ii.iterator:e,zi=ii?ii.toStringTag:e,Xa=(function(){try{var i=Yi(Re,"defineProperty");return i({},"",{}),i}catch{}})(),vx=M.clearTimeout!==ct.clearTimeout&&M.clearTimeout,Cx=G&&G.now!==ct.Date.now&&G.now,wx=M.setTimeout!==ct.setTimeout&&M.setTimeout,Za=rt.ceil,Qa=rt.floor,xp=Re.getOwnPropertySymbols,bx=Va?Va.isBuffer:e,Mg=M.isFinite,Ax=Wa.join,Sx=Pg(Re.keys,Re),it=rt.max,Ft=rt.min,xx=G.now,Px=M.parseInt,jg=rt.random,Ox=Wa.reverse,Pp=Yi(M,"DataView"),es=Yi(M,"Map"),Op=Yi(M,"Promise"),No=Yi(M,"Set"),ts=Yi(M,"WeakMap"),ns=Yi(Re,"create"),ec=ts&&new ts,Mo={},Tx=Xi(Pp),Ix=Xi(es),Bx=Xi(Op),Rx=Xi(No),Nx=Xi(ts),tc=ii?ii.prototype:e,rs=tc?tc.valueOf:e,$g=tc?tc.toString:e;function _(i){if(Ve(i)&&!ae(i)&&!(i instanceof me)){if(i instanceof dn)return i;if(be.call(i,"__wrapped__"))return L_(i)}return new dn(i)}var jo=(function(){function i(){}return function(u){if(!He(u))return{};if(Bg)return Bg(u);i.prototype=u;var c=new i;return i.prototype=e,c}})();function nc(){}function dn(i,u){this.__wrapped__=i,this.__actions__=[],this.__chain__=!!u,this.__index__=0,this.__values__=e}_.templateSettings={escape:zf,evaluate:Oa,interpolate:Wu,variable:"",imports:{_}},_.prototype=nc.prototype,_.prototype.constructor=_,dn.prototype=jo(nc.prototype),dn.prototype.constructor=dn;function me(i){this.__wrapped__=i,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=an,this.__views__=[]}function Mx(){var i=new me(this.__wrapped__);return i.__actions__=jt(this.__actions__),i.__dir__=this.__dir__,i.__filtered__=this.__filtered__,i.__iteratees__=jt(this.__iteratees__),i.__takeCount__=this.__takeCount__,i.__views__=jt(this.__views__),i}function jx(){if(this.__filtered__){var i=new me(this);i.__dir__=-1,i.__filtered__=!0}else i=this.clone(),i.__dir__*=-1;return i}function $x(){var i=this.__wrapped__.value(),u=this.__dir__,c=ae(i),f=u<0,m=c?i.length:0,F=YP(0,m,this.__views__),C=F.start,b=F.end,x=b-C,j=f?b:C-1,$=this.__iteratees__,L=$.length,H=0,J=Ft(x,this.__takeCount__);if(!c||!f&&m==x&&J==x)return a_(i,this.__actions__);var te=[];e:for(;x--&&H<J;){j+=u;for(var pe=-1,ne=i[j];++pe<L;){var he=$[pe],_e=he.iteratee,Qt=he.type,It=_e(ne);if(Qt==sn)ne=It;else if(!It){if(Qt==xn)continue e;break e}}te[H++]=ne}return te}me.prototype=jo(nc.prototype),me.prototype.constructor=me;function Gi(i){var u=-1,c=i==null?0:i.length;for(this.clear();++u<c;){var f=i[u];this.set(f[0],f[1])}}function Lx(){this.__data__=ns?ns(null):{},this.size=0}function Ux(i){var u=this.has(i)&&delete this.__data__[i];return this.size-=u?1:0,u}function kx(i){var u=this.__data__;if(ns){var c=u[i];return c===a?e:c}return be.call(u,i)?u[i]:e}function qx(i){var u=this.__data__;return ns?u[i]!==e:be.call(u,i)}function Wx(i,u){var c=this.__data__;return this.size+=this.has(i)?0:1,c[i]=ns&&u===e?a:u,this}Gi.prototype.clear=Lx,Gi.prototype.delete=Ux,Gi.prototype.get=kx,Gi.prototype.has=qx,Gi.prototype.set=Wx;function wr(i){var u=-1,c=i==null?0:i.length;for(this.clear();++u<c;){var f=i[u];this.set(f[0],f[1])}}function Hx(){this.__data__=[],this.size=0}function zx(i){var u=this.__data__,c=rc(u,i);if(c<0)return!1;var f=u.length-1;return c==f?u.pop():Ya.call(u,c,1),--this.size,!0}function Gx(i){var u=this.__data__,c=rc(u,i);return c<0?e:u[c][1]}function Vx(i){return rc(this.__data__,i)>-1}function Jx(i,u){var c=this.__data__,f=rc(c,i);return f<0?(++this.size,c.push([i,u])):c[f][1]=u,this}wr.prototype.clear=Hx,wr.prototype.delete=zx,wr.prototype.get=Gx,wr.prototype.has=Vx,wr.prototype.set=Jx;function br(i){var u=-1,c=i==null?0:i.length;for(this.clear();++u<c;){var f=i[u];this.set(f[0],f[1])}}function Kx(){this.size=0,this.__data__={hash:new Gi,map:new(es||wr),string:new Gi}}function Yx(i){var u=Dc(this,i).delete(i);return this.size-=u?1:0,u}function Xx(i){return Dc(this,i).get(i)}function Zx(i){return Dc(this,i).has(i)}function Qx(i,u){var c=Dc(this,i),f=c.size;return c.set(i,u),this.size+=c.size==f?0:1,this}br.prototype.clear=Kx,br.prototype.delete=Yx,br.prototype.get=Xx,br.prototype.has=Zx,br.prototype.set=Qx;function Vi(i){var u=-1,c=i==null?0:i.length;for(this.__data__=new br;++u<c;)this.add(i[u])}function eP(i){return this.__data__.set(i,a),this}function tP(i){return this.__data__.has(i)}Vi.prototype.add=Vi.prototype.push=eP,Vi.prototype.has=tP;function Tn(i){var u=this.__data__=new wr(i);this.size=u.size}function nP(){this.__data__=new wr,this.size=0}function rP(i){var u=this.__data__,c=u.delete(i);return this.size=u.size,c}function iP(i){return this.__data__.get(i)}function oP(i){return this.__data__.has(i)}function uP(i,u){var c=this.__data__;if(c instanceof wr){var f=c.__data__;if(!es||f.length<n-1)return f.push([i,u]),this.size=++c.size,this;c=this.__data__=new br(f)}return c.set(i,u),this.size=c.size,this}Tn.prototype.clear=nP,Tn.prototype.delete=rP,Tn.prototype.get=iP,Tn.prototype.has=oP,Tn.prototype.set=uP;function Lg(i,u){var c=ae(i),f=!c&&Zi(i),m=!c&&!f&&ci(i),F=!c&&!f&&!m&&ko(i),C=c||f||m||F,b=C?wp(i.length,mx):[],x=b.length;for(var j in i)(u||be.call(i,j))&&!(C&&(j=="length"||m&&(j=="offset"||j=="parent")||F&&(j=="buffer"||j=="byteLength"||j=="byteOffset")||Pr(j,x)))&&b.push(j);return b}function Ug(i){var u=i.length;return u?i[kp(0,u-1)]:e}function sP(i,u){return mc(jt(i),Ji(u,0,i.length))}function aP(i){return mc(jt(i))}function Tp(i,u,c){(c!==e&&!In(i[u],c)||c===e&&!(u in i))&&Ar(i,u,c)}function is(i,u,c){var f=i[u];(!(be.call(i,u)&&In(f,c))||c===e&&!(u in i))&&Ar(i,u,c)}function rc(i,u){for(var c=i.length;c--;)if(In(i[c][0],u))return c;return-1}function cP(i,u,c,f){return oi(i,function(m,F,C){u(f,m,c(m),C)}),f}function kg(i,u){return i&&ar(u,lt(u),i)}function lP(i,u){return i&&ar(u,Lt(u),i)}function Ar(i,u,c){u=="__proto__"&&Xa?Xa(i,u,{configurable:!0,enumerable:!0,value:c,writable:!0}):i[u]=c}function Ip(i,u){for(var c=-1,f=u.length,m=T(f),F=i==null;++c<f;)m[c]=F?e:pd(i,u[c]);return m}function Ji(i,u,c){return i===i&&(c!==e&&(i=i<=c?i:c),u!==e&&(i=i>=u?i:u)),i}function hn(i,u,c,f,m,F){var C,b=u&D,x=u&g,j=u&E;if(c&&(C=m?c(i,f,m,F):c(i)),C!==e)return C;if(!He(i))return i;var $=ae(i);if($){if(C=ZP(i),!b)return jt(i,C)}else{var L=Et(i),H=L==So||L==wa;if(ci(i))return f_(i,b);if(L==Pn||L==Yr||H&&!m){if(C=x||H?{}:O_(i),!b)return x?kP(i,lP(C,i)):UP(i,kg(C,i))}else{if(!Oe[L])return m?i:{};C=QP(i,L,b)}}F||(F=new Tn);var J=F.get(i);if(J)return J;F.set(i,C),oy(i)?i.forEach(function(ne){C.add(hn(ne,u,c,ne,i,F))}):ry(i)&&i.forEach(function(ne,he){C.set(he,hn(ne,u,c,he,i,F))});var te=j?x?Zp:Xp:x?Lt:lt,pe=$?e:te(i);return fn(pe||i,function(ne,he){pe&&(he=ne,ne=i[he]),is(C,he,hn(ne,u,c,he,i,F))}),C}function fP(i){var u=lt(i);return function(c){return qg(c,i,u)}}function qg(i,u,c){var f=c.length;if(i==null)return!f;for(i=Re(i);f--;){var m=c[f],F=u[m],C=i[m];if(C===e&&!(m in i)||!F(C))return!1}return!0}function Wg(i,u,c){if(typeof i!="function")throw new pn(o);return fs(function(){i.apply(e,c)},u)}function os(i,u,c,f){var m=-1,F=Ua,C=!0,b=i.length,x=[],j=u.length;if(!b)return x;c&&(u=qe(u,Yt(c))),f?(F=_p,C=!1):u.length>=n&&(F=Zu,C=!1,u=new Vi(u));e:for(;++m<b;){var $=i[m],L=c==null?$:c($);if($=f||$!==0?$:0,C&&L===L){for(var H=j;H--;)if(u[H]===L)continue e;x.push($)}else F(u,L,f)||x.push($)}return x}var oi=m_(sr),Hg=m_(Rp,!0);function pP(i,u){var c=!0;return oi(i,function(f,m,F){return c=!!u(f,m,F),c}),c}function ic(i,u,c){for(var f=-1,m=i.length;++f<m;){var F=i[f],C=u(F);if(C!=null&&(b===e?C===C&&!Zt(C):c(C,b)))var b=C,x=F}return x}function dP(i,u,c,f){var m=i.length;for(c=le(c),c<0&&(c=-c>m?0:m+c),f=f===e||f>m?m:le(f),f<0&&(f+=m),f=c>f?0:sy(f);c<f;)i[c++]=u;return i}function zg(i,u){var c=[];return oi(i,function(f,m,F){u(f,m,F)&&c.push(f)}),c}function Dt(i,u,c,f,m){var F=-1,C=i.length;for(c||(c=tO),m||(m=[]);++F<C;){var b=i[F];u>0&&c(b)?u>1?Dt(b,u-1,c,f,m):ti(m,b):f||(m[m.length]=b)}return m}var Bp=g_(),Gg=g_(!0);function sr(i,u){return i&&Bp(i,u,lt)}function Rp(i,u){return i&&Gg(i,u,lt)}function oc(i,u){return ei(u,function(c){return Or(i[c])})}function Ki(i,u){u=si(u,i);for(var c=0,f=u.length;i!=null&&c<f;)i=i[cr(u[c++])];return c&&c==f?i:e}function Vg(i,u,c){var f=u(i);return ae(i)?f:ti(f,c(i))}function Ot(i){return i==null?i===e?Aa:Ni:zi&&zi in Re(i)?KP(i):aO(i)}function Np(i,u){return i>u}function hP(i,u){return i!=null&&be.call(i,u)}function DP(i,u){return i!=null&&u in Re(i)}function mP(i,u,c){return i>=Ft(u,c)&&i<it(u,c)}function Mp(i,u,c){for(var f=c?_p:Ua,m=i[0].length,F=i.length,C=F,b=T(F),x=1/0,j=[];C--;){var $=i[C];C&&u&&($=qe($,Yt(u))),x=Ft($.length,x),b[C]=!c&&(u||m>=120&&$.length>=120)?new Vi(C&&$):e}$=i[0];var L=-1,H=b[0];e:for(;++L<m&&j.length<x;){var J=$[L],te=u?u(J):J;if(J=c||J!==0?J:0,!(H?Zu(H,te):f(j,te,c))){for(C=F;--C;){var pe=b[C];if(!(pe?Zu(pe,te):f(i[C],te,c)))continue e}H&&H.push(te),j.push(J)}}return j}function gP(i,u,c,f){return sr(i,function(m,F,C){u(f,c(m),F,C)}),f}function us(i,u,c){u=si(u,i),i=R_(i,u);var f=i==null?i:i[cr(mn(u))];return f==null?e:Kt(f,i,c)}function Jg(i){return Ve(i)&&Ot(i)==Yr}function _P(i){return Ve(i)&&Ot(i)==ir}function yP(i){return Ve(i)&&Ot(i)==Bi}function ss(i,u,c,f,m){return i===u?!0:i==null||u==null||!Ve(i)&&!Ve(u)?i!==i&&u!==u:FP(i,u,c,f,ss,m)}function FP(i,u,c,f,m,F){var C=ae(i),b=ae(u),x=C?Xr:Et(i),j=b?Xr:Et(u);x=x==Yr?Pn:x,j=j==Yr?Pn:j;var $=x==Pn,L=j==Pn,H=x==j;if(H&&ci(i)){if(!ci(u))return!1;C=!0,$=!1}if(H&&!$)return F||(F=new Tn),C||ko(i)?S_(i,u,c,f,m,F):VP(i,u,x,c,f,m,F);if(!(c&w)){var J=$&&be.call(i,"__wrapped__"),te=L&&be.call(u,"__wrapped__");if(J||te){var pe=J?i.value():i,ne=te?u.value():u;return F||(F=new Tn),m(pe,ne,c,f,F)}}return H?(F||(F=new Tn),JP(i,u,c,f,m,F)):!1}function EP(i){return Ve(i)&&Et(i)==zt}function jp(i,u,c,f){var m=c.length,F=m,C=!f;if(i==null)return!F;for(i=Re(i);m--;){var b=c[m];if(C&&b[2]?b[1]!==i[b[0]]:!(b[0]in i))return!1}for(;++m<F;){b=c[m];var x=b[0],j=i[x],$=b[1];if(C&&b[2]){if(j===e&&!(x in i))return!1}else{var L=new Tn;if(f)var H=f(j,$,x,i,u,L);if(!(H===e?ss($,j,w|v,f,L):H))return!1}}return!0}function Kg(i){if(!He(i)||rO(i))return!1;var u=Or(i)?Ex:up;return u.test(Xi(i))}function vP(i){return Ve(i)&&Ot(i)==Mi}function CP(i){return Ve(i)&&Et(i)==Gt}function wP(i){return Ve(i)&&vc(i.length)&&!!Pe[Ot(i)]}function Yg(i){return typeof i=="function"?i:i==null?Ut:typeof i=="object"?ae(i)?Qg(i[0],i[1]):Zg(i):_y(i)}function $p(i){if(!ls(i))return Sx(i);var u=[];for(var c in Re(i))be.call(i,c)&&c!="constructor"&&u.push(c);return u}function bP(i){if(!He(i))return sO(i);var u=ls(i),c=[];for(var f in i)f=="constructor"&&(u||!be.call(i,f))||c.push(f);return c}function Lp(i,u){return i<u}function Xg(i,u){var c=-1,f=$t(i)?T(i.length):[];return oi(i,function(m,F,C){f[++c]=u(m,F,C)}),f}function Zg(i){var u=ed(i);return u.length==1&&u[0][2]?I_(u[0][0],u[0][1]):function(c){return c===i||jp(c,i,u)}}function Qg(i,u){return nd(i)&&T_(u)?I_(cr(i),u):function(c){var f=pd(c,i);return f===e&&f===u?dd(c,i):ss(u,f,w|v)}}function uc(i,u,c,f,m){i!==u&&Bp(u,function(F,C){if(m||(m=new Tn),He(F))AP(i,u,C,c,uc,f,m);else{var b=f?f(id(i,C),F,C+"",i,u,m):e;b===e&&(b=F),Tp(i,C,b)}},Lt)}function AP(i,u,c,f,m,F,C){var b=id(i,c),x=id(u,c),j=C.get(x);if(j){Tp(i,c,j);return}var $=F?F(b,x,c+"",i,u,C):e,L=$===e;if(L){var H=ae(x),J=!H&&ci(x),te=!H&&!J&&ko(x);$=x,H||J||te?ae(b)?$=b:Xe(b)?$=jt(b):J?(L=!1,$=f_(x,!0)):te?(L=!1,$=p_(x,!0)):$=[]:ps(x)||Zi(x)?($=b,Zi(b)?$=ay(b):(!He(b)||Or(b))&&($=O_(x))):L=!1}L&&(C.set(x,$),m($,x,f,F,C),C.delete(x)),Tp(i,c,$)}function e_(i,u){var c=i.length;if(c)return u+=u<0?c:0,Pr(u,c)?i[u]:e}function t_(i,u,c){u.length?u=qe(u,function(F){return ae(F)?function(C){return Ki(C,F.length===1?F[0]:F)}:F}):u=[Ut];var f=-1;u=qe(u,Yt(ee()));var m=Xg(i,function(F,C,b){var x=qe(u,function(j){return j(F)});return{criteria:x,index:++f,value:F}});return QS(m,function(F,C){return LP(F,C,c)})}function SP(i,u){return n_(i,u,function(c,f){return dd(i,f)})}function n_(i,u,c){for(var f=-1,m=u.length,F={};++f<m;){var C=u[f],b=Ki(i,C);c(b,C)&&as(F,si(C,i),b)}return F}function xP(i){return function(u){return Ki(u,i)}}function Up(i,u,c,f){var m=f?ZS:To,F=-1,C=u.length,b=i;for(i===u&&(u=jt(u)),c&&(b=qe(i,Yt(c)));++F<C;)for(var x=0,j=u[F],$=c?c(j):j;(x=m(b,$,x,f))>-1;)b!==i&&Ya.call(b,x,1),Ya.call(i,x,1);return i}function r_(i,u){for(var c=i?u.length:0,f=c-1;c--;){var m=u[c];if(c==f||m!==F){var F=m;Pr(m)?Ya.call(i,m,1):Hp(i,m)}}return i}function kp(i,u){return i+Qa(jg()*(u-i+1))}function PP(i,u,c,f){for(var m=-1,F=it(Za((u-i)/(c||1)),0),C=T(F);F--;)C[f?F:++m]=i,i+=c;return C}function qp(i,u){var c="";if(!i||u<1||u>rr)return c;do u%2&&(c+=i),u=Qa(u/2),u&&(i+=i);while(u);return c}function de(i,u){return od(B_(i,u,Ut),i+"")}function OP(i){return Ug(qo(i))}function TP(i,u){var c=qo(i);return mc(c,Ji(u,0,c.length))}function as(i,u,c,f){if(!He(i))return i;u=si(u,i);for(var m=-1,F=u.length,C=F-1,b=i;b!=null&&++m<F;){var x=cr(u[m]),j=c;if(x==="__proto__"||x==="constructor"||x==="prototype")return i;if(m!=C){var $=b[x];j=f?f($,x,b):e,j===e&&(j=He($)?$:Pr(u[m+1])?[]:{})}is(b,x,j),b=b[x]}return i}var i_=ec?function(i,u){return ec.set(i,u),i}:Ut,IP=Xa?function(i,u){return Xa(i,"toString",{configurable:!0,enumerable:!1,value:Dd(u),writable:!0})}:Ut;function BP(i){return mc(qo(i))}function Dn(i,u,c){var f=-1,m=i.length;u<0&&(u=-u>m?0:m+u),c=c>m?m:c,c<0&&(c+=m),m=u>c?0:c-u>>>0,u>>>=0;for(var F=T(m);++f<m;)F[f]=i[f+u];return F}function RP(i,u){var c;return oi(i,function(f,m,F){return c=u(f,m,F),!c}),!!c}function sc(i,u,c){var f=0,m=i==null?f:i.length;if(typeof u=="number"&&u===u&&m<=Kr){for(;f<m;){var F=f+m>>>1,C=i[F];C!==null&&!Zt(C)&&(c?C<=u:C<u)?f=F+1:m=F}return m}return Wp(i,u,Ut,c)}function Wp(i,u,c,f){var m=0,F=i==null?0:i.length;if(F===0)return 0;u=c(u);for(var C=u!==u,b=u===null,x=Zt(u),j=u===e;m<F;){var $=Qa((m+F)/2),L=c(i[$]),H=L!==e,J=L===null,te=L===L,pe=Zt(L);if(C)var ne=f||te;else j?ne=te&&(f||H):b?ne=te&&H&&(f||!J):x?ne=te&&H&&!J&&(f||!pe):J||pe?ne=!1:ne=f?L<=u:L<u;ne?m=$+1:F=$}return Ft(F,$f)}function o_(i,u){for(var c=-1,f=i.length,m=0,F=[];++c<f;){var C=i[c],b=u?u(C):C;if(!c||!In(b,x)){var x=b;F[m++]=C===0?0:C}}return F}function u_(i){return typeof i=="number"?i:Zt(i)?bo:+i}function Xt(i){if(typeof i=="string")return i;if(ae(i))return qe(i,Xt)+"";if(Zt(i))return $g?$g.call(i):"";var u=i+"";return u=="0"&&1/i==-Fr?"-0":u}function ui(i,u,c){var f=-1,m=Ua,F=i.length,C=!0,b=[],x=b;if(c)C=!1,m=_p;else if(F>=n){var j=u?null:zP(i);if(j)return qa(j);C=!1,m=Zu,x=new Vi}else x=u?[]:b;e:for(;++f<F;){var $=i[f],L=u?u($):$;if($=c||$!==0?$:0,C&&L===L){for(var H=x.length;H--;)if(x[H]===L)continue e;u&&x.push(L),b.push($)}else m(x,L,c)||(x!==b&&x.push(L),b.push($))}return b}function Hp(i,u){u=si(u,i);var c=-1,f=u.length;if(!f)return!0;for(var m=i==null||typeof i!="object"&&typeof i!="function";++c<f;){var F=u[c];if(typeof F=="string"){if(F==="__proto__"&&!be.call(i,"__proto__"))return!1;if(F==="constructor"&&c+1<f&&typeof u[c+1]=="string"&&u[c+1]==="prototype"){if(m&&c===0)continue;return!1}}}var C=R_(i,u);return C==null||delete C[cr(mn(u))]}function s_(i,u,c,f){return as(i,u,c(Ki(i,u)),f)}function ac(i,u,c,f){for(var m=i.length,F=f?m:-1;(f?F--:++F<m)&&u(i[F],F,i););return c?Dn(i,f?0:F,f?F+1:m):Dn(i,f?F+1:0,f?m:F)}function a_(i,u){var c=i;return c instanceof me&&(c=c.value()),yp(u,function(f,m){return m.func.apply(m.thisArg,ti([f],m.args))},c)}function zp(i,u,c){var f=i.length;if(f<2)return f?ui(i[0]):[];for(var m=-1,F=T(f);++m<f;)for(var C=i[m],b=-1;++b<f;)b!=m&&(F[m]=os(F[m]||C,i[b],u,c));return ui(Dt(F,1),u,c)}function c_(i,u,c){for(var f=-1,m=i.length,F=u.length,C={};++f<m;){var b=f<F?u[f]:e;c(C,i[f],b)}return C}function Gp(i){return Xe(i)?i:[]}function Vp(i){return typeof i=="function"?i:Ut}function si(i,u){return ae(i)?i:nd(i,u)?[i]:$_(Ae(i))}var NP=de;function ai(i,u,c){var f=i.length;return c=c===e?f:c,!u&&c>=f?i:Dn(i,u,c)}var l_=vx||function(i){return ct.clearTimeout(i)};function f_(i,u){if(u)return i.slice();var c=i.length,f=Ig?Ig(c):new i.constructor(c);return i.copy(f),f}function Jp(i){var u=new i.constructor(i.byteLength);return new Ja(u).set(new Ja(i)),u}function MP(i,u){var c=u?Jp(i.buffer):i.buffer;return new i.constructor(c,i.byteOffset,i.byteLength)}function jP(i){var u=new i.constructor(i.source,Ta.exec(i));return u.lastIndex=i.lastIndex,u}function $P(i){return rs?Re(rs.call(i)):{}}function p_(i,u){var c=u?Jp(i.buffer):i.buffer;return new i.constructor(c,i.byteOffset,i.length)}function d_(i,u){if(i!==u){var c=i!==e,f=i===null,m=i===i,F=Zt(i),C=u!==e,b=u===null,x=u===u,j=Zt(u);if(!b&&!j&&!F&&i>u||F&&C&&x&&!b&&!j||f&&C&&x||!c&&x||!m)return 1;if(!f&&!F&&!j&&i<u||j&&c&&m&&!f&&!F||b&&c&&m||!C&&m||!x)return-1}return 0}function LP(i,u,c){for(var f=-1,m=i.criteria,F=u.criteria,C=m.length,b=c.length;++f<C;){var x=d_(m[f],F[f]);if(x){if(f>=b)return x;var j=c[f];return x*(j=="desc"?-1:1)}}return i.index-u.index}function h_(i,u,c,f){for(var m=-1,F=i.length,C=c.length,b=-1,x=u.length,j=it(F-C,0),$=T(x+j),L=!f;++b<x;)$[b]=u[b];for(;++m<C;)(L||m<F)&&($[c[m]]=i[m]);for(;j--;)$[b++]=i[m++];return $}function D_(i,u,c,f){for(var m=-1,F=i.length,C=-1,b=c.length,x=-1,j=u.length,$=it(F-b,0),L=T($+j),H=!f;++m<$;)L[m]=i[m];for(var J=m;++x<j;)L[J+x]=u[x];for(;++C<b;)(H||m<F)&&(L[J+c[C]]=i[m++]);return L}function jt(i,u){var c=-1,f=i.length;for(u||(u=T(f));++c<f;)u[c]=i[c];return u}function ar(i,u,c,f){var m=!c;c||(c={});for(var F=-1,C=u.length;++F<C;){var b=u[F],x=f?f(c[b],i[b],b,c,i):e;x===e&&(x=i[b]),m?Ar(c,b,x):is(c,b,x)}return c}function UP(i,u){return ar(i,td(i),u)}function kP(i,u){return ar(i,x_(i),u)}function cc(i,u){return function(c,f){var m=ae(c)?GS:cP,F=u?u():{};return m(c,i,ee(f,2),F)}}function $o(i){return de(function(u,c){var f=-1,m=c.length,F=m>1?c[m-1]:e,C=m>2?c[2]:e;for(F=i.length>3&&typeof F=="function"?(m--,F):e,C&&Tt(c[0],c[1],C)&&(F=m<3?e:F,m=1),u=Re(u);++f<m;){var b=c[f];b&&i(u,b,f,F)}return u})}function m_(i,u){return function(c,f){if(c==null)return c;if(!$t(c))return i(c,f);for(var m=c.length,F=u?m:-1,C=Re(c);(u?F--:++F<m)&&f(C[F],F,C)!==!1;);return c}}function g_(i){return function(u,c,f){for(var m=-1,F=Re(u),C=f(u),b=C.length;b--;){var x=C[i?b:++m];if(c(F[x],x,F)===!1)break}return u}}function qP(i,u,c){var f=u&S,m=cs(i);function F(){var C=this&&this!==ct&&this instanceof F?m:i;return C.apply(f?c:this,arguments)}return F}function __(i){return function(u){u=Ae(u);var c=Io(u)?On(u):e,f=c?c[0]:u.charAt(0),m=c?ai(c,1).join(""):u.slice(1);return f[i]()+m}}function Lo(i){return function(u){return yp(my(Dy(u).replace(Cr,"")),i,"")}}function cs(i){return function(){var u=arguments;switch(u.length){case 0:return new i;case 1:return new i(u[0]);case 2:return new i(u[0],u[1]);case 3:return new i(u[0],u[1],u[2]);case 4:return new i(u[0],u[1],u[2],u[3]);case 5:return new i(u[0],u[1],u[2],u[3],u[4]);case 6:return new i(u[0],u[1],u[2],u[3],u[4],u[5]);case 7:return new i(u[0],u[1],u[2],u[3],u[4],u[5],u[6])}var c=jo(i.prototype),f=i.apply(c,u);return He(f)?f:c}}function WP(i,u,c){var f=cs(i);function m(){for(var F=arguments.length,C=T(F),b=F,x=Uo(m);b--;)C[b]=arguments[b];var j=F<3&&C[0]!==x&&C[F-1]!==x?[]:ni(C,x);if(F-=j.length,F<c)return C_(i,u,lc,m.placeholder,e,C,j,e,e,c-F);var $=this&&this!==ct&&this instanceof m?f:i;return Kt($,this,C)}return m}function y_(i){return function(u,c,f){var m=Re(u);if(!$t(u)){var F=ee(c,3);u=lt(u),c=function(b){return F(m[b],b,m)}}var C=i(u,c,f);return C>-1?m[F?u[C]:C]:e}}function F_(i){return xr(function(u){var c=u.length,f=c,m=dn.prototype.thru;for(i&&u.reverse();f--;){var F=u[f];if(typeof F!="function")throw new pn(o);if(m&&!C&&hc(F)=="wrapper")var C=new dn([],!0)}for(f=C?f:c;++f<c;){F=u[f];var b=hc(F),x=b=="wrapper"?Qp(F):e;x&&rd(x[0])&&x[1]==(Q|I|q|fe)&&!x[4].length&&x[9]==1?C=C[hc(x[0])].apply(C,x[3]):C=F.length==1&&rd(F)?C[b]():C.thru(F)}return function(){var j=arguments,$=j[0];if(C&&j.length==1&&ae($))return C.plant($).value();for(var L=0,H=c?u[L].apply(this,j):$;++L<c;)H=u[L].call(this,H);return H}})}function lc(i,u,c,f,m,F,C,b,x,j){var $=u&Q,L=u&S,H=u&O,J=u&(I|U),te=u&Fe,pe=H?e:cs(i);function ne(){for(var he=arguments.length,_e=T(he),Qt=he;Qt--;)_e[Qt]=arguments[Qt];if(J)var It=Uo(ne),en=tx(_e,It);if(f&&(_e=h_(_e,f,m,J)),F&&(_e=D_(_e,F,C,J)),he-=en,J&&he<j){var Ze=ni(_e,It);return C_(i,u,lc,ne.placeholder,c,_e,Ze,b,x,j-he)}var Bn=L?c:this,Ir=H?Bn[i]:i;return he=_e.length,b?_e=cO(_e,b):te&&he>1&&_e.reverse(),$&&x<he&&(_e.length=x),this&&this!==ct&&this instanceof ne&&(Ir=pe||cs(Ir)),Ir.apply(Bn,_e)}return ne}function E_(i,u){return function(c,f){return gP(c,i,u(f),{})}}function fc(i,u){return function(c,f){var m;if(c===e&&f===e)return u;if(c!==e&&(m=c),f!==e){if(m===e)return f;typeof c=="string"||typeof f=="string"?(c=Xt(c),f=Xt(f)):(c=u_(c),f=u_(f)),m=i(c,f)}return m}}function Kp(i){return xr(function(u){return u=qe(u,Yt(ee())),de(function(c){var f=this;return i(u,function(m){return Kt(m,f,c)})})})}function pc(i,u){u=u===e?" ":Xt(u);var c=u.length;if(c<2)return c?qp(u,i):u;var f=qp(u,Za(i/Bo(u)));return Io(u)?ai(On(f),0,i).join(""):f.slice(0,i)}function HP(i,u,c,f){var m=u&S,F=cs(i);function C(){for(var b=-1,x=arguments.length,j=-1,$=f.length,L=T($+x),H=this&&this!==ct&&this instanceof C?F:i;++j<$;)L[j]=f[j];for(;x--;)L[j++]=arguments[++b];return Kt(H,m?c:this,L)}return C}function v_(i){return function(u,c,f){return f&&typeof f!="number"&&Tt(u,c,f)&&(c=f=e),u=Tr(u),c===e?(c=u,u=0):c=Tr(c),f=f===e?u<c?1:-1:Tr(f),PP(u,c,f,i)}}function dc(i){return function(u,c){return typeof u=="string"&&typeof c=="string"||(u=gn(u),c=gn(c)),i(u,c)}}function C_(i,u,c,f,m,F,C,b,x,j){var $=u&I,L=$?C:e,H=$?e:C,J=$?F:e,te=$?e:F;u|=$?q:X,u&=~($?X:q),u&P||(u&=~(S|O));var pe=[i,u,m,J,L,te,H,b,x,j],ne=c.apply(e,pe);return rd(i)&&N_(ne,pe),ne.placeholder=f,M_(ne,i,u)}function Yp(i){var u=rt[i];return function(c,f){if(c=gn(c),f=f==null?0:Ft(le(f),292),f&&Mg(c)){var m=(Ae(c)+"e").split("e"),F=u(m[0]+"e"+(+m[1]+f));return m=(Ae(F)+"e").split("e"),+(m[0]+"e"+(+m[1]-f))}return u(c)}}var zP=No&&1/qa(new No([,-0]))[1]==Fr?function(i){return new No(i)}:_d;function w_(i){return function(u){var c=Et(u);return c==zt?Ap(u):c==Gt?ax(u):ex(u,i(u))}}function Sr(i,u,c,f,m,F,C,b){var x=u&O;if(!x&&typeof i!="function")throw new pn(o);var j=f?f.length:0;if(j||(u&=~(q|X),f=m=e),C=C===e?C:it(le(C),0),b=b===e?b:le(b),j-=m?m.length:0,u&X){var $=f,L=m;f=m=e}var H=x?e:Qp(i),J=[i,u,c,f,m,$,L,F,C,b];if(H&&uO(J,H),i=J[0],u=J[1],c=J[2],f=J[3],m=J[4],b=J[9]=J[9]===e?x?0:i.length:it(J[9]-j,0),!b&&u&(I|U)&&(u&=~(I|U)),!u||u==S)var te=qP(i,u,c);else u==I||u==U?te=WP(i,u,b):(u==q||u==(S|q))&&!m.length?te=HP(i,u,c,f):te=lc.apply(e,J);var pe=H?i_:N_;return M_(pe(te,J),i,u)}function b_(i,u,c,f){return i===e||In(i,Ro[c])&&!be.call(f,c)?u:i}function A_(i,u,c,f,m,F){return He(i)&&He(u)&&(F.set(u,i),uc(i,u,e,A_,F),F.delete(u)),i}function GP(i){return ps(i)?e:i}function S_(i,u,c,f,m,F){var C=c&w,b=i.length,x=u.length;if(b!=x&&!(C&&x>b))return!1;var j=F.get(i),$=F.get(u);if(j&&$)return j==u&&$==i;var L=-1,H=!0,J=c&v?new Vi:e;for(F.set(i,u),F.set(u,i);++L<b;){var te=i[L],pe=u[L];if(f)var ne=C?f(pe,te,L,u,i,F):f(te,pe,L,i,u,F);if(ne!==e){if(ne)continue;H=!1;break}if(J){if(!Fp(u,function(he,_e){if(!Zu(J,_e)&&(te===he||m(te,he,c,f,F)))return J.push(_e)})){H=!1;break}}else if(!(te===pe||m(te,pe,c,f,F))){H=!1;break}}return F.delete(i),F.delete(u),H}function VP(i,u,c,f,m,F,C){switch(c){case Vt:if(i.byteLength!=u.byteLength||i.byteOffset!=u.byteOffset)return!1;i=i.buffer,u=u.buffer;case ir:return!(i.byteLength!=u.byteLength||!F(new Ja(i),new Ja(u)));case vr:case Bi:case Zr:return In(+i,+u);case Ri:return i.name==u.name&&i.message==u.message;case Mi:case ji:return i==u+"";case zt:var b=Ap;case Gt:var x=f&w;if(b||(b=qa),i.size!=u.size&&!x)return!1;var j=C.get(i);if(j)return j==u;f|=v,C.set(i,u);var $=S_(b(i),b(u),f,m,F,C);return C.delete(i),$;case xt:if(rs)return rs.call(i)==rs.call(u)}return!1}function JP(i,u,c,f,m,F){var C=c&w,b=Xp(i),x=b.length,j=Xp(u),$=j.length;if(x!=$&&!C)return!1;for(var L=x;L--;){var H=b[L];if(!(C?H in u:be.call(u,H)))return!1}var J=F.get(i),te=F.get(u);if(J&&te)return J==u&&te==i;var pe=!0;F.set(i,u),F.set(u,i);for(var ne=C;++L<x;){H=b[L];var he=i[H],_e=u[H];if(f)var Qt=C?f(_e,he,H,u,i,F):f(he,_e,H,i,u,F);if(!(Qt===e?he===_e||m(he,_e,c,f,F):Qt)){pe=!1;break}ne||(ne=H=="constructor")}if(pe&&!ne){var It=i.constructor,en=u.constructor;It!=en&&"constructor"in i&&"constructor"in u&&!(typeof It=="function"&&It instanceof It&&typeof en=="function"&&en instanceof en)&&(pe=!1)}return F.delete(i),F.delete(u),pe}function xr(i){return od(B_(i,e,q_),i+"")}function Xp(i){return Vg(i,lt,td)}function Zp(i){return Vg(i,Lt,x_)}var Qp=ec?function(i){return ec.get(i)}:_d;function hc(i){for(var u=i.name+"",c=Mo[u],f=be.call(Mo,u)?c.length:0;f--;){var m=c[f],F=m.func;if(F==null||F==i)return m.name}return u}function Uo(i){var u=be.call(_,"placeholder")?_:i;return u.placeholder}function ee(){var i=_.iteratee||md;return i=i===md?Yg:i,arguments.length?i(arguments[0],arguments[1]):i}function Dc(i,u){var c=i.__data__;return nO(u)?c[typeof u=="string"?"string":"hash"]:c.map}function ed(i){for(var u=lt(i),c=u.length;c--;){var f=u[c],m=i[f];u[c]=[f,m,T_(m)]}return u}function Yi(i,u){var c=ox(i,u);return Kg(c)?c:e}function KP(i){var u=be.call(i,zi),c=i[zi];try{i[zi]=e;var f=!0}catch{}var m=Ga.call(i);return f&&(u?i[zi]=c:delete i[zi]),m}var td=xp?function(i){return i==null?[]:(i=Re(i),ei(xp(i),function(u){return Rg.call(i,u)}))}:yd,x_=xp?function(i){for(var u=[];i;)ti(u,td(i)),i=Ka(i);return u}:yd,Et=Ot;(Pp&&Et(new Pp(new ArrayBuffer(1)))!=Vt||es&&Et(new es)!=zt||Op&&Et(Op.resolve())!=ba||No&&Et(new No)!=Gt||ts&&Et(new ts)!=$i)&&(Et=function(i){var u=Ot(i),c=u==Pn?i.constructor:e,f=c?Xi(c):"";if(f)switch(f){case Tx:return Vt;case Ix:return zt;case Bx:return ba;case Rx:return Gt;case Nx:return $i}return u});function YP(i,u,c){for(var f=-1,m=c.length;++f<m;){var F=c[f],C=F.size;switch(F.type){case"drop":i+=C;break;case"dropRight":u-=C;break;case"take":u=Ft(u,i+C);break;case"takeRight":i=it(i,u-C);break}}return{start:i,end:u}}function XP(i){var u=i.match(Zf);return u?u[1].split(Qf):[]}function P_(i,u,c){u=si(u,i);for(var f=-1,m=u.length,F=!1;++f<m;){var C=cr(u[f]);if(!(F=i!=null&&c(i,C)))break;i=i[C]}return F||++f!=m?F:(m=i==null?0:i.length,!!m&&vc(m)&&Pr(C,m)&&(ae(i)||Zi(i)))}function ZP(i){var u=i.length,c=new i.constructor(u);return u&&typeof i[0]=="string"&&be.call(i,"index")&&(c.index=i.index,c.input=i.input),c}function O_(i){return typeof i.constructor=="function"&&!ls(i)?jo(Ka(i)):{}}function QP(i,u,c){var f=i.constructor;switch(u){case ir:return Jp(i);case vr:case Bi:return new f(+i);case Vt:return MP(i,c);case Nu:case Mu:case ju:case $u:case Li:case Lu:case Uu:case xo:case ku:return p_(i,c);case zt:return new f;case Zr:case ji:return new f(i);case Mi:return jP(i);case Gt:return new f;case xt:return $P(i)}}function eO(i,u){var c=u.length;if(!c)return i;var f=c-1;return u[f]=(c>1?"& ":"")+u[f],u=u.join(c>2?", ":" "),i.replace(Xf,`{
|
|
9
|
+
/* [wrapped with `+u+`] */
|
|
10
|
+
`)}function tO(i){return ae(i)||Zi(i)||!!(Ng&&i&&i[Ng])}function Pr(i,u){var c=typeof i;return u=u??rr,!!u&&(c=="number"||c!="symbol"&&ap.test(i))&&i>-1&&i%1==0&&i<u}function Tt(i,u,c){if(!He(c))return!1;var f=typeof u;return(f=="number"?$t(c)&&Pr(u,c.length):f=="string"&&u in c)?In(c[u],i):!1}function nd(i,u){if(ae(i))return!1;var c=typeof i;return c=="number"||c=="symbol"||c=="boolean"||i==null||Zt(i)?!0:Vf.test(i)||!Gf.test(i)||u!=null&&i in Re(u)}function nO(i){var u=typeof i;return u=="string"||u=="number"||u=="symbol"||u=="boolean"?i!=="__proto__":i===null}function rd(i){var u=hc(i),c=_[u];if(typeof c!="function"||!(u in me.prototype))return!1;if(i===c)return!0;var f=Qp(c);return!!f&&i===f[0]}function rO(i){return!!Tg&&Tg in i}var iO=Ha?Or:Fd;function ls(i){var u=i&&i.constructor,c=typeof u=="function"&&u.prototype||Ro;return i===c}function T_(i){return i===i&&!He(i)}function I_(i,u){return function(c){return c==null?!1:c[i]===u&&(u!==e||i in Re(c))}}function oO(i){var u=Fc(i,function(f){return c.size===l&&c.clear(),f}),c=u.cache;return u}function uO(i,u){var c=i[1],f=u[1],m=c|f,F=m<(S|O|Q),C=f==Q&&c==I||f==Q&&c==fe&&i[7].length<=u[8]||f==(Q|fe)&&u[7].length<=u[8]&&c==I;if(!(F||C))return i;f&S&&(i[2]=u[2],m|=c&S?0:P);var b=u[3];if(b){var x=i[3];i[3]=x?h_(x,b,u[4]):b,i[4]=x?ni(i[3],p):u[4]}return b=u[5],b&&(x=i[5],i[5]=x?D_(x,b,u[6]):b,i[6]=x?ni(i[5],p):u[6]),b=u[7],b&&(i[7]=b),f&Q&&(i[8]=i[8]==null?u[8]:Ft(i[8],u[8])),i[9]==null&&(i[9]=u[9]),i[0]=u[0],i[1]=m,i}function sO(i){var u=[];if(i!=null)for(var c in Re(i))u.push(c);return u}function aO(i){return Ga.call(i)}function B_(i,u,c){return u=it(u===e?i.length-1:u,0),function(){for(var f=arguments,m=-1,F=it(f.length-u,0),C=T(F);++m<F;)C[m]=f[u+m];m=-1;for(var b=T(u+1);++m<u;)b[m]=f[m];return b[u]=c(C),Kt(i,this,b)}}function R_(i,u){return u.length<2?i:Ki(i,Dn(u,0,-1))}function cO(i,u){for(var c=i.length,f=Ft(u.length,c),m=jt(i);f--;){var F=u[f];i[f]=Pr(F,c)?m[F]:e}return i}function id(i,u){if(!(u==="constructor"&&typeof i[u]=="function")&&u!="__proto__")return i[u]}var N_=j_(i_),fs=wx||function(i,u){return ct.setTimeout(i,u)},od=j_(IP);function M_(i,u,c){var f=u+"";return od(i,eO(f,lO(XP(f),c)))}function j_(i){var u=0,c=0;return function(){var f=xx(),m=dt-(f-c);if(c=f,m>0){if(++u>=nr)return arguments[0]}else u=0;return i.apply(e,arguments)}}function mc(i,u){var c=-1,f=i.length,m=f-1;for(u=u===e?f:u;++c<u;){var F=kp(c,m),C=i[F];i[F]=i[c],i[c]=C}return i.length=u,i}var $_=oO(function(i){var u=[];return i.charCodeAt(0)===46&&u.push(""),i.replace(Jf,function(c,f,m,F){u.push(m?F.replace(np,"$1"):f||c)}),u});function cr(i){if(typeof i=="string"||Zt(i))return i;var u=i+"";return u=="0"&&1/i==-Fr?"-0":u}function Xi(i){if(i!=null){try{return za.call(i)}catch{}try{return i+""}catch{}}return""}function lO(i,u){return fn(Ca,function(c){var f="_."+c[0];u&c[1]&&!Ua(i,f)&&i.push(f)}),i.sort()}function L_(i){if(i instanceof me)return i.clone();var u=new dn(i.__wrapped__,i.__chain__);return u.__actions__=jt(i.__actions__),u.__index__=i.__index__,u.__values__=i.__values__,u}function fO(i,u,c){(c?Tt(i,u,c):u===e)?u=1:u=it(le(u),0);var f=i==null?0:i.length;if(!f||u<1)return[];for(var m=0,F=0,C=T(Za(f/u));m<f;)C[F++]=Dn(i,m,m+=u);return C}function pO(i){for(var u=-1,c=i==null?0:i.length,f=0,m=[];++u<c;){var F=i[u];F&&(m[f++]=F)}return m}function dO(){var i=arguments.length;if(!i)return[];for(var u=T(i-1),c=arguments[0],f=i;f--;)u[f-1]=arguments[f];return ti(ae(c)?jt(c):[c],Dt(u,1))}var hO=de(function(i,u){return Xe(i)?os(i,Dt(u,1,Xe,!0)):[]}),DO=de(function(i,u){var c=mn(u);return Xe(c)&&(c=e),Xe(i)?os(i,Dt(u,1,Xe,!0),ee(c,2)):[]}),mO=de(function(i,u){var c=mn(u);return Xe(c)&&(c=e),Xe(i)?os(i,Dt(u,1,Xe,!0),e,c):[]});function gO(i,u,c){var f=i==null?0:i.length;return f?(u=c||u===e?1:le(u),Dn(i,u<0?0:u,f)):[]}function _O(i,u,c){var f=i==null?0:i.length;return f?(u=c||u===e?1:le(u),u=f-u,Dn(i,0,u<0?0:u)):[]}function yO(i,u){return i&&i.length?ac(i,ee(u,3),!0,!0):[]}function FO(i,u){return i&&i.length?ac(i,ee(u,3),!0):[]}function EO(i,u,c,f){var m=i==null?0:i.length;return m?(c&&typeof c!="number"&&Tt(i,u,c)&&(c=0,f=m),dP(i,u,c,f)):[]}function U_(i,u,c){var f=i==null?0:i.length;if(!f)return-1;var m=c==null?0:le(c);return m<0&&(m=it(f+m,0)),ka(i,ee(u,3),m)}function k_(i,u,c){var f=i==null?0:i.length;if(!f)return-1;var m=f-1;return c!==e&&(m=le(c),m=c<0?it(f+m,0):Ft(m,f-1)),ka(i,ee(u,3),m,!0)}function q_(i){var u=i==null?0:i.length;return u?Dt(i,1):[]}function vO(i){var u=i==null?0:i.length;return u?Dt(i,Fr):[]}function CO(i,u){var c=i==null?0:i.length;return c?(u=u===e?1:le(u),Dt(i,u)):[]}function wO(i){for(var u=-1,c=i==null?0:i.length,f={};++u<c;){var m=i[u];f[m[0]]=m[1]}return f}function W_(i){return i&&i.length?i[0]:e}function bO(i,u,c){var f=i==null?0:i.length;if(!f)return-1;var m=c==null?0:le(c);return m<0&&(m=it(f+m,0)),To(i,u,m)}function AO(i){var u=i==null?0:i.length;return u?Dn(i,0,-1):[]}var SO=de(function(i){var u=qe(i,Gp);return u.length&&u[0]===i[0]?Mp(u):[]}),xO=de(function(i){var u=mn(i),c=qe(i,Gp);return u===mn(c)?u=e:c.pop(),c.length&&c[0]===i[0]?Mp(c,ee(u,2)):[]}),PO=de(function(i){var u=mn(i),c=qe(i,Gp);return u=typeof u=="function"?u:e,u&&c.pop(),c.length&&c[0]===i[0]?Mp(c,e,u):[]});function OO(i,u){return i==null?"":Ax.call(i,u)}function mn(i){var u=i==null?0:i.length;return u?i[u-1]:e}function TO(i,u,c){var f=i==null?0:i.length;if(!f)return-1;var m=f;return c!==e&&(m=le(c),m=m<0?it(f+m,0):Ft(m,f-1)),u===u?lx(i,u,m):ka(i,Cg,m,!0)}function IO(i,u){return i&&i.length?e_(i,le(u)):e}var BO=de(H_);function H_(i,u){return i&&i.length&&u&&u.length?Up(i,u):i}function RO(i,u,c){return i&&i.length&&u&&u.length?Up(i,u,ee(c,2)):i}function NO(i,u,c){return i&&i.length&&u&&u.length?Up(i,u,e,c):i}var MO=xr(function(i,u){var c=i==null?0:i.length,f=Ip(i,u);return r_(i,qe(u,function(m){return Pr(m,c)?+m:m}).sort(d_)),f});function jO(i,u){var c=[];if(!(i&&i.length))return c;var f=-1,m=[],F=i.length;for(u=ee(u,3);++f<F;){var C=i[f];u(C,f,i)&&(c.push(C),m.push(f))}return r_(i,m),c}function ud(i){return i==null?i:Ox.call(i)}function $O(i,u,c){var f=i==null?0:i.length;return f?(c&&typeof c!="number"&&Tt(i,u,c)?(u=0,c=f):(u=u==null?0:le(u),c=c===e?f:le(c)),Dn(i,u,c)):[]}function LO(i,u){return sc(i,u)}function UO(i,u,c){return Wp(i,u,ee(c,2))}function kO(i,u){var c=i==null?0:i.length;if(c){var f=sc(i,u);if(f<c&&In(i[f],u))return f}return-1}function qO(i,u){return sc(i,u,!0)}function WO(i,u,c){return Wp(i,u,ee(c,2),!0)}function HO(i,u){var c=i==null?0:i.length;if(c){var f=sc(i,u,!0)-1;if(In(i[f],u))return f}return-1}function zO(i){return i&&i.length?o_(i):[]}function GO(i,u){return i&&i.length?o_(i,ee(u,2)):[]}function VO(i){var u=i==null?0:i.length;return u?Dn(i,1,u):[]}function JO(i,u,c){return i&&i.length?(u=c||u===e?1:le(u),Dn(i,0,u<0?0:u)):[]}function KO(i,u,c){var f=i==null?0:i.length;return f?(u=c||u===e?1:le(u),u=f-u,Dn(i,u<0?0:u,f)):[]}function YO(i,u){return i&&i.length?ac(i,ee(u,3),!1,!0):[]}function XO(i,u){return i&&i.length?ac(i,ee(u,3)):[]}var ZO=de(function(i){return ui(Dt(i,1,Xe,!0))}),QO=de(function(i){var u=mn(i);return Xe(u)&&(u=e),ui(Dt(i,1,Xe,!0),ee(u,2))}),eT=de(function(i){var u=mn(i);return u=typeof u=="function"?u:e,ui(Dt(i,1,Xe,!0),e,u)});function tT(i){return i&&i.length?ui(i):[]}function nT(i,u){return i&&i.length?ui(i,ee(u,2)):[]}function rT(i,u){return u=typeof u=="function"?u:e,i&&i.length?ui(i,e,u):[]}function sd(i){if(!(i&&i.length))return[];var u=0;return i=ei(i,function(c){if(Xe(c))return u=it(c.length,u),!0}),wp(u,function(c){return qe(i,Ep(c))})}function z_(i,u){if(!(i&&i.length))return[];var c=sd(i);return u==null?c:qe(c,function(f){return Kt(u,e,f)})}var iT=de(function(i,u){return Xe(i)?os(i,u):[]}),oT=de(function(i){return zp(ei(i,Xe))}),uT=de(function(i){var u=mn(i);return Xe(u)&&(u=e),zp(ei(i,Xe),ee(u,2))}),sT=de(function(i){var u=mn(i);return u=typeof u=="function"?u:e,zp(ei(i,Xe),e,u)}),aT=de(sd);function cT(i,u){return c_(i||[],u||[],is)}function lT(i,u){return c_(i||[],u||[],as)}var fT=de(function(i){var u=i.length,c=u>1?i[u-1]:e;return c=typeof c=="function"?(i.pop(),c):e,z_(i,c)});function G_(i){var u=_(i);return u.__chain__=!0,u}function pT(i,u){return u(i),i}function gc(i,u){return u(i)}var dT=xr(function(i){var u=i.length,c=u?i[0]:0,f=this.__wrapped__,m=function(F){return Ip(F,i)};return u>1||this.__actions__.length||!(f instanceof me)||!Pr(c)?this.thru(m):(f=f.slice(c,+c+(u?1:0)),f.__actions__.push({func:gc,args:[m],thisArg:e}),new dn(f,this.__chain__).thru(function(F){return u&&!F.length&&F.push(e),F}))});function hT(){return G_(this)}function DT(){return new dn(this.value(),this.__chain__)}function mT(){this.__values__===e&&(this.__values__=uy(this.value()));var i=this.__index__>=this.__values__.length,u=i?e:this.__values__[this.__index__++];return{done:i,value:u}}function gT(){return this}function _T(i){for(var u,c=this;c instanceof nc;){var f=L_(c);f.__index__=0,f.__values__=e,u?m.__wrapped__=f:u=f;var m=f;c=c.__wrapped__}return m.__wrapped__=i,u}function yT(){var i=this.__wrapped__;if(i instanceof me){var u=i;return this.__actions__.length&&(u=new me(this)),u=u.reverse(),u.__actions__.push({func:gc,args:[ud],thisArg:e}),new dn(u,this.__chain__)}return this.thru(ud)}function FT(){return a_(this.__wrapped__,this.__actions__)}var ET=cc(function(i,u,c){be.call(i,c)?++i[c]:Ar(i,c,1)});function vT(i,u,c){var f=ae(i)?Eg:pP;return c&&Tt(i,u,c)&&(u=e),f(i,ee(u,3))}function CT(i,u){var c=ae(i)?ei:zg;return c(i,ee(u,3))}var wT=y_(U_),bT=y_(k_);function AT(i,u){return Dt(_c(i,u),1)}function ST(i,u){return Dt(_c(i,u),Fr)}function xT(i,u,c){return c=c===e?1:le(c),Dt(_c(i,u),c)}function V_(i,u){var c=ae(i)?fn:oi;return c(i,ee(u,3))}function J_(i,u){var c=ae(i)?VS:Hg;return c(i,ee(u,3))}var PT=cc(function(i,u,c){be.call(i,c)?i[c].push(u):Ar(i,c,[u])});function OT(i,u,c,f){i=$t(i)?i:qo(i),c=c&&!f?le(c):0;var m=i.length;return c<0&&(c=it(m+c,0)),Cc(i)?c<=m&&i.indexOf(u,c)>-1:!!m&&To(i,u,c)>-1}var TT=de(function(i,u,c){var f=-1,m=typeof u=="function",F=$t(i)?T(i.length):[];return oi(i,function(C){F[++f]=m?Kt(u,C,c):us(C,u,c)}),F}),IT=cc(function(i,u,c){Ar(i,c,u)});function _c(i,u){var c=ae(i)?qe:Xg;return c(i,ee(u,3))}function BT(i,u,c,f){return i==null?[]:(ae(u)||(u=u==null?[]:[u]),c=f?e:c,ae(c)||(c=c==null?[]:[c]),t_(i,u,c))}var RT=cc(function(i,u,c){i[c?0:1].push(u)},function(){return[[],[]]});function NT(i,u,c){var f=ae(i)?yp:bg,m=arguments.length<3;return f(i,ee(u,4),c,m,oi)}function MT(i,u,c){var f=ae(i)?JS:bg,m=arguments.length<3;return f(i,ee(u,4),c,m,Hg)}function jT(i,u){var c=ae(i)?ei:zg;return c(i,Ec(ee(u,3)))}function $T(i){var u=ae(i)?Ug:OP;return u(i)}function LT(i,u,c){(c?Tt(i,u,c):u===e)?u=1:u=le(u);var f=ae(i)?sP:TP;return f(i,u)}function UT(i){var u=ae(i)?aP:BP;return u(i)}function kT(i){if(i==null)return 0;if($t(i))return Cc(i)?Bo(i):i.length;var u=Et(i);return u==zt||u==Gt?i.size:$p(i).length}function qT(i,u,c){var f=ae(i)?Fp:RP;return c&&Tt(i,u,c)&&(u=e),f(i,ee(u,3))}var WT=de(function(i,u){if(i==null)return[];var c=u.length;return c>1&&Tt(i,u[0],u[1])?u=[]:c>2&&Tt(u[0],u[1],u[2])&&(u=[u[0]]),t_(i,Dt(u,1),[])}),yc=Cx||function(){return ct.Date.now()};function HT(i,u){if(typeof u!="function")throw new pn(o);return i=le(i),function(){if(--i<1)return u.apply(this,arguments)}}function K_(i,u,c){return u=c?e:u,u=i&&u==null?i.length:u,Sr(i,Q,e,e,e,e,u)}function Y_(i,u){var c;if(typeof u!="function")throw new pn(o);return i=le(i),function(){return--i>0&&(c=u.apply(this,arguments)),i<=1&&(u=e),c}}var ad=de(function(i,u,c){var f=S;if(c.length){var m=ni(c,Uo(ad));f|=q}return Sr(i,f,u,c,m)}),X_=de(function(i,u,c){var f=S|O;if(c.length){var m=ni(c,Uo(X_));f|=q}return Sr(u,f,i,c,m)});function Z_(i,u,c){u=c?e:u;var f=Sr(i,I,e,e,e,e,e,u);return f.placeholder=Z_.placeholder,f}function Q_(i,u,c){u=c?e:u;var f=Sr(i,U,e,e,e,e,e,u);return f.placeholder=Q_.placeholder,f}function ey(i,u,c){var f,m,F,C,b,x,j=0,$=!1,L=!1,H=!0;if(typeof i!="function")throw new pn(o);u=gn(u)||0,He(c)&&($=!!c.leading,L="maxWait"in c,F=L?it(gn(c.maxWait)||0,u):F,H="trailing"in c?!!c.trailing:H);function J(Ze){var Bn=f,Ir=m;return f=m=e,j=Ze,C=i.apply(Ir,Bn),C}function te(Ze){return j=Ze,b=fs(he,u),$?J(Ze):C}function pe(Ze){var Bn=Ze-x,Ir=Ze-j,yy=u-Bn;return L?Ft(yy,F-Ir):yy}function ne(Ze){var Bn=Ze-x,Ir=Ze-j;return x===e||Bn>=u||Bn<0||L&&Ir>=F}function he(){var Ze=yc();if(ne(Ze))return _e(Ze);b=fs(he,pe(Ze))}function _e(Ze){return b=e,H&&f?J(Ze):(f=m=e,C)}function Qt(){b!==e&&l_(b),j=0,f=x=m=b=e}function It(){return b===e?C:_e(yc())}function en(){var Ze=yc(),Bn=ne(Ze);if(f=arguments,m=this,x=Ze,Bn){if(b===e)return te(x);if(L)return l_(b),b=fs(he,u),J(x)}return b===e&&(b=fs(he,u)),C}return en.cancel=Qt,en.flush=It,en}var zT=de(function(i,u){return Wg(i,1,u)}),GT=de(function(i,u,c){return Wg(i,gn(u)||0,c)});function VT(i){return Sr(i,Fe)}function Fc(i,u){if(typeof i!="function"||u!=null&&typeof u!="function")throw new pn(o);var c=function(){var f=arguments,m=u?u.apply(this,f):f[0],F=c.cache;if(F.has(m))return F.get(m);var C=i.apply(this,f);return c.cache=F.set(m,C)||F,C};return c.cache=new(Fc.Cache||br),c}Fc.Cache=br;function Ec(i){if(typeof i!="function")throw new pn(o);return function(){var u=arguments;switch(u.length){case 0:return!i.call(this);case 1:return!i.call(this,u[0]);case 2:return!i.call(this,u[0],u[1]);case 3:return!i.call(this,u[0],u[1],u[2])}return!i.apply(this,u)}}function JT(i){return Y_(2,i)}var KT=NP(function(i,u){u=u.length==1&&ae(u[0])?qe(u[0],Yt(ee())):qe(Dt(u,1),Yt(ee()));var c=u.length;return de(function(f){for(var m=-1,F=Ft(f.length,c);++m<F;)f[m]=u[m].call(this,f[m]);return Kt(i,this,f)})}),cd=de(function(i,u){var c=ni(u,Uo(cd));return Sr(i,q,e,u,c)}),ty=de(function(i,u){var c=ni(u,Uo(ty));return Sr(i,X,e,u,c)}),YT=xr(function(i,u){return Sr(i,fe,e,e,e,u)});function XT(i,u){if(typeof i!="function")throw new pn(o);return u=u===e?u:le(u),de(i,u)}function ZT(i,u){if(typeof i!="function")throw new pn(o);return u=u==null?0:it(le(u),0),de(function(c){var f=c[u],m=ai(c,0,u);return f&&ti(m,f),Kt(i,this,m)})}function QT(i,u,c){var f=!0,m=!0;if(typeof i!="function")throw new pn(o);return He(c)&&(f="leading"in c?!!c.leading:f,m="trailing"in c?!!c.trailing:m),ey(i,u,{leading:f,maxWait:u,trailing:m})}function e3(i){return K_(i,1)}function t3(i,u){return cd(Vp(u),i)}function n3(){if(!arguments.length)return[];var i=arguments[0];return ae(i)?i:[i]}function r3(i){return hn(i,E)}function i3(i,u){return u=typeof u=="function"?u:e,hn(i,E,u)}function o3(i){return hn(i,D|E)}function u3(i,u){return u=typeof u=="function"?u:e,hn(i,D|E,u)}function s3(i,u){return u==null||qg(i,u,lt(u))}function In(i,u){return i===u||i!==i&&u!==u}var a3=dc(Np),c3=dc(function(i,u){return i>=u}),Zi=Jg((function(){return arguments})())?Jg:function(i){return Ve(i)&&be.call(i,"callee")&&!Rg.call(i,"callee")},ae=T.isArray,l3=Dg?Yt(Dg):_P;function $t(i){return i!=null&&vc(i.length)&&!Or(i)}function Xe(i){return Ve(i)&&$t(i)}function f3(i){return i===!0||i===!1||Ve(i)&&Ot(i)==vr}var ci=bx||Fd,p3=mg?Yt(mg):yP;function d3(i){return Ve(i)&&i.nodeType===1&&!ps(i)}function h3(i){if(i==null)return!0;if($t(i)&&(ae(i)||typeof i=="string"||typeof i.splice=="function"||ci(i)||ko(i)||Zi(i)))return!i.length;var u=Et(i);if(u==zt||u==Gt)return!i.size;if(ls(i))return!$p(i).length;for(var c in i)if(be.call(i,c))return!1;return!0}function D3(i,u){return ss(i,u)}function m3(i,u,c){c=typeof c=="function"?c:e;var f=c?c(i,u):e;return f===e?ss(i,u,e,c):!!f}function ld(i){if(!Ve(i))return!1;var u=Ot(i);return u==Ri||u==Lf||typeof i.message=="string"&&typeof i.name=="string"&&!ps(i)}function g3(i){return typeof i=="number"&&Mg(i)}function Or(i){if(!He(i))return!1;var u=Ot(i);return u==So||u==wa||u==Ao||u==Uf}function ny(i){return typeof i=="number"&&i==le(i)}function vc(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=rr}function He(i){var u=typeof i;return i!=null&&(u=="object"||u=="function")}function Ve(i){return i!=null&&typeof i=="object"}var ry=gg?Yt(gg):EP;function _3(i,u){return i===u||jp(i,u,ed(u))}function y3(i,u,c){return c=typeof c=="function"?c:e,jp(i,u,ed(u),c)}function F3(i){return iy(i)&&i!=+i}function E3(i){if(iO(i))throw new se(r);return Kg(i)}function v3(i){return i===null}function C3(i){return i==null}function iy(i){return typeof i=="number"||Ve(i)&&Ot(i)==Zr}function ps(i){if(!Ve(i)||Ot(i)!=Pn)return!1;var u=Ka(i);if(u===null)return!0;var c=be.call(u,"constructor")&&u.constructor;return typeof c=="function"&&c instanceof c&&za.call(c)==yx}var fd=_g?Yt(_g):vP;function w3(i){return ny(i)&&i>=-rr&&i<=rr}var oy=yg?Yt(yg):CP;function Cc(i){return typeof i=="string"||!ae(i)&&Ve(i)&&Ot(i)==ji}function Zt(i){return typeof i=="symbol"||Ve(i)&&Ot(i)==xt}var ko=Fg?Yt(Fg):wP;function b3(i){return i===e}function A3(i){return Ve(i)&&Et(i)==$i}function S3(i){return Ve(i)&&Ot(i)==kf}var x3=dc(Lp),P3=dc(function(i,u){return i<=u});function uy(i){if(!i)return[];if($t(i))return Cc(i)?On(i):jt(i);if(Qu&&i[Qu])return sx(i[Qu]());var u=Et(i),c=u==zt?Ap:u==Gt?qa:qo;return c(i)}function Tr(i){if(!i)return i===0?i:0;if(i=gn(i),i===Fr||i===-Fr){var u=i<0?-1:1;return u*Er}return i===i?i:0}function le(i){var u=Tr(i),c=u%1;return u===u?c?u-c:u:0}function sy(i){return i?Ji(le(i),0,an):0}function gn(i){if(typeof i=="number")return i;if(Zt(i))return bo;if(He(i)){var u=typeof i.valueOf=="function"?i.valueOf():i;i=He(u)?u+"":u}if(typeof i!="string")return i===0?i:+i;i=Ag(i);var c=op.test(i);return c||sp.test(i)?HS(i.slice(2),c?2:8):ip.test(i)?bo:+i}function ay(i){return ar(i,Lt(i))}function O3(i){return i?Ji(le(i),-rr,rr):i===0?i:0}function Ae(i){return i==null?"":Xt(i)}var T3=$o(function(i,u){if(ls(u)||$t(u)){ar(u,lt(u),i);return}for(var c in u)be.call(u,c)&&is(i,c,u[c])}),cy=$o(function(i,u){ar(u,Lt(u),i)}),wc=$o(function(i,u,c,f){ar(u,Lt(u),i,f)}),I3=$o(function(i,u,c,f){ar(u,lt(u),i,f)}),B3=xr(Ip);function R3(i,u){var c=jo(i);return u==null?c:kg(c,u)}var N3=de(function(i,u){i=Re(i);var c=-1,f=u.length,m=f>2?u[2]:e;for(m&&Tt(u[0],u[1],m)&&(f=1);++c<f;)for(var F=u[c],C=Lt(F),b=-1,x=C.length;++b<x;){var j=C[b],$=i[j];($===e||In($,Ro[j])&&!be.call(i,j))&&(i[j]=F[j])}return i}),M3=de(function(i){return i.push(e,A_),Kt(ly,e,i)});function j3(i,u){return vg(i,ee(u,3),sr)}function $3(i,u){return vg(i,ee(u,3),Rp)}function L3(i,u){return i==null?i:Bp(i,ee(u,3),Lt)}function U3(i,u){return i==null?i:Gg(i,ee(u,3),Lt)}function k3(i,u){return i&&sr(i,ee(u,3))}function q3(i,u){return i&&Rp(i,ee(u,3))}function W3(i){return i==null?[]:oc(i,lt(i))}function H3(i){return i==null?[]:oc(i,Lt(i))}function pd(i,u,c){var f=i==null?e:Ki(i,u);return f===e?c:f}function z3(i,u){return i!=null&&P_(i,u,hP)}function dd(i,u){return i!=null&&P_(i,u,DP)}var G3=E_(function(i,u,c){u!=null&&typeof u.toString!="function"&&(u=Ga.call(u)),i[u]=c},Dd(Ut)),V3=E_(function(i,u,c){u!=null&&typeof u.toString!="function"&&(u=Ga.call(u)),be.call(i,u)?i[u].push(c):i[u]=[c]},ee),J3=de(us);function lt(i){return $t(i)?Lg(i):$p(i)}function Lt(i){return $t(i)?Lg(i,!0):bP(i)}function K3(i,u){var c={};return u=ee(u,3),sr(i,function(f,m,F){Ar(c,u(f,m,F),f)}),c}function Y3(i,u){var c={};return u=ee(u,3),sr(i,function(f,m,F){Ar(c,m,u(f,m,F))}),c}var X3=$o(function(i,u,c){uc(i,u,c)}),ly=$o(function(i,u,c,f){uc(i,u,c,f)}),Z3=xr(function(i,u){var c={};if(i==null)return c;var f=!1;u=qe(u,function(F){return F=si(F,i),f||(f=F.length>1),F}),ar(i,Zp(i),c),f&&(c=hn(c,D|g|E,GP));for(var m=u.length;m--;)Hp(c,u[m]);return c});function Q3(i,u){return fy(i,Ec(ee(u)))}var eI=xr(function(i,u){return i==null?{}:SP(i,u)});function fy(i,u){if(i==null)return{};var c=qe(Zp(i),function(f){return[f]});return u=ee(u),n_(i,c,function(f,m){return u(f,m[0])})}function tI(i,u,c){u=si(u,i);var f=-1,m=u.length;for(m||(m=1,i=e);++f<m;){var F=i==null?e:i[cr(u[f])];F===e&&(f=m,F=c),i=Or(F)?F.call(i):F}return i}function nI(i,u,c){return i==null?i:as(i,u,c)}function rI(i,u,c,f){return f=typeof f=="function"?f:e,i==null?i:as(i,u,c,f)}var py=w_(lt),dy=w_(Lt);function iI(i,u,c){var f=ae(i),m=f||ci(i)||ko(i);if(u=ee(u,4),c==null){var F=i&&i.constructor;m?c=f?new F:[]:He(i)?c=Or(F)?jo(Ka(i)):{}:c={}}return(m?fn:sr)(i,function(C,b,x){return u(c,C,b,x)}),c}function oI(i,u){return i==null?!0:Hp(i,u)}function uI(i,u,c){return i==null?i:s_(i,u,Vp(c))}function sI(i,u,c,f){return f=typeof f=="function"?f:e,i==null?i:s_(i,u,Vp(c),f)}function qo(i){return i==null?[]:bp(i,lt(i))}function aI(i){return i==null?[]:bp(i,Lt(i))}function cI(i,u,c){return c===e&&(c=u,u=e),c!==e&&(c=gn(c),c=c===c?c:0),u!==e&&(u=gn(u),u=u===u?u:0),Ji(gn(i),u,c)}function lI(i,u,c){return u=Tr(u),c===e?(c=u,u=0):c=Tr(c),i=gn(i),mP(i,u,c)}function fI(i,u,c){if(c&&typeof c!="boolean"&&Tt(i,u,c)&&(u=c=e),c===e&&(typeof u=="boolean"?(c=u,u=e):typeof i=="boolean"&&(c=i,i=e)),i===e&&u===e?(i=0,u=1):(i=Tr(i),u===e?(u=i,i=0):u=Tr(u)),i>u){var f=i;i=u,u=f}if(c||i%1||u%1){var m=jg();return Ft(i+m*(u-i+WS("1e-"+((m+"").length-1))),u)}return kp(i,u)}var pI=Lo(function(i,u,c){return u=u.toLowerCase(),i+(c?hy(u):u)});function hy(i){return hd(Ae(i).toLowerCase())}function Dy(i){return i=Ae(i),i&&i.replace(Ia,nx).replace(Qr,"")}function dI(i,u,c){i=Ae(i),u=Xt(u);var f=i.length;c=c===e?f:Ji(le(c),0,f);var m=c;return c-=u.length,c>=0&&i.slice(c,m)==u}function hI(i){return i=Ae(i),i&&qu.test(i)?i.replace(Pa,rx):i}function DI(i){return i=Ae(i),i&&Kf.test(i)?i.replace(Hu,"\\$&"):i}var mI=Lo(function(i,u,c){return i+(c?"-":"")+u.toLowerCase()}),gI=Lo(function(i,u,c){return i+(c?" ":"")+u.toLowerCase()}),_I=__("toLowerCase");function yI(i,u,c){i=Ae(i),u=le(u);var f=u?Bo(i):0;if(!u||f>=u)return i;var m=(u-f)/2;return pc(Qa(m),c)+i+pc(Za(m),c)}function FI(i,u,c){i=Ae(i),u=le(u);var f=u?Bo(i):0;return u&&f<u?i+pc(u-f,c):i}function EI(i,u,c){i=Ae(i),u=le(u);var f=u?Bo(i):0;return u&&f<u?pc(u-f,c)+i:i}function vI(i,u,c){return c||u==null?u=0:u&&(u=+u),Px(Ae(i).replace(zu,""),u||0)}function CI(i,u,c){return(c?Tt(i,u,c):u===e)?u=1:u=le(u),qp(Ae(i),u)}function wI(){var i=arguments,u=Ae(i[0]);return i.length<3?u:u.replace(i[1],i[2])}var bI=Lo(function(i,u,c){return i+(c?"_":"")+u.toLowerCase()});function AI(i,u,c){return c&&typeof c!="number"&&Tt(i,u,c)&&(u=c=e),c=c===e?an:c>>>0,c?(i=Ae(i),i&&(typeof u=="string"||u!=null&&!fd(u))&&(u=Xt(u),!u&&Io(i))?ai(On(i),0,c):i.split(u,c)):[]}var SI=Lo(function(i,u,c){return i+(c?" ":"")+hd(u)});function xI(i,u,c){return i=Ae(i),c=c==null?0:Ji(le(c),0,i.length),u=Xt(u),i.slice(c,c+u.length)==u}function PI(i,u,c){var f=_.templateSettings;c&&Tt(i,u,c)&&(u=e),i=Ae(i),u=wc({},u,f,b_);var m=wc({},u.imports,f.imports,b_),F=lt(m),C=bp(m,F),b,x,j=0,$=u.interpolate||Ui,L="__p += '",H=Sp((u.escape||Ui).source+"|"+$.source+"|"+($===Wu?rp:Ui).source+"|"+(u.evaluate||Ui).source+"|$","g"),J="//# sourceURL="+(be.call(u,"sourceURL")?(u.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++La+"]")+`
|
|
11
|
+
`;i.replace(H,function(ne,he,_e,Qt,It,en){return _e||(_e=Qt),L+=i.slice(j,en).replace(Ba,ix),he&&(b=!0,L+=`' +
|
|
12
|
+
__e(`+he+`) +
|
|
13
|
+
'`),It&&(x=!0,L+=`';
|
|
14
|
+
`+It+`;
|
|
15
|
+
__p += '`),_e&&(L+=`' +
|
|
16
|
+
((__t = (`+_e+`)) == null ? '' : __t) +
|
|
17
|
+
'`),j=en+ne.length,ne}),L+=`';
|
|
18
|
+
`;var te=be.call(u,"variable")&&u.variable;if(!te)L=`with (obj) {
|
|
19
|
+
`+L+`
|
|
20
|
+
}
|
|
21
|
+
`;else if(tp.test(te))throw new se(s);L=(x?L.replace(qf,""):L).replace(Wf,"$1").replace(Sa,"$1;"),L="function("+(te||"obj")+`) {
|
|
22
|
+
`+(te?"":`obj || (obj = {});
|
|
23
|
+
`)+"var __t, __p = ''"+(b?", __e = _.escape":"")+(x?`, __j = Array.prototype.join;
|
|
24
|
+
function print() { __p += __j.call(arguments, '') }
|
|
25
|
+
`:`;
|
|
26
|
+
`)+L+`return __p
|
|
27
|
+
}`;var pe=gy(function(){return Ce(F,J+"return "+L).apply(e,C)});if(pe.source=L,ld(pe))throw pe;return pe}function OI(i){return Ae(i).toLowerCase()}function TI(i){return Ae(i).toUpperCase()}function II(i,u,c){if(i=Ae(i),i&&(c||u===e))return Ag(i);if(!i||!(u=Xt(u)))return i;var f=On(i),m=On(u),F=Sg(f,m),C=xg(f,m)+1;return ai(f,F,C).join("")}function BI(i,u,c){if(i=Ae(i),i&&(c||u===e))return i.slice(0,Og(i)+1);if(!i||!(u=Xt(u)))return i;var f=On(i),m=xg(f,On(u))+1;return ai(f,0,m).join("")}function RI(i,u,c){if(i=Ae(i),i&&(c||u===e))return i.replace(zu,"");if(!i||!(u=Xt(u)))return i;var f=On(i),m=Sg(f,On(u));return ai(f,m).join("")}function NI(i,u){var c=We,f=gt;if(He(u)){var m="separator"in u?u.separator:m;c="length"in u?le(u.length):c,f="omission"in u?Xt(u.omission):f}i=Ae(i);var F=i.length;if(Io(i)){var C=On(i);F=C.length}if(c>=F)return i;var b=c-Bo(f);if(b<1)return f;var x=C?ai(C,0,b).join(""):i.slice(0,b);if(m===e)return x+f;if(C&&(b+=x.length-b),fd(m)){if(i.slice(b).search(m)){var j,$=x;for(m.global||(m=Sp(m.source,Ae(Ta.exec(m))+"g")),m.lastIndex=0;j=m.exec($);)var L=j.index;x=x.slice(0,L===e?b:L)}}else if(i.indexOf(Xt(m),b)!=b){var H=x.lastIndexOf(m);H>-1&&(x=x.slice(0,H))}return x+f}function MI(i){return i=Ae(i),i&&Hf.test(i)?i.replace(xa,fx):i}var jI=Lo(function(i,u,c){return i+(c?" ":"")+u.toUpperCase()}),hd=__("toUpperCase");function my(i,u,c){return i=Ae(i),u=c?e:u,u===e?ux(i)?hx(i):XS(i):i.match(u)||[]}var gy=de(function(i,u){try{return Kt(i,e,u)}catch(c){return ld(c)?c:new se(c)}}),$I=xr(function(i,u){return fn(u,function(c){c=cr(c),Ar(i,c,ad(i[c],i))}),i});function LI(i){var u=i==null?0:i.length,c=ee();return i=u?qe(i,function(f){if(typeof f[1]!="function")throw new pn(o);return[c(f[0]),f[1]]}):[],de(function(f){for(var m=-1;++m<u;){var F=i[m];if(Kt(F[0],this,f))return Kt(F[1],this,f)}})}function UI(i){return fP(hn(i,D))}function Dd(i){return function(){return i}}function kI(i,u){return i==null||i!==i?u:i}var qI=F_(),WI=F_(!0);function Ut(i){return i}function md(i){return Yg(typeof i=="function"?i:hn(i,D))}function HI(i){return Zg(hn(i,D))}function zI(i,u){return Qg(i,hn(u,D))}var GI=de(function(i,u){return function(c){return us(c,i,u)}}),VI=de(function(i,u){return function(c){return us(i,c,u)}});function gd(i,u,c){var f=lt(u),m=oc(u,f);c==null&&!(He(u)&&(m.length||!f.length))&&(c=u,u=i,i=this,m=oc(u,lt(u)));var F=!(He(c)&&"chain"in c)||!!c.chain,C=Or(i);return fn(m,function(b){var x=u[b];i[b]=x,C&&(i.prototype[b]=function(){var j=this.__chain__;if(F||j){var $=i(this.__wrapped__),L=$.__actions__=jt(this.__actions__);return L.push({func:x,args:arguments,thisArg:i}),$.__chain__=j,$}return x.apply(i,ti([this.value()],arguments))})}),i}function JI(){return ct._===this&&(ct._=Fx),this}function _d(){}function KI(i){return i=le(i),de(function(u){return e_(u,i)})}var YI=Kp(qe),XI=Kp(Eg),ZI=Kp(Fp);function _y(i){return nd(i)?Ep(cr(i)):xP(i)}function QI(i){return function(u){return i==null?e:Ki(i,u)}}var e8=v_(),t8=v_(!0);function yd(){return[]}function Fd(){return!1}function n8(){return{}}function r8(){return""}function i8(){return!0}function o8(i,u){if(i=le(i),i<1||i>rr)return[];var c=an,f=Ft(i,an);u=ee(u),i-=an;for(var m=wp(f,u);++c<i;)u(c);return m}function u8(i){return ae(i)?qe(i,cr):Zt(i)?[i]:jt($_(Ae(i)))}function s8(i){var u=++_x;return Ae(i)+u}var a8=fc(function(i,u){return i+u},0),c8=Yp("ceil"),l8=fc(function(i,u){return i/u},1),f8=Yp("floor");function p8(i){return i&&i.length?ic(i,Ut,Np):e}function d8(i,u){return i&&i.length?ic(i,ee(u,2),Np):e}function h8(i){return wg(i,Ut)}function D8(i,u){return wg(i,ee(u,2))}function m8(i){return i&&i.length?ic(i,Ut,Lp):e}function g8(i,u){return i&&i.length?ic(i,ee(u,2),Lp):e}var _8=fc(function(i,u){return i*u},1),y8=Yp("round"),F8=fc(function(i,u){return i-u},0);function E8(i){return i&&i.length?Cp(i,Ut):0}function v8(i,u){return i&&i.length?Cp(i,ee(u,2)):0}return _.after=HT,_.ary=K_,_.assign=T3,_.assignIn=cy,_.assignInWith=wc,_.assignWith=I3,_.at=B3,_.before=Y_,_.bind=ad,_.bindAll=$I,_.bindKey=X_,_.castArray=n3,_.chain=G_,_.chunk=fO,_.compact=pO,_.concat=dO,_.cond=LI,_.conforms=UI,_.constant=Dd,_.countBy=ET,_.create=R3,_.curry=Z_,_.curryRight=Q_,_.debounce=ey,_.defaults=N3,_.defaultsDeep=M3,_.defer=zT,_.delay=GT,_.difference=hO,_.differenceBy=DO,_.differenceWith=mO,_.drop=gO,_.dropRight=_O,_.dropRightWhile=yO,_.dropWhile=FO,_.fill=EO,_.filter=CT,_.flatMap=AT,_.flatMapDeep=ST,_.flatMapDepth=xT,_.flatten=q_,_.flattenDeep=vO,_.flattenDepth=CO,_.flip=VT,_.flow=qI,_.flowRight=WI,_.fromPairs=wO,_.functions=W3,_.functionsIn=H3,_.groupBy=PT,_.initial=AO,_.intersection=SO,_.intersectionBy=xO,_.intersectionWith=PO,_.invert=G3,_.invertBy=V3,_.invokeMap=TT,_.iteratee=md,_.keyBy=IT,_.keys=lt,_.keysIn=Lt,_.map=_c,_.mapKeys=K3,_.mapValues=Y3,_.matches=HI,_.matchesProperty=zI,_.memoize=Fc,_.merge=X3,_.mergeWith=ly,_.method=GI,_.methodOf=VI,_.mixin=gd,_.negate=Ec,_.nthArg=KI,_.omit=Z3,_.omitBy=Q3,_.once=JT,_.orderBy=BT,_.over=YI,_.overArgs=KT,_.overEvery=XI,_.overSome=ZI,_.partial=cd,_.partialRight=ty,_.partition=RT,_.pick=eI,_.pickBy=fy,_.property=_y,_.propertyOf=QI,_.pull=BO,_.pullAll=H_,_.pullAllBy=RO,_.pullAllWith=NO,_.pullAt=MO,_.range=e8,_.rangeRight=t8,_.rearg=YT,_.reject=jT,_.remove=jO,_.rest=XT,_.reverse=ud,_.sampleSize=LT,_.set=nI,_.setWith=rI,_.shuffle=UT,_.slice=$O,_.sortBy=WT,_.sortedUniq=zO,_.sortedUniqBy=GO,_.split=AI,_.spread=ZT,_.tail=VO,_.take=JO,_.takeRight=KO,_.takeRightWhile=YO,_.takeWhile=XO,_.tap=pT,_.throttle=QT,_.thru=gc,_.toArray=uy,_.toPairs=py,_.toPairsIn=dy,_.toPath=u8,_.toPlainObject=ay,_.transform=iI,_.unary=e3,_.union=ZO,_.unionBy=QO,_.unionWith=eT,_.uniq=tT,_.uniqBy=nT,_.uniqWith=rT,_.unset=oI,_.unzip=sd,_.unzipWith=z_,_.update=uI,_.updateWith=sI,_.values=qo,_.valuesIn=aI,_.without=iT,_.words=my,_.wrap=t3,_.xor=oT,_.xorBy=uT,_.xorWith=sT,_.zip=aT,_.zipObject=cT,_.zipObjectDeep=lT,_.zipWith=fT,_.entries=py,_.entriesIn=dy,_.extend=cy,_.extendWith=wc,gd(_,_),_.add=a8,_.attempt=gy,_.camelCase=pI,_.capitalize=hy,_.ceil=c8,_.clamp=cI,_.clone=r3,_.cloneDeep=o3,_.cloneDeepWith=u3,_.cloneWith=i3,_.conformsTo=s3,_.deburr=Dy,_.defaultTo=kI,_.divide=l8,_.endsWith=dI,_.eq=In,_.escape=hI,_.escapeRegExp=DI,_.every=vT,_.find=wT,_.findIndex=U_,_.findKey=j3,_.findLast=bT,_.findLastIndex=k_,_.findLastKey=$3,_.floor=f8,_.forEach=V_,_.forEachRight=J_,_.forIn=L3,_.forInRight=U3,_.forOwn=k3,_.forOwnRight=q3,_.get=pd,_.gt=a3,_.gte=c3,_.has=z3,_.hasIn=dd,_.head=W_,_.identity=Ut,_.includes=OT,_.indexOf=bO,_.inRange=lI,_.invoke=J3,_.isArguments=Zi,_.isArray=ae,_.isArrayBuffer=l3,_.isArrayLike=$t,_.isArrayLikeObject=Xe,_.isBoolean=f3,_.isBuffer=ci,_.isDate=p3,_.isElement=d3,_.isEmpty=h3,_.isEqual=D3,_.isEqualWith=m3,_.isError=ld,_.isFinite=g3,_.isFunction=Or,_.isInteger=ny,_.isLength=vc,_.isMap=ry,_.isMatch=_3,_.isMatchWith=y3,_.isNaN=F3,_.isNative=E3,_.isNil=C3,_.isNull=v3,_.isNumber=iy,_.isObject=He,_.isObjectLike=Ve,_.isPlainObject=ps,_.isRegExp=fd,_.isSafeInteger=w3,_.isSet=oy,_.isString=Cc,_.isSymbol=Zt,_.isTypedArray=ko,_.isUndefined=b3,_.isWeakMap=A3,_.isWeakSet=S3,_.join=OO,_.kebabCase=mI,_.last=mn,_.lastIndexOf=TO,_.lowerCase=gI,_.lowerFirst=_I,_.lt=x3,_.lte=P3,_.max=p8,_.maxBy=d8,_.mean=h8,_.meanBy=D8,_.min=m8,_.minBy=g8,_.stubArray=yd,_.stubFalse=Fd,_.stubObject=n8,_.stubString=r8,_.stubTrue=i8,_.multiply=_8,_.nth=IO,_.noConflict=JI,_.noop=_d,_.now=yc,_.pad=yI,_.padEnd=FI,_.padStart=EI,_.parseInt=vI,_.random=fI,_.reduce=NT,_.reduceRight=MT,_.repeat=CI,_.replace=wI,_.result=tI,_.round=y8,_.runInContext=A,_.sample=$T,_.size=kT,_.snakeCase=bI,_.some=qT,_.sortedIndex=LO,_.sortedIndexBy=UO,_.sortedIndexOf=kO,_.sortedLastIndex=qO,_.sortedLastIndexBy=WO,_.sortedLastIndexOf=HO,_.startCase=SI,_.startsWith=xI,_.subtract=F8,_.sum=E8,_.sumBy=v8,_.template=PI,_.times=o8,_.toFinite=Tr,_.toInteger=le,_.toLength=sy,_.toLower=OI,_.toNumber=gn,_.toSafeInteger=O3,_.toString=Ae,_.toUpper=TI,_.trim=II,_.trimEnd=BI,_.trimStart=RI,_.truncate=NI,_.unescape=MI,_.uniqueId=s8,_.upperCase=jI,_.upperFirst=hd,_.each=V_,_.eachRight=J_,_.first=W_,gd(_,(function(){var i={};return sr(_,function(u,c){be.call(_.prototype,c)||(i[c]=u)}),i})(),{chain:!1}),_.VERSION=t,fn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(i){_[i].placeholder=_}),fn(["drop","take"],function(i,u){me.prototype[i]=function(c){c=c===e?1:it(le(c),0);var f=this.__filtered__&&!u?new me(this):this.clone();return f.__filtered__?f.__takeCount__=Ft(c,f.__takeCount__):f.__views__.push({size:Ft(c,an),type:i+(f.__dir__<0?"Right":"")}),f},me.prototype[i+"Right"]=function(c){return this.reverse()[i](c).reverse()}}),fn(["filter","map","takeWhile"],function(i,u){var c=u+1,f=c==xn||c==va;me.prototype[i]=function(m){var F=this.clone();return F.__iteratees__.push({iteratee:ee(m,3),type:c}),F.__filtered__=F.__filtered__||f,F}}),fn(["head","last"],function(i,u){var c="take"+(u?"Right":"");me.prototype[i]=function(){return this[c](1).value()[0]}}),fn(["initial","tail"],function(i,u){var c="drop"+(u?"":"Right");me.prototype[i]=function(){return this.__filtered__?new me(this):this[c](1)}}),me.prototype.compact=function(){return this.filter(Ut)},me.prototype.find=function(i){return this.filter(i).head()},me.prototype.findLast=function(i){return this.reverse().find(i)},me.prototype.invokeMap=de(function(i,u){return typeof i=="function"?new me(this):this.map(function(c){return us(c,i,u)})}),me.prototype.reject=function(i){return this.filter(Ec(ee(i)))},me.prototype.slice=function(i,u){i=le(i);var c=this;return c.__filtered__&&(i>0||u<0)?new me(c):(i<0?c=c.takeRight(-i):i&&(c=c.drop(i)),u!==e&&(u=le(u),c=u<0?c.dropRight(-u):c.take(u-i)),c)},me.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},me.prototype.toArray=function(){return this.take(an)},sr(me.prototype,function(i,u){var c=/^(?:filter|find|map|reject)|While$/.test(u),f=/^(?:head|last)$/.test(u),m=_[f?"take"+(u=="last"?"Right":""):u],F=f||/^find/.test(u);m&&(_.prototype[u]=function(){var C=this.__wrapped__,b=f?[1]:arguments,x=C instanceof me,j=b[0],$=x||ae(C),L=function(he){var _e=m.apply(_,ti([he],b));return f&&H?_e[0]:_e};$&&c&&typeof j=="function"&&j.length!=1&&(x=$=!1);var H=this.__chain__,J=!!this.__actions__.length,te=F&&!H,pe=x&&!J;if(!F&&$){C=pe?C:new me(this);var ne=i.apply(C,b);return ne.__actions__.push({func:gc,args:[L],thisArg:e}),new dn(ne,H)}return te&&pe?i.apply(this,b):(ne=this.thru(L),te?f?ne.value()[0]:ne.value():ne)})}),fn(["pop","push","shift","sort","splice","unshift"],function(i){var u=Wa[i],c=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",f=/^(?:pop|shift)$/.test(i);_.prototype[i]=function(){var m=arguments;if(f&&!this.__chain__){var F=this.value();return u.apply(ae(F)?F:[],m)}return this[c](function(C){return u.apply(ae(C)?C:[],m)})}}),sr(me.prototype,function(i,u){var c=_[u];if(c){var f=c.name+"";be.call(Mo,f)||(Mo[f]=[]),Mo[f].push({name:u,func:c})}}),Mo[lc(e,O).name]=[{name:"wrapper",func:e}],me.prototype.clone=Mx,me.prototype.reverse=jx,me.prototype.value=$x,_.prototype.at=dT,_.prototype.chain=hT,_.prototype.commit=DT,_.prototype.next=mT,_.prototype.plant=_T,_.prototype.reverse=yT,_.prototype.toJSON=_.prototype.valueOf=_.prototype.value=FT,_.prototype.first=_.prototype.head,Qu&&(_.prototype[Qu]=gT),_}),ri=Dx();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(ct._=ri,define(function(){return ri})):Hi?((Hi.exports=ri)._=ri,mp._=ri):ct._=ri}).call(uu)});var AC=N((bC,Hh)=>{d();(function(e){function t(){var r=e();return r.default||r}if(typeof bC=="object"&&typeof Hh=="object")Hh.exports=t();else if(typeof define=="function"&&define.amd)define(t);else{var n=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};n.doc=t()}})(function(){"use strict";var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,o=(h,R)=>{for(var W in R)e(h,W,{get:R[W],enumerable:!0})},s=(h,R,W,z)=>{if(R&&typeof R=="object"||typeof R=="function")for(let ie of n(R))!r.call(h,ie)&&ie!==W&&e(h,ie,{get:()=>R[ie],enumerable:!(z=t(R,ie))||z.enumerable});return h},a=h=>s(e({},"__esModule",{value:!0}),h),l={};o(l,{builders:()=>dp,printer:()=>ja,utils:()=>Oo});var p=1,D=(h,R)=>(W,z,...ie)=>W|p&&z==null?void 0:(R.call(z)??z[h]).apply(z,ie);function g(h){return this[h<0?this.length+h:h]}var E=D("at",function(){if(Array.isArray(this)||typeof this=="string")return g}),w=E,v=()=>{},S=v,O="string",P="array",I="cursor",U="indent",q="align",X="trim",Q="group",fe="fill",Fe="if-break",We="indent-if-break",gt="line-suffix",nr="line-suffix-boundary",dt="line",xn="label",sn="break-parent",va=new Set([I,U,q,X,Q,fe,Fe,We,gt,nr,dt,xn,sn]);function Fr(h){let R=h.length;for(;R>0&&(h[R-1]==="\r"||h[R-1]===`
|
|
28
|
+
`);)R--;return R<h.length?h.slice(0,R):h}function rr(h){if(typeof h=="string")return O;if(Array.isArray(h))return P;if(!h)return;let{type:R}=h;if(va.has(R))return R}var Er=rr,bo=h=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(h);function an(h){let R=h===null?"null":typeof h;if(R!=="string"&&R!=="object")return`Unexpected doc '${R}',
|
|
29
|
+
Expected it to be 'string' or 'object'.`;if(Er(h))throw new Error("doc is valid.");let W=Object.prototype.toString.call(h);if(W!=="[object Object]")return`Unexpected doc '${W}'.`;let z=bo([...va].map(ie=>`'${ie}'`));return`Unexpected doc.type '${h.type}'.
|
|
30
|
+
Expected it to be ${z}.`}var $f=class extends Error{name="InvalidDocError";constructor(h){super(an(h)),this.doc=h}},Kr=$f,Ca={};function Yr(h,R,W,z){let ie=[h];for(;ie.length>0;){let V=ie.pop();if(V===Ca){W(ie.pop());continue}W&&ie.push(V,Ca);let Y=Er(V);if(!Y)throw new Kr(V);if(R?.(V)!==!1)switch(Y){case P:case fe:{let ge=Y===P?V:V.parts;for(let ke=ge.length,we=ke-1;we>=0;--we)ie.push(ge[we]);break}case Fe:ie.push(V.flatContents,V.breakContents);break;case Q:if(z&&V.expandedStates)for(let ge=V.expandedStates.length,ke=ge-1;ke>=0;--ke)ie.push(V.expandedStates[ke]);else ie.push(V.contents);break;case q:case U:case We:case xn:case gt:ie.push(V.contents);break;case O:case I:case X:case nr:case dt:case sn:break;default:throw new Kr(V)}}}var Xr=Yr;function Ao(h,R){if(typeof h=="string")return R(h);let W=new Map;return z(h);function z(V){if(W.has(V))return W.get(V);let Y=ie(V);return W.set(V,Y),Y}function ie(V){switch(Er(V)){case P:return R(V.map(z));case fe:return R({...V,parts:V.parts.map(z)});case Fe:return R({...V,breakContents:z(V.breakContents),flatContents:z(V.flatContents)});case Q:{let{expandedStates:Y,contents:ge}=V;return Y?(Y=Y.map(z),ge=Y[0]):ge=z(ge),R({...V,contents:ge,expandedStates:Y})}case q:case U:case We:case xn:case gt:return R({...V,contents:z(V.contents)});case O:case I:case X:case nr:case dt:case sn:return R(V);default:throw new Kr(V)}}}function vr(h,R,W){let z=W,ie=!1;function V(Y){if(ie)return!1;let ge=R(Y);ge!==void 0&&(ie=!0,z=ge)}return Xr(h,V),z}function Bi(h){if(h.type===Q&&h.break||h.type===dt&&h.hard||h.type===sn)return!0}function Lf(h){return vr(h,Bi,!1)}function Ri(h){if(h.length>0){let R=w(0,h,-1);!R.expandedStates&&!R.break&&(R.break="propagated")}return null}function So(h){let R=new Set,W=[];function z(V){if(V.type===sn&&Ri(W),V.type===Q){if(W.push(V),R.has(V))return!1;R.add(V)}}function ie(V){V.type===Q&&W.pop().break&&Ri(W)}Xr(h,z,ie,!0)}function wa(h){return h.type===dt&&!h.hard?h.soft?"":" ":h.type===Fe?h.flatContents:h}function zt(h){return Ao(h,wa)}function Zr(h){for(h=[...h];h.length>=2&&w(0,h,-2).type===dt&&w(0,h,-1).type===sn;)h.length-=2;if(h.length>0){let R=Ni(w(0,h,-1));h[h.length-1]=R}return h}function Ni(h){switch(Er(h)){case U:case We:case Q:case gt:case xn:{let R=Ni(h.contents);return{...h,contents:R}}case Fe:return{...h,breakContents:Ni(h.breakContents),flatContents:Ni(h.flatContents)};case fe:return{...h,parts:Zr(h.parts)};case P:return Zr(h);case O:return Fr(h);case q:case I:case X:case nr:case dt:case sn:break;default:throw new Kr(h)}return h}function Pn(h){return Ni(Uf(h))}function ba(h){switch(Er(h)){case fe:if(h.parts.every(R=>R===""))return"";break;case Q:if(!h.contents&&!h.id&&!h.break&&!h.expandedStates)return"";if(h.contents.type===Q&&h.contents.id===h.id&&h.contents.break===h.break&&h.contents.expandedStates===h.expandedStates)return h.contents;break;case q:case U:case We:case gt:if(!h.contents)return"";break;case Fe:if(!h.flatContents&&!h.breakContents)return"";break;case P:{let R=[];for(let W of h){if(!W)continue;let[z,...ie]=Array.isArray(W)?W:[W];typeof z=="string"&&typeof w(0,R,-1)=="string"?R[R.length-1]+=z:R.push(z),R.push(...ie)}return R.length===0?"":R.length===1?R[0]:R}case O:case I:case X:case nr:case dt:case xn:case sn:break;default:throw new Kr(h)}return h}function Uf(h){return Ao(h,R=>ba(R))}function Mi(h,R=Wu){return Ao(h,W=>typeof W=="string"?Sa(R,W.split(`
|
|
31
|
+
`)):W)}function Gt(h){if(h.type===dt)return!0}function ji(h){return vr(h,Gt,!1)}var xt=S,Aa=S,$i=S,kf=S;function ir(h){return xt(h),{type:U,contents:h}}function Vt(h,R){return kf(h),xt(R),{type:q,contents:R,n:h}}function Nu(h){return Vt(Number.NEGATIVE_INFINITY,h)}function Mu(h){return Vt({type:"root"},h)}function ju(h){return Vt(-1,h)}function $u(h,R,W){xt(h);let z=h;if(R>0){for(let ie=0;ie<Math.floor(R/W);++ie)z=ir(z);z=Vt(R%W,z),z=Vt(Number.NEGATIVE_INFINITY,z)}return z}var Li={type:sn},Lu={type:I};function Uu(h){return $i(h),{type:fe,parts:h}}function xo(h,R={}){return xt(h),Aa(R.expandedStates,!0),{type:Q,id:R.id,contents:h,break:!!R.shouldBreak,expandedStates:R.expandedStates}}function ku(h,R){return xo(h[0],{...R,expandedStates:h})}function qf(h,R="",W={}){return xt(h),R!==""&&xt(R),{type:Fe,breakContents:h,flatContents:R,groupId:W.groupId}}function Wf(h,R){return xt(h),{type:We,contents:h,groupId:R.groupId,negate:R.negate}}function Sa(h,R){xt(h),Aa(R);let W=[];for(let z=0;z<R.length;z++)z!==0&&W.push(h),W.push(R[z]);return W}function xa(h,R){return xt(R),h?{type:xn,label:h,contents:R}:R}var Pa={type:dt},Hf={type:dt,soft:!0},qu={type:dt,hard:!0},zf=[qu,Li],Oa={type:dt,hard:!0,literal:!0},Wu=[Oa,Li];function Gf(h){return xt(h),{type:gt,contents:h}}var Vf={type:nr},Jf={type:X},Hu=String.prototype.replaceAll??function(h,R){return h.global?this.replace(h,R):this.split(h).join(R)},Kf=D("replaceAll",function(){if(typeof this=="string")return Hu}),zu=Kf,Yf="cr",Xf="crlf",Zf="\r",Qf=`\r
|
|
32
|
+
`,ep=`
|
|
33
|
+
`,tp=ep;function np(h){return h===Yf?Zf:h===Xf?Qf:tp}var rp=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;function Ta(h){return h===12288||h>=65281&&h<=65376||h>=65504&&h<=65510}function ip(h){return h>=4352&&h<=4447||h===8986||h===8987||h===9001||h===9002||h>=9193&&h<=9196||h===9200||h===9203||h===9725||h===9726||h===9748||h===9749||h>=9776&&h<=9783||h>=9800&&h<=9811||h===9855||h>=9866&&h<=9871||h===9875||h===9889||h===9898||h===9899||h===9917||h===9918||h===9924||h===9925||h===9934||h===9940||h===9962||h===9970||h===9971||h===9973||h===9978||h===9981||h===9989||h===9994||h===9995||h===10024||h===10060||h===10062||h>=10067&&h<=10069||h===10071||h>=10133&&h<=10135||h===10160||h===10175||h===11035||h===11036||h===11088||h===11093||h>=11904&&h<=11929||h>=11931&&h<=12019||h>=12032&&h<=12245||h>=12272&&h<=12287||h>=12289&&h<=12350||h>=12353&&h<=12438||h>=12441&&h<=12543||h>=12549&&h<=12591||h>=12593&&h<=12686||h>=12688&&h<=12773||h>=12783&&h<=12830||h>=12832&&h<=12871||h>=12880&&h<=42124||h>=42128&&h<=42182||h>=43360&&h<=43388||h>=44032&&h<=55203||h>=63744&&h<=64255||h>=65040&&h<=65049||h>=65072&&h<=65106||h>=65108&&h<=65126||h>=65128&&h<=65131||h>=94176&&h<=94180||h>=94192&&h<=94198||h>=94208&&h<=101589||h>=101631&&h<=101662||h>=101760&&h<=101874||h>=110576&&h<=110579||h>=110581&&h<=110587||h===110589||h===110590||h>=110592&&h<=110882||h===110898||h>=110928&&h<=110930||h===110933||h>=110948&&h<=110951||h>=110960&&h<=111355||h>=119552&&h<=119638||h>=119648&&h<=119670||h===126980||h===127183||h===127374||h>=127377&&h<=127386||h>=127488&&h<=127490||h>=127504&&h<=127547||h>=127552&&h<=127560||h===127568||h===127569||h>=127584&&h<=127589||h>=127744&&h<=127776||h>=127789&&h<=127797||h>=127799&&h<=127868||h>=127870&&h<=127891||h>=127904&&h<=127946||h>=127951&&h<=127955||h>=127968&&h<=127984||h===127988||h>=127992&&h<=128062||h===128064||h>=128066&&h<=128252||h>=128255&&h<=128317||h>=128331&&h<=128334||h>=128336&&h<=128359||h===128378||h===128405||h===128406||h===128420||h>=128507&&h<=128591||h>=128640&&h<=128709||h===128716||h>=128720&&h<=128722||h>=128725&&h<=128728||h>=128732&&h<=128735||h===128747||h===128748||h>=128756&&h<=128764||h>=128992&&h<=129003||h===129008||h>=129292&&h<=129338||h>=129340&&h<=129349||h>=129351&&h<=129535||h>=129648&&h<=129660||h>=129664&&h<=129674||h>=129678&&h<=129734||h===129736||h>=129741&&h<=129756||h>=129759&&h<=129770||h>=129775&&h<=129784||h>=131072&&h<=196605||h>=196608&&h<=262141}var op="\xA9\xAE\u203C\u2049\u2122\u2139\u2194\u2195\u2196\u2197\u2198\u2199\u21A9\u21AA\u2328\u23CF\u23F1\u23F2\u23F8\u23F9\u23FA\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600\u2601\u2602\u2603\u2604\u260E\u2611\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638\u2639\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694\u2695\u2696\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F1\u26F7\u26F8\u26F9\u2702\u2708\u2709\u270C\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u2764\u27A1\u2934\u2935\u2B05\u2B06\u2B07",up=/[^\x20-\x7F]/u,sp=new Set(op);function ap(h){if(!h)return 0;if(!up.test(h))return h.length;h=h.replace(rp(),W=>sp.has(W)?" ":" ");let R=0;for(let W of h){let z=W.codePointAt(0);z<=31||z>=127&&z<=159||z>=768&&z<=879||z>=65024&&z<=65039||(R+=Ta(z)||ip(z)?2:1)}return R}var Ia=ap,Ui=0,Ba=1,ki=2,Ra=3,cp={type:Ui},lp={type:Ba},Gu={value:"",length:0,queue:[],get root(){return Gu}};function Vu(h,R,W){let z=R.type===Ba?h.queue.slice(0,-1):[...h.queue,R],ie="",V=0,Y=0,ge=0;for(let Ne of z)switch(Ne.type){case Ui:nt(),W.useTabs?ke(1):we(W.tabWidth);break;case Ra:{let{string:Pt}=Ne;nt(),ie+=Pt,V+=Pt.length;break}case ki:{let{width:Pt}=Ne;Y+=1,ge+=Pt;break}default:throw new Error(`Unexpected indent comment '${Ne.type}'.`)}return or(),{...h,value:ie,length:V,queue:z};function ke(Ne){ie+=" ".repeat(Ne),V+=W.tabWidth*Ne}function we(Ne){ie+=" ".repeat(Ne),V+=Ne}function nt(){W.useTabs?Be():or()}function Be(){Y>0&&ke(Y),st()}function or(){ge>0&&we(ge),st()}function st(){Y=0,ge=0}}function Na(h,R,W){if(!R)return h;if(R.type==="root")return{...h,root:h};if(R===Number.NEGATIVE_INFINITY)return h.root;let z;return typeof R=="number"?R<0?z=lp:z={type:ki,width:R}:z={type:Ra,string:R},Vu(h,z,W)}function fp(h,R){return Vu(h,cp,R)}function pp(h){let R=0;for(let W=h.length-1;W>=0;W--){let z=h[W];if(z===" "||z===" ")R++;else break}return R}function Ma(h){let R=pp(h);return{text:R===0?h:h.slice(0,h.length-R),count:R}}var _t=Symbol("MODE_BREAK"),Jt=Symbol("MODE_FLAT"),Po=Symbol("DOC_FILL_PRINTED_LENGTH");function qi(h,R,W,z,ie,V){if(W===Number.POSITIVE_INFINITY)return!0;let Y=R.length,ge=!1,ke=[h],we="";for(;W>=0;){if(ke.length===0){if(Y===0)return!0;ke.push(R[--Y]);continue}let{mode:nt,doc:Be}=ke.pop(),or=Er(Be);switch(or){case O:Be&&(ge&&(we+=" ",W-=1,ge=!1),we+=Be,W-=Ia(Be));break;case P:case fe:{let st=or===P?Be:Be.parts,Ne=Be[Po]??0;for(let Pt=st.length-1;Pt>=Ne;Pt--)ke.push({mode:nt,doc:st[Pt]});break}case U:case q:case We:case xn:ke.push({mode:nt,doc:Be.contents});break;case X:{let{text:st,count:Ne}=Ma(we);we=st,W+=Ne;break}case Q:{if(V&&Be.break)return!1;let st=Be.break?_t:nt,Ne=Be.expandedStates&&st===_t?w(0,Be.expandedStates,-1):Be.contents;ke.push({mode:st,doc:Ne});break}case Fe:{let Ne=(Be.groupId?ie[Be.groupId]||Jt:nt)===_t?Be.breakContents:Be.flatContents;Ne&&ke.push({mode:nt,doc:Ne});break}case dt:if(nt===_t||Be.hard)return!0;Be.soft||(ge=!0);break;case gt:z=!0;break;case nr:if(z)return!1;break}}return!1}function Ju(h,R){let W=Object.create(null),z=R.printWidth,ie=np(R.endOfLine),V=0,Y=[{indent:Gu,mode:_t,doc:h}],ge="",ke=!1,we=[],nt=[],Be=[],or=[],st=0;for(So(h);Y.length>0;){let{indent:Ee,mode:ht,doc:re}=Y.pop();switch(Er(re)){case O:{let at=ie!==`
|
|
34
|
+
`?zu(0,re,`
|
|
35
|
+
`,ie):re;at&&(ge+=at,Y.length>0&&(V+=Ia(at)));break}case P:for(let at=re.length-1;at>=0;at--)Y.push({indent:Ee,mode:ht,doc:re[at]});break;case I:if(nt.length>=2)throw new Error("There are too many 'cursor' in doc.");nt.push(st+ge.length);break;case U:Y.push({indent:fp(Ee,R),mode:ht,doc:re.contents});break;case q:Y.push({indent:Na(Ee,re.n,R),mode:ht,doc:re.contents});break;case X:$a();break;case Q:switch(ht){case Jt:if(!ke){Y.push({indent:Ee,mode:re.break?_t:Jt,doc:re.contents});break}case _t:{ke=!1;let at={indent:Ee,mode:Jt,doc:re.contents},yt=z-V,Cr=we.length>0;if(!re.break&&qi(at,Y,yt,Cr,W))Y.push(at);else if(re.expandedStates){let Qr=w(0,re.expandedStates,-1);if(re.break){Y.push({indent:Ee,mode:_t,doc:Qr});break}else for(let cn=1;cn<re.expandedStates.length+1;cn++)if(cn>=re.expandedStates.length){Y.push({indent:Ee,mode:_t,doc:Qr});break}else{let Wi=re.expandedStates[cn],ur={indent:Ee,mode:Jt,doc:Wi};if(qi(ur,Y,yt,Cr,W)){Y.push(ur);break}}}else Y.push({indent:Ee,mode:_t,doc:re.contents});break}}re.id&&(W[re.id]=w(0,Y,-1).mode);break;case fe:{let at=z-V,yt=re[Po]??0,{parts:Cr}=re,Qr=Cr.length-yt;if(Qr===0)break;let cn=Cr[yt+0],Wi=Cr[yt+1],ur={indent:Ee,mode:Jt,doc:cn},Yu={indent:Ee,mode:_t,doc:cn},Xu=qi(ur,[],at,we.length>0,W,!0);if(Qr===1){Xu?Y.push(ur):Y.push(Yu);break}let La={indent:Ee,mode:Jt,doc:Wi},Pe={indent:Ee,mode:_t,doc:Wi};if(Qr===2){Xu?Y.push(La,ur):Y.push(Pe,Yu);break}let Oe=Cr[yt+2],hp={indent:Ee,mode:ht,doc:{...re,[Po]:yt+2}},Dp=qi({indent:Ee,mode:Jt,doc:[cn,Wi,Oe]},[],at,we.length>0,W,!0);Y.push(hp),Dp?Y.push(La,ur):Xu?Y.push(Pe,ur):Y.push(Pe,Yu);break}case Fe:case We:{let at=re.groupId?W[re.groupId]:ht;if(at===_t){let yt=re.type===Fe?re.breakContents:re.negate?re.contents:ir(re.contents);yt&&Y.push({indent:Ee,mode:ht,doc:yt})}if(at===Jt){let yt=re.type===Fe?re.flatContents:re.negate?ir(re.contents):re.contents;yt&&Y.push({indent:Ee,mode:ht,doc:yt})}break}case gt:we.push({indent:Ee,mode:ht,doc:re.contents});break;case nr:we.length>0&&Y.push({indent:Ee,mode:ht,doc:qu});break;case dt:switch(ht){case Jt:if(re.hard)ke=!0;else{re.soft||(ge+=" ",V+=1);break}case _t:if(we.length>0){Y.push({indent:Ee,mode:ht,doc:re},...we.reverse()),we.length=0;break}re.literal?(ge+=ie,V=0,Ee.root&&(Ee.root.value&&(ge+=Ee.root.value),V=Ee.root.length)):($a(),ge+=ie+Ee.value,V=Ee.length);break}break;case xn:Y.push({indent:Ee,mode:ht,doc:re.contents});break;case sn:break;default:throw new Kr(re)}Y.length===0&&we.length>0&&(Y.push(...we.reverse()),we.length=0)}let Ne=Be.join("")+ge,Pt=[...or,...nt];if(Pt.length!==2)return{formatted:Ne};let Ku=Pt[0];return{formatted:Ne,cursorNodeStart:Ku,cursorNodeText:Ne.slice(Ku,w(0,Pt,-1))};function $a(){let{text:Ee,count:ht}=Ma(ge);Ee&&(Be.push(Ee),st+=Ee.length),ge="",V-=ht,nt.length>0&&(or.push(...nt.map(re=>Math.min(re,st))),nt.length=0)}}var dp={join:Sa,line:Pa,softline:Hf,hardline:zf,literalline:Wu,group:xo,conditionalGroup:ku,fill:Uu,lineSuffix:Gf,lineSuffixBoundary:Vf,cursor:Lu,breakParent:Li,ifBreak:qf,trim:Jf,indent:ir,indentIfBreak:Wf,align:Vt,addAlignmentToDoc:$u,markAsRoot:Mu,dedentToRoot:Nu,dedent:ju,hardlineWithoutBreakParent:qu,literallineWithoutBreakParent:Oa,label:xa,concat:h=>h},ja={printDocToString:Ju},Oo={willBreak:Lf,traverseDoc:Xr,findInDoc:vr,mapDoc:Ao,removeLines:zt,stripTrailingHardline:Pn,replaceEndOfLine:Mi,canBreak:ji};return a(l)})});var ow=N((dre,iw)=>{"use strict";d();var Kh=Object.defineProperty,iM=Object.getOwnPropertyDescriptor,IC=Object.getOwnPropertyNames,oM=Object.prototype.hasOwnProperty,Me=(e,t)=>function(){return e&&(t=(0,e[IC(e)[0]])(e=0)),t},BC=(e,t)=>{for(var n in t)Kh(e,n,{get:t[n],enumerable:!0})},uM=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of IC(t))!oM.call(e,o)&&o!==n&&Kh(e,o,{get:()=>t[o],enumerable:!(r=iM(t,o))||r.enumerable});return e},SC=e=>uM(Kh({},"__esModule",{value:!0}),e),xC,RC,sM=Me({"scripts/build/shims/shared.js"(){xC=1,RC=(e,t)=>(n,r,...o)=>n|xC&&r==null?void 0:(t.call(r)??r[e]).apply(r,o)}}),PC,OC,NC,aM=Me({"scripts/build/shims/method-replace-all.js"(){sM(),PC=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},OC=RC("replaceAll",function(){if(typeof this=="string")return PC}),NC=OC}});function Us(e){return(t,n,r)=>{let o=!!r?.backwards;if(n===!1)return!1;let{length:s}=t,a=n;for(;a>=0&&a<s;){let l=t.charAt(a);if(e instanceof RegExp){if(!e.test(l))return a}else if(!e.includes(l))return a;o?a--:a++}return a===-1||a===s?a:!1}}var MC,Ei,Yh,Xh,co=Me({"src/utilities/skip.js"(){MC=Us(/\s/u),Ei=Us(" "),Yh=Us(",; "),Xh=Us(/[^\n\r]/u)}});function cM(e,t){if(t===!1)return!1;if(e.charAt(t)==="/"&&e.charAt(t+1)==="*"){for(let n=t+2;n<e.length;++n)if(e.charAt(n)==="*"&&e.charAt(n+1)==="/")return n+2}return t}var bl,Zh=Me({"src/utilities/skip-inline-comment.js"(){bl=cM}});function lM(e,t,n){let r=!!n?.backwards;if(t===!1)return!1;let o=e.charAt(t);if(r){if(e.charAt(t-1)==="\r"&&o===`
|
|
36
|
+
`)return t-2;if(Vh(o))return t-1}else{if(o==="\r"&&e.charAt(t+1)===`
|
|
37
|
+
`)return t+2;if(Vh(o))return t+1}return t}var Vh,ao,ks=Me({"src/utilities/skip-newline.js"(){Vh=e=>e===`
|
|
38
|
+
`||e==="\r"||e==="\u2028"||e==="\u2029",ao=lM}});function fM(e,t){return t===!1?!1:e.charAt(t)==="/"&&e.charAt(t+1)==="/"?Xh(e,t):t}var Al,Qh=Me({"src/utilities/skip-trailing-comment.js"(){co(),Al=fM}});function pM(e,t){let n=null,r=t;for(;r!==n;)n=r,r=Ei(e,r),r=bl(e,r),r=Al(e,r),r=ao(e,r);return r}var Sl,jC=Me({"src/utilities/get-next-non-space-non-comment-character-index.js"(){co(),Zh(),ks(),Qh(),Sl=pM}});function dM(e,t,n={}){let r=Ei(e,n.backwards?t-1:t,n),o=ao(e,r,n);return r!==o}var eD,$C=Me({"src/utilities/has-newline.js"(){co(),ks(),eD=dM}});function hM(e,t){let n=null,r=t;for(;r!==n;)n=r,r=Yh(e,r),r=bl(e,r),r=Ei(e,r);return r=Al(e,r),r=ao(e,r),r!==!1&&eD(e,r)}var xl,DM=Me({"src/utilities/is-next-line-empty.js"(){$C(),co(),Zh(),ks(),Qh(),xl=hM}});function mM(e,t){let n=t-1;n=Ei(e,n,{backwards:!0}),n=ao(e,n,{backwards:!0}),n=Ei(e,n,{backwards:!0});let r=ao(e,n,{backwards:!0});return n!==r}var tD,gM=Me({"src/utilities/is-previous-line-empty.js"(){co(),ks(),tD=mM}});function _M(e){let t=e.type||e.kind||"(unknown type)",n=String(e.name||e.id&&(typeof e.id=="object"?e.id.name:e.id)||e.key&&(typeof e.key=="object"?e.key.name:e.key)||e.value&&(typeof e.value=="object"?"":String(e.value))||e.operator||"");return n.length>20&&(n=n.slice(0,19)+"\u2026"),t+(n?" "+n:"")}function nD(e,t){(e.comments??(e.comments=[])).push(t),t.printed=!1,t.nodeDescription=_M(e)}function yM(e,t){t.leading=!0,t.trailing=!1,nD(e,t)}function FM(e,t,n){t.leading=!1,t.trailing=!1,n&&(t.marker=n),nD(e,t)}function EM(e,t){t.leading=!1,t.trailing=!0,nD(e,t)}var vM=Me({"src/main/comments/utilities.js"(){}});function CM(e,t,n=0){let r=0;for(let o=n;o<e.length;++o)e[o]===" "?r=r+t-r%t:r++;return r}var rD,LC=Me({"src/utilities/get-alignment-size.js"(){rD=CM}});function wM(e,t){let n=e.lastIndexOf(`
|
|
39
|
+
`);return n===-1?0:rD(e.slice(n+1).match(/^[\t ]*/u)[0],t)}var UC,bM=Me({"src/utilities/get-indent-size.js"(){LC(),UC=wM}});function AM(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var SM=Me({"node_modules/escape-string-regexp/index.js"(){}});function xM(e,t){let n=e.matchAll(new RegExp(`(?:${AM(t)})+`,"gu"));return n.reduce||(n=[...n]),n.reduce((r,[o])=>Math.max(r,o.length),0)/t.length}var kC,PM=Me({"src/utilities/get-max-continuous-count.js"(){SM(),kC=xM}});function OM(e,t){let n=Sl(e,t);return n===!1?"":e.charAt(n)}var qC,TM=Me({"src/utilities/get-next-non-space-non-comment-character.js"(){jC(),qC=OM}});function IM(e,t){let{preferred:n,alternate:r}=t===!0||t===Jh?WC:HC,{length:o}=e,s=0,a=0;for(let l=0;l<o;l++){let p=e.charCodeAt(l);p===n.codePoint?s++:p===r.codePoint&&a++}return(s>a?r:n).character}var Jh,TC,zh,Gh,WC,HC,zC,BM=Me({"src/utilities/get-preferred-quote.js"(){Jh="'",TC='"',zh=Object.freeze({character:Jh,codePoint:39}),Gh=Object.freeze({character:TC,codePoint:34}),WC=Object.freeze({preferred:zh,alternate:Gh}),HC=Object.freeze({preferred:Gh,alternate:zh}),zC=IM}}),GC,RM=Me({"node_modules/emoji-regex/index.mjs"(){GC=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g}});function NM(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function MM(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9776&&e<=9783||e>=9800&&e<=9811||e===9855||e>=9866&&e<=9871||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e>=94192&&e<=94198||e>=94208&&e<=101589||e>=101631&&e<=101662||e>=101760&&e<=101874||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128728||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129674||e>=129678&&e<=129734||e===129736||e>=129741&&e<=129756||e>=129759&&e<=129770||e>=129775&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}var jM=Me({"node_modules/get-east-asian-width/lookup.js"(){}}),$M=Me({"node_modules/get-east-asian-width/index.js"(){jM()}}),VC,LM=Me({"src/utilities/narrow-emojis.evaluate.js"(){VC="\xA9\xAE\u203C\u2049\u2122\u2139\u2194\u2195\u2196\u2197\u2198\u2199\u21A9\u21AA\u2328\u23CF\u23F1\u23F2\u23F8\u23F9\u23FA\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600\u2601\u2602\u2603\u2604\u260E\u2611\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638\u2639\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694\u2695\u2696\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F1\u26F7\u26F8\u26F9\u2702\u2708\u2709\u270C\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u2764\u27A1\u2934\u2935\u2B05\u2B06\u2B07"}});function UM(e){if(!e)return 0;if(!JC.test(e))return e.length;e=e.replace(GC(),n=>KC.has(n)?" ":" ");let t=0;for(let n of e){let r=n.codePointAt(0);r<=31||r>=127&&r<=159||r>=768&&r<=879||r>=65024&&r<=65039||(t+=NM(r)||MM(r)?2:1)}return t}var JC,KC,YC,kM=Me({"src/utilities/get-string-width.js"(){RM(),$M(),LM(),JC=/[^\x20-\x7F]/u,KC=new Set(VC),YC=UM}});function qM(e,t,n){for(let r=t;r<n;++r)if(e.charAt(r)===`
|
|
40
|
+
`)return!0;return!1}var XC,WM=Me({"src/utilities/has-newline-in-range.js"(){XC=qM}});function HM(e,t,n={}){return Ei(e,n.backwards?t-1:t,n)!==t}var ZC,zM=Me({"src/utilities/has-spaces.js"(){co(),ZC=HM}}),QC={};BC(QC,{addDanglingComment:()=>FM,addLeadingComment:()=>yM,addTrailingComment:()=>EM,getAlignmentSize:()=>rD,getIndentSize:()=>UC,getMaxContinuousCount:()=>kC,getNextNonSpaceNonCommentCharacter:()=>qC,getNextNonSpaceNonCommentCharacterIndex:()=>VM,getPreferredQuote:()=>zC,getStringWidth:()=>YC,hasNewline:()=>eD,hasNewlineInRange:()=>XC,hasSpaces:()=>ZC,isNextLineEmpty:()=>ZM,isNextLineEmptyAfterIndex:()=>xl,isPreviousLineEmpty:()=>KM,makeString:()=>XM,skip:()=>Us,skipEverythingButNewLine:()=>Xh,skipInlineComment:()=>bl,skipNewline:()=>ao,skipSpaces:()=>Ei,skipToLineEnd:()=>Yh,skipTrailingComment:()=>Al,skipWhitespace:()=>MC});function GM(e,t,n){return Sl(e,n(t))}function VM(e,t){return arguments.length===2||typeof t=="number"?Sl(e,t):GM(...arguments)}function JM(e,t,n){return tD(e,n(t))}function KM(e,t){return arguments.length===2||typeof t=="number"?tD(e,t):JM(...arguments)}function YM(e,t,n){return xl(e,n(t))}function XM(e,t,n){let r=t==='"'?"'":'"',s=NC(0,e,/\\(.)|(["'])/gsu,(a,l,p)=>l===r?l:p===t?"\\"+p:p||(n&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/u.test(l)?l:"\\"+l));return t+s+t}function ZM(e,t){return arguments.length===2||typeof t=="number"?xl(e,t):YM(...arguments)}var QM=Me({"src/utilities/public.js"(){aM(),jC(),DM(),gM(),vM(),LC(),bM(),PM(),TM(),BM(),kM(),$C(),WM(),zM(),co(),Zh(),ks(),Qh()}}),ew={};BC(ew,{default:()=>tw});var tw,ej=Me({"src/main/version.evaluate.js"(){tw="3.8.4"}}),nw=import("./prettier-EGVCP5CY.js"),tj=["formatWithCursor","format","check","resolveConfig","resolveConfigFile","clearConfigCache","getFileInfo","getSupportInfo"],su=Object.create(null);for(let e of tj)su[e]=async(...t)=>(await nw)[e](...t);var nj=["parse","formatAST","formatDoc","printToDoc","printDocToString"],rw=Object.create(null);for(let e of nj)rw[e]=async(...t)=>(await nw).__debug[e](...t);su.__debug=rw;su.util=(QM(),SC(QC)),su.doc=AC(),su.version=(ej(),SC(ew)).default;iw.exports=su});var uw=N(au=>{"use strict";d();var rj=au&&au.__awaiter||function(e,t,n,r){function o(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function l(g){try{D(r.next(g))}catch(E){a(E)}}function p(g){try{D(r.throw(g))}catch(E){a(E)}}function D(g){g.done?s(g.value):o(g.value).then(l,p)}D((r=r.apply(e,t||[])).next())})};Object.defineProperty(au,"__esModule",{value:!0});au.format=void 0;var ij=ow();function oj(e,t){return rj(this,void 0,void 0,function*(){return t.format?(0,ij.format)(e,Object.assign({parser:"typescript"},t.style)):e})}au.format=oj});var Pl=N(kt=>{"use strict";d();Object.defineProperty(kt,"__esModule",{value:!0});kt.T_UNKNOWN_ADDITIONAL_PROPERTIES=kt.T_UNKNOWN=kt.T_ANY_ADDITIONAL_PROPERTIES=kt.T_ANY=kt.hasStandaloneName=kt.hasComment=void 0;function uj(e){return"comment"in e&&e.comment!=null&&e.comment!==""||"deprecated"in e&&e.deprecated===!0}kt.hasComment=uj;function sj(e){return"standaloneName"in e&&e.standaloneName!=null&&e.standaloneName!==""}kt.hasStandaloneName=sj;kt.T_ANY={type:"ANY"};kt.T_ANY_ADDITIONAL_PROPERTIES={keyName:"[k: string]",type:"ANY"};kt.T_UNKNOWN={type:"UNKNOWN"};kt.T_UNKNOWN_ADDITIONAL_PROPERTIES={keyName:"[k: string]",type:"UNKNOWN"}});var lo=N(pt=>{"use strict";d();Object.defineProperty(pt,"__esModule",{value:!0});pt.isCompound=pt.isPrimitive=pt.isBoolean=pt.getRootSchema=pt.Intersection=pt.Types=pt.Parent=void 0;var sw=$r();pt.Parent=Symbol("Parent");pt.Types=Symbol("Types");pt.Intersection=Symbol("Intersection");pt.getRootSchema=(0,sw.memoize)(e=>{let t=e[pt.Parent];return t?(0,pt.getRootSchema)(t):e});function aj(e){return e===!0||e===!1}pt.isBoolean=aj;function cj(e){return!(0,sw.isPlainObject)(e)}pt.isPrimitive=cj;function lj(e){return Array.isArray(e.type)||"anyOf"in e||"oneOf"in e}pt.isCompound=lj});var cu=N((Ere,fo)=>{"use strict";d();function aw(e){return typeof e>"u"||e===null}function fj(e){return typeof e=="object"&&e!==null}function pj(e){return Array.isArray(e)?e:aw(e)?[]:[e]}function dj(e,t){var n,r,o,s;if(t)for(s=Object.keys(t),n=0,r=s.length;n<r;n+=1)o=s[n],e[o]=t[o];return e}function hj(e,t){var n="",r;for(r=0;r<t;r+=1)n+=e;return n}function Dj(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}fo.exports.isNothing=aw;fo.exports.isObject=fj;fo.exports.toArray=pj;fo.exports.repeat=hj;fo.exports.isNegativeZero=Dj;fo.exports.extend=dj});var lu=N((Cre,lw)=>{"use strict";d();function cw(e,t){var n="",r=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(n+='in "'+e.mark.name+'" '),n+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(n+=`
|
|
41
|
+
|
|
42
|
+
`+e.mark.snippet),r+" "+n):r}function qs(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=cw(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}qs.prototype=Object.create(Error.prototype);qs.prototype.constructor=qs;qs.prototype.toString=function(t){return this.name+": "+cw(this,t)};lw.exports=qs});var pw=N((bre,fw)=>{"use strict";d();var Ws=cu();function iD(e,t,n,r,o){var s="",a="",l=Math.floor(o/2)-1;return r-t>l&&(s=" ... ",t=r-l+s.length),n-r>l&&(a=" ...",n=r+l-a.length),{str:s+e.slice(t,n).replace(/\t/g,"\u2192")+a,pos:r-t+s.length}}function oD(e,t){return Ws.repeat(" ",t-e.length)+e}function mj(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var n=/\r?\n|\r|\0/g,r=[0],o=[],s,a=-1;s=n.exec(e.buffer);)o.push(s.index),r.push(s.index+s[0].length),e.position<=s.index&&a<0&&(a=r.length-2);a<0&&(a=r.length-1);var l="",p,D,g=Math.min(e.line+t.linesAfter,o.length).toString().length,E=t.maxLength-(t.indent+g+3);for(p=1;p<=t.linesBefore&&!(a-p<0);p++)D=iD(e.buffer,r[a-p],o[a-p],e.position-(r[a]-r[a-p]),E),l=Ws.repeat(" ",t.indent)+oD((e.line-p+1).toString(),g)+" | "+D.str+`
|
|
43
|
+
`+l;for(D=iD(e.buffer,r[a],o[a],e.position,E),l+=Ws.repeat(" ",t.indent)+oD((e.line+1).toString(),g)+" | "+D.str+`
|
|
44
|
+
`,l+=Ws.repeat("-",t.indent+g+3+D.pos)+`^
|
|
45
|
+
`,p=1;p<=t.linesAfter&&!(a+p>=o.length);p++)D=iD(e.buffer,r[a+p],o[a+p],e.position-(r[a]-r[a+p]),E),l+=Ws.repeat(" ",t.indent)+oD((e.line+p+1).toString(),g)+" | "+D.str+`
|
|
46
|
+
`;return l.replace(/\n$/,"")}fw.exports=mj});var At=N((Sre,hw)=>{"use strict";d();var dw=lu(),gj=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],_j=["scalar","sequence","mapping"];function yj(e){var t={};return e!==null&&Object.keys(e).forEach(function(n){e[n].forEach(function(r){t[String(r)]=n})}),t}function Fj(e,t){if(t=t||{},Object.keys(t).forEach(function(n){if(gj.indexOf(n)===-1)throw new dw('Unknown option "'+n+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(n){return n},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=yj(t.styleAliases||null),_j.indexOf(this.kind)===-1)throw new dw('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}hw.exports=Fj});var aD=N((Pre,mw)=>{"use strict";d();var Hs=lu(),uD=At();function Dw(e,t){var n=[];return e[t].forEach(function(r){var o=n.length;n.forEach(function(s,a){s.tag===r.tag&&s.kind===r.kind&&s.multi===r.multi&&(o=a)}),n[o]=r}),n}function Ej(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,n;function r(o){o.multi?(e.multi[o.kind].push(o),e.multi.fallback.push(o)):e[o.kind][o.tag]=e.fallback[o.tag]=o}for(t=0,n=arguments.length;t<n;t+=1)arguments[t].forEach(r);return e}function sD(e){return this.extend(e)}sD.prototype.extend=function(t){var n=[],r=[];if(t instanceof uD)r.push(t);else if(Array.isArray(t))r=r.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(n=n.concat(t.implicit)),t.explicit&&(r=r.concat(t.explicit));else throw new Hs("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");n.forEach(function(s){if(!(s instanceof uD))throw new Hs("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(s.loadKind&&s.loadKind!=="scalar")throw new Hs("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(s.multi)throw new Hs("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),r.forEach(function(s){if(!(s instanceof uD))throw new Hs("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var o=Object.create(sD.prototype);return o.implicit=(this.implicit||[]).concat(n),o.explicit=(this.explicit||[]).concat(r),o.compiledImplicit=Dw(o,"implicit"),o.compiledExplicit=Dw(o,"explicit"),o.compiledTypeMap=Ej(o.compiledImplicit,o.compiledExplicit),o};mw.exports=sD});var cD=N((Tre,gw)=>{"use strict";d();var vj=At();gw.exports=new vj("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}})});var lD=N((Bre,_w)=>{"use strict";d();var Cj=At();_w.exports=new Cj("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}})});var fD=N((Nre,yw)=>{"use strict";d();var wj=At();yw.exports=new wj("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}})});var pD=N((jre,Fw)=>{"use strict";d();var bj=aD();Fw.exports=new bj({explicit:[cD(),lD(),fD()]})});var dD=N((Lre,Ew)=>{"use strict";d();var Aj=At();function Sj(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function xj(){return null}function Pj(e){return e===null}Ew.exports=new Aj("tag:yaml.org,2002:null",{kind:"scalar",resolve:Sj,construct:xj,predicate:Pj,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"})});var hD=N((kre,vw)=>{"use strict";d();var Oj=At();function Tj(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}function Ij(e){return e==="true"||e==="True"||e==="TRUE"}function Bj(e){return Object.prototype.toString.call(e)==="[object Boolean]"}vw.exports=new Oj("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Tj,construct:Ij,predicate:Bj,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})});var DD=N((Wre,Cw)=>{"use strict";d();var Rj=cu(),Nj=At();function Mj(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function jj(e){return 48<=e&&e<=55}function $j(e){return 48<=e&&e<=57}function Lj(e){if(e===null)return!1;var t=e.length,n=0,r=!1,o;if(!t)return!1;if(o=e[n],(o==="-"||o==="+")&&(o=e[++n]),o==="0"){if(n+1===t)return!0;if(o=e[++n],o==="b"){for(n++;n<t;n++)if(o=e[n],o!=="_"){if(o!=="0"&&o!=="1")return!1;r=!0}return r&&o!=="_"}if(o==="x"){for(n++;n<t;n++)if(o=e[n],o!=="_"){if(!Mj(e.charCodeAt(n)))return!1;r=!0}return r&&o!=="_"}if(o==="o"){for(n++;n<t;n++)if(o=e[n],o!=="_"){if(!jj(e.charCodeAt(n)))return!1;r=!0}return r&&o!=="_"}}if(o==="_")return!1;for(;n<t;n++)if(o=e[n],o!=="_"){if(!$j(e.charCodeAt(n)))return!1;r=!0}return!(!r||o==="_")}function Uj(e){var t=e,n=1,r;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),r=t[0],(r==="-"||r==="+")&&(r==="-"&&(n=-1),t=t.slice(1),r=t[0]),t==="0")return 0;if(r==="0"){if(t[1]==="b")return n*parseInt(t.slice(2),2);if(t[1]==="x")return n*parseInt(t.slice(2),16);if(t[1]==="o")return n*parseInt(t.slice(2),8)}return n*parseInt(t,10)}function kj(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Rj.isNegativeZero(e)}Cw.exports=new Nj("tag:yaml.org,2002:int",{kind:"scalar",resolve:Lj,construct:Uj,predicate:kj,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})});var mD=N((zre,bw)=>{"use strict";d();var ww=cu(),qj=At(),Wj=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Hj(e){return!(e===null||!Wj.test(e)||e[e.length-1]==="_")}function zj(e){var t,n;return t=e.replace(/_/g,"").toLowerCase(),n=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?n===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:n*parseFloat(t,10)}var Gj=/^[-+]?[0-9]+e/;function Vj(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(ww.isNegativeZero(e))return"-0.0";return n=e.toString(10),Gj.test(n)?n.replace("e",".e"):n}function Jj(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||ww.isNegativeZero(e))}bw.exports=new qj("tag:yaml.org,2002:float",{kind:"scalar",resolve:Hj,construct:zj,predicate:Jj,represent:Vj,defaultStyle:"lowercase"})});var gD=N((Vre,Aw)=>{"use strict";d();Aw.exports=pD().extend({implicit:[dD(),hD(),DD(),mD()]})});var _D=N((Kre,Sw)=>{"use strict";d();Sw.exports=gD()});var yD=N((Xre,Ow)=>{"use strict";d();var Kj=At(),xw=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Pw=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function Yj(e){return e===null?!1:xw.exec(e)!==null||Pw.exec(e)!==null}function Xj(e){var t,n,r,o,s,a,l,p=0,D=null,g,E,w;if(t=xw.exec(e),t===null&&(t=Pw.exec(e)),t===null)throw new Error("Date resolve error");if(n=+t[1],r=+t[2]-1,o=+t[3],!t[4])return new Date(Date.UTC(n,r,o));if(s=+t[4],a=+t[5],l=+t[6],t[7]){for(p=t[7].slice(0,3);p.length<3;)p+="0";p=+p}return t[9]&&(g=+t[10],E=+(t[11]||0),D=(g*60+E)*6e4,t[9]==="-"&&(D=-D)),w=new Date(Date.UTC(n,r,o,s,a,l,p)),D&&w.setTime(w.getTime()-D),w}function Zj(e){return e.toISOString()}Ow.exports=new Kj("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Yj,construct:Xj,instanceOf:Date,represent:Zj})});var FD=N((Qre,Tw)=>{"use strict";d();var Qj=At();function e$(e){return e==="<<"||e===null}Tw.exports=new Qj("tag:yaml.org,2002:merge",{kind:"scalar",resolve:e$})});var vD=N((tie,Iw)=>{"use strict";d();var t$=At(),ED=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
47
|
+
\r`;function n$(e){if(e===null)return!1;var t,n,r=0,o=e.length,s=ED;for(n=0;n<o;n++)if(t=s.indexOf(e.charAt(n)),!(t>64)){if(t<0)return!1;r+=6}return r%8===0}function r$(e){var t,n,r=e.replace(/[\r\n=]/g,""),o=r.length,s=ED,a=0,l=[];for(t=0;t<o;t++)t%4===0&&t&&(l.push(a>>16&255),l.push(a>>8&255),l.push(a&255)),a=a<<6|s.indexOf(r.charAt(t));return n=o%4*6,n===0?(l.push(a>>16&255),l.push(a>>8&255),l.push(a&255)):n===18?(l.push(a>>10&255),l.push(a>>2&255)):n===12&&l.push(a>>4&255),new Uint8Array(l)}function i$(e){var t="",n=0,r,o,s=e.length,a=ED;for(r=0;r<s;r++)r%3===0&&r&&(t+=a[n>>18&63],t+=a[n>>12&63],t+=a[n>>6&63],t+=a[n&63]),n=(n<<8)+e[r];return o=s%3,o===0?(t+=a[n>>18&63],t+=a[n>>12&63],t+=a[n>>6&63],t+=a[n&63]):o===2?(t+=a[n>>10&63],t+=a[n>>4&63],t+=a[n<<2&63],t+=a[64]):o===1&&(t+=a[n>>2&63],t+=a[n<<4&63],t+=a[64],t+=a[64]),t}function o$(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}Iw.exports=new t$("tag:yaml.org,2002:binary",{kind:"scalar",resolve:n$,construct:r$,predicate:o$,represent:i$})});var CD=N((rie,Bw)=>{"use strict";d();var u$=At(),s$=Object.prototype.hasOwnProperty,a$=Object.prototype.toString;function c$(e){if(e===null)return!0;var t=[],n,r,o,s,a,l=e;for(n=0,r=l.length;n<r;n+=1){if(o=l[n],a=!1,a$.call(o)!=="[object Object]")return!1;for(s in o)if(s$.call(o,s))if(!a)a=!0;else return!1;if(!a)return!1;if(t.indexOf(s)===-1)t.push(s);else return!1}return!0}function l$(e){return e!==null?e:[]}Bw.exports=new u$("tag:yaml.org,2002:omap",{kind:"sequence",resolve:c$,construct:l$})});var wD=N((oie,Rw)=>{"use strict";d();var f$=At(),p$=Object.prototype.toString;function d$(e){if(e===null)return!0;var t,n,r,o,s,a=e;for(s=new Array(a.length),t=0,n=a.length;t<n;t+=1){if(r=a[t],p$.call(r)!=="[object Object]"||(o=Object.keys(r),o.length!==1))return!1;s[t]=[o[0],r[o[0]]]}return!0}function h$(e){if(e===null)return[];var t,n,r,o,s,a=e;for(s=new Array(a.length),t=0,n=a.length;t<n;t+=1)r=a[t],o=Object.keys(r),s[t]=[o[0],r[o[0]]];return s}Rw.exports=new f$("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:d$,construct:h$})});var bD=N((sie,Nw)=>{"use strict";d();var D$=At(),m$=Object.prototype.hasOwnProperty;function g$(e){if(e===null)return!0;var t,n=e;for(t in n)if(m$.call(n,t)&&n[t]!==null)return!1;return!0}function _$(e){return e!==null?e:{}}Nw.exports=new D$("tag:yaml.org,2002:set",{kind:"mapping",resolve:g$,construct:_$})});var Ol=N((cie,Mw)=>{"use strict";d();Mw.exports=_D().extend({implicit:[yD(),FD()],explicit:[vD(),CD(),wD(),bD()]})});var Qw=N((fie,PD)=>{"use strict";d();var ho=cu(),Ww=lu(),y$=pw(),F$=Ol(),Ci=Object.prototype.hasOwnProperty,Tl=1,Hw=2,zw=3,Il=4,AD=1,E$=2,jw=3,v$=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,C$=/[\x85\u2028\u2029]/,w$=/[,\[\]\{\}]/,Gw=/^(?:!|!!|![a-z\-]+!)$/i,Vw=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function $w(e){return Object.prototype.toString.call(e)}function mr(e){return e===10||e===13}function Do(e){return e===9||e===32}function qt(e){return e===9||e===32||e===10||e===13}function fu(e){return e===44||e===91||e===93||e===123||e===125}function b$(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function A$(e){return e===120?2:e===117?4:e===85?8:0}function S$(e){return 48<=e&&e<=57?e-48:-1}function Lw(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
|
|
48
|
+
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}function x$(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function Jw(e,t,n){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:n}):e[t]=n}var Kw=new Array(256),Yw=new Array(256);for(po=0;po<256;po++)Kw[po]=Lw(po)?1:0,Yw[po]=Lw(po);var po;function P$(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||F$,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Xw(e,t){var n={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return n.snippet=y$(n),new Ww(t,n)}function Z(e,t){throw Xw(e,t)}function Bl(e,t){e.onWarning&&e.onWarning.call(null,Xw(e,t))}var Uw={YAML:function(t,n,r){var o,s,a;t.version!==null&&Z(t,"duplication of %YAML directive"),r.length!==1&&Z(t,"YAML directive accepts exactly one argument"),o=/^([0-9]+)\.([0-9]+)$/.exec(r[0]),o===null&&Z(t,"ill-formed argument of the YAML directive"),s=parseInt(o[1],10),a=parseInt(o[2],10),s!==1&&Z(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=a<2,a!==1&&a!==2&&Bl(t,"unsupported YAML version of the document")},TAG:function(t,n,r){var o,s;r.length!==2&&Z(t,"TAG directive accepts exactly two arguments"),o=r[0],s=r[1],Gw.test(o)||Z(t,"ill-formed tag handle (first argument) of the TAG directive"),Ci.call(t.tagMap,o)&&Z(t,'there is a previously declared suffix for "'+o+'" tag handle'),Vw.test(s)||Z(t,"ill-formed tag prefix (second argument) of the TAG directive");try{s=decodeURIComponent(s)}catch{Z(t,"tag prefix is malformed: "+s)}t.tagMap[o]=s}};function vi(e,t,n,r){var o,s,a,l;if(t<n){if(l=e.input.slice(t,n),r)for(o=0,s=l.length;o<s;o+=1)a=l.charCodeAt(o),a===9||32<=a&&a<=1114111||Z(e,"expected valid JSON character");else v$.test(l)&&Z(e,"the stream contains non-printable characters");e.result+=l}}function kw(e,t,n,r){var o,s,a,l;for(ho.isObject(n)||Z(e,"cannot merge mappings; the provided source object is unacceptable"),o=Object.keys(n),a=0,l=o.length;a<l;a+=1)s=o[a],Ci.call(t,s)||(Jw(t,s,n[s]),r[s]=!0)}function pu(e,t,n,r,o,s,a,l,p){var D,g;if(Array.isArray(o))for(o=Array.prototype.slice.call(o),D=0,g=o.length;D<g;D+=1)Array.isArray(o[D])&&Z(e,"nested arrays are not supported inside keys"),typeof o=="object"&&$w(o[D])==="[object Object]"&&(o[D]="[object Object]");if(typeof o=="object"&&$w(o)==="[object Object]"&&(o="[object Object]"),o=String(o),t===null&&(t={}),r==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(D=0,g=s.length;D<g;D+=1)kw(e,t,s[D],n);else kw(e,t,s,n);else!e.json&&!Ci.call(n,o)&&Ci.call(t,o)&&(e.line=a||e.line,e.lineStart=l||e.lineStart,e.position=p||e.position,Z(e,"duplicated mapping key")),Jw(t,o,s),delete n[o];return t}function SD(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):Z(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function et(e,t,n){for(var r=0,o=e.input.charCodeAt(e.position);o!==0;){for(;Do(o);)o===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),o=e.input.charCodeAt(++e.position);if(t&&o===35)do o=e.input.charCodeAt(++e.position);while(o!==10&&o!==13&&o!==0);if(mr(o))for(SD(e),o=e.input.charCodeAt(e.position),r++,e.lineIndent=0;o===32;)e.lineIndent++,o=e.input.charCodeAt(++e.position);else break}return n!==-1&&r!==0&&e.lineIndent<n&&Bl(e,"deficient indentation"),r}function Rl(e){var t=e.position,n;return n=e.input.charCodeAt(t),!!((n===45||n===46)&&n===e.input.charCodeAt(t+1)&&n===e.input.charCodeAt(t+2)&&(t+=3,n=e.input.charCodeAt(t),n===0||qt(n)))}function xD(e,t){t===1?e.result+=" ":t>1&&(e.result+=ho.repeat(`
|
|
49
|
+
`,t-1))}function O$(e,t,n){var r,o,s,a,l,p,D,g,E=e.kind,w=e.result,v;if(v=e.input.charCodeAt(e.position),qt(v)||fu(v)||v===35||v===38||v===42||v===33||v===124||v===62||v===39||v===34||v===37||v===64||v===96||(v===63||v===45)&&(o=e.input.charCodeAt(e.position+1),qt(o)||n&&fu(o)))return!1;for(e.kind="scalar",e.result="",s=a=e.position,l=!1;v!==0;){if(v===58){if(o=e.input.charCodeAt(e.position+1),qt(o)||n&&fu(o))break}else if(v===35){if(r=e.input.charCodeAt(e.position-1),qt(r))break}else{if(e.position===e.lineStart&&Rl(e)||n&&fu(v))break;if(mr(v))if(p=e.line,D=e.lineStart,g=e.lineIndent,et(e,!1,-1),e.lineIndent>=t){l=!0,v=e.input.charCodeAt(e.position);continue}else{e.position=a,e.line=p,e.lineStart=D,e.lineIndent=g;break}}l&&(vi(e,s,a,!1),xD(e,e.line-p),s=a=e.position,l=!1),Do(v)||(a=e.position+1),v=e.input.charCodeAt(++e.position)}return vi(e,s,a,!1),e.result?!0:(e.kind=E,e.result=w,!1)}function T$(e,t){var n,r,o;if(n=e.input.charCodeAt(e.position),n!==39)return!1;for(e.kind="scalar",e.result="",e.position++,r=o=e.position;(n=e.input.charCodeAt(e.position))!==0;)if(n===39)if(vi(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),n===39)r=e.position,e.position++,o=e.position;else return!0;else mr(n)?(vi(e,r,o,!0),xD(e,et(e,!1,t)),r=o=e.position):e.position===e.lineStart&&Rl(e)?Z(e,"unexpected end of the document within a single quoted scalar"):(e.position++,o=e.position);Z(e,"unexpected end of the stream within a single quoted scalar")}function I$(e,t){var n,r,o,s,a,l;if(l=e.input.charCodeAt(e.position),l!==34)return!1;for(e.kind="scalar",e.result="",e.position++,n=r=e.position;(l=e.input.charCodeAt(e.position))!==0;){if(l===34)return vi(e,n,e.position,!0),e.position++,!0;if(l===92){if(vi(e,n,e.position,!0),l=e.input.charCodeAt(++e.position),mr(l))et(e,!1,t);else if(l<256&&Kw[l])e.result+=Yw[l],e.position++;else if((a=A$(l))>0){for(o=a,s=0;o>0;o--)l=e.input.charCodeAt(++e.position),(a=b$(l))>=0?s=(s<<4)+a:Z(e,"expected hexadecimal character");e.result+=x$(s),e.position++}else Z(e,"unknown escape sequence");n=r=e.position}else mr(l)?(vi(e,n,r,!0),xD(e,et(e,!1,t)),n=r=e.position):e.position===e.lineStart&&Rl(e)?Z(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}Z(e,"unexpected end of the stream within a double quoted scalar")}function B$(e,t){var n=!0,r,o,s,a=e.tag,l,p=e.anchor,D,g,E,w,v,S=Object.create(null),O,P,I,U;if(U=e.input.charCodeAt(e.position),U===91)g=93,v=!1,l=[];else if(U===123)g=125,v=!0,l={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=l),U=e.input.charCodeAt(++e.position);U!==0;){if(et(e,!0,t),U=e.input.charCodeAt(e.position),U===g)return e.position++,e.tag=a,e.anchor=p,e.kind=v?"mapping":"sequence",e.result=l,!0;n?U===44&&Z(e,"expected the node content, but found ','"):Z(e,"missed comma between flow collection entries"),P=O=I=null,E=w=!1,U===63&&(D=e.input.charCodeAt(e.position+1),qt(D)&&(E=w=!0,e.position++,et(e,!0,t))),r=e.line,o=e.lineStart,s=e.position,du(e,t,Tl,!1,!0),P=e.tag,O=e.result,et(e,!0,t),U=e.input.charCodeAt(e.position),(w||e.line===r)&&U===58&&(E=!0,U=e.input.charCodeAt(++e.position),et(e,!0,t),du(e,t,Tl,!1,!0),I=e.result),v?pu(e,l,S,P,O,I,r,o,s):E?l.push(pu(e,null,S,P,O,I,r,o,s)):l.push(O),et(e,!0,t),U=e.input.charCodeAt(e.position),U===44?(n=!0,U=e.input.charCodeAt(++e.position)):n=!1}Z(e,"unexpected end of the stream within a flow collection")}function R$(e,t){var n,r,o=AD,s=!1,a=!1,l=t,p=0,D=!1,g,E;if(E=e.input.charCodeAt(e.position),E===124)r=!1;else if(E===62)r=!0;else return!1;for(e.kind="scalar",e.result="";E!==0;)if(E=e.input.charCodeAt(++e.position),E===43||E===45)AD===o?o=E===43?jw:E$:Z(e,"repeat of a chomping mode identifier");else if((g=S$(E))>=0)g===0?Z(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):a?Z(e,"repeat of an indentation width identifier"):(l=t+g-1,a=!0);else break;if(Do(E)){do E=e.input.charCodeAt(++e.position);while(Do(E));if(E===35)do E=e.input.charCodeAt(++e.position);while(!mr(E)&&E!==0)}for(;E!==0;){for(SD(e),e.lineIndent=0,E=e.input.charCodeAt(e.position);(!a||e.lineIndent<l)&&E===32;)e.lineIndent++,E=e.input.charCodeAt(++e.position);if(!a&&e.lineIndent>l&&(l=e.lineIndent),mr(E)){p++;continue}if(e.lineIndent<l){o===jw?e.result+=ho.repeat(`
|
|
50
|
+
`,s?1+p:p):o===AD&&s&&(e.result+=`
|
|
51
|
+
`);break}for(r?Do(E)?(D=!0,e.result+=ho.repeat(`
|
|
52
|
+
`,s?1+p:p)):D?(D=!1,e.result+=ho.repeat(`
|
|
53
|
+
`,p+1)):p===0?s&&(e.result+=" "):e.result+=ho.repeat(`
|
|
54
|
+
`,p):e.result+=ho.repeat(`
|
|
55
|
+
`,s?1+p:p),s=!0,a=!0,p=0,n=e.position;!mr(E)&&E!==0;)E=e.input.charCodeAt(++e.position);vi(e,n,e.position,!1)}return!0}function qw(e,t){var n,r=e.tag,o=e.anchor,s=[],a,l=!1,p;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),p=e.input.charCodeAt(e.position);p!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,Z(e,"tab characters must not be used in indentation")),!(p!==45||(a=e.input.charCodeAt(e.position+1),!qt(a))));){if(l=!0,e.position++,et(e,!0,-1)&&e.lineIndent<=t){s.push(null),p=e.input.charCodeAt(e.position);continue}if(n=e.line,du(e,t,zw,!1,!0),s.push(e.result),et(e,!0,-1),p=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&p!==0)Z(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return l?(e.tag=r,e.anchor=o,e.kind="sequence",e.result=s,!0):!1}function N$(e,t,n){var r,o,s,a,l,p,D=e.tag,g=e.anchor,E={},w=Object.create(null),v=null,S=null,O=null,P=!1,I=!1,U;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=E),U=e.input.charCodeAt(e.position);U!==0;){if(!P&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,Z(e,"tab characters must not be used in indentation")),r=e.input.charCodeAt(e.position+1),s=e.line,(U===63||U===58)&&qt(r))U===63?(P&&(pu(e,E,w,v,S,null,a,l,p),v=S=O=null),I=!0,P=!0,o=!0):P?(P=!1,o=!0):Z(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,U=r;else{if(a=e.line,l=e.lineStart,p=e.position,!du(e,n,Hw,!1,!0))break;if(e.line===s){for(U=e.input.charCodeAt(e.position);Do(U);)U=e.input.charCodeAt(++e.position);if(U===58)U=e.input.charCodeAt(++e.position),qt(U)||Z(e,"a whitespace character is expected after the key-value separator within a block mapping"),P&&(pu(e,E,w,v,S,null,a,l,p),v=S=O=null),I=!0,P=!1,o=!1,v=e.tag,S=e.result;else if(I)Z(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=D,e.anchor=g,!0}else if(I)Z(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=D,e.anchor=g,!0}if((e.line===s||e.lineIndent>t)&&(P&&(a=e.line,l=e.lineStart,p=e.position),du(e,t,Il,!0,o)&&(P?S=e.result:O=e.result),P||(pu(e,E,w,v,S,O,a,l,p),v=S=O=null),et(e,!0,-1),U=e.input.charCodeAt(e.position)),(e.line===s||e.lineIndent>t)&&U!==0)Z(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return P&&pu(e,E,w,v,S,null,a,l,p),I&&(e.tag=D,e.anchor=g,e.kind="mapping",e.result=E),I}function M$(e){var t,n=!1,r=!1,o,s,a;if(a=e.input.charCodeAt(e.position),a!==33)return!1;if(e.tag!==null&&Z(e,"duplication of a tag property"),a=e.input.charCodeAt(++e.position),a===60?(n=!0,a=e.input.charCodeAt(++e.position)):a===33?(r=!0,o="!!",a=e.input.charCodeAt(++e.position)):o="!",t=e.position,n){do a=e.input.charCodeAt(++e.position);while(a!==0&&a!==62);e.position<e.length?(s=e.input.slice(t,e.position),a=e.input.charCodeAt(++e.position)):Z(e,"unexpected end of the stream within a verbatim tag")}else{for(;a!==0&&!qt(a);)a===33&&(r?Z(e,"tag suffix cannot contain exclamation marks"):(o=e.input.slice(t-1,e.position+1),Gw.test(o)||Z(e,"named tag handle cannot contain such characters"),r=!0,t=e.position+1)),a=e.input.charCodeAt(++e.position);s=e.input.slice(t,e.position),w$.test(s)&&Z(e,"tag suffix cannot contain flow indicator characters")}s&&!Vw.test(s)&&Z(e,"tag name cannot contain such characters: "+s);try{s=decodeURIComponent(s)}catch{Z(e,"tag name is malformed: "+s)}return n?e.tag=s:Ci.call(e.tagMap,o)?e.tag=e.tagMap[o]+s:o==="!"?e.tag="!"+s:o==="!!"?e.tag="tag:yaml.org,2002:"+s:Z(e,'undeclared tag handle "'+o+'"'),!0}function j$(e){var t,n;if(n=e.input.charCodeAt(e.position),n!==38)return!1;for(e.anchor!==null&&Z(e,"duplication of an anchor property"),n=e.input.charCodeAt(++e.position),t=e.position;n!==0&&!qt(n)&&!fu(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&Z(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function $$(e){var t,n,r;if(r=e.input.charCodeAt(e.position),r!==42)return!1;for(r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!qt(r)&&!fu(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&Z(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),Ci.call(e.anchorMap,n)||Z(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],et(e,!0,-1),!0}function du(e,t,n,r,o){var s,a,l,p=1,D=!1,g=!1,E,w,v,S,O,P;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,s=a=l=Il===n||zw===n,r&&et(e,!0,-1)&&(D=!0,e.lineIndent>t?p=1:e.lineIndent===t?p=0:e.lineIndent<t&&(p=-1)),p===1)for(;M$(e)||j$(e);)et(e,!0,-1)?(D=!0,l=s,e.lineIndent>t?p=1:e.lineIndent===t?p=0:e.lineIndent<t&&(p=-1)):l=!1;if(l&&(l=D||o),(p===1||Il===n)&&(Tl===n||Hw===n?O=t:O=t+1,P=e.position-e.lineStart,p===1?l&&(qw(e,P)||N$(e,P,O))||B$(e,O)?g=!0:(a&&R$(e,O)||T$(e,O)||I$(e,O)?g=!0:$$(e)?(g=!0,(e.tag!==null||e.anchor!==null)&&Z(e,"alias node should not have any properties")):O$(e,O,Tl===n)&&(g=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):p===0&&(g=l&&qw(e,P))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&Z(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),E=0,w=e.implicitTypes.length;E<w;E+=1)if(S=e.implicitTypes[E],S.resolve(e.result)){e.result=S.construct(e.result),e.tag=S.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(Ci.call(e.typeMap[e.kind||"fallback"],e.tag))S=e.typeMap[e.kind||"fallback"][e.tag];else for(S=null,v=e.typeMap.multi[e.kind||"fallback"],E=0,w=v.length;E<w;E+=1)if(e.tag.slice(0,v[E].tag.length)===v[E].tag){S=v[E];break}S||Z(e,"unknown tag !<"+e.tag+">"),e.result!==null&&S.kind!==e.kind&&Z(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+S.kind+'", not "'+e.kind+'"'),S.resolve(e.result,e.tag)?(e.result=S.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):Z(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||g}function L$(e){var t=e.position,n,r,o,s=!1,a;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(a=e.input.charCodeAt(e.position))!==0&&(et(e,!0,-1),a=e.input.charCodeAt(e.position),!(e.lineIndent>0||a!==37));){for(s=!0,a=e.input.charCodeAt(++e.position),n=e.position;a!==0&&!qt(a);)a=e.input.charCodeAt(++e.position);for(r=e.input.slice(n,e.position),o=[],r.length<1&&Z(e,"directive name must not be less than one character in length");a!==0;){for(;Do(a);)a=e.input.charCodeAt(++e.position);if(a===35){do a=e.input.charCodeAt(++e.position);while(a!==0&&!mr(a));break}if(mr(a))break;for(n=e.position;a!==0&&!qt(a);)a=e.input.charCodeAt(++e.position);o.push(e.input.slice(n,e.position))}a!==0&&SD(e),Ci.call(Uw,r)?Uw[r](e,r,o):Bl(e,'unknown document directive "'+r+'"')}if(et(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,et(e,!0,-1)):s&&Z(e,"directives end mark is expected"),du(e,e.lineIndent-1,Il,!1,!0),et(e,!0,-1),e.checkLineBreaks&&C$.test(e.input.slice(t,e.position))&&Bl(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Rl(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,et(e,!0,-1));return}if(e.position<e.length-1)Z(e,"end of the stream or a document separator is expected");else return}function Zw(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
|
|
56
|
+
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var n=new P$(e,t),r=e.indexOf("\0");for(r!==-1&&(n.position=r,Z(n,"null byte is not allowed in input")),n.input+="\0";n.input.charCodeAt(n.position)===32;)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)L$(n);return n.documents}function U$(e,t,n){t!==null&&typeof t=="object"&&typeof n>"u"&&(n=t,t=null);var r=Zw(e,n);if(typeof t!="function")return r;for(var o=0,s=r.length;o<s;o+=1)t(r[o])}function k$(e,t){var n=Zw(e,t);if(n.length!==0){if(n.length===1)return n[0];throw new Ww("expected a single document in the stream, but found more")}}PD.exports.loadAll=U$;PD.exports.load=k$});var Fb=N((die,yb)=>{"use strict";d();var jl=cu(),Ks=lu(),q$=Ol(),ab=Object.prototype.toString,cb=Object.prototype.hasOwnProperty,RD=65279,W$=9,Gs=10,H$=13,z$=32,G$=33,V$=34,OD=35,J$=37,K$=38,Y$=39,X$=42,lb=44,Z$=45,Nl=58,Q$=61,e7=62,t7=63,n7=64,fb=91,pb=93,r7=96,db=123,i7=124,hb=125,St={};St[0]="\\0";St[7]="\\a";St[8]="\\b";St[9]="\\t";St[10]="\\n";St[11]="\\v";St[12]="\\f";St[13]="\\r";St[27]="\\e";St[34]='\\"';St[92]="\\\\";St[133]="\\N";St[160]="\\_";St[8232]="\\L";St[8233]="\\P";var o7=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],u7=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function s7(e,t){var n,r,o,s,a,l,p;if(t===null)return{};for(n={},r=Object.keys(t),o=0,s=r.length;o<s;o+=1)a=r[o],l=String(t[a]),a.slice(0,2)==="!!"&&(a="tag:yaml.org,2002:"+a.slice(2)),p=e.compiledTypeMap.fallback[a],p&&cb.call(p.styleAliases,l)&&(l=p.styleAliases[l]),n[a]=l;return n}function a7(e){var t,n,r;if(t=e.toString(16).toUpperCase(),e<=255)n="x",r=2;else if(e<=65535)n="u",r=4;else if(e<=4294967295)n="U",r=8;else throw new Ks("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+n+jl.repeat("0",r-t.length)+t}var c7=1,Vs=2;function l7(e){this.schema=e.schema||q$,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=jl.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=s7(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?Vs:c7,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function eb(e,t){for(var n=jl.repeat(" ",t),r=0,o=-1,s="",a,l=e.length;r<l;)o=e.indexOf(`
|
|
57
|
+
`,r),o===-1?(a=e.slice(r),r=l):(a=e.slice(r,o+1),r=o+1),a.length&&a!==`
|
|
58
|
+
`&&(s+=n),s+=a;return s}function TD(e,t){return`
|
|
59
|
+
`+jl.repeat(" ",e.indent*t)}function f7(e,t){var n,r,o;for(n=0,r=e.implicitTypes.length;n<r;n+=1)if(o=e.implicitTypes[n],o.resolve(t))return!0;return!1}function Ml(e){return e===z$||e===W$}function Js(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==RD||65536<=e&&e<=1114111}function tb(e){return Js(e)&&e!==RD&&e!==H$&&e!==Gs}function nb(e,t,n){var r=tb(e),o=r&&!Ml(e);return(n?r:r&&e!==lb&&e!==fb&&e!==pb&&e!==db&&e!==hb)&&e!==OD&&!(t===Nl&&!o)||tb(t)&&!Ml(t)&&e===OD||t===Nl&&o}function p7(e){return Js(e)&&e!==RD&&!Ml(e)&&e!==Z$&&e!==t7&&e!==Nl&&e!==lb&&e!==fb&&e!==pb&&e!==db&&e!==hb&&e!==OD&&e!==K$&&e!==X$&&e!==G$&&e!==i7&&e!==Q$&&e!==e7&&e!==Y$&&e!==V$&&e!==J$&&e!==n7&&e!==r7}function d7(e){return!Ml(e)&&e!==Nl}function zs(e,t){var n=e.charCodeAt(t),r;return n>=55296&&n<=56319&&t+1<e.length&&(r=e.charCodeAt(t+1),r>=56320&&r<=57343)?(n-55296)*1024+r-56320+65536:n}function Db(e){var t=/^\n* /;return t.test(e)}var mb=1,ID=2,gb=3,_b=4,hu=5;function h7(e,t,n,r,o,s,a,l){var p,D=0,g=null,E=!1,w=!1,v=r!==-1,S=-1,O=p7(zs(e,0))&&d7(zs(e,e.length-1));if(t||a)for(p=0;p<e.length;D>=65536?p+=2:p++){if(D=zs(e,p),!Js(D))return hu;O=O&&nb(D,g,l),g=D}else{for(p=0;p<e.length;D>=65536?p+=2:p++){if(D=zs(e,p),D===Gs)E=!0,v&&(w=w||p-S-1>r&&e[S+1]!==" ",S=p);else if(!Js(D))return hu;O=O&&nb(D,g,l),g=D}w=w||v&&p-S-1>r&&e[S+1]!==" "}return!E&&!w?O&&!a&&!o(e)?mb:s===Vs?hu:ID:n>9&&Db(e)?hu:a?s===Vs?hu:ID:w?_b:gb}function D7(e,t,n,r,o){e.dump=(function(){if(t.length===0)return e.quotingType===Vs?'""':"''";if(!e.noCompatMode&&(o7.indexOf(t)!==-1||u7.test(t)))return e.quotingType===Vs?'"'+t+'"':"'"+t+"'";var s=e.indent*Math.max(1,n),a=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-s),l=r||e.flowLevel>-1&&n>=e.flowLevel;function p(D){return f7(e,D)}switch(h7(t,l,e.indent,a,p,e.quotingType,e.forceQuotes&&!r,o)){case mb:return t;case ID:return"'"+t.replace(/'/g,"''")+"'";case gb:return"|"+rb(t,e.indent)+ib(eb(t,s));case _b:return">"+rb(t,e.indent)+ib(eb(m7(t,a),s));case hu:return'"'+g7(t,a)+'"';default:throw new Ks("impossible error: invalid scalar style")}})()}function rb(e,t){var n=Db(e)?String(t):"",r=e[e.length-1]===`
|
|
60
|
+
`,o=r&&(e[e.length-2]===`
|
|
61
|
+
`||e===`
|
|
62
|
+
`),s=o?"+":r?"":"-";return n+s+`
|
|
63
|
+
`}function ib(e){return e[e.length-1]===`
|
|
64
|
+
`?e.slice(0,-1):e}function m7(e,t){for(var n=/(\n+)([^\n]*)/g,r=(function(){var D=e.indexOf(`
|
|
65
|
+
`);return D=D!==-1?D:e.length,n.lastIndex=D,ob(e.slice(0,D),t)})(),o=e[0]===`
|
|
66
|
+
`||e[0]===" ",s,a;a=n.exec(e);){var l=a[1],p=a[2];s=p[0]===" ",r+=l+(!o&&!s&&p!==""?`
|
|
67
|
+
`:"")+ob(p,t),o=s}return r}function ob(e,t){if(e===""||e[0]===" ")return e;for(var n=/ [^ ]/g,r,o=0,s,a=0,l=0,p="";r=n.exec(e);)l=r.index,l-o>t&&(s=a>o?a:l,p+=`
|
|
68
|
+
`+e.slice(o,s),o=s+1),a=l;return p+=`
|
|
69
|
+
`,e.length-o>t&&a>o?p+=e.slice(o,a)+`
|
|
70
|
+
`+e.slice(a+1):p+=e.slice(o),p.slice(1)}function g7(e){for(var t="",n=0,r,o=0;o<e.length;n>=65536?o+=2:o++)n=zs(e,o),r=St[n],!r&&Js(n)?(t+=e[o],n>=65536&&(t+=e[o+1])):t+=r||a7(n);return t}function _7(e,t,n){var r="",o=e.tag,s,a,l;for(s=0,a=n.length;s<a;s+=1)l=n[s],e.replacer&&(l=e.replacer.call(n,String(s),l)),(Lr(e,t,l,!1,!1)||typeof l>"u"&&Lr(e,t,null,!1,!1))&&(r!==""&&(r+=","+(e.condenseFlow?"":" ")),r+=e.dump);e.tag=o,e.dump="["+r+"]"}function ub(e,t,n,r){var o="",s=e.tag,a,l,p;for(a=0,l=n.length;a<l;a+=1)p=n[a],e.replacer&&(p=e.replacer.call(n,String(a),p)),(Lr(e,t+1,p,!0,!0,!1,!0)||typeof p>"u"&&Lr(e,t+1,null,!0,!0,!1,!0))&&((!r||o!=="")&&(o+=TD(e,t)),e.dump&&Gs===e.dump.charCodeAt(0)?o+="-":o+="- ",o+=e.dump);e.tag=s,e.dump=o||"[]"}function y7(e,t,n){var r="",o=e.tag,s=Object.keys(n),a,l,p,D,g;for(a=0,l=s.length;a<l;a+=1)g="",r!==""&&(g+=", "),e.condenseFlow&&(g+='"'),p=s[a],D=n[p],e.replacer&&(D=e.replacer.call(n,p,D)),Lr(e,t,p,!1,!1)&&(e.dump.length>1024&&(g+="? "),g+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Lr(e,t,D,!1,!1)&&(g+=e.dump,r+=g));e.tag=o,e.dump="{"+r+"}"}function F7(e,t,n,r){var o="",s=e.tag,a=Object.keys(n),l,p,D,g,E,w;if(e.sortKeys===!0)a.sort();else if(typeof e.sortKeys=="function")a.sort(e.sortKeys);else if(e.sortKeys)throw new Ks("sortKeys must be a boolean or a function");for(l=0,p=a.length;l<p;l+=1)w="",(!r||o!=="")&&(w+=TD(e,t)),D=a[l],g=n[D],e.replacer&&(g=e.replacer.call(n,D,g)),Lr(e,t+1,D,!0,!0,!0)&&(E=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,E&&(e.dump&&Gs===e.dump.charCodeAt(0)?w+="?":w+="? "),w+=e.dump,E&&(w+=TD(e,t)),Lr(e,t+1,g,!0,E)&&(e.dump&&Gs===e.dump.charCodeAt(0)?w+=":":w+=": ",w+=e.dump,o+=w));e.tag=s,e.dump=o||"{}"}function sb(e,t,n){var r,o,s,a,l,p;for(o=n?e.explicitTypes:e.implicitTypes,s=0,a=o.length;s<a;s+=1)if(l=o[s],(l.instanceOf||l.predicate)&&(!l.instanceOf||typeof t=="object"&&t instanceof l.instanceOf)&&(!l.predicate||l.predicate(t))){if(n?l.multi&&l.representName?e.tag=l.representName(t):e.tag=l.tag:e.tag="?",l.represent){if(p=e.styleMap[l.tag]||l.defaultStyle,ab.call(l.represent)==="[object Function]")r=l.represent(t,p);else if(cb.call(l.represent,p))r=l.represent[p](t,p);else throw new Ks("!<"+l.tag+'> tag resolver accepts not "'+p+'" style');e.dump=r}return!0}return!1}function Lr(e,t,n,r,o,s,a){e.tag=null,e.dump=n,sb(e,n,!1)||sb(e,n,!0);var l=ab.call(e.dump),p=r,D;r&&(r=e.flowLevel<0||e.flowLevel>t);var g=l==="[object Object]"||l==="[object Array]",E,w;if(g&&(E=e.duplicates.indexOf(n),w=E!==-1),(e.tag!==null&&e.tag!=="?"||w||e.indent!==2&&t>0)&&(o=!1),w&&e.usedDuplicates[E])e.dump="*ref_"+E;else{if(g&&w&&!e.usedDuplicates[E]&&(e.usedDuplicates[E]=!0),l==="[object Object]")r&&Object.keys(e.dump).length!==0?(F7(e,t,e.dump,o),w&&(e.dump="&ref_"+E+e.dump)):(y7(e,t,e.dump),w&&(e.dump="&ref_"+E+" "+e.dump));else if(l==="[object Array]")r&&e.dump.length!==0?(e.noArrayIndent&&!a&&t>0?ub(e,t-1,e.dump,o):ub(e,t,e.dump,o),w&&(e.dump="&ref_"+E+e.dump)):(_7(e,t,e.dump),w&&(e.dump="&ref_"+E+" "+e.dump));else if(l==="[object String]")e.tag!=="?"&&D7(e,e.dump,t,s,p);else{if(l==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new Ks("unacceptable kind of an object to dump "+l)}e.tag!==null&&e.tag!=="?"&&(D=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?D="!"+D:D.slice(0,18)==="tag:yaml.org,2002:"?D="!!"+D.slice(18):D="!<"+D+">",e.dump=D+" "+e.dump)}return!0}function E7(e,t){var n=[],r=[],o,s;for(BD(e,n,r),o=0,s=r.length;o<s;o+=1)t.duplicates.push(n[r[o]]);t.usedDuplicates=new Array(s)}function BD(e,t,n){var r,o,s;if(e!==null&&typeof e=="object")if(o=t.indexOf(e),o!==-1)n.indexOf(o)===-1&&n.push(o);else if(t.push(e),Array.isArray(e))for(o=0,s=e.length;o<s;o+=1)BD(e[o],t,n);else for(r=Object.keys(e),o=0,s=r.length;o<s;o+=1)BD(e[r[o]],t,n)}function v7(e,t){t=t||{};var n=new l7(t);n.noRefs||E7(e,n);var r=e;return n.replacer&&(r=n.replacer.call({"":r},"",r)),Lr(n,0,r,!0,!0)?n.dump+`
|
|
71
|
+
`:""}yb.exports.dump=v7});var Du=N((Die,Nt)=>{"use strict";d();var Eb=Qw(),C7=Fb();function ND(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}Nt.exports.Type=At();Nt.exports.Schema=aD();Nt.exports.FAILSAFE_SCHEMA=pD();Nt.exports.JSON_SCHEMA=gD();Nt.exports.CORE_SCHEMA=_D();Nt.exports.DEFAULT_SCHEMA=Ol();Nt.exports.load=Eb.load;Nt.exports.loadAll=Eb.loadAll;Nt.exports.dump=C7.dump;Nt.exports.YAMLException=lu();Nt.exports.types={binary:vD(),float:mD(),map:fD(),null:dD(),pairs:wD(),set:bD(),timestamp:yD(),bool:hD(),int:DD(),merge:FD(),omap:CD(),seq:lD(),str:cD()};Nt.exports.safeLoad=ND("safeLoad","load");Nt.exports.safeLoadAll=ND("safeLoadAll","loadAll");Nt.exports.safeDump=ND("safeDump","dump")});var bi=N(ve=>{"use strict";d();var w7=ve&&ve.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ve,"__esModule",{value:!0});ve.parseFileAsJSONSchema=ve.isSchemaLike=ve.appendToDescription=ve.maybeStripDefault=ve.pathTransform=ve.escapeBlockComment=ve.log=ve.error=ve.generateName=ve.toSafeString=ve.stripExtension=ve.justName=ve.traverse=ve.Try=void 0;var Ys=$r(),Ur=ze("path"),vb=lo(),b7=w7(Du());function MD(e,t){try{return e()}catch(n){return t(n)}}ve.Try=MD;var A7=new Set(["id","$defs","$id","$schema","title","description","default","multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","items","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","definitions","properties","patternProperties","dependencies","enum","type","allOf","anyOf","oneOf","not"]);function mu(e,t,n){Object.keys(e).forEach(r=>{e[r]&&typeof e[r]=="object"&&!Array.isArray(e[r])&&mo(e[r],t,n,r)})}function gu(e,t,n){e.forEach((r,o)=>mo(r,t,n,o.toString()))}function S7(e,t,n){if(typeof e!="object"||!e)return;let o=e[vb.Intersection];o&&Array.isArray(o.allOf)&&gu(o.allOf,t,n)}function mo(e,t,n=new Set,r){if(!n.has(e)){if(n.add(e),t(e,r??null),e.anyOf&&gu(e.anyOf,t,n),e.allOf&&gu(e.allOf,t,n),e.oneOf&&gu(e.oneOf,t,n),e.properties&&mu(e.properties,t,n),e.patternProperties&&mu(e.patternProperties,t,n),e.additionalProperties&&typeof e.additionalProperties=="object"&&mo(e.additionalProperties,t,n),e.items){let{items:o}=e;Array.isArray(o)?gu(o,t,n):mo(o,t,n)}e.additionalItems&&typeof e.additionalItems=="object"&&mo(e.additionalItems,t,n),e.dependencies&&(Array.isArray(e.dependencies)?gu(e.dependencies,t,n):mu(e.dependencies,t,n)),e.definitions&&mu(e.definitions,t,n),e.$defs&&mu(e.$defs,t,n),e.not&&mo(e.not,t,n),S7(e,t,n),Object.keys(e).filter(o=>!A7.has(o)).forEach(o=>{let s=e[o];s&&typeof s=="object"&&mu(s,t,n)})}}ve.traverse=mo;function x7(e=""){return Cb((0,Ur.basename)(e))}ve.justName=x7;function Cb(e){return e.replace((0,Ur.extname)(e),"")}ve.stripExtension=Cb;function wb(e){return(0,Ys.upperFirst)((0,Ys.deburr)(e).replace(/(^\s*[^a-zA-Z_$])|([^a-zA-Z_$\d])/g," ").replace(/^_[a-z]/g,t=>t.toUpperCase()).replace(/_[a-z]/g,t=>t.substr(1,t.length).toUpperCase()).replace(/([\d$]+[a-zA-Z])/g,t=>t.toUpperCase()).replace(/\s+([a-zA-Z])/g,t=>(0,Ys.trim)(t.toUpperCase())).replace(/\s/g,""))}ve.toSafeString=wb;function P7(e,t){let n=wb(e);if(n||(n="NoName"),t.has(n)){let r=1,o=`${n}${r}`;for(;t.has(o);)o=`${n}${r}`,r++;n=o}return t.add(n),n}ve.generateName=P7;function O7(...e){var t;if(!process.env.VERBOSE)return console.error(e);console.error((t=bb("red"))===null||t===void 0?void 0:t("error"),...e)}ve.error=O7;function T7(e,t,...n){var r,o;if(!process.env.VERBOSE)return;let s=null;n.length>1&&typeof n[n.length-1]!="string"&&(s=n.splice(n.length-1,1)),console.info((r=wi())===null||r===void 0?void 0:r.whiteBright.bgCyan("debug"),(o=bb(e))===null||o===void 0?void 0:o(t),...n),s&&console.dir(s,{depth:6,maxArrayLength:6})}ve.log=T7;function bb(e){var t,n,r,o,s,a,l;if(process.env.VERBOSE)switch(e){case"blue":return(t=wi())===null||t===void 0?void 0:t.whiteBright.bgBlue;case"cyan":return(n=wi())===null||n===void 0?void 0:n.whiteBright.bgCyan;case"green":return(r=wi())===null||r===void 0?void 0:r.whiteBright.bgGreen;case"magenta":return(o=wi())===null||o===void 0?void 0:o.whiteBright.bgMagenta;case"red":return(s=wi())===null||s===void 0?void 0:s.whiteBright.bgRedBright;case"white":return(a=wi())===null||a===void 0?void 0:a.black.bgWhite;case"yellow":return(l=wi())===null||l===void 0?void 0:l.whiteBright.bgYellow}}function I7(e){if(!(e===null||typeof e!="object"))for(let n of Object.keys(e))n==="description"&&typeof e[n]=="string"&&(e[n]=e[n].replace(/\*\//g,"* /"))}ve.escapeBlockComment=I7;function B7(e,t,n){let r=(0,Ur.normalize)(t).split(Ur.sep),s=(0,Ur.dirname)((0,Ur.normalize)(n)).split(Ur.sep).filter((a,l)=>a!==r[l]);return Ur.posix.join(Ur.posix.normalize(e),...s)}ve.pathTransform=B7;function R7(e){if(!("default"in e))return e;switch(e.type){case"array":if(Array.isArray(e.default))return e;break;case"boolean":if(typeof e.default=="boolean")return e;break;case"integer":case"number":if(typeof e.default=="number")return e;break;case"string":if(typeof e.default=="string")return e;break;case"null":if(e.default===null)return e;break;case"object":if((0,Ys.isPlainObject)(e.default))return e;break}return delete e.default,e}ve.maybeStripDefault=R7;function N7(e,...t){return e?`${e}
|
|
72
|
+
|
|
73
|
+
${t.join(`
|
|
74
|
+
`)}`:t.join(`
|
|
75
|
+
`)}ve.appendToDescription=N7;function M7(e){if(!(0,Ys.isPlainObject)(e))return!1;let t=e[vb.Parent];return t===null?!0:!["$defs","allOf","anyOf","definitions","dependencies","enum","not","oneOf","patternProperties","properties","required"].some(r=>t[r]===e)}ve.isSchemaLike=M7;function j7(e,t){return e!=null&&$7(e)?MD(()=>b7.default.load(t.toString()),()=>{throw new TypeError(`Error parsing YML in file "${e}"`)}):MD(()=>JSON.parse(t.toString()),()=>{throw new TypeError(`Error parsing JSON in file "${e}"`)})}ve.parseFileAsJSONSchema=j7;function $7(e){return e.endsWith(".yaml")||e.endsWith(".yml")}function wi(){let e;try{e=ze("cli-color")}catch{}return e}});var LD=N(rn=>{"use strict";d();Object.defineProperty(rn,"__esModule",{value:!0});rn.generateType=rn.generate=void 0;var Sb=$r(),L7=UD(),nn=Pl(),yu=bi();function U7(e,t=L7.DEFAULT_OPTIONS){return[t.bannerComment,Zs(e,t,e.standaloneName),Xs(e,t,e.standaloneName),_u(e,t)].filter(Boolean).join(`
|
|
76
|
+
|
|
77
|
+
`)+`
|
|
78
|
+
`}rn.generate=U7;function _u(e,t,n=new Set){if(n.has(e))return"";n.add(e);let r="";switch(e.type){case"ENUM":return W7(e,t)+`
|
|
79
|
+
`;case"ARRAY":return _u(e.params,t,n);case"UNION":case"INTERSECTION":return e.params.reduce((o,s)=>o+_u(s,t,n),"");case"TUPLE":return r=e.params.reduce((o,s)=>o+_u(s,t,n),""),e.spreadParam&&(r+=_u(e.spreadParam,t,n)),r;case"INTERFACE":return $D(e).reduce((o,s)=>o+_u(s,t,n),"");default:return""}}function Xs(e,t,n,r=new Set){if(r.has(e))return"";r.add(e);let o="";switch(e.type){case"ARRAY":o=Xs(e.params,t,n,r);break;case"INTERFACE":o=[(0,nn.hasStandaloneName)(e)&&(e.standaloneName===n||t.declareExternallyReferenced)&&H7(e,t),$D(e).map(s=>Xs(s,t,n,r)).filter(Boolean).join(`
|
|
80
|
+
`)].filter(Boolean).join(`
|
|
81
|
+
`);break;case"INTERSECTION":case"TUPLE":case"UNION":o=e.params.map(s=>Xs(s,t,n,r)).filter(Boolean).join(`
|
|
82
|
+
`),e.type==="TUPLE"&&e.spreadParam&&(o+=Xs(e.spreadParam,t,n,r));break;default:o=""}return o}function Zs(e,t,n,r=new Set){if(r.has(e))return"";switch(r.add(e),e.type){case"ARRAY":return[Zs(e.params,t,n,r),(0,nn.hasStandaloneName)(e)?jD(e,t):void 0].filter(Boolean).join(`
|
|
83
|
+
`);case"ENUM":return"";case"INTERFACE":return $D(e).map(o=>(o.standaloneName===n||t.declareExternallyReferenced)&&Zs(o,t,n,r)).filter(Boolean).join(`
|
|
84
|
+
`);case"INTERSECTION":case"TUPLE":case"UNION":return[(0,nn.hasStandaloneName)(e)?jD(e,t):void 0,e.params.map(o=>Zs(o,t,n,r)).filter(Boolean).join(`
|
|
85
|
+
`),"spreadParam"in e&&e.spreadParam?Zs(e.spreadParam,t,n,r):void 0].filter(Boolean).join(`
|
|
86
|
+
`);default:return(0,nn.hasStandaloneName)(e)?jD(e,t):""}}function k7(e,t){let n=q7(e,t);return t.strictIndexSignatures&&e.keyName==="[k: string]"?`${n} | undefined`:n}rn.generateType=(0,Sb.memoize)(k7);function q7(e,t){if((0,yu.log)("magenta","generator",e),(0,nn.hasStandaloneName)(e))return(0,yu.toSafeString)(e.standaloneName);switch(e.type){case"ANY":return"any";case"ARRAY":return(()=>{let n=(0,rn.generateType)(e.params,t);return n.endsWith('"')?"("+n+")[]":n+"[]"})();case"BOOLEAN":return"boolean";case"INTERFACE":return xb(e,t);case"INTERSECTION":return Ab(e,t);case"LITERAL":return JSON.stringify(e.params);case"NEVER":return"never";case"NUMBER":return"number";case"NULL":return"null";case"OBJECT":return"object";case"REFERENCE":return e.params;case"STRING":return"string";case"TUPLE":return(()=>{let n=e.minItems,r=e.maxItems||-1,o=e.spreadParam,s=[...e.params];if(n>0&&n>s.length&&e.spreadParam===void 0&&r<0&&(o=t.unknownAny?nn.T_UNKNOWN:nn.T_ANY),r>s.length&&e.spreadParam===void 0)for(let D=s.length;D<r;D+=1)s.push(t.unknownAny?nn.T_UNKNOWN:nn.T_ANY);function a(D){if(o){let g="...("+(0,rn.generateType)(o,t)+")[]";D.push(g)}return D}function l(D){return"["+D.join(", ")+"]"}let p=s.map(D=>(0,rn.generateType)(D,t));if(p.length>n){let D=p.slice(0,n),g=[];D.length>0?g.push(l(D)):g.push(l([]));for(let E=n;E<p.length;E+=1)D.push(p[E]),E===p.length-1&&a(D),g.push(l(D));return g.join("|")}return l(a(p))})();case"UNION":return Ab(e,t);case"UNKNOWN":return"unknown";case"CUSTOM_TYPE":return e.params}}function Ab(e,t){let n=e.params.map(o=>(0,rn.generateType)(o,t)),r=e.type==="UNION"?"|":"&";return n.length===1?n[0]:"("+n.join(" "+r+" ")+")"}function xb(e,t){return`{
|
|
87
|
+
`+e.params.filter(n=>!n.isPatternProperty&&!n.isUnreachableDefinition).map(({isRequired:n,keyName:r,ast:o})=>[n,r,o,(0,rn.generateType)(o,t)]).map(([n,r,o,s])=>((0,nn.hasComment)(o)&&!o.standaloneName?$l(o.comment,o.deprecated)+`
|
|
88
|
+
`:"")+z7(r)+(n?"":"?")+": "+s).join(`
|
|
89
|
+
`)+`
|
|
90
|
+
}`}function $l(e,t){let n=["/**"];return t&&n.push(" * @deprecated"),typeof e<"u"&&n.push(...e.split(`
|
|
91
|
+
`).map(r=>" * "+r)),n.push(" */"),n.join(`
|
|
92
|
+
`)}function W7(e,t){let n=r=>/[^a-zA-Z0-9_]/.test(r);return((0,nn.hasComment)(e)?$l(e.comment,e.deprecated)+`
|
|
93
|
+
`:"")+"export "+(t.enableConstEnums?"const ":"")+`enum ${(0,yu.toSafeString)(e.standaloneName)} {
|
|
94
|
+
`+e.params.map(({ast:r,keyName:o})=>(n(o)?`"${o}"`:o)+" = "+(0,rn.generateType)(r,t)).join(`,
|
|
95
|
+
`)+`
|
|
96
|
+
}`}function H7(e,t){return((0,nn.hasComment)(e)?$l(e.comment,e.deprecated)+`
|
|
97
|
+
`:"")+`export interface ${(0,yu.toSafeString)(e.standaloneName)} `+(e.superTypes.length>0?`extends ${e.superTypes.map(n=>(0,yu.toSafeString)(n.standaloneName)).join(", ")} `:"")+xb(e,t)}function jD(e,t){return((0,nn.hasComment)(e)?$l(e.comment)+`
|
|
98
|
+
`:"")+`export type ${(0,yu.toSafeString)(e.standaloneName)} = ${(0,rn.generateType)((0,Sb.omit)(e,"standaloneName"),t)}`}function z7(e){return e.length&&/[A-Za-z_$]/.test(e.charAt(0))&&/^[\w$]+$/.test(e)||e==="[k: string]"?e:JSON.stringify(e)}function $D(e){return e.params.map(t=>t.ast).concat(e.superTypes)}});var Pb=N(Ll=>{"use strict";d();Object.defineProperty(Ll,"__esModule",{value:!0});Ll.typesOfSchema=void 0;var G7=$r(),kD=lo();function V7(e){if(e.tsType)return new Set(["CUSTOM_TYPE"]);let t=new Set;for(let[n,r]of Object.entries(J7))r(e)&&t.add(n);return t.size||t.add("UNNAMED_SCHEMA"),t}Ll.typesOfSchema=V7;var J7={ALL_OF(e){return"allOf"in e},ANY(e){return Object.keys(e).length===0?!0:e.type==="any"},ANY_OF(e){return"anyOf"in e},BOOLEAN(e){return"enum"in e?!1:e.type==="boolean"||!(0,kD.isCompound)(e)&&typeof e.default=="boolean"},CUSTOM_TYPE(){return!1},NAMED_ENUM(e){return"enum"in e&&"tsEnumNames"in e},NAMED_SCHEMA(e){return"$id"in e&&("patternProperties"in e||"properties"in e)},NEVER(e){return e===!1},NULL(e){return e.type==="null"},NUMBER(e){return"enum"in e?!1:e.type==="integer"||e.type==="number"||!(0,kD.isCompound)(e)&&typeof e.default=="number"},OBJECT(e){return e.type==="object"&&!(0,G7.isPlainObject)(e.additionalProperties)&&!e.allOf&&!e.anyOf&&!e.oneOf&&!e.patternProperties&&!e.properties&&!e.required},ONE_OF(e){return"oneOf"in e},REFERENCE(e){return"$ref"in e},STRING(e){return"enum"in e?!1:e.type==="string"||!(0,kD.isCompound)(e)&&typeof e.default=="string"},TYPED_ARRAY(e){return e.type&&e.type!=="array"?!1:"items"in e},UNION(e){return Array.isArray(e.type)},UNNAMED_ENUM(e){return"tsEnumNames"in e||e.type&&e.type!=="boolean"&&e.type!=="integer"&&e.type!=="number"&&e.type!=="string"?!1:"enum"in e},UNNAMED_SCHEMA(){return!1},UNTYPED_ARRAY(e){return e.type==="array"&&!("items"in e)}}});var qD=N(kl=>{"use strict";d();Object.defineProperty(kl,"__esModule",{value:!0});kl.applySchemaTyping=void 0;var Ul=lo(),K7=Pb();function Y7(e){var t;let n=(0,K7.typesOfSchema)(e);if(Object.defineProperty(e,Ul.Types,{enumerable:!1,value:n,writable:!1}),n.size===1)return;let r={[Ul.Parent]:e,[Ul.Types]:new Set(["ALL_OF"]),$id:e.$id,description:e.description,name:e.name,title:e.title,allOf:(t=e.allOf)!==null&&t!==void 0?t:[],required:[],additionalProperties:!1};n.delete("ALL_OF"),delete e.allOf,delete e.$id,delete e.description,delete e.name,delete e.title,Object.defineProperty(e,Ul.Intersection,{enumerable:!1,value:r,writable:!1})}kl.applySchemaTyping=Y7});var Ob=N(Wl=>{"use strict";d();Object.defineProperty(Wl,"__esModule",{value:!0});Wl.normalize=void 0;var X7=lo(),kr=bi(),Z7=qD(),Q7=ze("util"),tt=new Map;function ql(e,t){return e.type===t||Array.isArray(e.type)&&e.type.includes(t)}function WD(e){return e.properties!==void 0||ql(e,"object")||ql(e,"any")}function Qs(e){return e.items!==void 0||ql(e,"array")||ql(e,"any")}function e9(e){return e.type==="string"&&e.enum!==void 0&&e.tsEnumNames===void 0}tt.set('Remove `type=["null"]` if `enum=[null]`',e=>{Array.isArray(e.enum)&&e.enum.some(t=>t===null)&&Array.isArray(e.type)&&e.type.includes("null")&&(e.type=e.type.filter(t=>t!=="null"))});tt.set("Destructure unary types",e=>{e.type&&Array.isArray(e.type)&&e.type.length===1&&(e.type=e.type[0])});tt.set("Add empty `required` property if none is defined",e=>{WD(e)&&!("required"in e)&&(e.required=[])});tt.set("Transform `required`=false to `required`=[]",e=>{e.required===!1&&(e.required=[])});tt.set("Default additionalProperties",(e,t,n)=>{WD(e)&&!("additionalProperties"in e)&&e.patternProperties===void 0&&(e.additionalProperties=n.additionalProperties)});tt.set("Transform id to $id",(e,t)=>{if((0,kr.isSchemaLike)(e)){if(e.id&&e.$id&&e.id!==e.$id)throw ReferenceError(`Schema must define either id or $id, not both. Given id=${e.id}, $id=${e.$id} in ${t}`);e.id&&(e.$id=e.id,delete e.id)}});tt.set("Add an $id to anything that needs it",(e,t,n,r,o)=>{if(!(0,kr.isSchemaLike)(e))return;if(!e.$id&&!e[X7.Parent]){e.$id=(0,kr.toSafeString)((0,kr.justName)(t));return}if(!Qs(e)&&!WD(e))return;let s=o.get(e);!e.$id&&!e.title&&s&&(e.$id=(0,kr.toSafeString)((0,kr.justName)(s))),s&&o.delete(e)});tt.set("Escape closing JSDoc comment",e=>{(0,kr.escapeBlockComment)(e)});tt.set("Add JSDoc comments for minItems and maxItems",e=>{if(!Qs(e))return;let t=["minItems"in e?`@minItems ${e.minItems}`:"","maxItems"in e?`@maxItems ${e.maxItems}`:""].filter(Boolean);t.length&&(e.description=(0,kr.appendToDescription)(e.description,...t))});tt.set("Optionally remove maxItems and minItems",(e,t,n)=>{Qs(e)&&("minItems"in e&&n.ignoreMinAndMaxItems&&delete e.minItems,"maxItems"in e&&(n.ignoreMinAndMaxItems||n.maxItems===-1)&&delete e.maxItems)});tt.set("Normalize schema.minItems",(e,t,n)=>{if(n.ignoreMinAndMaxItems||!Qs(e))return;let{minItems:r}=e;e.minItems=typeof r=="number"?r:0});tt.set("Remove maxItems if it is big enough to likely cause OOMs",(e,t,n)=>{if(n.ignoreMinAndMaxItems||n.maxItems===-1||!Qs(e))return;let{maxItems:r,minItems:o}=e;r!==void 0&&r-o>n.maxItems&&delete e.maxItems});tt.set("Normalize schema.items",(e,t,n)=>{if(n.ignoreMinAndMaxItems)return;let{maxItems:r,minItems:o}=e,s=typeof r=="number"&&r>=0,a=typeof o=="number"&&o>0;if(e.items&&!Array.isArray(e.items)&&(s||a)){let l=e.items,p=Array(r||o||0).fill(l);s||(e.additionalItems=l),e.items=p}return Array.isArray(e.items)&&s&&r<e.items.length&&(e.items=e.items.slice(0,r)),e});tt.set("Remove extends, if it is empty",e=>{e.hasOwnProperty("extends")&&(e.extends==null||Array.isArray(e.extends)&&e.extends.length===0)&&delete e.extends});tt.set("Make extends always an array, if it is defined",e=>{e.extends!=null&&(Array.isArray(e.extends)||(e.extends=[e.extends]))});tt.set("Transform definitions to $defs",(e,t)=>{if(e.definitions&&e.$defs&&!(0,Q7.isDeepStrictEqual)(e.definitions,e.$defs))throw ReferenceError(`Schema must define either definitions or $defs, not both. Given id=${e.id} in ${t}`);e.definitions&&(e.$defs=e.definitions,delete e.definitions)});tt.set("Transform const to singleton enum",e=>{e.const!==void 0&&(e.enum=[e.const],delete e.const)});tt.set("Add tsEnumNames to enum types",(e,t,n)=>{var r;e9(e)&&n.inferStringEnumKeysFromValues&&(e.tsEnumNames=(r=e.enum)===null||r===void 0?void 0:r.map(String))});tt.set("Pre-calculate schema types and intersections",e=>{e!==null&&typeof e=="object"&&(0,Z7.applySchemaTyping)(e)});function t9(e,t,n,r){return tt.forEach(o=>(0,kr.traverse)(e,(s,a)=>o(s,n,r,a,t))),e}Wl.normalize=t9});var Bb=N(zl=>{"use strict";d();Object.defineProperty(zl,"__esModule",{value:!0});zl.optimize=void 0;var n9=$r(),HD=LD(),Tb=Pl(),Hl=bi();function ea(e,t,n=new Set){if(n.has(e))return e;switch(n.add(e),e.type){case"ARRAY":return Object.assign(e,{params:ea(e.params,t,n)});case"INTERFACE":return Object.assign(e,{params:e.params.map(s=>Object.assign(s,{ast:ea(s.ast,t,n)}))});case"INTERSECTION":case"UNION":let r=Object.assign(e,{params:e.params.map(s=>ea(s,t,n))});if(r.params.some(s=>s.type==="ANY"))return(0,Hl.log)("cyan","optimizer","[A, B, C, Any] -> Any",r),Tb.T_ANY;if(r.params.some(s=>s.type==="UNKNOWN"))return(0,Hl.log)("cyan","optimizer","[A, B, C, Unknown] -> Unknown",r),Tb.T_UNKNOWN;r.params.every(s=>{let a=(0,HD.generateType)(Ib(s),t),l=(0,HD.generateType)(Ib(r.params[0]),t);return a===l})&&r.params.some(s=>s.standaloneName!==void 0)&&((0,Hl.log)("cyan","optimizer","[A (named), A] -> [A (named)]",r),r.params=r.params.filter(s=>s.standaloneName!==void 0));let o=(0,n9.uniqBy)(r.params,s=>(0,HD.generateType)(s,t));return o.length!==r.params.length&&((0,Hl.log)("cyan","optimizer","[A, B, B] -> [A, B]",r),r.params=o),Object.assign(r,{params:r.params.map(s=>ea(s,t,n))});default:return e}}zl.optimize=ea;function Ib(e){return e.type==="ENUM"?e:Object.assign(Object.assign({},e),{standaloneName:void 0})}});var Nb=N(Vl=>{"use strict";d();Object.defineProperty(Vl,"__esModule",{value:!0});Vl.parse=void 0;var gr=$r(),r9=ze("util"),i9=qD(),Ai=Pl(),ta=lo(),Gl=bi();function on(e,t,n,r=new Map,o=new Set){if((0,ta.isPrimitive)(e))return(0,ta.isBoolean)(e)?o9(e,n,t):GD(e,n);let s=e[ta.Intersection],a=e[ta.Types];if(s){let l=zD(s,"ALL_OF",t,n,r,o);return a.forEach(p=>{l.params.push(zD(e,p,t,n,r,o))}),(0,Gl.log)("blue","parser","Types:",[...a],"Input:",e,"Output:",l),l}if(a.size===1){let l=[...a][0],p=zD(e,l,t,n,r,o);return(0,Gl.log)("blue","parser","Type:",l,"Input:",e,"Output:",p),p}throw new ReferenceError("Expected intersection schema. Please file an issue on GitHub.")}Vl.parse=on;function zD(e,t,n,r,o=new Map,s=new Set){let a=o.get(e);a||(a=new Map,o.set(e,a));let l=a.get(t);if(l)return l;let p={};return a.set(t,p),Object.assign(p,u9(e,t,n,r,o,s))}function o9(e,t,n){return e?{keyName:t,type:n.unknownAny?"UNKNOWN":"ANY"}:{keyName:t,type:"NEVER"}}function GD(e,t){return{keyName:t,params:e,type:"LITERAL"}}function u9(e,t,n,r,o,s){let a=c9((0,ta.getRootSchema)(e)),l=(0,gr.findKey)(a,p=>p===e);switch(t){case"ALL_OF":return{comment:e.description,deprecated:e.deprecated,keyName:r,standaloneName:ut(e,l,s,n),params:e.allOf.map(E=>on(E,n,void 0,o,s)),type:"INTERSECTION"};case"ANY":return Object.assign(Object.assign({},n.unknownAny?Ai.T_UNKNOWN:Ai.T_ANY),{comment:e.description,deprecated:e.deprecated,keyName:r,standaloneName:ut(e,l,s,n)});case"ANY_OF":return{comment:e.description,deprecated:e.deprecated,keyName:r,standaloneName:ut(e,l,s,n),params:e.anyOf.map(E=>on(E,n,void 0,o,s)),type:"UNION"};case"BOOLEAN":return{comment:e.description,deprecated:e.deprecated,keyName:r,standaloneName:ut(e,l,s,n),type:"BOOLEAN"};case"CUSTOM_TYPE":return{comment:e.description,deprecated:e.deprecated,keyName:r,params:e.tsType,standaloneName:ut(e,l,s,n),type:"CUSTOM_TYPE"};case"NAMED_ENUM":return{comment:e.description,deprecated:e.deprecated,keyName:r,standaloneName:ut(e,l??r,s,n),params:e.enum.map((E,w)=>({ast:GD(E,void 0),keyName:e.tsEnumNames[w]})),type:"ENUM"};case"NAMED_SCHEMA":return Rb(e,n,o,s,r);case"NEVER":return{comment:e.description,deprecated:e.deprecated,keyName:r,standaloneName:ut(e,l,s,n),type:"NEVER"};case"NULL":return{comment:e.description,deprecated:e.deprecated,keyName:r,standaloneName:ut(e,l,s,n),type:"NULL"};case"NUMBER":return{comment:e.description,deprecated:e.deprecated,keyName:r,standaloneName:ut(e,l,s,n),type:"NUMBER"};case"OBJECT":return{comment:e.description,keyName:r,standaloneName:ut(e,l,s,n),type:"OBJECT",deprecated:e.deprecated};case"ONE_OF":return{comment:e.description,deprecated:e.deprecated,keyName:r,standaloneName:ut(e,l,s,n),params:e.oneOf.map(E=>on(E,n,void 0,o,s)),type:"UNION"};case"REFERENCE":throw Error((0,r9.format)("Refs should have been resolved by the resolver!",e));case"STRING":return{comment:e.description,deprecated:e.deprecated,keyName:r,standaloneName:ut(e,l,s,n),type:"STRING"};case"TYPED_ARRAY":if(Array.isArray(e.items)){let E=e.minItems,w=e.maxItems,v={comment:e.description,deprecated:e.deprecated,keyName:r,maxItems:w,minItems:E,standaloneName:ut(e,l,s,n),params:e.items.map(S=>on(S,n,void 0,o,s)),type:"TUPLE"};return e.additionalItems===!0?v.spreadParam=n.unknownAny?Ai.T_UNKNOWN:Ai.T_ANY:e.additionalItems&&(v.spreadParam=on(e.additionalItems,n,void 0,o,s)),v}else return{comment:e.description,deprecated:e.deprecated,keyName:r,standaloneName:ut(e,l,s,n),params:on(e.items,n,"{keyNameFromDefinition}Items",o,s),type:"ARRAY"};case"UNION":return{comment:e.description,deprecated:e.deprecated,keyName:r,standaloneName:ut(e,l,s,n),params:e.type.map(E=>{let w=Object.assign(Object.assign({},(0,gr.omit)(e,"$id","description","title")),{type:E});return(0,Gl.maybeStripDefault)(w),(0,i9.applySchemaTyping)(w),on(w,n,void 0,o,s)}),type:"UNION"};case"UNNAMED_ENUM":return{comment:e.description,deprecated:e.deprecated,keyName:r,standaloneName:ut(e,l,s,n),params:e.enum.map(E=>GD(E,void 0)),type:"UNION"};case"UNNAMED_SCHEMA":return Rb(e,n,o,s,r,l);case"UNTYPED_ARRAY":let p=e.minItems,D=typeof e.maxItems=="number"?e.maxItems:-1,g=n.unknownAny?Ai.T_UNKNOWN:Ai.T_ANY;return p>0||D>=0?{comment:e.description,deprecated:e.deprecated,keyName:r,maxItems:e.maxItems,minItems:p,params:Array(Math.max(D,p)||0).fill(g),spreadParam:D>=0?void 0:g,standaloneName:ut(e,l,s,n),type:"TUPLE"}:{comment:e.description,deprecated:e.deprecated,keyName:r,params:g,standaloneName:ut(e,l,s,n),type:"ARRAY"}}}function ut(e,t,n,r){var o;let s=((o=r.customName)===null||o===void 0?void 0:o.call(r,e,t))||e.title||e.$id||t;if(s)return(0,Gl.generateName)(s,n)}function Rb(e,t,n,r,o,s){let a=ut(e,s,r,t);return{comment:e.description,deprecated:e.deprecated,keyName:o,params:a9(e,t,n,r,a),standaloneName:a,superTypes:s9(e,t,n,r),type:"INTERFACE"}}function s9(e,t,n,r){let o=e.extends;return o?o.map(s=>on(s,t,void 0,n,r)):[]}function a9(e,t,n,r,o){let s=(0,gr.map)(e.properties,(l,p)=>({ast:on(l,t,p,n,r),isPatternProperty:!1,isRequired:(0,gr.includes)(e.required||[],p),isUnreachableDefinition:!1,keyName:p})),a=!1;switch(e.patternProperties&&(a=!e.additionalProperties&&Object.keys(e.patternProperties).length===1,s=s.concat((0,gr.map)(e.patternProperties,(l,p)=>{let D=on(l,t,p,n,r),g=`This interface was referenced by \`${o}\`'s JSON-Schema definition
|
|
99
|
+
via the \`patternProperty\` "${p.replace("*/","*\\/")}".`;return D.comment=D.comment?`${D.comment}
|
|
100
|
+
|
|
101
|
+
${g}`:g,{ast:D,isPatternProperty:!a,isRequired:a||(0,gr.includes)(e.required||[],p),isUnreachableDefinition:!1,keyName:a?"[k: string]":p}}))),t.unreachableDefinitions&&(s=s.concat((0,gr.map)(e.$defs,(l,p)=>{let D=on(l,t,p,n,r),g=`This interface was referenced by \`${o}\`'s JSON-Schema
|
|
102
|
+
via the \`definition\` "${p}".`;return D.comment=D.comment?`${D.comment}
|
|
103
|
+
|
|
104
|
+
${g}`:g,{ast:D,isPatternProperty:!1,isRequired:(0,gr.includes)(e.required||[],p),isUnreachableDefinition:!0,keyName:p}}))),e.additionalProperties){case void 0:case!0:return a?s:s.concat({ast:t.unknownAny?Ai.T_UNKNOWN_ADDITIONAL_PROPERTIES:Ai.T_ANY_ADDITIONAL_PROPERTIES,isPatternProperty:!1,isRequired:!0,isUnreachableDefinition:!1,keyName:"[k: string]"});case!1:return s;default:return s.concat({ast:on(e.additionalProperties,t,"[k: string]",n,r),isPatternProperty:!1,isRequired:!0,isUnreachableDefinition:!1,keyName:"[k: string]"})}}function VD(e,t=!0,n=new Set){return n.has(e)?{}:(n.add(e),Array.isArray(e)?e.reduce((r,o)=>Object.assign(Object.assign({},r),VD(o,!1,n)),{}):(0,gr.isPlainObject)(e)?Object.assign(Object.assign({},t&&l9(e)?e.$defs:{}),Object.keys(e).reduce((r,o)=>Object.assign(Object.assign({},r),VD(e[o],!1,n)),{})):{})}var c9=(0,gr.memoize)(VD);function l9(e){return"$defs"in e}});var Jl=N(Fu=>{"use strict";d();Object.defineProperty(Fu,"__esModule",{value:!0});Fu.getDeepKeys=Fu.toJSON=void 0;var f9=["function","symbol","undefined"],p9=["constructor","prototype","__proto__"],d9=Object.getPrototypeOf({});function h9(){let e={},t=this;for(let n of Mb(t))if(typeof n=="string"){let r=t[n],o=typeof r;f9.includes(o)||(e[n]=r)}return e}Fu.toJSON=h9;function Mb(e,t=[]){let n=[];for(;e&&e!==d9;)n=n.concat(Object.getOwnPropertyNames(e),Object.getOwnPropertySymbols(e)),e=Object.getPrototypeOf(e);let r=new Set(n);for(let o of t.concat(p9))r.delete(o);return r}Fu.getDeepKeys=Mb});var JD=N(Eu=>{"use strict";d();Object.defineProperty(Eu,"__esModule",{value:!0});Eu.addInspectMethod=Eu.format=void 0;var jb=ze("util"),D9=Jl(),$b=jb.inspect.custom||Symbol.for("nodejs.util.inspect.custom");Eu.format=jb.format;function m9(e){e[$b]=g9}Eu.addInspectMethod=m9;function g9(){let e={},t=this;for(let n of D9.getDeepKeys(t)){let r=t[n];e[n]=r}return delete e[$b],e}});var kb=N(_r=>{"use strict";d();Object.defineProperty(_r,"__esModule",{value:!0});_r.lazyJoinStacks=_r.joinStacks=_r.isWritableStack=_r.isLazyStack=void 0;var _9=/\r?\n/,y9=/\bono[ @]/;function F9(e){return!!(e&&e.configurable&&typeof e.get=="function")}_r.isLazyStack=F9;function E9(e){return!!(!e||e.writable||typeof e.set=="function")}_r.isWritableStack=E9;function Lb(e,t){let n=Ub(e.stack),r=t?t.stack:void 0;return n&&r?n+`
|
|
105
|
+
|
|
106
|
+
`+r:n||r}_r.joinStacks=Lb;function v9(e,t,n){n?Object.defineProperty(t,"stack",{get:()=>{let r=e.get.apply(t);return Lb({stack:r},n)},enumerable:!1,configurable:!0}):C9(t,e)}_r.lazyJoinStacks=v9;function Ub(e){if(e){let t=e.split(_9),n;for(let r=0;r<t.length;r++){let o=t[r];if(y9.test(o))n===void 0&&(n=r);else if(n!==void 0){t.splice(n,r-n);break}}if(t.length>0)return t.join(`
|
|
107
|
+
`)}return e}function C9(e,t){Object.defineProperty(e,"stack",{get:()=>Ub(t.get.apply(e)),enumerable:!1,configurable:!0})}});var Hb=N(Yl=>{"use strict";d();Object.defineProperty(Yl,"__esModule",{value:!0});Yl.extendError=void 0;var qb=JD(),Kl=kb(),Wb=Jl(),w9=["name","message","stack"];function b9(e,t,n){let r=e;return A9(r,t),t&&typeof t=="object"&&S9(r,t),r.toJSON=Wb.toJSON,qb.addInspectMethod&&qb.addInspectMethod(r),n&&typeof n=="object"&&Object.assign(r,n),r}Yl.extendError=b9;function A9(e,t){let n=Object.getOwnPropertyDescriptor(e,"stack");Kl.isLazyStack(n)?Kl.lazyJoinStacks(n,e,t):Kl.isWritableStack(n)&&(e.stack=Kl.joinStacks(e,t))}function S9(e,t){let n=Wb.getDeepKeys(t,w9),r=e,o=t;for(let s of n)if(r[s]===void 0)try{r[s]=o[s]}catch{}}});var zb=N(vu=>{"use strict";d();Object.defineProperty(vu,"__esModule",{value:!0});vu.normalizeArgs=vu.normalizeOptions=void 0;var x9=JD();function P9(e){return e=e||{},{concatMessages:e.concatMessages===void 0?!0:!!e.concatMessages,format:e.format===void 0?x9.format:typeof e.format=="function"?e.format:!1}}vu.normalizeOptions=P9;function O9(e,t){let n,r,o,s="";return typeof e[0]=="string"?o=e:typeof e[1]=="string"?(e[0]instanceof Error?n=e[0]:r=e[0],o=e.slice(1)):(n=e[0],r=e[1],o=e.slice(2)),o.length>0&&(t.format?s=t.format.apply(void 0,o):s=o.join(" ")),t.concatMessages&&n&&n.message&&(s+=(s?`
|
|
108
|
+
`:"")+n.message),{originalError:n,props:r,message:s}}vu.normalizeArgs=O9});var YD=N(Zl=>{"use strict";d();Object.defineProperty(Zl,"__esModule",{value:!0});Zl.Ono=void 0;var Xl=Hb(),Gb=zb(),T9=Jl(),I9=KD;Zl.Ono=I9;function KD(e,t){t=Gb.normalizeOptions(t);function n(...r){let{originalError:o,props:s,message:a}=Gb.normalizeArgs(r,t),l=new e(a);return Xl.extendError(l,o,s)}return n[Symbol.species]=e,n}KD.toJSON=function(t){return T9.toJSON.call(t)};KD.extend=function(t,n,r){return r||n instanceof Error?Xl.extendError(t,n,r):n?Xl.extendError(t,void 0,n):Xl.extendError(t)}});var Vb=N(Ql=>{"use strict";d();Object.defineProperty(Ql,"__esModule",{value:!0});Ql.ono=void 0;var go=YD(),B9=yr;Ql.ono=B9;yr.error=new go.Ono(Error);yr.eval=new go.Ono(EvalError);yr.range=new go.Ono(RangeError);yr.reference=new go.Ono(ReferenceError);yr.syntax=new go.Ono(SyntaxError);yr.type=new go.Ono(TypeError);yr.uri=new go.Ono(URIError);var R9=yr;function yr(...e){let t=e[0];if(typeof t=="object"&&typeof t.name=="string"){for(let n of Object.values(R9))if(typeof n=="function"&&n.name==="ono"){let r=n[Symbol.species];if(r&&r!==Error&&(t instanceof r||t.name===r.name))return n.apply(void 0,e)}}return yr.error.apply(void 0,e)}});var Kb=N(Jb=>{"use strict";d();Object.defineProperty(Jb,"__esModule",{value:!0});var zie=ze("util")});var Mt=N((Un,Cu)=>{"use strict";d();var N9=Un&&Un.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),M9=Un&&Un.__exportStar||function(e,t){for(var n in e)n!=="default"&&!t.hasOwnProperty(n)&&N9(t,e,n)};Object.defineProperty(Un,"__esModule",{value:!0});Un.ono=void 0;var Yb=Vb();Object.defineProperty(Un,"ono",{enumerable:!0,get:function(){return Yb.ono}});var j9=YD();Object.defineProperty(Un,"Ono",{enumerable:!0,get:function(){return j9.Ono}});M9(Kb(),Un);Un.default=Yb.ono;typeof Cu=="object"&&typeof Cu.exports=="object"&&(Cu.exports=Object.assign(Cu.exports.default,Cu.exports))});var XD=N(na=>{"use strict";d();var $9=na&&na.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(na,"__esModule",{value:!0});na.default=L9;var Xb=$9(ze("path"));function L9(e){return e.startsWith("\\\\?\\")?e:e.split(Xb.default?.win32?.sep).join(Xb.default?.posix?.sep??"/")}});var Zb=N(ef=>{"use strict";d();Object.defineProperty(ef,"__esModule",{value:!0});ef.isWindows=void 0;var U9=/^win/.test(globalThis.process?globalThis.process.platform:""),k9=()=>U9;ef.isWindows=k9});var vn=N(Le=>{"use strict";d();var q9=Le&&Le.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),W9=Le&&Le.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),H9=Le&&Le.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o<r.length;o++)r[o]!=="default"&&q9(n,t,r[o]);return W9(n,t),n}})(),z9=Le&&Le.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Le,"__esModule",{value:!0});Le.parse=void 0;Le.resolve=Qb;Le.cwd=e2;Le.getProtocol=nm;Le.getExtension=Q9;Le.stripQuery=t2;Le.getHash=n2;Le.stripHash=em;Le.isHttp=eL;Le.isFileSystemPath=tm;Le.fromFileSystemPath=tL;Le.toFileSystemPath=nL;Le.safePointerToPath=rL;Le.relative=iL;var nf=z9(XD()),QD=H9(ze("path")),G9=/\//g,V9=/^(\w{2,}):\/\//i,J9=/~1/g,K9=/~0/g,Y9=ze("path"),tf=Zb(),X9=[[/\?/g,"%3F"],[/#/g,"%23"]],ZD=[/%23/g,"#",/%24/g,"$",/%26/g,"&",/%2C/g,",",/%40/g,"@"],Z9=e=>new URL(e);Le.parse=Z9;function Qb(e,t){let n=new URL((0,nf.default)(e),"resolve://"),r=new URL((0,nf.default)(t),n),o=t.match(/(\s*)$/)?.[1]||"";if(r.protocol==="resolve:"){let{pathname:s,search:a,hash:l}=r;return s+a+l+o}return r.toString()+o}function e2(){if(typeof window<"u")return location.href;let e=process.cwd(),t=e.slice(-1);return t==="/"||t==="\\"?e:e+"/"}function nm(e){let t=V9.exec(e||"");if(t)return t[1].toLowerCase()}function Q9(e){let t=e.lastIndexOf(".");return t>=0?t2(e.substr(t).toLowerCase()):""}function t2(e){let t=e.indexOf("?");return t>=0&&(e=e.substr(0,t)),e}function n2(e){if(!e)return"#";let t=e.indexOf("#");return t>=0?e.substring(t):"#"}function em(e){if(!e)return"";let t=e.indexOf("#");return t>=0&&(e=e.substring(0,t)),e}function eL(e){let t=nm(e);return t==="http"||t==="https"?!0:t===void 0?typeof window<"u":!1}function tm(e){if(typeof window<"u"||typeof process<"u"&&process.browser)return!1;let t=nm(e);return t===void 0||t==="file"}function tL(e){if((0,tf.isWindows)()){let t=e2(),n=e.toUpperCase(),o=(0,nf.default)(t).toUpperCase(),s=n.includes(o),a=n.includes(o),l=QD.win32?.isAbsolute(e)||e.startsWith("http://")||e.startsWith("https://")||e.startsWith("file://");!(s||a||l)&&!t.startsWith("http")&&(e=(0,Y9.join)(t,e)),e=(0,nf.default)(e)}e=encodeURI(e);for(let t of X9)e=e.replace(t[0],t[1]);return e}function nL(e,t){e=decodeURI(e);for(let r=0;r<ZD.length;r+=2)e=e.replace(ZD[r],ZD[r+1]);let n=e.substr(0,7).toLowerCase()==="file://";return n&&(e=e[7]==="/"?e.substr(8):e.substr(7),(0,tf.isWindows)()&&e[1]==="/"&&(e=e[0]+":"+e.substr(1)),t?e="file:///"+e:(n=!1,e=(0,tf.isWindows)()?e:"/"+e)),(0,tf.isWindows)()&&!n&&(e=e.replace(G9,"\\"),e.substr(1,2)===":\\"&&(e=e[0].toUpperCase()+e.substr(1))),e}function rL(e){return e.length<=1||e[0]!=="#"||e[1]!=="/"?[]:e.slice(2).split("/").map(t=>decodeURIComponent(t).replace(J9,"/").replace(K9,"~"))}function iL(e,t){if(!tm(e)||!tm(t))return Qb(e,t);let n=QD.default.dirname(em(e)),r=em(t);return QD.default.relative(n,r)+n2(t)}});var Cn=N(Ke=>{"use strict";d();Object.defineProperty(Ke,"__esModule",{value:!0});Ke.InvalidPointerError=Ke.TimeoutError=Ke.MissingPointerError=Ke.UnmatchedResolverError=Ke.ResolverError=Ke.UnmatchedParserError=Ke.ParserError=Ke.JSONParserErrorGroup=Ke.JSONParserError=void 0;Ke.isHandledError=oL;Ke.normalizeError=uL;var r2=Mt(),rf=vn(),kn=class extends Error{constructor(t,n){super(),this.code="EUNKNOWN",this.name="JSONParserError",this.message=t,this.source=n,this.path=null,r2.Ono.extend(this)}get footprint(){return`${this.path}+${this.source}+${this.code}+${this.message}`}};Ke.JSONParserError=kn;var of=class e extends Error{constructor(t){super(),this.files=t,this.name="JSONParserErrorGroup",this.message=`${this.errors.length} error${this.errors.length>1?"s":""} occurred while reading '${(0,rf.toFileSystemPath)(t.$refs._root$Ref.path)}'`,r2.Ono.extend(this)}static getParserErrors(t){let n=[];for(let r of Object.values(t.$refs._$refs))r.errors&&n.push(...r.errors);return n}get errors(){return e.getParserErrors(this.files)}};Ke.JSONParserErrorGroup=of;var rm=class extends kn{constructor(t,n){super(`Error parsing ${n}: ${t}`,n),this.code="EPARSER",this.name="ParserError"}};Ke.ParserError=rm;var im=class extends kn{constructor(t){super(`Could not find parser for "${t}"`,t),this.code="EUNMATCHEDPARSER",this.name="UnmatchedParserError"}};Ke.UnmatchedParserError=im;var om=class extends kn{constructor(t,n){super(t.message||`Error reading file "${n}"`,n),this.code="ERESOLVER",this.name="ResolverError","code"in t&&(this.ioErrorCode=String(t.code))}};Ke.ResolverError=om;var um=class extends kn{constructor(t){super(`Could not find resolver for "${t}"`,t),this.code="EUNMATCHEDRESOLVER",this.name="UnmatchedResolverError"}};Ke.UnmatchedResolverError=um;var sm=class extends kn{constructor(t,n){super(`Missing $ref pointer "${(0,rf.getHash)(n)}". Token "${t}" does not exist.`,(0,rf.stripHash)(n)),this.code="EMISSINGPOINTER",this.name="MissingPointerError"}};Ke.MissingPointerError=sm;var am=class extends kn{constructor(t){super(`Dereferencing timeout reached: ${t}ms`),this.code="ETIMEOUT",this.name="TimeoutError"}};Ke.TimeoutError=am;var cm=class extends kn{constructor(t,n){super(`Invalid $ref pointer "${t}". Pointers must begin with "#/"`,(0,rf.stripHash)(n)),this.code="EUNMATCHEDRESOLVER",this.name="InvalidPointerError"}};Ke.InvalidPointerError=cm;function oL(e){return e instanceof kn||e instanceof of}function uL(e){return e.path===null&&(e.path=[]),e}});var ra=N(qn=>{"use strict";d();var sL=qn&&qn.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),aL=qn&&qn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),cL=qn&&qn.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o<r.length;o++)r[o]!=="default"&&sL(n,t,r[o]);return aL(n,t),n}})(),lL=qn&&qn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(qn,"__esModule",{value:!0});var lm=lL(wu()),fm=cL(vn()),sf=Cn(),fL=/\//g,pL=/~/g,dL=/~1/g,hL=/~0/g,DL=e=>{try{return decodeURIComponent(e)}catch{return e}},af=class e{constructor(t,n,r){this.$ref=t,this.path=n,this.originalPath=r||n,this.value=void 0,this.circular=!1,this.indirections=0}resolve(t,n,r){let o=e.parse(this.path,this.originalPath);this.value=o2(t);for(let s=0;s<o.length;s++){if(uf(this,n,r)&&(this.path=e.join(this.path,o.slice(s))),typeof this.value=="object"&&this.value!==null&&!u2(r)&&"$ref"in this.value)return this;let a=o[s];if(this.value[a]===void 0||this.value[a]===null&&s===o.length-1){let l=!1;for(let p=o.length-1;p>s;p--){let D=o.slice(s,p+1).join("/");if(this.value[D]!==void 0){this.value=this.value[D],s=p,l=!0;break}}if(l)continue;throw this.value=null,new sf.MissingPointerError(a,decodeURI(this.originalPath))}else this.value=this.value[a]}return(!this.value||this.value.$ref&&fm.resolve(this.path,this.value.$ref)!==r)&&uf(this,n,r),this}set(t,n,r){let o=e.parse(this.path),s;if(o.length===0)return this.value=n,n;this.value=o2(t);for(let a=0;a<o.length-1;a++)uf(this,r),s=o[a],this.value&&this.value[s]!==void 0?this.value=this.value[s]:this.value=i2(this,s,{});return uf(this,r),s=o[o.length-1],i2(this,s,n),t}static parse(t,n){let r=fm.getHash(t).substring(1);if(!r)return[];let o=r.split("/");for(let s=0;s<o.length;s++)o[s]=DL(o[s].replace(dL,"/").replace(hL,"~"));if(o[0]!=="")throw new sf.InvalidPointerError(r,n===void 0?t:n);return o.slice(1)}static join(t,n){t.indexOf("#")===-1&&(t+="#"),n=Array.isArray(n)?n:[n];for(let r=0;r<n.length;r++){let o=n[r];t+="/"+encodeURIComponent(o.replace(pL,"~0").replace(fL,"~1"))}return t}};function uf(e,t,n){if(lm.default.isAllowed$Ref(e.value,t)){let r=fm.resolve(e.path,e.value.$ref);if(r===e.path&&!u2(n))e.circular=!0;else{let o=e.$ref.$refs._resolve(r,e.path,t);return o===null?!1:(e.indirections+=o.indirections+1,lm.default.isExtended$Ref(e.value)?(e.value=lm.default.dereference(e.value,o.value),!1):(e.$ref=o.$ref,e.path=o.path,e.value=o.value,!0))}}}qn.default=af;function i2(e,t,n){if(e.value&&typeof e.value=="object")t==="-"&&Array.isArray(e.value)?e.value.push(n):e.value[t]=n;else throw new sf.JSONParserError(`Error assigning $ref pointer "${e.path}".
|
|
109
|
+
Cannot set "${t}" of a non-object.`);return n}function o2(e){if((0,sf.isHandledError)(e))throw e;return e}function u2(e){return typeof e=="string"&&af.parse(e).length==0}});var wu=N(ia=>{"use strict";d();var mL=ia&&ia.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ia,"__esModule",{value:!0});var s2=mL(ra()),cf=Cn(),pm=vn(),dm=class e{constructor(t){this.errors=[],this.$refs=t}addError(t){this.errors===void 0&&(this.errors=[]);let n=this.errors.map(({footprint:r})=>r);"errors"in t&&Array.isArray(t.errors)?this.errors.push(...t.errors.map(cf.normalizeError).filter(({footprint:r})=>!n.includes(r))):(!("footprint"in t)||!n.includes(t.footprint))&&this.errors.push((0,cf.normalizeError)(t))}exists(t,n){try{return this.resolve(t,n),!0}catch{return!1}}get(t,n){return this.resolve(t,n)?.value}resolve(t,n,r,o){let s=new s2.default(this,t,r);try{return s.resolve(this.value,n,o)}catch(a){if(!n||!n.continueOnError||!(0,cf.isHandledError)(a))throw a;return a.path===null&&(a.path=(0,pm.safePointerToPath)((0,pm.getHash)(o))),a instanceof cf.InvalidPointerError&&(a.source=decodeURI((0,pm.stripHash)(o))),this.addError(a),null}}set(t,n){let r=new s2.default(this,t);this.value=r.set(this.value,n)}static is$Ref(t){return!!t&&typeof t=="object"&&t!==null&&"$ref"in t&&typeof t.$ref=="string"&&t.$ref.length>0}static isExternal$Ref(t){return e.is$Ref(t)&&t.$ref[0]!=="#"}static isAllowed$Ref(t,n){if(this.is$Ref(t)){if(t.$ref.substring(0,2)==="#/"||t.$ref==="#")return!0;if(t.$ref[0]!=="#"&&(!n||n.resolve?.external))return!0}}static isExtended$Ref(t){return e.is$Ref(t)&&Object.keys(t).length>1}static dereference(t,n){if(n&&typeof n=="object"&&e.isExtended$Ref(t)){let r={};for(let o of Object.keys(t))o!=="$ref"&&(r[o]=t[o]);for(let o of Object.keys(n))o in r||(r[o]=n[o]);return r}else return n}};ia.default=dm});var p2=N(Wn=>{"use strict";d();var gL=Wn&&Wn.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),_L=Wn&&Wn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),yL=Wn&&Wn.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o<r.length;o++)r[o]!=="default"&&gL(n,t,r[o]);return _L(n,t),n}})(),f2=Wn&&Wn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Wn,"__esModule",{value:!0});var a2=Mt(),FL=f2(wu()),Si=yL(vn()),c2=f2(XD()),hm=class{paths(...t){return l2(this._$refs,t.flat()).map(r=>(0,c2.default)(r.decoded))}values(...t){let n=this._$refs;return l2(n,t.flat()).reduce((o,s)=>(o[(0,c2.default)(s.decoded)]=n[s.encoded].value,o),{})}exists(t,n){try{return this._resolve(t,"",n),!0}catch{return!1}}get(t,n){return this._resolve(t,"",n).value}set(t,n){let r=Si.resolve(this._root$Ref.path,t),o=Si.stripHash(r),s=this._$refs[o];if(!s)throw(0,a2.ono)(`Error resolving $ref pointer "${t}".
|
|
110
|
+
"${o}" not found.`);s.set(r,n)}_get$Ref(t){t=Si.resolve(this._root$Ref.path,t);let n=Si.stripHash(t);return this._$refs[n]}_add(t){let n=Si.stripHash(t),r=new FL.default(this);return r.path=n,this._$refs[n]=r,this._root$Ref=this._root$Ref||r,r}_resolve(t,n,r){let o=Si.resolve(this._root$Ref.path,t),s=Si.stripHash(o),a=this._$refs[s];if(!a)throw(0,a2.ono)(`Error resolving $ref pointer "${t}".
|
|
111
|
+
"${s}" not found.`);return a.resolve(o,r,t,n)}constructor(){this._$refs={},this.toJSON=this.values,this.circular=!1,this._$refs={},this._root$Ref=null}};Wn.default=hm;function l2(e,t){let n=Object.keys(e);return t=Array.isArray(t[0])?t[0]:Array.prototype.slice.call(t),t.length>0&&t[0]&&(n=n.filter(r=>t.includes(e[r].pathType))),n.map(r=>({encoded:r,decoded:e[r].pathType==="file"?Si.toFileSystemPath(r,!0):r}))}});var h2=N(bu=>{"use strict";d();Object.defineProperty(bu,"__esModule",{value:!0});bu.all=EL;bu.filter=vL;bu.sort=CL;bu.run=wL;function EL(e){return Object.keys(e||{}).filter(t=>typeof e[t]=="object").map(t=>(e[t].name=t,e[t]))}function vL(e,t,n){return e.filter(r=>!!d2(r,t,n))}function CL(e){for(let t of e)t.order=t.order||Number.MAX_SAFE_INTEGER;return e.sort((t,n)=>t.order-n.order)}async function wL(e,t,n,r){let o,s,a=0;return new Promise((l,p)=>{D();function D(){if(o=e[a++],!o)return p(s);try{let v=d2(o,t,n,g,r);if(v&&typeof v.then=="function")v.then(E,w);else if(v!==void 0)E(v);else if(a===e.length)throw new Error("No promise has been returned or callback has been called.")}catch(v){w(v)}}function g(v,S){v?w(v):E(S)}function E(v){l({plugin:o,result:v})}function w(v){s={plugin:o,error:v},D()}})}function d2(e,t,n,r,o){let s=e[t];if(typeof s=="function")return s.apply(e,[n,r,o]);if(!r){if(s instanceof RegExp)return s.test(n.url);if(typeof s=="string")return s===n.extension;if(Array.isArray(s))return s.indexOf(n.extension)!==-1}return s}});var mm=N(qr=>{"use strict";d();var bL=qr&&qr.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),AL=qr&&qr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),D2=qr&&qr.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o<r.length;o++)r[o]!=="default"&&bL(n,t,r[o]);return AL(n,t),n}})();Object.defineProperty(qr,"__esModule",{value:!0});var Dm=Mt(),SL=D2(vn()),xi=D2(h2()),_o=Cn();async function xL(e,t,n){let r=e.indexOf("#"),o="";r>=0&&(o=e.substring(r),e=e.substring(0,r));let s=t._add(e),a={url:e,hash:o,extension:SL.getExtension(e)};try{let l=await PL(a,n,t);s.pathType=l.plugin.name,a.data=l.result;let p=await OL(a,n,t);return s.value=p.result,p.result}catch(l){throw(0,_o.isHandledError)(l)&&(s.value=l),l}}async function PL(e,t,n){let r=xi.all(t.resolve);r=xi.filter(r,"canRead",e),xi.sort(r);try{return await xi.run(r,"read",e,n)}catch(o){throw!o&&t.continueOnError?new _o.UnmatchedResolverError(e.url):!o||!("error"in o)?Dm.ono.syntax(`Unable to resolve $ref pointer "${e.url}"`):o.error instanceof _o.ResolverError?o.error:new _o.ResolverError(o,e.url)}}async function OL(e,t,n){let r=xi.all(t.parse),o=xi.filter(r,"canParse",e),s=o.length>0?o:r;xi.sort(s);try{let a=await xi.run(s,"parse",e,n);if(!a.plugin.allowEmpty&&TL(a.result))throw Dm.ono.syntax(`Error parsing "${e.url}" as ${a.plugin.name}.
|
|
112
|
+
Parsed value is empty`);return a}catch(a){throw!a&&t.continueOnError?new _o.UnmatchedParserError(e.url):a&&a.message&&a.message.startsWith("Error parsing")?a:!a||!("error"in a)?Dm.ono.syntax(`Unable to parse ${e.url}`):a.error instanceof _o.ParserError?a.error:new _o.ParserError(a.error.message,e.url)}}function TL(e){return e===void 0||typeof e=="object"&&Object.keys(e).length===0||typeof e=="string"&&e.trim().length===0||Buffer.isBuffer(e)&&e.length===0}qr.default=xL});var g2=N(gm=>{"use strict";d();Object.defineProperty(gm,"__esModule",{value:!0});var m2=Cn();gm.default={order:100,allowEmpty:!0,canParse:".json",allowBOM:!0,async parse(e){let t=e.data;if(Buffer.isBuffer(t)&&(t=t.toString()),typeof t=="string"){if(t.trim().length===0)return;try{return JSON.parse(t)}catch(n){if(this.allowBOM)try{let r=t.indexOf("{");return t=t.slice(r),JSON.parse(t)}catch(r){throw new m2.ParserError(r.message,e.url)}throw new m2.ParserError(n.message,e.url)}}else return t}}});var _2=N(oa=>{"use strict";d();var IL=oa&&oa.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(oa,"__esModule",{value:!0});var BL=Cn(),RL=IL(Du()),NL=Du();oa.default={order:200,allowEmpty:!0,canParse:[".yaml",".yml",".json"],async parse(e){let t=e.data;if(Buffer.isBuffer(t)&&(t=t.toString()),typeof t=="string")try{return RL.default.load(t,{schema:NL.JSON_SCHEMA})}catch(n){throw new BL.ParserError(n?.message||"Parser Error",e.url)}else return t}}});var y2=N(_m=>{"use strict";d();Object.defineProperty(_m,"__esModule",{value:!0});var ML=Cn(),jL=/\.(txt|htm|html|md|xml|js|min|map|css|scss|less|svg)$/i;_m.default={order:300,allowEmpty:!0,encoding:"utf8",canParse(e){return(typeof e.data=="string"||Buffer.isBuffer(e.data))&&jL.test(e.url)},parse(e){if(typeof e.data=="string")return e.data;if(Buffer.isBuffer(e.data))return e.data.toString(this.encoding);throw new ML.ParserError("data is not text",e.url)}}});var F2=N(ym=>{"use strict";d();Object.defineProperty(ym,"__esModule",{value:!0});var $L=/\.(jpeg|jpg|gif|png|bmp|ico)$/i;ym.default={order:400,allowEmpty:!0,canParse(e){return Buffer.isBuffer(e.data)&&$L.test(e.url)},parse(e){return Buffer.isBuffer(e.data)?e.data:Buffer.from(e.data)}}});var w2=N(Hn=>{"use strict";d();var LL=Hn&&Hn.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),UL=Hn&&Hn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),kL=Hn&&Hn.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o<r.length;o++)r[o]!=="default"&&LL(n,t,r[o]);return UL(n,t),n}})(),qL=Hn&&Hn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Hn,"__esModule",{value:!0});var WL=qL(ze("fs")),E2=Mt(),v2=kL(vn()),C2=Cn();Hn.default={order:100,canRead(e){return v2.isFileSystemPath(e.url)},async read(e){let t;try{t=v2.toFileSystemPath(e.url)}catch(n){throw new C2.ResolverError(E2.ono.uri(n,`Malformed URI: ${e.url}`),e.url)}try{return await WL.default.promises.readFile(t)}catch(n){throw new C2.ResolverError((0,E2.ono)(n,`Error opening file "${t}"`),t)}}}});var S2=N(Wr=>{"use strict";d();var HL=Wr&&Wr.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),zL=Wr&&Wr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),GL=Wr&&Wr.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o<r.length;o++)r[o]!=="default"&&HL(n,t,r[o]);return zL(n,t),n}})();Object.defineProperty(Wr,"__esModule",{value:!0});var lf=Mt(),ua=GL(vn()),b2=Cn();Wr.default={order:200,headers:null,timeout:6e4,redirects:5,withCredentials:!1,canRead(e){return ua.isHttp(e.url)},read(e){let t=ua.parse(e.url);return typeof window<"u"&&!t.protocol&&(t.protocol=ua.parse(location.href).protocol),A2(t,this)}};async function A2(e,t,n){e=ua.parse(e);let r=n||[];r.push(e.href);try{let o=await VL(e,t);if(o.status>=400)throw(0,lf.ono)({status:o.status},`HTTP ERROR ${o.status}`);if(o.status>=300){if(!Number.isNaN(t.redirects)&&r.length>t.redirects)throw new b2.ResolverError((0,lf.ono)({status:o.status},`Error downloading ${r[0]}.
|
|
113
|
+
Too many redirects:
|
|
114
|
+
${r.join(`
|
|
115
|
+
`)}`));if(!("location"in o.headers)||!o.headers.location)throw(0,lf.ono)({status:o.status},`HTTP ${o.status} redirect with no location header`);{let s=ua.resolve(e.href,o.headers.location);return A2(s,t,r)}}else{if(o.body){let s=await o.arrayBuffer();return Buffer.from(s)}return Buffer.alloc(0)}}catch(o){throw new b2.ResolverError((0,lf.ono)(o,`Error downloading ${e.href}`),e.href)}}async function VL(e,t){let n,r;t.timeout&&(n=new AbortController,r=setTimeout(()=>n.abort(),t.timeout));let o=await fetch(e,{method:"GET",headers:t.headers||{},credentials:t.withCredentials?"include":"same-origin",signal:n?n.signal:null});return r&&clearTimeout(r),o}});var Fm=N(Hr=>{"use strict";d();var Au=Hr&&Hr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Hr,"__esModule",{value:!0});Hr.getNewOptions=Hr.getJsonSchemaRefParserDefaultOptions=void 0;var JL=Au(g2()),KL=Au(_2()),YL=Au(y2()),XL=Au(F2()),ZL=Au(w2()),QL=Au(S2()),eU=()=>({parse:{json:{...JL.default},yaml:{...KL.default},text:{...YL.default},binary:{...XL.default}},resolve:{file:{...ZL.default},http:{...QL.default},external:!0},continueOnError:!1,dereference:{circular:!0,excludedPathMatcher:()=>!1,referenceResolution:"relative"},mutateInputSchema:!0});Hr.getJsonSchemaRefParserDefaultOptions=eU;var tU=e=>{let t=(0,Hr.getJsonSchemaRefParserDefaultOptions)();return e&&P2(t,e),t};Hr.getNewOptions=tU;function P2(e,t){if(x2(t)){let n=Object.keys(t).filter(r=>!["__proto__","constructor","prototype"].includes(r));for(let r=0;r<n.length;r++){let o=n[r],s=t[o],a=e[o];x2(s)?e[o]=P2(a||{},s):s!==void 0&&(e[o]=s)}}return e}function x2(e){return e&&typeof e=="object"&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}});var T2=N(ff=>{"use strict";d();Object.defineProperty(ff,"__esModule",{value:!0});ff.normalizeArgs=O2;var nU=Fm();function O2(e){let t,n,r,o,s=Array.prototype.slice.call(e);typeof s[s.length-1]=="function"&&(o=s.pop()),typeof s[0]=="string"?(t=s[0],typeof s[2]=="object"?(n=s[1],r=s[2]):(n=void 0,r=s[1])):(t="",n=s[0],r=s[1]);try{r=(0,nU.getNewOptions)(r)}catch(a){console.error(`JSON Schema Ref Parser: Error normalizing options: ${a}`)}return!r.mutateInputSchema&&typeof n=="object"&&(n=JSON.parse(JSON.stringify(n))),{path:t,schema:n,options:r,callback:o}}ff.default=O2});var I2=N(zn=>{"use strict";d();var rU=zn&&zn.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),iU=zn&&zn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),oU=zn&&zn.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o<r.length;o++)r[o]!=="default"&&rU(n,t,r[o]);return iU(n,t),n}})(),Em=zn&&zn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(zn,"__esModule",{value:!0});var uU=Em(wu()),sU=Em(ra()),aU=Em(mm()),Su=oU(vn()),cU=Cn();function lU(e,t){if(!t.resolve?.external)return Promise.resolve();try{let n=vm(e.schema,e.$refs._root$Ref.path+"#",e.$refs,t);return Promise.all(n)}catch(n){return Promise.reject(n)}}function vm(e,t,n,r,o,s){o||(o=new Set);let a=[];if(e&&typeof e=="object"&&!ArrayBuffer.isView(e)&&!o.has(e)){o.add(e),uU.default.isExternal$Ref(e)&&a.push(fU(e,t,n,r));let l=Object.keys(e);for(let p of l){let D=sU.default.join(t,p),g=e[p];a=a.concat(vm(g,D,n,r,o,s))}}return a}async function fU(e,t,n,r){let o=r.dereference?.externalReferenceResolution==="root",s=Su.resolve(o?Su.cwd():t,e.$ref),a=Su.stripHash(s),l=n._$refs[a];if(l)return Promise.resolve(l.value);try{let p=await(0,aU.default)(s,n,r),D=vm(p,a+"#",n,r,new Set,!0);return Promise.all(D)}catch(p){if(!r?.continueOnError||!(0,cU.isHandledError)(p))throw p;return n._$refs[a]&&(p.source=decodeURI(Su.stripHash(t)),p.path=Su.safePointerToPath(Su.getHash(t))),[]}}zn.default=lU});var N2=N(Gn=>{"use strict";d();var pU=Gn&&Gn.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),dU=Gn&&Gn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),hU=Gn&&Gn.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o<r.length;o++)r[o]!=="default"&&pU(n,t,r[o]);return dU(n,t),n}})(),R2=Gn&&Gn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gn,"__esModule",{value:!0});var pf=R2(wu()),sa=R2(ra()),Cm=hU(vn());function DU(e,t){let n=[];wm(e,"schema",e.$refs._root$Ref.path+"#","#",0,n,e.$refs,t),mU(n)}function wm(e,t,n,r,o,s,a,l){let p=t===null?e:e[t];if(p&&typeof p=="object"&&!ArrayBuffer.isView(p))if(pf.default.isAllowed$Ref(p))B2(e,t,n,r,o,s,a,l);else{let D=Object.keys(p).sort((g,E)=>g==="definitions"?-1:E==="definitions"?1:g.length-E.length);for(let g of D){let E=sa.default.join(n,g),w=sa.default.join(r,g),v=p[g];pf.default.isAllowed$Ref(v)?B2(p,g,n,w,o,s,a,l):wm(p,g,E,w,o,s,a,l)}}}function B2(e,t,n,r,o,s,a,l){let p=t===null?e:e[t],D=Cm.resolve(n,p.$ref),g=a._resolve(D,r,l);if(g===null)return;let w=sa.default.parse(r).length,v=Cm.stripHash(g.path),S=Cm.getHash(g.path),O=v!==a._root$Ref.path,P=pf.default.isExtended$Ref(p);o+=g.indirections;let I=gU(s,e,t);if(I)if(w<I.depth||o<I.indirections)_U(s,I);else return;s.push({$ref:p,parent:e,key:t,pathFromRoot:r,depth:w,file:v,hash:S,value:g.value,circular:g.circular,extended:P,external:O,indirections:o}),(!I||O)&&wm(g.value,null,g.path,r,o+1,s,a,l)}function mU(e){e.sort((o,s)=>{if(o.file!==s.file)return o.file<s.file?-1:1;if(o.hash!==s.hash)return o.hash<s.hash?-1:1;if(o.circular!==s.circular)return o.circular?-1:1;if(o.extended!==s.extended)return o.extended?1:-1;if(o.indirections!==s.indirections)return o.indirections-s.indirections;if(o.depth!==s.depth)return o.depth-s.depth;{let a=o.pathFromRoot.lastIndexOf("/definitions"),l=s.pathFromRoot.lastIndexOf("/definitions");return a!==l?l-a:o.pathFromRoot.length-s.pathFromRoot.length}});let t,n,r;for(let o of e)o.external?o.file===t&&o.hash===n?o.$ref.$ref=r:o.file===t&&o.hash.indexOf(n+"/")===0?o.$ref.$ref=sa.default.join(r,sa.default.parse(o.hash.replace(n,"#"))):(t=o.file,n=o.hash,r=o.pathFromRoot,o.$ref=o.parent[o.key]=pf.default.dereference(o.$ref,o.value),o.circular&&(o.$ref.$ref=o.pathFromRoot)):o.$ref.$ref=o.hash}function gU(e,t,n){for(let r of e)if(r&&r.parent===t&&r.key===n)return r}function _U(e,t){let n=e.indexOf(t);e.splice(n,1)}Gn.default=DU});var k2=N(Vn=>{"use strict";d();var yU=Vn&&Vn.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),FU=Vn&&Vn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),EU=Vn&&Vn.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o<r.length;o++)r[o]!=="default"&&yU(n,t,r[o]);return FU(n,t),n}})(),L2=Vn&&Vn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Vn,"__esModule",{value:!0});var df=L2(wu()),M2=L2(ra()),vU=Mt(),j2=EU(vn()),CU=Cn();Vn.default=wU;function wU(e,t){let n=Date.now(),r=bm(e.schema,e.$refs._root$Ref.path,"#",new Set,new Set,new Map,e.$refs,t,n);e.$refs.circular=r.circular,e.schema=r.value}function bm(e,t,n,r,o,s,a,l,p){let D,g={value:e,circular:!1};if(l&&l.timeoutMs&&Date.now()-p>l.timeoutMs)throw new CU.TimeoutError(l.timeoutMs);let E=l.dereference||{},w=E.excludedPathMatcher||(()=>!1);if((E?.circular==="ignore"||!o.has(e))&&e&&typeof e=="object"&&!ArrayBuffer.isView(e)&&!w(n)){if(r.add(e),o.add(e),df.default.isAllowed$Ref(e,l))D=$2(e,t,n,r,o,s,a,l,p),g.circular=D.circular,g.value=D.value;else for(let v of Object.keys(e)){let S=M2.default.join(t,v),O=M2.default.join(n,v);if(w(O))continue;let P=e[v],I=!1;df.default.isAllowed$Ref(P,l)?(D=$2(P,S,O,r,o,s,a,l,p),I=D.circular,e[v]!==D.value&&(e[v]=D.value,E?.onDereference?.(P.$ref,e[v],e,v))):r.has(P)?I=U2(S,a,l):(D=bm(P,S,O,r,o,s,a,l,p),I=D.circular,e[v]!==D.value&&(e[v]=D.value)),g.circular=g.circular||I}r.delete(e)}return g}function $2(e,t,n,r,o,s,a,l,p){let g=df.default.isExternal$Ref(e)&&l?.dereference?.externalReferenceResolution==="root",E=j2.resolve(g?j2.cwd():t,e.$ref),w=s.get(E);if(w&&!w.circular){let U=Object.keys(e);if(U.length>1){let q={};for(let X of U)X!=="$ref"&&!(X in w.value)&&(q[X]=e[X]);return{circular:w.circular,value:Object.assign({},w.value,q)}}return w}let v=a._resolve(E,t,l);if(v===null)return{circular:!1,value:null};let S=v.circular,O=S||r.has(v.value);O&&U2(t,a,l);let P=df.default.dereference(e,v.value);if(!O){let U=bm(P,v.path,n,r,o,s,a,l,p);O=U.circular,P=U.value}O&&!S&&l.dereference?.circular==="ignore"&&(P=e),S&&(P.$ref=n);let I={circular:O,value:P};return Object.keys(e).length===1&&s.set(E,I),I}function U2(e,t,n){if(t.circular=!0,!n.dereference.circular)throw vU.ono.reference(`Circular $ref pointer found at ${e}`);return!0}});var q2=N(Am=>{"use strict";d();Object.defineProperty(Am,"__esModule",{value:!0});function bU(){return typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:typeof setImmediate=="function"?setImmediate:function(t){setTimeout(t,0)}}Am.default=bU()});var H2=N(aa=>{"use strict";d();var AU=aa&&aa.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(aa,"__esModule",{value:!0});aa.default=SU;var W2=AU(q2());function SU(e,t){if(e){t.then(function(n){(0,W2.default)(function(){e(null,n)})},function(n){(0,W2.default)(function(){e(n)})});return}else return t}});var J2=N(oe=>{"use strict";d();var xU=oe&&oe.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),PU=oe&&oe.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),OU=oe&&oe.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o<r.length;o++)r[o]!=="default"&&xU(n,t,r[o]);return PU(n,t),n}})(),Fo=oe&&oe.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(oe,"__esModule",{value:!0});oe.getJsonSchemaRefParserDefaultOptions=oe.jsonSchemaParserNormalizeArgs=oe.dereferenceInternal=oe.JSONParserErrorGroup=oe.isHandledError=oe.UnmatchedParserError=oe.ParserError=oe.ResolverError=oe.MissingPointerError=oe.InvalidPointerError=oe.JSONParserError=oe.UnmatchedResolverError=oe.dereference=oe.bundle=oe.resolve=oe.parse=oe.$RefParser=void 0;var z2=Fo(p2()),TU=Fo(mm()),ca=Fo(T2());oe.jsonSchemaParserNormalizeArgs=ca.default;var IU=Fo(I2()),BU=Fo(N2()),V2=Fo(k2());oe.dereferenceInternal=V2.default;var yo=OU(vn()),wn=Cn();Object.defineProperty(oe,"JSONParserError",{enumerable:!0,get:function(){return wn.JSONParserError}});Object.defineProperty(oe,"InvalidPointerError",{enumerable:!0,get:function(){return wn.InvalidPointerError}});Object.defineProperty(oe,"MissingPointerError",{enumerable:!0,get:function(){return wn.MissingPointerError}});Object.defineProperty(oe,"ResolverError",{enumerable:!0,get:function(){return wn.ResolverError}});Object.defineProperty(oe,"ParserError",{enumerable:!0,get:function(){return wn.ParserError}});Object.defineProperty(oe,"UnmatchedParserError",{enumerable:!0,get:function(){return wn.UnmatchedParserError}});Object.defineProperty(oe,"UnmatchedResolverError",{enumerable:!0,get:function(){return wn.UnmatchedResolverError}});Object.defineProperty(oe,"isHandledError",{enumerable:!0,get:function(){return wn.isHandledError}});Object.defineProperty(oe,"JSONParserErrorGroup",{enumerable:!0,get:function(){return wn.JSONParserErrorGroup}});var G2=Mt(),Jn=Fo(H2()),RU=Fm();Object.defineProperty(oe,"getJsonSchemaRefParserDefaultOptions",{enumerable:!0,get:function(){return RU.getJsonSchemaRefParserDefaultOptions}});var Pi=class e{constructor(){this.schema=null,this.$refs=new z2.default}async parse(){let t=(0,ca.default)(arguments),n;if(!t.path&&!t.schema){let o=(0,G2.ono)(`Expected a file path, URL, or object. Got ${t.path||t.schema}`);return(0,Jn.default)(t.callback,Promise.reject(o))}this.schema=null,this.$refs=new z2.default;let r="http";if(yo.isFileSystemPath(t.path))t.path=yo.fromFileSystemPath(t.path),r="file";else if(!t.path&&t.schema&&"$id"in t.schema&&t.schema.$id){let o=yo.parse(t.schema.$id),s=o.protocol==="https:"?443:80;t.path=`${o.protocol}//${o.hostname}:${s}`}if(t.path=yo.resolve(yo.cwd(),t.path),t.schema&&typeof t.schema=="object"){let o=this.$refs._add(t.path);o.value=t.schema,o.pathType=r,n=Promise.resolve(t.schema)}else n=(0,TU.default)(t.path,this.$refs,t.options);try{let o=await n;if(o!==null&&typeof o=="object"&&!Buffer.isBuffer(o))return this.schema=o,(0,Jn.default)(t.callback,Promise.resolve(this.schema));if(t.options.continueOnError)return this.schema=null,(0,Jn.default)(t.callback,Promise.resolve(this.schema));throw G2.ono.syntax(`"${this.$refs._root$Ref.path||o}" is not a valid JSON Schema`)}catch(o){return!t.options.continueOnError||!(0,wn.isHandledError)(o)?(0,Jn.default)(t.callback,Promise.reject(o)):(this.$refs._$refs[yo.stripHash(t.path)]&&this.$refs._$refs[yo.stripHash(t.path)].addError(o),(0,Jn.default)(t.callback,Promise.resolve(null)))}}static parse(){let t=new e;return t.parse.apply(t,arguments)}async resolve(){let t=(0,ca.default)(arguments);try{return await this.parse(t.path,t.schema,t.options),await(0,IU.default)(this,t.options),Sm(this),(0,Jn.default)(t.callback,Promise.resolve(this.$refs))}catch(n){return(0,Jn.default)(t.callback,Promise.reject(n))}}static resolve(){let t=new e;return t.resolve.apply(t,arguments)}static bundle(){let t=new e;return t.bundle.apply(t,arguments)}async bundle(){let t=(0,ca.default)(arguments);try{return await this.resolve(t.path,t.schema,t.options),(0,BU.default)(this,t.options),Sm(this),(0,Jn.default)(t.callback,Promise.resolve(this.schema))}catch(n){return(0,Jn.default)(t.callback,Promise.reject(n))}}static dereference(){let t=new e;return t.dereference.apply(t,arguments)}async dereference(){let t=(0,ca.default)(arguments);try{return await this.resolve(t.path,t.schema,t.options),(0,V2.default)(this,t.options),Sm(this),(0,Jn.default)(t.callback,Promise.resolve(this.schema))}catch(n){return(0,Jn.default)(t.callback,Promise.reject(n))}}};oe.$RefParser=Pi;oe.default=Pi;function Sm(e){if(wn.JSONParserErrorGroup.getParserErrors(e).length>0)throw new wn.JSONParserErrorGroup(e)}oe.parse=Pi.parse;oe.resolve=Pi.resolve;oe.bundle=Pi.bundle;oe.dereference=Pi.dereference});var K2=N(xu=>{"use strict";d();var NU=xu&&xu.__awaiter||function(e,t,n,r){function o(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function l(g){try{D(r.next(g))}catch(E){a(E)}}function p(g){try{D(r.throw(g))}catch(E){a(E)}}function D(g){g.done?s(g.value):o(g.value).then(l,p)}D((r=r.apply(e,t||[])).next())})};Object.defineProperty(xu,"__esModule",{value:!0});xu.dereference=void 0;var MU=J2(),jU=bi();function $U(e,t){return NU(this,arguments,void 0,function*(n,{cwd:r,$refOptions:o}){(0,jU.log)("green","dereferencer","Dereferencing input schema:",r,n);let s=new MU.$RefParser,a=new WeakMap,l=yield s.dereference(r,n,Object.assign(Object.assign({},o),{dereference:Object.assign(Object.assign({},o.dereference),{onDereference(p,D){a.set(D,p)}})}));return{dereferencedPaths:a,dereferencedSchema:l}})}xu.dereference=$U});var Y2=N(hf=>{"use strict";d();Object.defineProperty(hf,"__esModule",{value:!0});hf.validate=void 0;var LU=bi(),Eo=new Map;Eo.set("Enum members and tsEnumNames must be of the same length",e=>{if(e.enum&&e.tsEnumNames&&e.enum.length!==e.tsEnumNames.length)return!1});Eo.set("tsEnumNames must be an array of strings",e=>{if(e.tsEnumNames&&e.tsEnumNames.some(t=>typeof t!="string"))return!1});Eo.set("When both maxItems and minItems are present, maxItems >= minItems",e=>{let{maxItems:t,minItems:n}=e;if(typeof t=="number"&&typeof n=="number")return t>=n});Eo.set("When maxItems exists, maxItems >= 0",e=>{let{maxItems:t}=e;if(typeof t=="number")return t>=0});Eo.set("When minItems exists, minItems >= 0",e=>{let{minItems:t}=e;if(typeof t=="number")return t>=0});Eo.set("deprecated must be a boolean",e=>{let t=typeof e.deprecated;return t==="boolean"||t==="undefined"});function UU(e,t){let n=[];return Eo.forEach((r,o)=>{(0,LU.traverse)(e,(s,a)=>(r(s)===!1&&n.push(`Error at key "${a}" in file "${t}": ${o}`),s))}),n}hf.validate=UU});var Z2=N(Df=>{"use strict";d();Object.defineProperty(Df,"__esModule",{value:!0});Df.link=void 0;var X2=lo(),kU=$r();function xm(e,t=null){if(!Array.isArray(e)&&!(0,kU.isPlainObject)(e)||e.hasOwnProperty(X2.Parent))return e;Object.defineProperty(e,X2.Parent,{enumerable:!1,value:t,writable:!1}),Array.isArray(e)&&e.forEach(n=>xm(n,e));for(let n in e)xm(e[n],e);return e}Df.link=xm});var Q2=N(mf=>{"use strict";d();Object.defineProperty(mf,"__esModule",{value:!0});mf.validateOptions=void 0;function qU({maxItems:e}){if(e!==void 0&&e<-1)throw RangeError(`Expected options.maxItems to be >= -1, but was given ${e}.`)}mf.validateOptions=qU});var UD=N(Wt=>{"use strict";d();var WU=Wt&&Wt.__awaiter||function(e,t,n,r){function o(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function l(g){try{D(r.next(g))}catch(E){a(E)}}function p(g){try{D(r.throw(g))}catch(E){a(E)}}function D(g){g.done?s(g.value):o(g.value).then(l,p)}D((r=r.apply(e,t||[])).next())})};Object.defineProperty(Wt,"__esModule",{value:!0});Wt.ValidationError=Wt.compile=Wt.compileFromFile=Wt.DEFAULT_OPTIONS=void 0;var HU=ze("fs"),Pm=$r(),zU=ze("path"),GU=uw(),VU=LD(),JU=Ob(),KU=Bb(),YU=Nb(),XU=K2(),un=bi(),ZU=Y2(),QU=ze("util"),ek=Z2(),tk=Q2();Wt.DEFAULT_OPTIONS={$refOptions:{},additionalProperties:!0,bannerComment:`/* eslint-disable */
|
|
116
|
+
/**
|
|
117
|
+
* This file was automatically generated by json-schema-to-typescript.
|
|
118
|
+
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
|
|
119
|
+
* and run json-schema-to-typescript to regenerate this file.
|
|
120
|
+
*/`,cwd:process.cwd(),declareExternallyReferenced:!0,enableConstEnums:!0,inferStringEnumKeysFromValues:!1,format:!0,ignoreMinAndMaxItems:!1,maxItems:20,strictIndexSignatures:!1,style:{bracketSpacing:!1,printWidth:120,semi:!0,singleQuote:!1,tabWidth:2,trailingComma:"none",useTabs:!1},unreachableDefinitions:!1,unknownAny:!0};function nk(e,t=Wt.DEFAULT_OPTIONS){let n=rk(e);return e1(n,(0,un.stripExtension)(e),Object.assign({cwd:(0,zU.dirname)(e)},t))}Wt.compileFromFile=nk;function rk(e){let t=(0,un.Try)(()=>(0,HU.readFileSync)(e),()=>{throw new ReferenceError(`Unable to read file "${e}"`)});return(0,un.parseFileAsJSONSchema)(e,t.toString())}function e1(e,t){return WU(this,arguments,void 0,function*(n,r,o={}){(0,tk.validateOptions)(o);let s=(0,Pm.merge)({},Wt.DEFAULT_OPTIONS,o),a=Date.now();function l(){return`(${Date.now()-a}ms)`}(0,Pm.endsWith)(s.cwd,"/")||(s.cwd+="/");let p=(0,Pm.cloneDeep)(n),{dereferencedPaths:D,dereferencedSchema:g}=yield(0,XU.dereference)(p,s);process.env.VERBOSE&&((0,QU.isDeepStrictEqual)(p,g)?(0,un.log)("green","dereferencer",l(),"\u2705 No change"):(0,un.log)("green","dereferencer",l(),"\u2705 Result:",g));let E=(0,ek.link)(g);process.env.VERBOSE&&(0,un.log)("green","linker",l(),"\u2705 No change");let w=(0,ZU.validate)(E,r);if(w.length)throw w.forEach(U=>(0,un.error)(U)),new gf;process.env.VERBOSE&&(0,un.log)("green","validator",l(),"\u2705 No change");let v=(0,JU.normalize)(E,D,r,s);(0,un.log)("yellow","normalizer",l(),"\u2705 Result:",v);let S=(0,YU.parse)(v,s);(0,un.log)("blue","parser",l(),"\u2705 Result:",S);let O=(0,KU.optimize)(S,s);(0,un.log)("cyan","optimizer",l(),"\u2705 Result:",O);let P=(0,VU.generate)(O,s);(0,un.log)("magenta","generator",l(),"\u2705 Result:",P);let I=yield(0,GU.format)(P,s);return(0,un.log)("white","formatter",l(),"\u2705 Result:",I),I})}Wt.compile=e1;var gf=class extends Error{};Wt.ValidationError=gf});var Rm=N(pa=>{"use strict";d();var qk=pa&&pa.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(pa,"__esModule",{value:!0});pa.default=Wk;var T1=qk(ze("path"));function Wk(e){return e.startsWith("\\\\?\\")?e:e.split(T1.default?.win32?.sep).join(T1.default?.posix?.sep??"/")}});var I1=N(yf=>{"use strict";d();Object.defineProperty(yf,"__esModule",{value:!0});yf.isWindows=void 0;var Hk=/^win/.test(globalThis.process?globalThis.process.platform:""),zk=()=>Hk;yf.isWindows=zk});var bn=N(Ue=>{"use strict";d();var Gk=Ue&&Ue.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Vk=Ue&&Ue.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Jk=Ue&&Ue.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o<r.length;o++)r[o]!=="default"&&Gk(n,t,r[o]);return Vk(n,t),n}})(),Kk=Ue&&Ue.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ue,"__esModule",{value:!0});Ue.parse=void 0;Ue.resolve=B1;Ue.cwd=R1;Ue.getProtocol=Lm;Ue.getExtension=r4;Ue.stripQuery=N1;Ue.getHash=M1;Ue.stripHash=jm;Ue.isHttp=i4;Ue.isFileSystemPath=$m;Ue.fromFileSystemPath=o4;Ue.toFileSystemPath=u4;Ue.safePointerToPath=s4;Ue.relative=a4;var Ef=Kk(Rm()),Mm=Jk(ze("path")),Yk=/\//g,Xk=/^(\w{2,}):\/\//i,Zk=/~1/g,Qk=/~0/g,e4=ze("path"),Ff=I1(),t4=[[/\?/g,"%3F"],[/#/g,"%23"]],Nm=[/%23/g,"#",/%24/g,"$",/%26/g,"&",/%2C/g,",",/%40/g,"@"],n4=e=>new URL(e);Ue.parse=n4;function B1(e,t){let n=new URL((0,Ef.default)(e),"https://aaa.nonexistanturl.com"),r=new URL((0,Ef.default)(t),n),o=t.match(/(\s*)$/)?.[1]||"";if(r.hostname==="aaa.nonexistanturl.com"){let{pathname:s,search:a,hash:l}=r;return s+a+l+o}return r.toString()+o}function R1(){if(typeof window<"u")return location.href;let e=process.cwd(),t=e.slice(-1);return t==="/"||t==="\\"?e:e+"/"}function Lm(e){let t=Xk.exec(e||"");if(t)return t[1].toLowerCase()}function r4(e){let t=e.lastIndexOf(".");return t>=0?N1(e.substr(t).toLowerCase()):""}function N1(e){let t=e.indexOf("?");return t>=0&&(e=e.substr(0,t)),e}function M1(e){if(!e)return"#";let t=e.indexOf("#");return t>=0?e.substring(t):"#"}function jm(e){if(!e)return"";let t=e.indexOf("#");return t>=0&&(e=e.substring(0,t)),e}function i4(e){let t=Lm(e);return t==="http"||t==="https"?!0:t===void 0?typeof window<"u":!1}function $m(e){if(typeof window<"u"||typeof process<"u"&&process.browser)return!1;let t=Lm(e);return t===void 0||t==="file"}function o4(e){if((0,Ff.isWindows)()){let t=R1(),n=e.toUpperCase(),o=(0,Ef.default)(t).toUpperCase(),s=n.includes(o),a=n.includes(o),l=Mm.win32?.isAbsolute(e)||e.startsWith("http://")||e.startsWith("https://")||e.startsWith("file://");!(s||a||l)&&!t.startsWith("http")&&(e=(0,e4.join)(t,e)),e=(0,Ef.default)(e)}e=encodeURI(e);for(let t of t4)e=e.replace(t[0],t[1]);return e}function u4(e,t){e=decodeURI(e);for(let r=0;r<Nm.length;r+=2)e=e.replace(Nm[r],Nm[r+1]);let n=e.substr(0,7).toLowerCase()==="file://";return n&&(e=e[7]==="/"?e.substr(8):e.substr(7),(0,Ff.isWindows)()&&e[1]==="/"&&(e=e[0]+":"+e.substr(1)),t?e="file:///"+e:(n=!1,e=(0,Ff.isWindows)()?e:"/"+e)),(0,Ff.isWindows)()&&!n&&(e=e.replace(Yk,"\\"),e.substr(1,2)===":\\"&&(e=e[0].toUpperCase()+e.substr(1))),e}function s4(e){return e.length<=1||e[0]!=="#"||e[1]!=="/"?[]:e.slice(2).split("/").map(t=>decodeURIComponent(t).replace(Zk,"/").replace(Qk,"~"))}function a4(e,t){if(!$m(e)||!$m(t))return B1(e,t);let n=Mm.default.dirname(jm(e)),r=jm(t);return Mm.default.relative(n,r)+M1(t)}});var An=N(Ye=>{"use strict";d();Object.defineProperty(Ye,"__esModule",{value:!0});Ye.InvalidPointerError=Ye.TimeoutError=Ye.MissingPointerError=Ye.UnmatchedResolverError=Ye.ResolverError=Ye.UnmatchedParserError=Ye.ParserError=Ye.JSONParserErrorGroup=Ye.JSONParserError=void 0;Ye.isHandledError=c4;Ye.normalizeError=l4;var j1=Mt(),vf=bn(),Kn=class extends Error{constructor(t,n){super(),this.code="EUNKNOWN",this.name="JSONParserError",this.message=t,this.source=n,this.path=null,j1.Ono.extend(this)}get footprint(){return`${this.path}+${this.source}+${this.code}+${this.message}`}};Ye.JSONParserError=Kn;var Cf=class e extends Error{constructor(t){super(),this.files=t,this.name="JSONParserErrorGroup",this.message=`${this.errors.length} error${this.errors.length>1?"s":""} occurred while reading '${(0,vf.toFileSystemPath)(t.$refs._root$Ref.path)}'`,j1.Ono.extend(this)}static getParserErrors(t){let n=[];for(let r of Object.values(t.$refs._$refs))r.errors&&n.push(...r.errors);return n}get errors(){return e.getParserErrors(this.files)}};Ye.JSONParserErrorGroup=Cf;var Um=class extends Kn{constructor(t,n){super(`Error parsing ${n}: ${t}`,n),this.code="EPARSER",this.name="ParserError"}};Ye.ParserError=Um;var km=class extends Kn{constructor(t){super(`Could not find parser for "${t}"`,t),this.code="EUNMATCHEDPARSER",this.name="UnmatchedParserError"}};Ye.UnmatchedParserError=km;var qm=class extends Kn{constructor(t,n){super(t.message||`Error reading file "${n}"`,n),this.code="ERESOLVER",this.name="ResolverError","code"in t&&(this.ioErrorCode=String(t.code))}};Ye.ResolverError=qm;var Wm=class extends Kn{constructor(t){super(`Could not find resolver for "${t}"`,t),this.code="EUNMATCHEDRESOLVER",this.name="UnmatchedResolverError"}};Ye.UnmatchedResolverError=Wm;var Hm=class extends Kn{constructor(t,n,r,o,s){super(`Missing $ref pointer "${(0,vf.getHash)(n)}". Token "${t}" does not exist.`,(0,vf.stripHash)(n)),this.code="EMISSINGPOINTER",this.name="MissingPointerError",this.targetToken=t,this.targetRef=r,this.targetFound=o,this.parentPath=s}};Ye.MissingPointerError=Hm;var zm=class extends Kn{constructor(t){super(`Dereferencing timeout reached: ${t}ms`),this.code="ETIMEOUT",this.name="TimeoutError"}};Ye.TimeoutError=zm;var Gm=class extends Kn{constructor(t,n){super(`Invalid $ref pointer "${t}". Pointers must begin with "#/"`,(0,vf.stripHash)(n)),this.code="EUNMATCHEDRESOLVER",this.name="InvalidPointerError"}};Ye.InvalidPointerError=Gm;function c4(e){return e instanceof Kn||e instanceof Cf}function l4(e){return e.path===null&&(e.path=[]),e}});var da=N(Ht=>{"use strict";d();var f4=Ht&&Ht.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),p4=Ht&&Ht.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),d4=Ht&&Ht.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o<r.length;o++)r[o]!=="default"&&f4(n,t,r[o]);return p4(n,t),n}})(),h4=Ht&&Ht.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ht,"__esModule",{value:!0});Ht.nullSymbol=void 0;var Vm=h4(Ou()),Jm=d4(bn()),bf=An();Ht.nullSymbol=Symbol("null");var D4=/\//g,m4=/~/g,g4=/~1/g,_4=/~0/g,y4=e=>{try{return decodeURIComponent(e)}catch{return e}},Af=class e{constructor(t,n,r){this.$ref=t,this.path=n,this.originalPath=r||n,this.value=void 0,this.circular=!1,this.indirections=0}resolve(t,n,r){let o=e.parse(this.path,this.originalPath),s=[];this.value=L1(t);for(let a=0;a<o.length;a++){if(wf(this,n,r)&&(this.path=e.join(this.path,o.slice(a))),typeof this.value=="object"&&this.value!==null&&!U1(r)&&"$ref"in this.value)return this;let l=o[a];if(this.value[l]===void 0||this.value[l]===null&&a===o.length-1){let p=!1;for(let v=o.length-1;v>a;v--){let S=o.slice(a,v+1).join("/");if(this.value[S]!==void 0){this.value=this.value[S],a=v,p=!0;break}}if(p)continue;if(l in this.value&&this.value[l]===null){this.value=Ht.nullSymbol;continue}this.value=null;let D=this.$ref.path||"",g=this.path.replace(D,""),E=e.join("",s),w=r?.replace(D,"");throw new bf.MissingPointerError(l,decodeURI(this.originalPath),g,E,w)}else this.value=this.value[l];s.push(l)}return(!this.value||this.value.$ref&&Jm.resolve(this.path,this.value.$ref)!==r)&&wf(this,n,r),this}set(t,n,r){let o=e.parse(this.path),s;if(o.length===0)return this.value=n,n;this.value=L1(t);for(let a=0;a<o.length-1;a++)wf(this,r),s=o[a],this.value&&this.value[s]!==void 0?this.value=this.value[s]:this.value=$1(this,s,{});return wf(this,r),s=o[o.length-1],$1(this,s,n),t}static parse(t,n){let r=Jm.getHash(t).substring(1);if(!r)return[];let o=r.split("/");for(let s=0;s<o.length;s++)o[s]=y4(o[s].replace(g4,"/").replace(_4,"~"));if(o[0]!=="")throw new bf.InvalidPointerError(r,n===void 0?t:n);return o.slice(1)}static join(t,n){t.indexOf("#")===-1&&(t+="#"),n=Array.isArray(n)?n:[n];for(let r=0;r<n.length;r++){let o=n[r];t+="/"+encodeURIComponent(o.replace(m4,"~0").replace(D4,"~1"))}return t}};function wf(e,t,n){if(Vm.default.isAllowed$Ref(e.value,t)){let r=Jm.resolve(e.path,e.value.$ref);if(r===e.path&&!U1(n))e.circular=!0;else{let o=e.$ref.$refs._resolve(r,e.path,t);return o===null?!1:(e.indirections+=o.indirections+1,Vm.default.isExtended$Ref(e.value)?(e.value=Vm.default.dereference(e.value,o.value),!1):(e.$ref=o.$ref,e.path=o.path,e.value=o.value,!0))}}}Ht.default=Af;function $1(e,t,n){if(e.value&&typeof e.value=="object")t==="-"&&Array.isArray(e.value)?e.value.push(n):e.value[t]=n;else throw new bf.JSONParserError(`Error assigning $ref pointer "${e.path}".
|
|
121
|
+
Cannot set "${t}" of a non-object.`);return n}function L1(e){if((0,bf.isHandledError)(e))throw e;return e}function U1(e){return typeof e=="string"&&Af.parse(e).length==0}});var Ou=N(zr=>{"use strict";d();var F4=zr&&zr.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),E4=zr&&zr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),v4=zr&&zr.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o<r.length;o++)r[o]!=="default"&&F4(n,t,r[o]);return E4(n,t),n}})();Object.defineProperty(zr,"__esModule",{value:!0});var Sf=v4(da()),xf=An(),Km=bn(),Ym=class e{constructor(t){this.errors=[],this.$refs=t}addError(t){this.errors===void 0&&(this.errors=[]);let n=this.errors.map(({footprint:r})=>r);"errors"in t&&Array.isArray(t.errors)?this.errors.push(...t.errors.map(xf.normalizeError).filter(({footprint:r})=>!n.includes(r))):(!("footprint"in t)||!n.includes(t.footprint))&&this.errors.push((0,xf.normalizeError)(t))}exists(t,n){try{return this.resolve(t,n),!0}catch{return!1}}get(t,n){return this.resolve(t,n)?.value}resolve(t,n,r,o){let s=new Sf.default(this,t,r);try{let a=s.resolve(this.value,n,o);return a.value===Sf.nullSymbol&&(a.value=null),a}catch(a){if(!n||!n.continueOnError||!(0,xf.isHandledError)(a))throw a;return a.path===null&&(a.path=(0,Km.safePointerToPath)((0,Km.getHash)(o))),a instanceof xf.InvalidPointerError&&(a.source=decodeURI((0,Km.stripHash)(o))),this.addError(a),null}}set(t,n){let r=new Sf.default(this,t);this.value=r.set(this.value,n),this.value===Sf.nullSymbol&&(this.value=null)}static is$Ref(t){return!!t&&typeof t=="object"&&t!==null&&"$ref"in t&&typeof t.$ref=="string"&&t.$ref.length>0}static isExternal$Ref(t){return e.is$Ref(t)&&t.$ref[0]!=="#"}static isAllowed$Ref(t,n){if(this.is$Ref(t)){if(t.$ref.substring(0,2)==="#/"||t.$ref==="#")return!0;if(t.$ref[0]!=="#"&&(!n||n.resolve?.external))return!0}}static isExtended$Ref(t){return e.is$Ref(t)&&Object.keys(t).length>1}static dereference(t,n){if(n&&typeof n=="object"&&e.isExtended$Ref(t)){let r={};for(let o of Object.keys(t))o!=="$ref"&&(r[o]=t[o]);for(let o of Object.keys(n))o in r||(r[o]=n[o]);return r}else return n}};zr.default=Ym});var z1=N(Yn=>{"use strict";d();var C4=Yn&&Yn.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),w4=Yn&&Yn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),b4=Yn&&Yn.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o<r.length;o++)r[o]!=="default"&&C4(n,t,r[o]);return w4(n,t),n}})(),H1=Yn&&Yn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Yn,"__esModule",{value:!0});var k1=Mt(),A4=H1(Ou()),Oi=b4(bn()),q1=H1(Rm()),Xm=class{paths(...t){return W1(this._$refs,t.flat()).map(r=>(0,q1.default)(r.decoded))}values(...t){let n=this._$refs;return W1(n,t.flat()).reduce((o,s)=>(o[(0,q1.default)(s.decoded)]=n[s.encoded].value,o),{})}exists(t,n){try{return this._resolve(t,"",n),!0}catch{return!1}}get(t,n){return this._resolve(t,"",n).value}set(t,n){let r=Oi.resolve(this._root$Ref.path,t),o=Oi.stripHash(r),s=this._$refs[o];if(!s)throw(0,k1.ono)(`Error resolving $ref pointer "${t}".
|
|
122
|
+
"${o}" not found.`);s.set(r,n)}_get$Ref(t){t=Oi.resolve(this._root$Ref.path,t);let n=Oi.stripHash(t);return this._$refs[n]}_add(t){let n=Oi.stripHash(t),r=new A4.default(this);return r.path=n,this._$refs[n]=r,this._root$Ref=this._root$Ref||r,r}_resolve(t,n,r){let o=Oi.resolve(this._root$Ref.path,t),s=Oi.stripHash(o),a=this._$refs[s];if(!a)throw(0,k1.ono)(`Error resolving $ref pointer "${t}".
|
|
123
|
+
"${s}" not found.`);return a.resolve(o,r,t,n)}constructor(){this._$refs={},this.toJSON=this.values,this.circular=!1,this._$refs={},this._root$Ref=null}};Yn.default=Xm;function W1(e,t){let n=Object.keys(e);return t=Array.isArray(t[0])?t[0]:Array.prototype.slice.call(t),t.length>0&&t[0]&&(n=n.filter(r=>t.includes(e[r].pathType))),n.map(r=>({encoded:r,decoded:e[r].pathType==="file"?Oi.toFileSystemPath(r,!0):r}))}});var V1=N(Tu=>{"use strict";d();Object.defineProperty(Tu,"__esModule",{value:!0});Tu.all=S4;Tu.filter=x4;Tu.sort=P4;Tu.run=O4;function S4(e){return Object.keys(e||{}).filter(t=>typeof e[t]=="object").map(t=>(e[t].name=t,e[t]))}function x4(e,t,n){return e.filter(r=>!!G1(r,t,n))}function P4(e){for(let t of e)t.order=t.order||Number.MAX_SAFE_INTEGER;return e.sort((t,n)=>t.order-n.order)}async function O4(e,t,n,r){let o,s,a=0;return new Promise((l,p)=>{D();function D(){if(o=e[a++],!o)return p(s);try{let v=G1(o,t,n,g,r);if(v&&typeof v.then=="function")v.then(E,w);else if(v!==void 0)E(v);else if(a===e.length)throw new Error("No promise has been returned or callback has been called.")}catch(v){w(v)}}function g(v,S){v?w(v):E(S)}function E(v){l({plugin:o,result:v})}function w(v){s={plugin:o,error:v},D()}})}function G1(e,t,n,r,o){let s=e[t];if(typeof s=="function")return s.apply(e,[n,r,o]);if(!r){if(s instanceof RegExp)return s.test(n.url);if(typeof s=="string")return s===n.extension;if(Array.isArray(s))return s.indexOf(n.extension)!==-1}return s}});var Qm=N(Gr=>{"use strict";d();var T4=Gr&&Gr.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),I4=Gr&&Gr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),J1=Gr&&Gr.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o<r.length;o++)r[o]!=="default"&&T4(n,t,r[o]);return I4(n,t),n}})();Object.defineProperty(Gr,"__esModule",{value:!0});var Zm=Mt(),B4=J1(bn()),Ti=J1(V1()),vo=An();async function R4(e,t,n){let r=e.indexOf("#"),o="";r>=0&&(o=e.substring(r),e=e.substring(0,r));let s=t._add(e),a={url:e,hash:o,extension:B4.getExtension(e)};try{let l=await N4(a,n,t);s.pathType=l.plugin.name,a.data=l.result;let p=await M4(a,n,t);return s.value=p.result,p.result}catch(l){throw(0,vo.isHandledError)(l)&&(s.value=l),l}}async function N4(e,t,n){let r=Ti.all(t.resolve);r=Ti.filter(r,"canRead",e),Ti.sort(r);try{return await Ti.run(r,"read",e,n)}catch(o){throw!o&&t.continueOnError?new vo.UnmatchedResolverError(e.url):!o||!("error"in o)?Zm.ono.syntax(`Unable to resolve $ref pointer "${e.url}"`):o.error instanceof vo.ResolverError?o.error:new vo.ResolverError(o,e.url)}}async function M4(e,t,n){let r=Ti.all(t.parse),o=Ti.filter(r,"canParse",e),s=o.length>0?o:r;Ti.sort(s);try{let a=await Ti.run(s,"parse",e,n);if(!a.plugin.allowEmpty&&j4(a.result))throw Zm.ono.syntax(`Error parsing "${e.url}" as ${a.plugin.name}.
|
|
124
|
+
Parsed value is empty`);return a}catch(a){throw!a&&t.continueOnError?new vo.UnmatchedParserError(e.url):a&&a.message&&a.message.startsWith("Error parsing")?a:!a||!("error"in a)?Zm.ono.syntax(`Unable to parse ${e.url}`):a.error instanceof vo.ParserError?a.error:new vo.ParserError(a.error.message,e.url)}}function j4(e){return e===void 0||typeof e=="object"&&Object.keys(e).length===0||typeof e=="string"&&e.trim().length===0||Buffer.isBuffer(e)&&e.length===0}Gr.default=R4});var Y1=N(eg=>{"use strict";d();Object.defineProperty(eg,"__esModule",{value:!0});var K1=An();eg.default={order:100,allowEmpty:!0,canParse:".json",allowBOM:!0,async parse(e){let t=e.data;if(Buffer.isBuffer(t)&&(t=t.toString()),typeof t=="string"){if(t.trim().length===0)return;try{return JSON.parse(t)}catch(n){if(this.allowBOM)try{let r=t.indexOf("{");return t=t.slice(r),JSON.parse(t)}catch(r){throw new K1.ParserError(r.message,e.url)}throw new K1.ParserError(n.message,e.url)}}else return t}}});var X1=N(ha=>{"use strict";d();var $4=ha&&ha.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ha,"__esModule",{value:!0});var L4=An(),U4=$4(Du()),k4=Du();ha.default={order:200,allowEmpty:!0,canParse:[".yaml",".yml",".json"],async parse(e){let t=e.data;if(Buffer.isBuffer(t)&&(t=t.toString()),typeof t=="string")try{return U4.default.load(t,{schema:k4.JSON_SCHEMA})}catch(n){throw new L4.ParserError(n?.message||"Parser Error",e.url)}else return t}}});var Z1=N(tg=>{"use strict";d();Object.defineProperty(tg,"__esModule",{value:!0});var q4=An(),W4=/\.(txt|htm|html|md|xml|js|min|map|css|scss|less|svg)$/i;tg.default={order:300,allowEmpty:!0,encoding:"utf8",canParse(e){return(typeof e.data=="string"||Buffer.isBuffer(e.data))&&W4.test(e.url)},parse(e){if(typeof e.data=="string")return e.data;if(Buffer.isBuffer(e.data))return e.data.toString(this.encoding);throw new q4.ParserError("data is not text",e.url)}}});var Q1=N(ng=>{"use strict";d();Object.defineProperty(ng,"__esModule",{value:!0});var H4=/\.(jpeg|jpg|gif|png|bmp|ico)$/i;ng.default={order:400,allowEmpty:!0,canParse(e){return Buffer.isBuffer(e.data)&&H4.test(e.url)},parse(e){return Buffer.isBuffer(e.data)?e.data:Buffer.from(e.data)}}});var rA=N(Xn=>{"use strict";d();var z4=Xn&&Xn.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),G4=Xn&&Xn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),V4=Xn&&Xn.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o<r.length;o++)r[o]!=="default"&&z4(n,t,r[o]);return G4(n,t),n}})(),J4=Xn&&Xn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Xn,"__esModule",{value:!0});var K4=J4(ze("fs")),eA=Mt(),tA=V4(bn()),nA=An();Xn.default={order:100,canRead(e){return tA.isFileSystemPath(e.url)},async read(e){let t;try{t=tA.toFileSystemPath(e.url)}catch(n){throw new nA.ResolverError(eA.ono.uri(n,`Malformed URI: ${e.url}`),e.url)}try{return await K4.default.promises.readFile(t)}catch(n){throw new nA.ResolverError((0,eA.ono)(n,`Error opening file "${t}"`),t)}}}});var uA=N(Vr=>{"use strict";d();var Y4=Vr&&Vr.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),X4=Vr&&Vr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Z4=Vr&&Vr.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o<r.length;o++)r[o]!=="default"&&Y4(n,t,r[o]);return X4(n,t),n}})();Object.defineProperty(Vr,"__esModule",{value:!0});var Pf=Mt(),Da=Z4(bn()),iA=An();Vr.default={order:200,headers:null,timeout:6e4,redirects:5,withCredentials:!1,canRead(e){return Da.isHttp(e.url)},read(e){let t=Da.parse(e.url);return typeof window<"u"&&!t.protocol&&(t.protocol=Da.parse(location.href).protocol),oA(t,this)}};async function oA(e,t,n){e=Da.parse(e);let r=n||[];r.push(e.href);try{let o=await Q4(e,t);if(o.status>=400)throw(0,Pf.ono)({status:o.status},`HTTP ERROR ${o.status}`);if(o.status>=300){if(!Number.isNaN(t.redirects)&&r.length>t.redirects)throw new iA.ResolverError((0,Pf.ono)({status:o.status},`Error downloading ${r[0]}.
|
|
125
|
+
Too many redirects:
|
|
126
|
+
${r.join(`
|
|
127
|
+
`)}`));if(!("location"in o.headers)||!o.headers.location)throw(0,Pf.ono)({status:o.status},`HTTP ${o.status} redirect with no location header`);{let s=Da.resolve(e.href,o.headers.location);return oA(s,t,r)}}else{if(o.body){let s=await o.arrayBuffer();return Buffer.from(s)}return Buffer.alloc(0)}}catch(o){throw new iA.ResolverError((0,Pf.ono)(o,`Error downloading ${e.href}`),e.href)}}async function Q4(e,t){let n,r;t.timeout&&(n=new AbortController,r=setTimeout(()=>n.abort(),t.timeout));let o=await fetch(e,{method:"GET",headers:t.headers||{},credentials:t.withCredentials?"include":"same-origin",signal:n?n.signal:null});return r&&clearTimeout(r),o}});var rg=N(Jr=>{"use strict";d();var Iu=Jr&&Jr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Jr,"__esModule",{value:!0});Jr.getNewOptions=Jr.getJsonSchemaRefParserDefaultOptions=void 0;var eq=Iu(Y1()),tq=Iu(X1()),nq=Iu(Z1()),rq=Iu(Q1()),iq=Iu(rA()),oq=Iu(uA()),uq=()=>({parse:{json:{...eq.default},yaml:{...tq.default},text:{...nq.default},binary:{...rq.default}},resolve:{file:{...iq.default},http:{...oq.default},external:!0},continueOnError:!1,dereference:{circular:!0,excludedPathMatcher:()=>!1,referenceResolution:"relative"},mutateInputSchema:!0});Jr.getJsonSchemaRefParserDefaultOptions=uq;var sq=e=>{let t=(0,Jr.getJsonSchemaRefParserDefaultOptions)();return e&&aA(t,e),t};Jr.getNewOptions=sq;function aA(e,t){if(sA(t)){let n=Object.keys(t).filter(r=>!["__proto__","constructor","prototype"].includes(r));for(let r=0;r<n.length;r++){let o=n[r],s=t[o],a=e[o];sA(s)?e[o]=aA(a||{},s):s!==void 0&&(e[o]=s)}}return e}function sA(e){return e&&typeof e=="object"&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}});var lA=N(Of=>{"use strict";d();Object.defineProperty(Of,"__esModule",{value:!0});Of.normalizeArgs=cA;var aq=rg();function cA(e){let t,n,r,o,s=Array.prototype.slice.call(e);typeof s[s.length-1]=="function"&&(o=s.pop()),typeof s[0]=="string"?(t=s[0],typeof s[2]=="object"?(n=s[1],r=s[2]):(n=void 0,r=s[1])):(t="",n=s[0],r=s[1]);try{r=(0,aq.getNewOptions)(r)}catch(a){console.error(`JSON Schema Ref Parser: Error normalizing options: ${a}`)}return!r.mutateInputSchema&&typeof n=="object"&&(n=JSON.parse(JSON.stringify(n))),{path:t,schema:n,options:r,callback:o}}Of.default=cA});var fA=N(Zn=>{"use strict";d();var cq=Zn&&Zn.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),lq=Zn&&Zn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),fq=Zn&&Zn.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o<r.length;o++)r[o]!=="default"&&cq(n,t,r[o]);return lq(n,t),n}})(),ig=Zn&&Zn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Zn,"__esModule",{value:!0});var pq=ig(Ou()),dq=ig(da()),hq=ig(Qm()),Bu=fq(bn()),Dq=An();function mq(e,t){if(!t.resolve?.external)return Promise.resolve();try{let n=og(e.schema,e.$refs._root$Ref.path+"#",e.$refs,t);return Promise.all(n)}catch(n){return Promise.reject(n)}}function og(e,t,n,r,o,s){o||(o=new Set);let a=[];if(e&&typeof e=="object"&&!ArrayBuffer.isView(e)&&!o.has(e)){o.add(e),pq.default.isExternal$Ref(e)&&a.push(gq(e,t,n,r));let l=Object.keys(e);for(let p of l){let D=dq.default.join(t,p),g=e[p];a=a.concat(og(g,D,n,r,o,s))}}return a}async function gq(e,t,n,r){let o=r.dereference?.externalReferenceResolution==="root",s=Bu.resolve(o?Bu.cwd():t,e.$ref),a=Bu.stripHash(s),l=n._$refs[a];if(l)return Promise.resolve(l.value);try{let p=await(0,hq.default)(s,n,r),D=og(p,a+"#",n,r,new Set,!0);return Promise.all(D)}catch(p){if(!r?.continueOnError||!(0,Dq.isHandledError)(p))throw p;return n._$refs[a]&&(p.source=decodeURI(Bu.stripHash(t)),p.path=Bu.safePointerToPath(Bu.getHash(t))),[]}}Zn.default=mq});var hA=N(Qn=>{"use strict";d();var _q=Qn&&Qn.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),yq=Qn&&Qn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Fq=Qn&&Qn.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o<r.length;o++)r[o]!=="default"&&_q(n,t,r[o]);return yq(n,t),n}})(),dA=Qn&&Qn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Qn,"__esModule",{value:!0});var Tf=dA(Ou()),ma=dA(da()),ug=Fq(bn());function Eq(e,t){let n=[];sg(e,"schema",e.$refs._root$Ref.path+"#","#",0,n,e.$refs,t),vq(n)}function sg(e,t,n,r,o,s,a,l){let p=t===null?e:e[t];if(p&&typeof p=="object"&&!ArrayBuffer.isView(p))if(Tf.default.isAllowed$Ref(p))pA(e,t,n,r,o,s,a,l);else{let D=Object.keys(p).sort((g,E)=>g==="definitions"?-1:E==="definitions"?1:g.length-E.length);for(let g of D){let E=ma.default.join(n,g),w=ma.default.join(r,g),v=p[g];Tf.default.isAllowed$Ref(v)?pA(p,g,n,w,o,s,a,l):sg(p,g,E,w,o,s,a,l)}}}function pA(e,t,n,r,o,s,a,l){let p=t===null?e:e[t],D=ug.resolve(n,p.$ref),g=a._resolve(D,r,l);if(g===null)return;let w=ma.default.parse(r).length,v=ug.stripHash(g.path),S=ug.getHash(g.path),O=v!==a._root$Ref.path,P=Tf.default.isExtended$Ref(p);o+=g.indirections;let I=Cq(s,e,t);if(I)if(w<I.depth||o<I.indirections)wq(s,I);else return;s.push({$ref:p,parent:e,key:t,pathFromRoot:r,depth:w,file:v,hash:S,value:g.value,circular:g.circular,extended:P,external:O,indirections:o}),(!I||O)&&sg(g.value,null,g.path,r,o+1,s,a,l)}function vq(e){e.sort((o,s)=>{if(o.file!==s.file)return o.file<s.file?-1:1;if(o.hash!==s.hash)return o.hash<s.hash?-1:1;if(o.circular!==s.circular)return o.circular?-1:1;if(o.extended!==s.extended)return o.extended?1:-1;if(o.indirections!==s.indirections)return o.indirections-s.indirections;if(o.depth!==s.depth)return o.depth-s.depth;{let a=o.pathFromRoot.lastIndexOf("/definitions"),l=s.pathFromRoot.lastIndexOf("/definitions");return a!==l?l-a:o.pathFromRoot.length-s.pathFromRoot.length}});let t,n,r;for(let o of e)o.external?o.file===t&&o.hash===n?o.$ref.$ref=r:o.file===t&&o.hash.indexOf(n+"/")===0?o.$ref.$ref=ma.default.join(r,ma.default.parse(o.hash.replace(n,"#"))):(t=o.file,n=o.hash,r=o.pathFromRoot,o.$ref=o.parent[o.key]=Tf.default.dereference(o.$ref,o.value),o.circular&&(o.$ref.$ref=o.pathFromRoot)):o.$ref.$ref=o.hash}function Cq(e,t,n){for(let r of e)if(r&&r.parent===t&&r.key===n)return r}function wq(e,t){let n=e.indexOf(t);e.splice(n,1)}Qn.default=Eq});var FA=N(er=>{"use strict";d();var bq=er&&er.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Aq=er&&er.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Sq=er&&er.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o<r.length;o++)r[o]!=="default"&&bq(n,t,r[o]);return Aq(n,t),n}})(),_A=er&&er.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(er,"__esModule",{value:!0});var If=_A(Ou()),DA=_A(da()),xq=Mt(),mA=Sq(bn()),Pq=An();er.default=Oq;function Oq(e,t){let n=Date.now(),r=ag(e.schema,e.$refs._root$Ref.path,"#",new Set,new Set,new Map,e.$refs,t,n);e.$refs.circular=r.circular,e.schema=r.value}function ag(e,t,n,r,o,s,a,l,p){let D,g={value:e,circular:!1};if(l&&l.timeoutMs&&Date.now()-p>l.timeoutMs)throw new Pq.TimeoutError(l.timeoutMs);let E=l.dereference||{},w=E.excludedPathMatcher||(()=>!1);if((E?.circular==="ignore"||!o.has(e))&&e&&typeof e=="object"&&!ArrayBuffer.isView(e)&&!w(n)){if(r.add(e),o.add(e),If.default.isAllowed$Ref(e,l))D=gA(e,t,n,r,o,s,a,l,p),g.circular=D.circular,g.value=D.value;else for(let v of Object.keys(e)){let S=DA.default.join(t,v),O=DA.default.join(n,v);if(w(O))continue;let P=e[v],I=!1;if(If.default.isAllowed$Ref(P,l)){if(D=gA(P,S,O,r,o,s,a,l,p),I=D.circular,e[v]!==D.value){let U=new Map;E?.preservedProperties&&typeof e[v]=="object"&&!Array.isArray(e[v])&&E?.preservedProperties.forEach(q=>{q in e[v]&&U.set(q,e[v][q])}),e[v]=D.value,E?.preservedProperties&&U.size&&typeof e[v]=="object"&&!Array.isArray(e[v])&&U.forEach((q,X)=>{e[v][X]=q}),E?.onDereference?.(P.$ref,e[v],e,v)}}else r.has(P)?I=yA(S,a,l):(D=ag(P,S,O,r,o,s,a,l,p),I=D.circular,e[v]!==D.value&&(e[v]=D.value));g.circular=g.circular||I}r.delete(e)}return g}function gA(e,t,n,r,o,s,a,l,p){let g=If.default.isExternal$Ref(e)&&l?.dereference?.externalReferenceResolution==="root",E=mA.resolve(g?mA.cwd():t,e.$ref),w=s.get(E);if(w&&!w.circular){let U=Object.keys(e);if(U.length>1){let q={};for(let X of U)X!=="$ref"&&!(X in w.value)&&(q[X]=e[X]);return{circular:w.circular,value:Object.assign({},w.value,q)}}return w}let v=a._resolve(E,t,l);if(v===null)return{circular:!1,value:null};let S=v.circular,O=S||r.has(v.value);O&&yA(t,a,l);let P=If.default.dereference(e,v.value);if(!O){let U=ag(P,v.path,n,r,o,s,a,l,p);O=U.circular,P=U.value}O&&!S&&l.dereference?.circular==="ignore"&&(P=e),S&&(P.$ref=n);let I={circular:O,value:P};return Object.keys(e).length===1&&s.set(E,I),I}function yA(e,t,n){if(t.circular=!0,n?.dereference?.onCircular?.(e),!n.dereference.circular)throw xq.ono.reference(`Circular $ref pointer found at ${e}`);return!0}});var EA=N(cg=>{"use strict";d();Object.defineProperty(cg,"__esModule",{value:!0});function Tq(){return typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:typeof setImmediate=="function"?setImmediate:function(t){setTimeout(t,0)}}cg.default=Tq()});var CA=N(ga=>{"use strict";d();var Iq=ga&&ga.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ga,"__esModule",{value:!0});ga.default=Bq;var vA=Iq(EA());function Bq(e,t){if(e){t.then(function(n){(0,vA.default)(function(){e(null,n)})},function(n){(0,vA.default)(function(){e(n)})});return}else return t}});var SA=N(ue=>{"use strict";d();var Rq=ue&&ue.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Nq=ue&&ue.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Mq=ue&&ue.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o<r.length;o++)r[o]!=="default"&&Rq(n,t,r[o]);return Nq(n,t),n}})(),wo=ue&&ue.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ue,"__esModule",{value:!0});ue.getJsonSchemaRefParserDefaultOptions=ue.jsonSchemaParserNormalizeArgs=ue.dereferenceInternal=ue.JSONParserErrorGroup=ue.isHandledError=ue.UnmatchedParserError=ue.ParserError=ue.ResolverError=ue.MissingPointerError=ue.InvalidPointerError=ue.JSONParserError=ue.UnmatchedResolverError=ue.dereference=ue.bundle=ue.resolve=ue.parse=ue.$RefParser=void 0;var wA=wo(z1()),jq=wo(Qm()),_a=wo(lA());ue.jsonSchemaParserNormalizeArgs=_a.default;var $q=wo(fA()),Lq=wo(hA()),AA=wo(FA());ue.dereferenceInternal=AA.default;var Co=Mq(bn()),Sn=An();Object.defineProperty(ue,"JSONParserError",{enumerable:!0,get:function(){return Sn.JSONParserError}});Object.defineProperty(ue,"InvalidPointerError",{enumerable:!0,get:function(){return Sn.InvalidPointerError}});Object.defineProperty(ue,"MissingPointerError",{enumerable:!0,get:function(){return Sn.MissingPointerError}});Object.defineProperty(ue,"ResolverError",{enumerable:!0,get:function(){return Sn.ResolverError}});Object.defineProperty(ue,"ParserError",{enumerable:!0,get:function(){return Sn.ParserError}});Object.defineProperty(ue,"UnmatchedParserError",{enumerable:!0,get:function(){return Sn.UnmatchedParserError}});Object.defineProperty(ue,"UnmatchedResolverError",{enumerable:!0,get:function(){return Sn.UnmatchedResolverError}});Object.defineProperty(ue,"isHandledError",{enumerable:!0,get:function(){return Sn.isHandledError}});Object.defineProperty(ue,"JSONParserErrorGroup",{enumerable:!0,get:function(){return Sn.JSONParserErrorGroup}});var bA=Mt(),tr=wo(CA()),Uq=rg();Object.defineProperty(ue,"getJsonSchemaRefParserDefaultOptions",{enumerable:!0,get:function(){return Uq.getJsonSchemaRefParserDefaultOptions}});var Ii=class e{constructor(){this.schema=null,this.$refs=new wA.default}async parse(){let t=(0,_a.default)(arguments),n;if(!t.path&&!t.schema){let o=(0,bA.ono)(`Expected a file path, URL, or object. Got ${t.path||t.schema}`);return(0,tr.default)(t.callback,Promise.reject(o))}this.schema=null,this.$refs=new wA.default;let r="http";if(Co.isFileSystemPath(t.path))t.path=Co.fromFileSystemPath(t.path),r="file";else if(!t.path&&t.schema&&"$id"in t.schema&&t.schema.$id){let o=Co.parse(t.schema.$id),s=o.protocol==="https:"?443:80;t.path=`${o.protocol}//${o.hostname}:${s}`}if(t.path=Co.resolve(Co.cwd(),t.path),t.schema&&typeof t.schema=="object"){let o=this.$refs._add(t.path);o.value=t.schema,o.pathType=r,n=Promise.resolve(t.schema)}else n=(0,jq.default)(t.path,this.$refs,t.options);try{let o=await n;if(o!==null&&typeof o=="object"&&!Buffer.isBuffer(o))return this.schema=o,(0,tr.default)(t.callback,Promise.resolve(this.schema));if(t.options.continueOnError)return this.schema=null,(0,tr.default)(t.callback,Promise.resolve(this.schema));throw bA.ono.syntax(`"${this.$refs._root$Ref.path||o}" is not a valid JSON Schema`)}catch(o){return!t.options.continueOnError||!(0,Sn.isHandledError)(o)?(0,tr.default)(t.callback,Promise.reject(o)):(this.$refs._$refs[Co.stripHash(t.path)]&&this.$refs._$refs[Co.stripHash(t.path)].addError(o),(0,tr.default)(t.callback,Promise.resolve(null)))}}static parse(){let t=new e;return t.parse.apply(t,arguments)}async resolve(){let t=(0,_a.default)(arguments);try{return await this.parse(t.path,t.schema,t.options),await(0,$q.default)(this,t.options),lg(this),(0,tr.default)(t.callback,Promise.resolve(this.$refs))}catch(n){return(0,tr.default)(t.callback,Promise.reject(n))}}static resolve(){let t=new e;return t.resolve.apply(t,arguments)}static bundle(){let t=new e;return t.bundle.apply(t,arguments)}async bundle(){let t=(0,_a.default)(arguments);try{return await this.resolve(t.path,t.schema,t.options),(0,Lq.default)(this,t.options),lg(this),(0,tr.default)(t.callback,Promise.resolve(this.schema))}catch(n){return(0,tr.default)(t.callback,Promise.reject(n))}}static dereference(){let t=new e;return t.dereference.apply(t,arguments)}async dereference(){let t=(0,_a.default)(arguments);try{return await this.resolve(t.path,t.schema,t.options),(0,AA.default)(this,t.options),lg(this),(0,tr.default)(t.callback,Promise.resolve(this.schema))}catch(n){return(0,tr.default)(t.callback,Promise.reject(n))}}};ue.$RefParser=Ii;ue.default=Ii;function lg(e){if(Sn.JSONParserErrorGroup.getParserErrors(e).length>0)throw new Sn.JSONParserErrorGroup(e)}ue.parse=Ii.parse;ue.resolve=Ii.resolve;ue.bundle=Ii.bundle;ue.dereference=Ii.dereference});var PA=N((xae,xA)=>{d();function kq(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}xA.exports=kq});var ya=N((Oae,OA)=>{d();var qq=Jy(),Wq=j8();function Hq(e,t,n,r){var o=!n;n||(n={});for(var s=-1,a=t.length;++s<a;){var l=t[s],p=r?r(n[l],e[l],l,n,e):void 0;p===void 0&&(p=e[l]),o?Wq(n,l,p):qq(n,l,p)}return n}OA.exports=Hq});var IA=N((Iae,TA)=>{d();var zq=ya(),Gq=Sy();function Vq(e,t){return e&&zq(t,Gq(t),e)}TA.exports=Vq});var RA=N((Rae,BA)=>{d();var Jq=ya(),Kq=Ky();function Yq(e,t){return e&&Jq(t,Kq(t),e)}BA.exports=Yq});var LA=N((Fa,Ru)=>{d();var Xq=w8(),$A=typeof Fa=="object"&&Fa&&!Fa.nodeType&&Fa,NA=$A&&typeof Ru=="object"&&Ru&&!Ru.nodeType&&Ru,Zq=NA&&NA.exports===$A,MA=Zq?Xq.Buffer:void 0,jA=MA?MA.allocUnsafe:void 0;function Qq(e,t){if(t)return e.slice();var n=e.length,r=jA?jA(n):new e.constructor(n);return e.copy(r),r}Ru.exports=Qq});var kA=N((jae,UA)=>{d();function e5(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}UA.exports=e5});var WA=N((Lae,qA)=>{d();var t5=ya(),n5=P8();function r5(e,t){return t5(e,n5(e),t)}qA.exports=r5});var zA=N((kae,HA)=>{d();var i5=ya(),o5=L8();function u5(e,t){return i5(e,o5(e),t)}HA.exports=u5});var VA=N((Wae,GA)=>{d();var s5=Object.prototype,a5=s5.hasOwnProperty;function c5(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&a5.call(e,"index")&&(n.index=e.index,n.input=e.input),n}GA.exports=c5});var Bf=N((zae,KA)=>{d();var JA=S8();function l5(e){var t=new e.constructor(e.byteLength);return new JA(t).set(new JA(e)),t}KA.exports=l5});var XA=N((Vae,YA)=>{d();var f5=Bf();function p5(e,t){var n=t?f5(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}YA.exports=p5});var QA=N((Kae,ZA)=>{d();var d5=/\w*$/;function h5(e){var t=new e.constructor(e.source,d5.exec(e));return t.lastIndex=e.lastIndex,t}ZA.exports=h5});var iS=N((Xae,rS)=>{d();var eS=b8(),tS=eS?eS.prototype:void 0,nS=tS?tS.valueOf:void 0;function D5(e){return nS?Object(nS.call(e)):{}}rS.exports=D5});var uS=N((Qae,oS)=>{d();var m5=Bf();function g5(e,t){var n=t?m5(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}oS.exports=g5});var aS=N((tce,sS)=>{d();var _5=Bf(),y5=XA(),F5=QA(),E5=iS(),v5=uS(),C5="[object Boolean]",w5="[object Date]",b5="[object Map]",A5="[object Number]",S5="[object RegExp]",x5="[object Set]",P5="[object String]",O5="[object Symbol]",T5="[object ArrayBuffer]",I5="[object DataView]",B5="[object Float32Array]",R5="[object Float64Array]",N5="[object Int8Array]",M5="[object Int16Array]",j5="[object Int32Array]",$5="[object Uint8Array]",L5="[object Uint8ClampedArray]",U5="[object Uint16Array]",k5="[object Uint32Array]";function q5(e,t,n){var r=e.constructor;switch(t){case T5:return _5(e);case C5:case w5:return new r(+e);case I5:return y5(e,n);case B5:case R5:case N5:case M5:case j5:case $5:case L5:case U5:case k5:return v5(e,n);case b5:return new r;case A5:case P5:return new r(e);case S5:return F5(e);case x5:return new r;case O5:return E5(e)}}sS.exports=q5});var fS=N((rce,lS)=>{d();var W5=Cy(),cS=Object.create,H5=(function(){function e(){}return function(t){if(!W5(t))return{};if(cS)return cS(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}})();lS.exports=H5});var dS=N((oce,pS)=>{d();var z5=fS(),G5=$8(),V5=T8();function J5(e){return typeof e.constructor=="function"&&!V5(e)?z5(G5(e)):{}}pS.exports=J5});var DS=N((sce,hS)=>{d();var K5=Cd(),Y5=wy(),X5="[object Map]";function Z5(e){return Y5(e)&&K5(e)==X5}hS.exports=Z5});var yS=N((cce,_S)=>{d();var Q5=DS(),eW=by(),mS=Ay(),gS=mS&&mS.isMap,tW=gS?eW(gS):Q5;_S.exports=tW});var ES=N((fce,FS)=>{d();var nW=Cd(),rW=wy(),iW="[object Set]";function oW(e){return rW(e)&&nW(e)==iW}FS.exports=oW});var bS=N((dce,wS)=>{d();var uW=ES(),sW=by(),vS=Ay(),CS=vS&&vS.isSet,aW=CS?sW(CS):uW;wS.exports=aW});var OS=N((Dce,PS)=>{d();var cW=A8(),lW=PA(),fW=Jy(),pW=IA(),dW=RA(),hW=LA(),DW=kA(),mW=WA(),gW=zA(),_W=I8(),yW=U8(),FW=Cd(),EW=VA(),vW=aS(),CW=dS(),wW=x8(),bW=O8(),AW=yS(),SW=Cy(),xW=bS(),PW=Sy(),OW=Ky(),TW=1,IW=2,BW=4,AS="[object Arguments]",RW="[object Array]",NW="[object Boolean]",MW="[object Date]",jW="[object Error]",SS="[object Function]",$W="[object GeneratorFunction]",LW="[object Map]",UW="[object Number]",xS="[object Object]",kW="[object RegExp]",qW="[object Set]",WW="[object String]",HW="[object Symbol]",zW="[object WeakMap]",GW="[object ArrayBuffer]",VW="[object DataView]",JW="[object Float32Array]",KW="[object Float64Array]",YW="[object Int8Array]",XW="[object Int16Array]",ZW="[object Int32Array]",QW="[object Uint8Array]",eH="[object Uint8ClampedArray]",tH="[object Uint16Array]",nH="[object Uint32Array]",je={};je[AS]=je[RW]=je[GW]=je[VW]=je[NW]=je[MW]=je[JW]=je[KW]=je[YW]=je[XW]=je[ZW]=je[LW]=je[UW]=je[xS]=je[kW]=je[qW]=je[WW]=je[HW]=je[QW]=je[eH]=je[tH]=je[nH]=!0;je[jW]=je[SS]=je[zW]=!1;function Rf(e,t,n,r,o,s){var a,l=t&TW,p=t&IW,D=t&BW;if(n&&(a=o?n(e,r,o,s):n(e)),a!==void 0)return a;if(!SW(e))return e;var g=wW(e);if(g){if(a=EW(e),!l)return DW(e,a)}else{var E=FW(e),w=E==SS||E==$W;if(bW(e))return hW(e,l);if(E==xS||E==AS||w&&!o){if(a=p||w?{}:CW(e),!l)return p?gW(e,dW(a,e)):mW(e,pW(a,e))}else{if(!je[E])return o?e:{};a=vW(e,E,l)}}s||(s=new cW);var v=s.get(e);if(v)return v;s.set(e,a),xW(e)?e.forEach(function(P){a.add(Rf(P,t,n,P,e,s))}):AW(e)&&e.forEach(function(P,I){a.set(I,Rf(P,t,n,I,e,s))});var S=D?p?yW:_W:p?OW:PW,O=g?void 0:S(e);return lW(O||e,function(P,I){O&&(I=P,P=e[I]),fW(a,I,Rf(P,t,n,I,e,s))}),a}PS.exports=Rf});var IS=N((gce,TS)=>{d();var rH=OS(),iH=1,oH=4;function uH(e){return rH(e,iH|oH)}TS.exports=uH});d();d();async function jd(e,t,n=1){let r;try{return r=await e(),r}catch(o){if(n>0)return await t(),jd(e,t,n-1);throw o}}import{pipeline as z8}from"stream/promises";import z0 from"node:stream/promises";import*as G0 from"node:zlib";import{fileURLToPath as kd}from"node:url";var V0="9.2.2",J0="9.1.0",K0="4",G8="123.0.0",Y0="1.0.2",X0="2.0.1";function Z0(e){return e==="0"||e==="1"?{functionRunner:"7.0.1",javy:"4.0.0",javyPlugin:"1"}:e==="2"?{functionRunner:V0,javy:J0,javyPlugin:K0}:null}var Cs=class{name;version;path;release;gitHubRepo;supportsWindowsOnArm;constructor(t,n,r,o,s=`v${n}`){this.name=t,this.version=n,this.release=s,this.supportsWindowsOnArm=o;let a;a=`${t}-${n}`,a=process.platform==="win32"?`${a}.exe`:a,this.path=B(De(kd(import.meta.url)),"..","bin",a),this.gitHubRepo=r}downloadUrl(t,n){let r,o;switch(t.toLowerCase()){case"darwin":r="macos";break;case"linux":r="linux";break;case"win32":r="windows";break;default:throw Error(`Unsupported platform ${t}`)}switch(n.toLowerCase()){case"arm":case"arm64":o="arm";break;case"ia32":case"x64":o="x86_64";break;default:throw Error(`Unsupported architecture ${n}`)}let s=`${o}-${r}`,a=["arm-linux","arm-macos","x86_64-macos","x86_64-windows","x86_64-linux"];if(this.supportsWindowsOnArm&&a.push("arm-windows"),!a.includes(s))throw Error(`Unsupported platform/architecture combination ${t}/${n}`);return`https://github.com/${this.gitHubRepo}/releases/download/${this.release}/${this.name}-${s}-v${this.version}.gz`}async processResponse(t,n){return J8(t,n)}},Ld=class{name;version;path;constructor(t){this.name=`shopify_functions_javy_v${t}`,this.version=t,this.path=B(De(kd(import.meta.url)),"..","bin",`shopify_functions_javy_v${t}.wasm`)}downloadUrl(t,n){return`https://cdn.shopify.com/shopifycloud/shopify-functions-javy-plugin/shopify_functions_javy_v${this.version}.wasm`}async processResponse(t,n){return z8(t,n)}},Ud=class{name;version;path;constructor(t,n){this.name=t,this.version=n,this.path=B(De(kd(import.meta.url)),"..","bin",t)}downloadUrl(t,n){return`https://cdn.jsdelivr.net/npm/binaryen@${this.version}/bin/wasm-opt`}async processResponse(t,n){await z0.pipeline(t,n)}},$d;function qd(e=J0){return new Cs("javy",e,"bytecodealliance/javy",$c(e,">=7.0.0"))}function Wd(e=K0){return new Ld(e)}function qH(e=V0){return new Cs("function-runner",e,"Shopify/function-runner",$c(e,">=9.1.1"))}function ws(){return $d||($d=new Ud("wasm-opt.cjs",G8)),$d}function Q0(e){return new Cs("shopify-function-trampoline",e,"Shopify/shopify-function-wasm-api",$c(e,">=2.0.1"),`shopify_function_trampoline/v${e}`)}var Yc=new Map;async function oo(e){if(await K(e.path)&&!Yc.has(e.path))return;let n=Yc.get(e.path);if(n){await n;return}let r=V8(e);Yc.set(e.path,r);try{await r}finally{Yc.delete(e.path)}}async function V8(e){let t=e.downloadUrl(process.platform,process.arch);ce(`Downloading ${e.name} ${e.version} from ${t} to ${e.path}`);let n=De(e.path);await K(n)||await Nn(n),await jd(async()=>{let r=await $y(t,void 0,"slow-request");if(r.status!==200)throw new Error(`Downloading ${e.name} failed with status code of ${r.status}`);let o=r.body;if(o===null)throw new Error(`Downloading ${e.name} failed with empty response body`);await Ds(async s=>{let a=B(s,"binary"),l=Ny(a);await e.processResponse(o,l),await My(a,509),await Tc(a,e.path,{overwrite:!0})})},async()=>{},2)}async function J8(e,t){let n=G0.createGunzip();await z0.pipeline(e,n,t)}d();function eF(e,t){return async n=>{let r=await e.appsForOrg(t,n);return{apps:r.apps,hasMorePages:r.hasMorePages}}}d();d();import{brotliCompress as K8,constants as Y8}from"node:zlib";import{promisify as X8}from"node:util";var Z8=X8(K8);async function Q8(e){let t=await $e(e),n=Buffer.byteLength(t),o=(await Z8(Buffer.from(t),{params:{[Y8.BROTLI_PARAM_QUALITY]:11}})).byteLength;return{path:e,rawBytes:n,compressedBytes:o}}function tF(e){return e>=1024*1024?`${(e/(1024*1024)).toFixed(2)} MB`:`${(e/1024).toFixed(1)} KB`}async function nF(e){try{let{rawBytes:t,compressedBytes:n}=await Q8(e);return` (${tF(t)} original, ~${tF(n)} compressed)`}catch(t){return ce(`Failed to get bundle size for ${e}: ${t}`),""}}d();d();import{createInterface as eB}from"readline";var tB=[".git",".hg",".bzr",".svn","_darcs","CVS",".sublime-(project|workspace)",".DS_Store",".sass-cache","Thumbs.db","desktop.ini","config.yml","node_modules",".gitkeep",".shopifyignore","*.toml"];async function bs(e){let n=B(e,".shopifyignore"),r=tB.map(o=>B("*",o));if(Rt(n)){let o=await nB(n);r.push(...o)}return Ge("*/*",{absolute:!0,cwd:e,ignore:r})}function nB(e){return new Promise((t,n)=>{let r=[],o=eB({input:Ry(e),crlfDelay:1/0});o.on("line",s=>{let a=s.trim();a.length>0&&!a.startsWith("#")&&r.push(a)}),o.on("close",()=>{t(r)}),o.on("error",s=>{n(s)})})}import{context as yB,formatMessagesSync as DF}from"esbuild";var mF=li(hF(),1);async function Hd(e,t=process.env){let n=vB(e,t),r=await yB(n);try{let o=await r.rebuild();EB(o,e),await FB(o,e.outputPath)}catch(o){throw Ad()==="json"&&o instanceof Error&&e.stderr.write(`${o.message}
|
|
128
|
+
`),o}finally{await r.dispose()}}async function FB(e,t){if(!e?.metafile)return;let{dir:n,name:r}=Fy(t),o=B(n,`${r}.metafile.json`);try{await mt(o,JSON.stringify(e.metafile))}catch(s){Rr(`Failed to write metafile to ${o}: ${s}`)}}function EB(e,t){let n=e?.warnings??[],r=e?.errors??[];n.length>0&&DF(n,{kind:"warning"}).forEach(s=>{t.stdout.write(s)}),r.length>0&&DF(r,{kind:"error"}).forEach(s=>{t.stderr.write(s)})}function vB(e,t=process.env){let n=Mc(t,(a,l)=>Hc.test(l)&&a),r={...e.env,...n},o=Object.keys(r||{}).reduce((a,l)=>({...a,[`process.env.${l}`]:JSON.stringify(r[l])}),{"process.env.NODE_ENV":JSON.stringify(e.environment)}),s={outfile:e.outputPath,stdin:e.stdin,bundle:!0,define:o,jsx:"automatic",logLevel:Ad()==="json"?"silent":e.logLevel??"error",loader:{".esnext":"ts",".js":"jsx"},legalComments:"none",minify:e.minify,plugins:CB(e.stdin.resolveDir,t),target:"es6",resolveExtensions:[".tsx",".ts",".js",".json",".esnext",".mjs",".ejs"]};if(e.sourceMaps&&(s.sourcemap=!0,s.sourceRoot=`${e.stdin.resolveDir}/src`),e.environment==="production"&&(s.metafile=!0),e.environment==="development"){let a=r[Id.disableMinificationOnDev];s.minify=!ds(a),s.logLevel="silent"}return s}function CB(e,t=process.env){let n=[mF.default.default()],r=ds(t[Id.skipEsbuildReactDedeuplication]);if(e&&!r){let o;try{o=ze.resolve("react",{paths:[e]})}catch{ce(`Unable to load React in ${e}, skipping React de-duplication`)}o&&(ce(`Deduplicating React dependency for ${e}, using ${o}`),n.push(wB(o)))}return n}function wB(e){return{name:"shopify:deduplicate-react",setup({onResolve:t}){t({filter:/^react$/},n=>({path:e}))}}}d();import{build as yF}from"esbuild";var bB="2",gF={defaultScalarType:"unknown",scalars:{Date:"string",DateTime:"string",DateTimeWithoutTimezone:"string",Decimal:"string",Handle:"string",ID:"string",JSON:"unknown",TimeWithoutTimezone:"string",URL:"string",Void:"null"}},As=class extends k{constructor(t){super(t,xe`Make sure you have a compatible version of the ${Se.yellow("@shopify/shopify_function")} library installed.`,[xe`Add ${Se.green(`"@shopify/shopify_function": "~${bB}.0.0"`)} to the dependencies section of the package.json file in your function's directory, if not already present.`.value,"Run your package manager's install command to update dependencies."])}};async function FF(e,t){let n=TB(e),r=n.length===0?OB:new Gd(n),o=await vF(e);return t.useTasks?SB(e,t,r,o):AB(e,t,r,o)}async function AB(e,t,n,r){t.signal?.aborted||(t.stdout.write(`Building function ${e.localIdentifier}...`),t.stdout.write(`Building GraphQL types...
|
|
129
|
+
`),await Ss(e,t)),t.signal?.aborted||(t.stdout.write(`Bundling JS function...
|
|
130
|
+
`),await n.bundle(e,t)),t.signal?.aborted||(t.stdout.write(`Running javy...
|
|
131
|
+
`),await n.compile(e,t,r)),t.signal?.aborted||t.stdout.write(`Done!
|
|
132
|
+
`)}async function SB(e,t,n,r){await s0([{title:"Building GraphQL types",task:async()=>{await Ss(e,t)}},{title:"Bundling JS function",task:async()=>{await n.bundle(e,t)}},{title:"Running javy",task:async()=>{await n.compile(e,t,r)}}])}async function Ss(e,t){if(e.typegenCommand){let s=e.typegenCommand.split(" ");return xd("cmd_all_timing_network_ms")(async()=>hi(s[0],s.slice(1),{cwd:e.directory,stdout:t.stdout,stderr:t.stderr,signal:t.signal}))}if(!e.isJavaScript)throw new k("No typegen_command specified. Set build.typegen_command in your function extension TOML to generate GraphQL types for non-JavaScript functions.");let n=B(e.directory,"package.json");if(!await K(n))return zd(e,t,"package.json");let r=await Lc(n);if(!r.codegen)return zd(e,t,"package.json");let o={...r.codegen,config:{...gF,...r.codegen.config??{},scalars:{...gF.scalars,...r.codegen.config?.scalars??{}}}};return Ds(async s=>{let a=B(s,"codegen.json");return await mt(a,JSON.stringify(o)),zd(e,t,a)})}async function zd(e,t,n){let r=await n0(e.directory,"graphql-code-generator","--config",n);return xd("cmd_all_timing_network_ms")(async()=>hi(r.command,r.args,{cwd:e.directory,stderr:t.stderr,signal:t.signal}))}async function EF(e){let t=await lr("node_modules/@shopify/shopify_function/index.ts",{type:"file",cwd:e.directory}),n=await lr("node_modules/@shopify/shopify_function/run.ts",{type:"file",cwd:e.directory});if(!t||!n)throw new As("Could not find the Shopify Functions JavaScript library.");if(!e.entrySourceFilePath)throw new k("Could not find your function entry point. It must be in src/index.js or src/index.ts");return t}async function vF(e){let t=await lr("node_modules/@shopify/shopify_function/package.json",{type:"file",cwd:e.directory});if(!t)throw new As("Could not find the Shopify Functions JavaScript library.");let r=JSON.parse(await $e(t)).version.split(".")[0],o=Z0(r);if(o===null)throw new As("The installed version of the Shopify Functions JavaScript library is not compatible with this version of Shopify CLI.");return o}async function xB(e,t,n=process.env){let r=await EF(e),o={...CF(e.directory,e.entrySourceFilePath,t.app.dotenv?.variables??{},n),entryPoints:[r]};return yF(o)}function CF(e,t,n,r=process.env){let o=Mc(r,(p,D)=>Hc.test(D)&&p),s={...n,...o},a=Object.keys(s||{}).reduce((p,D)=>({...p,[`process.env.${D}`]:JSON.stringify(s[D])}),{});return{outfile:B(e,"dist/function.js"),alias:{"user-function":t},define:a,logLevel:"silent",bundle:!0,legalComments:"none",target:"es2022",format:"esm"}}async function wF(e){let t=ws();await oo(t);let n=De(ws().path),r="node",o=[ws().name,e,"-Oz","--enable-bulk-memory","--enable-multimemory","--enable-nontrapping-float-to-int","--strip-debug","-o",e];ce(`Wasm binary: ${ws().name}`),ce("Optimizing this wasm binary using wasm-opt."),await hi(r,o,{cwd:n})}async function bF(e){let t,n=await PB(e);if(n.includes("shopify_function_v1")?t=Y0:n.includes("shopify_function_v2")&&(t=X0),!t)return;let r=Q0(t);await oo(r);let o=r.path,s=["-i",e,"-o",e];ce(`Applying trampoline to the wasm binary with command: ${o} ${s.join(" ")}`),await hi(o,s)}async function PB(e){let t=new Uint8Array(eo(e));if(!WebAssembly.validate(t))return[];let r=new WebAssembly.Module(t),o=WebAssembly.Module.imports(r);return Bt(o.map(s=>s.module))}async function AF(e,t,n,r=[]){let o=qd(n.javy),s=Wd(n.javyPlugin);await Promise.all([oo(o),oo(s)]);let a=["build","-C","dynamic","-C",`plugin=${s.path}`,...r,"-o",e.outputPath,"dist/function.js"];return hi(o.path,a,{cwd:e.directory,stdout:t.stdout,stderr:t.stderr,signal:t.signal})}async function Nz(e){let n=e.allExtensions.filter(l=>l.features.includes("function")&&l.isJavaScript).map(l=>vF(l)),r=await Promise.all(n),o=new Set,s=new Set;r.forEach(l=>{o.add(l.javy),s.add(l.javyPlugin)});let a=[];o.forEach(l=>{a.push(oo(qd(l)))}),s.forEach(l=>{a.push(oo(Wd(l)))}),await Promise.all(a)}var OB={async bundle(e,t){return xB(e,t)},async compile(e,t,n){return AF(e,t,n)}},_F="shopify-function",Gd=class{exports;constructor(t){this.exports=t}async bundle(t,n,r=process.env){await EF(t);let o=this.entrypointContents;ce("Generating dist/function.js using generated module:"),ce(o);let s={...CF(t.directory,t.entrySourceFilePath,n.app.dotenv?.variables??{},r),stdin:{contents:o,loader:"ts",resolveDir:t.directory}};return yF(s)}async compile(t,n,r){let o=this.wit;return ce("Generating world to use with Javy:"),ce(o),Ds(async s=>{let a=B(s,"javy-world.wit");return await mt(a,o),AF(t,n,r,["-C",`wit=${a}`,"-C",`wit-world=${_F}`])})}get wit(){let t=this.exports.map(n=>`export %${bd(n)}: func();`);return`package function:impl;
|
|
133
|
+
|
|
134
|
+
world ${_F} {
|
|
135
|
+
${t.join(`
|
|
136
|
+
`)}
|
|
137
|
+
}`}get entrypointContents(){let t=`
|
|
138
|
+
import __runFunction from "@shopify/shopify_function/run"`,n=this.exports.map(r=>{let o=wd(r),s=wd(`run-${r}`);return`
|
|
139
|
+
import { ${o} as ${s} } from "user-function"
|
|
140
|
+
export function ${o}() { return __runFunction(${s}) }`});return`${t}
|
|
141
|
+
${n.join(`
|
|
142
|
+
`)}`}};function TB(e){let t=e.configuration.targeting??[],n=t.filter(s=>!s.export),r=t.filter(s=>!!s.export);if(t.length>1&&n.length>0)throw new Error(`Can't infer export name for targets:
|
|
143
|
+
${n.map(({target:s})=>`- '${s}'`).join(`
|
|
144
|
+
`)}
|
|
145
|
+
All targets must have an export when multiple targets are present.`);let o=r.filter(s=>!s.export.match(/^[a-z0-9-]+$/));if(o.length>0){let s=[],a=o.map(l=>`'${l.export}'`);throw s.push(`Invalid export names: ${a.join(", ")}.
|
|
146
|
+
|
|
147
|
+
The TOML's exports must be kebab-case (lowercase, hyphen or numbers) to comply with WebAssembly's Component Model.
|
|
148
|
+
|
|
149
|
+
JavaScript exports with camelCase names are automatically mapped to kebab-case Wasm exports.
|
|
150
|
+
`),s.push("Suggested TOML changes:"),o.forEach(l=>{let p=l.export;s.push(`- Change export for '${l.target}' to '${bd(p)}'.`)}),new Error(s.join(`
|
|
151
|
+
`))}return r.map(s=>s.export)}d();var el="# api_version: ";function qz(e,t){return`${el}${t}
|
|
152
|
+
|
|
153
|
+
${e}`}async function IB(e){if(!await K(e)){ce(`Could not determine api_version: schema file not found at ${e}.`);return}let n=(await $e(e)).split(`
|
|
154
|
+
`,1)[0];if(n.startsWith(el))return n.slice(el.length).trim();ce(`Could not determine api_version from ${e}: missing '${el}' marker on the first line.`)}async function SF({directory:e,localIdentifier:t,apiVersion:n}){let r=B(e,"schema.graphql"),o=await IB(r);if(o!==void 0&&o!==n)throw new k(xe`The ${Se.cyan("schema.graphql")} file for ${Se.cyan(t)} was generated for api_version ${Se.yellow(o)} but your function is now on api_version ${Se.yellow(n)}.`,xe`Run ${Se.genericShellCommand("shopify app function schema")} to refresh it.`)}var zF=li(WF(),1);import{resolve as HF}from"node:path";async function GF(e,t){t.stdout.write(`Bundling UI extension ${e.localIdentifier}...`);let n=t.app.dotenv?.variables??{};t.appURL&&(n.APP_URL=t.appURL);let r=t.buildDirectory??"",o=B(e.directory,r,e.outputRelativePath),{main:s,assets:a}=e.getBundleExtensionStdinContent(),l=performance.now();if(!t.skipBuild)try{await Hd({minify:!0,outputPath:o,stdin:{contents:s,resolveDir:e.directory,loader:"tsx"},environment:t.environment,env:n,stderr:t.stderr,stdout:t.stdout,sourceMaps:e.isSourceMapGeneratingExtension}),a&&await Promise.all(a.map(async g=>{await Hd({minify:!0,outputPath:B(De(o),g.outputFileName),stdin:{contents:g.content,resolveDir:e.directory,loader:"tsx"},environment:t.environment,env:n,stderr:t.stderr,stdout:t.stdout})}))}catch(g){let E=g.message??"Unknown error occurred",w=new k(`Failed to bundle extension ${e.localIdentifier}. Please check the extension source code for errors.`,E);throw w.errors=g.errors,w}await e.buildValidation({outputPath:o});let p=Math.round(performance.now()-l),D=await nF(o);return t.stdout.write(`${e.localIdentifier} successfully built in ${p}ms${D}`),o}async function VF(e,t){let n=B(e.directory,".build-lock"),r;try{r=await zF.default.lock(e.directory,{retries:20,lockfilePath:n})}catch(o){throw ce(`Failed to acquire function build lock: ${o.message}`),new k("Failed to build function.","This is likely due to another in-progress build.",["Ensure there are no other function builds in-progress.","Delete the `.build-lock` file in your function directory."])}try{let o=e.configuration,s=e.outputPath,a=o.build?.path??e.outputRelativePath;if(e.outputPath=B(e.directory,a),await SF({directory:e.directory,localIdentifier:e.localIdentifier,apiVersion:o.api_version}),!t.skipBuild){e.isJavaScript?await QB(e,t):await e6(e,t);let p=e.configuration.build?.wasm_opt;Rt(e.outputPath)&&p&&await wF(e.outputPath),Rt(e.outputPath)&&await bF(e.outputPath)}let l=B(e.directory,e.outputRelativePath);return Rt(e.outputPath)&&s!==e.outputPath&&s!==l&&De(s)!==De(e.outputPath)&&await ZB(e.outputPath,s),{status:"success",function:{handle:o.handle??null,name:e.name,directory:HF(e.directory),wasmPath:Rt(e.outputPath)?HF(e.outputPath):null}}}catch(o){if(o instanceof k)throw o;let s=o.message??"Unknown error occurred",a=new k("Failed to build function.",s);throw a.errors=o.errors,a}finally{await r()}}async function ZB(e,t){ce(`Converting WASM from ${e} to base64 in ${t}`);let n=await $e(e,{encoding:"base64"});await Pc(t),await mt(t,n)}async function QB(e,t){return e.buildCommand?(e.typegenCommand&&await Ss(e,t),JF(e.buildCommand,e,t)):FF(e,t)}async function e6(e,t){if(!e.buildCommand)throw t.stderr.write(`The function extension ${e.localIdentifier} doesn't have a build command or it's empty`),t.stderr.write(`
|
|
155
|
+
Edit the shopify.function.extension.toml configuration file and set how to build the extension.
|
|
156
|
+
|
|
157
|
+
[build]
|
|
158
|
+
command = "{COMMAND}"
|
|
159
|
+
|
|
160
|
+
Note that the command must output a dist/index.wasm file.
|
|
161
|
+
`),new ro;return e.typegenCommand&&await Ss(e,t),JF(e.buildCommand,e,t)}async function JF(e,t,n){let r=e.split(" ");n.stdout.write(`Building function ${t.localIdentifier}...`),await hi(r[0],r.slice(1),{stdout:n.stdout,stderr:n.stderr,cwd:t.directory,signal:n.signal})}d();var KF;function Qd(){return KF??=new qy({projectName:"shopify-cli-app"}),KF}function Zo(e,t=Qd()){let n=Qi(e);return ce(xe`Reading cached app information for directory ${Se.path(n)}...`),t.get(n)}function Qo(e,t=Qd()){e.directory=Qi(e.directory),ce(xe`Storing app information for directory ${Se.path(e.directory)}:${Se.json(e)}`);let n=t.get(e.directory);n?t.set(e.directory,{...n,...e}):t.set(e.directory,e)}function YF(e,t=Qd()){let n=Qi(e),r=t.get(n);r&&t.set(n,{...r,configFile:void 0})}d();d();var XF=/^shopify\.app(\.[-\w]+)?\.toml$/,Os="shopify.app*.toml";function Fn(e){return e?jr(e)?e:`shopify.app.${vt(e)}.toml`:jn.app}function Ts(e){return ye(e).match(XF)?.[1]?.slice(1)}function jr(e){return!!XF.test(e)}var t6="*.extension.toml",n6="shopify.web.toml",ZF="extensions/*",QF="**/node_modules/**",r6=".env*",Is=class e{static async load(t){let n=await i6(t),r=[],o=await o6(n,r);if(o.length===0)throw new k(`Could not find a Shopify app TOML file in ${n}`);let s=new Set;for(let P of o){let I=P.content.extension_directories;if(Array.isArray(I))for(let U of I)s.add(U);else s.add(ZF)}let a=await u6(n,[...s],r),l=new Set;for(let P of o){let I=P.content.web_directories;if(Array.isArray(I))for(let U of I)l.add(U)}let p=await s6(n,l.size>0?[...l]:void 0,r),D=B(n,"package.json"),g=await K(D),E=g?await jc(n):"unknown",w=g?await r0(D):{},v=g?await i0(n):!1,S=await a6(n),O=await c6(n);return new e({directory:n,packageManager:E,nodeDependencies:w,usesWorkspaces:v,appConfigFiles:o,extensionConfigFiles:a,webConfigFiles:p,dotenvFiles:S,hiddenConfigRaw:O,errors:r})}directory;packageManager;nodeDependencies;usesWorkspaces;appConfigFiles;extensionConfigFiles;webConfigFiles;dotenvFiles;hiddenConfigRaw;errors;constructor(t){this.directory=t.directory,this.packageManager=t.packageManager,this.nodeDependencies=t.nodeDependencies,this.usesWorkspaces=t.usesWorkspaces,this.appConfigFiles=t.appConfigFiles,this.extensionConfigFiles=t.extensionConfigFiles,this.webConfigFiles=t.webConfigFiles,this.dotenvFiles=t.dotenvFiles,this.hiddenConfigRaw=t.hiddenConfigRaw,this.errors=t.errors}appConfigByName(t){return this.appConfigFiles.find(n=>ye(n.path)===t)}appConfigByClientId(t){return this.appConfigFiles.find(n=>n.content.client_id===t)}get defaultAppConfig(){return this.appConfigByName(jn.app)}},eh=class extends k{};async function i6(e){let t=await lr(async n=>{if((await Ge(B(n,Os))).some(o=>jr(ye(o))))return n},{cwd:e,type:"directory"});if(!t)throw new eh(`Could not find a Shopify app configuration file. Looked in ${e} and parent directories.`);return t}async function o6(e,t){let n=B(e,Os),o=(await Ge(n)).filter(s=>jr(ye(s)));return th(o,t)}async function u6(e,t,n){let o=(t.length>0?t:[ZF]).map(a=>B(e,a,t6));o.push(`!${B(e,QF)}`);let s=await Ge(o);return th(s,n)}async function s6(e,t,n){let o=(t??["**"]).map(a=>B(e,a,n6));o.push(`!${B(e,QF)}`);let s=await Ge(o);return th(s,n)}async function th(e,t){let n=[];return await Promise.all(e.map(async r=>{try{n.push(await wt.read(r))}catch(o){let s=o instanceof Es?o:new Es(r,`Failed to read ${r}`),a=new wt(r,{});a.errors.push(s),n.push(a),t.push(s)}})),n}async function a6(e){let t=B(e,r6),r=(await Ge(t,{dot:!0})).filter(a=>{let l=ye(a);return l===".env"||/^\.env\.[\w-]+$/.test(l)}),o=await Promise.all(r.map(async a=>{try{let l=await w0(a);return[ye(a),l]}catch{return}})),s=new Map;for(let a of o)a&&s.set(a[0],a[1]);return s}async function c6(e){let t=B(e,jn.hiddenFolder,jn.hiddenConfig);try{if(await K(t)){let n=await $e(t);return JSON.parse(n)}}catch{}return{}}d();d();d();d();function l6(e,t){return t}async function il(e,t,n){let r={};try{let a=await $e(e);r=JSON.parse(a)}catch{}let o={[t]:n},s=fr(r,o,l6);await mt(e,JSON.stringify(s,null,2))}var f6=y.array(y.string()).optional().transform(p6).transform(d6);function p6(e){return e?.map(t=>t.replace(/[\/\\]+$/,""))}function d6(e){return e?.map(t=>t.replace(/([^\*])\*$/,"$1**"))}var ul=y.object({client_id:y.string(),build:y.object({automatically_update_urls_on_dev:y.boolean().optional(),dev_store_url:y.string().optional(),include_config_on_deploy:y.boolean().optional()}).optional(),extension_directories:f6,web_directories:y.array(y.string()).optional()}).passthrough();function rE(e,t=!0){let n=e.reduce((r,o)=>o.contributeToAppConfigurationSchema(r),ul);return t?n.passthrough():e.length>0?n.strict():n}function nh(e){return e.access_scopes?.scopes??""}function sl(e){let t=nh(e);return t.length?t.split(",").map(n=>n.trim()):[]}function h6(e){return B(e,jn.hiddenFolder,jn.hiddenConfig)}var ft;(function(e){e.Frontend="frontend",e.Backend="backend",e.Background="background"})(ft||(ft={}));var eE=y.preprocess(Bd,y.string()),tE=y.object({auth_callback_path:y.union([eE,eE.array()]).optional(),webhooks_path:y.preprocess(Bd,y.string()).optional(),port:y.number().max(65536).min(0).optional(),commands:y.object({build:y.string().optional(),predev:y.string().optional(),dev:y.string()}),name:y.string().optional(),hmr_server:y.object({http_paths:y.string().array()}).optional()}),nE=y.enum([ft.Frontend,ft.Backend,ft.Background]).default(ft.Frontend),iE=y.union([tE.extend({roles:y.array(nE)}),tE.extend({type:nE})]),ol=class{name;idEnvironmentVariableName="SHOPIFY_API_KEY";directory;configPath;configuration;clientIdOverride;webs;dotenv;errors;specifications;configSchema;remoteFlags;realExtensions;devApplicationURLs;_hiddenConfig;constructor({name:t,directory:n,configPath:r,configuration:o,clientIdOverride:s,webs:a,modules:l,dotenv:p,errors:D,specifications:g,configSchema:E,remoteFlags:w,hiddenConfig:v,devApplicationURLs:S}){this.name=t,this.directory=n,this.configPath=r,this.configuration=o,this.clientIdOverride=s,this.webs=a,this.dotenv=p,this.realExtensions=l,this.errors=D??new Rs,this.specifications=g,this.configSchema=E??ul,this.remoteFlags=w??[],this._hiddenConfig=v,S&&this.setDevApplicationURLs(S)}get allExtensions(){return this.includeConfigOnDeploy===!1?this.nonConfigExtensions:this.realExtensions}get nonConfigExtensions(){return this.realExtensions.filter(t=>!t.isAppConfigExtension)}setDevApplicationURLs(t){this.patchAppConfiguration(t),this.realExtensions.forEach(n=>n.patchWithAppDevURLs(t))}async manifest(t){let n=await Promise.all(this.realExtensions.map(async r=>{let o=await r.deployConfig({apiKey:String(this.configuration.client_id??""),appConfiguration:this.configuration});return{type:r.externalType,handle:r.handle,uid:r.uid,uuid:t?.[r.localIdentifier],assets:r.uid,target:r.contextValue,config:o??{}}}));return{name:this.name,handle:"",modules:fi(n)}}get hiddenConfig(){return this._hiddenConfig}getLogsDir(){return B(this.directory,".shopify","logs")}async updateHiddenConfig(t){if(!this.configuration.client_id)return;this._hiddenConfig=fr(this.hiddenConfig,t);let n=h6(this.directory);await il(n,String(this.configuration.client_id),this.hiddenConfig)}async preDeployValidation(){this.validateWebhookLegacyFlowCompatibility();let t=this.allExtensions.filter(r=>r.isFunctionExtension&&r.configuration.ui?.handle);if(t.length>0){let r=D6(t,this.allExtensions);if(r)throw new k("Invalid function configuration",r.join(`
|
|
162
|
+
`))}let n=this.allExtensions.filter(r=>r.isEditorExtensionCollection);if(n.length>0){let r=m6(n,this.allExtensions);if(r)throw new k("Invalid editor extension collection configuration",r.join(`
|
|
163
|
+
|
|
164
|
+
`))}await Promise.all(this.allExtensions.map(r=>r.preDeployValidation()))}extensionsForType(t){return this.allExtensions.filter(n=>n.type===t.identifier||n.type===t.externalIdentifier)}updateExtensionUUIDS(t){this.allExtensions.forEach(n=>{n.devUUID=t[n.localIdentifier]??n.devUUID})}appIsLaunchable(){let t=this.webs.find(r=>hr(r,ft.Frontend)),n=this.webs.find(r=>hr(r,ft.Backend));return!!(t??n)}get appIsEmbedded(){return this.configuration.embedded}creationDefaultOptions(){return{isLaunchable:this.appIsLaunchable(),scopesArray:sl(this.configuration),name:this.name,isEmbedded:this.appIsEmbedded,directory:this.directory}}removeExtension(t){this.realExtensions=this.realExtensions.filter(n=>n.uid!==t)}async generateExtensionTypes(){let t=new Map;await Promise.all(this.allExtensions.map(n=>n.contributeToSharedTypeFile(t))),t.forEach((n,r)=>{let o=Rt(r);if(n.size===0){o&&Iy(r);return}let s=o?eo(r).toString():"",a=[`import '@shopify/ui-extensions';
|
|
165
|
+
`,...Array.from(n)].join(`
|
|
166
|
+
`);s!==a&&Ty(r,a)})}get includeConfigOnDeploy(){return this.configuration.build?.include_config_on_deploy}patchAppConfiguration(t){this.devApplicationURLs=t,this.configuration.application_url=t.applicationUrl,t.appProxy&&(this.configuration.app_proxy={url:t.appProxy.proxyUrl,subpath:t.appProxy.proxySubPath,prefix:t.appProxy.proxySubPathPrefix}),this.configuration.auth?.redirect_urls&&(this.configuration.auth.redirect_urls=t.redirectUrlWhitelist)}validateWebhookLegacyFlowCompatibility(){let t=this.configuration.webhooks?.subscriptions?.some(r=>r.topics&&r.topics.length>0)??!1,n=this.configuration.access_scopes?.use_legacy_install_flow===!0;if(t&&n)throw new k("App-specific webhook subscriptions are not supported when use_legacy_install_flow is enabled.",`To use app-specific webhooks, you need to:
|
|
167
|
+
1. Remove 'use_legacy_install_flow = true' from your configuration
|
|
168
|
+
2. Run 'shopify app deploy' to sync your scopes with the Developer Dashboard
|
|
169
|
+
|
|
170
|
+
Alternatively, continue using shop-specific webhooks with the legacy install flow.
|
|
171
|
+
|
|
172
|
+
Learn more: https://shopify.dev/docs/apps/build/authentication-authorization/app-installation`)}};function D6(e,t){let n=[];return e.forEach(r=>{let o=r.configuration.ui.handle,s=oE(t,o);s?s.type!=="ui_extension"&&n.push(`[${r.name}] - Local app must contain one extension of type 'ui_extension' and handle '${o}'`):n.push(`[${r.name}] - Local app must contain a ui_extension with handle '${o}'`)}),n.length>0?n:void 0}function m6(e,t){let n=[],r=["ui_extension"];return e.forEach(o=>{o.configuration.inCollection.forEach(s=>{let a=oE(t,s.handle);a?r.includes(a.specification.identifier)?a.specification.identifier==="ui_extension"&&a.configuration.extension_points.forEach(p=>{p.target.startsWith("admin.")&&n.push(`[${o.handle}] editor extension collection: Remove extension '${a.configuration.handle}' with target '${p.target}' from this collection. This extension target is not supported in collections.`)}):n.push(`[${o.handle}] editor extension collection: Remove extension of type '${a.specification.identifier}' from this collection. This extension type is not supported in collections.`):n.push(`[${o.handle}] editor extension collection: Add extension with handle '${s.handle}' to local app. Local app must include extension with handle '${s.handle}'.`)})}),n.length>0?n:void 0}function oE(e,t){return e.find(n=>n.handle===t)}async function ZG(e){let t=e.dependency;if(t)return Bs(t,e.directory)}async function Bs(e,t){let n=e.replace("-react","").split("/"),r=B("node_modules",n[0],n[1],"package.json"),o=await lr(r,{cwd:t,type:"file",allowSymlinks:!0});if(!o)return"not_found";o=await ms(o);let s=await Lc(o);return s.version?{name:e,version:s.version}:"not_found"}d();function g6(e){if(!e?.length)return null;let t=null,n=-1;for(let r of e){if(!r.issues?.length)continue;let o=0,s=0,a=0;for(let p of r.issues)p.message?.includes("Required")||p.message?.includes("required")?o++:p.message?.includes("Expected")&&p.message?.includes("received")?s++:a++;let l;o>0?l=1e3-o*10-s-a:s>0?l=100-s*5-a:l=50-a,l>n&&(n=l,t=r)}return t}function uE(e){let t=[];for(let n of e)if(n.code==="invalid_union"&&n.unionErrors){let r=g6(n.unionErrors);if(r?.issues?.length)for(let o of r.issues)t.push({path:o.path,message:o.message,code:n.code});else t.push({path:n.path,message:n.message??"Configuration doesn't match any expected format",code:n.code})}else t.push({path:n.path,message:n.message??"Unknown error",code:n.code});return t}d();d();d();d();d();d();d();async function eu(e,t,n){let[r,o]=await Promise.all([ms(e),ms(t)]),s=Te(o,r);if(s.split(/[/\\]/,1)[0]===".."||Wo(s))throw new k(`Asset path '${n}' resolves outside the app directory.`,`Asset sources must be inside the app folder. Resolved to: ${r}`)}async function aE(e){let{key:t,baseDir:n,outputDir:r,context:o,appDirectory:s,destination:a,usedBasenames:l=new Set,preserveFilePaths:p=!1}=e,{stdout:D}=o.options,g=al(o.extension.configuration,t),E;typeof g=="string"?E=[g]:Array.isArray(g)?E=g.filter(P=>typeof P=="string"):E=[];for(let P of E)if(P.trim()==="")throw new k(`'${t}' can't be empty.`);if(E.length===0)return ce(`No value for configKey '${t}', skipping
|
|
173
|
+
`,D),{filesCopied:0,pathMap:new Map};let w=a?B(r,a):r,v=Bt(E),S=new Map,O=0;for(let P of v){let I=B(n,P);if(!await K(I))throw new k(xe`Couldn't find ${Se.path(I)}\n Please check the path '${P}' in your configuration`.value);await eu(I,s,P);let q=await pi(I),X=w;if(q){let Q=await Ge(["**/*"],{cwd:I,absolute:!1}),fe=Q.map(Fe=>Te(r,B(X,Fe)));if(p)for(let Fe of Q)sE(ye(Fe),P,l);await Bc(I,X),D.write(`Included '${P}'
|
|
174
|
+
`);for(let Fe of Q)l.add(ye(Fe));S.set(P,fe),O+=Q.length}else{await Nn(X);let Q=ye(I),fe;p?(sE(Q,P,l),fe=Q):fe=_6(Q,l),l.add(fe);let Fe=Te(r,B(X,fe)),We=B(X,fe);await Rn(I,We),D.write(`Included '${P}'
|
|
175
|
+
`),S.set(P,Fe),O+=1}}return{filesCopied:O,pathMap:S}}function sE(e,t,n){if(n.has(e))throw new k(`File collision: '${e}' from '${t}' would overwrite a file copied from a different source. Rename or relocate the conflicting file.`)}function _6(e,t){if(!t.has(e))return e;let n=Ac(e),r=n?e.slice(0,-n.length):e,o=1e3,s=1;for(;t.has(`${r}-${s}${n}`);)if(s++,s>o)throw new Error(`Unable to find unique basename for '${e}' after ${o} attempts`);return`${r}-${s}${n}`}function rh(e){return e.split(".").map(t=>{let n=t.endsWith("[]");return{name:n?t.slice(0,-2):t,flatten:n}})}function al(e,t){let n=e;for(let{name:r,flatten:o}of rh(t)){if(n==null)return;if(Array.isArray(n)){let s=n.map(a=>a!==null&&typeof a=="object"?a[r]:void 0).filter(a=>a!==void 0);n=s.length>0?s:void 0}else if(typeof n=="object")n=n[r];else return;if(o){if(!Array.isArray(n))return;n=n.flat(1)}}return n}function uh(e){return Ac(e)?De(e):e}async function cE(e,t,n,r){let{extension:o,options:s}=t,a=[],l=[];for(let g of e)typeof g.anchor=="string"&&typeof g.groupBy=="string"?a.push(g):l.push(g);if(a.length===0&&l.length===0&&r.length===0)return;let p={};for(let g of l){let E=E6(g.key),w=al(o.configuration,g.key);w!=null&&(p[E]=cl(w,n))}let D=new Map;for(let g of a){let E=`${g.anchor}||${g.groupBy}`,w=D.get(E);w?w.push(g):D.set(E,[g])}for(let g of D.values()){let{anchor:E,groupBy:w}=g[0],v=al(o.configuration,E);if(Array.isArray(v))for(let S of v){if(S===null||typeof S!="object"||Array.isArray(S))continue;let O=S,P=O[w];if(typeof P!="string")continue;let I=g.map(X=>{let Q=y6(X.key,E),fe=ih(O,Q);return cl(fe,n)});I.some(oh)&&s.stdout.write(`Warning: manifest entry '${P}' contains unresolved paths \u2014 source files may be missing
|
|
176
|
+
`);let q=p[P]??{};p[P]=F6([q,...I])}}if(r.length>0&&(p.files=r),Object.keys(p).length===0){s.stdout.write(`Warning: no manifest entries produced \u2014 skipping manifest.json
|
|
177
|
+
`);return}await sh(t,p)}async function sh(e,t){let n=uh(e.extension.outputPath),r=B(n,"manifest.json");await K(n)||await Nn(n);let o={};if(await K(r))try{let s=await $e(r);o=JSON.parse(s)}catch{ce(`Warning: could not parse existing manifest.json, starting fresh
|
|
178
|
+
`,e.options.stdout)}for(let[s,a]of Object.entries(t)){let l=o[s];l&&typeof l=="object"&&!Array.isArray(l)&&typeof a=="object"&&!Array.isArray(a)?o[s]={...l,...a}:o[s]=a}await mt(r,JSON.stringify(o,null,2)),ce(`Updated manifest.json in ${n}
|
|
179
|
+
`,e.options.stdout)}function y6(e,t){if(t===e)return"";let n=`${t}.`;return e.startsWith(n)?e.slice(n.length):e}function ih(e,t){if(t==="")return e;let n=rh(t),[r,...o]=n;if(!r)return e;let s=o.map(l=>`${l.name}${l.flatten?"[]":""}`).join("."),a=e[r.name];if(r.flatten){if(!Array.isArray(a))return{[r.name]:a};let l=a.map(p=>s?ih(p,s):p);return{[r.name]:l}}return s&&a!==null&&a!==void 0&&typeof a=="object"&&!Array.isArray(a)?{[r.name]:ih(a,s)}:{[r.name]:a}}function F6(e){return Object.assign({},...e)}function cl(e,t){if(typeof e=="string")return(e.startsWith(".")||e.includes("/")||e.includes("\\")||t.has(e)?t.get(e):void 0)??e;if(Array.isArray(e))return e.map(n=>cl(n,t));if(e!==null&&typeof e=="object"){let n={};for(let[r,o]of Object.entries(e))n[r]=cl(o,t);return n}return e}function E6(e){let t=e.split(".").at(-1)??e;return t.endsWith("[]")?t.slice(0,-2):t}function oh(e){return typeof e=="string"?e.startsWith("./")||e.startsWith("../"):Array.isArray(e)?e.some(oh):e!==null&&typeof e=="object"?Object.values(e).some(oh):!1}d();async function lE(e,t){let{sourceDir:n,outputDir:r,patterns:o,ignore:s,appDirectory:a,sourceDirConfigValue:l}=e;if(!await K(n))return{filesCopied:0,outputPaths:[]};await eu(n,a,l);let p=await Ge(o,{absolute:!0,cwd:n,ignore:s});if(p.length===0)return{filesCopied:0,outputPaths:[]};await Nn(r);let D=p,g=await Promise.all(D.map(async v=>{let S=Te(n,v),O=B(r,S);return Te(r,O).startsWith("..")?(t.stdout.write(`Warning: skipping '${v}' - resolved destination is outside the output directory
|
|
180
|
+
`),{count:0,path:null}):v===O?{count:0,path:null}:(await Nn(De(O)),await Rn(v,O),{count:1,path:S})})),E=g.reduce((v,S)=>v+S.count,0),w=g.flatMap(v=>v.path===null?[]:[v.path]);return t.stdout.write(`Included ${E} file(s)
|
|
181
|
+
`),{filesCopied:E,outputPaths:w}}d();async function fE(e,t){let{source:n,destination:r,baseDir:o,outputDir:s,appDirectory:a}=e,l=B(o,n);if(!await K(l))throw new Error(`Source does not exist: ${l}`);await eu(l,a,n);let p=await pi(l),D,g;if(r===void 0?(D=B(s,ye(l)),g=`Included ${n}
|
|
182
|
+
`):(D=B(s,r),g=`Included ${n}
|
|
183
|
+
`),p){let E=await Ge(["**/*"],{cwd:l,absolute:!1});await Bc(l,D),t.stdout.write(g);let w=Te(s,D),v=w?E.map(S=>B(w,S)):E;return{filesCopied:E.length,outputPaths:v}}return await Nn(De(D)),await Rn(l,D),t.stdout.write(g),{filesCopied:1,outputPaths:[Te(s,D)]}}var v6=y.object({type:y.literal("pattern"),baseDir:y.string().optional(),include:y.array(y.string()).default(["**/*"]),ignore:y.array(y.string()).optional(),destination:y.string().optional()}),C6=y.object({type:y.literal("static"),source:y.string(),destination:y.string().optional()}),w6=y.object({type:y.literal("configKey"),key:y.string(),destination:y.string().optional(),anchor:y.string().optional(),groupBy:y.string().optional(),preserveFilePaths:y.boolean().default(!1)}),b6=y.discriminatedUnion("type",[v6,C6,w6]),A6=y.object({inclusions:y.array(b6),generatesAssetsManifest:y.boolean().default(!1)}).strict().superRefine((e,t)=>{for(let[n,r]of e.inclusions.entries())if(r.type==="configKey"){let o=r.anchor!==void 0,s=r.groupBy!==void 0;o!==s&&t.addIssue({code:y.ZodIssueCode.custom,message:"`anchor` and `groupBy` must both be set or both be omitted",path:["inclusions",n]})}});async function pE(e,t){let n=A6.parse(e.config),{extension:r,options:o}=t,s=uh(r.outputPath),a=o.app.directory,l=new Map,p=new Set,D=0;for(let v of n.inclusions){if(v.type!=="configKey")continue;let S=U=>o.stdout.write(U),O=v.destination?vd(v.destination,S):void 0,P=O===""?void 0:O,I=await aE({key:v.key,baseDir:r.directory,outputDir:s,context:t,appDirectory:a,destination:P,usedBasenames:p,preserveFilePaths:v.preserveFilePaths});I.pathMap.forEach((U,q)=>l.set(q,U)),D+=I.filesCopied}let g=await Promise.all(n.inclusions.filter(v=>v.type!=="configKey").map(async v=>{let S=I=>o.stdout.write(I),O=v.destination?vd(v.destination,S):void 0,P=O===""?void 0:O;if(v.type==="pattern"){let I=v.baseDir?B(r.directory,v.baseDir):r.directory,U=P?B(s,P):s,q=await lE({sourceDir:I,outputDir:U,patterns:v.include,ignore:v.ignore??[],appDirectory:a,sourceDirConfigValue:v.baseDir??"."},o),X=P?q.outputPaths.map(Q=>B(P,Q)):q.outputPaths;return{filesCopied:q.filesCopied,outputPaths:X}}if(v.type==="static")return fE({source:v.source,destination:P,baseDir:r.directory,outputDir:s,appDirectory:a},o)})),E=n.generatesAssetsManifest?g.flatMap(v=>v?.outputPaths??[]):[],w=[D,...g.map(v=>v?.filesCopied??0)];if(n.generatesAssetsManifest){let v=n.inclusions.filter(S=>S.type==="configKey");await cE(v,t,l,E)}return{filesCopied:w.reduce((v,S)=>v+(S??0),0)}}d();d();var tu=li(q8(),1);function S6(e){return new Map(e.map(t=>[t.uri,t.source]))}function x6(e,t,n){let o=e.split(`
|
|
184
|
+
`).slice(t,n+1),s=o.length===1;return o.map((a,l)=>{let p=t+l+1,D=s?a.trim():a;return`${p} ${D}`}).join(`
|
|
185
|
+
`)}function P6(e){switch(e){case tu.Severity.ERROR:return{error:`
|
|
186
|
+
[error]:`};case tu.Severity.WARNING:return{warn:`
|
|
187
|
+
[warning]:`};case tu.Severity.INFO:return{info:`
|
|
188
|
+
[info]:`}}}function O6(e,t){return e.map((r,o)=>{let{message:s,uri:a,start:l,end:p,check:D,severity:g}=r,E=t.get(a),w=E===void 0?[]:[`
|
|
189
|
+
|
|
190
|
+
${x6(E,l.line,p.line)}`],v=o===e.length-1?"":`
|
|
191
|
+
|
|
192
|
+
`;return[P6(g),{bold:D},{subdued:`
|
|
193
|
+
${s}`},...w,v]}).flat()}async function dE(e){let n=await K(B(e,".theme-check.yml"))?void 0:"theme-check:theme-app-extension",{offenses:r,theme:o}=await(0,tu.themeCheckRun)(e,n),s=O6(r,S6(o));return D0(s)}async function hE(e,t){let{extension:n,options:r}=t;r.stdout.write("Running theme check on your Theme app extension...");let o=await dE(n.directory);o&&r.stdout.write(o)}d();async function DE(e,t){let{extension:n,options:r}=t;r.stdout.write(`Bundling theme extension ${n.localIdentifier}...`);let o=await bs(n.directory);return await Promise.all(o.map(async s=>{let a=Te(n.directory,s),l=B(n.outputPath,a);s!==l&&await Rn(s,l)})),{filesCopied:o.length}}d();async function mE(e,t){let n=t.extension.configuration;t.options.buildDirectory=e.config?.bundleFolder??void 0;let r=await GF(t.extension,t.options),o=De(r),s=e.config?.bundleFolder?B(De(t.extension.outputPath),e.config.bundleFolder):De(t.extension.outputPath);if(ot(o)===ot(s))return;if(!await K(o))throw new k(`Couldn't find the build output at ${o}`,"If you passed --no-build, build the app first. Otherwise check that building the extension produces files at that path.");if(await Rn(o,s),!e.config?.generatesAssetsManifest||!Array.isArray(n.extension_points))return;let a=n.extension_points.filter(p=>typeof p=="object"&&p.build_manifest),l=T6(a,e.config?.bundleFolder);Object.keys(l).length>0&&await sh(t,l)}function T6(e,t){let n={};for(let{target:r,build_manifest:o}of e){if(!o?.assets)continue;let s={};for(let[a,l]of Object.entries(o.assets))l?.filepath&&(s[a]=t?B(t,l.filepath):l.filepath);Object.keys(s).length>0&&(n[r]=s)}return n}d();async function gE(e,t){await VF(t.extension,t.options)}d();async function _E(e,t){let{extension:n}=t;if(await K(n.outputPath)&&await pi(n.outputPath))throw new Error(`outputPath '${n.outputPath}' is a directory \u2014 expected a file path for the tax stub`);await Pc(n.outputPath),await mt(n.outputPath,"(()=>{})();")}async function yE(e,t){switch(e.type){case"include_assets":return pE(e,t);case"build_theme":return hE(e,t);case"bundle_theme":return DE(e,t);case"bundle_ui":return mE(e,t);case"build_function":return gE(e,t);case"create_tax_stub":return _E(e,t);default:throw new Error(`Unknown build step type: ${e.type}`)}}async function FE(e,t){let n=Date.now();try{let r=await yE(e,t);return{id:e.id,success:!0,duration:Date.now()-n,output:r}}catch(r){let o=r;if(e.continueOnError)return t.options.stderr.write(`Warning: Step "${e.name}" failed but continuing: ${o.message}
|
|
194
|
+
`),{id:e.id,success:!1,duration:Date.now()-n,error:o};throw o.message=`Build step "${e.name}" failed: ${o.message}`,o}}d();import{openSync as I6,readSync as B6,closeSync as R6}from"fs";var EE=128*1024,ll=new Map,fl=new Map,pl=new Map;function so(e){let t=fl.get(e);if(t!==void 0)return t;let n=Rt(e);return fl.set(e,n),n}function Ns(e){let t=pl.get(e);if(t!==void 0)return t;let n=By(e);return pl.set(e,n),n}function N6(e){let t=I6(e,"r");try{let n=Buffer.alloc(EE),r=B6(t,n,0,EE,0);return n.subarray(0,r).toString()}finally{R6(t)}}function vE(){ll.clear(),fl.clear(),pl.clear()}function M6(e){let t=ll.get(e);if(t)return t;let n=N6(e),r=e.substring(e.lastIndexOf(".")),o;switch(r){case".js":case".mjs":case".cjs":case".ts":case".tsx":case".jsx":o=wE(n,e);break;case".rs":o=j6(n,e);break;default:o=[]}return ll.set(e,o),o}function ah(e,t=new Set){if(t.has(e))return[];t.add(e);let n=M6(e),r=[e,...n];for(let o of n)try{if(so(o)&&!Ns(o)){let s=ah(o,t);r.push(...s)}}catch(s){if(s instanceof Error&&s.message.includes("ENOENT"))continue;throw s}return Bt(r)}function CE(){return{directImports:ll.size,fileExists:fl.size,isDir:pl.size}}function ch(e,t){return wE(e,t)}function wE(e,t){let n=[],r=[/import\s+(?:[\s\S]*?)\s+from\s+['"](\.\.?\/[^'"]+)['"]/gm,/import\s+['"](\.\.?\/[^'"]+)['"]/g,/export\s+(?:[\s\S]*?)\s+from\s+['"](\.\.?\/[^'"]+)['"]/gm,/import\s*\(\s*['"](\.\.?\/[^'"]+)['"]\s*\)/g,/require\s*\(\s*['"](\.\.?\/[^'"]+)['"]\s*\)/g];for(let o of r){let s;for(;(s=o.exec(e))!==null;){let a=s[1];if(a&&a.startsWith(".")){let l=$6(a,t);l&&n.push(l)}}}return Bt(n)}function j6(e,t){let n=[],r=/^\s*(?:pub\s+)?mod\s+([a-z_][a-z0-9_]*)\s*;/gm,o;for(;(o=r.exec(e))!==null;){let a=o[1];if(a){let l=L6(a,t);l&&n.push(l)}}let s=/#\[path\s*=\s*"([^"]+)"\]/g;for(;(o=s.exec(e))!==null;){let a=o[1];if(a){let l=B(De(t),a);so(l)&&n.push(l)}}return Bt(n)}function $6(e,t){let n=so(t)&&Ns(t)?t:De(t),r=B(n,e);if(so(r)&&Ns(r)){let s=[B(r,"index.js"),B(r,"index.ts"),B(r,"index.tsx"),B(r,"index.jsx")];for(let a of s)if(so(a)&&!Ns(a))return a;return null}let o=[r,`${r}.js`,`${r}.ts`,`${r}.tsx`,`${r}.jsx`];for(let s of o)if(so(s)&&!Ns(s))return s;return null}function L6(e,t){let n=De(t),r=[B(n,`${e}.rs`),B(n,e,"mod.rs")];for(let o of r)if(so(o))return o;return null}var U6=["**/node_modules/**","**/.git/**","**/*.test.*","**/dist/**","**/*.swp","**/generated/**","**/.gitignore"],k6="Configuration accepted",dl=class{entrySourceFilePath;devUUID;localIdentifier;idEnvironmentVariableName;directory;configuration;configurationPath;outputPath;handle;specification;uid;cachedImportPaths;get graphQLType(){return(this.specification.graphQLType??this.specification.identifier).toUpperCase()}get type(){return this.specification.identifier}get humanName(){return this.specification.externalName}get name(){return this.configuration.name??this.specification.externalName}get dependency(){return this.specification.dependency}get externalType(){return this.specification.externalIdentifier}get surface(){return this.specification.surface}get isPreviewable(){return this.features.includes("ui_preview")}get isThemeExtension(){return this.features.includes("theme")}get isFunctionExtension(){return this.features.includes("function")}get isESBuildExtension(){return this.features.includes("esbuild")}get isSourceMapGeneratingExtension(){return this.features.includes("generates_source_maps")}get isAppConfigExtension(){return this.specification.experience==="configuration"}get isFlow(){return this.specification.identifier.includes("flow")}get isEditorExtensionCollection(){return this.specification.identifier==="editor_extension_collection"}get hasDeploySteps(){return this.specification.clientSteps?.some(t=>t.lifecycle==="deploy"&&t.steps.length>0)??!1}get features(){return this.specification.appModuleFeatures(this.configuration)}get outputFileName(){return ye(this.outputRelativePath)}get outputRelativePath(){return this.specification.getOutputRelativePath?.(this)??""}get hasNoLocalDevOutput(){return this.features.length===0&&!this.hasDeploySteps&&this.outputRelativePath===""}constructor(t){this.configuration=t.configuration,this.configurationPath=t.configurationPath,this.entrySourceFilePath=t.entryPath??"",this.directory=t.directory,this.specification=t.specification;let n=this.specification.getIdentity?.(this.configuration);this.handle=n?.handle??this.buildHandle(),this.localIdentifier=this.handle,this.idEnvironmentVariableName=`SHOPIFY_${xc(this.localIdentifier)}_ID`,this.outputPath=B(this.directory,this.outputRelativePath),this.uid=n?.uid??this.buildUIDFromStrategy(),this.devUUID=`dev-${this.uid}`}get isUUIDStrategyExtension(){return this.specification.uidStrategy==="uuid"}get isSingleStrategyExtension(){return this.specification.uidStrategy==="single"}get isDynamicStrategyExtension(){return this.specification.uidStrategy==="dynamic"}get outputPrefix(){return this.handle}isSentToMetrics(){return!this.isAppConfigExtension}isReturnedAsInfo(){return!this.isAppConfigExtension}async deployConfig({apiKey:t,appConfiguration:n}){let r=await this.specification.deployConfig?.(this.configuration,this.directory,t,void 0,{appConfiguration:n}),o=this.specification.transformLocalToRemote?.(this.configuration,n),s=r??o??void 0;return s&&Object.keys(s).length>0?s:void 0}validate(){return this.specification.validate?this.specification.validate(this.configuration,this.configurationPath,this.directory):Promise.resolve(Br(void 0))}preDeployValidation(){return this.specification.preDeployValidation?this.specification.preDeployValidation(this):Promise.resolve()}buildValidation({outputPath:t}){return this.specification.buildValidation?this.specification.buildValidation(this,t):Promise.resolve()}async keepBuiltSourcemapsLocally(t){if(!this.isSourceMapGeneratingExtension)return Promise.resolve();let r=(await Ge(`**/${this.handle}.js.map`,{cwd:t,absolute:!0,followSymbolicLinks:!1}))[0];if(r===void 0)return Promise.resolve();let o=B(this.directory,Te(t,r));await Tc(r,o,{overwrite:!0}),ce(`Source map for ${this.localIdentifier} created: ${o}`)}async publishURL(t){let n=await Uy(),r=this.specification.partnersWebIdentifier;return`https://${n}/${t.orgId}/apps/${t.appId}/extensions/${r}/${t.extensionId}`}getOutputFolderId(){return this.uid}getBundleExtensionStdinContent(){return this.specification.getBundleExtensionStdinContent?this.specification.getBundleExtensionStdinContent(this.configuration):{main:`import '.${this.entrySourceFilePath.replace(this.directory,"")}';`}}shouldFetchCartUrl(){return this.features.includes("cart_url")}hasExtensionPointTarget(t){return this.specification.hasExtensionPointTarget?.(this.configuration,t)??!1}get buildCommand(){return this.configuration.build?.command}get typegenCommand(){return this.configuration.build?.typegen_command}devSessionDefaultWatchPaths(){if(this.specification.identifier==="ui_extension"){let{main:t,assets:n}=this.getBundleExtensionStdinContent(),r=ch(t,this.directory),o=n?.flatMap(s=>ch(s.content,this.directory))??[];return r.concat(...o)}return[this.entrySourceFilePath]}get devSessionWatchConfig(){return this.specification.devSessionWatchConfig?this.specification.devSessionWatchConfig(this):this.isAppConfigExtension?{paths:[]}:void 0}async watchConfigurationPaths(){if(this.isAppConfigExtension)return[this.configurationPath];{let t=[];return await K(B(this.directory,"locales"))&&t.push(B(this.directory,"locales","**.json")),t.push(B(this.directory,"**.toml")),t}}get inputQueryPath(){return B(this.directory,"input.graphql")}get isJavaScript(){return!!(this.entrySourceFilePath.endsWith(".js")||this.entrySourceFilePath.endsWith(".ts"))}async build(t){let{clientSteps:n=[]}=this.specification,r={extension:this,options:t,stepResults:new Map},o=n.find(s=>s.lifecycle==="deploy")?.steps??[];for(let s of o){let a=await FE(s,r);r.stepResults.set(s.id,a)}}async buildForBundle(t,n){this.outputPath=this.getOutputPathForDirectory(n),await this.build(t);let r=B(n,this.getOutputFolderId());await this.keepBuiltSourcemapsLocally(r)}getOutputPathForDirectory(t){return B(t,this.getOutputFolderId(),this.outputRelativePath)}get singleTarget(){let t=Ct(this.configuration,"targeting")??[];if(t.length===1)return t[0]?.target}get contextValue(){let t=this.specification.getTarget?.(this.configuration);if(t!==void 0)return t;let n=this.singleTarget??"";return this.isFlow&&(n=this.configuration.handle??""),n}async bundleConfig({appModuleUuids:t,developerPlatformClient:n,apiKey:r,appConfiguration:o}){let s=await this.deployConfig({apiKey:r,appConfiguration:o});if(!s)return;let a={config:JSON.stringify(s),context:this.contextValue,handle:this.handle},l=t[this.localIdentifier];return{...a,uid:this.uid,uuid:l,specificationIdentifier:n.toExtensionGraphQLType(this.graphQLType)}}async getDevSessionUpdateMessages(t){if(this.specification.getDevSessionUpdateMessages)return this.specification.getDevSessionUpdateMessages(this.configuration,t);if(t.status==="created"&&!this.isAppConfigExtension&&this.hasNoLocalDevOutput)return[k6]}patchWithAppDevURLs(t){this.specification.patchWithAppDevURLs&&this.specification.patchWithAppDevURLs(this.configuration,t)}async contributeToSharedTypeFile(t){await this.specification.contributeToSharedTypeFile?.(this,t)}watchPatterns(){let t=this.devSessionWatchConfig;return{paths:t?.paths??["**/*"],ignore:t?.ignore??U6}}watchedFiles(){let t=[],{paths:n,ignore:r}=this.watchPatterns(),o=n.flatMap(s=>jy(s,{cwd:this.directory,absolute:!0,followSymbolicLinks:!1,ignore:r}));if(t.push(...o.flat()),!this.devSessionWatchConfig){let s=this.scanImports();t.push(...s)}return Bt(t.map(s=>Qi(s)))}async rescanImports(){let t=this.cachedImportPaths;return this.cachedImportPaths=void 0,vE(),this.scanImports(),t!==this.cachedImportPaths}scanImports(){if(this.cachedImportPaths!==void 0)return this.cachedImportPaths;if(ds(process.env.SHOPIFY_CLI_DISABLE_IMPORT_SCANNING))return this.cachedImportPaths=[],this.cachedImportPaths;try{let t=performance.now(),n=this.devSessionDefaultWatchPaths(),r=n.flatMap(l=>ah(l).map(p=>Qi(ot(p))));this.cachedImportPaths=Bt(r)??[];let o=Math.round(performance.now()-t),s=CE(),a=s?` (cache: ${s.directImports} parsed, ${s.fileExists} stats)`:"";return ce(`Import scan for "${this.handle}": ${n.length} entries, ${this.cachedImportPaths.length} files, ${o}ms${a}`),this.cachedImportPaths}catch(t){return ce(`Failed to scan imports for extension ${this.handle}: ${t}`),this.cachedImportPaths=[],this.cachedImportPaths}}buildHandle(){switch(this.specification.uidStrategy){case"single":return this.specification.identifier;case"uuid":return this.configuration.handle??vt(this.name??"");case"dynamic":if("topic"in this.configuration&&"uri"in this.configuration){let t=this.configuration,n=`${t.topic}${t.uri}${t.filter}`;return gs(n).substring(0,Nr)}else return Nc(JSON.stringify(this.configuration))}}buildUIDFromStrategy(){switch(this.specification.uidStrategy){case"single":return this.specification.identifier;case"uuid":return this.configuration.uid??Nc(this.handle);case"dynamic":if("topic"in this.configuration&&"uri"in this.configuration){let t=this.configuration;return`${t.topic}::${t.filter??""}::${t.uri}`.substring(0,S0)}else return Nc(JSON.stringify(this.configuration))}}};d();async function bE(e,t=""){let n=q6(t),r=await Fs(n);for(;await K(B(e,hl(r)))&&await Mn({message:`Configuration file ${hl(r)} already exists. Do you want to choose a different configuration name?`,confirmationMessage:"Yes, I'll choose a different name",cancellationMessage:"No, overwrite my existing configuration file"});)r=await Fs(n);return hl(r)}function hl(e,t=!1){let n=vt(e);return n===""?"shopify.app.toml":`shopify.app.${t?o0.cyan(n):n}.toml`}async function lh(e){return(await Ge(B(e,Os))).filter(n=>jr(ye(n)))}async function AE(e){let t=(await lh(e)).map(r=>ye(r));if(t.length===0)return to("Could not find any shopify.app.toml file in the directory.");if(t.length===1)return Br(t[0]);let n=await u0({message:"Configuration file",choices:t.map(r=>({label:r,value:r}))});return Br(n)}function q6(e){return{message:"Configuration file name:",initialAnswer:e,validate:W6,preview:t=>`${hl(t,!0)} will be generated in your root directory`}}function W6(e){if(vt(e).length>238)return"The file name is too long."}d();d();d();import{readdirSync as H6}from"fs";async function Dl(e){if(!e||!await pi(e))return{};let t={},n=H6(e);return await Promise.all(n.map(async r=>{if(jr(r)){let o=B(e,r),a=(await wt.read(o)).content;a.client_id&&(t[a.client_id]=r)}})),t}function pK(){return y0()}function dK(){return F0()}function hK(){return E0()}async function SE(e,t,n,r){let o=await Dl(r?.directory),s=p=>o[p?.apiKey]?{label:`${p.title} (${o[p.apiKey]})`,value:p.apiKey}:{label:p.title,value:p.apiKey},a=t,l=await Pd({message:"Which existing app is this for?",choices:a.map(s),hasMorePages:n,search:async p=>{let D=await e(p);return a=D.apps,{data:a.map(s),meta:{hasNextPage:D.hasMorePages}}}});return a.find(p=>p.apiKey===l)}async function DK({stores:e,hasMorePages:t=!1,onSearchForStoresByName:n,showDomainOnPrompt:r=!0,onCreateStoreWhenEmpty:o,onCreateStore:s}){if(e.length===0)return o?.();if(e.length===1&&!t&&!s)return d0(`Using your default dev store, ${e[0].shopName}, to preview your project.`),e[0];let a=v=>{let S=v.shopName;return r&&v.shopDomain&&(S=`${v.shopName} (${v.shopDomain})`),{label:S,value:v.shopId}},l=e,p=new Map(e.map(v=>[v.shopId,v])),D="__create_new_dev_store__",g=()=>[...l.map(a),...s?[{label:"Create a new dev store",value:D}]:[]],E={};n&&(E.search=async v=>{let S=await n(v);return l=S.stores,l.length>0&&l.forEach(O=>p.set(O.shopId,O)),{data:g(),meta:{hasNextPage:S.hasMorePages}}});let w=await Pd({message:"Which store would you like to use to view your project?",choices:g(),hasMorePages:t,...E});return w===D?s?.():p.get(w)}async function xE(e){return Fs({message:"App name",defaultValue:e,validate:t=>{if(t.length===0)return"App name can't be empty";if(t.length>Rd)return`Enter a shorter name (${Rd} character max.)`;if(t.includes("shopify"))return`Name can't contain "shopify." Enter another name.`}})}async function mK(e){return Mn({message:"Finished creating a dev store?",confirmationMessage:`Yes, ${e.businessName} has a new dev store`,cancellationMessage:"No, cancel dev"})}async function PE(){return Mn({message:"Create this project as a new app on Shopify?",confirmationMessage:"Yes, create it as a new app",cancellationMessage:"No, connect it to an existing app"})}function OE(e,t){let n=["application_url","redirect_urls"];t.appProxy?.proxyUrl&&n.push("app_proxy");let r={"Currently released app URL":[e],"=> Dev URL":[t.applicationUrl],"Affected configurations":n};return Mn({message:"Have Shopify override your app URLs when running `app dev` against your dev store? This won't affect your app on other stores",confirmationMessage:"Yes, automatically update",cancellationMessage:"No, never",infoTable:r})}function gK(){return Mn({message:"--use-localhost requires a certificate for `localhost`. Generate it now?",confirmationMessage:"Yes, use mkcert to generate it",cancellationMessage:"No, I'll run `app dev` again without `--use-localhost`"})}async function PK(e){if(e.noTunnelUseLocalhost)return{frontendUrl:"https://localhost",frontendPort:e.port,usingLocalhost:!0};let t=4040,n="",r=e.noTunnelUseLocalhost;if(Td())return n=`https://${Td()}-${t}.${f0()}`,{frontendUrl:n,frontendPort:t,usingLocalhost:r};if(Od()){let o=Od()?.replace("https://","");return n=`https://${t}-${o}`,{frontendUrl:n,frontendPort:t,usingLocalhost:r}}if(e.tunnelUrl){let o=e.tunnelUrl.match(/(https:\/\/[^:]+):([0-9]+)/);if(!o)throw new k(`Invalid tunnel URL: ${e.tunnelUrl}`,'Valid format: "https://my-tunnel-url:port"');return t=Number(o[2]),n=o[1],{frontendUrl:n,frontendPort:t,usingLocalhost:r}}return e.tunnelClient&&(t=e.tunnelClient.port,n=await z6(e.tunnelClient)),{frontendUrl:n,frontendPort:t,usingLocalhost:r}}async function z6(e){return new Promise((t,n)=>{let r=0,o=async()=>{let a=e.getTunnelStatus();if(ce(`Polling tunnel status for ${e.provider} (attempt ${r}): ${a.status}`),a.status==="error")return n(new k(a.message,a.tryMessage));a.status==="connected"?t(a.url):(r+=1,s())},s=()=>{setTimeout(o,500)};o()})}function TE(e,t,n){let r;t&&t.length>0?r=(Array.isArray(t)?t:[t]).reduce((a,l)=>(l&&l.length>0&&a.push(`${e}${l}`),a),[]):r=[`${e}/auth/callback`,`${e}/auth/shopify/callback`,`${e}/api/auth/callback`];let o=n?{appProxy:{proxyUrl:G6(Jo(n.url,e),e),proxySubPath:n.subpath,proxySubPathPrefix:n.prefix}}:{};return{applicationUrl:e,redirectUrlWhitelist:r,...o}}function G6(e,t){let n=new URL(e),r=new URL(t);return n.host=r.host,n.toString().replace(/\/$/,"")}async function OK(e){let t={applicationUrl:e?.application_url??"",redirectUrlWhitelist:e?.auth?.redirect_urls??[]};return e?.app_proxy&&(t.appProxy={proxyUrl:e?.app_proxy.url,proxySubPath:e?.app_proxy.subpath,proxySubPathPrefix:e?.app_proxy.prefix}),t}async function TK(e){if(e.localApp&&e.localApp.configuration.client_id!==e.apiKey||(e.newApp??!kc()))return!0;let t=e.cachedUpdateURLs===!0;if(e.cachedUpdateURLs===void 0)if(t=await OE(e.currentURLs.applicationUrl,e.newURLs),e.localApp){let n=e.localApp.configuration;n.build={...n.build,automatically_update_urls_on_dev:t},await(await wt.read(e.localApp.configPath)).patch({build:{automatically_update_urls_on_dev:t}})}else Qo({directory:e.appDirectory,updateURLs:t});return t}async function IK(e,t,n){let r=await Ly(e,"tunnel_start",{port:t,provider:n}),o=Object.values(r).filter(a=>!a?.isErr()||a.error.type!=="invalid-provider");if(o.length>1)throw new tn(`Multiple tunnel plugins for ${n} found`);let s=o[0];if(!s)throw new tn(`We couldn't find the ${n} tunnel plugin`);if(s.isErr())throw new k(`${n} failed to start the tunnel.
|
|
195
|
+
${s.error.message}`,["What to try:",{list:{items:[["Try to run the command again"],["Add the flag",{command:"--tunnel-url {URL}"},"to use a custom tunnel URL"]]}}]);return s.value}d();d();d();d();var IE=bc({name:"AppConfigUseResult",schema:y.object({status:y.literal("success"),changed:y.boolean().describe("Whether the preferred configuration changed."),path:y.string().refine(Wo,"Expected an absolute filesystem path.").nullable().describe("The preferred configuration file, or null after clearing the preference."),clientId:y.string().min(1).nullable().describe("The public OAuth client identifier, or null after clearing the preference.")}).strict()});async function BE(e,t,n){if(n==="json"){Wc(IE.encode(e));return}if(e.path===null){let r=await jc(t);ys({headline:"Cleared current configuration.",body:["In order to set a new current configuration, please run",{command:qc(r,"shopify app config use CONFIG_NAME")},{char:"."}]})}else ys({headline:`Using configuration file ${ye(e.path)}`})}import{resolve as V6}from"node:path";async function fh({directory:e,configName:t,warningContent:n,shouldRenderSuccess:r=!0,reset:o=!1}){n&&!o&&Uc(n);let s=await J6({directory:e,configName:t,reset:o});return(o||r)&&await BE(s,e,"text"),s.path===null?void 0:ye(s.path)}async function J6({directory:e,configName:t,reset:n=!1,previousConfigFile:r=Zo(e)?.configFile??null}){if(n)return YF(e),{status:"success",changed:r!==null,path:null,clientId:null};let o=(await K6(e,t)).valueOrAbort(),{activeConfig:s}=await Ln(e,o);return ph(s.file.content,{configFileName:o,directory:e}),{status:"success",changed:r!==o,path:V6(e,o),clientId:s.file.content.client_id}}function ph(e,t){let{configFileName:n,directory:r}=t;if(e.client_id)Qo({directory:r,configFile:n});else throw new k(`Configuration file ${n} needs a client_id.`)}async function K6(e,t){if(t){let n=Fn(t);return await K(B(e,n))?Br(n):to(`Could not find configuration file ${n}`)}return AE(e)}async function NE(e,t,n){let r=t,o=n?.clientId?e.appConfigByClientId(n.clientId):void 0,s=Zo(e.directory)?.configFile,a=s?B(e.directory,s):null,l=!!(!r&&a&&!Rt(a));if(l&&!n?.skipPrompts){let w={headline:`Couldn't find ${s}`,body:["If you have multiple config files, select a new one. If you only have one config file, it's been selected as your default."]};r=await fh({directory:e.directory,warningContent:w,shouldRenderSuccess:!1})}if(!r&&o)return RE(e,o,"flag");if(!r&&n?.clientId)throw new k("The specified client ID couldn't be found in any TOML file, or the matching TOML file is malformed.");let p=r??(l?void 0:s),D;t?D="flag":p?D="cached":D="default";let g=Fn(p),E=e.appConfigByName(g);if(!E)throw new k(xe`Couldn't find ${g} in ${Se.path(e.directory)}.`);return RE(e,E,D)}async function RE(e,t,n){let r=typeof t.content.client_id=="string"?t.content.client_id:void 0,o=!!r&&r!=="",s=ml(e,t.path),a=await gl(e,r);return{file:t,source:n,isLinked:o,dotenv:s,hiddenConfig:a}}d();async function ME(e,t){await Wy("warn-on-multiple-versions",{days:1},async()=>{if(!t["@shopify/cli"])return;let n=t0(),r=n?Ed:await e0();if(!r)return;let o=n?await Qy(e):Ed;if(!o)return;let a={headline:`Two Shopify CLI installations found \u2013 using ${n?"global installation":"local dependency"}`,body:[`A global installation (v${r}) and a local dependency (v${o}) were detected.
|
|
196
|
+
We recommend removing the @shopify/cli and @shopify/app dependencies from your package.json, unless you want to use different versions across multiple apps.`],link:{label:"See Shopify CLI documentation.",url:"https://shopify.dev/docs/apps/build/cli-for-apps#switch-to-a-global-executable-or-local-dependency"}};no(a)})}d();import{existsSync as Y6,readFileSync as X6}from"fs";var Z6=[{name:"remix",detectors:{every:[{path:"package.json",matchContent:'"(dev)?(d|D)ependencies":\\s*{[^}]*"@remix-run\\/.*":\\s*".+?"[^}]*}'},{path:"package.json",matchContent:'"(dev)?(d|D)ependencies":\\s*{[^}]*"react":\\s*".+?"[^}]*}'}]}},{name:"nextjs",detectors:{every:[{path:"package.json",matchContent:'"(dev)?(d|D)ependencies":\\s*{[^}]*"next":\\s*".+?"[^}]*}'},{path:"package.json",matchContent:'"(dev)?(d|D)ependencies":\\s*{[^}]*"react":\\s*".+?"[^}]*}'}]}},{name:"express",detectors:{every:[{path:"package.json",matchContent:'"(dev)?(d|D)ependencies":\\s*{[^}]*"express":\\s*".+?"[^}]*}'}]}},{name:"rails",detectors:{every:[{path:"Gemfile",matchContent:'gem "rails"'}]}},{name:"flask",detectors:{every:[{path:"Pipfile",matchContent:"flask"}]}},{name:"django",detectors:{every:[{path:"Pipfile",matchContent:"django"}]}},{name:"laravel",detectors:{every:[{path:"composer.json",matchContent:'"require":\\s*{[^}]*"laravel/framework":\\s*".+?"[^}]*}'}]}},{name:"symfony",detectors:{every:[{path:"composer.json",matchContent:'"require":\\s*{[^}]*"symfony\\/.*":\\s*".+?"[^}]*}'}]}}];async function LE(e){let t={},n=Z6.find(r=>(!r.detectors.some||r.detectors.some.reduce((o,s)=>jE(s,$E(e,s.path,t)),!1))&&(!r.detectors.every||r.detectors.every.reduce((o,s)=>o?jE(s,$E(e,s.path,t)):!1,!0)));return n?n.name:"unknown"}function jE(e,t={}){return t[e.path]?!e.matchContent||new RegExp(e.matchContent).test(t[e.path]):!1}function $E(e,t,n={}){if(n[t])return n;let r=B(e,t);if(!Y6(r))return n;let o=X6(r,{encoding:"utf8"});return n[t]=o,n}var qE=li(W8(),1),dh=class extends k{configurationPath;errors;constructor(t,n){super(`Validation errors in ${t}:
|
|
197
|
+
|
|
198
|
+
${n.map(Ms).join(`
|
|
199
|
+
`)}`),this.configurationPath=t,this.errors=n}};function Q6(e){if(e.file.endsWith(".toml")&&e.message==="Expected object, received array")return"Use a TOML table instead of an array. [table] defines a single table; [[table]] defines an array of tables."}function Ms(e){let t=Q6(e),n=t?`${e.message}. ${t}`:e.message;return e.path?.length?`[${e.path.join(".")}]: ${n}`:n}async function mh(e,t,n){let r=n;if(!r)try{r=(await wt.read(t)).content}catch(o){if(o instanceof Es)return{errors:[{file:t,message:o.message}]};throw o}return WE(e,t,r)}function WE(e,t,n){let r=e.safeParse(n);return r.success?{data:r.data}:{errors:uE(r.error.issues).map(o=>({file:t,message:o.message,path:o.path,code:o.code}))}}function UE(e,t,n){let r=e.parseConfigurationObject(n);switch(r.state){case"ok":return{data:r.data};case"error":return{errors:r.errors.map(o=>({file:t,message:o.message??"Unknown error",path:o.path}))}}}var Rs=class{errors=[];addError(t){this.errors.push(t)}addErrors(t){this.errors.push(...t)}getErrors(t){return t?this.errors.filter(n=>n.file===t):[...this.errors]}isEmpty(){return this.errors.length===0}};async function ZY(e){if(!((await lh(e)).length>0))throw new k(xe`Couldn't find an app toml file at ${Se.path(e)}, is this an app directory?`)}async function QY(e,t){let{project:n,activeConfig:r}=await Ln(e),o=r.file.content,s=Dh(n,r.file),a=await Promise.all(s.map(E=>HE(E.path,E.content))),l=a.flatMap(E=>E.errors??[]);if(l.length>0)throw new k(l.map(Ms).join(`
|
|
200
|
+
`));let D=a.filter(E=>"web"in E).map(E=>E.web).some(E=>hr(E,ft.Frontend)||hr(E,ft.Backend)),g=sl(o);return{isLaunchable:D,scopesArray:g,name:t,directory:n.directory,isEmbedded:D}}async function HE(e,t){let n=await mh(iE,e,t);if(n.errors)return{errors:n.errors};let r=n.data,o=new Set("roles"in r?r.roles:[]);"type"in r&&o.add(r.type);let{type:s,...a}={...r,roles:Array.from(o),type:void 0};return{web:{directory:De(e),configuration:a,framework:await LE(De(e))}}}async function zE(e){let{project:t,activeConfig:n}=await Ln(e.directory,e.userProvidedConfigName,e.skipPrompts?{skipPrompts:!0}:void 0);return nu({project:t,activeConfig:n,specifications:e.specifications,remoteFlags:e.remoteFlags,ignoreUnknownExtensions:e.ignoreUnknownExtensions})}async function nu(e){let{project:t,activeConfig:n,specifications:r,remoteFlags:o=[],ignoreUnknownExtensions:s,reloadState:a,clientIdOverride:l}=e,p={...n.file.content};l&&(p.client_id=l);let g=rE(r),E=n.file.path,w=ye(E),v=await mh(g,E,p);if(v.errors)throw new dh(E,v.errors);let S=v.data,O=rR(t.appConfigFiles,{[w]:S.client_id}),P=!1;try{P=await tR(t.directory,E)}catch{}let I={allClientIdsByConfigName:O,usesLinkedConfig:!0,name:w,gitTracked:P,source:n.source,usesCliManagedUrls:S.build?.automatically_update_urls_on_dev},U={directory:t.directory,configPath:E,configuration:S,configurationLoadResultMetadata:I,clientIdOverride:l,configSchema:g,specifications:r,remoteFlags:o};return new hh({ignoreUnknownExtensions:s,loadedConfiguration:U,project:t,reloadState:a}).loaded()}function eR(e){return e.access_scopes?.scopes??""}async function GE(e){try{let{project:t,activeConfig:n}=await Ln(e.directory,e.configName,e.skipPrompts?{skipPrompts:!0}:void 0),r=await nu({project:t,activeConfig:n,specifications:e.specifications,remoteFlags:e.remoteFlags});return{state:"loaded-app",app:r,configuration:r.configuration,packageManager:t.packageManager}}catch{try{let t=await Is.load(e.directory),{configurationPath:n}=await nR(t.directory,e.configName),o=(await wt.read(n)).content;return{state:"loaded-template",rawConfig:o,scopes:eR(o),appDirectory:t.directory,packageManager:t.packageManager}}catch{return{state:"error"}}}}async function eX(e){let{project:t,activeConfig:n}=await Ln(e.directory,ye(e.configPath)),r={extensionDevUUIDs:new Map(e.allExtensions.map(s=>[s.handle,s.devUUID])),previousDevURLs:e.devApplicationURLs},o=await nu({project:t,activeConfig:n,specifications:e.specifications,remoteFlags:e.remoteFlags??[],reloadState:r,clientIdOverride:e.clientIdOverride});if(!o.errors.isEmpty()){let s=o.errors.getErrors();throw new k(xe`${Se.errorText("Validation errors")}:\n\n${s.map(Ms).join(`
|
|
201
|
+
`)}`)}return o}function VE(e){let t=Ts(e);return t?`${zo.production}.${t}`:zo.production}var hh=class{ignoreUnknownExtensions;errors=new Rs;specifications;remoteFlags;loadedConfiguration;reloadState;project;constructor({ignoreUnknownExtensions:t,loadedConfiguration:n,reloadState:r,project:o}){this.ignoreUnknownExtensions=t??!1,this.specifications=n.specifications,this.remoteFlags=n.remoteFlags,this.loadedConfiguration=n,this.reloadState=r,this.project=o}get activeConfigFile(){let t=this.loadedConfiguration.configPath;return this.project.appConfigFiles.find(n=>n.path===t)}async loaded(){let{configuration:t,directory:n,configPath:r,configurationLoadResultMetadata:o,configSchema:s}=this.loadedConfiguration;await sR(o);let a=ml(this.project,r),l=await this.loadExtensions(n,t),p=t.name,g=t.handle??p??"",E=await gl(this.project,t.client_id);this.reloadState||await ME(n,this.project.nodeDependencies);let{webs:w,usedCustomLayout:v}=await this.loadWebs(n,t.web_directories),S=new ol({name:g,directory:n,configPath:r,configuration:t,clientIdOverride:this.loadedConfiguration.clientIdOverride,webs:w,modules:l,dotenv:a,errors:this.errors,specifications:this.specifications,configSchema:s,remoteFlags:this.remoteFlags,hiddenConfig:E,devApplicationURLs:this.getDevApplicationURLs(t,w)}),O=S.realExtensions.map(P=>P.type);return await m0(O),await oR(S,this.project.usesWorkspaces,{usedCustomLayoutForWeb:v,usedCustomLayoutForExtensions:t.extension_directories!==void 0}),await S.generateExtensionTypes(),S}async loadWebs(t,n){let r=this.activeConfigFile,o=r?Dh(this.project,r):this.project.webConfigFiles,s=o.map(g=>g.path),a=await Promise.all(o.map(g=>HE(g.path,g.content))),l=[];for(let g of a)g.errors?this.errors.addErrors(g.errors):l.push(g.web);this.validateWebs(l);let p=s.every(g=>Te(t,g).startsWith("web/"));return{webs:l,usedCustomLayout:n!==void 0||!p}}findSpecificationForType(t){return this.specifications.find(n=>n.identifier===t||n.externalIdentifier===t||n.additionalIdentifiers?.includes(t))}validateWebs(t){[ft.Backend,ft.Frontend].forEach(n=>{let r=t.filter(o=>o.configuration.roles.includes(n));if(r.length>1){let o=r.map(l=>B(l.directory,jn.web)),s=o.map(l=>` ${l}`).join(`
|
|
202
|
+
`),a=o[o.length-1];this.errors.addError({file:a,message:`You can only have one "web" configuration file with the ${n} role in your app.
|
|
203
|
+
|
|
204
|
+
Conflicting configurations found at:
|
|
205
|
+
${s}`})}})}async createExtensionInstance(t,n,r,o){let s=this.findSpecificationForType(t),a,l=!1;if(s)l=!0;else{if(this.ignoreUnknownExtensions)return;this.errors.addError({file:r,message:`Invalid extension type "${t}" in "${Sc(r)}"`});return}let p=UE(s,r,n);if(p.errors){this.errors.addErrors(p.errors);return}let D=p.data;l&&(a=await this.findEntryPath(o,s));let g=new dl({configuration:D,configurationPath:r,entryPath:a,directory:o,specification:s});if(this.reloadState&&D.handle){let E=this.reloadState.extensionDevUUIDs.get(D.handle);E&&(g.devUUID=E)}if(l){let E=await g.validate();E.isErr()&&this.errors.addError({file:r,message:h0(E.error).trim()})}return g}async loadExtensions(t,n){if(this.specifications.length===0)return[];let r=await this.createExtensionInstances(t),o=await this.createConfigExtensionInstances(t,n),s=this.createWebhookSubscriptionInstances(t,n),a=await Promise.all([...r,...o,...s]),l=fi(a.flat()),p=new Set;return l.forEach(D=>{if(D.handle&&p.has(D.handle)){let g=l.filter(w=>w.handle===D.handle),E=Py(g.map(w=>w.name));this.errors.addError({file:D.configurationPath,message:`Duplicated handle "${D.handle}" in extensions ${E}. Handle needs to be unique per extension.`})}else D.handle&&p.add(D.handle)}),l}async createExtensionInstances(t){let n=this.activeConfigFile;return(n?kE(this.project,n):this.project.extensionConfigFiles).map(async o=>{let s=o.path,a=De(s),l=o.content,p=x0.safeParse(l);if(!p.success)return this.errors.addError({file:s,message:`Invalid extension configuration at ${Te(t,s)}`}),[];let{extensions:D,type:g}=p.data;if(D){let E=await mh(O0,s,o.content);if(E.errors)return this.errors.addErrors(E.errors),[];let w=E.data,v=w.extensions.map(async S=>{let O={...w,...S};return O.handle||(this.errors.addError({file:s,message:`Missing handle for extension "${O.name}" at ${Te(t,s)}`}),O.handle="unknown-handle"),this.createExtensionInstance(O.type,O,s,a)});return Promise.all(v)}else{if(g)return this.createExtensionInstance(g,l,s,a);this.errors.addError({file:s,message:`Invalid extension type at "${Te(t,s)}". Please specify a type.`});return}})}createWebhookSubscriptionInstances(t,n){let r=this.loadedConfiguration.configPath,o=this.findSpecificationForType(vs);if(!o)return[];let s=WE(Jc,r,n);if(s.errors)return this.errors.addErrors(s.errors),[];let{api_version:a,subscriptions:l=[]}=s.data.webhooks;return fi(l.flatMap(g=>{let{uri:E,topics:w,compliance_topics:v,...S}=g;return w?.map(O=>({api_version:a,uri:E,topic:O,...S}))})).map(async g=>this.createExtensionInstance(o.identifier,g,r,t))}async createConfigExtensionInstances(t,n){let r=this.loadedConfiguration.configPath,o=await Promise.all(this.specifications.filter(a=>Gc(a)).filter(a=>a.identifier!==vs).map(async a=>{let l=UE(a,r,n);if(l.errors)return this.errors.addErrors(l.errors),[[],[]];let p=l.data;if(Object.keys(p).length===0)return[[],Object.keys(p)];let D=a.expandConfig?.(p,{flags:this.remoteFlags})??[p];return[await Promise.all(D.map(async E=>{let w=await this.createExtensionInstance(a.identifier,E,r,t);return this.validateConfigurationExtensionInstance(n.client_id,n,w)})),Object.keys(p)]})),s=Object.keys(n).filter(a=>!o.some(([l,p])=>p.includes(a))).filter(a=>![...Object.keys(ul.shape),"organization_id"].includes(a));return s.length>0&&!this.ignoreUnknownExtensions&&this.errors.addError({file:r,message:`Unsupported section(s) in app configuration: ${s.sort().join(", ")}`}),fi(o.flatMap(([a])=>a))}async validateConfigurationExtensionInstance(t,n,r){return r&&await r.deployConfig({apiKey:t,appConfiguration:n})?r:void 0}async findEntryPath(t,n){let r;return n.appModuleFeatures().includes("single_js_entry_path")?(r=(await Promise.all(["index"].flatMap(o=>[`${o}.js`,`${o}.jsx`,`${o}.ts`,`${o}.tsx`]).flatMap(o=>[`src/${o}`,o]).map(o=>B(t,o)).map(async o=>await K(o)?o:void 0))).find(o=>o!==void 0),r||this.errors.addError({file:t,message:`Couldn't find an index.{js,jsx,ts,tsx} file in the directories ${t} or ${B(t,"src")}`})):n.identifier==="function"&&(r=(await Promise.all(["src/index.js","src/index.ts","src/main.rs"].map(o=>B(t,o)).map(async o=>await K(o)?o:void 0))).find(o=>o!==void 0)),r}getDevApplicationURLs(t,n){let r=this.reloadState?.previousDevURLs;return r&&TE(r.applicationUrl,n.map(({configuration:o})=>o.auth_callback_path).find(o=>o),t.app_proxy)}};async function Ln(e,t,n){let r=await Is.load(e),o=await NE(r,t,n);return{project:r,activeConfig:o}}async function tR(e,t){let n=B(e,".gitignore");if(!Rt(n))return!0;let r=await $e(n),o=qE.default.default().add(r),s=Te(e,t);return!o.ignores(s)}async function nR(e,t){let n=Fn(t),r=B(e,n);if(await K(r))return{configurationPath:r,configurationFileName:n};throw new k(xe`Couldn't find ${n} in ${Se.path(e)}.`)}function rR(e,t){let n=e.map(r=>{let o=ye(r.path);if(t[o]!==void 0&&typeof t[o]=="string")return[o,t[o]];let s=r.content.client_id;if(typeof s=="string"&&s!=="")return[o,s]}).filter(r=>r!==void 0);return Object.fromEntries(n)}async function iR(e){let t=e.filter(l=>hr(l,ft.Backend)),n=e.filter(l=>hr(l,ft.Frontend));if(t.length>1){ce("Unable to decide project type as multiple web backends");return}else{if(t.length===0&&n.length>0)return"frontend";if(!t[0]){ce("Unable to decide project type as no web backend");return}}let{directory:r}=t[0],o=B(r,"package.json"),s=B(r,"Gemfile"),a=B(r,"composer.json");if(await K(o))return"node";if(await K(s))return"ruby";if(await K(a))return"php"}function hr(e,t){return e.configuration.roles.includes(t)}async function oR(e,t,n){let r=e.webs,o=e.allExtensions.filter(D=>D.isSentToMetrics()),s=e.name,a=e.directory,l=e.configuration.client_id,p=sl(e.configuration).sort();await uR(r,o,n,s,a,l,p,t)}async function uR(e,t,n,r,o,s,a,l){await _n.addPublicMetadata(async()=>{let p=await iR(e),D=t.filter(I=>I.isFunctionExtension).length,g=t.filter(I=>I.isESBuildExtension).length,E=t.filter(I=>I.isThemeExtension).length,w=t.length,v=e.filter(I=>hr(I,ft.Backend)).length,S=v===1?e.find(I=>hr(I,ft.Backend))?.framework:void 0,O=e.filter(I=>hr(I,ft.Frontend)).length,P={};for(let I of t)P[I.type]===void 0?P[I.type]=1:P[I.type]++;return{api_key:s,project_type:p,app_extensions_any:w>0,app_extensions_breakdown:JSON.stringify(P),app_extensions_count:w,app_extensions_custom_layout:n.usedCustomLayoutForExtensions,app_extensions_function_any:D>0,app_extensions_function_count:D,app_extensions_theme_any:E>0,app_extensions_theme_count:E,app_extensions_ui_any:g>0,app_extensions_ui_count:g,app_name_hash:gs(r),app_path_hash:gs(o),app_scopes:JSON.stringify(a),app_web_backend_any:v>0,app_web_backend_count:v,app_web_custom_layout:n.usedCustomLayoutForWeb,app_web_framework:S,app_web_frontend_any:O>0,app_web_frontend_count:O,env_package_manager_workspaces:l}}),await _n.addSensitiveMetadata(async()=>({app_name:r}))}async function sR(e){await _n.addPublicMetadata(async()=>({cmd_app_all_configs_any:Object.keys(e.allClientIdsByConfigName).length>0,cmd_app_all_configs_clients:JSON.stringify(e.allClientIdsByConfigName),cmd_app_linked_config_used:e.usesLinkedConfig,...e.usesLinkedConfig?{cmd_app_linked_config_name:e.name,cmd_app_linked_config_git_tracked:e.gitTracked,cmd_app_linked_config_source:e.source,cmd_app_linked_config_uses_cli_managed_urls:e.usesCliManagedUrls}:{}}))}d();var aR="project.json";async function gh(e){let t=await v0(e),n=B(t,aR);return await K(n)||await mt(n,JSON.stringify({})),n}function ml(e,t){let n=Ts(t);if(n){let r=`${zo.production}.${n}`;return e.dotenvFiles.get(r)}return e.dotenvFiles.get(zo.production)}async function gl(e,t){if(!t||typeof t!="string")return{};await gh(e.directory);let n=e.hiddenConfigRaw,r=n[t];if(r&&typeof r=="object")return r;if(typeof n.dev_store_url=="string"){try{let o=await gh(e.directory);await il(o,t,{dev_store_url:n.dev_store_url})}catch{}return{dev_store_url:n.dev_store_url}}return{}}function kE(e,t){let n=t.content.extension_directories,o=(Array.isArray(n)&&n.length>0?n:["extensions/*"]).map(s=>`${s}/*.extension.toml`);return e.extensionConfigFiles.filter(s=>{let a=Te(e.directory,s.path).replace(/\\/g,"/");return o.some(l=>Ic(a,l))})}function Dh(e,t){let n=t.content.web_directories;if(!Array.isArray(n)||n.length===0)return e.webConfigFiles;let r=n.map(o=>`${o}/shopify.web.toml`);return e.webConfigFiles.filter(o=>{let s=Te(e.directory,o.path).replace(/\\/g,"/");return r.some(a=>Ic(s,a))})}function DX(e,t){let n=t.content.extension_directories,r=(Array.isArray(n)&&n.length>0?n:["extensions/*"]).map(l=>`${l}/*.extension.toml`),o=t.content.web_directories,s=Array.isArray(o)&&o.length>0?o.map(l=>`${l}/shopify.web.toml`):["**/shopify.web.toml"],a=[...r,...s];return e.errors.filter(l=>{if(l.path===t.path)return!0;let p=Te(e.directory,l.path).replace(/\\/g,"/");return a.some(D=>Ic(p,D))})}d();async function CX({app:e,appApiKey:t,extensionUuids:n,command:r},o=process.env){let s=e.dotenv;s??={path:B(e.directory,VE(e.configPath)),variables:{}};let a={...e.dotenv?.variables??{}};o[e.idEnvironmentVariableName]||(a[e.idEnvironmentVariableName]=t),Object.keys(n).forEach(p=>{let D=`SHOPIFY_${xc(p)}_ID`;o[D]||(a[D]=n[p])});let l=r==="import-extensions";if(s.variables=a,l){let D=await K(s.path)?await $e(s.path):"",g=b0(D,a);await mt(s.path,g),e.dotenv=s}return e}function JE({app:e},t=process.env){let n={...e.dotenv?.variables,...t},r={},o=s=>{Object.keys(n).includes(s.idEnvironmentVariableName)&&(r[s.localIdentifier]=n[s.idEnvironmentVariableName])};return e.allExtensions.forEach(o),r}d();d();var KE=2,cR=["This may happen if:"," \u2022 Running in an unstable environment (container restart, resource limits)"," \u2022 Network interruption during app fetching","","Try running the command again. If the issue persists:"," \u2022 Check system resources and stability"," \u2022 Try running outside of containers/WSL if applicable"," \u2022 Report this issue with the error details and a verbose log"].filter(Boolean).join(`
|
|
206
|
+
`);async function YE(e,t,n,r,o){let s=e.length===0;if(s||(s=await PE()),s){let a=await xE(o.name);return r.createApp(n,{...o,name:a})}else{for(let l=0;l<KE;l++){let p=await SE(eF(r,n.id),e,t,{directory:o.directory});if(p){let D=await r.appFromIdentifiers(p.apiKey);if(D)return D}else{l<KE-1&&p0("App selection failed. Retrying...");continue}}let a=["Unable to select an app: the selection prompt failed multiple times.","",`Available apps: ${e.length}`].join(`
|
|
207
|
+
`);throw new tn(a,cR)}}d();d();d();async function XE(e,t,n){let r=await n.appVersionByTag(e,t),{app:{versionsDiff:o}}=await n.appVersionsDiff(e,{versionId:r.uuid,appVersionId:r.id});return{versionsDiff:o,versionDetails:r}}d();function lR(e,t){return t?e.find(r=>r.identifier===t||r.externalIdentifier===t||r.additionalIdentifiers?.includes(t))?.uidStrategy:void 0}async function ZE(e,t,n,r,o){let a=(o??await t.activeAppVersion(e))?.appModuleVersions.filter(p=>lR(n,p.specification?.identifier)!=="uuid")??[];return a.length===0?void 0:ru(a,n,r)}function ru(e,t,n){let r={},o=t.filter(Gc);return e.forEach(s=>{let a=o.find(D=>D.identifier===s.specification?.identifier.toLowerCase());if(!a)return;let l=s.config;if(!l)return;let p=a.transformRemoteToLocal?.(l,{flags:n,handle:s.handle})??l;r=fr(r,p)}),{...r}}function iu(e,t){return{title:e,uid:t,experience:"extension"}}function _h(e){return{title:e,uid:void 0,experience:"dashboard"}}async function kX(e,t,n){let{versionsDiff:r,versionDetails:o}=await XE(t,n,e),s=p=>p.filter(D=>D.specification.experience==="extension"&&D.specification.identifier!=="webhook_subscription").map(D=>iu(D.handle,void 0)),a=p=>p.filter(D=>D.specification.options.managementExperience==="dashboard").map(D=>_h(D.handle));return{extensionIdentifiersBreakdown:{onlyRemote:[...s(r.removed),...a(r.removed)],toCreate:[...s(r.added),...a(r.added)],toUpdate:[],unchanged:[...s(r.updated),...a(r.updated)]},versionDetails:o}}function qX({localApp:e,versionAppModules:t,activeAppVersion:n}){if(e.allExtensions.filter(s=>s.isAppConfigExtension).length===0)return;let r=ru(t,e.specifications??[],e.remoteFlags),o=ru(n?.appModuleVersions??[],e.specifications??[],e.remoteFlags);return yh(r,o)}function yh(e,t){let n=new Set([...Object.keys(e),...Object.keys(t)]);if(n.size===0)return;let r={existingFieldNames:[],existingUpdatedFieldNames:[],newFieldNames:[],deletedFieldNames:[]};for(let o of n){let s=e[o],a=t[o];s===void 0?r.deletedFieldNames.push(o):a===void 0?r.newFieldNames.push(o):Yy(s,a)?r.existingFieldNames.push(o):r.existingUpdatedFieldNames.push(o)}return r}d();d();async function Fh(e,t=!0){let n=e.map(({local:l})=>`"${l.handle}"`).join(", "),r=e.map(({remote:l})=>l.type.toLocaleLowerCase()),o=r.filter((l,p)=>r.indexOf(l)===p).map(l=>`"${l}"`).join(", "),s=e.map(({local:l})=>`"${l.type}"`).join(", ");no({headline:"Extension migrations can't be undone.",body:`Your ${n} configuration has been updated. Migrating gives you access to new features and won't impact the end user experience. All previous extension versions will reflect this change.`});let a=t?`Yes, confirm migration from ${o} to ${s}`:"Yes, confirm migration";return Mn({message:`Migrate ${n}?`,confirmationMessage:a,cancellationMessage:"No, cancel"})}d();async function QE(e){let{extensionsToMigrate:t,appId:n,remoteExtensions:r,migrationClient:o}=e;await Promise.all(t.map(({remote:l})=>fR({apiKey:n,registrationId:void 0,registrationUuid:l.uuid,migrationClient:o})));let s=new Map([["flow_action_definition","FLOW_ACTION"],["flow_trigger_definition","FLOW_TRIGGER"]]),a=t.map(({remote:l})=>l.uuid);return r.filter(l=>a.includes(l.uuid)).map(l=>({...l,type:s.get(l.type)??l.type}))}async function fR(e){let{apiKey:t,registrationId:n,registrationUuid:r,migrationClient:o}=e,s={apiKey:t,registrationId:n,registrationUuid:r},a=await o.migrateFlowExtension(s);if(a?.migrateFlowExtension?.userErrors?.length>0){let l=a.migrateFlowExtension.userErrors.map(p=>p.message).join(", ");throw new k(l)}if(!a?.migrateFlowExtension?.migratedFlowExtension)throw new k("Couldn't migrate to Flow extension");return n}d();async function ev(e){let{extensionsToMigrate:t,appId:n,remoteExtensions:r,migrationClient:o}=e;return await Promise.all(t.map(({remote:s})=>pR({apiKey:n,registrationId:void 0,registrationUuid:s.uuid,migrationClient:o}))),r.map(s=>t.some(({remote:a})=>a.uuid===s.uuid)?{...s,type:"UI_EXTENSION"}:s)}async function pR(e){let{apiKey:t,registrationId:n,registrationUuid:r,migrationClient:o}=e,s={apiKey:t,registrationId:n,registrationUuid:r},a=await o.migrateToUiExtension(s);if(a?.migrateToUiExtension?.userErrors?.length>0){let l=a.migrateToUiExtension.userErrors.map(p=>p.message).join(", ");throw new k(l)}if(!a?.migrateToUiExtension?.migratedToUiExtension)throw new k("Couldn't migrate to UI extension")}d();var tv={marketing_activity:["marketing_activity_extension"]},nv={flow_action:["flow_action_definition"],flow_trigger:["flow_trigger_definition"],flow_trigger_lifecycle_callback:["flow_trigger_discovery_webhook"]},rv={ui_extension:["CHECKOUT_UI_EXTENSION","POS_UI_EXTENSION","checkout_ui","pos_ui"]},iv={admin_link:["app_link","bulk_action"]};function dR(e,t){let n=new Set(e.map(r=>r.localIdentifier));return Object.fromEntries(Object.entries(t).filter(([r])=>n.has(r)))}function Eh(e,t,n,r){let o=dR(e,n),s=Object.keys(r),a=Object.values(r).flat(),l=e.filter(g=>s.includes(g.type)),p=t.filter(g=>a.includes(g.type)),D=new Map;return p.forEach(g=>{D.set(g.uuid,g),D.set(vt(g.title.substring(0,Nr)),g)}),l.reduce((g,E)=>{let w=o[E.localIdentifier]??"unknown",v=D.get(w)??D.get(E.localIdentifier.toLowerCase()),S=r[E.type]?.includes(v?.type??"undefined");return v&&S&&g.push({local:E,remote:v}),g},[])}async function ov(e){let{extensionsToMigrate:t,appId:n,type:r,remoteExtensions:o,migrationClient:s}=e;await Promise.all(t.map(({remote:l})=>hR({apiKey:n,registrationId:void 0,registrationUuid:l.uuid,type:r,migrationClient:s})));let a=t.map(({remote:l})=>l.uuid);return o.filter(l=>a.includes(l.uuid)).map(l=>({...l,type:r.toUpperCase()}))}async function hR(e){let{apiKey:t,registrationId:n,registrationUuid:r,type:o,migrationClient:s}=e,a={apiKey:t,registrationId:n,registrationUuid:r,type:o},l=await s.migrateAppModule(a);if(l?.migrateAppModule?.userErrors?.length>0){let p=l.migrateAppModule.userErrors.map(D=>D.message).join(", ");throw new k(p)}if(!l?.migrateAppModule?.migratedAppModule)throw new k(`Couldn't migrate to app module ${o}`);return n}d();d();var uv=di`
|
|
208
|
+
mutation MigrateFlowExtension($apiKey: String!, $registrationId: ID, $registrationUuid: String) {
|
|
209
|
+
migrateFlowExtension(
|
|
210
|
+
input: {apiKey: $apiKey, registrationId: $registrationId, registrationUuid: $registrationUuid}
|
|
211
|
+
) {
|
|
212
|
+
migratedFlowExtension
|
|
213
|
+
userErrors {
|
|
214
|
+
field
|
|
215
|
+
message
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
`;d();var sv=di`
|
|
220
|
+
mutation MigrateToUiExtension($apiKey: String!, $registrationId: ID, $registrationUuid: String) {
|
|
221
|
+
migrateToUiExtension(
|
|
222
|
+
input: {apiKey: $apiKey, registrationId: $registrationId, registrationUuid: $registrationUuid}
|
|
223
|
+
) {
|
|
224
|
+
migratedToUiExtension
|
|
225
|
+
userErrors {
|
|
226
|
+
field
|
|
227
|
+
message
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
`;d();var av=di`
|
|
232
|
+
mutation MigrateAppModule($apiKey: String!, $registrationId: ID, $registrationUuid: String, $type: String!) {
|
|
233
|
+
migrateAppModule(
|
|
234
|
+
input: {apiKey: $apiKey, registrationId: $registrationId, registrationUuid: $registrationUuid, type: $type}
|
|
235
|
+
) {
|
|
236
|
+
migratedAppModule
|
|
237
|
+
userErrors {
|
|
238
|
+
field
|
|
239
|
+
message
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
`;var _l=class e{static instance;static getInstance(t){return e.instance??=new e(t),e.instance}static resetInstance(){e.instance=void 0}clientName=q0.Partners;webUiName="Partner Dashboard";organizationSource=Yo.Partners;bundleFormat="zip";_session;constructor(t){this._session=t}async session(){if(!this._session){if(l0())throw new Error("PartnersClient.session() should not be invoked dynamically in a unit test");let{token:t,userId:n}=await Sd();this._session={token:t,businessPlatformToken:"",accountInfo:{type:"UnknownAccount"},userId:n}}return this._session}async request(t,n=void 0,r,o){return Zy(t,await this.token(),n,r,o,this.createUnauthorizedHandler())}async token(){return(await this.session()).token}async unsafeRefreshToken(){let{token:t}=await Sd([],process.env,{noPrompt:!0,forceRefresh:!0}),n=await this.session();return t&&(n.token=t),n.token}async migrateFlowExtension(t){return this.request(uv,t)}async migrateAppModule(t){return this.request(av,t)}async migrateToUiExtension(t){return this.request(sv,t)}createUnauthorizedHandler(){return W0(this)}};async function lv(e){return await DR(e)?e.developerPlatformClient.activeAppVersion(e.remoteApp):e.activeAppVersion}async function DR(e){let{app:t,appId:n,developerPlatformClient:r,envIdentifiers:o,remoteApp:s}=e,a=await r.appExtensionRegistrations(s,e.activeAppVersion),l=t.allExtensions,p=o,D=a.app.extensionRegistrations,g=a.app.dashboardManagedExtensionRegistrations,E=_l.getInstance(),w=!1,v=D,S=Eh(l,v,p,rv);if(S.length>0){if(!await Fh(S))throw new ro;v=await ev({extensionsToMigrate:S,appId:n,remoteExtensions:v,migrationClient:E}),w=!0}let O=[{typesMap:nv,migrate:QE},cv(tv,"marketing_activity"),cv(iv,"admin_link")];for(let P of O){let I=Eh(l,g,p,P.typesMap);if(I.length===0)continue;if(!await Fh(I,!1))throw new ro;let q=await P.migrate({extensionsToMigrate:I,appId:n,remoteExtensions:g,migrationClient:E});v=v.concat(q),w=!0}return w}function cv(e,t){return{typesMap:e,migrate:n=>ov({...n,type:t})}}d();d();var mR={bullet:"+",color:"green",suffix:"(new)"},gR={color:"#FF8800",suffix:"(updated)"},_R={bullet:"-",color:"red",suffix:"(removed)"};function Ch(e){return[...e.new.map(t=>vh(t,mR)),...e.updated?e.updated.map(t=>vh(t,gR)):[],...e.unchanged,...e.removed.map(t=>vh(t,_R))]}function vh(e,t){let n=typeof e=="string"?[e,{subdued:t.suffix??""}]:e;return{...t.bullet?{bullet:t.bullet}:{},item:n,color:t.color}}function yR({release:e,allowUpdates:t,allowDeletes:n,extensionIdentifiersBreakdown:r,configExtensionIdentifiersBreakdown:o}){if(!e||t&&n)return!0;let s=r.onlyRemote.length>0,a=(o?.deletedFieldNames.length??0)>0,l=s||a,p=r.toCreate.length>0||r.toUpdate.length>0,D=(o?.newFieldNames.length??0)>0||(o?.existingUpdatedFieldNames.length??0)>0,g=p||D;if(t&&!l||n&&!g)return!0;if(!c0()&&(l||g)){let E=[];throw g&&E.push("--allow-updates"),l&&E.push("--allow-deletes"),new k("This deployment includes changes that require confirmation.",["Run the command with",{command:E.join(" ")},"to deploy without confirmation."])}return!1}async function fv({allowUpdates:e,allowDeletes:t,extensionIdentifiersBreakdown:n,configExtensionIdentifiersBreakdown:r,appTitle:o,release:s,installCount:a}){if(await _n.addPublicMetadata(()=>CR(r)),yR({release:s,allowUpdates:e,allowDeletes:t,extensionIdentifiersBreakdown:n,configExtensionIdentifiersBreakdown:r}))return!0;let p=await ER(n),D=await vR(s,r);return FR({appTitle:o,extensionsContentPrompt:p,configContentPrompt:D,release:s,installCount:a})}async function FR({appTitle:e,extensionsContentPrompt:{extensionsInfoTable:t,hasDeletedExtensions:n},configContentPrompt:r,release:o,installCount:s}){let a=new Date().valueOf(),l=!0,p=[];r&&p.push(r.configInfoTable.items.length===0?{...r.configInfoTable,emptyItemsText:"No changes",items:[]}:r.configInfoTable);let D=e!==void 0&&n;t?p.push(D?{...t,helperText:"Removing extensions can permanently delete app user data"}:t):p.push({header:"Extensions:",emptyItemsText:"None",items:[]});let g=`${o?"Release":"Create"} a new version${e?` of ${e}`:""}?`,E=n&&s!==void 0&&s>0;D?l=await a0({message:g,infoTable:p,confirmation:e,...E?{warningItem:["This release removes extensions and related data from",{error:s.toString()},`app installations.
|
|
244
|
+
Use caution as this may include production data on live stores.`]}:{}}):l=await Mn({message:g,infoTable:p,confirmationMessage:`Yes, ${o?"release":"create"} this new version`,cancellationMessage:"No, cancel"});let w=new Date().valueOf()-a;return await _n.addPublicMetadata(()=>({cmd_deploy_confirm_cancelled:!l,cmd_deploy_confirm_time_to_complete_ms:w})),l}async function ER(e){let{onlyRemote:t,toCreate:n,toUpdate:r,unchanged:o}=e,s=(g,E)=>{switch(g.experience){case"dashboard":return[g.title,{subdued:`(${E}from Partner Dashboard)`}];case"extension":return g.uid&&g.uid.length>0?`${g.title} (uid: ${g.uid})`:g.title}},a,l={new:n.map(g=>s(g,"new, ")),unchanged:o.map(g=>s(g,"")),updated:r.map(g=>s(g,"updated, ")),removed:t.map(g=>s(g,"removed, "))},p=Ch(l),D=t.length>0;return p.length>0&&(a={header:"Extensions:",items:p}),await _n.addPublicMetadata(()=>({cmd_deploy_confirm_new_registrations:n.length,cmd_deploy_confirm_updated_registrations:r.length,cmd_deploy_confirm_removed_registrations:t.length})),{extensionsInfoTable:a,hasDeletedExtensions:D}}async function vR(e,t){if(!t)return;let{existingFieldNames:n,existingUpdatedFieldNames:r,newFieldNames:o,deletedFieldNames:s}=t,l=Ch({new:o,updated:r,unchanged:n,removed:s});return{configInfoTable:{header:"Configuration:",items:o.length>0||r.length>0||s.length>0||!e?l:[]}}}function CR(e){if(!e)return{cmd_deploy_include_config_used:!1};let{existingFieldNames:t,existingUpdatedFieldNames:n,newFieldNames:r,deletedFieldNames:o}=e,s=[...n,...r,...t];return{cmd_deploy_include_config_used:!0,...s.length>0?{cmd_deploy_config_modules_breakdown:JSON.stringify(s.sort())}:{},...n.length>0?{cmd_deploy_config_modules_updated:JSON.stringify(n.sort())}:{},...r.length>0?{cmd_deploy_config_modules_added:JSON.stringify(r.sort())}:{},...o.length>0?{cmd_deploy_config_modules_deleted:JSON.stringify(o.sort())}:{}}}async function pv(e){let t=await lv(e),n=await wR({options:e,activeAppVersion:t}),r=SR(n),o=await AR(e,t),a=e.release&&!e.allowDeletes&&r.onlyRemote.length>0?await TR(e).catch(()=>{}):void 0;if(!await fv({extensionIdentifiersBreakdown:r,configExtensionIdentifiersBreakdown:o,appTitle:e.remoteApp?.title,release:e.release,allowUpdates:e.allowUpdates,allowDeletes:e.allowDeletes,installCount:a}))throw new ro;return xR(n)}async function wR({options:e,activeAppVersion:t}){let n=t?.appModuleVersions??[],r=e.app.allExtensions,o=e.envIdentifiers,s=n.filter(D=>D.registrationId===""),a=n.map(D=>{if(D.registrationId===""){let g=r.find(E=>o[E.localIdentifier]===D.registrationUuid)??bR(r,s,D);if(g)return{experience:g.specification.experience,status:"updated",local:g,remote:D}}else{let g=r.find(E=>D.registrationId===E.uid);if(g)return{experience:g.specification.experience,status:"unchanged",local:g,remote:D}}return{experience:D.specification?.experience??"extension",status:"deleted",remote:D}}),l=a.map(D=>D.local),p=r.filter(D=>!l.includes(D)).map(D=>({experience:D.specification.experience,status:"created",local:D}));return[...a,...p]}function bR(e,t,n){let r=(l,p)=>vt(l.handle)===vt(p.handle)&&(l.specification.identifier===p.specification?.identifier||l.specification.externalIdentifier===p.specification?.identifier),o=e.filter(l=>r(l,n));if(o.length!==1)return;let s=o[0];return t.some(l=>l!==n&&r(s,l))?void 0:s}async function AR(e,t){let{app:n,appId:r}=e,o=await PR(n,r),s=ru(t?.appModuleVersions??[],n.specifications??[],n.remoteFlags);return yh(o,s)}function SR(e){let t=e.filter(n=>n.experience==="extension");return{onlyRemote:t.filter(n=>n.status==="deleted").map(n=>OR(n.remote)),toCreate:t.filter(n=>n.status==="created").map(n=>iu(n.local.localIdentifier,n.local.uid)),toUpdate:t.filter(n=>n.status==="updated").map(n=>iu(n.local.localIdentifier,void 0)),unchanged:t.filter(n=>n.status==="unchanged").map(n=>iu(n.local.localIdentifier,void 0))}}function xR(e){let t={},n={};for(let r of e){if(!r.local)continue;let o=r.local.uid,s=r.remote?.registrationUuid??o,a=r.remote?.registrationId??o;t[r.local.localIdentifier]=s,n[r.local.localIdentifier]=a}return{appModuleUuids:t,appModuleRegistrationIds:n}}async function PR(e,t){let n={},r=e.allExtensions.filter(o=>o.isAppConfigExtension);for(let o of r){let s=await o.deployConfig({apiKey:t,appConfiguration:e.configuration}),a=o.specification.transformRemoteToLocal?.(s??{},{flags:e.remoteFlags,handle:o.handle})??o.configuration;n=fr(n,a)}return n}function OR(e){return e.specification?.options.managementExperience==="dashboard"?_h(e.handle):iu(e.handle,e.registrationId)}async function TR(e){return e.developerPlatformClient.appInstallCount({id:e.remoteApp.id,apiKey:e.remoteApp.apiKey,organizationId:e.remoteApp.organizationId})}d();function dv({appName:e,org:t,devStores:n,updateURLs:r,messages:o}){let s=[`App: ${e}`];t&&s.unshift(`Org: ${t}`),n&&n.length>0&&n.forEach(l=>s.push(`Dev store: ${l}`)),r&&s.push(`Update URLs: ${r}`);let a=[{list:{items:s}}];if(o&&o.length)for(let l=0;l<o.length;l++){let p=o[l];if(!p||p.length===0)continue;let D=l===0?`
|
|
245
|
+
`:`
|
|
246
|
+
|
|
247
|
+
`;a=a.concat(D,p)}return a}var hv=e=>({message:xe`Invalid Client ID: ${e}`,tryMessage:xe`You can find the Client ID in the app settings in the Developer Dashboard.`}),Dv=["You can pass",{command:"--reset"},"to your command to reset your app configuration."],IR=(e,t,n)=>[{list:{title:"Next steps:",items:["Check that your account has permission to develop apps for this organization or contact the owner of the organization to grant you permission",["Run",{command:"shopify auth login"},"to log into a different",t?"organization":"account","than",{bold:e}],...n?[["Pass",{command:"--reset"},"to your command to create a new app"]]:[]]}}],yl=async e=>{let t=Md(),n=await t.appFromIdentifiers(e.apiKey);if(!n){let r=await t.accountInfo()??{type:"UnknownAccount"},o="Unknown account",s=!1;throw Gy(r)?(o=r.orgName,s=!0):zy(r)&&(o=r.email),new k(["No app with client ID",{command:e.apiKey},"found"],IR(o,s,e.offerReset??!0))}return n};async function hQ(e){let{noRelease:t,app:n,remoteApp:r,developerPlatformClient:o,organization:s}=e,a=await o.activeAppVersion(r);await BR(n),gv({org:s.businessName,appName:r.title,appDotEnv:n.dotenv?.path,configFile:ye(n.configPath),messages:[Dv]});let l=await pv({app:n,appId:r.apiKey,appName:r.title,release:!t,developerPlatformClient:o,envIdentifiers:JE({app:n}),remoteApp:r,activeAppVersion:a,allowUpdates:e.allowUpdates,allowDeletes:e.allowDeletes}),p=!1;return a&&(p=a.appModuleVersions.some(D=>!D.registrationId)),{deployIdentifiers:l,didMigrateExtensionsToDevDash:p}}async function BR(e){let t=e.configuration.build?.include_config_on_deploy;if(t===void 0)return;await(await wt.read(e.configPath)).remove("build.include_config_on_deploy"),t?RR():NR()}function RR(){no({headline:"Your configuration file has been modified",body:["The `include_config_on_deploy` field is no longer supported, since all apps must now include configuration on deploy. It has been removed from your configuration file."],link:{label:"See Shopify CLI documentation.",url:"https://shopify.dev/docs/apps/build/cli-for-apps/app-configuration#build"}})}function NR(){Uc({headline:"Configuration is now included on deploy",body:["The `include_config_on_deploy` field is no longer supported and has been removed from your configuration file. Review this file to ensure it's up to date with the correct configuration."],link:{label:"See Shopify CLI documentation.",url:"https://shopify.dev/docs/apps/build/cli-for-apps/app-configuration#build"}})}async function mv(e){let t=Md(),n=e.organizationId?await Kc(e.organizationId,t):await MR(),{organization:r,apps:o,hasMorePages:s}=await t.orgAndApps(n.id),a=await YE(o,s,r,t,e);return await wh(a,t.organizationSource),a}async function MR(){let e=await H0();if(e.length===0)throw new k("No organizations found.","Make sure you have access to a Shopify organization.");return _0(e)}function DQ({organization:e,app:t,remoteApp:n,selectedStore:r,tunnelMode:o}){if(vy())return;let s="Not yet configured",a=t.configuration.build?.automatically_update_urls_on_dev;a!==void 0&&(s=a?"Yes":"No");let l=[Dv];o==="use-localhost"&&l.push(["Note:",{command:"--use-localhost"},"is not compatible with Shopify features which directly invoke your app","(such as Webhooks, App proxy, and Flow actions), or those which require testing your app from another","device (such as POS)."]),gv({org:e.businessName,appName:n.title,devStore:r.shopDomain,updateURLs:s,configFile:ye(t.configPath),messages:l})}function gv({org:e,appName:t,devStore:n,updateURLs:r,configFile:o,appDotEnv:s,messages:a}){let l=[];n&&l.push(n);let p=(s&&ye(s))??(o&&Fn(o));no({headline:o?`Using ${p} for default values:`:"Using these settings:",body:dv({appName:t,org:e,devStores:l,updateURLs:r,messages:a})})}async function wh(e,t){let r={[t===Yo.BusinessPlatform?"business_platform_id":"partner_id"]:hs(e.organizationId)};await _n.addPublicMetadata(()=>({...r,api_key:e.apiKey}))}d();import{resolve as jR}from"node:path";var _v=y.object({id:y.string().min(1).refine(e=>!e.startsWith("gid://")).nullable().describe("The upstream non-GID app identifier, or null when the platform supplies a GID."),gid:y.string().regex(/^gid:\/\/shopify\/App\/[^\s/]+$/).nullable().describe("The Shopify App GID, or null when the platform supplies another identifier."),name:y.string(),clientId:y.string().min(1).describe("The public OAuth client identifier."),organizationId:y.string().min(1).refine(e=>!e.startsWith("gid://")).nullable().describe("The upstream non-GID organization identifier, or null when unavailable."),organizationGid:y.string().regex(/^gid:\/\/shopify\/Organization\/[^\s/]+$/).nullable().describe("The Shopify Organization GID, or null when unavailable.")}).strict().describe("The linked app identity. Read the file at path for its configuration."),bh=bc({name:"AppConfigLinkResult",schema:y.object({path:y.string().refine(Wo,"Expected an absolute filesystem path."),app:_v}).strict(),definitions:{LinkedApp:_v}});function yv(e){let{app:t}=e;return bh.validate({path:jR(e.path),app:{id:t.id.startsWith("gid://")?null:t.id,gid:t.id.startsWith("gid://")?t.id:null,name:e.appName,clientId:t.apiKey,organizationId:t.organizationId.startsWith("gid://")?null:t.organizationId,organizationGid:t.organizationId.startsWith("gid://")?t.organizationId:null}})}d();function Fv(e,t,n){if(n==="json"){Wc(bh.encode(e));return}$R(ye(e.path),e.app.name,t)}function $R(e,t,n){ys({headline:`${e} is now linked to "${t}" on Shopify`,body:`Using ${e} as your default config.`,nextSteps:[[`Make updates to ${e} in your local project`],["To upload your config, run",{command:qc(n,"shopify app deploy")}]],reference:[{link:{label:"App configuration",url:"https://shopify.dev/docs/apps/tools/cli/configuration"}}]})}d();d();async function Ev(e,t){ce(`Writing app configuration to ${t}`);let n=UR(structuredClone(e)),r=Ah(n),o=new wt(t,{});await o.replace(r),await o.transformRaw(LR)}function Ah(e){if(e==null)return e;if(Array.isArray(e))return e.map(Ah);if(typeof e=="object"){let t={};for(let[n,r]of Object.entries(e)){let o=Ah(r);typeof o=="object"&&o!==null&&!Array.isArray(o)&&Object.keys(o).length===0||(t[n]=o)}return t}return e}function LR(e){let t=`# Learn more about configuring your app at https://shopify.dev/docs/apps/tools/cli/configuration
|
|
248
|
+
`,n=`
|
|
249
|
+
# Learn more at https://shopify.dev/docs/apps/tools/cli/configuration#access_scopes`,r=e.split(/(\r\n|\r|\n)/);return r.unshift(`
|
|
250
|
+
`),r.unshift(t),r.forEach((o,s)=>{o==="[access_scopes]"&&r.splice(s+1,0,n)}),r.join("")}function UR(e){let t=e.webhooks;if(Array.isArray(t?.subscriptions)&&t.subscriptions.length){let n=io(e?.application_url);t.subscriptions=B0(t.subscriptions),t.subscriptions=t.subscriptions.map(({uri:r,...o})=>({uri:n&&r.includes(n)?r.replace(n,""):r,...o}))}return e}d();d();d();var kR=Vo.extend({app_proxy:y.object({url:y.preprocess(io,zc(y.string({invalid_type_error:"Value must be string"}))),subpath:y.string({invalid_type_error:"Value must be a string"}),prefix:y.string({invalid_type_error:"Value must be a string"})}).optional()}),Sh="app_proxy",qR={forward:(e,t)=>{let n=e;if(!n.app_proxy)return{};let r;return"application_url"in t&&(r=t?.application_url),{url:Jo(n.app_proxy.url,r),subpath:n.app_proxy.subpath,prefix:n.app_proxy.prefix}},reverse:e=>{let t=e;return{app_proxy:{url:io(t.url),subpath:t.subpath,prefix:t.prefix}}}},WR=mi({identifier:Sh,schema:kR,transformConfig:qR,getDevSessionUpdateMessages:async e=>e.app_proxy?[`Using URL: ${e.app_proxy.url}`,"Any changes to prefix and subpath will only apply to new installs"]:[],patchWithAppDevURLs:(e,t)=>{t.appProxy&&(e.app_proxy={url:t.appProxy.proxyUrl,subpath:t.appProxy.proxySubPath,prefix:t.appProxy.proxySubPathPrefix})}}),vv=WR;d();var HR=Vo.extend({pos:y.object({embedded:y.boolean({invalid_type_error:"Value must be Boolean"})}).optional()}),xh="point_of_sale",zR={embedded:"pos.embedded"},GR=mi({identifier:xh,schema:HR,transformConfig:zR}),Cv=GR;d();d();function wv(e,t){let n=e;if(!n.events?.subscription)return e;let r;t&&"application_url"in t&&(r=t?.application_url);let{handle:o,...s}=n,a=n.events.subscription,l=!Array.isArray(a),p=JR(a).map(D=>{let{handle:g,...E}=D,w=l?E:D;return typeof w.uri=="string"?{...w,uri:Jo(w.uri,r)}:w});return{...s,events:{...n.events,subscription:Array.isArray(a)?p:p[0]}}}function bv(e,t){let{api_version:n,subscription:r}=Ct(e,"events")??{},o=l=>{let{identifier:p,api_version:D,...g}=l;return D!==void 0&&D!==n?{...g,api_version:D}:g},s;if(Array.isArray(r))s=r.map(o);else if(r){let l=t?.handle??r.handle??VR(r);s=[o({...r,handle:l})]}let a={};return n!==void 0&&(a.api_version=n),s!==void 0&&(a.subscription=s),{events:a}}function VR(e){return vt([e.topic,...e.actions].join("-")).slice(0,Nr).replace(/-$/,"")}function JR(e){return Array.isArray(e)?e:[e]}var Fl="events",KR={forward:wv,reverse:bv},Av=y.string().trim().nonempty("Handle can't be empty").max(Nr,`Handle can't exceed ${Nr} characters`).regex(/^[a-zA-Z0-9_-]*$/,"Handle can only contain alphanumeric characters, underscores and hyphens").refine(e=>e!==Fl,'The handle "events" is reserved for the legacy events module. Choose a different subscription handle.'),YR=y.object({subscription:y.unknown().optional()}).passthrough(),XR=Vo.extend({handle:Av.optional(),events:YR.optional()}).superRefine((e,t)=>{let n=e.events?.subscription;if(n===void 0||Array.isArray(n))return;let r=Av.safeParse(e.handle);r.success||r.error.issues.forEach(o=>t.addIssue({...o,path:["handle"]}))}),ZR=y.preprocess(e=>{if(typeof e!="object"||e===null||Array.isArray(e)||!("handle"in e))return e;let t=Ct(e,"events.subscription");if(t!==void 0&&!Array.isArray(t))return e;let{handle:n,...r}=e;return r},XR),QR=mi({identifier:Fl,schema:ZR,transformConfig:KR,expandConfig:e=>{let t=e.events?.subscription;return Array.isArray(t)?t.map(n=>{let{handle:r,...o}=n;return{handle:r,events:{...e.events,subscription:o}}}):[e]},getIdentity:e=>{if(e.handle)return{handle:e.handle,uid:e.handle}},getTarget:e=>{let t=e.events?.subscription?.topic;return typeof t=="string"?t:void 0}}),Sv=QR;d();var eN={forward:nN,reverse:e=>rN(e)},Oh="privacy_compliance_webhooks",tN=mi({identifier:Oh,schema:Jc,transformConfig:eN}),xv=tN;function nN(e,t){let n=Ct(e,"webhooks"),r;"application_url"in t&&(r=t?.application_url);let o=Xy({customers_redact_url:Ph(iN(n),r),customers_data_request_url:Ph(oN(n),r),shop_redact_url:Ph(uN(n),r)});if(Object.keys(o).length===0)return o;{let{api_version:s}=n;return{api_version:s,...o}}}function rN(e){let t=Ct(e,"customers_redact_url"),n=Ct(e,"customers_data_request_url"),r=Ct(e,"shop_redact_url"),o=[];return n&&o.push({compliance_topics:[Vc.CustomersDataRequest],uri:n}),t&&o.push({compliance_topics:[Vc.CustomersRedact],uri:t}),r&&o.push({compliance_topics:[Vc.ShopRedact],uri:r}),o.length===0?{}:{webhooks:{subscriptions:I0(o),privacy_compliance:void 0}}}function Th(e,t){return e.subscriptions?.find(n=>n.compliance_topics?.includes(t))?.uri}function Ph(e,t){return t&&e?.startsWith("/")?`${io(t)}${e}`:e}function iN(e){return Th(e,"customers/redact")??e?.privacy_compliance?.customer_deletion_url}function oN(e){return Th(e,"customers/data_request")??e?.privacy_compliance?.customer_data_request_url}function uN(e){return Th(e,"shop/redact")??e?.privacy_compliance?.shop_deletion_url}d();var sN="@shopify/post-purchase-ui-extensions",aN=Je.extend({metafields:y.array(Di).optional()}),cN=Ie({identifier:"checkout_post_purchase",dependency:sN,partnersWebIdentifier:"post_purchase",schema:aN,appModuleFeatures:e=>["ui_preview","cart_url","esbuild","single_js_entry_path"],getOutputRelativePath:e=>`dist/${e.handle}.js`,clientSteps:[{lifecycle:"deploy",steps:[{id:"bundle-ui",name:"Bundle UI Extension",type:"bundle_ui",config:{}}]}],deployConfig:async(e,t)=>({metafields:e.metafields??[]})}),Pv=cN;d();var lN="@shopify/checkout-ui-extensions",fN=Je.extend({name:y.string(),extension_points:y.array(y.string()).optional(),metafields:y.array(Di).optional(),settings:y.object({fields:y.any().optional()}).optional()}),pN=Ie({identifier:"checkout_ui_extension",dependency:lN,schema:fN,appModuleFeatures:e=>["ui_preview","cart_url","esbuild","single_js_entry_path","generates_source_maps"],getOutputRelativePath:e=>`dist/${e.handle}.js`,clientSteps:[{lifecycle:"deploy",steps:[{id:"bundle-ui",name:"Bundle UI Extension",type:"bundle_ui",config:{}}]}],deployConfig:async(e,t)=>({extension_points:e.extension_points,capabilities:e.capabilities,supported_features:e.supported_features,metafields:e.metafields??[],name:e.name,settings:e.settings,localization:await pr(t,"checkout_ui")})}),Ov=pN;d();d();d();var bt={customer_reference:"customer_reference",order_reference:"order_reference",product_reference:"product_reference",marketing_activity_reference:"marketing_activity_reference",abandonment_reference:"abandonment_reference",company_reference:"company_reference",company_contact_reference:"company_contact_reference"},See=["customer","order","product","marketing_activity","abandonment","company","company_contact"],Tv=[bt.customer_reference,bt.order_reference,bt.product_reference,bt.company_reference,bt.company_contact_reference],Iv=[bt.customer_reference,bt.order_reference,bt.product_reference,bt.marketing_activity_reference,bt.abandonment_reference,bt.company_reference,bt.company_contact_reference],Qe={boolean:"boolean",email:"email",multiLineText:"multi_line_text_field",int:"number_integer",singleLineText:"single_line_text_field",url:"url",decimal:"number_decimal",schemaTypeReference:"schema_type_reference"},Bv=[[Qe.boolean,"checkbox"],[Qe.email,"email"],[Qe.multiLineText,"text-multi-line"],[Qe.int,"int"],[Qe.singleLineText,"text-single-line"],[Qe.url,"url"],[Qe.decimal,"number"],[Qe.schemaTypeReference,"schema-type-reference"]],dN=[Qe.boolean,Qe.email,Qe.multiLineText,Qe.int,Qe.singleLineText,Qe.url,Qe.decimal],hN=[Qe.boolean,Qe.email,Qe.singleLineText,Qe.url,Qe.decimal,Qe.schemaTypeReference],Rv=Bv.filter(([e])=>dN.includes(e)),Nv=Bv.filter(([e])=>hN.includes(e));d();d();var El=async(e,t)=>{if(!t)return"";let n=await Ge(B(e,t));if(n.length>1)throw new Error("Multiple files found for schema path");if(n.length===0)throw new Error("No file found for schema path");return $e(n[0])};d();var DN=new Map(Rv),mN=new Map(Nv),gN=(e,t)=>{let n=t==="flow_action"?DN:mN,r=Ih(e.type),o=r?n.get("schema_type_reference"):n.get(e.type);if(typeof e.key!="string")throw new k(`key property must be specified for non-commerce object fields in ${JSON.stringify(e)}`);if(!o)throw new k(`Field type ${e.type} is not supported on Flow ${t==="flow_action"?"Actions":"Triggers"}`);let s={name:e.key,description:e.description,uiType:o};return t==="flow_action"&&(s.label=e.name,s.required=e.required),r&&(s.typeRefName=e.type.replace("schema.","")),s},_N=(e,t)=>{if(t==="flow_trigger"&&!Tv.includes(e.type))throw new k(`Commerce object ${e.type} is not supported for Flow Triggers`);if(t==="flow_action"&&!Iv.includes(e.type))throw new k(`Commerce object ${e.type} is not supported for Flow Actions`);let n=e.type.replace("_reference",""),r={name:`${n}_id`,uiType:t==="flow_action"?"commerce-object-id":n,description:e.description};return n==="marketing_activity"&&(r.uiType="marketing-activity-id",r.marketingActivityCreateUrl=e.marketingActivityCreateUrl,r.marketingActivityDeleteUrl=e.marketingActivityDeleteUrl),t==="flow_action"&&(r.label=`${Ho(n)} ID`,r.required=e.required),r},vl=(e,t)=>t?t.map(r=>Object.keys(bt).includes(r.type)?_N(r,e):gN(r,e)):[];var Bh=P0.extend({key:y.string().regex(/^[a-zA-Z\s]*$/,{message:"String must contain only alphabetic characters and spaces"}).optional()}),yN=Go.extend({type:y.literal("flow_trigger"),name:y.string(),schema:y.string().optional(),settings:y.object({fields:y.array(Bh).optional()}).optional()}).refine(e=>{let t=e.settings?.fields??[],n=t.every((o,s)=>Cl(o,"flow_trigger",e.handle,s)),r=jv(t,e.schema);return n&&r}),FN=Ie({identifier:"flow_trigger",schema:yN,appModuleFeatures:e=>[],deployConfig:async(e,t)=>({title:e.name,description:e.description,fields:vl("flow_trigger",e.settings?.fields),schema_patch:await El(t,e.schema)})}),Mv=FN;function $v(e,t,n,r){let o=`'${e}' property must be a string for 'field[${r}]' ${JSON.stringify(t)} of flow extension '${n}'`;return{required_error:o,invalid_type_error:o}}var Rh=y.object({type:y.string(),description:y.string().optional()}).strict(),Cl=(e,t,n,r)=>{let o=Object.keys(bt).includes(e.type);return o?o?Rh.extend({required:y.boolean().optional(),marketingActivityCreateUrl:y.string().optional(),marketingActivityDeleteUrl:y.string().optional()}).parse(e):Rh.parse(e):t==="flow_action"?Rh.extend({key:y.string($v("key",e,n,r)),name:y.string($v("name",e,n,r)),required:y.boolean().optional()}).parse(e):Bh.parse(e)},Ih=e=>e.startsWith("schema."),js=e=>zc(e,{message:'Invalid URL: URL must be an absolute HTTPS URL or a relative URL starting with a single slash (e.g. "/api/endpoint").'}).refine(t=>!A0.test(t),{message:"Invalid URL: URL must not contain control characters such as newlines or tabs."}).refine(t=>!t.startsWith("//"),{message:"Invalid URL: Relative URLs must start with a single slash."}),Lv=(e,t,n)=>{if(e||t){if(!e)throw new y.ZodError([{code:y.ZodIssueCode.custom,path:["extensions[0].config_page_url"],message:"To set a custom configuration page a `config_page_url` must be specified."}]);if(!t)throw new y.ZodError([{code:y.ZodIssueCode.custom,path:["extensions[0].config_page_preview_url"],message:"To set a custom configuration page a `config_page_preview_url` must be specified."}]);if(!n)throw new y.ZodError([{code:y.ZodIssueCode.custom,path:["extensions[0].validation_url"],message:"To set a custom configuration page a `validation_url` must be specified."}])}return!0},jv=(e,t)=>{if(e.some(n=>Ih(n.type))&&!t)throw new y.ZodError([{code:y.ZodIssueCode.custom,path:["extensions[0].schema"],message:"To reference schema types a `schema` must be specified."}]);return!0},Uv=(e,t)=>{if(e||t){if(!e)throw new y.ZodError([{code:y.ZodIssueCode.custom,path:["extensions[0].return_type_ref"],message:"When uploading a schema a `return_type_ref` must be specified."}]);if(!t)throw new y.ZodError([{code:y.ZodIssueCode.custom,path:["extensions[0].schema"],message:"To set a return type a `schema` must be specified."}])}return!0};d();var kv=["runtime_url","validation_url","config_page_url","config_page_preview_url"];var $s="Flow action",EN=Go.extend({type:y.literal("flow_action"),name:y.string(),runtime_url:js(y.string({invalid_type_error:"Value must be string"})),validation_url:js(y.string({invalid_type_error:"Value must be string"})).optional(),config_page_url:js(y.string({invalid_type_error:"Value must be string"})).optional(),config_page_preview_url:js(y.string({invalid_type_error:"Value must be string"})).optional(),schema:y.string().optional(),return_type_ref:y.string().optional()}).refine(e=>{let t=Lv(e.config_page_url,e.config_page_preview_url,e.validation_url),r=(e.settings?.fields??[]).every((s,a)=>Cl(s,"flow_action",e.handle,a)),o=Uv(e.return_type_ref,e.schema);return t&&r&&o}),vN=Ie({identifier:"flow_action",schema:EN,appModuleFeatures:e=>[],patchWithAppDevURLs:(e,t)=>{for(let n of kv){let r=e[n];typeof r=="string"&&r.startsWith("/")&&(e[n]=Ko($s,n,r,t.applicationUrl))}},deployConfig:async(e,t,n,r,o)=>{let s=o?.appConfiguration,a=typeof s?.application_url=="string"?s.application_url:void 0;return{title:e.name,description:e.description,url:Ko($s,"runtime_url",e.runtime_url,a),fields:vl("flow_action",e.settings?.fields),validation_url:e.validation_url?Ko($s,"validation_url",e.validation_url,a):void 0,custom_configuration_page_url:e.config_page_url?Ko($s,"config_page_url",e.config_page_url,a):void 0,custom_configuration_page_preview_url:e.config_page_preview_url?Ko($s,"config_page_preview_url",e.config_page_preview_url,a):void 0,schema_patch:await El(t,e.schema),return_type_ref:e.return_type_ref}}}),qv=vN;d();import CN from"fs";var Wv=["buyer_experience","customers","fulfillment","inventory_and_merch","loyalty","orders","promotion","risk","b2b","payment_reminders","custom_data","error_monitoring"],wN=["capture_at_fulfillment"],bN=Go.extend({type:y.literal("flow_template"),name:y.string(),description:y.string().max(1024),template:y.object({categories:y.array(y.string().refine(e=>Wv.concat(wN).includes(e),e=>({message:`${e} is not a valid category. Valid categories include: ${Wv.join(", ")}.`}))),module:y.string(),require_app:y.boolean().optional(),discoverable:y.boolean().optional(),allow_one_click_activate:y.boolean().optional(),enabled:y.boolean().optional()})}),AN=Ie({identifier:"flow_template",schema:bN,appModuleFeatures:e=>["ui_preview"],clientSteps:[{lifecycle:"deploy",steps:[{id:"copy-files",name:"Copy Files",type:"include_assets",config:{inclusions:[{type:"pattern",include:["**/*.flow","**/*.json","**/*.toml"]}]}}]}],deployConfig:async(e,t)=>({template_handle:e.handle,name:e.name,description:e.description,categories:e.template.categories,require_app:e.template.require_app,discoverable:e.template.discoverable,allow_one_click_activate:e.template.allow_one_click_activate,enabled:e.template.enabled,definition:await SN(t,e.template.module),localization:await pr(t,e.name)})});async function SN(e,t){let r=(await Ge(B(e,t)))[0];if(!r)throw new k(`Missing flow file with the path ${B(e,t)}`);return CN.readFileSync(r,"base64")}var Hv=AN;d();var xN=dr({identifier:"flow_trigger_lifecycle_callback",uidStrategy:"uuid",experience:"extension",appModuleFeatures:()=>[],appRelativeUrlFields:["url"]}),zv=xN;d();var PN="Input variables must be defined either at the extension level or on a target, not both. Remove `input.variables` from your extension configuration. Declare `input_variables` on each target that needs them instead.",Gv=y.object({namespace:y.string(),key:y.string()}),ON=Je.extend({build:y.object({command:y.string().transform(e=>e.trim()===""?void 0:e).optional(),path:y.string().optional(),watch:y.union([y.string(),y.string().array()]).optional(),wasm_opt:y.boolean().optional().default(!0),typegen_command:y.string().transform(e=>e.trim()===""?void 0:e).optional()}).optional(),name:y.string(),type:y.string(),configuration_ui:y.boolean().optional().default(!0),ui:y.object({enable_create:y.boolean().optional(),paths:y.object({create:y.string(),details:y.string()}).optional(),handle:y.string().optional()}).optional(),api_version:y.string(),input:y.object({variables:Gv.optional()}).optional(),targeting:y.array(y.object({target:y.string(),input_query:y.string().optional(),input_variables:Gv.optional(),export:y.string().optional()})).optional()}).superRefine((e,t)=>{e.input?.variables&&e.targeting?.some(n=>n.input_variables)&&t.addIssue({code:y.ZodIssueCode.custom,path:["input","variables"],message:PN})}),TN=Ie({identifier:"function",additionalIdentifiers:["order_discounts","cart_checkout_validation","cart_transform","delivery_customization","payment_customization","product_discounts","shipping_discounts","fulfillment_constraints","order_routing_location_rule","local_pickup_delivery_option_generator","pickup_point_delivery_option_generator"],schema:ON,appModuleFeatures:e=>["function"],getOutputRelativePath:e=>B("dist","index.wasm"),devSessionWatchConfig:e=>{let t=e.configuration;if(!t.build||!t.build.watch)return;let n=[t.build.watch].flat().map(r=>B(e.directory,r));return n.push(B(e.directory,"locales","**.json")),n.push(B(e.directory,"**","!(.)*.graphql")),n.push(B(e.directory,"**.toml")),{paths:n}},clientSteps:[{lifecycle:"deploy",steps:[{id:"build-function",name:"Build Function",type:"build_function",config:{}}]}],deployConfig:async(e,t,n)=>{let r,o=Rc(),s=B(t,"input.graphql");await K(s)&&(r=await $e(s));let a=e.targeting&&await Promise.all(e.targeting.map(async p=>{let D;return p.input_query&&(D=await IN(B(t,p.input_query))),{handle:p.target,export:p.export,input_query:D,input_query_variables:p.input_variables?{single_json_metafield:p.input_variables}:void 0}})),l;return e.ui?.paths&&(l={app_bridge:{details_path:e.ui.paths.details,create_path:e.ui.paths.create}}),e.ui?.handle!==void 0&&(l={...l,ui_extension_handle:e.ui.handle}),{title:e.name,module_id:o,description:e.description,app_key:n,api_type:e.type==="function"?void 0:e.type,api_version:e.api_version,input_query:r,input_query_variables:e.input?.variables?{single_json_metafield:e.input.variables}:void 0,ui:l,enable_creation_ui:e.ui?.enable_create??!0,localization:await pr(t,"function"),targets:a}},preDeployValidation:async e=>{if(!await K(e.outputPath))throw new k(xe`The function extension "${e.handle}" hasn't compiled the wasm in the expected path: ${e.outputPath}`,"Make sure the build command outputs the wasm in the expected directory.")}});async function IN(e){if(await K(e))return $e(e);throw new k(`No input query file at ${e}.`,"Create the file or remove the line referencing it in the extension's TOML.")}var Vv=TN;d();d();d();var Jv=50,En=Je.extend({api_version:y.string(),payment_session_url:y.string().url(),refund_session_url:y.string().url().optional(),capture_session_url:y.string().url().optional(),void_session_url:y.string().url().optional(),supported_countries:y.array(y.string()),supported_payment_methods:y.array(y.string()),test_mode_available:y.boolean(),merchant_label:y.string().max(Jv),input:y.object({metafield_identifiers:y.object({namespace:y.string(),key:y.string()}).optional()}).optional()}),_i=y.object({buyer_label:y.string().max(Jv).optional(),buyer_label_translations:y.array(y.object({locale:y.string(),label:y.string()})).optional()}),ou=y.object({supports_installments:y.boolean().optional(),supports_deferred_payments:y.boolean().optional()}),wl=y.object({multiple_capture:y.boolean().optional()}),yi=y.object({confirmation_callback_url:y.string().url().optional(),supports_3ds:y.boolean()}),Dr=y.object({supported_buyer_contexts:y.array(y.object({currency:y.string(),countries:y.array(y.string()).nonempty().optional()}).strict()).optional().refine(e=>e===void 0||e.every(t=>t.countries)||e.every(t=>!t.countries),{message:"Must all be defined with only a currency, or must all be defined with a currency plus countries -- a mixture of the two is not allowed"})});var Nh="payments.offsite.render",Kv=En.merge(_i).merge(ou).merge(yi).merge(wl).merge(Dr).extend({targeting:y.array(y.object({target:y.literal(Nh)})).length(1),supports_oversell_protection:y.boolean().optional(),supports_3ds:y.boolean().optional()}).refine(e=>!e.supports_oversell_protection||e.confirmation_callback_url,{message:"Property required when supports_oversell_protection is true",path:["confirmation_callback_url"]}).refine(e=>e.supports_installments===e.supports_deferred_payments,{message:"supports_installments and supports_deferred_payments must be the same"});function qte(e){return{api_version:e.api_version,payment_session_url:e.start_payment_session_url,refund_session_url:e.start_refund_session_url,capture_session_url:e.start_capture_session_url,void_session_url:e.start_void_session_url,confirmation_callback_url:e.confirmation_callback_url,multiple_capture:e.multiple_capture,merchant_label:e.merchant_label,supported_countries:e.supported_countries,supported_payment_methods:e.supported_payment_methods,supported_buyer_contexts:e.supported_buyer_contexts,test_mode_available:e.test_mode_available,buyer_label:e.default_buyer_label,buyer_label_translations:e.buyer_label_to_locale,supports_oversell_protection:e.supports_oversell_protection,supports_3ds:e.supports_3ds,supports_deferred_payments:e.supports_deferred_payments,supports_installments:e.supports_installments}}async function Yv(e){return{api_version:e.api_version,start_payment_session_url:e.payment_session_url,start_refund_session_url:e.refund_session_url,start_capture_session_url:e.capture_session_url,start_void_session_url:e.void_session_url,confirmation_callback_url:e.confirmation_callback_url,multiple_capture:e.multiple_capture,merchant_label:e.merchant_label,supported_countries:e.supported_countries,supported_payment_methods:e.supported_payment_methods,supported_buyer_contexts:e.supported_buyer_contexts,test_mode_available:e.test_mode_available,default_buyer_label:e.buyer_label,buyer_label_to_locale:e.buyer_label_translations,supports_oversell_protection:e.supports_oversell_protection,supports_3ds:e.supports_3ds,supports_deferred_payments:e.supports_deferred_payments,supports_installments:e.supports_installments}}d();d();function Fi(e,t){let n=e.ui_extension_handle;if(n||!("ui_extension_registration_uuid"in e))return n;let r=t.find(o=>o.uuid===e.ui_extension_registration_uuid)?.title;return r?vt(r):n}var Mh="payments.redeemable.render",Xv=En.merge(_i).merge(Dr).extend({targeting:y.array(y.object({target:y.literal(Mh)})).length(1),api_version:y.string(),balance_url:y.string().url(),ui_extension_handle:y.string().optional(),checkout_payment_method_fields:y.array(y.object({type:y.union([y.literal("string"),y.literal("number"),y.literal("boolean")]),required:y.boolean(),key:y.string()})).optional()});function Xte(e,t){let n=Fi(e,t);return{api_version:e.api_version,payment_session_url:e.start_payment_session_url,refund_session_url:e.start_refund_session_url,capture_session_url:e.start_capture_session_url,void_session_url:e.start_void_session_url,merchant_label:e.merchant_label,supported_countries:e.supported_countries,supported_payment_methods:e.supported_payment_methods,supported_buyer_contexts:e.supported_buyer_contexts,test_mode_available:e.test_mode_available,buyer_label:e.default_buyer_label,buyer_label_translations:e.buyer_label_to_locale,balance_url:e.balance_url,checkout_payment_method_fields:e.checkout_payment_method_fields?.map(r=>({key:r.key,type:r.type,required:r.required})),ui_extension_handle:n}}async function Zv(e){let t=e.supported_payment_methods[0]==="gift-card"?"gift_card":null;return{api_version:e.api_version,start_payment_session_url:e.payment_session_url,start_refund_session_url:e.refund_session_url,start_capture_session_url:e.capture_session_url,start_void_session_url:e.void_session_url,merchant_label:e.merchant_label,supported_countries:e.supported_countries,supported_payment_methods:e.supported_payment_methods,supported_buyer_contexts:e.supported_buyer_contexts,test_mode_available:e.test_mode_available,default_buyer_label:e.buyer_label,buyer_label_to_locale:e.buyer_label_translations,balance_url:e.balance_url,redeemable_type:t,checkout_payment_method_fields:e.checkout_payment_method_fields,ui_extension_handle:e.ui_extension_handle}}d();var jh="payments.custom-onsite.render",Qv=7,eC=En.merge(_i).merge(ou).merge(yi).merge(Dr).extend({targeting:y.array(y.object({target:y.literal(jh)})).length(1),supports_3ds:y.boolean().optional(),update_payment_session_url:y.string().url().optional(),multiple_capture:y.boolean().optional(),supports_oversell_protection:y.boolean().optional(),modal_payment_method_fields:y.array(y.object({})).optional(),ui_extension_handle:y.string().optional(),start_verification_session_url:y.string().url().optional(),checkout_payment_method_fields:y.array(y.object({type:y.union([y.literal("string"),y.literal("number"),y.literal("boolean")]),required:y.boolean(),key:y.string()})).max(Qv,`The extension can't have more than ${Qv} checkout_payment_method_fields`).optional()}).refine(e=>e.supports_installments===e.supports_deferred_payments,{message:"supports_installments and supports_deferred_payments must be the same"});function rne(e,t){let n=Fi(e,t);return{api_version:e.api_version,payment_session_url:e.start_payment_session_url,refund_session_url:e.start_refund_session_url,capture_session_url:e.start_capture_session_url,void_session_url:e.start_void_session_url,confirmation_callback_url:e.confirmation_callback_url,update_payment_session_url:e.update_payment_session_url,start_verification_session_url:e.start_verification_session_url,merchant_label:e.merchant_label,supports_oversell_protection:e.supports_oversell_protection,supports_3ds:e.supports_3ds,supports_installments:e.supports_installments,supports_deferred_payments:e.supports_deferred_payments,supported_countries:e.supported_countries,supported_payment_methods:e.supported_payment_methods,supported_buyer_contexts:e.supported_buyer_contexts,test_mode_available:e.test_mode_available,multiple_capture:e.multiple_capture,buyer_label:e.default_buyer_label,buyer_label_translations:e.buyer_label_to_locale,checkout_payment_method_fields:e.checkout_payment_method_fields,modal_payment_method_fields:e.modal_payment_method_fields,ui_extension_handle:n}}async function tC(e){return{api_version:e.api_version,start_payment_session_url:e.payment_session_url,start_refund_session_url:e.refund_session_url,start_capture_session_url:e.capture_session_url,start_void_session_url:e.void_session_url,confirmation_callback_url:e.confirmation_callback_url,update_payment_session_url:e.update_payment_session_url,start_verification_session_url:e.start_verification_session_url,merchant_label:e.merchant_label,supports_oversell_protection:e.supports_oversell_protection,supports_3ds:e.supports_3ds,supports_installments:e.supports_installments,supports_deferred_payments:e.supports_deferred_payments,supported_countries:e.supported_countries,supported_payment_methods:e.supported_payment_methods,supported_buyer_contexts:e.supported_buyer_contexts,test_mode_available:e.test_mode_available,multiple_capture:e.multiple_capture,default_buyer_label:e.buyer_label,buyer_label_to_locale:e.buyer_label_translations,checkout_payment_method_fields:e.checkout_payment_method_fields,modal_payment_method_fields:e.modal_payment_method_fields,ui_extension_handle:e.ui_extension_handle}}d();var $h="payments.custom-credit-card.render",nC=7,rC=En.merge(_i).merge(yi).merge(Dr).required({refund_session_url:!0,capture_session_url:!0,void_session_url:!0}).extend({targeting:y.array(y.object({target:y.literal($h)})).length(1),api_version:y.string(),multiple_capture:y.boolean(),checkout_hosted_fields:y.array(y.string()).optional(),ui_extension_handle:y.string().optional(),encryption_certificate_fingerprint:y.string(),checkout_payment_method_fields:y.array(y.object({type:y.union([y.literal("string"),y.literal("number"),y.literal("boolean")]),required:y.boolean(),key:y.string()})).max(nC,`The extension can't have more than ${nC} checkout_payment_method_fields`).optional()});function cne(e,t){let n=Fi(e,t);return{api_version:e.api_version,payment_session_url:e.start_payment_session_url,refund_session_url:e.start_refund_session_url,capture_session_url:e.start_capture_session_url,void_session_url:e.start_void_session_url,confirmation_callback_url:e.confirmation_callback_url,merchant_label:e.merchant_label,supports_3ds:e.supports_3ds,supported_countries:e.supported_countries,supported_payment_methods:e.supported_payment_methods,supported_buyer_contexts:e.supported_buyer_contexts,buyer_label:e.default_buyer_label,buyer_label_translations:e.buyer_label_to_locale,encryption_certificate_fingerprint:e.encryption_certificate.fingerprint,test_mode_available:e.test_mode_available,multiple_capture:e.multiple_capture,checkout_payment_method_fields:e.checkout_payment_method_fields,checkout_hosted_fields:e.checkout_hosted_fields,ui_extension_handle:n}}async function iC(e){return{api_version:e.api_version,start_payment_session_url:e.payment_session_url,start_refund_session_url:e.refund_session_url,start_capture_session_url:e.capture_session_url,start_void_session_url:e.void_session_url,confirmation_callback_url:e.confirmation_callback_url,merchant_label:e.merchant_label,supports_3ds:e.supports_3ds,supported_countries:e.supported_countries,supported_buyer_contexts:e.supported_buyer_contexts,default_buyer_label:e.buyer_label,buyer_label_to_locale:e.buyer_label_translations,encryption_certificate_fingerprint:e.encryption_certificate_fingerprint,supported_payment_methods:e.supported_payment_methods,test_mode_available:e.test_mode_available,multiple_capture:e.multiple_capture,checkout_payment_method_fields:e.checkout_payment_method_fields,checkout_hosted_fields:e.checkout_hosted_fields,ui_extension_handle:e.ui_extension_handle}}d();var Lh="payments.credit-card.render",oC=7,uC=En.merge(ou).merge(yi).merge(wl).merge(Dr).required({refund_session_url:!0,capture_session_url:!0,void_session_url:!0}).extend({targeting:y.array(y.object({target:y.literal(Lh)})).length(1),verification_session_url:y.string().url().optional(),ui_extension_handle:y.string().optional(),supports_moto:y.boolean({required_error:"supports_moto is required",invalid_type_error:"Value must be Boolean"}),encryption_certificate_fingerprint:y.string(),checkout_payment_method_fields:y.array(y.object({type:y.union([y.literal("string"),y.literal("number"),y.literal("boolean")]),required:y.boolean(),key:y.string()})).max(oC,`The extension can't have more than ${oC} checkout_payment_method_fields`).optional()}).refine(e=>!e.supports_3ds||e.confirmation_callback_url,{message:"Property required when supports_3ds is true",path:["confirmation_callback_url"]}).refine(e=>e.supports_installments===e.supports_deferred_payments,{message:"supports_installments and supports_deferred_payments must be the same"});function Dne(e,t){let n=Fi(e,t);return{api_version:e.api_version,payment_session_url:e.start_payment_session_url,refund_session_url:e.start_refund_session_url,capture_session_url:e.start_capture_session_url,void_session_url:e.start_void_session_url,confirmation_callback_url:e.confirmation_callback_url,multiple_capture:e.multiple_capture,merchant_label:e.merchant_label,supported_countries:e.supported_countries,supported_payment_methods:e.supported_payment_methods,supported_buyer_contexts:e.supported_buyer_contexts,test_mode_available:e.test_mode_available,supports_3ds:e.supports_3ds,supports_moto:e.supports_moto,supports_deferred_payments:e.supports_deferred_payments,supports_installments:e.supports_installments,verification_session_url:e.start_verification_session_url,encryption_certificate_fingerprint:e.encryption_certificate.fingerprint,checkout_payment_method_fields:e.checkout_payment_method_fields,ui_extension_handle:n}}async function sC(e){return{api_version:e.api_version,start_payment_session_url:e.payment_session_url,start_refund_session_url:e.refund_session_url,start_capture_session_url:e.capture_session_url,start_void_session_url:e.void_session_url,confirmation_callback_url:e.confirmation_callback_url,multiple_capture:e.multiple_capture,merchant_label:e.merchant_label,supported_countries:e.supported_countries,supported_payment_methods:e.supported_payment_methods,supported_buyer_contexts:e.supported_buyer_contexts,test_mode_available:e.test_mode_available,supports_3ds:e.supports_3ds,supports_moto:e.supports_moto,supports_deferred_payments:e.supports_deferred_payments,encryption_certificate_fingerprint:e.encryption_certificate_fingerprint,supports_installments:e.supports_installments,start_verification_session_url:e.verification_session_url,checkout_payment_method_fields:e.checkout_payment_method_fields,ui_extension_handle:e.ui_extension_handle}}d();var Uh="payments.card-present.render",aC=En.required({refund_session_url:!0,capture_session_url:!0,void_session_url:!0}).extend({targeting:y.array(y.object({target:y.literal(Uh)})).length(1),sync_terminal_transaction_result_url:y.string().url().optional()});function Fne(e){return{api_version:e.api_version,payment_session_url:e.start_payment_session_url,refund_session_url:e.start_refund_session_url,capture_session_url:e.start_capture_session_url,void_session_url:e.start_void_session_url,sync_terminal_transaction_result_url:e.sync_terminal_transaction_result_url,merchant_label:e.merchant_label,supported_countries:e.supported_countries,supported_payment_methods:e.supported_payment_methods,test_mode_available:e.test_mode_available}}async function cC(e){return{api_version:e.api_version,start_payment_session_url:e.payment_session_url,start_refund_session_url:e.refund_session_url,start_capture_session_url:e.capture_session_url,start_void_session_url:e.void_session_url,sync_terminal_transaction_result_url:e.sync_terminal_transaction_result_url,merchant_label:e.merchant_label,supported_countries:e.supported_countries,supported_payment_methods:e.supported_payment_methods,test_mode_available:e.test_mode_available}}var BN=y.union([Kv,Xv,eC,rC,uC,aC]),RN=Ie({identifier:"payments_extension",schema:BN,appModuleFeatures:e=>[],deployConfig:async(e,t)=>{switch(e.targeting[0]?.target){case Nh:return Yv(e);case Mh:return Zv(e);case Lh:return sC(e);case jh:return tC(e);case $h:return iC(e);case Uh:return cC(e);default:return{}}}}),lC=RN;d();var kh="@shopify/retail-ui-extensions",NN=Je.extend({name:y.string()}),MN=Ie({identifier:"pos_ui_extension",dependency:kh,schema:NN,appModuleFeatures:e=>["ui_preview","esbuild","single_js_entry_path"],getOutputRelativePath:e=>`dist/${e.handle}.js`,clientSteps:[{lifecycle:"deploy",steps:[{id:"bundle-ui",name:"Bundle UI Extension",type:"bundle_ui",config:{}}]}],deployConfig:async(e,t)=>{let n=await Bs(kh,t);if(n==="not_found")throw new tn(`Dependency ${kh} not found`);return{name:e.name,description:e.description,renderer_version:n?.version}}}),fC=MN;d();var qh="@shopify/admin-ui-extensions",jN=Ie({identifier:"product_subscription",additionalIdentifiers:["subscription_management"],dependency:qh,graphQLType:"subscription_management",schema:Je,appModuleFeatures:e=>["ui_preview","esbuild","single_js_entry_path"],getOutputRelativePath:e=>`dist/${e.handle}.js`,clientSteps:[{lifecycle:"deploy",steps:[{id:"bundle-ui",name:"Bundle UI Extension",type:"bundle_ui",config:{}}]}],deployConfig:async(e,t)=>{let n=await Bs(qh,t);if(n==="not_found")throw new tn(`Dependency ${qh} not found`);return{renderer_version:n?.version}}}),pC=jN;d();var $N=y.object({key:y.string()}),LN=Je.extend({production_api_base_url:y.string(),benchmark_api_base_url:y.string().optional(),calculate_taxes_api_endpoint:y.string(),input:y.object({metafield_identifiers:y.object({namespace:y.string(),key:y.string()}).optional()}).optional(),metafields:y.array(Di).optional(),cart_line_properties:y.array($N).optional()}),UN=Ie({identifier:"tax_calculation",schema:LN,appModuleFeatures:e=>[],getOutputRelativePath:e=>B("dist",`${e.handle}.js`),clientSteps:[{lifecycle:"deploy",steps:[{id:"create-tax-stub",name:"Create Tax Stub",type:"create_tax_stub",config:{}}]}],deployConfig:async(e,t)=>({production_api_base_url:e.production_api_base_url,benchmark_api_base_url:e.benchmark_api_base_url,calculate_taxes_api_endpoint:e.calculate_taxes_api_endpoint,metafields:e.metafields,cart_line_properties:e.cart_line_properties,api_version:e.api_version,metafield_identifiers:e.input?.metafield_identifiers})}),dC=UN;d();import{isIP as kN}from"node:net";var hC=20,qN=253,WN=443,HN=65535,zN=/^https:\/\/(\*\.)?([a-z0-9.-]+)(?::(\d{1,5}))?$/,GN=/^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/;function DC(e){let t=e.trim().toLowerCase().replace(/\/$/,""),n=zN.exec(t);if(!n)return;let[,r="",o="",s]=n;if(o.length>qN)return;let a=o.split(".");if(a.length<2||!a.every(D=>GN.test(D)))return;let l=Hy(`https://${o}`);if(!l||kN(l.hostname)!==0)return;let p="";if(s!==void 0){let D=Number(s);if(D<1||D>HN)return;D!==WN&&(p=`:${D}`)}return`https://${r}${o}${p}`}var VN=y.array(y.string(),{required_error:"allowed_sources is required. Use an empty list if your extension contacts no other origins.",invalid_type_error:'allowed_sources must be a list of HTTPS origins, like ["https://api.example.com"]'}).superRefine((e,t)=>{let n=e.filter(r=>DC(r)===void 0);n.length>0&&t.addIssue({code:y.ZodIssueCode.custom,message:`Invalid allowed_sources: ${n.map(r=>JSON.stringify(r)).join(", ")}. Use HTTPS origins with no path, query or fragment, like "https://api.example.com" or "https://*.cdn.example.com".`})}).transform(e=>[...new Set(e.map(t=>DC(t)))]).refine(e=>e.length<=hC,{message:`allowed_sources can list up to ${hC} origins`}),JN=y.object({allowed_sources:VN},{invalid_type_error:"network_access must be a table with an allowed_sources list for theme app extensions"}),KN=y.object({network_access:JN.optional()}),YN=Je.extend({capabilities:KN.optional()}),XN=Ie({identifier:"theme",schema:YN,partnersWebIdentifier:"theme_app_extension",graphQLType:"theme_app_extension",clientSteps:[{lifecycle:"deploy",steps:[{id:"build-theme",name:"Build Theme Extension",type:"build_theme",config:{}},{id:"bundle-theme",name:"Bundle Theme Extension",type:"bundle_theme",config:{}}]}],appModuleFeatures:e=>["theme"],deployConfig:async e=>{let t=e.capabilities?.network_access;return t?{theme_extension:{files:{}},capabilities:{network_access:{allowed_sources:t.allowed_sources}}}:{theme_extension:{files:{}}}},preDeployValidation:async e=>eM(e.directory)}),FC=XN,Wh=1024,EC=Wh*1024,vC=10,ZN=vC*EC,CC=500,QN=CC*Wh,mC=[".jpg",".jpeg",".json",".js",".css",".png",".svg",".wasm"],gC=[".json"],wC={assets:{validator:new RegExp(`${mC.join("|")}$`),failureMessage:e=>`Only these filetypes are supported in assets: ${mC.join(", ")}`},blocks:{validator:/.liquid$/,failureMessage:e=>"Only .liquid files are allowed in blocks."},locales:{validator:new RegExp(`${gC.join("|")}$`),failureMessage:e=>`Only these filetypes are supported in locales: ${gC.join(", ")}`},snippets:{validator:/.liquid$/,failureMessage:e=>"Only .liquid files are allowed in snippets."}},_C=Object.keys(wC);async function eM(e){let t=await bs(e),n=[],r=[];await Promise.all(t.map(async o=>{let s=Te(e,o),a=De(s);rM(s,a);let l=await Oc(o);r.push(l),["blocks","snippets"].includes(a)&&n.push(l)})),tM(yC(r)),nM(yC(n))}function tM(e){if(e>ZN){let t=`${(e/EC).toFixed(2)} MB`;throw new k(`Your theme app extension exceeds the file size limit (${vC} MB). It's currently ${t}.`,"Reduce your total file size and try again.")}}function nM(e){if(e>QN){let t=`${(e/Wh).toFixed(2)} kB`;throw new k(`Your theme app extension exceeds the total liquid file size limit (${CC} kB). It's currently ${t}.`,"Reduce your total file size and try again.")}}function rM(e,t){if(!_C.includes(t))throw new k(xe`Your theme app extension includes files in an unsupported directory, ${Se.path(t)}`,`Make sure all theme app extension files are in the supported directories: ${_C.join(", ")}`);let n=wC[t];if(!e.match(n.validator))throw new k(`Invalid filename in your theme app extension: ${e}
|
|
251
|
+
${n.failureMessage(e)}`)}function yC(e){return e.reduce((t,n)=>t+n,0)}d();d();var r1=li(UD(),1);import{createRequire as ik}from"module";async function Om(){let e=await import("./typescript-ISACCMJN.js");return e.default??e}var t1=ik(import.meta.url),n1="@shopify/ui-extensions";function ok(e){let t=e.toLowerCase().replace(/(::|\.).+$/,"");switch(t){case"purchase":return"checkout";case"pos":return"point-of-sale";default:return t}}function Tm(e){let t=e[0];return t?`${n1}/${ok(t)}`:n1}function la(e){let[t,n]=e.split("-");return!t||!n?null:{year:parseInt(t,10),month:parseInt(n,10)}}async function i1(e,t){let n=await Om(),r=n.findConfigFile(e,n.sys.fileExists.bind(n.sys),"tsconfig.json");if(!r)return{compilerOptions:{},configPath:void 0,hasExplicitFiles:!1};let o=ot(r),s=t?.get(o);if(s)return s;let a=n.readConfigFile(r,n.sys.readFile.bind(n.sys));if(a.error)return{compilerOptions:{},configPath:o,hasExplicitFiles:!1};let l=n.parseJsonConfigFileContent(a.config,n.sys,De(r)),p=!!(l.raw?.files??l.raw?.include),D={compilerOptions:l.options,configPath:o,fileNames:l.fileNames,hasExplicitFiles:p};return t?.set(o,D),D}async function uk(e,t){if(!e.startsWith("./")&&!e.startsWith("../"))return null;let n=ot(t,e),r=["",".js",".jsx",".ts",".tsx"];for(let o of r){let s=n+o;if(await K(s)&&!s.includes("node_modules"))return s}for(let o of[".js",".jsx",".ts",".tsx"]){let s=B(n,`index${o}`);if(await K(s)&&!s.includes("node_modules"))return s}return null}function o1(e){return e.length>0&&e.every(t=>t.isTypeOnly)}function sk(e,t){if(e.importClause?.isTypeOnly)return!0;let n=e.importClause?.namedBindings;return e.importClause?.name||!n?!1:t.isNamedImports(n)&&o1(n.elements)}function ak(e,t){if(e.isTypeOnly)return!0;let n=e.exportClause;return n?t.isNamedExports(n)&&o1(n.elements):!1}function ck(e,t){return t?Ey(ot(t),ot(e)):!0}function lk(e,t){if(!t.allowedFiles)return!0;let n=ot(e);return t.allowedFiles.has(n)||!!t.alwaysAllowedFiles?.has(n)}function u1(e,t){return!e.includes("node_modules")&&!e.endsWith(".d.ts")&&lk(e,t)}function fk(e,t){let n=ot(e),r=(t.allowedFiles?.has(n)??!1)||(t.alwaysAllowedFiles?.has(n)??!1);return u1(e,t)&&(ck(e,t.boundaryDirectory)||r)}async function pk(e,t={}){try{let n=ot(e),r=t.importCache?.get(n);if(r)return r;let o=await Om(),s=eo(e).toString(),a=[],{compilerOptions:l}=await i1(e,t.tsConfigCache),p=o.ScriptKind.JSX;e.endsWith(".ts")?p=o.ScriptKind.TS:e.endsWith(".tsx")&&(p=o.ScriptKind.TSX);let D=o.createSourceFile(e,s,o.ScriptTarget.Latest,!0,p),g=new Set,E=[],w=v=>{if(o.isImportDeclaration(v)&&v.moduleSpecifier&&o.isStringLiteral(v.moduleSpecifier)){if(sk(v,o))return;E.push(v.moduleSpecifier.text)}else if(o.isCallExpression(v)&&v.expression.kind===o.SyntaxKind.ImportKeyword){let S=v.arguments[0];S&&o.isStringLiteral(S)&&E.push(S.text)}else if(o.isExportDeclaration(v)&&v.moduleSpecifier&&o.isStringLiteral(v.moduleSpecifier)){if(ak(v,o))return;E.push(v.moduleSpecifier.text)}o.forEachChild(v,w)};w(D);for(let v of E){if(!v||g.has(v))continue;g.add(v);let S=o.resolveModuleName(v,e,l,o.sys);if(S.resolvedModule?.resolvedFileName){let O=S.resolvedModule.resolvedFileName;O.includes("node_modules")||a.push(O)}else{let O=await uk(v,De(e));O&&a.push(O)}}return t.importCache?.set(n,a),a}catch(n){if(n instanceof k)throw n;return[]}}async function _f(e,t={},n=new Set){if(n.has(e))return[];n.add(e);let r=(await pk(e,t)).filter(s=>u1(s,t)),o=[...r];for(let s of r){if(!fk(s,t))continue;let a=await _f(s,t,n);o.push(...a)}return Bt(o)}async function Im(e,t,n={}){let{configPath:r,fileNames:o,hasExplicitFiles:s}=await i1(e,n.tsConfigCache);if(!(!r||!s))return new Set((o??[]).map(a=>ot(a)))}async function dk(e){let t;try{t=eo(e).toString()}catch{return!1}let n=await Om(),r=n.createSourceFile(e,t,n.ScriptTarget.Latest,!0,n.ScriptKind.TS),o=!1,s=a=>{if(!o){if(n.isExportDeclaration(a)&&a.exportClause&&n.isNamedExports(a.exportClause)){for(let l of a.exportClause.elements)if(l.name.text==="ShopifyGlobal"){o=!0;return}}n.forEachChild(a,s)}};return s(r),o}async function hk(e,t){let n=async r=>{let o=`import('@shopify/ui-extensions/${r}').Api`,s=t.get(r);return s&&await dk(s)?`${o} & import('@shopify/ui-extensions/${r}').ShopifyGlobal`:o};return e.length===1?n(e[0]??""):e.length>1?`(${(await Promise.all(e.map(n))).join(" | ")})`:null}async function Dk(e,t,{includesTools:n,includesIntents:r},o){let s=await hk(e,t);if(!s)return null;if(!n&&!r)return s;let a=s;return r&&(a=`import('${o}').WithGeneratedIntents<${a}, ShopifyGeneratedIntentVariants>`),n&&(a=`import('${o}').WithGeneratedTools<${a}, ShopifyTools>`),a}async function s1({fullPath:e,typeFilePath:t,targets:n,apiVersion:r,toolsTypeDefinition:o,intentsTypeDefinition:s}){try{let a=new Map,l=!!o,p=!!s;for(let v of n)try{let S=t1.resolve(`@shopify/ui-extensions/${v}`,{paths:[e,t]});a.set(v,S)}catch{let{year:O,month:P}=la(r)??{year:2025,month:10};throw new k(`Type reference for ${v} could not be found. You might be using the wrong @shopify/ui-extensions version.`,`Fix the error by ensuring you have the correct version of @shopify/ui-extensions, for example ~${O}.${P}.0, in your dependencies.`)}let D=Tm(n);if(l||p)try{t1.resolve(D,{paths:[e,t]})}catch{let{year:S,month:O}=la(r)??{year:2025,month:10};throw new k(`Type reference for ${D} could not be found. You might be using the wrong @shopify/ui-extensions version.`,`Fix the error by ensuring you have the correct version of @shopify/ui-extensions, for example ~${S}.${O}.0, in your dependencies.`)}let g=Sc(e,De(t)),E=await Dk(n,a,{includesTools:l,includesIntents:p},D);return E?["//@ts-ignore",`declare module './${g}' {`,...o?[o]:[],...s?[s]:[],` const shopify: ${E};`," const globalThis: { shopify: typeof shopify };","}",""].join(`
|
|
252
|
+
`):null}catch(a){if(a instanceof k)throw a;let{year:l,month:p}=la(r)??{year:2025,month:10};throw new k("Type reference could not be found. You might be using the wrong @shopify/ui-extensions version.",`Fix the error by ensuring you have the correct version of @shopify/ui-extensions, for example ~${l}.${p}.0, in your dependencies.`)}}async function a1(e,t){let n=De(e),r=await lr("tsconfig.json",{cwd:n,type:"file"});if(r){let o=ot(r),s=ot(t);if(o.startsWith(s))return De(r)}}var mk=y.object({name:y.string(),description:y.string(),inputSchema:y.object({}).passthrough(),outputSchema:y.object({}).passthrough().optional()}),c1=y.array(mk),l1=y.object({value:y.object({}).passthrough().optional(),inputSchema:y.object({}).passthrough(),outputSchema:y.object({}).passthrough().optional()});function gk(e){return Ho(`${e.action} ${e.type}`.replace(/[^a-zA-Z0-9]+/g," "))}async function f1(e,{generatedTypesHelperImportPath:t}){if(e.length===0)return"";let n=new Set,r=e.map(async a=>{let l=`${a.action}:${a.type}`;if(n.has(l))throw new k(`Intent "${l}" is defined multiple times. Intents must be unique within a target.`);n.add(l);let p=gk(a),D=`${p}IntentInput`,g=`${p}IntentValue`,E=`${p}IntentOutput`,w=`${p}IntentRequest`,v=await fa(D,a.inputSchema),S=await fa(g,a.valueSchema),O=await fa(E,a.outputSchema),P=`interface ${w} {
|
|
253
|
+
action: ${JSON.stringify(a.action)};
|
|
254
|
+
type: ${JSON.stringify(a.type)};
|
|
255
|
+
data: ${D};
|
|
256
|
+
value?: ${g};
|
|
257
|
+
}`;return{inputType:v,valueType:S,outputType:O,requestType:P,requestTypeName:w,outputTypeName:E}}),o=await Promise.all(r),s=o.map(({requestTypeName:a,outputTypeName:l})=>` | import('${t}').ShopifyGeneratedIntentVariant<${a}, ${l}>`).join(`
|
|
258
|
+
`);return`${o.map(({inputType:a,valueType:l,outputType:p,requestType:D})=>`${a}
|
|
259
|
+
${l}
|
|
260
|
+
${p}
|
|
261
|
+
${D}`).join(`
|
|
262
|
+
|
|
263
|
+
`)}
|
|
264
|
+
|
|
265
|
+
type ShopifyGeneratedIntentVariants =
|
|
266
|
+
${s}
|
|
267
|
+
`}async function p1(e){if(e.length===0)return"";let t=new Set,n=e.map(async s=>{if(t.has(s.name))throw new k(`Tool name "${s.name}" is defined multiple times. Tool names must be unique within a tools file.`);t.add(s.name);let a=Ho(`${s.name}Input`),l=await fa(a,s.inputSchema),p=Ho(`${s.name}Output`),D=await fa(p,s.outputSchema);return{name:s.name,description:s.description,inputType:l,outputType:D,inputTypeName:a,outputTypeName:p}}),r=await Promise.all(n),o=r.map(({name:s,description:a,inputTypeName:l,outputTypeName:p})=>` /**
|
|
268
|
+
${a.replace(/\*\//g,"*\\/").split(`
|
|
269
|
+
`).map(g=>` * ${g}`).join(`
|
|
270
|
+
`)}
|
|
271
|
+
*/
|
|
272
|
+
register(name: '${s}', handler: (input: ${l}) => ${p} | Promise<${p}>): () => void;`).join(`
|
|
273
|
+
`);return`${r.map(({inputType:s,outputType:a})=>`${s}
|
|
274
|
+
${a}`).join(`
|
|
275
|
+
`)}
|
|
276
|
+
interface ShopifyTools {
|
|
277
|
+
${o}
|
|
278
|
+
}
|
|
279
|
+
`}function _k(e,t){return e.replace(/^(interface|type|enum)\s+[A-Za-z0-9_]+/,`$1 ${t}`)}async function fa(e,t){if(!t)return`type ${e} = unknown`;let n=await(0,r1.compile)(t,e,{bannerComment:""}),r=n.startsWith("export ")?n.slice(7):n;return _k(r,e)}d();d();d();var d1=di`
|
|
280
|
+
query {
|
|
281
|
+
products(first: 1, query: "published_status:published") {
|
|
282
|
+
edges {
|
|
283
|
+
node {
|
|
284
|
+
id
|
|
285
|
+
variants(first: 1) {
|
|
286
|
+
edges {
|
|
287
|
+
node {
|
|
288
|
+
id
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
`;async function h1(e){let t=await Vy(e),n=await g0(d1,t);if(n.products.edges.length===0){let a=`https://${ky(e)}/admin/products/new`,l=xe`${Se.link("Add a product",a,`You can add a new product here: ${a}`)}`.value;throw new k("Could not find a product variant",`Your store needs to have at least one product to test a 'checkout_ui' extension.
|
|
297
|
+
|
|
298
|
+
${l}`)}return n.products.edges[0].node.variants.edges[0].node.id.split("/").pop()}async function _ue(e,t,n){return e.filter(s=>s.shouldFetchCartUrl()).length>0?n||`/cart/${await h1(t)}:1`:void 0}function D1(e){let t=e.toLowerCase().replace(/(::|\.).+$/,""),n=e.split(".")[1];switch(t){case"purchase":return n==="post"?"post_purchase":"checkout";case"customer-account":return"customer-accounts";case"pos":return"point_of_sale";default:return t}}d();H8();async function m1(e,t){return C0.format(e,t)}var yk="@shopify/checkout-ui-extensions",Fk=e=>e.extension_points!==void 0||e.targeting!==void 0,_1="No extension targets defined, add a `targeting` field to your configuration",Ek=Je.extend({name:y.string(),type:y.literal("ui_extension"),extension_points:Nd.optional(),targeting:Nd.optional(),metafields:y.array(Di).optional()}).refine(e=>Fk(e),_1).transform(e=>{let t=(e.targeting??e.extension_points??[]).map(n=>{let r={assets:{[$n.Main]:{filepath:`${e.handle}.js`,module:n.module},...n.should_render?.module?{[$n.ShouldRender]:{filepath:`${e.handle}-conditions.js`,module:n.should_render.module}}:null}};return{target:n.target,module:n.module,metafields:n.metafields??e.metafields??[],default_placement_reference:n.default_placement,urls:n.urls??{},capabilities:n.capabilities,preloads:n.preloads??{},build_manifest:r,tools:n.tools,instructions:n.instructions,intents:n.intents,assets:n.assets}});return{...e,extension_points:t}}),vk=Ie({identifier:"ui_extension",dependency:yk,schema:Ek,getOutputRelativePath:e=>`${e.handle}.js`,clientSteps:[{lifecycle:"deploy",steps:[{id:"bundle-ui",name:"Bundle UI Extension",type:"bundle_ui",config:{generatesAssetsManifest:!0,bundleFolder:"dist/"}},{id:"include-ui-extension-assets",name:"Include UI Extension Assets",type:"include_assets",config:{generatesAssetsManifest:!0,inclusions:[{type:"configKey",anchor:"extension_points[]",groupBy:"target",key:"extension_points[].assets"},{type:"configKey",anchor:"extension_points[]",groupBy:"target",key:"extension_points[].tools"},{type:"configKey",anchor:"extension_points[]",groupBy:"target",key:"extension_points[].instructions"},{type:"configKey",anchor:"extension_points[]",groupBy:"target",key:"extension_points[].intents[].schema"}]}}]}],appModuleFeatures:e=>{let t=["ui_preview","esbuild","generates_source_maps"];return e?.extension_points?.find(r=>D1(r.target)==="checkout")!==void 0?[...t,"cart_url"]:t},validate:async(e,t,n)=>Ak(n,e.extension_points,t),deployConfig:async(e,t)=>{let n=e.extension_points?.map(Ck)??[];return{api_version:e.api_version,extension_points:n,capabilities:e.capabilities,supported_features:e.supported_features,name:e.name,description:e.description,settings:e.settings,localization:await pr(t,e.type)}},getBundleExtensionStdinContent:e=>{let t=g1(e),n=e.extension_points||[],r=n.map(({target:a,module:l},p)=>t?`import Target_${p} from '${l}';shopify.extend('${a}', (...args) => Target_${p}(...args));`:`import '${l}';`).join(`
|
|
299
|
+
`),o=n.flatMap((a,l)=>{let p=Sk(a,t,l);return p?[p]:[]}),[s]=o;if(s&&o.some(({outputFileName:a})=>a!==s.outputFileName))throw new tn("UI extension should-render targets must share an output filename");return{main:r,...s?{assets:[{...s,content:o.map(({content:a})=>a).join(`
|
|
300
|
+
`)}]}:{}}},hasExtensionPointTarget:(e,t)=>e.extension_points?.find(n=>n.target===t)!==void 0,contributeToSharedTypeFile:async(e,t)=>{if(!g1(e.configuration))return;let{configuration:n}=e,r=new Map,o=new Map,s=new Map,a=new Map,l=new Map;for await(let p of n.extension_points){let D=B(e.directory,p.module);if(!await K(D))continue;let E=r.get(D)??[];if(E.push(p.target),r.set(D,E),p.tools&&o.set(D,p.tools),p.intents?.length){let w=s.get(D)??[];w.push(...p.intents),s.set(D,w)}if(p.build_manifest.assets[$n.ShouldRender]?.module){let w=B(e.directory,p.build_manifest.assets[$n.ShouldRender].module);if(await K(w)){let S=r.get(w)??[];S.push(Bm(p.target)),r.set(w,S)}}}for await(let p of n.extension_points){let D=B(e.directory,p.module);if(!await K(D))continue;let E=await Im(D,e.directory,{tsConfigCache:l}),w=await _f(D,{boundaryDirectory:e.directory,allowedFiles:E,alwaysAllowedFiles:new Set([ot(D)]),importCache:a,tsConfigCache:l});for(let v of w){let S=r.get(v)??[];S.push(p.target),r.set(v,S)}if(p.build_manifest.assets[$n.ShouldRender]?.module){let v=B(e.directory,p.build_manifest.assets[$n.ShouldRender].module);if(await K(v)){let O=await Im(v,e.directory,{tsConfigCache:l}),P=await _f(v,{boundaryDirectory:e.directory,allowedFiles:O,alwaysAllowedFiles:new Set([ot(v)]),importCache:a,tsConfigCache:l});for(let I of P){let U=r.get(I)??[];U.push(Bm(p.target)),r.set(I,U)}}}}for await(let[p,D]of r.entries()){let g=await a1(p,e.directory);if(!g)continue;let E=B(g,"shopify.d.ts"),w=Bt(D),v=Tm(w);try{let S=o.get(p),O="";if(S)try{let q=await y1(e.directory,S,c1);q.status==="ok"?O=await p1(q.data):q.status==="invalid"&&Rr(`Invalid tools definition in "${S}": ${q.issues}`)}catch(q){Rr(`Failed to create tools type definition for tools file "${S}": ${q instanceof Error?q.message:"Unknown error"}`)}let P=s.get(p),I="";if(P?.length){let q=await wk(e.directory,P);if(q.length>0)try{I=await f1(q,{generatedTypesHelperImportPath:v})}catch(X){if(X instanceof k)throw X;Rr(`Failed to create intent type definition for intent schema files "${P.map(Q=>Q.schema).join(", ")}": ${X instanceof Error?X.message:"Unknown error"}`)}}let U=await s1({fullPath:p,typeFilePath:E,targets:w,apiVersion:n.api_version,toolsTypeDefinition:O,intentsTypeDefinition:I});if(U){let q=t.get(E)??new Set;U=await m1(U,{parser:"typescript",singleQuote:!0}),q.add(U),t.set(E,q)}}catch(S){if(n.extension_points.some(P=>B(e.directory,P.module)===p||P.build_manifest.assets[$n.ShouldRender]?.module&&B(e.directory,P.build_manifest.assets[$n.ShouldRender].module)===p))throw S}}}});function Ck(e){return{...e,build_manifest:{...e.build_manifest,assets:Object.fromEntries(Object.entries(e.build_manifest.assets).map(([t,n])=>[t,{...n,filepath:B("dist",n.filepath)}]))}}}async function y1(e,t,n){let r=B(e,t);if(!await K(r))return{status:"missing"};let s=await $e(r),a=n.safeParse(JSON.parse(s));return a.success?{status:"ok",data:a.data}:{status:"invalid",issues:a.error.issues.map(l=>l.message).join(", ")}}async function wk(e,t){let n=await Promise.all(t.map(async o=>{try{let s=await y1(e,o.schema,l1);return s.status==="missing"?(Rr(`Intent schema file "${o.schema}" was not found. Skipping intent type generation.`),null):s.status==="invalid"?(Rr(`Invalid intent schema in "${o.schema}": ${s.issues}`),null):{action:o.action,type:o.type,inputSchema:s.data.inputSchema,valueSchema:s.data.value,outputSchema:s.data.outputSchema}}catch(s){return Rr(`Failed to create intent type definition for intent schema file "${o.schema}": ${s instanceof Error?s.message:"Unknown error"}`),null}})),r=[];for(let o of n)o&&r.push(o);return r}async function bk(e,t,n,r){if(!t)return;let o=B(e,t);return await K(o)?void 0:xe`Couldn't find ${Se.path(o)}
|
|
301
|
+
Please check the ${r} path for ${n}`.value}async function Ak(e,t,n){let r=[],o=[],s=[];if(!t||t.length===0)return to(_1);for await(let a of t){let{module:l,target:p}=a,D=await bk(e,l,p,"module");D&&r.push(D),o.includes(p)?s.push(p):o.push(p)}return s.length&&r.push(`Duplicate targets found: ${s.join(", ")}
|
|
302
|
+
Extension point targets must be unique`),r.length?(r.push(`Please check the configuration in ${n}`),to(r.join(`
|
|
303
|
+
|
|
304
|
+
`))):Br({})}function g1(e){let t=e.api_version;if(!t)return!1;let{year:n,month:r}=la(t)??{year:0,month:0};return n>2025||n===2025&&r>=10}function Bm(e){return e.replace(/\.render$/,".should-render")}function Sk(e,t,n){let r=e.build_manifest.assets[$n.ShouldRender];if(r)return{identifier:$n.ShouldRender,outputFileName:r.filepath,content:t?`import ShouldRender_${n} from '${r.module}';shopify.extend('${Bm(e.target)}', (...args) => ShouldRender_${n}(...args));`:`import '${r.module}'`}}var F1=vk;d();var E1=1024,v1=128,xk=v1*E1,Pk="@shopify/web-pixels-extension",Ok=Je.extend({runtime_context:y.string(),version:y.string().optional(),configuration:y.any(),customer_privacy:y.object({analytics:y.boolean(),preferences:y.boolean(),marketing:y.boolean(),sale_of_data:y.enum(["enabled","disabled","ldu"])}).optional(),settings:y.any()}),Tk=Ie({identifier:"web_pixel_extension",dependency:Pk,partnersWebIdentifier:"web_pixel",schema:Ok,appModuleFeatures:e=>["esbuild","single_js_entry_path"],getOutputRelativePath:e=>`dist/${e.handle}.js`,clientSteps:[{lifecycle:"deploy",steps:[{id:"bundle-ui",name:"Bundle UI Extension",type:"bundle_ui",config:{}}]}],deployConfig:async(e,t)=>({runtime_context:e.runtime_context,customer_privacy:e.customer_privacy,runtime_configuration_definition:e.settings}),buildValidation:async(e,t)=>{let n=await Oc(t);if(n>xk){let r=`${(n/E1).toFixed(2)} kB`;throw new k(`Your web pixel extension exceeds the total file size limit (${v1} kB). It's currently ${r}.`,"Reduce your total file size and try again.")}},preDeployValidation:async e=>{if(e.configuration.configuration)throw new k("The property configuration is deprecated and no longer supported.","It has been replaced by settings.");return Promise.resolve()}}),C1=Tk;d();var Ik=y.object({handle:y.string()}),Bk=Je.extend({name:y.string(),include:y.array(Ik).optional(),includes:y.array(y.string()).optional(),type:y.literal("editor_extension_collection")}).transform(e=>{let t=e.includes?.map(r=>({handle:r}))??[],n=e.include??[];return{...e,inCollection:[...t,...n]}}),Rk=Ie({identifier:"editor_extension_collection",schema:Bk,appModuleFeatures:e=>[],deployConfig:async(e,t)=>({name:e.name,handle:e.handle,in_collection:e.inCollection,localization:await pr(t,e.name)})}),w1=Rk;d();var Nk="channel_config",b1="specifications",Mk=["json","toml","yaml","yml","svg"],jk=dr({identifier:Nk,uidStrategy:"single",experience:"extension",clientSteps:[{lifecycle:"deploy",steps:[{id:"copy-files",name:"Copy Files",type:"include_assets",config:{inclusions:[{type:"pattern",baseDir:b1,destination:b1,include:Mk.map(e=>`**/*.${e}`)}]}}]}],appModuleFeatures:()=>[]}),A1=jk;d();var S1="icons",$k=["svg"],Lk=dr({identifier:"order_attribution_config",uidStrategy:"single",experience:"extension",clientSteps:[{lifecycle:"deploy",steps:[{id:"copy-files",name:"Copy Files",type:"include_assets",config:{inclusions:[{type:"pattern",baseDir:S1,destination:S1,include:$k.map(e=>`**/*.${e}`)}]}}]}],appModuleFeatures:()=>[]}),x1=Lk;d();var Uk=dr({identifier:"admin_link",uidStrategy:"uuid",experience:"extension",clientSteps:[{lifecycle:"deploy",steps:[{id:"include-admin-link-assets",name:"Include Admin Link Assets",type:"include_assets",config:{generatesAssetsManifest:!0,inclusions:[{type:"configKey",anchor:"targeting[]",groupBy:"target",key:"targeting[].tools"},{type:"configKey",anchor:"targeting[]",groupBy:"target",key:"targeting[].instructions"},{type:"configKey",anchor:"targeting[]",groupBy:"target",key:"targeting[].intents[].schema"}]}}]}],appModuleFeatures:()=>["localization","ui_preview"]}),P1=Uk;var O1=[M0,$0,U0,vs,Fl,Oh,Sh,xh,R0];async function Pu(){let e=(t,n)=>O1.indexOf(t.identifier)-O1.indexOf(n.identifier);return kk().sort(e)}function kk(){let e=[L0,N0,vv,j0,Cv,xv,k0,T0,Sv],t=[Pv,Ov,qv,Hv,Mv,zv,Vv,lC,fC,pC,dC,FC,F1,C1,w1,A1,x1,P1];return[...e,...t]}d();d();var RS=li(M8()),NS=li(SA()),MS=li(IS());async function Nf(e){let t=JSON.parse(e);return await NS.default.dereference(t,{resolve:{external:!1}}),t}function fg(e,t){e==="strip"&&(t.additionalProperties=!0);let n=new RS.Ajv({allowUnionTypes:!0,allErrors:!0,verbose:!0});return n.addKeyword("x-taplo"),n.compile(t)}var BS=new Map;function jS(e,t,n,r){let o=(0,MS.default)(e),s=r??Rc(),a=BS.get(s)??fg(n,t);BS.set(s,a),a(o);let l;if(a.errors&&a.errors.length>0)return l=aH(a.errors,o,t),{state:"error",data:void 0,errors:l,rawErrors:a.errors};if(n==="strip"){let p=Object.keys(t.properties??{});Object.keys(o).forEach(D=>{p.includes(D)||delete o[D]})}return{state:"ok",data:o,errors:void 0,rawErrors:void 0}}function sH(e){return Array.isArray(e)?"array":e===null?"null":typeof e}function Ea(e,t){return t.length===0?e:Ct(e,t)}function aH(e,t,n){return cH(e,t,n).map(o=>{let s=o.instancePath.split("/").slice(1);if(o.params.missingProperty){let a=o.params.missingProperty;return{path:[...s,a],message:"Required"}}if(o.params.type){let a=Array.isArray(o.params.type)?o.params.type.join(", "):o.params.type,l=Ea(t,s);return{path:s,message:`Expected ${a}, received ${sH(l)}`}}if(o.keyword==="anyOf"||o.keyword==="oneOf")return{path:s,message:"Invalid input"};if(o.params.allowedValues){let a=o.params.allowedValues,l=Ea(t,s);return{path:s,message:`Invalid enum value. Expected ${a.map(p=>JSON.stringify(p)).join(" | ")}, received ${JSON.stringify(l)}`.replace(/"/g,"'")}}if(o.params.comparison){let a=o.params.comparison,l=o.params.limit,p=Ea(t,s),D=a;switch(a){case"<=":D="less than or equal to";break;case"<":D="less than";break;case">=":D="greater than or equal to";break;case">":D="greater than";break}return{path:s,message:xy(`${typeof p} must be ${D} ${l}`)}}if(o.params.additionalProperty){let a=Object.keys(o.parentSchema?.properties??{}),l=Object.keys(o.data??{}),p=a.filter(D=>!l.includes(D));if(p.length>0)return{path:[...s,o.params.additionalProperty],message:`No additional properties allowed. You can set ${p.sort().join(", ")}.`}}return{path:s,message:o.message}})}function cH(e,t,n){let r=e,o=new Set;for(;;){let s=r.filter(E=>(E.keyword==="oneOf"||E.keyword==="anyOf")&&!o.has(E.instancePath))[0];if(s===void 0)break;let a=r.filter(E=>!E.instancePath.startsWith(s.instancePath)),l=[s],p=s.schemaPath.replace("#/","").replace(/\//g,"."),D=Ct(n,p),g=Ea(t,s.instancePath.split("/").slice(1));if(D!==void 0&&g!==void 0){let E=D.map(w=>{let v=fg("fail",w);v(g);let S=0;return w.type==="object"&&(S=Object.keys(w.properties).reduce((P,I)=>{let U=w.properties[I],q=Ea(g,[I]);return fg("fail",U)(q)?P+1:P},S)),[S,v.errors]}).sort(([w],[v])=>w-v);if(E.length>=2){let[w,v]=E[E.length-1],[S]=E[E.length-2];w!==S&&(l=[s,...v.map(O=>({...O,instancePath:s.instancePath+O.instancePath}))])}}r=[...a,...l],o.add(s.instancePath)}return r}var lH={type:{type:"string"},handle:{type:"string"},uid:{type:"string"},path:{type:"string"},extensions:{}};async function $S(e,t,n="strip"){let r=t?.jsonSchema;if(r===void 0||_s(JSON.parse(r)))return e.parseConfigurationObject;let o=await Nf(r);o.properties={...lH,...o.properties};let s=e.identifier;return l=>{let p=e.parseConfigurationObject(l),g=(p.state==="ok"?p.data:void 0)??l,E=jS(g,o,n,s),w=p.errors??[];E.state==="error"&&(w=w.concat(E.errors));let v=new Set;return w=w.filter(S=>{let O=JSON.stringify({path:S.path,message:S.message});return v.has(O)?!1:(v.add(O),!0)}),p.state!=="ok"||w.length>0?{state:"error",data:void 0,errors:w}:{state:"ok",data:E.data,errors:void 0}}}async function Mf({developerPlatformClient:e,app:t}){let r=(await e.specifications(t)).filter(a=>["extension","configuration"].includes(a.experience)).map(a=>(a.identifier==="theme_app_extension"&&(a.identifier="theme"),a.identifier==="subscription_management"&&(a.identifier="product_subscription"),a.identifier==="checkout_post_purchase"&&(a.surface="post_purchase"),a.identifier==="webhook_subscription"&&(a.experience="configuration",a.uidStrategy="dynamic"),a)),o=await Pu();return[...await fH(o,r)]}async function fH(e,t){let n=t.map(async a=>{let l=e.find(g=>g.identifier===a.identifier);if(!l&&a.validationSchema?.jsonSchema&&(l=await dH(a,a.validationSchema)),!l)return;let p=pH(l,a),D=await $S(p,a.validationSchema,p.experience==="extension"?"fail":"strip");return{...p,parseConfigurationObject:D}}),r=fi(await Promise.all(n)),o=e.filter(a=>!r.find(l=>l.identifier===a.identifier));o.length>0&&ce(`The following extension specifications were defined locally but not found in the remote specifications: ${o.map(a=>a.identifier).sort().join(", ")}`);let s=t.filter(a=>!r.find(l=>l.identifier===a.identifier));return s.length>0&&ce(`The following extension specifications were found in the remote specifications but not defined locally: ${s.map(a=>a.identifier).sort().join(", ")}`),r}function pH(e,t){return{...e,loadedRemoteSpecs:!0,externalName:t.externalName,externalIdentifier:t.externalIdentifier,experience:t.experience,registrationLimit:t.registrationLimit,uidStrategy:t.uidStrategy,surface:t.surface??e.surface}}async function dH(e,t){let r=(await Nf(t.jsonSchema)).properties?.localization!==void 0;return{...dr({identifier:e.identifier,uidStrategy:e.uidStrategy,experience:e.experience,appModuleFeatures:()=>r?["localization"]:[]}),loadedRemoteSpecs:!0}}async function jf(e,t=!0){let n=await hH(e);return t&&Fv(n.result,n.packageManager,"text"),n}async function hH(e){let{remoteApp:t,appDirectory:n,developerPlatformClient:r}=await DH(e),o=await Mf({developerPlatformClient:r,app:t}),s=t.flags,a=await _H(e,o,s,t.apiKey),l=await yH(t,e,{appDirectory:a.appDirectory??n});await wh(t,r.organizationSource);let p=await FH({configFileName:l,remoteApp:t,developerPlatformClient:r,specifications:o,flags:s,appDirectory:n,localAppOptions:a});return{remoteApp:t,configFileName:l,configuration:p,packageManager:a.packageManager,result:yv({path:B(n,l),appName:p.name,app:t})}}function LS(e){if(kc()||e.length===0)return;let t=e.map(n=>`--${n}`).join(" ");throw new k([{command:"app config link"},"requires additional flags in non-interactive terminal environments."],["Run",{command:`shopify app config link ${t}`},"with the required values, or run the command in an interactive terminal."])}async function DH(e){let{creationOptions:t,appDirectory:n}=await mH(e),r=n??e.directory;if(e.apiKey){let a=await yl({apiKey:e.apiKey});if(!a){let l=hv(e.apiKey);throw new k(l.message,l.tryMessage)}return e.isNewApp&&(a.newApp=!0),{remoteApp:a,appDirectory:r,developerPlatformClient:a.developerPlatformClient}}e.organizationId||LS(["client-id"]);let o=await mv({...t,directory:r,organizationId:e.organizationId}),s=o.developerPlatformClient;return{remoteApp:o,appDirectory:r,developerPlatformClient:s}}async function mH(e){try{let t=await zE({specifications:await Pu(),directory:e.directory,userProvidedConfigName:e.configName,remoteFlags:void 0,skipPrompts:!0});return{creationOptions:t.creationDefaultOptions(),appDirectory:t.directory}}catch{return{creationOptions:gH(e.directory)}}}function gH(e){return{isLaunchable:!1,scopesArray:[],name:"",directory:e,isEmbedded:!1}}async function _H(e,t,n,r){let o=await GE({directory:e.directory,configName:e.configName,specifications:t,remoteFlags:n,skipPrompts:!0});switch(o.state){case"loaded-app":{let{app:s,configuration:a}=o;return a.client_id===r||e.isNewApp?{state:"reusable-current-app",scopes:nh(a),localAppIdMatchedRemote:!0,existingBuildOptions:a.build,existingConfig:{...a},appDirectory:s.directory,packageManager:o.packageManager}:{state:"unable-to-reuse-current-config",scopes:"",localAppIdMatchedRemote:!0,appDirectory:void 0,existingBuildOptions:void 0,existingConfig:void 0,packageManager:"npm"}}case"loaded-template":return{state:"reusable-current-app",scopes:o.scopes,localAppIdMatchedRemote:!0,existingBuildOptions:void 0,existingConfig:o.rawConfig,appDirectory:o.appDirectory,packageManager:o.packageManager};case"error":return{state:"unable-to-load-config",scopes:"",localAppIdMatchedRemote:!1,appDirectory:void 0,existingBuildOptions:void 0,existingConfig:void 0,packageManager:"npm"}}}async function yH(e,t,n){if(t.fileName){let a=Fn(t.fileName),l=n.appDirectory??t.directory;if(!t.force&&await K(B(l,a)))throw new k(`Configuration file ${a} already exists.`,"Run the command with --force to overwrite it.");return a}if(t.configName)return Fn(t.configName);let r=n.appDirectory??t.directory,o=await Dl(r),s=o[e.apiKey];return s||(_s(o)?"shopify.app.toml":(LS(["file-name"]),bE(r,e.title)))}async function FH(e){let{remoteApp:t,developerPlatformClient:n,specifications:r,flags:o,configFileName:s,appDirectory:a,localAppOptions:l}=e,p=B(a,s),D=await ZE(t,n,r,o);if(!D){let w=l.scopes;D=vH(t,w)}let g=(w,v)=>v,E={...fr({...l.existingConfig??{}},{client_id:t.apiKey,...D},g),build:EH({existingBuildOptions:l.existingBuildOptions,linkedAppAndClientIdFromFileAreInSync:l.localAppIdMatchedRemote,linkedAppWasNewlyCreated:!!t.newApp,defaultToUpdateUrlsOnDev:!0})};return delete E.scopes,await Ev(E,p),ph(E,{configFileName:s,directory:a}),E}function EH(e){let{existingBuildOptions:t,linkedAppAndClientIdFromFileAreInSync:n,linkedAppWasNewlyCreated:r,defaultToUpdateUrlsOnDev:o}=e,s={...r?{include_config_on_deploy:!0}:{},...o&&r?{automatically_update_urls_on_dev:!0}:{},...n?t:{}};if(!_s(s))return s}function vH(e,t){return{...xH(e),...SH(e),...bH(e),...AH(t,e),...wH(e),...CH(e)}}function CH(e){let t={application_url:e.applicationUrl?.replace(/\/$/,"")??"",embedded:e.embedded??!0};return e.preferencesUrl?{...t,app_preferences:{url:e.preferencesUrl}}:{...t}}function wH(e){return e.appProxy?.url?{app_proxy:{url:e.appProxy.url,subpath:e.appProxy.subPath,prefix:e.appProxy.subPathPrefix}}:{}}function bH(e){let t=e.gdprWebhooks?.customerDataRequestUrl??e.gdprWebhooks?.customerDeletionUrl??e.gdprWebhooks?.shopDeletionUrl,n={privacy_compliance:{customer_data_request_url:e.gdprWebhooks?.customerDataRequestUrl,customer_deletion_url:e.gdprWebhooks?.customerDeletionUrl,shop_deletion_url:e.gdprWebhooks?.shopDeletionUrl}};return{webhooks:{api_version:e.webhookApiVersion??"2023-07",...t?n:{}}}}function AH(e,t){let n={};return t.requestedAccessScopes?n={scopes:t.requestedAccessScopes.join(",")}:e===""?n={use_legacy_install_flow:!0}:n={scopes:e,use_legacy_install_flow:!0},{auth:{redirect_urls:t.redirectUrlWhitelist??[]},access_scopes:n}}function SH(e){return{pos:{embedded:e.posEmbedded??!1}}}function xH(e){return{name:e.title}}d();d();async function US(e){for(let t of e)await PH(t)}async function PH(e){if(!e.isUUIDStrategyExtension||e.configuration.uid)return;let t=await wt.read(e.configurationPath),n=Ct(t.content,"extensions");if(!("uid"in t.content)){if(n){let r=n.find(o=>o.handle===e.handle);if(r&&"uid"in r)return}if(n){let r=e.handle;await t.transformRaw(o=>{let s=new RegExp(`(\\n?(\\s*)handle\\s*=\\s*"${r}")`);return o.replace(s,`$1
|
|
305
|
+
$2uid = "${e.uid}"`)})}else await t.patch({uid:e.uid})}}function kS(e){let t=Ms(e);return xe`${Se.errorText("Validation error")} in ${Se.path(e.file)}:\n\n${t}`}async function yle({directory:e,clientId:t,forceRelink:n,userProvidedConfigName:r,unsafeTolerateErrors:o=!1}){let s,a,l;if(n){let P=await jf({directory:e,apiKey:t});l=P.remoteApp;let I=await Ln(e,P.configFileName);s=I.project,a=I.activeConfig}else{let P=await Ln(e,r);if(s=P.project,a=P.activeConfig,a.file.errors.length>0)throw new k(a.file.errors.map(I=>I.message).join(`
|
|
306
|
+
`));if(!a.isLinked){let I=await jf({directory:e,apiKey:t,configName:ye(a.file.path)});l=I.remoteApp;let U=await Ln(e,I.configFileName);s=U.project,a=U.activeConfig}}let p=a.file.content.client_id;if(typeof p!="string"||p.length===0)throw new tn(`Active config at ${a.file.path} is marked as linked but has no client_id`);l??=await yl({apiKey:t??p});let g=l.developerPlatformClient,E=await Kc(l.organizationId,g),w=await Mf({developerPlatformClient:g,app:l}),v=await nu({project:s,activeConfig:a,specifications:w,remoteFlags:l.flags,clientIdOverride:t});if(!o&&!v.errors.isEmpty())throw new k(kS(v.errors.getErrors()[0]));let S=Zo(e),O=l.apiKey===v.configuration.client_id;return(!S||O)&&Qo({appId:l.apiKey,title:l.title,directory:e,orgId:l.organizationId}),await OH(l,E,n),v.errors.isEmpty()&&await US(v.allExtensions),{project:s,activeConfig:a,app:v,remoteApp:l,developerPlatformClient:g,specifications:w,organization:E}}async function OH(e,t,n){let r;t.source===Yo.BusinessPlatform?r={business_platform_id:hs(t.id)}:r={partner_id:hs(t.id)},await _n.addPublicMetadata(()=>({...r,api_key:e.apiKey,cmd_app_reset_used:n}))}async function Fle({directory:e,userProvidedConfigName:t,skipPrompts:n=!1}){let{project:r,activeConfig:o}=await Ln(e,t,{skipPrompts:n});if(o.file.errors.length>0)throw new k(o.file.errors.map(l=>l.message).join(`
|
|
307
|
+
`));let s=await Pu(),a=await nu({project:r,activeConfig:o,specifications:s,ignoreUnknownExtensions:!0});if(!a.errors.isEmpty())throw new k(kS(a.errors.getErrors()[0]));return{app:a,project:r,activeConfig:o}}export{jd as a,qH as b,oo as c,bB as d,Ss as e,vF as f,Nz as g,eF as h,nh as i,ft as j,ZG as k,Ts as l,jr as m,uh as n,qz as o,WF as p,VF as q,lh as r,AE as s,Zo as t,Qo as u,PK as v,TE as w,OK as x,TK as y,IK as z,Is as A,eh as B,kE as C,Dh as D,DX as E,IE as F,BE as G,J6 as H,NE as I,dh as J,Ms as K,ZY as L,QY as M,eX as N,VE as O,hr as P,Dl as Q,pK as R,dK as S,hK as T,SE as U,DK as V,xE as W,mK as X,PE as Y,gK as Z,ZE as _,kX as $,qX as aa,_l as ba,fv as ca,CX as da,yl as ea,hQ as fa,mv as ga,MR as ha,DQ as ia,gv as ja,wh as ka,See as la,Bv as ma,Nh as na,qte as oa,Mh as pa,Xte as qa,jh as ra,rne as sa,$h as ta,cne as ua,Lh as va,Dne as wa,Uh as xa,Fne as ya,_ue as za,D1 as Aa,Nk as Ba,b1 as Ca,Mf as Da,bh as Ea,yv as Fa,Fv as Ga,jf as Ha,hH as Ia,gH as Ja,_H as Ka,FH as La,yle as Ma,Fle as Na};
|
|
308
|
+
/*! Bundled license information:
|
|
309
|
+
|
|
310
|
+
lodash/lodash.js:
|
|
311
|
+
(**
|
|
312
|
+
* @license
|
|
313
|
+
* Lodash <https://lodash.com/>
|
|
314
|
+
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
315
|
+
* Released under MIT license <https://lodash.com/license>
|
|
316
|
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
317
|
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
318
|
+
*)
|
|
319
|
+
*/
|