@abtnode/webapp 1.16.47-beta-20250724-080141-d80ab374 → 1.16.47-beta-20250725-140845-15481a97

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.
Files changed (211) hide show
  1. package/blocklet.js +1 -1
  2. package/blocklet.yml +1 -1
  3. package/dist/assets/{AdapterDayjs-B4V244DK.js → AdapterDayjs-DPTb1mSQ.js} +1 -1
  4. package/dist/assets/{Add-DNK3-YER.js → Add-DD8MScAx.js} +1 -1
  5. package/dist/assets/ArrowDropDown-B4JFpTo9.js +1 -0
  6. package/dist/assets/{Autocomplete-BWhtsDmg.js → Autocomplete-Cq435hZq.js} +1 -1
  7. package/dist/assets/{Breadcrumbs-BcoAUzZm.js → Breadcrumbs-C9jZiry0.js} +1 -1
  8. package/dist/assets/{ButtonGroup-CO-3Gd2r.js → ButtonGroup-Dk6oPkTY.js} +1 -1
  9. package/dist/assets/{CSSTransition-DVvLNPEG.js → CSSTransition-C1fvxvPN.js} +1 -1
  10. package/dist/assets/{CallMerge-CO7O6BIP.js → CallMerge-D9hyidIF.js} +1 -1
  11. package/dist/assets/{CardContent-CRWKEGyT.js → CardContent-D9MyeTia.js} +1 -1
  12. package/dist/assets/{ChevronLeft-BmUpUTH_.js → ChevronLeft-Cn84uWzO.js} +1 -1
  13. package/dist/assets/{ChevronRight-DDhIWK8t.js → ChevronRight-Cfe9Ltow.js} +1 -1
  14. package/dist/assets/{Clear-B_fV2Y4r.js → Clear-BwooXVqX.js} +1 -1
  15. package/dist/assets/{DeleteOutline-CHPUiy2-.js → DeleteOutline-D435DmAa.js} +1 -1
  16. package/dist/assets/{Done-Cz6nN-bV.js → Done-Dvvf3-WX.js} +1 -1
  17. package/dist/assets/{Edit-Car5frKm.js → Edit-CdxfETzo.js} +1 -1
  18. package/dist/assets/{ErrorOutline-BPdDMUCb.js → ErrorOutline-XMmhDF6k.js} +1 -1
  19. package/dist/assets/{FilterList-CkOj30Dt.js → FilterList-CMsi8nwW.js} +1 -1
  20. package/dist/assets/{Google-CJdW8TVA.js → Google-RkdWLWhs.js} +1 -1
  21. package/dist/assets/{HelpOutline-Qg9I2LLo.js → HelpOutline-hrNaaelS.js} +1 -1
  22. package/dist/assets/{Launch-CZLWPIfP.js → Launch-BxhXypAR.js} +1 -1
  23. package/dist/assets/{Link-BQnmEzFa.js → Link-Dp2yV4ZC.js} +1 -1
  24. package/dist/assets/{ListItemButton-D4jvuJIP.js → ListItemButton-VMszpmME.js} +1 -1
  25. package/dist/assets/{ListSubheader-B1S4gfd7.js → ListSubheader-DmKGdU_q.js} +1 -1
  26. package/dist/assets/{LoadingButton-CCUOcwg2.js → LoadingButton-CXSzlafJ.js} +1 -1
  27. package/dist/assets/{MoreVert-BbI3jg4_.js → MoreVert-Coua8qOx.js} +1 -1
  28. package/dist/assets/{OpenInNew-D_vS6EnU.js → OpenInNew-CKR-Uc6r.js} +1 -1
  29. package/dist/assets/{Refresh-C_5ivjcA.js → Refresh-7Vv0mUfT.js} +1 -1
  30. package/dist/assets/{Search-D4YbOYOK.js → Search-bAJjS7Xv.js} +1 -1
  31. package/dist/assets/{Slider-DnheougG.js → Slider-Dv-x7QDz.js} +1 -1
  32. package/dist/assets/{Stepper-Dy98Hr8q.js → Stepper-D1SqN5Ci.js} +1 -1
  33. package/dist/assets/{Switch-DHHERzZ6.js → Switch--S3Uh1XY.js} +1 -1
  34. package/dist/assets/{TableSearch-23MMpd51.js → TableSearch-DbCt9XJz.js} +1 -1
  35. package/dist/assets/{ToggleButtonGroup-BcSbqmBs.js → ToggleButtonGroup-CX-Av2Om.js} +1 -1
  36. package/dist/assets/{Verified-C6qIp--t.js → Verified-BQeezku1.js} +1 -1
  37. package/dist/assets/{VerifiedUser-Bg3Gv2Vm.js → VerifiedUser-RW47UR2w.js} +1 -1
  38. package/dist/assets/{ViewList-cT0wwN-5.js → ViewList-DqYPCI-E.js} +1 -1
  39. package/dist/assets/{_createAggregator-DFMM18eQ.js → _createAggregator-5Fftcexu.js} +1 -1
  40. package/dist/assets/{actions-Bme9nBfF.js → actions-D64g1c7L.js} +1 -1
  41. package/dist/assets/{actions-CdUK4R4K.js → actions-Ov9HmpEw.js} +1 -1
  42. package/dist/assets/{agreement-B7_hHdi9.js → agreement-mN9UPuLB.js} +1 -1
  43. package/dist/assets/api-DKIvFibS.js +1 -0
  44. package/dist/assets/{appearance-BAU75gwY.js → appearance-DfTpAXr4.js} +1 -1
  45. package/dist/assets/{ar-CcCysAXs.js → ar-C6feXgCU.js} +3 -3
  46. package/dist/assets/{audit-logs-BRCxlOPX.js → audit-logs-thBiWriP.js} +1 -1
  47. package/dist/assets/{base-chart-CoPrXOgN.js → base-chart-BGirt4Mn.js} +1 -1
  48. package/dist/assets/{blocklet-DxxuDtDd.js → blocklet-DLDh_xx4.js} +1 -1
  49. package/dist/assets/{chain-CzJs2FaF.js → chain-DZ88My0U.js} +1 -1
  50. package/dist/assets/{click-to-copy-BpGKSPIq.js → click-to-copy-Btn7osS5.js} +1 -1
  51. package/dist/assets/client-dGp_pJel.js +1 -0
  52. package/dist/assets/cloneDeep-C1g_DWn4.js +1 -0
  53. package/dist/assets/{collapse-DDx3Se-u.js → collapse-cq9L6hiJ.js} +1 -1
  54. package/dist/assets/{config-navigation-_EYoDYyK.js → config-navigation-RcB2NlQw.js} +3 -3
  55. package/dist/assets/{connect-to-DK3YrVRl.js → connect-to-DS_CTXt7.js} +1 -1
  56. package/dist/assets/{cssMode-wlscPrk9.js → cssMode-CYe1WWE4.js} +1 -1
  57. package/dist/assets/de-Bac37XGJ.js +7 -0
  58. package/dist/assets/{delete-confirm-BpzBze8z.js → delete-confirm-C_IV5rS4.js} +1 -1
  59. package/dist/assets/{depsEqual-D4qhf48v.js → depsEqual-C35aJ6fX.js} +1 -1
  60. package/dist/assets/{detail-rHECq0CZ.js → detail-znyX61zh.js} +3 -3
  61. package/dist/assets/{domains-DJbBkJa2.js → domains-Yfo-yUpa.js} +1 -1
  62. package/dist/assets/{download-MY8FKHA1.js → download-DUWhW0i0.js} +1 -1
  63. package/dist/assets/emotion-cache.browser.esm-D-8-5Qqp.js +1 -0
  64. package/dist/assets/engine-NE_bcM5l.js +1 -0
  65. package/dist/assets/es-yR0ybdzc.js +9 -0
  66. package/dist/assets/fr-Ck_83QEV.js +7 -0
  67. package/dist/assets/{freemarker2-Qqfk0nUi.js → freemarker2-DrXLqJsQ.js} +1 -1
  68. package/dist/assets/{get-safe-url-vKpbgfEn.js → get-safe-url-WrjxIbow.js} +1 -1
  69. package/dist/assets/getValidReactChildren-kYI4jRgi.js +1 -0
  70. package/dist/assets/{graphqlMode-DcGinoEv.js → graphqlMode-0yg_NoI5.js} +2 -2
  71. package/dist/assets/{handlebars-DPShQ3J3.js → handlebars-DocVoj5v.js} +1 -1
  72. package/dist/assets/hi-uFi-fD-h.js +5 -0
  73. package/dist/assets/{html-DY7vjcfj.js → html-CAvnDX7h.js} +1 -1
  74. package/dist/assets/{htmlMode-BXbbLmnG.js → htmlMode-CMbQMo4p.js} +1 -1
  75. package/dist/assets/{id-CsK9Cnbo.js → id-vCjhjvq0.js} +3 -3
  76. package/dist/assets/{iframe-BW1FqOmD.js → iframe-TuMfzu_u.js} +1 -1
  77. package/dist/assets/{index-Cw7or6L8.js → index-2CtjRwN7.js} +1 -1
  78. package/dist/assets/index-2lwNEw4H.js +163 -0
  79. package/dist/assets/{index-CeqGY73Y.js → index-7gsNWNx1.js} +1 -1
  80. package/dist/assets/{index-BwktDBoi.js → index-B-SpV4Ip.js} +1 -1
  81. package/dist/assets/{index-t1zsNxNX.js → index-B3BB7eqU.js} +3 -3
  82. package/dist/assets/{index-COCoWUpw.js → index-B5U6Xhkj.js} +1 -1
  83. package/dist/assets/{index-CSCzsyNv.js → index-BRYl-UyK.js} +1 -1
  84. package/dist/assets/{index-Bt3HuVYr.js → index-BbdsGvpI.js} +1 -1
  85. package/dist/assets/{index-B-8VRY8W.js → index-Bc4XPWC3.js} +1 -1
  86. package/dist/assets/{index-DaR-YDyo.js → index-Bhz6YZ5l.js} +1 -1
  87. package/dist/assets/{index-CFlheGNL.js → index-Bj6H1B4Z.js} +1 -1
  88. package/dist/assets/{index-DJDK0L2i.js → index-BjLMysVB.js} +9 -9
  89. package/dist/assets/{index-1ieYcci9.js → index-ByZzQ0r1.js} +11 -11
  90. package/dist/assets/{index-BUwi80JW.js → index-ByyGaJQC.js} +1 -1
  91. package/dist/assets/{index-C_WfbPqz.js → index-C4IrPGjb.js} +1 -1
  92. package/dist/assets/{index-BJ1o6C6U.js → index-C6IrCCvU.js} +1 -1
  93. package/dist/assets/{index-B_8mJR1J.js → index-C8B19Suz.js} +1 -1
  94. package/dist/assets/{index-DB7mpC0v.js → index-C99CaRqd.js} +1 -1
  95. package/dist/assets/{index-CJlHEguG.js → index-CK_w-RKC.js} +1 -1
  96. package/dist/assets/{index-VQBAFIvA.js → index-CKc942wN.js} +2 -2
  97. package/dist/assets/{index-DdT_Bsba.js → index-CLJo_ZRf.js} +3 -3
  98. package/dist/assets/index-CTMvQBXJ.js +120 -0
  99. package/dist/assets/{index-B9R-XK-O.js → index-CUsQzTM0.js} +1 -1
  100. package/dist/assets/{index-55LTi2YM.js → index-CVe26v9m.js} +1 -1
  101. package/dist/assets/index-CaSqDrQJ.js +20 -0
  102. package/dist/assets/{index-7YlHxq_1.js → index-CdLaBL6r.js} +3 -3
  103. package/dist/assets/{index-M7TMcTCW.js → index-CfDErAp8.js} +1 -1
  104. package/dist/assets/{index-B6aOKE2k.js → index-CmOss_WU.js} +1 -1
  105. package/dist/assets/{index-DJNEdvwh.js → index-CvXrq2y2.js} +1 -1
  106. package/dist/assets/{index-DX2TiS2s.js → index-Cvuv-dHw.js} +2 -2
  107. package/dist/assets/index-Cx9Rxh8C.js +1 -0
  108. package/dist/assets/{index-BHKwO-Qo.js → index-D5FJgsNk.js} +3 -3
  109. package/dist/assets/{index-n2PU-CcY.js → index-D5wD9tqC.js} +1 -1
  110. package/dist/assets/{index-B9csEnaJ.js → index-DAyHEo4e.js} +1 -1
  111. package/dist/assets/{index-3-XTQAjW.js → index-DIhjnyYK.js} +1 -1
  112. package/dist/assets/{index-BGjHw-jQ.js → index-DSmIN8Lk.js} +90 -90
  113. package/dist/assets/{index-B8gA92Dw.js → index-DWHdpvDd.js} +1 -1
  114. package/dist/assets/{index-DWsUER_c.js → index-Dv8OKOCm.js} +1 -1
  115. package/dist/assets/{index-DSIZ4WUJ.js → index-DxKjLuQU.js} +1 -1
  116. package/dist/assets/{index-CS2c1-99.js → index-DzJlUXPN.js} +1 -1
  117. package/dist/assets/{index-Bbktq9jr.js → index-GypVneLV.js} +1 -1
  118. package/dist/assets/{index-BoSKx-3H.js → index-LF8taadH.js} +1 -1
  119. package/dist/assets/{index-C6e7bjfS.js → index-S5q_uMQU.js} +1 -1
  120. package/dist/assets/{index-BjYZKyD9.js → index-WwrDUgja.js} +1 -1
  121. package/dist/assets/{index-DcIaMKCn.js → index-cF_RbLJB.js} +1 -1
  122. package/dist/assets/{index-B85k3I0z.js → index-eQNvctSG.js} +1 -1
  123. package/dist/assets/{index-C2RM00E5.js → index-q_hTfpTA.js} +1 -1
  124. package/dist/assets/{index.esm-DjyjR9DX.js → index.esm-B9eKOJrD.js} +1 -1
  125. package/dist/assets/{install-from-url-50WHkmcy.js → install-from-url-Catd2dIx.js} +1 -1
  126. package/dist/assets/{invitation-BMRfRUNn.js → invitation-DdYhUro0.js} +1 -1
  127. package/dist/assets/{is-path-prefix-equal-DZF3zLXU.js → is-path-prefix-equal-QFrFkcRe.js} +1 -1
  128. package/dist/assets/{item-CmUJpRUG.js → item-HR0eNm12.js} +1 -1
  129. package/dist/assets/{ja-bb6qPt27.js → ja-BpmpH32u.js} +3 -3
  130. package/dist/assets/{javascript-Dru_doUe.js → javascript-CdfhYZK0.js} +1 -1
  131. package/dist/assets/{jsonMode-CKIXu-eI.js → jsonMode-BCBLnATI.js} +1 -1
  132. package/dist/assets/{ko-DxiDEd1I.js → ko-KPtXpJmI.js} +3 -3
  133. package/dist/assets/{liquid-BQFDIANO.js → liquid-O2GLjFyj.js} +1 -1
  134. package/dist/assets/{list-header-hmApugaf.js → list-header-BXNq7AiD.js} +1 -1
  135. package/dist/assets/{log-ffg9hr-o.js → log-CWLio4EI.js} +1 -1
  136. package/dist/assets/{lottie-react.esm-B2dXnGld.js → lottie-react.esm-CQpDaqeX.js} +1 -1
  137. package/dist/assets/{mdx-B11M142O.js → mdx-BrLzyMAp.js} +1 -1
  138. package/dist/assets/{memory-o3keM0c3.js → memory-xjGb5J-2.js} +1 -1
  139. package/dist/assets/{metric-rYGW-9vt.js → metric-srGkHZo_.js} +1 -1
  140. package/dist/assets/omit-CblnAea-.js +1 -0
  141. package/dist/assets/{overview-Cvbqap03.js → overview-B0FHoD2J.js} +1 -1
  142. package/dist/assets/{permission-C1RZ4tb5.js → permission-D8AA2j8a.js} +1 -1
  143. package/dist/assets/{preference-CWp52IT1.js → preference-qUkBQeHJ.js} +3 -3
  144. package/dist/assets/pt-DMhdW8tM.js +5 -0
  145. package/dist/assets/{python-BFjKNPTF.js → python-CoQw-E4H.js} +1 -1
  146. package/dist/assets/{raf-schd.esm-BNXK89xb.js → raf-schd.esm-wby_E5ZF.js} +1 -1
  147. package/dist/assets/{razor-C10JZg4P.js → razor-BDeR06dV.js} +1 -1
  148. package/dist/assets/{rotate-session-key-CH6BtiuM.js → rotate-session-key-Dl3UmPcz.js} +1 -1
  149. package/dist/assets/ru-iMSChq7P.js +5 -0
  150. package/dist/assets/{runtime-BddJCu2Z.js → runtime-D1Pjlk5o.js} +1 -1
  151. package/dist/assets/schema-BTObaR2x.js +1 -0
  152. package/dist/assets/sdk-CKMexl7S.js +1 -0
  153. package/dist/assets/{service-I_BVIRjC.js → service-DF_6raHa.js} +1 -1
  154. package/dist/assets/{shorten-label-C0nC06EK.js → shorten-label-CQ2mcJGL.js} +1 -1
  155. package/dist/assets/{simple-select-Dq4eH3Z5.js → simple-select-CaAamOhK.js} +1 -1
  156. package/dist/assets/{spaces-TN4UdKD7.js → spaces-Cw5dyT82.js} +1 -1
  157. package/dist/assets/{status-MhdxvHuN.js → status-D54K3RUR.js} +1 -1
  158. package/dist/assets/{status-DKWcjPi5.js → status-bhklMhAj.js} +1 -1
  159. package/dist/assets/{switch-control-xi5xOnff.js → switch-control-DFulS16M.js} +1 -1
  160. package/dist/assets/{table-icons-DAQhRile.js → table-icons-BfWw05z2.js} +1 -1
  161. package/dist/assets/{team-oS0T7K1r.js → team-BLrn7VS2.js} +1 -1
  162. package/dist/assets/th-DbMd7IRR.js +5 -0
  163. package/dist/assets/{toLower-5ro7hWGW.js → toLower-Cfpyt4eW.js} +1 -1
  164. package/dist/assets/toUpper-C8HDO4pv.js +1 -0
  165. package/dist/assets/{traffic-CnPSz4wt.js → traffic-D5lH-Qti.js} +1 -1
  166. package/dist/assets/{tsMode-uM8D-X_Z.js → tsMode-D4ysns_Y.js} +1 -1
  167. package/dist/assets/{typescript-B0Y5UsPY.js → typescript-tlISCoEP.js} +1 -1
  168. package/dist/assets/{url-evaluation-CkF_rVJP.js → url-evaluation-CnxlGDaY.js} +1 -1
  169. package/dist/assets/{url-join-B2I2wiTE.js → url-join-CmQWf24D.js} +1 -1
  170. package/dist/assets/{use-mobile-CrxQdGcZ.js → use-mobile-D73gcDpA.js} +1 -1
  171. package/dist/assets/{use-mobile-Bi2nMTFx.js → use-mobile-Du8kf9CZ.js} +1 -1
  172. package/dist/assets/{useAsync-CAkfYwzQ.js → useAsync-CdFxv1Yw.js} +1 -1
  173. package/dist/assets/{useAsyncRetry-q3S75JEr.js → useAsyncRetry-BkYf8OA3.js} +1 -1
  174. package/dist/assets/{useLocalStorage-DemYxCTT.js → useLocalStorage-DTDaPcMQ.js} +1 -1
  175. package/dist/assets/{useThemeProps-CTl-EdJ3.js → useThemeProps-FM7Bl9Z4.js} +1 -1
  176. package/dist/assets/{util-CcL4yrb2.js → util-DVAAYq4O.js} +1 -1
  177. package/dist/assets/vi-CmYRzn_U.js +5 -0
  178. package/dist/assets/{wait-container-ClHfAptV.js → wait-container-DbcHCshY.js} +1 -1
  179. package/dist/assets/{without-wallet-CuWFjKH0.js → without-wallet-yCrd-wY2.js} +1 -1
  180. package/dist/assets/wrap-locale-B1w0mMGL.js +1 -0
  181. package/dist/assets/{xml-DXorBSx3.js → xml-CkjYbaAI.js} +1 -1
  182. package/dist/assets/{yaml-nd1Neb2K.js → yaml-D5gmQkdY.js} +1 -1
  183. package/dist/assets/{zh-DkzyaEBh.js → zh-Dz39CLak.js} +3 -3
  184. package/dist/assets/{zh-tw-BNjyxfNh.js → zh-tw-CCltfULq.js} +3 -3
  185. package/dist/index.html +1 -1
  186. package/dist/service-worker.js +1 -1
  187. package/package.json +1 -1
  188. package/dist/assets/ArrowDropDown-BCAdjBjK.js +0 -1
  189. package/dist/assets/api-Ck-zvycJ.js +0 -1
  190. package/dist/assets/client-C-vk08Vn.js +0 -1
  191. package/dist/assets/cloneDeep-Dkfm8VBo.js +0 -1
  192. package/dist/assets/de-BTXwRUYy.js +0 -7
  193. package/dist/assets/emotion-cache.browser.esm-DbJKstH3.js +0 -1
  194. package/dist/assets/engine-Cfb30esF.js +0 -1
  195. package/dist/assets/es-DCyLy_vM.js +0 -9
  196. package/dist/assets/fr-CNGOyo0v.js +0 -7
  197. package/dist/assets/getValidReactChildren-a3_fEqAv.js +0 -1
  198. package/dist/assets/hi-DsFnKfzk.js +0 -5
  199. package/dist/assets/index-B-Y0AnSu.js +0 -20
  200. package/dist/assets/index-B35ISoUS.js +0 -1
  201. package/dist/assets/index-CVcwZKHE.js +0 -120
  202. package/dist/assets/index-Dr8YnekS.js +0 -163
  203. package/dist/assets/omit-CXboSI2N.js +0 -1
  204. package/dist/assets/pt-Yj5llJx7.js +0 -5
  205. package/dist/assets/ru-DaVu35Yr.js +0 -5
  206. package/dist/assets/schema-DyznD-qm.js +0 -1
  207. package/dist/assets/sdk-DTvEp2g_.js +0 -1
  208. package/dist/assets/th-DEoqTEHf.js +0 -5
  209. package/dist/assets/toUpper-BSy5KpPm.js +0 -1
  210. package/dist/assets/vi-D7Q19sbd.js +0 -5
  211. package/dist/assets/wrap-locale-DOGf8_5t.js +0 -1
@@ -1,163 +0,0 @@
1
- import{aG as ue,j as e,hb as qs,hc as Ms,bL as zs,be as _t,a4 as re,dE as Y,dH as zt,dF as Bs,bu as Hs,dG as Fs,U as Bt,o as T,r as L,g as ce,t as U,N as A,C as Se,f1 as rt,bi as ut,hd as Ns,s as ye,eK as ht,he as Zs,b2 as Ht,cw as Vs,cP as Us,dk as Ws,T as J,dC as nt,bn as ne,bz as ft,hf as Js,bA as mt,b as te,bg as X,H as V,aV as ae,m as ie,n as Ft,q as Ks,w as Nt,ad as Gs,J as Zt,g4 as Ys,hg as Xs,au as Qs,aU as G,V as Pe,$ as _e,D as er,X as tr,v as Q,Y as at,hh as sr,hi as rr,ew as nr,ey as ar,I as xe,E as W,hj as ir,cW as wt,W as or,fm as Vt,az as se,aR as kt,hk as lr,f9 as Ie,cr as E,Q as ee,aE as K,aP as ge,by as Ce,hl as cr,hm as dr,hn as ur,a2 as hr,ho as We,c2 as Te,ez as fr,hp as mr,dD as de,f as Re,y as Ut,bv as it,O as pr,cD as Wt,g3 as gr,fI as Fe,hq as yr,b9 as vr,L as xr,cq as Me,aK as ze,hr as br,ag as St,a3 as Jt,bj as Be,hs as Kt,b6 as jr,gt as je,fa as Gt,cU as Yt,B as _r,b5 as Ct,fb as wr,fg as kr,G as Je,M as Sr,bt as Cr}from"./index-BGjHw-jQ.js";import{F as Xt,s as Rr,L as be,S as $r,B as Ar}from"./preference-CWp52IT1.js";import{N as Rt}from"./ChevronRight-DDhIWK8t.js";import{T as He}from"./index-DWsUER_c.js";import{w as Ee,P as Or}from"./permission-C1RZ4tb5.js";import{u as pt}from"./index-B35ISoUS.js";import{D as Qt}from"./Done-Cz6nN-bV.js";import{R as es}from"./collapse-DDx3Se-u.js";import{e as Pr,g as Tr}from"./chain-CzJs2FaF.js";import{A as Ir}from"./ArrowDropDown-BCAdjBjK.js";import{B as Er}from"./ButtonGroup-CO-3Gd2r.js";import{A as Dr,a as $t}from"./Autocomplete-BWhtsDmg.js";import{S as z,B as Lr}from"./index-3-XTQAjW.js";import{C as qr,R as Mr,P as zr}from"./rotate-session-key-CH6BtiuM.js";import{u as le}from"./blocklet-DxxuDtDd.js";import{C as Br}from"./click-to-copy-BpGKSPIq.js";import{u as Ne}from"./team-oS0T7K1r.js";import{v as ts}from"./index-n2PU-CcY.js";import{V as Hr,d as Fr}from"./status-DKWcjPi5.js";import{S as pe}from"./Switch-DHHERzZ6.js";import{y as Nr}from"./index-B_8mJR1J.js";import{I as Zr,J as Vr,K as Ur,L as Wr}from"./index-Cw7or6L8.js";import{u as we,C as F,b as At}from"./index.esm-DjyjR9DX.js";import{S as Ze,u as Jr}from"./switch-control-xi5xOnff.js";import{D as Ot,R as ss,a as rs}from"./url-evaluation-CkF_rVJP.js";import{A as Pt}from"./Add-DNK3-YER.js";import{S as Kr}from"./Slider-DnheougG.js";import{H as Ve}from"./index-B8gA92Dw.js";import"./index-BwktDBoi.js";import{l as Gr}from"./index-DaR-YDyo.js";import{u as ns}from"./use-mobile-Bi2nMTFx.js";import{S as Ke}from"./simple-select-Dq4eH3Z5.js";import{G as Yr}from"./actions-CdUK4R4K.js";import{C as Xr}from"./CardContent-CRWKEGyT.js";import"./omit-CXboSI2N.js";import"./index-55LTi2YM.js";import"./index-B-8VRY8W.js";import"./iframe-BW1FqOmD.js";import"./getValidReactChildren-a3_fEqAv.js";import"./ListSubheader-B1S4gfd7.js";import"./ErrorOutline-BPdDMUCb.js";import"./redux-DfszZyTl.js";import"./typeof-QjJsDpFa.js";import"./visuallyHidden-Dan1xhjv.js";import"./FilterList-CkOj30Dt.js";import"./CSSTransition-DVvLNPEG.js";import"./emotion-cache.browser.esm-DbJKstH3.js";import"./depsEqual-D4qhf48v.js";import"./TableSearch-23MMpd51.js";import"./Search-D4YbOYOK.js";import"./Clear-B_fV2Y4r.js";import"./MoreVert-BbI3jg4_.js";import"./useLocalStorage-DemYxCTT.js";import"./get-safe-url-vKpbgfEn.js";const as=ue([e.jsx("path",{d:"M21 7.28V5c0-1.1-.9-2-2-2H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-2.28c.59-.35 1-.98 1-1.72V9c0-.74-.41-1.37-1-1.72M20 9v6h-7V9zM5 19V5h14v2h-6c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h6v2z"},"0"),e.jsx("circle",{cx:"16",cy:"12",r:"1.5"},"1")]),Qr=ue([e.jsx("path",{d:"M19 5v14H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2"},"0"),e.jsx("path",{d:"M14 17H7v-2h7zm3-4H7v-2h10zm0-4H7V7h10z"},"1")]),en=ue(e.jsx("path",{d:"M21 8V7l-3 2-3-2v1l3 2zm1-5H2C.9 3 0 3.9 0 5v14c0 1.1.9 2 2 2h20c1.1 0 1.99-.9 1.99-2L24 5c0-1.1-.9-2-2-2M8 6c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3m6 12H2v-1c0-2 4-3.1 6-3.1s6 1.1 6 3.1zm8-6h-8V6h8z"})),tn=ue(e.jsx("path",{d:"M24 9v2h-6V9zM8 4C5.79 4 4 5.79 4 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4m0 9c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4m4.51-8.95C13.43 5.11 14 6.49 14 8s-.57 2.89-1.49 3.95C14.47 11.7 16 10.04 16 8s-1.53-3.7-3.49-3.95m4.02 9.78C17.42 14.66 18 15.7 18 17v3h2v-3c0-1.45-1.59-2.51-3.47-3.17"})),sn=ue(e.jsx("path",{d:"M21 10h-8.35C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H13l2 2 2-2 2 2 4-4.04zM7 15c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3"})),rn=ue(e.jsx("path",{d:"M21 10h-8.35C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H13l2 2 2-2 2 2 4-4.04zM7 15c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3"})),ot=ue(e.jsx("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1z"})),nn=ue([e.jsx("path",{d:"M18 11c.7 0 1.37.1 2 .29V10c0-1.1-.9-2-2-2h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h6.26c-.79-1.13-1.26-2.51-1.26-4 0-3.87 3.13-7 7-7M8.9 6c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1v2H8.9z"},"0"),e.jsx("path",{d:"M18 13c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5m0 2c.83 0 1.5.67 1.5 1.5S18.83 18 18 18s-1.5-.67-1.5-1.5.67-1.5 1.5-1.5m0 6c-1.03 0-1.94-.52-2.48-1.32.73-.42 1.57-.68 2.48-.68s1.75.26 2.48.68c-.54.8-1.45 1.32-2.48 1.32"},"1")]),an=ue(e.jsx("path",{d:"M11 7 9.6 8.4l2.6 2.6H2v2h10.2l-2.6 2.6L11 17l5-5zm9 12h-8v2h8c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-8v2h8z"})),on=ue(e.jsx("path",{d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2m6-6v-5c0-3.07-1.63-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.64 5.36 6 7.92 6 11v5l-2 2v1h16v-1zm-2 1H8v-6c0-2.48 1.51-4.5 4-4.5s4 2.02 4 4.5z"})),is=ue(e.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2m4.24 16L12 15.45 7.77 18l1.12-4.81-3.73-3.23 4.92-.42L12 5l1.92 4.53 4.92.42-3.73 3.23z"})),ln=ue(e.jsx("path",{d:"M3 18c0 .55.45 1 1 1h5v-2H4c-.55 0-1 .45-1 1M3 6c0 .55.45 1 1 1h9V5H4c-.55 0-1 .45-1 1m10 14v-1h7c.55 0 1-.45 1-1s-.45-1-1-1h-7v-1c0-.55-.45-1-1-1s-1 .45-1 1v4c0 .55.45 1 1 1s1-.45 1-1M7 10v1H4c-.55 0-1 .45-1 1s.45 1 1 1h3v1c0 .55.45 1 1 1s1-.45 1-1v-4c0-.55-.45-1-1-1s-1 .45-1 1m14 2c0-.55-.45-1-1-1h-9v2h9c.55 0 1-.45 1-1m-5-3c.55 0 1-.45 1-1V7h3c.55 0 1-.45 1-1s-.45-1-1-1h-3V4c0-.55-.45-1-1-1s-1 .45-1 1v4c0 .55.45 1 1 1"})),cn=ue(e.jsx("path",{d:"M16 13c3.09-2.81 6-5.44 6-7.7C22 3.45 20.55 2 18.7 2c-1.04 0-2.05.49-2.7 1.25C15.34 2.49 14.34 2 13.3 2 11.45 2 10 3.45 10 5.3c0 2.26 2.91 4.89 6 7.7m-2.7-9c.44 0 .89.21 1.18.55L16 6.34l1.52-1.79c.29-.34.74-.55 1.18-.55.74 0 1.3.56 1.3 1.3 0 1.12-2.04 3.17-4 4.99-1.96-1.82-4-3.88-4-4.99 0-.74.56-1.3 1.3-1.3M19 16h-2c0-1.2-.75-2.28-1.87-2.7L8.97 11H1v11h6v-1.44l7 1.94 8-2.5v-1c0-1.66-1.34-3-3-3M3 20v-7h2v7zm10.97.41L7 18.48V13h1.61l5.82 2.17c.34.13.57.46.57.83 0 0-1.99-.05-2.3-.15l-2.38-.79-.63 1.9 2.38.79c.51.17 1.04.26 1.58.26H19c.39 0 .74.23.9.56z"}));var dn=Array.prototype,Tt=dn.splice;function un(x,C,$,R){var _=Ms,b=-1,m=C.length,r=x;for(x===C&&(C=qs(C));++b<m;)for(var p=0,f=C[b],u=f;(p=_(r,u,p))>-1;)r!==x&&Tt.call(r,p,1),Tt.call(x,p,1);return x}function hn(x,C){return x&&x.length&&C&&C.length?un(x,C):x}var fn=zs(hn);const mn={width:24,height:24,body:'<path fill="currentColor" d="M4.975 15q-.425 0-.7-.288T4 14q0-.425.288-.713T5 13h14.025q.425 0 .7.288T20 14q0 .425-.288.713T19 15H4.975Zm0 4q-.425 0-.7-.288T4 18q0-.425.288-.713T5 17h14.025q.425 0 .7.288T20 18q0 .425-.288.713T19 19H4.975Zm0-8q-.425 0-.7-.288T4 10q0-.425.288-.713T5 9h14.025q.425 0 .7.288T20 10q0 .425-.288.713T19 11H4.975Zm0-4q-.425 0-.7-.288T4 6q0-.425.288-.713T5 5h14.025q.425 0 .7.288T20 6q0 .425-.288.713T19 7H4.975Z"/>'};function os({triggers:x=[],onEnterEdit:C,disabled:$}){const R=_t.useRef(null),[_,b]=_t.useState(!1),m=f=>{b(!1),f()},r=()=>{b(f=>!f)},p=f=>{R.current&&R.current.contains(f.target)||b(!1)};return x.length===0?e.jsx(re,{"data-cy":"schema-form-item-edit",onClick:C,disabled:$,size:"large",children:e.jsx(Pr,{})}):e.jsxs(e.Fragment,{children:[e.jsx(Er,{variant:"outlined",ref:R,"aria-label":"split button",children:e.jsx(Y,{size:"large","aria-controls":_?"split-button-menu":void 0,"aria-expanded":_?"true":void 0,sx:{paddingLeft:"12px",paddingRight:"12px"},onClick:r,children:e.jsx(Ir,{})})}),e.jsx(zt,{sx:{zIndex:9999},open:_,anchorEl:R.current,role:void 0,placement:"bottom-end",children:e.jsx(Bs,{children:e.jsx(Hs,{onClickAway:p,children:e.jsx(Fs,{id:"split-button-menu",autoFocusItem:!0,children:x.map(f=>e.jsx(Bt,{onClick:()=>m(f.handler),children:f.title},f.key))})})})})]})}os.propTypes={triggers:T.arrayOf(T.shape({key:T.string.isRequired,title:T.string.isRequired,handler:T.func.isRequired})),onEnterEdit:T.func.isRequired,disabled:T.bool.isRequired};const It=(x,C,$)=>x===null&&C&&$?"******":x?C?"******":x:"",pn=Ns`
2
- 0%, 100% {
3
- transform: scale(1) translateX(0);
4
- }
5
- 50% {
6
- transform: scale(1.05) translateX(-3px);
7
- }
8
- 25%, 75% {
9
- transform: scale(1.1) translateX(3px);
10
- }
11
- `;function ls({label:x="",disabled:C=!1,required:$=!1,initialValue:R="",onChange:_=()=>{},placeholder:b="",style:m={},onSubmit:r=()=>{},secure:p=!1,type:f="",triggers:u=[],formatterBeforeSubmit:t=null,directEditing:l=!1,autoFocus:i=!0,errorTips:n="",...s}){const[c,a]=L.useState(l),[o,h]=L.useState(!1),{t:g}=L.useContext(ce),[v,k]=L.useState(p&&R==="__encrypted__"?null:R),[w,d]=L.useState(v),[y,j]=L.useState(!1),[S,O]=L.useState(!1),P=async()=>{h(!0);try{if(await r(w)===!1)d(v);else{let H=w;typeof t=="function"&&(H=t(w)),d(H),k(H),j(!1)}}catch{d(v)}finally{h(!1),a(!1)}};L.useEffect(()=>{const q=p&&R==="__encrypted__"?null:R;q!==v&&(k(q),d(q),j(!1))},[R,p,v]);const D=q=>{j(q!==w),d(q),_(q)},I=q=>{q.key==="Enter"&&P()},B=L.useCallback(()=>{O(!0),setTimeout(()=>{O(!1)},500)},[]),N=L.useCallback(()=>{if(l&&!C&&!o){P();return}y&&B(),!y&&!C&&!o&&(a(!1),j(!1))},[l,C,o,y,B]),M=c||l?e.jsx(U,{style:{flex:1},fullWidth:!0,value:w,onChange:q=>{D(q.target.value)},autoFocus:i,size:"small",variant:"outlined",placeholder:b,onKeyDown:I,onBlur:N,disabled:C,error:!!n,type:p?"password":f||"text",...s}):e.jsx(A,{"data-cy":"schema-form-item-edit",className:"form-item-input slot",style:{whiteSpace:"pre-wrap",cursor:"text"},onClick:()=>{C||a(!0)},sx:{px:1},children:It(w,p,R)?It(w,p,R):e.jsx("span",{className:"placeholder",children:g("common.requiredInputPlaceholder",{name:b||x})})});return e.jsx(Xt,{className:"form",style:m,children:e.jsxs(A,{children:[e.jsxs(A,{className:"form-item-label",children:[x,$&&e.jsx(es,{})]}),e.jsxs(A,{className:"form-item-body",style:{alignItems:"flex-start"},children:[e.jsx(A,{className:"form-item-input",children:M}),e.jsx(A,{className:"form-item-action",style:{marginLeft:!u.length||l?0:12},children:c&&!l?e.jsxs(e.Fragment,{children:[y?e.jsx(re,{"data-cy":"schema-form-item-confirm",onClick:P,disabled:C||o||!y,sx:{animation:S?`${pn} 0.5s linear`:"none"},style:{paddingRight:4},size:"large",children:o?e.jsx(Se,{size:24}):e.jsx(Qt,{})}):null,e.jsx(re,{"data-cy":"schema-form-item-cancel",onClick:()=>{d(v),a(!1),j(!1)},style:{paddingLeft:y?4:8},disabled:C||o,size:"large",children:e.jsx(rt,{})})]}):e.jsx(A,{children:u.length?e.jsx(os,{triggers:u,disabled:C}):null})})]}),n&&e.jsx(ut,{error:!0,children:n})]})})}ls.propTypes={style:T.object,onSubmit:T.func,onChange:T.func,label:T.string,initialValue:T.string,placeholder:T.string,required:T.bool,disabled:T.bool,secure:T.bool,triggers:T.array,formatterBeforeSubmit:T.func,directEditing:T.bool,type:T.string,autoFocus:T.bool,errorTips:T.string};function cs({label:x="",disabled:C=!1,required:$=!1,initialValue:R="",onChange:_=()=>{},style:b={},onSubmit:m=()=>{},triggers:r=[],options:p=[],formatterBeforeSubmit:f=a=>a.join(","),helperText:u="",placeholder:t="",renderImage:l=()=>null,renderLabel:i=()=>"",filterKeys:n=["name"],noEmpty:s=!1,...c}){const[a,o]=L.useState(!1),[h,g]=L.useState(!1),[v,k]=L.useState(""),w=L.useRef(null),[d,y]=L.useState(R),[j,S]=L.useState(d),O=L.useMemo(()=>{if(!p)return{};const M={};return p.forEach(q=>{M[q.code]=q}),M},[p]),P=()=>{if(!p)return[];if(!v)return p.map(q=>q.code);const M=new RegExp(v.toLowerCase());return p.filter(q=>{for(let H=0;H<n.length;H++){const Z=n[H];if(M.test(q[Z]?.toLowerCase()))return!0}return!1}).map(q=>q.code)},D=async()=>{g(!0);try{await m(typeof f=="function"?f(j):j)===!1?S(d):s&&!j.length?(S(R),y(R)):(S(j),y(j))}catch{S(d)}finally{g(!1),o(!1)}},I=(M,q)=>{if(!Array.isArray(q)){S([]),_([]);return}const H=q.filter(Z=>O[Z]);if(!H.length){S([]),_([]);return}S(H),_(H)},B=M=>{M.stopPropagation(),o(!0),setTimeout(()=>{if(w.current){const q=w.current.querySelector("input");q&&q.focus()}},500)},N=a?e.jsx(Dr,{ref:w,options:p,value:j,onChange:I,inputValue:v,onInputChange:(M,q)=>{k(q)},fullWidth:!0,multiple:!0,variant:"outlined",margin:"dense",filterOptions:P,getOptionLabel:M=>O[M]?.name,renderInput:M=>e.jsx(U,{...M,label:"",placeholder:t}),renderOption:(M,q)=>{const H=j.indexOf(q)!==-1;return L.createElement(gn,{component:"li",...M,key:q},l(O[q]||{}),e.jsx(A,{sx:{"& > img":{mr:2,flexShrink:0}},style:{flex:1,fontWeight:H?"700":"normal"},children:i(q,O[q])||O[q]?.name}),e.jsx(A,{component:rt,sx:{opacity:.5,width:18,height:18},style:{visibility:H?"visible":"hidden"}}))},...c,slots:{popper:yn}}):e.jsx(A,{className:"form-item-input slot",onClick:B,style:{whiteSpace:"pre-wrap",cursor:"text"},sx:{px:1},children:j.filter(M=>p.some(q=>q.code===M)).map(M=>e.jsx(ht,{label:p.find(q=>q.code===M).name,style:{marginRight:8},size:"small"},M))});return e.jsx(Xt,{className:"form",style:b,children:e.jsxs(A,{className:"form-item",children:[e.jsxs(A,{className:"form-item-label",children:[x,$&&e.jsx(es,{})]}),e.jsxs(A,{className:"form-item-body",children:[e.jsx(A,{className:"form-item-input",children:N}),a?e.jsx(A,{className:"form-item-action",children:e.jsxs(e.Fragment,{children:[e.jsx(re,{"data-cy":"schema-form-item-confirm",onClick:D,disabled:C||h,size:"large",children:h?e.jsx(Se,{size:24}):e.jsx(Qt,{})}),e.jsx(re,{"data-cy":"schema-form-item-cancel",onClick:()=>{S(d),o(!1)},disabled:C||h,size:"large",children:e.jsx(rt,{})})]})}):null]}),a&&u&&e.jsx(ut,{children:u})]})})}cs.propTypes={style:T.object,onSubmit:T.func,onChange:T.func,label:T.string,initialValue:T.string,required:T.bool,disabled:T.bool,triggers:T.array,options:T.array,helperText:T.string,formatterBeforeSubmit:T.func,placeholder:T.string,renderImage:T.func,filterKeys:T.arrayOf(T.string),noEmpty:T.bool,renderLabel:T.func};const gn=ye.div`
12
- display: flex;
13
- justify-content: space-between;
14
- align-items: center;
15
- height: 48px;
16
- border-bottom: 1px solid rgba(0, 0, 0, 0.08);
17
- font-size: 1.1em;
18
- `,yn=ye(zt)(()=>({[`& .${$t.paper}`]:{boxShadow:"0px 8px 12px rgba(92, 92, 92, 0.04), 0px -10px 12px rgba(92, 92, 92, 0.04)",borderRadius:"6px",width:"100%",border:"1px solid rgba(0, 0, 0, 0.12)",color:"inherit",fontSize:13,position:"absolute",left:0,top:0},[`& .${$t.listbox}`]:{padding:0}}));function lt({name:x,icon:C,did:$,dark:R=!1}){return e.jsx(Zs,{prefer:R?"dark":"light",children:e.jsx(A,{sx:{display:"flex",justifyContent:"center",alignItems:"center",bgcolor:R?"common.black":"info.main",pl:4,borderRadius:1,overflow:"hidden",height:1},children:e.jsxs(Ht,{sx:{display:"flex",alignItems:"center",p:1.5,width:1,borderRadius:"8px 0 0 8px"},children:[e.jsx(Vs,{sx:{bgcolor:"transparent",width:48,height:48,borderRadius:1},children:C?e.jsx(Us,{src:C,alt:"icon",style:{width:48,height:48,borderRadius:"8px"}}):e.jsx(Ws,{variant:"rectangular",width:48,height:48,sx:{borderRadius:1}})}),e.jsxs(A,{sx:{ml:1,flex:1,width:0,overflow:"hidden"},children:[e.jsx(J,{sx:{fontSize:20,fontWeight:500,color:"text.primary",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:x}),e.jsx(nt,{did:$,inline:!0,size:13})]})]})})})}lt.propTypes={name:T.string.isRequired,icon:T.string.isRequired,did:T.string.isRequired,dark:T.bool};var ds=function(C){return e.jsxs("svg",{...C,children:[e.jsxs("g",{clipPath:"url(#a)",children:[e.jsx("path",{fill:"color(display-p3 .1255 .3333 .898)",d:"M0 0h384v216H0z"}),e.jsxs("g",{filter:"url(#b)",children:[e.jsx("rect",{width:"1600",height:"887.778",x:"32",y:"32",fill:"#fff",rx:"12",shapeRendering:"crispEdges"}),e.jsxs("g",{clipPath:"url(#c)",children:[e.jsx("path",{fill:"color(display-p3 .8745 .8824 .898)",d:"M32 44c0-6.627 5.373-12 12-12h1588v46.667H32V44Z"}),e.jsx("rect",{width:"13.333",height:"13.333",x:"55.333",y:"49.778",fill:"color(display-p3 .9255 .4196 .3686)",rx:"6.667"}),e.jsx("rect",{width:"13.333",height:"13.333",x:"77.556",y:"49.778",fill:"color(display-p3 .9569 .749 .3098)",rx:"6.667"}),e.jsx("rect",{width:"13.333",height:"13.333",x:"99.778",y:"49.778",fill:"color(display-p3 .3804 .7686 .3255)",rx:"6.667"}),e.jsxs("g",{clipPath:"url(#d)",children:[e.jsx("path",{fill:"#fff",d:"M128.667 49.778a8.888 8.888 0 0 1 8.889-8.89h248.888c4.91 0 8.889 3.98 8.889 8.89v28.889H128.667v-28.89Z"}),e.jsx("path",{stroke:"color(display-p3 .2392 .251 .2627)",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.667",d:"m374.222 56.444 3.334 3.334m0 0 3.333-3.334m-3.333 3.334-3.334 3.333m3.334-3.333 3.333 3.333"}),e.jsx("rect",{width:"180",height:"18",x:"140",y:"51",fill:"color(display-p3 .8745 .8824 .898)",rx:"4"})]})]}),e.jsx("path",{fill:"#fff",d:"M32 78.667h1600v40H32z"}),e.jsx("path",{stroke:"color(display-p3 .3765 .3882 .4039)",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.667",d:"M63.111 98.667H49.778m0 0L56.444 92m-6.666 6.667 6.666 6.666m28.889-6.666h13.334m0 0L92 92m6.667 6.667L92 105.333"}),e.jsx("path",{fill:"color(display-p3 .3765 .3882 .4039)",fillRule:"evenodd",d:"M122.278 98.667a5.278 5.278 0 0 1 9.524-3.136l-2.024 2.024h5.555V92l-2.343 2.343a6.944 6.944 0 1 0 .752 7.48.834.834 0 0 0-1.484-.758 5.278 5.278 0 0 1-9.98-2.398Z",clipRule:"evenodd"}),e.jsx("rect",{width:"1360",height:"31.111",x:"152",y:"83.111",fill:"color(display-p3 .9451 .9529 .9569)",rx:"15.556"}),e.jsx("path",{fill:"color(display-p3 .3765 .3882 .4039)",fillRule:"evenodd",d:"M172 93.111a2.778 2.778 0 0 0-2.778 2.778V97h-.555a1.11 1.11 0 0 0-1.111 1.111v5.556c0 .613.497 1.111 1.111 1.111h6.666c.614 0 1.111-.498 1.111-1.111v-5.556A1.11 1.11 0 0 0 175.333 97h-.555v-1.111A2.778 2.778 0 0 0 172 93.11ZM173.667 97v-1.111a1.667 1.667 0 0 0-3.334 0V97h3.334Z",clipRule:"evenodd"}),e.jsx("path",{fill:"color(display-p3 .3765 .3882 .4039)",d:"M195.695 102.373v-4.231c0-.324-.066-.605-.198-.843a1.29 1.29 0 0 0-.577-.562c-.258-.132-.577-.198-.957-.198-.355 0-.666.061-.934.183a1.624 1.624 0 0 0-.623.478 1.05 1.05 0 0 0-.221.638h-1.405c0-.293.076-.585.228-.873.152-.289.37-.55.653-.783a3.271 3.271 0 0 1 1.033-.562 4.072 4.072 0 0 1 1.352-.212c.598 0 1.125.1 1.58.303.461.203.821.51 1.079.92.263.405.395.913.395 1.526v3.828c0 .274.023.565.068.874.051.309.124.575.22.797v.122h-1.466a2.684 2.684 0 0 1-.167-.646 5.26 5.26 0 0 1-.06-.759Zm.243-3.578.015.988h-1.421c-.4 0-.757.032-1.07.098a2.463 2.463 0 0 0-.79.281 1.34 1.34 0 0 0-.487.479 1.273 1.273 0 0 0-.167.661c0 .258.059.493.175.706.117.213.291.382.524.509.238.122.529.182.874.182a2.357 2.357 0 0 0 1.921-.942c.198-.263.304-.519.319-.767l.6.676a2.034 2.034 0 0 1-.288.707 3.402 3.402 0 0 1-1.557 1.329 3.02 3.02 0 0 1-1.2.228c-.557 0-1.046-.109-1.466-.327a2.51 2.51 0 0 1-.973-.873 2.322 2.322 0 0 1-.341-1.238c0-.441.086-.828.258-1.163.172-.339.42-.62.744-.843.324-.228.714-.4 1.17-.516a6.173 6.173 0 0 1 1.527-.175h1.633Zm4.777-1.944v6.927h-1.405v-8.219h1.367l.038 1.292Zm2.567-1.337-.007 1.306a2.035 2.035 0 0 0-.334-.045 3.579 3.579 0 0 0-.35-.015c-.324 0-.61.05-.858.151a1.777 1.777 0 0 0-.63.426c-.173.182-.309.4-.411.653a3.132 3.132 0 0 0-.189.82l-.395.228c0-.496.048-.962.144-1.397.101-.436.256-.82.463-1.155.208-.34.471-.602.79-.79.324-.192.709-.288 1.155-.288.101 0 .217.012.349.038.132.02.223.043.273.068Zm4.436 7.261c.334 0 .643-.068.927-.205.283-.137.516-.324.699-.562.182-.243.286-.519.311-.828h1.337c-.025.486-.19.939-.494 1.36a3.372 3.372 0 0 1-1.177 1.01c-.486.253-1.02.38-1.603.38-.618 0-1.157-.109-1.618-.327a3.213 3.213 0 0 1-1.139-.896 3.998 3.998 0 0 1-.676-1.307 5.504 5.504 0 0 1-.22-1.572v-.319c0-.552.073-1.073.22-1.564a3.99 3.99 0 0 1 .676-1.314c.304-.38.684-.679 1.139-.897.461-.218 1-.326 1.618-.326.643 0 1.205.131 1.686.395.481.258.859.612 1.132 1.063.279.445.431.952.456 1.519h-1.337a2.01 2.01 0 0 0-.289-.919 1.794 1.794 0 0 0-.668-.653 1.867 1.867 0 0 0-.98-.25c-.43 0-.792.085-1.086.257a1.898 1.898 0 0 0-.691.684c-.167.283-.289.6-.365.95a5.214 5.214 0 0 0-.106 1.055v.32c0 .359.035.713.106 1.063.071.349.19.665.357.949.172.284.403.511.691.684.294.167.659.25 1.094.25Zm4.846-10.664h1.413v10.072l-.122 1.595h-1.291V92.111Zm6.965 7.49v.159c0 .597-.071 1.152-.212 1.663-.142.507-.35.947-.623 1.322a2.897 2.897 0 0 1-1.003.873c-.395.208-.848.312-1.359.312-.522 0-.98-.089-1.375-.266a2.707 2.707 0 0 1-.988-.782 4.064 4.064 0 0 1-.645-1.231 7.769 7.769 0 0 1-.327-1.625v-.7c.061-.607.17-1.151.327-1.632a4.05 4.05 0 0 1 .645-1.23 2.6 2.6 0 0 1 .988-.783c.39-.182.843-.273 1.359-.273.517 0 .975.1 1.375.303.4.198.734.481 1.003.851a4 4 0 0 1 .623 1.33c.141.51.212 1.08.212 1.708Zm-1.413.159v-.16c0-.41-.038-.795-.113-1.154a2.993 2.993 0 0 0-.365-.957 1.81 1.81 0 0 0-.661-.653c-.273-.162-.61-.243-1.01-.243-.355 0-.663.06-.927.182a2.014 2.014 0 0 0-.661.493 2.64 2.64 0 0 0-.448.7 3.993 3.993 0 0 0-.25.804v1.831c.081.354.212.696.395 1.025.187.324.435.59.744.798.314.207.701.311 1.162.311.38 0 .704-.076.972-.228.274-.157.494-.372.661-.645.172-.274.299-.59.38-.95.081-.359.121-.744.121-1.154Zm4.717-7.649v11.667h-1.412V92.111h1.412Zm1.884 7.649v-.175c0-.592.086-1.142.258-1.648a3.9 3.9 0 0 1 .745-1.33c.324-.38.716-.673 1.177-.88a3.653 3.653 0 0 1 1.549-.32c.578 0 1.097.107 1.557.32.466.207.861.5 1.185.88.329.375.58.819.752 1.33.172.506.258 1.056.258 1.648v.175c0 .592-.086 1.142-.258 1.648a3.948 3.948 0 0 1-.752 1.329 3.429 3.429 0 0 1-1.177.881c-.456.208-.972.312-1.549.312a3.747 3.747 0 0 1-1.558-.312 3.513 3.513 0 0 1-1.184-.881 4.002 4.002 0 0 1-.745-1.329 5.093 5.093 0 0 1-.258-1.648Zm1.405-.175v.175c0 .41.048.797.144 1.162.097.359.241.678.433.957a2.2 2.2 0 0 0 .737.661c.294.157.636.235 1.026.235.384 0 .721-.078 1.01-.235.293-.162.536-.383.729-.661.192-.279.337-.598.433-.957.101-.365.152-.752.152-1.162v-.175c0-.405-.051-.787-.152-1.147a2.939 2.939 0 0 0-.441-.964 2.086 2.086 0 0 0-.729-.669 2.046 2.046 0 0 0-1.018-.243c-.385 0-.724.081-1.017.243a2.189 2.189 0 0 0-.73.669c-.192.278-.336.6-.433.964a4.43 4.43 0 0 0-.144 1.147Zm11.127 3.19c.335 0 .644-.068.927-.205.284-.137.517-.324.699-.562.182-.243.286-.519.311-.828h1.337c-.025.486-.19.939-.494 1.36a3.363 3.363 0 0 1-1.177 1.01c-.486.253-1.02.38-1.603.38-.617 0-1.157-.109-1.617-.327a3.208 3.208 0 0 1-1.14-.896 4.017 4.017 0 0 1-.676-1.307 5.504 5.504 0 0 1-.22-1.572v-.319c0-.552.073-1.073.22-1.564.152-.497.378-.935.676-1.314a3.21 3.21 0 0 1 1.14-.897c.46-.218 1-.326 1.617-.326.644 0 1.206.131 1.687.395a2.89 2.89 0 0 1 1.131 1.063c.279.445.431.952.456 1.519h-1.337a2.02 2.02 0 0 0-.288-.919 1.797 1.797 0 0 0-.669-.653 1.867 1.867 0 0 0-.98-.25c-.43 0-.792.085-1.086.257a1.906 1.906 0 0 0-.691.684c-.167.283-.288.6-.364.95a5.214 5.214 0 0 0-.107 1.055v.32c0 .359.036.713.107 1.063.07.349.189.665.357.949.172.284.402.511.691.684.293.167.658.25 1.093.25Zm6.267-10.664v11.667h-1.413V92.111h1.413Zm5.02 3.448-3.585 3.836-2.005 2.081-.114-1.496 1.436-1.717 2.552-2.704h1.716Zm-1.283 8.219-2.932-3.92.729-1.253 3.859 5.173h-1.656Zm2.757-.745a.86.86 0 0 1 .22-.6c.152-.167.37-.25.653-.25.284 0 .499.083.646.25a.844.844 0 0 1 .228.6.835.835 0 0 1-.228.593c-.147.162-.362.243-.646.243-.283 0-.501-.081-.653-.243a.85.85 0 0 1-.22-.593Zm7.368-.258c.334 0 .643-.068.926-.205.284-.137.517-.324.699-.562.182-.243.286-.519.311-.828h1.337c-.025.486-.19.939-.494 1.36a3.363 3.363 0 0 1-1.177 1.01c-.486.253-1.02.38-1.602.38-.618 0-1.158-.109-1.618-.327a3.208 3.208 0 0 1-1.14-.896 4.017 4.017 0 0 1-.676-1.307 5.54 5.54 0 0 1-.22-1.572v-.319c0-.552.074-1.073.22-1.564.152-.497.378-.935.676-1.314a3.21 3.21 0 0 1 1.14-.897c.46-.218 1-.326 1.618-.326.643 0 1.205.131 1.686.395a2.89 2.89 0 0 1 1.131 1.063c.279.445.431.952.456 1.519h-1.337a2.02 2.02 0 0 0-.288-.919 1.797 1.797 0 0 0-.669-.653 1.866 1.866 0 0 0-.979-.25c-.431 0-.793.085-1.087.257a1.906 1.906 0 0 0-.691.684c-.167.283-.288.6-.364.95a5.214 5.214 0 0 0-.107 1.055v.32c0 .359.036.713.107 1.063.07.349.189.665.357.949.172.284.402.511.691.684.293.167.658.25 1.094.25Zm4.481-3.015v-.175c0-.592.086-1.142.258-1.648.172-.511.42-.955.744-1.33a3.33 3.33 0 0 1 1.178-.88 3.653 3.653 0 0 1 1.549-.32c.578 0 1.097.107 1.557.32.466.207.861.5 1.185.88.329.375.58.819.752 1.33.172.506.258 1.056.258 1.648v.175c0 .592-.086 1.142-.258 1.648a3.948 3.948 0 0 1-.752 1.329 3.429 3.429 0 0 1-1.177.881c-.456.208-.972.312-1.55.312a3.745 3.745 0 0 1-1.557-.312 3.527 3.527 0 0 1-1.185-.881 4.017 4.017 0 0 1-.744-1.329 5.093 5.093 0 0 1-.258-1.648Zm1.405-.175v.175c0 .41.048.797.144 1.162.097.359.241.678.433.957a2.2 2.2 0 0 0 .737.661c.294.157.636.235 1.025.235.385 0 .722-.078 1.011-.235.293-.162.536-.383.729-.661.192-.279.337-.598.433-.957.101-.365.152-.752.152-1.162v-.175c0-.405-.051-.787-.152-1.147a2.939 2.939 0 0 0-.441-.964 2.086 2.086 0 0 0-.729-.669 2.046 2.046 0 0 0-1.018-.243c-.385 0-.724.081-1.018.243a2.195 2.195 0 0 0-.729.669c-.192.278-.336.6-.433.964a4.43 4.43 0 0 0-.144 1.147Zm9.236-2.392v6.585h-1.413v-8.219h1.337l.076 1.633Zm-.288 2.164-.654-.022a5.603 5.603 0 0 1 .221-1.558c.141-.48.351-.898.63-1.253a2.793 2.793 0 0 1 1.041-.82c.415-.198.896-.296 1.443-.296.385 0 .739.055 1.063.167.324.106.605.276.843.509.238.233.423.531.555.896.131.364.197.805.197 1.322v5.476h-1.405V98.37c0-.43-.073-.775-.22-1.033a1.262 1.262 0 0 0-.608-.562 2.192 2.192 0 0 0-.927-.183c-.415 0-.762.074-1.04.22-.279.148-.501.35-.669.608a2.74 2.74 0 0 0-.364.89 4.948 4.948 0 0 0-.106 1.047Zm5.324-.775-.942.29c.005-.451.079-.885.22-1.3a3.52 3.52 0 0 1 .631-1.109 2.98 2.98 0 0 1 1.025-.767c.405-.192.869-.288 1.39-.288.441 0 .831.058 1.17.174.344.117.633.297.866.54.238.238.418.544.539.919.122.374.182.82.182 1.336v5.401h-1.412v-5.416c0-.46-.074-.817-.221-1.07a1.145 1.145 0 0 0-.607-.54 2.432 2.432 0 0 0-.927-.16c-.309 0-.582.054-.82.16a1.695 1.695 0 0 0-.6.44 1.943 1.943 0 0 0-.373.631 2.341 2.341 0 0 0-.121.76Z"}),e.jsx("rect",{width:"99",height:"18",x:"187",y:"90",fill:"color(display-p3 .8745 .8824 .898)",rx:"4"}),e.jsx("path",{fill:"color(display-p3 .8588 .8627 .8667)",d:"M32 118.667h1600v1.111H32z"}),e.jsxs("g",{clipPath:"url(#e)",children:[e.jsx("path",{fill:"color(display-p3 .9608 .9608 .9608)",d:"M32 119.778h1600v800H32z"}),e.jsx("path",{fill:"#fff",d:"M32 119.778h1600v800H32z"}),e.jsx("path",{fill:"#fff",d:"M32 119.778h1531.11v91.417H32z"}),e.jsx("path",{fill:"#000",d:"M248.364 170.986v-11.599h2.101v4.91h5.375v-4.91h2.107v11.599h-2.107v-4.927h-5.375v4.927h-2.101Zm15.891.17c-.849 0-1.586-.187-2.209-.56a3.813 3.813 0 0 1-1.45-1.569c-.339-.672-.509-1.458-.509-2.356 0-.899.17-1.686.509-2.362a3.804 3.804 0 0 1 1.45-1.575c.623-.374 1.36-.56 2.209-.56.85 0 1.586.186 2.209.56a3.758 3.758 0 0 1 1.444 1.575c.344.676.516 1.463.516 2.362 0 .898-.172 1.684-.516 2.356a3.766 3.766 0 0 1-1.444 1.569c-.623.373-1.359.56-2.209.56Zm.012-1.642c.46 0 .845-.127 1.155-.38.31-.256.54-.6.691-1.031.155-.43.232-.909.232-1.438 0-.532-.077-1.014-.232-1.444-.151-.435-.381-.78-.691-1.037-.31-.257-.695-.385-1.155-.385-.472 0-.865.128-1.179.385-.309.257-.541.602-.696 1.037a4.34 4.34 0 0 0-.227 1.444c0 .529.076 1.008.227 1.438.155.431.387.775.696 1.031.314.253.707.38 1.179.38Zm6.216 1.472v-8.699h1.96v1.478h.101c.182-.498.482-.887.901-1.167.419-.283.919-.424 1.501-.424.589 0 1.085.143 1.489.43.408.283.695.67.861 1.161h.091a2.38 2.38 0 0 1 .974-1.155c.461-.291 1.006-.436 1.637-.436.8 0 1.454.253 1.96.758.506.506.759 1.245.759 2.215v5.839h-2.056v-5.522c0-.54-.144-.934-.431-1.184-.287-.253-.638-.379-1.053-.379-.495 0-.882.155-1.161.464-.276.306-.414.705-.414 1.195v5.426h-2.01v-5.607c0-.449-.136-.808-.408-1.076-.268-.268-.619-.402-1.054-.402-.294 0-.562.076-.804.227a1.578 1.578 0 0 0-.578.628 1.97 1.97 0 0 0-.215.94v5.29h-2.05Zm18.484.17c-.872 0-1.626-.181-2.26-.543a3.688 3.688 0 0 1-1.456-1.552c-.339-.672-.509-1.463-.509-2.373 0-.895.17-1.681.509-2.357a3.86 3.86 0 0 1 1.439-1.585c.616-.382 1.339-.572 2.169-.572.536 0 1.042.086 1.518.26.48.17.903.434 1.269.793.37.359.661.816.872 1.371.211.551.317 1.208.317 1.971v.628h-7.13v-1.382h5.165a2.206 2.206 0 0 0-.255-1.047 1.844 1.844 0 0 0-.697-.731 1.95 1.95 0 0 0-1.03-.266c-.42 0-.788.102-1.105.306-.317.2-.564.464-.742.792a2.295 2.295 0 0 0-.266 1.071v1.206c0 .506.093.94.278 1.303.185.359.443.634.775.827.333.189.722.283 1.167.283.298 0 .568-.041.81-.125.242-.086.451-.213.629-.379a1.59 1.59 0 0 0 .402-.617l1.914.215a2.98 2.98 0 0 1-.691 1.325 3.356 3.356 0 0 1-1.291.872c-.525.204-1.125.306-1.801.306Z"}),e.jsx("path",{fill:"color(display-p3 .4196 .4471 .502)",d:"M342.036 170.986h-1.472l4.259-11.599h1.45l4.259 11.599h-1.472l-3.467-9.764h-.09l-3.467 9.764Zm.544-4.531h5.936v1.246h-5.936v-1.246Zm10.078 4.531v-11.599h1.336v4.282h.114c.098-.151.234-.344.408-.578.177-.238.43-.449.758-.634.333-.189.782-.283 1.348-.283.733 0 1.379.183 1.937.549.559.366.995.885 1.309 1.557.313.673.47 1.465.47 2.379 0 .922-.157 1.72-.47 2.396-.314.672-.748 1.193-1.303 1.563-.555.366-1.195.55-1.92.55-.559 0-1.006-.093-1.342-.278-.336-.189-.595-.402-.776-.64a8.822 8.822 0 0 1-.419-.6h-.159v1.336h-1.291Zm1.314-4.349c0 .657.096 1.236.289 1.738.192.499.474.89.844 1.173.37.279.823.419 1.359.419.559 0 1.025-.147 1.399-.442.377-.298.661-.698.849-1.201a4.7 4.7 0 0 0 .289-1.687c0-.612-.094-1.163-.283-1.654-.185-.495-.466-.886-.844-1.173-.374-.29-.844-.436-1.41-.436-.544 0-1.001.138-1.371.414-.37.272-.649.653-.838 1.144-.189.487-.283 1.055-.283 1.705Zm12.264 4.531c-.786 0-1.475-.187-2.068-.561-.589-.374-1.049-.897-1.382-1.569-.328-.672-.492-1.457-.492-2.356 0-.906.164-1.697.492-2.373.333-.676.793-1.201 1.382-1.575.593-.374 1.282-.56 2.068-.56.785 0 1.472.186 2.061.56.593.374 1.054.899 1.382 1.575.332.676.499 1.467.499 2.373 0 .899-.167 1.684-.499 2.356a3.755 3.755 0 0 1-1.382 1.569c-.589.374-1.276.561-2.061.561Zm0-1.201c.596 0 1.087-.153 1.472-.459.385-.306.67-.708.855-1.206a4.624 4.624 0 0 0 .278-1.62 4.67 4.67 0 0 0-.278-1.626 2.736 2.736 0 0 0-.855-1.217c-.385-.31-.876-.465-1.472-.465-.597 0-1.088.155-1.473.465-.385.309-.67.715-.855 1.217a4.67 4.67 0 0 0-.278 1.626c0 .581.093 1.121.278 1.62.185.498.47.9.855 1.206.385.306.876.459 1.473.459Zm11.783-2.537v-5.143h1.337v8.699h-1.337v-1.472h-.09a2.853 2.853 0 0 1-.952 1.127c-.43.306-.974.459-1.631.459-.544 0-1.027-.119-1.45-.357-.423-.242-.755-.604-.997-1.088-.241-.487-.362-1.1-.362-1.84v-5.528h1.337v5.437c0 .634.177 1.14.532 1.518.359.377.815.566 1.371.566.332 0 .67-.085 1.013-.255.348-.17.638-.43.873-.781.237-.351.356-.799.356-1.342Zm7.888-5.143v1.133h-4.509v-1.133h4.509Zm-3.195-2.084h1.337v8.291c0 .378.055.661.164.85a.854.854 0 0 0 .431.374c.177.06.364.09.56.09.147 0 .268-.007.363-.022l.226-.046.272 1.201a2.739 2.739 0 0 1-.379.102 2.788 2.788 0 0 1-.618.057 2.7 2.7 0 0 1-1.11-.244 2.204 2.204 0 0 1-.895-.742c-.234-.332-.351-.751-.351-1.257v-8.654Zm18.122-.816h1.405v7.68c0 .793-.187 1.501-.561 2.124a3.93 3.93 0 0 1-1.569 1.467c-.676.355-1.469.532-2.379.532-.91 0-1.703-.177-2.378-.532a3.972 3.972 0 0 1-1.575-1.467c-.37-.623-.555-1.331-.555-2.124v-7.68h1.405v7.567c0 .566.124 1.07.373 1.512.25.438.605.783 1.065 1.036.465.25 1.02.374 1.665.374.646 0 1.201-.124 1.665-.374.465-.253.82-.598 1.065-1.036.249-.442.374-.946.374-1.512v-7.567Zm10.51 4.848-1.201.34a2.238 2.238 0 0 0-.334-.583 1.618 1.618 0 0 0-.589-.476c-.25-.125-.569-.187-.958-.187-.532 0-.976.123-1.331.368-.351.242-.526.549-.526.923 0 .333.121.595.362.788.242.192.619.353 1.133.481l1.291.317c.778.189 1.358.478 1.739.867.381.385.572.881.572 1.489 0 .499-.143.944-.43 1.337-.284.393-.68.702-1.19.929-.509.226-1.102.34-1.778.34-.887 0-1.622-.193-2.203-.578-.582-.385-.95-.948-1.105-1.688l1.269-.317c.121.468.349.819.685 1.053.34.234.784.352 1.331.352.623 0 1.118-.133 1.484-.397.37-.268.555-.589.555-.963 0-.302-.106-.555-.317-.759-.211-.207-.536-.362-.974-.464l-1.45-.34c-.797-.189-1.382-.481-1.756-.878-.37-.4-.555-.9-.555-1.501 0-.491.138-.925.414-1.302a2.812 2.812 0 0 1 1.138-.89c.483-.215 1.031-.322 1.642-.322.861 0 1.537.188 2.028.566.495.378.846.876 1.054 1.495Z"})]})]})]}),e.jsxs("defs",{children:[e.jsx("clipPath",{id:"a",children:e.jsx("path",{fill:"#fff",d:"M0 0h384v216H0z"})}),e.jsx("clipPath",{id:"c",children:e.jsx("path",{fill:"#fff",d:"M32 44c0-6.627 5.373-12 12-12h1588v46.667H32V44Z"})}),e.jsx("clipPath",{id:"d",children:e.jsx("path",{fill:"#fff",d:"M128.667 40.889h280v37.778h-280z"})}),e.jsx("clipPath",{id:"e",children:e.jsx("path",{fill:"#fff",d:"M32 119.778h1600v800H32z"})}),e.jsxs("filter",{id:"b",width:"1706.67",height:"994.444",x:"-21.333",y:"-3.556",colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[e.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),e.jsx("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),e.jsx("feOffset",{dy:"17.778"}),e.jsx("feGaussianBlur",{stdDeviation:"26.667"}),e.jsx("feComposite",{in2:"hardAlpha",operator:"out"}),e.jsx("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0"}),e.jsx("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_53_37"}),e.jsx("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_53_37",result:"shape"})]})]})]})};ds.defaultProps={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 384 216"};var us=function(C){return e.jsxs("svg",{...C,children:[e.jsxs("g",{clipPath:"url(#a)",children:[e.jsx("path",{fill:"color(display-p3 .1255 .3333 .898)",d:"M0 0h384v216H0z"}),e.jsxs("g",{filter:"url(#b)",children:[e.jsx("rect",{width:"1600",height:"887.778",x:"32",y:"32",fill:"#1a1a1a",rx:"12",shapeRendering:"crispEdges"}),e.jsxs("g",{clipPath:"url(#c)",children:[e.jsx("path",{fill:"color(display-p3 .2 .2 .2)",d:"M32 44c0-6.627 5.373-12 12-12h1588v46.667H32V44Z"}),e.jsx("rect",{width:"13.333",height:"13.333",x:"55.333",y:"49.778",fill:"color(display-p3 .9255 .4196 .3686)",rx:"6.667"}),e.jsx("rect",{width:"13.333",height:"13.333",x:"77.556",y:"49.778",fill:"color(display-p3 .9569 .749 .3098)",rx:"6.667"}),e.jsx("rect",{width:"13.333",height:"13.333",x:"99.778",y:"49.778",fill:"color(display-p3 .3804 .7686 .3255)",rx:"6.667"}),e.jsxs("g",{clipPath:"url(#d)",children:[e.jsx("path",{fill:"#2a2a2a",d:"M128.667 49.778a8.888 8.888 0 0 1 8.889-8.89h248.888c4.91 0 8.889 3.98 8.889 8.89v28.889H128.667v-28.89Z"}),e.jsx("path",{stroke:"color(display-p3 .8 .8 .8)",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.667",d:"m374.222 56.444 3.334 3.334m0 0 3.333-3.334m-3.333 3.334-3.334 3.333m3.334-3.333 3.333 3.333"}),e.jsx("rect",{width:"180",height:"18",x:"140",y:"51",fill:"color(display-p3 .3 .3 .3)",rx:"4"})]})]}),e.jsx("path",{fill:"#1a1a1a",d:"M32 78.667h1600v40H32z"}),e.jsx("path",{stroke:"color(display-p3 .8 .8 .8)",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.667",d:"M63.111 98.667H49.778m0 0L56.444 92m-6.666 6.667 6.666 6.666m28.889-6.666h13.334m0 0L92 92m6.667 6.667L92 105.333"}),e.jsx("path",{fill:"color(display-p3 .8 .8 .8)",fillRule:"evenodd",d:"M122.278 98.667a5.278 5.278 0 0 1 9.524-3.136l-2.024 2.024h5.555V92l-2.343 2.343a6.944 6.944 0 1 0 .752 7.48.834.834 0 0 0-1.484-.758 5.278 5.278 0 0 1-9.98-2.398Z",clipRule:"evenodd"}),e.jsx("rect",{width:"1360",height:"31.111",x:"152",y:"83.111",fill:"color(display-p3 .2 .2 .2)",rx:"15.556"}),e.jsx("path",{fill:"color(display-p3 .8 .8 .8)",fillRule:"evenodd",d:"M172 93.111a2.778 2.778 0 0 0-2.778 2.778V97h-.555a1.11 1.11 0 0 0-1.111 1.111v5.556c0 .613.497 1.111 1.111 1.111h6.666c.614 0 1.111-.498 1.111-1.111v-5.556A1.11 1.11 0 0 0 175.333 97h-.555v-1.111A2.778 2.778 0 0 0 172 93.11ZM173.667 97v-1.111a1.667 1.667 0 0 0-3.334 0V97h3.334Z",clipRule:"evenodd"}),e.jsx("path",{fill:"color(display-p3 .8 .8 .8)",d:"M195.695 102.373v-4.231c0-.324-.066-.605-.198-.843a1.29 1.29 0 0 0-.577-.562c-.258-.132-.577-.198-.957-.198-.355 0-.666.061-.934.183a1.624 1.624 0 0 0-.623.478 1.05 1.05 0 0 0-.221.638h-1.405c0-.293.076-.585.228-.873.152-.289.37-.55.653-.783a3.271 3.271 0 0 1 1.033-.562 4.072 4.072 0 0 1 1.352-.212c.598 0 1.125.1 1.58.303.461.203.821.51 1.079.92.263.405.395.913.395 1.526v3.828c0 .274.023.565.068.874.051.309.124.575.22.797v.122h-1.466a2.684 2.684 0 0 1-.167-.646 5.26 5.26 0 0 1-.06-.759Zm.243-3.578.015.988h-1.421c-.4 0-.757.032-1.07.098a2.463 2.463 0 0 0-.79.281 1.34 1.34 0 0 0-.487.479 1.273 1.273 0 0 0-.167.661c0 .258.059.493.175.706.117.213.291.382.524.509.238.122.529.182.874.182a2.357 2.357 0 0 0 1.921-.942c.198-.263.304-.519.319-.767l.6.676a2.034 2.034 0 0 1-.288.707 3.402 3.402 0 0 1-1.557 1.329 3.02 3.02 0 0 1-1.2.228c-.557 0-1.046-.109-1.466-.327a2.51 2.51 0 0 1-.973-.873 2.322 2.322 0 0 1-.341-1.238c0-.441.086-.828.258-1.163.172-.339.42-.62.744-.843.324-.228.714-.4 1.17-.516a6.173 6.173 0 0 1 1.527-.175h1.633Zm4.777-1.944v6.927h-1.405v-8.219h1.367l.038 1.292Zm2.567-1.337-.007 1.306a2.035 2.035 0 0 0-.334-.045 3.579 3.579 0 0 0-.35-.015c-.324 0-.61.05-.858.151a1.777 1.777 0 0 0-.63.426c-.173.182-.309.4-.411.653a3.132 3.132 0 0 0-.189.82l-.395.228c0-.496.048-.962.144-1.397.101-.436.256-.82.463-1.155.208-.34.471-.602.79-.79.324-.192.709-.288 1.155-.288.101 0 .217.012.349.038.132.02.223.043.273.068Zm4.436 7.261c.334 0 .643-.068.927-.205.283-.137.516-.324.699-.562.182-.243.286-.519.311-.828h1.337c-.025.486-.19.939-.494 1.36a3.372 3.372 0 0 1-1.177 1.01c-.486.253-1.02.38-1.603.38-.618 0-1.157-.109-1.618-.327a3.213 3.213 0 0 1-1.139-.896 3.998 3.998 0 0 1-.676-1.307 5.504 5.504 0 0 1-.22-1.572v-.319c0-.552.073-1.073.22-1.564a3.99 3.99 0 0 1 .676-1.314c.304-.38.684-.679 1.139-.897.461-.218 1-.326 1.618-.326.643 0 1.205.131 1.686.395.481.258.859.612 1.132 1.063.279.445.431.952.456 1.519h-1.337a2.01 2.01 0 0 0-.289-.919 1.794 1.794 0 0 0-.668-.653 1.867 1.867 0 0 0-.98-.25c-.43 0-.792.085-1.086.257a1.898 1.898 0 0 0-.691.684c-.167.283-.289.6-.365.95a5.214 5.214 0 0 0-.106 1.055v.32c0 .359.035.713.106 1.063.071.349.19.665.357.949.172.284.403.511.691.684.294.167.659.25 1.094.25Zm4.846-10.664h1.413v10.072l-.122 1.595h-1.291V92.111Zm6.965 7.49v.159c0 .597-.071 1.152-.212 1.663-.142.507-.35.947-.623 1.322a2.897 2.897 0 0 1-1.003.873c-.395.208-.848.312-1.359.312-.522 0-.98-.089-1.375-.266a2.707 2.707 0 0 1-.988-.782 4.064 4.064 0 0 1-.645-1.231 7.769 7.769 0 0 1-.327-1.625v-.7c.061-.607.17-1.151.327-1.632a4.05 4.05 0 0 1 .645-1.23 2.6 2.6 0 0 1 .988-.783c.39-.182.843-.273 1.359-.273.517 0 .975.1 1.375.303.4.198.734.481 1.003.851a4 4 0 0 1 .623 1.33c.141.51.212 1.08.212 1.708Zm-1.413.159v-.16c0-.41-.038-.795-.113-1.154a2.993 2.993 0 0 0-.365-.957 1.81 1.81 0 0 0-.661-.653c-.273-.162-.61-.243-1.01-.243-.355 0-.663.06-.927.182a2.014 2.014 0 0 0-.661.493 2.64 2.64 0 0 0-.448.7 3.993 3.993 0 0 0-.25.804v1.831c.081.354.212.696.395 1.025.187.324.435.59.744.798.314.207.701.311 1.162.311.38 0 .704-.076.972-.228.274-.157.494-.372.661-.645.172-.274.299-.59.38-.95.081-.359.121-.744.121-1.154Zm4.717-7.649v11.667h-1.412V92.111h1.412Zm1.884 7.649v-.175c0-.592.086-1.142.258-1.648a3.9 3.9 0 0 1 .745-1.33c.324-.38.716-.673 1.177-.88a3.653 3.653 0 0 1 1.549-.32c.578 0 1.097.107 1.557.32.466.207.861.5 1.185.88.329.375.58.819.752 1.33.172.506.258 1.056.258 1.648v.175c0 .592-.086 1.142-.258 1.648a3.948 3.948 0 0 1-.752 1.329 3.429 3.429 0 0 1-1.177.881c-.456.208-.972.312-1.549.312a3.747 3.747 0 0 1-1.558-.312 3.513 3.513 0 0 1-1.184-.881 4.002 4.002 0 0 1-.745-1.329 5.093 5.093 0 0 1-.258-1.648Zm1.405-.175v.175c0 .41.048.797.144 1.162.097.359.241.678.433.957a2.2 2.2 0 0 0 .737.661c.294.157.636.235 1.025.235.384 0 .722-.078 1.011-.235.293-.162.536-.383.729-.661.192-.279.337-.598.433-.957.101-.365.152-.752.152-1.162v-.175c0-.405-.051-.787-.152-1.147a2.939 2.939 0 0 0-.441-.964 2.086 2.086 0 0 0-.729-.669 2.046 2.046 0 0 0-1.018-.243c-.385 0-.724.081-1.018.243a2.195 2.195 0 0 0-.729.669c-.192.278-.336.6-.433.964a4.43 4.43 0 0 0-.144 1.147Zm9.236-2.392v6.585h-1.413v-8.219h1.337l.076 1.633Zm-.288 2.164-.654-.022a5.603 5.603 0 0 1 .221-1.558c.141-.48.351-.898.63-1.253a2.793 2.793 0 0 1 1.041-.82c.415-.198.896-.296 1.443-.296.385 0 .739.055 1.063.167.324.106.605.276.843.509.238.233.423.531.555.896.131.364.197.805.197 1.322v5.476h-1.405V98.37c0-.43-.073-.775-.22-1.033a1.262 1.262 0 0 0-.608-.562 2.192 2.192 0 0 0-.927-.183c-.415 0-.762.074-1.04.22-.279.148-.501.35-.669.608a2.74 2.74 0 0 0-.364.89 4.948 4.948 0 0 0-.106 1.047Zm5.324-.775-.942.29c.005-.451.079-.885.22-1.3a3.52 3.52 0 0 1 .631-1.109 2.98 2.98 0 0 1 1.025-.767c.405-.192.869-.288 1.39-.288.441 0 .831.058 1.17.174.344.117.633.297.866.54.238.238.418.544.539.919.122.374.182.82.182 1.336v5.401h-1.412v-5.416c0-.46-.074-.817-.221-1.07a1.145 1.145 0 0 0-.607-.54 2.432 2.432 0 0 0-.927-.16c-.309 0-.582.054-.82.16a1.695 1.695 0 0 0-.6.44 1.943 1.943 0 0 0-.373.631 2.341 2.341 0 0 0-.121.76Z"}),e.jsx("rect",{width:"99",height:"18",x:"187",y:"90",fill:"color(display-p3 .3 .3 .3)",rx:"4"}),e.jsx("path",{fill:"color(display-p3 .2 .2 .2)",d:"M32 118.667h1600v1.111H32z"}),e.jsxs("g",{clipPath:"url(#e)",children:[e.jsx("path",{fill:"color(display-p3 .1 .1 .1)",d:"M32 119.778h1600v800H32z"}),e.jsx("path",{fill:"#1a1a1a",d:"M32 119.778h1600v800H32z"}),e.jsx("path",{fill:"#1a1a1a",d:"M32 119.778h1531.11v91.417H32z"}),e.jsx("path",{fill:"#fff",d:"M248.364 170.986v-11.599h2.101v4.91h5.375v-4.91h2.107v11.599h-2.107v-4.927h-5.375v4.927h-2.101Zm15.891.17c-.849 0-1.586-.187-2.209-.56a3.813 3.813 0 0 1-1.45-1.569c-.339-.672-.509-1.458-.509-2.356 0-.899.17-1.686.509-2.362a3.804 3.804 0 0 1 1.45-1.575c.623-.374 1.36-.56 2.209-.56.85 0 1.586.186 2.209.56a3.758 3.758 0 0 1 1.444 1.575c.344.676.516 1.463.516 2.362 0 .898-.172 1.684-.516 2.356a3.766 3.766 0 0 1-1.444 1.569c-.623.373-1.359.56-2.209.56Zm.012-1.642c.46 0 .845-.127 1.155-.38.31-.256.54-.6.691-1.031.155-.43.232-.909.232-1.438 0-.532-.077-1.014-.232-1.444-.151-.435-.381-.78-.691-1.037-.31-.257-.695-.385-1.155-.385-.472 0-.865.128-1.179.385-.309.257-.541.602-.696 1.037a4.34 4.34 0 0 0-.227 1.444c0 .529.076 1.008.227 1.438.155.431.387.775.696 1.031.314.253.707.38 1.179.38Zm6.216 1.472v-8.699h1.96v1.478h.101c.182-.498.482-.887.901-1.167.419-.283.919-.424 1.501-.424.589 0 1.085.143 1.489.43.408.283.695.67.861 1.161h.091a2.38 2.38 0 0 1 .974-1.155c.461-.291 1.006-.436 1.637-.436.8 0 1.454.253 1.96.758.506.506.759 1.245.759 2.215v5.839h-2.056v-5.522c0-.54-.144-.934-.431-1.184-.287-.253-.638-.379-1.053-.379-.495 0-.882.155-1.161.464-.276.306-.414.705-.414 1.195v5.426h-2.01v-5.607c0-.449-.136-.808-.408-1.076-.268-.268-.619-.402-1.054-.402-.294 0-.562.076-.804.227a1.578 1.578 0 0 0-.578.628 1.97 1.97 0 0 0-.215.94v5.29h-2.05Zm18.484.17c-.872 0-1.626-.181-2.26-.543a3.688 3.688 0 0 1-1.456-1.552c-.339-.672-.509-1.463-.509-2.373 0-.895.17-1.681.509-2.357a3.86 3.86 0 0 1 1.439-1.585c.616-.382 1.339-.572 2.169-.572.536 0 1.042.086 1.518.26.48.17.903.434 1.269.793.37.359.661.816.872 1.371.211.551.317 1.208.317 1.971v.628h-7.13v-1.382h5.165a2.206 2.206 0 0 0-.255-1.047 1.844 1.844 0 0 0-.697-.731 1.95 1.95 0 0 0-1.03-.266c-.42 0-.788.102-1.105.306-.317.2-.564.464-.742.792a2.295 2.295 0 0 0-.266 1.071v1.206c0 .506.093.94.278 1.303.185.359.443.634.775.827.333.189.722.283 1.167.283.298 0 .568-.041.81-.125.242-.086.451-.213.629-.379a1.59 1.59 0 0 0 .402-.617l1.914.215a2.98 2.98 0 0 1-.691 1.325 3.356 3.356 0 0 1-1.291.872c-.525.204-1.125.306-1.801.306Z"}),e.jsx("path",{fill:"color(display-p3 .8 .8 .8)",d:"M342.036 170.986h-1.472l4.259-11.599h1.45l4.259 11.599h-1.472l-3.467-9.764h-.09l-3.467 9.764Zm.544-4.531h5.936v1.246h-5.936v-1.246Zm10.078 4.531v-11.599h1.336v4.282h.114c.098-.151.234-.344.408-.578.177-.238.43-.449.758-.634.333-.189.782-.283 1.348-.283.733 0 1.379.183 1.937.549.559.366.995.885 1.309 1.557.313.673.47 1.465.47 2.379 0 .922-.157 1.72-.47 2.396-.314.672-.748 1.193-1.303 1.563-.555.366-1.195.55-1.92.55-.559 0-1.006-.093-1.342-.278-.336-.189-.595-.402-.776-.64a8.822 8.822 0 0 1-.419-.6h-.159v1.336h-1.291Zm1.314-4.349c0 .657.096 1.236.289 1.738.192.499.474.89.844 1.173.37.279.823.419 1.359.419.559 0 1.025-.147 1.399-.442.377-.298.661-.698.849-1.201a4.7 4.7 0 0 0 .289-1.687c0-.612-.094-1.163-.283-1.654-.185-.495-.466-.886-.844-1.173-.374-.29-.844-.436-1.41-.436-.544 0-1.001.138-1.371.414-.37.272-.649.653-.838 1.144-.189.487-.283 1.055-.283 1.705Zm12.264 4.531c-.786 0-1.475-.187-2.068-.561-.589-.374-1.049-.897-1.382-1.569-.328-.672-.492-1.457-.492-2.356 0-.906.164-1.697.492-2.373.333-.676.793-1.201 1.382-1.575.593-.374 1.282-.56 2.068-.56.785 0 1.472.186 2.061.56.593.374 1.054.899 1.382 1.575.332.676.499 1.467.499 2.373 0 .899-.167 1.684-.499 2.356a3.755 3.755 0 0 1-1.382 1.569c-.589.374-1.276.561-2.061.561Zm0-1.201c.596 0 1.087-.153 1.472-.459.385-.306.67-.708.855-1.206a4.624 4.624 0 0 0 .278-1.62 4.67 4.67 0 0 0-.278-1.626 2.736 2.736 0 0 0-.855-1.217c-.385-.31-.876-.465-1.472-.465-.597 0-1.088.155-1.473.465-.385.309-.67.715-.855 1.217a4.67 4.67 0 0 0-.278 1.626c0 .581.093 1.121.278 1.62.185.498.47.9.855 1.206.385.306.876.459 1.473.459Zm11.783-2.537v-5.143h1.337v8.699h-1.337v-1.472h-.09a2.853 2.853 0 0 1-.952 1.127c-.43.306-.974.459-1.631.459-.544 0-1.027-.119-1.45-.357-.423-.242-.755-.604-.997-1.088-.241-.487-.362-1.1-.362-1.84v-5.528h1.337v5.437c0 .634.177 1.14.532 1.518.359.377.815.566 1.371.566.332 0 .67-.085 1.013-.255.348-.17.638-.43.873-.781.237-.351.356-.799.356-1.342Zm7.888-5.143v1.133h-4.509v-1.133h4.509Zm-3.195-2.084h1.337v8.291c0 .378.055.661.164.85a.854.854 0 0 0 .431.374c.177.06.364.09.56.09.147 0 .268-.007.363-.022l.226-.046.272 1.201a2.739 2.739 0 0 1-.379.102 2.788 2.788 0 0 1-.618.057 2.7 2.7 0 0 1-1.11-.244 2.204 2.204 0 0 1-.895-.742c-.234-.332-.351-.751-.351-1.257v-8.654Zm18.122-.816h1.405v7.68c0 .793-.187 1.501-.561 2.124a3.93 3.93 0 0 1-1.569 1.467c-.676.355-1.469.532-2.379.532-.91 0-1.703-.177-2.378-.532a3.972 3.972 0 0 1-1.575-1.467c-.37-.623-.555-1.331-.555-2.124v-7.68h1.405v7.567c0 .566.124 1.07.373 1.512.25.438.605.783 1.065 1.036.465.25 1.02.374 1.665.374.646 0 1.201-.124 1.665-.374.465-.253.82-.598 1.065-1.036.249-.442.374-.946.374-1.512v-7.567Zm10.51 4.848-1.201.34a2.238 2.238 0 0 0-.334-.583 1.618 1.618 0 0 0-.589-.476c-.25-.125-.569-.187-.958-.187-.532 0-.976.123-1.331.368-.351.242-.526.549-.526.923 0 .333.121.595.362.788.242.192.619.353 1.133.481l1.291.317c.778.189 1.358.478 1.739.867.381.385.572.881.572 1.489 0 .499-.143.944-.43 1.337-.284.393-.68.702-1.19.929-.509.226-1.102.34-1.778.34-.887 0-1.622-.193-2.203-.578-.582-.385-.95-.948-1.105-1.688l1.269-.317c.121.468.349.819.685 1.053.34.234.784.352 1.331.352.623 0 1.118-.133 1.484-.397.37-.268.555-.589.555-.963 0-.302-.106-.555-.317-.759-.211-.207-.536-.362-.974-.464l-1.45-.34c-.797-.189-1.382-.481-1.756-.878-.37-.4-.555-.9-.555-1.501 0-.491.138-.925.414-1.302a2.812 2.812 0 0 1 1.138-.89c.483-.215 1.031-.322 1.642-.322.861 0 1.537.188 2.028.566.495.378.846.876 1.054 1.495Z"})]})]})]}),e.jsxs("defs",{children:[e.jsx("clipPath",{id:"a",children:e.jsx("path",{fill:"#fff",d:"M0 0h384v216H0z"})}),e.jsx("clipPath",{id:"c",children:e.jsx("path",{fill:"#fff",d:"M32 44c0-6.627 5.373-12 12-12h1588v46.667H32V44Z"})}),e.jsx("clipPath",{id:"d",children:e.jsx("path",{fill:"#fff",d:"M128.667 40.889h280v37.778h-280z"})}),e.jsx("clipPath",{id:"e",children:e.jsx("path",{fill:"#fff",d:"M32 119.778h1600v800H32z"})}),e.jsxs("filter",{id:"b",width:"1706.67",height:"994.444",x:"-21.333",y:"-3.556",colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[e.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),e.jsx("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),e.jsx("feOffset",{dy:"17.778"}),e.jsx("feGaussianBlur",{stdDeviation:"26.667"}),e.jsx("feComposite",{in2:"hardAlpha",operator:"out"}),e.jsx("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0"}),e.jsx("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_53_37"}),e.jsx("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_53_37",result:"shape"})]})]})]})};us.defaultProps={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 384 216"};var hs=function(C){return e.jsxs("svg",{...C,children:[e.jsxs("g",{clipPath:"url(#a)",children:[e.jsx("path",{fill:"color(display-p3 .1255 .3333 .898)",d:"M0 0h384v216H0z"}),e.jsxs("g",{filter:"url(#b)",children:[e.jsx("rect",{width:"1600",height:"887.778",x:"32",y:"32",fill:"#fff",rx:"12",shapeRendering:"crispEdges"}),e.jsxs("g",{clipPath:"url(#c)",children:[e.jsx("path",{fill:"color(display-p3 .8745 .8824 .898)",d:"M32 44c0-6.627 5.373-12 12-12h1588v46.667H32V44Z"}),e.jsx("rect",{width:"13.333",height:"13.333",x:"55.333",y:"49.778",fill:"color(display-p3 .9255 .4196 .3686)",rx:"6.667"}),e.jsx("rect",{width:"13.333",height:"13.333",x:"77.556",y:"49.778",fill:"color(display-p3 .9569 .749 .3098)",rx:"6.667"}),e.jsx("rect",{width:"13.333",height:"13.333",x:"99.778",y:"49.778",fill:"color(display-p3 .3804 .7686 .3255)",rx:"6.667"}),e.jsxs("g",{clipPath:"url(#d)",children:[e.jsx("path",{fill:"#fff",d:"M128.667 49.778a8.888 8.888 0 0 1 8.889-8.89h248.888c4.91 0 8.889 3.98 8.889 8.89v28.889H128.667v-28.89Z"}),e.jsx("path",{stroke:"color(display-p3 .2392 .251 .2627)",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.667",d:"m374.222 56.444 3.334 3.334m0 0 3.333-3.334m-3.333 3.334-3.334 3.333m3.334-3.333 3.333 3.333"}),e.jsx("rect",{width:"180",height:"18",x:"140",y:"51",fill:"color(display-p3 .8745 .8824 .898)",rx:"4"})]})]}),e.jsx("path",{fill:"#fff",d:"M32 78.667h1600v40H32z"}),e.jsx("path",{stroke:"color(display-p3 .3765 .3882 .4039)",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.667",d:"M63.111 98.667H49.778m0 0L56.444 92m-6.666 6.667 6.666 6.666m28.889-6.666h13.334m0 0L92 92m6.667 6.667L92 105.333"}),e.jsx("path",{fill:"color(display-p3 .3765 .3882 .4039)",fillRule:"evenodd",d:"M122.278 98.667a5.278 5.278 0 0 1 9.524-3.136l-2.024 2.024h5.555V92l-2.343 2.343a6.944 6.944 0 1 0 .752 7.48.834.834 0 0 0-1.484-.758 5.278 5.278 0 0 1-9.98-2.398Z",clipRule:"evenodd"}),e.jsx("rect",{width:"1360",height:"31.111",x:"152",y:"83.111",fill:"color(display-p3 .9451 .9529 .9569)",rx:"15.556"}),e.jsx("path",{fill:"color(display-p3 .3765 .3882 .4039)",fillRule:"evenodd",d:"M172 93.111a2.778 2.778 0 0 0-2.778 2.778V97h-.555a1.11 1.11 0 0 0-1.111 1.111v5.556c0 .613.497 1.111 1.111 1.111h6.666c.614 0 1.111-.498 1.111-1.111v-5.556A1.11 1.11 0 0 0 175.333 97h-.555v-1.111A2.778 2.778 0 0 0 172 93.11ZM173.667 97v-1.111a1.667 1.667 0 0 0-3.334 0V97h3.334Z",clipRule:"evenodd"}),e.jsx("path",{fill:"color(display-p3 .3765 .3882 .4039)",d:"M195.695 102.373v-4.231c0-.324-.066-.605-.198-.843a1.29 1.29 0 0 0-.577-.562c-.258-.132-.577-.198-.957-.198-.355 0-.666.061-.934.183a1.624 1.624 0 0 0-.623.478 1.05 1.05 0 0 0-.221.638h-1.405c0-.293.076-.585.228-.873.152-.289.37-.55.653-.783a3.271 3.271 0 0 1 1.033-.562 4.072 4.072 0 0 1 1.352-.212c.598 0 1.125.1 1.58.303.461.203.821.51 1.079.92.263.405.395.913.395 1.526v3.828c0 .274.023.565.068.874.051.309.124.575.22.797v.122h-1.466a2.684 2.684 0 0 1-.167-.646 5.26 5.26 0 0 1-.06-.759Zm.243-3.578.015.988h-1.421c-.4 0-.757.032-1.07.098a2.463 2.463 0 0 0-.79.281 1.34 1.34 0 0 0-.487.479 1.273 1.273 0 0 0-.167.661c0 .258.059.493.175.706.117.213.291.382.524.509.238.122.529.182.874.182a2.357 2.357 0 0 0 1.921-.942c.198-.263.304-.519.319-.767l.6.676a2.034 2.034 0 0 1-.288.707 3.402 3.402 0 0 1-1.557 1.329 3.02 3.02 0 0 1-1.2.228c-.557 0-1.046-.109-1.466-.327a2.51 2.51 0 0 1-.973-.873 2.322 2.322 0 0 1-.341-1.238c0-.441.086-.828.258-1.163.172-.339.42-.62.744-.843.324-.228.714-.4 1.17-.516a6.173 6.173 0 0 1 1.527-.175h1.633Zm4.777-1.944v6.927h-1.405v-8.219h1.367l.038 1.292Zm2.567-1.337-.007 1.306a2.035 2.035 0 0 0-.334-.045 3.579 3.579 0 0 0-.35-.015c-.324 0-.61.05-.858.151a1.777 1.777 0 0 0-.63.426c-.173.182-.309.4-.411.653a3.132 3.132 0 0 0-.189.82l-.395.228c0-.496.048-.962.144-1.397.101-.436.256-.82.463-1.155.208-.34.471-.602.79-.79.324-.192.709-.288 1.155-.288.101 0 .217.012.349.038.132.02.223.043.273.068Zm4.436 7.261c.334 0 .643-.068.927-.205.283-.137.516-.324.699-.562.182-.243.286-.519.311-.828h1.337c-.025.486-.19.939-.494 1.36a3.372 3.372 0 0 1-1.177 1.01c-.486.253-1.02.38-1.603.38-.618 0-1.157-.109-1.618-.327a3.213 3.213 0 0 1-1.139-.896 3.998 3.998 0 0 1-.676-1.307 5.504 5.504 0 0 1-.22-1.572v-.319c0-.552.073-1.073.22-1.564a3.99 3.99 0 0 1 .676-1.314c.304-.38.684-.679 1.139-.897.461-.218 1-.326 1.618-.326.643 0 1.205.131 1.686.395.481.258.859.612 1.132 1.063.279.445.431.952.456 1.519h-1.337a2.01 2.01 0 0 0-.289-.919 1.794 1.794 0 0 0-.668-.653 1.867 1.867 0 0 0-.98-.25c-.43 0-.792.085-1.086.257a1.898 1.898 0 0 0-.691.684c-.167.283-.289.6-.365.95a5.214 5.214 0 0 0-.106 1.055v.32c0 .359.035.713.106 1.063.071.349.19.665.357.949.172.284.403.511.691.684.294.167.659.25 1.094.25Zm4.846-10.664h1.413v10.072l-.122 1.595h-1.291V92.111Zm6.965 7.49v.159c0 .597-.071 1.152-.212 1.663-.142.507-.35.947-.623 1.322a2.897 2.897 0 0 1-1.003.873c-.395.208-.848.312-1.359.312-.522 0-.98-.089-1.375-.266a2.707 2.707 0 0 1-.988-.782 4.064 4.064 0 0 1-.645-1.231 7.769 7.769 0 0 1-.327-1.625v-.7c.061-.607.17-1.151.327-1.632a4.05 4.05 0 0 1 .645-1.23 2.6 2.6 0 0 1 .988-.783c.39-.182.843-.273 1.359-.273.517 0 .975.1 1.375.303.4.198.734.481 1.003.851a4 4 0 0 1 .623 1.33c.141.51.212 1.08.212 1.708Zm-1.413.159v-.16c0-.41-.038-.795-.113-1.154a2.993 2.993 0 0 0-.365-.957 1.81 1.81 0 0 0-.661-.653c-.273-.162-.61-.243-1.01-.243-.355 0-.663.06-.927.182a2.014 2.014 0 0 0-.661.493 2.64 2.64 0 0 0-.448.7 3.993 3.993 0 0 0-.25.804v1.831c.081.354.212.696.395 1.025.187.324.435.59.744.798.314.207.701.311 1.162.311.38 0 .704-.076.972-.228.274-.157.494-.372.661-.645.172-.274.299-.59.38-.95.081-.359.121-.744.121-1.154Zm4.717-7.649v11.667h-1.412V92.111h1.412Zm1.884 7.649v-.175c0-.592.086-1.142.258-1.648a3.9 3.9 0 0 1 .745-1.33c.324-.38.716-.673 1.177-.88a3.653 3.653 0 0 1 1.549-.32c.578 0 1.097.107 1.557.32.466.207.861.5 1.185.88.329.375.58.819.752 1.33.172.506.258 1.056.258 1.648v.175c0 .592-.086 1.142-.258 1.648a3.948 3.948 0 0 1-.752 1.329 3.429 3.429 0 0 1-1.177.881c-.456.208-.972.312-1.549.312a3.747 3.747 0 0 1-1.558-.312 3.513 3.513 0 0 1-1.184-.881 4.002 4.002 0 0 1-.745-1.329 5.093 5.093 0 0 1-.258-1.648Zm1.405-.175v.175c0 .41.048.797.144 1.162.097.359.241.678.433.957a2.2 2.2 0 0 0 .737.661c.294.157.636.235 1.026.235.384 0 .721-.078 1.01-.235.293-.162.536-.383.729-.661.192-.279.337-.598.433-.957.101-.365.152-.752.152-1.162v-.175c0-.405-.051-.787-.152-1.147a2.939 2.939 0 0 0-.441-.964 2.086 2.086 0 0 0-.729-.669 2.046 2.046 0 0 0-1.018-.243c-.385 0-.724.081-1.017.243a2.189 2.189 0 0 0-.73.669c-.192.278-.336.6-.433.964a4.43 4.43 0 0 0-.144 1.147Zm11.127 3.19c.335 0 .644-.068.927-.205.284-.137.517-.324.699-.562.182-.243.286-.519.311-.828h1.337c-.025.486-.19.939-.494 1.36a3.363 3.363 0 0 1-1.177 1.01c-.486.253-1.02.38-1.603.38-.617 0-1.157-.109-1.617-.327a3.208 3.208 0 0 1-1.14-.896 4.017 4.017 0 0 1-.676-1.307 5.504 5.504 0 0 1-.22-1.572v-.319c0-.552.073-1.073.22-1.564.152-.497.378-.935.676-1.314a3.21 3.21 0 0 1 1.14-.897c.46-.218 1-.326 1.617-.326.644 0 1.206.131 1.687.395a2.89 2.89 0 0 1 1.131 1.063c.279.445.431.952.456 1.519h-1.337a2.02 2.02 0 0 0-.288-.919 1.797 1.797 0 0 0-.669-.653 1.867 1.867 0 0 0-.98-.25c-.43 0-.792.085-1.086.257a1.906 1.906 0 0 0-.691.684c-.167.283-.288.6-.364.95a5.214 5.214 0 0 0-.107 1.055v.32c0 .359.036.713.107 1.063.07.349.189.665.357.949.172.284.402.511.691.684.293.167.658.25 1.093.25Zm6.267-10.664v11.667h-1.413V92.111h1.413Zm5.02 3.448-3.585 3.836-2.005 2.081-.114-1.496 1.436-1.717 2.552-2.704h1.716Zm-1.283 8.219-2.932-3.92.729-1.253 3.859 5.173h-1.656Zm2.757-.745a.86.86 0 0 1 .22-.6c.152-.167.37-.25.653-.25.284 0 .499.083.646.25a.844.844 0 0 1 .228.6.835.835 0 0 1-.228.593c-.147.162-.362.243-.646.243-.283 0-.501-.081-.653-.243a.85.85 0 0 1-.22-.593Zm7.368-.258c.334 0 .643-.068.926-.205.284-.137.517-.324.699-.562.182-.243.286-.519.311-.828h1.337c-.025.486-.19.939-.494 1.36a3.363 3.363 0 0 1-1.177 1.01c-.486.253-1.02.38-1.602.38-.618 0-1.158-.109-1.618-.327a3.208 3.208 0 0 1-1.14-.896 4.017 4.017 0 0 1-.676-1.307 5.54 5.54 0 0 1-.22-1.572v-.319c0-.552.074-1.073.22-1.564.152-.497.378-.935.676-1.314a3.21 3.21 0 0 1 1.14-.897c.46-.218 1-.326 1.618-.326.643 0 1.205.131 1.686.395a2.89 2.89 0 0 1 1.131 1.063c.279.445.431.952.456 1.519h-1.337a2.02 2.02 0 0 0-.288-.919 1.797 1.797 0 0 0-.669-.653 1.866 1.866 0 0 0-.979-.25c-.431 0-.793.085-1.087.257a1.906 1.906 0 0 0-.691.684c-.167.283-.288.6-.364.95a5.214 5.214 0 0 0-.107 1.055v.32c0 .359.036.713.107 1.063.07.349.189.665.357.949.172.284.402.511.691.684.293.167.658.25 1.094.25Zm4.481-3.015v-.175c0-.592.086-1.142.258-1.648.172-.511.42-.955.744-1.33a3.33 3.33 0 0 1 1.178-.88 3.653 3.653 0 0 1 1.549-.32c.578 0 1.097.107 1.557.32.466.207.861.5 1.185.88.329.375.58.819.752 1.33.172.506.258 1.056.258 1.648v.175c0 .592-.086 1.142-.258 1.648a3.948 3.948 0 0 1-.752 1.329 3.429 3.429 0 0 1-1.177.881c-.456.208-.972.312-1.55.312a3.745 3.745 0 0 1-1.557-.312 3.527 3.527 0 0 1-1.185-.881 4.017 4.017 0 0 1-.744-1.329 5.093 5.093 0 0 1-.258-1.648Zm1.405-.175v.175c0 .41.048.797.144 1.162.097.359.241.678.433.957a2.2 2.2 0 0 0 .737.661c.294.157.636.235 1.025.235.385 0 .722-.078 1.011-.235.293-.162.536-.383.729-.661.192-.279.337-.598.433-.957.101-.365.152-.752.152-1.162v-.175c0-.405-.051-.787-.152-1.147a2.939 2.939 0 0 0-.441-.964 2.086 2.086 0 0 0-.729-.669 2.046 2.046 0 0 0-1.018-.243c-.385 0-.724.081-1.018.243a2.195 2.195 0 0 0-.729.669c-.192.278-.336.6-.433.964a4.43 4.43 0 0 0-.144 1.147Zm9.236-2.392v6.585h-1.413v-8.219h1.337l.076 1.633Zm-.288 2.164-.654-.022a5.603 5.603 0 0 1 .221-1.558c.141-.48.351-.898.63-1.253a2.793 2.793 0 0 1 1.041-.82c.415-.198.896-.296 1.443-.296.385 0 .739.055 1.063.167.324.106.605.276.843.509.238.233.423.531.555.896.131.364.197.805.197 1.322v5.476h-1.405V98.37c0-.43-.073-.775-.22-1.033a1.262 1.262 0 0 0-.608-.562 2.192 2.192 0 0 0-.927-.183c-.415 0-.762.074-1.04.22-.279.148-.501.35-.669.608a2.74 2.74 0 0 0-.364.89 4.948 4.948 0 0 0-.106 1.047Zm5.324-.775-.942.29c.005-.451.079-.885.22-1.3a3.52 3.52 0 0 1 .631-1.109 2.98 2.98 0 0 1 1.025-.767c.405-.192.869-.288 1.39-.288.441 0 .831.058 1.17.174.344.117.633.297.866.54.238.238.418.544.539.919.122.374.182.82.182 1.336v5.401h-1.412v-5.416c0-.46-.074-.817-.221-1.07a1.145 1.145 0 0 0-.607-.54 2.432 2.432 0 0 0-.927-.16c-.309 0-.582.054-.82.16a1.695 1.695 0 0 0-.6.44 1.943 1.943 0 0 0-.373.631 2.341 2.341 0 0 0-.121.76Z"}),e.jsx("rect",{width:"99",height:"18",x:"187",y:"90",fill:"color(display-p3 .8745 .8824 .898)",rx:"4"}),e.jsx("path",{fill:"color(display-p3 .8588 .8627 .8667)",d:"M32 118.667h1600v1.111H32z"}),e.jsxs("g",{clipPath:"url(#e)",children:[e.jsx("path",{fill:"color(display-p3 .9608 .9608 .9608)",d:"M32 119.778h1600v800H32z"}),e.jsx("path",{fill:"#fff",d:"M32 119.778h1600v800H32z"}),e.jsx("path",{fill:"#fff",d:"M32 119.778h1531.11v91.417H32z"}),e.jsx("rect",{x:"79.723",y:"145.457",width:"119.774",height:"40.059",rx:"8",style:{fill:"color(display-p3 .7569 .7608 .7647)",fillOpacity:"1"}}),e.jsx("path",{fill:"#000",d:"M248.364 170.986v-11.599h2.101v4.91h5.375v-4.91h2.107v11.599h-2.107v-4.927h-5.375v4.927h-2.101Zm15.891.17c-.849 0-1.586-.187-2.209-.56a3.813 3.813 0 0 1-1.45-1.569c-.339-.672-.509-1.458-.509-2.356 0-.899.17-1.686.509-2.362a3.804 3.804 0 0 1 1.45-1.575c.623-.374 1.36-.56 2.209-.56.85 0 1.586.186 2.209.56a3.758 3.758 0 0 1 1.444 1.575c.344.676.516 1.463.516 2.362 0 .898-.172 1.684-.516 2.356a3.766 3.766 0 0 1-1.444 1.569c-.623.373-1.359.56-2.209.56Zm.012-1.642c.46 0 .845-.127 1.155-.38.31-.256.54-.6.691-1.031.155-.43.232-.909.232-1.438 0-.532-.077-1.014-.232-1.444-.151-.435-.381-.78-.691-1.037-.31-.257-.695-.385-1.155-.385-.472 0-.865.128-1.179.385-.309.257-.541.602-.696 1.037a4.34 4.34 0 0 0-.227 1.444c0 .529.076 1.008.227 1.438.155.431.387.775.696 1.031.314.253.707.38 1.179.38Zm6.216 1.472v-8.699h1.96v1.478h.101c.182-.498.482-.887.901-1.167.419-.283.919-.424 1.501-.424.589 0 1.085.143 1.489.43.408.283.695.67.861 1.161h.091a2.38 2.38 0 0 1 .974-1.155c.461-.291 1.006-.436 1.637-.436.8 0 1.454.253 1.96.758.506.506.759 1.245.759 2.215v5.839h-2.056v-5.522c0-.54-.144-.934-.431-1.184-.287-.253-.638-.379-1.053-.379-.495 0-.882.155-1.161.464-.276.306-.414.705-.414 1.195v5.426h-2.01v-5.607c0-.449-.136-.808-.408-1.076-.268-.268-.619-.402-1.054-.402-.294 0-.562.076-.804.227a1.578 1.578 0 0 0-.578.628 1.97 1.97 0 0 0-.215.94v5.29h-2.05Zm18.484.17c-.872 0-1.626-.181-2.26-.543a3.688 3.688 0 0 1-1.456-1.552c-.339-.672-.509-1.463-.509-2.373 0-.895.17-1.681.509-2.357a3.86 3.86 0 0 1 1.439-1.585c.616-.382 1.339-.572 2.169-.572.536 0 1.042.086 1.518.26.48.17.903.434 1.269.793.37.359.661.816.872 1.371.211.551.317 1.208.317 1.971v.628h-7.13v-1.382h5.165a2.206 2.206 0 0 0-.255-1.047 1.844 1.844 0 0 0-.697-.731 1.95 1.95 0 0 0-1.03-.266c-.42 0-.788.102-1.105.306-.317.2-.564.464-.742.792a2.295 2.295 0 0 0-.266 1.071v1.206c0 .506.093.94.278 1.303.185.359.443.634.775.827.333.189.722.283 1.167.283.298 0 .568-.041.81-.125.242-.086.451-.213.629-.379a1.59 1.59 0 0 0 .402-.617l1.914.215a2.98 2.98 0 0 1-.691 1.325 3.356 3.356 0 0 1-1.291.872c-.525.204-1.125.306-1.801.306Z"}),e.jsx("path",{fill:"color(display-p3 .4196 .4471 .502)",d:"M342.036 170.986h-1.472l4.259-11.599h1.45l4.259 11.599h-1.472l-3.467-9.764h-.09l-3.467 9.764Zm.544-4.531h5.936v1.246h-5.936v-1.246Zm10.078 4.531v-11.599h1.336v4.282h.114c.098-.151.234-.344.408-.578.177-.238.43-.449.758-.634.333-.189.782-.283 1.348-.283.733 0 1.379.183 1.937.549.559.366.995.885 1.309 1.557.313.673.47 1.465.47 2.379 0 .922-.157 1.72-.47 2.396-.314.672-.748 1.193-1.303 1.563-.555.366-1.195.55-1.92.55-.559 0-1.006-.093-1.342-.278-.336-.189-.595-.402-.776-.64a8.822 8.822 0 0 1-.419-.6h-.159v1.336h-1.291Zm1.314-4.349c0 .657.096 1.236.289 1.738.192.499.474.89.844 1.173.37.279.823.419 1.359.419.559 0 1.025-.147 1.399-.442.377-.298.661-.698.849-1.201a4.7 4.7 0 0 0 .289-1.687c0-.612-.094-1.163-.283-1.654-.185-.495-.466-.886-.844-1.173-.374-.29-.844-.436-1.41-.436-.544 0-1.001.138-1.371.414-.37.272-.649.653-.838 1.144-.189.487-.283 1.055-.283 1.705Zm12.264 4.531c-.786 0-1.475-.187-2.068-.561-.589-.374-1.049-.897-1.382-1.569-.328-.672-.492-1.457-.492-2.356 0-.906.164-1.697.492-2.373.333-.676.793-1.201 1.382-1.575.593-.374 1.282-.56 2.068-.56.785 0 1.472.186 2.061.56.593.374 1.054.899 1.382 1.575.332.676.499 1.467.499 2.373 0 .899-.167 1.684-.499 2.356a3.755 3.755 0 0 1-1.382 1.569c-.589.374-1.276.561-2.061.561Zm0-1.201c.596 0 1.087-.153 1.472-.459.385-.306.67-.708.855-1.206a4.624 4.624 0 0 0 .278-1.62 4.67 4.67 0 0 0-.278-1.626 2.736 2.736 0 0 0-.855-1.217c-.385-.31-.876-.465-1.472-.465-.597 0-1.088.155-1.473.465-.385.309-.67.715-.855 1.217a4.67 4.67 0 0 0-.278 1.626c0 .581.093 1.121.278 1.62.185.498.47.9.855 1.206.385.306.876.459 1.473.459Zm11.783-2.537v-5.143h1.337v8.699h-1.337v-1.472h-.09a2.853 2.853 0 0 1-.952 1.127c-.43.306-.974.459-1.631.459-.544 0-1.027-.119-1.45-.357-.423-.242-.755-.604-.997-1.088-.241-.487-.362-1.1-.362-1.84v-5.528h1.337v5.437c0 .634.177 1.14.532 1.518.359.377.815.566 1.371.566.332 0 .67-.085 1.013-.255.348-.17.638-.43.873-.781.237-.351.356-.799.356-1.342Zm7.888-5.143v1.133h-4.509v-1.133h4.509Zm-3.195-2.084h1.337v8.291c0 .378.055.661.164.85a.854.854 0 0 0 .431.374c.177.06.364.09.56.09.147 0 .268-.007.363-.022l.226-.046.272 1.201a2.739 2.739 0 0 1-.379.102 2.788 2.788 0 0 1-.618.057 2.7 2.7 0 0 1-1.11-.244 2.204 2.204 0 0 1-.895-.742c-.234-.332-.351-.751-.351-1.257v-8.654Zm18.122-.816h1.405v7.68c0 .793-.187 1.501-.561 2.124a3.93 3.93 0 0 1-1.569 1.467c-.676.355-1.469.532-2.379.532-.91 0-1.703-.177-2.378-.532a3.972 3.972 0 0 1-1.575-1.467c-.37-.623-.555-1.331-.555-2.124v-7.68h1.405v7.567c0 .566.124 1.07.373 1.512.25.438.605.783 1.065 1.036.465.25 1.02.374 1.665.374.646 0 1.201-.124 1.665-.374.465-.253.82-.598 1.065-1.036.249-.442.374-.946.374-1.512v-7.567Zm10.51 4.848-1.201.34a2.238 2.238 0 0 0-.334-.583 1.618 1.618 0 0 0-.589-.476c-.25-.125-.569-.187-.958-.187-.532 0-.976.123-1.331.368-.351.242-.526.549-.526.923 0 .333.121.595.362.788.242.192.619.353 1.133.481l1.291.317c.778.189 1.358.478 1.739.867.381.385.572.881.572 1.489 0 .499-.143.944-.43 1.337-.284.393-.68.702-1.19.929-.509.226-1.102.34-1.778.34-.887 0-1.622-.193-2.203-.578-.582-.385-.95-.948-1.105-1.688l1.269-.317c.121.468.349.819.685 1.053.34.234.784.352 1.331.352.623 0 1.118-.133 1.484-.397.37-.268.555-.589.555-.963 0-.302-.106-.555-.317-.759-.211-.207-.536-.362-.974-.464l-1.45-.34c-.797-.189-1.382-.481-1.756-.878-.37-.4-.555-.9-.555-1.501 0-.491.138-.925.414-1.302a2.812 2.812 0 0 1 1.138-.89c.483-.215 1.031-.322 1.642-.322.861 0 1.537.188 2.028.566.495.378.846.876 1.054 1.495Z"})]})]})]}),e.jsxs("defs",{children:[e.jsx("clipPath",{id:"a",children:e.jsx("path",{fill:"#fff",d:"M0 0h384v216H0z"})}),e.jsx("clipPath",{id:"c",children:e.jsx("path",{fill:"#fff",d:"M32 44c0-6.627 5.373-12 12-12h1588v46.667H32V44Z"})}),e.jsx("clipPath",{id:"d",children:e.jsx("path",{fill:"#fff",d:"M128.667 40.889h280v37.778h-280z"})}),e.jsx("clipPath",{id:"e",children:e.jsx("path",{fill:"#fff",d:"M32 119.778h1600v800H32z"})}),e.jsxs("filter",{id:"b",width:"1706.67",height:"994.444",x:"-21.333",y:"-3.556",colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[e.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),e.jsx("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),e.jsx("feOffset",{dy:"17.778"}),e.jsx("feGaussianBlur",{stdDeviation:"26.667"}),e.jsx("feComposite",{in2:"hardAlpha",operator:"out"}),e.jsx("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0"}),e.jsx("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_53_37"}),e.jsx("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_53_37",result:"shape"})]})]})]})};hs.defaultProps={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 384 216"};var fs=function(C){return e.jsxs("svg",{...C,children:[e.jsxs("g",{clipPath:"url(#a)",children:[e.jsx("path",{fill:"color(display-p3 .1255 .3333 .898)",d:"M0 0h384v216H0z"}),e.jsxs("g",{filter:"url(#b)",children:[e.jsx("rect",{width:"1600",height:"887.778",x:"32",y:"32",fill:"#1a1a1a",rx:"12",shapeRendering:"crispEdges"}),e.jsxs("g",{clipPath:"url(#c)",children:[e.jsx("path",{fill:"color(display-p3 .2 .2 .2)",d:"M32 44c0-6.627 5.373-12 12-12h1588v46.667H32V44Z"}),e.jsx("rect",{width:"13.333",height:"13.333",x:"55.333",y:"49.778",fill:"color(display-p3 .9255 .4196 .3686)",rx:"6.667"}),e.jsx("rect",{width:"13.333",height:"13.333",x:"77.556",y:"49.778",fill:"color(display-p3 .9569 .749 .3098)",rx:"6.667"}),e.jsx("rect",{width:"13.333",height:"13.333",x:"99.778",y:"49.778",fill:"color(display-p3 .3804 .7686 .3255)",rx:"6.667"}),e.jsxs("g",{clipPath:"url(#d)",children:[e.jsx("path",{fill:"#2a2a2a",d:"M128.667 49.778a8.888 8.888 0 0 1 8.889-8.89h248.888c4.91 0 8.889 3.98 8.889 8.89v28.889H128.667v-28.89Z"}),e.jsx("path",{stroke:"color(display-p3 .8 .8 .8)",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.667",d:"m374.222 56.444 3.334 3.334m0 0 3.333-3.334m-3.333 3.334-3.334 3.333m3.334-3.333 3.333 3.333"}),e.jsx("rect",{width:"180",height:"18",x:"140",y:"51",fill:"color(display-p3 .3 .3 .3)",rx:"4"})]})]}),e.jsx("path",{fill:"#1a1a1a",d:"M32 78.667h1600v40H32z"}),e.jsx("path",{stroke:"color(display-p3 .8 .8 .8)",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.667",d:"M63.111 98.667H49.778m0 0L56.444 92m-6.666 6.667 6.666 6.666m28.889-6.666h13.334m0 0L92 92m6.667 6.667L92 105.333"}),e.jsx("path",{fill:"color(display-p3 .8 .8 .8)",fillRule:"evenodd",d:"M122.278 98.667a5.278 5.278 0 0 1 9.524-3.136l-2.024 2.024h5.555V92l-2.343 2.343a6.944 6.944 0 1 0 .752 7.48.834.834 0 0 0-1.484-.758 5.278 5.278 0 0 1-9.98-2.398Z",clipRule:"evenodd"}),e.jsx("rect",{width:"1360",height:"31.111",x:"152",y:"83.111",fill:"color(display-p3 .2 .2 .2)",rx:"15.556"}),e.jsx("path",{fill:"color(display-p3 .8 .8 .8)",fillRule:"evenodd",d:"M172 93.111a2.778 2.778 0 0 0-2.778 2.778V97h-.555a1.11 1.11 0 0 0-1.111 1.111v5.556c0 .613.497 1.111 1.111 1.111h6.666c.614 0 1.111-.498 1.111-1.111v-5.556A1.11 1.11 0 0 0 175.333 97h-.555v-1.111A2.778 2.778 0 0 0 172 93.11ZM173.667 97v-1.111a1.667 1.667 0 0 0-3.334 0V97h3.334Z",clipRule:"evenodd"}),e.jsx("path",{fill:"color(display-p3 .8 .8 .8)",d:"M195.695 102.373v-4.231c0-.324-.066-.605-.198-.843a1.29 1.29 0 0 0-.577-.562c-.258-.132-.577-.198-.957-.198-.355 0-.666.061-.934.183a1.624 1.624 0 0 0-.623.478 1.05 1.05 0 0 0-.221.638h-1.405c0-.293.076-.585.228-.873.152-.289.37-.55.653-.783a3.271 3.271 0 0 1 1.033-.562 4.072 4.072 0 0 1 1.352-.212c.598 0 1.125.1 1.58.303.461.203.821.51 1.079.92.263.405.395.913.395 1.526v3.828c0 .274.023.565.068.874.051.309.124.575.22.797v.122h-1.466a2.684 2.684 0 0 1-.167-.646 5.26 5.26 0 0 1-.06-.759Zm.243-3.578.015.988h-1.421c-.4 0-.757.032-1.07.098a2.463 2.463 0 0 0-.79.281 1.34 1.34 0 0 0-.487.479 1.273 1.273 0 0 0-.167.661c0 .258.059.493.175.706.117.213.291.382.524.509.238.122.529.182.874.182a2.357 2.357 0 0 0 1.921-.942c.198-.263.304-.519.319-.767l.6.676a2.034 2.034 0 0 1-.288.707 3.402 3.402 0 0 1-1.557 1.329 3.02 3.02 0 0 1-1.2.228c-.557 0-1.046-.109-1.466-.327a2.51 2.51 0 0 1-.973-.873 2.322 2.322 0 0 1-.341-1.238c0-.441.086-.828.258-1.163.172-.339.42-.62.744-.843.324-.228.714-.4 1.17-.516a6.173 6.173 0 0 1 1.527-.175h1.633Zm4.777-1.944v6.927h-1.405v-8.219h1.367l.038 1.292Zm2.567-1.337-.007 1.306a2.035 2.035 0 0 0-.334-.045 3.579 3.579 0 0 0-.35-.015c-.324 0-.61.05-.858.151a1.777 1.777 0 0 0-.63.426c-.173.182-.309.4-.411.653a3.132 3.132 0 0 0-.189.82l-.395.228c0-.496.048-.962.144-1.397.101-.436.256-.82.463-1.155.208-.34.471-.602.79-.79.324-.192.709-.288 1.155-.288.101 0 .217.012.349.038.132.02.223.043.273.068Zm4.436 7.261c.334 0 .643-.068.927-.205.283-.137.516-.324.699-.562.182-.243.286-.519.311-.828h1.337c-.025.486-.19.939-.494 1.36a3.372 3.372 0 0 1-1.177 1.01c-.486.253-1.02.38-1.603.38-.618 0-1.157-.109-1.618-.327a3.213 3.213 0 0 1-1.139-.896 3.998 3.998 0 0 1-.676-1.307 5.504 5.504 0 0 1-.22-1.572v-.319c0-.552.073-1.073.22-1.564a3.99 3.99 0 0 1 .676-1.314c.304-.38.684-.679 1.139-.897.461-.218 1-.326 1.618-.326.643 0 1.205.131 1.686.395.481.258.859.612 1.132 1.063.279.445.431.952.456 1.519h-1.337a2.01 2.01 0 0 0-.289-.919 1.794 1.794 0 0 0-.668-.653 1.867 1.867 0 0 0-.98-.25c-.43 0-.792.085-1.086.257a1.898 1.898 0 0 0-.691.684c-.167.283-.289.6-.365.95a5.214 5.214 0 0 0-.106 1.055v.32c0 .359.035.713.106 1.063.071.349.19.665.357.949.172.284.403.511.691.684.294.167.659.25 1.094.25Zm4.846-10.664h1.413v10.072l-.122 1.595h-1.291V92.111Zm6.965 7.49v.159c0 .597-.071 1.152-.212 1.663-.142.507-.35.947-.623 1.322a2.897 2.897 0 0 1-1.003.873c-.395.208-.848.312-1.359.312-.522 0-.98-.089-1.375-.266a2.707 2.707 0 0 1-.988-.782 4.064 4.064 0 0 1-.645-1.231 7.769 7.769 0 0 1-.327-1.625v-.7c.061-.607.17-1.151.327-1.632a4.05 4.05 0 0 1 .645-1.23 2.6 2.6 0 0 1 .988-.783c.39-.182.843-.273 1.359-.273.517 0 .975.1 1.375.303.4.198.734.481 1.003.851a4 4 0 0 1 .623 1.33c.141.51.212 1.08.212 1.708Zm-1.413.159v-.16c0-.41-.038-.795-.113-1.154a2.993 2.993 0 0 0-.365-.957 1.81 1.81 0 0 0-.661-.653c-.273-.162-.61-.243-1.01-.243-.355 0-.663.06-.927.182a2.014 2.014 0 0 0-.661.493 2.64 2.64 0 0 0-.448.7 3.993 3.993 0 0 0-.25.804v1.831c.081.354.212.696.395 1.025.187.324.435.59.744.798.314.207.701.311 1.162.311.38 0 .704-.076.972-.228.274-.157.494-.372.661-.645.172-.274.299-.59.38-.95.081-.359.121-.744.121-1.154Zm4.717-7.649v11.667h-1.412V92.111h1.412Zm1.884 7.649v-.175c0-.592.086-1.142.258-1.648a3.9 3.9 0 0 1 .745-1.33c.324-.38.716-.673 1.177-.88a3.653 3.653 0 0 1 1.549-.32c.578 0 1.097.107 1.557.32.466.207.861.5 1.185.88.329.375.58.819.752 1.33.172.506.258 1.056.258 1.648v.175c0 .592-.086 1.142-.258 1.648a3.948 3.948 0 0 1-.752 1.329 3.429 3.429 0 0 1-1.177.881c-.456.208-.972.312-1.549.312a3.747 3.747 0 0 1-1.558-.312 3.513 3.513 0 0 1-1.184-.881 4.002 4.002 0 0 1-.745-1.329 5.093 5.093 0 0 1-.258-1.648Zm1.405-.175v.175c0 .41.048.797.144 1.162.097.359.241.678.433.957a2.2 2.2 0 0 0 .737.661c.294.157.636.235 1.025.235.384 0 .722-.078 1.011-.235.293-.162.536-.383.729-.661.192-.279.337-.598.433-.957.101-.365.152-.752.152-1.162v-.175c0-.405-.051-.787-.152-1.147a2.939 2.939 0 0 0-.441-.964 2.086 2.086 0 0 0-.729-.669 2.046 2.046 0 0 0-1.018-.243c-.385 0-.724.081-1.018.243a2.195 2.195 0 0 0-.729.669c-.192.278-.336.6-.433.964a4.43 4.43 0 0 0-.144 1.147Zm9.236-2.392v6.585h-1.413v-8.219h1.337l.076 1.633Zm-.288 2.164-.654-.022a5.603 5.603 0 0 1 .221-1.558c.141-.48.351-.898.63-1.253a2.793 2.793 0 0 1 1.041-.82c.415-.198.896-.296 1.443-.296.385 0 .739.055 1.063.167.324.106.605.276.843.509.238.233.423.531.555.896.131.364.197.805.197 1.322v5.476h-1.405V98.37c0-.43-.073-.775-.22-1.033a1.262 1.262 0 0 0-.608-.562 2.192 2.192 0 0 0-.927-.183c-.415 0-.762.074-1.04.22-.279.148-.501.35-.669.608a2.74 2.74 0 0 0-.364.89 4.948 4.948 0 0 0-.106 1.047Zm5.324-.775-.942.29c.005-.451.079-.885.22-1.3a3.52 3.52 0 0 1 .631-1.109 2.98 2.98 0 0 1 1.025-.767c.405-.192.869-.288 1.39-.288.441 0 .831.058 1.17.174.344.117.633.297.866.54.238.238.418.544.539.919.122.374.182.82.182 1.336v5.401h-1.412v-5.416c0-.46-.074-.817-.221-1.07a1.145 1.145 0 0 0-.607-.54 2.432 2.432 0 0 0-.927-.16c-.309 0-.582.054-.82.16a1.695 1.695 0 0 0-.6.44 1.943 1.943 0 0 0-.373.631 2.341 2.341 0 0 0-.121.76Z"}),e.jsx("rect",{width:"99",height:"18",x:"187",y:"90",fill:"color(display-p3 .3 .3 .3)",rx:"4"}),e.jsx("path",{fill:"color(display-p3 .2 .2 .2)",d:"M32 118.667h1600v1.111H32z"}),e.jsxs("g",{clipPath:"url(#e)",children:[e.jsx("path",{fill:"color(display-p3 .1 .1 .1)",d:"M32 119.778h1600v800H32z"}),e.jsx("path",{fill:"#1a1a1a",d:"M32 119.778h1600v800H32z"}),e.jsx("path",{fill:"#1a1a1a",d:"M32 119.778h1531.11v91.417H32z"}),e.jsx("rect",{x:"79.723",y:"145.457",width:"119.774",height:"40.059",rx:"8",style:{fill:"color(display-p3 .3 .3 .3)",fillOpacity:"1"}}),e.jsx("path",{fill:"#fff",d:"M248.364 170.986v-11.599h2.101v4.91h5.375v-4.91h2.107v11.599h-2.107v-4.927h-5.375v4.927h-2.101Zm15.891.17c-.849 0-1.586-.187-2.209-.56a3.813 3.813 0 0 1-1.45-1.569c-.339-.672-.509-1.458-.509-2.356 0-.899.17-1.686.509-2.362a3.804 3.804 0 0 1 1.45-1.575c.623-.374 1.36-.56 2.209-.56.85 0 1.586.186 2.209.56a3.758 3.758 0 0 1 1.444 1.575c.344.676.516 1.463.516 2.362 0 .898-.172 1.684-.516 2.356a3.766 3.766 0 0 1-1.444 1.569c-.623.373-1.359.56-2.209.56Zm.012-1.642c.46 0 .845-.127 1.155-.38.31-.256.54-.6.691-1.031.155-.43.232-.909.232-1.438 0-.532-.077-1.014-.232-1.444-.151-.435-.381-.78-.691-1.037-.31-.257-.695-.385-1.155-.385-.472 0-.865.128-1.179.385-.309.257-.541.602-.696 1.037a4.34 4.34 0 0 0-.227 1.444c0 .529.076 1.008.227 1.438.155.431.387.775.696 1.031.314.253.707.38 1.179.38Zm6.216 1.472v-8.699h1.96v1.478h.101c.182-.498.482-.887.901-1.167.419-.283.919-.424 1.501-.424.589 0 1.085.143 1.489.43.408.283.695.67.861 1.161h.091a2.38 2.38 0 0 1 .974-1.155c.461-.291 1.006-.436 1.637-.436.8 0 1.454.253 1.96.758.506.506.759 1.245.759 2.215v5.839h-2.056v-5.522c0-.54-.144-.934-.431-1.184-.287-.253-.638-.379-1.053-.379-.495 0-.882.155-1.161.464-.276.306-.414.705-.414 1.195v5.426h-2.01v-5.607c0-.449-.136-.808-.408-1.076-.268-.268-.619-.402-1.054-.402-.294 0-.562.076-.804.227a1.578 1.578 0 0 0-.578.628 1.97 1.97 0 0 0-.215.94v5.29h-2.05Zm18.484.17c-.872 0-1.626-.181-2.26-.543a3.688 3.688 0 0 1-1.456-1.552c-.339-.672-.509-1.463-.509-2.373 0-.895.17-1.681.509-2.357a3.86 3.86 0 0 1 1.439-1.585c.616-.382 1.339-.572 2.169-.572.536 0 1.042.086 1.518.26.48.17.903.434 1.269.793.37.359.661.816.872 1.371.211.551.317 1.208.317 1.971v.628h-7.13v-1.382h5.165a2.206 2.206 0 0 0-.255-1.047 1.844 1.844 0 0 0-.697-.731 1.95 1.95 0 0 0-1.03-.266c-.42 0-.788.102-1.105.306-.317.2-.564.464-.742.792a2.295 2.295 0 0 0-.266 1.071v1.206c0 .506.093.94.278 1.303.185.359.443.634.775.827.333.189.722.283 1.167.283.298 0 .568-.041.81-.125.242-.086.451-.213.629-.379a1.59 1.59 0 0 0 .402-.617l1.914.215a2.98 2.98 0 0 1-.691 1.325 3.356 3.356 0 0 1-1.291.872c-.525.204-1.125.306-1.801.306Z"}),e.jsx("path",{fill:"color(display-p3 .8 .8 .8)",d:"M342.036 170.986h-1.472l4.259-11.599h1.45l4.259 11.599h-1.472l-3.467-9.764h-.09l-3.467 9.764Zm.544-4.531h5.936v1.246h-5.936v-1.246Zm10.078 4.531v-11.599h1.336v4.282h.114c.098-.151.234-.344.408-.578.177-.238.43-.449.758-.634.333-.189.782-.283 1.348-.283.733 0 1.379.183 1.937.549.559.366.995.885 1.309 1.557.313.673.47 1.465.47 2.379 0 .922-.157 1.72-.47 2.396-.314.672-.748 1.193-1.303 1.563-.555.366-1.195.55-1.92.55-.559 0-1.006-.093-1.342-.278-.336-.189-.595-.402-.776-.64a8.822 8.822 0 0 1-.419-.6h-.159v1.336h-1.291Zm1.314-4.349c0 .657.096 1.236.289 1.738.192.499.474.89.844 1.173.37.279.823.419 1.359.419.559 0 1.025-.147 1.399-.442.377-.298.661-.698.849-1.201a4.7 4.7 0 0 0 .289-1.687c0-.612-.094-1.163-.283-1.654-.185-.495-.466-.886-.844-1.173-.374-.29-.844-.436-1.41-.436-.544 0-1.001.138-1.371.414-.37.272-.649.653-.838 1.144-.189.487-.283 1.055-.283 1.705Zm12.264 4.531c-.786 0-1.475-.187-2.068-.561-.589-.374-1.049-.897-1.382-1.569-.328-.672-.492-1.457-.492-2.356 0-.906.164-1.697.492-2.373.333-.676.793-1.201 1.382-1.575.593-.374 1.282-.56 2.068-.56.785 0 1.472.186 2.061.56.593.374 1.054.899 1.382 1.575.332.676.499 1.467.499 2.373 0 .899-.167 1.684-.499 2.356a3.755 3.755 0 0 1-1.382 1.569c-.589.374-1.276.561-2.061.561Zm0-1.201c.596 0 1.087-.153 1.472-.459.385-.306.67-.708.855-1.206a4.624 4.624 0 0 0 .278-1.62 4.67 4.67 0 0 0-.278-1.626 2.736 2.736 0 0 0-.855-1.217c-.385-.31-.876-.465-1.472-.465-.597 0-1.088.155-1.473.465-.385.309-.67.715-.855 1.217a4.67 4.67 0 0 0-.278 1.626c0 .581.093 1.121.278 1.62.185.498.47.9.855 1.206.385.306.876.459 1.473.459Zm11.783-2.537v-5.143h1.337v8.699h-1.337v-1.472h-.09a2.853 2.853 0 0 1-.952 1.127c-.43.306-.974.459-1.631.459-.544 0-1.027-.119-1.45-.357-.423-.242-.755-.604-.997-1.088-.241-.487-.362-1.1-.362-1.84v-5.528h1.337v5.437c0 .634.177 1.14.532 1.518.359.377.815.566 1.371.566.332 0 .67-.085 1.013-.255.348-.17.638-.43.873-.781.237-.351.356-.799.356-1.342Zm7.888-5.143v1.133h-4.509v-1.133h4.509Zm-3.195-2.084h1.337v8.291c0 .378.055.661.164.85a.854.854 0 0 0 .431.374c.177.06.364.09.56.09.147 0 .268-.007.363-.022l.226-.046.272 1.201a2.739 2.739 0 0 1-.379.102 2.788 2.788 0 0 1-.618.057 2.7 2.7 0 0 1-1.11-.244 2.204 2.204 0 0 1-.895-.742c-.234-.332-.351-.751-.351-1.257v-8.654Zm18.122-.816h1.405v7.68c0 .793-.187 1.501-.561 2.124a3.93 3.93 0 0 1-1.569 1.467c-.676.355-1.469.532-2.379.532-.91 0-1.703-.177-2.378-.532a3.972 3.972 0 0 1-1.575-1.467c-.37-.623-.555-1.331-.555-2.124v-7.68h1.405v7.567c0 .566.124 1.07.373 1.512.25.438.605.783 1.065 1.036.465.25 1.02.374 1.665.374.646 0 1.201-.124 1.665-.374.465-.253.82-.598 1.065-1.036.249-.442.374-.946.374-1.512v-7.567Zm10.51 4.848-1.201.34a2.238 2.238 0 0 0-.334-.583 1.618 1.618 0 0 0-.589-.476c-.25-.125-.569-.187-.958-.187-.532 0-.976.123-1.331.368-.351.242-.526.549-.526.923 0 .333.121.595.362.788.242.192.619.353 1.133.481l1.291.317c.778.189 1.358.478 1.739.867.381.385.572.881.572 1.489 0 .499-.143.944-.43 1.337-.284.393-.68.702-1.19.929-.509.226-1.102.34-1.778.34-.887 0-1.622-.193-2.203-.578-.582-.385-.95-.948-1.105-1.688l1.269-.317c.121.468.349.819.685 1.053.34.234.784.352 1.331.352.623 0 1.118-.133 1.484-.397.37-.268.555-.589.555-.963 0-.302-.106-.555-.317-.759-.211-.207-.536-.362-.974-.464l-1.45-.34c-.797-.189-1.382-.481-1.756-.878-.37-.4-.555-.9-.555-1.501 0-.491.138-.925.414-1.302a2.812 2.812 0 0 1 1.138-.89c.483-.215 1.031-.322 1.642-.322.861 0 1.537.188 2.028.566.495.378.846.876 1.054 1.495Z"})]})]})]}),e.jsxs("defs",{children:[e.jsx("clipPath",{id:"a",children:e.jsx("path",{fill:"#fff",d:"M0 0h384v216H0z"})}),e.jsx("clipPath",{id:"c",children:e.jsx("path",{fill:"#fff",d:"M32 44c0-6.627 5.373-12 12-12h1588v46.667H32V44Z"})}),e.jsx("clipPath",{id:"d",children:e.jsx("path",{fill:"#fff",d:"M128.667 40.889h280v37.778h-280z"})}),e.jsx("clipPath",{id:"e",children:e.jsx("path",{fill:"#fff",d:"M32 119.778h1600v800H32z"})}),e.jsxs("filter",{id:"b",width:"1706.67",height:"994.444",x:"-21.333",y:"-3.556",colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[e.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),e.jsx("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),e.jsx("feOffset",{dy:"17.778"}),e.jsx("feGaussianBlur",{stdDeviation:"26.667"}),e.jsx("feComposite",{in2:"hardAlpha",operator:"out"}),e.jsx("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0"}),e.jsx("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_53_37"}),e.jsx("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_53_37",result:"shape"})]})]})]})};fs.defaultProps={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 384 216"};var ms=function(C){return e.jsxs("svg",{...C,children:[e.jsxs("g",{clipPath:"url(#a)",children:[e.jsx("path",{fill:"#1E4DCF",style:{fill:"color(display-p3 .1176 .302 .8118)",fillOpacity:"1"},d:"M0 0h384v216H0z"}),e.jsxs("g",{filter:"url(#b)",children:[e.jsx("path",{d:"M32 44c0-6.627 5.373-12 12-12h760v184H32V44Z",fill:"#fff",style:{fill:"#fff",fillOpacity:"1"},shapeRendering:"crispEdges"}),e.jsx("path",{d:"M76.565 126H32v90h772V43H159.565c-11.017 0-16.525 0-20.822 1.928a22 22 0 0 0-11.065 11.065c-1.928 4.297-1.928 9.806-1.928 20.822 0 16.024 0 24.035-2.805 30.286a31.997 31.997 0 0 1-16.094 16.094C100.6 126 92.589 126 76.565 126Z",fill:"#F1F3F4",style:{fill:"color(display-p3 .9451 .9529 .9569)",fillOpacity:"1"}}),e.jsx("path",{d:"M206.571 72.046h2.991l4.56 7.934h.188l4.559-7.934h2.992l-6.333 10.602V89.5h-2.625v-6.852l-6.332-10.602Zm20.93 17.718c-1.228 0-2.299-.281-3.213-.843-.915-.563-1.625-1.35-2.131-2.361-.506-1.012-.759-2.194-.759-3.546 0-1.358.253-2.545.759-3.562s1.216-1.807 2.131-2.37c.914-.562 1.985-.843 3.213-.843 1.227 0 2.298.28 3.213.843s1.625 1.353 2.13 2.37c.506 1.017.759 2.204.759 3.562 0 1.353-.253 2.534-.759 3.546-.505 1.011-1.215 1.798-2.13 2.36-.915.563-1.986.844-3.213.844Zm.008-2.139c.796 0 1.455-.21 1.978-.63.522-.421.909-.98 1.159-1.68.255-.698.383-1.468.383-2.31 0-.834-.128-1.602-.383-2.3-.25-.705-.637-1.27-1.159-1.697-.523-.426-1.182-.639-1.978-.639-.801 0-1.466.213-1.994.64-.523.426-.912.991-1.168 1.695a6.789 6.789 0 0 0-.375 2.302c0 .84.125 1.61.375 2.31.256.698.645 1.258 1.168 1.678.528.42 1.193.631 1.994.631Zm17.231-3.554v-7.662h2.557V89.5h-2.506v-2.267h-.136c-.301.699-.784 1.281-1.449 1.747-.659.46-1.48.69-2.463.69-.841 0-1.585-.184-2.233-.553-.642-.376-1.148-.93-1.517-1.663-.364-.732-.546-1.639-.546-2.718v-8.327h2.549v8.02c0 .892.247 1.602.741 2.13.495.53 1.137.793 1.926.793.478 0 .952-.119 1.424-.358.477-.238.872-.6 1.184-1.082.318-.483.475-1.097.469-1.841Zm5.981 5.429V76.41h2.463v2.079h.136a3.164 3.164 0 0 1 1.262-1.662 3.608 3.608 0 0 1 2.062-.614 10.87 10.87 0 0 1 1.083.06v2.437a4.633 4.633 0 0 0-.546-.093 5.2 5.2 0 0 0-.784-.06c-.602 0-1.139.128-1.611.383a2.851 2.851 0 0 0-1.517 2.566V89.5h-2.548Zm25.287-12.87c-.091-.806-.466-1.431-1.125-1.874-.659-.45-1.489-.674-2.489-.674-.716 0-1.335.114-1.858.341-.523.222-.929.529-1.219.92a2.173 2.173 0 0 0-.426 1.322c0 .414.097.772.29 1.074.199.3.457.554.776.758.324.199.67.367 1.039.503.37.13.725.239 1.066.324l1.704.443c.557.136 1.128.321 1.713.554.586.233 1.128.54 1.628.92.5.381.904.853 1.21 1.415.313.563.469 1.236.469 2.02 0 .989-.255 1.867-.767 2.634-.506.767-1.241 1.372-2.207 1.815-.96.443-2.122.665-3.486.665-1.307 0-2.438-.208-3.392-.622-.955-.415-1.702-1.003-2.242-1.765-.539-.767-.838-1.676-.894-2.727h2.642c.051.63.255 1.156.613 1.577a3.32 3.32 0 0 0 1.389.929 5.622 5.622 0 0 0 1.867.298c.744 0 1.406-.116 1.986-.35.585-.238 1.045-.567 1.38-.988.336-.426.503-.923.503-1.491 0-.517-.147-.94-.443-1.27-.29-.33-.685-.603-1.185-.819a11.558 11.558 0 0 0-1.679-.57l-2.062-.563c-1.398-.38-2.506-.94-3.324-1.679-.812-.739-1.219-1.716-1.219-2.932 0-1.005.273-1.883.819-2.633.545-.75 1.284-1.333 2.215-1.748.932-.42 1.983-.63 3.154-.63 1.182 0 2.224.207 3.128.622.909.415 1.625.986 2.147 1.713.523.722.796 1.551.819 2.489h-2.54Zm5.721 12.87V76.41h2.548V89.5h-2.548Zm1.287-15.11c-.444 0-.824-.148-1.142-.444a1.44 1.44 0 0 1-.469-1.074c0-.42.156-.778.469-1.074a1.602 1.602 0 0 1 1.142-.451c.443 0 .821.15 1.133.451.318.296.477.654.477 1.074 0 .415-.159.773-.477 1.074-.312.296-.69.443-1.133.443Zm10.8 2.02v2.044h-7.151V76.41h7.151Zm-5.233-3.137h2.548v12.383c0 .495.074.867.222 1.117.148.244.338.412.571.503.239.085.497.127.776.127.204 0 .383-.014.537-.042l.357-.068.461 2.105a4.29 4.29 0 0 1-.631.17 4.998 4.998 0 0 1-1.023.103 4.49 4.49 0 0 1-1.875-.359 3.22 3.22 0 0 1-1.406-1.159c-.358-.522-.537-1.179-.537-1.968V73.273Zm13.553 16.491c-1.289 0-2.4-.275-3.332-.826-.926-.557-1.642-1.339-2.148-2.344-.5-1.012-.75-2.196-.75-3.554 0-1.341.25-2.523.75-3.546.506-1.022 1.21-1.82 2.114-2.395.909-.573 1.971-.86 3.187-.86.739 0 1.455.122 2.148.366a5.213 5.213 0 0 1 1.867 1.15c.551.523.985 1.202 1.304 2.038.318.83.477 1.838.477 3.025v.904h-10.406v-1.91h7.909c0-.67-.137-1.264-.409-1.78a3.098 3.098 0 0 0-1.151-1.236c-.489-.302-1.062-.452-1.722-.452-.715 0-1.34.176-1.875.528a3.55 3.55 0 0 0-1.227 1.364 3.937 3.937 0 0 0-.426 1.815v1.492c0 .875.153 1.619.46 2.233.313.613.747 1.082 1.304 1.406.557.318 1.208.477 1.952.477.483 0 .923-.068 1.321-.205a2.85 2.85 0 0 0 1.031-.63c.29-.278.512-.622.665-1.031l2.412.434a4.367 4.367 0 0 1-1.04 1.867c-.494.528-1.116.94-1.866 1.236-.745.29-1.594.434-2.549.434Zm29.088-17.718V89.5h-2.42l-8.872-12.801h-.162V89.5h-2.634V72.046h2.438l8.881 12.818h.161V72.045h2.608Zm7.447 17.744c-.829 0-1.579-.154-2.25-.46a3.793 3.793 0 0 1-1.594-1.356c-.386-.59-.579-1.315-.579-2.173 0-.739.142-1.347.426-1.824a3.145 3.145 0 0 1 1.151-1.133 5.998 5.998 0 0 1 1.619-.63c.596-.143 1.204-.25 1.824-.325l1.909-.221c.488-.063.844-.162 1.065-.299.222-.136.333-.358.333-.665v-.06c0-.743-.211-1.32-.631-1.73-.415-.408-1.034-.613-1.858-.613-.858 0-1.534.19-2.028.571-.489.375-.827.793-1.015 1.253l-2.395-.546c.285-.795.699-1.437 1.245-1.926a5.043 5.043 0 0 1 1.9-1.074 7.424 7.424 0 0 1 2.259-.34c.523 0 1.077.062 1.662.187a4.86 4.86 0 0 1 1.653.665c.517.324.941.787 1.27 1.39.33.596.494 1.371.494 2.326V89.5h-2.488v-1.79h-.103c-.164.33-.411.654-.741.972-.33.318-.753.582-1.27.792-.517.21-1.136.316-1.858.316Zm.554-2.046c.705 0 1.307-.139 1.807-.417.506-.279.889-.642 1.151-1.091.267-.455.4-.94.4-1.458v-1.687c-.091.09-.267.176-.528.256-.256.074-.549.139-.878.196-.33.05-.651.099-.963.144-.313.04-.574.074-.784.103a6.307 6.307 0 0 0-1.355.315c-.404.148-.728.36-.972.64-.239.272-.358.636-.358 1.09 0 .63.233 1.108.699 1.432.466.318 1.06.477 1.781.477Zm9.301 1.756V76.41h2.446v2.13h.162a3.374 3.374 0 0 1 1.338-1.688c.619-.409 1.36-.613 2.224-.613.875 0 1.608.204 2.199.613.596.41 1.037.972 1.321 1.688h.136a3.687 3.687 0 0 1 1.492-1.67c.682-.421 1.494-.631 2.437-.631 1.188 0 2.157.372 2.907 1.116.755.744 1.133 1.867 1.133 3.367V89.5h-2.548v-8.54c0-.886-.242-1.528-.725-1.926-.483-.398-1.059-.597-1.73-.597-.829 0-1.474.256-1.934.767-.461.506-.691 1.157-.691 1.952V89.5h-2.54v-8.702c0-.71-.221-1.281-.664-1.713-.444-.432-1.02-.647-1.73-.647-.483 0-.929.127-1.339.383-.403.25-.73.6-.98 1.048-.244.45-.366.97-.366 1.56V89.5h-2.548Zm26.853.264c-1.29 0-2.401-.275-3.333-.826-.926-.557-1.642-1.339-2.148-2.344-.5-1.012-.75-2.196-.75-3.554 0-1.341.25-2.523.75-3.546.506-1.022 1.211-1.82 2.114-2.395.909-.573 1.972-.86 3.188-.86.738 0 1.454.122 2.147.366a5.205 5.205 0 0 1 1.867 1.15c.551.523.986 1.202 1.304 2.038.318.83.477 1.838.477 3.025v.904h-10.406v-1.91h7.909c0-.67-.136-1.264-.409-1.78a3.091 3.091 0 0 0-1.151-1.236c-.488-.302-1.062-.452-1.721-.452-.716 0-1.341.176-1.875.528a3.545 3.545 0 0 0-1.228 1.364 3.937 3.937 0 0 0-.426 1.815v1.492c0 .875.154 1.619.46 2.233a3.336 3.336 0 0 0 1.304 1.406c.557.318 1.208.477 1.952.477.483 0 .923-.068 1.321-.205a2.842 2.842 0 0 0 1.031-.63c.29-.278.512-.622.665-1.031l2.412.434a4.367 4.367 0 0 1-1.04 1.867c-.494.528-1.116.94-1.866 1.236-.744.29-1.594.434-2.548.434ZM85 161.333H62.477l7.574-7.46-2.393-2.366L56 163.007l11.658 11.5 2.393-2.367-7.575-7.459H85v-3.348Z",fill:"#242527",style:{fill:"color(display-p3 .1412 .1451 .1529)",fillOpacity:"1"}}),e.jsx("path",{opacity:".4",d:"M106 164.681h22.524l-7.575 7.46 2.393 2.366 11.658-11.5-11.658-11.5-2.393 2.366 7.575 7.46H106v3.348Z",fill:"#242527",style:{fill:"color(display-p3 .1412 .1451 .1529)",fillOpacity:"1"}}),e.jsx("path",{d:"m181.89 164.538-3.225-.385a9.734 9.734 0 0 1-8.859 8.543 9.74 9.74 0 0 1-5.382-18.303 9.738 9.738 0 0 1 12.074 2.387h-4.055v3.25h9.664v-9.664h-3.249v4.187a12.842 12.842 0 0 0-6.064-3.985 12.995 12.995 0 0 0-13.833 4.172 12.994 12.994 0 0 0-1.431 14.376 13.2 13.2 0 0 0 2.286 3.106 12.987 12.987 0 0 0 13.436 3.071 12.992 12.992 0 0 0 8.638-10.74v-.015Z",fill:"#242527",style:{fill:"color(display-p3 .1412 .1451 .1529)",fillOpacity:"1"}}),e.jsx("path",{d:"M208 161.7c0-12.321 0-18.482 2.398-23.188a22.002 22.002 0 0 1 9.614-9.614c4.706-2.398 10.867-2.398 23.188-2.398H804v73H243.2c-12.321 0-18.482 0-23.188-2.398a22.002 22.002 0 0 1-9.614-9.614C208 182.782 208 176.621 208 164.3v-2.6Z",fill:"#fff",style:{fill:"#fff",fillOpacity:"1"}})]}),e.jsx("rect",{x:"229",y:"145",width:"180",height:"36",rx:"8",fill:"#DFE1E5",style:{fill:"color(display-p3 .8745 .8824 .898)",fillOpacity:"1"}}),e.jsx("rect",{x:"203",y:"66",width:"180",height:"36",rx:"8",fill:"#DFE1E5",style:{fill:"color(display-p3 .8745 .8824 .898)",fillOpacity:"1"}})]}),e.jsxs("defs",{children:[e.jsx("clipPath",{id:"a",children:e.jsx("path",{fill:"#fff",style:{fill:"#fff",fillOpacity:"1"},d:"M0 0h384v216H0z"})}),e.jsxs("filter",{id:"b",x:"-21.333",y:"-3.556",width:"878.667",height:"290.667",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[e.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),e.jsx("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),e.jsx("feOffset",{dy:"17.778"}),e.jsx("feGaussianBlur",{stdDeviation:"26.667"}),e.jsx("feComposite",{in2:"hardAlpha",operator:"out"}),e.jsx("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0"}),e.jsx("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_13_53"}),e.jsx("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_13_53",result:"shape"})]})]})]})};ms.defaultProps={width:"384",height:"216",fill:"none",xmlns:"http://www.w3.org/2000/svg"};const vn=Object.keys(te.SUPPORTED_LANGUAGES).map(x=>({code:x,name:te.SUPPORTED_LANGUAGES[x].nativeName,enName:te.SUPPORTED_LANGUAGES[x].name})),xn=["name","enName","code"];function gt({blocklet:x,onUpdate:C=()=>{},hasPermission:$=!1,...R}){const{api:_,prefix:b,getSessionInHeader:m}=ne(),{t:r}=L.useContext(ce),[p,f]=pt({loading:!1,showTransferOwner:!1,showConfigVault:!1}),u=p.loading||!$,{logoUrl:t,logoDarkUrl:l,rectLogoUrl:i,rectLogoDarkUrl:n,faviconUrl:s,splashPortraitUrl:c,splashLandscapeUrl:a,ogImageUrl:o}=Js({blocklet:x});if(mt(x.status))return null;const h=x.environments.find(y=>y.key===te.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LANGUAGES),g=x.environments.find(y=>y.key===te.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),v=x.environments.find(y=>y.key===te.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_OWNER),k=x.environments.find(y=>y.key===te.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_YEAR),w=[{key:te.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_NAME,title:r("blocklet.config.name"),description:r("blocklet.config.nameDesc"),value:x.environments.find(y=>y.key==="BLOCKLET_APP_NAME").value},{key:te.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_DESCRIPTION,title:r("blocklet.config.description"),description:r("blocklet.config.descriptionDesc"),value:x.environments.find(y=>y.key==="BLOCKLET_APP_DESCRIPTION").value},{key:te.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL,title:r("blocklet.config.appUrl"),description:r("blocklet.config.appUrlDesc"),value:g?g.value:""},{key:te.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_OWNER,title:r("blocklet.config.copyrightOwner"),description:r("blocklet.config.copyrightDesc"),value:v?v.value:""},{key:te.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_YEAR,title:r("blocklet.config.copyrightYear"),description:r("blocklet.config.copyrightDesc"),value:k?k.value:""}],d=async(y,j)=>{const S=[{key:y,value:j}];try{f({loading:!0});const{blocklet:O}=await _.configBlocklet({input:{did:x.meta.did,configs:S}});C(O)}catch(O){V.error(O.message)}finally{f({loading:!1})}};return e.jsxs(wn,{...R,children:[e.jsxs(A,{children:[e.jsx(J,{variant:"h6",sx:{fontWeight:600},children:r("blocklet.config.baseInfo")}),e.jsx(J,{variant:"body2",sx:{color:"text.secondary"},children:r("blocklet.config.baseInfoDesc")})]}),e.jsx(A,{className:"config-form",component:X,sx:{my:3}}),w.map(y=>e.jsxs(e.Fragment,{children:[e.jsx(z,{title:y.title,desc:y.description,children:e.jsx(ls,{style:{marginTop:0},disabled:u,loading:p.loading,initialValue:Rr.escapeTag(y.value),placeholder:y.title,onSubmit:j=>d(y.key,j)})},y.key),e.jsx(A,{className:"config-form",component:X,sx:{my:3}})]})),e.jsx(z,{title:r("blocklet.config.languages"),desc:r("blocklet.config.languagesDesc"),children:e.jsx(cs,{style:{marginTop:0},disabled:u,loading:p.loading,options:vn,noEmpty:!0,initialValue:h?h.value.split(","):["en","zh"],onSubmit:y=>d("BLOCKLET_APP_LANGUAGES",y),helperText:r("blocklet.config.selectLanguagesTip"),placeholder:r("blocklet.config.languagesSearch"),filterKeys:xn,renderLabel:(y,j)=>j.name===j.enName?`${j.name} (${y.toUpperCase()})`:`${j.name}, ${j.enName} (${y.toUpperCase()})`})}),e.jsxs(A,{sx:{mt:6},children:[e.jsx(J,{variant:"h6",sx:{fontWeight:600},children:r("blocklet.config.logoSettings")}),e.jsx(J,{variant:"body2",sx:{color:"text.secondary"},children:r("blocklet.config.logoSettingsDesc")}),e.jsx(J,{variant:"body2",sx:{color:"warning.main"},children:r("blocklet.config.changeImageTip")})]}),e.jsx(A,{className:"config-form",component:X,sx:{my:3}}),e.jsxs(kn,{children:[e.jsx(z,{title:r("blocklet.config.logoSquare"),desc:`${r("blocklet.config.logoSquareDesc")}
19
- ${r("blocklet.config.logoDesc",{width:512,height:512,maxSize:5})}`,link:"https://www.didwallet.io/",children:e.jsxs(A,{sx:{display:"flex",gap:3,flexWrap:"wrap"},children:[e.jsxs(A,{sx:{alignSelf:"flex-start",display:"flex",flexDirection:"column",gap:3},children:[e.jsx(J,{variant:"body2",children:r("common.lightMode")}),e.jsx(A,{sx:{width:307,height:173,position:"relative",borderRadius:"4px",overflow:"hidden"},children:e.jsx(lt,{name:x.environments.find(y=>y.key==="BLOCKLET_APP_NAME").value,icon:t,did:x.meta.did})}),e.jsx(be,{did:x.meta.did,width:80,type:"square",prefix:b,url:t,enabled:$,headers:m,aspectRatio:1,children:e.jsx(Y,{variant:"outlined",color:"primary",children:r("common.upload")})})]}),e.jsxs(A,{sx:{alignSelf:"flex-start",display:"flex",flexDirection:"column",gap:3},children:[e.jsx(J,{variant:"body2",children:r("common.darkMode")}),e.jsx(A,{sx:{width:307,height:173,position:"relative",borderRadius:"4px",overflow:"hidden"},children:e.jsx(lt,{dark:!0,name:x.environments.find(y=>y.key==="BLOCKLET_APP_NAME").value,icon:l,did:x.meta.did})}),e.jsx(be,{did:x.meta.did,width:80,type:"square-dark",prefix:b,url:l,enabled:$,headers:m,aspectRatio:1,children:e.jsx(Y,{variant:"outlined",color:"primary",children:r("common.upload")})})]})]})}),e.jsx(A,{className:"config-form",component:X,sx:{my:3}}),e.jsx(z,{title:r("blocklet.config.logoRect"),desc:`${r("blocklet.config.logoRectDesc")}`,children:e.jsxs(A,{sx:{display:"flex",gap:3,flexWrap:"wrap"},children:[e.jsxs(A,{sx:{alignSelf:"flex-start",display:"flex",flexDirection:"column",gap:3},children:[e.jsx(J,{variant:"body2",children:r("common.lightMode")}),e.jsxs(A,{sx:{width:307,height:173,position:"relative",borderRadius:"4px",overflow:"hidden"},children:[i?e.jsx(ds,{viewBox:"0 0 384 216",sx:{width:"100%",height:"100%"}}):e.jsx(hs,{viewBox:"0 0 384 216",sx:{width:"100%",height:"100%"}}),i&&e.jsx(A,{component:"img",src:i,alt:"app-logo",sx:{position:"absolute",top:112,left:64,maxHeight:40,maxWidth:120}})]}),e.jsx(be,{did:x.meta.did,width:80,height:"auto",type:"rect",prefix:b,url:i,enabled:$,headers:m,aspectRatio:NaN,minWidth:80,minHeight:120,children:e.jsx(Y,{variant:"outlined",children:r("common.upload")})})]}),e.jsxs(A,{sx:{alignSelf:"flex-start",display:"flex",flexDirection:"column",gap:3},children:[e.jsx(J,{variant:"body2",children:r("common.darkMode")}),e.jsxs(A,{sx:{width:307,height:173,position:"relative",borderRadius:"4px",overflow:"hidden"},children:[n?e.jsx(us,{viewBox:"0 0 384 216",sx:{width:"100%",height:"100%"}}):e.jsx(fs,{viewBox:"0 0 384 216",sx:{width:"100%",height:"100%"}}),n&&e.jsx(A,{component:"img",src:n,alt:"app-logo",sx:{position:"absolute",top:112,left:64,maxHeight:40,maxWidth:120}})]}),e.jsx(be,{did:x.meta.did,width:80,height:"auto",type:"rect-dark",prefix:b,url:n,enabled:$,headers:m,aspectRatio:NaN,minWidth:80,minHeight:120,children:e.jsx(Y,{variant:"outlined",children:r("common.upload")})})]})]})}),e.jsx(A,{className:"config-form",component:X,sx:{my:3}}),e.jsx(z,{title:r("blocklet.config.logoFavicon"),desc:`${r("blocklet.config.logoFaviconDesc")}
20
- ${r("blocklet.config.logoDesc",{width:512,height:512,maxSize:5})}`,children:e.jsxs(A,{sx:{alignSelf:"flex-start",display:"flex",flexDirection:"column",gap:3},children:[e.jsxs(A,{sx:{width:307,height:173,position:"relative",borderRadius:"4px",overflow:"hidden"},children:[e.jsx(ms,{viewBox:"0 0 384 216",sx:{width:"100%",height:"100%"}}),s&&e.jsx(A,{component:"img",src:s,alt:"app-logo",sx:{position:"absolute",top:62,left:146,width:44,height:44,borderRadius:"12px"}})]}),e.jsx(be,{did:x.meta.did,width:80,type:"favicon",prefix:b,url:s,enabled:$,headers:m,aspectRatio:1,children:e.jsx(Y,{variant:"outlined",children:r("common.upload")})})]})}),e.jsx(A,{className:"config-form",component:X,sx:{my:3}}),e.jsx(z,{title:r("blocklet.config.splashPortrait"),desc:r("blocklet.config.splashDesc"),link:"https://www.arcsphere.io/",children:e.jsxs(A,{sx:{display:"flex",gap:3,alignSelf:"flex-start",".uploader-wrapper":{borderRadius:0},flexWrap:"wrap"},children:[e.jsx(be,{did:x.meta.did,height:400,width:225,type:"splash-portrait",prefix:b,url:c,enabled:$,headers:m,aspectRatio:9/16,minWidth:900,minHeight:1e3,allowSVG:!1}),e.jsx(A,{sx:{width:"100%",maxWidth:400,aspectRatio:"16 / 9",position:"relative"},children:e.jsx(be,{did:x.meta.did,height:"100%",width:"100%",type:"splash-landscape",prefix:b,url:a,enabled:$,headers:m,aspectRatio:16/9,minWidth:1600,minHeight:900,allowSVG:!1})})]})}),e.jsx(A,{className:"config-form",component:X,sx:{my:3}}),e.jsx(z,{title:r("blocklet.config.ogImage"),desc:r("blocklet.config.ogImageDesc"),children:e.jsx(A,{sx:{width:"100%",maxWidth:400,aspectRatio:"40 / 21",position:"relative",alignSelf:"flex-start",".uploader-wrapper":{borderRadius:0}},children:e.jsx(be,{did:x.meta.did,height:"100%",width:"100%",type:"og-image",prefix:b,url:o,enabled:$,headers:m,aspectRatio:40/21,minWidth:1200,minHeight:630,allowSVG:!1})})})]})]})}const bn=Ee(gt,"mutate_blocklets"),jn=Ee(gt,"",ft);function _n(x){const{inService:C}=ne();return C?e.jsx(jn,{...x}):e.jsx(bn,{...x})}gt.propTypes={blocklet:T.object.isRequired,onUpdate:T.func,hasPermission:T.bool};const wn=ye(A)`
21
- max-width: 1536px;
22
-
23
- .config-form {
24
- flex-grow: 1;
25
- overflow-y: auto;
26
-
27
- ${x=>x.theme.breakpoints.down("md")} {
28
- width: 100%;
29
- flex-shrink: 0;
30
- transform: translate(0, 0);
31
- }
32
- }
33
-
34
- .config-item {
35
- display: flex;
36
- align-items: center;
37
- justify-content: space-between;
38
- margin: 16px 0;
39
- }
40
-
41
- .config-label {
42
- font-weight: bold;
43
- }
44
-
45
- .config-desc {
46
- font-weight: normal;
47
- font-size: 12px;
48
- color: #666;
49
- }
50
-
51
- .form-item {
52
- margin-top: 0;
53
- }
54
- `,kn=ye(ae)``,Sn=localStorage.getItem("enableDebug")==="true";function ps({onChange:x=()=>{},disabled:C=!1,loading:$=!1,inService:R=!1}){const{t:_}=ie(),{api:b,session:m}=Ft(),{blocklet:r}=le(),[p,f]=Ks({newAppSk:"",isConnectOpen:!1,confirmDialogOpen:!1}),u=()=>f({isConnectOpen:!1}),t=()=>{if(Zt.isInProgress(r.status)){V.error(_("blocklet.error.isInProgress"));return}f({confirmDialogOpen:!0})};return e.jsxs(e.Fragment,{children:[e.jsx(z,{title:_("blocklet.config.migrate.button"),desc:_("blocklet.config.migrate.description"),children:e.jsx(A,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsxs(Y,{style:{flexShrink:0},variant:"contained",color:"primary",size:"small","data-cy":"config-did",disabled:C||$,onClick:t,children:[e.jsx(rn,{style:{fontSize:"1.3em",marginRight:4}}),_("blocklet.config.migrate.button")]})})}),e.jsxs(e.Fragment,{children:[p.isConnectOpen&&e.jsx(Nt,{popup:!0,open:p.isConnectOpen,forceConnected:!1,saveConnect:!1,action:"rotate-key-pair",checkFn:b.get,checkTimeout:5*60*1e3,onSuccess:()=>{x(),R&&m.logout(),u()},extraParams:{appDid:r.appDid},messages:{title:_("setup.keyPair.title"),scan:_("setup.keyPair.scan"),confirm:_("setup.keyPair.confirm"),success:_("setup.keyPair.success")},onClose:u}),p.confirmDialogOpen&&e.jsx(Gs,{title:e.jsx(J,{sx:{fontSize:"20px",fontWeight:"500"},children:_("blocklet.config.migrate.title")}),description:e.jsx(J,{sx:{fontSize:"14px",color:"#9397A1"},children:_("blocklet.config.migrate.confirm")}),confirm:_("common.confirm"),cancel:_("common.cancel"),onConfirm:()=>f({confirmDialogOpen:!1,isConnectOpen:!0}),onCancel:()=>f({confirmDialogOpen:!1})})]})]})}ps.propTypes={onChange:T.func,disabled:T.bool,loading:T.bool,inService:T.bool};function gs({onCancel:x,onSuccess:C,onError:$=()=>{}}){const{api:R}=L.useContext(Ys),[_,b]=L.useState(!1),{t:m,locale:r}=ie(),[p,f]=L.useState(""),[u,t]=L.useState(!1),[l,i]=L.useState(0),[n,s]=L.useState(""),{endpoint:c}=Ne(),[a,o]=L.useState(!1),h=d=>{f(null),b(!0);try{s(d.result),i(k.length-1)}catch(y){const j=at(y);f(j),$(y)}finally{b(!1)}},g=()=>{t(!0),i(1)},v=()=>{t(!1),i(0)},k=[{body:e.jsxs(A,{children:[e.jsx(J,{children:m("team.transferApp.transferDialog.tips.progress")}),e.jsx(J,{sx:{mt:3,mb:2},children:m("team.transferApp.transferDialog.tips.newOwnerPermissions")})]}),cancel:m("common.cancel"),confirm:m("team.transferApp.transferDialog.createTransferLink"),onCancel:x,onConfirm:g},{cancel:m("common.cancel"),confirm:m("team.transferApp.transferDialog.createTransferLink"),body:()=>e.jsx(Nt,{action:"transfer-app-owner",open:u,locale:r,checkFn:R.get,onClose:v,onSuccess:h,checkTimeout:5*60*1e3,extraParams:{},messages:{title:m("team.transferApp.connectDialog.title"),scan:m("team.transferApp.connectDialog.scan"),confirm:m("team.transferApp.connectDialog.confirm"),success:m("team.transferApp.connectDialog.success")},popup:!0})},{body:()=>{const d=Xs({transferId:n.transferId,endpoint:c});return e.jsxs(e.Fragment,{children:[e.jsx(A,{component:$e,dangerouslySetInnerHTML:{__html:m("team.transferApp.transferDialog.createSuccessTip1")}}),e.jsx(A,{component:$e,sx:{mt:2},children:e.jsx($e,{children:m("team.transferApp.transferDialog.createSuccessTip3")})}),e.jsxs(A,{children:[e.jsx(A,{component:$e,sx:{mt:2},children:e.jsx($e,{children:m("team.transferApp.transferDialog.createSuccessTip2",{expireDate:Qs(n.expireDate,r)})})}),e.jsx(A,{sx:{my:1},children:e.jsx(Br,{children:d})})]}),e.jsx("div",{children:e.jsx(G,{value:"end",control:e.jsx(Pe,{checked:a,onChange:y=>o(y.target.checked)}),label:m("team.transferApp.transferDialog.iKnow"),labelPlacement:"end"})})]})},confirm:m("common.confirm"),onConfirm:C}],w=k[l];return e.jsxs(_e,{title:e.jsx($e,{className:"title",children:m("team.transferApp.transferDialog.title")}),fullWidth:!0,open:!0,showCloseButton:!1,actions:e.jsxs(e.Fragment,{children:[w.cancel&&e.jsx(Q,{onClick:w.onCancel,color:"inherit",children:w.cancel}),e.jsxs(Q,{onClick:w.onConfirm,color:"error",disabled:_||l===k.length-1&&!a,variant:"contained",autoFocus:!0,children:[_&&e.jsx(Se,{size:16}),w.confirm]})]}),children:[e.jsx(er,{component:"div",children:typeof w.body=="function"?w.body():w.body}),!!p&&e.jsx(tr,{severity:"error",variant:"icon",children:p})]})}gs.propTypes={onCancel:T.func.isRequired,onSuccess:T.func.isRequired,onError:T.func};const $e=ye.div`
55
- font-size: 16px;
56
- font-weight: bold;
57
- &.title {
58
- font-size: 20px;
59
- }
60
- `;var qe={},Ge={exports:{}},Et;function Cn(){return Et||(Et=1,function(x,C){(function($,R){x.exports=R()})(self,()=>{return $={7629:(_,b,m)=>{const r=m(375),p=m(8571),f=m(9474),u=m(1687),t=m(8652),l=m(8160),i=m(3292),n=m(6354),s=m(8901),c=m(9708),a=m(6914),o=m(2294),h=m(6133),g=m(1152),v=m(8863),k=m(2036),w={Base:class{constructor(d){this.type=d,this.$_root=null,this._definition={},this._reset()}_reset(){this._ids=new o.Ids,this._preferences=null,this._refs=new h.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 r(typeof c.describe=="function","Manifest functionality disabled"),c.describe(this)}allow(...d){return l.verifyFlat(d,"allow"),this._values(d,"_valids")}alter(d){r(d&&typeof d=="object"&&!Array.isArray(d),"Invalid targets argument"),r(!this._inRuleset(),"Cannot set alterations inside a ruleset");const y=this.clone();y.$_terms.alterations=y.$_terms.alterations||[];for(const j in d){const S=d[j];r(typeof S=="function","Alteration adjuster for",j,"must be a function"),y.$_terms.alterations.push({target:j,adjuster:S})}return y.$_temp.ruleset=!1,y}artifact(d){return r(d!==void 0,"Artifact cannot be undefined"),r(!this._cache,"Cannot set an artifact with a rule cache"),this.$_setFlag("artifact",d)}cast(d){return r(d===!1||typeof d=="string","Invalid to value"),r(d===!1||this._definition.cast[d],"Type",this.type,"does not support casting to",d),this.$_setFlag("cast",d===!1?void 0:d)}default(d,y){return this._default("default",d,y)}description(d){return r(d&&typeof d=="string","Description must be a non-empty string"),this.$_setFlag("description",d)}empty(d){const y=this.clone();return d!==void 0&&(d=y.$_compile(d,{override:!1})),y.$_setFlag("empty",d,{clone:!1})}error(d){return r(d,"Missing error"),r(d instanceof Error||typeof d=="function","Must provide a valid Error object or a function"),this.$_setFlag("error",d)}example(d,y={}){return r(d!==void 0,"Missing example"),l.assertOptions(y,["override"]),this._inner("examples",d,{single:!0,override:y.override})}external(d,y){return typeof d=="object"&&(r(!y,"Cannot combine options with description"),y=d.description,d=d.method),r(typeof d=="function","Method must be a function"),r(y===void 0||y&&typeof y=="string","Description must be a non-empty string"),this._inner("externals",{method:d,description:y},{single:!0})}failover(d,y){return this._default("failover",d,y)}forbidden(){return this.presence("forbidden")}id(d){return d?(r(typeof d=="string","id must be a non-empty string"),r(/^[^\.]+$/.test(d),"id cannot contain period character"),this.$_setFlag("id",d)):this.$_setFlag("id",void 0)}invalid(...d){return this._values(d,"_invalids")}label(d){return r(d&&typeof d=="string","Label name must be a non-empty string"),this.$_setFlag("label",d)}meta(d){return r(d!==void 0,"Meta cannot be undefined"),this._inner("metas",d,{single:!0})}note(...d){r(d.length,"Missing notes");for(const y of d)r(y&&typeof y=="string","Notes must be non-empty strings");return this._inner("notes",d)}only(d=!0){return r(typeof d=="boolean","Invalid mode:",d),this.$_setFlag("only",d)}optional(){return this.presence("optional")}prefs(d){r(d,"Missing preferences"),r(d.context===void 0,"Cannot override context"),r(d.externals===void 0,"Cannot override externals"),r(d.warnings===void 0,"Cannot override warnings"),r(d.debug===void 0,"Cannot override debug"),l.checkPreferences(d);const y=this.clone();return y._preferences=l.preferences(y._preferences,d),y}presence(d){return r(["optional","required","forbidden"].includes(d),"Unknown presence mode",d),this.$_setFlag("presence",d)}raw(d=!0){return this.$_setFlag("result",d?"raw":void 0)}result(d){return r(["raw","strip"].includes(d),"Unknown result mode",d),this.$_setFlag("result",d)}required(){return this.presence("required")}strict(d){const y=this.clone(),j=d!==void 0&&!d;return y._preferences=l.preferences(y._preferences,{convert:j}),y}strip(d=!0){return this.$_setFlag("result",d?"strip":void 0)}tag(...d){r(d.length,"Missing tags");for(const y of d)r(y&&typeof y=="string","Tags must be non-empty strings");return this._inner("tags",d)}unit(d){return r(d&&typeof d=="string","Unit name must be a non-empty string"),this.$_setFlag("unit",d)}valid(...d){l.verifyFlat(d,"valid");const y=this.allow(...d);return y.$_setFlag("only",!!y._valids,{clone:!1}),y}when(d,y){const j=this.clone();j.$_terms.whens||(j.$_terms.whens=[]);const S=i.when(j,d,y);if(!["any","link"].includes(j.type)){const O=S.is?[S]:S.switch;for(const P of O)r(!P.then||P.then.type==="any"||P.then.type===j.type,"Cannot combine",j.type,"with",P.then&&P.then.type),r(!P.otherwise||P.otherwise.type==="any"||P.otherwise.type===j.type,"Cannot combine",j.type,"with",P.otherwise&&P.otherwise.type)}return j.$_terms.whens.push(S),j.$_mutateRebuild()}cache(d){r(!this._inRuleset(),"Cannot set caching inside a ruleset"),r(!this._cache,"Cannot override schema cache"),r(this._flags.artifact===void 0,"Cannot cache a rule with an artifact");const y=this.clone();return y._cache=d||t.provider.provision(),y.$_temp.ruleset=!1,y}clone(){const d=Object.create(Object.getPrototypeOf(this));return this._assign(d)}concat(d){r(l.isSchema(d),"Invalid schema object"),r(this.type==="any"||d.type==="any"||d.type===this.type,"Cannot merge type",this.type,"with another type:",d.type),r(!this._inRuleset(),"Cannot concatenate onto a schema with open ruleset"),r(!d._inRuleset(),"Cannot concatenate a schema with open ruleset");let y=this.clone();if(this.type==="any"&&d.type!=="any"){const j=d.clone();for(const S of Object.keys(y))S!=="type"&&(j[S]=y[S]);y=j}y._ids.concat(d._ids),y._refs.register(d,h.toSibling),y._preferences=y._preferences?l.preferences(y._preferences,d._preferences):d._preferences,y._valids=k.merge(y._valids,d._valids,d._invalids),y._invalids=k.merge(y._invalids,d._invalids,d._valids);for(const j of d._singleRules.keys())y._singleRules.has(j)&&(y._rules=y._rules.filter(S=>S.keep||S.name!==j),y._singleRules.delete(j));for(const j of d._rules)d._definition.rules[j.method].multi||y._singleRules.set(j.name,j),y._rules.push(j);if(y._flags.empty&&d._flags.empty){y._flags.empty=y._flags.empty.concat(d._flags.empty);const j=Object.assign({},d._flags);delete j.empty,u(y._flags,j)}else if(d._flags.empty){y._flags.empty=d._flags.empty;const j=Object.assign({},d._flags);delete j.empty,u(y._flags,j)}else u(y._flags,d._flags);for(const j in d.$_terms){const S=d.$_terms[j];S?y.$_terms[j]?y.$_terms[j]=y.$_terms[j].concat(S):y.$_terms[j]=S.slice():y.$_terms[j]||(y.$_terms[j]=S)}return this.$_root._tracer&&this.$_root._tracer._combine(y,[this,d]),y.$_mutateRebuild()}extend(d){return r(!d.base,"Cannot extend type with another base"),s.type(this,d)}extract(d){return d=Array.isArray(d)?d:d.split("."),this._ids.reach(d)}fork(d,y){r(!this._inRuleset(),"Cannot fork inside a ruleset");let j=this;for(let S of[].concat(d))S=Array.isArray(S)?S:S.split("."),j=j._ids.fork(S,y,j);return j.$_temp.ruleset=!1,j}rule(d){const y=this._definition;l.assertOptions(d,Object.keys(y.modifiers)),r(this.$_temp.ruleset!==!1,"Cannot apply rules to empty ruleset or the last rule added does not support rule properties");const j=this.$_temp.ruleset===null?this._rules.length-1:this.$_temp.ruleset;r(j>=0&&j<this._rules.length,"Cannot apply rules to empty ruleset");const S=this.clone();for(let O=j;O<S._rules.length;++O){const P=S._rules[O],D=p(P);for(const I in d)y.modifiers[I](D,d[I]),r(D.name===P.name,"Cannot change rule name");S._rules[O]=D,S._singleRules.get(D.name)===P&&S._singleRules.set(D.name,D)}return S.$_temp.ruleset=!1,S.$_mutateRebuild()}get ruleset(){r(!this._inRuleset(),"Cannot start a new ruleset without closing the previous one");const d=this.clone();return d.$_temp.ruleset=d._rules.length,d}get $(){return this.ruleset}tailor(d){d=[].concat(d),r(!this._inRuleset(),"Cannot tailor inside a ruleset");let y=this;if(this.$_terms.alterations)for(const{target:j,adjuster:S}of this.$_terms.alterations)d.includes(j)&&(y=S(y),r(l.isSchema(y),"Alteration adjuster for",j,"failed to return a schema object"));return y=y.$_modify({each:j=>j.tailor(d),ref:!1}),y.$_temp.ruleset=!1,y.$_mutateRebuild()}tracer(){return g.location?g.location(this):this}validate(d,y){return v.entry(d,this,y)}validateAsync(d,y){return v.entryAsync(d,this,y)}$_addRule(d){typeof d=="string"&&(d={name:d}),r(d&&typeof d=="object","Invalid options"),r(d.name&&typeof d.name=="string","Invalid rule name");for(const P in d)r(P[0]!=="_","Cannot set private rule properties");const y=Object.assign({},d);y._resolve=[],y.method=y.method||y.name;const j=this._definition.rules[y.method],S=y.args;r(j,"Unknown rule",y.method);const O=this.clone();if(S){r(Object.keys(S).length===1||Object.keys(S).length===this._definition.rules[y.name].args.length,"Invalid rule definition for",this.type,y.name);for(const P in S){let D=S[P];if(j.argsByName){const I=j.argsByName.get(P);if(I.ref&&l.isResolvable(D))y._resolve.push(P),O.$_mutateRegister(D);else if(I.normalize&&(D=I.normalize(D),S[P]=D),I.assert){const B=l.validateArg(D,P,I);r(!B,B,"or reference")}}D!==void 0?S[P]=D:delete S[P]}}return j.multi||(O._ruleRemove(y.name,{clone:!1}),O._singleRules.set(y.name,y)),O.$_temp.ruleset===!1&&(O.$_temp.ruleset=null),j.priority?O._rules.unshift(y):O._rules.push(y),O}$_compile(d,y){return i.schema(this.$_root,d,y)}$_createError(d,y,j,S,O,P={}){const D=P.flags!==!1?this._flags:{},I=P.messages?a.merge(this._definition.messages,P.messages):this._definition.messages;return new n.Report(d,y,j,D,I,S,O)}$_getFlag(d){return this._flags[d]}$_getRule(d){return this._singleRules.get(d)}$_mapLabels(d){return d=Array.isArray(d)?d:d.split("."),this._ids.labels(d)}$_match(d,y,j,S){(j=Object.assign({},j)).abortEarly=!0,j._externals=!1,y.snapshot();const O=!v.validate(d,this,y,j,S).errors;return y.restore(),O}$_modify(d){return l.assertOptions(d,["each","once","ref","schema"]),o.schema(this,d)||this}$_mutateRebuild(){return r(!this._inRuleset(),"Cannot add this rule inside a ruleset"),this._refs.reset(),this._ids.reset(),this.$_modify({each:(d,{source:y,name:j,path:S,key:O})=>{const P=this._definition[y][j]&&this._definition[y][j].register;P!==!1&&this.$_mutateRegister(d,{family:P,key:O})}}),this._definition.rebuild&&this._definition.rebuild(this),this.$_temp.ruleset=!1,this}$_mutateRegister(d,{family:y,key:j}={}){this._refs.register(d,y),this._ids.register(d,{key:j})}$_property(d){return this._definition.properties[d]}$_reach(d){return this._ids.reach(d)}$_rootReferences(){return this._refs.roots()}$_setFlag(d,y,j={}){r(d[0]==="_"||!this._inRuleset(),"Cannot set flag inside a ruleset");const S=this._definition.flags[d]||{};if(f(y,S.default)&&(y=void 0),f(y,this._flags[d]))return this;const O=j.clone!==!1?this.clone():this;return y!==void 0?(O._flags[d]=y,O.$_mutateRegister(y)):delete O._flags[d],d[0]!=="_"&&(O.$_temp.ruleset=!1),O}$_parent(d,...y){return this[d][l.symbols.parent].call(this,...y)}$_validate(d,y,j){return v.validate(d,this,y,j)}_assign(d){d.type=this.type,d.$_root=this.$_root,d.$_temp=Object.assign({},this.$_temp),d.$_temp.whens={},d._ids=this._ids.clone(),d._preferences=this._preferences,d._valids=this._valids&&this._valids.clone(),d._invalids=this._invalids&&this._invalids.clone(),d._rules=this._rules.slice(),d._singleRules=p(this._singleRules,{shallow:!0}),d._refs=this._refs.clone(),d._flags=Object.assign({},this._flags),d._cache=null,d.$_terms={};for(const y in this.$_terms)d.$_terms[y]=this.$_terms[y]?this.$_terms[y].slice():null;d.$_super={};for(const y in this.$_super)d.$_super[y]=this._super[y].bind(d);return d}_bare(){const d=this.clone();d._reset();const y=d._definition.terms;for(const j in y){const S=y[j];d.$_terms[j]=S.init}return d.$_mutateRebuild()}_default(d,y,j={}){return l.assertOptions(j,"literal"),r(y!==void 0,"Missing",d,"value"),r(typeof y=="function"||!j.literal,"Only function value supports literal option"),typeof y=="function"&&j.literal&&(y={[l.symbols.literal]:!0,literal:y}),this.$_setFlag(d,y)}_generate(d,y,j){if(!this.$_terms.whens)return{schema:this};const S=[],O=[];for(let I=0;I<this.$_terms.whens.length;++I){const B=this.$_terms.whens[I];if(B.concat){S.push(B.concat),O.push(`${I}.concat`);continue}const N=B.ref?B.ref.resolve(d,y,j):d,M=B.is?[B]:B.switch,q=O.length;for(let H=0;H<M.length;++H){const{is:Z,then:oe,otherwise:me}=M[H],ve=`${I}${B.switch?"."+H:""}`;if(Z.$_match(N,y.nest(Z,`${ve}.is`),j)){if(oe){const De=y.localize([...y.path,`${ve}.then`],y.ancestors,y.schemas),{schema:Ue,id:Le}=oe._generate(d,De,j);S.push(Ue),O.push(`${ve}.then${Le?`(${Le})`:""}`);break}}else if(me){const De=y.localize([...y.path,`${ve}.otherwise`],y.ancestors,y.schemas),{schema:Ue,id:Le}=me._generate(d,De,j);S.push(Ue),O.push(`${ve}.otherwise${Le?`(${Le})`:""}`);break}}if(B.break&&O.length>q)break}const P=O.join(", ");if(y.mainstay.tracer.debug(y,"rule","when",P),!P)return{schema:this};if(!y.mainstay.tracer.active&&this.$_temp.whens[P])return{schema:this.$_temp.whens[P],id:P};let D=this;this._definition.generate&&(D=this._definition.generate(this,d,y,j));for(const I of S)D=D.concat(I);return this.$_root._tracer&&this.$_root._tracer._combine(D,[this,...S]),this.$_temp.whens[P]=D,{schema:D,id:P}}_inner(d,y,j={}){r(!this._inRuleset(),`Cannot set ${d} inside a ruleset`);const S=this.clone();return S.$_terms[d]&&!j.override||(S.$_terms[d]=[]),j.single?S.$_terms[d].push(y):S.$_terms[d].push(...y),S.$_temp.ruleset=!1,S}_inRuleset(){return this.$_temp.ruleset!==null&&this.$_temp.ruleset!==!1}_ruleRemove(d,y={}){if(!this._singleRules.has(d))return this;const j=y.clone!==!1?this.clone():this;j._singleRules.delete(d);const S=[];for(let O=0;O<j._rules.length;++O){const P=j._rules[O];P.name!==d||P.keep?S.push(P):j._inRuleset()&&O<j.$_temp.ruleset&&--j.$_temp.ruleset}return j._rules=S,j}_values(d,y){l.verifyFlat(d,y.slice(1,-1));const j=this.clone(),S=d[0]===l.symbols.override;if(S&&(d=d.slice(1)),!j[y]&&d.length?j[y]=new k:S&&(j[y]=d.length?new k:null,j.$_mutateRebuild()),!j[y])return j;S&&j[y].override();for(const O of d){r(O!==void 0,"Cannot call allow/valid/invalid with undefined"),r(O!==l.symbols.override,"Override must be the first value");const P=y==="_invalids"?"_valids":"_invalids";j[P]&&(j[P].remove(O),j[P].length||(r(y==="_valids"||!j._flags.only,"Setting invalid value",O,"leaves schema rejecting all values due to previous valid rule"),j[P]=null)),j[y].add(O,j._refs)}return j}}};w.Base.prototype[l.symbols.any]={version:l.version,compile:i.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,_.exports=new w.Base},8652:(_,b,m)=>{const r=m(375),p=m(8571),f=m(8160),u={max:1e3,supported:new Set(["undefined","boolean","number","string"])};b.provider={provision:t=>new u.Cache(t)},u.Cache=class{constructor(t={}){f.assertOptions(t,["max"]),r(t.max===void 0||t.max&&t.max>0&&isFinite(t.max),"Invalid max cache size"),this._max=t.max||u.max,this._map=new Map,this._list=new u.List}get length(){return this._map.size}set(t,l){if(t!==null&&!u.supported.has(typeof t))return;let i=this._map.get(t);if(i)return i.value=l,void this._list.first(i);i=this._list.unshift({key:t,value:l}),this._map.set(t,i),this._compact()}get(t){const l=this._map.get(t);if(l)return this._list.first(l),p(l.value)}_compact(){if(this._map.size>this._max){const t=this._list.pop();this._map.delete(t.key)}}},u.List=class{constructor(){this.tail=null,this.head=null}unshift(t){return t.next=null,t.prev=this.head,this.head&&(this.head.next=t),this.head=t,this.tail||(this.tail=t),t}first(t){t!==this.head&&(this._remove(t),this.unshift(t))}pop(){return this._remove(this.tail)}_remove(t){const{next:l,prev:i}=t;return l.prev=i,i&&(i.next=l),t===this.tail&&(this.tail=l),t.prev=null,t.next=null,t}}},8160:(_,b,m)=>{const r=m(375),p=m(7916),f=m(5934);let u,t;const l={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)?)?)?)?$/};b.version=f.version,b.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},b.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")},b.assertOptions=function(i,n,s="Options"){r(i&&typeof i=="object"&&!Array.isArray(i),"Options must be of type object");const c=Object.keys(i).filter(a=>!n.includes(a));r(c.length===0,`${s} contain unknown keys: ${c}`)},b.checkPreferences=function(i){t=t||m(3378);const n=t.preferences.validate(i);if(n.error)throw new p([n.error.details[0].message])},b.compare=function(i,n,s){switch(s){case"=":return i===n;case">":return i>n;case"<":return i<n;case">=":return i>=n;case"<=":return i<=n}},b.default=function(i,n){return i===void 0?n:i},b.isIsoDate=function(i){return l.isoDate.test(i)},b.isNumber=function(i){return typeof i=="number"&&!isNaN(i)},b.isResolvable=function(i){return!!i&&(i[b.symbols.ref]||i[b.symbols.template])},b.isSchema=function(i,n={}){const s=i&&i[b.symbols.any];return!!s&&(r(n.legacy||s.version===b.version,"Cannot mix different versions of joi schemas"),!0)},b.isValues=function(i){return i[b.symbols.values]},b.limit=function(i){return Number.isSafeInteger(i)&&i>=0},b.preferences=function(i,n){u=u||m(6914),i=i||{},n=n||{};const s=Object.assign({},i,n);return n.errors&&i.errors&&(s.errors=Object.assign({},i.errors,n.errors),s.errors.wrap=Object.assign({},i.errors.wrap,n.errors.wrap)),n.messages&&(s.messages=u.compile(n.messages,i.messages)),delete s[b.symbols.prefs],s},b.tryWithPath=function(i,n,s={}){try{return i()}catch(c){throw c.path!==void 0?c.path=n+"."+c.path:c.path=n,s.append&&(c.message=`${c.message} (${c.path})`),c}},b.validateArg=function(i,n,{assert:s,message:c}){if(b.isSchema(s)){const a=s.validate(i);return a.error?a.error.message:void 0}if(!s(i))return n?`${n} ${c}`:c},b.verifyFlat=function(i,n){for(const s of i)r(!Array.isArray(s),"Method no longer accepts array arguments:",n)}},3292:(_,b,m)=>{const r=m(375),p=m(8160),f=m(6133),u={};b.schema=function(t,l,i={}){p.assertOptions(i,["appendPath","override"]);try{return u.schema(t,l,i)}catch(n){throw i.appendPath&&n.path!==void 0&&(n.message=`${n.message} (${n.path})`),n}},u.schema=function(t,l,i){r(l!==void 0,"Invalid undefined schema"),Array.isArray(l)&&(r(l.length,"Invalid empty array schema"),l.length===1&&(l=l[0]));const n=(s,...c)=>i.override!==!1?s.valid(t.override,...c):s.valid(...c);if(u.simple(l))return n(t,l);if(typeof l=="function")return t.custom(l);if(r(typeof l=="object","Invalid schema content:",typeof l),p.isResolvable(l))return n(t,l);if(p.isSchema(l))return l;if(Array.isArray(l)){for(const s of l)if(!u.simple(s))return t.alternatives().try(...l);return n(t,...l)}return l instanceof RegExp?t.string().regex(l):l instanceof Date?n(t.date(),l):(r(Object.getPrototypeOf(l)===Object.getPrototypeOf({}),"Schema can only contain plain objects"),t.object().keys(l))},b.ref=function(t,l){return f.isRef(t)?t:f.create(t,l)},b.compile=function(t,l,i={}){p.assertOptions(i,["legacy"]);const n=l&&l[p.symbols.any];if(n)return r(i.legacy||n.version===p.version,"Cannot mix different versions of joi schemas:",n.version,p.version),l;if(typeof l!="object"||!i.legacy)return b.schema(t,l,{appendPath:!0});const s=u.walk(l);return s?s.compile(s.root,l):b.schema(t,l,{appendPath:!0})},u.walk=function(t){if(typeof t!="object")return null;if(Array.isArray(t)){for(const i of t){const n=u.walk(i);if(n)return n}return null}const l=t[p.symbols.any];if(l)return{root:t[l.root],compile:l.compile};r(Object.getPrototypeOf(t)===Object.getPrototypeOf({}),"Schema can only contain plain objects");for(const i in t){const n=u.walk(t[i]);if(n)return n}return null},u.simple=function(t){return t===null||["boolean","string","number"].includes(typeof t)},b.when=function(t,l,i){if(i===void 0&&(r(l&&typeof l=="object","Missing options"),i=l,l=f.create(".")),Array.isArray(i)&&(i={switch:i}),p.assertOptions(i,["is","not","then","otherwise","switch","break"]),p.isSchema(l))return r(i.is===void 0,'"is" can not be used with a schema condition'),r(i.not===void 0,'"not" can not be used with a schema condition'),r(i.switch===void 0,'"switch" can not be used with a schema condition'),u.condition(t,{is:l,then:i.then,otherwise:i.otherwise,break:i.break});if(r(f.isRef(l)||typeof l=="string","Invalid condition:",l),r(i.not===void 0||i.is===void 0,'Cannot combine "is" with "not"'),i.switch===void 0){let s=i;i.not!==void 0&&(s={is:i.not,then:i.otherwise,otherwise:i.then,break:i.break});let c=s.is!==void 0?t.$_compile(s.is):t.$_root.invalid(null,!1,0,"").required();return r(s.then!==void 0||s.otherwise!==void 0,'options must have at least one of "then", "otherwise", or "switch"'),r(s.break===void 0||s.then===void 0||s.otherwise===void 0,"Cannot specify then, otherwise, and break all together"),i.is===void 0||f.isRef(i.is)||p.isSchema(i.is)||(c=c.required()),u.condition(t,{ref:b.ref(l),is:c,then:s.then,otherwise:s.otherwise,break:s.break})}r(Array.isArray(i.switch),'"switch" must be an array'),r(i.is===void 0,'Cannot combine "switch" with "is"'),r(i.not===void 0,'Cannot combine "switch" with "not"'),r(i.then===void 0,'Cannot combine "switch" with "then"');const n={ref:b.ref(l),switch:[],break:i.break};for(let s=0;s<i.switch.length;++s){const c=i.switch[s],a=s===i.switch.length-1;p.assertOptions(c,a?["is","then","otherwise"]:["is","then"]),r(c.is!==void 0,'Switch statement missing "is"'),r(c.then!==void 0,'Switch statement missing "then"');const o={is:t.$_compile(c.is),then:t.$_compile(c.then)};if(f.isRef(c.is)||p.isSchema(c.is)||(o.is=o.is.required()),a){r(i.otherwise===void 0||c.otherwise===void 0,'Cannot specify "otherwise" inside and outside a "switch"');const h=i.otherwise!==void 0?i.otherwise:c.otherwise;h!==void 0&&(r(n.break===void 0,"Cannot specify both otherwise and break"),o.otherwise=t.$_compile(h))}n.switch.push(o)}return n},u.condition=function(t,l){for(const i of["then","otherwise"])l[i]===void 0?delete l[i]:l[i]=t.$_compile(l[i]);return l}},6354:(_,b,m)=>{const r=m(5688),p=m(8160),f=m(3328);b.Report=class{constructor(u,t,l,i,n,s,c){if(this.code=u,this.flags=i,this.messages=n,this.path=s.path,this.prefs=c,this.state=s,this.value=t,this.message=null,this.template=null,this.local=l||{},this.local.label=b.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 a=this.path[this.path.length-1];typeof a!="object"&&(this.local.key=a)}}_setTemplate(u){if(this.template=u,!this.flags.label&&this.path.length===0){const t=this._template(this.template,"root");t&&(this.local.label=t)}}toString(){if(this.message)return this.message;const u=this.code;if(!this.prefs.errors.render)return this.code;const t=this._template(this.template)||this._template(this.prefs.messages)||this._template(this.messages);return t===void 0?`Error code "${u}" is not defined, your custom type is missing the correct messages definition`:(this.message=t.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,t){return b.template(this.value,u,t||this.code,this.state,this.prefs)}},b.path=function(u){let t="";for(const l of u)typeof l!="object"&&(typeof l=="string"?(t&&(t+="."),t+=l):t+=`[${l}]`);return t},b.template=function(u,t,l,i,n){if(!t)return;if(f.isTemplate(t))return l!=="root"?t:null;let s=n.errors.language;if(p.isResolvable(s)&&(s=s.resolve(u,i,n)),s&&t[s]){if(t[s][l]!==void 0)return t[s][l];if(t[s]["*"]!==void 0)return t[s]["*"]}return t[l]?t[l]:t["*"]},b.label=function(u,t,l,i){if(!l.errors.label)return"";if(u.label)return u.label;let n=t.path;return l.errors.label==="key"&&t.path.length>1&&(n=t.path.slice(-1)),b.path(n)||b.template(null,l.messages,"root",t,l)||i&&b.template(null,i,"root",t,l)||"value"},b.process=function(u,t,l){if(!u)return null;const{override:i,message:n,details:s}=b.details(u);if(i)return i;if(l.errors.stack)return new b.ValidationError(n,s,t);const c=Error.stackTraceLimit;Error.stackTraceLimit=0;const a=new b.ValidationError(n,s,t);return Error.stackTraceLimit=c,a},b.details=function(u,t={}){let l=[];const i=[];for(const n of u){if(n instanceof Error){if(t.override!==!1)return{override:n};const c=n.toString();l.push(c),i.push({message:c,type:"override",context:{error:n}});continue}const s=n.toString();l.push(s),i.push({message:s,path:n.path.filter(c=>typeof c!="object"),type:n.code,context:n.local})}return l.length>1&&(l=[...new Set(l)]),{message:l.join(". "),details:i}},b.ValidationError=class extends Error{constructor(u,t,l){super(u),this._original=l,this.details=t}static isError(u){return u instanceof b.ValidationError}},b.ValidationError.prototype.isJoi=!0,b.ValidationError.prototype.name="ValidationError",b.ValidationError.prototype.annotate=r.error},8901:(_,b,m)=>{const r=m(375),p=m(8571),f=m(8160),u=m(6914),t={};b.type=function(l,i){const n=Object.getPrototypeOf(l),s=p(n),c=l._assign(Object.create(s)),a=Object.assign({},i);delete a.base,s._definition=a;const o=n._definition||{};a.messages=u.merge(o.messages,a.messages),a.properties=Object.assign({},o.properties,a.properties),c.type=a.type,a.flags=Object.assign({},o.flags,a.flags);const h=Object.assign({},o.terms);if(a.terms)for(const w in a.terms){const d=a.terms[w];r(c.$_terms[w]===void 0,"Invalid term override for",a.type,w),c.$_terms[w]=d.init,h[w]=d}a.terms=h,a.args||(a.args=o.args),a.prepare=t.prepare(a.prepare,o.prepare),a.coerce&&(typeof a.coerce=="function"&&(a.coerce={method:a.coerce}),a.coerce.from&&!Array.isArray(a.coerce.from)&&(a.coerce={method:a.coerce.method,from:[].concat(a.coerce.from)})),a.coerce=t.coerce(a.coerce,o.coerce),a.validate=t.validate(a.validate,o.validate);const g=Object.assign({},o.rules);if(a.rules)for(const w in a.rules){const d=a.rules[w];r(typeof d=="object","Invalid rule definition for",a.type,w);let y=d.method;if(y===void 0&&(y=function(){return this.$_addRule(w)}),y&&(r(!s[w],"Rule conflict in",a.type,w),s[w]=y),r(!g[w],"Rule conflict in",a.type,w),g[w]=d,d.alias){const j=[].concat(d.alias);for(const S of j)s[S]=d.method}d.args&&(d.argsByName=new Map,d.args=d.args.map(j=>(typeof j=="string"&&(j={name:j}),r(!d.argsByName.has(j.name),"Duplicated argument name",j.name),f.isSchema(j.assert)&&(j.assert=j.assert.strict().label(j.name)),d.argsByName.set(j.name,j),j)))}a.rules=g;const v=Object.assign({},o.modifiers);if(a.modifiers)for(const w in a.modifiers){r(!s[w],"Rule conflict in",a.type,w);const d=a.modifiers[w];r(typeof d=="function","Invalid modifier definition for",a.type,w);const y=function(j){return this.rule({[w]:j})};s[w]=y,v[w]=d}if(a.modifiers=v,a.overrides){s._super=n,c.$_super={};for(const w in a.overrides)r(n[w],"Cannot override missing",w),a.overrides[w][f.symbols.parent]=n[w],c.$_super[w]=n[w].bind(c);Object.assign(s,a.overrides)}a.cast=Object.assign({},o.cast,a.cast);const k=Object.assign({},o.manifest,a.manifest);return k.build=t.build(a.manifest&&a.manifest.build,o.manifest&&o.manifest.build),a.manifest=k,a.rebuild=t.rebuild(a.rebuild,o.rebuild),c},t.build=function(l,i){return l&&i?function(n,s){return i(l(n,s),s)}:l||i},t.coerce=function(l,i){return l&&i?{from:l.from&&i.from?[...new Set([...l.from,...i.from])]:null,method(n,s){let c;if((!i.from||i.from.includes(typeof n))&&(c=i.method(n,s),c)){if(c.errors||c.value===void 0)return c;n=c.value}if(!l.from||l.from.includes(typeof n)){const a=l.method(n,s);if(a)return a}return c}}:l||i},t.prepare=function(l,i){return l&&i?function(n,s){const c=l(n,s);if(c){if(c.errors||c.value===void 0)return c;n=c.value}return i(n,s)||c}:l||i},t.rebuild=function(l,i){return l&&i?function(n){i(n),l(n)}:l||i},t.validate=function(l,i){return l&&i?function(n,s){const c=i(n,s);if(c){if(c.errors&&(!Array.isArray(c.errors)||c.errors.length))return c;n=c.value}return l(n,s)||c}:l||i}},5107:(_,b,m)=>{const r=m(375),p=m(8571),f=m(8652),u=m(8160),t=m(3292),l=m(6354),i=m(8901),n=m(9708),s=m(6133),c=m(3328),a=m(1152);let o;const h={types:{alternatives:m(4946),any:m(8068),array:m(546),boolean:m(4937),date:m(7500),function:m(390),link:m(8785),number:m(3832),object:m(8966),string:m(7417),symbol:m(8826)},aliases:{alt:"alternatives",bool:"boolean",func:"function"},root:function(){const g={_types:new Set(Object.keys(h.types))};for(const v of g._types)g[v]=function(...k){return r(!k.length||["alternatives","link","object"].includes(v),"The",v,"type does not allow arguments"),h.generate(this,h.types[v],k)};for(const v of["allow","custom","disallow","equal","exist","forbidden","invalid","not","only","optional","options","prefs","preferences","required","strip","valid","when"])g[v]=function(...k){return this.any()[v](...k)};Object.assign(g,h.methods);for(const v in h.aliases){const k=h.aliases[v];g[v]=g[k]}return g.x=g.expression,a.setup&&a.setup(g),g}};h.methods={ValidationError:l.ValidationError,version:u.version,cache:f.provider,assert(g,v,...k){h.assert(g,v,!0,k)},attempt:(g,v,...k)=>h.assert(g,v,!1,k),build(g){return r(typeof n.build=="function","Manifest functionality disabled"),n.build(this,g)},checkPreferences(g){u.checkPreferences(g)},compile(g,v){return t.compile(this,g,v)},defaults(g){r(typeof g=="function","modifier must be a function");const v=Object.assign({},this);for(const k of v._types){const w=g(v[k]());r(u.isSchema(w),"modifier must return a valid schema object"),v[k]=function(...d){return h.generate(this,w,d)}}return v},expression:(...g)=>new c(...g),extend(...g){u.verifyFlat(g,"extend"),o=o||m(3378),r(g.length,"You need to provide at least one extension"),this.assert(g,o.extensions);const v=Object.assign({},this);v._types=new Set(v._types);for(let k of g){typeof k=="function"&&(k=k(v)),this.assert(k,o.extension);const w=h.expandExtension(k,v);for(const d of w){r(v[d.type]===void 0||v._types.has(d.type),"Cannot override name",d.type);const y=d.base||this.any(),j=i.type(y,d);v._types.add(d.type),v[d.type]=function(...S){return h.generate(this,j,S)}}}return v},isError:l.ValidationError.isError,isExpression:c.isTemplate,isRef:s.isRef,isSchema:u.isSchema,in:(...g)=>s.in(...g),override:u.symbols.override,ref:(...g)=>s.create(...g),types(){const g={};for(const v of this._types)g[v]=this[v]();for(const v in h.aliases)g[v]=this[v]();return g}},h.assert=function(g,v,k,w){const d=w[0]instanceof Error||typeof w[0]=="string"?w[0]:null,y=d!==null?w[1]:w[0],j=v.validate(g,u.preferences({errors:{stack:!0}},y||{}));let S=j.error;if(!S)return j.value;if(d instanceof Error)throw d;const O=k&&typeof S.annotate=="function"?S.annotate():S.message;throw S instanceof l.ValidationError==0&&(S=p(S)),S.message=d?`${d} ${O}`:O,S},h.generate=function(g,v,k){return r(g,"Must be invoked on a Joi instance."),v.$_root=g,v._definition.args&&k.length?v._definition.args(v,...k):v},h.expandExtension=function(g,v){if(typeof g.type=="string")return[g];const k=[];for(const w of v._types)if(g.type.test(w)){const d=Object.assign({},g);d.type=w,d.base=v[w](),k.push(d)}return k},_.exports=h.root()},6914:(_,b,m)=>{const r=m(375),p=m(8571),f=m(3328);b.compile=function(u,t){if(typeof u=="string")return r(!t,"Cannot set single message string"),new f(u);if(f.isTemplate(u))return r(!t,"Cannot set single message template"),u;r(typeof u=="object"&&!Array.isArray(u),"Invalid message options"),t=t?p(t):{};for(let l in u){const i=u[l];if(l==="root"||f.isTemplate(i)){t[l]=i;continue}if(typeof i=="string"){t[l]=new f(i);continue}r(typeof i=="object"&&!Array.isArray(i),"Invalid message for",l);const n=l;for(l in t[n]=t[n]||{},i){const s=i[l];l==="root"||f.isTemplate(s)?t[n][l]=s:(r(typeof s=="string","Invalid message for",l,"in",n),t[n][l]=new f(s))}}return t},b.decompile=function(u){const t={};for(let l in u){const i=u[l];if(l==="root"){t.root=i;continue}if(f.isTemplate(i)){t[l]=i.describe({compact:!0});continue}const n=l;for(l in t[n]={},i){const s=i[l];l!=="root"?t[n][l]=s.describe({compact:!0}):t[n].root=s}}return t},b.merge=function(u,t){if(!u)return b.compile(t);if(!t)return u;if(typeof t=="string")return new f(t);if(f.isTemplate(t))return t;const l=p(u);for(let i in t){const n=t[i];if(i==="root"||f.isTemplate(n)){l[i]=n;continue}if(typeof n=="string"){l[i]=new f(n);continue}r(typeof n=="object"&&!Array.isArray(n),"Invalid message for",i);const s=i;for(i in l[s]=l[s]||{},n){const c=n[i];i==="root"||f.isTemplate(c)?l[s][i]=c:(r(typeof c=="string","Invalid message for",i,"in",s),l[s][i]=new f(c))}}return l}},2294:(_,b,m)=>{const r=m(375),p=m(8160),f=m(6133),u={};b.Ids=u.Ids=class{constructor(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}clone(){const t=new u.Ids;return t._byId=new Map(this._byId),t._byKey=new Map(this._byKey),t._schemaChain=this._schemaChain,t}concat(t){t._schemaChain&&(this._schemaChain=!0);for(const[l,i]of t._byId.entries())r(!this._byKey.has(l),"Schema id conflicts with existing key:",l),this._byId.set(l,i);for(const[l,i]of t._byKey.entries())r(!this._byId.has(l),"Schema key conflicts with existing id:",l),this._byKey.set(l,i)}fork(t,l,i){const n=this._collect(t);n.push({schema:i});const s=n.shift();let c={id:s.id,schema:l(s.schema)};r(p.isSchema(c.schema),"adjuster function failed to return a joi schema type");for(const a of n)c={id:a.id,schema:u.fork(a.schema,c.id,c.schema)};return c.schema}labels(t,l=[]){const i=t[0],n=this._get(i);if(!n)return[...l,...t].join(".");const s=t.slice(1);return l=[...l,n.schema._flags.label||i],s.length?n.schema._ids.labels(s,l):l.join(".")}reach(t,l=[]){const i=t[0],n=this._get(i);r(n,"Schema does not contain path",[...l,...t].join("."));const s=t.slice(1);return s.length?n.schema._ids.reach(s,[...l,i]):n.schema}register(t,{key:l}={}){if(!t||!p.isSchema(t))return;(t.$_property("schemaChain")||t._ids._schemaChain)&&(this._schemaChain=!0);const i=t._flags.id;if(i){const n=this._byId.get(i);r(!n||n.schema===t,"Cannot add different schemas with the same id:",i),r(!this._byKey.has(i),"Schema id conflicts with existing key:",i),this._byId.set(i,{schema:t,id:i})}l&&(r(!this._byKey.has(l),"Schema already contains key:",l),r(!this._byId.has(l),"Schema key conflicts with existing id:",l),this._byKey.set(l,{schema:t,id:l}))}reset(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}_collect(t,l=[],i=[]){const n=t[0],s=this._get(n);r(s,"Schema does not contain path",[...l,...t].join(".")),i=[s,...i];const c=t.slice(1);return c.length?s.schema._ids._collect(c,[...l,n],i):i}_get(t){return this._byId.get(t)||this._byKey.get(t)}},u.fork=function(t,l,i){const n=b.schema(t,{each:(s,{key:c})=>{if(l===(s._flags.id||c))return i},ref:!1});return n?n.$_mutateRebuild():t},b.schema=function(t,l){let i;for(const n in t._flags){if(n[0]==="_")continue;const s=u.scan(t._flags[n],{source:"flags",name:n},l);s!==void 0&&(i=i||t.clone(),i._flags[n]=s)}for(let n=0;n<t._rules.length;++n){const s=t._rules[n],c=u.scan(s.args,{source:"rules",name:s.name},l);if(c!==void 0){i=i||t.clone();const a=Object.assign({},s);a.args=c,i._rules[n]=a,i._singleRules.get(s.name)===s&&i._singleRules.set(s.name,a)}}for(const n in t.$_terms){if(n[0]==="_")continue;const s=u.scan(t.$_terms[n],{source:"terms",name:n},l);s!==void 0&&(i=i||t.clone(),i.$_terms[n]=s)}return i},u.scan=function(t,l,i,n,s){const c=n||[];if(t===null||typeof t!="object")return;let a;if(Array.isArray(t)){for(let o=0;o<t.length;++o){const h=l.source==="terms"&&l.name==="keys"&&t[o].key,g=u.scan(t[o],l,i,[o,...c],h);g!==void 0&&(a=a||t.slice(),a[o]=g)}return a}if(i.schema!==!1&&p.isSchema(t)||i.ref!==!1&&f.isRef(t)){const o=i.each(t,{...l,path:c,key:s});return o===t?void 0:o}for(const o in t){if(o[0]==="_")continue;const h=u.scan(t[o],l,i,[o,...c],s);h!==void 0&&(a=a||Object.assign({},t),a[o]=h)}return a}},6133:(_,b,m)=>{const r=m(375),p=m(8571),f=m(9621),u=m(8160);let t;const l={symbol:Symbol("ref"),defaults:{adjust:null,in:!1,iterables:null,map:null,separator:".",type:"value"}};b.create=function(i,n={}){r(typeof i=="string","Invalid reference key:",i),u.assertOptions(n,["adjust","ancestor","in","iterables","map","prefix","render","separator"]),r(!n.prefix||typeof n.prefix=="object","options.prefix must be of type object");const s=Object.assign({},l.defaults,n);delete s.prefix;const c=s.separator,a=l.context(i,c,n.prefix);if(s.type=a.type,i=a.key,s.type==="value")if(a.root&&(r(!c||i[0]!==c,"Cannot specify relative path with root prefix"),s.ancestor="root",i||(i=null)),c&&c===i)i=null,s.ancestor=0;else if(s.ancestor!==void 0)r(!c||!i||i[0]!==c,"Cannot combine prefix with ancestor option");else{const[o,h]=l.ancestor(i,c);h&&(i=i.slice(h))===""&&(i=null),s.ancestor=o}return s.path=c?i===null?[]:i.split(c):[i],new l.Ref(s)},b.in=function(i,n={}){return b.create(i,{...n,in:!0})},b.isRef=function(i){return!!i&&!!i[u.symbols.ref]},l.Ref=class{constructor(i){r(typeof i=="object","Invalid reference construction"),u.assertOptions(i,["adjust","ancestor","in","iterables","map","path","render","separator","type","depth","key","root","display"]),r([!1,void 0].includes(i.separator)||typeof i.separator=="string"&&i.separator.length===1,"Invalid separator"),r(!i.adjust||typeof i.adjust=="function","options.adjust must be a function"),r(!i.map||Array.isArray(i.map),"options.map must be an array"),r(!i.map||!i.adjust,"Cannot set both map and adjust options"),Object.assign(this,l.defaults,i),r(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(i,n,s,c,a={}){return r(!this.in||a.in,"Invalid in() reference usage"),this.type==="global"?this._resolve(s.context,n,a):this.type==="local"?this._resolve(c,n,a):this.ancestor?this.ancestor==="root"?this._resolve(n.ancestors[n.ancestors.length-1],n,a):(r(this.ancestor<=n.ancestors.length,"Invalid reference exceeds the schema root:",this.display),this._resolve(n.ancestors[this.ancestor-1],n,a)):this._resolve(i,n,a)}_resolve(i,n,s){let c;if(this.type==="value"&&n.mainstay.shadow&&s.shadow!==!1&&(c=n.mainstay.shadow.get(this.absolute(n))),c===void 0&&(c=f(i,this.path,{iterables:this.iterables,functions:!0})),this.adjust&&(c=this.adjust(c)),this.map){const a=this.map.get(c);a!==void 0&&(c=a)}return n.mainstay&&n.mainstay.tracer.resolve(n,this,c),c}toString(){return this.display}absolute(i){return[...i.path.slice(0,-this.ancestor),...this.path]}clone(){return new l.Ref(this)}describe(){const i={path:this.path};this.type!=="value"&&(i.type=this.type),this.separator!=="."&&(i.separator=this.separator),this.type==="value"&&this.ancestor!==1&&(i.ancestor=this.ancestor),this.map&&(i.map=[...this.map]);for(const n of["adjust","iterables","render"])this[n]!==null&&this[n]!==void 0&&(i[n]=this[n]);return this.in!==!1&&(i.in=!0),{ref:i}}updateDisplay(){const i=this.key!==null?this.key:"";if(this.type!=="value")return void(this.display=`ref:${this.type}:${i}`);if(!this.separator)return void(this.display=`ref:${i}`);if(!this.ancestor)return void(this.display=`ref:${this.separator}${i}`);if(this.ancestor==="root")return void(this.display=`ref:root:${i}`);if(this.ancestor===1)return void(this.display=`ref:${i||".."}`);const n=new Array(this.ancestor+1).fill(this.separator).join("");this.display=`ref:${n}${i||""}`}},l.Ref.prototype[u.symbols.ref]=!0,b.build=function(i){return(i=Object.assign({},l.defaults,i)).type==="value"&&i.ancestor===void 0&&(i.ancestor=1),new l.Ref(i)},l.context=function(i,n,s={}){if(i=i.trim(),s){const c=s.global===void 0?"$":s.global;if(c!==n&&i.startsWith(c))return{key:i.slice(c.length),type:"global"};const a=s.local===void 0?"#":s.local;if(a!==n&&i.startsWith(a))return{key:i.slice(a.length),type:"local"};const o=s.root===void 0?"/":s.root;if(o!==n&&i.startsWith(o))return{key:i.slice(o.length),type:"value",root:!0}}return{key:i,type:"value"}},l.ancestor=function(i,n){if(!n)return[1,0];if(i[0]!==n)return[1,0];if(i[1]!==n)return[0,1];let s=2;for(;i[s]===n;)++s;return[s-1,s]},b.toSibling=0,b.toParent=1,b.Manager=class{constructor(){this.refs=[]}register(i,n){if(i)if(n=n===void 0?b.toParent:n,Array.isArray(i))for(const s of i)this.register(s,n);else if(u.isSchema(i))for(const s of i._refs.refs)s.ancestor-n>=0&&this.refs.push({ancestor:s.ancestor-n,root:s.root});else b.isRef(i)&&i.type==="value"&&i.ancestor-n>=0&&this.refs.push({ancestor:i.ancestor-n,root:i.root}),t=t||m(3328),t.isTemplate(i)&&this.register(i.refs(),n)}get length(){return this.refs.length}clone(){const i=new b.Manager;return i.refs=p(this.refs),i}reset(){this.refs=[]}roots(){return this.refs.filter(i=>!i.ancestor).map(i=>i.root)}}},3378:(_,b,m)=>{const r=m(5107),p={};p.wrap=r.string().min(1).max(2).allow(!1),b.preferences=r.object({allowUnknown:r.boolean(),abortEarly:r.boolean(),artifacts:r.boolean(),cache:r.boolean(),context:r.object(),convert:r.boolean(),dateFormat:r.valid("date","iso","string","time","utc"),debug:r.boolean(),errors:{escapeHtml:r.boolean(),label:r.valid("path","key",!1),language:[r.string(),r.object().ref()],render:r.boolean(),stack:r.boolean(),wrap:{label:p.wrap,array:p.wrap,string:p.wrap}},externals:r.boolean(),messages:r.object(),noDefaults:r.boolean(),nonEnumerables:r.boolean(),presence:r.valid("required","optional","forbidden"),skipFunctions:r.boolean(),stripUnknown:r.object({arrays:r.boolean(),objects:r.boolean()}).or("arrays","objects").allow(!0,!1),warnings:r.boolean()}).strict(),p.nameRx=/^[a-zA-Z0-9]\w*$/,p.rule=r.object({alias:r.array().items(r.string().pattern(p.nameRx)).single(),args:r.array().items(r.string(),r.object({name:r.string().pattern(p.nameRx).required(),ref:r.boolean(),assert:r.alternatives([r.function(),r.object().schema()]).conditional("ref",{is:!0,then:r.required()}),normalize:r.function(),message:r.string().when("assert",{is:r.function(),then:r.required()})})),convert:r.boolean(),manifest:r.boolean(),method:r.function().allow(!1),multi:r.boolean(),validate:r.function()}),b.extension=r.object({type:r.alternatives([r.string(),r.object().regex()]).required(),args:r.function(),cast:r.object().pattern(p.nameRx,r.object({from:r.function().maxArity(1).required(),to:r.function().minArity(1).maxArity(2).required()})),base:r.object().schema().when("type",{is:r.object().regex(),then:r.forbidden()}),coerce:[r.function().maxArity(3),r.object({method:r.function().maxArity(3).required(),from:r.array().items(r.string()).single()})],flags:r.object().pattern(p.nameRx,r.object({setter:r.string(),default:r.any()})),manifest:{build:r.function().arity(2)},messages:[r.object(),r.string()],modifiers:r.object().pattern(p.nameRx,r.function().minArity(1).maxArity(2)),overrides:r.object().pattern(p.nameRx,r.function()),prepare:r.function().maxArity(3),rebuild:r.function().arity(1),rules:r.object().pattern(p.nameRx,p.rule),terms:r.object().pattern(p.nameRx,r.object({init:r.array().allow(null).required(),manifest:r.object().pattern(/.+/,[r.valid("schema","single"),r.object({mapped:r.object({from:r.string().required(),to:r.string().required()}).required()})])})),validate:r.function().maxArity(3)}).strict(),b.extensions=r.array().items(r.object(),r.function().arity(1)).strict(),p.desc={buffer:r.object({buffer:r.string()}),func:r.object({function:r.function().required(),options:{literal:!0}}),override:r.object({override:!0}),ref:r.object({ref:r.object({type:r.valid("value","global","local"),path:r.array().required(),separator:r.string().length(1).allow(!1),ancestor:r.number().min(0).integer().allow("root"),map:r.array().items(r.array().length(2)).min(1),adjust:r.function(),iterables:r.boolean(),in:r.boolean(),render:r.boolean()}).required()}),regex:r.object({regex:r.string().min(3)}),special:r.object({special:r.valid("deep").required()}),template:r.object({template:r.string().required(),options:r.object()}),value:r.object({value:r.alternatives([r.object(),r.array()]).required()})},p.desc.entity=r.alternatives([r.array().items(r.link("...")),r.boolean(),r.function(),r.number(),r.string(),p.desc.buffer,p.desc.func,p.desc.ref,p.desc.regex,p.desc.special,p.desc.template,p.desc.value,r.link("/")]),p.desc.values=r.array().items(null,r.boolean(),r.function(),r.number().allow(1/0,-1/0),r.string().allow(""),r.symbol(),p.desc.buffer,p.desc.func,p.desc.override,p.desc.ref,p.desc.regex,p.desc.template,p.desc.value),p.desc.messages=r.object().pattern(/.+/,[r.string(),p.desc.template,r.object().pattern(/.+/,[r.string(),p.desc.template])]),b.description=r.object({type:r.string().required(),flags:r.object({cast:r.string(),default:r.any(),description:r.string(),empty:r.link("/"),failover:p.desc.entity,id:r.string(),label:r.string(),only:!0,presence:["optional","required","forbidden"],result:["raw","strip"],strip:r.boolean(),unit:r.string()}).unknown(),preferences:{allowUnknown:r.boolean(),abortEarly:r.boolean(),artifacts:r.boolean(),cache:r.boolean(),convert:r.boolean(),dateFormat:["date","iso","string","time","utc"],errors:{escapeHtml:r.boolean(),label:["path","key"],language:[r.string(),p.desc.ref],wrap:{label:p.wrap,array:p.wrap}},externals:r.boolean(),messages:p.desc.messages,noDefaults:r.boolean(),nonEnumerables:r.boolean(),presence:["required","optional","forbidden"],skipFunctions:r.boolean(),stripUnknown:r.object({arrays:r.boolean(),objects:r.boolean()}).or("arrays","objects").allow(!0,!1),warnings:r.boolean()},allow:p.desc.values,invalid:p.desc.values,rules:r.array().min(1).items({name:r.string().required(),args:r.object().min(1),keep:r.boolean(),message:[r.string(),p.desc.messages],warn:r.boolean()}),keys:r.object().pattern(/.*/,r.link("/")),link:p.desc.ref}).pattern(/^[a-z]\w*$/,r.any())},493:(_,b,m)=>{const r=m(8571),p=m(9621),f=m(8160),u={value:Symbol("value")};_.exports=u.State=class{constructor(t,l,i){this.path=t,this.ancestors=l,this.mainstay=i.mainstay,this.schemas=i.schemas,this.debug=null}localize(t,l=null,i=null){const n=new u.State(t,l,this);return i&&n.schemas&&(n.schemas=[u.schemas(i),...n.schemas]),n}nest(t,l){const i=new u.State(this.path,this.ancestors,this);return i.schemas=i.schemas&&[u.schemas(t),...i.schemas],i.debug=l,i}shadow(t,l){this.mainstay.shadow=this.mainstay.shadow||new u.Shadow,this.mainstay.shadow.set(this.path,t,l)}snapshot(){this.mainstay.shadow&&(this._snapshot=r(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(t){return f.isSchema(t)?{schema:t}:t},u.Shadow=class{constructor(){this._values=null}set(t,l,i){if(!t.length||i==="strip"&&typeof t[t.length-1]=="number")return;this._values=this._values||new Map;let n=this._values;for(let s=0;s<t.length;++s){const c=t[s];let a=n.get(c);a||(a=new Map,n.set(c,a)),n=a}n[u.value]=l}get(t){const l=this.node(t);if(l)return l[u.value]}node(t){if(this._values)return p(this._values,t,{iterables:!0})}override(t,l){if(!this._values)return;const i=t.slice(0,-1),n=t[t.length-1],s=p(this._values,i,{iterables:!0});l?s.set(n,l):s&&s.delete(n)}}},3328:(_,b,m)=>{const r=m(375),p=m(8571),f=m(5277),u=m(1447),t=m(8160),l=m(6354),i=m(6133),n={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}};_.exports=n.Template=class{constructor(s,c){if(r(typeof s=="string","Template source must be a string"),r(!s.includes("\0")&&!s.includes(""),"Template source cannot contain reserved control characters"),this.source=s,this.rendered=s,this._template=null,c){const{functions:a,...o}=c;this._settings=Object.keys(o).length?p(o):void 0,this._functions=a,this._functions&&(r(Object.keys(this._functions).every(h=>typeof h=="string"),"Functions keys must be strings"),r(Object.values(this._functions).every(h=>typeof h=="function"),"Functions values must be functions"))}else this._settings=void 0,this._functions=void 0;this._parse()}_parse(){if(!this.source.includes("{"))return;const s=n.encode(this.source),c=n.split(s);let a=!1;const o=[],h=c.shift();h&&o.push(h);for(const g of c){const v=g[0]!=="{",k=v?"}":"}}",w=g.indexOf(k);if(w===-1||g[1]==="{"){o.push(`{${n.decode(g)}`);continue}let d=g.slice(v?0:1,w);const y=d[0]===":";y&&(d=d.slice(1));const j=this._ref(n.decode(d),{raw:v,wrapped:y});o.push(j),typeof j!="string"&&(a=!0);const S=g.slice(w+k.length);S&&o.push(n.decode(S))}a?this._template=o:this.rendered=o.join("")}static date(s,c){return n.dateFormat[c.dateFormat].call(s)}describe(s={}){if(!this._settings&&s.compact)return this.source;const c={template:this.source};return this._settings&&(c.options=this._settings),this._functions&&(c.functions=this._functions),c}static build(s){return new n.Template(s.template,s.options||s.functions?{...s.options,functions:s.functions}:void 0)}isDynamic(){return!!this._template}static isTemplate(s){return!!s&&!!s[t.symbols.template]}refs(){if(!this._template)return;const s=[];for(const c of this._template)typeof c!="string"&&s.push(...c.refs);return s}resolve(s,c,a,o){return this._template&&this._template.length===1?this._part(this._template[0],s,c,a,o,{}):this.render(s,c,a,o)}_part(s,...c){return s.ref?s.ref.resolve(...c):s.formula.evaluate(c)}render(s,c,a,o,h={}){if(!this.isDynamic())return this.rendered;const g=[];for(const v of this._template)if(typeof v=="string")g.push(v);else{const k=this._part(v,s,c,a,o,h),w=n.stringify(k,s,c,a,o,h);if(w!==void 0){const d=v.raw||(h.errors&&h.errors.escapeHtml)===!1?w:f(w);g.push(n.wrap(d,v.wrapped&&a.errors.wrap.label))}}return g.join("")}_ref(s,{raw:c,wrapped:a}){const o=[],h=v=>{const k=i.create(v,this._settings);return o.push(k),w=>{const d=k.resolve(...w);return d!==void 0?d:null}};try{const v=this._functions?{...n.functions,...this._functions}:n.functions;var g=new u.Parser(s,{reference:h,functions:v,constants:n.constants})}catch(v){throw v.message=`Invalid template variable "${s}" fails due to: ${v.message}`,v}if(g.single){if(g.single.type==="reference"){const v=o[0];return{ref:v,raw:c,refs:o,wrapped:a||v.type==="local"&&v.key==="label"}}return n.stringify(g.single.value)}return{formula:g,raw:c,refs:o}}toString(){return this.source}},n.Template.prototype[t.symbols.template]=!0,n.Template.prototype.isImmutable=!0,n.encode=function(s){return s.replace(/\\(\{+)/g,(c,a)=>n.opens.slice(0,a.length)).replace(/\\(\}+)/g,(c,a)=>n.closes.slice(0,a.length))},n.decode=function(s){return s.replace(/\u0000/g,"{").replace(/\u0001/g,"}")},n.split=function(s){const c=[];let a="";for(let o=0;o<s.length;++o){const h=s[o];if(h==="{"){let g="";for(;o+1<s.length&&s[o+1]==="{";)g+="{",++o;c.push(a),a=g}else a+=h}return c.push(a),c},n.wrap=function(s,c){return c?c.length===1?`${c}${s}${c}`:`${c[0]}${s}${c[1]}`:s},n.stringify=function(s,c,a,o,h,g={}){const v=typeof s,k=o&&o.errors&&o.errors.wrap||{};let w=!1;if(i.isRef(s)&&s.render&&(w=s.in,s=s.resolve(c,a,o,h,{in:s.in,...g})),s===null)return"null";if(v==="string")return n.wrap(s,g.arrayItems&&k.string);if(v==="number"||v==="function"||v==="symbol")return s.toString();if(v!=="object")return JSON.stringify(s);if(s instanceof Date)return n.Template.date(s,o);if(s instanceof Map){const y=[];for(const[j,S]of s.entries())y.push(`${j.toString()} -> ${S.toString()}`);s=y}if(!Array.isArray(s))return s.toString();const d=[];for(const y of s)d.push(n.stringify(y,c,a,o,h,{arrayItems:!0,...g}));return n.wrap(d.join(", "),!w&&k.array)},n.constants={true:!0,false:!1,null:null,second:1e3,minute:6e4,hour:36e5,day:864e5},n.functions={if:(s,c,a)=>s?c:a,length:s=>typeof s=="string"?s.length:s&&typeof s=="object"?Array.isArray(s)?s.length:Object.keys(s).length:null,msg(s){const[c,a,o,h,g]=this,v=g.messages;if(!v)return"";const k=l.template(c,v[0],s,a,o)||l.template(c,v[1],s,a,o);return k?k.render(c,a,o,h,g):""},number:s=>typeof s=="number"?s:typeof s=="string"?parseFloat(s):typeof s=="boolean"?s?1:0:s instanceof Date?s.getTime():null}},4946:(_,b,m)=>{const r=m(375),p=m(1687),f=m(8068),u=m(8160),t=m(3292),l=m(6354),i=m(6133),n={};_.exports=f.extend({type:"alternatives",flags:{match:{default:"any"}},terms:{matches:{init:[],register:i.toSibling}},args:(s,...c)=>c.length===1&&Array.isArray(c[0])?s.try(...c[0]):s.try(...c),validate(s,c){const{schema:a,error:o,state:h,prefs:g}=c;if(a._flags.match){const k=[],w=[];for(let y=0;y<a.$_terms.matches.length;++y){const j=a.$_terms.matches[y],S=h.nest(j.schema,`match.${y}`);S.snapshot();const O=j.schema.$_validate(s,S,g);O.errors?(w.push(O.errors),S.restore()):(k.push(O.value),S.commit())}if(k.length===0)return{errors:o("alternatives.any",{details:w.map(y=>l.details(y,{override:!1}))})};if(a._flags.match==="one")return k.length===1?{value:k[0]}:{errors:o("alternatives.one")};if(k.length!==a.$_terms.matches.length)return{errors:o("alternatives.all",{details:w.map(y=>l.details(y,{override:!1}))})};const d=y=>y.$_terms.matches.some(j=>j.schema.type==="object"||j.schema.type==="alternatives"&&d(j.schema));return d(a)?{value:k.reduce((y,j)=>p(y,j,{mergeArrays:!1}))}:{value:k[k.length-1]}}const v=[];for(let k=0;k<a.$_terms.matches.length;++k){const w=a.$_terms.matches[k];if(w.schema){const j=h.nest(w.schema,`match.${k}`);j.snapshot();const S=w.schema.$_validate(s,j,g);if(!S.errors)return j.commit(),S;j.restore(),v.push({schema:w.schema,reports:S.errors});continue}const d=w.ref?w.ref.resolve(s,h,g):s,y=w.is?[w]:w.switch;for(let j=0;j<y.length;++j){const S=y[j],{is:O,then:P,otherwise:D}=S,I=`match.${k}${w.switch?"."+j:""}`;if(O.$_match(d,h.nest(O,`${I}.is`),g)){if(P)return P.$_validate(s,h.nest(P,`${I}.then`),g)}else if(D)return D.$_validate(s,h.nest(D,`${I}.otherwise`),g)}}return n.errors(v,c)},rules:{conditional:{method(s,c){r(!this._flags._endedSwitch,"Unreachable condition"),r(!this._flags.match,"Cannot combine match mode",this._flags.match,"with conditional rule"),r(c.break===void 0,"Cannot use break option with alternatives conditional");const a=this.clone(),o=t.when(a,s,c),h=o.is?[o]:o.switch;for(const g of h)if(g.then&&g.otherwise){a.$_setFlag("_endedSwitch",!0,{clone:!1});break}return a.$_terms.matches.push(o),a.$_mutateRebuild()}},match:{method(s){if(r(["any","one","all"].includes(s),"Invalid alternatives match mode",s),s!=="any")for(const c of this.$_terms.matches)r(c.schema,"Cannot combine match mode",s,"with conditional rules");return this.$_setFlag("match",s)}},try:{method(...s){r(s.length,"Missing alternative schemas"),u.verifyFlat(s,"try"),r(!this._flags._endedSwitch,"Unreachable condition");const c=this.clone();for(const a of s)c.$_terms.matches.push({schema:c.$_compile(a)});return c.$_mutateRebuild()}}},overrides:{label(s){return this.$_parent("label",s).$_modify({each:(c,a)=>a.path[0]!=="is"&&typeof c._flags.label!="string"?c.label(s):void 0,ref:!1})}},rebuild(s){s.$_modify({each:c=>{u.isSchema(c)&&c.type==="array"&&s.$_setFlag("_arrayItems",!0,{clone:!1})}})},manifest:{build(s,c){if(c.matches)for(const a of c.matches){const{schema:o,ref:h,is:g,not:v,then:k,otherwise:w}=a;s=o?s.try(o):h?s.conditional(h,{is:g,then:k,not:v,otherwise:w,switch:a.switch}):s.conditional(g,{then:k,otherwise:w})}return s}},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}}"}}),n.errors=function(s,{error:c,state:a}){if(!s.length)return{errors:c("alternatives.any")};if(s.length===1)return{errors:s[0].reports};const o=new Set,h=[];for(const{reports:g,schema:v}of s){if(g.length>1)return n.unmatched(s,c);const k=g[0];if(k instanceof l.Report==0)return n.unmatched(s,c);if(k.state.path.length!==a.path.length){h.push({type:v.type,report:k});continue}if(k.code==="any.only"){for(const y of k.local.valids)o.add(y);continue}const[w,d]=k.code.split(".");d!=="base"?h.push({type:v.type,report:k}):k.code==="object.base"?o.add(k.local.type):o.add(w)}return h.length?h.length===1?{errors:h[0].report}:n.unmatched(s,c):{errors:c("alternatives.types",{types:[...o]})}},n.unmatched=function(s,c){const a=[];for(const o of s)a.push(...o.reports);return{errors:c("alternatives.match",l.details(a,{override:!1}))}}},8068:(_,b,m)=>{const r=m(375),p=m(7629),f=m(8160),u=m(6914);_.exports=p.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(t,l){return r(typeof t=="function","Method must be a function"),r(l===void 0||l&&typeof l=="string","Description must be a non-empty string"),this.$_addRule({name:"custom",args:{method:t,description:l}})},validate(t,l,{method:i}){try{return i(t,l)}catch(n){return l.error("any.custom",{error:n})}},args:["method","description"],multi:!0},messages:{method(t){return this.prefs({messages:t})}},shared:{method(t){r(f.isSchema(t)&&t._flags.id,"Schema must be a schema with an id");const l=this.clone();return l.$_terms.shared=l.$_terms.shared||[],l.$_terms.shared.push(t),l.$_mutateRegister(t),l}},warning:{method(t,l){return r(t&&typeof t=="string","Invalid warning code"),this.$_addRule({name:"warning",args:{code:t,local:l},warn:!0})},validate:(t,l,{code:i,local:n})=>l.error(i,n),args:["code","local"],multi:!0}},modifiers:{keep(t,l=!0){t.keep=l},message(t,l){t.message=u.compile(l)},warn(t,l=!0){t.warn=l}},manifest:{build(t,l){for(const i in l){const n=l[i];if(["examples","externals","metas","notes","tags"].includes(i))for(const s of n)t=t[i.slice(0,-1)](s);else if(i!=="alterations")if(i!=="whens"){if(i==="shared")for(const s of n)t=t.shared(s)}else for(const s of n){const{ref:c,is:a,not:o,then:h,otherwise:g,concat:v}=s;t=v?t.concat(v):c?t.when(c,{is:a,not:o,then:h,otherwise:g,switch:s.switch,break:s.break}):t.when(a,{then:h,otherwise:g,break:s.break})}else{const s={};for(const{target:c,adjuster:a}of n)s[c]=a;t=t.alter(s)}}return t}},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:(_,b,m)=>{const r=m(375),p=m(9474),f=m(9621),u=m(8068),t=m(8160),l=m(3292),i={};_.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(n,{schema:s,state:c,prefs:a}){if(!Array.isArray(n))return;const o=s.$_getRule("sort");return o?i.sort(s,n,o.args.options,c,a):void 0}},validate(n,{schema:s,error:c}){if(!Array.isArray(n)){if(s._flags.single){const a=[n];return a[t.symbols.arraySingle]=!0,{value:a}}return{errors:c("array.base")}}if(s.$_getRule("items")||s.$_terms.externals)return{value:n.slice()}},rules:{has:{method(n){n=this.$_compile(n,{appendPath:!0});const s=this.$_addRule({name:"has",args:{schema:n}});return s.$_mutateRegister(n),s},validate(n,{state:s,prefs:c,error:a},{schema:o}){const h=[n,...s.ancestors];for(let v=0;v<n.length;++v){const k=s.localize([...s.path,v],h,o);if(o.$_match(n[v],k,c))return n}const g=o._flags.label;return g?a("array.hasKnown",{patternLabel:g}):a("array.hasUnknown",null)},multi:!0},items:{method(...n){t.verifyFlat(n,"items");const s=this.$_addRule("items");for(let c=0;c<n.length;++c){const a=t.tryWithPath(()=>this.$_compile(n[c]),c,{append:!0});s.$_terms.items.push(a)}return s.$_mutateRebuild()},validate(n,{schema:s,error:c,state:a,prefs:o,errorsArray:h}){const g=s.$_terms._requireds.slice(),v=s.$_terms.ordered.slice(),k=[...s.$_terms._inclusions,...g],w=!n[t.symbols.arraySingle];delete n[t.symbols.arraySingle];const d=h();let y=n.length;for(let j=0;j<y;++j){const S=n[j];let O=!1,P=!1;const D=w?j:new Number(j),I=[...a.path,D];if(!s._flags.sparse&&S===void 0){if(d.push(c("array.sparse",{key:D,path:I,pos:j,value:void 0},a.localize(I))),o.abortEarly)return d;v.shift();continue}const B=[n,...a.ancestors];for(const H of s.$_terms._exclusions)if(H.$_match(S,a.localize(I,B,H),o,{presence:"ignore"})){if(d.push(c("array.excludes",{pos:j,value:S},a.localize(I))),o.abortEarly)return d;O=!0,v.shift();break}if(O)continue;if(s.$_terms.ordered.length){if(v.length){const H=v.shift(),Z=H.$_validate(S,a.localize(I,B,H),o);if(Z.errors){if(d.push(...Z.errors),o.abortEarly)return d}else if(H._flags.result==="strip")i.fastSplice(n,j),--j,--y;else{if(!s._flags.sparse&&Z.value===void 0){if(d.push(c("array.sparse",{key:D,path:I,pos:j,value:void 0},a.localize(I))),o.abortEarly)return d;continue}n[j]=Z.value}continue}if(!s.$_terms.items.length){if(d.push(c("array.orderedLength",{pos:j,limit:s.$_terms.ordered.length})),o.abortEarly)return d;break}}const N=[];let M=g.length;for(let H=0;H<M;++H){const Z=a.localize(I,B,g[H]);Z.snapshot();const oe=g[H].$_validate(S,Z,o);if(N[H]=oe,!oe.errors){if(Z.commit(),n[j]=oe.value,P=!0,i.fastSplice(g,H),--H,--M,!s._flags.sparse&&oe.value===void 0&&(d.push(c("array.sparse",{key:D,path:I,pos:j,value:void 0},a.localize(I))),o.abortEarly))return d;break}Z.restore()}if(P)continue;const q=o.stripUnknown&&!!o.stripUnknown.arrays||!1;M=k.length;for(const H of k){let Z;const oe=g.indexOf(H);if(oe!==-1)Z=N[oe];else{const me=a.localize(I,B,H);if(me.snapshot(),Z=H.$_validate(S,me,o),!Z.errors){me.commit(),H._flags.result==="strip"?(i.fastSplice(n,j),--j,--y):s._flags.sparse||Z.value!==void 0?n[j]=Z.value:(d.push(c("array.sparse",{key:D,path:I,pos:j,value:void 0},a.localize(I))),O=!0),P=!0;break}me.restore()}if(M===1){if(q){i.fastSplice(n,j),--j,--y,P=!0;break}if(d.push(...Z.errors),o.abortEarly)return d;O=!0;break}}if(!O&&(s.$_terms._inclusions.length||s.$_terms._requireds.length)&&!P){if(q){i.fastSplice(n,j),--j,--y;continue}if(d.push(c("array.includes",{pos:j,value:S},a.localize(I))),o.abortEarly)return d}}return g.length&&i.fillMissedErrors(s,d,g,n,a,o),v.length&&(i.fillOrderedErrors(s,d,v,n,a,o),d.length||i.fillDefault(v,n,a,o)),d.length?d:n},priority:!0,manifest:!1},length:{method(n){return this.$_addRule({name:"length",args:{limit:n},operator:"="})},validate:(n,s,{limit:c},{name:a,operator:o,args:h})=>t.compare(n.length,c,o)?n:s.error("array."+a,{limit:h.limit,value:n}),args:[{name:"limit",ref:!0,assert:t.limit,message:"must be a positive integer"}]},max:{method(n){return this.$_addRule({name:"max",method:"length",args:{limit:n},operator:"<="})}},min:{method(n){return this.$_addRule({name:"min",method:"length",args:{limit:n},operator:">="})}},ordered:{method(...n){t.verifyFlat(n,"ordered");const s=this.$_addRule("items");for(let c=0;c<n.length;++c){const a=t.tryWithPath(()=>this.$_compile(n[c]),c,{append:!0});i.validateSingle(a,s),s.$_mutateRegister(a),s.$_terms.ordered.push(a)}return s.$_mutateRebuild()}},single:{method(n){const s=n===void 0||!!n;return r(!s||!this._flags._arrayItems,"Cannot specify single rule when array has array items"),this.$_setFlag("single",s)}},sort:{method(n={}){t.assertOptions(n,["by","order"]);const s={order:n.order||"ascending"};return n.by&&(s.by=l.ref(n.by,{ancestor:0}),r(!s.by.ancestor,"Cannot sort by ancestor")),this.$_addRule({name:"sort",args:{options:s}})},validate(n,{error:s,state:c,prefs:a,schema:o},{options:h}){const{value:g,errors:v}=i.sort(o,n,h,c,a);if(v)return v;for(let k=0;k<n.length;++k)if(n[k]!==g[k])return s("array.sort",{order:h.order,by:h.by?h.by.key:"value"});return n},convert:!0},sparse:{method(n){const s=n===void 0||!!n;return this._flags.sparse===s?this:(s?this.clone():this.$_addRule("items")).$_setFlag("sparse",s,{clone:!1})}},unique:{method(n,s={}){r(!n||typeof n=="function"||typeof n=="string","comparator must be a function or a string"),t.assertOptions(s,["ignoreUndefined","separator"]);const c={name:"unique",args:{options:s,comparator:n}};if(n)if(typeof n=="string"){const a=t.default(s.separator,".");c.path=a?n.split(a):[n]}else c.comparator=n;return this.$_addRule(c)},validate(n,{state:s,error:c,schema:a},{comparator:o,options:h},{comparator:g,path:v}){const k={string:Object.create(null),number:Object.create(null),undefined:Object.create(null),boolean:Object.create(null),bigint:Object.create(null),object:new Map,function:new Map,custom:new Map},w=g||p,d=h.ignoreUndefined;for(let y=0;y<n.length;++y){const j=v?f(n[y],v):n[y],S=g?k.custom:k[typeof j];if(r(S,"Failed to find unique map container for type",typeof j),S instanceof Map){const O=S.entries();let P;for(;!(P=O.next()).done;)if(w(P.value[0],j)){const D=s.localize([...s.path,y],[n,...s.ancestors]),I={pos:y,value:n[y],dupePos:P.value[1],dupeValue:n[P.value[1]]};return v&&(I.path=o),c("array.unique",I,D)}S.set(j,y)}else{if((!d||j!==void 0)&&S[j]!==void 0){const O={pos:y,value:n[y],dupePos:S[j],dupeValue:n[S[j]]};return v&&(O.path=o),c("array.unique",O,s.localize([...s.path,y],[n,...s.ancestors]))}S[j]=y}}return n},args:["comparator","options"],multi:!0}},cast:{set:{from:Array.isArray,to:(n,s)=>new Set(n)}},rebuild(n){n.$_terms._inclusions=[],n.$_terms._exclusions=[],n.$_terms._requireds=[];for(const s of n.$_terms.items)i.validateSingle(s,n),s._flags.presence==="required"?n.$_terms._requireds.push(s):s._flags.presence==="forbidden"?n.$_terms._exclusions.push(s):n.$_terms._inclusions.push(s);for(const s of n.$_terms.ordered)i.validateSingle(s,n)},manifest:{build:(n,s)=>(s.items&&(n=n.items(...s.items)),s.ordered&&(n=n.ordered(...s.ordered)),n)},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"}}),i.fillMissedErrors=function(n,s,c,a,o,h){const g=[];let v=0;for(const k of c){const w=k._flags.label;w?g.push(w):++v}g.length?v?s.push(n.$_createError("array.includesRequiredBoth",a,{knownMisses:g,unknownMisses:v},o,h)):s.push(n.$_createError("array.includesRequiredKnowns",a,{knownMisses:g},o,h)):s.push(n.$_createError("array.includesRequiredUnknowns",a,{unknownMisses:v},o,h))},i.fillOrderedErrors=function(n,s,c,a,o,h){const g=[];for(const v of c)v._flags.presence==="required"&&g.push(v);g.length&&i.fillMissedErrors(n,s,g,a,o,h)},i.fillDefault=function(n,s,c,a){const o=[];let h=!0;for(let g=n.length-1;g>=0;--g){const v=n[g],k=[s,...c.ancestors],w=v.$_validate(void 0,c.localize(c.path,k,v),a).value;if(h){if(w===void 0)continue;h=!1}o.unshift(w)}o.length&&s.push(...o)},i.fastSplice=function(n,s){let c=s;for(;c<n.length;)n[c++]=n[c];--n.length},i.validateSingle=function(n,s){(n.type==="array"||n._flags._arrayItems)&&(r(!s._flags.single,"Cannot specify array item with single rule enabled"),s.$_setFlag("_arrayItems",!0,{clone:!1}))},i.sort=function(n,s,c,a,o){const h=c.order==="ascending"?1:-1,g=-1*h,v=h,k=(w,d)=>{let y=i.compare(w,d,g,v);if(y!==null||(c.by&&(w=c.by.resolve(w,a,o),d=c.by.resolve(d,a,o)),y=i.compare(w,d,g,v),y!==null))return y;const j=typeof w;if(j!==typeof d)throw n.$_createError("array.sort.mismatching",s,null,a,o);if(j!=="number"&&j!=="string")throw n.$_createError("array.sort.unsupported",s,{type:j},a,o);return j==="number"?(w-d)*h:w<d?g:v};try{return{value:s.slice().sort(k)}}catch(w){return{errors:w}}},i.compare=function(n,s,c,a){return n===s?0:n===void 0?1:s===void 0?-1:n===null?a:s===null?c:null}},4937:(_,b,m)=>{const r=m(375),p=m(8068),f=m(8160),u=m(2036),t={isBool:function(l){return typeof l=="boolean"}};_.exports=p.extend({type:"boolean",flags:{sensitive:{default:!1}},terms:{falsy:{init:null,manifest:"values"},truthy:{init:null,manifest:"values"}},coerce(l,{schema:i}){if(typeof l!="boolean"){if(typeof l=="string"){const n=i._flags.sensitive?l:l.toLowerCase();l=n==="true"||n!=="false"&&l}return typeof l!="boolean"&&(l=i.$_terms.truthy&&i.$_terms.truthy.has(l,null,null,!i._flags.sensitive)||(!i.$_terms.falsy||!i.$_terms.falsy.has(l,null,null,!i._flags.sensitive))&&l),{value:l}}},validate(l,{error:i}){if(typeof l!="boolean")return{value:l,errors:i("boolean.base")}},rules:{truthy:{method(...l){f.verifyFlat(l,"truthy");const i=this.clone();i.$_terms.truthy=i.$_terms.truthy||new u;for(let n=0;n<l.length;++n){const s=l[n];r(s!==void 0,"Cannot call truthy with undefined"),i.$_terms.truthy.add(s)}return i}},falsy:{method(...l){f.verifyFlat(l,"falsy");const i=this.clone();i.$_terms.falsy=i.$_terms.falsy||new u;for(let n=0;n<l.length;++n){const s=l[n];r(s!==void 0,"Cannot call falsy with undefined"),i.$_terms.falsy.add(s)}return i}},sensitive:{method(l=!0){return this.$_setFlag("sensitive",l)}}},cast:{number:{from:t.isBool,to:(l,i)=>l?1:0},string:{from:t.isBool,to:(l,i)=>l?"true":"false"}},manifest:{build:(l,i)=>(i.truthy&&(l=l.truthy(...i.truthy)),i.falsy&&(l=l.falsy(...i.falsy)),l)},messages:{"boolean.base":"{{#label}} must be a boolean"}})},7500:(_,b,m)=>{const r=m(375),p=m(8068),f=m(8160),u=m(3328),t={isDate:function(l){return l instanceof Date}};_.exports=p.extend({type:"date",coerce:{from:["number","string"],method:(l,{schema:i})=>({value:t.parse(l,i._flags.format)||l})},validate(l,{schema:i,error:n,prefs:s}){if(l instanceof Date&&!isNaN(l.getTime()))return;const c=i._flags.format;return s.convert&&c&&typeof l=="string"?{value:l,errors:n("date.format",{format:c})}:{value:l,errors:n("date.base")}},rules:{compare:{method:!1,validate(l,i,{date:n},{name:s,operator:c,args:a}){const o=n==="now"?Date.now():n.getTime();return f.compare(l.getTime(),o,c)?l:i.error("date."+s,{limit:a.date,value:l})},args:[{name:"date",ref:!0,normalize:l=>l==="now"?l:t.parse(l),assert:l=>l!==null,message:"must have a valid date format"}]},format:{method(l){return r(["iso","javascript","unix"].includes(l),"Unknown date format",l),this.$_setFlag("format",l)}},greater:{method(l){return this.$_addRule({name:"greater",method:"compare",args:{date:l},operator:">"})}},iso:{method(){return this.format("iso")}},less:{method(l){return this.$_addRule({name:"less",method:"compare",args:{date:l},operator:"<"})}},max:{method(l){return this.$_addRule({name:"max",method:"compare",args:{date:l},operator:"<="})}},min:{method(l){return this.$_addRule({name:"min",method:"compare",args:{date:l},operator:">="})}},timestamp:{method(l="javascript"){return r(["javascript","unix"].includes(l),'"type" must be one of "javascript, unix"'),this.format(l)}}},cast:{number:{from:t.isDate,to:(l,i)=>l.getTime()},string:{from:t.isDate,to:(l,{prefs:i})=>u.date(l,i)}},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"}}),t.parse=function(l,i){if(l instanceof Date)return l;if(typeof l!="string"&&(isNaN(l)||!isFinite(l))||/^\s*$/.test(l))return null;if(i==="iso")return f.isIsoDate(l)?t.date(l.toString()):null;const n=l;if(typeof l=="string"&&/^[+-]?\d+(\.\d+)?$/.test(l)&&(l=parseFloat(l)),i){if(i==="javascript")return t.date(1*l);if(i==="unix")return t.date(1e3*l);if(typeof n=="string")return null}return t.date(l)},t.date=function(l){const i=new Date(l);return isNaN(i.getTime())?null:i}},390:(_,b,m)=>{const r=m(375),p=m(7824);_.exports=p.extend({type:"function",properties:{typeof:"function"},rules:{arity:{method(f){return r(Number.isSafeInteger(f)&&f>=0,"n must be a positive integer"),this.$_addRule({name:"arity",args:{n:f}})},validate:(f,u,{n:t})=>f.length===t?f:u.error("function.arity",{n:t})},class:{method(){return this.$_addRule("class")},validate:(f,u)=>/^\s*class\s/.test(f.toString())?f:u.error("function.class",{value:f})},minArity:{method(f){return r(Number.isSafeInteger(f)&&f>0,"n must be a strict positive integer"),this.$_addRule({name:"minArity",args:{n:f}})},validate:(f,u,{n:t})=>f.length>=t?f:u.error("function.minArity",{n:t})},maxArity:{method(f){return r(Number.isSafeInteger(f)&&f>=0,"n must be a positive integer"),this.$_addRule({name:"maxArity",args:{n:f}})},validate:(f,u,{n:t})=>f.length<=t?f:u.error("function.maxArity",{n:t})}},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:(_,b,m)=>{const r=m(978),p=m(375),f=m(8571),u=m(3652),t=m(8068),l=m(8160),i=m(3292),n=m(6354),s=m(6133),c=m(3328),a={renameDefaults:{alias:!1,multiple:!1,override:!1}};_.exports=t.extend({type:"_keys",properties:{typeof:"object"},flags:{unknown:{default:void 0}},terms:{dependencies:{init:null},keys:{init:null,manifest:{mapped:{from:"schema",to:"key"}}},patterns:{init:null},renames:{init:null}},args:(o,h)=>o.keys(h),validate(o,{schema:h,error:g,state:v,prefs:k}){if(!o||typeof o!==h.$_property("typeof")||Array.isArray(o))return{value:o,errors:g("object.base",{type:h.$_property("typeof")})};if(!(h.$_terms.renames||h.$_terms.dependencies||h.$_terms.keys||h.$_terms.patterns||h.$_terms.externals))return;o=a.clone(o,k);const w=[];if(h.$_terms.renames&&!a.rename(h,o,v,k,w))return{value:o,errors:w};if(!h.$_terms.keys&&!h.$_terms.patterns&&!h.$_terms.dependencies)return{value:o,errors:w};const d=new Set(Object.keys(o));if(h.$_terms.keys){const y=[o,...v.ancestors];for(const j of h.$_terms.keys){const S=j.key,O=o[S];d.delete(S);const P=v.localize([...v.path,S],y,j),D=j.schema.$_validate(O,P,k);if(D.errors){if(k.abortEarly)return{value:o,errors:D.errors};D.value!==void 0&&(o[S]=D.value),w.push(...D.errors)}else j.schema._flags.result==="strip"||D.value===void 0&&O!==void 0?delete o[S]:D.value!==void 0&&(o[S]=D.value)}}if(d.size||h._flags._hasPatternMatch){const y=a.unknown(h,o,d,w,v,k);if(y)return y}if(h.$_terms.dependencies)for(const y of h.$_terms.dependencies){if(y.key!==null&&a.isPresent(y.options)(y.key.resolve(o,v,k,null,{shadow:!1}))===!1)continue;const j=a.dependencies[y.rel](h,y,o,v,k);if(j){const S=h.$_createError(j.code,o,j.context,v,k);if(k.abortEarly)return{value:o,errors:S};w.push(S)}}return{value:o,errors:w}},rules:{and:{method(...o){return l.verifyFlat(o,"and"),a.dependency(this,"and",null,o)}},append:{method(o){return o==null||Object.keys(o).length===0?this:this.keys(o)}},assert:{method(o,h,g){c.isTemplate(o)||(o=i.ref(o)),p(g===void 0||typeof g=="string","Message must be a string"),h=this.$_compile(h,{appendPath:!0});const v=this.$_addRule({name:"assert",args:{subject:o,schema:h,message:g}});return v.$_mutateRegister(o),v.$_mutateRegister(h),v},validate(o,{error:h,prefs:g,state:v},{subject:k,schema:w,message:d}){const y=k.resolve(o,v,g),j=s.isRef(k)?k.absolute(v):[];return w.$_match(y,v.localize(j,[o,...v.ancestors],w),g)?o:h("object.assert",{subject:k,message:d})},args:["subject","schema","message"],multi:!0},instance:{method(o,h){return p(typeof o=="function","constructor must be a function"),h=h||o.name,this.$_addRule({name:"instance",args:{constructor:o,name:h}})},validate:(o,h,{constructor:g,name:v})=>o instanceof g?o:h.error("object.instance",{type:v,value:o}),args:["constructor","name"]},keys:{method(o){p(o===void 0||typeof o=="object","Object schema must be a valid object"),p(!l.isSchema(o),"Object schema cannot be a joi schema");const h=this.clone();if(o)if(Object.keys(o).length){h.$_terms.keys=h.$_terms.keys?h.$_terms.keys.filter(g=>!o.hasOwnProperty(g.key)):new a.Keys;for(const g in o)l.tryWithPath(()=>h.$_terms.keys.push({key:g,schema:this.$_compile(o[g])}),g)}else h.$_terms.keys=new a.Keys;else h.$_terms.keys=null;return h.$_mutateRebuild()}},length:{method(o){return this.$_addRule({name:"length",args:{limit:o},operator:"="})},validate:(o,h,{limit:g},{name:v,operator:k,args:w})=>l.compare(Object.keys(o).length,g,k)?o:h.error("object."+v,{limit:w.limit,value:o}),args:[{name:"limit",ref:!0,assert:l.limit,message:"must be a positive integer"}]},max:{method(o){return this.$_addRule({name:"max",method:"length",args:{limit:o},operator:"<="})}},min:{method(o){return this.$_addRule({name:"min",method:"length",args:{limit:o},operator:">="})}},nand:{method(...o){return l.verifyFlat(o,"nand"),a.dependency(this,"nand",null,o)}},or:{method(...o){return l.verifyFlat(o,"or"),a.dependency(this,"or",null,o)}},oxor:{method(...o){return a.dependency(this,"oxor",null,o)}},pattern:{method(o,h,g={}){const v=o instanceof RegExp;v||(o=this.$_compile(o,{appendPath:!0})),p(h!==void 0,"Invalid rule"),l.assertOptions(g,["fallthrough","matches"]),v&&p(!o.flags.includes("g")&&!o.flags.includes("y"),"pattern should not use global or sticky mode"),h=this.$_compile(h,{appendPath:!0});const k=this.clone();k.$_terms.patterns=k.$_terms.patterns||[];const w={[v?"regex":"schema"]:o,rule:h};return g.matches&&(w.matches=this.$_compile(g.matches),w.matches.type!=="array"&&(w.matches=w.matches.$_root.array().items(w.matches)),k.$_mutateRegister(w.matches),k.$_setFlag("_hasPatternMatch",!0,{clone:!1})),g.fallthrough&&(w.fallthrough=!0),k.$_terms.patterns.push(w),k.$_mutateRegister(h),k}},ref:{method(){return this.$_addRule("ref")},validate:(o,h)=>s.isRef(o)?o:h.error("object.refType",{value:o})},regex:{method(){return this.$_addRule("regex")},validate:(o,h)=>o instanceof RegExp?o:h.error("object.regex",{value:o})},rename:{method(o,h,g={}){p(typeof o=="string"||o instanceof RegExp,"Rename missing the from argument"),p(typeof h=="string"||h instanceof c,"Invalid rename to argument"),p(h!==o,"Cannot rename key to same name:",o),l.assertOptions(g,["alias","ignoreUndefined","override","multiple"]);const v=this.clone();v.$_terms.renames=v.$_terms.renames||[];for(const k of v.$_terms.renames)p(k.from!==o,"Cannot rename the same key multiple times");return h instanceof c&&v.$_mutateRegister(h),v.$_terms.renames.push({from:o,to:h,options:r(a.renameDefaults,g)}),v}},schema:{method(o="any"){return this.$_addRule({name:"schema",args:{type:o}})},validate:(o,h,{type:g})=>!l.isSchema(o)||g!=="any"&&o.type!==g?h.error("object.schema",{type:g}):o},unknown:{method(o){return this.$_setFlag("unknown",o!==!1)}},with:{method(o,h,g={}){return a.dependency(this,"with",o,h,g)}},without:{method(o,h,g={}){return a.dependency(this,"without",o,h,g)}},xor:{method(...o){return l.verifyFlat(o,"xor"),a.dependency(this,"xor",null,o)}}},overrides:{default(o,h){return o===void 0&&(o=l.symbols.deepDefault),this.$_parent("default",o,h)}},rebuild(o){if(o.$_terms.keys){const h=new u.Sorter;for(const g of o.$_terms.keys)l.tryWithPath(()=>h.add(g,{after:g.schema.$_rootReferences(),group:g.key}),g.key);o.$_terms.keys=new a.Keys(...h.nodes)}},manifest:{build(o,h){if(h.keys&&(o=o.keys(h.keys)),h.dependencies)for(const{rel:g,key:v=null,peers:k,options:w}of h.dependencies)o=a.dependency(o,g,v,k,w);if(h.patterns)for(const{regex:g,schema:v,rule:k,fallthrough:w,matches:d}of h.patterns)o=o.pattern(g||v,k,{fallthrough:w,matches:d});if(h.renames)for(const{from:g,to:v,options:k}of h.renames)o=o.rename(g,v,k);return o}},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}}"}}),a.clone=function(o,h){if(typeof o=="object"){if(h.nonEnumerables)return f(o,{shallow:!0});const v=Object.create(Object.getPrototypeOf(o));return Object.assign(v,o),v}const g=function(...v){return o.apply(this,v)};return g.prototype=f(o.prototype),Object.defineProperty(g,"name",{value:o.name,writable:!1}),Object.defineProperty(g,"length",{value:o.length,writable:!1}),Object.assign(g,o),g},a.dependency=function(o,h,g,v,k){p(g===null||typeof g=="string",h,"key must be a strings"),k||(k=v.length>1&&typeof v[v.length-1]=="object"?v.pop():{}),l.assertOptions(k,["separator","isPresent"]),v=[].concat(v);const w=l.default(k.separator,"."),d=[];for(const j of v)p(typeof j=="string",h,"peers must be strings"),d.push(i.ref(j,{separator:w,ancestor:0,prefix:!1}));g!==null&&(g=i.ref(g,{separator:w,ancestor:0,prefix:!1}));const y=o.clone();return y.$_terms.dependencies=y.$_terms.dependencies||[],y.$_terms.dependencies.push(new a.Dependency(h,g,d,v,k)),y},a.dependencies={and(o,h,g,v,k){const w=[],d=[],y=h.peers.length,j=a.isPresent(h.options);for(const S of h.peers)j(S.resolve(g,v,k,null,{shadow:!1}))===!1?w.push(S.key):d.push(S.key);if(w.length!==y&&d.length!==y)return{code:"object.and",context:{present:d,presentWithLabels:a.keysToLabels(o,d),missing:w,missingWithLabels:a.keysToLabels(o,w)}}},nand(o,h,g,v,k){const w=[],d=a.isPresent(h.options);for(const S of h.peers)d(S.resolve(g,v,k,null,{shadow:!1}))&&w.push(S.key);if(w.length!==h.peers.length)return;const y=h.paths[0],j=h.paths.slice(1);return{code:"object.nand",context:{main:y,mainWithLabel:a.keysToLabels(o,y),peers:j,peersWithLabels:a.keysToLabels(o,j)}}},or(o,h,g,v,k){const w=a.isPresent(h.options);for(const d of h.peers)if(w(d.resolve(g,v,k,null,{shadow:!1})))return;return{code:"object.missing",context:{peers:h.paths,peersWithLabels:a.keysToLabels(o,h.paths)}}},oxor(o,h,g,v,k){const w=[],d=a.isPresent(h.options);for(const j of h.peers)d(j.resolve(g,v,k,null,{shadow:!1}))&&w.push(j.key);if(!w.length||w.length===1)return;const y={peers:h.paths,peersWithLabels:a.keysToLabels(o,h.paths)};return y.present=w,y.presentWithLabels=a.keysToLabels(o,w),{code:"object.oxor",context:y}},with(o,h,g,v,k){const w=a.isPresent(h.options);for(const d of h.peers)if(w(d.resolve(g,v,k,null,{shadow:!1}))===!1)return{code:"object.with",context:{main:h.key.key,mainWithLabel:a.keysToLabels(o,h.key.key),peer:d.key,peerWithLabel:a.keysToLabels(o,d.key)}}},without(o,h,g,v,k){const w=a.isPresent(h.options);for(const d of h.peers)if(w(d.resolve(g,v,k,null,{shadow:!1})))return{code:"object.without",context:{main:h.key.key,mainWithLabel:a.keysToLabels(o,h.key.key),peer:d.key,peerWithLabel:a.keysToLabels(o,d.key)}}},xor(o,h,g,v,k){const w=[],d=a.isPresent(h.options);for(const j of h.peers)d(j.resolve(g,v,k,null,{shadow:!1}))&&w.push(j.key);if(w.length===1)return;const y={peers:h.paths,peersWithLabels:a.keysToLabels(o,h.paths)};return w.length===0?{code:"object.missing",context:y}:(y.present=w,y.presentWithLabels=a.keysToLabels(o,w),{code:"object.xor",context:y})}},a.keysToLabels=function(o,h){return Array.isArray(h)?h.map(g=>o.$_mapLabels(g)):o.$_mapLabels(h)},a.isPresent=function(o){return typeof o.isPresent=="function"?o.isPresent:h=>h!==void 0},a.rename=function(o,h,g,v,k){const w={};for(const d of o.$_terms.renames){const y=[],j=typeof d.from!="string";if(j)for(const S in h){if(h[S]===void 0&&d.options.ignoreUndefined||S===d.to)continue;const O=d.from.exec(S);O&&y.push({from:S,to:d.to,match:O})}else!Object.prototype.hasOwnProperty.call(h,d.from)||h[d.from]===void 0&&d.options.ignoreUndefined||y.push(d);for(const S of y){const O=S.from;let P=S.to;if(P instanceof c&&(P=P.render(h,g,v,S.match)),O!==P){if(!d.options.multiple&&w[P]&&(k.push(o.$_createError("object.rename.multiple",h,{from:O,to:P,pattern:j},g,v)),v.abortEarly)||Object.prototype.hasOwnProperty.call(h,P)&&!d.options.override&&!w[P]&&(k.push(o.$_createError("object.rename.override",h,{from:O,to:P,pattern:j},g,v)),v.abortEarly))return!1;h[O]===void 0?delete h[P]:h[P]=h[O],w[P]=!0,d.options.alias||delete h[O]}}}return!0},a.unknown=function(o,h,g,v,k,w){if(o.$_terms.patterns){let d=!1;const y=o.$_terms.patterns.map(S=>{if(S.matches)return d=!0,[]}),j=[h,...k.ancestors];for(const S of g){const O=h[S],P=[...k.path,S];for(let D=0;D<o.$_terms.patterns.length;++D){const I=o.$_terms.patterns[D];if(I.regex){const M=I.regex.test(S);if(k.mainstay.tracer.debug(k,"rule",`pattern.${D}`,M?"pass":"error"),!M)continue}else if(!I.schema.$_match(S,k.nest(I.schema,`pattern.${D}`),w))continue;g.delete(S);const B=k.localize(P,j,{schema:I.rule,key:S}),N=I.rule.$_validate(O,B,w);if(N.errors){if(w.abortEarly)return{value:h,errors:N.errors};v.push(...N.errors)}if(I.matches&&y[D].push(S),h[S]=N.value,!I.fallthrough)break}}if(d)for(let S=0;S<y.length;++S){const O=y[S];if(!O)continue;const P=o.$_terms.patterns[S].matches,D=k.localize(k.path,j,P),I=P.$_validate(O,D,w);if(I.errors){const B=n.details(I.errors,{override:!1});B.matches=O;const N=o.$_createError("object.pattern.match",h,B,k,w);if(w.abortEarly)return{value:h,errors:N};v.push(N)}}}if(g.size&&(o.$_terms.keys||o.$_terms.patterns)){if(w.stripUnknown&&o._flags.unknown===void 0||w.skipFunctions){const d=!(!w.stripUnknown||w.stripUnknown!==!0&&!w.stripUnknown.objects);for(const y of g)d?(delete h[y],g.delete(y)):typeof h[y]=="function"&&g.delete(y)}if(!l.default(o._flags.unknown,w.allowUnknown))for(const d of g){const y=k.localize([...k.path,d],[]),j=o.$_createError("object.unknown",h[d],{child:d},y,w,{flags:!1});if(w.abortEarly)return{value:h,errors:j};v.push(j)}}},a.Dependency=class{constructor(o,h,g,v,k){this.rel=o,this.key=h,this.peers=g,this.paths=v,this.options=k}describe(){const o={rel:this.rel,peers:this.paths};return this.key!==null&&(o.key=this.key.key),this.peers[0].separator!=="."&&(o.options={...o.options,separator:this.peers[0].separator}),this.options.isPresent&&(o.options={...o.options,isPresent:this.options.isPresent}),o}},a.Keys=class extends Array{concat(o){const h=this.slice(),g=new Map;for(let v=0;v<h.length;++v)g.set(h[v].key,v);for(const v of o){const k=v.key,w=g.get(k);w!==void 0?h[w]={key:k,schema:h[w].schema.concat(v.schema)}:h.push(v)}return h}}},8785:(_,b,m)=>{const r=m(375),p=m(8068),f=m(8160),u=m(3292),t=m(6354),l={};_.exports=p.extend({type:"link",properties:{schemaChain:!0},terms:{link:{init:null,manifest:"single",register:!1}},args:(i,n)=>i.ref(n),validate(i,{schema:n,state:s,prefs:c}){r(n.$_terms.link,"Uninitialized link schema");const a=l.generate(n,i,s,c),o=n.$_terms.link[0].ref;return a.$_validate(i,s.nest(a,`link:${o.display}:${a.type}`),c)},generate:(i,n,s,c)=>l.generate(i,n,s,c),rules:{ref:{method(i){r(!this.$_terms.link,"Cannot reinitialize schema"),i=u.ref(i),r(i.type==="value"||i.type==="local","Invalid reference type:",i.type),r(i.type==="local"||i.ancestor==="root"||i.ancestor>0,"Link cannot reference itself");const n=this.clone();return n.$_terms.link=[{ref:i}],n}},relative:{method(i=!0){return this.$_setFlag("relative",i)}}},overrides:{concat(i){r(this.$_terms.link,"Uninitialized link schema"),r(f.isSchema(i),"Invalid schema object"),r(i.type!=="link","Cannot merge type link with another link");const n=this.clone();return n.$_terms.whens||(n.$_terms.whens=[]),n.$_terms.whens.push({concat:i}),n.$_mutateRebuild()}},manifest:{build:(i,n)=>(r(n.link,"Invalid link description missing link"),i.ref(n.link))}}),l.generate=function(i,n,s,c){let a=s.mainstay.links.get(i);if(a)return a._generate(n,s,c).schema;const o=i.$_terms.link[0].ref,{perspective:h,path:g}=l.perspective(o,s);l.assert(h,"which is outside of schema boundaries",o,i,s,c);try{a=g.length?h.$_reach(g):h}catch{l.assert(!1,"to non-existing schema",o,i,s,c)}return l.assert(a.type!=="link","which is another link",o,i,s,c),i._flags.relative||s.mainstay.links.set(i,a),a._generate(n,s,c).schema},l.perspective=function(i,n){if(i.type==="local"){for(const{schema:s,key:c}of n.schemas){if((s._flags.id||c)===i.path[0])return{perspective:s,path:i.path.slice(1)};if(s.$_terms.shared){for(const a of s.$_terms.shared)if(a._flags.id===i.path[0])return{perspective:a,path:i.path.slice(1)}}}return{perspective:null,path:null}}return i.ancestor==="root"?{perspective:n.schemas[n.schemas.length-1].schema,path:i.path}:{perspective:n.schemas[i.ancestor]&&n.schemas[i.ancestor].schema,path:i.path}},l.assert=function(i,n,s,c,a,o){i||r(!1,`"${t.label(c._flags,a,o)}" contains link reference "${s.display}" ${n}`)}},3832:(_,b,m)=>{const r=m(375),p=m(8068),f=m(8160),u={numberRx:/^\s*[+-]?(?:(?:\d+(?:\.\d*)?)|(?:\.\d+))(?:e([+-]?\d+))?\s*$/i,precisionRx:/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/,exponentialPartRegex:/[eE][+-]?\d+$/,leadingSignAndZerosRegex:/^[+-]?(0*)?/,dotRegex:/\./,trailingZerosRegex:/0+$/,decimalPlaces(t){const l=t.toString(),i=l.indexOf("."),n=l.indexOf("e");return(i<0?0:(n<0?l.length:n)-i-1)+(n<0?0:Math.max(0,-parseInt(l.slice(n+1))))}};_.exports=p.extend({type:"number",flags:{unsafe:{default:!1}},coerce:{from:"string",method(t,{schema:l,error:i}){if(!t.match(u.numberRx))return;t=t.trim();const n={value:parseFloat(t)};if(n.value===0&&(n.value=0),!l._flags.unsafe)if(t.match(/e/i)){if(u.extractSignificantDigits(t)!==u.extractSignificantDigits(String(n.value)))return n.errors=i("number.unsafe"),n}else{const s=n.value.toString();if(s.match(/e/i))return n;if(s!==u.normalizeDecimal(t))return n.errors=i("number.unsafe"),n}return n}},validate(t,{schema:l,error:i,prefs:n}){if(t===1/0||t===-1/0)return{value:t,errors:i("number.infinity")};if(!f.isNumber(t))return{value:t,errors:i("number.base")};const s={value:t};if(n.convert){const c=l.$_getRule("precision");if(c){const a=Math.pow(10,c.args.limit);s.value=Math.round(s.value*a)/a}}return s.value===0&&(s.value=0),!l._flags.unsafe&&(t>Number.MAX_SAFE_INTEGER||t<Number.MIN_SAFE_INTEGER)&&(s.errors=i("number.unsafe")),s},rules:{compare:{method:!1,validate:(t,l,{limit:i},{name:n,operator:s,args:c})=>f.compare(t,i,s)?t:l.error("number."+n,{limit:c.limit,value:t}),args:[{name:"limit",ref:!0,assert:f.isNumber,message:"must be a number"}]},greater:{method(t){return this.$_addRule({name:"greater",method:"compare",args:{limit:t},operator:">"})}},integer:{method(){return this.$_addRule("integer")},validate:(t,l)=>Math.trunc(t)-t==0?t:l.error("number.integer")},less:{method(t){return this.$_addRule({name:"less",method:"compare",args:{limit:t},operator:"<"})}},max:{method(t){return this.$_addRule({name:"max",method:"compare",args:{limit:t},operator:"<="})}},min:{method(t){return this.$_addRule({name:"min",method:"compare",args:{limit:t},operator:">="})}},multiple:{method(t){const l=typeof t=="number"?u.decimalPlaces(t):null,i=Math.pow(10,l);return this.$_addRule({name:"multiple",args:{base:t,baseDecimalPlace:l,pfactor:i}})},validate:(t,l,{base:i,baseDecimalPlace:n,pfactor:s},c)=>u.decimalPlaces(t)>n?l.error("number.multiple",{multiple:c.args.base,value:t}):Math.round(s*t)%Math.round(s*i)==0?t:l.error("number.multiple",{multiple:c.args.base,value:t}),args:[{name:"base",ref:!0,assert:t=>typeof t=="number"&&isFinite(t)&&t>0,message:"must be a positive number"},"baseDecimalPlace","pfactor"],multi:!0},negative:{method(){return this.sign("negative")}},port:{method(){return this.$_addRule("port")},validate:(t,l)=>Number.isSafeInteger(t)&&t>=0&&t<=65535?t:l.error("number.port")},positive:{method(){return this.sign("positive")}},precision:{method(t){return r(Number.isSafeInteger(t),"limit must be an integer"),this.$_addRule({name:"precision",args:{limit:t}})},validate(t,l,{limit:i}){const n=t.toString().match(u.precisionRx);return Math.max((n[1]?n[1].length:0)-(n[2]?parseInt(n[2],10):0),0)<=i?t:l.error("number.precision",{limit:i,value:t})},convert:!0},sign:{method(t){return r(["negative","positive"].includes(t),"Invalid sign",t),this.$_addRule({name:"sign",args:{sign:t}})},validate:(t,l,{sign:i})=>i==="negative"&&t<0||i==="positive"&&t>0?t:l.error(`number.${i}`)},unsafe:{method(t=!0){return r(typeof t=="boolean","enabled must be a boolean"),this.$_setFlag("unsafe",t)}}},cast:{string:{from:t=>typeof t=="number",to:(t,l)=>t.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(t){return t.replace(u.exponentialPartRegex,"").replace(u.dotRegex,"").replace(u.trailingZerosRegex,"").replace(u.leadingSignAndZerosRegex,"")},u.normalizeDecimal=function(t){return(t=t.replace(/^\+/,"").replace(/\.0*$/,"").replace(/^(-?)\.([^\.]*)$/,"$10.$2").replace(/^(-?)0+([0-9])/,"$1$2")).includes(".")&&t.endsWith("0")&&(t=t.replace(/0+$/,"")),t==="-0"?"0":t}},8966:(_,b,m)=>{const r=m(7824);_.exports=r.extend({type:"object",cast:{map:{from:p=>p&&typeof p=="object",to:(p,f)=>new Map(Object.entries(p))}}})},7417:(_,b,m)=>{const r=m(375),p=m(5380),f=m(1745),u=m(9959),t=m(6064),l=m(9926),i=m(5752),n=m(8068),s=m(8160),c={tlds:l instanceof Set&&{tlds:{allow:l,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"]};_.exports=n.extend({type:"string",flags:{insensitive:{default:!1},truncate:{default:!1}},terms:{replacements:{init:null}},coerce:{from:"string",method(a,{schema:o,state:h,prefs:g}){const v=o.$_getRule("normalize");v&&(a=a.normalize(v.args.form));const k=o.$_getRule("case");k&&(a=k.args.direction==="upper"?a.toLocaleUpperCase():a.toLocaleLowerCase());const w=o.$_getRule("trim");if(w&&w.args.enabled&&(a=a.trim()),o.$_terms.replacements)for(const y of o.$_terms.replacements)a=a.replace(y.pattern,y.replacement);const d=o.$_getRule("hex");if(d&&d.args.options.byteAligned&&a.length%2!=0&&(a=`0${a}`),o.$_getRule("isoDate")){const y=c.isoDate(a);y&&(a=y)}if(o._flags.truncate){const y=o.$_getRule("max");if(y){let j=y.args.limit;if(s.isResolvable(j)&&(j=j.resolve(a,h,g),!s.limit(j)))return{value:a,errors:o.$_createError("any.ref",j,{ref:y.args.limit,arg:"limit",reason:"must be a positive integer"},h,g)};a=a.slice(0,j)}}return{value:a}}},validate(a,{schema:o,error:h}){if(typeof a!="string")return{value:a,errors:h("string.base")};if(a===""){const g=o.$_getRule("min");return g&&g.args.limit===0?void 0:{value:a,errors:h("string.empty")}}},rules:{alphanum:{method(){return this.$_addRule("alphanum")},validate:(a,o)=>/^[a-zA-Z0-9]+$/.test(a)?a:o.error("string.alphanum")},base64:{method(a={}){return s.assertOptions(a,["paddingRequired","urlSafe"]),a={urlSafe:!1,paddingRequired:!0,...a},r(typeof a.paddingRequired=="boolean","paddingRequired must be boolean"),r(typeof a.urlSafe=="boolean","urlSafe must be boolean"),this.$_addRule({name:"base64",args:{options:a}})},validate:(a,o,{options:h})=>c.base64Regex[h.paddingRequired][h.urlSafe].test(a)?a:o.error("string.base64")},case:{method(a){return r(["lower","upper"].includes(a),"Invalid case:",a),this.$_addRule({name:"case",args:{direction:a}})},validate:(a,o,{direction:h})=>h==="lower"&&a===a.toLocaleLowerCase()||h==="upper"&&a===a.toLocaleUpperCase()?a:o.error(`string.${h}case`),convert:!0},creditCard:{method(){return this.$_addRule("creditCard")},validate(a,o){let h=a.length,g=0,v=1;for(;h--;){const k=a.charAt(h)*v;g+=k-9*(k>9),v^=3}return g>0&&g%10==0?a:o.error("string.creditCard")}},dataUri:{method(a={}){return s.assertOptions(a,["paddingRequired"]),a={paddingRequired:!0,...a},r(typeof a.paddingRequired=="boolean","paddingRequired must be boolean"),this.$_addRule({name:"dataUri",args:{options:a}})},validate(a,o,{options:h}){const g=a.match(c.dataUriRegex);return g&&(!g[2]||g[2]!=="base64"||c.base64Regex[h.paddingRequired].false.test(g[3]))?a:o.error("string.dataUri")}},domain:{method(a){a&&s.assertOptions(a,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"]);const o=c.addressOptions(a);return this.$_addRule({name:"domain",args:{options:a},address:o})},validate:(a,o,h,{address:g})=>p.isValid(a,g)?a:o.error("string.domain")},email:{method(a={}){s.assertOptions(a,["allowFullyQualified","allowUnicode","ignoreLength","maxDomainSegments","minDomainSegments","multiple","separator","tlds"]),r(a.multiple===void 0||typeof a.multiple=="boolean","multiple option must be an boolean");const o=c.addressOptions(a),h=new RegExp(`\\s*[${a.separator?t(a.separator):","}]\\s*`);return this.$_addRule({name:"email",args:{options:a},regex:h,address:o})},validate(a,o,{options:h},{regex:g,address:v}){const k=h.multiple?a.split(g):[a],w=[];for(const d of k)f.isValid(d,v)||w.push(d);return w.length?o.error("string.email",{value:a,invalids:w}):a}},guid:{alias:"uuid",method(a={}){s.assertOptions(a,["version","separator"]);let o="";if(a.version){const v=[].concat(a.version);r(v.length>=1,"version must have at least 1 valid version specified");const k=new Set;for(let w=0;w<v.length;++w){const d=v[w];r(typeof d=="string","version at position "+w+" must be a string");const y=c.guidVersions[d.toLowerCase()];r(y,"version at position "+w+" must be one of "+Object.keys(c.guidVersions).join(", ")),r(!k.has(y),"version at position "+w+" must not be a duplicate"),o+=y,k.add(y)}}r(c.guidSeparators.has(a.separator),'separator must be one of true, false, "-", or ":"');const h=a.separator===void 0?"[:-]?":a.separator===!0?"[:-]":a.separator===!1?"[]?":`\\${a.separator}`,g=new RegExp(`^([\\[{\\(]?)[0-9A-F]{8}(${h})[0-9A-F]{4}\\2?[${o||"0-9A-F"}][0-9A-F]{3}\\2?[${o?"89AB":"0-9A-F"}][0-9A-F]{3}\\2?[0-9A-F]{12}([\\]}\\)]?)$`,"i");return this.$_addRule({name:"guid",args:{options:a},regex:g})},validate(a,o,h,{regex:g}){const v=g.exec(a);return v?c.guidBrackets[v[1]]!==v[v.length-1]?o.error("string.guid"):a:o.error("string.guid")}},hex:{method(a={}){return s.assertOptions(a,["byteAligned","prefix"]),a={byteAligned:!1,prefix:!1,...a},r(typeof a.byteAligned=="boolean","byteAligned must be boolean"),r(typeof a.prefix=="boolean"||a.prefix==="optional",'prefix must be boolean or "optional"'),this.$_addRule({name:"hex",args:{options:a}})},validate:(a,o,{options:h})=>(h.prefix==="optional"?c.hexRegex.withOptionalPrefix:h.prefix===!0?c.hexRegex.withPrefix:c.hexRegex.withoutPrefix).test(a)?h.byteAligned&&a.length%2!=0?o.error("string.hexAlign"):a:o.error("string.hex")},hostname:{method(){return this.$_addRule("hostname")},validate:(a,o)=>p.isValid(a,{minDomainSegments:1})||c.ipRegex.test(a)?a:o.error("string.hostname")},insensitive:{method(){return this.$_setFlag("insensitive",!0)}},ip:{method(a={}){s.assertOptions(a,["cidr","version"]);const{cidr:o,versions:h,regex:g}=u.regex(a),v=a.version?h:void 0;return this.$_addRule({name:"ip",args:{options:{cidr:o,version:v}},regex:g})},validate:(a,o,{options:h},{regex:g})=>g.test(a)?a:h.version?o.error("string.ipVersion",{value:a,cidr:h.cidr,version:h.version}):o.error("string.ip",{value:a,cidr:h.cidr})},isoDate:{method(){return this.$_addRule("isoDate")},validate:(a,{error:o})=>c.isoDate(a)?a:o("string.isoDate")},isoDuration:{method(){return this.$_addRule("isoDuration")},validate:(a,o)=>c.isoDurationRegex.test(a)?a:o.error("string.isoDuration")},length:{method(a,o){return c.length(this,"length",a,"=",o)},validate(a,o,{limit:h,encoding:g},{name:v,operator:k,args:w}){const d=!g&&a.length;return s.compare(d,h,k)?a:o.error("string."+v,{limit:w.limit,value:a,encoding:g})},args:[{name:"limit",ref:!0,assert:s.limit,message:"must be a positive integer"},"encoding"]},lowercase:{method(){return this.case("lower")}},max:{method(a,o){return c.length(this,"max",a,"<=",o)},args:["limit","encoding"]},min:{method(a,o){return c.length(this,"min",a,">=",o)},args:["limit","encoding"]},normalize:{method(a="NFC"){return r(c.normalizationForms.includes(a),"normalization form must be one of "+c.normalizationForms.join(", ")),this.$_addRule({name:"normalize",args:{form:a}})},validate:(a,{error:o},{form:h})=>a===a.normalize(h)?a:o("string.normalize",{value:a,form:h}),convert:!0},pattern:{alias:"regex",method(a,o={}){r(a instanceof RegExp,"regex must be a RegExp"),r(!a.flags.includes("g")&&!a.flags.includes("y"),"regex should not use global or sticky mode"),typeof o=="string"&&(o={name:o}),s.assertOptions(o,["invert","name"]);const h=["string.pattern",o.invert?".invert":"",o.name?".name":".base"].join("");return this.$_addRule({name:"pattern",args:{regex:a,options:o},errorCode:h})},validate:(a,o,{regex:h,options:g},{errorCode:v})=>h.test(a)^g.invert?a:o.error(v,{name:g.name,regex:h,value:a}),args:["regex","options"],multi:!0},replace:{method(a,o){typeof a=="string"&&(a=new RegExp(t(a),"g")),r(a instanceof RegExp,"pattern must be a RegExp"),r(typeof o=="string","replacement must be a String");const h=this.clone();return h.$_terms.replacements||(h.$_terms.replacements=[]),h.$_terms.replacements.push({pattern:a,replacement:o}),h}},token:{method(){return this.$_addRule("token")},validate:(a,o)=>/^\w+$/.test(a)?a:o.error("string.token")},trim:{method(a=!0){return r(typeof a=="boolean","enabled must be a boolean"),this.$_addRule({name:"trim",args:{enabled:a}})},validate:(a,o,{enabled:h})=>h&&a!==a.trim()?o.error("string.trim"):a,convert:!0},truncate:{method(a=!0){return r(typeof a=="boolean","enabled must be a boolean"),this.$_setFlag("truncate",a)}},uppercase:{method(){return this.case("upper")}},uri:{method(a={}){s.assertOptions(a,["allowRelative","allowQuerySquareBrackets","domain","relativeOnly","scheme","encodeUri"]),a.domain&&s.assertOptions(a.domain,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"]);const{regex:o,scheme:h}=i.regex(a),g=a.domain?c.addressOptions(a.domain):null;return this.$_addRule({name:"uri",args:{options:a},regex:o,domain:g,scheme:h})},validate(a,o,{options:h},{regex:g,domain:v,scheme:k}){if(["http:/","https:/"].includes(a))return o.error("string.uri");let w=g.exec(a);if(!w&&o.prefs.convert&&h.encodeUri){const d=encodeURI(a);w=g.exec(d),w&&(a=d)}if(w){const d=w[1]||w[2];return!v||h.allowRelative&&!d||p.isValid(d,v)?a:o.error("string.domain",{value:d})}return h.relativeOnly?o.error("string.uriRelativeOnly"):h.scheme?o.error("string.uriCustomScheme",{scheme:k,value:a}):o.error("string.uri")}}},manifest:{build(a,o){if(o.replacements)for(const{pattern:h,replacement:g}of o.replacements)a=a.replace(h,g);return a}},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"}}),c.addressOptions=function(a){if(!a)return c.tlds||a;if(r(a.minDomainSegments===void 0||Number.isSafeInteger(a.minDomainSegments)&&a.minDomainSegments>0,"minDomainSegments must be a positive integer"),r(a.maxDomainSegments===void 0||Number.isSafeInteger(a.maxDomainSegments)&&a.maxDomainSegments>0,"maxDomainSegments must be a positive integer"),a.tlds===!1)return a;if(a.tlds===!0||a.tlds===void 0)return r(c.tlds,"Built-in TLD list disabled"),Object.assign({},a,c.tlds);r(typeof a.tlds=="object","tlds must be true, false, or an object");const o=a.tlds.deny;if(o)return Array.isArray(o)&&(a=Object.assign({},a,{tlds:{deny:new Set(o)}})),r(a.tlds.deny instanceof Set,"tlds.deny must be an array, Set, or boolean"),r(!a.tlds.allow,"Cannot specify both tlds.allow and tlds.deny lists"),c.validateTlds(a.tlds.deny,"tlds.deny"),a;const h=a.tlds.allow;return h?h===!0?(r(c.tlds,"Built-in TLD list disabled"),Object.assign({},a,c.tlds)):(Array.isArray(h)&&(a=Object.assign({},a,{tlds:{allow:new Set(h)}})),r(a.tlds.allow instanceof Set,"tlds.allow must be an array, Set, or boolean"),c.validateTlds(a.tlds.allow,"tlds.allow"),a):a},c.validateTlds=function(a,o){for(const h of a)r(p.isValid(h,{minDomainSegments:1,maxDomainSegments:1}),`${o} must contain valid top level domain names`)},c.isoDate=function(a){if(!s.isIsoDate(a))return null;/.*T.*[+-]\d\d$/.test(a)&&(a+="00");const o=new Date(a);return isNaN(o.getTime())?null:o.toISOString()},c.length=function(a,o,h,g,v){return r(!v||!1,"Invalid encoding:",v),a.$_addRule({name:o,method:"length",args:{limit:h,encoding:v},operator:g})}},8826:(_,b,m)=>{const r=m(375),p=m(8068),f={};f.Map=class extends Map{slice(){return new f.Map(this)}},_.exports=p.extend({type:"symbol",terms:{map:{init:new f.Map}},coerce:{method(u,{schema:t,error:l}){const i=t.$_terms.map.get(u);return i&&(u=i),t._flags.only&&typeof u!="symbol"?{value:u,errors:l("symbol.map",{map:t.$_terms.map})}:{value:u}}},validate(u,{error:t}){if(typeof u!="symbol")return{value:u,errors:t("symbol.base")}},rules:{map:{method(u){u&&!u[Symbol.iterator]&&typeof u=="object"&&(u=Object.entries(u)),r(u&&u[Symbol.iterator],"Iterable must be an iterable or object");const t=this.clone(),l=[];for(const i of u){r(i&&i[Symbol.iterator],"Entry must be an iterable");const[n,s]=i;r(typeof n!="object"&&typeof n!="function"&&typeof n!="symbol","Key must not be of type object, function, or Symbol"),r(typeof s=="symbol","Value must be a Symbol"),t.$_terms.map.set(n,s),l.push(s)}return t.valid(...l)}}},manifest:{build:(u,t)=>(t.map&&(u=u.map(t.map)),u)},messages:{"symbol.base":"{{#label}} must be a symbol","symbol.map":"{{#label}} must be one of {{#map}}"}})},8863:(_,b,m)=>{const r=m(375),p=m(8571),f=m(738),u=m(9621),t=m(8160),l=m(6354),i=m(493),n={result:Symbol("result")};b.entry=function(s,c,a){let o=t.defaults;a&&(r(a.warnings===void 0,"Cannot override warnings preference in synchronous validation"),r(a.artifacts===void 0,"Cannot override artifacts preference in synchronous validation"),o=t.preferences(t.defaults,a));const h=n.entry(s,c,o);r(!h.mainstay.externals.length,"Schema with external rules must use validateAsync()");const g={value:h.value};return h.error&&(g.error=h.error),h.mainstay.warnings.length&&(g.warning=l.details(h.mainstay.warnings)),h.mainstay.debug&&(g.debug=h.mainstay.debug),h.mainstay.artifacts&&(g.artifacts=h.mainstay.artifacts),g},b.entryAsync=async function(s,c,a){let o=t.defaults;a&&(o=t.preferences(t.defaults,a));const h=n.entry(s,c,o),g=h.mainstay;if(h.error)throw g.debug&&(h.error.debug=g.debug),h.error;if(g.externals.length){let k=h.value;const w=[];for(const d of g.externals){const y=d.state.path,j=d.schema.type==="link"?g.links.get(d.schema):null;let S,O,P=k;const D=y.length?[k]:[],I=y.length?u(s,y):s;if(y.length){S=y[y.length-1];let B=k;for(const N of y.slice(0,-1))B=B[N],D.unshift(B);O=D[0],P=O[S]}try{const B=(M,q)=>(j||d.schema).$_createError(M,P,q,d.state,o),N=await d.method(P,{schema:d.schema,linked:j,state:d.state,prefs:a,original:I,error:B,errorsArray:n.errorsArray,warn:(M,q)=>g.warnings.push((j||d.schema).$_createError(M,P,q,d.state,o)),message:(M,q)=>(j||d.schema).$_createError("external",P,q,d.state,o,{messages:M})});if(N===void 0||N===P)continue;if(N instanceof l.Report){if(g.tracer.log(d.schema,d.state,"rule","external","error"),w.push(N),o.abortEarly)break;continue}if(Array.isArray(N)&&N[t.symbols.errors]){if(g.tracer.log(d.schema,d.state,"rule","external","error"),w.push(...N),o.abortEarly)break;continue}O?(g.tracer.value(d.state,"rule",P,N,"external"),O[S]=N):(g.tracer.value(d.state,"rule",k,N,"external"),k=N)}catch(B){throw o.errors.label&&(B.message+=` (${d.label})`),B}}if(h.value=k,w.length)throw h.error=l.process(w,s,o),g.debug&&(h.error.debug=g.debug),h.error}if(!o.warnings&&!o.debug&&!o.artifacts)return h.value;const v={value:h.value};return g.warnings.length&&(v.warning=l.details(g.warnings)),g.debug&&(v.debug=g.debug),g.artifacts&&(v.artifacts=g.artifacts),v},n.Mainstay=class{constructor(s,c,a){this.externals=[],this.warnings=[],this.tracer=s,this.debug=c,this.links=a,this.shadow=null,this.artifacts=null,this._snapshots=[]}snapshot(){this._snapshots.push({externals:this.externals.slice(),warnings:this.warnings.slice()})}restore(){const s=this._snapshots.pop();this.externals=s.externals,this.warnings=s.warnings}commit(){this._snapshots.pop()}},n.entry=function(s,c,a){const{tracer:o,cleanup:h}=n.tracer(c,a),g=a.debug?[]:null,v=c._ids._schemaChain?new Map:null,k=new n.Mainstay(o,g,v),w=c._ids._schemaChain?[{schema:c}]:null,d=new i([],[],{mainstay:k,schemas:w}),y=b.validate(s,c,d,a);h&&c.$_root.untrace();const j=l.process(y.errors,s,a);return{value:y.value,error:j,mainstay:k}},n.tracer=function(s,c){return s.$_root._tracer?{tracer:s.$_root._tracer._register(s)}:c.debug?(r(s.$_root.trace,"Debug mode not supported"),{tracer:s.$_root.trace()._register(s),cleanup:!0}):{tracer:n.ignore}},b.validate=function(s,c,a,o,h={}){if(c.$_terms.whens&&(c=c._generate(s,a,o).schema),c._preferences&&(o=n.prefs(c,o)),c._cache&&o.cache){const j=c._cache.get(s);if(a.mainstay.tracer.debug(a,"validate","cached",!!j),j)return j}const g=(j,S,O)=>c.$_createError(j,s,S,O||a,o),v={original:s,prefs:o,schema:c,state:a,error:g,errorsArray:n.errorsArray,warn:(j,S,O)=>a.mainstay.warnings.push(g(j,S,O)),message:(j,S)=>c.$_createError("custom",s,S,a,o,{messages:j})};a.mainstay.tracer.entry(c,a);const k=c._definition;if(k.prepare&&s!==void 0&&o.convert){const j=k.prepare(s,v);if(j){if(a.mainstay.tracer.value(a,"prepare",s,j.value),j.errors)return n.finalize(j.value,[].concat(j.errors),v);s=j.value}}if(k.coerce&&s!==void 0&&o.convert&&(!k.coerce.from||k.coerce.from.includes(typeof s))){const j=k.coerce.method(s,v);if(j){if(a.mainstay.tracer.value(a,"coerced",s,j.value),j.errors)return n.finalize(j.value,[].concat(j.errors),v);s=j.value}}const w=c._flags.empty;w&&w.$_match(n.trim(s,c),a.nest(w),t.defaults)&&(a.mainstay.tracer.value(a,"empty",s,void 0),s=void 0);const d=h.presence||c._flags.presence||(c._flags._endedSwitch?null:o.presence);if(s===void 0){if(d==="forbidden")return n.finalize(s,null,v);if(d==="required")return n.finalize(s,[c.$_createError("any.required",s,null,a,o)],v);if(d==="optional"){if(c._flags.default!==t.symbols.deepDefault)return n.finalize(s,null,v);a.mainstay.tracer.value(a,"default",s,{}),s={}}}else if(d==="forbidden")return n.finalize(s,[c.$_createError("any.unknown",s,null,a,o)],v);const y=[];if(c._valids){const j=c._valids.get(s,a,o,c._flags.insensitive);if(j)return o.convert&&(a.mainstay.tracer.value(a,"valids",s,j.value),s=j.value),a.mainstay.tracer.filter(c,a,"valid",j),n.finalize(s,null,v);if(c._flags.only){const S=c.$_createError("any.only",s,{valids:c._valids.values({display:!0})},a,o);if(o.abortEarly)return n.finalize(s,[S],v);y.push(S)}}if(c._invalids){const j=c._invalids.get(s,a,o,c._flags.insensitive);if(j){a.mainstay.tracer.filter(c,a,"invalid",j);const S=c.$_createError("any.invalid",s,{invalids:c._invalids.values({display:!0})},a,o);if(o.abortEarly)return n.finalize(s,[S],v);y.push(S)}}if(k.validate){const j=k.validate(s,v);if(j&&(a.mainstay.tracer.value(a,"base",s,j.value),s=j.value,j.errors)){if(!Array.isArray(j.errors))return y.push(j.errors),n.finalize(s,y,v);if(j.errors.length)return y.push(...j.errors),n.finalize(s,y,v)}}return c._rules.length?n.rules(s,y,v):n.finalize(s,y,v)},n.rules=function(s,c,a){const{schema:o,state:h,prefs:g}=a;for(const v of o._rules){const k=o._definition.rules[v.method];if(k.convert&&g.convert){h.mainstay.tracer.log(o,h,"rule",v.name,"full");continue}let w,d=v.args;if(v._resolve.length){d=Object.assign({},d);for(const j of v._resolve){const S=k.argsByName.get(j),O=d[j].resolve(s,h,g),P=S.normalize?S.normalize(O):O,D=t.validateArg(P,null,S);if(D){w=o.$_createError("any.ref",O,{arg:j,ref:d[j],reason:D},h,g);break}d[j]=P}}w=w||k.validate(s,a,d,v);const y=n.rule(w,v);if(y.errors){if(h.mainstay.tracer.log(o,h,"rule",v.name,"error"),v.warn){h.mainstay.warnings.push(...y.errors);continue}if(g.abortEarly)return n.finalize(s,y.errors,a);c.push(...y.errors)}else h.mainstay.tracer.log(o,h,"rule",v.name,"pass"),h.mainstay.tracer.value(h,"rule",s,y.value,v.name),s=y.value}return n.finalize(s,c,a)},n.rule=function(s,c){return s instanceof l.Report?(n.error(s,c),{errors:[s],value:null}):Array.isArray(s)&&s[t.symbols.errors]?(s.forEach(a=>n.error(a,c)),{errors:s,value:null}):{errors:null,value:s}},n.error=function(s,c){return c.message&&s._setTemplate(c.message),s},n.finalize=function(s,c,a){c=c||[];const{schema:o,state:h,prefs:g}=a;if(c.length){const k=n.default("failover",void 0,c,a);k!==void 0&&(h.mainstay.tracer.value(h,"failover",s,k),s=k,c=[])}if(c.length&&o._flags.error)if(typeof o._flags.error=="function"){c=o._flags.error(c),Array.isArray(c)||(c=[c]);for(const k of c)r(k instanceof Error||k instanceof l.Report,"error() must return an Error object")}else c=[o._flags.error];if(s===void 0){const k=n.default("default",s,c,a);h.mainstay.tracer.value(h,"default",s,k),s=k}if(o._flags.cast&&s!==void 0){const k=o._definition.cast[o._flags.cast];if(k.from(s)){const w=k.to(s,a);h.mainstay.tracer.value(h,"cast",s,w,o._flags.cast),s=w}}if(o.$_terms.externals&&g.externals&&g._externals!==!1)for(const{method:k}of o.$_terms.externals)h.mainstay.externals.push({method:k,schema:o,state:h,label:l.label(o._flags,h,g)});const v={value:s,errors:c.length?c:null};return o._flags.result&&(v.value=o._flags.result==="strip"?void 0:a.original,h.mainstay.tracer.value(h,o._flags.result,s,v.value),h.shadow(s,o._flags.result)),o._cache&&g.cache!==!1&&!o._refs.length&&o._cache.set(a.original,v),s===void 0||v.errors||o._flags.artifact===void 0||(h.mainstay.artifacts=h.mainstay.artifacts||new Map,h.mainstay.artifacts.has(o._flags.artifact)||h.mainstay.artifacts.set(o._flags.artifact,[]),h.mainstay.artifacts.get(o._flags.artifact).push(h.path)),v},n.prefs=function(s,c){const a=c===t.defaults;return a&&s._preferences[t.symbols.prefs]?s._preferences[t.symbols.prefs]:(c=t.preferences(c,s._preferences),a&&(s._preferences[t.symbols.prefs]=c),c)},n.default=function(s,c,a,o){const{schema:h,state:g,prefs:v}=o,k=h._flags[s];if(v.noDefaults||k===void 0)return c;if(g.mainstay.tracer.log(h,g,"rule",s,"full"),!k)return k;if(typeof k=="function"){const w=k.length?[p(g.ancestors[0]),o]:[];try{return k(...w)}catch(d){return void a.push(h.$_createError(`any.${s}`,null,{error:d},g,v))}}return typeof k!="object"?k:k[t.symbols.literal]?k.literal:t.isResolvable(k)?k.resolve(c,g,v):p(k)},n.trim=function(s,c){if(typeof s!="string")return s;const a=c.$_getRule("trim");return a&&a.args.enabled?s.trim():s},n.ignore={active:!1,debug:f,entry:f,filter:f,log:f,resolve:f,value:f},n.errorsArray=function(){const s=[];return s[t.symbols.errors]=!0,s}},2036:(_,b,m)=>{const r=m(375),p=m(9474),f=m(8160),u={};_.exports=u.Values=class{constructor(t,l){this._values=new Set(t),this._refs=new Set(l),this._lowercase=u.lowercases(t),this._override=!1}get length(){return this._values.size+this._refs.size}add(t,l){f.isResolvable(t)?this._refs.has(t)||(this._refs.add(t),l&&l.register(t)):this.has(t,null,null,!1)||(this._values.add(t),typeof t=="string"&&this._lowercase.set(t.toLowerCase(),t))}static merge(t,l,i){if(t=t||new u.Values,l){if(l._override)return l.clone();for(const n of[...l._values,...l._refs])t.add(n)}if(i)for(const n of[...i._values,...i._refs])t.remove(n);return t.length?t:null}remove(t){f.isResolvable(t)?this._refs.delete(t):(this._values.delete(t),typeof t=="string"&&this._lowercase.delete(t.toLowerCase()))}has(t,l,i,n){return!!this.get(t,l,i,n)}get(t,l,i,n){if(!this.length)return!1;if(this._values.has(t))return{value:t};if(typeof t=="string"&&t&&n){const s=this._lowercase.get(t.toLowerCase());if(s)return{value:s}}if(!this._refs.size&&typeof t!="object")return!1;if(typeof t=="object"){for(const s of this._values)if(p(s,t))return{value:s}}if(l)for(const s of this._refs){const c=s.resolve(t,l,i,null,{in:!0});if(c===void 0)continue;const a=s.in&&typeof c=="object"?Array.isArray(c)?c:Object.keys(c):[c];for(const o of a)if(typeof o==typeof t){if(n&&t&&typeof t=="string"){if(o.toLowerCase()===t.toLowerCase())return{value:o,ref:s}}else if(p(o,t))return{value:o,ref:s}}}return!1}override(){this._override=!0}values(t){if(t&&t.display){const l=[];for(const i of[...this._values,...this._refs])i!==void 0&&l.push(i);return l}return Array.from([...this._values,...this._refs])}clone(){const t=new u.Values(this._values,this._refs);return t._override=this._override,t}concat(t){r(!t._override,"Cannot concat override set of values");const l=new u.Values([...this._values,...t._values],[...this._refs,...t._refs]);return l._override=this._override,l}describe(){const t=[];this._override&&t.push({override:!0});for(const l of this._values.values())t.push(l&&typeof l=="object"?{value:l}:l);for(const l of this._refs.values())t.push(l.describe());return t}},u.Values.prototype[f.symbols.values]=!0,u.Values.prototype.slice=u.Values.prototype.clone,u.lowercases=function(t){const l=new Map;if(t)for(const i of t)typeof i=="string"&&l.set(i.toLowerCase(),i);return l}},978:(_,b,m)=>{const r=m(375),p=m(8571),f=m(1687),u=m(9621),t={};_.exports=function(l,i,n={}){if(r(l&&typeof l=="object","Invalid defaults value: must be an object"),r(!i||i===!0||typeof i=="object","Invalid source value: must be true, falsy or an object"),r(typeof n=="object","Invalid options: must be an object"),!i)return null;if(n.shallow)return t.applyToDefaultsWithShallow(l,i,n);const s=p(l);if(i===!0)return s;const c=n.nullOverride!==void 0&&n.nullOverride;return f(s,i,{nullOverride:c,mergeArrays:!1})},t.applyToDefaultsWithShallow=function(l,i,n){const s=n.shallow;r(Array.isArray(s),"Invalid keys");const c=new Map,a=i===!0?null:new Set;for(let g of s){g=Array.isArray(g)?g:g.split(".");const v=u(l,g);v&&typeof v=="object"?c.set(v,a&&u(i,g)||v):a&&a.add(g)}const o=p(l,{},c);if(!a)return o;for(const g of a)t.reachCopy(o,i,g);const h=n.nullOverride!==void 0&&n.nullOverride;return f(o,i,{nullOverride:h,mergeArrays:!1})},t.reachCopy=function(l,i,n){for(const a of n){if(!(a in i))return;const o=i[a];if(typeof o!="object"||o===null)return;i=o}const s=i;let c=l;for(let a=0;a<n.length-1;++a){const o=n[a];typeof c[o]!="object"&&(c[o]={}),c=c[o]}c[n[n.length-1]]=s}},375:(_,b,m)=>{const r=m(7916);_.exports=function(p,...f){if(!p)throw f.length===1&&f[0]instanceof Error?f[0]:new r(f)}},8571:(_,b,m)=>{const r=m(9621),p=m(4277),f=m(7043),u={needsProtoHack:new Set([p.set,p.map,p.weakSet,p.weakMap])};_.exports=u.clone=function(t,l={},i=null){if(typeof t!="object"||t===null)return t;let n=u.clone,s=i;if(l.shallow){if(l.shallow!==!0)return u.cloneWithShallow(t,l);n=h=>h}else if(s){const h=s.get(t);if(h)return h}else s=new Map;const c=p.getInternalProto(t);if(c===p.buffer)return!1;if(c===p.date)return new Date(t.getTime());if(c===p.regex)return new RegExp(t);const a=u.base(t,c,l);if(a===t)return t;if(s&&s.set(t,a),c===p.set)for(const h of t)a.add(n(h,l,s));else if(c===p.map)for(const[h,g]of t)a.set(h,n(g,l,s));const o=f.keys(t,l);for(const h of o){if(h==="__proto__")continue;if(c===p.array&&h==="length"){a.length=t.length;continue}const g=Object.getOwnPropertyDescriptor(t,h);g?g.get||g.set?Object.defineProperty(a,h,g):g.enumerable?a[h]=n(t[h],l,s):Object.defineProperty(a,h,{enumerable:!1,writable:!0,configurable:!0,value:n(t[h],l,s)}):Object.defineProperty(a,h,{enumerable:!0,writable:!0,configurable:!0,value:n(t[h],l,s)})}return a},u.cloneWithShallow=function(t,l){const i=l.shallow;(l=Object.assign({},l)).shallow=!1;const n=new Map;for(const s of i){const c=r(t,s);typeof c!="object"&&typeof c!="function"||n.set(c,c)}return u.clone(t,l,n)},u.base=function(t,l,i){if(i.prototype===!1)return u.needsProtoHack.has(l)?new l.constructor:l===p.array?[]:{};const n=Object.getPrototypeOf(t);if(n&&n.isImmutable)return t;if(l===p.array){const s=[];return n!==l&&Object.setPrototypeOf(s,n),s}if(u.needsProtoHack.has(l)){const s=new n.constructor;return n!==l&&Object.setPrototypeOf(s,n),s}return Object.create(n)}},9474:(_,b,m)=>{const r=m(4277),p={mismatched:null};_.exports=function(f,u,t){return t=Object.assign({prototype:!0},t),!!p.isDeepEqual(f,u,t,[])},p.isDeepEqual=function(f,u,t,l){if(f===u)return f!==0||1/f==1/u;const i=typeof f;if(i!==typeof u||f===null||u===null)return!1;if(i==="function"){if(!t.deepFunction||f.toString()!==u.toString())return!1}else if(i!=="object")return f!=f&&u!=u;const n=p.getSharedType(f,u,!!t.prototype);switch(n){case r.buffer:return!1;case r.promise:return f===u;case r.regex:return f.toString()===u.toString();case p.mismatched:return!1}for(let s=l.length-1;s>=0;--s)if(l[s].isSame(f,u))return!0;l.push(new p.SeenEntry(f,u));try{return!!p.isDeepEqualObj(n,f,u,t,l)}finally{l.pop()}},p.getSharedType=function(f,u,t){if(t)return Object.getPrototypeOf(f)!==Object.getPrototypeOf(u)?p.mismatched:r.getInternalProto(f);const l=r.getInternalProto(f);return l!==r.getInternalProto(u)?p.mismatched:l},p.valueOf=function(f){const u=f.valueOf;if(u===void 0)return f;try{return u.call(f)}catch(t){return t}},p.hasOwnEnumerableProperty=function(f,u){return Object.prototype.propertyIsEnumerable.call(f,u)},p.isSetSimpleEqual=function(f,u){for(const t of Set.prototype.values.call(f))if(!Set.prototype.has.call(u,t))return!1;return!0},p.isDeepEqualObj=function(f,u,t,l,i){const{isDeepEqual:n,valueOf:s,hasOwnEnumerableProperty:c}=p,{keys:a,getOwnPropertySymbols:o}=Object;if(f===r.array){if(!l.part){if(u.length!==t.length)return!1;for(let w=0;w<u.length;++w)if(!n(u[w],t[w],l,i))return!1;return!0}for(const w of u)for(const d of t)if(n(w,d,l,i))return!0}else if(f===r.set){if(u.size!==t.size)return!1;if(!p.isSetSimpleEqual(u,t)){const w=new Set(Set.prototype.values.call(t));for(const d of Set.prototype.values.call(u)){if(w.delete(d))continue;let y=!1;for(const j of w)if(n(d,j,l,i)){w.delete(j),y=!0;break}if(!y)return!1}}}else if(f===r.map){if(u.size!==t.size)return!1;for(const[w,d]of Map.prototype.entries.call(u))if(d===void 0&&!Map.prototype.has.call(t,w)||!n(d,Map.prototype.get.call(t,w),l,i))return!1}else if(f===r.error&&(u.name!==t.name||u.message!==t.message))return!1;const h=s(u),g=s(t);if((u!==h||t!==g)&&!n(h,g,l,i))return!1;const v=a(u);if(!l.part&&v.length!==a(t).length&&!l.skip)return!1;let k=0;for(const w of v)if(l.skip&&l.skip.includes(w))t[w]===void 0&&++k;else if(!c(t,w)||!n(u[w],t[w],l,i))return!1;if(!l.part&&v.length-k!==a(t).length)return!1;if(l.symbols!==!1){const w=o(u),d=new Set(o(t));for(const y of w){if(!l.skip||!l.skip.includes(y)){if(c(u,y)){if(!c(t,y)||!n(u[y],t[y],l,i))return!1}else if(c(t,y))return!1}d.delete(y)}for(const y of d)if(c(t,y))return!1}return!0},p.SeenEntry=class{constructor(f,u){this.obj=f,this.ref=u}isSame(f,u){return this.obj===f&&this.ref===u}}},7916:(_,b,m)=>{const r=m(8761);_.exports=class extends Error{constructor(p){super(p.filter(f=>f!=="").map(f=>typeof f=="string"?f:f instanceof Error?f.message:r(f)).join(" ")||"Unknown error"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,b.assert)}}},5277:_=>{const b={};_.exports=function(m){if(!m)return"";let r="";for(let p=0;p<m.length;++p){const f=m.charCodeAt(p);b.isSafe(f)?r+=m[p]:r+=b.escapeHtmlChar(f)}return r},b.escapeHtmlChar=function(m){return b.namedHtml.get(m)||(m>=256?"&#"+m+";":`&#x${m.toString(16).padStart(2,"0")};`)},b.isSafe=function(m){return b.safeCharCodes.has(m)},b.namedHtml=new Map([[38,"&amp;"],[60,"&lt;"],[62,"&gt;"],[34,"&quot;"],[160,"&nbsp;"],[162,"&cent;"],[163,"&pound;"],[164,"&curren;"],[169,"&copy;"],[174,"&reg;"]]),b.safeCharCodes=function(){const m=new Set;for(let r=32;r<123;++r)(r>=97||r>=65&&r<=90||r>=48&&r<=57||r===32||r===46||r===44||r===45||r===58||r===95)&&m.add(r);return m}()},6064:_=>{_.exports=function(b){return b.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g,"\\$&")}},738:_=>{_.exports=function(){}},1687:(_,b,m)=>{const r=m(375),p=m(8571),f=m(7043),u={};_.exports=u.merge=function(t,l,i){if(r(t&&typeof t=="object","Invalid target value: must be an object"),r(l==null||typeof l=="object","Invalid source value: must be null, undefined, or an object"),!l)return t;if(i=Object.assign({nullOverride:!0,mergeArrays:!0},i),Array.isArray(l)){r(Array.isArray(t),"Cannot merge array onto an object"),i.mergeArrays||(t.length=0);for(let s=0;s<l.length;++s)t.push(p(l[s],{symbols:i.symbols}));return t}const n=f.keys(l,i);for(let s=0;s<n.length;++s){const c=n[s];if(c==="__proto__"||!Object.prototype.propertyIsEnumerable.call(l,c))continue;const a=l[c];if(a&&typeof a=="object"){if(t[c]===a)continue;!t[c]||typeof t[c]!="object"||Array.isArray(t[c])!==Array.isArray(a)||a instanceof Date||a instanceof RegExp?t[c]=p(a,{symbols:i.symbols}):u.merge(t[c],a,i)}else(a!=null||i.nullOverride)&&(t[c]=a)}return t}},9621:(_,b,m)=>{const r=m(375),p={};_.exports=function(f,u,t){if(u===!1||u==null)return f;typeof(t=t||{})=="string"&&(t={separator:t});const l=Array.isArray(u);r(!l||!t.separator,"Separator option is not valid for array-based chain");const i=l?u:u.split(t.separator||".");let n=f;for(let s=0;s<i.length;++s){let c=i[s];const a=t.iterables&&p.iterables(n);if(Array.isArray(n)||a==="set"){const o=Number(c);Number.isInteger(o)&&(c=o<0?n.length+o:o)}if(!n||typeof n=="function"&&t.functions===!1||!a&&n[c]===void 0){r(!t.strict||s+1===i.length,"Missing segment",c,"in reach path ",u),r(typeof n=="object"||t.functions===!0||typeof n!="function","Invalid segment",c,"in reach path ",u),n=t.default;break}n=a?a==="set"?[...n][c]:n.get(c):n[c]}return n},p.iterables=function(f){return f instanceof Set?"set":f instanceof Map?"map":void 0}},8761:_=>{_.exports=function(...b){try{return JSON.stringify(...b)}catch(m){return"[Cannot display object: "+m.message+"]"}}},4277:(_,b)=>{const m={};b=_.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},m.typeMap=new Map([["[object Error]",b.error],["[object Map]",b.map],["[object Promise]",b.promise],["[object Set]",b.set],["[object WeakMap]",b.weakMap],["[object WeakSet]",b.weakSet]]),b.getInternalProto=function(r){if(Array.isArray(r))return b.array;if(r instanceof Date)return b.date;if(r instanceof RegExp)return b.regex;if(r instanceof Error)return b.error;const p=Object.prototype.toString.call(r);return m.typeMap.get(p)||b.generic}},7043:(_,b)=>{b.keys=function(m,r={}){return r.symbols!==!1?Reflect.ownKeys(m):Object.getOwnPropertyNames(m)}},3652:(_,b,m)=>{const r=m(375),p={};b.Sorter=class{constructor(){this._items=[],this.nodes=[]}add(f,u){const t=[].concat((u=u||{}).before||[]),l=[].concat(u.after||[]),i=u.group||"?",n=u.sort||0;r(!t.includes(i),`Item cannot come before itself: ${i}`),r(!t.includes("?"),"Item cannot come before unassociated items"),r(!l.includes(i),`Item cannot come after itself: ${i}`),r(!l.includes("?"),"Item cannot come after unassociated items"),Array.isArray(f)||(f=[f]);for(const s of f){const c={seq:this._items.length,sort:n,before:t,after:l,group:i,node:s};this._items.push(c)}if(!u.manual){const s=this._sort();r(s,"item",i!=="?"?`added into group ${i}`:"","created a dependencies error")}return this.nodes}merge(f){Array.isArray(f)||(f=[f]);for(const t of f)if(t)for(const l of t._items)this._items.push(Object.assign({},l));this._items.sort(p.mergeSort);for(let t=0;t<this._items.length;++t)this._items[t].seq=t;const u=this._sort();return r(u,"merge created a dependencies error"),this.nodes}sort(){const f=this._sort();return r(f,"sort created a dependencies error"),this.nodes}_sort(){const f={},u=Object.create(null),t=Object.create(null);for(const c of this._items){const a=c.seq,o=c.group;t[o]=t[o]||[],t[o].push(a),f[a]=c.before;for(const h of c.after)u[h]=u[h]||[],u[h].push(a)}for(const c in f){const a=[];for(const o in f[c]){const h=f[c][o];t[h]=t[h]||[],a.push(...t[h])}f[c]=a}for(const c in u)if(t[c])for(const a of t[c])f[a].push(...u[c]);const l={};for(const c in f){const a=f[c];for(const o of a)l[o]=l[o]||[],l[o].push(c)}const i={},n=[];for(let c=0;c<this._items.length;++c){let a=c;if(l[c]){a=null;for(let o=0;o<this._items.length;++o){if(i[o]===!0)continue;l[o]||(l[o]=[]);const h=l[o].length;let g=0;for(let v=0;v<h;++v)i[l[o][v]]&&++g;if(g===h){a=o;break}}}a!==null&&(i[a]=!0,n.push(a))}if(n.length!==this._items.length)return!1;const s={};for(const c of this._items)s[c.seq]=c;this._items=[],this.nodes=[];for(const c of n){const a=s[c];this.nodes.push(a.node),this._items.push(a)}return!0}},p.mergeSort=(f,u)=>f.sort===u.sort?0:f.sort<u.sort?-1:1},5380:(_,b,m)=>{const r=m(443),p=m(2178),f={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:r.URL||URL};b.analyze=function(u,t={}){if(!u)return p.code("DOMAIN_NON_EMPTY_STRING");if(typeof u!="string")throw new Error("Invalid input: domain must be a string");if(u.length>256)return p.code("DOMAIN_TOO_LONG");if(f.nonAsciiRx.test(u)){if(t.allowUnicode===!1)return p.code("DOMAIN_INVALID_UNICODE_CHARS");u=u.normalize("NFC")}if(f.domainControlRx.test(u))return p.code("DOMAIN_INVALID_CHARS");u=f.punycode(u),t.allowFullyQualified&&u[u.length-1]==="."&&(u=u.slice(0,-1));const l=t.minDomainSegments||f.minDomainSegments,i=u.split(".");if(i.length<l)return p.code("DOMAIN_SEGMENTS_COUNT");if(t.maxDomainSegments&&i.length>t.maxDomainSegments)return p.code("DOMAIN_SEGMENTS_COUNT_MAX");const n=t.tlds;if(n){const s=i[i.length-1].toLowerCase();if(n.deny&&n.deny.has(s)||n.allow&&!n.allow.has(s))return p.code("DOMAIN_FORBIDDEN_TLDS")}for(let s=0;s<i.length;++s){const c=i[s];if(!c.length)return p.code("DOMAIN_EMPTY_SEGMENT");if(c.length>63)return p.code("DOMAIN_LONG_SEGMENT");if(s<i.length-1){if(!f.domainSegmentRx.test(c))return p.code("DOMAIN_INVALID_CHARS")}else if(!f.tldSegmentRx.test(c))return p.code("DOMAIN_INVALID_TLDS_CHARS")}return null},b.isValid=function(u,t){return!b.analyze(u,t)},f.punycode=function(u){u.includes("%")&&(u=u.replace(/%/g,"%25"));try{return new f.URL(`http://${u}`).host}catch{return u}}},1745:(_,b,m)=>{const r=m(9848),p=m(5380),f=m(2178),u={nonAsciiRx:/[^\x00-\x7f]/,encoder:new(r.TextEncoder||TextEncoder)};b.analyze=function(t,l){return u.email(t,l)},b.isValid=function(t,l){return!u.email(t,l)},u.email=function(t,l={}){if(typeof t!="string")throw new Error("Invalid input: email must be a string");if(!t)return f.code("EMPTY_STRING");const i=!u.nonAsciiRx.test(t);if(!i){if(l.allowUnicode===!1)return f.code("FORBIDDEN_UNICODE");t=t.normalize("NFC")}const n=t.split("@");if(n.length!==2)return n.length>2?f.code("MULTIPLE_AT_CHAR"):f.code("MISSING_AT_CHAR");const[s,c]=n;if(!s)return f.code("EMPTY_LOCAL");if(!l.ignoreLength){if(t.length>254)return f.code("ADDRESS_TOO_LONG");if(u.encoder.encode(s).length>64)return f.code("LOCAL_TOO_LONG")}return u.local(s,i)||p.analyze(c,l)},u.local=function(t,l){const i=t.split(".");for(const n of i){if(!n.length)return f.code("EMPTY_LOCAL_SEGMENT");if(l){if(!u.atextRx.test(n))return f.code("INVALID_LOCAL_CHARS")}else for(const s of n){if(u.atextRx.test(s))continue;const c=u.binary(s);if(!u.atomRx.test(c))return f.code("INVALID_LOCAL_CHARS")}}},u.binary=function(t){return Array.from(u.encoder.encode(t)).map(l=>String.fromCharCode(l)).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:(_,b)=>{b.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"},b.code=function(m){return{code:m,error:b.codes[m]}}},9959:(_,b,m)=>{const r=m(375),p=m(5752);b.regex=function(f={}){r(f.cidr===void 0||typeof f.cidr=="string","options.cidr must be a string");const u=f.cidr?f.cidr.toLowerCase():"optional";r(["required","optional","forbidden"].includes(u),"options.cidr must be one of required, optional, forbidden"),r(f.version===void 0||typeof f.version=="string"||Array.isArray(f.version),"options.version must be a string or an array of string");let t=f.version||["ipv4","ipv6","ipvfuture"];Array.isArray(t)||(t=[t]),r(t.length>=1,"options.version must have at least 1 version specified");for(let n=0;n<t.length;++n)r(typeof t[n]=="string","options.version must only contain strings"),t[n]=t[n].toLowerCase(),r(["ipv4","ipv6","ipvfuture"].includes(t[n]),"options.version contains unknown version "+t[n]+" - must be one of ipv4, ipv6, ipvfuture");t=Array.from(new Set(t));const l=`(?:${t.map(n=>{if(u==="forbidden")return p.ip[n];const s=`\\/${n==="ipv4"?p.ip.v4Cidr:p.ip.v6Cidr}`;return u==="required"?`${p.ip[n]}${s}`:`${p.ip[n]}(?:${s})?`}).join("|")})`,i=new RegExp(`^${l}$`);return{cidr:u,versions:t,regex:i,raw:l}}},5752:(_,b,m)=>{const r=m(375),p=m(6064),f={generate:function(){const u={},t="\\dA-Fa-f",l="["+t+"]",i="\\w-\\.~",n="!\\$&'\\(\\)\\*\\+,;=",s="%"+t,c=i+s+n+":@",a="["+c+"]",o="(?:0{0,2}\\d|0?[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])";u.ipv4address="(?:"+o+"\\.){3}"+o;const h=l+"{1,4}",g="(?:"+h+":"+h+"|"+u.ipv4address+")",v="(?:"+h+":){6}"+g,k="::(?:"+h+":){5}"+g,w="(?:"+h+")?::(?:"+h+":){4}"+g,d="(?:(?:"+h+":){0,1}"+h+")?::(?:"+h+":){3}"+g,y="(?:(?:"+h+":){0,2}"+h+")?::(?:"+h+":){2}"+g,j="(?:(?:"+h+":){0,3}"+h+")?::"+h+":"+g,S="(?:(?:"+h+":){0,4}"+h+")?::"+g,O="(?:(?:"+h+":){0,5}"+h+")?::"+h,P="(?:(?:"+h+":){0,6}"+h+")?::";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="(?:"+v+"|"+k+"|"+w+"|"+d+"|"+y+"|"+j+"|"+S+"|"+O+"|"+P+")",u.ipvFuture="v"+l+"+\\.["+i+n+":]+",u.scheme="[a-zA-Z][a-zA-Z\\d+-\\.]*",u.schemeRegex=new RegExp(u.scheme);const D="["+i+s+n+":]*",I="["+i+s+n+"]{1,255}",B="(?:\\[(?:"+u.ipv6address+"|"+u.ipvFuture+")\\]|"+u.ipv4address+"|"+I+")",N="(?:"+D+"@)?"+B+"(?::\\d*)?",M="(?:"+D+"@)?("+B+")(?::\\d*)?",q=a+"*",H=a+"+",Z="(?:\\/"+q+")*",oe="\\/(?:"+H+Z+")?",me=H+Z,ve="["+i+s+n+"@]+"+Z,De="(?:\\/\\/\\/"+q+Z+")";return u.hierPart="(?:(?:\\/\\/"+N+Z+")|"+oe+"|"+me+"|"+De+")",u.hierPartCapture="(?:(?:\\/\\/"+M+Z+")|"+oe+"|"+me+")",u.relativeRef="(?:(?:\\/\\/"+N+Z+")|"+oe+"|"+ve+"|)",u.relativeRefCapture="(?:(?:\\/\\/"+M+Z+")|"+oe+"|"+ve+"|)",u.query="["+c+"\\/\\?]*(?=#|$)",u.queryWithSquareBrackets="["+c+"\\[\\]\\/\\?]*(?=#|$)",u.fragment="["+c+"\\/\\?]*",u}};f.rfc3986=f.generate(),b.ip={v4Cidr:f.rfc3986.ipv4Cidr,v6Cidr:f.rfc3986.ipv6Cidr,ipv4:f.rfc3986.ipv4address,ipv6:f.rfc3986.ipv6address,ipvfuture:f.rfc3986.ipvFuture},f.createRegex=function(u){const t=f.rfc3986,l="(?:\\?"+(u.allowQuerySquareBrackets?t.queryWithSquareBrackets:t.query)+")?(?:#"+t.fragment+")?",i=u.domain?t.relativeRefCapture:t.relativeRef;if(u.relativeOnly)return f.wrap(i+l);let n="";if(u.scheme){r(u.scheme instanceof RegExp||typeof u.scheme=="string"||Array.isArray(u.scheme),"scheme must be a RegExp, String, or Array");const a=[].concat(u.scheme);r(a.length>=1,"scheme must have at least 1 scheme specified");const o=[];for(let h=0;h<a.length;++h){const g=a[h];r(g instanceof RegExp||typeof g=="string","scheme at position "+h+" must be a RegExp or String"),g instanceof RegExp?o.push(g.source.toString()):(r(t.schemeRegex.test(g),"scheme at position "+h+" must be a valid scheme"),o.push(p(g)))}n=o.join("|")}const s="(?:"+(n?"(?:"+n+")":t.scheme)+":"+(u.domain?t.hierPartCapture:t.hierPart)+")",c=u.allowRelative?"(?:"+s+"|"+i+")":s;return f.wrap(c+l,n)},f.wrap=function(u,t){return{raw:u=`(?=.)(?!https?:/(?:$|[^/]))(?!https?:///)(?!https?:[^/])${u}`,regex:new RegExp(`^${u}$`),scheme:t}},f.uriRegex=f.createRegex({}),b.regex=function(u={}){return u.scheme||u.allowRelative||u.relativeOnly||u.allowQuerySquareBrackets||u.domain?f.createRegex(u):f.uriRegex}},1447:(_,b)=>{const m={operators:["!","^","*","/","%","+","-","<","<=",">",">=","==","!=","&&","||","??"],operatorCharacters:["!","^","*","/","%","+","-","<","=",">","&","|","?"],operatorsOrder:[["^"],["*","/","%"],["+","-"],["<","<=",">",">="],["==","!="],["&&"],["||","??"]],operatorsPrefix:["!","n"],literals:{'"':'"',"`":"`","'":"'","[":"]"},numberRx:/^(?:[0-9]*(\.[0-9]*)?){1}$/,tokenRx:/^[\w\$\#\.\@\:\{\}]+$/,symbol:Symbol("formula"),settings:Symbol("settings")};b.Parser=class{constructor(r,p={}){if(!p[m.settings]&&p.constants)for(const f in p.constants){const u=p.constants[f];if(u!==null&&!["boolean","number","string"].includes(typeof u))throw new Error(`Formula constant ${f} contains invalid ${typeof u} value type`)}this.settings=p[m.settings]?p:Object.assign({[m.settings]:!0,constants:{},functions:{}},p),this.single=null,this._parts=null,this._parse(r)}_parse(r){let p=[],f="",u=0,t=!1;const l=n=>{if(u)throw new Error("Formula missing closing parenthesis");const s=p.length?p[p.length-1]:null;if(t||f||n){if(s&&s.type==="reference"&&n===")")return s.type="function",s.value=this._subFormula(f,s.value),void(f="");if(n===")"){const c=new b.Parser(f,this.settings);p.push({type:"segment",value:c})}else if(t){if(t==="]")return p.push({type:"reference",value:f}),void(f="");p.push({type:"literal",value:f})}else if(m.operatorCharacters.includes(f))s&&s.type==="operator"&&m.operators.includes(s.value+f)?s.value+=f:p.push({type:"operator",value:f});else if(f.match(m.numberRx))p.push({type:"constant",value:parseFloat(f)});else if(this.settings.constants[f]!==void 0)p.push({type:"constant",value:this.settings.constants[f]});else{if(!f.match(m.tokenRx))throw new Error(`Formula contains invalid token: ${f}`);p.push({type:"reference",value:f})}f=""}};for(const n of r)t?n===t?(l(),t=!1):f+=n:u?n==="("?(f+=n,++u):n===")"?(--u,u?f+=n:l(n)):f+=n:n in m.literals?t=m.literals[n]:n==="("?(l(),++u):m.operatorCharacters.includes(n)?(l(),f=n,l()):n!==" "?f+=n:l();l(),p=p.map((n,s)=>n.type!=="operator"||n.value!=="-"||s&&p[s-1].type!=="operator"?n:{type:"operator",value:"n"});let i=!1;for(const n of p){if(n.type==="operator"){if(m.operatorsPrefix.includes(n.value))continue;if(!i)throw new Error("Formula contains an operator in invalid position");if(!m.operators.includes(n.value))throw new Error(`Formula contains an unknown operator ${n.value}`)}else if(i)throw new Error("Formula missing expected operator");i=!i}if(!i)throw new Error("Formula contains invalid trailing operator");p.length===1&&["reference","literal","constant"].includes(p[0].type)&&(this.single={type:p[0].type==="reference"?"reference":"value",value:p[0].value}),this._parts=p.map(n=>{if(n.type==="operator")return m.operatorsPrefix.includes(n.value)?n:n.value;if(n.type!=="reference")return n.value;if(this.settings.tokenRx&&!this.settings.tokenRx.test(n.value))throw new Error(`Formula contains invalid reference ${n.value}`);return this.settings.reference?this.settings.reference(n.value):m.reference(n.value)})}_subFormula(r,p){const f=this.settings.functions[p];if(typeof f!="function")throw new Error(`Formula contains unknown function ${p}`);let u=[];if(r){let t="",l=0,i=!1;const n=()=>{if(!t)throw new Error(`Formula contains function ${p} with invalid arguments ${r}`);u.push(t),t=""};for(let s=0;s<r.length;++s){const c=r[s];i?(t+=c,c===i&&(i=!1)):c in m.literals&&!l?(t+=c,i=m.literals[c]):c!==","||l?(t+=c,c==="("?++l:c===")"&&--l):n()}n()}return u=u.map(t=>new b.Parser(t,this.settings)),function(t){const l=[];for(const i of u)l.push(i.evaluate(t));return f.call(t,...l)}}evaluate(r){const p=this._parts.slice();for(let f=p.length-2;f>=0;--f){const u=p[f];if(u&&u.type==="operator"){const t=p[f+1];p.splice(f+1,1);const l=m.evaluate(t,r);p[f]=m.single(u.value,l)}}return m.operatorsOrder.forEach(f=>{for(let u=1;u<p.length-1;)if(f.includes(p[u])){const t=p[u],l=m.evaluate(p[u-1],r),i=m.evaluate(p[u+1],r);p.splice(u,2);const n=m.calculate(t,l,i);p[u-1]=n===0?0:n}else u+=2}),m.evaluate(p[0],r)}},b.Parser.prototype[m.symbol]=!0,m.reference=function(r){return function(p){return p&&p[r]!==void 0?p[r]:null}},m.evaluate=function(r,p){return r===null?null:typeof r=="function"?r(p):r[m.symbol]?r.evaluate(p):r},m.single=function(r,p){if(r==="!")return!p;const f=-p;return f===0?0:f},m.calculate=function(r,p,f){if(r==="??")return m.exists(p)?p:f;if(typeof p=="string"||typeof f=="string"){if(r==="+")return(p=m.exists(p)?p:"")+(m.exists(f)?f:"")}else switch(r){case"^":return Math.pow(p,f);case"*":return p*f;case"/":return p/f;case"%":return p%f;case"+":return p+f;case"-":return p-f}switch(r){case"<":return p<f;case"<=":return p<=f;case">":return p>f;case">=":return p>=f;case"==":return p===f;case"!=":return p!==f;case"&&":return p&&f;case"||":return p||f}return null},m.exists=function(r){return r!=null}},9926:()=>{},5688:()=>{},9708:()=>{},1152:()=>{},443:()=>{},9848:()=>{},5934:_=>{_.exports=JSON.parse('{"version":"17.13.3"}')}},R={},function _(b){var m=R[b];if(m!==void 0)return m.exports;var r=R[b]={exports:{}};return $[b](r,r.exports,_),r.exports}(5107);var $,R})}(Ge)),Ge.exports}var Ae={},Dt;function Rn(){if(Dt)return Ae;Dt=1;var x=Ae&&Ae.__importDefault||function(R){return R&&R.__esModule?R:{default:R}};Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.BNExtension=$;const C=x(sr());function $(R){return{type:"BN",base:R.any(),messages:{"bn.nan":"{{#label}} is not a big number","bn.max":'{{#label}} needs to be less than or equal to "{{#threshold}}"',"bn.min":'{{#label}} needs to be greater than or equal to "{{#threshold}}"',"bn.less":'{{#label}} needs to be less than "{{#threshold}}"',"bn.greater":'{{#label}} needs to be greater than "{{#threshold}}"',"bn.positive":"{{#label}} needs to be positive","bn.negative":"{{#label}} needs to be negative"},prepare(_,b){try{return{value:new C.default(_)}}catch{return{errors:b.error("bn.nan")}}},coerce(_){return{value:_.toString(10)}},validate(_){return{value:_}},rules:{gt:{args:[{name:"threshold",ref:!0,assert:_=>C.default.isBN(_),message:"must be a big number",normalize:_=>new C.default(_)},{name:"equal",assert:_=>typeof _=="boolean",message:"must be a boolean"}],validate(_,b,m){const r=new C.default(_);return m.equal&&r.lt(m.threshold)?b.error("bn.min",m):!m.equal&&r.lte(m.threshold)?b.error("bn.greater",m):_}},lt:{args:[{name:"threshold",ref:!0,assert:_=>C.default.isBN(_),message:"must be a big number",normalize:_=>new C.default(_)},{name:"equal",assert:_=>typeof _=="boolean",message:"must be a boolean"}],validate(_,b,m){const r=new C.default(_);return m.equal&&r.gt(m.threshold)?b.error("bn.max",m):!m.equal&&r.gte(m.threshold)?b.error("bn.less",m):_}},min:{alias:"gte",method(_){return this.$_addRule({name:"gt",args:{threshold:_,equal:!0}})}},max:{alias:"lte",method(_){return this.$_addRule({name:"lt",args:{threshold:_,equal:!0}})}},greater:{alias:"gt",method(_){return this.$_addRule({name:"gt",args:{threshold:_,equal:!1}})}},less:{alias:"lt",method(_){return this.$_addRule({name:"lt",args:{threshold:_,equal:!1}})}},positive:{method(){return this.$_addRule({name:"gt",args:{threshold:0,equal:!1}})}},negative:{method(){return this.$_addRule({name:"lt",args:{threshold:0,equal:!1}})}}}}}return Ae}var Oe={},Lt;function $n(){if(Lt)return Oe;Lt=1;var x=Oe&&Oe.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.DIDExtension=b;const C=x(rr),$=nr(),R=ar(),_={pk:Object.keys($.types.KeyType),hash:Object.keys($.types.HashType),role:Object.keys($.types.RoleType)};function b(m){return{type:"DID",base:m.string().trim(),messages:{"did.empty":'Expect {{#label}} to be non-empty string, got "{{#value}}"',"did.invalid":'Expect {{#label}} to be valid did, got "{{#value}}"',"did.wallet":'Expect wallet type of {{#label}} to be "{{#expected}}" wallet, got "{{#actual}}"',"did.pk":'Expect pk type of {{#label}} to be "{{#expected}}", got "{{#actual}}"',"did.hash":'Expect hash type of {{#label}} to be "{{#expected}}", got "{{#actual}}"',"did.role":'Expect role type of {{#label}} to be "{{#expected}}", got "{{#actual}}"',"did.prefix":'Expect prefix of {{#label}} to be "{{#expected}}"'},validate(r,p){return!r||typeof r!="string"?{errors:p.error("did.empty",{value:r})}:(0,R.isValid)(r)===!1?{errors:p.error("did.invalid",{value:r})}:{value:r}},rules:{type:{args:[{name:"key",ref:!0,assert:r=>Object.keys(_).includes(r),message:`must be one of ${Object.keys(_).join(", ")}`},{name:"expected",assert:r=>Object.keys(_).some(p=>_[p].includes(r)),message:"must be valid type"}],validate(r,p,f){const u=(0,R.toTypeInfoStr)(r);return f.key==="pk"&&u.pk!==f.expected?p.error("did.pk",{...f,actual:u.pk}):f.key==="hash"&&u.hash!==f.expected?p.error("did.hash",{...f,actual:u.hash}):f.key==="role"&&u.role!==f.expected?p.error("did.role",{...f,actual:u.role}):r}},pk:{method(r){return this.$_addRule({name:"type",args:{key:"pk",expected:r}})}},hash:{method(r){return this.$_addRule({name:"type",args:{key:"hash",expected:r}})}},role:{method(r){return this.$_addRule({name:"type",args:{key:"role",expected:r}})}},wallet:{method(r){return this.$_addRule({name:"wallet",args:{type:r}})},args:[{name:"type",ref:!0,assert:r=>["arcblock","ethereum","default","eth","passkey"].includes(r),message:"must be a string",normalize:r=>r.trim()}],validate(r,p,f={}){const u=(0,R.toTypeInfo)(r),t=(0,R.toTypeInfoStr)(r);return["ethereum","eth"].includes(f.type)&&(0,C.default)(u,R.DID_TYPE_ETHEREUM)===!1?p.error("did.wallet",{expected:f.type,actual:JSON.stringify(t)}):["arcblock","default"].includes(f.type)&&(0,C.default)(u,R.DID_TYPE_ARCBLOCK)===!1?p.error("did.wallet",{expected:f.type,actual:JSON.stringify(t)}):["passkey"].includes(f.type)&&(0,C.default)(u,R.DID_TYPE_PASSKEY)===!1?p.error("did.wallet",{expected:f.type,actual:JSON.stringify(t)}):r}},prefix:{method(r=""){return this.$_addRule({name:"prefix",args:{str:r}})},args:[{name:"str",ref:!0,assert:r=>["",R.DID_PREFIX].includes(r),message:"must be a string",normalize:r=>r.trim()}],validate(r,p,f={}){return f.str&&r.startsWith(f.str)===!1?p.error("did.prefix",{expected:f.str}):!f.str&&(0,R.toAddress)(r)!==r?p.error("did.prefix",{expected:f.str}):r}}}}}return Oe}var qt;function An(){return qt||(qt=1,function(x){var C=qe&&qe.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(x,"__esModule",{value:!0}),x.patterns=x.schemas=x.Joi=void 0;const $=C(Cn()),R=Rn(),_=$n();x.Joi=$.default.extend(_.DIDExtension).extend(R.BNExtension);const b=/^(0x)?([A-Fa-f0-9]{64})$/,m=x.Joi.object({genesisTime:x.Joi.date().iso().required().raw(),genesisTx:x.Joi.string().regex(b).required().allow(""),renaissanceTime:x.Joi.date().iso().required().raw(),renaissanceTx:x.Joi.string().regex(b).required().allow("")}),r=x.Joi.object({address:x.Joi.DID().prefix().role("ROLE_TOKEN").required(),value:x.Joi.BN().positive().required()}),p=x.Joi.object({name:x.Joi.string().min(1).max(256).required(),value:x.Joi.string().min(1).max(1024).required(),description:x.Joi.string().min(1).max(256).optional().allow(""),required:x.Joi.boolean().optional().default(!1)}),f=x.Joi.alternatives().try(x.Joi.DID().prefix().role("ROLE_ACCOUNT"),x.Joi.DID().prefix().role("ROLE_APPLICATION"),x.Joi.DID().prefix().role("ROLE_BLOCKLET"),x.Joi.DID().prefix().wallet("ethereum"),x.Joi.DID().prefix().wallet("passkey")),u=x.Joi.array().items(x.Joi.object({owner:f.required(),tokensList:x.Joi.array().items(r).default([]),assetsList:x.Joi.array().items(x.Joi.DID().prefix().role("ROLE_ASSET")).default([])})),t=x.Joi.array().items({signer:x.Joi.DID().prefix().required(),pk:x.Joi.any().required(),signature:x.Joi.any().required(),delegator:x.Joi.DID().prefix().valid("").optional(),data:x.Joi.any().optional()}),l=x.Joi.object({type:x.Joi.string().min(1).max(32).required(),contractAddress:x.Joi.DID().prefix().wallet("ethereum").required(),chainType:x.Joi.string().min(1).max(32).required(),chainName:x.Joi.string().min(1).max(32).required(),chainId:x.Joi.number().positive().required()}),i=x.Joi.object({type:x.Joi.string().valid("svg","url","uri").required(),content:x.Joi.string().when("type",{is:"uri",then:x.Joi.string().max(20480).dataUri().required()}).when("type",{is:"url",then:x.Joi.string().max(2048).uri({scheme:["http","https"]}).required()})}),n=x.Joi.object({id:x.Joi.string().max(2048).uri({scheme:["http","https"]}).required(),scope:x.Joi.string().valid("public","private").default("public")}),s=x.Joi.object({id:x.Joi.DID().prefix().required(),pk:x.Joi.string().required(),name:x.Joi.string().min(1).max(256).required()}),c={address:x.Joi.DID().prefix().role("ROLE_ASSET").required(),moniker:x.Joi.string().min(2).max(255).required(),data:x.Joi.any().required(),readonly:x.Joi.boolean().default(!1),transferrable:x.Joi.boolean().default(!1),ttl:x.Joi.number().min(0).default(0),parent:x.Joi.DID().prefix().optional().allow(""),issuer:x.Joi.DID().prefix().optional().allow(""),endpoint:n.optional().allow(null).default(null),display:i.optional().allow(null).default(null),tags:x.Joi.array().items(x.Joi.string().min(1).max(64)).max(4).optional()},a={address:x.Joi.DID().prefix().role("ROLE_FACTORY").required(),name:x.Joi.string().min(2).max(255).required(),description:x.Joi.string().min(2).max(255).required(),settlement:x.Joi.string().valid("instant","periodic").default("instant"),limit:x.Joi.number().integer().min(0).default(0),trustedIssuers:x.Joi.array().items(x.Joi.DID().prefix()).max(8).optional(),data:x.Joi.any().optional().allow(null).default(null),display:i.optional().allow(null).default(null),input:x.Joi.object({value:x.Joi.BN().positive().min("0").default("0"),tokens:x.Joi.array().items(r).max(8).optional(),assets:x.Joi.array().items(x.Joi.alternatives().try(x.Joi.DID().prefix().role("ROLE_ASSET"),x.Joi.DID().prefix().role("ROLE_FACTORY"))).max(8).optional(),variables:x.Joi.array().items(x.Joi.object({name:x.Joi.string().min(1).max(255).required(),description:x.Joi.string().max(255).optional().allow(""),required:x.Joi.boolean().required()})).optional()}),output:x.Joi.object({moniker:x.Joi.string().min(2).max(255).required(),data:x.Joi.any().required(),readonly:x.Joi.boolean().default(!1),transferrable:x.Joi.boolean().default(!1),ttl:x.Joi.number().min(0).default(0),parent:x.Joi.string().max(255).required(),issuer:x.Joi.string().max(255).required(),endpoint:n.optional(),display:i.optional(),tags:x.Joi.array().items(x.Joi.string().min(1).max(64)).max(4).optional()}),hooks:x.Joi.array().items(x.Joi.object({name:x.Joi.string().valid("mint","postMint","preMint").required(),type:x.Joi.string().valid("url","contract").required(),hook:x.Joi.string().min(1).max(4096).required(),compiled:x.Joi.array().items(x.Joi.object()).optional()})).optional()};x.schemas={context:m,tokenInput:r,multiInput:u,multiSig:t,foreignToken:l,variableInput:p,nftDisplay:i,nftEndpoint:n,nftIssuer:s,tokenHolder:f,assetProps:c,assetSchema:x.Joi.object(c).options({stripUnknown:!0,noDefaults:!1}),factoryProps:a,factorySchema:x.Joi.object(a).options({stripUnknown:!0,noDefaults:!1})},x.patterns={txHash:b}}(qe)),qe}var On=An();function ys({onCancel:x,onSuccess:C,blocklet:$}){const{vaults:R=[],appPid:_}=$,{t:b,locale:m}=ie(),{connectApi:r}=Ft(),{api:p}=ne(),{teamDid:f}=Ne(),[u,t]=pt({loading:!1,fetching:!1,error:"",address:"",fetched:[],errored:[]});L.useEffect(()=>{if(!xe.isValid(u.address))return;const c=xe.toAddress(u.address),a=u.fetched.find(h=>h.address===c),o=u.errored.find(h=>h.address===c);!u.fetching&&!a&&!o&&(t({fetching:!0}),Tr(W.MAIN_CHAIN_ENDPOINT).getAccountState({address:c}).then(g=>{g.state?t({fetching:!1,fetched:[...u.fetched.filter(v=>v.address!==c),g.state]}):t({fetching:!1,errored:[...u.errored.filter(v=>v.address!==c),{address:c}]})}).catch(g=>{console.error(g),t({fetching:!1,error:at(g)})}))},[u.address,u.fetching]),L.useEffect(()=>{if(u.address){const c=xe.toAddress(u.address);if(!xe.isValid(c)){t({error:b("blocklet.config.vault.error.invalid")});return}if(On.schemas.tokenHolder.validate(c).error){t({error:b("blocklet.config.vault.error.holder")});return}if(R.find(o=>o.did===c)){t({error:b("blocklet.config.vault.error.duplicate")});return}if(ir([$.appDid,$.appPid,...$.migratedFrom.map(o=>o.appDid)].filter(Boolean)).includes(c)){t({error:b("blocklet.config.vault.error.appDid")});return}}t({error:""})},[u.address]);const l=async()=>{t({loading:!0});try{const c=await p.configVault({input:{teamDid:f,vaultDid:xe.toAddress(u.address)}});r.open({locale:m,action:"approve-vault",forceConnected:!1,saveConnect:!1,autoConnect:!1,className:"connect",checkTimeout:10*60*1e3,passkeyBehavior:"none",extraParams:{sessionId:c.sessionId},messages:{title:b("blocklet.config.vault.approve.title"),scan:b(`blocklet.config.vault.approve.${R.length>0?"byLast":"byOwner"}`),confirm:b("blocklet.config.vault.approve.confirm"),success:b("blocklet.config.vault.approve.success")},onSuccess:()=>{r.open({locale:m,action:"config-vault",forceConnected:!1,saveConnect:!1,autoConnect:!1,className:"connect",checkTimeout:10*60*1e3,passkeyBehavior:"none",extraParams:{sessionId:c.sessionId},messages:{title:b("blocklet.config.vault.commit.title"),scan:b("blocklet.config.vault.commit.scan"),confirm:b("blocklet.config.vault.commit.confirm"),success:b("blocklet.config.vault.commit.success")},onSuccess:()=>{t({loading:!1}),C()},onClose:()=>{t({loading:!1}),r.close()}})},onClose:()=>{t({loading:!1}),r.close()}})}catch(c){t({loading:!1,error:at(c)})}},i=xe.toAddress(u.address),n=[];xe.isValid(i)&&n.push({key:b("blocklet.config.vault.role"),value:e.jsx(ht,{color:"primary",variant:"outlined",size:"small",label:xe.toTypeInfoStr(i).role||"-"})});const s=u.fetched.find(c=>c.address===i);return s&&n.push({key:b("blocklet.config.vault.firstSeen"),value:wt(s.context?.genesisTime,"-")},{key:b("blocklet.config.vault.lastSeen"),value:wt(s.context?.renaissanceTime,"-")},{key:b("blocklet.config.vault.migratedFrom"),value:s.migratedFrom.length?s.migratedFrom.map(c=>e.jsx(nt,{did:c,showQrcode:!0,compact:!0,size:14,locale:m},c)):"-"},{key:b("blocklet.config.vault.migratedTo"),value:s.migratedTo.length?s.migratedTo.map(c=>e.jsx(nt,{did:c,showQrcode:!0,compact:!0,size:14,locale:m},c)):"-"}),e.jsx(_e,{open:!0,fullWidth:!0,showCloseButton:!1,onClose:x,title:e.jsxs(A,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(as,{}),b("blocklet.config.vault.title")]}),actions:e.jsxs(e.Fragment,{children:[e.jsx(Q,{onClick:x,children:b("common.cancel")}),e.jsx(Q,{onClick:l,variant:"contained",disabled:!!u.error||u.loading,children:b("common.confirm")})]}),children:e.jsxs(ae,{direction:"column",spacing:3,children:[e.jsxs(J,{variant:"body1",gutterBottom:!0,sx:{color:"text.secondary"},children:[b("blocklet.config.vault.desc")," ",b("blocklet.config.vault.tip")]}),R.length>0&&e.jsxs(A,{children:[e.jsxs(J,{variant:"body1",gutterBottom:!0,sx:{color:"text.secondary"},children:[b("blocklet.config.vault.current"),":"]}),e.jsxs(A,{sx:{display:"flex",alignItems:"center",gap:.5},children:[e.jsx(or,{did:R[R.length-1].did,showQrcode:!0,style:{width:"auto"}}),e.jsx(Hr,{vaults:R,appPid:_})]})]}),e.jsx(U,{fullWidth:!0,"data-cy":"input-factory-address",label:b("blocklet.config.vault.address"),error:!!u.error,helperText:u.error,value:u.address,onChange:c=>{t({address:c.target.value,error:""})},slotProps:{input:{endAdornment:u.fetching?e.jsx(Vt,{position:"end",children:e.jsx(Se,{size:16})}):null}}}),e.jsx(A,{sx:{"& .info-row__name":{fontSize:"14px"},"& .info-row__value":{fontSize:"14px"}},children:n.map(c=>e.jsx(ts,{valueComponent:"div",nameWidth:120,name:c.key,children:c.value},c.key))})]})})}ys.propTypes={onCancel:T.func.isRequired,onSuccess:T.func.isRequired,blocklet:T.object.isRequired};function yt({blocklet:x,onUpdate:C=()=>{},hasPermission:$=!1}){const{info:R,api:_,inService:b}=ne(),{t:m,locale:r}=L.useContext(ce),[p,f]=pt({loading:!1,showTransferOwner:!1,showConfigVault:!1}),[u,t]=L.useState(()=>x?.settings?.gateway?.wafPolicy?.enabled??!0),[l,i]=L.useState(()=>!!x?.settings?.enableSessionHardening),[n,s]=L.useState(()=>!!x?.settings?.invite?.enabled),c=p.loading||!$,{did:a}=x.meta,o=b?window.env?.gateway?.wafPolicy?.enabled:R?.routing.wafPolicy?.enabled;if(mt(x.status))return null;const h=x.environments.find(I=>I.key===te.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_DELETABLE),g=!h||h.value==="yes",k=x.environments.find(I=>I.key===te.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_TENANT_MODE)?.value||te.BLOCKLET_TENANT_MODES.SINGLE,w=(I,B)=>async N=>{if(!p.loading){f({loading:!0});try{const{checked:M}=N.target,{blocklet:q}=await _.configBlocklet({input:{did:x.meta.did,configs:[{key:te.BLOCKLET_CONFIGURABLE_KEY[I],value:B(M)}]}});C(q)}catch(M){V.error(M.message)}finally{f({loading:!1})}}},d=w("BLOCKLET_DELETABLE",I=>I?"no":"yes"),y=w("BLOCKLET_APP_TENANT_MODE",I=>I?te.BLOCKLET_TENANT_MODES.MULTIPLE:te.BLOCKLET_TENANT_MODES.SINGLE),j=(I,B)=>async N=>{if(!p.loading){f({loading:!0});try{const M=N.target.checked;await _.updateBlockletSettings({input:I(M)}),B&&B(M)}catch(M){V.error(M.message)}finally{f({loading:!1})}}},S=j(I=>({did:x.meta.did,invite:{enabled:I}}),s),O=j(I=>({did:x.meta.did,gateway:{wafPolicy:{enabled:I}}}),t),P=j(I=>({did:x.meta.did,enableSessionHardening:I}),I=>{i(I),lr()}),D=async()=>{if(!p.loading){f({loading:!0});try{const{blocklet:I}=await _.getBlocklet({input:{did:x.meta.did}});C(I)}catch(I){V.error(I.message)}finally{f({loading:!1})}}};return e.jsxs(ae,{p:3,sx:{border:"1px solid red",borderRadius:2,p:3},className:"advanced-config",children:[!b&&e.jsxs(e.Fragment,{children:[e.jsx(z,{title:m("blocklet.config.deletable.name"),desc:m(g?"blocklet.config.deletable.disable":"blocklet.config.deletable.enable"),children:e.jsx(A,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(pe,{disabled:c,checked:!g,defaultChecked:!0,onChange:d})})}),e.jsx(A,{className:"config-form",component:X,sx:{my:3}})]}),e.jsx(ps,{inService:b,disabled:c,loading:p.loading,onChange:D}),e.jsx(A,{className:"config-form",component:X,sx:{my:3}}),b&&e.jsx(Or,{role:"owner",children:I=>(I||Sn)&&e.jsxs(e.Fragment,{children:[e.jsx(z,{title:m("blocklet.config.vault.title"),desc:m("blocklet.config.vault.desc"),children:e.jsx(A,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsxs(Q,{variant:"contained",color:"primary",size:"small","data-cy":"config-vault",onClick:()=>f({showConfigVault:!0}),children:[e.jsx(as,{style:{fontSize:"1.3em",marginRight:4}}),m("blocklet.config.vault.title")]})})}),e.jsx(A,{className:"config-form",component:X,sx:{my:3}}),p.showConfigVault&&e.jsx(ys,{blocklet:x,onCancel:()=>f({showConfigVault:!1}),onSuccess:()=>f({showConfigVault:!1})}),e.jsx(z,{title:m("team.transferApp.name"),desc:m("team.transferApp.description"),children:e.jsx(A,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsxs(Q,{variant:"contained",edge:"end",color:"primary",size:"small","data-cy":"transfer-app",onClick:()=>f({showTransferOwner:!0}),children:[e.jsx(cn,{style:{fontSize:"1.3em",marginRight:4}}),m("team.transferApp.name")]})})}),e.jsx(A,{className:"config-form",component:X,sx:{my:3}}),p.showTransferOwner&&e.jsx(gs,{onCancel:()=>f({showTransferOwner:!1}),onSuccess:()=>f({showTransferOwner:!1})})]})}),e.jsx(z,{title:m("blocklet.config.clearCache.name"),desc:m("blocklet.config.clearCache.purpose"),children:e.jsx(A,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(qr,{teamDid:a})})}),e.jsx(A,{className:"config-form",component:X,sx:{my:3}}),e.jsx(z,{title:m("blocklet.config.rotateSessionKey.name"),desc:m("blocklet.config.rotateSessionKey.purpose"),children:e.jsx(A,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(Mr,{style:{whiteSpace:"nowrap"},teamDid:a})})}),e.jsx(A,{className:"config-form",component:X,sx:{my:3}}),e.jsx(z,{title:m("blocklet.config.tenantMode.name"),desc:m(`blocklet.config.tenantMode.${k}`),children:e.jsx(A,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(pe,{disabled:c,checked:k===te.BLOCKLET_TENANT_MODES.MULTIPLE,onChange:y})})}),e.jsx(A,{className:"config-form",component:X,sx:{my:3}}),e.jsx(z,{title:m("team.invite.setting"),desc:m(`team.invite.${n?"enabled":"disabled"}`),children:e.jsx(A,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(pe,{disabled:c,checked:n,onChange:S})})}),e.jsx(A,{className:"config-form",component:X,sx:{my:3}}),e.jsx(z,{title:e.jsxs(ae,{direction:"row",sx:{alignItems:"center",gap:1},children:[m("setting.form.enableSessionHardening.switchLabel"),e.jsx(se,{title:m("setting.form.enableSessionHardening.switchTips"),children:e.jsx(kt,{sx:{ml:.5,fontSize:"20px"},color:"primary"})})]}),children:e.jsx(A,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(pe,{disabled:c,checked:l,onChange:P})})}),o&&e.jsxs(e.Fragment,{children:[e.jsx(A,{className:"config-form",component:X,sx:{my:3}}),e.jsx(z,{title:e.jsxs(ae,{direction:"row",sx:{alignItems:"center",gap:1},children:[m("router.gateway.wafPolicy.title"),e.jsx(se,{title:e.jsx(A,{sx:{fontSize:"14px",lineHeight:1.5},children:e.jsx(A,{sx:{color:"common.white",ml:.5},component:"a",href:`https://www.arcblock.io/docs/blocklet-developer/${r}/enable-web-application-firewall`,target:"_blank",rel:"noopener noreferrer",children:m("dashboard.document")})}),children:e.jsx(kt,{fontSize:"small",color:"action",sx:{fontSize:16,cursor:"pointer"}})})]}),desc:m("router.gateway.wafPolicy.switchLabel"),children:e.jsx(A,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(pe,{disabled:c,checked:u,onChange:O})})})]})]})}const Pn=Ee(yt,"mutate_blocklets"),Tn=Ee(yt,"",ft);function In(x){const{inService:C}=ne();return C?e.jsx(Tn,{...x}):e.jsx(Pn,{...x})}yt.propTypes={blocklet:T.object.isRequired,onUpdate:T.func,hasPermission:T.bool};function vt({blocklet:x,onUpdate:C=()=>{},hasPermission:$=!1,...R}){const{t:_}=L.useContext(ce);return mt(x.status)?null:e.jsxs(qn,{...R,children:[e.jsx(_n,{blocklet:x,onUpdate:C,hasPermission:$}),e.jsx(A,{sx:{mt:6},children:e.jsx(J,{variant:"h6",sx:{fontWeight:600},children:_("blocklet.config.dangerZone")})}),e.jsx(A,{className:"config-form",component:X,sx:{my:3}}),e.jsx(A,{sx:{maxWidth:1536},children:e.jsx(In,{blocklet:x,onUpdate:C,hasPermission:$})})]})}const En=Ee(vt,"mutate_blocklets"),Dn=Ee(vt,"",ft);function Ln(x){const{inService:C}=ne();return C?e.jsx(Dn,{...x}):e.jsx(En,{...x})}vt.propTypes={blocklet:T.object.isRequired,onUpdate:T.func,hasPermission:T.bool};const qn=ye(A)`
61
- .config-form {
62
- flex-grow: 1;
63
- overflow-y: auto;
64
- ${x=>x.theme.breakpoints.down("md")} {
65
- width: 100%;
66
- flex-shrink: 0;
67
- padding: 0 24px;
68
- transform: translate(0, 0);
69
- }
70
- }
71
-
72
- .config-item {
73
- display: flex;
74
- align-items: center;
75
- justify-content: space-between;
76
- margin: 16px 0;
77
- }
78
-
79
- .config-label {
80
- font-weight: bold;
81
- }
82
-
83
- .config-desc {
84
- font-weight: normal;
85
- font-size: 12px;
86
- color: #666;
87
- }
88
-
89
- .form-item {
90
- margin-top: 0;
91
- }
92
- `,Mn={width:256,height:250,body:'<path fill="#161614" d="M128.001 0C57.317 0 0 57.307 0 128.001c0 56.554 36.676 104.535 87.535 121.46c6.397 1.185 8.746-2.777 8.746-6.158c0-3.052-.12-13.135-.174-23.83c-35.61 7.742-43.124-15.103-43.124-15.103c-5.823-14.795-14.213-18.73-14.213-18.73c-11.613-7.944.876-7.78.876-7.78c12.853.902 19.621 13.19 19.621 13.19c11.417 19.568 29.945 13.911 37.249 10.64c1.149-8.272 4.466-13.92 8.127-17.116c-28.431-3.236-58.318-14.212-58.318-63.258c0-13.975 5-25.394 13.188-34.358c-1.329-3.224-5.71-16.242 1.24-33.874c0 0 10.749-3.44 35.21 13.121c10.21-2.836 21.16-4.258 32.038-4.307c10.878.049 21.837 1.47 32.066 4.307c24.431-16.56 35.165-13.12 35.165-13.12c6.967 17.63 2.584 30.65 1.255 33.873c8.207 8.964 13.173 20.383 13.173 34.358c0 49.163-29.944 59.988-58.447 63.157c4.591 3.972 8.682 11.762 8.682 23.704c0 17.126-.148 30.91-.148 35.126c0 3.407 2.304 7.398 8.792 6.14C219.37 232.5 256 184.537 256 128.002C256 57.307 198.691 0 128.001 0Zm-80.06 182.34c-.282.636-1.283.827-2.194.39c-.929-.417-1.45-1.284-1.15-1.922c.276-.655 1.279-.838 2.205-.399c.93.418 1.46 1.293 1.139 1.931Zm6.296 5.618c-.61.566-1.804.303-2.614-.591c-.837-.892-.994-2.086-.375-2.66c.63-.566 1.787-.301 2.626.591c.838.903 1 2.088.363 2.66Zm4.32 7.188c-.785.545-2.067.034-2.86-1.104c-.784-1.138-.784-2.503.017-3.05c.795-.547 2.058-.055 2.861 1.075c.782 1.157.782 2.522-.019 3.08Zm7.304 8.325c-.701.774-2.196.566-3.29-.49c-1.119-1.032-1.43-2.496-.726-3.27c.71-.776 2.213-.558 3.315.49c1.11 1.03 1.45 2.505.701 3.27Zm9.442 2.81c-.31 1.003-1.75 1.459-3.199 1.033c-1.448-.439-2.395-1.613-2.103-2.626c.301-1.01 1.747-1.484 3.207-1.028c1.446.436 2.396 1.602 2.095 2.622Zm10.744 1.193c.036 1.055-1.193 1.93-2.715 1.95c-1.53.034-2.769-.82-2.786-1.86c0-1.065 1.202-1.932 2.733-1.958c1.522-.03 2.768.818 2.768 1.868Zm10.555-.405c.182 1.03-.875 2.088-2.387 2.37c-1.485.271-2.861-.365-3.05-1.386c-.184-1.056.893-2.114 2.376-2.387c1.514-.263 2.868.356 3.061 1.403Z"/>'},Ye={enabled:!1,domain:"",clientId:"",clientSecret:""};function zn(){const{api:x}=ne(),{blocklet:C}=le(),{t:$}=ie(),R=C?.meta?.did,_=Object.assign({...Ye},C?.settings?.oauth?.auth0||{}),{handleSubmit:b,control:m,formState:r,watch:p,reset:f}=we({defaultValues:Ie(_,Object.keys(Ye))}),u=p("enabled"),t=E(async c=>{try{const{blocklet:a}=await x.configOAuth({input:{did:R,oauth:JSON.stringify({auth0:c})}}),o=Object.assign({...Ye},a?.settings?.oauth?.auth0||{});f(o),V.success($("oauth.saveSuccess"))}catch(a){V.error(a.message||$("oauth.saveFailed"))}}),l=E(c=>c?.trim()?!0:$("oauth.auth0.domainDescription")),i=E(c=>c?.trim()?!0:$("oauth.auth0.clientIdDescription")),n=E(c=>c?.trim()?!0:$("oauth.auth0.clientSecretDescription")),s=E(()=>!0);return e.jsx(A,{children:e.jsxs("form",{onSubmit:b(t),disabled:!0,children:[e.jsx(z,{title:$("oauth.auth0.enable"),mb:2.5,children:e.jsx(F,{name:"enabled",control:m,render:({field:c})=>e.jsx(G,{control:e.jsx(Ze,{sx:{ml:1},checked:c.value,...c})})})}),e.jsx(z,{title:$("oauth.auth0.domain"),children:e.jsx(F,{name:"domain",control:m,rules:{validate:u?l:s},render:({field:c})=>e.jsx(ee,{fullWidth:!0,children:e.jsx(U,{...c,size:"small",label:$("oauth.auth0.domain"),error:!!r.errors[c.name],helperText:r.errors[c.name]?.message||" ",disabled:!u})})})}),e.jsx(z,{title:$("oauth.auth0.clientId"),children:e.jsx(F,{name:"clientId",control:m,rules:{validate:u?i:s},render:({field:c})=>e.jsx(ee,{fullWidth:!0,children:e.jsx(U,{...c,size:"small",label:$("oauth.auth0.clientId"),error:!!r.errors[c.name],helperText:r.errors[c.name]?.message||" ",disabled:!u})})})}),e.jsx(z,{title:$("oauth.auth0.clientSecret"),children:e.jsx(F,{name:"clientSecret",control:m,rules:{validate:u?n:s},render:({field:c})=>e.jsx(ee,{fullWidth:!0,children:e.jsx(U,{...c,size:"small",type:"password",label:$("oauth.auth0.clientSecret"),error:!!r.errors[c.name],helperText:r.errors[c.name]?.message||" ",disabled:!u})})})}),e.jsx(Y,{type:"submit",variant:"contained",onSubmit:b(t),disabled:!r.isDirty,children:$("oauth.save")})]})})}const Xe={enabled:!1,clientId:"",clientSecret:""};function Bn(){const{api:x}=ne(),{blocklet:C}=le(),{t:$}=ie(),R=C?.meta?.did,_=Object.assign({...Xe},C?.settings?.oauth?.github||{}),{handleSubmit:b,control:m,formState:r,watch:p,reset:f}=we({defaultValues:Ie(_,Object.keys(Xe))}),u=p("enabled"),t=E(async s=>{try{const{blocklet:c}=await x.configOAuth({input:{did:R,oauth:JSON.stringify({github:s})}}),a=Object.assign({...Xe},c?.settings?.oauth?.github||{});f(a),V.success($("oauth.saveSuccess"))}catch(c){V.error(c.message||$("oauth.saveFailed"))}}),l=E(s=>s?.trim()?!0:$("oauth.github.clientIdDescription")),i=E(s=>s?.trim()?!0:$("oauth.github.clientSecretDescription")),n=E(()=>!0);return e.jsx(A,{children:e.jsxs("form",{onSubmit:b(t),disabled:!0,children:[e.jsx(z,{title:$("oauth.github.enable"),mb:2.5,children:e.jsx(F,{name:"enabled",control:m,render:({field:s})=>e.jsx(G,{control:e.jsx(Ze,{sx:{ml:1},checked:s.value,...s})})})}),e.jsx(z,{title:$("oauth.github.clientId"),children:e.jsx(F,{name:"clientId",control:m,rules:{validate:u?l:n},render:({field:s})=>e.jsx(ee,{fullWidth:!0,children:e.jsx(U,{...s,size:"small",label:$("oauth.github.clientId"),error:!!r.errors[s.name],helperText:r.errors[s.name]?.message||" ",disabled:!u})})})}),e.jsx(z,{title:$("oauth.github.clientSecret"),children:e.jsx(F,{name:"clientSecret",control:m,rules:{validate:u?i:n},render:({field:s})=>e.jsx(ee,{fullWidth:!0,children:e.jsx(U,{...s,size:"small",type:"password",label:$("oauth.github.clientSecret"),error:!!r.errors[s.name],helperText:r.errors[s.name]?.message||" ",disabled:!u})})})}),e.jsx(Y,{type:"submit",variant:"contained",onSubmit:b(t),disabled:!r.isDirty,children:$("oauth.save")})]})})}const Qe={enabled:!1,clientId:"",clientSecret:""};function Hn(){const{api:x}=ne(),{blocklet:C}=le(),{t:$}=ie(),R=C?.meta?.did,_=Object.assign({...Qe},C?.settings?.oauth?.google||{}),{handleSubmit:b,control:m,formState:r,watch:p,reset:f}=we({defaultValues:Ie(_,Object.keys(Qe))}),u=p("enabled"),t=E(async s=>{try{const{blocklet:c}=await x.configOAuth({input:{did:R,oauth:JSON.stringify({google:s})}}),a=Object.assign({...Qe},c?.settings?.oauth?.google||{});f(a),V.success($("oauth.saveSuccess"))}catch(c){V.error(c.message||$("oauth.saveFailed"))}}),l=E(s=>s?.trim()?!0:$("oauth.google.clientIdDescription")),i=E(s=>s?.trim()?!0:$("oauth.google.clientSecretDescription")),n=E(()=>!0);return e.jsx(A,{children:e.jsxs("form",{onSubmit:b(t),disabled:!0,children:[e.jsx(z,{title:$("oauth.google.enable"),mb:2.5,children:e.jsx(F,{name:"enabled",control:m,render:({field:s})=>e.jsx(G,{control:e.jsx(Ze,{sx:{ml:1},checked:s.value,...s})})})}),e.jsx(z,{title:$("oauth.google.clientId"),children:e.jsx(F,{name:"clientId",control:m,rules:{validate:u?l:n},render:({field:s})=>e.jsx(ee,{fullWidth:!0,children:e.jsx(U,{...s,size:"small",label:$("oauth.google.clientId"),error:!!r.errors[s.name],helperText:r.errors[s.name]?.message||" ",disabled:!u})})})}),e.jsx(z,{title:$("oauth.google.clientSecret"),children:e.jsx(F,{name:"clientSecret",control:m,rules:{validate:u?i:n},render:({field:s})=>e.jsx(ee,{fullWidth:!0,children:e.jsx(U,{...s,size:"small",type:"password",label:$("oauth.google.clientSecret"),error:!!r.errors[s.name],helperText:r.errors[s.name]?.message||" ",disabled:!u})})})}),e.jsx(Y,{type:"submit",variant:"contained",onSubmit:b(t),disabled:!r.isDirty,children:$("oauth.save")})]})})}const et={enabled:!1,teamId:"",serviceId:"",keyId:"",authKey:"",bundleId:""};function Fn(){const{api:x}=ne(),{blocklet:C}=le(),{t:$}=ie(),R=C?.meta?.did,_=Object.assign({...et},C?.settings?.oauth?.apple||{}),{handleSubmit:b,control:m,formState:r,watch:p,reset:f}=we({defaultValues:Ie(_,Object.keys(et))}),u=p("enabled"),t=E(async o=>{try{const{blocklet:h}=await x.configOAuth({input:{did:R,oauth:JSON.stringify({apple:o})}}),g=Object.assign({...et},h?.settings?.oauth?.apple||{});f(g),V.success($("oauth.saveSuccess"))}catch(h){V.error(h.message||$("oauth.saveFailed"))}}),l=E(o=>o?.trim()?!0:$("oauth.apple.teamIdDescription")),i=E(o=>o?.trim()?!0:$("oauth.apple.serviceIdDescription")),n=E(o=>o?.trim()?!0:$("oauth.apple.keyIdDescription")),s=E(o=>o?.trim()?!0:$("oauth.apple.authKeyDescription")),c=E(o=>o?.trim()?!0:$("oauth.apple.bundleIdDescription")),a=E(()=>!0);return e.jsx(A,{children:e.jsxs("form",{onSubmit:b(t),disabled:!0,children:[e.jsx(z,{title:$("oauth.apple.enable"),mb:2.5,children:e.jsx(F,{name:"enabled",control:m,render:({field:o})=>e.jsx(G,{control:e.jsx(Ze,{sx:{ml:1},checked:o.value,...o})})})}),e.jsx(z,{title:$("oauth.apple.teamId"),children:e.jsx(F,{name:"teamId",control:m,rules:{validate:u?l:a},render:({field:o})=>e.jsx(ee,{fullWidth:!0,children:e.jsx(U,{...o,size:"small",label:$("oauth.apple.teamId"),error:!!r.errors[o.name],helperText:r.errors[o.name]?.message||" ",disabled:!u})})})}),e.jsx(z,{title:$("oauth.apple.bundleId"),children:e.jsx(F,{name:"bundleId",control:m,rules:{validate:u?c:a},render:({field:o})=>e.jsx(ee,{fullWidth:!0,children:e.jsx(U,{...o,size:"small",label:$("oauth.apple.bundleId"),error:!!r.errors[o.name],helperText:r.errors[o.name]?.message||" ",disabled:!u})})})}),e.jsx(z,{title:$("oauth.apple.serviceId"),children:e.jsx(F,{name:"serviceId",control:m,rules:{validate:u?i:a},render:({field:o})=>e.jsx(ee,{fullWidth:!0,children:e.jsx(U,{...o,size:"small",label:$("oauth.apple.serviceId"),error:!!r.errors[o.name],helperText:r.errors[o.name]?.message||" ",disabled:!u})})})}),e.jsx(z,{title:$("oauth.apple.keyId"),children:e.jsx(F,{name:"keyId",control:m,rules:{validate:u?n:a},render:({field:o})=>e.jsx(ee,{fullWidth:!0,children:e.jsx(U,{...o,size:"small",label:$("oauth.apple.keyId"),error:!!r.errors[o.name],helperText:r.errors[o.name]?.message||" ",disabled:!u})})})}),e.jsx(z,{title:$("oauth.apple.authKey"),children:e.jsx(F,{name:"authKey",control:m,rules:{validate:u?s:a},render:({field:o})=>e.jsx(ee,{fullWidth:!0,children:e.jsx(U,{...o,size:"small",type:"password",label:$("oauth.apple.authKey"),multiline:!0,rows:4,error:!!r.errors[o.name],helperText:r.errors[o.name]?.message||" ",disabled:!u})})})}),e.jsx(Y,{type:"submit",variant:"contained",onSubmit:b(t),disabled:!r.isDirty,children:$("oauth.save")})]})})}const Nn={width:24,height:24,body:'<path fill="currentColor" d="M9 20q-.825 0-1.413-.588T7 18q0-.825.588-1.413T9 16q.825 0 1.413.588T11 18q0 .825-.588 1.413T9 20Zm6 0q-.825 0-1.413-.588T13 18q0-.825.588-1.413T15 16q.825 0 1.413.588T17 18q0 .825-.588 1.413T15 20Zm-6-6q-.825 0-1.413-.588T7 12q0-.825.588-1.413T9 10q.825 0 1.413.588T11 12q0 .825-.588 1.413T9 14Zm6 0q-.825 0-1.413-.588T13 12q0-.825.588-1.413T15 10q.825 0 1.413.588T17 12q0 .825-.588 1.413T15 14ZM9 8q-.825 0-1.413-.588T7 6q0-.825.588-1.413T9 4q.825 0 1.413.588T11 6q0 .825-.588 1.413T9 8Zm6 0q-.825 0-1.413-.588T13 6q0-.825.588-1.413T15 4q.825 0 1.413.588T17 6q0 .825-.588 1.413T15 8Z"/>'};function vs({title:x,id:C,children:$,index:R,onMove:_,defaultExpand:b=!1,onEnd:m}){const[r,p]=L.useState(b),f=L.useRef(null),u=L.useRef(null),[{handlerId:t},l]=Zr({accept:"dragItem",collect(a){return{handlerId:a.getHandlerId()}},hover(a,o){if(!f.current)return;const h=a.index,g=R;if(h===g)return;const v=f.current?.getBoundingClientRect(),k=u.current?.getBoundingClientRect(),w=(k.bottom-k.top)/2,y=o.getClientOffset().y-v.top;h<g&&y<w||h>g&&y>w||(_(h,g),a.index=g)}}),[{isDragging:i},n]=Vr({item:{index:R,type:"dragItem"},collect:a=>({isDragging:a.isDragging()}),end:m});n(u),l(f);const s=i?.5:1,c=E(a=>{a.preventDefault(),a.stopPropagation(),p(!r)});return e.jsxs(A,{ref:f,children:[e.jsxs(A,{sx:{cursor:"pointer","&:hover":{backgroundColor:"grey.100"}},ref:u,"data-handler-id":t,children:[e.jsxs(A,{sx:{py:2,px:1,opacity:s,display:"flex",alignItems:"center",gap:.5},draggable:!1,onClick:c,children:[e.jsx(A,{sx:{pointerEvents:"auto",cursor:"grab","&:active":{cursor:"grabbing"},fontSize:0,color:"text.hint","&:hover":{color:"text.secondary"}},children:e.jsx(K,{fontSize:20,icon:Nn})}),e.jsx(J,{sx:{flex:1},children:x}),e.jsx(re,{size:"small",sx:{pointerEvents:"auto",transform:r?"":"rotate(180deg)",transition:"transform 0.3s ease"},children:e.jsx(K,{icon:Fr,style:{transform:"scale(1.5)"}})})]}),e.jsx(X,{})]}),e.jsx(A,{sx:{pl:4,py:2.5,display:r?"block":"none"},children:$})]})}vs.propTypes={title:T.string.isRequired,id:T.string.isRequired,children:T.node.isRequired,index:T.number.isRequired,onMove:T.func.isRequired,onEnd:T.func.isRequired,defaultExpand:T.bool};const Zn=[{name:"github",title:"GitHub",icon:e.jsx(K,{icon:Mn}),component:e.jsx(Bn,{})},{name:"google",title:"Google",icon:e.jsx(K,{icon:cr}),component:e.jsx(Hn,{})},{name:"apple",title:"Apple",icon:e.jsx(K,{icon:dr}),component:e.jsx(Fn,{})},{name:"auth0",title:"Auth0",icon:e.jsx(K,{icon:ur}),component:e.jsx(zn,{})}],Vn=["github","google","apple","auth0"];function Un(){const{api:x}=ne(),{blocklet:C}=le(),$=C?.meta?.did,R=C?.settings?.oauth||{},_=Object.keys(R).sort((t,l)=>R[t]?.order!==void 0&&R[l]?.order!==void 0?R[t].order-R[l].order:R[t]?.order!==void 0?-1:1);for(const t of Vn)_.includes(t)||_.push(t);const b=ge(_.reduce((t,l,i)=>Object.assign(t,{[l]:i}),{})),m=Ce(()=>{const t=[...Zn];return t.sort((l,i)=>b[l.name]-b[i.name]),t},[b.auth0,b.github,b.google]),r={};typeof window<"u"&&(r.context=window);const p=E(async t=>{const l={};Object.keys(t).forEach(i=>{l[i]={order:t[i]}}),await x.configOAuth({input:{did:$,oauth:JSON.stringify(l)}})}),f=E((t,l)=>{const i=m[t],n=m[l];b[i.name]=l,b[n.name]=t}),u=E(async()=>{await p(b)});return e.jsx(A,{sx:{".section-left":{width:"160px"}},children:e.jsx(Ur,{backend:Wr,...r,children:m.map((t,l)=>e.jsx(vs,{index:l,id:t.name,title:t.title,icon:t.icon,onMove:f,onEnd:u,defaultExpand:t.enabled,children:t.component},t.name))})})}const ke={ttl:W.SESSION_TTL,cacheTtl:W.SESSION_CACHE_TTL,email:{enabled:!1,requireVerified:!1,requireUnique:!1,trustOauthProviders:!1,trustedIssuers:[],enableDomainBlackList:!1,domainBlackList:[],enableDomainWhiteList:!1,domainWhiteList:[]},phone:{enabled:!1,requireVerified:!1,requireUnique:!1,regionBlackList:[],trustedIssuers:[]},enableBlacklist:!1};function he(x){return e.jsx(Jr,{...x,sx:{transform:"scale(0.75)"}})}function tt(x,C=!1){const $=C?x.ttl*86400:x.ttl/86400;return{...x,ttl:$}}function Wn(){const{api:x}=ne(),{blocklet:C}=le(),$=C?.meta?.did,R=hr({},ke,C?.settings?.session||{});We(R.ttl)&&(R.ttl=ke.ttl),We(R.cacheTtl)&&(R.cacheTtl=ke.cacheTtl),R.phone||(R.phone=ke.phone),R.email||(R.email=ke.email),We(R.enableBlacklist)&&(R.enableBlacklist=ke.enableBlacklist);const{handleSubmit:_,control:b,formState:m,reset:r,watch:p}=we({defaultValues:Ie(tt(R),["ttl","cacheTtl","email","phone","enableBlacklist"])}),{t:f}=ie(),u=p("email.enabled"),t=p("phone.enabled"),l=p("email.enableDomainBlackList"),i=p("email.enableDomainWhiteList"),{fields:n,append:s,remove:c}=At({control:b,name:"email.domainBlackList"}),{fields:a,append:o,remove:h}=At({control:b,name:"email.domainWhiteList"}),g=E(async v=>{try{const{blocklet:k}=await x.updateAppSessionConfig({input:{did:$,config:Te(tt(v,!0),["phone"])}}),w=Object.assign({},ke,Ie(k?.settings?.session||{},["ttl","cacheTtl","email","phone","enableBlacklist"]));r(tt(w)),V.success(f("common.configSuccess"))}catch(k){V.error(k.message)}});return e.jsx(Jn,{onSubmit:_(g),children:e.jsxs(ae,{direction:"column",sx:{gap:6},children:[e.jsxs(A,{children:[e.jsxs(A,{children:[e.jsx(J,{variant:"h6",sx:{fontWeight:600},children:f("blocklet.config.session.profile")}),e.jsx(A,{component:X,sx:{my:3}})]}),e.jsxs(ae,{sx:{gap:2},children:[e.jsx(z,{title:f("blocklet.config.session.fullNameEnabled"),sectionLeftSx:{width:"600px"},children:e.jsx(A,{sx:{alignSelf:"flex-start"},children:e.jsx(he,{disabled:!0,checked:!0})})}),e.jsx(z,{title:f("blocklet.config.session.avatarEnabled"),sectionLeftSx:{width:"600px"},children:e.jsx(A,{sx:{alignSelf:"flex-start"},children:e.jsx(he,{disabled:!0,checked:!0})})}),e.jsx(z,{title:f("blocklet.config.session.emailEnabled"),sectionLeftSx:{width:"600px"},children:e.jsx(A,{sx:{alignSelf:"flex-start"},children:e.jsx(F,{name:"email.enabled",control:b,render:({field:v})=>e.jsx(he,{...v,checked:v.value})})})}),u&&e.jsxs(ae,{direction:"column",sx:{ml:2},children:[e.jsx(z,{title:f("blocklet.config.session.emailRequireVerified"),sectionLeftSx:{width:"600px"},children:e.jsx(A,{sx:{alignSelf:"flex-start"},children:e.jsx(F,{name:"email.requireVerified",control:b,render:({field:v})=>e.jsx(G,{sx:{mt:1},control:e.jsx(he,{...v,checked:v.value})})})})}),e.jsx(z,{title:f("blocklet.config.session.emailRequireUnique"),sectionLeftSx:{width:"600px"},children:e.jsx(A,{sx:{alignSelf:"flex-start"},children:e.jsx(F,{name:"email.requireUnique",control:b,render:({field:v})=>e.jsx(G,{sx:{mt:1},control:e.jsx(he,{...v,checked:v.value})})})})}),e.jsx(z,{title:f("blocklet.config.session.emailTrustOauthProviders"),sectionLeftSx:{width:"600px"},children:e.jsx(A,{sx:{alignSelf:"flex-start"},children:e.jsx(F,{name:"email.trustOauthProviders",control:b,render:({field:v})=>e.jsx(G,{sx:{mt:1},control:e.jsx(he,{...v,checked:v.value})})})})}),e.jsx(z,{title:f("blocklet.config.session.enableDomainBlackList"),sectionLeftSx:{width:"600px"},children:e.jsx(A,{sx:{alignSelf:"flex-start"},children:e.jsx(F,{name:"email.enableDomainBlackList",control:b,render:({field:v})=>e.jsx(G,{sx:{mt:1},control:e.jsx(he,{...v,checked:v.value})})})})}),l&&e.jsxs(A,{children:[n.map((v,k)=>e.jsxs(ae,{direction:"row",sx:{alignItems:"center",my:1,maxWidth:"720px"},children:[e.jsx(F,{name:`email.domainBlackList.${k}`,control:b,render:w=>e.jsx(U,{...w.field,size:"small",fullWidth:!0})}),e.jsx(re,{onClick:()=>c(k),children:e.jsx(Ot,{})})]},v.id)),e.jsx(Y,{startIcon:e.jsx(Pt,{}),onClick:()=>s(""),children:f("blocklet.config.session.addDomain")})]}),e.jsx(z,{title:f("blocklet.config.session.enableDomainWhiteList"),sectionLeftSx:{width:"600px"},children:e.jsx(A,{sx:{alignSelf:"flex-start"},children:e.jsx(F,{name:"email.enableDomainWhiteList",control:b,render:({field:v})=>e.jsx(G,{sx:{mt:1},control:e.jsx(he,{...v,checked:v.value})})})})}),i&&e.jsxs(A,{children:[a.map((v,k)=>e.jsxs(ae,{direction:"row",sx:{alignItems:"center",my:1,maxWidth:"720px"},children:[e.jsx(F,{name:`email.domainWhiteList.${k}`,control:b,render:w=>e.jsx(U,{...w.field,size:"small",fullWidth:!0})}),e.jsx(re,{onClick:()=>h(k),children:e.jsx(Ot,{})})]},v.id)),e.jsx(Y,{startIcon:e.jsx(Pt,{}),onClick:()=>o(""),children:f("blocklet.config.session.addDomain")})]})]}),e.jsxs(A,{sx:{display:"none"},children:[e.jsx(z,{title:f("blocklet.config.session.phoneEnabled"),sectionLeftSx:{width:"600px"},children:e.jsx(A,{sx:{alignSelf:"flex-start"},children:e.jsx(F,{name:"phone.enabled",control:b,disabled:!0,render:({field:v})=>e.jsx(G,{sx:{mt:1},control:e.jsx(he,{...v,checked:v.value})})})})}),t&&e.jsxs(ae,{direction:"column",sx:{ml:2,mt:1},children:[e.jsx(z,{title:f("blocklet.config.session.phoneRequireVerified"),sectionLeftSx:{width:"600px"},children:e.jsx(A,{sx:{alignSelf:"flex-start"},children:e.jsx(F,{name:"phone.requireVerified",control:b,render:({field:v})=>e.jsx(G,{control:e.jsx(he,{...v,checked:v.value})})})})}),e.jsx(z,{title:f("blocklet.config.session.phoneRequireUnique"),sectionLeftSx:{width:"600px"},children:e.jsx(A,{sx:{alignSelf:"flex-start"},children:e.jsx(F,{name:"phone.requireUnique",control:b,render:({field:v})=>e.jsx(G,{control:e.jsx(he,{...v,checked:v.value})})})})})]})]})]})]}),e.jsxs(A,{children:[e.jsx(J,{variant:"h6",sx:{fontWeight:600},children:f("blocklet.config.session.period")}),e.jsx(A,{component:X,sx:{my:3}}),e.jsx(ae,{direction:"column",spacing:2,children:e.jsx(F,{name:"ttl",control:b,rules:{min:1,max:30},render:({field:v})=>e.jsx(ee,{fullWidth:!0,sx:{mb:2},children:e.jsx(z,{title:f("blocklet.config.session.ttl",{day:v.value}),sectionLeftSx:{width:"600px"},children:e.jsx(A,{sx:{width:"100%",maxWidth:500,px:1.5},children:e.jsx(Kr,{...v,defaultValue:7,step:1,marks:[{value:1,label:f("blocklet.config.session.day",{day:1})},{value:7,label:f("blocklet.config.session.days",{day:7})},{value:14,label:f("blocklet.config.session.days",{day:14})},{value:21,label:f("blocklet.config.session.days",{day:21})},{value:30,label:f("blocklet.config.session.days",{day:30})}],min:1,max:30,valueLabelDisplay:"auto"})})})})})})]}),e.jsxs(A,{children:[e.jsx(J,{variant:"h6",sx:{fontWeight:600},children:f("blocklet.config.session.experimentalSettings")}),e.jsx(A,{component:X,sx:{my:3}}),e.jsx(ae,{direction:"column",spacing:2,children:e.jsx(z,{title:f("blocklet.config.session.enableBlacklist"),sectionLeftSx:{width:"600px"},children:e.jsx(A,{sx:{alignSelf:"flex-start"},children:e.jsx(F,{name:"enableBlacklist",control:b,render:({field:v})=>e.jsx(G,{sx:{mt:1},control:e.jsx(he,{...v,checked:v.value})})})})})})]}),e.jsx(A,{children:e.jsx(Y,{type:"submit",variant:"contained",disabled:!m.isDirty,children:f("oauth.save")})})]})})}const Jn=ye.form`
93
- max-width: 1536px;
94
-
95
- .advanced-config {
96
- border: 0;
97
- padding: 0;
98
- }
99
-
100
- .config-form {
101
- flex-grow: 1;
102
- overflow-y: auto;
103
- will-change: transform;
104
-
105
- &:first-child {
106
- margin: 0;
107
- }
108
-
109
- ${x=>x.theme.breakpoints.down("md")} {
110
- width: 100%;
111
- flex-shrink: 0;
112
- padding: 0 24px;
113
- transform: translate(0, 0);
114
- }
115
- }
116
-
117
- .config-item {
118
- display: flex;
119
- align-items: center;
120
- justify-content: space-between;
121
- }
122
-
123
- .config-desc {
124
- font-weight: normal;
125
- font-size: 12px;
126
- color: #666;
127
- }
128
-
129
- .form-item {
130
- margin-top: 0;
131
- }
132
- `,Kn={width:24,height:24,body:'<path fill="currentColor" d="M6 12.05q0 1.125.425 2.188T7.75 16.2l.25.25V15q0-.425.288-.713T9 14q.425 0 .713.288T10 15v4q0 .425-.288.713T9 20H5q-.425 0-.713-.288T4 19q0-.425.288-.713T5 18h1.75l-.4-.35q-1.3-1.15-1.825-2.625T4 12.05Q4 9.7 5.2 7.787T8.425 4.85q.35-.2.738-.025t.512.575q.125.375-.013.75t-.487.575q-1.45.8-2.313 2.213T6 12.05Zm12-.1q0-1.125-.425-2.187T16.25 7.8L16 7.55V9q0 .425-.288.713T15 10q-.425 0-.713-.288T14 9V5q0-.425.288-.713T15 4h4q.425 0 .713.288T20 5q0 .425-.288.713T19 6h-1.75l.4.35q1.225 1.225 1.788 2.663T20 11.95q0 2.35-1.2 4.263t-3.225 2.937q-.35.2-.737.025t-.513-.575q-.125-.375.013-.75t.487-.575q1.45-.8 2.313-2.212T18 11.95Z"/>'};var st,Mt;function Gn(){if(Mt)return st;Mt=1;const{DEFAULT_IP_DOMAIN_SUFFIX:x,SLOT_FOR_IP_DNS_SITE:C,DEFAULT_DID_DOMAIN:$}=fr(),{encode:R}=mr();return st={getIpDnsDomainForBlocklet:m=>`${R(m.meta.did)}-${C}.${x}`,getDidDomainForBlocklet:({did:m,didDomain:r=$})=>`${R(m)}.${r}`},st}var Yn=Gn();function xs({ref:x=null}){const{t:C}=L.useContext(ce),{blocklet:$}=le(),{api:R}=ne(),_=ge({loadingReject:!1,loadingApprove:!1,mode:"view",show:!1,data:{},callback:de}),m=Re()?.transitions?.duration?.leavingScreen||300,r=E(()=>{_.mode="view",_.data={},_.callback=de}),p=E(()=>{_.show=!1,setTimeout(()=>{r()},m)}),f=E(s=>{_.mode="view",_.show=!0,_.data=s}),u=E((s,c=de)=>{_.mode="approve",_.show=!0,_.data=s,_.callback=c});L.useImperativeHandle(x,()=>({open:f,close:p,approve:u}),[f,p,u]);const t=Ce(()=>{if(!_.show)return[];_.data.migratedFrom=[_.data.appId,_.data.appPid];const s=["appName","appLogo","appId","appPid","migratedFrom","appDescription","appUrl","version","appliedAt","status","serverId","serverVersion"];return _.data.isMaster!==!1&&fn(s,"appliedAt","status"),s.map(c=>{const a=C(`federated.info.${c}`);let o=_.data[c];if(c==="appName"&&_.data.isMaster&&(o=e.jsxs(A,{children:[e.jsx(Wt,{component:is}),o]})),["appId","appPid","serverId"].includes(c)&&(o=e.jsx(it,{children:o})),["appUrl"].includes(c)&&(o=e.jsx(A,{component:"a",href:o,target:"_blank",children:o})),["appLogo"].includes(c)){const h=Ut(`https://${Yn.getDidDomainForBlocklet({did:_.data.appPid})}`,W.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo");try{const g=new URL(h);g.searchParams.set("imageFilter","resize"),g.searchParams.set("w","80"),g.searchParams.set("h","80"),o=e.jsx("img",{src:g.href,width:"60",height:"60",alt:_.data.appName})}catch{o=e.jsx("img",{src:h,width:"60",height:"60",alt:_.data.appName})}}return c==="status"&&(o=o&&C(`federated.status.${o}`)),c==="migratedFrom"&&(o=(_.data.migratedFrom||[]).filter(v=>![_.data.appId,_.data.appPid].includes(v)).map(v=>e.jsx(it,{children:v}))),pr(o)&&(o="-"),{name:a,value:o}})},[_.data]),l=_.mode==="approve",i=E(async()=>{try{_.loadingReject=!0,await R.auditFederatedLogin({input:{memberPid:_.data.appPid,did:$.appPid,status:"rejected"}}),p(),_?.callback(!1)}finally{_.loadingReject=!1}}),n=E(async()=>{try{_.loadingApprove=!0,await R.auditFederatedLogin({input:{memberPid:_.data.appPid,did:$.appPid,status:"approved"}}),p(),_?.callback(!0)}finally{_.loadingApprove=!1}});return e.jsx(_e,{open:_.show,title:C(l?"federated.approveToJoinLogin":"federated.siteDetail"),onClose:p,actions:l?e.jsxs(e.Fragment,{children:[e.jsxs(Y,{color:"error",variant:"contained",onClick:i,disabled:_.loadingReject,children:[_.loadingReject?e.jsx(Se,{size:16,color:"grey"}):null,C("common.reject")]}),e.jsxs(Y,{variant:"contained",onClick:n,disabled:_.loadingApprove,children:[_.loadingApprove?e.jsx(Se,{size:16,color:"grey"}):null,C("common.approve")]})]}):e.jsx(Y,{variant:"outlined",onClick:p,children:C("common.close")}),children:t.map(s=>e.jsx(ts,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:180,name:s.name,children:s.value},s.name))})}xs.propTypes={ref:T.any};function xt({ref:x=null}){const $=Re()?.transitions?.duration?.leavingScreen||300,{t:R}=L.useContext(ce),_=ge({show:!1,data:{link:""}}),b=E(()=>{_.data.link=""}),m=E(()=>{_.show=!1,setTimeout(()=>{b()},$)}),r=E(({link:f})=>{_.show=!0,_.data.link=f});L.useImperativeHandle(x,()=>({open:r,close:m}),[r,m]);const p=E(()=>{gr(_.data.link),m()});return e.jsxs(_e,{open:_.show,title:R("federated.joinFederatedLogin"),onClose:m,PaperProps:{style:{minHeight:"unset"}},actions:e.jsx(Q,{color:"primary",autoFocus:!0,variant:"contained",onClick:p,children:R("common.copyAndClose")}),children:[e.jsx(A,{sx:{mb:1},children:R("federated.inviteJoinFederatedLoginDescription")}),e.jsx(A,{sx:{"& .copy-button":{display:"none !important"}},children:e.jsx(Gr,{language:"shell",style:{marginBottom:0},children:_.data.link})})]})}xt.propTypes={ref:T.any};function bs({mode:x="member"}){const C=L.useRef(null),$=L.useRef(null),{t:R,locale:_}=L.useContext(ce),{blocklet:b,actions:{refreshBlocklet:m}}=le(),{confirmApi:r,confirmHolder:p}=Fe(),{api:f}=ne(),u=b.settings.federated?.sites||[],t=b.settings.federated?.config||{},l=t.isMaster!==!1,i=u.find(S=>S.appPid===b.appPid),n=ge({loadingSync:!1}),s=E(S=>{$.current?.open(S)}),c=E(S=>{$.current?.approve(S,m)}),a=E(S=>{r.open({title:R("federated.removeFederatedLogin"),content:R("federated.removeFederatedLoginDescription"),confirmButtonText:R("common.confirm"),cancelButtonText:R("common.cancel"),confirmButtonProps:{color:"error"},async onConfirm(O){await f.quitFederatedLogin({input:{did:b.appPid,targetDid:S.appPid}}),O()}})}),o=E(S=>{r.open({title:R("federated.disableFederatedLogin"),content:R("federated.disableFederatedLoginDescription"),confirmButtonText:R("common.confirm"),cancelButtonText:R("common.cancel"),confirmButtonProps:{color:"error"},async onConfirm(O){await f.auditFederatedLogin({input:{memberPid:S.appPid,did:b.appPid,status:"revoked"}}),O()}})}),h=E(S=>{r.open({title:R("federated.enableFederatedLogin"),content:R("federated.enableFederatedLoginDescription"),confirmButtonText:R("common.confirm"),cancelButtonText:R("common.cancel"),async onConfirm(O){await f.auditFederatedLogin({input:{memberPid:S.appPid,did:b.appPid,status:"approved"}}),O()}})}),g=Ce(()=>{const S=[{label:R("common.name"),name:"appName",options:{customBodyRenderLite:O=>{const P=u[O],D=P.isMaster!==!1;return e.jsx(A,{sx:{display:"inline-block"},children:e.jsxs(A,{component:"a",href:P.appUrl,target:"_blank",onClick:I=>{I.stopPropagation()},sx:{display:"flex",alignItems:"center"},children:[D&&e.jsx(Wt,{component:is,style:{marginRight:"4px"}}),P.appName]})})}}},{label:R("common.did"),name:"appId",options:{customBodyRenderLite:O=>{const P=u[O];return e.jsx(it,{children:P.appId})}}},{label:R("common.status"),name:"status",options:{customBodyRenderLite:O=>{const P=u[O],D=P.isMaster!==!1;return e.jsx(A,{children:D?"-":R(`federated.status.${P.status}`)})}}}];return l&&S.push({label:R("common.actions"),name:"actions",options:{customBodyRenderLite:O=>{const P=u[O],D=P.isMaster!==!1;return e.jsx(A,{sx:{display:"flex",gap:1},children:D?e.jsxs(e.Fragment,{children:[P.status==="rejected"&&e.jsx(Q,{variant:"contained",color:"error",size:"small",onClick:I=>{I.stopPropagation()},children:R("federated.status.rejected")}),P.status==="revoked"&&e.jsx(Q,{variant:"contained",color:"secondary",size:"small",onClick:I=>{I.stopPropagation()},children:R("federated.status.revoked")})]}):e.jsxs(e.Fragment,{children:[e.jsx(Q,{variant:"contained",color:"error",size:"small",onClick:I=>{I.stopPropagation(),a(P)},children:R("federated.quitMember")},"quiteSite"),P.status==="pending"&&e.jsx(Q,{variant:"contained",color:"primary",size:"small",onClick:I=>{I.stopPropagation(),c(P)},children:R("federated.status.pending")},"auditSite"),P.status==="approved"&&e.jsx(Q,{variant:"contained",color:"error",size:"small",onClick:I=>{I.stopPropagation(),o(P)},style:{whiteSpace:"nowrap"},children:R("federated.revoke")},"revokeSite"),P.status==="revoked"&&e.jsx(Q,{variant:"contained",color:"warning",size:"small",onClick:I=>{I.stopPropagation(),h(P)},style:{whiteSpace:"nowrap"},children:R("federated.approve")},"approveSite")]})})}}}),S},[t.appId,u,l,R]),v=Ce(()=>({sort:!0,download:!1,filter:!1,print:!1,expandableRowsOnClick:!0,onRowClick(S,{dataIndex:O}){const P=u[O];s(P)}}),[]),k=E(()=>{const S=b.environments.find(O=>O.key===te.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL);S?.value?C.current?.open({link:S.value}):V.error(R("federated.failedToGetFederatedLoginLink"))},[b.site?.domainAliases?.[0]?.href]),w=E(()=>{r.open({title:R("federated.quitFederatedLogin"),content:R("federated.quitFederatedLoginDescription"),confirmButtonText:R("common.confirm"),cancelButtonText:R("common.cancel"),confirmButtonProps:{color:"error"},async onConfirm(S){await f.quitFederatedLogin({input:{did:b.appPid}}),S()}})}),d=E(()=>{r.open({title:R("federated.disbandFederatedLogin"),content:R("federated.disbandFederatedLoginDescription"),confirmButtonText:R("common.confirm"),cancelButtonText:R("common.cancel"),confirmButtonProps:{color:"error"},async onConfirm(S){await f.disbandFederatedLogin({input:{did:b.appPid}}),S()}})}),y=E(async()=>{try{n.loadingSync=!0,await Promise.all([await f.syncFederatedConfig({input:{did:b.appPid}}),yr(500)]),V.success(R("common.succeeded"))}finally{n.loadingSync=!1}}),j=[];return i.status!=="pending"&&j.push(e.jsx(se,{title:R("federated.syncConfig"),children:e.jsx(re,{size:"small",onClick:y,disabled:n.loadingSync,sx:[{"@keyframes spin":{from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}}},n.loadingSync?{animation:"spin 1s linear infinite"}:{}],children:e.jsx(K,{icon:Kn,style:{fontSize:24}})},"syncConfig")})),x==="master"?(j.push(e.jsx(Q,{size:"small",variant:"contained",onClick:k,sx:{ml:1},children:R("federated.inviteJoinFederatedLogin")},"inviteJoinFederatedLogin")),j.push(e.jsx(Q,{color:"error",size:"small",variant:"contained",onClick:d,sx:{ml:1},children:R("federated.disbandFederatedLogin")},"disbandFederatedLogin"))):j.push(e.jsx(Q,{size:"small",variant:"contained",color:"error",onClick:w,sx:{ml:1},children:R("federated.quitFederatedLogin")},"quitFederatedLogin")),e.jsxs(e.Fragment,{children:[e.jsx(Ve,{className:"main-table",locale:_,data:u,columns:g,customButtons:j,title:e.jsx(A,{className:"table-toolbar-left",children:R("oauth.federated")}),options:v}),p,e.jsx(xt,{ref:C}),e.jsx(xs,{ref:$})]})}bs.propTypes={mode:T.oneOf(["member","master"])};function js({ref:x=null}){const{t:C}=L.useContext(ce),{api:$}=ne(),{blocklet:R}=le(),_=R?.appPid,m=Re()?.transitions?.duration?.leavingScreen||300,r=ge({loading:!1,show:!1,appUrl:"",appUrlError:"",callback:de}),p=E(()=>{r.appUrl="",r.appUrlError="",r.callback=de}),f=E(()=>{r.show=!1,setTimeout(()=>{p()},m)}),u=E((i=de)=>{r.show=!0,r.callback=i});L.useImperativeHandle(x,()=>({open:u,close:f}),[u,f]);const t=E(i=>{if(!i)throw new Error(C("federated.federatedJoinAppUrlRequired"));if(!vr(i))throw new Error(C("federated.federatedJoinAppUrlInvalid"))}),l=E(async()=>{try{t(r.appUrl),r.loading=!0;const i=await $.joinFederatedLogin({input:{did:_,appUrl:r.appUrl}});r.show=!1,f(),r?.callback(i)}catch(i){r.appUrlError=i.message}finally{r.loading=!1}});return e.jsxs(_e,{open:r.show,title:C("federated.joinFederatedLogin"),onClose:f,PaperProps:{style:{minHeight:"unset"}},actions:e.jsxs(Q,{color:"primary",autoFocus:!0,variant:"contained",onClick:l,disabled:r.loading,children:[r.loading?e.jsx(Se,{size:16,sx:{mr:1},color:"grey"}):null,C("common.confirm")]}),children:[e.jsx(A,{sx:{mb:1},children:C("federated.joinFederatedLoginDescription")}),e.jsx(U,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:C("federated.federatedJoinAppUrl"),label:C("federated.federatedJoinAppUrl"),value:r.appUrl,error:!!r.appUrlError,helperText:r.appUrlError||"eg: https://www.arcblock.io",onChange:i=>{r.appUrl=i.target.value}})]})}js.propTypes={ref:T.any};function Xn(){const{t:x}=L.useContext(ce);return e.jsxs(ae,{direction:"row",spacing:2,sx:{alignItems:"flex-start",p:2},children:[e.jsx(Qr,{fontSize:"large",color:"primary"}),e.jsxs(A,{children:[e.jsx(J,{variant:"h6",gutterBottom:!0,children:x("federated.title")}),e.jsx(J,{variant:"body2",sx:{color:"text.secondary"},children:x("federated.description")}),e.jsx(xr,{href:"https://www.arcblock.io/blog/zh/did-connect-federated-login-support",underline:"hover",variant:"body2",color:"primary",target:"_blank",sx:{display:"inline-flex",alignItems:"center",mt:1},children:x("federated.link")})]})]})}function Qn(){const x=L.useRef(null),C=L.useRef(null),{t:$}=L.useContext(ce),{blocklet:R,actions:{refreshBlocklet:_}}=le(),b=E(()=>{const r=R.site?.domainAliases?.[0]?.href;if(r)try{const p=new URL(r);x.current?.open({link:p.origin})}catch{V.error($("federated.failedToGetFederatedLoginLink"))}},[R.site?.domainAliases?.[0]?.href]),m=E(()=>{C.current?.open(()=>{_()})});if(R.settings.federated?.sites.length>0){const r=R.settings.federated?.config.isMaster!==!1;return e.jsx(bs,{mode:r?"master":"member"})}return e.jsxs(e.Fragment,{children:[e.jsx(A,{sx:{display:"flex",flexDirection:"column",gap:2,justifyContent:"center",alignItems:"center",minHeight:"200px"},children:e.jsxs(A,{sx:{maxWidth:400,borderRadius:2,border:"1px solid",borderColor:"divider"},children:[e.jsx(Xn,{}),e.jsx(X,{sx:{width:1}}),e.jsxs(ae,{sx:{width:1,p:2,gap:1.5},children:[e.jsx(Q,{variant:"contained",onClick:b,sx:{width:1},children:$("federated.inviteJoinFederatedLogin")}),e.jsx(Q,{variant:"outlined",onClick:m,sx:{width:1},children:$("federated.joinFederatedLogin")})]})]})}),e.jsx(xt,{ref:x}),e.jsx(js,{ref:C})]})}function _s({orientation:x="horizontal"}){const{t:C}=L.useContext(ce),$=ns({key:"lg"}),R=[{label:e.jsx(A,{sx:{textAlign:"center",width:"100%"},children:C("oauth.commonSettings")}),value:"settings"},{label:e.jsx(A,{sx:{textAlign:"center",width:"100%"},children:C("oauth.federated")}),value:"federated"},{label:e.jsx(A,{sx:{textAlign:"center",width:"100%"},children:C("oauth.oauth")}),value:"oauth"},{label:e.jsx(A,{sx:{textAlign:"center",width:"100%"},children:C("oauth.moreLogin")}),value:"more"}],[_,b]=L.useState(R[0].value),m=Ce(()=>({oauth:e.jsx(Un,{}),federated:e.jsx(Qn,{}),more:e.jsx(Nr,{children:C("oauth.comingSoon")}),settings:e.jsx(Wn,{})}),[C]);return x==="vertical"?e.jsx(ea,{children:e.jsxs(ae,{direction:{md:"column",lg:"row"},sx:{gap:2},children:[e.jsx(A,{sx:{minWidth:"240px",flexShrink:0},children:e.jsx(He,{tabs:R,current:_,orientation:$?"horizontal":"vertical",onChange:b,sx:{borderRight:$?0:1,height:"100%",borderColor:"divider"}})}),e.jsx(A,{sx:{flexGrow:1,minWidth:0},children:e.jsx(A,{sx:{maxWidth:"1200px"},children:m[_]})})]})}):e.jsxs(A,{children:[e.jsx(He,{tabs:R,current:_,onChange:b}),e.jsx(A,{sx:{marginTop:"10px"},children:m[_]})]})}_s.propTypes={orientation:T.oneOf(["horizontal","vertical"])};const ea=ye.div`
133
- .MuiTab-root {
134
- text-align: left;
135
- align-items: flex-start;
136
- font-weight: normal;
137
-
138
- div {
139
- text-align: left;
140
- }
141
- }
142
-
143
- .Mui-selected {
144
- font-weight: bold;
145
- }
146
- `,ta={width:24,height:24,body:'<path fill="currentColor" d="M11 14.2V6q0-.425.288-.713T12 5q.425 0 .713.288T13 6v8.2l2.9-2.9q.275-.275.7-.275t.7.275q.275.275.275.7t-.275.7l-4.6 4.6q-.3.3-.7.3t-.7-.3l-4.6-4.6q-.275-.275-.275-.7t.275-.7q.275-.275.7-.275t.7.275l2.9 2.9Z"/>'},sa={width:24,height:24,body:'<path fill="currentColor" d="m11 8.8l-2.9 2.9q-.275.275-.7.275t-.7-.275q-.275-.275-.275-.7t.275-.7l4.6-4.6q.3-.3.7-.3t.7.3l4.6 4.6q.275.275.275.7t-.275.7q-.275.275-.7.275t-.7-.275L13 8.8V17q0 .425-.288.713T12 18q-.425 0-.713-.288T11 17V8.8Z"/>'},bt={width:24,height:24,body:'<path fill="currentColor" d="M7 21q-.825 0-1.413-.588T5 19V6q-.425 0-.713-.288T4 5q0-.425.288-.713T5 4h4q0-.425.288-.713T10 3h4q.425 0 .713.288T15 4h4q.425 0 .713.288T20 5q0 .425-.288.713T19 6v13q0 .825-.588 1.413T17 21H7Zm2-4h2V8H9v9Zm4 0h2V8h-2v9Z"/>'},jt={width:24,height:24,body:'<path fill="currentColor" d="M4 21q-.425 0-.713-.288T3 20v-2.425q0-.4.15-.763t.425-.637L16.2 3.575q.3-.275.663-.425t.762-.15q.4 0 .775.15t.65.45L20.425 5q.3.275.437.65T21 6.4q0 .4-.138.763t-.437.662l-12.6 12.6q-.275.275-.638.425t-.762.15H4ZM17.6 7.8L19 6.4L17.6 5l-1.4 1.4l1.4 1.4Z"/>'};function ws({enabled:x,showUp:C=!0,showDown:$=!0,showSwitch:R=!0,showDelete:_=!0,showEdit:b=!0,disableEdit:m=!1,disableSwitch:r=!1,onClickUp:p=()=>{},onClickDown:f=()=>{},onClickSwitch:u=()=>{},onClickDelete:t=()=>{},onClickEdit:l=()=>{}}){const{t:i}=ie();return e.jsxs(A,{sx:{display:"flex",alignItems:"center",gap:0},onClick:n=>n.stopPropagation(),children:[b?e.jsx(se,{title:i("common.edit"),children:e.jsx(re,{size:"small",onClick:l,color:"success",disabled:m,children:e.jsx(K,{icon:jt,fontSize:18})})}):null,_?e.jsx(se,{title:i("common.delete"),children:e.jsx(re,{size:"small",onClick:t,color:"error",children:e.jsx(K,{icon:bt,fontSize:18})})}):null,R?e.jsx(se,{title:i(x?"common.enabled":"common.disabled"),children:e.jsx(pe,{size:"small",checked:x,onClick:u,disabled:r})}):null,C?e.jsx(se,{title:i("common.moveUp"),children:e.jsx(re,{size:"small",onClick:p,disabled:m,children:e.jsx(K,{icon:sa,fontSize:20})})}):null,$?e.jsx(se,{title:i("common.moveDown"),children:e.jsx(re,{size:"small",onClick:f,disabled:m,children:e.jsx(K,{icon:ta,fontSize:20})})}):null]})}ws.propTypes={enabled:T.bool.isRequired,showUp:T.bool,showDown:T.bool,showSwitch:T.bool,showDelete:T.bool,showEdit:T.bool,disableEdit:T.bool,disableSwitch:T.bool,onClickUp:T.func,onClickDown:T.func,onClickSwitch:T.func,onClickDelete:T.func,onClickEdit:T.func};function ks({ref:x=null}){const{t:C}=L.useContext(ce),{blocklet:$}=le(),{api:R}=ne(),_=$?.meta?.did,m=Re()?.transitions?.duration?.leavingScreen||300,r=ge({mode:"add",show:!1,isDefaultRule:!1,callback:de,get dialogTitle(){return this.mode==="edit"?C("securityRule.edit"):this.mode==="view"?C("securityRule.view"):C("securityRule.add")}}),p=Me(async()=>{const{accessPolicies:S}=await R.getBlockletAccessPolicies({input:{did:_}});return ze(S,O=>O.isProtected?1:0)},{manual:!0}),f=Me(async()=>{const{responseHeaderPolicies:S}=await R.getBlockletResponseHeaderPolicies({input:{did:_}});return ze(S,O=>O.isProtected?1:0)},{manual:!0}),{handleSubmit:u,control:t,watch:l,setValue:i,getValues:n,reset:s,formState:{errors:c}}=we({mode:"onChange",defaultValues:{componentDid:"",pathPattern:"",responseHeaderPolicyId:"",accessPolicyId:"",remark:""}}),a=E(()=>{s(),r.mode="add"}),o=E(()=>{r.show=!1,setTimeout(()=>{a()},m)}),h=E((S,O=null)=>{r.show=!0,O&&(r.isDefaultRule=O.id===W.SECURITY_RULE_DEFAULT_ID,r.mode="edit",i("componentDid",O.componentDid),i("pathPattern",O.pathPattern),i("responseHeaderPolicyId",O.responseHeaderPolicyId),i("accessPolicyId",O.accessPolicyId),i("remark",O.remark||"")),S?r.callback=S:r.mode="view",p.run(),f.run()});L.useImperativeHandle(x,()=>({open:h,close:o}),[h,o]);const g=E(()=>{const[S,O]=n(["accessPolicyId","responseHeaderPolicyId"]);return!S&&!O?C("securityRule.form.accessPolicyOrResponseHeaderPolicyRequired"):!0}),v=E(S=>{const O=g();O===!0?r.callback(S,o):V.error(O)}),k=l("componentDid"),w=E(S=>{const O=S?.trim();if(!O)return C("common.requiredErrorText",{name:C("securityRule.form.pathPattern")});if(k){if(O.startsWith("/"))return C("securityRule.form.pathPatternErrorText")}else if(!O.startsWith("/")&&O!=="*")return C("securityRule.form.pathPatternErrorText");return!0}),d=E(S=>S?.trim()?!0:C("common.requiredErrorText",{name:C("securityRule.form.accessPolicy")})),y=E(S=>S?.trim()?!0:C("common.requiredErrorText",{name:C("securityRule.form.responseHeaderPolicy")})),j=Ce(()=>{const O=($?.children||[]).find(P=>P.meta.did===k);return O?.mountPoint?br(O.mountPoint):null},[$,k]);return e.jsx(_e,{open:r.show,title:r.dialogTitle,onClose:o,PaperProps:{style:{minHeight:"unset"}},actions:e.jsx(Q,{color:"primary",autoFocus:!0,variant:"contained",onClick:u(v),children:C("common.confirm")}),children:e.jsxs("form",{noValidate:!0,autoComplete:"off",children:[r.isDefaultRule?null:e.jsx(F,{name:"componentDid",control:t,render:({field:S})=>e.jsx(Ke,{fullWidth:!0,margin:"dense",size:"small",label:C("securityRule.form.component"),placeholer:C("securityRule.form.componentPlaceholder"),options:$.children.map(O=>({title:O.meta.title,value:O.meta.did,description:O.mountPoint})),error:!!c?.componentDid?.message,helperText:c?.componentDid?.message||"Choose belong to component",...Te(S,"ref"),readOnly:r.mode==="view"})}),e.jsx(F,{name:"pathPattern",control:t,rules:{validate:w},render:({field:S})=>e.jsx(U,{fullWidth:!0,required:!0,margin:"dense",size:"small",placeholder:C("securityRule.form.pathPatternPlaceholder"),label:C("securityRule.form.pathPattern"),error:!!c?.pathPattern?.message,helperText:c?.pathPattern?.message||"/abc/bcd or /abc or /abc/*",...S,disabled:r.isDefaultRule||r.mode==="view",slotProps:{input:{startAdornment:j?e.jsx(Vt,{position:"start",children:j}):null}}})}),e.jsx(F,{name:"accessPolicyId",control:t,rules:{validate:r.isDefaultRule?d:de},render:({field:S})=>e.jsx(Ke,{fullWidth:!0,required:r.isDefaultRule,margin:"dense",size:"small",label:C("securityRule.form.accessPolicy"),placeholer:C("securityRule.form.accessPolicyPlaceholder"),options:(p.data||[]).map(O=>({value:O.id,title:O.name,description:O.description})),error:!!c?.accessPolicyId?.message,helperText:c?.accessPolicyId?.message||C("securityRule.form.accessPolicyHelperText"),...Te(S,"ref"),disabled:r.mode==="view"})}),e.jsx(F,{name:"responseHeaderPolicyId",control:t,rules:{validate:r.isDefaultRule?y:de},render:({field:S})=>e.jsx(Ke,{fullWidth:!0,required:r.isDefaultRule,margin:"dense",size:"small",label:C("securityRule.form.responseHeaderPolicy"),placeholer:C("securityRule.form.responseHeaderPolicyPlaceholder"),options:(f.data||[]).map(O=>({title:O.name,value:O.id,description:O.description})),error:!!c?.responseHeaderPolicyId?.message,helperText:c?.responseHeaderPolicyId?.message||C("securityRule.form.responseHeaderPolicyHelperText"),...Te(S,"ref"),disabled:r.mode==="view"})}),e.jsx(F,{name:"remark",control:t,render:({field:S})=>e.jsx(U,{fullWidth:!0,multiline:!0,minRows:3,maxRows:7,size:"small",margin:"dense",placeholder:C("securityRule.form.remarkPlaceholder"),label:C("securityRule.form.remark"),helperText:c?.message,...S,disabled:r.mode==="view"})})]})})}ks.propTypes={ref:T.any};const fe=async(x,C="Failed to saved")=>{try{await x()}catch($){V.error($?.message||C)}};function ra(){const{t:x,locale:C}=ie(),{blocklet:$}=le(),{api:R}=ne(),_=$?.meta?.did,b=Re(),m=L.useRef(null),r=L.useRef(null),{confirmApi:p,confirmHolder:f}=Fe(),u=Me(async()=>{const{securityRules:d}=await R.getBlockletSecurityRules({input:{did:_,includeDisabled:!0}});return d}),t=d=>d.id===W.SECURITY_RULE_DEFAULT_ID,l=E(d=>($?.children||[]).find(j=>j.meta.did===d)?.mountPoint),i=(u.data||[]).map(d=>{if(d.componentDid){const y=l(d.componentDid);d._disabled=y===void 0}return d}),n=i.filter(d=>!t(d)),s=(d,y)=>{fe(async()=>{const j=d.target.checked;await R.updateBlockletSecurityRule({input:{did:_,data:{id:y.id,enabled:j}}}),V.success(x("common.succeeded")),u.run()})},c=(d,y,j)=>{fe(async()=>{const S=j-1,O=i[S];await Promise.all([R.updateBlockletSecurityRule({input:{did:_,data:{id:y.id,priority:O.priority}}}),R.updateBlockletSecurityRule({input:{did:_,data:{id:O.id,priority:y.priority}}})]),V.success(x("common.succeeded")),u.run()})},a=(d,y,j)=>{fe(async()=>{const S=j+1,O=i[S];await Promise.all([R.updateBlockletSecurityRule({input:{did:_,data:{id:y.id,priority:O.priority}}}),R.updateBlockletSecurityRule({input:{did:_,data:{id:O.id,priority:y.priority}}})]),V.success(x("common.succeeded")),u.run()})},o=()=>{m.current.open((d,y)=>{fe(async()=>{await R.addBlockletSecurityRule({input:{did:_,data:d}}),V.success(x("common.succeeded")),u.run(),y()})})},h=(d,y)=>{m.current.open((j,S)=>{fe(async()=>{await R.updateBlockletSecurityRule({input:{did:_,data:{...j,id:y.id}}}),V.success(x("common.succeeded")),u.run(),S()})},y)},g=(d,y)=>{p.open({title:x("securityRule.delete.title"),content:x("securityRule.delete.description"),confirmButtonText:x("common.confirm"),confirmButtonProps:{color:"error"},cancelButtonText:x("common.cancel"),onConfirm(j){fe(async()=>{await R.deleteBlockletSecurityRule({input:{did:_,id:y.id}}),V.success(x("common.succeeded")),u.run(),j()})}})},v={sort:!1,download:!1,filter:!1,print:!1,search:!1,viewColumns:!1,expandableRowsOnClick:!0,searchDebounceTime:600,onRowClick(d,{dataIndex:y},j){if(r.current?.contains(j.target)){const S=i[y];m.current.open(void 0,S)}},setRowProps:(d,y)=>i[y]._disabled?{title:x("securityRule.useless"),style:{backgroundColor:b.palette.action.disabledBackground,cursor:"default"}}:{}},k=[e.jsx(Y,{size:"small",variant:"outlined",onClick:()=>{u.run()},sx:{mr:1},children:x("common.refresh")},"refresh"),e.jsx(Y,{size:"small",variant:"contained",onClick:o,children:x("common.add")})],w=[{label:x("securityRule.form.pathPattern"),name:"pathPattern",options:{customBodyRenderLite(d){const y=i[d];return e.jsx(A,{sx:{whiteSpace:"nowrap"},children:y.id===W.SECURITY_RULE_DEFAULT_ID?"Default":Ut(l(y.componentDid),y.pathPattern)})}}},{label:x("responseHeaderPolicy.title"),name:"responseHeaderPolicy",options:{customBodyRenderLite(d){return i[d].responseHeaderPolicy?.name}}},{label:x("accessPolicy.title"),name:"accessPolicyId",options:{customBodyRenderLite(d){return i[d].accessPolicy?.name}}},{label:x("securityRule.form.remark"),name:"remark"},{label:x("common.actions"),name:"",width:100,align:"center",verticalKeyAlign:"center",options:{customBodyRenderLite(d){const y=i[d],j=t(y);return e.jsx(ws,{disableEdit:y._disabled,disableSwitch:y._disabled,enabled:y.enabled,showSwitch:!j,showDelete:!j,showUp:d>0&&!j,showDown:d<n.length-1&&!j,onClickSwitch:S=>{s(S,y)},onClickUp:S=>{c(S,y,d)},onClickDown:S=>{a(S,y,d)},onClickEdit:S=>{h(S,y)},onClickDelete:S=>{g(S,y)}})}}}].filter(Boolean);return e.jsxs(A,{sx:{display:"flex",flexDirection:"column",gap:2},ref:r,children:[e.jsx(Ve,{verticalKeyWidth:100,locale:C,title:e.jsxs(A,{sx:{display:"flex",alignItems:"center",gap:1},children:[x("securityRule.title")," ",e.jsx(J,{variant:"body2",children:x("securityRule.sortByDescription")})]}),data:i,columns:w,customButtons:k,options:v,loading:u.loading}),e.jsx(ks,{ref:m}),f]})}const Ss={width:24,height:24,body:'<path fill="currentColor" d="M5 21q-.825 0-1.413-.588T3 19V5q0-.825.588-1.413T5 3h14q.825 0 1.413.588T21 5v14q0 .825-.588 1.413T19 21H5Zm0-2h14V7H5v12Zm7-2q-2.05 0-3.663-1.113T6 13q.725-1.775 2.337-2.888T12 9q2.05 0 3.663 1.113T18 13q-.725 1.775-2.337 2.888T12 17Zm0-2.5q-.625 0-1.063-.438T10.5 13q0-.625.438-1.063T12 11.5q.625 0 1.063.438T13.5 13q0 .625-.438 1.063T12 14.5Zm0 1q1.05 0 1.775-.725T14.5 13q0-1.05-.725-1.775T12 10.5q-1.05 0-1.775.725T9.5 13q0 1.05.725 1.775T12 15.5Z"/>'},Cs=[{value:W.WHO_CAN_ACCESS.ALL,icon:zr,title:{zh:"面向所有人",en:"Open to Everyone"},description:{zh:"任何人都可以访问应用而不需要身份验证。",en:"Anyone can access this blocklet without authenticating."}},{value:W.WHO_CAN_ACCESS.INVITED,icon:en,title:{zh:"仅限受邀",en:"Invite-Only Access"},description:{zh:"仅限受邀用户可访问应用。",en:"Only invited members can access."}},{value:W.WHO_CAN_ACCESS.ADMIN,icon:nn,title:{zh:"仅限拥有者 & 管理员",en:"Owner & Admin Access."},description:{zh:"仅限拥有者或管理员访问应用。",en:"Only the owner or an admin can access it."}},{value:W.WHO_CAN_ACCESS.OWNER,icon:ot,title:{zh:"仅限拥有者",en:"Owner-Only Access"},description:{zh:"仅限拥有者访问应用。",en:"Only the blocklet owner can access it."}}];function Rs({value:x,onChange:C,...$}){const R="roles",_="roles_reverse",{t:b,locale:m}=ie(),r=[...Cs,{value:R,icon:Yr,title:{zh:"指定通行证可访问",en:"Accessible to selected passports"},description:{zh:"只有指定的通行证可以访问",en:"Only specified passports can access"}},{value:_,icon:tn,title:{zh:"指定通行证不可以访问",en:"Accessible to not selected passports"},description:{zh:"只有指定的通行证不可以访问",en:"Only specified passports can't access"}}];return e.jsx(U,{...$,label:b("blocklet.config.access.description"),select:!0,fullWidth:!0,value:x,onChange:C,slotProps:{select:{renderValue:p=>{const f=r.find(u=>u.value===p);return f?e.jsxs(A,{children:[e.jsx(A,{component:f.icon,sx:{mr:1,fontSize:18,verticalAlign:"text-bottom",color:"text.secondary"}}),f.title[m]||f.title.en]}):null}}},children:r.map(p=>e.jsxs(Bt,{value:p.value,sx:{display:"block","& .tip":{fontSize:"12px",color:`${({theme:f})=>f.palette.text.secondary}`}},children:[e.jsxs(A,{sx:{display:"flex",alignItems:"center"},children:[e.jsx(A,{component:p.icon,sx:{mr:1,fontSize:18,verticalAlign:"text-bottom",color:"text.secondary"}}),e.jsx(A,{children:p.title[m]||p.title.en})]}),e.jsx(A,{className:"tip",children:p.description[m]||p.description.en})]}))})}Rs.propTypes={value:T.string,onChange:T.func};const $s=x=>{const C={name:x.name,description:x.description},{roles:$=null,reverse:R}=x;return $===null?R===!1&&(C.whoCanAccess=W.WHO_CAN_ACCESS.ALL,C.roles=null):$.length===0&&R===!0?(C.whoCanAccess=W.WHO_CAN_ACCESS.INVITED,C.roles=[]):St($,[W.WHO_CAN_ACCESS.OWNER])&&R===!1?(C.whoCanAccess=W.WHO_CAN_ACCESS.OWNER,C.roles=[W.WHO_CAN_ACCESS.OWNER]):St($,[W.WHO_CAN_ACCESS.OWNER,W.WHO_CAN_ACCESS.ADMIN])&&R===!1?(C.whoCanAccess=W.WHO_CAN_ACCESS.ADMIN,C.roles=[W.WHO_CAN_ACCESS.OWNER,W.WHO_CAN_ACCESS.ADMIN]):(C.whoCanAccess=R?"roles_reverse":"roles",C.roles=$),C},na=x=>{const C={name:x.name,description:x.description},{roles:$=null,whoCanAccess:R}=x;return R==="roles"?(C.roles=$,C.reverse=!1):R==="roles_reverse"?(C.roles=$,C.reverse=!0):R===W.WHO_CAN_ACCESS.ALL?(C.roles=null,C.reverse=!1):R===W.WHO_CAN_ACCESS.INVITED?(C.roles=[],C.reverse=!0):R===W.WHO_CAN_ACCESS.OWNER?(C.roles=[W.WHO_CAN_ACCESS.OWNER],C.reverse=!1):R===W.WHO_CAN_ACCESS.ADMIN&&(C.roles=[W.WHO_CAN_ACCESS.OWNER,W.WHO_CAN_ACCESS.ADMIN],C.reverse=!1),C},aa=x=>x instanceof Object?{origin:x.origin?{override:x.origin?.override??!0,value:x.origin?.value?.join(`
147
- `),smart:x.origin?.smart??!0}:void 0,methods:x.methods,allowedHeaders:x.allowedHeaders?{override:x.allowedHeaders?.override??!0,value:x.allowedHeaders?.value?.join(`
148
- `)}:void 0,exposedHeaders:x.exposedHeaders?{override:x.exposedHeaders?.override??!0,value:x.exposedHeaders?.value?.join(`
149
- `)}:void 0,maxAge:x.maxAge,optionsSuccessStatus:x.optionsSuccessStatus,preflightContinue:x.preflightContinue,credentials:x.credentials}:void 0,ia=x=>x instanceof Object?{origin:{override:x.origin?.override,value:x.origin?.value?.split(`
150
- `).filter($=>$),smart:x.origin?.smart},methods:x.methods,allowedHeaders:{override:x.allowedHeaders?.override,value:x.allowedHeaders?.value?.split(`
151
- `).filter($=>$)},exposedHeaders:{override:x.exposedHeaders?.override,value:x.exposedHeaders?.value?.split(`
152
- `).filter($=>$)},maxAge:x.maxAge,optionsSuccessStatus:x.optionsSuccessStatus,preflightContinue:x.preflightContinue,credentials:x.credentials}:void 0,oa=x=>x instanceof Object?{contentSecurityPolicy:x.contentSecurityPolicy,referrerPolicy:x.referrerPolicy,xFrameOptions:x.xFrameOptions,xPoweredBy:x.xPoweredBy,xXssProtection:x.xXssProtection}:void 0,la=x=>x instanceof Object?{contentSecurityPolicy:x.contentSecurityPolicy,referrerPolicy:x.referrerPolicy,xFrameOptions:x.xFrameOptions,xPoweredBy:x.xPoweredBy,xXssProtection:x.xXssProtection}:void 0,ca=x=>{const C=Jt(x);if(x.securityHeader)try{C.securityHeader=JSON.parse(x.securityHeader)}catch{C.securityHeader=null}if(x.cors)try{C.cors=JSON.parse(x.cors)}catch{C.cors=null}return C};function As({ref:x=null}){const{t:C}=L.useContext(ce),{roles:$}=Ne(),_=Re()?.transitions?.duration?.leavingScreen||300,b=ge({mode:"add",show:!1,callback:de,get dialogTitle(){return this.mode==="edit"?C("accessPolicy.edit"):this.mode==="view"?C("accessPolicy.view"):C("accessPolicy.add")}}),{handleSubmit:m,control:r,watch:p,setValue:f,reset:u,formState:{errors:t}}=we({mode:"onChange",defaultValues:{name:"",description:"",roles:null,whoCanAccess:"all"}}),l=E(()=>{u(),b.mode="add"}),i=E(()=>{b.show=!1,setTimeout(()=>{l()},_)}),n=E((v=de,k=null)=>{if(b.callback=v,b.show=!0,k){k.id?b.mode="edit":b.mode="view";const w=$s(k);f("name",w.name),f("description",w.description),f("roles",w.roles),f("whoCanAccess",w.whoCanAccess)}});L.useImperativeHandle(x,()=>({open:n,close:i}),[n,i]);const s=E(v=>{b.callback(na(v),i)}),c=E(v=>v?.trim()?!0:C("common.requiredErrorText",{name:C("accessPolicy.form.name")})),a=p("whoCanAccess"),o=b.mode==="view",h=E(v=>["roles","roles_reverse"].includes(a)&&(!v||v?.length===0)?C("common.requiredErrorText",{name:C("accessPolicy.form.roles")}):!0),g=E(v=>v?.trim()?!0:C("common.requiredErrorText",{name:C("accessPolicy.form.accessType")}));return e.jsx(_e,{open:b.show,title:b.dialogTitle,onClose:i,PaperProps:{style:{minHeight:"unset"}},actions:e.jsx(Q,{color:"primary",autoFocus:!0,variant:"contained",onClick:m(s),children:C("common.confirm")}),children:e.jsxs("form",{noValidate:!0,autoComplete:"off",children:[e.jsx(F,{name:"name",control:r,rules:{validate:c},render:({field:v})=>e.jsx(U,{fullWidth:!0,required:!0,margin:"dense",size:"small",disabled:o,placeholder:C("accessPolicy.form.namePlaceholder"),label:C("accessPolicy.form.name"),error:!!t?.name?.message,helperText:t?.name?.message||" ",...v})}),e.jsx(F,{name:"whoCanAccess",control:r,rules:{validate:g},render:({field:v})=>e.jsx(Rs,{required:!0,size:"small",margin:"dense",disabled:o,error:!!t?.whoCanAccess?.message,helperText:t?.whoCanAccess?.message||" ",...v})}),["roles","roles_reverse"].includes(a)?e.jsx(F,{name:"roles",rules:{validate:h},control:r,render:({field:v})=>e.jsxs(ee,{variant:"standard",error:!!t?.roles?.message,children:[e.jsx(Be,{sx:{display:"flex",flexDirection:"row",mt:-3},children:$.map(k=>e.jsx(G,{control:e.jsx(Pe,{disabled:o,size:"small",checked:v.value?.includes(k.name),sx:{p:.75},onChange:(w,d)=>{const y=v.value||[];d?v.onChange([...y,k.name]):v.onChange(y.filter(j=>j!==k.name))}}),label:k.title},k.name))}),e.jsx(ut,{sx:{transform:"translateY(-8px)"},children:t?.roles?.message||" "})]})}):null,e.jsx(F,{name:"description",control:r,render:({field:v})=>e.jsx(U,{fullWidth:!0,multiline:!0,disabled:o,minRows:3,maxRows:7,margin:"dense",size:"small",placeholder:C("accessPolicy.form.descriptionPlaceholder"),label:C("accessPolicy.form.description"),helperText:t?.message,...v})})]})})}As.propTypes={ref:T.any};function da(){const{t:x,locale:C}=ie(),{blocklet:$}=le(),{api:R}=ne(),{roles:_}=Ne(),b=$?.meta?.did,m=L.useRef(null),r=L.useRef(null),{confirmApi:p,confirmHolder:f}=Fe(),u=()=>{},t=Me(async()=>{const{accessPolicies:g}=await R.getBlockletAccessPolicies({input:{did:b}});return ze(g,v=>v.isProtected?1:0)}),l=t.data||[],i=E(()=>{r.current.open((g,v)=>{fe(async()=>{await R.addBlockletAccessPolicy({input:{did:b,data:g}}),V.success(x("common.succeeded")),t.run(),v()})})}),n=E(g=>{r.current.open((v,k)=>{fe(async()=>{await R.updateBlockletAccessPolicy({input:{did:b,data:{...v,id:g.id}}}),V.success(x("common.succeeded")),t.run(),k()})},g)}),s=E(g=>{r.current.open((v,k)=>{k()},Te(g,["id"]))}),c=E(g=>{p.open({title:x("accessPolicy.delete.title"),content:x("accessPolicy.delete.description"),confirmButtonText:x("common.confirm"),confirmButtonProps:{color:"error"},cancelButtonText:x("common.cancel"),onConfirm(v){fe(async()=>{await R.deleteBlockletAccessPolicy({input:{did:b,id:g.id}}),V.success(x("common.succeeded")),t.run(),v()})}})}),a={sort:!1,download:!1,filter:!1,print:!1,search:!1,viewColumns:!1,expandableRowsOnClick:!0,searchDebounceTime:600,onRowClick(g,{dataIndex:v},k){if(m.current?.contains(k.target)){const w=l[v];s(w)}}},o=[e.jsx(Y,{size:"small",variant:"outlined",onClick:()=>{t.run()},sx:{mr:1},children:x("common.refresh")},"refresh"),e.jsx(Y,{size:"small",variant:"contained",onClick:i,children:x("common.add")})],h=[{label:x("accessPolicy.form.name"),name:"name",options:{customBodyRenderLite(g){const v=l[g],k=v.isProtected?e.jsx(se,{title:"Built-in policy, can't edit",children:e.jsx(A,{component:K,icon:Kt,sx:{fontSize:16}})}):null;return e.jsxs(A,{sx:{display:"flex",alignItems:"center",gap:.5},children:[k," ",v.name]})}}},{label:x("accessPolicy.form.roles"),name:"roles",options:{customBodyRenderLite(g){const v=l[g],k=$s(v);if([W.WHO_CAN_ACCESS.ALL,W.WHO_CAN_ACCESS.INVITED].includes(k.whoCanAccess)){const d=Cs.find(y=>y.value===k.whoCanAccess);return d.title?.[C]||d.title?.en}const w=_.filter(d=>v.reverse?!k.roles?.includes(d.name):k.roles?.includes(d.name));return e.jsx(A,{sx:{display:"flex",gap:1,flexWrap:"wrap"},children:w.map(d=>e.jsx(se,{title:d.description,children:e.jsx(ht,{size:"small",label:d.title},d.name)}))})}}},{label:x("accessPolicy.form.description"),name:"description"},{label:x("common.actions"),name:"",width:100,align:"center",verticalKeyAlign:"center",options:{customBodyRenderLite(g){const v=l[g];return e.jsxs(A,{sx:{display:"flex",alignItems:"center",gap:0},onClick:k=>k.stopPropagation(),children:[v.isProtected?e.jsx(se,{title:x("common.view"),children:e.jsx(re,{size:"small",onClick:()=>{s(v,g)},children:e.jsx(K,{icon:Ss,fontSize:18})})}):null,v.isProtected?null:e.jsx(se,{title:x("common.edit"),children:e.jsx(re,{size:"small",onClick:()=>{n(v,g)},color:"success",children:e.jsx(K,{icon:jt,fontSize:18})})}),v.isProtected?null:e.jsx(se,{title:x("common.delete"),children:e.jsx(re,{size:"small",onClick:()=>{c(v,g)},color:"error",children:e.jsx(K,{icon:bt,fontSize:18})})})]})}}}].filter(Boolean);return e.jsxs(A,{sx:{display:"flex",flexDirection:"column",gap:2},ref:m,children:[e.jsx(Ve,{verticalKeyWidth:100,locale:C,title:x("accessPolicy.title"),data:l,columns:h,customButtons:o,options:a,loading:t.loading,onChange:u}),e.jsx(As,{ref:r}),f]})}const ua={width:24,height:24,body:'<path fill="currentColor" d="m12 15.375l-6-6l1.4-1.4l4.6 4.6l4.6-4.6l1.4 1.4l-6 6Z"/>'};function ct({title:x,actions:C,children:$=null,defaultValue:R=!0,value:_,onChange:b,showExpand:m=!0}){const r=!je(_),p=ge({open:R}),f=Ce(()=>r?_:p.open,[_,r,p.open]),u=E(()=>{r?b(!f):p.open=!p.open});return e.jsxs(Ht,{variant:"outlined",children:[e.jsxs(A,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",px:2,py:1,backgroundColor:"grey.50"},onClick:u,children:[e.jsx(A,{sx:{fontWeight:"bold"},children:x}),e.jsxs(A,{sx:{display:"flex",alignItems:"center"},children:[C,m?e.jsx(A,{component:K,icon:ua,sx:{transform:f?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease",fontSize:"2rem"}}):null]})]}),e.jsx(jr,{in:f,children:e.jsx(Xr,{children:$})})]})}ct.propTypes={title:T.string.isRequired,defaultValue:T.bool,value:T.bool,actions:T.node,children:T.node,onChange:T.func,showExpand:T.bool};const dt={width:24,height:24,body:'<path fill="currentColor" d="M11.95 18q.525 0 .888-.363t.362-.887q0-.525-.362-.888t-.888-.362q-.525 0-.887.363t-.363.887q0 .525.363.888t.887.362Zm.05 4q-2.075 0-3.9-.788t-3.175-2.137q-1.35-1.35-2.137-3.175T2 12q0-2.075.788-3.9t2.137-3.175q1.35-1.35 3.175-2.137T12 2q2.075 0 3.9.788t3.175 2.137q1.35 1.35 2.138 3.175T22 12q0 2.075-.788 3.9t-2.137 3.175q-1.35 1.35-3.175 2.138T12 22Zm0-2q3.35 0 5.675-2.325T20 12q0-3.35-2.325-5.675T12 4Q8.65 4 6.325 6.325T4 12q0 3.35 2.325 5.675T12 20Zm0-8Zm.1-4.3q.625 0 1.088.4t.462 1q0 .55-.337.975t-.763.8q-.575.5-1.012 1.1t-.438 1.35q0 .35.263.588t.612.237q.375 0 .638-.25t.337-.625q.1-.525.45-.938t.75-.787q.575-.55.988-1.2t.412-1.45q0-1.275-1.038-2.087T12.1 6q-.95 0-1.812.4T8.975 7.625q-.175.3-.113.638t.338.512q.35.2.725.125t.625-.425q.275-.375.688-.575t.862-.2Z"/>'};function Os({config:x={},onChange:C=()=>{},disabled:$=!1}){const R=["GET","HEAD","POST","PUT","DELETE","OPTIONS","PATCH"],_={origin:{override:!1,value:"*",smart:!0},methods:{override:!1,value:[...R]},allowedHeaders:{override:!1,value:"*"},exposedHeaders:{override:!1,value:"*"},maxAge:{override:!1,value:void 0},optionsSuccessStatus:{override:!1,value:204},preflightContinue:{override:!1,value:!1},credentials:{override:!1,value:!1},...Gt(x,je)},{t:b}=ie(),m=(f,{override:u,value:t,smart:l})=>{const i={..._?.[f]};!je(l)&&f==="origin"&&(i.smart=l),je(u)||(i.override=u),je(t)||(i.value=t),C({..._,[f]:i})},r=[{title:b("responseHeaderPolicy.form.cors.origin"),override:_.origin.override,smart:_.origin.smart,name:"origin",required:!0,value:_.origin.value,content:e.jsx(ee,{fullWidth:!0,sx:{mt:.75,"& .MuiFormHelperText-root":{mx:0}},children:e.jsx(U,{multiline:!0,minRows:4,maxRows:10,disabled:$,variant:"outlined",size:"small",placeholder:b("responseHeaderPolicy.form.cors.originPlaceholder"),helperText:b("responseHeaderPolicy.form.cors.originHelperText"),value:_.origin.value,onChange:f=>{m("origin",{value:f.target.value})}})})},{title:b("responseHeaderPolicy.form.cors.methods"),name:"methods",override:_.methods.override,required:!0,value:_.methods.value,content:e.jsx(Be,{sx:{flexDirection:"row"},children:R.map(f=>e.jsx(G,{control:e.jsx(Pe,{size:"small",disabled:$,checked:_.methods.value.includes(f),onChange:(u,t)=>{m("methods",{value:t?[..._.methods.value,f]:_.methods.value.filter(l=>l!==f)})}}),label:f},f))})},{title:b("responseHeaderPolicy.form.cors.allowedHeaders"),override:_.allowedHeaders.override,name:"allowedHeaders",value:_.allowedHeaders.value,content:e.jsx(ee,{fullWidth:!0,sx:{mt:.75,"& .MuiFormHelperText-root":{mx:0}},children:e.jsx(U,{multiline:!0,minRows:3,maxRows:7,disabled:$,variant:"outlined",size:"small",placeholder:b("responseHeaderPolicy.form.cors.allowedHeadersPlaceholder"),helperText:b("responseHeaderPolicy.form.cors.allowedHeadersHelperText"),value:_.allowedHeaders.value,onChange:f=>{m("allowedHeaders",{value:f.target.value})}})})},{title:b("responseHeaderPolicy.form.cors.exposedHeaders"),override:_.exposedHeaders.override,name:"exposedHeaders",value:_.exposedHeaders.value,content:e.jsx(ee,{fullWidth:!0,sx:{mt:.75,"& .MuiFormHelperText-root":{mx:0}},children:e.jsx(U,{multiline:!0,minRows:3,maxRows:7,disabled:$,variant:"outlined",size:"small",placeholder:b("responseHeaderPolicy.form.cors.exposedHeadersPlaceholder"),helperText:b("responseHeaderPolicy.form.cors.exposedHeadersHelperText"),value:_.exposedHeaders.value,onChange:f=>{m("exposedHeaders",{value:f.target.value})}})})},{title:b("responseHeaderPolicy.form.cors.maxAge"),override:_.maxAge.override,name:"maxAge",value:_.maxAge.value,content:e.jsx(ee,{fullWidth:!0,sx:{mt:.75,"& .MuiFormHelperText-root":{mx:0}},children:e.jsx(U,{type:"number",variant:"outlined",size:"small",disabled:$,value:_.maxAge.value,onChange:f=>{m("maxAge",{value:f.target.value})},helperText:b("responseHeaderPolicy.form.cors.maxAgeHelperText")})})},{title:b("responseHeaderPolicy.form.cors.optionsSuccessStatus"),override:_.optionsSuccessStatus.override,name:"optionsSuccessStatus",value:_.optionsSuccessStatus.value,content:e.jsx(ee,{fullWidth:!0,sx:{mt:.75,"& .MuiFormHelperText-root":{mx:0}},children:e.jsx(U,{type:"number",variant:"outlined",size:"small",disabled:$,value:_.optionsSuccessStatus.value,onChange:f=>{m("optionsSuccessStatus",{value:f.target.value})}})})},{title:b("responseHeaderPolicy.form.cors.preflightContinue"),override:_.preflightContinue.override,name:"preflightContinue",value:_.preflightContinue.value,control:e.jsx(pe,{size:"small",disabled:$,checked:_.preflightContinue.value,onChange:(f,u)=>{m("preflightContinue",{value:u})}})},{title:b("responseHeaderPolicy.form.cors.credentials"),override:_.credentials.override,name:"credentials",value:_.credentials.value,control:e.jsx(pe,{size:"small",disabled:$,checked:_.credentials.value,onChange:(f,u)=>{m("credentials",{value:u})}})}];Yt(()=>{C(_)});const p={".PrivateSwitchBase-input+svg":{fontSize:"1rem"},".MuiCheckbox-sizeSmall":{p:.75},".MuiFormControlLabel-label":{fontSize:"0.8rem"}};return e.jsx(Be,{children:r.map((f,u)=>e.jsxs(L.Fragment,{children:[e.jsxs(A,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[e.jsx(G,{sx:{mt:u===0?0:1},control:f.control||e.jsx(A,{sx:{pl:1.35}}),label:f.title,required:f.required},`${f.name}_form`),e.jsxs(A,{children:[f.name==="origin"?e.jsx(G,{control:e.jsx(Pe,{size:"small",checked:f.smart,color:"primary",disabled:$,onChange:()=>{m(f.name,{smart:!f.smart})}}),label:e.jsxs(e.Fragment,{children:[b("responseHeaderPolicy.form.cors.smartMode"),e.jsx(se,{title:b("responseHeaderPolicy.form.cors.smartModeHelperText"),children:e.jsx(A,{component:K,icon:dt,sx:{cursor:"pointer",color:"grey",ml:.5,fontSize:"1.1em"}})})]}),sx:p},`${f.name}_smart`):null,e.jsx(G,{control:e.jsx(Pe,{size:"small",checked:f.override,color:"warning",disabled:$,onChange:()=>{m(f.name,{override:!f.override})}}),label:e.jsxs(e.Fragment,{children:[b("responseHeaderPolicy.form.originOverride"),e.jsx(se,{title:b("responseHeaderPolicy.form.originOverrideHelperText"),children:e.jsx(A,{component:K,icon:dt,sx:{cursor:"pointer",color:"grey",ml:.5,fontSize:"1.1em"}})})]}),sx:{...p,mr:0}},`${f.name}_override`)]})]}),f.content?e.jsx(A,{sx:{ml:3.5},children:f.content},`${f.name}_content`):null]},f.name))})}Os.propTypes={config:T.object,onChange:T.func,disabled:T.bool};function Ps({value:x,onChange:C=()=>{},disabled:$=!1}){const R="sameorigin",_=[{label:"DENY",value:"deny"},{label:"SAMEORIGIN (default)",value:"sameorigin"}],b=m=>{C({action:m.target.value})};return L.useEffect(()=>{x===!0&&C({action:R})},[x]),e.jsx(A,{children:e.jsx(ee,{children:e.jsx(ss,{row:!0,children:_.map(m=>e.jsx(G,{value:m.value,control:e.jsx(rs,{size:"small",disabled:$,checked:m.value===x?.action,onChange:b,sx:{p:.75}}),label:m.label},m.value))})})})}Ps.propTypes={value:T.oneOfType([T.string,T.bool]).isRequired,onChange:T.func,disabled:T.bool};function Ts({value:x,onChange:C=()=>{},disabled:$=!1}){const R="strict-origin-when-cross-origin",_=[{label:"no-referrer",value:"no-referrer"},{label:"no-referrer-when-downgrade",value:"no-referrer-when-downgrade"},{label:"origin",value:"origin"},{label:"origin-when-cross-origin",value:"origin-when-cross-origin"},{label:"same-origin",value:"same-origin"},{label:"strict-origin",value:"strict-origin"},{label:"strict-origin-when-cross-origin (default)",value:"strict-origin-when-cross-origin"},{label:"unsafe-url",value:"unsafe-url"}],b=m=>{C({policy:m.target.value})};return L.useEffect(()=>{x===!0&&C({policy:R})},[x]),e.jsx(A,{children:e.jsx(ee,{children:e.jsx(ss,{children:_.map(m=>e.jsx(G,{value:m.value,control:e.jsx(rs,{size:"small",disabled:$,checked:m.value===x?.policy,onChange:b,sx:{p:.75}}),label:m.label},m.value))})})})}Ts.propTypes={value:T.oneOfType([T.string,T.bool]).isRequired,onChange:T.func,disabled:T.func};function Is({value:x,onChange:C=()=>{},disabled:$=!1}){const R={"default-src":["'self'"],"base-uri":["'self'"],"font-src":["'self'","https:","data:"],"form-action":["'self'"],"frame-ancestors":["'self'"],"img-src":["'self'","data:"],"object-src":["'none'"],"script-src":["'self'"],"script-src-attr":["'none'"],"style-src":["'self'","https:","'unsafe-inline'"],"upgrade-insecure-requests":[]};function _(f){return Object.keys(f).map(u=>[u,f[u].filter(Boolean).join(" ")].filter(Boolean).join(" ")).filter(Boolean).join(`
153
- `)}const b=_(x?.directives||R),[m,r]=L.useState(b),p=f=>{r(f.target.value);const u=f.target.value.split(`
154
- `).reduce((t,l)=>{const[i,...n]=l.split(" ");return t[i]=n.filter(s=>s!==""),t},{});C({useDefaults:!1,directives:u})};return L.useEffect(()=>{x===!0&&(C({useDefaults:!1,directives:R}),r(_(R)))},[x]),e.jsx(A,{sx:{mt:1},children:e.jsx(ee,{fullWidth:!0,children:e.jsx(U,{fullWidth:!0,multiline:!0,disabled:$,rows:12,size:"small",value:m,onChange:p})})})}Is.propTypes={value:T.oneOfType([T.object,T.bool]).isRequired,onChange:T.func,disabled:T.bool};function Es({config:x={},onChange:C=()=>{},disabled:$=!1}){const R={contentSecurityPolicy:{override:!1,value:!1},referrerPolicy:{override:!1,value:!1},xFrameOptions:{override:!1,value:!1},xPoweredBy:{override:!1,value:!0},xXssProtection:{override:!1,value:!1},...Gt(x,je)},{t:_}=ie(),b=(p,{override:f,value:u})=>{const t={...R?.[p]};je(f)||(t.override=f),je(u)||(t.value=u),C({...R,[p]:t})},m=[{title:"Content-Security-Policy",name:"contentSecurityPolicy",override:R.contentSecurityPolicy.override,value:!!R.contentSecurityPolicy.value,content:e.jsx(Is,{disabled:$,value:R.contentSecurityPolicy.value,onChange:p=>{b("contentSecurityPolicy",{value:p})}}),onChange(p){b("contentSecurityPolicy",{value:p})}},{title:"Referrer-Policy",name:"referrerPolicy",override:R.referrerPolicy.override,value:!!R.referrerPolicy.value,content:e.jsx(Ts,{disabled:$,value:R.referrerPolicy.value,onChange:p=>{b("referrerPolicy",{value:p})}}),onChange(p){b("referrerPolicy",{value:p})}},{title:"X-Frame-Options",name:"xFrameOptions",override:R.xFrameOptions.override,value:!!R.xFrameOptions.value,content:e.jsx(Ps,{disabled:$,value:R.xFrameOptions.value,onChange:p=>{b("xFrameOptions",{value:p})}}),onChange(p){b("xFrameOptions",{value:p})}},{title:"Disable X-Powered-By",name:"xPoweredBy",override:R.xPoweredBy.override,value:R.xPoweredBy.value,content:null,onChange(p){b("xPoweredBy",{value:p})}},{title:"X-XSS-Protection",name:"xXssProtection",override:R.xXssProtection.override,value:R.xXssProtection.value,content:null,onChange(p){b("xXssProtection",{value:p})}}];Yt(()=>{C(R)});const r={".PrivateSwitchBase-input+svg":{fontSize:"1rem"},".MuiCheckbox-sizeSmall":{p:.75},".MuiFormControlLabel-label":{fontSize:"0.8rem"}};return e.jsx(Be,{children:m.map((p,f)=>e.jsxs(L.Fragment,{children:[e.jsxs(A,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[e.jsx(G,{sx:{mt:f===0?0:1},control:e.jsx(pe,{size:"small",disabled:$,checked:p.value,onChange:()=>{p.onChange(!p.value)}},`${p.name}_switch`),label:p.title},`${p.name}_form`),p.value?e.jsx(G,{control:e.jsx(Pe,{size:"small",checked:p.override,color:"warning",disabled:$,onChange:()=>{b(p.name,{override:!p.override})}}),label:e.jsxs(e.Fragment,{children:[_("responseHeaderPolicy.form.originOverride"),e.jsx(se,{title:_("responseHeaderPolicy.form.originOverrideHelperText"),children:e.jsx(A,{component:K,icon:dt,sx:{cursor:"pointer",color:"grey",ml:.5,fontSize:"1.1em"}})})]}),sx:{...r,mr:0}}):null]}),p.value&&p.content?e.jsx(A,{sx:{ml:3.7},children:p.content},`${p.name}_content`):null]},p.name))})}Es.propTypes={config:T.object,onChange:T.func,disabled:T.bool};function Ds({ref:x=null}){const{t:C}=L.useContext(ce),R=Re()?.transitions?.duration?.leavingScreen||300,_=ge({mode:"add",show:!1,callback:de,get dialogTitle(){return this.mode==="edit"?C("responseHeaderPolicy.edit"):this.mode==="view"?C("responseHeaderPolicy.view"):C("responseHeaderPolicy.add")},cors:null,securityHeader:null,enableCORS:!1}),{handleSubmit:b,control:m,setValue:r,reset:p,formState:{errors:f}}=we({mode:"onChange",defaultValues:{name:"",description:""}}),u=E(()=>{p(),_.mode="add",_.enableCORS=!1,_.cors=null,_.securityHeader=null}),t=E(()=>{_.show=!1,setTimeout(()=>{u()},R)}),l=E((o=de,h=null)=>{_.callback=o,_.show=!0,h&&(h.id?_.mode="edit":_.mode="view",r("name",h.name),r("description",h.description),_.cors=aa(h.cors),_.securityHeader=oa(h.securityHeader),_.enableCORS=!!h.cors)});L.useImperativeHandle(x,()=>({open:l,close:t}),[l,t]);const i=_.mode==="view",n=E(o=>{const h=ia(_.cors),g=la(_.securityHeader),v=Jt({...o,cors:_.enableCORS?JSON.stringify(h):null,securityHeader:JSON.stringify(g)});_.callback(v,t)}),s=E(o=>o?.trim()?!0:C("common.requiredErrorText",{name:C("accessPolicy.form.name")})),c=o=>{_.securityHeader=o},a=o=>{_.cors=o};return e.jsx(_e,{open:_.show,title:_.dialogTitle,onClose:t,PaperProps:{style:{minHeight:"unset",width:900,maxWidth:"100%"}},actions:e.jsx(Q,{color:"primary",autoFocus:!0,variant:"contained",onClick:b(n),children:C("common.confirm")}),children:e.jsxs("form",{noValidate:!0,autoComplete:"off",children:[e.jsx(F,{name:"name",control:m,rules:{validate:s},render:({field:o})=>e.jsx(U,{fullWidth:!0,required:!0,size:"small",margin:"dense",disabled:i,placeholder:C("accessPolicy.form.namePlaceholder"),label:C("accessPolicy.form.name"),error:!!f?.name?.message,helperText:f?.name?.message||" ",...o})}),e.jsx(F,{name:"description",control:m,render:({field:o})=>e.jsx(U,{fullWidth:!0,multiline:!0,size:"small",margin:"dense",disabled:i,minRows:3,maxRows:7,placeholder:"Description",label:"Description",helperText:f?.description?.message||" ",...o})}),e.jsx(ct,{title:"Cross-origin resource sharing (CORS)",value:_.enableCORS,onChange:o=>{i||(_.enableCORS=o)},showExpand:!1,actions:e.jsx(pe,{size:"small",disabled:i,checked:_.enableCORS}),children:e.jsx(Os,{config:_.cors,onChange:a,disabled:i})}),e.jsx("br",{}),e.jsx(ct,{title:"Security Headers",children:e.jsx(Es,{config:_.securityHeader,onChange:c,disabled:i})})]})})}Ds.propTypes={ref:T.any};function ha(){const{t:x,locale:C}=ie(),{blocklet:$}=le(),{api:R}=ne(),_=$?.meta?.did,b=L.useRef(null),m=L.useRef(null),{confirmApi:r,confirmHolder:p}=Fe(),f=()=>{},u=Me(async()=>{const{responseHeaderPolicies:h}=await R.getBlockletResponseHeaderPolicies({input:{did:_}});return ze(h.map(g=>ca(g)),g=>g.isProtected?1:0)}),t=u.data||[],l=E(()=>{b.current.open((h,g)=>{fe(async()=>{await R.addBlockletResponseHeaderPolicy({input:{did:_,data:h}}),V.success(x("common.succeeded")),u.run(),g()})})}),i=E(h=>{b.current.open((g,v)=>{v()},Te(h,["id"]))}),n=E(h=>{b.current.open((g,v)=>{fe(async()=>{await R.updateBlockletResponseHeaderPolicy({input:{did:_,data:{...g,id:h.id}}}),V.success(x("common.succeeded")),u.run(),v()})},h)}),s=E(h=>{r.open({title:x("responseHeaderPolicy.delete.title"),content:x("responseHeaderPolicy.delete.description"),confirmButtonText:x("common.confirm"),confirmButtonProps:{color:"error"},cancelButtonText:x("common.cancel"),onConfirm(g){fe(async()=>{await R.deleteBlockletResponseHeaderPolicy({input:{did:_,id:h.id}}),V.success(x("common.succeeded")),u.run(),g()})}})}),c={sort:!1,download:!1,filter:!1,print:!1,search:!1,viewColumns:!1,expandableRowsOnClick:!0,searchDebounceTime:600,onRowClick(h,{dataIndex:g},v){if(m.current?.contains(v.target)){const k=t[g];i(k)}}},a=[e.jsx(Y,{size:"small",variant:"outlined",onClick:()=>{u.run()},sx:{mr:1},children:x("common.refresh")},"refresh"),e.jsx(Y,{size:"small",variant:"contained",onClick:l,children:x("common.add")},"add")],o=[{label:x("common.name"),name:"name",options:{customBodyRenderLite(h){const g=t[h],v=g.isProtected?e.jsx(se,{title:"Built-in policy, can't edit",children:e.jsx(A,{component:K,icon:Kt,sx:{fontSize:16}})}):null;return e.jsxs(A,{sx:{display:"flex",alignItems:"center",gap:.5},children:[v," ",g.name]})}}},{label:x("common.description"),name:"description"},{label:x("common.actions"),name:"",width:100,align:"center",verticalKeyAlign:"center",options:{customBodyRenderLite(h){const g=t[h];return e.jsxs(A,{sx:{display:"flex",alignItems:"center",gap:0},onClick:v=>v.stopPropagation(),children:[g.isProtected?e.jsx(se,{title:x("common.view"),children:e.jsx(re,{size:"small",onClick:()=>{i(g,h)},children:e.jsx(K,{icon:Ss,fontSize:18})})}):null,g.isProtected?null:e.jsx(se,{title:x("common.edit"),children:e.jsx(re,{size:"small",onClick:()=>{n(g,h)},color:"success",children:e.jsx(K,{icon:jt,fontSize:18})})}),g.isProtected?null:e.jsx(se,{title:x("common.delete"),children:e.jsx(re,{size:"small",onClick:()=>{s(g,h)},color:"error",children:e.jsx(K,{icon:bt,fontSize:18})})})]})}}}].filter(Boolean);return e.jsxs(A,{sx:{display:"flex",flexDirection:"column",gap:2},ref:m,children:[e.jsx(Ve,{verticalKeyWidth:100,locale:C,title:x("responseHeaderPolicy.title"),data:t,columns:o,customButtons:a,options:c,loading:u.loading,onChange:f}),e.jsx(Ds,{ref:b}),p]})}const Ls=({tabs:x,blocklet:C,ancestors:$=[],depth:R=1,t:_})=>{const b=[...$.map(r=>r.meta.did),C.meta.did].join("/"),m=!$?.length;x.push({label:e.jsxs(A,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",pl:Math.max(1,R-1)*2},children:[m?e.jsx(Sr,{size:24,blocklet:C,style:{borderRadius:0}}):e.jsx(Cr,{size:24,blocklet:C,ancestors:$,style:{borderRadius:0}}),e.jsx(A,{sx:{ml:2},children:e.jsx(A,{sx:{color:"text.primary"},children:m?_("blocklet.component.container"):Zt.getDisplayName(C,!0)})})]},b),value:b}),C.children.length>0&&C.children.forEach(r=>{Ls({tabs:x,blocklet:r,ancestors:[...$,C],depth:R+1,t:_})})};function fa({blocklet:x,onUpdate:C=()=>{},...$}){const{t:R}=ie(),_=ge({expandPref:!0,expandSecurity:!0}),[b,m]=_r(),r=b.get("tab")||"general",p=ns(),[f,u]=L.useState(!1),t=[];t.push({label:e.jsxs(A,{"data-cy":"configuration-tab-general",sx:{display:"flex",alignItems:"center"},children:[e.jsx(ln,{sx:{fontSize:24}}),e.jsx(A,{sx:{ml:2,color:"text.primary"},children:R("common.general")})]},"general"),value:"general"}),t.push({label:e.jsxs(A,{"data-cy":"configuration-tab-security-group",sx:{display:"flex",alignItems:"center"},children:[e.jsx(A,{sx:{ml:-2,transform:"translateY(2px)"},children:_.expandSecurity?e.jsx(Ct,{fontSize:"inherit"}):e.jsx(Rt,{fontSize:"inherit"})}),e.jsx(ot,{sx:{fontSize:24}}),e.jsx(A,{sx:{ml:2,color:"text.primary"},children:R("common.security")})]},"securityGroup"),value:"securityGroup"}),_.expandSecurity&&(t.push({label:e.jsxs(A,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",pl:2},children:[e.jsx(ot,{sx:{fontSize:24}}),e.jsx(A,{sx:{ml:2,color:"text.primary"},children:R("securityRule.title")})]},"security"),value:"security"}),t.push({label:e.jsxs(A,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",pl:2},children:[e.jsx(sn,{sx:{fontSize:24}}),e.jsx(A,{sx:{ml:2,color:"text.primary"},children:R("accessPolicy.title")})]},"accessPolicy"),value:"accessPolicy"}),t.push({label:e.jsxs(A,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",pl:2},children:[e.jsx(K,{fontSize:24,style:{flexShrink:0},icon:mn}),e.jsx(A,{sx:{ml:2,color:"text.primary"},children:R("responseHeaderPolicy.title")})]},"responseHeaderPolicy"),value:"responseHeaderPolicy"})),t.push({label:e.jsxs(A,{sx:{display:"flex",alignItems:"center"},"data-cy":"configuration-tab-authentication",children:[e.jsx(an,{sx:{fontSize:24}}),e.jsx(A,{sx:{ml:2,color:"text.primary"},children:R("common.login")})]},"authentication"),value:"authentication"}),t.push({label:e.jsxs(A,{"data-cy":"configuration-tab-notification",sx:{display:"flex",alignItems:"center"},children:[e.jsx(on,{sx:{fontSize:24}}),e.jsx(A,{sx:{ml:2,color:"text.primary"},children:R("common.notification")})]},"notification"),value:"notification"}),t.push({label:e.jsxs(A,{"data-cy":"configuration-tab-preference",sx:{display:"flex",alignItems:"center"},children:[e.jsx(A,{sx:{ml:-2,transform:"translateY(2px)"},children:_.expandPref?e.jsx(Ct,{fontSize:"inherit"}):e.jsx(Rt,{fontSize:"inherit"})}),e.jsx($r,{sx:{fontSize:24}}),e.jsx(A,{sx:{ml:2,color:"text.primary"},children:R("common.preferences")})]},"preference"),value:"preference"});const l=t.find(c=>c.value===r);_.expandPref&&Ls({tabs:t,blocklet:x,t:R});const i=c=>{c==="preference"?_.expandPref=!_.expandPref:c==="securityGroup"?_.expandSecurity=!_.expandSecurity:m(a=>(c==="general"?a.delete("tab"):a.set("tab",c),a)),u(!1)};let n=null;r==="general"?n=e.jsx(Ln,{blocklet:x,onUpdate:C}):r==="security"?n=e.jsx(ra,{}):r==="accessPolicy"?n=e.jsx(da,{}):r==="responseHeaderPolicy"?n=e.jsx(ha,{}):r==="authentication"?n=e.jsx(_s,{}):r==="notification"?n=e.jsx(Lr,{}):n=e.jsx(Ar,{id:r});const s=L.useMemo(()=>({position:"relative",minHeight:"66vh",height:"100%",overflow:"hidden"}),[]);return e.jsxs(ma,{...$,children:[p&&e.jsxs(e.Fragment,{children:[e.jsxs(A,{sx:{color:"primary.main",position:"sticky",top:0,zIndex:2,bgcolor:"background.default",display:"flex",alignItems:"center",justifyContent:"space-between",mb:2},children:[e.jsx(re,{onClick:()=>u(!0),sx:{mr:1},children:e.jsx(wr,{})}),e.jsx(A,{children:l?.label})]}),e.jsx(kr,{anchor:"left",open:f,onClose:()=>u(!1),slotProps:{paper:{sx:{width:260,".MuiTab-root":{textAlign:"left",alignItems:"flex-start",fontWeight:"normal"}}}},children:e.jsx(He,{tabs:t,current:r,orientation:"vertical",onChange:i,sx:{borderRight:1,height:"100%",borderColor:"divider"}})})]}),e.jsxs(Je,{container:!0,spacing:4,columns:24,children:[!p&&e.jsx(Je,{size:{xs:24,sm:7,md:5},children:e.jsx(He,{tabs:t,current:r,orientation:"vertical",onChange:i,sx:{borderRight:1,height:"100%",borderColor:"divider"}})}),e.jsx(Je,{size:{xs:24,sm:17,md:19},children:e.jsx(A,{style:s,children:n})})]})]})}fa.propTypes={blocklet:T.object.isRequired,onUpdate:T.func};const ma=ye.div`
155
- .MuiTab-root {
156
- text-align: left;
157
- align-items: flex-start;
158
- font-weight: normal;
159
- }
160
- .Mui-selected {
161
- font-weight: bold;
162
- }
163
- `;export{fa as default};