@ohos-ports/shopify 4.8.0-beta.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/README.md +75 -0
- package/bin/run.cmd +3 -0
- package/bin/run.js +11 -0
- package/dist/acorn-7M27BPGP.js +16 -0
- package/dist/analytics-3IIUBZ3B.js +1 -0
- package/dist/analytics-OOT5AB52.js +1 -0
- package/dist/angular-DW5TQVCM.js +4 -0
- package/dist/assets/graphiql/favicon.ico +0 -0
- package/dist/assets/graphiql/style.css +58 -0
- package/dist/assets/hydrogen/bundle/analyzer.html +2056 -0
- package/dist/assets/hydrogen/i18n/domains.ts +21 -0
- package/dist/assets/hydrogen/i18n/mock-i18n-types.ts +5 -0
- package/dist/assets/hydrogen/i18n/subdomains.ts +20 -0
- package/dist/assets/hydrogen/i18n/subfolders.ts +22 -0
- package/dist/assets/hydrogen/routes/locale-check.ts +16 -0
- package/dist/assets/hydrogen/starter/.cursor/rules/hydrogen-react-router.mdc +52 -0
- package/dist/assets/hydrogen/starter/.graphqlrc.ts +29 -0
- package/dist/assets/hydrogen/starter/AGENTS.md +5 -0
- package/dist/assets/hydrogen/starter/CHANGELOG.md +2839 -0
- package/dist/assets/hydrogen/starter/CLAUDE.md +1 -0
- package/dist/assets/hydrogen/starter/README.md +45 -0
- package/dist/assets/hydrogen/starter/app/assets/favicon.svg +28 -0
- package/dist/assets/hydrogen/starter/app/components/AddToCartButton.tsx +37 -0
- package/dist/assets/hydrogen/starter/app/components/Aside.tsx +101 -0
- package/dist/assets/hydrogen/starter/app/components/CartLineItem.tsx +197 -0
- package/dist/assets/hydrogen/starter/app/components/CartMain.tsx +109 -0
- package/dist/assets/hydrogen/starter/app/components/CartSummary.tsx +300 -0
- package/dist/assets/hydrogen/starter/app/components/Footer.tsx +129 -0
- package/dist/assets/hydrogen/starter/app/components/Header.tsx +231 -0
- package/dist/assets/hydrogen/starter/app/components/MockShopNotice.tsx +20 -0
- package/dist/assets/hydrogen/starter/app/components/PageLayout.tsx +174 -0
- package/dist/assets/hydrogen/starter/app/components/PaginatedResourceSection.tsx +61 -0
- package/dist/assets/hydrogen/starter/app/components/ProductForm.tsx +150 -0
- package/dist/assets/hydrogen/starter/app/components/ProductImage.tsx +23 -0
- package/dist/assets/hydrogen/starter/app/components/ProductItem.tsx +44 -0
- package/dist/assets/hydrogen/starter/app/components/ProductPrice.tsx +27 -0
- package/dist/assets/hydrogen/starter/app/components/SearchForm.tsx +68 -0
- package/dist/assets/hydrogen/starter/app/components/SearchFormPredictive.tsx +76 -0
- package/dist/assets/hydrogen/starter/app/components/SearchResults.tsx +161 -0
- package/dist/assets/hydrogen/starter/app/components/SearchResultsPredictive.tsx +304 -0
- package/dist/assets/hydrogen/starter/app/entry.client.tsx +21 -0
- package/dist/assets/hydrogen/starter/app/entry.server.tsx +53 -0
- package/dist/assets/hydrogen/starter/app/graphql/customer-account/CustomerAddressMutations.ts +64 -0
- package/dist/assets/hydrogen/starter/app/graphql/customer-account/CustomerDetailsQuery.ts +40 -0
- package/dist/assets/hydrogen/starter/app/graphql/customer-account/CustomerOrderQuery.ts +90 -0
- package/dist/assets/hydrogen/starter/app/graphql/customer-account/CustomerOrdersQuery.ts +63 -0
- package/dist/assets/hydrogen/starter/app/graphql/customer-account/CustomerUpdateMutation.ts +25 -0
- package/dist/assets/hydrogen/starter/app/lib/context.ts +65 -0
- package/dist/assets/hydrogen/starter/app/lib/fragments.ts +242 -0
- package/dist/assets/hydrogen/starter/app/lib/orderFilters.ts +90 -0
- package/dist/assets/hydrogen/starter/app/lib/redirect.ts +23 -0
- package/dist/assets/hydrogen/starter/app/lib/search.ts +79 -0
- package/dist/assets/hydrogen/starter/app/lib/session.ts +72 -0
- package/dist/assets/hydrogen/starter/app/lib/variants.ts +46 -0
- package/dist/assets/hydrogen/starter/app/root.tsx +209 -0
- package/dist/assets/hydrogen/starter/app/routes/$.tsx +11 -0
- package/dist/assets/hydrogen/starter/app/routes/[robots.txt].tsx +78 -0
- package/dist/assets/hydrogen/starter/app/routes/[sitemap.xml].tsx +16 -0
- package/dist/assets/hydrogen/starter/app/routes/_index.tsx +177 -0
- package/dist/assets/hydrogen/starter/app/routes/account.$.tsx +9 -0
- package/dist/assets/hydrogen/starter/app/routes/account._index.tsx +5 -0
- package/dist/assets/hydrogen/starter/app/routes/account.addresses.tsx +516 -0
- package/dist/assets/hydrogen/starter/app/routes/account.orders.$id.tsx +222 -0
- package/dist/assets/hydrogen/starter/app/routes/account.orders._index.tsx +222 -0
- package/dist/assets/hydrogen/starter/app/routes/account.profile.tsx +133 -0
- package/dist/assets/hydrogen/starter/app/routes/account.tsx +97 -0
- package/dist/assets/hydrogen/starter/app/routes/account_.authorize.tsx +5 -0
- package/dist/assets/hydrogen/starter/app/routes/account_.login.tsx +17 -0
- package/dist/assets/hydrogen/starter/app/routes/account_.logout.tsx +11 -0
- package/dist/assets/hydrogen/starter/app/routes/blogs.$blogHandle.$articleHandle.tsx +129 -0
- package/dist/assets/hydrogen/starter/app/routes/blogs.$blogHandle._index.tsx +175 -0
- package/dist/assets/hydrogen/starter/app/routes/blogs._index.tsx +109 -0
- package/dist/assets/hydrogen/starter/app/routes/cart.$lines.tsx +70 -0
- package/dist/assets/hydrogen/starter/app/routes/cart.tsx +113 -0
- package/dist/assets/hydrogen/starter/app/routes/collections.$handle.tsx +161 -0
- package/dist/assets/hydrogen/starter/app/routes/collections._index.tsx +133 -0
- package/dist/assets/hydrogen/starter/app/routes/collections.all.tsx +122 -0
- package/dist/assets/hydrogen/starter/app/routes/discount.$code.tsx +48 -0
- package/dist/assets/hydrogen/starter/app/routes/pages.$handle.tsx +88 -0
- package/dist/assets/hydrogen/starter/app/routes/policies.$handle.tsx +93 -0
- package/dist/assets/hydrogen/starter/app/routes/policies._index.tsx +69 -0
- package/dist/assets/hydrogen/starter/app/routes/products.$handle.tsx +232 -0
- package/dist/assets/hydrogen/starter/app/routes/search.tsx +426 -0
- package/dist/assets/hydrogen/starter/app/routes/sitemap.$type.$page[.xml].tsx +23 -0
- package/dist/assets/hydrogen/starter/app/routes.ts +9 -0
- package/dist/assets/hydrogen/starter/app/styles/app.css +645 -0
- package/dist/assets/hydrogen/starter/app/styles/reset.css +139 -0
- package/dist/assets/hydrogen/starter/customer-accountapi.generated.d.ts +543 -0
- package/dist/assets/hydrogen/starter/env.d.ts +7 -0
- package/dist/assets/hydrogen/starter/eslint.config.js +247 -0
- package/dist/assets/hydrogen/starter/guides/predictiveSearch/predictiveSearch.jpg +0 -0
- package/dist/assets/hydrogen/starter/guides/predictiveSearch/predictiveSearch.md +394 -0
- package/dist/assets/hydrogen/starter/guides/search/search.jpg +0 -0
- package/dist/assets/hydrogen/starter/guides/search/search.md +335 -0
- package/dist/assets/hydrogen/starter/package.json +62 -0
- package/dist/assets/hydrogen/starter/public/.gitkeep +0 -0
- package/dist/assets/hydrogen/starter/react-router.config.ts +13 -0
- package/dist/assets/hydrogen/starter/server.ts +59 -0
- package/dist/assets/hydrogen/starter/storefrontapi.generated.d.ts +1342 -0
- package/dist/assets/hydrogen/starter/tsconfig.json +43 -0
- package/dist/assets/hydrogen/starter/vite.config.ts +44 -0
- package/dist/assets/hydrogen/tailwind/package.json +11 -0
- package/dist/assets/hydrogen/tailwind/tailwind.css +6 -0
- package/dist/assets/hydrogen/vanilla-extract/package.json +8 -0
- package/dist/assets/hydrogen/virtual-routes/assets/debug-network.css +609 -0
- package/dist/assets/hydrogen/virtual-routes/assets/favicon-dark.svg +20 -0
- package/dist/assets/hydrogen/virtual-routes/assets/favicon.svg +28 -0
- package/dist/assets/hydrogen/virtual-routes/assets/inter-variable-font.woff2 +0 -0
- package/dist/assets/hydrogen/virtual-routes/assets/jetbrainsmono-variable-font.woff2 +0 -0
- package/dist/assets/hydrogen/virtual-routes/assets/styles.css +249 -0
- package/dist/assets/hydrogen/virtual-routes/components/FlameChartWrapper.jsx +123 -0
- package/dist/assets/hydrogen/virtual-routes/components/HydrogenLogoBaseBW.jsx +32 -0
- package/dist/assets/hydrogen/virtual-routes/components/HydrogenLogoBaseColor.jsx +47 -0
- package/dist/assets/hydrogen/virtual-routes/components/IconBanner.jsx +292 -0
- package/dist/assets/hydrogen/virtual-routes/components/IconClose.jsx +38 -0
- package/dist/assets/hydrogen/virtual-routes/components/IconDiscard.jsx +44 -0
- package/dist/assets/hydrogen/virtual-routes/components/IconError.jsx +61 -0
- package/dist/assets/hydrogen/virtual-routes/components/IconGithub.jsx +23 -0
- package/dist/assets/hydrogen/virtual-routes/components/IconTwitter.jsx +21 -0
- package/dist/assets/hydrogen/virtual-routes/components/Layout.jsx +7 -0
- package/dist/assets/hydrogen/virtual-routes/components/RequestDetails.jsx +171 -0
- package/dist/assets/hydrogen/virtual-routes/components/RequestTable.jsx +91 -0
- package/dist/assets/hydrogen/virtual-routes/components/RequestWaterfall.jsx +151 -0
- package/dist/assets/hydrogen/virtual-routes/layout.jsx +33 -0
- package/dist/assets/hydrogen/virtual-routes/lib/useDebugNetworkServer.jsx +178 -0
- package/dist/assets/hydrogen/virtual-routes/routes/[.]well-known.appspecific.com[.]chrome[.]devtools[.]json.jsx +37 -0
- package/dist/assets/hydrogen/virtual-routes/routes/graphiql.jsx +5 -0
- package/dist/assets/hydrogen/virtual-routes/routes/index.jsx +265 -0
- package/dist/assets/hydrogen/virtual-routes/routes/subrequest-profiler.jsx +243 -0
- package/dist/assets/hydrogen/virtual-routes/virtual-root-with-layout.jsx +63 -0
- package/dist/assets/hydrogen/virtual-routes/virtual-root.jsx +67 -0
- package/dist/assets/hydrogen/vite/package.json +13 -0
- package/dist/assets/hydrogen/vite/vite.config.js +43 -0
- package/dist/assets/speedscope/SourceCodePro-Regular.ttf.f546cbe0.woff2 +0 -0
- package/dist/assets/speedscope/demangle-cpp.1768f4cc.js +4 -0
- package/dist/assets/speedscope/favicon-16x16.f74b3187.png +0 -0
- package/dist/assets/speedscope/favicon-32x32.bc503437.png +0 -0
- package/dist/assets/speedscope/file-format-schema.json +324 -0
- package/dist/assets/speedscope/import.bcbb2033.js +123 -0
- package/dist/assets/speedscope/index.html +2 -0
- package/dist/assets/speedscope/perf-vertx-stacks-01-collapsed-all.2681da68.txt +199 -0
- package/dist/assets/speedscope/release.txt +3 -0
- package/dist/assets/speedscope/reset.8c46b7a1.css +2 -0
- package/dist/assets/speedscope/source-code-pro.52b1676f.css +2 -0
- package/dist/assets/speedscope/source-code-pro.LICENSE.md +93 -0
- package/dist/assets/speedscope/source-map.438fa06b.js +24 -0
- package/dist/assets/speedscope/speedscope.6f107512.js +193 -0
- package/dist/babel-I2RLWM7N.js +15 -0
- package/dist/bootstrap.d.ts +5 -0
- package/dist/bootstrap.js +3 -0
- package/dist/chokidar-5RWEYTNQ.js +1 -0
- package/dist/chunk-2AK44UYM.js +1 -0
- package/dist/chunk-2CIZE537.js +3 -0
- package/dist/chunk-2EAFYCCS.js +16 -0
- package/dist/chunk-2KD4LHRT.js +5 -0
- package/dist/chunk-2KGPH7YG.js +2 -0
- package/dist/chunk-2O224ZPO.js +3 -0
- package/dist/chunk-2XDUJQQN.js +12 -0
- package/dist/chunk-36ROOKQB.js +1 -0
- package/dist/chunk-3DCN3N23.js +4 -0
- package/dist/chunk-3JXPOOFV.js +836 -0
- package/dist/chunk-4QBJ5JBX.js +18 -0
- package/dist/chunk-4ZNV5YSL.js +1 -0
- package/dist/chunk-5HBIIYSK.js +1 -0
- package/dist/chunk-5L63PRJL.js +2 -0
- package/dist/chunk-5N6HNQQ5.js +8 -0
- package/dist/chunk-5SEEDOQ5.js +1 -0
- package/dist/chunk-636CTEW7.js +1 -0
- package/dist/chunk-67Z34HN5.js +5 -0
- package/dist/chunk-6BDAJ6UD.js +5 -0
- package/dist/chunk-6CXG3XLP.js +1 -0
- package/dist/chunk-6MWWJZFN.js +19 -0
- package/dist/chunk-6QDOCBD4.js +6 -0
- package/dist/chunk-6RQOEPEC.js +1 -0
- package/dist/chunk-72ZY3KTF.js +1 -0
- package/dist/chunk-742XXXGL.js +6 -0
- package/dist/chunk-773TIA5M.js +2 -0
- package/dist/chunk-7HFHL5SO.js +2 -0
- package/dist/chunk-7ISJRIPT.js +1 -0
- package/dist/chunk-7LWUHQIF.js +1 -0
- package/dist/chunk-7T6M7FAC.js +103 -0
- package/dist/chunk-7UNQOKZW.js +1 -0
- package/dist/chunk-7Y7AZRL3.js +10 -0
- package/dist/chunk-A6BMJISP.js +8 -0
- package/dist/chunk-AAK376RT.js +2 -0
- package/dist/chunk-AEUCDGTB.js +294 -0
- package/dist/chunk-AWUX36VG.js +1 -0
- package/dist/chunk-B4OMIONW.js +5 -0
- package/dist/chunk-BOAGJ6P5.js +1 -0
- package/dist/chunk-BWJIZYAG.js +1 -0
- package/dist/chunk-BZ73NV3L.js +2 -0
- package/dist/chunk-C3RUVXG2.js +6 -0
- package/dist/chunk-C4YLE3NS.js +64 -0
- package/dist/chunk-CEYIZC3M.js +2 -0
- package/dist/chunk-CIWKN4HF.js +7 -0
- package/dist/chunk-CRALWNNO.js +1 -0
- package/dist/chunk-CTNBSUVU.js +83 -0
- package/dist/chunk-CULTZLC4.js +1 -0
- package/dist/chunk-CX5CC6P5.js +1 -0
- package/dist/chunk-CX75OKZK.js +1 -0
- package/dist/chunk-DASVZTAX.js +359 -0
- package/dist/chunk-DPNZWBT5.js +1 -0
- package/dist/chunk-DX3JLOUA.js +4 -0
- package/dist/chunk-E55KS3GZ.js +1 -0
- package/dist/chunk-E5FXOLQO.js +17 -0
- package/dist/chunk-E6N4PZZR.js +7 -0
- package/dist/chunk-EB574SY6.js +6 -0
- package/dist/chunk-ET2CGROE.js +451 -0
- package/dist/chunk-EX5GVHGE.js +1 -0
- package/dist/chunk-F3NYCSXT.js +273 -0
- package/dist/chunk-F3TMLDLC.js +1 -0
- package/dist/chunk-F6X6OXXB.js +3 -0
- package/dist/chunk-FDBHQLFK.js +1 -0
- package/dist/chunk-FDYW3UQC.js +1 -0
- package/dist/chunk-FEDVVYK2.js +1 -0
- package/dist/chunk-FFSDGRAN.js +1 -0
- package/dist/chunk-FJ6F4XRV.js +28 -0
- package/dist/chunk-FKIVKNOV.js +2 -0
- package/dist/chunk-FOREMLFZ.js +1 -0
- package/dist/chunk-FUYDGK33.js +2 -0
- package/dist/chunk-FX3L344E.js +1 -0
- package/dist/chunk-G5XIGN5D.js +593 -0
- package/dist/chunk-GAYKYEIM.js +1 -0
- package/dist/chunk-GB3YC4TI.js +1 -0
- package/dist/chunk-GCN4O7HM.js +1 -0
- package/dist/chunk-GCY7LPEF.js +6 -0
- package/dist/chunk-GNBRCK7L.js +3 -0
- package/dist/chunk-GRPKF5ZB.js +1 -0
- package/dist/chunk-GRSF7456.js +1 -0
- package/dist/chunk-H2TQ4ODI.js +1 -0
- package/dist/chunk-H6XEESUN.js +4 -0
- package/dist/chunk-HB347DXT.js +2 -0
- package/dist/chunk-HFSCXTJQ.js +97 -0
- package/dist/chunk-HHN6KZXX.js +1 -0
- package/dist/chunk-HP64ZTEJ.js +6 -0
- package/dist/chunk-I5A6BPCP.js +1 -0
- package/dist/chunk-IARCMH7G.js +5 -0
- package/dist/chunk-IBI5UCJO.js +1 -0
- package/dist/chunk-IKUSLRGD.js +1 -0
- package/dist/chunk-IT4HYLTY.js +1 -0
- package/dist/chunk-IWOTLFOY.js +32 -0
- package/dist/chunk-J3JPJCWP.js +1 -0
- package/dist/chunk-J4T73EAS.js +8 -0
- package/dist/chunk-JD5P5RAJ.js +1 -0
- package/dist/chunk-JG4HH54Q.js +1 -0
- package/dist/chunk-JIYSCWCG.js +1 -0
- package/dist/chunk-JJZNUFPD.js +44 -0
- package/dist/chunk-JLGA3B7P.js +1 -0
- package/dist/chunk-JWRK5KLD.js +560 -0
- package/dist/chunk-JX7FYWPO.js +1 -0
- package/dist/chunk-K42WBNJQ.js +18 -0
- package/dist/chunk-KDU7VW3L.js +11 -0
- package/dist/chunk-KWVOJWO7.js +1 -0
- package/dist/chunk-LANUJ7LX.js +16 -0
- package/dist/chunk-LD6ZCTZ3.js +9 -0
- package/dist/chunk-LFOBYEWG.js +1 -0
- package/dist/chunk-LQ7ENG4V.js +1 -0
- package/dist/chunk-LUKQ5HLC.js +1 -0
- package/dist/chunk-M2XHIN57.js +4 -0
- package/dist/chunk-MNOQAXJW.js +3 -0
- package/dist/chunk-MPW2YJWU.js +31 -0
- package/dist/chunk-MYQUYU4U.js +2 -0
- package/dist/chunk-N65F7ET2.js +1 -0
- package/dist/chunk-N6RBRPGW.js +7 -0
- package/dist/chunk-N75VOJHO.js +15 -0
- package/dist/chunk-NBFMP5XQ.js +1 -0
- package/dist/chunk-NE3ZFSMS.js +1 -0
- package/dist/chunk-NGLMZYS7.js +278 -0
- package/dist/chunk-NHAUJWEG.js +1 -0
- package/dist/chunk-NILETICC.js +11 -0
- package/dist/chunk-NNZXKFOS.js +7 -0
- package/dist/chunk-NQK2VCDA.js +1 -0
- package/dist/chunk-NROVZETL.js +1 -0
- package/dist/chunk-NW6NUGN7.js +1 -0
- package/dist/chunk-O7DZXO3O.js +15 -0
- package/dist/chunk-OBYQSIYU.js +25 -0
- package/dist/chunk-OEG3N5PG.js +15 -0
- package/dist/chunk-OGBZTY2G.js +5 -0
- package/dist/chunk-OMHR423H.js +1 -0
- package/dist/chunk-OV6SRRXR.js +5 -0
- package/dist/chunk-OVV5YGKN.js +1 -0
- package/dist/chunk-OZL5FTT7.js +1 -0
- package/dist/chunk-OZMQ2EJB.js +1 -0
- package/dist/chunk-P2OI2P2M.js +1 -0
- package/dist/chunk-P57P7UAN.js +3 -0
- package/dist/chunk-PATTG7YZ.js +1 -0
- package/dist/chunk-PG5YNPJB.js +26 -0
- package/dist/chunk-PP4L2JJ6.js +3 -0
- package/dist/chunk-Q5JX23QU.js +1 -0
- package/dist/chunk-Q5KVMLBK.js +4 -0
- package/dist/chunk-Q5LIJGT7.js +12 -0
- package/dist/chunk-Q6ADIMJM.js +6 -0
- package/dist/chunk-Q7BOSHWX.js +7 -0
- package/dist/chunk-QERQARMC.js +1 -0
- package/dist/chunk-QOV43E26.js +1 -0
- package/dist/chunk-QTFUYKMF.js +1 -0
- package/dist/chunk-QTJCCOAG.js +20 -0
- package/dist/chunk-R6ICQT2D.js +1 -0
- package/dist/chunk-R7T3LYJL.js +3 -0
- package/dist/chunk-RJ5VF3QY.js +2 -0
- package/dist/chunk-RXQJCJDV.js +1 -0
- package/dist/chunk-S2TLBBSS.js +5 -0
- package/dist/chunk-S5FOQY35.js +1 -0
- package/dist/chunk-SYLHT42O.js +1 -0
- package/dist/chunk-T4AA6TSF.js +15 -0
- package/dist/chunk-T4QWK5GG.js +10 -0
- package/dist/chunk-T7KHS6RF.js +1 -0
- package/dist/chunk-T7PJDT5O.js +6 -0
- package/dist/chunk-TEY4LRY7.js +1 -0
- package/dist/chunk-TFBRVLDN.js +1 -0
- package/dist/chunk-TOLPNBZK.js +4 -0
- package/dist/chunk-TR4OWSEX.js +77 -0
- package/dist/chunk-TU47HMTL.js +1 -0
- package/dist/chunk-TUVDJ3PG.js +2 -0
- package/dist/chunk-TYMYIUIQ.js +1 -0
- package/dist/chunk-U2DWBZK2.js +1 -0
- package/dist/chunk-U53OLUOE.js +3 -0
- package/dist/chunk-UAETNFN4.js +1 -0
- package/dist/chunk-UAFEFKAQ.js +5 -0
- package/dist/chunk-ULRJDKWQ.js +1 -0
- package/dist/chunk-UOHNRH6E.js +7 -0
- package/dist/chunk-UZARYOLN.js +1 -0
- package/dist/chunk-VASGXHYA.js +1 -0
- package/dist/chunk-VD4XJ6BX.js +1 -0
- package/dist/chunk-VE35YELD.js +1 -0
- package/dist/chunk-VFM2KQRM.js +19 -0
- package/dist/chunk-VJEKDBGZ.js +1 -0
- package/dist/chunk-VKWPEFWQ.js +1 -0
- package/dist/chunk-VSDRNYA5.js +1 -0
- package/dist/chunk-VUMUCNI7.js +1 -0
- package/dist/chunk-VVZSYHDG.js +4 -0
- package/dist/chunk-VXEYO3ZP.js +1 -0
- package/dist/chunk-VYDSOAV4.js +9 -0
- package/dist/chunk-W6ST525S.js +99 -0
- package/dist/chunk-WBYAGS6B.js +6 -0
- package/dist/chunk-WGAFCKGD.js +1 -0
- package/dist/chunk-WYBTC356.js +1 -0
- package/dist/chunk-XF2KTEID.js +1 -0
- package/dist/chunk-XH5YGJQR.js +1 -0
- package/dist/chunk-XHKWITLA.js +1705 -0
- package/dist/chunk-XOCB4KNX.js +2 -0
- package/dist/chunk-XUUAKGEX.js +1 -0
- package/dist/chunk-XUYVJEZG.js +3 -0
- package/dist/chunk-Y47C3LSX.js +3 -0
- package/dist/chunk-Y5PRPHLQ.js +6 -0
- package/dist/chunk-YD2VQEN5.js +1 -0
- package/dist/chunk-YESGYUEL.js +1 -0
- package/dist/chunk-YEVGLC5X.js +1 -0
- package/dist/chunk-YFINLODF.js +375 -0
- package/dist/chunk-YKL3BLWC.js +46 -0
- package/dist/chunk-YLQ3LNNY.js +99 -0
- package/dist/chunk-YLXPYXQP.js +1 -0
- package/dist/chunk-YNDIZCD2.js +7 -0
- package/dist/chunk-YPWHD3NL.js +1 -0
- package/dist/chunk-YSAFHVV6.js +8 -0
- package/dist/chunk-YY6TFARF.js +1 -0
- package/dist/chunk-YZMY2CTU.js +10 -0
- package/dist/chunk-Z4AFEO36.js +1 -0
- package/dist/chunk-Z5WPP6ME.js +1 -0
- package/dist/chunk-Z65E4UAP.js +1 -0
- package/dist/chunk-ZDF5N422.js +1 -0
- package/dist/chunk-ZDRIQC7O.js +1 -0
- package/dist/chunk-ZH44BDUR.js +5 -0
- package/dist/chunk-ZI7LK3LW.js +11 -0
- package/dist/chunk-ZL5LU4U2.js +32 -0
- package/dist/chunk-ZYX7UHCQ.js +1 -0
- package/dist/chunk-ZZRFG6ME.js +317 -0
- package/dist/cli/commands/app/app-logs/sources.js +1 -0
- package/dist/cli/commands/app/build.js +1 -0
- package/dist/cli/commands/app/bulk/cancel.js +1 -0
- package/dist/cli/commands/app/bulk/execute.js +1 -0
- package/dist/cli/commands/app/bulk/status.js +1 -0
- package/dist/cli/commands/app/config/link.js +1 -0
- package/dist/cli/commands/app/config/pull.js +1 -0
- package/dist/cli/commands/app/config/use.js +1 -0
- package/dist/cli/commands/app/config/validate.js +1 -0
- package/dist/cli/commands/app/demo/watcher.js +1 -0
- package/dist/cli/commands/app/deploy.js +1 -0
- package/dist/cli/commands/app/dev/clean.js +1 -0
- package/dist/cli/commands/app/dev.js +1 -0
- package/dist/cli/commands/app/doctor/instructions.js +1 -0
- package/dist/cli/commands/app/doctor.js +1 -0
- package/dist/cli/commands/app/env/pull.js +1 -0
- package/dist/cli/commands/app/env/show.js +1 -0
- package/dist/cli/commands/app/execute.js +1 -0
- package/dist/cli/commands/app/function/build.js +1 -0
- package/dist/cli/commands/app/function/info.js +1 -0
- package/dist/cli/commands/app/function/replay.js +1 -0
- package/dist/cli/commands/app/function/run.js +1 -0
- package/dist/cli/commands/app/function/schema.js +1 -0
- package/dist/cli/commands/app/function/typegen.js +1 -0
- package/dist/cli/commands/app/generate/extension.js +1 -0
- package/dist/cli/commands/app/graphiql.js +1 -0
- package/dist/cli/commands/app/import-custom-data-definitions.js +1 -0
- package/dist/cli/commands/app/import-extensions.js +1 -0
- package/dist/cli/commands/app/info.js +1 -0
- package/dist/cli/commands/app/init.js +1 -0
- package/dist/cli/commands/app/logs.js +1 -0
- package/dist/cli/commands/app/release.js +1 -0
- package/dist/cli/commands/app/subscription-migrations/cancel.js +1 -0
- package/dist/cli/commands/app/subscription-migrations/list.js +1 -0
- package/dist/cli/commands/app/subscription-migrations/schedule.js +1 -0
- package/dist/cli/commands/app/subscription-migrations/status.js +1 -0
- package/dist/cli/commands/app/subscription-migrations/unschedule.js +1 -0
- package/dist/cli/commands/app/versions/list.js +1 -0
- package/dist/cli/commands/app/webhook/trigger.js +1 -0
- package/dist/cli/commands/auth/login.d.ts +8 -0
- package/dist/cli/commands/auth/login.js +1 -0
- package/dist/cli/commands/auth/logout.d.ts +5 -0
- package/dist/cli/commands/auth/logout.js +1 -0
- package/dist/cli/commands/cache/clear.d.ts +6 -0
- package/dist/cli/commands/cache/clear.js +1 -0
- package/dist/cli/commands/config/autoupgrade/constants.d.ts +4 -0
- package/dist/cli/commands/config/autoupgrade/constants.js +1 -0
- package/dist/cli/commands/config/autoupgrade/off.d.ts +7 -0
- package/dist/cli/commands/config/autoupgrade/off.js +1 -0
- package/dist/cli/commands/config/autoupgrade/on.d.ts +7 -0
- package/dist/cli/commands/config/autoupgrade/on.js +1 -0
- package/dist/cli/commands/config/autoupgrade/status.d.ts +7 -0
- package/dist/cli/commands/config/autoupgrade/status.js +1 -0
- package/dist/cli/commands/debug/command-flags.d.ts +9 -0
- package/dist/cli/commands/debug/command-flags.js +1 -0
- package/dist/cli/commands/doc/fetch.d.ts +12 -0
- package/dist/cli/commands/doc/fetch.js +1 -0
- package/dist/cli/commands/doc/search.d.ts +13 -0
- package/dist/cli/commands/doc/search.js +1 -0
- package/dist/cli/commands/docs/generate.d.ts +21 -0
- package/dist/cli/commands/docs/generate.js +1 -0
- package/dist/cli/commands/doctor-release/doctor-release.d.ts +6 -0
- package/dist/cli/commands/doctor-release/doctor-release.js +1 -0
- package/dist/cli/commands/doctor-release/theme/index.d.ts +14 -0
- package/dist/cli/commands/doctor-release/theme/index.js +1 -0
- package/dist/cli/commands/help.d.ts +13 -0
- package/dist/cli/commands/help.js +1 -0
- package/dist/cli/commands/kitchen-sink/async.d.ts +11 -0
- package/dist/cli/commands/kitchen-sink/async.js +1 -0
- package/dist/cli/commands/kitchen-sink/index.d.ts +12 -0
- package/dist/cli/commands/kitchen-sink/index.js +1 -0
- package/dist/cli/commands/kitchen-sink/prompts.d.ts +11 -0
- package/dist/cli/commands/kitchen-sink/prompts.js +1 -0
- package/dist/cli/commands/kitchen-sink/static.d.ts +11 -0
- package/dist/cli/commands/kitchen-sink/static.js +1 -0
- package/dist/cli/commands/notifications/generate.d.ts +6 -0
- package/dist/cli/commands/notifications/generate.js +1 -0
- package/dist/cli/commands/notifications/list.d.ts +9 -0
- package/dist/cli/commands/notifications/list.js +1 -0
- package/dist/cli/commands/organization/list.js +1 -0
- package/dist/cli/commands/search.d.ts +14 -0
- package/dist/cli/commands/search.js +1 -0
- 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 -0
- package/dist/cli/commands/theme/console.js +1 -0
- package/dist/cli/commands/theme/delete.js +1 -0
- package/dist/cli/commands/theme/dev.js +1 -0
- package/dist/cli/commands/theme/duplicate.js +1 -0
- package/dist/cli/commands/theme/info.js +1 -0
- package/dist/cli/commands/theme/init.js +1 -0
- package/dist/cli/commands/theme/language-server.js +1 -0
- package/dist/cli/commands/theme/list.js +1 -0
- package/dist/cli/commands/theme/metafields/pull.js +1 -0
- package/dist/cli/commands/theme/open.js +1 -0
- package/dist/cli/commands/theme/package.js +1 -0
- package/dist/cli/commands/theme/preview.js +1 -0
- package/dist/cli/commands/theme/profile.js +1 -0
- package/dist/cli/commands/theme/publish.js +1 -0
- package/dist/cli/commands/theme/pull.js +1 -0
- package/dist/cli/commands/theme/push.js +1 -0
- package/dist/cli/commands/theme/rename.js +1 -0
- package/dist/cli/commands/theme/share.js +1 -0
- package/dist/cli/commands/upgrade.d.ts +7 -0
- package/dist/cli/commands/upgrade.js +1 -0
- package/dist/cli/commands/version.d.ts +5 -0
- package/dist/cli/commands/version.js +1 -0
- package/dist/cli/help.d.ts +38 -0
- package/dist/cli/help.js +2 -0
- package/dist/cli/services/commands/doc/fetch.d.ts +1 -0
- package/dist/cli/services/commands/doc/fetch.js +45 -0
- package/dist/cli/services/commands/doc/search.d.ts +1 -0
- package/dist/cli/services/commands/doc/search.js +47 -0
- package/dist/cli/services/commands/notifications.d.ts +2 -0
- package/dist/cli/services/commands/notifications.js +106 -0
- package/dist/cli/services/commands/search.d.ts +1 -0
- package/dist/cli/services/commands/search.js +7 -0
- package/dist/cli/services/commands/version.d.ts +1 -0
- package/dist/cli/services/commands/version.js +6 -0
- package/dist/cli/services/doctor-release/context.d.ts +16 -0
- package/dist/cli/services/doctor-release/context.js +11 -0
- package/dist/cli/services/doctor-release/theme/runner.d.ts +7 -0
- package/dist/cli/services/doctor-release/theme/runner.js +37 -0
- package/dist/cli/services/doctor-release/theme/tests/init.d.ts +11 -0
- package/dist/cli/services/doctor-release/theme/tests/init.js +34 -0
- package/dist/cli/services/doctor-release/theme/tests/push.d.ts +10 -0
- package/dist/cli/services/doctor-release/theme/tests/push.js +44 -0
- package/dist/cli/services/kitchen-sink/async.d.ts +1 -0
- package/dist/cli/services/kitchen-sink/async.js +65 -0
- package/dist/cli/services/kitchen-sink/prompts.d.ts +1 -0
- package/dist/cli/services/kitchen-sink/prompts.js +168 -0
- package/dist/cli/services/kitchen-sink/static.d.ts +1 -0
- package/dist/cli/services/kitchen-sink/static.js +201 -0
- package/dist/command-registry.d.ts +8 -0
- package/dist/command-registry.js +1 -0
- package/dist/conf-store-ASDCTDQ4.js +1 -0
- package/dist/configs/all.yml +280 -0
- package/dist/configs/nothing.yml +3 -0
- package/dist/configs/recommended.yml +258 -0
- package/dist/configs/theme-app-extension.yml +24 -0
- package/dist/custom-oclif-loader-BWAMUFQ4.js +1 -0
- package/dist/data/app_block_entry.json +13 -0
- package/dist/data/default_setting_values.json +24 -0
- package/dist/data/filters.json +6177 -0
- package/dist/data/latest.json +2 -0
- package/dist/data/local_block_entry.json +25 -0
- package/dist/data/manifest_theme.json +19 -0
- package/dist/data/manifest_theme_app_extension.json +10 -0
- package/dist/data/objects.json +20621 -0
- package/dist/data/preset.json +72 -0
- package/dist/data/preset_blocks.json +91 -0
- package/dist/data/section.json +208 -0
- package/dist/data/setting.json +1538 -0
- package/dist/data/settings.json +10 -0
- package/dist/data/shopify_system_translations.json +2766 -0
- package/dist/data/tags.json +1276 -0
- package/dist/data/targetted_block_entry.json +15 -0
- package/dist/data/theme_block.json +91 -0
- package/dist/data/theme_block_entry.json +14 -0
- package/dist/data/theme_settings.json +83 -0
- package/dist/data/translations.json +63 -0
- package/dist/deprecations-VBQV7Q4O.js +1 -0
- package/dist/devtools-37DE4MUR.js +1 -0
- package/dist/devtools-WAWU5KQL.js +1 -0
- package/dist/dist-FZLOAKU7.js +1 -0
- package/dist/dist-HTY6UHG5.js +1 -0
- package/dist/environments-HSTNEQRG.js +1 -0
- package/dist/error-2LZYKRMA.js +1 -0
- package/dist/error-handler-PIGEJ7BT.js +1 -0
- package/dist/estree-JV5M77BA.js +44 -0
- package/dist/flow-N4JYPYMQ.js +20 -0
- package/dist/fs-BJHNJDDK.js +1 -0
- package/dist/glimmer-JEV3BXHR.js +37 -0
- package/dist/graphql-DTF6MHYF.js +28 -0
- package/dist/hooks/did-you-mean.d.ts +1 -0
- package/dist/hooks/did-you-mean.js +1 -0
- package/dist/hooks/hydrogen-init.d.ts +7 -0
- package/dist/hooks/hydrogen-init.js +1 -0
- package/dist/hooks/plugin-plugins.d.ts +1 -0
- package/dist/hooks/plugin-plugins.js +1 -0
- package/dist/hooks/postrun.d.ts +1 -0
- package/dist/hooks/postrun.js +1 -0
- package/dist/hooks/prerun.d.ts +1 -0
- package/dist/hooks/prerun.js +2 -0
- package/dist/hooks/public-metadata.d.ts +1 -0
- package/dist/hooks/public-metadata.js +1 -0
- package/dist/hooks/sensitive-metadata.d.ts +1 -0
- package/dist/hooks/sensitive-metadata.js +1 -0
- package/dist/hooks/tunnel-provider.d.ts +1 -0
- package/dist/hooks/tunnel-provider.js +1 -0
- package/dist/hooks/tunnel-start.d.ts +1 -0
- package/dist/hooks/tunnel-start.js +1 -0
- package/dist/html-LVOJ3RQS.js +25 -0
- package/dist/http-proxy-node16-A6AKKRQH.js +38 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +120 -0
- package/dist/is-global-6SCOAJVG.js +1 -0
- package/dist/latest-version-LDWU5F7A.js +49 -0
- package/dist/lib-2BR2WN7L.js +1 -0
- package/dist/lib-M72BVWQ3.js +1 -0
- package/dist/lib-O5EZ4NVT.js +1 -0
- package/dist/lib-P3APEIHY.js +1 -0
- package/dist/local-PZWPRFU7.js +1 -0
- package/dist/markdown-J6CE6POI.js +62 -0
- package/dist/meriyah-PNQQZQYI.js +5 -0
- package/dist/metadata-VVBHB3HL.js +1 -0
- package/dist/morph-BMYYMQNX.js +30489 -0
- package/dist/multipart-parser-5NSSTW27.js +2 -0
- package/dist/node-package-manager-ETYQN7OM.js +1 -0
- package/dist/notifications-system-652OG5KL.js +1 -0
- package/dist/npa-A4YSCQ5Q.js +1 -0
- package/dist/open-KLSGXBIW.js +1 -0
- package/dist/os-7D6NT4O3.js +1 -0
- package/dist/out-53ABAVL7.js +1 -0
- package/dist/output-74VDGYJD.js +1 -0
- package/dist/path-MBXP7ZIC.js +1 -0
- package/dist/postcss-Q36SHOML.js +61 -0
- package/dist/prettier-EGVCP5CY.js +1 -0
- package/dist/source-map-E7FCCJL7.js +1 -0
- package/dist/system-P5QIJALL.js +1 -0
- package/dist/templates/ui-extensions/html/error.html.liquid +41 -0
- package/dist/templates/ui-extensions/html/post_purchase/index.html.liquid +44 -0
- package/dist/templates/ui-extensions/html/post_purchase/tunnel-error.html.liquid +41 -0
- package/dist/templates/ui-extensions/html/tunnel-error.html.liquid +55 -0
- package/dist/toml_patch_bg.wasm +0 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/typescript-5R4Y7PXE.js +1 -0
- package/dist/typescript-WYPDGPSV.js +21 -0
- package/dist/ui-H5I5YVKV.js +1 -0
- package/dist/upgrade-34HSYBXI.js +1 -0
- package/dist/vendor/esbuild-ohos/lib/main.js +2538 -0
- package/dist/vendor/esbuild-ohos/package.json +7 -0
- package/dist/version-EKXEAF6Q.js +1 -0
- package/dist/version-J2PYO6M5.js +1 -0
- package/dist/workerd-X4TGHEG3.js +18 -0
- package/dist/yaml-6KWCJ64X.js +159 -0
- package/dist/yoga.wasm +0 -0
- package/oclif.manifest.json +10100 -0
- package/package.json +153 -0
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
import{a as g0,b as _0}from"./chunk-A6BMJISP.js";import{b as m0,o as AB}from"./chunk-YLQ3LNNY.js";import{a as bB}from"./chunk-VJEKDBGZ.js";import{a as h0}from"./chunk-TUVDJ3PG.js";import{A as N0,D as M0,E as qc,c as f0,h as p0,i as d0,j as D0,k as hi,l as _s,m as C0,n as w0,o as b0,p as kc,q as Vo,r as A0,s as S0,t as x0,u as P0,v as B0,w as I0,y as R0,z as Pd}from"./chunk-N75VOJHO.js";import{a as l0}from"./chunk-KWVOJWO7.js";import{b as gs,c as Ct}from"./chunk-CEYIZC3M.js";import{A as di,B as Di,C as no,E as Uc,I as O0,J as T0,a as bd,b as jr,c as Wo,g as Mc,i as jc,j as Ad,k as Sd,m as $c,n as y0,o as pi,p as F0,q as xd,r as E0,s as Ge,t as Ho,u as zo,v as v0,w as pn,x as Lc,y as gr,z as Te}from"./chunk-XOCB4KNX.js";import{aa as wB}from"./chunk-F3NYCSXT.js";import{a as zy,b as Vy}from"./chunk-6RQOEPEC.js";import{a as c0}from"./chunk-U53OLUOE.js";import{a as mr}from"./chunk-NROVZETL.js";import{$ as EB,D as Ry,M as jy,N as $y,P as Fd,S as Ly,Y as yB,Z as Uy,_ as FB,aa as ky,b as ds,ba as vB,ca as fn,d as Sc,da as Pc,e as xc,fa as qy,ga as vt,i as Oy,ia as Ds,ja as Wy,k as gB,n as li,na as Hy,r as Ty,t as By,v as E,x as Iy}from"./chunk-3JXPOOFV.js";import{m as Oc,n as Gy,s as Jy,t as Yy,w as Tc,x as Bc}from"./chunk-Y5PRPHLQ.js";import{A as Ic,B as Zy,D as Qy,E as Nr,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-YFINLODF.js";import{a as CB}from"./chunk-5HBIIYSK.js";import{a as hd}from"./chunk-VASGXHYA.js";import{d as _B,e as Ny,q as My}from"./chunk-YZMY2CTU.js";import{f as Ed}from"./chunk-NHAUJWEG.js";import{a as Bn,b as to}from"./chunk-XF2KTEID.js";import{h as k,j as In,k as Mr}from"./chunk-BWJIZYAG.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 hB,R as mB,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 aB,bb as bc,c as cB,da as Ey,db as Ac,ea as qo,f as lB,gb as Ky,ha as vy,i as fB,k as pB,ka as fs,m as gy,ma as $e,n as _y,na as eo,oa as ps,pa as Ir,q as dB,qa as vc,qb as Ae,rb as Nc,sb as Se,u as yy,ua as mt,v as DB,va as Cy,w as gd,wa as Rr,xb as o0,zb as u0}from"./chunk-VFM2KQRM.js";import{b as uB,c as sB,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-R6ICQT2D.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 N,e as ai,f as oB,g as d}from"./chunk-VKWPEFWQ.js";var uF=N((Hc,oF)=>{d();(function(e,t){typeof Hc=="object"&&typeof oF<"u"?t(Hc,(mB(),oB(hB)),gB()):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 J=new Set,Q=[];return q.definitions.forEach(function(fe){if(fe.kind==="FragmentDefinition"){var ye=fe.name.value,We=p(fe.loc),gt=o.get(ye);gt&&!gt.has(We)?s&&console.warn("Warning: fragment with name "+ye+` already exists.
|
|
2
|
+
graphql-tag enforces all fragment names across your application to be unique; read more about
|
|
3
|
+
this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):gt||o.set(ye,gt=new Set),gt.add(We),J.has(We)||(J.add(We),Q.push(fe))}else Q.push(fe)}),t.__assign(t.__assign({},q),{definitions:Q})}function g(q){var J=new Set(q.definitions);J.forEach(function(fe){fe.loc&&delete fe.loc,Object.keys(fe).forEach(function(ye){var We=fe[ye];We&&typeof We=="object"&&J.add(We)})});var Q=q.loc;return Q&&(delete Q.startToken,delete Q.endToken),q}function F(q){var J=l(q);if(!n.has(J)){var Q=r.parse(q,{experimentalFragmentVariables:a,allowLegacyFragmentVariables:a,experimentalFragmentArguments:a});if(!Q||Q.kind!=="Document")throw new Error("Not a valid GraphQL document.");n.set(J,g(m(Q)))}return n.get(J)}function w(q){for(var J=[],Q=1;Q<arguments.length;Q++)J[Q-1]=arguments[Q];typeof q=="string"&&(q=[q]);var fe=q[0];return J.forEach(function(ye,We){ye&&ye.kind==="Document"?fe+=ye.loc.source.body:fe+=ye,fe+=q[We+1]}),F(fe)}function v(){n.clear(),o.clear()}function S(){s=!1}function O(){a=!0}function P(){a=!1}var B={gql:w,resetCaches:v,disableFragmentWarnings:S,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=S,e.enableExperimentalFragmentVariables=O,e.gql=w,e.resetCaches=v,Object.defineProperty(e,"__esModule",{value:!0})}))});var aF=N((UH,sF)=>{d();sF.exports=uF().gql});var mF=N(hF=>{d();var VB=Object.create,zc=Object.defineProperty,KB=Object.getPrototypeOf,GB=Object.prototype.hasOwnProperty,JB=Object.getOwnPropertyNames,YB=Object.getOwnPropertyDescriptor,lF=e=>zc(e,"__esModule",{value:!0}),XB=(e,t)=>{lF(e);for(var r in t)zc(e,r,{get:t[r],enumerable:!0})},ZB=(e,t,r)=>{if(lF(e),t&&typeof t=="object"||typeof t=="function")for(let n of JB(t))!GB.call(e,n)&&n!=="default"&&zc(e,n,{get:()=>t[n],enumerable:!(r=YB(t,n))||r.enumerable});return e},Vc=e=>e&&e.__esModule?e:ZB(zc(e!=null?VB(KB(e)):{},"default",{value:e,enumerable:!0}),e);XB(hF,{default:()=>sI,generateContentsFromGraphqlString:()=>DF,generateGraphQLString:()=>pF});var QB=Vc(ze("fs")),eI=Vc(aF()),tI=Vc(ze("readline")),cF=Vc(ze("path")),fF=(e,t)=>{let r=t?t(e):e;return JSON.stringify(r,(n,o)=>o===void 0?"__undefined":o).replace(/"__undefined"/g,"undefined")},rI=(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},nI=e=>new Promise(t=>{let r=tI.default.createInterface({input:QB.default.createReadStream(e)}),n="",o=[],s=!1,a=(l,p)=>{let m=p.replace(l,""),g=m.replace(/"|'/g,""),F=cF.default.join(cF.default.dirname(e),g);o.push({absolutePath:F,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})})}),pF=e=>{let t={},r=[],n=new Set,o=s=>t[s]?Promise.resolve(null):new Promise(a=>{nI(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(()=>rI(Object.values(t),t).reduce((l,p)=>p.body+`
|
|
6
|
+
|
|
7
|
+
`+l,""))},iI=(e,t,r)=>{let n={kind:"Document",definitions:[e,...t]};return fF(n,r)},oI=e=>((r,n)=>(r.forEach(o=>{o.kind==="FragmentDefinition"&&(n[o.name.value]=o)}),n))(e.definitions,{}),dF=(e,t)=>{let r=[],n=o=>{if(o.kind==="FragmentSpread"){let s=t[o.name.value],a=dF(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},DF=(e,t)=>{let r=eI.default(e),n=fF(r,t),o=oI(r),s=r.definitions.reduce((a,l)=>{if(l.kind==="OperationDefinition"&&l.name&&l.name.value){let p=l.name.value,g=dF(l,o).map(w=>{let v=o[w];if(!v)throw new Error(`Expected to find fragment definition for ${w}`);return v}),F=iI(l,g,t);a.push(`export const ${p} = ${F};`)}return a},[`const documentNode = ${n};`]);return s.push("export default documentNode;"),s.join(`
|
|
8
|
+
`)},uI=(e={})=>({name:"graphql-loader",setup(t){t.onLoad({filter:e.filterRegex||/\.graphql$|\.gql$/},r=>pF(r.path).then(n=>({contents:DF(n,e.mapDocumentNode)})))}}),sI=uI});var EF=N((az,FF)=>{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))}FF.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 vF=N(oo=>{d();var hI=EF();oo.operation=function(e){var t=oo.timeouts(e);return new hI(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),F=g.pop();g.push(function(w){m.retry(w)||(w&&(arguments[0]=m.mainError()),F.apply(this,arguments))}),m.attempt(function(){p.apply(e,g)})}.bind(e,a),e[s].options=t}}});var wF=N((pz,CF)=>{d();CF.exports=vF()});var AF=N((Dz,Ud)=>{"use strict";d();var bF=Symbol();function mI(e,t,r){let n=t[bF];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,bF,{value:p}),r(null,l.mtime,p)})})}function gI(e){let t=Date.now();return e==="s"&&(t=Math.ceil(t/1e3)*1e3),new Date(t)}Ud.exports.probe=mI;Ud.exports.getMtime=gI});var TF=N((mz,bs)=>{"use strict";d();var _I=ze("path"),Wd=vy(),yI=wF(),FI=CB(),SF=AF(),Nn={};function ws(e,t){return t.lockfilePath||`${e}.lock`}function Hd(e,t,r){if(!t.realpath)return r(null,_I.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 SF.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(!xF(a,t))return r(Object.assign(new Error("Lock file is already being held"),{code:"ELOCKED",file:e}));PF(e,t,l=>{if(l)return r(l);qd(e,{...t,stale:0},r)})})})}function xF(e,t){return e.mtime.getTime()<Date.now()-t.stale}function PF(e,t,r){t.fs.rmdir(ws(e,t),n=>{if(n&&n.code!=="ENOENT")return r(n);r()})}function Gc(e,t){let r=Nn[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,Gc(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=SF.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,Gc(e,t));r.mtime=l,r.lastUpdate=Date.now(),r.updateDelay=null,Gc(e,t)}})})},r.updateDelay),r.updateTimeout.unref&&r.updateTimeout.unref())}function kd(e,t,r){t.released=!0,t.updateTimeout&&clearTimeout(t.updateTimeout),Nn[e]===t&&delete Nn[e],t.options.onCompromised(r)}function EI(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=yI.operation(t.retries);s.attempt(()=>{qd(o,t,(a,l,p)=>{if(s.retry(a))return;if(a)return r(s.mainError());let m=Nn[o]={lockfilePath:ws(o,t),mtime:l,mtimePrecision:p,options:t,lastUpdate:Date.now()};Gc(o,t),r(null,g=>{if(m.released)return g&&g(Object.assign(new Error("Lock is already released"),{code:"ERELEASED"}));OF(o,{...t,realpath:!1},g)})})})})}function OF(e,t,r){t={fs:Wd,realpath:!0,...t},Hd(e,t,(n,o)=>{if(n)return r(n);let s=Nn[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 Nn[o],PF(o,t,r)})}function vI(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,!xF(a,t)))})}function CI(){return Nn}FI(()=>{for(let e in Nn){let t=Nn[e].options;try{t.fs.rmdirSync(ws(e,t))}catch{}}});bs.exports.lock=EI;bs.exports.unlock=OF;bs.exports.check=vI;bs.exports.getLocks=CI});var IF=N((_z,BF)=>{"use strict";d();var wI=vy();function bI(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 AI(e){return(...t)=>new Promise((r,n)=>{t.push((o,s)=>{o?n(o):r(s)}),e(...t)})}function SI(e){return(...t)=>{let r,n;if(t.push((o,s)=>{r=o,n=s}),e(...t),r)throw r;return n}}function xI(e){if(e={...e},e.fs=bI(e.fs||wI),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}BF.exports={toPromise:AI,toSync:SI,toSyncOptions:xI}});var NF=N((Fz,mi)=>{"use strict";d();var Ko=TF(),{toPromise:Jc,toSync:Yc,toSyncOptions:zd}=IF();async function RF(e,t){let r=await Jc(Ko.lock)(e,t);return Jc(r)}function PI(e,t){let r=Yc(Ko.lock)(e,zd(t));return Yc(r)}function OI(e,t){return Jc(Ko.unlock)(e,t)}function TI(e,t){return Yc(Ko.unlock)(e,zd(t))}function BI(e,t){return Jc(Ko.check)(e,t)}function II(e,t){return Yc(Ko.check)(e,zd(t))}mi.exports=RF;mi.exports.lock=RF;mi.exports.unlock=OI;mi.exports.lockSync=PI;mi.exports.unlockSync=TI;mi.exports.check=BI;mi.exports.checkSync=II});var Mn=N((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,F=4,w=1,v=2,S=1,O=2,P=4,B=8,U=16,q=32,J=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",S],["bindKey",O],["curry",B],["curryRight",U],["flip",ye],["partial",q],["partialRight",J],["rearg",fe]],Gn="[object Arguments]",Jn="[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]",Ni="[object RegExp]",Vt="[object Set]",Mi="[object String]",St="[object Symbol]",Fa="[object Undefined]",ji="[object WeakMap]",Nf="[object WeakSet]",nn="[object ArrayBuffer]",Kt="[object DataView]",Tu="[object Float32Array]",Bu="[object Float64Array]",Iu="[object Int8Array]",Ru="[object Int16Array]",$i="[object Int32Array]",Nu="[object Uint8Array]",Mu="[object Uint8ClampedArray]",So="[object Uint16Array]",ju="[object Uint32Array]",Mf=/\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=/,? & /,Gf=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Jf=/[()=,{}\[\]\/\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",Gt="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+Gt+"]",ie="\\ud83c[\\udffb-\\udfff]",K="(?:"+Po+"|"+ie+")",Y="[^"+Ui+"]",ge="(?:\\ud83c[\\udde6-\\uddff]){2}",ke="[\\ud800-\\udbff][\\udc00-\\udfff]",Ce="["+Gt+"]",rt="\\u200d",Be="(?:"+W+"|"+z+")",on="(?:"+Ce+"|"+z+")",st="(?:"+Hu+"(?:d|ll|m|re|s|t|ve))?",Ne="(?:"+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+"+"+Ne+"(?="+[Ta,Ce+Be,"$"].join("|")+")",Ce+"?"+Be+"+"+st,Ce+"+"+Ne,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[Nu]=xe[Mu]=xe[So]=xe[ju]=!0,xe[Gn]=xe[Jn]=xe[nn]=xe[En]=xe[Kt]=xe[Bi]=xe[Ii]=xe[Ao]=xe[zt]=xe[Yn]=xe[xr]=xe[Ni]=xe[Vt]=xe[Mi]=xe[ji]=!1;var Pe={};Pe[Gn]=Pe[Jn]=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[Ni]=Pe[Vt]=Pe[Mi]=Pe[St]=Pe[Nu]=Pe[Mu]=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={"&":"&","<":"<",">":">",""":'"',"'":"'"},wS={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},bS=parseFloat,AS=parseInt,ig=typeof global=="object"&&global&&global.Object===Object&&global,SS=typeof self=="object"&&self&&self.Object===Object&&self,ct=ig||SS||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 Jt(A,M,T){switch(T.length){case 0:return A.call(M);case 1:return A.call(M,T[0]);case 2:return A.call(M,T[0],T[1]);case 3:return A.call(M,T[0],T[1],T[2])}return A.apply(M,T)}function xS(A,M,T,V){for(var se=-1,ve=A==null?0:A.length;++se<ve;){var nt=A[se];M(V,nt,T(nt),A)}return V}function cr(A,M){for(var T=-1,V=A==null?0:A.length;++T<V&&M(A[T],T,A)!==!1;);return A}function PS(A,M){for(var T=A==null?0:A.length;T--&&M(A[T],T,A)!==!1;);return A}function pg(A,M){for(var T=-1,V=A==null?0:A.length;++T<V;)if(!M(A[T],T,A))return!1;return!0}function Zn(A,M){for(var T=-1,V=A==null?0:A.length,se=0,ve=[];++T<V;){var nt=A[T];M(nt,T,A)&&(ve[se++]=nt)}return ve}function Ra(A,M){var T=A==null?0:A.length;return!!T&&Oo(A,M,0)>-1}function pp(A,M,T){for(var V=-1,se=A==null?0:A.length;++V<se;)if(T(M,A[V]))return!0;return!1}function qe(A,M){for(var T=-1,V=A==null?0:A.length,se=Array(V);++T<V;)se[T]=M(A[T],T,A);return se}function Qn(A,M){for(var T=-1,V=M.length,se=A.length;++T<V;)A[se+T]=M[T];return A}function dp(A,M,T,V){var se=-1,ve=A==null?0:A.length;for(V&&ve&&(T=A[++se]);++se<ve;)T=M(T,A[se],se,A);return T}function OS(A,M,T,V){var se=A==null?0:A.length;for(V&&se&&(T=A[--se]);se--;)T=M(T,A[se],se,A);return T}function Dp(A,M){for(var T=-1,V=A==null?0:A.length;++T<V;)if(M(A[T],T,A))return!0;return!1}var TS=hp("length");function BS(A){return A.split("")}function IS(A){return A.match(Gf)||[]}function dg(A,M,T){var V;return T(A,function(se,ve,nt){if(M(se,ve,nt))return V=ve,!1}),V}function Na(A,M,T,V){for(var se=A.length,ve=T+(V?1:-1);V?ve--:++ve<se;)if(M(A[ve],ve,A))return ve;return-1}function Oo(A,M,T){return M===M?zS(A,M,T):Na(A,Dg,T)}function RS(A,M,T,V){for(var se=T-1,ve=A.length;++se<ve;)if(V(A[se],M))return se;return-1}function Dg(A){return A!==A}function hg(A,M){var T=A==null?0:A.length;return T?gp(A,M)/T:wo}function hp(A){return function(M){return M==null?e:M[A]}}function mp(A){return function(M){return A==null?e:A[M]}}function mg(A,M,T,V,se){return se(A,function(ve,nt,Ie){T=V?(V=!1,ve):M(T,ve,nt,Ie)}),T}function NS(A,M){var T=A.length;for(A.sort(M);T--;)A[T]=A[T].value;return A}function gp(A,M){for(var T,V=-1,se=A.length;++V<se;){var ve=M(A[V]);ve!==e&&(T=T===e?ve:T+ve)}return T}function _p(A,M){for(var T=-1,V=Array(A);++T<A;)V[T]=M(T);return V}function MS(A,M){return qe(M,function(T){return[T,A[T]]})}function gg(A){return A&&A.slice(0,Eg(A)+1).replace(ku,"")}function Yt(A){return function(M){return A(M)}}function yp(A,M){return qe(M,function(T){return A[T]})}function Gu(A,M){return A.has(M)}function _g(A,M){for(var T=-1,V=A.length;++T<V&&Oo(M,A[T],0)>-1;);return T}function yg(A,M){for(var T=A.length;T--&&Oo(M,A[T],0)>-1;);return T}function jS(A,M){for(var T=A.length,V=0;T--;)A[T]===M&&++V;return V}var $S=mp(ap),LS=mp(ng);function US(A){return"\\"+wS[A]}function kS(A,M){return A==null?e:A[M]}function To(A){return un.test(A)}function qS(A){return Vu.test(A)}function WS(A){for(var M,T=[];!(M=A.next()).done;)T.push(M.value);return T}function Fp(A){var M=-1,T=Array(A.size);return A.forEach(function(V,se){T[++M]=[se,V]}),T}function Fg(A,M){return function(T){return A(M(T))}}function ei(A,M){for(var T=-1,V=A.length,se=0,ve=[];++T<V;){var nt=A[T];(nt===M||nt===p)&&(A[T]=p,ve[se++]=T)}return ve}function Ma(A){var M=-1,T=Array(A.size);return A.forEach(function(V){T[++M]=V}),T}function HS(A){var M=-1,T=Array(A.size);return A.forEach(function(V){T[++M]=[V,V]}),T}function zS(A,M,T){for(var V=T-1,se=A.length;++V<se;)if(A[V]===M)return V;return-1}function VS(A,M,T){for(var V=T+1;V--;)if(A[V]===M)return V;return V}function Bo(A){return To(A)?GS(A):TS(A)}function Pr(A){return To(A)?JS(A):BS(A)}function Eg(A){for(var M=A.length;M--&&Hf.test(A.charAt(M)););return M}var KS=mp(cp);function GS(A){for(var M=sr.lastIndex=0;sr.test(A);)++M;return M}function JS(A){return A.match(sr)||[]}function YS(A){return A.match(qi)||[]}var XS=(function A(M){M=M==null?ct:ti.defaults(ct.Object(),M,ti.pick(ct,Ku));var T=M.Array,V=M.Date,se=M.Error,ve=M.Function,nt=M.Math,Ie=M.Object,Ep=M.RegExp,ZS=M.String,lr=M.TypeError,ja=T.prototype,QS=ve.prototype,Io=Ie.prototype,$a=M["__core-js_shared__"],La=QS.toString,we=Io.hasOwnProperty,ex=0,vg=(function(){var i=/[^.]+$/.exec($a&&$a.keys&&$a.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""})(),Ua=Io.toString,tx=La.call(Ie),rx=ct._,nx=Ep("^"+La.call(we).replace(Uu,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ka=og?M.Buffer:e,ri=M.Symbol,qa=M.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,Ju=ri?ri.iterator:e,Hi=ri?ri.toStringTag:e,za=(function(){try{var i=Ji(Ie,"defineProperty");return i({},"",{}),i}catch{}})(),ix=M.clearTimeout!==ct.clearTimeout&&M.clearTimeout,ox=V&&V.now!==ct.Date.now&&V.now,ux=M.setTimeout!==ct.setTimeout&&M.setTimeout,Va=nt.ceil,Ka=nt.floor,vp=Ie.getOwnPropertySymbols,sx=ka?ka.isBuffer:e,Sg=M.isFinite,ax=ja.join,cx=Fg(Ie.keys,Ie),it=nt.max,Ft=nt.min,lx=V.now,fx=M.parseInt,xg=nt.random,px=ja.reverse,Cp=Ji(M,"DataView"),Yu=Ji(M,"Map"),wp=Ji(M,"Promise"),Ro=Ji(M,"Set"),Xu=Ji(M,"WeakMap"),Zu=Ji(Ie,"create"),Ga=Xu&&new Xu,No={},dx=Yi(Cp),Dx=Yi(Yu),hx=Yi(wp),mx=Yi(Ro),gx=Yi(Xu),Ja=ri?ri.prototype:e,Qu=Ja?Ja.valueOf:e,Pg=Ja?Ja.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 Mo=(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=Mo(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 _x(){var i=new me(this.__wrapped__);return i.__actions__=Nt(this.__actions__),i.__dir__=this.__dir__,i.__filtered__=this.__filtered__,i.__iteratees__=Nt(this.__iteratees__),i.__takeCount__=this.__takeCount__,i.__views__=Nt(this.__views__),i}function yx(){if(this.__filtered__){var i=new me(this);i.__dir__=-1,i.__filtered__=!0}else i=this.clone(),i.__dir__*=-1;return i}function Fx(){var i=this.__wrapped__.value(),u=this.__dir__,c=ae(i),f=u<0,h=c?i.length:0,y=BP(0,h,this.__views__),C=y.start,b=y.end,x=b-C,j=f?b:C-1,$=this.__iteratees__,L=$.length,H=0,G=Ft(x,this.__takeCount__);if(!c||!f&&h==x&&G==x)return Qg(i,this.__actions__);var te=[];e:for(;x--&&H<G;){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=Mo(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 Ex(){this.__data__=Zu?Zu(null):{},this.size=0}function vx(i){var u=this.has(i)&&delete this.__data__[i];return this.size-=u?1:0,u}function Cx(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 wx(i){var u=this.__data__;return Zu?u[i]!==e:we.call(u,i)}function bx(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=Ex,zi.prototype.delete=vx,zi.prototype.get=Cx,zi.prototype.has=wx,zi.prototype.set=bx;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 Ax(){this.__data__=[],this.size=0}function Sx(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 xx(i){var u=this.__data__,c=Xa(u,i);return c<0?e:u[c][1]}function Px(i){return Xa(this.__data__,i)>-1}function Ox(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=Ax,Cn.prototype.delete=Sx,Cn.prototype.get=xx,Cn.prototype.has=Px,Cn.prototype.set=Ox;function wn(i){var u=-1,c=i==null?0:i.length;for(this.clear();++u<c;){var f=i[u];this.set(f[0],f[1])}}function Tx(){this.size=0,this.__data__={hash:new zi,map:new(Yu||Cn),string:new zi}}function Bx(i){var u=cc(this,i).delete(i);return this.size-=u?1:0,u}function Ix(i){return cc(this,i).get(i)}function Rx(i){return cc(this,i).has(i)}function Nx(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=Tx,wn.prototype.delete=Bx,wn.prototype.get=Ix,wn.prototype.has=Rx,wn.prototype.set=Nx;function Vi(i){var u=-1,c=i==null?0:i.length;for(this.__data__=new wn;++u<c;)this.add(i[u])}function Mx(i){return this.__data__.set(i,a),this}function jx(i){return this.__data__.has(i)}Vi.prototype.add=Vi.prototype.push=Mx,Vi.prototype.has=jx;function Or(i){var u=this.__data__=new Cn(i);this.size=u.size}function $x(){this.__data__=new Cn,this.size=0}function Lx(i){var u=this.__data__,c=u.delete(i);return this.size=u.size,c}function Ux(i){return this.__data__.get(i)}function kx(i){return this.__data__.has(i)}function qx(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=$x,Or.prototype.delete=Lx,Or.prototype.get=Ux,Or.prototype.has=kx,Or.prototype.set=qx;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,ZS):[],x=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,x)))&&b.push(j);return b}function Tg(i){var u=i.length;return u?i[Np(0,u-1)]:e}function Wx(i,u){return lc(Nt(i),Ki(u,0,i.length))}function Hx(i){return lc(Nt(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 zx(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 Vx(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,x=u&g,j=u&F;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=RP(i),!b)return Nt(i,C)}else{var L=Et(i),H=L==Ao||L==_a;if(si(i))return r_(i,b);if(L==xr||L==Gn||H&&!h){if(C=x||H?{}:E_(i),!b)return x?CP(i,Vx(C,i)):vP(i,Bg(C,i))}else{if(!Pe[L])return h?i:{};C=NP(i,L,b)}}y||(y=new Or);var G=y.get(i);if(G)return G;y.set(i,C),Y_(i)?i.forEach(function(re){C.add(pr(re,u,c,re,i,y))}):G_(i)&&i.forEach(function(re,De){C.set(De,pr(re,u,c,De,i,y))});var te=j?x?Vp:zp:x?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 Kx(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,x=[],j=u.length;if(!b)return x;c&&(u=qe(u,Yt(c))),f?(y=pp,C=!1):u.length>=r&&(y=Gu,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;x.push($)}else y(u,L,f)||x.push($)}return x}var ni=s_(sn),Ng=s_(xp,!0);function Gx(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,x=y}return x}function Jx(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 Mg(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=jP),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 Gi(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)?TP(i):HP(i)}function Pp(i,u){return i>u}function Yx(i,u){return i!=null&&we.call(i,u)}function Xx(i,u){return i!=null&&u in Ie(i)}function Zx(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),x=1/0,j=[];C--;){var $=i[C];C&&u&&($=qe($,Yt(u))),x=Ft($.length,x),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<x;){var G=$[L],te=u?u(G):G;if(G=c||G!==0?G:0,!(H?Gu(H,te):f(j,te,c))){for(C=y;--C;){var pe=b[C];if(!(pe?Gu(pe,te):f(i[C],te,c)))continue e}H&&H.push(te),j.push(G)}}return j}function Qx(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:Jt(f,i,c)}function Lg(i){return Ke(i)&&Pt(i)==Gn}function eP(i){return Ke(i)&&Pt(i)==nn}function tP(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:rP(i,u,c,f,ns,h)}function rP(i,u,c,f,h,y){var C=ae(i),b=ae(u),x=C?Jn:Et(i),j=b?Jn:Et(u);x=x==Gn?xr:x,j=j==Gn?xr:j;var $=x==xr,L=j==xr,H=x==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):PP(i,u,x,c,f,h,y);if(!(c&w)){var G=$&&we.call(i,"__wrapped__"),te=L&&we.call(u,"__wrapped__");if(G||te){var pe=G?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),OP(i,u,c,f,h,y)):!1}function nP(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 x=b[0],j=i[x],$=b[1];if(C&&b[2]){if(j===e&&!(x in i))return!1}else{var L=new Or;if(f)var H=f(j,$,x,i,u,L);if(!(H===e?ns($,j,w|v,f,L):H))return!1}}return!0}function Ug(i){if(!He(i)||LP(i))return!1;var u=Pn(i)?nx:ep;return u.test(Yi(i))}function iP(i){return Ke(i)&&Pt(i)==Ni}function oP(i){return Ke(i)&&Et(i)==Vt}function uP(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 cx(i);var u=[];for(var c in Ie(i))we.call(i,c)&&c!="constructor"&&u.push(c);return u}function sP(i){if(!He(i))return WP(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=Mt(i)?T(i.length):[];return ni(i,function(h,y,C){f[++c]=u(h,y,C)}),f}function Wg(i){var u=Gp(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))aP(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 aP(i,u,c,f,h,y,C){var b=Zp(i,c),x=Zp(u,c),j=C.get(x);if(j){bp(i,c,j);return}var $=y?y(b,x,c+"",i,u,C):e,L=$===e;if(L){var H=ae(x),G=!H&&si(x),te=!H&&!G&&Uo(x);$=x,H||G||te?ae(b)?$=b:Xe(b)?$=Nt(b):G?(L=!1,$=r_(x,!0)):te?(L=!1,$=n_(x,!0)):$=[]:as(x)||Xi(x)?($=b,Xi(b)?$=Q_(b):(!He(b)||Pn(b))&&($=E_(x))):L=!1}L&&(C.set(x,$),h($,x,f,y,C),C.delete(x)),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 Gi(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 x=qe(u,function(j){return j(y)});return{criteria:x,index:++f,value:y}});return NS(h,function(y,C){return EP(y,C,c)})}function cP(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=Gi(i,C);c(b,C)&&is(y,oi(C,i),b)}return y}function lP(i){return function(u){return Gi(u,i)}}function Rp(i,u,c,f){var h=f?RS:Oo,y=-1,C=u.length,b=i;for(i===u&&(u=Nt(u)),c&&(b=qe(i,Yt(c)));++y<C;)for(var x=0,j=u[y],$=c?c(j):j;(x=h(b,$,x,f))>-1;)b!==i&&Ha.call(b,x,1),Ha.call(i,x,1);return i}function Gg(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 Np(i,u){return i+Ka(xg()*(u-i+1))}function fP(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 Mp(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 pP(i){return Tg(ko(i))}function dP(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 x=cn(u[h]),j=c;if(x==="__proto__"||x==="constructor"||x==="prototype")return i;if(h!=C){var $=b[x];j=f?f($,x,b):e,j===e&&(j=He($)?$:xn(u[h+1])?[]:{})}es(b,x,j),b=b[x]}return i}var Jg=Ga?function(i,u){return Ga.set(i,u),i}:$t,DP=za?function(i,u){return za(i,"toString",{configurable:!0,enumerable:!1,value:cd(u),writable:!0})}:$t;function hP(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 mP(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,x=Zt(u),j=u===e;h<y;){var $=Ka((h+y)/2),L=c(i[$]),H=L!==e,G=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||!G):x?re=te&&H&&!G&&(f||!pe):G||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,x)){var x=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=[],x=b;if(c)C=!1,h=pp;else if(y>=r){var j=u?null:SP(i);if(j)return Ma(j);C=!1,h=Gu,x=new Vi}else x=u?[]:b;e:for(;++f<y;){var $=i[f],L=u?u($):$;if($=c||$!==0?$:0,C&&L===L){for(var H=x.length;H--;)if(x[H]===L)continue e;u&&x.push(L),b.push($)}else h(x,L,c)||(x!==b&&x.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(Gi(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 gP=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_=ix||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 _P(i,u){var c=u?qp(i.buffer):i.buffer;return new i.constructor(c,i.byteOffset,i.byteLength)}function yP(i){var u=new i.constructor(i.source,ba.exec(i));return u.lastIndex=i.lastIndex,u}function FP(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,x=u===u,j=Zt(u);if(!b&&!j&&!y&&i>u||y&&C&&x&&!b&&!j||f&&C&&x||!c&&x||!h)return 1;if(!f&&!y&&!j&&i<u||j&&c&&h&&!f&&!y||b&&c&&h||!C&&h||!x)return-1}return 0}function EP(i,u,c){for(var f=-1,h=i.criteria,y=u.criteria,C=h.length,b=c.length;++f<C;){var x=i_(h[f],y[f]);if(x){if(f>=b)return x;var j=c[f];return x*(j=="desc"?-1:1)}}return i.index-u.index}function o_(i,u,c,f){for(var h=-1,y=i.length,C=c.length,b=-1,x=u.length,j=it(y-C,0),$=T(x+j),L=!f;++b<x;)$[b]=u[b];for(;++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,x=-1,j=u.length,$=it(y-b,0),L=T($+j),H=!f;++h<$;)L[h]=i[h];for(var G=h;++x<j;)L[G+x]=u[x];for(;++C<b;)(H||h<y)&&(L[G+c[C]]=i[h++]);return L}function Nt(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],x=f?f(c[b],i[b],b,c,i):e;x===e&&(x=i[b]),h?bn(c,b,x):es(c,b,x)}return c}function vP(i,u){return an(i,Jp(i),u)}function CP(i,u){return an(i,y_(i),u)}function nc(i,u){return function(c,f){var h=ae(c)?xS:zx,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(!Mt(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 x=C[i?b:++h];if(c(y[x],x,y)===!1)break}return u}}function wP(i,u,c){var f=u&S,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=Mo(i.prototype),f=i.apply(c,u);return He(f)?f:c}}function bP(i,u,c){var f=os(i);function h(){for(var y=arguments.length,C=T(y),b=y,x=Lo(h);b--;)C[b]=arguments[b];var j=y<3&&C[0]!==x&&C[y-1]!==x?[]:ei(C,x);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 Jt($,this,C)}return h}function l_(i){return function(u,c,f){var h=Ie(u);if(!Mt(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),x=b=="wrapper"?Kp(y):e;x&&Xp(x[0])&&x[1]==(Q|B|q|fe)&&!x[4].length&&x[9]==1?C=C[ac(x[0])].apply(C,x[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,x,j){var $=u&Q,L=u&S,H=u&O,G=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(G)var Tt=Lo(re),er=jS(_e,Tt);if(f&&(_e=o_(_e,f,h,G)),y&&(_e=u_(_e,y,C,G)),De-=er,G&&De<j){var Ze=ei(_e,Tt);return D_(i,u,ic,re.placeholder,c,_e,Ze,b,x,j-De)}var Br=L?c:this,Tn=H?Br[i]:i;return De=_e.length,b?_e=zP(_e,b):te&&De>1&&_e.reverse(),$&&x<De&&(_e.length=x),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 Qx(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 Jt(h,f,c)})})})}function uc(i,u){u=u===e?" ":Xt(u);var c=u.length;if(c<2)return c?Mp(u,i):u;var f=Mp(u,Va(i/Bo(u)));return To(u)?ui(Pr(f),0,i).join(""):f.slice(0,i)}function AP(i,u,c,f){var h=u&S,y=os(i);function C(){for(var b=-1,x=arguments.length,j=-1,$=f.length,L=T($+x),H=this&&this!==ct&&this instanceof C?y:i;++j<$;)L[j]=f[j];for(;x--;)L[j++]=arguments[++b];return Jt(H,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),fP(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,x,j){var $=u&B,L=$?C:e,H=$?e:C,G=$?y:e,te=$?e:y;u|=$?q:J,u&=~($?J:q),u&P||(u&=~(S|O));var pe=[i,u,h,G,L,te,H,b,x,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 SP=Ro&&1/Ma(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?HS(u):MS(u,i(u))}}function An(i,u,c,f,h,y,C,b){var x=u&O;if(!x&&typeof i!="function")throw new lr(o);var j=f?f.length:0;if(j||(u&=~(q|J),f=h=e),C=C===e?C:it(le(C),0),b=b===e?b:le(b),j-=h?h.length:0,u&J){var $=f,L=h;f=h=e}var H=x?e:Kp(i),G=[i,u,c,f,h,$,L,y,C,b];if(H&&qP(G,H),i=G[0],u=G[1],c=G[2],f=G[3],h=G[4],b=G[9]=G[9]===e?x?0:i.length:it(G[9]-j,0),!b&&u&(B|U)&&(u&=~(B|U)),!u||u==S)var te=wP(i,u,c);else u==B||u==U?te=bP(i,u,b):(u==q||u==(S|q))&&!h.length?te=AP(i,u,c,f):te=ic.apply(e,G);var pe=H?Jg:A_;return S_(pe(te,G),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 xP(i){return as(i)?e:i}function __(i,u,c,f,h,y){var C=c&w,b=i.length,x=u.length;if(b!=x&&!(C&&x>b))return!1;var j=y.get(i),$=y.get(u);if(j&&$)return j==u&&$==i;var L=-1,H=!0,G=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(G){if(!Dp(u,function(De,_e){if(!Gu(G,_e)&&(te===De||h(te,De,c,f,y)))return G.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 PP(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 Ni:case Mi:return i==u+"";case zt:var b=Fp;case Vt:var x=f&w;if(b||(b=Ma),i.size!=u.size&&!x)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 OP(i,u,c,f,h,y){var C=c&w,b=zp(i),x=b.length,j=zp(u),$=j.length;if(x!=$&&!C)return!1;for(var L=x;L--;){var H=b[L];if(!(C?H in u:we.call(u,H)))return!1}var G=y.get(i),te=y.get(u);if(G&&te)return G==u&&te==i;var pe=!0;y.set(i,u),y.set(u,i);for(var re=C;++L<x;){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,Jp)}function Vp(i){return $g(i,jt,y_)}var Kp=Ga?function(i){return Ga.get(i)}:pd;function ac(i){for(var u=i.name+"",c=No[u],f=we.call(No,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 $P(u)?c[typeof u=="string"?"string":"hash"]:c.map}function Gp(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 Ji(i,u){var c=kS(i,u);return Ug(c)?c:e}function TP(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 Jp=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,Jp(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 dx:return Kt;case Dx:return zt;case hx:return ya;case mx:return Vt;case gx:return ji}return u});function BP(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 IP(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 RP(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)?Mo(Wa(i)):{}}function NP(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 _P(i,c);case Tu:case Bu:case Iu:case Ru:case $i:case Nu:case Mu:case So:case ju:return n_(i,c);case zt:return new f;case Yn:case Mi:return new f(i);case Ni:return yP(i);case Vt:return new f;case St:return FP(i)}}function MP(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 jP(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"?Mt(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 $P(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 LP(i){return!!vg&&vg in i}var UP=$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 kP(i){var u=Dc(i,function(f){return c.size===l&&c.clear(),f}),c=u.cache;return u}function qP(i,u){var c=i[1],f=u[1],h=c|f,y=h<(S|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&S&&(i[2]=u[2],h|=c&S?0:P);var b=u[3];if(b){var x=i[3];i[3]=x?o_(x,b,u[4]):b,i[4]=x?ei(i[3],p):u[4]}return b=u[5],b&&(x=i[5],i[5]=x?u_(x,b,u[6]):b,i[6]=x?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 WP(i){var u=[];if(i!=null)for(var c in Ie(i))u.push(c);return u}function HP(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),Jt(i,this,b)}}function b_(i,u){return u.length<2?i:Gi(i,dr(u,0,-1))}function zP(i,u){for(var c=i.length,f=Ft(u.length,c),h=Nt(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_(Jg),ss=ux||function(i,u){return ct.setTimeout(i,u)},Qp=x_(DP);function S_(i,u,c){var f=u+"";return Qp(i,MP(f,VP(IP(f),c)))}function x_(i){var u=0,c=0;return function(){var f=lx(),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=Np(c,h),C=i[y];i[y]=i[c],i[c]=C}return i.length=u,i}var P_=kP(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 VP(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__=Nt(i.__actions__),u.__index__=i.__index__,u.__values__=i.__values__,u}function KP(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 GP(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 JP(){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)?Nt(c):[c],ht(u,1))}var YP=de(function(i,u){return Xe(i)?ts(i,ht(u,1,Xe,!0)):[]}),XP=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)):[]}),ZP=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 QP(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 eO(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 tO(i,u){return i&&i.length?rc(i,ee(u,3),!0,!0):[]}function rO(i,u){return i&&i.length?rc(i,ee(u,3),!0):[]}function nO(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),Jx(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)),Na(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)),Na(i,ee(u,3),h,!0)}function I_(i){var u=i==null?0:i.length;return u?ht(i,1):[]}function iO(i){var u=i==null?0:i.length;return u?ht(i,yn):[]}function oO(i,u){var c=i==null?0:i.length;return c?(u=u===e?1:le(u),ht(i,u)):[]}function uO(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 sO(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 aO(i){var u=i==null?0:i.length;return u?dr(i,0,-1):[]}var cO=de(function(i){var u=qe(i,Up);return u.length&&u[0]===i[0]?Op(u):[]}),lO=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)):[]}),fO=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 pO(i,u){return i==null?"":ax.call(i,u)}function Dr(i){var u=i==null?0:i.length;return u?i[u-1]:e}function dO(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?VS(i,u,h):Na(i,Dg,h,!0)}function DO(i,u){return i&&i.length?zg(i,le(u)):e}var hO=de(N_);function N_(i,u){return i&&i.length&&u&&u.length?Rp(i,u):i}function mO(i,u,c){return i&&i.length&&u&&u.length?Rp(i,u,ee(c,2)):i}function gO(i,u,c){return i&&i.length&&u&&u.length?Rp(i,u,e,c):i}var _O=Sn(function(i,u){var c=i==null?0:i.length,f=Ap(i,u);return Gg(i,qe(u,function(h){return xn(h,c)?+h:h}).sort(i_)),f});function yO(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 Gg(i,h),c}function ed(i){return i==null?i:px.call(i)}function FO(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 EO(i,u){return tc(i,u)}function vO(i,u,c){return jp(i,u,ee(c,2))}function CO(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 wO(i,u){return tc(i,u,!0)}function bO(i,u,c){return jp(i,u,ee(c,2),!0)}function AO(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 SO(i){return i&&i.length?Yg(i):[]}function xO(i,u){return i&&i.length?Yg(i,ee(u,2)):[]}function PO(i){var u=i==null?0:i.length;return u?dr(i,1,u):[]}function OO(i,u,c){return i&&i.length?(u=c||u===e?1:le(u),dr(i,0,u<0?0:u)):[]}function TO(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 BO(i,u){return i&&i.length?rc(i,ee(u,3),!1,!0):[]}function IO(i,u){return i&&i.length?rc(i,ee(u,3)):[]}var RO=de(function(i){return ii(ht(i,1,Xe,!0))}),NO=de(function(i){var u=Dr(i);return Xe(u)&&(u=e),ii(ht(i,1,Xe,!0),ee(u,2))}),MO=de(function(i){var u=Dr(i);return u=typeof u=="function"?u:e,ii(ht(i,1,Xe,!0),e,u)});function jO(i){return i&&i.length?ii(i):[]}function $O(i,u){return i&&i.length?ii(i,ee(u,2)):[]}function LO(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 M_(i,u){if(!(i&&i.length))return[];var c=td(i);return u==null?c:qe(c,function(f){return Jt(u,e,f)})}var UO=de(function(i,u){return Xe(i)?ts(i,u):[]}),kO=de(function(i){return Lp(Zn(i,Xe))}),qO=de(function(i){var u=Dr(i);return Xe(u)&&(u=e),Lp(Zn(i,Xe),ee(u,2))}),WO=de(function(i){var u=Dr(i);return u=typeof u=="function"?u:e,Lp(Zn(i,Xe),e,u)}),HO=de(td);function zO(i,u){return e_(i||[],u||[],es)}function VO(i,u){return e_(i||[],u||[],is)}var KO=de(function(i){var u=i.length,c=u>1?i[u-1]:e;return c=typeof c=="function"?(i.pop(),c):e,M_(i,c)});function j_(i){var u=_(i);return u.__chain__=!0,u}function GO(i,u){return u(i),i}function fc(i,u){return u(i)}var JO=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 YO(){return j_(this)}function XO(){return new fr(this.value(),this.__chain__)}function ZO(){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 QO(){return this}function eT(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 tT(){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 rT(){return Qg(this.__wrapped__,this.__actions__)}var nT=nc(function(i,u,c){we.call(i,c)?++i[c]:bn(i,c,1)});function iT(i,u,c){var f=ae(i)?pg:Gx;return c&&Ot(i,u,c)&&(u=e),f(i,ee(u,3))}function oT(i,u){var c=ae(i)?Zn:Mg;return c(i,ee(u,3))}var uT=l_(T_),sT=l_(B_);function aT(i,u){return ht(pc(i,u),1)}function cT(i,u){return ht(pc(i,u),yn)}function lT(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)?PS:Ng;return c(i,ee(u,3))}var fT=nc(function(i,u,c){we.call(i,c)?i[c].push(u):bn(i,c,[u])});function pT(i,u,c,f){i=Mt(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 dT=de(function(i,u,c){var f=-1,h=typeof u=="function",y=Mt(i)?T(i.length):[];return ni(i,function(C){y[++f]=h?Jt(u,C,c):rs(C,u,c)}),y}),DT=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 hT(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 mT=nc(function(i,u,c){i[c?0:1].push(u)},function(){return[[],[]]});function gT(i,u,c){var f=ae(i)?dp:mg,h=arguments.length<3;return f(i,ee(u,4),c,h,ni)}function _T(i,u,c){var f=ae(i)?OS:mg,h=arguments.length<3;return f(i,ee(u,4),c,h,Ng)}function yT(i,u){var c=ae(i)?Zn:Mg;return c(i,hc(ee(u,3)))}function FT(i){var u=ae(i)?Tg:pP;return u(i)}function ET(i,u,c){(c?Ot(i,u,c):u===e)?u=1:u=le(u);var f=ae(i)?Wx:dP;return f(i,u)}function vT(i){var u=ae(i)?Hx:hP;return u(i)}function CT(i){if(i==null)return 0;if(Mt(i))return gc(i)?Bo(i):i.length;var u=Et(i);return u==zt||u==Vt?i.size:Bp(i).length}function wT(i,u,c){var f=ae(i)?Dp:mP;return c&&Ot(i,u,c)&&(u=e),f(i,ee(u,3))}var bT=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=ox||function(){return ct.Date.now()};function AT(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=S;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=S|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,x,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 G(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),$?G(Ze):C}function pe(Ze){var Br=Ze-x,Tn=Ze-j,ly=u-Br;return L?Ft(ly,y-Tn):ly}function re(Ze){var Br=Ze-x,Tn=Ze-j;return x===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?G(Ze):(f=h=e,C)}function Qt(){b!==e&&t_(b),j=0,f=x=h=b=e}function Tt(){return b===e?C:_e(dc())}function er(){var Ze=dc(),Br=re(Ze);if(f=arguments,h=this,x=Ze,Br){if(b===e)return te(x);if(L)return t_(b),b=ss(De,u),G(x)}return b===e&&(b=ss(De,u)),C}return er.cancel=Qt,er.flush=Tt,er}var ST=de(function(i,u){return Rg(i,1,u)}),xT=de(function(i,u,c){return Rg(i,hr(u)||0,c)});function PT(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 OT(i){return k_(2,i)}var TT=gP(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 Jt(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,J,e,u,c)}),BT=Sn(function(i,u){return An(i,fe,e,e,e,u)});function IT(i,u){if(typeof i!="function")throw new lr(o);return u=u===e?u:le(u),de(i,u)}function RT(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),Jt(i,this,h)})}function NT(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 MT(i){return U_(i,1)}function jT(i,u){return nd(kp(u),i)}function $T(){if(!arguments.length)return[];var i=arguments[0];return ae(i)?i:[i]}function LT(i){return pr(i,F)}function UT(i,u){return u=typeof u=="function"?u:e,pr(i,F,u)}function kT(i){return pr(i,m|F)}function qT(i,u){return u=typeof u=="function"?u:e,pr(i,m|F,u)}function WT(i,u){return u==null||Ig(i,u,lt(u))}function Tr(i,u){return i===u||i!==i&&u!==u}var HT=sc(Pp),zT=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,VT=ug?Yt(ug):eP;function Mt(i){return i!=null&&mc(i.length)&&!Pn(i)}function Xe(i){return Ke(i)&&Mt(i)}function KT(i){return i===!0||i===!1||Ke(i)&&Pt(i)==En}var si=sx||Dd,GT=sg?Yt(sg):tP;function JT(i){return Ke(i)&&i.nodeType===1&&!as(i)}function YT(i){if(i==null)return!0;if(Mt(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 XT(i,u){return ns(i,u)}function ZT(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 QT(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 G_=ag?Yt(ag):nP;function e3(i,u){return i===u||Tp(i,u,Gp(u))}function t3(i,u,c){return c=typeof c=="function"?c:e,Tp(i,u,Gp(u),c)}function r3(i){return J_(i)&&i!=+i}function n3(i){if(UP(i))throw new se(n);return Ug(i)}function i3(i){return i===null}function o3(i){return i==null}function J_(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)==tx}var od=cg?Yt(cg):iP;function u3(i){return K_(i)&&i>=-rn&&i<=rn}var Y_=lg?Yt(lg):oP;function gc(i){return typeof i=="string"||!ae(i)&&Ke(i)&&Pt(i)==Mi}function Zt(i){return typeof i=="symbol"||Ke(i)&&Pt(i)==St}var Uo=fg?Yt(fg):uP;function s3(i){return i===e}function a3(i){return Ke(i)&&Et(i)==ji}function c3(i){return Ke(i)&&Pt(i)==Nf}var l3=sc(Ip),f3=sc(function(i,u){return i<=u});function X_(i){if(!i)return[];if(Mt(i))return gc(i)?Pr(i):Nt(i);if(Ju&&i[Ju])return WS(i[Ju]());var u=Et(i),c=u==zt?Fp:u==Vt?Ma: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)?AS(i.slice(2),c?2:8):Zf.test(i)?wo:+i}function Q_(i){return an(i,jt(i))}function p3(i){return i?Ki(le(i),-rn,rn):i===0?i:0}function be(i){return i==null?"":Xt(i)}var d3=jo(function(i,u){if(us(u)||Mt(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)}),D3=jo(function(i,u,c,f){an(u,lt(u),i,f)}),h3=Sn(Ap);function m3(i,u){var c=Mo(i);return u==null?c:Bg(c,u)}var g3=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,x=C.length;++b<x;){var j=C[b],$=i[j];($===e||Tr($,Io[j])&&!we.call(i,j))&&(i[j]=y[j])}return i}),_3=de(function(i){return i.push(e,g_),Jt(ty,e,i)});function y3(i,u){return dg(i,ee(u,3),sn)}function F3(i,u){return dg(i,ee(u,3),xp)}function E3(i,u){return i==null?i:Sp(i,ee(u,3),jt)}function v3(i,u){return i==null?i:jg(i,ee(u,3),jt)}function C3(i,u){return i&&sn(i,ee(u,3))}function w3(i,u){return i&&xp(i,ee(u,3))}function b3(i){return i==null?[]:Qa(i,lt(i))}function A3(i){return i==null?[]:Qa(i,jt(i))}function ud(i,u,c){var f=i==null?e:Gi(i,u);return f===e?c:f}function S3(i,u){return i!=null&&F_(i,u,Yx)}function sd(i,u){return i!=null&&F_(i,u,Xx)}var x3=p_(function(i,u,c){u!=null&&typeof u.toString!="function"&&(u=Ua.call(u)),i[u]=c},cd($t)),P3=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),O3=de(rs);function lt(i){return Mt(i)?Og(i):Bp(i)}function jt(i){return Mt(i)?Og(i,!0):sP(i)}function T3(i,u){var c={};return u=ee(u,3),sn(i,function(f,h,y){bn(c,u(f,h,y),f)}),c}function B3(i,u){var c={};return u=ee(u,3),sn(i,function(f,h,y){bn(c,h,u(f,h,y))}),c}var I3=jo(function(i,u,c){ec(i,u,c)}),ty=jo(function(i,u,c,f){ec(i,u,c,f)}),R3=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|F,xP));for(var h=u.length;h--;)$p(c,u[h]);return c});function N3(i,u){return ry(i,hc(ee(u)))}var M3=Sn(function(i,u){return i==null?{}:cP(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 j3(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 $3(i,u,c){return i==null?i:is(i,u,c)}function L3(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 U3(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)?Mo(Wa(i)):{}:c={}}return(h?cr:sn)(i,function(C,b,x){return u(c,C,b,x)}),c}function k3(i,u){return i==null?!0:$p(i,u)}function q3(i,u,c){return i==null?i:Zg(i,u,kp(c))}function W3(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 H3(i){return i==null?[]:yp(i,jt(i))}function z3(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 V3(i,u,c){return u=On(u),c===e?(c=u,u=0):c=On(c),i=hr(i),Zx(i,u,c)}function K3(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+bS("1e-"+((h+"").length-1))),u)}return Np(i,u)}var G3=$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,$S).replace(Xn,"")}function J3(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 Y3(i){return i=be(i),i&&$u.test(i)?i.replace(Ca,LS):i}function X3(i){return i=be(i),i&&Wf.test(i)?i.replace(Uu,"\\$&"):i}var Z3=$o(function(i,u,c){return i+(c?"-":"")+u.toLowerCase()}),Q3=$o(function(i,u,c){return i+(c?" ":"")+u.toLowerCase()}),e8=c_("toLowerCase");function t8(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 r8(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 n8(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 i8(i,u,c){return c||u==null?u=0:u&&(u=+u),fx(be(i).replace(ku,""),u||0)}function o8(i,u,c){return(c?Ot(i,u,c):u===e)?u=1:u=le(u),Mp(be(i),u)}function u8(){var i=arguments,u=be(i[0]);return i.length<3?u:u.replace(i[1],i[2])}var s8=$o(function(i,u,c){return i+(c?"_":"")+u.toLowerCase()});function a8(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 c8=$o(function(i,u,c){return i+(c?" ":"")+ad(u)});function l8(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 f8(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,x,j=0,$=u.interpolate||Li,L="__p += '",H=Ep((u.escape||Li).source+"|"+$.source+"|"+($===Lu?Xf:Li).source+"|"+(u.evaluate||Li).source+"|$","g"),G="//# 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,US),De&&(b=!0,L+=`' +
|
|
12
|
+
__e(`+De+`) +
|
|
13
|
+
'`),Tt&&(x=!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(Jf.test(te))throw new se(s);L=(x?L.replace(Mf,""):L).replace(jf,"$1").replace(Ea,"$1;"),L="function("+(te||"obj")+`) {
|
|
22
|
+
`+(te?"":`obj || (obj = {});
|
|
23
|
+
`)+"var __t, __p = ''"+(b?", __e = _.escape":"")+(x?`, __j = Array.prototype.join;
|
|
24
|
+
function print() { __p += __j.call(arguments, '') }
|
|
25
|
+
`:`;
|
|
26
|
+
`)+L+`return __p
|
|
27
|
+
}`;var pe=ay(function(){return ve(y,G+"return "+L).apply(e,C)});if(pe.source=L,id(pe))throw pe;return pe}function p8(i){return be(i).toLowerCase()}function d8(i){return be(i).toUpperCase()}function D8(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 h8(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 m8(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 g8(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 x=C?ui(C,0,b).join(""):i.slice(0,b);if(h===e)return x+f;if(C&&(b+=x.length-b),od(h)){if(i.slice(b).search(h)){var j,$=x;for(h.global||(h=Ep(h.source,be(ba.exec(h))+"g")),h.lastIndex=0;j=h.exec($);)var L=j.index;x=x.slice(0,L===e?b:L)}}else if(i.indexOf(Xt(h),b)!=b){var H=x.lastIndexOf(h);H>-1&&(x=x.slice(0,H))}return x+f}function _8(i){return i=be(i),i&&$f.test(i)?i.replace(va,KS):i}var y8=$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?qS(i)?YS(i):IS(i):i.match(u)||[]}var ay=de(function(i,u){try{return Jt(i,e,u)}catch(c){return id(c)?c:new se(c)}}),F8=Sn(function(i,u){return cr(u,function(c){c=cn(c),bn(i,c,rd(i[c],i))}),i});function E8(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(Jt(y[0],this,f))return Jt(y[1],this,f)}})}function v8(i){return Kx(pr(i,m))}function cd(i){return function(){return i}}function C8(i,u){return i==null||i!==i?u:i}var w8=f_(),b8=f_(!0);function $t(i){return i}function ld(i){return kg(typeof i=="function"?i:pr(i,m))}function A8(i){return Wg(pr(i,m))}function S8(i,u){return Hg(i,pr(u,m))}var x8=de(function(i,u){return function(c){return rs(c,i,u)}}),P8=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 x=u[b];i[b]=x,C&&(i.prototype[b]=function(){var j=this.__chain__;if(y||j){var $=i(this.__wrapped__),L=$.__actions__=Nt(this.__actions__);return L.push({func:x,args:arguments,thisArg:i}),$.__chain__=j,$}return x.apply(i,Qn([this.value()],arguments))})}),i}function O8(){return ct._===this&&(ct._=rx),this}function pd(){}function T8(i){return i=le(i),de(function(u){return zg(u,i)})}var B8=Wp(qe),I8=Wp(pg),R8=Wp(Dp);function cy(i){return Yp(i)?hp(cn(i)):lP(i)}function N8(i){return function(u){return i==null?e:Gi(i,u)}}var M8=d_(),j8=d_(!0);function dd(){return[]}function Dd(){return!1}function $8(){return{}}function L8(){return""}function U8(){return!0}function k8(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 q8(i){return ae(i)?qe(i,cn):Zt(i)?[i]:Nt(P_(be(i)))}function W8(i){var u=++ex;return be(i)+u}var H8=oc(function(i,u){return i+u},0),z8=Hp("ceil"),V8=oc(function(i,u){return i/u},1),K8=Hp("floor");function G8(i){return i&&i.length?Za(i,$t,Pp):e}function J8(i,u){return i&&i.length?Za(i,ee(u,2),Pp):e}function Y8(i){return hg(i,$t)}function X8(i,u){return hg(i,ee(u,2))}function Z8(i){return i&&i.length?Za(i,$t,Ip):e}function Q8(i,u){return i&&i.length?Za(i,ee(u,2),Ip):e}var eB=oc(function(i,u){return i*u},1),tB=Hp("round"),rB=oc(function(i,u){return i-u},0);function nB(i){return i&&i.length?gp(i,$t):0}function iB(i,u){return i&&i.length?gp(i,ee(u,2)):0}return _.after=AT,_.ary=U_,_.assign=d3,_.assignIn=ey,_.assignInWith=_c,_.assignWith=D3,_.at=h3,_.before=k_,_.bind=rd,_.bindAll=F8,_.bindKey=q_,_.castArray=$T,_.chain=j_,_.chunk=KP,_.compact=GP,_.concat=JP,_.cond=E8,_.conforms=v8,_.constant=cd,_.countBy=nT,_.create=m3,_.curry=W_,_.curryRight=H_,_.debounce=z_,_.defaults=g3,_.defaultsDeep=_3,_.defer=ST,_.delay=xT,_.difference=YP,_.differenceBy=XP,_.differenceWith=ZP,_.drop=QP,_.dropRight=eO,_.dropRightWhile=tO,_.dropWhile=rO,_.fill=nO,_.filter=oT,_.flatMap=aT,_.flatMapDeep=cT,_.flatMapDepth=lT,_.flatten=I_,_.flattenDeep=iO,_.flattenDepth=oO,_.flip=PT,_.flow=w8,_.flowRight=b8,_.fromPairs=uO,_.functions=b3,_.functionsIn=A3,_.groupBy=fT,_.initial=aO,_.intersection=cO,_.intersectionBy=lO,_.intersectionWith=fO,_.invert=x3,_.invertBy=P3,_.invokeMap=dT,_.iteratee=ld,_.keyBy=DT,_.keys=lt,_.keysIn=jt,_.map=pc,_.mapKeys=T3,_.mapValues=B3,_.matches=A8,_.matchesProperty=S8,_.memoize=Dc,_.merge=I3,_.mergeWith=ty,_.method=x8,_.methodOf=P8,_.mixin=fd,_.negate=hc,_.nthArg=T8,_.omit=R3,_.omitBy=N3,_.once=OT,_.orderBy=hT,_.over=B8,_.overArgs=TT,_.overEvery=I8,_.overSome=R8,_.partial=nd,_.partialRight=V_,_.partition=mT,_.pick=M3,_.pickBy=ry,_.property=cy,_.propertyOf=N8,_.pull=hO,_.pullAll=N_,_.pullAllBy=mO,_.pullAllWith=gO,_.pullAt=_O,_.range=M8,_.rangeRight=j8,_.rearg=BT,_.reject=yT,_.remove=yO,_.rest=IT,_.reverse=ed,_.sampleSize=ET,_.set=$3,_.setWith=L3,_.shuffle=vT,_.slice=FO,_.sortBy=bT,_.sortedUniq=SO,_.sortedUniqBy=xO,_.split=a8,_.spread=RT,_.tail=PO,_.take=OO,_.takeRight=TO,_.takeRightWhile=BO,_.takeWhile=IO,_.tap=GO,_.throttle=NT,_.thru=fc,_.toArray=X_,_.toPairs=ny,_.toPairsIn=iy,_.toPath=q8,_.toPlainObject=Q_,_.transform=U3,_.unary=MT,_.union=RO,_.unionBy=NO,_.unionWith=MO,_.uniq=jO,_.uniqBy=$O,_.uniqWith=LO,_.unset=k3,_.unzip=td,_.unzipWith=M_,_.update=q3,_.updateWith=W3,_.values=ko,_.valuesIn=H3,_.without=UO,_.words=sy,_.wrap=jT,_.xor=kO,_.xorBy=qO,_.xorWith=WO,_.zip=HO,_.zipObject=zO,_.zipObjectDeep=VO,_.zipWith=KO,_.entries=ny,_.entriesIn=iy,_.extend=ey,_.extendWith=_c,fd(_,_),_.add=H8,_.attempt=ay,_.camelCase=G3,_.capitalize=oy,_.ceil=z8,_.clamp=z3,_.clone=LT,_.cloneDeep=kT,_.cloneDeepWith=qT,_.cloneWith=UT,_.conformsTo=WT,_.deburr=uy,_.defaultTo=C8,_.divide=V8,_.endsWith=J3,_.eq=Tr,_.escape=Y3,_.escapeRegExp=X3,_.every=iT,_.find=uT,_.findIndex=T_,_.findKey=y3,_.findLast=sT,_.findLastIndex=B_,_.findLastKey=F3,_.floor=K8,_.forEach=$_,_.forEachRight=L_,_.forIn=E3,_.forInRight=v3,_.forOwn=C3,_.forOwnRight=w3,_.get=ud,_.gt=HT,_.gte=zT,_.has=S3,_.hasIn=sd,_.head=R_,_.identity=$t,_.includes=pT,_.indexOf=sO,_.inRange=V3,_.invoke=O3,_.isArguments=Xi,_.isArray=ae,_.isArrayBuffer=VT,_.isArrayLike=Mt,_.isArrayLikeObject=Xe,_.isBoolean=KT,_.isBuffer=si,_.isDate=GT,_.isElement=JT,_.isEmpty=YT,_.isEqual=XT,_.isEqualWith=ZT,_.isError=id,_.isFinite=QT,_.isFunction=Pn,_.isInteger=K_,_.isLength=mc,_.isMap=G_,_.isMatch=e3,_.isMatchWith=t3,_.isNaN=r3,_.isNative=n3,_.isNil=o3,_.isNull=i3,_.isNumber=J_,_.isObject=He,_.isObjectLike=Ke,_.isPlainObject=as,_.isRegExp=od,_.isSafeInteger=u3,_.isSet=Y_,_.isString=gc,_.isSymbol=Zt,_.isTypedArray=Uo,_.isUndefined=s3,_.isWeakMap=a3,_.isWeakSet=c3,_.join=pO,_.kebabCase=Z3,_.last=Dr,_.lastIndexOf=dO,_.lowerCase=Q3,_.lowerFirst=e8,_.lt=l3,_.lte=f3,_.max=G8,_.maxBy=J8,_.mean=Y8,_.meanBy=X8,_.min=Z8,_.minBy=Q8,_.stubArray=dd,_.stubFalse=Dd,_.stubObject=$8,_.stubString=L8,_.stubTrue=U8,_.multiply=eB,_.nth=DO,_.noConflict=O8,_.noop=pd,_.now=dc,_.pad=t8,_.padEnd=r8,_.padStart=n8,_.parseInt=i8,_.random=K3,_.reduce=gT,_.reduceRight=_T,_.repeat=o8,_.replace=u8,_.result=j3,_.round=tB,_.runInContext=A,_.sample=FT,_.size=CT,_.snakeCase=s8,_.some=wT,_.sortedIndex=EO,_.sortedIndexBy=vO,_.sortedIndexOf=CO,_.sortedLastIndex=wO,_.sortedLastIndexBy=bO,_.sortedLastIndexOf=AO,_.startCase=c8,_.startsWith=l8,_.subtract=rB,_.sum=nB,_.sumBy=iB,_.template=f8,_.times=k8,_.toFinite=On,_.toInteger=le,_.toLength=Z_,_.toLower=p8,_.toNumber=hr,_.toSafeInteger=p3,_.toString=be,_.toUpper=d8,_.trim=D8,_.trimEnd=h8,_.trimStart=m8,_.truncate=g8,_.unescape=_8,_.uniqueId=W8,_.upperCase=y8,_.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,x=C instanceof me,j=b[0],$=x||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&&(x=$=!1);var H=this.__chain__,G=!!this.__actions__.length,te=y&&!H,pe=x&&!G;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(No,f)||(No[f]=[]),No[f].push({name:u,func:c})}}),No[ic(e,O).name]=[{name:"wrapper",func:e}],me.prototype.clone=_x,me.prototype.reverse=yx,me.prototype.value=Fx,_.prototype.at=JO,_.prototype.chain=YO,_.prototype.commit=XO,_.prototype.next=ZO,_.prototype.plant=eT,_.prototype.reverse=tT,_.prototype.toJSON=_.prototype.valueOf=_.prototype.value=rT,_.prototype.first=_.prototype.head,Ju&&(_.prototype[Ju]=QO),_}),ti=XS();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 aC=N((sC,ND)=>{d();(function(e){function t(){var n=e();return n.default||n}if(typeof sC=="object"&&typeof ND=="object")ND.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 F=m("at",function(){if(Array.isArray(this)||typeof this=="string")return g}),w=F,v=()=>{},S=v,O="string",P="array",B="cursor",U="indent",q="align",J="trim",Q="group",fe="fill",ye="if-break",We="indent-if-break",gt="line-suffix",tn="line-suffix-boundary",dt="line",Sr="label",or="break-parent",ma=new Set([B,U,q,J,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 Gn(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 J:case tn:case dt:case or:break;default:throw new Kn(K)}}}var Jn=Gn;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 J: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 Jn(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)}Jn(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 J: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 J: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 Ni(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 Mi(D){return En(D,Vt,!1)}var St=S,Fa=S,ji=S,Nf=S;function nn(D){return St(D),{type:U,contents:D}}function Kt(D,R){return Nf(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},Nu={type:B};function Mu(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 Mf(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:J},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
|
+
`,Gf=`
|
|
33
|
+
`,Jf=Gf;function Yf(D){return D===Hf?Vf:D===zf?Kf:Jf}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 Ne of z)switch(Ne.type){case Li:rt(),W.useTabs?ke(1):Ce(W.tabWidth);break;case xa:{let{string:xt}=Ne;rt(),ie+=xt,K+=xt.length;break}case Ui:{let{width:xt}=Ne;Y+=1,ge+=xt;break}default:throw new Error(`Unexpected indent comment '${Ne.type}'.`)}return on(),{...D,value:ie,length:K,queue:z};function ke(Ne){ie+=" ".repeat(Ne),K+=W.tabWidth*Ne}function Ce(Ne){ie+=" ".repeat(Ne),K+=Ne}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"),Gt=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,Ne=Be[xo]??0;for(let xt=st.length-1;xt>=Ne;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 J:{let{text:st,count:Ne}=Oa(Ce);Ce=st,W+=Ne;break}case Q:{if(K&&Be.break)return!1;let st=Be.break?_t:rt,Ne=Be.expandedStates&&st===_t?w(0,Be.expandedStates,-1):Be.contents;ke.push({mode:st,doc:Ne});break}case ye:{let Ne=(Be.groupId?ie[Be.groupId]||Gt:rt)===_t?Be.breakContents:Be.flatContents;Ne&&ke.push({mode:rt,doc:Ne});break}case dt:if(rt===_t||Be.hard)return!0;Be.soft||(ge=!0);break;case gt:z=!0;break;case tn:if(z)return!1;break}}return!1}function 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 J:Ba();break;case Q:switch(Dt){case Gt:if(!ke){Y.push({indent:Fe,mode:ne.break?_t:Gt,doc:ne.contents});break}case _t:{ke=!1;let at={indent:Fe,mode:Gt,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:Gt,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:Gt,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:Gt,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:Gt,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===Gt){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 Gt: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 Ne=Be.join("")+ge,xt=[...on,...rt];if(xt.length!==2)return{formatted:Ne};let zu=xt[0];return{formatted:Ne,cursorNodeStart:zu,cursorNodeText:Ne.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:Mu,lineSuffix:Uf,lineSuffixBoundary:kf,cursor:Nu,breakParent:$i,ifBreak:Mf,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:Jn,findInDoc:En,mapDoc:bo,removeLines:zt,stripTrailingHardline:xr,replaceEndOfLine:Ni,canBreak:Mi};return a(l)})});var kC=N((Yte,UC)=>{"use strict";d();var UD=Object.defineProperty,wN=Object.getOwnPropertyDescriptor,DC=Object.getOwnPropertyNames,bN=Object.prototype.hasOwnProperty,Me=(e,t)=>function(){return e&&(t=(0,e[DC(e)[0]])(e=0)),t},hC=(e,t)=>{for(var r in t)UD(e,r,{get:t[r],enumerable:!0})},AN=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of DC(t))!bN.call(e,o)&&o!==r&&UD(e,o,{get:()=>t[o],enumerable:!(n=wN(t,o))||n.enumerable});return e},cC=e=>AN(UD({},"__esModule",{value:!0}),e),lC,mC,SN=Me({"scripts/build/shims/shared.js"(){lC=1,mC=(e,t)=>(r,n,...o)=>r|lC&&n==null?void 0:(t.call(n)??n[e]).apply(n,o)}}),fC,pC,gC,xN=Me({"scripts/build/shims/method-replace-all.js"(){SN(),fC=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},pC=mC("replaceAll",function(){if(typeof this=="string")return fC}),gC=pC}});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 _C,Fi,kD,qD,ao=Me({"src/utilities/skip.js"(){_C=Rs(/\s/u),Fi=Rs(" "),kD=Rs(",; "),qD=Rs(/[^\n\r]/u)}});function PN(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=Me({"src/utilities/skip-inline-comment.js"(){yl=PN}});function ON(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,Ns=Me({"src/utilities/skip-newline.js"(){$D=e=>e===`
|
|
38
|
+
`||e==="\r"||e==="\u2028"||e==="\u2029",so=ON}});function TN(e,t){return t===!1?!1:e.charAt(t)==="/"&&e.charAt(t+1)==="/"?qD(e,t):t}var Fl,HD=Me({"src/utilities/skip-trailing-comment.js"(){ao(),Fl=TN}});function BN(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,yC=Me({"src/utilities/get-next-non-space-non-comment-character-index.js"(){ao(),WD(),Ns(),HD(),El=BN}});function IN(e,t,r={}){let n=Fi(e,r.backwards?t-1:t,r),o=so(e,n,r);return n!==o}var zD,FC=Me({"src/utilities/has-newline.js"(){ao(),Ns(),zD=IN}});function RN(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,NN=Me({"src/utilities/is-next-line-empty.js"(){FC(),ao(),WD(),Ns(),HD(),vl=RN}});function MN(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,jN=Me({"src/utilities/is-previous-line-empty.js"(){ao(),Ns(),VD=MN}});function $N(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=$N(e)}function LN(e,t){t.leading=!0,t.trailing=!1,KD(e,t)}function UN(e,t,r){t.leading=!1,t.trailing=!1,r&&(t.marker=r),KD(e,t)}function kN(e,t){t.leading=!1,t.trailing=!0,KD(e,t)}var qN=Me({"src/main/comments/utilities.js"(){}});function WN(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 GD,EC=Me({"src/utilities/get-alignment-size.js"(){GD=WN}});function HN(e,t){let r=e.lastIndexOf(`
|
|
39
|
+
`);return r===-1?0:GD(e.slice(r+1).match(/^[\t ]*/u)[0],t)}var vC,zN=Me({"src/utilities/get-indent-size.js"(){EC(),vC=HN}});function VN(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var KN=Me({"node_modules/escape-string-regexp/index.js"(){}});function GN(e,t){let r=e.matchAll(new RegExp(`(?:${VN(t)})+`,"gu"));return r.reduce||(r=[...r]),r.reduce((n,[o])=>Math.max(n,o.length),0)/t.length}var CC,JN=Me({"src/utilities/get-max-continuous-count.js"(){KN(),CC=GN}});function YN(e,t){let r=El(e,t);return r===!1?"":e.charAt(r)}var wC,XN=Me({"src/utilities/get-next-non-space-non-comment-character.js"(){yC(),wC=YN}});function ZN(e,t){let{preferred:r,alternate:n}=t===!0||t===LD?bC:AC,{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,dC,MD,jD,bC,AC,SC,QN=Me({"src/utilities/get-preferred-quote.js"(){LD="'",dC='"',MD=Object.freeze({character:LD,codePoint:39}),jD=Object.freeze({character:dC,codePoint:34}),bC=Object.freeze({preferred:MD,alternate:jD}),AC=Object.freeze({preferred:jD,alternate:MD}),SC=ZN}}),xC,eM=Me({"node_modules/emoji-regex/index.mjs"(){xC=()=>/[#*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 tM(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function rM(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 nM=Me({"node_modules/get-east-asian-width/lookup.js"(){}}),iM=Me({"node_modules/get-east-asian-width/index.js"(){nM()}}),PC,oM=Me({"src/utilities/narrow-emojis.evaluate.js"(){PC="\xA9\xAE\u203C\u2049\u2122\u2139\u2194\u2195\u2196\u2197\u2198\u2199\u21A9\u21AA\u2328\u23CF\u23F1\u23F2\u23F8\u23F9\u23FA\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600\u2601\u2602\u2603\u2604\u260E\u2611\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638\u2639\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694\u2695\u2696\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F1\u26F7\u26F8\u26F9\u2702\u2708\u2709\u270C\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u2764\u27A1\u2934\u2935\u2B05\u2B06\u2B07"}});function uM(e){if(!e)return 0;if(!OC.test(e))return e.length;e=e.replace(xC(),r=>TC.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+=tM(n)||rM(n)?2:1)}return t}var OC,TC,BC,sM=Me({"src/utilities/get-string-width.js"(){eM(),iM(),oM(),OC=/[^\x20-\x7F]/u,TC=new Set(PC),BC=uM}});function aM(e,t,r){for(let n=t;n<r;++n)if(e.charAt(n)===`
|
|
40
|
+
`)return!0;return!1}var IC,cM=Me({"src/utilities/has-newline-in-range.js"(){IC=aM}});function lM(e,t,r={}){return Fi(e,r.backwards?t-1:t,r)!==t}var RC,fM=Me({"src/utilities/has-spaces.js"(){ao(),RC=lM}}),NC={};hC(NC,{addDanglingComment:()=>UN,addLeadingComment:()=>LN,addTrailingComment:()=>kN,getAlignmentSize:()=>GD,getIndentSize:()=>vC,getMaxContinuousCount:()=>CC,getNextNonSpaceNonCommentCharacter:()=>wC,getNextNonSpaceNonCommentCharacterIndex:()=>dM,getPreferredQuote:()=>SC,getStringWidth:()=>BC,hasNewline:()=>zD,hasNewlineInRange:()=>IC,hasSpaces:()=>RC,isNextLineEmpty:()=>_M,isNextLineEmptyAfterIndex:()=>vl,isPreviousLineEmpty:()=>hM,makeString:()=>gM,skip:()=>Rs,skipEverythingButNewLine:()=>qD,skipInlineComment:()=>yl,skipNewline:()=>so,skipSpaces:()=>Fi,skipToLineEnd:()=>kD,skipTrailingComment:()=>Fl,skipWhitespace:()=>_C});function pM(e,t,r){return El(e,r(t))}function dM(e,t){return arguments.length===2||typeof t=="number"?El(e,t):pM(...arguments)}function DM(e,t,r){return VD(e,r(t))}function hM(e,t){return arguments.length===2||typeof t=="number"?VD(e,t):DM(...arguments)}function mM(e,t,r){return vl(e,r(t))}function gM(e,t,r){let n=t==='"'?"'":'"',s=gC(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 _M(e,t){return arguments.length===2||typeof t=="number"?vl(e,t):mM(...arguments)}var yM=Me({"src/utilities/public.js"(){xN(),yC(),NN(),jN(),qN(),EC(),zN(),JN(),XN(),QN(),sM(),FC(),cM(),fM(),ao(),WD(),Ns(),HD()}}),MC={};hC(MC,{default:()=>jC});var jC,FM=Me({"src/main/version.evaluate.js"(){jC="3.8.4"}}),$C=import("./prettier-EGVCP5CY.js"),EM=["formatWithCursor","format","check","resolveConfig","resolveConfigFile","clearConfigCache","getFileInfo","getSupportInfo"],nu=Object.create(null);for(let e of EM)nu[e]=async(...t)=>(await $C)[e](...t);var vM=["parse","formatAST","formatDoc","printToDoc","printDocToString"],LC=Object.create(null);for(let e of vM)LC[e]=async(...t)=>(await $C).__debug[e](...t);nu.__debug=LC;nu.util=(yM(),cC(NC)),nu.doc=aC(),nu.version=(FM(),cC(MC)).default;UC.exports=nu});var qC=N(iu=>{"use strict";d();var CM=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(F){a(F)}}function p(g){try{m(n.throw(g))}catch(F){a(F)}}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 wM=kC();function bM(e,t){return CM(this,void 0,void 0,function*(){return t.format?(0,wM.format)(e,Object.assign({parser:"typescript"},t.style)):e})}iu.format=bM});var Cl=N(kt=>{"use strict";d();Object.defineProperty(kt,"__esModule",{value:!0});kt.T_UNKNOWN_ADDITIONAL_PROPERTIES=kt.T_UNKNOWN=kt.T_ANY_ADDITIONAL_PROPERTIES=kt.T_ANY=kt.hasStandaloneName=kt.hasComment=void 0;function AM(e){return"comment"in e&&e.comment!=null&&e.comment!==""||"deprecated"in e&&e.deprecated===!0}kt.hasComment=AM;function SM(e){return"standaloneName"in e&&e.standaloneName!=null&&e.standaloneName!==""}kt.hasStandaloneName=SM;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=N(pt=>{"use strict";d();Object.defineProperty(pt,"__esModule",{value:!0});pt.isCompound=pt.isPrimitive=pt.isBoolean=pt.getRootSchema=pt.Intersection=pt.Types=pt.Parent=void 0;var WC=Mn();pt.Parent=Symbol("Parent");pt.Types=Symbol("Types");pt.Intersection=Symbol("Intersection");pt.getRootSchema=(0,WC.memoize)(e=>{let t=e[pt.Parent];return t?(0,pt.getRootSchema)(t):e});function xM(e){return e===!0||e===!1}pt.isBoolean=xM;function PM(e){return!(0,WC.isPlainObject)(e)}pt.isPrimitive=PM;function OM(e){return Array.isArray(e.type)||"anyOf"in e||"oneOf"in e}pt.isCompound=OM});var ou=N((ire,lo)=>{"use strict";d();function HC(e){return typeof e>"u"||e===null}function TM(e){return typeof e=="object"&&e!==null}function BM(e){return Array.isArray(e)?e:HC(e)?[]:[e]}function IM(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 RM(e,t){var r="",n;for(n=0;n<t;n+=1)r+=e;return r}function NM(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}lo.exports.isNothing=HC;lo.exports.isObject=TM;lo.exports.toArray=BM;lo.exports.repeat=RM;lo.exports.isNegativeZero=NM;lo.exports.extend=IM});var uu=N((ure,VC)=>{"use strict";d();function zC(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 Ms(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=zC(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}Ms.prototype=Object.create(Error.prototype);Ms.prototype.constructor=Ms;Ms.prototype.toString=function(t){return this.name+": "+zC(this,t)};VC.exports=Ms});var GC=N((are,KC)=>{"use strict";d();var js=ou();function JD(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 MM(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,F=t.maxLength-(t.indent+g+3);for(p=1;p<=t.linesBefore&&!(a-p<0);p++)m=JD(e.buffer,n[a-p],o[a-p],e.position-(n[a]-n[a-p]),F),l=js.repeat(" ",t.indent)+YD((e.line-p+1).toString(),g)+" | "+m.str+`
|
|
43
|
+
`+l;for(m=JD(e.buffer,n[a],o[a],e.position,F),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=JD(e.buffer,n[a+p],o[a+p],e.position-(n[a]-n[a+p]),F),l+=js.repeat(" ",t.indent)+YD((e.line+p+1).toString(),g)+" | "+m.str+`
|
|
46
|
+
`;return l.replace(/\n$/,"")}KC.exports=MM});var bt=N((lre,YC)=>{"use strict";d();var JC=uu(),jM=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],$M=["scalar","sequence","mapping"];function LM(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(n){t[String(n)]=r})}),t}function UM(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(jM.indexOf(r)===-1)throw new JC('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=LM(t.styleAliases||null),$M.indexOf(this.kind)===-1)throw new JC('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}YC.exports=UM});var QD=N((pre,ZC)=>{"use strict";d();var $s=uu(),XD=bt();function XC(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 kM(){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=XC(o,"implicit"),o.compiledExplicit=XC(o,"explicit"),o.compiledTypeMap=kM(o.compiledImplicit,o.compiledExplicit),o};ZC.exports=ZD});var eh=N((Dre,QC)=>{"use strict";d();var qM=bt();QC.exports=new qM("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}})});var th=N((mre,ew)=>{"use strict";d();var WM=bt();ew.exports=new WM("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}})});var rh=N((_re,tw)=>{"use strict";d();var HM=bt();tw.exports=new HM("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}})});var nh=N((Fre,rw)=>{"use strict";d();var zM=QD();rw.exports=new zM({explicit:[eh(),th(),rh()]})});var ih=N((vre,nw)=>{"use strict";d();var VM=bt();function KM(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function GM(){return null}function JM(e){return e===null}nw.exports=new VM("tag:yaml.org,2002:null",{kind:"scalar",resolve:KM,construct:GM,predicate:JM,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"})});var oh=N((wre,iw)=>{"use strict";d();var YM=bt();function XM(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 ZM(e){return e==="true"||e==="True"||e==="TRUE"}function QM(e){return Object.prototype.toString.call(e)==="[object Boolean]"}iw.exports=new YM("tag:yaml.org,2002:bool",{kind:"scalar",resolve:XM,construct:ZM,predicate:QM,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=N((Are,ow)=>{"use strict";d();var ej=ou(),tj=bt();function rj(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function nj(e){return 48<=e&&e<=55}function ij(e){return 48<=e&&e<=57}function oj(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(!rj(e.charCodeAt(r)))return!1;n=!0}return n&&o!=="_"}if(o==="o"){for(r++;r<t;r++)if(o=e[r],o!=="_"){if(!nj(e.charCodeAt(r)))return!1;n=!0}return n&&o!=="_"}}if(o==="_")return!1;for(;r<t;r++)if(o=e[r],o!=="_"){if(!ij(e.charCodeAt(r)))return!1;n=!0}return!(!n||o==="_")}function uj(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 sj(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!ej.isNegativeZero(e)}ow.exports=new tj("tag:yaml.org,2002:int",{kind:"scalar",resolve:oj,construct:uj,predicate:sj,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=N((xre,sw)=>{"use strict";d();var uw=ou(),aj=bt(),cj=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function lj(e){return!(e===null||!cj.test(e)||e[e.length-1]==="_")}function fj(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 pj=/^[-+]?[0-9]+e/;function dj(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(uw.isNegativeZero(e))return"-0.0";return r=e.toString(10),pj.test(r)?r.replace("e",".e"):r}function Dj(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||uw.isNegativeZero(e))}sw.exports=new aj("tag:yaml.org,2002:float",{kind:"scalar",resolve:lj,construct:fj,predicate:Dj,represent:dj,defaultStyle:"lowercase"})});var ah=N((Ore,aw)=>{"use strict";d();aw.exports=nh().extend({implicit:[ih(),oh(),uh(),sh()]})});var ch=N((Bre,cw)=>{"use strict";d();cw.exports=ah()});var lh=N((Rre,pw)=>{"use strict";d();var hj=bt(),lw=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),fw=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 mj(e){return e===null?!1:lw.exec(e)!==null||fw.exec(e)!==null}function gj(e){var t,r,n,o,s,a,l,p=0,m=null,g,F,w;if(t=lw.exec(e),t===null&&(t=fw.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],n=+t[2]-1,o=+t[3],!t[4])return new Date(Date.UTC(r,n,o));if(s=+t[4],a=+t[5],l=+t[6],t[7]){for(p=t[7].slice(0,3);p.length<3;)p+="0";p=+p}return t[9]&&(g=+t[10],F=+(t[11]||0),m=(g*60+F)*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 _j(e){return e.toISOString()}pw.exports=new hj("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:mj,construct:gj,instanceOf:Date,represent:_j})});var fh=N((Mre,dw)=>{"use strict";d();var yj=bt();function Fj(e){return e==="<<"||e===null}dw.exports=new yj("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Fj})});var dh=N(($re,Dw)=>{"use strict";d();var Ej=bt(),ph=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
47
|
+
\r`;function vj(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 Cj(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 wj(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 bj(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}Dw.exports=new Ej("tag:yaml.org,2002:binary",{kind:"scalar",resolve:vj,construct:Cj,predicate:bj,represent:wj})});var Dh=N((Ure,hw)=>{"use strict";d();var Aj=bt(),Sj=Object.prototype.hasOwnProperty,xj=Object.prototype.toString;function Pj(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,xj.call(o)!=="[object Object]")return!1;for(s in o)if(Sj.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 Oj(e){return e!==null?e:[]}hw.exports=new Aj("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Pj,construct:Oj})});var hh=N((qre,mw)=>{"use strict";d();var Tj=bt(),Bj=Object.prototype.toString;function Ij(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],Bj.call(n)!=="[object Object]"||(o=Object.keys(n),o.length!==1))return!1;s[t]=[o[0],n[o[0]]]}return!0}function Rj(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}mw.exports=new Tj("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Ij,construct:Rj})});var mh=N((Hre,gw)=>{"use strict";d();var Nj=bt(),Mj=Object.prototype.hasOwnProperty;function jj(e){if(e===null)return!0;var t,r=e;for(t in r)if(Mj.call(r,t)&&r[t]!==null)return!1;return!0}function $j(e){return e!==null?e:{}}gw.exports=new Nj("tag:yaml.org,2002:set",{kind:"mapping",resolve:jj,construct:$j})});var wl=N((Vre,_w)=>{"use strict";d();_w.exports=ch().extend({implicit:[lh(),fh()],explicit:[dh(),Dh(),hh(),mh()]})});var Nw=N((Gre,Fh)=>{"use strict";d();var po=ou(),bw=uu(),Lj=GC(),Uj=wl(),vi=Object.prototype.hasOwnProperty,bl=1,Aw=2,Sw=3,Al=4,gh=1,kj=2,yw=3,qj=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Wj=/[\x85\u2028\u2029]/,Hj=/[,\[\]\{\}]/,xw=/^(?:!|!!|![a-z\-]+!)$/i,Pw=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Fw(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 zj(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function Vj(e){return e===120?2:e===117?4:e===85?8:0}function Kj(e){return 48<=e&&e<=57?e-48:-1}function Ew(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 Gj(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function Ow(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}var Tw=new Array(256),Bw=new Array(256);for(fo=0;fo<256;fo++)Tw[fo]=Ew(fo)?1:0,Bw[fo]=Ew(fo);var fo;function Jj(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Uj,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 Iw(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=Lj(r),new bw(t,r)}function Z(e,t){throw Iw(e,t)}function Sl(e,t){e.onWarning&&e.onWarning.call(null,Iw(e,t))}var vw={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],xw.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'),Pw.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 qj.test(l)&&Z(e,"the stream contains non-printable characters");e.result+=l}}function Cw(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)||(Ow(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"&&Fw(o[m])==="[object Object]"&&(o[m]="[object Object]");if(typeof o=="object"&&Fw(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)Cw(e,t,s[m],r);else Cw(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")),Ow(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 Yj(e,t,r){var n,o,s,a,l,p,m,g,F=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=F,e.result=w,!1)}function Xj(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 Zj(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&&Tw[l])e.result+=Bw[l],e.position++;else if((a=Vj(l))>0){for(o=a,s=0;o>0;o--)l=e.input.charCodeAt(++e.position),(a=zj(l))>=0?s=(s<<4)+a:Z(e,"expected hexadecimal character");e.result+=Gj(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 Qj(e,t){var r=!0,n,o,s,a=e.tag,l,p=e.anchor,m,g,F,w,v,S=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,F=w=!1,U===63&&(m=e.input.charCodeAt(e.position+1),qt(m)&&(F=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&&(F=!0,U=e.input.charCodeAt(++e.position),et(e,!0,t),cu(e,t,bl,!1,!0),B=e.result),v?au(e,l,S,P,O,B,n,o,s):F?l.push(au(e,null,S,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 e$(e,t){var r,n,o=gh,s=!1,a=!1,l=t,p=0,m=!1,g,F;if(F=e.input.charCodeAt(e.position),F===124)n=!1;else if(F===62)n=!0;else return!1;for(e.kind="scalar",e.result="";F!==0;)if(F=e.input.charCodeAt(++e.position),F===43||F===45)gh===o?o=F===43?yw:kj:Z(e,"repeat of a chomping mode identifier");else if((g=Kj(F))>=0)g===0?Z(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):a?Z(e,"repeat of an indentation width identifier"):(l=t+g-1,a=!0);else break;if(Do(F)){do F=e.input.charCodeAt(++e.position);while(Do(F));if(F===35)do F=e.input.charCodeAt(++e.position);while(!hn(F)&&F!==0)}for(;F!==0;){for(_h(e),e.lineIndent=0,F=e.input.charCodeAt(e.position);(!a||e.lineIndent<l)&&F===32;)e.lineIndent++,F=e.input.charCodeAt(++e.position);if(!a&&e.lineIndent>l&&(l=e.lineIndent),hn(F)){p++;continue}if(e.lineIndent<l){o===yw?e.result+=po.repeat(`
|
|
50
|
+
`,s?1+p:p):o===gh&&s&&(e.result+=`
|
|
51
|
+
`);break}for(n?Do(F)?(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(F)&&F!==0;)F=e.input.charCodeAt(++e.position);Ei(e,r,e.position,!1)}return!0}function ww(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,Sw,!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 t$(e,t,r){var n,o,s,a,l,p,m=e.tag,g=e.anchor,F={},w=Object.create(null),v=null,S=null,O=null,P=!1,B=!1,U;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=F),U=e.input.charCodeAt(e.position);U!==0;){if(!P&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,Z(e,"tab characters must not be used in indentation")),n=e.input.charCodeAt(e.position+1),s=e.line,(U===63||U===58)&&qt(n))U===63?(P&&(au(e,F,w,v,S,null,a,l,p),v=S=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,Aw,!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,F,w,v,S,null,a,l,p),v=S=O=null),B=!0,P=!1,o=!1,v=e.tag,S=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?S=e.result:O=e.result),P||(au(e,F,w,v,S,O,a,l,p),v=S=O=null),et(e,!0,-1),U=e.input.charCodeAt(e.position)),(e.line===s||e.lineIndent>t)&&U!==0)Z(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return P&&au(e,F,w,v,S,null,a,l,p),B&&(e.tag=m,e.anchor=g,e.kind="mapping",e.result=F),B}function r$(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),xw.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),Hj.test(s)&&Z(e,"tag suffix cannot contain flow indicator characters")}s&&!Pw.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 n$(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 i$(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,F,w,v,S,O,P;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,s=a=l=Al===r||Sw===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(;r$(e)||n$(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||Aw===r?O=t:O=t+1,P=e.position-e.lineStart,p===1?l&&(ww(e,P)||t$(e,P,O))||Qj(e,O)?g=!0:(a&&e$(e,O)||Xj(e,O)||Zj(e,O)?g=!0:i$(e)?(g=!0,(e.tag!==null||e.anchor!==null)&&Z(e,"alias node should not have any properties")):Yj(e,O,bl===r)&&(g=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):p===0&&(g=l&&ww(e,P))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&Z(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),F=0,w=e.implicitTypes.length;F<w;F+=1)if(S=e.implicitTypes[F],S.resolve(e.result)){e.result=S.construct(e.result),e.tag=S.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(vi.call(e.typeMap[e.kind||"fallback"],e.tag))S=e.typeMap[e.kind||"fallback"][e.tag];else for(S=null,v=e.typeMap.multi[e.kind||"fallback"],F=0,w=v.length;F<w;F+=1)if(e.tag.slice(0,v[F].tag.length)===v[F].tag){S=v[F];break}S||Z(e,"unknown tag !<"+e.tag+">"),e.result!==null&&S.kind!==e.kind&&Z(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+S.kind+'", not "'+e.kind+'"'),S.resolve(e.result,e.tag)?(e.result=S.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):Z(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||g}function o$(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(vw,n)?vw[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&&Wj.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 Rw(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 Jj(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;)o$(r);return r.documents}function u$(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var n=Rw(e,r);if(typeof t!="function")return n;for(var o=0,s=n.length;o<s;o+=1)t(n[o])}function s$(e,t){var r=Rw(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new bw("expected a single document in the stream, but found more")}}Fh.exports.loadAll=u$;Fh.exports.load=s$});var rb=N((Yre,tb)=>{"use strict";d();var Tl=ou(),Ws=uu(),a$=wl(),Hw=Object.prototype.toString,zw=Object.prototype.hasOwnProperty,bh=65279,c$=9,Us=10,l$=13,f$=32,p$=33,d$=34,Eh=35,D$=37,h$=38,m$=39,g$=42,Vw=44,_$=45,Pl=58,y$=61,F$=62,E$=63,v$=64,Kw=91,Gw=93,C$=96,Jw=123,w$=124,Yw=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 b$=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],A$=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function S$(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&&zw.call(p.styleAliases,l)&&(l=p.styleAliases[l]),r[a]=l;return r}function x$(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 P$=1,ks=2;function O$(e){this.schema=e.schema||a$,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=S$(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:P$,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 Mw(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 T$(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===f$||e===c$}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 jw(e){return qs(e)&&e!==bh&&e!==l$&&e!==Us}function $w(e,t,r){var n=jw(e),o=n&&!Ol(e);return(r?n:n&&e!==Vw&&e!==Kw&&e!==Gw&&e!==Jw&&e!==Yw)&&e!==Eh&&!(t===Pl&&!o)||jw(t)&&!Ol(t)&&e===Eh||t===Pl&&o}function B$(e){return qs(e)&&e!==bh&&!Ol(e)&&e!==_$&&e!==E$&&e!==Pl&&e!==Vw&&e!==Kw&&e!==Gw&&e!==Jw&&e!==Yw&&e!==Eh&&e!==h$&&e!==g$&&e!==p$&&e!==w$&&e!==y$&&e!==F$&&e!==m$&&e!==d$&&e!==D$&&e!==v$&&e!==C$}function I$(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 Xw(e){var t=/^\n* /;return t.test(e)}var Zw=1,Ch=2,Qw=3,eb=4,lu=5;function R$(e,t,r,n,o,s,a,l){var p,m=0,g=null,F=!1,w=!1,v=n!==-1,S=-1,O=B$(Ls(e,0))&&I$(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&&$w(m,g,l),g=m}else{for(p=0;p<e.length;m>=65536?p+=2:p++){if(m=Ls(e,p),m===Us)F=!0,v&&(w=w||p-S-1>n&&e[S+1]!==" ",S=p);else if(!qs(m))return lu;O=O&&$w(m,g,l),g=m}w=w||v&&p-S-1>n&&e[S+1]!==" "}return!F&&!w?O&&!a&&!o(e)?Zw:s===ks?lu:Ch:r>9&&Xw(e)?lu:a?s===ks?lu:Ch:w?eb:Qw}function N$(e,t,r,n,o){e.dump=(function(){if(t.length===0)return e.quotingType===ks?'""':"''";if(!e.noCompatMode&&(b$.indexOf(t)!==-1||A$.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 T$(e,m)}switch(R$(t,l,e.indent,a,p,e.quotingType,e.forceQuotes&&!n,o)){case Zw:return t;case Ch:return"'"+t.replace(/'/g,"''")+"'";case Qw:return"|"+Lw(t,e.indent)+Uw(Mw(t,s));case eb:return">"+Lw(t,e.indent)+Uw(Mw(M$(t,a),s));case lu:return'"'+j$(t,a)+'"';default:throw new Ws("impossible error: invalid scalar style")}})()}function Lw(e,t){var r=Xw(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 Uw(e){return e[e.length-1]===`
|
|
64
|
+
`?e.slice(0,-1):e}function M$(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,kw(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
|
+
`:"")+kw(p,t),o=s}return n}function kw(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 j$(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||x$(r);return t}function $$(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 qw(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 L$(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 U$(e,t,r,n){var o="",s=e.tag,a=Object.keys(r),l,p,m,g,F,w;if(e.sortKeys===!0)a.sort();else if(typeof e.sortKeys=="function")a.sort(e.sortKeys);else if(e.sortKeys)throw new 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)&&(F=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,F&&(e.dump&&Us===e.dump.charCodeAt(0)?w+="?":w+="? "),w+=e.dump,F&&(w+=vh(e,t)),jn(e,t+1,g,!0,F)&&(e.dump&&Us===e.dump.charCodeAt(0)?w+=":":w+=": ",w+=e.dump,o+=w));e.tag=s,e.dump=o||"{}"}function Ww(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,Hw.call(l.represent)==="[object Function]")n=l.represent(t,p);else if(zw.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,Ww(e,r,!1)||Ww(e,r,!0);var l=Hw.call(e.dump),p=n,m;n&&(n=e.flowLevel<0||e.flowLevel>t);var g=l==="[object Object]"||l==="[object Array]",F,w;if(g&&(F=e.duplicates.indexOf(r),w=F!==-1),(e.tag!==null&&e.tag!=="?"||w||e.indent!==2&&t>0)&&(o=!1),w&&e.usedDuplicates[F])e.dump="*ref_"+F;else{if(g&&w&&!e.usedDuplicates[F]&&(e.usedDuplicates[F]=!0),l==="[object Object]")n&&Object.keys(e.dump).length!==0?(U$(e,t,e.dump,o),w&&(e.dump="&ref_"+F+e.dump)):(L$(e,t,e.dump),w&&(e.dump="&ref_"+F+" "+e.dump));else if(l==="[object Array]")n&&e.dump.length!==0?(e.noArrayIndent&&!a&&t>0?qw(e,t-1,e.dump,o):qw(e,t,e.dump,o),w&&(e.dump="&ref_"+F+e.dump)):($$(e,t,e.dump),w&&(e.dump="&ref_"+F+" "+e.dump));else if(l==="[object String]")e.tag!=="?"&&N$(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 k$(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 q$(e,t){t=t||{};var r=new O$(t);r.noRefs||k$(e,r);var n=e;return r.replacer&&(n=r.replacer.call({"":n},"",n)),jn(r,0,n,!0,!0)?r.dump+`
|
|
71
|
+
`:""}tb.exports.dump=q$});var fu=N((Zre,It)=>{"use strict";d();var nb=Nw(),W$=rb();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=nb.load;It.exports.loadAll=nb.loadAll;It.exports.dump=W$.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=N(Ee=>{"use strict";d();var H$=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=Mn(),$n=ze("path"),ib=co(),z$=H$(fu());function Sh(e,t){try{return e()}catch(r){return t(r)}}Ee.Try=Sh;var V$=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 K$(e,t,r){if(typeof e!="object"||!e)return;let o=e[ib.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),K$(e,t,r),Object.keys(e).filter(o=>!V$.has(o)).forEach(o=>{let s=e[o];s&&typeof s=="object"&&pu(s,t,r)})}}Ee.traverse=ho;function G$(e=""){return ob((0,$n.basename)(e))}Ee.justName=G$;function ob(e){return e.replace((0,$n.extname)(e),"")}Ee.stripExtension=ob;function ub(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=ub;function J$(e,t){let r=ub(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=J$;function Y$(...e){var t;if(!process.env.VERBOSE)return console.error(e);console.error((t=sb("red"))===null||t===void 0?void 0:t("error"),...e)}Ee.error=Y$;function X$(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=sb(e))===null||o===void 0?void 0:o(t),...r),s&&console.dir(s,{depth:6,maxArrayLength:6})}Ee.log=X$;function sb(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 Z$(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=Z$;function Q$(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=Q$;function e7(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=e7;function t7(e,...t){return e?`${e}
|
|
72
|
+
|
|
73
|
+
${t.join(`
|
|
74
|
+
`)}`:t.join(`
|
|
75
|
+
`)}Ee.appendToDescription=t7;function r7(e){if(!(0,Hs.isPlainObject)(e))return!1;let t=e[ib.Parent];return t===null?!0:!["$defs","allOf","anyOf","definitions","dependencies","enum","not","oneOf","patternProperties","properties","required"].some(n=>t[n]===e)}Ee.isSchemaLike=r7;function n7(e,t){return e!=null&&i7(e)?Sh(()=>z$.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=n7;function i7(e){return e.endsWith(".yaml")||e.endsWith(".yml")}function Ci(){let e;try{e=ze("cli-color")}catch{}return e}});var Oh=N(rr=>{"use strict";d();Object.defineProperty(rr,"__esModule",{value:!0});rr.generateType=rr.generate=void 0;var cb=Mn(),o7=Th(),tr=Cl(),hu=wi();function u7(e,t=o7.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=u7;function Du(e,t,r=new Set){if(r.has(e))return"";r.add(e);let n="";switch(e.type){case"ENUM":return c7(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)&&l7(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 s7(e,t){let r=a7(e,t);return t.strictIndexSignatures&&e.keyName==="[k: string]"?`${r} | undefined`:r}rr.generateType=(0,cb.memoize)(s7);function a7(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 lb(e,t);case"INTERSECTION":return ab(e,t);case"LITERAL":return JSON.stringify(e.params);case"NEVER":return"never";case"NUMBER":return"number";case"NULL":return"null";case"OBJECT":return"object";case"REFERENCE":return e.params;case"STRING":return"string";case"TUPLE":return(()=>{let 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 F=r;F<p.length;F+=1)m.push(p[F]),F===p.length-1&&a(m),g.push(l(m));return g.join("|")}return l(a(p))})();case"UNION":return ab(e,t);case"UNKNOWN":return"unknown";case"CUSTOM_TYPE":return e.params}}function ab(e,t){let r=e.params.map(o=>(0,rr.generateType)(o,t)),n=e.type==="UNION"?"|":"&";return r.length===1?r[0]:"("+r.join(" "+n+" ")+")"}function lb(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
|
+
`:"")+f7(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 c7(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 l7(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(", ")} `:"")+lb(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,cb.omit)(e,"standaloneName"),t)}`}function f7(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 fb=N(Il=>{"use strict";d();Object.defineProperty(Il,"__esModule",{value:!0});Il.typesOfSchema=void 0;var p7=Mn(),Bh=co();function d7(e){if(e.tsType)return new Set(["CUSTOM_TYPE"]);let t=new Set;for(let[r,n]of Object.entries(D7))n(e)&&t.add(r);return t.size||t.add("UNNAMED_SCHEMA"),t}Il.typesOfSchema=d7;var D7={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,p7.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=N(Nl=>{"use strict";d();Object.defineProperty(Nl,"__esModule",{value:!0});Nl.applySchemaTyping=void 0;var Rl=co(),h7=fb();function m7(e){var t;let r=(0,h7.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})}Nl.applySchemaTyping=m7});var pb=N(jl=>{"use strict";d();Object.defineProperty(jl,"__esModule",{value:!0});jl.normalize=void 0;var g7=co(),Ln=wi(),_7=Ih(),y7=ze("util"),tt=new Map;function Ml(e,t){return e.type===t||Array.isArray(e.type)&&e.type.includes(t)}function Rh(e){return e.properties!==void 0||Ml(e,"object")||Ml(e,"any")}function Ks(e){return e.items!==void 0||Ml(e,"array")||Ml(e,"any")}function F7(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[g7.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,y7.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;F7(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,_7.applySchemaTyping)(e)});function E7(e,t,r,n){return tt.forEach(o=>(0,Ln.traverse)(e,(s,a)=>o(s,r,n,a,t))),e}jl.normalize=E7});var hb=N(Ll=>{"use strict";d();Object.defineProperty(Ll,"__esModule",{value:!0});Ll.optimize=void 0;var v7=Mn(),Nh=Oh(),db=Cl(),$l=wi();function Gs(e,t,r=new Set){if(r.has(e))return e;switch(r.add(e),e.type){case"ARRAY":return Object.assign(e,{params:Gs(e.params,t,r)});case"INTERFACE":return Object.assign(e,{params:e.params.map(s=>Object.assign(s,{ast:Gs(s.ast,t,r)}))});case"INTERSECTION":case"UNION":let n=Object.assign(e,{params:e.params.map(s=>Gs(s,t,r))});if(n.params.some(s=>s.type==="ANY"))return(0,$l.log)("cyan","optimizer","[A, B, C, Any] -> Any",n),db.T_ANY;if(n.params.some(s=>s.type==="UNKNOWN"))return(0,$l.log)("cyan","optimizer","[A, B, C, Unknown] -> Unknown",n),db.T_UNKNOWN;n.params.every(s=>{let a=(0,Nh.generateType)(Db(s),t),l=(0,Nh.generateType)(Db(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,v7.uniqBy)(n.params,s=>(0,Nh.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=>Gs(s,t,r))});default:return e}}Ll.optimize=Gs;function Db(e){return e.type==="ENUM"?e:Object.assign(Object.assign({},e),{standaloneName:void 0})}});var gb=N(kl=>{"use strict";d();Object.defineProperty(kl,"__esModule",{value:!0});kl.parse=void 0;var mn=Mn(),C7=ze("util"),w7=Ih(),bi=Cl(),Js=co(),Ul=wi();function nr(e,t,r,n=new Map,o=new Set){if((0,Js.isPrimitive)(e))return(0,Js.isBoolean)(e)?b7(e,r,t):jh(e,r);let s=e[Js.Intersection],a=e[Js.Types];if(s){let l=Mh(s,"ALL_OF",t,r,n,o);return a.forEach(p=>{l.params.push(Mh(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=Mh(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 Mh(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,A7(e,t,r,n,o,s))}function b7(e,t,r){return e?{keyName:t,type:r.unknownAny?"UNKNOWN":"ANY"}:{keyName:t,type:"NEVER"}}function jh(e,t){return{keyName:t,params:e,type:"LITERAL"}}function A7(e,t,r,n,o,s){let a=P7((0,Js.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(F=>nr(F,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(F=>nr(F,r,void 0,o,s)),type:"UNION"};case"BOOLEAN":return{comment:e.description,deprecated:e.deprecated,keyName:n,standaloneName:ut(e,l,s,r),type:"BOOLEAN"};case"CUSTOM_TYPE":return{comment:e.description,deprecated:e.deprecated,keyName:n,params:e.tsType,standaloneName:ut(e,l,s,r),type:"CUSTOM_TYPE"};case"NAMED_ENUM":return{comment:e.description,deprecated:e.deprecated,keyName:n,standaloneName:ut(e,l??n,s,r),params:e.enum.map((F,w)=>({ast:jh(F,void 0),keyName:e.tsEnumNames[w]})),type:"ENUM"};case"NAMED_SCHEMA":return mb(e,r,o,s,n);case"NEVER":return{comment:e.description,deprecated:e.deprecated,keyName:n,standaloneName:ut(e,l,s,r),type:"NEVER"};case"NULL":return{comment:e.description,deprecated:e.deprecated,keyName:n,standaloneName:ut(e,l,s,r),type:"NULL"};case"NUMBER":return{comment:e.description,deprecated:e.deprecated,keyName:n,standaloneName:ut(e,l,s,r),type:"NUMBER"};case"OBJECT":return{comment:e.description,keyName:n,standaloneName:ut(e,l,s,r),type:"OBJECT",deprecated:e.deprecated};case"ONE_OF":return{comment:e.description,deprecated:e.deprecated,keyName:n,standaloneName:ut(e,l,s,r),params:e.oneOf.map(F=>nr(F,r,void 0,o,s)),type:"UNION"};case"REFERENCE":throw Error((0,C7.format)("Refs should have been resolved by the resolver!",e));case"STRING":return{comment:e.description,deprecated:e.deprecated,keyName:n,standaloneName:ut(e,l,s,r),type:"STRING"};case"TYPED_ARRAY":if(Array.isArray(e.items)){let F=e.minItems,w=e.maxItems,v={comment:e.description,deprecated:e.deprecated,keyName:n,maxItems:w,minItems:F,standaloneName:ut(e,l,s,r),params:e.items.map(S=>nr(S,r,void 0,o,s)),type:"TUPLE"};return e.additionalItems===!0?v.spreadParam=r.unknownAny?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(F=>{let w=Object.assign(Object.assign({},(0,mn.omit)(e,"$id","description","title")),{type:F});return(0,Ul.maybeStripDefault)(w),(0,w7.applySchemaTyping)(w),nr(w,r,void 0,o,s)}),type:"UNION"};case"UNNAMED_ENUM":return{comment:e.description,deprecated:e.deprecated,keyName:n,standaloneName:ut(e,l,s,r),params:e.enum.map(F=>jh(F,void 0)),type:"UNION"};case"UNNAMED_SCHEMA":return mb(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 mb(e,t,r,n,o,s){let a=ut(e,s,n,t);return{comment:e.description,deprecated:e.deprecated,keyName:o,params:x7(e,t,r,n,a),standaloneName:a,superTypes:S7(e,t,r,n),type:"INTERFACE"}}function S7(e,t,r,n){let o=e.extends;return o?o.map(s=>nr(s,t,void 0,r,n)):[]}function x7(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&&O7(e)?e.$defs:{}),Object.keys(e).reduce((n,o)=>Object.assign(Object.assign({},n),$h(e[o],!1,r)),{})):{})}var P7=(0,mn.memoize)($h);function O7(e){return"$defs"in e}});var ql=N(mu=>{"use strict";d();Object.defineProperty(mu,"__esModule",{value:!0});mu.getDeepKeys=mu.toJSON=void 0;var T7=["function","symbol","undefined"],B7=["constructor","prototype","__proto__"],I7=Object.getPrototypeOf({});function R7(){let e={},t=this;for(let r of _b(t))if(typeof r=="string"){let n=t[r],o=typeof n;T7.includes(o)||(e[r]=n)}return e}mu.toJSON=R7;function _b(e,t=[]){let r=[];for(;e&&e!==I7;)r=r.concat(Object.getOwnPropertyNames(e),Object.getOwnPropertySymbols(e)),e=Object.getPrototypeOf(e);let n=new Set(r);for(let o of t.concat(B7))n.delete(o);return n}mu.getDeepKeys=_b});var Lh=N(gu=>{"use strict";d();Object.defineProperty(gu,"__esModule",{value:!0});gu.addInspectMethod=gu.format=void 0;var yb=ze("util"),N7=ql(),Fb=yb.inspect.custom||Symbol.for("nodejs.util.inspect.custom");gu.format=yb.format;function M7(e){e[Fb]=j7}gu.addInspectMethod=M7;function j7(){let e={},t=this;for(let r of N7.getDeepKeys(t)){let n=t[r];e[r]=n}return delete e[Fb],e}});var Cb=N(gn=>{"use strict";d();Object.defineProperty(gn,"__esModule",{value:!0});gn.lazyJoinStacks=gn.joinStacks=gn.isWritableStack=gn.isLazyStack=void 0;var $7=/\r?\n/,L7=/\bono[ @]/;function U7(e){return!!(e&&e.configurable&&typeof e.get=="function")}gn.isLazyStack=U7;function k7(e){return!!(!e||e.writable||typeof e.set=="function")}gn.isWritableStack=k7;function Eb(e,t){let r=vb(e.stack),n=t?t.stack:void 0;return r&&n?r+`
|
|
105
|
+
|
|
106
|
+
`+n:r||n}gn.joinStacks=Eb;function q7(e,t,r){r?Object.defineProperty(t,"stack",{get:()=>{let n=e.get.apply(t);return Eb({stack:n},r)},enumerable:!1,configurable:!0}):W7(t,e)}gn.lazyJoinStacks=q7;function vb(e){if(e){let t=e.split($7),r;for(let n=0;n<t.length;n++){let o=t[n];if(L7.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 W7(e,t){Object.defineProperty(e,"stack",{get:()=>vb(t.get.apply(e)),enumerable:!1,configurable:!0})}});var Ab=N(Hl=>{"use strict";d();Object.defineProperty(Hl,"__esModule",{value:!0});Hl.extendError=void 0;var wb=Lh(),Wl=Cb(),bb=ql(),H7=["name","message","stack"];function z7(e,t,r){let n=e;return V7(n,t),t&&typeof t=="object"&&K7(n,t),n.toJSON=bb.toJSON,wb.addInspectMethod&&wb.addInspectMethod(n),r&&typeof r=="object"&&Object.assign(n,r),n}Hl.extendError=z7;function V7(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 K7(e,t){let r=bb.getDeepKeys(t,H7),n=e,o=t;for(let s of r)if(n[s]===void 0)try{n[s]=o[s]}catch{}}});var Sb=N(_u=>{"use strict";d();Object.defineProperty(_u,"__esModule",{value:!0});_u.normalizeArgs=_u.normalizeOptions=void 0;var G7=Lh();function J7(e){return e=e||{},{concatMessages:e.concatMessages===void 0?!0:!!e.concatMessages,format:e.format===void 0?G7.format:typeof e.format=="function"?e.format:!1}}_u.normalizeOptions=J7;function Y7(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=Y7});var kh=N(Vl=>{"use strict";d();Object.defineProperty(Vl,"__esModule",{value:!0});Vl.Ono=void 0;var zl=Ab(),xb=Sb(),X7=ql(),Z7=Uh;Vl.Ono=Z7;function Uh(e,t){t=xb.normalizeOptions(t);function r(...n){let{originalError:o,props:s,message:a}=xb.normalizeArgs(n,t),l=new e(a);return zl.extendError(l,o,s)}return r[Symbol.species]=e,r}Uh.toJSON=function(t){return X7.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 Pb=N(Kl=>{"use strict";d();Object.defineProperty(Kl,"__esModule",{value:!0});Kl.ono=void 0;var mo=kh(),Q7=_n;Kl.ono=Q7;_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 e9=_n;function _n(...e){let t=e[0];if(typeof t=="object"&&typeof t.name=="string"){for(let r of Object.values(e9))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 Tb=N(Ob=>{"use strict";d();Object.defineProperty(Ob,"__esModule",{value:!0});var xne=ze("util")});var Rt=N((Lr,yu)=>{"use strict";d();var t9=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]})),r9=Lr&&Lr.__exportStar||function(e,t){for(var r in e)r!=="default"&&!t.hasOwnProperty(r)&&t9(t,e,r)};Object.defineProperty(Lr,"__esModule",{value:!0});Lr.ono=void 0;var Bb=Pb();Object.defineProperty(Lr,"ono",{enumerable:!0,get:function(){return Bb.ono}});var n9=kh();Object.defineProperty(Lr,"Ono",{enumerable:!0,get:function(){return n9.Ono}});r9(Tb(),Lr);Lr.default=Bb.ono;typeof yu=="object"&&typeof yu.exports=="object"&&(yu.exports=Object.assign(yu.exports.default,yu.exports))});var qh=N(Ys=>{"use strict";d();var i9=Ys&&Ys.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ys,"__esModule",{value:!0});Ys.default=o9;var Ib=i9(ze("path"));function o9(e){return e.startsWith("\\\\?\\")?e:e.split(Ib.default?.win32?.sep).join(Ib.default?.posix?.sep??"/")}});var Rb=N(Gl=>{"use strict";d();Object.defineProperty(Gl,"__esModule",{value:!0});Gl.isWindows=void 0;var u9=/^win/.test(globalThis.process?globalThis.process.platform:""),s9=()=>u9;Gl.isWindows=s9});var Er=N(Le=>{"use strict";d();var a9=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]})),c9=Le&&Le.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),l9=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"&&a9(r,t,n[o]);return c9(r,t),r}})(),f9=Le&&Le.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Le,"__esModule",{value:!0});Le.parse=void 0;Le.resolve=Nb;Le.cwd=Mb;Le.getProtocol=Kh;Le.getExtension=y9;Le.stripQuery=jb;Le.getHash=$b;Le.stripHash=zh;Le.isHttp=F9;Le.isFileSystemPath=Vh;Le.fromFileSystemPath=E9;Le.toFileSystemPath=v9;Le.safePointerToPath=C9;Le.relative=w9;var Yl=f9(qh()),Hh=l9(ze("path")),p9=/\//g,d9=/^(\w{2,}):\/\//i,D9=/~1/g,h9=/~0/g,m9=ze("path"),Jl=Rb(),g9=[[/\?/g,"%3F"],[/#/g,"%23"]],Wh=[/%23/g,"#",/%24/g,"$",/%26/g,"&",/%2C/g,",",/%40/g,"@"],_9=e=>new URL(e);Le.parse=_9;function Nb(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 Mb(){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=d9.exec(e||"");if(t)return t[1].toLowerCase()}function y9(e){let t=e.lastIndexOf(".");return t>=0?jb(e.substr(t).toLowerCase()):""}function jb(e){let t=e.indexOf("?");return t>=0&&(e=e.substr(0,t)),e}function $b(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 F9(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 E9(e){if((0,Jl.isWindows)()){let t=Mb(),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,m9.join)(t,e)),e=(0,Yl.default)(e)}e=encodeURI(e);for(let t of g9)e=e.replace(t[0],t[1]);return e}function v9(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,Jl.isWindows)()&&e[1]==="/"&&(e=e[0]+":"+e.substr(1)),t?e="file:///"+e:(r=!1,e=(0,Jl.isWindows)()?e:"/"+e)),(0,Jl.isWindows)()&&!r&&(e=e.replace(p9,"\\"),e.substr(1,2)===":\\"&&(e=e[0].toUpperCase()+e.substr(1))),e}function C9(e){return e.length<=1||e[0]!=="#"||e[1]!=="/"?[]:e.slice(2).split("/").map(t=>decodeURIComponent(t).replace(D9,"/").replace(h9,"~"))}function w9(e,t){if(!Vh(e)||!Vh(t))return Nb(e,t);let r=Hh.default.dirname(zh(e)),n=zh(t);return Hh.default.relative(r,n)+$b(t)}});var vr=N(Je=>{"use strict";d();Object.defineProperty(Je,"__esModule",{value:!0});Je.InvalidPointerError=Je.TimeoutError=Je.MissingPointerError=Je.UnmatchedResolverError=Je.ResolverError=Je.UnmatchedParserError=Je.ParserError=Je.JSONParserErrorGroup=Je.JSONParserError=void 0;Je.isHandledError=b9;Je.normalizeError=A9;var Lb=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,Lb.Ono.extend(this)}get footprint(){return`${this.path}+${this.source}+${this.code}+${this.message}`}};Je.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)}'`,Lb.Ono.extend(this)}static getParserErrors(t){let r=[];for(let n of Object.values(t.$refs._$refs))n.errors&&r.push(...n.errors);return r}get errors(){return e.getParserErrors(this.files)}};Je.JSONParserErrorGroup=Zl;var Gh=class extends Ur{constructor(t,r){super(`Error parsing ${r}: ${t}`,r),this.code="EPARSER",this.name="ParserError"}};Je.ParserError=Gh;var Jh=class extends Ur{constructor(t){super(`Could not find parser for "${t}"`,t),this.code="EUNMATCHEDPARSER",this.name="UnmatchedParserError"}};Je.UnmatchedParserError=Jh;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))}};Je.ResolverError=Yh;var Xh=class extends Ur{constructor(t){super(`Could not find resolver for "${t}"`,t),this.code="EUNMATCHEDRESOLVER",this.name="UnmatchedResolverError"}};Je.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"}};Je.MissingPointerError=Zh;var Qh=class extends Ur{constructor(t){super(`Dereferencing timeout reached: ${t}ms`),this.code="ETIMEOUT",this.name="TimeoutError"}};Je.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"}};Je.InvalidPointerError=em;function b9(e){return e instanceof Ur||e instanceof Zl}function A9(e){return e.path===null&&(e.path=[]),e}});var Xs=N(kr=>{"use strict";d();var S9=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]})),x9=kr&&kr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),P9=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"&&S9(r,t,n[o]);return x9(r,t),r}})(),O9=kr&&kr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(kr,"__esModule",{value:!0});var tm=O9(Fu()),rm=P9(Er()),ef=vr(),T9=/\//g,B9=/~/g,I9=/~1/g,R9=/~0/g,N9=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=kb(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&&!qb(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=kb(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=Ub(this,s,{});return Ql(this,n),s=o[o.length-1],Ub(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]=N9(o[s].replace(I9,"/").replace(R9,"~"));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(B9,"~0").replace(T9,"~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&&!qb(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 Ub(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 kb(e){if((0,ef.isHandledError)(e))throw e;return e}function qb(e){return typeof e=="string"&&tf.parse(e).length==0}});var Fu=N(Zs=>{"use strict";d();var M9=Zs&&Zs.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Zs,"__esModule",{value:!0});var Wb=M9(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 Wb.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 Wb.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 Gb=N(qr=>{"use strict";d();var j9=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]})),$9=qr&&qr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),L9=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"&&j9(r,t,n[o]);return $9(r,t),r}})(),Kb=qr&&qr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(qr,"__esModule",{value:!0});var Hb=Rt(),U9=Kb(Fu()),Ai=L9(Er()),zb=Kb(qh()),om=class{paths(...t){return Vb(this._$refs,t.flat()).map(n=>(0,zb.default)(n.decoded))}values(...t){let r=this._$refs;return Vb(r,t.flat()).reduce((o,s)=>(o[(0,zb.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,Hb.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 U9.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,Hb.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 Vb(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 Yb=N(Eu=>{"use strict";d();Object.defineProperty(Eu,"__esModule",{value:!0});Eu.all=k9;Eu.filter=q9;Eu.sort=W9;Eu.run=H9;function k9(e){return Object.keys(e||{}).filter(t=>typeof e[t]=="object").map(t=>(e[t].name=t,e[t]))}function q9(e,t,r){return e.filter(n=>!!Jb(n,t,r))}function W9(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 H9(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=Jb(o,t,r,g,n);if(v&&typeof v.then=="function")v.then(F,w);else if(v!==void 0)F(v);else if(a===e.length)throw new Error("No promise has been returned or callback has been called.")}catch(v){w(v)}}function g(v,S){v?w(v):F(S)}function F(v){l({plugin:o,result:v})}function w(v){s={plugin:o,error:v},m()}})}function Jb(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=N(Un=>{"use strict";d();var z9=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]})),V9=Un&&Un.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Xb=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"&&z9(r,t,n[o]);return V9(r,t),r}})();Object.defineProperty(Un,"__esModule",{value:!0});var um=Rt(),K9=Xb(Er()),Si=Xb(Yb()),go=vr();async function G9(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:K9.getExtension(e)};try{let l=await J9(a,r,t);s.pathType=l.plugin.name,a.data=l.result;let p=await Y9(a,r,t);return s.value=p.result,p.result}catch(l){throw(0,go.isHandledError)(l)&&(s.value=l),l}}async function J9(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 Y9(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&&X9(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 X9(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=G9});var Qb=N(am=>{"use strict";d();Object.defineProperty(am,"__esModule",{value:!0});var Zb=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 Zb.ParserError(n.message,e.url)}throw new Zb.ParserError(r.message,e.url)}}else return t}}});var e2=N(Qs=>{"use strict";d();var Z9=Qs&&Qs.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Qs,"__esModule",{value:!0});var Q9=vr(),eL=Z9(fu()),tL=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 eL.default.load(t,{schema:tL.JSON_SCHEMA})}catch(r){throw new Q9.ParserError(r?.message||"Parser Error",e.url)}else return t}}});var t2=N(cm=>{"use strict";d();Object.defineProperty(cm,"__esModule",{value:!0});var rL=vr(),nL=/\.(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))&&nL.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 rL.ParserError("data is not text",e.url)}}});var r2=N(lm=>{"use strict";d();Object.defineProperty(lm,"__esModule",{value:!0});var iL=/\.(jpeg|jpg|gif|png|bmp|ico)$/i;lm.default={order:400,allowEmpty:!0,canParse(e){return Buffer.isBuffer(e.data)&&iL.test(e.url)},parse(e){return Buffer.isBuffer(e.data)?e.data:Buffer.from(e.data)}}});var u2=N(Wr=>{"use strict";d();var oL=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]})),uL=Wr&&Wr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),sL=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"&&oL(r,t,n[o]);return uL(r,t),r}})(),aL=Wr&&Wr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Wr,"__esModule",{value:!0});var cL=aL(ze("fs")),n2=Rt(),i2=sL(Er()),o2=vr();Wr.default={order:100,canRead(e){return i2.isFileSystemPath(e.url)},async read(e){let t;try{t=i2.toFileSystemPath(e.url)}catch(r){throw new o2.ResolverError(n2.ono.uri(r,`Malformed URI: ${e.url}`),e.url)}try{return await cL.default.promises.readFile(t)}catch(r){throw new o2.ResolverError((0,n2.ono)(r,`Error opening file "${t}"`),t)}}}});var c2=N(kn=>{"use strict";d();var lL=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]})),fL=kn&&kn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),pL=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"&&lL(r,t,n[o]);return fL(r,t),r}})();Object.defineProperty(kn,"__esModule",{value:!0});var nf=Rt(),ea=pL(Er()),s2=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),a2(t,this)}};async function a2(e,t,r){e=ea.parse(e);let n=r||[];n.push(e.href);try{let o=await dL(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 s2.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 a2(s,t,n)}}else{if(o.body){let s=await o.arrayBuffer();return Buffer.from(s)}return Buffer.alloc(0)}}catch(o){throw new s2.ResolverError((0,nf.ono)(o,`Error downloading ${e.href}`),e.href)}}async function dL(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=N(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 DL=vu(Qb()),hL=vu(e2()),mL=vu(t2()),gL=vu(r2()),_L=vu(u2()),yL=vu(c2()),FL=()=>({parse:{json:{...DL.default},yaml:{...hL.default},text:{...mL.default},binary:{...gL.default}},resolve:{file:{..._L.default},http:{...yL.default},external:!0},continueOnError:!1,dereference:{circular:!0,excludedPathMatcher:()=>!1,referenceResolution:"relative"},mutateInputSchema:!0});qn.getJsonSchemaRefParserDefaultOptions=FL;var EL=e=>{let t=(0,qn.getJsonSchemaRefParserDefaultOptions)();return e&&f2(t,e),t};qn.getNewOptions=EL;function f2(e,t){if(l2(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];l2(s)?e[o]=f2(a||{},s):s!==void 0&&(e[o]=s)}}return e}function l2(e){return e&&typeof e=="object"&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}});var d2=N(of=>{"use strict";d();Object.defineProperty(of,"__esModule",{value:!0});of.normalizeArgs=p2;var vL=fm();function p2(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,vL.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=p2});var D2=N(Hr=>{"use strict";d();var CL=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]})),wL=Hr&&Hr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),bL=Hr&&Hr.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&CL(r,t,n[o]);return wL(r,t),r}})(),pm=Hr&&Hr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Hr,"__esModule",{value:!0});var AL=pm(Fu()),SL=pm(Xs()),xL=pm(sm()),Cu=bL(Er()),PL=vr();function OL(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),AL.default.isExternal$Ref(e)&&a.push(TL(e,t,r,n));let l=Object.keys(e);for(let p of l){let m=SL.default.join(t,p),g=e[p];a=a.concat(dm(g,m,r,n,o,s))}}return a}async function TL(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,xL.default)(s,r,n),m=dm(p,a+"#",r,n,new Set,!0);return Promise.all(m)}catch(p){if(!n?.continueOnError||!(0,PL.isHandledError)(p))throw p;return r._$refs[a]&&(p.source=decodeURI(Cu.stripHash(t)),p.path=Cu.safePointerToPath(Cu.getHash(t))),[]}}Hr.default=OL});var g2=N(zr=>{"use strict";d();var BL=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]})),IL=zr&&zr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),RL=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"&&BL(r,t,n[o]);return IL(r,t),r}})(),m2=zr&&zr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(zr,"__esModule",{value:!0});var uf=m2(Fu()),ta=m2(Xs()),Dm=RL(Er());function NL(e,t){let r=[];hm(e,"schema",e.$refs._root$Ref.path+"#","#",0,r,e.$refs,t),ML(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))h2(e,t,r,n,o,s,a,l);else{let m=Object.keys(p).sort((g,F)=>g==="definitions"?-1:F==="definitions"?1:g.length-F.length);for(let g of m){let F=ta.default.join(r,g),w=ta.default.join(n,g),v=p[g];uf.default.isAllowed$Ref(v)?h2(p,g,r,w,o,s,a,l):hm(p,g,F,w,o,s,a,l)}}}function h2(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),S=Dm.getHash(g.path),O=v!==a._root$Ref.path,P=uf.default.isExtended$Ref(p);o+=g.indirections;let B=jL(s,e,t);if(B)if(w<B.depth||o<B.indirections)$L(s,B);else return;s.push({$ref:p,parent:e,key:t,pathFromRoot:n,depth:w,file:v,hash:S,value:g.value,circular:g.circular,extended:P,external:O,indirections:o}),(!B||O)&&hm(g.value,null,g.path,n,o+1,s,a,l)}function ML(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 jL(e,t,r){for(let n of e)if(n&&n.parent===t&&n.key===r)return n}function $L(e,t){let r=e.indexOf(t);e.splice(r,1)}zr.default=NL});var C2=N(Vr=>{"use strict";d();var LL=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]})),UL=Vr&&Vr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),kL=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"&&LL(r,t,n[o]);return UL(r,t),r}})(),E2=Vr&&Vr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Vr,"__esModule",{value:!0});var sf=E2(Fu()),_2=E2(Xs()),qL=Rt(),y2=kL(Er()),WL=vr();Vr.default=HL;function HL(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 WL.TimeoutError(l.timeoutMs);let F=l.dereference||{},w=F.excludedPathMatcher||(()=>!1);if((F?.circular==="ignore"||!o.has(e))&&e&&typeof e=="object"&&!ArrayBuffer.isView(e)&&!w(r)){if(n.add(e),o.add(e),sf.default.isAllowed$Ref(e,l))m=F2(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 S=_2.default.join(t,v),O=_2.default.join(r,v);if(w(O))continue;let P=e[v],B=!1;sf.default.isAllowed$Ref(P,l)?(m=F2(P,S,O,n,o,s,a,l,p),B=m.circular,e[v]!==m.value&&(e[v]=m.value,F?.onDereference?.(P.$ref,e[v],e,v))):n.has(P)?B=v2(S,a,l):(m=mm(P,S,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 F2(e,t,r,n,o,s,a,l,p){let g=sf.default.isExternal$Ref(e)&&l?.dereference?.externalReferenceResolution==="root",F=y2.resolve(g?y2.cwd():t,e.$ref),w=s.get(F);if(w&&!w.circular){let U=Object.keys(e);if(U.length>1){let q={};for(let J of U)J!=="$ref"&&!(J in w.value)&&(q[J]=e[J]);return{circular:w.circular,value:Object.assign({},w.value,q)}}return w}let v=a._resolve(F,t,l);if(v===null)return{circular:!1,value:null};let S=v.circular,O=S||n.has(v.value);O&&v2(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&&!S&&l.dereference?.circular==="ignore"&&(P=e),S&&(P.$ref=r);let B={circular:O,value:P};return Object.keys(e).length===1&&s.set(F,B),B}function v2(e,t,r){if(t.circular=!0,!r.dereference.circular)throw qL.ono.reference(`Circular $ref pointer found at ${e}`);return!0}});var w2=N(gm=>{"use strict";d();Object.defineProperty(gm,"__esModule",{value:!0});function zL(){return typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:typeof setImmediate=="function"?setImmediate:function(t){setTimeout(t,0)}}gm.default=zL()});var A2=N(ra=>{"use strict";d();var VL=ra&&ra.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ra,"__esModule",{value:!0});ra.default=KL;var b2=VL(w2());function KL(e,t){if(e){t.then(function(r){(0,b2.default)(function(){e(null,r)})},function(r){(0,b2.default)(function(){e(r)})});return}else return t}});var O2=N(oe=>{"use strict";d();var GL=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]})),JL=oe&&oe.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),YL=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"&&GL(r,t,n[o]);return JL(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 S2=yo(Gb()),XL=yo(sm()),na=yo(d2());oe.jsonSchemaParserNormalizeArgs=na.default;var ZL=yo(D2()),QL=yo(g2()),P2=yo(C2());oe.dereferenceInternal=P2.default;var _o=YL(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 x2=Rt(),Kr=yo(A2()),eU=fm();Object.defineProperty(oe,"getJsonSchemaRefParserDefaultOptions",{enumerable:!0,get:function(){return eU.getJsonSchemaRefParserDefaultOptions}});var xi=class e{constructor(){this.schema=null,this.$refs=new S2.default}async parse(){let t=(0,na.default)(arguments),r;if(!t.path&&!t.schema){let o=(0,x2.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 S2.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,XL.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 x2.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,ZL.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,QL.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,P2.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 T2=N(wu=>{"use strict";d();var tU=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(F){a(F)}}function p(g){try{m(n.throw(g))}catch(F){a(F)}}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 rU=O2(),nU=wi();function iU(e,t){return tU(this,arguments,void 0,function*(r,{cwd:n,$refOptions:o}){(0,nU.log)("green","dereferencer","Dereferencing input schema:",n,r);let s=new rU.$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=iU});var B2=N(af=>{"use strict";d();Object.defineProperty(af,"__esModule",{value:!0});af.validate=void 0;var oU=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 uU(e,t){let r=[];return Fo.forEach((n,o)=>{(0,oU.traverse)(e,(s,a)=>(n(s)===!1&&r.push(`Error at key "${a}" in file "${t}": ${o}`),s))}),r}af.validate=uU});var R2=N(cf=>{"use strict";d();Object.defineProperty(cf,"__esModule",{value:!0});cf.link=void 0;var I2=co(),sU=Mn();function ym(e,t=null){if(!Array.isArray(e)&&!(0,sU.isPlainObject)(e)||e.hasOwnProperty(I2.Parent))return e;Object.defineProperty(e,I2.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 N2=N(lf=>{"use strict";d();Object.defineProperty(lf,"__esModule",{value:!0});lf.validateOptions=void 0;function aU({maxItems:e}){if(e!==void 0&&e<-1)throw RangeError(`Expected options.maxItems to be >= -1, but was given ${e}.`)}lf.validateOptions=aU});var Th=N(Wt=>{"use strict";d();var cU=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(F){a(F)}}function p(g){try{m(n.throw(g))}catch(F){a(F)}}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 lU=ze("fs"),Fm=Mn(),fU=ze("path"),pU=qC(),dU=Oh(),DU=pb(),hU=hb(),mU=gb(),gU=T2(),ir=wi(),_U=B2(),yU=ze("util"),FU=R2(),EU=N2();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 vU(e,t=Wt.DEFAULT_OPTIONS){let r=CU(e);return M2(r,(0,ir.stripExtension)(e),Object.assign({cwd:(0,fU.dirname)(e)},t))}Wt.compileFromFile=vU;function CU(e){let t=(0,ir.Try)(()=>(0,lU.readFileSync)(e),()=>{throw new ReferenceError(`Unable to read file "${e}"`)});return(0,ir.parseFileAsJSONSchema)(e,t.toString())}function M2(e,t){return cU(this,arguments,void 0,function*(r,n,o={}){(0,EU.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,gU.dereference)(p,s);process.env.VERBOSE&&((0,yU.isDeepStrictEqual)(p,g)?(0,ir.log)("green","dereferencer",l(),"\u2705 No change"):(0,ir.log)("green","dereferencer",l(),"\u2705 Result:",g));let F=(0,FU.link)(g);process.env.VERBOSE&&(0,ir.log)("green","linker",l(),"\u2705 No change");let w=(0,_U.validate)(F,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,DU.normalize)(F,m,n,s);(0,ir.log)("yellow","normalizer",l(),"\u2705 Result:",v);let S=(0,mU.parse)(v,s);(0,ir.log)("blue","parser",l(),"\u2705 Result:",S);let O=(0,hU.optimize)(S,s);(0,ir.log)("cyan","optimizer",l(),"\u2705 Result:",O);let P=(0,dU.generate)(O,s);(0,ir.log)("magenta","generator",l(),"\u2705 Result:",P);let B=yield(0,pU.format)(P,s);return(0,ir.log)("white","formatter",l(),"\u2705 Result:",B),B})}Wt.compile=M2;var ff=class extends Error{};Wt.ValidationError=ff});var bm=N(ua=>{"use strict";d();var sk=ua&&ua.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ua,"__esModule",{value:!0});ua.default=ak;var d1=sk(ze("path"));function ak(e){return e.startsWith("\\\\?\\")?e:e.split(d1.default?.win32?.sep).join(d1.default?.posix?.sep??"/")}});var D1=N(df=>{"use strict";d();Object.defineProperty(df,"__esModule",{value:!0});df.isWindows=void 0;var ck=/^win/.test(globalThis.process?globalThis.process.platform:""),lk=()=>ck;df.isWindows=lk});var wr=N(Ue=>{"use strict";d();var fk=Ue&&Ue.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),pk=Ue&&Ue.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),dk=Ue&&Ue.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&fk(r,t,n[o]);return pk(r,t),r}})(),Dk=Ue&&Ue.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ue,"__esModule",{value:!0});Ue.parse=void 0;Ue.resolve=h1;Ue.cwd=m1;Ue.getProtocol=Om;Ue.getExtension=vk;Ue.stripQuery=g1;Ue.getHash=_1;Ue.stripHash=xm;Ue.isHttp=Ck;Ue.isFileSystemPath=Pm;Ue.fromFileSystemPath=wk;Ue.toFileSystemPath=bk;Ue.safePointerToPath=Ak;Ue.relative=Sk;var hf=Dk(bm()),Sm=dk(ze("path")),hk=/\//g,mk=/^(\w{2,}):\/\//i,gk=/~1/g,_k=/~0/g,yk=ze("path"),Df=D1(),Fk=[[/\?/g,"%3F"],[/#/g,"%23"]],Am=[/%23/g,"#",/%24/g,"$",/%26/g,"&",/%2C/g,",",/%40/g,"@"],Ek=e=>new URL(e);Ue.parse=Ek;function h1(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 m1(){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=mk.exec(e||"");if(t)return t[1].toLowerCase()}function vk(e){let t=e.lastIndexOf(".");return t>=0?g1(e.substr(t).toLowerCase()):""}function g1(e){let t=e.indexOf("?");return t>=0&&(e=e.substr(0,t)),e}function _1(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 Ck(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 wk(e){if((0,Df.isWindows)()){let t=m1(),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,yk.join)(t,e)),e=(0,hf.default)(e)}e=encodeURI(e);for(let t of Fk)e=e.replace(t[0],t[1]);return e}function bk(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(hk,"\\"),e.substr(1,2)===":\\"&&(e=e[0].toUpperCase()+e.substr(1))),e}function Ak(e){return e.length<=1||e[0]!=="#"||e[1]!=="/"?[]:e.slice(2).split("/").map(t=>decodeURIComponent(t).replace(gk,"/").replace(_k,"~"))}function Sk(e,t){if(!Pm(e)||!Pm(t))return h1(e,t);let r=Sm.default.dirname(xm(e)),n=xm(t);return Sm.default.relative(r,n)+_1(t)}});var br=N(Ye=>{"use strict";d();Object.defineProperty(Ye,"__esModule",{value:!0});Ye.InvalidPointerError=Ye.TimeoutError=Ye.MissingPointerError=Ye.UnmatchedResolverError=Ye.ResolverError=Ye.UnmatchedParserError=Ye.ParserError=Ye.JSONParserErrorGroup=Ye.JSONParserError=void 0;Ye.isHandledError=xk;Ye.normalizeError=Pk;var y1=Rt(),mf=wr(),Gr=class extends Error{constructor(t,r){super(),this.code="EUNKNOWN",this.name="JSONParserError",this.message=t,this.source=r,this.path=null,y1.Ono.extend(this)}get footprint(){return`${this.path}+${this.source}+${this.code}+${this.message}`}};Ye.JSONParserError=Gr;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)}'`,y1.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 Gr{constructor(t,r){super(`Error parsing ${r}: ${t}`,r),this.code="EPARSER",this.name="ParserError"}};Ye.ParserError=Tm;var Bm=class extends Gr{constructor(t){super(`Could not find parser for "${t}"`,t),this.code="EUNMATCHEDPARSER",this.name="UnmatchedParserError"}};Ye.UnmatchedParserError=Bm;var Im=class extends Gr{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 Gr{constructor(t){super(`Could not find resolver for "${t}"`,t),this.code="EUNMATCHEDRESOLVER",this.name="UnmatchedResolverError"}};Ye.UnmatchedResolverError=Rm;var Nm=class extends Gr{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=Nm;var Mm=class extends Gr{constructor(t){super(`Dereferencing timeout reached: ${t}ms`),this.code="ETIMEOUT",this.name="TimeoutError"}};Ye.TimeoutError=Mm;var jm=class extends Gr{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 xk(e){return e instanceof Gr||e instanceof gf}function Pk(e){return e.path===null&&(e.path=[]),e}});var sa=N(Ht=>{"use strict";d();var Ok=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]})),Tk=Ht&&Ht.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Bk=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"&&Ok(r,t,n[o]);return Tk(r,t),r}})(),Ik=Ht&&Ht.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ht,"__esModule",{value:!0});Ht.nullSymbol=void 0;var $m=Ik(Au()),Lm=Bk(wr()),yf=br();Ht.nullSymbol=Symbol("null");var Rk=/\//g,Nk=/~/g,Mk=/~1/g,jk=/~0/g,$k=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=E1(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&&!v1(n)&&"$ref"in this.value)return this;let l=o[a];if(this.value[l]===void 0||this.value[l]===null&&a===o.length-1){let p=!1;for(let v=o.length-1;v>a;v--){let S=o.slice(a,v+1).join("/");if(this.value[S]!==void 0){this.value=this.value[S],a=v,p=!0;break}}if(p)continue;if(l in this.value&&this.value[l]===null){this.value=Ht.nullSymbol;continue}this.value=null;let m=this.$ref.path||"",g=this.path.replace(m,""),F=e.join("",s),w=n?.replace(m,"");throw new yf.MissingPointerError(l,decodeURI(this.originalPath),g,F,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=E1(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=F1(this,s,{});return _f(this,n),s=o[o.length-1],F1(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]=$k(o[s].replace(Mk,"/").replace(jk,"~"));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(Nk,"~0").replace(Rk,"~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&&!v1(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 F1(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 E1(e){if((0,yf.isHandledError)(e))throw e;return e}function v1(e){return typeof e=="string"&&Ff.parse(e).length==0}});var Au=N(Wn=>{"use strict";d();var Lk=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]})),Uk=Wn&&Wn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),kk=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"&&Lk(r,t,n[o]);return Uk(r,t),r}})();Object.defineProperty(Wn,"__esModule",{value:!0});var Ef=kk(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 S1=N(Jr=>{"use strict";d();var qk=Jr&&Jr.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),Wk=Jr&&Jr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Hk=Jr&&Jr.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&qk(r,t,n[o]);return Wk(r,t),r}})(),A1=Jr&&Jr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Jr,"__esModule",{value:!0});var C1=Rt(),zk=A1(Au()),Pi=Hk(wr()),w1=A1(bm()),qm=class{paths(...t){return b1(this._$refs,t.flat()).map(n=>(0,w1.default)(n.decoded))}values(...t){let r=this._$refs;return b1(r,t.flat()).reduce((o,s)=>(o[(0,w1.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,C1.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 zk.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,C1.ono)(`Error resolving $ref pointer "${t}".
|
|
123
|
+
"${s}" not found.`);return a.resolve(o,n,t,r)}constructor(){this._$refs={},this.toJSON=this.values,this.circular=!1,this._$refs={},this._root$Ref=null}};Jr.default=qm;function b1(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 P1=N(Su=>{"use strict";d();Object.defineProperty(Su,"__esModule",{value:!0});Su.all=Vk;Su.filter=Kk;Su.sort=Gk;Su.run=Jk;function Vk(e){return Object.keys(e||{}).filter(t=>typeof e[t]=="object").map(t=>(e[t].name=t,e[t]))}function Kk(e,t,r){return e.filter(n=>!!x1(n,t,r))}function Gk(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 Jk(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=x1(o,t,r,g,n);if(v&&typeof v.then=="function")v.then(F,w);else if(v!==void 0)F(v);else if(a===e.length)throw new Error("No promise has been returned or callback has been called.")}catch(v){w(v)}}function g(v,S){v?w(v):F(S)}function F(v){l({plugin:o,result:v})}function w(v){s={plugin:o,error:v},m()}})}function x1(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=N(Hn=>{"use strict";d();var Yk=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]})),Xk=Hn&&Hn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),O1=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"&&Yk(r,t,n[o]);return Xk(r,t),r}})();Object.defineProperty(Hn,"__esModule",{value:!0});var Wm=Rt(),Zk=O1(wr()),Oi=O1(P1()),Eo=br();async function Qk(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:Zk.getExtension(e)};try{let l=await e4(a,r,t);s.pathType=l.plugin.name,a.data=l.result;let p=await t4(a,r,t);return s.value=p.result,p.result}catch(l){throw(0,Eo.isHandledError)(l)&&(s.value=l),l}}async function e4(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 t4(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&&r4(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 r4(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=Qk});var B1=N(zm=>{"use strict";d();Object.defineProperty(zm,"__esModule",{value:!0});var T1=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 T1.ParserError(n.message,e.url)}throw new T1.ParserError(r.message,e.url)}}else return t}}});var I1=N(aa=>{"use strict";d();var n4=aa&&aa.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(aa,"__esModule",{value:!0});var i4=br(),o4=n4(fu()),u4=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 o4.default.load(t,{schema:u4.JSON_SCHEMA})}catch(r){throw new i4.ParserError(r?.message||"Parser Error",e.url)}else return t}}});var R1=N(Vm=>{"use strict";d();Object.defineProperty(Vm,"__esModule",{value:!0});var s4=br(),a4=/\.(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))&&a4.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 s4.ParserError("data is not text",e.url)}}});var N1=N(Km=>{"use strict";d();Object.defineProperty(Km,"__esModule",{value:!0});var c4=/\.(jpeg|jpg|gif|png|bmp|ico)$/i;Km.default={order:400,allowEmpty:!0,canParse(e){return Buffer.isBuffer(e.data)&&c4.test(e.url)},parse(e){return Buffer.isBuffer(e.data)?e.data:Buffer.from(e.data)}}});var L1=N(Yr=>{"use strict";d();var l4=Yr&&Yr.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),f4=Yr&&Yr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),p4=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"&&l4(r,t,n[o]);return f4(r,t),r}})(),d4=Yr&&Yr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Yr,"__esModule",{value:!0});var D4=d4(ze("fs")),M1=Rt(),j1=p4(wr()),$1=br();Yr.default={order:100,canRead(e){return j1.isFileSystemPath(e.url)},async read(e){let t;try{t=j1.toFileSystemPath(e.url)}catch(r){throw new $1.ResolverError(M1.ono.uri(r,`Malformed URI: ${e.url}`),e.url)}try{return await D4.default.promises.readFile(t)}catch(r){throw new $1.ResolverError((0,M1.ono)(r,`Error opening file "${t}"`),t)}}}});var q1=N(zn=>{"use strict";d();var h4=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]})),m4=zn&&zn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),g4=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"&&h4(r,t,n[o]);return m4(r,t),r}})();Object.defineProperty(zn,"__esModule",{value:!0});var Cf=Rt(),ca=g4(wr()),U1=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),k1(t,this)}};async function k1(e,t,r){e=ca.parse(e);let n=r||[];n.push(e.href);try{let o=await _4(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 U1.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 k1(s,t,n)}}else{if(o.body){let s=await o.arrayBuffer();return Buffer.from(s)}return Buffer.alloc(0)}}catch(o){throw new U1.ResolverError((0,Cf.ono)(o,`Error downloading ${e.href}`),e.href)}}async function _4(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 Gm=N(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 y4=xu(B1()),F4=xu(I1()),E4=xu(R1()),v4=xu(N1()),C4=xu(L1()),w4=xu(q1()),b4=()=>({parse:{json:{...y4.default},yaml:{...F4.default},text:{...E4.default},binary:{...v4.default}},resolve:{file:{...C4.default},http:{...w4.default},external:!0},continueOnError:!1,dereference:{circular:!0,excludedPathMatcher:()=>!1,referenceResolution:"relative"},mutateInputSchema:!0});Vn.getJsonSchemaRefParserDefaultOptions=b4;var A4=e=>{let t=(0,Vn.getJsonSchemaRefParserDefaultOptions)();return e&&H1(t,e),t};Vn.getNewOptions=A4;function H1(e,t){if(W1(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];W1(s)?e[o]=H1(a||{},s):s!==void 0&&(e[o]=s)}}return e}function W1(e){return e&&typeof e=="object"&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}});var V1=N(wf=>{"use strict";d();Object.defineProperty(wf,"__esModule",{value:!0});wf.normalizeArgs=z1;var S4=Gm();function z1(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,S4.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=z1});var K1=N(Xr=>{"use strict";d();var x4=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]})),P4=Xr&&Xr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),O4=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"&&x4(r,t,n[o]);return P4(r,t),r}})(),Jm=Xr&&Xr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Xr,"__esModule",{value:!0});var T4=Jm(Au()),B4=Jm(sa()),I4=Jm(Hm()),Pu=O4(wr()),R4=br();function N4(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),T4.default.isExternal$Ref(e)&&a.push(M4(e,t,r,n));let l=Object.keys(e);for(let p of l){let m=B4.default.join(t,p),g=e[p];a=a.concat(Ym(g,m,r,n,o,s))}}return a}async function M4(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,I4.default)(s,r,n),m=Ym(p,a+"#",r,n,new Set,!0);return Promise.all(m)}catch(p){if(!n?.continueOnError||!(0,R4.isHandledError)(p))throw p;return r._$refs[a]&&(p.source=decodeURI(Pu.stripHash(t)),p.path=Pu.safePointerToPath(Pu.getHash(t))),[]}}Xr.default=N4});var Y1=N(Zr=>{"use strict";d();var j4=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]})),$4=Zr&&Zr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),L4=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"&&j4(r,t,n[o]);return $4(r,t),r}})(),J1=Zr&&Zr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Zr,"__esModule",{value:!0});var bf=J1(Au()),la=J1(sa()),Xm=L4(wr());function U4(e,t){let r=[];Zm(e,"schema",e.$refs._root$Ref.path+"#","#",0,r,e.$refs,t),k4(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))G1(e,t,r,n,o,s,a,l);else{let m=Object.keys(p).sort((g,F)=>g==="definitions"?-1:F==="definitions"?1:g.length-F.length);for(let g of m){let F=la.default.join(r,g),w=la.default.join(n,g),v=p[g];bf.default.isAllowed$Ref(v)?G1(p,g,r,w,o,s,a,l):Zm(p,g,F,w,o,s,a,l)}}}function G1(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),S=Xm.getHash(g.path),O=v!==a._root$Ref.path,P=bf.default.isExtended$Ref(p);o+=g.indirections;let B=q4(s,e,t);if(B)if(w<B.depth||o<B.indirections)W4(s,B);else return;s.push({$ref:p,parent:e,key:t,pathFromRoot:n,depth:w,file:v,hash:S,value:g.value,circular:g.circular,extended:P,external:O,indirections:o}),(!B||O)&&Zm(g.value,null,g.path,n,o+1,s,a,l)}function k4(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 q4(e,t,r){for(let n of e)if(n&&n.parent===t&&n.key===r)return n}function W4(e,t){let r=e.indexOf(t);e.splice(r,1)}Zr.default=U4});var rA=N(Qr=>{"use strict";d();var H4=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]})),z4=Qr&&Qr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),V4=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"&&H4(r,t,n[o]);return z4(r,t),r}})(),eA=Qr&&Qr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Qr,"__esModule",{value:!0});var Af=eA(Au()),X1=eA(sa()),K4=Rt(),Z1=V4(wr()),G4=br();Qr.default=J4;function J4(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 G4.TimeoutError(l.timeoutMs);let F=l.dereference||{},w=F.excludedPathMatcher||(()=>!1);if((F?.circular==="ignore"||!o.has(e))&&e&&typeof e=="object"&&!ArrayBuffer.isView(e)&&!w(r)){if(n.add(e),o.add(e),Af.default.isAllowed$Ref(e,l))m=Q1(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 S=X1.default.join(t,v),O=X1.default.join(r,v);if(w(O))continue;let P=e[v],B=!1;if(Af.default.isAllowed$Ref(P,l)){if(m=Q1(P,S,O,n,o,s,a,l,p),B=m.circular,e[v]!==m.value){let U=new Map;F?.preservedProperties&&typeof e[v]=="object"&&!Array.isArray(e[v])&&F?.preservedProperties.forEach(q=>{q in e[v]&&U.set(q,e[v][q])}),e[v]=m.value,F?.preservedProperties&&U.size&&typeof e[v]=="object"&&!Array.isArray(e[v])&&U.forEach((q,J)=>{e[v][J]=q}),F?.onDereference?.(P.$ref,e[v],e,v)}}else n.has(P)?B=tA(S,a,l):(m=Qm(P,S,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 Q1(e,t,r,n,o,s,a,l,p){let g=Af.default.isExternal$Ref(e)&&l?.dereference?.externalReferenceResolution==="root",F=Z1.resolve(g?Z1.cwd():t,e.$ref),w=s.get(F);if(w&&!w.circular){let U=Object.keys(e);if(U.length>1){let q={};for(let J of U)J!=="$ref"&&!(J in w.value)&&(q[J]=e[J]);return{circular:w.circular,value:Object.assign({},w.value,q)}}return w}let v=a._resolve(F,t,l);if(v===null)return{circular:!1,value:null};let S=v.circular,O=S||n.has(v.value);O&&tA(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&&!S&&l.dereference?.circular==="ignore"&&(P=e),S&&(P.$ref=r);let B={circular:O,value:P};return Object.keys(e).length===1&&s.set(F,B),B}function tA(e,t,r){if(t.circular=!0,r?.dereference?.onCircular?.(e),!r.dereference.circular)throw K4.ono.reference(`Circular $ref pointer found at ${e}`);return!0}});var nA=N(eg=>{"use strict";d();Object.defineProperty(eg,"__esModule",{value:!0});function Y4(){return typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:typeof setImmediate=="function"?setImmediate:function(t){setTimeout(t,0)}}eg.default=Y4()});var oA=N(fa=>{"use strict";d();var X4=fa&&fa.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(fa,"__esModule",{value:!0});fa.default=Z4;var iA=X4(nA());function Z4(e,t){if(e){t.then(function(r){(0,iA.default)(function(){e(null,r)})},function(r){(0,iA.default)(function(){e(r)})});return}else return t}});var cA=N(ue=>{"use strict";d();var Q4=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]})),eq=ue&&ue.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),tq=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"&&Q4(r,t,n[o]);return eq(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 uA=Co(S1()),rq=Co(Hm()),pa=Co(V1());ue.jsonSchemaParserNormalizeArgs=pa.default;var nq=Co(K1()),iq=Co(Y1()),aA=Co(rA());ue.dereferenceInternal=aA.default;var vo=tq(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 sA=Rt(),en=Co(oA()),oq=Gm();Object.defineProperty(ue,"getJsonSchemaRefParserDefaultOptions",{enumerable:!0,get:function(){return oq.getJsonSchemaRefParserDefaultOptions}});var Ti=class e{constructor(){this.schema=null,this.$refs=new uA.default}async parse(){let t=(0,pa.default)(arguments),r;if(!t.path&&!t.schema){let o=(0,sA.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 uA.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,rq.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 sA.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,nq.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,iq.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,aA.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 fA=N((lse,lA)=>{d();function uq(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}lA.exports=uq});var da=N((pse,pA)=>{d();var sq=Uy(),aq=yB();function cq(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?aq(r,l,p):sq(r,l,p)}return r}pA.exports=cq});var DA=N((Dse,dA)=>{d();var lq=da(),fq=yy();function pq(e,t){return e&&lq(t,fq(t),e)}dA.exports=pq});var mA=N((mse,hA)=>{d();var dq=da(),Dq=ky();function hq(e,t){return e&&dq(t,Dq(t),e)}hA.exports=hq});var EA=N((Da,Ou)=>{d();var mq=uB(),FA=typeof Da=="object"&&Da&&!Da.nodeType&&Da,gA=FA&&typeof Ou=="object"&&Ou&&!Ou.nodeType&&Ou,gq=gA&&gA.exports===FA,_A=gq?mq.Buffer:void 0,yA=_A?_A.allocUnsafe:void 0;function _q(e,t){if(t)return e.slice();var r=e.length,n=yA?yA(r):new e.constructor(r);return e.copy(n),n}Ou.exports=_q});var CA=N((yse,vA)=>{d();function yq(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}vA.exports=yq});var bA=N((Ese,wA)=>{d();var Fq=da(),Eq=fB();function vq(e,t){return Fq(e,Eq(e),t)}wA.exports=vq});var SA=N((Cse,AA)=>{d();var Cq=da(),wq=EB();function bq(e,t){return Cq(e,wq(e),t)}AA.exports=bq});var PA=N((bse,xA)=>{d();var Aq=Object.prototype,Sq=Aq.hasOwnProperty;function xq(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&Sq.call(e,"index")&&(r.index=e.index,r.input=e.input),r}xA.exports=xq});var Sf=N((Sse,TA)=>{d();var OA=cB();function Pq(e){var t=new e.constructor(e.byteLength);return new OA(t).set(new OA(e)),t}TA.exports=Pq});var IA=N((Pse,BA)=>{d();var Oq=Sf();function Tq(e,t){var r=t?Oq(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}BA.exports=Tq});var NA=N((Tse,RA)=>{d();var Bq=/\w*$/;function Iq(e){var t=new e.constructor(e.source,Bq.exec(e));return t.lastIndex=e.lastIndex,t}RA.exports=Iq});var UA=N((Ise,LA)=>{d();var MA=sB(),jA=MA?MA.prototype:void 0,$A=jA?jA.valueOf:void 0;function Rq(e){return $A?Object($A.call(e)):{}}LA.exports=Rq});var qA=N((Nse,kA)=>{d();var Nq=Sf();function Mq(e,t){var r=t?Nq(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}kA.exports=Mq});var HA=N((jse,WA)=>{d();var jq=Sf(),$q=IA(),Lq=NA(),Uq=UA(),kq=qA(),qq="[object Boolean]",Wq="[object Date]",Hq="[object Map]",zq="[object Number]",Vq="[object RegExp]",Kq="[object Set]",Gq="[object String]",Jq="[object Symbol]",Yq="[object ArrayBuffer]",Xq="[object DataView]",Zq="[object Float32Array]",Qq="[object Float64Array]",e5="[object Int8Array]",t5="[object Int16Array]",r5="[object Int32Array]",n5="[object Uint8Array]",i5="[object Uint8ClampedArray]",o5="[object Uint16Array]",u5="[object Uint32Array]";function s5(e,t,r){var n=e.constructor;switch(t){case Yq:return jq(e);case qq:case Wq:return new n(+e);case Xq:return $q(e,r);case Zq:case Qq:case e5:case t5:case r5:case n5:case i5:case o5:case u5:return kq(e,r);case Hq:return new n;case zq:case Gq:return new n(e);case Vq:return Lq(e);case Kq:return new n;case Jq:return Uq(e)}}WA.exports=s5});var KA=N((Lse,VA)=>{d();var a5=hy(),zA=Object.create,c5=(function(){function e(){}return function(t){if(!a5(t))return{};if(zA)return zA(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}})();VA.exports=c5});var JA=N((kse,GA)=>{d();var l5=KA(),f5=FB(),p5=dB();function d5(e){return typeof e.constructor=="function"&&!p5(e)?l5(f5(e)):{}}GA.exports=d5});var XA=N((Wse,YA)=>{d();var D5=gd(),h5=my(),m5="[object Map]";function g5(e){return h5(e)&&D5(e)==m5}YA.exports=g5});var tS=N((zse,eS)=>{d();var _5=XA(),y5=gy(),ZA=_y(),QA=ZA&&ZA.isMap,F5=QA?y5(QA):_5;eS.exports=F5});var nS=N((Kse,rS)=>{d();var E5=gd(),v5=my(),C5="[object Set]";function w5(e){return v5(e)&&E5(e)==C5}rS.exports=w5});var sS=N((Jse,uS)=>{d();var b5=nS(),A5=gy(),iS=_y(),oS=iS&&iS.isSet,S5=oS?A5(oS):b5;uS.exports=S5});var pS=N((Xse,fS)=>{d();var x5=aB(),P5=fA(),O5=Uy(),T5=DA(),B5=mA(),I5=EA(),R5=CA(),N5=bA(),M5=SA(),j5=DB(),$5=vB(),L5=gd(),U5=PA(),k5=HA(),q5=JA(),W5=lB(),H5=pB(),z5=tS(),V5=hy(),K5=sS(),G5=yy(),J5=ky(),Y5=1,X5=2,Z5=4,aS="[object Arguments]",Q5="[object Array]",eW="[object Boolean]",tW="[object Date]",rW="[object Error]",cS="[object Function]",nW="[object GeneratorFunction]",iW="[object Map]",oW="[object Number]",lS="[object Object]",uW="[object RegExp]",sW="[object Set]",aW="[object String]",cW="[object Symbol]",lW="[object WeakMap]",fW="[object ArrayBuffer]",pW="[object DataView]",dW="[object Float32Array]",DW="[object Float64Array]",hW="[object Int8Array]",mW="[object Int16Array]",gW="[object Int32Array]",_W="[object Uint8Array]",yW="[object Uint8ClampedArray]",FW="[object Uint16Array]",EW="[object Uint32Array]",je={};je[aS]=je[Q5]=je[fW]=je[pW]=je[eW]=je[tW]=je[dW]=je[DW]=je[hW]=je[mW]=je[gW]=je[iW]=je[oW]=je[lS]=je[uW]=je[sW]=je[aW]=je[cW]=je[_W]=je[yW]=je[FW]=je[EW]=!0;je[rW]=je[cS]=je[lW]=!1;function xf(e,t,r,n,o,s){var a,l=t&Y5,p=t&X5,m=t&Z5;if(r&&(a=o?r(e,n,o,s):r(e)),a!==void 0)return a;if(!V5(e))return e;var g=W5(e);if(g){if(a=U5(e),!l)return R5(e,a)}else{var F=L5(e),w=F==cS||F==nW;if(H5(e))return I5(e,l);if(F==lS||F==aS||w&&!o){if(a=p||w?{}:q5(e),!l)return p?M5(e,B5(a,e)):N5(e,T5(a,e))}else{if(!je[F])return o?e:{};a=k5(e,F,l)}}s||(s=new x5);var v=s.get(e);if(v)return v;s.set(e,a),K5(e)?e.forEach(function(P){a.add(xf(P,t,r,P,e,s))}):z5(e)&&e.forEach(function(P,B){a.set(B,xf(P,t,r,B,e,s))});var S=m?p?$5:j5:p?J5:G5,O=g?void 0:S(e);return P5(O||e,function(P,B){O&&(B=P,P=e[B]),O5(a,B,xf(P,t,r,B,e,s))}),a}fS.exports=xf});var DS=N((Qse,dS)=>{d();var vW=pS(),CW=1,wW=4;function bW(e){return vW(e,CW|wW)}dS.exports=bW});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 SB}from"stream/promises";import j0 from"node:stream/promises";import*as $0 from"node:zlib";import{fileURLToPath as Rd}from"node:url";var L0="9.2.2",U0="9.1.0",k0="4",xB="123.0.0",q0="1.0.2",W0="2.0.1";function H0(e){return e==="0"||e==="1"?{functionRunner:"7.0.1",javy:"4.0.0",javyPlugin:"1"}:e==="2"?{functionRunner:L0,javy:U0,javyPlugin:k0}: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 OB(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 SB(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 j0.pipeline(t,r)}},Td;function Nd(e=U0){return new ys("javy",e,"bytecodealliance/javy",Tc(e,">=7.0.0"))}function Md(e=k0){return new Bd(e)}function uH(e=L0){return new ys("function-runner",e,"Shopify/function-runner",Tc(e,">=9.1.1"))}function Fs(){return Td||(Td=new Id("wasm-opt.cjs",xB)),Td}function z0(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=PB(e);Wc.set(e.path,n);try{await n}finally{Wc.delete(e.path)}}async function PB(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 OB(e,t){let r=$0.createGunzip();await j0.pipeline(e,r,t)}d();import{build as G0}from"./vendor/esbuild-ohos/lib/main.js";var TB="2",V0={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": "~${TB}.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 J0(e,t){let r=jB(e),n=r.length===0?MB:new $d(r),o=await X0(e);return t.useTasks?IB(e,t,n,o):BB(e,t,n,o)}async function BB(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 IB(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:{...V0,...n.codegen.config??{},scalars:{...V0.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 Gy(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 Y0(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 X0(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=H0(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 RB(e,t,r=process.env){let n=await Y0(e),o={...Z0(e.directory,e.entrySourceFilePath,t.app.dotenv?.variables??{},r),entryPoints:[n]};return G0(o)}function Z0(e,t,r,n=process.env){let o=Pc(n,(p,m)=>Mc.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 Q0(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 eF(e){let t,r=await NB(e);if(r.includes("shopify_function_v1")?t=q0:r.includes("shopify_function_v2")&&(t=W0),!t)return;let n=z0(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 NB(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 tF(e,t,r,n=[]){let o=Nd(r.javy),s=Md(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 CH(e){let r=e.allExtensions.filter(l=>l.features.includes("function")&&l.isJavaScript).map(l=>X0(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(Nd(l)))}),s.forEach(l=>{a.push(io(Md(l)))}),await Promise.all(a)}var MB={async bundle(e,t){return RB(e,t)},async compile(e,t,r){return tF(e,t,r)}},K0="shopify-function",$d=class{exports;constructor(t){this.exports=t}async bundle(t,r,n=process.env){await Y0(t);let o=this.entrypointContents;ce("Generating dist/function.js using generated module:"),ce(o);let s={...Z0(t.directory,t.entrySourceFilePath,r.app.dotenv?.variables??{},n),stdin:{contents:o,loader:"ts",resolveDir:t.directory}};return G0(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),tF(t,r,n,["-C",`wit=${a}`,"-C",`wit-world=${K0}`])})}get wit(){let t=this.exports.map(r=>`export %${yd(r)}: func();`);return`package function:impl;
|
|
132
|
+
|
|
133
|
+
world ${K0} {
|
|
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 jB(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 rF(e,t){return async r=>{let n=await e.appsForOrg(t,r);return{apps:n.apps,hasMorePages:n.hasMorePages}}}d();d();import{brotliCompress as $B,constants as LB}from"node:zlib";import{promisify as UB}from"node:util";var kB=UB($B);async function qB(e){let t=await $e(e),r=Buffer.byteLength(t),o=(await kB(Buffer.from(t),{params:{[LB.BROTLI_PARAM_QUALITY]:11}})).byteLength;return{path:e,rawBytes:r,compressedBytes:o}}function nF(e){return e>=1024*1024?`${(e/(1024*1024)).toFixed(2)} MB`:`${(e/1024).toFixed(1)} KB`}async function iF(e){try{let{rawBytes:t,compressedBytes:r}=await qB(e);return` (${nF(t)} original, ~${nF(r)} compressed)`}catch(t){return ce(`Failed to get bundle size for ${e}: ${t}`),""}}d();d();import{createInterface as WB}from"readline";var HB=[".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=HB.map(o=>I("*",o));if(Ut(r)){let o=await zB(r);n.push(...o)}return Ve("*/*",{absolute:!0,cwd:e.directory,ignore:n})}function zB(e){return new Promise((t,r)=>{let n=[],o=WB({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 aI,formatMessagesSync as gF}from"./vendor/esbuild-ohos/lib/main.js";var _F=ai(mF(),1);async function Ld(e,t=process.env){let r=fI(e,t),n=await aI(r),o=await n.rebuild();lI(o,e),await cI(o,e.outputPath),await n.dispose()}async function cI(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 lI(e,t){let r=e?.warnings??[],n=e?.errors??[];r.length>0&&gF(r,{kind:"warning"}).forEach(s=>{t.stdout.write(s)}),n.length>0&&gF(n,{kind:"error"}).forEach(s=>{t.stderr.write(s)})}function fI(e,t=process.env){let r=Pc(t,(a,l)=>Mc.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:pI(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 pI(e,t=process.env){let r=[_F.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(dI(o)))}return r}function dI(e){return{name:"shopify:deduplicate-react",setup({onResolve:t}){t({filter:/^react$/},r=>({path:e}))}}}d();var Kc="# api_version: ";function oz(e,t){return`${Kc}${t}
|
|
151
|
+
|
|
152
|
+
${e}`}async function DI(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 yF({directory:e,localIdentifier:t,apiVersion:r}){let n=I(e,"schema.graphql"),o=await DI(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 MF=ai(NF(),1);async function jF(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 F=g.message??"Unknown error occurred",w=new k(`Failed to bundle extension ${e.localIdentifier}. Please check the extension source code for errors.`,F);throw w.errors=g.errors,w}await e.buildValidation({outputPath:o});let p=Math.round(performance.now()-l),m=await iF(o);return t.stdout.write(`${e.localIdentifier} successfully built in ${p}ms${m}`),o}async function $F(e,t){let r=I(e.directory,".build-lock"),n;try{n=await MF.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 yF({directory:e.directory,localIdentifier:e.localIdentifier,apiVersion:o.api_version}),!t.skipBuild){e.isJavaScript?await NI(e,t):await MI(e,t);let p=e.configuration.build?.wasm_opt;Ut(e.outputPath)&&p&&await Q0(e.outputPath),Ut(e.outputPath)&&await eF(e.outputPath)}let l=I(e.directory,e.outputRelativePath);Ut(e.outputPath)&&s!==e.outputPath&&s!==l&&he(s)!==he(e.outputPath)&&await RI(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 RI(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 NI(e,t){return e.buildCommand?(e.typegenCommand&&await vs(e,t),LF(e.buildCommand,e,t)):J0(e,t)}async function MI(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),LF(e.buildCommand,e,t)}async function LF(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 UF="shopify.app*.toml",jI=/^shopify\.app(\.[-\w]+)?\.toml$/,$I="*.extension.toml",LI="shopify.web.toml",kF="extensions/*",qF="**/node_modules/**",UI=".env*",As=class e{static async load(t){let r=await kI(t),n=[],o=await qI(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(kF)}let a=await WI(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 HI(r,l.size>0?[...l]:void 0,n),m=I(r,"package.json"),g=await X(m),F=g?await Oc(r):"unknown",w=g?await Jy(m):{},v=g?await Yy(r):!1,S=await zI(r),O=await VI(r);return new e({directory:r,packageManager:F,nodeDependencies:w,usesWorkspaces:v,appConfigFiles:o,extensionConfigFiles:a,webConfigFiles:p,dotenvFiles:S,hiddenConfigRaw:O,errors:n})}directory;packageManager;nodeDependencies;usesWorkspaces;appConfigFiles;extensionConfigFiles;webConfigFiles;dotenvFiles;hiddenConfigRaw;errors;constructor(t){this.directory=t.directory,this.packageManager=t.packageManager,this.nodeDependencies=t.nodeDependencies,this.usesWorkspaces=t.usesWorkspaces,this.appConfigFiles=t.appConfigFiles,this.extensionConfigFiles=t.extensionConfigFiles,this.webConfigFiles=t.webConfigFiles,this.dotenvFiles=t.dotenvFiles,this.hiddenConfigRaw=t.hiddenConfigRaw,this.errors=t.errors}appConfigByName(t){return this.appConfigFiles.find(r=>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 kI(e){let t=await ln(async r=>{if((await Ve(I(r,UF))).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 qI(e,t){let r=I(e,UF),o=(await Ve(r)).filter(s=>jI.test(Re(s)));return Vd(o,t)}async function WI(e,t,r){let o=(t.length>0?t:[kF]).map(a=>I(e,a,$I));o.push(`!${I(e,qF)}`);let s=await Ve(o);return Vd(s,r)}async function HI(e,t,r){let o=(t??["**"]).map(a=>I(e,a,LI));o.push(`!${I(e,qF)}`);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 zI(e){let t=I(e,UI),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 g0(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 VI(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 KI(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,KI);await mt(e,JSON.stringify(s,null,2))}var GI=E.array(E.string()).optional().transform(JI).transform(YI);function JI(e){return e?.map(t=>t.replace(/[\/\\]+$/,""))}function YI(e){return e?.map(t=>t.replace(/([^\*])\*$/,"$1**"))}var Qc=E.object({client_id:E.string(),build:E.object({automatically_update_urls_on_dev:E.boolean().optional(),dev_store_url:E.string().optional(),include_config_on_deploy:E.boolean().optional()}).optional(),extension_directories:GI,web_directories:E.array(E.string()).optional()}).passthrough();function VF(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 XI(e){return I(e,jr.hiddenFolder,jr.hiddenConfig)}var ft;(function(e){e.Frontend="frontend",e.Backend="backend",e.Background="background"})(ft||(ft={}));var WF=E.preprocess(Ad,E.string()),HF=E.object({auth_callback_path:E.union([WF,WF.array()]).optional(),webhooks_path:E.preprocess(Ad,E.string()).optional(),port:E.number().max(65536).min(0).optional(),commands:E.object({build:E.string().optional(),predev:E.string().optional(),dev:E.string()}),name:E.string().optional(),hmr_server:E.object({http_paths:E.string().array()}).optional()}),zF=E.enum([ft.Frontend,ft.Backend,ft.Background]).default(ft.Frontend),KF=E.union([HF.extend({roles:E.array(zF)}),HF.extend({type:zF})]),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:F,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=F??[],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=XI(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=ZI(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=QI(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 ZI(e,t){let r=[];return e.forEach(n=>{let o=n.configuration.ui.handle,s=GF(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 QI(e,t){let r=[],n=["ui_extension"];return e.forEach(o=>{o.configuration.inCollection.forEach(s=>{let a=GF(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 GF(e,t){return e.find(r=>r.handle===t)}async function nV(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 e6(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 JF(e){let t=[];for(let r of e)if(r.code==="invalid_union"&&r.unionErrors){let n=e6(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 YF=/^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(YF)?.[1]?.slice(1)}function tl(e){return!!YF.test(e)}d();d();d();d();d();d();d();async function Go(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 ZF(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),F;typeof g=="string"?F=[g]:Array.isArray(g)?F=g.filter(P=>typeof P=="string"):F=[];for(let P of F)if(P.trim()==="")throw new k(`'${t}' can't be empty.`);if(F.length===0)return ce(`No value for configKey '${t}', skipping
|
|
172
|
+
`,m),{filesCopied:0,pathMap:new Map};let w=a?I(n,a):n,v=Bt(F),S=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 Go(B,s,P);let q=await ci(B),J=w;if(q){let Q=await Ve(["**/*"],{cwd:B,absolute:!1}),fe=Q.map(ye=>Oe(n,I(J,ye)));if(p)for(let ye of Q)XF(Re(ye),P,l);await Ac(B,J),m.write(`Included '${P}'
|
|
173
|
+
`);for(let ye of Q)l.add(Re(ye));S.set(P,fe),O+=Q.length}else{await Rr(J);let Q=Re(B),fe;p?(XF(Q,P,l),fe=Q):fe=t6(Q,l),l.add(fe);let ye=Oe(n,I(J,fe)),We=I(J,fe);await Ir(B,We),m.write(`Included '${P}'
|
|
174
|
+
`),S.set(P,ye),O+=1}}return{filesCopied:O,pathMap:S}}function XF(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 t6(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 Gd(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 Gd(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 QF(e,t,r,n){let{extension:o,options:s}=t,a=[],l=[];for(let g of e)typeof g.anchor=="string"&&typeof g.groupBy=="string"?a.push(g):l.push(g);if(a.length===0&&l.length===0&&n.length===0)return;let p={};for(let g of l){let F=i6(g.key),w=rl(o.configuration,g.key);w!=null&&(p[F]=nl(w,r))}let m=new Map;for(let g of a){let F=`${g.anchor}||${g.groupBy}`,w=m.get(F);w?w.push(g):m.set(F,[g])}for(let g of m.values()){let{anchor:F,groupBy:w}=g[0],v=rl(o.configuration,F);if(Array.isArray(v))for(let S of v){if(S===null||typeof S!="object"||Array.isArray(S))continue;let O=S,P=O[w];if(typeof P!="string")continue;let B=g.map(J=>{let Q=r6(J.key,F),fe=Jd(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]=n6([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 r6(e,t){if(t===e)return"";let r=`${t}.`;return e.startsWith(r)?e.slice(r.length):e}function Jd(e,t){if(t==="")return e;let r=Gd(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?Jd(p,s):p);return{[n.name]:l}}return s&&a!==null&&a!==void 0&&typeof a=="object"&&!Array.isArray(a)?{[n.name]:Jd(a,s)}:{[n.name]:a}}function n6(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 i6(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 eE(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 Go(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 S=Oe(r,v),O=I(n,S);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:S})})),F=g.reduce((v,S)=>v+S.count,0),w=g.flatMap(v=>v.path===null?[]:[v.path]);return t.stdout.write(`Included ${F} file(s)
|
|
180
|
+
`),{filesCopied:F,outputPaths:w}}d();async function tE(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 Go(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 F=await Ve(["**/*"],{cwd:l,absolute:!1});await Ac(l,m),t.stdout.write(g);let w=Oe(s,m),v=w?F.map(S=>I(w,S)):F;return{filesCopied:F.length,outputPaths:v}}return await Rr(he(m)),await Ir(l,m),t.stdout.write(g),{filesCopied:1,outputPaths:[Oe(s,m)]}}var o6=E.object({type:E.literal("pattern"),baseDir:E.string().optional(),include:E.array(E.string()).default(["**/*"]),ignore:E.array(E.string()).optional(),destination:E.string().optional()}),u6=E.object({type:E.literal("static"),source:E.string(),destination:E.string().optional()}),s6=E.object({type:E.literal("configKey"),key:E.string(),destination:E.string().optional(),anchor:E.string().optional(),groupBy:E.string().optional(),preserveFilePaths:E.boolean().default(!1)}),a6=E.discriminatedUnion("type",[o6,u6,s6]),c6=E.object({inclusions:E.array(a6),generatesAssetsManifest:E.boolean().default(!1)}).strict().superRefine((e,t)=>{for(let[r,n]of e.inclusions.entries())if(n.type==="configKey"){let o=n.anchor!==void 0,s=n.groupBy!==void 0;o!==s&&t.addIssue({code:E.ZodIssueCode.custom,message:"`anchor` and `groupBy` must both be set or both be omitted",path:["inclusions",r]})}});async function rE(e,t){let r=c6.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 S=U=>o.stdout.write(U),O=v.destination?md(v.destination,S):void 0,P=O===""?void 0:O,B=await ZF({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 S=B=>o.stdout.write(B),O=v.destination?md(v.destination,S):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 eE({sourceDir:B,outputDir:U,patterns:v.include,ignore:v.ignore??[],appDirectory:a,sourceDirConfigValue:v.baseDir??"."},o),J=P?q.outputPaths.map(Q=>I(P,Q)):q.outputPaths;return{filesCopied:q.filesCopied,outputPaths:J}}if(v.type==="static")return tE({source:v.source,destination:P,baseDir:n.directory,outputDir:s,appDirectory:a},o)})),F=r.generatesAssetsManifest?g.flatMap(v=>v?.outputPaths??[]):[],w=[m,...g.map(v=>v?.filesCopied??0)];if(r.generatesAssetsManifest){let v=r.inclusions.filter(S=>S.type==="configKey");await QF(v,t,l,F)}return{filesCopied:w.reduce((v,S)=>v+(S??0),0)}}d();d();var Jo=ai(wB(),1);function l6(e){return new Map(e.map(t=>[t.uri,t.source]))}function f6(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 p6(e){switch(e){case Jo.Severity.ERROR:return{error:`
|
|
185
|
+
[error]:`};case Jo.Severity.WARNING:return{warn:`
|
|
186
|
+
[warning]:`};case Jo.Severity.INFO:return{info:`
|
|
187
|
+
[info]:`}}}function d6(e,t){return e.map((n,o)=>{let{message:s,uri:a,start:l,end:p,check:m,severity:g}=n,F=t.get(a),w=F===void 0?[]:[`
|
|
188
|
+
|
|
189
|
+
${f6(F,l.line,p.line)}`],v=o===e.length-1?"":`
|
|
190
|
+
|
|
191
|
+
`;return[p6(g),{bold:m},{subdued:`
|
|
192
|
+
${s}`},...w,v]}).flat()}async function nE(e){let r=await X(I(e,".theme-check.yml"))?void 0:"theme-check:theme-app-extension",{offenses:n,theme:o}=await(0,Jo.themeCheckRun)(e,r),s=d6(n,l6(o));return a0(s)}async function iE(e,t){let{extension:r,options:n}=t;n.stdout.write("Running theme check on your Theme app extension...");let o=await nE(r.directory);o&&n.stdout.write(o)}d();async function oE(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 uE(e,t){let r=t.extension.configuration;t.options.buildDirectory=e.config?.bundleFolder??void 0;let n=await jF(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=D6(a,e.config?.bundleFolder);Object.keys(l).length>0&&await Zd(t,l)}function D6(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 sE(e,t){return $F(t.extension,t.options)}d();async function aE(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 cE(e,t){switch(e.type){case"include_assets":return rE(e,t);case"build_theme":return iE(e,t);case"bundle_theme":return oE(e,t);case"bundle_ui":return uE(e,t);case"build_function":return sE(e,t);case"create_tax_stub":return aE(e,t);default:throw new Error(`Unknown build step type: ${e.type}`)}}async function lE(e,t){let r=Date.now();try{let n=await cE(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 h6,readSync as m6,closeSync as g6}from"fs";var fE=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 _6(e){let t=h6(e,"r");try{let r=Buffer.alloc(fE),n=m6(t,r,0,fE,0);return r.subarray(0,n).toString()}finally{g6(t)}}function pE(){il.clear(),ol.clear(),ul.clear()}function y6(e){let t=il.get(e);if(t)return t;let r=_6(e),n=e.substring(e.lastIndexOf(".")),o;switch(n){case".js":case".mjs":case".cjs":case".ts":case".tsx":case".jsx":o=DE(r,e);break;case".rs":o=F6(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=y6(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 dE(){return{directImports:il.size,fileExists:ol.size,isDir:ul.size}}function eD(e,t){return DE(e,t)}function DE(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=E6(a,t);l&&r.push(l)}}}return Bt(r)}function F6(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=v6(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 E6(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 v6(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 C6=["**/node_modules/**","**/.git/**","**/*.test.*","**/dist/**","**/*.swp","**/generated/**","**/.gitignore"],w6="Configuration accepted",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)??""}get hasNoLocalDevOutput(){return this.features.length===0&&!this.hasDeploySteps&&this.outputRelativePath===""}constructor(t){this.configuration=t.configuration,this.configurationPath=t.configurationPath,this.entrySourceFilePath=t.entryPath??"",this.directory=t.directory,this.specification=t.specification,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 lE(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(t){if(this.specification.getDevSessionUpdateMessages)return this.specification.getDevSessionUpdateMessages(this.configuration,t);if(t.status==="created"&&!this.isAppConfigExtension&&this.hasNoLocalDevOutput)return[w6]}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??C6}}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,pE(),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=dE(),a=s?` (cache: ${s.directImports} parsed, ${s.fileExists} stats)`:"";return ce(`Import scan for "${this.handle}": ${r.length} entries, ${this.cachedImportPaths.length} files, ${o}ms${a}`),this.cachedImportPaths}catch(t){return ce(`Failed to scan imports for extension ${this.handle}: ${t}`),this.cachedImportPaths=[],this.cachedImportPaths}}buildHandle(){switch(this.specification.uidStrategy){case"single":return this.specification.identifier;case"uuid":return this.configuration.handle??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,y0)}else return xc(JSON.stringify(this.configuration))}}};d();async function hE(e,t=""){let r=b6(t),n=await ms(r);for(;await X(I(e,al(n)))&&await Nr({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 mE(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 b6(e){return{message:"Configuration file name:",initialAnswer:e,validate:A6,preview:t=>`${al(t,!0)} will be generated in your root directory`}}function A6(e){if(Lt(e).length>238)return"The file name is too long."}d();d();d();import{readdirSync as S6}from"fs";async function cl(e){if(!e||!await ci(e))return{};let t={},r=S6(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}function yG(){return p0()}function FG(){return d0()}function EG(){return D0()}async function gE(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 vG({stores:e,hasMorePages:t=!1,onSearchForStoresByName:r,showDomainOnPrompt:n=!0,onCreateStoreWhenEmpty:o,onCreateStore:s}){if(e.length===0)return o?.();if(e.length===1&&!t&&!s)return u0(`Using your default dev store, ${e[0].shopName}, to preview your project.`),e[0];let a=v=>{let S=v.shopName;return n&&v.shopDomain&&(S=`${v.shopName} (${v.shopDomain})`),{label:S,value:v.shopId}},l=e,p=new Map(e.map(v=>[v.shopId,v])),m="__create_new_dev_store__",g=()=>[...l.map(a),...s?[{label:"Create a new dev store",value:m}]:[]],F={};r&&(F.search=async v=>{let S=await r(v);return l=S.stores,l.length>0&&l.forEach(O=>p.set(O.shopId,O)),{data:g(),meta:{hasNextPage:S.hasMorePages}}});let w=await vd({message:"Which store would you like to use to view your project?",choices:g(),hasMorePages:t,...F});return w===m?s?.():p.get(w)}async function _E(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 CG(e){return Nr({message:"Finished creating a dev store?",confirmationMessage:`Yes, ${e.businessName} has a new dev store`,cancellationMessage:"No, cancel dev"})}async function yE(){return Nr({message:"Create this project as a new app on Shopify?",confirmationMessage:"Yes, create it as a new app",cancellationMessage:"No, connect it to an existing app"})}function FE(e,t){let r=["application_url","redirect_urls"];t.appProxy?.proxyUrl&&r.push("app_proxy");let n={"Currently released app URL":[e],"=> Dev URL":[t.applicationUrl],"Affected configurations":r};return Nr({message:"Have Shopify override your app URLs when running `app dev` against your dev store? This won't affect your app on other stores",confirmationMessage:"Yes, automatically update",cancellationMessage:"No, never",infoTable:n})}function wG(){return Nr({message:"--use-localhost requires a certificate for `localhost`. Generate it now?",confirmationMessage:"Yes, use mkcert to generate it",cancellationMessage:"No, I'll run `app dev` again without `--use-localhost`"})}d();var EE;function rD(){return EE??=new Ny({projectName:"shopify-cli-app"}),EE}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 vE(e,t=rD()){let r=Zi(e),n=t.get(r);n&&t.set(r,{...n,configFile:void 0})}async function kG(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 x6(e.tunnelClient)),{frontendUrl:r,frontendPort:t,usingLocalhost:n}}async function x6(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 CE(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:P6(hi(r.url,e),e),proxySubPath:r.subpath,proxySubPathPrefix:r.prefix}}:{};return{applicationUrl:e,redirectUrlWhitelist:n,...o}}function P6(e,t){let r=new URL(e),n=new URL(t);return r.host=n.host,r.toString().replace(/\/$/,"")}async function qG(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 WG(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 FE(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 HG(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 Mr(`Multiple tunnel plugins for ${r} found`);let s=o[0];if(!s)throw new Mr(`We couldn't find the ${r} tunnel plugin`);if(s.isErr())throw new k(`${r} failed to start the tunnel.
|
|
194
|
+
${s.error.message}`,["What to try:",{list:{items:[["Try to run the command again"],["Add the flag",{command:"--tunnel-url {URL}"},"to use a custom tunnel URL"]]}}]);return s.value}d();d();async function nD({directory:e,configName:t,warningContent:r,shouldRenderSuccess:n=!0,reset:o=!1}){if(o){vE(e);let l=await Oc(e);hs({headline:"Cleared current configuration.",body:["In order to set a new current configuration, please run",{command:Nc(l,"shopify app config use CONFIG_NAME")},{char:"."}]});return}r&&Ic(r);let s=(await O6(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 O6(e,t){if(t){let r=yr(t);return await X(I(e,r))?Bn(r):to(`Could not find configuration file ${r}`)}return mE(e)}async function bE(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 wE(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),F=e.appConfigByName(g);if(!F)throw new k(Se`Couldn't find ${g} in ${Ae.path(e.directory)}.`);return wE(e,F,m)}async function wE(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 AE(e,t){await My("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 T6,readFileSync as B6}from"fs";var I6=[{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 PE(e){let t={},r=I6.find(n=>(!n.detectors.some||n.detectors.some.reduce((o,s)=>SE(s,xE(e,s.path,t)),!1))&&(!n.detectors.every||n.detectors.every.reduce((o,s)=>o?SE(s,xE(e,s.path,t)):!1,!0)));return r?r.name:"unknown"}function SE(e,t={}){return t[e.path]?!e.matchContent||new RegExp(e.matchContent).test(t[e.path]):!1}function xE(e,t,r={}){if(r[t])return r;let n=I(e,t);if(!T6(n))return r;let o=B6(n,{encoding:"utf8"});return r[t]=o,r}var BE=ai(bB(),1);function R6(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=R6(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 IE(e,t,n)}function IE(e,t,r){let n=e.safeParse(r);return n.success?{data:n.data}:{errors:JF(n.error.issues).map(o=>({file:t,message:o.message,path:o.path,code:o.code}))}}function OE(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 QJ(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 eY(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(F=>RE(F.path,F.content))),l=a.flatMap(F=>F.errors??[]);if(l.length>0)throw new k(l.map(Ts).join(`
|
|
196
|
+
`));let m=a.filter(F=>"web"in F).map(F=>F.web).some(F=>dn(F,ft.Frontend)||dn(F,ft.Backend)),g=el(o);return{isLaunchable:m,scopesArray:g,name:t,directory:r.directory,isEmbedded:m}}async function RE(e,t){let r=await sD(KF,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 PE(he(e))}}}async function NE(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=VF(n),F=r.file.path,w=Re(F),v=await sD(g,F,p);if(v.errors){let J=v.errors.map(Ts).join(`
|
|
197
|
+
`);throw new k(`Validation errors in ${F}:
|
|
198
|
+
|
|
199
|
+
${J}`)}let S=v.data,O=$6(t.appConfigFiles,{[w]:S.client_id}),P=!1;try{P=await M6(t.directory,F)}catch{}let B={allClientIdsByConfigName:O,usesLinkedConfig:!0,name:w,gitTracked:P,source:r.source,usesCliManagedUrls:S.build?.automatically_update_urls_on_dev},U={directory:t.directory,configPath:F,configuration:S,configurationLoadResultMetadata:B,configSchema:g,specifications:n,remoteFlags:o};return new oD({ignoreUnknownExtensions:s,loadedConfiguration:U,project:t,reloadState:a}).loaded()}function N6(e){return e.access_scopes?.scopes??""}async function ME(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 j6(t.directory,e.configName),o=(await Ct.read(r)).content;return{state:"loaded-template",rawConfig:o,scopes:N6(o),appDirectory:t.directory,packageManager:t.packageManager}}catch{return{state:"error"}}}}async function tY(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 jE(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 q6(o);let a=fl(this.project,n),l=await this.loadExtensions(r,t),p=t.name,g=t.handle??p??"",F=await pl(this.project,t.client_id);this.reloadState||await AE(r,this.project.nodeDependencies);let{webs:w,usedCustomLayout:v}=await this.loadWebs(r,t.web_directories),S=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:F,devApplicationURLs:this.getDevApplicationURLs(t,w)}),O=S.realExtensions.map(P=>P.type);return await c0(O),await U6(S,this.project.usesWorkspaces,{usedCustomLayoutForWeb:v,usedCustomLayoutForExtensions:t.extension_directories!==void 0}),await S.generateExtensionTypes(),S}async loadWebs(t,r){let n=this.activeConfigFile,o=n?uD(this.project,n):this.project.webConfigFiles,s=o.map(g=>g.path),a=await Promise.all(o.map(g=>RE(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=OE(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 F=this.reloadState.extensionDevUUIDs.get(m.handle);F&&(g.devUUID=F)}if(l){let F=await g.validate();F.isErr()&&this.errors.addError({file:n,message:s0(F.error).trim()})}return g}async loadExtensions(t,r){if(this.specifications.length===0)return[];let n=await this.createExtensionInstances(t),o=await this.createConfigExtensionInstances(t,r),s=this.createWebhookSubscriptionInstances(t,r),a=await Promise.all([...n,...o,...s]),l=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),F=Ey(g.map(w=>w.name));this.errors.addError({file:m.configurationPath,message:`Duplicated handle "${m.handle}" in extensions ${F}. Handle needs to be unique per extension.`})}else m.handle&&p.add(m.handle)}),l}async createExtensionInstances(t){let r=this.activeConfigFile;return(r?TE(this.project,r):this.project.extensionConfigFiles).map(async o=>{let s=o.path,a=he(s),l=o.content,p=F0.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 F=await sD(v0,s,o.content);if(F.errors)return this.errors.addErrors(F.errors),[];let w=F.data,v=w.extensions.map(async S=>{let O={...w,...S};return O.handle||(this.errors.addError({file:s,message:`Missing handle for extension "${O.name}" at ${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=IE(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:F,topics:w,compliance_topics:v,...S}=g;return w?.map(O=>({api_version:a,uri:F,topic:O,...S}))})).map(async g=>this.createExtensionInstance(o.identifier,g,n,t))}async createConfigExtensionInstances(t,r){let n=this.loadedConfiguration.configPath,o=await Promise.all(this.specifications.filter(a=>Lc(a)).filter(a=>a.identifier!==_s).map(async a=>{let l=OE(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&&CE(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 bE(n,t,r);return{project:n,activeConfig:o}}async function M6(e,t){let r=I(e,".gitignore");if(!Ut(r))return!0;let n=await $e(r),o=BE.default.default().add(n),s=Oe(e,t);return!o.ignores(s)}async function j6(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 $6(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 L6(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 U6(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 k6(n,o,r,s,a,l,p,t)}async function k6(e,t,r,n,o,s,a,l){await mr.addPublicMetadata(async()=>{let p=await L6(e),m=t.filter(B=>B.isFunctionExtension).length,g=t.filter(B=>B.isESBuildExtension).length,F=t.filter(B=>B.isThemeExtension).length,w=t.length,v=e.filter(B=>dn(B,ft.Backend)).length,S=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:F>0,app_extensions_theme_count:F,app_extensions_ui_any:g>0,app_extensions_ui_count:g,app_name_hash:ds(n),app_path_hash:ds(o),app_scopes:JSON.stringify(a),app_web_backend_any:v>0,app_web_backend_count:v,app_web_custom_layout:r.usedCustomLayoutForWeb,app_web_framework:S,app_web_frontend_any:O>0,app_web_frontend_count:O,env_package_manager_workspaces:l}}),await mr.addSensitiveMetadata(async()=>({app_name:n}))}async function q6(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 W6="project.json";async function aD(e){let t=await h0(e),r=I(t,W6);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 TE(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 mY(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 $E=2,H6=["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 LE(e,t,r,n,o){let s=e.length===0;if(s||(s=await yE()),s){let a=await _E(o.name);return n.createApp(r,{...o,name:a})}else{for(let l=0;l<$E;l++){let p=await gE(rF(n,r.id),e,t,{directory:o.directory});if(p){let m=await n.appFromIdentifiers(p.apiKey);if(m)return m}else{l<$E-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 Mr(a,H6)}}d();d();d();async function UE(e,t,r){let n=await z6(e,t,r),{app:{versionsDiff:o}}=await r.appVersionsDiff(e,{versionId:n.uuid,appVersionId:n.id});return{versionsDiff:o,versionDetails:n}}async function z6(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 V6(e,t){return t?e.find(n=>n.identifier===t||n.externalIdentifier===t||n.additionalIdentifiers?.includes(t))?.uidStrategy:void 0}async function kE(e,t,r,n,o){let a=(o??await t.activeAppVersion(e))?.appModuleVersions.filter(p=>V6(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 MY(e,t,r){let{versionsDiff:n,versionDetails:o}=await UE(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 jY({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 Nr({message:`Migrate ${r}?`,confirmationMessage:a,cancellationMessage:"No, cancel"})}d();async function qE(e){let{extensionsToMigrate:t,appId:r,remoteExtensions:n,migrationClient:o}=e;await Promise.all(t.map(({remote:l})=>K6({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 K6(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 WE(e){let{extensionsToMigrate:t,appId:r,remoteExtensions:n,migrationClient:o}=e;return await Promise.all(t.map(({remote:s})=>G6({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 G6(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 HE={marketing_activity:["marketing_activity_extension"]},zE={flow_action:["flow_action_definition"],flow_trigger:["flow_trigger_definition"],flow_trigger_lifecycle_callback:["flow_trigger_discovery_webhook"]},VE={ui_extension:["CHECKOUT_UI_EXTENSION","POS_UI_EXTENSION"]},KE={admin_link:["app_link","bulk_action"]};function J6(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=J6(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,F)=>{let w=o[F.localIdentifier]??"unknown",v=m.get(w)??m.get(F.localIdentifier.toLowerCase()),S=n[F.type]?.includes(v?.type??"undefined");return v&&S&&g.push({local:F,remote:v}),g},[])}async function GE(e){let{extensionsToMigrate:t,appId:r,type:n,remoteExtensions:o,migrationClient:s}=e;await Promise.all(t.map(({remote:l})=>Y6({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 Y6(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 JE=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 YE=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 XE=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=R0.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(JE,t)}async migrateAppModule(t){return this.request(XE,t)}async migrateToUiExtension(t){return this.request(YE,t)}createUnauthorizedHandler(){return N0(this)}};async function QE(e){return await X6(e)?e.developerPlatformClient.activeAppVersion(e.remoteApp):e.activeAppVersion}async function X6(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,F=dl.getInstance(),w=!1,v=m,S=pD(l,v,p,VE);if(S.length>0){if(!await fD(S))throw new In;v=await WE({extensionsToMigrate:S,appId:r,remoteExtensions:v,migrationClient:F}),w=!0}let O=[{typesMap:zE,migrate:qE},ZE(HE,"marketing_activity"),ZE(KE,"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:F});v=v.concat(q),w=!0}return w}function ZE(e,t){return{typesMap:e,migrate:r=>GE({...r,type:t})}}d();d();var Z6={bullet:"+",color:"green",suffix:"(new)"},Q6={color:"#FF8800",suffix:"(updated)"},eR={bullet:"-",color:"red",suffix:"(removed)"};function DD(e){return[...e.new.map(t=>dD(t,Z6)),...e.updated?e.updated.map(t=>dD(t,Q6)):[],...e.unchanged,...e.removed.map(t=>dD(t,eR))]}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 tR({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 F=[];throw g&&F.push("--allow-updates"),l&&F.push("--allow-deletes"),new k("This deployment includes changes that require confirmation.",["Run the command with",{command:F.join(" ")},"to deploy without confirmation."])}return!1}async function ev({allowUpdates:e,allowDeletes:t,extensionIdentifiersBreakdown:r,configExtensionIdentifiersBreakdown:n,appTitle:o,release:s,installCount:a}){if(await mr.addPublicMetadata(()=>oR(n)),tR({release:s,allowUpdates:e,allowDeletes:t,extensionIdentifiersBreakdown:r,configExtensionIdentifiersBreakdown:n}))return!0;let p=await nR(r),m=await iR(s,n);return rR({appTitle:o,extensionsContentPrompt:p,configContentPrompt:m,release:s,installCount:a})}async function rR({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}`:""}?`,F=r&&s!==void 0&&s>0;m?l=await t0({message:g,infoTable:p,confirmation:e,...F?{warningItem:["This release removes extensions and related data from",{error:s.toString()},`app installations.
|
|
243
|
+
Use caution as this may include production data on live stores.`]}:{}}):l=await Nr({message:g,infoTable:p,confirmationMessage:`Yes, ${o?"release":"create"} this new version`,cancellationMessage:"No, cancel"});let w=new Date().valueOf()-a;return await mr.addPublicMetadata(()=>({cmd_deploy_confirm_cancelled:!l,cmd_deploy_confirm_time_to_complete_ms:w})),l}async function nR(e){let{onlyRemote:t,toCreate:r,toUpdate:n,unchanged:o}=e,s=(g,F)=>{switch(g.experience){case"dashboard":return[g.title,{subdued:`(${F}from Partner Dashboard)`}];case"extension":return g.uid&&g.uid.length>0?`${g.title} (uid: ${g.uid})`:g.title}},a,l={new:r.map(g=>s(g,"new, ")),unchanged:o.map(g=>s(g,"")),updated:n.map(g=>s(g,"updated, ")),removed:t.map(g=>s(g,"removed, "))},p=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 iR(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 oR(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 tv(e){let t=await QE(e),r=await uR({options:e,activeAppVersion:t}),n=cR(r),o=await aR(e,t),a=e.release&&!e.allowDeletes&&n.onlyRemote.length>0?await dR(e).catch(()=>{}):void 0;if(!await ev({extensionIdentifiersBreakdown:n,configExtensionIdentifiersBreakdown:o,appTitle:e.remoteApp?.title,release:e.release,allowUpdates:e.allowUpdates,allowDeletes:e.allowDeletes,installCount:a}))throw new In;return lR(r)}async function uR({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(F=>o[F.localIdentifier]===m.registrationUuid)??sR(n,s,m);if(g)return{experience:g.specification.experience,status:"updated",local:g,remote:m}}else{let g=n.find(F=>m.registrationId===F.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 sR(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 aR(e,t){let{app:r,appId:n}=e,o=await fR(r,n),s=Zo(t?.appModuleVersions??[],r.specifications??[],r.remoteFlags);return lD(o,s)}function cR(e){let t=e.filter(r=>r.experience==="extension");return{onlyRemote:t.filter(r=>r.status==="deleted").map(r=>pR(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 lR(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 fR(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 pR(e){return e.specification?.options.managementExperience==="dashboard"?cD(e.registrationTitle):Qo(e.registrationTitle,e.registrationId)}async function dR(e){return e.developerPlatformClient.appInstallCount({id:e.remoteApp.id,apiKey:e.remoteApp.apiKey,organizationId:e.remoteApp.organizationId})}d();function rv({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 XX({app:e,appApiKey:t,extensionUuids:r,command:n},o=process.env){let s=e.dotenv;s??={path:I(e.directory,jE(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=_0(m,a);await mt(s.path,g),e.dotenv=s}return e}function nv({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 iv=e=>({message:Se`Invalid Client ID: ${e}`,tryMessage:Se`You can find the Client ID in the app settings in the Developer Dashboard.`}),ov=["You can pass",{command:"--reset"},"to your command to reset your app configuration."],DR=(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"],DR(o,s))}return r};async function gZ(e){let{noRelease:t,app:r,remoteApp:n,developerPlatformClient:o,organization:s}=e,a=await o.activeAppVersion(n);await hR(r),sv({org:s.businessName,appName:n.title,appDotEnv:r.dotenv?.path,configFile:Re(r.configPath),messages:[ov]});let l=await tv({app:r,appId:n.apiKey,appName:n.title,release:!t,developerPlatformClient:o,envIdentifiers:nv({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 hR(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?mR():gR()}function mR(){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 gR(){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 uv(e){let t=Pd(),r=e.organizationId?await qc(e.organizationId,t):await _R(),{organization:n,apps:o,hasMorePages:s}=await t.orgAndApps(r.id),a=await LE(o,s,n,t,e);return await hD(a,t.organizationSource),a}async function _R(){let e=await M0();if(e.length===0)throw new k("No organizations found.","Make sure you have access to a Shopify organization.");return f0(e)}function _Z({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=[ov];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)."]),sv({org:e.businessName,appName:r.title,devStore:n.shopDomain,updateURLs:s,configFile:Re(t.configPath),messages:l})}function sv({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:rv({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 av(e,t){ce(`Writing app configuration to ${t}`);let r=FR(structuredClone(e)),n=mD(r),o=new Ct(t,{});await o.replace(n),await o.transformRaw(yR)}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 yR(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 FR(e){let t=e.webhooks;if(Array.isArray(t?.subscriptions)&&t.subscriptions.length){let r=no(e?.application_url);t.subscriptions=b0(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 ER=zo.extend({app_proxy:E.object({url:E.preprocess(no,jc(E.string({invalid_type_error:"Value must be string"}))),subpath:E.string({invalid_type_error:"Value must be a string"}),prefix:E.string({invalid_type_error:"Value must be a string"})}).optional()}),gD="app_proxy",vR={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}}}},CR=di({identifier:gD,schema:ER,transformConfig:vR,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})}}),cv=CR;d();var wR=zo.extend({pos:E.object({embedded:E.boolean({invalid_type_error:"Value must be Boolean"})}).optional()}),_D="point_of_sale",bR={embedded:"pos.embedded"},AR=di({identifier:_D,schema:wR,transformConfig:bR}),lv=AR;d();d();function fv(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 pv(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",SR={forward:fv,reverse:e=>pv(e)},xR=zo.extend({events:E.any().optional()}),PR=di({identifier:yD,schema:xR,transformConfig:SR}),dv=PR;d();var OR={forward:BR,reverse:e=>IR(e)},ED="privacy_compliance_webhooks",TR=di({identifier:ED,schema:kc,transformConfig:OR}),Dv=TR;function BR(e,t){let r=vt(e,"webhooks"),n;"application_url"in t&&(n=t?.application_url);let o=Wy({customers_redact_url:FD(RR(r),n),customers_data_request_url:FD(NR(r),n),shop_redact_url:FD(MR(r),n)});if(Object.keys(o).length===0)return o;{let{api_version:s}=r;return{api_version:s,...o}}}function IR(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:w0(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 RR(e){return vD(e,"customers/redact")??e?.privacy_compliance?.customer_deletion_url}function NR(e){return vD(e,"customers/data_request")??e?.privacy_compliance?.customer_data_request_url}function MR(e){return vD(e,"shop/redact")??e?.privacy_compliance?.shop_deletion_url}d();var jR="@shopify/post-purchase-ui-extensions",$R=Ge.extend({metafields:E.array(pi).optional()}),LR=Te({identifier:"checkout_post_purchase",dependency:jR,partnersWebIdentifier:"post_purchase",schema:$R,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??[]})}),hv=LR;d();var UR="@shopify/checkout-ui-extensions",kR=Ge.extend({name:E.string(),extension_points:E.array(E.string()).optional(),metafields:E.array(pi).optional(),settings:E.object({fields:E.any().optional()}).optional()}),qR=Te({identifier:"checkout_ui_extension",dependency:UR,schema:kR,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")})}),mv=qR;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"},hQ=["customer","order","product","marketing_activity","abandonment","company","company_contact"],gv=[wt.customer_reference,wt.order_reference,wt.product_reference,wt.company_reference,wt.company_contact_reference],_v=[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"},yv=[[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"]],WR=[Qe.boolean,Qe.email,Qe.multiLineText,Qe.int,Qe.singleLineText,Qe.url,Qe.decimal],HR=[Qe.boolean,Qe.email,Qe.singleLineText,Qe.url,Qe.decimal,Qe.schemaTypeReference],Fv=yv.filter(([e])=>WR.includes(e)),Ev=yv.filter(([e])=>HR.includes(e));d();d();var zR=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(!zR(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 VR=new Map(Fv),KR=new Map(Ev),GR=(e,t)=>{let r=t==="flow_action"?VR:KR,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},JR=(e,t)=>{if(t==="flow_trigger"&&!gv.includes(e.type))throw new k(`Commerce object ${e.type} is not supported for Flow Triggers`);if(t==="flow_action"&&!_v.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)?JR(n,e):GR(n,e)):[];var wD=E0.extend({key:E.string().regex(/^[a-zA-Z\s]*$/,{message:"String must contain only alphabetic characters and spaces"}).optional()}),YR=Ho.extend({type:E.literal("flow_trigger"),name:E.string(),schema:E.string().optional(),settings:E.object({fields:E.array(wD).optional()}).optional()}).refine(e=>{let t=e.settings?.fields??[],r=t.every((o,s)=>gl(o,"flow_trigger",e.handle,s)),n=Cv(t,e.schema);return r&&n}),XR=Te({identifier:"flow_trigger",schema:YR,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)})}),vv=XR;function wv(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=E.object({type:E.string(),description:E.string().optional()}).strict(),gl=(e,t,r,n)=>{let o=Object.keys(wt).includes(e.type);return o?o?bD.extend({required:E.boolean().optional(),marketingActivityCreateUrl:E.string().optional(),marketingActivityDeleteUrl:E.string().optional()}).parse(e):bD.parse(e):t==="flow_action"?bD.extend({key:E.string(wv("key",e,r,n)),name:E.string(wv("name",e,r,n)),required:E.boolean().optional()}).parse(e):wD.parse(e)},CD=e=>e.startsWith("schema."),ZR=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=>!ZR(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."}),bv=(e,t,r)=>{if(e||t){if(!e)throw new E.ZodError([{code:E.ZodIssueCode.custom,path:["extensions[0].config_page_url"],message:"To set a custom configuration page a `config_page_url` must be specified."}]);if(!t)throw new E.ZodError([{code:E.ZodIssueCode.custom,path:["extensions[0].config_page_preview_url"],message:"To set a custom configuration page a `config_page_preview_url` must be specified."}]);if(!r)throw new E.ZodError([{code:E.ZodIssueCode.custom,path:["extensions[0].validation_url"],message:"To set a custom configuration page a `validation_url` must be specified."}])}return!0},Cv=(e,t)=>{if(e.some(r=>CD(r.type))&&!t)throw new E.ZodError([{code:E.ZodIssueCode.custom,path:["extensions[0].schema"],message:"To reference schema types a `schema` must be specified."}]);return!0},Av=(e,t)=>{if(e||t){if(!e)throw new E.ZodError([{code:E.ZodIssueCode.custom,path:["extensions[0].return_type_ref"],message:"When uploading a schema a `return_type_ref` must be specified."}]);if(!t)throw new E.ZodError([{code:E.ZodIssueCode.custom,path:["extensions[0].schema"],message:"To set a return type a `schema` must be specified."}])}return!0};d();var Sv=["runtime_url","validation_url","config_page_url","config_page_preview_url"];var QR=Ho.extend({type:E.literal("flow_action"),name:E.string(),runtime_url:Bs(E.string({invalid_type_error:"Value must be string"})),validation_url:Bs(E.string({invalid_type_error:"Value must be string"})).optional(),config_page_url:Bs(E.string({invalid_type_error:"Value must be string"})).optional(),config_page_preview_url:Bs(E.string({invalid_type_error:"Value must be string"})).optional(),schema:E.string().optional(),return_type_ref:E.string().optional()}).refine(e=>{let t=bv(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=Av(e.return_type_ref,e.schema);return t&&n&&o}),eN=Te({identifier:"flow_action",schema:QR,appModuleFeatures:e=>[],patchWithAppDevURLs:(e,t)=>{for(let r of Sv){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}}}),xv=eN;d();import tN from"fs";var Pv=["buyer_experience","customers","fulfillment","inventory_and_merch","loyalty","orders","promotion","risk","b2b","payment_reminders","custom_data","error_monitoring"],rN=["capture_at_fulfillment"],nN=Ho.extend({type:E.literal("flow_template"),name:E.string(),description:E.string().max(1024),template:E.object({categories:E.array(E.string().refine(e=>Pv.concat(rN).includes(e),e=>({message:`${e} is not a valid category. Valid categories include: ${Pv.join(", ")}.`}))),module:E.string(),require_app:E.boolean().optional(),discoverable:E.boolean().optional(),allow_one_click_activate:E.boolean().optional(),enabled:E.boolean().optional()})}),iN=Te({identifier:"flow_template",schema:nN,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 oN(t,e.template.module),localization:await pn(t,e.name)})});async function oN(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 tN.readFileSync(n,"base64")}var Ov=iN;d();var uN=Ge.extend({build:E.object({command:E.string().transform(e=>e.trim()===""?void 0:e).optional(),path:E.string().optional(),watch:E.union([E.string(),E.string().array()]).optional(),wasm_opt:E.boolean().optional().default(!0),typegen_command:E.string().transform(e=>e.trim()===""?void 0:e).optional()}).optional(),name:E.string(),type:E.string(),configuration_ui:E.boolean().optional().default(!0),ui:E.object({enable_create:E.boolean().optional(),paths:E.object({create:E.string(),details:E.string()}).optional(),handle:E.string().optional()}).optional(),api_version:E.string(),input:E.object({variables:E.object({namespace:E.string(),key:E.string()}).optional()}).optional(),targeting:E.array(E.object({target:E.string(),input_query:E.string().optional(),export:E.string().optional()})).optional()}),sN=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:uN,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 aN(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 aN(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 Tv=sN;d();d();d();var Bv=50,Fr=Ge.extend({api_version:E.string(),payment_session_url:E.string().url(),refund_session_url:E.string().url().optional(),capture_session_url:E.string().url().optional(),void_session_url:E.string().url().optional(),supported_countries:E.array(E.string()),supported_payment_methods:E.array(E.string()),test_mode_available:E.boolean(),merchant_label:E.string().max(Bv),input:E.object({metafield_identifiers:E.object({namespace:E.string(),key:E.string()}).optional()}).optional()}),gi=E.object({buyer_label:E.string().max(Bv).optional(),buyer_label_translations:E.array(E.object({locale:E.string(),label:E.string()})).optional()}),tu=E.object({supports_installments:E.boolean().optional(),supports_deferred_payments:E.boolean().optional()}),_l=E.object({multiple_capture:E.boolean().optional()}),_i=E.object({confirmation_callback_url:E.string().url().optional(),supports_3ds:E.boolean()}),Dn=E.object({supported_buyer_contexts:E.array(E.object({currency:E.string(),countries:E.array(E.string()).nonempty().optional()}).strict()).optional().refine(e=>e===void 0||e.every(t=>t.countries)||e.every(t=>!t.countries),{message:"Must all be defined with only a currency, or must all be defined with a currency plus countries -- a mixture of the two is not allowed"})});var AD="payments.offsite.render",Iv=Fr.merge(gi).merge(tu).merge(_i).merge(_l).merge(Dn).extend({targeting:E.array(E.object({target:E.literal(AD)})).length(1),supports_oversell_protection:E.boolean().optional(),supports_3ds:E.boolean().optional()}).refine(e=>!e.supports_oversell_protection||e.confirmation_callback_url,{message:"Property required when supports_oversell_protection is true",path:["confirmation_callback_url"]}).refine(e=>e.supports_installments===e.supports_deferred_payments,{message:"supports_installments and supports_deferred_payments must be the same"});function 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,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 Rv(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",Nv=Fr.merge(gi).merge(Dn).extend({targeting:E.array(E.object({target:E.literal(SD)})).length(1),api_version:E.string(),balance_url:E.string().url(),ui_extension_handle:E.string().optional(),checkout_payment_method_fields:E.array(E.object({type:E.union([E.literal("string"),E.literal("number"),E.literal("boolean")]),required:E.boolean(),key:E.string()})).optional()});function jee(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 Mv(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",jv=7,$v=Fr.merge(gi).merge(tu).merge(_i).merge(Dn).extend({targeting:E.array(E.object({target:E.literal(xD)})).length(1),supports_3ds:E.boolean().optional(),update_payment_session_url:E.string().url().optional(),multiple_capture:E.boolean().optional(),supports_oversell_protection:E.boolean().optional(),modal_payment_method_fields:E.array(E.object({})).optional(),ui_extension_handle:E.string().optional(),start_verification_session_url:E.string().url().optional(),checkout_payment_method_fields:E.array(E.object({type:E.union([E.literal("string"),E.literal("number"),E.literal("boolean")]),required:E.boolean(),key:E.string()})).max(jv,`The extension can't have more than ${jv} 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 Wee(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 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,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",Uv=7,kv=Fr.merge(gi).merge(_i).merge(Dn).required({refund_session_url:!0,capture_session_url:!0,void_session_url:!0}).extend({targeting:E.array(E.object({target:E.literal(PD)})).length(1),api_version:E.string(),multiple_capture:E.boolean(),checkout_hosted_fields:E.array(E.string()).optional(),ui_extension_handle:E.string().optional(),encryption_certificate_fingerprint:E.string(),checkout_payment_method_fields:E.array(E.object({type:E.union([E.literal("string"),E.literal("number"),E.literal("boolean")]),required:E.boolean(),key:E.string()})).max(Uv,`The extension can't have more than ${Uv} checkout_payment_method_fields`).optional()});function Jee(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 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,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",Wv=7,Hv=Fr.merge(tu).merge(_i).merge(_l).merge(Dn).required({refund_session_url:!0,capture_session_url:!0,void_session_url:!0}).extend({targeting:E.array(E.object({target:E.literal(OD)})).length(1),verification_session_url:E.string().url().optional(),ui_extension_handle:E.string().optional(),supports_moto:E.boolean({required_error:"supports_moto is required",invalid_type_error:"Value must be Boolean"}),encryption_certificate_fingerprint:E.string(),checkout_payment_method_fields:E.array(E.object({type:E.union([E.literal("string"),E.literal("number"),E.literal("boolean")]),required:E.boolean(),key:E.string()})).max(Wv,`The extension can't have more than ${Wv} 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 tte(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 zv(e){return{api_version:e.api_version,start_payment_session_url:e.payment_session_url,start_refund_session_url:e.refund_session_url,start_capture_session_url:e.capture_session_url,start_void_session_url:e.void_session_url,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",Vv=Fr.required({refund_session_url:!0,capture_session_url:!0,void_session_url:!0}).extend({targeting:E.array(E.object({target:E.literal(TD)})).length(1),sync_terminal_transaction_result_url:E.string().url().optional()});function ute(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 Kv(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 cN=E.union([Iv,Nv,$v,kv,Hv,Vv]),lN=Te({identifier:"payments_extension",schema:cN,appModuleFeatures:e=>[],deployConfig:async(e,t)=>{switch(e.targeting[0]?.target){case AD:return Rv(e);case SD:return Mv(e);case OD:return zv(e);case xD:return Lv(e);case PD:return qv(e);case TD:return Kv(e);default:return{}}}}),Gv=lN;d();var BD="@shopify/retail-ui-extensions",fN=Ge.extend({name:E.string()}),pN=Te({identifier:"pos_ui_extension",dependency:BD,schema:fN,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 Mr(`Dependency ${BD} not found`);return{name:e.name,description:e.description,renderer_version:r?.version}}}),Jv=pN;d();var ID="@shopify/admin-ui-extensions",dN=Te({identifier:"product_subscription",additionalIdentifiers:["subscription_management"],dependency:ID,graphQLType:"subscription_management",schema:Ge,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 Mr(`Dependency ${ID} not found`);return{renderer_version:r?.version}}}),Yv=dN;d();var DN=E.object({key:E.string()}),hN=Ge.extend({production_api_base_url:E.string(),benchmark_api_base_url:E.string().optional(),calculate_taxes_api_endpoint:E.string(),input:E.object({metafield_identifiers:E.object({namespace:E.string(),key:E.string()}).optional()}).optional(),metafields:E.array(pi).optional(),cart_line_properties:E.array(DN).optional()}),mN=Te({identifier:"tax_calculation",schema:hN,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})}),Xv=mN;d();var gN=Te({identifier:"theme",schema:Ge,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=>FN(e)}),rC=gN,RD=1024,nC=RD*1024,iC=10,_N=iC*nC,oC=500,yN=oC*RD,Zv=[".jpg",".jpeg",".json",".js",".css",".png",".svg",".wasm"],Qv=[".json"],uC={assets:{validator:new RegExp(`${Zv.join("|")}$`),failureMessage:e=>`Only these filetypes are supported in assets: ${Zv.join(", ")}`},blocks:{validator:/.liquid$/,failureMessage:e=>"Only .liquid files are allowed in blocks."},locales:{validator:new RegExp(`${Qv.join("|")}$`),failureMessage:e=>`Only these filetypes are supported in locales: ${Qv.join(", ")}`},snippets:{validator:/.liquid$/,failureMessage:e=>"Only .liquid files are allowed in snippets."}},eC=Object.keys(uC);async function FN(e){let t=await Cs(e),r=[],n=[];await Promise.all(t.map(async o=>{let s=Oe(e.directory,o),a=he(s);CN(s,a);let l=await Cc(o);n.push(l),["blocks","snippets"].includes(a)&&r.push(l)})),EN(tC(n)),vN(tC(r))}function EN(e){if(e>_N){let t=`${(e/nC).toFixed(2)} MB`;throw new k(`Your theme app extension exceeds the file size limit (${iC} MB). It's currently ${t}.`,"Reduce your total file size and try again.")}}function vN(e){if(e>yN){let t=`${(e/RD).toFixed(2)} kB`;throw new k(`Your theme app extension exceeds the total liquid file size limit (${oC} kB). It's currently ${t}.`,"Reduce your total file size and try again.")}}function CN(e,t){if(!eC.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: ${eC.join(", ")}`);let r=uC[t];if(!e.match(r.validator))throw new k(`Invalid filename in your theme app extension: ${e}
|
|
250
|
+
${r.failureMessage(e)}`)}function tC(e){return e.reduce((t,r)=>t+r,0)}d();d();var L2=ai(Th(),1);import{createRequire as wU}from"module";async function Em(){let e=await import("./typescript-5R4Y7PXE.js");return e.default??e}var j2=wU(import.meta.url),$2="@shopify/ui-extensions";function bU(e){let t=e.toLowerCase().replace(/(::|\.).+$/,"");switch(t){case"purchase":return"checkout";case"pos":return"point-of-sale";default:return t}}function vm(e){let t=e[0];return t?`${$2}/${bU(t)}`:$2}function ia(e){let[t,r]=e.split("-");return!t||!r?null:{year:parseInt(t,10),month:parseInt(r,10)}}async function U2(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 AU(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 k2(e){return e.length>0&&e.every(t=>t.isTypeOnly)}function SU(e,t){if(e.importClause?.isTypeOnly)return!0;let r=e.importClause?.namedBindings;return e.importClause?.name||!r?!1:t.isNamedImports(r)&&k2(r.elements)}function xU(e,t){if(e.isTypeOnly)return!0;let r=e.exportClause;return r?t.isNamedExports(r)&&k2(r.elements):!1}function PU(e,t){return t?dy(ot(t),ot(e)):!0}function OU(e,t){if(!t.allowedFiles)return!0;let r=ot(e);return t.allowedFiles.has(r)||!!t.alwaysAllowedFiles?.has(r)}function q2(e,t){return!e.includes("node_modules")&&!e.endsWith(".d.ts")&&OU(e,t)}function TU(e,t){let r=ot(e),n=(t.allowedFiles?.has(r)??!1)||(t.alwaysAllowedFiles?.has(r)??!1);return q2(e,t)&&(PU(e,t.boundaryDirectory)||n)}async function BU(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 U2(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,F=[],w=v=>{if(o.isImportDeclaration(v)&&v.moduleSpecifier&&o.isStringLiteral(v.moduleSpecifier)){if(SU(v,o))return;F.push(v.moduleSpecifier.text)}else if(o.isCallExpression(v)&&v.expression.kind===o.SyntaxKind.ImportKeyword){let S=v.arguments[0];S&&o.isStringLiteral(S)&&F.push(S.text)}else if(o.isExportDeclaration(v)&&v.moduleSpecifier&&o.isStringLiteral(v.moduleSpecifier)){if(xU(v,o))return;F.push(v.moduleSpecifier.text)}o.forEachChild(v,w)};w(m);for(let v of F){if(!v||g.has(v))continue;g.add(v);let S=o.resolveModuleName(v,e,l,o.sys);if(S.resolvedModule?.resolvedFileName){let O=S.resolvedModule.resolvedFileName;O.includes("node_modules")||a.push(O)}else{let O=await AU(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 BU(e,t)).filter(s=>q2(s,t)),o=[...n];for(let s of n){if(!TU(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 U2(e,r.tsConfigCache);if(!(!n||!s))return new Set((o??[]).map(a=>ot(a)))}async function IU(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 RU(e,t){let r=async n=>{let o=`import('@shopify/ui-extensions/${n}').Api`,s=t.get(n);return s&&await IU(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 NU(e,t,{includesTools:r,includesIntents:n},o){let s=await RU(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 W2({fullPath:e,typeFilePath:t,targets:r,apiVersion:n,toolsTypeDefinition:o,intentsTypeDefinition:s}){try{let a=new Map,l=!!o,p=!!s;for(let v of r)try{let S=j2.resolve(`@shopify/ui-extensions/${v}`,{paths:[e,t]});a.set(v,S)}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{j2.resolve(m,{paths:[e,t]})}catch{let{year:S,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 ~${S}.${O}.0, in your dependencies.`)}let g=Fc(e,he(t)),F=await NU(r,a,{includesTools:l,includesIntents:p},m);return F?["//@ts-ignore",`declare module './${g}' {`,...o?[o]:[],...s?[s]:[],` const shopify: ${F};`," const globalThis: { shopify: typeof shopify };","}",""].join(`
|
|
251
|
+
`):null}catch(a){if(a instanceof k)throw a;let{year:l,month:p}=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 H2(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 MU=E.object({name:E.string(),description:E.string(),inputSchema:E.object({}).passthrough(),outputSchema:E.object({}).passthrough().optional()}),z2=E.array(MU),V2=E.object({value:E.object({}).passthrough().optional(),inputSchema:E.object({}).passthrough(),outputSchema:E.object({}).passthrough().optional()});function jU(e){return qo(`${e.action} ${e.type}`.replace(/[^a-zA-Z0-9]+/g," "))}async function K2(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=jU(a),m=`${p}IntentInput`,g=`${p}IntentValue`,F=`${p}IntentOutput`,w=`${p}IntentRequest`,v=await oa(m,a.inputSchema),S=await oa(g,a.valueSchema),O=await oa(F,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:S,outputType:O,requestType:P,requestTypeName:w,outputTypeName:F}}),o=await Promise.all(n),s=o.map(({requestTypeName:a,outputTypeName:l})=>` | import('${t}').ShopifyGeneratedIntentVariant<${a}, ${l}>`).join(`
|
|
257
|
+
`);return`${o.map(({inputType:a,valueType:l,outputType:p,requestType:m})=>`${a}
|
|
258
|
+
${l}
|
|
259
|
+
${p}
|
|
260
|
+
${m}`).join(`
|
|
261
|
+
|
|
262
|
+
`)}
|
|
263
|
+
|
|
264
|
+
type ShopifyGeneratedIntentVariants =
|
|
265
|
+
${s}
|
|
266
|
+
`}async function G2(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 $U(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,L2.compile)(t,e,{bannerComment:""}),n=r.startsWith("export ")?r.slice(7):r;return $U(n,e)}d();d();d();var J2=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 Y2(e){let t=await Ly(e),r=await l0(J2,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 toe(e,t,r){return e.filter(s=>s.shouldFetchCartUrl()).length>0?r||`/cart/${await Y2(t)}:1`:void 0}function X2(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();AB();async function Z2(e,t){return m0.format(e,t)}var LU="@shopify/checkout-ui-extensions",UU=e=>e.extension_points!==void 0||e.targeting!==void 0,e1="No extension targets defined, add a `targeting` field to your configuration",kU=Ge.extend({name:E.string(),type:E.literal("ui_extension"),extension_points:xd.optional(),targeting:xd.optional(),metafields:E.array(pi).optional()}).refine(e=>UU(e),e1).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}}),qU=Te({identifier:"ui_extension",dependency:LU,schema:kU,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=>X2(n.target)==="checkout")!==void 0?[...t,"cart_url"]:t},validate:async(e,t,r)=>VU(r,e.extension_points,t),deployConfig:async(e,t)=>{let r=e.extension_points?.map(WU)??[];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=Q2(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=KU(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(!Q2(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 F=n.get(m)??[];if(F.push(p.target),n.set(m,F),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 S=n.get(w)??[];S.push(wm(p.target)),n.set(w,S)}}}for await(let p of r.extension_points){let m=I(e.directory,p.module);if(!await X(m))continue;let F=await Cm(m,e.directory,{tsConfigCache:l}),w=await pf(m,{boundaryDirectory:e.directory,allowedFiles:F,alwaysAllowedFiles:new Set([ot(m)]),importCache:a,tsConfigCache:l});for(let v of w){let S=n.get(v)??[];S.push(p.target),n.set(v,S)}if(p.build_manifest.assets[gr.ShouldRender]?.module){let v=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 H2(p,e.directory);if(!g)continue;let F=I(g,"shopify.d.ts"),w=Bt(m),v=vm(w);try{let S=o.get(p),O="";if(S)try{let q=await t1(e.directory,S,z2);q.status==="ok"?O=await G2(q.data):q.status==="invalid"&&Rn(`Invalid tools definition in "${S}": ${q.issues}`)}catch(q){Rn(`Failed to create tools type definition for tools file "${S}": ${q instanceof Error?q.message:"Unknown error"}`)}let P=s.get(p),B="";if(P?.length){let q=await HU(e.directory,P);if(q.length>0)try{B=await K2(q,{generatedTypesHelperImportPath:v})}catch(J){if(J instanceof k)throw J;Rn(`Failed to create intent type definition for intent schema files "${P.map(Q=>Q.schema).join(", ")}": ${J instanceof Error?J.message:"Unknown error"}`)}}let U=await W2({fullPath:p,typeFilePath:F,targets:w,apiVersion:r.api_version,toolsTypeDefinition:O,intentsTypeDefinition:B});if(U){let q=t.get(F)??new Set;U=await Z2(U,{parser:"typescript",singleQuote:!0}),q.add(U),t.set(F,q)}}catch(S){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 S}}}});function WU(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 t1(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 HU(e,t){let r=await Promise.all(t.map(async o=>{try{let s=await t1(e,o.schema,V2);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 zU(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 VU(e,t,r){let n=[],o=[],s=[];if(!t||t.length===0)return to(e1);for await(let a of t){let{module:l,target:p}=a,m=await zU(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 Q2(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 KU(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 r1=qU;d();var n1=1024,i1=128,GU=i1*n1,JU="@shopify/web-pixels-extension",YU=Ge.extend({runtime_context:E.string(),version:E.string().optional(),configuration:E.any(),customer_privacy:E.object({analytics:E.boolean(),preferences:E.boolean(),marketing:E.boolean(),sale_of_data:E.enum(["enabled","disabled","ldu"])}).optional(),settings:E.any()}),XU=Te({identifier:"web_pixel_extension",dependency:JU,partnersWebIdentifier:"web_pixel",schema:YU,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>GU){let n=`${(r/n1).toFixed(2)} kB`;throw new k(`Your web pixel extension exceeds the total file size limit (${i1} 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()}}),o1=XU;d();var ZU=E.object({handle:E.string()}),QU=Ge.extend({name:E.string(),include:E.array(ZU).optional(),includes:E.array(E.string()).optional(),type:E.literal("editor_extension_collection")}).transform(e=>{let t=e.includes?.map(n=>({handle:n}))??[],r=e.include??[];return{...e,inCollection:[...t,...r]}}),ek=Te({identifier:"editor_extension_collection",schema:QU,appModuleFeatures:e=>[],deployConfig:async(e,t)=>({name:e.name,handle:e.handle,in_collection:e.inCollection,localization:await pn(t,e.name)})}),u1=ek;d();var s1="specifications",tk=["json","toml","yaml","yml","svg"],rk=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:s1,destination:s1,include:tk.map(e=>`**/*.${e}`)}]}}]}],appModuleFeatures:()=>[]}),a1=rk;d();var c1="icons",nk=["svg"],ik=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:c1,destination:c1,include:nk.map(e=>`**/*.${e}`)}]}}]}],appModuleFeatures:()=>[]}),l1=ik;d();var ok=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"]}),f1=ok;var p1=[x0,O0,B0,_s,yD,ED,gD,_D,A0];async function bu(){let e=(t,r)=>p1.indexOf(t.identifier)-p1.indexOf(r.identifier);return uk().sort(e)}function uk(){let e=[T0,S0,cv,P0,lv,Dv,I0,C0,dv],t=[hv,mv,xv,Ov,vv,Tv,Gv,Jv,Yv,Xv,rC,r1,o1,u1,a1,l1,f1];return[...e,...t]}d();d();var mS=ai(_B()),gS=ai(cA()),_S=ai(DS());async function Pf(e){let t=JSON.parse(e);return await gS.default.dereference(t,{resolve:{external:!1}}),t}function rg(e,t){e==="strip"&&(t.additionalProperties=!0);let r=new mS.Ajv({allowUnionTypes:!0,allErrors:!0,verbose:!0});return r.addKeyword("x-taplo"),r.compile(t)}var hS=new Map;function yS(e,t,r,n){let o=(0,_S.default)(e),s=n??Sc(),a=hS.get(s)??rg(r,t);hS.set(s,a),a(o);let l;if(a.errors&&a.errors.length>0)return l=SW(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 AW(e){return Array.isArray(e)?"array":e===null?"null":typeof e}function ha(e,t){return t.length===0?e:vt(e,t)}function SW(e,t,r){return xW(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 ${AW(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 xW(e,t,r){let n=e,o=new Set;for(;;){let s=n.filter(F=>(F.keyword==="oneOf"||F.keyword==="anyOf")&&!o.has(F.instancePath))[0];if(s===void 0)break;let a=n.filter(F=>!F.instancePath.startsWith(s.instancePath)),l=[s],p=s.schemaPath.replace("#/","").replace(/\//g,"."),m=vt(r,p),g=ha(t,s.instancePath.split("/").slice(1));if(m!==void 0&&g!==void 0){let F=m.map(w=>{let v=rg("fail",w);v(g);let S=0;return w.type==="object"&&(S=Object.keys(w.properties).reduce((P,B)=>{let U=w.properties[B],q=ha(g,[B]);return rg("fail",U)(q)?P+1:P},S)),[S,v.errors]}).sort(([w],[v])=>w-v);if(F.length>=2){let[w,v]=F[F.length-1],[S]=F[F.length-2];w!==S&&(l=[s,...v.map(O=>({...O,instancePath:s.instancePath+O.instancePath}))])}}n=[...a,...l],o.add(s.instancePath)}return n}var PW={type:{type:"string"},handle:{type:"string"},uid:{type:"string"},path:{type:"string"},extensions:{}};async function FS(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={...PW,...o.properties};let s=e.identifier;return l=>{let p=e.parseConfigurationObject(l),g=(p.state==="ok"?p.data:void 0)??l,F=yS(g,o,r,s),w=p.errors??[];F.state==="error"&&(w=w.concat(F.errors));let v=new Set;return w=w.filter(S=>{let O=JSON.stringify({path:S.path,message:S.message});return v.has(O)?!1:(v.add(O),!0)}),p.state!=="ok"||w.length>0?{state:"error",data:void 0,errors:w}:{state:"ok",data:F.data,errors:void 0}}}async function 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 OW(o,n)]}async function OW(e,t){let r=t.map(async a=>{let l=e.find(g=>g.identifier===a.identifier);if(!l&&a.validationSchema?.jsonSchema&&(l=await BW(a,a.validationSchema)),!l)return;let p=TW(l,a),m=await FS(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 TW(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 BW(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 IW(e),s=await Of({developerPlatformClient:o,app:r}),a=r.flags,l=await NW(e,s,a,r.apiKey),p=await MW(r,e,{appDirectory:l.appDirectory??n});await hD(r,o.organizationSource);let m=await jW({configFileName:p,remoteApp:r,developerPlatformClient:o,specifications:s,flags:a,appDirectory:n,localAppOptions:l});return t&&LW(p,m.name,l.packageManager),{remoteApp:r,configFileName:p,configuration:m}}function ES(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 IW(e){let{creationOptions:t,appDirectory:r}=await RW(e),n=r??e.directory;if(e.apiKey){let a=await Dl({apiKey:e.apiKey});if(!a){let l=iv(e.apiKey);throw new k(l.message,l.tryMessage)}return e.isNewApp&&(a.newApp=!0),{remoteApp:a,appDirectory:n,developerPlatformClient:a.developerPlatformClient}}e.organizationId||ES(["client-id"]);let o=await uv({...t,directory:n,organizationId:e.organizationId}),s=o.developerPlatformClient;return{remoteApp:o,appDirectory:n,developerPlatformClient:s}}async function RW(e){let t={isLaunchable:!1,scopesArray:[],name:"",directory:e.directory,isEmbedded:!1};try{let r=await NE({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 NW(e,t,r,n){let o=await ME({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 MW(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":(ES(["file-name"]),hE(n,e.title)))}async function jW(e){let{remoteApp:t,developerPlatformClient:r,specifications:n,flags:o,configFileName:s,appDirectory:a,localAppOptions:l}=e,p=I(a,s),m=await kE(t,r,n,o);if(!m){let w=l.scopes;m=UW(t,w)}let g=(w,v)=>v,F={...fn({...l.existingConfig??{}},{client_id:t.apiKey,...m},g),build:$W({existingBuildOptions:l.existingBuildOptions,linkedAppAndClientIdFromFileAreInSync:l.localAppIdMatchedRemote,linkedAppWasNewlyCreated:!!t.newApp,defaultToUpdateUrlsOnDev:!0})};return delete F.scopes,await av(F,p),iD(F,{configFileName:s,directory:a}),F}function $W(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 LW(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:Nc(r,"shopify app deploy")}]],reference:[{link:{label:"App configuration",url:"https://shopify.dev/docs/apps/tools/cli/configuration"}}]})}function UW(e,t){return{...VW(e),...zW(e),...WW(e),...HW(t,e),...qW(e),...kW(e)}}function kW(e){let t={application_url:e.applicationUrl?.replace(/\/$/,"")??"",embedded:e.embedded??!0};return e.preferencesUrl?{...t,app_preferences:{url:e.preferencesUrl}}:{...t}}function qW(e){return e.appProxy?.url?{app_proxy:{url:e.appProxy.url,subpath:e.appProxy.subPath,prefix:e.appProxy.subPathPrefix}}:{}}function WW(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 HW(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 zW(e){return{pos:{embedded:e.posEmbedded??!1}}}function VW(e){return{name:e.title}}d();d();async function vS(e){for(let t of e)await KW(t)}async function KW(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 CS(e){let t=Ts(e);return Se`${Ae.errorText("Validation error")} in ${Ae.path(e.file)}:\n\n${t}`}async function tce({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 Mr(`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,F=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(CS(v.errors.getErrors()[0]));let S=ll(e),O=l.apiKey===v.configuration.client_id;return(!S||O)&&Yo({appId:l.apiKey,title:l.title,directory:e,orgId:l.organizationId}),await GW(l,F,r),v.errors.isEmpty()&&await vS(v.allExtensions),{project:s,activeConfig:a,app:v,remoteApp:l,developerPlatformClient:g,specifications:w,organization:F}}async function GW(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 rce({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(CS(a.errors.getErrors()[0]));return{app:a,project:n}}export{Od as a,uH as b,io as c,TB as d,vs as e,X0 as f,CH as g,rF as h,Kd as i,ft as j,nV as k,yr as l,Xd as m,oz as n,$F as o,ll as p,Yo as q,kG as r,CE as s,qG as t,WG as u,HG as v,As as w,mY as x,nD as y,bE as z,Ts as A,QJ as B,eY as C,tY as D,jE as E,dn as F,cl as G,yG as H,FG as I,EG as J,gE as K,vG as L,_E as M,CG as N,yE as O,wG as P,kE as Q,MY as R,jY as S,dl as T,ev as U,rv as V,XX as W,ov as X,Dl as Y,gZ as Z,_R as _,_Z as $,sv as aa,hD as ba,hQ as ca,yv as da,AD as ea,xee as fa,SD as ga,jee as ha,xD as ia,Wee as ja,PD as ka,Jee as la,OD as ma,tte as na,TD as oa,ute as pa,toe as qa,X2 as ra,Of as sa,Tf as ta,NW as ua,jW as va,tce as wa,rce as xa};
|
|
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
|
+
*/
|