@abtnode/webapp 1.17.4-beta-20251202-034514-637cd8e2 → 1.17.4-beta-20251203-225234-75da41dd

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 (220) hide show
  1. package/blocklet.js +1 -1
  2. package/blocklet.yml +1 -1
  3. package/dist/assets/{AdapterDayjs-DFNTS6uL.js → AdapterDayjs-B8XrCnul.js} +1 -1
  4. package/dist/assets/{Add-DMoAJUVW.js → Add-kI5bOAG-.js} +1 -1
  5. package/dist/assets/ArrowDropDown-DQiHUHN2.js +1 -0
  6. package/dist/assets/{Autocomplete-DzPelkmw.js → Autocomplete-CQE4jUXI.js} +1 -1
  7. package/dist/assets/{Breadcrumbs-4tdPlLhJ.js → Breadcrumbs-AnwvYAV4.js} +1 -1
  8. package/dist/assets/{ButtonGroup-Dlkb94HL.js → ButtonGroup-BMNpoL2h.js} +1 -1
  9. package/dist/assets/CSSTransition-BxHb6pgR.js +1 -0
  10. package/dist/assets/{CallMerge-B41lkD5_.js → CallMerge-D4r5xzUL.js} +1 -1
  11. package/dist/assets/{CardContent-yvDYaO_0.js → CardContent-7R2qvvpi.js} +1 -1
  12. package/dist/assets/{ChevronLeft-CZ7VDJCP.js → ChevronLeft-LXiuPIK5.js} +1 -1
  13. package/dist/assets/{ChevronRight-W_01-zFQ.js → ChevronRight-DqFLktR4.js} +1 -1
  14. package/dist/assets/{Clear-3aQ_ViuO.js → Clear-Hs60zEib.js} +1 -1
  15. package/dist/assets/{DeleteOutline-CduYjOSi.js → DeleteOutline-DsqrqnCp.js} +1 -1
  16. package/dist/assets/{Done-D_cfJoKY.js → Done-vE3VnBR0.js} +1 -1
  17. package/dist/assets/{Edit-CAoHCh26.js → Edit-qO_MT0b2.js} +1 -1
  18. package/dist/assets/{ErrorOutline-ClBFY-zS.js → ErrorOutline-DdvUBhqw.js} +1 -1
  19. package/dist/assets/{FilterList-CoyfX8VL.js → FilterList-AnfIXCKs.js} +1 -1
  20. package/dist/assets/{Google-QOJseWnL.js → Google--RzStVOR.js} +1 -1
  21. package/dist/assets/{HelpOutline-DNkRe_xv.js → HelpOutline-CoSkqfzt.js} +1 -1
  22. package/dist/assets/{KeyboardArrowDown-DACNodoq.js → KeyboardArrowDown-Dujsdgxw.js} +1 -1
  23. package/dist/assets/{Launch-BOUgHkwm.js → Launch-DYmoqTVe.js} +1 -1
  24. package/dist/assets/{Link-BFLUKKmj.js → Link-C00bCC3q.js} +1 -1
  25. package/dist/assets/{ListItemButton-BrJjYcfY.js → ListItemButton-BEID3HDl.js} +1 -1
  26. package/dist/assets/{ListSubheader-Dz5YbKqQ.js → ListSubheader-Dc864cM6.js} +1 -1
  27. package/dist/assets/{LoadingButton-DSQ0SJvD.js → LoadingButton-BClJhQK8.js} +1 -1
  28. package/dist/assets/{MoreVert-Crfla2Nw.js → MoreVert-CqJOZeEC.js} +1 -1
  29. package/dist/assets/{OpenInNew-CMikwXJg.js → OpenInNew-Pw51SEHY.js} +1 -1
  30. package/dist/assets/{Refresh-BRw0lNlx.js → Refresh-CcEIh6xY.js} +1 -1
  31. package/dist/assets/{Search-DihRAr8J.js → Search-C_5maoKz.js} +1 -1
  32. package/dist/assets/{Stepper-DSYfudJh.js → Stepper-Ck_x8FLF.js} +1 -1
  33. package/dist/assets/{Switch-DXK3jQx6.js → Switch-DYHMHuRa.js} +1 -1
  34. package/dist/assets/{TableSearch-DTa-kQYq.js → TableSearch-CCo38KPm.js} +1 -1
  35. package/dist/assets/{ToggleButtonGroup-BgcjoBhH.js → ToggleButtonGroup-CS6Q6qZB.js} +1 -1
  36. package/dist/assets/{UnfoldMore-Obeukjjc.js → UnfoldMore-BPzgNPA4.js} +1 -1
  37. package/dist/assets/{Verified-BkNsmE5y.js → Verified-LTXU8MrA.js} +1 -1
  38. package/dist/assets/{VerifiedUser-DF0KlG8V.js → VerifiedUser-B3wH8cXt.js} +1 -1
  39. package/dist/assets/{ViewList-Dsx5HTn1.js → ViewList-BfiQ8qPi.js} +1 -1
  40. package/dist/assets/{_createAggregator-ysrcf9Bc.js → _createAggregator-4BM34H5l.js} +1 -1
  41. package/dist/assets/{actions-BQYoCyzD.js → actions-CE27qWor.js} +1 -1
  42. package/dist/assets/actions-SrVXdq5g.js +1 -0
  43. package/dist/assets/{agreement-3umjEU1n.js → agreement-BzsHgssv.js} +4 -4
  44. package/dist/assets/api-SBg_zsK3.js +1 -0
  45. package/dist/assets/{appearance-BYqWOedE.js → appearance-DHqXwjoD.js} +1 -1
  46. package/dist/assets/ar-C89Z16Ql.js +7 -0
  47. package/dist/assets/{audit-logs-C8Rj-VnC.js → audit-logs-fSLdeI5s.js} +1 -1
  48. package/dist/assets/{base-chart-C7SG2Os5.js → base-chart-D5YNxfH0.js} +1 -1
  49. package/dist/assets/blocklet-DzsezOxR.js +1 -0
  50. package/dist/assets/{chain-BLr2de5j.js → chain-C9-WRPu7.js} +1 -1
  51. package/dist/assets/{click-to-copy-_XuYTLfd.js → click-to-copy-BqSPQ3-7.js} +1 -1
  52. package/dist/assets/cloneDeep-DpgUjdaj.js +1 -0
  53. package/dist/assets/{collapse-C4RswaYj.js → collapse-B_3Ho-QP.js} +2 -2
  54. package/dist/assets/{config-navigation-m1HAHHAI.js → config-navigation-Dp2RakXR.js} +3 -3
  55. package/dist/assets/{connect-to-CQeSm0MO.js → connect-to-pNkkzCak.js} +3 -3
  56. package/dist/assets/{cssMode-CMNPagen.js → cssMode-tZr3iQNS.js} +1 -1
  57. package/dist/assets/de-BsCDrfBl.js +7 -0
  58. package/dist/assets/{delete-confirm-B3AhdXCf.js → delete-confirm-Co07Njuf.js} +1 -1
  59. package/dist/assets/{depsEqual-C1JyiMkY.js → depsEqual-DDykxzRj.js} +1 -1
  60. package/dist/assets/{detail-C3pyFMHM.js → detail-DcgwTwye.js} +3 -3
  61. package/dist/assets/{domains-DIeIwNFc.js → domains-BV1XoGlV.js} +2 -2
  62. package/dist/assets/{download-PFug1xLJ.js → download-CK01OJP3.js} +1 -1
  63. package/dist/assets/{edit.svg-BWsZcaur.js → edit.svg-BQ5aLBCI.js} +1 -1
  64. package/dist/assets/emotion-cache.browser.esm-X_vzDGxi.js +1 -0
  65. package/dist/assets/engine-WLYB4JH-.js +1 -0
  66. package/dist/assets/es-BJh_XsEm.js +9 -0
  67. package/dist/assets/fr-DRJMwn7V.js +7 -0
  68. package/dist/assets/{freemarker2-D3LU0XC5.js → freemarker2-DSJRqUi6.js} +1 -1
  69. package/dist/assets/{get-safe-url-B8fUDSaQ.js → get-safe-url-DQ8We4Cn.js} +1 -1
  70. package/dist/assets/getValidReactChildren-BsG2WRwa.js +1 -0
  71. package/dist/assets/{graphqlMode-CZh0WEg3.js → graphqlMode-BG47Adzu.js} +2 -2
  72. package/dist/assets/{handlebars-BoyJQaGG.js → handlebars-B6x-6VIa.js} +1 -1
  73. package/dist/assets/hi-h-9Yl5g9.js +5 -0
  74. package/dist/assets/{html-DiNtivy_.js → html-jMDnRBWp.js} +1 -1
  75. package/dist/assets/{html-title-DZPr9ErN.js → html-title-B38L6o3q.js} +1 -1
  76. package/dist/assets/{htmlMode-swm5QVbw.js → htmlMode-C5S9mBrG.js} +1 -1
  77. package/dist/assets/id-BDWggRsa.js +7 -0
  78. package/dist/assets/{iframe-DloJgn9Q.js → iframe-BNWt4-fa.js} +1 -1
  79. package/dist/assets/{index-Cm4YjlwL.js → index-B6tHzrIn.js} +2 -2
  80. package/dist/assets/{index-D_Ja8zFw.js → index-B7lwLoYe.js} +1 -1
  81. package/dist/assets/index-B8v-axBf.js +328 -0
  82. package/dist/assets/{index-DW37Hc5m.js → index-BWfkNY7x.js} +1 -1
  83. package/dist/assets/{index-oVsaWj9v.js → index-B_NMI3ZI.js} +1 -1
  84. package/dist/assets/{index-UxFoihcG.js → index-B_nHd_uz.js} +15 -15
  85. package/dist/assets/{index-ClciYnBs.js → index-BfBCWTwI.js} +13 -13
  86. package/dist/assets/index-BqDRNwJX.js +16 -0
  87. package/dist/assets/{index-Dosi9lN2.js → index-BtUuqhY5.js} +1 -1
  88. package/dist/assets/{index-EO1T3ubZ.js → index-C4B0vM19.js} +1 -1
  89. package/dist/assets/{index-aiY7k_D_.js → index-C601SkM4.js} +1 -1
  90. package/dist/assets/index-C7TNAoJk.js +1 -0
  91. package/dist/assets/{index-B0J8LV_Q.js → index-CD7DvxmZ.js} +1 -1
  92. package/dist/assets/{index-B_irEVal.js → index-CExol_6_.js} +1 -1
  93. package/dist/assets/{index-CCqeWXbH.js → index-CHG9EhW0.js} +2 -2
  94. package/dist/assets/{index-CSzOTG6W.js → index-CLvjrKnU.js} +9 -9
  95. package/dist/assets/{index-Cwj1cT7X.js → index-CQ3wtaOi.js} +1 -1
  96. package/dist/assets/{index-Dcx5YP4F.js → index-CT2MPFX1.js} +1 -1
  97. package/dist/assets/{index-B-t0c3Sa.js → index-CUSquMEA.js} +1 -1
  98. package/dist/assets/{index-2MD_vALi.js → index-CVAkH3vd.js} +1 -1
  99. package/dist/assets/{index-BNSnUR0A.js → index-CX5L5Zzo.js} +1 -1
  100. package/dist/assets/{index-BsUgU8Em.js → index-Ca71Ul3i.js} +3 -3
  101. package/dist/assets/{index-CKHzfPKz.js → index-CdAykioB.js} +1 -1
  102. package/dist/assets/index-CdmTtYEH.js +5 -0
  103. package/dist/assets/{index-C6qm0jMc.js → index-CtGeZSa_.js} +1 -1
  104. package/dist/assets/{index-BPL2xXU0.js → index-CvbVZVN0.js} +1 -1
  105. package/dist/assets/{index-DalOLs5N.js → index-D0tbGiP6.js} +1 -1
  106. package/dist/assets/{index-BoLEbVjY.js → index-D1awT4uB.js} +1 -1
  107. package/dist/assets/{index-DN1FR838.js → index-D331Asw4.js} +8 -8
  108. package/dist/assets/{index-CqjL56RL.js → index-D6Tf4nQu.js} +1 -1
  109. package/dist/assets/{index-CI77BW6M.js → index-DOjmnZso.js} +14 -14
  110. package/dist/assets/{index-aZK5B1rf.js → index-DXgv4Xqm.js} +1 -1
  111. package/dist/assets/{index-C1n8OjtU.js → index-Da6avpbI.js} +1 -1
  112. package/dist/assets/{index-p4uzP6uF.js → index-DaYK2wTG.js} +1 -1
  113. package/dist/assets/{index-DtEm4DlR.js → index-Dj4J7MRE.js} +1 -1
  114. package/dist/assets/{index-D_vvbtGZ.js → index-DuCzR9nh.js} +1 -1
  115. package/dist/assets/{index-CIJ5EXA3.js → index-DypTd994.js} +1 -1
  116. package/dist/assets/{index-DzMTdOui.js → index-PBuMheS3.js} +1 -1
  117. package/dist/assets/{index-BScjYdDP.js → index-YAdFrAoP.js} +3 -3
  118. package/dist/assets/{index-BpTQAo8p.js → index-fUcEQ60M.js} +1 -1
  119. package/dist/assets/{index-BBE5QVnT.js → index-gKfbF3Uy.js} +9 -9
  120. package/dist/assets/{index-BOgaS_mp.js → index-gLhIa95r.js} +8 -8
  121. package/dist/assets/{index-DzIQue5G.js → index-i1qQpQly.js} +1 -1
  122. package/dist/assets/{index-BiECtx8f.js → index-ituQ-YWI.js} +2 -2
  123. package/dist/assets/{index-BktUsUuI.js → index-sbhy4wTO.js} +1 -1
  124. package/dist/assets/index-xk8o36aP.js +1 -0
  125. package/dist/assets/{index.esm-0qTLMRcM.js → index.esm-yDr2HoCY.js} +1 -1
  126. package/dist/assets/{install-from-url-D4BZhujU.js → install-from-url-CUdRu_Yn.js} +1 -1
  127. package/dist/assets/{invitation-7JPfzYsz.js → invitation-BcqzR03j.js} +1 -1
  128. package/dist/assets/{is-path-prefix-equal-By5q4Tar.js → is-path-prefix-equal-wXDXCvIL.js} +1 -1
  129. package/dist/assets/{item-BIq4iEQn.js → item-CEMWCyCy.js} +7 -7
  130. package/dist/assets/ja-R9EF3xbB.js +9 -0
  131. package/dist/assets/{javascript-B_b2FAHq.js → javascript-Cif1kEP1.js} +1 -1
  132. package/dist/assets/{jsonMode-De4-g9Kb.js → jsonMode-Dtj4OX0P.js} +1 -1
  133. package/dist/assets/ko-C_QLPZyk.js +9 -0
  134. package/dist/assets/{liquid-gACWVLj5.js → liquid-wpaZ49Sr.js} +1 -1
  135. package/dist/assets/{list-header-DLDug_Pi.js → list-header--wgea2u-.js} +1 -1
  136. package/dist/assets/{lock.svg-BzS6KpeB.js → lock.svg-Br-cW1Vr.js} +1 -1
  137. package/dist/assets/{log-B-hBZSCU.js → log-BwGGQAmT.js} +1 -1
  138. package/dist/assets/{lottie-react.esm-CIMHKb6b.js → lottie-react.esm-DGCSfjEH.js} +1 -1
  139. package/dist/assets/{mdx-QEop8_Eo.js → mdx-BNHuuftl.js} +1 -1
  140. package/dist/assets/{memory-B3cgfihx.js → memory-CO8_mKFj.js} +1 -1
  141. package/dist/assets/{metric-Cof1oNBC.js → metric-D4Ezyye6.js} +1 -1
  142. package/dist/assets/omit-BkO80IDI.js +1 -0
  143. package/dist/assets/{overview-Bg8w97tG.js → overview-XRYsL-Df.js} +1 -1
  144. package/dist/assets/{permission-BFEhHSn7.js → permission-DkUGU8Dy.js} +1 -1
  145. package/dist/assets/{preference-BruWxN0I.js → preference-C1-5FR1J.js} +7 -7
  146. package/dist/assets/pt-DpYO8djd.js +5 -0
  147. package/dist/assets/{python-BjdcRw1L.js → python-BeSPls-_.js} +1 -1
  148. package/dist/assets/{raf-schd.esm-CzegtaBG.js → raf-schd.esm-Bmt0I179.js} +1 -1
  149. package/dist/assets/{razor-IcRt_b4C.js → razor-VrEhsMvy.js} +1 -1
  150. package/dist/assets/{rotate-session-key-168u3XBv.js → rotate-session-key-BPyoa2sO.js} +1 -1
  151. package/dist/assets/ru-DkZtar3s.js +5 -0
  152. package/dist/assets/{runtime-_J5cuOkf.js → runtime-B2AOXg1s.js} +1 -1
  153. package/dist/assets/schema-BZPDZOr7.js +1 -0
  154. package/dist/assets/sdk-jF2ykj-E.js +1 -0
  155. package/dist/assets/{service-C07l8A9I.js → service-B3qJKUUb.js} +1 -1
  156. package/dist/assets/{shorten-label-lyN5fJdD.js → shorten-label-CdOupV3k.js} +1 -1
  157. package/dist/assets/{simple-select-DstcGmRv.js → simple-select-BlzEjZYK.js} +1 -1
  158. package/dist/assets/{spaces-DJOIEEkJ.js → spaces-BW0FVSze.js} +1 -1
  159. package/dist/assets/{status-DjHRNPcT.js → status-BwdlUN6n.js} +1 -1
  160. package/dist/assets/{status-DQyrCw3T.js → status-hfEX7VoN.js} +1 -1
  161. package/dist/assets/{switch-control-BmkF4vyJ.js → switch-control-CRKB4FYD.js} +1 -1
  162. package/dist/assets/{table-icons-GRr0eBoB.js → table-icons-DIiznwf7.js} +18 -18
  163. package/dist/assets/{team-Dn5co06a.js → team-Cr3_9lEo.js} +1 -1
  164. package/dist/assets/th-04iX5CrT.js +5 -0
  165. package/dist/assets/{toLower-ysbVZcXo.js → toLower-CBDRJ4vw.js} +1 -1
  166. package/dist/assets/toUpper-CiB1f6qA.js +1 -0
  167. package/dist/assets/{traffic-DlmGH1wr.js → traffic-c9i5qWvQ.js} +1 -1
  168. package/dist/assets/{tsMode-CApNVpTQ.js → tsMode-DA1Je9xp.js} +1 -1
  169. package/dist/assets/{typescript-C-UJmhZH.js → typescript-BC9b2MIP.js} +1 -1
  170. package/dist/assets/{url-evaluation-D0KhcJoH.js → url-evaluation-BNj0UZK1.js} +1 -1
  171. package/dist/assets/{url-join-DF4J2tJs.js → url-join-Cwzm0LVv.js} +1 -1
  172. package/dist/assets/{use-mobile-BRO-uubG.js → use-mobile-DegDbYke.js} +1 -1
  173. package/dist/assets/{use-mobile-BN298Cwf.js → use-mobile-ZXn0_vSN.js} +1 -1
  174. package/dist/assets/{useAsync-ihOYfxyw.js → useAsync-DhvcDNZU.js} +1 -1
  175. package/dist/assets/{useAsyncRetry-Bo43j2ED.js → useAsyncRetry-BuFRS3YZ.js} +1 -1
  176. package/dist/assets/{useLocalStorage-DdFQ0H8D.js → useLocalStorage-Ceu1UYjX.js} +1 -1
  177. package/dist/assets/{useThemeProps-7IPePURq.js → useThemeProps-CGNNiV2h.js} +1 -1
  178. package/dist/assets/{util-B8wHWVVx.js → util-CvX1kI1W.js} +1 -1
  179. package/dist/assets/vi-kOP0E9Ga.js +5 -0
  180. package/dist/assets/{wait-container-CYtuj1LZ.js → wait-container-DQfZdJnZ.js} +1 -1
  181. package/dist/assets/{without-wallet-BBF6F6X8.js → without-wallet-BKVBw3vL.js} +1 -1
  182. package/dist/assets/wrap-locale-DyG--MvI.js +1 -0
  183. package/dist/assets/{xml-CtHgzjfR.js → xml-Byc4kRnH.js} +1 -1
  184. package/dist/assets/{yaml-UcfMMR9d.js → yaml-BqelJ5A8.js} +1 -1
  185. package/dist/assets/{zh-98nxdLeR.js → zh-DZI4Yy2m.js} +3 -3
  186. package/dist/assets/{zh-tw-BdDE7n5E.js → zh-tw-BLapUUeq.js} +2 -2
  187. package/dist/index.html +1 -1
  188. package/dist/service-worker.js +1 -1
  189. package/package.json +1 -1
  190. package/dist/assets/ArrowDropDown-BS1FI8Dx.js +0 -1
  191. package/dist/assets/CSSTransition-Cp9IAg_E.js +0 -1
  192. package/dist/assets/actions-B68pZ6f6.js +0 -1
  193. package/dist/assets/api-DtECYdKn.js +0 -1
  194. package/dist/assets/ar-BJZY7v5z.js +0 -7
  195. package/dist/assets/blocklet-BwZNRhqB.js +0 -1
  196. package/dist/assets/cloneDeep-9Rjs5zfn.js +0 -1
  197. package/dist/assets/de-BF0NHTXz.js +0 -7
  198. package/dist/assets/emotion-cache.browser.esm-DR87qH_k.js +0 -1
  199. package/dist/assets/engine-XiroAPK-.js +0 -1
  200. package/dist/assets/es-Dv2m4LXp.js +0 -9
  201. package/dist/assets/fr-BGhg9oO3.js +0 -7
  202. package/dist/assets/getValidReactChildren-Dxx0sUSA.js +0 -1
  203. package/dist/assets/hi-CPfDhW8g.js +0 -5
  204. package/dist/assets/id-9TUzKF6k.js +0 -7
  205. package/dist/assets/index-1u2jtyuS.js +0 -1
  206. package/dist/assets/index-C_lSg5BT.js +0 -5
  207. package/dist/assets/index-ClIHkf52.js +0 -1
  208. package/dist/assets/index-DS6pTkmU.js +0 -16
  209. package/dist/assets/index-PexLSZpT.js +0 -328
  210. package/dist/assets/ja-DT5bRsBF.js +0 -9
  211. package/dist/assets/ko-CJn9PyPz.js +0 -9
  212. package/dist/assets/omit-B3Qfr75J.js +0 -1
  213. package/dist/assets/pt-K9FK6Ube.js +0 -5
  214. package/dist/assets/ru-C_RwukUu.js +0 -5
  215. package/dist/assets/schema-C7mAV9wx.js +0 -1
  216. package/dist/assets/sdk-Dn9cGqw6.js +0 -1
  217. package/dist/assets/th-Bhii_FfA.js +0 -5
  218. package/dist/assets/toUpper-B_tZoZUo.js +0 -1
  219. package/dist/assets/vi-DVF2tjOG.js +0 -5
  220. package/dist/assets/wrap-locale-C5FvK0v2.js +0 -1
@@ -1,13 +1,13 @@
1
- import{aF as de,j as e,hh as Es,hi as Is,bQ as Ds,r as q,s as xe,K as $,f5 as kt,t as U,eO as ft,a3 as ae,C as Ee,bi as zt,dL as Ls,o as T,hj as qs,b2 as Ht,cB as Ms,cU as Bs,dq as zs,T as Y,dH as it,bn as ne,bE as mt,p as ue,hk as Hs,bF as pt,b as W,bg as G,bA as ee,H as Z,aV as ie,V as oe,n as Nt,q as Ns,w as Ft,ac as Fs,i as Zt,ge as Zs,hl as Vs,at as Us,aU as X,R as Te,$ as ke,D as Ws,U as Js,v as re,X as at,hm as Ks,hn as Gs,eA as Ys,eC as Xs,F as je,aH as J,g3 as Qs,d0 as St,W as er,fn as Vt,ay as te,aR as Ct,ho as tr,f9 as Re,cw as E,bD as ge,aD as se,O as Q,aP as ye,hp as qe,a1 as sr,hq as Je,c7 as Ce,eD as rr,hr as nr,dI as ce,f as Oe,y as Ut,bz as ot,M as ir,cI as Wt,bs as ar,gk as Ze,hs as or,b9 as lr,L as cr,cv as Be,aK as He,ht as dr,Q as ur,bp as hr,af as Rt,a2 as Jt,bj as Ne,hu as Kt,b6 as fr,gD as we,fa as Gt,c_ as Yt,B as mr,b5 as Ot,fc as pr,fh as gr,G as Ke,J as yr,bx as xr}from"./index-DN1FR838.js";import{F as vr,a as lt,s as br,L as _e,S as jr,B as _r}from"./preference-BruWxN0I.js";import{N as $t}from"./ChevronRight-W_01-zFQ.js";import{T as Fe}from"./html-title-DZPr9ErN.js";import{w as Ie,P as wr}from"./permission-BFEhHSn7.js";import{u as gt}from"./index-ClIHkf52.js";import{D as kr}from"./Done-D_cfJoKY.js";import{R as Sr,S as M}from"./collapse-C4RswaYj.js";import{A as Cr,a as At}from"./Autocomplete-DzPelkmw.js";import{C as Rr,R as Or,S as $r,P as Ar}from"./rotate-session-key-168u3XBv.js";import{u as le}from"./blocklet-BwZNRhqB.js";import{C as Xt}from"./click-to-copy-_XuYTLfd.js";import{u as Ve}from"./team-Dn5co06a.js";import{v as Qt}from"./index-Cwj1cT7X.js";import{g as Pr}from"./chain-BLr2de5j.js";import{V as Tr,d as Er}from"./status-DjHRNPcT.js";import{S as pe}from"./Switch-DXK3jQx6.js";import{B as Ir}from"./index-B_irEVal.js";import{y as Dr}from"./index-aiY7k_D_.js";import{I as Lr,J as qr,K as Mr,L as Br}from"./index-CIJ5EXA3.js";import{u as ve,C as H,b as Pt}from"./index.esm-0qTLMRcM.js";import{S as ze,u as zr}from"./switch-control-BmkF4vyJ.js";import{D as Tt,R as es,a as ts}from"./url-evaluation-D0KhcJoH.js";import{A as Et}from"./Add-DMoAJUVW.js";import{H as Ue}from"./index-DtEm4DlR.js";import{u as ss}from"./use-mobile-BRO-uubG.js";import{S as Ge}from"./simple-select-DstcGmRv.js";import{G as Hr}from"./actions-BQYoCyzD.js";import{C as Nr}from"./CardContent-yvDYaO_0.js";import"./omit-B3Qfr75J.js";import"./index-Dcx5YP4F.js";import"./edit.svg-BWsZcaur.js";import"./ArrowDropDown-BS1FI8Dx.js";import"./ButtonGroup-Dlkb94HL.js";import"./getValidReactChildren-Dxx0sUSA.js";import"./index-C_lSg5BT.js";import"./iframe-DloJgn9Q.js";import"./ListSubheader-Dz5YbKqQ.js";import"./visuallyHidden-Dan1xhjv.js";import"./ErrorOutline-ClBFY-zS.js";import"./redux-DfszZyTl.js";import"./typeof-QjJsDpFa.js";import"./FilterList-CoyfX8VL.js";import"./CSSTransition-Cp9IAg_E.js";import"./emotion-cache.browser.esm-DR87qH_k.js";import"./depsEqual-C1JyiMkY.js";import"./TableSearch-DTa-kQYq.js";import"./Search-DihRAr8J.js";import"./Clear-3aQ_ViuO.js";import"./MoreVert-Crfla2Nw.js";import"./useLocalStorage-DdFQ0H8D.js";import"./get-safe-url-B8fUDSaQ.js";const rs=de([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")]),Fr=de([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")]),Zr=de(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"})),Vr=de(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"})),Ur=de(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"})),Wr=de(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"})),ct=de(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"})),Jr=de([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")]),Kr=de(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"})),Gr=de(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"})),ns=de(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"})),Yr=de(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"})),Xr=de(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 Qr=Array.prototype,It=Qr.splice;function en(v,R,O,C){var _=Is,j=-1,p=R.length,i=v;for(v===R&&(R=Es(R));++j<p;)for(var m=0,f=R[j],h=f;(m=_(i,h,m))>-1;)i!==v&&It.call(i,m,1),It.call(v,m,1);return v}function tn(v,R){return v&&v.length&&R&&R.length?en(v,R):v}var sn=Ds(tn);const rn={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 is({label:v="",disabled:R=!1,required:O=!1,initialValue:C="",onChange:_=()=>{},style:j={},onSubmit:p=()=>{},triggers:i=[],options:m=[],formatterBeforeSubmit:f=n=>n.join(","),helperText:h="",placeholder:t="",renderImage:l=()=>null,renderLabel:o=()=>"",filterKeys:r=["name"],noEmpty:s=!1,...c}){const[n,a]=q.useState(!1),[u,g]=q.useState(!1),[y,k]=q.useState(""),w=q.useRef(null),[d,x]=q.useState(C),[b,S]=q.useState(d),A=q.useMemo(()=>{if(!m)return{};const z={};return m.forEach(I=>{z[I.code]=I}),z},[m]),P=()=>{if(!m)return[];if(!y)return m.map(I=>I.code);const z=new RegExp(y.toLowerCase());return m.filter(I=>{for(let B=0;B<r.length;B++){const F=r[B];if(z.test(I[F]?.toLowerCase()))return!0}return!1}).map(I=>I.code)},L=async()=>{g(!0);try{await p(typeof f=="function"?f(b):b)===!1?S(d):s&&!b.length?(S(C),x(C)):(S(b),x(b))}catch{S(d)}finally{g(!1),a(!1)}},D=(z,I)=>{if(!Array.isArray(I)){S([]),_([]);return}const B=I.filter(F=>A[F]);if(!B.length){S([]),_([]);return}S(B),_(B)},N=z=>{z.stopPropagation(),a(!0),setTimeout(()=>{if(w.current){const I=w.current.querySelector("input");I&&I.focus()}},500)},V=n?e.jsx(Cr,{ref:w,options:m,value:b,onChange:D,inputValue:y,onInputChange:(z,I)=>{k(I)},fullWidth:!0,multiple:!0,variant:"outlined",margin:"dense",filterOptions:P,getOptionLabel:z=>A[z]?.name,renderInput:z=>e.jsx(U,{...z,label:"",placeholder:t}),renderOption:(z,I)=>{const B=b.indexOf(I)!==-1;return q.createElement(nn,{component:"li",...z,key:I},l(A[I]||{}),e.jsx($,{sx:{"& > img":{mr:2,flexShrink:0}},style:{flex:1,fontWeight:B?"700":"normal"},children:o(I,A[I])||A[I]?.name}),e.jsx($,{component:kt,sx:{opacity:.5,width:18,height:18},style:{visibility:B?"visible":"hidden"}}))},...c,slots:{popper:an}}):e.jsx($,{className:"form-item-input slot",onClick:N,style:{whiteSpace:"pre-wrap",cursor:"text"},sx:{px:1},children:b.filter(z=>m.some(I=>I.code===z)).map(z=>e.jsx(ft,{label:m.find(I=>I.code===z).name,style:{marginRight:8},size:"small"},z))});return e.jsx(vr,{className:"form",style:j,children:e.jsxs($,{className:"form-item",children:[e.jsxs($,{className:"form-item-label",children:[v,O&&e.jsx(Sr,{})]}),e.jsxs($,{className:"form-item-body",children:[e.jsx($,{className:"form-item-input",children:V}),n?e.jsx($,{className:"form-item-action",children:e.jsxs(e.Fragment,{children:[e.jsx(ae,{"data-cy":"schema-form-item-confirm",onClick:L,disabled:R||u,size:"large",children:u?e.jsx(Ee,{size:24}):e.jsx(kr,{})}),e.jsx(ae,{"data-cy":"schema-form-item-cancel",onClick:()=>{S(d),a(!1)},disabled:R||u,size:"large",children:e.jsx(kt,{})})]})}):null]}),n&&h&&e.jsx(zt,{children:h})]})})}is.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 nn=xe.div`
1
+ import{aF as de,j as e,hh as Es,hi as Is,bR as Ds,r as q,s as xe,K as $,f5 as kt,t as U,eO as ft,a3 as ie,C as Ee,bj as zt,dL as Ls,o as T,hj as qs,b3 as Ht,cB as Ms,cU as Bs,dq as zs,T as Y,dH as at,bo as ne,bF as mt,p as ue,hk as Hs,bG as pt,b as W,bh as G,bB as ee,H as Z,aW as ae,V as oe,n as Nt,q as Ns,w as Ft,ac as Fs,i as Zt,ge as Zs,hl as Vs,at as Us,aV as X,R as Te,$ as ke,D as Ws,U as Js,v as re,X as it,hm as Ks,hn as Gs,eA as Ys,eC as Xs,F as je,aH as J,g3 as Qs,d0 as St,W as er,fn as Vt,ay as te,aR as Ct,ho as tr,f9 as Re,aT as E,bE as ge,aD as se,O as Q,aP as ye,hp as qe,a1 as sr,hq as Je,c8 as Ce,eD as rr,hr as nr,dI as ce,f as Oe,y as Ut,bA as ot,M as ar,cI as Wt,bt as ir,gk as Ze,hs as or,ba as lr,L as cr,cw as Be,aK as He,ht as dr,Q as ur,bq as hr,af as Rt,a2 as Jt,bk as Ne,hu as Kt,b7 as fr,gD as we,fa as Gt,c_ as Yt,B as mr,b6 as Ot,fc as pr,fh as gr,G as Ke,J as yr,by as xr}from"./index-D331Asw4.js";import{F as vr,a as lt,s as br,L as _e,S as jr,B as _r}from"./preference-C1-5FR1J.js";import{N as $t}from"./ChevronRight-DqFLktR4.js";import{T as Fe}from"./html-title-B38L6o3q.js";import{w as Ie,P as wr}from"./permission-DkUGU8Dy.js";import{u as gt}from"./index-C7TNAoJk.js";import{D as kr}from"./Done-vE3VnBR0.js";import{R as Sr,S as M}from"./collapse-B_3Ho-QP.js";import{A as Cr,a as At}from"./Autocomplete-CQE4jUXI.js";import{C as Rr,R as Or,S as $r,P as Ar}from"./rotate-session-key-BPyoa2sO.js";import{u as le}from"./blocklet-DzsezOxR.js";import{C as Xt}from"./click-to-copy-BqSPQ3-7.js";import{u as Ve}from"./team-Cr3_9lEo.js";import{v as Qt}from"./index-CQ3wtaOi.js";import{g as Pr}from"./chain-C9-WRPu7.js";import{V as Tr,d as Er}from"./status-BwdlUN6n.js";import{S as pe}from"./Switch-DYHMHuRa.js";import{B as Ir}from"./index-CExol_6_.js";import{y as Dr}from"./index-C601SkM4.js";import{I as Lr,J as qr,K as Mr,L as Br}from"./index-DypTd994.js";import{u as ve,C as H,b as Pt}from"./index.esm-yDr2HoCY.js";import{S as ze,u as zr}from"./switch-control-CRKB4FYD.js";import{D as Tt,R as es,a as ts}from"./url-evaluation-BNj0UZK1.js";import{A as Et}from"./Add-kI5bOAG-.js";import{H as Ue}from"./index-Dj4J7MRE.js";import{u as ss}from"./use-mobile-DegDbYke.js";import{S as Ge}from"./simple-select-BlzEjZYK.js";import{G as Hr}from"./actions-CE27qWor.js";import{C as Nr}from"./CardContent-7R2qvvpi.js";import"./omit-BkO80IDI.js";import"./index-CT2MPFX1.js";import"./edit.svg-BQ5aLBCI.js";import"./ArrowDropDown-DQiHUHN2.js";import"./ButtonGroup-BMNpoL2h.js";import"./getValidReactChildren-BsG2WRwa.js";import"./index-CdmTtYEH.js";import"./iframe-BNWt4-fa.js";import"./ListSubheader-Dc864cM6.js";import"./visuallyHidden-Dan1xhjv.js";import"./ErrorOutline-DdvUBhqw.js";import"./redux-DfszZyTl.js";import"./typeof-QjJsDpFa.js";import"./FilterList-AnfIXCKs.js";import"./CSSTransition-BxHb6pgR.js";import"./emotion-cache.browser.esm-X_vzDGxi.js";import"./depsEqual-DDykxzRj.js";import"./TableSearch-CCo38KPm.js";import"./Search-C_5maoKz.js";import"./Clear-Hs60zEib.js";import"./MoreVert-CqJOZeEC.js";import"./useLocalStorage-Ceu1UYjX.js";import"./get-safe-url-DQ8We4Cn.js";const rs=de([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")]),Fr=de([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")]),Zr=de(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"})),Vr=de(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"})),Ur=de(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"})),Wr=de(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"})),ct=de(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"})),Jr=de([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")]),Kr=de(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"})),Gr=de(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"})),ns=de(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"})),Yr=de(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"})),Xr=de(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 Qr=Array.prototype,It=Qr.splice;function en(v,R,O,C){var _=Is,j=-1,p=R.length,a=v;for(v===R&&(R=Es(R));++j<p;)for(var m=0,f=R[j],h=f;(m=_(a,h,m))>-1;)a!==v&&It.call(a,m,1),It.call(v,m,1);return v}function tn(v,R){return v&&v.length&&R&&R.length?en(v,R):v}var sn=Ds(tn);const rn={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 as({label:v="",disabled:R=!1,required:O=!1,initialValue:C="",onChange:_=()=>{},style:j={},onSubmit:p=()=>{},triggers:a=[],options:m=[],formatterBeforeSubmit:f=n=>n.join(","),helperText:h="",placeholder:t="",renderImage:l=()=>null,renderLabel:o=()=>"",filterKeys:r=["name"],noEmpty:s=!1,...c}){const[n,i]=q.useState(!1),[u,g]=q.useState(!1),[y,k]=q.useState(""),w=q.useRef(null),[d,x]=q.useState(C),[b,S]=q.useState(d),A=q.useMemo(()=>{if(!m)return{};const z={};return m.forEach(I=>{z[I.code]=I}),z},[m]),P=()=>{if(!m)return[];if(!y)return m.map(I=>I.code);const z=new RegExp(y.toLowerCase());return m.filter(I=>{for(let B=0;B<r.length;B++){const F=r[B];if(z.test(I[F]?.toLowerCase()))return!0}return!1}).map(I=>I.code)},L=async()=>{g(!0);try{await p(typeof f=="function"?f(b):b)===!1?S(d):s&&!b.length?(S(C),x(C)):(S(b),x(b))}catch{S(d)}finally{g(!1),i(!1)}},D=(z,I)=>{if(!Array.isArray(I)){S([]),_([]);return}const B=I.filter(F=>A[F]);if(!B.length){S([]),_([]);return}S(B),_(B)},N=z=>{z.stopPropagation(),i(!0),setTimeout(()=>{if(w.current){const I=w.current.querySelector("input");I&&I.focus()}},500)},V=n?e.jsx(Cr,{ref:w,options:m,value:b,onChange:D,inputValue:y,onInputChange:(z,I)=>{k(I)},fullWidth:!0,multiple:!0,variant:"outlined",margin:"dense",filterOptions:P,getOptionLabel:z=>A[z]?.name,renderInput:z=>e.jsx(U,{...z,label:"",placeholder:t}),renderOption:(z,I)=>{const B=b.indexOf(I)!==-1;return q.createElement(nn,{component:"li",...z,key:I},l(A[I]||{}),e.jsx($,{sx:{"& > img":{mr:2,flexShrink:0}},style:{flex:1,fontWeight:B?"700":"normal"},children:o(I,A[I])||A[I]?.name}),e.jsx($,{component:kt,sx:{opacity:.5,width:18,height:18},style:{visibility:B?"visible":"hidden"}}))},...c,slots:{popper:an}}):e.jsx($,{className:"form-item-input slot",onClick:N,style:{whiteSpace:"pre-wrap",cursor:"text"},sx:{px:1},children:b.filter(z=>m.some(I=>I.code===z)).map(z=>e.jsx(ft,{label:m.find(I=>I.code===z).name,style:{marginRight:8},size:"small"},z))});return e.jsx(vr,{className:"form",style:j,children:e.jsxs($,{className:"form-item",children:[e.jsxs($,{className:"form-item-label",children:[v,O&&e.jsx(Sr,{})]}),e.jsxs($,{className:"form-item-body",children:[e.jsx($,{className:"form-item-input",children:V}),n?e.jsx($,{className:"form-item-action",children:e.jsxs(e.Fragment,{children:[e.jsx(ie,{"data-cy":"schema-form-item-confirm",onClick:L,disabled:R||u,size:"large",children:u?e.jsx(Ee,{size:24}):e.jsx(kr,{})}),e.jsx(ie,{"data-cy":"schema-form-item-cancel",onClick:()=>{S(d),i(!1)},disabled:R||u,size:"large",children:e.jsx(kt,{})})]})}):null]}),n&&h&&e.jsx(zt,{children:h})]})})}as.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 nn=xe.div`
2
2
  display: flex;
3
3
  justify-content: space-between;
4
4
  align-items: center;
5
5
  height: 48px;
6
6
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
7
7
  font-size: 1.1em;
8
- `,an=xe(Ls)(()=>({[`& .${At.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},[`& .${At.listbox}`]:{padding:0}}));function dt({name:v,icon:R,did:O,dark:C=!1}){return e.jsx(qs,{prefer:C?"dark":"light",children:e.jsx($,{sx:{display:"flex",justifyContent:"center",alignItems:"center",bgcolor:C?"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(Ms,{sx:{bgcolor:"transparent",width:48,height:48,borderRadius:1},children:R?e.jsx(Bs,{src:R,alt:"icon",style:{width:48,height:48,borderRadius:"8px"}}):e.jsx(zs,{variant:"rectangular",width:48,height:48,sx:{borderRadius:1}})}),e.jsxs($,{sx:{ml:1,flex:1,width:0,overflow:"hidden"},children:[e.jsx(Y,{sx:{fontSize:20,fontWeight:500,color:"text.primary",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:v}),e.jsx(it,{did:O,inline:!0,size:13})]})]})})})}dt.propTypes={name:T.string.isRequired,icon:T.string.isRequired,did:T.string.isRequired,dark:T.bool};var as=function(R){return e.jsxs("svg",{...R,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"})]})]})]})};as.defaultProps={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 384 216"};var os=function(R){return e.jsxs("svg",{...R,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"})]})]})]})};os.defaultProps={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 384 216"};var ls=function(R){return e.jsxs("svg",{...R,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"})]})]})]})};ls.defaultProps={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 384 216"};var cs=function(R){return e.jsxs("svg",{...R,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"})]})]})]})};cs.defaultProps={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 384 216"};var ds=function(R){return e.jsxs("svg",{...R,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"})]})]})]})};ds.defaultProps={width:"384",height:"216",fill:"none",xmlns:"http://www.w3.org/2000/svg"};const on=Object.keys(W.SUPPORTED_LANGUAGES).map(v=>({code:v,name:W.SUPPORTED_LANGUAGES[v].nativeName,enName:W.SUPPORTED_LANGUAGES[v].name})),ln=["name","enName","code"];function yt({blocklet:v,onUpdate:R=()=>{},hasPermission:O=!1,showFields:C=[],..._}){const{api:j,prefix:p,getSessionInHeader:i}=ne(),{t:m}=q.useContext(ue),[f,h]=gt({loading:!1,showTransferOwner:!1,showConfigVault:!1}),t=f.loading||!O,{logoUrl:l,logoDarkUrl:o,rectLogoUrl:r,rectLogoDarkUrl:s,faviconUrl:c,splashPortraitUrl:n,splashLandscapeUrl:a,ogImageUrl:u}=Hs({blocklet:v});if(pt(v.status))return null;const g=v.environments.find(b=>b.key===W.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LANGUAGES),y=v.environments.find(b=>b.key===W.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),k=v.environments.find(b=>b.key===W.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_OWNER),w=v.environments.find(b=>b.key===W.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_YEAR),d=[{key:W.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_NAME,title:m("blocklet.config.name"),description:m("blocklet.config.nameDesc"),value:v.environments.find(b=>b.key==="BLOCKLET_APP_NAME").value},{key:W.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_DESCRIPTION,title:m("blocklet.config.description"),description:m("blocklet.config.descriptionDesc"),value:v.environments.find(b=>b.key==="BLOCKLET_APP_DESCRIPTION").value},{key:W.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL,title:m("blocklet.config.appUrl"),description:m("blocklet.config.appUrlDesc"),value:y?y.value:""},{key:W.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_OWNER,title:m("blocklet.config.copyrightOwner"),description:m("blocklet.config.copyrightDesc"),value:k?k.value:""},{key:W.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_YEAR,title:m("blocklet.config.copyrightYear"),description:m("blocklet.config.copyrightDesc"),value:w?w.value:""}],x=async(b,S)=>{const A=[{key:b,value:S}];try{h({loading:!0});const{blocklet:P}=await j.configBlocklet({input:{did:v.meta.did,configs:A}});R(P)}catch(P){Z.error(P.message)}finally{h({loading:!1})}};return e.jsxs(hn,{..._,children:[(!C.length||C.includes("base-info-title"))&&e.jsxs(e.Fragment,{children:[e.jsxs($,{children:[e.jsx(Y,{variant:"h6",sx:{fontWeight:600},children:m("blocklet.config.baseInfo")}),e.jsx(Y,{variant:"body2",sx:{color:"text.secondary"},children:m("blocklet.config.baseInfoDesc")})]}),e.jsx($,{className:"config-form",component:G,sx:{my:3}})]}),(C.length?d.filter(b=>C.includes(b.key)):d).map(b=>e.jsxs(e.Fragment,{children:[e.jsx(M,{title:b.title,desc:b.description,children:e.jsx(lt,{style:{marginTop:0},disabled:t,loading:f.loading,initialValue:br.escapeTag(b.value),placeholder:b.title,onSubmit:S=>x(b.key,S)})},b.key),e.jsx($,{className:"config-form",component:G,sx:{my:3}})]})),(!C.length||C.includes(W.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LANGUAGES))&&e.jsxs(e.Fragment,{children:[e.jsx(M,{title:m("blocklet.config.languages"),desc:m("blocklet.config.languagesDesc"),children:e.jsx(is,{style:{marginTop:0},disabled:t,loading:f.loading,options:on,noEmpty:!0,initialValue:g?g.value.split(","):["en","zh"],onSubmit:b=>x("BLOCKLET_APP_LANGUAGES",b),helperText:m("blocklet.config.selectLanguagesTip"),placeholder:m("blocklet.config.languagesSearch"),filterKeys:ln,renderLabel:(b,S)=>S.name===S.enName?`${S.name} (${b.toUpperCase()})`:`${S.name}, ${S.enName} (${b.toUpperCase()})`})}),e.jsx($,{className:"config-form",component:G,sx:{my:3}})]}),(!C.length||C.includes("logo-settings-title"))&&e.jsxs(e.Fragment,{children:[e.jsxs($,{sx:{mt:6},children:[e.jsx(Y,{variant:"h6",sx:{fontWeight:600},children:m("blocklet.config.logoSettings")}),e.jsx(Y,{variant:"body2",sx:{color:"text.secondary"},children:m("blocklet.config.logoSettingsDesc")}),e.jsx(Y,{variant:"body2",sx:{color:"warning.main"},children:m("blocklet.config.changeImageTip")})]}),e.jsx($,{className:"config-form",component:G,sx:{my:3}})]}),e.jsxs(fn,{children:[(!C.length||C.includes(W.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO))&&e.jsxs(e.Fragment,{children:[e.jsx(M,{title:m("blocklet.config.logoSquare"),desc:`${m("blocklet.config.logoSquareDesc")}
9
- ${m("blocklet.config.logoDesc",{width:512,height:512,maxSize:5})}`,link:"https://www.didwallet.io/",children:e.jsxs($,{sx:{display:"flex",gap:3,flexWrap:"wrap"},children:[e.jsxs($,{sx:{alignSelf:"flex-start",display:"flex",flexDirection:"column",gap:3},children:[e.jsx(Y,{variant:"body2",children:m("common.lightMode")}),e.jsx($,{sx:{width:307,height:173,position:"relative",borderRadius:"4px",overflow:"hidden"},children:e.jsx(dt,{name:v.environments.find(b=>b.key==="BLOCKLET_APP_NAME").value,icon:l,did:v.meta.did})}),e.jsx(_e,{did:v.meta.did,width:80,type:"square",prefix:p,url:l,enabled:O,headers:i,aspectRatio:1,children:e.jsx(ee,{variant:"outlined",color:"primary",children:m("common.upload")})})]}),e.jsxs($,{sx:{alignSelf:"flex-start",display:"flex",flexDirection:"column",gap:3},children:[e.jsx(Y,{variant:"body2",children:m("common.darkMode")}),e.jsx($,{sx:{width:307,height:173,position:"relative",borderRadius:"4px",overflow:"hidden"},children:e.jsx(dt,{dark:!0,name:v.environments.find(b=>b.key==="BLOCKLET_APP_NAME").value,icon:o,did:v.meta.did})}),e.jsx(_e,{did:v.meta.did,width:80,type:"square-dark",prefix:p,url:o,enabled:O,headers:i,aspectRatio:1,children:e.jsx(ee,{variant:"outlined",color:"primary",children:m("common.upload")})})]})]})}),e.jsx($,{className:"config-form",component:G,sx:{my:3}})]}),(!C.length||C.includes(W.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_RECT))&&e.jsxs(e.Fragment,{children:[e.jsx(M,{title:m("blocklet.config.logoRect"),desc:`${m("blocklet.config.logoRectDesc")}`,children:e.jsxs($,{sx:{display:"flex",gap:3,flexWrap:"wrap"},children:[e.jsxs($,{sx:{alignSelf:"flex-start",display:"flex",flexDirection:"column",gap:3},children:[e.jsx(Y,{variant:"body2",children:m("common.lightMode")}),e.jsxs($,{sx:{width:307,height:173,position:"relative",borderRadius:"4px",overflow:"hidden"},children:[r?e.jsx(as,{viewBox:"0 0 384 216",sx:{width:"100%",height:"100%"}}):e.jsx(ls,{viewBox:"0 0 384 216",sx:{width:"100%",height:"100%"}}),r&&e.jsx($,{component:"img",src:r,alt:"app-logo",sx:{position:"absolute",top:112,left:64,height:40,objectFit:"contain",maxWidth:120}})]}),e.jsx(_e,{did:v.meta.did,width:80,height:"auto",type:"rect",prefix:p,url:r,enabled:O,headers:i,aspectRatio:NaN,minWidth:80,minHeight:120,children:e.jsx(ee,{variant:"outlined",children:m("common.upload")})})]}),e.jsxs($,{sx:{alignSelf:"flex-start",display:"flex",flexDirection:"column",gap:3},children:[e.jsx(Y,{variant:"body2",children:m("common.darkMode")}),e.jsxs($,{sx:{width:307,height:173,position:"relative",borderRadius:"4px",overflow:"hidden"},children:[s?e.jsx(os,{viewBox:"0 0 384 216",sx:{width:"100%",height:"100%"}}):e.jsx(cs,{viewBox:"0 0 384 216",sx:{width:"100%",height:"100%"}}),s&&e.jsx($,{component:"img",src:s,alt:"app-logo",sx:{position:"absolute",top:112,left:64,height:40,objectFit:"contain",maxWidth:120}})]}),e.jsx(_e,{did:v.meta.did,width:80,height:"auto",type:"rect-dark",prefix:p,url:s,enabled:O,headers:i,aspectRatio:NaN,minWidth:80,minHeight:120,children:e.jsx(ee,{variant:"outlined",children:m("common.upload")})})]})]})}),e.jsx($,{className:"config-form",component:G,sx:{my:3}})]}),(!C.length||C.includes(W.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_FAVICON))&&e.jsxs(e.Fragment,{children:[e.jsx(M,{title:m("blocklet.config.logoFavicon"),desc:`${m("blocklet.config.logoFaviconDesc")}
10
- ${m("blocklet.config.logoDesc",{width:512,height:512,maxSize:5})}`,children:e.jsxs($,{sx:{alignSelf:"flex-start",display:"flex",flexDirection:"column",gap:3},children:[e.jsxs($,{sx:{width:307,height:173,position:"relative",borderRadius:"4px",overflow:"hidden"},children:[e.jsx(ds,{viewBox:"0 0 384 216",sx:{width:"100%",height:"100%"}}),c&&e.jsx($,{component:"img",src:c,alt:"app-logo",sx:{position:"absolute",top:45,left:115,width:44,height:44,borderRadius:"12px"}})]}),e.jsx(_e,{did:v.meta.did,width:80,type:"favicon",prefix:p,url:c,enabled:O,headers:i,aspectRatio:1,children:e.jsx(ee,{variant:"outlined",children:m("common.upload")})})]})}),e.jsx($,{className:"config-form",component:G,sx:{my:3}})]}),(!C.length||C.includes(W.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPLASH_PORTRAIT))&&e.jsxs(e.Fragment,{children:[e.jsx(M,{title:m("blocklet.config.splashPortrait"),desc:m("blocklet.config.splashDesc"),link:"https://www.arcsphere.io/",children:e.jsxs($,{sx:{display:"flex",gap:3,alignSelf:"flex-start",".uploader-wrapper":{borderRadius:0},flexWrap:"wrap"},children:[e.jsx(_e,{did:v.meta.did,height:400,width:225,type:"splash-portrait",prefix:p,url:n,enabled:O,headers:i,aspectRatio:9/16,minWidth:900,minHeight:1e3,allowSVG:!1}),e.jsx($,{sx:{width:"100%",maxWidth:400,aspectRatio:"16 / 9",position:"relative"},children:e.jsx(_e,{did:v.meta.did,height:"100%",width:"100%",type:"splash-landscape",prefix:p,url:a,enabled:O,headers:i,aspectRatio:16/9,minWidth:1600,minHeight:900,allowSVG:!1})})]})}),e.jsx($,{className:"config-form",component:G,sx:{my:3}})]}),(!C.length||C.includes(W.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPLASH_LANDSCAPE))&&e.jsx(M,{title:m("blocklet.config.ogImage"),desc:m("blocklet.config.ogImageDesc"),children:e.jsx($,{sx:{width:"100%",maxWidth:400,aspectRatio:"40 / 21",position:"relative",alignSelf:"flex-start",".uploader-wrapper":{borderRadius:0}},children:e.jsx(_e,{did:v.meta.did,height:"100%",width:"100%",type:"og-image",prefix:p,url:u,enabled:O,headers:i,aspectRatio:40/21,minWidth:1200,minHeight:630,allowSVG:!1})})})]})]})}const cn=Ie(yt,"mutate_blocklets"),dn=Ie(yt,"",mt);function un(v){const{inService:R}=ne();return R?e.jsx(dn,{...v}):e.jsx(cn,{...v})}yt.propTypes={blocklet:T.object.isRequired,onUpdate:T.func,hasPermission:T.bool,showFields:T.array};const hn=xe($)`
8
+ `,an=xe(Ls)(()=>({[`& .${At.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},[`& .${At.listbox}`]:{padding:0}}));function dt({name:v,icon:R,did:O,dark:C=!1}){return e.jsx(qs,{prefer:C?"dark":"light",children:e.jsx($,{sx:{display:"flex",justifyContent:"center",alignItems:"center",bgcolor:C?"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(Ms,{sx:{bgcolor:"transparent",width:48,height:48,borderRadius:1},children:R?e.jsx(Bs,{src:R,alt:"icon",style:{width:48,height:48,borderRadius:"8px"}}):e.jsx(zs,{variant:"rectangular",width:48,height:48,sx:{borderRadius:1}})}),e.jsxs($,{sx:{ml:1,flex:1,width:0,overflow:"hidden"},children:[e.jsx(Y,{sx:{fontSize:20,fontWeight:500,color:"text.primary",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:v}),e.jsx(at,{did:O,inline:!0,size:13})]})]})})})}dt.propTypes={name:T.string.isRequired,icon:T.string.isRequired,did:T.string.isRequired,dark:T.bool};var is=function(R){return e.jsxs("svg",{...R,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"})]})]})]})};is.defaultProps={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 384 216"};var os=function(R){return e.jsxs("svg",{...R,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"})]})]})]})};os.defaultProps={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 384 216"};var ls=function(R){return e.jsxs("svg",{...R,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"})]})]})]})};ls.defaultProps={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 384 216"};var cs=function(R){return e.jsxs("svg",{...R,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"})]})]})]})};cs.defaultProps={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 384 216"};var ds=function(R){return e.jsxs("svg",{...R,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"})]})]})]})};ds.defaultProps={width:"384",height:"216",fill:"none",xmlns:"http://www.w3.org/2000/svg"};const on=Object.keys(W.SUPPORTED_LANGUAGES).map(v=>({code:v,name:W.SUPPORTED_LANGUAGES[v].nativeName,enName:W.SUPPORTED_LANGUAGES[v].name})),ln=["name","enName","code"];function yt({blocklet:v,onUpdate:R=()=>{},hasPermission:O=!1,showFields:C=[],..._}){const{api:j,prefix:p,getSessionInHeader:a}=ne(),{t:m}=q.useContext(ue),[f,h]=gt({loading:!1,showTransferOwner:!1,showConfigVault:!1}),t=f.loading||!O,{logoUrl:l,logoDarkUrl:o,rectLogoUrl:r,rectLogoDarkUrl:s,faviconUrl:c,splashPortraitUrl:n,splashLandscapeUrl:i,ogImageUrl:u}=Hs({blocklet:v});if(pt(v.status))return null;const g=v.environments.find(b=>b.key===W.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LANGUAGES),y=v.environments.find(b=>b.key===W.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),k=v.environments.find(b=>b.key===W.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_OWNER),w=v.environments.find(b=>b.key===W.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_YEAR),d=[{key:W.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_NAME,title:m("blocklet.config.name"),description:m("blocklet.config.nameDesc"),value:v.environments.find(b=>b.key==="BLOCKLET_APP_NAME").value,validate:b=>/^[a-zA-Z0-9][-a-zA-Z0-9_]{2,128}$/.test(b)?"":m("blocklet.config.nameValidateError")},{key:W.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_DESCRIPTION,title:m("blocklet.config.description"),description:m("blocklet.config.descriptionDesc"),value:v.environments.find(b=>b.key==="BLOCKLET_APP_DESCRIPTION").value},{key:W.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL,title:m("blocklet.config.appUrl"),description:m("blocklet.config.appUrlDesc"),value:y?y.value:""},{key:W.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_OWNER,title:m("blocklet.config.copyrightOwner"),description:m("blocklet.config.copyrightDesc"),value:k?k.value:""},{key:W.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_YEAR,title:m("blocklet.config.copyrightYear"),description:m("blocklet.config.copyrightDesc"),value:w?w.value:""}],x=async(b,S)=>{const A=[{key:b,value:S}];try{h({loading:!0});const{blocklet:P}=await j.configBlocklet({input:{did:v.meta.did,configs:A}});R(P)}catch(P){Z.error(P.message)}finally{h({loading:!1})}};return e.jsxs(hn,{..._,children:[(!C.length||C.includes("base-info-title"))&&e.jsxs(e.Fragment,{children:[e.jsxs($,{children:[e.jsx(Y,{variant:"h6",sx:{fontWeight:600},children:m("blocklet.config.baseInfo")}),e.jsx(Y,{variant:"body2",sx:{color:"text.secondary"},children:m("blocklet.config.baseInfoDesc")})]}),e.jsx($,{className:"config-form",component:G,sx:{my:3}})]}),(C.length?d.filter(b=>C.includes(b.key)):d).map(b=>e.jsxs(e.Fragment,{children:[e.jsx(M,{title:b.title,desc:b.description,children:e.jsx(lt,{style:{marginTop:0},disabled:t,loading:f.loading,initialValue:br.escapeTag(b.value),placeholder:b.title,onSubmit:S=>x(b.key,S),validate:b.validate})},b.key),e.jsx($,{className:"config-form",component:G,sx:{my:3}})]})),(!C.length||C.includes(W.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LANGUAGES))&&e.jsxs(e.Fragment,{children:[e.jsx(M,{title:m("blocklet.config.languages"),desc:m("blocklet.config.languagesDesc"),children:e.jsx(as,{style:{marginTop:0},disabled:t,loading:f.loading,options:on,noEmpty:!0,initialValue:g?g.value.split(","):["en","zh"],onSubmit:b=>x("BLOCKLET_APP_LANGUAGES",b),helperText:m("blocklet.config.selectLanguagesTip"),placeholder:m("blocklet.config.languagesSearch"),filterKeys:ln,renderLabel:(b,S)=>S.name===S.enName?`${S.name} (${b.toUpperCase()})`:`${S.name}, ${S.enName} (${b.toUpperCase()})`})}),e.jsx($,{className:"config-form",component:G,sx:{my:3}})]}),(!C.length||C.includes("logo-settings-title"))&&e.jsxs(e.Fragment,{children:[e.jsxs($,{sx:{mt:6},children:[e.jsx(Y,{variant:"h6",sx:{fontWeight:600},children:m("blocklet.config.logoSettings")}),e.jsx(Y,{variant:"body2",sx:{color:"text.secondary"},children:m("blocklet.config.logoSettingsDesc")}),e.jsx(Y,{variant:"body2",sx:{color:"warning.main"},children:m("blocklet.config.changeImageTip")})]}),e.jsx($,{className:"config-form",component:G,sx:{my:3}})]}),e.jsxs(fn,{children:[(!C.length||C.includes(W.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO))&&e.jsxs(e.Fragment,{children:[e.jsx(M,{title:m("blocklet.config.logoSquare"),desc:`${m("blocklet.config.logoSquareDesc")}
9
+ ${m("blocklet.config.logoDesc",{width:512,height:512,maxSize:5})}`,link:"https://www.didwallet.io/",children:e.jsxs($,{sx:{display:"flex",gap:3,flexWrap:"wrap"},children:[e.jsxs($,{sx:{alignSelf:"flex-start",display:"flex",flexDirection:"column",gap:3},children:[e.jsx(Y,{variant:"body2",children:m("common.lightMode")}),e.jsx($,{sx:{width:307,height:173,position:"relative",borderRadius:"4px",overflow:"hidden"},children:e.jsx(dt,{name:v.environments.find(b=>b.key==="BLOCKLET_APP_NAME").value,icon:l,did:v.meta.did})}),e.jsx(_e,{did:v.meta.did,width:80,type:"square",prefix:p,url:l,enabled:O,headers:a,aspectRatio:1,children:e.jsx(ee,{variant:"outlined",color:"primary",children:m("common.upload")})})]}),e.jsxs($,{sx:{alignSelf:"flex-start",display:"flex",flexDirection:"column",gap:3},children:[e.jsx(Y,{variant:"body2",children:m("common.darkMode")}),e.jsx($,{sx:{width:307,height:173,position:"relative",borderRadius:"4px",overflow:"hidden"},children:e.jsx(dt,{dark:!0,name:v.environments.find(b=>b.key==="BLOCKLET_APP_NAME").value,icon:o,did:v.meta.did})}),e.jsx(_e,{did:v.meta.did,width:80,type:"square-dark",prefix:p,url:o,enabled:O,headers:a,aspectRatio:1,children:e.jsx(ee,{variant:"outlined",color:"primary",children:m("common.upload")})})]})]})}),e.jsx($,{className:"config-form",component:G,sx:{my:3}})]}),(!C.length||C.includes(W.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_RECT))&&e.jsxs(e.Fragment,{children:[e.jsx(M,{title:m("blocklet.config.logoRect"),desc:`${m("blocklet.config.logoRectDesc")}`,children:e.jsxs($,{sx:{display:"flex",gap:3,flexWrap:"wrap"},children:[e.jsxs($,{sx:{alignSelf:"flex-start",display:"flex",flexDirection:"column",gap:3},children:[e.jsx(Y,{variant:"body2",children:m("common.lightMode")}),e.jsxs($,{sx:{width:307,height:173,position:"relative",borderRadius:"4px",overflow:"hidden"},children:[r?e.jsx(is,{viewBox:"0 0 384 216",sx:{width:"100%",height:"100%"}}):e.jsx(ls,{viewBox:"0 0 384 216",sx:{width:"100%",height:"100%"}}),r&&e.jsx($,{component:"img",src:r,alt:"app-logo",sx:{position:"absolute",top:112,left:64,height:40,objectFit:"contain",maxWidth:120}})]}),e.jsx(_e,{did:v.meta.did,width:80,height:"auto",type:"rect",prefix:p,url:r,enabled:O,headers:a,aspectRatio:NaN,minWidth:80,minHeight:120,children:e.jsx(ee,{variant:"outlined",children:m("common.upload")})})]}),e.jsxs($,{sx:{alignSelf:"flex-start",display:"flex",flexDirection:"column",gap:3},children:[e.jsx(Y,{variant:"body2",children:m("common.darkMode")}),e.jsxs($,{sx:{width:307,height:173,position:"relative",borderRadius:"4px",overflow:"hidden"},children:[s?e.jsx(os,{viewBox:"0 0 384 216",sx:{width:"100%",height:"100%"}}):e.jsx(cs,{viewBox:"0 0 384 216",sx:{width:"100%",height:"100%"}}),s&&e.jsx($,{component:"img",src:s,alt:"app-logo",sx:{position:"absolute",top:112,left:64,height:40,objectFit:"contain",maxWidth:120}})]}),e.jsx(_e,{did:v.meta.did,width:80,height:"auto",type:"rect-dark",prefix:p,url:s,enabled:O,headers:a,aspectRatio:NaN,minWidth:80,minHeight:120,children:e.jsx(ee,{variant:"outlined",children:m("common.upload")})})]})]})}),e.jsx($,{className:"config-form",component:G,sx:{my:3}})]}),(!C.length||C.includes(W.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_FAVICON))&&e.jsxs(e.Fragment,{children:[e.jsx(M,{title:m("blocklet.config.logoFavicon"),desc:`${m("blocklet.config.logoFaviconDesc")}
10
+ ${m("blocklet.config.logoDesc",{width:512,height:512,maxSize:5})}`,children:e.jsxs($,{sx:{alignSelf:"flex-start",display:"flex",flexDirection:"column",gap:3},children:[e.jsxs($,{sx:{width:307,height:173,position:"relative",borderRadius:"4px",overflow:"hidden"},children:[e.jsx(ds,{viewBox:"0 0 384 216",sx:{width:"100%",height:"100%"}}),c&&e.jsx($,{component:"img",src:c,alt:"app-logo",sx:{position:"absolute",top:45,left:115,width:44,height:44,borderRadius:"12px"}})]}),e.jsx(_e,{did:v.meta.did,width:80,type:"favicon",prefix:p,url:c,enabled:O,headers:a,aspectRatio:1,children:e.jsx(ee,{variant:"outlined",children:m("common.upload")})})]})}),e.jsx($,{className:"config-form",component:G,sx:{my:3}})]}),(!C.length||C.includes(W.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPLASH_PORTRAIT))&&e.jsxs(e.Fragment,{children:[e.jsx(M,{title:m("blocklet.config.splashPortrait"),desc:m("blocklet.config.splashDesc"),link:"https://www.arcsphere.io/",children:e.jsxs($,{sx:{display:"flex",gap:3,alignSelf:"flex-start",".uploader-wrapper":{borderRadius:0},flexWrap:"wrap"},children:[e.jsx(_e,{did:v.meta.did,height:400,width:225,type:"splash-portrait",prefix:p,url:n,enabled:O,headers:a,aspectRatio:9/16,minWidth:900,minHeight:1e3,allowSVG:!1}),e.jsx($,{sx:{width:"100%",maxWidth:400,aspectRatio:"16 / 9",position:"relative"},children:e.jsx(_e,{did:v.meta.did,height:"100%",width:"100%",type:"splash-landscape",prefix:p,url:i,enabled:O,headers:a,aspectRatio:16/9,minWidth:1600,minHeight:900,allowSVG:!1})})]})}),e.jsx($,{className:"config-form",component:G,sx:{my:3}})]}),(!C.length||C.includes(W.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPLASH_LANDSCAPE))&&e.jsx(M,{title:m("blocklet.config.ogImage"),desc:m("blocklet.config.ogImageDesc"),children:e.jsx($,{sx:{width:"100%",maxWidth:400,aspectRatio:"40 / 21",position:"relative",alignSelf:"flex-start",".uploader-wrapper":{borderRadius:0}},children:e.jsx(_e,{did:v.meta.did,height:"100%",width:"100%",type:"og-image",prefix:p,url:u,enabled:O,headers:a,aspectRatio:40/21,minWidth:1200,minHeight:630,allowSVG:!1})})})]})]})}const cn=Ie(yt,"mutate_blocklets"),dn=Ie(yt,"",mt);function un(v){const{inService:R}=ne();return R?e.jsx(dn,{...v}):e.jsx(cn,{...v})}yt.propTypes={blocklet:T.object.isRequired,onUpdate:T.func,hasPermission:T.bool,showFields:T.array};const hn=xe($)`
11
11
  max-width: 1536px;
12
12
 
13
13
  .config-form {
@@ -41,13 +41,13 @@ ${m("blocklet.config.logoDesc",{width:512,height:512,maxSize:5})}`,children:e.js
41
41
  .form-item {
42
42
  margin-top: 0;
43
43
  }
44
- `,fn=xe(ie)``,mn=localStorage.getItem("enableDebug")==="true";function us({onChange:v=()=>{},disabled:R=!1,loading:O=!1,inService:C=!1}){const{t:_}=oe(),{api:j,session:p}=Nt(),{blocklet:i}=le(),[m,f]=Ns({newAppSk:"",isConnectOpen:!1,confirmDialogOpen:!1}),h=()=>f({isConnectOpen:!1}),t=()=>{if(Zt.isInProgress(i.status)){Z.error(_("blocklet.error.isInProgress"));return}f({confirmDialogOpen:!0})};return e.jsxs(e.Fragment,{children:[e.jsx(M,{title:_("blocklet.config.migrate.button"),desc:_("blocklet.config.migrate.description"),children:e.jsx($,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsxs(ee,{style:{flexShrink:0},variant:"contained",color:"primary",size:"small","data-cy":"config-did",disabled:R||O,onClick:t,children:[e.jsx(Wr,{style:{fontSize:"1.3em",marginRight:4}}),_("blocklet.config.migrate.button")]})})}),e.jsxs(e.Fragment,{children:[m.isConnectOpen&&e.jsx(Ft,{popup:!0,open:m.isConnectOpen,forceConnected:!1,saveConnect:!1,action:"rotate-key-pair",checkFn:j.get,checkTimeout:5*60*1e3,onSuccess:()=>{v(),C&&p.logout(),h()},extraParams:{appDid:i.appDid},messages:{title:_("setup.keyPair.title"),scan:_("setup.keyPair.scan"),confirm:_("setup.keyPair.confirm"),success:_("setup.keyPair.success")},onClose:h}),m.confirmDialogOpen&&e.jsx(Fs,{title:e.jsx(Y,{sx:{fontSize:"20px",fontWeight:"500"},children:_("blocklet.config.migrate.title")}),description:e.jsx(Y,{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})})]})]})}us.propTypes={onChange:T.func,disabled:T.bool,loading:T.bool,inService:T.bool};function hs({onCancel:v,onSuccess:R,onError:O=()=>{}}){const{api:C}=q.useContext(Zs),[_,j]=q.useState(!1),{t:p,locale:i}=oe(),[m,f]=q.useState(""),[h,t]=q.useState(!1),[l,o]=q.useState(0),[r,s]=q.useState(""),{endpoint:c}=Ve(),[n,a]=q.useState(!1),u=d=>{f(null),j(!0);try{s(d.result),o(k.length-1)}catch(x){const b=at(x);f(b),O(x)}finally{j(!1)}},g=()=>{t(!0),o(1)},y=()=>{t(!1),o(0)},k=[{body:e.jsxs($,{children:[e.jsx(Y,{children:p("team.transferApp.transferDialog.tips.progress")}),e.jsx(Y,{sx:{mt:3,mb:2},children:p("team.transferApp.transferDialog.tips.newOwnerPermissions")})]}),cancel:p("common.cancel"),confirm:p("team.transferApp.transferDialog.createTransferLink"),onCancel:v,onConfirm:g},{cancel:p("common.cancel"),confirm:p("team.transferApp.transferDialog.createTransferLink"),body:()=>e.jsx(Ft,{action:"transfer-app-owner",open:h,locale:i,checkFn:C.get,onClose:y,onSuccess:u,checkTimeout:5*60*1e3,extraParams:{},messages:{title:p("team.transferApp.connectDialog.title"),scan:p("team.transferApp.connectDialog.scan"),confirm:p("team.transferApp.connectDialog.confirm"),success:p("team.transferApp.connectDialog.success")},popup:!0})},{body:()=>{const d=Vs({transferId:r.transferId,endpoint:c});return e.jsxs(e.Fragment,{children:[e.jsx($,{component:$e,dangerouslySetInnerHTML:{__html:p("team.transferApp.transferDialog.createSuccessTip1")}}),e.jsx($,{component:$e,sx:{mt:2},children:e.jsx($e,{children:p("team.transferApp.transferDialog.createSuccessTip3")})}),e.jsxs($,{children:[e.jsx($,{component:$e,sx:{mt:2},children:e.jsx($e,{children:p("team.transferApp.transferDialog.createSuccessTip2",{expireDate:Us(r.expireDate,i)})})}),e.jsx($,{sx:{my:1},children:e.jsx(Xt,{children:d})})]}),e.jsx("div",{children:e.jsx(X,{value:"end",control:e.jsx(Te,{checked:n,onChange:x=>a(x.target.checked)}),label:p("team.transferApp.transferDialog.iKnow"),labelPlacement:"end"})})]})},confirm:p("common.confirm"),onConfirm:R}],w=k[l];return e.jsxs(ke,{title:e.jsx($e,{className:"title",children:p("team.transferApp.transferDialog.title")}),fullWidth:!0,open:!0,showCloseButton:!1,actions:e.jsxs(e.Fragment,{children:[w.cancel&&e.jsx(re,{onClick:w.onCancel,color:"inherit",children:w.cancel}),e.jsxs(re,{onClick:w.onConfirm,color:"error",disabled:_||l===k.length-1&&!n,variant:"contained",autoFocus:!0,children:[_&&e.jsx(Ee,{size:16}),w.confirm]})]}),children:[e.jsx(Ws,{component:"div",children:typeof w.body=="function"?w.body():w.body}),!!m&&e.jsx(Js,{severity:"error",variant:"icon",children:m})]})}hs.propTypes={onCancel:T.func.isRequired,onSuccess:T.func.isRequired,onError:T.func};const $e=xe.div`
44
+ `,fn=xe(ae)``,mn=localStorage.getItem("enableDebug")==="true";function us({onChange:v=()=>{},disabled:R=!1,loading:O=!1,inService:C=!1}){const{t:_}=oe(),{api:j,session:p}=Nt(),{blocklet:a}=le(),[m,f]=Ns({newAppSk:"",isConnectOpen:!1,confirmDialogOpen:!1}),h=()=>f({isConnectOpen:!1}),t=()=>{if(Zt.isInProgress(a.status)){Z.error(_("blocklet.error.isInProgress"));return}f({confirmDialogOpen:!0})};return e.jsxs(e.Fragment,{children:[e.jsx(M,{title:_("blocklet.config.migrate.button"),desc:_("blocklet.config.migrate.description"),children:e.jsx($,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsxs(ee,{style:{flexShrink:0},variant:"contained",color:"primary",size:"small","data-cy":"config-did",disabled:R||O,onClick:t,children:[e.jsx(Wr,{style:{fontSize:"1.3em",marginRight:4}}),_("blocklet.config.migrate.button")]})})}),e.jsxs(e.Fragment,{children:[m.isConnectOpen&&e.jsx(Ft,{popup:!0,open:m.isConnectOpen,forceConnected:!1,saveConnect:!1,action:"rotate-key-pair",checkFn:j.get,checkTimeout:5*60*1e3,onSuccess:()=>{v(),C&&p.logout(),h()},extraParams:{appDid:a.appDid},messages:{title:_("setup.keyPair.title"),scan:_("setup.keyPair.scan"),confirm:_("setup.keyPair.confirm"),success:_("setup.keyPair.success")},onClose:h}),m.confirmDialogOpen&&e.jsx(Fs,{title:e.jsx(Y,{sx:{fontSize:"20px",fontWeight:"500"},children:_("blocklet.config.migrate.title")}),description:e.jsx(Y,{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})})]})]})}us.propTypes={onChange:T.func,disabled:T.bool,loading:T.bool,inService:T.bool};function hs({onCancel:v,onSuccess:R,onError:O=()=>{}}){const{api:C}=q.useContext(Zs),[_,j]=q.useState(!1),{t:p,locale:a}=oe(),[m,f]=q.useState(""),[h,t]=q.useState(!1),[l,o]=q.useState(0),[r,s]=q.useState(""),{endpoint:c}=Ve(),[n,i]=q.useState(!1),u=d=>{f(null),j(!0);try{s(d.result),o(k.length-1)}catch(x){const b=it(x);f(b),O(x)}finally{j(!1)}},g=()=>{t(!0),o(1)},y=()=>{t(!1),o(0)},k=[{body:e.jsxs($,{children:[e.jsx(Y,{children:p("team.transferApp.transferDialog.tips.progress")}),e.jsx(Y,{sx:{mt:3,mb:2},children:p("team.transferApp.transferDialog.tips.newOwnerPermissions")})]}),cancel:p("common.cancel"),confirm:p("team.transferApp.transferDialog.createTransferLink"),onCancel:v,onConfirm:g},{cancel:p("common.cancel"),confirm:p("team.transferApp.transferDialog.createTransferLink"),body:()=>e.jsx(Ft,{action:"transfer-app-owner",open:h,locale:a,checkFn:C.get,onClose:y,onSuccess:u,checkTimeout:5*60*1e3,extraParams:{},messages:{title:p("team.transferApp.connectDialog.title"),scan:p("team.transferApp.connectDialog.scan"),confirm:p("team.transferApp.connectDialog.confirm"),success:p("team.transferApp.connectDialog.success")},popup:!0})},{body:()=>{const d=Vs({transferId:r.transferId,endpoint:c});return e.jsxs(e.Fragment,{children:[e.jsx($,{component:$e,dangerouslySetInnerHTML:{__html:p("team.transferApp.transferDialog.createSuccessTip1")}}),e.jsx($,{component:$e,sx:{mt:2},children:e.jsx($e,{children:p("team.transferApp.transferDialog.createSuccessTip3")})}),e.jsxs($,{children:[e.jsx($,{component:$e,sx:{mt:2},children:e.jsx($e,{children:p("team.transferApp.transferDialog.createSuccessTip2",{expireDate:Us(r.expireDate,a)})})}),e.jsx($,{sx:{my:1},children:e.jsx(Xt,{children:d})})]}),e.jsx("div",{children:e.jsx(X,{value:"end",control:e.jsx(Te,{checked:n,onChange:x=>i(x.target.checked)}),label:p("team.transferApp.transferDialog.iKnow"),labelPlacement:"end"})})]})},confirm:p("common.confirm"),onConfirm:R}],w=k[l];return e.jsxs(ke,{title:e.jsx($e,{className:"title",children:p("team.transferApp.transferDialog.title")}),fullWidth:!0,open:!0,showCloseButton:!1,actions:e.jsxs(e.Fragment,{children:[w.cancel&&e.jsx(re,{onClick:w.onCancel,color:"inherit",children:w.cancel}),e.jsxs(re,{onClick:w.onConfirm,color:"error",disabled:_||l===k.length-1&&!n,variant:"contained",autoFocus:!0,children:[_&&e.jsx(Ee,{size:16}),w.confirm]})]}),children:[e.jsx(Ws,{component:"div",children:typeof w.body=="function"?w.body():w.body}),!!m&&e.jsx(Js,{severity:"error",variant:"icon",children:m})]})}hs.propTypes={onCancel:T.func.isRequired,onSuccess:T.func.isRequired,onError:T.func};const $e=xe.div`
45
45
  font-size: 16px;
46
46
  font-weight: bold;
47
47
  &.title {
48
48
  font-size: 20px;
49
49
  }
50
- `;var Me={},Ye={exports:{}},Dt;function pn(){return Dt||(Dt=1,function(v,R){(function(O,C){v.exports=C()})(self,()=>{return O={7629:(_,j,p)=>{const i=p(375),m=p(8571),f=p(9474),h=p(1687),t=p(8652),l=p(8160),o=p(3292),r=p(6354),s=p(8901),c=p(9708),n=p(6914),a=p(2294),u=p(6133),g=p(1152),y=p(8863),k=p(2036),w={Base:class{constructor(d){this.type=d,this.$_root=null,this._definition={},this._reset()}_reset(){this._ids=new a.Ids,this._preferences=null,this._refs=new u.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 i(typeof c.describe=="function","Manifest functionality disabled"),c.describe(this)}allow(...d){return l.verifyFlat(d,"allow"),this._values(d,"_valids")}alter(d){i(d&&typeof d=="object"&&!Array.isArray(d),"Invalid targets argument"),i(!this._inRuleset(),"Cannot set alterations inside a ruleset");const x=this.clone();x.$_terms.alterations=x.$_terms.alterations||[];for(const b in d){const S=d[b];i(typeof S=="function","Alteration adjuster for",b,"must be a function"),x.$_terms.alterations.push({target:b,adjuster:S})}return x.$_temp.ruleset=!1,x}artifact(d){return i(d!==void 0,"Artifact cannot be undefined"),i(!this._cache,"Cannot set an artifact with a rule cache"),this.$_setFlag("artifact",d)}cast(d){return i(d===!1||typeof d=="string","Invalid to value"),i(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,x){return this._default("default",d,x)}description(d){return i(d&&typeof d=="string","Description must be a non-empty string"),this.$_setFlag("description",d)}empty(d){const x=this.clone();return d!==void 0&&(d=x.$_compile(d,{override:!1})),x.$_setFlag("empty",d,{clone:!1})}error(d){return i(d,"Missing error"),i(d instanceof Error||typeof d=="function","Must provide a valid Error object or a function"),this.$_setFlag("error",d)}example(d,x={}){return i(d!==void 0,"Missing example"),l.assertOptions(x,["override"]),this._inner("examples",d,{single:!0,override:x.override})}external(d,x){return typeof d=="object"&&(i(!x,"Cannot combine options with description"),x=d.description,d=d.method),i(typeof d=="function","Method must be a function"),i(x===void 0||x&&typeof x=="string","Description must be a non-empty string"),this._inner("externals",{method:d,description:x},{single:!0})}failover(d,x){return this._default("failover",d,x)}forbidden(){return this.presence("forbidden")}id(d){return d?(i(typeof d=="string","id must be a non-empty string"),i(/^[^\.]+$/.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 i(d&&typeof d=="string","Label name must be a non-empty string"),this.$_setFlag("label",d)}meta(d){return i(d!==void 0,"Meta cannot be undefined"),this._inner("metas",d,{single:!0})}note(...d){i(d.length,"Missing notes");for(const x of d)i(x&&typeof x=="string","Notes must be non-empty strings");return this._inner("notes",d)}only(d=!0){return i(typeof d=="boolean","Invalid mode:",d),this.$_setFlag("only",d)}optional(){return this.presence("optional")}prefs(d){i(d,"Missing preferences"),i(d.context===void 0,"Cannot override context"),i(d.externals===void 0,"Cannot override externals"),i(d.warnings===void 0,"Cannot override warnings"),i(d.debug===void 0,"Cannot override debug"),l.checkPreferences(d);const x=this.clone();return x._preferences=l.preferences(x._preferences,d),x}presence(d){return i(["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 i(["raw","strip"].includes(d),"Unknown result mode",d),this.$_setFlag("result",d)}required(){return this.presence("required")}strict(d){const x=this.clone(),b=d!==void 0&&!d;return x._preferences=l.preferences(x._preferences,{convert:b}),x}strip(d=!0){return this.$_setFlag("result",d?"strip":void 0)}tag(...d){i(d.length,"Missing tags");for(const x of d)i(x&&typeof x=="string","Tags must be non-empty strings");return this._inner("tags",d)}unit(d){return i(d&&typeof d=="string","Unit name must be a non-empty string"),this.$_setFlag("unit",d)}valid(...d){l.verifyFlat(d,"valid");const x=this.allow(...d);return x.$_setFlag("only",!!x._valids,{clone:!1}),x}when(d,x){const b=this.clone();b.$_terms.whens||(b.$_terms.whens=[]);const S=o.when(b,d,x);if(!["any","link"].includes(b.type)){const A=S.is?[S]:S.switch;for(const P of A)i(!P.then||P.then.type==="any"||P.then.type===b.type,"Cannot combine",b.type,"with",P.then&&P.then.type),i(!P.otherwise||P.otherwise.type==="any"||P.otherwise.type===b.type,"Cannot combine",b.type,"with",P.otherwise&&P.otherwise.type)}return b.$_terms.whens.push(S),b.$_mutateRebuild()}cache(d){i(!this._inRuleset(),"Cannot set caching inside a ruleset"),i(!this._cache,"Cannot override schema cache"),i(this._flags.artifact===void 0,"Cannot cache a rule with an artifact");const x=this.clone();return x._cache=d||t.provider.provision(),x.$_temp.ruleset=!1,x}clone(){const d=Object.create(Object.getPrototypeOf(this));return this._assign(d)}concat(d){i(l.isSchema(d),"Invalid schema object"),i(this.type==="any"||d.type==="any"||d.type===this.type,"Cannot merge type",this.type,"with another type:",d.type),i(!this._inRuleset(),"Cannot concatenate onto a schema with open ruleset"),i(!d._inRuleset(),"Cannot concatenate a schema with open ruleset");let x=this.clone();if(this.type==="any"&&d.type!=="any"){const b=d.clone();for(const S of Object.keys(x))S!=="type"&&(b[S]=x[S]);x=b}x._ids.concat(d._ids),x._refs.register(d,u.toSibling),x._preferences=x._preferences?l.preferences(x._preferences,d._preferences):d._preferences,x._valids=k.merge(x._valids,d._valids,d._invalids),x._invalids=k.merge(x._invalids,d._invalids,d._valids);for(const b of d._singleRules.keys())x._singleRules.has(b)&&(x._rules=x._rules.filter(S=>S.keep||S.name!==b),x._singleRules.delete(b));for(const b of d._rules)d._definition.rules[b.method].multi||x._singleRules.set(b.name,b),x._rules.push(b);if(x._flags.empty&&d._flags.empty){x._flags.empty=x._flags.empty.concat(d._flags.empty);const b=Object.assign({},d._flags);delete b.empty,h(x._flags,b)}else if(d._flags.empty){x._flags.empty=d._flags.empty;const b=Object.assign({},d._flags);delete b.empty,h(x._flags,b)}else h(x._flags,d._flags);for(const b in d.$_terms){const S=d.$_terms[b];S?x.$_terms[b]?x.$_terms[b]=x.$_terms[b].concat(S):x.$_terms[b]=S.slice():x.$_terms[b]||(x.$_terms[b]=S)}return this.$_root._tracer&&this.$_root._tracer._combine(x,[this,d]),x.$_mutateRebuild()}extend(d){return i(!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,x){i(!this._inRuleset(),"Cannot fork inside a ruleset");let b=this;for(let S of[].concat(d))S=Array.isArray(S)?S:S.split("."),b=b._ids.fork(S,x,b);return b.$_temp.ruleset=!1,b}rule(d){const x=this._definition;l.assertOptions(d,Object.keys(x.modifiers)),i(this.$_temp.ruleset!==!1,"Cannot apply rules to empty ruleset or the last rule added does not support rule properties");const b=this.$_temp.ruleset===null?this._rules.length-1:this.$_temp.ruleset;i(b>=0&&b<this._rules.length,"Cannot apply rules to empty ruleset");const S=this.clone();for(let A=b;A<S._rules.length;++A){const P=S._rules[A],L=m(P);for(const D in d)x.modifiers[D](L,d[D]),i(L.name===P.name,"Cannot change rule name");S._rules[A]=L,S._singleRules.get(L.name)===P&&S._singleRules.set(L.name,L)}return S.$_temp.ruleset=!1,S.$_mutateRebuild()}get ruleset(){i(!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),i(!this._inRuleset(),"Cannot tailor inside a ruleset");let x=this;if(this.$_terms.alterations)for(const{target:b,adjuster:S}of this.$_terms.alterations)d.includes(b)&&(x=S(x),i(l.isSchema(x),"Alteration adjuster for",b,"failed to return a schema object"));return x=x.$_modify({each:b=>b.tailor(d),ref:!1}),x.$_temp.ruleset=!1,x.$_mutateRebuild()}tracer(){return g.location?g.location(this):this}validate(d,x){return y.entry(d,this,x)}validateAsync(d,x){return y.entryAsync(d,this,x)}$_addRule(d){typeof d=="string"&&(d={name:d}),i(d&&typeof d=="object","Invalid options"),i(d.name&&typeof d.name=="string","Invalid rule name");for(const P in d)i(P[0]!=="_","Cannot set private rule properties");const x=Object.assign({},d);x._resolve=[],x.method=x.method||x.name;const b=this._definition.rules[x.method],S=x.args;i(b,"Unknown rule",x.method);const A=this.clone();if(S){i(Object.keys(S).length===1||Object.keys(S).length===this._definition.rules[x.name].args.length,"Invalid rule definition for",this.type,x.name);for(const P in S){let L=S[P];if(b.argsByName){const D=b.argsByName.get(P);if(D.ref&&l.isResolvable(L))x._resolve.push(P),A.$_mutateRegister(L);else if(D.normalize&&(L=D.normalize(L),S[P]=L),D.assert){const N=l.validateArg(L,P,D);i(!N,N,"or reference")}}L!==void 0?S[P]=L:delete S[P]}}return b.multi||(A._ruleRemove(x.name,{clone:!1}),A._singleRules.set(x.name,x)),A.$_temp.ruleset===!1&&(A.$_temp.ruleset=null),b.priority?A._rules.unshift(x):A._rules.push(x),A}$_compile(d,x){return o.schema(this.$_root,d,x)}$_createError(d,x,b,S,A,P={}){const L=P.flags!==!1?this._flags:{},D=P.messages?n.merge(this._definition.messages,P.messages):this._definition.messages;return new r.Report(d,x,b,L,D,S,A)}$_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,x,b,S){(b=Object.assign({},b)).abortEarly=!0,b._externals=!1,x.snapshot();const A=!y.validate(d,this,x,b,S).errors;return x.restore(),A}$_modify(d){return l.assertOptions(d,["each","once","ref","schema"]),a.schema(this,d)||this}$_mutateRebuild(){return i(!this._inRuleset(),"Cannot add this rule inside a ruleset"),this._refs.reset(),this._ids.reset(),this.$_modify({each:(d,{source:x,name:b,path:S,key:A})=>{const P=this._definition[x][b]&&this._definition[x][b].register;P!==!1&&this.$_mutateRegister(d,{family:P,key:A})}}),this._definition.rebuild&&this._definition.rebuild(this),this.$_temp.ruleset=!1,this}$_mutateRegister(d,{family:x,key:b}={}){this._refs.register(d,x),this._ids.register(d,{key:b})}$_property(d){return this._definition.properties[d]}$_reach(d){return this._ids.reach(d)}$_rootReferences(){return this._refs.roots()}$_setFlag(d,x,b={}){i(d[0]==="_"||!this._inRuleset(),"Cannot set flag inside a ruleset");const S=this._definition.flags[d]||{};if(f(x,S.default)&&(x=void 0),f(x,this._flags[d]))return this;const A=b.clone!==!1?this.clone():this;return x!==void 0?(A._flags[d]=x,A.$_mutateRegister(x)):delete A._flags[d],d[0]!=="_"&&(A.$_temp.ruleset=!1),A}$_parent(d,...x){return this[d][l.symbols.parent].call(this,...x)}$_validate(d,x,b){return y.validate(d,this,x,b)}_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=m(this._singleRules,{shallow:!0}),d._refs=this._refs.clone(),d._flags=Object.assign({},this._flags),d._cache=null,d.$_terms={};for(const x in this.$_terms)d.$_terms[x]=this.$_terms[x]?this.$_terms[x].slice():null;d.$_super={};for(const x in this.$_super)d.$_super[x]=this._super[x].bind(d);return d}_bare(){const d=this.clone();d._reset();const x=d._definition.terms;for(const b in x){const S=x[b];d.$_terms[b]=S.init}return d.$_mutateRebuild()}_default(d,x,b={}){return l.assertOptions(b,"literal"),i(x!==void 0,"Missing",d,"value"),i(typeof x=="function"||!b.literal,"Only function value supports literal option"),typeof x=="function"&&b.literal&&(x={[l.symbols.literal]:!0,literal:x}),this.$_setFlag(d,x)}_generate(d,x,b){if(!this.$_terms.whens)return{schema:this};const S=[],A=[];for(let D=0;D<this.$_terms.whens.length;++D){const N=this.$_terms.whens[D];if(N.concat){S.push(N.concat),A.push(`${D}.concat`);continue}const V=N.ref?N.ref.resolve(d,x,b):d,z=N.is?[N]:N.switch,I=A.length;for(let B=0;B<z.length;++B){const{is:F,then:K,otherwise:he}=z[B],be=`${D}${N.switch?"."+B:""}`;if(F.$_match(V,x.nest(F,`${be}.is`),b)){if(K){const De=x.localize([...x.path,`${be}.then`],x.ancestors,x.schemas),{schema:We,id:Le}=K._generate(d,De,b);S.push(We),A.push(`${be}.then${Le?`(${Le})`:""}`);break}}else if(he){const De=x.localize([...x.path,`${be}.otherwise`],x.ancestors,x.schemas),{schema:We,id:Le}=he._generate(d,De,b);S.push(We),A.push(`${be}.otherwise${Le?`(${Le})`:""}`);break}}if(N.break&&A.length>I)break}const P=A.join(", ");if(x.mainstay.tracer.debug(x,"rule","when",P),!P)return{schema:this};if(!x.mainstay.tracer.active&&this.$_temp.whens[P])return{schema:this.$_temp.whens[P],id:P};let L=this;this._definition.generate&&(L=this._definition.generate(this,d,x,b));for(const D of S)L=L.concat(D);return this.$_root._tracer&&this.$_root._tracer._combine(L,[this,...S]),this.$_temp.whens[P]=L,{schema:L,id:P}}_inner(d,x,b={}){i(!this._inRuleset(),`Cannot set ${d} inside a ruleset`);const S=this.clone();return S.$_terms[d]&&!b.override||(S.$_terms[d]=[]),b.single?S.$_terms[d].push(x):S.$_terms[d].push(...x),S.$_temp.ruleset=!1,S}_inRuleset(){return this.$_temp.ruleset!==null&&this.$_temp.ruleset!==!1}_ruleRemove(d,x={}){if(!this._singleRules.has(d))return this;const b=x.clone!==!1?this.clone():this;b._singleRules.delete(d);const S=[];for(let A=0;A<b._rules.length;++A){const P=b._rules[A];P.name!==d||P.keep?S.push(P):b._inRuleset()&&A<b.$_temp.ruleset&&--b.$_temp.ruleset}return b._rules=S,b}_values(d,x){l.verifyFlat(d,x.slice(1,-1));const b=this.clone(),S=d[0]===l.symbols.override;if(S&&(d=d.slice(1)),!b[x]&&d.length?b[x]=new k:S&&(b[x]=d.length?new k:null,b.$_mutateRebuild()),!b[x])return b;S&&b[x].override();for(const A of d){i(A!==void 0,"Cannot call allow/valid/invalid with undefined"),i(A!==l.symbols.override,"Override must be the first value");const P=x==="_invalids"?"_valids":"_invalids";b[P]&&(b[P].remove(A),b[P].length||(i(x==="_valids"||!b._flags.only,"Setting invalid value",A,"leaves schema rejecting all values due to previous valid rule"),b[P]=null)),b[x].add(A,b._refs)}return b}}};w.Base.prototype[l.symbols.any]={version:l.version,compile:o.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:(_,j,p)=>{const i=p(375),m=p(8571),f=p(8160),h={max:1e3,supported:new Set(["undefined","boolean","number","string"])};j.provider={provision:t=>new h.Cache(t)},h.Cache=class{constructor(t={}){f.assertOptions(t,["max"]),i(t.max===void 0||t.max&&t.max>0&&isFinite(t.max),"Invalid max cache size"),this._max=t.max||h.max,this._map=new Map,this._list=new h.List}get length(){return this._map.size}set(t,l){if(t!==null&&!h.supported.has(typeof t))return;let o=this._map.get(t);if(o)return o.value=l,void this._list.first(o);o=this._list.unshift({key:t,value:l}),this._map.set(t,o),this._compact()}get(t){const l=this._map.get(t);if(l)return this._list.first(l),m(l.value)}_compact(){if(this._map.size>this._max){const t=this._list.pop();this._map.delete(t.key)}}},h.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:o}=t;return l.prev=o,o&&(o.next=l),t===this.tail&&(this.tail=l),t.prev=null,t.next=null,t}}},8160:(_,j,p)=>{const i=p(375),m=p(7916),f=p(5934);let h,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)?)?)?)?$/};j.version=f.version,j.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},j.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")},j.assertOptions=function(o,r,s="Options"){i(o&&typeof o=="object"&&!Array.isArray(o),"Options must be of type object");const c=Object.keys(o).filter(n=>!r.includes(n));i(c.length===0,`${s} contain unknown keys: ${c}`)},j.checkPreferences=function(o){t=t||p(3378);const r=t.preferences.validate(o);if(r.error)throw new m([r.error.details[0].message])},j.compare=function(o,r,s){switch(s){case"=":return o===r;case">":return o>r;case"<":return o<r;case">=":return o>=r;case"<=":return o<=r}},j.default=function(o,r){return o===void 0?r:o},j.isIsoDate=function(o){return l.isoDate.test(o)},j.isNumber=function(o){return typeof o=="number"&&!isNaN(o)},j.isResolvable=function(o){return!!o&&(o[j.symbols.ref]||o[j.symbols.template])},j.isSchema=function(o,r={}){const s=o&&o[j.symbols.any];return!!s&&(i(r.legacy||s.version===j.version,"Cannot mix different versions of joi schemas"),!0)},j.isValues=function(o){return o[j.symbols.values]},j.limit=function(o){return Number.isSafeInteger(o)&&o>=0},j.preferences=function(o,r){h=h||p(6914),o=o||{},r=r||{};const s=Object.assign({},o,r);return r.errors&&o.errors&&(s.errors=Object.assign({},o.errors,r.errors),s.errors.wrap=Object.assign({},o.errors.wrap,r.errors.wrap)),r.messages&&(s.messages=h.compile(r.messages,o.messages)),delete s[j.symbols.prefs],s},j.tryWithPath=function(o,r,s={}){try{return o()}catch(c){throw c.path!==void 0?c.path=r+"."+c.path:c.path=r,s.append&&(c.message=`${c.message} (${c.path})`),c}},j.validateArg=function(o,r,{assert:s,message:c}){if(j.isSchema(s)){const n=s.validate(o);return n.error?n.error.message:void 0}if(!s(o))return r?`${r} ${c}`:c},j.verifyFlat=function(o,r){for(const s of o)i(!Array.isArray(s),"Method no longer accepts array arguments:",r)}},3292:(_,j,p)=>{const i=p(375),m=p(8160),f=p(6133),h={};j.schema=function(t,l,o={}){m.assertOptions(o,["appendPath","override"]);try{return h.schema(t,l,o)}catch(r){throw o.appendPath&&r.path!==void 0&&(r.message=`${r.message} (${r.path})`),r}},h.schema=function(t,l,o){i(l!==void 0,"Invalid undefined schema"),Array.isArray(l)&&(i(l.length,"Invalid empty array schema"),l.length===1&&(l=l[0]));const r=(s,...c)=>o.override!==!1?s.valid(t.override,...c):s.valid(...c);if(h.simple(l))return r(t,l);if(typeof l=="function")return t.custom(l);if(i(typeof l=="object","Invalid schema content:",typeof l),m.isResolvable(l))return r(t,l);if(m.isSchema(l))return l;if(Array.isArray(l)){for(const s of l)if(!h.simple(s))return t.alternatives().try(...l);return r(t,...l)}return l instanceof RegExp?t.string().regex(l):l instanceof Date?r(t.date(),l):(i(Object.getPrototypeOf(l)===Object.getPrototypeOf({}),"Schema can only contain plain objects"),t.object().keys(l))},j.ref=function(t,l){return f.isRef(t)?t:f.create(t,l)},j.compile=function(t,l,o={}){m.assertOptions(o,["legacy"]);const r=l&&l[m.symbols.any];if(r)return i(o.legacy||r.version===m.version,"Cannot mix different versions of joi schemas:",r.version,m.version),l;if(typeof l!="object"||!o.legacy)return j.schema(t,l,{appendPath:!0});const s=h.walk(l);return s?s.compile(s.root,l):j.schema(t,l,{appendPath:!0})},h.walk=function(t){if(typeof t!="object")return null;if(Array.isArray(t)){for(const o of t){const r=h.walk(o);if(r)return r}return null}const l=t[m.symbols.any];if(l)return{root:t[l.root],compile:l.compile};i(Object.getPrototypeOf(t)===Object.getPrototypeOf({}),"Schema can only contain plain objects");for(const o in t){const r=h.walk(t[o]);if(r)return r}return null},h.simple=function(t){return t===null||["boolean","string","number"].includes(typeof t)},j.when=function(t,l,o){if(o===void 0&&(i(l&&typeof l=="object","Missing options"),o=l,l=f.create(".")),Array.isArray(o)&&(o={switch:o}),m.assertOptions(o,["is","not","then","otherwise","switch","break"]),m.isSchema(l))return i(o.is===void 0,'"is" can not be used with a schema condition'),i(o.not===void 0,'"not" can not be used with a schema condition'),i(o.switch===void 0,'"switch" can not be used with a schema condition'),h.condition(t,{is:l,then:o.then,otherwise:o.otherwise,break:o.break});if(i(f.isRef(l)||typeof l=="string","Invalid condition:",l),i(o.not===void 0||o.is===void 0,'Cannot combine "is" with "not"'),o.switch===void 0){let s=o;o.not!==void 0&&(s={is:o.not,then:o.otherwise,otherwise:o.then,break:o.break});let c=s.is!==void 0?t.$_compile(s.is):t.$_root.invalid(null,!1,0,"").required();return i(s.then!==void 0||s.otherwise!==void 0,'options must have at least one of "then", "otherwise", or "switch"'),i(s.break===void 0||s.then===void 0||s.otherwise===void 0,"Cannot specify then, otherwise, and break all together"),o.is===void 0||f.isRef(o.is)||m.isSchema(o.is)||(c=c.required()),h.condition(t,{ref:j.ref(l),is:c,then:s.then,otherwise:s.otherwise,break:s.break})}i(Array.isArray(o.switch),'"switch" must be an array'),i(o.is===void 0,'Cannot combine "switch" with "is"'),i(o.not===void 0,'Cannot combine "switch" with "not"'),i(o.then===void 0,'Cannot combine "switch" with "then"');const r={ref:j.ref(l),switch:[],break:o.break};for(let s=0;s<o.switch.length;++s){const c=o.switch[s],n=s===o.switch.length-1;m.assertOptions(c,n?["is","then","otherwise"]:["is","then"]),i(c.is!==void 0,'Switch statement missing "is"'),i(c.then!==void 0,'Switch statement missing "then"');const a={is:t.$_compile(c.is),then:t.$_compile(c.then)};if(f.isRef(c.is)||m.isSchema(c.is)||(a.is=a.is.required()),n){i(o.otherwise===void 0||c.otherwise===void 0,'Cannot specify "otherwise" inside and outside a "switch"');const u=o.otherwise!==void 0?o.otherwise:c.otherwise;u!==void 0&&(i(r.break===void 0,"Cannot specify both otherwise and break"),a.otherwise=t.$_compile(u))}r.switch.push(a)}return r},h.condition=function(t,l){for(const o of["then","otherwise"])l[o]===void 0?delete l[o]:l[o]=t.$_compile(l[o]);return l}},6354:(_,j,p)=>{const i=p(5688),m=p(8160),f=p(3328);j.Report=class{constructor(h,t,l,o,r,s,c){if(this.code=h,this.flags=o,this.messages=r,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=j.label(this.flags,this.state,this.prefs,this.messages),this.value===void 0||this.local.hasOwnProperty("value")||(this.local.value=this.value),this.path.length){const n=this.path[this.path.length-1];typeof n!="object"&&(this.local.key=n)}}_setTemplate(h){if(this.template=h,!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 h=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 "${h}" 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(h,t){return j.template(this.value,h,t||this.code,this.state,this.prefs)}},j.path=function(h){let t="";for(const l of h)typeof l!="object"&&(typeof l=="string"?(t&&(t+="."),t+=l):t+=`[${l}]`);return t},j.template=function(h,t,l,o,r){if(!t)return;if(f.isTemplate(t))return l!=="root"?t:null;let s=r.errors.language;if(m.isResolvable(s)&&(s=s.resolve(h,o,r)),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["*"]},j.label=function(h,t,l,o){if(!l.errors.label)return"";if(h.label)return h.label;let r=t.path;return l.errors.label==="key"&&t.path.length>1&&(r=t.path.slice(-1)),j.path(r)||j.template(null,l.messages,"root",t,l)||o&&j.template(null,o,"root",t,l)||"value"},j.process=function(h,t,l){if(!h)return null;const{override:o,message:r,details:s}=j.details(h);if(o)return o;if(l.errors.stack)return new j.ValidationError(r,s,t);const c=Error.stackTraceLimit;Error.stackTraceLimit=0;const n=new j.ValidationError(r,s,t);return Error.stackTraceLimit=c,n},j.details=function(h,t={}){let l=[];const o=[];for(const r of h){if(r instanceof Error){if(t.override!==!1)return{override:r};const c=r.toString();l.push(c),o.push({message:c,type:"override",context:{error:r}});continue}const s=r.toString();l.push(s),o.push({message:s,path:r.path.filter(c=>typeof c!="object"),type:r.code,context:r.local})}return l.length>1&&(l=[...new Set(l)]),{message:l.join(". "),details:o}},j.ValidationError=class extends Error{constructor(h,t,l){super(h),this._original=l,this.details=t}static isError(h){return h instanceof j.ValidationError}},j.ValidationError.prototype.isJoi=!0,j.ValidationError.prototype.name="ValidationError",j.ValidationError.prototype.annotate=i.error},8901:(_,j,p)=>{const i=p(375),m=p(8571),f=p(8160),h=p(6914),t={};j.type=function(l,o){const r=Object.getPrototypeOf(l),s=m(r),c=l._assign(Object.create(s)),n=Object.assign({},o);delete n.base,s._definition=n;const a=r._definition||{};n.messages=h.merge(a.messages,n.messages),n.properties=Object.assign({},a.properties,n.properties),c.type=n.type,n.flags=Object.assign({},a.flags,n.flags);const u=Object.assign({},a.terms);if(n.terms)for(const w in n.terms){const d=n.terms[w];i(c.$_terms[w]===void 0,"Invalid term override for",n.type,w),c.$_terms[w]=d.init,u[w]=d}n.terms=u,n.args||(n.args=a.args),n.prepare=t.prepare(n.prepare,a.prepare),n.coerce&&(typeof n.coerce=="function"&&(n.coerce={method:n.coerce}),n.coerce.from&&!Array.isArray(n.coerce.from)&&(n.coerce={method:n.coerce.method,from:[].concat(n.coerce.from)})),n.coerce=t.coerce(n.coerce,a.coerce),n.validate=t.validate(n.validate,a.validate);const g=Object.assign({},a.rules);if(n.rules)for(const w in n.rules){const d=n.rules[w];i(typeof d=="object","Invalid rule definition for",n.type,w);let x=d.method;if(x===void 0&&(x=function(){return this.$_addRule(w)}),x&&(i(!s[w],"Rule conflict in",n.type,w),s[w]=x),i(!g[w],"Rule conflict in",n.type,w),g[w]=d,d.alias){const b=[].concat(d.alias);for(const S of b)s[S]=d.method}d.args&&(d.argsByName=new Map,d.args=d.args.map(b=>(typeof b=="string"&&(b={name:b}),i(!d.argsByName.has(b.name),"Duplicated argument name",b.name),f.isSchema(b.assert)&&(b.assert=b.assert.strict().label(b.name)),d.argsByName.set(b.name,b),b)))}n.rules=g;const y=Object.assign({},a.modifiers);if(n.modifiers)for(const w in n.modifiers){i(!s[w],"Rule conflict in",n.type,w);const d=n.modifiers[w];i(typeof d=="function","Invalid modifier definition for",n.type,w);const x=function(b){return this.rule({[w]:b})};s[w]=x,y[w]=d}if(n.modifiers=y,n.overrides){s._super=r,c.$_super={};for(const w in n.overrides)i(r[w],"Cannot override missing",w),n.overrides[w][f.symbols.parent]=r[w],c.$_super[w]=r[w].bind(c);Object.assign(s,n.overrides)}n.cast=Object.assign({},a.cast,n.cast);const k=Object.assign({},a.manifest,n.manifest);return k.build=t.build(n.manifest&&n.manifest.build,a.manifest&&a.manifest.build),n.manifest=k,n.rebuild=t.rebuild(n.rebuild,a.rebuild),c},t.build=function(l,o){return l&&o?function(r,s){return o(l(r,s),s)}:l||o},t.coerce=function(l,o){return l&&o?{from:l.from&&o.from?[...new Set([...l.from,...o.from])]:null,method(r,s){let c;if((!o.from||o.from.includes(typeof r))&&(c=o.method(r,s),c)){if(c.errors||c.value===void 0)return c;r=c.value}if(!l.from||l.from.includes(typeof r)){const n=l.method(r,s);if(n)return n}return c}}:l||o},t.prepare=function(l,o){return l&&o?function(r,s){const c=l(r,s);if(c){if(c.errors||c.value===void 0)return c;r=c.value}return o(r,s)||c}:l||o},t.rebuild=function(l,o){return l&&o?function(r){o(r),l(r)}:l||o},t.validate=function(l,o){return l&&o?function(r,s){const c=o(r,s);if(c){if(c.errors&&(!Array.isArray(c.errors)||c.errors.length))return c;r=c.value}return l(r,s)||c}:l||o}},5107:(_,j,p)=>{const i=p(375),m=p(8571),f=p(8652),h=p(8160),t=p(3292),l=p(6354),o=p(8901),r=p(9708),s=p(6133),c=p(3328),n=p(1152);let a;const u={types:{alternatives:p(4946),any:p(8068),array:p(546),boolean:p(4937),date:p(7500),function:p(390),link:p(8785),number:p(3832),object:p(8966),string:p(7417),symbol:p(8826)},aliases:{alt:"alternatives",bool:"boolean",func:"function"},root:function(){const g={_types:new Set(Object.keys(u.types))};for(const y of g._types)g[y]=function(...k){return i(!k.length||["alternatives","link","object"].includes(y),"The",y,"type does not allow arguments"),u.generate(this,u.types[y],k)};for(const y of["allow","custom","disallow","equal","exist","forbidden","invalid","not","only","optional","options","prefs","preferences","required","strip","valid","when"])g[y]=function(...k){return this.any()[y](...k)};Object.assign(g,u.methods);for(const y in u.aliases){const k=u.aliases[y];g[y]=g[k]}return g.x=g.expression,n.setup&&n.setup(g),g}};u.methods={ValidationError:l.ValidationError,version:h.version,cache:f.provider,assert(g,y,...k){u.assert(g,y,!0,k)},attempt:(g,y,...k)=>u.assert(g,y,!1,k),build(g){return i(typeof r.build=="function","Manifest functionality disabled"),r.build(this,g)},checkPreferences(g){h.checkPreferences(g)},compile(g,y){return t.compile(this,g,y)},defaults(g){i(typeof g=="function","modifier must be a function");const y=Object.assign({},this);for(const k of y._types){const w=g(y[k]());i(h.isSchema(w),"modifier must return a valid schema object"),y[k]=function(...d){return u.generate(this,w,d)}}return y},expression:(...g)=>new c(...g),extend(...g){h.verifyFlat(g,"extend"),a=a||p(3378),i(g.length,"You need to provide at least one extension"),this.assert(g,a.extensions);const y=Object.assign({},this);y._types=new Set(y._types);for(let k of g){typeof k=="function"&&(k=k(y)),this.assert(k,a.extension);const w=u.expandExtension(k,y);for(const d of w){i(y[d.type]===void 0||y._types.has(d.type),"Cannot override name",d.type);const x=d.base||this.any(),b=o.type(x,d);y._types.add(d.type),y[d.type]=function(...S){return u.generate(this,b,S)}}}return y},isError:l.ValidationError.isError,isExpression:c.isTemplate,isRef:s.isRef,isSchema:h.isSchema,in:(...g)=>s.in(...g),override:h.symbols.override,ref:(...g)=>s.create(...g),types(){const g={};for(const y of this._types)g[y]=this[y]();for(const y in u.aliases)g[y]=this[y]();return g}},u.assert=function(g,y,k,w){const d=w[0]instanceof Error||typeof w[0]=="string"?w[0]:null,x=d!==null?w[1]:w[0],b=y.validate(g,h.preferences({errors:{stack:!0}},x||{}));let S=b.error;if(!S)return b.value;if(d instanceof Error)throw d;const A=k&&typeof S.annotate=="function"?S.annotate():S.message;throw S instanceof l.ValidationError==0&&(S=m(S)),S.message=d?`${d} ${A}`:A,S},u.generate=function(g,y,k){return i(g,"Must be invoked on a Joi instance."),y.$_root=g,y._definition.args&&k.length?y._definition.args(y,...k):y},u.expandExtension=function(g,y){if(typeof g.type=="string")return[g];const k=[];for(const w of y._types)if(g.type.test(w)){const d=Object.assign({},g);d.type=w,d.base=y[w](),k.push(d)}return k},_.exports=u.root()},6914:(_,j,p)=>{const i=p(375),m=p(8571),f=p(3328);j.compile=function(h,t){if(typeof h=="string")return i(!t,"Cannot set single message string"),new f(h);if(f.isTemplate(h))return i(!t,"Cannot set single message template"),h;i(typeof h=="object"&&!Array.isArray(h),"Invalid message options"),t=t?m(t):{};for(let l in h){const o=h[l];if(l==="root"||f.isTemplate(o)){t[l]=o;continue}if(typeof o=="string"){t[l]=new f(o);continue}i(typeof o=="object"&&!Array.isArray(o),"Invalid message for",l);const r=l;for(l in t[r]=t[r]||{},o){const s=o[l];l==="root"||f.isTemplate(s)?t[r][l]=s:(i(typeof s=="string","Invalid message for",l,"in",r),t[r][l]=new f(s))}}return t},j.decompile=function(h){const t={};for(let l in h){const o=h[l];if(l==="root"){t.root=o;continue}if(f.isTemplate(o)){t[l]=o.describe({compact:!0});continue}const r=l;for(l in t[r]={},o){const s=o[l];l!=="root"?t[r][l]=s.describe({compact:!0}):t[r].root=s}}return t},j.merge=function(h,t){if(!h)return j.compile(t);if(!t)return h;if(typeof t=="string")return new f(t);if(f.isTemplate(t))return t;const l=m(h);for(let o in t){const r=t[o];if(o==="root"||f.isTemplate(r)){l[o]=r;continue}if(typeof r=="string"){l[o]=new f(r);continue}i(typeof r=="object"&&!Array.isArray(r),"Invalid message for",o);const s=o;for(o in l[s]=l[s]||{},r){const c=r[o];o==="root"||f.isTemplate(c)?l[s][o]=c:(i(typeof c=="string","Invalid message for",o,"in",s),l[s][o]=new f(c))}}return l}},2294:(_,j,p)=>{const i=p(375),m=p(8160),f=p(6133),h={};j.Ids=h.Ids=class{constructor(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}clone(){const t=new h.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,o]of t._byId.entries())i(!this._byKey.has(l),"Schema id conflicts with existing key:",l),this._byId.set(l,o);for(const[l,o]of t._byKey.entries())i(!this._byId.has(l),"Schema key conflicts with existing id:",l),this._byKey.set(l,o)}fork(t,l,o){const r=this._collect(t);r.push({schema:o});const s=r.shift();let c={id:s.id,schema:l(s.schema)};i(m.isSchema(c.schema),"adjuster function failed to return a joi schema type");for(const n of r)c={id:n.id,schema:h.fork(n.schema,c.id,c.schema)};return c.schema}labels(t,l=[]){const o=t[0],r=this._get(o);if(!r)return[...l,...t].join(".");const s=t.slice(1);return l=[...l,r.schema._flags.label||o],s.length?r.schema._ids.labels(s,l):l.join(".")}reach(t,l=[]){const o=t[0],r=this._get(o);i(r,"Schema does not contain path",[...l,...t].join("."));const s=t.slice(1);return s.length?r.schema._ids.reach(s,[...l,o]):r.schema}register(t,{key:l}={}){if(!t||!m.isSchema(t))return;(t.$_property("schemaChain")||t._ids._schemaChain)&&(this._schemaChain=!0);const o=t._flags.id;if(o){const r=this._byId.get(o);i(!r||r.schema===t,"Cannot add different schemas with the same id:",o),i(!this._byKey.has(o),"Schema id conflicts with existing key:",o),this._byId.set(o,{schema:t,id:o})}l&&(i(!this._byKey.has(l),"Schema already contains key:",l),i(!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=[],o=[]){const r=t[0],s=this._get(r);i(s,"Schema does not contain path",[...l,...t].join(".")),o=[s,...o];const c=t.slice(1);return c.length?s.schema._ids._collect(c,[...l,r],o):o}_get(t){return this._byId.get(t)||this._byKey.get(t)}},h.fork=function(t,l,o){const r=j.schema(t,{each:(s,{key:c})=>{if(l===(s._flags.id||c))return o},ref:!1});return r?r.$_mutateRebuild():t},j.schema=function(t,l){let o;for(const r in t._flags){if(r[0]==="_")continue;const s=h.scan(t._flags[r],{source:"flags",name:r},l);s!==void 0&&(o=o||t.clone(),o._flags[r]=s)}for(let r=0;r<t._rules.length;++r){const s=t._rules[r],c=h.scan(s.args,{source:"rules",name:s.name},l);if(c!==void 0){o=o||t.clone();const n=Object.assign({},s);n.args=c,o._rules[r]=n,o._singleRules.get(s.name)===s&&o._singleRules.set(s.name,n)}}for(const r in t.$_terms){if(r[0]==="_")continue;const s=h.scan(t.$_terms[r],{source:"terms",name:r},l);s!==void 0&&(o=o||t.clone(),o.$_terms[r]=s)}return o},h.scan=function(t,l,o,r,s){const c=r||[];if(t===null||typeof t!="object")return;let n;if(Array.isArray(t)){for(let a=0;a<t.length;++a){const u=l.source==="terms"&&l.name==="keys"&&t[a].key,g=h.scan(t[a],l,o,[a,...c],u);g!==void 0&&(n=n||t.slice(),n[a]=g)}return n}if(o.schema!==!1&&m.isSchema(t)||o.ref!==!1&&f.isRef(t)){const a=o.each(t,{...l,path:c,key:s});return a===t?void 0:a}for(const a in t){if(a[0]==="_")continue;const u=h.scan(t[a],l,o,[a,...c],s);u!==void 0&&(n=n||Object.assign({},t),n[a]=u)}return n}},6133:(_,j,p)=>{const i=p(375),m=p(8571),f=p(9621),h=p(8160);let t;const l={symbol:Symbol("ref"),defaults:{adjust:null,in:!1,iterables:null,map:null,separator:".",type:"value"}};j.create=function(o,r={}){i(typeof o=="string","Invalid reference key:",o),h.assertOptions(r,["adjust","ancestor","in","iterables","map","prefix","render","separator"]),i(!r.prefix||typeof r.prefix=="object","options.prefix must be of type object");const s=Object.assign({},l.defaults,r);delete s.prefix;const c=s.separator,n=l.context(o,c,r.prefix);if(s.type=n.type,o=n.key,s.type==="value")if(n.root&&(i(!c||o[0]!==c,"Cannot specify relative path with root prefix"),s.ancestor="root",o||(o=null)),c&&c===o)o=null,s.ancestor=0;else if(s.ancestor!==void 0)i(!c||!o||o[0]!==c,"Cannot combine prefix with ancestor option");else{const[a,u]=l.ancestor(o,c);u&&(o=o.slice(u))===""&&(o=null),s.ancestor=a}return s.path=c?o===null?[]:o.split(c):[o],new l.Ref(s)},j.in=function(o,r={}){return j.create(o,{...r,in:!0})},j.isRef=function(o){return!!o&&!!o[h.symbols.ref]},l.Ref=class{constructor(o){i(typeof o=="object","Invalid reference construction"),h.assertOptions(o,["adjust","ancestor","in","iterables","map","path","render","separator","type","depth","key","root","display"]),i([!1,void 0].includes(o.separator)||typeof o.separator=="string"&&o.separator.length===1,"Invalid separator"),i(!o.adjust||typeof o.adjust=="function","options.adjust must be a function"),i(!o.map||Array.isArray(o.map),"options.map must be an array"),i(!o.map||!o.adjust,"Cannot set both map and adjust options"),Object.assign(this,l.defaults,o),i(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(o,r,s,c,n={}){return i(!this.in||n.in,"Invalid in() reference usage"),this.type==="global"?this._resolve(s.context,r,n):this.type==="local"?this._resolve(c,r,n):this.ancestor?this.ancestor==="root"?this._resolve(r.ancestors[r.ancestors.length-1],r,n):(i(this.ancestor<=r.ancestors.length,"Invalid reference exceeds the schema root:",this.display),this._resolve(r.ancestors[this.ancestor-1],r,n)):this._resolve(o,r,n)}_resolve(o,r,s){let c;if(this.type==="value"&&r.mainstay.shadow&&s.shadow!==!1&&(c=r.mainstay.shadow.get(this.absolute(r))),c===void 0&&(c=f(o,this.path,{iterables:this.iterables,functions:!0})),this.adjust&&(c=this.adjust(c)),this.map){const n=this.map.get(c);n!==void 0&&(c=n)}return r.mainstay&&r.mainstay.tracer.resolve(r,this,c),c}toString(){return this.display}absolute(o){return[...o.path.slice(0,-this.ancestor),...this.path]}clone(){return new l.Ref(this)}describe(){const o={path:this.path};this.type!=="value"&&(o.type=this.type),this.separator!=="."&&(o.separator=this.separator),this.type==="value"&&this.ancestor!==1&&(o.ancestor=this.ancestor),this.map&&(o.map=[...this.map]);for(const r of["adjust","iterables","render"])this[r]!==null&&this[r]!==void 0&&(o[r]=this[r]);return this.in!==!1&&(o.in=!0),{ref:o}}updateDisplay(){const o=this.key!==null?this.key:"";if(this.type!=="value")return void(this.display=`ref:${this.type}:${o}`);if(!this.separator)return void(this.display=`ref:${o}`);if(!this.ancestor)return void(this.display=`ref:${this.separator}${o}`);if(this.ancestor==="root")return void(this.display=`ref:root:${o}`);if(this.ancestor===1)return void(this.display=`ref:${o||".."}`);const r=new Array(this.ancestor+1).fill(this.separator).join("");this.display=`ref:${r}${o||""}`}},l.Ref.prototype[h.symbols.ref]=!0,j.build=function(o){return(o=Object.assign({},l.defaults,o)).type==="value"&&o.ancestor===void 0&&(o.ancestor=1),new l.Ref(o)},l.context=function(o,r,s={}){if(o=o.trim(),s){const c=s.global===void 0?"$":s.global;if(c!==r&&o.startsWith(c))return{key:o.slice(c.length),type:"global"};const n=s.local===void 0?"#":s.local;if(n!==r&&o.startsWith(n))return{key:o.slice(n.length),type:"local"};const a=s.root===void 0?"/":s.root;if(a!==r&&o.startsWith(a))return{key:o.slice(a.length),type:"value",root:!0}}return{key:o,type:"value"}},l.ancestor=function(o,r){if(!r)return[1,0];if(o[0]!==r)return[1,0];if(o[1]!==r)return[0,1];let s=2;for(;o[s]===r;)++s;return[s-1,s]},j.toSibling=0,j.toParent=1,j.Manager=class{constructor(){this.refs=[]}register(o,r){if(o)if(r=r===void 0?j.toParent:r,Array.isArray(o))for(const s of o)this.register(s,r);else if(h.isSchema(o))for(const s of o._refs.refs)s.ancestor-r>=0&&this.refs.push({ancestor:s.ancestor-r,root:s.root});else j.isRef(o)&&o.type==="value"&&o.ancestor-r>=0&&this.refs.push({ancestor:o.ancestor-r,root:o.root}),t=t||p(3328),t.isTemplate(o)&&this.register(o.refs(),r)}get length(){return this.refs.length}clone(){const o=new j.Manager;return o.refs=m(this.refs),o}reset(){this.refs=[]}roots(){return this.refs.filter(o=>!o.ancestor).map(o=>o.root)}}},3378:(_,j,p)=>{const i=p(5107),m={};m.wrap=i.string().min(1).max(2).allow(!1),j.preferences=i.object({allowUnknown:i.boolean(),abortEarly:i.boolean(),artifacts:i.boolean(),cache:i.boolean(),context:i.object(),convert:i.boolean(),dateFormat:i.valid("date","iso","string","time","utc"),debug:i.boolean(),errors:{escapeHtml:i.boolean(),label:i.valid("path","key",!1),language:[i.string(),i.object().ref()],render:i.boolean(),stack:i.boolean(),wrap:{label:m.wrap,array:m.wrap,string:m.wrap}},externals:i.boolean(),messages:i.object(),noDefaults:i.boolean(),nonEnumerables:i.boolean(),presence:i.valid("required","optional","forbidden"),skipFunctions:i.boolean(),stripUnknown:i.object({arrays:i.boolean(),objects:i.boolean()}).or("arrays","objects").allow(!0,!1),warnings:i.boolean()}).strict(),m.nameRx=/^[a-zA-Z0-9]\w*$/,m.rule=i.object({alias:i.array().items(i.string().pattern(m.nameRx)).single(),args:i.array().items(i.string(),i.object({name:i.string().pattern(m.nameRx).required(),ref:i.boolean(),assert:i.alternatives([i.function(),i.object().schema()]).conditional("ref",{is:!0,then:i.required()}),normalize:i.function(),message:i.string().when("assert",{is:i.function(),then:i.required()})})),convert:i.boolean(),manifest:i.boolean(),method:i.function().allow(!1),multi:i.boolean(),validate:i.function()}),j.extension=i.object({type:i.alternatives([i.string(),i.object().regex()]).required(),args:i.function(),cast:i.object().pattern(m.nameRx,i.object({from:i.function().maxArity(1).required(),to:i.function().minArity(1).maxArity(2).required()})),base:i.object().schema().when("type",{is:i.object().regex(),then:i.forbidden()}),coerce:[i.function().maxArity(3),i.object({method:i.function().maxArity(3).required(),from:i.array().items(i.string()).single()})],flags:i.object().pattern(m.nameRx,i.object({setter:i.string(),default:i.any()})),manifest:{build:i.function().arity(2)},messages:[i.object(),i.string()],modifiers:i.object().pattern(m.nameRx,i.function().minArity(1).maxArity(2)),overrides:i.object().pattern(m.nameRx,i.function()),prepare:i.function().maxArity(3),rebuild:i.function().arity(1),rules:i.object().pattern(m.nameRx,m.rule),terms:i.object().pattern(m.nameRx,i.object({init:i.array().allow(null).required(),manifest:i.object().pattern(/.+/,[i.valid("schema","single"),i.object({mapped:i.object({from:i.string().required(),to:i.string().required()}).required()})])})),validate:i.function().maxArity(3)}).strict(),j.extensions=i.array().items(i.object(),i.function().arity(1)).strict(),m.desc={buffer:i.object({buffer:i.string()}),func:i.object({function:i.function().required(),options:{literal:!0}}),override:i.object({override:!0}),ref:i.object({ref:i.object({type:i.valid("value","global","local"),path:i.array().required(),separator:i.string().length(1).allow(!1),ancestor:i.number().min(0).integer().allow("root"),map:i.array().items(i.array().length(2)).min(1),adjust:i.function(),iterables:i.boolean(),in:i.boolean(),render:i.boolean()}).required()}),regex:i.object({regex:i.string().min(3)}),special:i.object({special:i.valid("deep").required()}),template:i.object({template:i.string().required(),options:i.object()}),value:i.object({value:i.alternatives([i.object(),i.array()]).required()})},m.desc.entity=i.alternatives([i.array().items(i.link("...")),i.boolean(),i.function(),i.number(),i.string(),m.desc.buffer,m.desc.func,m.desc.ref,m.desc.regex,m.desc.special,m.desc.template,m.desc.value,i.link("/")]),m.desc.values=i.array().items(null,i.boolean(),i.function(),i.number().allow(1/0,-1/0),i.string().allow(""),i.symbol(),m.desc.buffer,m.desc.func,m.desc.override,m.desc.ref,m.desc.regex,m.desc.template,m.desc.value),m.desc.messages=i.object().pattern(/.+/,[i.string(),m.desc.template,i.object().pattern(/.+/,[i.string(),m.desc.template])]),j.description=i.object({type:i.string().required(),flags:i.object({cast:i.string(),default:i.any(),description:i.string(),empty:i.link("/"),failover:m.desc.entity,id:i.string(),label:i.string(),only:!0,presence:["optional","required","forbidden"],result:["raw","strip"],strip:i.boolean(),unit:i.string()}).unknown(),preferences:{allowUnknown:i.boolean(),abortEarly:i.boolean(),artifacts:i.boolean(),cache:i.boolean(),convert:i.boolean(),dateFormat:["date","iso","string","time","utc"],errors:{escapeHtml:i.boolean(),label:["path","key"],language:[i.string(),m.desc.ref],wrap:{label:m.wrap,array:m.wrap}},externals:i.boolean(),messages:m.desc.messages,noDefaults:i.boolean(),nonEnumerables:i.boolean(),presence:["required","optional","forbidden"],skipFunctions:i.boolean(),stripUnknown:i.object({arrays:i.boolean(),objects:i.boolean()}).or("arrays","objects").allow(!0,!1),warnings:i.boolean()},allow:m.desc.values,invalid:m.desc.values,rules:i.array().min(1).items({name:i.string().required(),args:i.object().min(1),keep:i.boolean(),message:[i.string(),m.desc.messages],warn:i.boolean()}),keys:i.object().pattern(/.*/,i.link("/")),link:m.desc.ref}).pattern(/^[a-z]\w*$/,i.any())},493:(_,j,p)=>{const i=p(8571),m=p(9621),f=p(8160),h={value:Symbol("value")};_.exports=h.State=class{constructor(t,l,o){this.path=t,this.ancestors=l,this.mainstay=o.mainstay,this.schemas=o.schemas,this.debug=null}localize(t,l=null,o=null){const r=new h.State(t,l,this);return o&&r.schemas&&(r.schemas=[h.schemas(o),...r.schemas]),r}nest(t,l){const o=new h.State(this.path,this.ancestors,this);return o.schemas=o.schemas&&[h.schemas(t),...o.schemas],o.debug=l,o}shadow(t,l){this.mainstay.shadow=this.mainstay.shadow||new h.Shadow,this.mainstay.shadow.set(this.path,t,l)}snapshot(){this.mainstay.shadow&&(this._snapshot=i(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()}},h.schemas=function(t){return f.isSchema(t)?{schema:t}:t},h.Shadow=class{constructor(){this._values=null}set(t,l,o){if(!t.length||o==="strip"&&typeof t[t.length-1]=="number")return;this._values=this._values||new Map;let r=this._values;for(let s=0;s<t.length;++s){const c=t[s];let n=r.get(c);n||(n=new Map,r.set(c,n)),r=n}r[h.value]=l}get(t){const l=this.node(t);if(l)return l[h.value]}node(t){if(this._values)return m(this._values,t,{iterables:!0})}override(t,l){if(!this._values)return;const o=t.slice(0,-1),r=t[t.length-1],s=m(this._values,o,{iterables:!0});l?s.set(r,l):s&&s.delete(r)}}},3328:(_,j,p)=>{const i=p(375),m=p(8571),f=p(5277),h=p(1447),t=p(8160),l=p(6354),o=p(6133),r={symbol:Symbol("template"),opens:new Array(1e3).join("\0"),closes:new Array(1e3).join(""),dateFormat:{date:Date.prototype.toDateString,iso:Date.prototype.toISOString,string:Date.prototype.toString,time:Date.prototype.toTimeString,utc:Date.prototype.toUTCString}};_.exports=r.Template=class{constructor(s,c){if(i(typeof s=="string","Template source must be a string"),i(!s.includes("\0")&&!s.includes(""),"Template source cannot contain reserved control characters"),this.source=s,this.rendered=s,this._template=null,c){const{functions:n,...a}=c;this._settings=Object.keys(a).length?m(a):void 0,this._functions=n,this._functions&&(i(Object.keys(this._functions).every(u=>typeof u=="string"),"Functions keys must be strings"),i(Object.values(this._functions).every(u=>typeof u=="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=r.encode(this.source),c=r.split(s);let n=!1;const a=[],u=c.shift();u&&a.push(u);for(const g of c){const y=g[0]!=="{",k=y?"}":"}}",w=g.indexOf(k);if(w===-1||g[1]==="{"){a.push(`{${r.decode(g)}`);continue}let d=g.slice(y?0:1,w);const x=d[0]===":";x&&(d=d.slice(1));const b=this._ref(r.decode(d),{raw:y,wrapped:x});a.push(b),typeof b!="string"&&(n=!0);const S=g.slice(w+k.length);S&&a.push(r.decode(S))}n?this._template=a:this.rendered=a.join("")}static date(s,c){return r.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 r.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,n,a){return this._template&&this._template.length===1?this._part(this._template[0],s,c,n,a,{}):this.render(s,c,n,a)}_part(s,...c){return s.ref?s.ref.resolve(...c):s.formula.evaluate(c)}render(s,c,n,a,u={}){if(!this.isDynamic())return this.rendered;const g=[];for(const y of this._template)if(typeof y=="string")g.push(y);else{const k=this._part(y,s,c,n,a,u),w=r.stringify(k,s,c,n,a,u);if(w!==void 0){const d=y.raw||(u.errors&&u.errors.escapeHtml)===!1?w:f(w);g.push(r.wrap(d,y.wrapped&&n.errors.wrap.label))}}return g.join("")}_ref(s,{raw:c,wrapped:n}){const a=[],u=y=>{const k=o.create(y,this._settings);return a.push(k),w=>{const d=k.resolve(...w);return d!==void 0?d:null}};try{const y=this._functions?{...r.functions,...this._functions}:r.functions;var g=new h.Parser(s,{reference:u,functions:y,constants:r.constants})}catch(y){throw y.message=`Invalid template variable "${s}" fails due to: ${y.message}`,y}if(g.single){if(g.single.type==="reference"){const y=a[0];return{ref:y,raw:c,refs:a,wrapped:n||y.type==="local"&&y.key==="label"}}return r.stringify(g.single.value)}return{formula:g,raw:c,refs:a}}toString(){return this.source}},r.Template.prototype[t.symbols.template]=!0,r.Template.prototype.isImmutable=!0,r.encode=function(s){return s.replace(/\\(\{+)/g,(c,n)=>r.opens.slice(0,n.length)).replace(/\\(\}+)/g,(c,n)=>r.closes.slice(0,n.length))},r.decode=function(s){return s.replace(/\u0000/g,"{").replace(/\u0001/g,"}")},r.split=function(s){const c=[];let n="";for(let a=0;a<s.length;++a){const u=s[a];if(u==="{"){let g="";for(;a+1<s.length&&s[a+1]==="{";)g+="{",++a;c.push(n),n=g}else n+=u}return c.push(n),c},r.wrap=function(s,c){return c?c.length===1?`${c}${s}${c}`:`${c[0]}${s}${c[1]}`:s},r.stringify=function(s,c,n,a,u,g={}){const y=typeof s,k=a&&a.errors&&a.errors.wrap||{};let w=!1;if(o.isRef(s)&&s.render&&(w=s.in,s=s.resolve(c,n,a,u,{in:s.in,...g})),s===null)return"null";if(y==="string")return r.wrap(s,g.arrayItems&&k.string);if(y==="number"||y==="function"||y==="symbol")return s.toString();if(y!=="object")return JSON.stringify(s);if(s instanceof Date)return r.Template.date(s,a);if(s instanceof Map){const x=[];for(const[b,S]of s.entries())x.push(`${b.toString()} -> ${S.toString()}`);s=x}if(!Array.isArray(s))return s.toString();const d=[];for(const x of s)d.push(r.stringify(x,c,n,a,u,{arrayItems:!0,...g}));return r.wrap(d.join(", "),!w&&k.array)},r.constants={true:!0,false:!1,null:null,second:1e3,minute:6e4,hour:36e5,day:864e5},r.functions={if:(s,c,n)=>s?c:n,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,n,a,u,g]=this,y=g.messages;if(!y)return"";const k=l.template(c,y[0],s,n,a)||l.template(c,y[1],s,n,a);return k?k.render(c,n,a,u,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:(_,j,p)=>{const i=p(375),m=p(1687),f=p(8068),h=p(8160),t=p(3292),l=p(6354),o=p(6133),r={};_.exports=f.extend({type:"alternatives",flags:{match:{default:"any"}},terms:{matches:{init:[],register:o.toSibling}},args:(s,...c)=>c.length===1&&Array.isArray(c[0])?s.try(...c[0]):s.try(...c),validate(s,c){const{schema:n,error:a,state:u,prefs:g}=c;if(n._flags.match){const k=[],w=[];for(let x=0;x<n.$_terms.matches.length;++x){const b=n.$_terms.matches[x],S=u.nest(b.schema,`match.${x}`);S.snapshot();const A=b.schema.$_validate(s,S,g);A.errors?(w.push(A.errors),S.restore()):(k.push(A.value),S.commit())}if(k.length===0)return{errors:a("alternatives.any",{details:w.map(x=>l.details(x,{override:!1}))})};if(n._flags.match==="one")return k.length===1?{value:k[0]}:{errors:a("alternatives.one")};if(k.length!==n.$_terms.matches.length)return{errors:a("alternatives.all",{details:w.map(x=>l.details(x,{override:!1}))})};const d=x=>x.$_terms.matches.some(b=>b.schema.type==="object"||b.schema.type==="alternatives"&&d(b.schema));return d(n)?{value:k.reduce((x,b)=>m(x,b,{mergeArrays:!1}))}:{value:k[k.length-1]}}const y=[];for(let k=0;k<n.$_terms.matches.length;++k){const w=n.$_terms.matches[k];if(w.schema){const b=u.nest(w.schema,`match.${k}`);b.snapshot();const S=w.schema.$_validate(s,b,g);if(!S.errors)return b.commit(),S;b.restore(),y.push({schema:w.schema,reports:S.errors});continue}const d=w.ref?w.ref.resolve(s,u,g):s,x=w.is?[w]:w.switch;for(let b=0;b<x.length;++b){const S=x[b],{is:A,then:P,otherwise:L}=S,D=`match.${k}${w.switch?"."+b:""}`;if(A.$_match(d,u.nest(A,`${D}.is`),g)){if(P)return P.$_validate(s,u.nest(P,`${D}.then`),g)}else if(L)return L.$_validate(s,u.nest(L,`${D}.otherwise`),g)}}return r.errors(y,c)},rules:{conditional:{method(s,c){i(!this._flags._endedSwitch,"Unreachable condition"),i(!this._flags.match,"Cannot combine match mode",this._flags.match,"with conditional rule"),i(c.break===void 0,"Cannot use break option with alternatives conditional");const n=this.clone(),a=t.when(n,s,c),u=a.is?[a]:a.switch;for(const g of u)if(g.then&&g.otherwise){n.$_setFlag("_endedSwitch",!0,{clone:!1});break}return n.$_terms.matches.push(a),n.$_mutateRebuild()}},match:{method(s){if(i(["any","one","all"].includes(s),"Invalid alternatives match mode",s),s!=="any")for(const c of this.$_terms.matches)i(c.schema,"Cannot combine match mode",s,"with conditional rules");return this.$_setFlag("match",s)}},try:{method(...s){i(s.length,"Missing alternative schemas"),h.verifyFlat(s,"try"),i(!this._flags._endedSwitch,"Unreachable condition");const c=this.clone();for(const n of s)c.$_terms.matches.push({schema:c.$_compile(n)});return c.$_mutateRebuild()}}},overrides:{label(s){return this.$_parent("label",s).$_modify({each:(c,n)=>n.path[0]!=="is"&&typeof c._flags.label!="string"?c.label(s):void 0,ref:!1})}},rebuild(s){s.$_modify({each:c=>{h.isSchema(c)&&c.type==="array"&&s.$_setFlag("_arrayItems",!0,{clone:!1})}})},manifest:{build(s,c){if(c.matches)for(const n of c.matches){const{schema:a,ref:u,is:g,not:y,then:k,otherwise:w}=n;s=a?s.try(a):u?s.conditional(u,{is:g,then:k,not:y,otherwise:w,switch:n.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}}"}}),r.errors=function(s,{error:c,state:n}){if(!s.length)return{errors:c("alternatives.any")};if(s.length===1)return{errors:s[0].reports};const a=new Set,u=[];for(const{reports:g,schema:y}of s){if(g.length>1)return r.unmatched(s,c);const k=g[0];if(k instanceof l.Report==0)return r.unmatched(s,c);if(k.state.path.length!==n.path.length){u.push({type:y.type,report:k});continue}if(k.code==="any.only"){for(const x of k.local.valids)a.add(x);continue}const[w,d]=k.code.split(".");d!=="base"?u.push({type:y.type,report:k}):k.code==="object.base"?a.add(k.local.type):a.add(w)}return u.length?u.length===1?{errors:u[0].report}:r.unmatched(s,c):{errors:c("alternatives.types",{types:[...a]})}},r.unmatched=function(s,c){const n=[];for(const a of s)n.push(...a.reports);return{errors:c("alternatives.match",l.details(n,{override:!1}))}}},8068:(_,j,p)=>{const i=p(375),m=p(7629),f=p(8160),h=p(6914);_.exports=m.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 i(typeof t=="function","Method must be a function"),i(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:o}){try{return o(t,l)}catch(r){return l.error("any.custom",{error:r})}},args:["method","description"],multi:!0},messages:{method(t){return this.prefs({messages:t})}},shared:{method(t){i(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 i(t&&typeof t=="string","Invalid warning code"),this.$_addRule({name:"warning",args:{code:t,local:l},warn:!0})},validate:(t,l,{code:o,local:r})=>l.error(o,r),args:["code","local"],multi:!0}},modifiers:{keep(t,l=!0){t.keep=l},message(t,l){t.message=h.compile(l)},warn(t,l=!0){t.warn=l}},manifest:{build(t,l){for(const o in l){const r=l[o];if(["examples","externals","metas","notes","tags"].includes(o))for(const s of r)t=t[o.slice(0,-1)](s);else if(o!=="alterations")if(o!=="whens"){if(o==="shared")for(const s of r)t=t.shared(s)}else for(const s of r){const{ref:c,is:n,not:a,then:u,otherwise:g,concat:y}=s;t=y?t.concat(y):c?t.when(c,{is:n,not:a,then:u,otherwise:g,switch:s.switch,break:s.break}):t.when(n,{then:u,otherwise:g,break:s.break})}else{const s={};for(const{target:c,adjuster:n}of r)s[c]=n;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:(_,j,p)=>{const i=p(375),m=p(9474),f=p(9621),h=p(8068),t=p(8160),l=p(3292),o={};_.exports=h.extend({type:"array",flags:{single:{default:!1},sparse:{default:!1}},terms:{items:{init:[],manifest:"schema"},ordered:{init:[],manifest:"schema"},_exclusions:{init:[]},_inclusions:{init:[]},_requireds:{init:[]}},coerce:{from:"object",method(r,{schema:s,state:c,prefs:n}){if(!Array.isArray(r))return;const a=s.$_getRule("sort");return a?o.sort(s,r,a.args.options,c,n):void 0}},validate(r,{schema:s,error:c}){if(!Array.isArray(r)){if(s._flags.single){const n=[r];return n[t.symbols.arraySingle]=!0,{value:n}}return{errors:c("array.base")}}if(s.$_getRule("items")||s.$_terms.externals)return{value:r.slice()}},rules:{has:{method(r){r=this.$_compile(r,{appendPath:!0});const s=this.$_addRule({name:"has",args:{schema:r}});return s.$_mutateRegister(r),s},validate(r,{state:s,prefs:c,error:n},{schema:a}){const u=[r,...s.ancestors];for(let y=0;y<r.length;++y){const k=s.localize([...s.path,y],u,a);if(a.$_match(r[y],k,c))return r}const g=a._flags.label;return g?n("array.hasKnown",{patternLabel:g}):n("array.hasUnknown",null)},multi:!0},items:{method(...r){t.verifyFlat(r,"items");const s=this.$_addRule("items");for(let c=0;c<r.length;++c){const n=t.tryWithPath(()=>this.$_compile(r[c]),c,{append:!0});s.$_terms.items.push(n)}return s.$_mutateRebuild()},validate(r,{schema:s,error:c,state:n,prefs:a,errorsArray:u}){const g=s.$_terms._requireds.slice(),y=s.$_terms.ordered.slice(),k=[...s.$_terms._inclusions,...g],w=!r[t.symbols.arraySingle];delete r[t.symbols.arraySingle];const d=u();let x=r.length;for(let b=0;b<x;++b){const S=r[b];let A=!1,P=!1;const L=w?b:new Number(b),D=[...n.path,L];if(!s._flags.sparse&&S===void 0){if(d.push(c("array.sparse",{key:L,path:D,pos:b,value:void 0},n.localize(D))),a.abortEarly)return d;y.shift();continue}const N=[r,...n.ancestors];for(const B of s.$_terms._exclusions)if(B.$_match(S,n.localize(D,N,B),a,{presence:"ignore"})){if(d.push(c("array.excludes",{pos:b,value:S},n.localize(D))),a.abortEarly)return d;A=!0,y.shift();break}if(A)continue;if(s.$_terms.ordered.length){if(y.length){const B=y.shift(),F=B.$_validate(S,n.localize(D,N,B),a);if(F.errors){if(d.push(...F.errors),a.abortEarly)return d}else if(B._flags.result==="strip")o.fastSplice(r,b),--b,--x;else{if(!s._flags.sparse&&F.value===void 0){if(d.push(c("array.sparse",{key:L,path:D,pos:b,value:void 0},n.localize(D))),a.abortEarly)return d;continue}r[b]=F.value}continue}if(!s.$_terms.items.length){if(d.push(c("array.orderedLength",{pos:b,limit:s.$_terms.ordered.length})),a.abortEarly)return d;break}}const V=[];let z=g.length;for(let B=0;B<z;++B){const F=n.localize(D,N,g[B]);F.snapshot();const K=g[B].$_validate(S,F,a);if(V[B]=K,!K.errors){if(F.commit(),r[b]=K.value,P=!0,o.fastSplice(g,B),--B,--z,!s._flags.sparse&&K.value===void 0&&(d.push(c("array.sparse",{key:L,path:D,pos:b,value:void 0},n.localize(D))),a.abortEarly))return d;break}F.restore()}if(P)continue;const I=a.stripUnknown&&!!a.stripUnknown.arrays||!1;z=k.length;for(const B of k){let F;const K=g.indexOf(B);if(K!==-1)F=V[K];else{const he=n.localize(D,N,B);if(he.snapshot(),F=B.$_validate(S,he,a),!F.errors){he.commit(),B._flags.result==="strip"?(o.fastSplice(r,b),--b,--x):s._flags.sparse||F.value!==void 0?r[b]=F.value:(d.push(c("array.sparse",{key:L,path:D,pos:b,value:void 0},n.localize(D))),A=!0),P=!0;break}he.restore()}if(z===1){if(I){o.fastSplice(r,b),--b,--x,P=!0;break}if(d.push(...F.errors),a.abortEarly)return d;A=!0;break}}if(!A&&(s.$_terms._inclusions.length||s.$_terms._requireds.length)&&!P){if(I){o.fastSplice(r,b),--b,--x;continue}if(d.push(c("array.includes",{pos:b,value:S},n.localize(D))),a.abortEarly)return d}}return g.length&&o.fillMissedErrors(s,d,g,r,n,a),y.length&&(o.fillOrderedErrors(s,d,y,r,n,a),d.length||o.fillDefault(y,r,n,a)),d.length?d:r},priority:!0,manifest:!1},length:{method(r){return this.$_addRule({name:"length",args:{limit:r},operator:"="})},validate:(r,s,{limit:c},{name:n,operator:a,args:u})=>t.compare(r.length,c,a)?r:s.error("array."+n,{limit:u.limit,value:r}),args:[{name:"limit",ref:!0,assert:t.limit,message:"must be a positive integer"}]},max:{method(r){return this.$_addRule({name:"max",method:"length",args:{limit:r},operator:"<="})}},min:{method(r){return this.$_addRule({name:"min",method:"length",args:{limit:r},operator:">="})}},ordered:{method(...r){t.verifyFlat(r,"ordered");const s=this.$_addRule("items");for(let c=0;c<r.length;++c){const n=t.tryWithPath(()=>this.$_compile(r[c]),c,{append:!0});o.validateSingle(n,s),s.$_mutateRegister(n),s.$_terms.ordered.push(n)}return s.$_mutateRebuild()}},single:{method(r){const s=r===void 0||!!r;return i(!s||!this._flags._arrayItems,"Cannot specify single rule when array has array items"),this.$_setFlag("single",s)}},sort:{method(r={}){t.assertOptions(r,["by","order"]);const s={order:r.order||"ascending"};return r.by&&(s.by=l.ref(r.by,{ancestor:0}),i(!s.by.ancestor,"Cannot sort by ancestor")),this.$_addRule({name:"sort",args:{options:s}})},validate(r,{error:s,state:c,prefs:n,schema:a},{options:u}){const{value:g,errors:y}=o.sort(a,r,u,c,n);if(y)return y;for(let k=0;k<r.length;++k)if(r[k]!==g[k])return s("array.sort",{order:u.order,by:u.by?u.by.key:"value"});return r},convert:!0},sparse:{method(r){const s=r===void 0||!!r;return this._flags.sparse===s?this:(s?this.clone():this.$_addRule("items")).$_setFlag("sparse",s,{clone:!1})}},unique:{method(r,s={}){i(!r||typeof r=="function"||typeof r=="string","comparator must be a function or a string"),t.assertOptions(s,["ignoreUndefined","separator"]);const c={name:"unique",args:{options:s,comparator:r}};if(r)if(typeof r=="string"){const n=t.default(s.separator,".");c.path=n?r.split(n):[r]}else c.comparator=r;return this.$_addRule(c)},validate(r,{state:s,error:c,schema:n},{comparator:a,options:u},{comparator:g,path:y}){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||m,d=u.ignoreUndefined;for(let x=0;x<r.length;++x){const b=y?f(r[x],y):r[x],S=g?k.custom:k[typeof b];if(i(S,"Failed to find unique map container for type",typeof b),S instanceof Map){const A=S.entries();let P;for(;!(P=A.next()).done;)if(w(P.value[0],b)){const L=s.localize([...s.path,x],[r,...s.ancestors]),D={pos:x,value:r[x],dupePos:P.value[1],dupeValue:r[P.value[1]]};return y&&(D.path=a),c("array.unique",D,L)}S.set(b,x)}else{if((!d||b!==void 0)&&S[b]!==void 0){const A={pos:x,value:r[x],dupePos:S[b],dupeValue:r[S[b]]};return y&&(A.path=a),c("array.unique",A,s.localize([...s.path,x],[r,...s.ancestors]))}S[b]=x}}return r},args:["comparator","options"],multi:!0}},cast:{set:{from:Array.isArray,to:(r,s)=>new Set(r)}},rebuild(r){r.$_terms._inclusions=[],r.$_terms._exclusions=[],r.$_terms._requireds=[];for(const s of r.$_terms.items)o.validateSingle(s,r),s._flags.presence==="required"?r.$_terms._requireds.push(s):s._flags.presence==="forbidden"?r.$_terms._exclusions.push(s):r.$_terms._inclusions.push(s);for(const s of r.$_terms.ordered)o.validateSingle(s,r)},manifest:{build:(r,s)=>(s.items&&(r=r.items(...s.items)),s.ordered&&(r=r.ordered(...s.ordered)),r)},messages:{"array.base":"{{#label}} must be an array","array.excludes":"{{#label}} contains an excluded value","array.hasKnown":"{{#label}} does not contain at least one required match for type {:#patternLabel}","array.hasUnknown":"{{#label}} does not contain at least one required match","array.includes":"{{#label}} does not match any of the allowed types","array.includesRequiredBoth":"{{#label}} does not contain {{#knownMisses}} and {{#unknownMisses}} other required value(s)","array.includesRequiredKnowns":"{{#label}} does not contain {{#knownMisses}}","array.includesRequiredUnknowns":"{{#label}} does not contain {{#unknownMisses}} required value(s)","array.length":"{{#label}} must contain {{#limit}} items","array.max":"{{#label}} must contain less than or equal to {{#limit}} items","array.min":"{{#label}} must contain at least {{#limit}} items","array.orderedLength":"{{#label}} must contain at most {{#limit}} items","array.sort":"{{#label}} must be sorted in {#order} order by {{#by}}","array.sort.mismatching":"{{#label}} cannot be sorted due to mismatching types","array.sort.unsupported":"{{#label}} cannot be sorted due to unsupported type {#type}","array.sparse":"{{#label}} must not be a sparse array item","array.unique":"{{#label}} contains a duplicate value"}}),o.fillMissedErrors=function(r,s,c,n,a,u){const g=[];let y=0;for(const k of c){const w=k._flags.label;w?g.push(w):++y}g.length?y?s.push(r.$_createError("array.includesRequiredBoth",n,{knownMisses:g,unknownMisses:y},a,u)):s.push(r.$_createError("array.includesRequiredKnowns",n,{knownMisses:g},a,u)):s.push(r.$_createError("array.includesRequiredUnknowns",n,{unknownMisses:y},a,u))},o.fillOrderedErrors=function(r,s,c,n,a,u){const g=[];for(const y of c)y._flags.presence==="required"&&g.push(y);g.length&&o.fillMissedErrors(r,s,g,n,a,u)},o.fillDefault=function(r,s,c,n){const a=[];let u=!0;for(let g=r.length-1;g>=0;--g){const y=r[g],k=[s,...c.ancestors],w=y.$_validate(void 0,c.localize(c.path,k,y),n).value;if(u){if(w===void 0)continue;u=!1}a.unshift(w)}a.length&&s.push(...a)},o.fastSplice=function(r,s){let c=s;for(;c<r.length;)r[c++]=r[c];--r.length},o.validateSingle=function(r,s){(r.type==="array"||r._flags._arrayItems)&&(i(!s._flags.single,"Cannot specify array item with single rule enabled"),s.$_setFlag("_arrayItems",!0,{clone:!1}))},o.sort=function(r,s,c,n,a){const u=c.order==="ascending"?1:-1,g=-1*u,y=u,k=(w,d)=>{let x=o.compare(w,d,g,y);if(x!==null||(c.by&&(w=c.by.resolve(w,n,a),d=c.by.resolve(d,n,a)),x=o.compare(w,d,g,y),x!==null))return x;const b=typeof w;if(b!==typeof d)throw r.$_createError("array.sort.mismatching",s,null,n,a);if(b!=="number"&&b!=="string")throw r.$_createError("array.sort.unsupported",s,{type:b},n,a);return b==="number"?(w-d)*u:w<d?g:y};try{return{value:s.slice().sort(k)}}catch(w){return{errors:w}}},o.compare=function(r,s,c,n){return r===s?0:r===void 0?1:s===void 0?-1:r===null?n:s===null?c:null}},4937:(_,j,p)=>{const i=p(375),m=p(8068),f=p(8160),h=p(2036),t={isBool:function(l){return typeof l=="boolean"}};_.exports=m.extend({type:"boolean",flags:{sensitive:{default:!1}},terms:{falsy:{init:null,manifest:"values"},truthy:{init:null,manifest:"values"}},coerce(l,{schema:o}){if(typeof l!="boolean"){if(typeof l=="string"){const r=o._flags.sensitive?l:l.toLowerCase();l=r==="true"||r!=="false"&&l}return typeof l!="boolean"&&(l=o.$_terms.truthy&&o.$_terms.truthy.has(l,null,null,!o._flags.sensitive)||(!o.$_terms.falsy||!o.$_terms.falsy.has(l,null,null,!o._flags.sensitive))&&l),{value:l}}},validate(l,{error:o}){if(typeof l!="boolean")return{value:l,errors:o("boolean.base")}},rules:{truthy:{method(...l){f.verifyFlat(l,"truthy");const o=this.clone();o.$_terms.truthy=o.$_terms.truthy||new h;for(let r=0;r<l.length;++r){const s=l[r];i(s!==void 0,"Cannot call truthy with undefined"),o.$_terms.truthy.add(s)}return o}},falsy:{method(...l){f.verifyFlat(l,"falsy");const o=this.clone();o.$_terms.falsy=o.$_terms.falsy||new h;for(let r=0;r<l.length;++r){const s=l[r];i(s!==void 0,"Cannot call falsy with undefined"),o.$_terms.falsy.add(s)}return o}},sensitive:{method(l=!0){return this.$_setFlag("sensitive",l)}}},cast:{number:{from:t.isBool,to:(l,o)=>l?1:0},string:{from:t.isBool,to:(l,o)=>l?"true":"false"}},manifest:{build:(l,o)=>(o.truthy&&(l=l.truthy(...o.truthy)),o.falsy&&(l=l.falsy(...o.falsy)),l)},messages:{"boolean.base":"{{#label}} must be a boolean"}})},7500:(_,j,p)=>{const i=p(375),m=p(8068),f=p(8160),h=p(3328),t={isDate:function(l){return l instanceof Date}};_.exports=m.extend({type:"date",coerce:{from:["number","string"],method:(l,{schema:o})=>({value:t.parse(l,o._flags.format)||l})},validate(l,{schema:o,error:r,prefs:s}){if(l instanceof Date&&!isNaN(l.getTime()))return;const c=o._flags.format;return s.convert&&c&&typeof l=="string"?{value:l,errors:r("date.format",{format:c})}:{value:l,errors:r("date.base")}},rules:{compare:{method:!1,validate(l,o,{date:r},{name:s,operator:c,args:n}){const a=r==="now"?Date.now():r.getTime();return f.compare(l.getTime(),a,c)?l:o.error("date."+s,{limit:n.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 i(["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 i(["javascript","unix"].includes(l),'"type" must be one of "javascript, unix"'),this.format(l)}}},cast:{number:{from:t.isDate,to:(l,o)=>l.getTime()},string:{from:t.isDate,to:(l,{prefs:o})=>h.date(l,o)}},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,o){if(l instanceof Date)return l;if(typeof l!="string"&&(isNaN(l)||!isFinite(l))||/^\s*$/.test(l))return null;if(o==="iso")return f.isIsoDate(l)?t.date(l.toString()):null;const r=l;if(typeof l=="string"&&/^[+-]?\d+(\.\d+)?$/.test(l)&&(l=parseFloat(l)),o){if(o==="javascript")return t.date(1*l);if(o==="unix")return t.date(1e3*l);if(typeof r=="string")return null}return t.date(l)},t.date=function(l){const o=new Date(l);return isNaN(o.getTime())?null:o}},390:(_,j,p)=>{const i=p(375),m=p(7824);_.exports=m.extend({type:"function",properties:{typeof:"function"},rules:{arity:{method(f){return i(Number.isSafeInteger(f)&&f>=0,"n must be a positive integer"),this.$_addRule({name:"arity",args:{n:f}})},validate:(f,h,{n:t})=>f.length===t?f:h.error("function.arity",{n:t})},class:{method(){return this.$_addRule("class")},validate:(f,h)=>/^\s*class\s/.test(f.toString())?f:h.error("function.class",{value:f})},minArity:{method(f){return i(Number.isSafeInteger(f)&&f>0,"n must be a strict positive integer"),this.$_addRule({name:"minArity",args:{n:f}})},validate:(f,h,{n:t})=>f.length>=t?f:h.error("function.minArity",{n:t})},maxArity:{method(f){return i(Number.isSafeInteger(f)&&f>=0,"n must be a positive integer"),this.$_addRule({name:"maxArity",args:{n:f}})},validate:(f,h,{n:t})=>f.length<=t?f:h.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:(_,j,p)=>{const i=p(978),m=p(375),f=p(8571),h=p(3652),t=p(8068),l=p(8160),o=p(3292),r=p(6354),s=p(6133),c=p(3328),n={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:(a,u)=>a.keys(u),validate(a,{schema:u,error:g,state:y,prefs:k}){if(!a||typeof a!==u.$_property("typeof")||Array.isArray(a))return{value:a,errors:g("object.base",{type:u.$_property("typeof")})};if(!(u.$_terms.renames||u.$_terms.dependencies||u.$_terms.keys||u.$_terms.patterns||u.$_terms.externals))return;a=n.clone(a,k);const w=[];if(u.$_terms.renames&&!n.rename(u,a,y,k,w))return{value:a,errors:w};if(!u.$_terms.keys&&!u.$_terms.patterns&&!u.$_terms.dependencies)return{value:a,errors:w};const d=new Set(Object.keys(a));if(u.$_terms.keys){const x=[a,...y.ancestors];for(const b of u.$_terms.keys){const S=b.key,A=a[S];d.delete(S);const P=y.localize([...y.path,S],x,b),L=b.schema.$_validate(A,P,k);if(L.errors){if(k.abortEarly)return{value:a,errors:L.errors};L.value!==void 0&&(a[S]=L.value),w.push(...L.errors)}else b.schema._flags.result==="strip"||L.value===void 0&&A!==void 0?delete a[S]:L.value!==void 0&&(a[S]=L.value)}}if(d.size||u._flags._hasPatternMatch){const x=n.unknown(u,a,d,w,y,k);if(x)return x}if(u.$_terms.dependencies)for(const x of u.$_terms.dependencies){if(x.key!==null&&n.isPresent(x.options)(x.key.resolve(a,y,k,null,{shadow:!1}))===!1)continue;const b=n.dependencies[x.rel](u,x,a,y,k);if(b){const S=u.$_createError(b.code,a,b.context,y,k);if(k.abortEarly)return{value:a,errors:S};w.push(S)}}return{value:a,errors:w}},rules:{and:{method(...a){return l.verifyFlat(a,"and"),n.dependency(this,"and",null,a)}},append:{method(a){return a==null||Object.keys(a).length===0?this:this.keys(a)}},assert:{method(a,u,g){c.isTemplate(a)||(a=o.ref(a)),m(g===void 0||typeof g=="string","Message must be a string"),u=this.$_compile(u,{appendPath:!0});const y=this.$_addRule({name:"assert",args:{subject:a,schema:u,message:g}});return y.$_mutateRegister(a),y.$_mutateRegister(u),y},validate(a,{error:u,prefs:g,state:y},{subject:k,schema:w,message:d}){const x=k.resolve(a,y,g),b=s.isRef(k)?k.absolute(y):[];return w.$_match(x,y.localize(b,[a,...y.ancestors],w),g)?a:u("object.assert",{subject:k,message:d})},args:["subject","schema","message"],multi:!0},instance:{method(a,u){return m(typeof a=="function","constructor must be a function"),u=u||a.name,this.$_addRule({name:"instance",args:{constructor:a,name:u}})},validate:(a,u,{constructor:g,name:y})=>a instanceof g?a:u.error("object.instance",{type:y,value:a}),args:["constructor","name"]},keys:{method(a){m(a===void 0||typeof a=="object","Object schema must be a valid object"),m(!l.isSchema(a),"Object schema cannot be a joi schema");const u=this.clone();if(a)if(Object.keys(a).length){u.$_terms.keys=u.$_terms.keys?u.$_terms.keys.filter(g=>!a.hasOwnProperty(g.key)):new n.Keys;for(const g in a)l.tryWithPath(()=>u.$_terms.keys.push({key:g,schema:this.$_compile(a[g])}),g)}else u.$_terms.keys=new n.Keys;else u.$_terms.keys=null;return u.$_mutateRebuild()}},length:{method(a){return this.$_addRule({name:"length",args:{limit:a},operator:"="})},validate:(a,u,{limit:g},{name:y,operator:k,args:w})=>l.compare(Object.keys(a).length,g,k)?a:u.error("object."+y,{limit:w.limit,value:a}),args:[{name:"limit",ref:!0,assert:l.limit,message:"must be a positive integer"}]},max:{method(a){return this.$_addRule({name:"max",method:"length",args:{limit:a},operator:"<="})}},min:{method(a){return this.$_addRule({name:"min",method:"length",args:{limit:a},operator:">="})}},nand:{method(...a){return l.verifyFlat(a,"nand"),n.dependency(this,"nand",null,a)}},or:{method(...a){return l.verifyFlat(a,"or"),n.dependency(this,"or",null,a)}},oxor:{method(...a){return n.dependency(this,"oxor",null,a)}},pattern:{method(a,u,g={}){const y=a instanceof RegExp;y||(a=this.$_compile(a,{appendPath:!0})),m(u!==void 0,"Invalid rule"),l.assertOptions(g,["fallthrough","matches"]),y&&m(!a.flags.includes("g")&&!a.flags.includes("y"),"pattern should not use global or sticky mode"),u=this.$_compile(u,{appendPath:!0});const k=this.clone();k.$_terms.patterns=k.$_terms.patterns||[];const w={[y?"regex":"schema"]:a,rule:u};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(u),k}},ref:{method(){return this.$_addRule("ref")},validate:(a,u)=>s.isRef(a)?a:u.error("object.refType",{value:a})},regex:{method(){return this.$_addRule("regex")},validate:(a,u)=>a instanceof RegExp?a:u.error("object.regex",{value:a})},rename:{method(a,u,g={}){m(typeof a=="string"||a instanceof RegExp,"Rename missing the from argument"),m(typeof u=="string"||u instanceof c,"Invalid rename to argument"),m(u!==a,"Cannot rename key to same name:",a),l.assertOptions(g,["alias","ignoreUndefined","override","multiple"]);const y=this.clone();y.$_terms.renames=y.$_terms.renames||[];for(const k of y.$_terms.renames)m(k.from!==a,"Cannot rename the same key multiple times");return u instanceof c&&y.$_mutateRegister(u),y.$_terms.renames.push({from:a,to:u,options:i(n.renameDefaults,g)}),y}},schema:{method(a="any"){return this.$_addRule({name:"schema",args:{type:a}})},validate:(a,u,{type:g})=>!l.isSchema(a)||g!=="any"&&a.type!==g?u.error("object.schema",{type:g}):a},unknown:{method(a){return this.$_setFlag("unknown",a!==!1)}},with:{method(a,u,g={}){return n.dependency(this,"with",a,u,g)}},without:{method(a,u,g={}){return n.dependency(this,"without",a,u,g)}},xor:{method(...a){return l.verifyFlat(a,"xor"),n.dependency(this,"xor",null,a)}}},overrides:{default(a,u){return a===void 0&&(a=l.symbols.deepDefault),this.$_parent("default",a,u)}},rebuild(a){if(a.$_terms.keys){const u=new h.Sorter;for(const g of a.$_terms.keys)l.tryWithPath(()=>u.add(g,{after:g.schema.$_rootReferences(),group:g.key}),g.key);a.$_terms.keys=new n.Keys(...u.nodes)}},manifest:{build(a,u){if(u.keys&&(a=a.keys(u.keys)),u.dependencies)for(const{rel:g,key:y=null,peers:k,options:w}of u.dependencies)a=n.dependency(a,g,y,k,w);if(u.patterns)for(const{regex:g,schema:y,rule:k,fallthrough:w,matches:d}of u.patterns)a=a.pattern(g||y,k,{fallthrough:w,matches:d});if(u.renames)for(const{from:g,to:y,options:k}of u.renames)a=a.rename(g,y,k);return a}},messages:{"object.and":"{{#label}} contains {{#presentWithLabels}} without its required peers {{#missingWithLabels}}","object.assert":'{{#label}} is invalid because {if(#subject.key, `"` + #subject.key + `" failed to ` + (#message || "pass the assertion test"), #message || "the assertion failed")}',"object.base":"{{#label}} must be of type {{#type}}","object.instance":"{{#label}} must be an instance of {{:#type}}","object.length":'{{#label}} must have {{#limit}} key{if(#limit == 1, "", "s")}',"object.max":'{{#label}} must have less than or equal to {{#limit}} key{if(#limit == 1, "", "s")}',"object.min":'{{#label}} must have at least {{#limit}} key{if(#limit == 1, "", "s")}',"object.missing":"{{#label}} must contain at least one of {{#peersWithLabels}}","object.nand":"{{:#mainWithLabel}} must not exist simultaneously with {{#peersWithLabels}}","object.oxor":"{{#label}} contains a conflict between optional exclusive peers {{#peersWithLabels}}","object.pattern.match":"{{#label}} keys failed to match pattern requirements","object.refType":"{{#label}} must be a Joi reference","object.regex":"{{#label}} must be a RegExp object","object.rename.multiple":"{{#label}} cannot rename {{:#from}} because multiple renames are disabled and another key was already renamed to {{:#to}}","object.rename.override":"{{#label}} cannot rename {{:#from}} because override is disabled and target {{:#to}} exists","object.schema":"{{#label}} must be a Joi schema of {{#type}} type","object.unknown":"{{#label}} is not allowed","object.with":"{{:#mainWithLabel}} missing required peer {{:#peerWithLabel}}","object.without":"{{:#mainWithLabel}} conflict with forbidden peer {{:#peerWithLabel}}","object.xor":"{{#label}} contains a conflict between exclusive peers {{#peersWithLabels}}"}}),n.clone=function(a,u){if(typeof a=="object"){if(u.nonEnumerables)return f(a,{shallow:!0});const y=Object.create(Object.getPrototypeOf(a));return Object.assign(y,a),y}const g=function(...y){return a.apply(this,y)};return g.prototype=f(a.prototype),Object.defineProperty(g,"name",{value:a.name,writable:!1}),Object.defineProperty(g,"length",{value:a.length,writable:!1}),Object.assign(g,a),g},n.dependency=function(a,u,g,y,k){m(g===null||typeof g=="string",u,"key must be a strings"),k||(k=y.length>1&&typeof y[y.length-1]=="object"?y.pop():{}),l.assertOptions(k,["separator","isPresent"]),y=[].concat(y);const w=l.default(k.separator,"."),d=[];for(const b of y)m(typeof b=="string",u,"peers must be strings"),d.push(o.ref(b,{separator:w,ancestor:0,prefix:!1}));g!==null&&(g=o.ref(g,{separator:w,ancestor:0,prefix:!1}));const x=a.clone();return x.$_terms.dependencies=x.$_terms.dependencies||[],x.$_terms.dependencies.push(new n.Dependency(u,g,d,y,k)),x},n.dependencies={and(a,u,g,y,k){const w=[],d=[],x=u.peers.length,b=n.isPresent(u.options);for(const S of u.peers)b(S.resolve(g,y,k,null,{shadow:!1}))===!1?w.push(S.key):d.push(S.key);if(w.length!==x&&d.length!==x)return{code:"object.and",context:{present:d,presentWithLabels:n.keysToLabels(a,d),missing:w,missingWithLabels:n.keysToLabels(a,w)}}},nand(a,u,g,y,k){const w=[],d=n.isPresent(u.options);for(const S of u.peers)d(S.resolve(g,y,k,null,{shadow:!1}))&&w.push(S.key);if(w.length!==u.peers.length)return;const x=u.paths[0],b=u.paths.slice(1);return{code:"object.nand",context:{main:x,mainWithLabel:n.keysToLabels(a,x),peers:b,peersWithLabels:n.keysToLabels(a,b)}}},or(a,u,g,y,k){const w=n.isPresent(u.options);for(const d of u.peers)if(w(d.resolve(g,y,k,null,{shadow:!1})))return;return{code:"object.missing",context:{peers:u.paths,peersWithLabels:n.keysToLabels(a,u.paths)}}},oxor(a,u,g,y,k){const w=[],d=n.isPresent(u.options);for(const b of u.peers)d(b.resolve(g,y,k,null,{shadow:!1}))&&w.push(b.key);if(!w.length||w.length===1)return;const x={peers:u.paths,peersWithLabels:n.keysToLabels(a,u.paths)};return x.present=w,x.presentWithLabels=n.keysToLabels(a,w),{code:"object.oxor",context:x}},with(a,u,g,y,k){const w=n.isPresent(u.options);for(const d of u.peers)if(w(d.resolve(g,y,k,null,{shadow:!1}))===!1)return{code:"object.with",context:{main:u.key.key,mainWithLabel:n.keysToLabels(a,u.key.key),peer:d.key,peerWithLabel:n.keysToLabels(a,d.key)}}},without(a,u,g,y,k){const w=n.isPresent(u.options);for(const d of u.peers)if(w(d.resolve(g,y,k,null,{shadow:!1})))return{code:"object.without",context:{main:u.key.key,mainWithLabel:n.keysToLabels(a,u.key.key),peer:d.key,peerWithLabel:n.keysToLabels(a,d.key)}}},xor(a,u,g,y,k){const w=[],d=n.isPresent(u.options);for(const b of u.peers)d(b.resolve(g,y,k,null,{shadow:!1}))&&w.push(b.key);if(w.length===1)return;const x={peers:u.paths,peersWithLabels:n.keysToLabels(a,u.paths)};return w.length===0?{code:"object.missing",context:x}:(x.present=w,x.presentWithLabels=n.keysToLabels(a,w),{code:"object.xor",context:x})}},n.keysToLabels=function(a,u){return Array.isArray(u)?u.map(g=>a.$_mapLabels(g)):a.$_mapLabels(u)},n.isPresent=function(a){return typeof a.isPresent=="function"?a.isPresent:u=>u!==void 0},n.rename=function(a,u,g,y,k){const w={};for(const d of a.$_terms.renames){const x=[],b=typeof d.from!="string";if(b)for(const S in u){if(u[S]===void 0&&d.options.ignoreUndefined||S===d.to)continue;const A=d.from.exec(S);A&&x.push({from:S,to:d.to,match:A})}else!Object.prototype.hasOwnProperty.call(u,d.from)||u[d.from]===void 0&&d.options.ignoreUndefined||x.push(d);for(const S of x){const A=S.from;let P=S.to;if(P instanceof c&&(P=P.render(u,g,y,S.match)),A!==P){if(!d.options.multiple&&w[P]&&(k.push(a.$_createError("object.rename.multiple",u,{from:A,to:P,pattern:b},g,y)),y.abortEarly)||Object.prototype.hasOwnProperty.call(u,P)&&!d.options.override&&!w[P]&&(k.push(a.$_createError("object.rename.override",u,{from:A,to:P,pattern:b},g,y)),y.abortEarly))return!1;u[A]===void 0?delete u[P]:u[P]=u[A],w[P]=!0,d.options.alias||delete u[A]}}}return!0},n.unknown=function(a,u,g,y,k,w){if(a.$_terms.patterns){let d=!1;const x=a.$_terms.patterns.map(S=>{if(S.matches)return d=!0,[]}),b=[u,...k.ancestors];for(const S of g){const A=u[S],P=[...k.path,S];for(let L=0;L<a.$_terms.patterns.length;++L){const D=a.$_terms.patterns[L];if(D.regex){const z=D.regex.test(S);if(k.mainstay.tracer.debug(k,"rule",`pattern.${L}`,z?"pass":"error"),!z)continue}else if(!D.schema.$_match(S,k.nest(D.schema,`pattern.${L}`),w))continue;g.delete(S);const N=k.localize(P,b,{schema:D.rule,key:S}),V=D.rule.$_validate(A,N,w);if(V.errors){if(w.abortEarly)return{value:u,errors:V.errors};y.push(...V.errors)}if(D.matches&&x[L].push(S),u[S]=V.value,!D.fallthrough)break}}if(d)for(let S=0;S<x.length;++S){const A=x[S];if(!A)continue;const P=a.$_terms.patterns[S].matches,L=k.localize(k.path,b,P),D=P.$_validate(A,L,w);if(D.errors){const N=r.details(D.errors,{override:!1});N.matches=A;const V=a.$_createError("object.pattern.match",u,N,k,w);if(w.abortEarly)return{value:u,errors:V};y.push(V)}}}if(g.size&&(a.$_terms.keys||a.$_terms.patterns)){if(w.stripUnknown&&a._flags.unknown===void 0||w.skipFunctions){const d=!(!w.stripUnknown||w.stripUnknown!==!0&&!w.stripUnknown.objects);for(const x of g)d?(delete u[x],g.delete(x)):typeof u[x]=="function"&&g.delete(x)}if(!l.default(a._flags.unknown,w.allowUnknown))for(const d of g){const x=k.localize([...k.path,d],[]),b=a.$_createError("object.unknown",u[d],{child:d},x,w,{flags:!1});if(w.abortEarly)return{value:u,errors:b};y.push(b)}}},n.Dependency=class{constructor(a,u,g,y,k){this.rel=a,this.key=u,this.peers=g,this.paths=y,this.options=k}describe(){const a={rel:this.rel,peers:this.paths};return this.key!==null&&(a.key=this.key.key),this.peers[0].separator!=="."&&(a.options={...a.options,separator:this.peers[0].separator}),this.options.isPresent&&(a.options={...a.options,isPresent:this.options.isPresent}),a}},n.Keys=class extends Array{concat(a){const u=this.slice(),g=new Map;for(let y=0;y<u.length;++y)g.set(u[y].key,y);for(const y of a){const k=y.key,w=g.get(k);w!==void 0?u[w]={key:k,schema:u[w].schema.concat(y.schema)}:u.push(y)}return u}}},8785:(_,j,p)=>{const i=p(375),m=p(8068),f=p(8160),h=p(3292),t=p(6354),l={};_.exports=m.extend({type:"link",properties:{schemaChain:!0},terms:{link:{init:null,manifest:"single",register:!1}},args:(o,r)=>o.ref(r),validate(o,{schema:r,state:s,prefs:c}){i(r.$_terms.link,"Uninitialized link schema");const n=l.generate(r,o,s,c),a=r.$_terms.link[0].ref;return n.$_validate(o,s.nest(n,`link:${a.display}:${n.type}`),c)},generate:(o,r,s,c)=>l.generate(o,r,s,c),rules:{ref:{method(o){i(!this.$_terms.link,"Cannot reinitialize schema"),o=h.ref(o),i(o.type==="value"||o.type==="local","Invalid reference type:",o.type),i(o.type==="local"||o.ancestor==="root"||o.ancestor>0,"Link cannot reference itself");const r=this.clone();return r.$_terms.link=[{ref:o}],r}},relative:{method(o=!0){return this.$_setFlag("relative",o)}}},overrides:{concat(o){i(this.$_terms.link,"Uninitialized link schema"),i(f.isSchema(o),"Invalid schema object"),i(o.type!=="link","Cannot merge type link with another link");const r=this.clone();return r.$_terms.whens||(r.$_terms.whens=[]),r.$_terms.whens.push({concat:o}),r.$_mutateRebuild()}},manifest:{build:(o,r)=>(i(r.link,"Invalid link description missing link"),o.ref(r.link))}}),l.generate=function(o,r,s,c){let n=s.mainstay.links.get(o);if(n)return n._generate(r,s,c).schema;const a=o.$_terms.link[0].ref,{perspective:u,path:g}=l.perspective(a,s);l.assert(u,"which is outside of schema boundaries",a,o,s,c);try{n=g.length?u.$_reach(g):u}catch{l.assert(!1,"to non-existing schema",a,o,s,c)}return l.assert(n.type!=="link","which is another link",a,o,s,c),o._flags.relative||s.mainstay.links.set(o,n),n._generate(r,s,c).schema},l.perspective=function(o,r){if(o.type==="local"){for(const{schema:s,key:c}of r.schemas){if((s._flags.id||c)===o.path[0])return{perspective:s,path:o.path.slice(1)};if(s.$_terms.shared){for(const n of s.$_terms.shared)if(n._flags.id===o.path[0])return{perspective:n,path:o.path.slice(1)}}}return{perspective:null,path:null}}return o.ancestor==="root"?{perspective:r.schemas[r.schemas.length-1].schema,path:o.path}:{perspective:r.schemas[o.ancestor]&&r.schemas[o.ancestor].schema,path:o.path}},l.assert=function(o,r,s,c,n,a){o||i(!1,`"${t.label(c._flags,n,a)}" contains link reference "${s.display}" ${r}`)}},3832:(_,j,p)=>{const i=p(375),m=p(8068),f=p(8160),h={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(),o=l.indexOf("."),r=l.indexOf("e");return(o<0?0:(r<0?l.length:r)-o-1)+(r<0?0:Math.max(0,-parseInt(l.slice(r+1))))}};_.exports=m.extend({type:"number",flags:{unsafe:{default:!1}},coerce:{from:"string",method(t,{schema:l,error:o}){if(!t.match(h.numberRx))return;t=t.trim();const r={value:parseFloat(t)};if(r.value===0&&(r.value=0),!l._flags.unsafe)if(t.match(/e/i)){if(h.extractSignificantDigits(t)!==h.extractSignificantDigits(String(r.value)))return r.errors=o("number.unsafe"),r}else{const s=r.value.toString();if(s.match(/e/i))return r;if(s!==h.normalizeDecimal(t))return r.errors=o("number.unsafe"),r}return r}},validate(t,{schema:l,error:o,prefs:r}){if(t===1/0||t===-1/0)return{value:t,errors:o("number.infinity")};if(!f.isNumber(t))return{value:t,errors:o("number.base")};const s={value:t};if(r.convert){const c=l.$_getRule("precision");if(c){const n=Math.pow(10,c.args.limit);s.value=Math.round(s.value*n)/n}}return s.value===0&&(s.value=0),!l._flags.unsafe&&(t>Number.MAX_SAFE_INTEGER||t<Number.MIN_SAFE_INTEGER)&&(s.errors=o("number.unsafe")),s},rules:{compare:{method:!1,validate:(t,l,{limit:o},{name:r,operator:s,args:c})=>f.compare(t,o,s)?t:l.error("number."+r,{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"?h.decimalPlaces(t):null,o=Math.pow(10,l);return this.$_addRule({name:"multiple",args:{base:t,baseDecimalPlace:l,pfactor:o}})},validate:(t,l,{base:o,baseDecimalPlace:r,pfactor:s},c)=>h.decimalPlaces(t)>r?l.error("number.multiple",{multiple:c.args.base,value:t}):Math.round(s*t)%Math.round(s*o)==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 i(Number.isSafeInteger(t),"limit must be an integer"),this.$_addRule({name:"precision",args:{limit:t}})},validate(t,l,{limit:o}){const r=t.toString().match(h.precisionRx);return Math.max((r[1]?r[1].length:0)-(r[2]?parseInt(r[2],10):0),0)<=o?t:l.error("number.precision",{limit:o,value:t})},convert:!0},sign:{method(t){return i(["negative","positive"].includes(t),"Invalid sign",t),this.$_addRule({name:"sign",args:{sign:t}})},validate:(t,l,{sign:o})=>o==="negative"&&t<0||o==="positive"&&t>0?t:l.error(`number.${o}`)},unsafe:{method(t=!0){return i(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"}}),h.extractSignificantDigits=function(t){return t.replace(h.exponentialPartRegex,"").replace(h.dotRegex,"").replace(h.trailingZerosRegex,"").replace(h.leadingSignAndZerosRegex,"")},h.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:(_,j,p)=>{const i=p(7824);_.exports=i.extend({type:"object",cast:{map:{from:m=>m&&typeof m=="object",to:(m,f)=>new Map(Object.entries(m))}}})},7417:(_,j,p)=>{const i=p(375),m=p(5380),f=p(1745),h=p(9959),t=p(6064),l=p(9926),o=p(5752),r=p(8068),s=p(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:h.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=r.extend({type:"string",flags:{insensitive:{default:!1},truncate:{default:!1}},terms:{replacements:{init:null}},coerce:{from:"string",method(n,{schema:a,state:u,prefs:g}){const y=a.$_getRule("normalize");y&&(n=n.normalize(y.args.form));const k=a.$_getRule("case");k&&(n=k.args.direction==="upper"?n.toLocaleUpperCase():n.toLocaleLowerCase());const w=a.$_getRule("trim");if(w&&w.args.enabled&&(n=n.trim()),a.$_terms.replacements)for(const x of a.$_terms.replacements)n=n.replace(x.pattern,x.replacement);const d=a.$_getRule("hex");if(d&&d.args.options.byteAligned&&n.length%2!=0&&(n=`0${n}`),a.$_getRule("isoDate")){const x=c.isoDate(n);x&&(n=x)}if(a._flags.truncate){const x=a.$_getRule("max");if(x){let b=x.args.limit;if(s.isResolvable(b)&&(b=b.resolve(n,u,g),!s.limit(b)))return{value:n,errors:a.$_createError("any.ref",b,{ref:x.args.limit,arg:"limit",reason:"must be a positive integer"},u,g)};n=n.slice(0,b)}}return{value:n}}},validate(n,{schema:a,error:u}){if(typeof n!="string")return{value:n,errors:u("string.base")};if(n===""){const g=a.$_getRule("min");return g&&g.args.limit===0?void 0:{value:n,errors:u("string.empty")}}},rules:{alphanum:{method(){return this.$_addRule("alphanum")},validate:(n,a)=>/^[a-zA-Z0-9]+$/.test(n)?n:a.error("string.alphanum")},base64:{method(n={}){return s.assertOptions(n,["paddingRequired","urlSafe"]),n={urlSafe:!1,paddingRequired:!0,...n},i(typeof n.paddingRequired=="boolean","paddingRequired must be boolean"),i(typeof n.urlSafe=="boolean","urlSafe must be boolean"),this.$_addRule({name:"base64",args:{options:n}})},validate:(n,a,{options:u})=>c.base64Regex[u.paddingRequired][u.urlSafe].test(n)?n:a.error("string.base64")},case:{method(n){return i(["lower","upper"].includes(n),"Invalid case:",n),this.$_addRule({name:"case",args:{direction:n}})},validate:(n,a,{direction:u})=>u==="lower"&&n===n.toLocaleLowerCase()||u==="upper"&&n===n.toLocaleUpperCase()?n:a.error(`string.${u}case`),convert:!0},creditCard:{method(){return this.$_addRule("creditCard")},validate(n,a){let u=n.length,g=0,y=1;for(;u--;){const k=n.charAt(u)*y;g+=k-9*(k>9),y^=3}return g>0&&g%10==0?n:a.error("string.creditCard")}},dataUri:{method(n={}){return s.assertOptions(n,["paddingRequired"]),n={paddingRequired:!0,...n},i(typeof n.paddingRequired=="boolean","paddingRequired must be boolean"),this.$_addRule({name:"dataUri",args:{options:n}})},validate(n,a,{options:u}){const g=n.match(c.dataUriRegex);return g&&(!g[2]||g[2]!=="base64"||c.base64Regex[u.paddingRequired].false.test(g[3]))?n:a.error("string.dataUri")}},domain:{method(n){n&&s.assertOptions(n,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"]);const a=c.addressOptions(n);return this.$_addRule({name:"domain",args:{options:n},address:a})},validate:(n,a,u,{address:g})=>m.isValid(n,g)?n:a.error("string.domain")},email:{method(n={}){s.assertOptions(n,["allowFullyQualified","allowUnicode","ignoreLength","maxDomainSegments","minDomainSegments","multiple","separator","tlds"]),i(n.multiple===void 0||typeof n.multiple=="boolean","multiple option must be an boolean");const a=c.addressOptions(n),u=new RegExp(`\\s*[${n.separator?t(n.separator):","}]\\s*`);return this.$_addRule({name:"email",args:{options:n},regex:u,address:a})},validate(n,a,{options:u},{regex:g,address:y}){const k=u.multiple?n.split(g):[n],w=[];for(const d of k)f.isValid(d,y)||w.push(d);return w.length?a.error("string.email",{value:n,invalids:w}):n}},guid:{alias:"uuid",method(n={}){s.assertOptions(n,["version","separator"]);let a="";if(n.version){const y=[].concat(n.version);i(y.length>=1,"version must have at least 1 valid version specified");const k=new Set;for(let w=0;w<y.length;++w){const d=y[w];i(typeof d=="string","version at position "+w+" must be a string");const x=c.guidVersions[d.toLowerCase()];i(x,"version at position "+w+" must be one of "+Object.keys(c.guidVersions).join(", ")),i(!k.has(x),"version at position "+w+" must not be a duplicate"),a+=x,k.add(x)}}i(c.guidSeparators.has(n.separator),'separator must be one of true, false, "-", or ":"');const u=n.separator===void 0?"[:-]?":n.separator===!0?"[:-]":n.separator===!1?"[]?":`\\${n.separator}`,g=new RegExp(`^([\\[{\\(]?)[0-9A-F]{8}(${u})[0-9A-F]{4}\\2?[${a||"0-9A-F"}][0-9A-F]{3}\\2?[${a?"89AB":"0-9A-F"}][0-9A-F]{3}\\2?[0-9A-F]{12}([\\]}\\)]?)$`,"i");return this.$_addRule({name:"guid",args:{options:n},regex:g})},validate(n,a,u,{regex:g}){const y=g.exec(n);return y?c.guidBrackets[y[1]]!==y[y.length-1]?a.error("string.guid"):n:a.error("string.guid")}},hex:{method(n={}){return s.assertOptions(n,["byteAligned","prefix"]),n={byteAligned:!1,prefix:!1,...n},i(typeof n.byteAligned=="boolean","byteAligned must be boolean"),i(typeof n.prefix=="boolean"||n.prefix==="optional",'prefix must be boolean or "optional"'),this.$_addRule({name:"hex",args:{options:n}})},validate:(n,a,{options:u})=>(u.prefix==="optional"?c.hexRegex.withOptionalPrefix:u.prefix===!0?c.hexRegex.withPrefix:c.hexRegex.withoutPrefix).test(n)?u.byteAligned&&n.length%2!=0?a.error("string.hexAlign"):n:a.error("string.hex")},hostname:{method(){return this.$_addRule("hostname")},validate:(n,a)=>m.isValid(n,{minDomainSegments:1})||c.ipRegex.test(n)?n:a.error("string.hostname")},insensitive:{method(){return this.$_setFlag("insensitive",!0)}},ip:{method(n={}){s.assertOptions(n,["cidr","version"]);const{cidr:a,versions:u,regex:g}=h.regex(n),y=n.version?u:void 0;return this.$_addRule({name:"ip",args:{options:{cidr:a,version:y}},regex:g})},validate:(n,a,{options:u},{regex:g})=>g.test(n)?n:u.version?a.error("string.ipVersion",{value:n,cidr:u.cidr,version:u.version}):a.error("string.ip",{value:n,cidr:u.cidr})},isoDate:{method(){return this.$_addRule("isoDate")},validate:(n,{error:a})=>c.isoDate(n)?n:a("string.isoDate")},isoDuration:{method(){return this.$_addRule("isoDuration")},validate:(n,a)=>c.isoDurationRegex.test(n)?n:a.error("string.isoDuration")},length:{method(n,a){return c.length(this,"length",n,"=",a)},validate(n,a,{limit:u,encoding:g},{name:y,operator:k,args:w}){const d=!g&&n.length;return s.compare(d,u,k)?n:a.error("string."+y,{limit:w.limit,value:n,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(n,a){return c.length(this,"max",n,"<=",a)},args:["limit","encoding"]},min:{method(n,a){return c.length(this,"min",n,">=",a)},args:["limit","encoding"]},normalize:{method(n="NFC"){return i(c.normalizationForms.includes(n),"normalization form must be one of "+c.normalizationForms.join(", ")),this.$_addRule({name:"normalize",args:{form:n}})},validate:(n,{error:a},{form:u})=>n===n.normalize(u)?n:a("string.normalize",{value:n,form:u}),convert:!0},pattern:{alias:"regex",method(n,a={}){i(n instanceof RegExp,"regex must be a RegExp"),i(!n.flags.includes("g")&&!n.flags.includes("y"),"regex should not use global or sticky mode"),typeof a=="string"&&(a={name:a}),s.assertOptions(a,["invert","name"]);const u=["string.pattern",a.invert?".invert":"",a.name?".name":".base"].join("");return this.$_addRule({name:"pattern",args:{regex:n,options:a},errorCode:u})},validate:(n,a,{regex:u,options:g},{errorCode:y})=>u.test(n)^g.invert?n:a.error(y,{name:g.name,regex:u,value:n}),args:["regex","options"],multi:!0},replace:{method(n,a){typeof n=="string"&&(n=new RegExp(t(n),"g")),i(n instanceof RegExp,"pattern must be a RegExp"),i(typeof a=="string","replacement must be a String");const u=this.clone();return u.$_terms.replacements||(u.$_terms.replacements=[]),u.$_terms.replacements.push({pattern:n,replacement:a}),u}},token:{method(){return this.$_addRule("token")},validate:(n,a)=>/^\w+$/.test(n)?n:a.error("string.token")},trim:{method(n=!0){return i(typeof n=="boolean","enabled must be a boolean"),this.$_addRule({name:"trim",args:{enabled:n}})},validate:(n,a,{enabled:u})=>u&&n!==n.trim()?a.error("string.trim"):n,convert:!0},truncate:{method(n=!0){return i(typeof n=="boolean","enabled must be a boolean"),this.$_setFlag("truncate",n)}},uppercase:{method(){return this.case("upper")}},uri:{method(n={}){s.assertOptions(n,["allowRelative","allowQuerySquareBrackets","domain","relativeOnly","scheme","encodeUri"]),n.domain&&s.assertOptions(n.domain,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"]);const{regex:a,scheme:u}=o.regex(n),g=n.domain?c.addressOptions(n.domain):null;return this.$_addRule({name:"uri",args:{options:n},regex:a,domain:g,scheme:u})},validate(n,a,{options:u},{regex:g,domain:y,scheme:k}){if(["http:/","https:/"].includes(n))return a.error("string.uri");let w=g.exec(n);if(!w&&a.prefs.convert&&u.encodeUri){const d=encodeURI(n);w=g.exec(d),w&&(n=d)}if(w){const d=w[1]||w[2];return!y||u.allowRelative&&!d||m.isValid(d,y)?n:a.error("string.domain",{value:d})}return u.relativeOnly?a.error("string.uriRelativeOnly"):u.scheme?a.error("string.uriCustomScheme",{scheme:k,value:n}):a.error("string.uri")}}},manifest:{build(n,a){if(a.replacements)for(const{pattern:u,replacement:g}of a.replacements)n=n.replace(u,g);return n}},messages:{"string.alphanum":"{{#label}} must only contain alpha-numeric characters","string.base":"{{#label}} must be a string","string.base64":"{{#label}} must be a valid base64 string","string.creditCard":"{{#label}} must be a credit card","string.dataUri":"{{#label}} must be a valid dataUri string","string.domain":"{{#label}} must contain a valid domain name","string.email":"{{#label}} must be a valid email","string.empty":"{{#label}} is not allowed to be empty","string.guid":"{{#label}} must be a valid GUID","string.hex":"{{#label}} must only contain hexadecimal characters","string.hexAlign":"{{#label}} hex decoded representation must be byte aligned","string.hostname":"{{#label}} must be a valid hostname","string.ip":"{{#label}} must be a valid ip address with a {{#cidr}} CIDR","string.ipVersion":"{{#label}} must be a valid ip address of one of the following versions {{#version}} with a {{#cidr}} CIDR","string.isoDate":"{{#label}} must be in iso format","string.isoDuration":"{{#label}} must be a valid ISO 8601 duration","string.length":"{{#label}} length must be {{#limit}} characters long","string.lowercase":"{{#label}} must only contain lowercase characters","string.max":"{{#label}} length must be less than or equal to {{#limit}} characters long","string.min":"{{#label}} length must be at least {{#limit}} characters long","string.normalize":"{{#label}} must be unicode normalized in the {{#form}} form","string.token":"{{#label}} must only contain alpha-numeric and underscore characters","string.pattern.base":"{{#label}} with value {:[.]} fails to match the required pattern: {{#regex}}","string.pattern.name":"{{#label}} with value {:[.]} fails to match the {{#name}} pattern","string.pattern.invert.base":"{{#label}} with value {:[.]} matches the inverted pattern: {{#regex}}","string.pattern.invert.name":"{{#label}} with value {:[.]} matches the inverted {{#name}} pattern","string.trim":"{{#label}} must not have leading or trailing whitespace","string.uri":"{{#label}} must be a valid uri","string.uriCustomScheme":"{{#label}} must be a valid uri with a scheme matching the {{#scheme}} pattern","string.uriRelativeOnly":"{{#label}} must be a valid relative uri","string.uppercase":"{{#label}} must only contain uppercase characters"}}),c.addressOptions=function(n){if(!n)return c.tlds||n;if(i(n.minDomainSegments===void 0||Number.isSafeInteger(n.minDomainSegments)&&n.minDomainSegments>0,"minDomainSegments must be a positive integer"),i(n.maxDomainSegments===void 0||Number.isSafeInteger(n.maxDomainSegments)&&n.maxDomainSegments>0,"maxDomainSegments must be a positive integer"),n.tlds===!1)return n;if(n.tlds===!0||n.tlds===void 0)return i(c.tlds,"Built-in TLD list disabled"),Object.assign({},n,c.tlds);i(typeof n.tlds=="object","tlds must be true, false, or an object");const a=n.tlds.deny;if(a)return Array.isArray(a)&&(n=Object.assign({},n,{tlds:{deny:new Set(a)}})),i(n.tlds.deny instanceof Set,"tlds.deny must be an array, Set, or boolean"),i(!n.tlds.allow,"Cannot specify both tlds.allow and tlds.deny lists"),c.validateTlds(n.tlds.deny,"tlds.deny"),n;const u=n.tlds.allow;return u?u===!0?(i(c.tlds,"Built-in TLD list disabled"),Object.assign({},n,c.tlds)):(Array.isArray(u)&&(n=Object.assign({},n,{tlds:{allow:new Set(u)}})),i(n.tlds.allow instanceof Set,"tlds.allow must be an array, Set, or boolean"),c.validateTlds(n.tlds.allow,"tlds.allow"),n):n},c.validateTlds=function(n,a){for(const u of n)i(m.isValid(u,{minDomainSegments:1,maxDomainSegments:1}),`${a} must contain valid top level domain names`)},c.isoDate=function(n){if(!s.isIsoDate(n))return null;/.*T.*[+-]\d\d$/.test(n)&&(n+="00");const a=new Date(n);return isNaN(a.getTime())?null:a.toISOString()},c.length=function(n,a,u,g,y){return i(!y||!1,"Invalid encoding:",y),n.$_addRule({name:a,method:"length",args:{limit:u,encoding:y},operator:g})}},8826:(_,j,p)=>{const i=p(375),m=p(8068),f={};f.Map=class extends Map{slice(){return new f.Map(this)}},_.exports=m.extend({type:"symbol",terms:{map:{init:new f.Map}},coerce:{method(h,{schema:t,error:l}){const o=t.$_terms.map.get(h);return o&&(h=o),t._flags.only&&typeof h!="symbol"?{value:h,errors:l("symbol.map",{map:t.$_terms.map})}:{value:h}}},validate(h,{error:t}){if(typeof h!="symbol")return{value:h,errors:t("symbol.base")}},rules:{map:{method(h){h&&!h[Symbol.iterator]&&typeof h=="object"&&(h=Object.entries(h)),i(h&&h[Symbol.iterator],"Iterable must be an iterable or object");const t=this.clone(),l=[];for(const o of h){i(o&&o[Symbol.iterator],"Entry must be an iterable");const[r,s]=o;i(typeof r!="object"&&typeof r!="function"&&typeof r!="symbol","Key must not be of type object, function, or Symbol"),i(typeof s=="symbol","Value must be a Symbol"),t.$_terms.map.set(r,s),l.push(s)}return t.valid(...l)}}},manifest:{build:(h,t)=>(t.map&&(h=h.map(t.map)),h)},messages:{"symbol.base":"{{#label}} must be a symbol","symbol.map":"{{#label}} must be one of {{#map}}"}})},8863:(_,j,p)=>{const i=p(375),m=p(8571),f=p(738),h=p(9621),t=p(8160),l=p(6354),o=p(493),r={result:Symbol("result")};j.entry=function(s,c,n){let a=t.defaults;n&&(i(n.warnings===void 0,"Cannot override warnings preference in synchronous validation"),i(n.artifacts===void 0,"Cannot override artifacts preference in synchronous validation"),a=t.preferences(t.defaults,n));const u=r.entry(s,c,a);i(!u.mainstay.externals.length,"Schema with external rules must use validateAsync()");const g={value:u.value};return u.error&&(g.error=u.error),u.mainstay.warnings.length&&(g.warning=l.details(u.mainstay.warnings)),u.mainstay.debug&&(g.debug=u.mainstay.debug),u.mainstay.artifacts&&(g.artifacts=u.mainstay.artifacts),g},j.entryAsync=async function(s,c,n){let a=t.defaults;n&&(a=t.preferences(t.defaults,n));const u=r.entry(s,c,a),g=u.mainstay;if(u.error)throw g.debug&&(u.error.debug=g.debug),u.error;if(g.externals.length){let k=u.value;const w=[];for(const d of g.externals){const x=d.state.path,b=d.schema.type==="link"?g.links.get(d.schema):null;let S,A,P=k;const L=x.length?[k]:[],D=x.length?h(s,x):s;if(x.length){S=x[x.length-1];let N=k;for(const V of x.slice(0,-1))N=N[V],L.unshift(N);A=L[0],P=A[S]}try{const N=(z,I)=>(b||d.schema).$_createError(z,P,I,d.state,a),V=await d.method(P,{schema:d.schema,linked:b,state:d.state,prefs:n,original:D,error:N,errorsArray:r.errorsArray,warn:(z,I)=>g.warnings.push((b||d.schema).$_createError(z,P,I,d.state,a)),message:(z,I)=>(b||d.schema).$_createError("external",P,I,d.state,a,{messages:z})});if(V===void 0||V===P)continue;if(V instanceof l.Report){if(g.tracer.log(d.schema,d.state,"rule","external","error"),w.push(V),a.abortEarly)break;continue}if(Array.isArray(V)&&V[t.symbols.errors]){if(g.tracer.log(d.schema,d.state,"rule","external","error"),w.push(...V),a.abortEarly)break;continue}A?(g.tracer.value(d.state,"rule",P,V,"external"),A[S]=V):(g.tracer.value(d.state,"rule",k,V,"external"),k=V)}catch(N){throw a.errors.label&&(N.message+=` (${d.label})`),N}}if(u.value=k,w.length)throw u.error=l.process(w,s,a),g.debug&&(u.error.debug=g.debug),u.error}if(!a.warnings&&!a.debug&&!a.artifacts)return u.value;const y={value:u.value};return g.warnings.length&&(y.warning=l.details(g.warnings)),g.debug&&(y.debug=g.debug),g.artifacts&&(y.artifacts=g.artifacts),y},r.Mainstay=class{constructor(s,c,n){this.externals=[],this.warnings=[],this.tracer=s,this.debug=c,this.links=n,this.shadow=null,this.artifacts=null,this._snapshots=[]}snapshot(){this._snapshots.push({externals:this.externals.slice(),warnings:this.warnings.slice()})}restore(){const s=this._snapshots.pop();this.externals=s.externals,this.warnings=s.warnings}commit(){this._snapshots.pop()}},r.entry=function(s,c,n){const{tracer:a,cleanup:u}=r.tracer(c,n),g=n.debug?[]:null,y=c._ids._schemaChain?new Map:null,k=new r.Mainstay(a,g,y),w=c._ids._schemaChain?[{schema:c}]:null,d=new o([],[],{mainstay:k,schemas:w}),x=j.validate(s,c,d,n);u&&c.$_root.untrace();const b=l.process(x.errors,s,n);return{value:x.value,error:b,mainstay:k}},r.tracer=function(s,c){return s.$_root._tracer?{tracer:s.$_root._tracer._register(s)}:c.debug?(i(s.$_root.trace,"Debug mode not supported"),{tracer:s.$_root.trace()._register(s),cleanup:!0}):{tracer:r.ignore}},j.validate=function(s,c,n,a,u={}){if(c.$_terms.whens&&(c=c._generate(s,n,a).schema),c._preferences&&(a=r.prefs(c,a)),c._cache&&a.cache){const b=c._cache.get(s);if(n.mainstay.tracer.debug(n,"validate","cached",!!b),b)return b}const g=(b,S,A)=>c.$_createError(b,s,S,A||n,a),y={original:s,prefs:a,schema:c,state:n,error:g,errorsArray:r.errorsArray,warn:(b,S,A)=>n.mainstay.warnings.push(g(b,S,A)),message:(b,S)=>c.$_createError("custom",s,S,n,a,{messages:b})};n.mainstay.tracer.entry(c,n);const k=c._definition;if(k.prepare&&s!==void 0&&a.convert){const b=k.prepare(s,y);if(b){if(n.mainstay.tracer.value(n,"prepare",s,b.value),b.errors)return r.finalize(b.value,[].concat(b.errors),y);s=b.value}}if(k.coerce&&s!==void 0&&a.convert&&(!k.coerce.from||k.coerce.from.includes(typeof s))){const b=k.coerce.method(s,y);if(b){if(n.mainstay.tracer.value(n,"coerced",s,b.value),b.errors)return r.finalize(b.value,[].concat(b.errors),y);s=b.value}}const w=c._flags.empty;w&&w.$_match(r.trim(s,c),n.nest(w),t.defaults)&&(n.mainstay.tracer.value(n,"empty",s,void 0),s=void 0);const d=u.presence||c._flags.presence||(c._flags._endedSwitch?null:a.presence);if(s===void 0){if(d==="forbidden")return r.finalize(s,null,y);if(d==="required")return r.finalize(s,[c.$_createError("any.required",s,null,n,a)],y);if(d==="optional"){if(c._flags.default!==t.symbols.deepDefault)return r.finalize(s,null,y);n.mainstay.tracer.value(n,"default",s,{}),s={}}}else if(d==="forbidden")return r.finalize(s,[c.$_createError("any.unknown",s,null,n,a)],y);const x=[];if(c._valids){const b=c._valids.get(s,n,a,c._flags.insensitive);if(b)return a.convert&&(n.mainstay.tracer.value(n,"valids",s,b.value),s=b.value),n.mainstay.tracer.filter(c,n,"valid",b),r.finalize(s,null,y);if(c._flags.only){const S=c.$_createError("any.only",s,{valids:c._valids.values({display:!0})},n,a);if(a.abortEarly)return r.finalize(s,[S],y);x.push(S)}}if(c._invalids){const b=c._invalids.get(s,n,a,c._flags.insensitive);if(b){n.mainstay.tracer.filter(c,n,"invalid",b);const S=c.$_createError("any.invalid",s,{invalids:c._invalids.values({display:!0})},n,a);if(a.abortEarly)return r.finalize(s,[S],y);x.push(S)}}if(k.validate){const b=k.validate(s,y);if(b&&(n.mainstay.tracer.value(n,"base",s,b.value),s=b.value,b.errors)){if(!Array.isArray(b.errors))return x.push(b.errors),r.finalize(s,x,y);if(b.errors.length)return x.push(...b.errors),r.finalize(s,x,y)}}return c._rules.length?r.rules(s,x,y):r.finalize(s,x,y)},r.rules=function(s,c,n){const{schema:a,state:u,prefs:g}=n;for(const y of a._rules){const k=a._definition.rules[y.method];if(k.convert&&g.convert){u.mainstay.tracer.log(a,u,"rule",y.name,"full");continue}let w,d=y.args;if(y._resolve.length){d=Object.assign({},d);for(const b of y._resolve){const S=k.argsByName.get(b),A=d[b].resolve(s,u,g),P=S.normalize?S.normalize(A):A,L=t.validateArg(P,null,S);if(L){w=a.$_createError("any.ref",A,{arg:b,ref:d[b],reason:L},u,g);break}d[b]=P}}w=w||k.validate(s,n,d,y);const x=r.rule(w,y);if(x.errors){if(u.mainstay.tracer.log(a,u,"rule",y.name,"error"),y.warn){u.mainstay.warnings.push(...x.errors);continue}if(g.abortEarly)return r.finalize(s,x.errors,n);c.push(...x.errors)}else u.mainstay.tracer.log(a,u,"rule",y.name,"pass"),u.mainstay.tracer.value(u,"rule",s,x.value,y.name),s=x.value}return r.finalize(s,c,n)},r.rule=function(s,c){return s instanceof l.Report?(r.error(s,c),{errors:[s],value:null}):Array.isArray(s)&&s[t.symbols.errors]?(s.forEach(n=>r.error(n,c)),{errors:s,value:null}):{errors:null,value:s}},r.error=function(s,c){return c.message&&s._setTemplate(c.message),s},r.finalize=function(s,c,n){c=c||[];const{schema:a,state:u,prefs:g}=n;if(c.length){const k=r.default("failover",void 0,c,n);k!==void 0&&(u.mainstay.tracer.value(u,"failover",s,k),s=k,c=[])}if(c.length&&a._flags.error)if(typeof a._flags.error=="function"){c=a._flags.error(c),Array.isArray(c)||(c=[c]);for(const k of c)i(k instanceof Error||k instanceof l.Report,"error() must return an Error object")}else c=[a._flags.error];if(s===void 0){const k=r.default("default",s,c,n);u.mainstay.tracer.value(u,"default",s,k),s=k}if(a._flags.cast&&s!==void 0){const k=a._definition.cast[a._flags.cast];if(k.from(s)){const w=k.to(s,n);u.mainstay.tracer.value(u,"cast",s,w,a._flags.cast),s=w}}if(a.$_terms.externals&&g.externals&&g._externals!==!1)for(const{method:k}of a.$_terms.externals)u.mainstay.externals.push({method:k,schema:a,state:u,label:l.label(a._flags,u,g)});const y={value:s,errors:c.length?c:null};return a._flags.result&&(y.value=a._flags.result==="strip"?void 0:n.original,u.mainstay.tracer.value(u,a._flags.result,s,y.value),u.shadow(s,a._flags.result)),a._cache&&g.cache!==!1&&!a._refs.length&&a._cache.set(n.original,y),s===void 0||y.errors||a._flags.artifact===void 0||(u.mainstay.artifacts=u.mainstay.artifacts||new Map,u.mainstay.artifacts.has(a._flags.artifact)||u.mainstay.artifacts.set(a._flags.artifact,[]),u.mainstay.artifacts.get(a._flags.artifact).push(u.path)),y},r.prefs=function(s,c){const n=c===t.defaults;return n&&s._preferences[t.symbols.prefs]?s._preferences[t.symbols.prefs]:(c=t.preferences(c,s._preferences),n&&(s._preferences[t.symbols.prefs]=c),c)},r.default=function(s,c,n,a){const{schema:u,state:g,prefs:y}=a,k=u._flags[s];if(y.noDefaults||k===void 0)return c;if(g.mainstay.tracer.log(u,g,"rule",s,"full"),!k)return k;if(typeof k=="function"){const w=k.length?[m(g.ancestors[0]),a]:[];try{return k(...w)}catch(d){return void n.push(u.$_createError(`any.${s}`,null,{error:d},g,y))}}return typeof k!="object"?k:k[t.symbols.literal]?k.literal:t.isResolvable(k)?k.resolve(c,g,y):m(k)},r.trim=function(s,c){if(typeof s!="string")return s;const n=c.$_getRule("trim");return n&&n.args.enabled?s.trim():s},r.ignore={active:!1,debug:f,entry:f,filter:f,log:f,resolve:f,value:f},r.errorsArray=function(){const s=[];return s[t.symbols.errors]=!0,s}},2036:(_,j,p)=>{const i=p(375),m=p(9474),f=p(8160),h={};_.exports=h.Values=class{constructor(t,l){this._values=new Set(t),this._refs=new Set(l),this._lowercase=h.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,o){if(t=t||new h.Values,l){if(l._override)return l.clone();for(const r of[...l._values,...l._refs])t.add(r)}if(o)for(const r of[...o._values,...o._refs])t.remove(r);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,o,r){return!!this.get(t,l,o,r)}get(t,l,o,r){if(!this.length)return!1;if(this._values.has(t))return{value:t};if(typeof t=="string"&&t&&r){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(m(s,t))return{value:s}}if(l)for(const s of this._refs){const c=s.resolve(t,l,o,null,{in:!0});if(c===void 0)continue;const n=s.in&&typeof c=="object"?Array.isArray(c)?c:Object.keys(c):[c];for(const a of n)if(typeof a==typeof t){if(r&&t&&typeof t=="string"){if(a.toLowerCase()===t.toLowerCase())return{value:a,ref:s}}else if(m(a,t))return{value:a,ref:s}}}return!1}override(){this._override=!0}values(t){if(t&&t.display){const l=[];for(const o of[...this._values,...this._refs])o!==void 0&&l.push(o);return l}return Array.from([...this._values,...this._refs])}clone(){const t=new h.Values(this._values,this._refs);return t._override=this._override,t}concat(t){i(!t._override,"Cannot concat override set of values");const l=new h.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}},h.Values.prototype[f.symbols.values]=!0,h.Values.prototype.slice=h.Values.prototype.clone,h.lowercases=function(t){const l=new Map;if(t)for(const o of t)typeof o=="string"&&l.set(o.toLowerCase(),o);return l}},978:(_,j,p)=>{const i=p(375),m=p(8571),f=p(1687),h=p(9621),t={};_.exports=function(l,o,r={}){if(i(l&&typeof l=="object","Invalid defaults value: must be an object"),i(!o||o===!0||typeof o=="object","Invalid source value: must be true, falsy or an object"),i(typeof r=="object","Invalid options: must be an object"),!o)return null;if(r.shallow)return t.applyToDefaultsWithShallow(l,o,r);const s=m(l);if(o===!0)return s;const c=r.nullOverride!==void 0&&r.nullOverride;return f(s,o,{nullOverride:c,mergeArrays:!1})},t.applyToDefaultsWithShallow=function(l,o,r){const s=r.shallow;i(Array.isArray(s),"Invalid keys");const c=new Map,n=o===!0?null:new Set;for(let g of s){g=Array.isArray(g)?g:g.split(".");const y=h(l,g);y&&typeof y=="object"?c.set(y,n&&h(o,g)||y):n&&n.add(g)}const a=m(l,{},c);if(!n)return a;for(const g of n)t.reachCopy(a,o,g);const u=r.nullOverride!==void 0&&r.nullOverride;return f(a,o,{nullOverride:u,mergeArrays:!1})},t.reachCopy=function(l,o,r){for(const n of r){if(!(n in o))return;const a=o[n];if(typeof a!="object"||a===null)return;o=a}const s=o;let c=l;for(let n=0;n<r.length-1;++n){const a=r[n];typeof c[a]!="object"&&(c[a]={}),c=c[a]}c[r[r.length-1]]=s}},375:(_,j,p)=>{const i=p(7916);_.exports=function(m,...f){if(!m)throw f.length===1&&f[0]instanceof Error?f[0]:new i(f)}},8571:(_,j,p)=>{const i=p(9621),m=p(4277),f=p(7043),h={needsProtoHack:new Set([m.set,m.map,m.weakSet,m.weakMap])};_.exports=h.clone=function(t,l={},o=null){if(typeof t!="object"||t===null)return t;let r=h.clone,s=o;if(l.shallow){if(l.shallow!==!0)return h.cloneWithShallow(t,l);r=u=>u}else if(s){const u=s.get(t);if(u)return u}else s=new Map;const c=m.getInternalProto(t);if(c===m.buffer)return!1;if(c===m.date)return new Date(t.getTime());if(c===m.regex)return new RegExp(t);const n=h.base(t,c,l);if(n===t)return t;if(s&&s.set(t,n),c===m.set)for(const u of t)n.add(r(u,l,s));else if(c===m.map)for(const[u,g]of t)n.set(u,r(g,l,s));const a=f.keys(t,l);for(const u of a){if(u==="__proto__")continue;if(c===m.array&&u==="length"){n.length=t.length;continue}const g=Object.getOwnPropertyDescriptor(t,u);g?g.get||g.set?Object.defineProperty(n,u,g):g.enumerable?n[u]=r(t[u],l,s):Object.defineProperty(n,u,{enumerable:!1,writable:!0,configurable:!0,value:r(t[u],l,s)}):Object.defineProperty(n,u,{enumerable:!0,writable:!0,configurable:!0,value:r(t[u],l,s)})}return n},h.cloneWithShallow=function(t,l){const o=l.shallow;(l=Object.assign({},l)).shallow=!1;const r=new Map;for(const s of o){const c=i(t,s);typeof c!="object"&&typeof c!="function"||r.set(c,c)}return h.clone(t,l,r)},h.base=function(t,l,o){if(o.prototype===!1)return h.needsProtoHack.has(l)?new l.constructor:l===m.array?[]:{};const r=Object.getPrototypeOf(t);if(r&&r.isImmutable)return t;if(l===m.array){const s=[];return r!==l&&Object.setPrototypeOf(s,r),s}if(h.needsProtoHack.has(l)){const s=new r.constructor;return r!==l&&Object.setPrototypeOf(s,r),s}return Object.create(r)}},9474:(_,j,p)=>{const i=p(4277),m={mismatched:null};_.exports=function(f,h,t){return t=Object.assign({prototype:!0},t),!!m.isDeepEqual(f,h,t,[])},m.isDeepEqual=function(f,h,t,l){if(f===h)return f!==0||1/f==1/h;const o=typeof f;if(o!==typeof h||f===null||h===null)return!1;if(o==="function"){if(!t.deepFunction||f.toString()!==h.toString())return!1}else if(o!=="object")return f!=f&&h!=h;const r=m.getSharedType(f,h,!!t.prototype);switch(r){case i.buffer:return!1;case i.promise:return f===h;case i.regex:return f.toString()===h.toString();case m.mismatched:return!1}for(let s=l.length-1;s>=0;--s)if(l[s].isSame(f,h))return!0;l.push(new m.SeenEntry(f,h));try{return!!m.isDeepEqualObj(r,f,h,t,l)}finally{l.pop()}},m.getSharedType=function(f,h,t){if(t)return Object.getPrototypeOf(f)!==Object.getPrototypeOf(h)?m.mismatched:i.getInternalProto(f);const l=i.getInternalProto(f);return l!==i.getInternalProto(h)?m.mismatched:l},m.valueOf=function(f){const h=f.valueOf;if(h===void 0)return f;try{return h.call(f)}catch(t){return t}},m.hasOwnEnumerableProperty=function(f,h){return Object.prototype.propertyIsEnumerable.call(f,h)},m.isSetSimpleEqual=function(f,h){for(const t of Set.prototype.values.call(f))if(!Set.prototype.has.call(h,t))return!1;return!0},m.isDeepEqualObj=function(f,h,t,l,o){const{isDeepEqual:r,valueOf:s,hasOwnEnumerableProperty:c}=m,{keys:n,getOwnPropertySymbols:a}=Object;if(f===i.array){if(!l.part){if(h.length!==t.length)return!1;for(let w=0;w<h.length;++w)if(!r(h[w],t[w],l,o))return!1;return!0}for(const w of h)for(const d of t)if(r(w,d,l,o))return!0}else if(f===i.set){if(h.size!==t.size)return!1;if(!m.isSetSimpleEqual(h,t)){const w=new Set(Set.prototype.values.call(t));for(const d of Set.prototype.values.call(h)){if(w.delete(d))continue;let x=!1;for(const b of w)if(r(d,b,l,o)){w.delete(b),x=!0;break}if(!x)return!1}}}else if(f===i.map){if(h.size!==t.size)return!1;for(const[w,d]of Map.prototype.entries.call(h))if(d===void 0&&!Map.prototype.has.call(t,w)||!r(d,Map.prototype.get.call(t,w),l,o))return!1}else if(f===i.error&&(h.name!==t.name||h.message!==t.message))return!1;const u=s(h),g=s(t);if((h!==u||t!==g)&&!r(u,g,l,o))return!1;const y=n(h);if(!l.part&&y.length!==n(t).length&&!l.skip)return!1;let k=0;for(const w of y)if(l.skip&&l.skip.includes(w))t[w]===void 0&&++k;else if(!c(t,w)||!r(h[w],t[w],l,o))return!1;if(!l.part&&y.length-k!==n(t).length)return!1;if(l.symbols!==!1){const w=a(h),d=new Set(a(t));for(const x of w){if(!l.skip||!l.skip.includes(x)){if(c(h,x)){if(!c(t,x)||!r(h[x],t[x],l,o))return!1}else if(c(t,x))return!1}d.delete(x)}for(const x of d)if(c(t,x))return!1}return!0},m.SeenEntry=class{constructor(f,h){this.obj=f,this.ref=h}isSame(f,h){return this.obj===f&&this.ref===h}}},7916:(_,j,p)=>{const i=p(8761);_.exports=class extends Error{constructor(m){super(m.filter(f=>f!=="").map(f=>typeof f=="string"?f:f instanceof Error?f.message:i(f)).join(" ")||"Unknown error"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,j.assert)}}},5277:_=>{const j={};_.exports=function(p){if(!p)return"";let i="";for(let m=0;m<p.length;++m){const f=p.charCodeAt(m);j.isSafe(f)?i+=p[m]:i+=j.escapeHtmlChar(f)}return i},j.escapeHtmlChar=function(p){return j.namedHtml.get(p)||(p>=256?"&#"+p+";":`&#x${p.toString(16).padStart(2,"0")};`)},j.isSafe=function(p){return j.safeCharCodes.has(p)},j.namedHtml=new Map([[38,"&amp;"],[60,"&lt;"],[62,"&gt;"],[34,"&quot;"],[160,"&nbsp;"],[162,"&cent;"],[163,"&pound;"],[164,"&curren;"],[169,"&copy;"],[174,"&reg;"]]),j.safeCharCodes=function(){const p=new Set;for(let i=32;i<123;++i)(i>=97||i>=65&&i<=90||i>=48&&i<=57||i===32||i===46||i===44||i===45||i===58||i===95)&&p.add(i);return p}()},6064:_=>{_.exports=function(j){return j.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g,"\\$&")}},738:_=>{_.exports=function(){}},1687:(_,j,p)=>{const i=p(375),m=p(8571),f=p(7043),h={};_.exports=h.merge=function(t,l,o){if(i(t&&typeof t=="object","Invalid target value: must be an object"),i(l==null||typeof l=="object","Invalid source value: must be null, undefined, or an object"),!l)return t;if(o=Object.assign({nullOverride:!0,mergeArrays:!0},o),Array.isArray(l)){i(Array.isArray(t),"Cannot merge array onto an object"),o.mergeArrays||(t.length=0);for(let s=0;s<l.length;++s)t.push(m(l[s],{symbols:o.symbols}));return t}const r=f.keys(l,o);for(let s=0;s<r.length;++s){const c=r[s];if(c==="__proto__"||!Object.prototype.propertyIsEnumerable.call(l,c))continue;const n=l[c];if(n&&typeof n=="object"){if(t[c]===n)continue;!t[c]||typeof t[c]!="object"||Array.isArray(t[c])!==Array.isArray(n)||n instanceof Date||n instanceof RegExp?t[c]=m(n,{symbols:o.symbols}):h.merge(t[c],n,o)}else(n!=null||o.nullOverride)&&(t[c]=n)}return t}},9621:(_,j,p)=>{const i=p(375),m={};_.exports=function(f,h,t){if(h===!1||h==null)return f;typeof(t=t||{})=="string"&&(t={separator:t});const l=Array.isArray(h);i(!l||!t.separator,"Separator option is not valid for array-based chain");const o=l?h:h.split(t.separator||".");let r=f;for(let s=0;s<o.length;++s){let c=o[s];const n=t.iterables&&m.iterables(r);if(Array.isArray(r)||n==="set"){const a=Number(c);Number.isInteger(a)&&(c=a<0?r.length+a:a)}if(!r||typeof r=="function"&&t.functions===!1||!n&&r[c]===void 0){i(!t.strict||s+1===o.length,"Missing segment",c,"in reach path ",h),i(typeof r=="object"||t.functions===!0||typeof r!="function","Invalid segment",c,"in reach path ",h),r=t.default;break}r=n?n==="set"?[...r][c]:r.get(c):r[c]}return r},m.iterables=function(f){return f instanceof Set?"set":f instanceof Map?"map":void 0}},8761:_=>{_.exports=function(...j){try{return JSON.stringify(...j)}catch(p){return"[Cannot display object: "+p.message+"]"}}},4277:(_,j)=>{const p={};j=_.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},p.typeMap=new Map([["[object Error]",j.error],["[object Map]",j.map],["[object Promise]",j.promise],["[object Set]",j.set],["[object WeakMap]",j.weakMap],["[object WeakSet]",j.weakSet]]),j.getInternalProto=function(i){if(Array.isArray(i))return j.array;if(i instanceof Date)return j.date;if(i instanceof RegExp)return j.regex;if(i instanceof Error)return j.error;const m=Object.prototype.toString.call(i);return p.typeMap.get(m)||j.generic}},7043:(_,j)=>{j.keys=function(p,i={}){return i.symbols!==!1?Reflect.ownKeys(p):Object.getOwnPropertyNames(p)}},3652:(_,j,p)=>{const i=p(375),m={};j.Sorter=class{constructor(){this._items=[],this.nodes=[]}add(f,h){const t=[].concat((h=h||{}).before||[]),l=[].concat(h.after||[]),o=h.group||"?",r=h.sort||0;i(!t.includes(o),`Item cannot come before itself: ${o}`),i(!t.includes("?"),"Item cannot come before unassociated items"),i(!l.includes(o),`Item cannot come after itself: ${o}`),i(!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:r,before:t,after:l,group:o,node:s};this._items.push(c)}if(!h.manual){const s=this._sort();i(s,"item",o!=="?"?`added into group ${o}`:"","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(m.mergeSort);for(let t=0;t<this._items.length;++t)this._items[t].seq=t;const h=this._sort();return i(h,"merge created a dependencies error"),this.nodes}sort(){const f=this._sort();return i(f,"sort created a dependencies error"),this.nodes}_sort(){const f={},h=Object.create(null),t=Object.create(null);for(const c of this._items){const n=c.seq,a=c.group;t[a]=t[a]||[],t[a].push(n),f[n]=c.before;for(const u of c.after)h[u]=h[u]||[],h[u].push(n)}for(const c in f){const n=[];for(const a in f[c]){const u=f[c][a];t[u]=t[u]||[],n.push(...t[u])}f[c]=n}for(const c in h)if(t[c])for(const n of t[c])f[n].push(...h[c]);const l={};for(const c in f){const n=f[c];for(const a of n)l[a]=l[a]||[],l[a].push(c)}const o={},r=[];for(let c=0;c<this._items.length;++c){let n=c;if(l[c]){n=null;for(let a=0;a<this._items.length;++a){if(o[a]===!0)continue;l[a]||(l[a]=[]);const u=l[a].length;let g=0;for(let y=0;y<u;++y)o[l[a][y]]&&++g;if(g===u){n=a;break}}}n!==null&&(o[n]=!0,r.push(n))}if(r.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 r){const n=s[c];this.nodes.push(n.node),this._items.push(n)}return!0}},m.mergeSort=(f,h)=>f.sort===h.sort?0:f.sort<h.sort?-1:1},5380:(_,j,p)=>{const i=p(443),m=p(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:i.URL||URL};j.analyze=function(h,t={}){if(!h)return m.code("DOMAIN_NON_EMPTY_STRING");if(typeof h!="string")throw new Error("Invalid input: domain must be a string");if(h.length>256)return m.code("DOMAIN_TOO_LONG");if(f.nonAsciiRx.test(h)){if(t.allowUnicode===!1)return m.code("DOMAIN_INVALID_UNICODE_CHARS");h=h.normalize("NFC")}if(f.domainControlRx.test(h))return m.code("DOMAIN_INVALID_CHARS");h=f.punycode(h),t.allowFullyQualified&&h[h.length-1]==="."&&(h=h.slice(0,-1));const l=t.minDomainSegments||f.minDomainSegments,o=h.split(".");if(o.length<l)return m.code("DOMAIN_SEGMENTS_COUNT");if(t.maxDomainSegments&&o.length>t.maxDomainSegments)return m.code("DOMAIN_SEGMENTS_COUNT_MAX");const r=t.tlds;if(r){const s=o[o.length-1].toLowerCase();if(r.deny&&r.deny.has(s)||r.allow&&!r.allow.has(s))return m.code("DOMAIN_FORBIDDEN_TLDS")}for(let s=0;s<o.length;++s){const c=o[s];if(!c.length)return m.code("DOMAIN_EMPTY_SEGMENT");if(c.length>63)return m.code("DOMAIN_LONG_SEGMENT");if(s<o.length-1){if(!f.domainSegmentRx.test(c))return m.code("DOMAIN_INVALID_CHARS")}else if(!f.tldSegmentRx.test(c))return m.code("DOMAIN_INVALID_TLDS_CHARS")}return null},j.isValid=function(h,t){return!j.analyze(h,t)},f.punycode=function(h){h.includes("%")&&(h=h.replace(/%/g,"%25"));try{return new f.URL(`http://${h}`).host}catch{return h}}},1745:(_,j,p)=>{const i=p(9848),m=p(5380),f=p(2178),h={nonAsciiRx:/[^\x00-\x7f]/,encoder:new(i.TextEncoder||TextEncoder)};j.analyze=function(t,l){return h.email(t,l)},j.isValid=function(t,l){return!h.email(t,l)},h.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 o=!h.nonAsciiRx.test(t);if(!o){if(l.allowUnicode===!1)return f.code("FORBIDDEN_UNICODE");t=t.normalize("NFC")}const r=t.split("@");if(r.length!==2)return r.length>2?f.code("MULTIPLE_AT_CHAR"):f.code("MISSING_AT_CHAR");const[s,c]=r;if(!s)return f.code("EMPTY_LOCAL");if(!l.ignoreLength){if(t.length>254)return f.code("ADDRESS_TOO_LONG");if(h.encoder.encode(s).length>64)return f.code("LOCAL_TOO_LONG")}return h.local(s,o)||m.analyze(c,l)},h.local=function(t,l){const o=t.split(".");for(const r of o){if(!r.length)return f.code("EMPTY_LOCAL_SEGMENT");if(l){if(!h.atextRx.test(r))return f.code("INVALID_LOCAL_CHARS")}else for(const s of r){if(h.atextRx.test(s))continue;const c=h.binary(s);if(!h.atomRx.test(c))return f.code("INVALID_LOCAL_CHARS")}}},h.binary=function(t){return Array.from(h.encoder.encode(t)).map(l=>String.fromCharCode(l)).join("")},h.atextRx=/^[\w!#\$%&'\*\+\-/=\?\^`\{\|\}~]+$/,h.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:(_,j)=>{j.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"},j.code=function(p){return{code:p,error:j.codes[p]}}},9959:(_,j,p)=>{const i=p(375),m=p(5752);j.regex=function(f={}){i(f.cidr===void 0||typeof f.cidr=="string","options.cidr must be a string");const h=f.cidr?f.cidr.toLowerCase():"optional";i(["required","optional","forbidden"].includes(h),"options.cidr must be one of required, optional, forbidden"),i(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]),i(t.length>=1,"options.version must have at least 1 version specified");for(let r=0;r<t.length;++r)i(typeof t[r]=="string","options.version must only contain strings"),t[r]=t[r].toLowerCase(),i(["ipv4","ipv6","ipvfuture"].includes(t[r]),"options.version contains unknown version "+t[r]+" - must be one of ipv4, ipv6, ipvfuture");t=Array.from(new Set(t));const l=`(?:${t.map(r=>{if(h==="forbidden")return m.ip[r];const s=`\\/${r==="ipv4"?m.ip.v4Cidr:m.ip.v6Cidr}`;return h==="required"?`${m.ip[r]}${s}`:`${m.ip[r]}(?:${s})?`}).join("|")})`,o=new RegExp(`^${l}$`);return{cidr:h,versions:t,regex:o,raw:l}}},5752:(_,j,p)=>{const i=p(375),m=p(6064),f={generate:function(){const h={},t="\\dA-Fa-f",l="["+t+"]",o="\\w-\\.~",r="!\\$&'\\(\\)\\*\\+,;=",s="%"+t,c=o+s+r+":@",n="["+c+"]",a="(?:0{0,2}\\d|0?[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])";h.ipv4address="(?:"+a+"\\.){3}"+a;const u=l+"{1,4}",g="(?:"+u+":"+u+"|"+h.ipv4address+")",y="(?:"+u+":){6}"+g,k="::(?:"+u+":){5}"+g,w="(?:"+u+")?::(?:"+u+":){4}"+g,d="(?:(?:"+u+":){0,1}"+u+")?::(?:"+u+":){3}"+g,x="(?:(?:"+u+":){0,2}"+u+")?::(?:"+u+":){2}"+g,b="(?:(?:"+u+":){0,3}"+u+")?::"+u+":"+g,S="(?:(?:"+u+":){0,4}"+u+")?::"+g,A="(?:(?:"+u+":){0,5}"+u+")?::"+u,P="(?:(?:"+u+":){0,6}"+u+")?::";h.ipv4Cidr="(?:\\d|[1-2]\\d|3[0-2])",h.ipv6Cidr="(?:0{0,2}\\d|0?[1-9]\\d|1[01]\\d|12[0-8])",h.ipv6address="(?:"+y+"|"+k+"|"+w+"|"+d+"|"+x+"|"+b+"|"+S+"|"+A+"|"+P+")",h.ipvFuture="v"+l+"+\\.["+o+r+":]+",h.scheme="[a-zA-Z][a-zA-Z\\d+-\\.]*",h.schemeRegex=new RegExp(h.scheme);const L="["+o+s+r+":]*",D="["+o+s+r+"]{1,255}",N="(?:\\[(?:"+h.ipv6address+"|"+h.ipvFuture+")\\]|"+h.ipv4address+"|"+D+")",V="(?:"+L+"@)?"+N+"(?::\\d*)?",z="(?:"+L+"@)?("+N+")(?::\\d*)?",I=n+"*",B=n+"+",F="(?:\\/"+I+")*",K="\\/(?:"+B+F+")?",he=B+F,be="["+o+s+r+"@]+"+F,De="(?:\\/\\/\\/"+I+F+")";return h.hierPart="(?:(?:\\/\\/"+V+F+")|"+K+"|"+he+"|"+De+")",h.hierPartCapture="(?:(?:\\/\\/"+z+F+")|"+K+"|"+he+")",h.relativeRef="(?:(?:\\/\\/"+V+F+")|"+K+"|"+be+"|)",h.relativeRefCapture="(?:(?:\\/\\/"+z+F+")|"+K+"|"+be+"|)",h.query="["+c+"\\/\\?]*(?=#|$)",h.queryWithSquareBrackets="["+c+"\\[\\]\\/\\?]*(?=#|$)",h.fragment="["+c+"\\/\\?]*",h}};f.rfc3986=f.generate(),j.ip={v4Cidr:f.rfc3986.ipv4Cidr,v6Cidr:f.rfc3986.ipv6Cidr,ipv4:f.rfc3986.ipv4address,ipv6:f.rfc3986.ipv6address,ipvfuture:f.rfc3986.ipvFuture},f.createRegex=function(h){const t=f.rfc3986,l="(?:\\?"+(h.allowQuerySquareBrackets?t.queryWithSquareBrackets:t.query)+")?(?:#"+t.fragment+")?",o=h.domain?t.relativeRefCapture:t.relativeRef;if(h.relativeOnly)return f.wrap(o+l);let r="";if(h.scheme){i(h.scheme instanceof RegExp||typeof h.scheme=="string"||Array.isArray(h.scheme),"scheme must be a RegExp, String, or Array");const n=[].concat(h.scheme);i(n.length>=1,"scheme must have at least 1 scheme specified");const a=[];for(let u=0;u<n.length;++u){const g=n[u];i(g instanceof RegExp||typeof g=="string","scheme at position "+u+" must be a RegExp or String"),g instanceof RegExp?a.push(g.source.toString()):(i(t.schemeRegex.test(g),"scheme at position "+u+" must be a valid scheme"),a.push(m(g)))}r=a.join("|")}const s="(?:"+(r?"(?:"+r+")":t.scheme)+":"+(h.domain?t.hierPartCapture:t.hierPart)+")",c=h.allowRelative?"(?:"+s+"|"+o+")":s;return f.wrap(c+l,r)},f.wrap=function(h,t){return{raw:h=`(?=.)(?!https?:/(?:$|[^/]))(?!https?:///)(?!https?:[^/])${h}`,regex:new RegExp(`^${h}$`),scheme:t}},f.uriRegex=f.createRegex({}),j.regex=function(h={}){return h.scheme||h.allowRelative||h.relativeOnly||h.allowQuerySquareBrackets||h.domain?f.createRegex(h):f.uriRegex}},1447:(_,j)=>{const p={operators:["!","^","*","/","%","+","-","<","<=",">",">=","==","!=","&&","||","??"],operatorCharacters:["!","^","*","/","%","+","-","<","=",">","&","|","?"],operatorsOrder:[["^"],["*","/","%"],["+","-"],["<","<=",">",">="],["==","!="],["&&"],["||","??"]],operatorsPrefix:["!","n"],literals:{'"':'"',"`":"`","'":"'","[":"]"},numberRx:/^(?:[0-9]*(\.[0-9]*)?){1}$/,tokenRx:/^[\w\$\#\.\@\:\{\}]+$/,symbol:Symbol("formula"),settings:Symbol("settings")};j.Parser=class{constructor(i,m={}){if(!m[p.settings]&&m.constants)for(const f in m.constants){const h=m.constants[f];if(h!==null&&!["boolean","number","string"].includes(typeof h))throw new Error(`Formula constant ${f} contains invalid ${typeof h} value type`)}this.settings=m[p.settings]?m:Object.assign({[p.settings]:!0,constants:{},functions:{}},m),this.single=null,this._parts=null,this._parse(i)}_parse(i){let m=[],f="",h=0,t=!1;const l=r=>{if(h)throw new Error("Formula missing closing parenthesis");const s=m.length?m[m.length-1]:null;if(t||f||r){if(s&&s.type==="reference"&&r===")")return s.type="function",s.value=this._subFormula(f,s.value),void(f="");if(r===")"){const c=new j.Parser(f,this.settings);m.push({type:"segment",value:c})}else if(t){if(t==="]")return m.push({type:"reference",value:f}),void(f="");m.push({type:"literal",value:f})}else if(p.operatorCharacters.includes(f))s&&s.type==="operator"&&p.operators.includes(s.value+f)?s.value+=f:m.push({type:"operator",value:f});else if(f.match(p.numberRx))m.push({type:"constant",value:parseFloat(f)});else if(this.settings.constants[f]!==void 0)m.push({type:"constant",value:this.settings.constants[f]});else{if(!f.match(p.tokenRx))throw new Error(`Formula contains invalid token: ${f}`);m.push({type:"reference",value:f})}f=""}};for(const r of i)t?r===t?(l(),t=!1):f+=r:h?r==="("?(f+=r,++h):r===")"?(--h,h?f+=r:l(r)):f+=r:r in p.literals?t=p.literals[r]:r==="("?(l(),++h):p.operatorCharacters.includes(r)?(l(),f=r,l()):r!==" "?f+=r:l();l(),m=m.map((r,s)=>r.type!=="operator"||r.value!=="-"||s&&m[s-1].type!=="operator"?r:{type:"operator",value:"n"});let o=!1;for(const r of m){if(r.type==="operator"){if(p.operatorsPrefix.includes(r.value))continue;if(!o)throw new Error("Formula contains an operator in invalid position");if(!p.operators.includes(r.value))throw new Error(`Formula contains an unknown operator ${r.value}`)}else if(o)throw new Error("Formula missing expected operator");o=!o}if(!o)throw new Error("Formula contains invalid trailing operator");m.length===1&&["reference","literal","constant"].includes(m[0].type)&&(this.single={type:m[0].type==="reference"?"reference":"value",value:m[0].value}),this._parts=m.map(r=>{if(r.type==="operator")return p.operatorsPrefix.includes(r.value)?r:r.value;if(r.type!=="reference")return r.value;if(this.settings.tokenRx&&!this.settings.tokenRx.test(r.value))throw new Error(`Formula contains invalid reference ${r.value}`);return this.settings.reference?this.settings.reference(r.value):p.reference(r.value)})}_subFormula(i,m){const f=this.settings.functions[m];if(typeof f!="function")throw new Error(`Formula contains unknown function ${m}`);let h=[];if(i){let t="",l=0,o=!1;const r=()=>{if(!t)throw new Error(`Formula contains function ${m} with invalid arguments ${i}`);h.push(t),t=""};for(let s=0;s<i.length;++s){const c=i[s];o?(t+=c,c===o&&(o=!1)):c in p.literals&&!l?(t+=c,o=p.literals[c]):c!==","||l?(t+=c,c==="("?++l:c===")"&&--l):r()}r()}return h=h.map(t=>new j.Parser(t,this.settings)),function(t){const l=[];for(const o of h)l.push(o.evaluate(t));return f.call(t,...l)}}evaluate(i){const m=this._parts.slice();for(let f=m.length-2;f>=0;--f){const h=m[f];if(h&&h.type==="operator"){const t=m[f+1];m.splice(f+1,1);const l=p.evaluate(t,i);m[f]=p.single(h.value,l)}}return p.operatorsOrder.forEach(f=>{for(let h=1;h<m.length-1;)if(f.includes(m[h])){const t=m[h],l=p.evaluate(m[h-1],i),o=p.evaluate(m[h+1],i);m.splice(h,2);const r=p.calculate(t,l,o);m[h-1]=r===0?0:r}else h+=2}),p.evaluate(m[0],i)}},j.Parser.prototype[p.symbol]=!0,p.reference=function(i){return function(m){return m&&m[i]!==void 0?m[i]:null}},p.evaluate=function(i,m){return i===null?null:typeof i=="function"?i(m):i[p.symbol]?i.evaluate(m):i},p.single=function(i,m){if(i==="!")return!m;const f=-m;return f===0?0:f},p.calculate=function(i,m,f){if(i==="??")return p.exists(m)?m:f;if(typeof m=="string"||typeof f=="string"){if(i==="+")return(m=p.exists(m)?m:"")+(p.exists(f)?f:"")}else switch(i){case"^":return Math.pow(m,f);case"*":return m*f;case"/":return m/f;case"%":return m%f;case"+":return m+f;case"-":return m-f}switch(i){case"<":return m<f;case"<=":return m<=f;case">":return m>f;case">=":return m>=f;case"==":return m===f;case"!=":return m!==f;case"&&":return m&&f;case"||":return m||f}return null},p.exists=function(i){return i!=null}},9926:()=>{},5688:()=>{},9708:()=>{},1152:()=>{},443:()=>{},9848:()=>{},5934:_=>{_.exports=JSON.parse('{"version":"17.13.3"}')}},C={},function _(j){var p=C[j];if(p!==void 0)return p.exports;var i=C[j]={exports:{}};return O[j](i,i.exports,_),i.exports}(5107);var O,C})}(Ye)),Ye.exports}var Ae={},Lt;function gn(){if(Lt)return Ae;Lt=1;var v=Ae&&Ae.__importDefault||function(C){return C&&C.__esModule?C:{default:C}};Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.BNExtension=O;const R=v(Ks());function O(C){return{type:"BN",base:C.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(_,j){try{return{value:new R.default(_)}}catch{return{errors:j.error("bn.nan")}}},coerce(_){return{value:_.toString(10)}},validate(_){return{value:_}},rules:{gt:{args:[{name:"threshold",ref:!0,assert:_=>R.default.isBN(_),message:"must be a big number",normalize:_=>new R.default(_)},{name:"equal",assert:_=>typeof _=="boolean",message:"must be a boolean"}],validate(_,j,p){const i=new R.default(_);return p.equal&&i.lt(p.threshold)?j.error("bn.min",p):!p.equal&&i.lte(p.threshold)?j.error("bn.greater",p):_}},lt:{args:[{name:"threshold",ref:!0,assert:_=>R.default.isBN(_),message:"must be a big number",normalize:_=>new R.default(_)},{name:"equal",assert:_=>typeof _=="boolean",message:"must be a boolean"}],validate(_,j,p){const i=new R.default(_);return p.equal&&i.gt(p.threshold)?j.error("bn.max",p):!p.equal&&i.gte(p.threshold)?j.error("bn.less",p):_}},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 Pe={},qt;function yn(){if(qt)return Pe;qt=1;var v=Pe&&Pe.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(Pe,"__esModule",{value:!0}),Pe.DIDExtension=j;const R=v(Gs),O=Ys(),C=Xs(),_={pk:Object.keys(O.types.KeyType),hash:Object.keys(O.types.HashType),role:Object.keys(O.types.RoleType)};function j(p){return{type:"DID",base:p.string().trim(),messages:{"did.empty":"Expect {{#label}} to be non-empty string","did.invalid":"Expect {{#label}} to be valid did","did.wallet":'Expect wallet type of {{#label}} to be "{{#expected}}" wallet',"did.pk":'Expect pk type of {{#label}} to be "{{#expected}}"',"did.hash":'Expect hash type of {{#label}} to be "{{#expected}}"',"did.role":'Expect role type of {{#label}} to be "{{#expected}}"',"did.prefix":'Expect prefix of {{#label}} to be "{{#expected}}"'},validate(i,m){return!i||typeof i!="string"?{errors:m.error("did.empty",{value:i})}:(0,C.isValid)(i)===!1?{errors:m.error("did.invalid",{value:i})}:{value:i}},rules:{type:{args:[{name:"key",ref:!0,assert:i=>Object.keys(_).includes(i),message:`must be one of ${Object.keys(_).join(", ")}`},{name:"expected",assert:i=>Object.keys(_).some(m=>_[m].includes(i)),message:"must be valid type"}],validate(i,m,f){const h=(0,C.toTypeInfoStr)(i);return f.key==="pk"&&h.pk!==f.expected?m.error("did.pk",{...f,actual:h.pk}):f.key==="hash"&&h.hash!==f.expected?m.error("did.hash",{...f,actual:h.hash}):f.key==="role"&&h.role!==f.expected?m.error("did.role",{...f,actual:h.role}):i}},pk:{method(i){return this.$_addRule({name:"type",args:{key:"pk",expected:i}})}},hash:{method(i){return this.$_addRule({name:"type",args:{key:"hash",expected:i}})}},role:{method(i){return this.$_addRule({name:"type",args:{key:"role",expected:i}})}},wallet:{method(i){return this.$_addRule({name:"wallet",args:{type:i}})},args:[{name:"type",ref:!0,assert:i=>["arcblock","ethereum","default","eth","passkey"].includes(i),message:"must be a string",normalize:i=>i.trim()}],validate(i,m,f={}){const h=(0,C.toTypeInfo)(i),t=(0,C.toTypeInfoStr)(i);return["ethereum","eth"].includes(f.type)&&(0,R.default)(h,C.DID_TYPE_ETHEREUM)===!1?m.error("did.wallet",{expected:f.type,actual:JSON.stringify(t)}):["arcblock","default"].includes(f.type)&&(0,R.default)(h,C.DID_TYPE_ARCBLOCK)===!1?m.error("did.wallet",{expected:f.type,actual:JSON.stringify(t)}):["passkey"].includes(f.type)&&(0,R.default)(h,C.DID_TYPE_PASSKEY)===!1?m.error("did.wallet",{expected:f.type,actual:JSON.stringify(t)}):i}},prefix:{method(i=""){return this.$_addRule({name:"prefix",args:{str:i}})},args:[{name:"str",ref:!0,assert:i=>["",C.DID_PREFIX].includes(i),message:"must be a string",normalize:i=>i.trim()}],validate(i,m,f={}){return f.str&&i.startsWith(f.str)===!1?m.error("did.prefix",{expected:f.str}):!f.str&&(0,C.toAddress)(i)!==i?m.error("did.prefix",{expected:f.str}):i}}}}}return Pe}var Mt;function xn(){return Mt||(Mt=1,function(v){var R=Me&&Me.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(v,"__esModule",{value:!0}),v.patterns=v.schemas=v.Joi=void 0;const O=R(pn()),C=gn(),_=yn();v.Joi=O.default.extend(_.DIDExtension).extend(C.BNExtension);const j=/^(0x)?([A-Fa-f0-9]{64})$/,p=v.Joi.object({genesisTime:v.Joi.date().iso().required().raw(),genesisTx:v.Joi.string().regex(j).required().allow(""),renaissanceTime:v.Joi.date().iso().required().raw(),renaissanceTx:v.Joi.string().regex(j).required().allow("")}),i=v.Joi.object({address:v.Joi.DID().prefix().role("ROLE_TOKEN").required(),value:v.Joi.BN().min(0).required()}),m=v.Joi.object({name:v.Joi.string().min(1).max(256).required(),value:v.Joi.string().min(1).max(1024).required(),description:v.Joi.string().min(1).max(256).optional().allow(""),required:v.Joi.boolean().optional().default(!1)}),f=v.Joi.alternatives().try(v.Joi.DID().prefix().role("ROLE_ACCOUNT"),v.Joi.DID().prefix().role("ROLE_APPLICATION"),v.Joi.DID().prefix().role("ROLE_BLOCKLET"),v.Joi.DID().prefix().wallet("ethereum"),v.Joi.DID().prefix().wallet("passkey")),h=v.Joi.array().items(v.Joi.object({owner:f.required(),tokensList:v.Joi.array().items(i).default([]),assetsList:v.Joi.array().items(v.Joi.DID().prefix().role("ROLE_ASSET")).default([])})),t=v.Joi.array().items({signer:v.Joi.DID().prefix().required(),pk:v.Joi.any().required(),signature:v.Joi.any().required(),delegator:v.Joi.DID().prefix().valid("").optional(),data:v.Joi.any().optional()}),l=v.Joi.object({type:v.Joi.string().min(1).max(32).required(),contractAddress:v.Joi.DID().prefix().wallet("ethereum").required(),chainType:v.Joi.string().min(1).max(32).required(),chainName:v.Joi.string().min(1).max(32).required(),chainId:v.Joi.number().positive().required()}),o=v.Joi.object({type:v.Joi.string().valid("svg","url","uri").required(),content:v.Joi.string().when("type",{is:"uri",then:v.Joi.string().max(20480).dataUri().required()}).when("type",{is:"url",then:v.Joi.string().max(2048).uri({scheme:["http","https"]}).required()})}),r=v.Joi.object({id:v.Joi.string().max(2048).uri({scheme:["http","https"]}).required(),scope:v.Joi.string().valid("public","private").default("public")}),s=v.Joi.object({id:v.Joi.DID().prefix().required(),pk:v.Joi.string().required(),name:v.Joi.string().min(1).max(256).required()}),c={address:v.Joi.DID().prefix().role("ROLE_ASSET").required(),moniker:v.Joi.string().min(2).max(255).required(),data:v.Joi.any().required(),readonly:v.Joi.boolean().default(!1),transferrable:v.Joi.boolean().default(!1),ttl:v.Joi.number().min(0).default(0),parent:v.Joi.DID().prefix().optional().allow(""),issuer:v.Joi.DID().prefix().optional().allow(""),endpoint:r.optional().allow(null).default(null),display:o.optional().allow(null).default(null),tags:v.Joi.array().items(v.Joi.string().min(1).max(64)).max(4).optional()},n={address:v.Joi.DID().prefix().role("ROLE_FACTORY").required(),name:v.Joi.string().min(2).max(255).required(),description:v.Joi.string().min(2).max(255).required(),settlement:v.Joi.string().valid("instant","periodic").default("instant"),limit:v.Joi.number().integer().min(0).default(0),trustedIssuers:v.Joi.array().items(v.Joi.DID().prefix()).max(8).optional(),data:v.Joi.any().optional().allow(null).default(null),display:o.optional().allow(null).default(null),input:v.Joi.object({value:v.Joi.BN().positive().min("0").default("0"),tokens:v.Joi.array().items(i).max(8).optional(),assets:v.Joi.array().items(v.Joi.alternatives().try(v.Joi.DID().prefix().role("ROLE_ASSET"),v.Joi.DID().prefix().role("ROLE_FACTORY"))).max(8).optional(),variables:v.Joi.array().items(v.Joi.object({name:v.Joi.string().min(1).max(255).required(),description:v.Joi.string().max(255).optional().allow(""),required:v.Joi.boolean().required()})).optional()}),output:v.Joi.object({moniker:v.Joi.string().min(2).max(255).required(),data:v.Joi.any().required(),readonly:v.Joi.boolean().default(!1),transferrable:v.Joi.boolean().default(!1),ttl:v.Joi.number().min(0).default(0),parent:v.Joi.string().max(255).required(),issuer:v.Joi.string().max(255).required(),endpoint:r.optional(),display:o.optional(),tags:v.Joi.array().items(v.Joi.string().min(1).max(64)).max(4).optional()}),hooks:v.Joi.array().items(v.Joi.object({name:v.Joi.string().valid("mint","postMint","preMint").required(),type:v.Joi.string().valid("url","contract").required(),hook:v.Joi.string().min(1).max(4096).required(),compiled:v.Joi.array().items(v.Joi.object()).optional()})).optional()};v.schemas={context:p,tokenInput:i,multiInput:h,multiSig:t,foreignToken:l,variableInput:m,nftDisplay:o,nftEndpoint:r,nftIssuer:s,tokenHolder:f,assetProps:c,assetSchema:v.Joi.object(c).options({stripUnknown:!0,noDefaults:!1}),factoryProps:n,factorySchema:v.Joi.object(n).options({stripUnknown:!0,noDefaults:!1})},v.patterns={txHash:j}}(Me)),Me}var vn=xn();function fs({onCancel:v,onSuccess:R,blocklet:O}){const{vaults:C=[],appPid:_}=O,{t:j,locale:p}=oe(),{connectApi:i}=Nt(),{api:m}=ne(),{teamDid:f}=Ve(),[h,t]=gt({loading:!1,fetching:!1,error:"",address:"",fetched:[],errored:[]});q.useEffect(()=>{if(!je.isValid(h.address))return;const c=je.toAddress(h.address),n=h.fetched.find(u=>u.address===c),a=h.errored.find(u=>u.address===c);!h.fetching&&!n&&!a&&(t({fetching:!0}),Pr(J.MAIN_CHAIN_ENDPOINT).getAccountState({address:c}).then(g=>{g.state?t({fetching:!1,fetched:[...h.fetched.filter(y=>y.address!==c),g.state]}):t({fetching:!1,errored:[...h.errored.filter(y=>y.address!==c),{address:c}]})}).catch(g=>{console.error(g),t({fetching:!1,error:at(g)})}))},[h.address,h.fetching]),q.useEffect(()=>{if(h.address){const c=je.toAddress(h.address);if(!je.isValid(c)){t({error:j("blocklet.config.vault.error.invalid")});return}if(vn.schemas.tokenHolder.validate(c).error){t({error:j("blocklet.config.vault.error.holder")});return}if(C.find(a=>a.did===c)){t({error:j("blocklet.config.vault.error.duplicate")});return}if(Qs([O.appDid,O.appPid,...O.migratedFrom.map(a=>a.appDid)].filter(Boolean)).includes(c)){t({error:j("blocklet.config.vault.error.appDid")});return}}t({error:""})},[h.address]);const l=async()=>{t({loading:!0});try{const c=await m.configVault({input:{teamDid:f,vaultDid:je.toAddress(h.address)}});i.open({locale:p,action:"approve-vault",forceConnected:!1,saveConnect:!1,autoConnect:!1,className:"connect",checkTimeout:10*60*1e3,passkeyBehavior:"none",extraParams:{sessionId:c.sessionId},messages:{title:j("blocklet.config.vault.approve.title"),scan:j(`blocklet.config.vault.approve.${C.length>0?"byLast":"byOwner"}`),confirm:j("blocklet.config.vault.approve.confirm"),success:j("blocklet.config.vault.approve.success")},onSuccess:()=>{i.open({locale:p,action:"config-vault",forceConnected:!1,saveConnect:!1,autoConnect:!1,className:"connect",checkTimeout:10*60*1e3,passkeyBehavior:"none",extraParams:{sessionId:c.sessionId},messages:{title:j("blocklet.config.vault.commit.title"),scan:j("blocklet.config.vault.commit.scan"),confirm:j("blocklet.config.vault.commit.confirm"),success:j("blocklet.config.vault.commit.success")},onSuccess:()=>{t({loading:!1}),R()},onClose:()=>{t({loading:!1}),i.close()}})},onClose:()=>{t({loading:!1}),i.close()}})}catch(c){t({loading:!1,error:at(c)})}},o=je.toAddress(h.address),r=[];je.isValid(o)&&r.push({key:j("blocklet.config.vault.role"),value:e.jsx(ft,{color:"primary",variant:"outlined",size:"small",label:je.toTypeInfoStr(o).role||"-"})});const s=h.fetched.find(c=>c.address===o);return s&&r.push({key:j("blocklet.config.vault.firstSeen"),value:St(s.context?.genesisTime,"-")},{key:j("blocklet.config.vault.lastSeen"),value:St(s.context?.renaissanceTime,"-")},{key:j("blocklet.config.vault.migratedFrom"),value:s.migratedFrom.length?s.migratedFrom.map(c=>e.jsx(it,{did:c,showQrcode:!0,compact:!0,size:14,locale:p},c)):"-"},{key:j("blocklet.config.vault.migratedTo"),value:s.migratedTo.length?s.migratedTo.map(c=>e.jsx(it,{did:c,showQrcode:!0,compact:!0,size:14,locale:p},c)):"-"}),e.jsx(ke,{open:!0,fullWidth:!0,showCloseButton:!1,onClose:v,title:e.jsxs($,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(rs,{}),j("blocklet.config.vault.title")]}),actions:e.jsxs(e.Fragment,{children:[e.jsx(re,{onClick:v,children:j("common.cancel")}),e.jsx(re,{onClick:l,variant:"contained",disabled:!!h.error||h.loading,children:j("common.confirm")})]}),children:e.jsxs(ie,{direction:"column",spacing:3,children:[e.jsxs(Y,{variant:"body1",gutterBottom:!0,sx:{color:"text.secondary"},children:[j("blocklet.config.vault.desc")," ",j("blocklet.config.vault.tip")]}),C.length>0&&e.jsxs($,{children:[e.jsxs(Y,{variant:"body1",gutterBottom:!0,sx:{color:"text.secondary"},children:[j("blocklet.config.vault.current"),":"]}),e.jsxs($,{sx:{display:"flex",alignItems:"center",gap:.5},children:[e.jsx(er,{did:C[C.length-1].did,showQrcode:!0,style:{width:"auto"}}),e.jsx(Tr,{vaults:C,appPid:_})]})]}),e.jsx(U,{fullWidth:!0,"data-cy":"input-factory-address",label:j("blocklet.config.vault.address"),error:!!h.error,helperText:h.error,value:h.address,onChange:c=>{t({address:c.target.value,error:""})},slotProps:{input:{endAdornment:h.fetching?e.jsx(Vt,{position:"end",children:e.jsx(Ee,{size:16})}):null}}}),e.jsx($,{sx:{"& .info-row__name":{fontSize:"14px"},"& .info-row__value":{fontSize:"14px"}},children:r.map(c=>e.jsx(Qt,{valueComponent:"div",nameWidth:120,name:c.key,children:c.value},c.key))})]})})}fs.propTypes={onCancel:T.func.isRequired,onSuccess:T.func.isRequired,blocklet:T.object.isRequired};function xt({blocklet:v,onUpdate:R=()=>{},hasPermission:O=!1}){const{info:C,api:_,inService:j}=ne(),{t:p,locale:i}=q.useContext(ue),[m,f]=gt({loading:!1,showTransferOwner:!1,showConfigVault:!1}),[h,t]=q.useState(()=>v?.settings?.gateway?.wafPolicy?.enabled??!0),[l,o]=q.useState(()=>!!v?.settings?.enableSessionHardening),[r,s]=q.useState(()=>!!v?.settings?.invite?.enabled),[c,n]=q.useState(()=>{const I=v?.settings?.org||{};return{enabled:I.enabled||!1,maxMemberPerOrg:I.maxMemberPerOrg||100,maxOrgPerUser:I.maxOrgPerUser||10}}),a=m.loading||!O,{did:u}=v.meta,g=j?window.env?.gateway?.wafPolicy?.enabled:C?.routing.wafPolicy?.enabled;if(pt(v.status))return null;const y=v.environments.find(I=>I.key===W.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_DELETABLE),k=!y||y.value==="yes",d=v.environments.find(I=>I.key===W.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_TENANT_MODE)?.value||W.BLOCKLET_TENANT_MODES.SINGLE,x=(I,B)=>async F=>{if(!m.loading){f({loading:!0});try{const{checked:K}=F.target,{blocklet:he}=await _.configBlocklet({input:{did:v.meta.did,configs:[{key:W.BLOCKLET_CONFIGURABLE_KEY[I],value:B(K)}]}});R(he)}catch(K){Z.error(K.message)}finally{f({loading:!1})}}},b=x("BLOCKLET_DELETABLE",I=>I?"no":"yes"),S=x("BLOCKLET_APP_TENANT_MODE",I=>I?W.BLOCKLET_TENANT_MODES.MULTIPLE:W.BLOCKLET_TENANT_MODES.SINGLE),A=(I,B)=>async F=>{if(!m.loading){f({loading:!0});try{const K=F.target.checked;await _.updateBlockletSettings({input:I(K)}),B&&B(K)}catch(K){Z.error(K.message)}finally{f({loading:!1})}}},P=A(I=>({did:v.meta.did,invite:{enabled:I}}),s),L=A(I=>({did:v.meta.did,org:{enabled:I,maxMemberPerOrg:100,maxOrgPerUser:10}}),I=>{n({...c,enabled:I})}),D=async(I,B)=>{if(!m.loading){f({loading:!0});try{await _.updateBlockletSettings({input:{did:v.meta.did,org:{...c,[I]:B}}}),n({...c,[I]:B})}catch(F){Z.error(F.message)}finally{f({loading:!1})}}},N=A(I=>({did:v.meta.did,gateway:{wafPolicy:{enabled:I}}}),t),V=A(I=>({did:v.meta.did,enableSessionHardening:I}),I=>{o(I),tr()}),z=async()=>{if(!m.loading){f({loading:!0});try{const{blocklet:I}=await _.getBlocklet({input:{did:v.meta.did}});R(I)}catch(I){Z.error(I.message)}finally{f({loading:!1})}}};return e.jsxs(ie,{p:3,sx:{border:"1px solid red",borderRadius:2,p:3},className:"advanced-config",children:[!j&&e.jsxs(e.Fragment,{children:[e.jsx(M,{title:p("blocklet.config.deletable.name"),desc:p(k?"blocklet.config.deletable.disable":"blocklet.config.deletable.enable"),children:e.jsx($,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(pe,{disabled:a,checked:!k,defaultChecked:!0,onChange:b})})}),e.jsx($,{className:"config-form",component:G,sx:{my:3}})]}),e.jsx(us,{inService:j,disabled:a,loading:m.loading,onChange:z}),e.jsx($,{className:"config-form",component:G,sx:{my:3}}),j&&e.jsx(wr,{role:"owner",children:I=>(I||mn)&&e.jsxs(e.Fragment,{children:[e.jsx(M,{title:p("blocklet.config.vault.title"),desc:p("blocklet.config.vault.desc"),children:e.jsx($,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsxs(re,{variant:"contained",color:"primary",size:"small","data-cy":"config-vault",onClick:()=>f({showConfigVault:!0}),children:[e.jsx(rs,{style:{fontSize:"1.3em",marginRight:4}}),p("blocklet.config.vault.title")]})})}),e.jsx($,{className:"config-form",component:G,sx:{my:3}}),m.showConfigVault&&e.jsx(fs,{blocklet:v,onCancel:()=>f({showConfigVault:!1}),onSuccess:()=>f({showConfigVault:!1})}),e.jsx(M,{title:p("team.transferApp.name"),desc:p("team.transferApp.description"),children:e.jsx($,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsxs(re,{variant:"contained",edge:"end",color:"primary",size:"small","data-cy":"transfer-app",onClick:()=>f({showTransferOwner:!0}),children:[e.jsx(Xr,{style:{fontSize:"1.3em",marginRight:4}}),p("team.transferApp.name")]})})}),e.jsx($,{className:"config-form",component:G,sx:{my:3}}),m.showTransferOwner&&e.jsx(hs,{onCancel:()=>f({showTransferOwner:!1}),onSuccess:()=>f({showTransferOwner:!1})})]})}),e.jsx(M,{title:p("blocklet.config.clearCache.name"),desc:p("blocklet.config.clearCache.purpose"),children:e.jsx($,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(Rr,{teamDid:u})})}),e.jsx($,{className:"config-form",component:G,sx:{my:3}}),e.jsx(M,{title:p("blocklet.config.rotateSessionKey.name"),desc:p("blocklet.config.rotateSessionKey.purpose"),children:e.jsx($,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(Or,{style:{whiteSpace:"nowrap"},teamDid:u})})}),e.jsx($,{className:"config-form",component:G,sx:{my:3}}),e.jsx(M,{title:p("blocklet.config.tenantMode.name"),desc:p(`blocklet.config.tenantMode.${d}`),children:e.jsx($,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(pe,{disabled:a,checked:d===W.BLOCKLET_TENANT_MODES.MULTIPLE,onChange:S})})}),e.jsx($,{className:"config-form",component:G,sx:{my:3}}),e.jsx(M,{title:p("team.invite.setting"),desc:p(`team.invite.${r?"enabled":"disabled"}`),children:e.jsx($,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(pe,{disabled:a,checked:r,onChange:P})})}),e.jsx($,{className:"config-form",component:G,sx:{my:3}}),e.jsx(M,{title:e.jsxs(ie,{direction:"row",sx:{alignItems:"center",gap:1},children:[p("setting.form.enableSessionHardening.switchLabel"),e.jsx(te,{title:p("setting.form.enableSessionHardening.switchTips"),children:e.jsx(Ct,{sx:{ml:.5,fontSize:"20px"},color:"primary"})})]}),children:e.jsx($,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(pe,{disabled:a,checked:l,onChange:V})})}),g&&e.jsxs(e.Fragment,{children:[e.jsx($,{className:"config-form",component:G,sx:{my:3}}),e.jsx(M,{title:e.jsxs(ie,{direction:"row",sx:{alignItems:"center",gap:1},children:[p("router.gateway.wafPolicy.title"),e.jsx(te,{title:e.jsx($,{sx:{fontSize:"14px",lineHeight:1.5},children:e.jsx($,{sx:{color:"common.white",ml:.5},component:"a",href:`https://www.arcblock.io/docs/blocklet-developer/${i}/enable-web-application-firewall`,target:"_blank",rel:"noopener noreferrer",children:p("dashboard.document")})}),children:e.jsx(Ct,{fontSize:"small",color:"action",sx:{fontSize:16,cursor:"pointer"}})})]}),desc:p("router.gateway.wafPolicy.switchLabel"),children:e.jsx($,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(pe,{disabled:a,checked:h,onChange:N})})})]}),e.jsx($,{className:"config-form",component:G,sx:{my:3}}),e.jsx(M,{title:e.jsx(ie,{direction:"row",sx:{alignItems:"center",gap:1},children:p("common.orgs")}),desc:p("team.orgs.explain"),children:e.jsxs($,{sx:{display:"flex",flexDirection:"column",gap:2,width:"100%",alignSelf:{xs:"flex-start",md:"flex-end"}},children:[e.jsx(pe,{disabled:a,checked:c.enabled,onChange:L}),c.enabled&&e.jsxs($,{sx:{display:"flex",flexDirection:"column",gap:1,minWidth:400,mt:1},children:[e.jsx(lt,{style:{marginTop:0},disabled:a,loading:m.loading,type:"number",min:2,initialValue:c.maxOrgPerUser,label:p("team.orgs.invite.maxOrgs"),placeholder:p("team.orgs.invite.maxOrgs"),onSubmit:I=>D("maxOrgPerUser",I)}),e.jsx(lt,{style:{marginTop:0},disabled:a,loading:m.loading,type:"number",min:2,initialValue:c.maxMemberPerOrg,label:p("team.orgs.invite.maxMembers"),placeholder:p("team.orgs.invite.maxMembers"),onSubmit:I=>D("maxMemberPerOrg",I)})]})]})})]})}const bn=Ie(xt,"mutate_blocklets"),jn=Ie(xt,"",mt);function _n(v){const{inService:R}=ne();return R?e.jsx(jn,{...v}):e.jsx(bn,{...v})}xt.propTypes={blocklet:T.object.isRequired,onUpdate:T.func,hasPermission:T.bool};function vt({blocklet:v,onUpdate:R=()=>{},hasPermission:O=!1,...C}){const{t:_}=q.useContext(ue);return pt(v.status)?null:e.jsxs(Cn,{...C,children:[e.jsx(un,{blocklet:v,onUpdate:R,hasPermission:O}),e.jsx($,{sx:{mt:6},children:e.jsx(Y,{variant:"h6",sx:{fontWeight:600},children:_("blocklet.config.dangerZone")})}),e.jsx($,{className:"config-form",component:G,sx:{my:3}}),e.jsx($,{sx:{maxWidth:1536},children:e.jsx(_n,{blocklet:v,onUpdate:R,hasPermission:O})})]})}const wn=Ie(vt,"mutate_blocklets"),kn=Ie(vt,"",mt);function Sn(v){const{inService:R}=ne();return R?e.jsx(kn,{...v}):e.jsx(wn,{...v})}vt.propTypes={blocklet:T.object.isRequired,onUpdate:T.func,hasPermission:T.bool};const Cn=xe($)`
50
+ `;var Me={},Ye={exports:{}},Dt;function pn(){return Dt||(Dt=1,function(v,R){(function(O,C){v.exports=C()})(self,()=>{return O={7629:(_,j,p)=>{const a=p(375),m=p(8571),f=p(9474),h=p(1687),t=p(8652),l=p(8160),o=p(3292),r=p(6354),s=p(8901),c=p(9708),n=p(6914),i=p(2294),u=p(6133),g=p(1152),y=p(8863),k=p(2036),w={Base:class{constructor(d){this.type=d,this.$_root=null,this._definition={},this._reset()}_reset(){this._ids=new i.Ids,this._preferences=null,this._refs=new u.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 a(typeof c.describe=="function","Manifest functionality disabled"),c.describe(this)}allow(...d){return l.verifyFlat(d,"allow"),this._values(d,"_valids")}alter(d){a(d&&typeof d=="object"&&!Array.isArray(d),"Invalid targets argument"),a(!this._inRuleset(),"Cannot set alterations inside a ruleset");const x=this.clone();x.$_terms.alterations=x.$_terms.alterations||[];for(const b in d){const S=d[b];a(typeof S=="function","Alteration adjuster for",b,"must be a function"),x.$_terms.alterations.push({target:b,adjuster:S})}return x.$_temp.ruleset=!1,x}artifact(d){return a(d!==void 0,"Artifact cannot be undefined"),a(!this._cache,"Cannot set an artifact with a rule cache"),this.$_setFlag("artifact",d)}cast(d){return a(d===!1||typeof d=="string","Invalid to value"),a(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,x){return this._default("default",d,x)}description(d){return a(d&&typeof d=="string","Description must be a non-empty string"),this.$_setFlag("description",d)}empty(d){const x=this.clone();return d!==void 0&&(d=x.$_compile(d,{override:!1})),x.$_setFlag("empty",d,{clone:!1})}error(d){return a(d,"Missing error"),a(d instanceof Error||typeof d=="function","Must provide a valid Error object or a function"),this.$_setFlag("error",d)}example(d,x={}){return a(d!==void 0,"Missing example"),l.assertOptions(x,["override"]),this._inner("examples",d,{single:!0,override:x.override})}external(d,x){return typeof d=="object"&&(a(!x,"Cannot combine options with description"),x=d.description,d=d.method),a(typeof d=="function","Method must be a function"),a(x===void 0||x&&typeof x=="string","Description must be a non-empty string"),this._inner("externals",{method:d,description:x},{single:!0})}failover(d,x){return this._default("failover",d,x)}forbidden(){return this.presence("forbidden")}id(d){return d?(a(typeof d=="string","id must be a non-empty string"),a(/^[^\.]+$/.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 a(d&&typeof d=="string","Label name must be a non-empty string"),this.$_setFlag("label",d)}meta(d){return a(d!==void 0,"Meta cannot be undefined"),this._inner("metas",d,{single:!0})}note(...d){a(d.length,"Missing notes");for(const x of d)a(x&&typeof x=="string","Notes must be non-empty strings");return this._inner("notes",d)}only(d=!0){return a(typeof d=="boolean","Invalid mode:",d),this.$_setFlag("only",d)}optional(){return this.presence("optional")}prefs(d){a(d,"Missing preferences"),a(d.context===void 0,"Cannot override context"),a(d.externals===void 0,"Cannot override externals"),a(d.warnings===void 0,"Cannot override warnings"),a(d.debug===void 0,"Cannot override debug"),l.checkPreferences(d);const x=this.clone();return x._preferences=l.preferences(x._preferences,d),x}presence(d){return a(["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 a(["raw","strip"].includes(d),"Unknown result mode",d),this.$_setFlag("result",d)}required(){return this.presence("required")}strict(d){const x=this.clone(),b=d!==void 0&&!d;return x._preferences=l.preferences(x._preferences,{convert:b}),x}strip(d=!0){return this.$_setFlag("result",d?"strip":void 0)}tag(...d){a(d.length,"Missing tags");for(const x of d)a(x&&typeof x=="string","Tags must be non-empty strings");return this._inner("tags",d)}unit(d){return a(d&&typeof d=="string","Unit name must be a non-empty string"),this.$_setFlag("unit",d)}valid(...d){l.verifyFlat(d,"valid");const x=this.allow(...d);return x.$_setFlag("only",!!x._valids,{clone:!1}),x}when(d,x){const b=this.clone();b.$_terms.whens||(b.$_terms.whens=[]);const S=o.when(b,d,x);if(!["any","link"].includes(b.type)){const A=S.is?[S]:S.switch;for(const P of A)a(!P.then||P.then.type==="any"||P.then.type===b.type,"Cannot combine",b.type,"with",P.then&&P.then.type),a(!P.otherwise||P.otherwise.type==="any"||P.otherwise.type===b.type,"Cannot combine",b.type,"with",P.otherwise&&P.otherwise.type)}return b.$_terms.whens.push(S),b.$_mutateRebuild()}cache(d){a(!this._inRuleset(),"Cannot set caching inside a ruleset"),a(!this._cache,"Cannot override schema cache"),a(this._flags.artifact===void 0,"Cannot cache a rule with an artifact");const x=this.clone();return x._cache=d||t.provider.provision(),x.$_temp.ruleset=!1,x}clone(){const d=Object.create(Object.getPrototypeOf(this));return this._assign(d)}concat(d){a(l.isSchema(d),"Invalid schema object"),a(this.type==="any"||d.type==="any"||d.type===this.type,"Cannot merge type",this.type,"with another type:",d.type),a(!this._inRuleset(),"Cannot concatenate onto a schema with open ruleset"),a(!d._inRuleset(),"Cannot concatenate a schema with open ruleset");let x=this.clone();if(this.type==="any"&&d.type!=="any"){const b=d.clone();for(const S of Object.keys(x))S!=="type"&&(b[S]=x[S]);x=b}x._ids.concat(d._ids),x._refs.register(d,u.toSibling),x._preferences=x._preferences?l.preferences(x._preferences,d._preferences):d._preferences,x._valids=k.merge(x._valids,d._valids,d._invalids),x._invalids=k.merge(x._invalids,d._invalids,d._valids);for(const b of d._singleRules.keys())x._singleRules.has(b)&&(x._rules=x._rules.filter(S=>S.keep||S.name!==b),x._singleRules.delete(b));for(const b of d._rules)d._definition.rules[b.method].multi||x._singleRules.set(b.name,b),x._rules.push(b);if(x._flags.empty&&d._flags.empty){x._flags.empty=x._flags.empty.concat(d._flags.empty);const b=Object.assign({},d._flags);delete b.empty,h(x._flags,b)}else if(d._flags.empty){x._flags.empty=d._flags.empty;const b=Object.assign({},d._flags);delete b.empty,h(x._flags,b)}else h(x._flags,d._flags);for(const b in d.$_terms){const S=d.$_terms[b];S?x.$_terms[b]?x.$_terms[b]=x.$_terms[b].concat(S):x.$_terms[b]=S.slice():x.$_terms[b]||(x.$_terms[b]=S)}return this.$_root._tracer&&this.$_root._tracer._combine(x,[this,d]),x.$_mutateRebuild()}extend(d){return a(!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,x){a(!this._inRuleset(),"Cannot fork inside a ruleset");let b=this;for(let S of[].concat(d))S=Array.isArray(S)?S:S.split("."),b=b._ids.fork(S,x,b);return b.$_temp.ruleset=!1,b}rule(d){const x=this._definition;l.assertOptions(d,Object.keys(x.modifiers)),a(this.$_temp.ruleset!==!1,"Cannot apply rules to empty ruleset or the last rule added does not support rule properties");const b=this.$_temp.ruleset===null?this._rules.length-1:this.$_temp.ruleset;a(b>=0&&b<this._rules.length,"Cannot apply rules to empty ruleset");const S=this.clone();for(let A=b;A<S._rules.length;++A){const P=S._rules[A],L=m(P);for(const D in d)x.modifiers[D](L,d[D]),a(L.name===P.name,"Cannot change rule name");S._rules[A]=L,S._singleRules.get(L.name)===P&&S._singleRules.set(L.name,L)}return S.$_temp.ruleset=!1,S.$_mutateRebuild()}get ruleset(){a(!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),a(!this._inRuleset(),"Cannot tailor inside a ruleset");let x=this;if(this.$_terms.alterations)for(const{target:b,adjuster:S}of this.$_terms.alterations)d.includes(b)&&(x=S(x),a(l.isSchema(x),"Alteration adjuster for",b,"failed to return a schema object"));return x=x.$_modify({each:b=>b.tailor(d),ref:!1}),x.$_temp.ruleset=!1,x.$_mutateRebuild()}tracer(){return g.location?g.location(this):this}validate(d,x){return y.entry(d,this,x)}validateAsync(d,x){return y.entryAsync(d,this,x)}$_addRule(d){typeof d=="string"&&(d={name:d}),a(d&&typeof d=="object","Invalid options"),a(d.name&&typeof d.name=="string","Invalid rule name");for(const P in d)a(P[0]!=="_","Cannot set private rule properties");const x=Object.assign({},d);x._resolve=[],x.method=x.method||x.name;const b=this._definition.rules[x.method],S=x.args;a(b,"Unknown rule",x.method);const A=this.clone();if(S){a(Object.keys(S).length===1||Object.keys(S).length===this._definition.rules[x.name].args.length,"Invalid rule definition for",this.type,x.name);for(const P in S){let L=S[P];if(b.argsByName){const D=b.argsByName.get(P);if(D.ref&&l.isResolvable(L))x._resolve.push(P),A.$_mutateRegister(L);else if(D.normalize&&(L=D.normalize(L),S[P]=L),D.assert){const N=l.validateArg(L,P,D);a(!N,N,"or reference")}}L!==void 0?S[P]=L:delete S[P]}}return b.multi||(A._ruleRemove(x.name,{clone:!1}),A._singleRules.set(x.name,x)),A.$_temp.ruleset===!1&&(A.$_temp.ruleset=null),b.priority?A._rules.unshift(x):A._rules.push(x),A}$_compile(d,x){return o.schema(this.$_root,d,x)}$_createError(d,x,b,S,A,P={}){const L=P.flags!==!1?this._flags:{},D=P.messages?n.merge(this._definition.messages,P.messages):this._definition.messages;return new r.Report(d,x,b,L,D,S,A)}$_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,x,b,S){(b=Object.assign({},b)).abortEarly=!0,b._externals=!1,x.snapshot();const A=!y.validate(d,this,x,b,S).errors;return x.restore(),A}$_modify(d){return l.assertOptions(d,["each","once","ref","schema"]),i.schema(this,d)||this}$_mutateRebuild(){return a(!this._inRuleset(),"Cannot add this rule inside a ruleset"),this._refs.reset(),this._ids.reset(),this.$_modify({each:(d,{source:x,name:b,path:S,key:A})=>{const P=this._definition[x][b]&&this._definition[x][b].register;P!==!1&&this.$_mutateRegister(d,{family:P,key:A})}}),this._definition.rebuild&&this._definition.rebuild(this),this.$_temp.ruleset=!1,this}$_mutateRegister(d,{family:x,key:b}={}){this._refs.register(d,x),this._ids.register(d,{key:b})}$_property(d){return this._definition.properties[d]}$_reach(d){return this._ids.reach(d)}$_rootReferences(){return this._refs.roots()}$_setFlag(d,x,b={}){a(d[0]==="_"||!this._inRuleset(),"Cannot set flag inside a ruleset");const S=this._definition.flags[d]||{};if(f(x,S.default)&&(x=void 0),f(x,this._flags[d]))return this;const A=b.clone!==!1?this.clone():this;return x!==void 0?(A._flags[d]=x,A.$_mutateRegister(x)):delete A._flags[d],d[0]!=="_"&&(A.$_temp.ruleset=!1),A}$_parent(d,...x){return this[d][l.symbols.parent].call(this,...x)}$_validate(d,x,b){return y.validate(d,this,x,b)}_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=m(this._singleRules,{shallow:!0}),d._refs=this._refs.clone(),d._flags=Object.assign({},this._flags),d._cache=null,d.$_terms={};for(const x in this.$_terms)d.$_terms[x]=this.$_terms[x]?this.$_terms[x].slice():null;d.$_super={};for(const x in this.$_super)d.$_super[x]=this._super[x].bind(d);return d}_bare(){const d=this.clone();d._reset();const x=d._definition.terms;for(const b in x){const S=x[b];d.$_terms[b]=S.init}return d.$_mutateRebuild()}_default(d,x,b={}){return l.assertOptions(b,"literal"),a(x!==void 0,"Missing",d,"value"),a(typeof x=="function"||!b.literal,"Only function value supports literal option"),typeof x=="function"&&b.literal&&(x={[l.symbols.literal]:!0,literal:x}),this.$_setFlag(d,x)}_generate(d,x,b){if(!this.$_terms.whens)return{schema:this};const S=[],A=[];for(let D=0;D<this.$_terms.whens.length;++D){const N=this.$_terms.whens[D];if(N.concat){S.push(N.concat),A.push(`${D}.concat`);continue}const V=N.ref?N.ref.resolve(d,x,b):d,z=N.is?[N]:N.switch,I=A.length;for(let B=0;B<z.length;++B){const{is:F,then:K,otherwise:he}=z[B],be=`${D}${N.switch?"."+B:""}`;if(F.$_match(V,x.nest(F,`${be}.is`),b)){if(K){const De=x.localize([...x.path,`${be}.then`],x.ancestors,x.schemas),{schema:We,id:Le}=K._generate(d,De,b);S.push(We),A.push(`${be}.then${Le?`(${Le})`:""}`);break}}else if(he){const De=x.localize([...x.path,`${be}.otherwise`],x.ancestors,x.schemas),{schema:We,id:Le}=he._generate(d,De,b);S.push(We),A.push(`${be}.otherwise${Le?`(${Le})`:""}`);break}}if(N.break&&A.length>I)break}const P=A.join(", ");if(x.mainstay.tracer.debug(x,"rule","when",P),!P)return{schema:this};if(!x.mainstay.tracer.active&&this.$_temp.whens[P])return{schema:this.$_temp.whens[P],id:P};let L=this;this._definition.generate&&(L=this._definition.generate(this,d,x,b));for(const D of S)L=L.concat(D);return this.$_root._tracer&&this.$_root._tracer._combine(L,[this,...S]),this.$_temp.whens[P]=L,{schema:L,id:P}}_inner(d,x,b={}){a(!this._inRuleset(),`Cannot set ${d} inside a ruleset`);const S=this.clone();return S.$_terms[d]&&!b.override||(S.$_terms[d]=[]),b.single?S.$_terms[d].push(x):S.$_terms[d].push(...x),S.$_temp.ruleset=!1,S}_inRuleset(){return this.$_temp.ruleset!==null&&this.$_temp.ruleset!==!1}_ruleRemove(d,x={}){if(!this._singleRules.has(d))return this;const b=x.clone!==!1?this.clone():this;b._singleRules.delete(d);const S=[];for(let A=0;A<b._rules.length;++A){const P=b._rules[A];P.name!==d||P.keep?S.push(P):b._inRuleset()&&A<b.$_temp.ruleset&&--b.$_temp.ruleset}return b._rules=S,b}_values(d,x){l.verifyFlat(d,x.slice(1,-1));const b=this.clone(),S=d[0]===l.symbols.override;if(S&&(d=d.slice(1)),!b[x]&&d.length?b[x]=new k:S&&(b[x]=d.length?new k:null,b.$_mutateRebuild()),!b[x])return b;S&&b[x].override();for(const A of d){a(A!==void 0,"Cannot call allow/valid/invalid with undefined"),a(A!==l.symbols.override,"Override must be the first value");const P=x==="_invalids"?"_valids":"_invalids";b[P]&&(b[P].remove(A),b[P].length||(a(x==="_valids"||!b._flags.only,"Setting invalid value",A,"leaves schema rejecting all values due to previous valid rule"),b[P]=null)),b[x].add(A,b._refs)}return b}}};w.Base.prototype[l.symbols.any]={version:l.version,compile:o.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:(_,j,p)=>{const a=p(375),m=p(8571),f=p(8160),h={max:1e3,supported:new Set(["undefined","boolean","number","string"])};j.provider={provision:t=>new h.Cache(t)},h.Cache=class{constructor(t={}){f.assertOptions(t,["max"]),a(t.max===void 0||t.max&&t.max>0&&isFinite(t.max),"Invalid max cache size"),this._max=t.max||h.max,this._map=new Map,this._list=new h.List}get length(){return this._map.size}set(t,l){if(t!==null&&!h.supported.has(typeof t))return;let o=this._map.get(t);if(o)return o.value=l,void this._list.first(o);o=this._list.unshift({key:t,value:l}),this._map.set(t,o),this._compact()}get(t){const l=this._map.get(t);if(l)return this._list.first(l),m(l.value)}_compact(){if(this._map.size>this._max){const t=this._list.pop();this._map.delete(t.key)}}},h.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:o}=t;return l.prev=o,o&&(o.next=l),t===this.tail&&(this.tail=l),t.prev=null,t.next=null,t}}},8160:(_,j,p)=>{const a=p(375),m=p(7916),f=p(5934);let h,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)?)?)?)?$/};j.version=f.version,j.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},j.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")},j.assertOptions=function(o,r,s="Options"){a(o&&typeof o=="object"&&!Array.isArray(o),"Options must be of type object");const c=Object.keys(o).filter(n=>!r.includes(n));a(c.length===0,`${s} contain unknown keys: ${c}`)},j.checkPreferences=function(o){t=t||p(3378);const r=t.preferences.validate(o);if(r.error)throw new m([r.error.details[0].message])},j.compare=function(o,r,s){switch(s){case"=":return o===r;case">":return o>r;case"<":return o<r;case">=":return o>=r;case"<=":return o<=r}},j.default=function(o,r){return o===void 0?r:o},j.isIsoDate=function(o){return l.isoDate.test(o)},j.isNumber=function(o){return typeof o=="number"&&!isNaN(o)},j.isResolvable=function(o){return!!o&&(o[j.symbols.ref]||o[j.symbols.template])},j.isSchema=function(o,r={}){const s=o&&o[j.symbols.any];return!!s&&(a(r.legacy||s.version===j.version,"Cannot mix different versions of joi schemas"),!0)},j.isValues=function(o){return o[j.symbols.values]},j.limit=function(o){return Number.isSafeInteger(o)&&o>=0},j.preferences=function(o,r){h=h||p(6914),o=o||{},r=r||{};const s=Object.assign({},o,r);return r.errors&&o.errors&&(s.errors=Object.assign({},o.errors,r.errors),s.errors.wrap=Object.assign({},o.errors.wrap,r.errors.wrap)),r.messages&&(s.messages=h.compile(r.messages,o.messages)),delete s[j.symbols.prefs],s},j.tryWithPath=function(o,r,s={}){try{return o()}catch(c){throw c.path!==void 0?c.path=r+"."+c.path:c.path=r,s.append&&(c.message=`${c.message} (${c.path})`),c}},j.validateArg=function(o,r,{assert:s,message:c}){if(j.isSchema(s)){const n=s.validate(o);return n.error?n.error.message:void 0}if(!s(o))return r?`${r} ${c}`:c},j.verifyFlat=function(o,r){for(const s of o)a(!Array.isArray(s),"Method no longer accepts array arguments:",r)}},3292:(_,j,p)=>{const a=p(375),m=p(8160),f=p(6133),h={};j.schema=function(t,l,o={}){m.assertOptions(o,["appendPath","override"]);try{return h.schema(t,l,o)}catch(r){throw o.appendPath&&r.path!==void 0&&(r.message=`${r.message} (${r.path})`),r}},h.schema=function(t,l,o){a(l!==void 0,"Invalid undefined schema"),Array.isArray(l)&&(a(l.length,"Invalid empty array schema"),l.length===1&&(l=l[0]));const r=(s,...c)=>o.override!==!1?s.valid(t.override,...c):s.valid(...c);if(h.simple(l))return r(t,l);if(typeof l=="function")return t.custom(l);if(a(typeof l=="object","Invalid schema content:",typeof l),m.isResolvable(l))return r(t,l);if(m.isSchema(l))return l;if(Array.isArray(l)){for(const s of l)if(!h.simple(s))return t.alternatives().try(...l);return r(t,...l)}return l instanceof RegExp?t.string().regex(l):l instanceof Date?r(t.date(),l):(a(Object.getPrototypeOf(l)===Object.getPrototypeOf({}),"Schema can only contain plain objects"),t.object().keys(l))},j.ref=function(t,l){return f.isRef(t)?t:f.create(t,l)},j.compile=function(t,l,o={}){m.assertOptions(o,["legacy"]);const r=l&&l[m.symbols.any];if(r)return a(o.legacy||r.version===m.version,"Cannot mix different versions of joi schemas:",r.version,m.version),l;if(typeof l!="object"||!o.legacy)return j.schema(t,l,{appendPath:!0});const s=h.walk(l);return s?s.compile(s.root,l):j.schema(t,l,{appendPath:!0})},h.walk=function(t){if(typeof t!="object")return null;if(Array.isArray(t)){for(const o of t){const r=h.walk(o);if(r)return r}return null}const l=t[m.symbols.any];if(l)return{root:t[l.root],compile:l.compile};a(Object.getPrototypeOf(t)===Object.getPrototypeOf({}),"Schema can only contain plain objects");for(const o in t){const r=h.walk(t[o]);if(r)return r}return null},h.simple=function(t){return t===null||["boolean","string","number"].includes(typeof t)},j.when=function(t,l,o){if(o===void 0&&(a(l&&typeof l=="object","Missing options"),o=l,l=f.create(".")),Array.isArray(o)&&(o={switch:o}),m.assertOptions(o,["is","not","then","otherwise","switch","break"]),m.isSchema(l))return a(o.is===void 0,'"is" can not be used with a schema condition'),a(o.not===void 0,'"not" can not be used with a schema condition'),a(o.switch===void 0,'"switch" can not be used with a schema condition'),h.condition(t,{is:l,then:o.then,otherwise:o.otherwise,break:o.break});if(a(f.isRef(l)||typeof l=="string","Invalid condition:",l),a(o.not===void 0||o.is===void 0,'Cannot combine "is" with "not"'),o.switch===void 0){let s=o;o.not!==void 0&&(s={is:o.not,then:o.otherwise,otherwise:o.then,break:o.break});let c=s.is!==void 0?t.$_compile(s.is):t.$_root.invalid(null,!1,0,"").required();return a(s.then!==void 0||s.otherwise!==void 0,'options must have at least one of "then", "otherwise", or "switch"'),a(s.break===void 0||s.then===void 0||s.otherwise===void 0,"Cannot specify then, otherwise, and break all together"),o.is===void 0||f.isRef(o.is)||m.isSchema(o.is)||(c=c.required()),h.condition(t,{ref:j.ref(l),is:c,then:s.then,otherwise:s.otherwise,break:s.break})}a(Array.isArray(o.switch),'"switch" must be an array'),a(o.is===void 0,'Cannot combine "switch" with "is"'),a(o.not===void 0,'Cannot combine "switch" with "not"'),a(o.then===void 0,'Cannot combine "switch" with "then"');const r={ref:j.ref(l),switch:[],break:o.break};for(let s=0;s<o.switch.length;++s){const c=o.switch[s],n=s===o.switch.length-1;m.assertOptions(c,n?["is","then","otherwise"]:["is","then"]),a(c.is!==void 0,'Switch statement missing "is"'),a(c.then!==void 0,'Switch statement missing "then"');const i={is:t.$_compile(c.is),then:t.$_compile(c.then)};if(f.isRef(c.is)||m.isSchema(c.is)||(i.is=i.is.required()),n){a(o.otherwise===void 0||c.otherwise===void 0,'Cannot specify "otherwise" inside and outside a "switch"');const u=o.otherwise!==void 0?o.otherwise:c.otherwise;u!==void 0&&(a(r.break===void 0,"Cannot specify both otherwise and break"),i.otherwise=t.$_compile(u))}r.switch.push(i)}return r},h.condition=function(t,l){for(const o of["then","otherwise"])l[o]===void 0?delete l[o]:l[o]=t.$_compile(l[o]);return l}},6354:(_,j,p)=>{const a=p(5688),m=p(8160),f=p(3328);j.Report=class{constructor(h,t,l,o,r,s,c){if(this.code=h,this.flags=o,this.messages=r,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=j.label(this.flags,this.state,this.prefs,this.messages),this.value===void 0||this.local.hasOwnProperty("value")||(this.local.value=this.value),this.path.length){const n=this.path[this.path.length-1];typeof n!="object"&&(this.local.key=n)}}_setTemplate(h){if(this.template=h,!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 h=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 "${h}" 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(h,t){return j.template(this.value,h,t||this.code,this.state,this.prefs)}},j.path=function(h){let t="";for(const l of h)typeof l!="object"&&(typeof l=="string"?(t&&(t+="."),t+=l):t+=`[${l}]`);return t},j.template=function(h,t,l,o,r){if(!t)return;if(f.isTemplate(t))return l!=="root"?t:null;let s=r.errors.language;if(m.isResolvable(s)&&(s=s.resolve(h,o,r)),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["*"]},j.label=function(h,t,l,o){if(!l.errors.label)return"";if(h.label)return h.label;let r=t.path;return l.errors.label==="key"&&t.path.length>1&&(r=t.path.slice(-1)),j.path(r)||j.template(null,l.messages,"root",t,l)||o&&j.template(null,o,"root",t,l)||"value"},j.process=function(h,t,l){if(!h)return null;const{override:o,message:r,details:s}=j.details(h);if(o)return o;if(l.errors.stack)return new j.ValidationError(r,s,t);const c=Error.stackTraceLimit;Error.stackTraceLimit=0;const n=new j.ValidationError(r,s,t);return Error.stackTraceLimit=c,n},j.details=function(h,t={}){let l=[];const o=[];for(const r of h){if(r instanceof Error){if(t.override!==!1)return{override:r};const c=r.toString();l.push(c),o.push({message:c,type:"override",context:{error:r}});continue}const s=r.toString();l.push(s),o.push({message:s,path:r.path.filter(c=>typeof c!="object"),type:r.code,context:r.local})}return l.length>1&&(l=[...new Set(l)]),{message:l.join(". "),details:o}},j.ValidationError=class extends Error{constructor(h,t,l){super(h),this._original=l,this.details=t}static isError(h){return h instanceof j.ValidationError}},j.ValidationError.prototype.isJoi=!0,j.ValidationError.prototype.name="ValidationError",j.ValidationError.prototype.annotate=a.error},8901:(_,j,p)=>{const a=p(375),m=p(8571),f=p(8160),h=p(6914),t={};j.type=function(l,o){const r=Object.getPrototypeOf(l),s=m(r),c=l._assign(Object.create(s)),n=Object.assign({},o);delete n.base,s._definition=n;const i=r._definition||{};n.messages=h.merge(i.messages,n.messages),n.properties=Object.assign({},i.properties,n.properties),c.type=n.type,n.flags=Object.assign({},i.flags,n.flags);const u=Object.assign({},i.terms);if(n.terms)for(const w in n.terms){const d=n.terms[w];a(c.$_terms[w]===void 0,"Invalid term override for",n.type,w),c.$_terms[w]=d.init,u[w]=d}n.terms=u,n.args||(n.args=i.args),n.prepare=t.prepare(n.prepare,i.prepare),n.coerce&&(typeof n.coerce=="function"&&(n.coerce={method:n.coerce}),n.coerce.from&&!Array.isArray(n.coerce.from)&&(n.coerce={method:n.coerce.method,from:[].concat(n.coerce.from)})),n.coerce=t.coerce(n.coerce,i.coerce),n.validate=t.validate(n.validate,i.validate);const g=Object.assign({},i.rules);if(n.rules)for(const w in n.rules){const d=n.rules[w];a(typeof d=="object","Invalid rule definition for",n.type,w);let x=d.method;if(x===void 0&&(x=function(){return this.$_addRule(w)}),x&&(a(!s[w],"Rule conflict in",n.type,w),s[w]=x),a(!g[w],"Rule conflict in",n.type,w),g[w]=d,d.alias){const b=[].concat(d.alias);for(const S of b)s[S]=d.method}d.args&&(d.argsByName=new Map,d.args=d.args.map(b=>(typeof b=="string"&&(b={name:b}),a(!d.argsByName.has(b.name),"Duplicated argument name",b.name),f.isSchema(b.assert)&&(b.assert=b.assert.strict().label(b.name)),d.argsByName.set(b.name,b),b)))}n.rules=g;const y=Object.assign({},i.modifiers);if(n.modifiers)for(const w in n.modifiers){a(!s[w],"Rule conflict in",n.type,w);const d=n.modifiers[w];a(typeof d=="function","Invalid modifier definition for",n.type,w);const x=function(b){return this.rule({[w]:b})};s[w]=x,y[w]=d}if(n.modifiers=y,n.overrides){s._super=r,c.$_super={};for(const w in n.overrides)a(r[w],"Cannot override missing",w),n.overrides[w][f.symbols.parent]=r[w],c.$_super[w]=r[w].bind(c);Object.assign(s,n.overrides)}n.cast=Object.assign({},i.cast,n.cast);const k=Object.assign({},i.manifest,n.manifest);return k.build=t.build(n.manifest&&n.manifest.build,i.manifest&&i.manifest.build),n.manifest=k,n.rebuild=t.rebuild(n.rebuild,i.rebuild),c},t.build=function(l,o){return l&&o?function(r,s){return o(l(r,s),s)}:l||o},t.coerce=function(l,o){return l&&o?{from:l.from&&o.from?[...new Set([...l.from,...o.from])]:null,method(r,s){let c;if((!o.from||o.from.includes(typeof r))&&(c=o.method(r,s),c)){if(c.errors||c.value===void 0)return c;r=c.value}if(!l.from||l.from.includes(typeof r)){const n=l.method(r,s);if(n)return n}return c}}:l||o},t.prepare=function(l,o){return l&&o?function(r,s){const c=l(r,s);if(c){if(c.errors||c.value===void 0)return c;r=c.value}return o(r,s)||c}:l||o},t.rebuild=function(l,o){return l&&o?function(r){o(r),l(r)}:l||o},t.validate=function(l,o){return l&&o?function(r,s){const c=o(r,s);if(c){if(c.errors&&(!Array.isArray(c.errors)||c.errors.length))return c;r=c.value}return l(r,s)||c}:l||o}},5107:(_,j,p)=>{const a=p(375),m=p(8571),f=p(8652),h=p(8160),t=p(3292),l=p(6354),o=p(8901),r=p(9708),s=p(6133),c=p(3328),n=p(1152);let i;const u={types:{alternatives:p(4946),any:p(8068),array:p(546),boolean:p(4937),date:p(7500),function:p(390),link:p(8785),number:p(3832),object:p(8966),string:p(7417),symbol:p(8826)},aliases:{alt:"alternatives",bool:"boolean",func:"function"},root:function(){const g={_types:new Set(Object.keys(u.types))};for(const y of g._types)g[y]=function(...k){return a(!k.length||["alternatives","link","object"].includes(y),"The",y,"type does not allow arguments"),u.generate(this,u.types[y],k)};for(const y of["allow","custom","disallow","equal","exist","forbidden","invalid","not","only","optional","options","prefs","preferences","required","strip","valid","when"])g[y]=function(...k){return this.any()[y](...k)};Object.assign(g,u.methods);for(const y in u.aliases){const k=u.aliases[y];g[y]=g[k]}return g.x=g.expression,n.setup&&n.setup(g),g}};u.methods={ValidationError:l.ValidationError,version:h.version,cache:f.provider,assert(g,y,...k){u.assert(g,y,!0,k)},attempt:(g,y,...k)=>u.assert(g,y,!1,k),build(g){return a(typeof r.build=="function","Manifest functionality disabled"),r.build(this,g)},checkPreferences(g){h.checkPreferences(g)},compile(g,y){return t.compile(this,g,y)},defaults(g){a(typeof g=="function","modifier must be a function");const y=Object.assign({},this);for(const k of y._types){const w=g(y[k]());a(h.isSchema(w),"modifier must return a valid schema object"),y[k]=function(...d){return u.generate(this,w,d)}}return y},expression:(...g)=>new c(...g),extend(...g){h.verifyFlat(g,"extend"),i=i||p(3378),a(g.length,"You need to provide at least one extension"),this.assert(g,i.extensions);const y=Object.assign({},this);y._types=new Set(y._types);for(let k of g){typeof k=="function"&&(k=k(y)),this.assert(k,i.extension);const w=u.expandExtension(k,y);for(const d of w){a(y[d.type]===void 0||y._types.has(d.type),"Cannot override name",d.type);const x=d.base||this.any(),b=o.type(x,d);y._types.add(d.type),y[d.type]=function(...S){return u.generate(this,b,S)}}}return y},isError:l.ValidationError.isError,isExpression:c.isTemplate,isRef:s.isRef,isSchema:h.isSchema,in:(...g)=>s.in(...g),override:h.symbols.override,ref:(...g)=>s.create(...g),types(){const g={};for(const y of this._types)g[y]=this[y]();for(const y in u.aliases)g[y]=this[y]();return g}},u.assert=function(g,y,k,w){const d=w[0]instanceof Error||typeof w[0]=="string"?w[0]:null,x=d!==null?w[1]:w[0],b=y.validate(g,h.preferences({errors:{stack:!0}},x||{}));let S=b.error;if(!S)return b.value;if(d instanceof Error)throw d;const A=k&&typeof S.annotate=="function"?S.annotate():S.message;throw S instanceof l.ValidationError==0&&(S=m(S)),S.message=d?`${d} ${A}`:A,S},u.generate=function(g,y,k){return a(g,"Must be invoked on a Joi instance."),y.$_root=g,y._definition.args&&k.length?y._definition.args(y,...k):y},u.expandExtension=function(g,y){if(typeof g.type=="string")return[g];const k=[];for(const w of y._types)if(g.type.test(w)){const d=Object.assign({},g);d.type=w,d.base=y[w](),k.push(d)}return k},_.exports=u.root()},6914:(_,j,p)=>{const a=p(375),m=p(8571),f=p(3328);j.compile=function(h,t){if(typeof h=="string")return a(!t,"Cannot set single message string"),new f(h);if(f.isTemplate(h))return a(!t,"Cannot set single message template"),h;a(typeof h=="object"&&!Array.isArray(h),"Invalid message options"),t=t?m(t):{};for(let l in h){const o=h[l];if(l==="root"||f.isTemplate(o)){t[l]=o;continue}if(typeof o=="string"){t[l]=new f(o);continue}a(typeof o=="object"&&!Array.isArray(o),"Invalid message for",l);const r=l;for(l in t[r]=t[r]||{},o){const s=o[l];l==="root"||f.isTemplate(s)?t[r][l]=s:(a(typeof s=="string","Invalid message for",l,"in",r),t[r][l]=new f(s))}}return t},j.decompile=function(h){const t={};for(let l in h){const o=h[l];if(l==="root"){t.root=o;continue}if(f.isTemplate(o)){t[l]=o.describe({compact:!0});continue}const r=l;for(l in t[r]={},o){const s=o[l];l!=="root"?t[r][l]=s.describe({compact:!0}):t[r].root=s}}return t},j.merge=function(h,t){if(!h)return j.compile(t);if(!t)return h;if(typeof t=="string")return new f(t);if(f.isTemplate(t))return t;const l=m(h);for(let o in t){const r=t[o];if(o==="root"||f.isTemplate(r)){l[o]=r;continue}if(typeof r=="string"){l[o]=new f(r);continue}a(typeof r=="object"&&!Array.isArray(r),"Invalid message for",o);const s=o;for(o in l[s]=l[s]||{},r){const c=r[o];o==="root"||f.isTemplate(c)?l[s][o]=c:(a(typeof c=="string","Invalid message for",o,"in",s),l[s][o]=new f(c))}}return l}},2294:(_,j,p)=>{const a=p(375),m=p(8160),f=p(6133),h={};j.Ids=h.Ids=class{constructor(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}clone(){const t=new h.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,o]of t._byId.entries())a(!this._byKey.has(l),"Schema id conflicts with existing key:",l),this._byId.set(l,o);for(const[l,o]of t._byKey.entries())a(!this._byId.has(l),"Schema key conflicts with existing id:",l),this._byKey.set(l,o)}fork(t,l,o){const r=this._collect(t);r.push({schema:o});const s=r.shift();let c={id:s.id,schema:l(s.schema)};a(m.isSchema(c.schema),"adjuster function failed to return a joi schema type");for(const n of r)c={id:n.id,schema:h.fork(n.schema,c.id,c.schema)};return c.schema}labels(t,l=[]){const o=t[0],r=this._get(o);if(!r)return[...l,...t].join(".");const s=t.slice(1);return l=[...l,r.schema._flags.label||o],s.length?r.schema._ids.labels(s,l):l.join(".")}reach(t,l=[]){const o=t[0],r=this._get(o);a(r,"Schema does not contain path",[...l,...t].join("."));const s=t.slice(1);return s.length?r.schema._ids.reach(s,[...l,o]):r.schema}register(t,{key:l}={}){if(!t||!m.isSchema(t))return;(t.$_property("schemaChain")||t._ids._schemaChain)&&(this._schemaChain=!0);const o=t._flags.id;if(o){const r=this._byId.get(o);a(!r||r.schema===t,"Cannot add different schemas with the same id:",o),a(!this._byKey.has(o),"Schema id conflicts with existing key:",o),this._byId.set(o,{schema:t,id:o})}l&&(a(!this._byKey.has(l),"Schema already contains key:",l),a(!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=[],o=[]){const r=t[0],s=this._get(r);a(s,"Schema does not contain path",[...l,...t].join(".")),o=[s,...o];const c=t.slice(1);return c.length?s.schema._ids._collect(c,[...l,r],o):o}_get(t){return this._byId.get(t)||this._byKey.get(t)}},h.fork=function(t,l,o){const r=j.schema(t,{each:(s,{key:c})=>{if(l===(s._flags.id||c))return o},ref:!1});return r?r.$_mutateRebuild():t},j.schema=function(t,l){let o;for(const r in t._flags){if(r[0]==="_")continue;const s=h.scan(t._flags[r],{source:"flags",name:r},l);s!==void 0&&(o=o||t.clone(),o._flags[r]=s)}for(let r=0;r<t._rules.length;++r){const s=t._rules[r],c=h.scan(s.args,{source:"rules",name:s.name},l);if(c!==void 0){o=o||t.clone();const n=Object.assign({},s);n.args=c,o._rules[r]=n,o._singleRules.get(s.name)===s&&o._singleRules.set(s.name,n)}}for(const r in t.$_terms){if(r[0]==="_")continue;const s=h.scan(t.$_terms[r],{source:"terms",name:r},l);s!==void 0&&(o=o||t.clone(),o.$_terms[r]=s)}return o},h.scan=function(t,l,o,r,s){const c=r||[];if(t===null||typeof t!="object")return;let n;if(Array.isArray(t)){for(let i=0;i<t.length;++i){const u=l.source==="terms"&&l.name==="keys"&&t[i].key,g=h.scan(t[i],l,o,[i,...c],u);g!==void 0&&(n=n||t.slice(),n[i]=g)}return n}if(o.schema!==!1&&m.isSchema(t)||o.ref!==!1&&f.isRef(t)){const i=o.each(t,{...l,path:c,key:s});return i===t?void 0:i}for(const i in t){if(i[0]==="_")continue;const u=h.scan(t[i],l,o,[i,...c],s);u!==void 0&&(n=n||Object.assign({},t),n[i]=u)}return n}},6133:(_,j,p)=>{const a=p(375),m=p(8571),f=p(9621),h=p(8160);let t;const l={symbol:Symbol("ref"),defaults:{adjust:null,in:!1,iterables:null,map:null,separator:".",type:"value"}};j.create=function(o,r={}){a(typeof o=="string","Invalid reference key:",o),h.assertOptions(r,["adjust","ancestor","in","iterables","map","prefix","render","separator"]),a(!r.prefix||typeof r.prefix=="object","options.prefix must be of type object");const s=Object.assign({},l.defaults,r);delete s.prefix;const c=s.separator,n=l.context(o,c,r.prefix);if(s.type=n.type,o=n.key,s.type==="value")if(n.root&&(a(!c||o[0]!==c,"Cannot specify relative path with root prefix"),s.ancestor="root",o||(o=null)),c&&c===o)o=null,s.ancestor=0;else if(s.ancestor!==void 0)a(!c||!o||o[0]!==c,"Cannot combine prefix with ancestor option");else{const[i,u]=l.ancestor(o,c);u&&(o=o.slice(u))===""&&(o=null),s.ancestor=i}return s.path=c?o===null?[]:o.split(c):[o],new l.Ref(s)},j.in=function(o,r={}){return j.create(o,{...r,in:!0})},j.isRef=function(o){return!!o&&!!o[h.symbols.ref]},l.Ref=class{constructor(o){a(typeof o=="object","Invalid reference construction"),h.assertOptions(o,["adjust","ancestor","in","iterables","map","path","render","separator","type","depth","key","root","display"]),a([!1,void 0].includes(o.separator)||typeof o.separator=="string"&&o.separator.length===1,"Invalid separator"),a(!o.adjust||typeof o.adjust=="function","options.adjust must be a function"),a(!o.map||Array.isArray(o.map),"options.map must be an array"),a(!o.map||!o.adjust,"Cannot set both map and adjust options"),Object.assign(this,l.defaults,o),a(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(o,r,s,c,n={}){return a(!this.in||n.in,"Invalid in() reference usage"),this.type==="global"?this._resolve(s.context,r,n):this.type==="local"?this._resolve(c,r,n):this.ancestor?this.ancestor==="root"?this._resolve(r.ancestors[r.ancestors.length-1],r,n):(a(this.ancestor<=r.ancestors.length,"Invalid reference exceeds the schema root:",this.display),this._resolve(r.ancestors[this.ancestor-1],r,n)):this._resolve(o,r,n)}_resolve(o,r,s){let c;if(this.type==="value"&&r.mainstay.shadow&&s.shadow!==!1&&(c=r.mainstay.shadow.get(this.absolute(r))),c===void 0&&(c=f(o,this.path,{iterables:this.iterables,functions:!0})),this.adjust&&(c=this.adjust(c)),this.map){const n=this.map.get(c);n!==void 0&&(c=n)}return r.mainstay&&r.mainstay.tracer.resolve(r,this,c),c}toString(){return this.display}absolute(o){return[...o.path.slice(0,-this.ancestor),...this.path]}clone(){return new l.Ref(this)}describe(){const o={path:this.path};this.type!=="value"&&(o.type=this.type),this.separator!=="."&&(o.separator=this.separator),this.type==="value"&&this.ancestor!==1&&(o.ancestor=this.ancestor),this.map&&(o.map=[...this.map]);for(const r of["adjust","iterables","render"])this[r]!==null&&this[r]!==void 0&&(o[r]=this[r]);return this.in!==!1&&(o.in=!0),{ref:o}}updateDisplay(){const o=this.key!==null?this.key:"";if(this.type!=="value")return void(this.display=`ref:${this.type}:${o}`);if(!this.separator)return void(this.display=`ref:${o}`);if(!this.ancestor)return void(this.display=`ref:${this.separator}${o}`);if(this.ancestor==="root")return void(this.display=`ref:root:${o}`);if(this.ancestor===1)return void(this.display=`ref:${o||".."}`);const r=new Array(this.ancestor+1).fill(this.separator).join("");this.display=`ref:${r}${o||""}`}},l.Ref.prototype[h.symbols.ref]=!0,j.build=function(o){return(o=Object.assign({},l.defaults,o)).type==="value"&&o.ancestor===void 0&&(o.ancestor=1),new l.Ref(o)},l.context=function(o,r,s={}){if(o=o.trim(),s){const c=s.global===void 0?"$":s.global;if(c!==r&&o.startsWith(c))return{key:o.slice(c.length),type:"global"};const n=s.local===void 0?"#":s.local;if(n!==r&&o.startsWith(n))return{key:o.slice(n.length),type:"local"};const i=s.root===void 0?"/":s.root;if(i!==r&&o.startsWith(i))return{key:o.slice(i.length),type:"value",root:!0}}return{key:o,type:"value"}},l.ancestor=function(o,r){if(!r)return[1,0];if(o[0]!==r)return[1,0];if(o[1]!==r)return[0,1];let s=2;for(;o[s]===r;)++s;return[s-1,s]},j.toSibling=0,j.toParent=1,j.Manager=class{constructor(){this.refs=[]}register(o,r){if(o)if(r=r===void 0?j.toParent:r,Array.isArray(o))for(const s of o)this.register(s,r);else if(h.isSchema(o))for(const s of o._refs.refs)s.ancestor-r>=0&&this.refs.push({ancestor:s.ancestor-r,root:s.root});else j.isRef(o)&&o.type==="value"&&o.ancestor-r>=0&&this.refs.push({ancestor:o.ancestor-r,root:o.root}),t=t||p(3328),t.isTemplate(o)&&this.register(o.refs(),r)}get length(){return this.refs.length}clone(){const o=new j.Manager;return o.refs=m(this.refs),o}reset(){this.refs=[]}roots(){return this.refs.filter(o=>!o.ancestor).map(o=>o.root)}}},3378:(_,j,p)=>{const a=p(5107),m={};m.wrap=a.string().min(1).max(2).allow(!1),j.preferences=a.object({allowUnknown:a.boolean(),abortEarly:a.boolean(),artifacts:a.boolean(),cache:a.boolean(),context:a.object(),convert:a.boolean(),dateFormat:a.valid("date","iso","string","time","utc"),debug:a.boolean(),errors:{escapeHtml:a.boolean(),label:a.valid("path","key",!1),language:[a.string(),a.object().ref()],render:a.boolean(),stack:a.boolean(),wrap:{label:m.wrap,array:m.wrap,string:m.wrap}},externals:a.boolean(),messages:a.object(),noDefaults:a.boolean(),nonEnumerables:a.boolean(),presence:a.valid("required","optional","forbidden"),skipFunctions:a.boolean(),stripUnknown:a.object({arrays:a.boolean(),objects:a.boolean()}).or("arrays","objects").allow(!0,!1),warnings:a.boolean()}).strict(),m.nameRx=/^[a-zA-Z0-9]\w*$/,m.rule=a.object({alias:a.array().items(a.string().pattern(m.nameRx)).single(),args:a.array().items(a.string(),a.object({name:a.string().pattern(m.nameRx).required(),ref:a.boolean(),assert:a.alternatives([a.function(),a.object().schema()]).conditional("ref",{is:!0,then:a.required()}),normalize:a.function(),message:a.string().when("assert",{is:a.function(),then:a.required()})})),convert:a.boolean(),manifest:a.boolean(),method:a.function().allow(!1),multi:a.boolean(),validate:a.function()}),j.extension=a.object({type:a.alternatives([a.string(),a.object().regex()]).required(),args:a.function(),cast:a.object().pattern(m.nameRx,a.object({from:a.function().maxArity(1).required(),to:a.function().minArity(1).maxArity(2).required()})),base:a.object().schema().when("type",{is:a.object().regex(),then:a.forbidden()}),coerce:[a.function().maxArity(3),a.object({method:a.function().maxArity(3).required(),from:a.array().items(a.string()).single()})],flags:a.object().pattern(m.nameRx,a.object({setter:a.string(),default:a.any()})),manifest:{build:a.function().arity(2)},messages:[a.object(),a.string()],modifiers:a.object().pattern(m.nameRx,a.function().minArity(1).maxArity(2)),overrides:a.object().pattern(m.nameRx,a.function()),prepare:a.function().maxArity(3),rebuild:a.function().arity(1),rules:a.object().pattern(m.nameRx,m.rule),terms:a.object().pattern(m.nameRx,a.object({init:a.array().allow(null).required(),manifest:a.object().pattern(/.+/,[a.valid("schema","single"),a.object({mapped:a.object({from:a.string().required(),to:a.string().required()}).required()})])})),validate:a.function().maxArity(3)}).strict(),j.extensions=a.array().items(a.object(),a.function().arity(1)).strict(),m.desc={buffer:a.object({buffer:a.string()}),func:a.object({function:a.function().required(),options:{literal:!0}}),override:a.object({override:!0}),ref:a.object({ref:a.object({type:a.valid("value","global","local"),path:a.array().required(),separator:a.string().length(1).allow(!1),ancestor:a.number().min(0).integer().allow("root"),map:a.array().items(a.array().length(2)).min(1),adjust:a.function(),iterables:a.boolean(),in:a.boolean(),render:a.boolean()}).required()}),regex:a.object({regex:a.string().min(3)}),special:a.object({special:a.valid("deep").required()}),template:a.object({template:a.string().required(),options:a.object()}),value:a.object({value:a.alternatives([a.object(),a.array()]).required()})},m.desc.entity=a.alternatives([a.array().items(a.link("...")),a.boolean(),a.function(),a.number(),a.string(),m.desc.buffer,m.desc.func,m.desc.ref,m.desc.regex,m.desc.special,m.desc.template,m.desc.value,a.link("/")]),m.desc.values=a.array().items(null,a.boolean(),a.function(),a.number().allow(1/0,-1/0),a.string().allow(""),a.symbol(),m.desc.buffer,m.desc.func,m.desc.override,m.desc.ref,m.desc.regex,m.desc.template,m.desc.value),m.desc.messages=a.object().pattern(/.+/,[a.string(),m.desc.template,a.object().pattern(/.+/,[a.string(),m.desc.template])]),j.description=a.object({type:a.string().required(),flags:a.object({cast:a.string(),default:a.any(),description:a.string(),empty:a.link("/"),failover:m.desc.entity,id:a.string(),label:a.string(),only:!0,presence:["optional","required","forbidden"],result:["raw","strip"],strip:a.boolean(),unit:a.string()}).unknown(),preferences:{allowUnknown:a.boolean(),abortEarly:a.boolean(),artifacts:a.boolean(),cache:a.boolean(),convert:a.boolean(),dateFormat:["date","iso","string","time","utc"],errors:{escapeHtml:a.boolean(),label:["path","key"],language:[a.string(),m.desc.ref],wrap:{label:m.wrap,array:m.wrap}},externals:a.boolean(),messages:m.desc.messages,noDefaults:a.boolean(),nonEnumerables:a.boolean(),presence:["required","optional","forbidden"],skipFunctions:a.boolean(),stripUnknown:a.object({arrays:a.boolean(),objects:a.boolean()}).or("arrays","objects").allow(!0,!1),warnings:a.boolean()},allow:m.desc.values,invalid:m.desc.values,rules:a.array().min(1).items({name:a.string().required(),args:a.object().min(1),keep:a.boolean(),message:[a.string(),m.desc.messages],warn:a.boolean()}),keys:a.object().pattern(/.*/,a.link("/")),link:m.desc.ref}).pattern(/^[a-z]\w*$/,a.any())},493:(_,j,p)=>{const a=p(8571),m=p(9621),f=p(8160),h={value:Symbol("value")};_.exports=h.State=class{constructor(t,l,o){this.path=t,this.ancestors=l,this.mainstay=o.mainstay,this.schemas=o.schemas,this.debug=null}localize(t,l=null,o=null){const r=new h.State(t,l,this);return o&&r.schemas&&(r.schemas=[h.schemas(o),...r.schemas]),r}nest(t,l){const o=new h.State(this.path,this.ancestors,this);return o.schemas=o.schemas&&[h.schemas(t),...o.schemas],o.debug=l,o}shadow(t,l){this.mainstay.shadow=this.mainstay.shadow||new h.Shadow,this.mainstay.shadow.set(this.path,t,l)}snapshot(){this.mainstay.shadow&&(this._snapshot=a(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()}},h.schemas=function(t){return f.isSchema(t)?{schema:t}:t},h.Shadow=class{constructor(){this._values=null}set(t,l,o){if(!t.length||o==="strip"&&typeof t[t.length-1]=="number")return;this._values=this._values||new Map;let r=this._values;for(let s=0;s<t.length;++s){const c=t[s];let n=r.get(c);n||(n=new Map,r.set(c,n)),r=n}r[h.value]=l}get(t){const l=this.node(t);if(l)return l[h.value]}node(t){if(this._values)return m(this._values,t,{iterables:!0})}override(t,l){if(!this._values)return;const o=t.slice(0,-1),r=t[t.length-1],s=m(this._values,o,{iterables:!0});l?s.set(r,l):s&&s.delete(r)}}},3328:(_,j,p)=>{const a=p(375),m=p(8571),f=p(5277),h=p(1447),t=p(8160),l=p(6354),o=p(6133),r={symbol:Symbol("template"),opens:new Array(1e3).join("\0"),closes:new Array(1e3).join(""),dateFormat:{date:Date.prototype.toDateString,iso:Date.prototype.toISOString,string:Date.prototype.toString,time:Date.prototype.toTimeString,utc:Date.prototype.toUTCString}};_.exports=r.Template=class{constructor(s,c){if(a(typeof s=="string","Template source must be a string"),a(!s.includes("\0")&&!s.includes(""),"Template source cannot contain reserved control characters"),this.source=s,this.rendered=s,this._template=null,c){const{functions:n,...i}=c;this._settings=Object.keys(i).length?m(i):void 0,this._functions=n,this._functions&&(a(Object.keys(this._functions).every(u=>typeof u=="string"),"Functions keys must be strings"),a(Object.values(this._functions).every(u=>typeof u=="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=r.encode(this.source),c=r.split(s);let n=!1;const i=[],u=c.shift();u&&i.push(u);for(const g of c){const y=g[0]!=="{",k=y?"}":"}}",w=g.indexOf(k);if(w===-1||g[1]==="{"){i.push(`{${r.decode(g)}`);continue}let d=g.slice(y?0:1,w);const x=d[0]===":";x&&(d=d.slice(1));const b=this._ref(r.decode(d),{raw:y,wrapped:x});i.push(b),typeof b!="string"&&(n=!0);const S=g.slice(w+k.length);S&&i.push(r.decode(S))}n?this._template=i:this.rendered=i.join("")}static date(s,c){return r.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 r.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,n,i){return this._template&&this._template.length===1?this._part(this._template[0],s,c,n,i,{}):this.render(s,c,n,i)}_part(s,...c){return s.ref?s.ref.resolve(...c):s.formula.evaluate(c)}render(s,c,n,i,u={}){if(!this.isDynamic())return this.rendered;const g=[];for(const y of this._template)if(typeof y=="string")g.push(y);else{const k=this._part(y,s,c,n,i,u),w=r.stringify(k,s,c,n,i,u);if(w!==void 0){const d=y.raw||(u.errors&&u.errors.escapeHtml)===!1?w:f(w);g.push(r.wrap(d,y.wrapped&&n.errors.wrap.label))}}return g.join("")}_ref(s,{raw:c,wrapped:n}){const i=[],u=y=>{const k=o.create(y,this._settings);return i.push(k),w=>{const d=k.resolve(...w);return d!==void 0?d:null}};try{const y=this._functions?{...r.functions,...this._functions}:r.functions;var g=new h.Parser(s,{reference:u,functions:y,constants:r.constants})}catch(y){throw y.message=`Invalid template variable "${s}" fails due to: ${y.message}`,y}if(g.single){if(g.single.type==="reference"){const y=i[0];return{ref:y,raw:c,refs:i,wrapped:n||y.type==="local"&&y.key==="label"}}return r.stringify(g.single.value)}return{formula:g,raw:c,refs:i}}toString(){return this.source}},r.Template.prototype[t.symbols.template]=!0,r.Template.prototype.isImmutable=!0,r.encode=function(s){return s.replace(/\\(\{+)/g,(c,n)=>r.opens.slice(0,n.length)).replace(/\\(\}+)/g,(c,n)=>r.closes.slice(0,n.length))},r.decode=function(s){return s.replace(/\u0000/g,"{").replace(/\u0001/g,"}")},r.split=function(s){const c=[];let n="";for(let i=0;i<s.length;++i){const u=s[i];if(u==="{"){let g="";for(;i+1<s.length&&s[i+1]==="{";)g+="{",++i;c.push(n),n=g}else n+=u}return c.push(n),c},r.wrap=function(s,c){return c?c.length===1?`${c}${s}${c}`:`${c[0]}${s}${c[1]}`:s},r.stringify=function(s,c,n,i,u,g={}){const y=typeof s,k=i&&i.errors&&i.errors.wrap||{};let w=!1;if(o.isRef(s)&&s.render&&(w=s.in,s=s.resolve(c,n,i,u,{in:s.in,...g})),s===null)return"null";if(y==="string")return r.wrap(s,g.arrayItems&&k.string);if(y==="number"||y==="function"||y==="symbol")return s.toString();if(y!=="object")return JSON.stringify(s);if(s instanceof Date)return r.Template.date(s,i);if(s instanceof Map){const x=[];for(const[b,S]of s.entries())x.push(`${b.toString()} -> ${S.toString()}`);s=x}if(!Array.isArray(s))return s.toString();const d=[];for(const x of s)d.push(r.stringify(x,c,n,i,u,{arrayItems:!0,...g}));return r.wrap(d.join(", "),!w&&k.array)},r.constants={true:!0,false:!1,null:null,second:1e3,minute:6e4,hour:36e5,day:864e5},r.functions={if:(s,c,n)=>s?c:n,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,n,i,u,g]=this,y=g.messages;if(!y)return"";const k=l.template(c,y[0],s,n,i)||l.template(c,y[1],s,n,i);return k?k.render(c,n,i,u,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:(_,j,p)=>{const a=p(375),m=p(1687),f=p(8068),h=p(8160),t=p(3292),l=p(6354),o=p(6133),r={};_.exports=f.extend({type:"alternatives",flags:{match:{default:"any"}},terms:{matches:{init:[],register:o.toSibling}},args:(s,...c)=>c.length===1&&Array.isArray(c[0])?s.try(...c[0]):s.try(...c),validate(s,c){const{schema:n,error:i,state:u,prefs:g}=c;if(n._flags.match){const k=[],w=[];for(let x=0;x<n.$_terms.matches.length;++x){const b=n.$_terms.matches[x],S=u.nest(b.schema,`match.${x}`);S.snapshot();const A=b.schema.$_validate(s,S,g);A.errors?(w.push(A.errors),S.restore()):(k.push(A.value),S.commit())}if(k.length===0)return{errors:i("alternatives.any",{details:w.map(x=>l.details(x,{override:!1}))})};if(n._flags.match==="one")return k.length===1?{value:k[0]}:{errors:i("alternatives.one")};if(k.length!==n.$_terms.matches.length)return{errors:i("alternatives.all",{details:w.map(x=>l.details(x,{override:!1}))})};const d=x=>x.$_terms.matches.some(b=>b.schema.type==="object"||b.schema.type==="alternatives"&&d(b.schema));return d(n)?{value:k.reduce((x,b)=>m(x,b,{mergeArrays:!1}))}:{value:k[k.length-1]}}const y=[];for(let k=0;k<n.$_terms.matches.length;++k){const w=n.$_terms.matches[k];if(w.schema){const b=u.nest(w.schema,`match.${k}`);b.snapshot();const S=w.schema.$_validate(s,b,g);if(!S.errors)return b.commit(),S;b.restore(),y.push({schema:w.schema,reports:S.errors});continue}const d=w.ref?w.ref.resolve(s,u,g):s,x=w.is?[w]:w.switch;for(let b=0;b<x.length;++b){const S=x[b],{is:A,then:P,otherwise:L}=S,D=`match.${k}${w.switch?"."+b:""}`;if(A.$_match(d,u.nest(A,`${D}.is`),g)){if(P)return P.$_validate(s,u.nest(P,`${D}.then`),g)}else if(L)return L.$_validate(s,u.nest(L,`${D}.otherwise`),g)}}return r.errors(y,c)},rules:{conditional:{method(s,c){a(!this._flags._endedSwitch,"Unreachable condition"),a(!this._flags.match,"Cannot combine match mode",this._flags.match,"with conditional rule"),a(c.break===void 0,"Cannot use break option with alternatives conditional");const n=this.clone(),i=t.when(n,s,c),u=i.is?[i]:i.switch;for(const g of u)if(g.then&&g.otherwise){n.$_setFlag("_endedSwitch",!0,{clone:!1});break}return n.$_terms.matches.push(i),n.$_mutateRebuild()}},match:{method(s){if(a(["any","one","all"].includes(s),"Invalid alternatives match mode",s),s!=="any")for(const c of this.$_terms.matches)a(c.schema,"Cannot combine match mode",s,"with conditional rules");return this.$_setFlag("match",s)}},try:{method(...s){a(s.length,"Missing alternative schemas"),h.verifyFlat(s,"try"),a(!this._flags._endedSwitch,"Unreachable condition");const c=this.clone();for(const n of s)c.$_terms.matches.push({schema:c.$_compile(n)});return c.$_mutateRebuild()}}},overrides:{label(s){return this.$_parent("label",s).$_modify({each:(c,n)=>n.path[0]!=="is"&&typeof c._flags.label!="string"?c.label(s):void 0,ref:!1})}},rebuild(s){s.$_modify({each:c=>{h.isSchema(c)&&c.type==="array"&&s.$_setFlag("_arrayItems",!0,{clone:!1})}})},manifest:{build(s,c){if(c.matches)for(const n of c.matches){const{schema:i,ref:u,is:g,not:y,then:k,otherwise:w}=n;s=i?s.try(i):u?s.conditional(u,{is:g,then:k,not:y,otherwise:w,switch:n.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}}"}}),r.errors=function(s,{error:c,state:n}){if(!s.length)return{errors:c("alternatives.any")};if(s.length===1)return{errors:s[0].reports};const i=new Set,u=[];for(const{reports:g,schema:y}of s){if(g.length>1)return r.unmatched(s,c);const k=g[0];if(k instanceof l.Report==0)return r.unmatched(s,c);if(k.state.path.length!==n.path.length){u.push({type:y.type,report:k});continue}if(k.code==="any.only"){for(const x of k.local.valids)i.add(x);continue}const[w,d]=k.code.split(".");d!=="base"?u.push({type:y.type,report:k}):k.code==="object.base"?i.add(k.local.type):i.add(w)}return u.length?u.length===1?{errors:u[0].report}:r.unmatched(s,c):{errors:c("alternatives.types",{types:[...i]})}},r.unmatched=function(s,c){const n=[];for(const i of s)n.push(...i.reports);return{errors:c("alternatives.match",l.details(n,{override:!1}))}}},8068:(_,j,p)=>{const a=p(375),m=p(7629),f=p(8160),h=p(6914);_.exports=m.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 a(typeof t=="function","Method must be a function"),a(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:o}){try{return o(t,l)}catch(r){return l.error("any.custom",{error:r})}},args:["method","description"],multi:!0},messages:{method(t){return this.prefs({messages:t})}},shared:{method(t){a(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 a(t&&typeof t=="string","Invalid warning code"),this.$_addRule({name:"warning",args:{code:t,local:l},warn:!0})},validate:(t,l,{code:o,local:r})=>l.error(o,r),args:["code","local"],multi:!0}},modifiers:{keep(t,l=!0){t.keep=l},message(t,l){t.message=h.compile(l)},warn(t,l=!0){t.warn=l}},manifest:{build(t,l){for(const o in l){const r=l[o];if(["examples","externals","metas","notes","tags"].includes(o))for(const s of r)t=t[o.slice(0,-1)](s);else if(o!=="alterations")if(o!=="whens"){if(o==="shared")for(const s of r)t=t.shared(s)}else for(const s of r){const{ref:c,is:n,not:i,then:u,otherwise:g,concat:y}=s;t=y?t.concat(y):c?t.when(c,{is:n,not:i,then:u,otherwise:g,switch:s.switch,break:s.break}):t.when(n,{then:u,otherwise:g,break:s.break})}else{const s={};for(const{target:c,adjuster:n}of r)s[c]=n;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:(_,j,p)=>{const a=p(375),m=p(9474),f=p(9621),h=p(8068),t=p(8160),l=p(3292),o={};_.exports=h.extend({type:"array",flags:{single:{default:!1},sparse:{default:!1}},terms:{items:{init:[],manifest:"schema"},ordered:{init:[],manifest:"schema"},_exclusions:{init:[]},_inclusions:{init:[]},_requireds:{init:[]}},coerce:{from:"object",method(r,{schema:s,state:c,prefs:n}){if(!Array.isArray(r))return;const i=s.$_getRule("sort");return i?o.sort(s,r,i.args.options,c,n):void 0}},validate(r,{schema:s,error:c}){if(!Array.isArray(r)){if(s._flags.single){const n=[r];return n[t.symbols.arraySingle]=!0,{value:n}}return{errors:c("array.base")}}if(s.$_getRule("items")||s.$_terms.externals)return{value:r.slice()}},rules:{has:{method(r){r=this.$_compile(r,{appendPath:!0});const s=this.$_addRule({name:"has",args:{schema:r}});return s.$_mutateRegister(r),s},validate(r,{state:s,prefs:c,error:n},{schema:i}){const u=[r,...s.ancestors];for(let y=0;y<r.length;++y){const k=s.localize([...s.path,y],u,i);if(i.$_match(r[y],k,c))return r}const g=i._flags.label;return g?n("array.hasKnown",{patternLabel:g}):n("array.hasUnknown",null)},multi:!0},items:{method(...r){t.verifyFlat(r,"items");const s=this.$_addRule("items");for(let c=0;c<r.length;++c){const n=t.tryWithPath(()=>this.$_compile(r[c]),c,{append:!0});s.$_terms.items.push(n)}return s.$_mutateRebuild()},validate(r,{schema:s,error:c,state:n,prefs:i,errorsArray:u}){const g=s.$_terms._requireds.slice(),y=s.$_terms.ordered.slice(),k=[...s.$_terms._inclusions,...g],w=!r[t.symbols.arraySingle];delete r[t.symbols.arraySingle];const d=u();let x=r.length;for(let b=0;b<x;++b){const S=r[b];let A=!1,P=!1;const L=w?b:new Number(b),D=[...n.path,L];if(!s._flags.sparse&&S===void 0){if(d.push(c("array.sparse",{key:L,path:D,pos:b,value:void 0},n.localize(D))),i.abortEarly)return d;y.shift();continue}const N=[r,...n.ancestors];for(const B of s.$_terms._exclusions)if(B.$_match(S,n.localize(D,N,B),i,{presence:"ignore"})){if(d.push(c("array.excludes",{pos:b,value:S},n.localize(D))),i.abortEarly)return d;A=!0,y.shift();break}if(A)continue;if(s.$_terms.ordered.length){if(y.length){const B=y.shift(),F=B.$_validate(S,n.localize(D,N,B),i);if(F.errors){if(d.push(...F.errors),i.abortEarly)return d}else if(B._flags.result==="strip")o.fastSplice(r,b),--b,--x;else{if(!s._flags.sparse&&F.value===void 0){if(d.push(c("array.sparse",{key:L,path:D,pos:b,value:void 0},n.localize(D))),i.abortEarly)return d;continue}r[b]=F.value}continue}if(!s.$_terms.items.length){if(d.push(c("array.orderedLength",{pos:b,limit:s.$_terms.ordered.length})),i.abortEarly)return d;break}}const V=[];let z=g.length;for(let B=0;B<z;++B){const F=n.localize(D,N,g[B]);F.snapshot();const K=g[B].$_validate(S,F,i);if(V[B]=K,!K.errors){if(F.commit(),r[b]=K.value,P=!0,o.fastSplice(g,B),--B,--z,!s._flags.sparse&&K.value===void 0&&(d.push(c("array.sparse",{key:L,path:D,pos:b,value:void 0},n.localize(D))),i.abortEarly))return d;break}F.restore()}if(P)continue;const I=i.stripUnknown&&!!i.stripUnknown.arrays||!1;z=k.length;for(const B of k){let F;const K=g.indexOf(B);if(K!==-1)F=V[K];else{const he=n.localize(D,N,B);if(he.snapshot(),F=B.$_validate(S,he,i),!F.errors){he.commit(),B._flags.result==="strip"?(o.fastSplice(r,b),--b,--x):s._flags.sparse||F.value!==void 0?r[b]=F.value:(d.push(c("array.sparse",{key:L,path:D,pos:b,value:void 0},n.localize(D))),A=!0),P=!0;break}he.restore()}if(z===1){if(I){o.fastSplice(r,b),--b,--x,P=!0;break}if(d.push(...F.errors),i.abortEarly)return d;A=!0;break}}if(!A&&(s.$_terms._inclusions.length||s.$_terms._requireds.length)&&!P){if(I){o.fastSplice(r,b),--b,--x;continue}if(d.push(c("array.includes",{pos:b,value:S},n.localize(D))),i.abortEarly)return d}}return g.length&&o.fillMissedErrors(s,d,g,r,n,i),y.length&&(o.fillOrderedErrors(s,d,y,r,n,i),d.length||o.fillDefault(y,r,n,i)),d.length?d:r},priority:!0,manifest:!1},length:{method(r){return this.$_addRule({name:"length",args:{limit:r},operator:"="})},validate:(r,s,{limit:c},{name:n,operator:i,args:u})=>t.compare(r.length,c,i)?r:s.error("array."+n,{limit:u.limit,value:r}),args:[{name:"limit",ref:!0,assert:t.limit,message:"must be a positive integer"}]},max:{method(r){return this.$_addRule({name:"max",method:"length",args:{limit:r},operator:"<="})}},min:{method(r){return this.$_addRule({name:"min",method:"length",args:{limit:r},operator:">="})}},ordered:{method(...r){t.verifyFlat(r,"ordered");const s=this.$_addRule("items");for(let c=0;c<r.length;++c){const n=t.tryWithPath(()=>this.$_compile(r[c]),c,{append:!0});o.validateSingle(n,s),s.$_mutateRegister(n),s.$_terms.ordered.push(n)}return s.$_mutateRebuild()}},single:{method(r){const s=r===void 0||!!r;return a(!s||!this._flags._arrayItems,"Cannot specify single rule when array has array items"),this.$_setFlag("single",s)}},sort:{method(r={}){t.assertOptions(r,["by","order"]);const s={order:r.order||"ascending"};return r.by&&(s.by=l.ref(r.by,{ancestor:0}),a(!s.by.ancestor,"Cannot sort by ancestor")),this.$_addRule({name:"sort",args:{options:s}})},validate(r,{error:s,state:c,prefs:n,schema:i},{options:u}){const{value:g,errors:y}=o.sort(i,r,u,c,n);if(y)return y;for(let k=0;k<r.length;++k)if(r[k]!==g[k])return s("array.sort",{order:u.order,by:u.by?u.by.key:"value"});return r},convert:!0},sparse:{method(r){const s=r===void 0||!!r;return this._flags.sparse===s?this:(s?this.clone():this.$_addRule("items")).$_setFlag("sparse",s,{clone:!1})}},unique:{method(r,s={}){a(!r||typeof r=="function"||typeof r=="string","comparator must be a function or a string"),t.assertOptions(s,["ignoreUndefined","separator"]);const c={name:"unique",args:{options:s,comparator:r}};if(r)if(typeof r=="string"){const n=t.default(s.separator,".");c.path=n?r.split(n):[r]}else c.comparator=r;return this.$_addRule(c)},validate(r,{state:s,error:c,schema:n},{comparator:i,options:u},{comparator:g,path:y}){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||m,d=u.ignoreUndefined;for(let x=0;x<r.length;++x){const b=y?f(r[x],y):r[x],S=g?k.custom:k[typeof b];if(a(S,"Failed to find unique map container for type",typeof b),S instanceof Map){const A=S.entries();let P;for(;!(P=A.next()).done;)if(w(P.value[0],b)){const L=s.localize([...s.path,x],[r,...s.ancestors]),D={pos:x,value:r[x],dupePos:P.value[1],dupeValue:r[P.value[1]]};return y&&(D.path=i),c("array.unique",D,L)}S.set(b,x)}else{if((!d||b!==void 0)&&S[b]!==void 0){const A={pos:x,value:r[x],dupePos:S[b],dupeValue:r[S[b]]};return y&&(A.path=i),c("array.unique",A,s.localize([...s.path,x],[r,...s.ancestors]))}S[b]=x}}return r},args:["comparator","options"],multi:!0}},cast:{set:{from:Array.isArray,to:(r,s)=>new Set(r)}},rebuild(r){r.$_terms._inclusions=[],r.$_terms._exclusions=[],r.$_terms._requireds=[];for(const s of r.$_terms.items)o.validateSingle(s,r),s._flags.presence==="required"?r.$_terms._requireds.push(s):s._flags.presence==="forbidden"?r.$_terms._exclusions.push(s):r.$_terms._inclusions.push(s);for(const s of r.$_terms.ordered)o.validateSingle(s,r)},manifest:{build:(r,s)=>(s.items&&(r=r.items(...s.items)),s.ordered&&(r=r.ordered(...s.ordered)),r)},messages:{"array.base":"{{#label}} must be an array","array.excludes":"{{#label}} contains an excluded value","array.hasKnown":"{{#label}} does not contain at least one required match for type {:#patternLabel}","array.hasUnknown":"{{#label}} does not contain at least one required match","array.includes":"{{#label}} does not match any of the allowed types","array.includesRequiredBoth":"{{#label}} does not contain {{#knownMisses}} and {{#unknownMisses}} other required value(s)","array.includesRequiredKnowns":"{{#label}} does not contain {{#knownMisses}}","array.includesRequiredUnknowns":"{{#label}} does not contain {{#unknownMisses}} required value(s)","array.length":"{{#label}} must contain {{#limit}} items","array.max":"{{#label}} must contain less than or equal to {{#limit}} items","array.min":"{{#label}} must contain at least {{#limit}} items","array.orderedLength":"{{#label}} must contain at most {{#limit}} items","array.sort":"{{#label}} must be sorted in {#order} order by {{#by}}","array.sort.mismatching":"{{#label}} cannot be sorted due to mismatching types","array.sort.unsupported":"{{#label}} cannot be sorted due to unsupported type {#type}","array.sparse":"{{#label}} must not be a sparse array item","array.unique":"{{#label}} contains a duplicate value"}}),o.fillMissedErrors=function(r,s,c,n,i,u){const g=[];let y=0;for(const k of c){const w=k._flags.label;w?g.push(w):++y}g.length?y?s.push(r.$_createError("array.includesRequiredBoth",n,{knownMisses:g,unknownMisses:y},i,u)):s.push(r.$_createError("array.includesRequiredKnowns",n,{knownMisses:g},i,u)):s.push(r.$_createError("array.includesRequiredUnknowns",n,{unknownMisses:y},i,u))},o.fillOrderedErrors=function(r,s,c,n,i,u){const g=[];for(const y of c)y._flags.presence==="required"&&g.push(y);g.length&&o.fillMissedErrors(r,s,g,n,i,u)},o.fillDefault=function(r,s,c,n){const i=[];let u=!0;for(let g=r.length-1;g>=0;--g){const y=r[g],k=[s,...c.ancestors],w=y.$_validate(void 0,c.localize(c.path,k,y),n).value;if(u){if(w===void 0)continue;u=!1}i.unshift(w)}i.length&&s.push(...i)},o.fastSplice=function(r,s){let c=s;for(;c<r.length;)r[c++]=r[c];--r.length},o.validateSingle=function(r,s){(r.type==="array"||r._flags._arrayItems)&&(a(!s._flags.single,"Cannot specify array item with single rule enabled"),s.$_setFlag("_arrayItems",!0,{clone:!1}))},o.sort=function(r,s,c,n,i){const u=c.order==="ascending"?1:-1,g=-1*u,y=u,k=(w,d)=>{let x=o.compare(w,d,g,y);if(x!==null||(c.by&&(w=c.by.resolve(w,n,i),d=c.by.resolve(d,n,i)),x=o.compare(w,d,g,y),x!==null))return x;const b=typeof w;if(b!==typeof d)throw r.$_createError("array.sort.mismatching",s,null,n,i);if(b!=="number"&&b!=="string")throw r.$_createError("array.sort.unsupported",s,{type:b},n,i);return b==="number"?(w-d)*u:w<d?g:y};try{return{value:s.slice().sort(k)}}catch(w){return{errors:w}}},o.compare=function(r,s,c,n){return r===s?0:r===void 0?1:s===void 0?-1:r===null?n:s===null?c:null}},4937:(_,j,p)=>{const a=p(375),m=p(8068),f=p(8160),h=p(2036),t={isBool:function(l){return typeof l=="boolean"}};_.exports=m.extend({type:"boolean",flags:{sensitive:{default:!1}},terms:{falsy:{init:null,manifest:"values"},truthy:{init:null,manifest:"values"}},coerce(l,{schema:o}){if(typeof l!="boolean"){if(typeof l=="string"){const r=o._flags.sensitive?l:l.toLowerCase();l=r==="true"||r!=="false"&&l}return typeof l!="boolean"&&(l=o.$_terms.truthy&&o.$_terms.truthy.has(l,null,null,!o._flags.sensitive)||(!o.$_terms.falsy||!o.$_terms.falsy.has(l,null,null,!o._flags.sensitive))&&l),{value:l}}},validate(l,{error:o}){if(typeof l!="boolean")return{value:l,errors:o("boolean.base")}},rules:{truthy:{method(...l){f.verifyFlat(l,"truthy");const o=this.clone();o.$_terms.truthy=o.$_terms.truthy||new h;for(let r=0;r<l.length;++r){const s=l[r];a(s!==void 0,"Cannot call truthy with undefined"),o.$_terms.truthy.add(s)}return o}},falsy:{method(...l){f.verifyFlat(l,"falsy");const o=this.clone();o.$_terms.falsy=o.$_terms.falsy||new h;for(let r=0;r<l.length;++r){const s=l[r];a(s!==void 0,"Cannot call falsy with undefined"),o.$_terms.falsy.add(s)}return o}},sensitive:{method(l=!0){return this.$_setFlag("sensitive",l)}}},cast:{number:{from:t.isBool,to:(l,o)=>l?1:0},string:{from:t.isBool,to:(l,o)=>l?"true":"false"}},manifest:{build:(l,o)=>(o.truthy&&(l=l.truthy(...o.truthy)),o.falsy&&(l=l.falsy(...o.falsy)),l)},messages:{"boolean.base":"{{#label}} must be a boolean"}})},7500:(_,j,p)=>{const a=p(375),m=p(8068),f=p(8160),h=p(3328),t={isDate:function(l){return l instanceof Date}};_.exports=m.extend({type:"date",coerce:{from:["number","string"],method:(l,{schema:o})=>({value:t.parse(l,o._flags.format)||l})},validate(l,{schema:o,error:r,prefs:s}){if(l instanceof Date&&!isNaN(l.getTime()))return;const c=o._flags.format;return s.convert&&c&&typeof l=="string"?{value:l,errors:r("date.format",{format:c})}:{value:l,errors:r("date.base")}},rules:{compare:{method:!1,validate(l,o,{date:r},{name:s,operator:c,args:n}){const i=r==="now"?Date.now():r.getTime();return f.compare(l.getTime(),i,c)?l:o.error("date."+s,{limit:n.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 a(["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 a(["javascript","unix"].includes(l),'"type" must be one of "javascript, unix"'),this.format(l)}}},cast:{number:{from:t.isDate,to:(l,o)=>l.getTime()},string:{from:t.isDate,to:(l,{prefs:o})=>h.date(l,o)}},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,o){if(l instanceof Date)return l;if(typeof l!="string"&&(isNaN(l)||!isFinite(l))||/^\s*$/.test(l))return null;if(o==="iso")return f.isIsoDate(l)?t.date(l.toString()):null;const r=l;if(typeof l=="string"&&/^[+-]?\d+(\.\d+)?$/.test(l)&&(l=parseFloat(l)),o){if(o==="javascript")return t.date(1*l);if(o==="unix")return t.date(1e3*l);if(typeof r=="string")return null}return t.date(l)},t.date=function(l){const o=new Date(l);return isNaN(o.getTime())?null:o}},390:(_,j,p)=>{const a=p(375),m=p(7824);_.exports=m.extend({type:"function",properties:{typeof:"function"},rules:{arity:{method(f){return a(Number.isSafeInteger(f)&&f>=0,"n must be a positive integer"),this.$_addRule({name:"arity",args:{n:f}})},validate:(f,h,{n:t})=>f.length===t?f:h.error("function.arity",{n:t})},class:{method(){return this.$_addRule("class")},validate:(f,h)=>/^\s*class\s/.test(f.toString())?f:h.error("function.class",{value:f})},minArity:{method(f){return a(Number.isSafeInteger(f)&&f>0,"n must be a strict positive integer"),this.$_addRule({name:"minArity",args:{n:f}})},validate:(f,h,{n:t})=>f.length>=t?f:h.error("function.minArity",{n:t})},maxArity:{method(f){return a(Number.isSafeInteger(f)&&f>=0,"n must be a positive integer"),this.$_addRule({name:"maxArity",args:{n:f}})},validate:(f,h,{n:t})=>f.length<=t?f:h.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:(_,j,p)=>{const a=p(978),m=p(375),f=p(8571),h=p(3652),t=p(8068),l=p(8160),o=p(3292),r=p(6354),s=p(6133),c=p(3328),n={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:(i,u)=>i.keys(u),validate(i,{schema:u,error:g,state:y,prefs:k}){if(!i||typeof i!==u.$_property("typeof")||Array.isArray(i))return{value:i,errors:g("object.base",{type:u.$_property("typeof")})};if(!(u.$_terms.renames||u.$_terms.dependencies||u.$_terms.keys||u.$_terms.patterns||u.$_terms.externals))return;i=n.clone(i,k);const w=[];if(u.$_terms.renames&&!n.rename(u,i,y,k,w))return{value:i,errors:w};if(!u.$_terms.keys&&!u.$_terms.patterns&&!u.$_terms.dependencies)return{value:i,errors:w};const d=new Set(Object.keys(i));if(u.$_terms.keys){const x=[i,...y.ancestors];for(const b of u.$_terms.keys){const S=b.key,A=i[S];d.delete(S);const P=y.localize([...y.path,S],x,b),L=b.schema.$_validate(A,P,k);if(L.errors){if(k.abortEarly)return{value:i,errors:L.errors};L.value!==void 0&&(i[S]=L.value),w.push(...L.errors)}else b.schema._flags.result==="strip"||L.value===void 0&&A!==void 0?delete i[S]:L.value!==void 0&&(i[S]=L.value)}}if(d.size||u._flags._hasPatternMatch){const x=n.unknown(u,i,d,w,y,k);if(x)return x}if(u.$_terms.dependencies)for(const x of u.$_terms.dependencies){if(x.key!==null&&n.isPresent(x.options)(x.key.resolve(i,y,k,null,{shadow:!1}))===!1)continue;const b=n.dependencies[x.rel](u,x,i,y,k);if(b){const S=u.$_createError(b.code,i,b.context,y,k);if(k.abortEarly)return{value:i,errors:S};w.push(S)}}return{value:i,errors:w}},rules:{and:{method(...i){return l.verifyFlat(i,"and"),n.dependency(this,"and",null,i)}},append:{method(i){return i==null||Object.keys(i).length===0?this:this.keys(i)}},assert:{method(i,u,g){c.isTemplate(i)||(i=o.ref(i)),m(g===void 0||typeof g=="string","Message must be a string"),u=this.$_compile(u,{appendPath:!0});const y=this.$_addRule({name:"assert",args:{subject:i,schema:u,message:g}});return y.$_mutateRegister(i),y.$_mutateRegister(u),y},validate(i,{error:u,prefs:g,state:y},{subject:k,schema:w,message:d}){const x=k.resolve(i,y,g),b=s.isRef(k)?k.absolute(y):[];return w.$_match(x,y.localize(b,[i,...y.ancestors],w),g)?i:u("object.assert",{subject:k,message:d})},args:["subject","schema","message"],multi:!0},instance:{method(i,u){return m(typeof i=="function","constructor must be a function"),u=u||i.name,this.$_addRule({name:"instance",args:{constructor:i,name:u}})},validate:(i,u,{constructor:g,name:y})=>i instanceof g?i:u.error("object.instance",{type:y,value:i}),args:["constructor","name"]},keys:{method(i){m(i===void 0||typeof i=="object","Object schema must be a valid object"),m(!l.isSchema(i),"Object schema cannot be a joi schema");const u=this.clone();if(i)if(Object.keys(i).length){u.$_terms.keys=u.$_terms.keys?u.$_terms.keys.filter(g=>!i.hasOwnProperty(g.key)):new n.Keys;for(const g in i)l.tryWithPath(()=>u.$_terms.keys.push({key:g,schema:this.$_compile(i[g])}),g)}else u.$_terms.keys=new n.Keys;else u.$_terms.keys=null;return u.$_mutateRebuild()}},length:{method(i){return this.$_addRule({name:"length",args:{limit:i},operator:"="})},validate:(i,u,{limit:g},{name:y,operator:k,args:w})=>l.compare(Object.keys(i).length,g,k)?i:u.error("object."+y,{limit:w.limit,value:i}),args:[{name:"limit",ref:!0,assert:l.limit,message:"must be a positive integer"}]},max:{method(i){return this.$_addRule({name:"max",method:"length",args:{limit:i},operator:"<="})}},min:{method(i){return this.$_addRule({name:"min",method:"length",args:{limit:i},operator:">="})}},nand:{method(...i){return l.verifyFlat(i,"nand"),n.dependency(this,"nand",null,i)}},or:{method(...i){return l.verifyFlat(i,"or"),n.dependency(this,"or",null,i)}},oxor:{method(...i){return n.dependency(this,"oxor",null,i)}},pattern:{method(i,u,g={}){const y=i instanceof RegExp;y||(i=this.$_compile(i,{appendPath:!0})),m(u!==void 0,"Invalid rule"),l.assertOptions(g,["fallthrough","matches"]),y&&m(!i.flags.includes("g")&&!i.flags.includes("y"),"pattern should not use global or sticky mode"),u=this.$_compile(u,{appendPath:!0});const k=this.clone();k.$_terms.patterns=k.$_terms.patterns||[];const w={[y?"regex":"schema"]:i,rule:u};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(u),k}},ref:{method(){return this.$_addRule("ref")},validate:(i,u)=>s.isRef(i)?i:u.error("object.refType",{value:i})},regex:{method(){return this.$_addRule("regex")},validate:(i,u)=>i instanceof RegExp?i:u.error("object.regex",{value:i})},rename:{method(i,u,g={}){m(typeof i=="string"||i instanceof RegExp,"Rename missing the from argument"),m(typeof u=="string"||u instanceof c,"Invalid rename to argument"),m(u!==i,"Cannot rename key to same name:",i),l.assertOptions(g,["alias","ignoreUndefined","override","multiple"]);const y=this.clone();y.$_terms.renames=y.$_terms.renames||[];for(const k of y.$_terms.renames)m(k.from!==i,"Cannot rename the same key multiple times");return u instanceof c&&y.$_mutateRegister(u),y.$_terms.renames.push({from:i,to:u,options:a(n.renameDefaults,g)}),y}},schema:{method(i="any"){return this.$_addRule({name:"schema",args:{type:i}})},validate:(i,u,{type:g})=>!l.isSchema(i)||g!=="any"&&i.type!==g?u.error("object.schema",{type:g}):i},unknown:{method(i){return this.$_setFlag("unknown",i!==!1)}},with:{method(i,u,g={}){return n.dependency(this,"with",i,u,g)}},without:{method(i,u,g={}){return n.dependency(this,"without",i,u,g)}},xor:{method(...i){return l.verifyFlat(i,"xor"),n.dependency(this,"xor",null,i)}}},overrides:{default(i,u){return i===void 0&&(i=l.symbols.deepDefault),this.$_parent("default",i,u)}},rebuild(i){if(i.$_terms.keys){const u=new h.Sorter;for(const g of i.$_terms.keys)l.tryWithPath(()=>u.add(g,{after:g.schema.$_rootReferences(),group:g.key}),g.key);i.$_terms.keys=new n.Keys(...u.nodes)}},manifest:{build(i,u){if(u.keys&&(i=i.keys(u.keys)),u.dependencies)for(const{rel:g,key:y=null,peers:k,options:w}of u.dependencies)i=n.dependency(i,g,y,k,w);if(u.patterns)for(const{regex:g,schema:y,rule:k,fallthrough:w,matches:d}of u.patterns)i=i.pattern(g||y,k,{fallthrough:w,matches:d});if(u.renames)for(const{from:g,to:y,options:k}of u.renames)i=i.rename(g,y,k);return i}},messages:{"object.and":"{{#label}} contains {{#presentWithLabels}} without its required peers {{#missingWithLabels}}","object.assert":'{{#label}} is invalid because {if(#subject.key, `"` + #subject.key + `" failed to ` + (#message || "pass the assertion test"), #message || "the assertion failed")}',"object.base":"{{#label}} must be of type {{#type}}","object.instance":"{{#label}} must be an instance of {{:#type}}","object.length":'{{#label}} must have {{#limit}} key{if(#limit == 1, "", "s")}',"object.max":'{{#label}} must have less than or equal to {{#limit}} key{if(#limit == 1, "", "s")}',"object.min":'{{#label}} must have at least {{#limit}} key{if(#limit == 1, "", "s")}',"object.missing":"{{#label}} must contain at least one of {{#peersWithLabels}}","object.nand":"{{:#mainWithLabel}} must not exist simultaneously with {{#peersWithLabels}}","object.oxor":"{{#label}} contains a conflict between optional exclusive peers {{#peersWithLabels}}","object.pattern.match":"{{#label}} keys failed to match pattern requirements","object.refType":"{{#label}} must be a Joi reference","object.regex":"{{#label}} must be a RegExp object","object.rename.multiple":"{{#label}} cannot rename {{:#from}} because multiple renames are disabled and another key was already renamed to {{:#to}}","object.rename.override":"{{#label}} cannot rename {{:#from}} because override is disabled and target {{:#to}} exists","object.schema":"{{#label}} must be a Joi schema of {{#type}} type","object.unknown":"{{#label}} is not allowed","object.with":"{{:#mainWithLabel}} missing required peer {{:#peerWithLabel}}","object.without":"{{:#mainWithLabel}} conflict with forbidden peer {{:#peerWithLabel}}","object.xor":"{{#label}} contains a conflict between exclusive peers {{#peersWithLabels}}"}}),n.clone=function(i,u){if(typeof i=="object"){if(u.nonEnumerables)return f(i,{shallow:!0});const y=Object.create(Object.getPrototypeOf(i));return Object.assign(y,i),y}const g=function(...y){return i.apply(this,y)};return g.prototype=f(i.prototype),Object.defineProperty(g,"name",{value:i.name,writable:!1}),Object.defineProperty(g,"length",{value:i.length,writable:!1}),Object.assign(g,i),g},n.dependency=function(i,u,g,y,k){m(g===null||typeof g=="string",u,"key must be a strings"),k||(k=y.length>1&&typeof y[y.length-1]=="object"?y.pop():{}),l.assertOptions(k,["separator","isPresent"]),y=[].concat(y);const w=l.default(k.separator,"."),d=[];for(const b of y)m(typeof b=="string",u,"peers must be strings"),d.push(o.ref(b,{separator:w,ancestor:0,prefix:!1}));g!==null&&(g=o.ref(g,{separator:w,ancestor:0,prefix:!1}));const x=i.clone();return x.$_terms.dependencies=x.$_terms.dependencies||[],x.$_terms.dependencies.push(new n.Dependency(u,g,d,y,k)),x},n.dependencies={and(i,u,g,y,k){const w=[],d=[],x=u.peers.length,b=n.isPresent(u.options);for(const S of u.peers)b(S.resolve(g,y,k,null,{shadow:!1}))===!1?w.push(S.key):d.push(S.key);if(w.length!==x&&d.length!==x)return{code:"object.and",context:{present:d,presentWithLabels:n.keysToLabels(i,d),missing:w,missingWithLabels:n.keysToLabels(i,w)}}},nand(i,u,g,y,k){const w=[],d=n.isPresent(u.options);for(const S of u.peers)d(S.resolve(g,y,k,null,{shadow:!1}))&&w.push(S.key);if(w.length!==u.peers.length)return;const x=u.paths[0],b=u.paths.slice(1);return{code:"object.nand",context:{main:x,mainWithLabel:n.keysToLabels(i,x),peers:b,peersWithLabels:n.keysToLabels(i,b)}}},or(i,u,g,y,k){const w=n.isPresent(u.options);for(const d of u.peers)if(w(d.resolve(g,y,k,null,{shadow:!1})))return;return{code:"object.missing",context:{peers:u.paths,peersWithLabels:n.keysToLabels(i,u.paths)}}},oxor(i,u,g,y,k){const w=[],d=n.isPresent(u.options);for(const b of u.peers)d(b.resolve(g,y,k,null,{shadow:!1}))&&w.push(b.key);if(!w.length||w.length===1)return;const x={peers:u.paths,peersWithLabels:n.keysToLabels(i,u.paths)};return x.present=w,x.presentWithLabels=n.keysToLabels(i,w),{code:"object.oxor",context:x}},with(i,u,g,y,k){const w=n.isPresent(u.options);for(const d of u.peers)if(w(d.resolve(g,y,k,null,{shadow:!1}))===!1)return{code:"object.with",context:{main:u.key.key,mainWithLabel:n.keysToLabels(i,u.key.key),peer:d.key,peerWithLabel:n.keysToLabels(i,d.key)}}},without(i,u,g,y,k){const w=n.isPresent(u.options);for(const d of u.peers)if(w(d.resolve(g,y,k,null,{shadow:!1})))return{code:"object.without",context:{main:u.key.key,mainWithLabel:n.keysToLabels(i,u.key.key),peer:d.key,peerWithLabel:n.keysToLabels(i,d.key)}}},xor(i,u,g,y,k){const w=[],d=n.isPresent(u.options);for(const b of u.peers)d(b.resolve(g,y,k,null,{shadow:!1}))&&w.push(b.key);if(w.length===1)return;const x={peers:u.paths,peersWithLabels:n.keysToLabels(i,u.paths)};return w.length===0?{code:"object.missing",context:x}:(x.present=w,x.presentWithLabels=n.keysToLabels(i,w),{code:"object.xor",context:x})}},n.keysToLabels=function(i,u){return Array.isArray(u)?u.map(g=>i.$_mapLabels(g)):i.$_mapLabels(u)},n.isPresent=function(i){return typeof i.isPresent=="function"?i.isPresent:u=>u!==void 0},n.rename=function(i,u,g,y,k){const w={};for(const d of i.$_terms.renames){const x=[],b=typeof d.from!="string";if(b)for(const S in u){if(u[S]===void 0&&d.options.ignoreUndefined||S===d.to)continue;const A=d.from.exec(S);A&&x.push({from:S,to:d.to,match:A})}else!Object.prototype.hasOwnProperty.call(u,d.from)||u[d.from]===void 0&&d.options.ignoreUndefined||x.push(d);for(const S of x){const A=S.from;let P=S.to;if(P instanceof c&&(P=P.render(u,g,y,S.match)),A!==P){if(!d.options.multiple&&w[P]&&(k.push(i.$_createError("object.rename.multiple",u,{from:A,to:P,pattern:b},g,y)),y.abortEarly)||Object.prototype.hasOwnProperty.call(u,P)&&!d.options.override&&!w[P]&&(k.push(i.$_createError("object.rename.override",u,{from:A,to:P,pattern:b},g,y)),y.abortEarly))return!1;u[A]===void 0?delete u[P]:u[P]=u[A],w[P]=!0,d.options.alias||delete u[A]}}}return!0},n.unknown=function(i,u,g,y,k,w){if(i.$_terms.patterns){let d=!1;const x=i.$_terms.patterns.map(S=>{if(S.matches)return d=!0,[]}),b=[u,...k.ancestors];for(const S of g){const A=u[S],P=[...k.path,S];for(let L=0;L<i.$_terms.patterns.length;++L){const D=i.$_terms.patterns[L];if(D.regex){const z=D.regex.test(S);if(k.mainstay.tracer.debug(k,"rule",`pattern.${L}`,z?"pass":"error"),!z)continue}else if(!D.schema.$_match(S,k.nest(D.schema,`pattern.${L}`),w))continue;g.delete(S);const N=k.localize(P,b,{schema:D.rule,key:S}),V=D.rule.$_validate(A,N,w);if(V.errors){if(w.abortEarly)return{value:u,errors:V.errors};y.push(...V.errors)}if(D.matches&&x[L].push(S),u[S]=V.value,!D.fallthrough)break}}if(d)for(let S=0;S<x.length;++S){const A=x[S];if(!A)continue;const P=i.$_terms.patterns[S].matches,L=k.localize(k.path,b,P),D=P.$_validate(A,L,w);if(D.errors){const N=r.details(D.errors,{override:!1});N.matches=A;const V=i.$_createError("object.pattern.match",u,N,k,w);if(w.abortEarly)return{value:u,errors:V};y.push(V)}}}if(g.size&&(i.$_terms.keys||i.$_terms.patterns)){if(w.stripUnknown&&i._flags.unknown===void 0||w.skipFunctions){const d=!(!w.stripUnknown||w.stripUnknown!==!0&&!w.stripUnknown.objects);for(const x of g)d?(delete u[x],g.delete(x)):typeof u[x]=="function"&&g.delete(x)}if(!l.default(i._flags.unknown,w.allowUnknown))for(const d of g){const x=k.localize([...k.path,d],[]),b=i.$_createError("object.unknown",u[d],{child:d},x,w,{flags:!1});if(w.abortEarly)return{value:u,errors:b};y.push(b)}}},n.Dependency=class{constructor(i,u,g,y,k){this.rel=i,this.key=u,this.peers=g,this.paths=y,this.options=k}describe(){const i={rel:this.rel,peers:this.paths};return this.key!==null&&(i.key=this.key.key),this.peers[0].separator!=="."&&(i.options={...i.options,separator:this.peers[0].separator}),this.options.isPresent&&(i.options={...i.options,isPresent:this.options.isPresent}),i}},n.Keys=class extends Array{concat(i){const u=this.slice(),g=new Map;for(let y=0;y<u.length;++y)g.set(u[y].key,y);for(const y of i){const k=y.key,w=g.get(k);w!==void 0?u[w]={key:k,schema:u[w].schema.concat(y.schema)}:u.push(y)}return u}}},8785:(_,j,p)=>{const a=p(375),m=p(8068),f=p(8160),h=p(3292),t=p(6354),l={};_.exports=m.extend({type:"link",properties:{schemaChain:!0},terms:{link:{init:null,manifest:"single",register:!1}},args:(o,r)=>o.ref(r),validate(o,{schema:r,state:s,prefs:c}){a(r.$_terms.link,"Uninitialized link schema");const n=l.generate(r,o,s,c),i=r.$_terms.link[0].ref;return n.$_validate(o,s.nest(n,`link:${i.display}:${n.type}`),c)},generate:(o,r,s,c)=>l.generate(o,r,s,c),rules:{ref:{method(o){a(!this.$_terms.link,"Cannot reinitialize schema"),o=h.ref(o),a(o.type==="value"||o.type==="local","Invalid reference type:",o.type),a(o.type==="local"||o.ancestor==="root"||o.ancestor>0,"Link cannot reference itself");const r=this.clone();return r.$_terms.link=[{ref:o}],r}},relative:{method(o=!0){return this.$_setFlag("relative",o)}}},overrides:{concat(o){a(this.$_terms.link,"Uninitialized link schema"),a(f.isSchema(o),"Invalid schema object"),a(o.type!=="link","Cannot merge type link with another link");const r=this.clone();return r.$_terms.whens||(r.$_terms.whens=[]),r.$_terms.whens.push({concat:o}),r.$_mutateRebuild()}},manifest:{build:(o,r)=>(a(r.link,"Invalid link description missing link"),o.ref(r.link))}}),l.generate=function(o,r,s,c){let n=s.mainstay.links.get(o);if(n)return n._generate(r,s,c).schema;const i=o.$_terms.link[0].ref,{perspective:u,path:g}=l.perspective(i,s);l.assert(u,"which is outside of schema boundaries",i,o,s,c);try{n=g.length?u.$_reach(g):u}catch{l.assert(!1,"to non-existing schema",i,o,s,c)}return l.assert(n.type!=="link","which is another link",i,o,s,c),o._flags.relative||s.mainstay.links.set(o,n),n._generate(r,s,c).schema},l.perspective=function(o,r){if(o.type==="local"){for(const{schema:s,key:c}of r.schemas){if((s._flags.id||c)===o.path[0])return{perspective:s,path:o.path.slice(1)};if(s.$_terms.shared){for(const n of s.$_terms.shared)if(n._flags.id===o.path[0])return{perspective:n,path:o.path.slice(1)}}}return{perspective:null,path:null}}return o.ancestor==="root"?{perspective:r.schemas[r.schemas.length-1].schema,path:o.path}:{perspective:r.schemas[o.ancestor]&&r.schemas[o.ancestor].schema,path:o.path}},l.assert=function(o,r,s,c,n,i){o||a(!1,`"${t.label(c._flags,n,i)}" contains link reference "${s.display}" ${r}`)}},3832:(_,j,p)=>{const a=p(375),m=p(8068),f=p(8160),h={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(),o=l.indexOf("."),r=l.indexOf("e");return(o<0?0:(r<0?l.length:r)-o-1)+(r<0?0:Math.max(0,-parseInt(l.slice(r+1))))}};_.exports=m.extend({type:"number",flags:{unsafe:{default:!1}},coerce:{from:"string",method(t,{schema:l,error:o}){if(!t.match(h.numberRx))return;t=t.trim();const r={value:parseFloat(t)};if(r.value===0&&(r.value=0),!l._flags.unsafe)if(t.match(/e/i)){if(h.extractSignificantDigits(t)!==h.extractSignificantDigits(String(r.value)))return r.errors=o("number.unsafe"),r}else{const s=r.value.toString();if(s.match(/e/i))return r;if(s!==h.normalizeDecimal(t))return r.errors=o("number.unsafe"),r}return r}},validate(t,{schema:l,error:o,prefs:r}){if(t===1/0||t===-1/0)return{value:t,errors:o("number.infinity")};if(!f.isNumber(t))return{value:t,errors:o("number.base")};const s={value:t};if(r.convert){const c=l.$_getRule("precision");if(c){const n=Math.pow(10,c.args.limit);s.value=Math.round(s.value*n)/n}}return s.value===0&&(s.value=0),!l._flags.unsafe&&(t>Number.MAX_SAFE_INTEGER||t<Number.MIN_SAFE_INTEGER)&&(s.errors=o("number.unsafe")),s},rules:{compare:{method:!1,validate:(t,l,{limit:o},{name:r,operator:s,args:c})=>f.compare(t,o,s)?t:l.error("number."+r,{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"?h.decimalPlaces(t):null,o=Math.pow(10,l);return this.$_addRule({name:"multiple",args:{base:t,baseDecimalPlace:l,pfactor:o}})},validate:(t,l,{base:o,baseDecimalPlace:r,pfactor:s},c)=>h.decimalPlaces(t)>r?l.error("number.multiple",{multiple:c.args.base,value:t}):Math.round(s*t)%Math.round(s*o)==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 a(Number.isSafeInteger(t),"limit must be an integer"),this.$_addRule({name:"precision",args:{limit:t}})},validate(t,l,{limit:o}){const r=t.toString().match(h.precisionRx);return Math.max((r[1]?r[1].length:0)-(r[2]?parseInt(r[2],10):0),0)<=o?t:l.error("number.precision",{limit:o,value:t})},convert:!0},sign:{method(t){return a(["negative","positive"].includes(t),"Invalid sign",t),this.$_addRule({name:"sign",args:{sign:t}})},validate:(t,l,{sign:o})=>o==="negative"&&t<0||o==="positive"&&t>0?t:l.error(`number.${o}`)},unsafe:{method(t=!0){return a(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"}}),h.extractSignificantDigits=function(t){return t.replace(h.exponentialPartRegex,"").replace(h.dotRegex,"").replace(h.trailingZerosRegex,"").replace(h.leadingSignAndZerosRegex,"")},h.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:(_,j,p)=>{const a=p(7824);_.exports=a.extend({type:"object",cast:{map:{from:m=>m&&typeof m=="object",to:(m,f)=>new Map(Object.entries(m))}}})},7417:(_,j,p)=>{const a=p(375),m=p(5380),f=p(1745),h=p(9959),t=p(6064),l=p(9926),o=p(5752),r=p(8068),s=p(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:h.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=r.extend({type:"string",flags:{insensitive:{default:!1},truncate:{default:!1}},terms:{replacements:{init:null}},coerce:{from:"string",method(n,{schema:i,state:u,prefs:g}){const y=i.$_getRule("normalize");y&&(n=n.normalize(y.args.form));const k=i.$_getRule("case");k&&(n=k.args.direction==="upper"?n.toLocaleUpperCase():n.toLocaleLowerCase());const w=i.$_getRule("trim");if(w&&w.args.enabled&&(n=n.trim()),i.$_terms.replacements)for(const x of i.$_terms.replacements)n=n.replace(x.pattern,x.replacement);const d=i.$_getRule("hex");if(d&&d.args.options.byteAligned&&n.length%2!=0&&(n=`0${n}`),i.$_getRule("isoDate")){const x=c.isoDate(n);x&&(n=x)}if(i._flags.truncate){const x=i.$_getRule("max");if(x){let b=x.args.limit;if(s.isResolvable(b)&&(b=b.resolve(n,u,g),!s.limit(b)))return{value:n,errors:i.$_createError("any.ref",b,{ref:x.args.limit,arg:"limit",reason:"must be a positive integer"},u,g)};n=n.slice(0,b)}}return{value:n}}},validate(n,{schema:i,error:u}){if(typeof n!="string")return{value:n,errors:u("string.base")};if(n===""){const g=i.$_getRule("min");return g&&g.args.limit===0?void 0:{value:n,errors:u("string.empty")}}},rules:{alphanum:{method(){return this.$_addRule("alphanum")},validate:(n,i)=>/^[a-zA-Z0-9]+$/.test(n)?n:i.error("string.alphanum")},base64:{method(n={}){return s.assertOptions(n,["paddingRequired","urlSafe"]),n={urlSafe:!1,paddingRequired:!0,...n},a(typeof n.paddingRequired=="boolean","paddingRequired must be boolean"),a(typeof n.urlSafe=="boolean","urlSafe must be boolean"),this.$_addRule({name:"base64",args:{options:n}})},validate:(n,i,{options:u})=>c.base64Regex[u.paddingRequired][u.urlSafe].test(n)?n:i.error("string.base64")},case:{method(n){return a(["lower","upper"].includes(n),"Invalid case:",n),this.$_addRule({name:"case",args:{direction:n}})},validate:(n,i,{direction:u})=>u==="lower"&&n===n.toLocaleLowerCase()||u==="upper"&&n===n.toLocaleUpperCase()?n:i.error(`string.${u}case`),convert:!0},creditCard:{method(){return this.$_addRule("creditCard")},validate(n,i){let u=n.length,g=0,y=1;for(;u--;){const k=n.charAt(u)*y;g+=k-9*(k>9),y^=3}return g>0&&g%10==0?n:i.error("string.creditCard")}},dataUri:{method(n={}){return s.assertOptions(n,["paddingRequired"]),n={paddingRequired:!0,...n},a(typeof n.paddingRequired=="boolean","paddingRequired must be boolean"),this.$_addRule({name:"dataUri",args:{options:n}})},validate(n,i,{options:u}){const g=n.match(c.dataUriRegex);return g&&(!g[2]||g[2]!=="base64"||c.base64Regex[u.paddingRequired].false.test(g[3]))?n:i.error("string.dataUri")}},domain:{method(n){n&&s.assertOptions(n,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"]);const i=c.addressOptions(n);return this.$_addRule({name:"domain",args:{options:n},address:i})},validate:(n,i,u,{address:g})=>m.isValid(n,g)?n:i.error("string.domain")},email:{method(n={}){s.assertOptions(n,["allowFullyQualified","allowUnicode","ignoreLength","maxDomainSegments","minDomainSegments","multiple","separator","tlds"]),a(n.multiple===void 0||typeof n.multiple=="boolean","multiple option must be an boolean");const i=c.addressOptions(n),u=new RegExp(`\\s*[${n.separator?t(n.separator):","}]\\s*`);return this.$_addRule({name:"email",args:{options:n},regex:u,address:i})},validate(n,i,{options:u},{regex:g,address:y}){const k=u.multiple?n.split(g):[n],w=[];for(const d of k)f.isValid(d,y)||w.push(d);return w.length?i.error("string.email",{value:n,invalids:w}):n}},guid:{alias:"uuid",method(n={}){s.assertOptions(n,["version","separator"]);let i="";if(n.version){const y=[].concat(n.version);a(y.length>=1,"version must have at least 1 valid version specified");const k=new Set;for(let w=0;w<y.length;++w){const d=y[w];a(typeof d=="string","version at position "+w+" must be a string");const x=c.guidVersions[d.toLowerCase()];a(x,"version at position "+w+" must be one of "+Object.keys(c.guidVersions).join(", ")),a(!k.has(x),"version at position "+w+" must not be a duplicate"),i+=x,k.add(x)}}a(c.guidSeparators.has(n.separator),'separator must be one of true, false, "-", or ":"');const u=n.separator===void 0?"[:-]?":n.separator===!0?"[:-]":n.separator===!1?"[]?":`\\${n.separator}`,g=new RegExp(`^([\\[{\\(]?)[0-9A-F]{8}(${u})[0-9A-F]{4}\\2?[${i||"0-9A-F"}][0-9A-F]{3}\\2?[${i?"89AB":"0-9A-F"}][0-9A-F]{3}\\2?[0-9A-F]{12}([\\]}\\)]?)$`,"i");return this.$_addRule({name:"guid",args:{options:n},regex:g})},validate(n,i,u,{regex:g}){const y=g.exec(n);return y?c.guidBrackets[y[1]]!==y[y.length-1]?i.error("string.guid"):n:i.error("string.guid")}},hex:{method(n={}){return s.assertOptions(n,["byteAligned","prefix"]),n={byteAligned:!1,prefix:!1,...n},a(typeof n.byteAligned=="boolean","byteAligned must be boolean"),a(typeof n.prefix=="boolean"||n.prefix==="optional",'prefix must be boolean or "optional"'),this.$_addRule({name:"hex",args:{options:n}})},validate:(n,i,{options:u})=>(u.prefix==="optional"?c.hexRegex.withOptionalPrefix:u.prefix===!0?c.hexRegex.withPrefix:c.hexRegex.withoutPrefix).test(n)?u.byteAligned&&n.length%2!=0?i.error("string.hexAlign"):n:i.error("string.hex")},hostname:{method(){return this.$_addRule("hostname")},validate:(n,i)=>m.isValid(n,{minDomainSegments:1})||c.ipRegex.test(n)?n:i.error("string.hostname")},insensitive:{method(){return this.$_setFlag("insensitive",!0)}},ip:{method(n={}){s.assertOptions(n,["cidr","version"]);const{cidr:i,versions:u,regex:g}=h.regex(n),y=n.version?u:void 0;return this.$_addRule({name:"ip",args:{options:{cidr:i,version:y}},regex:g})},validate:(n,i,{options:u},{regex:g})=>g.test(n)?n:u.version?i.error("string.ipVersion",{value:n,cidr:u.cidr,version:u.version}):i.error("string.ip",{value:n,cidr:u.cidr})},isoDate:{method(){return this.$_addRule("isoDate")},validate:(n,{error:i})=>c.isoDate(n)?n:i("string.isoDate")},isoDuration:{method(){return this.$_addRule("isoDuration")},validate:(n,i)=>c.isoDurationRegex.test(n)?n:i.error("string.isoDuration")},length:{method(n,i){return c.length(this,"length",n,"=",i)},validate(n,i,{limit:u,encoding:g},{name:y,operator:k,args:w}){const d=!g&&n.length;return s.compare(d,u,k)?n:i.error("string."+y,{limit:w.limit,value:n,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(n,i){return c.length(this,"max",n,"<=",i)},args:["limit","encoding"]},min:{method(n,i){return c.length(this,"min",n,">=",i)},args:["limit","encoding"]},normalize:{method(n="NFC"){return a(c.normalizationForms.includes(n),"normalization form must be one of "+c.normalizationForms.join(", ")),this.$_addRule({name:"normalize",args:{form:n}})},validate:(n,{error:i},{form:u})=>n===n.normalize(u)?n:i("string.normalize",{value:n,form:u}),convert:!0},pattern:{alias:"regex",method(n,i={}){a(n instanceof RegExp,"regex must be a RegExp"),a(!n.flags.includes("g")&&!n.flags.includes("y"),"regex should not use global or sticky mode"),typeof i=="string"&&(i={name:i}),s.assertOptions(i,["invert","name"]);const u=["string.pattern",i.invert?".invert":"",i.name?".name":".base"].join("");return this.$_addRule({name:"pattern",args:{regex:n,options:i},errorCode:u})},validate:(n,i,{regex:u,options:g},{errorCode:y})=>u.test(n)^g.invert?n:i.error(y,{name:g.name,regex:u,value:n}),args:["regex","options"],multi:!0},replace:{method(n,i){typeof n=="string"&&(n=new RegExp(t(n),"g")),a(n instanceof RegExp,"pattern must be a RegExp"),a(typeof i=="string","replacement must be a String");const u=this.clone();return u.$_terms.replacements||(u.$_terms.replacements=[]),u.$_terms.replacements.push({pattern:n,replacement:i}),u}},token:{method(){return this.$_addRule("token")},validate:(n,i)=>/^\w+$/.test(n)?n:i.error("string.token")},trim:{method(n=!0){return a(typeof n=="boolean","enabled must be a boolean"),this.$_addRule({name:"trim",args:{enabled:n}})},validate:(n,i,{enabled:u})=>u&&n!==n.trim()?i.error("string.trim"):n,convert:!0},truncate:{method(n=!0){return a(typeof n=="boolean","enabled must be a boolean"),this.$_setFlag("truncate",n)}},uppercase:{method(){return this.case("upper")}},uri:{method(n={}){s.assertOptions(n,["allowRelative","allowQuerySquareBrackets","domain","relativeOnly","scheme","encodeUri"]),n.domain&&s.assertOptions(n.domain,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"]);const{regex:i,scheme:u}=o.regex(n),g=n.domain?c.addressOptions(n.domain):null;return this.$_addRule({name:"uri",args:{options:n},regex:i,domain:g,scheme:u})},validate(n,i,{options:u},{regex:g,domain:y,scheme:k}){if(["http:/","https:/"].includes(n))return i.error("string.uri");let w=g.exec(n);if(!w&&i.prefs.convert&&u.encodeUri){const d=encodeURI(n);w=g.exec(d),w&&(n=d)}if(w){const d=w[1]||w[2];return!y||u.allowRelative&&!d||m.isValid(d,y)?n:i.error("string.domain",{value:d})}return u.relativeOnly?i.error("string.uriRelativeOnly"):u.scheme?i.error("string.uriCustomScheme",{scheme:k,value:n}):i.error("string.uri")}}},manifest:{build(n,i){if(i.replacements)for(const{pattern:u,replacement:g}of i.replacements)n=n.replace(u,g);return n}},messages:{"string.alphanum":"{{#label}} must only contain alpha-numeric characters","string.base":"{{#label}} must be a string","string.base64":"{{#label}} must be a valid base64 string","string.creditCard":"{{#label}} must be a credit card","string.dataUri":"{{#label}} must be a valid dataUri string","string.domain":"{{#label}} must contain a valid domain name","string.email":"{{#label}} must be a valid email","string.empty":"{{#label}} is not allowed to be empty","string.guid":"{{#label}} must be a valid GUID","string.hex":"{{#label}} must only contain hexadecimal characters","string.hexAlign":"{{#label}} hex decoded representation must be byte aligned","string.hostname":"{{#label}} must be a valid hostname","string.ip":"{{#label}} must be a valid ip address with a {{#cidr}} CIDR","string.ipVersion":"{{#label}} must be a valid ip address of one of the following versions {{#version}} with a {{#cidr}} CIDR","string.isoDate":"{{#label}} must be in iso format","string.isoDuration":"{{#label}} must be a valid ISO 8601 duration","string.length":"{{#label}} length must be {{#limit}} characters long","string.lowercase":"{{#label}} must only contain lowercase characters","string.max":"{{#label}} length must be less than or equal to {{#limit}} characters long","string.min":"{{#label}} length must be at least {{#limit}} characters long","string.normalize":"{{#label}} must be unicode normalized in the {{#form}} form","string.token":"{{#label}} must only contain alpha-numeric and underscore characters","string.pattern.base":"{{#label}} with value {:[.]} fails to match the required pattern: {{#regex}}","string.pattern.name":"{{#label}} with value {:[.]} fails to match the {{#name}} pattern","string.pattern.invert.base":"{{#label}} with value {:[.]} matches the inverted pattern: {{#regex}}","string.pattern.invert.name":"{{#label}} with value {:[.]} matches the inverted {{#name}} pattern","string.trim":"{{#label}} must not have leading or trailing whitespace","string.uri":"{{#label}} must be a valid uri","string.uriCustomScheme":"{{#label}} must be a valid uri with a scheme matching the {{#scheme}} pattern","string.uriRelativeOnly":"{{#label}} must be a valid relative uri","string.uppercase":"{{#label}} must only contain uppercase characters"}}),c.addressOptions=function(n){if(!n)return c.tlds||n;if(a(n.minDomainSegments===void 0||Number.isSafeInteger(n.minDomainSegments)&&n.minDomainSegments>0,"minDomainSegments must be a positive integer"),a(n.maxDomainSegments===void 0||Number.isSafeInteger(n.maxDomainSegments)&&n.maxDomainSegments>0,"maxDomainSegments must be a positive integer"),n.tlds===!1)return n;if(n.tlds===!0||n.tlds===void 0)return a(c.tlds,"Built-in TLD list disabled"),Object.assign({},n,c.tlds);a(typeof n.tlds=="object","tlds must be true, false, or an object");const i=n.tlds.deny;if(i)return Array.isArray(i)&&(n=Object.assign({},n,{tlds:{deny:new Set(i)}})),a(n.tlds.deny instanceof Set,"tlds.deny must be an array, Set, or boolean"),a(!n.tlds.allow,"Cannot specify both tlds.allow and tlds.deny lists"),c.validateTlds(n.tlds.deny,"tlds.deny"),n;const u=n.tlds.allow;return u?u===!0?(a(c.tlds,"Built-in TLD list disabled"),Object.assign({},n,c.tlds)):(Array.isArray(u)&&(n=Object.assign({},n,{tlds:{allow:new Set(u)}})),a(n.tlds.allow instanceof Set,"tlds.allow must be an array, Set, or boolean"),c.validateTlds(n.tlds.allow,"tlds.allow"),n):n},c.validateTlds=function(n,i){for(const u of n)a(m.isValid(u,{minDomainSegments:1,maxDomainSegments:1}),`${i} must contain valid top level domain names`)},c.isoDate=function(n){if(!s.isIsoDate(n))return null;/.*T.*[+-]\d\d$/.test(n)&&(n+="00");const i=new Date(n);return isNaN(i.getTime())?null:i.toISOString()},c.length=function(n,i,u,g,y){return a(!y||!1,"Invalid encoding:",y),n.$_addRule({name:i,method:"length",args:{limit:u,encoding:y},operator:g})}},8826:(_,j,p)=>{const a=p(375),m=p(8068),f={};f.Map=class extends Map{slice(){return new f.Map(this)}},_.exports=m.extend({type:"symbol",terms:{map:{init:new f.Map}},coerce:{method(h,{schema:t,error:l}){const o=t.$_terms.map.get(h);return o&&(h=o),t._flags.only&&typeof h!="symbol"?{value:h,errors:l("symbol.map",{map:t.$_terms.map})}:{value:h}}},validate(h,{error:t}){if(typeof h!="symbol")return{value:h,errors:t("symbol.base")}},rules:{map:{method(h){h&&!h[Symbol.iterator]&&typeof h=="object"&&(h=Object.entries(h)),a(h&&h[Symbol.iterator],"Iterable must be an iterable or object");const t=this.clone(),l=[];for(const o of h){a(o&&o[Symbol.iterator],"Entry must be an iterable");const[r,s]=o;a(typeof r!="object"&&typeof r!="function"&&typeof r!="symbol","Key must not be of type object, function, or Symbol"),a(typeof s=="symbol","Value must be a Symbol"),t.$_terms.map.set(r,s),l.push(s)}return t.valid(...l)}}},manifest:{build:(h,t)=>(t.map&&(h=h.map(t.map)),h)},messages:{"symbol.base":"{{#label}} must be a symbol","symbol.map":"{{#label}} must be one of {{#map}}"}})},8863:(_,j,p)=>{const a=p(375),m=p(8571),f=p(738),h=p(9621),t=p(8160),l=p(6354),o=p(493),r={result:Symbol("result")};j.entry=function(s,c,n){let i=t.defaults;n&&(a(n.warnings===void 0,"Cannot override warnings preference in synchronous validation"),a(n.artifacts===void 0,"Cannot override artifacts preference in synchronous validation"),i=t.preferences(t.defaults,n));const u=r.entry(s,c,i);a(!u.mainstay.externals.length,"Schema with external rules must use validateAsync()");const g={value:u.value};return u.error&&(g.error=u.error),u.mainstay.warnings.length&&(g.warning=l.details(u.mainstay.warnings)),u.mainstay.debug&&(g.debug=u.mainstay.debug),u.mainstay.artifacts&&(g.artifacts=u.mainstay.artifacts),g},j.entryAsync=async function(s,c,n){let i=t.defaults;n&&(i=t.preferences(t.defaults,n));const u=r.entry(s,c,i),g=u.mainstay;if(u.error)throw g.debug&&(u.error.debug=g.debug),u.error;if(g.externals.length){let k=u.value;const w=[];for(const d of g.externals){const x=d.state.path,b=d.schema.type==="link"?g.links.get(d.schema):null;let S,A,P=k;const L=x.length?[k]:[],D=x.length?h(s,x):s;if(x.length){S=x[x.length-1];let N=k;for(const V of x.slice(0,-1))N=N[V],L.unshift(N);A=L[0],P=A[S]}try{const N=(z,I)=>(b||d.schema).$_createError(z,P,I,d.state,i),V=await d.method(P,{schema:d.schema,linked:b,state:d.state,prefs:n,original:D,error:N,errorsArray:r.errorsArray,warn:(z,I)=>g.warnings.push((b||d.schema).$_createError(z,P,I,d.state,i)),message:(z,I)=>(b||d.schema).$_createError("external",P,I,d.state,i,{messages:z})});if(V===void 0||V===P)continue;if(V instanceof l.Report){if(g.tracer.log(d.schema,d.state,"rule","external","error"),w.push(V),i.abortEarly)break;continue}if(Array.isArray(V)&&V[t.symbols.errors]){if(g.tracer.log(d.schema,d.state,"rule","external","error"),w.push(...V),i.abortEarly)break;continue}A?(g.tracer.value(d.state,"rule",P,V,"external"),A[S]=V):(g.tracer.value(d.state,"rule",k,V,"external"),k=V)}catch(N){throw i.errors.label&&(N.message+=` (${d.label})`),N}}if(u.value=k,w.length)throw u.error=l.process(w,s,i),g.debug&&(u.error.debug=g.debug),u.error}if(!i.warnings&&!i.debug&&!i.artifacts)return u.value;const y={value:u.value};return g.warnings.length&&(y.warning=l.details(g.warnings)),g.debug&&(y.debug=g.debug),g.artifacts&&(y.artifacts=g.artifacts),y},r.Mainstay=class{constructor(s,c,n){this.externals=[],this.warnings=[],this.tracer=s,this.debug=c,this.links=n,this.shadow=null,this.artifacts=null,this._snapshots=[]}snapshot(){this._snapshots.push({externals:this.externals.slice(),warnings:this.warnings.slice()})}restore(){const s=this._snapshots.pop();this.externals=s.externals,this.warnings=s.warnings}commit(){this._snapshots.pop()}},r.entry=function(s,c,n){const{tracer:i,cleanup:u}=r.tracer(c,n),g=n.debug?[]:null,y=c._ids._schemaChain?new Map:null,k=new r.Mainstay(i,g,y),w=c._ids._schemaChain?[{schema:c}]:null,d=new o([],[],{mainstay:k,schemas:w}),x=j.validate(s,c,d,n);u&&c.$_root.untrace();const b=l.process(x.errors,s,n);return{value:x.value,error:b,mainstay:k}},r.tracer=function(s,c){return s.$_root._tracer?{tracer:s.$_root._tracer._register(s)}:c.debug?(a(s.$_root.trace,"Debug mode not supported"),{tracer:s.$_root.trace()._register(s),cleanup:!0}):{tracer:r.ignore}},j.validate=function(s,c,n,i,u={}){if(c.$_terms.whens&&(c=c._generate(s,n,i).schema),c._preferences&&(i=r.prefs(c,i)),c._cache&&i.cache){const b=c._cache.get(s);if(n.mainstay.tracer.debug(n,"validate","cached",!!b),b)return b}const g=(b,S,A)=>c.$_createError(b,s,S,A||n,i),y={original:s,prefs:i,schema:c,state:n,error:g,errorsArray:r.errorsArray,warn:(b,S,A)=>n.mainstay.warnings.push(g(b,S,A)),message:(b,S)=>c.$_createError("custom",s,S,n,i,{messages:b})};n.mainstay.tracer.entry(c,n);const k=c._definition;if(k.prepare&&s!==void 0&&i.convert){const b=k.prepare(s,y);if(b){if(n.mainstay.tracer.value(n,"prepare",s,b.value),b.errors)return r.finalize(b.value,[].concat(b.errors),y);s=b.value}}if(k.coerce&&s!==void 0&&i.convert&&(!k.coerce.from||k.coerce.from.includes(typeof s))){const b=k.coerce.method(s,y);if(b){if(n.mainstay.tracer.value(n,"coerced",s,b.value),b.errors)return r.finalize(b.value,[].concat(b.errors),y);s=b.value}}const w=c._flags.empty;w&&w.$_match(r.trim(s,c),n.nest(w),t.defaults)&&(n.mainstay.tracer.value(n,"empty",s,void 0),s=void 0);const d=u.presence||c._flags.presence||(c._flags._endedSwitch?null:i.presence);if(s===void 0){if(d==="forbidden")return r.finalize(s,null,y);if(d==="required")return r.finalize(s,[c.$_createError("any.required",s,null,n,i)],y);if(d==="optional"){if(c._flags.default!==t.symbols.deepDefault)return r.finalize(s,null,y);n.mainstay.tracer.value(n,"default",s,{}),s={}}}else if(d==="forbidden")return r.finalize(s,[c.$_createError("any.unknown",s,null,n,i)],y);const x=[];if(c._valids){const b=c._valids.get(s,n,i,c._flags.insensitive);if(b)return i.convert&&(n.mainstay.tracer.value(n,"valids",s,b.value),s=b.value),n.mainstay.tracer.filter(c,n,"valid",b),r.finalize(s,null,y);if(c._flags.only){const S=c.$_createError("any.only",s,{valids:c._valids.values({display:!0})},n,i);if(i.abortEarly)return r.finalize(s,[S],y);x.push(S)}}if(c._invalids){const b=c._invalids.get(s,n,i,c._flags.insensitive);if(b){n.mainstay.tracer.filter(c,n,"invalid",b);const S=c.$_createError("any.invalid",s,{invalids:c._invalids.values({display:!0})},n,i);if(i.abortEarly)return r.finalize(s,[S],y);x.push(S)}}if(k.validate){const b=k.validate(s,y);if(b&&(n.mainstay.tracer.value(n,"base",s,b.value),s=b.value,b.errors)){if(!Array.isArray(b.errors))return x.push(b.errors),r.finalize(s,x,y);if(b.errors.length)return x.push(...b.errors),r.finalize(s,x,y)}}return c._rules.length?r.rules(s,x,y):r.finalize(s,x,y)},r.rules=function(s,c,n){const{schema:i,state:u,prefs:g}=n;for(const y of i._rules){const k=i._definition.rules[y.method];if(k.convert&&g.convert){u.mainstay.tracer.log(i,u,"rule",y.name,"full");continue}let w,d=y.args;if(y._resolve.length){d=Object.assign({},d);for(const b of y._resolve){const S=k.argsByName.get(b),A=d[b].resolve(s,u,g),P=S.normalize?S.normalize(A):A,L=t.validateArg(P,null,S);if(L){w=i.$_createError("any.ref",A,{arg:b,ref:d[b],reason:L},u,g);break}d[b]=P}}w=w||k.validate(s,n,d,y);const x=r.rule(w,y);if(x.errors){if(u.mainstay.tracer.log(i,u,"rule",y.name,"error"),y.warn){u.mainstay.warnings.push(...x.errors);continue}if(g.abortEarly)return r.finalize(s,x.errors,n);c.push(...x.errors)}else u.mainstay.tracer.log(i,u,"rule",y.name,"pass"),u.mainstay.tracer.value(u,"rule",s,x.value,y.name),s=x.value}return r.finalize(s,c,n)},r.rule=function(s,c){return s instanceof l.Report?(r.error(s,c),{errors:[s],value:null}):Array.isArray(s)&&s[t.symbols.errors]?(s.forEach(n=>r.error(n,c)),{errors:s,value:null}):{errors:null,value:s}},r.error=function(s,c){return c.message&&s._setTemplate(c.message),s},r.finalize=function(s,c,n){c=c||[];const{schema:i,state:u,prefs:g}=n;if(c.length){const k=r.default("failover",void 0,c,n);k!==void 0&&(u.mainstay.tracer.value(u,"failover",s,k),s=k,c=[])}if(c.length&&i._flags.error)if(typeof i._flags.error=="function"){c=i._flags.error(c),Array.isArray(c)||(c=[c]);for(const k of c)a(k instanceof Error||k instanceof l.Report,"error() must return an Error object")}else c=[i._flags.error];if(s===void 0){const k=r.default("default",s,c,n);u.mainstay.tracer.value(u,"default",s,k),s=k}if(i._flags.cast&&s!==void 0){const k=i._definition.cast[i._flags.cast];if(k.from(s)){const w=k.to(s,n);u.mainstay.tracer.value(u,"cast",s,w,i._flags.cast),s=w}}if(i.$_terms.externals&&g.externals&&g._externals!==!1)for(const{method:k}of i.$_terms.externals)u.mainstay.externals.push({method:k,schema:i,state:u,label:l.label(i._flags,u,g)});const y={value:s,errors:c.length?c:null};return i._flags.result&&(y.value=i._flags.result==="strip"?void 0:n.original,u.mainstay.tracer.value(u,i._flags.result,s,y.value),u.shadow(s,i._flags.result)),i._cache&&g.cache!==!1&&!i._refs.length&&i._cache.set(n.original,y),s===void 0||y.errors||i._flags.artifact===void 0||(u.mainstay.artifacts=u.mainstay.artifacts||new Map,u.mainstay.artifacts.has(i._flags.artifact)||u.mainstay.artifacts.set(i._flags.artifact,[]),u.mainstay.artifacts.get(i._flags.artifact).push(u.path)),y},r.prefs=function(s,c){const n=c===t.defaults;return n&&s._preferences[t.symbols.prefs]?s._preferences[t.symbols.prefs]:(c=t.preferences(c,s._preferences),n&&(s._preferences[t.symbols.prefs]=c),c)},r.default=function(s,c,n,i){const{schema:u,state:g,prefs:y}=i,k=u._flags[s];if(y.noDefaults||k===void 0)return c;if(g.mainstay.tracer.log(u,g,"rule",s,"full"),!k)return k;if(typeof k=="function"){const w=k.length?[m(g.ancestors[0]),i]:[];try{return k(...w)}catch(d){return void n.push(u.$_createError(`any.${s}`,null,{error:d},g,y))}}return typeof k!="object"?k:k[t.symbols.literal]?k.literal:t.isResolvable(k)?k.resolve(c,g,y):m(k)},r.trim=function(s,c){if(typeof s!="string")return s;const n=c.$_getRule("trim");return n&&n.args.enabled?s.trim():s},r.ignore={active:!1,debug:f,entry:f,filter:f,log:f,resolve:f,value:f},r.errorsArray=function(){const s=[];return s[t.symbols.errors]=!0,s}},2036:(_,j,p)=>{const a=p(375),m=p(9474),f=p(8160),h={};_.exports=h.Values=class{constructor(t,l){this._values=new Set(t),this._refs=new Set(l),this._lowercase=h.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,o){if(t=t||new h.Values,l){if(l._override)return l.clone();for(const r of[...l._values,...l._refs])t.add(r)}if(o)for(const r of[...o._values,...o._refs])t.remove(r);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,o,r){return!!this.get(t,l,o,r)}get(t,l,o,r){if(!this.length)return!1;if(this._values.has(t))return{value:t};if(typeof t=="string"&&t&&r){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(m(s,t))return{value:s}}if(l)for(const s of this._refs){const c=s.resolve(t,l,o,null,{in:!0});if(c===void 0)continue;const n=s.in&&typeof c=="object"?Array.isArray(c)?c:Object.keys(c):[c];for(const i of n)if(typeof i==typeof t){if(r&&t&&typeof t=="string"){if(i.toLowerCase()===t.toLowerCase())return{value:i,ref:s}}else if(m(i,t))return{value:i,ref:s}}}return!1}override(){this._override=!0}values(t){if(t&&t.display){const l=[];for(const o of[...this._values,...this._refs])o!==void 0&&l.push(o);return l}return Array.from([...this._values,...this._refs])}clone(){const t=new h.Values(this._values,this._refs);return t._override=this._override,t}concat(t){a(!t._override,"Cannot concat override set of values");const l=new h.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}},h.Values.prototype[f.symbols.values]=!0,h.Values.prototype.slice=h.Values.prototype.clone,h.lowercases=function(t){const l=new Map;if(t)for(const o of t)typeof o=="string"&&l.set(o.toLowerCase(),o);return l}},978:(_,j,p)=>{const a=p(375),m=p(8571),f=p(1687),h=p(9621),t={};_.exports=function(l,o,r={}){if(a(l&&typeof l=="object","Invalid defaults value: must be an object"),a(!o||o===!0||typeof o=="object","Invalid source value: must be true, falsy or an object"),a(typeof r=="object","Invalid options: must be an object"),!o)return null;if(r.shallow)return t.applyToDefaultsWithShallow(l,o,r);const s=m(l);if(o===!0)return s;const c=r.nullOverride!==void 0&&r.nullOverride;return f(s,o,{nullOverride:c,mergeArrays:!1})},t.applyToDefaultsWithShallow=function(l,o,r){const s=r.shallow;a(Array.isArray(s),"Invalid keys");const c=new Map,n=o===!0?null:new Set;for(let g of s){g=Array.isArray(g)?g:g.split(".");const y=h(l,g);y&&typeof y=="object"?c.set(y,n&&h(o,g)||y):n&&n.add(g)}const i=m(l,{},c);if(!n)return i;for(const g of n)t.reachCopy(i,o,g);const u=r.nullOverride!==void 0&&r.nullOverride;return f(i,o,{nullOverride:u,mergeArrays:!1})},t.reachCopy=function(l,o,r){for(const n of r){if(!(n in o))return;const i=o[n];if(typeof i!="object"||i===null)return;o=i}const s=o;let c=l;for(let n=0;n<r.length-1;++n){const i=r[n];typeof c[i]!="object"&&(c[i]={}),c=c[i]}c[r[r.length-1]]=s}},375:(_,j,p)=>{const a=p(7916);_.exports=function(m,...f){if(!m)throw f.length===1&&f[0]instanceof Error?f[0]:new a(f)}},8571:(_,j,p)=>{const a=p(9621),m=p(4277),f=p(7043),h={needsProtoHack:new Set([m.set,m.map,m.weakSet,m.weakMap])};_.exports=h.clone=function(t,l={},o=null){if(typeof t!="object"||t===null)return t;let r=h.clone,s=o;if(l.shallow){if(l.shallow!==!0)return h.cloneWithShallow(t,l);r=u=>u}else if(s){const u=s.get(t);if(u)return u}else s=new Map;const c=m.getInternalProto(t);if(c===m.buffer)return!1;if(c===m.date)return new Date(t.getTime());if(c===m.regex)return new RegExp(t);const n=h.base(t,c,l);if(n===t)return t;if(s&&s.set(t,n),c===m.set)for(const u of t)n.add(r(u,l,s));else if(c===m.map)for(const[u,g]of t)n.set(u,r(g,l,s));const i=f.keys(t,l);for(const u of i){if(u==="__proto__")continue;if(c===m.array&&u==="length"){n.length=t.length;continue}const g=Object.getOwnPropertyDescriptor(t,u);g?g.get||g.set?Object.defineProperty(n,u,g):g.enumerable?n[u]=r(t[u],l,s):Object.defineProperty(n,u,{enumerable:!1,writable:!0,configurable:!0,value:r(t[u],l,s)}):Object.defineProperty(n,u,{enumerable:!0,writable:!0,configurable:!0,value:r(t[u],l,s)})}return n},h.cloneWithShallow=function(t,l){const o=l.shallow;(l=Object.assign({},l)).shallow=!1;const r=new Map;for(const s of o){const c=a(t,s);typeof c!="object"&&typeof c!="function"||r.set(c,c)}return h.clone(t,l,r)},h.base=function(t,l,o){if(o.prototype===!1)return h.needsProtoHack.has(l)?new l.constructor:l===m.array?[]:{};const r=Object.getPrototypeOf(t);if(r&&r.isImmutable)return t;if(l===m.array){const s=[];return r!==l&&Object.setPrototypeOf(s,r),s}if(h.needsProtoHack.has(l)){const s=new r.constructor;return r!==l&&Object.setPrototypeOf(s,r),s}return Object.create(r)}},9474:(_,j,p)=>{const a=p(4277),m={mismatched:null};_.exports=function(f,h,t){return t=Object.assign({prototype:!0},t),!!m.isDeepEqual(f,h,t,[])},m.isDeepEqual=function(f,h,t,l){if(f===h)return f!==0||1/f==1/h;const o=typeof f;if(o!==typeof h||f===null||h===null)return!1;if(o==="function"){if(!t.deepFunction||f.toString()!==h.toString())return!1}else if(o!=="object")return f!=f&&h!=h;const r=m.getSharedType(f,h,!!t.prototype);switch(r){case a.buffer:return!1;case a.promise:return f===h;case a.regex:return f.toString()===h.toString();case m.mismatched:return!1}for(let s=l.length-1;s>=0;--s)if(l[s].isSame(f,h))return!0;l.push(new m.SeenEntry(f,h));try{return!!m.isDeepEqualObj(r,f,h,t,l)}finally{l.pop()}},m.getSharedType=function(f,h,t){if(t)return Object.getPrototypeOf(f)!==Object.getPrototypeOf(h)?m.mismatched:a.getInternalProto(f);const l=a.getInternalProto(f);return l!==a.getInternalProto(h)?m.mismatched:l},m.valueOf=function(f){const h=f.valueOf;if(h===void 0)return f;try{return h.call(f)}catch(t){return t}},m.hasOwnEnumerableProperty=function(f,h){return Object.prototype.propertyIsEnumerable.call(f,h)},m.isSetSimpleEqual=function(f,h){for(const t of Set.prototype.values.call(f))if(!Set.prototype.has.call(h,t))return!1;return!0},m.isDeepEqualObj=function(f,h,t,l,o){const{isDeepEqual:r,valueOf:s,hasOwnEnumerableProperty:c}=m,{keys:n,getOwnPropertySymbols:i}=Object;if(f===a.array){if(!l.part){if(h.length!==t.length)return!1;for(let w=0;w<h.length;++w)if(!r(h[w],t[w],l,o))return!1;return!0}for(const w of h)for(const d of t)if(r(w,d,l,o))return!0}else if(f===a.set){if(h.size!==t.size)return!1;if(!m.isSetSimpleEqual(h,t)){const w=new Set(Set.prototype.values.call(t));for(const d of Set.prototype.values.call(h)){if(w.delete(d))continue;let x=!1;for(const b of w)if(r(d,b,l,o)){w.delete(b),x=!0;break}if(!x)return!1}}}else if(f===a.map){if(h.size!==t.size)return!1;for(const[w,d]of Map.prototype.entries.call(h))if(d===void 0&&!Map.prototype.has.call(t,w)||!r(d,Map.prototype.get.call(t,w),l,o))return!1}else if(f===a.error&&(h.name!==t.name||h.message!==t.message))return!1;const u=s(h),g=s(t);if((h!==u||t!==g)&&!r(u,g,l,o))return!1;const y=n(h);if(!l.part&&y.length!==n(t).length&&!l.skip)return!1;let k=0;for(const w of y)if(l.skip&&l.skip.includes(w))t[w]===void 0&&++k;else if(!c(t,w)||!r(h[w],t[w],l,o))return!1;if(!l.part&&y.length-k!==n(t).length)return!1;if(l.symbols!==!1){const w=i(h),d=new Set(i(t));for(const x of w){if(!l.skip||!l.skip.includes(x)){if(c(h,x)){if(!c(t,x)||!r(h[x],t[x],l,o))return!1}else if(c(t,x))return!1}d.delete(x)}for(const x of d)if(c(t,x))return!1}return!0},m.SeenEntry=class{constructor(f,h){this.obj=f,this.ref=h}isSame(f,h){return this.obj===f&&this.ref===h}}},7916:(_,j,p)=>{const a=p(8761);_.exports=class extends Error{constructor(m){super(m.filter(f=>f!=="").map(f=>typeof f=="string"?f:f instanceof Error?f.message:a(f)).join(" ")||"Unknown error"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,j.assert)}}},5277:_=>{const j={};_.exports=function(p){if(!p)return"";let a="";for(let m=0;m<p.length;++m){const f=p.charCodeAt(m);j.isSafe(f)?a+=p[m]:a+=j.escapeHtmlChar(f)}return a},j.escapeHtmlChar=function(p){return j.namedHtml.get(p)||(p>=256?"&#"+p+";":`&#x${p.toString(16).padStart(2,"0")};`)},j.isSafe=function(p){return j.safeCharCodes.has(p)},j.namedHtml=new Map([[38,"&amp;"],[60,"&lt;"],[62,"&gt;"],[34,"&quot;"],[160,"&nbsp;"],[162,"&cent;"],[163,"&pound;"],[164,"&curren;"],[169,"&copy;"],[174,"&reg;"]]),j.safeCharCodes=function(){const p=new Set;for(let a=32;a<123;++a)(a>=97||a>=65&&a<=90||a>=48&&a<=57||a===32||a===46||a===44||a===45||a===58||a===95)&&p.add(a);return p}()},6064:_=>{_.exports=function(j){return j.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g,"\\$&")}},738:_=>{_.exports=function(){}},1687:(_,j,p)=>{const a=p(375),m=p(8571),f=p(7043),h={};_.exports=h.merge=function(t,l,o){if(a(t&&typeof t=="object","Invalid target value: must be an object"),a(l==null||typeof l=="object","Invalid source value: must be null, undefined, or an object"),!l)return t;if(o=Object.assign({nullOverride:!0,mergeArrays:!0},o),Array.isArray(l)){a(Array.isArray(t),"Cannot merge array onto an object"),o.mergeArrays||(t.length=0);for(let s=0;s<l.length;++s)t.push(m(l[s],{symbols:o.symbols}));return t}const r=f.keys(l,o);for(let s=0;s<r.length;++s){const c=r[s];if(c==="__proto__"||!Object.prototype.propertyIsEnumerable.call(l,c))continue;const n=l[c];if(n&&typeof n=="object"){if(t[c]===n)continue;!t[c]||typeof t[c]!="object"||Array.isArray(t[c])!==Array.isArray(n)||n instanceof Date||n instanceof RegExp?t[c]=m(n,{symbols:o.symbols}):h.merge(t[c],n,o)}else(n!=null||o.nullOverride)&&(t[c]=n)}return t}},9621:(_,j,p)=>{const a=p(375),m={};_.exports=function(f,h,t){if(h===!1||h==null)return f;typeof(t=t||{})=="string"&&(t={separator:t});const l=Array.isArray(h);a(!l||!t.separator,"Separator option is not valid for array-based chain");const o=l?h:h.split(t.separator||".");let r=f;for(let s=0;s<o.length;++s){let c=o[s];const n=t.iterables&&m.iterables(r);if(Array.isArray(r)||n==="set"){const i=Number(c);Number.isInteger(i)&&(c=i<0?r.length+i:i)}if(!r||typeof r=="function"&&t.functions===!1||!n&&r[c]===void 0){a(!t.strict||s+1===o.length,"Missing segment",c,"in reach path ",h),a(typeof r=="object"||t.functions===!0||typeof r!="function","Invalid segment",c,"in reach path ",h),r=t.default;break}r=n?n==="set"?[...r][c]:r.get(c):r[c]}return r},m.iterables=function(f){return f instanceof Set?"set":f instanceof Map?"map":void 0}},8761:_=>{_.exports=function(...j){try{return JSON.stringify(...j)}catch(p){return"[Cannot display object: "+p.message+"]"}}},4277:(_,j)=>{const p={};j=_.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},p.typeMap=new Map([["[object Error]",j.error],["[object Map]",j.map],["[object Promise]",j.promise],["[object Set]",j.set],["[object WeakMap]",j.weakMap],["[object WeakSet]",j.weakSet]]),j.getInternalProto=function(a){if(Array.isArray(a))return j.array;if(a instanceof Date)return j.date;if(a instanceof RegExp)return j.regex;if(a instanceof Error)return j.error;const m=Object.prototype.toString.call(a);return p.typeMap.get(m)||j.generic}},7043:(_,j)=>{j.keys=function(p,a={}){return a.symbols!==!1?Reflect.ownKeys(p):Object.getOwnPropertyNames(p)}},3652:(_,j,p)=>{const a=p(375),m={};j.Sorter=class{constructor(){this._items=[],this.nodes=[]}add(f,h){const t=[].concat((h=h||{}).before||[]),l=[].concat(h.after||[]),o=h.group||"?",r=h.sort||0;a(!t.includes(o),`Item cannot come before itself: ${o}`),a(!t.includes("?"),"Item cannot come before unassociated items"),a(!l.includes(o),`Item cannot come after itself: ${o}`),a(!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:r,before:t,after:l,group:o,node:s};this._items.push(c)}if(!h.manual){const s=this._sort();a(s,"item",o!=="?"?`added into group ${o}`:"","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(m.mergeSort);for(let t=0;t<this._items.length;++t)this._items[t].seq=t;const h=this._sort();return a(h,"merge created a dependencies error"),this.nodes}sort(){const f=this._sort();return a(f,"sort created a dependencies error"),this.nodes}_sort(){const f={},h=Object.create(null),t=Object.create(null);for(const c of this._items){const n=c.seq,i=c.group;t[i]=t[i]||[],t[i].push(n),f[n]=c.before;for(const u of c.after)h[u]=h[u]||[],h[u].push(n)}for(const c in f){const n=[];for(const i in f[c]){const u=f[c][i];t[u]=t[u]||[],n.push(...t[u])}f[c]=n}for(const c in h)if(t[c])for(const n of t[c])f[n].push(...h[c]);const l={};for(const c in f){const n=f[c];for(const i of n)l[i]=l[i]||[],l[i].push(c)}const o={},r=[];for(let c=0;c<this._items.length;++c){let n=c;if(l[c]){n=null;for(let i=0;i<this._items.length;++i){if(o[i]===!0)continue;l[i]||(l[i]=[]);const u=l[i].length;let g=0;for(let y=0;y<u;++y)o[l[i][y]]&&++g;if(g===u){n=i;break}}}n!==null&&(o[n]=!0,r.push(n))}if(r.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 r){const n=s[c];this.nodes.push(n.node),this._items.push(n)}return!0}},m.mergeSort=(f,h)=>f.sort===h.sort?0:f.sort<h.sort?-1:1},5380:(_,j,p)=>{const a=p(443),m=p(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:a.URL||URL};j.analyze=function(h,t={}){if(!h)return m.code("DOMAIN_NON_EMPTY_STRING");if(typeof h!="string")throw new Error("Invalid input: domain must be a string");if(h.length>256)return m.code("DOMAIN_TOO_LONG");if(f.nonAsciiRx.test(h)){if(t.allowUnicode===!1)return m.code("DOMAIN_INVALID_UNICODE_CHARS");h=h.normalize("NFC")}if(f.domainControlRx.test(h))return m.code("DOMAIN_INVALID_CHARS");h=f.punycode(h),t.allowFullyQualified&&h[h.length-1]==="."&&(h=h.slice(0,-1));const l=t.minDomainSegments||f.minDomainSegments,o=h.split(".");if(o.length<l)return m.code("DOMAIN_SEGMENTS_COUNT");if(t.maxDomainSegments&&o.length>t.maxDomainSegments)return m.code("DOMAIN_SEGMENTS_COUNT_MAX");const r=t.tlds;if(r){const s=o[o.length-1].toLowerCase();if(r.deny&&r.deny.has(s)||r.allow&&!r.allow.has(s))return m.code("DOMAIN_FORBIDDEN_TLDS")}for(let s=0;s<o.length;++s){const c=o[s];if(!c.length)return m.code("DOMAIN_EMPTY_SEGMENT");if(c.length>63)return m.code("DOMAIN_LONG_SEGMENT");if(s<o.length-1){if(!f.domainSegmentRx.test(c))return m.code("DOMAIN_INVALID_CHARS")}else if(!f.tldSegmentRx.test(c))return m.code("DOMAIN_INVALID_TLDS_CHARS")}return null},j.isValid=function(h,t){return!j.analyze(h,t)},f.punycode=function(h){h.includes("%")&&(h=h.replace(/%/g,"%25"));try{return new f.URL(`http://${h}`).host}catch{return h}}},1745:(_,j,p)=>{const a=p(9848),m=p(5380),f=p(2178),h={nonAsciiRx:/[^\x00-\x7f]/,encoder:new(a.TextEncoder||TextEncoder)};j.analyze=function(t,l){return h.email(t,l)},j.isValid=function(t,l){return!h.email(t,l)},h.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 o=!h.nonAsciiRx.test(t);if(!o){if(l.allowUnicode===!1)return f.code("FORBIDDEN_UNICODE");t=t.normalize("NFC")}const r=t.split("@");if(r.length!==2)return r.length>2?f.code("MULTIPLE_AT_CHAR"):f.code("MISSING_AT_CHAR");const[s,c]=r;if(!s)return f.code("EMPTY_LOCAL");if(!l.ignoreLength){if(t.length>254)return f.code("ADDRESS_TOO_LONG");if(h.encoder.encode(s).length>64)return f.code("LOCAL_TOO_LONG")}return h.local(s,o)||m.analyze(c,l)},h.local=function(t,l){const o=t.split(".");for(const r of o){if(!r.length)return f.code("EMPTY_LOCAL_SEGMENT");if(l){if(!h.atextRx.test(r))return f.code("INVALID_LOCAL_CHARS")}else for(const s of r){if(h.atextRx.test(s))continue;const c=h.binary(s);if(!h.atomRx.test(c))return f.code("INVALID_LOCAL_CHARS")}}},h.binary=function(t){return Array.from(h.encoder.encode(t)).map(l=>String.fromCharCode(l)).join("")},h.atextRx=/^[\w!#\$%&'\*\+\-/=\?\^`\{\|\}~]+$/,h.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:(_,j)=>{j.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"},j.code=function(p){return{code:p,error:j.codes[p]}}},9959:(_,j,p)=>{const a=p(375),m=p(5752);j.regex=function(f={}){a(f.cidr===void 0||typeof f.cidr=="string","options.cidr must be a string");const h=f.cidr?f.cidr.toLowerCase():"optional";a(["required","optional","forbidden"].includes(h),"options.cidr must be one of required, optional, forbidden"),a(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]),a(t.length>=1,"options.version must have at least 1 version specified");for(let r=0;r<t.length;++r)a(typeof t[r]=="string","options.version must only contain strings"),t[r]=t[r].toLowerCase(),a(["ipv4","ipv6","ipvfuture"].includes(t[r]),"options.version contains unknown version "+t[r]+" - must be one of ipv4, ipv6, ipvfuture");t=Array.from(new Set(t));const l=`(?:${t.map(r=>{if(h==="forbidden")return m.ip[r];const s=`\\/${r==="ipv4"?m.ip.v4Cidr:m.ip.v6Cidr}`;return h==="required"?`${m.ip[r]}${s}`:`${m.ip[r]}(?:${s})?`}).join("|")})`,o=new RegExp(`^${l}$`);return{cidr:h,versions:t,regex:o,raw:l}}},5752:(_,j,p)=>{const a=p(375),m=p(6064),f={generate:function(){const h={},t="\\dA-Fa-f",l="["+t+"]",o="\\w-\\.~",r="!\\$&'\\(\\)\\*\\+,;=",s="%"+t,c=o+s+r+":@",n="["+c+"]",i="(?:0{0,2}\\d|0?[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])";h.ipv4address="(?:"+i+"\\.){3}"+i;const u=l+"{1,4}",g="(?:"+u+":"+u+"|"+h.ipv4address+")",y="(?:"+u+":){6}"+g,k="::(?:"+u+":){5}"+g,w="(?:"+u+")?::(?:"+u+":){4}"+g,d="(?:(?:"+u+":){0,1}"+u+")?::(?:"+u+":){3}"+g,x="(?:(?:"+u+":){0,2}"+u+")?::(?:"+u+":){2}"+g,b="(?:(?:"+u+":){0,3}"+u+")?::"+u+":"+g,S="(?:(?:"+u+":){0,4}"+u+")?::"+g,A="(?:(?:"+u+":){0,5}"+u+")?::"+u,P="(?:(?:"+u+":){0,6}"+u+")?::";h.ipv4Cidr="(?:\\d|[1-2]\\d|3[0-2])",h.ipv6Cidr="(?:0{0,2}\\d|0?[1-9]\\d|1[01]\\d|12[0-8])",h.ipv6address="(?:"+y+"|"+k+"|"+w+"|"+d+"|"+x+"|"+b+"|"+S+"|"+A+"|"+P+")",h.ipvFuture="v"+l+"+\\.["+o+r+":]+",h.scheme="[a-zA-Z][a-zA-Z\\d+-\\.]*",h.schemeRegex=new RegExp(h.scheme);const L="["+o+s+r+":]*",D="["+o+s+r+"]{1,255}",N="(?:\\[(?:"+h.ipv6address+"|"+h.ipvFuture+")\\]|"+h.ipv4address+"|"+D+")",V="(?:"+L+"@)?"+N+"(?::\\d*)?",z="(?:"+L+"@)?("+N+")(?::\\d*)?",I=n+"*",B=n+"+",F="(?:\\/"+I+")*",K="\\/(?:"+B+F+")?",he=B+F,be="["+o+s+r+"@]+"+F,De="(?:\\/\\/\\/"+I+F+")";return h.hierPart="(?:(?:\\/\\/"+V+F+")|"+K+"|"+he+"|"+De+")",h.hierPartCapture="(?:(?:\\/\\/"+z+F+")|"+K+"|"+he+")",h.relativeRef="(?:(?:\\/\\/"+V+F+")|"+K+"|"+be+"|)",h.relativeRefCapture="(?:(?:\\/\\/"+z+F+")|"+K+"|"+be+"|)",h.query="["+c+"\\/\\?]*(?=#|$)",h.queryWithSquareBrackets="["+c+"\\[\\]\\/\\?]*(?=#|$)",h.fragment="["+c+"\\/\\?]*",h}};f.rfc3986=f.generate(),j.ip={v4Cidr:f.rfc3986.ipv4Cidr,v6Cidr:f.rfc3986.ipv6Cidr,ipv4:f.rfc3986.ipv4address,ipv6:f.rfc3986.ipv6address,ipvfuture:f.rfc3986.ipvFuture},f.createRegex=function(h){const t=f.rfc3986,l="(?:\\?"+(h.allowQuerySquareBrackets?t.queryWithSquareBrackets:t.query)+")?(?:#"+t.fragment+")?",o=h.domain?t.relativeRefCapture:t.relativeRef;if(h.relativeOnly)return f.wrap(o+l);let r="";if(h.scheme){a(h.scheme instanceof RegExp||typeof h.scheme=="string"||Array.isArray(h.scheme),"scheme must be a RegExp, String, or Array");const n=[].concat(h.scheme);a(n.length>=1,"scheme must have at least 1 scheme specified");const i=[];for(let u=0;u<n.length;++u){const g=n[u];a(g instanceof RegExp||typeof g=="string","scheme at position "+u+" must be a RegExp or String"),g instanceof RegExp?i.push(g.source.toString()):(a(t.schemeRegex.test(g),"scheme at position "+u+" must be a valid scheme"),i.push(m(g)))}r=i.join("|")}const s="(?:"+(r?"(?:"+r+")":t.scheme)+":"+(h.domain?t.hierPartCapture:t.hierPart)+")",c=h.allowRelative?"(?:"+s+"|"+o+")":s;return f.wrap(c+l,r)},f.wrap=function(h,t){return{raw:h=`(?=.)(?!https?:/(?:$|[^/]))(?!https?:///)(?!https?:[^/])${h}`,regex:new RegExp(`^${h}$`),scheme:t}},f.uriRegex=f.createRegex({}),j.regex=function(h={}){return h.scheme||h.allowRelative||h.relativeOnly||h.allowQuerySquareBrackets||h.domain?f.createRegex(h):f.uriRegex}},1447:(_,j)=>{const p={operators:["!","^","*","/","%","+","-","<","<=",">",">=","==","!=","&&","||","??"],operatorCharacters:["!","^","*","/","%","+","-","<","=",">","&","|","?"],operatorsOrder:[["^"],["*","/","%"],["+","-"],["<","<=",">",">="],["==","!="],["&&"],["||","??"]],operatorsPrefix:["!","n"],literals:{'"':'"',"`":"`","'":"'","[":"]"},numberRx:/^(?:[0-9]*(\.[0-9]*)?){1}$/,tokenRx:/^[\w\$\#\.\@\:\{\}]+$/,symbol:Symbol("formula"),settings:Symbol("settings")};j.Parser=class{constructor(a,m={}){if(!m[p.settings]&&m.constants)for(const f in m.constants){const h=m.constants[f];if(h!==null&&!["boolean","number","string"].includes(typeof h))throw new Error(`Formula constant ${f} contains invalid ${typeof h} value type`)}this.settings=m[p.settings]?m:Object.assign({[p.settings]:!0,constants:{},functions:{}},m),this.single=null,this._parts=null,this._parse(a)}_parse(a){let m=[],f="",h=0,t=!1;const l=r=>{if(h)throw new Error("Formula missing closing parenthesis");const s=m.length?m[m.length-1]:null;if(t||f||r){if(s&&s.type==="reference"&&r===")")return s.type="function",s.value=this._subFormula(f,s.value),void(f="");if(r===")"){const c=new j.Parser(f,this.settings);m.push({type:"segment",value:c})}else if(t){if(t==="]")return m.push({type:"reference",value:f}),void(f="");m.push({type:"literal",value:f})}else if(p.operatorCharacters.includes(f))s&&s.type==="operator"&&p.operators.includes(s.value+f)?s.value+=f:m.push({type:"operator",value:f});else if(f.match(p.numberRx))m.push({type:"constant",value:parseFloat(f)});else if(this.settings.constants[f]!==void 0)m.push({type:"constant",value:this.settings.constants[f]});else{if(!f.match(p.tokenRx))throw new Error(`Formula contains invalid token: ${f}`);m.push({type:"reference",value:f})}f=""}};for(const r of a)t?r===t?(l(),t=!1):f+=r:h?r==="("?(f+=r,++h):r===")"?(--h,h?f+=r:l(r)):f+=r:r in p.literals?t=p.literals[r]:r==="("?(l(),++h):p.operatorCharacters.includes(r)?(l(),f=r,l()):r!==" "?f+=r:l();l(),m=m.map((r,s)=>r.type!=="operator"||r.value!=="-"||s&&m[s-1].type!=="operator"?r:{type:"operator",value:"n"});let o=!1;for(const r of m){if(r.type==="operator"){if(p.operatorsPrefix.includes(r.value))continue;if(!o)throw new Error("Formula contains an operator in invalid position");if(!p.operators.includes(r.value))throw new Error(`Formula contains an unknown operator ${r.value}`)}else if(o)throw new Error("Formula missing expected operator");o=!o}if(!o)throw new Error("Formula contains invalid trailing operator");m.length===1&&["reference","literal","constant"].includes(m[0].type)&&(this.single={type:m[0].type==="reference"?"reference":"value",value:m[0].value}),this._parts=m.map(r=>{if(r.type==="operator")return p.operatorsPrefix.includes(r.value)?r:r.value;if(r.type!=="reference")return r.value;if(this.settings.tokenRx&&!this.settings.tokenRx.test(r.value))throw new Error(`Formula contains invalid reference ${r.value}`);return this.settings.reference?this.settings.reference(r.value):p.reference(r.value)})}_subFormula(a,m){const f=this.settings.functions[m];if(typeof f!="function")throw new Error(`Formula contains unknown function ${m}`);let h=[];if(a){let t="",l=0,o=!1;const r=()=>{if(!t)throw new Error(`Formula contains function ${m} with invalid arguments ${a}`);h.push(t),t=""};for(let s=0;s<a.length;++s){const c=a[s];o?(t+=c,c===o&&(o=!1)):c in p.literals&&!l?(t+=c,o=p.literals[c]):c!==","||l?(t+=c,c==="("?++l:c===")"&&--l):r()}r()}return h=h.map(t=>new j.Parser(t,this.settings)),function(t){const l=[];for(const o of h)l.push(o.evaluate(t));return f.call(t,...l)}}evaluate(a){const m=this._parts.slice();for(let f=m.length-2;f>=0;--f){const h=m[f];if(h&&h.type==="operator"){const t=m[f+1];m.splice(f+1,1);const l=p.evaluate(t,a);m[f]=p.single(h.value,l)}}return p.operatorsOrder.forEach(f=>{for(let h=1;h<m.length-1;)if(f.includes(m[h])){const t=m[h],l=p.evaluate(m[h-1],a),o=p.evaluate(m[h+1],a);m.splice(h,2);const r=p.calculate(t,l,o);m[h-1]=r===0?0:r}else h+=2}),p.evaluate(m[0],a)}},j.Parser.prototype[p.symbol]=!0,p.reference=function(a){return function(m){return m&&m[a]!==void 0?m[a]:null}},p.evaluate=function(a,m){return a===null?null:typeof a=="function"?a(m):a[p.symbol]?a.evaluate(m):a},p.single=function(a,m){if(a==="!")return!m;const f=-m;return f===0?0:f},p.calculate=function(a,m,f){if(a==="??")return p.exists(m)?m:f;if(typeof m=="string"||typeof f=="string"){if(a==="+")return(m=p.exists(m)?m:"")+(p.exists(f)?f:"")}else switch(a){case"^":return Math.pow(m,f);case"*":return m*f;case"/":return m/f;case"%":return m%f;case"+":return m+f;case"-":return m-f}switch(a){case"<":return m<f;case"<=":return m<=f;case">":return m>f;case">=":return m>=f;case"==":return m===f;case"!=":return m!==f;case"&&":return m&&f;case"||":return m||f}return null},p.exists=function(a){return a!=null}},9926:()=>{},5688:()=>{},9708:()=>{},1152:()=>{},443:()=>{},9848:()=>{},5934:_=>{_.exports=JSON.parse('{"version":"17.13.3"}')}},C={},function _(j){var p=C[j];if(p!==void 0)return p.exports;var a=C[j]={exports:{}};return O[j](a,a.exports,_),a.exports}(5107);var O,C})}(Ye)),Ye.exports}var Ae={},Lt;function gn(){if(Lt)return Ae;Lt=1;var v=Ae&&Ae.__importDefault||function(C){return C&&C.__esModule?C:{default:C}};Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.BNExtension=O;const R=v(Ks());function O(C){return{type:"BN",base:C.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(_,j){try{return{value:new R.default(_)}}catch{return{errors:j.error("bn.nan")}}},coerce(_){return{value:_.toString(10)}},validate(_){return{value:_}},rules:{gt:{args:[{name:"threshold",ref:!0,assert:_=>R.default.isBN(_),message:"must be a big number",normalize:_=>new R.default(_)},{name:"equal",assert:_=>typeof _=="boolean",message:"must be a boolean"}],validate(_,j,p){const a=new R.default(_);return p.equal&&a.lt(p.threshold)?j.error("bn.min",p):!p.equal&&a.lte(p.threshold)?j.error("bn.greater",p):_}},lt:{args:[{name:"threshold",ref:!0,assert:_=>R.default.isBN(_),message:"must be a big number",normalize:_=>new R.default(_)},{name:"equal",assert:_=>typeof _=="boolean",message:"must be a boolean"}],validate(_,j,p){const a=new R.default(_);return p.equal&&a.gt(p.threshold)?j.error("bn.max",p):!p.equal&&a.gte(p.threshold)?j.error("bn.less",p):_}},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 Pe={},qt;function yn(){if(qt)return Pe;qt=1;var v=Pe&&Pe.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(Pe,"__esModule",{value:!0}),Pe.DIDExtension=j;const R=v(Gs),O=Ys(),C=Xs(),_={pk:Object.keys(O.types.KeyType),hash:Object.keys(O.types.HashType),role:Object.keys(O.types.RoleType)};function j(p){return{type:"DID",base:p.string().trim(),messages:{"did.empty":"Expect {{#label}} to be non-empty string","did.invalid":"Expect {{#label}} to be valid did","did.wallet":'Expect wallet type of {{#label}} to be "{{#expected}}" wallet',"did.pk":'Expect pk type of {{#label}} to be "{{#expected}}"',"did.hash":'Expect hash type of {{#label}} to be "{{#expected}}"',"did.role":'Expect role type of {{#label}} to be "{{#expected}}"',"did.prefix":'Expect prefix of {{#label}} to be "{{#expected}}"'},validate(a,m){return!a||typeof a!="string"?{errors:m.error("did.empty",{value:a})}:(0,C.isValid)(a)===!1?{errors:m.error("did.invalid",{value:a})}:{value:a}},rules:{type:{args:[{name:"key",ref:!0,assert:a=>Object.keys(_).includes(a),message:`must be one of ${Object.keys(_).join(", ")}`},{name:"expected",assert:a=>Object.keys(_).some(m=>_[m].includes(a)),message:"must be valid type"}],validate(a,m,f){const h=(0,C.toTypeInfoStr)(a);return f.key==="pk"&&h.pk!==f.expected?m.error("did.pk",{...f,actual:h.pk}):f.key==="hash"&&h.hash!==f.expected?m.error("did.hash",{...f,actual:h.hash}):f.key==="role"&&h.role!==f.expected?m.error("did.role",{...f,actual:h.role}):a}},pk:{method(a){return this.$_addRule({name:"type",args:{key:"pk",expected:a}})}},hash:{method(a){return this.$_addRule({name:"type",args:{key:"hash",expected:a}})}},role:{method(a){return this.$_addRule({name:"type",args:{key:"role",expected:a}})}},wallet:{method(a){return this.$_addRule({name:"wallet",args:{type:a}})},args:[{name:"type",ref:!0,assert:a=>["arcblock","ethereum","default","eth","passkey"].includes(a),message:"must be a string",normalize:a=>a.trim()}],validate(a,m,f={}){const h=(0,C.toTypeInfo)(a),t=(0,C.toTypeInfoStr)(a);return["ethereum","eth"].includes(f.type)&&(0,R.default)(h,C.DID_TYPE_ETHEREUM)===!1?m.error("did.wallet",{expected:f.type,actual:JSON.stringify(t)}):["arcblock","default"].includes(f.type)&&(0,R.default)(h,C.DID_TYPE_ARCBLOCK)===!1?m.error("did.wallet",{expected:f.type,actual:JSON.stringify(t)}):["passkey"].includes(f.type)&&(0,R.default)(h,C.DID_TYPE_PASSKEY)===!1?m.error("did.wallet",{expected:f.type,actual:JSON.stringify(t)}):a}},prefix:{method(a=""){return this.$_addRule({name:"prefix",args:{str:a}})},args:[{name:"str",ref:!0,assert:a=>["",C.DID_PREFIX].includes(a),message:"must be a string",normalize:a=>a.trim()}],validate(a,m,f={}){return f.str&&a.startsWith(f.str)===!1?m.error("did.prefix",{expected:f.str}):!f.str&&(0,C.toAddress)(a)!==a?m.error("did.prefix",{expected:f.str}):a}}}}}return Pe}var Mt;function xn(){return Mt||(Mt=1,function(v){var R=Me&&Me.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(v,"__esModule",{value:!0}),v.patterns=v.schemas=v.Joi=void 0;const O=R(pn()),C=gn(),_=yn();v.Joi=O.default.extend(_.DIDExtension).extend(C.BNExtension);const j=/^(0x)?([A-Fa-f0-9]{64})$/,p=v.Joi.object({genesisTime:v.Joi.date().iso().required().raw(),genesisTx:v.Joi.string().regex(j).required().allow(""),renaissanceTime:v.Joi.date().iso().required().raw(),renaissanceTx:v.Joi.string().regex(j).required().allow("")}),a=v.Joi.object({address:v.Joi.DID().prefix().role("ROLE_TOKEN").required(),value:v.Joi.BN().min(0).required()}),m=v.Joi.object({name:v.Joi.string().min(1).max(256).required(),value:v.Joi.string().min(1).max(1024).required(),description:v.Joi.string().min(1).max(256).optional().allow(""),required:v.Joi.boolean().optional().default(!1)}),f=v.Joi.alternatives().try(v.Joi.DID().prefix().role("ROLE_ACCOUNT"),v.Joi.DID().prefix().role("ROLE_APPLICATION"),v.Joi.DID().prefix().role("ROLE_BLOCKLET"),v.Joi.DID().prefix().wallet("ethereum"),v.Joi.DID().prefix().wallet("passkey")),h=v.Joi.array().items(v.Joi.object({owner:f.required(),tokensList:v.Joi.array().items(a).default([]),assetsList:v.Joi.array().items(v.Joi.DID().prefix().role("ROLE_ASSET")).default([])})),t=v.Joi.array().items({signer:v.Joi.DID().prefix().required(),pk:v.Joi.any().required(),signature:v.Joi.any().required(),delegator:v.Joi.DID().prefix().valid("").optional(),data:v.Joi.any().optional()}),l=v.Joi.object({type:v.Joi.string().min(1).max(32).required(),contractAddress:v.Joi.DID().prefix().wallet("ethereum").required(),chainType:v.Joi.string().min(1).max(32).required(),chainName:v.Joi.string().min(1).max(32).required(),chainId:v.Joi.number().positive().required()}),o=v.Joi.object({type:v.Joi.string().valid("svg","url","uri").required(),content:v.Joi.string().when("type",{is:"uri",then:v.Joi.string().max(20480).dataUri().required()}).when("type",{is:"url",then:v.Joi.string().max(2048).uri({scheme:["http","https"]}).required()})}),r=v.Joi.object({id:v.Joi.string().max(2048).uri({scheme:["http","https"]}).required(),scope:v.Joi.string().valid("public","private").default("public")}),s=v.Joi.object({id:v.Joi.DID().prefix().required(),pk:v.Joi.string().required(),name:v.Joi.string().min(1).max(256).required()}),c={address:v.Joi.DID().prefix().role("ROLE_ASSET").required(),moniker:v.Joi.string().min(2).max(255).required(),data:v.Joi.any().required(),readonly:v.Joi.boolean().default(!1),transferrable:v.Joi.boolean().default(!1),ttl:v.Joi.number().min(0).default(0),parent:v.Joi.DID().prefix().optional().allow(""),issuer:v.Joi.DID().prefix().optional().allow(""),endpoint:r.optional().allow(null).default(null),display:o.optional().allow(null).default(null),tags:v.Joi.array().items(v.Joi.string().min(1).max(64)).max(4).optional()},n={address:v.Joi.DID().prefix().role("ROLE_FACTORY").required(),name:v.Joi.string().min(2).max(255).required(),description:v.Joi.string().min(2).max(255).required(),settlement:v.Joi.string().valid("instant","periodic").default("instant"),limit:v.Joi.number().integer().min(0).default(0),trustedIssuers:v.Joi.array().items(v.Joi.DID().prefix()).max(8).optional(),data:v.Joi.any().optional().allow(null).default(null),display:o.optional().allow(null).default(null),input:v.Joi.object({value:v.Joi.BN().positive().min("0").default("0"),tokens:v.Joi.array().items(a).max(8).optional(),assets:v.Joi.array().items(v.Joi.alternatives().try(v.Joi.DID().prefix().role("ROLE_ASSET"),v.Joi.DID().prefix().role("ROLE_FACTORY"))).max(8).optional(),variables:v.Joi.array().items(v.Joi.object({name:v.Joi.string().min(1).max(255).required(),description:v.Joi.string().max(255).optional().allow(""),required:v.Joi.boolean().required()})).optional()}),output:v.Joi.object({moniker:v.Joi.string().min(2).max(255).required(),data:v.Joi.any().required(),readonly:v.Joi.boolean().default(!1),transferrable:v.Joi.boolean().default(!1),ttl:v.Joi.number().min(0).default(0),parent:v.Joi.string().max(255).required(),issuer:v.Joi.string().max(255).required(),endpoint:r.optional(),display:o.optional(),tags:v.Joi.array().items(v.Joi.string().min(1).max(64)).max(4).optional()}),hooks:v.Joi.array().items(v.Joi.object({name:v.Joi.string().valid("mint","postMint","preMint").required(),type:v.Joi.string().valid("url","contract").required(),hook:v.Joi.string().min(1).max(4096).required(),compiled:v.Joi.array().items(v.Joi.object()).optional()})).optional()};v.schemas={context:p,tokenInput:a,multiInput:h,multiSig:t,foreignToken:l,variableInput:m,nftDisplay:o,nftEndpoint:r,nftIssuer:s,tokenHolder:f,assetProps:c,assetSchema:v.Joi.object(c).options({stripUnknown:!0,noDefaults:!1}),factoryProps:n,factorySchema:v.Joi.object(n).options({stripUnknown:!0,noDefaults:!1})},v.patterns={txHash:j}}(Me)),Me}var vn=xn();function fs({onCancel:v,onSuccess:R,blocklet:O}){const{vaults:C=[],appPid:_}=O,{t:j,locale:p}=oe(),{connectApi:a}=Nt(),{api:m}=ne(),{teamDid:f}=Ve(),[h,t]=gt({loading:!1,fetching:!1,error:"",address:"",fetched:[],errored:[]});q.useEffect(()=>{if(!je.isValid(h.address))return;const c=je.toAddress(h.address),n=h.fetched.find(u=>u.address===c),i=h.errored.find(u=>u.address===c);!h.fetching&&!n&&!i&&(t({fetching:!0}),Pr(J.MAIN_CHAIN_ENDPOINT).getAccountState({address:c}).then(g=>{g.state?t({fetching:!1,fetched:[...h.fetched.filter(y=>y.address!==c),g.state]}):t({fetching:!1,errored:[...h.errored.filter(y=>y.address!==c),{address:c}]})}).catch(g=>{console.error(g),t({fetching:!1,error:it(g)})}))},[h.address,h.fetching]),q.useEffect(()=>{if(h.address){const c=je.toAddress(h.address);if(!je.isValid(c)){t({error:j("blocklet.config.vault.error.invalid")});return}if(vn.schemas.tokenHolder.validate(c).error){t({error:j("blocklet.config.vault.error.holder")});return}if(C.find(i=>i.did===c)){t({error:j("blocklet.config.vault.error.duplicate")});return}if(Qs([O.appDid,O.appPid,...O.migratedFrom.map(i=>i.appDid)].filter(Boolean)).includes(c)){t({error:j("blocklet.config.vault.error.appDid")});return}}t({error:""})},[h.address]);const l=async()=>{t({loading:!0});try{const c=await m.configVault({input:{teamDid:f,vaultDid:je.toAddress(h.address)}});a.open({locale:p,action:"approve-vault",forceConnected:!1,saveConnect:!1,autoConnect:!1,className:"connect",checkTimeout:10*60*1e3,passkeyBehavior:"none",extraParams:{sessionId:c.sessionId},messages:{title:j("blocklet.config.vault.approve.title"),scan:j(`blocklet.config.vault.approve.${C.length>0?"byLast":"byOwner"}`),confirm:j("blocklet.config.vault.approve.confirm"),success:j("blocklet.config.vault.approve.success")},onSuccess:()=>{a.open({locale:p,action:"config-vault",forceConnected:!1,saveConnect:!1,autoConnect:!1,className:"connect",checkTimeout:10*60*1e3,passkeyBehavior:"none",extraParams:{sessionId:c.sessionId},messages:{title:j("blocklet.config.vault.commit.title"),scan:j("blocklet.config.vault.commit.scan"),confirm:j("blocklet.config.vault.commit.confirm"),success:j("blocklet.config.vault.commit.success")},onSuccess:()=>{t({loading:!1}),R()},onClose:()=>{t({loading:!1}),a.close()}})},onClose:()=>{t({loading:!1}),a.close()}})}catch(c){t({loading:!1,error:it(c)})}},o=je.toAddress(h.address),r=[];je.isValid(o)&&r.push({key:j("blocklet.config.vault.role"),value:e.jsx(ft,{color:"primary",variant:"outlined",size:"small",label:je.toTypeInfoStr(o).role||"-"})});const s=h.fetched.find(c=>c.address===o);return s&&r.push({key:j("blocklet.config.vault.firstSeen"),value:St(s.context?.genesisTime,"-")},{key:j("blocklet.config.vault.lastSeen"),value:St(s.context?.renaissanceTime,"-")},{key:j("blocklet.config.vault.migratedFrom"),value:s.migratedFrom.length?s.migratedFrom.map(c=>e.jsx(at,{did:c,showQrcode:!0,compact:!0,size:14,locale:p},c)):"-"},{key:j("blocklet.config.vault.migratedTo"),value:s.migratedTo.length?s.migratedTo.map(c=>e.jsx(at,{did:c,showQrcode:!0,compact:!0,size:14,locale:p},c)):"-"}),e.jsx(ke,{open:!0,fullWidth:!0,showCloseButton:!1,onClose:v,title:e.jsxs($,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(rs,{}),j("blocklet.config.vault.title")]}),actions:e.jsxs(e.Fragment,{children:[e.jsx(re,{onClick:v,children:j("common.cancel")}),e.jsx(re,{onClick:l,variant:"contained",disabled:!!h.error||h.loading,children:j("common.confirm")})]}),children:e.jsxs(ae,{direction:"column",spacing:3,children:[e.jsxs(Y,{variant:"body1",gutterBottom:!0,sx:{color:"text.secondary"},children:[j("blocklet.config.vault.desc")," ",j("blocklet.config.vault.tip")]}),C.length>0&&e.jsxs($,{children:[e.jsxs(Y,{variant:"body1",gutterBottom:!0,sx:{color:"text.secondary"},children:[j("blocklet.config.vault.current"),":"]}),e.jsxs($,{sx:{display:"flex",alignItems:"center",gap:.5},children:[e.jsx(er,{did:C[C.length-1].did,showQrcode:!0,style:{width:"auto"}}),e.jsx(Tr,{vaults:C,appPid:_})]})]}),e.jsx(U,{fullWidth:!0,"data-cy":"input-factory-address",label:j("blocklet.config.vault.address"),error:!!h.error,helperText:h.error,value:h.address,onChange:c=>{t({address:c.target.value,error:""})},slotProps:{input:{endAdornment:h.fetching?e.jsx(Vt,{position:"end",children:e.jsx(Ee,{size:16})}):null}}}),e.jsx($,{sx:{"& .info-row__name":{fontSize:"14px"},"& .info-row__value":{fontSize:"14px"}},children:r.map(c=>e.jsx(Qt,{valueComponent:"div",nameWidth:120,name:c.key,children:c.value},c.key))})]})})}fs.propTypes={onCancel:T.func.isRequired,onSuccess:T.func.isRequired,blocklet:T.object.isRequired};function xt({blocklet:v,onUpdate:R=()=>{},hasPermission:O=!1}){const{info:C,api:_,inService:j}=ne(),{t:p,locale:a}=q.useContext(ue),[m,f]=gt({loading:!1,showTransferOwner:!1,showConfigVault:!1}),[h,t]=q.useState(()=>v?.settings?.gateway?.wafPolicy?.enabled??!0),[l,o]=q.useState(()=>!!v?.settings?.enableSessionHardening),[r,s]=q.useState(()=>!!v?.settings?.invite?.enabled),[c,n]=q.useState(()=>{const I=v?.settings?.org||{};return{enabled:I.enabled||!1,maxMemberPerOrg:I.maxMemberPerOrg||100,maxOrgPerUser:I.maxOrgPerUser||10}}),i=m.loading||!O,{did:u}=v.meta,g=j?window.env?.gateway?.wafPolicy?.enabled:C?.routing.wafPolicy?.enabled;if(pt(v.status))return null;const y=v.environments.find(I=>I.key===W.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_DELETABLE),k=!y||y.value==="yes",d=v.environments.find(I=>I.key===W.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_TENANT_MODE)?.value||W.BLOCKLET_TENANT_MODES.SINGLE,x=(I,B)=>async F=>{if(!m.loading){f({loading:!0});try{const{checked:K}=F.target,{blocklet:he}=await _.configBlocklet({input:{did:v.meta.did,configs:[{key:W.BLOCKLET_CONFIGURABLE_KEY[I],value:B(K)}]}});R(he)}catch(K){Z.error(K.message)}finally{f({loading:!1})}}},b=x("BLOCKLET_DELETABLE",I=>I?"no":"yes"),S=x("BLOCKLET_APP_TENANT_MODE",I=>I?W.BLOCKLET_TENANT_MODES.MULTIPLE:W.BLOCKLET_TENANT_MODES.SINGLE),A=(I,B)=>async F=>{if(!m.loading){f({loading:!0});try{const K=F.target.checked;await _.updateBlockletSettings({input:I(K)}),B&&B(K)}catch(K){Z.error(K.message)}finally{f({loading:!1})}}},P=A(I=>({did:v.meta.did,invite:{enabled:I}}),s),L=A(I=>({did:v.meta.did,org:{enabled:I,maxMemberPerOrg:100,maxOrgPerUser:10}}),I=>{n({...c,enabled:I})}),D=async(I,B)=>{if(!m.loading){f({loading:!0});try{await _.updateBlockletSettings({input:{did:v.meta.did,org:{...c,[I]:B}}}),n({...c,[I]:B})}catch(F){Z.error(F.message)}finally{f({loading:!1})}}},N=A(I=>({did:v.meta.did,gateway:{wafPolicy:{enabled:I}}}),t),V=A(I=>({did:v.meta.did,enableSessionHardening:I}),I=>{o(I),tr()}),z=async()=>{if(!m.loading){f({loading:!0});try{const{blocklet:I}=await _.getBlocklet({input:{did:v.meta.did}});R(I)}catch(I){Z.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:[!j&&e.jsxs(e.Fragment,{children:[e.jsx(M,{title:p("blocklet.config.deletable.name"),desc:p(k?"blocklet.config.deletable.disable":"blocklet.config.deletable.enable"),children:e.jsx($,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(pe,{disabled:i,checked:!k,defaultChecked:!0,onChange:b})})}),e.jsx($,{className:"config-form",component:G,sx:{my:3}})]}),e.jsx(us,{inService:j,disabled:i,loading:m.loading,onChange:z}),e.jsx($,{className:"config-form",component:G,sx:{my:3}}),j&&e.jsx(wr,{role:"owner",children:I=>(I||mn)&&e.jsxs(e.Fragment,{children:[e.jsx(M,{title:p("blocklet.config.vault.title"),desc:p("blocklet.config.vault.desc"),children:e.jsx($,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsxs(re,{variant:"contained",color:"primary",size:"small","data-cy":"config-vault",onClick:()=>f({showConfigVault:!0}),children:[e.jsx(rs,{style:{fontSize:"1.3em",marginRight:4}}),p("blocklet.config.vault.title")]})})}),e.jsx($,{className:"config-form",component:G,sx:{my:3}}),m.showConfigVault&&e.jsx(fs,{blocklet:v,onCancel:()=>f({showConfigVault:!1}),onSuccess:()=>f({showConfigVault:!1})}),e.jsx(M,{title:p("team.transferApp.name"),desc:p("team.transferApp.description"),children:e.jsx($,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsxs(re,{variant:"contained",edge:"end",color:"primary",size:"small","data-cy":"transfer-app",onClick:()=>f({showTransferOwner:!0}),children:[e.jsx(Xr,{style:{fontSize:"1.3em",marginRight:4}}),p("team.transferApp.name")]})})}),e.jsx($,{className:"config-form",component:G,sx:{my:3}}),m.showTransferOwner&&e.jsx(hs,{onCancel:()=>f({showTransferOwner:!1}),onSuccess:()=>f({showTransferOwner:!1})})]})}),e.jsx(M,{title:p("blocklet.config.clearCache.name"),desc:p("blocklet.config.clearCache.purpose"),children:e.jsx($,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(Rr,{teamDid:u})})}),e.jsx($,{className:"config-form",component:G,sx:{my:3}}),e.jsx(M,{title:p("blocklet.config.rotateSessionKey.name"),desc:p("blocklet.config.rotateSessionKey.purpose"),children:e.jsx($,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(Or,{style:{whiteSpace:"nowrap"},teamDid:u})})}),e.jsx($,{className:"config-form",component:G,sx:{my:3}}),e.jsx(M,{title:p("blocklet.config.tenantMode.name"),desc:p(`blocklet.config.tenantMode.${d}`),children:e.jsx($,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(pe,{disabled:i,checked:d===W.BLOCKLET_TENANT_MODES.MULTIPLE,onChange:S})})}),e.jsx($,{className:"config-form",component:G,sx:{my:3}}),e.jsx(M,{title:p("team.invite.setting"),desc:p(`team.invite.${r?"enabled":"disabled"}`),children:e.jsx($,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(pe,{disabled:i,checked:r,onChange:P})})}),e.jsx($,{className:"config-form",component:G,sx:{my:3}}),e.jsx(M,{title:e.jsxs(ae,{direction:"row",sx:{alignItems:"center",gap:1},children:[p("setting.form.enableSessionHardening.switchLabel"),e.jsx(te,{title:p("setting.form.enableSessionHardening.switchTips"),children:e.jsx(Ct,{sx:{ml:.5,fontSize:"20px"},color:"primary"})})]}),children:e.jsx($,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(pe,{disabled:i,checked:l,onChange:V})})}),g&&e.jsxs(e.Fragment,{children:[e.jsx($,{className:"config-form",component:G,sx:{my:3}}),e.jsx(M,{title:e.jsxs(ae,{direction:"row",sx:{alignItems:"center",gap:1},children:[p("router.gateway.wafPolicy.title"),e.jsx(te,{title:e.jsx($,{sx:{fontSize:"14px",lineHeight:1.5},children:e.jsx($,{sx:{color:"common.white",ml:.5},component:"a",href:`https://www.arcblock.io/docs/blocklet-developer/${a}/enable-web-application-firewall`,target:"_blank",rel:"noopener noreferrer",children:p("dashboard.document")})}),children:e.jsx(Ct,{fontSize:"small",color:"action",sx:{fontSize:16,cursor:"pointer"}})})]}),desc:p("router.gateway.wafPolicy.switchLabel"),children:e.jsx($,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(pe,{disabled:i,checked:h,onChange:N})})})]}),e.jsx($,{className:"config-form",component:G,sx:{my:3}}),e.jsx(M,{title:e.jsx(ae,{direction:"row",sx:{alignItems:"center",gap:1},children:p("common.orgs")}),desc:p("team.orgs.explain"),children:e.jsxs($,{sx:{display:"flex",flexDirection:"column",gap:2,width:"100%",alignSelf:{xs:"flex-start",md:"flex-end"}},children:[e.jsx(pe,{disabled:i,checked:c.enabled,onChange:L}),c.enabled&&e.jsxs($,{sx:{display:"flex",flexDirection:"column",gap:1,minWidth:400,mt:1},children:[e.jsx(lt,{style:{marginTop:0},disabled:i,loading:m.loading,type:"number",min:2,initialValue:c.maxOrgPerUser,label:p("team.orgs.invite.maxOrgs"),placeholder:p("team.orgs.invite.maxOrgs"),onSubmit:I=>D("maxOrgPerUser",I)}),e.jsx(lt,{style:{marginTop:0},disabled:i,loading:m.loading,type:"number",min:2,initialValue:c.maxMemberPerOrg,label:p("team.orgs.invite.maxMembers"),placeholder:p("team.orgs.invite.maxMembers"),onSubmit:I=>D("maxMemberPerOrg",I)})]})]})})]})}const bn=Ie(xt,"mutate_blocklets"),jn=Ie(xt,"",mt);function _n(v){const{inService:R}=ne();return R?e.jsx(jn,{...v}):e.jsx(bn,{...v})}xt.propTypes={blocklet:T.object.isRequired,onUpdate:T.func,hasPermission:T.bool};function vt({blocklet:v,onUpdate:R=()=>{},hasPermission:O=!1,...C}){const{t:_}=q.useContext(ue);return pt(v.status)?null:e.jsxs(Cn,{...C,children:[e.jsx(un,{blocklet:v,onUpdate:R,hasPermission:O}),e.jsx($,{sx:{mt:6},children:e.jsx(Y,{variant:"h6",sx:{fontWeight:600},children:_("blocklet.config.dangerZone")})}),e.jsx($,{className:"config-form",component:G,sx:{my:3}}),e.jsx($,{sx:{maxWidth:1536},children:e.jsx(_n,{blocklet:v,onUpdate:R,hasPermission:O})})]})}const wn=Ie(vt,"mutate_blocklets"),kn=Ie(vt,"",mt);function Sn(v){const{inService:R}=ne();return R?e.jsx(kn,{...v}):e.jsx(wn,{...v})}vt.propTypes={blocklet:T.object.isRequired,onUpdate:T.func,hasPermission:T.bool};const Cn=xe($)`
51
51
  .config-form {
52
52
  flex-grow: 1;
53
53
  overflow-y: auto;
@@ -79,7 +79,7 @@ ${m("blocklet.config.logoDesc",{width:512,height:512,maxSize:5})}`,children:e.js
79
79
  .form-item {
80
80
  margin-top: 0;
81
81
  }
82
- `,bt={width:24,height:24,body:'<path fill="currentColor" d="M5 4v16V4v5v-5Zm3 10h2.675q.275-.575.638-1.075t.812-.925H8q-.425 0-.713.288T7 13q0 .425.288.713T8 14Zm0 4h2.075Q10 17.5 10 17t.075-1H8q-.425 0-.713.288T7 17q0 .425.288.713T8 18Zm-3 4q-.825 0-1.413-.588T3 20V4q0-.825.588-1.413T5 2h7.175q.4 0 .763.15t.637.425l4.85 4.85q.275.275.425.638t.15.762V10.3q-.475-.15-.975-.225T17 10V9h-4q-.425 0-.713-.288T12 8V4H5v16h5.675q.275.575.638 1.075t.812.925H5Zm12-10q2.075 0 3.538 1.463T22 17q0 2.075-1.463 3.538T17 22q-2.075 0-3.538-1.463T12 17q0-2.075 1.463-3.538T17 12Zm0 8q.275 0 .463-.188t.187-.462q0-.275-.187-.463T17 18.7q-.275 0-.463.188t-.187.462q0 .275.188.463T17 20Zm0-6q-.475 0-.875.238t-.65.637q-.1.15-.025.313t.25.237q.15.075.3 0t.275-.2q.125-.175.313-.275t.412-.1q.325 0 .563.213t.237.537q0 .275-.15.463t-.35.387q-.15.15-.313.3t-.287.35q-.075.15-.113.313t-.037.337q0 .225.125.413t.325.187q.2 0 .325-.15t.125-.35q0-.275.15-.488t.35-.412q.3-.275.525-.613t.225-.737q0-.675-.5-1.138T17 14Z"/>'},Xe={enabled:!1,domain:"",clientId:"",clientSecret:""};function Rn(){const{api:v}=ne(),{blocklet:R}=le(),{t:O,locale:C}=oe(),_=R?.meta?.did,j=Object.assign({...Xe},R?.settings?.oauth?.auth0||{}),{handleSubmit:p,control:i,formState:m,watch:f,reset:h}=ve({defaultValues:Re(j,Object.keys(Xe))}),t=f("enabled"),l=E(async a=>{try{const{blocklet:u}=await v.configOAuth({input:{did:_,oauth:JSON.stringify({auth0:a})}}),g=Object.assign({...Xe},u?.settings?.oauth?.auth0||{});h(g),Z.success(O("oauth.saveSuccess"))}catch(u){Z.error(u.message||O("oauth.saveFailed"))}}),o=E(a=>a?.trim()?!0:O("oauth.auth0.domainDescription")),r=E(a=>a?.trim()?!0:O("oauth.auth0.clientIdDescription")),s=E(a=>a?.trim()?!0:O("oauth.auth0.clientSecretDescription")),c=E(()=>!0),n=ge(()=>C==="zh"?"https://www.arcblock.io/blog/docs/did-connect/zh/oauth-config-auth0":"https://www.arcblock.io/blog/docs/did-connect/en/oauth-config-auth0",[C]);return e.jsx($,{children:e.jsxs("form",{onSubmit:p(l),disabled:!0,children:[e.jsx(M,{title:e.jsxs($,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx("span",{children:O("oauth.auth0.enable")}),e.jsx(te,{title:O("oauth.viewDocument"),children:e.jsx($,{component:"a",sx:{display:"inline-block",color:"inherit",fontSize:0,lineHeight:1},href:n,target:"_blank",rel:"noreferrer",children:e.jsx(se,{icon:bt,fontSize:20})})})]}),mb:2.5,children:e.jsx(H,{name:"enabled",control:i,render:({field:a})=>e.jsx(X,{control:e.jsx(ze,{sx:{ml:1},checked:a.value,...a})})})}),e.jsx(M,{title:O("oauth.auth0.domain"),children:e.jsx(H,{name:"domain",control:i,rules:{validate:t?o:c},render:({field:a})=>e.jsx(Q,{fullWidth:!0,children:e.jsx(U,{...a,size:"small",label:O("oauth.auth0.domain"),error:!!m.errors[a.name],helperText:m.errors[a.name]?.message||" ",disabled:!t})})})}),e.jsx(M,{title:O("oauth.auth0.clientId"),children:e.jsx(H,{name:"clientId",control:i,rules:{validate:t?r:c},render:({field:a})=>e.jsx(Q,{fullWidth:!0,children:e.jsx(U,{...a,size:"small",label:O("oauth.auth0.clientId"),error:!!m.errors[a.name],helperText:m.errors[a.name]?.message||" ",disabled:!t})})})}),e.jsx(M,{title:O("oauth.auth0.clientSecret"),children:e.jsx(H,{name:"clientSecret",control:i,rules:{validate:t?s:c},render:({field:a})=>e.jsx(Q,{fullWidth:!0,children:e.jsx(U,{...a,size:"small",type:"password",label:O("oauth.auth0.clientSecret"),error:!!m.errors[a.name],helperText:m.errors[a.name]?.message||" ",disabled:!t})})})}),e.jsx(ee,{type:"submit",variant:"contained",onSubmit:p(l),disabled:!m.isDirty,children:O("oauth.save")})]})})}const Qe={enabled:!1,clientId:"",clientSecret:""};function On(){const{api:v}=ne(),{blocklet:R}=le(),{t:O,locale:C}=oe(),_=R?.meta?.did,j=Object.assign({...Qe},R?.settings?.oauth?.github||{}),{handleSubmit:p,control:i,formState:m,watch:f,reset:h}=ve({defaultValues:Re(j,Object.keys(Qe))}),t=f("enabled"),l=E(async n=>{try{const{blocklet:a}=await v.configOAuth({input:{did:_,oauth:JSON.stringify({github:n})}}),u=Object.assign({...Qe},a?.settings?.oauth?.github||{});h(u),Z.success(O("oauth.saveSuccess"))}catch(a){Z.error(a.message||O("oauth.saveFailed"))}}),o=E(n=>n?.trim()?!0:O("oauth.github.clientIdDescription")),r=E(n=>n?.trim()?!0:O("oauth.github.clientSecretDescription")),s=E(()=>!0),c=ge(()=>C==="zh"?"https://www.arcblock.io/blog/docs/did-connect/zh/oauth-config-github":"https://www.arcblock.io/blog/docs/did-connect/en/oauth-config-github",[C]);return e.jsx($,{children:e.jsxs("form",{onSubmit:p(l),disabled:!0,children:[e.jsx(M,{title:e.jsxs($,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx("span",{children:O("oauth.github.enable")}),e.jsx(te,{title:O("oauth.viewDocument"),children:e.jsx($,{component:"a",sx:{display:"inline-block",color:"inherit",fontSize:0,lineHeight:1},href:c,target:"_blank",rel:"noreferrer",children:e.jsx(se,{icon:bt,fontSize:20})})})]}),mb:2.5,sx:{"& .section-content":{alignItems:"center"}},children:e.jsx(H,{name:"enabled",control:i,sx:{alignItems:"center"},render:({field:n})=>e.jsx(X,{control:e.jsx(ze,{sx:{ml:1},size:"small",checked:n.value,...n})})})}),e.jsx(M,{title:O("oauth.github.clientId"),children:e.jsx(H,{name:"clientId",control:i,rules:{validate:t?o:s},render:({field:n})=>e.jsx(Q,{fullWidth:!0,children:e.jsx(U,{...n,size:"small",label:O("oauth.github.clientId"),error:!!m.errors[n.name],helperText:m.errors[n.name]?.message||" ",disabled:!t})})})}),e.jsx(M,{title:O("oauth.github.clientSecret"),children:e.jsx(H,{name:"clientSecret",control:i,rules:{validate:t?r:s},render:({field:n})=>e.jsx(Q,{fullWidth:!0,children:e.jsx(U,{...n,size:"small",type:"password",label:O("oauth.github.clientSecret"),error:!!m.errors[n.name],helperText:m.errors[n.name]?.message||" ",disabled:!t})})})}),e.jsx(ee,{type:"submit",variant:"contained",onSubmit:p(l),disabled:!m.isDirty,children:O("oauth.save")})]})})}const et={enabled:!1,clientId:"",clientSecret:""};function $n(){const{api:v}=ne(),{blocklet:R}=le(),{t:O,locale:C}=oe(),_=R?.meta?.did,j=Object.assign({...et},R?.settings?.oauth?.google||{}),{handleSubmit:p,control:i,formState:m,watch:f,reset:h}=ve({defaultValues:Re(j,Object.keys(et))}),t=f("enabled"),l=E(async n=>{try{const{blocklet:a}=await v.configOAuth({input:{did:_,oauth:JSON.stringify({google:n})}}),u=Object.assign({...et},a?.settings?.oauth?.google||{});h(u),Z.success(O("oauth.saveSuccess"))}catch(a){Z.error(a.message||O("oauth.saveFailed"))}}),o=E(n=>n?.trim()?!0:O("oauth.google.clientIdDescription")),r=E(n=>n?.trim()?!0:O("oauth.google.clientSecretDescription")),s=E(()=>!0),c=ge(()=>C==="zh"?"https://www.arcblock.io/blog/docs/did-connect/zh/oauth-config-google":"https://www.arcblock.io/blog/docs/did-connect/en/oauth-config-google",[C]);return e.jsx($,{children:e.jsxs("form",{onSubmit:p(l),disabled:!0,children:[e.jsx(M,{title:e.jsxs($,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx("span",{children:O("oauth.google.enable")}),e.jsx(te,{title:O("oauth.viewDocument"),children:e.jsx($,{component:"a",sx:{display:"inline-block",color:"inherit",fontSize:0,lineHeight:1},href:c,target:"_blank",rel:"noreferrer",children:e.jsx(se,{icon:bt,fontSize:20})})})]}),mb:2.5,children:e.jsx(H,{name:"enabled",control:i,render:({field:n})=>e.jsx(X,{control:e.jsx(ze,{sx:{ml:1},checked:n.value,...n})})})}),e.jsx(M,{title:O("oauth.google.clientId"),children:e.jsx(H,{name:"clientId",control:i,rules:{validate:t?o:s},render:({field:n})=>e.jsx(Q,{fullWidth:!0,children:e.jsx(U,{...n,size:"small",label:O("oauth.google.clientId"),error:!!m.errors[n.name],helperText:m.errors[n.name]?.message||" ",disabled:!t})})})}),e.jsx(M,{title:O("oauth.google.clientSecret"),children:e.jsx(H,{name:"clientSecret",control:i,rules:{validate:t?r:s},render:({field:n})=>e.jsx(Q,{fullWidth:!0,children:e.jsx(U,{...n,size:"small",type:"password",label:O("oauth.google.clientSecret"),error:!!m.errors[n.name],helperText:m.errors[n.name]?.message||" ",disabled:!t})})})}),e.jsx(ee,{type:"submit",variant:"contained",onSubmit:p(l),disabled:!m.isDirty,children:O("oauth.save")})]})})}const tt={enabled:!1,teamId:"",serviceId:"",keyId:"",authKey:"",bundleId:""};function An(){const{api:v}=ne(),{blocklet:R}=le(),{t:O}=oe(),C=R?.meta?.did,_=Object.assign({...tt},R?.settings?.oauth?.apple||{}),{handleSubmit:j,control:p,formState:i,watch:m,reset:f}=ve({defaultValues:Re(_,Object.keys(tt))}),h=m("enabled"),t=E(async a=>{try{const{blocklet:u}=await v.configOAuth({input:{did:C,oauth:JSON.stringify({apple:a})}}),g=Object.assign({...tt},u?.settings?.oauth?.apple||{});f(g),Z.success(O("oauth.saveSuccess"))}catch(u){Z.error(u.message||O("oauth.saveFailed"))}}),l=E(a=>a?.trim()?!0:O("oauth.apple.teamIdDescription")),o=E(a=>a?.trim()?!0:O("oauth.apple.serviceIdDescription")),r=E(a=>a?.trim()?!0:O("oauth.apple.keyIdDescription")),s=E(a=>a?.trim()?!0:O("oauth.apple.authKeyDescription")),c=E(a=>a?.trim()?!0:O("oauth.apple.bundleIdDescription")),n=E(()=>!0);return e.jsx($,{children:e.jsxs("form",{onSubmit:j(t),disabled:!0,children:[e.jsx(M,{title:O("oauth.apple.enable"),mb:2.5,children:e.jsx(H,{name:"enabled",control:p,render:({field:a})=>e.jsx(X,{control:e.jsx(ze,{sx:{ml:1},checked:a.value,...a})})})}),e.jsx(M,{title:O("oauth.apple.teamId"),children:e.jsx(H,{name:"teamId",control:p,rules:{validate:h?l:n},render:({field:a})=>e.jsx(Q,{fullWidth:!0,children:e.jsx(U,{...a,size:"small",label:O("oauth.apple.teamId"),error:!!i.errors[a.name],helperText:i.errors[a.name]?.message||" ",disabled:!h})})})}),e.jsx(M,{title:O("oauth.apple.bundleId"),children:e.jsx(H,{name:"bundleId",control:p,rules:{validate:h?c:n},render:({field:a})=>e.jsx(Q,{fullWidth:!0,children:e.jsx(U,{...a,size:"small",label:O("oauth.apple.bundleId"),error:!!i.errors[a.name],helperText:i.errors[a.name]?.message||" ",disabled:!h})})})}),e.jsx(M,{title:O("oauth.apple.serviceId"),children:e.jsx(H,{name:"serviceId",control:p,rules:{validate:h?o:n},render:({field:a})=>e.jsx(Q,{fullWidth:!0,children:e.jsx(U,{...a,size:"small",label:O("oauth.apple.serviceId"),error:!!i.errors[a.name],helperText:i.errors[a.name]?.message||" ",disabled:!h})})})}),e.jsx(M,{title:O("oauth.apple.keyId"),children:e.jsx(H,{name:"keyId",control:p,rules:{validate:h?r:n},render:({field:a})=>e.jsx(Q,{fullWidth:!0,children:e.jsx(U,{...a,size:"small",label:O("oauth.apple.keyId"),error:!!i.errors[a.name],helperText:i.errors[a.name]?.message||" ",disabled:!h})})})}),e.jsx(M,{title:O("oauth.apple.authKey"),children:e.jsx(H,{name:"authKey",control:p,rules:{validate:h?s:n},render:({field:a})=>e.jsx(Q,{fullWidth:!0,children:e.jsx(U,{...a,size:"small",type:"password",label:O("oauth.apple.authKey"),multiline:!0,rows:4,error:!!i.errors[a.name],helperText:i.errors[a.name]?.message||" ",disabled:!h})})})}),e.jsx(ee,{type:"submit",variant:"contained",onSubmit:j(t),disabled:!i.isDirty,children:O("oauth.save")})]})})}const st={enabled:!1,clientId:"",clientSecret:""};function Pn(){const{api:v}=ne(),{blocklet:R}=le(),{t:O}=oe(),C=R?.meta?.did,_=Object.assign({...st},R?.settings?.oauth?.twitter||{}),{handleSubmit:j,control:p,formState:i,watch:m,reset:f}=ve({defaultValues:Re(_,Object.keys(st))}),h=m("enabled"),t=E(async s=>{try{const{blocklet:c}=await v.configOAuth({input:{did:C,oauth:JSON.stringify({twitter:s})}}),n=Object.assign({...st},c?.settings?.oauth?.twitter||{});f(n),Z.success(O("oauth.saveSuccess"))}catch(c){Z.error(c.message||O("oauth.saveFailed"))}}),l=E(s=>s?.trim()?!0:O("oauth.twitter.clientIdDescription")),o=E(s=>s?.trim()?!0:O("oauth.twitter.clientSecretDescription")),r=E(()=>!0);return e.jsx($,{children:e.jsxs("form",{onSubmit:j(t),disabled:!0,children:[e.jsx(M,{title:e.jsx($,{sx:{display:"flex",alignItems:"center",gap:1},children:e.jsx("span",{children:O("oauth.twitter.enable")})}),mb:2.5,sx:{"& .section-content":{alignItems:"center"}},children:e.jsx(H,{name:"enabled",control:p,sx:{alignItems:"center"},render:({field:s})=>e.jsx(X,{control:e.jsx(ze,{sx:{ml:1},size:"small",checked:s.value,...s})})})}),e.jsx(M,{title:O("oauth.twitter.clientId"),children:e.jsx(H,{name:"clientId",control:p,rules:{validate:h?l:r},render:({field:s})=>e.jsx(Q,{fullWidth:!0,children:e.jsx(U,{...s,size:"small",label:O("oauth.twitter.clientId"),error:!!i.errors[s.name],helperText:i.errors[s.name]?.message||" ",disabled:!h})})})}),e.jsx(M,{title:O("oauth.twitter.clientSecret"),children:e.jsx(H,{name:"clientSecret",control:p,rules:{validate:h?o:r},render:({field:s})=>e.jsx(Q,{fullWidth:!0,children:e.jsx(U,{...s,size:"small",type:"password",label:O("oauth.twitter.clientSecret"),error:!!i.errors[s.name],helperText:i.errors[s.name]?.message||" ",disabled:!h})})})}),e.jsx(ee,{type:"submit",variant:"contained",onSubmit:j(t),disabled:!i.isDirty,children:O("oauth.save")})]})})}const Tn={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 ms({id:v,title:R,children:O,index:C,onMove:_,defaultExpand:j=!1,onEnd:p,icon:i=null}){const[m,f]=q.useState(j),h=q.useRef(null),t=q.useRef(null),[{handlerId:l},o]=Lr({accept:"dragItem",collect(a){return{handlerId:a.getHandlerId()}},hover(a,u){if(!h.current)return;const g=a.index,y=C;if(g===y)return;const k=h.current?.getBoundingClientRect(),w=t.current?.getBoundingClientRect(),d=(w.bottom-w.top)/2,b=u.getClientOffset().y-k.top;g<y&&b<d||g>y&&b>d||(_(g,y),a.index=y)}}),[{isDragging:r},s]=qr({item:{index:C,type:"dragItem"},collect:a=>({isDragging:a.isDragging()}),end:p});s(t),o(h);const c=r?.5:1,n=E(a=>{a.preventDefault(),a.stopPropagation(),f(!m)});return e.jsxs($,{ref:h,children:[e.jsxs($,{sx:{cursor:"pointer","&:hover":{backgroundColor:"grey.100"}},ref:t,"data-handler-id":l,children:[e.jsxs($,{sx:{py:2,px:1,opacity:c,display:"flex",alignItems:"center",gap:.5},draggable:!1,onClick:n,children:[e.jsx($,{sx:{pointerEvents:"auto",cursor:"grab","&:active":{cursor:"grabbing"},fontSize:0,color:"text.hint","&:hover":{color:"text.secondary"}},children:e.jsx(se,{fontSize:20,icon:Tn})}),e.jsx($,{sx:{display:"flex",alignItems:"center",flexShrink:0,mr:.5,transform:"translateY(-1px)"},children:i}),e.jsx(Y,{sx:{flex:1},children:R}),e.jsx(ae,{size:"small",sx:{pointerEvents:"auto",transform:m?"":"rotate(180deg)",transition:"transform 0.3s ease"},children:e.jsx(se,{icon:Er,style:{transform:"scale(1.5)"}})})]}),e.jsx(G,{})]}),e.jsx($,{sx:{pl:4,py:2.5,display:m?"block":"none"},children:O})]})}ms.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,icon:T.any};const En=[{name:"github",title:W.PROVIDER_NAME.github,icon:e.jsx(qe,{provider:"github",sx:{width:20,height:20}}),component:e.jsx(On,{})},{name:"google",title:W.PROVIDER_NAME.google,icon:e.jsx(qe,{provider:"google",sx:{width:20,height:20}}),component:e.jsx($n,{})},{name:"apple",title:W.PROVIDER_NAME.apple,icon:e.jsx(qe,{provider:"apple",sx:{width:20,height:20}}),component:e.jsx(An,{})},{name:"twitter",title:W.PROVIDER_NAME.twitter,icon:e.jsx(qe,{provider:"twitter",sx:{width:20,height:20}}),component:e.jsx(Pn,{})},{name:"auth0",title:W.PROVIDER_NAME.auth0,icon:e.jsx(qe,{provider:"auth0",sx:{width:20,height:20}}),component:e.jsx(Rn,{})}],In=["github","google","apple","twitter","auth0"];function Dn(){const{api:v}=ne(),{blocklet:R}=le(),O=R?.meta?.did,C=R?.settings?.oauth||{},_=Object.keys(C).sort((t,l)=>C[t]?.order!==void 0&&C[l]?.order!==void 0?C[t].order-C[l].order:C[t]?.order!==void 0?-1:1);for(const t of In)_.includes(t)||_.push(t);const j=ye(_.reduce((t,l,o)=>Object.assign(t,{[l]:o}),{})),p=ge(()=>{const t=[...En];return t.sort((l,o)=>j[l.name]-j[o.name]),t.map(l=>({...l,enabled:C[l.name]?.enabled??!1}))},[j.auth0,j.github,j.google]),i={};typeof window<"u"&&(i.context=window);const m=E(async t=>{const l={};Object.keys(t).forEach(o=>{l[o]={order:t[o]}}),await v.configOAuth({input:{did:O,oauth:JSON.stringify(l)}})}),f=E((t,l)=>{const o=p[t],r=p[l];j[o.name]=l,j[r.name]=t}),h=E(async()=>{await m(j)});return e.jsx($,{sx:{".section-left":{width:"180px"}},children:e.jsx(Mr,{backend:Br,...i,children:p.map((t,l)=>e.jsx(ms,{index:l,id:t.name,title:t.title,icon:t.icon,onMove:f,onEnd:h,defaultExpand:t.enabled,children:t.component},t.name))})})}const Se={ttl:J.SESSION_TTL,cacheTtl:J.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 fe(v){return e.jsx(zr,{...v,sx:{transform:"scale(0.75)"}})}function rt(v,R=!1){const O=R?v.ttl*86400:v.ttl/86400;return{...v,ttl:O}}function Ln(){const{api:v}=ne(),{blocklet:R}=le(),O=R?.meta?.did,C=sr({},Se,R?.settings?.session||{});Je(C.ttl)&&(C.ttl=Se.ttl),Je(C.cacheTtl)&&(C.cacheTtl=Se.cacheTtl),C.phone||(C.phone=Se.phone),C.email||(C.email=Se.email),Je(C.enableBlacklist)&&(C.enableBlacklist=Se.enableBlacklist);const{handleSubmit:_,control:j,formState:p,reset:i,watch:m}=ve({defaultValues:Re(rt(C),["ttl","cacheTtl","email","phone","enableBlacklist"])}),{t:f}=oe(),h=m("email.enabled"),t=m("phone.enabled"),l=m("email.enableDomainBlackList"),o=m("email.enableDomainWhiteList"),{fields:r,append:s,remove:c}=Pt({control:j,name:"email.domainBlackList"}),{fields:n,append:a,remove:u}=Pt({control:j,name:"email.domainWhiteList"}),g=E(async y=>{try{const{blocklet:k}=await v.updateAppSessionConfig({input:{did:O,config:Ce(rt(y,!0),["phone"])}}),w=Object.assign({},Se,Re(k?.settings?.session||{},["ttl","cacheTtl","email","phone","enableBlacklist"]));i(rt(w)),Z.success(f("common.configSuccess"))}catch(k){Z.error(k.message)}});return e.jsx(qn,{onSubmit:_(g),children:e.jsxs(ie,{direction:"column",sx:{gap:6},children:[e.jsxs($,{children:[e.jsxs($,{children:[e.jsx(Y,{variant:"h6",sx:{fontWeight:600},children:f("blocklet.config.session.profile")}),e.jsx($,{component:G,sx:{my:3}})]}),e.jsxs(ie,{sx:{gap:2},children:[e.jsx(M,{title:f("blocklet.config.session.fullNameEnabled"),sectionLeftSx:{width:"600px"},children:e.jsx($,{sx:{alignSelf:"flex-start"},children:e.jsx(fe,{disabled:!0,checked:!0})})}),e.jsx(M,{title:f("blocklet.config.session.avatarEnabled"),sectionLeftSx:{width:"600px"},children:e.jsx($,{sx:{alignSelf:"flex-start"},children:e.jsx(fe,{disabled:!0,checked:!0})})}),e.jsx(M,{title:f("blocklet.config.session.emailEnabled"),sectionLeftSx:{width:"600px"},children:e.jsx($,{sx:{alignSelf:"flex-start"},children:e.jsx(H,{name:"email.enabled",control:j,render:({field:y})=>e.jsx(fe,{...y,checked:y.value})})})}),h&&e.jsxs(ie,{direction:"column",sx:{ml:2,gap:.5},children:[e.jsx(M,{title:f("blocklet.config.session.emailRequireVerified"),sectionLeftSx:{width:"600px"},children:e.jsx($,{sx:{alignSelf:"flex-start"},children:e.jsx(H,{name:"email.requireVerified",control:j,render:({field:y})=>e.jsx(X,{sx:{ml:0},control:e.jsx(fe,{...y,checked:y.value})})})})}),e.jsx(M,{title:f("blocklet.config.session.emailRequireUnique"),sectionLeftSx:{width:"600px"},children:e.jsx($,{sx:{alignSelf:"flex-start"},children:e.jsx(H,{name:"email.requireUnique",control:j,render:({field:y})=>e.jsx(X,{sx:{ml:0},control:e.jsx(fe,{...y,checked:y.value})})})})}),e.jsx(M,{title:f("blocklet.config.session.emailTrustOauthProviders"),sectionLeftSx:{width:"600px"},children:e.jsx($,{sx:{alignSelf:"flex-start"},children:e.jsx(H,{name:"email.trustOauthProviders",control:j,render:({field:y})=>e.jsx(X,{sx:{ml:0},control:e.jsx(fe,{...y,checked:y.value})})})})}),e.jsx(M,{title:f("blocklet.config.session.enableDomainBlackList"),sectionLeftSx:{width:"600px"},children:e.jsx($,{sx:{alignSelf:"flex-start"},children:e.jsx(H,{name:"email.enableDomainBlackList",control:j,render:({field:y})=>e.jsx(X,{sx:{ml:0},control:e.jsx(fe,{...y,checked:y.value})})})})}),l&&e.jsxs($,{children:[r.map((y,k)=>e.jsxs(ie,{direction:"row",sx:{alignItems:"center",my:1,maxWidth:"720px"},children:[e.jsx(H,{name:`email.domainBlackList.${k}`,control:j,render:w=>e.jsx(U,{...w.field,size:"small",fullWidth:!0})}),e.jsx(ae,{onClick:()=>c(k),children:e.jsx(Tt,{})})]},y.id)),e.jsx(ee,{startIcon:e.jsx(Et,{}),onClick:()=>s(""),children:f("blocklet.config.session.addDomain")})]}),e.jsx(M,{title:f("blocklet.config.session.enableDomainWhiteList"),sectionLeftSx:{width:"600px"},children:e.jsx($,{sx:{alignSelf:"flex-start"},children:e.jsx(H,{name:"email.enableDomainWhiteList",control:j,render:({field:y})=>e.jsx(X,{sx:{ml:0},control:e.jsx(fe,{...y,checked:y.value})})})})}),o&&e.jsxs($,{children:[n.map((y,k)=>e.jsxs(ie,{direction:"row",sx:{alignItems:"center",my:1,maxWidth:"720px"},children:[e.jsx(H,{name:`email.domainWhiteList.${k}`,control:j,render:w=>e.jsx(U,{...w.field,size:"small",fullWidth:!0})}),e.jsx(ae,{onClick:()=>u(k),children:e.jsx(Tt,{})})]},y.id)),e.jsx(ee,{startIcon:e.jsx(Et,{}),onClick:()=>a(""),children:f("blocklet.config.session.addDomain")})]})]}),e.jsxs($,{sx:{display:"none"},children:[e.jsx(M,{title:f("blocklet.config.session.phoneEnabled"),sectionLeftSx:{width:"600px"},children:e.jsx($,{sx:{alignSelf:"flex-start"},children:e.jsx(H,{name:"phone.enabled",control:j,disabled:!0,render:({field:y})=>e.jsx(X,{sx:{ml:0},control:e.jsx(fe,{...y,checked:y.value})})})})}),t&&e.jsxs(ie,{direction:"column",sx:{ml:2,mt:1},children:[e.jsx(M,{title:f("blocklet.config.session.phoneRequireVerified"),sectionLeftSx:{width:"600px"},children:e.jsx($,{sx:{alignSelf:"flex-start"},children:e.jsx(H,{name:"phone.requireVerified",control:j,render:({field:y})=>e.jsx(X,{sx:{ml:0},control:e.jsx(fe,{...y,checked:y.value})})})})}),e.jsx(M,{title:f("blocklet.config.session.phoneRequireUnique"),sectionLeftSx:{width:"600px"},children:e.jsx($,{sx:{alignSelf:"flex-start"},children:e.jsx(H,{name:"phone.requireUnique",control:j,render:({field:y})=>e.jsx(X,{sx:{ml:0},control:e.jsx(fe,{...y,checked:y.value})})})})})]})]})]})]}),e.jsxs($,{children:[e.jsx(Y,{variant:"h6",sx:{fontWeight:600},children:f("blocklet.config.session.period")}),e.jsx($,{component:G,sx:{my:3}}),e.jsx(ie,{direction:"column",spacing:2,children:e.jsx(H,{name:"ttl",control:j,rules:{min:1,max:30},render:({field:y})=>e.jsx(Q,{fullWidth:!0,sx:{mb:2},children:e.jsx(M,{title:f("blocklet.config.session.ttl",{day:y.value}),sectionLeftSx:{width:"600px"},children:e.jsx($,{sx:{width:"100%",maxWidth:500,px:2},children:e.jsx($r,{...y,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($,{children:[e.jsx(Y,{variant:"h6",sx:{fontWeight:600},children:f("blocklet.config.session.experimentalSettings")}),e.jsx($,{component:G,sx:{my:3}}),e.jsx(ie,{direction:"column",spacing:2,children:e.jsx(M,{title:f("blocklet.config.session.enableBlacklist"),sectionLeftSx:{width:"600px"},children:e.jsx($,{sx:{alignSelf:"flex-start"},children:e.jsx(H,{name:"enableBlacklist",control:j,render:({field:y})=>e.jsx(X,{sx:{ml:0},control:e.jsx(fe,{...y,checked:y.value})})})})})})]}),e.jsx($,{children:e.jsx(ee,{type:"submit",variant:"contained",disabled:!p.isDirty,children:f("oauth.save")})})]})})}const qn=xe.form`
82
+ `,bt={width:24,height:24,body:'<path fill="currentColor" d="M5 4v16V4v5v-5Zm3 10h2.675q.275-.575.638-1.075t.812-.925H8q-.425 0-.713.288T7 13q0 .425.288.713T8 14Zm0 4h2.075Q10 17.5 10 17t.075-1H8q-.425 0-.713.288T7 17q0 .425.288.713T8 18Zm-3 4q-.825 0-1.413-.588T3 20V4q0-.825.588-1.413T5 2h7.175q.4 0 .763.15t.637.425l4.85 4.85q.275.275.425.638t.15.762V10.3q-.475-.15-.975-.225T17 10V9h-4q-.425 0-.713-.288T12 8V4H5v16h5.675q.275.575.638 1.075t.812.925H5Zm12-10q2.075 0 3.538 1.463T22 17q0 2.075-1.463 3.538T17 22q-2.075 0-3.538-1.463T12 17q0-2.075 1.463-3.538T17 12Zm0 8q.275 0 .463-.188t.187-.462q0-.275-.187-.463T17 18.7q-.275 0-.463.188t-.187.462q0 .275.188.463T17 20Zm0-6q-.475 0-.875.238t-.65.637q-.1.15-.025.313t.25.237q.15.075.3 0t.275-.2q.125-.175.313-.275t.412-.1q.325 0 .563.213t.237.537q0 .275-.15.463t-.35.387q-.15.15-.313.3t-.287.35q-.075.15-.113.313t-.037.337q0 .225.125.413t.325.187q.2 0 .325-.15t.125-.35q0-.275.15-.488t.35-.412q.3-.275.525-.613t.225-.737q0-.675-.5-1.138T17 14Z"/>'},Xe={enabled:!1,domain:"",clientId:"",clientSecret:""};function Rn(){const{api:v}=ne(),{blocklet:R}=le(),{t:O,locale:C}=oe(),_=R?.meta?.did,j=Object.assign({...Xe},R?.settings?.oauth?.auth0||{}),{handleSubmit:p,control:a,formState:m,watch:f,reset:h}=ve({defaultValues:Re(j,Object.keys(Xe))}),t=f("enabled"),l=E(async i=>{try{const{blocklet:u}=await v.configOAuth({input:{did:_,oauth:JSON.stringify({auth0:i})}}),g=Object.assign({...Xe},u?.settings?.oauth?.auth0||{});h(g),Z.success(O("oauth.saveSuccess"))}catch(u){Z.error(u.message||O("oauth.saveFailed"))}}),o=E(i=>i?.trim()?!0:O("oauth.auth0.domainDescription")),r=E(i=>i?.trim()?!0:O("oauth.auth0.clientIdDescription")),s=E(i=>i?.trim()?!0:O("oauth.auth0.clientSecretDescription")),c=E(()=>!0),n=ge(()=>C==="zh"?"https://www.arcblock.io/blog/docs/did-connect/zh/oauth-config-auth0":"https://www.arcblock.io/blog/docs/did-connect/en/oauth-config-auth0",[C]);return e.jsx($,{children:e.jsxs("form",{onSubmit:p(l),disabled:!0,children:[e.jsx(M,{title:e.jsxs($,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx("span",{children:O("oauth.auth0.enable")}),e.jsx(te,{title:O("oauth.viewDocument"),children:e.jsx($,{component:"a",sx:{display:"inline-block",color:"inherit",fontSize:0,lineHeight:1},href:n,target:"_blank",rel:"noreferrer",children:e.jsx(se,{icon:bt,fontSize:20})})})]}),mb:2.5,children:e.jsx(H,{name:"enabled",control:a,render:({field:i})=>e.jsx(X,{control:e.jsx(ze,{sx:{ml:1},checked:i.value,...i})})})}),e.jsx(M,{title:O("oauth.auth0.domain"),children:e.jsx(H,{name:"domain",control:a,rules:{validate:t?o:c},render:({field:i})=>e.jsx(Q,{fullWidth:!0,children:e.jsx(U,{...i,size:"small",label:O("oauth.auth0.domain"),error:!!m.errors[i.name],helperText:m.errors[i.name]?.message||" ",disabled:!t})})})}),e.jsx(M,{title:O("oauth.auth0.clientId"),children:e.jsx(H,{name:"clientId",control:a,rules:{validate:t?r:c},render:({field:i})=>e.jsx(Q,{fullWidth:!0,children:e.jsx(U,{...i,size:"small",label:O("oauth.auth0.clientId"),error:!!m.errors[i.name],helperText:m.errors[i.name]?.message||" ",disabled:!t})})})}),e.jsx(M,{title:O("oauth.auth0.clientSecret"),children:e.jsx(H,{name:"clientSecret",control:a,rules:{validate:t?s:c},render:({field:i})=>e.jsx(Q,{fullWidth:!0,children:e.jsx(U,{...i,size:"small",type:"password",label:O("oauth.auth0.clientSecret"),error:!!m.errors[i.name],helperText:m.errors[i.name]?.message||" ",disabled:!t})})})}),e.jsx(ee,{type:"submit",variant:"contained",onSubmit:p(l),disabled:!m.isDirty,children:O("oauth.save")})]})})}const Qe={enabled:!1,clientId:"",clientSecret:""};function On(){const{api:v}=ne(),{blocklet:R}=le(),{t:O,locale:C}=oe(),_=R?.meta?.did,j=Object.assign({...Qe},R?.settings?.oauth?.github||{}),{handleSubmit:p,control:a,formState:m,watch:f,reset:h}=ve({defaultValues:Re(j,Object.keys(Qe))}),t=f("enabled"),l=E(async n=>{try{const{blocklet:i}=await v.configOAuth({input:{did:_,oauth:JSON.stringify({github:n})}}),u=Object.assign({...Qe},i?.settings?.oauth?.github||{});h(u),Z.success(O("oauth.saveSuccess"))}catch(i){Z.error(i.message||O("oauth.saveFailed"))}}),o=E(n=>n?.trim()?!0:O("oauth.github.clientIdDescription")),r=E(n=>n?.trim()?!0:O("oauth.github.clientSecretDescription")),s=E(()=>!0),c=ge(()=>C==="zh"?"https://www.arcblock.io/blog/docs/did-connect/zh/oauth-config-github":"https://www.arcblock.io/blog/docs/did-connect/en/oauth-config-github",[C]);return e.jsx($,{children:e.jsxs("form",{onSubmit:p(l),disabled:!0,children:[e.jsx(M,{title:e.jsxs($,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx("span",{children:O("oauth.github.enable")}),e.jsx(te,{title:O("oauth.viewDocument"),children:e.jsx($,{component:"a",sx:{display:"inline-block",color:"inherit",fontSize:0,lineHeight:1},href:c,target:"_blank",rel:"noreferrer",children:e.jsx(se,{icon:bt,fontSize:20})})})]}),mb:2.5,sx:{"& .section-content":{alignItems:"center"}},children:e.jsx(H,{name:"enabled",control:a,sx:{alignItems:"center"},render:({field:n})=>e.jsx(X,{control:e.jsx(ze,{sx:{ml:1},size:"small",checked:n.value,...n})})})}),e.jsx(M,{title:O("oauth.github.clientId"),children:e.jsx(H,{name:"clientId",control:a,rules:{validate:t?o:s},render:({field:n})=>e.jsx(Q,{fullWidth:!0,children:e.jsx(U,{...n,size:"small",label:O("oauth.github.clientId"),error:!!m.errors[n.name],helperText:m.errors[n.name]?.message||" ",disabled:!t})})})}),e.jsx(M,{title:O("oauth.github.clientSecret"),children:e.jsx(H,{name:"clientSecret",control:a,rules:{validate:t?r:s},render:({field:n})=>e.jsx(Q,{fullWidth:!0,children:e.jsx(U,{...n,size:"small",type:"password",label:O("oauth.github.clientSecret"),error:!!m.errors[n.name],helperText:m.errors[n.name]?.message||" ",disabled:!t})})})}),e.jsx(ee,{type:"submit",variant:"contained",onSubmit:p(l),disabled:!m.isDirty,children:O("oauth.save")})]})})}const et={enabled:!1,clientId:"",clientSecret:""};function $n(){const{api:v}=ne(),{blocklet:R}=le(),{t:O,locale:C}=oe(),_=R?.meta?.did,j=Object.assign({...et},R?.settings?.oauth?.google||{}),{handleSubmit:p,control:a,formState:m,watch:f,reset:h}=ve({defaultValues:Re(j,Object.keys(et))}),t=f("enabled"),l=E(async n=>{try{const{blocklet:i}=await v.configOAuth({input:{did:_,oauth:JSON.stringify({google:n})}}),u=Object.assign({...et},i?.settings?.oauth?.google||{});h(u),Z.success(O("oauth.saveSuccess"))}catch(i){Z.error(i.message||O("oauth.saveFailed"))}}),o=E(n=>n?.trim()?!0:O("oauth.google.clientIdDescription")),r=E(n=>n?.trim()?!0:O("oauth.google.clientSecretDescription")),s=E(()=>!0),c=ge(()=>C==="zh"?"https://www.arcblock.io/blog/docs/did-connect/zh/oauth-config-google":"https://www.arcblock.io/blog/docs/did-connect/en/oauth-config-google",[C]);return e.jsx($,{children:e.jsxs("form",{onSubmit:p(l),disabled:!0,children:[e.jsx(M,{title:e.jsxs($,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx("span",{children:O("oauth.google.enable")}),e.jsx(te,{title:O("oauth.viewDocument"),children:e.jsx($,{component:"a",sx:{display:"inline-block",color:"inherit",fontSize:0,lineHeight:1},href:c,target:"_blank",rel:"noreferrer",children:e.jsx(se,{icon:bt,fontSize:20})})})]}),mb:2.5,children:e.jsx(H,{name:"enabled",control:a,render:({field:n})=>e.jsx(X,{control:e.jsx(ze,{sx:{ml:1},checked:n.value,...n})})})}),e.jsx(M,{title:O("oauth.google.clientId"),children:e.jsx(H,{name:"clientId",control:a,rules:{validate:t?o:s},render:({field:n})=>e.jsx(Q,{fullWidth:!0,children:e.jsx(U,{...n,size:"small",label:O("oauth.google.clientId"),error:!!m.errors[n.name],helperText:m.errors[n.name]?.message||" ",disabled:!t})})})}),e.jsx(M,{title:O("oauth.google.clientSecret"),children:e.jsx(H,{name:"clientSecret",control:a,rules:{validate:t?r:s},render:({field:n})=>e.jsx(Q,{fullWidth:!0,children:e.jsx(U,{...n,size:"small",type:"password",label:O("oauth.google.clientSecret"),error:!!m.errors[n.name],helperText:m.errors[n.name]?.message||" ",disabled:!t})})})}),e.jsx(ee,{type:"submit",variant:"contained",onSubmit:p(l),disabled:!m.isDirty,children:O("oauth.save")})]})})}const tt={enabled:!1,teamId:"",serviceId:"",keyId:"",authKey:"",bundleId:""};function An(){const{api:v}=ne(),{blocklet:R}=le(),{t:O}=oe(),C=R?.meta?.did,_=Object.assign({...tt},R?.settings?.oauth?.apple||{}),{handleSubmit:j,control:p,formState:a,watch:m,reset:f}=ve({defaultValues:Re(_,Object.keys(tt))}),h=m("enabled"),t=E(async i=>{try{const{blocklet:u}=await v.configOAuth({input:{did:C,oauth:JSON.stringify({apple:i})}}),g=Object.assign({...tt},u?.settings?.oauth?.apple||{});f(g),Z.success(O("oauth.saveSuccess"))}catch(u){Z.error(u.message||O("oauth.saveFailed"))}}),l=E(i=>i?.trim()?!0:O("oauth.apple.teamIdDescription")),o=E(i=>i?.trim()?!0:O("oauth.apple.serviceIdDescription")),r=E(i=>i?.trim()?!0:O("oauth.apple.keyIdDescription")),s=E(i=>i?.trim()?!0:O("oauth.apple.authKeyDescription")),c=E(i=>i?.trim()?!0:O("oauth.apple.bundleIdDescription")),n=E(()=>!0);return e.jsx($,{children:e.jsxs("form",{onSubmit:j(t),disabled:!0,children:[e.jsx(M,{title:O("oauth.apple.enable"),mb:2.5,children:e.jsx(H,{name:"enabled",control:p,render:({field:i})=>e.jsx(X,{control:e.jsx(ze,{sx:{ml:1},checked:i.value,...i})})})}),e.jsx(M,{title:O("oauth.apple.teamId"),children:e.jsx(H,{name:"teamId",control:p,rules:{validate:h?l:n},render:({field:i})=>e.jsx(Q,{fullWidth:!0,children:e.jsx(U,{...i,size:"small",label:O("oauth.apple.teamId"),error:!!a.errors[i.name],helperText:a.errors[i.name]?.message||" ",disabled:!h})})})}),e.jsx(M,{title:O("oauth.apple.bundleId"),children:e.jsx(H,{name:"bundleId",control:p,rules:{validate:h?c:n},render:({field:i})=>e.jsx(Q,{fullWidth:!0,children:e.jsx(U,{...i,size:"small",label:O("oauth.apple.bundleId"),error:!!a.errors[i.name],helperText:a.errors[i.name]?.message||" ",disabled:!h})})})}),e.jsx(M,{title:O("oauth.apple.serviceId"),children:e.jsx(H,{name:"serviceId",control:p,rules:{validate:h?o:n},render:({field:i})=>e.jsx(Q,{fullWidth:!0,children:e.jsx(U,{...i,size:"small",label:O("oauth.apple.serviceId"),error:!!a.errors[i.name],helperText:a.errors[i.name]?.message||" ",disabled:!h})})})}),e.jsx(M,{title:O("oauth.apple.keyId"),children:e.jsx(H,{name:"keyId",control:p,rules:{validate:h?r:n},render:({field:i})=>e.jsx(Q,{fullWidth:!0,children:e.jsx(U,{...i,size:"small",label:O("oauth.apple.keyId"),error:!!a.errors[i.name],helperText:a.errors[i.name]?.message||" ",disabled:!h})})})}),e.jsx(M,{title:O("oauth.apple.authKey"),children:e.jsx(H,{name:"authKey",control:p,rules:{validate:h?s:n},render:({field:i})=>e.jsx(Q,{fullWidth:!0,children:e.jsx(U,{...i,size:"small",type:"password",label:O("oauth.apple.authKey"),multiline:!0,rows:4,error:!!a.errors[i.name],helperText:a.errors[i.name]?.message||" ",disabled:!h})})})}),e.jsx(ee,{type:"submit",variant:"contained",onSubmit:j(t),disabled:!a.isDirty,children:O("oauth.save")})]})})}const st={enabled:!1,clientId:"",clientSecret:""};function Pn(){const{api:v}=ne(),{blocklet:R}=le(),{t:O}=oe(),C=R?.meta?.did,_=Object.assign({...st},R?.settings?.oauth?.twitter||{}),{handleSubmit:j,control:p,formState:a,watch:m,reset:f}=ve({defaultValues:Re(_,Object.keys(st))}),h=m("enabled"),t=E(async s=>{try{const{blocklet:c}=await v.configOAuth({input:{did:C,oauth:JSON.stringify({twitter:s})}}),n=Object.assign({...st},c?.settings?.oauth?.twitter||{});f(n),Z.success(O("oauth.saveSuccess"))}catch(c){Z.error(c.message||O("oauth.saveFailed"))}}),l=E(s=>s?.trim()?!0:O("oauth.twitter.clientIdDescription")),o=E(s=>s?.trim()?!0:O("oauth.twitter.clientSecretDescription")),r=E(()=>!0);return e.jsx($,{children:e.jsxs("form",{onSubmit:j(t),disabled:!0,children:[e.jsx(M,{title:e.jsx($,{sx:{display:"flex",alignItems:"center",gap:1},children:e.jsx("span",{children:O("oauth.twitter.enable")})}),mb:2.5,sx:{"& .section-content":{alignItems:"center"}},children:e.jsx(H,{name:"enabled",control:p,sx:{alignItems:"center"},render:({field:s})=>e.jsx(X,{control:e.jsx(ze,{sx:{ml:1},size:"small",checked:s.value,...s})})})}),e.jsx(M,{title:O("oauth.twitter.clientId"),children:e.jsx(H,{name:"clientId",control:p,rules:{validate:h?l:r},render:({field:s})=>e.jsx(Q,{fullWidth:!0,children:e.jsx(U,{...s,size:"small",label:O("oauth.twitter.clientId"),error:!!a.errors[s.name],helperText:a.errors[s.name]?.message||" ",disabled:!h})})})}),e.jsx(M,{title:O("oauth.twitter.clientSecret"),children:e.jsx(H,{name:"clientSecret",control:p,rules:{validate:h?o:r},render:({field:s})=>e.jsx(Q,{fullWidth:!0,children:e.jsx(U,{...s,size:"small",type:"password",label:O("oauth.twitter.clientSecret"),error:!!a.errors[s.name],helperText:a.errors[s.name]?.message||" ",disabled:!h})})})}),e.jsx(ee,{type:"submit",variant:"contained",onSubmit:j(t),disabled:!a.isDirty,children:O("oauth.save")})]})})}const Tn={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 ms({id:v,title:R,children:O,index:C,onMove:_,defaultExpand:j=!1,onEnd:p,icon:a=null}){const[m,f]=q.useState(j),h=q.useRef(null),t=q.useRef(null),[{handlerId:l},o]=Lr({accept:"dragItem",collect(i){return{handlerId:i.getHandlerId()}},hover(i,u){if(!h.current)return;const g=i.index,y=C;if(g===y)return;const k=h.current?.getBoundingClientRect(),w=t.current?.getBoundingClientRect(),d=(w.bottom-w.top)/2,b=u.getClientOffset().y-k.top;g<y&&b<d||g>y&&b>d||(_(g,y),i.index=y)}}),[{isDragging:r},s]=qr({item:{index:C,type:"dragItem"},collect:i=>({isDragging:i.isDragging()}),end:p});s(t),o(h);const c=r?.5:1,n=E(i=>{i.preventDefault(),i.stopPropagation(),f(!m)});return e.jsxs($,{ref:h,children:[e.jsxs($,{sx:{cursor:"pointer","&:hover":{backgroundColor:"grey.100"}},ref:t,"data-handler-id":l,children:[e.jsxs($,{sx:{py:2,px:1,opacity:c,display:"flex",alignItems:"center",gap:.5},draggable:!1,onClick:n,children:[e.jsx($,{sx:{pointerEvents:"auto",cursor:"grab","&:active":{cursor:"grabbing"},fontSize:0,color:"text.hint","&:hover":{color:"text.secondary"}},children:e.jsx(se,{fontSize:20,icon:Tn})}),e.jsx($,{sx:{display:"flex",alignItems:"center",flexShrink:0,mr:.5,transform:"translateY(-1px)"},children:a}),e.jsx(Y,{sx:{flex:1},children:R}),e.jsx(ie,{size:"small",sx:{pointerEvents:"auto",transform:m?"":"rotate(180deg)",transition:"transform 0.3s ease"},children:e.jsx(se,{icon:Er,style:{transform:"scale(1.5)"}})})]}),e.jsx(G,{})]}),e.jsx($,{sx:{pl:4,py:2.5,display:m?"block":"none"},children:O})]})}ms.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,icon:T.any};const En=[{name:"github",title:W.PROVIDER_NAME.github,icon:e.jsx(qe,{provider:"github",sx:{width:20,height:20}}),component:e.jsx(On,{})},{name:"google",title:W.PROVIDER_NAME.google,icon:e.jsx(qe,{provider:"google",sx:{width:20,height:20}}),component:e.jsx($n,{})},{name:"apple",title:W.PROVIDER_NAME.apple,icon:e.jsx(qe,{provider:"apple",sx:{width:20,height:20}}),component:e.jsx(An,{})},{name:"twitter",title:W.PROVIDER_NAME.twitter,icon:e.jsx(qe,{provider:"twitter",sx:{width:20,height:20}}),component:e.jsx(Pn,{})},{name:"auth0",title:W.PROVIDER_NAME.auth0,icon:e.jsx(qe,{provider:"auth0",sx:{width:20,height:20}}),component:e.jsx(Rn,{})}],In=["github","google","apple","twitter","auth0"];function Dn(){const{api:v}=ne(),{blocklet:R}=le(),O=R?.meta?.did,C=R?.settings?.oauth||{},_=Object.keys(C).sort((t,l)=>C[t]?.order!==void 0&&C[l]?.order!==void 0?C[t].order-C[l].order:C[t]?.order!==void 0?-1:1);for(const t of In)_.includes(t)||_.push(t);const j=ye(_.reduce((t,l,o)=>Object.assign(t,{[l]:o}),{})),p=ge(()=>{const t=[...En];return t.sort((l,o)=>j[l.name]-j[o.name]),t.map(l=>({...l,enabled:C[l.name]?.enabled??!1}))},[j.auth0,j.github,j.google]),a={};typeof window<"u"&&(a.context=window);const m=E(async t=>{const l={};Object.keys(t).forEach(o=>{l[o]={order:t[o]}}),await v.configOAuth({input:{did:O,oauth:JSON.stringify(l)}})}),f=E((t,l)=>{const o=p[t],r=p[l];j[o.name]=l,j[r.name]=t}),h=E(async()=>{await m(j)});return e.jsx($,{sx:{".section-left":{width:"180px"}},children:e.jsx(Mr,{backend:Br,...a,children:p.map((t,l)=>e.jsx(ms,{index:l,id:t.name,title:t.title,icon:t.icon,onMove:f,onEnd:h,defaultExpand:t.enabled,children:t.component},t.name))})})}const Se={ttl:J.SESSION_TTL,cacheTtl:J.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 fe(v){return e.jsx(zr,{...v,sx:{transform:"scale(0.75)"}})}function rt(v,R=!1){const O=R?v.ttl*86400:v.ttl/86400;return{...v,ttl:O}}function Ln(){const{api:v}=ne(),{blocklet:R}=le(),O=R?.meta?.did,C=sr({},Se,R?.settings?.session||{});Je(C.ttl)&&(C.ttl=Se.ttl),Je(C.cacheTtl)&&(C.cacheTtl=Se.cacheTtl),C.phone||(C.phone=Se.phone),C.email||(C.email=Se.email),Je(C.enableBlacklist)&&(C.enableBlacklist=Se.enableBlacklist);const{handleSubmit:_,control:j,formState:p,reset:a,watch:m}=ve({defaultValues:Re(rt(C),["ttl","cacheTtl","email","phone","enableBlacklist"])}),{t:f}=oe(),h=m("email.enabled"),t=m("phone.enabled"),l=m("email.enableDomainBlackList"),o=m("email.enableDomainWhiteList"),{fields:r,append:s,remove:c}=Pt({control:j,name:"email.domainBlackList"}),{fields:n,append:i,remove:u}=Pt({control:j,name:"email.domainWhiteList"}),g=E(async y=>{try{const{blocklet:k}=await v.updateAppSessionConfig({input:{did:O,config:Ce(rt(y,!0),["phone"])}}),w=Object.assign({},Se,Re(k?.settings?.session||{},["ttl","cacheTtl","email","phone","enableBlacklist"]));a(rt(w)),Z.success(f("common.configSuccess"))}catch(k){Z.error(k.message)}});return e.jsx(qn,{onSubmit:_(g),children:e.jsxs(ae,{direction:"column",sx:{gap:6},children:[e.jsxs($,{children:[e.jsxs($,{children:[e.jsx(Y,{variant:"h6",sx:{fontWeight:600},children:f("blocklet.config.session.profile")}),e.jsx($,{component:G,sx:{my:3}})]}),e.jsxs(ae,{sx:{gap:2},children:[e.jsx(M,{title:f("blocklet.config.session.fullNameEnabled"),sectionLeftSx:{width:"600px"},children:e.jsx($,{sx:{alignSelf:"flex-start"},children:e.jsx(fe,{disabled:!0,checked:!0})})}),e.jsx(M,{title:f("blocklet.config.session.avatarEnabled"),sectionLeftSx:{width:"600px"},children:e.jsx($,{sx:{alignSelf:"flex-start"},children:e.jsx(fe,{disabled:!0,checked:!0})})}),e.jsx(M,{title:f("blocklet.config.session.emailEnabled"),sectionLeftSx:{width:"600px"},children:e.jsx($,{sx:{alignSelf:"flex-start"},children:e.jsx(H,{name:"email.enabled",control:j,render:({field:y})=>e.jsx(fe,{...y,checked:y.value})})})}),h&&e.jsxs(ae,{direction:"column",sx:{ml:2,gap:.5},children:[e.jsx(M,{title:f("blocklet.config.session.emailRequireVerified"),sectionLeftSx:{width:"600px"},children:e.jsx($,{sx:{alignSelf:"flex-start"},children:e.jsx(H,{name:"email.requireVerified",control:j,render:({field:y})=>e.jsx(X,{sx:{ml:0},control:e.jsx(fe,{...y,checked:y.value})})})})}),e.jsx(M,{title:f("blocklet.config.session.emailRequireUnique"),sectionLeftSx:{width:"600px"},children:e.jsx($,{sx:{alignSelf:"flex-start"},children:e.jsx(H,{name:"email.requireUnique",control:j,render:({field:y})=>e.jsx(X,{sx:{ml:0},control:e.jsx(fe,{...y,checked:y.value})})})})}),e.jsx(M,{title:f("blocklet.config.session.emailTrustOauthProviders"),sectionLeftSx:{width:"600px"},children:e.jsx($,{sx:{alignSelf:"flex-start"},children:e.jsx(H,{name:"email.trustOauthProviders",control:j,render:({field:y})=>e.jsx(X,{sx:{ml:0},control:e.jsx(fe,{...y,checked:y.value})})})})}),e.jsx(M,{title:f("blocklet.config.session.enableDomainBlackList"),sectionLeftSx:{width:"600px"},children:e.jsx($,{sx:{alignSelf:"flex-start"},children:e.jsx(H,{name:"email.enableDomainBlackList",control:j,render:({field:y})=>e.jsx(X,{sx:{ml:0},control:e.jsx(fe,{...y,checked:y.value})})})})}),l&&e.jsxs($,{children:[r.map((y,k)=>e.jsxs(ae,{direction:"row",sx:{alignItems:"center",my:1,maxWidth:"720px"},children:[e.jsx(H,{name:`email.domainBlackList.${k}`,control:j,render:w=>e.jsx(U,{...w.field,size:"small",fullWidth:!0})}),e.jsx(ie,{onClick:()=>c(k),children:e.jsx(Tt,{})})]},y.id)),e.jsx(ee,{startIcon:e.jsx(Et,{}),onClick:()=>s(""),children:f("blocklet.config.session.addDomain")})]}),e.jsx(M,{title:f("blocklet.config.session.enableDomainWhiteList"),sectionLeftSx:{width:"600px"},children:e.jsx($,{sx:{alignSelf:"flex-start"},children:e.jsx(H,{name:"email.enableDomainWhiteList",control:j,render:({field:y})=>e.jsx(X,{sx:{ml:0},control:e.jsx(fe,{...y,checked:y.value})})})})}),o&&e.jsxs($,{children:[n.map((y,k)=>e.jsxs(ae,{direction:"row",sx:{alignItems:"center",my:1,maxWidth:"720px"},children:[e.jsx(H,{name:`email.domainWhiteList.${k}`,control:j,render:w=>e.jsx(U,{...w.field,size:"small",fullWidth:!0})}),e.jsx(ie,{onClick:()=>u(k),children:e.jsx(Tt,{})})]},y.id)),e.jsx(ee,{startIcon:e.jsx(Et,{}),onClick:()=>i(""),children:f("blocklet.config.session.addDomain")})]})]}),e.jsxs($,{sx:{display:"none"},children:[e.jsx(M,{title:f("blocklet.config.session.phoneEnabled"),sectionLeftSx:{width:"600px"},children:e.jsx($,{sx:{alignSelf:"flex-start"},children:e.jsx(H,{name:"phone.enabled",control:j,disabled:!0,render:({field:y})=>e.jsx(X,{sx:{ml:0},control:e.jsx(fe,{...y,checked:y.value})})})})}),t&&e.jsxs(ae,{direction:"column",sx:{ml:2,mt:1},children:[e.jsx(M,{title:f("blocklet.config.session.phoneRequireVerified"),sectionLeftSx:{width:"600px"},children:e.jsx($,{sx:{alignSelf:"flex-start"},children:e.jsx(H,{name:"phone.requireVerified",control:j,render:({field:y})=>e.jsx(X,{sx:{ml:0},control:e.jsx(fe,{...y,checked:y.value})})})})}),e.jsx(M,{title:f("blocklet.config.session.phoneRequireUnique"),sectionLeftSx:{width:"600px"},children:e.jsx($,{sx:{alignSelf:"flex-start"},children:e.jsx(H,{name:"phone.requireUnique",control:j,render:({field:y})=>e.jsx(X,{sx:{ml:0},control:e.jsx(fe,{...y,checked:y.value})})})})})]})]})]})]}),e.jsxs($,{children:[e.jsx(Y,{variant:"h6",sx:{fontWeight:600},children:f("blocklet.config.session.period")}),e.jsx($,{component:G,sx:{my:3}}),e.jsx(ae,{direction:"column",spacing:2,children:e.jsx(H,{name:"ttl",control:j,rules:{min:1,max:30},render:({field:y})=>e.jsx(Q,{fullWidth:!0,sx:{mb:2},children:e.jsx(M,{title:f("blocklet.config.session.ttl",{day:y.value}),sectionLeftSx:{width:"600px"},children:e.jsx($,{sx:{width:"100%",maxWidth:500,px:2},children:e.jsx($r,{...y,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($,{children:[e.jsx(Y,{variant:"h6",sx:{fontWeight:600},children:f("blocklet.config.session.experimentalSettings")}),e.jsx($,{component:G,sx:{my:3}}),e.jsx(ae,{direction:"column",spacing:2,children:e.jsx(M,{title:f("blocklet.config.session.enableBlacklist"),sectionLeftSx:{width:"600px"},children:e.jsx($,{sx:{alignSelf:"flex-start"},children:e.jsx(H,{name:"enableBlacklist",control:j,render:({field:y})=>e.jsx(X,{sx:{ml:0},control:e.jsx(fe,{...y,checked:y.value})})})})})})]}),e.jsx($,{children:e.jsx(ee,{type:"submit",variant:"contained",disabled:!p.isDirty,children:f("oauth.save")})})]})})}const qn=xe.form`
83
83
  max-width: 1536px;
84
84
 
85
85
  .advanced-config {
@@ -119,7 +119,7 @@ ${m("blocklet.config.logoDesc",{width:512,height:512,maxSize:5})}`,children:e.js
119
119
  .form-item {
120
120
  margin-top: 0;
121
121
  }
122
- `,Mn={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 nt,Bt;function Bn(){if(Bt)return nt;Bt=1;const{DEFAULT_IP_DOMAIN_SUFFIX:v,SLOT_FOR_IP_DNS_SITE:R,DEFAULT_DID_DOMAIN:O}=rr(),{encode:C}=nr();return nt={getIpDnsDomainForBlocklet:p=>`${C(p.meta.did)}-${R}.${v}`,getDidDomainForBlocklet:({did:p,didDomain:i=O})=>`${C(p)}.${i}`},nt}var zn=Bn();function ps({ref:v=null}){const{t:R}=q.useContext(ue),{blocklet:O}=le(),{api:C}=ne(),_=ye({loadingReject:!1,loadingApprove:!1,mode:"view",show:!1,data:{},callback:ce}),p=Oe()?.transitions?.duration?.leavingScreen||300,i=E(()=>{_.mode="view",_.data={},_.callback=ce}),m=E(()=>{_.show=!1,setTimeout(()=>{i()},p)}),f=E(s=>{_.mode="view",_.show=!0,_.data=s}),h=E((s,c=ce)=>{_.mode="approve",_.show=!0,_.data=s,_.callback=c});q.useImperativeHandle(v,()=>({open:f,close:m,approve:h}),[f,m,h]);const t=ge(()=>{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&&sn(s,"appliedAt","status"),s.map(c=>{const n=R(`federated.info.${c}`);let a=_.data[c];if(c==="appName"&&_.data.isMaster&&(a=e.jsxs($,{children:[e.jsx(Wt,{component:ns}),a]})),["appId","appPid","serverId"].includes(c)&&(a=e.jsx(ot,{children:a})),["appUrl"].includes(c)&&(a=e.jsx($,{component:"a",href:a,target:"_blank",children:a})),["appLogo"].includes(c)){const u=Ut(`https://${zn.getDidDomainForBlocklet({did:_.data.appPid})}`,J.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo");try{const g=new URL(u);g.searchParams.set("imageFilter","resize"),g.searchParams.set("w","80"),g.searchParams.set("h","80"),a=e.jsx("img",{src:g.href,width:"60",height:"60",alt:_.data.appName})}catch{a=e.jsx("img",{src:u,width:"60",height:"60",alt:_.data.appName})}}return c==="status"&&(a=a&&R(`federated.status.${a}`)),c==="migratedFrom"&&(a=(_.data.migratedFrom||[]).filter(y=>![_.data.appId,_.data.appPid].includes(y)).map(y=>e.jsx(ot,{children:y}))),ir(a)&&(a="-"),{name:n,value:a}})},[_.data]),l=_.mode==="approve",o=E(async()=>{try{_.loadingReject=!0,await C.auditFederatedLogin({input:{memberPid:_.data.appPid,did:O.appPid,status:"rejected"}}),m(),_?.callback(!1)}finally{_.loadingReject=!1}}),r=E(async()=>{try{_.loadingApprove=!0,await C.auditFederatedLogin({input:{memberPid:_.data.appPid,did:O.appPid,status:"approved"}}),m(),_?.callback(!0)}finally{_.loadingApprove=!1}});return e.jsx(ke,{open:_.show,title:R(l?"federated.approveToJoinLogin":"federated.siteDetail"),onClose:m,actions:l?e.jsxs(e.Fragment,{children:[e.jsxs(ee,{color:"error",variant:"contained",onClick:o,disabled:_.loadingReject,children:[_.loadingReject?e.jsx(Ee,{size:16,color:"grey"}):null,R("common.reject")]}),e.jsxs(ee,{variant:"contained",onClick:r,disabled:_.loadingApprove,children:[_.loadingApprove?e.jsx(Ee,{size:16,color:"grey"}):null,R("common.approve")]})]}):e.jsx(ee,{variant:"outlined",onClick:m,children:R("common.close")}),children:t.map(s=>e.jsx(Qt,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:180,name:s.name,children:s.value},s.name))})}ps.propTypes={ref:T.any};function jt({ref:v=null}){const O=Oe()?.transitions?.duration?.leavingScreen||300,{t:C}=q.useContext(ue),_=ye({show:!1,data:{link:""}}),j=E(()=>{_.data.link=""}),p=E(()=>{_.show=!1,setTimeout(()=>{j()},O)}),i=E(({link:f})=>{_.show=!0,_.data.link=f});q.useImperativeHandle(v,()=>({open:i,close:p}),[i,p]);const m=E(()=>{ar(_.data.link),p()});return e.jsxs(ke,{open:_.show,title:C("federated.joinFederatedLogin"),onClose:p,PaperProps:{style:{minHeight:"unset"}},actions:e.jsx(re,{color:"primary",autoFocus:!0,variant:"contained",onClick:m,children:C("common.copyAndClose")}),children:[e.jsx($,{sx:{mb:2},children:C("federated.inviteJoinFederatedLoginDescription")}),e.jsx($,{sx:{"& .copy-button":{display:"none !important"}},children:e.jsx(Xt,{children:_.data.link})})]})}jt.propTypes={ref:T.any};function gs({mode:v="member"}){const R=q.useRef(null),O=q.useRef(null),{t:C,locale:_}=q.useContext(ue),{blocklet:j,actions:{refreshBlocklet:p}}=le(),{confirmApi:i,confirmHolder:m}=Ze(),{api:f}=ne(),h=j.settings.federated?.sites||[],t=j.settings.federated?.config||{},l=t.isMaster!==!1,o=h.find(S=>S.appPid===j.appPid),r=ye({loadingSync:!1}),s=E(S=>{O.current?.open(S)}),c=E(S=>{O.current?.approve(S,p)}),n=E(S=>{i.open({title:C("federated.removeFederatedLogin"),content:C("federated.removeFederatedLoginDescription"),confirmButtonText:C("common.confirm"),cancelButtonText:C("common.cancel"),confirmButtonProps:{color:"error"},async onConfirm(A){await f.quitFederatedLogin({input:{did:j.appPid,targetDid:S.appPid}}),A()}})}),a=E(S=>{i.open({title:C("federated.disableFederatedLogin"),content:C("federated.disableFederatedLoginDescription"),confirmButtonText:C("common.confirm"),cancelButtonText:C("common.cancel"),confirmButtonProps:{color:"error"},async onConfirm(A){await f.auditFederatedLogin({input:{memberPid:S.appPid,did:j.appPid,status:"revoked"}}),A()}})}),u=E(S=>{i.open({title:C("federated.enableFederatedLogin"),content:C("federated.enableFederatedLoginDescription"),confirmButtonText:C("common.confirm"),cancelButtonText:C("common.cancel"),async onConfirm(A){await f.auditFederatedLogin({input:{memberPid:S.appPid,did:j.appPid,status:"approved"}}),A()}})}),g=ge(()=>{const S=[{label:C("common.name"),name:"appName",options:{customBodyRenderLite:A=>{const P=h[A],L=P.isMaster!==!1;return e.jsx($,{sx:{display:"inline-block"},children:e.jsxs($,{component:"a",href:P.appUrl,target:"_blank",onClick:D=>{D.stopPropagation()},sx:{display:"flex",alignItems:"center"},children:[L&&e.jsx(Wt,{component:ns,style:{marginRight:"4px"}}),P.appName]})})}}},{label:C("common.did"),name:"appId",options:{customBodyRenderLite:A=>{const P=h[A];return e.jsx(ot,{children:P.appId})}}},{label:C("common.status"),name:"status",options:{customBodyRenderLite:A=>{const P=h[A],L=P.isMaster!==!1;return e.jsx($,{children:L?"-":C(`federated.status.${P.status}`)})}}}];return l&&S.push({label:C("common.actions"),name:"actions",options:{customBodyRenderLite:A=>{const P=h[A],L=P.isMaster!==!1;return e.jsx($,{sx:{display:"flex",gap:1},children:L?e.jsxs(e.Fragment,{children:[P.status==="rejected"&&e.jsx(re,{variant:"contained",color:"error",size:"small",onClick:D=>{D.stopPropagation()},children:C("federated.status.rejected")}),P.status==="revoked"&&e.jsx(re,{variant:"contained",color:"secondary",size:"small",onClick:D=>{D.stopPropagation()},children:C("federated.status.revoked")})]}):e.jsxs(e.Fragment,{children:[e.jsx(re,{variant:"contained",color:"error",size:"small",onClick:D=>{D.stopPropagation(),n(P)},children:C("federated.quitMember")},"quiteSite"),P.status==="pending"&&e.jsx(re,{variant:"contained",color:"primary",size:"small",onClick:D=>{D.stopPropagation(),c(P)},children:C("federated.status.pending")},"auditSite"),P.status==="approved"&&e.jsx(re,{variant:"contained",color:"error",size:"small",onClick:D=>{D.stopPropagation(),a(P)},style:{whiteSpace:"nowrap"},children:C("federated.revoke")},"revokeSite"),P.status==="revoked"&&e.jsx(re,{variant:"contained",color:"warning",size:"small",onClick:D=>{D.stopPropagation(),u(P)},style:{whiteSpace:"nowrap"},children:C("federated.approve")},"approveSite")]})})}}}),S},[t.appId,h,l,C]),y=ge(()=>({sort:!0,download:!1,filter:!1,print:!1,expandableRowsOnClick:!0,onRowClick(S,{dataIndex:A}){const P=h[A];s(P)}}),[]),k=E(()=>{const S=j.environments.find(A=>A.key===W.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL);S?.value?R.current?.open({link:S.value}):Z.error(C("federated.failedToGetFederatedLoginLink"))},[j.site?.domainAliases?.[0]?.href]),w=E(()=>{i.open({title:C("federated.quitFederatedLogin"),content:C("federated.quitFederatedLoginDescription"),confirmButtonText:C("common.confirm"),cancelButtonText:C("common.cancel"),confirmButtonProps:{color:"error"},async onConfirm(S){await f.quitFederatedLogin({input:{did:j.appPid}}),S()}})}),d=E(()=>{i.open({title:C("federated.disbandFederatedLogin"),content:C("federated.disbandFederatedLoginDescription"),confirmButtonText:C("common.confirm"),cancelButtonText:C("common.cancel"),confirmButtonProps:{color:"error"},async onConfirm(S){await f.disbandFederatedLogin({input:{did:j.appPid}}),S()}})}),x=E(async()=>{try{r.loadingSync=!0,await Promise.all([await f.syncFederatedConfig({input:{did:j.appPid}}),or(500)]),Z.success(C("common.succeeded"))}finally{r.loadingSync=!1}}),b=[];return o.status!=="pending"&&b.push(e.jsx(te,{title:C("federated.syncConfig"),children:e.jsx(ae,{size:"small",onClick:x,disabled:r.loadingSync,sx:[{"@keyframes spin":{from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}}},r.loadingSync?{animation:"spin 1s linear infinite"}:{}],children:e.jsx(se,{icon:Mn,style:{fontSize:24}})},"syncConfig")})),v==="master"?(b.push(e.jsx(re,{size:"small",variant:"contained",onClick:k,sx:{ml:1},children:C("federated.inviteJoinFederatedLogin")},"inviteJoinFederatedLogin")),b.push(e.jsx(re,{color:"error",size:"small",variant:"contained",onClick:d,sx:{ml:1},children:C("federated.disbandFederatedLogin")},"disbandFederatedLogin"))):b.push(e.jsx(re,{size:"small",variant:"contained",color:"error",onClick:w,sx:{ml:1},children:C("federated.quitFederatedLogin")},"quitFederatedLogin")),e.jsxs(e.Fragment,{children:[e.jsx(Ue,{className:"main-table",locale:_,data:h,columns:g,customButtons:b,title:e.jsx($,{className:"table-toolbar-left",children:C("oauth.federated")}),options:y}),m,e.jsx(jt,{ref:R}),e.jsx(ps,{ref:O})]})}gs.propTypes={mode:T.oneOf(["member","master"])};function ys({ref:v=null}){const{t:R}=q.useContext(ue),{api:O}=ne(),{blocklet:C}=le(),_=C?.appPid,p=Oe()?.transitions?.duration?.leavingScreen||300,i=ye({loading:!1,show:!1,appUrl:"",appUrlError:"",callback:ce}),m=E(()=>{i.appUrl="",i.appUrlError="",i.callback=ce}),f=E(()=>{i.show=!1,setTimeout(()=>{m()},p)}),h=E((o=ce)=>{i.show=!0,i.callback=o});q.useImperativeHandle(v,()=>({open:h,close:f}),[h,f]);const t=E(o=>{if(!o)throw new Error(R("federated.federatedJoinAppUrlRequired"));if(!lr(o))throw new Error(R("federated.federatedJoinAppUrlInvalid"))}),l=E(async()=>{try{t(i.appUrl),i.loading=!0;const o=await O.joinFederatedLogin({input:{did:_,appUrl:i.appUrl}});i.show=!1,f(),i?.callback(o)}catch(o){i.appUrlError=o.message}finally{i.loading=!1}});return e.jsxs(ke,{open:i.show,title:R("federated.joinFederatedLogin"),onClose:f,PaperProps:{style:{minHeight:"unset"}},actions:e.jsxs(re,{color:"primary",autoFocus:!0,variant:"contained",onClick:l,disabled:i.loading,children:[i.loading?e.jsx(Ee,{size:16,sx:{mr:1},color:"grey"}):null,R("common.confirm")]}),children:[e.jsx($,{sx:{mb:1},children:R("federated.joinFederatedLoginDescription")}),e.jsx(U,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:R("federated.federatedJoinAppUrl"),label:R("federated.federatedJoinAppUrl"),value:i.appUrl,error:!!i.appUrlError,helperText:i.appUrlError||"eg: https://www.arcblock.io",onChange:o=>{i.appUrl=o.target.value}})]})}ys.propTypes={ref:T.any};function Hn(){const{t:v}=q.useContext(ue);return e.jsxs(ie,{direction:"row",spacing:2,sx:{alignItems:"flex-start",p:2},children:[e.jsx(Fr,{fontSize:"large",color:"primary"}),e.jsxs($,{children:[e.jsx(Y,{variant:"h6",gutterBottom:!0,children:v("federated.title")}),e.jsx(Y,{variant:"body2",sx:{color:"text.secondary"},children:v("federated.description")}),e.jsx(cr,{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:v("federated.link")})]})]})}function Nn(){const v=q.useRef(null),R=q.useRef(null),{t:O}=q.useContext(ue),{blocklet:C,actions:{refreshBlocklet:_}}=le(),j=E(()=>{const i=C.site?.domainAliases?.[0]?.href;if(i)try{const m=new URL(i);v.current?.open({link:m.origin})}catch{Z.error(O("federated.failedToGetFederatedLoginLink"))}},[C.site?.domainAliases?.[0]?.href]),p=E(()=>{R.current?.open(()=>{_()})});if(C.settings.federated?.sites.length>0){const i=C.settings.federated?.config.isMaster!==!1;return e.jsx(gs,{mode:i?"master":"member"})}return e.jsxs(e.Fragment,{children:[e.jsx($,{sx:{display:"flex",flexDirection:"column",gap:2,justifyContent:"center",alignItems:"center",minHeight:"200px"},children:e.jsxs($,{sx:{maxWidth:400,borderRadius:2,border:"1px solid",borderColor:"divider"},children:[e.jsx(Hn,{}),e.jsx(G,{sx:{width:1}}),e.jsxs(ie,{sx:{width:1,p:2,gap:1.5},children:[e.jsx(re,{variant:"contained",onClick:j,sx:{width:1},children:O("federated.inviteJoinFederatedLogin")}),e.jsx(re,{variant:"outlined",onClick:p,sx:{width:1},children:O("federated.joinFederatedLogin")})]})]})}),e.jsx(jt,{ref:v}),e.jsx(ys,{ref:R})]})}function xs({orientation:v="horizontal"}){const{t:R}=q.useContext(ue),O=ss({key:"lg"}),C=[{label:e.jsx($,{sx:{textAlign:"center",width:"100%"},children:R("oauth.commonSettings")}),value:"settings"},{label:e.jsx($,{sx:{textAlign:"center",width:"100%"},children:R("oauth.federated")}),value:"federated"},{label:e.jsx($,{sx:{textAlign:"center",width:"100%"},children:R("oauth.oauth")}),value:"oauth"},{label:e.jsx($,{sx:{textAlign:"center",width:"100%"},children:R("oauth.moreLogin")}),value:"more"}],[_,j]=q.useState(C[0].value),p=ge(()=>({oauth:e.jsx(Dn,{}),federated:e.jsx(Nn,{}),more:e.jsx(Dr,{children:R("oauth.comingSoon")}),settings:e.jsx(Ln,{})}),[R]);return v==="vertical"?e.jsx(Fn,{children:e.jsxs(ie,{direction:{md:"column",lg:"row"},sx:{gap:2},children:[e.jsx($,{sx:{minWidth:"240px",flexShrink:0},children:e.jsx(Fe,{tabs:C,current:_,orientation:O?"horizontal":"vertical",onChange:j,sx:{borderRight:O?0:1,height:"100%",borderColor:"divider"}})}),e.jsx($,{sx:{flexGrow:1,minWidth:0},children:e.jsx($,{sx:{maxWidth:"1200px"},children:p[_]})})]})}):e.jsxs($,{children:[e.jsx(Fe,{tabs:C,current:_,onChange:j}),e.jsx($,{sx:{marginTop:"10px"},children:p[_]})]})}xs.propTypes={orientation:T.oneOf(["horizontal","vertical"])};const Fn=xe.div`
122
+ `,Mn={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 nt,Bt;function Bn(){if(Bt)return nt;Bt=1;const{DEFAULT_IP_DOMAIN_SUFFIX:v,SLOT_FOR_IP_DNS_SITE:R,DEFAULT_DID_DOMAIN:O}=rr(),{encode:C}=nr();return nt={getIpDnsDomainForBlocklet:p=>`${C(p.meta.did)}-${R}.${v}`,getDidDomainForBlocklet:({did:p,didDomain:a=O})=>`${C(p)}.${a}`},nt}var zn=Bn();function ps({ref:v=null}){const{t:R}=q.useContext(ue),{blocklet:O}=le(),{api:C}=ne(),_=ye({loadingReject:!1,loadingApprove:!1,mode:"view",show:!1,data:{},callback:ce}),p=Oe()?.transitions?.duration?.leavingScreen||300,a=E(()=>{_.mode="view",_.data={},_.callback=ce}),m=E(()=>{_.show=!1,setTimeout(()=>{a()},p)}),f=E(s=>{_.mode="view",_.show=!0,_.data=s}),h=E((s,c=ce)=>{_.mode="approve",_.show=!0,_.data=s,_.callback=c});q.useImperativeHandle(v,()=>({open:f,close:m,approve:h}),[f,m,h]);const t=ge(()=>{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&&sn(s,"appliedAt","status"),s.map(c=>{const n=R(`federated.info.${c}`);let i=_.data[c];if(c==="appName"&&_.data.isMaster&&(i=e.jsxs($,{children:[e.jsx(Wt,{component:ns}),i]})),["appId","appPid","serverId"].includes(c)&&(i=e.jsx(ot,{children:i})),["appUrl"].includes(c)&&(i=e.jsx($,{component:"a",href:i,target:"_blank",children:i})),["appLogo"].includes(c)){const u=Ut(`https://${zn.getDidDomainForBlocklet({did:_.data.appPid})}`,J.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo");try{const g=new URL(u);g.searchParams.set("imageFilter","resize"),g.searchParams.set("w","80"),g.searchParams.set("h","80"),i=e.jsx("img",{src:g.href,width:"60",height:"60",alt:_.data.appName})}catch{i=e.jsx("img",{src:u,width:"60",height:"60",alt:_.data.appName})}}return c==="status"&&(i=i&&R(`federated.status.${i}`)),c==="migratedFrom"&&(i=(_.data.migratedFrom||[]).filter(y=>![_.data.appId,_.data.appPid].includes(y)).map(y=>e.jsx(ot,{children:y}))),ar(i)&&(i="-"),{name:n,value:i}})},[_.data]),l=_.mode==="approve",o=E(async()=>{try{_.loadingReject=!0,await C.auditFederatedLogin({input:{memberPid:_.data.appPid,did:O.appPid,status:"rejected"}}),m(),_?.callback(!1)}finally{_.loadingReject=!1}}),r=E(async()=>{try{_.loadingApprove=!0,await C.auditFederatedLogin({input:{memberPid:_.data.appPid,did:O.appPid,status:"approved"}}),m(),_?.callback(!0)}finally{_.loadingApprove=!1}});return e.jsx(ke,{open:_.show,title:R(l?"federated.approveToJoinLogin":"federated.siteDetail"),onClose:m,actions:l?e.jsxs(e.Fragment,{children:[e.jsxs(ee,{color:"error",variant:"contained",onClick:o,disabled:_.loadingReject,children:[_.loadingReject?e.jsx(Ee,{size:16,color:"grey"}):null,R("common.reject")]}),e.jsxs(ee,{variant:"contained",onClick:r,disabled:_.loadingApprove,children:[_.loadingApprove?e.jsx(Ee,{size:16,color:"grey"}):null,R("common.approve")]})]}):e.jsx(ee,{variant:"outlined",onClick:m,children:R("common.close")}),children:t.map(s=>e.jsx(Qt,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:180,name:s.name,children:s.value},s.name))})}ps.propTypes={ref:T.any};function jt({ref:v=null}){const O=Oe()?.transitions?.duration?.leavingScreen||300,{t:C}=q.useContext(ue),_=ye({show:!1,data:{link:""}}),j=E(()=>{_.data.link=""}),p=E(()=>{_.show=!1,setTimeout(()=>{j()},O)}),a=E(({link:f})=>{_.show=!0,_.data.link=f});q.useImperativeHandle(v,()=>({open:a,close:p}),[a,p]);const m=E(()=>{ir(_.data.link),p()});return e.jsxs(ke,{open:_.show,title:C("federated.joinFederatedLogin"),onClose:p,PaperProps:{style:{minHeight:"unset"}},actions:e.jsx(re,{color:"primary",autoFocus:!0,variant:"contained",onClick:m,children:C("common.copyAndClose")}),children:[e.jsx($,{sx:{mb:2},children:C("federated.inviteJoinFederatedLoginDescription")}),e.jsx($,{sx:{"& .copy-button":{display:"none !important"}},children:e.jsx(Xt,{children:_.data.link})})]})}jt.propTypes={ref:T.any};function gs({mode:v="member"}){const R=q.useRef(null),O=q.useRef(null),{t:C,locale:_}=q.useContext(ue),{blocklet:j,actions:{refreshBlocklet:p}}=le(),{confirmApi:a,confirmHolder:m}=Ze(),{api:f}=ne(),h=j.settings.federated?.sites||[],t=j.settings.federated?.config||{},l=t.isMaster!==!1,o=h.find(S=>S.appPid===j.appPid),r=ye({loadingSync:!1}),s=E(S=>{O.current?.open(S)}),c=E(S=>{O.current?.approve(S,p)}),n=E(S=>{a.open({title:C("federated.removeFederatedLogin"),content:C("federated.removeFederatedLoginDescription"),confirmButtonText:C("common.confirm"),cancelButtonText:C("common.cancel"),confirmButtonProps:{color:"error"},async onConfirm(A){await f.quitFederatedLogin({input:{did:j.appPid,targetDid:S.appPid}}),A()}})}),i=E(S=>{a.open({title:C("federated.disableFederatedLogin"),content:C("federated.disableFederatedLoginDescription"),confirmButtonText:C("common.confirm"),cancelButtonText:C("common.cancel"),confirmButtonProps:{color:"error"},async onConfirm(A){await f.auditFederatedLogin({input:{memberPid:S.appPid,did:j.appPid,status:"revoked"}}),A()}})}),u=E(S=>{a.open({title:C("federated.enableFederatedLogin"),content:C("federated.enableFederatedLoginDescription"),confirmButtonText:C("common.confirm"),cancelButtonText:C("common.cancel"),async onConfirm(A){await f.auditFederatedLogin({input:{memberPid:S.appPid,did:j.appPid,status:"approved"}}),A()}})}),g=ge(()=>{const S=[{label:C("common.name"),name:"appName",options:{customBodyRenderLite:A=>{const P=h[A],L=P.isMaster!==!1;return e.jsx($,{sx:{display:"inline-block"},children:e.jsxs($,{component:"a",href:P.appUrl,target:"_blank",onClick:D=>{D.stopPropagation()},sx:{display:"flex",alignItems:"center"},children:[L&&e.jsx(Wt,{component:ns,style:{marginRight:"4px"}}),P.appName]})})}}},{label:C("common.did"),name:"appId",options:{customBodyRenderLite:A=>{const P=h[A];return e.jsx(ot,{children:P.appId})}}},{label:C("common.status"),name:"status",options:{customBodyRenderLite:A=>{const P=h[A],L=P.isMaster!==!1;return e.jsx($,{children:L?"-":C(`federated.status.${P.status}`)})}}}];return l&&S.push({label:C("common.actions"),name:"actions",options:{customBodyRenderLite:A=>{const P=h[A],L=P.isMaster!==!1;return e.jsx($,{sx:{display:"flex",gap:1},children:L?e.jsxs(e.Fragment,{children:[P.status==="rejected"&&e.jsx(re,{variant:"contained",color:"error",size:"small",onClick:D=>{D.stopPropagation()},children:C("federated.status.rejected")}),P.status==="revoked"&&e.jsx(re,{variant:"contained",color:"secondary",size:"small",onClick:D=>{D.stopPropagation()},children:C("federated.status.revoked")})]}):e.jsxs(e.Fragment,{children:[e.jsx(re,{variant:"contained",color:"error",size:"small",onClick:D=>{D.stopPropagation(),n(P)},children:C("federated.quitMember")},"quiteSite"),P.status==="pending"&&e.jsx(re,{variant:"contained",color:"primary",size:"small",onClick:D=>{D.stopPropagation(),c(P)},children:C("federated.status.pending")},"auditSite"),P.status==="approved"&&e.jsx(re,{variant:"contained",color:"error",size:"small",onClick:D=>{D.stopPropagation(),i(P)},style:{whiteSpace:"nowrap"},children:C("federated.revoke")},"revokeSite"),P.status==="revoked"&&e.jsx(re,{variant:"contained",color:"warning",size:"small",onClick:D=>{D.stopPropagation(),u(P)},style:{whiteSpace:"nowrap"},children:C("federated.approve")},"approveSite")]})})}}}),S},[t.appId,h,l,C]),y=ge(()=>({sort:!0,download:!1,filter:!1,print:!1,expandableRowsOnClick:!0,onRowClick(S,{dataIndex:A}){const P=h[A];s(P)}}),[]),k=E(()=>{const S=j.environments.find(A=>A.key===W.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL);S?.value?R.current?.open({link:S.value}):Z.error(C("federated.failedToGetFederatedLoginLink"))},[j.site?.domainAliases?.[0]?.href]),w=E(()=>{a.open({title:C("federated.quitFederatedLogin"),content:C("federated.quitFederatedLoginDescription"),confirmButtonText:C("common.confirm"),cancelButtonText:C("common.cancel"),confirmButtonProps:{color:"error"},async onConfirm(S){await f.quitFederatedLogin({input:{did:j.appPid}}),S()}})}),d=E(()=>{a.open({title:C("federated.disbandFederatedLogin"),content:C("federated.disbandFederatedLoginDescription"),confirmButtonText:C("common.confirm"),cancelButtonText:C("common.cancel"),confirmButtonProps:{color:"error"},async onConfirm(S){await f.disbandFederatedLogin({input:{did:j.appPid}}),S()}})}),x=E(async()=>{try{r.loadingSync=!0,await Promise.all([await f.syncFederatedConfig({input:{did:j.appPid}}),or(500)]),Z.success(C("common.succeeded"))}finally{r.loadingSync=!1}}),b=[];return o.status!=="pending"&&b.push(e.jsx(te,{title:C("federated.syncConfig"),children:e.jsx(ie,{size:"small",onClick:x,disabled:r.loadingSync,sx:[{"@keyframes spin":{from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}}},r.loadingSync?{animation:"spin 1s linear infinite"}:{}],children:e.jsx(se,{icon:Mn,style:{fontSize:24}})},"syncConfig")})),v==="master"?(b.push(e.jsx(re,{size:"small",variant:"contained",onClick:k,sx:{ml:1},children:C("federated.inviteJoinFederatedLogin")},"inviteJoinFederatedLogin")),b.push(e.jsx(re,{color:"error",size:"small",variant:"contained",onClick:d,sx:{ml:1},children:C("federated.disbandFederatedLogin")},"disbandFederatedLogin"))):b.push(e.jsx(re,{size:"small",variant:"contained",color:"error",onClick:w,sx:{ml:1},children:C("federated.quitFederatedLogin")},"quitFederatedLogin")),e.jsxs(e.Fragment,{children:[e.jsx(Ue,{className:"main-table",locale:_,data:h,columns:g,customButtons:b,title:e.jsx($,{className:"table-toolbar-left",children:C("oauth.federated")}),options:y}),m,e.jsx(jt,{ref:R}),e.jsx(ps,{ref:O})]})}gs.propTypes={mode:T.oneOf(["member","master"])};function ys({ref:v=null}){const{t:R}=q.useContext(ue),{api:O}=ne(),{blocklet:C}=le(),_=C?.appPid,p=Oe()?.transitions?.duration?.leavingScreen||300,a=ye({loading:!1,show:!1,appUrl:"",appUrlError:"",callback:ce}),m=E(()=>{a.appUrl="",a.appUrlError="",a.callback=ce}),f=E(()=>{a.show=!1,setTimeout(()=>{m()},p)}),h=E((o=ce)=>{a.show=!0,a.callback=o});q.useImperativeHandle(v,()=>({open:h,close:f}),[h,f]);const t=E(o=>{if(!o)throw new Error(R("federated.federatedJoinAppUrlRequired"));if(!lr(o))throw new Error(R("federated.federatedJoinAppUrlInvalid"))}),l=E(async()=>{try{t(a.appUrl),a.loading=!0;const o=await O.joinFederatedLogin({input:{did:_,appUrl:a.appUrl}});a.show=!1,f(),a?.callback(o)}catch(o){a.appUrlError=o.message}finally{a.loading=!1}});return e.jsxs(ke,{open:a.show,title:R("federated.joinFederatedLogin"),onClose:f,PaperProps:{style:{minHeight:"unset"}},actions:e.jsxs(re,{color:"primary",autoFocus:!0,variant:"contained",onClick:l,disabled:a.loading,children:[a.loading?e.jsx(Ee,{size:16,sx:{mr:1},color:"grey"}):null,R("common.confirm")]}),children:[e.jsx($,{sx:{mb:1},children:R("federated.joinFederatedLoginDescription")}),e.jsx(U,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:R("federated.federatedJoinAppUrl"),label:R("federated.federatedJoinAppUrl"),value:a.appUrl,error:!!a.appUrlError,helperText:a.appUrlError||"eg: https://www.arcblock.io",onChange:o=>{a.appUrl=o.target.value}})]})}ys.propTypes={ref:T.any};function Hn(){const{t:v}=q.useContext(ue);return e.jsxs(ae,{direction:"row",spacing:2,sx:{alignItems:"flex-start",p:2},children:[e.jsx(Fr,{fontSize:"large",color:"primary"}),e.jsxs($,{children:[e.jsx(Y,{variant:"h6",gutterBottom:!0,children:v("federated.title")}),e.jsx(Y,{variant:"body2",sx:{color:"text.secondary"},children:v("federated.description")}),e.jsx(cr,{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:v("federated.link")})]})]})}function Nn(){const v=q.useRef(null),R=q.useRef(null),{t:O}=q.useContext(ue),{blocklet:C,actions:{refreshBlocklet:_}}=le(),j=E(()=>{const a=C.site?.domainAliases?.[0]?.href;if(a)try{const m=new URL(a);v.current?.open({link:m.origin})}catch{Z.error(O("federated.failedToGetFederatedLoginLink"))}},[C.site?.domainAliases?.[0]?.href]),p=E(()=>{R.current?.open(()=>{_()})});if(C.settings.federated?.sites.length>0){const a=C.settings.federated?.config.isMaster!==!1;return e.jsx(gs,{mode:a?"master":"member"})}return e.jsxs(e.Fragment,{children:[e.jsx($,{sx:{display:"flex",flexDirection:"column",gap:2,justifyContent:"center",alignItems:"center",minHeight:"200px"},children:e.jsxs($,{sx:{maxWidth:400,borderRadius:2,border:"1px solid",borderColor:"divider"},children:[e.jsx(Hn,{}),e.jsx(G,{sx:{width:1}}),e.jsxs(ae,{sx:{width:1,p:2,gap:1.5},children:[e.jsx(re,{variant:"contained",onClick:j,sx:{width:1},children:O("federated.inviteJoinFederatedLogin")}),e.jsx(re,{variant:"outlined",onClick:p,sx:{width:1},children:O("federated.joinFederatedLogin")})]})]})}),e.jsx(jt,{ref:v}),e.jsx(ys,{ref:R})]})}function xs({orientation:v="horizontal"}){const{t:R}=q.useContext(ue),O=ss({key:"lg"}),C=[{label:e.jsx($,{sx:{textAlign:"center",width:"100%"},children:R("oauth.commonSettings")}),value:"settings"},{label:e.jsx($,{sx:{textAlign:"center",width:"100%"},children:R("oauth.federated")}),value:"federated"},{label:e.jsx($,{sx:{textAlign:"center",width:"100%"},children:R("oauth.oauth")}),value:"oauth"},{label:e.jsx($,{sx:{textAlign:"center",width:"100%"},children:R("oauth.moreLogin")}),value:"more"}],[_,j]=q.useState(C[0].value),p=ge(()=>({oauth:e.jsx(Dn,{}),federated:e.jsx(Nn,{}),more:e.jsx(Dr,{children:R("oauth.comingSoon")}),settings:e.jsx(Ln,{})}),[R]);return v==="vertical"?e.jsx(Fn,{children:e.jsxs(ae,{direction:{md:"column",lg:"row"},sx:{gap:2},children:[e.jsx($,{sx:{minWidth:"240px",flexShrink:0},children:e.jsx(Fe,{tabs:C,current:_,orientation:O?"horizontal":"vertical",onChange:j,sx:{borderRight:O?0:1,height:"100%",borderColor:"divider"}})}),e.jsx($,{sx:{flexGrow:1,minWidth:0},children:e.jsx($,{sx:{maxWidth:"1200px"},children:p[_]})})]})}):e.jsxs($,{children:[e.jsx(Fe,{tabs:C,current:_,onChange:j}),e.jsx($,{sx:{marginTop:"10px"},children:p[_]})]})}xs.propTypes={orientation:T.oneOf(["horizontal","vertical"])};const Fn=xe.div`
123
123
  .MuiTab-root {
124
124
  text-align: left;
125
125
  align-items: flex-start;
@@ -133,15 +133,15 @@ ${m("blocklet.config.logoDesc",{width:512,height:512,maxSize:5})}`,children:e.js
133
133
  .Mui-selected {
134
134
  font-weight: bold;
135
135
  }
136
- `,Zn={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"/>'},Vn={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"/>'},_t={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"/>'},wt={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 vs({enabled:v,showUp:R=!0,showDown:O=!0,showSwitch:C=!0,showDelete:_=!0,showEdit:j=!0,disableEdit:p=!1,disableSwitch:i=!1,onClickUp:m=()=>{},onClickDown:f=()=>{},onClickSwitch:h=()=>{},onClickDelete:t=()=>{},onClickEdit:l=()=>{}}){const{t:o}=oe();return e.jsxs($,{sx:{display:"flex",alignItems:"center",gap:0},onClick:r=>r.stopPropagation(),children:[j?e.jsx(te,{title:o("common.edit"),children:e.jsx(ae,{size:"small",onClick:l,color:"success",disabled:p,children:e.jsx(se,{icon:wt,fontSize:18})})}):null,_?e.jsx(te,{title:o("common.delete"),children:e.jsx(ae,{size:"small",onClick:t,color:"error",children:e.jsx(se,{icon:_t,fontSize:18})})}):null,C?e.jsx(te,{title:o(v?"common.enabled":"common.disabled"),children:e.jsx(pe,{size:"small",checked:v,onClick:h,disabled:i})}):null,R?e.jsx(te,{title:o("common.moveUp"),children:e.jsx(ae,{size:"small",onClick:m,disabled:p,children:e.jsx(se,{icon:Vn,fontSize:20})})}):null,O?e.jsx(te,{title:o("common.moveDown"),children:e.jsx(ae,{size:"small",onClick:f,disabled:p,children:e.jsx(se,{icon:Zn,fontSize:20})})}):null]})}vs.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 bs({ref:v=null}){const{t:R}=q.useContext(ue),{blocklet:O}=le(),{api:C}=ne(),_=O?.meta?.did,p=Oe()?.transitions?.duration?.leavingScreen||300,i=ye({mode:"add",show:!1,isDefaultRule:!1,callback:ce,get dialogTitle(){return this.mode==="edit"?R("securityRule.edit"):this.mode==="view"?R("securityRule.view"):R("securityRule.add")}}),m=Be(async()=>{const{accessPolicies:S}=await C.getBlockletAccessPolicies({input:{did:_}});return He(S,A=>A.isProtected?1:0)},{manual:!0}),f=Be(async()=>{const{responseHeaderPolicies:S}=await C.getBlockletResponseHeaderPolicies({input:{did:_}});return He(S,A=>A.isProtected?1:0)},{manual:!0}),{handleSubmit:h,control:t,watch:l,setValue:o,getValues:r,reset:s,formState:{errors:c}}=ve({mode:"onChange",defaultValues:{componentDid:"",pathPattern:"",responseHeaderPolicyId:"",accessPolicyId:"",remark:""}}),n=E(()=>{s(),i.mode="add"}),a=E(()=>{i.show=!1,setTimeout(()=>{n()},p)}),u=E((S,A=null)=>{i.show=!0,A&&(i.isDefaultRule=A.id===J.SECURITY_RULE_DEFAULT_ID,i.mode="edit",o("componentDid",A.componentDid),o("pathPattern",A.pathPattern),o("responseHeaderPolicyId",A.responseHeaderPolicyId),o("accessPolicyId",A.accessPolicyId),o("remark",A.remark||"")),S?i.callback=S:i.mode="view",m.run(),f.run()});q.useImperativeHandle(v,()=>({open:u,close:a}),[u,a]);const g=E(()=>{const[S,A]=r(["accessPolicyId","responseHeaderPolicyId"]);return!S&&!A?R("securityRule.form.accessPolicyOrResponseHeaderPolicyRequired"):!0}),y=E(S=>{const A=g();if(A===!0){const P=i.isDefaultRule?Ce(S,"componentDid"):S;i.callback(P,a)}else Z.error(A)}),k=l("componentDid"),w=E(S=>{const A=S?.trim();if(!A)return R("common.requiredErrorText",{name:R("securityRule.form.pathPattern")});if(k){if(A.startsWith("/"))return R("securityRule.form.pathPatternErrorText")}else if(!A.startsWith("/")&&A!=="*")return R("securityRule.form.pathPatternErrorText");return!0}),d=E(S=>S?.trim()?!0:R("common.requiredErrorText",{name:R("securityRule.form.accessPolicy")})),x=E(S=>S?.trim()?!0:R("common.requiredErrorText",{name:R("securityRule.form.responseHeaderPolicy")})),b=ge(()=>{const A=(O?.children||[]).find(P=>P.meta.did===k);return A?.mountPoint?dr(A.mountPoint):null},[O,k]);return e.jsx(ke,{open:i.show,title:i.dialogTitle,onClose:a,PaperProps:{style:{minHeight:"unset"}},actions:e.jsx(re,{color:"primary",autoFocus:!0,variant:"contained",onClick:h(y),children:R("common.confirm")}),children:e.jsxs("form",{noValidate:!0,autoComplete:"off",children:[i.isDefaultRule?null:e.jsx(H,{name:"componentDid",control:t,render:({field:S})=>e.jsx(Ge,{fullWidth:!0,margin:"dense",size:"small",label:R("securityRule.form.component"),placeholer:R("securityRule.form.componentPlaceholder"),options:O.children.map(A=>({title:A.meta.title,value:A.meta.did,description:A.mountPoint})),error:!!c?.componentDid?.message,helperText:c?.componentDid?.message||"Choose belong to component",...Ce(S,"ref"),readOnly:i.mode==="view"})}),e.jsx(H,{name:"pathPattern",control:t,rules:{validate:w},render:({field:S})=>e.jsx(U,{fullWidth:!0,required:!0,margin:"dense",size:"small",placeholder:R("securityRule.form.pathPatternPlaceholder"),label:R("securityRule.form.pathPattern"),error:!!c?.pathPattern?.message,helperText:c?.pathPattern?.message||"/abc/bcd or /abc or /abc/*",...S,disabled:i.isDefaultRule||i.mode==="view",slotProps:{input:{startAdornment:b?e.jsx(Vt,{position:"start",children:b}):null}}})}),e.jsx(H,{name:"accessPolicyId",control:t,rules:{validate:i.isDefaultRule?d:ce},render:({field:S})=>e.jsx(Ge,{fullWidth:!0,required:i.isDefaultRule,margin:"dense",size:"small",label:R("securityRule.form.accessPolicy"),placeholer:R("securityRule.form.accessPolicyPlaceholder"),options:(m.data||[]).map(A=>({value:A.id,title:A.name,description:A.description})),error:!!c?.accessPolicyId?.message,helperText:c?.accessPolicyId?.message||R("securityRule.form.accessPolicyHelperText"),...Ce(S,"ref"),disabled:i.mode==="view"})}),e.jsx(H,{name:"responseHeaderPolicyId",control:t,rules:{validate:i.isDefaultRule?x:ce},render:({field:S})=>e.jsx(Ge,{fullWidth:!0,required:i.isDefaultRule,margin:"dense",size:"small",label:R("securityRule.form.responseHeaderPolicy"),placeholer:R("securityRule.form.responseHeaderPolicyPlaceholder"),options:(f.data||[]).map(A=>({title:A.name,value:A.id,description:A.description})),error:!!c?.responseHeaderPolicyId?.message,helperText:c?.responseHeaderPolicyId?.message||R("securityRule.form.responseHeaderPolicyHelperText"),...Ce(S,"ref"),disabled:i.mode==="view"})}),e.jsx(H,{name:"remark",control:t,render:({field:S})=>e.jsx(U,{fullWidth:!0,multiline:!0,minRows:3,maxRows:7,size:"small",margin:"dense",placeholder:R("securityRule.form.remarkPlaceholder"),label:R("securityRule.form.remark"),helperText:c?.message,...S,disabled:i.mode==="view"})})]})})}bs.propTypes={ref:T.any};const me=async(v,R="Failed to saved")=>{try{await v()}catch(O){Z.error(O?.message||R)}};function Un(){const{t:v,locale:R}=oe(),{blocklet:O}=le(),{api:C}=ne(),_=O?.meta?.did,j=Oe(),p=q.useRef(null),i=q.useRef(null),{confirmApi:m,confirmHolder:f}=Ze(),h=Be(async()=>{const{securityRules:d}=await C.getBlockletSecurityRules({input:{did:_,includeDisabled:!0}});return d}),t=d=>d.id===J.SECURITY_RULE_DEFAULT_ID,l=E(d=>(O?.children||[]).find(b=>b.meta.did===d)?.mountPoint),o=(h.data||[]).map(d=>{if(d.componentDid){const x=l(d.componentDid);d._disabled=x===void 0}return d}),r=o.filter(d=>!t(d)),s=(d,x)=>{me(async()=>{const b=d.target.checked;await C.updateBlockletSecurityRule({input:{did:_,data:{id:x.id,enabled:b}}}),Z.success(v("common.succeeded")),h.run()})},c=(d,x,b)=>{me(async()=>{const S=b-1,A=o[S];await Promise.all([C.updateBlockletSecurityRule({input:{did:_,data:{id:x.id,priority:A.priority}}}),C.updateBlockletSecurityRule({input:{did:_,data:{id:A.id,priority:x.priority}}})]),Z.success(v("common.succeeded")),h.run()})},n=(d,x,b)=>{me(async()=>{const S=b+1,A=o[S];await Promise.all([C.updateBlockletSecurityRule({input:{did:_,data:{id:x.id,priority:A.priority}}}),C.updateBlockletSecurityRule({input:{did:_,data:{id:A.id,priority:x.priority}}})]),Z.success(v("common.succeeded")),h.run()})},a=()=>{p.current.open((d,x)=>{me(async()=>{await C.addBlockletSecurityRule({input:{did:_,data:d}}),Z.success(v("common.succeeded")),h.run(),x()})})},u=(d,x)=>{p.current.open((b,S)=>{me(async()=>{await C.updateBlockletSecurityRule({input:{did:_,data:{...b,id:x.id}}}),Z.success(v("common.succeeded")),h.run(),S()})},x)},g=(d,x)=>{m.open({title:v("securityRule.delete.title"),content:v("securityRule.delete.description"),confirmButtonText:v("common.confirm"),confirmButtonProps:{color:"error"},cancelButtonText:v("common.cancel"),onConfirm(b){me(async()=>{await C.deleteBlockletSecurityRule({input:{did:_,id:x.id}}),Z.success(v("common.succeeded")),h.run(),b()})}})},y={sort:!1,download:!1,filter:!1,print:!1,search:!1,viewColumns:!1,expandableRowsOnClick:!0,searchDebounceTime:600,onRowClick(d,{dataIndex:x},b){if(i.current?.contains(b.target)){const S=o[x];p.current.open(void 0,S)}},setRowProps:(d,x)=>o[x]._disabled?{title:v("securityRule.useless"),style:{backgroundColor:j.palette.action.disabledBackground,cursor:"default"}}:{}},k=[e.jsx(ee,{size:"small",variant:"outlined",onClick:()=>{h.run()},sx:{mr:1},children:v("common.refresh")},"refresh"),e.jsx(ee,{size:"small",variant:"contained",onClick:a,children:v("common.add")})],w=[{label:v("securityRule.form.pathPattern"),name:"pathPattern",options:{customBodyRenderLite(d){const x=o[d];return e.jsx($,{sx:{whiteSpace:"nowrap"},children:x.id===J.SECURITY_RULE_DEFAULT_ID?"Default":Ut(l(x.componentDid),x.pathPattern)})}}},{label:v("responseHeaderPolicy.title"),name:"responseHeaderPolicy",options:{customBodyRenderLite(d){return o[d].responseHeaderPolicy?.name}}},{label:v("accessPolicy.title"),name:"accessPolicyId",options:{customBodyRenderLite(d){return o[d].accessPolicy?.name}}},{label:v("securityRule.form.remark"),name:"remark"},{label:v("common.actions"),name:"",width:100,align:"center",verticalKeyAlign:"center",options:{customBodyRenderLite(d){const x=o[d],b=t(x);return e.jsx(vs,{disableEdit:x._disabled,disableSwitch:x._disabled,enabled:x.enabled,showSwitch:!b,showDelete:!b,showUp:d>0&&!b,showDown:d<r.length-1&&!b,onClickSwitch:S=>{s(S,x)},onClickUp:S=>{c(S,x,d)},onClickDown:S=>{n(S,x,d)},onClickEdit:S=>{u(S,x)},onClickDelete:S=>{g(S,x)}})}}}].filter(Boolean);return e.jsxs($,{sx:{display:"flex",flexDirection:"column",gap:2},ref:i,children:[e.jsx(Ue,{verticalKeyWidth:100,locale:R,title:e.jsxs($,{sx:{display:"flex",alignItems:"center",gap:1},children:[v("securityRule.title")," ",e.jsx(Y,{variant:"body2",children:v("securityRule.sortByDescription")})]}),data:o,columns:w,customButtons:k,options:y,loading:h.loading}),e.jsx(bs,{ref:p}),f]})}const js={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"/>'},_s=[{value:J.WHO_CAN_ACCESS.ALL,icon:Ar,title:{zh:"面向所有人",en:"Open to Everyone"},description:{zh:"任何人都可以访问应用而不需要身份验证。",en:"Anyone can access this blocklet without authenticating."}},{value:J.WHO_CAN_ACCESS.INVITED,icon:Zr,title:{zh:"仅限受邀",en:"Invite-Only Access"},description:{zh:"仅限受邀用户可访问应用。",en:"Only invited members can access."}},{value:J.WHO_CAN_ACCESS.ADMIN,icon:Jr,title:{zh:"仅限拥有者 & 管理员",en:"Owner & Admin Access."},description:{zh:"仅限拥有者或管理员访问应用。",en:"Only the owner or an admin can access it."}},{value:J.WHO_CAN_ACCESS.OWNER,icon:ct,title:{zh:"仅限拥有者",en:"Owner-Only Access"},description:{zh:"仅限拥有者访问应用。",en:"Only the blocklet owner can access it."}}];function ws({value:v,onChange:R,...O}){const C="roles",_="roles_reverse",{t:j,locale:p}=oe(),i=[..._s,{value:C,icon:Hr,title:{zh:"指定通行证可访问",en:"Accessible to selected passports"},description:{zh:"只有指定的通行证可以访问",en:"Only specified passports can access"}},{value:_,icon:Vr,title:{zh:"指定通行证不可以访问",en:"Accessible to not selected passports"},description:{zh:"只有指定的通行证不可以访问",en:"Only specified passports can't access"}}];return e.jsx(U,{...O,label:j("blocklet.config.access.description"),select:!0,fullWidth:!0,value:v,onChange:R,sx:{"& .MuiInputBase-input":{width:"calc(100% - 46px)","& > .MuiBox-root:first-of-type":{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}},slotProps:{select:{renderValue:m=>{const f=i.find(h=>h.value===m);return f?e.jsxs($,{children:[e.jsx($,{component:f.icon,sx:{mr:1,fontSize:18,verticalAlign:"text-bottom",color:"text.secondary"}}),f.title[p]||f.title.en]}):null},IconComponent:m=>e.jsx(hr,{...m,width:20,height:20})}},children:i.map(m=>e.jsxs(ur,{value:m.value,sx:{display:"block","& .tip":{fontSize:"12px",color:`${({theme:f})=>f.palette.text.secondary}`}},children:[e.jsxs($,{sx:{display:"flex",alignItems:"center"},children:[e.jsx($,{component:m.icon,sx:{mr:1,fontSize:18,verticalAlign:"text-bottom",color:"text.secondary"}}),e.jsx($,{children:m.title[p]||m.title.en})]}),e.jsx($,{className:"tip",children:m.description[p]||m.description.en})]}))})}ws.propTypes={value:T.string,onChange:T.func};const ks=v=>{const R={name:v.name,description:v.description},{roles:O=null,reverse:C}=v;return O===null?C===!1&&(R.whoCanAccess=J.WHO_CAN_ACCESS.ALL,R.roles=null):O.length===0&&C===!0?(R.whoCanAccess=J.WHO_CAN_ACCESS.INVITED,R.roles=[]):Rt(O,[J.WHO_CAN_ACCESS.OWNER])&&C===!1?(R.whoCanAccess=J.WHO_CAN_ACCESS.OWNER,R.roles=[J.WHO_CAN_ACCESS.OWNER]):Rt(O,[J.WHO_CAN_ACCESS.OWNER,J.WHO_CAN_ACCESS.ADMIN])&&C===!1?(R.whoCanAccess=J.WHO_CAN_ACCESS.ADMIN,R.roles=[J.WHO_CAN_ACCESS.OWNER,J.WHO_CAN_ACCESS.ADMIN]):(R.whoCanAccess=C?"roles_reverse":"roles",R.roles=O),R},Wn=v=>{const R={name:v.name,description:v.description},{roles:O=null,whoCanAccess:C}=v;return C==="roles"?(R.roles=O,R.reverse=!1):C==="roles_reverse"?(R.roles=O,R.reverse=!0):C===J.WHO_CAN_ACCESS.ALL?(R.roles=null,R.reverse=!1):C===J.WHO_CAN_ACCESS.INVITED?(R.roles=[],R.reverse=!0):C===J.WHO_CAN_ACCESS.OWNER?(R.roles=[J.WHO_CAN_ACCESS.OWNER],R.reverse=!1):C===J.WHO_CAN_ACCESS.ADMIN&&(R.roles=[J.WHO_CAN_ACCESS.OWNER,J.WHO_CAN_ACCESS.ADMIN],R.reverse=!1),R},Jn=v=>v instanceof Object?{origin:v.origin?{override:v.origin?.override??!0,value:v.origin?.value?.join(`
136
+ `,Zn={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"/>'},Vn={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"/>'},_t={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"/>'},wt={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 vs({enabled:v,showUp:R=!0,showDown:O=!0,showSwitch:C=!0,showDelete:_=!0,showEdit:j=!0,disableEdit:p=!1,disableSwitch:a=!1,onClickUp:m=()=>{},onClickDown:f=()=>{},onClickSwitch:h=()=>{},onClickDelete:t=()=>{},onClickEdit:l=()=>{}}){const{t:o}=oe();return e.jsxs($,{sx:{display:"flex",alignItems:"center",gap:0},onClick:r=>r.stopPropagation(),children:[j?e.jsx(te,{title:o("common.edit"),children:e.jsx(ie,{size:"small",onClick:l,color:"success",disabled:p,children:e.jsx(se,{icon:wt,fontSize:18})})}):null,_?e.jsx(te,{title:o("common.delete"),children:e.jsx(ie,{size:"small",onClick:t,color:"error",children:e.jsx(se,{icon:_t,fontSize:18})})}):null,C?e.jsx(te,{title:o(v?"common.enabled":"common.disabled"),children:e.jsx(pe,{size:"small",checked:v,onClick:h,disabled:a})}):null,R?e.jsx(te,{title:o("common.moveUp"),children:e.jsx(ie,{size:"small",onClick:m,disabled:p,children:e.jsx(se,{icon:Vn,fontSize:20})})}):null,O?e.jsx(te,{title:o("common.moveDown"),children:e.jsx(ie,{size:"small",onClick:f,disabled:p,children:e.jsx(se,{icon:Zn,fontSize:20})})}):null]})}vs.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 bs({ref:v=null}){const{t:R}=q.useContext(ue),{blocklet:O}=le(),{api:C}=ne(),_=O?.meta?.did,p=Oe()?.transitions?.duration?.leavingScreen||300,a=ye({mode:"add",show:!1,isDefaultRule:!1,callback:ce,get dialogTitle(){return this.mode==="edit"?R("securityRule.edit"):this.mode==="view"?R("securityRule.view"):R("securityRule.add")}}),m=Be(async()=>{const{accessPolicies:S}=await C.getBlockletAccessPolicies({input:{did:_}});return He(S,A=>A.isProtected?1:0)},{manual:!0}),f=Be(async()=>{const{responseHeaderPolicies:S}=await C.getBlockletResponseHeaderPolicies({input:{did:_}});return He(S,A=>A.isProtected?1:0)},{manual:!0}),{handleSubmit:h,control:t,watch:l,setValue:o,getValues:r,reset:s,formState:{errors:c}}=ve({mode:"onChange",defaultValues:{componentDid:"",pathPattern:"",responseHeaderPolicyId:"",accessPolicyId:"",remark:""}}),n=E(()=>{s(),a.mode="add"}),i=E(()=>{a.show=!1,setTimeout(()=>{n()},p)}),u=E((S,A=null)=>{a.show=!0,A&&(a.isDefaultRule=A.id===J.SECURITY_RULE_DEFAULT_ID,a.mode="edit",o("componentDid",A.componentDid),o("pathPattern",A.pathPattern),o("responseHeaderPolicyId",A.responseHeaderPolicyId),o("accessPolicyId",A.accessPolicyId),o("remark",A.remark||"")),S?a.callback=S:a.mode="view",m.run(),f.run()});q.useImperativeHandle(v,()=>({open:u,close:i}),[u,i]);const g=E(()=>{const[S,A]=r(["accessPolicyId","responseHeaderPolicyId"]);return!S&&!A?R("securityRule.form.accessPolicyOrResponseHeaderPolicyRequired"):!0}),y=E(S=>{const A=g();if(A===!0){const P=a.isDefaultRule?Ce(S,"componentDid"):S;a.callback(P,i)}else Z.error(A)}),k=l("componentDid"),w=E(S=>{const A=S?.trim();if(!A)return R("common.requiredErrorText",{name:R("securityRule.form.pathPattern")});if(k){if(A.startsWith("/"))return R("securityRule.form.pathPatternErrorText")}else if(!A.startsWith("/")&&A!=="*")return R("securityRule.form.pathPatternErrorText");return!0}),d=E(S=>S?.trim()?!0:R("common.requiredErrorText",{name:R("securityRule.form.accessPolicy")})),x=E(S=>S?.trim()?!0:R("common.requiredErrorText",{name:R("securityRule.form.responseHeaderPolicy")})),b=ge(()=>{const A=(O?.children||[]).find(P=>P.meta.did===k);return A?.mountPoint?dr(A.mountPoint):null},[O,k]);return e.jsx(ke,{open:a.show,title:a.dialogTitle,onClose:i,PaperProps:{style:{minHeight:"unset"}},actions:e.jsx(re,{color:"primary",autoFocus:!0,variant:"contained",onClick:h(y),children:R("common.confirm")}),children:e.jsxs("form",{noValidate:!0,autoComplete:"off",children:[a.isDefaultRule?null:e.jsx(H,{name:"componentDid",control:t,render:({field:S})=>e.jsx(Ge,{fullWidth:!0,margin:"dense",size:"small",label:R("securityRule.form.component"),placeholer:R("securityRule.form.componentPlaceholder"),options:O.children.map(A=>({title:A.meta.title,value:A.meta.did,description:A.mountPoint})),error:!!c?.componentDid?.message,helperText:c?.componentDid?.message||"Choose belong to component",...Ce(S,"ref"),readOnly:a.mode==="view"})}),e.jsx(H,{name:"pathPattern",control:t,rules:{validate:w},render:({field:S})=>e.jsx(U,{fullWidth:!0,required:!0,margin:"dense",size:"small",placeholder:R("securityRule.form.pathPatternPlaceholder"),label:R("securityRule.form.pathPattern"),error:!!c?.pathPattern?.message,helperText:c?.pathPattern?.message||"/abc/bcd or /abc or /abc/*",...S,disabled:a.isDefaultRule||a.mode==="view",slotProps:{input:{startAdornment:b?e.jsx(Vt,{position:"start",children:b}):null}}})}),e.jsx(H,{name:"accessPolicyId",control:t,rules:{validate:a.isDefaultRule?d:ce},render:({field:S})=>e.jsx(Ge,{fullWidth:!0,required:a.isDefaultRule,margin:"dense",size:"small",label:R("securityRule.form.accessPolicy"),placeholer:R("securityRule.form.accessPolicyPlaceholder"),options:(m.data||[]).map(A=>({value:A.id,title:A.name,description:A.description})),error:!!c?.accessPolicyId?.message,helperText:c?.accessPolicyId?.message||R("securityRule.form.accessPolicyHelperText"),...Ce(S,"ref"),disabled:a.mode==="view"})}),e.jsx(H,{name:"responseHeaderPolicyId",control:t,rules:{validate:a.isDefaultRule?x:ce},render:({field:S})=>e.jsx(Ge,{fullWidth:!0,required:a.isDefaultRule,margin:"dense",size:"small",label:R("securityRule.form.responseHeaderPolicy"),placeholer:R("securityRule.form.responseHeaderPolicyPlaceholder"),options:(f.data||[]).map(A=>({title:A.name,value:A.id,description:A.description})),error:!!c?.responseHeaderPolicyId?.message,helperText:c?.responseHeaderPolicyId?.message||R("securityRule.form.responseHeaderPolicyHelperText"),...Ce(S,"ref"),disabled:a.mode==="view"})}),e.jsx(H,{name:"remark",control:t,render:({field:S})=>e.jsx(U,{fullWidth:!0,multiline:!0,minRows:3,maxRows:7,size:"small",margin:"dense",placeholder:R("securityRule.form.remarkPlaceholder"),label:R("securityRule.form.remark"),helperText:c?.message,...S,disabled:a.mode==="view"})})]})})}bs.propTypes={ref:T.any};const me=async(v,R="Failed to saved")=>{try{await v()}catch(O){Z.error(O?.message||R)}};function Un(){const{t:v,locale:R}=oe(),{blocklet:O}=le(),{api:C}=ne(),_=O?.meta?.did,j=Oe(),p=q.useRef(null),a=q.useRef(null),{confirmApi:m,confirmHolder:f}=Ze(),h=Be(async()=>{const{securityRules:d}=await C.getBlockletSecurityRules({input:{did:_,includeDisabled:!0}});return d}),t=d=>d.id===J.SECURITY_RULE_DEFAULT_ID,l=E(d=>(O?.children||[]).find(b=>b.meta.did===d)?.mountPoint),o=(h.data||[]).map(d=>{if(d.componentDid){const x=l(d.componentDid);d._disabled=x===void 0}return d}),r=o.filter(d=>!t(d)),s=(d,x)=>{me(async()=>{const b=d.target.checked;await C.updateBlockletSecurityRule({input:{did:_,data:{id:x.id,enabled:b}}}),Z.success(v("common.succeeded")),h.run()})},c=(d,x,b)=>{me(async()=>{const S=b-1,A=o[S];await Promise.all([C.updateBlockletSecurityRule({input:{did:_,data:{id:x.id,priority:A.priority}}}),C.updateBlockletSecurityRule({input:{did:_,data:{id:A.id,priority:x.priority}}})]),Z.success(v("common.succeeded")),h.run()})},n=(d,x,b)=>{me(async()=>{const S=b+1,A=o[S];await Promise.all([C.updateBlockletSecurityRule({input:{did:_,data:{id:x.id,priority:A.priority}}}),C.updateBlockletSecurityRule({input:{did:_,data:{id:A.id,priority:x.priority}}})]),Z.success(v("common.succeeded")),h.run()})},i=()=>{p.current.open((d,x)=>{me(async()=>{await C.addBlockletSecurityRule({input:{did:_,data:d}}),Z.success(v("common.succeeded")),h.run(),x()})})},u=(d,x)=>{p.current.open((b,S)=>{me(async()=>{await C.updateBlockletSecurityRule({input:{did:_,data:{...b,id:x.id}}}),Z.success(v("common.succeeded")),h.run(),S()})},x)},g=(d,x)=>{m.open({title:v("securityRule.delete.title"),content:v("securityRule.delete.description"),confirmButtonText:v("common.confirm"),confirmButtonProps:{color:"error"},cancelButtonText:v("common.cancel"),onConfirm(b){me(async()=>{await C.deleteBlockletSecurityRule({input:{did:_,id:x.id}}),Z.success(v("common.succeeded")),h.run(),b()})}})},y={sort:!1,download:!1,filter:!1,print:!1,search:!1,viewColumns:!1,expandableRowsOnClick:!0,searchDebounceTime:600,onRowClick(d,{dataIndex:x},b){if(a.current?.contains(b.target)){const S=o[x];p.current.open(void 0,S)}},setRowProps:(d,x)=>o[x]._disabled?{title:v("securityRule.useless"),style:{backgroundColor:j.palette.action.disabledBackground,cursor:"default"}}:{}},k=[e.jsx(ee,{size:"small",variant:"outlined",onClick:()=>{h.run()},sx:{mr:1},children:v("common.refresh")},"refresh"),e.jsx(ee,{size:"small",variant:"contained",onClick:i,children:v("common.add")})],w=[{label:v("securityRule.form.pathPattern"),name:"pathPattern",options:{customBodyRenderLite(d){const x=o[d];return e.jsx($,{sx:{whiteSpace:"nowrap"},children:x.id===J.SECURITY_RULE_DEFAULT_ID?"Default":Ut(l(x.componentDid),x.pathPattern)})}}},{label:v("responseHeaderPolicy.title"),name:"responseHeaderPolicy",options:{customBodyRenderLite(d){return o[d].responseHeaderPolicy?.name}}},{label:v("accessPolicy.title"),name:"accessPolicyId",options:{customBodyRenderLite(d){return o[d].accessPolicy?.name}}},{label:v("securityRule.form.remark"),name:"remark"},{label:v("common.actions"),name:"",width:100,align:"center",verticalKeyAlign:"center",options:{customBodyRenderLite(d){const x=o[d],b=t(x);return e.jsx(vs,{disableEdit:x._disabled,disableSwitch:x._disabled,enabled:x.enabled,showSwitch:!b,showDelete:!b,showUp:d>0&&!b,showDown:d<r.length-1&&!b,onClickSwitch:S=>{s(S,x)},onClickUp:S=>{c(S,x,d)},onClickDown:S=>{n(S,x,d)},onClickEdit:S=>{u(S,x)},onClickDelete:S=>{g(S,x)}})}}}].filter(Boolean);return e.jsxs($,{sx:{display:"flex",flexDirection:"column",gap:2},ref:a,children:[e.jsx(Ue,{verticalKeyWidth:100,locale:R,title:e.jsxs($,{sx:{display:"flex",alignItems:"center",gap:1},children:[v("securityRule.title")," ",e.jsx(Y,{variant:"body2",children:v("securityRule.sortByDescription")})]}),data:o,columns:w,customButtons:k,options:y,loading:h.loading}),e.jsx(bs,{ref:p}),f]})}const js={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"/>'},_s=[{value:J.WHO_CAN_ACCESS.ALL,icon:Ar,title:{zh:"面向所有人",en:"Open to Everyone"},description:{zh:"任何人都可以访问应用而不需要身份验证。",en:"Anyone can access this blocklet without authenticating."}},{value:J.WHO_CAN_ACCESS.INVITED,icon:Zr,title:{zh:"仅限受邀",en:"Invite-Only Access"},description:{zh:"仅限受邀用户可访问应用。",en:"Only invited members can access."}},{value:J.WHO_CAN_ACCESS.ADMIN,icon:Jr,title:{zh:"仅限拥有者 & 管理员",en:"Owner & Admin Access."},description:{zh:"仅限拥有者或管理员访问应用。",en:"Only the owner or an admin can access it."}},{value:J.WHO_CAN_ACCESS.OWNER,icon:ct,title:{zh:"仅限拥有者",en:"Owner-Only Access"},description:{zh:"仅限拥有者访问应用。",en:"Only the blocklet owner can access it."}}];function ws({value:v,onChange:R,...O}){const C="roles",_="roles_reverse",{t:j,locale:p}=oe(),a=[..._s,{value:C,icon:Hr,title:{zh:"指定通行证可访问",en:"Accessible to selected passports"},description:{zh:"只有指定的通行证可以访问",en:"Only specified passports can access"}},{value:_,icon:Vr,title:{zh:"指定通行证不可以访问",en:"Accessible to not selected passports"},description:{zh:"只有指定的通行证不可以访问",en:"Only specified passports can't access"}}];return e.jsx(U,{...O,label:j("blocklet.config.access.description"),select:!0,fullWidth:!0,value:v,onChange:R,sx:{"& .MuiInputBase-input":{width:"calc(100% - 46px)","& > .MuiBox-root:first-of-type":{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}},slotProps:{select:{renderValue:m=>{const f=a.find(h=>h.value===m);return f?e.jsxs($,{children:[e.jsx($,{component:f.icon,sx:{mr:1,fontSize:18,verticalAlign:"text-bottom",color:"text.secondary"}}),f.title[p]||f.title.en]}):null},IconComponent:m=>e.jsx(hr,{...m,width:20,height:20})}},children:a.map(m=>e.jsxs(ur,{value:m.value,sx:{display:"block","& .tip":{fontSize:"12px",color:`${({theme:f})=>f.palette.text.secondary}`}},children:[e.jsxs($,{sx:{display:"flex",alignItems:"center"},children:[e.jsx($,{component:m.icon,sx:{mr:1,fontSize:18,verticalAlign:"text-bottom",color:"text.secondary"}}),e.jsx($,{children:m.title[p]||m.title.en})]}),e.jsx($,{className:"tip",children:m.description[p]||m.description.en})]}))})}ws.propTypes={value:T.string,onChange:T.func};const ks=v=>{const R={name:v.name,description:v.description},{roles:O=null,reverse:C}=v;return O===null?C===!1&&(R.whoCanAccess=J.WHO_CAN_ACCESS.ALL,R.roles=null):O.length===0&&C===!0?(R.whoCanAccess=J.WHO_CAN_ACCESS.INVITED,R.roles=[]):Rt(O,[J.WHO_CAN_ACCESS.OWNER])&&C===!1?(R.whoCanAccess=J.WHO_CAN_ACCESS.OWNER,R.roles=[J.WHO_CAN_ACCESS.OWNER]):Rt(O,[J.WHO_CAN_ACCESS.OWNER,J.WHO_CAN_ACCESS.ADMIN])&&C===!1?(R.whoCanAccess=J.WHO_CAN_ACCESS.ADMIN,R.roles=[J.WHO_CAN_ACCESS.OWNER,J.WHO_CAN_ACCESS.ADMIN]):(R.whoCanAccess=C?"roles_reverse":"roles",R.roles=O),R},Wn=v=>{const R={name:v.name,description:v.description},{roles:O=null,whoCanAccess:C}=v;return C==="roles"?(R.roles=O,R.reverse=!1):C==="roles_reverse"?(R.roles=O,R.reverse=!0):C===J.WHO_CAN_ACCESS.ALL?(R.roles=null,R.reverse=!1):C===J.WHO_CAN_ACCESS.INVITED?(R.roles=[],R.reverse=!0):C===J.WHO_CAN_ACCESS.OWNER?(R.roles=[J.WHO_CAN_ACCESS.OWNER],R.reverse=!1):C===J.WHO_CAN_ACCESS.ADMIN&&(R.roles=[J.WHO_CAN_ACCESS.OWNER,J.WHO_CAN_ACCESS.ADMIN],R.reverse=!1),R},Jn=v=>v instanceof Object?{origin:v.origin?{override:v.origin?.override??!0,value:v.origin?.value?.join(`
137
137
  `),smart:v.origin?.smart??!0}:void 0,methods:v.methods,allowedHeaders:v.allowedHeaders?{override:v.allowedHeaders?.override??!0,value:v.allowedHeaders?.value?.join(`
138
138
  `)}:void 0,exposedHeaders:v.exposedHeaders?{override:v.exposedHeaders?.override??!0,value:v.exposedHeaders?.value?.join(`
139
139
  `)}:void 0,maxAge:v.maxAge,optionsSuccessStatus:v.optionsSuccessStatus,preflightContinue:v.preflightContinue,credentials:v.credentials}:void 0,Kn=v=>v instanceof Object?{origin:{override:v.origin?.override,value:v.origin?.value?.split(`
140
140
  `).filter(O=>O),smart:v.origin?.smart},methods:v.methods,allowedHeaders:{override:v.allowedHeaders?.override,value:v.allowedHeaders?.value?.split(`
141
141
  `).filter(O=>O)},exposedHeaders:{override:v.exposedHeaders?.override,value:v.exposedHeaders?.value?.split(`
142
- `).filter(O=>O)},maxAge:v.maxAge,optionsSuccessStatus:v.optionsSuccessStatus,preflightContinue:v.preflightContinue,credentials:v.credentials}:void 0,Gn=v=>v instanceof Object?{contentSecurityPolicy:v.contentSecurityPolicy,referrerPolicy:v.referrerPolicy,xFrameOptions:v.xFrameOptions,xPoweredBy:v.xPoweredBy,xXssProtection:v.xXssProtection}:void 0,Yn=v=>v instanceof Object?{contentSecurityPolicy:v.contentSecurityPolicy,referrerPolicy:v.referrerPolicy,xFrameOptions:v.xFrameOptions,xPoweredBy:v.xPoweredBy,xXssProtection:v.xXssProtection}:void 0,Xn=v=>{const R=Jt(v);if(v.securityHeader)try{R.securityHeader=JSON.parse(v.securityHeader)}catch{R.securityHeader=null}if(v.cors)try{R.cors=JSON.parse(v.cors)}catch{R.cors=null}return R};function Ss({ref:v=null}){const{t:R}=q.useContext(ue),{roles:O}=Ve(),_=Oe()?.transitions?.duration?.leavingScreen||300,j=ye({mode:"add",show:!1,callback:ce,get dialogTitle(){return this.mode==="edit"?R("accessPolicy.edit"):this.mode==="view"?R("accessPolicy.view"):R("accessPolicy.add")}}),{handleSubmit:p,control:i,watch:m,setValue:f,reset:h,formState:{errors:t}}=ve({mode:"onChange",defaultValues:{name:"",description:"",roles:null,whoCanAccess:"all"}}),l=E(()=>{h(),j.mode="add"}),o=E(()=>{j.show=!1,setTimeout(()=>{l()},_)}),r=E((y=ce,k=null)=>{if(j.callback=y,j.show=!0,k){k.id?j.mode="edit":j.mode="view";const w=ks(k);f("name",w.name),f("description",w.description),f("roles",w.roles),f("whoCanAccess",w.whoCanAccess)}});q.useImperativeHandle(v,()=>({open:r,close:o}),[r,o]);const s=E(y=>{j.callback(Wn(y),o)}),c=E(y=>y?.trim()?!0:R("common.requiredErrorText",{name:R("accessPolicy.form.name")})),n=m("whoCanAccess"),a=j.mode==="view",u=E(y=>["roles","roles_reverse"].includes(n)&&(!y||y?.length===0)?R("common.requiredErrorText",{name:R("accessPolicy.form.roles")}):!0),g=E(y=>y?.trim()?!0:R("common.requiredErrorText",{name:R("accessPolicy.form.accessType")}));return e.jsx(ke,{open:j.show,title:j.dialogTitle,onClose:o,PaperProps:{style:{minHeight:"unset"}},actions:e.jsx(re,{color:"primary",autoFocus:!0,variant:"contained",onClick:p(s),children:R("common.confirm")}),children:e.jsxs("form",{noValidate:!0,autoComplete:"off",children:[e.jsx(H,{name:"name",control:i,rules:{validate:c},render:({field:y})=>e.jsx(U,{fullWidth:!0,required:!0,margin:"dense",size:"small",disabled:a,placeholder:R("accessPolicy.form.namePlaceholder"),label:R("accessPolicy.form.name"),error:!!t?.name?.message,helperText:t?.name?.message||" ",...y})}),e.jsx(H,{name:"whoCanAccess",control:i,rules:{validate:g},render:({field:y})=>e.jsx(ws,{required:!0,size:"small",margin:"dense",disabled:a,error:!!t?.whoCanAccess?.message,helperText:t?.whoCanAccess?.message||" ",...y})}),["roles","roles_reverse"].includes(n)?e.jsx(H,{name:"roles",rules:{validate:u},control:i,render:({field:y})=>e.jsxs(Q,{variant:"standard",error:!!t?.roles?.message,children:[e.jsx(Ne,{sx:{display:"flex",flexDirection:"row",mt:-3},children:O.map(k=>e.jsx(X,{control:e.jsx(Te,{disabled:a,size:"small",checked:y.value?.includes(k.name),sx:{p:.75},onChange:(w,d)=>{const x=y.value||[];d?y.onChange([...x,k.name]):y.onChange(x.filter(b=>b!==k.name))}}),label:k.title},k.name))}),e.jsx(zt,{sx:{transform:"translateY(-8px)"},children:t?.roles?.message||" "})]})}):null,e.jsx(H,{name:"description",control:i,render:({field:y})=>e.jsx(U,{fullWidth:!0,multiline:!0,disabled:a,minRows:3,maxRows:7,margin:"dense",size:"small",placeholder:R("accessPolicy.form.descriptionPlaceholder"),label:R("accessPolicy.form.description"),helperText:t?.message,...y})})]})})}Ss.propTypes={ref:T.any};function Qn(){const{t:v,locale:R}=oe(),{blocklet:O}=le(),{api:C}=ne(),{roles:_}=Ve(),j=O?.meta?.did,p=q.useRef(null),i=q.useRef(null),{confirmApi:m,confirmHolder:f}=Ze(),h=()=>{},t=Be(async()=>{const{accessPolicies:g}=await C.getBlockletAccessPolicies({input:{did:j}});return He(g,y=>y.isProtected?1:0)}),l=t.data||[],o=E(()=>{i.current.open((g,y)=>{me(async()=>{await C.addBlockletAccessPolicy({input:{did:j,data:g}}),Z.success(v("common.succeeded")),t.run(),y()})})}),r=E(g=>{i.current.open((y,k)=>{me(async()=>{await C.updateBlockletAccessPolicy({input:{did:j,data:{...y,id:g.id}}}),Z.success(v("common.succeeded")),t.run(),k()})},g)}),s=E(g=>{i.current.open((y,k)=>{k()},Ce(g,["id"]))}),c=E(g=>{m.open({title:v("accessPolicy.delete.title"),content:v("accessPolicy.delete.description"),confirmButtonText:v("common.confirm"),confirmButtonProps:{color:"error"},cancelButtonText:v("common.cancel"),onConfirm(y){me(async()=>{await C.deleteBlockletAccessPolicy({input:{did:j,id:g.id}}),Z.success(v("common.succeeded")),t.run(),y()})}})}),n={sort:!1,download:!1,filter:!1,print:!1,search:!1,viewColumns:!1,expandableRowsOnClick:!0,searchDebounceTime:600,onRowClick(g,{dataIndex:y},k){if(p.current?.contains(k.target)){const w=l[y];s(w)}}},a=[e.jsx(ee,{size:"small",variant:"outlined",onClick:()=>{t.run()},sx:{mr:1},children:v("common.refresh")},"refresh"),e.jsx(ee,{size:"small",variant:"contained",onClick:o,children:v("common.add")})],u=[{label:v("accessPolicy.form.name"),name:"name",options:{customBodyRenderLite(g){const y=l[g],k=y.isProtected?e.jsx(te,{title:"Built-in policy, can't edit",children:e.jsx($,{component:se,icon:Kt,sx:{fontSize:16}})}):null;return e.jsxs($,{sx:{display:"flex",alignItems:"center",gap:.5},children:[k," ",y.name]})}}},{label:v("accessPolicy.form.roles"),name:"roles",options:{customBodyRenderLite(g){const y=l[g],k=ks(y);if([J.WHO_CAN_ACCESS.ALL,J.WHO_CAN_ACCESS.INVITED].includes(k.whoCanAccess)){const d=_s.find(x=>x.value===k.whoCanAccess);return d.title?.[R]||d.title?.en}const w=_.filter(d=>y.reverse?!k.roles?.includes(d.name):k.roles?.includes(d.name));return e.jsx($,{sx:{display:"flex",gap:1,flexWrap:"wrap"},children:w.map(d=>e.jsx(te,{title:d.description,children:e.jsx(ft,{size:"small",label:d.title},d.name)}))})}}},{label:v("accessPolicy.form.description"),name:"description"},{label:v("common.actions"),name:"",width:100,align:"center",verticalKeyAlign:"center",options:{customBodyRenderLite(g){const y=l[g];return e.jsxs($,{sx:{display:"flex",alignItems:"center",gap:0},onClick:k=>k.stopPropagation(),children:[y.isProtected?e.jsx(te,{title:v("common.view"),children:e.jsx(ae,{size:"small",onClick:()=>{s(y,g)},children:e.jsx(se,{icon:js,fontSize:18})})}):null,y.isProtected?null:e.jsx(te,{title:v("common.edit"),children:e.jsx(ae,{size:"small",onClick:()=>{r(y,g)},color:"success",children:e.jsx(se,{icon:wt,fontSize:18})})}),y.isProtected?null:e.jsx(te,{title:v("common.delete"),children:e.jsx(ae,{size:"small",onClick:()=>{c(y,g)},color:"error",children:e.jsx(se,{icon:_t,fontSize:18})})})]})}}}].filter(Boolean);return e.jsxs($,{sx:{display:"flex",flexDirection:"column",gap:2},ref:p,children:[e.jsx(Ue,{verticalKeyWidth:100,locale:R,title:v("accessPolicy.title"),data:l,columns:u,customButtons:a,options:n,loading:t.loading,onChange:h}),e.jsx(Ss,{ref:i}),f]})}const ei={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 ut({title:v,actions:R,children:O=null,defaultValue:C=!0,value:_,onChange:j,showExpand:p=!0}){const i=!we(_),m=ye({open:C}),f=ge(()=>i?_:m.open,[_,i,m.open]),h=E(()=>{i?j(!f):m.open=!m.open});return e.jsxs(Ht,{variant:"outlined",children:[e.jsxs($,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",px:2,py:1,backgroundColor:"grey.50"},onClick:h,children:[e.jsx($,{sx:{fontWeight:"bold"},children:v}),e.jsxs($,{sx:{display:"flex",alignItems:"center"},children:[R,p?e.jsx($,{component:se,icon:ei,sx:{transform:f?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease",fontSize:"2rem"}}):null]})]}),e.jsx(fr,{in:f,children:e.jsx(Nr,{children:O})})]})}ut.propTypes={title:T.string.isRequired,defaultValue:T.bool,value:T.bool,actions:T.node,children:T.node,onChange:T.func,showExpand:T.bool};const ht={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 Cs({config:v={},onChange:R=()=>{},disabled:O=!1}){const C=["GET","HEAD","POST","PUT","DELETE","OPTIONS","PATCH"],_={origin:{override:!1,value:"*",smart:!0},methods:{override:!1,value:[...C]},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(v,we)},{t:j}=oe(),p=(f,{override:h,value:t,smart:l})=>{const o={..._?.[f]};!we(l)&&f==="origin"&&(o.smart=l),we(h)||(o.override=h),we(t)||(o.value=t),R({..._,[f]:o})},i=[{title:j("responseHeaderPolicy.form.cors.origin"),override:_.origin.override,smart:_.origin.smart,name:"origin",required:!0,value:_.origin.value,content:e.jsx(Q,{fullWidth:!0,sx:{mt:.75,"& .MuiFormHelperText-root":{mx:0}},children:e.jsx(U,{multiline:!0,minRows:4,maxRows:10,disabled:O,variant:"outlined",size:"small",placeholder:j("responseHeaderPolicy.form.cors.originPlaceholder"),helperText:j("responseHeaderPolicy.form.cors.originHelperText"),value:_.origin.value,onChange:f=>{p("origin",{value:f.target.value})}})})},{title:j("responseHeaderPolicy.form.cors.methods"),name:"methods",override:_.methods.override,required:!0,value:_.methods.value,content:e.jsx(Ne,{sx:{flexDirection:"row"},children:C.map(f=>e.jsx(X,{control:e.jsx(Te,{size:"small",disabled:O,checked:_.methods.value.includes(f),onChange:(h,t)=>{p("methods",{value:t?[..._.methods.value,f]:_.methods.value.filter(l=>l!==f)})}}),label:f},f))})},{title:j("responseHeaderPolicy.form.cors.allowedHeaders"),override:_.allowedHeaders.override,name:"allowedHeaders",value:_.allowedHeaders.value,content:e.jsx(Q,{fullWidth:!0,sx:{mt:.75,"& .MuiFormHelperText-root":{mx:0}},children:e.jsx(U,{multiline:!0,minRows:3,maxRows:7,disabled:O,variant:"outlined",size:"small",placeholder:j("responseHeaderPolicy.form.cors.allowedHeadersPlaceholder"),helperText:j("responseHeaderPolicy.form.cors.allowedHeadersHelperText"),value:_.allowedHeaders.value,onChange:f=>{p("allowedHeaders",{value:f.target.value})}})})},{title:j("responseHeaderPolicy.form.cors.exposedHeaders"),override:_.exposedHeaders.override,name:"exposedHeaders",value:_.exposedHeaders.value,content:e.jsx(Q,{fullWidth:!0,sx:{mt:.75,"& .MuiFormHelperText-root":{mx:0}},children:e.jsx(U,{multiline:!0,minRows:3,maxRows:7,disabled:O,variant:"outlined",size:"small",placeholder:j("responseHeaderPolicy.form.cors.exposedHeadersPlaceholder"),helperText:j("responseHeaderPolicy.form.cors.exposedHeadersHelperText"),value:_.exposedHeaders.value,onChange:f=>{p("exposedHeaders",{value:f.target.value})}})})},{title:j("responseHeaderPolicy.form.cors.maxAge"),override:_.maxAge.override,name:"maxAge",value:_.maxAge.value,content:e.jsx(Q,{fullWidth:!0,sx:{mt:.75,"& .MuiFormHelperText-root":{mx:0}},children:e.jsx(U,{type:"number",variant:"outlined",size:"small",disabled:O,value:_.maxAge.value,onChange:f=>{p("maxAge",{value:f.target.value})},helperText:j("responseHeaderPolicy.form.cors.maxAgeHelperText")})})},{title:j("responseHeaderPolicy.form.cors.optionsSuccessStatus"),override:_.optionsSuccessStatus.override,name:"optionsSuccessStatus",value:_.optionsSuccessStatus.value,content:e.jsx(Q,{fullWidth:!0,sx:{mt:.75,"& .MuiFormHelperText-root":{mx:0}},children:e.jsx(U,{type:"number",variant:"outlined",size:"small",disabled:O,value:_.optionsSuccessStatus.value,onChange:f=>{p("optionsSuccessStatus",{value:f.target.value})}})})},{title:j("responseHeaderPolicy.form.cors.preflightContinue"),override:_.preflightContinue.override,name:"preflightContinue",value:_.preflightContinue.value,control:e.jsx(pe,{size:"small",disabled:O,checked:_.preflightContinue.value,onChange:(f,h)=>{p("preflightContinue",{value:h})}})},{title:j("responseHeaderPolicy.form.cors.credentials"),override:_.credentials.override,name:"credentials",value:_.credentials.value,control:e.jsx(pe,{size:"small",disabled:O,checked:_.credentials.value,onChange:(f,h)=>{p("credentials",{value:h})}})}];Yt(()=>{R(_)});const m={".PrivateSwitchBase-input+svg":{fontSize:"1rem"},".MuiCheckbox-sizeSmall":{p:.75},".MuiFormControlLabel-label":{fontSize:"0.8rem"}};return e.jsx(Ne,{children:i.map((f,h)=>e.jsxs(q.Fragment,{children:[e.jsxs($,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[e.jsx(X,{sx:{mt:h===0?0:1},control:f.control||e.jsx($,{sx:{pl:1.35}}),label:f.title,required:f.required},`${f.name}_form`),e.jsxs($,{children:[f.name==="origin"?e.jsx(X,{control:e.jsx(Te,{size:"small",checked:f.smart,color:"primary",disabled:O,onChange:()=>{p(f.name,{smart:!f.smart})}}),label:e.jsxs(e.Fragment,{children:[j("responseHeaderPolicy.form.cors.smartMode"),e.jsx(te,{title:j("responseHeaderPolicy.form.cors.smartModeHelperText"),children:e.jsx($,{component:se,icon:ht,sx:{cursor:"pointer",color:"grey",ml:.5,fontSize:"1.1em"}})})]}),sx:m},`${f.name}_smart`):null,e.jsx(X,{control:e.jsx(Te,{size:"small",checked:f.override,color:"warning",disabled:O,onChange:()=>{p(f.name,{override:!f.override})}}),label:e.jsxs(e.Fragment,{children:[j("responseHeaderPolicy.form.originOverride"),e.jsx(te,{title:j("responseHeaderPolicy.form.originOverrideHelperText"),children:e.jsx($,{component:se,icon:ht,sx:{cursor:"pointer",color:"grey",ml:.5,fontSize:"1.1em"}})})]}),sx:{...m,mr:0}},`${f.name}_override`)]})]}),f.content?e.jsx($,{sx:{ml:3.5},children:f.content},`${f.name}_content`):null]},f.name))})}Cs.propTypes={config:T.object,onChange:T.func,disabled:T.bool};function Rs({value:v,onChange:R=()=>{},disabled:O=!1}){const C="sameorigin",_=[{label:"DENY",value:"deny"},{label:"SAMEORIGIN (default)",value:"sameorigin"}],j=p=>{R({action:p.target.value})};return q.useEffect(()=>{v===!0&&R({action:C})},[v]),e.jsx($,{children:e.jsx(Q,{children:e.jsx(es,{row:!0,children:_.map(p=>e.jsx(X,{value:p.value,control:e.jsx(ts,{size:"small",disabled:O,checked:p.value===v?.action,onChange:j,sx:{p:.75}}),label:p.label},p.value))})})})}Rs.propTypes={value:T.oneOfType([T.string,T.bool]).isRequired,onChange:T.func,disabled:T.bool};function Os({value:v,onChange:R=()=>{},disabled:O=!1}){const C="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"}],j=p=>{R({policy:p.target.value})};return q.useEffect(()=>{v===!0&&R({policy:C})},[v]),e.jsx($,{children:e.jsx(Q,{children:e.jsx(es,{children:_.map(p=>e.jsx(X,{value:p.value,control:e.jsx(ts,{size:"small",disabled:O,checked:p.value===v?.policy,onChange:j,sx:{p:.75}}),label:p.label},p.value))})})})}Os.propTypes={value:T.oneOfType([T.string,T.bool]).isRequired,onChange:T.func,disabled:T.func};function $s({value:v,onChange:R=()=>{},disabled:O=!1}){const C={"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(h=>[h,f[h].filter(Boolean).join(" ")].filter(Boolean).join(" ")).filter(Boolean).join(`
143
- `)}const j=_(v?.directives||C),[p,i]=q.useState(j),m=f=>{i(f.target.value);const h=f.target.value.split(`
144
- `).reduce((t,l)=>{const[o,...r]=l.split(" ");return t[o]=r.filter(s=>s!==""),t},{});R({useDefaults:!1,directives:h})};return q.useEffect(()=>{v===!0&&(R({useDefaults:!1,directives:C}),i(_(C)))},[v]),e.jsx($,{sx:{mt:1},children:e.jsx(Q,{fullWidth:!0,children:e.jsx(U,{fullWidth:!0,multiline:!0,disabled:O,rows:12,size:"small",value:p,onChange:m})})})}$s.propTypes={value:T.oneOfType([T.object,T.bool]).isRequired,onChange:T.func,disabled:T.bool};function As({config:v={},onChange:R=()=>{},disabled:O=!1}){const C={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(v,we)},{t:_}=oe(),j=(m,{override:f,value:h})=>{const t={...C?.[m]};we(f)||(t.override=f),we(h)||(t.value=h),R({...C,[m]:t})},p=[{title:"Content-Security-Policy",name:"contentSecurityPolicy",override:C.contentSecurityPolicy.override,value:!!C.contentSecurityPolicy.value,content:e.jsx($s,{disabled:O,value:C.contentSecurityPolicy.value,onChange:m=>{j("contentSecurityPolicy",{value:m})}}),onChange(m){j("contentSecurityPolicy",{value:m})}},{title:"Referrer-Policy",name:"referrerPolicy",override:C.referrerPolicy.override,value:!!C.referrerPolicy.value,content:e.jsx(Os,{disabled:O,value:C.referrerPolicy.value,onChange:m=>{j("referrerPolicy",{value:m})}}),onChange(m){j("referrerPolicy",{value:m})}},{title:"X-Frame-Options",name:"xFrameOptions",override:C.xFrameOptions.override,value:!!C.xFrameOptions.value,content:e.jsx(Rs,{disabled:O,value:C.xFrameOptions.value,onChange:m=>{j("xFrameOptions",{value:m})}}),onChange(m){j("xFrameOptions",{value:m})}},{title:"Disable X-Powered-By",name:"xPoweredBy",override:C.xPoweredBy.override,value:C.xPoweredBy.value,content:null,onChange(m){j("xPoweredBy",{value:m})}},{title:"X-XSS-Protection",name:"xXssProtection",override:C.xXssProtection.override,value:C.xXssProtection.value,content:null,onChange(m){j("xXssProtection",{value:m})}}];Yt(()=>{R(C)});const i={".PrivateSwitchBase-input+svg":{fontSize:"1rem"},".MuiCheckbox-sizeSmall":{p:.75},".MuiFormControlLabel-label":{fontSize:"0.8rem"}};return e.jsx(Ne,{children:p.map((m,f)=>e.jsxs(q.Fragment,{children:[e.jsxs($,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[e.jsx(X,{sx:{mt:f===0?0:1},control:e.jsx(pe,{size:"small",disabled:O,checked:m.value,onChange:()=>{m.onChange(!m.value)}},`${m.name}_switch`),label:m.title},`${m.name}_form`),m.value?e.jsx(X,{control:e.jsx(Te,{size:"small",checked:m.override,color:"warning",disabled:O,onChange:()=>{j(m.name,{override:!m.override})}}),label:e.jsxs(e.Fragment,{children:[_("responseHeaderPolicy.form.originOverride"),e.jsx(te,{title:_("responseHeaderPolicy.form.originOverrideHelperText"),children:e.jsx($,{component:se,icon:ht,sx:{cursor:"pointer",color:"grey",ml:.5,fontSize:"1.1em"}})})]}),sx:{...i,mr:0}}):null]}),m.value&&m.content?e.jsx($,{sx:{ml:3.7},children:m.content},`${m.name}_content`):null]},m.name))})}As.propTypes={config:T.object,onChange:T.func,disabled:T.bool};function Ps({ref:v=null}){const{t:R}=q.useContext(ue),C=Oe()?.transitions?.duration?.leavingScreen||300,_=ye({mode:"add",show:!1,callback:ce,get dialogTitle(){return this.mode==="edit"?R("responseHeaderPolicy.edit"):this.mode==="view"?R("responseHeaderPolicy.view"):R("responseHeaderPolicy.add")},cors:null,securityHeader:null,enableCORS:!1}),{handleSubmit:j,control:p,setValue:i,reset:m,formState:{errors:f}}=ve({mode:"onChange",defaultValues:{name:"",description:""}}),h=E(()=>{m(),_.mode="add",_.enableCORS=!1,_.cors=null,_.securityHeader=null}),t=E(()=>{_.show=!1,setTimeout(()=>{h()},C)}),l=E((a=ce,u=null)=>{_.callback=a,_.show=!0,u&&(u.id?_.mode="edit":_.mode="view",i("name",u.name),i("description",u.description),_.cors=Jn(u.cors),_.securityHeader=Gn(u.securityHeader),_.enableCORS=!!u.cors)});q.useImperativeHandle(v,()=>({open:l,close:t}),[l,t]);const o=_.mode==="view",r=E(a=>{const u=Kn(_.cors),g=Yn(_.securityHeader),y=Jt({...a,cors:_.enableCORS?JSON.stringify(u):null,securityHeader:JSON.stringify(g)});_.callback(y,t)}),s=E(a=>a?.trim()?!0:R("common.requiredErrorText",{name:R("accessPolicy.form.name")})),c=a=>{_.securityHeader=a},n=a=>{_.cors=a};return e.jsx(ke,{open:_.show,title:_.dialogTitle,onClose:t,PaperProps:{style:{minHeight:"unset",width:900,maxWidth:"100%"}},actions:e.jsx(re,{color:"primary",autoFocus:!0,variant:"contained",onClick:j(r),children:R("common.confirm")}),children:e.jsxs("form",{noValidate:!0,autoComplete:"off",children:[e.jsx(H,{name:"name",control:p,rules:{validate:s},render:({field:a})=>e.jsx(U,{fullWidth:!0,required:!0,size:"small",margin:"dense",disabled:o,placeholder:R("accessPolicy.form.namePlaceholder"),label:R("accessPolicy.form.name"),error:!!f?.name?.message,helperText:f?.name?.message||" ",...a})}),e.jsx(H,{name:"description",control:p,render:({field:a})=>e.jsx(U,{fullWidth:!0,multiline:!0,size:"small",margin:"dense",disabled:o,minRows:3,maxRows:7,placeholder:"Description",label:"Description",helperText:f?.description?.message||" ",...a})}),e.jsx(ut,{title:"Cross-origin resource sharing (CORS)",value:_.enableCORS,onChange:a=>{o||(_.enableCORS=a)},showExpand:!1,actions:e.jsx(pe,{size:"small",disabled:o,checked:_.enableCORS}),children:e.jsx(Cs,{config:_.cors,onChange:n,disabled:o})}),e.jsx("br",{}),e.jsx(ut,{title:"Security Headers",children:e.jsx(As,{config:_.securityHeader,onChange:c,disabled:o})})]})})}Ps.propTypes={ref:T.any};function ti(){const{t:v,locale:R}=oe(),{blocklet:O}=le(),{api:C}=ne(),_=O?.meta?.did,j=q.useRef(null),p=q.useRef(null),{confirmApi:i,confirmHolder:m}=Ze(),f=()=>{},h=Be(async()=>{const{responseHeaderPolicies:u}=await C.getBlockletResponseHeaderPolicies({input:{did:_}});return He(u.map(g=>Xn(g)),g=>g.isProtected?1:0)}),t=h.data||[],l=E(()=>{j.current.open((u,g)=>{me(async()=>{await C.addBlockletResponseHeaderPolicy({input:{did:_,data:u}}),Z.success(v("common.succeeded")),h.run(),g()})})}),o=E(u=>{j.current.open((g,y)=>{y()},Ce(u,["id"]))}),r=E(u=>{j.current.open((g,y)=>{me(async()=>{await C.updateBlockletResponseHeaderPolicy({input:{did:_,data:{...g,id:u.id}}}),Z.success(v("common.succeeded")),h.run(),y()})},u)}),s=E(u=>{i.open({title:v("responseHeaderPolicy.delete.title"),content:v("responseHeaderPolicy.delete.description"),confirmButtonText:v("common.confirm"),confirmButtonProps:{color:"error"},cancelButtonText:v("common.cancel"),onConfirm(g){me(async()=>{await C.deleteBlockletResponseHeaderPolicy({input:{did:_,id:u.id}}),Z.success(v("common.succeeded")),h.run(),g()})}})}),c={sort:!1,download:!1,filter:!1,print:!1,search:!1,viewColumns:!1,expandableRowsOnClick:!0,searchDebounceTime:600,onRowClick(u,{dataIndex:g},y){if(p.current?.contains(y.target)){const k=t[g];o(k)}}},n=[e.jsx(ee,{size:"small",variant:"outlined",onClick:()=>{h.run()},sx:{mr:1},children:v("common.refresh")},"refresh"),e.jsx(ee,{size:"small",variant:"contained",onClick:l,children:v("common.add")},"add")],a=[{label:v("common.name"),name:"name",options:{customBodyRenderLite(u){const g=t[u],y=g.isProtected?e.jsx(te,{title:"Built-in policy, can't edit",children:e.jsx($,{component:se,icon:Kt,sx:{fontSize:16}})}):null;return e.jsxs($,{sx:{display:"flex",alignItems:"center",gap:.5},children:[y," ",g.name]})}}},{label:v("common.description"),name:"description"},{label:v("common.actions"),name:"",width:100,align:"center",verticalKeyAlign:"center",options:{customBodyRenderLite(u){const g=t[u];return e.jsxs($,{sx:{display:"flex",alignItems:"center",gap:0},onClick:y=>y.stopPropagation(),children:[g.isProtected?e.jsx(te,{title:v("common.view"),children:e.jsx(ae,{size:"small",onClick:()=>{o(g,u)},children:e.jsx(se,{icon:js,fontSize:18})})}):null,g.isProtected?null:e.jsx(te,{title:v("common.edit"),children:e.jsx(ae,{size:"small",onClick:()=>{r(g,u)},color:"success",children:e.jsx(se,{icon:wt,fontSize:18})})}),g.isProtected?null:e.jsx(te,{title:v("common.delete"),children:e.jsx(ae,{size:"small",onClick:()=>{s(g,u)},color:"error",children:e.jsx(se,{icon:_t,fontSize:18})})})]})}}}].filter(Boolean);return e.jsxs($,{sx:{display:"flex",flexDirection:"column",gap:2},ref:p,children:[e.jsx(Ue,{verticalKeyWidth:100,locale:R,title:v("responseHeaderPolicy.title"),data:t,columns:a,customButtons:n,options:c,loading:h.loading,onChange:f}),e.jsx(Ps,{ref:j}),m]})}const Ts=({tabs:v,blocklet:R,ancestors:O=[],depth:C=1,t:_})=>{const j=[...O.map(i=>i.meta.did),R.meta.did].join("/"),p=!O?.length;v.push({label:e.jsxs($,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",pl:Math.max(1,C-1)*2},children:[p?e.jsx(yr,{size:24,blocklet:R,style:{borderRadius:0}}):e.jsx(xr,{size:24,blocklet:R,ancestors:O,style:{borderRadius:0}}),e.jsx($,{sx:{ml:2},children:e.jsx($,{sx:{color:"text.primary"},children:p?_("blocklet.component.container"):Zt.getDisplayName(R,!0)})})]},j),value:j}),R.children.length>0&&R.children.forEach(i=>{Ts({tabs:v,blocklet:i,ancestors:[...O,R],depth:C+1,t:_})})};function si({blocklet:v,onUpdate:R=()=>{},...O}){const{t:C}=oe(),_=ye({expandPref:!0,expandSecurity:!0}),[j,p]=mr(),i=j.get("tab")||"general",m=ss(),[f,h]=q.useState(!1),t=[];t.push({label:e.jsxs($,{"data-cy":"configuration-tab-general",sx:{display:"flex",alignItems:"center"},children:[e.jsx(Yr,{sx:{fontSize:24}}),e.jsx($,{sx:{ml:2,color:"text.primary"},children:C("common.general")})]},"general"),value:"general"}),t.push({label:e.jsxs($,{"data-cy":"configuration-tab-security-group",sx:{display:"flex",alignItems:"center"},children:[e.jsx($,{sx:{ml:-2,transform:"translateY(2px)"},children:_.expandSecurity?e.jsx(Ot,{fontSize:"inherit"}):e.jsx($t,{fontSize:"inherit"})}),e.jsx(ct,{sx:{fontSize:24}}),e.jsx($,{sx:{ml:2,color:"text.primary"},children:C("common.security")})]},"securityGroup"),value:"securityGroup"}),_.expandSecurity&&(t.push({label:e.jsxs($,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",pl:2},children:[e.jsx(ct,{sx:{fontSize:24}}),e.jsx($,{sx:{ml:2,color:"text.primary"},children:C("securityRule.title")})]},"security"),value:"security"}),t.push({label:e.jsxs($,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",pl:2},children:[e.jsx(Ur,{sx:{fontSize:24}}),e.jsx($,{sx:{ml:2,color:"text.primary"},children:C("accessPolicy.title")})]},"accessPolicy"),value:"accessPolicy"}),t.push({label:e.jsxs($,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",pl:2},children:[e.jsx(se,{fontSize:24,style:{flexShrink:0},icon:rn}),e.jsx($,{sx:{ml:2,color:"text.primary"},children:C("responseHeaderPolicy.title")})]},"responseHeaderPolicy"),value:"responseHeaderPolicy"})),t.push({label:e.jsxs($,{sx:{display:"flex",alignItems:"center"},"data-cy":"configuration-tab-authentication",children:[e.jsx(Kr,{sx:{fontSize:24}}),e.jsx($,{sx:{ml:2,color:"text.primary"},children:C("common.login")})]},"authentication"),value:"authentication"}),t.push({label:e.jsxs($,{"data-cy":"configuration-tab-notification",sx:{display:"flex",alignItems:"center"},children:[e.jsx(Gr,{sx:{fontSize:24}}),e.jsx($,{sx:{ml:2,color:"text.primary"},children:C("common.notification")})]},"notification"),value:"notification"}),t.push({label:e.jsxs($,{"data-cy":"configuration-tab-preference",sx:{display:"flex",alignItems:"center"},children:[e.jsx($,{sx:{ml:-2,transform:"translateY(2px)"},children:_.expandPref?e.jsx(Ot,{fontSize:"inherit"}):e.jsx($t,{fontSize:"inherit"})}),e.jsx(jr,{sx:{fontSize:24}}),e.jsx($,{sx:{ml:2,color:"text.primary"},children:C("common.preferences")})]},"preference"),value:"preference"});const l=t.find(c=>c.value===i);_.expandPref&&Ts({tabs:t,blocklet:v,t:C});const o=c=>{c==="preference"?_.expandPref=!_.expandPref:c==="securityGroup"?_.expandSecurity=!_.expandSecurity:p(n=>(c==="general"?n.delete("tab"):n.set("tab",c),n)),h(!1)};let r=null;i==="general"?r=e.jsx(Sn,{blocklet:v,onUpdate:R}):i==="security"?r=e.jsx(Un,{}):i==="accessPolicy"?r=e.jsx(Qn,{}):i==="responseHeaderPolicy"?r=e.jsx(ti,{}):i==="authentication"?r=e.jsx(xs,{}):i==="notification"?r=e.jsx(Ir,{}):r=e.jsx(_r,{id:i});const s=q.useMemo(()=>({position:"relative",minHeight:"66vh",height:"100%",overflow:"hidden"}),[]);return e.jsxs(ri,{...O,children:[m&&e.jsxs(e.Fragment,{children:[e.jsxs($,{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(ae,{onClick:()=>h(!0),sx:{mr:1},children:e.jsx(pr,{})}),e.jsx($,{children:l?.label})]}),e.jsx(gr,{anchor:"left",open:f,onClose:()=>h(!1),slotProps:{paper:{sx:{width:260,".MuiTab-root":{textAlign:"left",alignItems:"flex-start",fontWeight:"normal"}}}},children:e.jsx(Fe,{tabs:t,current:i,orientation:"vertical",onChange:o,sx:{borderRight:1,height:"100%",borderColor:"divider"}})})]}),e.jsxs(Ke,{container:!0,spacing:4,columns:24,children:[!m&&e.jsx(Ke,{size:{xs:24,sm:7,md:5},children:e.jsx(Fe,{tabs:t,current:i,orientation:"vertical",onChange:o,sx:{borderRight:1,height:"100%",borderColor:"divider"}})}),e.jsx(Ke,{size:{xs:24,sm:17,md:19},children:e.jsx($,{style:s,children:r})})]})]})}si.propTypes={blocklet:T.object.isRequired,onUpdate:T.func};const ri=xe.div`
142
+ `).filter(O=>O)},maxAge:v.maxAge,optionsSuccessStatus:v.optionsSuccessStatus,preflightContinue:v.preflightContinue,credentials:v.credentials}:void 0,Gn=v=>v instanceof Object?{contentSecurityPolicy:v.contentSecurityPolicy,referrerPolicy:v.referrerPolicy,xFrameOptions:v.xFrameOptions,xPoweredBy:v.xPoweredBy,xXssProtection:v.xXssProtection}:void 0,Yn=v=>v instanceof Object?{contentSecurityPolicy:v.contentSecurityPolicy,referrerPolicy:v.referrerPolicy,xFrameOptions:v.xFrameOptions,xPoweredBy:v.xPoweredBy,xXssProtection:v.xXssProtection}:void 0,Xn=v=>{const R=Jt(v);if(v.securityHeader)try{R.securityHeader=JSON.parse(v.securityHeader)}catch{R.securityHeader=null}if(v.cors)try{R.cors=JSON.parse(v.cors)}catch{R.cors=null}return R};function Ss({ref:v=null}){const{t:R}=q.useContext(ue),{roles:O}=Ve(),_=Oe()?.transitions?.duration?.leavingScreen||300,j=ye({mode:"add",show:!1,callback:ce,get dialogTitle(){return this.mode==="edit"?R("accessPolicy.edit"):this.mode==="view"?R("accessPolicy.view"):R("accessPolicy.add")}}),{handleSubmit:p,control:a,watch:m,setValue:f,reset:h,formState:{errors:t}}=ve({mode:"onChange",defaultValues:{name:"",description:"",roles:null,whoCanAccess:"all"}}),l=E(()=>{h(),j.mode="add"}),o=E(()=>{j.show=!1,setTimeout(()=>{l()},_)}),r=E((y=ce,k=null)=>{if(j.callback=y,j.show=!0,k){k.id?j.mode="edit":j.mode="view";const w=ks(k);f("name",w.name),f("description",w.description),f("roles",w.roles),f("whoCanAccess",w.whoCanAccess)}});q.useImperativeHandle(v,()=>({open:r,close:o}),[r,o]);const s=E(y=>{j.callback(Wn(y),o)}),c=E(y=>y?.trim()?!0:R("common.requiredErrorText",{name:R("accessPolicy.form.name")})),n=m("whoCanAccess"),i=j.mode==="view",u=E(y=>["roles","roles_reverse"].includes(n)&&(!y||y?.length===0)?R("common.requiredErrorText",{name:R("accessPolicy.form.roles")}):!0),g=E(y=>y?.trim()?!0:R("common.requiredErrorText",{name:R("accessPolicy.form.accessType")}));return e.jsx(ke,{open:j.show,title:j.dialogTitle,onClose:o,PaperProps:{style:{minHeight:"unset"}},actions:e.jsx(re,{color:"primary",autoFocus:!0,variant:"contained",onClick:p(s),children:R("common.confirm")}),children:e.jsxs("form",{noValidate:!0,autoComplete:"off",children:[e.jsx(H,{name:"name",control:a,rules:{validate:c},render:({field:y})=>e.jsx(U,{fullWidth:!0,required:!0,margin:"dense",size:"small",disabled:i,placeholder:R("accessPolicy.form.namePlaceholder"),label:R("accessPolicy.form.name"),error:!!t?.name?.message,helperText:t?.name?.message||" ",...y})}),e.jsx(H,{name:"whoCanAccess",control:a,rules:{validate:g},render:({field:y})=>e.jsx(ws,{required:!0,size:"small",margin:"dense",disabled:i,error:!!t?.whoCanAccess?.message,helperText:t?.whoCanAccess?.message||" ",...y})}),["roles","roles_reverse"].includes(n)?e.jsx(H,{name:"roles",rules:{validate:u},control:a,render:({field:y})=>e.jsxs(Q,{variant:"standard",error:!!t?.roles?.message,children:[e.jsx(Ne,{sx:{display:"flex",flexDirection:"row",mt:-3},children:O.map(k=>e.jsx(X,{control:e.jsx(Te,{disabled:i,size:"small",checked:y.value?.includes(k.name),sx:{p:.75},onChange:(w,d)=>{const x=y.value||[];d?y.onChange([...x,k.name]):y.onChange(x.filter(b=>b!==k.name))}}),label:k.title},k.name))}),e.jsx(zt,{sx:{transform:"translateY(-8px)"},children:t?.roles?.message||" "})]})}):null,e.jsx(H,{name:"description",control:a,render:({field:y})=>e.jsx(U,{fullWidth:!0,multiline:!0,disabled:i,minRows:3,maxRows:7,margin:"dense",size:"small",placeholder:R("accessPolicy.form.descriptionPlaceholder"),label:R("accessPolicy.form.description"),helperText:t?.message,...y})})]})})}Ss.propTypes={ref:T.any};function Qn(){const{t:v,locale:R}=oe(),{blocklet:O}=le(),{api:C}=ne(),{roles:_}=Ve(),j=O?.meta?.did,p=q.useRef(null),a=q.useRef(null),{confirmApi:m,confirmHolder:f}=Ze(),h=()=>{},t=Be(async()=>{const{accessPolicies:g}=await C.getBlockletAccessPolicies({input:{did:j}});return He(g,y=>y.isProtected?1:0)}),l=t.data||[],o=E(()=>{a.current.open((g,y)=>{me(async()=>{await C.addBlockletAccessPolicy({input:{did:j,data:g}}),Z.success(v("common.succeeded")),t.run(),y()})})}),r=E(g=>{a.current.open((y,k)=>{me(async()=>{await C.updateBlockletAccessPolicy({input:{did:j,data:{...y,id:g.id}}}),Z.success(v("common.succeeded")),t.run(),k()})},g)}),s=E(g=>{a.current.open((y,k)=>{k()},Ce(g,["id"]))}),c=E(g=>{m.open({title:v("accessPolicy.delete.title"),content:v("accessPolicy.delete.description"),confirmButtonText:v("common.confirm"),confirmButtonProps:{color:"error"},cancelButtonText:v("common.cancel"),onConfirm(y){me(async()=>{await C.deleteBlockletAccessPolicy({input:{did:j,id:g.id}}),Z.success(v("common.succeeded")),t.run(),y()})}})}),n={sort:!1,download:!1,filter:!1,print:!1,search:!1,viewColumns:!1,expandableRowsOnClick:!0,searchDebounceTime:600,onRowClick(g,{dataIndex:y},k){if(p.current?.contains(k.target)){const w=l[y];s(w)}}},i=[e.jsx(ee,{size:"small",variant:"outlined",onClick:()=>{t.run()},sx:{mr:1},children:v("common.refresh")},"refresh"),e.jsx(ee,{size:"small",variant:"contained",onClick:o,children:v("common.add")})],u=[{label:v("accessPolicy.form.name"),name:"name",options:{customBodyRenderLite(g){const y=l[g],k=y.isProtected?e.jsx(te,{title:"Built-in policy, can't edit",children:e.jsx($,{component:se,icon:Kt,sx:{fontSize:16}})}):null;return e.jsxs($,{sx:{display:"flex",alignItems:"center",gap:.5},children:[k," ",y.name]})}}},{label:v("accessPolicy.form.roles"),name:"roles",options:{customBodyRenderLite(g){const y=l[g],k=ks(y);if([J.WHO_CAN_ACCESS.ALL,J.WHO_CAN_ACCESS.INVITED].includes(k.whoCanAccess)){const d=_s.find(x=>x.value===k.whoCanAccess);return d.title?.[R]||d.title?.en}const w=_.filter(d=>y.reverse?!k.roles?.includes(d.name):k.roles?.includes(d.name));return e.jsx($,{sx:{display:"flex",gap:1,flexWrap:"wrap"},children:w.map(d=>e.jsx(te,{title:d.description,children:e.jsx(ft,{size:"small",label:d.title},d.name)}))})}}},{label:v("accessPolicy.form.description"),name:"description"},{label:v("common.actions"),name:"",width:100,align:"center",verticalKeyAlign:"center",options:{customBodyRenderLite(g){const y=l[g];return e.jsxs($,{sx:{display:"flex",alignItems:"center",gap:0},onClick:k=>k.stopPropagation(),children:[y.isProtected?e.jsx(te,{title:v("common.view"),children:e.jsx(ie,{size:"small",onClick:()=>{s(y,g)},children:e.jsx(se,{icon:js,fontSize:18})})}):null,y.isProtected?null:e.jsx(te,{title:v("common.edit"),children:e.jsx(ie,{size:"small",onClick:()=>{r(y,g)},color:"success",children:e.jsx(se,{icon:wt,fontSize:18})})}),y.isProtected?null:e.jsx(te,{title:v("common.delete"),children:e.jsx(ie,{size:"small",onClick:()=>{c(y,g)},color:"error",children:e.jsx(se,{icon:_t,fontSize:18})})})]})}}}].filter(Boolean);return e.jsxs($,{sx:{display:"flex",flexDirection:"column",gap:2},ref:p,children:[e.jsx(Ue,{verticalKeyWidth:100,locale:R,title:v("accessPolicy.title"),data:l,columns:u,customButtons:i,options:n,loading:t.loading,onChange:h}),e.jsx(Ss,{ref:a}),f]})}const ea={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 ut({title:v,actions:R,children:O=null,defaultValue:C=!0,value:_,onChange:j,showExpand:p=!0}){const a=!we(_),m=ye({open:C}),f=ge(()=>a?_:m.open,[_,a,m.open]),h=E(()=>{a?j(!f):m.open=!m.open});return e.jsxs(Ht,{variant:"outlined",children:[e.jsxs($,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",px:2,py:1,backgroundColor:"grey.50"},onClick:h,children:[e.jsx($,{sx:{fontWeight:"bold"},children:v}),e.jsxs($,{sx:{display:"flex",alignItems:"center"},children:[R,p?e.jsx($,{component:se,icon:ea,sx:{transform:f?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease",fontSize:"2rem"}}):null]})]}),e.jsx(fr,{in:f,children:e.jsx(Nr,{children:O})})]})}ut.propTypes={title:T.string.isRequired,defaultValue:T.bool,value:T.bool,actions:T.node,children:T.node,onChange:T.func,showExpand:T.bool};const ht={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 Cs({config:v={},onChange:R=()=>{},disabled:O=!1}){const C=["GET","HEAD","POST","PUT","DELETE","OPTIONS","PATCH"],_={origin:{override:!1,value:"*",smart:!0},methods:{override:!1,value:[...C]},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(v,we)},{t:j}=oe(),p=(f,{override:h,value:t,smart:l})=>{const o={..._?.[f]};!we(l)&&f==="origin"&&(o.smart=l),we(h)||(o.override=h),we(t)||(o.value=t),R({..._,[f]:o})},a=[{title:j("responseHeaderPolicy.form.cors.origin"),override:_.origin.override,smart:_.origin.smart,name:"origin",required:!0,value:_.origin.value,content:e.jsx(Q,{fullWidth:!0,sx:{mt:.75,"& .MuiFormHelperText-root":{mx:0}},children:e.jsx(U,{multiline:!0,minRows:4,maxRows:10,disabled:O,variant:"outlined",size:"small",placeholder:j("responseHeaderPolicy.form.cors.originPlaceholder"),helperText:j("responseHeaderPolicy.form.cors.originHelperText"),value:_.origin.value,onChange:f=>{p("origin",{value:f.target.value})}})})},{title:j("responseHeaderPolicy.form.cors.methods"),name:"methods",override:_.methods.override,required:!0,value:_.methods.value,content:e.jsx(Ne,{sx:{flexDirection:"row"},children:C.map(f=>e.jsx(X,{control:e.jsx(Te,{size:"small",disabled:O,checked:_.methods.value.includes(f),onChange:(h,t)=>{p("methods",{value:t?[..._.methods.value,f]:_.methods.value.filter(l=>l!==f)})}}),label:f},f))})},{title:j("responseHeaderPolicy.form.cors.allowedHeaders"),override:_.allowedHeaders.override,name:"allowedHeaders",value:_.allowedHeaders.value,content:e.jsx(Q,{fullWidth:!0,sx:{mt:.75,"& .MuiFormHelperText-root":{mx:0}},children:e.jsx(U,{multiline:!0,minRows:3,maxRows:7,disabled:O,variant:"outlined",size:"small",placeholder:j("responseHeaderPolicy.form.cors.allowedHeadersPlaceholder"),helperText:j("responseHeaderPolicy.form.cors.allowedHeadersHelperText"),value:_.allowedHeaders.value,onChange:f=>{p("allowedHeaders",{value:f.target.value})}})})},{title:j("responseHeaderPolicy.form.cors.exposedHeaders"),override:_.exposedHeaders.override,name:"exposedHeaders",value:_.exposedHeaders.value,content:e.jsx(Q,{fullWidth:!0,sx:{mt:.75,"& .MuiFormHelperText-root":{mx:0}},children:e.jsx(U,{multiline:!0,minRows:3,maxRows:7,disabled:O,variant:"outlined",size:"small",placeholder:j("responseHeaderPolicy.form.cors.exposedHeadersPlaceholder"),helperText:j("responseHeaderPolicy.form.cors.exposedHeadersHelperText"),value:_.exposedHeaders.value,onChange:f=>{p("exposedHeaders",{value:f.target.value})}})})},{title:j("responseHeaderPolicy.form.cors.maxAge"),override:_.maxAge.override,name:"maxAge",value:_.maxAge.value,content:e.jsx(Q,{fullWidth:!0,sx:{mt:.75,"& .MuiFormHelperText-root":{mx:0}},children:e.jsx(U,{type:"number",variant:"outlined",size:"small",disabled:O,value:_.maxAge.value,onChange:f=>{p("maxAge",{value:f.target.value})},helperText:j("responseHeaderPolicy.form.cors.maxAgeHelperText")})})},{title:j("responseHeaderPolicy.form.cors.optionsSuccessStatus"),override:_.optionsSuccessStatus.override,name:"optionsSuccessStatus",value:_.optionsSuccessStatus.value,content:e.jsx(Q,{fullWidth:!0,sx:{mt:.75,"& .MuiFormHelperText-root":{mx:0}},children:e.jsx(U,{type:"number",variant:"outlined",size:"small",disabled:O,value:_.optionsSuccessStatus.value,onChange:f=>{p("optionsSuccessStatus",{value:f.target.value})}})})},{title:j("responseHeaderPolicy.form.cors.preflightContinue"),override:_.preflightContinue.override,name:"preflightContinue",value:_.preflightContinue.value,control:e.jsx(pe,{size:"small",disabled:O,checked:_.preflightContinue.value,onChange:(f,h)=>{p("preflightContinue",{value:h})}})},{title:j("responseHeaderPolicy.form.cors.credentials"),override:_.credentials.override,name:"credentials",value:_.credentials.value,control:e.jsx(pe,{size:"small",disabled:O,checked:_.credentials.value,onChange:(f,h)=>{p("credentials",{value:h})}})}];Yt(()=>{R(_)});const m={".PrivateSwitchBase-input+svg":{fontSize:"1rem"},".MuiCheckbox-sizeSmall":{p:.75},".MuiFormControlLabel-label":{fontSize:"0.8rem"}};return e.jsx(Ne,{children:a.map((f,h)=>e.jsxs(q.Fragment,{children:[e.jsxs($,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[e.jsx(X,{sx:{mt:h===0?0:1},control:f.control||e.jsx($,{sx:{pl:1.35}}),label:f.title,required:f.required},`${f.name}_form`),e.jsxs($,{children:[f.name==="origin"?e.jsx(X,{control:e.jsx(Te,{size:"small",checked:f.smart,color:"primary",disabled:O,onChange:()=>{p(f.name,{smart:!f.smart})}}),label:e.jsxs(e.Fragment,{children:[j("responseHeaderPolicy.form.cors.smartMode"),e.jsx(te,{title:j("responseHeaderPolicy.form.cors.smartModeHelperText"),children:e.jsx($,{component:se,icon:ht,sx:{cursor:"pointer",color:"grey",ml:.5,fontSize:"1.1em"}})})]}),sx:m},`${f.name}_smart`):null,e.jsx(X,{control:e.jsx(Te,{size:"small",checked:f.override,color:"warning",disabled:O,onChange:()=>{p(f.name,{override:!f.override})}}),label:e.jsxs(e.Fragment,{children:[j("responseHeaderPolicy.form.originOverride"),e.jsx(te,{title:j("responseHeaderPolicy.form.originOverrideHelperText"),children:e.jsx($,{component:se,icon:ht,sx:{cursor:"pointer",color:"grey",ml:.5,fontSize:"1.1em"}})})]}),sx:{...m,mr:0}},`${f.name}_override`)]})]}),f.content?e.jsx($,{sx:{ml:3.5},children:f.content},`${f.name}_content`):null]},f.name))})}Cs.propTypes={config:T.object,onChange:T.func,disabled:T.bool};function Rs({value:v,onChange:R=()=>{},disabled:O=!1}){const C="sameorigin",_=[{label:"DENY",value:"deny"},{label:"SAMEORIGIN (default)",value:"sameorigin"}],j=p=>{R({action:p.target.value})};return q.useEffect(()=>{v===!0&&R({action:C})},[v]),e.jsx($,{children:e.jsx(Q,{children:e.jsx(es,{row:!0,children:_.map(p=>e.jsx(X,{value:p.value,control:e.jsx(ts,{size:"small",disabled:O,checked:p.value===v?.action,onChange:j,sx:{p:.75}}),label:p.label},p.value))})})})}Rs.propTypes={value:T.oneOfType([T.string,T.bool]).isRequired,onChange:T.func,disabled:T.bool};function Os({value:v,onChange:R=()=>{},disabled:O=!1}){const C="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"}],j=p=>{R({policy:p.target.value})};return q.useEffect(()=>{v===!0&&R({policy:C})},[v]),e.jsx($,{children:e.jsx(Q,{children:e.jsx(es,{children:_.map(p=>e.jsx(X,{value:p.value,control:e.jsx(ts,{size:"small",disabled:O,checked:p.value===v?.policy,onChange:j,sx:{p:.75}}),label:p.label},p.value))})})})}Os.propTypes={value:T.oneOfType([T.string,T.bool]).isRequired,onChange:T.func,disabled:T.func};function $s({value:v,onChange:R=()=>{},disabled:O=!1}){const C={"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(h=>[h,f[h].filter(Boolean).join(" ")].filter(Boolean).join(" ")).filter(Boolean).join(`
143
+ `)}const j=_(v?.directives||C),[p,a]=q.useState(j),m=f=>{a(f.target.value);const h=f.target.value.split(`
144
+ `).reduce((t,l)=>{const[o,...r]=l.split(" ");return t[o]=r.filter(s=>s!==""),t},{});R({useDefaults:!1,directives:h})};return q.useEffect(()=>{v===!0&&(R({useDefaults:!1,directives:C}),a(_(C)))},[v]),e.jsx($,{sx:{mt:1},children:e.jsx(Q,{fullWidth:!0,children:e.jsx(U,{fullWidth:!0,multiline:!0,disabled:O,rows:12,size:"small",value:p,onChange:m})})})}$s.propTypes={value:T.oneOfType([T.object,T.bool]).isRequired,onChange:T.func,disabled:T.bool};function As({config:v={},onChange:R=()=>{},disabled:O=!1}){const C={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(v,we)},{t:_}=oe(),j=(m,{override:f,value:h})=>{const t={...C?.[m]};we(f)||(t.override=f),we(h)||(t.value=h),R({...C,[m]:t})},p=[{title:"Content-Security-Policy",name:"contentSecurityPolicy",override:C.contentSecurityPolicy.override,value:!!C.contentSecurityPolicy.value,content:e.jsx($s,{disabled:O,value:C.contentSecurityPolicy.value,onChange:m=>{j("contentSecurityPolicy",{value:m})}}),onChange(m){j("contentSecurityPolicy",{value:m})}},{title:"Referrer-Policy",name:"referrerPolicy",override:C.referrerPolicy.override,value:!!C.referrerPolicy.value,content:e.jsx(Os,{disabled:O,value:C.referrerPolicy.value,onChange:m=>{j("referrerPolicy",{value:m})}}),onChange(m){j("referrerPolicy",{value:m})}},{title:"X-Frame-Options",name:"xFrameOptions",override:C.xFrameOptions.override,value:!!C.xFrameOptions.value,content:e.jsx(Rs,{disabled:O,value:C.xFrameOptions.value,onChange:m=>{j("xFrameOptions",{value:m})}}),onChange(m){j("xFrameOptions",{value:m})}},{title:"Disable X-Powered-By",name:"xPoweredBy",override:C.xPoweredBy.override,value:C.xPoweredBy.value,content:null,onChange(m){j("xPoweredBy",{value:m})}},{title:"X-XSS-Protection",name:"xXssProtection",override:C.xXssProtection.override,value:C.xXssProtection.value,content:null,onChange(m){j("xXssProtection",{value:m})}}];Yt(()=>{R(C)});const a={".PrivateSwitchBase-input+svg":{fontSize:"1rem"},".MuiCheckbox-sizeSmall":{p:.75},".MuiFormControlLabel-label":{fontSize:"0.8rem"}};return e.jsx(Ne,{children:p.map((m,f)=>e.jsxs(q.Fragment,{children:[e.jsxs($,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[e.jsx(X,{sx:{mt:f===0?0:1},control:e.jsx(pe,{size:"small",disabled:O,checked:m.value,onChange:()=>{m.onChange(!m.value)}},`${m.name}_switch`),label:m.title},`${m.name}_form`),m.value?e.jsx(X,{control:e.jsx(Te,{size:"small",checked:m.override,color:"warning",disabled:O,onChange:()=>{j(m.name,{override:!m.override})}}),label:e.jsxs(e.Fragment,{children:[_("responseHeaderPolicy.form.originOverride"),e.jsx(te,{title:_("responseHeaderPolicy.form.originOverrideHelperText"),children:e.jsx($,{component:se,icon:ht,sx:{cursor:"pointer",color:"grey",ml:.5,fontSize:"1.1em"}})})]}),sx:{...a,mr:0}}):null]}),m.value&&m.content?e.jsx($,{sx:{ml:3.7},children:m.content},`${m.name}_content`):null]},m.name))})}As.propTypes={config:T.object,onChange:T.func,disabled:T.bool};function Ps({ref:v=null}){const{t:R}=q.useContext(ue),C=Oe()?.transitions?.duration?.leavingScreen||300,_=ye({mode:"add",show:!1,callback:ce,get dialogTitle(){return this.mode==="edit"?R("responseHeaderPolicy.edit"):this.mode==="view"?R("responseHeaderPolicy.view"):R("responseHeaderPolicy.add")},cors:null,securityHeader:null,enableCORS:!1}),{handleSubmit:j,control:p,setValue:a,reset:m,formState:{errors:f}}=ve({mode:"onChange",defaultValues:{name:"",description:""}}),h=E(()=>{m(),_.mode="add",_.enableCORS=!1,_.cors=null,_.securityHeader=null}),t=E(()=>{_.show=!1,setTimeout(()=>{h()},C)}),l=E((i=ce,u=null)=>{_.callback=i,_.show=!0,u&&(u.id?_.mode="edit":_.mode="view",a("name",u.name),a("description",u.description),_.cors=Jn(u.cors),_.securityHeader=Gn(u.securityHeader),_.enableCORS=!!u.cors)});q.useImperativeHandle(v,()=>({open:l,close:t}),[l,t]);const o=_.mode==="view",r=E(i=>{const u=Kn(_.cors),g=Yn(_.securityHeader),y=Jt({...i,cors:_.enableCORS?JSON.stringify(u):null,securityHeader:JSON.stringify(g)});_.callback(y,t)}),s=E(i=>i?.trim()?!0:R("common.requiredErrorText",{name:R("accessPolicy.form.name")})),c=i=>{_.securityHeader=i},n=i=>{_.cors=i};return e.jsx(ke,{open:_.show,title:_.dialogTitle,onClose:t,PaperProps:{style:{minHeight:"unset",width:900,maxWidth:"100%"}},actions:e.jsx(re,{color:"primary",autoFocus:!0,variant:"contained",onClick:j(r),children:R("common.confirm")}),children:e.jsxs("form",{noValidate:!0,autoComplete:"off",children:[e.jsx(H,{name:"name",control:p,rules:{validate:s},render:({field:i})=>e.jsx(U,{fullWidth:!0,required:!0,size:"small",margin:"dense",disabled:o,placeholder:R("accessPolicy.form.namePlaceholder"),label:R("accessPolicy.form.name"),error:!!f?.name?.message,helperText:f?.name?.message||" ",...i})}),e.jsx(H,{name:"description",control:p,render:({field:i})=>e.jsx(U,{fullWidth:!0,multiline:!0,size:"small",margin:"dense",disabled:o,minRows:3,maxRows:7,placeholder:"Description",label:"Description",helperText:f?.description?.message||" ",...i})}),e.jsx(ut,{title:"Cross-origin resource sharing (CORS)",value:_.enableCORS,onChange:i=>{o||(_.enableCORS=i)},showExpand:!1,actions:e.jsx(pe,{size:"small",disabled:o,checked:_.enableCORS}),children:e.jsx(Cs,{config:_.cors,onChange:n,disabled:o})}),e.jsx("br",{}),e.jsx(ut,{title:"Security Headers",children:e.jsx(As,{config:_.securityHeader,onChange:c,disabled:o})})]})})}Ps.propTypes={ref:T.any};function ta(){const{t:v,locale:R}=oe(),{blocklet:O}=le(),{api:C}=ne(),_=O?.meta?.did,j=q.useRef(null),p=q.useRef(null),{confirmApi:a,confirmHolder:m}=Ze(),f=()=>{},h=Be(async()=>{const{responseHeaderPolicies:u}=await C.getBlockletResponseHeaderPolicies({input:{did:_}});return He(u.map(g=>Xn(g)),g=>g.isProtected?1:0)}),t=h.data||[],l=E(()=>{j.current.open((u,g)=>{me(async()=>{await C.addBlockletResponseHeaderPolicy({input:{did:_,data:u}}),Z.success(v("common.succeeded")),h.run(),g()})})}),o=E(u=>{j.current.open((g,y)=>{y()},Ce(u,["id"]))}),r=E(u=>{j.current.open((g,y)=>{me(async()=>{await C.updateBlockletResponseHeaderPolicy({input:{did:_,data:{...g,id:u.id}}}),Z.success(v("common.succeeded")),h.run(),y()})},u)}),s=E(u=>{a.open({title:v("responseHeaderPolicy.delete.title"),content:v("responseHeaderPolicy.delete.description"),confirmButtonText:v("common.confirm"),confirmButtonProps:{color:"error"},cancelButtonText:v("common.cancel"),onConfirm(g){me(async()=>{await C.deleteBlockletResponseHeaderPolicy({input:{did:_,id:u.id}}),Z.success(v("common.succeeded")),h.run(),g()})}})}),c={sort:!1,download:!1,filter:!1,print:!1,search:!1,viewColumns:!1,expandableRowsOnClick:!0,searchDebounceTime:600,onRowClick(u,{dataIndex:g},y){if(p.current?.contains(y.target)){const k=t[g];o(k)}}},n=[e.jsx(ee,{size:"small",variant:"outlined",onClick:()=>{h.run()},sx:{mr:1},children:v("common.refresh")},"refresh"),e.jsx(ee,{size:"small",variant:"contained",onClick:l,children:v("common.add")},"add")],i=[{label:v("common.name"),name:"name",options:{customBodyRenderLite(u){const g=t[u],y=g.isProtected?e.jsx(te,{title:"Built-in policy, can't edit",children:e.jsx($,{component:se,icon:Kt,sx:{fontSize:16}})}):null;return e.jsxs($,{sx:{display:"flex",alignItems:"center",gap:.5},children:[y," ",g.name]})}}},{label:v("common.description"),name:"description"},{label:v("common.actions"),name:"",width:100,align:"center",verticalKeyAlign:"center",options:{customBodyRenderLite(u){const g=t[u];return e.jsxs($,{sx:{display:"flex",alignItems:"center",gap:0},onClick:y=>y.stopPropagation(),children:[g.isProtected?e.jsx(te,{title:v("common.view"),children:e.jsx(ie,{size:"small",onClick:()=>{o(g,u)},children:e.jsx(se,{icon:js,fontSize:18})})}):null,g.isProtected?null:e.jsx(te,{title:v("common.edit"),children:e.jsx(ie,{size:"small",onClick:()=>{r(g,u)},color:"success",children:e.jsx(se,{icon:wt,fontSize:18})})}),g.isProtected?null:e.jsx(te,{title:v("common.delete"),children:e.jsx(ie,{size:"small",onClick:()=>{s(g,u)},color:"error",children:e.jsx(se,{icon:_t,fontSize:18})})})]})}}}].filter(Boolean);return e.jsxs($,{sx:{display:"flex",flexDirection:"column",gap:2},ref:p,children:[e.jsx(Ue,{verticalKeyWidth:100,locale:R,title:v("responseHeaderPolicy.title"),data:t,columns:i,customButtons:n,options:c,loading:h.loading,onChange:f}),e.jsx(Ps,{ref:j}),m]})}const Ts=({tabs:v,blocklet:R,ancestors:O=[],depth:C=1,t:_})=>{const j=[...O.map(a=>a.meta.did),R.meta.did].join("/"),p=!O?.length;v.push({label:e.jsxs($,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",pl:Math.max(1,C-1)*2},children:[p?e.jsx(yr,{size:24,blocklet:R,style:{borderRadius:0}}):e.jsx(xr,{size:24,blocklet:R,ancestors:O,style:{borderRadius:0}}),e.jsx($,{sx:{ml:2},children:e.jsx($,{sx:{color:"text.primary"},children:p?_("blocklet.component.container"):Zt.getDisplayName(R,!0)})})]},j),value:j}),R.children.length>0&&R.children.forEach(a=>{Ts({tabs:v,blocklet:a,ancestors:[...O,R],depth:C+1,t:_})})};function sa({blocklet:v,onUpdate:R=()=>{},...O}){const{t:C}=oe(),_=ye({expandPref:!0,expandSecurity:!0}),[j,p]=mr(),a=j.get("tab")||"general",m=ss(),[f,h]=q.useState(!1),t=[];t.push({label:e.jsxs($,{"data-cy":"configuration-tab-general",sx:{display:"flex",alignItems:"center"},children:[e.jsx(Yr,{sx:{fontSize:24}}),e.jsx($,{sx:{ml:2,color:"text.primary"},children:C("common.general")})]},"general"),value:"general"}),t.push({label:e.jsxs($,{"data-cy":"configuration-tab-security-group",sx:{display:"flex",alignItems:"center"},children:[e.jsx($,{sx:{ml:-2,transform:"translateY(2px)"},children:_.expandSecurity?e.jsx(Ot,{fontSize:"inherit"}):e.jsx($t,{fontSize:"inherit"})}),e.jsx(ct,{sx:{fontSize:24}}),e.jsx($,{sx:{ml:2,color:"text.primary"},children:C("common.security")})]},"securityGroup"),value:"securityGroup"}),_.expandSecurity&&(t.push({label:e.jsxs($,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",pl:2},children:[e.jsx(ct,{sx:{fontSize:24}}),e.jsx($,{sx:{ml:2,color:"text.primary"},children:C("securityRule.title")})]},"security"),value:"security"}),t.push({label:e.jsxs($,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",pl:2},children:[e.jsx(Ur,{sx:{fontSize:24}}),e.jsx($,{sx:{ml:2,color:"text.primary"},children:C("accessPolicy.title")})]},"accessPolicy"),value:"accessPolicy"}),t.push({label:e.jsxs($,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",pl:2},children:[e.jsx(se,{fontSize:24,style:{flexShrink:0},icon:rn}),e.jsx($,{sx:{ml:2,color:"text.primary"},children:C("responseHeaderPolicy.title")})]},"responseHeaderPolicy"),value:"responseHeaderPolicy"})),t.push({label:e.jsxs($,{sx:{display:"flex",alignItems:"center"},"data-cy":"configuration-tab-authentication",children:[e.jsx(Kr,{sx:{fontSize:24}}),e.jsx($,{sx:{ml:2,color:"text.primary"},children:C("common.login")})]},"authentication"),value:"authentication"}),t.push({label:e.jsxs($,{"data-cy":"configuration-tab-notification",sx:{display:"flex",alignItems:"center"},children:[e.jsx(Gr,{sx:{fontSize:24}}),e.jsx($,{sx:{ml:2,color:"text.primary"},children:C("common.notification")})]},"notification"),value:"notification"}),t.push({label:e.jsxs($,{"data-cy":"configuration-tab-preference",sx:{display:"flex",alignItems:"center"},children:[e.jsx($,{sx:{ml:-2,transform:"translateY(2px)"},children:_.expandPref?e.jsx(Ot,{fontSize:"inherit"}):e.jsx($t,{fontSize:"inherit"})}),e.jsx(jr,{sx:{fontSize:24}}),e.jsx($,{sx:{ml:2,color:"text.primary"},children:C("common.preferences")})]},"preference"),value:"preference"});const l=t.find(c=>c.value===a);_.expandPref&&Ts({tabs:t,blocklet:v,t:C});const o=c=>{c==="preference"?_.expandPref=!_.expandPref:c==="securityGroup"?_.expandSecurity=!_.expandSecurity:p(n=>(c==="general"?n.delete("tab"):n.set("tab",c),n)),h(!1)};let r=null;a==="general"?r=e.jsx(Sn,{blocklet:v,onUpdate:R}):a==="security"?r=e.jsx(Un,{}):a==="accessPolicy"?r=e.jsx(Qn,{}):a==="responseHeaderPolicy"?r=e.jsx(ta,{}):a==="authentication"?r=e.jsx(xs,{}):a==="notification"?r=e.jsx(Ir,{}):r=e.jsx(_r,{id:a});const s=q.useMemo(()=>({position:"relative",minHeight:"66vh",height:"100%",overflow:"hidden"}),[]);return e.jsxs(ra,{...O,children:[m&&e.jsxs(e.Fragment,{children:[e.jsxs($,{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(ie,{onClick:()=>h(!0),sx:{mr:1},children:e.jsx(pr,{})}),e.jsx($,{children:l?.label})]}),e.jsx(gr,{anchor:"left",open:f,onClose:()=>h(!1),slotProps:{paper:{sx:{width:260,".MuiTab-root":{textAlign:"left",alignItems:"flex-start",fontWeight:"normal"}}}},children:e.jsx(Fe,{tabs:t,current:a,orientation:"vertical",onChange:o,sx:{borderRight:1,height:"100%",borderColor:"divider"}})})]}),e.jsxs(Ke,{container:!0,spacing:4,columns:24,children:[!m&&e.jsx(Ke,{size:{xs:24,sm:7,md:5},children:e.jsx(Fe,{tabs:t,current:a,orientation:"vertical",onChange:o,sx:{borderRight:1,height:"100%",borderColor:"divider"}})}),e.jsx(Ke,{size:{xs:24,sm:17,md:19},children:e.jsx($,{style:s,children:r})})]})]})}sa.propTypes={blocklet:T.object.isRequired,onUpdate:T.func};const ra=xe.div`
145
145
  .MuiTab-root {
146
146
  text-align: left;
147
147
  align-items: flex-start;
@@ -150,4 +150,4 @@ ${m("blocklet.config.logoDesc",{width:512,height:512,maxSize:5})}`,children:e.js
150
150
  .Mui-selected {
151
151
  font-weight: bold;
152
152
  }
153
- `;export{si as default};
153
+ `;export{sa as default};