@abtnode/webapp 1.16.29-next-680cf137 → 1.16.30-beta-00e8bdd1
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/blocklet.js +1 -1
- package/blocklet.yml +1 -1
- package/dist/assets/{Add-CBlI6OP_.js → Add-LFKdL73O.js} +1 -1
- package/dist/assets/{ArrowDropDown-_NUZMAs3.js → ArrowDropDown-CSu51mHJ.js} +1 -1
- package/dist/assets/Autocomplete-hpS9-5qj.js +1 -0
- package/dist/assets/{Breadcrumbs-D-zIyMgq.js → Breadcrumbs-CMca_d4s.js} +1 -1
- package/dist/assets/{ButtonGroup-By_ymyXi.js → ButtonGroup-0zcah4z_.js} +1 -1
- package/dist/assets/{CheckCircle-DFcLtmlR.js → CheckCircle-CBkh2h5b.js} +1 -1
- package/dist/assets/{ChevronLeft-fo4GMv_v.js → ChevronLeft-B-7gRCbY.js} +1 -1
- package/dist/assets/{ChevronRight-CTMwG0CZ.js → ChevronRight-D_yeHmtK.js} +1 -1
- package/dist/assets/{Close-C7JfjION.js → Close-CNpsilFj.js} +1 -1
- package/dist/assets/{Delete-DP2Kbw6K.js → Delete-srKcBoMM.js} +1 -1
- package/dist/assets/{DeleteOutline-DRdvA-Zf.js → DeleteOutline-Co4Q4Mxy.js} +1 -1
- package/dist/assets/DeleteOutline-DTfdQ1Ck.js +1 -0
- package/dist/assets/{Done-tC1zTTTI.js → Done-CPtHG1xe.js} +1 -1
- package/dist/assets/{Edit-BE1ZZ-Tm.js → Edit-C-SmJ8-l.js} +1 -1
- package/dist/assets/{EditIcon-8lCGiLnt.js → EditIcon-jhpUwOtu.js} +1 -1
- package/dist/assets/{ExpandMore-3RzpbVTz.js → ExpandMore-XdKsbNWv.js} +1 -1
- package/dist/assets/FilterList-DZulAb2m.js +26 -0
- package/dist/assets/{Google-CIgaEutQ.js → Google-C5CdgF1q.js} +1 -1
- package/dist/assets/{Https-BE0YR8cf.js → Https-BvcwyBP3.js} +1 -1
- package/dist/assets/{InputAdornment-DwuVDGhs.js → InputAdornment-BVxF9lVH.js} +1 -1
- package/dist/assets/{InputLabel-D6AZ_TXn.js → InputLabel-CsipaQrT.js} +1 -1
- package/dist/assets/{LastPage-DFR_wWVB.js → LastPage-BfMRR4RL.js} +1 -1
- package/dist/assets/{Launch-CouSgez_.js → Launch-DOqDWG_i.js} +1 -1
- package/dist/assets/{Link-DyVx2epM.js → Link-62LBDRON.js} +1 -1
- package/dist/assets/LoadingButton-DSKkFqcs.js +1 -0
- package/dist/assets/{LockIcon-DVrS5iFD.js → LockIcon-CvSsIiE2.js} +1 -1
- package/dist/assets/{Loop-BALLXtEO.js → Loop-Bsc8xJWe.js} +1 -1
- package/dist/assets/{MoreVert-B3whUcSg.js → MoreVert-Dcu0-GMt.js} +1 -1
- package/dist/assets/{Pagination-DDYKKK02.js → Pagination-kp73--RG.js} +1 -1
- package/dist/assets/{Public-CNDJTj5P.js → Public-GWTOZY7N.js} +1 -1
- package/dist/assets/{SchemaReference.es-cc9zlDut.js → SchemaReference.es-BpTVsxuV.js} +1 -1
- package/dist/assets/{Search-B8Ey1Xi7.js → Search-BaA9ZKBf.js} +1 -1
- package/dist/assets/Select-Djr-8j16.js +2 -0
- package/dist/assets/{Skeleton-Bq-LHi-2.js → Skeleton-CeiYEcKB.js} +3 -3
- package/dist/assets/Slider-Cr-0XHP3.js +1 -0
- package/dist/assets/{Stepper-piTxdKQU.js → Stepper-BK35oRco.js} +1 -1
- package/dist/assets/{TextField-DMD0bhJ9.js → TextField-D-fYaxFC.js} +1 -1
- package/dist/assets/{ToggleButtonGroup-6WK6LBLt.js → ToggleButtonGroup-Bq-C5nsv.js} +1 -1
- package/dist/assets/{ViewList-CJj9MHYa.js → ViewList-ClcomYiM.js} +1 -1
- package/dist/assets/{actions-B8oxTC01.js → actions-B9RFo3PU.js} +1 -1
- package/dist/assets/{actions-CXBa1BBO.js → actions-DxYtgy4b.js} +1 -1
- package/dist/assets/{agreement-831LxBXw.js → agreement-QhMtmMQJ.js} +5 -5
- package/dist/assets/api-B76-JirA.js +1 -0
- package/dist/assets/{app-avatar-BQQaDhpx.js → app-avatar-B_wkAPxy.js} +1 -1
- package/dist/assets/ar-CYspPmSu.js +1 -0
- package/dist/assets/{audit-logs-M6VjO6ZY.js → audit-logs-l3Bq0hXU.js} +1 -1
- package/dist/assets/blocklet-U0hwansK.js +1 -0
- package/dist/assets/{brace-fold.es-CRJ6R1Jd.js → brace-fold.es-ify0m_jP.js} +1 -1
- package/dist/assets/bundle-avatar-DTb6oe8Y.js +1 -0
- package/dist/assets/{chart-XLU84wBc.js → chart-oYZiK-e5.js} +1 -1
- package/dist/assets/{click-to-copy-Crhp_-Y4.js → click-to-copy-CVINfAkv.js} +1 -1
- package/dist/assets/{closebrackets.es-CG2CDdUo.js → closebrackets.es-BqhK2kTP.js} +1 -1
- package/dist/assets/{codemirror.es-C8dnT91E.js → codemirror.es-Dt0TXafG.js} +1 -1
- package/dist/assets/{comment.es-jAc-u026.js → comment.es-Ck-iETYS.js} +1 -1
- package/dist/assets/{config-navigation-DPgP8Sak.js → config-navigation-Bg-UzLES.js} +1 -1
- package/dist/assets/de-DIG5UukX.js +1 -0
- package/dist/assets/{delete-confirm-lQkwnGTS.js → delete-confirm-BqGcpgiq.js} +1 -1
- package/dist/assets/{detail-U0KQ2egr.js → detail-B6MSmXGq.js} +3 -3
- package/dist/assets/{dialog.es-Dclyb7Pn.js → dialog.es-D_T7Yss2.js} +1 -1
- package/dist/assets/{download-CQ8vxrab.js → download-D0XkeC5D.js} +1 -1
- package/dist/assets/es-iIE-oygq.js +1 -0
- package/dist/assets/{foldgutter.es-DkUp93ad.js → foldgutter.es-Booq0HN6.js} +1 -1
- package/dist/assets/fr-D8XyKysR.js +1 -0
- package/dist/assets/getValidReactChildren-CIj2C3j7.js +1 -0
- package/dist/assets/hi-C12r029w.js +1 -0
- package/dist/assets/{hint.es-BsuiAFA7.js → hint.es-CwpaOeu1.js} +1 -1
- package/dist/assets/{hint.es2-CkrTTZi4.js → hint.es2-0XlKH7eK.js} +1 -1
- package/dist/assets/id-BM1nX889.js +1 -0
- package/dist/assets/{iframe-CVrBSWYD.js → iframe-BxFOjzAT.js} +1 -1
- package/dist/assets/{index-C_6P8rFc.js → index-3S1oyYak.js} +31 -66
- package/dist/assets/index-3c50PzHB.js +54 -0
- package/dist/assets/{index-BO1fRvMf.js → index-69SfANaJ.js} +1 -1
- package/dist/assets/index-7V15c_6f.js +11 -0
- package/dist/assets/{index-5SVf0tFY.js → index-B6oAfScX.js} +1 -1
- package/dist/assets/{index-CC1ndwks.js → index-B9q4xTve.js} +167 -167
- package/dist/assets/index-BDqaMQSR.js +309 -0
- package/dist/assets/index-BHVuacU2.js +1 -0
- package/dist/assets/{index-m_K8eAfk.js → index-BKtKjId8.js} +1 -1
- package/dist/assets/{index-5FtPkeAB.js → index-BYxyp5Ck.js} +3 -3
- package/dist/assets/{index-Bxr0QU8m.js → index-Be1LfCt3.js} +1 -1
- package/dist/assets/{index-DXsbagZE.js → index-Bi5jIxEm.js} +3 -3
- package/dist/assets/{index-BPnSwJ1l.js → index-BkF1zCMg.js} +1 -1
- package/dist/assets/{index-DS6F_SJ9.js → index-BmimSaL6.js} +1 -1
- package/dist/assets/index-C-KPF3ku.js +150 -0
- package/dist/assets/{index-DVdaomTJ.js → index-C2RJ0Opd.js} +3 -3
- package/dist/assets/{index-CmhE_K0y.js → index-CO1tIkkw.js} +1 -1
- package/dist/assets/{index-CnrdD6WK.js → index-CPw_3e9I.js} +1 -1
- package/dist/assets/index-CUJg_ZR6.js +262 -0
- package/dist/assets/{index-C2a0vC_a.js → index-CjLebNEZ.js} +4 -4
- package/dist/assets/{index-CRb7tyay.js → index-Cvz2D2Se.js} +1 -1
- package/dist/assets/{index-BXNB-HAQ.js → index-DA53wNBt.js} +1 -1
- package/dist/assets/index-DS5HF6Nu.js +278 -0
- package/dist/assets/{index-yzdWHDuH.js → index-DY2dSM6d.js} +1 -1
- package/dist/assets/{index-DzxtBPCC.js → index-D_6bopIl.js} +3 -3
- package/dist/assets/{index-DwxhJUlf.js → index-DavTgDQN.js} +4 -4
- package/dist/assets/{index-C-ESGRv-.js → index-Dh9zXu4V.js} +1 -1
- package/dist/assets/{index-xOV9jJH3.js → index-DkPTCGqW.js} +1 -1
- package/dist/assets/{index-Cuo7-0Cq.js → index-DrKkKhZU.js} +1 -1
- package/dist/assets/{index-B9dsKJcE.js → index-Dw2oEqk9.js} +1 -1
- package/dist/assets/{index-yKeCR3QS.js → index-Dwzroz2N.js} +8 -8
- package/dist/assets/{index-HzScigWU.js → index-KKJRKkcL.js} +1 -1
- package/dist/assets/{index-CF5rsCOW.js → index-Pyhbpymd.js} +1 -1
- package/dist/assets/{index-C9KBqEgO.js → index-R6KYy11w.js} +1 -1
- package/dist/assets/{index-CXyn4xMF.js → index-RVerdREp.js} +5 -5
- package/dist/assets/{index-BsBUGa5J.js → index-bjJyrxsi.js} +1 -1
- package/dist/assets/{index-BcX9aNO0.js → index-ibz1mOjA.js} +1 -1
- package/dist/assets/{index-BHOFu69h.js → index-j_zkWpJQ.js} +1 -1
- package/dist/assets/index-keckIN3f.js +288 -0
- package/dist/assets/index-kkD7ifup.js +11 -0
- package/dist/assets/{index-B8C4pOOu.js → index-lHa-QuEU.js} +1 -1
- package/dist/assets/{index-DVV4MjHu.js → index-shAskowG.js} +1 -1
- package/dist/assets/{index-DujqUEqx.js → index-tqJUmPvA.js} +29 -29
- package/dist/assets/index-xdfj_Gf_.js +1 -0
- package/dist/assets/{index.es-Cn8AWkE8.js → index.es-CjdQLpQc.js} +1 -1
- package/dist/assets/{index.esm-BTj_KCwg.js → index.esm-lboQd9dC.js} +1 -1
- package/dist/assets/{info-addon.es-CLwqL8YZ.js → info-addon.es-vzTbYXa-.js} +1 -1
- package/dist/assets/{info.es-CnFozSp1.js → info.es-DVsU6SVd.js} +1 -1
- package/dist/assets/install-from-url-DcEJ7Ca3.js +1 -0
- package/dist/assets/{invitation-BVEDeXPr.js → invitation-BNRwDEVH.js} +7 -7
- package/dist/assets/{is-path-prefix-equal-Cbnwy2Yf.js → is-path-prefix-equal-Bbv1muGK.js} +1 -1
- package/dist/assets/{isEqual-BbNuqCAe.js → isEqual-D4RUz7Fw.js} +1 -1
- package/dist/assets/{item-BCeOssCF.js → item-Cf5XyKSd.js} +27 -27
- package/dist/assets/ja-D8yfIRFO.js +1 -0
- package/dist/assets/{javascript.es-z17Y7cic.js → javascript.es-Df6-Npn3.js} +1 -1
- package/dist/assets/{jump-to-line.es-CG-VsgE6.js → jump-to-line.es-aGoBCE9o.js} +1 -1
- package/dist/assets/{jump.es-CQ4ic2oQ.js → jump.es-CrN18yKp.js} +1 -1
- package/dist/assets/ko-BYDKCXC0.js +1 -0
- package/dist/assets/{line-C1QR7BHZ.js → line-Brex_I6p.js} +4 -4
- package/dist/assets/{lint.es-D-MQT4TZ.js → lint.es-DEOTlz6c.js} +1 -1
- package/dist/assets/{lint.es2-DXCGvGBZ.js → lint.es2-BmcRF08P.js} +1 -1
- package/dist/assets/{lint.es3-g-aPmIS2.js → lint.es3-COdxOPeK.js} +1 -1
- package/dist/assets/{list-header-C-NFaGBI.js → list-header-BQiWHRqn.js} +1 -1
- package/dist/assets/{log-T5nWDHZg.js → log-5GhJqImF.js} +1 -1
- package/dist/assets/{lottie-DR63dhlr.js → lottie-qJ8b-yUO.js} +1 -1
- package/dist/assets/{matchbrackets.es-BHV7ImE9.js → matchbrackets.es-BEa-Nj8z.js} +1 -1
- package/dist/assets/{memory-C2Ggp1ds.js → memory-1iaH3Or6.js} +1 -1
- package/dist/assets/{mode.es-DjMjtDNl.js → mode.es-Byr4pK2u.js} +1 -1
- package/dist/assets/{mode.es2-DTrAq6aA.js → mode.es2-qzs8ugCq.js} +1 -1
- package/dist/assets/{mode.es3-CeaHK4Cx.js → mode.es3-DlukdiVg.js} +1 -1
- package/dist/assets/{onlineParser.es-EXxvS9b3.js → onlineParser.es-CklSfcO9.js} +1 -1
- package/dist/assets/overview-BGyp8F_2.js +26 -0
- package/dist/assets/pt-B9DRiZEN.js +1 -0
- package/dist/assets/react-dn_NPK1J.js +56 -0
- package/dist/assets/{redux-CBs4zzpF.js → redux-CDrmL_mc.js} +1 -1
- package/dist/assets/resource-dialog-DSWbu09w.js +57 -0
- package/dist/assets/ru-CUxGgO8D.js +1 -0
- package/dist/assets/runtime-BCmw-_C1.js +1 -0
- package/dist/assets/schema-C0fr83dn.js +28 -0
- package/dist/assets/sdk-C0FNPW-W.js +1 -0
- package/dist/assets/{search.es-BgquH9xr.js → search.es-Cn60kLiF.js} +1 -1
- package/dist/assets/{searchcursor.es-CQvA3zpZ.js → searchcursor.es-CHzpyp98.js} +1 -1
- package/dist/assets/service-BgoiGac9.js +1 -0
- package/dist/assets/{shorten-label-u7BOpbFf.js → shorten-label-D2yNd_do.js} +1 -1
- package/dist/assets/{show-hint.es-DS02BUMX.js → show-hint.es-CLjt2ZS_.js} +1 -1
- package/dist/assets/{slicedToArray-CXKCCuoW.js → slicedToArray-Cdyv9hm5.js} +2 -2
- package/dist/assets/{spaces-DAIyizkR.js → spaces-BGwFOyAS.js} +1 -1
- package/dist/assets/{sublime.es-CNkJDB7Y.js → sublime.es-CsIekldU.js} +1 -1
- package/dist/assets/{switch-control-B17GyPSA.js → switch-control-CtQVsLJE.js} +1 -1
- package/dist/assets/{table-icons-C9acqBAz.js → table-icons-CHIMAIBB.js} +3 -3
- package/dist/assets/{tag-CCXE4PlV.js → tag-BtkglRep.js} +1 -1
- package/dist/assets/team-C9CS8TWK.js +1 -0
- package/dist/assets/th-D6abaOt7.js +1 -0
- package/dist/assets/{toUpper-BVSXWMpU.js → toUpper-6yIzkj7V.js} +1 -1
- package/dist/assets/traffic-9mdt3xlJ.js +8 -0
- package/dist/assets/{url-evaluation-l10Af9J1.js → url-evaluation-zvcOTlCw.js} +2 -2
- package/dist/assets/{url-join-Byro3u2f.js → url-join-DeR1uj4F.js} +1 -1
- package/dist/assets/use-blocklet-info-for-connect-did-spaces-CcMtzUbo.js +1 -0
- package/dist/assets/{useLocalStorage-CBI6wbJu.js → useLocalStorage-Cmh7IzOP.js} +1 -1
- package/dist/assets/useThemeProps-Av0i4kAo.js +1 -0
- package/dist/assets/{util-BO7B0GFb.js → util-BFRwThVd.js} +1 -1
- package/dist/assets/vi-BsX5AAJJ.js +1 -0
- package/dist/assets/{wait-container-DNpXoa46.js → wait-container-DeCL5jAI.js} +1 -1
- package/dist/assets/{withStyles-CDKZ5MjH.js → withStyles-D6Sb3yPO.js} +1 -1
- package/dist/assets/wrap-locale-BKrHiPG8.js +1 -0
- package/dist/assets/{zh-DMGrvlv0.js → zh-CIqkKG4c.js} +1 -1
- package/dist/assets/zh-tw-D7VeUoit.js +1 -0
- package/dist/index.html +1 -1
- package/dist/service-worker.js +1 -1
- package/package.json +1 -1
- package/dist/assets/Autocomplete-B72ZNhpa.js +0 -1
- package/dist/assets/DeleteOutline-B8oYxNwP.js +0 -1
- package/dist/assets/FilterList-Do3l0qfw.js +0 -26
- package/dist/assets/LoadingButton-CXpu1MEX.js +0 -1
- package/dist/assets/Select-BFdUN7Gy.js +0 -2
- package/dist/assets/Slider-DJ5A6VX9.js +0 -1
- package/dist/assets/api-UR4kvn9E.js +0 -1
- package/dist/assets/ar-DAUz5_Ej.js +0 -1
- package/dist/assets/blocklet-ChPmEIKa.js +0 -1
- package/dist/assets/bundle-avatar-CELq2peD.js +0 -1
- package/dist/assets/de-JXmbvsP-.js +0 -1
- package/dist/assets/es-D_uIRKnu.js +0 -1
- package/dist/assets/fr-BocLckhV.js +0 -1
- package/dist/assets/getValidReactChildren-5uFkq4GS.js +0 -1
- package/dist/assets/hi-Bn38t0nX.js +0 -1
- package/dist/assets/id-DuC9mOr4.js +0 -1
- package/dist/assets/index-B3Zt0_35.js +0 -309
- package/dist/assets/index-BNjhH_d8.js +0 -177
- package/dist/assets/index-BOuMxb3Q.js +0 -268
- package/dist/assets/index-BTZWTFSn.js +0 -11
- package/dist/assets/index-B_IM460j.js +0 -11
- package/dist/assets/index-CC1qLncJ.js +0 -344
- package/dist/assets/index-CgdUe9yu.js +0 -1
- package/dist/assets/index-Cgk3wbOm.js +0 -54
- package/dist/assets/index-D1iFHNgi.js +0 -1
- package/dist/assets/index-DYd4EkOT.js +0 -11
- package/dist/assets/index-DYnnB-61.js +0 -262
- package/dist/assets/install-from-url-BARZDCTT.js +0 -1
- package/dist/assets/ja-B2J7-ZGM.js +0 -1
- package/dist/assets/ko-TAMb2jXz.js +0 -1
- package/dist/assets/overview-B4FZNinL.js +0 -26
- package/dist/assets/pt-DAmg1w9n.js +0 -1
- package/dist/assets/react-DCf5_sK9.js +0 -379
- package/dist/assets/ru-BqJl8PYs.js +0 -1
- package/dist/assets/runtime-OYXEkxpl.js +0 -1
- package/dist/assets/service-C2bAs8-4.js +0 -1
- package/dist/assets/team-BSlyvC6c.js +0 -1
- package/dist/assets/th-CGcwcZWK.js +0 -1
- package/dist/assets/traffic-CQoQSkkE.js +0 -8
- package/dist/assets/ua-parser-CxBhcPmn.js +0 -1
- package/dist/assets/use-blocklet-info-for-connect-did-spaces-1vbzgKN4.js +0 -1
- package/dist/assets/vi-lYszmNr_.js +0 -1
- package/dist/assets/wrap-locale-CjBWx_ua.js +0 -1
- package/dist/assets/zh-tw-BkGc-T4k.js +0 -1
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import{dh as Gt,cJ as Vt,dy as Wt,dC as Ht,dz as Xt,cO as ae,eW as Kt,F as Yt,b as Zt}from"./index-B9q4xTve.js";import{l as Re}from"./index-DrKkKhZU.js";import{p as Jt}from"./index-DkPTCGqW.js";var q={},Qt=null,Qe=Qt,et={exports:{}};(function(R,$){(function(T,L){R.exports=L()})(self,()=>{return T={7629:(A,S,v)=>{const o=v(375),y=v(8571),d=v(9474),u=v(1687),e=v(8652),a=v(8160),s=v(3292),r=v(6354),t=v(8901),l=v(9708),n=v(6914),i=v(2294),f=v(6133),m=v(1152),p=v(8863),E=v(2036),w={Base:class{constructor(c){this.type=c,this.$_root=null,this._definition={},this._reset()}_reset(){this._ids=new i.Ids,this._preferences=null,this._refs=new f.Manager,this._cache=null,this._valids=null,this._invalids=null,this._flags={},this._rules=[],this._singleRules=new Map,this.$_terms={},this.$_temp={ruleset:null,whens:{}}}describe(){return o(typeof l.describe=="function","Manifest functionality disabled"),l.describe(this)}allow(...c){return a.verifyFlat(c,"allow"),this._values(c,"_valids")}alter(c){o(c&&typeof c=="object"&&!Array.isArray(c),"Invalid targets argument"),o(!this._inRuleset(),"Cannot set alterations inside a ruleset");const h=this.clone();h.$_terms.alterations=h.$_terms.alterations||[];for(const g in c){const O=c[g];o(typeof O=="function","Alteration adjuster for",g,"must be a function"),h.$_terms.alterations.push({target:g,adjuster:O})}return h.$_temp.ruleset=!1,h}artifact(c){return o(c!==void 0,"Artifact cannot be undefined"),o(!this._cache,"Cannot set an artifact with a rule cache"),this.$_setFlag("artifact",c)}cast(c){return o(c===!1||typeof c=="string","Invalid to value"),o(c===!1||this._definition.cast[c],"Type",this.type,"does not support casting to",c),this.$_setFlag("cast",c===!1?void 0:c)}default(c,h){return this._default("default",c,h)}description(c){return o(c&&typeof c=="string","Description must be a non-empty string"),this.$_setFlag("description",c)}empty(c){const h=this.clone();return c!==void 0&&(c=h.$_compile(c,{override:!1})),h.$_setFlag("empty",c,{clone:!1})}error(c){return o(c,"Missing error"),o(c instanceof Error||typeof c=="function","Must provide a valid Error object or a function"),this.$_setFlag("error",c)}example(c,h={}){return o(c!==void 0,"Missing example"),a.assertOptions(h,["override"]),this._inner("examples",c,{single:!0,override:h.override})}external(c,h){return typeof c=="object"&&(o(!h,"Cannot combine options with description"),h=c.description,c=c.method),o(typeof c=="function","Method must be a function"),o(h===void 0||h&&typeof h=="string","Description must be a non-empty string"),this._inner("externals",{method:c,description:h},{single:!0})}failover(c,h){return this._default("failover",c,h)}forbidden(){return this.presence("forbidden")}id(c){return c?(o(typeof c=="string","id must be a non-empty string"),o(/^[^\.]+$/.test(c),"id cannot contain period character"),this.$_setFlag("id",c)):this.$_setFlag("id",void 0)}invalid(...c){return this._values(c,"_invalids")}label(c){return o(c&&typeof c=="string","Label name must be a non-empty string"),this.$_setFlag("label",c)}meta(c){return o(c!==void 0,"Meta cannot be undefined"),this._inner("metas",c,{single:!0})}note(...c){o(c.length,"Missing notes");for(const h of c)o(h&&typeof h=="string","Notes must be non-empty strings");return this._inner("notes",c)}only(c=!0){return o(typeof c=="boolean","Invalid mode:",c),this.$_setFlag("only",c)}optional(){return this.presence("optional")}prefs(c){o(c,"Missing preferences"),o(c.context===void 0,"Cannot override context"),o(c.externals===void 0,"Cannot override externals"),o(c.warnings===void 0,"Cannot override warnings"),o(c.debug===void 0,"Cannot override debug"),a.checkPreferences(c);const h=this.clone();return h._preferences=a.preferences(h._preferences,c),h}presence(c){return o(["optional","required","forbidden"].includes(c),"Unknown presence mode",c),this.$_setFlag("presence",c)}raw(c=!0){return this.$_setFlag("result",c?"raw":void 0)}result(c){return o(["raw","strip"].includes(c),"Unknown result mode",c),this.$_setFlag("result",c)}required(){return this.presence("required")}strict(c){const h=this.clone(),g=c!==void 0&&!c;return h._preferences=a.preferences(h._preferences,{convert:g}),h}strip(c=!0){return this.$_setFlag("result",c?"strip":void 0)}tag(...c){o(c.length,"Missing tags");for(const h of c)o(h&&typeof h=="string","Tags must be non-empty strings");return this._inner("tags",c)}unit(c){return o(c&&typeof c=="string","Unit name must be a non-empty string"),this.$_setFlag("unit",c)}valid(...c){a.verifyFlat(c,"valid");const h=this.allow(...c);return h.$_setFlag("only",!!h._valids,{clone:!1}),h}when(c,h){const g=this.clone();g.$_terms.whens||(g.$_terms.whens=[]);const O=s.when(g,c,h);if(!["any","link"].includes(g.type)){const k=O.is?[O]:O.switch;for(const N of k)o(!N.then||N.then.type==="any"||N.then.type===g.type,"Cannot combine",g.type,"with",N.then&&N.then.type),o(!N.otherwise||N.otherwise.type==="any"||N.otherwise.type===g.type,"Cannot combine",g.type,"with",N.otherwise&&N.otherwise.type)}return g.$_terms.whens.push(O),g.$_mutateRebuild()}cache(c){o(!this._inRuleset(),"Cannot set caching inside a ruleset"),o(!this._cache,"Cannot override schema cache"),o(this._flags.artifact===void 0,"Cannot cache a rule with an artifact");const h=this.clone();return h._cache=c||e.provider.provision(),h.$_temp.ruleset=!1,h}clone(){const c=Object.create(Object.getPrototypeOf(this));return this._assign(c)}concat(c){o(a.isSchema(c),"Invalid schema object"),o(this.type==="any"||c.type==="any"||c.type===this.type,"Cannot merge type",this.type,"with another type:",c.type),o(!this._inRuleset(),"Cannot concatenate onto a schema with open ruleset"),o(!c._inRuleset(),"Cannot concatenate a schema with open ruleset");let h=this.clone();if(this.type==="any"&&c.type!=="any"){const g=c.clone();for(const O of Object.keys(h))O!=="type"&&(g[O]=h[O]);h=g}h._ids.concat(c._ids),h._refs.register(c,f.toSibling),h._preferences=h._preferences?a.preferences(h._preferences,c._preferences):c._preferences,h._valids=E.merge(h._valids,c._valids,c._invalids),h._invalids=E.merge(h._invalids,c._invalids,c._valids);for(const g of c._singleRules.keys())h._singleRules.has(g)&&(h._rules=h._rules.filter(O=>O.keep||O.name!==g),h._singleRules.delete(g));for(const g of c._rules)c._definition.rules[g.method].multi||h._singleRules.set(g.name,g),h._rules.push(g);if(h._flags.empty&&c._flags.empty){h._flags.empty=h._flags.empty.concat(c._flags.empty);const g=Object.assign({},c._flags);delete g.empty,u(h._flags,g)}else if(c._flags.empty){h._flags.empty=c._flags.empty;const g=Object.assign({},c._flags);delete g.empty,u(h._flags,g)}else u(h._flags,c._flags);for(const g in c.$_terms){const O=c.$_terms[g];O?h.$_terms[g]?h.$_terms[g]=h.$_terms[g].concat(O):h.$_terms[g]=O.slice():h.$_terms[g]||(h.$_terms[g]=O)}return this.$_root._tracer&&this.$_root._tracer._combine(h,[this,c]),h.$_mutateRebuild()}extend(c){return o(!c.base,"Cannot extend type with another base"),t.type(this,c)}extract(c){return c=Array.isArray(c)?c:c.split("."),this._ids.reach(c)}fork(c,h){o(!this._inRuleset(),"Cannot fork inside a ruleset");let g=this;for(let O of[].concat(c))O=Array.isArray(O)?O:O.split("."),g=g._ids.fork(O,h,g);return g.$_temp.ruleset=!1,g}rule(c){const h=this._definition;a.assertOptions(c,Object.keys(h.modifiers)),o(this.$_temp.ruleset!==!1,"Cannot apply rules to empty ruleset or the last rule added does not support rule properties");const g=this.$_temp.ruleset===null?this._rules.length-1:this.$_temp.ruleset;o(g>=0&&g<this._rules.length,"Cannot apply rules to empty ruleset");const O=this.clone();for(let k=g;k<O._rules.length;++k){const N=O._rules[k],D=y(N);for(const M in c)h.modifiers[M](D,c[M]),o(D.name===N.name,"Cannot change rule name");O._rules[k]=D,O._singleRules.get(D.name)===N&&O._singleRules.set(D.name,D)}return O.$_temp.ruleset=!1,O.$_mutateRebuild()}get ruleset(){o(!this._inRuleset(),"Cannot start a new ruleset without closing the previous one");const c=this.clone();return c.$_temp.ruleset=c._rules.length,c}get $(){return this.ruleset}tailor(c){c=[].concat(c),o(!this._inRuleset(),"Cannot tailor inside a ruleset");let h=this;if(this.$_terms.alterations)for(const{target:g,adjuster:O}of this.$_terms.alterations)c.includes(g)&&(h=O(h),o(a.isSchema(h),"Alteration adjuster for",g,"failed to return a schema object"));return h=h.$_modify({each:g=>g.tailor(c),ref:!1}),h.$_temp.ruleset=!1,h.$_mutateRebuild()}tracer(){return m.location?m.location(this):this}validate(c,h){return p.entry(c,this,h)}validateAsync(c,h){return p.entryAsync(c,this,h)}$_addRule(c){typeof c=="string"&&(c={name:c}),o(c&&typeof c=="object","Invalid options"),o(c.name&&typeof c.name=="string","Invalid rule name");for(const N in c)o(N[0]!=="_","Cannot set private rule properties");const h=Object.assign({},c);h._resolve=[],h.method=h.method||h.name;const g=this._definition.rules[h.method],O=h.args;o(g,"Unknown rule",h.method);const k=this.clone();if(O){o(Object.keys(O).length===1||Object.keys(O).length===this._definition.rules[h.name].args.length,"Invalid rule definition for",this.type,h.name);for(const N in O){let D=O[N];if(g.argsByName){const M=g.argsByName.get(N);if(M.ref&&a.isResolvable(D))h._resolve.push(N),k.$_mutateRegister(D);else if(M.normalize&&(D=M.normalize(D),O[N]=D),M.assert){const z=a.validateArg(D,N,M);o(!z,z,"or reference")}}D!==void 0?O[N]=D:delete O[N]}}return g.multi||(k._ruleRemove(h.name,{clone:!1}),k._singleRules.set(h.name,h)),k.$_temp.ruleset===!1&&(k.$_temp.ruleset=null),g.priority?k._rules.unshift(h):k._rules.push(h),k}$_compile(c,h){return s.schema(this.$_root,c,h)}$_createError(c,h,g,O,k,N={}){const D=N.flags!==!1?this._flags:{},M=N.messages?n.merge(this._definition.messages,N.messages):this._definition.messages;return new r.Report(c,h,g,D,M,O,k)}$_getFlag(c){return this._flags[c]}$_getRule(c){return this._singleRules.get(c)}$_mapLabels(c){return c=Array.isArray(c)?c:c.split("."),this._ids.labels(c)}$_match(c,h,g,O){(g=Object.assign({},g)).abortEarly=!0,g._externals=!1,h.snapshot();const k=!p.validate(c,this,h,g,O).errors;return h.restore(),k}$_modify(c){return a.assertOptions(c,["each","once","ref","schema"]),i.schema(this,c)||this}$_mutateRebuild(){return o(!this._inRuleset(),"Cannot add this rule inside a ruleset"),this._refs.reset(),this._ids.reset(),this.$_modify({each:(c,{source:h,name:g,path:O,key:k})=>{const N=this._definition[h][g]&&this._definition[h][g].register;N!==!1&&this.$_mutateRegister(c,{family:N,key:k})}}),this._definition.rebuild&&this._definition.rebuild(this),this.$_temp.ruleset=!1,this}$_mutateRegister(c,{family:h,key:g}={}){this._refs.register(c,h),this._ids.register(c,{key:g})}$_property(c){return this._definition.properties[c]}$_reach(c){return this._ids.reach(c)}$_rootReferences(){return this._refs.roots()}$_setFlag(c,h,g={}){o(c[0]==="_"||!this._inRuleset(),"Cannot set flag inside a ruleset");const O=this._definition.flags[c]||{};if(d(h,O.default)&&(h=void 0),d(h,this._flags[c]))return this;const k=g.clone!==!1?this.clone():this;return h!==void 0?(k._flags[c]=h,k.$_mutateRegister(h)):delete k._flags[c],c[0]!=="_"&&(k.$_temp.ruleset=!1),k}$_parent(c,...h){return this[c][a.symbols.parent].call(this,...h)}$_validate(c,h,g){return p.validate(c,this,h,g)}_assign(c){c.type=this.type,c.$_root=this.$_root,c.$_temp=Object.assign({},this.$_temp),c.$_temp.whens={},c._ids=this._ids.clone(),c._preferences=this._preferences,c._valids=this._valids&&this._valids.clone(),c._invalids=this._invalids&&this._invalids.clone(),c._rules=this._rules.slice(),c._singleRules=y(this._singleRules,{shallow:!0}),c._refs=this._refs.clone(),c._flags=Object.assign({},this._flags),c._cache=null,c.$_terms={};for(const h in this.$_terms)c.$_terms[h]=this.$_terms[h]?this.$_terms[h].slice():null;c.$_super={};for(const h in this.$_super)c.$_super[h]=this._super[h].bind(c);return c}_bare(){const c=this.clone();c._reset();const h=c._definition.terms;for(const g in h){const O=h[g];c.$_terms[g]=O.init}return c.$_mutateRebuild()}_default(c,h,g={}){return a.assertOptions(g,"literal"),o(h!==void 0,"Missing",c,"value"),o(typeof h=="function"||!g.literal,"Only function value supports literal option"),typeof h=="function"&&g.literal&&(h={[a.symbols.literal]:!0,literal:h}),this.$_setFlag(c,h)}_generate(c,h,g){if(!this.$_terms.whens)return{schema:this};const O=[],k=[];for(let M=0;M<this.$_terms.whens.length;++M){const z=this.$_terms.whens[M];if(z.concat){O.push(z.concat),k.push(`${M}.concat`);continue}const B=z.ref?z.ref.resolve(c,h,g):c,K=z.is?[z]:z.switch,Q=k.length;for(let W=0;W<K.length;++W){const{is:V,then:Z,otherwise:J}=K[W],te=`${M}${z.switch?"."+W:""}`;if(V.$_match(B,h.nest(V,`${te}.is`),g)){if(Z){const ce=h.localize([...h.path,`${te}.then`],h.ancestors,h.schemas),{schema:de,id:ue}=Z._generate(c,ce,g);O.push(de),k.push(`${te}.then${ue?`(${ue})`:""}`);break}}else if(J){const ce=h.localize([...h.path,`${te}.otherwise`],h.ancestors,h.schemas),{schema:de,id:ue}=J._generate(c,ce,g);O.push(de),k.push(`${te}.otherwise${ue?`(${ue})`:""}`);break}}if(z.break&&k.length>Q)break}const N=k.join(", ");if(h.mainstay.tracer.debug(h,"rule","when",N),!N)return{schema:this};if(!h.mainstay.tracer.active&&this.$_temp.whens[N])return{schema:this.$_temp.whens[N],id:N};let D=this;this._definition.generate&&(D=this._definition.generate(this,c,h,g));for(const M of O)D=D.concat(M);return this.$_root._tracer&&this.$_root._tracer._combine(D,[this,...O]),this.$_temp.whens[N]=D,{schema:D,id:N}}_inner(c,h,g={}){o(!this._inRuleset(),`Cannot set ${c} inside a ruleset`);const O=this.clone();return O.$_terms[c]&&!g.override||(O.$_terms[c]=[]),g.single?O.$_terms[c].push(h):O.$_terms[c].push(...h),O.$_temp.ruleset=!1,O}_inRuleset(){return this.$_temp.ruleset!==null&&this.$_temp.ruleset!==!1}_ruleRemove(c,h={}){if(!this._singleRules.has(c))return this;const g=h.clone!==!1?this.clone():this;g._singleRules.delete(c);const O=[];for(let k=0;k<g._rules.length;++k){const N=g._rules[k];N.name!==c||N.keep?O.push(N):g._inRuleset()&&k<g.$_temp.ruleset&&--g.$_temp.ruleset}return g._rules=O,g}_values(c,h){a.verifyFlat(c,h.slice(1,-1));const g=this.clone(),O=c[0]===a.symbols.override;if(O&&(c=c.slice(1)),!g[h]&&c.length?g[h]=new E:O&&(g[h]=c.length?new E:null,g.$_mutateRebuild()),!g[h])return g;O&&g[h].override();for(const k of c){o(k!==void 0,"Cannot call allow/valid/invalid with undefined"),o(k!==a.symbols.override,"Override must be the first value");const N=h==="_invalids"?"_valids":"_invalids";g[N]&&(g[N].remove(k),g[N].length||(o(h==="_valids"||!g._flags.only,"Setting invalid value",k,"leaves schema rejecting all values due to previous valid rule"),g[N]=null)),g[h].add(k,g._refs)}return g}}};w.Base.prototype[a.symbols.any]={version:a.version,compile:s.compile,root:"$_root"},w.Base.prototype.isImmutable=!0,w.Base.prototype.deny=w.Base.prototype.invalid,w.Base.prototype.disallow=w.Base.prototype.invalid,w.Base.prototype.equal=w.Base.prototype.valid,w.Base.prototype.exist=w.Base.prototype.required,w.Base.prototype.not=w.Base.prototype.invalid,w.Base.prototype.options=w.Base.prototype.prefs,w.Base.prototype.preferences=w.Base.prototype.prefs,A.exports=new w.Base},8652:(A,S,v)=>{const o=v(375),y=v(8571),d=v(8160),u={max:1e3,supported:new Set(["undefined","boolean","number","string"])};S.provider={provision:e=>new u.Cache(e)},u.Cache=class{constructor(e={}){d.assertOptions(e,["max"]),o(e.max===void 0||e.max&&e.max>0&&isFinite(e.max),"Invalid max cache size"),this._max=e.max||u.max,this._map=new Map,this._list=new u.List}get length(){return this._map.size}set(e,a){if(e!==null&&!u.supported.has(typeof e))return;let s=this._map.get(e);if(s)return s.value=a,void this._list.first(s);s=this._list.unshift({key:e,value:a}),this._map.set(e,s),this._compact()}get(e){const a=this._map.get(e);if(a)return this._list.first(a),y(a.value)}_compact(){if(this._map.size>this._max){const e=this._list.pop();this._map.delete(e.key)}}},u.List=class{constructor(){this.tail=null,this.head=null}unshift(e){return e.next=null,e.prev=this.head,this.head&&(this.head.next=e),this.head=e,this.tail||(this.tail=e),e}first(e){e!==this.head&&(this._remove(e),this.unshift(e))}pop(){return this._remove(this.tail)}_remove(e){const{next:a,prev:s}=e;return a.prev=s,s&&(s.next=a),e===this.tail&&(this.tail=a),e.prev=null,e.next=null,e}}},8160:(A,S,v)=>{const o=v(375),y=v(7916),d=v(5934);let u,e;const a={isoDate:/^(?:[-+]\d{2})?(?:\d{4}(?!\d{2}\b))(?:(-?)(?:(?:0[1-9]|1[0-2])(?:\1(?:[12]\d|0[1-9]|3[01]))?|W(?:[0-4]\d|5[0-2])(?:-?[1-7])?|(?:00[1-9]|0[1-9]\d|[12]\d{2}|3(?:[0-5]\d|6[1-6])))(?![T]$|[T][\d]+Z$)(?:[T\s](?:(?:(?:[01]\d|2[0-3])(?:(:?)[0-5]\d)?|24\:?00)(?:[.,]\d+(?!:))?)(?:\2[0-5]\d(?:[.,]\d+)?)?(?:[Z]|(?:[+-])(?:[01]\d|2[0-3])(?::?[0-5]\d)?)?)?)?$/};S.version=d.version,S.defaults={abortEarly:!0,allowUnknown:!1,artifacts:!1,cache:!0,context:null,convert:!0,dateFormat:"iso",errors:{escapeHtml:!1,label:"path",language:null,render:!0,stack:!1,wrap:{label:'"',array:"[]"}},externals:!0,messages:{},nonEnumerables:!1,noDefaults:!1,presence:"optional",skipFunctions:!1,stripUnknown:!1,warnings:!1},S.symbols={any:Symbol.for("@hapi/joi/schema"),arraySingle:Symbol("arraySingle"),deepDefault:Symbol("deepDefault"),errors:Symbol("errors"),literal:Symbol("literal"),override:Symbol("override"),parent:Symbol("parent"),prefs:Symbol("prefs"),ref:Symbol("ref"),template:Symbol("template"),values:Symbol("values")},S.assertOptions=function(s,r,t="Options"){o(s&&typeof s=="object"&&!Array.isArray(s),"Options must be of type object");const l=Object.keys(s).filter(n=>!r.includes(n));o(l.length===0,`${t} contain unknown keys: ${l}`)},S.checkPreferences=function(s){e=e||v(3378);const r=e.preferences.validate(s);if(r.error)throw new y([r.error.details[0].message])},S.compare=function(s,r,t){switch(t){case"=":return s===r;case">":return s>r;case"<":return s<r;case">=":return s>=r;case"<=":return s<=r}},S.default=function(s,r){return s===void 0?r:s},S.isIsoDate=function(s){return a.isoDate.test(s)},S.isNumber=function(s){return typeof s=="number"&&!isNaN(s)},S.isResolvable=function(s){return!!s&&(s[S.symbols.ref]||s[S.symbols.template])},S.isSchema=function(s,r={}){const t=s&&s[S.symbols.any];return!!t&&(o(r.legacy||t.version===S.version,"Cannot mix different versions of joi schemas"),!0)},S.isValues=function(s){return s[S.symbols.values]},S.limit=function(s){return Number.isSafeInteger(s)&&s>=0},S.preferences=function(s,r){u=u||v(6914),s=s||{},r=r||{};const t=Object.assign({},s,r);return r.errors&&s.errors&&(t.errors=Object.assign({},s.errors,r.errors),t.errors.wrap=Object.assign({},s.errors.wrap,r.errors.wrap)),r.messages&&(t.messages=u.compile(r.messages,s.messages)),delete t[S.symbols.prefs],t},S.tryWithPath=function(s,r,t={}){try{return s()}catch(l){throw l.path!==void 0?l.path=r+"."+l.path:l.path=r,t.append&&(l.message=`${l.message} (${l.path})`),l}},S.validateArg=function(s,r,{assert:t,message:l}){if(S.isSchema(t)){const n=t.validate(s);return n.error?n.error.message:void 0}if(!t(s))return r?`${r} ${l}`:l},S.verifyFlat=function(s,r){for(const t of s)o(!Array.isArray(t),"Method no longer accepts array arguments:",r)}},3292:(A,S,v)=>{const o=v(375),y=v(8160),d=v(6133),u={};S.schema=function(e,a,s={}){y.assertOptions(s,["appendPath","override"]);try{return u.schema(e,a,s)}catch(r){throw s.appendPath&&r.path!==void 0&&(r.message=`${r.message} (${r.path})`),r}},u.schema=function(e,a,s){o(a!==void 0,"Invalid undefined schema"),Array.isArray(a)&&(o(a.length,"Invalid empty array schema"),a.length===1&&(a=a[0]));const r=(t,...l)=>s.override!==!1?t.valid(e.override,...l):t.valid(...l);if(u.simple(a))return r(e,a);if(typeof a=="function")return e.custom(a);if(o(typeof a=="object","Invalid schema content:",typeof a),y.isResolvable(a))return r(e,a);if(y.isSchema(a))return a;if(Array.isArray(a)){for(const t of a)if(!u.simple(t))return e.alternatives().try(...a);return r(e,...a)}return a instanceof RegExp?e.string().regex(a):a instanceof Date?r(e.date(),a):(o(Object.getPrototypeOf(a)===Object.getPrototypeOf({}),"Schema can only contain plain objects"),e.object().keys(a))},S.ref=function(e,a){return d.isRef(e)?e:d.create(e,a)},S.compile=function(e,a,s={}){y.assertOptions(s,["legacy"]);const r=a&&a[y.symbols.any];if(r)return o(s.legacy||r.version===y.version,"Cannot mix different versions of joi schemas:",r.version,y.version),a;if(typeof a!="object"||!s.legacy)return S.schema(e,a,{appendPath:!0});const t=u.walk(a);return t?t.compile(t.root,a):S.schema(e,a,{appendPath:!0})},u.walk=function(e){if(typeof e!="object")return null;if(Array.isArray(e)){for(const s of e){const r=u.walk(s);if(r)return r}return null}const a=e[y.symbols.any];if(a)return{root:e[a.root],compile:a.compile};o(Object.getPrototypeOf(e)===Object.getPrototypeOf({}),"Schema can only contain plain objects");for(const s in e){const r=u.walk(e[s]);if(r)return r}return null},u.simple=function(e){return e===null||["boolean","string","number"].includes(typeof e)},S.when=function(e,a,s){if(s===void 0&&(o(a&&typeof a=="object","Missing options"),s=a,a=d.create(".")),Array.isArray(s)&&(s={switch:s}),y.assertOptions(s,["is","not","then","otherwise","switch","break"]),y.isSchema(a))return o(s.is===void 0,'"is" can not be used with a schema condition'),o(s.not===void 0,'"not" can not be used with a schema condition'),o(s.switch===void 0,'"switch" can not be used with a schema condition'),u.condition(e,{is:a,then:s.then,otherwise:s.otherwise,break:s.break});if(o(d.isRef(a)||typeof a=="string","Invalid condition:",a),o(s.not===void 0||s.is===void 0,'Cannot combine "is" with "not"'),s.switch===void 0){let t=s;s.not!==void 0&&(t={is:s.not,then:s.otherwise,otherwise:s.then,break:s.break});let l=t.is!==void 0?e.$_compile(t.is):e.$_root.invalid(null,!1,0,"").required();return o(t.then!==void 0||t.otherwise!==void 0,'options must have at least one of "then", "otherwise", or "switch"'),o(t.break===void 0||t.then===void 0||t.otherwise===void 0,"Cannot specify then, otherwise, and break all together"),s.is===void 0||d.isRef(s.is)||y.isSchema(s.is)||(l=l.required()),u.condition(e,{ref:S.ref(a),is:l,then:t.then,otherwise:t.otherwise,break:t.break})}o(Array.isArray(s.switch),'"switch" must be an array'),o(s.is===void 0,'Cannot combine "switch" with "is"'),o(s.not===void 0,'Cannot combine "switch" with "not"'),o(s.then===void 0,'Cannot combine "switch" with "then"');const r={ref:S.ref(a),switch:[],break:s.break};for(let t=0;t<s.switch.length;++t){const l=s.switch[t],n=t===s.switch.length-1;y.assertOptions(l,n?["is","then","otherwise"]:["is","then"]),o(l.is!==void 0,'Switch statement missing "is"'),o(l.then!==void 0,'Switch statement missing "then"');const i={is:e.$_compile(l.is),then:e.$_compile(l.then)};if(d.isRef(l.is)||y.isSchema(l.is)||(i.is=i.is.required()),n){o(s.otherwise===void 0||l.otherwise===void 0,'Cannot specify "otherwise" inside and outside a "switch"');const f=s.otherwise!==void 0?s.otherwise:l.otherwise;f!==void 0&&(o(r.break===void 0,"Cannot specify both otherwise and break"),i.otherwise=e.$_compile(f))}r.switch.push(i)}return r},u.condition=function(e,a){for(const s of["then","otherwise"])a[s]===void 0?delete a[s]:a[s]=e.$_compile(a[s]);return a}},6354:(A,S,v)=>{const o=v(5688),y=v(8160),d=v(3328);S.Report=class{constructor(u,e,a,s,r,t,l){if(this.code=u,this.flags=s,this.messages=r,this.path=t.path,this.prefs=l,this.state=t,this.value=e,this.message=null,this.template=null,this.local=a||{},this.local.label=S.label(this.flags,this.state,this.prefs,this.messages),this.value===void 0||this.local.hasOwnProperty("value")||(this.local.value=this.value),this.path.length){const n=this.path[this.path.length-1];typeof n!="object"&&(this.local.key=n)}}_setTemplate(u){if(this.template=u,!this.flags.label&&this.path.length===0){const e=this._template(this.template,"root");e&&(this.local.label=e)}}toString(){if(this.message)return this.message;const u=this.code;if(!this.prefs.errors.render)return this.code;const e=this._template(this.template)||this._template(this.prefs.messages)||this._template(this.messages);return e===void 0?`Error code "${u}" is not defined, your custom type is missing the correct messages definition`:(this.message=e.render(this.value,this.state,this.prefs,this.local,{errors:this.prefs.errors,messages:[this.prefs.messages,this.messages]}),this.prefs.errors.label||(this.message=this.message.replace(/^"" /,"").trim()),this.message)}_template(u,e){return S.template(this.value,u,e||this.code,this.state,this.prefs)}},S.path=function(u){let e="";for(const a of u)typeof a!="object"&&(typeof a=="string"?(e&&(e+="."),e+=a):e+=`[${a}]`);return e},S.template=function(u,e,a,s,r){if(!e)return;if(d.isTemplate(e))return a!=="root"?e:null;let t=r.errors.language;if(y.isResolvable(t)&&(t=t.resolve(u,s,r)),t&&e[t]){if(e[t][a]!==void 0)return e[t][a];if(e[t]["*"]!==void 0)return e[t]["*"]}return e[a]?e[a]:e["*"]},S.label=function(u,e,a,s){if(u.label)return u.label;if(!a.errors.label)return"";let r=e.path;return a.errors.label==="key"&&e.path.length>1&&(r=e.path.slice(-1)),S.path(r)||S.template(null,a.messages,"root",e,a)||s&&S.template(null,s,"root",e,a)||"value"},S.process=function(u,e,a){if(!u)return null;const{override:s,message:r,details:t}=S.details(u);if(s)return s;if(a.errors.stack)return new S.ValidationError(r,t,e);const l=Error.stackTraceLimit;Error.stackTraceLimit=0;const n=new S.ValidationError(r,t,e);return Error.stackTraceLimit=l,n},S.details=function(u,e={}){let a=[];const s=[];for(const r of u){if(r instanceof Error){if(e.override!==!1)return{override:r};const l=r.toString();a.push(l),s.push({message:l,type:"override",context:{error:r}});continue}const t=r.toString();a.push(t),s.push({message:t,path:r.path.filter(l=>typeof l!="object"),type:r.code,context:r.local})}return a.length>1&&(a=[...new Set(a)]),{message:a.join(". "),details:s}},S.ValidationError=class extends Error{constructor(u,e,a){super(u),this._original=a,this.details=e}static isError(u){return u instanceof S.ValidationError}},S.ValidationError.prototype.isJoi=!0,S.ValidationError.prototype.name="ValidationError",S.ValidationError.prototype.annotate=o.error},8901:(A,S,v)=>{const o=v(375),y=v(8571),d=v(8160),u=v(6914),e={};S.type=function(a,s){const r=Object.getPrototypeOf(a),t=y(r),l=a._assign(Object.create(t)),n=Object.assign({},s);delete n.base,t._definition=n;const i=r._definition||{};n.messages=u.merge(i.messages,n.messages),n.properties=Object.assign({},i.properties,n.properties),l.type=n.type,n.flags=Object.assign({},i.flags,n.flags);const f=Object.assign({},i.terms);if(n.terms)for(const w in n.terms){const c=n.terms[w];o(l.$_terms[w]===void 0,"Invalid term override for",n.type,w),l.$_terms[w]=c.init,f[w]=c}n.terms=f,n.args||(n.args=i.args),n.prepare=e.prepare(n.prepare,i.prepare),n.coerce&&(typeof n.coerce=="function"&&(n.coerce={method:n.coerce}),n.coerce.from&&!Array.isArray(n.coerce.from)&&(n.coerce={method:n.coerce.method,from:[].concat(n.coerce.from)})),n.coerce=e.coerce(n.coerce,i.coerce),n.validate=e.validate(n.validate,i.validate);const m=Object.assign({},i.rules);if(n.rules)for(const w in n.rules){const c=n.rules[w];o(typeof c=="object","Invalid rule definition for",n.type,w);let h=c.method;if(h===void 0&&(h=function(){return this.$_addRule(w)}),h&&(o(!t[w],"Rule conflict in",n.type,w),t[w]=h),o(!m[w],"Rule conflict in",n.type,w),m[w]=c,c.alias){const g=[].concat(c.alias);for(const O of g)t[O]=c.method}c.args&&(c.argsByName=new Map,c.args=c.args.map(g=>(typeof g=="string"&&(g={name:g}),o(!c.argsByName.has(g.name),"Duplicated argument name",g.name),d.isSchema(g.assert)&&(g.assert=g.assert.strict().label(g.name)),c.argsByName.set(g.name,g),g)))}n.rules=m;const p=Object.assign({},i.modifiers);if(n.modifiers)for(const w in n.modifiers){o(!t[w],"Rule conflict in",n.type,w);const c=n.modifiers[w];o(typeof c=="function","Invalid modifier definition for",n.type,w);const h=function(g){return this.rule({[w]:g})};t[w]=h,p[w]=c}if(n.modifiers=p,n.overrides){t._super=r,l.$_super={};for(const w in n.overrides)o(r[w],"Cannot override missing",w),n.overrides[w][d.symbols.parent]=r[w],l.$_super[w]=r[w].bind(l);Object.assign(t,n.overrides)}n.cast=Object.assign({},i.cast,n.cast);const E=Object.assign({},i.manifest,n.manifest);return E.build=e.build(n.manifest&&n.manifest.build,i.manifest&&i.manifest.build),n.manifest=E,n.rebuild=e.rebuild(n.rebuild,i.rebuild),l},e.build=function(a,s){return a&&s?function(r,t){return s(a(r,t),t)}:a||s},e.coerce=function(a,s){return a&&s?{from:a.from&&s.from?[...new Set([...a.from,...s.from])]:null,method(r,t){let l;if((!s.from||s.from.includes(typeof r))&&(l=s.method(r,t),l)){if(l.errors||l.value===void 0)return l;r=l.value}if(!a.from||a.from.includes(typeof r)){const n=a.method(r,t);if(n)return n}return l}}:a||s},e.prepare=function(a,s){return a&&s?function(r,t){const l=a(r,t);if(l){if(l.errors||l.value===void 0)return l;r=l.value}return s(r,t)||l}:a||s},e.rebuild=function(a,s){return a&&s?function(r){s(r),a(r)}:a||s},e.validate=function(a,s){return a&&s?function(r,t){const l=s(r,t);if(l){if(l.errors&&(!Array.isArray(l.errors)||l.errors.length))return l;r=l.value}return a(r,t)||l}:a||s}},5107:(A,S,v)=>{const o=v(375),y=v(8571),d=v(8652),u=v(8160),e=v(3292),a=v(6354),s=v(8901),r=v(9708),t=v(6133),l=v(3328),n=v(1152);let i;const f={types:{alternatives:v(4946),any:v(8068),array:v(546),boolean:v(4937),date:v(7500),function:v(390),link:v(8785),number:v(3832),object:v(8966),string:v(7417),symbol:v(8826)},aliases:{alt:"alternatives",bool:"boolean",func:"function"},root:function(){const m={_types:new Set(Object.keys(f.types))};for(const p of m._types)m[p]=function(...E){return o(!E.length||["alternatives","link","object"].includes(p),"The",p,"type does not allow arguments"),f.generate(this,f.types[p],E)};for(const p of["allow","custom","disallow","equal","exist","forbidden","invalid","not","only","optional","options","prefs","preferences","required","strip","valid","when"])m[p]=function(...E){return this.any()[p](...E)};Object.assign(m,f.methods);for(const p in f.aliases){const E=f.aliases[p];m[p]=m[E]}return m.x=m.expression,n.setup&&n.setup(m),m}};f.methods={ValidationError:a.ValidationError,version:u.version,cache:d.provider,assert(m,p,...E){f.assert(m,p,!0,E)},attempt:(m,p,...E)=>f.assert(m,p,!1,E),build(m){return o(typeof r.build=="function","Manifest functionality disabled"),r.build(this,m)},checkPreferences(m){u.checkPreferences(m)},compile(m,p){return e.compile(this,m,p)},defaults(m){o(typeof m=="function","modifier must be a function");const p=Object.assign({},this);for(const E of p._types){const w=m(p[E]());o(u.isSchema(w),"modifier must return a valid schema object"),p[E]=function(...c){return f.generate(this,w,c)}}return p},expression:(...m)=>new l(...m),extend(...m){u.verifyFlat(m,"extend"),i=i||v(3378),o(m.length,"You need to provide at least one extension"),this.assert(m,i.extensions);const p=Object.assign({},this);p._types=new Set(p._types);for(let E of m){typeof E=="function"&&(E=E(p)),this.assert(E,i.extension);const w=f.expandExtension(E,p);for(const c of w){o(p[c.type]===void 0||p._types.has(c.type),"Cannot override name",c.type);const h=c.base||this.any(),g=s.type(h,c);p._types.add(c.type),p[c.type]=function(...O){return f.generate(this,g,O)}}}return p},isError:a.ValidationError.isError,isExpression:l.isTemplate,isRef:t.isRef,isSchema:u.isSchema,in:(...m)=>t.in(...m),override:u.symbols.override,ref:(...m)=>t.create(...m),types(){const m={};for(const p of this._types)m[p]=this[p]();for(const p in f.aliases)m[p]=this[p]();return m}},f.assert=function(m,p,E,w){const c=w[0]instanceof Error||typeof w[0]=="string"?w[0]:null,h=c!==null?w[1]:w[0],g=p.validate(m,u.preferences({errors:{stack:!0}},h||{}));let O=g.error;if(!O)return g.value;if(c instanceof Error)throw c;const k=E&&typeof O.annotate=="function"?O.annotate():O.message;throw O instanceof a.ValidationError==0&&(O=y(O)),O.message=c?`${c} ${k}`:k,O},f.generate=function(m,p,E){return o(m,"Must be invoked on a Joi instance."),p.$_root=m,p._definition.args&&E.length?p._definition.args(p,...E):p},f.expandExtension=function(m,p){if(typeof m.type=="string")return[m];const E=[];for(const w of p._types)if(m.type.test(w)){const c=Object.assign({},m);c.type=w,c.base=p[w](),E.push(c)}return E},A.exports=f.root()},6914:(A,S,v)=>{const o=v(375),y=v(8571),d=v(3328);S.compile=function(u,e){if(typeof u=="string")return o(!e,"Cannot set single message string"),new d(u);if(d.isTemplate(u))return o(!e,"Cannot set single message template"),u;o(typeof u=="object"&&!Array.isArray(u),"Invalid message options"),e=e?y(e):{};for(let a in u){const s=u[a];if(a==="root"||d.isTemplate(s)){e[a]=s;continue}if(typeof s=="string"){e[a]=new d(s);continue}o(typeof s=="object"&&!Array.isArray(s),"Invalid message for",a);const r=a;for(a in e[r]=e[r]||{},s){const t=s[a];a==="root"||d.isTemplate(t)?e[r][a]=t:(o(typeof t=="string","Invalid message for",a,"in",r),e[r][a]=new d(t))}}return e},S.decompile=function(u){const e={};for(let a in u){const s=u[a];if(a==="root"){e.root=s;continue}if(d.isTemplate(s)){e[a]=s.describe({compact:!0});continue}const r=a;for(a in e[r]={},s){const t=s[a];a!=="root"?e[r][a]=t.describe({compact:!0}):e[r].root=t}}return e},S.merge=function(u,e){if(!u)return S.compile(e);if(!e)return u;if(typeof e=="string")return new d(e);if(d.isTemplate(e))return e;const a=y(u);for(let s in e){const r=e[s];if(s==="root"||d.isTemplate(r)){a[s]=r;continue}if(typeof r=="string"){a[s]=new d(r);continue}o(typeof r=="object"&&!Array.isArray(r),"Invalid message for",s);const t=s;for(s in a[t]=a[t]||{},r){const l=r[s];s==="root"||d.isTemplate(l)?a[t][s]=l:(o(typeof l=="string","Invalid message for",s,"in",t),a[t][s]=new d(l))}}return a}},2294:(A,S,v)=>{const o=v(375),y=v(8160),d=v(6133),u={};S.Ids=u.Ids=class{constructor(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}clone(){const e=new u.Ids;return e._byId=new Map(this._byId),e._byKey=new Map(this._byKey),e._schemaChain=this._schemaChain,e}concat(e){e._schemaChain&&(this._schemaChain=!0);for(const[a,s]of e._byId.entries())o(!this._byKey.has(a),"Schema id conflicts with existing key:",a),this._byId.set(a,s);for(const[a,s]of e._byKey.entries())o(!this._byId.has(a),"Schema key conflicts with existing id:",a),this._byKey.set(a,s)}fork(e,a,s){const r=this._collect(e);r.push({schema:s});const t=r.shift();let l={id:t.id,schema:a(t.schema)};o(y.isSchema(l.schema),"adjuster function failed to return a joi schema type");for(const n of r)l={id:n.id,schema:u.fork(n.schema,l.id,l.schema)};return l.schema}labels(e,a=[]){const s=e[0],r=this._get(s);if(!r)return[...a,...e].join(".");const t=e.slice(1);return a=[...a,r.schema._flags.label||s],t.length?r.schema._ids.labels(t,a):a.join(".")}reach(e,a=[]){const s=e[0],r=this._get(s);o(r,"Schema does not contain path",[...a,...e].join("."));const t=e.slice(1);return t.length?r.schema._ids.reach(t,[...a,s]):r.schema}register(e,{key:a}={}){if(!e||!y.isSchema(e))return;(e.$_property("schemaChain")||e._ids._schemaChain)&&(this._schemaChain=!0);const s=e._flags.id;if(s){const r=this._byId.get(s);o(!r||r.schema===e,"Cannot add different schemas with the same id:",s),o(!this._byKey.has(s),"Schema id conflicts with existing key:",s),this._byId.set(s,{schema:e,id:s})}a&&(o(!this._byKey.has(a),"Schema already contains key:",a),o(!this._byId.has(a),"Schema key conflicts with existing id:",a),this._byKey.set(a,{schema:e,id:a}))}reset(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}_collect(e,a=[],s=[]){const r=e[0],t=this._get(r);o(t,"Schema does not contain path",[...a,...e].join(".")),s=[t,...s];const l=e.slice(1);return l.length?t.schema._ids._collect(l,[...a,r],s):s}_get(e){return this._byId.get(e)||this._byKey.get(e)}},u.fork=function(e,a,s){const r=S.schema(e,{each:(t,{key:l})=>{if(a===(t._flags.id||l))return s},ref:!1});return r?r.$_mutateRebuild():e},S.schema=function(e,a){let s;for(const r in e._flags){if(r[0]==="_")continue;const t=u.scan(e._flags[r],{source:"flags",name:r},a);t!==void 0&&(s=s||e.clone(),s._flags[r]=t)}for(let r=0;r<e._rules.length;++r){const t=e._rules[r],l=u.scan(t.args,{source:"rules",name:t.name},a);if(l!==void 0){s=s||e.clone();const n=Object.assign({},t);n.args=l,s._rules[r]=n,s._singleRules.get(t.name)===t&&s._singleRules.set(t.name,n)}}for(const r in e.$_terms){if(r[0]==="_")continue;const t=u.scan(e.$_terms[r],{source:"terms",name:r},a);t!==void 0&&(s=s||e.clone(),s.$_terms[r]=t)}return s},u.scan=function(e,a,s,r,t){const l=r||[];if(e===null||typeof e!="object")return;let n;if(Array.isArray(e)){for(let i=0;i<e.length;++i){const f=a.source==="terms"&&a.name==="keys"&&e[i].key,m=u.scan(e[i],a,s,[i,...l],f);m!==void 0&&(n=n||e.slice(),n[i]=m)}return n}if(s.schema!==!1&&y.isSchema(e)||s.ref!==!1&&d.isRef(e)){const i=s.each(e,{...a,path:l,key:t});return i===e?void 0:i}for(const i in e){if(i[0]==="_")continue;const f=u.scan(e[i],a,s,[i,...l],t);f!==void 0&&(n=n||Object.assign({},e),n[i]=f)}return n}},6133:(A,S,v)=>{const o=v(375),y=v(8571),d=v(9621),u=v(8160);let e;const a={symbol:Symbol("ref"),defaults:{adjust:null,in:!1,iterables:null,map:null,separator:".",type:"value"}};S.create=function(s,r={}){o(typeof s=="string","Invalid reference key:",s),u.assertOptions(r,["adjust","ancestor","in","iterables","map","prefix","render","separator"]),o(!r.prefix||typeof r.prefix=="object","options.prefix must be of type object");const t=Object.assign({},a.defaults,r);delete t.prefix;const l=t.separator,n=a.context(s,l,r.prefix);if(t.type=n.type,s=n.key,t.type==="value")if(n.root&&(o(!l||s[0]!==l,"Cannot specify relative path with root prefix"),t.ancestor="root",s||(s=null)),l&&l===s)s=null,t.ancestor=0;else if(t.ancestor!==void 0)o(!l||!s||s[0]!==l,"Cannot combine prefix with ancestor option");else{const[i,f]=a.ancestor(s,l);f&&(s=s.slice(f))===""&&(s=null),t.ancestor=i}return t.path=l?s===null?[]:s.split(l):[s],new a.Ref(t)},S.in=function(s,r={}){return S.create(s,{...r,in:!0})},S.isRef=function(s){return!!s&&!!s[u.symbols.ref]},a.Ref=class{constructor(s){o(typeof s=="object","Invalid reference construction"),u.assertOptions(s,["adjust","ancestor","in","iterables","map","path","render","separator","type","depth","key","root","display"]),o([!1,void 0].includes(s.separator)||typeof s.separator=="string"&&s.separator.length===1,"Invalid separator"),o(!s.adjust||typeof s.adjust=="function","options.adjust must be a function"),o(!s.map||Array.isArray(s.map),"options.map must be an array"),o(!s.map||!s.adjust,"Cannot set both map and adjust options"),Object.assign(this,a.defaults,s),o(this.type==="value"||this.ancestor===void 0,"Non-value references cannot reference ancestors"),Array.isArray(this.map)&&(this.map=new Map(this.map)),this.depth=this.path.length,this.key=this.path.length?this.path.join(this.separator):null,this.root=this.path[0],this.updateDisplay()}resolve(s,r,t,l,n={}){return o(!this.in||n.in,"Invalid in() reference usage"),this.type==="global"?this._resolve(t.context,r,n):this.type==="local"?this._resolve(l,r,n):this.ancestor?this.ancestor==="root"?this._resolve(r.ancestors[r.ancestors.length-1],r,n):(o(this.ancestor<=r.ancestors.length,"Invalid reference exceeds the schema root:",this.display),this._resolve(r.ancestors[this.ancestor-1],r,n)):this._resolve(s,r,n)}_resolve(s,r,t){let l;if(this.type==="value"&&r.mainstay.shadow&&t.shadow!==!1&&(l=r.mainstay.shadow.get(this.absolute(r))),l===void 0&&(l=d(s,this.path,{iterables:this.iterables,functions:!0})),this.adjust&&(l=this.adjust(l)),this.map){const n=this.map.get(l);n!==void 0&&(l=n)}return r.mainstay&&r.mainstay.tracer.resolve(r,this,l),l}toString(){return this.display}absolute(s){return[...s.path.slice(0,-this.ancestor),...this.path]}clone(){return new a.Ref(this)}describe(){const s={path:this.path};this.type!=="value"&&(s.type=this.type),this.separator!=="."&&(s.separator=this.separator),this.type==="value"&&this.ancestor!==1&&(s.ancestor=this.ancestor),this.map&&(s.map=[...this.map]);for(const r of["adjust","iterables","render"])this[r]!==null&&this[r]!==void 0&&(s[r]=this[r]);return this.in!==!1&&(s.in=!0),{ref:s}}updateDisplay(){const s=this.key!==null?this.key:"";if(this.type!=="value")return void(this.display=`ref:${this.type}:${s}`);if(!this.separator)return void(this.display=`ref:${s}`);if(!this.ancestor)return void(this.display=`ref:${this.separator}${s}`);if(this.ancestor==="root")return void(this.display=`ref:root:${s}`);if(this.ancestor===1)return void(this.display=`ref:${s||".."}`);const r=new Array(this.ancestor+1).fill(this.separator).join("");this.display=`ref:${r}${s||""}`}},a.Ref.prototype[u.symbols.ref]=!0,S.build=function(s){return(s=Object.assign({},a.defaults,s)).type==="value"&&s.ancestor===void 0&&(s.ancestor=1),new a.Ref(s)},a.context=function(s,r,t={}){if(s=s.trim(),t){const l=t.global===void 0?"$":t.global;if(l!==r&&s.startsWith(l))return{key:s.slice(l.length),type:"global"};const n=t.local===void 0?"#":t.local;if(n!==r&&s.startsWith(n))return{key:s.slice(n.length),type:"local"};const i=t.root===void 0?"/":t.root;if(i!==r&&s.startsWith(i))return{key:s.slice(i.length),type:"value",root:!0}}return{key:s,type:"value"}},a.ancestor=function(s,r){if(!r)return[1,0];if(s[0]!==r)return[1,0];if(s[1]!==r)return[0,1];let t=2;for(;s[t]===r;)++t;return[t-1,t]},S.toSibling=0,S.toParent=1,S.Manager=class{constructor(){this.refs=[]}register(s,r){if(s)if(r=r===void 0?S.toParent:r,Array.isArray(s))for(const t of s)this.register(t,r);else if(u.isSchema(s))for(const t of s._refs.refs)t.ancestor-r>=0&&this.refs.push({ancestor:t.ancestor-r,root:t.root});else S.isRef(s)&&s.type==="value"&&s.ancestor-r>=0&&this.refs.push({ancestor:s.ancestor-r,root:s.root}),e=e||v(3328),e.isTemplate(s)&&this.register(s.refs(),r)}get length(){return this.refs.length}clone(){const s=new S.Manager;return s.refs=y(this.refs),s}reset(){this.refs=[]}roots(){return this.refs.filter(s=>!s.ancestor).map(s=>s.root)}}},3378:(A,S,v)=>{const o=v(5107),y={};y.wrap=o.string().min(1).max(2).allow(!1),S.preferences=o.object({allowUnknown:o.boolean(),abortEarly:o.boolean(),artifacts:o.boolean(),cache:o.boolean(),context:o.object(),convert:o.boolean(),dateFormat:o.valid("date","iso","string","time","utc"),debug:o.boolean(),errors:{escapeHtml:o.boolean(),label:o.valid("path","key",!1),language:[o.string(),o.object().ref()],render:o.boolean(),stack:o.boolean(),wrap:{label:y.wrap,array:y.wrap,string:y.wrap}},externals:o.boolean(),messages:o.object(),noDefaults:o.boolean(),nonEnumerables:o.boolean(),presence:o.valid("required","optional","forbidden"),skipFunctions:o.boolean(),stripUnknown:o.object({arrays:o.boolean(),objects:o.boolean()}).or("arrays","objects").allow(!0,!1),warnings:o.boolean()}).strict(),y.nameRx=/^[a-zA-Z0-9]\w*$/,y.rule=o.object({alias:o.array().items(o.string().pattern(y.nameRx)).single(),args:o.array().items(o.string(),o.object({name:o.string().pattern(y.nameRx).required(),ref:o.boolean(),assert:o.alternatives([o.function(),o.object().schema()]).conditional("ref",{is:!0,then:o.required()}),normalize:o.function(),message:o.string().when("assert",{is:o.function(),then:o.required()})})),convert:o.boolean(),manifest:o.boolean(),method:o.function().allow(!1),multi:o.boolean(),validate:o.function()}),S.extension=o.object({type:o.alternatives([o.string(),o.object().regex()]).required(),args:o.function(),cast:o.object().pattern(y.nameRx,o.object({from:o.function().maxArity(1).required(),to:o.function().minArity(1).maxArity(2).required()})),base:o.object().schema().when("type",{is:o.object().regex(),then:o.forbidden()}),coerce:[o.function().maxArity(3),o.object({method:o.function().maxArity(3).required(),from:o.array().items(o.string()).single()})],flags:o.object().pattern(y.nameRx,o.object({setter:o.string(),default:o.any()})),manifest:{build:o.function().arity(2)},messages:[o.object(),o.string()],modifiers:o.object().pattern(y.nameRx,o.function().minArity(1).maxArity(2)),overrides:o.object().pattern(y.nameRx,o.function()),prepare:o.function().maxArity(3),rebuild:o.function().arity(1),rules:o.object().pattern(y.nameRx,y.rule),terms:o.object().pattern(y.nameRx,o.object({init:o.array().allow(null).required(),manifest:o.object().pattern(/.+/,[o.valid("schema","single"),o.object({mapped:o.object({from:o.string().required(),to:o.string().required()}).required()})])})),validate:o.function().maxArity(3)}).strict(),S.extensions=o.array().items(o.object(),o.function().arity(1)).strict(),y.desc={buffer:o.object({buffer:o.string()}),func:o.object({function:o.function().required(),options:{literal:!0}}),override:o.object({override:!0}),ref:o.object({ref:o.object({type:o.valid("value","global","local"),path:o.array().required(),separator:o.string().length(1).allow(!1),ancestor:o.number().min(0).integer().allow("root"),map:o.array().items(o.array().length(2)).min(1),adjust:o.function(),iterables:o.boolean(),in:o.boolean(),render:o.boolean()}).required()}),regex:o.object({regex:o.string().min(3)}),special:o.object({special:o.valid("deep").required()}),template:o.object({template:o.string().required(),options:o.object()}),value:o.object({value:o.alternatives([o.object(),o.array()]).required()})},y.desc.entity=o.alternatives([o.array().items(o.link("...")),o.boolean(),o.function(),o.number(),o.string(),y.desc.buffer,y.desc.func,y.desc.ref,y.desc.regex,y.desc.special,y.desc.template,y.desc.value,o.link("/")]),y.desc.values=o.array().items(null,o.boolean(),o.function(),o.number().allow(1/0,-1/0),o.string().allow(""),o.symbol(),y.desc.buffer,y.desc.func,y.desc.override,y.desc.ref,y.desc.regex,y.desc.template,y.desc.value),y.desc.messages=o.object().pattern(/.+/,[o.string(),y.desc.template,o.object().pattern(/.+/,[o.string(),y.desc.template])]),S.description=o.object({type:o.string().required(),flags:o.object({cast:o.string(),default:o.any(),description:o.string(),empty:o.link("/"),failover:y.desc.entity,id:o.string(),label:o.string(),only:!0,presence:["optional","required","forbidden"],result:["raw","strip"],strip:o.boolean(),unit:o.string()}).unknown(),preferences:{allowUnknown:o.boolean(),abortEarly:o.boolean(),artifacts:o.boolean(),cache:o.boolean(),convert:o.boolean(),dateFormat:["date","iso","string","time","utc"],errors:{escapeHtml:o.boolean(),label:["path","key"],language:[o.string(),y.desc.ref],wrap:{label:y.wrap,array:y.wrap}},externals:o.boolean(),messages:y.desc.messages,noDefaults:o.boolean(),nonEnumerables:o.boolean(),presence:["required","optional","forbidden"],skipFunctions:o.boolean(),stripUnknown:o.object({arrays:o.boolean(),objects:o.boolean()}).or("arrays","objects").allow(!0,!1),warnings:o.boolean()},allow:y.desc.values,invalid:y.desc.values,rules:o.array().min(1).items({name:o.string().required(),args:o.object().min(1),keep:o.boolean(),message:[o.string(),y.desc.messages],warn:o.boolean()}),keys:o.object().pattern(/.*/,o.link("/")),link:y.desc.ref}).pattern(/^[a-z]\w*$/,o.any())},493:(A,S,v)=>{const o=v(8571),y=v(9621),d=v(8160),u={value:Symbol("value")};A.exports=u.State=class{constructor(e,a,s){this.path=e,this.ancestors=a,this.mainstay=s.mainstay,this.schemas=s.schemas,this.debug=null}localize(e,a=null,s=null){const r=new u.State(e,a,this);return s&&r.schemas&&(r.schemas=[u.schemas(s),...r.schemas]),r}nest(e,a){const s=new u.State(this.path,this.ancestors,this);return s.schemas=s.schemas&&[u.schemas(e),...s.schemas],s.debug=a,s}shadow(e,a){this.mainstay.shadow=this.mainstay.shadow||new u.Shadow,this.mainstay.shadow.set(this.path,e,a)}snapshot(){this.mainstay.shadow&&(this._snapshot=o(this.mainstay.shadow.node(this.path))),this.mainstay.snapshot()}restore(){this.mainstay.shadow&&(this.mainstay.shadow.override(this.path,this._snapshot),this._snapshot=void 0),this.mainstay.restore()}commit(){this.mainstay.shadow&&(this.mainstay.shadow.override(this.path,this._snapshot),this._snapshot=void 0),this.mainstay.commit()}},u.schemas=function(e){return d.isSchema(e)?{schema:e}:e},u.Shadow=class{constructor(){this._values=null}set(e,a,s){if(!e.length||s==="strip"&&typeof e[e.length-1]=="number")return;this._values=this._values||new Map;let r=this._values;for(let t=0;t<e.length;++t){const l=e[t];let n=r.get(l);n||(n=new Map,r.set(l,n)),r=n}r[u.value]=a}get(e){const a=this.node(e);if(a)return a[u.value]}node(e){if(this._values)return y(this._values,e,{iterables:!0})}override(e,a){if(!this._values)return;const s=e.slice(0,-1),r=e[e.length-1],t=y(this._values,s,{iterables:!0});a?t.set(r,a):t&&t.delete(r)}}},3328:(A,S,v)=>{const o=v(375),y=v(8571),d=v(5277),u=v(1447),e=v(8160),a=v(6354),s=v(6133),r={symbol:Symbol("template"),opens:new Array(1e3).join("\0"),closes:new Array(1e3).join(""),dateFormat:{date:Date.prototype.toDateString,iso:Date.prototype.toISOString,string:Date.prototype.toString,time:Date.prototype.toTimeString,utc:Date.prototype.toUTCString}};A.exports=r.Template=class{constructor(t,l){if(o(typeof t=="string","Template source must be a string"),o(!t.includes("\0")&&!t.includes(""),"Template source cannot contain reserved control characters"),this.source=t,this.rendered=t,this._template=null,l){const{functions:n,...i}=l;this._settings=Object.keys(i).length?y(i):void 0,this._functions=n,this._functions&&(o(Object.keys(this._functions).every(f=>typeof f=="string"),"Functions keys must be strings"),o(Object.values(this._functions).every(f=>typeof f=="function"),"Functions values must be functions"))}else this._settings=void 0,this._functions=void 0;this._parse()}_parse(){if(!this.source.includes("{"))return;const t=r.encode(this.source),l=r.split(t);let n=!1;const i=[],f=l.shift();f&&i.push(f);for(const m of l){const p=m[0]!=="{",E=p?"}":"}}",w=m.indexOf(E);if(w===-1||m[1]==="{"){i.push(`{${r.decode(m)}`);continue}let c=m.slice(p?0:1,w);const h=c[0]===":";h&&(c=c.slice(1));const g=this._ref(r.decode(c),{raw:p,wrapped:h});i.push(g),typeof g!="string"&&(n=!0);const O=m.slice(w+E.length);O&&i.push(r.decode(O))}n?this._template=i:this.rendered=i.join("")}static date(t,l){return r.dateFormat[l.dateFormat].call(t)}describe(t={}){if(!this._settings&&t.compact)return this.source;const l={template:this.source};return this._settings&&(l.options=this._settings),this._functions&&(l.functions=this._functions),l}static build(t){return new r.Template(t.template,t.options||t.functions?{...t.options,functions:t.functions}:void 0)}isDynamic(){return!!this._template}static isTemplate(t){return!!t&&!!t[e.symbols.template]}refs(){if(!this._template)return;const t=[];for(const l of this._template)typeof l!="string"&&t.push(...l.refs);return t}resolve(t,l,n,i){return this._template&&this._template.length===1?this._part(this._template[0],t,l,n,i,{}):this.render(t,l,n,i)}_part(t,...l){return t.ref?t.ref.resolve(...l):t.formula.evaluate(l)}render(t,l,n,i,f={}){if(!this.isDynamic())return this.rendered;const m=[];for(const p of this._template)if(typeof p=="string")m.push(p);else{const E=this._part(p,t,l,n,i,f),w=r.stringify(E,t,l,n,i,f);if(w!==void 0){const c=p.raw||(f.errors&&f.errors.escapeHtml)===!1?w:d(w);m.push(r.wrap(c,p.wrapped&&n.errors.wrap.label))}}return m.join("")}_ref(t,{raw:l,wrapped:n}){const i=[],f=p=>{const E=s.create(p,this._settings);return i.push(E),w=>{const c=E.resolve(...w);return c!==void 0?c:null}};try{const p=this._functions?{...r.functions,...this._functions}:r.functions;var m=new u.Parser(t,{reference:f,functions:p,constants:r.constants})}catch(p){throw p.message=`Invalid template variable "${t}" fails due to: ${p.message}`,p}if(m.single){if(m.single.type==="reference"){const p=i[0];return{ref:p,raw:l,refs:i,wrapped:n||p.type==="local"&&p.key==="label"}}return r.stringify(m.single.value)}return{formula:m,raw:l,refs:i}}toString(){return this.source}},r.Template.prototype[e.symbols.template]=!0,r.Template.prototype.isImmutable=!0,r.encode=function(t){return t.replace(/\\(\{+)/g,(l,n)=>r.opens.slice(0,n.length)).replace(/\\(\}+)/g,(l,n)=>r.closes.slice(0,n.length))},r.decode=function(t){return t.replace(/\u0000/g,"{").replace(/\u0001/g,"}")},r.split=function(t){const l=[];let n="";for(let i=0;i<t.length;++i){const f=t[i];if(f==="{"){let m="";for(;i+1<t.length&&t[i+1]==="{";)m+="{",++i;l.push(n),n=m}else n+=f}return l.push(n),l},r.wrap=function(t,l){return l?l.length===1?`${l}${t}${l}`:`${l[0]}${t}${l[1]}`:t},r.stringify=function(t,l,n,i,f,m={}){const p=typeof t,E=i&&i.errors&&i.errors.wrap||{};let w=!1;if(s.isRef(t)&&t.render&&(w=t.in,t=t.resolve(l,n,i,f,{in:t.in,...m})),t===null)return"null";if(p==="string")return r.wrap(t,m.arrayItems&&E.string);if(p==="number"||p==="function"||p==="symbol")return t.toString();if(p!=="object")return JSON.stringify(t);if(t instanceof Date)return r.Template.date(t,i);if(t instanceof Map){const h=[];for(const[g,O]of t.entries())h.push(`${g.toString()} -> ${O.toString()}`);t=h}if(!Array.isArray(t))return t.toString();const c=[];for(const h of t)c.push(r.stringify(h,l,n,i,f,{arrayItems:!0,...m}));return r.wrap(c.join(", "),!w&&E.array)},r.constants={true:!0,false:!1,null:null,second:1e3,minute:6e4,hour:36e5,day:864e5},r.functions={if:(t,l,n)=>t?l:n,length:t=>typeof t=="string"?t.length:t&&typeof t=="object"?Array.isArray(t)?t.length:Object.keys(t).length:null,msg(t){const[l,n,i,f,m]=this,p=m.messages;if(!p)return"";const E=a.template(l,p[0],t,n,i)||a.template(l,p[1],t,n,i);return E?E.render(l,n,i,f,m):""},number:t=>typeof t=="number"?t:typeof t=="string"?parseFloat(t):typeof t=="boolean"?t?1:0:t instanceof Date?t.getTime():null}},4946:(A,S,v)=>{const o=v(375),y=v(1687),d=v(8068),u=v(8160),e=v(3292),a=v(6354),s=v(6133),r={};A.exports=d.extend({type:"alternatives",flags:{match:{default:"any"}},terms:{matches:{init:[],register:s.toSibling}},args:(t,...l)=>l.length===1&&Array.isArray(l[0])?t.try(...l[0]):t.try(...l),validate(t,l){const{schema:n,error:i,state:f,prefs:m}=l;if(n._flags.match){const E=[],w=[];for(let h=0;h<n.$_terms.matches.length;++h){const g=n.$_terms.matches[h],O=f.nest(g.schema,`match.${h}`);O.snapshot();const k=g.schema.$_validate(t,O,m);k.errors?(w.push(k.errors),O.restore()):(E.push(k.value),O.commit())}if(E.length===0)return{errors:i("alternatives.any",{details:w.map(h=>a.details(h,{override:!1}))})};if(n._flags.match==="one")return E.length===1?{value:E[0]}:{errors:i("alternatives.one")};if(E.length!==n.$_terms.matches.length)return{errors:i("alternatives.all",{details:w.map(h=>a.details(h,{override:!1}))})};const c=h=>h.$_terms.matches.some(g=>g.schema.type==="object"||g.schema.type==="alternatives"&&c(g.schema));return c(n)?{value:E.reduce((h,g)=>y(h,g,{mergeArrays:!1}))}:{value:E[E.length-1]}}const p=[];for(let E=0;E<n.$_terms.matches.length;++E){const w=n.$_terms.matches[E];if(w.schema){const g=f.nest(w.schema,`match.${E}`);g.snapshot();const O=w.schema.$_validate(t,g,m);if(!O.errors)return g.commit(),O;g.restore(),p.push({schema:w.schema,reports:O.errors});continue}const c=w.ref?w.ref.resolve(t,f,m):t,h=w.is?[w]:w.switch;for(let g=0;g<h.length;++g){const O=h[g],{is:k,then:N,otherwise:D}=O,M=`match.${E}${w.switch?"."+g:""}`;if(k.$_match(c,f.nest(k,`${M}.is`),m)){if(N)return N.$_validate(t,f.nest(N,`${M}.then`),m)}else if(D)return D.$_validate(t,f.nest(D,`${M}.otherwise`),m)}}return r.errors(p,l)},rules:{conditional:{method(t,l){o(!this._flags._endedSwitch,"Unreachable condition"),o(!this._flags.match,"Cannot combine match mode",this._flags.match,"with conditional rule"),o(l.break===void 0,"Cannot use break option with alternatives conditional");const n=this.clone(),i=e.when(n,t,l),f=i.is?[i]:i.switch;for(const m of f)if(m.then&&m.otherwise){n.$_setFlag("_endedSwitch",!0,{clone:!1});break}return n.$_terms.matches.push(i),n.$_mutateRebuild()}},match:{method(t){if(o(["any","one","all"].includes(t),"Invalid alternatives match mode",t),t!=="any")for(const l of this.$_terms.matches)o(l.schema,"Cannot combine match mode",t,"with conditional rules");return this.$_setFlag("match",t)}},try:{method(...t){o(t.length,"Missing alternative schemas"),u.verifyFlat(t,"try"),o(!this._flags._endedSwitch,"Unreachable condition");const l=this.clone();for(const n of t)l.$_terms.matches.push({schema:l.$_compile(n)});return l.$_mutateRebuild()}}},overrides:{label(t){return this.$_parent("label",t).$_modify({each:(l,n)=>n.path[0]!=="is"&&typeof l._flags.label!="string"?l.label(t):void 0,ref:!1})}},rebuild(t){t.$_modify({each:l=>{u.isSchema(l)&&l.type==="array"&&t.$_setFlag("_arrayItems",!0,{clone:!1})}})},manifest:{build(t,l){if(l.matches)for(const n of l.matches){const{schema:i,ref:f,is:m,not:p,then:E,otherwise:w}=n;t=i?t.try(i):f?t.conditional(f,{is:m,then:E,not:p,otherwise:w,switch:n.switch}):t.conditional(m,{then:E,otherwise:w})}return t}},messages:{"alternatives.all":"{{#label}} does not match all of the required types","alternatives.any":"{{#label}} does not match any of the allowed types","alternatives.match":"{{#label}} does not match any of the allowed types","alternatives.one":"{{#label}} matches more than one allowed type","alternatives.types":"{{#label}} must be one of {{#types}}"}}),r.errors=function(t,{error:l,state:n}){if(!t.length)return{errors:l("alternatives.any")};if(t.length===1)return{errors:t[0].reports};const i=new Set,f=[];for(const{reports:m,schema:p}of t){if(m.length>1)return r.unmatched(t,l);const E=m[0];if(E instanceof a.Report==0)return r.unmatched(t,l);if(E.state.path.length!==n.path.length){f.push({type:p.type,report:E});continue}if(E.code==="any.only"){for(const h of E.local.valids)i.add(h);continue}const[w,c]=E.code.split(".");c==="base"?i.add(w):f.push({type:p.type,report:E})}return f.length?f.length===1?{errors:f[0].report}:r.unmatched(t,l):{errors:l("alternatives.types",{types:[...i]})}},r.unmatched=function(t,l){const n=[];for(const i of t)n.push(...i.reports);return{errors:l("alternatives.match",a.details(n,{override:!1}))}}},8068:(A,S,v)=>{const o=v(375),y=v(7629),d=v(8160),u=v(6914);A.exports=y.extend({type:"any",flags:{only:{default:!1}},terms:{alterations:{init:null},examples:{init:null},externals:{init:null},metas:{init:[]},notes:{init:[]},shared:{init:null},tags:{init:[]},whens:{init:null}},rules:{custom:{method(e,a){return o(typeof e=="function","Method must be a function"),o(a===void 0||a&&typeof a=="string","Description must be a non-empty string"),this.$_addRule({name:"custom",args:{method:e,description:a}})},validate(e,a,{method:s}){try{return s(e,a)}catch(r){return a.error("any.custom",{error:r})}},args:["method","description"],multi:!0},messages:{method(e){return this.prefs({messages:e})}},shared:{method(e){o(d.isSchema(e)&&e._flags.id,"Schema must be a schema with an id");const a=this.clone();return a.$_terms.shared=a.$_terms.shared||[],a.$_terms.shared.push(e),a.$_mutateRegister(e),a}},warning:{method(e,a){return o(e&&typeof e=="string","Invalid warning code"),this.$_addRule({name:"warning",args:{code:e,local:a},warn:!0})},validate:(e,a,{code:s,local:r})=>a.error(s,r),args:["code","local"],multi:!0}},modifiers:{keep(e,a=!0){e.keep=a},message(e,a){e.message=u.compile(a)},warn(e,a=!0){e.warn=a}},manifest:{build(e,a){for(const s in a){const r=a[s];if(["examples","externals","metas","notes","tags"].includes(s))for(const t of r)e=e[s.slice(0,-1)](t);else if(s!=="alterations")if(s!=="whens"){if(s==="shared")for(const t of r)e=e.shared(t)}else for(const t of r){const{ref:l,is:n,not:i,then:f,otherwise:m,concat:p}=t;e=p?e.concat(p):l?e.when(l,{is:n,not:i,then:f,otherwise:m,switch:t.switch,break:t.break}):e.when(n,{then:f,otherwise:m,break:t.break})}else{const t={};for(const{target:l,adjuster:n}of r)t[l]=n;e=e.alter(t)}}return e}},messages:{"any.custom":"{{#label}} failed custom validation because {{#error.message}}","any.default":"{{#label}} threw an error when running default method","any.failover":"{{#label}} threw an error when running failover method","any.invalid":"{{#label}} contains an invalid value","any.only":'{{#label}} must be {if(#valids.length == 1, "", "one of ")}{{#valids}}',"any.ref":"{{#label}} {{#arg}} references {{:#ref}} which {{#reason}}","any.required":"{{#label}} is required","any.unknown":"{{#label}} is not allowed"}})},546:(A,S,v)=>{const o=v(375),y=v(9474),d=v(9621),u=v(8068),e=v(8160),a=v(3292),s={};A.exports=u.extend({type:"array",flags:{single:{default:!1},sparse:{default:!1}},terms:{items:{init:[],manifest:"schema"},ordered:{init:[],manifest:"schema"},_exclusions:{init:[]},_inclusions:{init:[]},_requireds:{init:[]}},coerce:{from:"object",method(r,{schema:t,state:l,prefs:n}){if(!Array.isArray(r))return;const i=t.$_getRule("sort");return i?s.sort(t,r,i.args.options,l,n):void 0}},validate(r,{schema:t,error:l}){if(!Array.isArray(r)){if(t._flags.single){const n=[r];return n[e.symbols.arraySingle]=!0,{value:n}}return{errors:l("array.base")}}if(t.$_getRule("items")||t.$_terms.externals)return{value:r.slice()}},rules:{has:{method(r){r=this.$_compile(r,{appendPath:!0});const t=this.$_addRule({name:"has",args:{schema:r}});return t.$_mutateRegister(r),t},validate(r,{state:t,prefs:l,error:n},{schema:i}){const f=[r,...t.ancestors];for(let p=0;p<r.length;++p){const E=t.localize([...t.path,p],f,i);if(i.$_match(r[p],E,l))return r}const m=i._flags.label;return m?n("array.hasKnown",{patternLabel:m}):n("array.hasUnknown",null)},multi:!0},items:{method(...r){e.verifyFlat(r,"items");const t=this.$_addRule("items");for(let l=0;l<r.length;++l){const n=e.tryWithPath(()=>this.$_compile(r[l]),l,{append:!0});t.$_terms.items.push(n)}return t.$_mutateRebuild()},validate(r,{schema:t,error:l,state:n,prefs:i,errorsArray:f}){const m=t.$_terms._requireds.slice(),p=t.$_terms.ordered.slice(),E=[...t.$_terms._inclusions,...m],w=!r[e.symbols.arraySingle];delete r[e.symbols.arraySingle];const c=f();let h=r.length;for(let g=0;g<h;++g){const O=r[g];let k=!1,N=!1;const D=w?g:new Number(g),M=[...n.path,D];if(!t._flags.sparse&&O===void 0){if(c.push(l("array.sparse",{key:D,path:M,pos:g,value:void 0},n.localize(M))),i.abortEarly)return c;p.shift();continue}const z=[r,...n.ancestors];for(const W of t.$_terms._exclusions)if(W.$_match(O,n.localize(M,z,W),i,{presence:"ignore"})){if(c.push(l("array.excludes",{pos:g,value:O},n.localize(M))),i.abortEarly)return c;k=!0,p.shift();break}if(k)continue;if(t.$_terms.ordered.length){if(p.length){const W=p.shift(),V=W.$_validate(O,n.localize(M,z,W),i);if(V.errors){if(c.push(...V.errors),i.abortEarly)return c}else if(W._flags.result==="strip")s.fastSplice(r,g),--g,--h;else{if(!t._flags.sparse&&V.value===void 0){if(c.push(l("array.sparse",{key:D,path:M,pos:g,value:void 0},n.localize(M))),i.abortEarly)return c;continue}r[g]=V.value}continue}if(!t.$_terms.items.length){if(c.push(l("array.orderedLength",{pos:g,limit:t.$_terms.ordered.length})),i.abortEarly)return c;break}}const B=[];let K=m.length;for(let W=0;W<K;++W){const V=n.localize(M,z,m[W]);V.snapshot();const Z=m[W].$_validate(O,V,i);if(B[W]=Z,!Z.errors){if(V.commit(),r[g]=Z.value,N=!0,s.fastSplice(m,W),--W,--K,!t._flags.sparse&&Z.value===void 0&&(c.push(l("array.sparse",{key:D,path:M,pos:g,value:void 0},n.localize(M))),i.abortEarly))return c;break}V.restore()}if(N)continue;const Q=i.stripUnknown&&!!i.stripUnknown.arrays||!1;K=E.length;for(const W of E){let V;const Z=m.indexOf(W);if(Z!==-1)V=B[Z];else{const J=n.localize(M,z,W);if(J.snapshot(),V=W.$_validate(O,J,i),!V.errors){J.commit(),W._flags.result==="strip"?(s.fastSplice(r,g),--g,--h):t._flags.sparse||V.value!==void 0?r[g]=V.value:(c.push(l("array.sparse",{key:D,path:M,pos:g,value:void 0},n.localize(M))),k=!0),N=!0;break}J.restore()}if(K===1){if(Q){s.fastSplice(r,g),--g,--h,N=!0;break}if(c.push(...V.errors),i.abortEarly)return c;k=!0;break}}if(!k&&(t.$_terms._inclusions.length||t.$_terms._requireds.length)&&!N){if(Q){s.fastSplice(r,g),--g,--h;continue}if(c.push(l("array.includes",{pos:g,value:O},n.localize(M))),i.abortEarly)return c}}return m.length&&s.fillMissedErrors(t,c,m,r,n,i),p.length&&(s.fillOrderedErrors(t,c,p,r,n,i),c.length||s.fillDefault(p,r,n,i)),c.length?c:r},priority:!0,manifest:!1},length:{method(r){return this.$_addRule({name:"length",args:{limit:r},operator:"="})},validate:(r,t,{limit:l},{name:n,operator:i,args:f})=>e.compare(r.length,l,i)?r:t.error("array."+n,{limit:f.limit,value:r}),args:[{name:"limit",ref:!0,assert:e.limit,message:"must be a positive integer"}]},max:{method(r){return this.$_addRule({name:"max",method:"length",args:{limit:r},operator:"<="})}},min:{method(r){return this.$_addRule({name:"min",method:"length",args:{limit:r},operator:">="})}},ordered:{method(...r){e.verifyFlat(r,"ordered");const t=this.$_addRule("items");for(let l=0;l<r.length;++l){const n=e.tryWithPath(()=>this.$_compile(r[l]),l,{append:!0});s.validateSingle(n,t),t.$_mutateRegister(n),t.$_terms.ordered.push(n)}return t.$_mutateRebuild()}},single:{method(r){const t=r===void 0||!!r;return o(!t||!this._flags._arrayItems,"Cannot specify single rule when array has array items"),this.$_setFlag("single",t)}},sort:{method(r={}){e.assertOptions(r,["by","order"]);const t={order:r.order||"ascending"};return r.by&&(t.by=a.ref(r.by,{ancestor:0}),o(!t.by.ancestor,"Cannot sort by ancestor")),this.$_addRule({name:"sort",args:{options:t}})},validate(r,{error:t,state:l,prefs:n,schema:i},{options:f}){const{value:m,errors:p}=s.sort(i,r,f,l,n);if(p)return p;for(let E=0;E<r.length;++E)if(r[E]!==m[E])return t("array.sort",{order:f.order,by:f.by?f.by.key:"value"});return r},convert:!0},sparse:{method(r){const t=r===void 0||!!r;return this._flags.sparse===t?this:(t?this.clone():this.$_addRule("items")).$_setFlag("sparse",t,{clone:!1})}},unique:{method(r,t={}){o(!r||typeof r=="function"||typeof r=="string","comparator must be a function or a string"),e.assertOptions(t,["ignoreUndefined","separator"]);const l={name:"unique",args:{options:t,comparator:r}};if(r)if(typeof r=="string"){const n=e.default(t.separator,".");l.path=n?r.split(n):[r]}else l.comparator=r;return this.$_addRule(l)},validate(r,{state:t,error:l,schema:n},{comparator:i,options:f},{comparator:m,path:p}){const E={string:Object.create(null),number:Object.create(null),undefined:Object.create(null),boolean:Object.create(null),object:new Map,function:new Map,custom:new Map},w=m||y,c=f.ignoreUndefined;for(let h=0;h<r.length;++h){const g=p?d(r[h],p):r[h],O=m?E.custom:E[typeof g];if(o(O,"Failed to find unique map container for type",typeof g),O instanceof Map){const k=O.entries();let N;for(;!(N=k.next()).done;)if(w(N.value[0],g)){const D=t.localize([...t.path,h],[r,...t.ancestors]),M={pos:h,value:r[h],dupePos:N.value[1],dupeValue:r[N.value[1]]};return p&&(M.path=i),l("array.unique",M,D)}O.set(g,h)}else{if((!c||g!==void 0)&&O[g]!==void 0){const k={pos:h,value:r[h],dupePos:O[g],dupeValue:r[O[g]]};return p&&(k.path=i),l("array.unique",k,t.localize([...t.path,h],[r,...t.ancestors]))}O[g]=h}}return r},args:["comparator","options"],multi:!0}},cast:{set:{from:Array.isArray,to:(r,t)=>new Set(r)}},rebuild(r){r.$_terms._inclusions=[],r.$_terms._exclusions=[],r.$_terms._requireds=[];for(const t of r.$_terms.items)s.validateSingle(t,r),t._flags.presence==="required"?r.$_terms._requireds.push(t):t._flags.presence==="forbidden"?r.$_terms._exclusions.push(t):r.$_terms._inclusions.push(t);for(const t of r.$_terms.ordered)s.validateSingle(t,r)},manifest:{build:(r,t)=>(t.items&&(r=r.items(...t.items)),t.ordered&&(r=r.ordered(...t.ordered)),r)},messages:{"array.base":"{{#label}} must be an array","array.excludes":"{{#label}} contains an excluded value","array.hasKnown":"{{#label}} does not contain at least one required match for type {:#patternLabel}","array.hasUnknown":"{{#label}} does not contain at least one required match","array.includes":"{{#label}} does not match any of the allowed types","array.includesRequiredBoth":"{{#label}} does not contain {{#knownMisses}} and {{#unknownMisses}} other required value(s)","array.includesRequiredKnowns":"{{#label}} does not contain {{#knownMisses}}","array.includesRequiredUnknowns":"{{#label}} does not contain {{#unknownMisses}} required value(s)","array.length":"{{#label}} must contain {{#limit}} items","array.max":"{{#label}} must contain less than or equal to {{#limit}} items","array.min":"{{#label}} must contain at least {{#limit}} items","array.orderedLength":"{{#label}} must contain at most {{#limit}} items","array.sort":"{{#label}} must be sorted in {#order} order by {{#by}}","array.sort.mismatching":"{{#label}} cannot be sorted due to mismatching types","array.sort.unsupported":"{{#label}} cannot be sorted due to unsupported type {#type}","array.sparse":"{{#label}} must not be a sparse array item","array.unique":"{{#label}} contains a duplicate value"}}),s.fillMissedErrors=function(r,t,l,n,i,f){const m=[];let p=0;for(const E of l){const w=E._flags.label;w?m.push(w):++p}m.length?p?t.push(r.$_createError("array.includesRequiredBoth",n,{knownMisses:m,unknownMisses:p},i,f)):t.push(r.$_createError("array.includesRequiredKnowns",n,{knownMisses:m},i,f)):t.push(r.$_createError("array.includesRequiredUnknowns",n,{unknownMisses:p},i,f))},s.fillOrderedErrors=function(r,t,l,n,i,f){const m=[];for(const p of l)p._flags.presence==="required"&&m.push(p);m.length&&s.fillMissedErrors(r,t,m,n,i,f)},s.fillDefault=function(r,t,l,n){const i=[];let f=!0;for(let m=r.length-1;m>=0;--m){const p=r[m],E=[t,...l.ancestors],w=p.$_validate(void 0,l.localize(l.path,E,p),n).value;if(f){if(w===void 0)continue;f=!1}i.unshift(w)}i.length&&t.push(...i)},s.fastSplice=function(r,t){let l=t;for(;l<r.length;)r[l++]=r[l];--r.length},s.validateSingle=function(r,t){(r.type==="array"||r._flags._arrayItems)&&(o(!t._flags.single,"Cannot specify array item with single rule enabled"),t.$_setFlag("_arrayItems",!0,{clone:!1}))},s.sort=function(r,t,l,n,i){const f=l.order==="ascending"?1:-1,m=-1*f,p=f,E=(w,c)=>{let h=s.compare(w,c,m,p);if(h!==null||(l.by&&(w=l.by.resolve(w,n,i),c=l.by.resolve(c,n,i)),h=s.compare(w,c,m,p),h!==null))return h;const g=typeof w;if(g!==typeof c)throw r.$_createError("array.sort.mismatching",t,null,n,i);if(g!=="number"&&g!=="string")throw r.$_createError("array.sort.unsupported",t,{type:g},n,i);return g==="number"?(w-c)*f:w<c?m:p};try{return{value:t.slice().sort(E)}}catch(w){return{errors:w}}},s.compare=function(r,t,l,n){return r===t?0:r===void 0?1:t===void 0?-1:r===null?n:t===null?l:null}},4937:(A,S,v)=>{const o=v(375),y=v(8068),d=v(8160),u=v(2036),e={isBool:function(a){return typeof a=="boolean"}};A.exports=y.extend({type:"boolean",flags:{sensitive:{default:!1}},terms:{falsy:{init:null,manifest:"values"},truthy:{init:null,manifest:"values"}},coerce(a,{schema:s}){if(typeof a!="boolean"){if(typeof a=="string"){const r=s._flags.sensitive?a:a.toLowerCase();a=r==="true"||r!=="false"&&a}return typeof a!="boolean"&&(a=s.$_terms.truthy&&s.$_terms.truthy.has(a,null,null,!s._flags.sensitive)||(!s.$_terms.falsy||!s.$_terms.falsy.has(a,null,null,!s._flags.sensitive))&&a),{value:a}}},validate(a,{error:s}){if(typeof a!="boolean")return{value:a,errors:s("boolean.base")}},rules:{truthy:{method(...a){d.verifyFlat(a,"truthy");const s=this.clone();s.$_terms.truthy=s.$_terms.truthy||new u;for(let r=0;r<a.length;++r){const t=a[r];o(t!==void 0,"Cannot call truthy with undefined"),s.$_terms.truthy.add(t)}return s}},falsy:{method(...a){d.verifyFlat(a,"falsy");const s=this.clone();s.$_terms.falsy=s.$_terms.falsy||new u;for(let r=0;r<a.length;++r){const t=a[r];o(t!==void 0,"Cannot call falsy with undefined"),s.$_terms.falsy.add(t)}return s}},sensitive:{method(a=!0){return this.$_setFlag("sensitive",a)}}},cast:{number:{from:e.isBool,to:(a,s)=>a?1:0},string:{from:e.isBool,to:(a,s)=>a?"true":"false"}},manifest:{build:(a,s)=>(s.truthy&&(a=a.truthy(...s.truthy)),s.falsy&&(a=a.falsy(...s.falsy)),a)},messages:{"boolean.base":"{{#label}} must be a boolean"}})},7500:(A,S,v)=>{const o=v(375),y=v(8068),d=v(8160),u=v(3328),e={isDate:function(a){return a instanceof Date}};A.exports=y.extend({type:"date",coerce:{from:["number","string"],method:(a,{schema:s})=>({value:e.parse(a,s._flags.format)||a})},validate(a,{schema:s,error:r,prefs:t}){if(a instanceof Date&&!isNaN(a.getTime()))return;const l=s._flags.format;return t.convert&&l&&typeof a=="string"?{value:a,errors:r("date.format",{format:l})}:{value:a,errors:r("date.base")}},rules:{compare:{method:!1,validate(a,s,{date:r},{name:t,operator:l,args:n}){const i=r==="now"?Date.now():r.getTime();return d.compare(a.getTime(),i,l)?a:s.error("date."+t,{limit:n.date,value:a})},args:[{name:"date",ref:!0,normalize:a=>a==="now"?a:e.parse(a),assert:a=>a!==null,message:"must have a valid date format"}]},format:{method(a){return o(["iso","javascript","unix"].includes(a),"Unknown date format",a),this.$_setFlag("format",a)}},greater:{method(a){return this.$_addRule({name:"greater",method:"compare",args:{date:a},operator:">"})}},iso:{method(){return this.format("iso")}},less:{method(a){return this.$_addRule({name:"less",method:"compare",args:{date:a},operator:"<"})}},max:{method(a){return this.$_addRule({name:"max",method:"compare",args:{date:a},operator:"<="})}},min:{method(a){return this.$_addRule({name:"min",method:"compare",args:{date:a},operator:">="})}},timestamp:{method(a="javascript"){return o(["javascript","unix"].includes(a),'"type" must be one of "javascript, unix"'),this.format(a)}}},cast:{number:{from:e.isDate,to:(a,s)=>a.getTime()},string:{from:e.isDate,to:(a,{prefs:s})=>u.date(a,s)}},messages:{"date.base":"{{#label}} must be a valid date","date.format":'{{#label}} must be in {msg("date.format." + #format) || #format} format',"date.greater":"{{#label}} must be greater than {{:#limit}}","date.less":"{{#label}} must be less than {{:#limit}}","date.max":"{{#label}} must be less than or equal to {{:#limit}}","date.min":"{{#label}} must be greater than or equal to {{:#limit}}","date.format.iso":"ISO 8601 date","date.format.javascript":"timestamp or number of milliseconds","date.format.unix":"timestamp or number of seconds"}}),e.parse=function(a,s){if(a instanceof Date)return a;if(typeof a!="string"&&(isNaN(a)||!isFinite(a))||/^\s*$/.test(a))return null;if(s==="iso")return d.isIsoDate(a)?e.date(a.toString()):null;const r=a;if(typeof a=="string"&&/^[+-]?\d+(\.\d+)?$/.test(a)&&(a=parseFloat(a)),s){if(s==="javascript")return e.date(1*a);if(s==="unix")return e.date(1e3*a);if(typeof r=="string")return null}return e.date(a)},e.date=function(a){const s=new Date(a);return isNaN(s.getTime())?null:s}},390:(A,S,v)=>{const o=v(375),y=v(7824);A.exports=y.extend({type:"function",properties:{typeof:"function"},rules:{arity:{method(d){return o(Number.isSafeInteger(d)&&d>=0,"n must be a positive integer"),this.$_addRule({name:"arity",args:{n:d}})},validate:(d,u,{n:e})=>d.length===e?d:u.error("function.arity",{n:e})},class:{method(){return this.$_addRule("class")},validate:(d,u)=>/^\s*class\s/.test(d.toString())?d:u.error("function.class",{value:d})},minArity:{method(d){return o(Number.isSafeInteger(d)&&d>0,"n must be a strict positive integer"),this.$_addRule({name:"minArity",args:{n:d}})},validate:(d,u,{n:e})=>d.length>=e?d:u.error("function.minArity",{n:e})},maxArity:{method(d){return o(Number.isSafeInteger(d)&&d>=0,"n must be a positive integer"),this.$_addRule({name:"maxArity",args:{n:d}})},validate:(d,u,{n:e})=>d.length<=e?d:u.error("function.maxArity",{n:e})}},messages:{"function.arity":"{{#label}} must have an arity of {{#n}}","function.class":"{{#label}} must be a class","function.maxArity":"{{#label}} must have an arity lesser or equal to {{#n}}","function.minArity":"{{#label}} must have an arity greater or equal to {{#n}}"}})},7824:(A,S,v)=>{const o=v(978),y=v(375),d=v(8571),u=v(3652),e=v(8068),a=v(8160),s=v(3292),r=v(6354),t=v(6133),l=v(3328),n={renameDefaults:{alias:!1,multiple:!1,override:!1}};A.exports=e.extend({type:"_keys",properties:{typeof:"object"},flags:{unknown:{default:!1}},terms:{dependencies:{init:null},keys:{init:null,manifest:{mapped:{from:"schema",to:"key"}}},patterns:{init:null},renames:{init:null}},args:(i,f)=>i.keys(f),validate(i,{schema:f,error:m,state:p,prefs:E}){if(!i||typeof i!==f.$_property("typeof")||Array.isArray(i))return{value:i,errors:m("object.base",{type:f.$_property("typeof")})};if(!(f.$_terms.renames||f.$_terms.dependencies||f.$_terms.keys||f.$_terms.patterns||f.$_terms.externals))return;i=n.clone(i,E);const w=[];if(f.$_terms.renames&&!n.rename(f,i,p,E,w))return{value:i,errors:w};if(!f.$_terms.keys&&!f.$_terms.patterns&&!f.$_terms.dependencies)return{value:i,errors:w};const c=new Set(Object.keys(i));if(f.$_terms.keys){const h=[i,...p.ancestors];for(const g of f.$_terms.keys){const O=g.key,k=i[O];c.delete(O);const N=p.localize([...p.path,O],h,g),D=g.schema.$_validate(k,N,E);if(D.errors){if(E.abortEarly)return{value:i,errors:D.errors};D.value!==void 0&&(i[O]=D.value),w.push(...D.errors)}else g.schema._flags.result==="strip"||D.value===void 0&&k!==void 0?delete i[O]:D.value!==void 0&&(i[O]=D.value)}}if(c.size||f._flags._hasPatternMatch){const h=n.unknown(f,i,c,w,p,E);if(h)return h}if(f.$_terms.dependencies)for(const h of f.$_terms.dependencies){if(h.key!==null&&n.isPresent(h.options)(h.key.resolve(i,p,E,null,{shadow:!1}))===!1)continue;const g=n.dependencies[h.rel](f,h,i,p,E);if(g){const O=f.$_createError(g.code,i,g.context,p,E);if(E.abortEarly)return{value:i,errors:O};w.push(O)}}return{value:i,errors:w}},rules:{and:{method(...i){return a.verifyFlat(i,"and"),n.dependency(this,"and",null,i)}},append:{method(i){return i==null||Object.keys(i).length===0?this:this.keys(i)}},assert:{method(i,f,m){l.isTemplate(i)||(i=s.ref(i)),y(m===void 0||typeof m=="string","Message must be a string"),f=this.$_compile(f,{appendPath:!0});const p=this.$_addRule({name:"assert",args:{subject:i,schema:f,message:m}});return p.$_mutateRegister(i),p.$_mutateRegister(f),p},validate(i,{error:f,prefs:m,state:p},{subject:E,schema:w,message:c}){const h=E.resolve(i,p,m),g=t.isRef(E)?E.absolute(p):[];return w.$_match(h,p.localize(g,[i,...p.ancestors],w),m)?i:f("object.assert",{subject:E,message:c})},args:["subject","schema","message"],multi:!0},instance:{method(i,f){return y(typeof i=="function","constructor must be a function"),f=f||i.name,this.$_addRule({name:"instance",args:{constructor:i,name:f}})},validate:(i,f,{constructor:m,name:p})=>i instanceof m?i:f.error("object.instance",{type:p,value:i}),args:["constructor","name"]},keys:{method(i){y(i===void 0||typeof i=="object","Object schema must be a valid object"),y(!a.isSchema(i),"Object schema cannot be a joi schema");const f=this.clone();if(i)if(Object.keys(i).length){f.$_terms.keys=f.$_terms.keys?f.$_terms.keys.filter(m=>!i.hasOwnProperty(m.key)):new n.Keys;for(const m in i)a.tryWithPath(()=>f.$_terms.keys.push({key:m,schema:this.$_compile(i[m])}),m)}else f.$_terms.keys=new n.Keys;else f.$_terms.keys=null;return f.$_mutateRebuild()}},length:{method(i){return this.$_addRule({name:"length",args:{limit:i},operator:"="})},validate:(i,f,{limit:m},{name:p,operator:E,args:w})=>a.compare(Object.keys(i).length,m,E)?i:f.error("object."+p,{limit:w.limit,value:i}),args:[{name:"limit",ref:!0,assert:a.limit,message:"must be a positive integer"}]},max:{method(i){return this.$_addRule({name:"max",method:"length",args:{limit:i},operator:"<="})}},min:{method(i){return this.$_addRule({name:"min",method:"length",args:{limit:i},operator:">="})}},nand:{method(...i){return a.verifyFlat(i,"nand"),n.dependency(this,"nand",null,i)}},or:{method(...i){return a.verifyFlat(i,"or"),n.dependency(this,"or",null,i)}},oxor:{method(...i){return n.dependency(this,"oxor",null,i)}},pattern:{method(i,f,m={}){const p=i instanceof RegExp;p||(i=this.$_compile(i,{appendPath:!0})),y(f!==void 0,"Invalid rule"),a.assertOptions(m,["fallthrough","matches"]),p&&y(!i.flags.includes("g")&&!i.flags.includes("y"),"pattern should not use global or sticky mode"),f=this.$_compile(f,{appendPath:!0});const E=this.clone();E.$_terms.patterns=E.$_terms.patterns||[];const w={[p?"regex":"schema"]:i,rule:f};return m.matches&&(w.matches=this.$_compile(m.matches),w.matches.type!=="array"&&(w.matches=w.matches.$_root.array().items(w.matches)),E.$_mutateRegister(w.matches),E.$_setFlag("_hasPatternMatch",!0,{clone:!1})),m.fallthrough&&(w.fallthrough=!0),E.$_terms.patterns.push(w),E.$_mutateRegister(f),E}},ref:{method(){return this.$_addRule("ref")},validate:(i,f)=>t.isRef(i)?i:f.error("object.refType",{value:i})},regex:{method(){return this.$_addRule("regex")},validate:(i,f)=>i instanceof RegExp?i:f.error("object.regex",{value:i})},rename:{method(i,f,m={}){y(typeof i=="string"||i instanceof RegExp,"Rename missing the from argument"),y(typeof f=="string"||f instanceof l,"Invalid rename to argument"),y(f!==i,"Cannot rename key to same name:",i),a.assertOptions(m,["alias","ignoreUndefined","override","multiple"]);const p=this.clone();p.$_terms.renames=p.$_terms.renames||[];for(const E of p.$_terms.renames)y(E.from!==i,"Cannot rename the same key multiple times");return f instanceof l&&p.$_mutateRegister(f),p.$_terms.renames.push({from:i,to:f,options:o(n.renameDefaults,m)}),p}},schema:{method(i="any"){return this.$_addRule({name:"schema",args:{type:i}})},validate:(i,f,{type:m})=>!a.isSchema(i)||m!=="any"&&i.type!==m?f.error("object.schema",{type:m}):i},unknown:{method(i){return this.$_setFlag("unknown",i!==!1)}},with:{method(i,f,m={}){return n.dependency(this,"with",i,f,m)}},without:{method(i,f,m={}){return n.dependency(this,"without",i,f,m)}},xor:{method(...i){return a.verifyFlat(i,"xor"),n.dependency(this,"xor",null,i)}}},overrides:{default(i,f){return i===void 0&&(i=a.symbols.deepDefault),this.$_parent("default",i,f)}},rebuild(i){if(i.$_terms.keys){const f=new u.Sorter;for(const m of i.$_terms.keys)a.tryWithPath(()=>f.add(m,{after:m.schema.$_rootReferences(),group:m.key}),m.key);i.$_terms.keys=new n.Keys(...f.nodes)}},manifest:{build(i,f){if(f.keys&&(i=i.keys(f.keys)),f.dependencies)for(const{rel:m,key:p=null,peers:E,options:w}of f.dependencies)i=n.dependency(i,m,p,E,w);if(f.patterns)for(const{regex:m,schema:p,rule:E,fallthrough:w,matches:c}of f.patterns)i=i.pattern(m||p,E,{fallthrough:w,matches:c});if(f.renames)for(const{from:m,to:p,options:E}of f.renames)i=i.rename(m,p,E);return i}},messages:{"object.and":"{{#label}} contains {{#presentWithLabels}} without its required peers {{#missingWithLabels}}","object.assert":'{{#label}} is invalid because {if(#subject.key, `"` + #subject.key + `" failed to ` + (#message || "pass the assertion test"), #message || "the assertion failed")}',"object.base":"{{#label}} must be of type {{#type}}","object.instance":"{{#label}} must be an instance of {{:#type}}","object.length":'{{#label}} must have {{#limit}} key{if(#limit == 1, "", "s")}',"object.max":'{{#label}} must have less than or equal to {{#limit}} key{if(#limit == 1, "", "s")}',"object.min":'{{#label}} must have at least {{#limit}} key{if(#limit == 1, "", "s")}',"object.missing":"{{#label}} must contain at least one of {{#peersWithLabels}}","object.nand":"{{:#mainWithLabel}} must not exist simultaneously with {{#peersWithLabels}}","object.oxor":"{{#label}} contains a conflict between optional exclusive peers {{#peersWithLabels}}","object.pattern.match":"{{#label}} keys failed to match pattern requirements","object.refType":"{{#label}} must be a Joi reference","object.regex":"{{#label}} must be a RegExp object","object.rename.multiple":"{{#label}} cannot rename {{:#from}} because multiple renames are disabled and another key was already renamed to {{:#to}}","object.rename.override":"{{#label}} cannot rename {{:#from}} because override is disabled and target {{:#to}} exists","object.schema":"{{#label}} must be a Joi schema of {{#type}} type","object.unknown":"{{#label}} is not allowed","object.with":"{{:#mainWithLabel}} missing required peer {{:#peerWithLabel}}","object.without":"{{:#mainWithLabel}} conflict with forbidden peer {{:#peerWithLabel}}","object.xor":"{{#label}} contains a conflict between exclusive peers {{#peersWithLabels}}"}}),n.clone=function(i,f){if(typeof i=="object"){if(f.nonEnumerables)return d(i,{shallow:!0});const p=Object.create(Object.getPrototypeOf(i));return Object.assign(p,i),p}const m=function(...p){return i.apply(this,p)};return m.prototype=d(i.prototype),Object.defineProperty(m,"name",{value:i.name,writable:!1}),Object.defineProperty(m,"length",{value:i.length,writable:!1}),Object.assign(m,i),m},n.dependency=function(i,f,m,p,E){y(m===null||typeof m=="string",f,"key must be a strings"),E||(E=p.length>1&&typeof p[p.length-1]=="object"?p.pop():{}),a.assertOptions(E,["separator","isPresent"]),p=[].concat(p);const w=a.default(E.separator,"."),c=[];for(const g of p)y(typeof g=="string",f,"peers must be strings"),c.push(s.ref(g,{separator:w,ancestor:0,prefix:!1}));m!==null&&(m=s.ref(m,{separator:w,ancestor:0,prefix:!1}));const h=i.clone();return h.$_terms.dependencies=h.$_terms.dependencies||[],h.$_terms.dependencies.push(new n.Dependency(f,m,c,p,E)),h},n.dependencies={and(i,f,m,p,E){const w=[],c=[],h=f.peers.length,g=n.isPresent(f.options);for(const O of f.peers)g(O.resolve(m,p,E,null,{shadow:!1}))===!1?w.push(O.key):c.push(O.key);if(w.length!==h&&c.length!==h)return{code:"object.and",context:{present:c,presentWithLabels:n.keysToLabels(i,c),missing:w,missingWithLabels:n.keysToLabels(i,w)}}},nand(i,f,m,p,E){const w=[],c=n.isPresent(f.options);for(const O of f.peers)c(O.resolve(m,p,E,null,{shadow:!1}))&&w.push(O.key);if(w.length!==f.peers.length)return;const h=f.paths[0],g=f.paths.slice(1);return{code:"object.nand",context:{main:h,mainWithLabel:n.keysToLabels(i,h),peers:g,peersWithLabels:n.keysToLabels(i,g)}}},or(i,f,m,p,E){const w=n.isPresent(f.options);for(const c of f.peers)if(w(c.resolve(m,p,E,null,{shadow:!1})))return;return{code:"object.missing",context:{peers:f.paths,peersWithLabels:n.keysToLabels(i,f.paths)}}},oxor(i,f,m,p,E){const w=[],c=n.isPresent(f.options);for(const g of f.peers)c(g.resolve(m,p,E,null,{shadow:!1}))&&w.push(g.key);if(!w.length||w.length===1)return;const h={peers:f.paths,peersWithLabels:n.keysToLabels(i,f.paths)};return h.present=w,h.presentWithLabels=n.keysToLabels(i,w),{code:"object.oxor",context:h}},with(i,f,m,p,E){const w=n.isPresent(f.options);for(const c of f.peers)if(w(c.resolve(m,p,E,null,{shadow:!1}))===!1)return{code:"object.with",context:{main:f.key.key,mainWithLabel:n.keysToLabels(i,f.key.key),peer:c.key,peerWithLabel:n.keysToLabels(i,c.key)}}},without(i,f,m,p,E){const w=n.isPresent(f.options);for(const c of f.peers)if(w(c.resolve(m,p,E,null,{shadow:!1})))return{code:"object.without",context:{main:f.key.key,mainWithLabel:n.keysToLabels(i,f.key.key),peer:c.key,peerWithLabel:n.keysToLabels(i,c.key)}}},xor(i,f,m,p,E){const w=[],c=n.isPresent(f.options);for(const g of f.peers)c(g.resolve(m,p,E,null,{shadow:!1}))&&w.push(g.key);if(w.length===1)return;const h={peers:f.paths,peersWithLabels:n.keysToLabels(i,f.paths)};return w.length===0?{code:"object.missing",context:h}:(h.present=w,h.presentWithLabels=n.keysToLabels(i,w),{code:"object.xor",context:h})}},n.keysToLabels=function(i,f){return Array.isArray(f)?f.map(m=>i.$_mapLabels(m)):i.$_mapLabels(f)},n.isPresent=function(i){return typeof i.isPresent=="function"?i.isPresent:f=>f!==void 0},n.rename=function(i,f,m,p,E){const w={};for(const c of i.$_terms.renames){const h=[],g=typeof c.from!="string";if(g)for(const O in f){if(f[O]===void 0&&c.options.ignoreUndefined||O===c.to)continue;const k=c.from.exec(O);k&&h.push({from:O,to:c.to,match:k})}else!Object.prototype.hasOwnProperty.call(f,c.from)||f[c.from]===void 0&&c.options.ignoreUndefined||h.push(c);for(const O of h){const k=O.from;let N=O.to;if(N instanceof l&&(N=N.render(f,m,p,O.match)),k!==N){if(!c.options.multiple&&w[N]&&(E.push(i.$_createError("object.rename.multiple",f,{from:k,to:N,pattern:g},m,p)),p.abortEarly)||Object.prototype.hasOwnProperty.call(f,N)&&!c.options.override&&!w[N]&&(E.push(i.$_createError("object.rename.override",f,{from:k,to:N,pattern:g},m,p)),p.abortEarly))return!1;f[k]===void 0?delete f[N]:f[N]=f[k],w[N]=!0,c.options.alias||delete f[k]}}}return!0},n.unknown=function(i,f,m,p,E,w){if(i.$_terms.patterns){let c=!1;const h=i.$_terms.patterns.map(O=>{if(O.matches)return c=!0,[]}),g=[f,...E.ancestors];for(const O of m){const k=f[O],N=[...E.path,O];for(let D=0;D<i.$_terms.patterns.length;++D){const M=i.$_terms.patterns[D];if(M.regex){const K=M.regex.test(O);if(E.mainstay.tracer.debug(E,"rule",`pattern.${D}`,K?"pass":"error"),!K)continue}else if(!M.schema.$_match(O,E.nest(M.schema,`pattern.${D}`),w))continue;m.delete(O);const z=E.localize(N,g,{schema:M.rule,key:O}),B=M.rule.$_validate(k,z,w);if(B.errors){if(w.abortEarly)return{value:f,errors:B.errors};p.push(...B.errors)}if(M.matches&&h[D].push(O),f[O]=B.value,!M.fallthrough)break}}if(c)for(let O=0;O<h.length;++O){const k=h[O];if(!k)continue;const N=i.$_terms.patterns[O].matches,D=E.localize(E.path,g,N),M=N.$_validate(k,D,w);if(M.errors){const z=r.details(M.errors,{override:!1});z.matches=k;const B=i.$_createError("object.pattern.match",f,z,E,w);if(w.abortEarly)return{value:f,errors:B};p.push(B)}}}if(m.size&&(i.$_terms.keys||i.$_terms.patterns)){if(w.stripUnknown&&!i._flags.unknown||w.skipFunctions){const c=!(!w.stripUnknown||w.stripUnknown!==!0&&!w.stripUnknown.objects);for(const h of m)c?(delete f[h],m.delete(h)):typeof f[h]=="function"&&m.delete(h)}if(!a.default(i._flags.unknown,w.allowUnknown))for(const c of m){const h=E.localize([...E.path,c],[]),g=i.$_createError("object.unknown",f[c],{child:c},h,w,{flags:!1});if(w.abortEarly)return{value:f,errors:g};p.push(g)}}},n.Dependency=class{constructor(i,f,m,p,E){this.rel=i,this.key=f,this.peers=m,this.paths=p,this.options=E}describe(){const i={rel:this.rel,peers:this.paths};return this.key!==null&&(i.key=this.key.key),this.peers[0].separator!=="."&&(i.options={...i.options,separator:this.peers[0].separator}),this.options.isPresent&&(i.options={...i.options,isPresent:this.options.isPresent}),i}},n.Keys=class extends Array{concat(i){const f=this.slice(),m=new Map;for(let p=0;p<f.length;++p)m.set(f[p].key,p);for(const p of i){const E=p.key,w=m.get(E);w!==void 0?f[w]={key:E,schema:f[w].schema.concat(p.schema)}:f.push(p)}return f}}},8785:(A,S,v)=>{const o=v(375),y=v(8068),d=v(8160),u=v(3292),e=v(6354),a={};A.exports=y.extend({type:"link",properties:{schemaChain:!0},terms:{link:{init:null,manifest:"single",register:!1}},args:(s,r)=>s.ref(r),validate(s,{schema:r,state:t,prefs:l}){o(r.$_terms.link,"Uninitialized link schema");const n=a.generate(r,s,t,l),i=r.$_terms.link[0].ref;return n.$_validate(s,t.nest(n,`link:${i.display}:${n.type}`),l)},generate:(s,r,t,l)=>a.generate(s,r,t,l),rules:{ref:{method(s){o(!this.$_terms.link,"Cannot reinitialize schema"),s=u.ref(s),o(s.type==="value"||s.type==="local","Invalid reference type:",s.type),o(s.type==="local"||s.ancestor==="root"||s.ancestor>0,"Link cannot reference itself");const r=this.clone();return r.$_terms.link=[{ref:s}],r}},relative:{method(s=!0){return this.$_setFlag("relative",s)}}},overrides:{concat(s){o(this.$_terms.link,"Uninitialized link schema"),o(d.isSchema(s),"Invalid schema object"),o(s.type!=="link","Cannot merge type link with another link");const r=this.clone();return r.$_terms.whens||(r.$_terms.whens=[]),r.$_terms.whens.push({concat:s}),r.$_mutateRebuild()}},manifest:{build:(s,r)=>(o(r.link,"Invalid link description missing link"),s.ref(r.link))}}),a.generate=function(s,r,t,l){let n=t.mainstay.links.get(s);if(n)return n._generate(r,t,l).schema;const i=s.$_terms.link[0].ref,{perspective:f,path:m}=a.perspective(i,t);a.assert(f,"which is outside of schema boundaries",i,s,t,l);try{n=m.length?f.$_reach(m):f}catch{a.assert(!1,"to non-existing schema",i,s,t,l)}return a.assert(n.type!=="link","which is another link",i,s,t,l),s._flags.relative||t.mainstay.links.set(s,n),n._generate(r,t,l).schema},a.perspective=function(s,r){if(s.type==="local"){for(const{schema:t,key:l}of r.schemas){if((t._flags.id||l)===s.path[0])return{perspective:t,path:s.path.slice(1)};if(t.$_terms.shared){for(const n of t.$_terms.shared)if(n._flags.id===s.path[0])return{perspective:n,path:s.path.slice(1)}}}return{perspective:null,path:null}}return s.ancestor==="root"?{perspective:r.schemas[r.schemas.length-1].schema,path:s.path}:{perspective:r.schemas[s.ancestor]&&r.schemas[s.ancestor].schema,path:s.path}},a.assert=function(s,r,t,l,n,i){s||o(!1,`"${e.label(l._flags,n,i)}" contains link reference "${t.display}" ${r}`)}},3832:(A,S,v)=>{const o=v(375),y=v(8068),d=v(8160),u={numberRx:/^\s*[+-]?(?:(?:\d+(?:\.\d*)?)|(?:\.\d+))(?:e([+-]?\d+))?\s*$/i,precisionRx:/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/,exponentialPartRegex:/[eE][+-]?\d+$/,leadingSignAndZerosRegex:/^[+-]?(0*)?/,dotRegex:/\./,trailingZerosRegex:/0+$/,decimalPlaces(e){const a=e.toString(),s=a.indexOf("."),r=a.indexOf("e");return(s<0?0:(r<0?a.length:r)-s-1)+(r<0?0:Math.max(0,-parseInt(a.slice(r+1))))}};A.exports=y.extend({type:"number",flags:{unsafe:{default:!1}},coerce:{from:"string",method(e,{schema:a,error:s}){if(!e.match(u.numberRx))return;e=e.trim();const r={value:parseFloat(e)};if(r.value===0&&(r.value=0),!a._flags.unsafe)if(e.match(/e/i)){if(u.extractSignificantDigits(e)!==u.extractSignificantDigits(String(r.value)))return r.errors=s("number.unsafe"),r}else{const t=r.value.toString();if(t.match(/e/i))return r;if(t!==u.normalizeDecimal(e))return r.errors=s("number.unsafe"),r}return r}},validate(e,{schema:a,error:s,prefs:r}){if(e===1/0||e===-1/0)return{value:e,errors:s("number.infinity")};if(!d.isNumber(e))return{value:e,errors:s("number.base")};const t={value:e};if(r.convert){const l=a.$_getRule("precision");if(l){const n=Math.pow(10,l.args.limit);t.value=Math.round(t.value*n)/n}}return t.value===0&&(t.value=0),!a._flags.unsafe&&(e>Number.MAX_SAFE_INTEGER||e<Number.MIN_SAFE_INTEGER)&&(t.errors=s("number.unsafe")),t},rules:{compare:{method:!1,validate:(e,a,{limit:s},{name:r,operator:t,args:l})=>d.compare(e,s,t)?e:a.error("number."+r,{limit:l.limit,value:e}),args:[{name:"limit",ref:!0,assert:d.isNumber,message:"must be a number"}]},greater:{method(e){return this.$_addRule({name:"greater",method:"compare",args:{limit:e},operator:">"})}},integer:{method(){return this.$_addRule("integer")},validate:(e,a)=>Math.trunc(e)-e==0?e:a.error("number.integer")},less:{method(e){return this.$_addRule({name:"less",method:"compare",args:{limit:e},operator:"<"})}},max:{method(e){return this.$_addRule({name:"max",method:"compare",args:{limit:e},operator:"<="})}},min:{method(e){return this.$_addRule({name:"min",method:"compare",args:{limit:e},operator:">="})}},multiple:{method(e){const a=typeof e=="number"?u.decimalPlaces(e):null,s=Math.pow(10,a);return this.$_addRule({name:"multiple",args:{base:e,baseDecimalPlace:a,pfactor:s}})},validate:(e,a,{base:s,baseDecimalPlace:r,pfactor:t},l)=>u.decimalPlaces(e)>r?a.error("number.multiple",{multiple:l.args.base,value:e}):Math.round(t*e)%Math.round(t*s)==0?e:a.error("number.multiple",{multiple:l.args.base,value:e}),args:[{name:"base",ref:!0,assert:e=>typeof e=="number"&&isFinite(e)&&e>0,message:"must be a positive number"},"baseDecimalPlace","pfactor"],multi:!0},negative:{method(){return this.sign("negative")}},port:{method(){return this.$_addRule("port")},validate:(e,a)=>Number.isSafeInteger(e)&&e>=0&&e<=65535?e:a.error("number.port")},positive:{method(){return this.sign("positive")}},precision:{method(e){return o(Number.isSafeInteger(e),"limit must be an integer"),this.$_addRule({name:"precision",args:{limit:e}})},validate(e,a,{limit:s}){const r=e.toString().match(u.precisionRx);return Math.max((r[1]?r[1].length:0)-(r[2]?parseInt(r[2],10):0),0)<=s?e:a.error("number.precision",{limit:s,value:e})},convert:!0},sign:{method(e){return o(["negative","positive"].includes(e),"Invalid sign",e),this.$_addRule({name:"sign",args:{sign:e}})},validate:(e,a,{sign:s})=>s==="negative"&&e<0||s==="positive"&&e>0?e:a.error(`number.${s}`)},unsafe:{method(e=!0){return o(typeof e=="boolean","enabled must be a boolean"),this.$_setFlag("unsafe",e)}}},cast:{string:{from:e=>typeof e=="number",to:(e,a)=>e.toString()}},messages:{"number.base":"{{#label}} must be a number","number.greater":"{{#label}} must be greater than {{#limit}}","number.infinity":"{{#label}} cannot be infinity","number.integer":"{{#label}} must be an integer","number.less":"{{#label}} must be less than {{#limit}}","number.max":"{{#label}} must be less than or equal to {{#limit}}","number.min":"{{#label}} must be greater than or equal to {{#limit}}","number.multiple":"{{#label}} must be a multiple of {{#multiple}}","number.negative":"{{#label}} must be a negative number","number.port":"{{#label}} must be a valid port","number.positive":"{{#label}} must be a positive number","number.precision":"{{#label}} must have no more than {{#limit}} decimal places","number.unsafe":"{{#label}} must be a safe number"}}),u.extractSignificantDigits=function(e){return e.replace(u.exponentialPartRegex,"").replace(u.dotRegex,"").replace(u.trailingZerosRegex,"").replace(u.leadingSignAndZerosRegex,"")},u.normalizeDecimal=function(e){return(e=e.replace(/^\+/,"").replace(/\.0*$/,"").replace(/^(-?)\.([^\.]*)$/,"$10.$2").replace(/^(-?)0+([0-9])/,"$1$2")).includes(".")&&e.endsWith("0")&&(e=e.replace(/0+$/,"")),e==="-0"?"0":e}},8966:(A,S,v)=>{const o=v(7824);A.exports=o.extend({type:"object",cast:{map:{from:y=>y&&typeof y=="object",to:(y,d)=>new Map(Object.entries(y))}}})},7417:(A,S,v)=>{const o=v(375),y=v(5380),d=v(1745),u=v(9959),e=v(6064),a=v(9926),s=v(5752),r=v(8068),t=v(8160),l={tlds:a instanceof Set&&{tlds:{allow:a,deny:null}},base64Regex:{true:{true:/^(?:[\w\-]{2}[\w\-]{2})*(?:[\w\-]{2}==|[\w\-]{3}=)?$/,false:/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/},false:{true:/^(?:[\w\-]{2}[\w\-]{2})*(?:[\w\-]{2}(==)?|[\w\-]{3}=?)?$/,false:/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}(==)?|[A-Za-z0-9+\/]{3}=?)?$/}},dataUriRegex:/^data:[\w+.-]+\/[\w+.-]+;((charset=[\w-]+|base64),)?(.*)$/,hexRegex:{withPrefix:/^0x[0-9a-f]+$/i,withOptionalPrefix:/^(?:0x)?[0-9a-f]+$/i,withoutPrefix:/^[0-9a-f]+$/i},ipRegex:u.regex({cidr:"forbidden"}).regex,isoDurationRegex:/^P(?!$)(\d+Y)?(\d+M)?(\d+W)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?$/,guidBrackets:{"{":"}","[":"]","(":")","":""},guidVersions:{uuidv1:"1",uuidv2:"2",uuidv3:"3",uuidv4:"4",uuidv5:"5",uuidv6:"6",uuidv7:"7",uuidv8:"8"},guidSeparators:new Set([void 0,!0,!1,"-",":"]),normalizationForms:["NFC","NFD","NFKC","NFKD"]};A.exports=r.extend({type:"string",flags:{insensitive:{default:!1},truncate:{default:!1}},terms:{replacements:{init:null}},coerce:{from:"string",method(n,{schema:i,state:f,prefs:m}){const p=i.$_getRule("normalize");p&&(n=n.normalize(p.args.form));const E=i.$_getRule("case");E&&(n=E.args.direction==="upper"?n.toLocaleUpperCase():n.toLocaleLowerCase());const w=i.$_getRule("trim");if(w&&w.args.enabled&&(n=n.trim()),i.$_terms.replacements)for(const h of i.$_terms.replacements)n=n.replace(h.pattern,h.replacement);const c=i.$_getRule("hex");if(c&&c.args.options.byteAligned&&n.length%2!=0&&(n=`0${n}`),i.$_getRule("isoDate")){const h=l.isoDate(n);h&&(n=h)}if(i._flags.truncate){const h=i.$_getRule("max");if(h){let g=h.args.limit;if(t.isResolvable(g)&&(g=g.resolve(n,f,m),!t.limit(g)))return{value:n,errors:i.$_createError("any.ref",g,{ref:h.args.limit,arg:"limit",reason:"must be a positive integer"},f,m)};n=n.slice(0,g)}}return{value:n}}},validate(n,{schema:i,error:f}){if(typeof n!="string")return{value:n,errors:f("string.base")};if(n===""){const m=i.$_getRule("min");return m&&m.args.limit===0?void 0:{value:n,errors:f("string.empty")}}},rules:{alphanum:{method(){return this.$_addRule("alphanum")},validate:(n,i)=>/^[a-zA-Z0-9]+$/.test(n)?n:i.error("string.alphanum")},base64:{method(n={}){return t.assertOptions(n,["paddingRequired","urlSafe"]),n={urlSafe:!1,paddingRequired:!0,...n},o(typeof n.paddingRequired=="boolean","paddingRequired must be boolean"),o(typeof n.urlSafe=="boolean","urlSafe must be boolean"),this.$_addRule({name:"base64",args:{options:n}})},validate:(n,i,{options:f})=>l.base64Regex[f.paddingRequired][f.urlSafe].test(n)?n:i.error("string.base64")},case:{method(n){return o(["lower","upper"].includes(n),"Invalid case:",n),this.$_addRule({name:"case",args:{direction:n}})},validate:(n,i,{direction:f})=>f==="lower"&&n===n.toLocaleLowerCase()||f==="upper"&&n===n.toLocaleUpperCase()?n:i.error(`string.${f}case`),convert:!0},creditCard:{method(){return this.$_addRule("creditCard")},validate(n,i){let f=n.length,m=0,p=1;for(;f--;){const E=n.charAt(f)*p;m+=E-9*(E>9),p^=3}return m>0&&m%10==0?n:i.error("string.creditCard")}},dataUri:{method(n={}){return t.assertOptions(n,["paddingRequired"]),n={paddingRequired:!0,...n},o(typeof n.paddingRequired=="boolean","paddingRequired must be boolean"),this.$_addRule({name:"dataUri",args:{options:n}})},validate(n,i,{options:f}){const m=n.match(l.dataUriRegex);return m&&(!m[2]||m[2]!=="base64"||l.base64Regex[f.paddingRequired].false.test(m[3]))?n:i.error("string.dataUri")}},domain:{method(n){n&&t.assertOptions(n,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"]);const i=l.addressOptions(n);return this.$_addRule({name:"domain",args:{options:n},address:i})},validate:(n,i,f,{address:m})=>y.isValid(n,m)?n:i.error("string.domain")},email:{method(n={}){t.assertOptions(n,["allowFullyQualified","allowUnicode","ignoreLength","maxDomainSegments","minDomainSegments","multiple","separator","tlds"]),o(n.multiple===void 0||typeof n.multiple=="boolean","multiple option must be an boolean");const i=l.addressOptions(n),f=new RegExp(`\\s*[${n.separator?e(n.separator):","}]\\s*`);return this.$_addRule({name:"email",args:{options:n},regex:f,address:i})},validate(n,i,{options:f},{regex:m,address:p}){const E=f.multiple?n.split(m):[n],w=[];for(const c of E)d.isValid(c,p)||w.push(c);return w.length?i.error("string.email",{value:n,invalids:w}):n}},guid:{alias:"uuid",method(n={}){t.assertOptions(n,["version","separator"]);let i="";if(n.version){const p=[].concat(n.version);o(p.length>=1,"version must have at least 1 valid version specified");const E=new Set;for(let w=0;w<p.length;++w){const c=p[w];o(typeof c=="string","version at position "+w+" must be a string");const h=l.guidVersions[c.toLowerCase()];o(h,"version at position "+w+" must be one of "+Object.keys(l.guidVersions).join(", ")),o(!E.has(h),"version at position "+w+" must not be a duplicate"),i+=h,E.add(h)}}o(l.guidSeparators.has(n.separator),'separator must be one of true, false, "-", or ":"');const f=n.separator===void 0?"[:-]?":n.separator===!0?"[:-]":n.separator===!1?"[]?":`\\${n.separator}`,m=new RegExp(`^([\\[{\\(]?)[0-9A-F]{8}(${f})[0-9A-F]{4}\\2?[${i||"0-9A-F"}][0-9A-F]{3}\\2?[${i?"89AB":"0-9A-F"}][0-9A-F]{3}\\2?[0-9A-F]{12}([\\]}\\)]?)$`,"i");return this.$_addRule({name:"guid",args:{options:n},regex:m})},validate(n,i,f,{regex:m}){const p=m.exec(n);return p?l.guidBrackets[p[1]]!==p[p.length-1]?i.error("string.guid"):n:i.error("string.guid")}},hex:{method(n={}){return t.assertOptions(n,["byteAligned","prefix"]),n={byteAligned:!1,prefix:!1,...n},o(typeof n.byteAligned=="boolean","byteAligned must be boolean"),o(typeof n.prefix=="boolean"||n.prefix==="optional",'prefix must be boolean or "optional"'),this.$_addRule({name:"hex",args:{options:n}})},validate:(n,i,{options:f})=>(f.prefix==="optional"?l.hexRegex.withOptionalPrefix:f.prefix===!0?l.hexRegex.withPrefix:l.hexRegex.withoutPrefix).test(n)?f.byteAligned&&n.length%2!=0?i.error("string.hexAlign"):n:i.error("string.hex")},hostname:{method(){return this.$_addRule("hostname")},validate:(n,i)=>y.isValid(n,{minDomainSegments:1})||l.ipRegex.test(n)?n:i.error("string.hostname")},insensitive:{method(){return this.$_setFlag("insensitive",!0)}},ip:{method(n={}){t.assertOptions(n,["cidr","version"]);const{cidr:i,versions:f,regex:m}=u.regex(n),p=n.version?f:void 0;return this.$_addRule({name:"ip",args:{options:{cidr:i,version:p}},regex:m})},validate:(n,i,{options:f},{regex:m})=>m.test(n)?n:f.version?i.error("string.ipVersion",{value:n,cidr:f.cidr,version:f.version}):i.error("string.ip",{value:n,cidr:f.cidr})},isoDate:{method(){return this.$_addRule("isoDate")},validate:(n,{error:i})=>l.isoDate(n)?n:i("string.isoDate")},isoDuration:{method(){return this.$_addRule("isoDuration")},validate:(n,i)=>l.isoDurationRegex.test(n)?n:i.error("string.isoDuration")},length:{method(n,i){return l.length(this,"length",n,"=",i)},validate(n,i,{limit:f,encoding:m},{name:p,operator:E,args:w}){const c=!m&&n.length;return t.compare(c,f,E)?n:i.error("string."+p,{limit:w.limit,value:n,encoding:m})},args:[{name:"limit",ref:!0,assert:t.limit,message:"must be a positive integer"},"encoding"]},lowercase:{method(){return this.case("lower")}},max:{method(n,i){return l.length(this,"max",n,"<=",i)},args:["limit","encoding"]},min:{method(n,i){return l.length(this,"min",n,">=",i)},args:["limit","encoding"]},normalize:{method(n="NFC"){return o(l.normalizationForms.includes(n),"normalization form must be one of "+l.normalizationForms.join(", ")),this.$_addRule({name:"normalize",args:{form:n}})},validate:(n,{error:i},{form:f})=>n===n.normalize(f)?n:i("string.normalize",{value:n,form:f}),convert:!0},pattern:{alias:"regex",method(n,i={}){o(n instanceof RegExp,"regex must be a RegExp"),o(!n.flags.includes("g")&&!n.flags.includes("y"),"regex should not use global or sticky mode"),typeof i=="string"&&(i={name:i}),t.assertOptions(i,["invert","name"]);const f=["string.pattern",i.invert?".invert":"",i.name?".name":".base"].join("");return this.$_addRule({name:"pattern",args:{regex:n,options:i},errorCode:f})},validate:(n,i,{regex:f,options:m},{errorCode:p})=>f.test(n)^m.invert?n:i.error(p,{name:m.name,regex:f,value:n}),args:["regex","options"],multi:!0},replace:{method(n,i){typeof n=="string"&&(n=new RegExp(e(n),"g")),o(n instanceof RegExp,"pattern must be a RegExp"),o(typeof i=="string","replacement must be a String");const f=this.clone();return f.$_terms.replacements||(f.$_terms.replacements=[]),f.$_terms.replacements.push({pattern:n,replacement:i}),f}},token:{method(){return this.$_addRule("token")},validate:(n,i)=>/^\w+$/.test(n)?n:i.error("string.token")},trim:{method(n=!0){return o(typeof n=="boolean","enabled must be a boolean"),this.$_addRule({name:"trim",args:{enabled:n}})},validate:(n,i,{enabled:f})=>f&&n!==n.trim()?i.error("string.trim"):n,convert:!0},truncate:{method(n=!0){return o(typeof n=="boolean","enabled must be a boolean"),this.$_setFlag("truncate",n)}},uppercase:{method(){return this.case("upper")}},uri:{method(n={}){t.assertOptions(n,["allowRelative","allowQuerySquareBrackets","domain","relativeOnly","scheme"]),n.domain&&t.assertOptions(n.domain,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"]);const{regex:i,scheme:f}=s.regex(n),m=n.domain?l.addressOptions(n.domain):null;return this.$_addRule({name:"uri",args:{options:n},regex:i,domain:m,scheme:f})},validate(n,i,{options:f},{regex:m,domain:p,scheme:E}){if(["http:/","https:/"].includes(n))return i.error("string.uri");const w=m.exec(n);if(w){const c=w[1]||w[2];return!p||f.allowRelative&&!c||y.isValid(c,p)?n:i.error("string.domain",{value:c})}return f.relativeOnly?i.error("string.uriRelativeOnly"):f.scheme?i.error("string.uriCustomScheme",{scheme:E,value:n}):i.error("string.uri")}}},manifest:{build(n,i){if(i.replacements)for(const{pattern:f,replacement:m}of i.replacements)n=n.replace(f,m);return n}},messages:{"string.alphanum":"{{#label}} must only contain alpha-numeric characters","string.base":"{{#label}} must be a string","string.base64":"{{#label}} must be a valid base64 string","string.creditCard":"{{#label}} must be a credit card","string.dataUri":"{{#label}} must be a valid dataUri string","string.domain":"{{#label}} must contain a valid domain name","string.email":"{{#label}} must be a valid email","string.empty":"{{#label}} is not allowed to be empty","string.guid":"{{#label}} must be a valid GUID","string.hex":"{{#label}} must only contain hexadecimal characters","string.hexAlign":"{{#label}} hex decoded representation must be byte aligned","string.hostname":"{{#label}} must be a valid hostname","string.ip":"{{#label}} must be a valid ip address with a {{#cidr}} CIDR","string.ipVersion":"{{#label}} must be a valid ip address of one of the following versions {{#version}} with a {{#cidr}} CIDR","string.isoDate":"{{#label}} must be in iso format","string.isoDuration":"{{#label}} must be a valid ISO 8601 duration","string.length":"{{#label}} length must be {{#limit}} characters long","string.lowercase":"{{#label}} must only contain lowercase characters","string.max":"{{#label}} length must be less than or equal to {{#limit}} characters long","string.min":"{{#label}} length must be at least {{#limit}} characters long","string.normalize":"{{#label}} must be unicode normalized in the {{#form}} form","string.token":"{{#label}} must only contain alpha-numeric and underscore characters","string.pattern.base":"{{#label}} with value {:[.]} fails to match the required pattern: {{#regex}}","string.pattern.name":"{{#label}} with value {:[.]} fails to match the {{#name}} pattern","string.pattern.invert.base":"{{#label}} with value {:[.]} matches the inverted pattern: {{#regex}}","string.pattern.invert.name":"{{#label}} with value {:[.]} matches the inverted {{#name}} pattern","string.trim":"{{#label}} must not have leading or trailing whitespace","string.uri":"{{#label}} must be a valid uri","string.uriCustomScheme":"{{#label}} must be a valid uri with a scheme matching the {{#scheme}} pattern","string.uriRelativeOnly":"{{#label}} must be a valid relative uri","string.uppercase":"{{#label}} must only contain uppercase characters"}}),l.addressOptions=function(n){if(!n)return l.tlds||n;if(o(n.minDomainSegments===void 0||Number.isSafeInteger(n.minDomainSegments)&&n.minDomainSegments>0,"minDomainSegments must be a positive integer"),o(n.maxDomainSegments===void 0||Number.isSafeInteger(n.maxDomainSegments)&&n.maxDomainSegments>0,"maxDomainSegments must be a positive integer"),n.tlds===!1)return n;if(n.tlds===!0||n.tlds===void 0)return o(l.tlds,"Built-in TLD list disabled"),Object.assign({},n,l.tlds);o(typeof n.tlds=="object","tlds must be true, false, or an object");const i=n.tlds.deny;if(i)return Array.isArray(i)&&(n=Object.assign({},n,{tlds:{deny:new Set(i)}})),o(n.tlds.deny instanceof Set,"tlds.deny must be an array, Set, or boolean"),o(!n.tlds.allow,"Cannot specify both tlds.allow and tlds.deny lists"),l.validateTlds(n.tlds.deny,"tlds.deny"),n;const f=n.tlds.allow;return f?f===!0?(o(l.tlds,"Built-in TLD list disabled"),Object.assign({},n,l.tlds)):(Array.isArray(f)&&(n=Object.assign({},n,{tlds:{allow:new Set(f)}})),o(n.tlds.allow instanceof Set,"tlds.allow must be an array, Set, or boolean"),l.validateTlds(n.tlds.allow,"tlds.allow"),n):n},l.validateTlds=function(n,i){for(const f of n)o(y.isValid(f,{minDomainSegments:1,maxDomainSegments:1}),`${i} must contain valid top level domain names`)},l.isoDate=function(n){if(!t.isIsoDate(n))return null;/.*T.*[+-]\d\d$/.test(n)&&(n+="00");const i=new Date(n);return isNaN(i.getTime())?null:i.toISOString()},l.length=function(n,i,f,m,p){return o(!p||!1,"Invalid encoding:",p),n.$_addRule({name:i,method:"length",args:{limit:f,encoding:p},operator:m})}},8826:(A,S,v)=>{const o=v(375),y=v(8068),d={};d.Map=class extends Map{slice(){return new d.Map(this)}},A.exports=y.extend({type:"symbol",terms:{map:{init:new d.Map}},coerce:{method(u,{schema:e,error:a}){const s=e.$_terms.map.get(u);return s&&(u=s),e._flags.only&&typeof u!="symbol"?{value:u,errors:a("symbol.map",{map:e.$_terms.map})}:{value:u}}},validate(u,{error:e}){if(typeof u!="symbol")return{value:u,errors:e("symbol.base")}},rules:{map:{method(u){u&&!u[Symbol.iterator]&&typeof u=="object"&&(u=Object.entries(u)),o(u&&u[Symbol.iterator],"Iterable must be an iterable or object");const e=this.clone(),a=[];for(const s of u){o(s&&s[Symbol.iterator],"Entry must be an iterable");const[r,t]=s;o(typeof r!="object"&&typeof r!="function"&&typeof r!="symbol","Key must not be of type object, function, or Symbol"),o(typeof t=="symbol","Value must be a Symbol"),e.$_terms.map.set(r,t),a.push(t)}return e.valid(...a)}}},manifest:{build:(u,e)=>(e.map&&(u=u.map(e.map)),u)},messages:{"symbol.base":"{{#label}} must be a symbol","symbol.map":"{{#label}} must be one of {{#map}}"}})},8863:(A,S,v)=>{const o=v(375),y=v(8571),d=v(738),u=v(9621),e=v(8160),a=v(6354),s=v(493),r={result:Symbol("result")};S.entry=function(t,l,n){let i=e.defaults;n&&(o(n.warnings===void 0,"Cannot override warnings preference in synchronous validation"),o(n.artifacts===void 0,"Cannot override artifacts preference in synchronous validation"),i=e.preferences(e.defaults,n));const f=r.entry(t,l,i);o(!f.mainstay.externals.length,"Schema with external rules must use validateAsync()");const m={value:f.value};return f.error&&(m.error=f.error),f.mainstay.warnings.length&&(m.warning=a.details(f.mainstay.warnings)),f.mainstay.debug&&(m.debug=f.mainstay.debug),f.mainstay.artifacts&&(m.artifacts=f.mainstay.artifacts),m},S.entryAsync=async function(t,l,n){let i=e.defaults;n&&(i=e.preferences(e.defaults,n));const f=r.entry(t,l,i),m=f.mainstay;if(f.error)throw m.debug&&(f.error.debug=m.debug),f.error;if(m.externals.length){let E=f.value;const w=[];for(const c of m.externals){const h=c.state.path,g=c.schema.type==="link"?m.links.get(c.schema):null;let O,k,N=E;const D=h.length?[E]:[],M=h.length?u(t,h):t;if(h.length){O=h[h.length-1];let z=E;for(const B of h.slice(0,-1))z=z[B],D.unshift(z);k=D[0],N=k[O]}try{const z=(K,Q)=>(g||c.schema).$_createError(K,N,Q,c.state,i),B=await c.method(N,{schema:c.schema,linked:g,state:c.state,prefs:n,original:M,error:z,errorsArray:r.errorsArray,warn:(K,Q)=>m.warnings.push((g||c.schema).$_createError(K,N,Q,c.state,i)),message:(K,Q)=>(g||c.schema).$_createError("external",N,Q,c.state,i,{messages:K})});if(B===void 0||B===N)continue;if(B instanceof a.Report){if(m.tracer.log(c.schema,c.state,"rule","external","error"),w.push(B),i.abortEarly)break;continue}if(Array.isArray(B)&&B[e.symbols.errors]){if(m.tracer.log(c.schema,c.state,"rule","external","error"),w.push(...B),i.abortEarly)break;continue}k?(m.tracer.value(c.state,"rule",N,B,"external"),k[O]=B):(m.tracer.value(c.state,"rule",E,B,"external"),E=B)}catch(z){throw i.errors.label&&(z.message+=` (${c.label})`),z}}if(f.value=E,w.length)throw f.error=a.process(w,t,i),m.debug&&(f.error.debug=m.debug),f.error}if(!i.warnings&&!i.debug&&!i.artifacts)return f.value;const p={value:f.value};return m.warnings.length&&(p.warning=a.details(m.warnings)),m.debug&&(p.debug=m.debug),m.artifacts&&(p.artifacts=m.artifacts),p},r.Mainstay=class{constructor(t,l,n){this.externals=[],this.warnings=[],this.tracer=t,this.debug=l,this.links=n,this.shadow=null,this.artifacts=null,this._snapshots=[]}snapshot(){this._snapshots.push({externals:this.externals.slice(),warnings:this.warnings.slice()})}restore(){const t=this._snapshots.pop();this.externals=t.externals,this.warnings=t.warnings}commit(){this._snapshots.pop()}},r.entry=function(t,l,n){const{tracer:i,cleanup:f}=r.tracer(l,n),m=n.debug?[]:null,p=l._ids._schemaChain?new Map:null,E=new r.Mainstay(i,m,p),w=l._ids._schemaChain?[{schema:l}]:null,c=new s([],[],{mainstay:E,schemas:w}),h=S.validate(t,l,c,n);f&&l.$_root.untrace();const g=a.process(h.errors,t,n);return{value:h.value,error:g,mainstay:E}},r.tracer=function(t,l){return t.$_root._tracer?{tracer:t.$_root._tracer._register(t)}:l.debug?(o(t.$_root.trace,"Debug mode not supported"),{tracer:t.$_root.trace()._register(t),cleanup:!0}):{tracer:r.ignore}},S.validate=function(t,l,n,i,f={}){if(l.$_terms.whens&&(l=l._generate(t,n,i).schema),l._preferences&&(i=r.prefs(l,i)),l._cache&&i.cache){const g=l._cache.get(t);if(n.mainstay.tracer.debug(n,"validate","cached",!!g),g)return g}const m=(g,O,k)=>l.$_createError(g,t,O,k||n,i),p={original:t,prefs:i,schema:l,state:n,error:m,errorsArray:r.errorsArray,warn:(g,O,k)=>n.mainstay.warnings.push(m(g,O,k)),message:(g,O)=>l.$_createError("custom",t,O,n,i,{messages:g})};n.mainstay.tracer.entry(l,n);const E=l._definition;if(E.prepare&&t!==void 0&&i.convert){const g=E.prepare(t,p);if(g){if(n.mainstay.tracer.value(n,"prepare",t,g.value),g.errors)return r.finalize(g.value,[].concat(g.errors),p);t=g.value}}if(E.coerce&&t!==void 0&&i.convert&&(!E.coerce.from||E.coerce.from.includes(typeof t))){const g=E.coerce.method(t,p);if(g){if(n.mainstay.tracer.value(n,"coerced",t,g.value),g.errors)return r.finalize(g.value,[].concat(g.errors),p);t=g.value}}const w=l._flags.empty;w&&w.$_match(r.trim(t,l),n.nest(w),e.defaults)&&(n.mainstay.tracer.value(n,"empty",t,void 0),t=void 0);const c=f.presence||l._flags.presence||(l._flags._endedSwitch?null:i.presence);if(t===void 0){if(c==="forbidden")return r.finalize(t,null,p);if(c==="required")return r.finalize(t,[l.$_createError("any.required",t,null,n,i)],p);if(c==="optional"){if(l._flags.default!==e.symbols.deepDefault)return r.finalize(t,null,p);n.mainstay.tracer.value(n,"default",t,{}),t={}}}else if(c==="forbidden")return r.finalize(t,[l.$_createError("any.unknown",t,null,n,i)],p);const h=[];if(l._valids){const g=l._valids.get(t,n,i,l._flags.insensitive);if(g)return i.convert&&(n.mainstay.tracer.value(n,"valids",t,g.value),t=g.value),n.mainstay.tracer.filter(l,n,"valid",g),r.finalize(t,null,p);if(l._flags.only){const O=l.$_createError("any.only",t,{valids:l._valids.values({display:!0})},n,i);if(i.abortEarly)return r.finalize(t,[O],p);h.push(O)}}if(l._invalids){const g=l._invalids.get(t,n,i,l._flags.insensitive);if(g){n.mainstay.tracer.filter(l,n,"invalid",g);const O=l.$_createError("any.invalid",t,{invalids:l._invalids.values({display:!0})},n,i);if(i.abortEarly)return r.finalize(t,[O],p);h.push(O)}}if(E.validate){const g=E.validate(t,p);if(g&&(n.mainstay.tracer.value(n,"base",t,g.value),t=g.value,g.errors)){if(!Array.isArray(g.errors))return h.push(g.errors),r.finalize(t,h,p);if(g.errors.length)return h.push(...g.errors),r.finalize(t,h,p)}}return l._rules.length?r.rules(t,h,p):r.finalize(t,h,p)},r.rules=function(t,l,n){const{schema:i,state:f,prefs:m}=n;for(const p of i._rules){const E=i._definition.rules[p.method];if(E.convert&&m.convert){f.mainstay.tracer.log(i,f,"rule",p.name,"full");continue}let w,c=p.args;if(p._resolve.length){c=Object.assign({},c);for(const g of p._resolve){const O=E.argsByName.get(g),k=c[g].resolve(t,f,m),N=O.normalize?O.normalize(k):k,D=e.validateArg(N,null,O);if(D){w=i.$_createError("any.ref",k,{arg:g,ref:c[g],reason:D},f,m);break}c[g]=N}}w=w||E.validate(t,n,c,p);const h=r.rule(w,p);if(h.errors){if(f.mainstay.tracer.log(i,f,"rule",p.name,"error"),p.warn){f.mainstay.warnings.push(...h.errors);continue}if(m.abortEarly)return r.finalize(t,h.errors,n);l.push(...h.errors)}else f.mainstay.tracer.log(i,f,"rule",p.name,"pass"),f.mainstay.tracer.value(f,"rule",t,h.value,p.name),t=h.value}return r.finalize(t,l,n)},r.rule=function(t,l){return t instanceof a.Report?(r.error(t,l),{errors:[t],value:null}):Array.isArray(t)&&t[e.symbols.errors]?(t.forEach(n=>r.error(n,l)),{errors:t,value:null}):{errors:null,value:t}},r.error=function(t,l){return l.message&&t._setTemplate(l.message),t},r.finalize=function(t,l,n){l=l||[];const{schema:i,state:f,prefs:m}=n;if(l.length){const E=r.default("failover",void 0,l,n);E!==void 0&&(f.mainstay.tracer.value(f,"failover",t,E),t=E,l=[])}if(l.length&&i._flags.error)if(typeof i._flags.error=="function"){l=i._flags.error(l),Array.isArray(l)||(l=[l]);for(const E of l)o(E instanceof Error||E instanceof a.Report,"error() must return an Error object")}else l=[i._flags.error];if(t===void 0){const E=r.default("default",t,l,n);f.mainstay.tracer.value(f,"default",t,E),t=E}if(i._flags.cast&&t!==void 0){const E=i._definition.cast[i._flags.cast];if(E.from(t)){const w=E.to(t,n);f.mainstay.tracer.value(f,"cast",t,w,i._flags.cast),t=w}}if(i.$_terms.externals&&m.externals&&m._externals!==!1)for(const{method:E}of i.$_terms.externals)f.mainstay.externals.push({method:E,schema:i,state:f,label:a.label(i._flags,f,m)});const p={value:t,errors:l.length?l:null};return i._flags.result&&(p.value=i._flags.result==="strip"?void 0:n.original,f.mainstay.tracer.value(f,i._flags.result,t,p.value),f.shadow(t,i._flags.result)),i._cache&&m.cache!==!1&&!i._refs.length&&i._cache.set(n.original,p),t===void 0||p.errors||i._flags.artifact===void 0||(f.mainstay.artifacts=f.mainstay.artifacts||new Map,f.mainstay.artifacts.has(i._flags.artifact)||f.mainstay.artifacts.set(i._flags.artifact,[]),f.mainstay.artifacts.get(i._flags.artifact).push(f.path)),p},r.prefs=function(t,l){const n=l===e.defaults;return n&&t._preferences[e.symbols.prefs]?t._preferences[e.symbols.prefs]:(l=e.preferences(l,t._preferences),n&&(t._preferences[e.symbols.prefs]=l),l)},r.default=function(t,l,n,i){const{schema:f,state:m,prefs:p}=i,E=f._flags[t];if(p.noDefaults||E===void 0)return l;if(m.mainstay.tracer.log(f,m,"rule",t,"full"),!E)return E;if(typeof E=="function"){const w=E.length?[y(m.ancestors[0]),i]:[];try{return E(...w)}catch(c){return void n.push(f.$_createError(`any.${t}`,null,{error:c},m,p))}}return typeof E!="object"?E:E[e.symbols.literal]?E.literal:e.isResolvable(E)?E.resolve(l,m,p):y(E)},r.trim=function(t,l){if(typeof t!="string")return t;const n=l.$_getRule("trim");return n&&n.args.enabled?t.trim():t},r.ignore={active:!1,debug:d,entry:d,filter:d,log:d,resolve:d,value:d},r.errorsArray=function(){const t=[];return t[e.symbols.errors]=!0,t}},2036:(A,S,v)=>{const o=v(375),y=v(9474),d=v(8160),u={};A.exports=u.Values=class{constructor(e,a){this._values=new Set(e),this._refs=new Set(a),this._lowercase=u.lowercases(e),this._override=!1}get length(){return this._values.size+this._refs.size}add(e,a){d.isResolvable(e)?this._refs.has(e)||(this._refs.add(e),a&&a.register(e)):this.has(e,null,null,!1)||(this._values.add(e),typeof e=="string"&&this._lowercase.set(e.toLowerCase(),e))}static merge(e,a,s){if(e=e||new u.Values,a){if(a._override)return a.clone();for(const r of[...a._values,...a._refs])e.add(r)}if(s)for(const r of[...s._values,...s._refs])e.remove(r);return e.length?e:null}remove(e){d.isResolvable(e)?this._refs.delete(e):(this._values.delete(e),typeof e=="string"&&this._lowercase.delete(e.toLowerCase()))}has(e,a,s,r){return!!this.get(e,a,s,r)}get(e,a,s,r){if(!this.length)return!1;if(this._values.has(e))return{value:e};if(typeof e=="string"&&e&&r){const t=this._lowercase.get(e.toLowerCase());if(t)return{value:t}}if(!this._refs.size&&typeof e!="object")return!1;if(typeof e=="object"){for(const t of this._values)if(y(t,e))return{value:t}}if(a)for(const t of this._refs){const l=t.resolve(e,a,s,null,{in:!0});if(l===void 0)continue;const n=t.in&&typeof l=="object"?Array.isArray(l)?l:Object.keys(l):[l];for(const i of n)if(typeof i==typeof e){if(r&&e&&typeof e=="string"){if(i.toLowerCase()===e.toLowerCase())return{value:i,ref:t}}else if(y(i,e))return{value:i,ref:t}}}return!1}override(){this._override=!0}values(e){if(e&&e.display){const a=[];for(const s of[...this._values,...this._refs])s!==void 0&&a.push(s);return a}return Array.from([...this._values,...this._refs])}clone(){const e=new u.Values(this._values,this._refs);return e._override=this._override,e}concat(e){o(!e._override,"Cannot concat override set of values");const a=new u.Values([...this._values,...e._values],[...this._refs,...e._refs]);return a._override=this._override,a}describe(){const e=[];this._override&&e.push({override:!0});for(const a of this._values.values())e.push(a&&typeof a=="object"?{value:a}:a);for(const a of this._refs.values())e.push(a.describe());return e}},u.Values.prototype[d.symbols.values]=!0,u.Values.prototype.slice=u.Values.prototype.clone,u.lowercases=function(e){const a=new Map;if(e)for(const s of e)typeof s=="string"&&a.set(s.toLowerCase(),s);return a}},978:(A,S,v)=>{const o=v(375),y=v(8571),d=v(1687),u=v(9621),e={};A.exports=function(a,s,r={}){if(o(a&&typeof a=="object","Invalid defaults value: must be an object"),o(!s||s===!0||typeof s=="object","Invalid source value: must be true, falsy or an object"),o(typeof r=="object","Invalid options: must be an object"),!s)return null;if(r.shallow)return e.applyToDefaultsWithShallow(a,s,r);const t=y(a);if(s===!0)return t;const l=r.nullOverride!==void 0&&r.nullOverride;return d(t,s,{nullOverride:l,mergeArrays:!1})},e.applyToDefaultsWithShallow=function(a,s,r){const t=r.shallow;o(Array.isArray(t),"Invalid keys");const l=new Map,n=s===!0?null:new Set;for(let m of t){m=Array.isArray(m)?m:m.split(".");const p=u(a,m);p&&typeof p=="object"?l.set(p,n&&u(s,m)||p):n&&n.add(m)}const i=y(a,{},l);if(!n)return i;for(const m of n)e.reachCopy(i,s,m);const f=r.nullOverride!==void 0&&r.nullOverride;return d(i,s,{nullOverride:f,mergeArrays:!1})},e.reachCopy=function(a,s,r){for(const n of r){if(!(n in s))return;const i=s[n];if(typeof i!="object"||i===null)return;s=i}const t=s;let l=a;for(let n=0;n<r.length-1;++n){const i=r[n];typeof l[i]!="object"&&(l[i]={}),l=l[i]}l[r[r.length-1]]=t}},375:(A,S,v)=>{const o=v(7916);A.exports=function(y,...d){if(!y)throw d.length===1&&d[0]instanceof Error?d[0]:new o(d)}},8571:(A,S,v)=>{const o=v(9621),y=v(4277),d=v(7043),u={needsProtoHack:new Set([y.set,y.map,y.weakSet,y.weakMap])};A.exports=u.clone=function(e,a={},s=null){if(typeof e!="object"||e===null)return e;let r=u.clone,t=s;if(a.shallow){if(a.shallow!==!0)return u.cloneWithShallow(e,a);r=f=>f}else if(t){const f=t.get(e);if(f)return f}else t=new Map;const l=y.getInternalProto(e);if(l===y.buffer)return!1;if(l===y.date)return new Date(e.getTime());if(l===y.regex)return new RegExp(e);const n=u.base(e,l,a);if(n===e)return e;if(t&&t.set(e,n),l===y.set)for(const f of e)n.add(r(f,a,t));else if(l===y.map)for(const[f,m]of e)n.set(f,r(m,a,t));const i=d.keys(e,a);for(const f of i){if(f==="__proto__")continue;if(l===y.array&&f==="length"){n.length=e.length;continue}const m=Object.getOwnPropertyDescriptor(e,f);m?m.get||m.set?Object.defineProperty(n,f,m):m.enumerable?n[f]=r(e[f],a,t):Object.defineProperty(n,f,{enumerable:!1,writable:!0,configurable:!0,value:r(e[f],a,t)}):Object.defineProperty(n,f,{enumerable:!0,writable:!0,configurable:!0,value:r(e[f],a,t)})}return n},u.cloneWithShallow=function(e,a){const s=a.shallow;(a=Object.assign({},a)).shallow=!1;const r=new Map;for(const t of s){const l=o(e,t);typeof l!="object"&&typeof l!="function"||r.set(l,l)}return u.clone(e,a,r)},u.base=function(e,a,s){if(s.prototype===!1)return u.needsProtoHack.has(a)?new a.constructor:a===y.array?[]:{};const r=Object.getPrototypeOf(e);if(r&&r.isImmutable)return e;if(a===y.array){const t=[];return r!==a&&Object.setPrototypeOf(t,r),t}if(u.needsProtoHack.has(a)){const t=new r.constructor;return r!==a&&Object.setPrototypeOf(t,r),t}return Object.create(r)}},9474:(A,S,v)=>{const o=v(4277),y={mismatched:null};A.exports=function(d,u,e){return e=Object.assign({prototype:!0},e),!!y.isDeepEqual(d,u,e,[])},y.isDeepEqual=function(d,u,e,a){if(d===u)return d!==0||1/d==1/u;const s=typeof d;if(s!==typeof u||d===null||u===null)return!1;if(s==="function"){if(!e.deepFunction||d.toString()!==u.toString())return!1}else if(s!=="object")return d!=d&&u!=u;const r=y.getSharedType(d,u,!!e.prototype);switch(r){case o.buffer:return!1;case o.promise:return d===u;case o.regex:return d.toString()===u.toString();case y.mismatched:return!1}for(let t=a.length-1;t>=0;--t)if(a[t].isSame(d,u))return!0;a.push(new y.SeenEntry(d,u));try{return!!y.isDeepEqualObj(r,d,u,e,a)}finally{a.pop()}},y.getSharedType=function(d,u,e){if(e)return Object.getPrototypeOf(d)!==Object.getPrototypeOf(u)?y.mismatched:o.getInternalProto(d);const a=o.getInternalProto(d);return a!==o.getInternalProto(u)?y.mismatched:a},y.valueOf=function(d){const u=d.valueOf;if(u===void 0)return d;try{return u.call(d)}catch(e){return e}},y.hasOwnEnumerableProperty=function(d,u){return Object.prototype.propertyIsEnumerable.call(d,u)},y.isSetSimpleEqual=function(d,u){for(const e of Set.prototype.values.call(d))if(!Set.prototype.has.call(u,e))return!1;return!0},y.isDeepEqualObj=function(d,u,e,a,s){const{isDeepEqual:r,valueOf:t,hasOwnEnumerableProperty:l}=y,{keys:n,getOwnPropertySymbols:i}=Object;if(d===o.array){if(!a.part){if(u.length!==e.length)return!1;for(let w=0;w<u.length;++w)if(!r(u[w],e[w],a,s))return!1;return!0}for(const w of u)for(const c of e)if(r(w,c,a,s))return!0}else if(d===o.set){if(u.size!==e.size)return!1;if(!y.isSetSimpleEqual(u,e)){const w=new Set(Set.prototype.values.call(e));for(const c of Set.prototype.values.call(u)){if(w.delete(c))continue;let h=!1;for(const g of w)if(r(c,g,a,s)){w.delete(g),h=!0;break}if(!h)return!1}}}else if(d===o.map){if(u.size!==e.size)return!1;for(const[w,c]of Map.prototype.entries.call(u))if(c===void 0&&!Map.prototype.has.call(e,w)||!r(c,Map.prototype.get.call(e,w),a,s))return!1}else if(d===o.error&&(u.name!==e.name||u.message!==e.message))return!1;const f=t(u),m=t(e);if((u!==f||e!==m)&&!r(f,m,a,s))return!1;const p=n(u);if(!a.part&&p.length!==n(e).length&&!a.skip)return!1;let E=0;for(const w of p)if(a.skip&&a.skip.includes(w))e[w]===void 0&&++E;else if(!l(e,w)||!r(u[w],e[w],a,s))return!1;if(!a.part&&p.length-E!==n(e).length)return!1;if(a.symbols!==!1){const w=i(u),c=new Set(i(e));for(const h of w){if(!a.skip||!a.skip.includes(h)){if(l(u,h)){if(!l(e,h)||!r(u[h],e[h],a,s))return!1}else if(l(e,h))return!1}c.delete(h)}for(const h of c)if(l(e,h))return!1}return!0},y.SeenEntry=class{constructor(d,u){this.obj=d,this.ref=u}isSame(d,u){return this.obj===d&&this.ref===u}}},7916:(A,S,v)=>{const o=v(8761);A.exports=class extends Error{constructor(y){super(y.filter(d=>d!=="").map(d=>typeof d=="string"?d:d instanceof Error?d.message:o(d)).join(" ")||"Unknown error"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,S.assert)}}},5277:A=>{const S={};A.exports=function(v){if(!v)return"";let o="";for(let y=0;y<v.length;++y){const d=v.charCodeAt(y);S.isSafe(d)?o+=v[y]:o+=S.escapeHtmlChar(d)}return o},S.escapeHtmlChar=function(v){return S.namedHtml.get(v)||(v>=256?"&#"+v+";":`&#x${v.toString(16).padStart(2,"0")};`)},S.isSafe=function(v){return S.safeCharCodes.has(v)},S.namedHtml=new Map([[38,"&"],[60,"<"],[62,">"],[34,"""],[160," "],[162,"¢"],[163,"£"],[164,"¤"],[169,"©"],[174,"®"]]),S.safeCharCodes=function(){const v=new Set;for(let o=32;o<123;++o)(o>=97||o>=65&&o<=90||o>=48&&o<=57||o===32||o===46||o===44||o===45||o===58||o===95)&&v.add(o);return v}()},6064:A=>{A.exports=function(S){return S.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g,"\\$&")}},738:A=>{A.exports=function(){}},1687:(A,S,v)=>{const o=v(375),y=v(8571),d=v(7043),u={};A.exports=u.merge=function(e,a,s){if(o(e&&typeof e=="object","Invalid target value: must be an object"),o(a==null||typeof a=="object","Invalid source value: must be null, undefined, or an object"),!a)return e;if(s=Object.assign({nullOverride:!0,mergeArrays:!0},s),Array.isArray(a)){o(Array.isArray(e),"Cannot merge array onto an object"),s.mergeArrays||(e.length=0);for(let t=0;t<a.length;++t)e.push(y(a[t],{symbols:s.symbols}));return e}const r=d.keys(a,s);for(let t=0;t<r.length;++t){const l=r[t];if(l==="__proto__"||!Object.prototype.propertyIsEnumerable.call(a,l))continue;const n=a[l];if(n&&typeof n=="object"){if(e[l]===n)continue;!e[l]||typeof e[l]!="object"||Array.isArray(e[l])!==Array.isArray(n)||n instanceof Date||n instanceof RegExp?e[l]=y(n,{symbols:s.symbols}):u.merge(e[l],n,s)}else(n!=null||s.nullOverride)&&(e[l]=n)}return e}},9621:(A,S,v)=>{const o=v(375),y={};A.exports=function(d,u,e){if(u===!1||u==null)return d;typeof(e=e||{})=="string"&&(e={separator:e});const a=Array.isArray(u);o(!a||!e.separator,"Separator option is not valid for array-based chain");const s=a?u:u.split(e.separator||".");let r=d;for(let t=0;t<s.length;++t){let l=s[t];const n=e.iterables&&y.iterables(r);if(Array.isArray(r)||n==="set"){const i=Number(l);Number.isInteger(i)&&(l=i<0?r.length+i:i)}if(!r||typeof r=="function"&&e.functions===!1||!n&&r[l]===void 0){o(!e.strict||t+1===s.length,"Missing segment",l,"in reach path ",u),o(typeof r=="object"||e.functions===!0||typeof r!="function","Invalid segment",l,"in reach path ",u),r=e.default;break}r=n?n==="set"?[...r][l]:r.get(l):r[l]}return r},y.iterables=function(d){return d instanceof Set?"set":d instanceof Map?"map":void 0}},8761:A=>{A.exports=function(...S){try{return JSON.stringify(...S)}catch(v){return"[Cannot display object: "+v.message+"]"}}},4277:(A,S)=>{const v={};S=A.exports={array:Array.prototype,buffer:!1,date:Date.prototype,error:Error.prototype,generic:Object.prototype,map:Map.prototype,promise:Promise.prototype,regex:RegExp.prototype,set:Set.prototype,weakMap:WeakMap.prototype,weakSet:WeakSet.prototype},v.typeMap=new Map([["[object Error]",S.error],["[object Map]",S.map],["[object Promise]",S.promise],["[object Set]",S.set],["[object WeakMap]",S.weakMap],["[object WeakSet]",S.weakSet]]),S.getInternalProto=function(o){if(Array.isArray(o))return S.array;if(o instanceof Date)return S.date;if(o instanceof RegExp)return S.regex;if(o instanceof Error)return S.error;const y=Object.prototype.toString.call(o);return v.typeMap.get(y)||S.generic}},7043:(A,S)=>{S.keys=function(v,o={}){return o.symbols!==!1?Reflect.ownKeys(v):Object.getOwnPropertyNames(v)}},3652:(A,S,v)=>{const o=v(375),y={};S.Sorter=class{constructor(){this._items=[],this.nodes=[]}add(d,u){const e=[].concat((u=u||{}).before||[]),a=[].concat(u.after||[]),s=u.group||"?",r=u.sort||0;o(!e.includes(s),`Item cannot come before itself: ${s}`),o(!e.includes("?"),"Item cannot come before unassociated items"),o(!a.includes(s),`Item cannot come after itself: ${s}`),o(!a.includes("?"),"Item cannot come after unassociated items"),Array.isArray(d)||(d=[d]);for(const t of d){const l={seq:this._items.length,sort:r,before:e,after:a,group:s,node:t};this._items.push(l)}if(!u.manual){const t=this._sort();o(t,"item",s!=="?"?`added into group ${s}`:"","created a dependencies error")}return this.nodes}merge(d){Array.isArray(d)||(d=[d]);for(const e of d)if(e)for(const a of e._items)this._items.push(Object.assign({},a));this._items.sort(y.mergeSort);for(let e=0;e<this._items.length;++e)this._items[e].seq=e;const u=this._sort();return o(u,"merge created a dependencies error"),this.nodes}sort(){const d=this._sort();return o(d,"sort created a dependencies error"),this.nodes}_sort(){const d={},u=Object.create(null),e=Object.create(null);for(const l of this._items){const n=l.seq,i=l.group;e[i]=e[i]||[],e[i].push(n),d[n]=l.before;for(const f of l.after)u[f]=u[f]||[],u[f].push(n)}for(const l in d){const n=[];for(const i in d[l]){const f=d[l][i];e[f]=e[f]||[],n.push(...e[f])}d[l]=n}for(const l in u)if(e[l])for(const n of e[l])d[n].push(...u[l]);const a={};for(const l in d){const n=d[l];for(const i of n)a[i]=a[i]||[],a[i].push(l)}const s={},r=[];for(let l=0;l<this._items.length;++l){let n=l;if(a[l]){n=null;for(let i=0;i<this._items.length;++i){if(s[i]===!0)continue;a[i]||(a[i]=[]);const f=a[i].length;let m=0;for(let p=0;p<f;++p)s[a[i][p]]&&++m;if(m===f){n=i;break}}}n!==null&&(s[n]=!0,r.push(n))}if(r.length!==this._items.length)return!1;const t={};for(const l of this._items)t[l.seq]=l;this._items=[],this.nodes=[];for(const l of r){const n=t[l];this.nodes.push(n.node),this._items.push(n)}return!0}},y.mergeSort=(d,u)=>d.sort===u.sort?0:d.sort<u.sort?-1:1},5380:(A,S,v)=>{const o=v(443),y=v(2178),d={minDomainSegments:2,nonAsciiRx:/[^\x00-\x7f]/,domainControlRx:/[\x00-\x20@\:\/\\#!\$&\'\(\)\*\+,;=\?]/,tldSegmentRx:/^[a-zA-Z](?:[a-zA-Z0-9\-]*[a-zA-Z0-9])?$/,domainSegmentRx:/^[a-zA-Z0-9](?:[a-zA-Z0-9\-]*[a-zA-Z0-9])?$/,URL:o.URL||URL};S.analyze=function(u,e={}){if(!u)return y.code("DOMAIN_NON_EMPTY_STRING");if(typeof u!="string")throw new Error("Invalid input: domain must be a string");if(u.length>256)return y.code("DOMAIN_TOO_LONG");if(d.nonAsciiRx.test(u)){if(e.allowUnicode===!1)return y.code("DOMAIN_INVALID_UNICODE_CHARS");u=u.normalize("NFC")}if(d.domainControlRx.test(u))return y.code("DOMAIN_INVALID_CHARS");u=d.punycode(u),e.allowFullyQualified&&u[u.length-1]==="."&&(u=u.slice(0,-1));const a=e.minDomainSegments||d.minDomainSegments,s=u.split(".");if(s.length<a)return y.code("DOMAIN_SEGMENTS_COUNT");if(e.maxDomainSegments&&s.length>e.maxDomainSegments)return y.code("DOMAIN_SEGMENTS_COUNT_MAX");const r=e.tlds;if(r){const t=s[s.length-1].toLowerCase();if(r.deny&&r.deny.has(t)||r.allow&&!r.allow.has(t))return y.code("DOMAIN_FORBIDDEN_TLDS")}for(let t=0;t<s.length;++t){const l=s[t];if(!l.length)return y.code("DOMAIN_EMPTY_SEGMENT");if(l.length>63)return y.code("DOMAIN_LONG_SEGMENT");if(t<s.length-1){if(!d.domainSegmentRx.test(l))return y.code("DOMAIN_INVALID_CHARS")}else if(!d.tldSegmentRx.test(l))return y.code("DOMAIN_INVALID_TLDS_CHARS")}return null},S.isValid=function(u,e){return!S.analyze(u,e)},d.punycode=function(u){u.includes("%")&&(u=u.replace(/%/g,"%25"));try{return new d.URL(`http://${u}`).host}catch{return u}}},1745:(A,S,v)=>{const o=v(9848),y=v(5380),d=v(2178),u={nonAsciiRx:/[^\x00-\x7f]/,encoder:new(o.TextEncoder||TextEncoder)};S.analyze=function(e,a){return u.email(e,a)},S.isValid=function(e,a){return!u.email(e,a)},u.email=function(e,a={}){if(typeof e!="string")throw new Error("Invalid input: email must be a string");if(!e)return d.code("EMPTY_STRING");const s=!u.nonAsciiRx.test(e);if(!s){if(a.allowUnicode===!1)return d.code("FORBIDDEN_UNICODE");e=e.normalize("NFC")}const r=e.split("@");if(r.length!==2)return r.length>2?d.code("MULTIPLE_AT_CHAR"):d.code("MISSING_AT_CHAR");const[t,l]=r;if(!t)return d.code("EMPTY_LOCAL");if(!a.ignoreLength){if(e.length>254)return d.code("ADDRESS_TOO_LONG");if(u.encoder.encode(t).length>64)return d.code("LOCAL_TOO_LONG")}return u.local(t,s)||y.analyze(l,a)},u.local=function(e,a){const s=e.split(".");for(const r of s){if(!r.length)return d.code("EMPTY_LOCAL_SEGMENT");if(a){if(!u.atextRx.test(r))return d.code("INVALID_LOCAL_CHARS")}else for(const t of r){if(u.atextRx.test(t))continue;const l=u.binary(t);if(!u.atomRx.test(l))return d.code("INVALID_LOCAL_CHARS")}}},u.binary=function(e){return Array.from(u.encoder.encode(e)).map(a=>String.fromCharCode(a)).join("")},u.atextRx=/^[\w!#\$%&'\*\+\-/=\?\^`\{\|\}~]+$/,u.atomRx=new RegExp(["(?:[\\xc2-\\xdf][\\x80-\\xbf])","(?:\\xe0[\\xa0-\\xbf][\\x80-\\xbf])|(?:[\\xe1-\\xec][\\x80-\\xbf]{2})|(?:\\xed[\\x80-\\x9f][\\x80-\\xbf])|(?:[\\xee-\\xef][\\x80-\\xbf]{2})","(?:\\xf0[\\x90-\\xbf][\\x80-\\xbf]{2})|(?:[\\xf1-\\xf3][\\x80-\\xbf]{3})|(?:\\xf4[\\x80-\\x8f][\\x80-\\xbf]{2})"].join("|"))},2178:(A,S)=>{S.codes={EMPTY_STRING:"Address must be a non-empty string",FORBIDDEN_UNICODE:"Address contains forbidden Unicode characters",MULTIPLE_AT_CHAR:"Address cannot contain more than one @ character",MISSING_AT_CHAR:"Address must contain one @ character",EMPTY_LOCAL:"Address local part cannot be empty",ADDRESS_TOO_LONG:"Address too long",LOCAL_TOO_LONG:"Address local part too long",EMPTY_LOCAL_SEGMENT:"Address local part contains empty dot-separated segment",INVALID_LOCAL_CHARS:"Address local part contains invalid character",DOMAIN_NON_EMPTY_STRING:"Domain must be a non-empty string",DOMAIN_TOO_LONG:"Domain too long",DOMAIN_INVALID_UNICODE_CHARS:"Domain contains forbidden Unicode characters",DOMAIN_INVALID_CHARS:"Domain contains invalid character",DOMAIN_INVALID_TLDS_CHARS:"Domain contains invalid tld character",DOMAIN_SEGMENTS_COUNT:"Domain lacks the minimum required number of segments",DOMAIN_SEGMENTS_COUNT_MAX:"Domain contains too many segments",DOMAIN_FORBIDDEN_TLDS:"Domain uses forbidden TLD",DOMAIN_EMPTY_SEGMENT:"Domain contains empty dot-separated segment",DOMAIN_LONG_SEGMENT:"Domain contains dot-separated segment that is too long"},S.code=function(v){return{code:v,error:S.codes[v]}}},9959:(A,S,v)=>{const o=v(375),y=v(5752);S.regex=function(d={}){o(d.cidr===void 0||typeof d.cidr=="string","options.cidr must be a string");const u=d.cidr?d.cidr.toLowerCase():"optional";o(["required","optional","forbidden"].includes(u),"options.cidr must be one of required, optional, forbidden"),o(d.version===void 0||typeof d.version=="string"||Array.isArray(d.version),"options.version must be a string or an array of string");let e=d.version||["ipv4","ipv6","ipvfuture"];Array.isArray(e)||(e=[e]),o(e.length>=1,"options.version must have at least 1 version specified");for(let r=0;r<e.length;++r)o(typeof e[r]=="string","options.version must only contain strings"),e[r]=e[r].toLowerCase(),o(["ipv4","ipv6","ipvfuture"].includes(e[r]),"options.version contains unknown version "+e[r]+" - must be one of ipv4, ipv6, ipvfuture");e=Array.from(new Set(e));const a=`(?:${e.map(r=>{if(u==="forbidden")return y.ip[r];const t=`\\/${r==="ipv4"?y.ip.v4Cidr:y.ip.v6Cidr}`;return u==="required"?`${y.ip[r]}${t}`:`${y.ip[r]}(?:${t})?`}).join("|")})`,s=new RegExp(`^${a}$`);return{cidr:u,versions:e,regex:s,raw:a}}},5752:(A,S,v)=>{const o=v(375),y=v(6064),d={generate:function(){const u={},e="\\dA-Fa-f",a="["+e+"]",s="\\w-\\.~",r="!\\$&'\\(\\)\\*\\+,;=",t="%"+e,l=s+t+r+":@",n="["+l+"]",i="(?:0{0,2}\\d|0?[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])";u.ipv4address="(?:"+i+"\\.){3}"+i;const f=a+"{1,4}",m="(?:"+f+":"+f+"|"+u.ipv4address+")",p="(?:"+f+":){6}"+m,E="::(?:"+f+":){5}"+m,w="(?:"+f+")?::(?:"+f+":){4}"+m,c="(?:(?:"+f+":){0,1}"+f+")?::(?:"+f+":){3}"+m,h="(?:(?:"+f+":){0,2}"+f+")?::(?:"+f+":){2}"+m,g="(?:(?:"+f+":){0,3}"+f+")?::"+f+":"+m,O="(?:(?:"+f+":){0,4}"+f+")?::"+m,k="(?:(?:"+f+":){0,5}"+f+")?::"+f,N="(?:(?:"+f+":){0,6}"+f+")?::";u.ipv4Cidr="(?:\\d|[1-2]\\d|3[0-2])",u.ipv6Cidr="(?:0{0,2}\\d|0?[1-9]\\d|1[01]\\d|12[0-8])",u.ipv6address="(?:"+p+"|"+E+"|"+w+"|"+c+"|"+h+"|"+g+"|"+O+"|"+k+"|"+N+")",u.ipvFuture="v"+a+"+\\.["+s+r+":]+",u.scheme="[a-zA-Z][a-zA-Z\\d+-\\.]*",u.schemeRegex=new RegExp(u.scheme);const D="["+s+t+r+":]*",M="["+s+t+r+"]{1,255}",z="(?:\\[(?:"+u.ipv6address+"|"+u.ipvFuture+")\\]|"+u.ipv4address+"|"+M+")",B="(?:"+D+"@)?"+z+"(?::\\d*)?",K="(?:"+D+"@)?("+z+")(?::\\d*)?",Q=n+"*",W=n+"+",V="(?:\\/"+Q+")*",Z="\\/(?:"+W+V+")?",J=W+V,te="["+s+t+r+"@]+"+V,ce="(?:\\/\\/\\/"+Q+V+")";return u.hierPart="(?:(?:\\/\\/"+B+V+")|"+Z+"|"+J+"|"+ce+")",u.hierPartCapture="(?:(?:\\/\\/"+K+V+")|"+Z+"|"+J+")",u.relativeRef="(?:(?:\\/\\/"+B+V+")|"+Z+"|"+te+"|)",u.relativeRefCapture="(?:(?:\\/\\/"+K+V+")|"+Z+"|"+te+"|)",u.query="["+l+"\\/\\?]*(?=#|$)",u.queryWithSquareBrackets="["+l+"\\[\\]\\/\\?]*(?=#|$)",u.fragment="["+l+"\\/\\?]*",u}};d.rfc3986=d.generate(),S.ip={v4Cidr:d.rfc3986.ipv4Cidr,v6Cidr:d.rfc3986.ipv6Cidr,ipv4:d.rfc3986.ipv4address,ipv6:d.rfc3986.ipv6address,ipvfuture:d.rfc3986.ipvFuture},d.createRegex=function(u){const e=d.rfc3986,a="(?:\\?"+(u.allowQuerySquareBrackets?e.queryWithSquareBrackets:e.query)+")?(?:#"+e.fragment+")?",s=u.domain?e.relativeRefCapture:e.relativeRef;if(u.relativeOnly)return d.wrap(s+a);let r="";if(u.scheme){o(u.scheme instanceof RegExp||typeof u.scheme=="string"||Array.isArray(u.scheme),"scheme must be a RegExp, String, or Array");const n=[].concat(u.scheme);o(n.length>=1,"scheme must have at least 1 scheme specified");const i=[];for(let f=0;f<n.length;++f){const m=n[f];o(m instanceof RegExp||typeof m=="string","scheme at position "+f+" must be a RegExp or String"),m instanceof RegExp?i.push(m.source.toString()):(o(e.schemeRegex.test(m),"scheme at position "+f+" must be a valid scheme"),i.push(y(m)))}r=i.join("|")}const t="(?:"+(r?"(?:"+r+")":e.scheme)+":"+(u.domain?e.hierPartCapture:e.hierPart)+")",l=u.allowRelative?"(?:"+t+"|"+s+")":t;return d.wrap(l+a,r)},d.wrap=function(u,e){return{raw:u=`(?=.)(?!https?:/(?:$|[^/]))(?!https?:///)(?!https?:[^/])${u}`,regex:new RegExp(`^${u}$`),scheme:e}},d.uriRegex=d.createRegex({}),S.regex=function(u={}){return u.scheme||u.allowRelative||u.relativeOnly||u.allowQuerySquareBrackets||u.domain?d.createRegex(u):d.uriRegex}},1447:(A,S)=>{const v={operators:["!","^","*","/","%","+","-","<","<=",">",">=","==","!=","&&","||","??"],operatorCharacters:["!","^","*","/","%","+","-","<","=",">","&","|","?"],operatorsOrder:[["^"],["*","/","%"],["+","-"],["<","<=",">",">="],["==","!="],["&&"],["||","??"]],operatorsPrefix:["!","n"],literals:{'"':'"',"`":"`","'":"'","[":"]"},numberRx:/^(?:[0-9]*(\.[0-9]*)?){1}$/,tokenRx:/^[\w\$\#\.\@\:\{\}]+$/,symbol:Symbol("formula"),settings:Symbol("settings")};S.Parser=class{constructor(o,y={}){if(!y[v.settings]&&y.constants)for(const d in y.constants){const u=y.constants[d];if(u!==null&&!["boolean","number","string"].includes(typeof u))throw new Error(`Formula constant ${d} contains invalid ${typeof u} value type`)}this.settings=y[v.settings]?y:Object.assign({[v.settings]:!0,constants:{},functions:{}},y),this.single=null,this._parts=null,this._parse(o)}_parse(o){let y=[],d="",u=0,e=!1;const a=r=>{if(u)throw new Error("Formula missing closing parenthesis");const t=y.length?y[y.length-1]:null;if(e||d||r){if(t&&t.type==="reference"&&r===")")return t.type="function",t.value=this._subFormula(d,t.value),void(d="");if(r===")"){const l=new S.Parser(d,this.settings);y.push({type:"segment",value:l})}else if(e){if(e==="]")return y.push({type:"reference",value:d}),void(d="");y.push({type:"literal",value:d})}else if(v.operatorCharacters.includes(d))t&&t.type==="operator"&&v.operators.includes(t.value+d)?t.value+=d:y.push({type:"operator",value:d});else if(d.match(v.numberRx))y.push({type:"constant",value:parseFloat(d)});else if(this.settings.constants[d]!==void 0)y.push({type:"constant",value:this.settings.constants[d]});else{if(!d.match(v.tokenRx))throw new Error(`Formula contains invalid token: ${d}`);y.push({type:"reference",value:d})}d=""}};for(const r of o)e?r===e?(a(),e=!1):d+=r:u?r==="("?(d+=r,++u):r===")"?(--u,u?d+=r:a(r)):d+=r:r in v.literals?e=v.literals[r]:r==="("?(a(),++u):v.operatorCharacters.includes(r)?(a(),d=r,a()):r!==" "?d+=r:a();a(),y=y.map((r,t)=>r.type!=="operator"||r.value!=="-"||t&&y[t-1].type!=="operator"?r:{type:"operator",value:"n"});let s=!1;for(const r of y){if(r.type==="operator"){if(v.operatorsPrefix.includes(r.value))continue;if(!s)throw new Error("Formula contains an operator in invalid position");if(!v.operators.includes(r.value))throw new Error(`Formula contains an unknown operator ${r.value}`)}else if(s)throw new Error("Formula missing expected operator");s=!s}if(!s)throw new Error("Formula contains invalid trailing operator");y.length===1&&["reference","literal","constant"].includes(y[0].type)&&(this.single={type:y[0].type==="reference"?"reference":"value",value:y[0].value}),this._parts=y.map(r=>{if(r.type==="operator")return v.operatorsPrefix.includes(r.value)?r:r.value;if(r.type!=="reference")return r.value;if(this.settings.tokenRx&&!this.settings.tokenRx.test(r.value))throw new Error(`Formula contains invalid reference ${r.value}`);return this.settings.reference?this.settings.reference(r.value):v.reference(r.value)})}_subFormula(o,y){const d=this.settings.functions[y];if(typeof d!="function")throw new Error(`Formula contains unknown function ${y}`);let u=[];if(o){let e="",a=0,s=!1;const r=()=>{if(!e)throw new Error(`Formula contains function ${y} with invalid arguments ${o}`);u.push(e),e=""};for(let t=0;t<o.length;++t){const l=o[t];s?(e+=l,l===s&&(s=!1)):l in v.literals&&!a?(e+=l,s=v.literals[l]):l!==","||a?(e+=l,l==="("?++a:l===")"&&--a):r()}r()}return u=u.map(e=>new S.Parser(e,this.settings)),function(e){const a=[];for(const s of u)a.push(s.evaluate(e));return d.call(e,...a)}}evaluate(o){const y=this._parts.slice();for(let d=y.length-2;d>=0;--d){const u=y[d];if(u&&u.type==="operator"){const e=y[d+1];y.splice(d+1,1);const a=v.evaluate(e,o);y[d]=v.single(u.value,a)}}return v.operatorsOrder.forEach(d=>{for(let u=1;u<y.length-1;)if(d.includes(y[u])){const e=y[u],a=v.evaluate(y[u-1],o),s=v.evaluate(y[u+1],o);y.splice(u,2);const r=v.calculate(e,a,s);y[u-1]=r===0?0:r}else u+=2}),v.evaluate(y[0],o)}},S.Parser.prototype[v.symbol]=!0,v.reference=function(o){return function(y){return y&&y[o]!==void 0?y[o]:null}},v.evaluate=function(o,y){return o===null?null:typeof o=="function"?o(y):o[v.symbol]?o.evaluate(y):o},v.single=function(o,y){if(o==="!")return!y;const d=-y;return d===0?0:d},v.calculate=function(o,y,d){if(o==="??")return v.exists(y)?y:d;if(typeof y=="string"||typeof d=="string"){if(o==="+")return(y=v.exists(y)?y:"")+(v.exists(d)?d:"")}else switch(o){case"^":return Math.pow(y,d);case"*":return y*d;case"/":return y/d;case"%":return y%d;case"+":return y+d;case"-":return y-d}switch(o){case"<":return y<d;case"<=":return y<=d;case">":return y>d;case">=":return y>=d;case"==":return y===d;case"!=":return y!==d;case"&&":return y&&d;case"||":return y||d}return null},v.exists=function(o){return o!=null}},9926:()=>{},5688:()=>{},9708:()=>{},1152:()=>{},443:()=>{},9848:()=>{},5934:A=>{A.exports=JSON.parse('{"version":"17.12.2"}')}},L={},function A(S){var v=L[S];if(v!==void 0)return v.exports;var o=L[S]={exports:{}};return T[S](o,o.exports,A),o.exports}(5107);var T,L})})(et);var tt=et.exports;const er=["ᄀ-ᇹ"," -〿","ぁ-ゔ","゙-ゞ","ァ-ヾ","ㄱ-ㆎ","㆐-㆟","㈀-㈜","㈠-㉃","㉠-㊰","㋀-㍶","㍻-㏝","㏠-㏾","一-龥","가-힣","-","豈-鶴"],tr=["︰-﹄","﹉-﹒","﹔-﹫","!-~","¢-₩"];var rr={charsWide:er,charsFullWidth:tr};const{charsWide:nr,charsFullWidth:sr}=rr,rt=new RegExp(`[${nr.join("")}${sr.join("")}]`,"g"),ar=R=>R.replace(rt,"xx").length;var ir={default:ar,charsRegex:rt};/*!
|
|
2
|
+
* is-extglob <https://github.com/jonschlinkert/is-extglob>
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2014-2016, Jon Schlinkert.
|
|
5
|
+
* Licensed under the MIT License.
|
|
6
|
+
*/var or=function($){if(typeof $!="string"||$==="")return!1;for(var T;T=/(\\).|([@?!+*]\(.*\))/g.exec($);){if(T[2])return!0;$=$.slice(T.index+T[0].length)}return!1};/*!
|
|
7
|
+
* is-glob <https://github.com/jonschlinkert/is-glob>
|
|
8
|
+
*
|
|
9
|
+
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
10
|
+
* Released under the MIT License.
|
|
11
|
+
*/var lr=or,nt={"{":"}","(":")","[":"]"},cr=function(R){if(R[0]==="!")return!0;for(var $=0,T=-2,L=-2,A=-2,S=-2,v=-2;$<R.length;){if(R[$]==="*"||R[$+1]==="?"&&/[\].+)]/.test(R[$])||L!==-1&&R[$]==="["&&R[$+1]!=="]"&&(L<$&&(L=R.indexOf("]",$)),L>$&&(v===-1||v>L||(v=R.indexOf("\\",$),v===-1||v>L)))||A!==-1&&R[$]==="{"&&R[$+1]!=="}"&&(A=R.indexOf("}",$),A>$&&(v=R.indexOf("\\",$),v===-1||v>A))||S!==-1&&R[$]==="("&&R[$+1]==="?"&&/[:!=]/.test(R[$+2])&&R[$+3]!==")"&&(S=R.indexOf(")",$),S>$&&(v=R.indexOf("\\",$),v===-1||v>S))||T!==-1&&R[$]==="("&&R[$+1]!=="|"&&(T<$&&(T=R.indexOf("|",$)),T!==-1&&R[T+1]!==")"&&(S=R.indexOf(")",T),S>T&&(v=R.indexOf("\\",T),v===-1||v>S))))return!0;if(R[$]==="\\"){var o=R[$+1];$+=2;var y=nt[o];if(y){var d=R.indexOf(y,$);d!==-1&&($=d+1)}if(R[$]==="!")return!0}else $++}return!1},ur=function(R){if(R[0]==="!")return!0;for(var $=0;$<R.length;){if(/[*?{}()[\]]/.test(R[$]))return!0;if(R[$]==="\\"){var T=R[$+1];$+=2;var L=nt[T];if(L){var A=R.indexOf(L,$);A!==-1&&($=A+1)}if(R[$]==="!")return!0}else $++}return!1},fr=function($,T){if(typeof $!="string"||$==="")return!1;if(lr($))return!0;var L=cr;return T&&T.strict===!1&&(L=ur),L($)},Ie={exports:{}};(function(R,$){var T={};$=R.exports=c;var L;typeof Gt=="object"&&T&&T.NODE_DEBUG&&/\bsemver\b/i.test(T.NODE_DEBUG)?L=function(){var b=Array.prototype.slice.call(arguments,0);b.unshift("SEMVER"),console.log.apply(console,b)}:L=function(){},$.SEMVER_SPEC_VERSION="2.0.0";var A=256,S=Number.MAX_SAFE_INTEGER||9007199254740991,v=16,o=A-6,y=$.re=[],d=$.safeRe=[],u=$.src=[],e=$.tokens={},a=0;function s(b){e[b]=a++}var r="[a-zA-Z0-9-]",t=[["\\s",1],["\\d",A],[r,o]];function l(b){for(var x=0;x<t.length;x++){var I=t[x][0],j=t[x][1];b=b.split(I+"*").join(I+"{0,"+j+"}").split(I+"+").join(I+"{1,"+j+"}")}return b}s("NUMERICIDENTIFIER"),u[e.NUMERICIDENTIFIER]="0|[1-9]\\d*",s("NUMERICIDENTIFIERLOOSE"),u[e.NUMERICIDENTIFIERLOOSE]="\\d+",s("NONNUMERICIDENTIFIER"),u[e.NONNUMERICIDENTIFIER]="\\d*[a-zA-Z-]"+r+"*",s("MAINVERSION"),u[e.MAINVERSION]="("+u[e.NUMERICIDENTIFIER]+")\\.("+u[e.NUMERICIDENTIFIER]+")\\.("+u[e.NUMERICIDENTIFIER]+")",s("MAINVERSIONLOOSE"),u[e.MAINVERSIONLOOSE]="("+u[e.NUMERICIDENTIFIERLOOSE]+")\\.("+u[e.NUMERICIDENTIFIERLOOSE]+")\\.("+u[e.NUMERICIDENTIFIERLOOSE]+")",s("PRERELEASEIDENTIFIER"),u[e.PRERELEASEIDENTIFIER]="(?:"+u[e.NUMERICIDENTIFIER]+"|"+u[e.NONNUMERICIDENTIFIER]+")",s("PRERELEASEIDENTIFIERLOOSE"),u[e.PRERELEASEIDENTIFIERLOOSE]="(?:"+u[e.NUMERICIDENTIFIERLOOSE]+"|"+u[e.NONNUMERICIDENTIFIER]+")",s("PRERELEASE"),u[e.PRERELEASE]="(?:-("+u[e.PRERELEASEIDENTIFIER]+"(?:\\."+u[e.PRERELEASEIDENTIFIER]+")*))",s("PRERELEASELOOSE"),u[e.PRERELEASELOOSE]="(?:-?("+u[e.PRERELEASEIDENTIFIERLOOSE]+"(?:\\."+u[e.PRERELEASEIDENTIFIERLOOSE]+")*))",s("BUILDIDENTIFIER"),u[e.BUILDIDENTIFIER]=r+"+",s("BUILD"),u[e.BUILD]="(?:\\+("+u[e.BUILDIDENTIFIER]+"(?:\\."+u[e.BUILDIDENTIFIER]+")*))",s("FULL"),s("FULLPLAIN"),u[e.FULLPLAIN]="v?"+u[e.MAINVERSION]+u[e.PRERELEASE]+"?"+u[e.BUILD]+"?",u[e.FULL]="^"+u[e.FULLPLAIN]+"$",s("LOOSEPLAIN"),u[e.LOOSEPLAIN]="[v=\\s]*"+u[e.MAINVERSIONLOOSE]+u[e.PRERELEASELOOSE]+"?"+u[e.BUILD]+"?",s("LOOSE"),u[e.LOOSE]="^"+u[e.LOOSEPLAIN]+"$",s("GTLT"),u[e.GTLT]="((?:<|>)?=?)",s("XRANGEIDENTIFIERLOOSE"),u[e.XRANGEIDENTIFIERLOOSE]=u[e.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*",s("XRANGEIDENTIFIER"),u[e.XRANGEIDENTIFIER]=u[e.NUMERICIDENTIFIER]+"|x|X|\\*",s("XRANGEPLAIN"),u[e.XRANGEPLAIN]="[v=\\s]*("+u[e.XRANGEIDENTIFIER]+")(?:\\.("+u[e.XRANGEIDENTIFIER]+")(?:\\.("+u[e.XRANGEIDENTIFIER]+")(?:"+u[e.PRERELEASE]+")?"+u[e.BUILD]+"?)?)?",s("XRANGEPLAINLOOSE"),u[e.XRANGEPLAINLOOSE]="[v=\\s]*("+u[e.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+u[e.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+u[e.XRANGEIDENTIFIERLOOSE]+")(?:"+u[e.PRERELEASELOOSE]+")?"+u[e.BUILD]+"?)?)?",s("XRANGE"),u[e.XRANGE]="^"+u[e.GTLT]+"\\s*"+u[e.XRANGEPLAIN]+"$",s("XRANGELOOSE"),u[e.XRANGELOOSE]="^"+u[e.GTLT]+"\\s*"+u[e.XRANGEPLAINLOOSE]+"$",s("COERCE"),u[e.COERCE]="(^|[^\\d])(\\d{1,"+v+"})(?:\\.(\\d{1,"+v+"}))?(?:\\.(\\d{1,"+v+"}))?(?:$|[^\\d])",s("COERCERTL"),y[e.COERCERTL]=new RegExp(u[e.COERCE],"g"),d[e.COERCERTL]=new RegExp(l(u[e.COERCE]),"g"),s("LONETILDE"),u[e.LONETILDE]="(?:~>?)",s("TILDETRIM"),u[e.TILDETRIM]="(\\s*)"+u[e.LONETILDE]+"\\s+",y[e.TILDETRIM]=new RegExp(u[e.TILDETRIM],"g"),d[e.TILDETRIM]=new RegExp(l(u[e.TILDETRIM]),"g");var n="$1~";s("TILDE"),u[e.TILDE]="^"+u[e.LONETILDE]+u[e.XRANGEPLAIN]+"$",s("TILDELOOSE"),u[e.TILDELOOSE]="^"+u[e.LONETILDE]+u[e.XRANGEPLAINLOOSE]+"$",s("LONECARET"),u[e.LONECARET]="(?:\\^)",s("CARETTRIM"),u[e.CARETTRIM]="(\\s*)"+u[e.LONECARET]+"\\s+",y[e.CARETTRIM]=new RegExp(u[e.CARETTRIM],"g"),d[e.CARETTRIM]=new RegExp(l(u[e.CARETTRIM]),"g");var i="$1^";s("CARET"),u[e.CARET]="^"+u[e.LONECARET]+u[e.XRANGEPLAIN]+"$",s("CARETLOOSE"),u[e.CARETLOOSE]="^"+u[e.LONECARET]+u[e.XRANGEPLAINLOOSE]+"$",s("COMPARATORLOOSE"),u[e.COMPARATORLOOSE]="^"+u[e.GTLT]+"\\s*("+u[e.LOOSEPLAIN]+")$|^$",s("COMPARATOR"),u[e.COMPARATOR]="^"+u[e.GTLT]+"\\s*("+u[e.FULLPLAIN]+")$|^$",s("COMPARATORTRIM"),u[e.COMPARATORTRIM]="(\\s*)"+u[e.GTLT]+"\\s*("+u[e.LOOSEPLAIN]+"|"+u[e.XRANGEPLAIN]+")",y[e.COMPARATORTRIM]=new RegExp(u[e.COMPARATORTRIM],"g"),d[e.COMPARATORTRIM]=new RegExp(l(u[e.COMPARATORTRIM]),"g");var f="$1$2$3";s("HYPHENRANGE"),u[e.HYPHENRANGE]="^\\s*("+u[e.XRANGEPLAIN]+")\\s+-\\s+("+u[e.XRANGEPLAIN]+")\\s*$",s("HYPHENRANGELOOSE"),u[e.HYPHENRANGELOOSE]="^\\s*("+u[e.XRANGEPLAINLOOSE]+")\\s+-\\s+("+u[e.XRANGEPLAINLOOSE]+")\\s*$",s("STAR"),u[e.STAR]="(<|>)?=?\\s*\\*";for(var m=0;m<a;m++)L(m,u[m]),y[m]||(y[m]=new RegExp(u[m]),d[m]=new RegExp(l(u[m])));$.parse=p;function p(b,x){if((!x||typeof x!="object")&&(x={loose:!!x,includePrerelease:!1}),b instanceof c)return b;if(typeof b!="string"||b.length>A)return null;var I=x.loose?d[e.LOOSE]:d[e.FULL];if(!I.test(b))return null;try{return new c(b,x)}catch{return null}}$.valid=E;function E(b,x){var I=p(b,x);return I?I.version:null}$.clean=w;function w(b,x){var I=p(b.trim().replace(/^[=v]+/,""),x);return I?I.version:null}$.SemVer=c;function c(b,x){if((!x||typeof x!="object")&&(x={loose:!!x,includePrerelease:!1}),b instanceof c){if(b.loose===x.loose)return b;b=b.version}else if(typeof b!="string")throw new TypeError("Invalid Version: "+b);if(b.length>A)throw new TypeError("version is longer than "+A+" characters");if(!(this instanceof c))return new c(b,x);L("SemVer",b,x),this.options=x,this.loose=!!x.loose;var I=b.trim().match(x.loose?d[e.LOOSE]:d[e.FULL]);if(!I)throw new TypeError("Invalid Version: "+b);if(this.raw=b,this.major=+I[1],this.minor=+I[2],this.patch=+I[3],this.major>S||this.major<0)throw new TypeError("Invalid major version");if(this.minor>S||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>S||this.patch<0)throw new TypeError("Invalid patch version");I[4]?this.prerelease=I[4].split(".").map(function(j){if(/^[0-9]+$/.test(j)){var C=+j;if(C>=0&&C<S)return C}return j}):this.prerelease=[],this.build=I[5]?I[5].split("."):[],this.format()}c.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version},c.prototype.toString=function(){return this.version},c.prototype.compare=function(b){return L("SemVer.compare",this.version,this.options,b),b instanceof c||(b=new c(b,this.options)),this.compareMain(b)||this.comparePre(b)},c.prototype.compareMain=function(b){return b instanceof c||(b=new c(b,this.options)),k(this.major,b.major)||k(this.minor,b.minor)||k(this.patch,b.patch)},c.prototype.comparePre=function(b){if(b instanceof c||(b=new c(b,this.options)),this.prerelease.length&&!b.prerelease.length)return-1;if(!this.prerelease.length&&b.prerelease.length)return 1;if(!this.prerelease.length&&!b.prerelease.length)return 0;var x=0;do{var I=this.prerelease[x],j=b.prerelease[x];if(L("prerelease compare",x,I,j),I===void 0&&j===void 0)return 0;if(j===void 0)return 1;if(I===void 0)return-1;if(I===j)continue;return k(I,j)}while(++x)},c.prototype.compareBuild=function(b){b instanceof c||(b=new c(b,this.options));var x=0;do{var I=this.build[x],j=b.build[x];if(L("prerelease compare",x,I,j),I===void 0&&j===void 0)return 0;if(j===void 0)return 1;if(I===void 0)return-1;if(I===j)continue;return k(I,j)}while(++x)},c.prototype.inc=function(b,x){switch(b){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",x);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",x);break;case"prepatch":this.prerelease.length=0,this.inc("patch",x),this.inc("pre",x);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",x),this.inc("pre",x);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{for(var I=this.prerelease.length;--I>=0;)typeof this.prerelease[I]=="number"&&(this.prerelease[I]++,I=-2);I===-1&&this.prerelease.push(0)}x&&(this.prerelease[0]===x?isNaN(this.prerelease[1])&&(this.prerelease=[x,0]):this.prerelease=[x,0]);break;default:throw new Error("invalid increment argument: "+b)}return this.format(),this.raw=this.version,this},$.inc=h;function h(b,x,I,j){typeof I=="string"&&(j=I,I=void 0);try{return new c(b,I).inc(x,j).version}catch{return null}}$.diff=g;function g(b,x){if(ce(b,x))return null;var I=p(b),j=p(x),C="";if(I.prerelease.length||j.prerelease.length){C="pre";var P="prerelease"}for(var F in I)if((F==="major"||F==="minor"||F==="patch")&&I[F]!==j[F])return C+F;return P}$.compareIdentifiers=k;var O=/^[0-9]+$/;function k(b,x){var I=O.test(b),j=O.test(x);return I&&j&&(b=+b,x=+x),b===x?0:I&&!j?-1:j&&!I?1:b<x?-1:1}$.rcompareIdentifiers=N;function N(b,x){return k(x,b)}$.major=D;function D(b,x){return new c(b,x).major}$.minor=M;function M(b,x){return new c(b,x).minor}$.patch=z;function z(b,x){return new c(b,x).patch}$.compare=B;function B(b,x,I){return new c(b,I).compare(new c(x,I))}$.compareLoose=K;function K(b,x){return B(b,x,!0)}$.compareBuild=Q;function Q(b,x,I){var j=new c(b,I),C=new c(x,I);return j.compare(C)||j.compareBuild(C)}$.rcompare=W;function W(b,x,I){return B(x,b,I)}$.sort=V;function V(b,x){return b.sort(function(I,j){return $.compareBuild(I,j,x)})}$.rsort=Z;function Z(b,x){return b.sort(function(I,j){return $.compareBuild(j,I,x)})}$.gt=J;function J(b,x,I){return B(b,x,I)>0}$.lt=te;function te(b,x,I){return B(b,x,I)<0}$.eq=ce;function ce(b,x,I){return B(b,x,I)===0}$.neq=de;function de(b,x,I){return B(b,x,I)!==0}$.gte=ue;function ue(b,x,I){return B(b,x,I)>=0}$.lte=Se;function Se(b,x,I){return B(b,x,I)<=0}$.cmp=we;function we(b,x,I,j){switch(x){case"===":return typeof b=="object"&&(b=b.version),typeof I=="object"&&(I=I.version),b===I;case"!==":return typeof b=="object"&&(b=b.version),typeof I=="object"&&(I=I.version),b!==I;case"":case"=":case"==":return ce(b,I,j);case"!=":return de(b,I,j);case">":return J(b,I,j);case">=":return ue(b,I,j);case"<":return te(b,I,j);case"<=":return Se(b,I,j);default:throw new TypeError("Invalid operator: "+x)}}$.Comparator=ne;function ne(b,x){if((!x||typeof x!="object")&&(x={loose:!!x,includePrerelease:!1}),b instanceof ne){if(b.loose===!!x.loose)return b;b=b.value}if(!(this instanceof ne))return new ne(b,x);b=b.trim().split(/\s+/).join(" "),L("comparator",b,x),this.options=x,this.loose=!!x.loose,this.parse(b),this.semver===pe?this.value="":this.value=this.operator+this.semver.version,L("comp",this)}var pe={};ne.prototype.parse=function(b){var x=this.options.loose?d[e.COMPARATORLOOSE]:d[e.COMPARATOR],I=b.match(x);if(!I)throw new TypeError("Invalid comparator: "+b);this.operator=I[1]!==void 0?I[1]:"",this.operator==="="&&(this.operator=""),I[2]?this.semver=new c(I[2],this.options.loose):this.semver=pe},ne.prototype.toString=function(){return this.value},ne.prototype.test=function(b){if(L("Comparator.test",b,this.options.loose),this.semver===pe||b===pe)return!0;if(typeof b=="string")try{b=new c(b,this.options)}catch{return!1}return we(b,this.operator,this.semver,this.options)},ne.prototype.intersects=function(b,x){if(!(b instanceof ne))throw new TypeError("a Comparator is required");(!x||typeof x!="object")&&(x={loose:!!x,includePrerelease:!1});var I;if(this.operator==="")return this.value===""?!0:(I=new H(b.value,x),Ee(this.value,I,x));if(b.operator==="")return b.value===""?!0:(I=new H(this.value,x),Ee(b.semver,I,x));var j=(this.operator===">="||this.operator===">")&&(b.operator===">="||b.operator===">"),C=(this.operator==="<="||this.operator==="<")&&(b.operator==="<="||b.operator==="<"),P=this.semver.version===b.semver.version,F=(this.operator===">="||this.operator==="<=")&&(b.operator===">="||b.operator==="<="),G=we(this.semver,"<",b.semver,x)&&(this.operator===">="||this.operator===">")&&(b.operator==="<="||b.operator==="<"),U=we(this.semver,">",b.semver,x)&&(this.operator==="<="||this.operator==="<")&&(b.operator===">="||b.operator===">");return j||C||P&&F||G||U},$.Range=H;function H(b,x){if((!x||typeof x!="object")&&(x={loose:!!x,includePrerelease:!1}),b instanceof H)return b.loose===!!x.loose&&b.includePrerelease===!!x.includePrerelease?b:new H(b.raw,x);if(b instanceof ne)return new H(b.value,x);if(!(this instanceof H))return new H(b,x);if(this.options=x,this.loose=!!x.loose,this.includePrerelease=!!x.includePrerelease,this.raw=b.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(function(I){return this.parseRange(I.trim())},this).filter(function(I){return I.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+this.raw);this.format()}H.prototype.format=function(){return this.range=this.set.map(function(b){return b.join(" ").trim()}).join("||").trim(),this.range},H.prototype.toString=function(){return this.range},H.prototype.parseRange=function(b){var x=this.options.loose,I=x?d[e.HYPHENRANGELOOSE]:d[e.HYPHENRANGE];b=b.replace(I,Nt),L("hyphen replace",b),b=b.replace(d[e.COMPARATORTRIM],f),L("comparator trim",b,d[e.COMPARATORTRIM]),b=b.replace(d[e.TILDETRIM],n),b=b.replace(d[e.CARETTRIM],i),b=b.split(/\s+/).join(" ");var j=x?d[e.COMPARATORLOOSE]:d[e.COMPARATOR],C=b.split(" ").map(function(P){return xt(P,this.options)},this).join(" ").split(/\s+/);return this.options.loose&&(C=C.filter(function(P){return!!P.match(j)})),C=C.map(function(P){return new ne(P,this.options)},this),C},H.prototype.intersects=function(b,x){if(!(b instanceof H))throw new TypeError("a Range is required");return this.set.some(function(I){return ze(I,x)&&b.set.some(function(j){return ze(j,x)&&I.every(function(C){return j.every(function(P){return C.intersects(P,x)})})})})};function ze(b,x){for(var I=!0,j=b.slice(),C=j.pop();I&&j.length;)I=j.every(function(P){return C.intersects(P,x)}),C=j.pop();return I}$.toComparators=$t;function $t(b,x){return new H(b,x).set.map(function(I){return I.map(function(j){return j.value}).join(" ").trim().split(" ")})}function xt(b,x){return L("comp",b,x),b=It(b,x),L("caret",b),b=St(b,x),L("tildes",b),b=jt(b,x),L("xrange",b),b=Tt(b,x),L("stars",b),b}function ee(b){return!b||b.toLowerCase()==="x"||b==="*"}function St(b,x){return b.trim().split(/\s+/).map(function(I){return Ot(I,x)}).join(" ")}function Ot(b,x){var I=x.loose?d[e.TILDELOOSE]:d[e.TILDE];return b.replace(I,function(j,C,P,F,G){L("tilde",b,j,C,P,F,G);var U;return ee(C)?U="":ee(P)?U=">="+C+".0.0 <"+(+C+1)+".0.0":ee(F)?U=">="+C+"."+P+".0 <"+C+"."+(+P+1)+".0":G?(L("replaceTilde pr",G),U=">="+C+"."+P+"."+F+"-"+G+" <"+C+"."+(+P+1)+".0"):U=">="+C+"."+P+"."+F+" <"+C+"."+(+P+1)+".0",L("tilde return",U),U})}function It(b,x){return b.trim().split(/\s+/).map(function(I){return At(I,x)}).join(" ")}function At(b,x){L("caret",b,x);var I=x.loose?d[e.CARETLOOSE]:d[e.CARET];return b.replace(I,function(j,C,P,F,G){L("caret",b,j,C,P,F,G);var U;return ee(C)?U="":ee(P)?U=">="+C+".0.0 <"+(+C+1)+".0.0":ee(F)?C==="0"?U=">="+C+"."+P+".0 <"+C+"."+(+P+1)+".0":U=">="+C+"."+P+".0 <"+(+C+1)+".0.0":G?(L("replaceCaret pr",G),C==="0"?P==="0"?U=">="+C+"."+P+"."+F+"-"+G+" <"+C+"."+P+"."+(+F+1):U=">="+C+"."+P+"."+F+"-"+G+" <"+C+"."+(+P+1)+".0":U=">="+C+"."+P+"."+F+"-"+G+" <"+(+C+1)+".0.0"):(L("no pr"),C==="0"?P==="0"?U=">="+C+"."+P+"."+F+" <"+C+"."+P+"."+(+F+1):U=">="+C+"."+P+"."+F+" <"+C+"."+(+P+1)+".0":U=">="+C+"."+P+"."+F+" <"+(+C+1)+".0.0"),L("caret return",U),U})}function jt(b,x){return L("replaceXRanges",b,x),b.split(/\s+/).map(function(I){return kt(I,x)}).join(" ")}function kt(b,x){b=b.trim();var I=x.loose?d[e.XRANGELOOSE]:d[e.XRANGE];return b.replace(I,function(j,C,P,F,G,U){L("xRange",b,j,C,P,F,G,U);var ie=ee(P),oe=ie||ee(F),se=oe||ee(G),re=se;return C==="="&&re&&(C=""),U=x.includePrerelease?"-0":"",ie?C===">"||C==="<"?j="<0.0.0-0":j="*":C&&re?(oe&&(F=0),G=0,C===">"?(C=">=",oe?(P=+P+1,F=0,G=0):(F=+F+1,G=0)):C==="<="&&(C="<",oe?P=+P+1:F=+F+1),j=C+P+"."+F+"."+G+U):oe?j=">="+P+".0.0"+U+" <"+(+P+1)+".0.0"+U:se&&(j=">="+P+"."+F+".0"+U+" <"+P+"."+(+F+1)+".0"+U),L("xRange return",j),j})}function Tt(b,x){return L("replaceStars",b,x),b.trim().replace(d[e.STAR],"")}function Nt(b,x,I,j,C,P,F,G,U,ie,oe,se,re){return ee(I)?x="":ee(j)?x=">="+I+".0.0":ee(C)?x=">="+I+"."+j+".0":x=">="+x,ee(U)?G="":ee(ie)?G="<"+(+U+1)+".0.0":ee(oe)?G="<"+U+"."+(+ie+1)+".0":se?G="<="+U+"."+ie+"."+oe+"-"+se:G="<="+G,(x+" "+G).trim()}H.prototype.test=function(b){if(!b)return!1;if(typeof b=="string")try{b=new c(b,this.options)}catch{return!1}for(var x=0;x<this.set.length;x++)if(Lt(this.set[x],b,this.options))return!0;return!1};function Lt(b,x,I){for(var j=0;j<b.length;j++)if(!b[j].test(x))return!1;if(x.prerelease.length&&!I.includePrerelease){for(j=0;j<b.length;j++)if(L(b[j].semver),b[j].semver!==pe&&b[j].semver.prerelease.length>0){var C=b[j].semver;if(C.major===x.major&&C.minor===x.minor&&C.patch===x.patch)return!0}return!1}return!0}$.satisfies=Ee;function Ee(b,x,I){try{x=new H(x,I)}catch{return!1}return x.test(b)}$.maxSatisfying=Ct;function Ct(b,x,I){var j=null,C=null;try{var P=new H(x,I)}catch{return null}return b.forEach(function(F){P.test(F)&&(!j||C.compare(F)===-1)&&(j=F,C=new c(j,I))}),j}$.minSatisfying=Dt;function Dt(b,x,I){var j=null,C=null;try{var P=new H(x,I)}catch{return null}return b.forEach(function(F){P.test(F)&&(!j||C.compare(F)===1)&&(j=F,C=new c(j,I))}),j}$.minVersion=Pt;function Pt(b,x){b=new H(b,x);var I=new c("0.0.0");if(b.test(I)||(I=new c("0.0.0-0"),b.test(I)))return I;I=null;for(var j=0;j<b.set.length;++j){var C=b.set[j];C.forEach(function(P){var F=new c(P.semver.version);switch(P.operator){case">":F.prerelease.length===0?F.patch++:F.prerelease.push(0),F.raw=F.format();case"":case">=":(!I||J(I,F))&&(I=F);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+P.operator)}})}return I&&b.test(I)?I:null}$.validRange=Ft;function Ft(b,x){try{return new H(b,x).range||"*"}catch{return null}}$.ltr=Mt;function Mt(b,x,I){return Oe(b,x,"<",I)}$.gtr=qt;function qt(b,x,I){return Oe(b,x,">",I)}$.outside=Oe;function Oe(b,x,I,j){b=new c(b,j),x=new H(x,j);var C,P,F,G,U;switch(I){case">":C=J,P=Se,F=te,G=">",U=">=";break;case"<":C=te,P=ue,F=J,G="<",U="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Ee(b,x,j))return!1;for(var ie=0;ie<x.set.length;++ie){var oe=x.set[ie],se=null,re=null;if(oe.forEach(function(fe){fe.semver===pe&&(fe=new ne(">=0.0.0")),se=se||fe,re=re||fe,C(fe.semver,se.semver,j)?se=fe:F(fe.semver,re.semver,j)&&(re=fe)}),se.operator===G||se.operator===U||(!re.operator||re.operator===G)&&P(b,re.semver))return!1;if(re.operator===U&&F(b,re.semver))return!1}return!0}$.prerelease=Ut;function Ut(b,x){var I=p(b,x);return I&&I.prerelease.length?I.prerelease:null}$.intersects=Bt;function Bt(b,x,I){return b=new H(b,I),x=new H(x,I),b.intersects(x)}$.coerce=zt;function zt(b,x){if(b instanceof c)return b;if(typeof b=="number"&&(b=String(b)),typeof b!="string")return null;x=x||{};var I=null;if(!x.rtl)I=b.match(d[e.COERCE]);else{for(var j;(j=d[e.COERCERTL].exec(b))&&(!I||I.index+I[0].length!==b.length);)(!I||j.index+j[0].length!==I.index+I[0].length)&&(I=j),d[e.COERCERTL].lastIndex=j.index+j[1].length+j[2].length;d[e.COERCERTL].lastIndex=-1}return I===null?null:p(I[2]+"."+(I[3]||"0")+"."+(I[4]||"0"),x)}})(Ie,Ie.exports);var mr=Ie.exports;const st=tt,le=mr,Y="semver",hr={base:st.string(),type:"semverRange",validate:function(R,{error:$}){return le.validRange(R)?{value:R}:{errors:$(`${Y}.valid`)}},messages:{[`${Y}.valid`]:"{{#label}} needs to be a valid semver range"}},he={};he.compare={method:!1,validate:function(R,$,{exp:T},{name:L}){return le[L](R,T)?R:$.error(`${Y}.${L}`,{exp:T})},args:[{name:"exp",assert:le.valid,message:"needs to be a valid semver expression"}]};["gt","gte","lt","lte","eq","neq"].forEach(function(R){he[R]={method:function($){return this.$_addRule({name:R,method:"compare",args:{exp:$}})}}});he.cmp={method:function(R,$){return this.$_addRule({name:"cmp",args:{cmp:R,exp:$}})},validate:function(R,$,{cmp:T,exp:L}){return le.cmp(R,T,L)?R:$.error(`${Y}.cmp`,{cmp:T,exp:L})},args:[{name:"cmp",assert:R=>["===","!==","","=","==","!=",">",">=","<","<="].includes(R),message:"needs to be a valid comparator"},{name:"exp",assert:le.valid,message:"needs to be a valid semver expression"}]};he.compareRange={method:!1,validate:function(R,$,{rng:T},{name:L}){return le[L](R,T)?R:$.error(`${Y}.${L}`,{rng:T})},args:[{name:"rng",assert:le.validRange,message:"needs to be a valid semver range"}]};["satisfies","gtr","ltr"].forEach(function(R){he[R]={method:function($){return this.$_addRule({name:R,method:"compareRange",args:{rng:$}})}}});he.outside={method:function(R,$){return this.$_addRule({name:"outside",args:{hilo:R,rng:$}})},validate:function(R,$,{hilo:T,rng:L}){return le.outside(R,L,T)?R:$.error(`${Y}.outside`,{hilo:T,rng:L})},args:[{name:"hilo",assert:R=>[">","<"].includes(R),message:"needs to be a valid comparator"},{name:"rng",assert:le.validRange,message:"needs to be a valid semver range"}]};const dr={base:st.string(),type:"semver",validate:function(R,{error:$}){return le.valid(R)?{value:R}:{errors:$(`${Y}.valid`)}},messages:{[`${Y}.valid`]:"{{#label}} needs to be a valid semver expression",[`${Y}.gt`]:"{{#label}} needs to be greater than {{#exp}}",[`${Y}.gte`]:"{{#label}} needs to be greater than or equal to {{#exp}}",[`${Y}.lt`]:"{{#label}} needs to be less than {{#exp}}",[`${Y}.lte`]:"{{#label}} needs to be less than or equal to {{#exp}}",[`${Y}.eq`]:"{{#label}} needs to be logically equivalent to {{#exp}}",[`${Y}.neq`]:"{{#label}} needs to be logically different than {{#exp}}",[`${Y}.cmp`]:"{{#label}} needs to satisfy {{#cmp}} on {{#exp}}",[`${Y}.satisfies`]:"{{#label}} needs to satisfy {{#rng}}",[`${Y}.gtr`]:"{{#label}} needs to be greater than range {{#rng}}",[`${Y}.ltr`]:"{{#label}} needs to be less than range {{#rng}}",[`${Y}.outside`]:"{{#label}} needs to be {{#hilo}} than range {{#rng}}"},rules:he};var pr={semver:dr,semverRange:hr};/*!
|
|
12
|
+
* is-var-name | ISC (c) Shinnosuke Watanabe
|
|
13
|
+
* https://github.com/shinnn/is-var-name
|
|
14
|
+
*/function gr(R){if(typeof R!="string"||R.trim()!==R)return!1;try{new Function(R,"var "+R)}catch{return!1}return!0}const yr=Object.freeze(Object.defineProperty({__proto__:null,default:gr},Symbol.toStringTag,{value:"Module"})),vr=Vt(yr),br=Ht,_r=Xt,Ge=Re,wr=R=>{if((0,Ge.isValid)(R))return R;const $=(0,_r.toHex)(Wt.from(typeof R=="string"?R.trim():R));return(0,Ge.fromPublicKey)($,{role:br.types.RoleType.ROLE_ANY})};var Er=wr,me={},at=ae&&ae.__importDefault||function(R){return R&&R.__esModule?R:{default:R}};Object.defineProperty(me,"__esModule",{value:!0});me.didExtension=me.fileExtension=void 0;const Ve=at(Qe),Rr=at(Jt),$r=Re,it=R=>({type:"file",base:R.string(),validate($,{error:T}){return $&&typeof $=="string"?{value:$}:{errors:T("file.empty",{file:$})}},messages:{"file.empty":'file "{{#file}}" must be non-empty string',"file.enoent":'file "{{#file}}" does not exist',"file.error.generic":'file could not be read. message: "{{#message}}"'},rules:{exists:{multi:!1,method({baseDir:$=null,canSkip:T=()=>!1}={}){return this.$_addRule({name:"exists",args:{baseDir:$,canSkip:T}})},args:[{name:"baseDir",assert:$=>Ve.default.existsSync($),message:"baseDir must exist"},{name:"canSkip",assert:$=>typeof $=="function",message:"canSkip must be a function"}],validate($,{error:T},{baseDir:L,canSkip:A}={}){if(typeof A=="function"&&A(L,$))return $;try{return Ve.default.statSync(Rr.default.join(L,$)),$}catch(S){switch(S.code){case"ENOENT":return T("file.enoent",{file:$})}return T("file.error.generic",{message:S.message})}}}}});me.fileExtension=it;const ot=R=>({type:"DID",base:R.string(),validate($,{error:T}){return!$||typeof $!="string"?{errors:T("did.empty",{did:$})}:(0,$r.isValid)($)===!1?{errors:T("did.invalid",{did:$})}:{value:$}},messages:{"did.empty":'did "{{#did}}" must be non-empty string',"did.invalid":'did "{{#did}}" is not valid'}});me.didExtension=ot;me.default={fileExtension:it,didExtension:ot};var lt={},ct={exports:{}};const xr=["assert","buffer","child_process","cluster","console","constants","crypto","dgram","dns","domain","events","fs","http","https","module","net","os","path","process","punycode","querystring","readline","repl","stream","string_decoder","timers","tls","tty","url","util","v8","vm","zlib"];var ut=new RegExp("^(?:@([^/]+?)[/])?([^/]+?)$"),Sr=xr,Or=["node_modules","favicon.ico"],Ir=ct.exports=function(R){var $=[],T=[];if(R===null)return T.push("name cannot be null"),ve($,T);if(R===void 0)return T.push("name cannot be undefined"),ve($,T);if(typeof R!="string")return T.push("name must be a string"),ve($,T);if(R.length||T.push("name length must be greater than zero"),R.match(/^\./)&&T.push("name cannot start with a period"),R.match(/^_/)&&T.push("name cannot start with an underscore"),R.trim()!==R&&T.push("name cannot contain leading or trailing spaces"),Or.forEach(function(v){R.toLowerCase()===v&&T.push(v+" is a blacklisted name")}),Sr.forEach(function(v){R.toLowerCase()===v&&$.push(v+" is a core module name")}),R.length>214&&$.push("name can no longer contain more than 214 characters"),R.toLowerCase()!==R&&$.push("name can no longer contain capital letters"),/[~'!()*]/.test(R.split("/").slice(-1)[0])&&$.push(`name can no longer contain special characters ("~'!()*")`),encodeURIComponent(R)!==R){var L=R.match(ut);if(L){var A=L[1],S=L[2];if(encodeURIComponent(A)===A&&encodeURIComponent(S)===S)return ve($,T)}T.push("name can only contain URL-friendly characters")}return ve($,T)};Ir.scopedPackagePattern=ut;var ve=function(R,$){var T={validForNewPackages:$.length===0&&R.length===0,validForOldPackages:$.length===0,warnings:R,errors:$};return T.warnings.length||delete T.warnings,T.errors.length||delete T.errors,T},Ar=ct.exports;(function(R){var $=ae&&ae.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(R,"__esModule",{value:!0}),R.validateName=R.validateNewDid=void 0;const T=Re,L=$(Ar),A=32,S=o=>{if((0,T.toTypeInfo)(o).role!==T.types.RoleType.ROLE_BLOCKLET)throw new Error("Blocklet DID's type must be ROLE_BLOCKLET")};R.validateNewDid=S;const v=(o,{checkDid:y=!0}={})=>{if((0,T.isValid)(o))y&&(0,R.validateNewDid)(o);else{const{validForNewPackages:d,errors:u=[],warnings:e=[]}=(0,L.default)(o);if(!d)throw new Error(u[0]||e[0]);if(o.length>A)throw new Error("Blocklet name is too long")}};R.validateName=v,R.default={validateName:R.validateName,validateNewDid:R.validateNewDid}})(lt);var jr=ae&&ae.__createBinding||(Object.create?function(R,$,T,L){L===void 0&&(L=T);var A=Object.getOwnPropertyDescriptor($,T);(!A||("get"in A?!$.__esModule:A.writable||A.configurable))&&(A={enumerable:!0,get:function(){return $[T]}}),Object.defineProperty(R,L,A)}:function(R,$,T,L){L===void 0&&(L=T),R[L]=$[T]}),kr=ae&&ae.__setModuleDefault||(Object.create?function(R,$){Object.defineProperty(R,"default",{enumerable:!0,value:$})}:function(R,$){R.default=$}),Tr=ae&&ae.__importStar||function(R){if(R&&R.__esModule)return R;var $={};if(R!=null)for(var T in R)T!=="default"&&Object.prototype.hasOwnProperty.call(R,T)&&jr($,R,T);return kr($,R),$},ye=ae&&ae.__importDefault||function(R){return R&&R.__esModule?R:{default:R}};Object.defineProperty(q,"__esModule",{value:!0});q.Joi=q.resourceBundleSchema=q.authConfigSchema=q.cacheableSchema=q.statsSchema=Br=q.titleSchema=q.themeSchema=q.signatureSchema=q.serviceSchema=q.scriptsSchema=q.personSchema=q.navigationSchema=q.navigationItemSchema=q.updateMountPointSchema=q.mountPointSchema=q.logoSchema=q.interfaceSchema=q.environmentNameSchema=q.environmentSchema=q.engineSchema=q.endpointSchema=q.distSchema=q.descriptionSchema=q.createBlockletSchema=q.componentSchema=q.blockletNameSchema=q.blockletMetaSchema=void 0;const Nr=ye(Qe),Lr=ye(tt),Cr=ye(ir),Dr=ye(fr),We=pr,Pr=ye(vr),He=Yt,Fr=Re,X=Zt,Mr=ye(Er),Xe=me,Ae=lt,ke=Tr(Kt),qr=Cr.default.default,Ke="/.well-known",_=Lr.default.extend(We.semver).extend(We.semverRange).extend(Xe.fileExtension).extend(Xe.didExtension);q.Joi=_;const Ye=(R,$)=>(0,ke.checkLink)(R)?R:$.message(`Invalid navigation link: ${R}
|
|
15
|
+
|
|
16
|
+
A valid navigation link should be a relative url which start with '/' or a absolute url, such as:
|
|
17
|
+
- /en/home
|
|
18
|
+
- /zh/home
|
|
19
|
+
- https://www.arcblock.io
|
|
20
|
+
`),Ur=(R,$)=>!R||(0,Pr.default)(R)?R:$.message(`Invalid navigation id: ${R}
|
|
21
|
+
|
|
22
|
+
A valid navigation id is should follow the rules of javascript variables, such as:
|
|
23
|
+
- foo
|
|
24
|
+
- fooBar
|
|
25
|
+
- foo123
|
|
26
|
+
|
|
27
|
+
see detail in https://www.npmjs.com/package/is-var-name
|
|
28
|
+
`),$e=_.string().trim().min(1).custom(R=>{if(qr(R)>X.MAX_TITLE_LENGTH)throw new Error(`title length should not exceed ${X.MAX_TITLE_LENGTH} (see: https://www.npmjs.com/package/cjk-length)`);return R}).meta({className:"TTitle"});var Br=q.titleSchema=$e;const xe=_.string().trim().min(3).max(160).meta({className:"TDescription"});q.descriptionSchema=xe;const ft=_.string().uri({scheme:["http","https"],allowRelative:!0}).allow("").custom((R,$)=>R.includes(He.WELLKNOWN_BLOCKLET_LOGO_PATH)?$.message(`logo url should not include ${He.WELLKNOWN_BLOCKLET_LOGO_PATH}`):R).meta({className:"TLogo"});q.logoSchema=ft;const mt=_.string().trim().min(1),Te=mt.meta({className:"TMountPoint"}).custom((R,$)=>(0,ke.isValidUrlPath)(R)?R:$.message(`mountPoint cannot contain such characters space $*+~()'"!:@\\`));q.mountPointSchema=Te;const ht=mt.meta({className:"TUpdateMountPoint"}).custom(R=>(0,ke.default)(R));q.updateMountPointSchema=ht;const ge=_.string().custom(R=>((0,Ae.validateName)(R),R)).meta({className:"TBlockletName"});q.blockletNameSchema=ge;const zr=[],Ne=_.string().trim().min(1).max(50).required().custom((R,$)=>R.startsWith("BLOCKLET")&&!zr.includes(R)?$.message("Env name can not start with BLOCKLET_"):R.startsWith("COMPONENT")?$.message("Env name can not start with COMPONENT_"):R.startsWith("ABTNODE")?$.message("Env name can not start with ABTNODE_"):/[^\w]/.test(R)?$.message('Env name can include only numbers or letters or "_"'):R).meta({className:"TEnvironmentName",unknownType:"any"});q.environmentNameSchema=Ne;const Le=_.object({name:Ne.required(),description:_.string().trim().required(),default:_.string().optional().allow("").default(""),required:_.boolean().default(!1),secure:_.boolean().default(!1),validation:_.string().optional(),shared:_.boolean().default(R=>R.secure?!1:void 0)}).custom((R,$)=>R.secure&&R.default?$.message(`Cannot declare default value for secure env ${R.name}`):R).meta({className:"TEnvironment",unknownType:"any"});q.environmentSchema=Le;const Ce=_.object({dev:_.string().trim().min(1),e2eDev:_.string().trim().min(1),preFlight:_.string().trim().min(1),preInstall:_.string().trim().min(1),postInstall:_.string().trim().min(1),preStart:_.string().trim().min(1),postStart:_.string().trim().min(1),preStop:_.string().trim().min(1),preUninstall:_.string().trim().min(1),preConfig:_.string().trim().min(1)}).rename("pre-flight","preFlight").rename("pre-install","preInstall").rename("post-install","postInstall").rename("pre-start","preStart").rename("post-start","postStart").rename("pre-stop","preStop").rename("pre-uninstall","preUninstall").rename("pre-config","preConfig").optional().meta({className:"TScripts",unknownType:"any"});q.scriptsSchema=Ce;const De=_.object({name:_.string().required().trim(),config:_.object().optional().default({})}).unknown(!0).meta({className:"TService",unknownType:"any"});q.serviceSchema=De;const Pe=_.object({type:_.string().trim(!0).min(1).required(),path:_.string().required(),meta:_.object({vcType:_.string(),payable:_.boolean(),params:_.array().items({name:_.string().required().trim(),description:_.string().required().trim()})})}).meta({className:"TEndpoint",unknownType:"any"});q.endpointSchema=Pe;const dt=_.string().trim().custom((R,$)=>{const T=R.split("/").filter(Boolean);return T.length===0?$.message("cacheable path must be a valid pathname that is not /"):`/${T.join("/")}`}).meta({className:"TPathPrefix",unknownType:"any"});q.cacheableSchema=dt;const Fe=_.object({type:_.string().lowercase().valid(...X.BLOCKLET_INTERFACE_TYPES).required(),name:_.string().trim().required(),path:_.string().trim().default("/"),prefix:_.string().trim().min(1).default(X.BLOCKLET_DYNAMIC_PATH_PREFIX),protocol:_.string().lowercase().valid(...X.BLOCKLET_INTERFACE_PROTOCOLS).default("http"),port:_.alternatives().try(_.string().uppercase().default(X.BLOCKLET_DEFAULT_PORT_NAME),_.object({internal:_.string().uppercase().required(),external:_.number().port().required()})).default(X.BLOCKLET_DEFAULT_PORT_NAME),cacheable:_.array().items(dt).unique(),services:_.array().items(De).unique("name"),endpoints:_.array().items(Pe).unique("type"),pageGroups:_.array().items(_.string().min(1).max(255).trim()).unique()}).meta({className:"TInterface",unknownType:"any"});q.interfaceSchema=Fe;const Gr=_.alternatives().try(_.string().required(),_.object({url:_.string().uri({scheme:["http","https","file"]}).required(),name:ge.required(),version:_.alternatives().try(_.string().valid("latest"),_.semverRange().valid())}),_.object({store:_.string().uri({scheme:["http","https"]}).required(),name:ge.required(),version:_.alternatives().try(_.string().valid("latest"),_.semverRange().valid()).default("latest")})),je=_.object({platform:_.string().valid(...X.BLOCKLET_PLATFORMS).optional(),interpreter:_.string().valid("binary","node","blocklet").default("node"),source:Gr,args:_.array().items(_.string()).optional().default([])}).meta({className:"TEngine",unknownType:"any"});q.engineSchema=je;const be=_.object({name:_.string().min(1).required(),email:_.string().email({tlds:!1}).optional(),url:_.string().uri().optional()}).meta({className:"TPerson",unknownType:"any"});q.personSchema=be;const _e=_.object({tarball:_.alternatives().try(_.string().uri(),_.string()).required(),integrity:_.string().required(),size:_.number().optional()}).meta({className:"TDist",unknownType:"any"});q.distSchema=_e;const pt=_.object({downloads:_.number().integer().greater(-1),star:_.number().default(0),purchases:_.number().default(0)}).meta({className:"TStats",unknownType:"any"});q.statsSchema=pt;const Vr=_.alternatives().try(_.object({url:_.alternatives().try(_.string().uri(),_.array().items(_.string().uri()).min(1)).required(),version:_.alternatives().try(_.string().valid("latest"),_.semverRange().valid())}),_.object({store:_.string().uri(),name:ge.required(),version:_.alternatives().try(_.string().valid("latest"),_.semverRange().valid()).default("latest")})),gt={source:Vr.required(),required:_.boolean(),title:$e,description:xe,mountPoint:Te,name:ge},yt=(R,$)=>_.object(R).custom((T,L)=>!$&&T.source&&T.source.name&&!T.source.store?L.message(`missing 'store' in source of component ${T.name}`):T),Me=yt(gt).meta({className:"TComponent",unknownType:"any"});q.componentSchema=Me;const Wr=yt(gt,!0),vt=({checkStore:R}={})=>{const $=[Me,Wr];return _.array().items(R?$[0]:$[1]).optional().default([])},bt=_.object({type:_.string().required(),name:_.string().required(),signer:_.string().required(),pk:_.string().required(),created:_.string().isoDate().required(),sig:_.string().required(),excludes:_.array().items(_.string()).optional(),appended:_.array().items(_.string()).optional(),delegatee:_.string(),delegateePk:_.string(),delegation:_.string()}).meta({className:"TSignature",unknownType:"any"});q.signatureSchema=bt;const Ze=["en","zh","fr","ru","ar","es","de","pt","ja","hi"],Je={id:_.string().custom(Ur),title:_.alternatives().try(_.string().min(1).max(X.MAX_TITLE_LENGTH),_.object().min(1).pattern(_.string().valid(...Ze),_.string().min(1).max(X.MAX_TITLE_LENGTH))).required(),link:_.alternatives().try(_.string().custom(Ye),_.object().min(1).pattern(_.string().valid(...Ze),_.string().custom(Ye))),component:_.string().min(1),section:_.array().items(_.string().min(1)).single(),role:_.array().items(_.string().min(1)).single(),icon:_.string().min(1),visible:_.boolean()},_t=_.object({...Je,items:_.array().items(_.object({...Je}).rename("child","component"))}).rename("child","component").meta({className:"TNavigationItem",unknownType:"any"});q.navigationItemSchema=_t;const qe=_.array().items(_t).unique((R,$)=>R.id&&$.id?R.id===$.id:!1).meta({className:"TNavigation",unknownType:"any"});q.navigationSchema=qe;const Ue=_.object({background:_.alternatives().try(_.string().min(1),_.object({header:_.string().min(1),footer:_.string().min(1),default:_.string().min(1)}).min(1))}).meta({className:"TTheme",unknownType:"any"});q.themeSchema=Ue;const wt=_.object({whoCanAccess:_.string().valid("owner","invited","all"),profileFields:_.array().items(_.string().valid("fullName","email","avatar","phone")).unique(),ignoreUrls:_.array().items(_.string().min(1)),allowSwitchProfile:_.boolean(),blockUnauthenticated:_.boolean(),blockUnauthorized:_.boolean()}).options({stripUnknown:!0}).meta({className:"TAuthConfig",unknownType:"any"});q.authConfigSchema=wt;const Hr=_.object({type:_.string().trim().min(1).required(),description:_.string().trim().min(1)}),Be=_.object({did:_.DID().trim().required(),type:_.string().trim().min(1).required(),public:_.boolean()}).meta({className:"TResourceBundle",unknownType:"any"});q.resourceBundleSchema=Be;const Et={did:_.DID().trim().required(),version:_.semver().valid().required(),name:_.string().optional(),description:xe.required(),group:_.string().valid(...X.BLOCKLET_GROUPS),main:_.string().trim(),title:$e.optional().allow(""),logo:_.string().trim().optional(),specVersion:_.semver().valid().gte("1.0.0").optional(),author:be.optional(),contributors:_.array().items(be).optional(),maintainers:_.array().items(be).optional(),community:_.string().uri().optional().allow("").default(""),documentation:_.string().uri().optional().allow("").default(""),homepage:_.string().uri().optional().allow("").default(""),license:_.string().optional().allow("").default(""),support:_.alternatives().try(_.string().uri(),_.string().email({tlds:!1})).optional(),nftFactory:_.DID().optional().allow("").default(""),payment:_.object({price:_.array().max(1).items(_.object({value:_.number().greater(0).required(),address:_.DID().required()})).default([]),share:_.array().max(4).items(_.object({name:_.string().required(),address:_.DID().required(),value:_.number().greater(0).max(1).required()})).default([]).custom(R=>{if(R.length===0)return R;const $=R.reduce((T,L)=>T+L.value,0);if($!==1)throw new Error(`Invalid blocklet payment share config: total share must be 1, got ${$}`);return R},"invalid blocklet share"),componentPrice:_.array().items(_.object({parentPriceRange:_.array().items(_.number()).custom((R,$)=>R.length!==2?$.message("length of range should be 2"):R[0]<0?$.message("the first value should not less than 0 in range"):R[1]<=R[0]?$.message("the second value should greater than the first value in range"):R),type:_.string().valid("fixed","percentage").required(),value:_.number().greater(0).required()})).single()}).default({price:[],share:[]}),keywords:_.alternatives().try(_.string().trim().min(1),_.array().items(_.string().min(1))).optional(),tags:_.alternatives().try(_.string().trim().min(1),_.array().items(_.string().min(1))).optional(),gitHash:_.string().optional().allow(""),repository:_.alternatives().try(_.string().min(1),_.object({type:_.string().valid("git","https","svn").required(),url:_.string().uri().required(),directory:_.string()})).optional(),timeout:_.object({start:_.number().min(10).max(600),script:_.number().min(1).max(1800)}).default({start:60}),requirements:_.object({abtnode:_.semverRange().valid(),server:_.semverRange().valid(),os:_.alternatives().try(_.string().valid("*",...X.BLOCKLET_PLATFORMS),_.array().items(_.string().valid(...X.BLOCKLET_PLATFORMS)).min(1)),cpu:_.alternatives().try(_.string().valid("*",...X.BLOCKLET_ARCHITECTURES),_.array().items(_.string().valid(...X.BLOCKLET_ARCHITECTURES)).min(1)),fuels:_.array().items(_.object({endpoint:_.string().trim().required(),address:_.string().trim(),value:_.string().trim().required(),reason:_.string().trim().required()})),nodejs:_.semverRange().valid()}).default({server:X.BLOCKLET_LATEST_REQUIREMENT_SERVER,os:"*",cpu:"*",nodejs:"*"}),interfaces:_.array().items(Fe).unique("name").custom((R,$)=>{if(R.filter(A=>A.type===X.BLOCKLET_INTERFACE_TYPE_WEB).length>1)return $.message(`Only one ${X.BLOCKLET_INTERFACE_TYPE_WEB} interface can be declared`);const L=R.filter(A=>A.type===X.BLOCKLET_INTERFACE_TYPE_WELLKNOWN);for(const A of L)if(!A.prefix.startsWith(Ke))return $.message(`Wellknown path prefix must start with: ${Ke}`);return R}).default([]),environments:_.array().items(Le).default([]).optional().custom((R,$)=>{if(R&&R.length){const T=R.filter((L,A)=>R.findIndex(S=>S.name===L.name)!==A);if(T.length)return $.message(`find duplicate environment names ${T.map(L=>L.name).join(", ")}`)}return R}),scripts:Ce,capabilities:_.object({clusterMode:_.boolean(),didSpace:_.string().valid(...Object.values(X.BLOCKLET_APP_SPACE_REQUIREMENT)).optional(),navigation:_.boolean().default(!0),serverless:_.boolean().optional(),component:_.boolean(),sitemap:_.boolean().optional()}).default({}),files:_.array().items(_.string().trim()).optional(),resource:_.object({exportApi:_.string().trim(),bundles:_.array().items(Be),types:_.array().items(Hr).max(10)}),engine:_.alternatives().try(je,_.array().items(je)).optional(),screenshots:_.array().items(_.string().min(1)).optional().default([]),logoUrl:_.string().optional().allow(""),dist:_e.optional(),stats:pt.optional(),htmlAst:_.any().optional(),path:_.string().optional(),signatures:_.array().items(bt).optional(),lastPublishedAt:_.string().isoDate().optional(),components:vt(),navigation:qe,theme:Ue,copyright:_.object({owner:_.string().min(1),year:_.alternatives().try(_.string(),_.number())}),bundleName:_.string(),bundleDid:_.DID().trim(),storeId:_.string()},Xr=_.object(Et).options({stripUnknown:!0,noDefaults:!1}).meta({className:"TBlockletMeta",unknownType:"any"});q.blockletMetaSchema=Xr;const Rt=(R,{ensureFiles:$=!1,ensureDist:T=!1,ensureComponentStore:L=!0,ensureName:A=!1,skipValidateDidName:S=!1,...v}={})=>((!R||!Nr.default.existsSync(R))&&($=!1),_.object({...Et,owner:_.object({avatar:_.string().optional(),did:_.DID().trim().required(),fullName:_.string().trim().required(),email:_.string().email({tlds:!1}).required()}).optional(),logo:$?_.file().trim().exists({baseDir:R}).optional():_.string().trim().optional(),files:_.array().items($?_.file().exists({baseDir:R,canSkip:(o,y)=>[X.BLOCKLET_ENTRY_FILE,X.BLOCKLET_BUNDLE_FILE].includes(y)||(0,Dr.default)(y)}):_.string().trim()).optional(),dist:T?_e.required():_e.optional(),components:vt({checkStore:L}),name:A?_.string().optional():_.string().required()}).options({stripUnknown:!0,noDefaults:!1,...v}).rename("children","components").custom((o,y)=>{const{did:d,name:u}=o;let e;if((0,Fr.isValid)(d))try{return(0,Ae.validateNewDid)(d),o}catch(a){e=a}if(u){(0,Ae.validateName)(u,{checkDid:!S});const a=(0,Mr.default)(u);return a!==d?y.message(`The did of name "${u}" should be "${a}"`):o}return e?y.message(e.message):o}));q.createBlockletSchema=Rt;q.default={blockletNameSchema:ge,componentSchema:Me,endpointSchema:Pe,serviceSchema:De,createBlockletSchema:Rt,interfaceSchema:Fe,environmentSchema:Le,environmentNameSchema:Ne,scriptsSchema:Ce,personSchema:be,distSchema:_e,titleSchema:$e,descriptionSchema:xe,logoSchema:ft,navigationSchema:qe,themeSchema:Ue,mountPointSchema:Te,updateMountPointSchema:ht,authConfigSchema:wt,resourceBundleSchema:Be,Joi:_};export{lt as n,q as s,Br as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{gc as o}from"./index-B9q4xTve.js";const t=new o,l=t;export{l as b};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as L}from"./codemirror.es-
|
|
1
|
+
import{a as L}from"./codemirror.es-Dt0TXafG.js";import{a as K}from"./searchcursor.es-CHzpyp98.js";import{a as U}from"./dialog.es-D_T7Yss2.js";import"./index-RVerdREp.js";import"./index-B9q4xTve.js";var k=Object.defineProperty,i=(x,w)=>k(x,"name",{value:w,configurable:!0});function V(x,w){return w.forEach(function(a){a&&typeof a!="string"&&!Array.isArray(a)&&Object.keys(a).forEach(function(d){if(d!=="default"&&!(d in x)){var O=Object.getOwnPropertyDescriptor(a,d);Object.defineProperty(x,d,O.get?O:{enumerable:!0,get:function(){return a[d]}})}})}),Object.freeze(x)}i(V,"_mergeNamespaces");var z={exports:{}};(function(x,w){(function(a){a(L.exports,K.exports,U.exports)})(function(a){a.defineOption("search",{bottom:!1});function d(e,t){return typeof e=="string"?e=new RegExp(e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),t?"gi":"g"):e.global||(e=new RegExp(e.source,e.ignoreCase?"gi":"g")),{token:function(n){e.lastIndex=n.pos;var o=e.exec(n.string);if(o&&o.index==n.pos)return n.pos+=o[0].length||1,"searching";o?n.pos=o.index:n.skipToEnd()}}}i(d,"searchOverlay");function O(){this.posFrom=this.posTo=this.lastQuery=this.query=null,this.overlay=null}i(O,"SearchState");function S(e){return e.state.search||(e.state.search=new O)}i(S,"getSearchState");function N(e){return typeof e=="string"&&e==e.toLowerCase()}i(N,"queryCaseInsensitive");function m(e,t,n){return e.getSearchCursor(t,n,{caseFold:N(t),multiline:!0})}i(m,"getSearchCursor");function $(e,t,n,o,r){e.openDialog(t,o,{value:n,selectValueOnOpen:!0,closeOnEnter:!1,onClose:function(){b(e)},onKeyDown:r,bottom:e.options.search.bottom})}i($,"persistentDialog");function P(e,t,n,o,r){e.openDialog?e.openDialog(t,r,{value:o,selectValueOnOpen:!0,bottom:e.options.search.bottom}):r(prompt(n,o))}i(P,"dialog");function F(e,t,n,o){e.openConfirm?e.openConfirm(t,o):confirm(n)&&o[0]()}i(F,"confirmDialog");function _(e){return e.replace(/\\([nrt\\])/g,function(t,n){return n=="n"?`
|
|
2
2
|
`:n=="r"?"\r":n=="t"?" ":n=="\\"?"\\":t})}i(_,"parseString");function C(e){var t=e.match(/^\/(.*)\/([a-z]*)$/);if(t)try{e=new RegExp(t[1],t[2].indexOf("i")==-1?"":"i")}catch{}else e=_(e);return(typeof e=="string"?e=="":e.test(""))&&(e=/x^/),e}i(C,"parseQuery");function R(e,t,n){t.queryText=n,t.query=C(n),e.removeOverlay(t.overlay,N(t.query)),t.overlay=d(t.query,N(t.query)),e.addOverlay(t.overlay),e.showMatchesOnScrollbar&&(t.annotate&&(t.annotate.clear(),t.annotate=null),t.annotate=e.showMatchesOnScrollbar(t.query,N(t.query)))}i(R,"startSearch");function y(e,t,n,o){var r=S(e);if(r.query)return D(e,t);var s=e.getSelection()||r.lastQuery;if(s instanceof RegExp&&s.source=="x^"&&(s=null),n&&e.openDialog){var c=null,p=i(function(f,v){a.e_stop(v),f&&(f!=r.queryText&&(R(e,r,f),r.posFrom=r.posTo=e.getCursor()),c&&(c.style.opacity=1),D(e,v.shiftKey,function(h,g){var u;g.line<3&&document.querySelector&&(u=e.display.wrapper.querySelector(".CodeMirror-dialog"))&&u.getBoundingClientRect().bottom-4>e.cursorCoords(g,"window").top&&((c=u).style.opacity=.4)}))},"searchNext");$(e,Q(e),s,p,function(f,v){var h=a.keyName(f),g=e.getOption("extraKeys"),u=g&&g[h]||a.keyMap[e.getOption("keyMap")][h];u=="findNext"||u=="findPrev"||u=="findPersistentNext"||u=="findPersistentPrev"?(a.e_stop(f),R(e,S(e),v),e.execCommand(u)):(u=="find"||u=="findPersistent")&&(a.e_stop(f),p(v,f))}),o&&s&&(R(e,r,s),D(e,t))}else P(e,Q(e),"Search for:",s,function(f){f&&!r.query&&e.operation(function(){R(e,r,f),r.posFrom=r.posTo=e.getCursor(),D(e,t)})})}i(y,"doSearch");function D(e,t,n){e.operation(function(){var o=S(e),r=m(e,o.query,t?o.posFrom:o.posTo);!r.find(t)&&(r=m(e,o.query,t?a.Pos(e.lastLine()):a.Pos(e.firstLine(),0)),!r.find(t))||(e.setSelection(r.from(),r.to()),e.scrollIntoView({from:r.from(),to:r.to()},20),o.posFrom=r.from(),o.posTo=r.to(),n&&n(r.from(),r.to()))})}i(D,"findNext");function b(e){e.operation(function(){var t=S(e);t.lastQuery=t.query,t.query&&(t.query=t.queryText=null,e.removeOverlay(t.overlay),t.annotate&&(t.annotate.clear(),t.annotate=null))})}i(b,"clearSearch");function l(e,t){var n=e?document.createElement(e):document.createDocumentFragment();for(var o in t)n[o]=t[o];for(var r=2;r<arguments.length;r++){var s=arguments[r];n.appendChild(typeof s=="string"?document.createTextNode(s):s)}return n}i(l,"el");function Q(e){return l("",null,l("span",{className:"CodeMirror-search-label"},e.phrase("Search:"))," ",l("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field"})," ",l("span",{style:"color: #888",className:"CodeMirror-search-hint"},e.phrase("(Use /re/ syntax for regexp search)")))}i(Q,"getQueryDialog");function j(e){return l("",null," ",l("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field"})," ",l("span",{style:"color: #888",className:"CodeMirror-search-hint"},e.phrase("(Use /re/ syntax for regexp search)")))}i(j,"getReplaceQueryDialog");function A(e){return l("",null,l("span",{className:"CodeMirror-search-label"},e.phrase("With:"))," ",l("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field"}))}i(A,"getReplacementQueryDialog");function I(e){return l("",null,l("span",{className:"CodeMirror-search-label"},e.phrase("Replace?"))," ",l("button",{},e.phrase("Yes"))," ",l("button",{},e.phrase("No"))," ",l("button",{},e.phrase("All"))," ",l("button",{},e.phrase("Stop")))}i(I,"getDoReplaceConfirm");function T(e,t,n){e.operation(function(){for(var o=m(e,t);o.findNext();)if(typeof t!="string"){var r=e.getRange(o.from(),o.to()).match(t);o.replace(n.replace(/\$(\d)/g,function(s,c){return r[c]}))}else o.replace(n)})}i(T,"replaceAll");function E(e,t){if(!e.getOption("readOnly")){var n=e.getSelection()||S(e).lastQuery,o=t?e.phrase("Replace all:"):e.phrase("Replace:"),r=l("",null,l("span",{className:"CodeMirror-search-label"},o),j(e));P(e,r,o,n,function(s){s&&(s=C(s),P(e,A(e),e.phrase("Replace with:"),"",function(c){if(c=_(c),t)T(e,s,c);else{b(e);var p=m(e,s,e.getCursor("from")),f=i(function(){var h=p.from(),g;!(g=p.findNext())&&(p=m(e,s),!(g=p.findNext())||h&&p.from().line==h.line&&p.from().ch==h.ch)||(e.setSelection(p.from(),p.to()),e.scrollIntoView({from:p.from(),to:p.to()}),F(e,I(e),e.phrase("Replace?"),[function(){v(g)},f,function(){T(e,s,c)}]))},"advance"),v=i(function(h){p.replace(typeof s=="string"?c:c.replace(/\$(\d)/g,function(g,u){return h[u]})),f()},"doReplace");f()}}))})}}i(E,"replace"),a.commands.find=function(e){b(e),y(e)},a.commands.findPersistent=function(e){b(e),y(e,!1,!0)},a.commands.findPersistentNext=function(e){y(e,!1,!0,!0)},a.commands.findPersistentPrev=function(e){y(e,!0,!0,!0)},a.commands.findNext=y,a.commands.findPrev=function(e){y(e,!0)},a.commands.clearSearch=b,a.commands.replace=E,a.commands.replaceAll=function(e){E(e,!0)}})})();var B=z.exports,X=Object.freeze(V({__proto__:null,[Symbol.toStringTag]:"Module",default:B},[z.exports]));export{X as s};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as M}from"./codemirror.es-
|
|
1
|
+
import{a as M}from"./codemirror.es-Dt0TXafG.js";import"./index-RVerdREp.js";import"./index-B9q4xTve.js";var $=Object.defineProperty,g=(F,P)=>$(F,"name",{value:P,configurable:!0});function D(F,P){return P.forEach(function(u){u&&typeof u!="string"&&!Array.isArray(u)&&Object.keys(u).forEach(function(s){if(s!=="default"&&!(s in F)){var L=Object.getOwnPropertyDescriptor(u,s);Object.defineProperty(F,s,L.get?L:{enumerable:!0,get:function(){return u[s]}})}})}),Object.freeze(F)}g(D,"_mergeNamespaces");var A={exports:{}};(function(F,P){(function(u){u(M.exports)})(function(u){var s=u.Pos;function L(t){var e=t.flags;return e??(t.ignoreCase?"i":"")+(t.global?"g":"")+(t.multiline?"m":"")}g(L,"regexpFlags");function O(t,e){for(var n=L(t),r=n,l=0;l<e.length;l++)r.indexOf(e.charAt(l))==-1&&(r+=e.charAt(l));return n==r?t:new RegExp(t.source,r)}g(O,"ensureFlags");function R(t){return/\\s|\\n|\n|\\W|\\D|\[\^/.test(t.source)}g(R,"maybeMultiline");function _(t,e,n){e=O(e,"g");for(var r=n.line,l=n.ch,a=t.lastLine();r<=a;r++,l=0){e.lastIndex=l;var i=t.getLine(r),f=e.exec(i);if(f)return{from:s(r,f.index),to:s(r,f.index+f[0].length),match:f}}}g(_,"searchRegexpForward");function z(t,e,n){if(!R(e))return _(t,e,n);e=O(e,"gm");for(var r,l=1,a=n.line,i=t.lastLine();a<=i;){for(var f=0;f<l&&!(a>i);f++){var d=t.getLine(a++);r=r==null?d:r+`
|
|
2
2
|
`+d}l=l*2,e.lastIndex=n.ch;var o=e.exec(r);if(o){var h=r.slice(0,o.index).split(`
|
|
3
3
|
`),c=o[0].split(`
|
|
4
4
|
`),v=n.line+h.length-1,m=h[h.length-1].length;return{from:s(v,m),to:s(v+c.length-1,c.length==1?m+c[0].length:c[c.length-1].length),match:o}}}}g(z,"searchRegexpForwardMultiline");function j(t,e,n){for(var r,l=0;l<=t.length;){e.lastIndex=l;var a=e.exec(t);if(!a)break;var i=a.index+a[0].length;if(i>t.length-n)break;(!r||i>r.index+r[0].length)&&(r=a),l=a.index+1}return r}g(j,"lastMatchIn");function k(t,e,n){e=O(e,"g");for(var r=n.line,l=n.ch,a=t.firstLine();r>=a;r--,l=-1){var i=t.getLine(r),f=j(i,e,l<0?0:i.length-l);if(f)return{from:s(r,f.index),to:s(r,f.index+f[0].length),match:f}}}g(k,"searchRegexpBackward");function B(t,e,n){if(!R(e))return k(t,e,n);e=O(e,"gm");for(var r,l=1,a=t.getLine(n.line).length-n.ch,i=n.line,f=t.firstLine();i>=f;){for(var d=0;d<l&&i>=f;d++){var o=t.getLine(i--);r=r==null?o:o+`
|