@shopify/cli 4.6.1 → 4.7.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-6LI5GLWS.js +1 -0
- package/dist/analytics-UNRIIG4Y.js +1 -0
- package/dist/bootstrap.js +1 -1
- package/dist/{chunk-LURVEPYP.js → chunk-2CYVZUYT.js} +1 -1
- package/dist/{chunk-BDDROQGK.js → chunk-2HK4MFWP.js} +3 -3
- package/dist/chunk-2JDCVEFK.js +1 -0
- package/dist/chunk-2SZOPJYI.js +1 -0
- package/dist/chunk-2U4P6UFZ.js +6 -0
- package/dist/{chunk-EVIO6OWW.js → chunk-2WJAAJVX.js} +1 -1
- package/dist/chunk-37TEEITE.js +2 -0
- package/dist/chunk-3K6VHXC2.js +4 -0
- package/dist/chunk-4HV6A6UH.js +8 -0
- package/dist/chunk-4JY2P2A5.js +1 -0
- package/dist/chunk-4LRG5YBS.js +3 -0
- package/dist/chunk-4W3UE2ZI.js +1 -0
- package/dist/chunk-5CADTCJE.js +25 -0
- package/dist/chunk-5CR5YJTU.js +11 -0
- package/dist/chunk-5CYJG63I.js +1 -0
- package/dist/chunk-5HBIIYSK.js +1 -0
- package/dist/chunk-5HPBQ6U5.js +1 -0
- package/dist/chunk-5NO5OXYP.js +15 -0
- package/dist/chunk-63CIFL36.js +6 -0
- package/dist/chunk-6EBLULOC.js +1 -0
- package/dist/{chunk-5QDM4XIK.js → chunk-6ENBE43F.js} +1 -1
- package/dist/chunk-6OFGSZD6.js +1 -0
- package/dist/chunk-6PDR2IUL.js +11 -0
- package/dist/chunk-6VGJVXZI.js +3 -0
- package/dist/{chunk-YHH3JA36.js → chunk-6VRXGEIW.js} +1 -1
- package/dist/chunk-6WZYX5RO.js +1 -0
- package/dist/chunk-7AALWJAO.js +7 -0
- package/dist/chunk-7DOWT5JZ.js +20 -0
- package/dist/chunk-7JIQXGDE.js +9 -0
- package/dist/chunk-7MHANY34.js +1 -0
- package/dist/chunk-7WTNEG2F.js +3 -0
- package/dist/chunk-7Y7AZRL3.js +10 -0
- package/dist/chunk-ACTDYTAV.js +317 -0
- package/dist/{chunk-Y2PC2BBJ.js → chunk-AEUCDGTB.js} +4 -4
- package/dist/chunk-AGOEROAI.js +10 -0
- package/dist/{chunk-DC7TXY4K.js → chunk-AH2ZGMDM.js} +1 -1
- package/dist/chunk-AMLWPYNA.js +4 -0
- package/dist/chunk-B4OMIONW.js +5 -0
- package/dist/chunk-BR6DBMQA.js +5 -0
- package/dist/chunk-CFWHR74L.js +1 -0
- package/dist/chunk-CHMEDVDZ.js +15 -0
- package/dist/chunk-CIH6LPTG.js +6 -0
- package/dist/chunk-CMYQXGLO.js +1 -0
- package/dist/chunk-CTRXLZAJ.js +1 -0
- package/dist/{chunk-NVQOAHID.js → chunk-CYOFLJ3Z.js} +1 -1
- package/dist/{chunk-P2P2MAZQ.js → chunk-CZJZCJRX.js} +1 -1
- package/dist/chunk-CZPGC2E7.js +1 -0
- package/dist/{chunk-UTK6V2NE.js → chunk-D2K2ZBKH.js} +8 -8
- package/dist/chunk-DHU57LKD.js +1 -0
- package/dist/chunk-DKL6N3L2.js +1 -0
- package/dist/chunk-DMXQLI35.js +1 -0
- package/dist/chunk-DPNZWBT5.js +1 -0
- package/dist/{chunk-LDWMX3KZ.js → chunk-DQCIORGH.js} +1 -1
- package/dist/chunk-DQFSKPKL.js +6 -0
- package/dist/{chunk-RMF3YNWE.js → chunk-E2W5OYYM.js} +1 -1
- package/dist/chunk-E5T4YRGW.js +1 -0
- package/dist/chunk-EOMCXBCS.js +5 -0
- package/dist/{chunk-GD5IRJBE.js → chunk-EW55WWT7.js} +1 -1
- package/dist/{chunk-7EE7YOCR.js → chunk-F5HCSUXC.js} +5 -5
- package/dist/{chunk-WOYI6SDK.js → chunk-FCGKO2KY.js} +1 -1
- package/dist/{chunk-J3D4KQOQ.js → chunk-FULWTZS6.js} +1 -1
- package/dist/chunk-FWPJEL6Q.js +3 -0
- package/dist/chunk-GKOBFX4A.js +1 -0
- package/dist/chunk-GLWQMLUC.js +1 -0
- package/dist/chunk-GMTNOCMS.js +375 -0
- package/dist/chunk-GSCWZR22.js +1 -0
- package/dist/chunk-GZ64KWHX.js +8 -0
- package/dist/{chunk-EZBB2ULE.js → chunk-H5KWM27L.js} +1 -1
- package/dist/chunk-HHVHVGRT.js +1 -0
- package/dist/{chunk-LXOBW4AW.js → chunk-HLNJL4B6.js} +1 -1
- package/dist/{chunk-U3P5TIIR.js → chunk-HZIX3DIT.js} +1 -1
- package/dist/chunk-I3N6NPHF.js +2 -0
- package/dist/chunk-JD5P5RAJ.js +1 -0
- package/dist/chunk-JJJTPEMD.js +1 -0
- package/dist/{chunk-KRZABRYT.js → chunk-JLGA3B7P.js} +1 -1
- package/dist/chunk-JQ2B3VHR.js +7 -0
- package/dist/{chunk-STCLJWHD.js → chunk-JQISGC7D.js} +1 -1
- package/dist/chunk-JQVXH26X.js +6 -0
- package/dist/{chunk-PCTVUTV3.js → chunk-JUKAWTYY.js} +1 -1
- package/dist/{chunk-XZ2KUBFJ.js → chunk-JZMRBJH3.js} +2 -2
- package/dist/chunk-JZXA3H5K.js +1 -0
- package/dist/chunk-K4KTNINH.js +1 -0
- package/dist/chunk-KCS75ZM4.js +1 -0
- package/dist/{chunk-WE3VLC2S.js → chunk-KIYHEMHD.js} +7 -7
- package/dist/chunk-KK24VGVE.js +6 -0
- package/dist/{chunk-7TXWKLPY.js → chunk-KOVAFUYN.js} +1 -1
- package/dist/{chunk-NENUUNWB.js → chunk-KUNDCAQN.js} +1 -1
- package/dist/{chunk-NKBSS7YL.js → chunk-L67BU25M.js} +1 -1
- package/dist/{chunk-6HQMZ324.js → chunk-LDF4PQ3B.js} +18 -18
- package/dist/chunk-LFOBYEWG.js +1 -0
- package/dist/chunk-LJM2DUXN.js +1 -0
- package/dist/{chunk-XWPPBOGF.js → chunk-LQ7ENG4V.js} +1 -1
- package/dist/chunk-LQCR4TGH.js +3 -0
- package/dist/{chunk-QARALFHD.js → chunk-LRQYUWWB.js} +1 -1
- package/dist/{chunk-YR7K4NQT.js → chunk-LWJA2DQG.js} +1 -1
- package/dist/{chunk-NKT5U6IJ.js → chunk-LZ3GZ7NS.js} +1 -1
- package/dist/chunk-MB7E5GEY.js +2 -0
- package/dist/{chunk-7MD5MIGN.js → chunk-MLZLDL6B.js} +8 -8
- package/dist/chunk-MRCWOOSF.js +8 -0
- package/dist/chunk-N6YTJXIS.js +18 -0
- package/dist/chunk-NEMPLS7C.js +1 -0
- package/dist/chunk-OE3F7XXU.js +4 -0
- package/dist/chunk-OORWOTAP.js +3 -0
- package/dist/chunk-OUZGGWFN.js +1 -0
- package/dist/chunk-P5MNNBSO.js +1 -0
- package/dist/chunk-PAAKBWSF.js +1 -0
- package/dist/{chunk-M5YGJYNI.js → chunk-PANGX7SA.js} +1 -1
- package/dist/{chunk-7L5AIZOP.js → chunk-PIFW2R3S.js} +1 -1
- package/dist/chunk-PWSI275S.js +7 -0
- package/dist/chunk-Q5DQGV3M.js +1 -0
- package/dist/chunk-QBIVQXUJ.js +6 -0
- package/dist/chunk-QEB3HUQE.js +19 -0
- package/dist/{chunk-C7LFLIRT.js → chunk-QKGZWOOY.js} +1 -1
- package/dist/chunk-QPWMD2VR.js +1 -0
- package/dist/chunk-QRT4A2RV.js +3 -0
- package/dist/chunk-QXHENYJH.js +2 -0
- package/dist/{chunk-GJEG7VGX.js → chunk-QZBSCOJV.js} +1 -1
- package/dist/chunk-R2R6JDNH.js +1 -0
- package/dist/chunk-RUFQCXBX.js +16 -0
- package/dist/chunk-RY2SJVWM.js +12 -0
- package/dist/chunk-RZFBGBNA.js +1 -0
- package/dist/chunk-S3P5WWJD.js +1 -0
- package/dist/chunk-SEVSMWNX.js +1 -0
- package/dist/chunk-SJMTETSU.js +32 -0
- package/dist/chunk-SSJGWLCW.js +28 -0
- package/dist/chunk-SYADOUBB.js +7 -0
- package/dist/chunk-T5JXQ7KO.js +1 -0
- package/dist/chunk-TCTVI6PK.js +1 -0
- package/dist/chunk-TSLQZTXR.js +1 -0
- package/dist/chunk-TTAPXLI5.js +1 -0
- package/dist/{chunk-MMP3F6LO.js → chunk-TY4W7AYX.js} +1 -1
- package/dist/chunk-TYIGOVRQ.js +3 -0
- package/dist/{chunk-W2357IN2.js → chunk-U2Z5NMXV.js} +1 -1
- package/dist/{chunk-X5RH4ALT.js → chunk-U6HYEGAE.js} +1 -1
- package/dist/chunk-U7R6LYPJ.js +5 -0
- package/dist/chunk-UPJLZHHR.js +4 -0
- package/dist/chunk-UVQL7RUY.js +1 -0
- package/dist/chunk-V2HCVJYF.js +1 -0
- package/dist/chunk-V5SC2RYQ.js +2 -0
- package/dist/chunk-VKSR6MJG.js +2 -0
- package/dist/chunk-VRVP2GQL.js +5 -0
- package/dist/{chunk-MY2H5XPY.js → chunk-WCRZJY3P.js} +1 -1
- package/dist/{chunk-LJZIIURR.js → chunk-WHLGNDRE.js} +1 -1
- package/dist/{chunk-HVMEBH24.js → chunk-WKUGSFTB.js} +3 -3
- package/dist/chunk-X4XP2RQJ.js +1 -0
- package/dist/chunk-XAOYKECS.js +1 -0
- package/dist/chunk-XCBEYRQI.js +3 -0
- package/dist/chunk-XHZ5BWXL.js +5 -0
- package/dist/{chunk-H5I7BSNG.js → chunk-XLURZ6GL.js} +52 -52
- package/dist/chunk-XRT2W5Y2.js +10 -0
- package/dist/chunk-XUEMMLXK.js +1 -0
- package/dist/chunk-Y34LWI3S.js +19 -0
- package/dist/chunk-YHPBDS52.js +16 -0
- package/dist/{chunk-5INBKZRD.js → chunk-YIZZ5LZN.js} +1 -1
- package/dist/chunk-YN6A26QL.js +836 -0
- package/dist/chunk-YOO7DLOT.js +1 -0
- package/dist/chunk-YUVE2I3C.js +1 -0
- package/dist/chunk-YY6TFARF.js +1 -0
- package/dist/chunk-Z5K4J7HQ.js +1 -0
- package/dist/chunk-ZCNIR6YU.js +1 -0
- package/dist/{chunk-K4M32VKU.js → chunk-ZO74GSWC.js} +1 -1
- package/dist/{chunk-FBVNXRVB.js → chunk-ZRLEAF7M.js} +1 -1
- package/dist/chunk-ZSFAURIH.js +3 -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-custom-data-definitions.js +1 -1
- package/dist/cli/commands/app/import-extensions.js +1 -1
- package/dist/cli/commands/app/info.js +1 -1
- package/dist/cli/commands/app/init.js +1 -1
- package/dist/cli/commands/app/logs.js +1 -1
- package/dist/cli/commands/app/release.js +1 -1
- package/dist/cli/commands/app/versions/list.js +1 -1
- package/dist/cli/commands/app/webhook/trigger.js +1 -1
- package/dist/cli/commands/auth/login.js +1 -1
- package/dist/cli/commands/auth/logout.js +1 -1
- package/dist/cli/commands/cache/clear.js +1 -1
- package/dist/cli/commands/config/autoupgrade/off.js +1 -1
- package/dist/cli/commands/config/autoupgrade/on.js +1 -1
- package/dist/cli/commands/config/autoupgrade/status.js +1 -1
- package/dist/cli/commands/debug/command-flags.js +1 -1
- package/dist/cli/commands/doc/fetch.js +1 -1
- package/dist/cli/commands/doc/search.js +1 -1
- package/dist/cli/commands/docs/generate.js +1 -1
- package/dist/cli/commands/doctor-release/doctor-release.js +1 -1
- package/dist/cli/commands/doctor-release/theme/index.js +1 -1
- package/dist/cli/commands/help.js +1 -1
- package/dist/cli/commands/kitchen-sink/async.js +1 -1
- package/dist/cli/commands/kitchen-sink/index.js +1 -1
- package/dist/cli/commands/kitchen-sink/prompts.js +1 -1
- package/dist/cli/commands/kitchen-sink/static.js +1 -1
- package/dist/cli/commands/notifications/generate.js +1 -1
- package/dist/cli/commands/notifications/list.js +1 -1
- package/dist/cli/commands/organization/list.js +1 -1
- package/dist/cli/commands/search.js +1 -1
- package/dist/cli/commands/send-analytics.d.ts +5 -0
- package/dist/cli/commands/send-analytics.js +1 -0
- package/dist/cli/commands/theme/check.js +1 -1
- package/dist/cli/commands/theme/console.js +1 -1
- package/dist/cli/commands/theme/delete.js +1 -1
- package/dist/cli/commands/theme/dev.js +1 -1
- package/dist/cli/commands/theme/duplicate.js +1 -1
- package/dist/cli/commands/theme/info.js +1 -1
- package/dist/cli/commands/theme/init.js +1 -1
- package/dist/cli/commands/theme/language-server.js +1 -1
- package/dist/cli/commands/theme/list.js +1 -1
- package/dist/cli/commands/theme/metafields/pull.js +1 -1
- package/dist/cli/commands/theme/open.js +1 -1
- package/dist/cli/commands/theme/package.js +1 -1
- package/dist/cli/commands/theme/preview.js +1 -1
- package/dist/cli/commands/theme/profile.js +1 -1
- package/dist/cli/commands/theme/publish.js +1 -1
- package/dist/cli/commands/theme/pull.js +1 -1
- package/dist/cli/commands/theme/push.js +1 -1
- package/dist/cli/commands/theme/rename.js +1 -1
- package/dist/cli/commands/theme/share.js +1 -1
- package/dist/cli/commands/upgrade.js +1 -1
- package/dist/cli/commands/version.js +1 -1
- package/dist/cli/help.js +1 -1
- package/dist/cli/services/doctor-release/theme/tests/init.js +4 -8
- package/dist/cli/services/doctor-release/theme/tests/push.js +3 -4
- package/dist/command-registry.js +1 -1
- package/dist/conf-store-OAGJBITE.js +1 -0
- package/dist/custom-oclif-loader-BWAMUFQ4.js +1 -0
- package/dist/deprecations-K3NPRKBF.js +1 -0
- package/dist/dist-EXJEE23W.js +1 -0
- package/dist/dist-S62Z6IFV.js +1 -0
- package/dist/environments-ALH2N36U.js +1 -0
- package/dist/error-YX56C43A.js +1 -0
- package/dist/error-handler-FDCH72NH.js +1 -0
- package/dist/fs-SKHQZZTQ.js +1 -0
- package/dist/hooks/did-you-mean.js +1 -1
- package/dist/hooks/hydrogen-init.js +1 -1
- package/dist/hooks/postrun.js +1 -1
- package/dist/hooks/prerun.js +2 -1
- package/dist/hooks/public-metadata.js +1 -1
- package/dist/hooks/sensitive-metadata.js +1 -1
- package/dist/hooks/tunnel-provider.js +1 -1
- package/dist/hooks/tunnel-start.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +15 -15
- package/dist/is-global-V5VORI3F.js +1 -0
- package/dist/lib-M72BVWQ3.js +1 -0
- package/dist/local-GX5AN6ZS.js +1 -0
- package/dist/metadata-XUJUTBTB.js +1 -0
- package/dist/{morph-ABSWZEVT.js → morph-77RHJICZ.js} +1 -1
- package/dist/node-package-manager-3WIYU7Y3.js +1 -0
- package/dist/notifications-system-RHULO564.js +1 -0
- package/dist/os-M6X7KOR4.js +1 -0
- package/dist/output-X47P6ICP.js +1 -0
- package/dist/{prettier-6ZMB2MMO.js → prettier-RVUAAWC7.js} +1 -1
- package/dist/system-SR5G7WEW.js +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui-VYWSLAQ6.js +1 -0
- package/dist/upgrade-PFQ7JMXG.js +1 -0
- package/dist/version-FK4ETQ22.js +1 -0
- package/dist/version-U4GM2LNG.js +1 -0
- package/dist/workerd-NAPS5TA7.js +18 -0
- package/oclif.manifest.json +146 -120
- package/package.json +7 -8
- package/dist/analytics-3ICKUTK2.js +0 -1
- package/dist/analytics-73NVZI4Z.js +0 -1
- package/dist/chunk-25Z36VJG.js +0 -1
- package/dist/chunk-2AVFG5KT.js +0 -1
- package/dist/chunk-2DMTEIS3.js +0 -2
- package/dist/chunk-2GB3EAD3.js +0 -153
- package/dist/chunk-2NB4P6BB.js +0 -5
- package/dist/chunk-2OYQHHKC.js +0 -3
- package/dist/chunk-2VJKXWLG.js +0 -4
- package/dist/chunk-3Q5ESVIY.js +0 -1
- package/dist/chunk-3XCIUG5P.js +0 -1
- package/dist/chunk-445NFHXL.js +0 -3
- package/dist/chunk-4BPFJDH3.js +0 -1
- package/dist/chunk-4E5RGEJO.js +0 -1
- package/dist/chunk-4IHSAT76.js +0 -2
- package/dist/chunk-4TANJ4JK.js +0 -1
- package/dist/chunk-534U3DKZ.js +0 -6
- package/dist/chunk-56T6YCU2.js +0 -1
- package/dist/chunk-5HJTCBBV.js +0 -317
- package/dist/chunk-5Q4WAGQL.js +0 -3
- package/dist/chunk-65CEF3SM.js +0 -8
- package/dist/chunk-6KAWCN3I.js +0 -10
- package/dist/chunk-6ZPHB5U2.js +0 -3
- package/dist/chunk-7AWKXTNS.js +0 -4
- package/dist/chunk-7US4TVO2.js +0 -32
- package/dist/chunk-A4SBXDZB.js +0 -14
- package/dist/chunk-A7IDVXF7.js +0 -1
- package/dist/chunk-AFM3UZQO.js +0 -684
- package/dist/chunk-AHLNB45E.js +0 -3
- package/dist/chunk-ARCAYYRW.js +0 -1
- package/dist/chunk-B3U6GDHL.js +0 -7
- package/dist/chunk-BCZMDFI2.js +0 -370
- package/dist/chunk-BKJMVAI7.js +0 -1
- package/dist/chunk-BPDUBZMU.js +0 -1
- package/dist/chunk-BQOKTPUU.js +0 -1
- package/dist/chunk-CELVG4AL.js +0 -6
- package/dist/chunk-CNI7ZUST.js +0 -3
- package/dist/chunk-CONJQV7M.js +0 -11
- package/dist/chunk-CV5ELBVU.js +0 -1
- package/dist/chunk-DXUISRMZ.js +0 -2
- package/dist/chunk-EHV7EKB3.js +0 -2
- package/dist/chunk-EJDWYASP.js +0 -1
- package/dist/chunk-EQNJ2NQD.js +0 -3
- package/dist/chunk-FG5QXIQH.js +0 -9
- package/dist/chunk-FGG6HXIZ.js +0 -1
- package/dist/chunk-FJCZ4F6J.js +0 -5
- package/dist/chunk-FKH5ZF2C.js +0 -1
- package/dist/chunk-GT6BJ2GK.js +0 -1
- package/dist/chunk-GWNV44NZ.js +0 -18
- package/dist/chunk-GXO2RRV2.js +0 -1
- package/dist/chunk-H5YC3EP6.js +0 -16
- package/dist/chunk-HY3INWPI.js +0 -1
- package/dist/chunk-I6ST5X56.js +0 -1
- package/dist/chunk-ID6ASBGV.js +0 -15
- package/dist/chunk-IDQT2UY7.js +0 -1
- package/dist/chunk-IIOFR25P.js +0 -3
- package/dist/chunk-IJEDTDSJ.js +0 -25
- package/dist/chunk-ILICQWUF.js +0 -1
- package/dist/chunk-IMWEC6NF.js +0 -16
- package/dist/chunk-ITNFDLZ4.js +0 -1
- package/dist/chunk-IU5U6KKO.js +0 -4
- package/dist/chunk-IXCDFXMB.js +0 -2
- package/dist/chunk-JRTJZAFJ.js +0 -19
- package/dist/chunk-JT7YTXJ7.js +0 -1
- package/dist/chunk-JX4HSDDG.js +0 -28
- package/dist/chunk-K5GJNXDK.js +0 -1
- package/dist/chunk-KCNOFNS5.js +0 -11
- package/dist/chunk-KM2R6O7V.js +0 -6
- package/dist/chunk-KNFDN3AP.js +0 -1
- package/dist/chunk-LEDVV6XK.js +0 -1
- package/dist/chunk-LEEVJH4B.js +0 -1
- package/dist/chunk-MDQHEW7V.js +0 -8
- package/dist/chunk-MPYCIVRA.js +0 -7
- package/dist/chunk-N4RYVOXT.js +0 -2
- package/dist/chunk-NB6HHZ36.js +0 -1
- package/dist/chunk-NEK2KNKR.js +0 -8
- package/dist/chunk-NJONAV7V.js +0 -1
- package/dist/chunk-OHQTOHUX.js +0 -15
- package/dist/chunk-PKR6HS4T.js +0 -6
- package/dist/chunk-PKRDBS7O.js +0 -5
- package/dist/chunk-PMD6S7YG.js +0 -1
- package/dist/chunk-PUOCHFFI.js +0 -1
- package/dist/chunk-Q2DPBMV4.js +0 -1
- package/dist/chunk-Q6XT3YKV.js +0 -3
- package/dist/chunk-QEL3F2NY.js +0 -5
- package/dist/chunk-R2W5B7YI.js +0 -3
- package/dist/chunk-REABQXMP.js +0 -1
- package/dist/chunk-RTPVI7LE.js +0 -3
- package/dist/chunk-SFZQFEZB.js +0 -6
- package/dist/chunk-STJ3LWFL.js +0 -1
- package/dist/chunk-STJWHL36.js +0 -7
- package/dist/chunk-SZJHOXS6.js +0 -6
- package/dist/chunk-TEPMNVJN.js +0 -1
- package/dist/chunk-TNSMROUR.js +0 -1
- package/dist/chunk-UDDJQ34Y.js +0 -1
- package/dist/chunk-UKQ7NE5V.js +0 -1
- package/dist/chunk-UOQBCBKY.js +0 -1
- package/dist/chunk-UQWT2PFO.js +0 -1
- package/dist/chunk-V26QBVCN.js +0 -1
- package/dist/chunk-VVEQ4IHW.js +0 -1
- package/dist/chunk-VXBHTSMX.js +0 -20
- package/dist/chunk-WDCCITSG.js +0 -1
- package/dist/chunk-WGMYSPR2.js +0 -10
- package/dist/chunk-WHT2RCAD.js +0 -11
- package/dist/chunk-WW7TENNA.js +0 -1
- package/dist/chunk-WXJGZGQS.js +0 -1
- package/dist/chunk-X4AZV5A2.js +0 -1
- package/dist/chunk-XBBP5BWC.js +0 -7
- package/dist/chunk-XH32NPYG.js +0 -1
- package/dist/chunk-Y7A7Z2V3.js +0 -1
- package/dist/chunk-YE7XCF44.js +0 -1
- package/dist/chunk-YIFT67BD.js +0 -4
- package/dist/chunk-Z36JS7OX.js +0 -6
- package/dist/chunk-ZHPPBTNE.js +0 -28
- package/dist/chunk-ZMSE5SQB.js +0 -1
- package/dist/conf-store-YW3NWYCN.js +0 -1
- package/dist/custom-oclif-loader-4ZAXX5MR.js +0 -1
- package/dist/deprecations-VW7UIMZX.js +0 -1
- package/dist/dist-I3VCRVOE.js +0 -1
- package/dist/dist-MP4AU5F4.js +0 -1
- package/dist/environments-5P57CTOG.js +0 -1
- package/dist/error-U7DOQOWG.js +0 -1
- package/dist/error-handler-AOEXPYI7.js +0 -1
- package/dist/fs-K5NT4W2Q.js +0 -1
- package/dist/hooks/app-init.d.ts +0 -9
- package/dist/hooks/app-init.js +0 -1
- package/dist/is-global-CFYYUAIJ.js +0 -1
- package/dist/is-wsl-UEMXYJPN.js +0 -1
- package/dist/lib-JKLF33A7.js +0 -1
- package/dist/local-BRRQOCGY.js +0 -1
- package/dist/local-storage-FVSI2IBZ.js +0 -1
- package/dist/metadata-HVSGVFUQ.js +0 -1
- package/dist/node-package-manager-6JURLQKU.js +0 -1
- package/dist/notifications-system-BTEFKXCS.js +0 -1
- package/dist/output-EXMTVS2V.js +0 -1
- package/dist/system-DUJDILSL.js +0 -1
- package/dist/ui-AX6ZMY6P.js +0 -1
- package/dist/upgrade-5TEVQNLY.js +0 -1
- package/dist/version-7LKOAVDW.js +0 -1
- package/dist/version-PRFBZAWQ.js +0 -1
- package/dist/workerd-MFV7EBVM.js +0 -18
- /package/dist/{chunk-VDN6MEYI.js → chunk-NJPL5BTN.js} +0 -0
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
import{a as D0,b as h0}from"./chunk-LWJA2DQG.js";import{b as d0,o as CB}from"./chunk-NJPL5BTN.js";import{a as vB}from"./chunk-VJEKDBGZ.js";import{a as p0}from"./chunk-MB7E5GEY.js";import{$ as I0,A as Lc,B as gr,C as Te,D as di,E as Di,F as no,G as hi,H as _s,I as F0,J as Uc,K as E0,L as v0,M as kc,N as Vo,O as C0,P as w0,Q as b0,R as A0,S as S0,T as x0,U as P0,V as O0,X as T0,Y as Pd,Z as B0,aa as qc,c as f0,e as bd,f as jr,g as Wo,k as Nc,l as jc,m as Ad,n as Sd,p as $c,q as m0,r as pi,s as g0,t as xd,u as _0,v as Je,w as Ho,x as zo,y as y0,z as pn}from"./chunk-F5HCSUXC.js";import{aa as EB}from"./chunk-PIFW2R3S.js";import{a as l0}from"./chunk-CTRXLZAJ.js";import{b as gs,c as Ct}from"./chunk-KIYHEMHD.js";import{a as zy,b as Vy}from"./chunk-LRQYUWWB.js";import{a as c0}from"./chunk-QRT4A2RV.js";import{a as mr}from"./chunk-U6HYEGAE.js";import{$ as ky,C as Ry,L as jy,M as $y,O as Fd,R as Ly,X as mB,Y as Uy,Z as gB,_ as _B,a as ds,aa as yB,ba as fn,c as Sc,ca as Pc,d as xc,ea as qy,fa as vt,h as Oy,ha as Ds,ia as Wy,j as DB,m as li,ma as Hy,q as Ty,s as By,u as F,w as Iy}from"./chunk-YN6A26QL.js";import{m as Oc,n as Jy,s as Gy,t as Yy,w as Tc,x as Bc}from"./chunk-KK24VGVE.js";import{d as hB,e as My,q as Ny}from"./chunk-AGOEROAI.js";import{A as Ic,B as Zy,D as Qy,E as Mr,F as vd,H as e0,J as ms,K as t0,M as r0,S as fi,V as Rc,y as ro,z as hs}from"./chunk-GMTNOCMS.js";import{a as FB}from"./chunk-5HBIIYSK.js";import{a as hd}from"./chunk-5CYJG63I.js";import{f as Ed}from"./chunk-JQISGC7D.js";import{a as Bn,b as to}from"./chunk-TTAPXLI5.js";import{h as k,j as In,k as Nr}from"./chunk-R2R6JDNH.js";import{$a as ln,Ab as ce,Ba as wy,Bb as Rn,Db as s0,Ea as ci,Eb as a0,Fa as by,Ga as Cc,Ka as Ay,L as Qi,La as Sy,N as Bt,Oa as wc,Pa as xy,Q as pB,R as dB,T as Fy,Ta as X,Ua as Ut,V as ls,Wa as Ve,X as Lt,Xa as Py,Y as _d,_ as yd,aa as Ec,b as oB,bb as bc,c as uB,da as Ey,db as Ac,ea as qo,f as sB,gb as Ky,ha as vy,i as aB,k as cB,ka as fs,m as gy,ma as $e,n as _y,na as eo,oa as ps,pa as Ir,q as lB,qa as vc,qb as Ae,rb as Mc,sb as Se,u as yy,ua as mt,v as fB,va as Cy,w as gd,wa as Rr,xb as o0,zb as u0}from"./chunk-Y34LWI3S.js";import{b as nB,c as iB,e as hy,f as my,i as Xy}from"./chunk-B4OMIONW.js";import{f as n0,k as Cd,l as wd,m as i0}from"./chunk-XAOYKECS.js";import{a as cs}from"./chunk-JD5P5RAJ.js";import{d as I,e as Zi,f as ot,g as Oe,h as fy,i as he,j as Re,k as yc,l as py,n as Fc,o as dy,s as Dy,t as md}from"./chunk-773TIA5M.js";import{a as ze,c as M,e as ai,f as rB,g as d}from"./chunk-VKWPEFWQ.js";var nF=M((Hc,rF)=>{d();(function(e,t){typeof Hc=="object"&&typeof rF<"u"?t(Hc,(dB(),rB(pB)),DB()):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))})(Hc,(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 m(q){var G=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),G.has(We)||(G.add(We),Q.push(fe))}else Q.push(fe)}),t.__assign(t.__assign({},q),{definitions:Q})}function g(q){var G=new Set(q.definitions);G.forEach(function(fe){fe.loc&&delete fe.loc,Object.keys(fe).forEach(function(ye){var We=fe[ye];We&&typeof We=="object"&&G.add(We)})});var Q=q.loc;return Q&&(delete Q.startToken,delete Q.endToken),q}function E(q){var G=l(q);if(!n.has(G)){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(G,g(m(Q)))}return n.get(G)}function w(q){for(var G=[],Q=1;Q<arguments.length;Q++)G[Q-1]=arguments[Q];typeof q=="string"&&(q=[q]);var fe=q[0];return G.forEach(function(ye,We){ye&&ye.kind==="Document"?fe+=ye.loc.source.body:fe+=ye,fe+=q[We+1]}),E(fe)}function v(){n.clear(),o.clear()}function x(){s=!1}function O(){a=!0}function P(){a=!1}var B={gql:w,resetCaches:v,disableFragmentWarnings:x,enableExperimentalFragmentVariables:O,disableExperimentalFragmentVariables:P};(function(q){q.gql=B.gql,q.resetCaches=B.resetCaches,q.disableFragmentWarnings=B.disableFragmentWarnings,q.enableExperimentalFragmentVariables=B.enableExperimentalFragmentVariables,q.disableExperimentalFragmentVariables=B.disableExperimentalFragmentVariables})(w||(w={})),w.default=w;var U=w;e.default=U,e.disableExperimentalFragmentVariables=P,e.disableFragmentWarnings=x,e.enableExperimentalFragmentVariables=O,e.gql=w,e.resetCaches=v,Object.defineProperty(e,"__esModule",{value:!0})}))});var oF=M((MH,iF)=>{d();iF.exports=nF().gql});var dF=M(pF=>{d();var qB=Object.create,zc=Object.defineProperty,WB=Object.getPrototypeOf,HB=Object.prototype.hasOwnProperty,zB=Object.getOwnPropertyNames,VB=Object.getOwnPropertyDescriptor,sF=e=>zc(e,"__esModule",{value:!0}),KB=(e,t)=>{sF(e);for(var r in t)zc(e,r,{get:t[r],enumerable:!0})},JB=(e,t,r)=>{if(sF(e),t&&typeof t=="object"||typeof t=="function")for(let n of zB(t))!HB.call(e,n)&&n!=="default"&&zc(e,n,{get:()=>t[n],enumerable:!(r=VB(t,n))||r.enumerable});return e},Vc=e=>e&&e.__esModule?e:JB(zc(e!=null?qB(WB(e)):{},"default",{value:e,enumerable:!0}),e);KB(pF,{default:()=>nI,generateContentsFromGraphqlString:()=>fF,generateGraphQLString:()=>cF});var GB=Vc(ze("fs")),YB=Vc(oF()),XB=Vc(ze("readline")),uF=Vc(ze("path")),aF=(e,t)=>{let r=t?t(e):e;return JSON.stringify(r,(n,o)=>o===void 0?"__undefined":o).replace(/"__undefined"/g,"undefined")},ZB=(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},QB=e=>new Promise(t=>{let r=XB.default.createInterface({input:GB.default.createReadStream(e)}),n="",o=[],s=!1,a=(l,p)=>{let m=p.replace(l,""),g=m.replace(/"|'/g,""),E=uF.default.join(uF.default.dirname(e),g);o.push({absolutePath:E,relativePath:m})};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})})}),cF=e=>{let t={},r=[],n=new Set,o=s=>t[s]?Promise.resolve(null):new Promise(a=>{QB(s).then(l=>{t[l.filePath]=l,l.imports.forEach(m=>{n.has(m.absolutePath)||(n.add(m.absolutePath),r.push(o(m.absolutePath)))});let p=r.shift();return p?p.then(a):a(null)})});return o(e).then(()=>ZB(Object.values(t),t).reduce((l,p)=>p.body+`
|
|
6
|
+
|
|
7
|
+
`+l,""))},eI=(e,t,r)=>{let n={kind:"Document",definitions:[e,...t]};return aF(n,r)},tI=e=>((r,n)=>(r.forEach(o=>{o.kind==="FragmentDefinition"&&(n[o.name.value]=o)}),n))(e.definitions,{}),lF=(e,t)=>{let r=[],n=o=>{if(o.kind==="FragmentSpread"){let s=t[o.name.value],a=lF(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},fF=(e,t)=>{let r=YB.default(e),n=aF(r,t),o=tI(r),s=r.definitions.reduce((a,l)=>{if(l.kind==="OperationDefinition"&&l.name&&l.name.value){let p=l.name.value,g=lF(l,o).map(w=>{let v=o[w];if(!v)throw new Error(`Expected to find fragment definition for ${w}`);return v}),E=eI(l,g,t);a.push(`export const ${p} = ${E};`)}return a},[`const documentNode = ${n};`]);return s.push("export default documentNode;"),s.join(`
|
|
8
|
+
`)},rI=(e={})=>({name:"graphql-loader",setup(t){t.onLoad({filter:e.filterRegex||/\.graphql$|\.gql$/},r=>cF(r.path).then(n=>({contents:fF(n,e.mapDocumentNode)})))}}),nI=rI});var _F=M((nz,gF)=>{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))}gF.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 yF=M(oo=>{d();var fI=_F();oo.operation=function(e){var t=oo.timeouts(e);return new fI(t,{forever:e&&e.forever,unref:e&&e.unref,maxRetryTime:e&&e.maxRetryTime})};oo.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};oo.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};oo.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 m=oo.operation(t),g=Array.prototype.slice.call(arguments,1),E=g.pop();g.push(function(w){m.retry(w)||(w&&(arguments[0]=m.mainError()),E.apply(this,arguments))}),m.attempt(function(){p.apply(e,g)})}.bind(e,a),e[s].options=t}}});var EF=M((sz,FF)=>{d();FF.exports=yF()});var CF=M((cz,Ud)=>{"use strict";d();var vF=Symbol();function pI(e,t,r){let n=t[vF];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,vF,{value:p}),r(null,l.mtime,p)})})}function dI(e){let t=Date.now();return e==="s"&&(t=Math.ceil(t/1e3)*1e3),new Date(t)}Ud.exports.probe=pI;Ud.exports.getMtime=dI});var xF=M((fz,bs)=>{"use strict";d();var DI=ze("path"),Wd=vy(),hI=EF(),mI=FB(),wF=CF(),Mn={};function ws(e,t){return t.lockfilePath||`${e}.lock`}function Hd(e,t,r){if(!t.realpath)return r(null,DI.resolve(e));t.fs.realpath(e,r)}function qd(e,t,r){let n=ws(e,t);t.fs.mkdir(n,o=>{if(!o)return wF.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"?qd(e,{...t,stale:0},r):r(s);if(!bF(a,t))return r(Object.assign(new Error("Lock file is already being held"),{code:"ELOCKED",file:e}));AF(e,t,l=>{if(l)return r(l);qd(e,{...t,stale:0},r)})})})}function bF(e,t){return e.mtime.getTime()<Date.now()-t.stale}function AF(e,t,r){t.fs.rmdir(ws(e,t),n=>{if(n&&n.code!=="ENOENT")return r(n);r()})}function Jc(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?kd(e,r,Object.assign(n,{code:"ECOMPROMISED"})):(r.updateDelay=1e3,Jc(e,t));if(!(r.mtime.getTime()===o.mtime.getTime()))return kd(e,r,Object.assign(new Error("Unable to update lock within the stale threshold"),{code:"ECOMPROMISED"}));let l=wF.getMtime(r.mtimePrecision);t.fs.utimes(r.lockfilePath,l,l,p=>{let m=r.lastUpdate+t.stale<Date.now();if(!r.released){if(p)return p.code==="ENOENT"||m?kd(e,r,Object.assign(p,{code:"ECOMPROMISED"})):(r.updateDelay=1e3,Jc(e,t));r.mtime=l,r.lastUpdate=Date.now(),r.updateDelay=null,Jc(e,t)}})})},r.updateDelay),r.updateTimeout.unref&&r.updateTimeout.unref())}function kd(e,t,r){t.released=!0,t.updateTimeout&&clearTimeout(t.updateTimeout),Mn[e]===t&&delete Mn[e],t.options.onCompromised(r)}function gI(e,t,r){t={stale:1e4,update:null,realpath:!0,retries:0,fs:Wd,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),Hd(e,t,(n,o)=>{if(n)return r(n);let s=hI.operation(t.retries);s.attempt(()=>{qd(o,t,(a,l,p)=>{if(s.retry(a))return;if(a)return r(s.mainError());let m=Mn[o]={lockfilePath:ws(o,t),mtime:l,mtimePrecision:p,options:t,lastUpdate:Date.now()};Jc(o,t),r(null,g=>{if(m.released)return g&&g(Object.assign(new Error("Lock is already released"),{code:"ERELEASED"}));SF(o,{...t,realpath:!1},g)})})})})}function SF(e,t,r){t={fs:Wd,realpath:!0,...t},Hd(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],AF(o,t,r)})}function _I(e,t,r){t={stale:1e4,realpath:!0,fs:Wd,...t},t.stale=Math.max(t.stale||0,2e3),Hd(e,t,(n,o)=>{if(n)return r(n);t.fs.stat(ws(o,t),(s,a)=>s?s.code==="ENOENT"?r(null,!1):r(s):r(null,!bF(a,t)))})}function yI(){return Mn}mI(()=>{for(let e in Mn){let t=Mn[e].options;try{t.fs.rmdirSync(ws(e,t))}catch{}}});bs.exports.lock=gI;bs.exports.unlock=SF;bs.exports.check=_I;bs.exports.getLocks=yI});var OF=M((dz,PF)=>{"use strict";d();var FI=vy();function EI(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 vI(e){return(...t)=>new Promise((r,n)=>{t.push((o,s)=>{o?n(o):r(s)}),e(...t)})}function CI(e){return(...t)=>{let r,n;if(t.push((o,s)=>{r=o,n=s}),e(...t),r)throw r;return n}}function wI(e){if(e={...e},e.fs=EI(e.fs||FI),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}PF.exports={toPromise:vI,toSync:CI,toSyncOptions:wI}});var BF=M((hz,mi)=>{"use strict";d();var Ko=xF(),{toPromise:Gc,toSync:Yc,toSyncOptions:zd}=OF();async function TF(e,t){let r=await Gc(Ko.lock)(e,t);return Gc(r)}function bI(e,t){let r=Yc(Ko.lock)(e,zd(t));return Yc(r)}function AI(e,t){return Gc(Ko.unlock)(e,t)}function SI(e,t){return Yc(Ko.unlock)(e,zd(t))}function xI(e,t){return Gc(Ko.check)(e,t)}function PI(e,t){return Yc(Ko.check)(e,zd(t))}mi.exports=TF;mi.exports.lock=TF;mi.exports.unlock=AI;mi.exports.lockSync=bI;mi.exports.unlockSync=SI;mi.exports.check=xI;mi.exports.checkSync=PI});var Nn=M((ru,Is)=>{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__",m=1,g=2,E=4,w=1,v=2,x=1,O=2,P=4,B=8,U=16,q=32,G=64,Q=128,fe=256,ye=512,We=30,gt="...",tn=800,dt=16,Sr=1,or=2,ma=3,yn=1/0,rn=9007199254740991,Fn=17976931348623157e292,wo=NaN,ur=4294967295,Bf=ur-1,Kn=ur>>>1,ga=[["ary",Q],["bind",x],["bindKey",O],["curry",B],["curryRight",U],["flip",ye],["partial",q],["partialRight",G],["rearg",fe]],Jn="[object Arguments]",Gn="[object Array]",bo="[object AsyncFunction]",En="[object Boolean]",Bi="[object Date]",If="[object DOMException]",Ii="[object Error]",Ao="[object Function]",_a="[object GeneratorFunction]",zt="[object Map]",Yn="[object Number]",Ri="[object Null]",xr="[object Object]",ya="[object Promise]",Rf="[object Proxy]",Mi="[object RegExp]",Vt="[object Set]",Ni="[object String]",St="[object Symbol]",Fa="[object Undefined]",ji="[object WeakMap]",Mf="[object WeakSet]",nn="[object ArrayBuffer]",Kt="[object DataView]",Tu="[object Float32Array]",Bu="[object Float64Array]",Iu="[object Int8Array]",Ru="[object Int16Array]",$i="[object Int32Array]",Mu="[object Uint8Array]",Nu="[object Uint8ClampedArray]",So="[object Uint16Array]",ju="[object Uint32Array]",Nf=/\b__p \+= '';/g,jf=/\b(__p \+=) '' \+/g,Ea=/(__e\(.*?\)|\b__t\)) \+\n'';/g,va=/&(?:amp|lt|gt|quot|#39);/g,Ca=/[&<>"']/g,$f=RegExp(va.source),$u=RegExp(Ca.source),Lf=/<%-([\s\S]+?)%>/g,wa=/<%([\s\S]+?)%>/g,Lu=/<%=([\s\S]+?)%>/g,Uf=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,kf=/^\w*$/,qf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Uu=/[\\^$.*+?()[\]{}|]/g,Wf=RegExp(Uu.source),ku=/^\s+/,Hf=/\s/,zf=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Vf=/\{\n\/\* \[wrapped with (.+)\] \*/,Kf=/,? & /,Jf=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Gf=/[()=,{}\[\]\/\s]/,Yf=/\\(\\)?/g,Xf=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ba=/\w*$/,Zf=/^[-+]0x[0-9a-f]+$/i,Qf=/^0b[01]+$/i,ep=/^\[object .+?Constructor\]$/,tp=/^0o[0-7]+$/i,rp=/^(?:0|[1-9]\d*)$/,Aa=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Li=/($^)/,Sa=/['\n\r\u2028\u2029\\]/g,Ui="\\ud800-\\udfff",xa="\\u0300-\\u036f",np="\\ufe20-\\ufe2f",ip="\\u20d0-\\u20ff",qu=xa+np+ip,Wu="\\u2700-\\u27bf",Pa="a-z\\xdf-\\xf6\\xf8-\\xff",op="\\xac\\xb1\\xd7\\xf7",up="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Oa="\\u2000-\\u206f",_t=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Jt="A-Z\\xc0-\\xd6\\xd8-\\xde",xo="\\ufe0e\\ufe0f",ki=op+up+Oa+_t,Hu="['\u2019]",sp="["+Ui+"]",Ta="["+ki+"]",Po="["+qu+"]",D="\\d+",R="["+Wu+"]",W="["+Pa+"]",z="[^"+Ui+ki+D+Wu+Pa+Jt+"]",ie="\\ud83c[\\udffb-\\udfff]",K="(?:"+Po+"|"+ie+")",Y="[^"+Ui+"]",ge="(?:\\ud83c[\\udde6-\\uddff]){2}",ke="[\\ud800-\\udbff][\\udc00-\\udfff]",Ce="["+Jt+"]",rt="\\u200d",Be="(?:"+W+"|"+z+")",on="(?:"+Ce+"|"+z+")",st="(?:"+Hu+"(?:d|ll|m|re|s|t|ve))?",Me="(?:"+Hu+"(?:D|LL|M|RE|S|T|VE))?",xt=K+"?",zu="["+xo+"]?",Ba="(?:"+rt+"(?:"+[Y,ge,ke].join("|")+")"+zu+xt+")*",Fe="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Dt="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",ne=zu+xt+Ba,at="(?:"+[R,ge,ke].join("|")+")"+ne,yt="(?:"+[Y+Po+"?",Po,ge,ke,sp].join("|")+")",vn=RegExp(Hu,"g"),Xn=RegExp(Po,"g"),sr=RegExp(ie+"(?="+ie+")|"+yt+ne,"g"),qi=RegExp([Ce+"?"+W+"+"+st+"(?="+[Ta,Ce,"$"].join("|")+")",on+"+"+Me+"(?="+[Ta,Ce+Be,"$"].join("|")+")",Ce+"?"+Be+"+"+st,Ce+"+"+Me,Dt,Fe,D,at].join("|"),"g"),un=RegExp("["+rt+Ui+qu+xo+"]"),Vu=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ku=["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"],Ia=-1,xe={};xe[Tu]=xe[Bu]=xe[Iu]=xe[Ru]=xe[$i]=xe[Mu]=xe[Nu]=xe[So]=xe[ju]=!0,xe[Jn]=xe[Gn]=xe[nn]=xe[En]=xe[Kt]=xe[Bi]=xe[Ii]=xe[Ao]=xe[zt]=xe[Yn]=xe[xr]=xe[Mi]=xe[Vt]=xe[Ni]=xe[ji]=!1;var Pe={};Pe[Jn]=Pe[Gn]=Pe[nn]=Pe[Kt]=Pe[En]=Pe[Bi]=Pe[Tu]=Pe[Bu]=Pe[Iu]=Pe[Ru]=Pe[$i]=Pe[zt]=Pe[Yn]=Pe[xr]=Pe[Mi]=Pe[Vt]=Pe[Ni]=Pe[St]=Pe[Mu]=Pe[Nu]=Pe[So]=Pe[ju]=!0,Pe[Ii]=Pe[Ao]=Pe[ji]=!1;var ap={\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"},ng={"&":"&","<":"<",">":">",'"':""","'":"'"},cp={"&":"&","<":"<",">":">",""":'"',"'":"'"},ES={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},vS=parseFloat,CS=parseInt,ig=typeof global=="object"&&global&&global.Object===Object&&global,wS=typeof self=="object"&&self&&self.Object===Object&&self,ct=ig||wS||Function("return this")(),lp=typeof ru=="object"&&ru&&!ru.nodeType&&ru,Wi=lp&&typeof Is=="object"&&Is&&!Is.nodeType&&Is,og=Wi&&Wi.exports===lp,fp=og&&ig.process,ar=(function(){try{var A=Wi&&Wi.require&&Wi.require("util").types;return A||fp&&fp.binding&&fp.binding("util")}catch{}})(),ug=ar&&ar.isArrayBuffer,sg=ar&&ar.isDate,ag=ar&&ar.isMap,cg=ar&&ar.isRegExp,lg=ar&&ar.isSet,fg=ar&&ar.isTypedArray;function Gt(A,N,T){switch(T.length){case 0:return A.call(N);case 1:return A.call(N,T[0]);case 2:return A.call(N,T[0],T[1]);case 3:return A.call(N,T[0],T[1],T[2])}return A.apply(N,T)}function bS(A,N,T,V){for(var se=-1,ve=A==null?0:A.length;++se<ve;){var nt=A[se];N(V,nt,T(nt),A)}return V}function cr(A,N){for(var T=-1,V=A==null?0:A.length;++T<V&&N(A[T],T,A)!==!1;);return A}function AS(A,N){for(var T=A==null?0:A.length;T--&&N(A[T],T,A)!==!1;);return A}function pg(A,N){for(var T=-1,V=A==null?0:A.length;++T<V;)if(!N(A[T],T,A))return!1;return!0}function Zn(A,N){for(var T=-1,V=A==null?0:A.length,se=0,ve=[];++T<V;){var nt=A[T];N(nt,T,A)&&(ve[se++]=nt)}return ve}function Ra(A,N){var T=A==null?0:A.length;return!!T&&Oo(A,N,0)>-1}function pp(A,N,T){for(var V=-1,se=A==null?0:A.length;++V<se;)if(T(N,A[V]))return!0;return!1}function qe(A,N){for(var T=-1,V=A==null?0:A.length,se=Array(V);++T<V;)se[T]=N(A[T],T,A);return se}function Qn(A,N){for(var T=-1,V=N.length,se=A.length;++T<V;)A[se+T]=N[T];return A}function dp(A,N,T,V){var se=-1,ve=A==null?0:A.length;for(V&&ve&&(T=A[++se]);++se<ve;)T=N(T,A[se],se,A);return T}function SS(A,N,T,V){var se=A==null?0:A.length;for(V&&se&&(T=A[--se]);se--;)T=N(T,A[se],se,A);return T}function Dp(A,N){for(var T=-1,V=A==null?0:A.length;++T<V;)if(N(A[T],T,A))return!0;return!1}var xS=hp("length");function PS(A){return A.split("")}function OS(A){return A.match(Jf)||[]}function dg(A,N,T){var V;return T(A,function(se,ve,nt){if(N(se,ve,nt))return V=ve,!1}),V}function Ma(A,N,T,V){for(var se=A.length,ve=T+(V?1:-1);V?ve--:++ve<se;)if(N(A[ve],ve,A))return ve;return-1}function Oo(A,N,T){return N===N?qS(A,N,T):Ma(A,Dg,T)}function TS(A,N,T,V){for(var se=T-1,ve=A.length;++se<ve;)if(V(A[se],N))return se;return-1}function Dg(A){return A!==A}function hg(A,N){var T=A==null?0:A.length;return T?gp(A,N)/T:wo}function hp(A){return function(N){return N==null?e:N[A]}}function mp(A){return function(N){return A==null?e:A[N]}}function mg(A,N,T,V,se){return se(A,function(ve,nt,Ie){T=V?(V=!1,ve):N(T,ve,nt,Ie)}),T}function BS(A,N){var T=A.length;for(A.sort(N);T--;)A[T]=A[T].value;return A}function gp(A,N){for(var T,V=-1,se=A.length;++V<se;){var ve=N(A[V]);ve!==e&&(T=T===e?ve:T+ve)}return T}function _p(A,N){for(var T=-1,V=Array(A);++T<A;)V[T]=N(T);return V}function IS(A,N){return qe(N,function(T){return[T,A[T]]})}function gg(A){return A&&A.slice(0,Eg(A)+1).replace(ku,"")}function Yt(A){return function(N){return A(N)}}function yp(A,N){return qe(N,function(T){return A[T]})}function Ju(A,N){return A.has(N)}function _g(A,N){for(var T=-1,V=A.length;++T<V&&Oo(N,A[T],0)>-1;);return T}function yg(A,N){for(var T=A.length;T--&&Oo(N,A[T],0)>-1;);return T}function RS(A,N){for(var T=A.length,V=0;T--;)A[T]===N&&++V;return V}var MS=mp(ap),NS=mp(ng);function jS(A){return"\\"+ES[A]}function $S(A,N){return A==null?e:A[N]}function To(A){return un.test(A)}function LS(A){return Vu.test(A)}function US(A){for(var N,T=[];!(N=A.next()).done;)T.push(N.value);return T}function Fp(A){var N=-1,T=Array(A.size);return A.forEach(function(V,se){T[++N]=[se,V]}),T}function Fg(A,N){return function(T){return A(N(T))}}function ei(A,N){for(var T=-1,V=A.length,se=0,ve=[];++T<V;){var nt=A[T];(nt===N||nt===p)&&(A[T]=p,ve[se++]=T)}return ve}function Na(A){var N=-1,T=Array(A.size);return A.forEach(function(V){T[++N]=V}),T}function kS(A){var N=-1,T=Array(A.size);return A.forEach(function(V){T[++N]=[V,V]}),T}function qS(A,N,T){for(var V=T-1,se=A.length;++V<se;)if(A[V]===N)return V;return-1}function WS(A,N,T){for(var V=T+1;V--;)if(A[V]===N)return V;return V}function Bo(A){return To(A)?zS(A):xS(A)}function Pr(A){return To(A)?VS(A):PS(A)}function Eg(A){for(var N=A.length;N--&&Hf.test(A.charAt(N)););return N}var HS=mp(cp);function zS(A){for(var N=sr.lastIndex=0;sr.test(A);)++N;return N}function VS(A){return A.match(sr)||[]}function KS(A){return A.match(qi)||[]}var JS=(function A(N){N=N==null?ct:ti.defaults(ct.Object(),N,ti.pick(ct,Ku));var T=N.Array,V=N.Date,se=N.Error,ve=N.Function,nt=N.Math,Ie=N.Object,Ep=N.RegExp,GS=N.String,lr=N.TypeError,ja=T.prototype,YS=ve.prototype,Io=Ie.prototype,$a=N["__core-js_shared__"],La=YS.toString,we=Io.hasOwnProperty,XS=0,vg=(function(){var i=/[^.]+$/.exec($a&&$a.keys&&$a.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""})(),Ua=Io.toString,ZS=La.call(Ie),QS=ct._,ex=Ep("^"+La.call(we).replace(Uu,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ka=og?N.Buffer:e,ri=N.Symbol,qa=N.Uint8Array,Cg=ka?ka.allocUnsafe:e,Wa=Fg(Ie.getPrototypeOf,Ie),wg=Ie.create,bg=Io.propertyIsEnumerable,Ha=ja.splice,Ag=ri?ri.isConcatSpreadable:e,Gu=ri?ri.iterator:e,Hi=ri?ri.toStringTag:e,za=(function(){try{var i=Gi(Ie,"defineProperty");return i({},"",{}),i}catch{}})(),tx=N.clearTimeout!==ct.clearTimeout&&N.clearTimeout,rx=V&&V.now!==ct.Date.now&&V.now,nx=N.setTimeout!==ct.setTimeout&&N.setTimeout,Va=nt.ceil,Ka=nt.floor,vp=Ie.getOwnPropertySymbols,ix=ka?ka.isBuffer:e,Sg=N.isFinite,ox=ja.join,ux=Fg(Ie.keys,Ie),it=nt.max,Ft=nt.min,sx=V.now,ax=N.parseInt,xg=nt.random,cx=ja.reverse,Cp=Gi(N,"DataView"),Yu=Gi(N,"Map"),wp=Gi(N,"Promise"),Ro=Gi(N,"Set"),Xu=Gi(N,"WeakMap"),Zu=Gi(Ie,"create"),Ja=Xu&&new Xu,Mo={},lx=Yi(Cp),fx=Yi(Yu),px=Yi(wp),dx=Yi(Ro),Dx=Yi(Xu),Ga=ri?ri.prototype:e,Qu=Ga?Ga.valueOf:e,Pg=Ga?Ga.toString:e;function _(i){if(Ke(i)&&!ae(i)&&!(i instanceof me)){if(i instanceof fr)return i;if(we.call(i,"__wrapped__"))return O_(i)}return new fr(i)}var No=(function(){function i(){}return function(u){if(!He(u))return{};if(wg)return wg(u);i.prototype=u;var c=new i;return i.prototype=e,c}})();function Ya(){}function fr(i,u){this.__wrapped__=i,this.__actions__=[],this.__chain__=!!u,this.__index__=0,this.__values__=e}_.templateSettings={escape:Lf,evaluate:wa,interpolate:Lu,variable:"",imports:{_}},_.prototype=Ya.prototype,_.prototype.constructor=_,fr.prototype=No(Ya.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 hx(){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 mx(){if(this.__filtered__){var i=new me(this);i.__dir__=-1,i.__filtered__=!0}else i=this.clone(),i.__dir__*=-1;return i}function gx(){var i=this.__wrapped__.value(),u=this.__dir__,c=ae(i),f=u<0,h=c?i.length:0,y=PP(0,h,this.__views__),C=y.start,b=y.end,S=b-C,j=f?b:C-1,$=this.__iteratees__,L=$.length,H=0,J=Ft(S,this.__takeCount__);if(!c||!f&&h==S&&J==S)return Qg(i,this.__actions__);var te=[];e:for(;S--&&H<J;){j+=u;for(var pe=-1,re=i[j];++pe<L;){var De=$[pe],_e=De.iteratee,Qt=De.type,Tt=_e(re);if(Qt==or)re=Tt;else if(!Tt){if(Qt==Sr)continue e;break e}}te[H++]=re}return te}me.prototype=No(Ya.prototype),me.prototype.constructor=me;function zi(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 _x(){this.__data__=Zu?Zu(null):{},this.size=0}function yx(i){var u=this.has(i)&&delete this.__data__[i];return this.size-=u?1:0,u}function Fx(i){var u=this.__data__;if(Zu){var c=u[i];return c===a?e:c}return we.call(u,i)?u[i]:e}function Ex(i){var u=this.__data__;return Zu?u[i]!==e:we.call(u,i)}function vx(i,u){var c=this.__data__;return this.size+=this.has(i)?0:1,c[i]=Zu&&u===e?a:u,this}zi.prototype.clear=_x,zi.prototype.delete=yx,zi.prototype.get=Fx,zi.prototype.has=Ex,zi.prototype.set=vx;function Cn(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 Cx(){this.__data__=[],this.size=0}function wx(i){var u=this.__data__,c=Xa(u,i);if(c<0)return!1;var f=u.length-1;return c==f?u.pop():Ha.call(u,c,1),--this.size,!0}function bx(i){var u=this.__data__,c=Xa(u,i);return c<0?e:u[c][1]}function Ax(i){return Xa(this.__data__,i)>-1}function Sx(i,u){var c=this.__data__,f=Xa(c,i);return f<0?(++this.size,c.push([i,u])):c[f][1]=u,this}Cn.prototype.clear=Cx,Cn.prototype.delete=wx,Cn.prototype.get=bx,Cn.prototype.has=Ax,Cn.prototype.set=Sx;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 xx(){this.size=0,this.__data__={hash:new zi,map:new(Yu||Cn),string:new zi}}function Px(i){var u=cc(this,i).delete(i);return this.size-=u?1:0,u}function Ox(i){return cc(this,i).get(i)}function Tx(i){return cc(this,i).has(i)}function Bx(i,u){var c=cc(this,i),f=c.size;return c.set(i,u),this.size+=c.size==f?0:1,this}wn.prototype.clear=xx,wn.prototype.delete=Px,wn.prototype.get=Ox,wn.prototype.has=Tx,wn.prototype.set=Bx;function Vi(i){var u=-1,c=i==null?0:i.length;for(this.__data__=new wn;++u<c;)this.add(i[u])}function Ix(i){return this.__data__.set(i,a),this}function Rx(i){return this.__data__.has(i)}Vi.prototype.add=Vi.prototype.push=Ix,Vi.prototype.has=Rx;function Or(i){var u=this.__data__=new Cn(i);this.size=u.size}function Mx(){this.__data__=new Cn,this.size=0}function Nx(i){var u=this.__data__,c=u.delete(i);return this.size=u.size,c}function jx(i){return this.__data__.get(i)}function $x(i){return this.__data__.has(i)}function Lx(i,u){var c=this.__data__;if(c instanceof Cn){var f=c.__data__;if(!Yu||f.length<r-1)return f.push([i,u]),this.size=++c.size,this;c=this.__data__=new wn(f)}return c.set(i,u),this.size=c.size,this}Or.prototype.clear=Mx,Or.prototype.delete=Nx,Or.prototype.get=jx,Or.prototype.has=$x,Or.prototype.set=Lx;function Og(i,u){var c=ae(i),f=!c&&Xi(i),h=!c&&!f&&si(i),y=!c&&!f&&!h&&Uo(i),C=c||f||h||y,b=C?_p(i.length,GS):[],S=b.length;for(var j in i)(u||we.call(i,j))&&!(C&&(j=="length"||h&&(j=="offset"||j=="parent")||y&&(j=="buffer"||j=="byteLength"||j=="byteOffset")||xn(j,S)))&&b.push(j);return b}function Tg(i){var u=i.length;return u?i[Mp(0,u-1)]:e}function Ux(i,u){return lc(Mt(i),Ki(u,0,i.length))}function kx(i){return lc(Mt(i))}function bp(i,u,c){(c!==e&&!Tr(i[u],c)||c===e&&!(u in i))&&bn(i,u,c)}function es(i,u,c){var f=i[u];(!(we.call(i,u)&&Tr(f,c))||c===e&&!(u in i))&&bn(i,u,c)}function Xa(i,u){for(var c=i.length;c--;)if(Tr(i[c][0],u))return c;return-1}function qx(i,u,c,f){return ni(i,function(h,y,C){u(f,h,c(h),C)}),f}function Bg(i,u){return i&&an(u,lt(u),i)}function Wx(i,u){return i&&an(u,jt(u),i)}function bn(i,u,c){u=="__proto__"&&za?za(i,u,{configurable:!0,enumerable:!0,value:c,writable:!0}):i[u]=c}function Ap(i,u){for(var c=-1,f=u.length,h=T(f),y=i==null;++c<f;)h[c]=y?e:ud(i,u[c]);return h}function Ki(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,h,y){var C,b=u&m,S=u&g,j=u&E;if(c&&(C=h?c(i,f,h,y):c(i)),C!==e)return C;if(!He(i))return i;var $=ae(i);if($){if(C=TP(i),!b)return Mt(i,C)}else{var L=Et(i),H=L==Ao||L==_a;if(si(i))return r_(i,b);if(L==xr||L==Jn||H&&!h){if(C=S||H?{}:E_(i),!b)return S?FP(i,Wx(C,i)):yP(i,Bg(C,i))}else{if(!Pe[L])return h?i:{};C=BP(i,L,b)}}y||(y=new Or);var J=y.get(i);if(J)return J;y.set(i,C),Y_(i)?i.forEach(function(re){C.add(pr(re,u,c,re,i,y))}):J_(i)&&i.forEach(function(re,De){C.set(De,pr(re,u,c,De,i,y))});var te=j?S?Vp:zp:S?jt:lt,pe=$?e:te(i);return cr(pe||i,function(re,De){pe&&(De=re,re=i[De]),es(C,De,pr(re,u,c,De,i,y))}),C}function Hx(i){var u=lt(i);return function(c){return Ig(c,i,u)}}function Ig(i,u,c){var f=c.length;if(i==null)return!f;for(i=Ie(i);f--;){var h=c[f],y=u[h],C=i[h];if(C===e&&!(h in i)||!y(C))return!1}return!0}function Rg(i,u,c){if(typeof i!="function")throw new lr(o);return ss(function(){i.apply(e,c)},u)}function ts(i,u,c,f){var h=-1,y=Ra,C=!0,b=i.length,S=[],j=u.length;if(!b)return S;c&&(u=qe(u,Yt(c))),f?(y=pp,C=!1):u.length>=r&&(y=Ju,C=!1,u=new Vi(u));e:for(;++h<b;){var $=i[h],L=c==null?$:c($);if($=f||$!==0?$:0,C&&L===L){for(var H=j;H--;)if(u[H]===L)continue e;S.push($)}else y(u,L,f)||S.push($)}return S}var ni=s_(sn),Mg=s_(xp,!0);function zx(i,u){var c=!0;return ni(i,function(f,h,y){return c=!!u(f,h,y),c}),c}function Za(i,u,c){for(var f=-1,h=i.length;++f<h;){var y=i[f],C=u(y);if(C!=null&&(b===e?C===C&&!Zt(C):c(C,b)))var b=C,S=y}return S}function Vx(i,u,c,f){var h=i.length;for(c=le(c),c<0&&(c=-c>h?0:h+c),f=f===e||f>h?h:le(f),f<0&&(f+=h),f=c>f?0:Z_(f);c<f;)i[c++]=u;return i}function Ng(i,u){var c=[];return ni(i,function(f,h,y){u(f,h,y)&&c.push(f)}),c}function ht(i,u,c,f,h){var y=-1,C=i.length;for(c||(c=RP),h||(h=[]);++y<C;){var b=i[y];u>0&&c(b)?u>1?ht(b,u-1,c,f,h):Qn(h,b):f||(h[h.length]=b)}return h}var Sp=a_(),jg=a_(!0);function sn(i,u){return i&&Sp(i,u,lt)}function xp(i,u){return i&&jg(i,u,lt)}function Qa(i,u){return Zn(u,function(c){return Pn(i[c])})}function Ji(i,u){u=oi(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 $g(i,u,c){var f=u(i);return ae(i)?f:Qn(f,c(i))}function Pt(i){return i==null?i===e?Fa:Ri:Hi&&Hi in Ie(i)?xP(i):kP(i)}function Pp(i,u){return i>u}function Kx(i,u){return i!=null&&we.call(i,u)}function Jx(i,u){return i!=null&&u in Ie(i)}function Gx(i,u,c){return i>=Ft(u,c)&&i<it(u,c)}function Op(i,u,c){for(var f=c?pp:Ra,h=i[0].length,y=i.length,C=y,b=T(y),S=1/0,j=[];C--;){var $=i[C];C&&u&&($=qe($,Yt(u))),S=Ft($.length,S),b[C]=!c&&(u||h>=120&&$.length>=120)?new Vi(C&&$):e}$=i[0];var L=-1,H=b[0];e:for(;++L<h&&j.length<S;){var J=$[L],te=u?u(J):J;if(J=c||J!==0?J:0,!(H?Ju(H,te):f(j,te,c))){for(C=y;--C;){var pe=b[C];if(!(pe?Ju(pe,te):f(i[C],te,c)))continue e}H&&H.push(te),j.push(J)}}return j}function Yx(i,u,c,f){return sn(i,function(h,y,C){u(f,c(h),y,C)}),f}function rs(i,u,c){u=oi(u,i),i=b_(i,u);var f=i==null?i:i[cn(Dr(u))];return f==null?e:Gt(f,i,c)}function Lg(i){return Ke(i)&&Pt(i)==Jn}function Xx(i){return Ke(i)&&Pt(i)==nn}function Zx(i){return Ke(i)&&Pt(i)==Bi}function ns(i,u,c,f,h){return i===u?!0:i==null||u==null||!Ke(i)&&!Ke(u)?i!==i&&u!==u:Qx(i,u,c,f,ns,h)}function Qx(i,u,c,f,h,y){var C=ae(i),b=ae(u),S=C?Gn:Et(i),j=b?Gn:Et(u);S=S==Jn?xr:S,j=j==Jn?xr:j;var $=S==xr,L=j==xr,H=S==j;if(H&&si(i)){if(!si(u))return!1;C=!0,$=!1}if(H&&!$)return y||(y=new Or),C||Uo(i)?__(i,u,c,f,h,y):AP(i,u,S,c,f,h,y);if(!(c&w)){var J=$&&we.call(i,"__wrapped__"),te=L&&we.call(u,"__wrapped__");if(J||te){var pe=J?i.value():i,re=te?u.value():u;return y||(y=new Or),h(pe,re,c,f,y)}}return H?(y||(y=new Or),SP(i,u,c,f,h,y)):!1}function eP(i){return Ke(i)&&Et(i)==zt}function Tp(i,u,c,f){var h=c.length,y=h,C=!f;if(i==null)return!y;for(i=Ie(i);h--;){var b=c[h];if(C&&b[2]?b[1]!==i[b[0]]:!(b[0]in i))return!1}for(;++h<y;){b=c[h];var S=b[0],j=i[S],$=b[1];if(C&&b[2]){if(j===e&&!(S in i))return!1}else{var L=new Or;if(f)var H=f(j,$,S,i,u,L);if(!(H===e?ns($,j,w|v,f,L):H))return!1}}return!0}function Ug(i){if(!He(i)||NP(i))return!1;var u=Pn(i)?ex:ep;return u.test(Yi(i))}function tP(i){return Ke(i)&&Pt(i)==Mi}function rP(i){return Ke(i)&&Et(i)==Vt}function nP(i){return Ke(i)&&mc(i.length)&&!!xe[Pt(i)]}function kg(i){return typeof i=="function"?i:i==null?$t:typeof i=="object"?ae(i)?Hg(i[0],i[1]):Wg(i):cy(i)}function Bp(i){if(!us(i))return ux(i);var u=[];for(var c in Ie(i))we.call(i,c)&&c!="constructor"&&u.push(c);return u}function iP(i){if(!He(i))return UP(i);var u=us(i),c=[];for(var f in i)f=="constructor"&&(u||!we.call(i,f))||c.push(f);return c}function Ip(i,u){return i<u}function qg(i,u){var c=-1,f=Nt(i)?T(i.length):[];return ni(i,function(h,y,C){f[++c]=u(h,y,C)}),f}function Wg(i){var u=Jp(i);return u.length==1&&u[0][2]?C_(u[0][0],u[0][1]):function(c){return c===i||Tp(c,i,u)}}function Hg(i,u){return Yp(i)&&v_(u)?C_(cn(i),u):function(c){var f=ud(c,i);return f===e&&f===u?sd(c,i):ns(u,f,w|v)}}function ec(i,u,c,f,h){i!==u&&Sp(u,function(y,C){if(h||(h=new Or),He(y))oP(i,u,C,c,ec,f,h);else{var b=f?f(Zp(i,C),y,C+"",i,u,h):e;b===e&&(b=y),bp(i,C,b)}},jt)}function oP(i,u,c,f,h,y,C){var b=Zp(i,c),S=Zp(u,c),j=C.get(S);if(j){bp(i,c,j);return}var $=y?y(b,S,c+"",i,u,C):e,L=$===e;if(L){var H=ae(S),J=!H&&si(S),te=!H&&!J&&Uo(S);$=S,H||J||te?ae(b)?$=b:Xe(b)?$=Mt(b):J?(L=!1,$=r_(S,!0)):te?(L=!1,$=n_(S,!0)):$=[]:as(S)||Xi(S)?($=b,Xi(b)?$=Q_(b):(!He(b)||Pn(b))&&($=E_(S))):L=!1}L&&(C.set(S,$),h($,S,f,y,C),C.delete(S)),bp(i,c,$)}function zg(i,u){var c=i.length;if(c)return u+=u<0?c:0,xn(u,c)?i[u]:e}function Vg(i,u,c){u.length?u=qe(u,function(y){return ae(y)?function(C){return Ji(C,y.length===1?y[0]:y)}:y}):u=[$t];var f=-1;u=qe(u,Yt(ee()));var h=qg(i,function(y,C,b){var S=qe(u,function(j){return j(y)});return{criteria:S,index:++f,value:y}});return BS(h,function(y,C){return _P(y,C,c)})}function uP(i,u){return Kg(i,u,function(c,f){return sd(i,f)})}function Kg(i,u,c){for(var f=-1,h=u.length,y={};++f<h;){var C=u[f],b=Ji(i,C);c(b,C)&&is(y,oi(C,i),b)}return y}function sP(i){return function(u){return Ji(u,i)}}function Rp(i,u,c,f){var h=f?TS:Oo,y=-1,C=u.length,b=i;for(i===u&&(u=Mt(u)),c&&(b=qe(i,Yt(c)));++y<C;)for(var S=0,j=u[y],$=c?c(j):j;(S=h(b,$,S,f))>-1;)b!==i&&Ha.call(b,S,1),Ha.call(i,S,1);return i}function Jg(i,u){for(var c=i?u.length:0,f=c-1;c--;){var h=u[c];if(c==f||h!==y){var y=h;xn(h)?Ha.call(i,h,1):$p(i,h)}}return i}function Mp(i,u){return i+Ka(xg()*(u-i+1))}function aP(i,u,c,f){for(var h=-1,y=it(Va((u-i)/(c||1)),0),C=T(y);y--;)C[f?y:++h]=i,i+=c;return C}function Np(i,u){var c="";if(!i||u<1||u>rn)return c;do u%2&&(c+=i),u=Ka(u/2),u&&(i+=i);while(u);return c}function de(i,u){return Qp(w_(i,u,$t),i+"")}function cP(i){return Tg(ko(i))}function lP(i,u){var c=ko(i);return lc(c,Ki(u,0,c.length))}function is(i,u,c,f){if(!He(i))return i;u=oi(u,i);for(var h=-1,y=u.length,C=y-1,b=i;b!=null&&++h<y;){var S=cn(u[h]),j=c;if(S==="__proto__"||S==="constructor"||S==="prototype")return i;if(h!=C){var $=b[S];j=f?f($,S,b):e,j===e&&(j=He($)?$:xn(u[h+1])?[]:{})}es(b,S,j),b=b[S]}return i}var Gg=Ja?function(i,u){return Ja.set(i,u),i}:$t,fP=za?function(i,u){return za(i,"toString",{configurable:!0,enumerable:!1,value:cd(u),writable:!0})}:$t;function pP(i){return lc(ko(i))}function dr(i,u,c){var f=-1,h=i.length;u<0&&(u=-u>h?0:h+u),c=c>h?h:c,c<0&&(c+=h),h=u>c?0:c-u>>>0,u>>>=0;for(var y=T(h);++f<h;)y[f]=i[f+u];return y}function dP(i,u){var c;return ni(i,function(f,h,y){return c=u(f,h,y),!c}),!!c}function tc(i,u,c){var f=0,h=i==null?f:i.length;if(typeof u=="number"&&u===u&&h<=Kn){for(;f<h;){var y=f+h>>>1,C=i[y];C!==null&&!Zt(C)&&(c?C<=u:C<u)?f=y+1:h=y}return h}return jp(i,u,$t,c)}function jp(i,u,c,f){var h=0,y=i==null?0:i.length;if(y===0)return 0;u=c(u);for(var C=u!==u,b=u===null,S=Zt(u),j=u===e;h<y;){var $=Ka((h+y)/2),L=c(i[$]),H=L!==e,J=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||!J):S?re=te&&H&&!J&&(f||!pe):J||pe?re=!1:re=f?L<=u:L<u;re?h=$+1:y=$}return Ft(y,Bf)}function Yg(i,u){for(var c=-1,f=i.length,h=0,y=[];++c<f;){var C=i[c],b=u?u(C):C;if(!c||!Tr(b,S)){var S=b;y[h++]=C===0?0:C}}return y}function Xg(i){return typeof i=="number"?i:Zt(i)?wo:+i}function Xt(i){if(typeof i=="string")return i;if(ae(i))return qe(i,Xt)+"";if(Zt(i))return Pg?Pg.call(i):"";var u=i+"";return u=="0"&&1/i==-yn?"-0":u}function ii(i,u,c){var f=-1,h=Ra,y=i.length,C=!0,b=[],S=b;if(c)C=!1,h=pp;else if(y>=r){var j=u?null:wP(i);if(j)return Na(j);C=!1,h=Ju,S=new Vi}else S=u?[]:b;e:for(;++f<y;){var $=i[f],L=u?u($):$;if($=c||$!==0?$:0,C&&L===L){for(var H=S.length;H--;)if(S[H]===L)continue e;u&&S.push(L),b.push($)}else h(S,L,c)||(S!==b&&S.push(L),b.push($))}return b}function $p(i,u){u=oi(u,i);var c=-1,f=u.length;if(!f)return!0;for(var h=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(h&&c===0)continue;return!1}}}var C=b_(i,u);return C==null||delete C[cn(Dr(u))]}function Zg(i,u,c,f){return is(i,u,c(Ji(i,u)),f)}function rc(i,u,c,f){for(var h=i.length,y=f?h:-1;(f?y--:++y<h)&&u(i[y],y,i););return c?dr(i,f?0:y,f?y+1:h):dr(i,f?y+1:0,f?h:y)}function Qg(i,u){var c=i;return c instanceof me&&(c=c.value()),dp(u,function(f,h){return h.func.apply(h.thisArg,Qn([f],h.args))},c)}function Lp(i,u,c){var f=i.length;if(f<2)return f?ii(i[0]):[];for(var h=-1,y=T(f);++h<f;)for(var C=i[h],b=-1;++b<f;)b!=h&&(y[h]=ts(y[h]||C,i[b],u,c));return ii(ht(y,1),u,c)}function e_(i,u,c){for(var f=-1,h=i.length,y=u.length,C={};++f<h;){var b=f<y?u[f]:e;c(C,i[f],b)}return C}function Up(i){return Xe(i)?i:[]}function kp(i){return typeof i=="function"?i:$t}function oi(i,u){return ae(i)?i:Yp(i,u)?[i]:P_(be(i))}var DP=de;function ui(i,u,c){var f=i.length;return c=c===e?f:c,!u&&c>=f?i:dr(i,u,c)}var t_=tx||function(i){return ct.clearTimeout(i)};function r_(i,u){if(u)return i.slice();var c=i.length,f=Cg?Cg(c):new i.constructor(c);return i.copy(f),f}function qp(i){var u=new i.constructor(i.byteLength);return new qa(u).set(new qa(i)),u}function hP(i,u){var c=u?qp(i.buffer):i.buffer;return new i.constructor(c,i.byteOffset,i.byteLength)}function mP(i){var u=new i.constructor(i.source,ba.exec(i));return u.lastIndex=i.lastIndex,u}function gP(i){return Qu?Ie(Qu.call(i)):{}}function n_(i,u){var c=u?qp(i.buffer):i.buffer;return new i.constructor(c,i.byteOffset,i.length)}function i_(i,u){if(i!==u){var c=i!==e,f=i===null,h=i===i,y=Zt(i),C=u!==e,b=u===null,S=u===u,j=Zt(u);if(!b&&!j&&!y&&i>u||y&&C&&S&&!b&&!j||f&&C&&S||!c&&S||!h)return 1;if(!f&&!y&&!j&&i<u||j&&c&&h&&!f&&!y||b&&c&&h||!C&&h||!S)return-1}return 0}function _P(i,u,c){for(var f=-1,h=i.criteria,y=u.criteria,C=h.length,b=c.length;++f<C;){var S=i_(h[f],y[f]);if(S){if(f>=b)return S;var j=c[f];return S*(j=="desc"?-1:1)}}return i.index-u.index}function o_(i,u,c,f){for(var h=-1,y=i.length,C=c.length,b=-1,S=u.length,j=it(y-C,0),$=T(S+j),L=!f;++b<S;)$[b]=u[b];for(;++h<C;)(L||h<y)&&($[c[h]]=i[h]);for(;j--;)$[b++]=i[h++];return $}function u_(i,u,c,f){for(var h=-1,y=i.length,C=-1,b=c.length,S=-1,j=u.length,$=it(y-b,0),L=T($+j),H=!f;++h<$;)L[h]=i[h];for(var J=h;++S<j;)L[J+S]=u[S];for(;++C<b;)(H||h<y)&&(L[J+c[C]]=i[h++]);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 h=!c;c||(c={});for(var y=-1,C=u.length;++y<C;){var b=u[y],S=f?f(c[b],i[b],b,c,i):e;S===e&&(S=i[b]),h?bn(c,b,S):es(c,b,S)}return c}function yP(i,u){return an(i,Gp(i),u)}function FP(i,u){return an(i,y_(i),u)}function nc(i,u){return function(c,f){var h=ae(c)?bS:qx,y=u?u():{};return h(c,i,ee(f,2),y)}}function jo(i){return de(function(u,c){var f=-1,h=c.length,y=h>1?c[h-1]:e,C=h>2?c[2]:e;for(y=i.length>3&&typeof y=="function"?(h--,y):e,C&&Ot(c[0],c[1],C)&&(y=h<3?e:y,h=1),u=Ie(u);++f<h;){var b=c[f];b&&i(u,b,f,y)}return u})}function s_(i,u){return function(c,f){if(c==null)return c;if(!Nt(c))return i(c,f);for(var h=c.length,y=u?h:-1,C=Ie(c);(u?y--:++y<h)&&f(C[y],y,C)!==!1;);return c}}function a_(i){return function(u,c,f){for(var h=-1,y=Ie(u),C=f(u),b=C.length;b--;){var S=C[i?b:++h];if(c(y[S],S,y)===!1)break}return u}}function EP(i,u,c){var f=u&x,h=os(i);function y(){var C=this&&this!==ct&&this instanceof y?h:i;return C.apply(f?c:this,arguments)}return y}function c_(i){return function(u){u=be(u);var c=To(u)?Pr(u):e,f=c?c[0]:u.charAt(0),h=c?ui(c,1).join(""):u.slice(1);return f[i]()+h}}function $o(i){return function(u){return dp(sy(uy(u).replace(vn,"")),i,"")}}function os(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=No(i.prototype),f=i.apply(c,u);return He(f)?f:c}}function vP(i,u,c){var f=os(i);function h(){for(var y=arguments.length,C=T(y),b=y,S=Lo(h);b--;)C[b]=arguments[b];var j=y<3&&C[0]!==S&&C[y-1]!==S?[]:ei(C,S);if(y-=j.length,y<c)return D_(i,u,ic,h.placeholder,e,C,j,e,e,c-y);var $=this&&this!==ct&&this instanceof h?f:i;return Gt($,this,C)}return h}function l_(i){return function(u,c,f){var h=Ie(u);if(!Nt(u)){var y=ee(c,3);u=lt(u),c=function(b){return y(h[b],b,h)}}var C=i(u,c,f);return C>-1?h[y?u[C]:C]:e}}function f_(i){return Sn(function(u){var c=u.length,f=c,h=fr.prototype.thru;for(i&&u.reverse();f--;){var y=u[f];if(typeof y!="function")throw new lr(o);if(h&&!C&&ac(y)=="wrapper")var C=new fr([],!0)}for(f=C?f:c;++f<c;){y=u[f];var b=ac(y),S=b=="wrapper"?Kp(y):e;S&&Xp(S[0])&&S[1]==(Q|B|q|fe)&&!S[4].length&&S[9]==1?C=C[ac(S[0])].apply(C,S[3]):C=y.length==1&&Xp(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 ic(i,u,c,f,h,y,C,b,S,j){var $=u&Q,L=u&x,H=u&O,J=u&(B|U),te=u&ye,pe=H?e:os(i);function re(){for(var De=arguments.length,_e=T(De),Qt=De;Qt--;)_e[Qt]=arguments[Qt];if(J)var Tt=Lo(re),er=RS(_e,Tt);if(f&&(_e=o_(_e,f,h,J)),y&&(_e=u_(_e,y,C,J)),De-=er,J&&De<j){var Ze=ei(_e,Tt);return D_(i,u,ic,re.placeholder,c,_e,Ze,b,S,j-De)}var Br=L?c:this,Tn=H?Br[i]:i;return De=_e.length,b?_e=qP(_e,b):te&&De>1&&_e.reverse(),$&&S<De&&(_e.length=S),this&&this!==ct&&this instanceof re&&(Tn=pe||os(Tn)),Tn.apply(Br,_e)}return re}function p_(i,u){return function(c,f){return Yx(c,i,u(f),{})}}function oc(i,u){return function(c,f){var h;if(c===e&&f===e)return u;if(c!==e&&(h=c),f!==e){if(h===e)return f;typeof c=="string"||typeof f=="string"?(c=Xt(c),f=Xt(f)):(c=Xg(c),f=Xg(f)),h=i(c,f)}return h}}function Wp(i){return Sn(function(u){return u=qe(u,Yt(ee())),de(function(c){var f=this;return i(u,function(h){return Gt(h,f,c)})})})}function uc(i,u){u=u===e?" ":Xt(u);var c=u.length;if(c<2)return c?Np(u,i):u;var f=Np(u,Va(i/Bo(u)));return To(u)?ui(Pr(f),0,i).join(""):f.slice(0,i)}function CP(i,u,c,f){var h=u&x,y=os(i);function C(){for(var b=-1,S=arguments.length,j=-1,$=f.length,L=T($+S),H=this&&this!==ct&&this instanceof C?y:i;++j<$;)L[j]=f[j];for(;S--;)L[j++]=arguments[++b];return Gt(H,h?c:this,L)}return C}function d_(i){return function(u,c,f){return f&&typeof f!="number"&&Ot(u,c,f)&&(c=f=e),u=On(u),c===e?(c=u,u=0):c=On(c),f=f===e?u<c?1:-1:On(f),aP(u,c,f,i)}}function sc(i){return function(u,c){return typeof u=="string"&&typeof c=="string"||(u=hr(u),c=hr(c)),i(u,c)}}function D_(i,u,c,f,h,y,C,b,S,j){var $=u&B,L=$?C:e,H=$?e:C,J=$?y:e,te=$?e:y;u|=$?q:G,u&=~($?G:q),u&P||(u&=~(x|O));var pe=[i,u,h,J,L,te,H,b,S,j],re=c.apply(e,pe);return Xp(i)&&A_(re,pe),re.placeholder=f,S_(re,i,u)}function Hp(i){var u=nt[i];return function(c,f){if(c=hr(c),f=f==null?0:Ft(le(f),292),f&&Sg(c)){var h=(be(c)+"e").split("e"),y=u(h[0]+"e"+(+h[1]+f));return h=(be(y)+"e").split("e"),+(h[0]+"e"+(+h[1]-f))}return u(c)}}var wP=Ro&&1/Na(new Ro([,-0]))[1]==yn?function(i){return new Ro(i)}:pd;function h_(i){return function(u){var c=Et(u);return c==zt?Fp(u):c==Vt?kS(u):IS(u,i(u))}}function An(i,u,c,f,h,y,C,b){var S=u&O;if(!S&&typeof i!="function")throw new lr(o);var j=f?f.length:0;if(j||(u&=~(q|G),f=h=e),C=C===e?C:it(le(C),0),b=b===e?b:le(b),j-=h?h.length:0,u&G){var $=f,L=h;f=h=e}var H=S?e:Kp(i),J=[i,u,c,f,h,$,L,y,C,b];if(H&&LP(J,H),i=J[0],u=J[1],c=J[2],f=J[3],h=J[4],b=J[9]=J[9]===e?S?0:i.length:it(J[9]-j,0),!b&&u&(B|U)&&(u&=~(B|U)),!u||u==x)var te=EP(i,u,c);else u==B||u==U?te=vP(i,u,b):(u==q||u==(x|q))&&!h.length?te=CP(i,u,c,f):te=ic.apply(e,J);var pe=H?Gg:A_;return S_(pe(te,J),i,u)}function m_(i,u,c,f){return i===e||Tr(i,Io[c])&&!we.call(f,c)?u:i}function g_(i,u,c,f,h,y){return He(i)&&He(u)&&(y.set(u,i),ec(i,u,e,g_,y),y.delete(u)),i}function bP(i){return as(i)?e:i}function __(i,u,c,f,h,y){var C=c&w,b=i.length,S=u.length;if(b!=S&&!(C&&S>b))return!1;var j=y.get(i),$=y.get(u);if(j&&$)return j==u&&$==i;var L=-1,H=!0,J=c&v?new Vi: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(J){if(!Dp(u,function(De,_e){if(!Ju(J,_e)&&(te===De||h(te,De,c,f,y)))return J.push(_e)})){H=!1;break}}else if(!(te===pe||h(te,pe,c,f,y))){H=!1;break}}return y.delete(i),y.delete(u),H}function AP(i,u,c,f,h,y,C){switch(c){case Kt: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 qa(i),new qa(u)));case En:case Bi:case Yn:return Tr(+i,+u);case Ii:return i.name==u.name&&i.message==u.message;case Mi:case Ni:return i==u+"";case zt:var b=Fp;case Vt:var S=f&w;if(b||(b=Na),i.size!=u.size&&!S)return!1;var j=C.get(i);if(j)return j==u;f|=v,C.set(i,u);var $=__(b(i),b(u),f,h,y,C);return C.delete(i),$;case St:if(Qu)return Qu.call(i)==Qu.call(u)}return!1}function SP(i,u,c,f,h,y){var C=c&w,b=zp(i),S=b.length,j=zp(u),$=j.length;if(S!=$&&!C)return!1;for(var L=S;L--;){var H=b[L];if(!(C?H in u:we.call(u,H)))return!1}var J=y.get(i),te=y.get(u);if(J&&te)return J==u&&te==i;var pe=!0;y.set(i,u),y.set(u,i);for(var re=C;++L<S;){H=b[L];var De=i[H],_e=u[H];if(f)var Qt=C?f(_e,De,H,u,i,y):f(De,_e,H,i,u,y);if(!(Qt===e?De===_e||h(De,_e,c,f,y):Qt)){pe=!1;break}re||(re=H=="constructor")}if(pe&&!re){var Tt=i.constructor,er=u.constructor;Tt!=er&&"constructor"in i&&"constructor"in u&&!(typeof Tt=="function"&&Tt instanceof Tt&&typeof er=="function"&&er instanceof er)&&(pe=!1)}return y.delete(i),y.delete(u),pe}function Sn(i){return Qp(w_(i,e,I_),i+"")}function zp(i){return $g(i,lt,Gp)}function Vp(i){return $g(i,jt,y_)}var Kp=Ja?function(i){return Ja.get(i)}:pd;function ac(i){for(var u=i.name+"",c=Mo[u],f=we.call(Mo,u)?c.length:0;f--;){var h=c[f],y=h.func;if(y==null||y==i)return h.name}return u}function Lo(i){var u=we.call(_,"placeholder")?_:i;return u.placeholder}function ee(){var i=_.iteratee||ld;return i=i===ld?kg:i,arguments.length?i(arguments[0],arguments[1]):i}function cc(i,u){var c=i.__data__;return MP(u)?c[typeof u=="string"?"string":"hash"]:c.map}function Jp(i){for(var u=lt(i),c=u.length;c--;){var f=u[c],h=i[f];u[c]=[f,h,v_(h)]}return u}function Gi(i,u){var c=$S(i,u);return Ug(c)?c:e}function xP(i){var u=we.call(i,Hi),c=i[Hi];try{i[Hi]=e;var f=!0}catch{}var h=Ua.call(i);return f&&(u?i[Hi]=c:delete i[Hi]),h}var Gp=vp?function(i){return i==null?[]:(i=Ie(i),Zn(vp(i),function(u){return bg.call(i,u)}))}:dd,y_=vp?function(i){for(var u=[];i;)Qn(u,Gp(i)),i=Wa(i);return u}:dd,Et=Pt;(Cp&&Et(new Cp(new ArrayBuffer(1)))!=Kt||Yu&&Et(new Yu)!=zt||wp&&Et(wp.resolve())!=ya||Ro&&Et(new Ro)!=Vt||Xu&&Et(new Xu)!=ji)&&(Et=function(i){var u=Pt(i),c=u==xr?i.constructor:e,f=c?Yi(c):"";if(f)switch(f){case lx:return Kt;case fx:return zt;case px:return ya;case dx:return Vt;case Dx:return ji}return u});function PP(i,u,c){for(var f=-1,h=c.length;++f<h;){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 OP(i){var u=i.match(Vf);return u?u[1].split(Kf):[]}function F_(i,u,c){u=oi(u,i);for(var f=-1,h=u.length,y=!1;++f<h;){var C=cn(u[f]);if(!(y=i!=null&&c(i,C)))break;i=i[C]}return y||++f!=h?y:(h=i==null?0:i.length,!!h&&mc(h)&&xn(C,h)&&(ae(i)||Xi(i)))}function TP(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 E_(i){return typeof i.constructor=="function"&&!us(i)?No(Wa(i)):{}}function BP(i,u,c){var f=i.constructor;switch(u){case nn:return qp(i);case En:case Bi:return new f(+i);case Kt:return hP(i,c);case Tu:case Bu:case Iu:case Ru:case $i:case Mu:case Nu:case So:case ju:return n_(i,c);case zt:return new f;case Yn:case Ni:return new f(i);case Mi:return mP(i);case Vt:return new f;case St:return gP(i)}}function IP(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(zf,`{
|
|
9
|
+
/* [wrapped with `+u+`] */
|
|
10
|
+
`)}function RP(i){return ae(i)||Xi(i)||!!(Ag&&i&&i[Ag])}function xn(i,u){var c=typeof i;return u=u??rn,!!u&&(c=="number"||c!="symbol"&&rp.test(i))&&i>-1&&i%1==0&&i<u}function Ot(i,u,c){if(!He(c))return!1;var f=typeof u;return(f=="number"?Nt(c)&&xn(u,c.length):f=="string"&&u in c)?Tr(c[u],i):!1}function Yp(i,u){if(ae(i))return!1;var c=typeof i;return c=="number"||c=="symbol"||c=="boolean"||i==null||Zt(i)?!0:kf.test(i)||!Uf.test(i)||u!=null&&i in Ie(u)}function MP(i){var u=typeof i;return u=="string"||u=="number"||u=="symbol"||u=="boolean"?i!=="__proto__":i===null}function Xp(i){var u=ac(i),c=_[u];if(typeof c!="function"||!(u in me.prototype))return!1;if(i===c)return!0;var f=Kp(c);return!!f&&i===f[0]}function NP(i){return!!vg&&vg in i}var jP=$a?Pn:Dd;function us(i){var u=i&&i.constructor,c=typeof u=="function"&&u.prototype||Io;return i===c}function v_(i){return i===i&&!He(i)}function C_(i,u){return function(c){return c==null?!1:c[i]===u&&(u!==e||i in Ie(c))}}function $P(i){var u=Dc(i,function(f){return c.size===l&&c.clear(),f}),c=u.cache;return u}function LP(i,u){var c=i[1],f=u[1],h=c|f,y=h<(x|O|Q),C=f==Q&&c==B||f==Q&&c==fe&&i[7].length<=u[8]||f==(Q|fe)&&u[7].length<=u[8]&&c==B;if(!(y||C))return i;f&x&&(i[2]=u[2],h|=c&x?0:P);var b=u[3];if(b){var S=i[3];i[3]=S?o_(S,b,u[4]):b,i[4]=S?ei(i[3],p):u[4]}return b=u[5],b&&(S=i[5],i[5]=S?u_(S,b,u[6]):b,i[6]=S?ei(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]=h,i}function UP(i){var u=[];if(i!=null)for(var c in Ie(i))u.push(c);return u}function kP(i){return Ua.call(i)}function w_(i,u,c){return u=it(u===e?i.length-1:u,0),function(){for(var f=arguments,h=-1,y=it(f.length-u,0),C=T(y);++h<y;)C[h]=f[u+h];h=-1;for(var b=T(u+1);++h<u;)b[h]=f[h];return b[u]=c(C),Gt(i,this,b)}}function b_(i,u){return u.length<2?i:Ji(i,dr(u,0,-1))}function qP(i,u){for(var c=i.length,f=Ft(u.length,c),h=Mt(i);f--;){var y=u[f];i[f]=xn(y,c)?h[y]:e}return i}function Zp(i,u){if(!(u==="constructor"&&typeof i[u]=="function")&&u!="__proto__")return i[u]}var A_=x_(Gg),ss=nx||function(i,u){return ct.setTimeout(i,u)},Qp=x_(fP);function S_(i,u,c){var f=u+"";return Qp(i,IP(f,WP(OP(f),c)))}function x_(i){var u=0,c=0;return function(){var f=sx(),h=dt-(f-c);if(c=f,h>0){if(++u>=tn)return arguments[0]}else u=0;return i.apply(e,arguments)}}function lc(i,u){var c=-1,f=i.length,h=f-1;for(u=u===e?f:u;++c<u;){var y=Mp(c,h),C=i[y];i[y]=i[c],i[c]=C}return i.length=u,i}var P_=$P(function(i){var u=[];return i.charCodeAt(0)===46&&u.push(""),i.replace(qf,function(c,f,h,y){u.push(h?y.replace(Yf,"$1"):f||c)}),u});function cn(i){if(typeof i=="string"||Zt(i))return i;var u=i+"";return u=="0"&&1/i==-yn?"-0":u}function Yi(i){if(i!=null){try{return La.call(i)}catch{}try{return i+""}catch{}}return""}function WP(i,u){return cr(ga,function(c){var f="_."+c[0];u&c[1]&&!Ra(i,f)&&i.push(f)}),i.sort()}function O_(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 HP(i,u,c){(c?Ot(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 h=0,y=0,C=T(Va(f/u));h<f;)C[y++]=dr(i,h,h+=u);return C}function zP(i){for(var u=-1,c=i==null?0:i.length,f=0,h=[];++u<c;){var y=i[u];y&&(h[f++]=y)}return h}function VP(){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 Qn(ae(c)?Mt(c):[c],ht(u,1))}var KP=de(function(i,u){return Xe(i)?ts(i,ht(u,1,Xe,!0)):[]}),JP=de(function(i,u){var c=Dr(u);return Xe(c)&&(c=e),Xe(i)?ts(i,ht(u,1,Xe,!0),ee(c,2)):[]}),GP=de(function(i,u){var c=Dr(u);return Xe(c)&&(c=e),Xe(i)?ts(i,ht(u,1,Xe,!0),e,c):[]});function YP(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 XP(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 ZP(i,u){return i&&i.length?rc(i,ee(u,3),!0,!0):[]}function QP(i,u){return i&&i.length?rc(i,ee(u,3),!0):[]}function eO(i,u,c,f){var h=i==null?0:i.length;return h?(c&&typeof c!="number"&&Ot(i,u,c)&&(c=0,f=h),Vx(i,u,c,f)):[]}function T_(i,u,c){var f=i==null?0:i.length;if(!f)return-1;var h=c==null?0:le(c);return h<0&&(h=it(f+h,0)),Ma(i,ee(u,3),h)}function B_(i,u,c){var f=i==null?0:i.length;if(!f)return-1;var h=f-1;return c!==e&&(h=le(c),h=c<0?it(f+h,0):Ft(h,f-1)),Ma(i,ee(u,3),h,!0)}function I_(i){var u=i==null?0:i.length;return u?ht(i,1):[]}function tO(i){var u=i==null?0:i.length;return u?ht(i,yn):[]}function rO(i,u){var c=i==null?0:i.length;return c?(u=u===e?1:le(u),ht(i,u)):[]}function nO(i){for(var u=-1,c=i==null?0:i.length,f={};++u<c;){var h=i[u];f[h[0]]=h[1]}return f}function R_(i){return i&&i.length?i[0]:e}function iO(i,u,c){var f=i==null?0:i.length;if(!f)return-1;var h=c==null?0:le(c);return h<0&&(h=it(f+h,0)),Oo(i,u,h)}function oO(i){var u=i==null?0:i.length;return u?dr(i,0,-1):[]}var uO=de(function(i){var u=qe(i,Up);return u.length&&u[0]===i[0]?Op(u):[]}),sO=de(function(i){var u=Dr(i),c=qe(i,Up);return u===Dr(c)?u=e:c.pop(),c.length&&c[0]===i[0]?Op(c,ee(u,2)):[]}),aO=de(function(i){var u=Dr(i),c=qe(i,Up);return u=typeof u=="function"?u:e,u&&c.pop(),c.length&&c[0]===i[0]?Op(c,e,u):[]});function cO(i,u){return i==null?"":ox.call(i,u)}function Dr(i){var u=i==null?0:i.length;return u?i[u-1]:e}function lO(i,u,c){var f=i==null?0:i.length;if(!f)return-1;var h=f;return c!==e&&(h=le(c),h=h<0?it(f+h,0):Ft(h,f-1)),u===u?WS(i,u,h):Ma(i,Dg,h,!0)}function fO(i,u){return i&&i.length?zg(i,le(u)):e}var pO=de(M_);function M_(i,u){return i&&i.length&&u&&u.length?Rp(i,u):i}function dO(i,u,c){return i&&i.length&&u&&u.length?Rp(i,u,ee(c,2)):i}function DO(i,u,c){return i&&i.length&&u&&u.length?Rp(i,u,e,c):i}var hO=Sn(function(i,u){var c=i==null?0:i.length,f=Ap(i,u);return Jg(i,qe(u,function(h){return xn(h,c)?+h:h}).sort(i_)),f});function mO(i,u){var c=[];if(!(i&&i.length))return c;var f=-1,h=[],y=i.length;for(u=ee(u,3);++f<y;){var C=i[f];u(C,f,i)&&(c.push(C),h.push(f))}return Jg(i,h),c}function ed(i){return i==null?i:cx.call(i)}function gO(i,u,c){var f=i==null?0:i.length;return f?(c&&typeof c!="number"&&Ot(i,u,c)?(u=0,c=f):(u=u==null?0:le(u),c=c===e?f:le(c)),dr(i,u,c)):[]}function _O(i,u){return tc(i,u)}function yO(i,u,c){return jp(i,u,ee(c,2))}function FO(i,u){var c=i==null?0:i.length;if(c){var f=tc(i,u);if(f<c&&Tr(i[f],u))return f}return-1}function EO(i,u){return tc(i,u,!0)}function vO(i,u,c){return jp(i,u,ee(c,2),!0)}function CO(i,u){var c=i==null?0:i.length;if(c){var f=tc(i,u,!0)-1;if(Tr(i[f],u))return f}return-1}function wO(i){return i&&i.length?Yg(i):[]}function bO(i,u){return i&&i.length?Yg(i,ee(u,2)):[]}function AO(i){var u=i==null?0:i.length;return u?dr(i,1,u):[]}function SO(i,u,c){return i&&i.length?(u=c||u===e?1:le(u),dr(i,0,u<0?0:u)):[]}function xO(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 PO(i,u){return i&&i.length?rc(i,ee(u,3),!1,!0):[]}function OO(i,u){return i&&i.length?rc(i,ee(u,3)):[]}var TO=de(function(i){return ii(ht(i,1,Xe,!0))}),BO=de(function(i){var u=Dr(i);return Xe(u)&&(u=e),ii(ht(i,1,Xe,!0),ee(u,2))}),IO=de(function(i){var u=Dr(i);return u=typeof u=="function"?u:e,ii(ht(i,1,Xe,!0),e,u)});function RO(i){return i&&i.length?ii(i):[]}function MO(i,u){return i&&i.length?ii(i,ee(u,2)):[]}function NO(i,u){return u=typeof u=="function"?u:e,i&&i.length?ii(i,e,u):[]}function td(i){if(!(i&&i.length))return[];var u=0;return i=Zn(i,function(c){if(Xe(c))return u=it(c.length,u),!0}),_p(u,function(c){return qe(i,hp(c))})}function N_(i,u){if(!(i&&i.length))return[];var c=td(i);return u==null?c:qe(c,function(f){return Gt(u,e,f)})}var jO=de(function(i,u){return Xe(i)?ts(i,u):[]}),$O=de(function(i){return Lp(Zn(i,Xe))}),LO=de(function(i){var u=Dr(i);return Xe(u)&&(u=e),Lp(Zn(i,Xe),ee(u,2))}),UO=de(function(i){var u=Dr(i);return u=typeof u=="function"?u:e,Lp(Zn(i,Xe),e,u)}),kO=de(td);function qO(i,u){return e_(i||[],u||[],es)}function WO(i,u){return e_(i||[],u||[],is)}var HO=de(function(i){var u=i.length,c=u>1?i[u-1]:e;return c=typeof c=="function"?(i.pop(),c):e,N_(i,c)});function j_(i){var u=_(i);return u.__chain__=!0,u}function zO(i,u){return u(i),i}function fc(i,u){return u(i)}var VO=Sn(function(i){var u=i.length,c=u?i[0]:0,f=this.__wrapped__,h=function(y){return Ap(y,i)};return u>1||this.__actions__.length||!(f instanceof me)||!xn(c)?this.thru(h):(f=f.slice(c,+c+(u?1:0)),f.__actions__.push({func:fc,args:[h],thisArg:e}),new fr(f,this.__chain__).thru(function(y){return u&&!y.length&&y.push(e),y}))});function KO(){return j_(this)}function JO(){return new fr(this.value(),this.__chain__)}function GO(){this.__values__===e&&(this.__values__=X_(this.value()));var i=this.__index__>=this.__values__.length,u=i?e:this.__values__[this.__index__++];return{done:i,value:u}}function YO(){return this}function XO(i){for(var u,c=this;c instanceof Ya;){var f=O_(c);f.__index__=0,f.__values__=e,u?h.__wrapped__=f:u=f;var h=f;c=c.__wrapped__}return h.__wrapped__=i,u}function ZO(){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:fc,args:[ed],thisArg:e}),new fr(u,this.__chain__)}return this.thru(ed)}function QO(){return Qg(this.__wrapped__,this.__actions__)}var eT=nc(function(i,u,c){we.call(i,c)?++i[c]:bn(i,c,1)});function tT(i,u,c){var f=ae(i)?pg:zx;return c&&Ot(i,u,c)&&(u=e),f(i,ee(u,3))}function rT(i,u){var c=ae(i)?Zn:Ng;return c(i,ee(u,3))}var nT=l_(T_),iT=l_(B_);function oT(i,u){return ht(pc(i,u),1)}function uT(i,u){return ht(pc(i,u),yn)}function sT(i,u,c){return c=c===e?1:le(c),ht(pc(i,u),c)}function $_(i,u){var c=ae(i)?cr:ni;return c(i,ee(u,3))}function L_(i,u){var c=ae(i)?AS:Mg;return c(i,ee(u,3))}var aT=nc(function(i,u,c){we.call(i,c)?i[c].push(u):bn(i,c,[u])});function cT(i,u,c,f){i=Nt(i)?i:ko(i),c=c&&!f?le(c):0;var h=i.length;return c<0&&(c=it(h+c,0)),gc(i)?c<=h&&i.indexOf(u,c)>-1:!!h&&Oo(i,u,c)>-1}var lT=de(function(i,u,c){var f=-1,h=typeof u=="function",y=Nt(i)?T(i.length):[];return ni(i,function(C){y[++f]=h?Gt(u,C,c):rs(C,u,c)}),y}),fT=nc(function(i,u,c){bn(i,c,u)});function pc(i,u){var c=ae(i)?qe:qg;return c(i,ee(u,3))}function pT(i,u,c,f){return i==null?[]:(ae(u)||(u=u==null?[]:[u]),c=f?e:c,ae(c)||(c=c==null?[]:[c]),Vg(i,u,c))}var dT=nc(function(i,u,c){i[c?0:1].push(u)},function(){return[[],[]]});function DT(i,u,c){var f=ae(i)?dp:mg,h=arguments.length<3;return f(i,ee(u,4),c,h,ni)}function hT(i,u,c){var f=ae(i)?SS:mg,h=arguments.length<3;return f(i,ee(u,4),c,h,Mg)}function mT(i,u){var c=ae(i)?Zn:Ng;return c(i,hc(ee(u,3)))}function gT(i){var u=ae(i)?Tg:cP;return u(i)}function _T(i,u,c){(c?Ot(i,u,c):u===e)?u=1:u=le(u);var f=ae(i)?Ux:lP;return f(i,u)}function yT(i){var u=ae(i)?kx:pP;return u(i)}function FT(i){if(i==null)return 0;if(Nt(i))return gc(i)?Bo(i):i.length;var u=Et(i);return u==zt||u==Vt?i.size:Bp(i).length}function ET(i,u,c){var f=ae(i)?Dp:dP;return c&&Ot(i,u,c)&&(u=e),f(i,ee(u,3))}var vT=de(function(i,u){if(i==null)return[];var c=u.length;return c>1&&Ot(i,u[0],u[1])?u=[]:c>2&&Ot(u[0],u[1],u[2])&&(u=[u[0]]),Vg(i,ht(u,1),[])}),dc=rx||function(){return ct.Date.now()};function CT(i,u){if(typeof u!="function")throw new lr(o);return i=le(i),function(){if(--i<1)return u.apply(this,arguments)}}function U_(i,u,c){return u=c?e:u,u=i&&u==null?i.length:u,An(i,Q,e,e,e,e,u)}function k_(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 rd=de(function(i,u,c){var f=x;if(c.length){var h=ei(c,Lo(rd));f|=q}return An(i,f,u,c,h)}),q_=de(function(i,u,c){var f=x|O;if(c.length){var h=ei(c,Lo(q_));f|=q}return An(u,f,i,c,h)});function W_(i,u,c){u=c?e:u;var f=An(i,B,e,e,e,e,e,u);return f.placeholder=W_.placeholder,f}function H_(i,u,c){u=c?e:u;var f=An(i,U,e,e,e,e,e,u);return f.placeholder=H_.placeholder,f}function z_(i,u,c){var f,h,y,C,b,S,j=0,$=!1,L=!1,H=!0;if(typeof i!="function")throw new lr(o);u=hr(u)||0,He(c)&&($=!!c.leading,L="maxWait"in c,y=L?it(hr(c.maxWait)||0,u):y,H="trailing"in c?!!c.trailing:H);function J(Ze){var Br=f,Tn=h;return f=h=e,j=Ze,C=i.apply(Tn,Br),C}function te(Ze){return j=Ze,b=ss(De,u),$?J(Ze):C}function pe(Ze){var Br=Ze-S,Tn=Ze-j,ly=u-Br;return L?Ft(ly,y-Tn):ly}function re(Ze){var Br=Ze-S,Tn=Ze-j;return S===e||Br>=u||Br<0||L&&Tn>=y}function De(){var Ze=dc();if(re(Ze))return _e(Ze);b=ss(De,pe(Ze))}function _e(Ze){return b=e,H&&f?J(Ze):(f=h=e,C)}function Qt(){b!==e&&t_(b),j=0,f=S=h=b=e}function Tt(){return b===e?C:_e(dc())}function er(){var Ze=dc(),Br=re(Ze);if(f=arguments,h=this,S=Ze,Br){if(b===e)return te(S);if(L)return t_(b),b=ss(De,u),J(S)}return b===e&&(b=ss(De,u)),C}return er.cancel=Qt,er.flush=Tt,er}var wT=de(function(i,u){return Rg(i,1,u)}),bT=de(function(i,u,c){return Rg(i,hr(u)||0,c)});function AT(i){return An(i,ye)}function Dc(i,u){if(typeof i!="function"||u!=null&&typeof u!="function")throw new lr(o);var c=function(){var f=arguments,h=u?u.apply(this,f):f[0],y=c.cache;if(y.has(h))return y.get(h);var C=i.apply(this,f);return c.cache=y.set(h,C)||y,C};return c.cache=new(Dc.Cache||wn),c}Dc.Cache=wn;function hc(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 ST(i){return k_(2,i)}var xT=DP(function(i,u){u=u.length==1&&ae(u[0])?qe(u[0],Yt(ee())):qe(ht(u,1),Yt(ee()));var c=u.length;return de(function(f){for(var h=-1,y=Ft(f.length,c);++h<y;)f[h]=u[h].call(this,f[h]);return Gt(i,this,f)})}),nd=de(function(i,u){var c=ei(u,Lo(nd));return An(i,q,e,u,c)}),V_=de(function(i,u){var c=ei(u,Lo(V_));return An(i,G,e,u,c)}),PT=Sn(function(i,u){return An(i,fe,e,e,e,u)});function OT(i,u){if(typeof i!="function")throw new lr(o);return u=u===e?u:le(u),de(i,u)}function TT(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],h=ui(c,0,u);return f&&Qn(h,f),Gt(i,this,h)})}function BT(i,u,c){var f=!0,h=!0;if(typeof i!="function")throw new lr(o);return He(c)&&(f="leading"in c?!!c.leading:f,h="trailing"in c?!!c.trailing:h),z_(i,u,{leading:f,maxWait:u,trailing:h})}function IT(i){return U_(i,1)}function RT(i,u){return nd(kp(u),i)}function MT(){if(!arguments.length)return[];var i=arguments[0];return ae(i)?i:[i]}function NT(i){return pr(i,E)}function jT(i,u){return u=typeof u=="function"?u:e,pr(i,E,u)}function $T(i){return pr(i,m|E)}function LT(i,u){return u=typeof u=="function"?u:e,pr(i,m|E,u)}function UT(i,u){return u==null||Ig(i,u,lt(u))}function Tr(i,u){return i===u||i!==i&&u!==u}var kT=sc(Pp),qT=sc(function(i,u){return i>=u}),Xi=Lg((function(){return arguments})())?Lg:function(i){return Ke(i)&&we.call(i,"callee")&&!bg.call(i,"callee")},ae=T.isArray,WT=ug?Yt(ug):Xx;function Nt(i){return i!=null&&mc(i.length)&&!Pn(i)}function Xe(i){return Ke(i)&&Nt(i)}function HT(i){return i===!0||i===!1||Ke(i)&&Pt(i)==En}var si=ix||Dd,zT=sg?Yt(sg):Zx;function VT(i){return Ke(i)&&i.nodeType===1&&!as(i)}function KT(i){if(i==null)return!0;if(Nt(i)&&(ae(i)||typeof i=="string"||typeof i.splice=="function"||si(i)||Uo(i)||Xi(i)))return!i.length;var u=Et(i);if(u==zt||u==Vt)return!i.size;if(us(i))return!Bp(i).length;for(var c in i)if(we.call(i,c))return!1;return!0}function JT(i,u){return ns(i,u)}function GT(i,u,c){c=typeof c=="function"?c:e;var f=c?c(i,u):e;return f===e?ns(i,u,e,c):!!f}function id(i){if(!Ke(i))return!1;var u=Pt(i);return u==Ii||u==If||typeof i.message=="string"&&typeof i.name=="string"&&!as(i)}function YT(i){return typeof i=="number"&&Sg(i)}function Pn(i){if(!He(i))return!1;var u=Pt(i);return u==Ao||u==_a||u==bo||u==Rf}function K_(i){return typeof i=="number"&&i==le(i)}function mc(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 Ke(i){return i!=null&&typeof i=="object"}var J_=ag?Yt(ag):eP;function XT(i,u){return i===u||Tp(i,u,Jp(u))}function ZT(i,u,c){return c=typeof c=="function"?c:e,Tp(i,u,Jp(u),c)}function QT(i){return G_(i)&&i!=+i}function e3(i){if(jP(i))throw new se(n);return Ug(i)}function t3(i){return i===null}function r3(i){return i==null}function G_(i){return typeof i=="number"||Ke(i)&&Pt(i)==Yn}function as(i){if(!Ke(i)||Pt(i)!=xr)return!1;var u=Wa(i);if(u===null)return!0;var c=we.call(u,"constructor")&&u.constructor;return typeof c=="function"&&c instanceof c&&La.call(c)==ZS}var od=cg?Yt(cg):tP;function n3(i){return K_(i)&&i>=-rn&&i<=rn}var Y_=lg?Yt(lg):rP;function gc(i){return typeof i=="string"||!ae(i)&&Ke(i)&&Pt(i)==Ni}function Zt(i){return typeof i=="symbol"||Ke(i)&&Pt(i)==St}var Uo=fg?Yt(fg):nP;function i3(i){return i===e}function o3(i){return Ke(i)&&Et(i)==ji}function u3(i){return Ke(i)&&Pt(i)==Mf}var s3=sc(Ip),a3=sc(function(i,u){return i<=u});function X_(i){if(!i)return[];if(Nt(i))return gc(i)?Pr(i):Mt(i);if(Gu&&i[Gu])return US(i[Gu]());var u=Et(i),c=u==zt?Fp:u==Vt?Na:ko;return c(i)}function On(i){if(!i)return i===0?i:0;if(i=hr(i),i===yn||i===-yn){var u=i<0?-1:1;return u*Fn}return i===i?i:0}function le(i){var u=On(i),c=u%1;return u===u?c?u-c:u:0}function Z_(i){return i?Ki(le(i),0,ur):0}function hr(i){if(typeof i=="number")return i;if(Zt(i))return wo;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=gg(i);var c=Qf.test(i);return c||tp.test(i)?CS(i.slice(2),c?2:8):Zf.test(i)?wo:+i}function Q_(i){return an(i,jt(i))}function c3(i){return i?Ki(le(i),-rn,rn):i===0?i:0}function be(i){return i==null?"":Xt(i)}var l3=jo(function(i,u){if(us(u)||Nt(u)){an(u,lt(u),i);return}for(var c in u)we.call(u,c)&&es(i,c,u[c])}),ey=jo(function(i,u){an(u,jt(u),i)}),_c=jo(function(i,u,c,f){an(u,jt(u),i,f)}),f3=jo(function(i,u,c,f){an(u,lt(u),i,f)}),p3=Sn(Ap);function d3(i,u){var c=No(i);return u==null?c:Bg(c,u)}var D3=de(function(i,u){i=Ie(i);var c=-1,f=u.length,h=f>2?u[2]:e;for(h&&Ot(u[0],u[1],h)&&(f=1);++c<f;)for(var y=u[c],C=jt(y),b=-1,S=C.length;++b<S;){var j=C[b],$=i[j];($===e||Tr($,Io[j])&&!we.call(i,j))&&(i[j]=y[j])}return i}),h3=de(function(i){return i.push(e,g_),Gt(ty,e,i)});function m3(i,u){return dg(i,ee(u,3),sn)}function g3(i,u){return dg(i,ee(u,3),xp)}function _3(i,u){return i==null?i:Sp(i,ee(u,3),jt)}function y3(i,u){return i==null?i:jg(i,ee(u,3),jt)}function F3(i,u){return i&&sn(i,ee(u,3))}function E3(i,u){return i&&xp(i,ee(u,3))}function v3(i){return i==null?[]:Qa(i,lt(i))}function C3(i){return i==null?[]:Qa(i,jt(i))}function ud(i,u,c){var f=i==null?e:Ji(i,u);return f===e?c:f}function w3(i,u){return i!=null&&F_(i,u,Kx)}function sd(i,u){return i!=null&&F_(i,u,Jx)}var b3=p_(function(i,u,c){u!=null&&typeof u.toString!="function"&&(u=Ua.call(u)),i[u]=c},cd($t)),A3=p_(function(i,u,c){u!=null&&typeof u.toString!="function"&&(u=Ua.call(u)),we.call(i,u)?i[u].push(c):i[u]=[c]},ee),S3=de(rs);function lt(i){return Nt(i)?Og(i):Bp(i)}function jt(i){return Nt(i)?Og(i,!0):iP(i)}function x3(i,u){var c={};return u=ee(u,3),sn(i,function(f,h,y){bn(c,u(f,h,y),f)}),c}function P3(i,u){var c={};return u=ee(u,3),sn(i,function(f,h,y){bn(c,h,u(f,h,y))}),c}var O3=jo(function(i,u,c){ec(i,u,c)}),ty=jo(function(i,u,c,f){ec(i,u,c,f)}),T3=Sn(function(i,u){var c={};if(i==null)return c;var f=!1;u=qe(u,function(y){return y=oi(y,i),f||(f=y.length>1),y}),an(i,Vp(i),c),f&&(c=pr(c,m|g|E,bP));for(var h=u.length;h--;)$p(c,u[h]);return c});function B3(i,u){return ry(i,hc(ee(u)))}var I3=Sn(function(i,u){return i==null?{}:uP(i,u)});function ry(i,u){if(i==null)return{};var c=qe(Vp(i),function(f){return[f]});return u=ee(u),Kg(i,c,function(f,h){return u(f,h[0])})}function R3(i,u,c){u=oi(u,i);var f=-1,h=u.length;for(h||(h=1,i=e);++f<h;){var y=i==null?e:i[cn(u[f])];y===e&&(f=h,y=c),i=Pn(y)?y.call(i):y}return i}function M3(i,u,c){return i==null?i:is(i,u,c)}function N3(i,u,c,f){return f=typeof f=="function"?f:e,i==null?i:is(i,u,c,f)}var ny=h_(lt),iy=h_(jt);function j3(i,u,c){var f=ae(i),h=f||si(i)||Uo(i);if(u=ee(u,4),c==null){var y=i&&i.constructor;h?c=f?new y:[]:He(i)?c=Pn(y)?No(Wa(i)):{}:c={}}return(h?cr:sn)(i,function(C,b,S){return u(c,C,b,S)}),c}function $3(i,u){return i==null?!0:$p(i,u)}function L3(i,u,c){return i==null?i:Zg(i,u,kp(c))}function U3(i,u,c,f){return f=typeof f=="function"?f:e,i==null?i:Zg(i,u,kp(c),f)}function ko(i){return i==null?[]:yp(i,lt(i))}function k3(i){return i==null?[]:yp(i,jt(i))}function q3(i,u,c){return c===e&&(c=u,u=e),c!==e&&(c=hr(c),c=c===c?c:0),u!==e&&(u=hr(u),u=u===u?u:0),Ki(hr(i),u,c)}function W3(i,u,c){return u=On(u),c===e?(c=u,u=0):c=On(c),i=hr(i),Gx(i,u,c)}function H3(i,u,c){if(c&&typeof c!="boolean"&&Ot(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=On(i),u===e?(u=i,i=0):u=On(u)),i>u){var f=i;i=u,u=f}if(c||i%1||u%1){var h=xg();return Ft(i+h*(u-i+vS("1e-"+((h+"").length-1))),u)}return Mp(i,u)}var z3=$o(function(i,u,c){return u=u.toLowerCase(),i+(c?oy(u):u)});function oy(i){return ad(be(i).toLowerCase())}function uy(i){return i=be(i),i&&i.replace(Aa,MS).replace(Xn,"")}function V3(i,u,c){i=be(i),u=Xt(u);var f=i.length;c=c===e?f:Ki(le(c),0,f);var h=c;return c-=u.length,c>=0&&i.slice(c,h)==u}function K3(i){return i=be(i),i&&$u.test(i)?i.replace(Ca,NS):i}function J3(i){return i=be(i),i&&Wf.test(i)?i.replace(Uu,"\\$&"):i}var G3=$o(function(i,u,c){return i+(c?"-":"")+u.toLowerCase()}),Y3=$o(function(i,u,c){return i+(c?" ":"")+u.toLowerCase()}),X3=c_("toLowerCase");function Z3(i,u,c){i=be(i),u=le(u);var f=u?Bo(i):0;if(!u||f>=u)return i;var h=(u-f)/2;return uc(Ka(h),c)+i+uc(Va(h),c)}function Q3(i,u,c){i=be(i),u=le(u);var f=u?Bo(i):0;return u&&f<u?i+uc(u-f,c):i}function e8(i,u,c){i=be(i),u=le(u);var f=u?Bo(i):0;return u&&f<u?uc(u-f,c)+i:i}function t8(i,u,c){return c||u==null?u=0:u&&(u=+u),ax(be(i).replace(ku,""),u||0)}function r8(i,u,c){return(c?Ot(i,u,c):u===e)?u=1:u=le(u),Np(be(i),u)}function n8(){var i=arguments,u=be(i[0]);return i.length<3?u:u.replace(i[1],i[2])}var i8=$o(function(i,u,c){return i+(c?"_":"")+u.toLowerCase()});function o8(i,u,c){return c&&typeof c!="number"&&Ot(i,u,c)&&(u=c=e),c=c===e?ur:c>>>0,c?(i=be(i),i&&(typeof u=="string"||u!=null&&!od(u))&&(u=Xt(u),!u&&To(i))?ui(Pr(i),0,c):i.split(u,c)):[]}var u8=$o(function(i,u,c){return i+(c?" ":"")+ad(u)});function s8(i,u,c){return i=be(i),c=c==null?0:Ki(le(c),0,i.length),u=Xt(u),i.slice(c,c+u.length)==u}function a8(i,u,c){var f=_.templateSettings;c&&Ot(i,u,c)&&(u=e),i=be(i),u=_c({},u,f,m_);var h=_c({},u.imports,f.imports,m_),y=lt(h),C=yp(h,y),b,S,j=0,$=u.interpolate||Li,L="__p += '",H=Ep((u.escape||Li).source+"|"+$.source+"|"+($===Lu?Xf:Li).source+"|"+(u.evaluate||Li).source+"|$","g"),J="//# sourceURL="+(we.call(u,"sourceURL")?(u.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ia+"]")+`
|
|
11
|
+
`;i.replace(H,function(re,De,_e,Qt,Tt,er){return _e||(_e=Qt),L+=i.slice(j,er).replace(Sa,jS),De&&(b=!0,L+=`' +
|
|
12
|
+
__e(`+De+`) +
|
|
13
|
+
'`),Tt&&(S=!0,L+=`';
|
|
14
|
+
`+Tt+`;
|
|
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(Gf.test(te))throw new se(s);L=(S?L.replace(Nf,""):L).replace(jf,"$1").replace(Ea,"$1;"),L="function("+(te||"obj")+`) {
|
|
22
|
+
`+(te?"":`obj || (obj = {});
|
|
23
|
+
`)+"var __t, __p = ''"+(b?", __e = _.escape":"")+(S?`, __j = Array.prototype.join;
|
|
24
|
+
function print() { __p += __j.call(arguments, '') }
|
|
25
|
+
`:`;
|
|
26
|
+
`)+L+`return __p
|
|
27
|
+
}`;var pe=ay(function(){return ve(y,J+"return "+L).apply(e,C)});if(pe.source=L,id(pe))throw pe;return pe}function c8(i){return be(i).toLowerCase()}function l8(i){return be(i).toUpperCase()}function f8(i,u,c){if(i=be(i),i&&(c||u===e))return gg(i);if(!i||!(u=Xt(u)))return i;var f=Pr(i),h=Pr(u),y=_g(f,h),C=yg(f,h)+1;return ui(f,y,C).join("")}function p8(i,u,c){if(i=be(i),i&&(c||u===e))return i.slice(0,Eg(i)+1);if(!i||!(u=Xt(u)))return i;var f=Pr(i),h=yg(f,Pr(u))+1;return ui(f,0,h).join("")}function d8(i,u,c){if(i=be(i),i&&(c||u===e))return i.replace(ku,"");if(!i||!(u=Xt(u)))return i;var f=Pr(i),h=_g(f,Pr(u));return ui(f,h).join("")}function D8(i,u){var c=We,f=gt;if(He(u)){var h="separator"in u?u.separator:h;c="length"in u?le(u.length):c,f="omission"in u?Xt(u.omission):f}i=be(i);var y=i.length;if(To(i)){var C=Pr(i);y=C.length}if(c>=y)return i;var b=c-Bo(f);if(b<1)return f;var S=C?ui(C,0,b).join(""):i.slice(0,b);if(h===e)return S+f;if(C&&(b+=S.length-b),od(h)){if(i.slice(b).search(h)){var j,$=S;for(h.global||(h=Ep(h.source,be(ba.exec(h))+"g")),h.lastIndex=0;j=h.exec($);)var L=j.index;S=S.slice(0,L===e?b:L)}}else if(i.indexOf(Xt(h),b)!=b){var H=S.lastIndexOf(h);H>-1&&(S=S.slice(0,H))}return S+f}function h8(i){return i=be(i),i&&$f.test(i)?i.replace(va,HS):i}var m8=$o(function(i,u,c){return i+(c?" ":"")+u.toUpperCase()}),ad=c_("toUpperCase");function sy(i,u,c){return i=be(i),u=c?e:u,u===e?LS(i)?KS(i):OS(i):i.match(u)||[]}var ay=de(function(i,u){try{return Gt(i,e,u)}catch(c){return id(c)?c:new se(c)}}),g8=Sn(function(i,u){return cr(u,function(c){c=cn(c),bn(i,c,rd(i[c],i))}),i});function _8(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 h=-1;++h<u;){var y=i[h];if(Gt(y[0],this,f))return Gt(y[1],this,f)}})}function y8(i){return Hx(pr(i,m))}function cd(i){return function(){return i}}function F8(i,u){return i==null||i!==i?u:i}var E8=f_(),v8=f_(!0);function $t(i){return i}function ld(i){return kg(typeof i=="function"?i:pr(i,m))}function C8(i){return Wg(pr(i,m))}function w8(i,u){return Hg(i,pr(u,m))}var b8=de(function(i,u){return function(c){return rs(c,i,u)}}),A8=de(function(i,u){return function(c){return rs(i,c,u)}});function fd(i,u,c){var f=lt(u),h=Qa(u,f);c==null&&!(He(u)&&(h.length||!f.length))&&(c=u,u=i,i=this,h=Qa(u,lt(u)));var y=!(He(c)&&"chain"in c)||!!c.chain,C=Pn(i);return cr(h,function(b){var S=u[b];i[b]=S,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:S,args:arguments,thisArg:i}),$.__chain__=j,$}return S.apply(i,Qn([this.value()],arguments))})}),i}function S8(){return ct._===this&&(ct._=QS),this}function pd(){}function x8(i){return i=le(i),de(function(u){return zg(u,i)})}var P8=Wp(qe),O8=Wp(pg),T8=Wp(Dp);function cy(i){return Yp(i)?hp(cn(i)):sP(i)}function B8(i){return function(u){return i==null?e:Ji(i,u)}}var I8=d_(),R8=d_(!0);function dd(){return[]}function Dd(){return!1}function M8(){return{}}function N8(){return""}function j8(){return!0}function $8(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 h=_p(f,u);++c<i;)u(c);return h}function L8(i){return ae(i)?qe(i,cn):Zt(i)?[i]:Mt(P_(be(i)))}function U8(i){var u=++XS;return be(i)+u}var k8=oc(function(i,u){return i+u},0),q8=Hp("ceil"),W8=oc(function(i,u){return i/u},1),H8=Hp("floor");function z8(i){return i&&i.length?Za(i,$t,Pp):e}function V8(i,u){return i&&i.length?Za(i,ee(u,2),Pp):e}function K8(i){return hg(i,$t)}function J8(i,u){return hg(i,ee(u,2))}function G8(i){return i&&i.length?Za(i,$t,Ip):e}function Y8(i,u){return i&&i.length?Za(i,ee(u,2),Ip):e}var X8=oc(function(i,u){return i*u},1),Z8=Hp("round"),Q8=oc(function(i,u){return i-u},0);function eB(i){return i&&i.length?gp(i,$t):0}function tB(i,u){return i&&i.length?gp(i,ee(u,2)):0}return _.after=CT,_.ary=U_,_.assign=l3,_.assignIn=ey,_.assignInWith=_c,_.assignWith=f3,_.at=p3,_.before=k_,_.bind=rd,_.bindAll=g8,_.bindKey=q_,_.castArray=MT,_.chain=j_,_.chunk=HP,_.compact=zP,_.concat=VP,_.cond=_8,_.conforms=y8,_.constant=cd,_.countBy=eT,_.create=d3,_.curry=W_,_.curryRight=H_,_.debounce=z_,_.defaults=D3,_.defaultsDeep=h3,_.defer=wT,_.delay=bT,_.difference=KP,_.differenceBy=JP,_.differenceWith=GP,_.drop=YP,_.dropRight=XP,_.dropRightWhile=ZP,_.dropWhile=QP,_.fill=eO,_.filter=rT,_.flatMap=oT,_.flatMapDeep=uT,_.flatMapDepth=sT,_.flatten=I_,_.flattenDeep=tO,_.flattenDepth=rO,_.flip=AT,_.flow=E8,_.flowRight=v8,_.fromPairs=nO,_.functions=v3,_.functionsIn=C3,_.groupBy=aT,_.initial=oO,_.intersection=uO,_.intersectionBy=sO,_.intersectionWith=aO,_.invert=b3,_.invertBy=A3,_.invokeMap=lT,_.iteratee=ld,_.keyBy=fT,_.keys=lt,_.keysIn=jt,_.map=pc,_.mapKeys=x3,_.mapValues=P3,_.matches=C8,_.matchesProperty=w8,_.memoize=Dc,_.merge=O3,_.mergeWith=ty,_.method=b8,_.methodOf=A8,_.mixin=fd,_.negate=hc,_.nthArg=x8,_.omit=T3,_.omitBy=B3,_.once=ST,_.orderBy=pT,_.over=P8,_.overArgs=xT,_.overEvery=O8,_.overSome=T8,_.partial=nd,_.partialRight=V_,_.partition=dT,_.pick=I3,_.pickBy=ry,_.property=cy,_.propertyOf=B8,_.pull=pO,_.pullAll=M_,_.pullAllBy=dO,_.pullAllWith=DO,_.pullAt=hO,_.range=I8,_.rangeRight=R8,_.rearg=PT,_.reject=mT,_.remove=mO,_.rest=OT,_.reverse=ed,_.sampleSize=_T,_.set=M3,_.setWith=N3,_.shuffle=yT,_.slice=gO,_.sortBy=vT,_.sortedUniq=wO,_.sortedUniqBy=bO,_.split=o8,_.spread=TT,_.tail=AO,_.take=SO,_.takeRight=xO,_.takeRightWhile=PO,_.takeWhile=OO,_.tap=zO,_.throttle=BT,_.thru=fc,_.toArray=X_,_.toPairs=ny,_.toPairsIn=iy,_.toPath=L8,_.toPlainObject=Q_,_.transform=j3,_.unary=IT,_.union=TO,_.unionBy=BO,_.unionWith=IO,_.uniq=RO,_.uniqBy=MO,_.uniqWith=NO,_.unset=$3,_.unzip=td,_.unzipWith=N_,_.update=L3,_.updateWith=U3,_.values=ko,_.valuesIn=k3,_.without=jO,_.words=sy,_.wrap=RT,_.xor=$O,_.xorBy=LO,_.xorWith=UO,_.zip=kO,_.zipObject=qO,_.zipObjectDeep=WO,_.zipWith=HO,_.entries=ny,_.entriesIn=iy,_.extend=ey,_.extendWith=_c,fd(_,_),_.add=k8,_.attempt=ay,_.camelCase=z3,_.capitalize=oy,_.ceil=q8,_.clamp=q3,_.clone=NT,_.cloneDeep=$T,_.cloneDeepWith=LT,_.cloneWith=jT,_.conformsTo=UT,_.deburr=uy,_.defaultTo=F8,_.divide=W8,_.endsWith=V3,_.eq=Tr,_.escape=K3,_.escapeRegExp=J3,_.every=tT,_.find=nT,_.findIndex=T_,_.findKey=m3,_.findLast=iT,_.findLastIndex=B_,_.findLastKey=g3,_.floor=H8,_.forEach=$_,_.forEachRight=L_,_.forIn=_3,_.forInRight=y3,_.forOwn=F3,_.forOwnRight=E3,_.get=ud,_.gt=kT,_.gte=qT,_.has=w3,_.hasIn=sd,_.head=R_,_.identity=$t,_.includes=cT,_.indexOf=iO,_.inRange=W3,_.invoke=S3,_.isArguments=Xi,_.isArray=ae,_.isArrayBuffer=WT,_.isArrayLike=Nt,_.isArrayLikeObject=Xe,_.isBoolean=HT,_.isBuffer=si,_.isDate=zT,_.isElement=VT,_.isEmpty=KT,_.isEqual=JT,_.isEqualWith=GT,_.isError=id,_.isFinite=YT,_.isFunction=Pn,_.isInteger=K_,_.isLength=mc,_.isMap=J_,_.isMatch=XT,_.isMatchWith=ZT,_.isNaN=QT,_.isNative=e3,_.isNil=r3,_.isNull=t3,_.isNumber=G_,_.isObject=He,_.isObjectLike=Ke,_.isPlainObject=as,_.isRegExp=od,_.isSafeInteger=n3,_.isSet=Y_,_.isString=gc,_.isSymbol=Zt,_.isTypedArray=Uo,_.isUndefined=i3,_.isWeakMap=o3,_.isWeakSet=u3,_.join=cO,_.kebabCase=G3,_.last=Dr,_.lastIndexOf=lO,_.lowerCase=Y3,_.lowerFirst=X3,_.lt=s3,_.lte=a3,_.max=z8,_.maxBy=V8,_.mean=K8,_.meanBy=J8,_.min=G8,_.minBy=Y8,_.stubArray=dd,_.stubFalse=Dd,_.stubObject=M8,_.stubString=N8,_.stubTrue=j8,_.multiply=X8,_.nth=fO,_.noConflict=S8,_.noop=pd,_.now=dc,_.pad=Z3,_.padEnd=Q3,_.padStart=e8,_.parseInt=t8,_.random=H3,_.reduce=DT,_.reduceRight=hT,_.repeat=r8,_.replace=n8,_.result=R3,_.round=Z8,_.runInContext=A,_.sample=gT,_.size=FT,_.snakeCase=i8,_.some=ET,_.sortedIndex=_O,_.sortedIndexBy=yO,_.sortedIndexOf=FO,_.sortedLastIndex=EO,_.sortedLastIndexBy=vO,_.sortedLastIndexOf=CO,_.startCase=u8,_.startsWith=s8,_.subtract=Q8,_.sum=eB,_.sumBy=tB,_.template=a8,_.times=$8,_.toFinite=On,_.toInteger=le,_.toLength=Z_,_.toLower=c8,_.toNumber=hr,_.toSafeInteger=c3,_.toString=be,_.toUpper=l8,_.trim=f8,_.trimEnd=p8,_.trimStart=d8,_.truncate=D8,_.unescape=h8,_.uniqueId=U8,_.upperCase=m8,_.upperFirst=ad,_.each=$_,_.eachRight=L_,_.first=R_,fd(_,(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==ma;me.prototype[i]=function(h){var y=this.clone();return y.__iteratees__.push({iteratee:ee(h,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($t)},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 rs(c,i,u)})}),me.prototype.reject=function(i){return this.filter(hc(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),h=_[f?"take"+(u=="last"?"Right":""):u],y=f||/^find/.test(u);h&&(_.prototype[u]=function(){var C=this.__wrapped__,b=f?[1]:arguments,S=C instanceof me,j=b[0],$=S||ae(C),L=function(De){var _e=h.apply(_,Qn([De],b));return f&&H?_e[0]:_e};$&&c&&typeof j=="function"&&j.length!=1&&(S=$=!1);var H=this.__chain__,J=!!this.__actions__.length,te=y&&!H,pe=S&&!J;if(!y&&$){C=pe?C:new me(this);var re=i.apply(C,b);return re.__actions__.push({func:fc,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=ja[i],c=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",f=/^(?:pop|shift)$/.test(i);_.prototype[i]=function(){var h=arguments;if(f&&!this.__chain__){var y=this.value();return u.apply(ae(y)?y:[],h)}return this[c](function(C){return u.apply(ae(C)?C:[],h)})}}),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[ic(e,O).name]=[{name:"wrapper",func:e}],me.prototype.clone=hx,me.prototype.reverse=mx,me.prototype.value=gx,_.prototype.at=VO,_.prototype.chain=KO,_.prototype.commit=JO,_.prototype.next=GO,_.prototype.plant=XO,_.prototype.reverse=ZO,_.prototype.toJSON=_.prototype.valueOf=_.prototype.value=QO,_.prototype.first=_.prototype.head,Gu&&(_.prototype[Gu]=YO),_}),ti=JS();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(ct._=ti,define(function(){return ti})):Wi?((Wi.exports=ti)._=ti,lp._=ti):ct._=ti}).call(ru)});var oC=M((iC,MD)=>{d();(function(e){function t(){var n=e();return n.default||n}if(typeof iC=="object"&&typeof MD=="object")MD.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=(D,R)=>{for(var W in R)e(D,W,{get:R[W],enumerable:!0})},s=(D,R,W,z)=>{if(R&&typeof R=="object"||typeof R=="function")for(let ie of r(R))!n.call(D,ie)&&ie!==W&&e(D,ie,{get:()=>R[ie],enumerable:!(z=t(R,ie))||z.enumerable});return D},a=D=>s(e({},"__esModule",{value:!0}),D),l={};o(l,{builders:()=>sp,printer:()=>Ta,utils:()=>Po});var p=1,m=(D,R)=>(W,z,...ie)=>W|p&&z==null?void 0:(R.call(z)??z[D]).apply(z,ie);function g(D){return this[D<0?this.length+D:D]}var E=m("at",function(){if(Array.isArray(this)||typeof this=="string")return g}),w=E,v=()=>{},x=v,O="string",P="array",B="cursor",U="indent",q="align",G="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",ma=new Set([B,U,q,G,Q,fe,ye,We,gt,tn,dt,Sr,or]);function yn(D){let R=D.length;for(;R>0&&(D[R-1]==="\r"||D[R-1]===`
|
|
28
|
+
`);)R--;return R<D.length?D.slice(0,R):D}function rn(D){if(typeof D=="string")return O;if(Array.isArray(D))return P;if(!D)return;let{type:R}=D;if(ma.has(R))return R}var Fn=rn,wo=D=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(D);function ur(D){let R=D===null?"null":typeof D;if(R!=="string"&&R!=="object")return`Unexpected doc '${R}',
|
|
29
|
+
Expected it to be 'string' or 'object'.`;if(Fn(D))throw new Error("doc is valid.");let W=Object.prototype.toString.call(D);if(W!=="[object Object]")return`Unexpected doc '${W}'.`;let z=wo([...ma].map(ie=>`'${ie}'`));return`Unexpected doc.type '${D.type}'.
|
|
30
|
+
Expected it to be ${z}.`}var Bf=class extends Error{name="InvalidDocError";constructor(D){super(ur(D)),this.doc=D}},Kn=Bf,ga={};function Jn(D,R,W,z){let ie=[D];for(;ie.length>0;){let K=ie.pop();if(K===ga){W(ie.pop());continue}W&&ie.push(K,ga);let Y=Fn(K);if(!Y)throw new Kn(K);if(R?.(K)!==!1)switch(Y){case P:case fe:{let ge=Y===P?K:K.parts;for(let ke=ge.length,Ce=ke-1;Ce>=0;--Ce)ie.push(ge[Ce]);break}case ye:ie.push(K.flatContents,K.breakContents);break;case Q:if(z&&K.expandedStates)for(let ge=K.expandedStates.length,ke=ge-1;ke>=0;--ke)ie.push(K.expandedStates[ke]);else ie.push(K.contents);break;case q:case U:case We:case Sr:case gt:ie.push(K.contents);break;case O:case B:case G:case tn:case dt:case or:break;default:throw new Kn(K)}}}var Gn=Jn;function bo(D,R){if(typeof D=="string")return R(D);let W=new Map;return z(D);function z(K){if(W.has(K))return W.get(K);let Y=ie(K);return W.set(K,Y),Y}function ie(K){switch(Fn(K)){case P:return R(K.map(z));case fe:return R({...K,parts:K.parts.map(z)});case ye:return R({...K,breakContents:z(K.breakContents),flatContents:z(K.flatContents)});case Q:{let{expandedStates:Y,contents:ge}=K;return Y?(Y=Y.map(z),ge=Y[0]):ge=z(ge),R({...K,contents:ge,expandedStates:Y})}case q:case U:case We:case Sr:case gt:return R({...K,contents:z(K.contents)});case O:case B:case G:case tn:case dt:case or:return R(K);default:throw new Kn(K)}}}function En(D,R,W){let z=W,ie=!1;function K(Y){if(ie)return!1;let ge=R(Y);ge!==void 0&&(ie=!0,z=ge)}return Gn(D,K),z}function Bi(D){if(D.type===Q&&D.break||D.type===dt&&D.hard||D.type===or)return!0}function If(D){return En(D,Bi,!1)}function Ii(D){if(D.length>0){let R=w(0,D,-1);!R.expandedStates&&!R.break&&(R.break="propagated")}return null}function Ao(D){let R=new Set,W=[];function z(K){if(K.type===or&&Ii(W),K.type===Q){if(W.push(K),R.has(K))return!1;R.add(K)}}function ie(K){K.type===Q&&W.pop().break&&Ii(W)}Gn(D,z,ie,!0)}function _a(D){return D.type===dt&&!D.hard?D.soft?"":" ":D.type===ye?D.flatContents:D}function zt(D){return bo(D,_a)}function Yn(D){for(D=[...D];D.length>=2&&w(0,D,-2).type===dt&&w(0,D,-1).type===or;)D.length-=2;if(D.length>0){let R=Ri(w(0,D,-1));D[D.length-1]=R}return D}function Ri(D){switch(Fn(D)){case U:case We:case Q:case gt:case Sr:{let R=Ri(D.contents);return{...D,contents:R}}case ye:return{...D,breakContents:Ri(D.breakContents),flatContents:Ri(D.flatContents)};case fe:return{...D,parts:Yn(D.parts)};case P:return Yn(D);case O:return yn(D);case q:case B:case G:case tn:case dt:case or:break;default:throw new Kn(D)}return D}function xr(D){return Ri(Rf(D))}function ya(D){switch(Fn(D)){case fe:if(D.parts.every(R=>R===""))return"";break;case Q:if(!D.contents&&!D.id&&!D.break&&!D.expandedStates)return"";if(D.contents.type===Q&&D.contents.id===D.id&&D.contents.break===D.break&&D.contents.expandedStates===D.expandedStates)return D.contents;break;case q:case U:case We:case gt:if(!D.contents)return"";break;case ye:if(!D.flatContents&&!D.breakContents)return"";break;case P:{let R=[];for(let W of D){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 B:case G:case tn:case dt:case Sr:case or:break;default:throw new Kn(D)}return D}function Rf(D){return bo(D,R=>ya(R))}function Mi(D,R=Lu){return bo(D,W=>typeof W=="string"?Ea(R,W.split(`
|
|
31
|
+
`)):W)}function Vt(D){if(D.type===dt)return!0}function Ni(D){return En(D,Vt,!1)}var St=x,Fa=x,ji=x,Mf=x;function nn(D){return St(D),{type:U,contents:D}}function Kt(D,R){return Mf(D),St(R),{type:q,contents:R,n:D}}function Tu(D){return Kt(Number.NEGATIVE_INFINITY,D)}function Bu(D){return Kt({type:"root"},D)}function Iu(D){return Kt(-1,D)}function Ru(D,R,W){St(D);let z=D;if(R>0){for(let ie=0;ie<Math.floor(R/W);++ie)z=nn(z);z=Kt(R%W,z),z=Kt(Number.NEGATIVE_INFINITY,z)}return z}var $i={type:or},Mu={type:B};function Nu(D){return ji(D),{type:fe,parts:D}}function So(D,R={}){return St(D),Fa(R.expandedStates,!0),{type:Q,id:R.id,contents:D,break:!!R.shouldBreak,expandedStates:R.expandedStates}}function ju(D,R){return So(D[0],{...R,expandedStates:D})}function Nf(D,R="",W={}){return St(D),R!==""&&St(R),{type:ye,breakContents:D,flatContents:R,groupId:W.groupId}}function jf(D,R){return St(D),{type:We,contents:D,groupId:R.groupId,negate:R.negate}}function Ea(D,R){St(D),Fa(R);let W=[];for(let z=0;z<R.length;z++)z!==0&&W.push(D),W.push(R[z]);return W}function va(D,R){return St(R),D?{type:Sr,label:D,contents:R}:R}var Ca={type:dt},$f={type:dt,soft:!0},$u={type:dt,hard:!0},Lf=[$u,$i],wa={type:dt,hard:!0,literal:!0},Lu=[wa,$i];function Uf(D){return St(D),{type:gt,contents:D}}var kf={type:tn},qf={type:G},Uu=String.prototype.replaceAll??function(D,R){return D.global?this.replace(D,R):this.split(D).join(R)},Wf=m("replaceAll",function(){if(typeof this=="string")return Uu}),ku=Wf,Hf="cr",zf="crlf",Vf="\r",Kf=`\r
|
|
32
|
+
`,Jf=`
|
|
33
|
+
`,Gf=Jf;function Yf(D){return D===Hf?Vf:D===zf?Kf:Gf}var Xf=()=>/[#*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 ba(D){return D===12288||D>=65281&&D<=65376||D>=65504&&D<=65510}function Zf(D){return D>=4352&&D<=4447||D===8986||D===8987||D===9001||D===9002||D>=9193&&D<=9196||D===9200||D===9203||D===9725||D===9726||D===9748||D===9749||D>=9776&&D<=9783||D>=9800&&D<=9811||D===9855||D>=9866&&D<=9871||D===9875||D===9889||D===9898||D===9899||D===9917||D===9918||D===9924||D===9925||D===9934||D===9940||D===9962||D===9970||D===9971||D===9973||D===9978||D===9981||D===9989||D===9994||D===9995||D===10024||D===10060||D===10062||D>=10067&&D<=10069||D===10071||D>=10133&&D<=10135||D===10160||D===10175||D===11035||D===11036||D===11088||D===11093||D>=11904&&D<=11929||D>=11931&&D<=12019||D>=12032&&D<=12245||D>=12272&&D<=12287||D>=12289&&D<=12350||D>=12353&&D<=12438||D>=12441&&D<=12543||D>=12549&&D<=12591||D>=12593&&D<=12686||D>=12688&&D<=12773||D>=12783&&D<=12830||D>=12832&&D<=12871||D>=12880&&D<=42124||D>=42128&&D<=42182||D>=43360&&D<=43388||D>=44032&&D<=55203||D>=63744&&D<=64255||D>=65040&&D<=65049||D>=65072&&D<=65106||D>=65108&&D<=65126||D>=65128&&D<=65131||D>=94176&&D<=94180||D>=94192&&D<=94198||D>=94208&&D<=101589||D>=101631&&D<=101662||D>=101760&&D<=101874||D>=110576&&D<=110579||D>=110581&&D<=110587||D===110589||D===110590||D>=110592&&D<=110882||D===110898||D>=110928&&D<=110930||D===110933||D>=110948&&D<=110951||D>=110960&&D<=111355||D>=119552&&D<=119638||D>=119648&&D<=119670||D===126980||D===127183||D===127374||D>=127377&&D<=127386||D>=127488&&D<=127490||D>=127504&&D<=127547||D>=127552&&D<=127560||D===127568||D===127569||D>=127584&&D<=127589||D>=127744&&D<=127776||D>=127789&&D<=127797||D>=127799&&D<=127868||D>=127870&&D<=127891||D>=127904&&D<=127946||D>=127951&&D<=127955||D>=127968&&D<=127984||D===127988||D>=127992&&D<=128062||D===128064||D>=128066&&D<=128252||D>=128255&&D<=128317||D>=128331&&D<=128334||D>=128336&&D<=128359||D===128378||D===128405||D===128406||D===128420||D>=128507&&D<=128591||D>=128640&&D<=128709||D===128716||D>=128720&&D<=128722||D>=128725&&D<=128728||D>=128732&&D<=128735||D===128747||D===128748||D>=128756&&D<=128764||D>=128992&&D<=129003||D===129008||D>=129292&&D<=129338||D>=129340&&D<=129349||D>=129351&&D<=129535||D>=129648&&D<=129660||D>=129664&&D<=129674||D>=129678&&D<=129734||D===129736||D>=129741&&D<=129756||D>=129759&&D<=129770||D>=129775&&D<=129784||D>=131072&&D<=196605||D>=196608&&D<=262141}var Qf="\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",ep=/[^\x20-\x7F]/u,tp=new Set(Qf);function rp(D){if(!D)return 0;if(!ep.test(D))return D.length;D=D.replace(Xf(),W=>tp.has(W)?" ":" ");let R=0;for(let W of D){let z=W.codePointAt(0);z<=31||z>=127&&z<=159||z>=768&&z<=879||z>=65024&&z<=65039||(R+=ba(z)||Zf(z)?2:1)}return R}var Aa=rp,Li=0,Sa=1,Ui=2,xa=3,np={type:Li},ip={type:Sa},qu={value:"",length:0,queue:[],get root(){return qu}};function Wu(D,R,W){let z=R.type===Sa?D.queue.slice(0,-1):[...D.queue,R],ie="",K=0,Y=0,ge=0;for(let Me of z)switch(Me.type){case Li:rt(),W.useTabs?ke(1):Ce(W.tabWidth);break;case xa:{let{string:xt}=Me;rt(),ie+=xt,K+=xt.length;break}case Ui:{let{width:xt}=Me;Y+=1,ge+=xt;break}default:throw new Error(`Unexpected indent comment '${Me.type}'.`)}return on(),{...D,value:ie,length:K,queue:z};function ke(Me){ie+=" ".repeat(Me),K+=W.tabWidth*Me}function Ce(Me){ie+=" ".repeat(Me),K+=Me}function rt(){W.useTabs?Be():on()}function Be(){Y>0&&ke(Y),st()}function on(){ge>0&&Ce(ge),st()}function st(){Y=0,ge=0}}function Pa(D,R,W){if(!R)return D;if(R.type==="root")return{...D,root:D};if(R===Number.NEGATIVE_INFINITY)return D.root;let z;return typeof R=="number"?R<0?z=ip:z={type:Ui,width:R}:z={type:xa,string:R},Wu(D,z,W)}function op(D,R){return Wu(D,np,R)}function up(D){let R=0;for(let W=D.length-1;W>=0;W--){let z=D[W];if(z===" "||z===" ")R++;else break}return R}function Oa(D){let R=up(D);return{text:R===0?D:D.slice(0,D.length-R),count:R}}var _t=Symbol("MODE_BREAK"),Jt=Symbol("MODE_FLAT"),xo=Symbol("DOC_FILL_PRINTED_LENGTH");function ki(D,R,W,z,ie,K){if(W===Number.POSITIVE_INFINITY)return!0;let Y=R.length,ge=!1,ke=[D],Ce="";for(;W>=0;){if(ke.length===0){if(Y===0)return!0;ke.push(R[--Y]);continue}let{mode:rt,doc:Be}=ke.pop(),on=Fn(Be);switch(on){case O:Be&&(ge&&(Ce+=" ",W-=1,ge=!1),Ce+=Be,W-=Aa(Be));break;case P:case fe:{let st=on===P?Be:Be.parts,Me=Be[xo]??0;for(let xt=st.length-1;xt>=Me;xt--)ke.push({mode:rt,doc:st[xt]});break}case U:case q:case We:case Sr:ke.push({mode:rt,doc:Be.contents});break;case G:{let{text:st,count:Me}=Oa(Ce);Ce=st,W+=Me;break}case Q:{if(K&&Be.break)return!1;let st=Be.break?_t:rt,Me=Be.expandedStates&&st===_t?w(0,Be.expandedStates,-1):Be.contents;ke.push({mode:st,doc:Me});break}case ye:{let Me=(Be.groupId?ie[Be.groupId]||Jt:rt)===_t?Be.breakContents:Be.flatContents;Me&&ke.push({mode:rt,doc:Me});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 Hu(D,R){let W=Object.create(null),z=R.printWidth,ie=Yf(R.endOfLine),K=0,Y=[{indent:qu,mode:_t,doc:D}],ge="",ke=!1,Ce=[],rt=[],Be=[],on=[],st=0;for(Ao(D);Y.length>0;){let{indent:Fe,mode:Dt,doc:ne}=Y.pop();switch(Fn(ne)){case O:{let at=ie!==`
|
|
34
|
+
`?ku(0,ne,`
|
|
35
|
+
`,ie):ne;at&&(ge+=at,Y.length>0&&(K+=Aa(at)));break}case P:for(let at=ne.length-1;at>=0;at--)Y.push({indent:Fe,mode:Dt,doc:ne[at]});break;case B:if(rt.length>=2)throw new Error("There are too many 'cursor' in doc.");rt.push(st+ge.length);break;case U:Y.push({indent:op(Fe,R),mode:Dt,doc:ne.contents});break;case q:Y.push({indent:Pa(Fe,ne.n,R),mode:Dt,doc:ne.contents});break;case G:Ba();break;case Q:switch(Dt){case Jt:if(!ke){Y.push({indent:Fe,mode:ne.break?_t:Jt,doc:ne.contents});break}case _t:{ke=!1;let at={indent:Fe,mode:Jt,doc:ne.contents},yt=z-K,vn=Ce.length>0;if(!ne.break&&ki(at,Y,yt,vn,W))Y.push(at);else if(ne.expandedStates){let Xn=w(0,ne.expandedStates,-1);if(ne.break){Y.push({indent:Fe,mode:_t,doc:Xn});break}else for(let sr=1;sr<ne.expandedStates.length+1;sr++)if(sr>=ne.expandedStates.length){Y.push({indent:Fe,mode:_t,doc:Xn});break}else{let qi=ne.expandedStates[sr],un={indent:Fe,mode:Jt,doc:qi};if(ki(un,Y,yt,vn,W)){Y.push(un);break}}}else Y.push({indent:Fe,mode:_t,doc:ne.contents});break}}ne.id&&(W[ne.id]=w(0,Y,-1).mode);break;case fe:{let at=z-K,yt=ne[xo]??0,{parts:vn}=ne,Xn=vn.length-yt;if(Xn===0)break;let sr=vn[yt+0],qi=vn[yt+1],un={indent:Fe,mode:Jt,doc:sr},Vu={indent:Fe,mode:_t,doc:sr},Ku=ki(un,[],at,Ce.length>0,W,!0);if(Xn===1){Ku?Y.push(un):Y.push(Vu);break}let Ia={indent:Fe,mode:Jt,doc:qi},xe={indent:Fe,mode:_t,doc:qi};if(Xn===2){Ku?Y.push(Ia,un):Y.push(xe,Vu);break}let Pe=vn[yt+2],ap={indent:Fe,mode:Dt,doc:{...ne,[xo]:yt+2}},cp=ki({indent:Fe,mode:Jt,doc:[sr,qi,Pe]},[],at,Ce.length>0,W,!0);Y.push(ap),cp?Y.push(Ia,un):Ku?Y.push(xe,un):Y.push(xe,Vu);break}case ye:case We:{let at=ne.groupId?W[ne.groupId]:Dt;if(at===_t){let yt=ne.type===ye?ne.breakContents:ne.negate?ne.contents:nn(ne.contents);yt&&Y.push({indent:Fe,mode:Dt,doc:yt})}if(at===Jt){let yt=ne.type===ye?ne.flatContents:ne.negate?nn(ne.contents):ne.contents;yt&&Y.push({indent:Fe,mode:Dt,doc:yt})}break}case gt:Ce.push({indent:Fe,mode:Dt,doc:ne.contents});break;case tn:Ce.length>0&&Y.push({indent:Fe,mode:Dt,doc:$u});break;case dt:switch(Dt){case Jt:if(ne.hard)ke=!0;else{ne.soft||(ge+=" ",K+=1);break}case _t:if(Ce.length>0){Y.push({indent:Fe,mode:Dt,doc:ne},...Ce.reverse()),Ce.length=0;break}ne.literal?(ge+=ie,K=0,Fe.root&&(Fe.root.value&&(ge+=Fe.root.value),K=Fe.root.length)):(Ba(),ge+=ie+Fe.value,K=Fe.length);break}break;case Sr:Y.push({indent:Fe,mode:Dt,doc:ne.contents});break;case or:break;default:throw new Kn(ne)}Y.length===0&&Ce.length>0&&(Y.push(...Ce.reverse()),Ce.length=0)}let Me=Be.join("")+ge,xt=[...on,...rt];if(xt.length!==2)return{formatted:Me};let zu=xt[0];return{formatted:Me,cursorNodeStart:zu,cursorNodeText:Me.slice(zu,w(0,xt,-1))};function Ba(){let{text:Fe,count:Dt}=Oa(ge);Fe&&(Be.push(Fe),st+=Fe.length),ge="",K-=Dt,rt.length>0&&(on.push(...rt.map(ne=>Math.min(ne,st))),rt.length=0)}}var sp={join:Ea,line:Ca,softline:$f,hardline:Lf,literalline:Lu,group:So,conditionalGroup:ju,fill:Nu,lineSuffix:Uf,lineSuffixBoundary:kf,cursor:Mu,breakParent:$i,ifBreak:Nf,trim:qf,indent:nn,indentIfBreak:jf,align:Kt,addAlignmentToDoc:Ru,markAsRoot:Bu,dedentToRoot:Tu,dedent:Iu,hardlineWithoutBreakParent:$u,literallineWithoutBreakParent:wa,label:va,concat:D=>D},Ta={printDocToString:Hu},Po={willBreak:If,traverseDoc:Gn,findInDoc:En,mapDoc:bo,removeLines:zt,stripTrailingHardline:xr,replaceEndOfLine:Mi,canBreak:Ni};return a(l)})});var $C=M((kte,jC)=>{"use strict";d();var UD=Object.defineProperty,yM=Object.getOwnPropertyDescriptor,fC=Object.getOwnPropertyNames,FM=Object.prototype.hasOwnProperty,Ne=(e,t)=>function(){return e&&(t=(0,e[fC(e)[0]])(e=0)),t},pC=(e,t)=>{for(var r in t)UD(e,r,{get:t[r],enumerable:!0})},EM=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of fC(t))!FM.call(e,o)&&o!==r&&UD(e,o,{get:()=>t[o],enumerable:!(n=yM(t,o))||n.enumerable});return e},uC=e=>EM(UD({},"__esModule",{value:!0}),e),sC,dC,vM=Ne({"scripts/build/shims/shared.js"(){sC=1,dC=(e,t)=>(r,n,...o)=>r|sC&&n==null?void 0:(t.call(n)??n[e]).apply(n,o)}}),aC,cC,DC,CM=Ne({"scripts/build/shims/method-replace-all.js"(){vM(),aC=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},cC=dC("replaceAll",function(){if(typeof this=="string")return aC}),DC=cC}});function Rs(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 hC,Fi,kD,qD,ao=Ne({"src/utilities/skip.js"(){hC=Rs(/\s/u),Fi=Rs(" "),kD=Rs(",; "),qD=Rs(/[^\n\r]/u)}});function wM(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 yl,WD=Ne({"src/utilities/skip-inline-comment.js"(){yl=wM}});function bM(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($D(o))return t-1}else{if(o==="\r"&&e.charAt(t+1)===`
|
|
37
|
+
`)return t+2;if($D(o))return t+1}return t}var $D,so,Ms=Ne({"src/utilities/skip-newline.js"(){$D=e=>e===`
|
|
38
|
+
`||e==="\r"||e==="\u2028"||e==="\u2029",so=bM}});function AM(e,t){return t===!1?!1:e.charAt(t)==="/"&&e.charAt(t+1)==="/"?qD(e,t):t}var Fl,HD=Ne({"src/utilities/skip-trailing-comment.js"(){ao(),Fl=AM}});function SM(e,t){let r=null,n=t;for(;n!==r;)r=n,n=Fi(e,n),n=yl(e,n),n=Fl(e,n),n=so(e,n);return n}var El,mC=Ne({"src/utilities/get-next-non-space-non-comment-character-index.js"(){ao(),WD(),Ms(),HD(),El=SM}});function xM(e,t,r={}){let n=Fi(e,r.backwards?t-1:t,r),o=so(e,n,r);return n!==o}var zD,gC=Ne({"src/utilities/has-newline.js"(){ao(),Ms(),zD=xM}});function PM(e,t){let r=null,n=t;for(;n!==r;)r=n,n=kD(e,n),n=yl(e,n),n=Fi(e,n);return n=Fl(e,n),n=so(e,n),n!==!1&&zD(e,n)}var vl,OM=Ne({"src/utilities/is-next-line-empty.js"(){gC(),ao(),WD(),Ms(),HD(),vl=PM}});function TM(e,t){let r=t-1;r=Fi(e,r,{backwards:!0}),r=so(e,r,{backwards:!0}),r=Fi(e,r,{backwards:!0});let n=so(e,r,{backwards:!0});return r!==n}var VD,BM=Ne({"src/utilities/is-previous-line-empty.js"(){ao(),Ms(),VD=TM}});function IM(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 KD(e,t){(e.comments??(e.comments=[])).push(t),t.printed=!1,t.nodeDescription=IM(e)}function RM(e,t){t.leading=!0,t.trailing=!1,KD(e,t)}function MM(e,t,r){t.leading=!1,t.trailing=!1,r&&(t.marker=r),KD(e,t)}function NM(e,t){t.leading=!1,t.trailing=!0,KD(e,t)}var jM=Ne({"src/main/comments/utilities.js"(){}});function $M(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 JD,_C=Ne({"src/utilities/get-alignment-size.js"(){JD=$M}});function LM(e,t){let r=e.lastIndexOf(`
|
|
39
|
+
`);return r===-1?0:JD(e.slice(r+1).match(/^[\t ]*/u)[0],t)}var yC,UM=Ne({"src/utilities/get-indent-size.js"(){_C(),yC=LM}});function kM(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var qM=Ne({"node_modules/escape-string-regexp/index.js"(){}});function WM(e,t){let r=e.matchAll(new RegExp(`(?:${kM(t)})+`,"gu"));return r.reduce||(r=[...r]),r.reduce((n,[o])=>Math.max(n,o.length),0)/t.length}var FC,HM=Ne({"src/utilities/get-max-continuous-count.js"(){qM(),FC=WM}});function zM(e,t){let r=El(e,t);return r===!1?"":e.charAt(r)}var EC,VM=Ne({"src/utilities/get-next-non-space-non-comment-character.js"(){mC(),EC=zM}});function KM(e,t){let{preferred:r,alternate:n}=t===!0||t===LD?vC:CC,{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 LD,lC,ND,jD,vC,CC,wC,JM=Ne({"src/utilities/get-preferred-quote.js"(){LD="'",lC='"',ND=Object.freeze({character:LD,codePoint:39}),jD=Object.freeze({character:lC,codePoint:34}),vC=Object.freeze({preferred:ND,alternate:jD}),CC=Object.freeze({preferred:jD,alternate:ND}),wC=KM}}),bC,GM=Ne({"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 YM(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function XM(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 ZM=Ne({"node_modules/get-east-asian-width/lookup.js"(){}}),QM=Ne({"node_modules/get-east-asian-width/index.js"(){ZM()}}),AC,eN=Ne({"src/utilities/narrow-emojis.evaluate.js"(){AC="\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 tN(e){if(!e)return 0;if(!SC.test(e))return e.length;e=e.replace(bC(),r=>xC.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+=YM(n)||XM(n)?2:1)}return t}var SC,xC,PC,rN=Ne({"src/utilities/get-string-width.js"(){GM(),QM(),eN(),SC=/[^\x20-\x7F]/u,xC=new Set(AC),PC=tN}});function nN(e,t,r){for(let n=t;n<r;++n)if(e.charAt(n)===`
|
|
40
|
+
`)return!0;return!1}var OC,iN=Ne({"src/utilities/has-newline-in-range.js"(){OC=nN}});function oN(e,t,r={}){return Fi(e,r.backwards?t-1:t,r)!==t}var TC,uN=Ne({"src/utilities/has-spaces.js"(){ao(),TC=oN}}),BC={};pC(BC,{addDanglingComment:()=>MM,addLeadingComment:()=>RM,addTrailingComment:()=>NM,getAlignmentSize:()=>JD,getIndentSize:()=>yC,getMaxContinuousCount:()=>FC,getNextNonSpaceNonCommentCharacter:()=>EC,getNextNonSpaceNonCommentCharacterIndex:()=>aN,getPreferredQuote:()=>wC,getStringWidth:()=>PC,hasNewline:()=>zD,hasNewlineInRange:()=>OC,hasSpaces:()=>TC,isNextLineEmpty:()=>dN,isNextLineEmptyAfterIndex:()=>vl,isPreviousLineEmpty:()=>lN,makeString:()=>pN,skip:()=>Rs,skipEverythingButNewLine:()=>qD,skipInlineComment:()=>yl,skipNewline:()=>so,skipSpaces:()=>Fi,skipToLineEnd:()=>kD,skipTrailingComment:()=>Fl,skipWhitespace:()=>hC});function sN(e,t,r){return El(e,r(t))}function aN(e,t){return arguments.length===2||typeof t=="number"?El(e,t):sN(...arguments)}function cN(e,t,r){return VD(e,r(t))}function lN(e,t){return arguments.length===2||typeof t=="number"?VD(e,t):cN(...arguments)}function fN(e,t,r){return vl(e,r(t))}function pN(e,t,r){let n=t==='"'?"'":'"',s=DC(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 dN(e,t){return arguments.length===2||typeof t=="number"?vl(e,t):fN(...arguments)}var DN=Ne({"src/utilities/public.js"(){CM(),mC(),OM(),BM(),jM(),_C(),UM(),HM(),VM(),JM(),rN(),gC(),iN(),uN(),ao(),WD(),Ms(),HD()}}),IC={};pC(IC,{default:()=>RC});var RC,hN=Ne({"src/main/version.evaluate.js"(){RC="3.8.4"}}),MC=import("./prettier-RVUAAWC7.js"),mN=["formatWithCursor","format","check","resolveConfig","resolveConfigFile","clearConfigCache","getFileInfo","getSupportInfo"],nu=Object.create(null);for(let e of mN)nu[e]=async(...t)=>(await MC)[e](...t);var gN=["parse","formatAST","formatDoc","printToDoc","printDocToString"],NC=Object.create(null);for(let e of gN)NC[e]=async(...t)=>(await MC).__debug[e](...t);nu.__debug=NC;nu.util=(DN(),uC(BC)),nu.doc=oC(),nu.version=(hN(),uC(IC)).default;jC.exports=nu});var LC=M(iu=>{"use strict";d();var _N=iu&&iu.__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{m(n.next(g))}catch(E){a(E)}}function p(g){try{m(n.throw(g))}catch(E){a(E)}}function m(g){g.done?s(g.value):o(g.value).then(l,p)}m((n=n.apply(e,t||[])).next())})};Object.defineProperty(iu,"__esModule",{value:!0});iu.format=void 0;var yN=$C();function FN(e,t){return _N(this,void 0,void 0,function*(){return t.format?(0,yN.format)(e,Object.assign({parser:"typescript"},t.style)):e})}iu.format=FN});var Cl=M(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 EN(e){return"comment"in e&&e.comment!=null&&e.comment!==""||"deprecated"in e&&e.deprecated===!0}kt.hasComment=EN;function vN(e){return"standaloneName"in e&&e.standaloneName!=null&&e.standaloneName!==""}kt.hasStandaloneName=vN;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 co=M(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 UC=Nn();pt.Parent=Symbol("Parent");pt.Types=Symbol("Types");pt.Intersection=Symbol("Intersection");pt.getRootSchema=(0,UC.memoize)(e=>{let t=e[pt.Parent];return t?(0,pt.getRootSchema)(t):e});function CN(e){return e===!0||e===!1}pt.isBoolean=CN;function wN(e){return!(0,UC.isPlainObject)(e)}pt.isPrimitive=wN;function bN(e){return Array.isArray(e.type)||"anyOf"in e||"oneOf"in e}pt.isCompound=bN});var ou=M((Gte,lo)=>{"use strict";d();function kC(e){return typeof e>"u"||e===null}function AN(e){return typeof e=="object"&&e!==null}function SN(e){return Array.isArray(e)?e:kC(e)?[]:[e]}function xN(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 PN(e,t){var r="",n;for(n=0;n<t;n+=1)r+=e;return r}function ON(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}lo.exports.isNothing=kC;lo.exports.isObject=AN;lo.exports.toArray=SN;lo.exports.repeat=PN;lo.exports.isNegativeZero=ON;lo.exports.extend=xN});var uu=M((Xte,WC)=>{"use strict";d();function qC(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 Ns(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=qC(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}Ns.prototype=Object.create(Error.prototype);Ns.prototype.constructor=Ns;Ns.prototype.toString=function(t){return this.name+": "+qC(this,t)};WC.exports=Ns});var zC=M((Qte,HC)=>{"use strict";d();var js=ou();function GD(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 YD(e,t){return js.repeat(" ",t-e.length)+e}function TN(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,m,g=Math.min(e.line+t.linesAfter,o.length).toString().length,E=t.maxLength-(t.indent+g+3);for(p=1;p<=t.linesBefore&&!(a-p<0);p++)m=GD(e.buffer,n[a-p],o[a-p],e.position-(n[a]-n[a-p]),E),l=js.repeat(" ",t.indent)+YD((e.line-p+1).toString(),g)+" | "+m.str+`
|
|
43
|
+
`+l;for(m=GD(e.buffer,n[a],o[a],e.position,E),l+=js.repeat(" ",t.indent)+YD((e.line+1).toString(),g)+" | "+m.str+`
|
|
44
|
+
`,l+=js.repeat("-",t.indent+g+3+m.pos)+`^
|
|
45
|
+
`,p=1;p<=t.linesAfter&&!(a+p>=o.length);p++)m=GD(e.buffer,n[a+p],o[a+p],e.position-(n[a]-n[a+p]),E),l+=js.repeat(" ",t.indent)+YD((e.line+p+1).toString(),g)+" | "+m.str+`
|
|
46
|
+
`;return l.replace(/\n$/,"")}HC.exports=TN});var bt=M((tre,KC)=>{"use strict";d();var VC=uu(),BN=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],IN=["scalar","sequence","mapping"];function RN(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(n){t[String(n)]=r})}),t}function MN(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(BN.indexOf(r)===-1)throw new VC('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=RN(t.styleAliases||null),IN.indexOf(this.kind)===-1)throw new VC('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}KC.exports=MN});var QD=M((nre,GC)=>{"use strict";d();var $s=uu(),XD=bt();function JC(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 NN(){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 ZD(e){return this.extend(e)}ZD.prototype.extend=function(t){var r=[],n=[];if(t instanceof XD)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 $s("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(s){if(!(s instanceof XD))throw new $s("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(s.loadKind&&s.loadKind!=="scalar")throw new $s("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 $s("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 XD))throw new $s("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var o=Object.create(ZD.prototype);return o.implicit=(this.implicit||[]).concat(r),o.explicit=(this.explicit||[]).concat(n),o.compiledImplicit=JC(o,"implicit"),o.compiledExplicit=JC(o,"explicit"),o.compiledTypeMap=NN(o.compiledImplicit,o.compiledExplicit),o};GC.exports=ZD});var eh=M((ore,YC)=>{"use strict";d();var jN=bt();YC.exports=new jN("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}})});var th=M((sre,XC)=>{"use strict";d();var $N=bt();XC.exports=new $N("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}})});var rh=M((cre,ZC)=>{"use strict";d();var LN=bt();ZC.exports=new LN("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}})});var nh=M((fre,QC)=>{"use strict";d();var UN=QD();QC.exports=new UN({explicit:[eh(),th(),rh()]})});var ih=M((dre,ew)=>{"use strict";d();var kN=bt();function qN(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function WN(){return null}function HN(e){return e===null}ew.exports=new kN("tag:yaml.org,2002:null",{kind:"scalar",resolve:qN,construct:WN,predicate:HN,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"})});var oh=M((hre,tw)=>{"use strict";d();var zN=bt();function VN(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 KN(e){return e==="true"||e==="True"||e==="TRUE"}function JN(e){return Object.prototype.toString.call(e)==="[object Boolean]"}tw.exports=new zN("tag:yaml.org,2002:bool",{kind:"scalar",resolve:VN,construct:KN,predicate:JN,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 uh=M((gre,rw)=>{"use strict";d();var GN=ou(),YN=bt();function XN(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function ZN(e){return 48<=e&&e<=55}function QN(e){return 48<=e&&e<=57}function ej(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(!XN(e.charCodeAt(r)))return!1;n=!0}return n&&o!=="_"}if(o==="o"){for(r++;r<t;r++)if(o=e[r],o!=="_"){if(!ZN(e.charCodeAt(r)))return!1;n=!0}return n&&o!=="_"}}if(o==="_")return!1;for(;r<t;r++)if(o=e[r],o!=="_"){if(!QN(e.charCodeAt(r)))return!1;n=!0}return!(!n||o==="_")}function tj(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 rj(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!GN.isNegativeZero(e)}rw.exports=new YN("tag:yaml.org,2002:int",{kind:"scalar",resolve:ej,construct:tj,predicate:rj,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 sh=M((yre,iw)=>{"use strict";d();var nw=ou(),nj=bt(),ij=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function oj(e){return!(e===null||!ij.test(e)||e[e.length-1]==="_")}function uj(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 sj=/^[-+]?[0-9]+e/;function aj(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(nw.isNegativeZero(e))return"-0.0";return r=e.toString(10),sj.test(r)?r.replace("e",".e"):r}function cj(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||nw.isNegativeZero(e))}iw.exports=new nj("tag:yaml.org,2002:float",{kind:"scalar",resolve:oj,construct:uj,predicate:cj,represent:aj,defaultStyle:"lowercase"})});var ah=M((Ere,ow)=>{"use strict";d();ow.exports=nh().extend({implicit:[ih(),oh(),uh(),sh()]})});var ch=M((Cre,uw)=>{"use strict";d();uw.exports=ah()});var lh=M((bre,cw)=>{"use strict";d();var lj=bt(),sw=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),aw=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 fj(e){return e===null?!1:sw.exec(e)!==null||aw.exec(e)!==null}function pj(e){var t,r,n,o,s,a,l,p=0,m=null,g,E,w;if(t=sw.exec(e),t===null&&(t=aw.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],E=+(t[11]||0),m=(g*60+E)*6e4,t[9]==="-"&&(m=-m)),w=new Date(Date.UTC(r,n,o,s,a,l,p)),m&&w.setTime(w.getTime()-m),w}function dj(e){return e.toISOString()}cw.exports=new lj("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:fj,construct:pj,instanceOf:Date,represent:dj})});var fh=M((Sre,lw)=>{"use strict";d();var Dj=bt();function hj(e){return e==="<<"||e===null}lw.exports=new Dj("tag:yaml.org,2002:merge",{kind:"scalar",resolve:hj})});var dh=M((Pre,fw)=>{"use strict";d();var mj=bt(),ph=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
47
|
+
\r`;function gj(e){if(e===null)return!1;var t,r,n=0,o=e.length,s=ph;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 _j(e){var t,r,n=e.replace(/[\r\n=]/g,""),o=n.length,s=ph,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 yj(e){var t="",r=0,n,o,s=e.length,a=ph;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 Fj(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}fw.exports=new mj("tag:yaml.org,2002:binary",{kind:"scalar",resolve:gj,construct:_j,predicate:Fj,represent:yj})});var Dh=M((Tre,pw)=>{"use strict";d();var Ej=bt(),vj=Object.prototype.hasOwnProperty,Cj=Object.prototype.toString;function wj(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,Cj.call(o)!=="[object Object]")return!1;for(s in o)if(vj.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 bj(e){return e!==null?e:[]}pw.exports=new Ej("tag:yaml.org,2002:omap",{kind:"sequence",resolve:wj,construct:bj})});var hh=M((Ire,dw)=>{"use strict";d();var Aj=bt(),Sj=Object.prototype.toString;function xj(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],Sj.call(n)!=="[object Object]"||(o=Object.keys(n),o.length!==1))return!1;s[t]=[o[0],n[o[0]]]}return!0}function Pj(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}dw.exports=new Aj("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:xj,construct:Pj})});var mh=M((Mre,Dw)=>{"use strict";d();var Oj=bt(),Tj=Object.prototype.hasOwnProperty;function Bj(e){if(e===null)return!0;var t,r=e;for(t in r)if(Tj.call(r,t)&&r[t]!==null)return!1;return!0}function Ij(e){return e!==null?e:{}}Dw.exports=new Oj("tag:yaml.org,2002:set",{kind:"mapping",resolve:Bj,construct:Ij})});var wl=M((jre,hw)=>{"use strict";d();hw.exports=ch().extend({implicit:[lh(),fh()],explicit:[dh(),Dh(),hh(),mh()]})});var Bw=M((Lre,Fh)=>{"use strict";d();var po=ou(),vw=uu(),Rj=zC(),Mj=wl(),vi=Object.prototype.hasOwnProperty,bl=1,Cw=2,ww=3,Al=4,gh=1,Nj=2,mw=3,jj=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,$j=/[\x85\u2028\u2029]/,Lj=/[,\[\]\{\}]/,bw=/^(?:!|!!|![a-z\-]+!)$/i,Aw=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function gw(e){return Object.prototype.toString.call(e)}function hn(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 su(e){return e===44||e===91||e===93||e===123||e===125}function Uj(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function kj(e){return e===120?2:e===117?4:e===85?8:0}function qj(e){return 48<=e&&e<=57?e-48:-1}function _w(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 Wj(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function Sw(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}var xw=new Array(256),Pw=new Array(256);for(fo=0;fo<256;fo++)xw[fo]=_w(fo)?1:0,Pw[fo]=_w(fo);var fo;function Hj(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Mj,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 Ow(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=Rj(r),new vw(t,r)}function Z(e,t){throw Ow(e,t)}function Sl(e,t){e.onWarning&&e.onWarning.call(null,Ow(e,t))}var yw={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&&Sl(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"),vi.call(t.tagMap,o)&&Z(t,'there is a previously declared suffix for "'+o+'" tag handle'),Aw.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 Ei(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 jj.test(l)&&Z(e,"the stream contains non-printable characters");e.result+=l}}function Fw(e,t,r,n){var o,s,a,l;for(po.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],vi.call(t,s)||(Sw(t,s,r[s]),n[s]=!0)}function au(e,t,r,n,o,s,a,l,p){var m,g;if(Array.isArray(o))for(o=Array.prototype.slice.call(o),m=0,g=o.length;m<g;m+=1)Array.isArray(o[m])&&Z(e,"nested arrays are not supported inside keys"),typeof o=="object"&&gw(o[m])==="[object Object]"&&(o[m]="[object Object]");if(typeof o=="object"&&gw(o)==="[object Object]"&&(o="[object Object]"),o=String(o),t===null&&(t={}),n==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(m=0,g=s.length;m<g;m+=1)Fw(e,t,s[m],r);else Fw(e,t,s,r);else!e.json&&!vi.call(r,o)&&vi.call(t,o)&&(e.line=a||e.line,e.lineStart=l||e.lineStart,e.position=p||e.position,Z(e,"duplicated mapping key")),Sw(t,o,s),delete r[o];return t}function _h(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(hn(o))for(_h(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&&Sl(e,"deficient indentation"),n}function xl(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 yh(e,t){t===1?e.result+=" ":t>1&&(e.result+=po.repeat(`
|
|
49
|
+
`,t-1))}function zj(e,t,r){var n,o,s,a,l,p,m,g,E=e.kind,w=e.result,v;if(v=e.input.charCodeAt(e.position),qt(v)||su(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&&su(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&&su(o))break}else if(v===35){if(n=e.input.charCodeAt(e.position-1),qt(n))break}else{if(e.position===e.lineStart&&xl(e)||r&&su(v))break;if(hn(v))if(p=e.line,m=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=m,e.lineIndent=g;break}}l&&(Ei(e,s,a,!1),yh(e,e.line-p),s=a=e.position,l=!1),Do(v)||(a=e.position+1),v=e.input.charCodeAt(++e.position)}return Ei(e,s,a,!1),e.result?!0:(e.kind=E,e.result=w,!1)}function Vj(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(Ei(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 hn(r)?(Ei(e,n,o,!0),yh(e,et(e,!1,t)),n=o=e.position):e.position===e.lineStart&&xl(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 Kj(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 Ei(e,r,e.position,!0),e.position++,!0;if(l===92){if(Ei(e,r,e.position,!0),l=e.input.charCodeAt(++e.position),hn(l))et(e,!1,t);else if(l<256&&xw[l])e.result+=Pw[l],e.position++;else if((a=kj(l))>0){for(o=a,s=0;o>0;o--)l=e.input.charCodeAt(++e.position),(a=Uj(l))>=0?s=(s<<4)+a:Z(e,"expected hexadecimal character");e.result+=Wj(s),e.position++}else Z(e,"unknown escape sequence");r=n=e.position}else hn(l)?(Ei(e,r,n,!0),yh(e,et(e,!1,t)),r=n=e.position):e.position===e.lineStart&&xl(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 Jj(e,t){var r=!0,n,o,s,a=e.tag,l,p=e.anchor,m,g,E,w,v,x=Object.create(null),O,P,B,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=B=null,E=w=!1,U===63&&(m=e.input.charCodeAt(e.position+1),qt(m)&&(E=w=!0,e.position++,et(e,!0,t))),n=e.line,o=e.lineStart,s=e.position,cu(e,t,bl,!1,!0),P=e.tag,O=e.result,et(e,!0,t),U=e.input.charCodeAt(e.position),(w||e.line===n)&&U===58&&(E=!0,U=e.input.charCodeAt(++e.position),et(e,!0,t),cu(e,t,bl,!1,!0),B=e.result),v?au(e,l,x,P,O,B,n,o,s):E?l.push(au(e,null,x,P,O,B,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 Gj(e,t){var r,n,o=gh,s=!1,a=!1,l=t,p=0,m=!1,g,E;if(E=e.input.charCodeAt(e.position),E===124)n=!1;else if(E===62)n=!0;else return!1;for(e.kind="scalar",e.result="";E!==0;)if(E=e.input.charCodeAt(++e.position),E===43||E===45)gh===o?o=E===43?mw:Nj:Z(e,"repeat of a chomping mode identifier");else if((g=qj(E))>=0)g===0?Z(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):a?Z(e,"repeat of an indentation width identifier"):(l=t+g-1,a=!0);else break;if(Do(E)){do E=e.input.charCodeAt(++e.position);while(Do(E));if(E===35)do E=e.input.charCodeAt(++e.position);while(!hn(E)&&E!==0)}for(;E!==0;){for(_h(e),e.lineIndent=0,E=e.input.charCodeAt(e.position);(!a||e.lineIndent<l)&&E===32;)e.lineIndent++,E=e.input.charCodeAt(++e.position);if(!a&&e.lineIndent>l&&(l=e.lineIndent),hn(E)){p++;continue}if(e.lineIndent<l){o===mw?e.result+=po.repeat(`
|
|
50
|
+
`,s?1+p:p):o===gh&&s&&(e.result+=`
|
|
51
|
+
`);break}for(n?Do(E)?(m=!0,e.result+=po.repeat(`
|
|
52
|
+
`,s?1+p:p)):m?(m=!1,e.result+=po.repeat(`
|
|
53
|
+
`,p+1)):p===0?s&&(e.result+=" "):e.result+=po.repeat(`
|
|
54
|
+
`,p):e.result+=po.repeat(`
|
|
55
|
+
`,s?1+p:p),s=!0,a=!0,p=0,r=e.position;!hn(E)&&E!==0;)E=e.input.charCodeAt(++e.position);Ei(e,r,e.position,!1)}return!0}function Ew(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,cu(e,t,ww,!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 Yj(e,t,r){var n,o,s,a,l,p,m=e.tag,g=e.anchor,E={},w=Object.create(null),v=null,x=null,O=null,P=!1,B=!1,U;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=E),U=e.input.charCodeAt(e.position);U!==0;){if(!P&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,Z(e,"tab characters must not be used in indentation")),n=e.input.charCodeAt(e.position+1),s=e.line,(U===63||U===58)&&qt(n))U===63?(P&&(au(e,E,w,v,x,null,a,l,p),v=x=O=null),B=!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,!cu(e,r,Cw,!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&&(au(e,E,w,v,x,null,a,l,p),v=x=O=null),B=!0,P=!1,o=!1,v=e.tag,x=e.result;else if(B)Z(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=m,e.anchor=g,!0}else if(B)Z(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=m,e.anchor=g,!0}if((e.line===s||e.lineIndent>t)&&(P&&(a=e.line,l=e.lineStart,p=e.position),cu(e,t,Al,!0,o)&&(P?x=e.result:O=e.result),P||(au(e,E,w,v,x,O,a,l,p),v=x=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&&au(e,E,w,v,x,null,a,l,p),B&&(e.tag=m,e.anchor=g,e.kind="mapping",e.result=E),B}function Xj(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),Lj.test(s)&&Z(e,"tag suffix cannot contain flow indicator characters")}s&&!Aw.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:vi.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 Zj(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)&&!su(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 Qj(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)&&!su(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),vi.call(e.anchorMap,r)||Z(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],et(e,!0,-1),!0}function cu(e,t,r,n,o){var s,a,l,p=1,m=!1,g=!1,E,w,v,x,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=Al===r||ww===r,n&&et(e,!0,-1)&&(m=!0,e.lineIndent>t?p=1:e.lineIndent===t?p=0:e.lineIndent<t&&(p=-1)),p===1)for(;Xj(e)||Zj(e);)et(e,!0,-1)?(m=!0,l=s,e.lineIndent>t?p=1:e.lineIndent===t?p=0:e.lineIndent<t&&(p=-1)):l=!1;if(l&&(l=m||o),(p===1||Al===r)&&(bl===r||Cw===r?O=t:O=t+1,P=e.position-e.lineStart,p===1?l&&(Ew(e,P)||Yj(e,P,O))||Jj(e,O)?g=!0:(a&&Gj(e,O)||Vj(e,O)||Kj(e,O)?g=!0:Qj(e)?(g=!0,(e.tag!==null||e.anchor!==null)&&Z(e,"alias node should not have any properties")):zj(e,O,bl===r)&&(g=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):p===0&&(g=l&&Ew(e,P))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&Z(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),E=0,w=e.implicitTypes.length;E<w;E+=1)if(x=e.implicitTypes[E],x.resolve(e.result)){e.result=x.construct(e.result),e.tag=x.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(vi.call(e.typeMap[e.kind||"fallback"],e.tag))x=e.typeMap[e.kind||"fallback"][e.tag];else for(x=null,v=e.typeMap.multi[e.kind||"fallback"],E=0,w=v.length;E<w;E+=1)if(e.tag.slice(0,v[E].tag.length)===v[E].tag){x=v[E];break}x||Z(e,"unknown tag !<"+e.tag+">"),e.result!==null&&x.kind!==e.kind&&Z(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+x.kind+'", not "'+e.kind+'"'),x.resolve(e.result,e.tag)?(e.result=x.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 e$(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&&!hn(a));break}if(hn(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&&_h(e),vi.call(yw,n)?yw[n](e,n,o):Sl(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"),cu(e,e.lineIndent-1,Al,!1,!0),et(e,!0,-1),e.checkLineBreaks&&$j.test(e.input.slice(t,e.position))&&Sl(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&xl(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 Tw(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 Hj(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;)e$(r);return r.documents}function t$(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var n=Tw(e,r);if(typeof t!="function")return n;for(var o=0,s=n.length;o<s;o+=1)t(n[o])}function r$(e,t){var r=Tw(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new vw("expected a single document in the stream, but found more")}}Fh.exports.loadAll=t$;Fh.exports.load=r$});var Qw=M((kre,Zw)=>{"use strict";d();var Tl=ou(),Ws=uu(),n$=wl(),kw=Object.prototype.toString,qw=Object.prototype.hasOwnProperty,bh=65279,i$=9,Us=10,o$=13,u$=32,s$=33,a$=34,Eh=35,c$=37,l$=38,f$=39,p$=42,Ww=44,d$=45,Pl=58,D$=61,h$=62,m$=63,g$=64,Hw=91,zw=93,_$=96,Vw=123,y$=124,Kw=125,At={};At[0]="\\0";At[7]="\\a";At[8]="\\b";At[9]="\\t";At[10]="\\n";At[11]="\\v";At[12]="\\f";At[13]="\\r";At[27]="\\e";At[34]='\\"';At[92]="\\\\";At[133]="\\N";At[160]="\\_";At[8232]="\\L";At[8233]="\\P";var F$=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],E$=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function v$(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&&qw.call(p.styleAliases,l)&&(l=p.styleAliases[l]),r[a]=l;return r}function C$(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 Ws("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Tl.repeat("0",n-t.length)+t}var w$=1,ks=2;function b$(e){this.schema=e.schema||n$,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Tl.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=v$(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==='"'?ks:w$,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 Iw(e,t){for(var r=Tl.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 vh(e,t){return`
|
|
59
|
+
`+Tl.repeat(" ",e.indent*t)}function A$(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 Ol(e){return e===u$||e===i$}function qs(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==bh||65536<=e&&e<=1114111}function Rw(e){return qs(e)&&e!==bh&&e!==o$&&e!==Us}function Mw(e,t,r){var n=Rw(e),o=n&&!Ol(e);return(r?n:n&&e!==Ww&&e!==Hw&&e!==zw&&e!==Vw&&e!==Kw)&&e!==Eh&&!(t===Pl&&!o)||Rw(t)&&!Ol(t)&&e===Eh||t===Pl&&o}function S$(e){return qs(e)&&e!==bh&&!Ol(e)&&e!==d$&&e!==m$&&e!==Pl&&e!==Ww&&e!==Hw&&e!==zw&&e!==Vw&&e!==Kw&&e!==Eh&&e!==l$&&e!==p$&&e!==s$&&e!==y$&&e!==D$&&e!==h$&&e!==f$&&e!==a$&&e!==c$&&e!==g$&&e!==_$}function x$(e){return!Ol(e)&&e!==Pl}function Ls(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 Jw(e){var t=/^\n* /;return t.test(e)}var Gw=1,Ch=2,Yw=3,Xw=4,lu=5;function P$(e,t,r,n,o,s,a,l){var p,m=0,g=null,E=!1,w=!1,v=n!==-1,x=-1,O=S$(Ls(e,0))&&x$(Ls(e,e.length-1));if(t||a)for(p=0;p<e.length;m>=65536?p+=2:p++){if(m=Ls(e,p),!qs(m))return lu;O=O&&Mw(m,g,l),g=m}else{for(p=0;p<e.length;m>=65536?p+=2:p++){if(m=Ls(e,p),m===Us)E=!0,v&&(w=w||p-x-1>n&&e[x+1]!==" ",x=p);else if(!qs(m))return lu;O=O&&Mw(m,g,l),g=m}w=w||v&&p-x-1>n&&e[x+1]!==" "}return!E&&!w?O&&!a&&!o(e)?Gw:s===ks?lu:Ch:r>9&&Jw(e)?lu:a?s===ks?lu:Ch:w?Xw:Yw}function O$(e,t,r,n,o){e.dump=(function(){if(t.length===0)return e.quotingType===ks?'""':"''";if(!e.noCompatMode&&(F$.indexOf(t)!==-1||E$.test(t)))return e.quotingType===ks?'"'+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(m){return A$(e,m)}switch(P$(t,l,e.indent,a,p,e.quotingType,e.forceQuotes&&!n,o)){case Gw:return t;case Ch:return"'"+t.replace(/'/g,"''")+"'";case Yw:return"|"+Nw(t,e.indent)+jw(Iw(t,s));case Xw:return">"+Nw(t,e.indent)+jw(Iw(T$(t,a),s));case lu:return'"'+B$(t,a)+'"';default:throw new Ws("impossible error: invalid scalar style")}})()}function Nw(e,t){var r=Jw(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 jw(e){return e[e.length-1]===`
|
|
64
|
+
`?e.slice(0,-1):e}function T$(e,t){for(var r=/(\n+)([^\n]*)/g,n=(function(){var m=e.indexOf(`
|
|
65
|
+
`);return m=m!==-1?m:e.length,r.lastIndex=m,$w(e.slice(0,m),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
|
+
`:"")+$w(p,t),o=s}return n}function $w(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 B$(e){for(var t="",r=0,n,o=0;o<e.length;r>=65536?o+=2:o++)r=Ls(e,o),n=At[r],!n&&qs(r)?(t+=e[o],r>=65536&&(t+=e[o+1])):t+=n||C$(r);return t}function I$(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)),(jn(e,t,l,!1,!1)||typeof l>"u"&&jn(e,t,null,!1,!1))&&(n!==""&&(n+=","+(e.condenseFlow?"":" ")),n+=e.dump);e.tag=o,e.dump="["+n+"]"}function Lw(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)),(jn(e,t+1,p,!0,!0,!1,!0)||typeof p>"u"&&jn(e,t+1,null,!0,!0,!1,!0))&&((!n||o!=="")&&(o+=vh(e,t)),e.dump&&Us===e.dump.charCodeAt(0)?o+="-":o+="- ",o+=e.dump);e.tag=s,e.dump=o||"[]"}function R$(e,t,r){var n="",o=e.tag,s=Object.keys(r),a,l,p,m,g;for(a=0,l=s.length;a<l;a+=1)g="",n!==""&&(g+=", "),e.condenseFlow&&(g+='"'),p=s[a],m=r[p],e.replacer&&(m=e.replacer.call(r,p,m)),jn(e,t,p,!1,!1)&&(e.dump.length>1024&&(g+="? "),g+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),jn(e,t,m,!1,!1)&&(g+=e.dump,n+=g));e.tag=o,e.dump="{"+n+"}"}function M$(e,t,r,n){var o="",s=e.tag,a=Object.keys(r),l,p,m,g,E,w;if(e.sortKeys===!0)a.sort();else if(typeof e.sortKeys=="function")a.sort(e.sortKeys);else if(e.sortKeys)throw new Ws("sortKeys must be a boolean or a function");for(l=0,p=a.length;l<p;l+=1)w="",(!n||o!=="")&&(w+=vh(e,t)),m=a[l],g=r[m],e.replacer&&(g=e.replacer.call(r,m,g)),jn(e,t+1,m,!0,!0,!0)&&(E=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,E&&(e.dump&&Us===e.dump.charCodeAt(0)?w+="?":w+="? "),w+=e.dump,E&&(w+=vh(e,t)),jn(e,t+1,g,!0,E)&&(e.dump&&Us===e.dump.charCodeAt(0)?w+=":":w+=": ",w+=e.dump,o+=w));e.tag=s,e.dump=o||"{}"}function Uw(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,kw.call(l.represent)==="[object Function]")n=l.represent(t,p);else if(qw.call(l.represent,p))n=l.represent[p](t,p);else throw new Ws("!<"+l.tag+'> tag resolver accepts not "'+p+'" style');e.dump=n}return!0}return!1}function jn(e,t,r,n,o,s,a){e.tag=null,e.dump=r,Uw(e,r,!1)||Uw(e,r,!0);var l=kw.call(e.dump),p=n,m;n&&(n=e.flowLevel<0||e.flowLevel>t);var g=l==="[object Object]"||l==="[object Array]",E,w;if(g&&(E=e.duplicates.indexOf(r),w=E!==-1),(e.tag!==null&&e.tag!=="?"||w||e.indent!==2&&t>0)&&(o=!1),w&&e.usedDuplicates[E])e.dump="*ref_"+E;else{if(g&&w&&!e.usedDuplicates[E]&&(e.usedDuplicates[E]=!0),l==="[object Object]")n&&Object.keys(e.dump).length!==0?(M$(e,t,e.dump,o),w&&(e.dump="&ref_"+E+e.dump)):(R$(e,t,e.dump),w&&(e.dump="&ref_"+E+" "+e.dump));else if(l==="[object Array]")n&&e.dump.length!==0?(e.noArrayIndent&&!a&&t>0?Lw(e,t-1,e.dump,o):Lw(e,t,e.dump,o),w&&(e.dump="&ref_"+E+e.dump)):(I$(e,t,e.dump),w&&(e.dump="&ref_"+E+" "+e.dump));else if(l==="[object String]")e.tag!=="?"&&O$(e,e.dump,t,s,p);else{if(l==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new Ws("unacceptable kind of an object to dump "+l)}e.tag!==null&&e.tag!=="?"&&(m=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?m="!"+m:m.slice(0,18)==="tag:yaml.org,2002:"?m="!!"+m.slice(18):m="!<"+m+">",e.dump=m+" "+e.dump)}return!0}function N$(e,t){var r=[],n=[],o,s;for(wh(e,r,n),o=0,s=n.length;o<s;o+=1)t.duplicates.push(r[n[o]]);t.usedDuplicates=new Array(s)}function wh(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)wh(e[o],t,r);else for(n=Object.keys(e),o=0,s=n.length;o<s;o+=1)wh(e[n[o]],t,r)}function j$(e,t){t=t||{};var r=new b$(t);r.noRefs||N$(e,r);var n=e;return r.replacer&&(n=r.replacer.call({"":n},"",n)),jn(r,0,n,!0,!0)?r.dump+`
|
|
71
|
+
`:""}Zw.exports.dump=j$});var fu=M((Wre,It)=>{"use strict";d();var eb=Bw(),$$=Qw();function Ah(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.")}}It.exports.Type=bt();It.exports.Schema=QD();It.exports.FAILSAFE_SCHEMA=nh();It.exports.JSON_SCHEMA=ah();It.exports.CORE_SCHEMA=ch();It.exports.DEFAULT_SCHEMA=wl();It.exports.load=eb.load;It.exports.loadAll=eb.loadAll;It.exports.dump=$$.dump;It.exports.YAMLException=uu();It.exports.types={binary:dh(),float:sh(),map:rh(),null:ih(),pairs:hh(),set:mh(),timestamp:lh(),bool:oh(),int:uh(),merge:fh(),omap:Dh(),seq:th(),str:eh()};It.exports.safeLoad=Ah("safeLoad","load");It.exports.safeLoadAll=Ah("safeLoadAll","loadAll");It.exports.safeDump=Ah("safeDump","dump")});var wi=M(Ee=>{"use strict";d();var L$=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 Hs=Nn(),$n=ze("path"),tb=co(),U$=L$(fu());function Sh(e,t){try{return e()}catch(r){return t(r)}}Ee.Try=Sh;var k$=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 pu(e,t,r){Object.keys(e).forEach(n=>{e[n]&&typeof e[n]=="object"&&!Array.isArray(e[n])&&ho(e[n],t,r,n)})}function du(e,t,r){e.forEach((n,o)=>ho(n,t,r,o.toString()))}function q$(e,t,r){if(typeof e!="object"||!e)return;let o=e[tb.Intersection];o&&Array.isArray(o.allOf)&&du(o.allOf,t,r)}function ho(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&&pu(e.properties,t,r),e.patternProperties&&pu(e.patternProperties,t,r),e.additionalProperties&&typeof e.additionalProperties=="object"&&ho(e.additionalProperties,t,r),e.items){let{items:o}=e;Array.isArray(o)?du(o,t,r):ho(o,t,r)}e.additionalItems&&typeof e.additionalItems=="object"&&ho(e.additionalItems,t,r),e.dependencies&&(Array.isArray(e.dependencies)?du(e.dependencies,t,r):pu(e.dependencies,t,r)),e.definitions&&pu(e.definitions,t,r),e.$defs&&pu(e.$defs,t,r),e.not&&ho(e.not,t,r),q$(e,t,r),Object.keys(e).filter(o=>!k$.has(o)).forEach(o=>{let s=e[o];s&&typeof s=="object"&&pu(s,t,r)})}}Ee.traverse=ho;function W$(e=""){return rb((0,$n.basename)(e))}Ee.justName=W$;function rb(e){return e.replace((0,$n.extname)(e),"")}Ee.stripExtension=rb;function nb(e){return(0,Hs.upperFirst)((0,Hs.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,Hs.trim)(t.toUpperCase())).replace(/\s/g,""))}Ee.toSafeString=nb;function H$(e,t){let r=nb(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=H$;function z$(...e){var t;if(!process.env.VERBOSE)return console.error(e);console.error((t=ib("red"))===null||t===void 0?void 0:t("error"),...e)}Ee.error=z$;function V$(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=Ci())===null||n===void 0?void 0:n.whiteBright.bgCyan("debug"),(o=ib(e))===null||o===void 0?void 0:o(t),...r),s&&console.dir(s,{depth:6,maxArrayLength:6})}Ee.log=V$;function ib(e){var t,r,n,o,s,a,l;if(process.env.VERBOSE)switch(e){case"blue":return(t=Ci())===null||t===void 0?void 0:t.whiteBright.bgBlue;case"cyan":return(r=Ci())===null||r===void 0?void 0:r.whiteBright.bgCyan;case"green":return(n=Ci())===null||n===void 0?void 0:n.whiteBright.bgGreen;case"magenta":return(o=Ci())===null||o===void 0?void 0:o.whiteBright.bgMagenta;case"red":return(s=Ci())===null||s===void 0?void 0:s.whiteBright.bgRedBright;case"white":return(a=Ci())===null||a===void 0?void 0:a.black.bgWhite;case"yellow":return(l=Ci())===null||l===void 0?void 0:l.whiteBright.bgYellow}}function K$(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=K$;function J$(e,t,r){let n=(0,$n.normalize)(t).split($n.sep),s=(0,$n.dirname)((0,$n.normalize)(r)).split($n.sep).filter((a,l)=>a!==n[l]);return $n.posix.join($n.posix.normalize(e),...s)}Ee.pathTransform=J$;function G$(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,Hs.isPlainObject)(e.default))return e;break}return delete e.default,e}Ee.maybeStripDefault=G$;function Y$(e,...t){return e?`${e}
|
|
72
|
+
|
|
73
|
+
${t.join(`
|
|
74
|
+
`)}`:t.join(`
|
|
75
|
+
`)}Ee.appendToDescription=Y$;function X$(e){if(!(0,Hs.isPlainObject)(e))return!1;let t=e[tb.Parent];return t===null?!0:!["$defs","allOf","anyOf","definitions","dependencies","enum","not","oneOf","patternProperties","properties","required"].some(n=>t[n]===e)}Ee.isSchemaLike=X$;function Z$(e,t){return e!=null&&Q$(e)?Sh(()=>U$.default.load(t.toString()),()=>{throw new TypeError(`Error parsing YML in file "${e}"`)}):Sh(()=>JSON.parse(t.toString()),()=>{throw new TypeError(`Error parsing JSON in file "${e}"`)})}Ee.parseFileAsJSONSchema=Z$;function Q$(e){return e.endsWith(".yaml")||e.endsWith(".yml")}function Ci(){let e;try{e=ze("cli-color")}catch{}return e}});var Oh=M(rr=>{"use strict";d();Object.defineProperty(rr,"__esModule",{value:!0});rr.generateType=rr.generate=void 0;var ub=Nn(),e7=Th(),tr=Cl(),hu=wi();function t7(e,t=e7.DEFAULT_OPTIONS){return[t.bannerComment,Vs(e,t,e.standaloneName),zs(e,t,e.standaloneName),Du(e,t)].filter(Boolean).join(`
|
|
76
|
+
|
|
77
|
+
`)+`
|
|
78
|
+
`}rr.generate=t7;function Du(e,t,r=new Set){if(r.has(e))return"";r.add(e);let n="";switch(e.type){case"ENUM":return i7(e,t)+`
|
|
79
|
+
`;case"ARRAY":return Du(e.params,t,r);case"UNION":case"INTERSECTION":return e.params.reduce((o,s)=>o+Du(s,t,r),"");case"TUPLE":return n=e.params.reduce((o,s)=>o+Du(s,t,r),""),e.spreadParam&&(n+=Du(e.spreadParam,t,r)),n;case"INTERFACE":return Ph(e).reduce((o,s)=>o+Du(s,t,r),"");default:return""}}function zs(e,t,r,n=new Set){if(n.has(e))return"";n.add(e);let o="";switch(e.type){case"ARRAY":o=zs(e.params,t,r,n);break;case"INTERFACE":o=[(0,tr.hasStandaloneName)(e)&&(e.standaloneName===r||t.declareExternallyReferenced)&&o7(e,t),Ph(e).map(s=>zs(s,t,r,n)).filter(Boolean).join(`
|
|
80
|
+
`)].filter(Boolean).join(`
|
|
81
|
+
`);break;case"INTERSECTION":case"TUPLE":case"UNION":o=e.params.map(s=>zs(s,t,r,n)).filter(Boolean).join(`
|
|
82
|
+
`),e.type==="TUPLE"&&e.spreadParam&&(o+=zs(e.spreadParam,t,r,n));break;default:o=""}return o}function Vs(e,t,r,n=new Set){if(n.has(e))return"";switch(n.add(e),e.type){case"ARRAY":return[Vs(e.params,t,r,n),(0,tr.hasStandaloneName)(e)?xh(e,t):void 0].filter(Boolean).join(`
|
|
83
|
+
`);case"ENUM":return"";case"INTERFACE":return Ph(e).map(o=>(o.standaloneName===r||t.declareExternallyReferenced)&&Vs(o,t,r,n)).filter(Boolean).join(`
|
|
84
|
+
`);case"INTERSECTION":case"TUPLE":case"UNION":return[(0,tr.hasStandaloneName)(e)?xh(e,t):void 0,e.params.map(o=>Vs(o,t,r,n)).filter(Boolean).join(`
|
|
85
|
+
`),"spreadParam"in e&&e.spreadParam?Vs(e.spreadParam,t,r,n):void 0].filter(Boolean).join(`
|
|
86
|
+
`);default:return(0,tr.hasStandaloneName)(e)?xh(e,t):""}}function r7(e,t){let r=n7(e,t);return t.strictIndexSignatures&&e.keyName==="[k: string]"?`${r} | undefined`:r}rr.generateType=(0,ub.memoize)(r7);function n7(e,t){if((0,hu.log)("magenta","generator",e),(0,tr.hasStandaloneName)(e))return(0,hu.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 sb(e,t);case"INTERSECTION":return ob(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 m=s.length;m<n;m+=1)s.push(t.unknownAny?tr.T_UNKNOWN:tr.T_ANY);function a(m){if(o){let g="...("+(0,rr.generateType)(o,t)+")[]";m.push(g)}return m}function l(m){return"["+m.join(", ")+"]"}let p=s.map(m=>(0,rr.generateType)(m,t));if(p.length>r){let m=p.slice(0,r),g=[];m.length>0?g.push(l(m)):g.push(l([]));for(let E=r;E<p.length;E+=1)m.push(p[E]),E===p.length-1&&a(m),g.push(l(m));return g.join("|")}return l(a(p))})();case"UNION":return ob(e,t);case"UNKNOWN":return"unknown";case"CUSTOM_TYPE":return e.params}}function ob(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 sb(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?Bl(o.comment,o.deprecated)+`
|
|
88
|
+
`:"")+u7(n)+(r?"":"?")+": "+s).join(`
|
|
89
|
+
`)+`
|
|
90
|
+
}`}function Bl(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 i7(e,t){let r=n=>/[^a-zA-Z0-9_]/.test(n);return((0,tr.hasComment)(e)?Bl(e.comment,e.deprecated)+`
|
|
93
|
+
`:"")+"export "+(t.enableConstEnums?"const ":"")+`enum ${(0,hu.toSafeString)(e.standaloneName)} {
|
|
94
|
+
`+e.params.map(({ast:n,keyName:o})=>(r(o)?`"${o}"`:o)+" = "+(0,rr.generateType)(n,t)).join(`,
|
|
95
|
+
`)+`
|
|
96
|
+
}`}function o7(e,t){return((0,tr.hasComment)(e)?Bl(e.comment,e.deprecated)+`
|
|
97
|
+
`:"")+`export interface ${(0,hu.toSafeString)(e.standaloneName)} `+(e.superTypes.length>0?`extends ${e.superTypes.map(r=>(0,hu.toSafeString)(r.standaloneName)).join(", ")} `:"")+sb(e,t)}function xh(e,t){return((0,tr.hasComment)(e)?Bl(e.comment)+`
|
|
98
|
+
`:"")+`export type ${(0,hu.toSafeString)(e.standaloneName)} = ${(0,rr.generateType)((0,ub.omit)(e,"standaloneName"),t)}`}function u7(e){return e.length&&/[A-Za-z_$]/.test(e.charAt(0))&&/^[\w$]+$/.test(e)||e==="[k: string]"?e:JSON.stringify(e)}function Ph(e){return e.params.map(t=>t.ast).concat(e.superTypes)}});var ab=M(Il=>{"use strict";d();Object.defineProperty(Il,"__esModule",{value:!0});Il.typesOfSchema=void 0;var s7=Nn(),Bh=co();function a7(e){if(e.tsType)return new Set(["CUSTOM_TYPE"]);let t=new Set;for(let[r,n]of Object.entries(c7))n(e)&&t.add(r);return t.size||t.add("UNNAMED_SCHEMA"),t}Il.typesOfSchema=a7;var c7={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,Bh.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,Bh.isCompound)(e)&&typeof e.default=="number"},OBJECT(e){return e.type==="object"&&!(0,s7.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,Bh.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 Ih=M(Ml=>{"use strict";d();Object.defineProperty(Ml,"__esModule",{value:!0});Ml.applySchemaTyping=void 0;var Rl=co(),l7=ab();function f7(e){var t;let r=(0,l7.typesOfSchema)(e);if(Object.defineProperty(e,Rl.Types,{enumerable:!1,value:r,writable:!1}),r.size===1)return;let n={[Rl.Parent]:e,[Rl.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,Rl.Intersection,{enumerable:!1,value:n,writable:!1})}Ml.applySchemaTyping=f7});var cb=M(jl=>{"use strict";d();Object.defineProperty(jl,"__esModule",{value:!0});jl.normalize=void 0;var p7=co(),Ln=wi(),d7=Ih(),D7=ze("util"),tt=new Map;function Nl(e,t){return e.type===t||Array.isArray(e.type)&&e.type.includes(t)}function Rh(e){return e.properties!==void 0||Nl(e,"object")||Nl(e,"any")}function Ks(e){return e.items!==void 0||Nl(e,"array")||Nl(e,"any")}function h7(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=>{Rh(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)=>{Rh(e)&&!("additionalProperties"in e)&&e.patternProperties===void 0&&(e.additionalProperties=r.additionalProperties)});tt.set("Transform id to $id",(e,t)=>{if((0,Ln.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,Ln.isSchemaLike)(e))return;if(!e.$id&&!e[p7.Parent]){e.$id=(0,Ln.toSafeString)((0,Ln.justName)(t));return}if(!Ks(e)&&!Rh(e))return;let s=o.get(e);!e.$id&&!e.title&&s&&(e.$id=(0,Ln.toSafeString)((0,Ln.justName)(s))),s&&o.delete(e)});tt.set("Escape closing JSDoc comment",e=>{(0,Ln.escapeBlockComment)(e)});tt.set("Add JSDoc comments for minItems and maxItems",e=>{if(!Ks(e))return;let t=["minItems"in e?`@minItems ${e.minItems}`:"","maxItems"in e?`@maxItems ${e.maxItems}`:""].filter(Boolean);t.length&&(e.description=(0,Ln.appendToDescription)(e.description,...t))});tt.set("Optionally remove maxItems and minItems",(e,t,r)=>{Ks(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||!Ks(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||!Ks(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,D7.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;h7(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,d7.applySchemaTyping)(e)});function m7(e,t,r,n){return tt.forEach(o=>(0,Ln.traverse)(e,(s,a)=>o(s,r,n,a,t))),e}jl.normalize=m7});var pb=M(Ll=>{"use strict";d();Object.defineProperty(Ll,"__esModule",{value:!0});Ll.optimize=void 0;var g7=Nn(),Mh=Oh(),lb=Cl(),$l=wi();function Js(e,t,r=new Set){if(r.has(e))return e;switch(r.add(e),e.type){case"ARRAY":return Object.assign(e,{params:Js(e.params,t,r)});case"INTERFACE":return Object.assign(e,{params:e.params.map(s=>Object.assign(s,{ast:Js(s.ast,t,r)}))});case"INTERSECTION":case"UNION":let n=Object.assign(e,{params:e.params.map(s=>Js(s,t,r))});if(n.params.some(s=>s.type==="ANY"))return(0,$l.log)("cyan","optimizer","[A, B, C, Any] -> Any",n),lb.T_ANY;if(n.params.some(s=>s.type==="UNKNOWN"))return(0,$l.log)("cyan","optimizer","[A, B, C, Unknown] -> Unknown",n),lb.T_UNKNOWN;n.params.every(s=>{let a=(0,Mh.generateType)(fb(s),t),l=(0,Mh.generateType)(fb(n.params[0]),t);return a===l})&&n.params.some(s=>s.standaloneName!==void 0)&&((0,$l.log)("cyan","optimizer","[A (named), A] -> [A (named)]",n),n.params=n.params.filter(s=>s.standaloneName!==void 0));let o=(0,g7.uniqBy)(n.params,s=>(0,Mh.generateType)(s,t));return o.length!==n.params.length&&((0,$l.log)("cyan","optimizer","[A, B, B] -> [A, B]",n),n.params=o),Object.assign(n,{params:n.params.map(s=>Js(s,t,r))});default:return e}}Ll.optimize=Js;function fb(e){return e.type==="ENUM"?e:Object.assign(Object.assign({},e),{standaloneName:void 0})}});var Db=M(kl=>{"use strict";d();Object.defineProperty(kl,"__esModule",{value:!0});kl.parse=void 0;var mn=Nn(),_7=ze("util"),y7=Ih(),bi=Cl(),Gs=co(),Ul=wi();function nr(e,t,r,n=new Map,o=new Set){if((0,Gs.isPrimitive)(e))return(0,Gs.isBoolean)(e)?F7(e,r,t):jh(e,r);let s=e[Gs.Intersection],a=e[Gs.Types];if(s){let l=Nh(s,"ALL_OF",t,r,n,o);return a.forEach(p=>{l.params.push(Nh(e,p,t,r,n,o))}),(0,Ul.log)("blue","parser","Types:",[...a],"Input:",e,"Output:",l),l}if(a.size===1){let l=[...a][0],p=Nh(e,l,t,r,n,o);return(0,Ul.log)("blue","parser","Type:",l,"Input:",e,"Output:",p),p}throw new ReferenceError("Expected intersection schema. Please file an issue on GitHub.")}kl.parse=nr;function Nh(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,E7(e,t,r,n,o,s))}function F7(e,t,r){return e?{keyName:t,type:r.unknownAny?"UNKNOWN":"ANY"}:{keyName:t,type:"NEVER"}}function jh(e,t){return{keyName:t,params:e,type:"LITERAL"}}function E7(e,t,r,n,o,s){let a=w7((0,Gs.getRootSchema)(e)),l=(0,mn.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(E=>nr(E,r,void 0,o,s)),type:"INTERSECTION"};case"ANY":return Object.assign(Object.assign({},r.unknownAny?bi.T_UNKNOWN:bi.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(E=>nr(E,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((E,w)=>({ast:jh(E,void 0),keyName:e.tsEnumNames[w]})),type:"ENUM"};case"NAMED_SCHEMA":return db(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(E=>nr(E,r,void 0,o,s)),type:"UNION"};case"REFERENCE":throw Error((0,_7.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 E=e.minItems,w=e.maxItems,v={comment:e.description,deprecated:e.deprecated,keyName:n,maxItems:w,minItems:E,standaloneName:ut(e,l,s,r),params:e.items.map(x=>nr(x,r,void 0,o,s)),type:"TUPLE"};return e.additionalItems===!0?v.spreadParam=r.unknownAny?bi.T_UNKNOWN:bi.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(E=>{let w=Object.assign(Object.assign({},(0,mn.omit)(e,"$id","description","title")),{type:E});return(0,Ul.maybeStripDefault)(w),(0,y7.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(E=>jh(E,void 0)),type:"UNION"};case"UNNAMED_SCHEMA":return db(e,r,o,s,n,l);case"UNTYPED_ARRAY":let p=e.minItems,m=typeof e.maxItems=="number"?e.maxItems:-1,g=r.unknownAny?bi.T_UNKNOWN:bi.T_ANY;return p>0||m>=0?{comment:e.description,deprecated:e.deprecated,keyName:n,maxItems:e.maxItems,minItems:p,params:Array(Math.max(m,p)||0).fill(g),spreadParam:m>=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,Ul.generateName)(s,r)}function db(e,t,r,n,o,s){let a=ut(e,s,n,t);return{comment:e.description,deprecated:e.deprecated,keyName:o,params:C7(e,t,r,n,a),standaloneName:a,superTypes:v7(e,t,r,n),type:"INTERFACE"}}function v7(e,t,r,n){let o=e.extends;return o?o.map(s=>nr(s,t,void 0,r,n)):[]}function C7(e,t,r,n,o){let s=(0,mn.map)(e.properties,(l,p)=>({ast:nr(l,t,p,r,n),isPatternProperty:!1,isRequired:(0,mn.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,mn.map)(e.patternProperties,(l,p)=>{let m=nr(l,t,p,r,n),g=`This interface was referenced by \`${o}\`'s JSON-Schema definition
|
|
99
|
+
via the \`patternProperty\` "${p.replace("*/","*\\/")}".`;return m.comment=m.comment?`${m.comment}
|
|
100
|
+
|
|
101
|
+
${g}`:g,{ast:m,isPatternProperty:!a,isRequired:a||(0,mn.includes)(e.required||[],p),isUnreachableDefinition:!1,keyName:a?"[k: string]":p}}))),t.unreachableDefinitions&&(s=s.concat((0,mn.map)(e.$defs,(l,p)=>{let m=nr(l,t,p,r,n),g=`This interface was referenced by \`${o}\`'s JSON-Schema
|
|
102
|
+
via the \`definition\` "${p}".`;return m.comment=m.comment?`${m.comment}
|
|
103
|
+
|
|
104
|
+
${g}`:g,{ast:m,isPatternProperty:!1,isRequired:(0,mn.includes)(e.required||[],p),isUnreachableDefinition:!0,keyName:p}}))),e.additionalProperties){case void 0:case!0:return a?s:s.concat({ast:t.unknownAny?bi.T_UNKNOWN_ADDITIONAL_PROPERTIES:bi.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 $h(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),$h(o,!1,r)),{}):(0,mn.isPlainObject)(e)?Object.assign(Object.assign({},t&&b7(e)?e.$defs:{}),Object.keys(e).reduce((n,o)=>Object.assign(Object.assign({},n),$h(e[o],!1,r)),{})):{})}var w7=(0,mn.memoize)($h);function b7(e){return"$defs"in e}});var ql=M(mu=>{"use strict";d();Object.defineProperty(mu,"__esModule",{value:!0});mu.getDeepKeys=mu.toJSON=void 0;var A7=["function","symbol","undefined"],S7=["constructor","prototype","__proto__"],x7=Object.getPrototypeOf({});function P7(){let e={},t=this;for(let r of hb(t))if(typeof r=="string"){let n=t[r],o=typeof n;A7.includes(o)||(e[r]=n)}return e}mu.toJSON=P7;function hb(e,t=[]){let r=[];for(;e&&e!==x7;)r=r.concat(Object.getOwnPropertyNames(e),Object.getOwnPropertySymbols(e)),e=Object.getPrototypeOf(e);let n=new Set(r);for(let o of t.concat(S7))n.delete(o);return n}mu.getDeepKeys=hb});var Lh=M(gu=>{"use strict";d();Object.defineProperty(gu,"__esModule",{value:!0});gu.addInspectMethod=gu.format=void 0;var mb=ze("util"),O7=ql(),gb=mb.inspect.custom||Symbol.for("nodejs.util.inspect.custom");gu.format=mb.format;function T7(e){e[gb]=B7}gu.addInspectMethod=T7;function B7(){let e={},t=this;for(let r of O7.getDeepKeys(t)){let n=t[r];e[r]=n}return delete e[gb],e}});var Fb=M(gn=>{"use strict";d();Object.defineProperty(gn,"__esModule",{value:!0});gn.lazyJoinStacks=gn.joinStacks=gn.isWritableStack=gn.isLazyStack=void 0;var I7=/\r?\n/,R7=/\bono[ @]/;function M7(e){return!!(e&&e.configurable&&typeof e.get=="function")}gn.isLazyStack=M7;function N7(e){return!!(!e||e.writable||typeof e.set=="function")}gn.isWritableStack=N7;function _b(e,t){let r=yb(e.stack),n=t?t.stack:void 0;return r&&n?r+`
|
|
105
|
+
|
|
106
|
+
`+n:r||n}gn.joinStacks=_b;function j7(e,t,r){r?Object.defineProperty(t,"stack",{get:()=>{let n=e.get.apply(t);return _b({stack:n},r)},enumerable:!1,configurable:!0}):$7(t,e)}gn.lazyJoinStacks=j7;function yb(e){if(e){let t=e.split(I7),r;for(let n=0;n<t.length;n++){let o=t[n];if(R7.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 $7(e,t){Object.defineProperty(e,"stack",{get:()=>yb(t.get.apply(e)),enumerable:!1,configurable:!0})}});var Cb=M(Hl=>{"use strict";d();Object.defineProperty(Hl,"__esModule",{value:!0});Hl.extendError=void 0;var Eb=Lh(),Wl=Fb(),vb=ql(),L7=["name","message","stack"];function U7(e,t,r){let n=e;return k7(n,t),t&&typeof t=="object"&&q7(n,t),n.toJSON=vb.toJSON,Eb.addInspectMethod&&Eb.addInspectMethod(n),r&&typeof r=="object"&&Object.assign(n,r),n}Hl.extendError=U7;function k7(e,t){let r=Object.getOwnPropertyDescriptor(e,"stack");Wl.isLazyStack(r)?Wl.lazyJoinStacks(r,e,t):Wl.isWritableStack(r)&&(e.stack=Wl.joinStacks(e,t))}function q7(e,t){let r=vb.getDeepKeys(t,L7),n=e,o=t;for(let s of r)if(n[s]===void 0)try{n[s]=o[s]}catch{}}});var wb=M(_u=>{"use strict";d();Object.defineProperty(_u,"__esModule",{value:!0});_u.normalizeArgs=_u.normalizeOptions=void 0;var W7=Lh();function H7(e){return e=e||{},{concatMessages:e.concatMessages===void 0?!0:!!e.concatMessages,format:e.format===void 0?W7.format:typeof e.format=="function"?e.format:!1}}_u.normalizeOptions=H7;function z7(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}}_u.normalizeArgs=z7});var kh=M(Vl=>{"use strict";d();Object.defineProperty(Vl,"__esModule",{value:!0});Vl.Ono=void 0;var zl=Cb(),bb=wb(),V7=ql(),K7=Uh;Vl.Ono=K7;function Uh(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 zl.extendError(l,o,s)}return r[Symbol.species]=e,r}Uh.toJSON=function(t){return V7.toJSON.call(t)};Uh.extend=function(t,r,n){return n||r instanceof Error?zl.extendError(t,r,n):r?zl.extendError(t,void 0,r):zl.extendError(t)}});var Ab=M(Kl=>{"use strict";d();Object.defineProperty(Kl,"__esModule",{value:!0});Kl.ono=void 0;var mo=kh(),J7=_n;Kl.ono=J7;_n.error=new mo.Ono(Error);_n.eval=new mo.Ono(EvalError);_n.range=new mo.Ono(RangeError);_n.reference=new mo.Ono(ReferenceError);_n.syntax=new mo.Ono(SyntaxError);_n.type=new mo.Ono(TypeError);_n.uri=new mo.Ono(URIError);var G7=_n;function _n(...e){let t=e[0];if(typeof t=="object"&&typeof t.name=="string"){for(let r of Object.values(G7))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 _n.error.apply(void 0,e)}});var xb=M(Sb=>{"use strict";d();Object.defineProperty(Sb,"__esModule",{value:!0});var yne=ze("util")});var Rt=M((Lr,yu)=>{"use strict";d();var Y7=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]})),X7=Lr&&Lr.__exportStar||function(e,t){for(var r in e)r!=="default"&&!t.hasOwnProperty(r)&&Y7(t,e,r)};Object.defineProperty(Lr,"__esModule",{value:!0});Lr.ono=void 0;var Pb=Ab();Object.defineProperty(Lr,"ono",{enumerable:!0,get:function(){return Pb.ono}});var Z7=kh();Object.defineProperty(Lr,"Ono",{enumerable:!0,get:function(){return Z7.Ono}});X7(xb(),Lr);Lr.default=Pb.ono;typeof yu=="object"&&typeof yu.exports=="object"&&(yu.exports=Object.assign(yu.exports.default,yu.exports))});var qh=M(Ys=>{"use strict";d();var Q7=Ys&&Ys.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ys,"__esModule",{value:!0});Ys.default=e9;var Ob=Q7(ze("path"));function e9(e){return e.startsWith("\\\\?\\")?e:e.split(Ob.default?.win32?.sep).join(Ob.default?.posix?.sep??"/")}});var Tb=M(Jl=>{"use strict";d();Object.defineProperty(Jl,"__esModule",{value:!0});Jl.isWindows=void 0;var t9=/^win/.test(globalThis.process?globalThis.process.platform:""),r9=()=>t9;Jl.isWindows=r9});var Er=M(Le=>{"use strict";d();var n9=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]})),i9=Le&&Le.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),o9=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"&&n9(r,t,n[o]);return i9(r,t),r}})(),u9=Le&&Le.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Le,"__esModule",{value:!0});Le.parse=void 0;Le.resolve=Bb;Le.cwd=Ib;Le.getProtocol=Kh;Le.getExtension=D9;Le.stripQuery=Rb;Le.getHash=Mb;Le.stripHash=zh;Le.isHttp=h9;Le.isFileSystemPath=Vh;Le.fromFileSystemPath=m9;Le.toFileSystemPath=g9;Le.safePointerToPath=_9;Le.relative=y9;var Yl=u9(qh()),Hh=o9(ze("path")),s9=/\//g,a9=/^(\w{2,}):\/\//i,c9=/~1/g,l9=/~0/g,f9=ze("path"),Gl=Tb(),p9=[[/\?/g,"%3F"],[/#/g,"%23"]],Wh=[/%23/g,"#",/%24/g,"$",/%26/g,"&",/%2C/g,",",/%40/g,"@"],d9=e=>new URL(e);Le.parse=d9;function Bb(e,t){let r=new URL((0,Yl.default)(e),"resolve://"),n=new URL((0,Yl.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 Ib(){if(typeof window<"u")return location.href;let e=process.cwd(),t=e.slice(-1);return t==="/"||t==="\\"?e:e+"/"}function Kh(e){let t=a9.exec(e||"");if(t)return t[1].toLowerCase()}function D9(e){let t=e.lastIndexOf(".");return t>=0?Rb(e.substr(t).toLowerCase()):""}function Rb(e){let t=e.indexOf("?");return t>=0&&(e=e.substr(0,t)),e}function Mb(e){if(!e)return"#";let t=e.indexOf("#");return t>=0?e.substring(t):"#"}function zh(e){if(!e)return"";let t=e.indexOf("#");return t>=0&&(e=e.substring(0,t)),e}function h9(e){let t=Kh(e);return t==="http"||t==="https"?!0:t===void 0?typeof window<"u":!1}function Vh(e){if(typeof window<"u"||typeof process<"u"&&process.browser)return!1;let t=Kh(e);return t===void 0||t==="file"}function m9(e){if((0,Gl.isWindows)()){let t=Ib(),r=e.toUpperCase(),o=(0,Yl.default)(t).toUpperCase(),s=r.includes(o),a=r.includes(o),l=Hh.win32?.isAbsolute(e)||e.startsWith("http://")||e.startsWith("https://")||e.startsWith("file://");!(s||a||l)&&!t.startsWith("http")&&(e=(0,f9.join)(t,e)),e=(0,Yl.default)(e)}e=encodeURI(e);for(let t of p9)e=e.replace(t[0],t[1]);return e}function g9(e,t){e=decodeURI(e);for(let n=0;n<Wh.length;n+=2)e=e.replace(Wh[n],Wh[n+1]);let r=e.substr(0,7).toLowerCase()==="file://";return r&&(e=e[7]==="/"?e.substr(8):e.substr(7),(0,Gl.isWindows)()&&e[1]==="/"&&(e=e[0]+":"+e.substr(1)),t?e="file:///"+e:(r=!1,e=(0,Gl.isWindows)()?e:"/"+e)),(0,Gl.isWindows)()&&!r&&(e=e.replace(s9,"\\"),e.substr(1,2)===":\\"&&(e=e[0].toUpperCase()+e.substr(1))),e}function _9(e){return e.length<=1||e[0]!=="#"||e[1]!=="/"?[]:e.slice(2).split("/").map(t=>decodeURIComponent(t).replace(c9,"/").replace(l9,"~"))}function y9(e,t){if(!Vh(e)||!Vh(t))return Bb(e,t);let r=Hh.default.dirname(zh(e)),n=zh(t);return Hh.default.relative(r,n)+Mb(t)}});var vr=M(Ge=>{"use strict";d();Object.defineProperty(Ge,"__esModule",{value:!0});Ge.InvalidPointerError=Ge.TimeoutError=Ge.MissingPointerError=Ge.UnmatchedResolverError=Ge.ResolverError=Ge.UnmatchedParserError=Ge.ParserError=Ge.JSONParserErrorGroup=Ge.JSONParserError=void 0;Ge.isHandledError=F9;Ge.normalizeError=E9;var Nb=Rt(),Xl=Er(),Ur=class extends Error{constructor(t,r){super(),this.code="EUNKNOWN",this.name="JSONParserError",this.message=t,this.source=r,this.path=null,Nb.Ono.extend(this)}get footprint(){return`${this.path}+${this.source}+${this.code}+${this.message}`}};Ge.JSONParserError=Ur;var Zl=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,Xl.toFileSystemPath)(t.$refs._root$Ref.path)}'`,Nb.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)}};Ge.JSONParserErrorGroup=Zl;var Jh=class extends Ur{constructor(t,r){super(`Error parsing ${r}: ${t}`,r),this.code="EPARSER",this.name="ParserError"}};Ge.ParserError=Jh;var Gh=class extends Ur{constructor(t){super(`Could not find parser for "${t}"`,t),this.code="EUNMATCHEDPARSER",this.name="UnmatchedParserError"}};Ge.UnmatchedParserError=Gh;var Yh=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))}};Ge.ResolverError=Yh;var Xh=class extends Ur{constructor(t){super(`Could not find resolver for "${t}"`,t),this.code="EUNMATCHEDRESOLVER",this.name="UnmatchedResolverError"}};Ge.UnmatchedResolverError=Xh;var Zh=class extends Ur{constructor(t,r){super(`Missing $ref pointer "${(0,Xl.getHash)(r)}". Token "${t}" does not exist.`,(0,Xl.stripHash)(r)),this.code="EMISSINGPOINTER",this.name="MissingPointerError"}};Ge.MissingPointerError=Zh;var Qh=class extends Ur{constructor(t){super(`Dereferencing timeout reached: ${t}ms`),this.code="ETIMEOUT",this.name="TimeoutError"}};Ge.TimeoutError=Qh;var em=class extends Ur{constructor(t,r){super(`Invalid $ref pointer "${t}". Pointers must begin with "#/"`,(0,Xl.stripHash)(r)),this.code="EUNMATCHEDRESOLVER",this.name="InvalidPointerError"}};Ge.InvalidPointerError=em;function F9(e){return e instanceof Ur||e instanceof Zl}function E9(e){return e.path===null&&(e.path=[]),e}});var Xs=M(kr=>{"use strict";d();var v9=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]})),C9=kr&&kr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),w9=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"&&v9(r,t,n[o]);return C9(r,t),r}})(),b9=kr&&kr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(kr,"__esModule",{value:!0});var tm=b9(Fu()),rm=w9(Er()),ef=vr(),A9=/\//g,S9=/~/g,x9=/~1/g,P9=/~0/g,O9=e=>{try{return decodeURIComponent(e)}catch{return e}},tf=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=$b(t);for(let s=0;s<o.length;s++){if(Ql(this,r,n)&&(this.path=e.join(this.path,o.slice(s))),typeof this.value=="object"&&this.value!==null&&!Lb(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 m=o.slice(s,p+1).join("/");if(this.value[m]!==void 0){this.value=this.value[m],s=p,l=!0;break}}if(l)continue;throw this.value=null,new ef.MissingPointerError(a,decodeURI(this.originalPath))}else this.value=this.value[a]}return(!this.value||this.value.$ref&&rm.resolve(this.path,this.value.$ref)!==n)&&Ql(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=$b(t);for(let a=0;a<o.length-1;a++)Ql(this,n),s=o[a],this.value&&this.value[s]!==void 0?this.value=this.value[s]:this.value=jb(this,s,{});return Ql(this,n),s=o[o.length-1],jb(this,s,r),t}static parse(t,r){let n=rm.getHash(t).substring(1);if(!n)return[];let o=n.split("/");for(let s=0;s<o.length;s++)o[s]=O9(o[s].replace(x9,"/").replace(P9,"~"));if(o[0]!=="")throw new ef.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(S9,"~0").replace(A9,"~1"))}return t}};function Ql(e,t,r){if(tm.default.isAllowed$Ref(e.value,t)){let n=rm.resolve(e.path,e.value.$ref);if(n===e.path&&!Lb(r))e.circular=!0;else{let o=e.$ref.$refs._resolve(n,e.path,t);return o===null?!1:(e.indirections+=o.indirections+1,tm.default.isExtended$Ref(e.value)?(e.value=tm.default.dereference(e.value,o.value),!1):(e.$ref=o.$ref,e.path=o.path,e.value=o.value,!0))}}}kr.default=tf;function jb(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 ef.JSONParserError(`Error assigning $ref pointer "${e.path}".
|
|
109
|
+
Cannot set "${t}" of a non-object.`);return r}function $b(e){if((0,ef.isHandledError)(e))throw e;return e}function Lb(e){return typeof e=="string"&&tf.parse(e).length==0}});var Fu=M(Zs=>{"use strict";d();var T9=Zs&&Zs.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Zs,"__esModule",{value:!0});var Ub=T9(Xs()),rf=vr(),nm=Er(),im=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(rf.normalizeError).filter(({footprint:n})=>!r.includes(n))):(!("footprint"in t)||!r.includes(t.footprint))&&this.errors.push((0,rf.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 Ub.default(this,t,n);try{return s.resolve(this.value,r,o)}catch(a){if(!r||!r.continueOnError||!(0,rf.isHandledError)(a))throw a;return a.path===null&&(a.path=(0,nm.safePointerToPath)((0,nm.getHash)(o))),a instanceof rf.InvalidPointerError&&(a.source=decodeURI((0,nm.stripHash)(o))),this.addError(a),null}}set(t,r){let n=new Ub.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}};Zs.default=im});var zb=M(qr=>{"use strict";d();var B9=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]})),I9=qr&&qr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),R9=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"&&B9(r,t,n[o]);return I9(r,t),r}})(),Hb=qr&&qr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(qr,"__esModule",{value:!0});var kb=Rt(),M9=Hb(Fu()),Ai=R9(Er()),qb=Hb(qh()),om=class{paths(...t){return Wb(this._$refs,t.flat()).map(n=>(0,qb.default)(n.decoded))}values(...t){let r=this._$refs;return Wb(r,t.flat()).reduce((o,s)=>(o[(0,qb.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=Ai.resolve(this._root$Ref.path,t),o=Ai.stripHash(n),s=this._$refs[o];if(!s)throw(0,kb.ono)(`Error resolving $ref pointer "${t}".
|
|
110
|
+
"${o}" not found.`);s.set(n,r)}_get$Ref(t){t=Ai.resolve(this._root$Ref.path,t);let r=Ai.stripHash(t);return this._$refs[r]}_add(t){let r=Ai.stripHash(t),n=new M9.default(this);return n.path=r,this._$refs[r]=n,this._root$Ref=this._root$Ref||n,n}_resolve(t,r,n){let o=Ai.resolve(this._root$Ref.path,t),s=Ai.stripHash(o),a=this._$refs[s];if(!a)throw(0,kb.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=om;function Wb(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"?Ai.toFileSystemPath(n,!0):n}))}});var Kb=M(Eu=>{"use strict";d();Object.defineProperty(Eu,"__esModule",{value:!0});Eu.all=N9;Eu.filter=j9;Eu.sort=$9;Eu.run=L9;function N9(e){return Object.keys(e||{}).filter(t=>typeof e[t]=="object").map(t=>(e[t].name=t,e[t]))}function j9(e,t,r){return e.filter(n=>!!Vb(n,t,r))}function $9(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 L9(e,t,r,n){let o,s,a=0;return new Promise((l,p)=>{m();function m(){if(o=e[a++],!o)return p(s);try{let v=Vb(o,t,r,g,n);if(v&&typeof v.then=="function")v.then(E,w);else if(v!==void 0)E(v);else if(a===e.length)throw new Error("No promise has been returned or callback has been called.")}catch(v){w(v)}}function g(v,x){v?w(v):E(x)}function E(v){l({plugin:o,result:v})}function w(v){s={plugin:o,error:v},m()}})}function Vb(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 sm=M(Un=>{"use strict";d();var U9=Un&&Un.__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]})),k9=Un&&Un.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Jb=Un&&Un.__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"&&U9(r,t,n[o]);return k9(r,t),r}})();Object.defineProperty(Un,"__esModule",{value:!0});var um=Rt(),q9=Jb(Er()),Si=Jb(Kb()),go=vr();async function W9(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:q9.getExtension(e)};try{let l=await H9(a,r,t);s.pathType=l.plugin.name,a.data=l.result;let p=await z9(a,r,t);return s.value=p.result,p.result}catch(l){throw(0,go.isHandledError)(l)&&(s.value=l),l}}async function H9(e,t,r){let n=Si.all(t.resolve);n=Si.filter(n,"canRead",e),Si.sort(n);try{return await Si.run(n,"read",e,r)}catch(o){throw!o&&t.continueOnError?new go.UnmatchedResolverError(e.url):!o||!("error"in o)?um.ono.syntax(`Unable to resolve $ref pointer "${e.url}"`):o.error instanceof go.ResolverError?o.error:new go.ResolverError(o,e.url)}}async function z9(e,t,r){let n=Si.all(t.parse),o=Si.filter(n,"canParse",e),s=o.length>0?o:n;Si.sort(s);try{let a=await Si.run(s,"parse",e,r);if(!a.plugin.allowEmpty&&V9(a.result))throw um.ono.syntax(`Error parsing "${e.url}" as ${a.plugin.name}.
|
|
112
|
+
Parsed value is empty`);return a}catch(a){throw!a&&t.continueOnError?new go.UnmatchedParserError(e.url):a&&a.message&&a.message.startsWith("Error parsing")?a:!a||!("error"in a)?um.ono.syntax(`Unable to parse ${e.url}`):a.error instanceof go.ParserError?a.error:new go.ParserError(a.error.message,e.url)}}function V9(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}Un.default=W9});var Yb=M(am=>{"use strict";d();Object.defineProperty(am,"__esModule",{value:!0});var Gb=vr();am.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 Gb.ParserError(n.message,e.url)}throw new Gb.ParserError(r.message,e.url)}}else return t}}});var Xb=M(Qs=>{"use strict";d();var K9=Qs&&Qs.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Qs,"__esModule",{value:!0});var J9=vr(),G9=K9(fu()),Y9=fu();Qs.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 G9.default.load(t,{schema:Y9.JSON_SCHEMA})}catch(r){throw new J9.ParserError(r?.message||"Parser Error",e.url)}else return t}}});var Zb=M(cm=>{"use strict";d();Object.defineProperty(cm,"__esModule",{value:!0});var X9=vr(),Z9=/\.(txt|htm|html|md|xml|js|min|map|css|scss|less|svg)$/i;cm.default={order:300,allowEmpty:!0,encoding:"utf8",canParse(e){return(typeof e.data=="string"||Buffer.isBuffer(e.data))&&Z9.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 X9.ParserError("data is not text",e.url)}}});var Qb=M(lm=>{"use strict";d();Object.defineProperty(lm,"__esModule",{value:!0});var Q9=/\.(jpeg|jpg|gif|png|bmp|ico)$/i;lm.default={order:400,allowEmpty:!0,canParse(e){return Buffer.isBuffer(e.data)&&Q9.test(e.url)},parse(e){return Buffer.isBuffer(e.data)?e.data:Buffer.from(e.data)}}});var n2=M(Wr=>{"use strict";d();var eL=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]})),tL=Wr&&Wr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),rL=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"&&eL(r,t,n[o]);return tL(r,t),r}})(),nL=Wr&&Wr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Wr,"__esModule",{value:!0});var iL=nL(ze("fs")),e2=Rt(),t2=rL(Er()),r2=vr();Wr.default={order:100,canRead(e){return t2.isFileSystemPath(e.url)},async read(e){let t;try{t=t2.toFileSystemPath(e.url)}catch(r){throw new r2.ResolverError(e2.ono.uri(r,`Malformed URI: ${e.url}`),e.url)}try{return await iL.default.promises.readFile(t)}catch(r){throw new r2.ResolverError((0,e2.ono)(r,`Error opening file "${t}"`),t)}}}});var u2=M(kn=>{"use strict";d();var oL=kn&&kn.__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]})),uL=kn&&kn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),sL=kn&&kn.__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"&&oL(r,t,n[o]);return uL(r,t),r}})();Object.defineProperty(kn,"__esModule",{value:!0});var nf=Rt(),ea=sL(Er()),i2=vr();kn.default={order:200,headers:null,timeout:6e4,redirects:5,withCredentials:!1,canRead(e){return ea.isHttp(e.url)},read(e){let t=ea.parse(e.url);return typeof window<"u"&&!t.protocol&&(t.protocol=ea.parse(location.href).protocol),o2(t,this)}};async function o2(e,t,r){e=ea.parse(e);let n=r||[];n.push(e.href);try{let o=await aL(e,t);if(o.status>=400)throw(0,nf.ono)({status:o.status},`HTTP ERROR ${o.status}`);if(o.status>=300){if(!Number.isNaN(t.redirects)&&n.length>t.redirects)throw new i2.ResolverError((0,nf.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,nf.ono)({status:o.status},`HTTP ${o.status} redirect with no location header`);{let s=ea.resolve(e.href,o.headers.location);return o2(s,t,n)}}else{if(o.body){let s=await o.arrayBuffer();return Buffer.from(s)}return Buffer.alloc(0)}}catch(o){throw new i2.ResolverError((0,nf.ono)(o,`Error downloading ${e.href}`),e.href)}}async function aL(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 fm=M(qn=>{"use strict";d();var vu=qn&&qn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(qn,"__esModule",{value:!0});qn.getNewOptions=qn.getJsonSchemaRefParserDefaultOptions=void 0;var cL=vu(Yb()),lL=vu(Xb()),fL=vu(Zb()),pL=vu(Qb()),dL=vu(n2()),DL=vu(u2()),hL=()=>({parse:{json:{...cL.default},yaml:{...lL.default},text:{...fL.default},binary:{...pL.default}},resolve:{file:{...dL.default},http:{...DL.default},external:!0},continueOnError:!1,dereference:{circular:!0,excludedPathMatcher:()=>!1,referenceResolution:"relative"},mutateInputSchema:!0});qn.getJsonSchemaRefParserDefaultOptions=hL;var mL=e=>{let t=(0,qn.getJsonSchemaRefParserDefaultOptions)();return e&&a2(t,e),t};qn.getNewOptions=mL;function a2(e,t){if(s2(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];s2(s)?e[o]=a2(a||{},s):s!==void 0&&(e[o]=s)}}return e}function s2(e){return e&&typeof e=="object"&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}});var l2=M(of=>{"use strict";d();Object.defineProperty(of,"__esModule",{value:!0});of.normalizeArgs=c2;var gL=fm();function c2(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,gL.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}}of.default=c2});var f2=M(Hr=>{"use strict";d();var _L=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]})),yL=Hr&&Hr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),FL=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"&&_L(r,t,n[o]);return yL(r,t),r}})(),pm=Hr&&Hr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Hr,"__esModule",{value:!0});var EL=pm(Fu()),vL=pm(Xs()),CL=pm(sm()),Cu=FL(Er()),wL=vr();function bL(e,t){if(!t.resolve?.external)return Promise.resolve();try{let r=dm(e.schema,e.$refs._root$Ref.path+"#",e.$refs,t);return Promise.all(r)}catch(r){return Promise.reject(r)}}function dm(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),EL.default.isExternal$Ref(e)&&a.push(AL(e,t,r,n));let l=Object.keys(e);for(let p of l){let m=vL.default.join(t,p),g=e[p];a=a.concat(dm(g,m,r,n,o,s))}}return a}async function AL(e,t,r,n){let o=n.dereference?.externalReferenceResolution==="root",s=Cu.resolve(o?Cu.cwd():t,e.$ref),a=Cu.stripHash(s),l=r._$refs[a];if(l)return Promise.resolve(l.value);try{let p=await(0,CL.default)(s,r,n),m=dm(p,a+"#",r,n,new Set,!0);return Promise.all(m)}catch(p){if(!n?.continueOnError||!(0,wL.isHandledError)(p))throw p;return r._$refs[a]&&(p.source=decodeURI(Cu.stripHash(t)),p.path=Cu.safePointerToPath(Cu.getHash(t))),[]}}Hr.default=bL});var D2=M(zr=>{"use strict";d();var SL=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]})),xL=zr&&zr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),PL=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"&&SL(r,t,n[o]);return xL(r,t),r}})(),d2=zr&&zr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(zr,"__esModule",{value:!0});var uf=d2(Fu()),ta=d2(Xs()),Dm=PL(Er());function OL(e,t){let r=[];hm(e,"schema",e.$refs._root$Ref.path+"#","#",0,r,e.$refs,t),TL(r)}function hm(e,t,r,n,o,s,a,l){let p=t===null?e:e[t];if(p&&typeof p=="object"&&!ArrayBuffer.isView(p))if(uf.default.isAllowed$Ref(p))p2(e,t,r,n,o,s,a,l);else{let m=Object.keys(p).sort((g,E)=>g==="definitions"?-1:E==="definitions"?1:g.length-E.length);for(let g of m){let E=ta.default.join(r,g),w=ta.default.join(n,g),v=p[g];uf.default.isAllowed$Ref(v)?p2(p,g,r,w,o,s,a,l):hm(p,g,E,w,o,s,a,l)}}}function p2(e,t,r,n,o,s,a,l){let p=t===null?e:e[t],m=Dm.resolve(r,p.$ref),g=a._resolve(m,n,l);if(g===null)return;let w=ta.default.parse(n).length,v=Dm.stripHash(g.path),x=Dm.getHash(g.path),O=v!==a._root$Ref.path,P=uf.default.isExtended$Ref(p);o+=g.indirections;let B=BL(s,e,t);if(B)if(w<B.depth||o<B.indirections)IL(s,B);else return;s.push({$ref:p,parent:e,key:t,pathFromRoot:n,depth:w,file:v,hash:x,value:g.value,circular:g.circular,extended:P,external:O,indirections:o}),(!B||O)&&hm(g.value,null,g.path,n,o+1,s,a,l)}function TL(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=ta.default.join(n,ta.default.parse(o.hash.replace(r,"#"))):(t=o.file,r=o.hash,n=o.pathFromRoot,o.$ref=o.parent[o.key]=uf.default.dereference(o.$ref,o.value),o.circular&&(o.$ref.$ref=o.pathFromRoot)):o.$ref.$ref=o.hash}function BL(e,t,r){for(let n of e)if(n&&n.parent===t&&n.key===r)return n}function IL(e,t){let r=e.indexOf(t);e.splice(r,1)}zr.default=OL});var F2=M(Vr=>{"use strict";d();var RL=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]})),ML=Vr&&Vr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),NL=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"&&RL(r,t,n[o]);return ML(r,t),r}})(),_2=Vr&&Vr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Vr,"__esModule",{value:!0});var sf=_2(Fu()),h2=_2(Xs()),jL=Rt(),m2=NL(Er()),$L=vr();Vr.default=LL;function LL(e,t){let r=Date.now(),n=mm(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 mm(e,t,r,n,o,s,a,l,p){let m,g={value:e,circular:!1};if(l&&l.timeoutMs&&Date.now()-p>l.timeoutMs)throw new $L.TimeoutError(l.timeoutMs);let E=l.dereference||{},w=E.excludedPathMatcher||(()=>!1);if((E?.circular==="ignore"||!o.has(e))&&e&&typeof e=="object"&&!ArrayBuffer.isView(e)&&!w(r)){if(n.add(e),o.add(e),sf.default.isAllowed$Ref(e,l))m=g2(e,t,r,n,o,s,a,l,p),g.circular=m.circular,g.value=m.value;else for(let v of Object.keys(e)){let x=h2.default.join(t,v),O=h2.default.join(r,v);if(w(O))continue;let P=e[v],B=!1;sf.default.isAllowed$Ref(P,l)?(m=g2(P,x,O,n,o,s,a,l,p),B=m.circular,e[v]!==m.value&&(e[v]=m.value,E?.onDereference?.(P.$ref,e[v],e,v))):n.has(P)?B=y2(x,a,l):(m=mm(P,x,O,n,o,s,a,l,p),B=m.circular,e[v]!==m.value&&(e[v]=m.value)),g.circular=g.circular||B}n.delete(e)}return g}function g2(e,t,r,n,o,s,a,l,p){let g=sf.default.isExternal$Ref(e)&&l?.dereference?.externalReferenceResolution==="root",E=m2.resolve(g?m2.cwd():t,e.$ref),w=s.get(E);if(w&&!w.circular){let U=Object.keys(e);if(U.length>1){let q={};for(let G of U)G!=="$ref"&&!(G in w.value)&&(q[G]=e[G]);return{circular:w.circular,value:Object.assign({},w.value,q)}}return w}let v=a._resolve(E,t,l);if(v===null)return{circular:!1,value:null};let x=v.circular,O=x||n.has(v.value);O&&y2(t,a,l);let P=sf.default.dereference(e,v.value);if(!O){let U=mm(P,v.path,r,n,o,s,a,l,p);O=U.circular,P=U.value}O&&!x&&l.dereference?.circular==="ignore"&&(P=e),x&&(P.$ref=r);let B={circular:O,value:P};return Object.keys(e).length===1&&s.set(E,B),B}function y2(e,t,r){if(t.circular=!0,!r.dereference.circular)throw jL.ono.reference(`Circular $ref pointer found at ${e}`);return!0}});var E2=M(gm=>{"use strict";d();Object.defineProperty(gm,"__esModule",{value:!0});function UL(){return typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:typeof setImmediate=="function"?setImmediate:function(t){setTimeout(t,0)}}gm.default=UL()});var C2=M(ra=>{"use strict";d();var kL=ra&&ra.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ra,"__esModule",{value:!0});ra.default=qL;var v2=kL(E2());function qL(e,t){if(e){t.then(function(r){(0,v2.default)(function(){e(null,r)})},function(r){(0,v2.default)(function(){e(r)})});return}else return t}});var S2=M(oe=>{"use strict";d();var WL=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]})),HL=oe&&oe.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),zL=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"&&WL(r,t,n[o]);return HL(r,t),r}})(),yo=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 w2=yo(zb()),VL=yo(sm()),na=yo(l2());oe.jsonSchemaParserNormalizeArgs=na.default;var KL=yo(f2()),JL=yo(D2()),A2=yo(F2());oe.dereferenceInternal=A2.default;var _o=zL(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=Rt(),Kr=yo(C2()),GL=fm();Object.defineProperty(oe,"getJsonSchemaRefParserDefaultOptions",{enumerable:!0,get:function(){return GL.getJsonSchemaRefParserDefaultOptions}});var xi=class e{constructor(){this.schema=null,this.$refs=new w2.default}async parse(){let t=(0,na.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,Kr.default)(t.callback,Promise.reject(o))}this.schema=null,this.$refs=new w2.default;let n="http";if(_o.isFileSystemPath(t.path))t.path=_o.fromFileSystemPath(t.path),n="file";else if(!t.path&&t.schema&&"$id"in t.schema&&t.schema.$id){let o=_o.parse(t.schema.$id),s=o.protocol==="https:"?443:80;t.path=`${o.protocol}//${o.hostname}:${s}`}if(t.path=_o.resolve(_o.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,VL.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,Kr.default)(t.callback,Promise.resolve(this.schema));if(t.options.continueOnError)return this.schema=null,(0,Kr.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,Kr.default)(t.callback,Promise.reject(o)):(this.$refs._$refs[_o.stripHash(t.path)]&&this.$refs._$refs[_o.stripHash(t.path)].addError(o),(0,Kr.default)(t.callback,Promise.resolve(null)))}}static parse(){let t=new e;return t.parse.apply(t,arguments)}async resolve(){let t=(0,na.default)(arguments);try{return await this.parse(t.path,t.schema,t.options),await(0,KL.default)(this,t.options),_m(this),(0,Kr.default)(t.callback,Promise.resolve(this.$refs))}catch(r){return(0,Kr.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,na.default)(arguments);try{return await this.resolve(t.path,t.schema,t.options),(0,JL.default)(this,t.options),_m(this),(0,Kr.default)(t.callback,Promise.resolve(this.schema))}catch(r){return(0,Kr.default)(t.callback,Promise.reject(r))}}static dereference(){let t=new e;return t.dereference.apply(t,arguments)}async dereference(){let t=(0,na.default)(arguments);try{return await this.resolve(t.path,t.schema,t.options),(0,A2.default)(this,t.options),_m(this),(0,Kr.default)(t.callback,Promise.resolve(this.schema))}catch(r){return(0,Kr.default)(t.callback,Promise.reject(r))}}};oe.$RefParser=xi;oe.default=xi;function _m(e){if(Cr.JSONParserErrorGroup.getParserErrors(e).length>0)throw new Cr.JSONParserErrorGroup(e)}oe.parse=xi.parse;oe.resolve=xi.resolve;oe.bundle=xi.bundle;oe.dereference=xi.dereference});var x2=M(wu=>{"use strict";d();var YL=wu&&wu.__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{m(n.next(g))}catch(E){a(E)}}function p(g){try{m(n.throw(g))}catch(E){a(E)}}function m(g){g.done?s(g.value):o(g.value).then(l,p)}m((n=n.apply(e,t||[])).next())})};Object.defineProperty(wu,"__esModule",{value:!0});wu.dereference=void 0;var XL=S2(),ZL=wi();function QL(e,t){return YL(this,arguments,void 0,function*(r,{cwd:n,$refOptions:o}){(0,ZL.log)("green","dereferencer","Dereferencing input schema:",n,r);let s=new XL.$RefParser,a=new WeakMap,l=yield s.dereference(n,r,Object.assign(Object.assign({},o),{dereference:Object.assign(Object.assign({},o.dereference),{onDereference(p,m){a.set(m,p)}})}));return{dereferencedPaths:a,dereferencedSchema:l}})}wu.dereference=QL});var P2=M(af=>{"use strict";d();Object.defineProperty(af,"__esModule",{value:!0});af.validate=void 0;var eU=wi(),Fo=new Map;Fo.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});Fo.set("tsEnumNames must be an array of strings",e=>{if(e.tsEnumNames&&e.tsEnumNames.some(t=>typeof t!="string"))return!1});Fo.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});Fo.set("When maxItems exists, maxItems >= 0",e=>{let{maxItems:t}=e;if(typeof t=="number")return t>=0});Fo.set("When minItems exists, minItems >= 0",e=>{let{minItems:t}=e;if(typeof t=="number")return t>=0});Fo.set("deprecated must be a boolean",e=>{let t=typeof e.deprecated;return t==="boolean"||t==="undefined"});function tU(e,t){let r=[];return Fo.forEach((n,o)=>{(0,eU.traverse)(e,(s,a)=>(n(s)===!1&&r.push(`Error at key "${a}" in file "${t}": ${o}`),s))}),r}af.validate=tU});var T2=M(cf=>{"use strict";d();Object.defineProperty(cf,"__esModule",{value:!0});cf.link=void 0;var O2=co(),rU=Nn();function ym(e,t=null){if(!Array.isArray(e)&&!(0,rU.isPlainObject)(e)||e.hasOwnProperty(O2.Parent))return e;Object.defineProperty(e,O2.Parent,{enumerable:!1,value:t,writable:!1}),Array.isArray(e)&&e.forEach(r=>ym(r,e));for(let r in e)ym(e[r],e);return e}cf.link=ym});var B2=M(lf=>{"use strict";d();Object.defineProperty(lf,"__esModule",{value:!0});lf.validateOptions=void 0;function nU({maxItems:e}){if(e!==void 0&&e<-1)throw RangeError(`Expected options.maxItems to be >= -1, but was given ${e}.`)}lf.validateOptions=nU});var Th=M(Wt=>{"use strict";d();var iU=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{m(n.next(g))}catch(E){a(E)}}function p(g){try{m(n.throw(g))}catch(E){a(E)}}function m(g){g.done?s(g.value):o(g.value).then(l,p)}m((n=n.apply(e,t||[])).next())})};Object.defineProperty(Wt,"__esModule",{value:!0});Wt.ValidationError=Wt.compile=Wt.compileFromFile=Wt.DEFAULT_OPTIONS=void 0;var oU=ze("fs"),Fm=Nn(),uU=ze("path"),sU=LC(),aU=Oh(),cU=cb(),lU=pb(),fU=Db(),pU=x2(),ir=wi(),dU=P2(),DU=ze("util"),hU=T2(),mU=B2();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 gU(e,t=Wt.DEFAULT_OPTIONS){let r=_U(e);return I2(r,(0,ir.stripExtension)(e),Object.assign({cwd:(0,uU.dirname)(e)},t))}Wt.compileFromFile=gU;function _U(e){let t=(0,ir.Try)(()=>(0,oU.readFileSync)(e),()=>{throw new ReferenceError(`Unable to read file "${e}"`)});return(0,ir.parseFileAsJSONSchema)(e,t.toString())}function I2(e,t){return iU(this,arguments,void 0,function*(r,n,o={}){(0,mU.validateOptions)(o);let s=(0,Fm.merge)({},Wt.DEFAULT_OPTIONS,o),a=Date.now();function l(){return`(${Date.now()-a}ms)`}(0,Fm.endsWith)(s.cwd,"/")||(s.cwd+="/");let p=(0,Fm.cloneDeep)(r),{dereferencedPaths:m,dereferencedSchema:g}=yield(0,pU.dereference)(p,s);process.env.VERBOSE&&((0,DU.isDeepStrictEqual)(p,g)?(0,ir.log)("green","dereferencer",l(),"\u2705 No change"):(0,ir.log)("green","dereferencer",l(),"\u2705 Result:",g));let E=(0,hU.link)(g);process.env.VERBOSE&&(0,ir.log)("green","linker",l(),"\u2705 No change");let w=(0,dU.validate)(E,n);if(w.length)throw w.forEach(U=>(0,ir.error)(U)),new ff;process.env.VERBOSE&&(0,ir.log)("green","validator",l(),"\u2705 No change");let v=(0,cU.normalize)(E,m,n,s);(0,ir.log)("yellow","normalizer",l(),"\u2705 Result:",v);let x=(0,fU.parse)(v,s);(0,ir.log)("blue","parser",l(),"\u2705 Result:",x);let O=(0,lU.optimize)(x,s);(0,ir.log)("cyan","optimizer",l(),"\u2705 Result:",O);let P=(0,aU.generate)(O,s);(0,ir.log)("magenta","generator",l(),"\u2705 Result:",P);let B=yield(0,sU.format)(P,s);return(0,ir.log)("white","formatter",l(),"\u2705 Result:",B),B})}Wt.compile=I2;var ff=class extends Error{};Wt.ValidationError=ff});var bm=M(ua=>{"use strict";d();var rk=ua&&ua.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ua,"__esModule",{value:!0});ua.default=nk;var l1=rk(ze("path"));function nk(e){return e.startsWith("\\\\?\\")?e:e.split(l1.default?.win32?.sep).join(l1.default?.posix?.sep??"/")}});var f1=M(df=>{"use strict";d();Object.defineProperty(df,"__esModule",{value:!0});df.isWindows=void 0;var ik=/^win/.test(globalThis.process?globalThis.process.platform:""),ok=()=>ik;df.isWindows=ok});var wr=M(Ue=>{"use strict";d();var uk=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]})),sk=Ue&&Ue.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),ak=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"&&uk(r,t,n[o]);return sk(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=p1;Ue.cwd=d1;Ue.getProtocol=Om;Ue.getExtension=gk;Ue.stripQuery=D1;Ue.getHash=h1;Ue.stripHash=xm;Ue.isHttp=_k;Ue.isFileSystemPath=Pm;Ue.fromFileSystemPath=yk;Ue.toFileSystemPath=Fk;Ue.safePointerToPath=Ek;Ue.relative=vk;var hf=ck(bm()),Sm=ak(ze("path")),lk=/\//g,fk=/^(\w{2,}):\/\//i,pk=/~1/g,dk=/~0/g,Dk=ze("path"),Df=f1(),hk=[[/\?/g,"%3F"],[/#/g,"%23"]],Am=[/%23/g,"#",/%24/g,"$",/%26/g,"&",/%2C/g,",",/%40/g,"@"],mk=e=>new URL(e);Ue.parse=mk;function p1(e,t){let r=new URL((0,hf.default)(e),"https://aaa.nonexistanturl.com"),n=new URL((0,hf.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 d1(){if(typeof window<"u")return location.href;let e=process.cwd(),t=e.slice(-1);return t==="/"||t==="\\"?e:e+"/"}function Om(e){let t=fk.exec(e||"");if(t)return t[1].toLowerCase()}function gk(e){let t=e.lastIndexOf(".");return t>=0?D1(e.substr(t).toLowerCase()):""}function D1(e){let t=e.indexOf("?");return t>=0&&(e=e.substr(0,t)),e}function h1(e){if(!e)return"#";let t=e.indexOf("#");return t>=0?e.substring(t):"#"}function xm(e){if(!e)return"";let t=e.indexOf("#");return t>=0&&(e=e.substring(0,t)),e}function _k(e){let t=Om(e);return t==="http"||t==="https"?!0:t===void 0?typeof window<"u":!1}function Pm(e){if(typeof window<"u"||typeof process<"u"&&process.browser)return!1;let t=Om(e);return t===void 0||t==="file"}function yk(e){if((0,Df.isWindows)()){let t=d1(),r=e.toUpperCase(),o=(0,hf.default)(t).toUpperCase(),s=r.includes(o),a=r.includes(o),l=Sm.win32?.isAbsolute(e)||e.startsWith("http://")||e.startsWith("https://")||e.startsWith("file://");!(s||a||l)&&!t.startsWith("http")&&(e=(0,Dk.join)(t,e)),e=(0,hf.default)(e)}e=encodeURI(e);for(let t of hk)e=e.replace(t[0],t[1]);return e}function Fk(e,t){e=decodeURI(e);for(let n=0;n<Am.length;n+=2)e=e.replace(Am[n],Am[n+1]);let r=e.substr(0,7).toLowerCase()==="file://";return r&&(e=e[7]==="/"?e.substr(8):e.substr(7),(0,Df.isWindows)()&&e[1]==="/"&&(e=e[0]+":"+e.substr(1)),t?e="file:///"+e:(r=!1,e=(0,Df.isWindows)()?e:"/"+e)),(0,Df.isWindows)()&&!r&&(e=e.replace(lk,"\\"),e.substr(1,2)===":\\"&&(e=e[0].toUpperCase()+e.substr(1))),e}function Ek(e){return e.length<=1||e[0]!=="#"||e[1]!=="/"?[]:e.slice(2).split("/").map(t=>decodeURIComponent(t).replace(pk,"/").replace(dk,"~"))}function vk(e,t){if(!Pm(e)||!Pm(t))return p1(e,t);let r=Sm.default.dirname(xm(e)),n=xm(t);return Sm.default.relative(r,n)+h1(t)}});var br=M(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=Ck;Ye.normalizeError=wk;var m1=Rt(),mf=wr(),Jr=class extends Error{constructor(t,r){super(),this.code="EUNKNOWN",this.name="JSONParserError",this.message=t,this.source=r,this.path=null,m1.Ono.extend(this)}get footprint(){return`${this.path}+${this.source}+${this.code}+${this.message}`}};Ye.JSONParserError=Jr;var gf=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,mf.toFileSystemPath)(t.$refs._root$Ref.path)}'`,m1.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=gf;var Tm=class extends Jr{constructor(t,r){super(`Error parsing ${r}: ${t}`,r),this.code="EPARSER",this.name="ParserError"}};Ye.ParserError=Tm;var Bm=class extends Jr{constructor(t){super(`Could not find parser for "${t}"`,t),this.code="EUNMATCHEDPARSER",this.name="UnmatchedParserError"}};Ye.UnmatchedParserError=Bm;var Im=class extends Jr{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=Im;var Rm=class extends Jr{constructor(t){super(`Could not find resolver for "${t}"`,t),this.code="EUNMATCHEDRESOLVER",this.name="UnmatchedResolverError"}};Ye.UnmatchedResolverError=Rm;var Mm=class extends Jr{constructor(t,r,n,o,s){super(`Missing $ref pointer "${(0,mf.getHash)(r)}". Token "${t}" does not exist.`,(0,mf.stripHash)(r)),this.code="EMISSINGPOINTER",this.name="MissingPointerError",this.targetToken=t,this.targetRef=n,this.targetFound=o,this.parentPath=s}};Ye.MissingPointerError=Mm;var Nm=class extends Jr{constructor(t){super(`Dereferencing timeout reached: ${t}ms`),this.code="ETIMEOUT",this.name="TimeoutError"}};Ye.TimeoutError=Nm;var jm=class extends Jr{constructor(t,r){super(`Invalid $ref pointer "${t}". Pointers must begin with "#/"`,(0,mf.stripHash)(r)),this.code="EUNMATCHEDRESOLVER",this.name="InvalidPointerError"}};Ye.InvalidPointerError=jm;function Ck(e){return e instanceof Jr||e instanceof gf}function wk(e){return e.path===null&&(e.path=[]),e}});var sa=M(Ht=>{"use strict";d();var bk=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]})),Ak=Ht&&Ht.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Sk=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"&&bk(r,t,n[o]);return Ak(r,t),r}})(),xk=Ht&&Ht.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ht,"__esModule",{value:!0});Ht.nullSymbol=void 0;var $m=xk(Au()),Lm=Sk(wr()),yf=br();Ht.nullSymbol=Symbol("null");var Pk=/\//g,Ok=/~/g,Tk=/~1/g,Bk=/~0/g,Ik=e=>{try{return decodeURIComponent(e)}catch{return e}},Ff=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=_1(t);for(let a=0;a<o.length;a++){if(_f(this,r,n)&&(this.path=e.join(this.path,o.slice(a))),typeof this.value=="object"&&this.value!==null&&!y1(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 x=o.slice(a,v+1).join("/");if(this.value[x]!==void 0){this.value=this.value[x],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 m=this.$ref.path||"",g=this.path.replace(m,""),E=e.join("",s),w=n?.replace(m,"");throw new yf.MissingPointerError(l,decodeURI(this.originalPath),g,E,w)}else this.value=this.value[l];s.push(l)}return(!this.value||this.value.$ref&&Lm.resolve(this.path,this.value.$ref)!==n)&&_f(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=_1(t);for(let a=0;a<o.length-1;a++)_f(this,n),s=o[a],this.value&&this.value[s]!==void 0?this.value=this.value[s]:this.value=g1(this,s,{});return _f(this,n),s=o[o.length-1],g1(this,s,r),t}static parse(t,r){let n=Lm.getHash(t).substring(1);if(!n)return[];let o=n.split("/");for(let s=0;s<o.length;s++)o[s]=Ik(o[s].replace(Tk,"/").replace(Bk,"~"));if(o[0]!=="")throw new yf.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(Ok,"~0").replace(Pk,"~1"))}return t}};function _f(e,t,r){if($m.default.isAllowed$Ref(e.value,t)){let n=Lm.resolve(e.path,e.value.$ref);if(n===e.path&&!y1(r))e.circular=!0;else{let o=e.$ref.$refs._resolve(n,e.path,t);return o===null?!1:(e.indirections+=o.indirections+1,$m.default.isExtended$Ref(e.value)?(e.value=$m.default.dereference(e.value,o.value),!1):(e.$ref=o.$ref,e.path=o.path,e.value=o.value,!0))}}}Ht.default=Ff;function g1(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 yf.JSONParserError(`Error assigning $ref pointer "${e.path}".
|
|
121
|
+
Cannot set "${t}" of a non-object.`);return r}function _1(e){if((0,yf.isHandledError)(e))throw e;return e}function y1(e){return typeof e=="string"&&Ff.parse(e).length==0}});var Au=M(Wn=>{"use strict";d();var Rk=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]})),Mk=Wn&&Wn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Nk=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"&&Rk(r,t,n[o]);return Mk(r,t),r}})();Object.defineProperty(Wn,"__esModule",{value:!0});var Ef=Nk(sa()),vf=br(),Um=wr(),km=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(vf.normalizeError).filter(({footprint:n})=>!r.includes(n))):(!("footprint"in t)||!r.includes(t.footprint))&&this.errors.push((0,vf.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 Ef.default(this,t,n);try{let a=s.resolve(this.value,r,o);return a.value===Ef.nullSymbol&&(a.value=null),a}catch(a){if(!r||!r.continueOnError||!(0,vf.isHandledError)(a))throw a;return a.path===null&&(a.path=(0,Um.safePointerToPath)((0,Um.getHash)(o))),a instanceof vf.InvalidPointerError&&(a.source=decodeURI((0,Um.stripHash)(o))),this.addError(a),null}}set(t,r){let n=new Ef.default(this,t);this.value=n.set(this.value,r),this.value===Ef.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}};Wn.default=km});var w1=M(Gr=>{"use strict";d();var jk=Gr&&Gr.__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]})),$k=Gr&&Gr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Lk=Gr&&Gr.__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"&&jk(r,t,n[o]);return $k(r,t),r}})(),C1=Gr&&Gr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gr,"__esModule",{value:!0});var F1=Rt(),Uk=C1(Au()),Pi=Lk(wr()),E1=C1(bm()),qm=class{paths(...t){return v1(this._$refs,t.flat()).map(n=>(0,E1.default)(n.decoded))}values(...t){let r=this._$refs;return v1(r,t.flat()).reduce((o,s)=>(o[(0,E1.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=Pi.resolve(this._root$Ref.path,t),o=Pi.stripHash(n),s=this._$refs[o];if(!s)throw(0,F1.ono)(`Error resolving $ref pointer "${t}".
|
|
122
|
+
"${o}" not found.`);s.set(n,r)}_get$Ref(t){t=Pi.resolve(this._root$Ref.path,t);let r=Pi.stripHash(t);return this._$refs[r]}_add(t){let r=Pi.stripHash(t),n=new Uk.default(this);return n.path=r,this._$refs[r]=n,this._root$Ref=this._root$Ref||n,n}_resolve(t,r,n){let o=Pi.resolve(this._root$Ref.path,t),s=Pi.stripHash(o),a=this._$refs[s];if(!a)throw(0,F1.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}};Gr.default=qm;function v1(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"?Pi.toFileSystemPath(n,!0):n}))}});var A1=M(Su=>{"use strict";d();Object.defineProperty(Su,"__esModule",{value:!0});Su.all=kk;Su.filter=qk;Su.sort=Wk;Su.run=Hk;function kk(e){return Object.keys(e||{}).filter(t=>typeof e[t]=="object").map(t=>(e[t].name=t,e[t]))}function qk(e,t,r){return e.filter(n=>!!b1(n,t,r))}function Wk(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 Hk(e,t,r,n){let o,s,a=0;return new Promise((l,p)=>{m();function m(){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(E,w);else if(v!==void 0)E(v);else if(a===e.length)throw new Error("No promise has been returned or callback has been called.")}catch(v){w(v)}}function g(v,x){v?w(v):E(x)}function E(v){l({plugin:o,result:v})}function w(v){s={plugin:o,error:v},m()}})}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 Hm=M(Hn=>{"use strict";d();var zk=Hn&&Hn.__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]})),Vk=Hn&&Hn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),S1=Hn&&Hn.__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"&&zk(r,t,n[o]);return Vk(r,t),r}})();Object.defineProperty(Hn,"__esModule",{value:!0});var Wm=Rt(),Kk=S1(wr()),Oi=S1(A1()),Eo=br();async function Jk(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:Kk.getExtension(e)};try{let l=await Gk(a,r,t);s.pathType=l.plugin.name,a.data=l.result;let p=await Yk(a,r,t);return s.value=p.result,p.result}catch(l){throw(0,Eo.isHandledError)(l)&&(s.value=l),l}}async function Gk(e,t,r){let n=Oi.all(t.resolve);n=Oi.filter(n,"canRead",e),Oi.sort(n);try{return await Oi.run(n,"read",e,r)}catch(o){throw!o&&t.continueOnError?new Eo.UnmatchedResolverError(e.url):!o||!("error"in o)?Wm.ono.syntax(`Unable to resolve $ref pointer "${e.url}"`):o.error instanceof Eo.ResolverError?o.error:new Eo.ResolverError(o,e.url)}}async function Yk(e,t,r){let n=Oi.all(t.parse),o=Oi.filter(n,"canParse",e),s=o.length>0?o:n;Oi.sort(s);try{let a=await Oi.run(s,"parse",e,r);if(!a.plugin.allowEmpty&&Xk(a.result))throw Wm.ono.syntax(`Error parsing "${e.url}" as ${a.plugin.name}.
|
|
124
|
+
Parsed value is empty`);return a}catch(a){throw!a&&t.continueOnError?new Eo.UnmatchedParserError(e.url):a&&a.message&&a.message.startsWith("Error parsing")?a:!a||!("error"in a)?Wm.ono.syntax(`Unable to parse ${e.url}`):a.error instanceof Eo.ParserError?a.error:new Eo.ParserError(a.error.message,e.url)}}function Xk(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}Hn.default=Jk});var P1=M(zm=>{"use strict";d();Object.defineProperty(zm,"__esModule",{value:!0});var x1=br();zm.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 x1.ParserError(n.message,e.url)}throw new x1.ParserError(r.message,e.url)}}else return t}}});var O1=M(aa=>{"use strict";d();var Zk=aa&&aa.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(aa,"__esModule",{value:!0});var Qk=br(),e4=Zk(fu()),t4=fu();aa.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 e4.default.load(t,{schema:t4.JSON_SCHEMA})}catch(r){throw new Qk.ParserError(r?.message||"Parser Error",e.url)}else return t}}});var T1=M(Vm=>{"use strict";d();Object.defineProperty(Vm,"__esModule",{value:!0});var r4=br(),n4=/\.(txt|htm|html|md|xml|js|min|map|css|scss|less|svg)$/i;Vm.default={order:300,allowEmpty:!0,encoding:"utf8",canParse(e){return(typeof e.data=="string"||Buffer.isBuffer(e.data))&&n4.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 r4.ParserError("data is not text",e.url)}}});var B1=M(Km=>{"use strict";d();Object.defineProperty(Km,"__esModule",{value:!0});var i4=/\.(jpeg|jpg|gif|png|bmp|ico)$/i;Km.default={order:400,allowEmpty:!0,canParse(e){return Buffer.isBuffer(e.data)&&i4.test(e.url)},parse(e){return Buffer.isBuffer(e.data)?e.data:Buffer.from(e.data)}}});var N1=M(Yr=>{"use strict";d();var o4=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]})),u4=Yr&&Yr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),s4=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"&&o4(r,t,n[o]);return u4(r,t),r}})(),a4=Yr&&Yr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Yr,"__esModule",{value:!0});var c4=a4(ze("fs")),I1=Rt(),R1=s4(wr()),M1=br();Yr.default={order:100,canRead(e){return R1.isFileSystemPath(e.url)},async read(e){let t;try{t=R1.toFileSystemPath(e.url)}catch(r){throw new M1.ResolverError(I1.ono.uri(r,`Malformed URI: ${e.url}`),e.url)}try{return await c4.default.promises.readFile(t)}catch(r){throw new M1.ResolverError((0,I1.ono)(r,`Error opening file "${t}"`),t)}}}});var L1=M(zn=>{"use strict";d();var l4=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]})),f4=zn&&zn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),p4=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"&&l4(r,t,n[o]);return f4(r,t),r}})();Object.defineProperty(zn,"__esModule",{value:!0});var Cf=Rt(),ca=p4(wr()),j1=br();zn.default={order:200,headers:null,timeout:6e4,redirects:5,withCredentials:!1,canRead(e){return ca.isHttp(e.url)},read(e){let t=ca.parse(e.url);return typeof window<"u"&&!t.protocol&&(t.protocol=ca.parse(location.href).protocol),$1(t,this)}};async function $1(e,t,r){e=ca.parse(e);let n=r||[];n.push(e.href);try{let o=await d4(e,t);if(o.status>=400)throw(0,Cf.ono)({status:o.status},`HTTP ERROR ${o.status}`);if(o.status>=300){if(!Number.isNaN(t.redirects)&&n.length>t.redirects)throw new j1.ResolverError((0,Cf.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,Cf.ono)({status:o.status},`HTTP ${o.status} redirect with no location header`);{let s=ca.resolve(e.href,o.headers.location);return $1(s,t,n)}}else{if(o.body){let s=await o.arrayBuffer();return Buffer.from(s)}return Buffer.alloc(0)}}catch(o){throw new j1.ResolverError((0,Cf.ono)(o,`Error downloading ${e.href}`),e.href)}}async function d4(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 Jm=M(Vn=>{"use strict";d();var xu=Vn&&Vn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Vn,"__esModule",{value:!0});Vn.getNewOptions=Vn.getJsonSchemaRefParserDefaultOptions=void 0;var D4=xu(P1()),h4=xu(O1()),m4=xu(T1()),g4=xu(B1()),_4=xu(N1()),y4=xu(L1()),F4=()=>({parse:{json:{...D4.default},yaml:{...h4.default},text:{...m4.default},binary:{...g4.default}},resolve:{file:{..._4.default},http:{...y4.default},external:!0},continueOnError:!1,dereference:{circular:!0,excludedPathMatcher:()=>!1,referenceResolution:"relative"},mutateInputSchema:!0});Vn.getJsonSchemaRefParserDefaultOptions=F4;var E4=e=>{let t=(0,Vn.getJsonSchemaRefParserDefaultOptions)();return e&&k1(t,e),t};Vn.getNewOptions=E4;function k1(e,t){if(U1(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];U1(s)?e[o]=k1(a||{},s):s!==void 0&&(e[o]=s)}}return e}function U1(e){return e&&typeof e=="object"&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}});var W1=M(wf=>{"use strict";d();Object.defineProperty(wf,"__esModule",{value:!0});wf.normalizeArgs=q1;var v4=Jm();function q1(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,v4.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}}wf.default=q1});var H1=M(Xr=>{"use strict";d();var C4=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]})),w4=Xr&&Xr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),b4=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"&&C4(r,t,n[o]);return w4(r,t),r}})(),Gm=Xr&&Xr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Xr,"__esModule",{value:!0});var A4=Gm(Au()),S4=Gm(sa()),x4=Gm(Hm()),Pu=b4(wr()),P4=br();function O4(e,t){if(!t.resolve?.external)return Promise.resolve();try{let r=Ym(e.schema,e.$refs._root$Ref.path+"#",e.$refs,t);return Promise.all(r)}catch(r){return Promise.reject(r)}}function Ym(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),A4.default.isExternal$Ref(e)&&a.push(T4(e,t,r,n));let l=Object.keys(e);for(let p of l){let m=S4.default.join(t,p),g=e[p];a=a.concat(Ym(g,m,r,n,o,s))}}return a}async function T4(e,t,r,n){let o=n.dereference?.externalReferenceResolution==="root",s=Pu.resolve(o?Pu.cwd():t,e.$ref),a=Pu.stripHash(s),l=r._$refs[a];if(l)return Promise.resolve(l.value);try{let p=await(0,x4.default)(s,r,n),m=Ym(p,a+"#",r,n,new Set,!0);return Promise.all(m)}catch(p){if(!n?.continueOnError||!(0,P4.isHandledError)(p))throw p;return r._$refs[a]&&(p.source=decodeURI(Pu.stripHash(t)),p.path=Pu.safePointerToPath(Pu.getHash(t))),[]}}Xr.default=O4});var K1=M(Zr=>{"use strict";d();var B4=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]})),I4=Zr&&Zr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),R4=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"&&B4(r,t,n[o]);return I4(r,t),r}})(),V1=Zr&&Zr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Zr,"__esModule",{value:!0});var bf=V1(Au()),la=V1(sa()),Xm=R4(wr());function M4(e,t){let r=[];Zm(e,"schema",e.$refs._root$Ref.path+"#","#",0,r,e.$refs,t),N4(r)}function Zm(e,t,r,n,o,s,a,l){let p=t===null?e:e[t];if(p&&typeof p=="object"&&!ArrayBuffer.isView(p))if(bf.default.isAllowed$Ref(p))z1(e,t,r,n,o,s,a,l);else{let m=Object.keys(p).sort((g,E)=>g==="definitions"?-1:E==="definitions"?1:g.length-E.length);for(let g of m){let E=la.default.join(r,g),w=la.default.join(n,g),v=p[g];bf.default.isAllowed$Ref(v)?z1(p,g,r,w,o,s,a,l):Zm(p,g,E,w,o,s,a,l)}}}function z1(e,t,r,n,o,s,a,l){let p=t===null?e:e[t],m=Xm.resolve(r,p.$ref),g=a._resolve(m,n,l);if(g===null)return;let w=la.default.parse(n).length,v=Xm.stripHash(g.path),x=Xm.getHash(g.path),O=v!==a._root$Ref.path,P=bf.default.isExtended$Ref(p);o+=g.indirections;let B=j4(s,e,t);if(B)if(w<B.depth||o<B.indirections)$4(s,B);else return;s.push({$ref:p,parent:e,key:t,pathFromRoot:n,depth:w,file:v,hash:x,value:g.value,circular:g.circular,extended:P,external:O,indirections:o}),(!B||O)&&Zm(g.value,null,g.path,n,o+1,s,a,l)}function N4(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=la.default.join(n,la.default.parse(o.hash.replace(r,"#"))):(t=o.file,r=o.hash,n=o.pathFromRoot,o.$ref=o.parent[o.key]=bf.default.dereference(o.$ref,o.value),o.circular&&(o.$ref.$ref=o.pathFromRoot)):o.$ref.$ref=o.hash}function j4(e,t,r){for(let n of e)if(n&&n.parent===t&&n.key===r)return n}function $4(e,t){let r=e.indexOf(t);e.splice(r,1)}Zr.default=M4});var Q1=M(Qr=>{"use strict";d();var L4=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]})),U4=Qr&&Qr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),k4=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"&&L4(r,t,n[o]);return U4(r,t),r}})(),X1=Qr&&Qr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Qr,"__esModule",{value:!0});var Af=X1(Au()),J1=X1(sa()),q4=Rt(),G1=k4(wr()),W4=br();Qr.default=H4;function H4(e,t){let r=Date.now(),n=Qm(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 Qm(e,t,r,n,o,s,a,l,p){let m,g={value:e,circular:!1};if(l&&l.timeoutMs&&Date.now()-p>l.timeoutMs)throw new W4.TimeoutError(l.timeoutMs);let E=l.dereference||{},w=E.excludedPathMatcher||(()=>!1);if((E?.circular==="ignore"||!o.has(e))&&e&&typeof e=="object"&&!ArrayBuffer.isView(e)&&!w(r)){if(n.add(e),o.add(e),Af.default.isAllowed$Ref(e,l))m=Y1(e,t,r,n,o,s,a,l,p),g.circular=m.circular,g.value=m.value;else for(let v of Object.keys(e)){let x=J1.default.join(t,v),O=J1.default.join(r,v);if(w(O))continue;let P=e[v],B=!1;if(Af.default.isAllowed$Ref(P,l)){if(m=Y1(P,x,O,n,o,s,a,l,p),B=m.circular,e[v]!==m.value){let U=new Map;E?.preservedProperties&&typeof e[v]=="object"&&!Array.isArray(e[v])&&E?.preservedProperties.forEach(q=>{q in e[v]&&U.set(q,e[v][q])}),e[v]=m.value,E?.preservedProperties&&U.size&&typeof e[v]=="object"&&!Array.isArray(e[v])&&U.forEach((q,G)=>{e[v][G]=q}),E?.onDereference?.(P.$ref,e[v],e,v)}}else n.has(P)?B=Z1(x,a,l):(m=Qm(P,x,O,n,o,s,a,l,p),B=m.circular,e[v]!==m.value&&(e[v]=m.value));g.circular=g.circular||B}n.delete(e)}return g}function Y1(e,t,r,n,o,s,a,l,p){let g=Af.default.isExternal$Ref(e)&&l?.dereference?.externalReferenceResolution==="root",E=G1.resolve(g?G1.cwd():t,e.$ref),w=s.get(E);if(w&&!w.circular){let U=Object.keys(e);if(U.length>1){let q={};for(let G of U)G!=="$ref"&&!(G in w.value)&&(q[G]=e[G]);return{circular:w.circular,value:Object.assign({},w.value,q)}}return w}let v=a._resolve(E,t,l);if(v===null)return{circular:!1,value:null};let x=v.circular,O=x||n.has(v.value);O&&Z1(t,a,l);let P=Af.default.dereference(e,v.value);if(!O){let U=Qm(P,v.path,r,n,o,s,a,l,p);O=U.circular,P=U.value}O&&!x&&l.dereference?.circular==="ignore"&&(P=e),x&&(P.$ref=r);let B={circular:O,value:P};return Object.keys(e).length===1&&s.set(E,B),B}function Z1(e,t,r){if(t.circular=!0,r?.dereference?.onCircular?.(e),!r.dereference.circular)throw q4.ono.reference(`Circular $ref pointer found at ${e}`);return!0}});var eA=M(eg=>{"use strict";d();Object.defineProperty(eg,"__esModule",{value:!0});function z4(){return typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:typeof setImmediate=="function"?setImmediate:function(t){setTimeout(t,0)}}eg.default=z4()});var rA=M(fa=>{"use strict";d();var V4=fa&&fa.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(fa,"__esModule",{value:!0});fa.default=K4;var tA=V4(eA());function K4(e,t){if(e){t.then(function(r){(0,tA.default)(function(){e(null,r)})},function(r){(0,tA.default)(function(){e(r)})});return}else return t}});var uA=M(ue=>{"use strict";d();var J4=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]})),G4=ue&&ue.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Y4=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"&&J4(r,t,n[o]);return G4(r,t),r}})(),Co=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 nA=Co(w1()),X4=Co(Hm()),pa=Co(W1());ue.jsonSchemaParserNormalizeArgs=pa.default;var Z4=Co(H1()),Q4=Co(K1()),oA=Co(Q1());ue.dereferenceInternal=oA.default;var vo=Y4(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 iA=Rt(),en=Co(rA()),eq=Jm();Object.defineProperty(ue,"getJsonSchemaRefParserDefaultOptions",{enumerable:!0,get:function(){return eq.getJsonSchemaRefParserDefaultOptions}});var Ti=class e{constructor(){this.schema=null,this.$refs=new nA.default}async parse(){let t=(0,pa.default)(arguments),r;if(!t.path&&!t.schema){let o=(0,iA.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 nA.default;let n="http";if(vo.isFileSystemPath(t.path))t.path=vo.fromFileSystemPath(t.path),n="file";else if(!t.path&&t.schema&&"$id"in t.schema&&t.schema.$id){let o=vo.parse(t.schema.$id),s=o.protocol==="https:"?443:80;t.path=`${o.protocol}//${o.hostname}:${s}`}if(t.path=vo.resolve(vo.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,X4.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 iA.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[vo.stripHash(t.path)]&&this.$refs._$refs[vo.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,pa.default)(arguments);try{return await this.parse(t.path,t.schema,t.options),await(0,Z4.default)(this,t.options),tg(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,pa.default)(arguments);try{return await this.resolve(t.path,t.schema,t.options),(0,Q4.default)(this,t.options),tg(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,pa.default)(arguments);try{return await this.resolve(t.path,t.schema,t.options),(0,oA.default)(this,t.options),tg(this),(0,en.default)(t.callback,Promise.resolve(this.schema))}catch(r){return(0,en.default)(t.callback,Promise.reject(r))}}};ue.$RefParser=Ti;ue.default=Ti;function tg(e){if(Ar.JSONParserErrorGroup.getParserErrors(e).length>0)throw new Ar.JSONParserErrorGroup(e)}ue.parse=Ti.parse;ue.resolve=Ti.resolve;ue.bundle=Ti.bundle;ue.dereference=Ti.dereference});var aA=M((tse,sA)=>{d();function tq(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}sA.exports=tq});var da=M((nse,cA)=>{d();var rq=Uy(),nq=mB();function iq(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?nq(r,l,p):rq(r,l,p)}return r}cA.exports=iq});var fA=M((ose,lA)=>{d();var oq=da(),uq=yy();function sq(e,t){return e&&oq(t,uq(t),e)}lA.exports=sq});var dA=M((sse,pA)=>{d();var aq=da(),cq=ky();function lq(e,t){return e&&aq(t,cq(t),e)}pA.exports=lq});var _A=M((Da,Ou)=>{d();var fq=nB(),gA=typeof Da=="object"&&Da&&!Da.nodeType&&Da,DA=gA&&typeof Ou=="object"&&Ou&&!Ou.nodeType&&Ou,pq=DA&&DA.exports===gA,hA=pq?fq.Buffer:void 0,mA=hA?hA.allocUnsafe:void 0;function dq(e,t){if(t)return e.slice();var r=e.length,n=mA?mA(r):new e.constructor(r);return e.copy(n),n}Ou.exports=dq});var FA=M((lse,yA)=>{d();function Dq(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}yA.exports=Dq});var vA=M((pse,EA)=>{d();var hq=da(),mq=aB();function gq(e,t){return hq(e,mq(e),t)}EA.exports=gq});var wA=M((Dse,CA)=>{d();var _q=da(),yq=_B();function Fq(e,t){return _q(e,yq(e),t)}CA.exports=Fq});var AA=M((mse,bA)=>{d();var Eq=Object.prototype,vq=Eq.hasOwnProperty;function Cq(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&vq.call(e,"index")&&(r.index=e.index,r.input=e.input),r}bA.exports=Cq});var Sf=M((_se,xA)=>{d();var SA=uB();function wq(e){var t=new e.constructor(e.byteLength);return new SA(t).set(new SA(e)),t}xA.exports=wq});var OA=M((Fse,PA)=>{d();var bq=Sf();function Aq(e,t){var r=t?bq(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}PA.exports=Aq});var BA=M((vse,TA)=>{d();var Sq=/\w*$/;function xq(e){var t=new e.constructor(e.source,Sq.exec(e));return t.lastIndex=e.lastIndex,t}TA.exports=xq});var jA=M((wse,NA)=>{d();var IA=iB(),RA=IA?IA.prototype:void 0,MA=RA?RA.valueOf:void 0;function Pq(e){return MA?Object(MA.call(e)):{}}NA.exports=Pq});var LA=M((Ase,$A)=>{d();var Oq=Sf();function Tq(e,t){var r=t?Oq(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}$A.exports=Tq});var kA=M((xse,UA)=>{d();var Bq=Sf(),Iq=OA(),Rq=BA(),Mq=jA(),Nq=LA(),jq="[object Boolean]",$q="[object Date]",Lq="[object Map]",Uq="[object Number]",kq="[object RegExp]",qq="[object Set]",Wq="[object String]",Hq="[object Symbol]",zq="[object ArrayBuffer]",Vq="[object DataView]",Kq="[object Float32Array]",Jq="[object Float64Array]",Gq="[object Int8Array]",Yq="[object Int16Array]",Xq="[object Int32Array]",Zq="[object Uint8Array]",Qq="[object Uint8ClampedArray]",e5="[object Uint16Array]",t5="[object Uint32Array]";function r5(e,t,r){var n=e.constructor;switch(t){case zq:return Bq(e);case jq:case $q:return new n(+e);case Vq:return Iq(e,r);case Kq:case Jq:case Gq:case Yq:case Xq:case Zq:case Qq:case e5:case t5:return Nq(e,r);case Lq:return new n;case Uq:case Wq:return new n(e);case kq:return Rq(e);case qq:return new n;case Hq:return Mq(e)}}UA.exports=r5});var HA=M((Ose,WA)=>{d();var n5=hy(),qA=Object.create,i5=(function(){function e(){}return function(t){if(!n5(t))return{};if(qA)return qA(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}})();WA.exports=i5});var VA=M((Bse,zA)=>{d();var o5=HA(),u5=gB(),s5=lB();function a5(e){return typeof e.constructor=="function"&&!s5(e)?o5(u5(e)):{}}zA.exports=a5});var JA=M((Rse,KA)=>{d();var c5=gd(),l5=my(),f5="[object Map]";function p5(e){return l5(e)&&c5(e)==f5}KA.exports=p5});var ZA=M((Nse,XA)=>{d();var d5=JA(),D5=gy(),GA=_y(),YA=GA&&GA.isMap,h5=YA?D5(YA):d5;XA.exports=h5});var eS=M(($se,QA)=>{d();var m5=gd(),g5=my(),_5="[object Set]";function y5(e){return g5(e)&&m5(e)==_5}QA.exports=y5});var iS=M((Use,nS)=>{d();var F5=eS(),E5=gy(),tS=_y(),rS=tS&&tS.isSet,v5=rS?E5(rS):F5;nS.exports=v5});var cS=M((qse,aS)=>{d();var C5=oB(),w5=aA(),b5=Uy(),A5=fA(),S5=dA(),x5=_A(),P5=FA(),O5=vA(),T5=wA(),B5=fB(),I5=yB(),R5=gd(),M5=AA(),N5=kA(),j5=VA(),$5=sB(),L5=cB(),U5=ZA(),k5=hy(),q5=iS(),W5=yy(),H5=ky(),z5=1,V5=2,K5=4,oS="[object Arguments]",J5="[object Array]",G5="[object Boolean]",Y5="[object Date]",X5="[object Error]",uS="[object Function]",Z5="[object GeneratorFunction]",Q5="[object Map]",eW="[object Number]",sS="[object Object]",tW="[object RegExp]",rW="[object Set]",nW="[object String]",iW="[object Symbol]",oW="[object WeakMap]",uW="[object ArrayBuffer]",sW="[object DataView]",aW="[object Float32Array]",cW="[object Float64Array]",lW="[object Int8Array]",fW="[object Int16Array]",pW="[object Int32Array]",dW="[object Uint8Array]",DW="[object Uint8ClampedArray]",hW="[object Uint16Array]",mW="[object Uint32Array]",je={};je[oS]=je[J5]=je[uW]=je[sW]=je[G5]=je[Y5]=je[aW]=je[cW]=je[lW]=je[fW]=je[pW]=je[Q5]=je[eW]=je[sS]=je[tW]=je[rW]=je[nW]=je[iW]=je[dW]=je[DW]=je[hW]=je[mW]=!0;je[X5]=je[uS]=je[oW]=!1;function xf(e,t,r,n,o,s){var a,l=t&z5,p=t&V5,m=t&K5;if(r&&(a=o?r(e,n,o,s):r(e)),a!==void 0)return a;if(!k5(e))return e;var g=$5(e);if(g){if(a=M5(e),!l)return P5(e,a)}else{var E=R5(e),w=E==uS||E==Z5;if(L5(e))return x5(e,l);if(E==sS||E==oS||w&&!o){if(a=p||w?{}:j5(e),!l)return p?T5(e,S5(a,e)):O5(e,A5(a,e))}else{if(!je[E])return o?e:{};a=N5(e,E,l)}}s||(s=new C5);var v=s.get(e);if(v)return v;s.set(e,a),q5(e)?e.forEach(function(P){a.add(xf(P,t,r,P,e,s))}):U5(e)&&e.forEach(function(P,B){a.set(B,xf(P,t,r,B,e,s))});var x=m?p?I5:B5:p?H5:W5,O=g?void 0:x(e);return w5(O||e,function(P,B){O&&(B=P,P=e[B]),b5(a,B,xf(P,t,r,B,e,s))}),a}aS.exports=xf});var fS=M((Hse,lS)=>{d();var gW=cS(),_W=1,yW=4;function FW(e){return gW(e,_W|yW)}lS.exports=FW});d();d();async function Od(e,t,r=1){let n;try{return n=await e(),n}catch(o){if(r>0)return await t(),Od(e,t,r-1);throw o}}import{pipeline as wB}from"stream/promises";import R0 from"node:stream/promises";import*as M0 from"node:zlib";import{fileURLToPath as Rd}from"node:url";var N0="9.2.2",j0="9.1.0",$0="4",bB="123.0.0",L0="1.0.2",U0="2.0.1";function k0(e){return e==="0"||e==="1"?{functionRunner:"7.0.1",javy:"4.0.0",javyPlugin:"1"}:e==="2"?{functionRunner:N0,javy:j0,javyPlugin:$0}:null}var ys=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=I(he(Rd(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 SB(t,r)}},Bd=class{name;version;path;constructor(t){this.name=`shopify_functions_javy_v${t}`,this.version=t,this.path=I(he(Rd(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 wB(t,r)}},Id=class{name;version;path;constructor(t,r){this.name=t,this.version=r,this.path=I(he(Rd(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 R0.pipeline(t,r)}},Td;function Md(e=j0){return new ys("javy",e,"bytecodealliance/javy",Tc(e,">=7.0.0"))}function Nd(e=$0){return new Bd(e)}function tH(e=N0){return new ys("function-runner",e,"Shopify/function-runner",Tc(e,">=9.1.1"))}function Fs(){return Td||(Td=new Id("wasm-opt.cjs",bB)),Td}function q0(e){return new ys("shopify-function-trampoline",e,"Shopify/shopify-function-wasm-api",Tc(e,">=2.0.1"),`shopify_function_trampoline/v${e}`)}var Wc=new Map;async function io(e){if(await X(e.path)&&!Wc.has(e.path))return;let r=Wc.get(e.path);if(r){await r;return}let n=AB(e);Wc.set(e.path,n);try{await n}finally{Wc.delete(e.path)}}async function AB(e){let t=e.downloadUrl(process.platform,process.arch);ce(`Downloading ${e.name} ${e.version} from ${t} to ${e.path}`);let r=he(e.path);await X(r)||await Rr(r),await Od(async()=>{let n=await Ty(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 fs(async s=>{let a=I(s,"binary"),l=Sy(a);await e.processResponse(o,l),await xy(a,509),await wc(a,e.path,{overwrite:!0})})},async()=>{},2)}async function SB(e,t){let r=M0.createGunzip();await R0.pipeline(e,r,t)}d();import{build as z0}from"esbuild";var xB="2",W0={defaultScalarType:"unknown",scalars:{Date:"string",DateTime:"string",DateTimeWithoutTimezone:"string",Decimal:"string",Handle:"string",ID:"string",JSON:"unknown",TimeWithoutTimezone:"string",URL:"string",Void:"null"}},Es=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": "~${xB}.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 V0(e,t){let r=RB(e),n=r.length===0?IB:new $d(r),o=await J0(e);return t.useTasks?OB(e,t,n,o):PB(e,t,n,o)}async function PB(e,t,r,n){t.signal?.aborted||(t.stdout.write(`Building function ${e.localIdentifier}...`),t.stdout.write(`Building GraphQL types...
|
|
128
|
+
`),await vs(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 OB(e,t,r,n){await e0([{title:"Building GraphQL types",task:async()=>{await vs(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 vs(e,t){if(e.typegenCommand){let s=e.typegenCommand.split(" ");return Ed("cmd_all_timing_network_ms")(async()=>fi(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=I(e.directory,"package.json");if(!await X(r))return jd(e,t,"package.json");let n=await Bc(r);if(!n.codegen)return jd(e,t,"package.json");let o={...n.codegen,config:{...W0,...n.codegen.config??{},scalars:{...W0.scalars,...n.codegen.config?.scalars??{}}}};return fs(async s=>{let a=I(s,"codegen.json");return await mt(a,JSON.stringify(o)),jd(e,t,a)})}async function jd(e,t,r){let n=await Jy(e.directory,"graphql-code-generator","--config",r);return Ed("cmd_all_timing_network_ms")(async()=>fi(n.command,n.args,{cwd:e.directory,stderr:t.stderr,signal:t.signal}))}async function K0(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 Es("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 J0(e){let t=await ln("node_modules/@shopify/shopify_function/package.json",{type:"file",cwd:e.directory});if(!t)throw new Es("Could not find the Shopify Functions JavaScript library.");let n=JSON.parse(await $e(t)).version.split(".")[0],o=k0(n);if(o===null)throw new Es("The installed version of the Shopify Functions JavaScript library is not compatible with this version of Shopify CLI.");return o}async function TB(e,t,r=process.env){let n=await K0(e),o={...G0(e.directory,e.entrySourceFilePath,t.app.dotenv?.variables??{},r),entryPoints:[n]};return z0(o)}function G0(e,t,r,n=process.env){let o=Pc(n,(p,m)=>Nc.test(m)&&p),s={...r,...o},a=Object.keys(s||{}).reduce((p,m)=>({...p,[`process.env.${m}`]:JSON.stringify(s[m])}),{});return{outfile:I(e,"dist/function.js"),alias:{"user-function":t},define:a,logLevel:"silent",bundle:!0,legalComments:"none",target:"es2022",format:"esm"}}async function Y0(e){let t=Fs();await io(t);let r=he(Fs().path),n="node",o=[Fs().name,e,"-Oz","--enable-bulk-memory","--enable-multimemory","--enable-nontrapping-float-to-int","--strip-debug","-o",e];ce(`Wasm binary: ${Fs().name}`),ce("Optimizing this wasm binary using wasm-opt."),await fi(n,o,{cwd:r})}async function X0(e){let t,r=await BB(e);if(r.includes("shopify_function_v1")?t=L0:r.includes("shopify_function_v2")&&(t=U0),!t)return;let n=q0(t);await io(n);let o=n.path,s=["-i",e,"-o",e];ce(`Applying trampoline to the wasm binary with command: ${o} ${s.join(" ")}`),await fi(o,s)}async function BB(e){let t=new Uint8Array(eo(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 Z0(e,t,r,n=[]){let o=Md(r.javy),s=Nd(r.javyPlugin);await Promise.all([io(o),io(s)]);let a=["build","-C","dynamic","-C",`plugin=${s.path}`,...n,"-o",e.outputPath,"dist/function.js"];return fi(o.path,a,{cwd:e.directory,stdout:"inherit",stderr:"inherit",signal:t.signal})}async function _H(e){let r=e.allExtensions.filter(l=>l.features.includes("function")&&l.isJavaScript).map(l=>J0(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(io(Md(l)))}),s.forEach(l=>{a.push(io(Nd(l)))}),await Promise.all(a)}var IB={async bundle(e,t){return TB(e,t)},async compile(e,t,r){return Z0(e,t,r)}},H0="shopify-function",$d=class{exports;constructor(t){this.exports=t}async bundle(t,r,n=process.env){await K0(t);let o=this.entrypointContents;ce("Generating dist/function.js using generated module:"),ce(o);let s={...G0(t.directory,t.entrySourceFilePath,r.app.dotenv?.variables??{},n),stdin:{contents:o,loader:"ts",resolveDir:t.directory}};return z0(s)}async compile(t,r,n){let o=this.wit;return ce("Generating world to use with Javy:"),ce(o),fs(async s=>{let a=I(s,"javy-world.wit");return await mt(a,o),Z0(t,r,n,["-C",`wit=${a}`,"-C",`wit-world=${H0}`])})}get wit(){let t=this.exports.map(r=>`export %${yd(r)}: func();`);return`package function:impl;
|
|
132
|
+
|
|
133
|
+
world ${H0} {
|
|
134
|
+
${t.join(`
|
|
135
|
+
`)}
|
|
136
|
+
}`}get entrypointContents(){let t=`
|
|
137
|
+
import __runFunction from "@shopify/shopify_function/run"`,r=this.exports.map(n=>{let o=_d(n),s=_d(`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 RB(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 '${yd(p)}'.`)}),new Error(s.join(`
|
|
150
|
+
`))}return n.map(s=>s.export)}d();function Q0(e,t){return async r=>{let n=await e.appsForOrg(t,r);return{apps:n.apps,hasMorePages:n.hasMorePages}}}d();d();import{deflate as MB}from"node:zlib";import{promisify as NB}from"node:util";var jB=NB(MB);async function $B(e){let t=await $e(e),r=Buffer.byteLength(t),o=(await jB(Buffer.from(t))).byteLength;return{path:e,rawBytes:r,compressedBytes:o}}function eF(e){return e>=1024*1024?`${(e/(1024*1024)).toFixed(2)} MB`:`${(e/1024).toFixed(1)} KB`}async function tF(e){try{let{rawBytes:t,compressedBytes:r}=await $B(e);return` (${eF(t)} original, ~${eF(r)} compressed)`}catch(t){return ce(`Failed to get bundle size for ${e}: ${t}`),""}}d();d();import{createInterface as LB}from"readline";var UB=[".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 Cs(e){let r=I(e.directory,".shopifyignore"),n=UB.map(o=>I("*",o));if(Ut(r)){let o=await kB(r);n.push(...o)}return Ve("*/*",{absolute:!0,cwd:e.directory,ignore:n})}function kB(e){return new Promise((t,r)=>{let n=[],o=LB({input:Ay(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 iI,formatMessagesSync as DF}from"esbuild";var hF=ai(dF(),1);async function Ld(e,t=process.env){let r=sI(e,t),n=await iI(r),o=await n.rebuild();uI(o,e),await oI(o,e.outputPath),await n.dispose()}async function oI(e,t){if(!e?.metafile)return;let{dir:r,name:n}=py(t),o=I(r,`${n}.metafile.json`);try{await mt(o,JSON.stringify(e.metafile))}catch(s){Rn(`Failed to write metafile to ${o}: ${s}`)}}function uI(e,t){let r=e?.warnings??[],n=e?.errors??[];r.length>0&&DF(r,{kind:"warning"}).forEach(s=>{t.stdout.write(s)}),n.length>0&&DF(n,{kind:"error"}).forEach(s=>{t.stderr.write(s)})}function sI(e,t=process.env){let r=Pc(t,(a,l)=>Nc.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:aI(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[bd.disableMinificationOnDev];s.minify=!cs(a),s.logLevel="silent"}return s}function aI(e,t=process.env){let r=[hF.default.default()],n=cs(t[bd.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(cI(o)))}return r}function cI(e){return{name:"shopify:deduplicate-react",setup({onResolve:t}){t({filter:/^react$/},r=>({path:e}))}}}d();var Kc="# api_version: ";function ez(e,t){return`${Kc}${t}
|
|
151
|
+
|
|
152
|
+
${e}`}async function lI(e){if(!await X(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(Kc))return r.slice(Kc.length).trim();ce(`Could not determine api_version from ${e}: missing '${Kc}' marker on the first line.`)}async function mF({directory:e,localIdentifier:t,apiVersion:r}){let n=I(e,"schema.graphql"),o=await lI(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 IF=ai(BF(),1);async function RF(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=I(e.directory,n,e.outputRelativePath),{main:s,assets:a}=e.getBundleExtensionStdinContent(),l=performance.now();if(!t.skipBuild)try{await Ld({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 Ld({minify:!0,outputPath:I(he(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 E=g.message??"Unknown error occurred",w=new k(`Failed to bundle extension ${e.localIdentifier}. Please check the extension source code for errors.`,E);throw w.errors=g.errors,w}await e.buildValidation({outputPath:o});let p=Math.round(performance.now()-l),m=await tF(o);return t.stdout.write(`${e.localIdentifier} successfully built in ${p}ms${m}`),o}async function MF(e,t){let r=I(e.directory,".build-lock"),n;try{n=await IF.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=I(e.directory,a),await mF({directory:e.directory,localIdentifier:e.localIdentifier,apiVersion:o.api_version}),!t.skipBuild){e.isJavaScript?await TI(e,t):await BI(e,t);let p=e.configuration.build?.wasm_opt;Ut(e.outputPath)&&p&&await Y0(e.outputPath),Ut(e.outputPath)&&await X0(e.outputPath)}let l=I(e.directory,e.outputRelativePath);Ut(e.outputPath)&&s!==e.outputPath&&s!==l&&he(s)!==he(e.outputPath)&&await OI(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 OI(e,t){ce(`Converting WASM from ${e} to base64 in ${t}`);let r=await $e(e,{encoding:"base64"});await vc(t),await mt(t,r)}async function TI(e,t){return e.buildCommand?(e.typegenCommand&&await vs(e,t),NF(e.buildCommand,e,t)):V0(e,t)}async function BI(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 In;return e.typegenCommand&&await vs(e,t),NF(e.buildCommand,e,t)}async function NF(e,t,r){let n=e.split(" ");r.stdout.write(`Building function ${t.localIdentifier}...`),await fi(n[0],n.slice(1),{stdout:r.stdout,stderr:r.stderr,cwd:t.directory,signal:r.signal})}d();var jF="shopify.app*.toml",II=/^shopify\.app(\.[-\w]+)?\.toml$/,RI="*.extension.toml",MI="shopify.web.toml",$F="extensions/*",LF="**/node_modules/**",NI=".env*",As=class e{static async load(t){let r=await jI(t),n=[],o=await $I(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 B=P.content.extension_directories;if(Array.isArray(B))for(let U of B)s.add(U);else s.add($F)}let a=await LI(r,[...s],n),l=new Set;for(let P of o){let B=P.content.web_directories;if(Array.isArray(B))for(let U of B)l.add(U)}let p=await UI(r,l.size>0?[...l]:void 0,n),m=I(r,"package.json"),g=await X(m),E=g?await Oc(r):"unknown",w=g?await Gy(m):{},v=g?await Yy(r):!1,x=await kI(r),O=await qI(r);return new e({directory:r,packageManager:E,nodeDependencies:w,usesWorkspaces:v,appConfigFiles:o,extensionConfigFiles:a,webConfigFiles:p,dotenvFiles:x,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=>Re(r.path)===t)}appConfigByClientId(t){return this.appConfigFiles.find(r=>r.content.client_id===t)}get defaultAppConfig(){return this.appConfigByName(jr.app)}};async function jI(e){let t=await ln(async r=>{if((await Ve(I(r,jF))).length>0)return r},{cwd:e,type:"directory"});if(!t)throw new k(`Could not find a Shopify app configuration file. Looked in ${e} and parent directories.`);return t}async function $I(e,t){let r=I(e,jF),o=(await Ve(r)).filter(s=>II.test(Re(s)));return Vd(o,t)}async function LI(e,t,r){let o=(t.length>0?t:[$F]).map(a=>I(e,a,RI));o.push(`!${I(e,LF)}`);let s=await Ve(o);return Vd(s,r)}async function UI(e,t,r){let o=(t??["**"]).map(a=>I(e,a,MI));o.push(`!${I(e,LF)}`);let s=await Ve(o);return Vd(s,r)}async function Vd(e,t){let r=[];return await Promise.all(e.map(async n=>{try{r.push(await Ct.read(n))}catch(o){let s=o instanceof gs?o:new gs(n,`Failed to read ${n}`),a=new Ct(n,{});a.errors.push(s),r.push(a),t.push(s)}})),r}async function kI(e){let t=I(e,NI),n=(await Ve(t,{dot:!0})).filter(a=>{let l=Re(a);return l===".env"||/^\.env\.[\w-]+$/.test(l)}),o=await Promise.all(n.map(async a=>{try{let l=await D0(a);return[Re(a),l]}catch{return}})),s=new Map;for(let a of o)a&&s.set(a[0],a[1]);return s}async function qI(e){let t=I(e,jr.hiddenFolder,jr.hiddenConfig);try{if(await X(t)){let r=await $e(t);return JSON.parse(r)}}catch{}return{}}d();d();d();d();function WI(e,t){return t}async function Xc(e,t,r){let n={};try{let a=await $e(e);n=JSON.parse(a)}catch{}let o={[t]:r},s=fn(n,o,WI);await mt(e,JSON.stringify(s,null,2))}var HI=F.array(F.string()).optional().transform(zI).transform(VI);function zI(e){return e?.map(t=>t.replace(/[\/\\]+$/,""))}function VI(e){return e?.map(t=>t.replace(/([^\*])\*$/,"$1**"))}var Qc=F.object({client_id:F.string(),build:F.object({automatically_update_urls_on_dev:F.boolean().optional(),dev_store_url:F.string().optional(),include_config_on_deploy:F.boolean().optional()}).optional(),extension_directories:HI,web_directories:F.array(F.string()).optional()}).passthrough();function WF(e,t=!0){let r=e.reduce((n,o)=>o.contributeToAppConfigurationSchema(n),Qc);return t?r.passthrough():e.length>0?r.strict():r}function Kd(e){return e.access_scopes?.scopes??""}function el(e){let t=Kd(e);return t.length?t.split(",").map(r=>r.trim()):[]}function KI(e){return I(e,jr.hiddenFolder,jr.hiddenConfig)}var ft;(function(e){e.Frontend="frontend",e.Backend="backend",e.Background="background"})(ft||(ft={}));var UF=F.preprocess(Ad,F.string()),kF=F.object({auth_callback_path:F.union([UF,UF.array()]).optional(),webhooks_path:F.preprocess(Ad,F.string()).optional(),port:F.number().max(65536).min(0).optional(),commands:F.object({build:F.string().optional(),predev:F.string().optional(),dev:F.string()}),name:F.string().optional(),hmr_server:F.object({http_paths:F.string().array()}).optional()}),qF=F.enum([ft.Frontend,ft.Backend,ft.Background]).default(ft.Frontend),HF=F.union([kF.extend({roles:F.array(qF)}),kF.extend({type:qF})]),Zc=class{name;idEnvironmentVariableName="SHOPIFY_API_KEY";directory;configPath;configuration;webs;dotenv;errors;specifications;configSchema;remoteFlags;realExtensions;devApplicationURLs;_hiddenConfig;constructor({name:t,directory:r,configPath:n,configuration:o,webs:s,modules:a,dotenv:l,errors:p,specifications:m,configSchema:g,remoteFlags:E,hiddenConfig:w,devApplicationURLs:v}){this.name=t,this.directory=r,this.configPath=n,this.configuration=o,this.webs=s,this.dotenv=l,this.realExtensions=a,this.errors=p??new xs,this.specifications=m,this.configSchema=g??Qc,this.remoteFlags=E??[],this._hiddenConfig=w,v&&this.setDevApplicationURLs(v)}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:Qi(r)}}get hiddenConfig(){return this._hiddenConfig}getLogsDir(){return I(this.directory,".shopify","logs")}async updateHiddenConfig(t){if(!this.configuration.client_id)return;this._hiddenConfig=fn(this.hiddenConfig,t);let r=KI(this.directory);await Xc(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=JI(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=GI(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=>dn(n,ft.Frontend)),r=this.webs.find(n=>dn(n,ft.Backend));return!!(t??r)}get appIsEmbedded(){return this.configuration.embedded}creationDefaultOptions(){return{isLaunchable:this.appIsLaunchable(),scopesArray:el(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&&wy(n);return}let s=o?eo(n).toString():"",a=[`import '@shopify/ui-extensions';
|
|
164
|
+
`,...Array.from(r)].join(`
|
|
165
|
+
`);s!==a&&Cy(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 JI(e,t){let r=[];return e.forEach(n=>{let o=n.configuration.ui.handle,s=zF(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 GI(e,t){let r=[],n=["ui_extension"];return e.forEach(o=>{o.configuration.inCollection.forEach(s=>{let a=zF(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 zF(e,t){return e.find(r=>r.handle===t)}async function Zz(e){let t=e.dependency;if(t)return Ss(t,e.directory)}async function Ss(e,t){let r=e.replace("-react","").split("/"),n=I("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 ps(o);let s=await Bc(o);return s.version?{name:e,version:s.version}:"not_found"}d();function YI(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 VF(e){let t=[];for(let r of e)if(r.code==="invalid_union"&&r.unionErrors){let n=YI(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();var KF=/^shopify\.app(\.[-\w]+)?\.toml$/;function yr(e){return e?tl(e)?e:`shopify.app.${Lt(e)}.toml`:jr.app}function Ps(e){return Re(e).match(KF)?.[1]?.slice(1)}function tl(e){return!!KF.test(e)}d();d();d();d();d();d();d();async function Jo(e,t,r){let[n,o]=await Promise.all([ps(e),ps(t)]),s=Oe(o,n);if(s.split(/[/\\]/,1)[0]===".."||fy(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 GF(e){let{key:t,baseDir:r,outputDir:n,context:o,appDirectory:s,destination:a,usedBasenames:l=new Set,preserveFilePaths:p=!1}=e,{stdout:m}=o.options,g=rl(o.extension.configuration,t),E;typeof g=="string"?E=[g]:Array.isArray(g)?E=g.filter(P=>typeof P=="string"):E=[];for(let P of E)if(P.trim()==="")throw new k(`'${t}' can't be empty.`);if(E.length===0)return ce(`No value for configKey '${t}', skipping
|
|
172
|
+
`,m),{filesCopied:0,pathMap:new Map};let w=a?I(n,a):n,v=Bt(E),x=new Map,O=0;for(let P of v){let B=I(r,P);if(!await X(B))throw new Error(Se`Couldn't find ${Ae.path(B)}\n Please check the path '${P}' in your configuration`.value);await Jo(B,s,P);let q=await ci(B),G=w;if(q){let Q=await Ve(["**/*"],{cwd:B,absolute:!1}),fe=Q.map(ye=>Oe(n,I(G,ye)));if(p)for(let ye of Q)JF(Re(ye),P,l);await Ac(B,G),m.write(`Included '${P}'
|
|
173
|
+
`);for(let ye of Q)l.add(Re(ye));x.set(P,fe),O+=Q.length}else{await Rr(G);let Q=Re(B),fe;p?(JF(Q,P,l),fe=Q):fe=XI(Q,l),l.add(fe);let ye=Oe(n,I(G,fe)),We=I(G,fe);await Ir(B,We),m.write(`Included '${P}'
|
|
174
|
+
`),x.set(P,ye),O+=1}}return{filesCopied:O,pathMap:x}}function JF(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 XI(e,t){if(!t.has(e))return e;let r=yc(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 Jd(e){return e.split(".").map(t=>{let r=t.endsWith("[]");return{name:r?t.slice(0,-2):t,flatten:r}})}function rl(e,t){let r=e;for(let{name:n,flatten:o}of Jd(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 Xd(e){return yc(e)?he(e):e}async function YF(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 E=e6(g.key),w=rl(o.configuration,g.key);w!=null&&(p[E]=nl(w,r))}let m=new Map;for(let g of a){let E=`${g.anchor}||${g.groupBy}`,w=m.get(E);w?w.push(g):m.set(E,[g])}for(let g of m.values()){let{anchor:E,groupBy:w}=g[0],v=rl(o.configuration,E);if(Array.isArray(v))for(let x of v){if(x===null||typeof x!="object"||Array.isArray(x))continue;let O=x,P=O[w];if(typeof P!="string")continue;let B=g.map(G=>{let Q=ZI(G.key,E),fe=Gd(O,Q);return nl(fe,r)});B.some(Yd)&&s.stdout.write(`Warning: manifest entry '${P}' contains unresolved paths \u2014 source files may be missing
|
|
175
|
+
`);let q=p[P]??{};p[P]=QI([q,...B])}}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 Zd(t,p)}async function Zd(e,t){let r=Xd(e.extension.outputPath),n=I(r,"manifest.json");await X(r)||await Rr(r);let o={};if(await X(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 ZI(e,t){if(t===e)return"";let r=`${t}.`;return e.startsWith(r)?e.slice(r.length):e}function Gd(e,t){if(t==="")return e;let r=Jd(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?Gd(p,s):p);return{[n.name]:l}}return s&&a!==null&&a!==void 0&&typeof a=="object"&&!Array.isArray(a)?{[n.name]:Gd(a,s)}:{[n.name]:a}}function QI(e){return Object.assign({},...e)}function nl(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=>nl(r,t));if(e!==null&&typeof e=="object"){let r={};for(let[n,o]of Object.entries(e))r[n]=nl(o,t);return r}return e}function e6(e){let t=e.split(".").at(-1)??e;return t.endsWith("[]")?t.slice(0,-2):t}function Yd(e){return typeof e=="string"?e.startsWith("./")||e.startsWith("../"):Array.isArray(e)?e.some(Yd):e!==null&&typeof e=="object"?Object.values(e).some(Yd):!1}d();async function XF(e,t){let{sourceDir:r,outputDir:n,patterns:o,ignore:s,appDirectory:a,sourceDirConfigValue:l}=e;if(!await X(r))return{filesCopied:0,outputPaths:[]};await Jo(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 m=p,g=await Promise.all(m.map(async v=>{let x=Oe(r,v),O=I(n,x);return Oe(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(he(O)),await Ir(v,O),{count:1,path:x})})),E=g.reduce((v,x)=>v+x.count,0),w=g.flatMap(v=>v.path===null?[]:[v.path]);return t.stdout.write(`Included ${E} file(s)
|
|
180
|
+
`),{filesCopied:E,outputPaths:w}}d();async function ZF(e,t){let{source:r,destination:n,baseDir:o,outputDir:s,appDirectory:a}=e,l=I(o,r);if(!await X(l))throw new Error(`Source does not exist: ${l}`);await Jo(l,a,r);let p=await ci(l),m,g;if(n===void 0?(m=I(s,Re(l)),g=`Included ${r}
|
|
181
|
+
`):(m=I(s,n),g=`Included ${r}
|
|
182
|
+
`),p){let E=await Ve(["**/*"],{cwd:l,absolute:!1});await Ac(l,m),t.stdout.write(g);let w=Oe(s,m),v=w?E.map(x=>I(w,x)):E;return{filesCopied:E.length,outputPaths:v}}return await Rr(he(m)),await Ir(l,m),t.stdout.write(g),{filesCopied:1,outputPaths:[Oe(s,m)]}}var t6=F.object({type:F.literal("pattern"),baseDir:F.string().optional(),include:F.array(F.string()).default(["**/*"]),ignore:F.array(F.string()).optional(),destination:F.string().optional()}),r6=F.object({type:F.literal("static"),source:F.string(),destination:F.string().optional()}),n6=F.object({type:F.literal("configKey"),key:F.string(),destination:F.string().optional(),anchor:F.string().optional(),groupBy:F.string().optional(),preserveFilePaths:F.boolean().default(!1)}),i6=F.discriminatedUnion("type",[t6,r6,n6]),o6=F.object({inclusions:F.array(i6),generatesAssetsManifest:F.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:F.ZodIssueCode.custom,message:"`anchor` and `groupBy` must both be set or both be omitted",path:["inclusions",r]})}});async function QF(e,t){let r=o6.parse(e.config),{extension:n,options:o}=t,s=Xd(n.outputPath),a=o.app.directory,l=new Map,p=new Set,m=0;for(let v of r.inclusions){if(v.type!=="configKey")continue;let x=U=>o.stdout.write(U),O=v.destination?md(v.destination,x):void 0,P=O===""?void 0:O,B=await GF({key:v.key,baseDir:n.directory,outputDir:s,context:t,appDirectory:a,destination:P,usedBasenames:p,preserveFilePaths:v.preserveFilePaths});B.pathMap.forEach((U,q)=>l.set(q,U)),m+=B.filesCopied}let g=await Promise.all(r.inclusions.filter(v=>v.type!=="configKey").map(async v=>{let x=B=>o.stdout.write(B),O=v.destination?md(v.destination,x):void 0,P=O===""?void 0:O;if(v.type==="pattern"){let B=v.baseDir?I(n.directory,v.baseDir):n.directory,U=P?I(s,P):s,q=await XF({sourceDir:B,outputDir:U,patterns:v.include,ignore:v.ignore??[],appDirectory:a,sourceDirConfigValue:v.baseDir??"."},o),G=P?q.outputPaths.map(Q=>I(P,Q)):q.outputPaths;return{filesCopied:q.filesCopied,outputPaths:G}}if(v.type==="static")return ZF({source:v.source,destination:P,baseDir:n.directory,outputDir:s,appDirectory:a},o)})),E=r.generatesAssetsManifest?g.flatMap(v=>v?.outputPaths??[]):[],w=[m,...g.map(v=>v?.filesCopied??0)];if(r.generatesAssetsManifest){let v=r.inclusions.filter(x=>x.type==="configKey");await YF(v,t,l,E)}return{filesCopied:w.reduce((v,x)=>v+(x??0),0)}}d();d();var Go=ai(EB(),1);function u6(e){return new Map(e.map(t=>[t.uri,t.source]))}function s6(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,m=s?a.trim():a;return`${p} ${m}`}).join(`
|
|
184
|
+
`)}function a6(e){switch(e){case Go.Severity.ERROR:return{error:`
|
|
185
|
+
[error]:`};case Go.Severity.WARNING:return{warn:`
|
|
186
|
+
[warning]:`};case Go.Severity.INFO:return{info:`
|
|
187
|
+
[info]:`}}}function c6(e,t){return e.map((n,o)=>{let{message:s,uri:a,start:l,end:p,check:m,severity:g}=n,E=t.get(a),w=E===void 0?[]:[`
|
|
188
|
+
|
|
189
|
+
${s6(E,l.line,p.line)}`],v=o===e.length-1?"":`
|
|
190
|
+
|
|
191
|
+
`;return[a6(g),{bold:m},{subdued:`
|
|
192
|
+
${s}`},...w,v]}).flat()}async function eE(e){let r=await X(I(e,".theme-check.yml"))?void 0:"theme-check:theme-app-extension",{offenses:n,theme:o}=await(0,Go.themeCheckRun)(e,r),s=c6(n,u6(o));return a0(s)}async function tE(e,t){let{extension:r,options:n}=t;n.stdout.write("Running theme check on your Theme app extension...");let o=await eE(r.directory);o&&n.stdout.write(o)}d();async function rE(e,t){let{extension:r,options:n}=t;n.stdout.write(`Bundling theme extension ${r.localIdentifier}...`);let o=await Cs(r);return await Promise.all(o.map(async s=>{let a=Oe(r.directory,s),l=I(r.outputPath,a);s!==l&&await Ir(s,l)})),{filesCopied:o.length}}d();async function nE(e,t){let r=t.extension.configuration;t.options.buildDirectory=e.config?.bundleFolder??void 0;let n=await RF(t.extension,t.options),o=he(n),s=e.config?.bundleFolder?I(he(t.extension.outputPath),e.config.bundleFolder):he(t.extension.outputPath);if(ot(o)===ot(s)||(await Ir(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=l6(a,e.config?.bundleFolder);Object.keys(l).length>0&&await Zd(t,l)}function l6(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?I(t,l.filepath):l.filepath);Object.keys(s).length>0&&(r[n]=s)}return r}d();async function iE(e,t){return MF(t.extension,t.options)}d();async function oE(e,t){let{extension:r}=t;if(await X(r.outputPath)&&await ci(r.outputPath))throw new Error(`outputPath '${r.outputPath}' is a directory \u2014 expected a file path for the tax stub`);await vc(r.outputPath),await mt(r.outputPath,"(()=>{})();")}async function uE(e,t){switch(e.type){case"include_assets":return QF(e,t);case"build_theme":return tE(e,t);case"bundle_theme":return rE(e,t);case"bundle_ui":return nE(e,t);case"build_function":return iE(e,t);case"create_tax_stub":return oE(e,t);default:throw new Error(`Unknown build step type: ${e.type}`)}}async function sE(e,t){let r=Date.now();try{let n=await uE(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 f6,readSync as p6,closeSync as d6}from"fs";var aE=128*1024,il=new Map,ol=new Map,ul=new Map;function uo(e){let t=ol.get(e);if(t!==void 0)return t;let r=Ut(e);return ol.set(e,r),r}function Os(e){let t=ul.get(e);if(t!==void 0)return t;let r=by(e);return ul.set(e,r),r}function D6(e){let t=f6(e,"r");try{let r=Buffer.alloc(aE),n=p6(t,r,0,aE,0);return r.subarray(0,n).toString()}finally{d6(t)}}function cE(){il.clear(),ol.clear(),ul.clear()}function h6(e){let t=il.get(e);if(t)return t;let r=D6(e),n=e.substring(e.lastIndexOf(".")),o;switch(n){case".js":case".mjs":case".cjs":case".ts":case".tsx":case".jsx":o=fE(r,e);break;case".rs":o=m6(r,e);break;default:o=[]}return il.set(e,o),o}function Qd(e,t=new Set){if(t.has(e))return[];t.add(e);let r=h6(e),n=[e,...r];for(let o of r)try{if(uo(o)&&!Os(o)){let s=Qd(o,t);n.push(...s)}}catch(s){if(s instanceof Error&&s.message.includes("ENOENT"))continue;throw s}return Bt(n)}function lE(){return{directImports:il.size,fileExists:ol.size,isDir:ul.size}}function eD(e,t){return fE(e,t)}function fE(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=g6(a,t);l&&r.push(l)}}}return Bt(r)}function m6(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=_6(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=I(he(t),a);uo(l)&&r.push(l)}}return Bt(r)}function g6(e,t){let r=uo(t)&&Os(t)?t:he(t),n=I(r,e);if(uo(n)&&Os(n)){let s=[I(n,"index.js"),I(n,"index.ts"),I(n,"index.tsx"),I(n,"index.jsx")];for(let a of s)if(uo(a)&&!Os(a))return a;return null}let o=[n,`${n}.js`,`${n}.ts`,`${n}.tsx`,`${n}.jsx`];for(let s of o)if(uo(s)&&!Os(s))return s;return null}function _6(e,t){let r=he(t),n=[I(r,`${e}.rs`),I(r,e,"mod.rs")];for(let o of n)if(uo(o))return o;return null}var y6=["**/node_modules/**","**/.git/**","**/*.test.*","**/dist/**","**/*.swp","**/generated/**","**/.gitignore"],sl=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 Re(this.outputRelativePath)}get outputRelativePath(){return this.specification.getOutputRelativePath?.(this)??""}constructor(t){this.configuration=t.configuration,this.configurationPath=t.configurationPath,this.entrySourceFilePath=t.entryPath??"",this.directory=t.directory,this.specification=t.specification,this.handle=this.buildHandle(),this.localIdentifier=this.handle,this.idEnvironmentVariableName=`SHOPIFY_${Ec(this.localIdentifier)}_ID`,this.outputPath=I(this.directory,this.outputRelativePath),this.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=I(this.directory,Oe(t,n));await wc(n,o,{overwrite:!0}),ce(`Source map for ${this.localIdentifier} created: ${o}`)}async publishURL(t){let r=await Iy(),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=eD(t,this.directory),o=r?.flatMap(s=>eD(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 X(I(this.directory,"locales"))&&t.push(I(this.directory,"locales","**.json")),t.push(I(this.directory,"**.toml")),t}}get inputQueryPath(){return I(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 sE(s,n);n.stepResults.set(s.id,a)}}async buildForBundle(t,r){this.outputPath=this.getOutputPathForDirectory(r),await this.build(t);let n=I(r,this.getOutputFolderId());await this.keepBuiltSourcemapsLocally(n)}getOutputPathForDirectory(t){return I(t,this.getOutputFolderId(),this.outputRelativePath)}get singleTarget(){let t=vt(this.configuration,"targeting")??[];if(t.length===1)return t[0]?.target}get contextValue(){let t=this.singleTarget??"";return this.isFlow&&(t=this.configuration.handle??""),t}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(){if(this.specification.getDevSessionUpdateMessages)return this.specification.getDevSessionUpdateMessages(this.configuration)}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??y6}}watchedFiles(){let t=[],{paths:r,ignore:n}=this.watchPatterns(),o=r.flatMap(s=>Py(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=>Zi(s)))}async rescanImports(){let t=this.cachedImportPaths;return this.cachedImportPaths=void 0,cE(),this.scanImports(),t!==this.cachedImportPaths}scanImports(){if(this.cachedImportPaths!==void 0)return this.cachedImportPaths;if(cs(process.env.SHOPIFY_CLI_DISABLE_IMPORT_SCANNING))return this.cachedImportPaths=[],this.cachedImportPaths;try{let t=performance.now(),r=this.devSessionDefaultWatchPaths(),n=r.flatMap(l=>Qd(l).map(p=>Zi(ot(p))));this.cachedImportPaths=Bt(n)??[];let o=Math.round(performance.now()-t),s=lE(),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??Lt(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,$c)}else return xc(JSON.stringify(this.configuration))}}buildUIDFromStrategy(){switch(this.specification.uidStrategy){case"single":return this.specification.identifier;case"uuid":return this.configuration.uid??xc(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,m0)}else return xc(JSON.stringify(this.configuration))}}};d();async function pE(e,t=""){let r=F6(t),n=await ms(r);for(;await X(I(e,al(n)))&&await Mr({message:`Configuration file ${al(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 ms(r);return al(n)}function al(e,t=!1){let r=Lt(e);return r===""?"shopify.app.toml":`shopify.app.${t?Xy.cyan(r):r}.toml`}async function tD(e){return Ve(I(e,"shopify.app*.toml"))}async function dE(e){let t=(await tD(e)).map(n=>Re(n));if(t.length===0)return to("Could not find any shopify.app.toml file in the directory.");if(t.length===1)return Bn(t[0]);let r=await Qy({message:"Configuration file",choices:t.map(n=>({label:n,value:n}))});return Bn(r)}function F6(e){return{message:"Configuration file name:",initialAnswer:e,validate:E6,preview:t=>`${al(t,!0)} will be generated in your root directory`}}function E6(e){if(Lt(e).length>238)return"The file name is too long."}d();d();d();import{readdirSync as v6}from"fs";async function cl(e){if(!e||!await ci(e))return{};let t={},r=v6(e);return await Promise.all(r.map(async n=>{if(tl(n)){let o=I(e,n),a=(await Ct.read(o)).content;a.client_id&&(t[a.client_id]=n)}})),t}async function DE(e,t,r,n){let o=await cl(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 vd({message:"Which existing app is this for?",choices:a.map(s),hasMorePages:r,search:async p=>{let m=await e(p);return a=m.apps,{data:a.map(s),meta:{hasNextPage:m.hasMorePages}}}});return a.find(p=>p.apiKey===l)}async function dJ({stores:e,hasMorePages:t=!1,onSearchForStoresByName:r,showDomainOnPrompt:n=!0}){if(e.length===0)return;if(e.length===1)return u0(`Using your default dev store, ${e[0].shopName}, to preview your project.`),e[0];let o=p=>{let m=p.shopName;return n&&p.shopDomain&&(m=`${p.shopName} (${p.shopDomain})`),{label:m,value:p.shopId}},s=e,a={};r&&(a.search=async p=>{let m=await r(p);return s=m.stores,{data:s.map(o),meta:{hasNextPage:m.hasMorePages}}});let l=await vd({message:"Which store would you like to use to view your project?",choices:s.map(o),hasMorePages:t,...a});return s.find(p=>p.shopId===l)}async function hE(e){return ms({message:"App name",defaultValue:e,validate:t=>{if(t.length===0)return"App name can't be empty";if(t.length>Sd)return`Enter a shorter name (${Sd} character max.)`;if(t.includes("shopify"))return`Name can't contain "shopify." Enter another name.`}})}async function DJ(e){return Mr({message:"Finished creating a dev store?",confirmationMessage:`Yes, ${e.businessName} has a new dev store`,cancellationMessage:"No, cancel dev"})}async function mE(){return Mr({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 gE(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 Mr({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 hJ(){return Mr({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 _E;function rD(){return _E??=new My({projectName:"shopify-cli-app"}),_E}function ll(e,t=rD()){let r=Zi(e);return ce(Se`Reading cached app information for directory ${Ae.path(r)}...`),t.get(r)}function Yo(e,t=rD()){e.directory=Zi(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 yE(e,t=rD()){let r=Zi(e),n=t.get(r);n&&t.set(r,{...n,configFile:void 0})}async function BJ(e){if(e.noTunnelUseLocalhost)return{frontendUrl:"https://localhost",frontendPort:e.port,usingLocalhost:!0};let t=4040,r="",n=e.noTunnelUseLocalhost;if(wd())return r=`https://${wd()}-${t}.${i0()}`,{frontendUrl:r,frontendPort:t,usingLocalhost:n};if(Cd()){let o=Cd()?.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 C6(e.tunnelClient)),{frontendUrl:r,frontendPort:t,usingLocalhost:n}}async function C6(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 FE(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:w6(hi(r.url,e),e),proxySubPath:r.subpath,proxySubPathPrefix:r.prefix}}:{};return{applicationUrl:e,redirectUrlWhitelist:n,...o}}function w6(e,t){let r=new URL(e),n=new URL(t);return r.host=n.host,r.toString().replace(/\/$/,"")}async function IJ(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 RJ(e){if(e.localApp&&e.localApp.configuration.client_id!==e.apiKey||(e.newApp??!Rc()))return!0;let t=e.cachedUpdateURLs===!0;if(e.cachedUpdateURLs===void 0)if(t=await gE(e.currentURLs.applicationUrl,e.newURLs),e.localApp){let r=e.localApp.configuration;r.build={...r.build,automatically_update_urls_on_dev:t},await(await Ct.read(e.localApp.configPath)).patch({build:{automatically_update_urls_on_dev:t}})}else Yo({directory:e.appDirectory,updateURLs:t});return t}async function MJ(e,t,r){let n=await By(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 Nr(`Multiple tunnel plugins for ${r} found`);let s=o[0];if(!s)throw new Nr(`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 nD({directory:e,configName:t,warningContent:r,shouldRenderSuccess:n=!0,reset:o=!1}){if(o){yE(e);let l=await Oc(e);hs({headline:"Cleared current configuration.",body:["In order to set a new current configuration, please run",{command:Mc(l,"shopify app config use CONFIG_NAME")},{char:"."}]});return}r&&Ic(r);let s=(await b6(e,t)).valueOrAbort(),{activeConfig:a}=await $r(e,s);return iD(a.file.content,{configFileName:s,directory:e}),n&&hs({headline:`Using configuration file ${s}`}),s}function iD(e,t){let{configFileName:r,directory:n}=t;if(e.client_id)Yo({directory:n,configFile:r});else throw new k(`Configuration file ${r} needs a client_id.`)}async function b6(e,t){if(t){let r=yr(t);return await X(I(e,r))?Bn(r):to(`Could not find configuration file ${r}`)}return dE(e)}async function vE(e,t,r){let n=t,o=r?.clientId?e.appConfigByClientId(r.clientId):void 0,s=ll(e.directory)?.configFile,a=s?I(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 nD({directory:e.directory,warningContent:w,shouldRenderSuccess:!1})}if(!n&&o)return EE(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),m;t?m="flag":p?m="cached":m="default";let g=yr(p),E=e.appConfigByName(g);if(!E)throw new k(Se`Couldn't find ${g} in ${Ae.path(e.directory)}.`);return EE(e,E,m)}async function EE(e,t,r){let n=typeof t.content.client_id=="string"?t.content.client_id:void 0,o=!!n&&n!=="",s=fl(e,t.path),a=await pl(e,n);return{file:t,source:r,isLinked:o,dotenv:s,hiddenConfig:a}}d();async function CE(e,t){await Ny("warn-on-multiple-versions",{days:1},async()=>{if(!t["@shopify/cli"]||Oy())return;let r=Ky(),n=r?hd:await Vy();if(!n)return;let o=r?await zy(e):hd;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"}};ro(a)})}d();import{existsSync as A6,readFileSync as S6}from"fs";var x6=[{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 AE(e){let t={},r=x6.find(n=>(!n.detectors.some||n.detectors.some.reduce((o,s)=>wE(s,bE(e,s.path,t)),!1))&&(!n.detectors.every||n.detectors.every.reduce((o,s)=>o?wE(s,bE(e,s.path,t)):!1,!0)));return r?r.name:"unknown"}function wE(e,t={}){return t[e.path]?!e.matchContent||new RegExp(e.matchContent).test(t[e.path]):!1}function bE(e,t,r={}){if(r[t])return r;let n=I(e,t);if(!A6(n))return r;let o=S6(n,{encoding:"utf8"});return r[t]=o,r}var PE=ai(vB(),1);function P6(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 Ts(e){let t=P6(e),r=t?`${e.message}. ${t}`:e.message;return e.path?.length?`[${e.path.join(".")}]: ${r}`:r}async function sD(e,t,r){let n=r;if(!n)try{n=(await Ct.read(t)).content}catch(o){if(o instanceof gs)return{errors:[{file:t,message:o.message}]};throw o}return OE(e,t,n)}function OE(e,t,r){let n=e.safeParse(r);return n.success?{data:n.data}:{errors:VF(n.error.issues).map(o=>({file:t,message:o.message,path:o.path,code:o.code}))}}function SE(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 xs=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 HG(e){if(!((await tD(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 zG(e,t){let{project:r,activeConfig:n}=await $r(e),o=n.file.content,s=uD(r,n.file),a=await Promise.all(s.map(E=>TE(E.path,E.content))),l=a.flatMap(E=>E.errors??[]);if(l.length>0)throw new k(l.map(Ts).join(`
|
|
196
|
+
`));let m=a.filter(E=>"web"in E).map(E=>E.web).some(E=>dn(E,ft.Frontend)||dn(E,ft.Backend)),g=el(o);return{isLaunchable:m,scopesArray:g,name:t,directory:r.directory,isEmbedded:m}}async function TE(e,t){let r=await sD(HF,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:he(e),configuration:a,framework:await AE(he(e))}}}async function BE(e){let{project:t,activeConfig:r}=await $r(e.directory,e.userProvidedConfigName,e.skipPrompts?{skipPrompts:!0}:void 0);return Xo({project:t,activeConfig:r,specifications:e.specifications,remoteFlags:e.remoteFlags,ignoreUnknownExtensions:e.ignoreUnknownExtensions})}async function Xo(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=WF(n),E=r.file.path,w=Re(E),v=await sD(g,E,p);if(v.errors){let G=v.errors.map(Ts).join(`
|
|
197
|
+
`);throw new k(`Validation errors in ${E}:
|
|
198
|
+
|
|
199
|
+
${G}`)}let x=v.data,O=I6(t.appConfigFiles,{[w]:x.client_id}),P=!1;try{P=await T6(t.directory,E)}catch{}let B={allClientIdsByConfigName:O,usesLinkedConfig:!0,name:w,gitTracked:P,source:r.source,usesCliManagedUrls:x.build?.automatically_update_urls_on_dev},U={directory:t.directory,configPath:E,configuration:x,configurationLoadResultMetadata:B,configSchema:g,specifications:n,remoteFlags:o};return new oD({ignoreUnknownExtensions:s,loadedConfiguration:U,project:t,reloadState:a}).loaded()}function O6(e){return e.access_scopes?.scopes??""}async function IE(e){try{let{project:t,activeConfig:r}=await $r(e.directory,e.configName,e.skipPrompts?{skipPrompts:!0}:void 0),n=await Xo({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 As.load(e.directory),{configurationPath:r}=await B6(t.directory,e.configName),o=(await Ct.read(r)).content;return{state:"loaded-template",rawConfig:o,scopes:O6(o),appDirectory:t.directory,packageManager:t.packageManager}}catch{return{state:"error"}}}}async function VG(e){let{project:t,activeConfig:r}=await $r(e.directory,Re(e.configPath)),n={extensionDevUUIDs:new Map(e.allExtensions.map(s=>[s.handle,s.devUUID])),previousDevURLs:e.devApplicationURLs},o=await Xo({project:t,activeConfig:r,specifications:e.specifications,remoteFlags:e.remoteFlags??[],reloadState:n});if(!o.errors.isEmpty()){let s=o.errors.getErrors();throw new k(Se`${Ae.errorText("Validation errors")}:\n\n${s.map(Ts).join(`
|
|
200
|
+
`)}`)}return o}function RE(e){let t=Ps(e);return t?`${Wo.production}.${t}`:Wo.production}var oD=class{ignoreUnknownExtensions;errors=new xs;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 j6(o);let a=fl(this.project,n),l=await this.loadExtensions(r,t),p=t.name,g=t.handle??p??"",E=await pl(this.project,t.client_id);this.reloadState||await CE(r,this.project.nodeDependencies);let{webs:w,usedCustomLayout:v}=await this.loadWebs(r,t.web_directories),x=new Zc({name:g,directory:r,configPath:n,configuration:t,webs:w,modules:l,dotenv:a,errors:this.errors,specifications:this.specifications,configSchema:s,remoteFlags:this.remoteFlags,hiddenConfig:E,devApplicationURLs:this.getDevApplicationURLs(t,w)}),O=x.realExtensions.map(P=>P.type);return await c0(O),await M6(x,this.project.usesWorkspaces,{usedCustomLayoutForWeb:v,usedCustomLayoutForExtensions:t.extension_directories!==void 0}),await x.generateExtensionTypes(),x}async loadWebs(t,r){let n=this.activeConfigFile,o=n?uD(this.project,n):this.project.webConfigFiles,s=o.map(g=>g.path),a=await Promise.all(o.map(g=>TE(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=>Oe(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=>I(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 "${Fc(n)}"`});return}let p=SE(s,n,r);if(p.errors){this.errors.addErrors(p.errors);return}let m=p.data;l&&(a=await this.findEntryPath(o,s));let g=new sl({configuration:m,configurationPath:n,entryPath:a,directory:o,specification:s});if(this.reloadState&&m.handle){let E=this.reloadState.extensionDevUUIDs.get(m.handle);E&&(g.devUUID=E)}if(l){let E=await g.validate();E.isErr()&&this.errors.addError({file:n,message:s0(E.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=Qi(a.flat()),p=new Set;return l.forEach(m=>{if(m.handle&&p.has(m.handle)){let g=l.filter(w=>w.handle===m.handle),E=Ey(g.map(w=>w.name));this.errors.addError({file:m.configurationPath,message:`Duplicated handle "${m.handle}" in extensions ${E}. Handle needs to be unique per extension.`})}else m.handle&&p.add(m.handle)}),l}async createExtensionInstances(t){let r=this.activeConfigFile;return(r?xE(this.project,r):this.project.extensionConfigFiles).map(async o=>{let s=o.path,a=he(s),l=o.content,p=g0.safeParse(l);if(!p.success)return this.errors.addError({file:s,message:`Invalid extension configuration at ${Oe(t,s)}`}),[];let{extensions:m,type:g}=p.data;if(m){let E=await sD(y0,s,o.content);if(E.errors)return this.errors.addErrors(E.errors),[];let w=E.data,v=w.extensions.map(async x=>{let O={...w,...x};return O.handle||(this.errors.addError({file:s,message:`Missing handle for extension "${O.name}" at ${Oe(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 "${Oe(t,s)}". Please specify a type.`});return}})}createWebhookSubscriptionInstances(t,r){let n=this.loadedConfiguration.configPath,o=this.findSpecificationForType(_s);if(!o)return[];let s=OE(kc,n,r);if(s.errors)return this.errors.addErrors(s.errors),[];let{api_version:a,subscriptions:l=[]}=s.data.webhooks;return Qi(l.flatMap(g=>{let{uri:E,topics:w,compliance_topics:v,...x}=g;return w?.map(O=>({api_version:a,uri:E,topic:O,...x}))})).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=>Lc(a)).filter(a=>a.identifier!==_s).map(async a=>{let l=SE(a,n,r);if(l.errors)return this.errors.addErrors(l.errors),[null,[]];let p=l.data;return Object.keys(p).length===0?[null,Object.keys(p)]:[await this.createExtensionInstance(a.identifier,p,n,t).then(g=>this.validateConfigurationExtensionInstance(r.client_id,r,g)),Object.keys(p)]})),s=Object.keys(r).filter(a=>!o.some(([l,p])=>p.includes(a))).filter(a=>![...Object.keys(Qc.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(", ")}`}),o.filter(([a])=>a).map(([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=>I(t,o)).map(async o=>await X(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 ${I(t,"src")}`})):r.identifier==="function"&&(n=(await Promise.all(["src/index.js","src/index.ts","src/main.rs"].map(o=>I(t,o)).map(async o=>await X(o)?o:void 0))).find(o=>o!==void 0)),n}getDevApplicationURLs(t,r){let n=this.reloadState?.previousDevURLs;return n&&FE(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 As.load(e),o=await vE(n,t,r);return{project:n,activeConfig:o}}async function T6(e,t){let r=I(e,".gitignore");if(!Ut(r))return!0;let n=await $e(r),o=PE.default.default().add(n),s=Oe(e,t);return!o.ignores(s)}async function B6(e,t){let r=yr(t),n=I(e,r);if(await X(n))return{configurationPath:n,configurationFileName:r};throw new k(Se`Couldn't find ${r} in ${Ae.path(e)}.`)}function I6(e,t){let r=e.map(n=>{let o=Re(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 R6(e){let t=e.filter(l=>dn(l,ft.Backend)),r=e.filter(l=>dn(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=I(n,"package.json"),s=I(n,"Gemfile"),a=I(n,"composer.json");if(await X(o))return"node";if(await X(s))return"ruby";if(await X(a))return"php"}function dn(e,t){return e.configuration.roles.includes(t)}async function M6(e,t,r){let n=e.webs,o=e.allExtensions.filter(m=>m.isSentToMetrics()),s=e.name,a=e.directory,l=e.configuration.client_id,p=el(e.configuration).sort();await N6(n,o,r,s,a,l,p,t)}async function N6(e,t,r,n,o,s,a,l){await mr.addPublicMetadata(async()=>{let p=await R6(e),m=t.filter(B=>B.isFunctionExtension).length,g=t.filter(B=>B.isESBuildExtension).length,E=t.filter(B=>B.isThemeExtension).length,w=t.length,v=e.filter(B=>dn(B,ft.Backend)).length,x=v===1?e.find(B=>dn(B,ft.Backend))?.framework:void 0,O=e.filter(B=>dn(B,ft.Frontend)).length,P={};for(let B of t)P[B.type]===void 0?P[B.type]=1:P[B.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:m>0,app_extensions_function_count:m,app_extensions_theme_any:E>0,app_extensions_theme_count:E,app_extensions_ui_any:g>0,app_extensions_ui_count:g,app_name_hash: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:x,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 j6(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 $6="project.json";async function aD(e){let t=await p0(e),r=I(t,$6);return await X(r)||await mt(r,JSON.stringify({})),r}function fl(e,t){let r=Ps(t);if(r){let n=`${Wo.production}.${r}`;return e.dotenvFiles.get(n)}return e.dotenvFiles.get(Wo.production)}async function pl(e,t){if(!t||typeof t!="string")return{};await aD(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 aD(e.directory);await Xc(o,t,{dev_store_url:r.dev_store_url})}catch{}return{dev_store_url:r.dev_store_url}}return{}}function xE(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=Oe(e.directory,s.path).replace(/\\/g,"/");return o.some(l=>bc(a,l))})}function uD(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=Oe(e.directory,o.path).replace(/\\/g,"/");return n.some(a=>bc(s,a))})}function sY(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=Oe(e.directory,l.path).replace(/\\/g,"/");return a.some(m=>bc(p,m))})}d();d();var ME=2,L6=["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 NE(e,t,r,n,o){let s=e.length===0;if(s||(s=await mE()),s){let a=await hE(o.name);return n.createApp(r,{...o,name:a})}else{for(let l=0;l<ME;l++){let p=await DE(Q0(n,r.id),e,t,{directory:o.directory});if(p){let m=await n.appFromIdentifiers(p.apiKey);if(m)return m}else{l<ME-1&&o0("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 Nr(a,L6)}}d();d();d();async function jE(e,t,r){let n=await U6(e,t,r),{app:{versionsDiff:o}}=await r.appVersionsDiff(e,{versionId:n.uuid,appVersionId:n.id});return{versionsDiff:o,versionDetails:n}}async function U6(e,t,r){try{return await r.appVersionByTag(e,t)}catch{throw Zy({headline:"Version couldn't be released.",body:["Version",{userInput:t},"could not be found."]}),new In}}d();function k6(e,t){return t?e.find(n=>n.identifier===t||n.externalIdentifier===t||n.additionalIdentifiers?.includes(t))?.uidStrategy:void 0}async function $E(e,t,r,n,o){let a=(o??await t.activeAppVersion(e))?.appModuleVersions.filter(p=>k6(r,p.specification?.identifier)!=="uuid")??[];return a.length===0?void 0:Zo(a,r,n)}function Zo(e,t,r){let n={},o=t.filter(Lc);return e.forEach(s=>{let a=o.find(p=>p.identifier===s.specification?.identifier.toLowerCase());if(!a)return;let l=s.config;l&&(n=fn(n,a.transformRemoteToLocal?.(l,{flags:r})??l))}),{...n}}function Qo(e,t){return{title:e,uid:t,experience:"extension"}}function cD(e){return{title:e,uid:void 0,experience:"dashboard"}}async function SY(e,t,r){let{versionsDiff:n,versionDetails:o}=await jE(t,r,e),s=p=>p.filter(m=>m.specification.experience==="extension"&&m.specification.identifier!=="webhook_subscription").map(m=>Qo(m.registrationTitle,void 0)),a=p=>p.filter(m=>m.specification.options.managementExperience==="dashboard").map(m=>cD(m.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 xY({localApp:e,versionAppModules:t,activeAppVersion:r}){if(e.allExtensions.filter(s=>s.isAppConfigExtension).length===0)return;let n=Zo(t,e.specifications??[],e.remoteFlags),o=Zo(r?.appModuleVersions??[],e.specifications??[],e.remoteFlags);return lD(n,o)}function lD(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):qy(s,a)?n.existingFieldNames.push(o):n.existingUpdatedFieldNames.push(o)}return n}d();d();async function fD(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(", ");ro({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 Mr({message:`Migrate ${r}?`,confirmationMessage:a,cancellationMessage:"No, cancel"})}d();async function LE(e){let{extensionsToMigrate:t,appId:r,remoteExtensions:n,migrationClient:o}=e;await Promise.all(t.map(({remote:l})=>q6({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 q6(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 UE(e){let{extensionsToMigrate:t,appId:r,remoteExtensions:n,migrationClient:o}=e;return await Promise.all(t.map(({remote:s})=>W6({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 W6(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 kE={marketing_activity:["marketing_activity_extension"]},qE={flow_action:["flow_action_definition"],flow_trigger:["flow_trigger_definition"],flow_trigger_lifecycle_callback:["flow_trigger_discovery_webhook"]},WE={ui_extension:["CHECKOUT_UI_EXTENSION","POS_UI_EXTENSION"]},HE={admin_link:["app_link","bulk_action"]};function H6(e,t){let r=new Set(e.map(n=>n.localIdentifier));return Object.fromEntries(Object.entries(t).filter(([n])=>r.has(n)))}function pD(e,t,r,n){let o=H6(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)),m=new Map;return p.forEach(g=>{m.set(g.uuid,g),m.set(Lt(g.title.substring(0,$c)),g)}),l.reduce((g,E)=>{let w=o[E.localIdentifier]??"unknown",v=m.get(w)??m.get(E.localIdentifier.toLowerCase()),x=n[E.type]?.includes(v?.type??"undefined");return v&&x&&g.push({local:E,remote:v}),g},[])}async function zE(e){let{extensionsToMigrate:t,appId:r,type:n,remoteExtensions:o,migrationClient:s}=e;await Promise.all(t.map(({remote:l})=>z6({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 z6(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(m=>m.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 VE=li`
|
|
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 KE=li`
|
|
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 JE=li`
|
|
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=T0.Partners;webUiName="Partner Dashboard";organizationSource=Vo.Partners;bundleFormat="zip";_session;constructor(t){this._session=t}async session(){if(!this._session){if(n0())throw new Error("PartnersClient.session() should not be invoked dynamically in a unit test");let{token:t,userId:r}=await Fd();this._session={token:t,businessPlatformToken:"",accountInfo:{type:"UnknownAccount"},userId:r}}return this._session}async request(t,r=void 0,n,o){return Hy(t,await this.token(),r,n,o,this.createUnauthorizedHandler())}async token(){return(await this.session()).token}async unsafeRefreshToken(){let{token:t}=await Fd([],process.env,{noPrompt:!0,forceRefresh:!0}),r=await this.session();return t&&(r.token=t),r.token}async migrateFlowExtension(t){return this.request(VE,t)}async migrateAppModule(t){return this.request(JE,t)}async migrateToUiExtension(t){return this.request(KE,t)}createUnauthorizedHandler(){return B0(this)}};async function YE(e){return await V6(e)?e.developerPlatformClient.activeAppVersion(e.remoteApp):e.activeAppVersion}async function V6(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,m=a.app.extensionRegistrations,g=a.app.dashboardManagedExtensionRegistrations,E=dl.getInstance(),w=!1,v=m,x=pD(l,v,p,WE);if(x.length>0){if(!await fD(x))throw new In;v=await UE({extensionsToMigrate:x,appId:r,remoteExtensions:v,migrationClient:E}),w=!0}let O=[{typesMap:qE,migrate:LE},GE(kE,"marketing_activity"),GE(HE,"admin_link")];for(let P of O){let B=pD(l,g,p,P.typesMap);if(B.length===0)continue;if(!await fD(B,!1))throw new In;let q=await P.migrate({extensionsToMigrate:B,appId:r,remoteExtensions:g,migrationClient:E});v=v.concat(q),w=!0}return w}function GE(e,t){return{typesMap:e,migrate:r=>zE({...r,type:t})}}d();d();var K6={bullet:"+",color:"green",suffix:"(new)"},J6={color:"#FF8800",suffix:"(updated)"},G6={bullet:"-",color:"red",suffix:"(removed)"};function DD(e){return[...e.new.map(t=>dD(t,K6)),...e.updated?e.updated.map(t=>dD(t,J6)):[],...e.unchanged,...e.removed.map(t=>dD(t,G6))]}function dD(e,t){let r=typeof e=="string"?[e,{subdued:t.suffix??""}]:e;return{...t.bullet?{bullet:t.bullet}:{},item:r,color:t.color}}function Y6({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,m=(o?.newFieldNames.length??0)>0||(o?.existingUpdatedFieldNames.length??0)>0,g=p||m;if(t&&!l||r&&!g)return!0;if(!r0()&&(l||g)){let E=[];throw g&&E.push("--allow-updates"),l&&E.push("--allow-deletes"),new k("This deployment includes changes that require confirmation.",["Run the command with",{command:E.join(" ")},"to deploy without confirmation."])}return!1}async function XE({allowUpdates:e,allowDeletes:t,extensionIdentifiersBreakdown:r,configExtensionIdentifiersBreakdown:n,appTitle:o,release:s,installCount:a}){if(await mr.addPublicMetadata(()=>eR(n)),Y6({release:s,allowUpdates:e,allowDeletes:t,extensionIdentifiersBreakdown:r,configExtensionIdentifiersBreakdown:n}))return!0;let p=await Z6(r),m=await Q6(s,n);return X6({appTitle:o,extensionsContentPrompt:p,configContentPrompt:m,release:s,installCount:a})}async function X6({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 m=e!==void 0&&r;t?p.push(m?{...t,helperText:"Removing extensions can permanently delete app user data"}:t):p.push({header:"Extensions:",emptyItemsText:"None",items:[]});let g=`${o?"Release":"Create"} a new version${e?` of ${e}`:""}?`,E=r&&s!==void 0&&s>0;m?l=await t0({message:g,infoTable:p,confirmation:e,...E?{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 Mr({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 Z6(e){let{onlyRemote:t,toCreate:r,toUpdate:n,unchanged:o}=e,s=(g,E)=>{switch(g.experience){case"dashboard":return[g.title,{subdued:`(${E}from Partner Dashboard)`}];case"extension":return g.uid&&g.uid.length>0?`${g.title} (uid: ${g.uid})`:g.title}},a,l={new: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=DD(l),m=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:m}}async function Q6(e,t){if(!t)return;let{existingFieldNames:r,existingUpdatedFieldNames:n,newFieldNames:o,deletedFieldNames:s}=t,l=DD({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 eR(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 ZE(e){let t=await YE(e),r=await tR({options:e,activeAppVersion:t}),n=iR(r),o=await nR(e,t),a=e.release&&!e.allowDeletes&&n.onlyRemote.length>0?await aR(e).catch(()=>{}):void 0;if(!await XE({extensionIdentifiersBreakdown:n,configExtensionIdentifiersBreakdown:o,appTitle:e.remoteApp?.title,release:e.release,allowUpdates:e.allowUpdates,allowDeletes:e.allowDeletes,installCount:a}))throw new In;return oR(r)}async function tR({options:e,activeAppVersion:t}){let r=t?.appModuleVersions??[],n=e.app.allExtensions,o=e.envIdentifiers,s=r.filter(m=>m.registrationId===""),a=r.map(m=>{if(m.registrationId===""){let g=n.find(E=>o[E.localIdentifier]===m.registrationUuid)??rR(n,s,m);if(g)return{experience:g.specification.experience,status:"updated",local:g,remote:m}}else{let g=n.find(E=>m.registrationId===E.uid);if(g)return{experience:g.specification.experience,status:"unchanged",local:g,remote:m}}return{experience:m.specification?.experience??"extension",status:"deleted",remote:m}}),l=a.map(m=>m.local),p=n.filter(m=>!l.includes(m)).map(m=>({experience:m.specification.experience,status:"created",local:m}));return[...a,...p]}function rR(e,t,r){let n=(l,p)=>Lt(l.handle)===Lt(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 nR(e,t){let{app:r,appId:n}=e,o=await uR(r,n),s=Zo(t?.appModuleVersions??[],r.specifications??[],r.remoteFlags);return lD(o,s)}function iR(e){let t=e.filter(r=>r.experience==="extension");return{onlyRemote:t.filter(r=>r.status==="deleted").map(r=>sR(r.remote)),toCreate:t.filter(r=>r.status==="created").map(r=>Qo(r.local.localIdentifier,r.local.uid)),toUpdate:t.filter(r=>r.status==="updated").map(r=>Qo(r.local.localIdentifier,void 0)),unchanged:t.filter(r=>r.status==="unchanged").map(r=>Qo(r.local.localIdentifier,void 0))}}function oR(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 uR(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})??o.configuration;r=fn(r,a)}return r}function sR(e){return e.specification?.options.managementExperience==="dashboard"?cD(e.registrationTitle):Qo(e.registrationTitle,e.registrationId)}async function aR(e){return e.developerPlatformClient.appInstallCount({id:e.remoteApp.id,apiKey:e.remoteApp.apiKey,organizationId:e.remoteApp.organizationId})}d();function QE({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 m=l===0?`
|
|
244
|
+
`:`
|
|
245
|
+
|
|
246
|
+
`;a=a.concat(m,p)}return a}d();async function qX({app:e,appApiKey:t,extensionUuids:r,command:n},o=process.env){let s=e.dotenv;s??={path:I(e.directory,RE(e.configPath)),variables:{}};let a={...e.dotenv?.variables??{}};o[e.idEnvironmentVariableName]||(a[e.idEnvironmentVariableName]=t),Object.keys(r).forEach(p=>{let m=`SHOPIFY_${Ec(p)}_ID`;o[m]||(a[m]=r[p])});let l=n==="import-extensions";if(s.variables=a,l){let m=await X(s.path)?await $e(s.path):"",g=h0(m,a);await mt(s.path,g),e.dotenv=s}return e}function ev({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 tv=e=>({message:Se`Invalid Client ID: ${e}`,tryMessage:Se`You can find the Client ID in the app settings in the Developer Dashboard.`}),rv=["You can pass",{command:"--reset"},"to your command to reset your app configuration."],cR=(e,t=!1)=>[{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}],["Pass",{command:"--reset"},"to your command to create a new app"]]}}],Dl=async e=>{let t=Pd(),r=await t.appFromIdentifiers(e.apiKey);if(!r){let n=await t.accountInfo()??{type:"UnknownAccount"},o="Unknown account",s=!1;throw $y(n)?(o=n.orgName,s=!0):jy(n)&&(o=n.email),new k(["No app with client ID",{command:e.apiKey},"found"],cR(o,s))}return r};async function aZ(e){let{noRelease:t,app:r,remoteApp:n,developerPlatformClient:o,organization:s}=e,a=await o.activeAppVersion(n);await lR(r),iv({org:s.businessName,appName:n.title,appDotEnv:r.dotenv?.path,configFile:Re(r.configPath),messages:[rv]});let l=await ZE({app:r,appId:n.apiKey,appName:n.title,release:!t,developerPlatformClient:o,envIdentifiers:ev({app:r}),remoteApp:n,activeAppVersion:a,allowUpdates:e.allowUpdates,allowDeletes:e.allowDeletes}),p=!1;return a&&(p=a.appModuleVersions.some(m=>!m.registrationId)),{deployIdentifiers:l,didMigrateExtensionsToDevDash:p}}async function lR(e){let t=e.configuration.build?.include_config_on_deploy;if(t===void 0)return;await(await Ct.read(e.configPath)).remove("build.include_config_on_deploy"),t?fR():pR()}function fR(){ro({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 pR(){Ic({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 nv(e){let t=Pd(),r=e.organizationId?await qc(e.organizationId,t):await dR(),{organization:n,apps:o,hasMorePages:s}=await t.orgAndApps(r.id),a=await NE(o,s,n,t,e);return await hD(a,t.organizationSource),a}async function dR(){let e=await I0();if(e.length===0)throw new k("No organizations found.","Make sure you have access to a Shopify organization.");return f0(e)}function cZ({organization:e,app:t,remoteApp:r,selectedStore:n,tunnelMode:o}){if(Dy())return;let s="Not yet configured",a=t.configuration.build?.automatically_update_urls_on_dev;a!==void 0&&(s=a?"Yes":"No");let l=[rv];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)."]),iv({org:e.businessName,appName:r.title,devStore:n.shopDomain,updateURLs:s,configFile:Re(t.configPath),messages:l})}function iv({org:e,appName:t,devStore:r,updateURLs:n,configFile:o,appDotEnv:s,messages:a}){let l=[];r&&l.push(r);let p=(s&&Re(s))??(o&&yr(o));ro({headline:o?`Using ${p} for default values:`:"Using these settings:",body:QE({appName:t,org:e,devStores:l,updateURLs:n,messages:a})})}async function hD(e,t){let n={[t===Vo.BusinessPlatform?"business_platform_id":"partner_id"]:ls(e.organizationId)};await mr.addPublicMetadata(()=>({...n,api_key:e.apiKey}))}d();d();async function ov(e,t){ce(`Writing app configuration to ${t}`);let r=hR(structuredClone(e)),n=mD(r),o=new Ct(t,{});await o.replace(n),await o.transformRaw(DR)}function mD(e){if(e==null)return e;if(Array.isArray(e))return e.map(mD);if(typeof e=="object"){let t={};for(let[r,n]of Object.entries(e)){let o=mD(n);typeof o=="object"&&o!==null&&!Array.isArray(o)&&Object.keys(o).length===0||(t[r]=o)}return t}return e}function DR(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 hR(e){let t=e.webhooks;if(Array.isArray(t?.subscriptions)&&t.subscriptions.length){let r=no(e?.application_url);t.subscriptions=v0(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 mR=zo.extend({app_proxy:F.object({url:F.preprocess(no,jc(F.string({invalid_type_error:"Value must be string"}))),subpath:F.string({invalid_type_error:"Value must be a string"}),prefix:F.string({invalid_type_error:"Value must be a string"})}).optional()}),gD="app_proxy",gR={forward:(e,t)=>{let r=e;if(!r.app_proxy)return{};let n;return"application_url"in t&&(n=t?.application_url),{url:hi(r.app_proxy.url,n),subpath:r.app_proxy.subpath,prefix:r.app_proxy.prefix}},reverse:e=>{let t=e;return{app_proxy:{url:no(t.url),subpath:t.subpath,prefix:t.prefix}}}},_R=di({identifier:gD,schema:mR,transformConfig:gR,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})}}),uv=_R;d();var yR=zo.extend({pos:F.object({embedded:F.boolean({invalid_type_error:"Value must be Boolean"})}).optional()}),_D="point_of_sale",FR={embedded:"pos.embedded"},ER=di({identifier:_D,schema:yR,transformConfig:FR}),sv=ER;d();d();function av(e,t){let r=e;if(!r.events?.subscription)return e;let n;return t&&"application_url"in t&&(n=t?.application_url),{...r,events:{...r.events,subscription:r.events.subscription.map(o=>({...o,uri:hi(o.uri,n)}))}}}function cv(e){let t=vt(e,"events"),r=vt(t,"api_version"),o=vt(t,"subscription")?.map(a=>{let{identifier:l,...p}=a;return p});return{events:r??o?{api_version:r,subscription:o}:{}}}var yD="events",vR={forward:av,reverse:e=>cv(e)},CR=zo.extend({events:F.any().optional()}),wR=di({identifier:yD,schema:CR,transformConfig:vR}),lv=wR;d();var bR={forward:SR,reverse:e=>xR(e)},ED="privacy_compliance_webhooks",AR=di({identifier:ED,schema:kc,transformConfig:bR}),fv=AR;function SR(e,t){let r=vt(e,"webhooks"),n;"application_url"in t&&(n=t?.application_url);let o=Wy({customers_redact_url:FD(PR(r),n),customers_data_request_url:FD(OR(r),n),shop_redact_url:FD(TR(r),n)});if(Object.keys(o).length===0)return o;{let{api_version:s}=r;return{api_version:s,...o}}}function xR(e){let t=vt(e,"customers_redact_url"),r=vt(e,"customers_data_request_url"),n=vt(e,"shop_redact_url"),o=[];return r&&o.push({compliance_topics:[Uc.CustomersDataRequest],uri:r}),t&&o.push({compliance_topics:[Uc.CustomersRedact],uri:t}),n&&o.push({compliance_topics:[Uc.ShopRedact],uri:n}),o.length===0?{}:{webhooks:{subscriptions:E0(o),privacy_compliance:void 0}}}function vD(e,t){return e.subscriptions?.find(r=>r.compliance_topics?.includes(t))?.uri}function FD(e,t){return t&&e?.startsWith("/")?`${no(t)}${e}`:e}function PR(e){return vD(e,"customers/redact")??e?.privacy_compliance?.customer_deletion_url}function OR(e){return vD(e,"customers/data_request")??e?.privacy_compliance?.customer_data_request_url}function TR(e){return vD(e,"shop/redact")??e?.privacy_compliance?.shop_deletion_url}d();var BR="@shopify/post-purchase-ui-extensions",IR=Je.extend({metafields:F.array(pi).optional()}),RR=Te({identifier:"checkout_post_purchase",dependency:BR,partnersWebIdentifier:"post_purchase",schema:IR,appModuleFeatures:e=>["ui_preview","cart_url","esbuild","single_js_entry_path"],getOutputRelativePath:e=>`dist/${e.handle}.js`,clientSteps:[{lifecycle:"deploy",steps:[{id:"bundle-ui",name:"Bundle UI Extension",type:"bundle_ui",config:{}}]}],deployConfig:async(e,t)=>({metafields:e.metafields??[]})}),pv=RR;d();var MR="@shopify/checkout-ui-extensions",NR=Je.extend({name:F.string(),extension_points:F.array(F.string()).optional(),metafields:F.array(pi).optional(),settings:F.object({fields:F.any().optional()}).optional()}),jR=Te({identifier:"checkout_ui_extension",dependency:MR,schema:NR,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")})}),dv=jR;d();d();d();var wt={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"},uQ=["customer","order","product","marketing_activity","abandonment","company","company_contact"],Dv=[wt.customer_reference,wt.order_reference,wt.product_reference,wt.company_reference,wt.company_contact_reference],hv=[wt.customer_reference,wt.order_reference,wt.product_reference,wt.marketing_activity_reference,wt.abandonment_reference,wt.company_reference,wt.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"},mv=[[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"]],$R=[Qe.boolean,Qe.email,Qe.multiLineText,Qe.int,Qe.singleLineText,Qe.url,Qe.decimal],LR=[Qe.boolean,Qe.email,Qe.singleLineText,Qe.url,Qe.decimal,Qe.schemaTypeReference],gv=mv.filter(([e])=>$R.includes(e)),_v=mv.filter(([e])=>LR.includes(e));d();d();var UR=e=>{try{return new URL(e).protocol==="https:"}catch{return!1}},eu=(e,t,r)=>{let n=hi(t,r);if(n.startsWith("/"))throw new k(`Flow action ${e} is a relative URL, but no application_url is configured. Set application_url in your app configuration or use an absolute HTTPS URL.`);if(!UR(n))throw new k(`Flow action ${e} must resolve to an HTTPS URL. Set application_url to an HTTPS URL or use an absolute HTTPS URL.`);return n},hl=async(e,t)=>{if(!t)return"";let r=await Ve(I(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 kR=new Map(gv),qR=new Map(_v),WR=(e,t)=>{let r=t==="flow_action"?kR:qR,n=CD(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},HR=(e,t)=>{if(t==="flow_trigger"&&!Dv.includes(e.type))throw new k(`Commerce object ${e.type} is not supported for Flow Triggers`);if(t==="flow_action"&&!hv.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=`${qo(r)} ID`,n.required=e.required),n},ml=(e,t)=>t?t.map(n=>Object.keys(wt).includes(n.type)?HR(n,e):WR(n,e)):[];var wD=_0.extend({key:F.string().regex(/^[a-zA-Z\s]*$/,{message:"String must contain only alphabetic characters and spaces"}).optional()}),zR=Ho.extend({type:F.literal("flow_trigger"),name:F.string(),schema:F.string().optional(),settings:F.object({fields:F.array(wD).optional()}).optional()}).refine(e=>{let t=e.settings?.fields??[],r=t.every((o,s)=>gl(o,"flow_trigger",e.handle,s)),n=Fv(t,e.schema);return r&&n}),VR=Te({identifier:"flow_trigger",schema:zR,appModuleFeatures:e=>[],deployConfig:async(e,t)=>({title:e.name,description:e.description,fields:ml("flow_trigger",e.settings?.fields),schema_patch:await hl(t,e.schema)})}),yv=VR;function Ev(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 bD=F.object({type:F.string(),description:F.string().optional()}).strict(),gl=(e,t,r,n)=>{let o=Object.keys(wt).includes(e.type);return o?o?bD.extend({required:F.boolean().optional(),marketingActivityCreateUrl:F.string().optional(),marketingActivityDeleteUrl:F.string().optional()}).parse(e):bD.parse(e):t==="flow_action"?bD.extend({key:F.string(Ev("key",e,r,n)),name:F.string(Ev("name",e,r,n)),required:F.boolean().optional()}).parse(e):wD.parse(e)},CD=e=>e.startsWith("schema."),KR=e=>/[\r\n\t]/.test(e),Bs=e=>jc(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=>!KR(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."}),vv=(e,t,r)=>{if(e||t){if(!e)throw new F.ZodError([{code:F.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 F.ZodError([{code:F.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 F.ZodError([{code:F.ZodIssueCode.custom,path:["extensions[0].validation_url"],message:"To set a custom configuration page a `validation_url` must be specified."}])}return!0},Fv=(e,t)=>{if(e.some(r=>CD(r.type))&&!t)throw new F.ZodError([{code:F.ZodIssueCode.custom,path:["extensions[0].schema"],message:"To reference schema types a `schema` must be specified."}]);return!0},Cv=(e,t)=>{if(e||t){if(!e)throw new F.ZodError([{code:F.ZodIssueCode.custom,path:["extensions[0].return_type_ref"],message:"When uploading a schema a `return_type_ref` must be specified."}]);if(!t)throw new F.ZodError([{code:F.ZodIssueCode.custom,path:["extensions[0].schema"],message:"To set a return type a `schema` must be specified."}])}return!0};d();var wv=["runtime_url","validation_url","config_page_url","config_page_preview_url"];var JR=Ho.extend({type:F.literal("flow_action"),name:F.string(),runtime_url:Bs(F.string({invalid_type_error:"Value must be string"})),validation_url:Bs(F.string({invalid_type_error:"Value must be string"})).optional(),config_page_url:Bs(F.string({invalid_type_error:"Value must be string"})).optional(),config_page_preview_url:Bs(F.string({invalid_type_error:"Value must be string"})).optional(),schema:F.string().optional(),return_type_ref:F.string().optional()}).refine(e=>{let t=vv(e.config_page_url,e.config_page_preview_url,e.validation_url),n=(e.settings?.fields??[]).every((s,a)=>gl(s,"flow_action",e.handle,a)),o=Cv(e.return_type_ref,e.schema);return t&&n&&o}),GR=Te({identifier:"flow_action",schema:JR,appModuleFeatures:e=>[],patchWithAppDevURLs:(e,t)=>{for(let r of wv){let n=e[r];typeof n=="string"&&n.startsWith("/")&&(e[r]=eu(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:eu("runtime_url",e.runtime_url,a),fields:ml("flow_action",e.settings?.fields),validation_url:e.validation_url?eu("validation_url",e.validation_url,a):void 0,custom_configuration_page_url:e.config_page_url?eu("config_page_url",e.config_page_url,a):void 0,custom_configuration_page_preview_url:e.config_page_preview_url?eu("config_page_preview_url",e.config_page_preview_url,a):void 0,schema_patch:await hl(t,e.schema),return_type_ref:e.return_type_ref}}}),bv=GR;d();import YR from"fs";var Av=["buyer_experience","customers","fulfillment","inventory_and_merch","loyalty","orders","promotion","risk","b2b","payment_reminders","custom_data","error_monitoring"],XR=["capture_at_fulfillment"],ZR=Ho.extend({type:F.literal("flow_template"),name:F.string(),description:F.string().max(1024),template:F.object({categories:F.array(F.string().refine(e=>Av.concat(XR).includes(e),e=>({message:`${e} is not a valid category. Valid categories include: ${Av.join(", ")}.`}))),module:F.string(),require_app:F.boolean().optional(),discoverable:F.boolean().optional(),allow_one_click_activate:F.boolean().optional(),enabled:F.boolean().optional()})}),QR=Te({identifier:"flow_template",schema:ZR,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 eM(t,e.template.module),localization:await pn(t,e.name)})});async function eM(e,t){let n=(await Ve(I(e,t)))[0];if(!n)throw new k(`Missing flow file with the path ${I(e,t)}`);return YR.readFileSync(n,"base64")}var Sv=QR;d();var tM=Je.extend({build:F.object({command:F.string().transform(e=>e.trim()===""?void 0:e).optional(),path:F.string().optional(),watch:F.union([F.string(),F.string().array()]).optional(),wasm_opt:F.boolean().optional().default(!0),typegen_command:F.string().transform(e=>e.trim()===""?void 0:e).optional()}).optional(),name:F.string(),type:F.string(),configuration_ui:F.boolean().optional().default(!0),ui:F.object({enable_create:F.boolean().optional(),paths:F.object({create:F.string(),details:F.string()}).optional(),handle:F.string().optional()}).optional(),api_version:F.string(),input:F.object({variables:F.object({namespace:F.string(),key:F.string()}).optional()}).optional(),targeting:F.array(F.object({target:F.string(),input_query:F.string().optional(),export:F.string().optional()})).optional()}),rM=Te({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:tM,appModuleFeatures:e=>["function"],getOutputRelativePath:e=>I("dist","index.wasm"),devSessionWatchConfig:e=>{let t=e.configuration;if(!t.build||!t.build.watch)return;let r=[t.build.watch].flat().map(n=>I(e.directory,n));return r.push(I(e.directory,"locales","**.json")),r.push(I(e.directory,"**","!(.)*.graphql")),r.push(I(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=Sc(),s=I(t,"input.graphql");await X(s)&&(n=await $e(s));let a=e.targeting&&await Promise.all(e.targeting.map(async p=>{let m;return p.input_query&&(m=await nM(I(t,p.input_query))),{handle:p.target,export:p.export,input_query:m}})),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 X(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 nM(e){if(await X(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 xv=rM;d();d();d();var Pv=50,Fr=Je.extend({api_version:F.string(),payment_session_url:F.string().url(),refund_session_url:F.string().url().optional(),capture_session_url:F.string().url().optional(),void_session_url:F.string().url().optional(),supported_countries:F.array(F.string()),supported_payment_methods:F.array(F.string()),test_mode_available:F.boolean(),merchant_label:F.string().max(Pv),input:F.object({metafield_identifiers:F.object({namespace:F.string(),key:F.string()}).optional()}).optional()}),gi=F.object({buyer_label:F.string().max(Pv).optional(),buyer_label_translations:F.array(F.object({locale:F.string(),label:F.string()})).optional()}),tu=F.object({supports_installments:F.boolean().optional(),supports_deferred_payments:F.boolean().optional()}),_l=F.object({multiple_capture:F.boolean().optional()}),_i=F.object({confirmation_callback_url:F.string().url().optional(),supports_3ds:F.boolean()}),Dn=F.object({supported_buyer_contexts:F.array(F.object({currency:F.string(),countries:F.array(F.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 AD="payments.offsite.render",Ov=Fr.merge(gi).merge(tu).merge(_i).merge(_l).merge(Dn).extend({targeting:F.array(F.object({target:F.literal(AD)})).length(1),supports_oversell_protection:F.boolean().optional(),supports_3ds:F.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 yee(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 Tv(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 yi(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?Lt(n):r}var SD="payments.redeemable.render",Bv=Fr.merge(gi).merge(Dn).extend({targeting:F.array(F.object({target:F.literal(SD)})).length(1),api_version:F.string(),balance_url:F.string().url(),ui_extension_handle:F.string().optional(),checkout_payment_method_fields:F.array(F.object({type:F.union([F.literal("string"),F.literal("number"),F.literal("boolean")]),required:F.boolean(),key:F.string()})).optional()});function xee(e,t){let r=yi(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 Iv(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 xD="payments.custom-onsite.render",Rv=7,Mv=Fr.merge(gi).merge(tu).merge(_i).merge(Dn).extend({targeting:F.array(F.object({target:F.literal(xD)})).length(1),supports_3ds:F.boolean().optional(),update_payment_session_url:F.string().url().optional(),multiple_capture:F.boolean().optional(),supports_oversell_protection:F.boolean().optional(),modal_payment_method_fields:F.array(F.object({})).optional(),ui_extension_handle:F.string().optional(),start_verification_session_url:F.string().url().optional(),checkout_payment_method_fields:F.array(F.object({type:F.union([F.literal("string"),F.literal("number"),F.literal("boolean")]),required:F.boolean(),key:F.string()})).max(Rv,`The extension can't have more than ${Rv} 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 Ree(e,t){let r=yi(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 Nv(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 PD="payments.custom-credit-card.render",jv=7,$v=Fr.merge(gi).merge(_i).merge(Dn).required({refund_session_url:!0,capture_session_url:!0,void_session_url:!0}).extend({targeting:F.array(F.object({target:F.literal(PD)})).length(1),api_version:F.string(),multiple_capture:F.boolean(),checkout_hosted_fields:F.array(F.string()).optional(),ui_extension_handle:F.string().optional(),encryption_certificate_fingerprint:F.string(),checkout_payment_method_fields:F.array(F.object({type:F.union([F.literal("string"),F.literal("number"),F.literal("boolean")]),required:F.boolean(),key:F.string()})).max(jv,`The extension can't have more than ${jv} checkout_payment_method_fields`).optional()});function Uee(e,t){let r=yi(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 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,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 OD="payments.credit-card.render",Uv=7,kv=Fr.merge(tu).merge(_i).merge(_l).merge(Dn).required({refund_session_url:!0,capture_session_url:!0,void_session_url:!0}).extend({targeting:F.array(F.object({target:F.literal(OD)})).length(1),verification_session_url:F.string().url().optional(),ui_extension_handle:F.string().optional(),supports_moto:F.boolean({required_error:"supports_moto is required",invalid_type_error:"Value must be Boolean"}),encryption_certificate_fingerprint:F.string(),checkout_payment_method_fields:F.array(F.object({type:F.union([F.literal("string"),F.literal("number"),F.literal("boolean")]),required:F.boolean(),key:F.string()})).max(Uv,`The extension can't have more than ${Uv} 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 Vee(e,t){let r=yi(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 qv(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 TD="payments.card-present.render",Wv=Fr.required({refund_session_url:!0,capture_session_url:!0,void_session_url:!0}).extend({targeting:F.array(F.object({target:F.literal(TD)})).length(1),sync_terminal_transaction_result_url:F.string().url().optional()});function Xee(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 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,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 iM=F.union([Ov,Bv,Mv,$v,kv,Wv]),oM=Te({identifier:"payments_extension",schema:iM,appModuleFeatures:e=>[],deployConfig:async(e,t)=>{switch(e.targeting[0]?.target){case AD:return Tv(e);case SD:return Iv(e);case OD:return qv(e);case xD:return Nv(e);case PD:return Lv(e);case TD:return Hv(e);default:return{}}}}),zv=oM;d();var BD="@shopify/retail-ui-extensions",uM=Je.extend({name:F.string()}),sM=Te({identifier:"pos_ui_extension",dependency:BD,schema:uM,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 Ss(BD,t);if(r==="not_found")throw new Nr(`Dependency ${BD} not found`);return{name:e.name,description:e.description,renderer_version:r?.version}}}),Vv=sM;d();var ID="@shopify/admin-ui-extensions",aM=Te({identifier:"product_subscription",additionalIdentifiers:["subscription_management"],dependency:ID,graphQLType:"subscription_management",schema:Je,appModuleFeatures:e=>["ui_preview","esbuild","single_js_entry_path"],getOutputRelativePath:e=>`dist/${e.handle}.js`,clientSteps:[{lifecycle:"deploy",steps:[{id:"bundle-ui",name:"Bundle UI Extension",type:"bundle_ui",config:{}}]}],deployConfig:async(e,t)=>{let r=await Ss(ID,t);if(r==="not_found")throw new Nr(`Dependency ${ID} not found`);return{renderer_version:r?.version}}}),Kv=aM;d();var cM=F.object({key:F.string()}),lM=Je.extend({production_api_base_url:F.string(),benchmark_api_base_url:F.string().optional(),calculate_taxes_api_endpoint:F.string(),input:F.object({metafield_identifiers:F.object({namespace:F.string(),key:F.string()}).optional()}).optional(),metafields:F.array(pi).optional(),cart_line_properties:F.array(cM).optional()}),fM=Te({identifier:"tax_calculation",schema:lM,appModuleFeatures:e=>[],getOutputRelativePath:e=>I("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})}),Jv=fM;d();var pM=Te({identifier:"theme",schema:Je,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=>hM(e)}),Qv=pM,RD=1024,eC=RD*1024,tC=10,dM=tC*eC,rC=500,DM=rC*RD,Gv=[".jpg",".jpeg",".json",".js",".css",".png",".svg",".wasm"],Yv=[".json"],nC={assets:{validator:new RegExp(`${Gv.join("|")}$`),failureMessage:e=>`Only these filetypes are supported in assets: ${Gv.join(", ")}`},blocks:{validator:/.liquid$/,failureMessage:e=>"Only .liquid files are allowed in blocks."},locales:{validator:new RegExp(`${Yv.join("|")}$`),failureMessage:e=>`Only these filetypes are supported in locales: ${Yv.join(", ")}`},snippets:{validator:/.liquid$/,failureMessage:e=>"Only .liquid files are allowed in snippets."}},Xv=Object.keys(nC);async function hM(e){let t=await Cs(e),r=[],n=[];await Promise.all(t.map(async o=>{let s=Oe(e.directory,o),a=he(s);_M(s,a);let l=await Cc(o);n.push(l),["blocks","snippets"].includes(a)&&r.push(l)})),mM(Zv(n)),gM(Zv(r))}function mM(e){if(e>dM){let t=`${(e/eC).toFixed(2)} MB`;throw new k(`Your theme app extension exceeds the file size limit (${tC} MB). It's currently ${t}.`,"Reduce your total file size and try again.")}}function gM(e){if(e>DM){let t=`${(e/RD).toFixed(2)} kB`;throw new k(`Your theme app extension exceeds the total liquid file size limit (${rC} kB). It's currently ${t}.`,"Reduce your total file size and try again.")}}function _M(e,t){if(!Xv.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: ${Xv.join(", ")}`);let r=nC[t];if(!e.match(r.validator))throw new k(`Invalid filename in your theme app extension: ${e}
|
|
250
|
+
${r.failureMessage(e)}`)}function Zv(e){return e.reduce((t,r)=>t+r,0)}d();d();var N2=ai(Th(),1);import{createRequire as yU}from"module";async function Em(){let e=await import("./typescript-5R4Y7PXE.js");return e.default??e}var R2=yU(import.meta.url),M2="@shopify/ui-extensions";function FU(e){let t=e.toLowerCase().replace(/(::|\.).+$/,"");switch(t){case"purchase":return"checkout";case"pos":return"point-of-sale";default:return t}}function vm(e){let t=e[0];return t?`${M2}/${FU(t)}`:M2}function ia(e){let[t,r]=e.split("-");return!t||!r?null:{year:parseInt(t,10),month:parseInt(r,10)}}async function j2(e,t){let r=await Em(),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,he(n)),p=!!(l.raw?.files??l.raw?.include),m={compilerOptions:l.options,configPath:o,fileNames:l.fileNames,hasExplicitFiles:p};return t?.set(o,m),m}async function EU(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 X(s)&&!s.includes("node_modules"))return s}for(let o of[".js",".jsx",".ts",".tsx"]){let s=I(r,`index${o}`);if(await X(s)&&!s.includes("node_modules"))return s}return null}function $2(e){return e.length>0&&e.every(t=>t.isTypeOnly)}function vU(e,t){if(e.importClause?.isTypeOnly)return!0;let r=e.importClause?.namedBindings;return e.importClause?.name||!r?!1:t.isNamedImports(r)&&$2(r.elements)}function CU(e,t){if(e.isTypeOnly)return!0;let r=e.exportClause;return r?t.isNamedExports(r)&&$2(r.elements):!1}function wU(e,t){return t?dy(ot(t),ot(e)):!0}function bU(e,t){if(!t.allowedFiles)return!0;let r=ot(e);return t.allowedFiles.has(r)||!!t.alwaysAllowedFiles?.has(r)}function L2(e,t){return!e.includes("node_modules")&&!e.endsWith(".d.ts")&&bU(e,t)}function AU(e,t){let r=ot(e),n=(t.allowedFiles?.has(r)??!1)||(t.alwaysAllowedFiles?.has(r)??!1);return L2(e,t)&&(wU(e,t.boundaryDirectory)||n)}async function SU(e,t={}){try{let r=ot(e),n=t.importCache?.get(r);if(n)return n;let o=await Em(),s=eo(e).toString(),a=[],{compilerOptions:l}=await j2(e,t.tsConfigCache),p=o.ScriptKind.JSX;e.endsWith(".ts")?p=o.ScriptKind.TS:e.endsWith(".tsx")&&(p=o.ScriptKind.TSX);let m=o.createSourceFile(e,s,o.ScriptTarget.Latest,!0,p),g=new Set,E=[],w=v=>{if(o.isImportDeclaration(v)&&v.moduleSpecifier&&o.isStringLiteral(v.moduleSpecifier)){if(vU(v,o))return;E.push(v.moduleSpecifier.text)}else if(o.isCallExpression(v)&&v.expression.kind===o.SyntaxKind.ImportKeyword){let x=v.arguments[0];x&&o.isStringLiteral(x)&&E.push(x.text)}else if(o.isExportDeclaration(v)&&v.moduleSpecifier&&o.isStringLiteral(v.moduleSpecifier)){if(CU(v,o))return;E.push(v.moduleSpecifier.text)}o.forEachChild(v,w)};w(m);for(let v of E){if(!v||g.has(v))continue;g.add(v);let x=o.resolveModuleName(v,e,l,o.sys);if(x.resolvedModule?.resolvedFileName){let O=x.resolvedModule.resolvedFileName;O.includes("node_modules")||a.push(O)}else{let O=await EU(v,he(e));O&&a.push(O)}}return t.importCache?.set(r,a),a}catch(r){if(r instanceof k)throw r;return[]}}async function pf(e,t={},r=new Set){if(r.has(e))return[];r.add(e);let n=(await SU(e,t)).filter(s=>L2(s,t)),o=[...n];for(let s of n){if(!AU(s,t))continue;let a=await pf(s,t,r);o.push(...a)}return Bt(o)}async function Cm(e,t,r={}){let{configPath:n,fileNames:o,hasExplicitFiles:s}=await j2(e,r.tsConfigCache);if(!(!n||!s))return new Set((o??[]).map(a=>ot(a)))}async function xU(e){let t;try{t=eo(e).toString()}catch{return!1}let r=await Em(),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 PU(e,t){let r=async n=>{let o=`import('@shopify/ui-extensions/${n}').Api`,s=t.get(n);return s&&await xU(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 OU(e,t,{includesTools:r,includesIntents:n},o){let s=await PU(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 U2({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 x=R2.resolve(`@shopify/ui-extensions/${v}`,{paths:[e,t]});a.set(v,x)}catch{let{year:O,month:P}=ia(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 m=vm(r);if(l||p)try{R2.resolve(m,{paths:[e,t]})}catch{let{year:x,month:O}=ia(n)??{year:2025,month:10};throw new k(`Type reference for ${m} 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 ~${x}.${O}.0, in your dependencies.`)}let g=Fc(e,he(t)),E=await OU(r,a,{includesTools:l,includesIntents:p},m);return E?["//@ts-ignore",`declare module './${g}' {`,...o?[o]:[],...s?[s]:[],` const shopify: ${E};`," const globalThis: { shopify: typeof shopify };","}",""].join(`
|
|
251
|
+
`):null}catch(a){if(a instanceof k)throw a;let{year:l,month:p}=ia(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 k2(e,t){let r=he(e),n=await ln("tsconfig.json",{cwd:r,type:"file"});if(n){let o=ot(n),s=ot(t);if(o.startsWith(s))return he(n)}}var TU=F.object({name:F.string(),description:F.string(),inputSchema:F.object({}).passthrough(),outputSchema:F.object({}).passthrough().optional()}),q2=F.array(TU),W2=F.object({value:F.object({}).passthrough().optional(),inputSchema:F.object({}).passthrough(),outputSchema:F.object({}).passthrough().optional()});function BU(e){return qo(`${e.action} ${e.type}`.replace(/[^a-zA-Z0-9]+/g," "))}async function H2(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=BU(a),m=`${p}IntentInput`,g=`${p}IntentValue`,E=`${p}IntentOutput`,w=`${p}IntentRequest`,v=await oa(m,a.inputSchema),x=await oa(g,a.valueSchema),O=await oa(E,a.outputSchema),P=`interface ${w} {
|
|
252
|
+
action: ${JSON.stringify(a.action)};
|
|
253
|
+
type: ${JSON.stringify(a.type)};
|
|
254
|
+
data: ${m};
|
|
255
|
+
value?: ${g};
|
|
256
|
+
}`;return{inputType:v,valueType:x,outputType:O,requestType:P,requestTypeName:w,outputTypeName:E}}),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:m})=>`${a}
|
|
258
|
+
${l}
|
|
259
|
+
${p}
|
|
260
|
+
${m}`).join(`
|
|
261
|
+
|
|
262
|
+
`)}
|
|
263
|
+
|
|
264
|
+
type ShopifyGeneratedIntentVariants =
|
|
265
|
+
${s}
|
|
266
|
+
`}async function z2(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=qo(`${s.name}Input`),l=await oa(a,s.inputSchema),p=qo(`${s.name}Output`),m=await oa(p,s.outputSchema);return{name:s.name,description:s.description,inputType:l,outputType:m,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 IU(e,t){return e.replace(/^(interface|type|enum)\s+[A-Za-z0-9_]+/,`$1 ${t}`)}async function oa(e,t){if(!t)return`type ${e} = unknown`;let r=await(0,N2.compile)(t,e,{bannerComment:""}),n=r.startsWith("export ")?r.slice(7):r;return IU(n,e)}d();d();d();var V2=li`
|
|
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 K2(e){let t=await Ly(e),r=await l0(V2,t);if(r.products.edges.length===0){let a=`https://${Ry(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 Vie(e,t,r){return e.filter(s=>s.shouldFetchCartUrl()).length>0?r||`/cart/${await K2(t)}:1`:void 0}function J2(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();CB();async function G2(e,t){return d0.format(e,t)}var RU="@shopify/checkout-ui-extensions",MU=e=>e.extension_points!==void 0||e.targeting!==void 0,X2="No extension targets defined, add a `targeting` field to your configuration",NU=Je.extend({name:F.string(),type:F.literal("ui_extension"),extension_points:xd.optional(),targeting:xd.optional(),metafields:F.array(pi).optional()}).refine(e=>MU(e),X2).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}}),jU=Te({identifier:"ui_extension",dependency:RU,schema:NU,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=>J2(n.target)==="checkout")!==void 0?[...t,"cart_url"]:t},validate:async(e,t,r)=>kU(r,e.extension_points,t),deployConfig:async(e,t)=>{let r=e.extension_points?.map($U)??[];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=Y2(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=qU(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(!Y2(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 m=I(e.directory,p.module);if(!await X(m))continue;let E=n.get(m)??[];if(E.push(p.target),n.set(m,E),p.tools&&o.set(m,p.tools),p.intents?.length){let w=s.get(m)??[];w.push(...p.intents),s.set(m,w)}if(p.build_manifest.assets[gr.ShouldRender]?.module){let w=I(e.directory,p.build_manifest.assets[gr.ShouldRender].module);if(await X(w)){let x=n.get(w)??[];x.push(wm(p.target)),n.set(w,x)}}}for await(let p of r.extension_points){let m=I(e.directory,p.module);if(!await X(m))continue;let E=await Cm(m,e.directory,{tsConfigCache:l}),w=await pf(m,{boundaryDirectory:e.directory,allowedFiles:E,alwaysAllowedFiles:new Set([ot(m)]),importCache:a,tsConfigCache:l});for(let v of w){let x=n.get(v)??[];x.push(p.target),n.set(v,x)}if(p.build_manifest.assets[gr.ShouldRender]?.module){let v=I(e.directory,p.build_manifest.assets[gr.ShouldRender].module);if(await X(v)){let O=await Cm(v,e.directory,{tsConfigCache:l}),P=await pf(v,{boundaryDirectory:e.directory,allowedFiles:O,alwaysAllowedFiles:new Set([ot(v)]),importCache:a,tsConfigCache:l});for(let B of P){let U=n.get(B)??[];U.push(wm(p.target)),n.set(B,U)}}}}for await(let[p,m]of n.entries()){let g=await k2(p,e.directory);if(!g)continue;let E=I(g,"shopify.d.ts"),w=Bt(m),v=vm(w);try{let x=o.get(p),O="";if(x)try{let q=await Z2(e.directory,x,q2);q.status==="ok"?O=await z2(q.data):q.status==="invalid"&&Rn(`Invalid tools definition in "${x}": ${q.issues}`)}catch(q){Rn(`Failed to create tools type definition for tools file "${x}": ${q instanceof Error?q.message:"Unknown error"}`)}let P=s.get(p),B="";if(P?.length){let q=await LU(e.directory,P);if(q.length>0)try{B=await H2(q,{generatedTypesHelperImportPath:v})}catch(G){if(G instanceof k)throw G;Rn(`Failed to create intent type definition for intent schema files "${P.map(Q=>Q.schema).join(", ")}": ${G instanceof Error?G.message:"Unknown error"}`)}}let U=await U2({fullPath:p,typeFilePath:E,targets:w,apiVersion:r.api_version,toolsTypeDefinition:O,intentsTypeDefinition:B});if(U){let q=t.get(E)??new Set;U=await G2(U,{parser:"typescript",singleQuote:!0}),q.add(U),t.set(E,q)}}catch(x){if(r.extension_points.some(P=>I(e.directory,P.module)===p||P.build_manifest.assets[gr.ShouldRender]?.module&&I(e.directory,P.build_manifest.assets[gr.ShouldRender].module)===p))throw x}}}});function $U(e){return{...e,build_manifest:{...e.build_manifest,assets:Object.fromEntries(Object.entries(e.build_manifest.assets).map(([t,r])=>[t,{...r,filepath:I("dist",r.filepath)}]))}}}async function Z2(e,t,r){let n=I(e,t);if(!await X(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 LU(e,t){let r=await Promise.all(t.map(async o=>{try{let s=await Z2(e,o.schema,W2);return s.status==="missing"?(Rn(`Intent schema file "${o.schema}" was not found. Skipping intent type generation.`),null):s.status==="invalid"?(Rn(`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 Rn(`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 UU(e,t,r,n){if(!t)return;let o=I(e,t);return await X(o)?void 0:Se`Couldn't find ${Ae.path(o)}
|
|
299
|
+
Please check the ${n} path for ${r}`.value}async function kU(e,t,r){let n=[],o=[],s=[];if(!t||t.length===0)return to(X2);for await(let a of t){let{module:l,target:p}=a,m=await UU(e,l,p,"module");m&&n.push(m),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}`),to(n.join(`
|
|
301
|
+
|
|
302
|
+
`))):Bn({})}function Y2(e){let t=e.api_version;if(!t)return!1;let{year:r,month:n}=ia(t)??{year:0,month:0};return r>2025||r===2025&&n>=10}function wm(e){return e.replace(/\.render$/,".should-render")}function qU(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('${wm(e.target)}', (...args) => shouldRender(...args));`:`import '${r.module}'`}}var Q2=jU;d();var e1=1024,t1=128,WU=t1*e1,HU="@shopify/web-pixels-extension",zU=Je.extend({runtime_context:F.string(),version:F.string().optional(),configuration:F.any(),customer_privacy:F.object({analytics:F.boolean(),preferences:F.boolean(),marketing:F.boolean(),sale_of_data:F.enum(["enabled","disabled","ldu"])}).optional(),settings:F.any()}),VU=Te({identifier:"web_pixel_extension",dependency:HU,partnersWebIdentifier:"web_pixel",schema:zU,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 Cc(t);if(r>WU){let n=`${(r/e1).toFixed(2)} kB`;throw new k(`Your web pixel extension exceeds the total file size limit (${t1} 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()}}),r1=VU;d();var KU=F.object({handle:F.string()}),JU=Je.extend({name:F.string(),include:F.array(KU).optional(),includes:F.array(F.string()).optional(),type:F.literal("editor_extension_collection")}).transform(e=>{let t=e.includes?.map(n=>({handle:n}))??[],r=e.include??[];return{...e,inCollection:[...t,...r]}}),GU=Te({identifier:"editor_extension_collection",schema:JU,appModuleFeatures:e=>[],deployConfig:async(e,t)=>({name:e.name,handle:e.handle,in_collection:e.inCollection,localization:await pn(t,e.name)})}),n1=GU;d();var i1="specifications",YU=["json","toml","yaml","yml","svg"],XU=Di({identifier:"channel_config",uidStrategy:"single",experience:"extension",clientSteps:[{lifecycle:"deploy",steps:[{id:"copy-files",name:"Copy Files",type:"include_assets",config:{inclusions:[{type:"pattern",baseDir:i1,destination:i1,include:YU.map(e=>`**/*.${e}`)}]}}]}],appModuleFeatures:()=>[]}),o1=XU;d();var u1="icons",ZU=["svg"],QU=Di({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:u1,destination:u1,include:ZU.map(e=>`**/*.${e}`)}]}}]}],appModuleFeatures:()=>[]}),s1=QU;d();var ek=Di({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"]}),a1=ek;var c1=[b0,S0,P0,_s,yD,ED,gD,_D,C0];async function bu(){let e=(t,r)=>c1.indexOf(t.identifier)-c1.indexOf(r.identifier);return tk().sort(e)}function tk(){let e=[x0,w0,uv,A0,sv,fv,O0,F0,lv],t=[pv,dv,bv,Sv,yv,xv,zv,Vv,Kv,Jv,Qv,Q2,r1,n1,o1,s1,a1];return[...e,...t]}d();d();var dS=ai(hB()),DS=ai(uA()),hS=ai(fS());async function Pf(e){let t=JSON.parse(e);return await DS.default.dereference(t,{resolve:{external:!1}}),t}function rg(e,t){e==="strip"&&(t.additionalProperties=!0);let r=new dS.Ajv({allowUnionTypes:!0,allErrors:!0,verbose:!0});return r.addKeyword("x-taplo"),r.compile(t)}var pS=new Map;function mS(e,t,r,n){let o=(0,hS.default)(e),s=n??Sc(),a=pS.get(s)??rg(r,t);pS.set(s,a),a(o);let l;if(a.errors&&a.errors.length>0)return l=vW(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(m=>{p.includes(m)||delete o[m]})}return{state:"ok",data:o,errors:void 0,rawErrors:void 0}}function EW(e){return Array.isArray(e)?"array":e===null?"null":typeof e}function ha(e,t){return t.length===0?e:vt(e,t)}function vW(e,t,r){return CW(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=ha(t,s);return{path:s,message:`Expected ${a}, received ${EW(l)}`}}if(o.keyword==="anyOf"||o.keyword==="oneOf")return{path:s,message:"Invalid input"};if(o.params.allowedValues){let a=o.params.allowedValues,l=ha(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=ha(t,s),m=a;switch(a){case"<=":m="less than or equal to";break;case"<":m="less than";break;case">=":m="greater than or equal to";break;case">":m="greater than";break}return{path:s,message:Fy(`${typeof p} must be ${m} ${l}`)}}if(o.params.additionalProperty){let a=Object.keys(o.parentSchema?.properties??{}),l=Object.keys(o.data??{}),p=a.filter(m=>!l.includes(m));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 CW(e,t,r){let n=e,o=new Set;for(;;){let s=n.filter(E=>(E.keyword==="oneOf"||E.keyword==="anyOf")&&!o.has(E.instancePath))[0];if(s===void 0)break;let a=n.filter(E=>!E.instancePath.startsWith(s.instancePath)),l=[s],p=s.schemaPath.replace("#/","").replace(/\//g,"."),m=vt(r,p),g=ha(t,s.instancePath.split("/").slice(1));if(m!==void 0&&g!==void 0){let E=m.map(w=>{let v=rg("fail",w);v(g);let x=0;return w.type==="object"&&(x=Object.keys(w.properties).reduce((P,B)=>{let U=w.properties[B],q=ha(g,[B]);return rg("fail",U)(q)?P+1:P},x)),[x,v.errors]}).sort(([w],[v])=>w-v);if(E.length>=2){let[w,v]=E[E.length-1],[x]=E[E.length-2];w!==x&&(l=[s,...v.map(O=>({...O,instancePath:s.instancePath+O.instancePath}))])}}n=[...a,...l],o.add(s.instancePath)}return n}var wW={type:{type:"string"},handle:{type:"string"},uid:{type:"string"},path:{type:"string"},extensions:{}};async function gS(e,t,r="strip"){let n=t?.jsonSchema;if(n===void 0||Ds(JSON.parse(n)))return e.parseConfigurationObject;let o=await Pf(n);o.properties={...wW,...o.properties};let s=e.identifier;return l=>{let p=e.parseConfigurationObject(l),g=(p.state==="ok"?p.data:void 0)??l,E=mS(g,o,r,s),w=p.errors??[];E.state==="error"&&(w=w.concat(E.errors));let v=new Set;return w=w.filter(x=>{let O=JSON.stringify({path:x.path,message:x.message});return v.has(O)?!1:(v.add(O),!0)}),p.state!=="ok"||w.length>0?{state:"error",data:void 0,errors:w}:{state:"ok",data:E.data,errors:void 0}}}async function Of({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 bu();return[...await bW(o,n)]}async function bW(e,t){let r=t.map(async a=>{let l=e.find(g=>g.identifier===a.identifier);if(!l&&a.validationSchema?.jsonSchema&&(l=await SW(a,a.validationSchema)),!l)return;let p=AW(l,a),m=await gS(p,a.validationSchema,p.experience==="extension"?"fail":"strip");return{...p,parseConfigurationObject:m}}),n=Qi(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 AW(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 SW(e,t){let n=(await Pf(t.jsonSchema)).properties?.localization!==void 0;return{...Di({identifier:e.identifier,uidStrategy:e.uidStrategy,experience:e.experience,appModuleFeatures:()=>n?["localization"]:[]}),loadedRemoteSpecs:!0}}async function Tf(e,t=!0){let{remoteApp:r,appDirectory:n,developerPlatformClient:o}=await xW(e),s=await Of({developerPlatformClient:o,app:r}),a=r.flags,l=await OW(e,s,a,r.apiKey),p=await TW(r,e,{appDirectory:l.appDirectory??n});await hD(r,o.organizationSource);let m=await BW({configFileName:p,remoteApp:r,developerPlatformClient:o,specifications:s,flags:a,appDirectory:n,localAppOptions:l});return t&&RW(p,m.name,l.packageManager),{remoteApp:r,configFileName:p,configuration:m}}function _S(e){if(Rc()||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 xW(e){let{creationOptions:t,appDirectory:r}=await PW(e),n=r??e.directory;if(e.apiKey){let a=await Dl({apiKey:e.apiKey});if(!a){let l=tv(e.apiKey);throw new k(l.message,l.tryMessage)}return e.isNewApp&&(a.newApp=!0),{remoteApp:a,appDirectory:n,developerPlatformClient:a.developerPlatformClient}}e.organizationId||_S(["client-id"]);let o=await nv({...t,directory:n,organizationId:e.organizationId}),s=o.developerPlatformClient;return{remoteApp:o,appDirectory:n,developerPlatformClient:s}}async function PW(e){let t={isLaunchable:!1,scopesArray:[],name:"",directory:e.directory,isEmbedded:!1};try{let r=await BE({specifications:await bu(),directory:e.directory,userProvidedConfigName:e.configName,remoteFlags:void 0,skipPrompts:!0});return{creationOptions:r.creationDefaultOptions(),appDirectory:r.directory}}catch{return{creationOptions:t}}}async function OW(e,t,r,n){let o=await IE({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:Kd(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 TW(e,t,r){if(t.fileName){let a=yr(t.fileName),l=r.appDirectory??t.directory;if(!t.force&&await X(I(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 cl(n),s=o[e.apiKey];return s||(Ds(o)?"shopify.app.toml":(_S(["file-name"]),pE(n,e.title)))}async function BW(e){let{remoteApp:t,developerPlatformClient:r,specifications:n,flags:o,configFileName:s,appDirectory:a,localAppOptions:l}=e,p=I(a,s),m=await $E(t,r,n,o);if(!m){let w=l.scopes;m=MW(t,w)}let g=(w,v)=>v,E={...fn({...l.existingConfig??{}},{client_id:t.apiKey,...m},g),build:IW({existingBuildOptions:l.existingBuildOptions,linkedAppAndClientIdFromFileAreInSync:l.localAppIdMatchedRemote,linkedAppWasNewlyCreated:!!t.newApp,defaultToUpdateUrlsOnDev:!0})};return delete E.scopes,await ov(E,p),iD(E,{configFileName:s,directory:a}),E}function IW(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(!Ds(s))return s}function RW(e,t,r){hs({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:Mc(r,"shopify app deploy")}]],reference:[{link:{label:"App configuration",url:"https://shopify.dev/docs/apps/tools/cli/configuration"}}]})}function MW(e,t){return{...kW(e),...UW(e),...$W(e),...LW(t,e),...jW(e),...NW(e)}}function NW(e){let t={application_url:e.applicationUrl?.replace(/\/$/,"")??"",embedded:e.embedded??!0};return e.preferencesUrl?{...t,app_preferences:{url:e.preferencesUrl}}:{...t}}function jW(e){return e.appProxy?.url?{app_proxy:{url:e.appProxy.url,subpath:e.appProxy.subPath,prefix:e.appProxy.subPathPrefix}}:{}}function $W(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 LW(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 UW(e){return{pos:{embedded:e.posEmbedded??!1}}}function kW(e){return{name:e.title}}d();d();async function yS(e){for(let t of e)await qW(t)}async function qW(e){if(!e.isUUIDStrategyExtension||e.configuration.uid)return;let t=await Ct.read(e.configurationPath),r=vt(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 FS(e){let t=Ts(e);return Se`${Ae.errorText("Validation error")} in ${Ae.path(e.file)}:\n\n${t}`}async function Vae({directory:e,clientId:t,forceRelink:r,userProvidedConfigName:n,unsafeTolerateErrors:o=!1}){let s,a,l;if(r){let P=await Tf({directory:e,apiKey:t});l=P.remoteApp;let B=await $r(e,P.configFileName);s=B.project,a=B.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(B=>B.message).join(`
|
|
304
|
+
`));if(!a.isLinked){let B=await Tf({directory:e,apiKey:t,configName:Re(a.file.path)});l=B.remoteApp;let U=await $r(e,B.configFileName);s=U.project,a=U.activeConfig}}let p=a.file.content.client_id;if(typeof p!="string"||p.length===0)throw new Nr(`Active config at ${a.file.path} is marked as linked but has no client_id`);l??=await Dl({apiKey:t??p});let g=l.developerPlatformClient,E=await qc(l.organizationId,g),w=await Of({developerPlatformClient:g,app:l}),v=await Xo({project:s,activeConfig:a,specifications:w,remoteFlags:l.flags,clientIdOverride:t&&t!==p?t:void 0});if(!o&&!v.errors.isEmpty())throw new k(FS(v.errors.getErrors()[0]));let x=ll(e),O=l.apiKey===v.configuration.client_id;return(!x||O)&&Yo({appId:l.apiKey,title:l.title,directory:e,orgId:l.organizationId}),await WW(l,E,r),v.errors.isEmpty()&&await yS(v.allExtensions),{project:s,activeConfig:a,app:v,remoteApp:l,developerPlatformClient:g,specifications:w,organization:E}}async function WW(e,t,r){let n;t.source===Vo.BusinessPlatform?n={business_platform_id:ls(t.id)}:n={partner_id:ls(t.id)},await mr.addPublicMetadata(()=>({...n,api_key:e.apiKey,cmd_app_reset_used:r}))}async function Kae({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 bu(),a=await Xo({project:n,activeConfig:o,specifications:s,ignoreUnknownExtensions:!0});if(!a.errors.isEmpty())throw new k(FS(a.errors.getErrors()[0]));return{app:a,project:n}}export{Od as a,tH as b,io as c,xB as d,vs as e,J0 as f,_H as g,Q0 as h,Kd as i,ft as j,Zz as k,yr as l,Xd as m,ez as n,MF as o,ll as p,Yo as q,BJ as r,FE as s,IJ as t,RJ as u,MJ as v,As as w,sY as x,nD as y,vE as z,Ts as A,HG as B,zG as C,VG as D,RE as E,dn as F,cl as G,DE as H,dJ as I,hE as J,DJ as K,mE as L,hJ as M,$E as N,SY as O,xY as P,XE as Q,QE as R,qX as S,rv as T,Dl as U,aZ as V,dR as W,cZ as X,iv as Y,hD as Z,uQ as _,mv as $,AD as aa,yee as ba,SD as ca,xee as da,xD as ea,Ree as fa,PD as ga,Uee as ha,OD as ia,Vee as ja,TD as ka,Xee as la,Vie as ma,J2 as na,Of as oa,Tf as pa,OW as qa,BW as ra,Vae as sa,Kae as ta};
|
|
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
|
+
*/
|