@shopify/cli 4.8.4 → 4.9.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-QK4RFCB6.js +1 -0
- package/dist/analytics-R6I5APDB.js +1 -0
- package/dist/assets/hydrogen/starter/package.json +1 -1
- package/dist/bootstrap.js +1 -3
- package/dist/chunk-22LJALHJ.js +7 -0
- package/dist/{chunk-APUYMORT.js → chunk-23K3B23N.js} +1 -1
- package/dist/chunk-2KLXRVGQ.js +317 -0
- package/dist/{chunk-QXR5DJC2.js → chunk-2LZQM5JG.js} +1 -1
- package/dist/chunk-2OHSGC4Q.js +1 -0
- package/dist/chunk-2Q3WIH7S.js +6 -0
- package/dist/{chunk-FRRA5MI2.js → chunk-2W6M7YDY.js} +1 -1
- package/dist/{chunk-NHOF2IN6.js → chunk-2YFB3PTV.js} +9 -9
- package/dist/chunk-2YRVHJEY.js +4 -0
- package/dist/{chunk-3CZ7DKE5.js → chunk-3AASYIOA.js} +3 -3
- package/dist/chunk-3DMDSAWK.js +20 -0
- package/dist/{chunk-KWQGJ3VC.js → chunk-3SG5EJFC.js} +1 -1
- package/dist/chunk-3T2WMZHC.js +1 -0
- package/dist/{chunk-773TIA5M.js → chunk-3VYOLEQE.js} +2 -2
- package/dist/chunk-3WVEL423.js +1 -0
- package/dist/{chunk-SVYHWGMI.js → chunk-3ZK5JZLY.js} +1 -1
- package/dist/chunk-44QTWXOJ.js +8 -0
- package/dist/{chunk-4QBJ5JBX.js → chunk-4A7FPJVT.js} +16 -15
- package/dist/chunk-4TQFTZVD.js +18 -0
- package/dist/chunk-4WACZNFF.js +1 -0
- package/dist/{chunk-RIM7FNP3.js → chunk-4XSYMLQG.js} +1 -1
- package/dist/{chunk-EJJPEWSB.js → chunk-4Y22EM45.js} +1 -1
- package/dist/chunk-53U6XS3J.js +1 -0
- package/dist/chunk-55NKAIIT.js +1 -0
- package/dist/chunk-55PABKRC.js +5 -0
- package/dist/chunk-5BLXN5WU.js +1 -0
- package/dist/{chunk-LAMTFOVF.js → chunk-5BYVVXGD.js} +1 -1
- package/dist/{chunk-Z5KYKXMH.js → chunk-5HEBS5DG.js} +3 -3
- package/dist/{chunk-LEW5IJK6.js → chunk-5HONV6NQ.js} +1 -1
- package/dist/chunk-5RL6DKWR.js +5 -0
- package/dist/chunk-5XO6PAMV.js +1 -0
- package/dist/chunk-6DHY67FO.js +6 -0
- package/dist/{chunk-6QADNGH4.js → chunk-6GA56I3E.js} +1 -1
- package/dist/chunk-6IL3B5Z5.js +4 -0
- package/dist/{chunk-RHBLXZGU.js → chunk-6ILP6QCH.js} +1 -1
- package/dist/{chunk-H7TDIRIU.js → chunk-6RBCFXJT.js} +1 -1
- package/dist/{chunk-WAJRWCZY.js → chunk-72HS7MHV.js} +1 -1
- package/dist/{chunk-SPNM3GES.js → chunk-74HXMIDM.js} +1 -1
- package/dist/{chunk-ZAH6QID2.js → chunk-77B77IGP.js} +1 -1
- package/dist/chunk-7DRKDQRT.js +1 -0
- package/dist/chunk-7HDJBEBP.js +3 -0
- package/dist/chunk-7IGMIDKK.js +15 -0
- package/dist/chunk-7QQPAT4L.js +1 -0
- package/dist/chunk-7Y4X5I6N.js +1 -0
- package/dist/{chunk-WGFGWDWP.js → chunk-7ZSN2QT5.js} +1 -1
- package/dist/chunk-A54V5UCD.js +5 -0
- package/dist/{chunk-VETLNJ56.js → chunk-AD4S2VEI.js} +1 -1
- package/dist/chunk-ADW7ECNU.js +7 -0
- package/dist/chunk-AS2O62JX.js +1 -0
- package/dist/chunk-ASUARYJD.js +1 -0
- package/dist/chunk-B4RPJYDH.js +1 -0
- package/dist/{chunk-ZCNNJCTQ.js → chunk-BJOJNAKH.js} +1 -1
- package/dist/chunk-BL5JWD3Y.js +16 -0
- package/dist/chunk-BOFCBTX7.js +1 -0
- package/dist/chunk-BPIQ4YTW.js +1 -0
- package/dist/chunk-C6FZII5S.js +1 -0
- package/dist/{chunk-NBXXTQWA.js → chunk-CACPRKUF.js} +1 -1
- package/dist/{chunk-QVO5CAJN.js → chunk-CHLSNYF7.js} +1 -1
- package/dist/chunk-CMICT4XI.js +1 -0
- package/dist/chunk-CPFAATMO.js +6 -0
- package/dist/{chunk-CSOCXWP6.js → chunk-CSRNHTHO.js} +2 -2
- package/dist/chunk-D3K42KBL.js +9 -0
- package/dist/chunk-DGMRL5DQ.js +1 -0
- package/dist/chunk-DKJPE42V.js +2 -0
- package/dist/{chunk-AIILEPSK.js → chunk-DYA5UUXL.js} +1 -1
- package/dist/chunk-E5ND6RBL.js +1 -0
- package/dist/{chunk-XKHKXUQY.js → chunk-E75DJTAF.js} +1 -1
- package/dist/chunk-ECEOBSGD.js +1 -0
- package/dist/{chunk-NDT3F2PR.js → chunk-EYSZRIUL.js} +1 -1
- package/dist/chunk-FCULF3JA.js +1 -0
- package/dist/chunk-FL34EOXG.js +1 -0
- package/dist/chunk-FW5HGFSZ.js +20 -0
- package/dist/{chunk-XRJCD3AO.js → chunk-G54BKNIX.js} +1 -1
- package/dist/{chunk-74CYT3VX.js → chunk-G7OIACY5.js} +1 -1
- package/dist/{chunk-IHH5XTPV.js → chunk-GALDYSEX.js} +1 -1
- package/dist/{chunk-A5U4KKNV.js → chunk-GDQLA5NB.js} +1 -1
- package/dist/{chunk-6A3TDSON.js → chunk-GJJBOCKD.js} +3 -3
- package/dist/{chunk-TAY7HU7X.js → chunk-GQZPGTG7.js} +20 -20
- package/dist/{chunk-XHXKPRF5.js → chunk-GVRFO4CV.js} +1 -1
- package/dist/chunk-HB3MJYBK.js +1 -0
- package/dist/{chunk-AEUCDGTB.js → chunk-HDQXFGYG.js} +1 -1
- package/dist/chunk-HSTNTHWM.js +1 -0
- package/dist/{chunk-A3U7JDUC.js → chunk-HSZC2LBB.js} +1 -1
- package/dist/chunk-I4FGM6UH.js +8 -0
- package/dist/chunk-I7GYNNCU.js +6 -0
- package/dist/{chunk-ZVA5F4QC.js → chunk-IBTQO3JD.js} +1 -1
- package/dist/{chunk-XWXAFJFC.js → chunk-IISE7SBT.js} +1 -1
- package/dist/chunk-IUZZWXJG.js +3 -0
- package/dist/chunk-IWML2HLC.js +5 -0
- package/dist/{chunk-CTNBSUVU.js → chunk-JA2QZ635.js} +2 -2
- package/dist/chunk-JOJRABPY.js +3 -0
- package/dist/chunk-JQKB3D37.js +1 -0
- package/dist/chunk-JROJL6RV.js +1 -0
- package/dist/{chunk-GINXNPAR.js → chunk-JTPVSO6Y.js} +1 -1
- package/dist/chunk-JWDUSMCA.js +1 -0
- package/dist/{chunk-CBMX6XI7.js → chunk-KLYJDAP6.js} +1 -1
- package/dist/{chunk-4HOJJCZ6.js → chunk-KVROYIUQ.js} +1 -1
- package/dist/chunk-L5XWYTHY.js +836 -0
- package/dist/chunk-LOTGSNS5.js +2 -0
- package/dist/{chunk-FGRW7GT4.js → chunk-LQLFMDVD.js} +1 -1
- package/dist/{chunk-7LZ34C4S.js → chunk-LSWFHTJT.js} +1 -1
- package/dist/{chunk-HYPY5WH6.js → chunk-LV2IWYGL.js} +1 -1
- package/dist/{chunk-W4SGAPPR.js → chunk-LYPNQFWX.js} +1 -1
- package/dist/{chunk-U6URYCC6.js → chunk-MRVQ6XRW.js} +1 -1
- package/dist/chunk-MVVHISCR.js +2 -0
- package/dist/{chunk-UJBMY5WR.js → chunk-N4DE5H65.js} +1 -1
- package/dist/{chunk-W6ST525S.js → chunk-N56BJ3F7.js} +1 -1
- package/dist/{chunk-W4SQE6NR.js → chunk-NF7MOA4K.js} +1 -1
- package/dist/{chunk-7KLPRSQR.js → chunk-NGN7U2UF.js} +1 -1
- package/dist/{chunk-TCFGEOE4.js → chunk-NTVEJYKI.js} +1 -1
- package/dist/chunk-NYABB6XW.js +1 -0
- package/dist/{chunk-DH3DMUE2.js → chunk-O6E7YL7N.js} +2 -2
- package/dist/chunk-OASB6XPV.js +16 -0
- package/dist/{chunk-WY7QF7VU.js → chunk-OBYY45BX.js} +1 -1
- package/dist/chunk-OETFY7FE.js +28 -0
- package/dist/{chunk-QZEDYQVT.js → chunk-OEZATTOS.js} +1 -1
- package/dist/{chunk-D6LQ56XT.js → chunk-OG7SF4FU.js} +1 -1
- package/dist/chunk-OM243CQ6.js +6 -0
- package/dist/chunk-P3Z5RLVV.js +3 -0
- package/dist/{chunk-HINK4QAR.js → chunk-PBBZNGS4.js} +1 -1
- package/dist/chunk-PGTKKP2B.js +11 -0
- package/dist/chunk-PK4ID32C.js +1 -0
- package/dist/{chunk-7FVCUY54.js → chunk-PVOWU77O.js} +1 -1
- package/dist/{chunk-66HW6J57.js → chunk-PXD2WJOI.js} +3 -3
- package/dist/chunk-PXXTSW6I.js +4 -0
- package/dist/{chunk-AU7GNCOK.js → chunk-PZHE37Z4.js} +1 -1
- package/dist/{chunk-TA2M37OB.js → chunk-Q34PKJRR.js} +1 -1
- package/dist/{chunk-S5H5U3PR.js → chunk-Q3O3AFZT.js} +1 -1
- package/dist/chunk-Q45XAEG2.js +16 -0
- package/dist/{chunk-QKTBYAUD.js → chunk-QAXFCAOV.js} +5 -5
- package/dist/{chunk-FY47X4NG.js → chunk-QBGSSUJP.js} +1 -1
- package/dist/chunk-QILWHHAQ.js +1 -0
- package/dist/chunk-QJST4LZX.js +1 -0
- package/dist/chunk-QQN4PJZD.js +1 -0
- package/dist/{chunk-6P5FGN6P.js → chunk-QSKOR3ED.js} +1 -1
- package/dist/{chunk-FRVRTOTF.js → chunk-QTEWTPAQ.js} +2 -2
- package/dist/chunk-QWDJRSJJ.js +1 -0
- package/dist/{chunk-GTAYTMCP.js → chunk-R757TSQ6.js} +1 -1
- package/dist/chunk-RCIU7NHA.js +1 -0
- package/dist/chunk-RGIUP4FW.js +1 -0
- package/dist/{chunk-RDS2WYQH.js → chunk-RHNFWHFY.js} +1 -1
- package/dist/{chunk-VG3YVCZW.js → chunk-S7536EWZ.js} +4 -4
- package/dist/{chunk-VBICZDA4.js → chunk-SDFO7P2M.js} +1 -1
- package/dist/{chunk-JQPPLSFT.js → chunk-SDJNAUU6.js} +1 -1
- package/dist/chunk-SGBLCVUX.js +1 -0
- package/dist/chunk-SJARQZVN.js +3 -0
- package/dist/chunk-SKRUMRB4.js +383 -0
- package/dist/{chunk-5Z6EW3FA.js → chunk-SW5EWGBJ.js} +1 -1
- package/dist/chunk-SXPWOYLT.js +7 -0
- package/dist/chunk-T234RERA.js +7 -0
- package/dist/chunk-TJJVX7CU.js +4 -0
- package/dist/{chunk-L4LDNEFK.js → chunk-TMV37ENR.js} +1 -1
- package/dist/{chunk-BYX7SQPM.js → chunk-TNXZWQZU.js} +1 -1
- package/dist/{chunk-67QK26HI.js → chunk-TO7TXDLU.js} +1 -1
- package/dist/chunk-TSLZNTFM.js +3 -0
- package/dist/{chunk-BG7QQU23.js → chunk-UFU2LGFK.js} +1 -1
- package/dist/chunk-VDDNDA5K.js +15 -0
- package/dist/{chunk-T4V7KOGJ.js → chunk-VFO5OYQ4.js} +1 -1
- package/dist/{chunk-HXVUDGLH.js → chunk-VFP3PUGZ.js} +24 -24
- package/dist/{chunk-6QDOCBD4.js → chunk-VZUHMW5E.js} +4 -3
- package/dist/chunk-W7CBJNXD.js +12 -0
- package/dist/chunk-WCAGYCT7.js +4 -0
- package/dist/{chunk-DPNZWBT5.js → chunk-WNO2V53C.js} +1 -1
- package/dist/{chunk-Y4BBTWM5.js → chunk-WPUQTUDX.js} +1 -1
- package/dist/chunk-WU7MSL3I.js +8 -0
- package/dist/chunk-WXV35TPE.js +1 -0
- package/dist/{chunk-2WATX3XV.js → chunk-XBSWZ6BT.js} +6 -6
- package/dist/chunk-XCNJL7ES.js +1 -0
- package/dist/{chunk-C4Y7PQDQ.js → chunk-XFZDFDZV.js} +1 -1
- package/dist/chunk-XTYSJIZY.js +1 -0
- package/dist/chunk-Y5ZN62VF.js +1 -0
- package/dist/{chunk-PNNW7YQG.js → chunk-YAH5WFYR.js} +3 -3
- package/dist/{chunk-DUNE3INK.js → chunk-YBQKJHZW.js} +1 -1
- package/dist/chunk-YD66PU3Y.js +1 -0
- package/dist/chunk-YGFEUXKQ.js +1 -0
- package/dist/chunk-YJWNM4XO.js +18 -0
- package/dist/{chunk-L3JBKCAS.js → chunk-YQQHBFMA.js} +1 -1
- package/dist/chunk-YRHFPXC3.js +1 -0
- package/dist/chunk-YTJ3EPD3.js +1 -0
- package/dist/chunk-YX5GRXRS.js +2368 -0
- package/dist/chunk-Z35PUKKP.js +7 -0
- package/dist/{chunk-7VQBIGJB.js → chunk-Z3XIZMEM.js} +1 -1
- package/dist/chunk-ZGASBRSQ.js +5 -0
- package/dist/{chunk-OY6L7J53.js → chunk-ZHJ6KA43.js} +1 -1
- package/dist/{chunk-YHTONNIZ.js → chunk-ZO4IBP4B.js} +1 -1
- package/dist/chunk-ZOYSMJ27.js +1 -0
- package/dist/chunk-ZPCCSPAE.js +3 -0
- package/dist/chunk-ZSJXZCAW.js +4 -0
- package/dist/{chunk-CP56F5UR.js → chunk-ZSVR5NEO.js} +1 -1
- package/dist/{chunk-JJJIRCQP.js → chunk-ZUVAHONX.js} +1 -1
- package/dist/chunk-ZVDFCUJT.js +2 -0
- package/dist/cli/commands/app/app-logs/sources.js +1 -1
- package/dist/cli/commands/app/build.js +1 -1
- package/dist/cli/commands/app/bulk/cancel.js +1 -1
- package/dist/cli/commands/app/bulk/execute.js +1 -1
- package/dist/cli/commands/app/bulk/status.js +1 -1
- package/dist/cli/commands/app/config/link.js +1 -1
- package/dist/cli/commands/app/config/pull.js +1 -1
- package/dist/cli/commands/app/config/use.js +1 -1
- package/dist/cli/commands/app/config/validate.js +1 -1
- package/dist/cli/commands/app/demo/watcher.js +1 -1
- package/dist/cli/commands/app/deploy.js +1 -1
- package/dist/cli/commands/app/dev/clean.js +1 -1
- package/dist/cli/commands/app/dev.js +1 -1
- package/dist/cli/commands/app/env/pull.js +1 -1
- package/dist/cli/commands/app/env/show.js +1 -1
- package/dist/cli/commands/app/execute.js +1 -1
- package/dist/cli/commands/app/function/build.js +1 -1
- package/dist/cli/commands/app/function/info.js +1 -1
- package/dist/cli/commands/app/function/replay.js +1 -1
- package/dist/cli/commands/app/function/run.js +1 -1
- package/dist/cli/commands/app/function/schema.js +1 -1
- package/dist/cli/commands/app/function/typegen.js +1 -1
- package/dist/cli/commands/app/generate/extension.js +1 -1
- package/dist/cli/commands/app/graphiql.js +1 -1
- package/dist/cli/commands/app/import/channel-config.js +1 -0
- package/dist/cli/commands/app/import/custom-data-definitions.js +1 -0
- package/dist/cli/commands/app/import/dashboard-extensions.js +1 -0
- package/dist/cli/commands/app/import-custom-data-definitions.js +1 -1
- package/dist/cli/commands/app/import-extensions.js +1 -1
- package/dist/cli/commands/app/info.js +1 -1
- package/dist/cli/commands/app/init.js +1 -1
- package/dist/cli/commands/app/logs.js +1 -1
- package/dist/cli/commands/app/release.js +1 -1
- package/dist/cli/commands/app/security/check.js +1 -0
- package/dist/cli/commands/app/security/clean.js +1 -0
- package/dist/cli/commands/app/security/instructions.js +1 -0
- package/dist/cli/commands/app/security/record.js +1 -0
- package/dist/cli/commands/app/security/review.js +1 -0
- 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.d.ts +16 -1
- package/dist/cli/commands/auth/login.js +1 -1
- package/dist/cli/commands/auth/logout.d.ts +16 -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.d.ts +13 -0
- package/dist/cli/commands/config/autoupgrade/off.js +1 -1
- package/dist/cli/commands/config/autoupgrade/on.d.ts +13 -0
- package/dist/cli/commands/config/autoupgrade/on.js +1 -1
- package/dist/cli/commands/config/autoupgrade/status.d.ts +13 -0
- 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 +2 -0
- package/dist/cli/commands/doc/fetch.js +1 -1
- package/dist/cli/commands/doc/search.d.ts +1 -0
- 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.d.ts +1 -0
- package/dist/cli/commands/doctor-release/theme/index.js +1 -1
- package/dist/cli/commands/help.d.ts +431 -1
- package/dist/cli/commands/help.js +1 -1
- package/dist/cli/commands/kitchen-sink/async.js +1 -1
- package/dist/cli/commands/kitchen-sink/index.js +1 -1
- package/dist/cli/commands/kitchen-sink/prompts.js +1 -1
- package/dist/cli/commands/kitchen-sink/static.js +1 -1
- package/dist/cli/commands/notifications/generate.js +1 -1
- package/dist/cli/commands/notifications/list.js +1 -1
- package/dist/cli/commands/organization/list.js +1 -1
- package/dist/cli/commands/search.d.ts +11 -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.js +1 -1
- package/dist/cli/commands/version.d.ts +15 -1
- package/dist/cli/commands/version.js +1 -1
- package/dist/cli/help.d.ts +5 -2
- package/dist/cli/help.js +6 -2
- package/dist/cli/services/commands/auth/login/types.d.ts +11 -0
- package/dist/cli/services/commands/auth/login/types.js +7 -0
- package/dist/cli/services/commands/config/autoupgrade/index.d.ts +3 -0
- package/dist/cli/services/commands/config/autoupgrade/index.js +9 -0
- package/dist/cli/services/commands/config/autoupgrade/result.d.ts +2 -0
- package/dist/cli/services/commands/config/autoupgrade/result.js +15 -0
- package/dist/cli/services/commands/config/autoupgrade/types.d.ts +10 -0
- package/dist/cli/services/commands/config/autoupgrade/types.js +7 -0
- package/dist/cli/services/commands/doc/fetch.d.ts +1 -1
- package/dist/cli/services/commands/doc/fetch.js +11 -2
- package/dist/cli/services/commands/help/index.d.ts +3 -0
- package/dist/cli/services/commands/help/index.js +51 -0
- package/dist/cli/services/commands/help/result.d.ts +2 -0
- package/dist/cli/services/commands/help/result.js +6 -0
- package/dist/cli/services/commands/help/types.d.ts +431 -0
- package/dist/cli/services/commands/help/types.js +71 -0
- package/dist/cli/services/commands/search/index.d.ts +2 -0
- package/dist/cli/services/commands/search/index.js +8 -0
- package/dist/cli/services/commands/search/result.d.ts +2 -0
- package/dist/cli/services/commands/search/result.js +12 -0
- package/dist/cli/services/commands/search/types.d.ts +10 -0
- package/dist/cli/services/commands/search/types.js +7 -0
- package/dist/cli/services/commands/version/index.d.ts +2 -0
- package/dist/cli/services/commands/version/index.js +5 -0
- package/dist/cli/services/commands/version/result.d.ts +2 -0
- package/dist/cli/services/commands/version/result.js +6 -0
- package/dist/cli/services/commands/version/types.d.ts +10 -0
- package/dist/cli/services/commands/version/types.js +7 -0
- package/dist/command-json-schema-Y3N2NUZN.js +1 -0
- package/dist/command-registry.js +1 -1
- package/dist/{conf-store-H3UAVGN5.js → conf-store-5ZA3ILWV.js} +1 -1
- package/dist/custom-oclif-loader-VQKMCXNH.js +1 -0
- package/dist/deprecations-PFQXWNF6.js +1 -0
- package/dist/dist-4X53WJBQ.js +1 -0
- package/dist/dist-5M2V3YCM.js +1 -0
- package/dist/environment-ZUTBXY7U.js +1 -0
- package/dist/environments-3RUZ7F4Q.js +1 -0
- package/dist/error-FBSXLW22.js +1 -0
- package/dist/error-handler-D5BURRJ7.js +1 -0
- package/dist/fs-ZLV5W4TV.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/http-proxy-node16-D3JUYA5D.js +38 -0
- package/dist/index.js +13 -14
- package/dist/is-global-GZ5CIXQA.js +1 -0
- package/dist/json-error-2BL3UZ7H.js +1 -0
- package/dist/lib-AD2G3QH3.js +1 -0
- package/dist/lib-VEVNMHDE.js +1 -0
- package/dist/lib-ZQW4E7QU.js +1 -0
- package/dist/local-KAZJAYLX.js +1 -0
- package/dist/metadata-M3ZE24WB.js +1 -0
- package/dist/{morph-BMYYMQNX.js → morph-42EXMN3K.js} +3 -3
- package/dist/node-package-manager-RVPONQBY.js +1 -0
- package/dist/notifications-system-MYEMV7JF.js +1 -0
- package/dist/os-DRUILZZR.js +1 -0
- package/dist/output-SDE274Y5.js +1 -0
- package/dist/{path-MBXP7ZIC.js → path-6YMSTSWG.js} +1 -1
- package/dist/system-5FQ3L5PA.js +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui-TEZZM7SE.js +1 -0
- package/dist/uncaught-error-handler.d.ts +6 -0
- package/dist/uncaught-error-handler.js +33 -0
- package/dist/upgrade-3PIVJYBL.js +1 -0
- package/dist/version-FMWTVLMF.js +1 -0
- package/dist/version-IAMVSP7U.js +1 -0
- package/dist/workerd-WRW4ZUYM.js +18 -0
- package/oclif.manifest.json +2646 -226
- package/package.json +17 -8
- package/dist/analytics-M4OC7RPG.js +0 -1
- package/dist/analytics-RGIJMP4U.js +0 -1
- package/dist/chunk-2HW6VRJT.js +0 -2
- package/dist/chunk-2HYR6EUD.js +0 -1
- package/dist/chunk-2IRRFPEY.js +0 -1
- package/dist/chunk-2KD4LHRT.js +0 -5
- package/dist/chunk-2SL443J6.js +0 -1
- package/dist/chunk-2VJ6NBPV.js +0 -15
- package/dist/chunk-2ZROBXJX.js +0 -11
- package/dist/chunk-3DIRCEXA.js +0 -1
- package/dist/chunk-3DT4NS4S.js +0 -4
- package/dist/chunk-3IQ6WXDD.js +0 -3
- package/dist/chunk-43FRAUV6.js +0 -19
- package/dist/chunk-44QD4QNO.js +0 -1
- package/dist/chunk-4DLRS7MT.js +0 -12
- package/dist/chunk-4F3XYIEY.js +0 -1
- package/dist/chunk-4OMKKYFC.js +0 -9
- package/dist/chunk-4ZTRKEA2.js +0 -1
- package/dist/chunk-5DMFEDKY.js +0 -28
- package/dist/chunk-66G2HJ2A.js +0 -3
- package/dist/chunk-6B727IUY.js +0 -5
- package/dist/chunk-6C5AVMKR.js +0 -375
- package/dist/chunk-6CR2EEZ3.js +0 -6
- package/dist/chunk-6V6UNUMM.js +0 -3
- package/dist/chunk-6XLFFOPK.js +0 -1
- package/dist/chunk-A3V2A2I4.js +0 -2
- package/dist/chunk-AQPOPSQ7.js +0 -1
- package/dist/chunk-BAWBC66R.js +0 -5
- package/dist/chunk-BHJ3TGS7.js +0 -1
- package/dist/chunk-BHTHUKHU.js +0 -1
- package/dist/chunk-BV62ZERJ.js +0 -6
- package/dist/chunk-CFQ5G2QS.js +0 -1
- package/dist/chunk-CNK3ZO2B.js +0 -836
- package/dist/chunk-CRALWNNO.js +0 -1
- package/dist/chunk-CVW2HMQO.js +0 -317
- package/dist/chunk-D6QTOQEJ.js +0 -6
- package/dist/chunk-DDZEYA2I.js +0 -8
- package/dist/chunk-DO4SRE4M.js +0 -3
- package/dist/chunk-DZZORIWL.js +0 -4
- package/dist/chunk-EQ2PD2ZA.js +0 -2
- package/dist/chunk-ERBXXVOZ.js +0 -2
- package/dist/chunk-FW3RORD7.js +0 -1
- package/dist/chunk-G2YTINLI.js +0 -6
- package/dist/chunk-GCN4O7HM.js +0 -1
- package/dist/chunk-GGPMDCCB.js +0 -8
- package/dist/chunk-GJHBAOGJ.js +0 -1
- package/dist/chunk-H2HR2AQE.js +0 -7
- package/dist/chunk-HYM3HBDG.js +0 -20
- package/dist/chunk-IHEBV2KO.js +0 -1
- package/dist/chunk-JWHQPDOK.js +0 -3
- package/dist/chunk-JXG2T76F.js +0 -6
- package/dist/chunk-K2DP5Z76.js +0 -1
- package/dist/chunk-KUZ5Z6HM.js +0 -1
- package/dist/chunk-KZU727AL.js +0 -1
- package/dist/chunk-L2DCUVZV.js +0 -1
- package/dist/chunk-L3M7PTHU.js +0 -15
- package/dist/chunk-LBA6FGKC.js +0 -3
- package/dist/chunk-LX5UXWZ7.js +0 -1
- package/dist/chunk-M7VQLMSW.js +0 -1
- package/dist/chunk-MBRFIXCU.js +0 -1705
- package/dist/chunk-MYLMGH7Y.js +0 -1
- package/dist/chunk-NKC3K3XP.js +0 -1
- package/dist/chunk-O72SHE3Q.js +0 -7
- package/dist/chunk-OAG72Q2O.js +0 -1
- package/dist/chunk-OPOPO7DG.js +0 -7
- package/dist/chunk-OUA6EOLX.js +0 -11
- package/dist/chunk-OYCAYEQE.js +0 -7
- package/dist/chunk-PGWQHSDV.js +0 -1
- package/dist/chunk-PM3HRKPR.js +0 -1
- package/dist/chunk-POMWFTBD.js +0 -16
- package/dist/chunk-R3GLEZSE.js +0 -4
- package/dist/chunk-RHNZA4IL.js +0 -5
- package/dist/chunk-SCLGMVNB.js +0 -1
- package/dist/chunk-TU47HMTL.js +0 -1
- package/dist/chunk-UPGRXCFS.js +0 -4
- package/dist/chunk-V2GLAK2W.js +0 -1
- package/dist/chunk-V4774HTF.js +0 -1
- package/dist/chunk-VDGTHMIQ.js +0 -3
- package/dist/chunk-VJ5YOXKL.js +0 -1
- package/dist/chunk-WGUCRVII.js +0 -3
- package/dist/chunk-X4V2CD2H.js +0 -8
- package/dist/chunk-XOYICV6P.js +0 -1
- package/dist/chunk-XYUTD6IU.js +0 -1
- package/dist/chunk-YNFXYVYN.js +0 -2
- package/dist/chunk-Z2HN5L6G.js +0 -6
- package/dist/chunk-ZVJD6CUY.js +0 -18
- package/dist/cli/commands/app/doctor/instructions.js +0 -1
- package/dist/cli/commands/app/doctor.js +0 -1
- package/dist/cli/commands/config/autoupgrade/constants.d.ts +0 -4
- package/dist/cli/commands/config/autoupgrade/constants.js +0 -1
- package/dist/cli/services/commands/search.d.ts +0 -1
- package/dist/cli/services/commands/search.js +0 -7
- package/dist/cli/services/commands/version.d.ts +0 -1
- package/dist/cli/services/commands/version.js +0 -6
- package/dist/custom-oclif-loader-BWAMUFQ4.js +0 -1
- package/dist/deprecations-TEUM7CML.js +0 -1
- package/dist/dist-62I5X3FS.js +0 -1
- package/dist/dist-YHZ5BTYD.js +0 -1
- package/dist/environments-LAFWOQWO.js +0 -1
- package/dist/error-6ZCGAC5E.js +0 -1
- package/dist/error-handler-JNCW56EC.js +0 -1
- package/dist/fs-QEWOWUPQ.js +0 -1
- package/dist/http-proxy-node16-A6AKKRQH.js +0 -38
- package/dist/is-global-UYMEAGDR.js +0 -1
- package/dist/lib-2BR2WN7L.js +0 -1
- package/dist/lib-M72BVWQ3.js +0 -1
- package/dist/lib-P3APEIHY.js +0 -1
- package/dist/local-Z4ZEMWE4.js +0 -1
- package/dist/metadata-ZCQMB5AB.js +0 -1
- package/dist/node-package-manager-HMOTOBDS.js +0 -1
- package/dist/notifications-system-RT3CY6LZ.js +0 -1
- package/dist/os-G6KDPJMC.js +0 -1
- package/dist/output-BJCZYDNG.js +0 -1
- package/dist/system-T4H2ISV6.js +0 -1
- package/dist/ui-4MQSY5IN.js +0 -1
- package/dist/upgrade-4234MIYJ.js +0 -1
- package/dist/version-FRSRSCRX.js +0 -1
- package/dist/version-RF7QQXRX.js +0 -1
- package/dist/workerd-7E4H2DM3.js +0 -18
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
import{a as y0,b as F0}from"./chunk-LV2IWYGL.js";import{b as _0,o as T8}from"./chunk-YLQ3LNNY.js";import{a as O8}from"./chunk-VJEKDBGZ.js";import{$ as Jo,B as zo,C as v0,D as Di,E as C0,F as Td,G as w0,H as Ke,I as mi,J as Vo,K as b0,L as io,M as Go,N as Ko,O as pn,P as qc,Q as gr,R as Ie,S as gi,T as dn,U as Fs,V as A0,W as Wc,Y as S0,Z as x0,_ as Hc,aa as P0,ba as O0,ca as T0,da as I0,e as d0,ga as B0,ha as R0,ia as N0,ja as M0,la as j0,m as h0,ma as Id,n as D0,na as $0,o as m0,p as xd,q as jr,qa as L0,r as Ho,ra as zc,v as Uc,w as kc,x as E0,y as Pd,z as Od}from"./chunk-Q45XAEG2.js";import{a as g0}from"./chunk-5HONV6NQ.js";import{aa as P8}from"./chunk-IBTQO3JD.js";import{a as p0}from"./chunk-NYABB6XW.js";import{c as ys,d as wt}from"./chunk-4A7FPJVT.js";import{a as Gy,b as Ky}from"./chunk-KLYJDAP6.js";import{a as f0}from"./chunk-7ZSN2QT5.js";import{a as mr}from"./chunk-6RBCFXJT.js";import{$ as ms,D as Ly,E as Uy,G as Cd,J as ky,P as w8,Q as qy,R as b8,S as A8,T as Wy,U as S8,V as fn,W as Bc,Y as Hy,Z as Ct,aa as zy,b as v8,e as di,ea as Vy,j as By,l as Ry,o as Ny,u as My}from"./chunk-L5XWYTHY.js";import{m as Rc,n as Yy,s as Xy,t as Zy,w as Nc,x as Mc}from"./chunk-6GA56I3E.js";import{d as C8,e as jy,q as $y}from"./chunk-QAXFCAOV.js";import{a as _d}from"./chunk-RGIUP4FW.js";import{a as Bn,b as ro}from"./chunk-74HXMIDM.js";import{A as jc,B as e0,D as t0,E as Nr,F as bd,H as r0,J as _s,K as n0,M as i0,S as hi,V as $c,y as no,z as gs}from"./chunk-SKRUMRB4.js";import{a as x8}from"./chunk-5HBIIYSK.js";import{b as Ds,d as Tc,e as Ic}from"./chunk-YTJ3EPD3.js";import{f as wd}from"./chunk-G54BKNIX.js";import{i as k,k as Rn,l as Mr}from"./chunk-FCULF3JA.js";import{$ as vt,$a as Iy,A as Fd,Aa as Rr,Cb as Ae,Db as Lc,Eb as Se,Fa as Sy,Ia as pi,Ja as xy,Ka as Sc,Kb as s0,Mb as a0,Nb as ce,Oa as Py,Ob as Nn,P as fi,Pa as Oy,Qb as c0,R as Bt,Rb as l0,Sa as xc,Ta as Ty,U as F8,V as E8,X as Cy,Xa as Y,Ya as Ut,Z as ps,_a as Ve,aa as Ed,b as E,ca as vd,db as ln,ea as bc,f as d8,fb as Pc,g as h8,ha as wy,hb as Oc,ia as Wo,j as D8,la as by,m as m8,o as g8,oa as ds,q as Fy,qa as $e,r as Ey,ra as to,sa as hs,ta as Br,tb as Jy,u as _8,ua as Ac,y as vy,ya as mt,z as y8,za as Ay}from"./chunk-YJWNM4XO.js";import{b as f8,c as p8,e as _y,f as yy,i as Qy}from"./chunk-B4OMIONW.js";import{g as o0,l as Ad,m as Sd,n as u0}from"./chunk-SGBLCVUX.js";import{a as fs}from"./chunk-JD5P5RAJ.js";import{d as B,e as eo,f as ot,g as Te,h as hy,i as De,j as Pe,k as Cc,l as Dy,n as wc,o as my,s as gy,t as yd}from"./chunk-3VYOLEQE.js";import{a as ze,c as N,e as li,f as l8,g as d}from"./chunk-VKWPEFWQ.js";var cF=N((Gc,aF)=>{d();(function(e,t){typeof Gc=="object"&&typeof aF<"u"?t(Gc,(E8(),l8(F8)),v8()):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))})(Gc,(function(e,t,r){"use strict";var n=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 J=new Set,Q=[];return q.definitions.forEach(function(fe){if(fe.kind==="FragmentDefinition"){var ye=fe.name.value,We=p(fe.loc),gt=o.get(ye);gt&&!gt.has(We)?s&&console.warn("Warning: fragment with name "+ye+` 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(ye,gt=new Set),gt.add(We),J.has(We)||(J.add(We),Q.push(fe))}else Q.push(fe)}),t.__assign(t.__assign({},q),{definitions:Q})}function g(q){var J=new Set(q.definitions);J.forEach(function(fe){fe.loc&&delete fe.loc,Object.keys(fe).forEach(function(ye){var We=fe[ye];We&&typeof We=="object"&&J.add(We)})});var Q=q.loc;return Q&&(delete Q.startToken,delete Q.endToken),q}function F(q){var J=l(q);if(!n.has(J)){var Q=r.parse(q,{experimentalFragmentVariables:a,allowLegacyFragmentVariables:a,experimentalFragmentArguments:a});if(!Q||Q.kind!=="Document")throw new Error("Not a valid GraphQL document.");n.set(J,g(D(Q)))}return n.get(J)}function w(q){for(var J=[],Q=1;Q<arguments.length;Q++)J[Q-1]=arguments[Q];typeof q=="string"&&(q=[q]);var fe=q[0];return J.forEach(function(ye,We){ye&&ye.kind==="Document"?fe+=ye.loc.source.body:fe+=ye,fe+=q[We+1]}),F(fe)}function v(){n.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 fF=N((YH,lF)=>{d();lF.exports=cF().gql});var yF=N(_F=>{d();var X8=Object.create,Kc=Object.defineProperty,Z8=Object.getPrototypeOf,Q8=Object.prototype.hasOwnProperty,eB=Object.getOwnPropertyNames,tB=Object.getOwnPropertyDescriptor,dF=e=>Kc(e,"__esModule",{value:!0}),rB=(e,t)=>{dF(e);for(var r in t)Kc(e,r,{get:t[r],enumerable:!0})},nB=(e,t,r)=>{if(dF(e),t&&typeof t=="object"||typeof t=="function")for(let n of eB(t))!Q8.call(e,n)&&n!=="default"&&Kc(e,n,{get:()=>t[n],enumerable:!(r=tB(t,n))||r.enumerable});return e},Jc=e=>e&&e.__esModule?e:nB(Kc(e!=null?X8(Z8(e)):{},"default",{value:e,enumerable:!0}),e);rB(_F,{default:()=>pB,generateContentsFromGraphqlString:()=>gF,generateGraphQLString:()=>DF});var iB=Jc(ze("fs")),oB=Jc(fF()),uB=Jc(ze("readline")),pF=Jc(ze("path")),hF=(e,t)=>{let r=t?t(e):e;return JSON.stringify(r,(n,o)=>o===void 0?"__undefined":o).replace(/"__undefined"/g,"undefined")},sB=(e,t)=>{let r=new Set,n=[],o=s=>{r.has(s)||(r.add(s),s.imports.forEach(a=>{let l=t[a.absolutePath];o(l)}),n.unshift(s))};return e.forEach(o),n},aB=e=>new Promise(t=>{let r=uB.default.createInterface({input:iB.default.createReadStream(e)}),n="",o=[],s=!1,a=(l,p)=>{let D=p.replace(l,""),g=D.replace(/"|'/g,""),F=pF.default.join(pF.default.dirname(e),g);o.push({absolutePath:F,relativePath:D})};r.on("line",l=>{l.startsWith("#import ")?a("#import ",l):l.startsWith("# import ")?a("# import ",l):s?n+=l+`
|
|
4
|
+
`:l[0]!=="#"&&l!==""&&(s=!0,n+=l+`
|
|
5
|
+
`)}),r.on("close",()=>{t({body:n.trim(),filePath:e,imports:o})})}),DF=e=>{let t={},r=[],n=new Set,o=s=>t[s]?Promise.resolve(null):new Promise(a=>{aB(s).then(l=>{t[l.filePath]=l,l.imports.forEach(D=>{n.has(D.absolutePath)||(n.add(D.absolutePath),r.push(o(D.absolutePath)))});let p=r.shift();return p?p.then(a):a(null)})});return o(e).then(()=>sB(Object.values(t),t).reduce((l,p)=>p.body+`
|
|
6
|
+
|
|
7
|
+
`+l,""))},cB=(e,t,r)=>{let n={kind:"Document",definitions:[e,...t]};return hF(n,r)},lB=e=>((r,n)=>(r.forEach(o=>{o.kind==="FragmentDefinition"&&(n[o.name.value]=o)}),n))(e.definitions,{}),mF=(e,t)=>{let r=[],n=o=>{if(o.kind==="FragmentSpread"){let s=t[o.name.value],a=mF(s,t);r.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(n))}):e.selectionSet.selections.forEach(n),r},gF=(e,t)=>{let r=oB.default(e),n=hF(r,t),o=lB(r),s=r.definitions.reduce((a,l)=>{if(l.kind==="OperationDefinition"&&l.name&&l.name.value){let p=l.name.value,g=mF(l,o).map(w=>{let v=o[w];if(!v)throw new Error(`Expected to find fragment definition for ${w}`);return v}),F=cB(l,g,t);a.push(`export const ${p} = ${F};`)}return a},[`const documentNode = ${n};`]);return s.push("export default documentNode;"),s.join(`
|
|
8
|
+
`)},fB=(e={})=>({name:"graphql-loader",setup(t){t.onLoad({filter:e.filterRegex||/\.graphql$|\.gql$/},r=>DF(r.path).then(n=>({contents:gF(n,e.mapDocumentNode)})))}}),pB=fB});var wF=N((_z,CF)=>{d();function _r(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))}CF.exports=_r;_r.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts};_r.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timeouts=[],this._cachedTimeouts=null};_r.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 r=this._timeouts.shift();if(r===void 0)if(this._cachedTimeouts)this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),r=this._timeouts.shift();else return!1;var n=this,o=setTimeout(function(){n._attempts++,n._operationTimeoutCb&&(n._timeout=setTimeout(function(){n._operationTimeoutCb(n._attempts)},n._operationTimeout),n._options.unref&&n._timeout.unref()),n._fn(n._attempts)},r);return this._options.unref&&o.unref(),!0};_r.prototype.attempt=function(e,t){this._fn=e,t&&(t.timeout&&(this._operationTimeout=t.timeout),t.cb&&(this._operationTimeoutCb=t.cb));var r=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){r._operationTimeoutCb()},r._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)};_r.prototype.try=function(e){console.log("Using RetryOperation.try() is deprecated"),this.attempt(e)};_r.prototype.start=function(e){console.log("Using RetryOperation.start() is deprecated"),this.attempt(e)};_r.prototype.start=_r.prototype.try;_r.prototype.errors=function(){return this._errors};_r.prototype.attempts=function(){return this._attempts};_r.prototype.mainError=function(){if(this._errors.length===0)return null;for(var e={},t=null,r=0,n=0;n<this._errors.length;n++){var o=this._errors[n],s=o.message,a=(e[s]||0)+1;e[s]=a,a>=r&&(t=o,r=a)}return t}});var bF=N(uo=>{d();var FB=wF();uo.operation=function(e){var t=uo.timeouts(e);return new FB(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 r in e)t[r]=e[r];if(t.minTimeout>t.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var n=[],o=0;o<t.retries;o++)n.push(this.createTimeout(o,t));return e&&e.forever&&!n.length&&n.push(this.createTimeout(o,t)),n.sort(function(s,a){return s-a}),n};uo.createTimeout=function(e,t){var r=t.randomize?Math.random()+1:1,n=Math.round(r*t.minTimeout*Math.pow(t.factor,e));return n=Math.min(n,t.maxTimeout),n};uo.wrap=function(e,t,r){if(t instanceof Array&&(r=t,t=null),!r){r=[];for(var n in e)typeof e[n]=="function"&&r.push(n)}for(var o=0;o<r.length;o++){var s=r[o],a=e[s];e[s]=function(p){var D=uo.operation(t),g=Array.prototype.slice.call(arguments,1),F=g.pop();g.push(function(w){D.retry(w)||(w&&(arguments[0]=D.mainError()),F.apply(this,arguments))}),D.attempt(function(){p.apply(e,g)})}.bind(e,a),e[s].options=t}}});var SF=N((vz,AF)=>{d();AF.exports=bF()});var PF=N((wz,Wd)=>{"use strict";d();var xF=Symbol();function EB(e,t,r){let n=t[xF];if(n)return t.stat(e,(s,a)=>{if(s)return r(s);r(null,a.mtime,n)});let o=new Date(Math.ceil(Date.now()/1e3)*1e3+5);t.utimes(e,o,o,s=>{if(s)return r(s);t.stat(e,(a,l)=>{if(a)return r(a);let p=l.mtime.getTime()%1e3===0?"s":"ms";Object.defineProperty(t,xF,{value:p}),r(null,l.mtime,p)})})}function vB(e){let t=Date.now();return e==="s"&&(t=Math.ceil(t/1e3)*1e3),new Date(t)}Wd.exports.probe=EB;Wd.exports.getMtime=vB});var RF=N((Az,Ss)=>{"use strict";d();var CB=ze("path"),Vd=by(),wB=SF(),bB=x8(),OF=PF(),Mn={};function As(e,t){return t.lockfilePath||`${e}.lock`}function Gd(e,t,r){if(!t.realpath)return r(null,CB.resolve(e));t.fs.realpath(e,r)}function zd(e,t,r){let n=As(e,t);t.fs.mkdir(n,o=>{if(!o)return OF.probe(n,t.fs,(s,a,l)=>{if(s)return t.fs.rmdir(n,()=>{}),r(s);r(null,a,l)});if(o.code!=="EEXIST")return r(o);if(t.stale<=0)return r(Object.assign(new Error("Lock file is already being held"),{code:"ELOCKED",file:e}));t.fs.stat(n,(s,a)=>{if(s)return s.code==="ENOENT"?zd(e,{...t,stale:0},r):r(s);if(!TF(a,t))return r(Object.assign(new Error("Lock file is already being held"),{code:"ELOCKED",file:e}));IF(e,t,l=>{if(l)return r(l);zd(e,{...t,stale:0},r)})})})}function TF(e,t){return e.mtime.getTime()<Date.now()-t.stale}function IF(e,t,r){t.fs.rmdir(As(e,t),n=>{if(n&&n.code!=="ENOENT")return r(n);r()})}function Xc(e,t){let r=Mn[e];r.updateTimeout||(r.updateDelay=r.updateDelay||t.update,r.updateTimeout=setTimeout(()=>{r.updateTimeout=null,t.fs.stat(r.lockfilePath,(n,o)=>{let s=r.lastUpdate+t.stale<Date.now();if(n)return n.code==="ENOENT"||s?Hd(e,r,Object.assign(n,{code:"ECOMPROMISED"})):(r.updateDelay=1e3,Xc(e,t));if(!(r.mtime.getTime()===o.mtime.getTime()))return Hd(e,r,Object.assign(new Error("Unable to update lock within the stale threshold"),{code:"ECOMPROMISED"}));let l=OF.getMtime(r.mtimePrecision);t.fs.utimes(r.lockfilePath,l,l,p=>{let D=r.lastUpdate+t.stale<Date.now();if(!r.released){if(p)return p.code==="ENOENT"||D?Hd(e,r,Object.assign(p,{code:"ECOMPROMISED"})):(r.updateDelay=1e3,Xc(e,t));r.mtime=l,r.lastUpdate=Date.now(),r.updateDelay=null,Xc(e,t)}})})},r.updateDelay),r.updateTimeout.unref&&r.updateTimeout.unref())}function Hd(e,t,r){t.released=!0,t.updateTimeout&&clearTimeout(t.updateTimeout),Mn[e]===t&&delete Mn[e],t.options.onCompromised(r)}function AB(e,t,r){t={stale:1e4,update:null,realpath:!0,retries:0,fs:Vd,onCompromised:n=>{throw n},...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),Gd(e,t,(n,o)=>{if(n)return r(n);let s=wB.operation(t.retries);s.attempt(()=>{zd(o,t,(a,l,p)=>{if(s.retry(a))return;if(a)return r(s.mainError());let D=Mn[o]={lockfilePath:As(o,t),mtime:l,mtimePrecision:p,options:t,lastUpdate:Date.now()};Xc(o,t),r(null,g=>{if(D.released)return g&&g(Object.assign(new Error("Lock is already released"),{code:"ERELEASED"}));BF(o,{...t,realpath:!1},g)})})})})}function BF(e,t,r){t={fs:Vd,realpath:!0,...t},Gd(e,t,(n,o)=>{if(n)return r(n);let s=Mn[o];if(!s)return r(Object.assign(new Error("Lock is not acquired/owned by you"),{code:"ENOTACQUIRED"}));s.updateTimeout&&clearTimeout(s.updateTimeout),s.released=!0,delete Mn[o],IF(o,t,r)})}function SB(e,t,r){t={stale:1e4,realpath:!0,fs:Vd,...t},t.stale=Math.max(t.stale||0,2e3),Gd(e,t,(n,o)=>{if(n)return r(n);t.fs.stat(As(o,t),(s,a)=>s?s.code==="ENOENT"?r(null,!1):r(s):r(null,!TF(a,t)))})}function xB(){return Mn}bB(()=>{for(let e in Mn){let t=Mn[e].options;try{t.fs.rmdirSync(As(e,t))}catch{}}});Ss.exports.lock=AB;Ss.exports.unlock=BF;Ss.exports.check=SB;Ss.exports.getLocks=xB});var MF=N((xz,NF)=>{"use strict";d();var PB=by();function OB(e){let t=["mkdir","realpath","stat","rmdir","utimes"],r={...e};return t.forEach(n=>{r[n]=(...o)=>{let s=o.pop(),a;try{a=e[`${n}Sync`](...o)}catch(l){return s(l)}s(null,a)}}),r}function TB(e){return(...t)=>new Promise((r,n)=>{t.push((o,s)=>{o?n(o):r(s)}),e(...t)})}function IB(e){return(...t)=>{let r,n;if(t.push((o,s)=>{r=o,n=s}),e(...t),r)throw r;return n}}function BB(e){if(e={...e},e.fs=OB(e.fs||PB),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}NF.exports={toPromise:TB,toSync:IB,toSyncOptions:BB}});var $F=N((Oz,_i)=>{"use strict";d();var Yo=RF(),{toPromise:Zc,toSync:Qc,toSyncOptions:Kd}=MF();async function jF(e,t){let r=await Zc(Yo.lock)(e,t);return Zc(r)}function RB(e,t){let r=Qc(Yo.lock)(e,Kd(t));return Qc(r)}function NB(e,t){return Zc(Yo.unlock)(e,t)}function MB(e,t){return Qc(Yo.unlock)(e,Kd(t))}function jB(e,t){return Zc(Yo.check)(e,t)}function $B(e,t){return Qc(Yo.check)(e,Kd(t))}_i.exports=jF;_i.exports.lock=jF;_i.exports.unlock=NB;_i.exports.lockSync=RB;_i.exports.unlockSync=MB;_i.exports.check=jB;_i.exports.checkSync=$B});var $n=N((iu,js)=>{d();(function(){var e,t="4.17.23",r=200,n="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,F=4,w=1,v=2,S=1,O=2,P=4,I=8,U=16,q=32,J=64,Q=128,fe=256,ye=512,We=30,gt="...",tn=800,dt=16,Sr=1,or=2,Fa=3,Fn=1/0,rn=9007199254740991,En=17976931348623157e292,bo=NaN,ur=4294967295,Nf=ur-1,Jn=ur>>>1,Ea=[["ary",Q],["bind",S],["bindKey",O],["curry",I],["curryRight",U],["flip",ye],["partial",q],["partialRight",J],["rearg",fe]],Yn="[object Arguments]",Xn="[object Array]",Ao="[object AsyncFunction]",vn="[object Boolean]",Ri="[object Date]",Mf="[object DOMException]",Ni="[object Error]",So="[object Function]",va="[object GeneratorFunction]",zt="[object Map]",Zn="[object Number]",Mi="[object Null]",xr="[object Object]",Ca="[object Promise]",jf="[object Proxy]",ji="[object RegExp]",Vt="[object Set]",$i="[object String]",xt="[object Symbol]",wa="[object Undefined]",Li="[object WeakMap]",$f="[object WeakSet]",nn="[object ArrayBuffer]",Gt="[object DataView]",Bu="[object Float32Array]",Ru="[object Float64Array]",Nu="[object Int8Array]",Mu="[object Int16Array]",Ui="[object Int32Array]",ju="[object Uint8Array]",$u="[object Uint8ClampedArray]",xo="[object Uint16Array]",Lu="[object Uint32Array]",Lf=/\b__p \+= '';/g,Uf=/\b(__p \+=) '' \+/g,ba=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Aa=/&(?:amp|lt|gt|quot|#39);/g,Sa=/[&<>"']/g,kf=RegExp(Aa.source),Uu=RegExp(Sa.source),qf=/<%-([\s\S]+?)%>/g,xa=/<%([\s\S]+?)%>/g,ku=/<%=([\s\S]+?)%>/g,Wf=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Hf=/^\w*$/,zf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,qu=/[\\^$.*+?()[\]{}|]/g,Vf=RegExp(qu.source),Wu=/^\s+/,Gf=/\s/,Kf=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Jf=/\{\n\/\* \[wrapped with (.+)\] \*/,Yf=/,? & /,Xf=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Zf=/[()=,{}\[\]\/\s]/,Qf=/\\(\\)?/g,ep=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Pa=/\w*$/,tp=/^[-+]0x[0-9a-f]+$/i,rp=/^0b[01]+$/i,np=/^\[object .+?Constructor\]$/,ip=/^0o[0-7]+$/i,op=/^(?:0|[1-9]\d*)$/,Oa=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ki=/($^)/,Ta=/['\n\r\u2028\u2029\\]/g,qi="\\ud800-\\udfff",Ia="\\u0300-\\u036f",up="\\ufe20-\\ufe2f",sp="\\u20d0-\\u20ff",Hu=Ia+up+sp,zu="\\u2700-\\u27bf",Ba="a-z\\xdf-\\xf6\\xf8-\\xff",ap="\\xac\\xb1\\xd7\\xf7",cp="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Ra="\\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",Kt="A-Z\\xc0-\\xd6\\xd8-\\xde",Po="\\ufe0e\\ufe0f",Wi=ap+cp+Ra+_t,Vu="['\u2019]",lp="["+qi+"]",Na="["+Wi+"]",Oo="["+Hu+"]",h="\\d+",R="["+zu+"]",W="["+Ba+"]",z="[^"+qi+Wi+h+zu+Ba+Kt+"]",ie="\\ud83c[\\udffb-\\udfff]",G="(?:"+Oo+"|"+ie+")",X="[^"+qi+"]",ge="(?:\\ud83c[\\udde6-\\uddff]){2}",ke="[\\ud800-\\udbff][\\udc00-\\udfff]",Ce="["+Kt+"]",rt="\\u200d",Be="(?:"+W+"|"+z+")",on="(?:"+Ce+"|"+z+")",st="(?:"+Vu+"(?:d|ll|m|re|s|t|ve))?",Ne="(?:"+Vu+"(?:D|LL|M|RE|S|T|VE))?",Pt=G+"?",Gu="["+Po+"]?",Ma="(?:"+rt+"(?:"+[X,ge,ke].join("|")+")"+Gu+Pt+")*",Fe="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ht="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",ne=Gu+Pt+Ma,at="(?:"+[R,ge,ke].join("|")+")"+ne,yt="(?:"+[X+Oo+"?",Oo,ge,ke,lp].join("|")+")",Cn=RegExp(Vu,"g"),Qn=RegExp(Oo,"g"),sr=RegExp(ie+"(?="+ie+")|"+yt+ne,"g"),Hi=RegExp([Ce+"?"+W+"+"+st+"(?="+[Na,Ce,"$"].join("|")+")",on+"+"+Ne+"(?="+[Na,Ce+Be,"$"].join("|")+")",Ce+"?"+Be+"+"+st,Ce+"+"+Ne,ht,Fe,h,at].join("|"),"g"),un=RegExp("["+rt+qi+Hu+Po+"]"),Ku=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ju=["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"],ja=-1,xe={};xe[Bu]=xe[Ru]=xe[Nu]=xe[Mu]=xe[Ui]=xe[ju]=xe[$u]=xe[xo]=xe[Lu]=!0,xe[Yn]=xe[Xn]=xe[nn]=xe[vn]=xe[Gt]=xe[Ri]=xe[Ni]=xe[So]=xe[zt]=xe[Zn]=xe[xr]=xe[ji]=xe[Vt]=xe[$i]=xe[Li]=!1;var Oe={};Oe[Yn]=Oe[Xn]=Oe[nn]=Oe[Gt]=Oe[vn]=Oe[Ri]=Oe[Bu]=Oe[Ru]=Oe[Nu]=Oe[Mu]=Oe[Ui]=Oe[zt]=Oe[Zn]=Oe[xr]=Oe[ji]=Oe[Vt]=Oe[$i]=Oe[xt]=Oe[ju]=Oe[$u]=Oe[xo]=Oe[Lu]=!0,Oe[Ni]=Oe[So]=Oe[Li]=!1;var fp={\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"},ug={"&":"&","<":"<",">":">",'"':""","'":"'"},pp={"&":"&","<":"<",">":">",""":'"',"'":"'"},PS={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},OS=parseFloat,TS=parseInt,sg=typeof global=="object"&&global&&global.Object===Object&&global,IS=typeof self=="object"&&self&&self.Object===Object&&self,ct=sg||IS||Function("return this")(),dp=typeof iu=="object"&&iu&&!iu.nodeType&&iu,zi=dp&&typeof js=="object"&&js&&!js.nodeType&&js,ag=zi&&zi.exports===dp,hp=ag&&sg.process,ar=(function(){try{var A=zi&&zi.require&&zi.require("util").types;return A||hp&&hp.binding&&hp.binding("util")}catch{}})(),cg=ar&&ar.isArrayBuffer,lg=ar&&ar.isDate,fg=ar&&ar.isMap,pg=ar&&ar.isRegExp,dg=ar&&ar.isSet,hg=ar&&ar.isTypedArray;function Jt(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 BS(A,M,T,V){for(var se=-1,ve=A==null?0:A.length;++se<ve;){var nt=A[se];M(V,nt,T(nt),A)}return V}function cr(A,M){for(var T=-1,V=A==null?0:A.length;++T<V&&M(A[T],T,A)!==!1;);return A}function RS(A,M){for(var T=A==null?0:A.length;T--&&M(A[T],T,A)!==!1;);return A}function Dg(A,M){for(var T=-1,V=A==null?0:A.length;++T<V;)if(!M(A[T],T,A))return!1;return!0}function ei(A,M){for(var T=-1,V=A==null?0:A.length,se=0,ve=[];++T<V;){var nt=A[T];M(nt,T,A)&&(ve[se++]=nt)}return ve}function $a(A,M){var T=A==null?0:A.length;return!!T&&To(A,M,0)>-1}function Dp(A,M,T){for(var V=-1,se=A==null?0:A.length;++V<se;)if(T(M,A[V]))return!0;return!1}function qe(A,M){for(var T=-1,V=A==null?0:A.length,se=Array(V);++T<V;)se[T]=M(A[T],T,A);return se}function ti(A,M){for(var T=-1,V=M.length,se=A.length;++T<V;)A[se+T]=M[T];return A}function mp(A,M,T,V){var se=-1,ve=A==null?0:A.length;for(V&&ve&&(T=A[++se]);++se<ve;)T=M(T,A[se],se,A);return T}function NS(A,M,T,V){var se=A==null?0:A.length;for(V&&se&&(T=A[--se]);se--;)T=M(T,A[se],se,A);return T}function gp(A,M){for(var T=-1,V=A==null?0:A.length;++T<V;)if(M(A[T],T,A))return!0;return!1}var MS=_p("length");function jS(A){return A.split("")}function $S(A){return A.match(Xf)||[]}function mg(A,M,T){var V;return T(A,function(se,ve,nt){if(M(se,ve,nt))return V=ve,!1}),V}function La(A,M,T,V){for(var se=A.length,ve=T+(V?1:-1);V?ve--:++ve<se;)if(M(A[ve],ve,A))return ve;return-1}function To(A,M,T){return M===M?YS(A,M,T):La(A,gg,T)}function LS(A,M,T,V){for(var se=T-1,ve=A.length;++se<ve;)if(V(A[se],M))return se;return-1}function gg(A){return A!==A}function _g(A,M){var T=A==null?0:A.length;return T?Fp(A,M)/T:bo}function _p(A){return function(M){return M==null?e:M[A]}}function yp(A){return function(M){return A==null?e:A[M]}}function yg(A,M,T,V,se){return se(A,function(ve,nt,Re){T=V?(V=!1,ve):M(T,ve,nt,Re)}),T}function US(A,M){var T=A.length;for(A.sort(M);T--;)A[T]=A[T].value;return A}function Fp(A,M){for(var T,V=-1,se=A.length;++V<se;){var ve=M(A[V]);ve!==e&&(T=T===e?ve:T+ve)}return T}function Ep(A,M){for(var T=-1,V=Array(A);++T<A;)V[T]=M(T);return V}function kS(A,M){return qe(M,function(T){return[T,A[T]]})}function Fg(A){return A&&A.slice(0,wg(A)+1).replace(Wu,"")}function Yt(A){return function(M){return A(M)}}function vp(A,M){return qe(M,function(T){return A[T]})}function Yu(A,M){return A.has(M)}function Eg(A,M){for(var T=-1,V=A.length;++T<V&&To(M,A[T],0)>-1;);return T}function vg(A,M){for(var T=A.length;T--&&To(M,A[T],0)>-1;);return T}function qS(A,M){for(var T=A.length,V=0;T--;)A[T]===M&&++V;return V}var WS=yp(fp),HS=yp(ug);function zS(A){return"\\"+PS[A]}function VS(A,M){return A==null?e:A[M]}function Io(A){return un.test(A)}function GS(A){return Ku.test(A)}function KS(A){for(var M,T=[];!(M=A.next()).done;)T.push(M.value);return T}function Cp(A){var M=-1,T=Array(A.size);return A.forEach(function(V,se){T[++M]=[se,V]}),T}function Cg(A,M){return function(T){return A(M(T))}}function ri(A,M){for(var T=-1,V=A.length,se=0,ve=[];++T<V;){var nt=A[T];(nt===M||nt===p)&&(A[T]=p,ve[se++]=T)}return ve}function Ua(A){var M=-1,T=Array(A.size);return A.forEach(function(V){T[++M]=V}),T}function JS(A){var M=-1,T=Array(A.size);return A.forEach(function(V){T[++M]=[V,V]}),T}function YS(A,M,T){for(var V=T-1,se=A.length;++V<se;)if(A[V]===M)return V;return-1}function XS(A,M,T){for(var V=T+1;V--;)if(A[V]===M)return V;return V}function Bo(A){return Io(A)?QS(A):MS(A)}function Pr(A){return Io(A)?ex(A):jS(A)}function wg(A){for(var M=A.length;M--&&Gf.test(A.charAt(M)););return M}var ZS=yp(pp);function QS(A){for(var M=sr.lastIndex=0;sr.test(A);)++M;return M}function ex(A){return A.match(sr)||[]}function tx(A){return A.match(Hi)||[]}var rx=(function A(M){M=M==null?ct:ni.defaults(ct.Object(),M,ni.pick(ct,Ju));var T=M.Array,V=M.Date,se=M.Error,ve=M.Function,nt=M.Math,Re=M.Object,wp=M.RegExp,nx=M.String,lr=M.TypeError,ka=T.prototype,ix=ve.prototype,Ro=Re.prototype,qa=M["__core-js_shared__"],Wa=ix.toString,we=Ro.hasOwnProperty,ox=0,bg=(function(){var i=/[^.]+$/.exec(qa&&qa.keys&&qa.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""})(),Ha=Ro.toString,ux=Wa.call(Re),sx=ct._,ax=wp("^"+Wa.call(we).replace(qu,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),za=ag?M.Buffer:e,ii=M.Symbol,Va=M.Uint8Array,Ag=za?za.allocUnsafe:e,Ga=Cg(Re.getPrototypeOf,Re),Sg=Re.create,xg=Ro.propertyIsEnumerable,Ka=ka.splice,Pg=ii?ii.isConcatSpreadable:e,Xu=ii?ii.iterator:e,Vi=ii?ii.toStringTag:e,Ja=(function(){try{var i=Xi(Re,"defineProperty");return i({},"",{}),i}catch{}})(),cx=M.clearTimeout!==ct.clearTimeout&&M.clearTimeout,lx=V&&V.now!==ct.Date.now&&V.now,fx=M.setTimeout!==ct.setTimeout&&M.setTimeout,Ya=nt.ceil,Xa=nt.floor,bp=Re.getOwnPropertySymbols,px=za?za.isBuffer:e,Og=M.isFinite,dx=ka.join,hx=Cg(Re.keys,Re),it=nt.max,Ft=nt.min,Dx=V.now,mx=M.parseInt,Tg=nt.random,gx=ka.reverse,Ap=Xi(M,"DataView"),Zu=Xi(M,"Map"),Sp=Xi(M,"Promise"),No=Xi(M,"Set"),Qu=Xi(M,"WeakMap"),es=Xi(Re,"create"),Za=Qu&&new Qu,Mo={},_x=Zi(Ap),yx=Zi(Zu),Fx=Zi(Sp),Ex=Zi(No),vx=Zi(Qu),Qa=ii?ii.prototype:e,ts=Qa?Qa.valueOf:e,Ig=Qa?Qa.toString:e;function _(i){if(Ge(i)&&!ae(i)&&!(i instanceof me)){if(i instanceof fr)return i;if(we.call(i,"__wrapped__"))return B_(i)}return new fr(i)}var jo=(function(){function i(){}return function(u){if(!He(u))return{};if(Sg)return Sg(u);i.prototype=u;var c=new i;return i.prototype=e,c}})();function ec(){}function fr(i,u){this.__wrapped__=i,this.__actions__=[],this.__chain__=!!u,this.__index__=0,this.__values__=e}_.templateSettings={escape:qf,evaluate:xa,interpolate:ku,variable:"",imports:{_}},_.prototype=ec.prototype,_.prototype.constructor=_,fr.prototype=jo(ec.prototype),fr.prototype.constructor=fr;function me(i){this.__wrapped__=i,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ur,this.__views__=[]}function Cx(){var i=new me(this.__wrapped__);return i.__actions__=Mt(this.__actions__),i.__dir__=this.__dir__,i.__filtered__=this.__filtered__,i.__iteratees__=Mt(this.__iteratees__),i.__takeCount__=this.__takeCount__,i.__views__=Mt(this.__views__),i}function wx(){if(this.__filtered__){var i=new me(this);i.__dir__=-1,i.__filtered__=!0}else i=this.clone(),i.__dir__*=-1;return i}function bx(){var i=this.__wrapped__.value(),u=this.__dir__,c=ae(i),f=u<0,m=c?i.length:0,y=jP(0,m,this.__views__),C=y.start,b=y.end,x=b-C,j=f?b:C-1,$=this.__iteratees__,L=$.length,H=0,K=Ft(x,this.__takeCount__);if(!c||!f&&m==x&&K==x)return r_(i,this.__actions__);var te=[];e:for(;x--&&H<K;){j+=u;for(var pe=-1,re=i[j];++pe<L;){var he=$[pe],_e=he.iteratee,Qt=he.type,It=_e(re);if(Qt==or)re=It;else if(!It){if(Qt==Sr)continue e;break e}}te[H++]=re}return te}me.prototype=jo(ec.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 Ax(){this.__data__=es?es(null):{},this.size=0}function Sx(i){var u=this.has(i)&&delete this.__data__[i];return this.size-=u?1:0,u}function xx(i){var u=this.__data__;if(es){var c=u[i];return c===a?e:c}return we.call(u,i)?u[i]:e}function Px(i){var u=this.__data__;return es?u[i]!==e:we.call(u,i)}function Ox(i,u){var c=this.__data__;return this.size+=this.has(i)?0:1,c[i]=es&&u===e?a:u,this}Gi.prototype.clear=Ax,Gi.prototype.delete=Sx,Gi.prototype.get=xx,Gi.prototype.has=Px,Gi.prototype.set=Ox;function wn(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 Tx(){this.__data__=[],this.size=0}function Ix(i){var u=this.__data__,c=tc(u,i);if(c<0)return!1;var f=u.length-1;return c==f?u.pop():Ka.call(u,c,1),--this.size,!0}function Bx(i){var u=this.__data__,c=tc(u,i);return c<0?e:u[c][1]}function Rx(i){return tc(this.__data__,i)>-1}function Nx(i,u){var c=this.__data__,f=tc(c,i);return f<0?(++this.size,c.push([i,u])):c[f][1]=u,this}wn.prototype.clear=Tx,wn.prototype.delete=Ix,wn.prototype.get=Bx,wn.prototype.has=Rx,wn.prototype.set=Nx;function bn(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 Mx(){this.size=0,this.__data__={hash:new Gi,map:new(Zu||wn),string:new Gi}}function jx(i){var u=dc(this,i).delete(i);return this.size-=u?1:0,u}function $x(i){return dc(this,i).get(i)}function Lx(i){return dc(this,i).has(i)}function Ux(i,u){var c=dc(this,i),f=c.size;return c.set(i,u),this.size+=c.size==f?0:1,this}bn.prototype.clear=Mx,bn.prototype.delete=jx,bn.prototype.get=$x,bn.prototype.has=Lx,bn.prototype.set=Ux;function Ki(i){var u=-1,c=i==null?0:i.length;for(this.__data__=new bn;++u<c;)this.add(i[u])}function kx(i){return this.__data__.set(i,a),this}function qx(i){return this.__data__.has(i)}Ki.prototype.add=Ki.prototype.push=kx,Ki.prototype.has=qx;function Or(i){var u=this.__data__=new wn(i);this.size=u.size}function Wx(){this.__data__=new wn,this.size=0}function Hx(i){var u=this.__data__,c=u.delete(i);return this.size=u.size,c}function zx(i){return this.__data__.get(i)}function Vx(i){return this.__data__.has(i)}function Gx(i,u){var c=this.__data__;if(c instanceof wn){var f=c.__data__;if(!Zu||f.length<r-1)return f.push([i,u]),this.size=++c.size,this;c=this.__data__=new bn(f)}return c.set(i,u),this.size=c.size,this}Or.prototype.clear=Wx,Or.prototype.delete=Hx,Or.prototype.get=zx,Or.prototype.has=Vx,Or.prototype.set=Gx;function Bg(i,u){var c=ae(i),f=!c&&Qi(i),m=!c&&!f&&ci(i),y=!c&&!f&&!m&&ko(i),C=c||f||m||y,b=C?Ep(i.length,nx):[],x=b.length;for(var j in i)(u||we.call(i,j))&&!(C&&(j=="length"||m&&(j=="offset"||j=="parent")||y&&(j=="buffer"||j=="byteLength"||j=="byteOffset")||Pn(j,x)))&&b.push(j);return b}function Rg(i){var u=i.length;return u?i[$p(0,u-1)]:e}function Kx(i,u){return hc(Mt(i),Ji(u,0,i.length))}function Jx(i){return hc(Mt(i))}function xp(i,u,c){(c!==e&&!Tr(i[u],c)||c===e&&!(u in i))&&An(i,u,c)}function rs(i,u,c){var f=i[u];(!(we.call(i,u)&&Tr(f,c))||c===e&&!(u in i))&&An(i,u,c)}function tc(i,u){for(var c=i.length;c--;)if(Tr(i[c][0],u))return c;return-1}function Yx(i,u,c,f){return oi(i,function(m,y,C){u(f,m,c(m),C)}),f}function Ng(i,u){return i&&an(u,lt(u),i)}function Xx(i,u){return i&&an(u,$t(u),i)}function An(i,u,c){u=="__proto__"&&Ja?Ja(i,u,{configurable:!0,enumerable:!0,value:c,writable:!0}):i[u]=c}function Pp(i,u){for(var c=-1,f=u.length,m=T(f),y=i==null;++c<f;)m[c]=y?e:cd(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 pr(i,u,c,f,m,y){var C,b=u&D,x=u&g,j=u&F;if(c&&(C=m?c(i,f,m,y):c(i)),C!==e)return C;if(!He(i))return i;var $=ae(i);if($){if(C=LP(i),!b)return Mt(i,C)}else{var L=Et(i),H=L==So||L==va;if(ci(i))return o_(i,b);if(L==xr||L==Yn||H&&!m){if(C=x||H?{}:w_(i),!b)return x?xP(i,Xx(C,i)):SP(i,Ng(C,i))}else{if(!Oe[L])return m?i:{};C=UP(i,L,b)}}y||(y=new Or);var K=y.get(i);if(K)return K;y.set(i,C),Q_(i)?i.forEach(function(re){C.add(pr(re,u,c,re,i,y))}):X_(i)&&i.forEach(function(re,he){C.set(he,pr(re,u,c,he,i,y))});var te=j?x?Jp:Kp:x?$t:lt,pe=$?e:te(i);return cr(pe||i,function(re,he){pe&&(he=re,re=i[he]),rs(C,he,pr(re,u,c,he,i,y))}),C}function Zx(i){var u=lt(i);return function(c){return Mg(c,i,u)}}function Mg(i,u,c){var f=c.length;if(i==null)return!f;for(i=Re(i);f--;){var m=c[f],y=u[m],C=i[m];if(C===e&&!(m in i)||!y(C))return!1}return!0}function jg(i,u,c){if(typeof i!="function")throw new lr(o);return cs(function(){i.apply(e,c)},u)}function ns(i,u,c,f){var m=-1,y=$a,C=!0,b=i.length,x=[],j=u.length;if(!b)return x;c&&(u=qe(u,Yt(c))),f?(y=Dp,C=!1):u.length>=r&&(y=Yu,C=!1,u=new Ki(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 y(u,L,f)||x.push($)}return x}var oi=l_(sn),$g=l_(Tp,!0);function Qx(i,u){var c=!0;return oi(i,function(f,m,y){return c=!!u(f,m,y),c}),c}function rc(i,u,c){for(var f=-1,m=i.length;++f<m;){var y=i[f],C=u(y);if(C!=null&&(b===e?C===C&&!Zt(C):c(C,b)))var b=C,x=y}return x}function eP(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:ty(f);c<f;)i[c++]=u;return i}function Lg(i,u){var c=[];return oi(i,function(f,m,y){u(f,m,y)&&c.push(f)}),c}function Dt(i,u,c,f,m){var y=-1,C=i.length;for(c||(c=qP),m||(m=[]);++y<C;){var b=i[y];u>0&&c(b)?u>1?Dt(b,u-1,c,f,m):ti(m,b):f||(m[m.length]=b)}return m}var Op=f_(),Ug=f_(!0);function sn(i,u){return i&&Op(i,u,lt)}function Tp(i,u){return i&&Ug(i,u,lt)}function nc(i,u){return ei(u,function(c){return On(i[c])})}function Yi(i,u){u=si(u,i);for(var c=0,f=u.length;i!=null&&c<f;)i=i[cn(u[c++])];return c&&c==f?i:e}function kg(i,u,c){var f=u(i);return ae(i)?f:ti(f,c(i))}function Ot(i){return i==null?i===e?wa:Mi:Vi&&Vi in Re(i)?MP(i):JP(i)}function Ip(i,u){return i>u}function tP(i,u){return i!=null&&we.call(i,u)}function rP(i,u){return i!=null&&u in Re(i)}function nP(i,u,c){return i>=Ft(u,c)&&i<it(u,c)}function Bp(i,u,c){for(var f=c?Dp:$a,m=i[0].length,y=i.length,C=y,b=T(y),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 Ki(C&&$):e}$=i[0];var L=-1,H=b[0];e:for(;++L<m&&j.length<x;){var K=$[L],te=u?u(K):K;if(K=c||K!==0?K:0,!(H?Yu(H,te):f(j,te,c))){for(C=y;--C;){var pe=b[C];if(!(pe?Yu(pe,te):f(i[C],te,c)))continue e}H&&H.push(te),j.push(K)}}return j}function iP(i,u,c,f){return sn(i,function(m,y,C){u(f,c(m),y,C)}),f}function is(i,u,c){u=si(u,i),i=x_(i,u);var f=i==null?i:i[cn(hr(u))];return f==null?e:Jt(f,i,c)}function qg(i){return Ge(i)&&Ot(i)==Yn}function oP(i){return Ge(i)&&Ot(i)==nn}function uP(i){return Ge(i)&&Ot(i)==Ri}function os(i,u,c,f,m){return i===u?!0:i==null||u==null||!Ge(i)&&!Ge(u)?i!==i&&u!==u:sP(i,u,c,f,os,m)}function sP(i,u,c,f,m,y){var C=ae(i),b=ae(u),x=C?Xn:Et(i),j=b?Xn:Et(u);x=x==Yn?xr:x,j=j==Yn?xr:j;var $=x==xr,L=j==xr,H=x==j;if(H&&ci(i)){if(!ci(u))return!1;C=!0,$=!1}if(H&&!$)return y||(y=new Or),C||ko(i)?E_(i,u,c,f,m,y):RP(i,u,x,c,f,m,y);if(!(c&w)){var K=$&&we.call(i,"__wrapped__"),te=L&&we.call(u,"__wrapped__");if(K||te){var pe=K?i.value():i,re=te?u.value():u;return y||(y=new Or),m(pe,re,c,f,y)}}return H?(y||(y=new Or),NP(i,u,c,f,m,y)):!1}function aP(i){return Ge(i)&&Et(i)==zt}function Rp(i,u,c,f){var m=c.length,y=m,C=!f;if(i==null)return!y;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<y;){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 Or;if(f)var H=f(j,$,x,i,u,L);if(!(H===e?os($,j,w|v,f,L):H))return!1}}return!0}function Wg(i){if(!He(i)||HP(i))return!1;var u=On(i)?ax:np;return u.test(Zi(i))}function cP(i){return Ge(i)&&Ot(i)==ji}function lP(i){return Ge(i)&&Et(i)==Vt}function fP(i){return Ge(i)&&Fc(i.length)&&!!xe[Ot(i)]}function Hg(i){return typeof i=="function"?i:i==null?Lt:typeof i=="object"?ae(i)?Gg(i[0],i[1]):Vg(i):py(i)}function Np(i){if(!as(i))return hx(i);var u=[];for(var c in Re(i))we.call(i,c)&&c!="constructor"&&u.push(c);return u}function pP(i){if(!He(i))return KP(i);var u=as(i),c=[];for(var f in i)f=="constructor"&&(u||!we.call(i,f))||c.push(f);return c}function Mp(i,u){return i<u}function zg(i,u){var c=-1,f=jt(i)?T(i.length):[];return oi(i,function(m,y,C){f[++c]=u(m,y,C)}),f}function Vg(i){var u=Xp(i);return u.length==1&&u[0][2]?A_(u[0][0],u[0][1]):function(c){return c===i||Rp(c,i,u)}}function Gg(i,u){return Qp(i)&&b_(u)?A_(cn(i),u):function(c){var f=cd(c,i);return f===e&&f===u?ld(c,i):os(u,f,w|v)}}function ic(i,u,c,f,m){i!==u&&Op(u,function(y,C){if(m||(m=new Or),He(y))dP(i,u,C,c,ic,f,m);else{var b=f?f(td(i,C),y,C+"",i,u,m):e;b===e&&(b=y),xp(i,C,b)}},$t)}function dP(i,u,c,f,m,y,C){var b=td(i,c),x=td(u,c),j=C.get(x);if(j){xp(i,c,j);return}var $=y?y(b,x,c+"",i,u,C):e,L=$===e;if(L){var H=ae(x),K=!H&&ci(x),te=!H&&!K&&ko(x);$=x,H||K||te?ae(b)?$=b:Xe(b)?$=Mt(b):K?(L=!1,$=o_(x,!0)):te?(L=!1,$=u_(x,!0)):$=[]:ls(x)||Qi(x)?($=b,Qi(b)?$=ry(b):(!He(b)||On(b))&&($=w_(x))):L=!1}L&&(C.set(x,$),m($,x,f,y,C),C.delete(x)),xp(i,c,$)}function Kg(i,u){var c=i.length;if(c)return u+=u<0?c:0,Pn(u,c)?i[u]:e}function Jg(i,u,c){u.length?u=qe(u,function(y){return ae(y)?function(C){return Yi(C,y.length===1?y[0]:y)}:y}):u=[Lt];var f=-1;u=qe(u,Yt(ee()));var m=zg(i,function(y,C,b){var x=qe(u,function(j){return j(y)});return{criteria:x,index:++f,value:y}});return US(m,function(y,C){return AP(y,C,c)})}function hP(i,u){return Yg(i,u,function(c,f){return ld(i,f)})}function Yg(i,u,c){for(var f=-1,m=u.length,y={};++f<m;){var C=u[f],b=Yi(i,C);c(b,C)&&us(y,si(C,i),b)}return y}function DP(i){return function(u){return Yi(u,i)}}function jp(i,u,c,f){var m=f?LS:To,y=-1,C=u.length,b=i;for(i===u&&(u=Mt(u)),c&&(b=qe(i,Yt(c)));++y<C;)for(var x=0,j=u[y],$=c?c(j):j;(x=m(b,$,x,f))>-1;)b!==i&&Ka.call(b,x,1),Ka.call(i,x,1);return i}function Xg(i,u){for(var c=i?u.length:0,f=c-1;c--;){var m=u[c];if(c==f||m!==y){var y=m;Pn(m)?Ka.call(i,m,1):kp(i,m)}}return i}function $p(i,u){return i+Xa(Tg()*(u-i+1))}function mP(i,u,c,f){for(var m=-1,y=it(Ya((u-i)/(c||1)),0),C=T(y);y--;)C[f?y:++m]=i,i+=c;return C}function Lp(i,u){var c="";if(!i||u<1||u>rn)return c;do u%2&&(c+=i),u=Xa(u/2),u&&(i+=i);while(u);return c}function de(i,u){return rd(S_(i,u,Lt),i+"")}function gP(i){return Rg(qo(i))}function _P(i,u){var c=qo(i);return hc(c,Ji(u,0,c.length))}function us(i,u,c,f){if(!He(i))return i;u=si(u,i);for(var m=-1,y=u.length,C=y-1,b=i;b!=null&&++m<y;){var x=cn(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($)?$:Pn(u[m+1])?[]:{})}rs(b,x,j),b=b[x]}return i}var Zg=Za?function(i,u){return Za.set(i,u),i}:Lt,yP=Ja?function(i,u){return Ja(i,"toString",{configurable:!0,enumerable:!1,value:pd(u),writable:!0})}:Lt;function FP(i){return hc(qo(i))}function dr(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 y=T(m);++f<m;)y[f]=i[f+u];return y}function EP(i,u){var c;return oi(i,function(f,m,y){return c=u(f,m,y),!c}),!!c}function oc(i,u,c){var f=0,m=i==null?f:i.length;if(typeof u=="number"&&u===u&&m<=Jn){for(;f<m;){var y=f+m>>>1,C=i[y];C!==null&&!Zt(C)&&(c?C<=u:C<u)?f=y+1:m=y}return m}return Up(i,u,Lt,c)}function Up(i,u,c,f){var m=0,y=i==null?0:i.length;if(y===0)return 0;u=c(u);for(var C=u!==u,b=u===null,x=Zt(u),j=u===e;m<y;){var $=Xa((m+y)/2),L=c(i[$]),H=L!==e,K=L===null,te=L===L,pe=Zt(L);if(C)var re=f||te;else j?re=te&&(f||H):b?re=te&&H&&(f||!K):x?re=te&&H&&!K&&(f||!pe):K||pe?re=!1:re=f?L<=u:L<u;re?m=$+1:y=$}return Ft(y,Nf)}function Qg(i,u){for(var c=-1,f=i.length,m=0,y=[];++c<f;){var C=i[c],b=u?u(C):C;if(!c||!Tr(b,x)){var x=b;y[m++]=C===0?0:C}}return y}function e_(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 Ig?Ig.call(i):"";var u=i+"";return u=="0"&&1/i==-Fn?"-0":u}function ui(i,u,c){var f=-1,m=$a,y=i.length,C=!0,b=[],x=b;if(c)C=!1,m=Dp;else if(y>=r){var j=u?null:IP(i);if(j)return Ua(j);C=!1,m=Yu,x=new Ki}else x=u?[]:b;e:for(;++f<y;){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 kp(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 y=u[c];if(typeof y=="string"){if(y==="__proto__"&&!we.call(i,"__proto__"))return!1;if(y==="constructor"&&c+1<f&&typeof u[c+1]=="string"&&u[c+1]==="prototype"){if(m&&c===0)continue;return!1}}}var C=x_(i,u);return C==null||delete C[cn(hr(u))]}function t_(i,u,c,f){return us(i,u,c(Yi(i,u)),f)}function uc(i,u,c,f){for(var m=i.length,y=f?m:-1;(f?y--:++y<m)&&u(i[y],y,i););return c?dr(i,f?0:y,f?y+1:m):dr(i,f?y+1:0,f?m:y)}function r_(i,u){var c=i;return c instanceof me&&(c=c.value()),mp(u,function(f,m){return m.func.apply(m.thisArg,ti([f],m.args))},c)}function qp(i,u,c){var f=i.length;if(f<2)return f?ui(i[0]):[];for(var m=-1,y=T(f);++m<f;)for(var C=i[m],b=-1;++b<f;)b!=m&&(y[m]=ns(y[m]||C,i[b],u,c));return ui(Dt(y,1),u,c)}function n_(i,u,c){for(var f=-1,m=i.length,y=u.length,C={};++f<m;){var b=f<y?u[f]:e;c(C,i[f],b)}return C}function Wp(i){return Xe(i)?i:[]}function Hp(i){return typeof i=="function"?i:Lt}function si(i,u){return ae(i)?i:Qp(i,u)?[i]:I_(be(i))}var vP=de;function ai(i,u,c){var f=i.length;return c=c===e?f:c,!u&&c>=f?i:dr(i,u,c)}var i_=cx||function(i){return ct.clearTimeout(i)};function o_(i,u){if(u)return i.slice();var c=i.length,f=Ag?Ag(c):new i.constructor(c);return i.copy(f),f}function zp(i){var u=new i.constructor(i.byteLength);return new Va(u).set(new Va(i)),u}function CP(i,u){var c=u?zp(i.buffer):i.buffer;return new i.constructor(c,i.byteOffset,i.byteLength)}function wP(i){var u=new i.constructor(i.source,Pa.exec(i));return u.lastIndex=i.lastIndex,u}function bP(i){return ts?Re(ts.call(i)):{}}function u_(i,u){var c=u?zp(i.buffer):i.buffer;return new i.constructor(c,i.byteOffset,i.length)}function s_(i,u){if(i!==u){var c=i!==e,f=i===null,m=i===i,y=Zt(i),C=u!==e,b=u===null,x=u===u,j=Zt(u);if(!b&&!j&&!y&&i>u||y&&C&&x&&!b&&!j||f&&C&&x||!c&&x||!m)return 1;if(!f&&!y&&!j&&i<u||j&&c&&m&&!f&&!y||b&&c&&m||!C&&m||!x)return-1}return 0}function AP(i,u,c){for(var f=-1,m=i.criteria,y=u.criteria,C=m.length,b=c.length;++f<C;){var x=s_(m[f],y[f]);if(x){if(f>=b)return x;var j=c[f];return x*(j=="desc"?-1:1)}}return i.index-u.index}function a_(i,u,c,f){for(var m=-1,y=i.length,C=c.length,b=-1,x=u.length,j=it(y-C,0),$=T(x+j),L=!f;++b<x;)$[b]=u[b];for(;++m<C;)(L||m<y)&&($[c[m]]=i[m]);for(;j--;)$[b++]=i[m++];return $}function c_(i,u,c,f){for(var m=-1,y=i.length,C=-1,b=c.length,x=-1,j=u.length,$=it(y-b,0),L=T($+j),H=!f;++m<$;)L[m]=i[m];for(var K=m;++x<j;)L[K+x]=u[x];for(;++C<b;)(H||m<y)&&(L[K+c[C]]=i[m++]);return L}function Mt(i,u){var c=-1,f=i.length;for(u||(u=T(f));++c<f;)u[c]=i[c];return u}function an(i,u,c,f){var m=!c;c||(c={});for(var y=-1,C=u.length;++y<C;){var b=u[y],x=f?f(c[b],i[b],b,c,i):e;x===e&&(x=i[b]),m?An(c,b,x):rs(c,b,x)}return c}function SP(i,u){return an(i,Zp(i),u)}function xP(i,u){return an(i,v_(i),u)}function sc(i,u){return function(c,f){var m=ae(c)?BS:Yx,y=u?u():{};return m(c,i,ee(f,2),y)}}function $o(i){return de(function(u,c){var f=-1,m=c.length,y=m>1?c[m-1]:e,C=m>2?c[2]:e;for(y=i.length>3&&typeof y=="function"?(m--,y):e,C&&Tt(c[0],c[1],C)&&(y=m<3?e:y,m=1),u=Re(u);++f<m;){var b=c[f];b&&i(u,b,f,y)}return u})}function l_(i,u){return function(c,f){if(c==null)return c;if(!jt(c))return i(c,f);for(var m=c.length,y=u?m:-1,C=Re(c);(u?y--:++y<m)&&f(C[y],y,C)!==!1;);return c}}function f_(i){return function(u,c,f){for(var m=-1,y=Re(u),C=f(u),b=C.length;b--;){var x=C[i?b:++m];if(c(y[x],x,y)===!1)break}return u}}function PP(i,u,c){var f=u&S,m=ss(i);function y(){var C=this&&this!==ct&&this instanceof y?m:i;return C.apply(f?c:this,arguments)}return y}function p_(i){return function(u){u=be(u);var c=Io(u)?Pr(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 mp(ly(cy(u).replace(Cn,"")),i,"")}}function ss(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 OP(i,u,c){var f=ss(i);function m(){for(var y=arguments.length,C=T(y),b=y,x=Uo(m);b--;)C[b]=arguments[b];var j=y<3&&C[0]!==x&&C[y-1]!==x?[]:ri(C,x);if(y-=j.length,y<c)return g_(i,u,ac,m.placeholder,e,C,j,e,e,c-y);var $=this&&this!==ct&&this instanceof m?f:i;return Jt($,this,C)}return m}function d_(i){return function(u,c,f){var m=Re(u);if(!jt(u)){var y=ee(c,3);u=lt(u),c=function(b){return y(m[b],b,m)}}var C=i(u,c,f);return C>-1?m[y?u[C]:C]:e}}function h_(i){return xn(function(u){var c=u.length,f=c,m=fr.prototype.thru;for(i&&u.reverse();f--;){var y=u[f];if(typeof y!="function")throw new lr(o);if(m&&!C&&pc(y)=="wrapper")var C=new fr([],!0)}for(f=C?f:c;++f<c;){y=u[f];var b=pc(y),x=b=="wrapper"?Yp(y):e;x&&ed(x[0])&&x[1]==(Q|I|q|fe)&&!x[4].length&&x[9]==1?C=C[pc(x[0])].apply(C,x[3]):C=y.length==1&&ed(y)?C[b]():C.thru(y)}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 ac(i,u,c,f,m,y,C,b,x,j){var $=u&Q,L=u&S,H=u&O,K=u&(I|U),te=u&ye,pe=H?e:ss(i);function re(){for(var he=arguments.length,_e=T(he),Qt=he;Qt--;)_e[Qt]=arguments[Qt];if(K)var It=Uo(re),er=qS(_e,It);if(f&&(_e=a_(_e,f,m,K)),y&&(_e=c_(_e,y,C,K)),he-=er,K&&he<j){var Ze=ri(_e,It);return g_(i,u,ac,re.placeholder,c,_e,Ze,b,x,j-he)}var Ir=L?c:this,In=H?Ir[i]:i;return he=_e.length,b?_e=YP(_e,b):te&&he>1&&_e.reverse(),$&&x<he&&(_e.length=x),this&&this!==ct&&this instanceof re&&(In=pe||ss(In)),In.apply(Ir,_e)}return re}function D_(i,u){return function(c,f){return iP(c,i,u(f),{})}}function cc(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=e_(c),f=e_(f)),m=i(c,f)}return m}}function Vp(i){return xn(function(u){return u=qe(u,Yt(ee())),de(function(c){var f=this;return i(u,function(m){return Jt(m,f,c)})})})}function lc(i,u){u=u===e?" ":Xt(u);var c=u.length;if(c<2)return c?Lp(u,i):u;var f=Lp(u,Ya(i/Bo(u)));return Io(u)?ai(Pr(f),0,i).join(""):f.slice(0,i)}function TP(i,u,c,f){var m=u&S,y=ss(i);function C(){for(var b=-1,x=arguments.length,j=-1,$=f.length,L=T($+x),H=this&&this!==ct&&this instanceof C?y:i;++j<$;)L[j]=f[j];for(;x--;)L[j++]=arguments[++b];return Jt(H,m?c:this,L)}return C}function m_(i){return function(u,c,f){return f&&typeof f!="number"&&Tt(u,c,f)&&(c=f=e),u=Tn(u),c===e?(c=u,u=0):c=Tn(c),f=f===e?u<c?1:-1:Tn(f),mP(u,c,f,i)}}function fc(i){return function(u,c){return typeof u=="string"&&typeof c=="string"||(u=Dr(u),c=Dr(c)),i(u,c)}}function g_(i,u,c,f,m,y,C,b,x,j){var $=u&I,L=$?C:e,H=$?e:C,K=$?y:e,te=$?e:y;u|=$?q:J,u&=~($?J:q),u&P||(u&=~(S|O));var pe=[i,u,m,K,L,te,H,b,x,j],re=c.apply(e,pe);return ed(i)&&P_(re,pe),re.placeholder=f,O_(re,i,u)}function Gp(i){var u=nt[i];return function(c,f){if(c=Dr(c),f=f==null?0:Ft(le(f),292),f&&Og(c)){var m=(be(c)+"e").split("e"),y=u(m[0]+"e"+(+m[1]+f));return m=(be(y)+"e").split("e"),+(m[0]+"e"+(+m[1]-f))}return u(c)}}var IP=No&&1/Ua(new No([,-0]))[1]==Fn?function(i){return new No(i)}:Dd;function __(i){return function(u){var c=Et(u);return c==zt?Cp(u):c==Vt?JS(u):kS(u,i(u))}}function Sn(i,u,c,f,m,y,C,b){var x=u&O;if(!x&&typeof i!="function")throw new lr(o);var j=f?f.length:0;if(j||(u&=~(q|J),f=m=e),C=C===e?C:it(le(C),0),b=b===e?b:le(b),j-=m?m.length:0,u&J){var $=f,L=m;f=m=e}var H=x?e:Yp(i),K=[i,u,c,f,m,$,L,y,C,b];if(H&&GP(K,H),i=K[0],u=K[1],c=K[2],f=K[3],m=K[4],b=K[9]=K[9]===e?x?0:i.length:it(K[9]-j,0),!b&&u&(I|U)&&(u&=~(I|U)),!u||u==S)var te=PP(i,u,c);else u==I||u==U?te=OP(i,u,b):(u==q||u==(S|q))&&!m.length?te=TP(i,u,c,f):te=ac.apply(e,K);var pe=H?Zg:P_;return O_(pe(te,K),i,u)}function y_(i,u,c,f){return i===e||Tr(i,Ro[c])&&!we.call(f,c)?u:i}function F_(i,u,c,f,m,y){return He(i)&&He(u)&&(y.set(u,i),ic(i,u,e,F_,y),y.delete(u)),i}function BP(i){return ls(i)?e:i}function E_(i,u,c,f,m,y){var C=c&w,b=i.length,x=u.length;if(b!=x&&!(C&&x>b))return!1;var j=y.get(i),$=y.get(u);if(j&&$)return j==u&&$==i;var L=-1,H=!0,K=c&v?new Ki:e;for(y.set(i,u),y.set(u,i);++L<b;){var te=i[L],pe=u[L];if(f)var re=C?f(pe,te,L,u,i,y):f(te,pe,L,i,u,y);if(re!==e){if(re)continue;H=!1;break}if(K){if(!gp(u,function(he,_e){if(!Yu(K,_e)&&(te===he||m(te,he,c,f,y)))return K.push(_e)})){H=!1;break}}else if(!(te===pe||m(te,pe,c,f,y))){H=!1;break}}return y.delete(i),y.delete(u),H}function RP(i,u,c,f,m,y,C){switch(c){case Gt:if(i.byteLength!=u.byteLength||i.byteOffset!=u.byteOffset)return!1;i=i.buffer,u=u.buffer;case nn:return!(i.byteLength!=u.byteLength||!y(new Va(i),new Va(u)));case vn:case Ri:case Zn:return Tr(+i,+u);case Ni:return i.name==u.name&&i.message==u.message;case ji:case $i:return i==u+"";case zt:var b=Cp;case Vt:var x=f&w;if(b||(b=Ua),i.size!=u.size&&!x)return!1;var j=C.get(i);if(j)return j==u;f|=v,C.set(i,u);var $=E_(b(i),b(u),f,m,y,C);return C.delete(i),$;case xt:if(ts)return ts.call(i)==ts.call(u)}return!1}function NP(i,u,c,f,m,y){var C=c&w,b=Kp(i),x=b.length,j=Kp(u),$=j.length;if(x!=$&&!C)return!1;for(var L=x;L--;){var H=b[L];if(!(C?H in u:we.call(u,H)))return!1}var K=y.get(i),te=y.get(u);if(K&&te)return K==u&&te==i;var pe=!0;y.set(i,u),y.set(u,i);for(var re=C;++L<x;){H=b[L];var he=i[H],_e=u[H];if(f)var Qt=C?f(_e,he,H,u,i,y):f(he,_e,H,i,u,y);if(!(Qt===e?he===_e||m(he,_e,c,f,y):Qt)){pe=!1;break}re||(re=H=="constructor")}if(pe&&!re){var It=i.constructor,er=u.constructor;It!=er&&"constructor"in i&&"constructor"in u&&!(typeof It=="function"&&It instanceof It&&typeof er=="function"&&er instanceof er)&&(pe=!1)}return y.delete(i),y.delete(u),pe}function xn(i){return rd(S_(i,e,M_),i+"")}function Kp(i){return kg(i,lt,Zp)}function Jp(i){return kg(i,$t,v_)}var Yp=Za?function(i){return Za.get(i)}:Dd;function pc(i){for(var u=i.name+"",c=Mo[u],f=we.call(Mo,u)?c.length:0;f--;){var m=c[f],y=m.func;if(y==null||y==i)return m.name}return u}function Uo(i){var u=we.call(_,"placeholder")?_:i;return u.placeholder}function ee(){var i=_.iteratee||dd;return i=i===dd?Hg:i,arguments.length?i(arguments[0],arguments[1]):i}function dc(i,u){var c=i.__data__;return WP(u)?c[typeof u=="string"?"string":"hash"]:c.map}function Xp(i){for(var u=lt(i),c=u.length;c--;){var f=u[c],m=i[f];u[c]=[f,m,b_(m)]}return u}function Xi(i,u){var c=VS(i,u);return Wg(c)?c:e}function MP(i){var u=we.call(i,Vi),c=i[Vi];try{i[Vi]=e;var f=!0}catch{}var m=Ha.call(i);return f&&(u?i[Vi]=c:delete i[Vi]),m}var Zp=bp?function(i){return i==null?[]:(i=Re(i),ei(bp(i),function(u){return xg.call(i,u)}))}:md,v_=bp?function(i){for(var u=[];i;)ti(u,Zp(i)),i=Ga(i);return u}:md,Et=Ot;(Ap&&Et(new Ap(new ArrayBuffer(1)))!=Gt||Zu&&Et(new Zu)!=zt||Sp&&Et(Sp.resolve())!=Ca||No&&Et(new No)!=Vt||Qu&&Et(new Qu)!=Li)&&(Et=function(i){var u=Ot(i),c=u==xr?i.constructor:e,f=c?Zi(c):"";if(f)switch(f){case _x:return Gt;case yx:return zt;case Fx:return Ca;case Ex:return Vt;case vx:return Li}return u});function jP(i,u,c){for(var f=-1,m=c.length;++f<m;){var y=c[f],C=y.size;switch(y.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 $P(i){var u=i.match(Jf);return u?u[1].split(Yf):[]}function C_(i,u,c){u=si(u,i);for(var f=-1,m=u.length,y=!1;++f<m;){var C=cn(u[f]);if(!(y=i!=null&&c(i,C)))break;i=i[C]}return y||++f!=m?y:(m=i==null?0:i.length,!!m&&Fc(m)&&Pn(C,m)&&(ae(i)||Qi(i)))}function LP(i){var u=i.length,c=new i.constructor(u);return u&&typeof i[0]=="string"&&we.call(i,"index")&&(c.index=i.index,c.input=i.input),c}function w_(i){return typeof i.constructor=="function"&&!as(i)?jo(Ga(i)):{}}function UP(i,u,c){var f=i.constructor;switch(u){case nn:return zp(i);case vn:case Ri:return new f(+i);case Gt:return CP(i,c);case Bu:case Ru:case Nu:case Mu:case Ui:case ju:case $u:case xo:case Lu:return u_(i,c);case zt:return new f;case Zn:case $i:return new f(i);case ji:return wP(i);case Vt:return new f;case xt:return bP(i)}}function kP(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(Kf,`{
|
|
9
|
+
/* [wrapped with `+u+`] */
|
|
10
|
+
`)}function qP(i){return ae(i)||Qi(i)||!!(Pg&&i&&i[Pg])}function Pn(i,u){var c=typeof i;return u=u??rn,!!u&&(c=="number"||c!="symbol"&&op.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"?jt(c)&&Pn(u,c.length):f=="string"&&u in c)?Tr(c[u],i):!1}function Qp(i,u){if(ae(i))return!1;var c=typeof i;return c=="number"||c=="symbol"||c=="boolean"||i==null||Zt(i)?!0:Hf.test(i)||!Wf.test(i)||u!=null&&i in Re(u)}function WP(i){var u=typeof i;return u=="string"||u=="number"||u=="symbol"||u=="boolean"?i!=="__proto__":i===null}function ed(i){var u=pc(i),c=_[u];if(typeof c!="function"||!(u in me.prototype))return!1;if(i===c)return!0;var f=Yp(c);return!!f&&i===f[0]}function HP(i){return!!bg&&bg in i}var zP=qa?On:gd;function as(i){var u=i&&i.constructor,c=typeof u=="function"&&u.prototype||Ro;return i===c}function b_(i){return i===i&&!He(i)}function A_(i,u){return function(c){return c==null?!1:c[i]===u&&(u!==e||i in Re(c))}}function VP(i){var u=_c(i,function(f){return c.size===l&&c.clear(),f}),c=u.cache;return u}function GP(i,u){var c=i[1],f=u[1],m=c|f,y=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(!(y||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?a_(x,b,u[4]):b,i[4]=x?ri(i[3],p):u[4]}return b=u[5],b&&(x=i[5],i[5]=x?c_(x,b,u[6]):b,i[6]=x?ri(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 KP(i){var u=[];if(i!=null)for(var c in Re(i))u.push(c);return u}function JP(i){return Ha.call(i)}function S_(i,u,c){return u=it(u===e?i.length-1:u,0),function(){for(var f=arguments,m=-1,y=it(f.length-u,0),C=T(y);++m<y;)C[m]=f[u+m];m=-1;for(var b=T(u+1);++m<u;)b[m]=f[m];return b[u]=c(C),Jt(i,this,b)}}function x_(i,u){return u.length<2?i:Yi(i,dr(u,0,-1))}function YP(i,u){for(var c=i.length,f=Ft(u.length,c),m=Mt(i);f--;){var y=u[f];i[f]=Pn(y,c)?m[y]:e}return i}function td(i,u){if(!(u==="constructor"&&typeof i[u]=="function")&&u!="__proto__")return i[u]}var P_=T_(Zg),cs=fx||function(i,u){return ct.setTimeout(i,u)},rd=T_(yP);function O_(i,u,c){var f=u+"";return rd(i,kP(f,XP($P(f),c)))}function T_(i){var u=0,c=0;return function(){var f=Dx(),m=dt-(f-c);if(c=f,m>0){if(++u>=tn)return arguments[0]}else u=0;return i.apply(e,arguments)}}function hc(i,u){var c=-1,f=i.length,m=f-1;for(u=u===e?f:u;++c<u;){var y=$p(c,m),C=i[y];i[y]=i[c],i[c]=C}return i.length=u,i}var I_=VP(function(i){var u=[];return i.charCodeAt(0)===46&&u.push(""),i.replace(zf,function(c,f,m,y){u.push(m?y.replace(Qf,"$1"):f||c)}),u});function cn(i){if(typeof i=="string"||Zt(i))return i;var u=i+"";return u=="0"&&1/i==-Fn?"-0":u}function Zi(i){if(i!=null){try{return Wa.call(i)}catch{}try{return i+""}catch{}}return""}function XP(i,u){return cr(Ea,function(c){var f="_."+c[0];u&c[1]&&!$a(i,f)&&i.push(f)}),i.sort()}function B_(i){if(i instanceof me)return i.clone();var u=new fr(i.__wrapped__,i.__chain__);return u.__actions__=Mt(i.__actions__),u.__index__=i.__index__,u.__values__=i.__values__,u}function ZP(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,y=0,C=T(Ya(f/u));m<f;)C[y++]=dr(i,m,m+=u);return C}function QP(i){for(var u=-1,c=i==null?0:i.length,f=0,m=[];++u<c;){var y=i[u];y&&(m[f++]=y)}return m}function eO(){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)?Mt(c):[c],Dt(u,1))}var tO=de(function(i,u){return Xe(i)?ns(i,Dt(u,1,Xe,!0)):[]}),rO=de(function(i,u){var c=hr(u);return Xe(c)&&(c=e),Xe(i)?ns(i,Dt(u,1,Xe,!0),ee(c,2)):[]}),nO=de(function(i,u){var c=hr(u);return Xe(c)&&(c=e),Xe(i)?ns(i,Dt(u,1,Xe,!0),e,c):[]});function iO(i,u,c){var f=i==null?0:i.length;return f?(u=c||u===e?1:le(u),dr(i,u<0?0:u,f)):[]}function oO(i,u,c){var f=i==null?0:i.length;return f?(u=c||u===e?1:le(u),u=f-u,dr(i,0,u<0?0:u)):[]}function uO(i,u){return i&&i.length?uc(i,ee(u,3),!0,!0):[]}function sO(i,u){return i&&i.length?uc(i,ee(u,3),!0):[]}function aO(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),eP(i,u,c,f)):[]}function R_(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)),La(i,ee(u,3),m)}function N_(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)),La(i,ee(u,3),m,!0)}function M_(i){var u=i==null?0:i.length;return u?Dt(i,1):[]}function cO(i){var u=i==null?0:i.length;return u?Dt(i,Fn):[]}function lO(i,u){var c=i==null?0:i.length;return c?(u=u===e?1:le(u),Dt(i,u)):[]}function fO(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 j_(i){return i&&i.length?i[0]:e}function pO(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 dO(i){var u=i==null?0:i.length;return u?dr(i,0,-1):[]}var hO=de(function(i){var u=qe(i,Wp);return u.length&&u[0]===i[0]?Bp(u):[]}),DO=de(function(i){var u=hr(i),c=qe(i,Wp);return u===hr(c)?u=e:c.pop(),c.length&&c[0]===i[0]?Bp(c,ee(u,2)):[]}),mO=de(function(i){var u=hr(i),c=qe(i,Wp);return u=typeof u=="function"?u:e,u&&c.pop(),c.length&&c[0]===i[0]?Bp(c,e,u):[]});function gO(i,u){return i==null?"":dx.call(i,u)}function hr(i){var u=i==null?0:i.length;return u?i[u-1]:e}function _O(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?XS(i,u,m):La(i,gg,m,!0)}function yO(i,u){return i&&i.length?Kg(i,le(u)):e}var FO=de($_);function $_(i,u){return i&&i.length&&u&&u.length?jp(i,u):i}function EO(i,u,c){return i&&i.length&&u&&u.length?jp(i,u,ee(c,2)):i}function vO(i,u,c){return i&&i.length&&u&&u.length?jp(i,u,e,c):i}var CO=xn(function(i,u){var c=i==null?0:i.length,f=Pp(i,u);return Xg(i,qe(u,function(m){return Pn(m,c)?+m:m}).sort(s_)),f});function wO(i,u){var c=[];if(!(i&&i.length))return c;var f=-1,m=[],y=i.length;for(u=ee(u,3);++f<y;){var C=i[f];u(C,f,i)&&(c.push(C),m.push(f))}return Xg(i,m),c}function nd(i){return i==null?i:gx.call(i)}function bO(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)),dr(i,u,c)):[]}function AO(i,u){return oc(i,u)}function SO(i,u,c){return Up(i,u,ee(c,2))}function xO(i,u){var c=i==null?0:i.length;if(c){var f=oc(i,u);if(f<c&&Tr(i[f],u))return f}return-1}function PO(i,u){return oc(i,u,!0)}function OO(i,u,c){return Up(i,u,ee(c,2),!0)}function TO(i,u){var c=i==null?0:i.length;if(c){var f=oc(i,u,!0)-1;if(Tr(i[f],u))return f}return-1}function IO(i){return i&&i.length?Qg(i):[]}function BO(i,u){return i&&i.length?Qg(i,ee(u,2)):[]}function RO(i){var u=i==null?0:i.length;return u?dr(i,1,u):[]}function NO(i,u,c){return i&&i.length?(u=c||u===e?1:le(u),dr(i,0,u<0?0:u)):[]}function MO(i,u,c){var f=i==null?0:i.length;return f?(u=c||u===e?1:le(u),u=f-u,dr(i,u<0?0:u,f)):[]}function jO(i,u){return i&&i.length?uc(i,ee(u,3),!1,!0):[]}function $O(i,u){return i&&i.length?uc(i,ee(u,3)):[]}var LO=de(function(i){return ui(Dt(i,1,Xe,!0))}),UO=de(function(i){var u=hr(i);return Xe(u)&&(u=e),ui(Dt(i,1,Xe,!0),ee(u,2))}),kO=de(function(i){var u=hr(i);return u=typeof u=="function"?u:e,ui(Dt(i,1,Xe,!0),e,u)});function qO(i){return i&&i.length?ui(i):[]}function WO(i,u){return i&&i.length?ui(i,ee(u,2)):[]}function HO(i,u){return u=typeof u=="function"?u:e,i&&i.length?ui(i,e,u):[]}function id(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}),Ep(u,function(c){return qe(i,_p(c))})}function L_(i,u){if(!(i&&i.length))return[];var c=id(i);return u==null?c:qe(c,function(f){return Jt(u,e,f)})}var zO=de(function(i,u){return Xe(i)?ns(i,u):[]}),VO=de(function(i){return qp(ei(i,Xe))}),GO=de(function(i){var u=hr(i);return Xe(u)&&(u=e),qp(ei(i,Xe),ee(u,2))}),KO=de(function(i){var u=hr(i);return u=typeof u=="function"?u:e,qp(ei(i,Xe),e,u)}),JO=de(id);function YO(i,u){return n_(i||[],u||[],rs)}function XO(i,u){return n_(i||[],u||[],us)}var ZO=de(function(i){var u=i.length,c=u>1?i[u-1]:e;return c=typeof c=="function"?(i.pop(),c):e,L_(i,c)});function U_(i){var u=_(i);return u.__chain__=!0,u}function QO(i,u){return u(i),i}function Dc(i,u){return u(i)}var eT=xn(function(i){var u=i.length,c=u?i[0]:0,f=this.__wrapped__,m=function(y){return Pp(y,i)};return u>1||this.__actions__.length||!(f instanceof me)||!Pn(c)?this.thru(m):(f=f.slice(c,+c+(u?1:0)),f.__actions__.push({func:Dc,args:[m],thisArg:e}),new fr(f,this.__chain__).thru(function(y){return u&&!y.length&&y.push(e),y}))});function tT(){return U_(this)}function rT(){return new fr(this.value(),this.__chain__)}function nT(){this.__values__===e&&(this.__values__=ey(this.value()));var i=this.__index__>=this.__values__.length,u=i?e:this.__values__[this.__index__++];return{done:i,value:u}}function iT(){return this}function oT(i){for(var u,c=this;c instanceof ec;){var f=B_(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 uT(){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:Dc,args:[nd],thisArg:e}),new fr(u,this.__chain__)}return this.thru(nd)}function sT(){return r_(this.__wrapped__,this.__actions__)}var aT=sc(function(i,u,c){we.call(i,c)?++i[c]:An(i,c,1)});function cT(i,u,c){var f=ae(i)?Dg:Qx;return c&&Tt(i,u,c)&&(u=e),f(i,ee(u,3))}function lT(i,u){var c=ae(i)?ei:Lg;return c(i,ee(u,3))}var fT=d_(R_),pT=d_(N_);function dT(i,u){return Dt(mc(i,u),1)}function hT(i,u){return Dt(mc(i,u),Fn)}function DT(i,u,c){return c=c===e?1:le(c),Dt(mc(i,u),c)}function k_(i,u){var c=ae(i)?cr:oi;return c(i,ee(u,3))}function q_(i,u){var c=ae(i)?RS:$g;return c(i,ee(u,3))}var mT=sc(function(i,u,c){we.call(i,c)?i[c].push(u):An(i,c,[u])});function gT(i,u,c,f){i=jt(i)?i:qo(i),c=c&&!f?le(c):0;var m=i.length;return c<0&&(c=it(m+c,0)),Ec(i)?c<=m&&i.indexOf(u,c)>-1:!!m&&To(i,u,c)>-1}var _T=de(function(i,u,c){var f=-1,m=typeof u=="function",y=jt(i)?T(i.length):[];return oi(i,function(C){y[++f]=m?Jt(u,C,c):is(C,u,c)}),y}),yT=sc(function(i,u,c){An(i,c,u)});function mc(i,u){var c=ae(i)?qe:zg;return c(i,ee(u,3))}function FT(i,u,c,f){return i==null?[]:(ae(u)||(u=u==null?[]:[u]),c=f?e:c,ae(c)||(c=c==null?[]:[c]),Jg(i,u,c))}var ET=sc(function(i,u,c){i[c?0:1].push(u)},function(){return[[],[]]});function vT(i,u,c){var f=ae(i)?mp:yg,m=arguments.length<3;return f(i,ee(u,4),c,m,oi)}function CT(i,u,c){var f=ae(i)?NS:yg,m=arguments.length<3;return f(i,ee(u,4),c,m,$g)}function wT(i,u){var c=ae(i)?ei:Lg;return c(i,yc(ee(u,3)))}function bT(i){var u=ae(i)?Rg:gP;return u(i)}function AT(i,u,c){(c?Tt(i,u,c):u===e)?u=1:u=le(u);var f=ae(i)?Kx:_P;return f(i,u)}function ST(i){var u=ae(i)?Jx:FP;return u(i)}function xT(i){if(i==null)return 0;if(jt(i))return Ec(i)?Bo(i):i.length;var u=Et(i);return u==zt||u==Vt?i.size:Np(i).length}function PT(i,u,c){var f=ae(i)?gp:EP;return c&&Tt(i,u,c)&&(u=e),f(i,ee(u,3))}var OT=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]]),Jg(i,Dt(u,1),[])}),gc=lx||function(){return ct.Date.now()};function TT(i,u){if(typeof u!="function")throw new lr(o);return i=le(i),function(){if(--i<1)return u.apply(this,arguments)}}function W_(i,u,c){return u=c?e:u,u=i&&u==null?i.length:u,Sn(i,Q,e,e,e,e,u)}function H_(i,u){var c;if(typeof u!="function")throw new lr(o);return i=le(i),function(){return--i>0&&(c=u.apply(this,arguments)),i<=1&&(u=e),c}}var od=de(function(i,u,c){var f=S;if(c.length){var m=ri(c,Uo(od));f|=q}return Sn(i,f,u,c,m)}),z_=de(function(i,u,c){var f=S|O;if(c.length){var m=ri(c,Uo(z_));f|=q}return Sn(u,f,i,c,m)});function V_(i,u,c){u=c?e:u;var f=Sn(i,I,e,e,e,e,e,u);return f.placeholder=V_.placeholder,f}function G_(i,u,c){u=c?e:u;var f=Sn(i,U,e,e,e,e,e,u);return f.placeholder=G_.placeholder,f}function K_(i,u,c){var f,m,y,C,b,x,j=0,$=!1,L=!1,H=!0;if(typeof i!="function")throw new lr(o);u=Dr(u)||0,He(c)&&($=!!c.leading,L="maxWait"in c,y=L?it(Dr(c.maxWait)||0,u):y,H="trailing"in c?!!c.trailing:H);function K(Ze){var Ir=f,In=m;return f=m=e,j=Ze,C=i.apply(In,Ir),C}function te(Ze){return j=Ze,b=cs(he,u),$?K(Ze):C}function pe(Ze){var Ir=Ze-x,In=Ze-j,dy=u-Ir;return L?Ft(dy,y-In):dy}function re(Ze){var Ir=Ze-x,In=Ze-j;return x===e||Ir>=u||Ir<0||L&&In>=y}function he(){var Ze=gc();if(re(Ze))return _e(Ze);b=cs(he,pe(Ze))}function _e(Ze){return b=e,H&&f?K(Ze):(f=m=e,C)}function Qt(){b!==e&&i_(b),j=0,f=x=m=b=e}function It(){return b===e?C:_e(gc())}function er(){var Ze=gc(),Ir=re(Ze);if(f=arguments,m=this,x=Ze,Ir){if(b===e)return te(x);if(L)return i_(b),b=cs(he,u),K(x)}return b===e&&(b=cs(he,u)),C}return er.cancel=Qt,er.flush=It,er}var IT=de(function(i,u){return jg(i,1,u)}),BT=de(function(i,u,c){return jg(i,Dr(u)||0,c)});function RT(i){return Sn(i,ye)}function _c(i,u){if(typeof i!="function"||u!=null&&typeof u!="function")throw new lr(o);var c=function(){var f=arguments,m=u?u.apply(this,f):f[0],y=c.cache;if(y.has(m))return y.get(m);var C=i.apply(this,f);return c.cache=y.set(m,C)||y,C};return c.cache=new(_c.Cache||bn),c}_c.Cache=bn;function yc(i){if(typeof i!="function")throw new lr(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 NT(i){return H_(2,i)}var MT=vP(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,y=Ft(f.length,c);++m<y;)f[m]=u[m].call(this,f[m]);return Jt(i,this,f)})}),ud=de(function(i,u){var c=ri(u,Uo(ud));return Sn(i,q,e,u,c)}),J_=de(function(i,u){var c=ri(u,Uo(J_));return Sn(i,J,e,u,c)}),jT=xn(function(i,u){return Sn(i,fe,e,e,e,u)});function $T(i,u){if(typeof i!="function")throw new lr(o);return u=u===e?u:le(u),de(i,u)}function LT(i,u){if(typeof i!="function")throw new lr(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),Jt(i,this,m)})}function UT(i,u,c){var f=!0,m=!0;if(typeof i!="function")throw new lr(o);return He(c)&&(f="leading"in c?!!c.leading:f,m="trailing"in c?!!c.trailing:m),K_(i,u,{leading:f,maxWait:u,trailing:m})}function kT(i){return W_(i,1)}function qT(i,u){return ud(Hp(u),i)}function WT(){if(!arguments.length)return[];var i=arguments[0];return ae(i)?i:[i]}function HT(i){return pr(i,F)}function zT(i,u){return u=typeof u=="function"?u:e,pr(i,F,u)}function VT(i){return pr(i,D|F)}function GT(i,u){return u=typeof u=="function"?u:e,pr(i,D|F,u)}function KT(i,u){return u==null||Mg(i,u,lt(u))}function Tr(i,u){return i===u||i!==i&&u!==u}var JT=fc(Ip),YT=fc(function(i,u){return i>=u}),Qi=qg((function(){return arguments})())?qg:function(i){return Ge(i)&&we.call(i,"callee")&&!xg.call(i,"callee")},ae=T.isArray,XT=cg?Yt(cg):oP;function jt(i){return i!=null&&Fc(i.length)&&!On(i)}function Xe(i){return Ge(i)&&jt(i)}function ZT(i){return i===!0||i===!1||Ge(i)&&Ot(i)==vn}var ci=px||gd,QT=lg?Yt(lg):uP;function e3(i){return Ge(i)&&i.nodeType===1&&!ls(i)}function t3(i){if(i==null)return!0;if(jt(i)&&(ae(i)||typeof i=="string"||typeof i.splice=="function"||ci(i)||ko(i)||Qi(i)))return!i.length;var u=Et(i);if(u==zt||u==Vt)return!i.size;if(as(i))return!Np(i).length;for(var c in i)if(we.call(i,c))return!1;return!0}function r3(i,u){return os(i,u)}function n3(i,u,c){c=typeof c=="function"?c:e;var f=c?c(i,u):e;return f===e?os(i,u,e,c):!!f}function sd(i){if(!Ge(i))return!1;var u=Ot(i);return u==Ni||u==Mf||typeof i.message=="string"&&typeof i.name=="string"&&!ls(i)}function i3(i){return typeof i=="number"&&Og(i)}function On(i){if(!He(i))return!1;var u=Ot(i);return u==So||u==va||u==Ao||u==jf}function Y_(i){return typeof i=="number"&&i==le(i)}function Fc(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=rn}function He(i){var u=typeof i;return i!=null&&(u=="object"||u=="function")}function Ge(i){return i!=null&&typeof i=="object"}var X_=fg?Yt(fg):aP;function o3(i,u){return i===u||Rp(i,u,Xp(u))}function u3(i,u,c){return c=typeof c=="function"?c:e,Rp(i,u,Xp(u),c)}function s3(i){return Z_(i)&&i!=+i}function a3(i){if(zP(i))throw new se(n);return Wg(i)}function c3(i){return i===null}function l3(i){return i==null}function Z_(i){return typeof i=="number"||Ge(i)&&Ot(i)==Zn}function ls(i){if(!Ge(i)||Ot(i)!=xr)return!1;var u=Ga(i);if(u===null)return!0;var c=we.call(u,"constructor")&&u.constructor;return typeof c=="function"&&c instanceof c&&Wa.call(c)==ux}var ad=pg?Yt(pg):cP;function f3(i){return Y_(i)&&i>=-rn&&i<=rn}var Q_=dg?Yt(dg):lP;function Ec(i){return typeof i=="string"||!ae(i)&&Ge(i)&&Ot(i)==$i}function Zt(i){return typeof i=="symbol"||Ge(i)&&Ot(i)==xt}var ko=hg?Yt(hg):fP;function p3(i){return i===e}function d3(i){return Ge(i)&&Et(i)==Li}function h3(i){return Ge(i)&&Ot(i)==$f}var D3=fc(Mp),m3=fc(function(i,u){return i<=u});function ey(i){if(!i)return[];if(jt(i))return Ec(i)?Pr(i):Mt(i);if(Xu&&i[Xu])return KS(i[Xu]());var u=Et(i),c=u==zt?Cp:u==Vt?Ua:qo;return c(i)}function Tn(i){if(!i)return i===0?i:0;if(i=Dr(i),i===Fn||i===-Fn){var u=i<0?-1:1;return u*En}return i===i?i:0}function le(i){var u=Tn(i),c=u%1;return u===u?c?u-c:u:0}function ty(i){return i?Ji(le(i),0,ur):0}function Dr(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=Fg(i);var c=rp.test(i);return c||ip.test(i)?TS(i.slice(2),c?2:8):tp.test(i)?bo:+i}function ry(i){return an(i,$t(i))}function g3(i){return i?Ji(le(i),-rn,rn):i===0?i:0}function be(i){return i==null?"":Xt(i)}var _3=$o(function(i,u){if(as(u)||jt(u)){an(u,lt(u),i);return}for(var c in u)we.call(u,c)&&rs(i,c,u[c])}),ny=$o(function(i,u){an(u,$t(u),i)}),vc=$o(function(i,u,c,f){an(u,$t(u),i,f)}),y3=$o(function(i,u,c,f){an(u,lt(u),i,f)}),F3=xn(Pp);function E3(i,u){var c=jo(i);return u==null?c:Ng(c,u)}var v3=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 y=u[c],C=$t(y),b=-1,x=C.length;++b<x;){var j=C[b],$=i[j];($===e||Tr($,Ro[j])&&!we.call(i,j))&&(i[j]=y[j])}return i}),C3=de(function(i){return i.push(e,F_),Jt(iy,e,i)});function w3(i,u){return mg(i,ee(u,3),sn)}function b3(i,u){return mg(i,ee(u,3),Tp)}function A3(i,u){return i==null?i:Op(i,ee(u,3),$t)}function S3(i,u){return i==null?i:Ug(i,ee(u,3),$t)}function x3(i,u){return i&&sn(i,ee(u,3))}function P3(i,u){return i&&Tp(i,ee(u,3))}function O3(i){return i==null?[]:nc(i,lt(i))}function T3(i){return i==null?[]:nc(i,$t(i))}function cd(i,u,c){var f=i==null?e:Yi(i,u);return f===e?c:f}function I3(i,u){return i!=null&&C_(i,u,tP)}function ld(i,u){return i!=null&&C_(i,u,rP)}var B3=D_(function(i,u,c){u!=null&&typeof u.toString!="function"&&(u=Ha.call(u)),i[u]=c},pd(Lt)),R3=D_(function(i,u,c){u!=null&&typeof u.toString!="function"&&(u=Ha.call(u)),we.call(i,u)?i[u].push(c):i[u]=[c]},ee),N3=de(is);function lt(i){return jt(i)?Bg(i):Np(i)}function $t(i){return jt(i)?Bg(i,!0):pP(i)}function M3(i,u){var c={};return u=ee(u,3),sn(i,function(f,m,y){An(c,u(f,m,y),f)}),c}function j3(i,u){var c={};return u=ee(u,3),sn(i,function(f,m,y){An(c,m,u(f,m,y))}),c}var $3=$o(function(i,u,c){ic(i,u,c)}),iy=$o(function(i,u,c,f){ic(i,u,c,f)}),L3=xn(function(i,u){var c={};if(i==null)return c;var f=!1;u=qe(u,function(y){return y=si(y,i),f||(f=y.length>1),y}),an(i,Jp(i),c),f&&(c=pr(c,D|g|F,BP));for(var m=u.length;m--;)kp(c,u[m]);return c});function U3(i,u){return oy(i,yc(ee(u)))}var k3=xn(function(i,u){return i==null?{}:hP(i,u)});function oy(i,u){if(i==null)return{};var c=qe(Jp(i),function(f){return[f]});return u=ee(u),Yg(i,c,function(f,m){return u(f,m[0])})}function q3(i,u,c){u=si(u,i);var f=-1,m=u.length;for(m||(m=1,i=e);++f<m;){var y=i==null?e:i[cn(u[f])];y===e&&(f=m,y=c),i=On(y)?y.call(i):y}return i}function W3(i,u,c){return i==null?i:us(i,u,c)}function H3(i,u,c,f){return f=typeof f=="function"?f:e,i==null?i:us(i,u,c,f)}var uy=__(lt),sy=__($t);function z3(i,u,c){var f=ae(i),m=f||ci(i)||ko(i);if(u=ee(u,4),c==null){var y=i&&i.constructor;m?c=f?new y:[]:He(i)?c=On(y)?jo(Ga(i)):{}:c={}}return(m?cr:sn)(i,function(C,b,x){return u(c,C,b,x)}),c}function V3(i,u){return i==null?!0:kp(i,u)}function G3(i,u,c){return i==null?i:t_(i,u,Hp(c))}function K3(i,u,c,f){return f=typeof f=="function"?f:e,i==null?i:t_(i,u,Hp(c),f)}function qo(i){return i==null?[]:vp(i,lt(i))}function J3(i){return i==null?[]:vp(i,$t(i))}function Y3(i,u,c){return c===e&&(c=u,u=e),c!==e&&(c=Dr(c),c=c===c?c:0),u!==e&&(u=Dr(u),u=u===u?u:0),Ji(Dr(i),u,c)}function X3(i,u,c){return u=Tn(u),c===e?(c=u,u=0):c=Tn(c),i=Dr(i),nP(i,u,c)}function Z3(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=Tn(i),u===e?(u=i,i=0):u=Tn(u)),i>u){var f=i;i=u,u=f}if(c||i%1||u%1){var m=Tg();return Ft(i+m*(u-i+OS("1e-"+((m+"").length-1))),u)}return $p(i,u)}var Q3=Lo(function(i,u,c){return u=u.toLowerCase(),i+(c?ay(u):u)});function ay(i){return fd(be(i).toLowerCase())}function cy(i){return i=be(i),i&&i.replace(Oa,WS).replace(Qn,"")}function eI(i,u,c){i=be(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 tI(i){return i=be(i),i&&Uu.test(i)?i.replace(Sa,HS):i}function rI(i){return i=be(i),i&&Vf.test(i)?i.replace(qu,"\\$&"):i}var nI=Lo(function(i,u,c){return i+(c?"-":"")+u.toLowerCase()}),iI=Lo(function(i,u,c){return i+(c?" ":"")+u.toLowerCase()}),oI=p_("toLowerCase");function uI(i,u,c){i=be(i),u=le(u);var f=u?Bo(i):0;if(!u||f>=u)return i;var m=(u-f)/2;return lc(Xa(m),c)+i+lc(Ya(m),c)}function sI(i,u,c){i=be(i),u=le(u);var f=u?Bo(i):0;return u&&f<u?i+lc(u-f,c):i}function aI(i,u,c){i=be(i),u=le(u);var f=u?Bo(i):0;return u&&f<u?lc(u-f,c)+i:i}function cI(i,u,c){return c||u==null?u=0:u&&(u=+u),mx(be(i).replace(Wu,""),u||0)}function lI(i,u,c){return(c?Tt(i,u,c):u===e)?u=1:u=le(u),Lp(be(i),u)}function fI(){var i=arguments,u=be(i[0]);return i.length<3?u:u.replace(i[1],i[2])}var pI=Lo(function(i,u,c){return i+(c?"_":"")+u.toLowerCase()});function dI(i,u,c){return c&&typeof c!="number"&&Tt(i,u,c)&&(u=c=e),c=c===e?ur:c>>>0,c?(i=be(i),i&&(typeof u=="string"||u!=null&&!ad(u))&&(u=Xt(u),!u&&Io(i))?ai(Pr(i),0,c):i.split(u,c)):[]}var hI=Lo(function(i,u,c){return i+(c?" ":"")+fd(u)});function DI(i,u,c){return i=be(i),c=c==null?0:Ji(le(c),0,i.length),u=Xt(u),i.slice(c,c+u.length)==u}function mI(i,u,c){var f=_.templateSettings;c&&Tt(i,u,c)&&(u=e),i=be(i),u=vc({},u,f,y_);var m=vc({},u.imports,f.imports,y_),y=lt(m),C=vp(m,y),b,x,j=0,$=u.interpolate||ki,L="__p += '",H=wp((u.escape||ki).source+"|"+$.source+"|"+($===ku?ep:ki).source+"|"+(u.evaluate||ki).source+"|$","g"),K="//# sourceURL="+(we.call(u,"sourceURL")?(u.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ja+"]")+`
|
|
11
|
+
`;i.replace(H,function(re,he,_e,Qt,It,er){return _e||(_e=Qt),L+=i.slice(j,er).replace(Ta,zS),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=er+re.length,re}),L+=`';
|
|
18
|
+
`;var te=we.call(u,"variable")&&u.variable;if(!te)L=`with (obj) {
|
|
19
|
+
`+L+`
|
|
20
|
+
}
|
|
21
|
+
`;else if(Zf.test(te))throw new se(s);L=(x?L.replace(Lf,""):L).replace(Uf,"$1").replace(ba,"$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=fy(function(){return ve(y,K+"return "+L).apply(e,C)});if(pe.source=L,sd(pe))throw pe;return pe}function gI(i){return be(i).toLowerCase()}function _I(i){return be(i).toUpperCase()}function yI(i,u,c){if(i=be(i),i&&(c||u===e))return Fg(i);if(!i||!(u=Xt(u)))return i;var f=Pr(i),m=Pr(u),y=Eg(f,m),C=vg(f,m)+1;return ai(f,y,C).join("")}function FI(i,u,c){if(i=be(i),i&&(c||u===e))return i.slice(0,wg(i)+1);if(!i||!(u=Xt(u)))return i;var f=Pr(i),m=vg(f,Pr(u))+1;return ai(f,0,m).join("")}function EI(i,u,c){if(i=be(i),i&&(c||u===e))return i.replace(Wu,"");if(!i||!(u=Xt(u)))return i;var f=Pr(i),m=Eg(f,Pr(u));return ai(f,m).join("")}function vI(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=be(i);var y=i.length;if(Io(i)){var C=Pr(i);y=C.length}if(c>=y)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),ad(m)){if(i.slice(b).search(m)){var j,$=x;for(m.global||(m=wp(m.source,be(Pa.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 CI(i){return i=be(i),i&&kf.test(i)?i.replace(Aa,ZS):i}var wI=Lo(function(i,u,c){return i+(c?" ":"")+u.toUpperCase()}),fd=p_("toUpperCase");function ly(i,u,c){return i=be(i),u=c?e:u,u===e?GS(i)?tx(i):$S(i):i.match(u)||[]}var fy=de(function(i,u){try{return Jt(i,e,u)}catch(c){return sd(c)?c:new se(c)}}),bI=xn(function(i,u){return cr(u,function(c){c=cn(c),An(i,c,od(i[c],i))}),i});function AI(i){var u=i==null?0:i.length,c=ee();return i=u?qe(i,function(f){if(typeof f[1]!="function")throw new lr(o);return[c(f[0]),f[1]]}):[],de(function(f){for(var m=-1;++m<u;){var y=i[m];if(Jt(y[0],this,f))return Jt(y[1],this,f)}})}function SI(i){return Zx(pr(i,D))}function pd(i){return function(){return i}}function xI(i,u){return i==null||i!==i?u:i}var PI=h_(),OI=h_(!0);function Lt(i){return i}function dd(i){return Hg(typeof i=="function"?i:pr(i,D))}function TI(i){return Vg(pr(i,D))}function II(i,u){return Gg(i,pr(u,D))}var BI=de(function(i,u){return function(c){return is(c,i,u)}}),RI=de(function(i,u){return function(c){return is(i,c,u)}});function hd(i,u,c){var f=lt(u),m=nc(u,f);c==null&&!(He(u)&&(m.length||!f.length))&&(c=u,u=i,i=this,m=nc(u,lt(u)));var y=!(He(c)&&"chain"in c)||!!c.chain,C=On(i);return cr(m,function(b){var x=u[b];i[b]=x,C&&(i.prototype[b]=function(){var j=this.__chain__;if(y||j){var $=i(this.__wrapped__),L=$.__actions__=Mt(this.__actions__);return L.push({func:x,args:arguments,thisArg:i}),$.__chain__=j,$}return x.apply(i,ti([this.value()],arguments))})}),i}function NI(){return ct._===this&&(ct._=sx),this}function Dd(){}function MI(i){return i=le(i),de(function(u){return Kg(u,i)})}var jI=Vp(qe),$I=Vp(Dg),LI=Vp(gp);function py(i){return Qp(i)?_p(cn(i)):DP(i)}function UI(i){return function(u){return i==null?e:Yi(i,u)}}var kI=m_(),qI=m_(!0);function md(){return[]}function gd(){return!1}function WI(){return{}}function HI(){return""}function zI(){return!0}function VI(i,u){if(i=le(i),i<1||i>rn)return[];var c=ur,f=Ft(i,ur);u=ee(u),i-=ur;for(var m=Ep(f,u);++c<i;)u(c);return m}function GI(i){return ae(i)?qe(i,cn):Zt(i)?[i]:Mt(I_(be(i)))}function KI(i){var u=++ox;return be(i)+u}var JI=cc(function(i,u){return i+u},0),YI=Gp("ceil"),XI=cc(function(i,u){return i/u},1),ZI=Gp("floor");function QI(i){return i&&i.length?rc(i,Lt,Ip):e}function e8(i,u){return i&&i.length?rc(i,ee(u,2),Ip):e}function t8(i){return _g(i,Lt)}function r8(i,u){return _g(i,ee(u,2))}function n8(i){return i&&i.length?rc(i,Lt,Mp):e}function i8(i,u){return i&&i.length?rc(i,ee(u,2),Mp):e}var o8=cc(function(i,u){return i*u},1),u8=Gp("round"),s8=cc(function(i,u){return i-u},0);function a8(i){return i&&i.length?Fp(i,Lt):0}function c8(i,u){return i&&i.length?Fp(i,ee(u,2)):0}return _.after=TT,_.ary=W_,_.assign=_3,_.assignIn=ny,_.assignInWith=vc,_.assignWith=y3,_.at=F3,_.before=H_,_.bind=od,_.bindAll=bI,_.bindKey=z_,_.castArray=WT,_.chain=U_,_.chunk=ZP,_.compact=QP,_.concat=eO,_.cond=AI,_.conforms=SI,_.constant=pd,_.countBy=aT,_.create=E3,_.curry=V_,_.curryRight=G_,_.debounce=K_,_.defaults=v3,_.defaultsDeep=C3,_.defer=IT,_.delay=BT,_.difference=tO,_.differenceBy=rO,_.differenceWith=nO,_.drop=iO,_.dropRight=oO,_.dropRightWhile=uO,_.dropWhile=sO,_.fill=aO,_.filter=lT,_.flatMap=dT,_.flatMapDeep=hT,_.flatMapDepth=DT,_.flatten=M_,_.flattenDeep=cO,_.flattenDepth=lO,_.flip=RT,_.flow=PI,_.flowRight=OI,_.fromPairs=fO,_.functions=O3,_.functionsIn=T3,_.groupBy=mT,_.initial=dO,_.intersection=hO,_.intersectionBy=DO,_.intersectionWith=mO,_.invert=B3,_.invertBy=R3,_.invokeMap=_T,_.iteratee=dd,_.keyBy=yT,_.keys=lt,_.keysIn=$t,_.map=mc,_.mapKeys=M3,_.mapValues=j3,_.matches=TI,_.matchesProperty=II,_.memoize=_c,_.merge=$3,_.mergeWith=iy,_.method=BI,_.methodOf=RI,_.mixin=hd,_.negate=yc,_.nthArg=MI,_.omit=L3,_.omitBy=U3,_.once=NT,_.orderBy=FT,_.over=jI,_.overArgs=MT,_.overEvery=$I,_.overSome=LI,_.partial=ud,_.partialRight=J_,_.partition=ET,_.pick=k3,_.pickBy=oy,_.property=py,_.propertyOf=UI,_.pull=FO,_.pullAll=$_,_.pullAllBy=EO,_.pullAllWith=vO,_.pullAt=CO,_.range=kI,_.rangeRight=qI,_.rearg=jT,_.reject=wT,_.remove=wO,_.rest=$T,_.reverse=nd,_.sampleSize=AT,_.set=W3,_.setWith=H3,_.shuffle=ST,_.slice=bO,_.sortBy=OT,_.sortedUniq=IO,_.sortedUniqBy=BO,_.split=dI,_.spread=LT,_.tail=RO,_.take=NO,_.takeRight=MO,_.takeRightWhile=jO,_.takeWhile=$O,_.tap=QO,_.throttle=UT,_.thru=Dc,_.toArray=ey,_.toPairs=uy,_.toPairsIn=sy,_.toPath=GI,_.toPlainObject=ry,_.transform=z3,_.unary=kT,_.union=LO,_.unionBy=UO,_.unionWith=kO,_.uniq=qO,_.uniqBy=WO,_.uniqWith=HO,_.unset=V3,_.unzip=id,_.unzipWith=L_,_.update=G3,_.updateWith=K3,_.values=qo,_.valuesIn=J3,_.without=zO,_.words=ly,_.wrap=qT,_.xor=VO,_.xorBy=GO,_.xorWith=KO,_.zip=JO,_.zipObject=YO,_.zipObjectDeep=XO,_.zipWith=ZO,_.entries=uy,_.entriesIn=sy,_.extend=ny,_.extendWith=vc,hd(_,_),_.add=JI,_.attempt=fy,_.camelCase=Q3,_.capitalize=ay,_.ceil=YI,_.clamp=Y3,_.clone=HT,_.cloneDeep=VT,_.cloneDeepWith=GT,_.cloneWith=zT,_.conformsTo=KT,_.deburr=cy,_.defaultTo=xI,_.divide=XI,_.endsWith=eI,_.eq=Tr,_.escape=tI,_.escapeRegExp=rI,_.every=cT,_.find=fT,_.findIndex=R_,_.findKey=w3,_.findLast=pT,_.findLastIndex=N_,_.findLastKey=b3,_.floor=ZI,_.forEach=k_,_.forEachRight=q_,_.forIn=A3,_.forInRight=S3,_.forOwn=x3,_.forOwnRight=P3,_.get=cd,_.gt=JT,_.gte=YT,_.has=I3,_.hasIn=ld,_.head=j_,_.identity=Lt,_.includes=gT,_.indexOf=pO,_.inRange=X3,_.invoke=N3,_.isArguments=Qi,_.isArray=ae,_.isArrayBuffer=XT,_.isArrayLike=jt,_.isArrayLikeObject=Xe,_.isBoolean=ZT,_.isBuffer=ci,_.isDate=QT,_.isElement=e3,_.isEmpty=t3,_.isEqual=r3,_.isEqualWith=n3,_.isError=sd,_.isFinite=i3,_.isFunction=On,_.isInteger=Y_,_.isLength=Fc,_.isMap=X_,_.isMatch=o3,_.isMatchWith=u3,_.isNaN=s3,_.isNative=a3,_.isNil=l3,_.isNull=c3,_.isNumber=Z_,_.isObject=He,_.isObjectLike=Ge,_.isPlainObject=ls,_.isRegExp=ad,_.isSafeInteger=f3,_.isSet=Q_,_.isString=Ec,_.isSymbol=Zt,_.isTypedArray=ko,_.isUndefined=p3,_.isWeakMap=d3,_.isWeakSet=h3,_.join=gO,_.kebabCase=nI,_.last=hr,_.lastIndexOf=_O,_.lowerCase=iI,_.lowerFirst=oI,_.lt=D3,_.lte=m3,_.max=QI,_.maxBy=e8,_.mean=t8,_.meanBy=r8,_.min=n8,_.minBy=i8,_.stubArray=md,_.stubFalse=gd,_.stubObject=WI,_.stubString=HI,_.stubTrue=zI,_.multiply=o8,_.nth=yO,_.noConflict=NI,_.noop=Dd,_.now=gc,_.pad=uI,_.padEnd=sI,_.padStart=aI,_.parseInt=cI,_.random=Z3,_.reduce=vT,_.reduceRight=CT,_.repeat=lI,_.replace=fI,_.result=q3,_.round=u8,_.runInContext=A,_.sample=bT,_.size=xT,_.snakeCase=pI,_.some=PT,_.sortedIndex=AO,_.sortedIndexBy=SO,_.sortedIndexOf=xO,_.sortedLastIndex=PO,_.sortedLastIndexBy=OO,_.sortedLastIndexOf=TO,_.startCase=hI,_.startsWith=DI,_.subtract=s8,_.sum=a8,_.sumBy=c8,_.template=mI,_.times=VI,_.toFinite=Tn,_.toInteger=le,_.toLength=ty,_.toLower=gI,_.toNumber=Dr,_.toSafeInteger=g3,_.toString=be,_.toUpper=_I,_.trim=yI,_.trimEnd=FI,_.trimStart=EI,_.truncate=vI,_.unescape=CI,_.uniqueId=KI,_.upperCase=wI,_.upperFirst=fd,_.each=k_,_.eachRight=q_,_.first=j_,hd(_,(function(){var i={};return sn(_,function(u,c){we.call(_.prototype,c)||(i[c]=u)}),i})(),{chain:!1}),_.VERSION=t,cr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(i){_[i].placeholder=_}),cr(["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,ur),type:i+(f.__dir__<0?"Right":"")}),f},me.prototype[i+"Right"]=function(c){return this.reverse()[i](c).reverse()}}),cr(["filter","map","takeWhile"],function(i,u){var c=u+1,f=c==Sr||c==Fa;me.prototype[i]=function(m){var y=this.clone();return y.__iteratees__.push({iteratee:ee(m,3),type:c}),y.__filtered__=y.__filtered__||f,y}}),cr(["head","last"],function(i,u){var c="take"+(u?"Right":"");me.prototype[i]=function(){return this[c](1).value()[0]}}),cr(["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(Lt)},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 is(c,i,u)})}),me.prototype.reject=function(i){return this.filter(yc(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(ur)},sn(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],y=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__,K=!!this.__actions__.length,te=y&&!H,pe=x&&!K;if(!y&&$){C=pe?C:new me(this);var re=i.apply(C,b);return re.__actions__.push({func:Dc,args:[L],thisArg:e}),new fr(re,H)}return te&&pe?i.apply(this,b):(re=this.thru(L),te?f?re.value()[0]:re.value():re)})}),cr(["pop","push","shift","sort","splice","unshift"],function(i){var u=ka[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 y=this.value();return u.apply(ae(y)?y:[],m)}return this[c](function(C){return u.apply(ae(C)?C:[],m)})}}),sn(me.prototype,function(i,u){var c=_[u];if(c){var f=c.name+"";we.call(Mo,f)||(Mo[f]=[]),Mo[f].push({name:u,func:c})}}),Mo[ac(e,O).name]=[{name:"wrapper",func:e}],me.prototype.clone=Cx,me.prototype.reverse=wx,me.prototype.value=bx,_.prototype.at=eT,_.prototype.chain=tT,_.prototype.commit=rT,_.prototype.next=nT,_.prototype.plant=oT,_.prototype.reverse=uT,_.prototype.toJSON=_.prototype.valueOf=_.prototype.value=sT,_.prototype.first=_.prototype.head,Xu&&(_.prototype[Xu]=iT),_}),ni=rx();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(ct._=ni,define(function(){return ni})):zi?((zi.exports=ni)._=ni,dp._=ni):ct._=ni}).call(iu)});var dC=N((pC,$h)=>{d();(function(e){function t(){var n=e();return n.default||n}if(typeof pC=="object"&&typeof $h=="object")$h.exports=t();else if(typeof define=="function"&&define.amd)define(t);else{var r=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};r.doc=t()}})(function(){"use strict";var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,n=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 r(R))!n.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:()=>lp,printer:()=>Na,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 F=D("at",function(){if(Array.isArray(this)||typeof this=="string")return g}),w=F,v=()=>{},S=v,O="string",P="array",I="cursor",U="indent",q="align",J="trim",Q="group",fe="fill",ye="if-break",We="indent-if-break",gt="line-suffix",tn="line-suffix-boundary",dt="line",Sr="label",or="break-parent",Fa=new Set([I,U,q,J,Q,fe,ye,We,gt,tn,dt,Sr,or]);function Fn(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 rn(h){if(typeof h=="string")return O;if(Array.isArray(h))return P;if(!h)return;let{type:R}=h;if(Fa.has(R))return R}var En=rn,bo=h=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(h);function ur(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(En(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([...Fa].map(ie=>`'${ie}'`));return`Unexpected doc.type '${h.type}'.
|
|
30
|
+
Expected it to be ${z}.`}var Nf=class extends Error{name="InvalidDocError";constructor(h){super(ur(h)),this.doc=h}},Jn=Nf,Ea={};function Yn(h,R,W,z){let ie=[h];for(;ie.length>0;){let G=ie.pop();if(G===Ea){W(ie.pop());continue}W&&ie.push(G,Ea);let X=En(G);if(!X)throw new Jn(G);if(R?.(G)!==!1)switch(X){case P:case fe:{let ge=X===P?G:G.parts;for(let ke=ge.length,Ce=ke-1;Ce>=0;--Ce)ie.push(ge[Ce]);break}case ye:ie.push(G.flatContents,G.breakContents);break;case Q:if(z&&G.expandedStates)for(let ge=G.expandedStates.length,ke=ge-1;ke>=0;--ke)ie.push(G.expandedStates[ke]);else ie.push(G.contents);break;case q:case U:case We:case Sr:case gt:ie.push(G.contents);break;case O:case I:case J:case tn:case dt:case or:break;default:throw new Jn(G)}}}var Xn=Yn;function Ao(h,R){if(typeof h=="string")return R(h);let W=new Map;return z(h);function z(G){if(W.has(G))return W.get(G);let X=ie(G);return W.set(G,X),X}function ie(G){switch(En(G)){case P:return R(G.map(z));case fe:return R({...G,parts:G.parts.map(z)});case ye:return R({...G,breakContents:z(G.breakContents),flatContents:z(G.flatContents)});case Q:{let{expandedStates:X,contents:ge}=G;return X?(X=X.map(z),ge=X[0]):ge=z(ge),R({...G,contents:ge,expandedStates:X})}case q:case U:case We:case Sr:case gt:return R({...G,contents:z(G.contents)});case O:case I:case J:case tn:case dt:case or:return R(G);default:throw new Jn(G)}}}function vn(h,R,W){let z=W,ie=!1;function G(X){if(ie)return!1;let ge=R(X);ge!==void 0&&(ie=!0,z=ge)}return Xn(h,G),z}function Ri(h){if(h.type===Q&&h.break||h.type===dt&&h.hard||h.type===or)return!0}function Mf(h){return vn(h,Ri,!1)}function Ni(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(G){if(G.type===or&&Ni(W),G.type===Q){if(W.push(G),R.has(G))return!1;R.add(G)}}function ie(G){G.type===Q&&W.pop().break&&Ni(W)}Xn(h,z,ie,!0)}function va(h){return h.type===dt&&!h.hard?h.soft?"":" ":h.type===ye?h.flatContents:h}function zt(h){return Ao(h,va)}function Zn(h){for(h=[...h];h.length>=2&&w(0,h,-2).type===dt&&w(0,h,-1).type===or;)h.length-=2;if(h.length>0){let R=Mi(w(0,h,-1));h[h.length-1]=R}return h}function Mi(h){switch(En(h)){case U:case We:case Q:case gt:case Sr:{let R=Mi(h.contents);return{...h,contents:R}}case ye:return{...h,breakContents:Mi(h.breakContents),flatContents:Mi(h.flatContents)};case fe:return{...h,parts:Zn(h.parts)};case P:return Zn(h);case O:return Fn(h);case q:case I:case J:case tn:case dt:case or:break;default:throw new Jn(h)}return h}function xr(h){return Mi(jf(h))}function Ca(h){switch(En(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 ye: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 J:case tn:case dt:case Sr:case or:break;default:throw new Jn(h)}return h}function jf(h){return Ao(h,R=>Ca(R))}function ji(h,R=ku){return Ao(h,W=>typeof W=="string"?ba(R,W.split(`
|
|
31
|
+
`)):W)}function Vt(h){if(h.type===dt)return!0}function $i(h){return vn(h,Vt,!1)}var xt=S,wa=S,Li=S,$f=S;function nn(h){return xt(h),{type:U,contents:h}}function Gt(h,R){return $f(h),xt(R),{type:q,contents:R,n:h}}function Bu(h){return Gt(Number.NEGATIVE_INFINITY,h)}function Ru(h){return Gt({type:"root"},h)}function Nu(h){return Gt(-1,h)}function Mu(h,R,W){xt(h);let z=h;if(R>0){for(let ie=0;ie<Math.floor(R/W);++ie)z=nn(z);z=Gt(R%W,z),z=Gt(Number.NEGATIVE_INFINITY,z)}return z}var Ui={type:or},ju={type:I};function $u(h){return Li(h),{type:fe,parts:h}}function xo(h,R={}){return xt(h),wa(R.expandedStates,!0),{type:Q,id:R.id,contents:h,break:!!R.shouldBreak,expandedStates:R.expandedStates}}function Lu(h,R){return xo(h[0],{...R,expandedStates:h})}function Lf(h,R="",W={}){return xt(h),R!==""&&xt(R),{type:ye,breakContents:h,flatContents:R,groupId:W.groupId}}function Uf(h,R){return xt(h),{type:We,contents:h,groupId:R.groupId,negate:R.negate}}function ba(h,R){xt(h),wa(R);let W=[];for(let z=0;z<R.length;z++)z!==0&&W.push(h),W.push(R[z]);return W}function Aa(h,R){return xt(R),h?{type:Sr,label:h,contents:R}:R}var Sa={type:dt},kf={type:dt,soft:!0},Uu={type:dt,hard:!0},qf=[Uu,Ui],xa={type:dt,hard:!0,literal:!0},ku=[xa,Ui];function Wf(h){return xt(h),{type:gt,contents:h}}var Hf={type:tn},zf={type:J},qu=String.prototype.replaceAll??function(h,R){return h.global?this.replace(h,R):this.split(h).join(R)},Vf=D("replaceAll",function(){if(typeof this=="string")return qu}),Wu=Vf,Gf="cr",Kf="crlf",Jf="\r",Yf=`\r
|
|
32
|
+
`,Xf=`
|
|
33
|
+
`,Zf=Xf;function Qf(h){return h===Gf?Jf:h===Kf?Yf:Zf}var ep=()=>/[#*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 Pa(h){return h===12288||h>=65281&&h<=65376||h>=65504&&h<=65510}function tp(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 rp="\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",np=/[^\x20-\x7F]/u,ip=new Set(rp);function op(h){if(!h)return 0;if(!np.test(h))return h.length;h=h.replace(ep(),W=>ip.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+=Pa(z)||tp(z)?2:1)}return R}var Oa=op,ki=0,Ta=1,qi=2,Ia=3,up={type:ki},sp={type:Ta},Hu={value:"",length:0,queue:[],get root(){return Hu}};function zu(h,R,W){let z=R.type===Ta?h.queue.slice(0,-1):[...h.queue,R],ie="",G=0,X=0,ge=0;for(let Ne of z)switch(Ne.type){case ki:rt(),W.useTabs?ke(1):Ce(W.tabWidth);break;case Ia:{let{string:Pt}=Ne;rt(),ie+=Pt,G+=Pt.length;break}case qi:{let{width:Pt}=Ne;X+=1,ge+=Pt;break}default:throw new Error(`Unexpected indent comment '${Ne.type}'.`)}return on(),{...h,value:ie,length:G,queue:z};function ke(Ne){ie+=" ".repeat(Ne),G+=W.tabWidth*Ne}function Ce(Ne){ie+=" ".repeat(Ne),G+=Ne}function rt(){W.useTabs?Be():on()}function Be(){X>0&&ke(X),st()}function on(){ge>0&&Ce(ge),st()}function st(){X=0,ge=0}}function Ba(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=sp:z={type:qi,width:R}:z={type:Ia,string:R},zu(h,z,W)}function ap(h,R){return zu(h,up,R)}function cp(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 Ra(h){let R=cp(h);return{text:R===0?h:h.slice(0,h.length-R),count:R}}var _t=Symbol("MODE_BREAK"),Kt=Symbol("MODE_FLAT"),Po=Symbol("DOC_FILL_PRINTED_LENGTH");function Wi(h,R,W,z,ie,G){if(W===Number.POSITIVE_INFINITY)return!0;let X=R.length,ge=!1,ke=[h],Ce="";for(;W>=0;){if(ke.length===0){if(X===0)return!0;ke.push(R[--X]);continue}let{mode:rt,doc:Be}=ke.pop(),on=En(Be);switch(on){case O:Be&&(ge&&(Ce+=" ",W-=1,ge=!1),Ce+=Be,W-=Oa(Be));break;case P:case fe:{let st=on===P?Be:Be.parts,Ne=Be[Po]??0;for(let Pt=st.length-1;Pt>=Ne;Pt--)ke.push({mode:rt,doc:st[Pt]});break}case U:case q:case We:case Sr:ke.push({mode:rt,doc:Be.contents});break;case J:{let{text:st,count:Ne}=Ra(Ce);Ce=st,W+=Ne;break}case Q:{if(G&&Be.break)return!1;let st=Be.break?_t:rt,Ne=Be.expandedStates&&st===_t?w(0,Be.expandedStates,-1):Be.contents;ke.push({mode:st,doc:Ne});break}case ye:{let Ne=(Be.groupId?ie[Be.groupId]||Kt:rt)===_t?Be.breakContents:Be.flatContents;Ne&&ke.push({mode:rt,doc:Ne});break}case dt:if(rt===_t||Be.hard)return!0;Be.soft||(ge=!0);break;case gt:z=!0;break;case tn:if(z)return!1;break}}return!1}function Vu(h,R){let W=Object.create(null),z=R.printWidth,ie=Qf(R.endOfLine),G=0,X=[{indent:Hu,mode:_t,doc:h}],ge="",ke=!1,Ce=[],rt=[],Be=[],on=[],st=0;for(So(h);X.length>0;){let{indent:Fe,mode:ht,doc:ne}=X.pop();switch(En(ne)){case O:{let at=ie!==`
|
|
34
|
+
`?Wu(0,ne,`
|
|
35
|
+
`,ie):ne;at&&(ge+=at,X.length>0&&(G+=Oa(at)));break}case P:for(let at=ne.length-1;at>=0;at--)X.push({indent:Fe,mode:ht,doc:ne[at]});break;case I:if(rt.length>=2)throw new Error("There are too many 'cursor' in doc.");rt.push(st+ge.length);break;case U:X.push({indent:ap(Fe,R),mode:ht,doc:ne.contents});break;case q:X.push({indent:Ba(Fe,ne.n,R),mode:ht,doc:ne.contents});break;case J:Ma();break;case Q:switch(ht){case Kt:if(!ke){X.push({indent:Fe,mode:ne.break?_t:Kt,doc:ne.contents});break}case _t:{ke=!1;let at={indent:Fe,mode:Kt,doc:ne.contents},yt=z-G,Cn=Ce.length>0;if(!ne.break&&Wi(at,X,yt,Cn,W))X.push(at);else if(ne.expandedStates){let Qn=w(0,ne.expandedStates,-1);if(ne.break){X.push({indent:Fe,mode:_t,doc:Qn});break}else for(let sr=1;sr<ne.expandedStates.length+1;sr++)if(sr>=ne.expandedStates.length){X.push({indent:Fe,mode:_t,doc:Qn});break}else{let Hi=ne.expandedStates[sr],un={indent:Fe,mode:Kt,doc:Hi};if(Wi(un,X,yt,Cn,W)){X.push(un);break}}}else X.push({indent:Fe,mode:_t,doc:ne.contents});break}}ne.id&&(W[ne.id]=w(0,X,-1).mode);break;case fe:{let at=z-G,yt=ne[Po]??0,{parts:Cn}=ne,Qn=Cn.length-yt;if(Qn===0)break;let sr=Cn[yt+0],Hi=Cn[yt+1],un={indent:Fe,mode:Kt,doc:sr},Ku={indent:Fe,mode:_t,doc:sr},Ju=Wi(un,[],at,Ce.length>0,W,!0);if(Qn===1){Ju?X.push(un):X.push(Ku);break}let ja={indent:Fe,mode:Kt,doc:Hi},xe={indent:Fe,mode:_t,doc:Hi};if(Qn===2){Ju?X.push(ja,un):X.push(xe,Ku);break}let Oe=Cn[yt+2],fp={indent:Fe,mode:ht,doc:{...ne,[Po]:yt+2}},pp=Wi({indent:Fe,mode:Kt,doc:[sr,Hi,Oe]},[],at,Ce.length>0,W,!0);X.push(fp),pp?X.push(ja,un):Ju?X.push(xe,un):X.push(xe,Ku);break}case ye:case We:{let at=ne.groupId?W[ne.groupId]:ht;if(at===_t){let yt=ne.type===ye?ne.breakContents:ne.negate?ne.contents:nn(ne.contents);yt&&X.push({indent:Fe,mode:ht,doc:yt})}if(at===Kt){let yt=ne.type===ye?ne.flatContents:ne.negate?nn(ne.contents):ne.contents;yt&&X.push({indent:Fe,mode:ht,doc:yt})}break}case gt:Ce.push({indent:Fe,mode:ht,doc:ne.contents});break;case tn:Ce.length>0&&X.push({indent:Fe,mode:ht,doc:Uu});break;case dt:switch(ht){case Kt:if(ne.hard)ke=!0;else{ne.soft||(ge+=" ",G+=1);break}case _t:if(Ce.length>0){X.push({indent:Fe,mode:ht,doc:ne},...Ce.reverse()),Ce.length=0;break}ne.literal?(ge+=ie,G=0,Fe.root&&(Fe.root.value&&(ge+=Fe.root.value),G=Fe.root.length)):(Ma(),ge+=ie+Fe.value,G=Fe.length);break}break;case Sr:X.push({indent:Fe,mode:ht,doc:ne.contents});break;case or:break;default:throw new Jn(ne)}X.length===0&&Ce.length>0&&(X.push(...Ce.reverse()),Ce.length=0)}let Ne=Be.join("")+ge,Pt=[...on,...rt];if(Pt.length!==2)return{formatted:Ne};let Gu=Pt[0];return{formatted:Ne,cursorNodeStart:Gu,cursorNodeText:Ne.slice(Gu,w(0,Pt,-1))};function Ma(){let{text:Fe,count:ht}=Ra(ge);Fe&&(Be.push(Fe),st+=Fe.length),ge="",G-=ht,rt.length>0&&(on.push(...rt.map(ne=>Math.min(ne,st))),rt.length=0)}}var lp={join:ba,line:Sa,softline:kf,hardline:qf,literalline:ku,group:xo,conditionalGroup:Lu,fill:$u,lineSuffix:Wf,lineSuffixBoundary:Hf,cursor:ju,breakParent:Ui,ifBreak:Lf,trim:zf,indent:nn,indentIfBreak:Uf,align:Gt,addAlignmentToDoc:Mu,markAsRoot:Ru,dedentToRoot:Bu,dedent:Nu,hardlineWithoutBreakParent:Uu,literallineWithoutBreakParent:xa,label:Aa,concat:h=>h},Na={printDocToString:Vu},Oo={willBreak:Mf,traverseDoc:Xn,findInDoc:vn,mapDoc:Ao,removeLines:zt,stripTrailingHardline:xr,replaceEndOfLine:ji,canBreak:$i};return a(l)})});var VC=N((hre,zC)=>{"use strict";d();var Wh=Object.defineProperty,IN=Object.getOwnPropertyDescriptor,yC=Object.getOwnPropertyNames,BN=Object.prototype.hasOwnProperty,Me=(e,t)=>function(){return e&&(t=(0,e[yC(e)[0]])(e=0)),t},FC=(e,t)=>{for(var r in t)Wh(e,r,{get:t[r],enumerable:!0})},RN=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of yC(t))!BN.call(e,o)&&o!==r&&Wh(e,o,{get:()=>t[o],enumerable:!(n=IN(t,o))||n.enumerable});return e},hC=e=>RN(Wh({},"__esModule",{value:!0}),e),DC,EC,NN=Me({"scripts/build/shims/shared.js"(){DC=1,EC=(e,t)=>(r,n,...o)=>r|DC&&n==null?void 0:(t.call(n)??n[e]).apply(n,o)}}),mC,gC,vC,MN=Me({"scripts/build/shims/method-replace-all.js"(){NN(),mC=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},gC=EC("replaceAll",function(){if(typeof this=="string")return mC}),vC=gC}});function $s(e){return(t,r,n)=>{let o=!!n?.backwards;if(r===!1)return!1;let{length:s}=t,a=r;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 CC,vi,Hh,zh,co=Me({"src/utilities/skip.js"(){CC=$s(/\s/u),vi=$s(" "),Hh=$s(",; "),zh=$s(/[^\n\r]/u)}});function jN(e,t){if(t===!1)return!1;if(e.charAt(t)==="/"&&e.charAt(t+1)==="*"){for(let r=t+2;r<e.length;++r)if(e.charAt(r)==="*"&&e.charAt(r+1)==="/")return r+2}return t}var vl,Vh=Me({"src/utilities/skip-inline-comment.js"(){vl=jN}});function $N(e,t,r){let n=!!r?.backwards;if(t===!1)return!1;let o=e.charAt(t);if(n){if(e.charAt(t-1)==="\r"&&o===`
|
|
36
|
+
`)return t-2;if(kh(o))return t-1}else{if(o==="\r"&&e.charAt(t+1)===`
|
|
37
|
+
`)return t+2;if(kh(o))return t+1}return t}var kh,ao,Ls=Me({"src/utilities/skip-newline.js"(){kh=e=>e===`
|
|
38
|
+
`||e==="\r"||e==="\u2028"||e==="\u2029",ao=$N}});function LN(e,t){return t===!1?!1:e.charAt(t)==="/"&&e.charAt(t+1)==="/"?zh(e,t):t}var Cl,Gh=Me({"src/utilities/skip-trailing-comment.js"(){co(),Cl=LN}});function UN(e,t){let r=null,n=t;for(;n!==r;)r=n,n=vi(e,n),n=vl(e,n),n=Cl(e,n),n=ao(e,n);return n}var wl,wC=Me({"src/utilities/get-next-non-space-non-comment-character-index.js"(){co(),Vh(),Ls(),Gh(),wl=UN}});function kN(e,t,r={}){let n=vi(e,r.backwards?t-1:t,r),o=ao(e,n,r);return n!==o}var Kh,bC=Me({"src/utilities/has-newline.js"(){co(),Ls(),Kh=kN}});function qN(e,t){let r=null,n=t;for(;n!==r;)r=n,n=Hh(e,n),n=vl(e,n),n=vi(e,n);return n=Cl(e,n),n=ao(e,n),n!==!1&&Kh(e,n)}var bl,WN=Me({"src/utilities/is-next-line-empty.js"(){bC(),co(),Vh(),Ls(),Gh(),bl=qN}});function HN(e,t){let r=t-1;r=vi(e,r,{backwards:!0}),r=ao(e,r,{backwards:!0}),r=vi(e,r,{backwards:!0});let n=ao(e,r,{backwards:!0});return r!==n}var Jh,zN=Me({"src/utilities/is-previous-line-empty.js"(){co(),Ls(),Jh=HN}});function VN(e){let t=e.type||e.kind||"(unknown type)",r=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 r.length>20&&(r=r.slice(0,19)+"\u2026"),t+(r?" "+r:"")}function Yh(e,t){(e.comments??(e.comments=[])).push(t),t.printed=!1,t.nodeDescription=VN(e)}function GN(e,t){t.leading=!0,t.trailing=!1,Yh(e,t)}function KN(e,t,r){t.leading=!1,t.trailing=!1,r&&(t.marker=r),Yh(e,t)}function JN(e,t){t.leading=!1,t.trailing=!0,Yh(e,t)}var YN=Me({"src/main/comments/utilities.js"(){}});function XN(e,t,r=0){let n=0;for(let o=r;o<e.length;++o)e[o]===" "?n=n+t-n%t:n++;return n}var Xh,AC=Me({"src/utilities/get-alignment-size.js"(){Xh=XN}});function ZN(e,t){let r=e.lastIndexOf(`
|
|
39
|
+
`);return r===-1?0:Xh(e.slice(r+1).match(/^[\t ]*/u)[0],t)}var SC,QN=Me({"src/utilities/get-indent-size.js"(){AC(),SC=ZN}});function eM(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var tM=Me({"node_modules/escape-string-regexp/index.js"(){}});function rM(e,t){let r=e.matchAll(new RegExp(`(?:${eM(t)})+`,"gu"));return r.reduce||(r=[...r]),r.reduce((n,[o])=>Math.max(n,o.length),0)/t.length}var xC,nM=Me({"src/utilities/get-max-continuous-count.js"(){tM(),xC=rM}});function iM(e,t){let r=wl(e,t);return r===!1?"":e.charAt(r)}var PC,oM=Me({"src/utilities/get-next-non-space-non-comment-character.js"(){wC(),PC=iM}});function uM(e,t){let{preferred:r,alternate:n}=t===!0||t===qh?OC:TC,{length:o}=e,s=0,a=0;for(let l=0;l<o;l++){let p=e.charCodeAt(l);p===r.codePoint?s++:p===n.codePoint&&a++}return(s>a?n:r).character}var qh,_C,Lh,Uh,OC,TC,IC,sM=Me({"src/utilities/get-preferred-quote.js"(){qh="'",_C='"',Lh=Object.freeze({character:qh,codePoint:39}),Uh=Object.freeze({character:_C,codePoint:34}),OC=Object.freeze({preferred:Lh,alternate:Uh}),TC=Object.freeze({preferred:Uh,alternate:Lh}),IC=uM}}),BC,aM=Me({"node_modules/emoji-regex/index.mjs"(){BC=()=>/[#*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 cM(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function lM(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 fM=Me({"node_modules/get-east-asian-width/lookup.js"(){}}),pM=Me({"node_modules/get-east-asian-width/index.js"(){fM()}}),RC,dM=Me({"src/utilities/narrow-emojis.evaluate.js"(){RC="\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 hM(e){if(!e)return 0;if(!NC.test(e))return e.length;e=e.replace(BC(),r=>MC.has(r)?" ":" ");let t=0;for(let r of e){let n=r.codePointAt(0);n<=31||n>=127&&n<=159||n>=768&&n<=879||n>=65024&&n<=65039||(t+=cM(n)||lM(n)?2:1)}return t}var NC,MC,jC,DM=Me({"src/utilities/get-string-width.js"(){aM(),pM(),dM(),NC=/[^\x20-\x7F]/u,MC=new Set(RC),jC=hM}});function mM(e,t,r){for(let n=t;n<r;++n)if(e.charAt(n)===`
|
|
40
|
+
`)return!0;return!1}var $C,gM=Me({"src/utilities/has-newline-in-range.js"(){$C=mM}});function _M(e,t,r={}){return vi(e,r.backwards?t-1:t,r)!==t}var LC,yM=Me({"src/utilities/has-spaces.js"(){co(),LC=_M}}),UC={};FC(UC,{addDanglingComment:()=>KN,addLeadingComment:()=>GN,addTrailingComment:()=>JN,getAlignmentSize:()=>Xh,getIndentSize:()=>SC,getMaxContinuousCount:()=>xC,getNextNonSpaceNonCommentCharacter:()=>PC,getNextNonSpaceNonCommentCharacterIndex:()=>EM,getPreferredQuote:()=>IC,getStringWidth:()=>jC,hasNewline:()=>Kh,hasNewlineInRange:()=>$C,hasSpaces:()=>LC,isNextLineEmpty:()=>AM,isNextLineEmptyAfterIndex:()=>bl,isPreviousLineEmpty:()=>CM,makeString:()=>bM,skip:()=>$s,skipEverythingButNewLine:()=>zh,skipInlineComment:()=>vl,skipNewline:()=>ao,skipSpaces:()=>vi,skipToLineEnd:()=>Hh,skipTrailingComment:()=>Cl,skipWhitespace:()=>CC});function FM(e,t,r){return wl(e,r(t))}function EM(e,t){return arguments.length===2||typeof t=="number"?wl(e,t):FM(...arguments)}function vM(e,t,r){return Jh(e,r(t))}function CM(e,t){return arguments.length===2||typeof t=="number"?Jh(e,t):vM(...arguments)}function wM(e,t,r){return bl(e,r(t))}function bM(e,t,r){let n=t==='"'?"'":'"',s=vC(0,e,/\\(.)|(["'])/gsu,(a,l,p)=>l===n?l:p===t?"\\"+p:p||(r&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/u.test(l)?l:"\\"+l));return t+s+t}function AM(e,t){return arguments.length===2||typeof t=="number"?bl(e,t):wM(...arguments)}var SM=Me({"src/utilities/public.js"(){MN(),wC(),WN(),zN(),YN(),AC(),QN(),nM(),oM(),sM(),DM(),bC(),gM(),yM(),co(),Vh(),Ls(),Gh()}}),kC={};FC(kC,{default:()=>qC});var qC,xM=Me({"src/main/version.evaluate.js"(){qC="3.8.4"}}),WC=import("./prettier-EGVCP5CY.js"),PM=["formatWithCursor","format","check","resolveConfig","resolveConfigFile","clearConfigCache","getFileInfo","getSupportInfo"],ou=Object.create(null);for(let e of PM)ou[e]=async(...t)=>(await WC)[e](...t);var OM=["parse","formatAST","formatDoc","printToDoc","printDocToString"],HC=Object.create(null);for(let e of OM)HC[e]=async(...t)=>(await WC).__debug[e](...t);ou.__debug=HC;ou.util=(SM(),hC(UC)),ou.doc=dC(),ou.version=(xM(),hC(kC)).default;zC.exports=ou});var GC=N(uu=>{"use strict";d();var TM=uu&&uu.__awaiter||function(e,t,r,n){function o(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function l(g){try{D(n.next(g))}catch(F){a(F)}}function p(g){try{D(n.throw(g))}catch(F){a(F)}}function D(g){g.done?s(g.value):o(g.value).then(l,p)}D((n=n.apply(e,t||[])).next())})};Object.defineProperty(uu,"__esModule",{value:!0});uu.format=void 0;var IM=VC();function BM(e,t){return TM(this,void 0,void 0,function*(){return t.format?(0,IM.format)(e,Object.assign({parser:"typescript"},t.style)):e})}uu.format=BM});var Al=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 RM(e){return"comment"in e&&e.comment!=null&&e.comment!==""||"deprecated"in e&&e.deprecated===!0}kt.hasComment=RM;function NM(e){return"standaloneName"in e&&e.standaloneName!=null&&e.standaloneName!==""}kt.hasStandaloneName=NM;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 KC=$n();pt.Parent=Symbol("Parent");pt.Types=Symbol("Types");pt.Intersection=Symbol("Intersection");pt.getRootSchema=(0,KC.memoize)(e=>{let t=e[pt.Parent];return t?(0,pt.getRootSchema)(t):e});function MM(e){return e===!0||e===!1}pt.isBoolean=MM;function jM(e){return!(0,KC.isPlainObject)(e)}pt.isPrimitive=jM;function $M(e){return Array.isArray(e.type)||"anyOf"in e||"oneOf"in e}pt.isCompound=$M});var su=N((vre,fo)=>{"use strict";d();function JC(e){return typeof e>"u"||e===null}function LM(e){return typeof e=="object"&&e!==null}function UM(e){return Array.isArray(e)?e:JC(e)?[]:[e]}function kM(e,t){var r,n,o,s;if(t)for(s=Object.keys(t),r=0,n=s.length;r<n;r+=1)o=s[r],e[o]=t[o];return e}function qM(e,t){var r="",n;for(n=0;n<t;n+=1)r+=e;return r}function WM(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}fo.exports.isNothing=JC;fo.exports.isObject=LM;fo.exports.toArray=UM;fo.exports.repeat=qM;fo.exports.isNegativeZero=WM;fo.exports.extend=kM});var au=N((wre,XC)=>{"use strict";d();function YC(e,t){var r="",n=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
|
|
41
|
+
|
|
42
|
+
`+e.mark.snippet),n+" "+r):n}function Us(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=YC(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}Us.prototype=Object.create(Error.prototype);Us.prototype.constructor=Us;Us.prototype.toString=function(t){return this.name+": "+YC(this,t)};XC.exports=Us});var QC=N((Are,ZC)=>{"use strict";d();var ks=su();function Zh(e,t,r,n,o){var s="",a="",l=Math.floor(o/2)-1;return n-t>l&&(s=" ... ",t=n-l+s.length),r-n>l&&(a=" ...",r=n+l-a.length),{str:s+e.slice(t,r).replace(/\t/g,"\u2192")+a,pos:n-t+s.length}}function Qh(e,t){return ks.repeat(" ",t-e.length)+e}function HM(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 r=/\r?\n|\r|\0/g,n=[0],o=[],s,a=-1;s=r.exec(e.buffer);)o.push(s.index),n.push(s.index+s[0].length),e.position<=s.index&&a<0&&(a=n.length-2);a<0&&(a=n.length-1);var l="",p,D,g=Math.min(e.line+t.linesAfter,o.length).toString().length,F=t.maxLength-(t.indent+g+3);for(p=1;p<=t.linesBefore&&!(a-p<0);p++)D=Zh(e.buffer,n[a-p],o[a-p],e.position-(n[a]-n[a-p]),F),l=ks.repeat(" ",t.indent)+Qh((e.line-p+1).toString(),g)+" | "+D.str+`
|
|
43
|
+
`+l;for(D=Zh(e.buffer,n[a],o[a],e.position,F),l+=ks.repeat(" ",t.indent)+Qh((e.line+1).toString(),g)+" | "+D.str+`
|
|
44
|
+
`,l+=ks.repeat("-",t.indent+g+3+D.pos)+`^
|
|
45
|
+
`,p=1;p<=t.linesAfter&&!(a+p>=o.length);p++)D=Zh(e.buffer,n[a+p],o[a+p],e.position-(n[a]-n[a+p]),F),l+=ks.repeat(" ",t.indent)+Qh((e.line+p+1).toString(),g)+" | "+D.str+`
|
|
46
|
+
`;return l.replace(/\n$/,"")}ZC.exports=HM});var At=N((xre,tw)=>{"use strict";d();var ew=au(),zM=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],VM=["scalar","sequence","mapping"];function GM(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(n){t[String(n)]=r})}),t}function KM(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(zM.indexOf(r)===-1)throw new ew('Unknown option "'+r+'" 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(r){return r},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=GM(t.styleAliases||null),VM.indexOf(this.kind)===-1)throw new ew('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}tw.exports=KM});var rD=N((Ore,nw)=>{"use strict";d();var qs=au(),eD=At();function rw(e,t){var r=[];return e[t].forEach(function(n){var o=r.length;r.forEach(function(s,a){s.tag===n.tag&&s.kind===n.kind&&s.multi===n.multi&&(o=a)}),r[o]=n}),r}function JM(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function n(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,r=arguments.length;t<r;t+=1)arguments[t].forEach(n);return e}function tD(e){return this.extend(e)}tD.prototype.extend=function(t){var r=[],n=[];if(t instanceof eD)n.push(t);else if(Array.isArray(t))n=n.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(n=n.concat(t.explicit));else throw new qs("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(s){if(!(s instanceof eD))throw new qs("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(s.loadKind&&s.loadKind!=="scalar")throw new qs("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 qs("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(s){if(!(s instanceof eD))throw new qs("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var o=Object.create(tD.prototype);return o.implicit=(this.implicit||[]).concat(r),o.explicit=(this.explicit||[]).concat(n),o.compiledImplicit=rw(o,"implicit"),o.compiledExplicit=rw(o,"explicit"),o.compiledTypeMap=JM(o.compiledImplicit,o.compiledExplicit),o};nw.exports=tD});var nD=N((Ire,iw)=>{"use strict";d();var YM=At();iw.exports=new YM("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}})});var iD=N((Rre,ow)=>{"use strict";d();var XM=At();ow.exports=new XM("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}})});var oD=N((Mre,uw)=>{"use strict";d();var ZM=At();uw.exports=new ZM("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}})});var uD=N(($re,sw)=>{"use strict";d();var QM=rD();sw.exports=new QM({explicit:[nD(),iD(),oD()]})});var sD=N((Ure,aw)=>{"use strict";d();var ej=At();function tj(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function rj(){return null}function nj(e){return e===null}aw.exports=new ej("tag:yaml.org,2002:null",{kind:"scalar",resolve:tj,construct:rj,predicate:nj,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"})});var aD=N((qre,cw)=>{"use strict";d();var ij=At();function oj(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 uj(e){return e==="true"||e==="True"||e==="TRUE"}function sj(e){return Object.prototype.toString.call(e)==="[object Boolean]"}cw.exports=new ij("tag:yaml.org,2002:bool",{kind:"scalar",resolve:oj,construct:uj,predicate:sj,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 cD=N((Hre,lw)=>{"use strict";d();var aj=su(),cj=At();function lj(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function fj(e){return 48<=e&&e<=55}function pj(e){return 48<=e&&e<=57}function dj(e){if(e===null)return!1;var t=e.length,r=0,n=!1,o;if(!t)return!1;if(o=e[r],(o==="-"||o==="+")&&(o=e[++r]),o==="0"){if(r+1===t)return!0;if(o=e[++r],o==="b"){for(r++;r<t;r++)if(o=e[r],o!=="_"){if(o!=="0"&&o!=="1")return!1;n=!0}return n&&o!=="_"}if(o==="x"){for(r++;r<t;r++)if(o=e[r],o!=="_"){if(!lj(e.charCodeAt(r)))return!1;n=!0}return n&&o!=="_"}if(o==="o"){for(r++;r<t;r++)if(o=e[r],o!=="_"){if(!fj(e.charCodeAt(r)))return!1;n=!0}return n&&o!=="_"}}if(o==="_")return!1;for(;r<t;r++)if(o=e[r],o!=="_"){if(!pj(e.charCodeAt(r)))return!1;n=!0}return!(!n||o==="_")}function hj(e){var t=e,r=1,n;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),n=t[0],(n==="-"||n==="+")&&(n==="-"&&(r=-1),t=t.slice(1),n=t[0]),t==="0")return 0;if(n==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}function Dj(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!aj.isNegativeZero(e)}lw.exports=new cj("tag:yaml.org,2002:int",{kind:"scalar",resolve:dj,construct:hj,predicate:Dj,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 lD=N((Vre,pw)=>{"use strict";d();var fw=su(),mj=At(),gj=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function _j(e){return!(e===null||!gj.test(e)||e[e.length-1]==="_")}function yj(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}var Fj=/^[-+]?[0-9]+e/;function Ej(e,t){var r;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(fw.isNegativeZero(e))return"-0.0";return r=e.toString(10),Fj.test(r)?r.replace("e",".e"):r}function vj(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||fw.isNegativeZero(e))}pw.exports=new mj("tag:yaml.org,2002:float",{kind:"scalar",resolve:_j,construct:yj,predicate:vj,represent:Ej,defaultStyle:"lowercase"})});var fD=N((Kre,dw)=>{"use strict";d();dw.exports=uD().extend({implicit:[sD(),aD(),cD(),lD()]})});var pD=N((Yre,hw)=>{"use strict";d();hw.exports=fD()});var dD=N((Zre,gw)=>{"use strict";d();var Cj=At(),Dw=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),mw=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 wj(e){return e===null?!1:Dw.exec(e)!==null||mw.exec(e)!==null}function bj(e){var t,r,n,o,s,a,l,p=0,D=null,g,F,w;if(t=Dw.exec(e),t===null&&(t=mw.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],n=+t[2]-1,o=+t[3],!t[4])return new Date(Date.UTC(r,n,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],F=+(t[11]||0),D=(g*60+F)*6e4,t[9]==="-"&&(D=-D)),w=new Date(Date.UTC(r,n,o,s,a,l,p)),D&&w.setTime(w.getTime()-D),w}function Aj(e){return e.toISOString()}gw.exports=new Cj("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:wj,construct:bj,instanceOf:Date,represent:Aj})});var hD=N((ene,_w)=>{"use strict";d();var Sj=At();function xj(e){return e==="<<"||e===null}_w.exports=new Sj("tag:yaml.org,2002:merge",{kind:"scalar",resolve:xj})});var mD=N((rne,yw)=>{"use strict";d();var Pj=At(),DD=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
47
|
+
\r`;function Oj(e){if(e===null)return!1;var t,r,n=0,o=e.length,s=DD;for(r=0;r<o;r++)if(t=s.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;n+=6}return n%8===0}function Tj(e){var t,r,n=e.replace(/[\r\n=]/g,""),o=n.length,s=DD,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(n.charAt(t));return r=o%4*6,r===0?(l.push(a>>16&255),l.push(a>>8&255),l.push(a&255)):r===18?(l.push(a>>10&255),l.push(a>>2&255)):r===12&&l.push(a>>4&255),new Uint8Array(l)}function Ij(e){var t="",r=0,n,o,s=e.length,a=DD;for(n=0;n<s;n++)n%3===0&&n&&(t+=a[r>>18&63],t+=a[r>>12&63],t+=a[r>>6&63],t+=a[r&63]),r=(r<<8)+e[n];return o=s%3,o===0?(t+=a[r>>18&63],t+=a[r>>12&63],t+=a[r>>6&63],t+=a[r&63]):o===2?(t+=a[r>>10&63],t+=a[r>>4&63],t+=a[r<<2&63],t+=a[64]):o===1&&(t+=a[r>>2&63],t+=a[r<<4&63],t+=a[64],t+=a[64]),t}function Bj(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}yw.exports=new Pj("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Oj,construct:Tj,predicate:Bj,represent:Ij})});var gD=N((ine,Fw)=>{"use strict";d();var Rj=At(),Nj=Object.prototype.hasOwnProperty,Mj=Object.prototype.toString;function jj(e){if(e===null)return!0;var t=[],r,n,o,s,a,l=e;for(r=0,n=l.length;r<n;r+=1){if(o=l[r],a=!1,Mj.call(o)!=="[object Object]")return!1;for(s in o)if(Nj.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 $j(e){return e!==null?e:[]}Fw.exports=new Rj("tag:yaml.org,2002:omap",{kind:"sequence",resolve:jj,construct:$j})});var _D=N((une,Ew)=>{"use strict";d();var Lj=At(),Uj=Object.prototype.toString;function kj(e){if(e===null)return!0;var t,r,n,o,s,a=e;for(s=new Array(a.length),t=0,r=a.length;t<r;t+=1){if(n=a[t],Uj.call(n)!=="[object Object]"||(o=Object.keys(n),o.length!==1))return!1;s[t]=[o[0],n[o[0]]]}return!0}function qj(e){if(e===null)return[];var t,r,n,o,s,a=e;for(s=new Array(a.length),t=0,r=a.length;t<r;t+=1)n=a[t],o=Object.keys(n),s[t]=[o[0],n[o[0]]];return s}Ew.exports=new Lj("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:kj,construct:qj})});var yD=N((ane,vw)=>{"use strict";d();var Wj=At(),Hj=Object.prototype.hasOwnProperty;function zj(e){if(e===null)return!0;var t,r=e;for(t in r)if(Hj.call(r,t)&&r[t]!==null)return!1;return!0}function Vj(e){return e!==null?e:{}}vw.exports=new Wj("tag:yaml.org,2002:set",{kind:"mapping",resolve:zj,construct:Vj})});var Sl=N((lne,Cw)=>{"use strict";d();Cw.exports=pD().extend({implicit:[dD(),hD()],explicit:[mD(),gD(),_D(),yD()]})});var Uw=N((pne,CD)=>{"use strict";d();var ho=su(),Ow=au(),Gj=QC(),Kj=Sl(),wi=Object.prototype.hasOwnProperty,xl=1,Tw=2,Iw=3,Pl=4,FD=1,Jj=2,ww=3,Yj=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Xj=/[\x85\u2028\u2029]/,Zj=/[,\[\]\{\}]/,Bw=/^(?:!|!!|![a-z\-]+!)$/i,Rw=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function bw(e){return Object.prototype.toString.call(e)}function mn(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 cu(e){return e===44||e===91||e===93||e===123||e===125}function Qj(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function e$(e){return e===120?2:e===117?4:e===85?8:0}function t$(e){return 48<=e&&e<=57?e-48:-1}function Aw(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 r$(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function Nw(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}var Mw=new Array(256),jw=new Array(256);for(po=0;po<256;po++)Mw[po]=Aw(po)?1:0,jw[po]=Aw(po);var po;function n$(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Kj,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 $w(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=Gj(r),new Ow(t,r)}function Z(e,t){throw $w(e,t)}function Ol(e,t){e.onWarning&&e.onWarning.call(null,$w(e,t))}var Sw={YAML:function(t,r,n){var o,s,a;t.version!==null&&Z(t,"duplication of %YAML directive"),n.length!==1&&Z(t,"YAML directive accepts exactly one argument"),o=/^([0-9]+)\.([0-9]+)$/.exec(n[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=n[0],t.checkLineBreaks=a<2,a!==1&&a!==2&&Ol(t,"unsupported YAML version of the document")},TAG:function(t,r,n){var o,s;n.length!==2&&Z(t,"TAG directive accepts exactly two arguments"),o=n[0],s=n[1],Bw.test(o)||Z(t,"ill-formed tag handle (first argument) of the TAG directive"),wi.call(t.tagMap,o)&&Z(t,'there is a previously declared suffix for "'+o+'" tag handle'),Rw.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 Ci(e,t,r,n){var o,s,a,l;if(t<r){if(l=e.input.slice(t,r),n)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 Yj.test(l)&&Z(e,"the stream contains non-printable characters");e.result+=l}}function xw(e,t,r,n){var o,s,a,l;for(ho.isObject(r)||Z(e,"cannot merge mappings; the provided source object is unacceptable"),o=Object.keys(r),a=0,l=o.length;a<l;a+=1)s=o[a],wi.call(t,s)||(Nw(t,s,r[s]),n[s]=!0)}function lu(e,t,r,n,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"&&bw(o[D])==="[object Object]"&&(o[D]="[object Object]");if(typeof o=="object"&&bw(o)==="[object Object]"&&(o="[object Object]"),o=String(o),t===null&&(t={}),n==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(D=0,g=s.length;D<g;D+=1)xw(e,t,s[D],r);else xw(e,t,s,r);else!e.json&&!wi.call(r,o)&&wi.call(t,o)&&(e.line=a||e.line,e.lineStart=l||e.lineStart,e.position=p||e.position,Z(e,"duplicated mapping key")),Nw(t,o,s),delete r[o];return t}function ED(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,r){for(var n=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(mn(o))for(ED(e),o=e.input.charCodeAt(e.position),n++,e.lineIndent=0;o===32;)e.lineIndent++,o=e.input.charCodeAt(++e.position);else break}return r!==-1&&n!==0&&e.lineIndent<r&&Ol(e,"deficient indentation"),n}function Tl(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||qt(r)))}function vD(e,t){t===1?e.result+=" ":t>1&&(e.result+=ho.repeat(`
|
|
49
|
+
`,t-1))}function i$(e,t,r){var n,o,s,a,l,p,D,g,F=e.kind,w=e.result,v;if(v=e.input.charCodeAt(e.position),qt(v)||cu(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)||r&&cu(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)||r&&cu(o))break}else if(v===35){if(n=e.input.charCodeAt(e.position-1),qt(n))break}else{if(e.position===e.lineStart&&Tl(e)||r&&cu(v))break;if(mn(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&&(Ci(e,s,a,!1),vD(e,e.line-p),s=a=e.position,l=!1),Do(v)||(a=e.position+1),v=e.input.charCodeAt(++e.position)}return Ci(e,s,a,!1),e.result?!0:(e.kind=F,e.result=w,!1)}function o$(e,t){var r,n,o;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,n=o=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(Ci(e,n,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)n=e.position,e.position++,o=e.position;else return!0;else mn(r)?(Ci(e,n,o,!0),vD(e,et(e,!1,t)),n=o=e.position):e.position===e.lineStart&&Tl(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 u$(e,t){var r,n,o,s,a,l;if(l=e.input.charCodeAt(e.position),l!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=n=e.position;(l=e.input.charCodeAt(e.position))!==0;){if(l===34)return Ci(e,r,e.position,!0),e.position++,!0;if(l===92){if(Ci(e,r,e.position,!0),l=e.input.charCodeAt(++e.position),mn(l))et(e,!1,t);else if(l<256&&Mw[l])e.result+=jw[l],e.position++;else if((a=e$(l))>0){for(o=a,s=0;o>0;o--)l=e.input.charCodeAt(++e.position),(a=Qj(l))>=0?s=(s<<4)+a:Z(e,"expected hexadecimal character");e.result+=r$(s),e.position++}else Z(e,"unknown escape sequence");r=n=e.position}else mn(l)?(Ci(e,r,n,!0),vD(e,et(e,!1,t)),r=n=e.position):e.position===e.lineStart&&Tl(e)?Z(e,"unexpected end of the document within a double quoted scalar"):(e.position++,n=e.position)}Z(e,"unexpected end of the stream within a double quoted scalar")}function s$(e,t){var r=!0,n,o,s,a=e.tag,l,p=e.anchor,D,g,F,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;r?U===44&&Z(e,"expected the node content, but found ','"):Z(e,"missed comma between flow collection entries"),P=O=I=null,F=w=!1,U===63&&(D=e.input.charCodeAt(e.position+1),qt(D)&&(F=w=!0,e.position++,et(e,!0,t))),n=e.line,o=e.lineStart,s=e.position,fu(e,t,xl,!1,!0),P=e.tag,O=e.result,et(e,!0,t),U=e.input.charCodeAt(e.position),(w||e.line===n)&&U===58&&(F=!0,U=e.input.charCodeAt(++e.position),et(e,!0,t),fu(e,t,xl,!1,!0),I=e.result),v?lu(e,l,S,P,O,I,n,o,s):F?l.push(lu(e,null,S,P,O,I,n,o,s)):l.push(O),et(e,!0,t),U=e.input.charCodeAt(e.position),U===44?(r=!0,U=e.input.charCodeAt(++e.position)):r=!1}Z(e,"unexpected end of the stream within a flow collection")}function a$(e,t){var r,n,o=FD,s=!1,a=!1,l=t,p=0,D=!1,g,F;if(F=e.input.charCodeAt(e.position),F===124)n=!1;else if(F===62)n=!0;else return!1;for(e.kind="scalar",e.result="";F!==0;)if(F=e.input.charCodeAt(++e.position),F===43||F===45)FD===o?o=F===43?ww:Jj:Z(e,"repeat of a chomping mode identifier");else if((g=t$(F))>=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(F)){do F=e.input.charCodeAt(++e.position);while(Do(F));if(F===35)do F=e.input.charCodeAt(++e.position);while(!mn(F)&&F!==0)}for(;F!==0;){for(ED(e),e.lineIndent=0,F=e.input.charCodeAt(e.position);(!a||e.lineIndent<l)&&F===32;)e.lineIndent++,F=e.input.charCodeAt(++e.position);if(!a&&e.lineIndent>l&&(l=e.lineIndent),mn(F)){p++;continue}if(e.lineIndent<l){o===ww?e.result+=ho.repeat(`
|
|
50
|
+
`,s?1+p:p):o===FD&&s&&(e.result+=`
|
|
51
|
+
`);break}for(n?Do(F)?(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,r=e.position;!mn(F)&&F!==0;)F=e.input.charCodeAt(++e.position);Ci(e,r,e.position,!1)}return!0}function Pw(e,t){var r,n=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(r=e.line,fu(e,t,Iw,!1,!0),s.push(e.result),et(e,!0,-1),p=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&p!==0)Z(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return l?(e.tag=n,e.anchor=o,e.kind="sequence",e.result=s,!0):!1}function c$(e,t,r){var n,o,s,a,l,p,D=e.tag,g=e.anchor,F={},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]=F),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")),n=e.input.charCodeAt(e.position+1),s=e.line,(U===63||U===58)&&qt(n))U===63?(P&&(lu(e,F,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=n;else{if(a=e.line,l=e.lineStart,p=e.position,!fu(e,r,Tw,!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&&(lu(e,F,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),fu(e,t,Pl,!0,o)&&(P?S=e.result:O=e.result),P||(lu(e,F,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&&lu(e,F,w,v,S,null,a,l,p),I&&(e.tag=D,e.anchor=g,e.kind="mapping",e.result=F),I}function l$(e){var t,r=!1,n=!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?(r=!0,a=e.input.charCodeAt(++e.position)):a===33?(n=!0,o="!!",a=e.input.charCodeAt(++e.position)):o="!",t=e.position,r){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&&(n?Z(e,"tag suffix cannot contain exclamation marks"):(o=e.input.slice(t-1,e.position+1),Bw.test(o)||Z(e,"named tag handle cannot contain such characters"),n=!0,t=e.position+1)),a=e.input.charCodeAt(++e.position);s=e.input.slice(t,e.position),Zj.test(s)&&Z(e,"tag suffix cannot contain flow indicator characters")}s&&!Rw.test(s)&&Z(e,"tag name cannot contain such characters: "+s);try{s=decodeURIComponent(s)}catch{Z(e,"tag name is malformed: "+s)}return r?e.tag=s:wi.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 f$(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&Z(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!qt(r)&&!cu(r);)r=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 p$(e){var t,r,n;if(n=e.input.charCodeAt(e.position),n!==42)return!1;for(n=e.input.charCodeAt(++e.position),t=e.position;n!==0&&!qt(n)&&!cu(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&Z(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),wi.call(e.anchorMap,r)||Z(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],et(e,!0,-1),!0}function fu(e,t,r,n,o){var s,a,l,p=1,D=!1,g=!1,F,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=Pl===r||Iw===r,n&&et(e,!0,-1)&&(D=!0,e.lineIndent>t?p=1:e.lineIndent===t?p=0:e.lineIndent<t&&(p=-1)),p===1)for(;l$(e)||f$(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||Pl===r)&&(xl===r||Tw===r?O=t:O=t+1,P=e.position-e.lineStart,p===1?l&&(Pw(e,P)||c$(e,P,O))||s$(e,O)?g=!0:(a&&a$(e,O)||o$(e,O)||u$(e,O)?g=!0:p$(e)?(g=!0,(e.tag!==null||e.anchor!==null)&&Z(e,"alias node should not have any properties")):i$(e,O,xl===r)&&(g=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):p===0&&(g=l&&Pw(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+'"'),F=0,w=e.implicitTypes.length;F<w;F+=1)if(S=e.implicitTypes[F],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(wi.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"],F=0,w=v.length;F<w;F+=1)if(e.tag.slice(0,v[F].tag.length)===v[F].tag){S=v[F];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 d$(e){var t=e.position,r,n,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),r=e.position;a!==0&&!qt(a);)a=e.input.charCodeAt(++e.position);for(n=e.input.slice(r,e.position),o=[],n.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&&!mn(a));break}if(mn(a))break;for(r=e.position;a!==0&&!qt(a);)a=e.input.charCodeAt(++e.position);o.push(e.input.slice(r,e.position))}a!==0&&ED(e),wi.call(Sw,n)?Sw[n](e,n,o):Ol(e,'unknown document directive "'+n+'"')}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"),fu(e,e.lineIndent-1,Pl,!1,!0),et(e,!0,-1),e.checkLineBreaks&&Xj.test(e.input.slice(t,e.position))&&Ol(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Tl(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 Lw(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 r=new n$(e,t),n=e.indexOf("\0");for(n!==-1&&(r.position=n,Z(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)d$(r);return r.documents}function h$(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var n=Lw(e,r);if(typeof t!="function")return n;for(var o=0,s=n.length;o<s;o+=1)t(n[o])}function D$(e,t){var r=Lw(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new Ow("expected a single document in the stream, but found more")}}CD.exports.loadAll=h$;CD.exports.load=D$});var sb=N((hne,ub)=>{"use strict";d();var Rl=su(),Gs=au(),m$=Sl(),Jw=Object.prototype.toString,Yw=Object.prototype.hasOwnProperty,xD=65279,g$=9,Hs=10,_$=13,y$=32,F$=33,E$=34,wD=35,v$=37,C$=38,w$=39,b$=42,Xw=44,A$=45,Il=58,S$=61,x$=62,P$=63,O$=64,Zw=91,Qw=93,T$=96,eb=123,I$=124,tb=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 B$=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],R$=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function N$(e,t){var r,n,o,s,a,l,p;if(t===null)return{};for(r={},n=Object.keys(t),o=0,s=n.length;o<s;o+=1)a=n[o],l=String(t[a]),a.slice(0,2)==="!!"&&(a="tag:yaml.org,2002:"+a.slice(2)),p=e.compiledTypeMap.fallback[a],p&&Yw.call(p.styleAliases,l)&&(l=p.styleAliases[l]),r[a]=l;return r}function M$(e){var t,r,n;if(t=e.toString(16).toUpperCase(),e<=255)r="x",n=2;else if(e<=65535)r="u",n=4;else if(e<=4294967295)r="U",n=8;else throw new Gs("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Rl.repeat("0",n-t.length)+t}var j$=1,zs=2;function $$(e){this.schema=e.schema||m$,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Rl.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=N$(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==='"'?zs:j$,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 kw(e,t){for(var r=Rl.repeat(" ",t),n=0,o=-1,s="",a,l=e.length;n<l;)o=e.indexOf(`
|
|
57
|
+
`,n),o===-1?(a=e.slice(n),n=l):(a=e.slice(n,o+1),n=o+1),a.length&&a!==`
|
|
58
|
+
`&&(s+=r),s+=a;return s}function bD(e,t){return`
|
|
59
|
+
`+Rl.repeat(" ",e.indent*t)}function L$(e,t){var r,n,o;for(r=0,n=e.implicitTypes.length;r<n;r+=1)if(o=e.implicitTypes[r],o.resolve(t))return!0;return!1}function Bl(e){return e===y$||e===g$}function Vs(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==xD||65536<=e&&e<=1114111}function qw(e){return Vs(e)&&e!==xD&&e!==_$&&e!==Hs}function Ww(e,t,r){var n=qw(e),o=n&&!Bl(e);return(r?n:n&&e!==Xw&&e!==Zw&&e!==Qw&&e!==eb&&e!==tb)&&e!==wD&&!(t===Il&&!o)||qw(t)&&!Bl(t)&&e===wD||t===Il&&o}function U$(e){return Vs(e)&&e!==xD&&!Bl(e)&&e!==A$&&e!==P$&&e!==Il&&e!==Xw&&e!==Zw&&e!==Qw&&e!==eb&&e!==tb&&e!==wD&&e!==C$&&e!==b$&&e!==F$&&e!==I$&&e!==S$&&e!==x$&&e!==w$&&e!==E$&&e!==v$&&e!==O$&&e!==T$}function k$(e){return!Bl(e)&&e!==Il}function Ws(e,t){var r=e.charCodeAt(t),n;return r>=55296&&r<=56319&&t+1<e.length&&(n=e.charCodeAt(t+1),n>=56320&&n<=57343)?(r-55296)*1024+n-56320+65536:r}function rb(e){var t=/^\n* /;return t.test(e)}var nb=1,AD=2,ib=3,ob=4,pu=5;function q$(e,t,r,n,o,s,a,l){var p,D=0,g=null,F=!1,w=!1,v=n!==-1,S=-1,O=U$(Ws(e,0))&&k$(Ws(e,e.length-1));if(t||a)for(p=0;p<e.length;D>=65536?p+=2:p++){if(D=Ws(e,p),!Vs(D))return pu;O=O&&Ww(D,g,l),g=D}else{for(p=0;p<e.length;D>=65536?p+=2:p++){if(D=Ws(e,p),D===Hs)F=!0,v&&(w=w||p-S-1>n&&e[S+1]!==" ",S=p);else if(!Vs(D))return pu;O=O&&Ww(D,g,l),g=D}w=w||v&&p-S-1>n&&e[S+1]!==" "}return!F&&!w?O&&!a&&!o(e)?nb:s===zs?pu:AD:r>9&&rb(e)?pu:a?s===zs?pu:AD:w?ob:ib}function W$(e,t,r,n,o){e.dump=(function(){if(t.length===0)return e.quotingType===zs?'""':"''";if(!e.noCompatMode&&(B$.indexOf(t)!==-1||R$.test(t)))return e.quotingType===zs?'"'+t+'"':"'"+t+"'";var s=e.indent*Math.max(1,r),a=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-s),l=n||e.flowLevel>-1&&r>=e.flowLevel;function p(D){return L$(e,D)}switch(q$(t,l,e.indent,a,p,e.quotingType,e.forceQuotes&&!n,o)){case nb:return t;case AD:return"'"+t.replace(/'/g,"''")+"'";case ib:return"|"+Hw(t,e.indent)+zw(kw(t,s));case ob:return">"+Hw(t,e.indent)+zw(kw(H$(t,a),s));case pu:return'"'+z$(t,a)+'"';default:throw new Gs("impossible error: invalid scalar style")}})()}function Hw(e,t){var r=rb(e)?String(t):"",n=e[e.length-1]===`
|
|
60
|
+
`,o=n&&(e[e.length-2]===`
|
|
61
|
+
`||e===`
|
|
62
|
+
`),s=o?"+":n?"":"-";return r+s+`
|
|
63
|
+
`}function zw(e){return e[e.length-1]===`
|
|
64
|
+
`?e.slice(0,-1):e}function H$(e,t){for(var r=/(\n+)([^\n]*)/g,n=(function(){var D=e.indexOf(`
|
|
65
|
+
`);return D=D!==-1?D:e.length,r.lastIndex=D,Vw(e.slice(0,D),t)})(),o=e[0]===`
|
|
66
|
+
`||e[0]===" ",s,a;a=r.exec(e);){var l=a[1],p=a[2];s=p[0]===" ",n+=l+(!o&&!s&&p!==""?`
|
|
67
|
+
`:"")+Vw(p,t),o=s}return n}function Vw(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,n,o=0,s,a=0,l=0,p="";n=r.exec(e);)l=n.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 z$(e){for(var t="",r=0,n,o=0;o<e.length;r>=65536?o+=2:o++)r=Ws(e,o),n=St[r],!n&&Vs(r)?(t+=e[o],r>=65536&&(t+=e[o+1])):t+=n||M$(r);return t}function V$(e,t,r){var n="",o=e.tag,s,a,l;for(s=0,a=r.length;s<a;s+=1)l=r[s],e.replacer&&(l=e.replacer.call(r,String(s),l)),(Ln(e,t,l,!1,!1)||typeof l>"u"&&Ln(e,t,null,!1,!1))&&(n!==""&&(n+=","+(e.condenseFlow?"":" ")),n+=e.dump);e.tag=o,e.dump="["+n+"]"}function Gw(e,t,r,n){var o="",s=e.tag,a,l,p;for(a=0,l=r.length;a<l;a+=1)p=r[a],e.replacer&&(p=e.replacer.call(r,String(a),p)),(Ln(e,t+1,p,!0,!0,!1,!0)||typeof p>"u"&&Ln(e,t+1,null,!0,!0,!1,!0))&&((!n||o!=="")&&(o+=bD(e,t)),e.dump&&Hs===e.dump.charCodeAt(0)?o+="-":o+="- ",o+=e.dump);e.tag=s,e.dump=o||"[]"}function G$(e,t,r){var n="",o=e.tag,s=Object.keys(r),a,l,p,D,g;for(a=0,l=s.length;a<l;a+=1)g="",n!==""&&(g+=", "),e.condenseFlow&&(g+='"'),p=s[a],D=r[p],e.replacer&&(D=e.replacer.call(r,p,D)),Ln(e,t,p,!1,!1)&&(e.dump.length>1024&&(g+="? "),g+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Ln(e,t,D,!1,!1)&&(g+=e.dump,n+=g));e.tag=o,e.dump="{"+n+"}"}function K$(e,t,r,n){var o="",s=e.tag,a=Object.keys(r),l,p,D,g,F,w;if(e.sortKeys===!0)a.sort();else if(typeof e.sortKeys=="function")a.sort(e.sortKeys);else if(e.sortKeys)throw new Gs("sortKeys must be a boolean or a function");for(l=0,p=a.length;l<p;l+=1)w="",(!n||o!=="")&&(w+=bD(e,t)),D=a[l],g=r[D],e.replacer&&(g=e.replacer.call(r,D,g)),Ln(e,t+1,D,!0,!0,!0)&&(F=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,F&&(e.dump&&Hs===e.dump.charCodeAt(0)?w+="?":w+="? "),w+=e.dump,F&&(w+=bD(e,t)),Ln(e,t+1,g,!0,F)&&(e.dump&&Hs===e.dump.charCodeAt(0)?w+=":":w+=": ",w+=e.dump,o+=w));e.tag=s,e.dump=o||"{}"}function Kw(e,t,r){var n,o,s,a,l,p;for(o=r?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(r?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,Jw.call(l.represent)==="[object Function]")n=l.represent(t,p);else if(Yw.call(l.represent,p))n=l.represent[p](t,p);else throw new Gs("!<"+l.tag+'> tag resolver accepts not "'+p+'" style');e.dump=n}return!0}return!1}function Ln(e,t,r,n,o,s,a){e.tag=null,e.dump=r,Kw(e,r,!1)||Kw(e,r,!0);var l=Jw.call(e.dump),p=n,D;n&&(n=e.flowLevel<0||e.flowLevel>t);var g=l==="[object Object]"||l==="[object Array]",F,w;if(g&&(F=e.duplicates.indexOf(r),w=F!==-1),(e.tag!==null&&e.tag!=="?"||w||e.indent!==2&&t>0)&&(o=!1),w&&e.usedDuplicates[F])e.dump="*ref_"+F;else{if(g&&w&&!e.usedDuplicates[F]&&(e.usedDuplicates[F]=!0),l==="[object Object]")n&&Object.keys(e.dump).length!==0?(K$(e,t,e.dump,o),w&&(e.dump="&ref_"+F+e.dump)):(G$(e,t,e.dump),w&&(e.dump="&ref_"+F+" "+e.dump));else if(l==="[object Array]")n&&e.dump.length!==0?(e.noArrayIndent&&!a&&t>0?Gw(e,t-1,e.dump,o):Gw(e,t,e.dump,o),w&&(e.dump="&ref_"+F+e.dump)):(V$(e,t,e.dump),w&&(e.dump="&ref_"+F+" "+e.dump));else if(l==="[object String]")e.tag!=="?"&&W$(e,e.dump,t,s,p);else{if(l==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new Gs("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 J$(e,t){var r=[],n=[],o,s;for(SD(e,r,n),o=0,s=n.length;o<s;o+=1)t.duplicates.push(r[n[o]]);t.usedDuplicates=new Array(s)}function SD(e,t,r){var n,o,s;if(e!==null&&typeof e=="object")if(o=t.indexOf(e),o!==-1)r.indexOf(o)===-1&&r.push(o);else if(t.push(e),Array.isArray(e))for(o=0,s=e.length;o<s;o+=1)SD(e[o],t,r);else for(n=Object.keys(e),o=0,s=n.length;o<s;o+=1)SD(e[n[o]],t,r)}function Y$(e,t){t=t||{};var r=new $$(t);r.noRefs||J$(e,r);var n=e;return r.replacer&&(n=r.replacer.call({"":n},"",n)),Ln(r,0,n,!0,!0)?r.dump+`
|
|
71
|
+
`:""}ub.exports.dump=Y$});var du=N((mne,Rt)=>{"use strict";d();var ab=Uw(),X$=sb();function PD(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.")}}Rt.exports.Type=At();Rt.exports.Schema=rD();Rt.exports.FAILSAFE_SCHEMA=uD();Rt.exports.JSON_SCHEMA=fD();Rt.exports.CORE_SCHEMA=pD();Rt.exports.DEFAULT_SCHEMA=Sl();Rt.exports.load=ab.load;Rt.exports.loadAll=ab.loadAll;Rt.exports.dump=X$.dump;Rt.exports.YAMLException=au();Rt.exports.types={binary:mD(),float:lD(),map:oD(),null:sD(),pairs:_D(),set:yD(),timestamp:dD(),bool:aD(),int:cD(),merge:hD(),omap:gD(),seq:iD(),str:nD()};Rt.exports.safeLoad=PD("safeLoad","load");Rt.exports.safeLoadAll=PD("safeLoadAll","loadAll");Rt.exports.safeDump=PD("safeDump","dump")});var Ai=N(Ee=>{"use strict";d();var Z$=Ee&&Ee.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ee,"__esModule",{value:!0});Ee.parseFileAsJSONSchema=Ee.isSchemaLike=Ee.appendToDescription=Ee.maybeStripDefault=Ee.pathTransform=Ee.escapeBlockComment=Ee.log=Ee.error=Ee.generateName=Ee.toSafeString=Ee.stripExtension=Ee.justName=Ee.traverse=Ee.Try=void 0;var Ks=$n(),Un=ze("path"),cb=lo(),Q$=Z$(du());function OD(e,t){try{return e()}catch(r){return t(r)}}Ee.Try=OD;var e7=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 hu(e,t,r){Object.keys(e).forEach(n=>{e[n]&&typeof e[n]=="object"&&!Array.isArray(e[n])&&mo(e[n],t,r,n)})}function Du(e,t,r){e.forEach((n,o)=>mo(n,t,r,o.toString()))}function t7(e,t,r){if(typeof e!="object"||!e)return;let o=e[cb.Intersection];o&&Array.isArray(o.allOf)&&Du(o.allOf,t,r)}function mo(e,t,r=new Set,n){if(!r.has(e)){if(r.add(e),t(e,n??null),e.anyOf&&Du(e.anyOf,t,r),e.allOf&&Du(e.allOf,t,r),e.oneOf&&Du(e.oneOf,t,r),e.properties&&hu(e.properties,t,r),e.patternProperties&&hu(e.patternProperties,t,r),e.additionalProperties&&typeof e.additionalProperties=="object"&&mo(e.additionalProperties,t,r),e.items){let{items:o}=e;Array.isArray(o)?Du(o,t,r):mo(o,t,r)}e.additionalItems&&typeof e.additionalItems=="object"&&mo(e.additionalItems,t,r),e.dependencies&&(Array.isArray(e.dependencies)?Du(e.dependencies,t,r):hu(e.dependencies,t,r)),e.definitions&&hu(e.definitions,t,r),e.$defs&&hu(e.$defs,t,r),e.not&&mo(e.not,t,r),t7(e,t,r),Object.keys(e).filter(o=>!e7.has(o)).forEach(o=>{let s=e[o];s&&typeof s=="object"&&hu(s,t,r)})}}Ee.traverse=mo;function r7(e=""){return lb((0,Un.basename)(e))}Ee.justName=r7;function lb(e){return e.replace((0,Un.extname)(e),"")}Ee.stripExtension=lb;function fb(e){return(0,Ks.upperFirst)((0,Ks.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,Ks.trim)(t.toUpperCase())).replace(/\s/g,""))}Ee.toSafeString=fb;function n7(e,t){let r=fb(e);if(r||(r="NoName"),t.has(r)){let n=1,o=`${r}${n}`;for(;t.has(o);)o=`${r}${n}`,n++;r=o}return t.add(r),r}Ee.generateName=n7;function i7(...e){var t;if(!process.env.VERBOSE)return console.error(e);console.error((t=pb("red"))===null||t===void 0?void 0:t("error"),...e)}Ee.error=i7;function o7(e,t,...r){var n,o;if(!process.env.VERBOSE)return;let s=null;r.length>1&&typeof r[r.length-1]!="string"&&(s=r.splice(r.length-1,1)),console.info((n=bi())===null||n===void 0?void 0:n.whiteBright.bgCyan("debug"),(o=pb(e))===null||o===void 0?void 0:o(t),...r),s&&console.dir(s,{depth:6,maxArrayLength:6})}Ee.log=o7;function pb(e){var t,r,n,o,s,a,l;if(process.env.VERBOSE)switch(e){case"blue":return(t=bi())===null||t===void 0?void 0:t.whiteBright.bgBlue;case"cyan":return(r=bi())===null||r===void 0?void 0:r.whiteBright.bgCyan;case"green":return(n=bi())===null||n===void 0?void 0:n.whiteBright.bgGreen;case"magenta":return(o=bi())===null||o===void 0?void 0:o.whiteBright.bgMagenta;case"red":return(s=bi())===null||s===void 0?void 0:s.whiteBright.bgRedBright;case"white":return(a=bi())===null||a===void 0?void 0:a.black.bgWhite;case"yellow":return(l=bi())===null||l===void 0?void 0:l.whiteBright.bgYellow}}function u7(e){if(!(e===null||typeof e!="object"))for(let r of Object.keys(e))r==="description"&&typeof e[r]=="string"&&(e[r]=e[r].replace(/\*\//g,"* /"))}Ee.escapeBlockComment=u7;function s7(e,t,r){let n=(0,Un.normalize)(t).split(Un.sep),s=(0,Un.dirname)((0,Un.normalize)(r)).split(Un.sep).filter((a,l)=>a!==n[l]);return Un.posix.join(Un.posix.normalize(e),...s)}Ee.pathTransform=s7;function a7(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,Ks.isPlainObject)(e.default))return e;break}return delete e.default,e}Ee.maybeStripDefault=a7;function c7(e,...t){return e?`${e}
|
|
72
|
+
|
|
73
|
+
${t.join(`
|
|
74
|
+
`)}`:t.join(`
|
|
75
|
+
`)}Ee.appendToDescription=c7;function l7(e){if(!(0,Ks.isPlainObject)(e))return!1;let t=e[cb.Parent];return t===null?!0:!["$defs","allOf","anyOf","definitions","dependencies","enum","not","oneOf","patternProperties","properties","required"].some(n=>t[n]===e)}Ee.isSchemaLike=l7;function f7(e,t){return e!=null&&p7(e)?OD(()=>Q$.default.load(t.toString()),()=>{throw new TypeError(`Error parsing YML in file "${e}"`)}):OD(()=>JSON.parse(t.toString()),()=>{throw new TypeError(`Error parsing JSON in file "${e}"`)})}Ee.parseFileAsJSONSchema=f7;function p7(e){return e.endsWith(".yaml")||e.endsWith(".yml")}function bi(){let e;try{e=ze("cli-color")}catch{}return e}});var BD=N(rr=>{"use strict";d();Object.defineProperty(rr,"__esModule",{value:!0});rr.generateType=rr.generate=void 0;var hb=$n(),d7=RD(),tr=Al(),gu=Ai();function h7(e,t=d7.DEFAULT_OPTIONS){return[t.bannerComment,Ys(e,t,e.standaloneName),Js(e,t,e.standaloneName),mu(e,t)].filter(Boolean).join(`
|
|
76
|
+
|
|
77
|
+
`)+`
|
|
78
|
+
`}rr.generate=h7;function mu(e,t,r=new Set){if(r.has(e))return"";r.add(e);let n="";switch(e.type){case"ENUM":return g7(e,t)+`
|
|
79
|
+
`;case"ARRAY":return mu(e.params,t,r);case"UNION":case"INTERSECTION":return e.params.reduce((o,s)=>o+mu(s,t,r),"");case"TUPLE":return n=e.params.reduce((o,s)=>o+mu(s,t,r),""),e.spreadParam&&(n+=mu(e.spreadParam,t,r)),n;case"INTERFACE":return ID(e).reduce((o,s)=>o+mu(s,t,r),"");default:return""}}function Js(e,t,r,n=new Set){if(n.has(e))return"";n.add(e);let o="";switch(e.type){case"ARRAY":o=Js(e.params,t,r,n);break;case"INTERFACE":o=[(0,tr.hasStandaloneName)(e)&&(e.standaloneName===r||t.declareExternallyReferenced)&&_7(e,t),ID(e).map(s=>Js(s,t,r,n)).filter(Boolean).join(`
|
|
80
|
+
`)].filter(Boolean).join(`
|
|
81
|
+
`);break;case"INTERSECTION":case"TUPLE":case"UNION":o=e.params.map(s=>Js(s,t,r,n)).filter(Boolean).join(`
|
|
82
|
+
`),e.type==="TUPLE"&&e.spreadParam&&(o+=Js(e.spreadParam,t,r,n));break;default:o=""}return o}function Ys(e,t,r,n=new Set){if(n.has(e))return"";switch(n.add(e),e.type){case"ARRAY":return[Ys(e.params,t,r,n),(0,tr.hasStandaloneName)(e)?TD(e,t):void 0].filter(Boolean).join(`
|
|
83
|
+
`);case"ENUM":return"";case"INTERFACE":return ID(e).map(o=>(o.standaloneName===r||t.declareExternallyReferenced)&&Ys(o,t,r,n)).filter(Boolean).join(`
|
|
84
|
+
`);case"INTERSECTION":case"TUPLE":case"UNION":return[(0,tr.hasStandaloneName)(e)?TD(e,t):void 0,e.params.map(o=>Ys(o,t,r,n)).filter(Boolean).join(`
|
|
85
|
+
`),"spreadParam"in e&&e.spreadParam?Ys(e.spreadParam,t,r,n):void 0].filter(Boolean).join(`
|
|
86
|
+
`);default:return(0,tr.hasStandaloneName)(e)?TD(e,t):""}}function D7(e,t){let r=m7(e,t);return t.strictIndexSignatures&&e.keyName==="[k: string]"?`${r} | undefined`:r}rr.generateType=(0,hb.memoize)(D7);function m7(e,t){if((0,gu.log)("magenta","generator",e),(0,tr.hasStandaloneName)(e))return(0,gu.toSafeString)(e.standaloneName);switch(e.type){case"ANY":return"any";case"ARRAY":return(()=>{let r=(0,rr.generateType)(e.params,t);return r.endsWith('"')?"("+r+")[]":r+"[]"})();case"BOOLEAN":return"boolean";case"INTERFACE":return Db(e,t);case"INTERSECTION":return db(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 r=e.minItems,n=e.maxItems||-1,o=e.spreadParam,s=[...e.params];if(r>0&&r>s.length&&e.spreadParam===void 0&&n<0&&(o=t.unknownAny?tr.T_UNKNOWN:tr.T_ANY),n>s.length&&e.spreadParam===void 0)for(let D=s.length;D<n;D+=1)s.push(t.unknownAny?tr.T_UNKNOWN:tr.T_ANY);function a(D){if(o){let g="...("+(0,rr.generateType)(o,t)+")[]";D.push(g)}return D}function l(D){return"["+D.join(", ")+"]"}let p=s.map(D=>(0,rr.generateType)(D,t));if(p.length>r){let D=p.slice(0,r),g=[];D.length>0?g.push(l(D)):g.push(l([]));for(let F=r;F<p.length;F+=1)D.push(p[F]),F===p.length-1&&a(D),g.push(l(D));return g.join("|")}return l(a(p))})();case"UNION":return db(e,t);case"UNKNOWN":return"unknown";case"CUSTOM_TYPE":return e.params}}function db(e,t){let r=e.params.map(o=>(0,rr.generateType)(o,t)),n=e.type==="UNION"?"|":"&";return r.length===1?r[0]:"("+r.join(" "+n+" ")+")"}function Db(e,t){return`{
|
|
87
|
+
`+e.params.filter(r=>!r.isPatternProperty&&!r.isUnreachableDefinition).map(({isRequired:r,keyName:n,ast:o})=>[r,n,o,(0,rr.generateType)(o,t)]).map(([r,n,o,s])=>((0,tr.hasComment)(o)&&!o.standaloneName?Nl(o.comment,o.deprecated)+`
|
|
88
|
+
`:"")+y7(n)+(r?"":"?")+": "+s).join(`
|
|
89
|
+
`)+`
|
|
90
|
+
}`}function Nl(e,t){let r=["/**"];return t&&r.push(" * @deprecated"),typeof e<"u"&&r.push(...e.split(`
|
|
91
|
+
`).map(n=>" * "+n)),r.push(" */"),r.join(`
|
|
92
|
+
`)}function g7(e,t){let r=n=>/[^a-zA-Z0-9_]/.test(n);return((0,tr.hasComment)(e)?Nl(e.comment,e.deprecated)+`
|
|
93
|
+
`:"")+"export "+(t.enableConstEnums?"const ":"")+`enum ${(0,gu.toSafeString)(e.standaloneName)} {
|
|
94
|
+
`+e.params.map(({ast:n,keyName:o})=>(r(o)?`"${o}"`:o)+" = "+(0,rr.generateType)(n,t)).join(`,
|
|
95
|
+
`)+`
|
|
96
|
+
}`}function _7(e,t){return((0,tr.hasComment)(e)?Nl(e.comment,e.deprecated)+`
|
|
97
|
+
`:"")+`export interface ${(0,gu.toSafeString)(e.standaloneName)} `+(e.superTypes.length>0?`extends ${e.superTypes.map(r=>(0,gu.toSafeString)(r.standaloneName)).join(", ")} `:"")+Db(e,t)}function TD(e,t){return((0,tr.hasComment)(e)?Nl(e.comment)+`
|
|
98
|
+
`:"")+`export type ${(0,gu.toSafeString)(e.standaloneName)} = ${(0,rr.generateType)((0,hb.omit)(e,"standaloneName"),t)}`}function y7(e){return e.length&&/[A-Za-z_$]/.test(e.charAt(0))&&/^[\w$]+$/.test(e)||e==="[k: string]"?e:JSON.stringify(e)}function ID(e){return e.params.map(t=>t.ast).concat(e.superTypes)}});var mb=N(Ml=>{"use strict";d();Object.defineProperty(Ml,"__esModule",{value:!0});Ml.typesOfSchema=void 0;var F7=$n(),ND=lo();function E7(e){if(e.tsType)return new Set(["CUSTOM_TYPE"]);let t=new Set;for(let[r,n]of Object.entries(v7))n(e)&&t.add(r);return t.size||t.add("UNNAMED_SCHEMA"),t}Ml.typesOfSchema=E7;var v7={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,ND.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,ND.isCompound)(e)&&typeof e.default=="number"},OBJECT(e){return e.type==="object"&&!(0,F7.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,ND.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 MD=N($l=>{"use strict";d();Object.defineProperty($l,"__esModule",{value:!0});$l.applySchemaTyping=void 0;var jl=lo(),C7=mb();function w7(e){var t;let r=(0,C7.typesOfSchema)(e);if(Object.defineProperty(e,jl.Types,{enumerable:!1,value:r,writable:!1}),r.size===1)return;let n={[jl.Parent]:e,[jl.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};r.delete("ALL_OF"),delete e.allOf,delete e.$id,delete e.description,delete e.name,delete e.title,Object.defineProperty(e,jl.Intersection,{enumerable:!1,value:n,writable:!1})}$l.applySchemaTyping=w7});var gb=N(Ul=>{"use strict";d();Object.defineProperty(Ul,"__esModule",{value:!0});Ul.normalize=void 0;var b7=lo(),kn=Ai(),A7=MD(),S7=ze("util"),tt=new Map;function Ll(e,t){return e.type===t||Array.isArray(e.type)&&e.type.includes(t)}function jD(e){return e.properties!==void 0||Ll(e,"object")||Ll(e,"any")}function Xs(e){return e.items!==void 0||Ll(e,"array")||Ll(e,"any")}function x7(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=>{jD(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,r)=>{jD(e)&&!("additionalProperties"in e)&&e.patternProperties===void 0&&(e.additionalProperties=r.additionalProperties)});tt.set("Transform id to $id",(e,t)=>{if((0,kn.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,r,n,o)=>{if(!(0,kn.isSchemaLike)(e))return;if(!e.$id&&!e[b7.Parent]){e.$id=(0,kn.toSafeString)((0,kn.justName)(t));return}if(!Xs(e)&&!jD(e))return;let s=o.get(e);!e.$id&&!e.title&&s&&(e.$id=(0,kn.toSafeString)((0,kn.justName)(s))),s&&o.delete(e)});tt.set("Escape closing JSDoc comment",e=>{(0,kn.escapeBlockComment)(e)});tt.set("Add JSDoc comments for minItems and maxItems",e=>{if(!Xs(e))return;let t=["minItems"in e?`@minItems ${e.minItems}`:"","maxItems"in e?`@maxItems ${e.maxItems}`:""].filter(Boolean);t.length&&(e.description=(0,kn.appendToDescription)(e.description,...t))});tt.set("Optionally remove maxItems and minItems",(e,t,r)=>{Xs(e)&&("minItems"in e&&r.ignoreMinAndMaxItems&&delete e.minItems,"maxItems"in e&&(r.ignoreMinAndMaxItems||r.maxItems===-1)&&delete e.maxItems)});tt.set("Normalize schema.minItems",(e,t,r)=>{if(r.ignoreMinAndMaxItems||!Xs(e))return;let{minItems:n}=e;e.minItems=typeof n=="number"?n:0});tt.set("Remove maxItems if it is big enough to likely cause OOMs",(e,t,r)=>{if(r.ignoreMinAndMaxItems||r.maxItems===-1||!Xs(e))return;let{maxItems:n,minItems:o}=e;n!==void 0&&n-o>r.maxItems&&delete e.maxItems});tt.set("Normalize schema.items",(e,t,r)=>{if(r.ignoreMinAndMaxItems)return;let{maxItems:n,minItems:o}=e,s=typeof n=="number"&&n>=0,a=typeof o=="number"&&o>0;if(e.items&&!Array.isArray(e.items)&&(s||a)){let l=e.items,p=Array(n||o||0).fill(l);s||(e.additionalItems=l),e.items=p}return Array.isArray(e.items)&&s&&n<e.items.length&&(e.items=e.items.slice(0,n)),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,S7.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,r)=>{var n;x7(e)&&r.inferStringEnumKeysFromValues&&(e.tsEnumNames=(n=e.enum)===null||n===void 0?void 0:n.map(String))});tt.set("Pre-calculate schema types and intersections",e=>{e!==null&&typeof e=="object"&&(0,A7.applySchemaTyping)(e)});function P7(e,t,r,n){return tt.forEach(o=>(0,kn.traverse)(e,(s,a)=>o(s,r,n,a,t))),e}Ul.normalize=P7});var Fb=N(ql=>{"use strict";d();Object.defineProperty(ql,"__esModule",{value:!0});ql.optimize=void 0;var O7=$n(),$D=BD(),_b=Al(),kl=Ai();function Zs(e,t,r=new Set){if(r.has(e))return e;switch(r.add(e),e.type){case"ARRAY":return Object.assign(e,{params:Zs(e.params,t,r)});case"INTERFACE":return Object.assign(e,{params:e.params.map(s=>Object.assign(s,{ast:Zs(s.ast,t,r)}))});case"INTERSECTION":case"UNION":let n=Object.assign(e,{params:e.params.map(s=>Zs(s,t,r))});if(n.params.some(s=>s.type==="ANY"))return(0,kl.log)("cyan","optimizer","[A, B, C, Any] -> Any",n),_b.T_ANY;if(n.params.some(s=>s.type==="UNKNOWN"))return(0,kl.log)("cyan","optimizer","[A, B, C, Unknown] -> Unknown",n),_b.T_UNKNOWN;n.params.every(s=>{let a=(0,$D.generateType)(yb(s),t),l=(0,$D.generateType)(yb(n.params[0]),t);return a===l})&&n.params.some(s=>s.standaloneName!==void 0)&&((0,kl.log)("cyan","optimizer","[A (named), A] -> [A (named)]",n),n.params=n.params.filter(s=>s.standaloneName!==void 0));let o=(0,O7.uniqBy)(n.params,s=>(0,$D.generateType)(s,t));return o.length!==n.params.length&&((0,kl.log)("cyan","optimizer","[A, B, B] -> [A, B]",n),n.params=o),Object.assign(n,{params:n.params.map(s=>Zs(s,t,r))});default:return e}}ql.optimize=Zs;function yb(e){return e.type==="ENUM"?e:Object.assign(Object.assign({},e),{standaloneName:void 0})}});var vb=N(Hl=>{"use strict";d();Object.defineProperty(Hl,"__esModule",{value:!0});Hl.parse=void 0;var gn=$n(),T7=ze("util"),I7=MD(),Si=Al(),Qs=lo(),Wl=Ai();function nr(e,t,r,n=new Map,o=new Set){if((0,Qs.isPrimitive)(e))return(0,Qs.isBoolean)(e)?B7(e,r,t):UD(e,r);let s=e[Qs.Intersection],a=e[Qs.Types];if(s){let l=LD(s,"ALL_OF",t,r,n,o);return a.forEach(p=>{l.params.push(LD(e,p,t,r,n,o))}),(0,Wl.log)("blue","parser","Types:",[...a],"Input:",e,"Output:",l),l}if(a.size===1){let l=[...a][0],p=LD(e,l,t,r,n,o);return(0,Wl.log)("blue","parser","Type:",l,"Input:",e,"Output:",p),p}throw new ReferenceError("Expected intersection schema. Please file an issue on GitHub.")}Hl.parse=nr;function LD(e,t,r,n,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,R7(e,t,r,n,o,s))}function B7(e,t,r){return e?{keyName:t,type:r.unknownAny?"UNKNOWN":"ANY"}:{keyName:t,type:"NEVER"}}function UD(e,t){return{keyName:t,params:e,type:"LITERAL"}}function R7(e,t,r,n,o,s){let a=j7((0,Qs.getRootSchema)(e)),l=(0,gn.findKey)(a,p=>p===e);switch(t){case"ALL_OF":return{comment:e.description,deprecated:e.deprecated,keyName:n,standaloneName:ut(e,l,s,r),params:e.allOf.map(F=>nr(F,r,void 0,o,s)),type:"INTERSECTION"};case"ANY":return Object.assign(Object.assign({},r.unknownAny?Si.T_UNKNOWN:Si.T_ANY),{comment:e.description,deprecated:e.deprecated,keyName:n,standaloneName:ut(e,l,s,r)});case"ANY_OF":return{comment:e.description,deprecated:e.deprecated,keyName:n,standaloneName:ut(e,l,s,r),params:e.anyOf.map(F=>nr(F,r,void 0,o,s)),type:"UNION"};case"BOOLEAN":return{comment:e.description,deprecated:e.deprecated,keyName:n,standaloneName:ut(e,l,s,r),type:"BOOLEAN"};case"CUSTOM_TYPE":return{comment:e.description,deprecated:e.deprecated,keyName:n,params:e.tsType,standaloneName:ut(e,l,s,r),type:"CUSTOM_TYPE"};case"NAMED_ENUM":return{comment:e.description,deprecated:e.deprecated,keyName:n,standaloneName:ut(e,l??n,s,r),params:e.enum.map((F,w)=>({ast:UD(F,void 0),keyName:e.tsEnumNames[w]})),type:"ENUM"};case"NAMED_SCHEMA":return Eb(e,r,o,s,n);case"NEVER":return{comment:e.description,deprecated:e.deprecated,keyName:n,standaloneName:ut(e,l,s,r),type:"NEVER"};case"NULL":return{comment:e.description,deprecated:e.deprecated,keyName:n,standaloneName:ut(e,l,s,r),type:"NULL"};case"NUMBER":return{comment:e.description,deprecated:e.deprecated,keyName:n,standaloneName:ut(e,l,s,r),type:"NUMBER"};case"OBJECT":return{comment:e.description,keyName:n,standaloneName:ut(e,l,s,r),type:"OBJECT",deprecated:e.deprecated};case"ONE_OF":return{comment:e.description,deprecated:e.deprecated,keyName:n,standaloneName:ut(e,l,s,r),params:e.oneOf.map(F=>nr(F,r,void 0,o,s)),type:"UNION"};case"REFERENCE":throw Error((0,T7.format)("Refs should have been resolved by the resolver!",e));case"STRING":return{comment:e.description,deprecated:e.deprecated,keyName:n,standaloneName:ut(e,l,s,r),type:"STRING"};case"TYPED_ARRAY":if(Array.isArray(e.items)){let F=e.minItems,w=e.maxItems,v={comment:e.description,deprecated:e.deprecated,keyName:n,maxItems:w,minItems:F,standaloneName:ut(e,l,s,r),params:e.items.map(S=>nr(S,r,void 0,o,s)),type:"TUPLE"};return e.additionalItems===!0?v.spreadParam=r.unknownAny?Si.T_UNKNOWN:Si.T_ANY:e.additionalItems&&(v.spreadParam=nr(e.additionalItems,r,void 0,o,s)),v}else return{comment:e.description,deprecated:e.deprecated,keyName:n,standaloneName:ut(e,l,s,r),params:nr(e.items,r,"{keyNameFromDefinition}Items",o,s),type:"ARRAY"};case"UNION":return{comment:e.description,deprecated:e.deprecated,keyName:n,standaloneName:ut(e,l,s,r),params:e.type.map(F=>{let w=Object.assign(Object.assign({},(0,gn.omit)(e,"$id","description","title")),{type:F});return(0,Wl.maybeStripDefault)(w),(0,I7.applySchemaTyping)(w),nr(w,r,void 0,o,s)}),type:"UNION"};case"UNNAMED_ENUM":return{comment:e.description,deprecated:e.deprecated,keyName:n,standaloneName:ut(e,l,s,r),params:e.enum.map(F=>UD(F,void 0)),type:"UNION"};case"UNNAMED_SCHEMA":return Eb(e,r,o,s,n,l);case"UNTYPED_ARRAY":let p=e.minItems,D=typeof e.maxItems=="number"?e.maxItems:-1,g=r.unknownAny?Si.T_UNKNOWN:Si.T_ANY;return p>0||D>=0?{comment:e.description,deprecated:e.deprecated,keyName:n,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,r),type:"TUPLE"}:{comment:e.description,deprecated:e.deprecated,keyName:n,params:g,standaloneName:ut(e,l,s,r),type:"ARRAY"}}}function ut(e,t,r,n){var o;let s=((o=n.customName)===null||o===void 0?void 0:o.call(n,e,t))||e.title||e.$id||t;if(s)return(0,Wl.generateName)(s,r)}function Eb(e,t,r,n,o,s){let a=ut(e,s,n,t);return{comment:e.description,deprecated:e.deprecated,keyName:o,params:M7(e,t,r,n,a),standaloneName:a,superTypes:N7(e,t,r,n),type:"INTERFACE"}}function N7(e,t,r,n){let o=e.extends;return o?o.map(s=>nr(s,t,void 0,r,n)):[]}function M7(e,t,r,n,o){let s=(0,gn.map)(e.properties,(l,p)=>({ast:nr(l,t,p,r,n),isPatternProperty:!1,isRequired:(0,gn.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,gn.map)(e.patternProperties,(l,p)=>{let D=nr(l,t,p,r,n),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,gn.includes)(e.required||[],p),isUnreachableDefinition:!1,keyName:a?"[k: string]":p}}))),t.unreachableDefinitions&&(s=s.concat((0,gn.map)(e.$defs,(l,p)=>{let D=nr(l,t,p,r,n),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,gn.includes)(e.required||[],p),isUnreachableDefinition:!0,keyName:p}}))),e.additionalProperties){case void 0:case!0:return a?s:s.concat({ast:t.unknownAny?Si.T_UNKNOWN_ADDITIONAL_PROPERTIES:Si.T_ANY_ADDITIONAL_PROPERTIES,isPatternProperty:!1,isRequired:!0,isUnreachableDefinition:!1,keyName:"[k: string]"});case!1:return s;default:return s.concat({ast:nr(e.additionalProperties,t,"[k: string]",r,n),isPatternProperty:!1,isRequired:!0,isUnreachableDefinition:!1,keyName:"[k: string]"})}}function kD(e,t=!0,r=new Set){return r.has(e)?{}:(r.add(e),Array.isArray(e)?e.reduce((n,o)=>Object.assign(Object.assign({},n),kD(o,!1,r)),{}):(0,gn.isPlainObject)(e)?Object.assign(Object.assign({},t&&$7(e)?e.$defs:{}),Object.keys(e).reduce((n,o)=>Object.assign(Object.assign({},n),kD(e[o],!1,r)),{})):{})}var j7=(0,gn.memoize)(kD);function $7(e){return"$defs"in e}});var zl=N(_u=>{"use strict";d();Object.defineProperty(_u,"__esModule",{value:!0});_u.getDeepKeys=_u.toJSON=void 0;var L7=["function","symbol","undefined"],U7=["constructor","prototype","__proto__"],k7=Object.getPrototypeOf({});function q7(){let e={},t=this;for(let r of Cb(t))if(typeof r=="string"){let n=t[r],o=typeof n;L7.includes(o)||(e[r]=n)}return e}_u.toJSON=q7;function Cb(e,t=[]){let r=[];for(;e&&e!==k7;)r=r.concat(Object.getOwnPropertyNames(e),Object.getOwnPropertySymbols(e)),e=Object.getPrototypeOf(e);let n=new Set(r);for(let o of t.concat(U7))n.delete(o);return n}_u.getDeepKeys=Cb});var qD=N(yu=>{"use strict";d();Object.defineProperty(yu,"__esModule",{value:!0});yu.addInspectMethod=yu.format=void 0;var wb=ze("util"),W7=zl(),bb=wb.inspect.custom||Symbol.for("nodejs.util.inspect.custom");yu.format=wb.format;function H7(e){e[bb]=z7}yu.addInspectMethod=H7;function z7(){let e={},t=this;for(let r of W7.getDeepKeys(t)){let n=t[r];e[r]=n}return delete e[bb],e}});var xb=N(_n=>{"use strict";d();Object.defineProperty(_n,"__esModule",{value:!0});_n.lazyJoinStacks=_n.joinStacks=_n.isWritableStack=_n.isLazyStack=void 0;var V7=/\r?\n/,G7=/\bono[ @]/;function K7(e){return!!(e&&e.configurable&&typeof e.get=="function")}_n.isLazyStack=K7;function J7(e){return!!(!e||e.writable||typeof e.set=="function")}_n.isWritableStack=J7;function Ab(e,t){let r=Sb(e.stack),n=t?t.stack:void 0;return r&&n?r+`
|
|
105
|
+
|
|
106
|
+
`+n:r||n}_n.joinStacks=Ab;function Y7(e,t,r){r?Object.defineProperty(t,"stack",{get:()=>{let n=e.get.apply(t);return Ab({stack:n},r)},enumerable:!1,configurable:!0}):X7(t,e)}_n.lazyJoinStacks=Y7;function Sb(e){if(e){let t=e.split(V7),r;for(let n=0;n<t.length;n++){let o=t[n];if(G7.test(o))r===void 0&&(r=n);else if(r!==void 0){t.splice(r,n-r);break}}if(t.length>0)return t.join(`
|
|
107
|
+
`)}return e}function X7(e,t){Object.defineProperty(e,"stack",{get:()=>Sb(t.get.apply(e)),enumerable:!1,configurable:!0})}});var Tb=N(Gl=>{"use strict";d();Object.defineProperty(Gl,"__esModule",{value:!0});Gl.extendError=void 0;var Pb=qD(),Vl=xb(),Ob=zl(),Z7=["name","message","stack"];function Q7(e,t,r){let n=e;return e9(n,t),t&&typeof t=="object"&&t9(n,t),n.toJSON=Ob.toJSON,Pb.addInspectMethod&&Pb.addInspectMethod(n),r&&typeof r=="object"&&Object.assign(n,r),n}Gl.extendError=Q7;function e9(e,t){let r=Object.getOwnPropertyDescriptor(e,"stack");Vl.isLazyStack(r)?Vl.lazyJoinStacks(r,e,t):Vl.isWritableStack(r)&&(e.stack=Vl.joinStacks(e,t))}function t9(e,t){let r=Ob.getDeepKeys(t,Z7),n=e,o=t;for(let s of r)if(n[s]===void 0)try{n[s]=o[s]}catch{}}});var Ib=N(Fu=>{"use strict";d();Object.defineProperty(Fu,"__esModule",{value:!0});Fu.normalizeArgs=Fu.normalizeOptions=void 0;var r9=qD();function n9(e){return e=e||{},{concatMessages:e.concatMessages===void 0?!0:!!e.concatMessages,format:e.format===void 0?r9.format:typeof e.format=="function"?e.format:!1}}Fu.normalizeOptions=n9;function i9(e,t){let r,n,o,s="";return typeof e[0]=="string"?o=e:typeof e[1]=="string"?(e[0]instanceof Error?r=e[0]:n=e[0],o=e.slice(1)):(r=e[0],n=e[1],o=e.slice(2)),o.length>0&&(t.format?s=t.format.apply(void 0,o):s=o.join(" ")),t.concatMessages&&r&&r.message&&(s+=(s?`
|
|
108
|
+
`:"")+r.message),{originalError:r,props:n,message:s}}Fu.normalizeArgs=i9});var HD=N(Jl=>{"use strict";d();Object.defineProperty(Jl,"__esModule",{value:!0});Jl.Ono=void 0;var Kl=Tb(),Bb=Ib(),o9=zl(),u9=WD;Jl.Ono=u9;function WD(e,t){t=Bb.normalizeOptions(t);function r(...n){let{originalError:o,props:s,message:a}=Bb.normalizeArgs(n,t),l=new e(a);return Kl.extendError(l,o,s)}return r[Symbol.species]=e,r}WD.toJSON=function(t){return o9.toJSON.call(t)};WD.extend=function(t,r,n){return n||r instanceof Error?Kl.extendError(t,r,n):r?Kl.extendError(t,void 0,r):Kl.extendError(t)}});var Rb=N(Yl=>{"use strict";d();Object.defineProperty(Yl,"__esModule",{value:!0});Yl.ono=void 0;var go=HD(),s9=yn;Yl.ono=s9;yn.error=new go.Ono(Error);yn.eval=new go.Ono(EvalError);yn.range=new go.Ono(RangeError);yn.reference=new go.Ono(ReferenceError);yn.syntax=new go.Ono(SyntaxError);yn.type=new go.Ono(TypeError);yn.uri=new go.Ono(URIError);var a9=yn;function yn(...e){let t=e[0];if(typeof t=="object"&&typeof t.name=="string"){for(let r of Object.values(a9))if(typeof r=="function"&&r.name==="ono"){let n=r[Symbol.species];if(n&&n!==Error&&(t instanceof n||t.name===n.name))return r.apply(void 0,e)}}return yn.error.apply(void 0,e)}});var Mb=N(Nb=>{"use strict";d();Object.defineProperty(Nb,"__esModule",{value:!0});var Vne=ze("util")});var Nt=N((Lr,Eu)=>{"use strict";d();var c9=Lr&&Lr.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),l9=Lr&&Lr.__exportStar||function(e,t){for(var r in e)r!=="default"&&!t.hasOwnProperty(r)&&c9(t,e,r)};Object.defineProperty(Lr,"__esModule",{value:!0});Lr.ono=void 0;var jb=Rb();Object.defineProperty(Lr,"ono",{enumerable:!0,get:function(){return jb.ono}});var f9=HD();Object.defineProperty(Lr,"Ono",{enumerable:!0,get:function(){return f9.Ono}});l9(Mb(),Lr);Lr.default=jb.ono;typeof Eu=="object"&&typeof Eu.exports=="object"&&(Eu.exports=Object.assign(Eu.exports.default,Eu.exports))});var zD=N(ea=>{"use strict";d();var p9=ea&&ea.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ea,"__esModule",{value:!0});ea.default=d9;var $b=p9(ze("path"));function d9(e){return e.startsWith("\\\\?\\")?e:e.split($b.default?.win32?.sep).join($b.default?.posix?.sep??"/")}});var Lb=N(Xl=>{"use strict";d();Object.defineProperty(Xl,"__esModule",{value:!0});Xl.isWindows=void 0;var h9=/^win/.test(globalThis.process?globalThis.process.platform:""),D9=()=>h9;Xl.isWindows=D9});var Er=N(Le=>{"use strict";d();var m9=Le&&Le.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),g9=Le&&Le.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),_9=Le&&Le.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&m9(r,t,n[o]);return g9(r,t),r}})(),y9=Le&&Le.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Le,"__esModule",{value:!0});Le.parse=void 0;Le.resolve=Ub;Le.cwd=kb;Le.getProtocol=YD;Le.getExtension=S9;Le.stripQuery=qb;Le.getHash=Wb;Le.stripHash=KD;Le.isHttp=x9;Le.isFileSystemPath=JD;Le.fromFileSystemPath=P9;Le.toFileSystemPath=O9;Le.safePointerToPath=T9;Le.relative=I9;var Ql=y9(zD()),GD=_9(ze("path")),F9=/\//g,E9=/^(\w{2,}):\/\//i,v9=/~1/g,C9=/~0/g,w9=ze("path"),Zl=Lb(),b9=[[/\?/g,"%3F"],[/#/g,"%23"]],VD=[/%23/g,"#",/%24/g,"$",/%26/g,"&",/%2C/g,",",/%40/g,"@"],A9=e=>new URL(e);Le.parse=A9;function Ub(e,t){let r=new URL((0,Ql.default)(e),"resolve://"),n=new URL((0,Ql.default)(t),r),o=t.match(/(\s*)$/)?.[1]||"";if(n.protocol==="resolve:"){let{pathname:s,search:a,hash:l}=n;return s+a+l+o}return n.toString()+o}function kb(){if(typeof window<"u")return location.href;let e=process.cwd(),t=e.slice(-1);return t==="/"||t==="\\"?e:e+"/"}function YD(e){let t=E9.exec(e||"");if(t)return t[1].toLowerCase()}function S9(e){let t=e.lastIndexOf(".");return t>=0?qb(e.substr(t).toLowerCase()):""}function qb(e){let t=e.indexOf("?");return t>=0&&(e=e.substr(0,t)),e}function Wb(e){if(!e)return"#";let t=e.indexOf("#");return t>=0?e.substring(t):"#"}function KD(e){if(!e)return"";let t=e.indexOf("#");return t>=0&&(e=e.substring(0,t)),e}function x9(e){let t=YD(e);return t==="http"||t==="https"?!0:t===void 0?typeof window<"u":!1}function JD(e){if(typeof window<"u"||typeof process<"u"&&process.browser)return!1;let t=YD(e);return t===void 0||t==="file"}function P9(e){if((0,Zl.isWindows)()){let t=kb(),r=e.toUpperCase(),o=(0,Ql.default)(t).toUpperCase(),s=r.includes(o),a=r.includes(o),l=GD.win32?.isAbsolute(e)||e.startsWith("http://")||e.startsWith("https://")||e.startsWith("file://");!(s||a||l)&&!t.startsWith("http")&&(e=(0,w9.join)(t,e)),e=(0,Ql.default)(e)}e=encodeURI(e);for(let t of b9)e=e.replace(t[0],t[1]);return e}function O9(e,t){e=decodeURI(e);for(let n=0;n<VD.length;n+=2)e=e.replace(VD[n],VD[n+1]);let r=e.substr(0,7).toLowerCase()==="file://";return r&&(e=e[7]==="/"?e.substr(8):e.substr(7),(0,Zl.isWindows)()&&e[1]==="/"&&(e=e[0]+":"+e.substr(1)),t?e="file:///"+e:(r=!1,e=(0,Zl.isWindows)()?e:"/"+e)),(0,Zl.isWindows)()&&!r&&(e=e.replace(F9,"\\"),e.substr(1,2)===":\\"&&(e=e[0].toUpperCase()+e.substr(1))),e}function T9(e){return e.length<=1||e[0]!=="#"||e[1]!=="/"?[]:e.slice(2).split("/").map(t=>decodeURIComponent(t).replace(v9,"/").replace(C9,"~"))}function I9(e,t){if(!JD(e)||!JD(t))return Ub(e,t);let r=GD.default.dirname(KD(e)),n=KD(t);return GD.default.relative(r,n)+Wb(t)}});var vr=N(Je=>{"use strict";d();Object.defineProperty(Je,"__esModule",{value:!0});Je.InvalidPointerError=Je.TimeoutError=Je.MissingPointerError=Je.UnmatchedResolverError=Je.ResolverError=Je.UnmatchedParserError=Je.ParserError=Je.JSONParserErrorGroup=Je.JSONParserError=void 0;Je.isHandledError=B9;Je.normalizeError=R9;var Hb=Nt(),ef=Er(),Ur=class extends Error{constructor(t,r){super(),this.code="EUNKNOWN",this.name="JSONParserError",this.message=t,this.source=r,this.path=null,Hb.Ono.extend(this)}get footprint(){return`${this.path}+${this.source}+${this.code}+${this.message}`}};Je.JSONParserError=Ur;var tf=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,ef.toFileSystemPath)(t.$refs._root$Ref.path)}'`,Hb.Ono.extend(this)}static getParserErrors(t){let r=[];for(let n of Object.values(t.$refs._$refs))n.errors&&r.push(...n.errors);return r}get errors(){return e.getParserErrors(this.files)}};Je.JSONParserErrorGroup=tf;var XD=class extends Ur{constructor(t,r){super(`Error parsing ${r}: ${t}`,r),this.code="EPARSER",this.name="ParserError"}};Je.ParserError=XD;var ZD=class extends Ur{constructor(t){super(`Could not find parser for "${t}"`,t),this.code="EUNMATCHEDPARSER",this.name="UnmatchedParserError"}};Je.UnmatchedParserError=ZD;var QD=class extends Ur{constructor(t,r){super(t.message||`Error reading file "${r}"`,r),this.code="ERESOLVER",this.name="ResolverError","code"in t&&(this.ioErrorCode=String(t.code))}};Je.ResolverError=QD;var em=class extends Ur{constructor(t){super(`Could not find resolver for "${t}"`,t),this.code="EUNMATCHEDRESOLVER",this.name="UnmatchedResolverError"}};Je.UnmatchedResolverError=em;var tm=class extends Ur{constructor(t,r){super(`Missing $ref pointer "${(0,ef.getHash)(r)}". Token "${t}" does not exist.`,(0,ef.stripHash)(r)),this.code="EMISSINGPOINTER",this.name="MissingPointerError"}};Je.MissingPointerError=tm;var rm=class extends Ur{constructor(t){super(`Dereferencing timeout reached: ${t}ms`),this.code="ETIMEOUT",this.name="TimeoutError"}};Je.TimeoutError=rm;var nm=class extends Ur{constructor(t,r){super(`Invalid $ref pointer "${t}". Pointers must begin with "#/"`,(0,ef.stripHash)(r)),this.code="EUNMATCHEDRESOLVER",this.name="InvalidPointerError"}};Je.InvalidPointerError=nm;function B9(e){return e instanceof Ur||e instanceof tf}function R9(e){return e.path===null&&(e.path=[]),e}});var ta=N(kr=>{"use strict";d();var N9=kr&&kr.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),M9=kr&&kr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),j9=kr&&kr.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&N9(r,t,n[o]);return M9(r,t),r}})(),$9=kr&&kr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(kr,"__esModule",{value:!0});var im=$9(vu()),om=j9(Er()),nf=vr(),L9=/\//g,U9=/~/g,k9=/~1/g,q9=/~0/g,W9=e=>{try{return decodeURIComponent(e)}catch{return e}},of=class e{constructor(t,r,n){this.$ref=t,this.path=r,this.originalPath=n||r,this.value=void 0,this.circular=!1,this.indirections=0}resolve(t,r,n){let o=e.parse(this.path,this.originalPath);this.value=Vb(t);for(let s=0;s<o.length;s++){if(rf(this,r,n)&&(this.path=e.join(this.path,o.slice(s))),typeof this.value=="object"&&this.value!==null&&!Gb(n)&&"$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 nf.MissingPointerError(a,decodeURI(this.originalPath))}else this.value=this.value[a]}return(!this.value||this.value.$ref&&om.resolve(this.path,this.value.$ref)!==n)&&rf(this,r,n),this}set(t,r,n){let o=e.parse(this.path),s;if(o.length===0)return this.value=r,r;this.value=Vb(t);for(let a=0;a<o.length-1;a++)rf(this,n),s=o[a],this.value&&this.value[s]!==void 0?this.value=this.value[s]:this.value=zb(this,s,{});return rf(this,n),s=o[o.length-1],zb(this,s,r),t}static parse(t,r){let n=om.getHash(t).substring(1);if(!n)return[];let o=n.split("/");for(let s=0;s<o.length;s++)o[s]=W9(o[s].replace(k9,"/").replace(q9,"~"));if(o[0]!=="")throw new nf.InvalidPointerError(n,r===void 0?t:r);return o.slice(1)}static join(t,r){t.indexOf("#")===-1&&(t+="#"),r=Array.isArray(r)?r:[r];for(let n=0;n<r.length;n++){let o=r[n];t+="/"+encodeURIComponent(o.replace(U9,"~0").replace(L9,"~1"))}return t}};function rf(e,t,r){if(im.default.isAllowed$Ref(e.value,t)){let n=om.resolve(e.path,e.value.$ref);if(n===e.path&&!Gb(r))e.circular=!0;else{let o=e.$ref.$refs._resolve(n,e.path,t);return o===null?!1:(e.indirections+=o.indirections+1,im.default.isExtended$Ref(e.value)?(e.value=im.default.dereference(e.value,o.value),!1):(e.$ref=o.$ref,e.path=o.path,e.value=o.value,!0))}}}kr.default=of;function zb(e,t,r){if(e.value&&typeof e.value=="object")t==="-"&&Array.isArray(e.value)?e.value.push(r):e.value[t]=r;else throw new nf.JSONParserError(`Error assigning $ref pointer "${e.path}".
|
|
109
|
+
Cannot set "${t}" of a non-object.`);return r}function Vb(e){if((0,nf.isHandledError)(e))throw e;return e}function Gb(e){return typeof e=="string"&&of.parse(e).length==0}});var vu=N(ra=>{"use strict";d();var H9=ra&&ra.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ra,"__esModule",{value:!0});var Kb=H9(ta()),uf=vr(),um=Er(),sm=class e{constructor(t){this.errors=[],this.$refs=t}addError(t){this.errors===void 0&&(this.errors=[]);let r=this.errors.map(({footprint:n})=>n);"errors"in t&&Array.isArray(t.errors)?this.errors.push(...t.errors.map(uf.normalizeError).filter(({footprint:n})=>!r.includes(n))):(!("footprint"in t)||!r.includes(t.footprint))&&this.errors.push((0,uf.normalizeError)(t))}exists(t,r){try{return this.resolve(t,r),!0}catch{return!1}}get(t,r){return this.resolve(t,r)?.value}resolve(t,r,n,o){let s=new Kb.default(this,t,n);try{return s.resolve(this.value,r,o)}catch(a){if(!r||!r.continueOnError||!(0,uf.isHandledError)(a))throw a;return a.path===null&&(a.path=(0,um.safePointerToPath)((0,um.getHash)(o))),a instanceof uf.InvalidPointerError&&(a.source=decodeURI((0,um.stripHash)(o))),this.addError(a),null}}set(t,r){let n=new Kb.default(this,t);this.value=n.set(this.value,r)}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,r){if(this.is$Ref(t)){if(t.$ref.substring(0,2)==="#/"||t.$ref==="#")return!0;if(t.$ref[0]!=="#"&&(!r||r.resolve?.external))return!0}}static isExtended$Ref(t){return e.is$Ref(t)&&Object.keys(t).length>1}static dereference(t,r){if(r&&typeof r=="object"&&e.isExtended$Ref(t)){let n={};for(let o of Object.keys(t))o!=="$ref"&&(n[o]=t[o]);for(let o of Object.keys(r))o in n||(n[o]=r[o]);return n}else return r}};ra.default=sm});var Qb=N(qr=>{"use strict";d();var z9=qr&&qr.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),V9=qr&&qr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),G9=qr&&qr.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&z9(r,t,n[o]);return V9(r,t),r}})(),Zb=qr&&qr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(qr,"__esModule",{value:!0});var Jb=Nt(),K9=Zb(vu()),xi=G9(Er()),Yb=Zb(zD()),am=class{paths(...t){return Xb(this._$refs,t.flat()).map(n=>(0,Yb.default)(n.decoded))}values(...t){let r=this._$refs;return Xb(r,t.flat()).reduce((o,s)=>(o[(0,Yb.default)(s.decoded)]=r[s.encoded].value,o),{})}exists(t,r){try{return this._resolve(t,"",r),!0}catch{return!1}}get(t,r){return this._resolve(t,"",r).value}set(t,r){let n=xi.resolve(this._root$Ref.path,t),o=xi.stripHash(n),s=this._$refs[o];if(!s)throw(0,Jb.ono)(`Error resolving $ref pointer "${t}".
|
|
110
|
+
"${o}" not found.`);s.set(n,r)}_get$Ref(t){t=xi.resolve(this._root$Ref.path,t);let r=xi.stripHash(t);return this._$refs[r]}_add(t){let r=xi.stripHash(t),n=new K9.default(this);return n.path=r,this._$refs[r]=n,this._root$Ref=this._root$Ref||n,n}_resolve(t,r,n){let o=xi.resolve(this._root$Ref.path,t),s=xi.stripHash(o),a=this._$refs[s];if(!a)throw(0,Jb.ono)(`Error resolving $ref pointer "${t}".
|
|
111
|
+
"${s}" not found.`);return a.resolve(o,n,t,r)}constructor(){this._$refs={},this.toJSON=this.values,this.circular=!1,this._$refs={},this._root$Ref=null}};qr.default=am;function Xb(e,t){let r=Object.keys(e);return t=Array.isArray(t[0])?t[0]:Array.prototype.slice.call(t),t.length>0&&t[0]&&(r=r.filter(n=>t.includes(e[n].pathType))),r.map(n=>({encoded:n,decoded:e[n].pathType==="file"?xi.toFileSystemPath(n,!0):n}))}});var t2=N(Cu=>{"use strict";d();Object.defineProperty(Cu,"__esModule",{value:!0});Cu.all=J9;Cu.filter=Y9;Cu.sort=X9;Cu.run=Z9;function J9(e){return Object.keys(e||{}).filter(t=>typeof e[t]=="object").map(t=>(e[t].name=t,e[t]))}function Y9(e,t,r){return e.filter(n=>!!e2(n,t,r))}function X9(e){for(let t of e)t.order=t.order||Number.MAX_SAFE_INTEGER;return e.sort((t,r)=>t.order-r.order)}async function Z9(e,t,r,n){let o,s,a=0;return new Promise((l,p)=>{D();function D(){if(o=e[a++],!o)return p(s);try{let v=e2(o,t,r,g,n);if(v&&typeof v.then=="function")v.then(F,w);else if(v!==void 0)F(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):F(S)}function F(v){l({plugin:o,result:v})}function w(v){s={plugin:o,error:v},D()}})}function e2(e,t,r,n,o){let s=e[t];if(typeof s=="function")return s.apply(e,[r,n,o]);if(!n){if(s instanceof RegExp)return s.test(r.url);if(typeof s=="string")return s===r.extension;if(Array.isArray(s))return s.indexOf(r.extension)!==-1}return s}});var lm=N(qn=>{"use strict";d();var Q9=qn&&qn.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),eL=qn&&qn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),r2=qn&&qn.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&Q9(r,t,n[o]);return eL(r,t),r}})();Object.defineProperty(qn,"__esModule",{value:!0});var cm=Nt(),tL=r2(Er()),Pi=r2(t2()),_o=vr();async function rL(e,t,r){let n=e.indexOf("#"),o="";n>=0&&(o=e.substring(n),e=e.substring(0,n));let s=t._add(e),a={url:e,hash:o,extension:tL.getExtension(e)};try{let l=await nL(a,r,t);s.pathType=l.plugin.name,a.data=l.result;let p=await iL(a,r,t);return s.value=p.result,p.result}catch(l){throw(0,_o.isHandledError)(l)&&(s.value=l),l}}async function nL(e,t,r){let n=Pi.all(t.resolve);n=Pi.filter(n,"canRead",e),Pi.sort(n);try{return await Pi.run(n,"read",e,r)}catch(o){throw!o&&t.continueOnError?new _o.UnmatchedResolverError(e.url):!o||!("error"in o)?cm.ono.syntax(`Unable to resolve $ref pointer "${e.url}"`):o.error instanceof _o.ResolverError?o.error:new _o.ResolverError(o,e.url)}}async function iL(e,t,r){let n=Pi.all(t.parse),o=Pi.filter(n,"canParse",e),s=o.length>0?o:n;Pi.sort(s);try{let a=await Pi.run(s,"parse",e,r);if(!a.plugin.allowEmpty&&oL(a.result))throw cm.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)?cm.ono.syntax(`Unable to parse ${e.url}`):a.error instanceof _o.ParserError?a.error:new _o.ParserError(a.error.message,e.url)}}function oL(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}qn.default=rL});var i2=N(fm=>{"use strict";d();Object.defineProperty(fm,"__esModule",{value:!0});var n2=vr();fm.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(r){if(this.allowBOM)try{let n=t.indexOf("{");return t=t.slice(n),JSON.parse(t)}catch(n){throw new n2.ParserError(n.message,e.url)}throw new n2.ParserError(r.message,e.url)}}else return t}}});var o2=N(na=>{"use strict";d();var uL=na&&na.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(na,"__esModule",{value:!0});var sL=vr(),aL=uL(du()),cL=du();na.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 aL.default.load(t,{schema:cL.JSON_SCHEMA})}catch(r){throw new sL.ParserError(r?.message||"Parser Error",e.url)}else return t}}});var u2=N(pm=>{"use strict";d();Object.defineProperty(pm,"__esModule",{value:!0});var lL=vr(),fL=/\.(txt|htm|html|md|xml|js|min|map|css|scss|less|svg)$/i;pm.default={order:300,allowEmpty:!0,encoding:"utf8",canParse(e){return(typeof e.data=="string"||Buffer.isBuffer(e.data))&&fL.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 lL.ParserError("data is not text",e.url)}}});var s2=N(dm=>{"use strict";d();Object.defineProperty(dm,"__esModule",{value:!0});var pL=/\.(jpeg|jpg|gif|png|bmp|ico)$/i;dm.default={order:400,allowEmpty:!0,canParse(e){return Buffer.isBuffer(e.data)&&pL.test(e.url)},parse(e){return Buffer.isBuffer(e.data)?e.data:Buffer.from(e.data)}}});var f2=N(Wr=>{"use strict";d();var dL=Wr&&Wr.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),hL=Wr&&Wr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),DL=Wr&&Wr.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&dL(r,t,n[o]);return hL(r,t),r}})(),mL=Wr&&Wr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Wr,"__esModule",{value:!0});var gL=mL(ze("fs")),a2=Nt(),c2=DL(Er()),l2=vr();Wr.default={order:100,canRead(e){return c2.isFileSystemPath(e.url)},async read(e){let t;try{t=c2.toFileSystemPath(e.url)}catch(r){throw new l2.ResolverError(a2.ono.uri(r,`Malformed URI: ${e.url}`),e.url)}try{return await gL.default.promises.readFile(t)}catch(r){throw new l2.ResolverError((0,a2.ono)(r,`Error opening file "${t}"`),t)}}}});var h2=N(Wn=>{"use strict";d();var _L=Wn&&Wn.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),yL=Wn&&Wn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),FL=Wn&&Wn.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&_L(r,t,n[o]);return yL(r,t),r}})();Object.defineProperty(Wn,"__esModule",{value:!0});var sf=Nt(),ia=FL(Er()),p2=vr();Wn.default={order:200,headers:null,timeout:6e4,redirects:5,withCredentials:!1,canRead(e){return ia.isHttp(e.url)},read(e){let t=ia.parse(e.url);return typeof window<"u"&&!t.protocol&&(t.protocol=ia.parse(location.href).protocol),d2(t,this)}};async function d2(e,t,r){e=ia.parse(e);let n=r||[];n.push(e.href);try{let o=await EL(e,t);if(o.status>=400)throw(0,sf.ono)({status:o.status},`HTTP ERROR ${o.status}`);if(o.status>=300){if(!Number.isNaN(t.redirects)&&n.length>t.redirects)throw new p2.ResolverError((0,sf.ono)({status:o.status},`Error downloading ${n[0]}.
|
|
113
|
+
Too many redirects:
|
|
114
|
+
${n.join(`
|
|
115
|
+
`)}`));if(!("location"in o.headers)||!o.headers.location)throw(0,sf.ono)({status:o.status},`HTTP ${o.status} redirect with no location header`);{let s=ia.resolve(e.href,o.headers.location);return d2(s,t,n)}}else{if(o.body){let s=await o.arrayBuffer();return Buffer.from(s)}return Buffer.alloc(0)}}catch(o){throw new p2.ResolverError((0,sf.ono)(o,`Error downloading ${e.href}`),e.href)}}async function EL(e,t){let r,n;t.timeout&&(r=new AbortController,n=setTimeout(()=>r.abort(),t.timeout));let o=await fetch(e,{method:"GET",headers:t.headers||{},credentials:t.withCredentials?"include":"same-origin",signal:r?r.signal:null});return n&&clearTimeout(n),o}});var hm=N(Hn=>{"use strict";d();var wu=Hn&&Hn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Hn,"__esModule",{value:!0});Hn.getNewOptions=Hn.getJsonSchemaRefParserDefaultOptions=void 0;var vL=wu(i2()),CL=wu(o2()),wL=wu(u2()),bL=wu(s2()),AL=wu(f2()),SL=wu(h2()),xL=()=>({parse:{json:{...vL.default},yaml:{...CL.default},text:{...wL.default},binary:{...bL.default}},resolve:{file:{...AL.default},http:{...SL.default},external:!0},continueOnError:!1,dereference:{circular:!0,excludedPathMatcher:()=>!1,referenceResolution:"relative"},mutateInputSchema:!0});Hn.getJsonSchemaRefParserDefaultOptions=xL;var PL=e=>{let t=(0,Hn.getJsonSchemaRefParserDefaultOptions)();return e&&m2(t,e),t};Hn.getNewOptions=PL;function m2(e,t){if(D2(t)){let r=Object.keys(t).filter(n=>!["__proto__","constructor","prototype"].includes(n));for(let n=0;n<r.length;n++){let o=r[n],s=t[o],a=e[o];D2(s)?e[o]=m2(a||{},s):s!==void 0&&(e[o]=s)}}return e}function D2(e){return e&&typeof e=="object"&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}});var _2=N(af=>{"use strict";d();Object.defineProperty(af,"__esModule",{value:!0});af.normalizeArgs=g2;var OL=hm();function g2(e){let t,r,n,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"?(r=s[1],n=s[2]):(r=void 0,n=s[1])):(t="",r=s[0],n=s[1]);try{n=(0,OL.getNewOptions)(n)}catch(a){console.error(`JSON Schema Ref Parser: Error normalizing options: ${a}`)}return!n.mutateInputSchema&&typeof r=="object"&&(r=JSON.parse(JSON.stringify(r))),{path:t,schema:r,options:n,callback:o}}af.default=g2});var y2=N(Hr=>{"use strict";d();var TL=Hr&&Hr.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),IL=Hr&&Hr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),BL=Hr&&Hr.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&TL(r,t,n[o]);return IL(r,t),r}})(),Dm=Hr&&Hr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Hr,"__esModule",{value:!0});var RL=Dm(vu()),NL=Dm(ta()),ML=Dm(lm()),bu=BL(Er()),jL=vr();function $L(e,t){if(!t.resolve?.external)return Promise.resolve();try{let r=mm(e.schema,e.$refs._root$Ref.path+"#",e.$refs,t);return Promise.all(r)}catch(r){return Promise.reject(r)}}function mm(e,t,r,n,o,s){o||(o=new Set);let a=[];if(e&&typeof e=="object"&&!ArrayBuffer.isView(e)&&!o.has(e)){o.add(e),RL.default.isExternal$Ref(e)&&a.push(LL(e,t,r,n));let l=Object.keys(e);for(let p of l){let D=NL.default.join(t,p),g=e[p];a=a.concat(mm(g,D,r,n,o,s))}}return a}async function LL(e,t,r,n){let o=n.dereference?.externalReferenceResolution==="root",s=bu.resolve(o?bu.cwd():t,e.$ref),a=bu.stripHash(s),l=r._$refs[a];if(l)return Promise.resolve(l.value);try{let p=await(0,ML.default)(s,r,n),D=mm(p,a+"#",r,n,new Set,!0);return Promise.all(D)}catch(p){if(!n?.continueOnError||!(0,jL.isHandledError)(p))throw p;return r._$refs[a]&&(p.source=decodeURI(bu.stripHash(t)),p.path=bu.safePointerToPath(bu.getHash(t))),[]}}Hr.default=$L});var v2=N(zr=>{"use strict";d();var UL=zr&&zr.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),kL=zr&&zr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),qL=zr&&zr.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&UL(r,t,n[o]);return kL(r,t),r}})(),E2=zr&&zr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(zr,"__esModule",{value:!0});var cf=E2(vu()),oa=E2(ta()),gm=qL(Er());function WL(e,t){let r=[];_m(e,"schema",e.$refs._root$Ref.path+"#","#",0,r,e.$refs,t),HL(r)}function _m(e,t,r,n,o,s,a,l){let p=t===null?e:e[t];if(p&&typeof p=="object"&&!ArrayBuffer.isView(p))if(cf.default.isAllowed$Ref(p))F2(e,t,r,n,o,s,a,l);else{let D=Object.keys(p).sort((g,F)=>g==="definitions"?-1:F==="definitions"?1:g.length-F.length);for(let g of D){let F=oa.default.join(r,g),w=oa.default.join(n,g),v=p[g];cf.default.isAllowed$Ref(v)?F2(p,g,r,w,o,s,a,l):_m(p,g,F,w,o,s,a,l)}}}function F2(e,t,r,n,o,s,a,l){let p=t===null?e:e[t],D=gm.resolve(r,p.$ref),g=a._resolve(D,n,l);if(g===null)return;let w=oa.default.parse(n).length,v=gm.stripHash(g.path),S=gm.getHash(g.path),O=v!==a._root$Ref.path,P=cf.default.isExtended$Ref(p);o+=g.indirections;let I=zL(s,e,t);if(I)if(w<I.depth||o<I.indirections)VL(s,I);else return;s.push({$ref:p,parent:e,key:t,pathFromRoot:n,depth:w,file:v,hash:S,value:g.value,circular:g.circular,extended:P,external:O,indirections:o}),(!I||O)&&_m(g.value,null,g.path,n,o+1,s,a,l)}function HL(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,r,n;for(let o of e)o.external?o.file===t&&o.hash===r?o.$ref.$ref=n:o.file===t&&o.hash.indexOf(r+"/")===0?o.$ref.$ref=oa.default.join(n,oa.default.parse(o.hash.replace(r,"#"))):(t=o.file,r=o.hash,n=o.pathFromRoot,o.$ref=o.parent[o.key]=cf.default.dereference(o.$ref,o.value),o.circular&&(o.$ref.$ref=o.pathFromRoot)):o.$ref.$ref=o.hash}function zL(e,t,r){for(let n of e)if(n&&n.parent===t&&n.key===r)return n}function VL(e,t){let r=e.indexOf(t);e.splice(r,1)}zr.default=WL});var x2=N(Vr=>{"use strict";d();var GL=Vr&&Vr.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),KL=Vr&&Vr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),JL=Vr&&Vr.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&GL(r,t,n[o]);return KL(r,t),r}})(),A2=Vr&&Vr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Vr,"__esModule",{value:!0});var lf=A2(vu()),C2=A2(ta()),YL=Nt(),w2=JL(Er()),XL=vr();Vr.default=ZL;function ZL(e,t){let r=Date.now(),n=ym(e.schema,e.$refs._root$Ref.path,"#",new Set,new Set,new Map,e.$refs,t,r);e.$refs.circular=n.circular,e.schema=n.value}function ym(e,t,r,n,o,s,a,l,p){let D,g={value:e,circular:!1};if(l&&l.timeoutMs&&Date.now()-p>l.timeoutMs)throw new XL.TimeoutError(l.timeoutMs);let F=l.dereference||{},w=F.excludedPathMatcher||(()=>!1);if((F?.circular==="ignore"||!o.has(e))&&e&&typeof e=="object"&&!ArrayBuffer.isView(e)&&!w(r)){if(n.add(e),o.add(e),lf.default.isAllowed$Ref(e,l))D=b2(e,t,r,n,o,s,a,l,p),g.circular=D.circular,g.value=D.value;else for(let v of Object.keys(e)){let S=C2.default.join(t,v),O=C2.default.join(r,v);if(w(O))continue;let P=e[v],I=!1;lf.default.isAllowed$Ref(P,l)?(D=b2(P,S,O,n,o,s,a,l,p),I=D.circular,e[v]!==D.value&&(e[v]=D.value,F?.onDereference?.(P.$ref,e[v],e,v))):n.has(P)?I=S2(S,a,l):(D=ym(P,S,O,n,o,s,a,l,p),I=D.circular,e[v]!==D.value&&(e[v]=D.value)),g.circular=g.circular||I}n.delete(e)}return g}function b2(e,t,r,n,o,s,a,l,p){let g=lf.default.isExternal$Ref(e)&&l?.dereference?.externalReferenceResolution==="root",F=w2.resolve(g?w2.cwd():t,e.$ref),w=s.get(F);if(w&&!w.circular){let U=Object.keys(e);if(U.length>1){let q={};for(let J of U)J!=="$ref"&&!(J in w.value)&&(q[J]=e[J]);return{circular:w.circular,value:Object.assign({},w.value,q)}}return w}let v=a._resolve(F,t,l);if(v===null)return{circular:!1,value:null};let S=v.circular,O=S||n.has(v.value);O&&S2(t,a,l);let P=lf.default.dereference(e,v.value);if(!O){let U=ym(P,v.path,r,n,o,s,a,l,p);O=U.circular,P=U.value}O&&!S&&l.dereference?.circular==="ignore"&&(P=e),S&&(P.$ref=r);let I={circular:O,value:P};return Object.keys(e).length===1&&s.set(F,I),I}function S2(e,t,r){if(t.circular=!0,!r.dereference.circular)throw YL.ono.reference(`Circular $ref pointer found at ${e}`);return!0}});var P2=N(Fm=>{"use strict";d();Object.defineProperty(Fm,"__esModule",{value:!0});function QL(){return typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:typeof setImmediate=="function"?setImmediate:function(t){setTimeout(t,0)}}Fm.default=QL()});var T2=N(ua=>{"use strict";d();var eU=ua&&ua.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ua,"__esModule",{value:!0});ua.default=tU;var O2=eU(P2());function tU(e,t){if(e){t.then(function(r){(0,O2.default)(function(){e(null,r)})},function(r){(0,O2.default)(function(){e(r)})});return}else return t}});var N2=N(oe=>{"use strict";d();var rU=oe&&oe.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),nU=oe&&oe.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),iU=oe&&oe.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&rU(r,t,n[o]);return nU(r,t),r}})(),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 I2=Fo(Qb()),oU=Fo(lm()),sa=Fo(_2());oe.jsonSchemaParserNormalizeArgs=sa.default;var uU=Fo(y2()),sU=Fo(v2()),R2=Fo(x2());oe.dereferenceInternal=R2.default;var yo=iU(Er()),Cr=vr();Object.defineProperty(oe,"JSONParserError",{enumerable:!0,get:function(){return Cr.JSONParserError}});Object.defineProperty(oe,"InvalidPointerError",{enumerable:!0,get:function(){return Cr.InvalidPointerError}});Object.defineProperty(oe,"MissingPointerError",{enumerable:!0,get:function(){return Cr.MissingPointerError}});Object.defineProperty(oe,"ResolverError",{enumerable:!0,get:function(){return Cr.ResolverError}});Object.defineProperty(oe,"ParserError",{enumerable:!0,get:function(){return Cr.ParserError}});Object.defineProperty(oe,"UnmatchedParserError",{enumerable:!0,get:function(){return Cr.UnmatchedParserError}});Object.defineProperty(oe,"UnmatchedResolverError",{enumerable:!0,get:function(){return Cr.UnmatchedResolverError}});Object.defineProperty(oe,"isHandledError",{enumerable:!0,get:function(){return Cr.isHandledError}});Object.defineProperty(oe,"JSONParserErrorGroup",{enumerable:!0,get:function(){return Cr.JSONParserErrorGroup}});var B2=Nt(),Gr=Fo(T2()),aU=hm();Object.defineProperty(oe,"getJsonSchemaRefParserDefaultOptions",{enumerable:!0,get:function(){return aU.getJsonSchemaRefParserDefaultOptions}});var Oi=class e{constructor(){this.schema=null,this.$refs=new I2.default}async parse(){let t=(0,sa.default)(arguments),r;if(!t.path&&!t.schema){let o=(0,B2.ono)(`Expected a file path, URL, or object. Got ${t.path||t.schema}`);return(0,Gr.default)(t.callback,Promise.reject(o))}this.schema=null,this.$refs=new I2.default;let n="http";if(yo.isFileSystemPath(t.path))t.path=yo.fromFileSystemPath(t.path),n="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=n,r=Promise.resolve(t.schema)}else r=(0,oU.default)(t.path,this.$refs,t.options);try{let o=await r;if(o!==null&&typeof o=="object"&&!Buffer.isBuffer(o))return this.schema=o,(0,Gr.default)(t.callback,Promise.resolve(this.schema));if(t.options.continueOnError)return this.schema=null,(0,Gr.default)(t.callback,Promise.resolve(this.schema));throw B2.ono.syntax(`"${this.$refs._root$Ref.path||o}" is not a valid JSON Schema`)}catch(o){return!t.options.continueOnError||!(0,Cr.isHandledError)(o)?(0,Gr.default)(t.callback,Promise.reject(o)):(this.$refs._$refs[yo.stripHash(t.path)]&&this.$refs._$refs[yo.stripHash(t.path)].addError(o),(0,Gr.default)(t.callback,Promise.resolve(null)))}}static parse(){let t=new e;return t.parse.apply(t,arguments)}async resolve(){let t=(0,sa.default)(arguments);try{return await this.parse(t.path,t.schema,t.options),await(0,uU.default)(this,t.options),Em(this),(0,Gr.default)(t.callback,Promise.resolve(this.$refs))}catch(r){return(0,Gr.default)(t.callback,Promise.reject(r))}}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,sa.default)(arguments);try{return await this.resolve(t.path,t.schema,t.options),(0,sU.default)(this,t.options),Em(this),(0,Gr.default)(t.callback,Promise.resolve(this.schema))}catch(r){return(0,Gr.default)(t.callback,Promise.reject(r))}}static dereference(){let t=new e;return t.dereference.apply(t,arguments)}async dereference(){let t=(0,sa.default)(arguments);try{return await this.resolve(t.path,t.schema,t.options),(0,R2.default)(this,t.options),Em(this),(0,Gr.default)(t.callback,Promise.resolve(this.schema))}catch(r){return(0,Gr.default)(t.callback,Promise.reject(r))}}};oe.$RefParser=Oi;oe.default=Oi;function Em(e){if(Cr.JSONParserErrorGroup.getParserErrors(e).length>0)throw new Cr.JSONParserErrorGroup(e)}oe.parse=Oi.parse;oe.resolve=Oi.resolve;oe.bundle=Oi.bundle;oe.dereference=Oi.dereference});var M2=N(Au=>{"use strict";d();var cU=Au&&Au.__awaiter||function(e,t,r,n){function o(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function l(g){try{D(n.next(g))}catch(F){a(F)}}function p(g){try{D(n.throw(g))}catch(F){a(F)}}function D(g){g.done?s(g.value):o(g.value).then(l,p)}D((n=n.apply(e,t||[])).next())})};Object.defineProperty(Au,"__esModule",{value:!0});Au.dereference=void 0;var lU=N2(),fU=Ai();function pU(e,t){return cU(this,arguments,void 0,function*(r,{cwd:n,$refOptions:o}){(0,fU.log)("green","dereferencer","Dereferencing input schema:",n,r);let s=new lU.$RefParser,a=new WeakMap,l=yield s.dereference(n,r,Object.assign(Object.assign({},o),{dereference:Object.assign(Object.assign({},o.dereference),{onDereference(p,D){a.set(D,p)}})}));return{dereferencedPaths:a,dereferencedSchema:l}})}Au.dereference=pU});var j2=N(ff=>{"use strict";d();Object.defineProperty(ff,"__esModule",{value:!0});ff.validate=void 0;var dU=Ai(),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:r}=e;if(typeof t=="number"&&typeof r=="number")return t>=r});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 hU(e,t){let r=[];return Eo.forEach((n,o)=>{(0,dU.traverse)(e,(s,a)=>(n(s)===!1&&r.push(`Error at key "${a}" in file "${t}": ${o}`),s))}),r}ff.validate=hU});var L2=N(pf=>{"use strict";d();Object.defineProperty(pf,"__esModule",{value:!0});pf.link=void 0;var $2=lo(),DU=$n();function vm(e,t=null){if(!Array.isArray(e)&&!(0,DU.isPlainObject)(e)||e.hasOwnProperty($2.Parent))return e;Object.defineProperty(e,$2.Parent,{enumerable:!1,value:t,writable:!1}),Array.isArray(e)&&e.forEach(r=>vm(r,e));for(let r in e)vm(e[r],e);return e}pf.link=vm});var U2=N(df=>{"use strict";d();Object.defineProperty(df,"__esModule",{value:!0});df.validateOptions=void 0;function mU({maxItems:e}){if(e!==void 0&&e<-1)throw RangeError(`Expected options.maxItems to be >= -1, but was given ${e}.`)}df.validateOptions=mU});var RD=N(Wt=>{"use strict";d();var gU=Wt&&Wt.__awaiter||function(e,t,r,n){function o(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function l(g){try{D(n.next(g))}catch(F){a(F)}}function p(g){try{D(n.throw(g))}catch(F){a(F)}}function D(g){g.done?s(g.value):o(g.value).then(l,p)}D((n=n.apply(e,t||[])).next())})};Object.defineProperty(Wt,"__esModule",{value:!0});Wt.ValidationError=Wt.compile=Wt.compileFromFile=Wt.DEFAULT_OPTIONS=void 0;var _U=ze("fs"),Cm=$n(),yU=ze("path"),FU=GC(),EU=BD(),vU=gb(),CU=Fb(),wU=vb(),bU=M2(),ir=Ai(),AU=j2(),SU=ze("util"),xU=L2(),PU=U2();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 OU(e,t=Wt.DEFAULT_OPTIONS){let r=TU(e);return k2(r,(0,ir.stripExtension)(e),Object.assign({cwd:(0,yU.dirname)(e)},t))}Wt.compileFromFile=OU;function TU(e){let t=(0,ir.Try)(()=>(0,_U.readFileSync)(e),()=>{throw new ReferenceError(`Unable to read file "${e}"`)});return(0,ir.parseFileAsJSONSchema)(e,t.toString())}function k2(e,t){return gU(this,arguments,void 0,function*(r,n,o={}){(0,PU.validateOptions)(o);let s=(0,Cm.merge)({},Wt.DEFAULT_OPTIONS,o),a=Date.now();function l(){return`(${Date.now()-a}ms)`}(0,Cm.endsWith)(s.cwd,"/")||(s.cwd+="/");let p=(0,Cm.cloneDeep)(r),{dereferencedPaths:D,dereferencedSchema:g}=yield(0,bU.dereference)(p,s);process.env.VERBOSE&&((0,SU.isDeepStrictEqual)(p,g)?(0,ir.log)("green","dereferencer",l(),"\u2705 No change"):(0,ir.log)("green","dereferencer",l(),"\u2705 Result:",g));let F=(0,xU.link)(g);process.env.VERBOSE&&(0,ir.log)("green","linker",l(),"\u2705 No change");let w=(0,AU.validate)(F,n);if(w.length)throw w.forEach(U=>(0,ir.error)(U)),new hf;process.env.VERBOSE&&(0,ir.log)("green","validator",l(),"\u2705 No change");let v=(0,vU.normalize)(F,D,n,s);(0,ir.log)("yellow","normalizer",l(),"\u2705 Result:",v);let S=(0,wU.parse)(v,s);(0,ir.log)("blue","parser",l(),"\u2705 Result:",S);let O=(0,CU.optimize)(S,s);(0,ir.log)("cyan","optimizer",l(),"\u2705 Result:",O);let P=(0,EU.generate)(O,s);(0,ir.log)("magenta","generator",l(),"\u2705 Result:",P);let I=yield(0,FU.format)(P,s);return(0,ir.log)("white","formatter",l(),"\u2705 Result:",I),I})}Wt.compile=k2;var hf=class extends Error{};Wt.ValidationError=hf});var xm=N(la=>{"use strict";d();var mk=la&&la.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(la,"__esModule",{value:!0});la.default=gk;var _1=mk(ze("path"));function gk(e){return e.startsWith("\\\\?\\")?e:e.split(_1.default?.win32?.sep).join(_1.default?.posix?.sep??"/")}});var y1=N(mf=>{"use strict";d();Object.defineProperty(mf,"__esModule",{value:!0});mf.isWindows=void 0;var _k=/^win/.test(globalThis.process?globalThis.process.platform:""),yk=()=>_k;mf.isWindows=yk});var wr=N(Ue=>{"use strict";d();var Fk=Ue&&Ue.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),Ek=Ue&&Ue.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),vk=Ue&&Ue.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&Fk(r,t,n[o]);return Ek(r,t),r}})(),Ck=Ue&&Ue.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ue,"__esModule",{value:!0});Ue.parse=void 0;Ue.resolve=F1;Ue.cwd=E1;Ue.getProtocol=Bm;Ue.getExtension=Tk;Ue.stripQuery=v1;Ue.getHash=C1;Ue.stripHash=Tm;Ue.isHttp=Ik;Ue.isFileSystemPath=Im;Ue.fromFileSystemPath=Bk;Ue.toFileSystemPath=Rk;Ue.safePointerToPath=Nk;Ue.relative=Mk;var _f=Ck(xm()),Om=vk(ze("path")),wk=/\//g,bk=/^(\w{2,}):\/\//i,Ak=/~1/g,Sk=/~0/g,xk=ze("path"),gf=y1(),Pk=[[/\?/g,"%3F"],[/#/g,"%23"]],Pm=[/%23/g,"#",/%24/g,"$",/%26/g,"&",/%2C/g,",",/%40/g,"@"],Ok=e=>new URL(e);Ue.parse=Ok;function F1(e,t){let r=new URL((0,_f.default)(e),"https://aaa.nonexistanturl.com"),n=new URL((0,_f.default)(t),r),o=t.match(/(\s*)$/)?.[1]||"";if(n.hostname==="aaa.nonexistanturl.com"){let{pathname:s,search:a,hash:l}=n;return s+a+l+o}return n.toString()+o}function E1(){if(typeof window<"u")return location.href;let e=process.cwd(),t=e.slice(-1);return t==="/"||t==="\\"?e:e+"/"}function Bm(e){let t=bk.exec(e||"");if(t)return t[1].toLowerCase()}function Tk(e){let t=e.lastIndexOf(".");return t>=0?v1(e.substr(t).toLowerCase()):""}function v1(e){let t=e.indexOf("?");return t>=0&&(e=e.substr(0,t)),e}function C1(e){if(!e)return"#";let t=e.indexOf("#");return t>=0?e.substring(t):"#"}function Tm(e){if(!e)return"";let t=e.indexOf("#");return t>=0&&(e=e.substring(0,t)),e}function Ik(e){let t=Bm(e);return t==="http"||t==="https"?!0:t===void 0?typeof window<"u":!1}function Im(e){if(typeof window<"u"||typeof process<"u"&&process.browser)return!1;let t=Bm(e);return t===void 0||t==="file"}function Bk(e){if((0,gf.isWindows)()){let t=E1(),r=e.toUpperCase(),o=(0,_f.default)(t).toUpperCase(),s=r.includes(o),a=r.includes(o),l=Om.win32?.isAbsolute(e)||e.startsWith("http://")||e.startsWith("https://")||e.startsWith("file://");!(s||a||l)&&!t.startsWith("http")&&(e=(0,xk.join)(t,e)),e=(0,_f.default)(e)}e=encodeURI(e);for(let t of Pk)e=e.replace(t[0],t[1]);return e}function Rk(e,t){e=decodeURI(e);for(let n=0;n<Pm.length;n+=2)e=e.replace(Pm[n],Pm[n+1]);let r=e.substr(0,7).toLowerCase()==="file://";return r&&(e=e[7]==="/"?e.substr(8):e.substr(7),(0,gf.isWindows)()&&e[1]==="/"&&(e=e[0]+":"+e.substr(1)),t?e="file:///"+e:(r=!1,e=(0,gf.isWindows)()?e:"/"+e)),(0,gf.isWindows)()&&!r&&(e=e.replace(wk,"\\"),e.substr(1,2)===":\\"&&(e=e[0].toUpperCase()+e.substr(1))),e}function Nk(e){return e.length<=1||e[0]!=="#"||e[1]!=="/"?[]:e.slice(2).split("/").map(t=>decodeURIComponent(t).replace(Ak,"/").replace(Sk,"~"))}function Mk(e,t){if(!Im(e)||!Im(t))return F1(e,t);let r=Om.default.dirname(Tm(e)),n=Tm(t);return Om.default.relative(r,n)+C1(t)}});var br=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=jk;Ye.normalizeError=$k;var w1=Nt(),yf=wr(),Kr=class extends Error{constructor(t,r){super(),this.code="EUNKNOWN",this.name="JSONParserError",this.message=t,this.source=r,this.path=null,w1.Ono.extend(this)}get footprint(){return`${this.path}+${this.source}+${this.code}+${this.message}`}};Ye.JSONParserError=Kr;var Ff=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,yf.toFileSystemPath)(t.$refs._root$Ref.path)}'`,w1.Ono.extend(this)}static getParserErrors(t){let r=[];for(let n of Object.values(t.$refs._$refs))n.errors&&r.push(...n.errors);return r}get errors(){return e.getParserErrors(this.files)}};Ye.JSONParserErrorGroup=Ff;var Rm=class extends Kr{constructor(t,r){super(`Error parsing ${r}: ${t}`,r),this.code="EPARSER",this.name="ParserError"}};Ye.ParserError=Rm;var Nm=class extends Kr{constructor(t){super(`Could not find parser for "${t}"`,t),this.code="EUNMATCHEDPARSER",this.name="UnmatchedParserError"}};Ye.UnmatchedParserError=Nm;var Mm=class extends Kr{constructor(t,r){super(t.message||`Error reading file "${r}"`,r),this.code="ERESOLVER",this.name="ResolverError","code"in t&&(this.ioErrorCode=String(t.code))}};Ye.ResolverError=Mm;var jm=class extends Kr{constructor(t){super(`Could not find resolver for "${t}"`,t),this.code="EUNMATCHEDRESOLVER",this.name="UnmatchedResolverError"}};Ye.UnmatchedResolverError=jm;var $m=class extends Kr{constructor(t,r,n,o,s){super(`Missing $ref pointer "${(0,yf.getHash)(r)}". Token "${t}" does not exist.`,(0,yf.stripHash)(r)),this.code="EMISSINGPOINTER",this.name="MissingPointerError",this.targetToken=t,this.targetRef=n,this.targetFound=o,this.parentPath=s}};Ye.MissingPointerError=$m;var Lm=class extends Kr{constructor(t){super(`Dereferencing timeout reached: ${t}ms`),this.code="ETIMEOUT",this.name="TimeoutError"}};Ye.TimeoutError=Lm;var Um=class extends Kr{constructor(t,r){super(`Invalid $ref pointer "${t}". Pointers must begin with "#/"`,(0,yf.stripHash)(r)),this.code="EUNMATCHEDRESOLVER",this.name="InvalidPointerError"}};Ye.InvalidPointerError=Um;function jk(e){return e instanceof Kr||e instanceof Ff}function $k(e){return e.path===null&&(e.path=[]),e}});var fa=N(Ht=>{"use strict";d();var Lk=Ht&&Ht.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),Uk=Ht&&Ht.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),kk=Ht&&Ht.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&Lk(r,t,n[o]);return Uk(r,t),r}})(),qk=Ht&&Ht.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ht,"__esModule",{value:!0});Ht.nullSymbol=void 0;var km=qk(xu()),qm=kk(wr()),vf=br();Ht.nullSymbol=Symbol("null");var Wk=/\//g,Hk=/~/g,zk=/~1/g,Vk=/~0/g,Gk=e=>{try{return decodeURIComponent(e)}catch{return e}},Cf=class e{constructor(t,r,n){this.$ref=t,this.path=r,this.originalPath=n||r,this.value=void 0,this.circular=!1,this.indirections=0}resolve(t,r,n){let o=e.parse(this.path,this.originalPath),s=[];this.value=A1(t);for(let a=0;a<o.length;a++){if(Ef(this,r,n)&&(this.path=e.join(this.path,o.slice(a))),typeof this.value=="object"&&this.value!==null&&!S1(n)&&"$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,""),F=e.join("",s),w=n?.replace(D,"");throw new vf.MissingPointerError(l,decodeURI(this.originalPath),g,F,w)}else this.value=this.value[l];s.push(l)}return(!this.value||this.value.$ref&&qm.resolve(this.path,this.value.$ref)!==n)&&Ef(this,r,n),this}set(t,r,n){let o=e.parse(this.path),s;if(o.length===0)return this.value=r,r;this.value=A1(t);for(let a=0;a<o.length-1;a++)Ef(this,n),s=o[a],this.value&&this.value[s]!==void 0?this.value=this.value[s]:this.value=b1(this,s,{});return Ef(this,n),s=o[o.length-1],b1(this,s,r),t}static parse(t,r){let n=qm.getHash(t).substring(1);if(!n)return[];let o=n.split("/");for(let s=0;s<o.length;s++)o[s]=Gk(o[s].replace(zk,"/").replace(Vk,"~"));if(o[0]!=="")throw new vf.InvalidPointerError(n,r===void 0?t:r);return o.slice(1)}static join(t,r){t.indexOf("#")===-1&&(t+="#"),r=Array.isArray(r)?r:[r];for(let n=0;n<r.length;n++){let o=r[n];t+="/"+encodeURIComponent(o.replace(Hk,"~0").replace(Wk,"~1"))}return t}};function Ef(e,t,r){if(km.default.isAllowed$Ref(e.value,t)){let n=qm.resolve(e.path,e.value.$ref);if(n===e.path&&!S1(r))e.circular=!0;else{let o=e.$ref.$refs._resolve(n,e.path,t);return o===null?!1:(e.indirections+=o.indirections+1,km.default.isExtended$Ref(e.value)?(e.value=km.default.dereference(e.value,o.value),!1):(e.$ref=o.$ref,e.path=o.path,e.value=o.value,!0))}}}Ht.default=Cf;function b1(e,t,r){if(e.value&&typeof e.value=="object")t==="-"&&Array.isArray(e.value)?e.value.push(r):e.value[t]=r;else throw new vf.JSONParserError(`Error assigning $ref pointer "${e.path}".
|
|
121
|
+
Cannot set "${t}" of a non-object.`);return r}function A1(e){if((0,vf.isHandledError)(e))throw e;return e}function S1(e){return typeof e=="string"&&Cf.parse(e).length==0}});var xu=N(zn=>{"use strict";d();var Kk=zn&&zn.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),Jk=zn&&zn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Yk=zn&&zn.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&Kk(r,t,n[o]);return Jk(r,t),r}})();Object.defineProperty(zn,"__esModule",{value:!0});var wf=Yk(fa()),bf=br(),Wm=wr(),Hm=class e{constructor(t){this.errors=[],this.$refs=t}addError(t){this.errors===void 0&&(this.errors=[]);let r=this.errors.map(({footprint:n})=>n);"errors"in t&&Array.isArray(t.errors)?this.errors.push(...t.errors.map(bf.normalizeError).filter(({footprint:n})=>!r.includes(n))):(!("footprint"in t)||!r.includes(t.footprint))&&this.errors.push((0,bf.normalizeError)(t))}exists(t,r){try{return this.resolve(t,r),!0}catch{return!1}}get(t,r){return this.resolve(t,r)?.value}resolve(t,r,n,o){let s=new wf.default(this,t,n);try{let a=s.resolve(this.value,r,o);return a.value===wf.nullSymbol&&(a.value=null),a}catch(a){if(!r||!r.continueOnError||!(0,bf.isHandledError)(a))throw a;return a.path===null&&(a.path=(0,Wm.safePointerToPath)((0,Wm.getHash)(o))),a instanceof bf.InvalidPointerError&&(a.source=decodeURI((0,Wm.stripHash)(o))),this.addError(a),null}}set(t,r){let n=new wf.default(this,t);this.value=n.set(this.value,r),this.value===wf.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,r){if(this.is$Ref(t)){if(t.$ref.substring(0,2)==="#/"||t.$ref==="#")return!0;if(t.$ref[0]!=="#"&&(!r||r.resolve?.external))return!0}}static isExtended$Ref(t){return e.is$Ref(t)&&Object.keys(t).length>1}static dereference(t,r){if(r&&typeof r=="object"&&e.isExtended$Ref(t)){let n={};for(let o of Object.keys(t))o!=="$ref"&&(n[o]=t[o]);for(let o of Object.keys(r))o in n||(n[o]=r[o]);return n}else return r}};zn.default=Hm});var I1=N(Jr=>{"use strict";d();var Xk=Jr&&Jr.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),Zk=Jr&&Jr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Qk=Jr&&Jr.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&Xk(r,t,n[o]);return Zk(r,t),r}})(),T1=Jr&&Jr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Jr,"__esModule",{value:!0});var x1=Nt(),e4=T1(xu()),Ti=Qk(wr()),P1=T1(xm()),zm=class{paths(...t){return O1(this._$refs,t.flat()).map(n=>(0,P1.default)(n.decoded))}values(...t){let r=this._$refs;return O1(r,t.flat()).reduce((o,s)=>(o[(0,P1.default)(s.decoded)]=r[s.encoded].value,o),{})}exists(t,r){try{return this._resolve(t,"",r),!0}catch{return!1}}get(t,r){return this._resolve(t,"",r).value}set(t,r){let n=Ti.resolve(this._root$Ref.path,t),o=Ti.stripHash(n),s=this._$refs[o];if(!s)throw(0,x1.ono)(`Error resolving $ref pointer "${t}".
|
|
122
|
+
"${o}" not found.`);s.set(n,r)}_get$Ref(t){t=Ti.resolve(this._root$Ref.path,t);let r=Ti.stripHash(t);return this._$refs[r]}_add(t){let r=Ti.stripHash(t),n=new e4.default(this);return n.path=r,this._$refs[r]=n,this._root$Ref=this._root$Ref||n,n}_resolve(t,r,n){let o=Ti.resolve(this._root$Ref.path,t),s=Ti.stripHash(o),a=this._$refs[s];if(!a)throw(0,x1.ono)(`Error resolving $ref pointer "${t}".
|
|
123
|
+
"${s}" not found.`);return a.resolve(o,n,t,r)}constructor(){this._$refs={},this.toJSON=this.values,this.circular=!1,this._$refs={},this._root$Ref=null}};Jr.default=zm;function O1(e,t){let r=Object.keys(e);return t=Array.isArray(t[0])?t[0]:Array.prototype.slice.call(t),t.length>0&&t[0]&&(r=r.filter(n=>t.includes(e[n].pathType))),r.map(n=>({encoded:n,decoded:e[n].pathType==="file"?Ti.toFileSystemPath(n,!0):n}))}});var R1=N(Pu=>{"use strict";d();Object.defineProperty(Pu,"__esModule",{value:!0});Pu.all=t4;Pu.filter=r4;Pu.sort=n4;Pu.run=i4;function t4(e){return Object.keys(e||{}).filter(t=>typeof e[t]=="object").map(t=>(e[t].name=t,e[t]))}function r4(e,t,r){return e.filter(n=>!!B1(n,t,r))}function n4(e){for(let t of e)t.order=t.order||Number.MAX_SAFE_INTEGER;return e.sort((t,r)=>t.order-r.order)}async function i4(e,t,r,n){let o,s,a=0;return new Promise((l,p)=>{D();function D(){if(o=e[a++],!o)return p(s);try{let v=B1(o,t,r,g,n);if(v&&typeof v.then=="function")v.then(F,w);else if(v!==void 0)F(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):F(S)}function F(v){l({plugin:o,result:v})}function w(v){s={plugin:o,error:v},D()}})}function B1(e,t,r,n,o){let s=e[t];if(typeof s=="function")return s.apply(e,[r,n,o]);if(!n){if(s instanceof RegExp)return s.test(r.url);if(typeof s=="string")return s===r.extension;if(Array.isArray(s))return s.indexOf(r.extension)!==-1}return s}});var Gm=N(Vn=>{"use strict";d();var o4=Vn&&Vn.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),u4=Vn&&Vn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),N1=Vn&&Vn.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&o4(r,t,n[o]);return u4(r,t),r}})();Object.defineProperty(Vn,"__esModule",{value:!0});var Vm=Nt(),s4=N1(wr()),Ii=N1(R1()),vo=br();async function a4(e,t,r){let n=e.indexOf("#"),o="";n>=0&&(o=e.substring(n),e=e.substring(0,n));let s=t._add(e),a={url:e,hash:o,extension:s4.getExtension(e)};try{let l=await c4(a,r,t);s.pathType=l.plugin.name,a.data=l.result;let p=await l4(a,r,t);return s.value=p.result,p.result}catch(l){throw(0,vo.isHandledError)(l)&&(s.value=l),l}}async function c4(e,t,r){let n=Ii.all(t.resolve);n=Ii.filter(n,"canRead",e),Ii.sort(n);try{return await Ii.run(n,"read",e,r)}catch(o){throw!o&&t.continueOnError?new vo.UnmatchedResolverError(e.url):!o||!("error"in o)?Vm.ono.syntax(`Unable to resolve $ref pointer "${e.url}"`):o.error instanceof vo.ResolverError?o.error:new vo.ResolverError(o,e.url)}}async function l4(e,t,r){let n=Ii.all(t.parse),o=Ii.filter(n,"canParse",e),s=o.length>0?o:n;Ii.sort(s);try{let a=await Ii.run(s,"parse",e,r);if(!a.plugin.allowEmpty&&f4(a.result))throw Vm.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)?Vm.ono.syntax(`Unable to parse ${e.url}`):a.error instanceof vo.ParserError?a.error:new vo.ParserError(a.error.message,e.url)}}function f4(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}Vn.default=a4});var j1=N(Km=>{"use strict";d();Object.defineProperty(Km,"__esModule",{value:!0});var M1=br();Km.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(r){if(this.allowBOM)try{let n=t.indexOf("{");return t=t.slice(n),JSON.parse(t)}catch(n){throw new M1.ParserError(n.message,e.url)}throw new M1.ParserError(r.message,e.url)}}else return t}}});var $1=N(pa=>{"use strict";d();var p4=pa&&pa.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(pa,"__esModule",{value:!0});var d4=br(),h4=p4(du()),D4=du();pa.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 h4.default.load(t,{schema:D4.JSON_SCHEMA})}catch(r){throw new d4.ParserError(r?.message||"Parser Error",e.url)}else return t}}});var L1=N(Jm=>{"use strict";d();Object.defineProperty(Jm,"__esModule",{value:!0});var m4=br(),g4=/\.(txt|htm|html|md|xml|js|min|map|css|scss|less|svg)$/i;Jm.default={order:300,allowEmpty:!0,encoding:"utf8",canParse(e){return(typeof e.data=="string"||Buffer.isBuffer(e.data))&&g4.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 m4.ParserError("data is not text",e.url)}}});var U1=N(Ym=>{"use strict";d();Object.defineProperty(Ym,"__esModule",{value:!0});var _4=/\.(jpeg|jpg|gif|png|bmp|ico)$/i;Ym.default={order:400,allowEmpty:!0,canParse(e){return Buffer.isBuffer(e.data)&&_4.test(e.url)},parse(e){return Buffer.isBuffer(e.data)?e.data:Buffer.from(e.data)}}});var H1=N(Yr=>{"use strict";d();var y4=Yr&&Yr.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),F4=Yr&&Yr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),E4=Yr&&Yr.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&y4(r,t,n[o]);return F4(r,t),r}})(),v4=Yr&&Yr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Yr,"__esModule",{value:!0});var C4=v4(ze("fs")),k1=Nt(),q1=E4(wr()),W1=br();Yr.default={order:100,canRead(e){return q1.isFileSystemPath(e.url)},async read(e){let t;try{t=q1.toFileSystemPath(e.url)}catch(r){throw new W1.ResolverError(k1.ono.uri(r,`Malformed URI: ${e.url}`),e.url)}try{return await C4.default.promises.readFile(t)}catch(r){throw new W1.ResolverError((0,k1.ono)(r,`Error opening file "${t}"`),t)}}}});var G1=N(Gn=>{"use strict";d();var w4=Gn&&Gn.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),b4=Gn&&Gn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),A4=Gn&&Gn.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&w4(r,t,n[o]);return b4(r,t),r}})();Object.defineProperty(Gn,"__esModule",{value:!0});var Af=Nt(),da=A4(wr()),z1=br();Gn.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),V1(t,this)}};async function V1(e,t,r){e=da.parse(e);let n=r||[];n.push(e.href);try{let o=await S4(e,t);if(o.status>=400)throw(0,Af.ono)({status:o.status},`HTTP ERROR ${o.status}`);if(o.status>=300){if(!Number.isNaN(t.redirects)&&n.length>t.redirects)throw new z1.ResolverError((0,Af.ono)({status:o.status},`Error downloading ${n[0]}.
|
|
125
|
+
Too many redirects:
|
|
126
|
+
${n.join(`
|
|
127
|
+
`)}`));if(!("location"in o.headers)||!o.headers.location)throw(0,Af.ono)({status:o.status},`HTTP ${o.status} redirect with no location header`);{let s=da.resolve(e.href,o.headers.location);return V1(s,t,n)}}else{if(o.body){let s=await o.arrayBuffer();return Buffer.from(s)}return Buffer.alloc(0)}}catch(o){throw new z1.ResolverError((0,Af.ono)(o,`Error downloading ${e.href}`),e.href)}}async function S4(e,t){let r,n;t.timeout&&(r=new AbortController,n=setTimeout(()=>r.abort(),t.timeout));let o=await fetch(e,{method:"GET",headers:t.headers||{},credentials:t.withCredentials?"include":"same-origin",signal:r?r.signal:null});return n&&clearTimeout(n),o}});var Xm=N(Kn=>{"use strict";d();var Ou=Kn&&Kn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Kn,"__esModule",{value:!0});Kn.getNewOptions=Kn.getJsonSchemaRefParserDefaultOptions=void 0;var x4=Ou(j1()),P4=Ou($1()),O4=Ou(L1()),T4=Ou(U1()),I4=Ou(H1()),B4=Ou(G1()),R4=()=>({parse:{json:{...x4.default},yaml:{...P4.default},text:{...O4.default},binary:{...T4.default}},resolve:{file:{...I4.default},http:{...B4.default},external:!0},continueOnError:!1,dereference:{circular:!0,excludedPathMatcher:()=>!1,referenceResolution:"relative"},mutateInputSchema:!0});Kn.getJsonSchemaRefParserDefaultOptions=R4;var N4=e=>{let t=(0,Kn.getJsonSchemaRefParserDefaultOptions)();return e&&J1(t,e),t};Kn.getNewOptions=N4;function J1(e,t){if(K1(t)){let r=Object.keys(t).filter(n=>!["__proto__","constructor","prototype"].includes(n));for(let n=0;n<r.length;n++){let o=r[n],s=t[o],a=e[o];K1(s)?e[o]=J1(a||{},s):s!==void 0&&(e[o]=s)}}return e}function K1(e){return e&&typeof e=="object"&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}});var X1=N(Sf=>{"use strict";d();Object.defineProperty(Sf,"__esModule",{value:!0});Sf.normalizeArgs=Y1;var M4=Xm();function Y1(e){let t,r,n,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"?(r=s[1],n=s[2]):(r=void 0,n=s[1])):(t="",r=s[0],n=s[1]);try{n=(0,M4.getNewOptions)(n)}catch(a){console.error(`JSON Schema Ref Parser: Error normalizing options: ${a}`)}return!n.mutateInputSchema&&typeof r=="object"&&(r=JSON.parse(JSON.stringify(r))),{path:t,schema:r,options:n,callback:o}}Sf.default=Y1});var Z1=N(Xr=>{"use strict";d();var j4=Xr&&Xr.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),$4=Xr&&Xr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),L4=Xr&&Xr.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&j4(r,t,n[o]);return $4(r,t),r}})(),Zm=Xr&&Xr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Xr,"__esModule",{value:!0});var U4=Zm(xu()),k4=Zm(fa()),q4=Zm(Gm()),Tu=L4(wr()),W4=br();function H4(e,t){if(!t.resolve?.external)return Promise.resolve();try{let r=Qm(e.schema,e.$refs._root$Ref.path+"#",e.$refs,t);return Promise.all(r)}catch(r){return Promise.reject(r)}}function Qm(e,t,r,n,o,s){o||(o=new Set);let a=[];if(e&&typeof e=="object"&&!ArrayBuffer.isView(e)&&!o.has(e)){o.add(e),U4.default.isExternal$Ref(e)&&a.push(z4(e,t,r,n));let l=Object.keys(e);for(let p of l){let D=k4.default.join(t,p),g=e[p];a=a.concat(Qm(g,D,r,n,o,s))}}return a}async function z4(e,t,r,n){let o=n.dereference?.externalReferenceResolution==="root",s=Tu.resolve(o?Tu.cwd():t,e.$ref),a=Tu.stripHash(s),l=r._$refs[a];if(l)return Promise.resolve(l.value);try{let p=await(0,q4.default)(s,r,n),D=Qm(p,a+"#",r,n,new Set,!0);return Promise.all(D)}catch(p){if(!n?.continueOnError||!(0,W4.isHandledError)(p))throw p;return r._$refs[a]&&(p.source=decodeURI(Tu.stripHash(t)),p.path=Tu.safePointerToPath(Tu.getHash(t))),[]}}Xr.default=H4});var tA=N(Zr=>{"use strict";d();var V4=Zr&&Zr.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),G4=Zr&&Zr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),K4=Zr&&Zr.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&V4(r,t,n[o]);return G4(r,t),r}})(),eA=Zr&&Zr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Zr,"__esModule",{value:!0});var xf=eA(xu()),ha=eA(fa()),eg=K4(wr());function J4(e,t){let r=[];tg(e,"schema",e.$refs._root$Ref.path+"#","#",0,r,e.$refs,t),Y4(r)}function tg(e,t,r,n,o,s,a,l){let p=t===null?e:e[t];if(p&&typeof p=="object"&&!ArrayBuffer.isView(p))if(xf.default.isAllowed$Ref(p))Q1(e,t,r,n,o,s,a,l);else{let D=Object.keys(p).sort((g,F)=>g==="definitions"?-1:F==="definitions"?1:g.length-F.length);for(let g of D){let F=ha.default.join(r,g),w=ha.default.join(n,g),v=p[g];xf.default.isAllowed$Ref(v)?Q1(p,g,r,w,o,s,a,l):tg(p,g,F,w,o,s,a,l)}}}function Q1(e,t,r,n,o,s,a,l){let p=t===null?e:e[t],D=eg.resolve(r,p.$ref),g=a._resolve(D,n,l);if(g===null)return;let w=ha.default.parse(n).length,v=eg.stripHash(g.path),S=eg.getHash(g.path),O=v!==a._root$Ref.path,P=xf.default.isExtended$Ref(p);o+=g.indirections;let I=X4(s,e,t);if(I)if(w<I.depth||o<I.indirections)Z4(s,I);else return;s.push({$ref:p,parent:e,key:t,pathFromRoot:n,depth:w,file:v,hash:S,value:g.value,circular:g.circular,extended:P,external:O,indirections:o}),(!I||O)&&tg(g.value,null,g.path,n,o+1,s,a,l)}function Y4(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,r,n;for(let o of e)o.external?o.file===t&&o.hash===r?o.$ref.$ref=n:o.file===t&&o.hash.indexOf(r+"/")===0?o.$ref.$ref=ha.default.join(n,ha.default.parse(o.hash.replace(r,"#"))):(t=o.file,r=o.hash,n=o.pathFromRoot,o.$ref=o.parent[o.key]=xf.default.dereference(o.$ref,o.value),o.circular&&(o.$ref.$ref=o.pathFromRoot)):o.$ref.$ref=o.hash}function X4(e,t,r){for(let n of e)if(n&&n.parent===t&&n.key===r)return n}function Z4(e,t){let r=e.indexOf(t);e.splice(r,1)}Zr.default=J4});var sA=N(Qr=>{"use strict";d();var Q4=Qr&&Qr.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),eq=Qr&&Qr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),tq=Qr&&Qr.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&Q4(r,t,n[o]);return eq(r,t),r}})(),oA=Qr&&Qr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Qr,"__esModule",{value:!0});var Pf=oA(xu()),rA=oA(fa()),rq=Nt(),nA=tq(wr()),nq=br();Qr.default=iq;function iq(e,t){let r=Date.now(),n=rg(e.schema,e.$refs._root$Ref.path,"#",new Set,new Set,new Map,e.$refs,t,r);e.$refs.circular=n.circular,e.schema=n.value}function rg(e,t,r,n,o,s,a,l,p){let D,g={value:e,circular:!1};if(l&&l.timeoutMs&&Date.now()-p>l.timeoutMs)throw new nq.TimeoutError(l.timeoutMs);let F=l.dereference||{},w=F.excludedPathMatcher||(()=>!1);if((F?.circular==="ignore"||!o.has(e))&&e&&typeof e=="object"&&!ArrayBuffer.isView(e)&&!w(r)){if(n.add(e),o.add(e),Pf.default.isAllowed$Ref(e,l))D=iA(e,t,r,n,o,s,a,l,p),g.circular=D.circular,g.value=D.value;else for(let v of Object.keys(e)){let S=rA.default.join(t,v),O=rA.default.join(r,v);if(w(O))continue;let P=e[v],I=!1;if(Pf.default.isAllowed$Ref(P,l)){if(D=iA(P,S,O,n,o,s,a,l,p),I=D.circular,e[v]!==D.value){let U=new Map;F?.preservedProperties&&typeof e[v]=="object"&&!Array.isArray(e[v])&&F?.preservedProperties.forEach(q=>{q in e[v]&&U.set(q,e[v][q])}),e[v]=D.value,F?.preservedProperties&&U.size&&typeof e[v]=="object"&&!Array.isArray(e[v])&&U.forEach((q,J)=>{e[v][J]=q}),F?.onDereference?.(P.$ref,e[v],e,v)}}else n.has(P)?I=uA(S,a,l):(D=rg(P,S,O,n,o,s,a,l,p),I=D.circular,e[v]!==D.value&&(e[v]=D.value));g.circular=g.circular||I}n.delete(e)}return g}function iA(e,t,r,n,o,s,a,l,p){let g=Pf.default.isExternal$Ref(e)&&l?.dereference?.externalReferenceResolution==="root",F=nA.resolve(g?nA.cwd():t,e.$ref),w=s.get(F);if(w&&!w.circular){let U=Object.keys(e);if(U.length>1){let q={};for(let J of U)J!=="$ref"&&!(J in w.value)&&(q[J]=e[J]);return{circular:w.circular,value:Object.assign({},w.value,q)}}return w}let v=a._resolve(F,t,l);if(v===null)return{circular:!1,value:null};let S=v.circular,O=S||n.has(v.value);O&&uA(t,a,l);let P=Pf.default.dereference(e,v.value);if(!O){let U=rg(P,v.path,r,n,o,s,a,l,p);O=U.circular,P=U.value}O&&!S&&l.dereference?.circular==="ignore"&&(P=e),S&&(P.$ref=r);let I={circular:O,value:P};return Object.keys(e).length===1&&s.set(F,I),I}function uA(e,t,r){if(t.circular=!0,r?.dereference?.onCircular?.(e),!r.dereference.circular)throw rq.ono.reference(`Circular $ref pointer found at ${e}`);return!0}});var aA=N(ng=>{"use strict";d();Object.defineProperty(ng,"__esModule",{value:!0});function oq(){return typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:typeof setImmediate=="function"?setImmediate:function(t){setTimeout(t,0)}}ng.default=oq()});var lA=N(Da=>{"use strict";d();var uq=Da&&Da.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Da,"__esModule",{value:!0});Da.default=sq;var cA=uq(aA());function sq(e,t){if(e){t.then(function(r){(0,cA.default)(function(){e(null,r)})},function(r){(0,cA.default)(function(){e(r)})});return}else return t}});var hA=N(ue=>{"use strict";d();var aq=ue&&ue.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),cq=ue&&ue.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),lq=ue&&ue.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&aq(r,t,n[o]);return cq(r,t),r}})(),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 fA=wo(I1()),fq=wo(Gm()),ma=wo(X1());ue.jsonSchemaParserNormalizeArgs=ma.default;var pq=wo(Z1()),dq=wo(tA()),dA=wo(sA());ue.dereferenceInternal=dA.default;var Co=lq(wr()),Ar=br();Object.defineProperty(ue,"JSONParserError",{enumerable:!0,get:function(){return Ar.JSONParserError}});Object.defineProperty(ue,"InvalidPointerError",{enumerable:!0,get:function(){return Ar.InvalidPointerError}});Object.defineProperty(ue,"MissingPointerError",{enumerable:!0,get:function(){return Ar.MissingPointerError}});Object.defineProperty(ue,"ResolverError",{enumerable:!0,get:function(){return Ar.ResolverError}});Object.defineProperty(ue,"ParserError",{enumerable:!0,get:function(){return Ar.ParserError}});Object.defineProperty(ue,"UnmatchedParserError",{enumerable:!0,get:function(){return Ar.UnmatchedParserError}});Object.defineProperty(ue,"UnmatchedResolverError",{enumerable:!0,get:function(){return Ar.UnmatchedResolverError}});Object.defineProperty(ue,"isHandledError",{enumerable:!0,get:function(){return Ar.isHandledError}});Object.defineProperty(ue,"JSONParserErrorGroup",{enumerable:!0,get:function(){return Ar.JSONParserErrorGroup}});var pA=Nt(),en=wo(lA()),hq=Xm();Object.defineProperty(ue,"getJsonSchemaRefParserDefaultOptions",{enumerable:!0,get:function(){return hq.getJsonSchemaRefParserDefaultOptions}});var Bi=class e{constructor(){this.schema=null,this.$refs=new fA.default}async parse(){let t=(0,ma.default)(arguments),r;if(!t.path&&!t.schema){let o=(0,pA.ono)(`Expected a file path, URL, or object. Got ${t.path||t.schema}`);return(0,en.default)(t.callback,Promise.reject(o))}this.schema=null,this.$refs=new fA.default;let n="http";if(Co.isFileSystemPath(t.path))t.path=Co.fromFileSystemPath(t.path),n="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=n,r=Promise.resolve(t.schema)}else r=(0,fq.default)(t.path,this.$refs,t.options);try{let o=await r;if(o!==null&&typeof o=="object"&&!Buffer.isBuffer(o))return this.schema=o,(0,en.default)(t.callback,Promise.resolve(this.schema));if(t.options.continueOnError)return this.schema=null,(0,en.default)(t.callback,Promise.resolve(this.schema));throw pA.ono.syntax(`"${this.$refs._root$Ref.path||o}" is not a valid JSON Schema`)}catch(o){return!t.options.continueOnError||!(0,Ar.isHandledError)(o)?(0,en.default)(t.callback,Promise.reject(o)):(this.$refs._$refs[Co.stripHash(t.path)]&&this.$refs._$refs[Co.stripHash(t.path)].addError(o),(0,en.default)(t.callback,Promise.resolve(null)))}}static parse(){let t=new e;return t.parse.apply(t,arguments)}async resolve(){let t=(0,ma.default)(arguments);try{return await this.parse(t.path,t.schema,t.options),await(0,pq.default)(this,t.options),ig(this),(0,en.default)(t.callback,Promise.resolve(this.$refs))}catch(r){return(0,en.default)(t.callback,Promise.reject(r))}}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,ma.default)(arguments);try{return await this.resolve(t.path,t.schema,t.options),(0,dq.default)(this,t.options),ig(this),(0,en.default)(t.callback,Promise.resolve(this.schema))}catch(r){return(0,en.default)(t.callback,Promise.reject(r))}}static dereference(){let t=new e;return t.dereference.apply(t,arguments)}async dereference(){let t=(0,ma.default)(arguments);try{return await this.resolve(t.path,t.schema,t.options),(0,dA.default)(this,t.options),ig(this),(0,en.default)(t.callback,Promise.resolve(this.schema))}catch(r){return(0,en.default)(t.callback,Promise.reject(r))}}};ue.$RefParser=Bi;ue.default=Bi;function ig(e){if(Ar.JSONParserErrorGroup.getParserErrors(e).length>0)throw new Ar.JSONParserErrorGroup(e)}ue.parse=Bi.parse;ue.resolve=Bi.resolve;ue.bundle=Bi.bundle;ue.dereference=Bi.dereference});var mA=N((Pse,DA)=>{d();function Dq(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}DA.exports=Dq});var ga=N((Tse,gA)=>{d();var mq=qy(),gq=w8();function _q(e,t,r,n){var o=!r;r||(r={});for(var s=-1,a=t.length;++s<a;){var l=t[s],p=n?n(r[l],e[l],l,r,e):void 0;p===void 0&&(p=e[l]),o?gq(r,l,p):mq(r,l,p)}return r}gA.exports=_q});var yA=N((Bse,_A)=>{d();var yq=ga(),Fq=vy();function Eq(e,t){return e&&yq(t,Fq(t),e)}_A.exports=Eq});var EA=N((Nse,FA)=>{d();var vq=ga(),Cq=Wy();function wq(e,t){return e&&vq(t,Cq(t),e)}FA.exports=wq});var AA=N((_a,Iu)=>{d();var bq=f8(),bA=typeof _a=="object"&&_a&&!_a.nodeType&&_a,vA=bA&&typeof Iu=="object"&&Iu&&!Iu.nodeType&&Iu,Aq=vA&&vA.exports===bA,CA=Aq?bq.Buffer:void 0,wA=CA?CA.allocUnsafe:void 0;function Sq(e,t){if(t)return e.slice();var r=e.length,n=wA?wA(r):new e.constructor(r);return e.copy(n),n}Iu.exports=Sq});var xA=N(($se,SA)=>{d();function xq(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}SA.exports=xq});var OA=N((Use,PA)=>{d();var Pq=ga(),Oq=m8();function Tq(e,t){return Pq(e,Oq(e),t)}PA.exports=Tq});var IA=N((qse,TA)=>{d();var Iq=ga(),Bq=A8();function Rq(e,t){return Iq(e,Bq(e),t)}TA.exports=Rq});var RA=N((Hse,BA)=>{d();var Nq=Object.prototype,Mq=Nq.hasOwnProperty;function jq(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&Mq.call(e,"index")&&(r.index=e.index,r.input=e.input),r}BA.exports=jq});var Of=N((Vse,MA)=>{d();var NA=h8();function $q(e){var t=new e.constructor(e.byteLength);return new NA(t).set(new NA(e)),t}MA.exports=$q});var $A=N((Kse,jA)=>{d();var Lq=Of();function Uq(e,t){var r=t?Lq(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}jA.exports=Uq});var UA=N((Yse,LA)=>{d();var kq=/\w*$/;function qq(e){var t=new e.constructor(e.source,kq.exec(e));return t.lastIndex=e.lastIndex,t}LA.exports=qq});var zA=N((Zse,HA)=>{d();var kA=p8(),qA=kA?kA.prototype:void 0,WA=qA?qA.valueOf:void 0;function Wq(e){return WA?Object(WA.call(e)):{}}HA.exports=Wq});var GA=N((eae,VA)=>{d();var Hq=Of();function zq(e,t){var r=t?Hq(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}VA.exports=zq});var JA=N((rae,KA)=>{d();var Vq=Of(),Gq=$A(),Kq=UA(),Jq=zA(),Yq=GA(),Xq="[object Boolean]",Zq="[object Date]",Qq="[object Map]",e5="[object Number]",t5="[object RegExp]",r5="[object Set]",n5="[object String]",i5="[object Symbol]",o5="[object ArrayBuffer]",u5="[object DataView]",s5="[object Float32Array]",a5="[object Float64Array]",c5="[object Int8Array]",l5="[object Int16Array]",f5="[object Int32Array]",p5="[object Uint8Array]",d5="[object Uint8ClampedArray]",h5="[object Uint16Array]",D5="[object Uint32Array]";function m5(e,t,r){var n=e.constructor;switch(t){case o5:return Vq(e);case Xq:case Zq:return new n(+e);case u5:return Gq(e,r);case s5:case a5:case c5:case l5:case f5:case p5:case d5:case h5:case D5:return Yq(e,r);case Qq:return new n;case e5:case n5:return new n(e);case t5:return Kq(e);case r5:return new n;case i5:return Jq(e)}}KA.exports=m5});var ZA=N((iae,XA)=>{d();var g5=_y(),YA=Object.create,_5=(function(){function e(){}return function(t){if(!g5(t))return{};if(YA)return YA(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}})();XA.exports=_5});var eS=N((uae,QA)=>{d();var y5=ZA(),F5=b8(),E5=_8();function v5(e){return typeof e.constructor=="function"&&!E5(e)?y5(F5(e)):{}}QA.exports=v5});var rS=N((aae,tS)=>{d();var C5=Fd(),w5=yy(),b5="[object Map]";function A5(e){return w5(e)&&C5(e)==b5}tS.exports=A5});var uS=N((lae,oS)=>{d();var S5=rS(),x5=Fy(),nS=Ey(),iS=nS&&nS.isMap,P5=iS?x5(iS):S5;oS.exports=P5});var aS=N((pae,sS)=>{d();var O5=Fd(),T5=yy(),I5="[object Set]";function B5(e){return T5(e)&&O5(e)==I5}sS.exports=B5});var pS=N((hae,fS)=>{d();var R5=aS(),N5=Fy(),cS=Ey(),lS=cS&&cS.isSet,M5=lS?N5(lS):R5;fS.exports=M5});var gS=N((mae,mS)=>{d();var j5=d8(),$5=mA(),L5=qy(),U5=yA(),k5=EA(),q5=AA(),W5=xA(),H5=OA(),z5=IA(),V5=y8(),G5=S8(),K5=Fd(),J5=RA(),Y5=JA(),X5=eS(),Z5=D8(),Q5=g8(),eW=uS(),tW=_y(),rW=pS(),nW=vy(),iW=Wy(),oW=1,uW=2,sW=4,dS="[object Arguments]",aW="[object Array]",cW="[object Boolean]",lW="[object Date]",fW="[object Error]",hS="[object Function]",pW="[object GeneratorFunction]",dW="[object Map]",hW="[object Number]",DS="[object Object]",DW="[object RegExp]",mW="[object Set]",gW="[object String]",_W="[object Symbol]",yW="[object WeakMap]",FW="[object ArrayBuffer]",EW="[object DataView]",vW="[object Float32Array]",CW="[object Float64Array]",wW="[object Int8Array]",bW="[object Int16Array]",AW="[object Int32Array]",SW="[object Uint8Array]",xW="[object Uint8ClampedArray]",PW="[object Uint16Array]",OW="[object Uint32Array]",je={};je[dS]=je[aW]=je[FW]=je[EW]=je[cW]=je[lW]=je[vW]=je[CW]=je[wW]=je[bW]=je[AW]=je[dW]=je[hW]=je[DS]=je[DW]=je[mW]=je[gW]=je[_W]=je[SW]=je[xW]=je[PW]=je[OW]=!0;je[fW]=je[hS]=je[yW]=!1;function Tf(e,t,r,n,o,s){var a,l=t&oW,p=t&uW,D=t&sW;if(r&&(a=o?r(e,n,o,s):r(e)),a!==void 0)return a;if(!tW(e))return e;var g=Z5(e);if(g){if(a=J5(e),!l)return W5(e,a)}else{var F=K5(e),w=F==hS||F==pW;if(Q5(e))return q5(e,l);if(F==DS||F==dS||w&&!o){if(a=p||w?{}:X5(e),!l)return p?z5(e,k5(a,e)):H5(e,U5(a,e))}else{if(!je[F])return o?e:{};a=Y5(e,F,l)}}s||(s=new j5);var v=s.get(e);if(v)return v;s.set(e,a),rW(e)?e.forEach(function(P){a.add(Tf(P,t,r,P,e,s))}):eW(e)&&e.forEach(function(P,I){a.set(I,Tf(P,t,r,I,e,s))});var S=D?p?G5:V5:p?iW:nW,O=g?void 0:S(e);return $5(O||e,function(P,I){O&&(I=P,P=e[I]),L5(a,I,Tf(P,t,r,I,e,s))}),a}mS.exports=Tf});var yS=N((_ae,_S)=>{d();var TW=gS(),IW=1,BW=4;function RW(e){return TW(e,IW|BW)}_S.exports=RW});d();d();async function Bd(e,t,r=1){let n;try{return n=await e(),n}catch(o){if(r>0)return await t(),Bd(e,t,r-1);throw o}}import{pipeline as I8}from"stream/promises";import U0 from"node:stream/promises";import*as k0 from"node:zlib";import{fileURLToPath as jd}from"node:url";var q0="9.2.2",W0="9.1.0",H0="4",B8="123.0.0",z0="1.0.2",V0="2.0.1";function G0(e){return e==="0"||e==="1"?{functionRunner:"7.0.1",javy:"4.0.0",javyPlugin:"1"}:e==="2"?{functionRunner:q0,javy:W0,javyPlugin:H0}:null}var Es=class{name;version;path;release;gitHubRepo;supportsWindowsOnArm;constructor(t,r,n,o,s=`v${r}`){this.name=t,this.version=r,this.release=s,this.supportsWindowsOnArm=o;let a;a=`${t}-${r}`,a=process.platform==="win32"?`${a}.exe`:a,this.path=B(De(jd(import.meta.url)),"..","bin",a),this.gitHubRepo=n}downloadUrl(t,r){let n,o;switch(t.toLowerCase()){case"darwin":n="macos";break;case"linux":n="linux";break;case"win32":n="windows";break;default:throw Error(`Unsupported platform ${t}`)}switch(r.toLowerCase()){case"arm":case"arm64":o="arm";break;case"ia32":case"x64":o="x86_64";break;default:throw Error(`Unsupported architecture ${r}`)}let s=`${o}-${n}`,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}/${r}`);return`https://github.com/${this.gitHubRepo}/releases/download/${this.release}/${this.name}-${s}-v${this.version}.gz`}async processResponse(t,r){return N8(t,r)}},Nd=class{name;version;path;constructor(t){this.name=`shopify_functions_javy_v${t}`,this.version=t,this.path=B(De(jd(import.meta.url)),"..","bin",`shopify_functions_javy_v${t}.wasm`)}downloadUrl(t,r){return`https://cdn.shopify.com/shopifycloud/shopify-functions-javy-plugin/shopify_functions_javy_v${this.version}.wasm`}async processResponse(t,r){return I8(t,r)}},Md=class{name;version;path;constructor(t,r){this.name=t,this.version=r,this.path=B(De(jd(import.meta.url)),"..","bin",t)}downloadUrl(t,r){return`https://cdn.jsdelivr.net/npm/binaryen@${this.version}/bin/wasm-opt`}async processResponse(t,r){await U0.pipeline(t,r)}},Rd;function $d(e=W0){return new Es("javy",e,"bytecodealliance/javy",Nc(e,">=7.0.0"))}function Ld(e=H0){return new Nd(e)}function mH(e=q0){return new Es("function-runner",e,"Shopify/function-runner",Nc(e,">=9.1.1"))}function vs(){return Rd||(Rd=new Md("wasm-opt.cjs",B8)),Rd}function K0(e){return new Es("shopify-function-trampoline",e,"Shopify/shopify-function-wasm-api",Nc(e,">=2.0.1"),`shopify_function_trampoline/v${e}`)}var Vc=new Map;async function oo(e){if(await Y(e.path)&&!Vc.has(e.path))return;let r=Vc.get(e.path);if(r){await r;return}let n=R8(e);Vc.set(e.path,n);try{await n}finally{Vc.delete(e.path)}}async function R8(e){let t=e.downloadUrl(process.platform,process.arch);ce(`Downloading ${e.name} ${e.version} from ${t} to ${e.path}`);let r=De(e.path);await Y(r)||await Rr(r),await Bd(async()=>{let n=await By(t,void 0,"slow-request");if(n.status!==200)throw new Error(`Downloading ${e.name} failed with status code of ${n.status}`);let o=n.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=Oy(a);await e.processResponse(o,l),await Ty(a,509),await xc(a,e.path,{overwrite:!0})})},async()=>{},2)}async function N8(e,t){let r=k0.createGunzip();await U0.pipeline(e,r,t)}d();import{build as X0}from"esbuild";var M8="2",J0={defaultScalarType:"unknown",scalars:{Date:"string",DateTime:"string",DateTimeWithoutTimezone:"string",Decimal:"string",Handle:"string",ID:"string",JSON:"unknown",TimeWithoutTimezone:"string",URL:"string",Void:"null"}},Cs=class extends k{constructor(t){super(t,Se`Make sure you have a compatible version of the ${Ae.yellow("@shopify/shopify_function")} library installed.`,[Se`Add ${Ae.green(`"@shopify/shopify_function": "~${M8}.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 Z0(e,t){let r=q8(e),n=r.length===0?k8:new kd(r),o=await eF(e);return t.useTasks?$8(e,t,n,o):j8(e,t,n,o)}async function j8(e,t,r,n){t.signal?.aborted||(t.stdout.write(`Building function ${e.localIdentifier}...`),t.stdout.write(`Building GraphQL types...
|
|
128
|
+
`),await ws(e,t)),t.signal?.aborted||(t.stdout.write(`Bundling JS function...
|
|
129
|
+
`),await r.bundle(e,t)),t.signal?.aborted||(t.stdout.write(`Running javy...
|
|
130
|
+
`),await r.compile(e,t,n)),t.signal?.aborted||t.stdout.write(`Done!
|
|
131
|
+
`)}async function $8(e,t,r,n){await r0([{title:"Building GraphQL types",task:async()=>{await ws(e,t)}},{title:"Bundling JS function",task:async()=>{await r.bundle(e,t)}},{title:"Running javy",task:async()=>{await r.compile(e,t,n)}}])}async function ws(e,t){if(e.typegenCommand){let s=e.typegenCommand.split(" ");return wd("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 r=B(e.directory,"package.json");if(!await Y(r))return Ud(e,t,"package.json");let n=await Mc(r);if(!n.codegen)return Ud(e,t,"package.json");let o={...n.codegen,config:{...J0,...n.codegen.config??{},scalars:{...J0.scalars,...n.codegen.config?.scalars??{}}}};return ds(async s=>{let a=B(s,"codegen.json");return await mt(a,JSON.stringify(o)),Ud(e,t,a)})}async function Ud(e,t,r){let n=await Yy(e.directory,"graphql-code-generator","--config",r);return wd("cmd_all_timing_network_ms")(async()=>hi(n.command,n.args,{cwd:e.directory,stderr:t.stderr,signal:t.signal}))}async function Q0(e){let t=await ln("node_modules/@shopify/shopify_function/index.ts",{type:"file",cwd:e.directory}),r=await ln("node_modules/@shopify/shopify_function/run.ts",{type:"file",cwd:e.directory});if(!t||!r)throw new Cs("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 eF(e){let t=await ln("node_modules/@shopify/shopify_function/package.json",{type:"file",cwd:e.directory});if(!t)throw new Cs("Could not find the Shopify Functions JavaScript library.");let n=JSON.parse(await $e(t)).version.split(".")[0],o=G0(n);if(o===null)throw new Cs("The installed version of the Shopify Functions JavaScript library is not compatible with this version of Shopify CLI.");return o}async function L8(e,t,r=process.env){let n=await Q0(e),o={...tF(e.directory,e.entrySourceFilePath,t.app.dotenv?.variables??{},r),entryPoints:[n]};return X0(o)}function tF(e,t,r,n=process.env){let o=Bc(n,(p,D)=>Uc.test(D)&&p),s={...r,...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 rF(e){let t=vs();await oo(t);let r=De(vs().path),n="node",o=[vs().name,e,"-Oz","--enable-bulk-memory","--enable-multimemory","--enable-nontrapping-float-to-int","--strip-debug","-o",e];ce(`Wasm binary: ${vs().name}`),ce("Optimizing this wasm binary using wasm-opt."),await hi(n,o,{cwd:r})}async function nF(e){let t,r=await U8(e);if(r.includes("shopify_function_v1")?t=z0:r.includes("shopify_function_v2")&&(t=V0),!t)return;let n=K0(t);await oo(n);let o=n.path,s=["-i",e,"-o",e];ce(`Applying trampoline to the wasm binary with command: ${o} ${s.join(" ")}`),await hi(o,s)}async function U8(e){let t=new Uint8Array(to(e));if(!WebAssembly.validate(t))return[];let n=new WebAssembly.Module(t),o=WebAssembly.Module.imports(n);return Bt(o.map(s=>s.module))}async function iF(e,t,r,n=[]){let o=$d(r.javy),s=Ld(r.javyPlugin);await Promise.all([oo(o),oo(s)]);let a=["build","-C","dynamic","-C",`plugin=${s.path}`,...n,"-o",e.outputPath,"dist/function.js"];return hi(o.path,a,{cwd:e.directory,stdout:"inherit",stderr:"inherit",signal:t.signal})}async function BH(e){let r=e.allExtensions.filter(l=>l.features.includes("function")&&l.isJavaScript).map(l=>eF(l)),n=await Promise.all(r),o=new Set,s=new Set;n.forEach(l=>{o.add(l.javy),s.add(l.javyPlugin)});let a=[];o.forEach(l=>{a.push(oo($d(l)))}),s.forEach(l=>{a.push(oo(Ld(l)))}),await Promise.all(a)}var k8={async bundle(e,t){return L8(e,t)},async compile(e,t,r){return iF(e,t,r)}},Y0="shopify-function",kd=class{exports;constructor(t){this.exports=t}async bundle(t,r,n=process.env){await Q0(t);let o=this.entrypointContents;ce("Generating dist/function.js using generated module:"),ce(o);let s={...tF(t.directory,t.entrySourceFilePath,r.app.dotenv?.variables??{},n),stdin:{contents:o,loader:"ts",resolveDir:t.directory}};return X0(s)}async compile(t,r,n){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),iF(t,r,n,["-C",`wit=${a}`,"-C",`wit-world=${Y0}`])})}get wit(){let t=this.exports.map(r=>`export %${vd(r)}: func();`);return`package function:impl;
|
|
132
|
+
|
|
133
|
+
world ${Y0} {
|
|
134
|
+
${t.join(`
|
|
135
|
+
`)}
|
|
136
|
+
}`}get entrypointContents(){let t=`
|
|
137
|
+
import __runFunction from "@shopify/shopify_function/run"`,r=this.exports.map(n=>{let o=Ed(n),s=Ed(`run-${n}`);return`
|
|
138
|
+
import { ${o} as ${s} } from "user-function"
|
|
139
|
+
export function ${o}() { return __runFunction(${s}) }`});return`${t}
|
|
140
|
+
${r.join(`
|
|
141
|
+
`)}`}};function q8(e){let t=e.configuration.targeting??[],r=t.filter(s=>!s.export),n=t.filter(s=>!!s.export);if(t.length>1&&r.length>0)throw new Error(`Can't infer export name for targets:
|
|
142
|
+
${r.map(({target:s})=>`- '${s}'`).join(`
|
|
143
|
+
`)}
|
|
144
|
+
All targets must have an export when multiple targets are present.`);let o=n.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(", ")}.
|
|
145
|
+
|
|
146
|
+
The TOML's exports must be kebab-case (lowercase, hyphen or numbers) to comply with WebAssembly's Component Model.
|
|
147
|
+
|
|
148
|
+
JavaScript exports with camelCase names are automatically mapped to kebab-case Wasm exports.
|
|
149
|
+
`),s.push("Suggested TOML changes:"),o.forEach(l=>{let p=l.export;s.push(`- Change export for '${l.target}' to '${vd(p)}'.`)}),new Error(s.join(`
|
|
150
|
+
`))}return n.map(s=>s.export)}d();function oF(e,t){return async r=>{let n=await e.appsForOrg(t,r);return{apps:n.apps,hasMorePages:n.hasMorePages}}}d();d();import{brotliCompress as W8,constants as H8}from"node:zlib";import{promisify as z8}from"node:util";var V8=z8(W8);async function G8(e){let t=await $e(e),r=Buffer.byteLength(t),o=(await V8(Buffer.from(t),{params:{[H8.BROTLI_PARAM_QUALITY]:11}})).byteLength;return{path:e,rawBytes:r,compressedBytes:o}}function uF(e){return e>=1024*1024?`${(e/(1024*1024)).toFixed(2)} MB`:`${(e/1024).toFixed(1)} KB`}async function sF(e){try{let{rawBytes:t,compressedBytes:r}=await G8(e);return` (${uF(t)} original, ~${uF(r)} compressed)`}catch(t){return ce(`Failed to get bundle size for ${e}: ${t}`),""}}d();d();import{createInterface as K8}from"readline";var J8=[".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 r=B(e.directory,".shopifyignore"),n=J8.map(o=>B("*",o));if(Ut(r)){let o=await Y8(r);n.push(...o)}return Ve("*/*",{absolute:!0,cwd:e.directory,ignore:n})}function Y8(e){return new Promise((t,r)=>{let n=[],o=K8({input:Py(e),crlfDelay:1/0});o.on("line",s=>{let a=s.trim();a.length>0&&!a.startsWith("#")&&n.push(a)}),o.on("close",()=>{t(n)}),o.on("error",s=>{r(s)})})}import{context as dB,formatMessagesSync as FF}from"esbuild";var EF=li(yF(),1);async function qd(e,t=process.env){let r=mB(e,t),n=await dB(r),o=await n.rebuild();DB(o,e),await hB(o,e.outputPath),await n.dispose()}async function hB(e,t){if(!e?.metafile)return;let{dir:r,name:n}=Dy(t),o=B(r,`${n}.metafile.json`);try{await mt(o,JSON.stringify(e.metafile))}catch(s){Nn(`Failed to write metafile to ${o}: ${s}`)}}function DB(e,t){let r=e?.warnings??[],n=e?.errors??[];r.length>0&&FF(r,{kind:"warning"}).forEach(s=>{t.stdout.write(s)}),n.length>0&&FF(n,{kind:"error"}).forEach(s=>{t.stderr.write(s)})}function mB(e,t=process.env){let r=Bc(t,(a,l)=>Uc.test(l)&&a),n={...e.env,...r},o=Object.keys(n||{}).reduce((a,l)=>({...a,[`process.env.${l}`]:JSON.stringify(n[l])}),{"process.env.NODE_ENV":JSON.stringify(e.environment)}),s={outfile:e.outputPath,stdin:e.stdin,bundle:!0,define:o,jsx:"automatic",logLevel:e.logLevel??"error",loader:{".esnext":"ts",".js":"jsx"},legalComments:"none",minify:e.minify,plugins:gB(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=n[xd.disableMinificationOnDev];s.minify=!fs(a),s.logLevel="silent"}return s}function gB(e,t=process.env){let r=[EF.default.default()],n=fs(t[xd.skipEsbuildReactDedeuplication]);if(e&&!n){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}`),r.push(_B(o)))}return r}function _B(e){return{name:"shopify:deduplicate-react",setup({onResolve:t}){t({filter:/^react$/},r=>({path:e}))}}}d();var Yc="# api_version: ";function Dz(e,t){return`${Yc}${t}
|
|
151
|
+
|
|
152
|
+
${e}`}async function yB(e){if(!await Y(e)){ce(`Could not determine api_version: schema file not found at ${e}.`);return}let r=(await $e(e)).split(`
|
|
153
|
+
`,1)[0];if(r.startsWith(Yc))return r.slice(Yc.length).trim();ce(`Could not determine api_version from ${e}: missing '${Yc}' marker on the first line.`)}async function vF({directory:e,localIdentifier:t,apiVersion:r}){let n=B(e,"schema.graphql"),o=await yB(n);if(o!==void 0&&o!==r)throw new k(Se`The ${Ae.cyan("schema.graphql")} file for ${Ae.cyan(t)} was generated for api_version ${Ae.yellow(o)} but your function is now on api_version ${Ae.yellow(r)}.`,Se`Run ${Ae.genericShellCommand("shopify app function schema")} to refresh it.`)}var LF=li($F(),1);async function UF(e,t){t.stdout.write(`Bundling UI extension ${e.localIdentifier}...`);let r=t.app.dotenv?.variables??{};t.appURL&&(r.APP_URL=t.appURL);let n=t.buildDirectory??"",o=B(e.directory,n,e.outputRelativePath),{main:s,assets:a}=e.getBundleExtensionStdinContent(),l=performance.now();if(!t.skipBuild)try{await qd({minify:!0,outputPath:o,stdin:{contents:s,resolveDir:e.directory,loader:"tsx"},environment:t.environment,env:r,stderr:t.stderr,stdout:t.stdout,sourceMaps:e.isSourceMapGeneratingExtension}),a&&await Promise.all(a.map(async g=>{await qd({minify:!0,outputPath:B(De(o),g.outputFileName),stdin:{contents:g.content,resolveDir:e.directory,loader:"tsx"},environment:t.environment,env:r,stderr:t.stderr,stdout:t.stdout})}))}catch(g){let F=g.message??"Unknown error occurred",w=new k(`Failed to bundle extension ${e.localIdentifier}. Please check the extension source code for errors.`,F);throw w.errors=g.errors,w}await e.buildValidation({outputPath:o});let p=Math.round(performance.now()-l),D=await sF(o);return t.stdout.write(`${e.localIdentifier} successfully built in ${p}ms${D}`),o}async function kF(e,t){let r=B(e.directory,".build-lock"),n;try{n=await LF.default.lock(e.directory,{retries:20,lockfilePath:r})}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 vF({directory:e.directory,localIdentifier:e.localIdentifier,apiVersion:o.api_version}),!t.skipBuild){e.isJavaScript?await UB(e,t):await kB(e,t);let p=e.configuration.build?.wasm_opt;Ut(e.outputPath)&&p&&await rF(e.outputPath),Ut(e.outputPath)&&await nF(e.outputPath)}let l=B(e.directory,e.outputRelativePath);Ut(e.outputPath)&&s!==e.outputPath&&s!==l&&De(s)!==De(e.outputPath)&&await LB(e.outputPath,s)}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 n()}}async function LB(e,t){ce(`Converting WASM from ${e} to base64 in ${t}`);let r=await $e(e,{encoding:"base64"});await Ac(t),await mt(t,r)}async function UB(e,t){return e.buildCommand?(e.typegenCommand&&await ws(e,t),qF(e.buildCommand,e,t)):Z0(e,t)}async function kB(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(`
|
|
154
|
+
Edit the shopify.function.extension.toml configuration file and set how to build the extension.
|
|
155
|
+
|
|
156
|
+
[build]
|
|
157
|
+
command = "{COMMAND}"
|
|
158
|
+
|
|
159
|
+
Note that the command must output a dist/index.wasm file.
|
|
160
|
+
`),new Rn;return e.typegenCommand&&await ws(e,t),qF(e.buildCommand,e,t)}async function qF(e,t,r){let n=e.split(" ");r.stdout.write(`Building function ${t.localIdentifier}...`),await hi(n[0],n.slice(1),{stdout:r.stdout,stderr:r.stderr,cwd:t.directory,signal:r.signal})}d();d();var WF=/^shopify\.app(\.[-\w]+)?\.toml$/,xs="shopify.app*.toml";function yr(e){return e?jn(e)?e:`shopify.app.${vt(e)}.toml`:jr.app}function Ps(e){return Pe(e).match(WF)?.[1]?.slice(1)}function jn(e){return!!WF.test(e)}var qB="*.extension.toml",WB="shopify.web.toml",HF="extensions/*",zF="**/node_modules/**",HB=".env*",Os=class e{static async load(t){let r=await zB(t),n=[],o=await VB(r,n);if(o.length===0)throw new k(`Could not find a Shopify app TOML file in ${r}`);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(HF)}let a=await GB(r,[...s],n),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 KB(r,l.size>0?[...l]:void 0,n),D=B(r,"package.json"),g=await Y(D),F=g?await Rc(r):"unknown",w=g?await Xy(D):{},v=g?await Zy(r):!1,S=await JB(r),O=await YB(r);return new e({directory:r,packageManager:F,nodeDependencies:w,usesWorkspaces:v,appConfigFiles:o,extensionConfigFiles:a,webConfigFiles:p,dotenvFiles:S,hiddenConfigRaw:O,errors:n})}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(r=>Pe(r.path)===t)}appConfigByClientId(t){return this.appConfigFiles.find(r=>r.content.client_id===t)}get defaultAppConfig(){return this.appConfigByName(jr.app)}},Jd=class extends k{};async function zB(e){let t=await ln(async r=>{if((await Ve(B(r,xs))).some(o=>jn(Pe(o))))return r},{cwd:e,type:"directory"});if(!t)throw new Jd(`Could not find a Shopify app configuration file. Looked in ${e} and parent directories.`);return t}async function VB(e,t){let r=B(e,xs),o=(await Ve(r)).filter(s=>jn(Pe(s)));return Yd(o,t)}async function GB(e,t,r){let o=(t.length>0?t:[HF]).map(a=>B(e,a,qB));o.push(`!${B(e,zF)}`);let s=await Ve(o);return Yd(s,r)}async function KB(e,t,r){let o=(t??["**"]).map(a=>B(e,a,WB));o.push(`!${B(e,zF)}`);let s=await Ve(o);return Yd(s,r)}async function Yd(e,t){let r=[];return await Promise.all(e.map(async n=>{try{r.push(await wt.read(n))}catch(o){let s=o instanceof ys?o:new ys(n,`Failed to read ${n}`),a=new wt(n,{});a.errors.push(s),r.push(a),t.push(s)}})),r}async function JB(e){let t=B(e,HB),n=(await Ve(t,{dot:!0})).filter(a=>{let l=Pe(a);return l===".env"||/^\.env\.[\w-]+$/.test(l)}),o=await Promise.all(n.map(async a=>{try{let l=await y0(a);return[Pe(a),l]}catch{return}})),s=new Map;for(let a of o)a&&s.set(a[0],a[1]);return s}async function YB(e){let t=B(e,jr.hiddenFolder,jr.hiddenConfig);try{if(await Y(t)){let r=await $e(t);return JSON.parse(r)}}catch{}return{}}d();d();d();d();function XB(e,t){return t}async function el(e,t,r){let n={};try{let a=await $e(e);n=JSON.parse(a)}catch{}let o={[t]:r},s=fn(n,o,XB);await mt(e,JSON.stringify(s,null,2))}var ZB=E.array(E.string()).optional().transform(QB).transform(e6);function QB(e){return e?.map(t=>t.replace(/[\/\\]+$/,""))}function e6(e){return e?.map(t=>t.replace(/([^\*])\*$/,"$1**"))}var rl=E.object({client_id:E.string(),build:E.object({automatically_update_urls_on_dev:E.boolean().optional(),dev_store_url:E.string().optional(),include_config_on_deploy:E.boolean().optional()}).optional(),extension_directories:ZB,web_directories:E.array(E.string()).optional()}).passthrough();function JF(e,t=!0){let r=e.reduce((n,o)=>o.contributeToAppConfigurationSchema(n),rl);return t?r.passthrough():e.length>0?r.strict():r}function Xd(e){return e.access_scopes?.scopes??""}function nl(e){let t=Xd(e);return t.length?t.split(",").map(r=>r.trim()):[]}function t6(e){return B(e,jr.hiddenFolder,jr.hiddenConfig)}var ft;(function(e){e.Frontend="frontend",e.Backend="backend",e.Background="background"})(ft||(ft={}));var VF=E.preprocess(Pd,E.string()),GF=E.object({auth_callback_path:E.union([VF,VF.array()]).optional(),webhooks_path:E.preprocess(Pd,E.string()).optional(),port:E.number().max(65536).min(0).optional(),commands:E.object({build:E.string().optional(),predev:E.string().optional(),dev:E.string()}),name:E.string().optional(),hmr_server:E.object({http_paths:E.string().array()}).optional()}),KF=E.enum([ft.Frontend,ft.Backend,ft.Background]).default(ft.Frontend),YF=E.union([GF.extend({roles:E.array(KF)}),GF.extend({type:KF})]),tl=class{name;idEnvironmentVariableName="SHOPIFY_API_KEY";directory;configPath;configuration;clientIdOverride;webs;dotenv;errors;specifications;configSchema;remoteFlags;realExtensions;devApplicationURLs;_hiddenConfig;constructor({name:t,directory:r,configPath:n,configuration:o,clientIdOverride:s,webs:a,modules:l,dotenv:p,errors:D,specifications:g,configSchema:F,remoteFlags:w,hiddenConfig:v,devApplicationURLs:S}){this.name=t,this.directory=r,this.configPath=n,this.configuration=o,this.clientIdOverride=s,this.webs=a,this.dotenv=p,this.realExtensions=l,this.errors=D??new Is,this.specifications=g,this.configSchema=F??rl,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(r=>r.patchWithAppDevURLs(t))}async manifest(t){let r=await Promise.all(this.realExtensions.map(async n=>{let o=await n.deployConfig({apiKey:String(this.configuration.client_id??""),appConfiguration:this.configuration});return{type:n.externalType,handle:n.handle,uid:n.uid,uuid:t?.[n.localIdentifier],assets:n.uid,target:n.contextValue,config:o??{}}}));return{name:this.name,handle:"",modules:fi(r)}}get hiddenConfig(){return this._hiddenConfig}getLogsDir(){return B(this.directory,".shopify","logs")}async updateHiddenConfig(t){if(!this.configuration.client_id)return;this._hiddenConfig=fn(this.hiddenConfig,t);let r=t6(this.directory);await el(r,String(this.configuration.client_id),this.hiddenConfig)}async preDeployValidation(){this.validateWebhookLegacyFlowCompatibility();let t=this.allExtensions.filter(n=>n.isFunctionExtension&&n.configuration.ui?.handle);if(t.length>0){let n=r6(t,this.allExtensions);if(n)throw new k("Invalid function configuration",n.join(`
|
|
161
|
+
`))}let r=this.allExtensions.filter(n=>n.isEditorExtensionCollection);if(r.length>0){let n=n6(r,this.allExtensions);if(n)throw new k("Invalid editor extension collection configuration",n.join(`
|
|
162
|
+
|
|
163
|
+
`))}await Promise.all(this.allExtensions.map(n=>n.preDeployValidation()))}extensionsForType(t){return this.allExtensions.filter(r=>r.type===t.identifier||r.type===t.externalIdentifier)}updateExtensionUUIDS(t){this.allExtensions.forEach(r=>{r.devUUID=t[r.localIdentifier]??r.devUUID})}appIsLaunchable(){let t=this.webs.find(n=>hn(n,ft.Frontend)),r=this.webs.find(n=>hn(n,ft.Backend));return!!(t??r)}get appIsEmbedded(){return this.configuration.embedded}creationDefaultOptions(){return{isLaunchable:this.appIsLaunchable(),scopesArray:nl(this.configuration),name:this.name,isEmbedded:this.appIsEmbedded,directory:this.directory}}removeExtension(t){this.realExtensions=this.realExtensions.filter(r=>r.uid!==t)}async generateExtensionTypes(){let t=new Map;await Promise.all(this.allExtensions.map(r=>r.contributeToSharedTypeFile(t))),t.forEach((r,n)=>{let o=Ut(n);if(r.size===0){o&&Sy(n);return}let s=o?to(n).toString():"",a=[`import '@shopify/ui-extensions';
|
|
164
|
+
`,...Array.from(r)].join(`
|
|
165
|
+
`);s!==a&&Ay(n,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(n=>n.topics&&n.topics.length>0)??!1,r=this.configuration.access_scopes?.use_legacy_install_flow===!0;if(t&&r)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:
|
|
166
|
+
1. Remove 'use_legacy_install_flow = true' from your configuration
|
|
167
|
+
2. Run 'shopify app deploy' to sync your scopes with the Developer Dashboard
|
|
168
|
+
|
|
169
|
+
Alternatively, continue using shop-specific webhooks with the legacy install flow.
|
|
170
|
+
|
|
171
|
+
Learn more: https://shopify.dev/docs/apps/build/authentication-authorization/app-installation`)}};function r6(e,t){let r=[];return e.forEach(n=>{let o=n.configuration.ui.handle,s=XF(t,o);s?s.type!=="ui_extension"&&r.push(`[${n.name}] - Local app must contain one extension of type 'ui_extension' and handle '${o}'`):r.push(`[${n.name}] - Local app must contain a ui_extension with handle '${o}'`)}),r.length>0?r:void 0}function n6(e,t){let r=[],n=["ui_extension"];return e.forEach(o=>{o.configuration.inCollection.forEach(s=>{let a=XF(t,s.handle);a?n.includes(a.specification.identifier)?a.specification.identifier==="ui_extension"&&a.configuration.extension_points.forEach(p=>{p.target.startsWith("admin.")&&r.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.`)}):r.push(`[${o.handle}] editor extension collection: Remove extension of type '${a.specification.identifier}' from this collection. This extension type is not supported in collections.`):r.push(`[${o.handle}] editor extension collection: Add extension with handle '${s.handle}' to local app. Local app must include extension with handle '${s.handle}'.`)})}),r.length>0?r:void 0}function XF(e,t){return e.find(r=>r.handle===t)}async function yV(e){let t=e.dependency;if(t)return Ts(t,e.directory)}async function Ts(e,t){let r=e.replace("-react","").split("/"),n=B("node_modules",r[0],r[1],"package.json"),o=await ln(n,{cwd:t,type:"file",allowSymlinks:!0});if(!o)return"not_found";o=await hs(o);let s=await Mc(o);return s.version?{name:e,version:s.version}:"not_found"}d();function i6(e){if(!e?.length)return null;let t=null,r=-1;for(let n of e){if(!n.issues?.length)continue;let o=0,s=0,a=0;for(let p of n.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>r&&(r=l,t=n)}return t}function ZF(e){let t=[];for(let r of e)if(r.code==="invalid_union"&&r.unionErrors){let n=i6(r.unionErrors);if(n?.issues?.length)for(let o of n.issues)t.push({path:o.path,message:o.message,code:r.code});else t.push({path:r.path,message:r.message??"Configuration doesn't match any expected format",code:r.code})}else t.push({path:r.path,message:r.message??"Unknown error",code:r.code});return t}d();d();d();d();d();d();d();async function Xo(e,t,r){let[n,o]=await Promise.all([hs(e),hs(t)]),s=Te(o,n);if(s.split(/[/\\]/,1)[0]===".."||hy(s))throw new k(`Asset path '${r}' resolves outside the app directory.`,`Asset sources must be inside the app folder. Resolved to: ${n}`)}async function eE(e){let{key:t,baseDir:r,outputDir:n,context:o,appDirectory:s,destination:a,usedBasenames:l=new Set,preserveFilePaths:p=!1}=e,{stdout:D}=o.options,g=il(o.extension.configuration,t),F;typeof g=="string"?F=[g]:Array.isArray(g)?F=g.filter(P=>typeof P=="string"):F=[];for(let P of F)if(P.trim()==="")throw new k(`'${t}' can't be empty.`);if(F.length===0)return ce(`No value for configKey '${t}', skipping
|
|
172
|
+
`,D),{filesCopied:0,pathMap:new Map};let w=a?B(n,a):n,v=Bt(F),S=new Map,O=0;for(let P of v){let I=B(r,P);if(!await Y(I))throw new k(Se`Couldn't find ${Ae.path(I)}\n Please check the path '${P}' in your configuration`.value);await Xo(I,s,P);let q=await pi(I),J=w;if(q){let Q=await Ve(["**/*"],{cwd:I,absolute:!1}),fe=Q.map(ye=>Te(n,B(J,ye)));if(p)for(let ye of Q)QF(Pe(ye),P,l);await Oc(I,J),D.write(`Included '${P}'
|
|
173
|
+
`);for(let ye of Q)l.add(Pe(ye));S.set(P,fe),O+=Q.length}else{await Rr(J);let Q=Pe(I),fe;p?(QF(Q,P,l),fe=Q):fe=o6(Q,l),l.add(fe);let ye=Te(n,B(J,fe)),We=B(J,fe);await Br(I,We),D.write(`Included '${P}'
|
|
174
|
+
`),S.set(P,ye),O+=1}}return{filesCopied:O,pathMap:S}}function QF(e,t,r){if(r.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 o6(e,t){if(!t.has(e))return e;let r=Cc(e),n=r?e.slice(0,-r.length):e,o=1e3,s=1;for(;t.has(`${n}-${s}${r}`);)if(s++,s>o)throw new Error(`Unable to find unique basename for '${e}' after ${o} attempts`);return`${n}-${s}${r}`}function Zd(e){return e.split(".").map(t=>{let r=t.endsWith("[]");return{name:r?t.slice(0,-2):t,flatten:r}})}function il(e,t){let r=e;for(let{name:n,flatten:o}of Zd(t)){if(r==null)return;if(Array.isArray(r)){let s=r.map(a=>a!==null&&typeof a=="object"?a[n]:void 0).filter(a=>a!==void 0);r=s.length>0?s:void 0}else if(typeof r=="object")r=r[n];else return;if(o){if(!Array.isArray(r))return;r=r.flat(1)}}return r}function th(e){return Cc(e)?De(e):e}async function tE(e,t,r,n){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&&n.length===0)return;let p={};for(let g of l){let F=a6(g.key),w=il(o.configuration,g.key);w!=null&&(p[F]=ol(w,r))}let D=new Map;for(let g of a){let F=`${g.anchor}||${g.groupBy}`,w=D.get(F);w?w.push(g):D.set(F,[g])}for(let g of D.values()){let{anchor:F,groupBy:w}=g[0],v=il(o.configuration,F);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(J=>{let Q=u6(J.key,F),fe=Qd(O,Q);return ol(fe,r)});I.some(eh)&&s.stdout.write(`Warning: manifest entry '${P}' contains unresolved paths \u2014 source files may be missing
|
|
175
|
+
`);let q=p[P]??{};p[P]=s6([q,...I])}}if(n.length>0&&(p.files=n),Object.keys(p).length===0){s.stdout.write(`Warning: no manifest entries produced \u2014 skipping manifest.json
|
|
176
|
+
`);return}await rh(t,p)}async function rh(e,t){let r=th(e.extension.outputPath),n=B(r,"manifest.json");await Y(r)||await Rr(r);let o={};if(await Y(n))try{let s=await $e(n);o=JSON.parse(s)}catch{ce(`Warning: could not parse existing manifest.json, starting fresh
|
|
177
|
+
`,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(n,JSON.stringify(o,null,2)),ce(`Updated manifest.json in ${r}
|
|
178
|
+
`,e.options.stdout)}function u6(e,t){if(t===e)return"";let r=`${t}.`;return e.startsWith(r)?e.slice(r.length):e}function Qd(e,t){if(t==="")return e;let r=Zd(t),[n,...o]=r;if(!n)return e;let s=o.map(l=>`${l.name}${l.flatten?"[]":""}`).join("."),a=e[n.name];if(n.flatten){if(!Array.isArray(a))return{[n.name]:a};let l=a.map(p=>s?Qd(p,s):p);return{[n.name]:l}}return s&&a!==null&&a!==void 0&&typeof a=="object"&&!Array.isArray(a)?{[n.name]:Qd(a,s)}:{[n.name]:a}}function s6(e){return Object.assign({},...e)}function ol(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(r=>ol(r,t));if(e!==null&&typeof e=="object"){let r={};for(let[n,o]of Object.entries(e))r[n]=ol(o,t);return r}return e}function a6(e){let t=e.split(".").at(-1)??e;return t.endsWith("[]")?t.slice(0,-2):t}function eh(e){return typeof e=="string"?e.startsWith("./")||e.startsWith("../"):Array.isArray(e)?e.some(eh):e!==null&&typeof e=="object"?Object.values(e).some(eh):!1}d();async function rE(e,t){let{sourceDir:r,outputDir:n,patterns:o,ignore:s,appDirectory:a,sourceDirConfigValue:l}=e;if(!await Y(r))return{filesCopied:0,outputPaths:[]};await Xo(r,a,l);let p=await Ve(o,{absolute:!0,cwd:r,ignore:s});if(p.length===0)return{filesCopied:0,outputPaths:[]};await Rr(n);let D=p,g=await Promise.all(D.map(async v=>{let S=Te(r,v),O=B(n,S);return Te(n,O).startsWith("..")?(t.stdout.write(`Warning: skipping '${v}' - resolved destination is outside the output directory
|
|
179
|
+
`),{count:0,path:null}):v===O?{count:0,path:null}:(await Rr(De(O)),await Br(v,O),{count:1,path:S})})),F=g.reduce((v,S)=>v+S.count,0),w=g.flatMap(v=>v.path===null?[]:[v.path]);return t.stdout.write(`Included ${F} file(s)
|
|
180
|
+
`),{filesCopied:F,outputPaths:w}}d();async function nE(e,t){let{source:r,destination:n,baseDir:o,outputDir:s,appDirectory:a}=e,l=B(o,r);if(!await Y(l))throw new Error(`Source does not exist: ${l}`);await Xo(l,a,r);let p=await pi(l),D,g;if(n===void 0?(D=B(s,Pe(l)),g=`Included ${r}
|
|
181
|
+
`):(D=B(s,n),g=`Included ${r}
|
|
182
|
+
`),p){let F=await Ve(["**/*"],{cwd:l,absolute:!1});await Oc(l,D),t.stdout.write(g);let w=Te(s,D),v=w?F.map(S=>B(w,S)):F;return{filesCopied:F.length,outputPaths:v}}return await Rr(De(D)),await Br(l,D),t.stdout.write(g),{filesCopied:1,outputPaths:[Te(s,D)]}}var c6=E.object({type:E.literal("pattern"),baseDir:E.string().optional(),include:E.array(E.string()).default(["**/*"]),ignore:E.array(E.string()).optional(),destination:E.string().optional()}),l6=E.object({type:E.literal("static"),source:E.string(),destination:E.string().optional()}),f6=E.object({type:E.literal("configKey"),key:E.string(),destination:E.string().optional(),anchor:E.string().optional(),groupBy:E.string().optional(),preserveFilePaths:E.boolean().default(!1)}),p6=E.discriminatedUnion("type",[c6,l6,f6]),d6=E.object({inclusions:E.array(p6),generatesAssetsManifest:E.boolean().default(!1)}).strict().superRefine((e,t)=>{for(let[r,n]of e.inclusions.entries())if(n.type==="configKey"){let o=n.anchor!==void 0,s=n.groupBy!==void 0;o!==s&&t.addIssue({code:E.ZodIssueCode.custom,message:"`anchor` and `groupBy` must both be set or both be omitted",path:["inclusions",r]})}});async function iE(e,t){let r=d6.parse(e.config),{extension:n,options:o}=t,s=th(n.outputPath),a=o.app.directory,l=new Map,p=new Set,D=0;for(let v of r.inclusions){if(v.type!=="configKey")continue;let S=U=>o.stdout.write(U),O=v.destination?yd(v.destination,S):void 0,P=O===""?void 0:O,I=await eE({key:v.key,baseDir:n.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(r.inclusions.filter(v=>v.type!=="configKey").map(async v=>{let S=I=>o.stdout.write(I),O=v.destination?yd(v.destination,S):void 0,P=O===""?void 0:O;if(v.type==="pattern"){let I=v.baseDir?B(n.directory,v.baseDir):n.directory,U=P?B(s,P):s,q=await rE({sourceDir:I,outputDir:U,patterns:v.include,ignore:v.ignore??[],appDirectory:a,sourceDirConfigValue:v.baseDir??"."},o),J=P?q.outputPaths.map(Q=>B(P,Q)):q.outputPaths;return{filesCopied:q.filesCopied,outputPaths:J}}if(v.type==="static")return nE({source:v.source,destination:P,baseDir:n.directory,outputDir:s,appDirectory:a},o)})),F=r.generatesAssetsManifest?g.flatMap(v=>v?.outputPaths??[]):[],w=[D,...g.map(v=>v?.filesCopied??0)];if(r.generatesAssetsManifest){let v=r.inclusions.filter(S=>S.type==="configKey");await tE(v,t,l,F)}return{filesCopied:w.reduce((v,S)=>v+(S??0),0)}}d();d();var Zo=li(P8(),1);function h6(e){return new Map(e.map(t=>[t.uri,t.source]))}function D6(e,t,r){let o=e.split(`
|
|
183
|
+
`).slice(t,r+1),s=o.length===1;return o.map((a,l)=>{let p=t+l+1,D=s?a.trim():a;return`${p} ${D}`}).join(`
|
|
184
|
+
`)}function m6(e){switch(e){case Zo.Severity.ERROR:return{error:`
|
|
185
|
+
[error]:`};case Zo.Severity.WARNING:return{warn:`
|
|
186
|
+
[warning]:`};case Zo.Severity.INFO:return{info:`
|
|
187
|
+
[info]:`}}}function g6(e,t){return e.map((n,o)=>{let{message:s,uri:a,start:l,end:p,check:D,severity:g}=n,F=t.get(a),w=F===void 0?[]:[`
|
|
188
|
+
|
|
189
|
+
${D6(F,l.line,p.line)}`],v=o===e.length-1?"":`
|
|
190
|
+
|
|
191
|
+
`;return[m6(g),{bold:D},{subdued:`
|
|
192
|
+
${s}`},...w,v]}).flat()}async function oE(e){let r=await Y(B(e,".theme-check.yml"))?void 0:"theme-check:theme-app-extension",{offenses:n,theme:o}=await(0,Zo.themeCheckRun)(e,r),s=g6(n,h6(o));return l0(s)}async function uE(e,t){let{extension:r,options:n}=t;n.stdout.write("Running theme check on your Theme app extension...");let o=await oE(r.directory);o&&n.stdout.write(o)}d();async function sE(e,t){let{extension:r,options:n}=t;n.stdout.write(`Bundling theme extension ${r.localIdentifier}...`);let o=await bs(r);return await Promise.all(o.map(async s=>{let a=Te(r.directory,s),l=B(r.outputPath,a);s!==l&&await Br(s,l)})),{filesCopied:o.length}}d();async function aE(e,t){let r=t.extension.configuration;t.options.buildDirectory=e.config?.bundleFolder??void 0;let n=await UF(t.extension,t.options),o=De(n),s=e.config?.bundleFolder?B(De(t.extension.outputPath),e.config.bundleFolder):De(t.extension.outputPath);if(ot(o)===ot(s))return;if(!await Y(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 Br(o,s),!e.config?.generatesAssetsManifest||!Array.isArray(r.extension_points))return;let a=r.extension_points.filter(p=>typeof p=="object"&&p.build_manifest),l=_6(a,e.config?.bundleFolder);Object.keys(l).length>0&&await rh(t,l)}function _6(e,t){let r={};for(let{target:n,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&&(r[n]=s)}return r}d();async function cE(e,t){return kF(t.extension,t.options)}d();async function lE(e,t){let{extension:r}=t;if(await Y(r.outputPath)&&await pi(r.outputPath))throw new Error(`outputPath '${r.outputPath}' is a directory \u2014 expected a file path for the tax stub`);await Ac(r.outputPath),await mt(r.outputPath,"(()=>{})();")}async function fE(e,t){switch(e.type){case"include_assets":return iE(e,t);case"build_theme":return uE(e,t);case"bundle_theme":return sE(e,t);case"bundle_ui":return aE(e,t);case"build_function":return cE(e,t);case"create_tax_stub":return lE(e,t);default:throw new Error(`Unknown build step type: ${e.type}`)}}async function pE(e,t){let r=Date.now();try{let n=await fE(e,t);return{id:e.id,success:!0,duration:Date.now()-r,output:n}}catch(n){let o=n;if(e.continueOnError)return t.options.stderr.write(`Warning: Step "${e.name}" failed but continuing: ${o.message}
|
|
193
|
+
`),{id:e.id,success:!1,duration:Date.now()-r,error:o};throw o.message=`Build step "${e.name}" failed: ${o.message}`,o}}d();import{openSync as y6,readSync as F6,closeSync as E6}from"fs";var dE=128*1024,ul=new Map,sl=new Map,al=new Map;function so(e){let t=sl.get(e);if(t!==void 0)return t;let r=Ut(e);return sl.set(e,r),r}function Bs(e){let t=al.get(e);if(t!==void 0)return t;let r=xy(e);return al.set(e,r),r}function v6(e){let t=y6(e,"r");try{let r=Buffer.alloc(dE),n=F6(t,r,0,dE,0);return r.subarray(0,n).toString()}finally{E6(t)}}function hE(){ul.clear(),sl.clear(),al.clear()}function C6(e){let t=ul.get(e);if(t)return t;let r=v6(e),n=e.substring(e.lastIndexOf(".")),o;switch(n){case".js":case".mjs":case".cjs":case".ts":case".tsx":case".jsx":o=mE(r,e);break;case".rs":o=w6(r,e);break;default:o=[]}return ul.set(e,o),o}function nh(e,t=new Set){if(t.has(e))return[];t.add(e);let r=C6(e),n=[e,...r];for(let o of r)try{if(so(o)&&!Bs(o)){let s=nh(o,t);n.push(...s)}}catch(s){if(s instanceof Error&&s.message.includes("ENOENT"))continue;throw s}return Bt(n)}function DE(){return{directImports:ul.size,fileExists:sl.size,isDir:al.size}}function ih(e,t){return mE(e,t)}function mE(e,t){let r=[],n=[/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 n){let s;for(;(s=o.exec(e))!==null;){let a=s[1];if(a&&a.startsWith(".")){let l=b6(a,t);l&&r.push(l)}}}return Bt(r)}function w6(e,t){let r=[],n=/^\s*(?:pub\s+)?mod\s+([a-z_][a-z0-9_]*)\s*;/gm,o;for(;(o=n.exec(e))!==null;){let a=o[1];if(a){let l=A6(a,t);l&&r.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)&&r.push(l)}}return Bt(r)}function b6(e,t){let r=so(t)&&Bs(t)?t:De(t),n=B(r,e);if(so(n)&&Bs(n)){let s=[B(n,"index.js"),B(n,"index.ts"),B(n,"index.tsx"),B(n,"index.jsx")];for(let a of s)if(so(a)&&!Bs(a))return a;return null}let o=[n,`${n}.js`,`${n}.ts`,`${n}.tsx`,`${n}.jsx`];for(let s of o)if(so(s)&&!Bs(s))return s;return null}function A6(e,t){let r=De(t),n=[B(r,`${e}.rs`),B(r,e,"mod.rs")];for(let o of n)if(so(o))return o;return null}var S6=["**/node_modules/**","**/.git/**","**/*.test.*","**/dist/**","**/*.swp","**/generated/**","**/.gitignore"],x6="Configuration accepted",cl=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 Pe(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 r=this.specification.getIdentity?.(this.configuration);this.handle=r?.handle??this.buildHandle(),this.localIdentifier=this.handle,this.idEnvironmentVariableName=`SHOPIFY_${bc(this.localIdentifier)}_ID`,this.outputPath=B(this.directory,this.outputRelativePath),this.uid=r?.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:r}){let n=await this.specification.deployConfig?.(this.configuration,this.directory,t,void 0,{appConfiguration:r}),o=this.specification.transformLocalToRemote?.(this.configuration,r),s=n??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(Bn(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 n=(await Ve(`**/${this.handle}.js.map`,{cwd:t,absolute:!0,followSymbolicLinks:!1}))[0];if(n===void 0)return Promise.resolve();let o=B(this.directory,Te(t,n));await xc(n,o,{overwrite:!0}),ce(`Source map for ${this.localIdentifier} created: ${o}`)}async publishURL(t){let r=await Ny(),n=this.specification.partnersWebIdentifier;return`https://${r}/${t.orgId}/apps/${t.appId}/extensions/${n}/${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:r}=this.getBundleExtensionStdinContent(),n=ih(t,this.directory),o=r?.flatMap(s=>ih(s.content,this.directory))??[];return n.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 Y(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:r=[]}=this.specification,n={extension:this,options:t,stepResults:new Map},o=r.find(s=>s.lifecycle==="deploy")?.steps??[];for(let s of o){let a=await pE(s,n);n.stepResults.set(s.id,a)}}async buildForBundle(t,r){this.outputPath=this.getOutputPathForDirectory(r),await this.build(t);let n=B(r,this.getOutputFolderId());await this.keepBuiltSourcemapsLocally(n)}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 r=this.singleTarget??"";return this.isFlow&&(r=this.configuration.handle??""),r}async bundleConfig({appModuleUuids:t,developerPlatformClient:r,apiKey:n,appConfiguration:o}){let s=await this.deployConfig({apiKey:n,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:r.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[x6]}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??S6}}watchedFiles(){let t=[],{paths:r,ignore:n}=this.watchPatterns(),o=r.flatMap(s=>Iy(s,{cwd:this.directory,absolute:!0,followSymbolicLinks:!1,ignore:n}));if(t.push(...o.flat()),!this.devSessionWatchConfig){let s=this.scanImports();t.push(...s)}return Bt(t.map(s=>eo(s)))}async rescanImports(){let t=this.cachedImportPaths;return this.cachedImportPaths=void 0,hE(),this.scanImports(),t!==this.cachedImportPaths}scanImports(){if(this.cachedImportPaths!==void 0)return this.cachedImportPaths;if(fs(process.env.SHOPIFY_CLI_DISABLE_IMPORT_SCANNING))return this.cachedImportPaths=[],this.cachedImportPaths;try{let t=performance.now(),r=this.devSessionDefaultWatchPaths(),n=r.flatMap(l=>nh(l).map(p=>eo(ot(p))));this.cachedImportPaths=Bt(n)??[];let o=Math.round(performance.now()-t),s=DE(),a=s?` (cache: ${s.directImports} parsed, ${s.fileExists} stats)`:"";return ce(`Import scan for "${this.handle}": ${r.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,r=`${t.topic}${t.uri}${t.filter}`;return Ds(r).substring(0,zo)}else return Ic(JSON.stringify(this.configuration))}}buildUIDFromStrategy(){switch(this.specification.uidStrategy){case"single":return this.specification.identifier;case"uuid":return this.configuration.uid??Ic(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,v0)}else return Ic(JSON.stringify(this.configuration))}}};d();async function gE(e,t=""){let r=P6(t),n=await _s(r);for(;await Y(B(e,ll(n)))&&await Nr({message:`Configuration file ${ll(n)} 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"});)n=await _s(r);return ll(n)}function ll(e,t=!1){let r=vt(e);return r===""?"shopify.app.toml":`shopify.app.${t?Qy.cyan(r):r}.toml`}async function oh(e){return(await Ve(B(e,xs))).filter(r=>jn(Pe(r)))}async function _E(e){let t=(await oh(e)).map(n=>Pe(n));if(t.length===0)return ro("Could not find any shopify.app.toml file in the directory.");if(t.length===1)return Bn(t[0]);let r=await t0({message:"Configuration file",choices:t.map(n=>({label:n,value:n}))});return Bn(r)}function P6(e){return{message:"Configuration file name:",initialAnswer:e,validate:O6,preview:t=>`${ll(t,!0)} will be generated in your root directory`}}function O6(e){if(vt(e).length>238)return"The file name is too long."}d();d();d();import{readdirSync as T6}from"fs";async function fl(e){if(!e||!await pi(e))return{};let t={},r=T6(e);return await Promise.all(r.map(async n=>{if(jn(n)){let o=B(e,n),a=(await wt.read(o)).content;a.client_id&&(t[a.client_id]=n)}})),t}function BK(){return h0()}function RK(){return D0()}function NK(){return m0()}async function yE(e,t,r,n){let o=await fl(n?.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 bd({message:"Which existing app is this for?",choices:a.map(s),hasMorePages:r,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 MK({stores:e,hasMorePages:t=!1,onSearchForStoresByName:r,showDomainOnPrompt:n=!0,onCreateStoreWhenEmpty:o,onCreateStore:s}){if(e.length===0)return o?.();if(e.length===1&&!t&&!s)return a0(`Using your default dev store, ${e[0].shopName}, to preview your project.`),e[0];let a=v=>{let S=v.shopName;return n&&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}]:[]],F={};r&&(F.search=async v=>{let S=await r(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 bd({message:"Which store would you like to use to view your project?",choices:g(),hasMorePages:t,...F});return w===D?s?.():p.get(w)}async function FE(e){return _s({message:"App name",defaultValue:e,validate:t=>{if(t.length===0)return"App name can't be empty";if(t.length>Od)return`Enter a shorter name (${Od} character max.)`;if(t.includes("shopify"))return`Name can't contain "shopify." Enter another name.`}})}async function jK(e){return Nr({message:"Finished creating a dev store?",confirmationMessage:`Yes, ${e.businessName} has a new dev store`,cancellationMessage:"No, cancel dev"})}async function EE(){return Nr({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 vE(e,t){let r=["application_url","redirect_urls"];t.appProxy?.proxyUrl&&r.push("app_proxy");let n={"Currently released app URL":[e],"=> Dev URL":[t.applicationUrl],"Affected configurations":r};return Nr({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:n})}function $K(){return Nr({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`"})}d();var CE;function uh(){return CE??=new jy({projectName:"shopify-cli-app"}),CE}function pl(e,t=uh()){let r=eo(e);return ce(Se`Reading cached app information for directory ${Ae.path(r)}...`),t.get(r)}function Qo(e,t=uh()){e.directory=eo(e.directory),ce(Se`Storing app information for directory ${Ae.path(e.directory)}:${Ae.json(e)}`);let r=t.get(e.directory);r?t.set(e.directory,{...r,...e}):t.set(e.directory,e)}function wE(e,t=uh()){let r=eo(e),n=t.get(r);n&&t.set(r,{...n,configFile:void 0})}async function tJ(e){if(e.noTunnelUseLocalhost)return{frontendUrl:"https://localhost",frontendPort:e.port,usingLocalhost:!0};let t=4040,r="",n=e.noTunnelUseLocalhost;if(Sd())return r=`https://${Sd()}-${t}.${u0()}`,{frontendUrl:r,frontendPort:t,usingLocalhost:n};if(Ad()){let o=Ad()?.replace("https://","");return r=`https://${t}-${o}`,{frontendUrl:r,frontendPort:t,usingLocalhost:n}}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]),r=o[1],{frontendUrl:r,frontendPort:t,usingLocalhost:n}}return e.tunnelClient&&(t=e.tunnelClient.port,r=await I6(e.tunnelClient)),{frontendUrl:r,frontendPort:t,usingLocalhost:n}}async function I6(e){return new Promise((t,r)=>{let n=0,o=async()=>{let a=e.getTunnelStatus();if(ce(`Polling tunnel status for ${e.provider} (attempt ${n}): ${a.status}`),a.status==="error")return r(new k(a.message,a.tryMessage));a.status==="connected"?t(a.url):(n+=1,s())},s=()=>{setTimeout(o,500)};o()})}function bE(e,t,r){let n;t&&t.length>0?n=(Array.isArray(t)?t:[t]).reduce((a,l)=>(l&&l.length>0&&a.push(`${e}${l}`),a),[]):n=[`${e}/auth/callback`,`${e}/auth/shopify/callback`,`${e}/api/auth/callback`];let o=r?{appProxy:{proxyUrl:B6(Go(r.url,e),e),proxySubPath:r.subpath,proxySubPathPrefix:r.prefix}}:{};return{applicationUrl:e,redirectUrlWhitelist:n,...o}}function B6(e,t){let r=new URL(e),n=new URL(t);return r.host=n.host,r.toString().replace(/\/$/,"")}async function rJ(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 nJ(e){if(e.localApp&&e.localApp.configuration.client_id!==e.apiKey||(e.newApp??!$c()))return!0;let t=e.cachedUpdateURLs===!0;if(e.cachedUpdateURLs===void 0)if(t=await vE(e.currentURLs.applicationUrl,e.newURLs),e.localApp){let r=e.localApp.configuration;r.build={...r.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 iJ(e,t,r){let n=await Ry(e,"tunnel_start",{port:t,provider:r}),o=Object.values(n).filter(a=>!a?.isErr()||a.error.type!=="invalid-provider");if(o.length>1)throw new Mr(`Multiple tunnel plugins for ${r} found`);let s=o[0];if(!s)throw new Mr(`We couldn't find the ${r} tunnel plugin`);if(s.isErr())throw new k(`${r} failed to start the tunnel.
|
|
194
|
+
${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();async function sh({directory:e,configName:t,warningContent:r,shouldRenderSuccess:n=!0,reset:o=!1}){if(o){wE(e);let l=await Rc(e);gs({headline:"Cleared current configuration.",body:["In order to set a new current configuration, please run",{command:Lc(l,"shopify app config use CONFIG_NAME")},{char:"."}]});return}r&&jc(r);let s=(await R6(e,t)).valueOrAbort(),{activeConfig:a}=await $r(e,s);return ah(a.file.content,{configFileName:s,directory:e}),n&&gs({headline:`Using configuration file ${s}`}),s}function ah(e,t){let{configFileName:r,directory:n}=t;if(e.client_id)Qo({directory:n,configFile:r});else throw new k(`Configuration file ${r} needs a client_id.`)}async function R6(e,t){if(t){let r=yr(t);return await Y(B(e,r))?Bn(r):ro(`Could not find configuration file ${r}`)}return _E(e)}async function SE(e,t,r){let n=t,o=r?.clientId?e.appConfigByClientId(r.clientId):void 0,s=pl(e.directory)?.configFile,a=s?B(e.directory,s):null,l=!!(!n&&a&&!Ut(a));if(l&&!r?.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."]};n=await sh({directory:e.directory,warningContent:w,shouldRenderSuccess:!1})}if(!n&&o)return AE(e,o,"flag");if(!n&&r?.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=n??(l?void 0:s),D;t?D="flag":p?D="cached":D="default";let g=yr(p),F=e.appConfigByName(g);if(!F)throw new k(Se`Couldn't find ${g} in ${Ae.path(e.directory)}.`);return AE(e,F,D)}async function AE(e,t,r){let n=typeof t.content.client_id=="string"?t.content.client_id:void 0,o=!!n&&n!=="",s=dl(e,t.path),a=await hl(e,n);return{file:t,source:r,isLinked:o,dotenv:s,hiddenConfig:a}}d();async function xE(e,t){await $y("warn-on-multiple-versions",{days:1},async()=>{if(!t["@shopify/cli"])return;let r=Jy(),n=r?_d:await Ky();if(!n)return;let o=r?await Gy(e):_d;if(!o)return;let a={headline:`Two Shopify CLI installations found \u2013 using ${r?"global installation":"local dependency"}`,body:[`A global installation (v${n}) and a local dependency (v${o}) were detected.
|
|
195
|
+
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 N6,readFileSync as M6}from"fs";var j6=[{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 TE(e){let t={},r=j6.find(n=>(!n.detectors.some||n.detectors.some.reduce((o,s)=>PE(s,OE(e,s.path,t)),!1))&&(!n.detectors.every||n.detectors.every.reduce((o,s)=>o?PE(s,OE(e,s.path,t)):!1,!0)));return r?r.name:"unknown"}function PE(e,t={}){return t[e.path]?!e.matchContent||new RegExp(e.matchContent).test(t[e.path]):!1}function OE(e,t,r={}){if(r[t])return r;let n=B(e,t);if(!N6(n))return r;let o=M6(n,{encoding:"utf8"});return r[t]=o,r}var RE=li(O8(),1);function $6(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 Rs(e){let t=$6(e),r=t?`${e.message}. ${t}`:e.message;return e.path?.length?`[${e.path.join(".")}]: ${r}`:r}async function fh(e,t,r){let n=r;if(!n)try{n=(await wt.read(t)).content}catch(o){if(o instanceof ys)return{errors:[{file:t,message:o.message}]};throw o}return NE(e,t,n)}function NE(e,t,r){let n=e.safeParse(r);return n.success?{data:n.data}:{errors:ZF(n.error.issues).map(o=>({file:t,message:o.message,path:o.path,code:o.code}))}}function IE(e,t,r){let n=e.parseConfigurationObject(r);switch(n.state){case"ok":return{data:n.data};case"error":return{errors:n.errors.map(o=>({file:t,message:o.message??"Unknown error",path:o.path}))}}}var Is=class{errors=[];addError(t){this.errors.push(t)}addErrors(t){this.errors.push(...t)}getErrors(t){return t?this.errors.filter(r=>r.file===t):[...this.errors]}isEmpty(){return this.errors.length===0}};async function pY(e){if(!((await oh(e)).length>0))throw new k(Se`Couldn't find an app toml file at ${Ae.path(e)}, is this an app directory?`)}async function dY(e,t){let{project:r,activeConfig:n}=await $r(e),o=n.file.content,s=lh(r,n.file),a=await Promise.all(s.map(F=>ME(F.path,F.content))),l=a.flatMap(F=>F.errors??[]);if(l.length>0)throw new k(l.map(Rs).join(`
|
|
196
|
+
`));let D=a.filter(F=>"web"in F).map(F=>F.web).some(F=>hn(F,ft.Frontend)||hn(F,ft.Backend)),g=nl(o);return{isLaunchable:D,scopesArray:g,name:t,directory:r.directory,isEmbedded:D}}async function ME(e,t){let r=await fh(YF,e,t);if(r.errors)return{errors:r.errors};let n=r.data,o=new Set("roles"in n?n.roles:[]);"type"in n&&o.add(n.type);let{type:s,...a}={...n,roles:Array.from(o),type:void 0};return{web:{directory:De(e),configuration:a,framework:await TE(De(e))}}}async function jE(e){let{project:t,activeConfig:r}=await $r(e.directory,e.userProvidedConfigName,e.skipPrompts?{skipPrompts:!0}:void 0);return eu({project:t,activeConfig:r,specifications:e.specifications,remoteFlags:e.remoteFlags,ignoreUnknownExtensions:e.ignoreUnknownExtensions})}async function eu(e){let{project:t,activeConfig:r,specifications:n,remoteFlags:o=[],ignoreUnknownExtensions:s,reloadState:a,clientIdOverride:l}=e,p={...r.file.content};l&&(p.client_id=l);let g=JF(n),F=r.file.path,w=Pe(F),v=await fh(g,F,p);if(v.errors){let J=v.errors.map(Rs).join(`
|
|
197
|
+
`);throw new k(`Validation errors in ${F}:
|
|
198
|
+
|
|
199
|
+
${J}`)}let S=v.data,O=q6(t.appConfigFiles,{[w]:S.client_id}),P=!1;try{P=await U6(t.directory,F)}catch{}let I={allClientIdsByConfigName:O,usesLinkedConfig:!0,name:w,gitTracked:P,source:r.source,usesCliManagedUrls:S.build?.automatically_update_urls_on_dev},U={directory:t.directory,configPath:F,configuration:S,configurationLoadResultMetadata:I,clientIdOverride:l,configSchema:g,specifications:n,remoteFlags:o};return new ch({ignoreUnknownExtensions:s,loadedConfiguration:U,project:t,reloadState:a}).loaded()}function L6(e){return e.access_scopes?.scopes??""}async function $E(e){try{let{project:t,activeConfig:r}=await $r(e.directory,e.configName,e.skipPrompts?{skipPrompts:!0}:void 0),n=await eu({project:t,activeConfig:r,specifications:e.specifications,remoteFlags:e.remoteFlags});return{state:"loaded-app",app:n,configuration:n.configuration,packageManager:t.packageManager}}catch{try{let t=await Os.load(e.directory),{configurationPath:r}=await k6(t.directory,e.configName),o=(await wt.read(r)).content;return{state:"loaded-template",rawConfig:o,scopes:L6(o),appDirectory:t.directory,packageManager:t.packageManager}}catch{return{state:"error"}}}}async function hY(e){let{project:t,activeConfig:r}=await $r(e.directory,Pe(e.configPath)),n={extensionDevUUIDs:new Map(e.allExtensions.map(s=>[s.handle,s.devUUID])),previousDevURLs:e.devApplicationURLs},o=await eu({project:t,activeConfig:r,specifications:e.specifications,remoteFlags:e.remoteFlags??[],reloadState:n,clientIdOverride:e.clientIdOverride});if(!o.errors.isEmpty()){let s=o.errors.getErrors();throw new k(Se`${Ae.errorText("Validation errors")}:\n\n${s.map(Rs).join(`
|
|
200
|
+
`)}`)}return o}function LE(e){let t=Ps(e);return t?`${Ho.production}.${t}`:Ho.production}var ch=class{ignoreUnknownExtensions;errors=new Is;specifications;remoteFlags;loadedConfiguration;reloadState;project;constructor({ignoreUnknownExtensions:t,loadedConfiguration:r,reloadState:n,project:o}){this.ignoreUnknownExtensions=t??!1,this.specifications=r.specifications,this.remoteFlags=r.remoteFlags,this.loadedConfiguration=r,this.reloadState=n,this.project=o}get activeConfigFile(){let t=this.loadedConfiguration.configPath;return this.project.appConfigFiles.find(r=>r.path===t)}async loaded(){let{configuration:t,directory:r,configPath:n,configurationLoadResultMetadata:o,configSchema:s}=this.loadedConfiguration;await V6(o);let a=dl(this.project,n),l=await this.loadExtensions(r,t),p=t.name,g=t.handle??p??"",F=await hl(this.project,t.client_id);this.reloadState||await xE(r,this.project.nodeDependencies);let{webs:w,usedCustomLayout:v}=await this.loadWebs(r,t.web_directories),S=new tl({name:g,directory:r,configPath:n,configuration:t,clientIdOverride:this.loadedConfiguration.clientIdOverride,webs:w,modules:l,dotenv:a,errors:this.errors,specifications:this.specifications,configSchema:s,remoteFlags:this.remoteFlags,hiddenConfig:F,devApplicationURLs:this.getDevApplicationURLs(t,w)}),O=S.realExtensions.map(P=>P.type);return await f0(O),await H6(S,this.project.usesWorkspaces,{usedCustomLayoutForWeb:v,usedCustomLayoutForExtensions:t.extension_directories!==void 0}),await S.generateExtensionTypes(),S}async loadWebs(t,r){let n=this.activeConfigFile,o=n?lh(this.project,n):this.project.webConfigFiles,s=o.map(g=>g.path),a=await Promise.all(o.map(g=>ME(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:r!==void 0||!p}}findSpecificationForType(t){return this.specifications.find(r=>r.identifier===t||r.externalIdentifier===t||r.additionalIdentifiers?.includes(t))}validateWebs(t){[ft.Backend,ft.Frontend].forEach(r=>{let n=t.filter(o=>o.configuration.roles.includes(r));if(n.length>1){let o=n.map(l=>B(l.directory,jr.web)),s=o.map(l=>` ${l}`).join(`
|
|
201
|
+
`),a=o[o.length-1];this.errors.addError({file:a,message:`You can only have one "web" configuration file with the ${r} role in your app.
|
|
202
|
+
|
|
203
|
+
Conflicting configurations found at:
|
|
204
|
+
${s}`})}})}async createExtensionInstance(t,r,n,o){let s=this.findSpecificationForType(t),a,l=!1;if(s)l=!0;else{if(this.ignoreUnknownExtensions)return;this.errors.addError({file:n,message:`Invalid extension type "${t}" in "${wc(n)}"`});return}let p=IE(s,n,r);if(p.errors){this.errors.addErrors(p.errors);return}let D=p.data;l&&(a=await this.findEntryPath(o,s));let g=new cl({configuration:D,configurationPath:n,entryPath:a,directory:o,specification:s});if(this.reloadState&&D.handle){let F=this.reloadState.extensionDevUUIDs.get(D.handle);F&&(g.devUUID=F)}if(l){let F=await g.validate();F.isErr()&&this.errors.addError({file:n,message:c0(F.error).trim()})}return g}async loadExtensions(t,r){if(this.specifications.length===0)return[];let n=await this.createExtensionInstances(t),o=await this.createConfigExtensionInstances(t,r),s=this.createWebhookSubscriptionInstances(t,r),a=await Promise.all([...n,...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),F=wy(g.map(w=>w.name));this.errors.addError({file:D.configurationPath,message:`Duplicated handle "${D.handle}" in extensions ${F}. Handle needs to be unique per extension.`})}else D.handle&&p.add(D.handle)}),l}async createExtensionInstances(t){let r=this.activeConfigFile;return(r?BE(this.project,r):this.project.extensionConfigFiles).map(async o=>{let s=o.path,a=De(s),l=o.content,p=C0.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 F=await fh(b0,s,o.content);if(F.errors)return this.errors.addErrors(F.errors),[];let w=F.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,r){let n=this.loadedConfiguration.configPath,o=this.findSpecificationForType(Fs);if(!o)return[];let s=NE(Hc,n,r);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:F,topics:w,compliance_topics:v,...S}=g;return w?.map(O=>({api_version:a,uri:F,topic:O,...S}))})).map(async g=>this.createExtensionInstance(o.identifier,g,n,t))}async createConfigExtensionInstances(t,r){let n=this.loadedConfiguration.configPath,o=await Promise.all(this.specifications.filter(a=>qc(a)).filter(a=>a.identifier!==Fs).map(async a=>{let l=IE(a,n,r);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 F=>{let w=await this.createExtensionInstance(a.identifier,F,n,t);return this.validateConfigurationExtensionInstance(r.client_id,r,w)})),Object.keys(p)]})),s=Object.keys(r).filter(a=>!o.some(([l,p])=>p.includes(a))).filter(a=>![...Object.keys(rl.shape),"organization_id"].includes(a));return s.length>0&&!this.ignoreUnknownExtensions&&this.errors.addError({file:n,message:`Unsupported section(s) in app configuration: ${s.sort().join(", ")}`}),fi(o.flatMap(([a])=>a))}async validateConfigurationExtensionInstance(t,r,n){return n&&await n.deployConfig({apiKey:t,appConfiguration:r})?n:void 0}async findEntryPath(t,r){let n;return r.appModuleFeatures().includes("single_js_entry_path")?(n=(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 Y(o)?o:void 0))).find(o=>o!==void 0),n||this.errors.addError({file:t,message:`Couldn't find an index.{js,jsx,ts,tsx} file in the directories ${t} or ${B(t,"src")}`})):r.identifier==="function"&&(n=(await Promise.all(["src/index.js","src/index.ts","src/main.rs"].map(o=>B(t,o)).map(async o=>await Y(o)?o:void 0))).find(o=>o!==void 0)),n}getDevApplicationURLs(t,r){let n=this.reloadState?.previousDevURLs;return n&&bE(n.applicationUrl,r.map(({configuration:o})=>o.auth_callback_path).find(o=>o),t.app_proxy)}};async function $r(e,t,r){let n=await Os.load(e),o=await SE(n,t,r);return{project:n,activeConfig:o}}async function U6(e,t){let r=B(e,".gitignore");if(!Ut(r))return!0;let n=await $e(r),o=RE.default.default().add(n),s=Te(e,t);return!o.ignores(s)}async function k6(e,t){let r=yr(t),n=B(e,r);if(await Y(n))return{configurationPath:n,configurationFileName:r};throw new k(Se`Couldn't find ${r} in ${Ae.path(e)}.`)}function q6(e,t){let r=e.map(n=>{let o=Pe(n.path);if(t[o]!==void 0&&typeof t[o]=="string")return[o,t[o]];let s=n.content.client_id;if(typeof s=="string"&&s!=="")return[o,s]}).filter(n=>n!==void 0);return Object.fromEntries(r)}async function W6(e){let t=e.filter(l=>hn(l,ft.Backend)),r=e.filter(l=>hn(l,ft.Frontend));if(t.length>1){ce("Unable to decide project type as multiple web backends");return}else{if(t.length===0&&r.length>0)return"frontend";if(!t[0]){ce("Unable to decide project type as no web backend");return}}let{directory:n}=t[0],o=B(n,"package.json"),s=B(n,"Gemfile"),a=B(n,"composer.json");if(await Y(o))return"node";if(await Y(s))return"ruby";if(await Y(a))return"php"}function hn(e,t){return e.configuration.roles.includes(t)}async function H6(e,t,r){let n=e.webs,o=e.allExtensions.filter(D=>D.isSentToMetrics()),s=e.name,a=e.directory,l=e.configuration.client_id,p=nl(e.configuration).sort();await z6(n,o,r,s,a,l,p,t)}async function z6(e,t,r,n,o,s,a,l){await mr.addPublicMetadata(async()=>{let p=await W6(e),D=t.filter(I=>I.isFunctionExtension).length,g=t.filter(I=>I.isESBuildExtension).length,F=t.filter(I=>I.isThemeExtension).length,w=t.length,v=e.filter(I=>hn(I,ft.Backend)).length,S=v===1?e.find(I=>hn(I,ft.Backend))?.framework:void 0,O=e.filter(I=>hn(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:r.usedCustomLayoutForExtensions,app_extensions_function_any:D>0,app_extensions_function_count:D,app_extensions_theme_any:F>0,app_extensions_theme_count:F,app_extensions_ui_any:g>0,app_extensions_ui_count:g,app_name_hash:Ds(n),app_path_hash:Ds(o),app_scopes:JSON.stringify(a),app_web_backend_any:v>0,app_web_backend_count:v,app_web_custom_layout:r.usedCustomLayoutForWeb,app_web_framework:S,app_web_frontend_any:O>0,app_web_frontend_count:O,env_package_manager_workspaces:l}}),await mr.addSensitiveMetadata(async()=>({app_name:n}))}async function V6(e){await mr.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 G6="project.json";async function ph(e){let t=await g0(e),r=B(t,G6);return await Y(r)||await mt(r,JSON.stringify({})),r}function dl(e,t){let r=Ps(t);if(r){let n=`${Ho.production}.${r}`;return e.dotenvFiles.get(n)}return e.dotenvFiles.get(Ho.production)}async function hl(e,t){if(!t||typeof t!="string")return{};await ph(e.directory);let r=e.hiddenConfigRaw,n=r[t];if(n&&typeof n=="object")return n;if(typeof r.dev_store_url=="string"){try{let o=await ph(e.directory);await el(o,t,{dev_store_url:r.dev_store_url})}catch{}return{dev_store_url:r.dev_store_url}}return{}}function BE(e,t){let r=t.content.extension_directories,o=(Array.isArray(r)&&r.length>0?r:["extensions/*"]).map(s=>`${s}/*.extension.toml`);return e.extensionConfigFiles.filter(s=>{let a=Te(e.directory,s.path).replace(/\\/g,"/");return o.some(l=>Pc(a,l))})}function lh(e,t){let r=t.content.web_directories;if(!Array.isArray(r)||r.length===0)return e.webConfigFiles;let n=r.map(o=>`${o}/shopify.web.toml`);return e.webConfigFiles.filter(o=>{let s=Te(e.directory,o.path).replace(/\\/g,"/");return n.some(a=>Pc(s,a))})}function PY(e,t){let r=t.content.extension_directories,n=(Array.isArray(r)&&r.length>0?r:["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=[...n,...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=>Pc(p,D))})}d();d();var UE=2,K6=["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(`
|
|
205
|
+
`);async function kE(e,t,r,n,o){let s=e.length===0;if(s||(s=await EE()),s){let a=await FE(o.name);return n.createApp(r,{...o,name:a})}else{for(let l=0;l<UE;l++){let p=await yE(oF(n,r.id),e,t,{directory:o.directory});if(p){let D=await n.appFromIdentifiers(p.apiKey);if(D)return D}else{l<UE-1&&s0("App selection failed. Retrying...");continue}}let a=["Unable to select an app: the selection prompt failed multiple times.","",`Available apps: ${e.length}`].join(`
|
|
206
|
+
`);throw new Mr(a,K6)}}d();d();d();async function qE(e,t,r){let n=await J6(e,t,r),{app:{versionsDiff:o}}=await r.appVersionsDiff(e,{versionId:n.uuid,appVersionId:n.id});return{versionsDiff:o,versionDetails:n}}async function J6(e,t,r){try{return await r.appVersionByTag(e,t)}catch{throw e0({headline:"Version couldn't be released.",body:["Version",{userInput:t},"could not be found."]}),new Rn}}d();function Y6(e,t){return t?e.find(n=>n.identifier===t||n.externalIdentifier===t||n.additionalIdentifiers?.includes(t))?.uidStrategy:void 0}async function WE(e,t,r,n,o){let a=(o??await t.activeAppVersion(e))?.appModuleVersions.filter(p=>Y6(r,p.specification?.identifier)!=="uuid")??[];return a.length===0?void 0:tu(a,r,n)}function tu(e,t,r){let n={},o=t.filter(qc);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:r,handle:s.registrationTitle})??l;n=fn(n,p)}),{...n}}function ru(e,t){return{title:e,uid:t,experience:"extension"}}function dh(e){return{title:e,uid:void 0,experience:"dashboard"}}async function JY(e,t,r){let{versionsDiff:n,versionDetails:o}=await qE(t,r,e),s=p=>p.filter(D=>D.specification.experience==="extension"&&D.specification.identifier!=="webhook_subscription").map(D=>ru(D.registrationTitle,void 0)),a=p=>p.filter(D=>D.specification.options.managementExperience==="dashboard").map(D=>dh(D.registrationTitle));return{extensionIdentifiersBreakdown:{onlyRemote:[...s(n.removed),...a(n.removed)],toCreate:[...s(n.added),...a(n.added)],toUpdate:[],unchanged:[...s(n.updated),...a(n.updated)]},versionDetails:o}}function YY({localApp:e,versionAppModules:t,activeAppVersion:r}){if(e.allExtensions.filter(s=>s.isAppConfigExtension).length===0)return;let n=tu(t,e.specifications??[],e.remoteFlags),o=tu(r?.appModuleVersions??[],e.specifications??[],e.remoteFlags);return hh(n,o)}function hh(e,t){let r=new Set([...Object.keys(e),...Object.keys(t)]);if(r.size===0)return;let n={existingFieldNames:[],existingUpdatedFieldNames:[],newFieldNames:[],deletedFieldNames:[]};for(let o of r){let s=e[o],a=t[o];s===void 0?n.deletedFieldNames.push(o):a===void 0?n.newFieldNames.push(o):Hy(s,a)?n.existingFieldNames.push(o):n.existingUpdatedFieldNames.push(o)}return n}d();d();async function Dh(e,t=!0){let r=e.map(({local:l})=>`"${l.handle}"`).join(", "),n=e.map(({remote:l})=>l.type.toLocaleLowerCase()),o=n.filter((l,p)=>n.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 ${r} 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 Nr({message:`Migrate ${r}?`,confirmationMessage:a,cancellationMessage:"No, cancel"})}d();async function HE(e){let{extensionsToMigrate:t,appId:r,remoteExtensions:n,migrationClient:o}=e;await Promise.all(t.map(({remote:l})=>X6({apiKey:r,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 n.filter(l=>a.includes(l.uuid)).map(l=>({...l,type:s.get(l.type)??l.type}))}async function X6(e){let{apiKey:t,registrationId:r,registrationUuid:n,migrationClient:o}=e,s={apiKey:t,registrationId:r,registrationUuid:n},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 r}d();async function zE(e){let{extensionsToMigrate:t,appId:r,remoteExtensions:n,migrationClient:o}=e;return await Promise.all(t.map(({remote:s})=>Z6({apiKey:r,registrationId:void 0,registrationUuid:s.uuid,migrationClient:o}))),n.map(s=>t.some(({remote:a})=>a.uuid===s.uuid)?{...s,type:"UI_EXTENSION"}:s)}async function Z6(e){let{apiKey:t,registrationId:r,registrationUuid:n,migrationClient:o}=e,s={apiKey:t,registrationId:r,registrationUuid:n},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 VE={marketing_activity:["marketing_activity_extension"]},GE={flow_action:["flow_action_definition"],flow_trigger:["flow_trigger_definition"],flow_trigger_lifecycle_callback:["flow_trigger_discovery_webhook"]},KE={ui_extension:["CHECKOUT_UI_EXTENSION","POS_UI_EXTENSION"]},JE={admin_link:["app_link","bulk_action"]};function Q6(e,t){let r=new Set(e.map(n=>n.localIdentifier));return Object.fromEntries(Object.entries(t).filter(([n])=>r.has(n)))}function mh(e,t,r,n){let o=Q6(e,r),s=Object.keys(n),a=Object.values(n).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,zo)),g)}),l.reduce((g,F)=>{let w=o[F.localIdentifier]??"unknown",v=D.get(w)??D.get(F.localIdentifier.toLowerCase()),S=n[F.type]?.includes(v?.type??"undefined");return v&&S&&g.push({local:F,remote:v}),g},[])}async function YE(e){let{extensionsToMigrate:t,appId:r,type:n,remoteExtensions:o,migrationClient:s}=e;await Promise.all(t.map(({remote:l})=>eR({apiKey:r,registrationId:void 0,registrationUuid:l.uuid,type:n,migrationClient:s})));let a=t.map(({remote:l})=>l.uuid);return o.filter(l=>a.includes(l.uuid)).map(l=>({...l,type:n.toUpperCase()}))}async function eR(e){let{apiKey:t,registrationId:r,registrationUuid:n,type:o,migrationClient:s}=e,a={apiKey:t,registrationId:r,registrationUuid:n,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 r}d();d();var XE=di`
|
|
207
|
+
mutation MigrateFlowExtension($apiKey: String!, $registrationId: ID, $registrationUuid: String) {
|
|
208
|
+
migrateFlowExtension(
|
|
209
|
+
input: {apiKey: $apiKey, registrationId: $registrationId, registrationUuid: $registrationUuid}
|
|
210
|
+
) {
|
|
211
|
+
migratedFlowExtension
|
|
212
|
+
userErrors {
|
|
213
|
+
field
|
|
214
|
+
message
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
`;d();var ZE=di`
|
|
219
|
+
mutation MigrateToUiExtension($apiKey: String!, $registrationId: ID, $registrationUuid: String) {
|
|
220
|
+
migrateToUiExtension(
|
|
221
|
+
input: {apiKey: $apiKey, registrationId: $registrationId, registrationUuid: $registrationUuid}
|
|
222
|
+
) {
|
|
223
|
+
migratedToUiExtension
|
|
224
|
+
userErrors {
|
|
225
|
+
field
|
|
226
|
+
message
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
`;d();var QE=di`
|
|
231
|
+
mutation MigrateAppModule($apiKey: String!, $registrationId: ID, $registrationUuid: String, $type: String!) {
|
|
232
|
+
migrateAppModule(
|
|
233
|
+
input: {apiKey: $apiKey, registrationId: $registrationId, registrationUuid: $registrationUuid, type: $type}
|
|
234
|
+
) {
|
|
235
|
+
migratedAppModule
|
|
236
|
+
userErrors {
|
|
237
|
+
field
|
|
238
|
+
message
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
`;var Dl=class e{static instance;static getInstance(t){return e.instance??=new e(t),e.instance}static resetInstance(){e.instance=void 0}clientName=j0.Partners;webUiName="Partner Dashboard";organizationSource=Jo.Partners;bundleFormat="zip";_session;constructor(t){this._session=t}async session(){if(!this._session){if(o0())throw new Error("PartnersClient.session() should not be invoked dynamically in a unit test");let{token:t,userId:r}=await Cd();this._session={token:t,businessPlatformToken:"",accountInfo:{type:"UnknownAccount"},userId:r}}return this._session}async request(t,r=void 0,n,o){return Vy(t,await this.token(),r,n,o,this.createUnauthorizedHandler())}async token(){return(await this.session()).token}async unsafeRefreshToken(){let{token:t}=await Cd([],process.env,{noPrompt:!0,forceRefresh:!0}),r=await this.session();return t&&(r.token=t),r.token}async migrateFlowExtension(t){return this.request(XE,t)}async migrateAppModule(t){return this.request(QE,t)}async migrateToUiExtension(t){return this.request(ZE,t)}createUnauthorizedHandler(){return $0(this)}};async function tv(e){return await tR(e)?e.developerPlatformClient.activeAppVersion(e.remoteApp):e.activeAppVersion}async function tR(e){let{app:t,appId:r,developerPlatformClient:n,envIdentifiers:o,remoteApp:s}=e,a=await n.appExtensionRegistrations(s,e.activeAppVersion),l=t.allExtensions,p=o,D=a.app.extensionRegistrations,g=a.app.dashboardManagedExtensionRegistrations,F=Dl.getInstance(),w=!1,v=D,S=mh(l,v,p,KE);if(S.length>0){if(!await Dh(S))throw new Rn;v=await zE({extensionsToMigrate:S,appId:r,remoteExtensions:v,migrationClient:F}),w=!0}let O=[{typesMap:GE,migrate:HE},ev(VE,"marketing_activity"),ev(JE,"admin_link")];for(let P of O){let I=mh(l,g,p,P.typesMap);if(I.length===0)continue;if(!await Dh(I,!1))throw new Rn;let q=await P.migrate({extensionsToMigrate:I,appId:r,remoteExtensions:g,migrationClient:F});v=v.concat(q),w=!0}return w}function ev(e,t){return{typesMap:e,migrate:r=>YE({...r,type:t})}}d();d();var rR={bullet:"+",color:"green",suffix:"(new)"},nR={color:"#FF8800",suffix:"(updated)"},iR={bullet:"-",color:"red",suffix:"(removed)"};function _h(e){return[...e.new.map(t=>gh(t,rR)),...e.updated?e.updated.map(t=>gh(t,nR)):[],...e.unchanged,...e.removed.map(t=>gh(t,iR))]}function gh(e,t){let r=typeof e=="string"?[e,{subdued:t.suffix??""}]:e;return{...t.bullet?{bullet:t.bullet}:{},item:r,color:t.color}}function oR({release:e,allowUpdates:t,allowDeletes:r,extensionIdentifiersBreakdown:n,configExtensionIdentifiersBreakdown:o}){if(!e||t&&r)return!0;let s=n.onlyRemote.length>0,a=(o?.deletedFieldNames.length??0)>0,l=s||a,p=n.toCreate.length>0||n.toUpdate.length>0,D=(o?.newFieldNames.length??0)>0||(o?.existingUpdatedFieldNames.length??0)>0,g=p||D;if(t&&!l||r&&!g)return!0;if(!i0()&&(l||g)){let F=[];throw g&&F.push("--allow-updates"),l&&F.push("--allow-deletes"),new k("This deployment includes changes that require confirmation.",["Run the command with",{command:F.join(" ")},"to deploy without confirmation."])}return!1}async function rv({allowUpdates:e,allowDeletes:t,extensionIdentifiersBreakdown:r,configExtensionIdentifiersBreakdown:n,appTitle:o,release:s,installCount:a}){if(await mr.addPublicMetadata(()=>cR(n)),oR({release:s,allowUpdates:e,allowDeletes:t,extensionIdentifiersBreakdown:r,configExtensionIdentifiersBreakdown:n}))return!0;let p=await sR(r),D=await aR(s,n);return uR({appTitle:o,extensionsContentPrompt:p,configContentPrompt:D,release:s,installCount:a})}async function uR({appTitle:e,extensionsContentPrompt:{extensionsInfoTable:t,hasDeletedExtensions:r},configContentPrompt:n,release:o,installCount:s}){let a=new Date().valueOf(),l=!0,p=[];n&&p.push(n.configInfoTable.items.length===0?{...n.configInfoTable,emptyItemsText:"No changes",items:[]}:n.configInfoTable);let D=e!==void 0&&r;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}`:""}?`,F=r&&s!==void 0&&s>0;D?l=await n0({message:g,infoTable:p,confirmation:e,...F?{warningItem:["This release removes extensions and related data from",{error:s.toString()},`app installations.
|
|
243
|
+
Use caution as this may include production data on live stores.`]}:{}}):l=await Nr({message:g,infoTable:p,confirmationMessage:`Yes, ${o?"release":"create"} this new version`,cancellationMessage:"No, cancel"});let w=new Date().valueOf()-a;return await mr.addPublicMetadata(()=>({cmd_deploy_confirm_cancelled:!l,cmd_deploy_confirm_time_to_complete_ms:w})),l}async function sR(e){let{onlyRemote:t,toCreate:r,toUpdate:n,unchanged:o}=e,s=(g,F)=>{switch(g.experience){case"dashboard":return[g.title,{subdued:`(${F}from Partner Dashboard)`}];case"extension":return g.uid&&g.uid.length>0?`${g.title} (uid: ${g.uid})`:g.title}},a,l={new:r.map(g=>s(g,"new, ")),unchanged:o.map(g=>s(g,"")),updated:n.map(g=>s(g,"updated, ")),removed:t.map(g=>s(g,"removed, "))},p=_h(l),D=t.length>0;return p.length>0&&(a={header:"Extensions:",items:p}),await mr.addPublicMetadata(()=>({cmd_deploy_confirm_new_registrations:r.length,cmd_deploy_confirm_updated_registrations:n.length,cmd_deploy_confirm_removed_registrations:t.length})),{extensionsInfoTable:a,hasDeletedExtensions:D}}async function aR(e,t){if(!t)return;let{existingFieldNames:r,existingUpdatedFieldNames:n,newFieldNames:o,deletedFieldNames:s}=t,l=_h({new:o,updated:n,unchanged:r,removed:s});return{configInfoTable:{header:"Configuration:",items:o.length>0||n.length>0||s.length>0||!e?l:[]}}}function cR(e){if(!e)return{cmd_deploy_include_config_used:!1};let{existingFieldNames:t,existingUpdatedFieldNames:r,newFieldNames:n,deletedFieldNames:o}=e,s=[...r,...n,...t];return{cmd_deploy_include_config_used:!0,...s.length>0?{cmd_deploy_config_modules_breakdown:JSON.stringify(s.sort())}:{},...r.length>0?{cmd_deploy_config_modules_updated:JSON.stringify(r.sort())}:{},...n.length>0?{cmd_deploy_config_modules_added:JSON.stringify(n.sort())}:{},...o.length>0?{cmd_deploy_config_modules_deleted:JSON.stringify(o.sort())}:{}}}async function nv(e){let t=await tv(e),r=await lR({options:e,activeAppVersion:t}),n=dR(r),o=await pR(e,t),a=e.release&&!e.allowDeletes&&n.onlyRemote.length>0?await gR(e).catch(()=>{}):void 0;if(!await rv({extensionIdentifiersBreakdown:n,configExtensionIdentifiersBreakdown:o,appTitle:e.remoteApp?.title,release:e.release,allowUpdates:e.allowUpdates,allowDeletes:e.allowDeletes,installCount:a}))throw new Rn;return hR(r)}async function lR({options:e,activeAppVersion:t}){let r=t?.appModuleVersions??[],n=e.app.allExtensions,o=e.envIdentifiers,s=r.filter(D=>D.registrationId===""),a=r.map(D=>{if(D.registrationId===""){let g=n.find(F=>o[F.localIdentifier]===D.registrationUuid)??fR(n,s,D);if(g)return{experience:g.specification.experience,status:"updated",local:g,remote:D}}else{let g=n.find(F=>D.registrationId===F.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=n.filter(D=>!l.includes(D)).map(D=>({experience:D.specification.experience,status:"created",local:D}));return[...a,...p]}function fR(e,t,r){let n=(l,p)=>vt(l.handle)===vt(p.registrationTitle)&&(l.specification.identifier===p.specification?.identifier||l.specification.externalIdentifier===p.specification?.identifier),o=e.filter(l=>n(l,r));if(o.length!==1)return;let s=o[0];return t.some(l=>l!==r&&n(s,l))?void 0:s}async function pR(e,t){let{app:r,appId:n}=e,o=await DR(r,n),s=tu(t?.appModuleVersions??[],r.specifications??[],r.remoteFlags);return hh(o,s)}function dR(e){let t=e.filter(r=>r.experience==="extension");return{onlyRemote:t.filter(r=>r.status==="deleted").map(r=>mR(r.remote)),toCreate:t.filter(r=>r.status==="created").map(r=>ru(r.local.localIdentifier,r.local.uid)),toUpdate:t.filter(r=>r.status==="updated").map(r=>ru(r.local.localIdentifier,void 0)),unchanged:t.filter(r=>r.status==="unchanged").map(r=>ru(r.local.localIdentifier,void 0))}}function hR(e){let t={},r={};for(let n of e){if(!n.local)continue;let o=n.local.uid,s=n.remote?.registrationUuid??o,a=n.remote?.registrationId??o;t[n.local.localIdentifier]=s,r[n.local.localIdentifier]=a}return{appModuleUuids:t,appModuleRegistrationIds:r}}async function DR(e,t){let r={},n=e.allExtensions.filter(o=>o.isAppConfigExtension);for(let o of n){let s=await o.deployConfig({apiKey:t,appConfiguration:e.configuration}),a=o.specification.transformRemoteToLocal?.(s??{},{flags:e.remoteFlags,handle:o.handle})??o.configuration;r=fn(r,a)}return r}function mR(e){return e.specification?.options.managementExperience==="dashboard"?dh(e.registrationTitle):ru(e.registrationTitle,e.registrationId)}async function gR(e){return e.developerPlatformClient.appInstallCount({id:e.remoteApp.id,apiKey:e.remoteApp.apiKey,organizationId:e.remoteApp.organizationId})}d();function iv({appName:e,org:t,devStores:r,updateURLs:n,messages:o}){let s=[`App: ${e}`];t&&s.unshift(`Org: ${t}`),r&&r.length>0&&r.forEach(l=>s.push(`Dev store: ${l}`)),n&&s.push(`Update URLs: ${n}`);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?`
|
|
244
|
+
`:`
|
|
245
|
+
|
|
246
|
+
`;a=a.concat(D,p)}return a}d();async function lZ({app:e,appApiKey:t,extensionUuids:r,command:n},o=process.env){let s=e.dotenv;s??={path:B(e.directory,LE(e.configPath)),variables:{}};let a={...e.dotenv?.variables??{}};o[e.idEnvironmentVariableName]||(a[e.idEnvironmentVariableName]=t),Object.keys(r).forEach(p=>{let D=`SHOPIFY_${bc(p)}_ID`;o[D]||(a[D]=r[p])});let l=n==="import-extensions";if(s.variables=a,l){let D=await Y(s.path)?await $e(s.path):"",g=F0(D,a);await mt(s.path,g),e.dotenv=s}return e}function ov({app:e},t=process.env){let r={...e.dotenv?.variables,...t},n={},o=s=>{Object.keys(r).includes(s.idEnvironmentVariableName)&&(n[s.localIdentifier]=r[s.idEnvironmentVariableName])};return e.allExtensions.forEach(o),n}var uv=e=>({message:Se`Invalid Client ID: ${e}`,tryMessage:Se`You can find the Client ID in the app settings in the Developer Dashboard.`}),sv=["You can pass",{command:"--reset"},"to your command to reset your app configuration."],_R=(e,t,r)=>[{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}],...r?[["Pass",{command:"--reset"},"to your command to create a new app"]]:[]]}}],ml=async e=>{let t=Id(),r=await t.appFromIdentifiers(e.apiKey);if(!r){let n=await t.accountInfo()??{type:"UnknownAccount"},o="Unknown account",s=!1;throw Uy(n)?(o=n.orgName,s=!0):Ly(n)&&(o=n.email),new k(["No app with client ID",{command:e.apiKey},"found"],_R(o,s,e.offerReset??!0))}return r};async function OZ(e){let{noRelease:t,app:r,remoteApp:n,developerPlatformClient:o,organization:s}=e,a=await o.activeAppVersion(n);await yR(r),cv({org:s.businessName,appName:n.title,appDotEnv:r.dotenv?.path,configFile:Pe(r.configPath),messages:[sv]});let l=await nv({app:r,appId:n.apiKey,appName:n.title,release:!t,developerPlatformClient:o,envIdentifiers:ov({app:r}),remoteApp:n,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 yR(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?FR():ER()}function FR(){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 ER(){jc({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 av(e){let t=Id(),r=e.organizationId?await zc(e.organizationId,t):await vR(),{organization:n,apps:o,hasMorePages:s}=await t.orgAndApps(r.id),a=await kE(o,s,n,t,e);return await yh(a,t.organizationSource),a}async function vR(){let e=await L0();if(e.length===0)throw new k("No organizations found.","Make sure you have access to a Shopify organization.");return d0(e)}function TZ({organization:e,app:t,remoteApp:r,selectedStore:n,tunnelMode:o}){if(gy())return;let s="Not yet configured",a=t.configuration.build?.automatically_update_urls_on_dev;a!==void 0&&(s=a?"Yes":"No");let l=[sv];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)."]),cv({org:e.businessName,appName:r.title,devStore:n.shopDomain,updateURLs:s,configFile:Pe(t.configPath),messages:l})}function cv({org:e,appName:t,devStore:r,updateURLs:n,configFile:o,appDotEnv:s,messages:a}){let l=[];r&&l.push(r);let p=(s&&Pe(s))??(o&&yr(o));no({headline:o?`Using ${p} for default values:`:"Using these settings:",body:iv({appName:t,org:e,devStores:l,updateURLs:n,messages:a})})}async function yh(e,t){let n={[t===Jo.BusinessPlatform?"business_platform_id":"partner_id"]:ps(e.organizationId)};await mr.addPublicMetadata(()=>({...n,api_key:e.apiKey}))}d();d();async function lv(e,t){ce(`Writing app configuration to ${t}`);let r=wR(structuredClone(e)),n=Fh(r),o=new wt(t,{});await o.replace(n),await o.transformRaw(CR)}function Fh(e){if(e==null)return e;if(Array.isArray(e))return e.map(Fh);if(typeof e=="object"){let t={};for(let[r,n]of Object.entries(e)){let o=Fh(n);typeof o=="object"&&o!==null&&!Array.isArray(o)&&Object.keys(o).length===0||(t[r]=o)}return t}return e}function CR(e){let t=`# Learn more about configuring your app at https://shopify.dev/docs/apps/tools/cli/configuration
|
|
247
|
+
`,r=`
|
|
248
|
+
# Learn more at https://shopify.dev/docs/apps/tools/cli/configuration#access_scopes`,n=e.split(/(\r\n|\r|\n)/);return n.unshift(`
|
|
249
|
+
`),n.unshift(t),n.forEach((o,s)=>{o==="[access_scopes]"&&n.splice(s+1,0,r)}),n.join("")}function wR(e){let t=e.webhooks;if(Array.isArray(t?.subscriptions)&&t.subscriptions.length){let r=io(e?.application_url);t.subscriptions=x0(t.subscriptions),t.subscriptions=t.subscriptions.map(({uri:n,...o})=>({uri:r&&n.includes(r)?n.replace(r,""):n,...o}))}return e}d();d();d();var bR=Vo.extend({app_proxy:E.object({url:E.preprocess(io,kc(E.string({invalid_type_error:"Value must be string"}))),subpath:E.string({invalid_type_error:"Value must be a string"}),prefix:E.string({invalid_type_error:"Value must be a string"})}).optional()}),Eh="app_proxy",AR={forward:(e,t)=>{let r=e;if(!r.app_proxy)return{};let n;return"application_url"in t&&(n=t?.application_url),{url:Go(r.app_proxy.url,n),subpath:r.app_proxy.subpath,prefix:r.app_proxy.prefix}},reverse:e=>{let t=e;return{app_proxy:{url:io(t.url),subpath:t.subpath,prefix:t.prefix}}}},SR=gi({identifier:Eh,schema:bR,transformConfig:AR,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})}}),fv=SR;d();var xR=Vo.extend({pos:E.object({embedded:E.boolean({invalid_type_error:"Value must be Boolean"})}).optional()}),vh="point_of_sale",PR={embedded:"pos.embedded"},OR=gi({identifier:vh,schema:xR,transformConfig:PR}),pv=OR;d();d();function dv(e,t){let r=e;if(!r.events?.subscription)return e;let n;t&&"application_url"in t&&(n=t?.application_url);let{handle:o,...s}=r,a=r.events.subscription,l=!Array.isArray(a),p=IR(a).map(D=>{let{handle:g,...F}=D,w=l?F:D;return typeof w.uri=="string"?{...w,uri:Go(w.uri,n)}:w});return{...s,events:{...r.events,subscription:Array.isArray(a)?p:p[0]}}}function hv(e,t){let{api_version:r,subscription:n}=Ct(e,"events")??{},o=l=>{let{identifier:p,api_version:D,...g}=l;return D!==void 0&&D!==r?{...g,api_version:D}:g},s;if(Array.isArray(n))s=n.map(o);else if(n){let l=t?.handle??n.handle??TR(n);s=[o({...n,handle:l})]}let a={};return r!==void 0&&(a.api_version=r),s!==void 0&&(a.subscription=s),{events:a}}function TR(e){return vt([e.topic,...e.actions].join("-")).slice(0,zo).replace(/-$/,"")}function IR(e){return Array.isArray(e)?e:[e]}var gl="events",BR={forward:dv,reverse:hv},Dv=mi.shape.handle.refine(e=>e!==gl,'The handle "events" is reserved for the legacy events module. Choose a different subscription handle.'),RR=E.object({subscription:E.unknown().optional()}).passthrough(),NR=Vo.extend({handle:Dv.optional(),events:RR.optional()}).superRefine((e,t)=>{let r=e.events?.subscription;if(r===void 0||Array.isArray(r))return;let n=Dv.safeParse(e.handle);n.success||n.error.issues.forEach(o=>t.addIssue({...o,path:["handle"]}))}),MR=E.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:r,...n}=e;return n},NR),jR=gi({identifier:gl,schema:MR,transformConfig:BR,expandConfig:e=>{let t=e.events?.subscription;return Array.isArray(t)?t.map(r=>{let{handle:n,...o}=r;return{handle:n,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}}),mv=jR;d();var $R={forward:UR,reverse:e=>kR(e)},wh="privacy_compliance_webhooks",LR=gi({identifier:wh,schema:Hc,transformConfig:$R}),gv=LR;function UR(e,t){let r=Ct(e,"webhooks"),n;"application_url"in t&&(n=t?.application_url);let o=zy({customers_redact_url:Ch(qR(r),n),customers_data_request_url:Ch(WR(r),n),shop_redact_url:Ch(HR(r),n)});if(Object.keys(o).length===0)return o;{let{api_version:s}=r;return{api_version:s,...o}}}function kR(e){let t=Ct(e,"customers_redact_url"),r=Ct(e,"customers_data_request_url"),n=Ct(e,"shop_redact_url"),o=[];return r&&o.push({compliance_topics:[Wc.CustomersDataRequest],uri:r}),t&&o.push({compliance_topics:[Wc.CustomersRedact],uri:t}),n&&o.push({compliance_topics:[Wc.ShopRedact],uri:n}),o.length===0?{}:{webhooks:{subscriptions:S0(o),privacy_compliance:void 0}}}function bh(e,t){return e.subscriptions?.find(r=>r.compliance_topics?.includes(t))?.uri}function Ch(e,t){return t&&e?.startsWith("/")?`${io(t)}${e}`:e}function qR(e){return bh(e,"customers/redact")??e?.privacy_compliance?.customer_deletion_url}function WR(e){return bh(e,"customers/data_request")??e?.privacy_compliance?.customer_data_request_url}function HR(e){return bh(e,"shop/redact")??e?.privacy_compliance?.shop_deletion_url}d();var zR="@shopify/post-purchase-ui-extensions",VR=Ke.extend({metafields:E.array(Di).optional()}),GR=Ie({identifier:"checkout_post_purchase",dependency:zR,partnersWebIdentifier:"post_purchase",schema:VR,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??[]})}),_v=GR;d();var KR="@shopify/checkout-ui-extensions",JR=Ke.extend({name:E.string(),extension_points:E.array(E.string()).optional(),metafields:E.array(Di).optional(),settings:E.object({fields:E.any().optional()}).optional()}),YR=Ie({identifier:"checkout_ui_extension",dependency:KR,schema:JR,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 pn(t,"checkout_ui")})}),yv=YR;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"},TQ=["customer","order","product","marketing_activity","abandonment","company","company_contact"],Fv=[bt.customer_reference,bt.order_reference,bt.product_reference,bt.company_reference,bt.company_contact_reference],Ev=[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"},vv=[[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"]],XR=[Qe.boolean,Qe.email,Qe.multiLineText,Qe.int,Qe.singleLineText,Qe.url,Qe.decimal],ZR=[Qe.boolean,Qe.email,Qe.singleLineText,Qe.url,Qe.decimal,Qe.schemaTypeReference],Cv=vv.filter(([e])=>XR.includes(e)),wv=vv.filter(([e])=>ZR.includes(e));d();d();var _l=async(e,t)=>{if(!t)return"";let r=await Ve(B(e,t));if(r.length>1)throw new Error("Multiple files found for schema path");if(r.length===0)throw new Error("No file found for schema path");return $e(r[0])};d();var QR=new Map(Cv),eN=new Map(wv),tN=(e,t)=>{let r=t==="flow_action"?QR:eN,n=Ah(e.type),o=n?r.get("schema_type_reference"):r.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),n&&(s.typeRefName=e.type.replace("schema.","")),s},rN=(e,t)=>{if(t==="flow_trigger"&&!Fv.includes(e.type))throw new k(`Commerce object ${e.type} is not supported for Flow Triggers`);if(t==="flow_action"&&!Ev.includes(e.type))throw new k(`Commerce object ${e.type} is not supported for Flow Actions`);let r=e.type.replace("_reference",""),n={name:`${r}_id`,uiType:t==="flow_action"?"commerce-object-id":r,description:e.description};return r==="marketing_activity"&&(n.uiType="marketing-activity-id",n.marketingActivityCreateUrl=e.marketingActivityCreateUrl,n.marketingActivityDeleteUrl=e.marketingActivityDeleteUrl),t==="flow_action"&&(n.label=`${Wo(r)} ID`,n.required=e.required),n},yl=(e,t)=>t?t.map(n=>Object.keys(bt).includes(n.type)?rN(n,e):tN(n,e)):[];var Sh=w0.extend({key:E.string().regex(/^[a-zA-Z\s]*$/,{message:"String must contain only alphabetic characters and spaces"}).optional()}),nN=mi.extend({type:E.literal("flow_trigger"),name:E.string(),schema:E.string().optional(),settings:E.object({fields:E.array(Sh).optional()}).optional()}).refine(e=>{let t=e.settings?.fields??[],r=t.every((o,s)=>Fl(o,"flow_trigger",e.handle,s)),n=Av(t,e.schema);return r&&n}),iN=Ie({identifier:"flow_trigger",schema:nN,appModuleFeatures:e=>[],deployConfig:async(e,t)=>({title:e.name,description:e.description,fields:yl("flow_trigger",e.settings?.fields),schema_patch:await _l(t,e.schema)})}),bv=iN;function Sv(e,t,r,n){let o=`'${e}' property must be a string for 'field[${n}]' ${JSON.stringify(t)} of flow extension '${r}'`;return{required_error:o,invalid_type_error:o}}var xh=E.object({type:E.string(),description:E.string().optional()}).strict(),Fl=(e,t,r,n)=>{let o=Object.keys(bt).includes(e.type);return o?o?xh.extend({required:E.boolean().optional(),marketingActivityCreateUrl:E.string().optional(),marketingActivityDeleteUrl:E.string().optional()}).parse(e):xh.parse(e):t==="flow_action"?xh.extend({key:E.string(Sv("key",e,r,n)),name:E.string(Sv("name",e,r,n)),required:E.boolean().optional()}).parse(e):Sh.parse(e)},Ah=e=>e.startsWith("schema."),Ns=e=>kc(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=>!E0.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."}),xv=(e,t,r)=>{if(e||t){if(!e)throw new E.ZodError([{code:E.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 E.ZodError([{code:E.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(!r)throw new E.ZodError([{code:E.ZodIssueCode.custom,path:["extensions[0].validation_url"],message:"To set a custom configuration page a `validation_url` must be specified."}])}return!0},Av=(e,t)=>{if(e.some(r=>Ah(r.type))&&!t)throw new E.ZodError([{code:E.ZodIssueCode.custom,path:["extensions[0].schema"],message:"To reference schema types a `schema` must be specified."}]);return!0},Pv=(e,t)=>{if(e||t){if(!e)throw new E.ZodError([{code:E.ZodIssueCode.custom,path:["extensions[0].return_type_ref"],message:"When uploading a schema a `return_type_ref` must be specified."}]);if(!t)throw new E.ZodError([{code:E.ZodIssueCode.custom,path:["extensions[0].schema"],message:"To set a return type a `schema` must be specified."}])}return!0};d();var Ov=["runtime_url","validation_url","config_page_url","config_page_preview_url"];var Ms="Flow action",oN=mi.extend({type:E.literal("flow_action"),name:E.string(),runtime_url:Ns(E.string({invalid_type_error:"Value must be string"})),validation_url:Ns(E.string({invalid_type_error:"Value must be string"})).optional(),config_page_url:Ns(E.string({invalid_type_error:"Value must be string"})).optional(),config_page_preview_url:Ns(E.string({invalid_type_error:"Value must be string"})).optional(),schema:E.string().optional(),return_type_ref:E.string().optional()}).refine(e=>{let t=xv(e.config_page_url,e.config_page_preview_url,e.validation_url),n=(e.settings?.fields??[]).every((s,a)=>Fl(s,"flow_action",e.handle,a)),o=Pv(e.return_type_ref,e.schema);return t&&n&&o}),uN=Ie({identifier:"flow_action",schema:oN,appModuleFeatures:e=>[],patchWithAppDevURLs:(e,t)=>{for(let r of Ov){let n=e[r];typeof n=="string"&&n.startsWith("/")&&(e[r]=Ko(Ms,r,n,t.applicationUrl))}},deployConfig:async(e,t,r,n,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(Ms,"runtime_url",e.runtime_url,a),fields:yl("flow_action",e.settings?.fields),validation_url:e.validation_url?Ko(Ms,"validation_url",e.validation_url,a):void 0,custom_configuration_page_url:e.config_page_url?Ko(Ms,"config_page_url",e.config_page_url,a):void 0,custom_configuration_page_preview_url:e.config_page_preview_url?Ko(Ms,"config_page_preview_url",e.config_page_preview_url,a):void 0,schema_patch:await _l(t,e.schema),return_type_ref:e.return_type_ref}}}),Tv=uN;d();import sN from"fs";var Iv=["buyer_experience","customers","fulfillment","inventory_and_merch","loyalty","orders","promotion","risk","b2b","payment_reminders","custom_data","error_monitoring"],aN=["capture_at_fulfillment"],cN=mi.extend({type:E.literal("flow_template"),name:E.string(),description:E.string().max(1024),template:E.object({categories:E.array(E.string().refine(e=>Iv.concat(aN).includes(e),e=>({message:`${e} is not a valid category. Valid categories include: ${Iv.join(", ")}.`}))),module:E.string(),require_app:E.boolean().optional(),discoverable:E.boolean().optional(),allow_one_click_activate:E.boolean().optional(),enabled:E.boolean().optional()})}),lN=Ie({identifier:"flow_template",schema:cN,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 fN(t,e.template.module),localization:await pn(t,e.name)})});async function fN(e,t){let n=(await Ve(B(e,t)))[0];if(!n)throw new k(`Missing flow file with the path ${B(e,t)}`);return sN.readFileSync(n,"base64")}var Bv=lN;d();var pN=dn({identifier:"flow_trigger_lifecycle_callback",uidStrategy:"uuid",experience:"extension",appModuleFeatures:()=>[],appRelativeUrlFields:["url"]}),Rv=pN;d();var dN="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.",Nv=E.object({namespace:E.string(),key:E.string()}),hN=Ke.extend({build:E.object({command:E.string().transform(e=>e.trim()===""?void 0:e).optional(),path:E.string().optional(),watch:E.union([E.string(),E.string().array()]).optional(),wasm_opt:E.boolean().optional().default(!0),typegen_command:E.string().transform(e=>e.trim()===""?void 0:e).optional()}).optional(),name:E.string(),type:E.string(),configuration_ui:E.boolean().optional().default(!0),ui:E.object({enable_create:E.boolean().optional(),paths:E.object({create:E.string(),details:E.string()}).optional(),handle:E.string().optional()}).optional(),api_version:E.string(),input:E.object({variables:Nv.optional()}).optional(),targeting:E.array(E.object({target:E.string(),input_query:E.string().optional(),input_variables:Nv.optional(),export:E.string().optional()})).optional()}).superRefine((e,t)=>{e.input?.variables&&e.targeting?.some(r=>r.input_variables)&&t.addIssue({code:E.ZodIssueCode.custom,path:["input","variables"],message:dN})}),DN=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:hN,appModuleFeatures:e=>["function"],getOutputRelativePath:e=>B("dist","index.wasm"),devSessionWatchConfig:e=>{let t=e.configuration;if(!t.build||!t.build.watch)return;let r=[t.build.watch].flat().map(n=>B(e.directory,n));return r.push(B(e.directory,"locales","**.json")),r.push(B(e.directory,"**","!(.)*.graphql")),r.push(B(e.directory,"**.toml")),{paths:r}},clientSteps:[{lifecycle:"deploy",steps:[{id:"build-function",name:"Build Function",type:"build_function",config:{}}]}],deployConfig:async(e,t,r)=>{let n,o=Tc(),s=B(t,"input.graphql");await Y(s)&&(n=await $e(s));let a=e.targeting&&await Promise.all(e.targeting.map(async p=>{let D;return p.input_query&&(D=await mN(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:r,api_type:e.type==="function"?void 0:e.type,api_version:e.api_version,input_query:n,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 pn(t,"function"),targets:a}},preDeployValidation:async e=>{if(!await Y(e.outputPath))throw new k(Se`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 mN(e){if(await Y(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 Mv=DN;d();d();d();var jv=50,Fr=Ke.extend({api_version:E.string(),payment_session_url:E.string().url(),refund_session_url:E.string().url().optional(),capture_session_url:E.string().url().optional(),void_session_url:E.string().url().optional(),supported_countries:E.array(E.string()),supported_payment_methods:E.array(E.string()),test_mode_available:E.boolean(),merchant_label:E.string().max(jv),input:E.object({metafield_identifiers:E.object({namespace:E.string(),key:E.string()}).optional()}).optional()}),yi=E.object({buyer_label:E.string().max(jv).optional(),buyer_label_translations:E.array(E.object({locale:E.string(),label:E.string()})).optional()}),nu=E.object({supports_installments:E.boolean().optional(),supports_deferred_payments:E.boolean().optional()}),El=E.object({multiple_capture:E.boolean().optional()}),Fi=E.object({confirmation_callback_url:E.string().url().optional(),supports_3ds:E.boolean()}),Dn=E.object({supported_buyer_contexts:E.array(E.object({currency:E.string(),countries:E.array(E.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 Ph="payments.offsite.render",$v=Fr.merge(yi).merge(nu).merge(Fi).merge(El).merge(Dn).extend({targeting:E.array(E.object({target:E.literal(Ph)})).length(1),supports_oversell_protection:E.boolean().optional(),supports_3ds:E.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 Vee(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 Lv(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 Ei(e,t){let r=e.ui_extension_handle;if(r||!("ui_extension_registration_uuid"in e))return r;let n=t.find(o=>o.uuid===e.ui_extension_registration_uuid)?.title;return n?vt(n):r}var Oh="payments.redeemable.render",Uv=Fr.merge(yi).merge(Dn).extend({targeting:E.array(E.object({target:E.literal(Oh)})).length(1),api_version:E.string(),balance_url:E.string().url(),ui_extension_handle:E.string().optional(),checkout_payment_method_fields:E.array(E.object({type:E.union([E.literal("string"),E.literal("number"),E.literal("boolean")]),required:E.boolean(),key:E.string()})).optional()});function tte(e,t){let r=Ei(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(n=>({key:n.key,type:n.type,required:n.required})),ui_extension_handle:r}}async function kv(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 Th="payments.custom-onsite.render",qv=7,Wv=Fr.merge(yi).merge(nu).merge(Fi).merge(Dn).extend({targeting:E.array(E.object({target:E.literal(Th)})).length(1),supports_3ds:E.boolean().optional(),update_payment_session_url:E.string().url().optional(),multiple_capture:E.boolean().optional(),supports_oversell_protection:E.boolean().optional(),modal_payment_method_fields:E.array(E.object({})).optional(),ui_extension_handle:E.string().optional(),start_verification_session_url:E.string().url().optional(),checkout_payment_method_fields:E.array(E.object({type:E.union([E.literal("string"),E.literal("number"),E.literal("boolean")]),required:E.boolean(),key:E.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 ste(e,t){let r=Ei(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:r}}async function Hv(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 Ih="payments.custom-credit-card.render",zv=7,Vv=Fr.merge(yi).merge(Fi).merge(Dn).required({refund_session_url:!0,capture_session_url:!0,void_session_url:!0}).extend({targeting:E.array(E.object({target:E.literal(Ih)})).length(1),api_version:E.string(),multiple_capture:E.boolean(),checkout_hosted_fields:E.array(E.string()).optional(),ui_extension_handle:E.string().optional(),encryption_certificate_fingerprint:E.string(),checkout_payment_method_fields:E.array(E.object({type:E.union([E.literal("string"),E.literal("number"),E.literal("boolean")]),required:E.boolean(),key:E.string()})).max(zv,`The extension can't have more than ${zv} checkout_payment_method_fields`).optional()});function dte(e,t){let r=Ei(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:r}}async function Gv(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 Bh="payments.credit-card.render",Kv=7,Jv=Fr.merge(nu).merge(Fi).merge(El).merge(Dn).required({refund_session_url:!0,capture_session_url:!0,void_session_url:!0}).extend({targeting:E.array(E.object({target:E.literal(Bh)})).length(1),verification_session_url:E.string().url().optional(),ui_extension_handle:E.string().optional(),supports_moto:E.boolean({required_error:"supports_moto is required",invalid_type_error:"Value must be Boolean"}),encryption_certificate_fingerprint:E.string(),checkout_payment_method_fields:E.array(E.object({type:E.union([E.literal("string"),E.literal("number"),E.literal("boolean")]),required:E.boolean(),key:E.string()})).max(Kv,`The extension can't have more than ${Kv} 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 yte(e,t){let r=Ei(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:r}}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,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 Rh="payments.card-present.render",Xv=Fr.required({refund_session_url:!0,capture_session_url:!0,void_session_url:!0}).extend({targeting:E.array(E.object({target:E.literal(Rh)})).length(1),sync_terminal_transaction_result_url:E.string().url().optional()});function wte(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 Zv(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 gN=E.union([$v,Uv,Wv,Vv,Jv,Xv]),_N=Ie({identifier:"payments_extension",schema:gN,appModuleFeatures:e=>[],deployConfig:async(e,t)=>{switch(e.targeting[0]?.target){case Ph:return Lv(e);case Oh:return kv(e);case Bh:return Yv(e);case Th:return Hv(e);case Ih:return Gv(e);case Rh:return Zv(e);default:return{}}}}),Qv=_N;d();var Nh="@shopify/retail-ui-extensions",yN=Ke.extend({name:E.string()}),FN=Ie({identifier:"pos_ui_extension",dependency:Nh,schema:yN,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 r=await Ts(Nh,t);if(r==="not_found")throw new Mr(`Dependency ${Nh} not found`);return{name:e.name,description:e.description,renderer_version:r?.version}}}),eC=FN;d();var Mh="@shopify/admin-ui-extensions",EN=Ie({identifier:"product_subscription",additionalIdentifiers:["subscription_management"],dependency:Mh,graphQLType:"subscription_management",schema:Ke,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 r=await Ts(Mh,t);if(r==="not_found")throw new Mr(`Dependency ${Mh} not found`);return{renderer_version:r?.version}}}),tC=EN;d();var vN=E.object({key:E.string()}),CN=Ke.extend({production_api_base_url:E.string(),benchmark_api_base_url:E.string().optional(),calculate_taxes_api_endpoint:E.string(),input:E.object({metafield_identifiers:E.object({namespace:E.string(),key:E.string()}).optional()}).optional(),metafields:E.array(Di).optional(),cart_line_properties:E.array(vN).optional()}),wN=Ie({identifier:"tax_calculation",schema:CN,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})}),rC=wN;d();var bN=Ie({identifier:"theme",schema:Ke,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()=>({theme_extension:{files:{}}}),preDeployValidation:async e=>xN(e)}),sC=bN,jh=1024,aC=jh*1024,cC=10,AN=cC*aC,lC=500,SN=lC*jh,nC=[".jpg",".jpeg",".json",".js",".css",".png",".svg",".wasm"],iC=[".json"],fC={assets:{validator:new RegExp(`${nC.join("|")}$`),failureMessage:e=>`Only these filetypes are supported in assets: ${nC.join(", ")}`},blocks:{validator:/.liquid$/,failureMessage:e=>"Only .liquid files are allowed in blocks."},locales:{validator:new RegExp(`${iC.join("|")}$`),failureMessage:e=>`Only these filetypes are supported in locales: ${iC.join(", ")}`},snippets:{validator:/.liquid$/,failureMessage:e=>"Only .liquid files are allowed in snippets."}},oC=Object.keys(fC);async function xN(e){let t=await bs(e),r=[],n=[];await Promise.all(t.map(async o=>{let s=Te(e.directory,o),a=De(s);TN(s,a);let l=await Sc(o);n.push(l),["blocks","snippets"].includes(a)&&r.push(l)})),PN(uC(n)),ON(uC(r))}function PN(e){if(e>AN){let t=`${(e/aC).toFixed(2)} MB`;throw new k(`Your theme app extension exceeds the file size limit (${cC} MB). It's currently ${t}.`,"Reduce your total file size and try again.")}}function ON(e){if(e>SN){let t=`${(e/jh).toFixed(2)} kB`;throw new k(`Your theme app extension exceeds the total liquid file size limit (${lC} kB). It's currently ${t}.`,"Reduce your total file size and try again.")}}function TN(e,t){if(!oC.includes(t))throw new k(Se`Your theme app extension includes files in an unsupported directory, ${Ae.path(t)}`,`Make sure all theme app extension files are in the supported directories: ${oC.join(", ")}`);let r=fC[t];if(!e.match(r.validator))throw new k(`Invalid filename in your theme app extension: ${e}
|
|
250
|
+
${r.failureMessage(e)}`)}function uC(e){return e.reduce((t,r)=>t+r,0)}d();d();var H2=li(RD(),1);import{createRequire as IU}from"module";async function wm(){let e=await import("./typescript-5R4Y7PXE.js");return e.default??e}var q2=IU(import.meta.url),W2="@shopify/ui-extensions";function BU(e){let t=e.toLowerCase().replace(/(::|\.).+$/,"");switch(t){case"purchase":return"checkout";case"pos":return"point-of-sale";default:return t}}function bm(e){let t=e[0];return t?`${W2}/${BU(t)}`:W2}function aa(e){let[t,r]=e.split("-");return!t||!r?null:{year:parseInt(t,10),month:parseInt(r,10)}}async function z2(e,t){let r=await wm(),n=r.findConfigFile(e,r.sys.fileExists.bind(r.sys),"tsconfig.json");if(!n)return{compilerOptions:{},configPath:void 0,hasExplicitFiles:!1};let o=ot(n),s=t?.get(o);if(s)return s;let a=r.readConfigFile(n,r.sys.readFile.bind(r.sys));if(a.error)return{compilerOptions:{},configPath:o,hasExplicitFiles:!1};let l=r.parseJsonConfigFileContent(a.config,r.sys,De(n)),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 RU(e,t){if(!e.startsWith("./")&&!e.startsWith("../"))return null;let r=ot(t,e),n=["",".js",".jsx",".ts",".tsx"];for(let o of n){let s=r+o;if(await Y(s)&&!s.includes("node_modules"))return s}for(let o of[".js",".jsx",".ts",".tsx"]){let s=B(r,`index${o}`);if(await Y(s)&&!s.includes("node_modules"))return s}return null}function V2(e){return e.length>0&&e.every(t=>t.isTypeOnly)}function NU(e,t){if(e.importClause?.isTypeOnly)return!0;let r=e.importClause?.namedBindings;return e.importClause?.name||!r?!1:t.isNamedImports(r)&&V2(r.elements)}function MU(e,t){if(e.isTypeOnly)return!0;let r=e.exportClause;return r?t.isNamedExports(r)&&V2(r.elements):!1}function jU(e,t){return t?my(ot(t),ot(e)):!0}function $U(e,t){if(!t.allowedFiles)return!0;let r=ot(e);return t.allowedFiles.has(r)||!!t.alwaysAllowedFiles?.has(r)}function G2(e,t){return!e.includes("node_modules")&&!e.endsWith(".d.ts")&&$U(e,t)}function LU(e,t){let r=ot(e),n=(t.allowedFiles?.has(r)??!1)||(t.alwaysAllowedFiles?.has(r)??!1);return G2(e,t)&&(jU(e,t.boundaryDirectory)||n)}async function UU(e,t={}){try{let r=ot(e),n=t.importCache?.get(r);if(n)return n;let o=await wm(),s=to(e).toString(),a=[],{compilerOptions:l}=await z2(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,F=[],w=v=>{if(o.isImportDeclaration(v)&&v.moduleSpecifier&&o.isStringLiteral(v.moduleSpecifier)){if(NU(v,o))return;F.push(v.moduleSpecifier.text)}else if(o.isCallExpression(v)&&v.expression.kind===o.SyntaxKind.ImportKeyword){let S=v.arguments[0];S&&o.isStringLiteral(S)&&F.push(S.text)}else if(o.isExportDeclaration(v)&&v.moduleSpecifier&&o.isStringLiteral(v.moduleSpecifier)){if(MU(v,o))return;F.push(v.moduleSpecifier.text)}o.forEachChild(v,w)};w(D);for(let v of F){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 RU(v,De(e));O&&a.push(O)}}return t.importCache?.set(r,a),a}catch(r){if(r instanceof k)throw r;return[]}}async function Df(e,t={},r=new Set){if(r.has(e))return[];r.add(e);let n=(await UU(e,t)).filter(s=>G2(s,t)),o=[...n];for(let s of n){if(!LU(s,t))continue;let a=await Df(s,t,r);o.push(...a)}return Bt(o)}async function Am(e,t,r={}){let{configPath:n,fileNames:o,hasExplicitFiles:s}=await z2(e,r.tsConfigCache);if(!(!n||!s))return new Set((o??[]).map(a=>ot(a)))}async function kU(e){let t;try{t=to(e).toString()}catch{return!1}let r=await wm(),n=r.createSourceFile(e,t,r.ScriptTarget.Latest,!0,r.ScriptKind.TS),o=!1,s=a=>{if(!o){if(r.isExportDeclaration(a)&&a.exportClause&&r.isNamedExports(a.exportClause)){for(let l of a.exportClause.elements)if(l.name.text==="ShopifyGlobal"){o=!0;return}}r.forEachChild(a,s)}};return s(n),o}async function qU(e,t){let r=async n=>{let o=`import('@shopify/ui-extensions/${n}').Api`,s=t.get(n);return s&&await kU(s)?`${o} & import('@shopify/ui-extensions/${n}').ShopifyGlobal`:o};return e.length===1?r(e[0]??""):e.length>1?`(${(await Promise.all(e.map(r))).join(" | ")})`:null}async function WU(e,t,{includesTools:r,includesIntents:n},o){let s=await qU(e,t);if(!s)return null;if(!r&&!n)return s;let a=s;return n&&(a=`import('${o}').WithGeneratedIntents<${a}, ShopifyGeneratedIntentVariants>`),r&&(a=`import('${o}').WithGeneratedTools<${a}, ShopifyTools>`),a}async function K2({fullPath:e,typeFilePath:t,targets:r,apiVersion:n,toolsTypeDefinition:o,intentsTypeDefinition:s}){try{let a=new Map,l=!!o,p=!!s;for(let v of r)try{let S=q2.resolve(`@shopify/ui-extensions/${v}`,{paths:[e,t]});a.set(v,S)}catch{let{year:O,month:P}=aa(n)??{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=bm(r);if(l||p)try{q2.resolve(D,{paths:[e,t]})}catch{let{year:S,month:O}=aa(n)??{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=wc(e,De(t)),F=await WU(r,a,{includesTools:l,includesIntents:p},D);return F?["//@ts-ignore",`declare module './${g}' {`,...o?[o]:[],...s?[s]:[],` const shopify: ${F};`," const globalThis: { shopify: typeof shopify };","}",""].join(`
|
|
251
|
+
`):null}catch(a){if(a instanceof k)throw a;let{year:l,month:p}=aa(n)??{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 J2(e,t){let r=De(e),n=await ln("tsconfig.json",{cwd:r,type:"file"});if(n){let o=ot(n),s=ot(t);if(o.startsWith(s))return De(n)}}var HU=E.object({name:E.string(),description:E.string(),inputSchema:E.object({}).passthrough(),outputSchema:E.object({}).passthrough().optional()}),Y2=E.array(HU),X2=E.object({value:E.object({}).passthrough().optional(),inputSchema:E.object({}).passthrough(),outputSchema:E.object({}).passthrough().optional()});function zU(e){return Wo(`${e.action} ${e.type}`.replace(/[^a-zA-Z0-9]+/g," "))}async function Z2(e,{generatedTypesHelperImportPath:t}){if(e.length===0)return"";let r=new Set,n=e.map(async a=>{let l=`${a.action}:${a.type}`;if(r.has(l))throw new k(`Intent "${l}" is defined multiple times. Intents must be unique within a target.`);r.add(l);let p=zU(a),D=`${p}IntentInput`,g=`${p}IntentValue`,F=`${p}IntentOutput`,w=`${p}IntentRequest`,v=await ca(D,a.inputSchema),S=await ca(g,a.valueSchema),O=await ca(F,a.outputSchema),P=`interface ${w} {
|
|
252
|
+
action: ${JSON.stringify(a.action)};
|
|
253
|
+
type: ${JSON.stringify(a.type)};
|
|
254
|
+
data: ${D};
|
|
255
|
+
value?: ${g};
|
|
256
|
+
}`;return{inputType:v,valueType:S,outputType:O,requestType:P,requestTypeName:w,outputTypeName:F}}),o=await Promise.all(n),s=o.map(({requestTypeName:a,outputTypeName:l})=>` | import('${t}').ShopifyGeneratedIntentVariant<${a}, ${l}>`).join(`
|
|
257
|
+
`);return`${o.map(({inputType:a,valueType:l,outputType:p,requestType:D})=>`${a}
|
|
258
|
+
${l}
|
|
259
|
+
${p}
|
|
260
|
+
${D}`).join(`
|
|
261
|
+
|
|
262
|
+
`)}
|
|
263
|
+
|
|
264
|
+
type ShopifyGeneratedIntentVariants =
|
|
265
|
+
${s}
|
|
266
|
+
`}async function Q2(e){if(e.length===0)return"";let t=new Set,r=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=Wo(`${s.name}Input`),l=await ca(a,s.inputSchema),p=Wo(`${s.name}Output`),D=await ca(p,s.outputSchema);return{name:s.name,description:s.description,inputType:l,outputType:D,inputTypeName:a,outputTypeName:p}}),n=await Promise.all(r),o=n.map(({name:s,description:a,inputTypeName:l,outputTypeName:p})=>` /**
|
|
267
|
+
${a.replace(/\*\//g,"*\\/").split(`
|
|
268
|
+
`).map(g=>` * ${g}`).join(`
|
|
269
|
+
`)}
|
|
270
|
+
*/
|
|
271
|
+
register(name: '${s}', handler: (input: ${l}) => ${p} | Promise<${p}>): () => void;`).join(`
|
|
272
|
+
`);return`${n.map(({inputType:s,outputType:a})=>`${s}
|
|
273
|
+
${a}`).join(`
|
|
274
|
+
`)}
|
|
275
|
+
interface ShopifyTools {
|
|
276
|
+
${o}
|
|
277
|
+
}
|
|
278
|
+
`}function VU(e,t){return e.replace(/^(interface|type|enum)\s+[A-Za-z0-9_]+/,`$1 ${t}`)}async function ca(e,t){if(!t)return`type ${e} = unknown`;let r=await(0,H2.compile)(t,e,{bannerComment:""}),n=r.startsWith("export ")?r.slice(7):r;return VU(n,e)}d();d();d();var e1=di`
|
|
279
|
+
query {
|
|
280
|
+
products(first: 1, query: "published_status:published") {
|
|
281
|
+
edges {
|
|
282
|
+
node {
|
|
283
|
+
id
|
|
284
|
+
variants(first: 1) {
|
|
285
|
+
edges {
|
|
286
|
+
node {
|
|
287
|
+
id
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
`;async function t1(e){let t=await ky(e),r=await p0(e1,t);if(r.products.edges.length===0){let a=`https://${My(e)}/admin/products/new`,l=Se`${Ae.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.
|
|
296
|
+
|
|
297
|
+
${l}`)}return r.products.edges[0].node.variants.edges[0].node.id.split("/").pop()}async function yoe(e,t,r){return e.filter(s=>s.shouldFetchCartUrl()).length>0?r||`/cart/${await t1(t)}:1`:void 0}function r1(e){let t=e.toLowerCase().replace(/(::|\.).+$/,""),r=e.split(".")[1];switch(t){case"purchase":return r==="post"?"post_purchase":"checkout";case"customer-account":return"customer-accounts";case"pos":return"point_of_sale";default:return t}}d();T8();async function n1(e,t){return _0.format(e,t)}var GU="@shopify/checkout-ui-extensions",KU=e=>e.extension_points!==void 0||e.targeting!==void 0,o1="No extension targets defined, add a `targeting` field to your configuration",JU=Ke.extend({name:E.string(),type:E.literal("ui_extension"),extension_points:Td.optional(),targeting:Td.optional(),metafields:E.array(Di).optional()}).refine(e=>KU(e),o1).transform(e=>{let t=(e.targeting??e.extension_points??[]).map(r=>{let n={assets:{[gr.Main]:{filepath:`${e.handle}.js`,module:r.module},...r.should_render?.module?{[gr.ShouldRender]:{filepath:`${e.handle}-conditions.js`,module:r.should_render.module}}:null}};return{target:r.target,module:r.module,metafields:r.metafields??e.metafields??[],default_placement_reference:r.default_placement,urls:r.urls??{},capabilities:r.capabilities,preloads:r.preloads??{},build_manifest:n,tools:r.tools,instructions:r.instructions,intents:r.intents,assets:r.assets}});return{...e,extension_points:t}}),YU=Ie({identifier:"ui_extension",dependency:GU,schema:JU,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(n=>r1(n.target)==="checkout")!==void 0?[...t,"cart_url"]:t},validate:async(e,t,r)=>ek(r,e.extension_points,t),deployConfig:async(e,t)=>{let r=e.extension_points?.map(XU)??[];return{api_version:e.api_version,extension_points:r,capabilities:e.capabilities,supported_features:e.supported_features,name:e.name,description:e.description,settings:e.settings,localization:await pn(t,e.type)}},getBundleExtensionStdinContent:e=>{let t=i1(e),r=e.extension_points||[],n=r.map(({target:a,module:l},p)=>t?`import Target_${p} from '${l}';shopify.extend('${a}', (...args) => Target_${p}(...args));`:`import '${l}';`).join(`
|
|
298
|
+
`),o={};r.forEach(a=>{let l=tk(a,t);l&&(o[gr.ShouldRender]=l)});let s=Object.values(o);return{main:n,...s.length?{assets:s}:{}}},hasExtensionPointTarget:(e,t)=>e.extension_points?.find(r=>r.target===t)!==void 0,contributeToSharedTypeFile:async(e,t)=>{if(!i1(e.configuration))return;let{configuration:r}=e,n=new Map,o=new Map,s=new Map,a=new Map,l=new Map;for await(let p of r.extension_points){let D=B(e.directory,p.module);if(!await Y(D))continue;let F=n.get(D)??[];if(F.push(p.target),n.set(D,F),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[gr.ShouldRender]?.module){let w=B(e.directory,p.build_manifest.assets[gr.ShouldRender].module);if(await Y(w)){let S=n.get(w)??[];S.push(Sm(p.target)),n.set(w,S)}}}for await(let p of r.extension_points){let D=B(e.directory,p.module);if(!await Y(D))continue;let F=await Am(D,e.directory,{tsConfigCache:l}),w=await Df(D,{boundaryDirectory:e.directory,allowedFiles:F,alwaysAllowedFiles:new Set([ot(D)]),importCache:a,tsConfigCache:l});for(let v of w){let S=n.get(v)??[];S.push(p.target),n.set(v,S)}if(p.build_manifest.assets[gr.ShouldRender]?.module){let v=B(e.directory,p.build_manifest.assets[gr.ShouldRender].module);if(await Y(v)){let O=await Am(v,e.directory,{tsConfigCache:l}),P=await Df(v,{boundaryDirectory:e.directory,allowedFiles:O,alwaysAllowedFiles:new Set([ot(v)]),importCache:a,tsConfigCache:l});for(let I of P){let U=n.get(I)??[];U.push(Sm(p.target)),n.set(I,U)}}}}for await(let[p,D]of n.entries()){let g=await J2(p,e.directory);if(!g)continue;let F=B(g,"shopify.d.ts"),w=Bt(D),v=bm(w);try{let S=o.get(p),O="";if(S)try{let q=await u1(e.directory,S,Y2);q.status==="ok"?O=await Q2(q.data):q.status==="invalid"&&Nn(`Invalid tools definition in "${S}": ${q.issues}`)}catch(q){Nn(`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 ZU(e.directory,P);if(q.length>0)try{I=await Z2(q,{generatedTypesHelperImportPath:v})}catch(J){if(J instanceof k)throw J;Nn(`Failed to create intent type definition for intent schema files "${P.map(Q=>Q.schema).join(", ")}": ${J instanceof Error?J.message:"Unknown error"}`)}}let U=await K2({fullPath:p,typeFilePath:F,targets:w,apiVersion:r.api_version,toolsTypeDefinition:O,intentsTypeDefinition:I});if(U){let q=t.get(F)??new Set;U=await n1(U,{parser:"typescript",singleQuote:!0}),q.add(U),t.set(F,q)}}catch(S){if(r.extension_points.some(P=>B(e.directory,P.module)===p||P.build_manifest.assets[gr.ShouldRender]?.module&&B(e.directory,P.build_manifest.assets[gr.ShouldRender].module)===p))throw S}}}});function XU(e){return{...e,build_manifest:{...e.build_manifest,assets:Object.fromEntries(Object.entries(e.build_manifest.assets).map(([t,r])=>[t,{...r,filepath:B("dist",r.filepath)}]))}}}async function u1(e,t,r){let n=B(e,t);if(!await Y(n))return{status:"missing"};let s=await $e(n),a=r.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 ZU(e,t){let r=await Promise.all(t.map(async o=>{try{let s=await u1(e,o.schema,X2);return s.status==="missing"?(Nn(`Intent schema file "${o.schema}" was not found. Skipping intent type generation.`),null):s.status==="invalid"?(Nn(`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 Nn(`Failed to create intent type definition for intent schema file "${o.schema}": ${s instanceof Error?s.message:"Unknown error"}`),null}})),n=[];for(let o of r)o&&n.push(o);return n}async function QU(e,t,r,n){if(!t)return;let o=B(e,t);return await Y(o)?void 0:Se`Couldn't find ${Ae.path(o)}
|
|
299
|
+
Please check the ${n} path for ${r}`.value}async function ek(e,t,r){let n=[],o=[],s=[];if(!t||t.length===0)return ro(o1);for await(let a of t){let{module:l,target:p}=a,D=await QU(e,l,p,"module");D&&n.push(D),o.includes(p)?s.push(p):o.push(p)}return s.length&&n.push(`Duplicate targets found: ${s.join(", ")}
|
|
300
|
+
Extension point targets must be unique`),n.length?(n.push(`Please check the configuration in ${r}`),ro(n.join(`
|
|
301
|
+
|
|
302
|
+
`))):Bn({})}function i1(e){let t=e.api_version;if(!t)return!1;let{year:r,month:n}=aa(t)??{year:0,month:0};return r>2025||r===2025&&n>=10}function Sm(e){return e.replace(/\.render$/,".should-render")}function tk(e,t){let r=e.build_manifest.assets[gr.ShouldRender];if(r)return{identifier:gr.ShouldRender,outputFileName:r.filepath,content:t?`import shouldRender from '${r.module}';shopify.extend('${Sm(e.target)}', (...args) => shouldRender(...args));`:`import '${r.module}'`}}var s1=YU;d();var a1=1024,c1=128,rk=c1*a1,nk="@shopify/web-pixels-extension",ik=Ke.extend({runtime_context:E.string(),version:E.string().optional(),configuration:E.any(),customer_privacy:E.object({analytics:E.boolean(),preferences:E.boolean(),marketing:E.boolean(),sale_of_data:E.enum(["enabled","disabled","ldu"])}).optional(),settings:E.any()}),ok=Ie({identifier:"web_pixel_extension",dependency:nk,partnersWebIdentifier:"web_pixel",schema:ik,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 r=await Sc(t);if(r>rk){let n=`${(r/a1).toFixed(2)} kB`;throw new k(`Your web pixel extension exceeds the total file size limit (${c1} kB). It's currently ${n}.`,"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()}}),l1=ok;d();var uk=E.object({handle:E.string()}),sk=Ke.extend({name:E.string(),include:E.array(uk).optional(),includes:E.array(E.string()).optional(),type:E.literal("editor_extension_collection")}).transform(e=>{let t=e.includes?.map(n=>({handle:n}))??[],r=e.include??[];return{...e,inCollection:[...t,...r]}}),ak=Ie({identifier:"editor_extension_collection",schema:sk,appModuleFeatures:e=>[],deployConfig:async(e,t)=>({name:e.name,handle:e.handle,in_collection:e.inCollection,localization:await pn(t,e.name)})}),f1=ak;d();var ck="channel_config",p1="specifications",lk=["json","toml","yaml","yml","svg"],fk=dn({identifier:ck,uidStrategy:"single",experience:"extension",clientSteps:[{lifecycle:"deploy",steps:[{id:"copy-files",name:"Copy Files",type:"include_assets",config:{inclusions:[{type:"pattern",baseDir:p1,destination:p1,include:lk.map(e=>`**/*.${e}`)}]}}]}],appModuleFeatures:()=>[]}),d1=fk;d();var h1="icons",pk=["svg"],dk=dn({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:h1,destination:h1,include:pk.map(e=>`**/*.${e}`)}]}}]}],appModuleFeatures:()=>[]}),D1=dk;d();var hk=dn({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"]}),m1=hk;var g1=[T0,B0,N0,Fs,gl,wh,Eh,vh,P0];async function Su(){let e=(t,r)=>g1.indexOf(t.identifier)-g1.indexOf(r.identifier);return Dk().sort(e)}function Dk(){let e=[R0,O0,fv,I0,pv,gv,M0,A0,mv],t=[_v,yv,Tv,Bv,bv,Rv,Mv,Qv,eC,tC,rC,sC,s1,l1,f1,d1,D1,m1];return[...e,...t]}d();d();var ES=li(C8()),vS=li(hA()),CS=li(yS());async function If(e){let t=JSON.parse(e);return await vS.default.dereference(t,{resolve:{external:!1}}),t}function og(e,t){e==="strip"&&(t.additionalProperties=!0);let r=new ES.Ajv({allowUnionTypes:!0,allErrors:!0,verbose:!0});return r.addKeyword("x-taplo"),r.compile(t)}var FS=new Map;function wS(e,t,r,n){let o=(0,CS.default)(e),s=n??Tc(),a=FS.get(s)??og(r,t);FS.set(s,a),a(o);let l;if(a.errors&&a.errors.length>0)return l=MW(a.errors,o,t),{state:"error",data:void 0,errors:l,rawErrors:a.errors};if(r==="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 NW(e){return Array.isArray(e)?"array":e===null?"null":typeof e}function ya(e,t){return t.length===0?e:Ct(e,t)}function MW(e,t,r){return jW(e,t,r).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=ya(t,s);return{path:s,message:`Expected ${a}, received ${NW(l)}`}}if(o.keyword==="anyOf"||o.keyword==="oneOf")return{path:s,message:"Invalid input"};if(o.params.allowedValues){let a=o.params.allowedValues,l=ya(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=ya(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:Cy(`${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 jW(e,t,r){let n=e,o=new Set;for(;;){let s=n.filter(F=>(F.keyword==="oneOf"||F.keyword==="anyOf")&&!o.has(F.instancePath))[0];if(s===void 0)break;let a=n.filter(F=>!F.instancePath.startsWith(s.instancePath)),l=[s],p=s.schemaPath.replace("#/","").replace(/\//g,"."),D=Ct(r,p),g=ya(t,s.instancePath.split("/").slice(1));if(D!==void 0&&g!==void 0){let F=D.map(w=>{let v=og("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=ya(g,[I]);return og("fail",U)(q)?P+1:P},S)),[S,v.errors]}).sort(([w],[v])=>w-v);if(F.length>=2){let[w,v]=F[F.length-1],[S]=F[F.length-2];w!==S&&(l=[s,...v.map(O=>({...O,instancePath:s.instancePath+O.instancePath}))])}}n=[...a,...l],o.add(s.instancePath)}return n}var $W={type:{type:"string"},handle:{type:"string"},uid:{type:"string"},path:{type:"string"},extensions:{}};async function bS(e,t,r="strip"){let n=t?.jsonSchema;if(n===void 0||ms(JSON.parse(n)))return e.parseConfigurationObject;let o=await If(n);o.properties={...$W,...o.properties};let s=e.identifier;return l=>{let p=e.parseConfigurationObject(l),g=(p.state==="ok"?p.data:void 0)??l,F=wS(g,o,r,s),w=p.errors??[];F.state==="error"&&(w=w.concat(F.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:F.data,errors:void 0}}}async function Bf({developerPlatformClient:e,app:t}){let n=(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 Su();return[...await LW(o,n)]}async function LW(e,t){let r=t.map(async a=>{let l=e.find(g=>g.identifier===a.identifier);if(!l&&a.validationSchema?.jsonSchema&&(l=await kW(a,a.validationSchema)),!l)return;let p=UW(l,a),D=await bS(p,a.validationSchema,p.experience==="extension"?"fail":"strip");return{...p,parseConfigurationObject:D}}),n=fi(await Promise.all(r)),o=e.filter(a=>!n.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=>!n.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(", ")}`),n}function UW(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 kW(e,t){let n=(await If(t.jsonSchema)).properties?.localization!==void 0;return{...dn({identifier:e.identifier,uidStrategy:e.uidStrategy,experience:e.experience,appModuleFeatures:()=>n?["localization"]:[]}),loadedRemoteSpecs:!0}}async function Rf(e,t=!0){let{remoteApp:r,appDirectory:n,developerPlatformClient:o}=await qW(e),s=await Bf({developerPlatformClient:o,app:r}),a=r.flags,l=await zW(e,s,a,r.apiKey),p=await VW(r,e,{appDirectory:l.appDirectory??n});await yh(r,o.organizationSource);let D=await GW({configFileName:p,remoteApp:r,developerPlatformClient:o,specifications:s,flags:a,appDirectory:n,localAppOptions:l});return t&&JW(p,D.name,l.packageManager),{remoteApp:r,configFileName:p,configuration:D}}function AS(e){if($c()||e.length===0)return;let t=e.map(r=>`--${r}`).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 qW(e){let{creationOptions:t,appDirectory:r}=await WW(e),n=r??e.directory;if(e.apiKey){let a=await ml({apiKey:e.apiKey});if(!a){let l=uv(e.apiKey);throw new k(l.message,l.tryMessage)}return e.isNewApp&&(a.newApp=!0),{remoteApp:a,appDirectory:n,developerPlatformClient:a.developerPlatformClient}}e.organizationId||AS(["client-id"]);let o=await av({...t,directory:n,organizationId:e.organizationId}),s=o.developerPlatformClient;return{remoteApp:o,appDirectory:n,developerPlatformClient:s}}async function WW(e){try{let t=await jE({specifications:await Su(),directory:e.directory,userProvidedConfigName:e.configName,remoteFlags:void 0,skipPrompts:!0});return{creationOptions:t.creationDefaultOptions(),appDirectory:t.directory}}catch{return{creationOptions:HW(e.directory)}}}function HW(e){return{isLaunchable:!1,scopesArray:[],name:"",directory:e,isEmbedded:!1}}async function zW(e,t,r,n){let o=await $E({directory:e.directory,configName:e.configName,specifications:t,remoteFlags:r,skipPrompts:!0});switch(o.state){case"loaded-app":{let{app:s,configuration:a}=o;return a.client_id===n||e.isNewApp?{state:"reusable-current-app",scopes:Xd(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 VW(e,t,r){if(t.fileName){let a=yr(t.fileName),l=r.appDirectory??t.directory;if(!t.force&&await Y(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 yr(t.configName);let n=r.appDirectory??t.directory,o=await fl(n),s=o[e.apiKey];return s||(ms(o)?"shopify.app.toml":(AS(["file-name"]),gE(n,e.title)))}async function GW(e){let{remoteApp:t,developerPlatformClient:r,specifications:n,flags:o,configFileName:s,appDirectory:a,localAppOptions:l}=e,p=B(a,s),D=await WE(t,r,n,o);if(!D){let w=l.scopes;D=YW(t,w)}let g=(w,v)=>v,F={...fn({...l.existingConfig??{}},{client_id:t.apiKey,...D},g),build:KW({existingBuildOptions:l.existingBuildOptions,linkedAppAndClientIdFromFileAreInSync:l.localAppIdMatchedRemote,linkedAppWasNewlyCreated:!!t.newApp,defaultToUpdateUrlsOnDev:!0})};return delete F.scopes,await lv(F,p),ah(F,{configFileName:s,directory:a}),F}function KW(e){let{existingBuildOptions:t,linkedAppAndClientIdFromFileAreInSync:r,linkedAppWasNewlyCreated:n,defaultToUpdateUrlsOnDev:o}=e,s={...n?{include_config_on_deploy:!0}:{},...o&&n?{automatically_update_urls_on_dev:!0}:{},...r?t:{}};if(!ms(s))return s}function JW(e,t,r){gs({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:Lc(r,"shopify app deploy")}]],reference:[{link:{label:"App configuration",url:"https://shopify.dev/docs/apps/tools/cli/configuration"}}]})}function YW(e,t){return{...rH(e),...tH(e),...QW(e),...eH(t,e),...ZW(e),...XW(e)}}function XW(e){let t={application_url:e.applicationUrl?.replace(/\/$/,"")??"",embedded:e.embedded??!0};return e.preferencesUrl?{...t,app_preferences:{url:e.preferencesUrl}}:{...t}}function ZW(e){return e.appProxy?.url?{app_proxy:{url:e.appProxy.url,subpath:e.appProxy.subPath,prefix:e.appProxy.subPathPrefix}}:{}}function QW(e){let t=e.gdprWebhooks?.customerDataRequestUrl??e.gdprWebhooks?.customerDeletionUrl??e.gdprWebhooks?.shopDeletionUrl,r={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?r:{}}}}function eH(e,t){let r={};return t.requestedAccessScopes?r={scopes:t.requestedAccessScopes.join(",")}:e===""?r={use_legacy_install_flow:!0}:r={scopes:e,use_legacy_install_flow:!0},{auth:{redirect_urls:t.redirectUrlWhitelist??[]},access_scopes:r}}function tH(e){return{pos:{embedded:e.posEmbedded??!1}}}function rH(e){return{name:e.title}}d();d();async function SS(e){for(let t of e)await nH(t)}async function nH(e){if(!e.isUUIDStrategyExtension||e.configuration.uid)return;let t=await wt.read(e.configurationPath),r=Ct(t.content,"extensions");if(!("uid"in t.content)){if(r){let n=r.find(o=>o.handle===e.handle);if(n&&"uid"in n)return}if(r){let n=e.handle;await t.transformRaw(o=>{let s=new RegExp(`(\\n?(\\s*)handle\\s*=\\s*"${n}")`);return o.replace(s,`$1
|
|
303
|
+
$2uid = "${e.uid}"`)})}else await t.patch({uid:e.uid})}}function xS(e){let t=Rs(e);return Se`${Ae.errorText("Validation error")} in ${Ae.path(e.file)}:\n\n${t}`}async function Fce({directory:e,clientId:t,forceRelink:r,userProvidedConfigName:n,unsafeTolerateErrors:o=!1}){let s,a,l;if(r){let P=await Rf({directory:e,apiKey:t});l=P.remoteApp;let I=await $r(e,P.configFileName);s=I.project,a=I.activeConfig}else{let P=await $r(e,n);if(s=P.project,a=P.activeConfig,a.file.errors.length>0)throw new k(a.file.errors.map(I=>I.message).join(`
|
|
304
|
+
`));if(!a.isLinked){let I=await Rf({directory:e,apiKey:t,configName:Pe(a.file.path)});l=I.remoteApp;let U=await $r(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 Mr(`Active config at ${a.file.path} is marked as linked but has no client_id`);l??=await ml({apiKey:t??p});let g=l.developerPlatformClient,F=await zc(l.organizationId,g),w=await Bf({developerPlatformClient:g,app:l}),v=await eu({project:s,activeConfig:a,specifications:w,remoteFlags:l.flags,clientIdOverride:t});if(!o&&!v.errors.isEmpty())throw new k(xS(v.errors.getErrors()[0]));let S=pl(e),O=l.apiKey===v.configuration.client_id;return(!S||O)&&Qo({appId:l.apiKey,title:l.title,directory:e,orgId:l.organizationId}),await iH(l,F,r),v.errors.isEmpty()&&await SS(v.allExtensions),{project:s,activeConfig:a,app:v,remoteApp:l,developerPlatformClient:g,specifications:w,organization:F}}async function iH(e,t,r){let n;t.source===Jo.BusinessPlatform?n={business_platform_id:ps(t.id)}:n={partner_id:ps(t.id)},await mr.addPublicMetadata(()=>({...n,api_key:e.apiKey,cmd_app_reset_used:r}))}async function Ece({directory:e,userProvidedConfigName:t,skipPrompts:r=!1}){let{project:n,activeConfig:o}=await $r(e,t,{skipPrompts:r});if(o.file.errors.length>0)throw new k(o.file.errors.map(l=>l.message).join(`
|
|
305
|
+
`));let s=await Su(),a=await eu({project:n,activeConfig:o,specifications:s,ignoreUnknownExtensions:!0});if(!a.errors.isEmpty())throw new k(xS(a.errors.getErrors()[0]));return{app:a,project:n,activeConfig:o}}export{Bd as a,mH as b,oo as c,M8 as d,ws as e,eF as f,BH as g,oF as h,Xd as i,ft as j,yV as k,yr as l,Ps as m,jn as n,th as o,Dz as p,kF as q,oh as r,_E as s,pl as t,Qo as u,tJ as v,bE as w,rJ as x,nJ as y,iJ as z,Os as A,Jd as B,BE as C,lh as D,PY as E,sh as F,SE as G,Rs as H,pY as I,dY as J,hY as K,LE as L,hn as M,fl as N,BK as O,RK as P,NK as Q,yE as R,MK as S,FE as T,jK as U,EE as V,$K as W,WE as X,JY as Y,YY as Z,Dl as _,rv as $,iv as aa,lZ as ba,sv as ca,ml as da,OZ as ea,av as fa,vR as ga,TZ as ha,cv as ia,yh as ja,TQ as ka,vv as la,Ph as ma,Vee as na,Oh as oa,tte as pa,Th as qa,ste as ra,Ih as sa,dte as ta,Bh as ua,yte as va,Rh as wa,wte as xa,yoe as ya,r1 as za,ck as Aa,p1 as Ba,Bf as Ca,Rf as Da,HW as Ea,zW as Fa,GW as Ga,Fce as Ha,Ece as Ia};
|
|
306
|
+
/*! Bundled license information:
|
|
307
|
+
|
|
308
|
+
lodash/lodash.js:
|
|
309
|
+
(**
|
|
310
|
+
* @license
|
|
311
|
+
* Lodash <https://lodash.com/>
|
|
312
|
+
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
313
|
+
* Released under MIT license <https://lodash.com/license>
|
|
314
|
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
315
|
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
316
|
+
*)
|
|
317
|
+
*/
|