@abtnode/webapp 1.16.32-beta-04a5da00 → 1.16.32-beta-0593a408

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 (213) hide show
  1. package/blocklet.js +1 -1
  2. package/blocklet.yml +1 -1
  3. package/dist/assets/{Add-DAhuXmJ1.js → Add-81TWUj7G.js} +1 -1
  4. package/dist/assets/{ArrowDropDown-C-N10Amf.js → ArrowDropDown-W2gnellS.js} +1 -1
  5. package/dist/assets/{Autocomplete-CAASvyWi.js → Autocomplete-DRfXMy8R.js} +1 -1
  6. package/dist/assets/{Breadcrumbs-UBhuabmW.js → Breadcrumbs-BF9t0QkH.js} +1 -1
  7. package/dist/assets/{ButtonGroup-BCRFvUIs.js → ButtonGroup-D47AV17G.js} +1 -1
  8. package/dist/assets/{CheckCircle-B1OfEs-V.js → CheckCircle-lV3-9PUC.js} +1 -1
  9. package/dist/assets/{ChevronLeft-aad23IwV.js → ChevronLeft-AKgxrSNT.js} +1 -1
  10. package/dist/assets/ChevronRight-O02U5LWB.js +1 -0
  11. package/dist/assets/{Close-BVLxGhqf.js → Close-DqDL5IGH.js} +1 -1
  12. package/dist/assets/{Delete-BRWePean.js → Delete-I9FOITt6.js} +1 -1
  13. package/dist/assets/{DeleteOutline-BNzcbICD.js → DeleteOutline--7c4aVEh.js} +1 -1
  14. package/dist/assets/{Done-5TItrtsm.js → Done-DE0Vi7h5.js} +1 -1
  15. package/dist/assets/{Edit-nWZYAw8W.js → Edit-DN51u9dR.js} +1 -1
  16. package/dist/assets/{EditIcon-BDQYGQAE.js → EditIcon-Q92uw68H.js} +1 -1
  17. package/dist/assets/{ExpandMore-Xg-kLmr9.js → ExpandMore-dpwD8Lmx.js} +1 -1
  18. package/dist/assets/{Google-C6UiHFa0.js → Google-D2zJo9bo.js} +3 -3
  19. package/dist/assets/{Https-CgyGFjQZ.js → Https-Cus_KF7e.js} +1 -1
  20. package/dist/assets/InputAdornment-BgFOKd9J.js +1 -0
  21. package/dist/assets/{InputLabel-DS6GLy5V.js → InputLabel-CtuX3xye.js} +1 -1
  22. package/dist/assets/{LastPage-CwzRxQNH.js → LastPage-vVLkX2R1.js} +1 -1
  23. package/dist/assets/{Launch-qR9d30uC.js → Launch-COfgZp_i.js} +1 -1
  24. package/dist/assets/{Link-BI5l28az.js → Link-DjPgPJYq.js} +1 -1
  25. package/dist/assets/{LoadingButton-BfHt3xng.js → LoadingButton-oQ94CQjB.js} +1 -1
  26. package/dist/assets/{LockIcon-DK1BOt7K.js → LockIcon-DvVuvp7X.js} +1 -1
  27. package/dist/assets/{Loop-Dt_-Q4IM.js → Loop-CbgoVN2D.js} +1 -1
  28. package/dist/assets/{MoreHoriz-DcAnQoa0.js → MoreHoriz-D5pKNfuj.js} +1 -1
  29. package/dist/assets/{MoreVert-DIRoN8EP.js → MoreVert-hA4JYyTS.js} +1 -1
  30. package/dist/assets/{Pagination-DtpYqViF.js → Pagination-C3WkpJF7.js} +1 -1
  31. package/dist/assets/{Public-AVxa4I55.js → Public-Bs_mVNKZ.js} +1 -1
  32. package/dist/assets/{SchemaReference.es-VhNWmDRq.js → SchemaReference.es-CXzqh_NZ.js} +1 -1
  33. package/dist/assets/{Search-BkXnaF-1.js → Search-DGfKsHG9.js} +1 -1
  34. package/dist/assets/Select-DZPpYZ0d.js +2 -0
  35. package/dist/assets/{Skeleton-CvnVrBp6.js → Skeleton-BCyCy5SR.js} +3 -3
  36. package/dist/assets/{Slider-C9M3KOKF.js → Slider-B_o7lOai.js} +1 -1
  37. package/dist/assets/{Stepper-BPCzoss2.js → Stepper-BsBYZb8R.js} +1 -1
  38. package/dist/assets/TextField-BsNlIaqS.js +1 -0
  39. package/dist/assets/{ToggleButtonGroup-uTYhFmax.js → ToggleButtonGroup-D-arcvca.js} +1 -1
  40. package/dist/assets/ViewColumn-Cfa2KTUG.js +1 -0
  41. package/dist/assets/{ViewList-BX_F3ewn.js → ViewList-qlPkPfcy.js} +1 -1
  42. package/dist/assets/{actions-DvtkfsBD.js → actions-C9VYlVZQ.js} +2 -2
  43. package/dist/assets/{actions-C-KjbqKb.js → actions-D84M4oE6.js} +1 -1
  44. package/dist/assets/{agreement-BlHdQOu0.js → agreement-DsaxP3q4.js} +1 -1
  45. package/dist/assets/api-n1RgJfYp.js +1 -0
  46. package/dist/assets/{app-avatar-DaU2r4-K.js → app-avatar-y7pLSnm0.js} +1 -1
  47. package/dist/assets/ar-BywPGmOa.js +1 -0
  48. package/dist/assets/{audit-logs-BowEovBa.js → audit-logs-B7rpZVRE.js} +1 -1
  49. package/dist/assets/blocklet-DaPMEa6v.js +1 -0
  50. package/dist/assets/{brace-fold.es-DwwFaaS_.js → brace-fold.es-B9T-AvwE.js} +1 -1
  51. package/dist/assets/{bundle-avatar-DwSCgSDH.js → bundle-avatar-Bu_A2cMf.js} +1 -1
  52. package/dist/assets/{chart-CWyf6SJc.js → chart-d7Hz6F4Y.js} +1 -1
  53. package/dist/assets/{click-to-copy-DLb2KMQf.js → click-to-copy-CeEC05qf.js} +1 -1
  54. package/dist/assets/{closebrackets.es-oyoaS3zK.js → closebrackets.es-D1yT11Rb.js} +1 -1
  55. package/dist/assets/{codemirror.es-g-VpeCS8.js → codemirror.es-B-bTLQrR.js} +1 -1
  56. package/dist/assets/{comment.es-BzEi7FX2.js → comment.es-BDq2v7Vm.js} +1 -1
  57. package/dist/assets/{config-navigation-BXlcxf9z.js → config-navigation-DKZSEBT3.js} +5 -5
  58. package/dist/assets/{de-9vHBMa7b.js → de-qs3PjT55.js} +1 -1
  59. package/dist/assets/{delete-confirm-lfp_3VFJ.js → delete-confirm-TyC4FVPi.js} +1 -1
  60. package/dist/assets/{detail-BCfiAWgS.js → detail-CqXxlDri.js} +3 -3
  61. package/dist/assets/{dialog.es-i4ZxISO3.js → dialog.es-RmaTmDcl.js} +1 -1
  62. package/dist/assets/{download-tPUJmguR.js → download-CxeiDHKn.js} +1 -1
  63. package/dist/assets/es-DXb9xB6c.js +1 -0
  64. package/dist/assets/{foldgutter.es-CAmpFR3u.js → foldgutter.es-BpulhhM9.js} +1 -1
  65. package/dist/assets/{fr-C5fh5fdm.js → fr-CMgZc3LR.js} +1 -1
  66. package/dist/assets/getValidReactChildren-BY1C2s5l.js +1 -0
  67. package/dist/assets/hi-Ch52Lky6.js +1 -0
  68. package/dist/assets/{hint.es-RD7Abd4q.js → hint.es-C4_XIR8M.js} +1 -1
  69. package/dist/assets/{hint.es2-Cdlixz2r.js → hint.es2-_il0iOC6.js} +1 -1
  70. package/dist/assets/id-_x67Rh2B.js +1 -0
  71. package/dist/assets/{iframe-CQaZXCQF.js → iframe-DV2HF1WR.js} +1 -1
  72. package/dist/assets/{index-9rj31wlW.js → index-3aofV6nB.js} +1 -1
  73. package/dist/assets/{index-DHYjjr2A.js → index-45iXmL9s.js} +1 -1
  74. package/dist/assets/{index-BlTu0Z2Q.js → index-99uQGtgn.js} +1 -1
  75. package/dist/assets/{index-DzfRFxAA.js → index-B0Gk-5E6.js} +1 -1
  76. package/dist/assets/{index-Cx9r7Bw-.js → index-BB8Tx0yG.js} +1 -1
  77. package/dist/assets/{index-CuXg_ZaK.js → index-BDMiG6Uz.js} +1 -1
  78. package/dist/assets/{index-DtiWySTZ.js → index-BH_LfNlV.js} +1 -1
  79. package/dist/assets/{index-cJ5JnE9Y.js → index-BIYql5q6.js} +1 -1
  80. package/dist/assets/index-BLGKjj6E.js +168 -0
  81. package/dist/assets/{index-CKq30dWL.js → index-BNI-Fp0S.js} +1 -1
  82. package/dist/assets/{index-BQhzyzVs.js → index-Bfmgpw5_.js} +1 -1
  83. package/dist/assets/{index-BvofXJ2V.js → index-BjxrhAPw.js} +10 -10
  84. package/dist/assets/{index-_8dyjhUy.js → index-BmWjwKCI.js} +1 -1
  85. package/dist/assets/{index-C5X9a7cc.js → index-BxfaKgnf.js} +1 -1
  86. package/dist/assets/{index-Ch5YEO2u.js → index-Bz69I2lh.js} +1 -1
  87. package/dist/assets/{index-Cb_bB7kh.js → index-C0MyvZkB.js} +1 -1
  88. package/dist/assets/{index-CxZjc-gj.js → index-C87WpOvX.js} +1 -1
  89. package/dist/assets/{index-B1ahK-2I.js → index-C87i5P5O.js} +244 -153
  90. package/dist/assets/{index-B1OmL87T.js → index-CBU498FZ.js} +1 -1
  91. package/dist/assets/{index-COlbopzU.js → index-CBgOYn4R.js} +1 -1
  92. package/dist/assets/index-CCVx6lLg.js +262 -0
  93. package/dist/assets/{index-BTZLTyBO.js → index-CDS9Hial.js} +2 -2
  94. package/dist/assets/{index-BE_-Llg6.js → index-CGvEh9ip.js} +1 -1
  95. package/dist/assets/{index-BMAP1AB4.js → index-CHhqsbtW.js} +1 -1
  96. package/dist/assets/{index-DfSHgbPL.js → index-CNaxpzMo.js} +1 -1
  97. package/dist/assets/{index-DXp6uQcX.js → index-CQRdVDZQ.js} +1 -1
  98. package/dist/assets/index-CUEISfg0.js +292 -0
  99. package/dist/assets/index-CYfBSsnU.js +1 -0
  100. package/dist/assets/{index-CYRsRd2j.js → index-Ccn_78eY.js} +1 -1
  101. package/dist/assets/{index-CGLq3fFG.js → index-Cdkc-3f6.js} +1 -1
  102. package/dist/assets/{index-SR8pTZR1.js → index-CnV8LmTC.js} +1 -1
  103. package/dist/assets/{index-DGLsN6jA.js → index-CnbL2tpL.js} +1 -1
  104. package/dist/assets/{index-BBDmvM0V.js → index-CuBDEMRq.js} +1 -1
  105. package/dist/assets/{index-2urvy1x8.js → index-CuqMshCu.js} +5 -5
  106. package/dist/assets/{index-AH6-CvHc.js → index-DI1xj9t6.js} +1 -1
  107. package/dist/assets/{index-GdO1eONN.js → index-Dcjg8igY.js} +5 -5
  108. package/dist/assets/{index-CE2nv6FG.js → index-Djmycn1v.js} +1 -1
  109. package/dist/assets/{index-DSc5Ifom.js → index-DnbqFjiK.js} +3 -3
  110. package/dist/assets/{index-BeUG4zog.js → index-DtzNIJ9v.js} +1 -1
  111. package/dist/assets/{index-BMLIhSHw.js → index-T-64JlMP.js} +1 -1
  112. package/dist/assets/{index-Dw0vqdTl.js → index-T1D0phLU.js} +16 -16
  113. package/dist/assets/index-Xym45k52.js +329 -0
  114. package/dist/assets/{index-CTZJ4N-O.js → index-u17sC7i2.js} +1 -1
  115. package/dist/assets/{index.es-BLLlydG4.js → index.es-BXC1lkQf.js} +1 -1
  116. package/dist/assets/index.esm-as9kElM3.js +1 -0
  117. package/dist/assets/{info-addon.es-CitM4bMJ.js → info-addon.es-CVKSPi1c.js} +1 -1
  118. package/dist/assets/{info.es-U16lfRIu.js → info.es-HJGLmzv5.js} +1 -1
  119. package/dist/assets/install-from-url-CEY4dC_1.js +1 -0
  120. package/dist/assets/{invitation-BL8ckd5a.js → invitation-evdMCfyK.js} +5 -5
  121. package/dist/assets/{is-path-prefix-equal-C7ZHgYDw.js → is-path-prefix-equal-CrQHcn5m.js} +1 -1
  122. package/dist/assets/{isEqual-CsmMcSuc.js → isEqual-CuoJFFI2.js} +1 -1
  123. package/dist/assets/{item-COR877Y7.js → item-D6A0cv19.js} +1 -1
  124. package/dist/assets/ja-BemsOTjE.js +1 -0
  125. package/dist/assets/{javascript.es-aiCWKHMT.js → javascript.es-rMzGfy7N.js} +1 -1
  126. package/dist/assets/{jump-to-line.es-B57loqaV.js → jump-to-line.es-Cpa8i7PL.js} +1 -1
  127. package/dist/assets/{jump.es-DN7DQdT-.js → jump.es-BLaBRIq3.js} +1 -1
  128. package/dist/assets/ko-CqkhhVdi.js +1 -0
  129. package/dist/assets/{line-BbyRx9SO.js → line-BCg6WLy-.js} +4 -4
  130. package/dist/assets/{lint.es-BjRh9GWD.js → lint.es-itOm8eut.js} +1 -1
  131. package/dist/assets/{lint.es2-BE-_vzHy.js → lint.es2-Br2Jseat.js} +1 -1
  132. package/dist/assets/{lint.es3-CLLx2W8W.js → lint.es3-DTnJdvr7.js} +1 -1
  133. package/dist/assets/{list-header-C7QBrUa7.js → list-header-CsWJ8RPD.js} +1 -1
  134. package/dist/assets/{log-BEbnTZZk.js → log-CkiYiCpI.js} +1 -1
  135. package/dist/assets/{lottie-CtZDSDCx.js → lottie-Duv0wu-W.js} +1 -1
  136. package/dist/assets/{matchbrackets.es--bW5AU6Z.js → matchbrackets.es-rEJDOfNn.js} +1 -1
  137. package/dist/assets/{memory-CLAyz0qg.js → memory-CuMXgGIH.js} +1 -1
  138. package/dist/assets/{mode.es-DfELLuC7.js → mode.es-Bs_6rgrU.js} +1 -1
  139. package/dist/assets/{mode.es2-BSqgBS-A.js → mode.es2-C6Zvy8D5.js} +1 -1
  140. package/dist/assets/{mode.es3-CkjBPJwA.js → mode.es3-DgePL-lk.js} +1 -1
  141. package/dist/assets/{onlineParser.es-CjDm9qzw.js → onlineParser.es-C3POG7wL.js} +1 -1
  142. package/dist/assets/{overview-D6hkcgGB.js → overview-DbahK4Kk.js} +1 -1
  143. package/dist/assets/pt-DZmF_qcN.js +1 -0
  144. package/dist/assets/react-WoXEty6I.js +57 -0
  145. package/dist/assets/{redux-_AC4VJGq.js → redux-Cf4FUKVZ.js} +1 -1
  146. package/dist/assets/{resource-dialog-3h3yAvkC.js → resource-dialog-CCAmiBTD.js} +2 -2
  147. package/dist/assets/ru-BFNdjdAO.js +1 -0
  148. package/dist/assets/{runtime-Bb4UUdI0.js → runtime-CUPVOXCy.js} +1 -1
  149. package/dist/assets/{schema-BY5sl2-H.js → schema-BuTyc1B1.js} +1 -1
  150. package/dist/assets/sdk-CMnoHYH1.js +1 -0
  151. package/dist/assets/{search.es-DFzVaahw.js → search.es-ByPtS76S.js} +1 -1
  152. package/dist/assets/{searchcursor.es-B6izKcHD.js → searchcursor.es-BxfHGeD5.js} +1 -1
  153. package/dist/assets/service-G6-8wV0m.js +1 -0
  154. package/dist/assets/{shorten-label-BVjBo-Di.js → shorten-label-CmwkaCnD.js} +1 -1
  155. package/dist/assets/{show-hint.es-8Vjxa886.js → show-hint.es-Bi5eJ-nO.js} +1 -1
  156. package/dist/assets/{slicedToArray-9D5F9PAz.js → slicedToArray-D1jYg_Db.js} +2 -2
  157. package/dist/assets/{spaces-oE7wS1Bm.js → spaces-DaTfPIZI.js} +1 -1
  158. package/dist/assets/{status-Ca8qwT5I.js → status-BrIel7yA.js} +1 -1
  159. package/dist/assets/{sublime.es-s81PLoJW.js → sublime.es-BRPc_Rx8.js} +1 -1
  160. package/dist/assets/{switch-control-B71IvTSN.js → switch-control-D6307Ep2.js} +1 -1
  161. package/dist/assets/table-icons-K0jdQRYo.js +553 -0
  162. package/dist/assets/{team-B91lHyZ2.js → team-DtdwQJxz.js} +1 -1
  163. package/dist/assets/th-B61cOYck.js +1 -0
  164. package/dist/assets/{toUpper-Ci7HX04C.js → toUpper-B5GnUtFV.js} +1 -1
  165. package/dist/assets/{traffic-DwUZrFe9.js → traffic-Cat9rasT.js} +1 -1
  166. package/dist/assets/{url-evaluation-D1BRyZ9U.js → url-evaluation-Bsz6aSOl.js} +1 -1
  167. package/dist/assets/{url-join-sQxThqCr.js → url-join-DNBjtoKk.js} +1 -1
  168. package/dist/assets/{use-blocklet-info-for-connect-did-spaces-ChleEcCM.js → use-blocklet-info-for-connect-did-spaces-COobAHN5.js} +1 -1
  169. package/dist/assets/{useLocalStorage-BE8pQq9o.js → useLocalStorage-DZviLQmZ.js} +1 -1
  170. package/dist/assets/useThemeProps-B9dRlIPP.js +1 -0
  171. package/dist/assets/{util-BJBtVSNx.js → util-C4LslHq9.js} +1 -1
  172. package/dist/assets/vi-B884zOLu.js +1 -0
  173. package/dist/assets/{wait-container-mOzU7w1w.js → wait-container-Coxp7sOC.js} +1 -1
  174. package/dist/assets/{withStyles-iFEvNGyW.js → withStyles-DBGJv_MR.js} +1 -1
  175. package/dist/assets/wrap-locale-PwADRgtG.js +1 -0
  176. package/dist/assets/zh-kNAPjCk5.js +2 -0
  177. package/dist/assets/zh-tw-Bn1Pkz9A.js +1 -0
  178. package/dist/index.html +1 -1
  179. package/dist/service-worker.js +1 -1
  180. package/package.json +1 -1
  181. package/dist/assets/ChevronRight-BUIMq7Nq.js +0 -1
  182. package/dist/assets/FilterList-BdP9J-wV.js +0 -26
  183. package/dist/assets/InputAdornment-CLNpGzfL.js +0 -1
  184. package/dist/assets/Select-_CZTaseY.js +0 -2
  185. package/dist/assets/TextField-s3PjFgNL.js +0 -1
  186. package/dist/assets/api-6dUIEDVl.js +0 -1
  187. package/dist/assets/ar-BSACs5SN.js +0 -1
  188. package/dist/assets/blocklet-CjG3S1lO.js +0 -1
  189. package/dist/assets/es-Bk9E9Gbf.js +0 -1
  190. package/dist/assets/getValidReactChildren-DDuHQUQL.js +0 -1
  191. package/dist/assets/hi-HiGtGtUs.js +0 -1
  192. package/dist/assets/id-CirrqXGd.js +0 -1
  193. package/dist/assets/index-BUOXYT7X.js +0 -168
  194. package/dist/assets/index-CrPqLlr1.js +0 -1
  195. package/dist/assets/index-DGuKpTxy.js +0 -304
  196. package/dist/assets/index-JdHcWmyW.js +0 -262
  197. package/dist/assets/index-enOTN9ar.js +0 -292
  198. package/dist/assets/index.esm-Dn548FrI.js +0 -1
  199. package/dist/assets/install-from-url-De3qslJe.js +0 -1
  200. package/dist/assets/ja-BOs7uPqI.js +0 -1
  201. package/dist/assets/ko-D1G4UvNg.js +0 -1
  202. package/dist/assets/pt-CcFeyma6.js +0 -1
  203. package/dist/assets/react-BID-V9dy.js +0 -57
  204. package/dist/assets/ru-OymXgLUI.js +0 -1
  205. package/dist/assets/sdk-DWrnJTtv.js +0 -1
  206. package/dist/assets/service-DUfhniW5.js +0 -1
  207. package/dist/assets/table-icons-Y18_UHJP.js +0 -249
  208. package/dist/assets/th-CZbdb5PZ.js +0 -1
  209. package/dist/assets/useThemeProps-BXhGf-7k.js +0 -1
  210. package/dist/assets/vi-DhjQx2Z1.js +0 -1
  211. package/dist/assets/wrap-locale-P1NWYJW8.js +0 -1
  212. package/dist/assets/zh-jGK5FFL0.js +0 -2
  213. package/dist/assets/zh-tw-DnmwTx49.js +0 -1
@@ -1,4 +1,4 @@
1
- import{a0 as J,r as x,bl as N,aP as ve,E as v,M as G,b as K,t as O,j as e,P as f,z as Ke,av as le,q as V,ak as Ve,m as y,Q as j,y as de,D as Ge,B as te,C as Z,x as Xe,K as We,n as ke,f as Ye,l as qe,aK as ne,aL as oe,U as _,aD as $,a8 as ee,a3 as _e,a2 as $e,a$ as et,J as tt,cg as st,W as nt,L as ot,$ as at,H as M,bc as q,i as it,T as ce,ax as rt,hp as ct,G as ye,X as lt,R as dt}from"./index-B1ahK-2I.js";import{S as Se}from"./index-BTZLTyBO.js";import{u as P}from"./blocklet-CjG3S1lO.js";import"./api-6dUIEDVl.js";import{u as Ie,P as pt}from"./use-blocklet-info-for-connect-did-spaces-ChleEcCM.js";import{c as ut,h as ht,e as se,g as Ae,f as mt,i as Ce,j as ft,k as xt,l as Be,d as gt}from"./spaces-oE7wS1Bm.js";import{T as jt}from"./TextField-s3PjFgNL.js";import{I as yt}from"./index-SR8pTZR1.js";import{S as De}from"./switch-control-B71IvTSN.js";import{d as St}from"./MoreHoriz-DcAnQoa0.js";import{d as At}from"./DeleteOutline-BNzcbICD.js";import{e as Ct}from"./mode-B2dWMeTO.js";import{D as Bt}from"./index-DGuKpTxy.js";import"./ExpandMore-Xg-kLmr9.js";import"./ButtonGroup-BCRFvUIs.js";import"./getValidReactChildren-DDuHQUQL.js";import"./Select-_CZTaseY.js";import"./InputLabel-DS6GLy5V.js";import"./index-CrPqLlr1.js";import"./FilterList-BdP9J-wV.js";import"./useThemeProps-BXhGf-7k.js";import"./Delete-BRWePean.js";import"./LastPage-CwzRxQNH.js";import"./index-AH6-CvHc.js";import"./redux-_AC4VJGq.js";import"./Search-BkXnaF-1.js";import"./index-BMLIhSHw.js";import"./MoreVert-DIRoN8EP.js";async function vt({blockletDid:t,nodeApi:s,spaceGateways:a}){let n=!1;const l=await Promise.all(a.map(async c=>{let{name:o}=c;const r=await ut(c.endpoint);return!J.isEmpty(r)&&r!==o&&(o=r,n=!0),{...c,name:o}}));return n&&await Promise.all(l.filter(c=>c.did).map(c=>s.updateBlockletSpaceGateway({input:{did:t,where:{did:c.did},spaceGateway:{...c}}}))),l}function kt({setLoading:t,refresh:s}={}){var r;const{blocklet:a}=P(),n=(r=a==null?void 0:a.meta)==null?void 0:r.did,[l,c]=x.useState([]),{api:o}=N();return ve(async()=>{try{if(!n){c([]);return}t==null||t(!0);const{spaceGateways:d}=await o.getBlockletSpaceGateways({input:{did:n}}),p=await vt({blockletDid:n,nodeApi:o,spaceGateways:d});c(p??[])}catch(d){console.error(d),v.error(G(d))}finally{t==null||t(!1)}},[n,s]),{spaceGateways:l}}function Ee({deps:t,setLoading:s}={deps:[],setLoading:()=>{}}){var r;const{blocklet:a}=P(),[n,l]=x.useState([]),{api:c}=N(),o=J.debounce(async()=>{try{if(s(!0),!a){l([]);return}const{backups:d}=await c.getBlockletBackups({input:{did:a.meta.did}});l(d??[])}catch(d){console.error(d),v.error(G(d))}finally{s(!1)}},2e3);return ve(async()=>{o()},[(r=a==null?void 0:a.meta)==null?void 0:r.did].concat(t)),{backups:n}}function It({appDid:t}){const{backups:s}=Ee(),[a,n]=x.useState({message:"",progress:0,completed:!1}),l=N(),{ws:{useSubscription:c}}=l;return c(K.BlockletEvents.backupProgress,o=>{t===(o==null?void 0:o.appDid)&&n(()=>({...o}))},[t]),x.useEffect(()=>{var o;if(s!=null&&s.length&&J.isNull((o=s[0])==null?void 0:o.status)){const[r]=s;n(()=>({message:r.message,progress:r.progress,completed:r.progress>=100}))}},[s]),a}const Ue=x.createContext({}),{Provider:Dt,Consumer:js}=Ue;function pe({children:t}){var C;const{t:s}=O(),{api:a}=N(),{blocklet:n}=P(),[l,c]=x.useState(!1),[o,r]=x.useState(!1),{spaceGateways:d}=kt({refresh:o,setLoading:c}),p=It({appDid:n==null?void 0:n.appDid}),[m,D]=x.useState(!1),S=x.useMemo(()=>ht(n==null?void 0:n.environments),[n,o,m]),[g,A]=x.useState(!1),{backups:k}=Ee({deps:[p],setLoading:A}),[H,I]=x.useState(d==null?void 0:d.find(i=>i.endpoint===S)),E=(C=n==null?void 0:n.settings)==null?void 0:C.autoBackup,u=()=>{r(i=>!i)},F=()=>{D(i=>!i)},U=async i=>{await a.updateAutoBackup({input:{did:n.meta.did,autoBackup:i}})},R=async(i,w)=>{d.push({...i,loading:!0}),await a.addBlockletSpaceGateway({input:{did:n.meta.did,spaceGateway:i}}),S!==w&&await a.configBlocklet({input:{did:[n.meta.did],configs:[{key:K.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:w}]}}),u(),I(i)},B=async i=>{i&&(i.endpoint===S&&(await a.configBlocklet({input:{did:[n.meta.did],configs:[{key:K.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:""}]}}),E!=null&&E.enabled&&await U({enabled:!1})),await a.deleteBlockletSpaceGateway({input:{did:n.meta.did,spaceGatewayDid:i==null?void 0:i.did}}),u(),I(i))},T=async i=>{await a.updateBlockletSpaceGateway({input:{did:n.meta.did,where:{did:i.did},spaceGateway:i}}),S!==i.endpoint&&await a.configBlocklet({input:{did:[n.meta.did],configs:[{key:K.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:i.endpoint}]}}),v.success(s("storage.spaces.connectedWithName",{name:(i==null?void 0:i.name)??"DID Spaces"})),u()},h=i=>(i==null?void 0:i.endpoint)===S;return e.jsx(Dt,{value:{spaceGateways:d,selectedSpaceGateway:H,addSpaceGateway:R,deleteSpaceGateway:B,updateSpaceGateway:T,refreshSpaceGateways:u,spaceGatewaysLoading:l,spaceGatewayIsSelected:h,updateAutoBackup:U,backupEndpoint:S,backupProgress:p,backups:k,backupsLoading:g,refreshBackupEndpoint:F,autoBackup:E},children:t})}pe.propTypes={children:f.any.isRequired};pe.defaultProps={};function Q(){return x.useContext(Ue)}function ae({...t}){const{blocklet:s}=P(),{info:a}=N(),{t:n,locale:l}=O(),[c,o]=x.useState(""),[r,d]=x.useState(!1),[p,m]=x.useState(!1),[D,S]=x.useState(""),g=Ie({blocklet:s}),A=Ke(a),{spaceGateways:k,addSpaceGateway:H}=Q(),[I,E]=x.useState({open:!1,action:"connect-to-did-spaces",checkTimeout:1e3*300,checkFn:le.create({baseURL:V(window.location.origin,Ve())}).get,messages:{title:n("storage.spaces.provideNFT.title",{appName:g.appName},l),scan:n("storage.spaces.provideNFT.scan",{appName:g.appName},l),confirm:"",success:e.jsx(y,{gutterBottom:!0,children:n("storage.spaces.provideNFT.success")})},onClose:()=>{E(h=>({...h,open:!1}))}}),[u,F]=x.useState({open:!1,action:"one-click-authorization",checkTimeout:1e3*300,messages:{title:n("storage.spaces.authorize.title",{appName:g.appName},l),scan:n("storage.spaces.authorize.scan",{appName:g.appName},l),confirm:"",success:e.jsx(y,{gutterBottom:!0,children:n("storage.spaces.authorize.success")})},onClose:()=>{F(h=>({...h,open:!1}))}}),U=async({endpoint:h,name:C,did:i})=>{const w=await Ae(h);if(!await Ce(w)){v.error(n("storage.spaces.gateway.add.invalidUrl"));return}if(k.some(W=>W.endpoint===h)){v.error(n("storage.spaces.gateway.add.duplicate",{name:C}));return}const L={name:C,did:i,url:w,endpoint:h};await H(L,h),v.success(n("storage.spaces.connectedWithName",{name:(L==null?void 0:L.name)??"DID Spaces"}))},R=async(h,C)=>{try{if(!J.isEmpty(h.spaceGateway))await U(C(h.spaceGateway));else{const i=C(h.endpoint),w=h.space?C(h.space):{};await U({endpoint:i,did:se(i),name:"DID Space",...w})}F(i=>({...i,open:!1})),o(null),E(i=>({...i,open:!1}))}catch(i){console.error(i),v.error(G(i))}},B=()=>{E(h=>({...h,open:!0,extraParams:{appPid:s.appPid,appName:g.appName,appDescription:g.appDescription,scopes:g.scopes,appUrl:g.appUrl,referrer:g.referrer,nodeDid:a.did}}))},T=async()=>{try{d(!0);const h=await Ae(c),C=mt(h),i=new URL(h).searchParams.get("spaceDid");if(!await Ce(C))throw new Error(n("storage.spaces.gateway.add.invalidUrl"));F(w=>({...w,open:!0,prefix:V(C,"space/api/did"),baseUrl:new URL(C).origin,checkFn:le.create({baseURL:V(C,"space")}).get,extraParams:{appDid:g.appDid,appName:g.appName,appDescription:g.appDescription,scopes:g.scopes,appUrl:g.appUrl,referrer:g.referrer,nodeDid:a.did,spaceDid:i}})),m(!1)}catch(h){const C=`${n("storage.spaces.gateway.add.failed",l)}: ${G(h)}`;S(C)}finally{d(!1)}};return e.jsxs(j,{children:[e.jsx(Se,{color:"primary",style:{textTransform:"none !important",fontSize:"1rem"},size:"small",onClick:B,menu:[e.jsx(Se.Item,{sx:{textTransform:"none"},onClick:()=>m(!0),size:"small",...t,children:n("storage.spaces.connect.useSpaceGateway")},"1")],children:e.jsx(y,{sx:{fontWeight:"bold",textTransform:"none"},children:n("storage.spaces.connect.useWallet")})}),e.jsx(de,{forceConnected:!1,saveConnect:!1,prefix:I.prefix,open:I.open,popup:!0,action:I.action,webWalletUrl:A,baseUrl:I.baseUrl,checkFn:I.checkFn,onSuccess:R,onClose:I.onClose,checkTimeout:I.checkTimeout,extraParams:I.extraParams,messages:I.messages,locale:l}),e.jsx(de,{forceConnected:!1,saveConnect:!1,prefix:u.prefix,open:u.open,popup:!0,action:u.action,baseUrl:u.baseUrl,checkFn:u.checkFn,onSuccess:R,onClose:u.onClose,checkTimeout:u.checkTimeout,extraParams:u.extraParams,messages:u.messages,locale:l}),e.jsxs(Ge,{title:n("storage.spaces.gateway.add.title"),fullWidth:!0,maxWidth:"md",open:p,onClose:()=>m(!1),PaperProps:{style:{minHeight:"auto"}},actions:e.jsxs(e.Fragment,{children:[e.jsx(te,{onClick:h=>{h.stopPropagation(),m(!1)},color:"inherit",children:n("common.cancel")}),e.jsxs(te,{onClick:T,color:"primary",disabled:r||!c,variant:"contained",autoFocus:!0,children:[r&&e.jsx(Z,{size:16}),n("common.confirm")]})]}),children:[e.jsx("div",{style:{paddingTop:12,overflowY:"hidden"},children:e.jsx(Xe,{component:"div",children:e.jsx(y,{component:"div",children:e.jsx(jt,{label:n("storage.spaces.gateway.add.label"),autoComplete:"off",variant:"outlined",name:"url",fullWidth:!0,value:c,onChange:h=>{S(null),o(h.target.value)},disabled:r,onKeyPress:async h=>{h.key==="Enter"&&await T()},autoFocus:!0})})})}),!!D&&e.jsx(We,{severity:"error",style:{width:"100%"},children:D})]})]})}ae.propTypes={};ae.defaultProps={};function we({...t}){const{t:s}=x.useContext(Ye),{blocklet:a,loadingDiskInfo:n,actions:l}=P();if(x.useEffect(()=>{l.refreshBlocklet({showError:!1,attachDiskInfo:!0})},[]),a.diskInfo){const c=(d,p,m)=>e.jsxs(y,{children:[d," ",e.jsx("strong",{children:p?qe(p):"empty"})]}),o=a.environments.reduce((d,p)=>(d[p.key]=p.value,d),{}),r=[{key:"appDir",name:s("blocklet.diskInfo.appDir"),value:c(o.BLOCKLET_APP_DIR,a.diskInfo.app)},{key:"dataDir",name:s("blocklet.diskInfo.dataDir"),value:c(o.BLOCKLET_DATA_DIR,a.diskInfo.data)},{key:"logDir",name:s("blocklet.diskInfo.logDir"),value:c(o.BLOCKLET_LOG_DIR,a.diskInfo.log)},{key:"cacheDir",name:s("blocklet.diskInfo.cacheDir"),value:c(o.BLOCKLET_CACHE_DIR,a.diskInfo.cache)}];return e.jsx(Et,{component:"div",...t,children:r.map(d=>e.jsx(yt,{valueComponent:"div",nameWidth:120,name:d.name,children:d.value},d.key))})}return n?e.jsx(Z,{}):e.jsx(y,{children:s("blocklet.diskInfo.empty")})}const Et=ke(y)``;var be=function(s){return e.jsxs("svg",{...s,children:[e.jsxs("g",{filter:"url(#a)",children:[e.jsx("path",{d:"M56.97 2a12 12 0 0 0-8.485 3.515l-40.97 40.97A12 12 0 0 0 4 54.971V240c0 6.627 5.373 12 12 12h196c6.627 0 12-5.373 12-12V14c0-6.627-5.373-12-12-12H56.97Z",fill:"#DDD"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m49.192 6.222-40.97 40.97A11 11 0 0 0 5 54.971V240c0 6.075 4.925 11 11 11h196c6.075 0 11-4.925 11-11V14c0-6.075-4.925-11-11-11H56.97a11 11 0 0 0-7.778 3.222Zm-.707-.707A12 12 0 0 1 56.971 2H212c6.627 0 12 5.373 12 12v226c0 6.627-5.373 12-12 12H16c-6.627 0-12-5.373-12-12V54.97a12 12 0 0 1 3.515-8.485l40.97-40.97Z",fill:"#000",fillOpacity:".08"}),e.jsx("mask",{id:"b",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"4",y:"2",width:"220",height:"250",children:e.jsx("path",{d:"M56.97 2a12 12 0 0 0-8.485 3.515l-40.97 40.97A12 12 0 0 0 4 54.971V240c0 6.627 5.373 12 12 12h196c6.627 0 12-5.373 12-12V14c0-6.627-5.373-12-12-12H56.97Z",fill:"#D9D9D9"})}),e.jsxs("g",{mask:"url(#b)",children:[e.jsx("path",{opacity:".5",fill:"url(#c)",d:"M4 2h220v128H4z"}),e.jsx("path",{opacity:".1",fill:"url(#d)",d:"M4 130h220v122H4z"}),e.jsx("path",{d:"M33.045 169h-3.767v-11.636h3.887c1.14 0 2.12.233 2.937.698a4.61 4.61 0 0 1 1.881 1.995c.44.863.659 1.899.659 3.108 0 1.212-.222 2.254-.665 3.125a4.668 4.668 0 0 1-1.909 2.011c-.833.466-1.84.699-3.023.699Zm-2.01-1.534h1.914c.886 0 1.623-.167 2.21-.5a3.152 3.152 0 0 0 1.318-1.46c.292-.64.438-1.421.438-2.341 0-.913-.146-1.688-.438-2.324a3.095 3.095 0 0 0-1.29-1.449c-.572-.33-1.282-.494-2.13-.494h-2.023v8.568Zm11.546-10.102V169h-1.756v-11.636h1.756ZM48.905 169h-3.767v-11.636h3.886c1.14 0 2.12.233 2.938.698a4.609 4.609 0 0 1 1.88 1.995c.44.863.66 1.899.66 3.108 0 1.212-.222 2.254-.665 3.125a4.667 4.667 0 0 1-1.91 2.011c-.833.466-1.84.699-3.022.699Zm-2.011-1.534h1.914c.887 0 1.623-.167 2.21-.5a3.151 3.151 0 0 0 1.319-1.46c.291-.64.437-1.421.437-2.341 0-.913-.146-1.688-.437-2.324a3.095 3.095 0 0 0-1.29-1.449c-.572-.33-1.282-.494-2.13-.494h-2.023v8.568Zm20.372-7.046a1.662 1.662 0 0 0-.75-1.25c-.44-.299-.993-.448-1.66-.448-.477 0-.89.075-1.238.227a1.91 1.91 0 0 0-.813.613c-.189.258-.284.552-.284.881 0 .277.065.515.194.716.132.201.304.369.516.506.216.132.447.244.694.335.246.087.483.159.71.216l1.136.295c.371.091.752.214 1.142.37.39.155.752.36 1.086.613.333.254.602.568.806.944.209.374.313.823.313 1.346 0 .659-.17 1.244-.511 1.756-.338.511-.828.915-1.472 1.21-.64.295-1.415.443-2.324.443-.871 0-1.625-.138-2.261-.415-.637-.276-1.135-.668-1.495-1.176-.36-.511-.558-1.117-.596-1.818h1.761c.034.421.17.771.41 1.051.242.277.55.483.925.62.38.132.794.198 1.245.198.496 0 .937-.077 1.324-.233.39-.159.697-.378.92-.659a1.56 1.56 0 0 0 .335-.994c0-.345-.098-.627-.295-.847a2.191 2.191 0 0 0-.79-.545 7.725 7.725 0 0 0-1.12-.381l-1.374-.375c-.932-.253-1.67-.627-2.216-1.119-.542-.492-.813-1.144-.813-1.955 0-.67.182-1.255.546-1.755.363-.5.856-.888 1.477-1.165.621-.28 1.322-.42 2.102-.42.788 0 1.483.138 2.085.414.607.277 1.084.658 1.432 1.142.349.481.53 1.034.546 1.659h-1.693Zm3.813 11.853v-12h1.66v1.415h.142c.098-.182.24-.393.426-.631.185-.239.443-.447.772-.625.33-.182.766-.273 1.307-.273.705 0 1.334.178 1.887.534.553.356.987.869 1.3 1.54.319.67.478 1.477.478 2.42 0 .944-.157 1.752-.472 2.427-.314.67-.746 1.187-1.295 1.551-.55.36-1.176.539-1.88.539-.53 0-.965-.089-1.302-.267a2.457 2.457 0 0 1-.784-.625 4.667 4.667 0 0 1-.437-.636h-.103v4.631H71.08Zm1.665-7.637c0 .614.09 1.152.267 1.614.178.462.436.824.773 1.085.337.258.75.387 1.239.387.507 0 .931-.135 1.273-.404.34-.273.598-.642.772-1.108.178-.466.267-.99.267-1.574 0-.575-.087-1.092-.261-1.551-.17-.458-.428-.82-.773-1.085-.34-.265-.767-.398-1.278-.398-.493 0-.91.127-1.25.381-.337.254-.593.608-.767 1.062-.175.455-.262.985-.262 1.591Zm10.75 4.557a3.557 3.557 0 0 1-1.5-.307 2.523 2.523 0 0 1-1.062-.903c-.258-.394-.386-.877-.386-1.449 0-.492.094-.898.283-1.216.19-.318.446-.57.768-.756a4.036 4.036 0 0 1 1.08-.42c.397-.095.802-.167 1.215-.216l1.273-.148c.325-.041.562-.108.71-.198.148-.091.222-.239.222-.444v-.039c0-.497-.14-.881-.42-1.154-.277-.273-.69-.409-1.24-.409-.572 0-1.022.127-1.352.381-.325.25-.55.528-.676.835l-1.597-.364c.19-.53.466-.958.83-1.284.368-.329.79-.568 1.267-.716.477-.151.98-.227 1.506-.227.348 0 .718.042 1.108.125.394.08.761.227 1.102.443.345.216.627.525.847.926.22.398.33.915.33 1.552V169h-1.66v-1.193h-.068c-.11.22-.275.435-.495.648-.22.212-.501.388-.846.528s-.758.21-1.239.21Zm.37-1.363c.47 0 .87-.093 1.204-.279.337-.185.593-.428.767-.727.178-.303.267-.627.267-.972v-1.125c-.06.061-.178.118-.352.171-.17.049-.365.093-.585.13-.22.034-.434.067-.642.097l-.523.068c-.33.042-.63.112-.903.21a1.553 1.553 0 0 0-.648.427c-.16.181-.239.424-.239.727 0 .42.156.738.466.954.31.212.707.319 1.188.319Zm9.876 1.346c-.845 0-1.572-.191-2.182-.574a3.796 3.796 0 0 1-1.398-1.596c-.325-.678-.488-1.455-.488-2.33 0-.886.166-1.668.5-2.346a3.832 3.832 0 0 1 1.409-1.597c.606-.383 1.32-.574 2.142-.574.663 0 1.254.123 1.773.369.519.243.937.584 1.255 1.023.322.44.514.953.574 1.54h-1.653c-.091-.409-.3-.761-.625-1.057-.322-.295-.754-.443-1.296-.443a2.11 2.11 0 0 0-1.244.375c-.352.246-.627.598-.824 1.057-.197.454-.295.992-.295 1.613 0 .637.096 1.186.29 1.648.193.462.466.82.818 1.074.356.254.774.381 1.255.381.322 0 .614-.059.875-.177.266-.121.487-.293.665-.517.182-.223.309-.492.38-.806h1.654a3.211 3.211 0 0 1-.55 1.511 3.165 3.165 0 0 1-1.234 1.045c-.511.254-1.111.381-1.8.381Zm9.163 0c-.859 0-1.6-.184-2.221-.551a3.732 3.732 0 0 1-1.432-1.563c-.333-.674-.5-1.464-.5-2.369 0-.894.167-1.682.5-2.363a3.887 3.887 0 0 1 1.409-1.597c.606-.383 1.314-.574 2.125-.574.493 0 .97.082 1.432.244.462.163.877.419 1.244.767.368.349.657.802.87 1.358.212.553.318 1.226.318 2.017v.603H99.71v-1.273h5.273c0-.447-.091-.843-.273-1.187a2.052 2.052 0 0 0-.767-.824c-.326-.201-.708-.302-1.148-.302a2.22 2.22 0 0 0-1.25.353 2.364 2.364 0 0 0-.818.909 2.626 2.626 0 0 0-.284 1.21v.994c0 .584.102 1.08.307 1.489.208.409.498.722.869.938.372.212.805.318 1.301.318a2.7 2.7 0 0 0 .881-.137c.265-.094.494-.234.688-.42.193-.186.341-.415.443-.688l1.608.29c-.129.474-.36.888-.693 1.244-.33.353-.745.627-1.245.824-.496.194-1.062.29-1.699.29Z",fill:"#fff"}),e.jsx("path",{d:"M117.604 47.263 121.523 45h14.267v41.862h-14.267l-15.335-8.854V53.854l1.818-1.05 3.2 1.848-1.818 1.05V76.16l12.993 7.502h10.209V48.2h-10.209l-1.577.91-3.2-1.847Z",fill:"url(#e)"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M119.402 76.16V55.701L106.409 48.2H96.2v35.462h10.209l1.582-.913 3.2 1.847-3.924 2.266H93V45h14.267l15.335 8.854v24.154l-1.813 1.046-3.2-1.847 1.813-1.047Z",fill:"url(#f)"}),e.jsxs("g",{clipPath:"url(#g)",fillRule:"evenodd",clipRule:"evenodd",fill:"#fff",children:[e.jsx("path",{d:"m50.928 216.089 1.034 2.852h-2.503l1.028-2.842a4.95 4.95 0 0 0 .107-.338 7.17 7.17 0 0 0 .111-.409c.075.297.15.542.223.737Zm2.28 5.591h.796l-2.775-7.352h-1.043l-2.774 7.352h.795a.338.338 0 0 0 .223-.077.425.425 0 0 0 .127-.179l.615-1.705h3.07l.617 1.705a.399.399 0 0 0 .126.184.339.339 0 0 0 .223.072Zm4.823-.963a2.023 2.023 0 0 1-.67.098h-1.455v-2.453h1.456c.5 0 .871.106 1.11.318.24.208.36.495.36.86 0 .184-.028.355-.083.512a1.005 1.005 0 0 1-.262.399 1.2 1.2 0 0 1-.456.266Zm-2.125-3.128v-2.406h1.237c.498 0 .865.095 1.101.286.236.192.355.497.355.917 0 .369-.125.662-.374.881-.246.215-.623.322-1.13.322h-1.189Zm2.358-3.128a4.106 4.106 0 0 0-1.12-.133h-2.27v7.352h2.507c.391 0 .74-.051 1.048-.154.307-.102.566-.247.776-.435.21-.188.37-.409.48-.665.11-.26.165-.547.165-.861 0-.904-.506-1.462-1.518-1.674.22-.075.41-.169.572-.281a1.79 1.79 0 0 0 .403-.379c.106-.144.186-.297.237-.461.052-.164.078-.335.078-.512a2.1 2.1 0 0 0-.146-.804 1.49 1.49 0 0 0-.441-.609 2.073 2.073 0 0 0-.771-.384Zm7.535.778h-2.212v6.441h-1.028v-6.441h-2.222v-.911H65.8v.911Zm2.439.564h-1.13v1.193h1.13v-1.193Zm-1.13 2.983h1.13v1.193h-1.13v-1.193Z",fillOpacity:".8"}),e.jsx("path",{d:"M28.247 221.771V214h3.894c.99.072 1.765.944 1.765 1.998v3.77c0 1.106-.85 2.003-1.897 2.003h-3.762ZM36.355 214h-1.011v7.783h1.01V214Zm-7.097 6.704v-5.642h2.751c.49 0 .886.419.886.936v3.77c0 .517-.396.936-.886.936h-2.75ZM37.775 214v7.771h3.762c1.047 0 1.897-.897 1.897-2.003v-3.77c0-1.054-.774-1.926-1.765-1.998h-3.894Zm6.946 1.803h1.13v1.193h-1.13v-1.193Zm1.13 2.983h-1.13v1.193h1.13v-1.193Zm-7.065-3.724v5.642h2.75c.49 0 .887-.419.887-.936v-3.77c0-.517-.397-.936-.886-.936h-2.751Z"})]}),e.jsx("circle",{cx:"191.32",cy:"218",r:"10",fill:"url(#h)"}),e.jsx("path",{d:"m192.064 213.333.976-.564h3.554v10.427h-3.286a1 1 0 0 1-.5-.134l-3.588-2.071v-6.016l.453-.262.797.46-.453.262v5.096l3.237 1.868h2.543v-8.833h-2.543l-.393.227-.797-.46Z",fill:"#fff"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M192.512 220.531v-5.096l-3.237-1.869h-2.543v8.833h2.543l.394-.227.797.46-.977.564h-3.554v-10.427h3.554l3.82 2.206v6.016l-.452.261-.797-.461.452-.26Z",fill:"#fff"})]})]}),e.jsxs("defs",{children:[e.jsxs("linearGradient",{id:"d",x1:"114",y1:"130",x2:"114",y2:"252",gradientUnits:"userSpaceOnUse",children:[e.jsx("stop",{stopColor:"#101010"}),e.jsx("stop",{offset:"1",stopColor:"#272727"})]}),e.jsxs("linearGradient",{id:"e",x1:"120.989",y1:"45",x2:"120.989",y2:"86.862",gradientUnits:"userSpaceOnUse",children:[e.jsx("stop",{stopColor:"#fff",stopOpacity:".4"}),e.jsx("stop",{offset:"1",stopColor:"#fff"})]}),e.jsxs("linearGradient",{id:"f",x1:"107.801",y1:"45",x2:"107.801",y2:"86.862",gradientUnits:"userSpaceOnUse",children:[e.jsx("stop",{stopColor:"#fff"}),e.jsx("stop",{offset:"1",stopColor:"#fff",stopOpacity:".4"})]}),e.jsxs("radialGradient",{id:"h",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"matrix(17 -8.76924 6.97565 13.52294 183.166 221)",children:[e.jsx("stop",{stopColor:"#016BED"}),e.jsx("stop",{offset:".699",stopColor:"#4498FB"}),e.jsx("stop",{offset:"1",stopColor:"#9DFFE8"})]}),e.jsx("clipPath",{id:"g",children:e.jsx("path",{fill:"#fff",transform:"translate(28 214)",d:"M0 0h40.32v8H0z"})}),e.jsx("pattern",{id:"c",patternContentUnits:"objectBoundingBox",width:"1",height:"1",children:e.jsx("use",{xlinkHref:"#i",transform:"scale(.00455 .00781)"})}),e.jsxs("filter",{id:"a",x:"0",y:"0",width:"228",height:"258",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:"2"}),e.jsx("feGaussianBlur",{stdDeviation:"2"}),e.jsx("feComposite",{in2:"hardAlpha",operator:"out"}),e.jsx("feColorMatrix",{values:"0 0 0 0 0.0631944 0 0 0 0 0.242785 0 0 0 0 0.403472 0 0 0 0.2 0"}),e.jsx("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_1410_22507"}),e.jsx("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_1410_22507",result:"shape"})]}),e.jsx("image",{id:"i",width:"220",height:"128",xlinkHref:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANwAAACABAMAAACSOBo+AAAAG1BMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACUUeIgAAAACXRSTlMSFhkOHAsfCCOMH5MiAAAjjElEQVRo3hTQO3sjRRBG4a+qWzJhVfdIJqzuGXsJe2bkJe0e2UA4shdIJS2X1LBcUpbL/wae5yQnfVHGjp2+V08yKR7OwBDYte8pi5Aq9DObSBouqN9cidZyusonzWtGJO13phLebEn6xKEnlYyXe5hnySc53Ym9Abn7crTse8r7BMeIB8yBOVZK0trMjxT5S/cgc9G63BQqZoF3xSYZYeRk2hoIvEBFA7XMtaaF8TdY1GjiDDqgEswRDlWnRtmYzl5zRUq3sx3I+JL7sBJKXchDGJY9D+SfHAIoA+TuHCyYYYFjkhNB8tO5hhju0ANjdCITLx4/JDL+yyP0ErZR+m3M322bY8OKHzoOcAXLQMBHiIh+X59pv6udCJ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SrYgSAuzRViTEA7tgePYuBGUYId9lgeqCiJ/JAP+K37em+n0mcKzQjQWZNGFywCCCF+7J1+B4vr0gBhFB6S+89eO6chpzkyM8s0MdCgW7njgiikAKvGH0fRKr9cXmycUjU8xfeY87PIXB3q1TK2GWGjxhtr146ZKTKWPp9sR8MWBNzQTNNrIt4XCVHh+OwfYAo9QybSeFUX5a9bl1On+cL5YHUjp/eID+XwV2AwZUXHswFw0IhIUlwmaTdQtlKJUpbAArh1IONYy6WQkAc9+ZocJMnELtCFNKLySGLwUIuW1fJLBKOoydII6+sDlhy8xYI1vchhF6qZnM0/oZSUzcd5By2cDzUtH3ng8PHIzAKL25wuSv+gDBsggYWWkvLT27f2dhwRULpny5D5yKI7vD/4iAW9KWHB7JsEZeCE1E/mdgVHZTOci8X+YIanJt7+aBd2k8f2RL45Z2puefelcXjUWbKdMSYwr58dAPaHymSU0o9/zjFt7/VoGmNAwCyvrKe2L1hYJqtd5gh6FGiCAGzqFk6on9pQdSAQzkctDTtXGbDih5iRPVIk9TwCJGwP3tpATkHsNwloUilnNMFce7twgDgrgWhsE8jWW+EBLlTDMn9pmtJOefTJc6Cxld039TN4XiwL4pMtU+8tXJ4g/LghG5APdF7/e3FSi4v8vnEBiIEm+5LlZtsk2LbbbY5hN9JkkJkd5BjQFPoUcwjJdTm0mx0024NmOvVgxASvU9TonFxUqG8cUTy3m5s3i7BqLbFkKcfxLQYhAXfjam0yFFd3PZE9wlXWfHYKlg2cFlTcnwRH6z8DpSfQHidMhElmCMb07li9ceHQHFknk/98f4KJRLpX6xQEXVAnJxlr8Aw6/qb0wu9SNolstScB0izxmMC5DiytBJd9Rcm3RGf42aiddmUTM4d4dgdjiT+vMPX0/RzfZdLoZ4aQqPzhx9plNI3QyvsMZHn2j2wOECoTtkfJt89O+eYUnXB/gFxHxPmOeL9ogAAAABJRU5ErkJggg=="})]})]})};be.defaultProps={width:"228",height:"258",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"};function Re(){const{t}=O();return e.jsxs(j,{children:[e.jsxs(j,{minHeight:"40vh",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",alignContent:"center",children:[e.jsx(be,{style:{width:250,height:250}}),e.jsx(y,{marginTop:"24px",marginBottom:"24px",children:t("storage.spaces.connect.provider")}),e.jsx(ae,{})]}),e.jsx(y,{fontSize:"1.2rem",fontWeight:"bold",mb:2,children:t("common.dataStorage")}),e.jsx(we,{})]})}Re.propTypes={};var ue={},Ut=oe;Object.defineProperty(ue,"__esModule",{value:!0});var Te=ue.default=void 0,wt=Ut(ne()),bt=e;Te=ue.default=(0,wt.default)((0,bt.jsx)("path",{d:"M6 6v2h8.59L5 17.59 6.41 19 16 9.41V18h2V6z"}),"ArrowOutward");var he={},Rt=oe;Object.defineProperty(he,"__esModule",{value:!0});var Oe=he.default=void 0,Tt=Rt(ne()),Ot=e;Oe=he.default=(0,Tt.default)((0,Ot.jsx)("path",{d:"M14.69 2.21 4.33 11.49c-.64.58-.28 1.65.58 1.73L13 14l-4.85 6.76c-.22.31-.19.74.08 1.01.3.3.77.31 1.08.02l10.36-9.28c.64-.58.28-1.65-.58-1.73L11 10l4.85-6.76c.22-.31.19-.74-.08-1.01-.3-.3-.77-.31-1.08-.02"}),"ElectricBoltOutlined");var me={},Ft=oe;Object.defineProperty(me,"__esModule",{value:!0});var Fe=me.default=void 0,Lt=Ft(ne()),Mt=e;Fe=me.default=(0,Lt.default)((0,Mt.jsx)("path",{d:"m9.17 6 2 2H20v10H4V6zM10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8z"}),"FolderOutlined");function fe({spaceGateway:t,onDelete:s}){const{t:a}=O(),[n,l]=x.useState(!1),[c,o]=x.useState(!1),r=(p,m)=>{p==null||p.preventDefault(),p==null||p.stopPropagation(),l(m)},d=async p=>{try{p==null||p.stopPropagation(),o(!0),await s(t),l(!1)}catch(m){console.error(m),v.error(`${a("storage.space.gateway.delete.failed")}: ${G(m)}`)}finally{o(!1)}};return e.jsxs(e.Fragment,{children:[e.jsxs(_,{color:"red",onClick:p=>r(p,!0),children:[e.jsx($,{style:{minWidth:24,color:"red"},children:e.jsx(At,{fontSize:"small"})}),e.jsx(ee,{style:{color:"red"},children:a("common.delete")})]}),e.jsx(_e,{title:e.jsx(y,{variant:"h6",children:a("common.delConfirmDescription",{data:`${t==null?void 0:t.name}`})}),open:n,confirmButton:{text:a("common.confirm"),props:{variant:"contained",color:"error",loading:c}},cancelButton:{text:a("common.cancel"),props:{variant:"contained",color:"primary"},loading:c},onConfirm:d,onCancel:p=>r(p,!1)})]})}fe.propTypes={onDelete:f.func,spaceGateway:f.shape({name:f.string.isRequired,url:f.string.isRequired,protected:f.bool}).isRequired};fe.defaultProps={onDelete:()=>{}};function xe({spaceGateway:t,connected:s,onDelete:a,onConnect:n,enableSwitchToSpace:l,backupInProgress:c,...o}){const[r,d]=x.useState(null),{t:p}=O(),[m,D]=x.useState(!1),S=(A,k)=>{A.stopPropagation(),A.preventDefault(),d(k&&A.currentTarget)},g=async A=>{try{D(!0),S(A,!1),await n(t)}catch(k){console.error(k),v.error(k.message)}finally{D(!1)}};return e.jsxs(e.Fragment,{children:[e.jsx($e,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions",onClick:A=>S(A,!0),size:"small",...o,children:m||t!=null&&t.loading?e.jsx(Z,{size:"24px"}):e.jsx(St,{})}),e.jsxs(et,{id:"simple-menu",anchorEl:r,keepMounted:!0,open:!!r,onClose:A=>S(A,!1),children:[e.jsxs(_,{onClick:A=>{S(A,!1),window.open(t.endpoint?ft(t.endpoint):t.url)},children:[e.jsx($,{style:{minWidth:24},children:e.jsx(Te,{fontSize:"small"})}),e.jsx(ee,{children:p("common.open")})]}),e.jsxs(_,{onClick:A=>{S(A,!1),window.open(xt(t.endpoint))},children:[e.jsx($,{style:{minWidth:24},children:e.jsx(Fe,{fontSize:"small"})}),e.jsx(ee,{children:p("storage.spaces.strategy.viewBackupFiles")})]}),!s&&l&&e.jsxs(_,{onClick:g,children:[e.jsx($,{style:{minWidth:24},children:e.jsx(Oe,{fontSize:"small"})}),e.jsx(ee,{children:p("storage.spaces.connect.switchToSpace")})]}),!c&&e.jsx(fe,{spaceGateway:t,onDelete:a})]})]})}xe.propTypes={spaceGateway:f.shape({name:f.string.isRequired,url:f.string.isRequired,protected:f.bool,endpoint:f.string.isRequired,loading:f.bool}).isRequired,connected:f.bool.isRequired,enableSwitchToSpace:f.bool,onDelete:f.func,onConnect:f.func,backupInProgress:f.bool};xe.defaultProps={onDelete:()=>{},onConnect:()=>{},enableSwitchToSpace:!0,backupInProgress:!1};var Le=function(s){return e.jsx("svg",{...s,children:e.jsx("circle",{cx:"4",cy:"4",r:"4",fill:"#25C99B"})})};Le.defaultProps={width:"8",height:"8",fill:"none",xmlns:"http://www.w3.org/2000/svg"};var Me=function(s){return e.jsx("svg",{...s,children:e.jsx("circle",{cx:"4",cy:"4",r:"4",fill:"#F16E6E"})})};Me.defaultProps={width:"8",height:"8",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function ge({spaceGateway:t,connected:s,onDelete:a,onBackupNow:n,...l}){const c=tt(b=>b.breakpoints.down("md")),{t:o,locale:r}=O(),{blocklet:d}=P(),{api:p,info:{did:m}}=N(),{appDid:D,appName:S,appDescription:g,scopes:A,appUrl:k,referrer:H}=Ie({blocklet:d}),{updateSpaceGateway:I,backupEndpoint:E,backupProgress:u,refreshBackupEndpoint:F}=Q(),[U,R]=x.useState(!1),[B,T]=x.useState({open:!1,action:"one-click-authorization",checkTimeout:1e3*300,messages:{title:o("storage.spaces.authorize.title",{appName:S},r),scan:o("storage.spaces.authorize.scan",{appName:S},r),confirm:"",success:e.jsx(y,{gutterBottom:!0,children:o("storage.spaces.authorize.success")})},onClose:()=>{T(b=>({...b,open:!1}))}}),{data:h,loading:C}=st(async()=>s?Be(E):!0,{refreshDeps:[s,E,B==null?void 0:B.open,U]}),i=s&&h,w=s&&!U&&h&&!(t!=null&&t.loading),X=s&&U&&h,L=s&&!h&&!C&&!U,W=async()=>{if(await Be(t==null?void 0:t.endpoint)){await p.configBlocklet({input:{did:[d.meta.did],configs:[{key:K.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:t.endpoint}]}}),F(),v.success(o("storage.spaces.connect.switchToSpaceSucceeded",{name:t.name?`(${t.name})`:""}));return}T(Y=>({...Y,open:!0,prefix:V(t.url,"space/api/did"),baseUrl:new URL(t.url).origin,checkFn:le.create({baseURL:V(t.url,"space")}).get,extraParams:{appDid:D,appName:S,appDescription:g,scopes:A,appUrl:k,referrer:H,nodeDid:m,spaceDid:t.did}}))},Je=async(b,Y)=>{const ie=Y(b.endpoint),Qe=se(ie),z=b.space?Y(b.space):{};if(t.did&&Qe!==t.did){T(re=>({...re,open:!1})),v.error(o("storage.spaces.gateway.switch.failedForMismatchSpace",{name:z!=null&&z.name?z.name:""}));return}const He={...t,name:z.name??"DID Space",did:z.did??se(ie),endpoint:ie};await I(He),T(re=>({...re,open:!1}))},Ze=async()=>{try{if(U)return;R(!0),await n()}catch(b){console.error(b),v.error(b.message)}finally{R(!0)}};return x.useEffect(()=>{u!=null&&u.completed?((u==null?void 0:u.progress)===100&&v.success(o("storage.spaces.backupSuccessfully")),R(!1),u.progress=0,u.message=""):u.progress&&R(!0)},[u]),e.jsxs(Nt,{sx:{backgroundColor:s?"#F0FDFF":"inherit","&:hover":{backgroundColor:s?"#F0FDFF":"#FBFBFB"},borderRadius:"8px"},display:"flex",flexDirection:"column",padding:"4px 20px 12px",...l,children:[e.jsxs(j,{display:"flex",alignItems:"center",children:[e.jsxs(j,{flex:1,children:[i&&e.jsxs(y,{color:"primary",fontSize:14,children:[e.jsx(Le,{style:{marginRight:"8px"}}),o("storage.spaces.connected.tag")]}),L&&e.jsxs(y,{color:"error",fontSize:14,children:[e.jsx(Me,{style:{marginRight:"8px"}}),o("storage.spaces.disconnected.tag")]})]}),e.jsx(xe,{sx:{padding:"4px"},spaceGateway:t,connected:s,onDelete:a,onConnect:W,enableSwitchToSpace:(u==null?void 0:u.completed)||J.isEmpty(u==null?void 0:u.message),backupInProgress:X})]}),e.jsxs(j,{display:"flex",children:[e.jsxs(j,{display:"flex",flexDirection:"column",flex:"1",minWidth:0,children:[e.jsx(y,{className:"spaces-name",fontSize:"1rem",fontWeight:"bold",children:t.name}),e.jsx(j,{className:"spaces-address",display:X?"none":"flex",color:"#9397A1",marginTop:"4px",children:e.jsx(y,{sx:{display:"inline-flex",alignItems:"center",fontSize:"14px"},color:"#9397A1",children:t.did&&e.jsx(nt,{copyable:!1,size:14,compact:!0,responsive:!1,did:t.did})})}),e.jsxs(j,{className:"spaces-backup",display:"flex",alignItems:"center",marginTop:"8px",flex:1,children:[w&&e.jsxs(j,{className:"backup-strategy",display:"flex",alignItems:"center",minWidth:"72px",children:[e.jsx(te,{variant:"contained",size:"small",onClick:Ze,children:o("storage.spaces.strategy.backupNow")}),Ct&&e.jsx(De,{name:"enable-auto-backup",title:"coming soon",disabled:!0,labelProps:{label:e.jsx(y,{sx:{marginRight:"8px",fontSize:"16px"},children:e.jsx("span",{children:o("storage.spaces.strategy.autoBackup")})})},style:{marginLeft:"64px"}})]}),X&&e.jsxs(j,{className:"backup-progress",display:"flex",flexDirection:"column",alignItems:"center",marginLeft:c&&"16px",width:"90%",marginRight:"auto",alignSelf:"flex-end",children:[e.jsx(y,{color:"primary",children:u==null?void 0:u.message}),e.jsxs(j,{sx:{display:"flex",alignItems:"center"},width:"100%",children:[e.jsx(j,{sx:{width:"100%",mr:1},children:e.jsx(ot,{color:"primary",variant:"determinate",value:u==null?void 0:u.progress})}),e.jsx(j,{sx:{maxWidth:"100%"},children:e.jsxs(y,{variant:"body2",color:"text.secondary",children:[u==null?void 0:u.progress,"%"]})})]})]}),L&&e.jsx(j,{className:"backup-strategy",display:"flex",alignItems:"center",minWidth:"72px",children:e.jsx(te,{color:"error",variant:"contained",size:"small",onClick:W,children:o("storage.spaces.disconnected.reconnectNow")})})]})]}),e.jsx(pt,{src:gt(t.endpoint),width:"72px",height:"72px"})]}),e.jsx(de,{forceConnected:!1,saveConnect:!1,prefix:B.prefix,open:B.open,popup:!0,action:B.action,baseUrl:B.baseUrl,checkFn:B.checkFn,onSuccess:Je,onClose:B.onClose,checkTimeout:B.checkTimeout,extraParams:B.extraParams,messages:B.messages,locale:r},"get-endpoint"),e.jsx(j,{className:`selected-container ${s?"selected":""}`,children:e.jsx(at,{className:"selected-icon"})})]})}ge.propTypes={spaceGateway:f.shape({did:f.string.isRequired,name:f.string.isRequired,url:f.string.isRequired,endpoint:f.string.isRequired,protected:f.bool,loading:f.bool}).isRequired,connected:f.bool.isRequired,progress:f.any.isRequired,onDelete:f.func,onBackupNow:f.func};ge.defaultProps={onDelete:()=>{},onBackupNow:()=>{}};const Nt=ke(j)`
1
+ import{a0 as J,r as x,bl as N,aP as ve,E as v,M as G,b as K,t as O,j as e,P as f,z as Ke,av as le,q as V,ak as Ve,m as y,Q as j,y as de,D as Ge,B as te,C as Z,x as Xe,K as We,n as ke,f as Ye,l as qe,aK as ne,aL as oe,U as _,aD as $,a8 as ee,a3 as _e,a2 as $e,a$ as et,J as tt,cg as st,W as nt,L as ot,$ as at,H as M,bc as q,i as it,T as ce,ax as rt,hP as ct,G as ye,X as lt,R as dt}from"./index-C87i5P5O.js";import{S as Se}from"./index-CDS9Hial.js";import{u as P}from"./blocklet-DaPMEa6v.js";import"./api-n1RgJfYp.js";import{u as Ie,P as pt}from"./use-blocklet-info-for-connect-did-spaces-COobAHN5.js";import{c as ut,h as ht,e as se,g as Ae,f as mt,i as Ce,j as ft,k as xt,l as Be,d as gt}from"./spaces-DaTfPIZI.js";import{T as jt}from"./TextField-BsNlIaqS.js";import{I as yt}from"./index-CnV8LmTC.js";import{S as De}from"./switch-control-D6307Ep2.js";import{d as St}from"./MoreHoriz-D5pKNfuj.js";import{d as At}from"./DeleteOutline--7c4aVEh.js";import{e as Ct}from"./mode-B2dWMeTO.js";import{D as Bt}from"./index-Xym45k52.js";import"./ExpandMore-dpwD8Lmx.js";import"./ButtonGroup-D47AV17G.js";import"./getValidReactChildren-BY1C2s5l.js";import"./Select-DZPpYZ0d.js";import"./InputLabel-CtuX3xye.js";import"./index-CYfBSsnU.js";import"./useThemeProps-B9dRlIPP.js";import"./index-DI1xj9t6.js";import"./redux-Cf4FUKVZ.js";import"./ViewColumn-Cfa2KTUG.js";import"./Delete-I9FOITt6.js";import"./LastPage-vVLkX2R1.js";import"./Search-DGfKsHG9.js";import"./index-T-64JlMP.js";import"./MoreVert-hA4JYyTS.js";async function vt({blockletDid:t,nodeApi:s,spaceGateways:a}){let n=!1;const l=await Promise.all(a.map(async c=>{let{name:o}=c;const r=await ut(c.endpoint);return!J.isEmpty(r)&&r!==o&&(o=r,n=!0),{...c,name:o}}));return n&&await Promise.all(l.filter(c=>c.did).map(c=>s.updateBlockletSpaceGateway({input:{did:t,where:{did:c.did},spaceGateway:{...c}}}))),l}function kt({setLoading:t,refresh:s}={}){var r;const{blocklet:a}=P(),n=(r=a==null?void 0:a.meta)==null?void 0:r.did,[l,c]=x.useState([]),{api:o}=N();return ve(async()=>{try{if(!n){c([]);return}t==null||t(!0);const{spaceGateways:d}=await o.getBlockletSpaceGateways({input:{did:n}}),p=await vt({blockletDid:n,nodeApi:o,spaceGateways:d});c(p??[])}catch(d){console.error(d),v.error(G(d))}finally{t==null||t(!1)}},[n,s]),{spaceGateways:l}}function Ee({deps:t,setLoading:s}={deps:[],setLoading:()=>{}}){var r;const{blocklet:a}=P(),[n,l]=x.useState([]),{api:c}=N(),o=J.debounce(async()=>{try{if(s(!0),!a){l([]);return}const{backups:d}=await c.getBlockletBackups({input:{did:a.meta.did}});l(d??[])}catch(d){console.error(d),v.error(G(d))}finally{s(!1)}},2e3);return ve(async()=>{o()},[(r=a==null?void 0:a.meta)==null?void 0:r.did].concat(t)),{backups:n}}function It({appDid:t}){const{backups:s}=Ee(),[a,n]=x.useState({message:"",progress:0,completed:!1}),l=N(),{ws:{useSubscription:c}}=l;return c(K.BlockletEvents.backupProgress,o=>{t===(o==null?void 0:o.appDid)&&n(()=>({...o}))},[t]),x.useEffect(()=>{var o;if(s!=null&&s.length&&J.isNull((o=s[0])==null?void 0:o.status)){const[r]=s;n(()=>({message:r.message,progress:r.progress,completed:r.progress>=100}))}},[s]),a}const Ue=x.createContext({}),{Provider:Dt,Consumer:js}=Ue;function pe({children:t}){var C;const{t:s}=O(),{api:a}=N(),{blocklet:n}=P(),[l,c]=x.useState(!1),[o,r]=x.useState(!1),{spaceGateways:d}=kt({refresh:o,setLoading:c}),p=It({appDid:n==null?void 0:n.appDid}),[m,D]=x.useState(!1),S=x.useMemo(()=>ht(n==null?void 0:n.environments),[n,o,m]),[g,A]=x.useState(!1),{backups:k}=Ee({deps:[p],setLoading:A}),[H,I]=x.useState(d==null?void 0:d.find(i=>i.endpoint===S)),E=(C=n==null?void 0:n.settings)==null?void 0:C.autoBackup,u=()=>{r(i=>!i)},F=()=>{D(i=>!i)},U=async i=>{await a.updateAutoBackup({input:{did:n.meta.did,autoBackup:i}})},R=async(i,w)=>{d.push({...i,loading:!0}),await a.addBlockletSpaceGateway({input:{did:n.meta.did,spaceGateway:i}}),S!==w&&await a.configBlocklet({input:{did:[n.meta.did],configs:[{key:K.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:w}]}}),u(),I(i)},B=async i=>{i&&(i.endpoint===S&&(await a.configBlocklet({input:{did:[n.meta.did],configs:[{key:K.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:""}]}}),E!=null&&E.enabled&&await U({enabled:!1})),await a.deleteBlockletSpaceGateway({input:{did:n.meta.did,spaceGatewayDid:i==null?void 0:i.did}}),u(),I(i))},T=async i=>{await a.updateBlockletSpaceGateway({input:{did:n.meta.did,where:{did:i.did},spaceGateway:i}}),S!==i.endpoint&&await a.configBlocklet({input:{did:[n.meta.did],configs:[{key:K.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:i.endpoint}]}}),v.success(s("storage.spaces.connectedWithName",{name:(i==null?void 0:i.name)??"DID Spaces"})),u()},h=i=>(i==null?void 0:i.endpoint)===S;return e.jsx(Dt,{value:{spaceGateways:d,selectedSpaceGateway:H,addSpaceGateway:R,deleteSpaceGateway:B,updateSpaceGateway:T,refreshSpaceGateways:u,spaceGatewaysLoading:l,spaceGatewayIsSelected:h,updateAutoBackup:U,backupEndpoint:S,backupProgress:p,backups:k,backupsLoading:g,refreshBackupEndpoint:F,autoBackup:E},children:t})}pe.propTypes={children:f.any.isRequired};pe.defaultProps={};function Q(){return x.useContext(Ue)}function ae({...t}){const{blocklet:s}=P(),{info:a}=N(),{t:n,locale:l}=O(),[c,o]=x.useState(""),[r,d]=x.useState(!1),[p,m]=x.useState(!1),[D,S]=x.useState(""),g=Ie({blocklet:s}),A=Ke(a),{spaceGateways:k,addSpaceGateway:H}=Q(),[I,E]=x.useState({open:!1,action:"connect-to-did-spaces",checkTimeout:1e3*300,checkFn:le.create({baseURL:V(window.location.origin,Ve())}).get,messages:{title:n("storage.spaces.provideNFT.title",{appName:g.appName},l),scan:n("storage.spaces.provideNFT.scan",{appName:g.appName},l),confirm:"",success:e.jsx(y,{gutterBottom:!0,children:n("storage.spaces.provideNFT.success")})},onClose:()=>{E(h=>({...h,open:!1}))}}),[u,F]=x.useState({open:!1,action:"one-click-authorization",checkTimeout:1e3*300,messages:{title:n("storage.spaces.authorize.title",{appName:g.appName},l),scan:n("storage.spaces.authorize.scan",{appName:g.appName},l),confirm:"",success:e.jsx(y,{gutterBottom:!0,children:n("storage.spaces.authorize.success")})},onClose:()=>{F(h=>({...h,open:!1}))}}),U=async({endpoint:h,name:C,did:i})=>{const w=await Ae(h);if(!await Ce(w)){v.error(n("storage.spaces.gateway.add.invalidUrl"));return}if(k.some(W=>W.endpoint===h)){v.error(n("storage.spaces.gateway.add.duplicate",{name:C}));return}const L={name:C,did:i,url:w,endpoint:h};await H(L,h),v.success(n("storage.spaces.connectedWithName",{name:(L==null?void 0:L.name)??"DID Spaces"}))},R=async(h,C)=>{try{if(!J.isEmpty(h.spaceGateway))await U(C(h.spaceGateway));else{const i=C(h.endpoint),w=h.space?C(h.space):{};await U({endpoint:i,did:se(i),name:"DID Space",...w})}F(i=>({...i,open:!1})),o(null),E(i=>({...i,open:!1}))}catch(i){console.error(i),v.error(G(i))}},B=()=>{E(h=>({...h,open:!0,extraParams:{appPid:s.appPid,appName:g.appName,appDescription:g.appDescription,scopes:g.scopes,appUrl:g.appUrl,referrer:g.referrer,nodeDid:a.did}}))},T=async()=>{try{d(!0);const h=await Ae(c),C=mt(h),i=new URL(h).searchParams.get("spaceDid");if(!await Ce(C))throw new Error(n("storage.spaces.gateway.add.invalidUrl"));F(w=>({...w,open:!0,prefix:V(C,"space/api/did"),baseUrl:new URL(C).origin,checkFn:le.create({baseURL:V(C,"space")}).get,extraParams:{appDid:g.appDid,appName:g.appName,appDescription:g.appDescription,scopes:g.scopes,appUrl:g.appUrl,referrer:g.referrer,nodeDid:a.did,spaceDid:i}})),m(!1)}catch(h){const C=`${n("storage.spaces.gateway.add.failed",l)}: ${G(h)}`;S(C)}finally{d(!1)}};return e.jsxs(j,{children:[e.jsx(Se,{color:"primary",style:{textTransform:"none !important",fontSize:"1rem"},size:"small",onClick:B,menu:[e.jsx(Se.Item,{sx:{textTransform:"none"},onClick:()=>m(!0),size:"small",...t,children:n("storage.spaces.connect.useSpaceGateway")},"1")],children:e.jsx(y,{sx:{fontWeight:"bold",textTransform:"none"},children:n("storage.spaces.connect.useWallet")})}),e.jsx(de,{forceConnected:!1,saveConnect:!1,prefix:I.prefix,open:I.open,popup:!0,action:I.action,webWalletUrl:A,baseUrl:I.baseUrl,checkFn:I.checkFn,onSuccess:R,onClose:I.onClose,checkTimeout:I.checkTimeout,extraParams:I.extraParams,messages:I.messages,locale:l}),e.jsx(de,{forceConnected:!1,saveConnect:!1,prefix:u.prefix,open:u.open,popup:!0,action:u.action,baseUrl:u.baseUrl,checkFn:u.checkFn,onSuccess:R,onClose:u.onClose,checkTimeout:u.checkTimeout,extraParams:u.extraParams,messages:u.messages,locale:l}),e.jsxs(Ge,{title:n("storage.spaces.gateway.add.title"),fullWidth:!0,maxWidth:"md",open:p,onClose:()=>m(!1),PaperProps:{style:{minHeight:"auto"}},actions:e.jsxs(e.Fragment,{children:[e.jsx(te,{onClick:h=>{h.stopPropagation(),m(!1)},color:"inherit",children:n("common.cancel")}),e.jsxs(te,{onClick:T,color:"primary",disabled:r||!c,variant:"contained",autoFocus:!0,children:[r&&e.jsx(Z,{size:16}),n("common.confirm")]})]}),children:[e.jsx("div",{style:{paddingTop:12,overflowY:"hidden"},children:e.jsx(Xe,{component:"div",children:e.jsx(y,{component:"div",children:e.jsx(jt,{label:n("storage.spaces.gateway.add.label"),autoComplete:"off",variant:"outlined",name:"url",fullWidth:!0,value:c,onChange:h=>{S(null),o(h.target.value)},disabled:r,onKeyPress:async h=>{h.key==="Enter"&&await T()},autoFocus:!0})})})}),!!D&&e.jsx(We,{severity:"error",style:{width:"100%"},children:D})]})]})}ae.propTypes={};ae.defaultProps={};function we({...t}){const{t:s}=x.useContext(Ye),{blocklet:a,loadingDiskInfo:n,actions:l}=P();if(x.useEffect(()=>{l.refreshBlocklet({showError:!1,attachDiskInfo:!0})},[]),a.diskInfo){const c=(d,p,m)=>e.jsxs(y,{children:[d," ",e.jsx("strong",{children:p?qe(p):"empty"})]}),o=a.environments.reduce((d,p)=>(d[p.key]=p.value,d),{}),r=[{key:"appDir",name:s("blocklet.diskInfo.appDir"),value:c(o.BLOCKLET_APP_DIR,a.diskInfo.app)},{key:"dataDir",name:s("blocklet.diskInfo.dataDir"),value:c(o.BLOCKLET_DATA_DIR,a.diskInfo.data)},{key:"logDir",name:s("blocklet.diskInfo.logDir"),value:c(o.BLOCKLET_LOG_DIR,a.diskInfo.log)},{key:"cacheDir",name:s("blocklet.diskInfo.cacheDir"),value:c(o.BLOCKLET_CACHE_DIR,a.diskInfo.cache)}];return e.jsx(Et,{component:"div",...t,children:r.map(d=>e.jsx(yt,{valueComponent:"div",nameWidth:120,name:d.name,children:d.value},d.key))})}return n?e.jsx(Z,{}):e.jsx(y,{children:s("blocklet.diskInfo.empty")})}const Et=ke(y)``;var be=function(s){return e.jsxs("svg",{...s,children:[e.jsxs("g",{filter:"url(#a)",children:[e.jsx("path",{d:"M56.97 2a12 12 0 0 0-8.485 3.515l-40.97 40.97A12 12 0 0 0 4 54.971V240c0 6.627 5.373 12 12 12h196c6.627 0 12-5.373 12-12V14c0-6.627-5.373-12-12-12H56.97Z",fill:"#DDD"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m49.192 6.222-40.97 40.97A11 11 0 0 0 5 54.971V240c0 6.075 4.925 11 11 11h196c6.075 0 11-4.925 11-11V14c0-6.075-4.925-11-11-11H56.97a11 11 0 0 0-7.778 3.222Zm-.707-.707A12 12 0 0 1 56.971 2H212c6.627 0 12 5.373 12 12v226c0 6.627-5.373 12-12 12H16c-6.627 0-12-5.373-12-12V54.97a12 12 0 0 1 3.515-8.485l40.97-40.97Z",fill:"#000",fillOpacity:".08"}),e.jsx("mask",{id:"b",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"4",y:"2",width:"220",height:"250",children:e.jsx("path",{d:"M56.97 2a12 12 0 0 0-8.485 3.515l-40.97 40.97A12 12 0 0 0 4 54.971V240c0 6.627 5.373 12 12 12h196c6.627 0 12-5.373 12-12V14c0-6.627-5.373-12-12-12H56.97Z",fill:"#D9D9D9"})}),e.jsxs("g",{mask:"url(#b)",children:[e.jsx("path",{opacity:".5",fill:"url(#c)",d:"M4 2h220v128H4z"}),e.jsx("path",{opacity:".1",fill:"url(#d)",d:"M4 130h220v122H4z"}),e.jsx("path",{d:"M33.045 169h-3.767v-11.636h3.887c1.14 0 2.12.233 2.937.698a4.61 4.61 0 0 1 1.881 1.995c.44.863.659 1.899.659 3.108 0 1.212-.222 2.254-.665 3.125a4.668 4.668 0 0 1-1.909 2.011c-.833.466-1.84.699-3.023.699Zm-2.01-1.534h1.914c.886 0 1.623-.167 2.21-.5a3.152 3.152 0 0 0 1.318-1.46c.292-.64.438-1.421.438-2.341 0-.913-.146-1.688-.438-2.324a3.095 3.095 0 0 0-1.29-1.449c-.572-.33-1.282-.494-2.13-.494h-2.023v8.568Zm11.546-10.102V169h-1.756v-11.636h1.756ZM48.905 169h-3.767v-11.636h3.886c1.14 0 2.12.233 2.938.698a4.609 4.609 0 0 1 1.88 1.995c.44.863.66 1.899.66 3.108 0 1.212-.222 2.254-.665 3.125a4.667 4.667 0 0 1-1.91 2.011c-.833.466-1.84.699-3.022.699Zm-2.011-1.534h1.914c.887 0 1.623-.167 2.21-.5a3.151 3.151 0 0 0 1.319-1.46c.291-.64.437-1.421.437-2.341 0-.913-.146-1.688-.437-2.324a3.095 3.095 0 0 0-1.29-1.449c-.572-.33-1.282-.494-2.13-.494h-2.023v8.568Zm20.372-7.046a1.662 1.662 0 0 0-.75-1.25c-.44-.299-.993-.448-1.66-.448-.477 0-.89.075-1.238.227a1.91 1.91 0 0 0-.813.613c-.189.258-.284.552-.284.881 0 .277.065.515.194.716.132.201.304.369.516.506.216.132.447.244.694.335.246.087.483.159.71.216l1.136.295c.371.091.752.214 1.142.37.39.155.752.36 1.086.613.333.254.602.568.806.944.209.374.313.823.313 1.346 0 .659-.17 1.244-.511 1.756-.338.511-.828.915-1.472 1.21-.64.295-1.415.443-2.324.443-.871 0-1.625-.138-2.261-.415-.637-.276-1.135-.668-1.495-1.176-.36-.511-.558-1.117-.596-1.818h1.761c.034.421.17.771.41 1.051.242.277.55.483.925.62.38.132.794.198 1.245.198.496 0 .937-.077 1.324-.233.39-.159.697-.378.92-.659a1.56 1.56 0 0 0 .335-.994c0-.345-.098-.627-.295-.847a2.191 2.191 0 0 0-.79-.545 7.725 7.725 0 0 0-1.12-.381l-1.374-.375c-.932-.253-1.67-.627-2.216-1.119-.542-.492-.813-1.144-.813-1.955 0-.67.182-1.255.546-1.755.363-.5.856-.888 1.477-1.165.621-.28 1.322-.42 2.102-.42.788 0 1.483.138 2.085.414.607.277 1.084.658 1.432 1.142.349.481.53 1.034.546 1.659h-1.693Zm3.813 11.853v-12h1.66v1.415h.142c.098-.182.24-.393.426-.631.185-.239.443-.447.772-.625.33-.182.766-.273 1.307-.273.705 0 1.334.178 1.887.534.553.356.987.869 1.3 1.54.319.67.478 1.477.478 2.42 0 .944-.157 1.752-.472 2.427-.314.67-.746 1.187-1.295 1.551-.55.36-1.176.539-1.88.539-.53 0-.965-.089-1.302-.267a2.457 2.457 0 0 1-.784-.625 4.667 4.667 0 0 1-.437-.636h-.103v4.631H71.08Zm1.665-7.637c0 .614.09 1.152.267 1.614.178.462.436.824.773 1.085.337.258.75.387 1.239.387.507 0 .931-.135 1.273-.404.34-.273.598-.642.772-1.108.178-.466.267-.99.267-1.574 0-.575-.087-1.092-.261-1.551-.17-.458-.428-.82-.773-1.085-.34-.265-.767-.398-1.278-.398-.493 0-.91.127-1.25.381-.337.254-.593.608-.767 1.062-.175.455-.262.985-.262 1.591Zm10.75 4.557a3.557 3.557 0 0 1-1.5-.307 2.523 2.523 0 0 1-1.062-.903c-.258-.394-.386-.877-.386-1.449 0-.492.094-.898.283-1.216.19-.318.446-.57.768-.756a4.036 4.036 0 0 1 1.08-.42c.397-.095.802-.167 1.215-.216l1.273-.148c.325-.041.562-.108.71-.198.148-.091.222-.239.222-.444v-.039c0-.497-.14-.881-.42-1.154-.277-.273-.69-.409-1.24-.409-.572 0-1.022.127-1.352.381-.325.25-.55.528-.676.835l-1.597-.364c.19-.53.466-.958.83-1.284.368-.329.79-.568 1.267-.716.477-.151.98-.227 1.506-.227.348 0 .718.042 1.108.125.394.08.761.227 1.102.443.345.216.627.525.847.926.22.398.33.915.33 1.552V169h-1.66v-1.193h-.068c-.11.22-.275.435-.495.648-.22.212-.501.388-.846.528s-.758.21-1.239.21Zm.37-1.363c.47 0 .87-.093 1.204-.279.337-.185.593-.428.767-.727.178-.303.267-.627.267-.972v-1.125c-.06.061-.178.118-.352.171-.17.049-.365.093-.585.13-.22.034-.434.067-.642.097l-.523.068c-.33.042-.63.112-.903.21a1.553 1.553 0 0 0-.648.427c-.16.181-.239.424-.239.727 0 .42.156.738.466.954.31.212.707.319 1.188.319Zm9.876 1.346c-.845 0-1.572-.191-2.182-.574a3.796 3.796 0 0 1-1.398-1.596c-.325-.678-.488-1.455-.488-2.33 0-.886.166-1.668.5-2.346a3.832 3.832 0 0 1 1.409-1.597c.606-.383 1.32-.574 2.142-.574.663 0 1.254.123 1.773.369.519.243.937.584 1.255 1.023.322.44.514.953.574 1.54h-1.653c-.091-.409-.3-.761-.625-1.057-.322-.295-.754-.443-1.296-.443a2.11 2.11 0 0 0-1.244.375c-.352.246-.627.598-.824 1.057-.197.454-.295.992-.295 1.613 0 .637.096 1.186.29 1.648.193.462.466.82.818 1.074.356.254.774.381 1.255.381.322 0 .614-.059.875-.177.266-.121.487-.293.665-.517.182-.223.309-.492.38-.806h1.654a3.211 3.211 0 0 1-.55 1.511 3.165 3.165 0 0 1-1.234 1.045c-.511.254-1.111.381-1.8.381Zm9.163 0c-.859 0-1.6-.184-2.221-.551a3.732 3.732 0 0 1-1.432-1.563c-.333-.674-.5-1.464-.5-2.369 0-.894.167-1.682.5-2.363a3.887 3.887 0 0 1 1.409-1.597c.606-.383 1.314-.574 2.125-.574.493 0 .97.082 1.432.244.462.163.877.419 1.244.767.368.349.657.802.87 1.358.212.553.318 1.226.318 2.017v.603H99.71v-1.273h5.273c0-.447-.091-.843-.273-1.187a2.052 2.052 0 0 0-.767-.824c-.326-.201-.708-.302-1.148-.302a2.22 2.22 0 0 0-1.25.353 2.364 2.364 0 0 0-.818.909 2.626 2.626 0 0 0-.284 1.21v.994c0 .584.102 1.08.307 1.489.208.409.498.722.869.938.372.212.805.318 1.301.318a2.7 2.7 0 0 0 .881-.137c.265-.094.494-.234.688-.42.193-.186.341-.415.443-.688l1.608.29c-.129.474-.36.888-.693 1.244-.33.353-.745.627-1.245.824-.496.194-1.062.29-1.699.29Z",fill:"#fff"}),e.jsx("path",{d:"M117.604 47.263 121.523 45h14.267v41.862h-14.267l-15.335-8.854V53.854l1.818-1.05 3.2 1.848-1.818 1.05V76.16l12.993 7.502h10.209V48.2h-10.209l-1.577.91-3.2-1.847Z",fill:"url(#e)"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M119.402 76.16V55.701L106.409 48.2H96.2v35.462h10.209l1.582-.913 3.2 1.847-3.924 2.266H93V45h14.267l15.335 8.854v24.154l-1.813 1.046-3.2-1.847 1.813-1.047Z",fill:"url(#f)"}),e.jsxs("g",{clipPath:"url(#g)",fillRule:"evenodd",clipRule:"evenodd",fill:"#fff",children:[e.jsx("path",{d:"m50.928 216.089 1.034 2.852h-2.503l1.028-2.842a4.95 4.95 0 0 0 .107-.338 7.17 7.17 0 0 0 .111-.409c.075.297.15.542.223.737Zm2.28 5.591h.796l-2.775-7.352h-1.043l-2.774 7.352h.795a.338.338 0 0 0 .223-.077.425.425 0 0 0 .127-.179l.615-1.705h3.07l.617 1.705a.399.399 0 0 0 .126.184.339.339 0 0 0 .223.072Zm4.823-.963a2.023 2.023 0 0 1-.67.098h-1.455v-2.453h1.456c.5 0 .871.106 1.11.318.24.208.36.495.36.86 0 .184-.028.355-.083.512a1.005 1.005 0 0 1-.262.399 1.2 1.2 0 0 1-.456.266Zm-2.125-3.128v-2.406h1.237c.498 0 .865.095 1.101.286.236.192.355.497.355.917 0 .369-.125.662-.374.881-.246.215-.623.322-1.13.322h-1.189Zm2.358-3.128a4.106 4.106 0 0 0-1.12-.133h-2.27v7.352h2.507c.391 0 .74-.051 1.048-.154.307-.102.566-.247.776-.435.21-.188.37-.409.48-.665.11-.26.165-.547.165-.861 0-.904-.506-1.462-1.518-1.674.22-.075.41-.169.572-.281a1.79 1.79 0 0 0 .403-.379c.106-.144.186-.297.237-.461.052-.164.078-.335.078-.512a2.1 2.1 0 0 0-.146-.804 1.49 1.49 0 0 0-.441-.609 2.073 2.073 0 0 0-.771-.384Zm7.535.778h-2.212v6.441h-1.028v-6.441h-2.222v-.911H65.8v.911Zm2.439.564h-1.13v1.193h1.13v-1.193Zm-1.13 2.983h1.13v1.193h-1.13v-1.193Z",fillOpacity:".8"}),e.jsx("path",{d:"M28.247 221.771V214h3.894c.99.072 1.765.944 1.765 1.998v3.77c0 1.106-.85 2.003-1.897 2.003h-3.762ZM36.355 214h-1.011v7.783h1.01V214Zm-7.097 6.704v-5.642h2.751c.49 0 .886.419.886.936v3.77c0 .517-.396.936-.886.936h-2.75ZM37.775 214v7.771h3.762c1.047 0 1.897-.897 1.897-2.003v-3.77c0-1.054-.774-1.926-1.765-1.998h-3.894Zm6.946 1.803h1.13v1.193h-1.13v-1.193Zm1.13 2.983h-1.13v1.193h1.13v-1.193Zm-7.065-3.724v5.642h2.75c.49 0 .887-.419.887-.936v-3.77c0-.517-.397-.936-.886-.936h-2.751Z"})]}),e.jsx("circle",{cx:"191.32",cy:"218",r:"10",fill:"url(#h)"}),e.jsx("path",{d:"m192.064 213.333.976-.564h3.554v10.427h-3.286a1 1 0 0 1-.5-.134l-3.588-2.071v-6.016l.453-.262.797.46-.453.262v5.096l3.237 1.868h2.543v-8.833h-2.543l-.393.227-.797-.46Z",fill:"#fff"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M192.512 220.531v-5.096l-3.237-1.869h-2.543v8.833h2.543l.394-.227.797.46-.977.564h-3.554v-10.427h3.554l3.82 2.206v6.016l-.452.261-.797-.461.452-.26Z",fill:"#fff"})]})]}),e.jsxs("defs",{children:[e.jsxs("linearGradient",{id:"d",x1:"114",y1:"130",x2:"114",y2:"252",gradientUnits:"userSpaceOnUse",children:[e.jsx("stop",{stopColor:"#101010"}),e.jsx("stop",{offset:"1",stopColor:"#272727"})]}),e.jsxs("linearGradient",{id:"e",x1:"120.989",y1:"45",x2:"120.989",y2:"86.862",gradientUnits:"userSpaceOnUse",children:[e.jsx("stop",{stopColor:"#fff",stopOpacity:".4"}),e.jsx("stop",{offset:"1",stopColor:"#fff"})]}),e.jsxs("linearGradient",{id:"f",x1:"107.801",y1:"45",x2:"107.801",y2:"86.862",gradientUnits:"userSpaceOnUse",children:[e.jsx("stop",{stopColor:"#fff"}),e.jsx("stop",{offset:"1",stopColor:"#fff",stopOpacity:".4"})]}),e.jsxs("radialGradient",{id:"h",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"matrix(17 -8.76924 6.97565 13.52294 183.166 221)",children:[e.jsx("stop",{stopColor:"#016BED"}),e.jsx("stop",{offset:".699",stopColor:"#4498FB"}),e.jsx("stop",{offset:"1",stopColor:"#9DFFE8"})]}),e.jsx("clipPath",{id:"g",children:e.jsx("path",{fill:"#fff",transform:"translate(28 214)",d:"M0 0h40.32v8H0z"})}),e.jsx("pattern",{id:"c",patternContentUnits:"objectBoundingBox",width:"1",height:"1",children:e.jsx("use",{xlinkHref:"#i",transform:"scale(.00455 .00781)"})}),e.jsxs("filter",{id:"a",x:"0",y:"0",width:"228",height:"258",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:"2"}),e.jsx("feGaussianBlur",{stdDeviation:"2"}),e.jsx("feComposite",{in2:"hardAlpha",operator:"out"}),e.jsx("feColorMatrix",{values:"0 0 0 0 0.0631944 0 0 0 0 0.242785 0 0 0 0 0.403472 0 0 0 0.2 0"}),e.jsx("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_1410_22507"}),e.jsx("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_1410_22507",result:"shape"})]}),e.jsx("image",{id:"i",width:"220",height:"128",xlinkHref:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANwAAACABAMAAACSOBo+AAAAG1BMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACUUeIgAAAACXRSTlMSFhkOHAsfCCOMH5MiAAAjjElEQVRo3hTQO3sjRRBG4a+qWzJhVfdIJqzuGXsJe2bkJe0e2UA4shdIJS2X1LBcUpbL/wae5yQnfVHGjp2+V08yKR7OwBDYte8pi5Aq9DObSBouqN9cidZyusonzWtGJO13phLebEn6xKEnlYyXe5hnySc53Ym9Abn7crTse8r7BMeIB8yBOVZK0trMjxT5S/cgc9G63BQqZoF3xSYZYeRk2hoIvEBFA7XMtaaF8TdY1GjiDDqgEswRDlWnRtmYzl5zRUq3sx3I+JL7sBJKXchDGJY9D+SfHAIoA+TuHCyYYYFjkhNB8tO5hhju0ANjdCITLx4/JDL+yyP0ErZR+m3M322bY8OKHzoOcAXLQMBHiIh+X59pv6udCJ7MAV9HARPtTEuFSdAzNVn7uPmkk3TpBGHb8DJZ3p36ScsuJVFQP6CUBXimN3BABZJUiEwBOMsHUisZiXU8k3bVSTrPcHsKEEg8gV/vP7U26vRWhl2UnfEbX3VlVbRHgSwmcy2tWTjsxmIb4YjgbAkmpyEOINs1gCtSC4YsjwnY9l1MJYRz1NMk5NAC3MffnLwiHnNH7IoyER5VEI6S4Um++uKyho0BwmD+1rA90yarpO4ZpjLgs8+BTUfU9w+gkwEi6ftxqyB9Wt6IBstE0E8kxJLeKaVhNA/uEwIslv1JmRwcSzAo+URPCF5M8AGzEF8yG+QVBFl53FqhfYqd7/PM6AmJouW4cVge9pZuMJga2NQH918Sp4VIXddVCKizUTFu3CbUMxyxgOUoSpidf+JEuRy/g3EyyCTz0yw2KRGtDs4fE8btEktCKZzL3J6mFoLZdlcJKLW33guKRC44aAhkhSWKMOT5uF2kd283asHcBt5C15MVUJUPpX5RiAcSZ0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d5gh6FGiCAGzqFk6on9pQdSAQzkctDTtXGbDih5iRPVIk9TwCJGwP3tpATkHsNwloUilnNMFce7twgDgrgWhsE8jWW+EBLlTDMn9pmtJOefTJc6Cxld039TN4XiwL4pMtU+8tXJ4g/LghG5APdF7/e3FSi4v8vnEBiIEm+5LlZtsk2LbbbY5hN9JkkJkd5BjQFPoUcwjJdTm0mx0024NmOvVgxASvU9TonFxUqG8cUTy3m5s3i7BqLbFkKcfxLQYhAXfjam0yFFd3PZE9wlXWfHYKlg2cFlTcnwRH6z8DpSfQHidMhElmCMb07li9ceHQHFknk/98f4KJRLpX6xQEXVAnJxlr8Aw6/qb0wu9SNolstScB0izxmMC5DiytBJd9Rcm3RGf42aiddmUTM4d4dgdjiT+vMPX0/RzfZdLoZ4aQqPzhx9plNI3QyvsMZHn2j2wOECoTtkfJt89O+eYUnXB/gFxHxPmOeL9ogAAAABJRU5ErkJggg=="})]})]})};be.defaultProps={width:"228",height:"258",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"};function Re(){const{t}=O();return e.jsxs(j,{children:[e.jsxs(j,{minHeight:"40vh",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",alignContent:"center",children:[e.jsx(be,{style:{width:250,height:250}}),e.jsx(y,{marginTop:"24px",marginBottom:"24px",children:t("storage.spaces.connect.provider")}),e.jsx(ae,{})]}),e.jsx(y,{fontSize:"1.2rem",fontWeight:"bold",mb:2,children:t("common.dataStorage")}),e.jsx(we,{})]})}Re.propTypes={};var ue={},Ut=oe;Object.defineProperty(ue,"__esModule",{value:!0});var Te=ue.default=void 0,wt=Ut(ne()),bt=e;Te=ue.default=(0,wt.default)((0,bt.jsx)("path",{d:"M6 6v2h8.59L5 17.59 6.41 19 16 9.41V18h2V6z"}),"ArrowOutward");var he={},Rt=oe;Object.defineProperty(he,"__esModule",{value:!0});var Oe=he.default=void 0,Tt=Rt(ne()),Ot=e;Oe=he.default=(0,Tt.default)((0,Ot.jsx)("path",{d:"M14.69 2.21 4.33 11.49c-.64.58-.28 1.65.58 1.73L13 14l-4.85 6.76c-.22.31-.19.74.08 1.01.3.3.77.31 1.08.02l10.36-9.28c.64-.58.28-1.65-.58-1.73L11 10l4.85-6.76c.22-.31.19-.74-.08-1.01-.3-.3-.77-.31-1.08-.02"}),"ElectricBoltOutlined");var me={},Ft=oe;Object.defineProperty(me,"__esModule",{value:!0});var Fe=me.default=void 0,Lt=Ft(ne()),Mt=e;Fe=me.default=(0,Lt.default)((0,Mt.jsx)("path",{d:"m9.17 6 2 2H20v10H4V6zM10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8z"}),"FolderOutlined");function fe({spaceGateway:t,onDelete:s}){const{t:a}=O(),[n,l]=x.useState(!1),[c,o]=x.useState(!1),r=(p,m)=>{p==null||p.preventDefault(),p==null||p.stopPropagation(),l(m)},d=async p=>{try{p==null||p.stopPropagation(),o(!0),await s(t),l(!1)}catch(m){console.error(m),v.error(`${a("storage.space.gateway.delete.failed")}: ${G(m)}`)}finally{o(!1)}};return e.jsxs(e.Fragment,{children:[e.jsxs(_,{color:"red",onClick:p=>r(p,!0),children:[e.jsx($,{style:{minWidth:24,color:"red"},children:e.jsx(At,{fontSize:"small"})}),e.jsx(ee,{style:{color:"red"},children:a("common.delete")})]}),e.jsx(_e,{title:e.jsx(y,{variant:"h6",children:a("common.delConfirmDescription",{data:`${t==null?void 0:t.name}`})}),open:n,confirmButton:{text:a("common.confirm"),props:{variant:"contained",color:"error",loading:c}},cancelButton:{text:a("common.cancel"),props:{variant:"contained",color:"primary"},loading:c},onConfirm:d,onCancel:p=>r(p,!1)})]})}fe.propTypes={onDelete:f.func,spaceGateway:f.shape({name:f.string.isRequired,url:f.string.isRequired,protected:f.bool}).isRequired};fe.defaultProps={onDelete:()=>{}};function xe({spaceGateway:t,connected:s,onDelete:a,onConnect:n,enableSwitchToSpace:l,backupInProgress:c,...o}){const[r,d]=x.useState(null),{t:p}=O(),[m,D]=x.useState(!1),S=(A,k)=>{A.stopPropagation(),A.preventDefault(),d(k&&A.currentTarget)},g=async A=>{try{D(!0),S(A,!1),await n(t)}catch(k){console.error(k),v.error(k.message)}finally{D(!1)}};return e.jsxs(e.Fragment,{children:[e.jsx($e,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions",onClick:A=>S(A,!0),size:"small",...o,children:m||t!=null&&t.loading?e.jsx(Z,{size:"24px"}):e.jsx(St,{})}),e.jsxs(et,{id:"simple-menu",anchorEl:r,keepMounted:!0,open:!!r,onClose:A=>S(A,!1),children:[e.jsxs(_,{onClick:A=>{S(A,!1),window.open(t.endpoint?ft(t.endpoint):t.url)},children:[e.jsx($,{style:{minWidth:24},children:e.jsx(Te,{fontSize:"small"})}),e.jsx(ee,{children:p("common.open")})]}),e.jsxs(_,{onClick:A=>{S(A,!1),window.open(xt(t.endpoint))},children:[e.jsx($,{style:{minWidth:24},children:e.jsx(Fe,{fontSize:"small"})}),e.jsx(ee,{children:p("storage.spaces.strategy.viewBackupFiles")})]}),!s&&l&&e.jsxs(_,{onClick:g,children:[e.jsx($,{style:{minWidth:24},children:e.jsx(Oe,{fontSize:"small"})}),e.jsx(ee,{children:p("storage.spaces.connect.switchToSpace")})]}),!c&&e.jsx(fe,{spaceGateway:t,onDelete:a})]})]})}xe.propTypes={spaceGateway:f.shape({name:f.string.isRequired,url:f.string.isRequired,protected:f.bool,endpoint:f.string.isRequired,loading:f.bool}).isRequired,connected:f.bool.isRequired,enableSwitchToSpace:f.bool,onDelete:f.func,onConnect:f.func,backupInProgress:f.bool};xe.defaultProps={onDelete:()=>{},onConnect:()=>{},enableSwitchToSpace:!0,backupInProgress:!1};var Le=function(s){return e.jsx("svg",{...s,children:e.jsx("circle",{cx:"4",cy:"4",r:"4",fill:"#25C99B"})})};Le.defaultProps={width:"8",height:"8",fill:"none",xmlns:"http://www.w3.org/2000/svg"};var Me=function(s){return e.jsx("svg",{...s,children:e.jsx("circle",{cx:"4",cy:"4",r:"4",fill:"#F16E6E"})})};Me.defaultProps={width:"8",height:"8",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function ge({spaceGateway:t,connected:s,onDelete:a,onBackupNow:n,...l}){const c=tt(b=>b.breakpoints.down("md")),{t:o,locale:r}=O(),{blocklet:d}=P(),{api:p,info:{did:m}}=N(),{appDid:D,appName:S,appDescription:g,scopes:A,appUrl:k,referrer:H}=Ie({blocklet:d}),{updateSpaceGateway:I,backupEndpoint:E,backupProgress:u,refreshBackupEndpoint:F}=Q(),[U,R]=x.useState(!1),[B,T]=x.useState({open:!1,action:"one-click-authorization",checkTimeout:1e3*300,messages:{title:o("storage.spaces.authorize.title",{appName:S},r),scan:o("storage.spaces.authorize.scan",{appName:S},r),confirm:"",success:e.jsx(y,{gutterBottom:!0,children:o("storage.spaces.authorize.success")})},onClose:()=>{T(b=>({...b,open:!1}))}}),{data:h,loading:C}=st(async()=>s?Be(E):!0,{refreshDeps:[s,E,B==null?void 0:B.open,U]}),i=s&&h,w=s&&!U&&h&&!(t!=null&&t.loading),X=s&&U&&h,L=s&&!h&&!C&&!U,W=async()=>{if(await Be(t==null?void 0:t.endpoint)){await p.configBlocklet({input:{did:[d.meta.did],configs:[{key:K.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:t.endpoint}]}}),F(),v.success(o("storage.spaces.connect.switchToSpaceSucceeded",{name:t.name?`(${t.name})`:""}));return}T(Y=>({...Y,open:!0,prefix:V(t.url,"space/api/did"),baseUrl:new URL(t.url).origin,checkFn:le.create({baseURL:V(t.url,"space")}).get,extraParams:{appDid:D,appName:S,appDescription:g,scopes:A,appUrl:k,referrer:H,nodeDid:m,spaceDid:t.did}}))},Je=async(b,Y)=>{const ie=Y(b.endpoint),Qe=se(ie),z=b.space?Y(b.space):{};if(t.did&&Qe!==t.did){T(re=>({...re,open:!1})),v.error(o("storage.spaces.gateway.switch.failedForMismatchSpace",{name:z!=null&&z.name?z.name:""}));return}const He={...t,name:z.name??"DID Space",did:z.did??se(ie),endpoint:ie};await I(He),T(re=>({...re,open:!1}))},Ze=async()=>{try{if(U)return;R(!0),await n()}catch(b){console.error(b),v.error(b.message)}finally{R(!0)}};return x.useEffect(()=>{u!=null&&u.completed?((u==null?void 0:u.progress)===100&&v.success(o("storage.spaces.backupSuccessfully")),R(!1),u.progress=0,u.message=""):u.progress&&R(!0)},[u]),e.jsxs(Nt,{sx:{backgroundColor:s?"#F0FDFF":"inherit","&:hover":{backgroundColor:s?"#F0FDFF":"#FBFBFB"},borderRadius:"8px"},display:"flex",flexDirection:"column",padding:"4px 20px 12px",...l,children:[e.jsxs(j,{display:"flex",alignItems:"center",children:[e.jsxs(j,{flex:1,children:[i&&e.jsxs(y,{color:"primary",fontSize:14,children:[e.jsx(Le,{style:{marginRight:"8px"}}),o("storage.spaces.connected.tag")]}),L&&e.jsxs(y,{color:"error",fontSize:14,children:[e.jsx(Me,{style:{marginRight:"8px"}}),o("storage.spaces.disconnected.tag")]})]}),e.jsx(xe,{sx:{padding:"4px"},spaceGateway:t,connected:s,onDelete:a,onConnect:W,enableSwitchToSpace:(u==null?void 0:u.completed)||J.isEmpty(u==null?void 0:u.message),backupInProgress:X})]}),e.jsxs(j,{display:"flex",children:[e.jsxs(j,{display:"flex",flexDirection:"column",flex:"1",minWidth:0,children:[e.jsx(y,{className:"spaces-name",fontSize:"1rem",fontWeight:"bold",children:t.name}),e.jsx(j,{className:"spaces-address",display:X?"none":"flex",color:"#9397A1",marginTop:"4px",children:e.jsx(y,{sx:{display:"inline-flex",alignItems:"center",fontSize:"14px"},color:"#9397A1",children:t.did&&e.jsx(nt,{copyable:!1,size:14,compact:!0,responsive:!1,did:t.did})})}),e.jsxs(j,{className:"spaces-backup",display:"flex",alignItems:"center",marginTop:"8px",flex:1,children:[w&&e.jsxs(j,{className:"backup-strategy",display:"flex",alignItems:"center",minWidth:"72px",children:[e.jsx(te,{variant:"contained",size:"small",onClick:Ze,children:o("storage.spaces.strategy.backupNow")}),Ct&&e.jsx(De,{name:"enable-auto-backup",title:"coming soon",disabled:!0,labelProps:{label:e.jsx(y,{sx:{marginRight:"8px",fontSize:"16px"},children:e.jsx("span",{children:o("storage.spaces.strategy.autoBackup")})})},style:{marginLeft:"64px"}})]}),X&&e.jsxs(j,{className:"backup-progress",display:"flex",flexDirection:"column",alignItems:"center",marginLeft:c&&"16px",width:"90%",marginRight:"auto",alignSelf:"flex-end",children:[e.jsx(y,{color:"primary",children:u==null?void 0:u.message}),e.jsxs(j,{sx:{display:"flex",alignItems:"center"},width:"100%",children:[e.jsx(j,{sx:{width:"100%",mr:1},children:e.jsx(ot,{color:"primary",variant:"determinate",value:u==null?void 0:u.progress})}),e.jsx(j,{sx:{maxWidth:"100%"},children:e.jsxs(y,{variant:"body2",color:"text.secondary",children:[u==null?void 0:u.progress,"%"]})})]})]}),L&&e.jsx(j,{className:"backup-strategy",display:"flex",alignItems:"center",minWidth:"72px",children:e.jsx(te,{color:"error",variant:"contained",size:"small",onClick:W,children:o("storage.spaces.disconnected.reconnectNow")})})]})]}),e.jsx(pt,{src:gt(t.endpoint),width:"72px",height:"72px"})]}),e.jsx(de,{forceConnected:!1,saveConnect:!1,prefix:B.prefix,open:B.open,popup:!0,action:B.action,baseUrl:B.baseUrl,checkFn:B.checkFn,onSuccess:Je,onClose:B.onClose,checkTimeout:B.checkTimeout,extraParams:B.extraParams,messages:B.messages,locale:r},"get-endpoint"),e.jsx(j,{className:`selected-container ${s?"selected":""}`,children:e.jsx(at,{className:"selected-icon"})})]})}ge.propTypes={spaceGateway:f.shape({did:f.string.isRequired,name:f.string.isRequired,url:f.string.isRequired,endpoint:f.string.isRequired,protected:f.bool,loading:f.bool}).isRequired,connected:f.bool.isRequired,progress:f.any.isRequired,onDelete:f.func,onBackupNow:f.func};ge.defaultProps={onDelete:()=>{},onBackupNow:()=>{}};const Nt=ke(j)`
2
2
  box-sizing: border-box;
3
3
  position: relative;
4
4
  min-height: 136px;
@@ -1,3 +1,3 @@
1
- import{l as q}from"./lottie-CtZDSDCx.js";import{r as D,bb as z}from"./index-B1ahK-2I.js";function G(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,u,c,i,b=[],f=!0,A=!1;try{if(c=(r=r.call(t)).next,e!==0)for(;!(f=(n=c.call(r)).done)&&(b.push(n.value),b.length!==e);f=!0);}catch(g){A=!0,u=g}finally{try{if(!f&&r.return!=null&&(i=r.return(),Object(i)!==i))return}finally{if(A)throw u}}return b}}function E(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),r.push.apply(r,n)}return r}function I(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?E(Object(r),!0).forEach(function(n){J(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):E(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function J(t,e,r){return e=ae(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Q(t,e){if(t==null)return{};var r={},n=Object.keys(t),u,c;for(c=0;c<n.length;c++)u=n[c],!(e.indexOf(u)>=0)&&(r[u]=t[u]);return r}function x(t,e){if(t==null)return{};var r=Q(t,e),n,u;if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(t);for(u=0;u<c.length;u++)n=c[u],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function Z(t,e){return ee(t)||G(t,e)||te(t,e)||ne()}function ee(t){if(Array.isArray(t))return t}function te(t,e){if(t){if(typeof t=="string")return j(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return j(t,e)}}function j(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function ne(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{l as q}from"./lottie-Duv0wu-W.js";import{r as D,bb as z}from"./index-C87i5P5O.js";function G(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,u,c,i,b=[],f=!0,A=!1;try{if(c=(r=r.call(t)).next,e!==0)for(;!(f=(n=c.call(r)).done)&&(b.push(n.value),b.length!==e);f=!0);}catch(g){A=!0,u=g}finally{try{if(!f&&r.return!=null&&(i=r.return(),Object(i)!==i))return}finally{if(A)throw u}}return b}}function E(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),r.push.apply(r,n)}return r}function I(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?E(Object(r),!0).forEach(function(n){J(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):E(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function J(t,e,r){return e=ae(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Q(t,e){if(t==null)return{};var r={},n=Object.keys(t),u,c;for(c=0;c<n.length;c++)u=n[c],!(e.indexOf(u)>=0)&&(r[u]=t[u]);return r}function x(t,e){if(t==null)return{};var r=Q(t,e),n,u;if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(t);for(u=0;u<c.length;u++)n=c[u],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function Z(t,e){return ee(t)||G(t,e)||te(t,e)||ne()}function ee(t){if(Array.isArray(t))return t}function te(t,e){if(t){if(typeof t=="string")return j(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return j(t,e)}}function j(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function ne(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function re(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function ae(t){var e=re(t,"string");return typeof e=="symbol"?e:String(e)}var oe=["animationData","loop","autoplay","initialSegment","onComplete","onLoopComplete","onEnterFrame","onSegmentStart","onConfigReady","onDataReady","onDataFailed","onLoadedImages","onDOMLoaded","onDestroy","lottieRef","renderer","name","assetsPath","rendererSettings"],ie=function(e,r){var n=e.animationData,u=e.loop,c=e.autoplay,i=e.initialSegment,b=e.onComplete,f=e.onLoopComplete,A=e.onEnterFrame,g=e.onSegmentStart,O=e.onConfigReady,w=e.onDataReady,h=e.onDataFailed,l=e.onLoadedImages,L=e.onDOMLoaded,S=e.onDestroy;e.lottieRef,e.renderer,e.name,e.assetsPath,e.rendererSettings;var p=x(e,oe),P=D.useState(!1),s=Z(P,2),C=s[0],_=s[1],o=D.useRef(),v=D.useRef(null),H=function(){var a;(a=o.current)===null||a===void 0||a.play()},M=function(){var a;(a=o.current)===null||a===void 0||a.stop()},F=function(){var a;(a=o.current)===null||a===void 0||a.pause()},V=function(a){var d;(d=o.current)===null||d===void 0||d.setSpeed(a)},N=function(a,d){var m;(m=o.current)===null||m===void 0||m.goToAndPlay(a,d)},B=function(a,d){var m;(m=o.current)===null||m===void 0||m.goToAndStop(a,d)},$=function(a){var d;(d=o.current)===null||d===void 0||d.setDirection(a)},k=function(a,d){var m;(m=o.current)===null||m===void 0||m.playSegments(a,d)},W=function(a){var d;(d=o.current)===null||d===void 0||d.setSubframe(a)},K=function(a){var d;return(d=o.current)===null||d===void 0?void 0:d.getDuration(a)},U=function(){var a;(a=o.current)===null||a===void 0||a.destroy(),o.current=void 0},X=function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},d;if(v.current){(d=o.current)===null||d===void 0||d.destroy();var m=I(I(I({},e),a),{},{container:v.current});return o.current=q.loadAnimation(m),_(!!o.current),function(){var R;(R=o.current)===null||R===void 0||R.destroy(),o.current=void 0}}};D.useEffect(function(){var y=X();return function(){return y==null?void 0:y()}},[n,u]),D.useEffect(function(){o.current&&(o.current.autoplay=!!c)},[c]),D.useEffect(function(){if(o.current){if(!i){o.current.resetSegments(!0);return}!Array.isArray(i)||!i.length||((o.current.currentRawFrame<i[0]||o.current.currentRawFrame>i[1])&&(o.current.currentRawFrame=i[0]),o.current.setSegment(i[0],i[1]))}},[i]),D.useEffect(function(){var y=[{name:"complete",handler:b},{name:"loopComplete",handler:f},{name:"enterFrame",handler:A},{name:"segmentStart",handler:g},{name:"config_ready",handler:O},{name:"data_ready",handler:w},{name:"data_failed",handler:h},{name:"loaded_images",handler:l},{name:"DOMLoaded",handler:L},{name:"destroy",handler:S}],a=y.filter(function(m){return m.handler!=null});if(a.length){var d=a.map(function(m){var R;return(R=o.current)===null||R===void 0||R.addEventListener(m.name,m.handler),function(){var T;(T=o.current)===null||T===void 0||T.removeEventListener(m.name,m.handler)}});return function(){d.forEach(function(m){return m()})}}},[b,f,A,g,O,w,h,l,L,S]);var Y=z.createElement("div",I({style:r,ref:v},p));return{View:Y,play:H,stop:M,pause:F,setSpeed:V,goToAndStop:B,goToAndPlay:N,setDirection:$,playSegments:k,setSubframe:W,getDuration:K,destroy:U,animationContainerRef:v,animationLoaded:C,animationItem:o.current}};function ue(t){var e=t.getBoundingClientRect(),r=e.top,n=e.height,u=window.innerHeight-r,c=window.innerHeight+n;return u/c}function le(t,e,r){var n=t.getBoundingClientRect(),u=n.top,c=n.left,i=n.width,b=n.height,f=(e-c)/i,A=(r-u)/b;return{x:f,y:A}}var se=function(e){var r=e.wrapperRef,n=e.animationItem,u=e.mode,c=e.actions;D.useEffect(function(){var i=r.current;if(!(!i||!n||!c.length)){n.stop();var b=function(){var g=null,O=function(){var h=ue(i),l=c.find(function(S){var p=S.visibility;return p&&h>=p[0]&&h<=p[1]});if(l){if(l.type==="seek"&&l.visibility&&l.frames.length===2){var L=l.frames[0]+Math.ceil((h-l.visibility[0])/(l.visibility[1]-l.visibility[0])*l.frames[1]);//! goToAndStop must be relative to the start of the current segment
3
3
  n.goToAndStop(L-n.firstFrame-1,!0)}l.type==="loop"&&(g===null||g!==l.frames||n.isPaused)&&(n.playSegments(l.frames,!0),g=l.frames),l.type==="play"&&n.isPaused&&(n.resetSegments(!0),n.play()),l.type==="stop"&&n.goToAndStop(l.frames[0]-n.firstFrame-1,!0)}};return document.addEventListener("scroll",O),function(){document.removeEventListener("scroll",O)}},f=function(){var g=function(l,L){var S=l,p=L;if(S!==-1&&p!==-1){var P=le(i,S,p);S=P.x,p=P.y}var s=c.find(function(o){var v=o.position;return v&&Array.isArray(v.x)&&Array.isArray(v.y)?S>=v.x[0]&&S<=v.x[1]&&p>=v.y[0]&&p<=v.y[1]:v&&!Number.isNaN(v.x)&&!Number.isNaN(v.y)?S===v.x&&p===v.y:!1});if(s){if(s.type==="seek"&&s.position&&Array.isArray(s.position.x)&&Array.isArray(s.position.y)&&s.frames.length===2){var C=(S-s.position.x[0])/(s.position.x[1]-s.position.x[0]),_=(p-s.position.y[0])/(s.position.y[1]-s.position.y[0]);n.playSegments(s.frames,!0),n.goToAndStop(Math.ceil((C+_)/2*(s.frames[1]-s.frames[0])),!0)}s.type==="loop"&&n.playSegments(s.frames,!0),s.type==="play"&&(n.isPaused&&n.resetSegments(!1),n.playSegments(s.frames)),s.type==="stop"&&n.goToAndStop(s.frames[0],!0)}},O=function(l){g(l.clientX,l.clientY)},w=function(){g(-1,-1)};return i.addEventListener("mousemove",O),i.addEventListener("mouseout",w),function(){i.removeEventListener("mousemove",O),i.removeEventListener("mouseout",w)}};switch(u){case"scroll":return b();case"cursor":return f()}}},[u,n])},de=function(e){var r=e.actions,n=e.mode,u=e.lottieObj,c=u.animationItem,i=u.View,b=u.animationContainerRef;return se({actions:r,animationItem:c,mode:n,wrapperRef:b}),i},fe=["style","interactivity"],ve=function(e){var r,n,u,c=e.style,i=e.interactivity,b=x(e,fe),f=ie(b,c),A=f.View,g=f.play,O=f.stop,w=f.pause,h=f.setSpeed,l=f.goToAndStop,L=f.goToAndPlay,S=f.setDirection,p=f.playSegments,P=f.setSubframe,s=f.getDuration,C=f.destroy,_=f.animationContainerRef,o=f.animationLoaded,v=f.animationItem;return D.useEffect(function(){e.lottieRef&&(e.lottieRef.current={play:g,stop:O,pause:w,setSpeed:h,goToAndPlay:L,goToAndStop:l,setDirection:S,playSegments:p,setSubframe:P,getDuration:s,destroy:C,animationContainerRef:_,animationLoaded:o,animationItem:v})},[(r=e.lottieRef)===null||r===void 0?void 0:r.current]),de({lottieObj:{View:A,play:g,stop:O,pause:w,setSpeed:h,goToAndStop:l,goToAndPlay:L,setDirection:S,playSegments:p,setSubframe:P,getDuration:s,destroy:C,animationContainerRef:_,animationLoaded:o,animationItem:v},actions:(n=i==null?void 0:i.actions)!==null&&n!==void 0?n:[],mode:(u=i==null?void 0:i.mode)!==null&&u!==void 0?u:"scroll"})};export{q as LottiePlayer,ve as default,ie as useLottie,de as useLottieInteractivity};
@@ -0,0 +1 @@
1
+ import{bb as m}from"./index-C87i5P5O.js";var ce=e=>e.type==="checkbox",ie=e=>e instanceof Date,B=e=>e==null;const tt=e=>typeof e=="object";var S=e=>!B(e)&&!Array.isArray(e)&&tt(e)&&!ie(e),rt=e=>S(e)&&e.target?ce(e.target)?e.target.checked:e.target.value:e,xt=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,st=(e,s)=>e.has(xt(s)),mt=e=>{const s=e.constructor&&e.constructor.prototype;return S(s)&&s.hasOwnProperty("isPrototypeOf")},Te=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function M(e){let s;const t=Array.isArray(e);if(e instanceof Date)s=new Date(e);else if(e instanceof Set)s=new Set(e);else if(!(Te&&(e instanceof Blob||e instanceof FileList))&&(t||S(e)))if(s=t?[]:{},!t&&!mt(e))s=e;else for(const u in e)e.hasOwnProperty(u)&&(s[u]=M(e[u]));else return e;return s}var Ae=e=>Array.isArray(e)?e.filter(Boolean):[],w=e=>e===void 0,f=(e,s,t)=>{if(!s||!S(e))return t;const u=Ae(s.split(/[,[\].]+?/)).reduce((n,l)=>B(n)?n:n[l],e);return w(u)||u===e?w(e[s])?t:e[s]:u},p=e=>typeof e=="boolean",Le=e=>/^\w*$/.test(e),it=e=>Ae(e.replace(/["|']|\]/g,"").split(/\.|\[/)),x=(e,s,t)=>{let u=-1;const n=Le(s)?[s]:it(s),l=n.length,y=l-1;for(;++u<l;){const h=n[u];let D=t;if(u!==y){const E=e[h];D=S(E)||Array.isArray(E)?E:isNaN(+n[u+1])?{}:[]}if(h==="__proto__")return;e[h]=D,e=e[h]}return e};const ve={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},H={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},z={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Dt=m.createContext(null),Oe=()=>m.useContext(Dt);var ut=(e,s,t,u=!0)=>{const n={defaultValues:s._defaultValues};for(const l in e)Object.defineProperty(n,l,{get:()=>{const y=l;return s._proxyFormState[y]!==H.all&&(s._proxyFormState[y]=!u||H.all),t&&(t[y]=!0),e[y]}});return n},N=e=>S(e)&&!Object.keys(e).length,at=(e,s,t,u)=>{t(e);const{name:n,...l}=e;return N(l)||Object.keys(l).length>=Object.keys(s).length||Object.keys(l).find(y=>s[y]===(!u||H.all))},oe=e=>Array.isArray(e)?e:[e],lt=(e,s,t)=>!e||!s||e===s||oe(e).some(u=>u&&(t?u===s:u.startsWith(s)||s.startsWith(u)));function Ue(e){const s=m.useRef(e);s.current=e,m.useEffect(()=>{const t=!e.disabled&&s.current.subject&&s.current.subject.subscribe({next:s.current.next});return()=>{t&&t.unsubscribe()}},[e.disabled])}function wt(e){const s=Oe(),{control:t=s.control,disabled:u,name:n,exact:l}=e||{},[y,h]=m.useState(t._formState),D=m.useRef(!0),E=m.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),_=m.useRef(n);return _.current=n,Ue({disabled:u,next:v=>D.current&&lt(_.current,v.name,l)&&at(v,E.current,t._updateFormState)&&h({...t._formState,...v}),subject:t._subjects.state}),m.useEffect(()=>(D.current=!0,E.current.isValid&&t._updateValid(!0),()=>{D.current=!1}),[t]),ut(y,t,E.current,!1)}var $=e=>typeof e=="string",nt=(e,s,t,u,n)=>$(e)?(u&&s.watch.add(e),f(t,e,n)):Array.isArray(e)?e.map(l=>(u&&s.watch.add(l),f(t,l))):(u&&(s.watchAll=!0),t);function St(e){const s=Oe(),{control:t=s.control,name:u,defaultValue:n,disabled:l,exact:y}=e||{},h=m.useRef(u);h.current=u,Ue({disabled:l,subject:t._subjects.values,next:_=>{lt(h.current,_.name,y)&&E(M(nt(h.current,t._names,_.values||t._formValues,!1,n)))}});const[D,E]=m.useState(t._getWatch(u,n));return m.useEffect(()=>t._removeUnmounted()),D}function Et(e){const s=Oe(),{name:t,disabled:u,control:n=s.control,shouldUnregister:l}=e,y=st(n._names.array,t),h=St({control:n,name:t,defaultValue:f(n._formValues,t,f(n._defaultValues,t,e.defaultValue)),exact:!0}),D=wt({control:n,name:t,exact:!0}),E=m.useRef(n.register(t,{...e.rules,value:h,...p(e.disabled)?{disabled:e.disabled}:{}}));return m.useEffect(()=>{const _=n._options.shouldUnregister||l,v=(q,j)=>{const U=f(n._fields,q);U&&U._f&&(U._f.mount=j)};if(v(t,!0),_){const q=M(f(n._options.defaultValues,t));x(n._defaultValues,t,q),w(f(n._formValues,t))&&x(n._formValues,t,q)}return()=>{(y?_&&!n._state.action:_)?n.unregister(t):v(t,!1)}},[t,n,y,l]),m.useEffect(()=>{f(n._fields,t)&&n._updateDisabledField({disabled:u,fields:n._fields,name:t,value:f(n._fields,t)._f.value})},[u,t,n]),{field:{name:t,value:h,...p(u)||D.disabled?{disabled:D.disabled||u}:{},onChange:m.useCallback(_=>E.current.onChange({target:{value:rt(_),name:t},type:ve.CHANGE}),[t]),onBlur:m.useCallback(()=>E.current.onBlur({target:{value:f(n._formValues,t),name:t},type:ve.BLUR}),[t,n]),ref:m.useCallback(_=>{const v=f(n._fields,t);v&&_&&(v._f.ref={focus:()=>_.focus(),select:()=>_.select(),setCustomValidity:q=>_.setCustomValidity(q),reportValidity:()=>_.reportValidity()})},[n._fields,t])},formState:D,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!f(D.errors,t)},isDirty:{enumerable:!0,get:()=>!!f(D.dirtyFields,t)},isTouched:{enumerable:!0,get:()=>!!f(D.touchedFields,t)},isValidating:{enumerable:!0,get:()=>!!f(D.validatingFields,t)},error:{enumerable:!0,get:()=>f(D.errors,t)}})}}const jt=e=>e.render(Et(e));var kt=(e,s,t,u,n)=>s?{...t[e],types:{...t[e]&&t[e].types?t[e].types:{},[u]:n||!0}}:{},Ke=e=>({isOnSubmit:!e||e===H.onSubmit,isOnBlur:e===H.onBlur,isOnChange:e===H.onChange,isOnAll:e===H.all,isOnTouch:e===H.onTouched}),Ge=(e,s,t)=>!t&&(s.watchAll||s.watch.has(e)||[...s.watch].some(u=>e.startsWith(u)&&/^\.\w+/.test(e.slice(u.length))));const fe=(e,s,t,u)=>{for(const n of t||Object.keys(e)){const l=f(e,n);if(l){const{_f:y,...h}=l;if(y){if(y.refs&&y.refs[0]&&s(y.refs[0],n)&&!u)return!0;if(y.ref&&s(y.ref,y.name)&&!u)return!0;if(fe(h,s))break}else if(S(h)&&fe(h,s))break}}};var Ct=(e,s,t)=>{const u=oe(f(e,t));return x(u,"root",s[t]),x(e,t,u),e},Re=e=>e.type==="file",J=e=>typeof e=="function",_e=e=>{if(!Te)return!1;const s=e?e.ownerDocument:0;return e instanceof(s&&s.defaultView?s.defaultView.HTMLElement:HTMLElement)},he=e=>$(e),Be=e=>e.type==="radio",be=e=>e instanceof RegExp;const Ye={value:!1,isValid:!1},ze={value:!0,isValid:!0};var ot=e=>{if(Array.isArray(e)){if(e.length>1){const s=e.filter(t=>t&&t.checked&&!t.disabled).map(t=>t.value);return{value:s,isValid:!!s.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!w(e[0].attributes.value)?w(e[0].value)||e[0].value===""?ze:{value:e[0].value,isValid:!0}:ze:Ye}return Ye};const Je={isValid:!1,value:null};var ft=e=>Array.isArray(e)?e.reduce((s,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:s,Je):Je;function Qe(e,s,t="validate"){if(he(e)||Array.isArray(e)&&e.every(he)||p(e)&&!e)return{type:t,message:he(e)?e:"",ref:s}}var se=e=>S(e)&&!be(e)?e:{value:e,message:""},Xe=async(e,s,t,u,n)=>{const{ref:l,refs:y,required:h,maxLength:D,minLength:E,min:_,max:v,pattern:q,validate:j,name:U,valueAsNumber:xe,mount:K,disabled:Q}=e._f,V=f(s,U);if(!K||Q)return{};const G=y?y[0]:l,Y=b=>{u&&G.reportValidity&&(G.setCustomValidity(p(b)?"":b||""),G.reportValidity())},k={},te=Be(l),de=ce(l),Z=te||de,re=(xe||Re(l))&&w(l.value)&&w(V)||_e(l)&&l.value===""||V===""||Array.isArray(V)&&!V.length,P=kt.bind(null,U,t,k),ye=(b,F,C,R=z.maxLength,W=z.minLength)=>{const I=b?F:C;k[U]={type:b?R:W,message:I,ref:l,...P(b?R:W,I)}};if(n?!Array.isArray(V)||!V.length:h&&(!Z&&(re||B(V))||p(V)&&!V||de&&!ot(y).isValid||te&&!ft(y).isValid)){const{value:b,message:F}=he(h)?{value:!!h,message:h}:se(h);if(b&&(k[U]={type:z.required,message:F,ref:G,...P(z.required,F)},!t))return Y(F),k}if(!re&&(!B(_)||!B(v))){let b,F;const C=se(v),R=se(_);if(!B(V)&&!isNaN(V)){const W=l.valueAsNumber||V&&+V;B(C.value)||(b=W>C.value),B(R.value)||(F=W<R.value)}else{const W=l.valueAsDate||new Date(V),I=le=>new Date(new Date().toDateString()+" "+le),ue=l.type=="time",ae=l.type=="week";$(C.value)&&V&&(b=ue?I(V)>I(C.value):ae?V>C.value:W>new Date(C.value)),$(R.value)&&V&&(F=ue?I(V)<I(R.value):ae?V<R.value:W<new Date(R.value))}if((b||F)&&(ye(!!b,C.message,R.message,z.max,z.min),!t))return Y(k[U].message),k}if((D||E)&&!re&&($(V)||n&&Array.isArray(V))){const b=se(D),F=se(E),C=!B(b.value)&&V.length>+b.value,R=!B(F.value)&&V.length<+F.value;if((C||R)&&(ye(C,b.message,F.message),!t))return Y(k[U].message),k}if(q&&!re&&$(V)){const{value:b,message:F}=se(q);if(be(b)&&!V.match(b)&&(k[U]={type:z.pattern,message:F,ref:l,...P(z.pattern,F)},!t))return Y(F),k}if(j){if(J(j)){const b=await j(V,s),F=Qe(b,G);if(F&&(k[U]={...F,...P(z.validate,F.message)},!t))return Y(F.message),k}else if(S(j)){let b={};for(const F in j){if(!N(b)&&!t)break;const C=Qe(await j[F](V,s),G,F);C&&(b={...C,...P(F,C.message)},Y(C.message),t&&(k[U]=b))}if(!N(b)&&(k[U]={ref:G,...b},!t))return k}}return Y(!0),k};function Tt(e,s){const t=s.slice(0,-1).length;let u=0;for(;u<t;)e=w(e)?u++:e[s[u++]];return e}function Lt(e){for(const s in e)if(e.hasOwnProperty(s)&&!w(e[s]))return!1;return!0}function T(e,s){const t=Array.isArray(s)?s:Le(s)?[s]:it(s),u=t.length===1?e:Tt(e,t),n=t.length-1,l=t[n];return u&&delete u[l],n!==0&&(S(u)&&N(u)||Array.isArray(u)&&Lt(u))&&T(e,t.slice(0,-1)),e}var Ee=()=>{let e=[];return{get observers(){return e},next:n=>{for(const l of e)l.next&&l.next(n)},subscribe:n=>(e.push(n),{unsubscribe:()=>{e=e.filter(l=>l!==n)}}),unsubscribe:()=>{e=[]}}},Ve=e=>B(e)||!tt(e);function X(e,s){if(Ve(e)||Ve(s))return e===s;if(ie(e)&&ie(s))return e.getTime()===s.getTime();const t=Object.keys(e),u=Object.keys(s);if(t.length!==u.length)return!1;for(const n of t){const l=e[n];if(!u.includes(n))return!1;if(n!=="ref"){const y=s[n];if(ie(l)&&ie(y)||S(l)&&S(y)||Array.isArray(l)&&Array.isArray(y)?!X(l,y):l!==y)return!1}}return!0}var ct=e=>e.type==="select-multiple",Ot=e=>Be(e)||ce(e),ke=e=>_e(e)&&e.isConnected,dt=e=>{for(const s in e)if(J(e[s]))return!0;return!1};function Fe(e,s={}){const t=Array.isArray(e);if(S(e)||t)for(const u in e)Array.isArray(e[u])||S(e[u])&&!dt(e[u])?(s[u]=Array.isArray(e[u])?[]:{},Fe(e[u],s[u])):B(e[u])||(s[u]=!0);return s}function yt(e,s,t){const u=Array.isArray(e);if(S(e)||u)for(const n in e)Array.isArray(e[n])||S(e[n])&&!dt(e[n])?w(s)||Ve(t[n])?t[n]=Array.isArray(e[n])?Fe(e[n],[]):{...Fe(e[n])}:yt(e[n],B(s)?{}:s[n],t[n]):t[n]=!X(e[n],s[n]);return t}var ge=(e,s)=>yt(e,s,Fe(s)),gt=(e,{valueAsNumber:s,valueAsDate:t,setValueAs:u})=>w(e)?e:s?e===""?NaN:e&&+e:t&&$(e)?new Date(e):u?u(e):e;function Ce(e){const s=e.ref;if(!(e.refs?e.refs.every(t=>t.disabled):s.disabled))return Re(s)?s.files:Be(s)?ft(e.refs).value:ct(s)?[...s.selectedOptions].map(({value:t})=>t):ce(s)?ot(e.refs).value:gt(w(s.value)?e.ref.value:s.value,e)}var Ut=(e,s,t,u)=>{const n={};for(const l of e){const y=f(s,l);y&&x(n,l,y._f)}return{criteriaMode:t,names:[...e],fields:n,shouldUseNativeValidation:u}},ne=e=>w(e)?e:be(e)?e.source:S(e)?be(e.value)?e.value.source:e.value:e;const Ze="AsyncFunction";var Rt=e=>(!e||!e.validate)&&!!(J(e.validate)&&e.validate.constructor.name===Ze||S(e.validate)&&Object.values(e.validate).find(s=>s.constructor.name===Ze)),Bt=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function et(e,s,t){const u=f(e,t);if(u||Le(t))return{error:u,name:t};const n=t.split(".");for(;n.length;){const l=n.join("."),y=f(s,l),h=f(e,l);if(y&&!Array.isArray(y)&&t!==l)return{name:t};if(h&&h.type)return{name:l,error:h};n.pop()}return{name:t}}var Mt=(e,s,t,u,n)=>n.isOnAll?!1:!t&&n.isOnTouch?!(s||e):(t?u.isOnBlur:n.isOnBlur)?!e:(t?u.isOnChange:n.isOnChange)?e:!0,Nt=(e,s)=>!Ae(f(e,s)).length&&T(e,s);const Pt={mode:H.onSubmit,reValidateMode:H.onChange,shouldFocusError:!0};function It(e={}){let s={...Pt,...e},t={submitCount:0,isDirty:!1,isLoading:J(s.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:s.errors||{},disabled:s.disabled||!1},u={},n=S(s.defaultValues)||S(s.values)?M(s.defaultValues||s.values)||{}:{},l=s.shouldUnregister?{}:M(n),y={action:!1,mount:!1,watch:!1},h={mount:new Set,unMount:new Set,array:new Set,watch:new Set},D,E=0;const _={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},v={values:Ee(),array:Ee(),state:Ee()},q=Ke(s.mode),j=Ke(s.reValidateMode),U=s.criteriaMode===H.all,xe=r=>i=>{clearTimeout(E),E=setTimeout(r,i)},K=async r=>{if(_.isValid||r){const i=s.resolver?N((await Z()).errors):await P(u,!0);i!==t.isValid&&v.state.next({isValid:i})}},Q=(r,i)=>{(_.isValidating||_.validatingFields)&&((r||Array.from(h.mount)).forEach(a=>{a&&(i?x(t.validatingFields,a,i):T(t.validatingFields,a))}),v.state.next({validatingFields:t.validatingFields,isValidating:!N(t.validatingFields)}))},V=(r,i=[],a,d,c=!0,o=!0)=>{if(d&&a){if(y.action=!0,o&&Array.isArray(f(u,r))){const g=a(f(u,r),d.argA,d.argB);c&&x(u,r,g)}if(o&&Array.isArray(f(t.errors,r))){const g=a(f(t.errors,r),d.argA,d.argB);c&&x(t.errors,r,g),Nt(t.errors,r)}if(_.touchedFields&&o&&Array.isArray(f(t.touchedFields,r))){const g=a(f(t.touchedFields,r),d.argA,d.argB);c&&x(t.touchedFields,r,g)}_.dirtyFields&&(t.dirtyFields=ge(n,l)),v.state.next({name:r,isDirty:b(r,i),dirtyFields:t.dirtyFields,errors:t.errors,isValid:t.isValid})}else x(l,r,i)},G=(r,i)=>{x(t.errors,r,i),v.state.next({errors:t.errors})},Y=r=>{t.errors=r,v.state.next({errors:t.errors,isValid:!1})},k=(r,i,a,d)=>{const c=f(u,r);if(c){const o=f(l,r,w(a)?f(n,r):a);w(o)||d&&d.defaultChecked||i?x(l,r,i?o:Ce(c._f)):R(r,o),y.mount&&K()}},te=(r,i,a,d,c)=>{let o=!1,g=!1;const A={name:r},L=!!(f(u,r)&&f(u,r)._f&&f(u,r)._f.disabled);if(!a||d){_.isDirty&&(g=t.isDirty,t.isDirty=A.isDirty=b(),o=g!==A.isDirty);const O=L||X(f(n,r),i);g=!!(!L&&f(t.dirtyFields,r)),O||L?T(t.dirtyFields,r):x(t.dirtyFields,r,!0),A.dirtyFields=t.dirtyFields,o=o||_.dirtyFields&&g!==!O}if(a){const O=f(t.touchedFields,r);O||(x(t.touchedFields,r,a),A.touchedFields=t.touchedFields,o=o||_.touchedFields&&O!==a)}return o&&c&&v.state.next(A),o?A:{}},de=(r,i,a,d)=>{const c=f(t.errors,r),o=_.isValid&&p(i)&&t.isValid!==i;if(e.delayError&&a?(D=xe(()=>G(r,a)),D(e.delayError)):(clearTimeout(E),D=null,a?x(t.errors,r,a):T(t.errors,r)),(a?!X(c,a):c)||!N(d)||o){const g={...d,...o&&p(i)?{isValid:i}:{},errors:t.errors,name:r};t={...t,...g},v.state.next(g)}},Z=async r=>{Q(r,!0);const i=await s.resolver(l,s.context,Ut(r||h.mount,u,s.criteriaMode,s.shouldUseNativeValidation));return Q(r),i},re=async r=>{const{errors:i}=await Z(r);if(r)for(const a of r){const d=f(i,a);d?x(t.errors,a,d):T(t.errors,a)}else t.errors=i;return i},P=async(r,i,a={valid:!0})=>{for(const d in r){const c=r[d];if(c){const{_f:o,...g}=c;if(o){const A=h.array.has(o.name),L=c._f&&Rt(c._f);L&&_.validatingFields&&Q([d],!0);const O=await Xe(c,l,U,s.shouldUseNativeValidation&&!i,A);if(L&&_.validatingFields&&Q([d]),O[o.name]&&(a.valid=!1,i))break;!i&&(f(O,o.name)?A?Ct(t.errors,O,o.name):x(t.errors,o.name,O[o.name]):T(t.errors,o.name))}!N(g)&&await P(g,i,a)}}return a.valid},ye=()=>{for(const r of h.unMount){const i=f(u,r);i&&(i._f.refs?i._f.refs.every(a=>!ke(a)):!ke(i._f.ref))&&me(r)}h.unMount=new Set},b=(r,i)=>(r&&i&&x(l,r,i),!X(Me(),n)),F=(r,i,a)=>nt(r,h,{...y.mount?l:w(i)?n:$(r)?{[r]:i}:i},a,i),C=r=>Ae(f(y.mount?l:n,r,e.shouldUnregister?f(n,r,[]):[])),R=(r,i,a={})=>{const d=f(u,r);let c=i;if(d){const o=d._f;o&&(!o.disabled&&x(l,r,gt(i,o)),c=_e(o.ref)&&B(i)?"":i,ct(o.ref)?[...o.ref.options].forEach(g=>g.selected=c.includes(g.value)):o.refs?ce(o.ref)?o.refs.length>1?o.refs.forEach(g=>(!g.defaultChecked||!g.disabled)&&(g.checked=Array.isArray(c)?!!c.find(A=>A===g.value):c===g.value)):o.refs[0]&&(o.refs[0].checked=!!c):o.refs.forEach(g=>g.checked=g.value===c):Re(o.ref)?o.ref.value="":(o.ref.value=c,o.ref.type||v.values.next({name:r,values:{...l}})))}(a.shouldDirty||a.shouldTouch)&&te(r,c,a.shouldTouch,a.shouldDirty,!0),a.shouldValidate&&le(r)},W=(r,i,a)=>{for(const d in i){const c=i[d],o=`${r}.${d}`,g=f(u,o);(h.array.has(r)||!Ve(c)||g&&!g._f)&&!ie(c)?W(o,c,a):R(o,c,a)}},I=(r,i,a={})=>{const d=f(u,r),c=h.array.has(r),o=M(i);x(l,r,o),c?(v.array.next({name:r,values:{...l}}),(_.isDirty||_.dirtyFields)&&a.shouldDirty&&v.state.next({name:r,dirtyFields:ge(n,l),isDirty:b(r,o)})):d&&!d._f&&!B(o)?W(r,o,a):R(r,o,a),Ge(r,h)&&v.state.next({...t}),v.values.next({name:y.mount?r:void 0,values:{...l}})},ue=async r=>{y.mount=!0;const i=r.target;let a=i.name,d=!0;const c=f(u,a),o=()=>i.type?Ce(c._f):rt(r),g=A=>{d=Number.isNaN(A)||X(A,f(l,a,A))};if(c){let A,L;const O=o(),ee=r.type===ve.BLUR||r.type===ve.FOCUS_OUT,Vt=!Bt(c._f)&&!s.resolver&&!f(t.errors,a)&&!c._f.deps||Mt(ee,f(t.touchedFields,a),t.isSubmitted,j,q),we=Ge(a,h,ee);x(l,a,O),ee?(c._f.onBlur&&c._f.onBlur(r),D&&D(0)):c._f.onChange&&c._f.onChange(r);const Se=te(a,O,ee,!1),Ft=!N(Se)||we;if(!ee&&v.values.next({name:a,type:r.type,values:{...l}}),Vt)return _.isValid&&(e.mode==="onBlur"?ee&&K():K()),Ft&&v.state.next({name:a,...we?{}:Se});if(!ee&&we&&v.state.next({...t}),s.resolver){const{errors:je}=await Z([a]);if(g(O),d){const At=et(t.errors,u,a),$e=et(je,u,At.name||a);A=$e.error,a=$e.name,L=N(je)}}else Q([a],!0),A=(await Xe(c,l,U,s.shouldUseNativeValidation))[a],Q([a]),g(O),d&&(A?L=!1:_.isValid&&(L=await P(u,!0)));d&&(c._f.deps&&le(c._f.deps),de(a,L,A,Se))}},ae=(r,i)=>{if(f(t.errors,i)&&r.focus)return r.focus(),1},le=async(r,i={})=>{let a,d;const c=oe(r);if(s.resolver){const o=await re(w(r)?r:c);a=N(o),d=r?!c.some(g=>f(o,g)):a}else r?(d=(await Promise.all(c.map(async o=>{const g=f(u,o);return await P(g&&g._f?{[o]:g}:g)}))).every(Boolean),!(!d&&!t.isValid)&&K()):d=a=await P(u);return v.state.next({...!$(r)||_.isValid&&a!==t.isValid?{}:{name:r},...s.resolver||!r?{isValid:a}:{},errors:t.errors}),i.shouldFocus&&!d&&fe(u,ae,r?c:h.mount),d},Me=r=>{const i={...y.mount?l:n};return w(r)?i:$(r)?f(i,r):r.map(a=>f(i,a))},Ne=(r,i)=>({invalid:!!f((i||t).errors,r),isDirty:!!f((i||t).dirtyFields,r),error:f((i||t).errors,r),isValidating:!!f(t.validatingFields,r),isTouched:!!f((i||t).touchedFields,r)}),ht=r=>{r&&oe(r).forEach(i=>T(t.errors,i)),v.state.next({errors:r?t.errors:{}})},Pe=(r,i,a)=>{const d=(f(u,r,{_f:{}})._f||{}).ref,c=f(t.errors,r)||{},{ref:o,message:g,type:A,...L}=c;x(t.errors,r,{...L,...i,ref:d}),v.state.next({name:r,errors:t.errors,isValid:!1}),a&&a.shouldFocus&&d&&d.focus&&d.focus()},vt=(r,i)=>J(r)?v.values.subscribe({next:a=>r(F(void 0,i),a)}):F(r,i,!0),me=(r,i={})=>{for(const a of r?oe(r):h.mount)h.mount.delete(a),h.array.delete(a),i.keepValue||(T(u,a),T(l,a)),!i.keepError&&T(t.errors,a),!i.keepDirty&&T(t.dirtyFields,a),!i.keepTouched&&T(t.touchedFields,a),!i.keepIsValidating&&T(t.validatingFields,a),!s.shouldUnregister&&!i.keepDefaultValue&&T(n,a);v.values.next({values:{...l}}),v.state.next({...t,...i.keepDirty?{isDirty:b()}:{}}),!i.keepIsValid&&K()},Ie=({disabled:r,name:i,field:a,fields:d,value:c})=>{if(p(r)&&y.mount||r){const o=r?void 0:w(c)?Ce(a?a._f:f(d,i)._f):c;x(l,i,o),te(i,o,!1,!1,!0)}},De=(r,i={})=>{let a=f(u,r);const d=p(i.disabled)||p(e.disabled);return x(u,r,{...a||{},_f:{...a&&a._f?a._f:{ref:{name:r}},name:r,mount:!0,...i}}),h.mount.add(r),a?Ie({field:a,disabled:p(i.disabled)?i.disabled:e.disabled,name:r,value:i.value}):k(r,!0,i.value),{...d?{disabled:i.disabled||e.disabled}:{},...s.progressive?{required:!!i.required,min:ne(i.min),max:ne(i.max),minLength:ne(i.minLength),maxLength:ne(i.maxLength),pattern:ne(i.pattern)}:{},name:r,onChange:ue,onBlur:ue,ref:c=>{if(c){De(r,i),a=f(u,r);const o=w(c.value)&&c.querySelectorAll&&c.querySelectorAll("input,select,textarea")[0]||c,g=Ot(o),A=a._f.refs||[];if(g?A.find(L=>L===o):o===a._f.ref)return;x(u,r,{_f:{...a._f,...g?{refs:[...A.filter(ke),o,...Array.isArray(f(n,r))?[{}]:[]],ref:{type:o.type,name:r}}:{ref:o}}}),k(r,!1,void 0,o)}else a=f(u,r,{}),a._f&&(a._f.mount=!1),(s.shouldUnregister||i.shouldUnregister)&&!(st(h.array,r)&&y.action)&&h.unMount.add(r)}}},pe=()=>s.shouldFocusError&&fe(u,ae,h.mount),_t=r=>{p(r)&&(v.state.next({disabled:r}),fe(u,(i,a)=>{const d=f(u,a);d&&(i.disabled=d._f.disabled||r,Array.isArray(d._f.refs)&&d._f.refs.forEach(c=>{c.disabled=d._f.disabled||r}))},0,!1))},qe=(r,i)=>async a=>{let d;a&&(a.preventDefault&&a.preventDefault(),a.persist&&a.persist());let c=M(l);if(v.state.next({isSubmitting:!0}),s.resolver){const{errors:o,values:g}=await Z();t.errors=o,c=g}else await P(u);if(T(t.errors,"root"),N(t.errors)){v.state.next({errors:{}});try{await r(c,a)}catch(o){d=o}}else i&&await i({...t.errors},a),pe(),setTimeout(pe);if(v.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:N(t.errors)&&!d,submitCount:t.submitCount+1,errors:t.errors}),d)throw d},bt=(r,i={})=>{f(u,r)&&(w(i.defaultValue)?I(r,M(f(n,r))):(I(r,i.defaultValue),x(n,r,M(i.defaultValue))),i.keepTouched||T(t.touchedFields,r),i.keepDirty||(T(t.dirtyFields,r),t.isDirty=i.defaultValue?b(r,M(f(n,r))):b()),i.keepError||(T(t.errors,r),_.isValid&&K()),v.state.next({...t}))},We=(r,i={})=>{const a=r?M(r):n,d=M(a),c=N(r),o=c?n:d;if(i.keepDefaultValues||(n=a),!i.keepValues){if(i.keepDirtyValues)for(const g of h.mount)f(t.dirtyFields,g)?x(o,g,f(l,g)):I(g,f(o,g));else{if(Te&&w(r))for(const g of h.mount){const A=f(u,g);if(A&&A._f){const L=Array.isArray(A._f.refs)?A._f.refs[0]:A._f.ref;if(_e(L)){const O=L.closest("form");if(O){O.reset();break}}}}u={}}l=e.shouldUnregister?i.keepDefaultValues?M(n):{}:M(o),v.array.next({values:{...o}}),v.values.next({values:{...o}})}h={mount:i.keepDirtyValues?h.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},y.mount=!_.isValid||!!i.keepIsValid||!!i.keepDirtyValues,y.watch=!!e.shouldUnregister,v.state.next({submitCount:i.keepSubmitCount?t.submitCount:0,isDirty:c?!1:i.keepDirty?t.isDirty:!!(i.keepDefaultValues&&!X(r,n)),isSubmitted:i.keepIsSubmitted?t.isSubmitted:!1,dirtyFields:c?{}:i.keepDirtyValues?i.keepDefaultValues&&l?ge(n,l):t.dirtyFields:i.keepDefaultValues&&r?ge(n,r):i.keepDirty?t.dirtyFields:{},touchedFields:i.keepTouched?t.touchedFields:{},errors:i.keepErrors?t.errors:{},isSubmitSuccessful:i.keepIsSubmitSuccessful?t.isSubmitSuccessful:!1,isSubmitting:!1})},He=(r,i)=>We(J(r)?r(l):r,i);return{control:{register:De,unregister:me,getFieldState:Ne,handleSubmit:qe,setError:Pe,_executeSchema:Z,_getWatch:F,_getDirty:b,_updateValid:K,_removeUnmounted:ye,_updateFieldArray:V,_updateDisabledField:Ie,_getFieldArray:C,_reset:We,_resetDefaultValues:()=>J(s.defaultValues)&&s.defaultValues().then(r=>{He(r,s.resetOptions),v.state.next({isLoading:!1})}),_updateFormState:r=>{t={...t,...r}},_disableForm:_t,_subjects:v,_proxyFormState:_,_setErrors:Y,get _fields(){return u},get _formValues(){return l},get _state(){return y},set _state(r){y=r},get _defaultValues(){return n},get _names(){return h},set _names(r){h=r},get _formState(){return t},set _formState(r){t=r},get _options(){return s},set _options(r){s={...s,...r}}},trigger:le,register:De,handleSubmit:qe,watch:vt,setValue:I,getValues:Me,reset:He,resetField:bt,clearErrors:ht,unregister:me,setError:Pe,setFocus:(r,i={})=>{const a=f(u,r),d=a&&a._f;if(d){const c=d.refs?d.refs[0]:d.ref;c.focus&&(c.focus(),i.shouldSelect&&c.select())}},getFieldState:Ne}}function $t(e={}){const s=m.useRef(),t=m.useRef(),[u,n]=m.useState({isDirty:!1,isValidating:!1,isLoading:J(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:J(e.defaultValues)?void 0:e.defaultValues});s.current||(s.current={...It(e),formState:u});const l=s.current.control;return l._options=e,Ue({subject:l._subjects.state,next:y=>{at(y,l._proxyFormState,l._updateFormState,!0)&&n({...l._formState})}}),m.useEffect(()=>l._disableForm(e.disabled),[l,e.disabled]),m.useEffect(()=>{if(l._proxyFormState.isDirty){const y=l._getDirty();y!==u.isDirty&&l._subjects.state.next({isDirty:y})}},[l,u.isDirty]),m.useEffect(()=>{e.values&&!X(e.values,t.current)?(l._reset(e.values,l._options.resetOptions),t.current=e.values,n(y=>({...y}))):l._resetDefaultValues()},[e.values,l]),m.useEffect(()=>{e.errors&&l._setErrors(e.errors)},[e.errors,l]),m.useEffect(()=>{l._state.mount||(l._updateValid(),l._state.mount=!0),l._state.watch&&(l._state.watch=!1,l._subjects.state.next({...l._formState})),l._removeUnmounted()}),m.useEffect(()=>{e.shouldUnregister&&l._subjects.values.next({values:l._getWatch()})},[e.shouldUnregister,l]),s.current.formState=ut(u,l),s.current}export{jt as C,St as a,$t as u};
@@ -1 +1 @@
1
- import{C as i}from"./codemirror.es-g-VpeCS8.js";import"./index-2urvy1x8.js";import"./index-B1ahK-2I.js";var y=Object.defineProperty,u=(e,t)=>y(e,"name",{value:t,configurable:!0});i.defineOption("info",!1,(e,t,n)=>{if(n&&n!==i.Init){const o=e.state.info.onMouseOver;i.off(e.getWrapperElement(),"mouseover",o),clearTimeout(e.state.info.hoverTimeout),delete e.state.info}if(t){const o=e.state.info=v(t);o.onMouseOver=h.bind(null,e),i.on(e.getWrapperElement(),"mouseover",o.onMouseOver)}});function v(e){return{options:e instanceof Function?{render:e}:e===!0?{}:e}}u(v,"createState");function g(e){const t=e.state.info.options;return(t==null?void 0:t.hoverTime)||500}u(g,"getHoverTime");function h(e,t){const n=e.state.info,o=t.target||t.srcElement;if(!(o instanceof HTMLElement)||o.nodeName!=="SPAN"||n.hoverTimeout!==void 0)return;const s=o.getBoundingClientRect(),r=u(function(){clearTimeout(n.hoverTimeout),n.hoverTimeout=setTimeout(f,a)},"onMouseMove"),p=u(function(){i.off(document,"mousemove",r),i.off(e.getWrapperElement(),"mouseout",p),clearTimeout(n.hoverTimeout),n.hoverTimeout=void 0},"onMouseOut"),f=u(function(){i.off(document,"mousemove",r),i.off(e.getWrapperElement(),"mouseout",p),n.hoverTimeout=void 0,T(e,s)},"onHover"),a=g(e);n.hoverTimeout=setTimeout(f,a),i.on(document,"mousemove",r),i.on(e.getWrapperElement(),"mouseout",p)}u(h,"onMouseOver");function T(e,t){const n=e.coordsChar({left:(t.left+t.right)/2,top:(t.top+t.bottom)/2}),s=e.state.info.options,r=s.render||e.getHelper(n,"info");if(r){const p=e.getTokenAt(n,!0);if(p){const f=r(p,s,e,n);f&&M(e,t,f)}}}u(T,"onMouseHover");function M(e,t,n){const o=document.createElement("div");o.className="CodeMirror-info",o.appendChild(n),document.body.appendChild(o);const s=o.getBoundingClientRect(),r=window.getComputedStyle(o),p=s.right-s.left+parseFloat(r.marginLeft)+parseFloat(r.marginRight),f=s.bottom-s.top+parseFloat(r.marginTop)+parseFloat(r.marginBottom);let a=t.bottom;f>window.innerHeight-t.bottom-15&&t.top>window.innerHeight-t.bottom&&(a=t.top-f),a<0&&(a=t.bottom);let l=Math.max(0,window.innerWidth-p-15);l>t.left&&(l=t.left),o.style.opacity="1",o.style.top=a+"px",o.style.left=l+"px";let d;const c=u(function(){clearTimeout(d)},"onMouseOverPopup"),m=u(function(){clearTimeout(d),d=setTimeout(O,200)},"onMouseOut"),O=u(function(){i.off(o,"mouseover",c),i.off(o,"mouseout",m),i.off(e.getWrapperElement(),"mouseout",m),o.style.opacity?(o.style.opacity="0",setTimeout(()=>{o.parentNode&&o.parentNode.removeChild(o)},600)):o.parentNode&&o.parentNode.removeChild(o)},"hidePopup");i.on(o,"mouseover",c),i.on(o,"mouseout",m),i.on(e.getWrapperElement(),"mouseout",m)}u(M,"showPopup");
1
+ import{C as i}from"./codemirror.es-B-bTLQrR.js";import"./index-CuqMshCu.js";import"./index-C87i5P5O.js";var y=Object.defineProperty,u=(e,t)=>y(e,"name",{value:t,configurable:!0});i.defineOption("info",!1,(e,t,n)=>{if(n&&n!==i.Init){const o=e.state.info.onMouseOver;i.off(e.getWrapperElement(),"mouseover",o),clearTimeout(e.state.info.hoverTimeout),delete e.state.info}if(t){const o=e.state.info=v(t);o.onMouseOver=h.bind(null,e),i.on(e.getWrapperElement(),"mouseover",o.onMouseOver)}});function v(e){return{options:e instanceof Function?{render:e}:e===!0?{}:e}}u(v,"createState");function g(e){const t=e.state.info.options;return(t==null?void 0:t.hoverTime)||500}u(g,"getHoverTime");function h(e,t){const n=e.state.info,o=t.target||t.srcElement;if(!(o instanceof HTMLElement)||o.nodeName!=="SPAN"||n.hoverTimeout!==void 0)return;const s=o.getBoundingClientRect(),r=u(function(){clearTimeout(n.hoverTimeout),n.hoverTimeout=setTimeout(f,a)},"onMouseMove"),p=u(function(){i.off(document,"mousemove",r),i.off(e.getWrapperElement(),"mouseout",p),clearTimeout(n.hoverTimeout),n.hoverTimeout=void 0},"onMouseOut"),f=u(function(){i.off(document,"mousemove",r),i.off(e.getWrapperElement(),"mouseout",p),n.hoverTimeout=void 0,T(e,s)},"onHover"),a=g(e);n.hoverTimeout=setTimeout(f,a),i.on(document,"mousemove",r),i.on(e.getWrapperElement(),"mouseout",p)}u(h,"onMouseOver");function T(e,t){const n=e.coordsChar({left:(t.left+t.right)/2,top:(t.top+t.bottom)/2}),s=e.state.info.options,r=s.render||e.getHelper(n,"info");if(r){const p=e.getTokenAt(n,!0);if(p){const f=r(p,s,e,n);f&&M(e,t,f)}}}u(T,"onMouseHover");function M(e,t,n){const o=document.createElement("div");o.className="CodeMirror-info",o.appendChild(n),document.body.appendChild(o);const s=o.getBoundingClientRect(),r=window.getComputedStyle(o),p=s.right-s.left+parseFloat(r.marginLeft)+parseFloat(r.marginRight),f=s.bottom-s.top+parseFloat(r.marginTop)+parseFloat(r.marginBottom);let a=t.bottom;f>window.innerHeight-t.bottom-15&&t.top>window.innerHeight-t.bottom&&(a=t.top-f),a<0&&(a=t.bottom);let l=Math.max(0,window.innerWidth-p-15);l>t.left&&(l=t.left),o.style.opacity="1",o.style.top=a+"px",o.style.left=l+"px";let d;const c=u(function(){clearTimeout(d)},"onMouseOverPopup"),m=u(function(){clearTimeout(d),d=setTimeout(O,200)},"onMouseOut"),O=u(function(){i.off(o,"mouseover",c),i.off(o,"mouseout",m),i.off(e.getWrapperElement(),"mouseout",m),o.style.opacity?(o.style.opacity="0",setTimeout(()=>{o.parentNode&&o.parentNode.removeChild(o)},600)):o.parentNode&&o.parentNode.removeChild(o)},"hidePopup");i.on(o,"mouseover",c),i.on(o,"mouseout",m),i.on(e.getWrapperElement(),"mouseout",m)}u(M,"showPopup");
@@ -1 +1 @@
1
- import{C as h}from"./codemirror.es-g-VpeCS8.js";import{g as E,a as C,b as N,c as _,d as V,e as x}from"./SchemaReference.es-VhNWmDRq.js";import"./info-addon.es-CitM4bMJ.js";import{Y as A,r as F}from"./index-2urvy1x8.js";import"./index-B1ahK-2I.js";import"./introspection.es-CPJcz6nz.js";import"./forEachState.es-D8bf0zSr.js";var L=Object.defineProperty,l=(r,e)=>L(r,"name",{value:e,configurable:!0});h.registerHelper("info","graphql",(r,e)=>{if(!e.schema||!r.state)return;const i=r.state,n=i.kind,d=i.step,c=E(e.schema,r.state);if(n==="Field"&&d===0&&c.fieldDef||n==="AliasedField"&&d===2&&c.fieldDef){const a=document.createElement("div");return o(a,c,e),u(a,e,c.fieldDef),a}else if(n==="Directive"&&d===1&&c.directiveDef){const a=document.createElement("div");return f(a,c,e),u(a,e,c.directiveDef),a}else if(n==="Argument"&&d===0&&c.argDef){const a=document.createElement("div");return p(a,c,e),u(a,e,c.argDef),a}else if(n==="EnumValue"&&c.enumValue&&c.enumValue.description){const a=document.createElement("div");return D(a,c,e),u(a,e,c.enumValue),a}else if(n==="NamedType"&&c.type&&c.type.description){const a=document.createElement("div");return m(a,c,e,c.type),u(a,e,c.type),a}});function o(r,e,i){s(r,e,i),v(r,e,i,e.type)}l(o,"renderField");function s(r,e,i){var n;const d=((n=e.fieldDef)===null||n===void 0?void 0:n.name)||"";d.slice(0,2)!=="__"&&(m(r,e,i,e.parentType),t(r,".")),t(r,d,"field-name",i,C(e))}l(s,"renderQualifiedField");function f(r,e,i){var n;const d="@"+(((n=e.directiveDef)===null||n===void 0?void 0:n.name)||"");t(r,d,"directive-name",i,N(e))}l(f,"renderDirective");function p(r,e,i){var n;e.directiveDef?f(r,e,i):e.fieldDef&&s(r,e,i);const d=((n=e.argDef)===null||n===void 0?void 0:n.name)||"";t(r,"("),t(r,d,"arg-name",i,_(e)),v(r,e,i,e.inputType),t(r,")")}l(p,"renderArg");function v(r,e,i,n){t(r,": "),m(r,e,i,n)}l(v,"renderTypeAnnotation");function D(r,e,i){var n;const d=((n=e.enumValue)===null||n===void 0?void 0:n.name)||"";m(r,e,i,e.inputType),t(r,"."),t(r,d,"enum-value",i,V(e))}l(D,"renderEnumValue");function m(r,e,i,n){n instanceof A?(m(r,e,i,n.ofType),t(r,"!")):n instanceof F?(t(r,"["),m(r,e,i,n.ofType),t(r,"]")):t(r,(n==null?void 0:n.name)||"","type-name",i,x(e,n))}l(m,"renderType");function u(r,e,i){const n=i.description;if(n){const d=document.createElement("div");d.className="info-description",e.renderDescription?d.innerHTML=e.renderDescription(n):d.appendChild(document.createTextNode(n)),r.appendChild(d)}T(r,e,i)}l(u,"renderDescription");function T(r,e,i){const n=i.deprecationReason;if(n){const d=document.createElement("div");d.className="info-deprecation",e.renderDescription?d.innerHTML=e.renderDescription(n):d.appendChild(document.createTextNode(n));const c=document.createElement("span");c.className="info-deprecation-label",c.appendChild(document.createTextNode("Deprecated: ")),d.insertBefore(c,d.firstChild),r.appendChild(d)}}l(T,"renderDeprecation");function t(r,e,i="",n={onClick:null},d=null){if(i){const c=n.onClick;let a;c?(a=document.createElement("a"),a.href="javascript:void 0",a.addEventListener("click",g=>{c(d,g)})):a=document.createElement("span"),a.className=i,a.appendChild(document.createTextNode(e)),r.appendChild(a)}else r.appendChild(document.createTextNode(e))}l(t,"text");
1
+ import{C as h}from"./codemirror.es-B-bTLQrR.js";import{g as E,a as C,b as N,c as _,d as V,e as x}from"./SchemaReference.es-CXzqh_NZ.js";import"./info-addon.es-CVKSPi1c.js";import{Y as A,r as F}from"./index-CuqMshCu.js";import"./index-C87i5P5O.js";import"./introspection.es-CPJcz6nz.js";import"./forEachState.es-D8bf0zSr.js";var L=Object.defineProperty,l=(r,e)=>L(r,"name",{value:e,configurable:!0});h.registerHelper("info","graphql",(r,e)=>{if(!e.schema||!r.state)return;const i=r.state,n=i.kind,d=i.step,c=E(e.schema,r.state);if(n==="Field"&&d===0&&c.fieldDef||n==="AliasedField"&&d===2&&c.fieldDef){const a=document.createElement("div");return o(a,c,e),u(a,e,c.fieldDef),a}else if(n==="Directive"&&d===1&&c.directiveDef){const a=document.createElement("div");return f(a,c,e),u(a,e,c.directiveDef),a}else if(n==="Argument"&&d===0&&c.argDef){const a=document.createElement("div");return p(a,c,e),u(a,e,c.argDef),a}else if(n==="EnumValue"&&c.enumValue&&c.enumValue.description){const a=document.createElement("div");return D(a,c,e),u(a,e,c.enumValue),a}else if(n==="NamedType"&&c.type&&c.type.description){const a=document.createElement("div");return m(a,c,e,c.type),u(a,e,c.type),a}});function o(r,e,i){s(r,e,i),v(r,e,i,e.type)}l(o,"renderField");function s(r,e,i){var n;const d=((n=e.fieldDef)===null||n===void 0?void 0:n.name)||"";d.slice(0,2)!=="__"&&(m(r,e,i,e.parentType),t(r,".")),t(r,d,"field-name",i,C(e))}l(s,"renderQualifiedField");function f(r,e,i){var n;const d="@"+(((n=e.directiveDef)===null||n===void 0?void 0:n.name)||"");t(r,d,"directive-name",i,N(e))}l(f,"renderDirective");function p(r,e,i){var n;e.directiveDef?f(r,e,i):e.fieldDef&&s(r,e,i);const d=((n=e.argDef)===null||n===void 0?void 0:n.name)||"";t(r,"("),t(r,d,"arg-name",i,_(e)),v(r,e,i,e.inputType),t(r,")")}l(p,"renderArg");function v(r,e,i,n){t(r,": "),m(r,e,i,n)}l(v,"renderTypeAnnotation");function D(r,e,i){var n;const d=((n=e.enumValue)===null||n===void 0?void 0:n.name)||"";m(r,e,i,e.inputType),t(r,"."),t(r,d,"enum-value",i,V(e))}l(D,"renderEnumValue");function m(r,e,i,n){n instanceof A?(m(r,e,i,n.ofType),t(r,"!")):n instanceof F?(t(r,"["),m(r,e,i,n.ofType),t(r,"]")):t(r,(n==null?void 0:n.name)||"","type-name",i,x(e,n))}l(m,"renderType");function u(r,e,i){const n=i.description;if(n){const d=document.createElement("div");d.className="info-description",e.renderDescription?d.innerHTML=e.renderDescription(n):d.appendChild(document.createTextNode(n)),r.appendChild(d)}T(r,e,i)}l(u,"renderDescription");function T(r,e,i){const n=i.deprecationReason;if(n){const d=document.createElement("div");d.className="info-deprecation",e.renderDescription?d.innerHTML=e.renderDescription(n):d.appendChild(document.createTextNode(n));const c=document.createElement("span");c.className="info-deprecation-label",c.appendChild(document.createTextNode("Deprecated: ")),d.insertBefore(c,d.firstChild),r.appendChild(d)}}l(T,"renderDeprecation");function t(r,e,i="",n={onClick:null},d=null){if(i){const c=n.onClick;let a;c?(a=document.createElement("a"),a.href="javascript:void 0",a.addEventListener("click",g=>{c(d,g)})):a=document.createElement("span"),a.className=i,a.appendChild(document.createTextNode(e)),r.appendChild(a)}else r.appendChild(document.createTextNode(e))}l(t,"text");
@@ -0,0 +1 @@
1
+ import{P as O,j as m,eI as Nt,cO as R,eJ as $t,eK as Bt,b as Gt,Q as Ft,eL as Wt,bl as Kt,v as qt,r as T,t as Ht,N as zt,W as Vt,m as Yt,D as Xt,B as ct,C as ut,x as Jt,K as Qt,y as Zt,bm as kt,M as te}from"./index-C87i5P5O.js";import{W as ee}from"./url-evaluation-Bsz6aSOl.js";import{s as bt,n as ie}from"./schema-BuTyc1B1.js";import{I as ft}from"./index-CnV8LmTC.js";import{T as re}from"./TextField-BsNlIaqS.js";import{S as ne,a as se,b as oe}from"./Stepper-BsBYZb8R.js";function ae({mode:t,...e}){return t==="development"?m.jsx(ee,{type:"primary",...e,children:"DEV"}):null}ae.propTypes={mode:O.string.isRequired};var xt={},at={exports:{}},jt={exports:{}},Y=jt.exports={github:{protocols:["git","http","git+ssh","git+https","ssh","https"],domain:"github.com",treepath:"tree",filetemplate:"https://{auth@}raw.githubusercontent.com/{user}/{project}/{committish}/{path}",bugstemplate:"https://{domain}/{user}/{project}/issues",gittemplate:"git://{auth@}{domain}/{user}/{project}.git{#committish}",tarballtemplate:"https://codeload.{domain}/{user}/{project}/tar.gz/{committish}"},bitbucket:{protocols:["git+ssh","git+https","ssh","https"],domain:"bitbucket.org",treepath:"src",tarballtemplate:"https://{domain}/{user}/{project}/get/{committish}.tar.gz"},gitlab:{protocols:["git+ssh","git+https","ssh","https"],domain:"gitlab.com",treepath:"tree",bugstemplate:"https://{domain}/{user}/{project}/issues",httpstemplate:"git+https://{auth@}{domain}/{user}/{projectPath}.git{#committish}",tarballtemplate:"https://{domain}/{user}/{project}/repository/archive.tar.gz?ref={committish}",pathmatch:/^\/([^/]+)\/((?!.*(\/-\/|\/repository(\/[^/]+)?\/archive\.tar\.gz)).*?)(?:\.git|\/)?$/},gist:{protocols:["git","git+ssh","git+https","ssh","https"],domain:"gist.github.com",pathmatch:/^[/](?:([^/]+)[/])?([a-z0-9]{7,})(?:[.]git)?$/,filetemplate:"https://gist.githubusercontent.com/{user}/{project}/raw{/committish}/{path}",bugstemplate:"https://{domain}/{project}",gittemplate:"git://{domain}/{project}.git{#committish}",sshtemplate:"git@{domain}:/{project}.git{#committish}",sshurltemplate:"git+ssh://git@{domain}/{project}.git{#committish}",browsetemplate:"https://{domain}/{project}{/committish}",browsefiletemplate:"https://{domain}/{project}{/committish}{#path}",docstemplate:"https://{domain}/{project}{/committish}",httpstemplate:"git+https://{domain}/{project}.git{#committish}",shortcuttemplate:"{type}:{project}{#committish}",pathtemplate:"{project}{#committish}",tarballtemplate:"https://codeload.github.com/gist/{project}/tar.gz/{committish}",hashformat:function(t){return"file-"+_t(t)}}},pt={sshtemplate:"git@{domain}:{user}/{project}.git{#committish}",sshurltemplate:"git+ssh://git@{domain}/{user}/{project}.git{#committish}",browsetemplate:"https://{domain}/{user}/{project}{/tree/committish}",browsefiletemplate:"https://{domain}/{user}/{project}/{treepath}/{committish}/{path}{#fragment}",docstemplate:"https://{domain}/{user}/{project}{/tree/committish}#readme",httpstemplate:"git+https://{auth@}{domain}/{user}/{project}.git{#committish}",filetemplate:"https://{domain}/{user}/{project}/raw/{committish}/{path}",shortcuttemplate:"{type}:{user}/{project}{#committish}",pathtemplate:"{user}/{project}{#committish}",pathmatch:/^[/]([^/]+)[/]([^/]+?)(?:[.]git|[/])?$/,hashformat:_t};Object.keys(Y).forEach(function(t){Object.keys(pt).forEach(function(e){Y[t][e]||(Y[t][e]=pt[e])}),Y[t].protocols_re=RegExp("^("+Y[t].protocols.map(function(e){return e.replace(/([\\+*{}()[\]$^|])/g,"\\$1")}).join("|")+"):$")});function _t(t){return t.toLowerCase().replace(/^\W+|\/|\W+$/g,"").replace(/\W+/g,"-")}var Et=jt.exports,mt=Et,K=Object.assign||function(e,i){if(i===null||typeof i!="object")return e;const r=Object.keys(i);let s=r.length;for(;s--;)e[r[s]]=i[r[s]];return e},le=E;function E(t,e,i,r,s,a,p){var c=this;c.type=t,Object.keys(mt[t]).forEach(function(g){c[g]=mt[t][g]}),c.user=e,c.auth=i,c.project=r,c.committish=s,c.default=a,c.opts=p||{}}E.prototype.hash=function(){return this.committish?"#"+this.committish:""};E.prototype._fill=function(t,e){if(t){var i=K({},e);i.path=i.path?i.path.replace(/^[/]+/g,""):"",e=K(K({},this.opts),e);var r=this;Object.keys(this).forEach(function(f){r[f]!=null&&i[f]==null&&(i[f]=r[f])});var s=i.auth,a=i.committish,p=i.fragment,c=i.path,g=i.project;Object.keys(i).forEach(function(f){var S=i[f];(f==="path"||f==="project")&&typeof S=="string"?i[f]=S.split("/").map(function(h){return encodeURIComponent(h)}).join("/"):f!=="domain"&&(i[f]=encodeURIComponent(S))}),i["auth@"]=s?s+"@":"",i["#fragment"]=p?"#"+this.hashformat(p):"",i.fragment=i.fragment?i.fragment:"",i["#path"]=c?"#"+this.hashformat(c):"",i["/path"]=i.path?"/"+i.path:"",i.projectPath=g.split("/").map(encodeURIComponent).join("/"),e.noCommittish?(i["#committish"]="",i["/tree/committish"]="",i["/committish"]="",i.committish=""):(i["#committish"]=a?"#"+a:"",i["/tree/committish"]=i.committish?"/"+i.treepath+"/"+i.committish:"",i["/committish"]=i.committish?"/"+i.committish:"",i.committish=i.committish||"master");var x=t;return Object.keys(i).forEach(function(f){x=x.replace(new RegExp("[{]"+f+"[}]","g"),i[f])}),e.noGitPlus?x.replace(/^git[+]/,""):x}};E.prototype.ssh=function(t){return this._fill(this.sshtemplate,t)};E.prototype.sshurl=function(t){return this._fill(this.sshurltemplate,t)};E.prototype.browse=function(t,e,i){return typeof t=="string"?(typeof e!="string"&&(i=e,e=null),this._fill(this.browsefiletemplate,K({fragment:e,path:t},i))):this._fill(this.browsetemplate,t)};E.prototype.docs=function(t){return this._fill(this.docstemplate,t)};E.prototype.bugs=function(t){return this._fill(this.bugstemplate,t)};E.prototype.https=function(t){return this._fill(this.httpstemplate,t)};E.prototype.git=function(t){return this._fill(this.gittemplate,t)};E.prototype.shortcut=function(t){return this._fill(this.shortcuttemplate,t)};E.prototype.path=function(t){return this._fill(this.pathtemplate,t)};E.prototype.tarball=function(t){var e=K({},t,{noCommittish:!1});return this._fill(this.tarballtemplate,e)};E.prototype.file=function(t,e){return this._fill(this.filetemplate,K({path:t},e))};E.prototype.getDefaultRepresentation=function(){return this.default};E.prototype.toString=function(t){return this.default&&typeof this[this.default]=="function"?this[this.default](t):this.sshurl(t)};var it,gt;function he(){return gt||(gt=1,it=function(t){t.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}),it}var ce=l;l.Node=$;l.create=l;function l(t){var e=this;if(e instanceof l||(e=new l),e.tail=null,e.head=null,e.length=0,t&&typeof t.forEach=="function")t.forEach(function(s){e.push(s)});else if(arguments.length>0)for(var i=0,r=arguments.length;i<r;i++)e.push(arguments[i]);return e}l.prototype.removeNode=function(t){if(t.list!==this)throw new Error("removing node which does not belong to this list");var e=t.next,i=t.prev;return e&&(e.prev=i),i&&(i.next=e),t===this.head&&(this.head=e),t===this.tail&&(this.tail=i),t.list.length--,t.next=null,t.prev=null,t.list=null,e};l.prototype.unshiftNode=function(t){if(t!==this.head){t.list&&t.list.removeNode(t);var e=this.head;t.list=this,t.next=e,e&&(e.prev=t),this.head=t,this.tail||(this.tail=t),this.length++}};l.prototype.pushNode=function(t){if(t!==this.tail){t.list&&t.list.removeNode(t);var e=this.tail;t.list=this,t.prev=e,e&&(e.next=t),this.tail=t,this.head||(this.head=t),this.length++}};l.prototype.push=function(){for(var t=0,e=arguments.length;t<e;t++)fe(this,arguments[t]);return this.length};l.prototype.unshift=function(){for(var t=0,e=arguments.length;t<e;t++)pe(this,arguments[t]);return this.length};l.prototype.pop=function(){if(this.tail){var t=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,t}};l.prototype.shift=function(){if(this.head){var t=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,t}};l.prototype.forEach=function(t,e){e=e||this;for(var i=this.head,r=0;i!==null;r++)t.call(e,i.value,r,this),i=i.next};l.prototype.forEachReverse=function(t,e){e=e||this;for(var i=this.tail,r=this.length-1;i!==null;r--)t.call(e,i.value,r,this),i=i.prev};l.prototype.get=function(t){for(var e=0,i=this.head;i!==null&&e<t;e++)i=i.next;if(e===t&&i!==null)return i.value};l.prototype.getReverse=function(t){for(var e=0,i=this.tail;i!==null&&e<t;e++)i=i.prev;if(e===t&&i!==null)return i.value};l.prototype.map=function(t,e){e=e||this;for(var i=new l,r=this.head;r!==null;)i.push(t.call(e,r.value,this)),r=r.next;return i};l.prototype.mapReverse=function(t,e){e=e||this;for(var i=new l,r=this.tail;r!==null;)i.push(t.call(e,r.value,this)),r=r.prev;return i};l.prototype.reduce=function(t,e){var i,r=this.head;if(arguments.length>1)i=e;else if(this.head)r=this.head.next,i=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var s=0;r!==null;s++)i=t(i,r.value,s),r=r.next;return i};l.prototype.reduceReverse=function(t,e){var i,r=this.tail;if(arguments.length>1)i=e;else if(this.tail)r=this.tail.prev,i=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var s=this.length-1;r!==null;s--)i=t(i,r.value,s),r=r.prev;return i};l.prototype.toArray=function(){for(var t=new Array(this.length),e=0,i=this.head;i!==null;e++)t[e]=i.value,i=i.next;return t};l.prototype.toArrayReverse=function(){for(var t=new Array(this.length),e=0,i=this.tail;i!==null;e++)t[e]=i.value,i=i.prev;return t};l.prototype.slice=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var i=new l;if(e<t||e<0)return i;t<0&&(t=0),e>this.length&&(e=this.length);for(var r=0,s=this.head;s!==null&&r<t;r++)s=s.next;for(;s!==null&&r<e;r++,s=s.next)i.push(s.value);return i};l.prototype.sliceReverse=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var i=new l;if(e<t||e<0)return i;t<0&&(t=0),e>this.length&&(e=this.length);for(var r=this.length,s=this.tail;s!==null&&r>e;r--)s=s.prev;for(;s!==null&&r>t;r--,s=s.prev)i.push(s.value);return i};l.prototype.splice=function(t,e,...i){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var r=0,s=this.head;s!==null&&r<t;r++)s=s.next;for(var a=[],r=0;s&&r<e;r++)a.push(s.value),s=this.removeNode(s);s===null&&(s=this.tail),s!==this.head&&s!==this.tail&&(s=s.prev);for(var r=0;r<i.length;r++)s=ue(this,s,i[r]);return a};l.prototype.reverse=function(){for(var t=this.head,e=this.tail,i=t;i!==null;i=i.prev){var r=i.prev;i.prev=i.next,i.next=r}return this.head=e,this.tail=t,this};function ue(t,e,i){var r=e===t.head?new $(i,null,e,t):new $(i,e,e.next,t);return r.next===null&&(t.tail=r),r.prev===null&&(t.head=r),t.length++,r}function fe(t,e){t.tail=new $(e,t.tail,null,t),t.head||(t.head=t.tail),t.length++}function pe(t,e){t.head=new $(e,null,t.head,t),t.tail||(t.tail=t.head),t.length++}function $(t,e,i,r){if(!(this instanceof $))return new $(t,e,i,r);this.list=r,this.value=t,e?(e.next=this,this.prev=e):this.prev=null,i?(i.prev=this,this.next=i):this.next=null}try{he()(l)}catch{}const me=ce,M=Symbol("max"),D=Symbol("length"),W=Symbol("lengthCalculator"),J=Symbol("allowStale"),N=Symbol("maxAge"),I=Symbol("dispose"),vt=Symbol("noDisposeOnSet"),b=Symbol("lruList"),w=Symbol("cache"),St=Symbol("updateAgeOnGet"),rt=()=>1;class ge{constructor(e){if(typeof e=="number"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!="number"||e.max<0))throw new TypeError("max must be a non-negative number");this[M]=e.max||1/0;const i=e.length||rt;if(this[W]=typeof i!="function"?rt:i,this[J]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[N]=e.maxAge||0,this[I]=e.dispose,this[vt]=e.noDisposeOnSet||!1,this[St]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!="number"||e<0)throw new TypeError("max must be a non-negative number");this[M]=e||1/0,X(this)}get max(){return this[M]}set allowStale(e){this[J]=!!e}get allowStale(){return this[J]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[N]=e,X(this)}get maxAge(){return this[N]}set lengthCalculator(e){typeof e!="function"&&(e=rt),e!==this[W]&&(this[W]=e,this[D]=0,this[b].forEach(i=>{i.length=this[W](i.value,i.key),this[D]+=i.length})),X(this)}get lengthCalculator(){return this[W]}get length(){return this[D]}get itemCount(){return this[b].length}rforEach(e,i){i=i||this;for(let r=this[b].tail;r!==null;){const s=r.prev;dt(this,e,r,i),r=s}}forEach(e,i){i=i||this;for(let r=this[b].head;r!==null;){const s=r.next;dt(this,e,r,i),r=s}}keys(){return this[b].toArray().map(e=>e.key)}values(){return this[b].toArray().map(e=>e.value)}reset(){this[I]&&this[b]&&this[b].length&&this[b].forEach(e=>this[I](e.key,e.value)),this[w]=new Map,this[b]=new me,this[D]=0}dump(){return this[b].map(e=>Q(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[b]}set(e,i,r){if(r=r||this[N],r&&typeof r!="number")throw new TypeError("maxAge must be a number");const s=r?Date.now():0,a=this[W](i,e);if(this[w].has(e)){if(a>this[M])return q(this,this[w].get(e)),!1;const g=this[w].get(e).value;return this[I]&&(this[vt]||this[I](e,g.value)),g.now=s,g.maxAge=r,g.value=i,this[D]+=a-g.length,g.length=a,this.get(e),X(this),!0}const p=new ve(e,i,a,s,r);return p.length>this[M]?(this[I]&&this[I](e,i),!1):(this[D]+=p.length,this[b].unshift(p),this[w].set(e,this[b].head),X(this),!0)}has(e){if(!this[w].has(e))return!1;const i=this[w].get(e).value;return!Q(this,i)}get(e){return nt(this,e,!0)}peek(e){return nt(this,e,!1)}pop(){const e=this[b].tail;return e?(q(this,e),e.value):null}del(e){q(this,this[w].get(e))}load(e){this.reset();const i=Date.now();for(let r=e.length-1;r>=0;r--){const s=e[r],a=s.e||0;if(a===0)this.set(s.k,s.v);else{const p=a-i;p>0&&this.set(s.k,s.v,p)}}}prune(){this[w].forEach((e,i)=>nt(this,i,!1))}}const nt=(t,e,i)=>{const r=t[w].get(e);if(r){const s=r.value;if(Q(t,s)){if(q(t,r),!t[J])return}else i&&(t[St]&&(r.value.now=Date.now()),t[b].unshiftNode(r));return s.value}},Q=(t,e)=>{if(!e||!e.maxAge&&!t[N])return!1;const i=Date.now()-e.now;return e.maxAge?i>e.maxAge:t[N]&&i>t[N]},X=t=>{if(t[D]>t[M])for(let e=t[b].tail;t[D]>t[M]&&e!==null;){const i=e.prev;q(t,e),e=i}},q=(t,e)=>{if(e){const i=e.value;t[I]&&t[I](i.key,i.value),t[D]-=i.length,t[w].delete(i.key),t[b].removeNode(e)}};class ve{constructor(e,i,r,s,a){this.key=e,this.value=i,this.length=r,this.now=s,this.maxAge=a||0}}const dt=(t,e,i,r)=>{let s=i.value;Q(t,s)&&(q(t,i),t[J]||(s=void 0)),s&&e.call(r,s.value,s.key,t)};var de=ge,ot=Nt,yt=Et,ye=at.exports=le,be=de,st=new be({max:1e3}),xe={"git+ssh:":"sshurl","git+https:":"https","ssh:":"sshurl","git:":"git"};function je(t){return xe[t]||t.slice(0,-1)}var _e={"git:":!0,"https:":!0,"git+https:":!0,"http:":!0,"git+http:":!0};at.exports.fromUrl=function(t,e){if(typeof t=="string"){var i=t+JSON.stringify(e||{});return st.has(i)||st.set(i,Ee(t,e)),st.get(i)}};function Ee(t,e){if(!(t==null||t==="")){var i=Ce(Se(t)?"github:"+t:t),r=Ae(i),s=i.match(/^([^:]+):(?:[^@]+@)?(?:([^/]*)\/)?([^#]+)/),a=Object.keys(yt).map(function(p){try{var c=yt[p],g=null;r.auth&&_e[r.protocol]&&(g=r.auth);var x=r.hash?decodeURIComponent(r.hash.substr(1)):null,f=null,S=null,h=null;if(s&&s[1]===p)f=s[2]&&decodeURIComponent(s[2]),S=decodeURIComponent(s[3].replace(/\.git$/,"")),h="shortcut";else{if(r.host&&r.host!==c.domain&&r.host.replace(/^www[.]/,"")!==c.domain||!c.protocols_re.test(r.protocol)||!r.path)return;var G=c.pathmatch,C=r.path.match(G);if(!C)return;C[1]!==null&&C[1]!==void 0&&(f=decodeURIComponent(C[1].replace(/^:/,""))),S=decodeURIComponent(C[2]),h=je(r.protocol)}return new ye(p,f,g,S,x,h,e)}catch(A){if(!(A instanceof URIError))throw A}}).filter(function(p){return p});if(a.length===1)return a[0]}}function Se(t){return/^[^:@%/\s.-][^:@%/\s]*[/][^:@\s/%]+(?:#.*)?$/.test(t)}function Ce(t){var e=ot.parse(t);return e.protocol==="gist:"&&e.host&&!e.path?e.protocol+"/"+e.host:t}function Ae(t){var e=t.match(/^([^@]+)@([^:/]+):[/]?((?:[^/]+[/])?[^/]+?)(?:[.]git)?(#.*)?$/);if(!e){var i=ot.parse(t);if(i.auth){const s=t.match(/[^@]+@[^:/]+/);if(s){var r=new ot.URL(s[0]);i.auth=r.username||"",r.password&&(i.auth+=":"+r.password)}}return i}return{protocol:"git+ssh:",slashes:!0,auth:e[1],host:e[2],port:null,hostname:e[2],hash:e[4],search:null,query:null,pathname:"/"+e[3],path:"/"+e[3],href:"git+ssh://"+e[1]+"@"+e[2]+"/"+e[3]+(e[4]||"")}}var we=at.exports,B={},P={},Pe=R&&R.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(P,"__esModule",{value:!0});P.setService=P.findService=P.getDefaultServiceConfig=P.getServiceConfig=void 0;const Re=Pe($t),Ie=bt,Ct={},lt=t=>{Ct[t.name]={validate:t.schema.validate.bind(t.schema),defaultConfig:t.default}};P.setService=lt;lt({name:"auth",schema:Ie.authConfigSchema,default:{}});const At=t=>{if(!t)throw new Error("service name should not be empty");const e=Ct[t];if(!e)throw new Error(`service ${t} does not exist`);return e},wt=(t,e,{validate:i}={})=>{const r=At(t),s=(0,Re.default)(e||{}),{value:a,error:p}=r.validate(s);if(i&&p)throw new Error(`Invalid blocklet service config: ${p.details.map(c=>c.message).join(", ")}`);return a};P.getServiceConfig=wt;const Pt=t=>{const{defaultConfig:e}=At(t);return e};P.getDefaultServiceConfig=Pt;const Rt=(t,e)=>{const i=[e];return(t||[]).find(r=>i.includes(r.name))};P.findService=Rt;P.default={getServiceConfig:wt,getDefaultServiceConfig:Pt,findService:Rt,setService:lt};Object.defineProperty(B,"__esModule",{value:!0});B.fixAndValidateService=B.validateMeta=void 0;const Oe=bt,De=P,Ue=t=>(!t.interfaces||!t.interfaces.length||t.interfaces.forEach(e=>{e.services&&e.services.length&&e.services.forEach(i=>{i.config=(0,De.getServiceConfig)(i.name,i.config,{validate:!0})})}),t);B.fixAndValidateService=Ue;const It=(t,{ensureFiles:e=!1,ensureDist:i=!1,ensureComponentStore:r=!0,ensureName:s=!1,skipValidateDidName:a=!1,schemaOptions:p={}}={})=>{const c=(0,Oe.createBlockletSchema)(null,{ensureFiles:e,ensureDist:i,ensureComponentStore:r,ensureName:s,skipValidateDidName:a,...p}),{value:g,error:x}=c.validate(t);if(x)throw new Error(`Invalid blocklet meta: ${x.details.map(f=>f.message).join(", ")}`);return g};B.validateMeta=It;B.default=It;(function(t){var e=R&&R.__createBinding||(Object.create?function(n,o,v,_){_===void 0&&(_=v);var d=Object.getOwnPropertyDescriptor(o,v);(!d||("get"in d?!o.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return o[v]}}),Object.defineProperty(n,_,d)}:function(n,o,v,_){_===void 0&&(_=v),n[_]=o[v]}),i=R&&R.__setModuleDefault||(Object.create?function(n,o){Object.defineProperty(n,"default",{enumerable:!0,value:o})}:function(n,o){n.default=o}),r=R&&R.__importStar||function(n){if(n&&n.__esModule)return n;var o={};if(n!=null)for(var v in n)v!=="default"&&Object.prototype.hasOwnProperty.call(n,v)&&e(o,n,v);return i(o,n),o},s=R&&R.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(t,"__esModule",{value:!0}),t.fixService=t.fixInterfaces=t.parsePerson=t.formatPerson=t.fixName=t.fixTags=t.fixPerson=t.fixKeywords=t.fixFiles=t.fixRepository=t.fixRequired=void 0;const a=s(Bt),p=r(we),c=Gt,g=B;Object.defineProperty(t,"fixService",{enumerable:!0,get:function(){return g.fixAndValidateService}});const x=ie,f=(n,o)=>{n.description||(n.description=`Blocklet from ${o}`),n.version||(n.version=c.BLOCKLET_DEFAULT_VERSION)};t.fixRequired=f;const S=n=>{if(n.repository&&(typeof n.repository=="string"&&(n.repository={type:"git",url:n.repository}),n.repository.url)){const o=p.fromUrl(n.repository.url);o&&(n.repository.url=o.getDefaultRepresentation()==="shortcut"?o.https():o.toString())}};t.fixRepository=S;const h=n=>{Array.isArray(n.files)?n.files&&(n.files=n.files.filter(o=>!(!o||typeof o!="string"))):delete n.files};t.fixFiles=h;const G=n=>{typeof n.keywords=="string"&&(n.keywords=n.keywords.split(/,\s+/)),n.keywords&&!Array.isArray(n.keywords)?delete n.keywords:n.keywords&&(n.keywords=n.keywords.filter(o=>!(typeof o!="string"||!o)))};t.fixKeywords=G;const C=n=>{typeof n.tags=="string"&&(n.tags=n.tags.split(/,\s+/)),n.tags&&!Array.isArray(n.tags)?delete n.tags:n.tags&&(n.tags=n.tags.filter(o=>!(typeof o!="string"||!o)))};t.fixTags=C;const A=(n,o)=>(n.author&&(n.author=o(n.author)),["maintainers","contributors"].forEach(v=>{Array.isArray(n[v])&&(n[v]=n[v].map(o))}),n),H=n=>{if(!n)return"";if(typeof n=="string")return n;const o=n.name||"",v=n.url||n.web,_=v?` (${v})`:"",d=n.email||n.mail,y=d?` <${d}>`:"";return o+y+_};t.formatPerson=H;const U=n=>{if(typeof n!="string")return n;const o=n.match(/^([^(<]+)/),v=n.match(/\(([^)]+)\)/),_=n.match(/<([^>]+)>/),d={};return o&&o[0].trim()&&(d.name=o[0].trim()),_&&([,d.email]=_),v&&([,d.url]=v),d};t.parsePerson=U;const F=n=>(A(n,H),A(n,U),n);t.fixPerson=F;const j=(n,o=!0)=>{if(Array.isArray(n.interfaces)||(n.interfaces=[]),n.interfaces.length)return n.interfaces.forEach(y=>{y.type===c.BLOCKLET_INTERFACE_TYPE_WEB&&(y.protocol="http")}),n;const _=(0,a.default)(n,"capabilities.dynamicPathPrefix",!0)?c.BLOCKLET_DYNAMIC_PATH_PREFIX:"/",d=({type:y="web",name:V,path:Z="/",protocol:k="http",port:tt=c.BLOCKLET_DEFAULT_PORT_NAME})=>{n.interfaces.push({type:y,name:V,path:Z,prefix:_,port:tt,protocol:k})};return[c.BLOCKLET_INTERFACE_PUBLIC].forEach(y=>{n[y]&&d({name:y,path:n[y]})}),Array.isArray(n.exposeServices)&&n.exposeServices.forEach(y=>{d({type:"service",name:y.protocol,protocol:y.protocol,port:{internal:`BLOCKLET_${y.protocol}_PORT`.toUpperCase(),external:y.port}})}),o&&(delete n.publicUrl,delete n.adminUrl,delete n.configUrl,delete n.docUrl,delete n.exposeServices,n.capabilities&&delete n.capabilities.dynamicPathPrefix),n};t.fixInterfaces=j;const z=n=>{const{did:o}=n;try{(0,x.validateNewDid)(o),n.name=o}catch{}return n};t.fixName=z,t.default={fixRequired:f,fixRepository:S,fixFiles:h,fixKeywords:G,fixPerson:F,fixTags:C,fixName:z,formatPerson:H,parsePerson:U,fixInterfaces:j,fixService:g.fixAndValidateService}})(xt);function Ot({owner:t,locale:e}){return m.jsxs(Ft,{sx:{display:"flex",alignItems:"center",gap:1},children:[t.fullName,t.did?m.jsx(Wt,{sx:{lineHeight:"initial","&::before":{content:'"("'},"&::after":{content:'")"'}},did:t.did,compact:!0,size:14,locale:e}):null]})}Ot.propTypes={owner:O.object.isRequired,locale:O.string.isRequired};function Dt({defaultUrl:t,onCancel:e,onSuccess:i,onError:r,mode:s,handleText:a}){const{api:p}=Kt(),{api:c}=qt(),[g,x]=T.useState(!1),[f,S]=T.useState(""),{t:h,locale:G}=Ht(),C={dist:{}},[A,H]=T.useState(t),[U,F]=T.useState(t?1:0),[j,z]=T.useState(C),[n,o]=T.useState(!1),[v,_]=T.useState({}),d=s==="component",y=d?!0:!t,V=async()=>{z(C),S(null),x(!0);try{const u=decodeURIComponent(A.trim());try{new URL(u)}catch{throw new Error("Invalid URL")}const{meta:et,inStore:Lt,registryUrl:Mt}=await p.getBlockletMetaFromUrl({input:{url:u}});z(et),_({inStore:Lt,registryUrl:Mt,inputUrl:A.trim()})}catch(u){console.error(u);const et=`Blocklet Install failed: ${te(u)}`;S(et),r(u)}finally{x(!1)}},Z=()=>{if(d){i({meta:j,...v}),e();return}x(!0),o(!0)},k=()=>{x(!1),o(!1),i({meta:j,...v}),e()},tt=()=>{x(!1),o(!1)};T.useEffect(()=>{t&&V()},[t]);const Ut=[{name:h("common.name"),value:zt.getDisplayName({meta:j},!0)},{name:h("common.version"),value:j.version},{name:h("common.did"),value:m.jsx(Vt,{did:j.did})},{name:h("common.author"),value:j.owner?m.jsx(Ot,{owner:j.owner,locale:G}):xt.formatPerson(j.author)},{name:h("blocklet.dist.downloadLink"),value:j.dist.tarball}],Tt=()=>g?m.jsx("div",{style:{height:200,width:"100%",display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column"},children:m.jsx(ut,{})}):j.did?m.jsx("div",{style:{paddingLeft:"10%"},children:Ut.map(u=>u.name===h("common.did")?m.jsx(ft,{valueComponent:"div",nameWidth:120,name:u.name,nameFormatter:()=>h("common.did"),children:u.value},u.name):m.jsx(ft,{valueComponent:"div",nameWidth:120,name:u.name,children:u.value},u.name))}):null,ht=[{label:h("blocklet.fromUrl.step0"),body:m.jsx(Yt,{component:"div",children:m.jsx(re,{label:h("blocklet.fromUrl.label"),autoComplete:"off",variant:"outlined",name:"url","data-cy":"blocklet-url-input",fullWidth:!0,autoFocus:!0,style:{marginBottom:32},margin:"dense",helperText:h("blocklet.fromUrl.description"),value:A,onChange:u=>{S(null),H(u.target.value)},disabled:g,onKeyPress:u=>{u.key==="Enter"&&(u.preventDefault(),V(),F(1))}})}),cancel:h("common.cancel"),confirm:h("common.next"),onCancel:e,onConfirm:()=>{V(),F(1)}},{label:h("blocklet.fromUrl.step1"),body:Tt(),cancel:h(y?"common.pre":"common.cancel"),confirm:(a==null?void 0:a.confirm)||h("blocklet.fromUrl.confirm"),onCancel:()=>{y?F(u=>u-1):e()},onConfirm:()=>{Z()}}],L=ht[U];return m.jsxs(m.Fragment,{children:[m.jsxs(Xt,{title:(a==null?void 0:a.title)||h("blocklet.fromUrl.title"),fullWidth:!0,maxWidth:"md",onClose:()=>L.onCancel(),showCloseButton:U===0,disableEscapeKeyDown:!0,open:!0,actions:m.jsxs(m.Fragment,{children:[L.cancel&&m.jsx(ct,{onClick:u=>{u.stopPropagation(),S(null),L.onCancel()},color:"inherit",children:L.cancel||h("common.cancel")}),m.jsxs(ct,{onClick:u=>{u.stopPropagation(),L.onConfirm()},color:"primary","data-cy":"install-blocklet-next-step",disabled:g||!A||f,variant:"contained",autoFocus:!0,style:{marginLeft:8},children:[g&&U===0&&m.jsx(ut,{size:16}),L.confirm]})]}),children:[y&&m.jsx(ne,{alternativeLabel:!0,activeStep:U,children:ht.map(({label:u})=>m.jsx(se,{children:m.jsx(oe,{children:u})},u))}),m.jsx(Jt,{component:"div",style:{marginTop:24},children:L.body}),!!f&&m.jsx(Qt,{severity:"error",style:{width:"100%",marginTop:8},children:f})]}),j&&n&&m.jsx(Zt,{popup:!0,open:!0,forceConnected:!1,className:"launch-from-url-auth",action:"launch-free-blocklet-by-session",checkFn:c.get,checkTimeout:5*60*1e3,onSuccess:k,extraParams:{title:j.title,wt:kt(j),blockletMetaUrl:decodeURIComponent(A.trim())},messages:{title:h("setup.keyPair.title"),scan:h("setup.keyPair.scan"),confirm:h("setup.keyPair.confirm"),success:h("setup.keyPair.success")},onClose:tt})]})}Dt.propTypes={defaultUrl:O.string,onCancel:O.func.isRequired,onSuccess:O.func.isRequired,onError:O.func,mode:O.oneOf(["install","component"]),handleText:O.object};Dt.defaultProps={onError:()=>{},defaultUrl:"",mode:"install",handleText:{}};export{ae as B,Dt as I,Ot as a,xt as f};
@@ -1,4 +1,4 @@
1
- import{bJ as $,j as i,P as r,n as f,r as m,f as q,D as H,t as j,v as U,aO as E,cz as F,ch as P,q as M,cA as O,cB as B,cC as V,cp as J,cD as S,cE as N,as as z,Q as L,cg as W,C as X}from"./index-B1ahK-2I.js";import{R as Q}from"./index-Cb_bB7kh.js";import{C as A}from"./index-C5X9a7cc.js";import{b as Y}from"./sdk-DWrnJTtv.js";import{d as G}from"./CheckCircle-B1OfEs-V.js";import{w as K}from"./wrap-locale-P1NWYJW8.js";const Z=$(i.jsx("path",{d:"M19 3H4.99c-1.11 0-1.98.89-1.98 2L3 19c0 1.1.88 2 1.99 2H19c1.1 0 2-.9 2-2V5c0-1.11-.9-2-2-2m0 12h-4c0 1.66-1.35 3-3 3s-3-1.34-3-3H4.99V5H19z"}),"Inbox");function b({invitation:e,createPassportSvg:a,passportColor:c}){const[p,o]=m.useState(!1),{t}=m.useContext(q),l=m.useMemo(()=>(e.role.title||e.role.name).toUpperCase(),[e.role.title,e.role.name]),u=m.useMemo(()=>a({title:l,issuer:e.info.name,issuerDid:e.info.appDid,ownerName:"Your Name",ownerDid:e.info.appDid,preferredColor:e.info.passportColor||c}),[e,l]),x=m.useCallback(()=>{o(!0)},[]),s=m.useCallback(()=>{o(!1)},[]);return i.jsxs(i.Fragment,{children:[i.jsx(ee,{children:i.jsx("div",{className:"invite-passport__card",onClick:x,children:i.jsx("div",{className:"invite-passport__cover",dangerouslySetInnerHTML:{__html:u}})})}),i.jsx(H,{open:p,title:t("invite.viewPermission"),PaperProps:{style:{minHeight:"auto",paddingBottom:"20px"}},onClose:s,children:e.role.permissions&&e.role.permissions.length>0?i.jsx("ul",{style:{listStyle:"circle",padding:"0 20px"},children:e.role.permissions.map(n=>i.jsx("li",{style:{listStyle:"circle"},children:n.description},n.name))}):i.jsxs("div",{style:{color:"#999",textAlign:"center"},children:[i.jsx(Z,{style:{width:"30px",height:"30px"}}),i.jsx("div",{children:t("invite.emptyPermission")})]})})]})}b.propTypes={invitation:r.object.isRequired,createPassportSvg:r.func.isRequired,passportColor:r.string};b.defaultProps={passportColor:"auto"};const ee=f.div`
1
+ import{bJ as T,j as i,P as r,n as f,r as m,f as $,D as F,t as j,v as H,aO as U,cA as E,ch as P,q as M,cB as O,cC as B,cD as V,cq as J,cE as S,cF as N,as as z,Q as L,cg as W,C as X}from"./index-C87i5P5O.js";import{R as Q}from"./index-C0MyvZkB.js";import{C as A}from"./index-BxfaKgnf.js";import{b as Y}from"./sdk-CMnoHYH1.js";import{d as G}from"./CheckCircle-lV3-9PUC.js";import{w as K}from"./wrap-locale-PwADRgtG.js";const Z=T(i.jsx("path",{d:"M19 3H4.99c-1.11 0-1.98.89-1.98 2L3 19c0 1.1.88 2 1.99 2H19c1.1 0 2-.9 2-2V5c0-1.11-.9-2-2-2m0 12h-4c0 1.66-1.35 3-3 3s-3-1.34-3-3H4.99V5H19z"}),"Inbox");function b({invitation:e,createPassportSvg:a,passportColor:c}){const[p,o]=m.useState(!1),{t}=m.useContext($),l=m.useMemo(()=>(e.role.title||e.role.name).toUpperCase(),[e.role.title,e.role.name]),u=m.useMemo(()=>a({title:l,issuer:e.info.name,issuerDid:e.info.appDid,ownerName:"Your Name",ownerDid:e.info.appDid,preferredColor:e.info.passportColor||c}),[e,l]),x=m.useCallback(()=>{o(!0)},[]),s=m.useCallback(()=>{o(!1)},[]);return i.jsxs(i.Fragment,{children:[i.jsx(ee,{children:i.jsx("div",{className:"invite-passport__card",onClick:x,children:i.jsx("div",{className:"invite-passport__cover",dangerouslySetInnerHTML:{__html:u}})})}),i.jsx(F,{open:p,title:t("invite.viewPermission"),PaperProps:{style:{minHeight:"auto",paddingBottom:"20px"}},onClose:s,children:e.role.permissions&&e.role.permissions.length>0?i.jsx("ul",{style:{listStyle:"circle",padding:"0 20px"},children:e.role.permissions.map(n=>i.jsx("li",{style:{listStyle:"circle"},children:n.description},n.name))}):i.jsxs("div",{style:{color:"#999",textAlign:"center"},children:[i.jsx(Z,{style:{width:"30px",height:"30px"}}),i.jsx("div",{children:t("invite.emptyPermission")})]})})]})}b.propTypes={invitation:r.object.isRequired,createPassportSvg:r.func.isRequired,passportColor:r.string};b.defaultProps={passportColor:"auto"};const ee=f.div`
2
2
  display: flex;
3
3
  max-width: 350px;
4
4
  margin: 30px auto;
@@ -39,7 +39,7 @@ import{bJ as $,j as i,P as r,n as f,r as m,f as q,D as H,t as j,v as U,aO as E,c
39
39
  line-height: 18px;
40
40
  color: ${({theme:e})=>e.palette.primary.main};
41
41
  }
42
- `;function R({invitation:e,onLogin:a,onReceive:c,inService:p,action:o}){var g;const{t,locale:l}=j(),{connectApi:u}=U(),{getPassportId:x}=J();let s;typeof window<"u"&&(s=(g=window==null?void 0:window.blocklet)==null?void 0:g.componentId);const n=E({loading:!1,extraParams:{baseUrl:window.location.origin,componentId:s,sourceAppPid:(e==null?void 0:e.sourceAppPid)||null}});F(async()=>{var v;const d=x();if(d&&(n.extraParams.passportId=d),o==="invite"?n.extraParams.inviteId=e.inviteId:o==="issue-passport"&&(n.extraParams.id=e.inviteId),p&&((v=e==null?void 0:e.receiver)!=null&&v.did)){n.loading=!0;try{const y=await Y.user.getUserPublicInfo({did:e.receiver.did});y!=null&&y.sourceAppPid&&(n.extraParams.sourceAppPid=y.sourceAppPid)}finally{n.loading=!1}}});const _=P(()=>{u.close()}),h=P((...d)=>{u.close(),a(...d)}),w=P(()=>{var d,v;if(typeof c=="function"){c();return}p?u.openPopup({action:o,className:"connect",forceConnected:((d=e==null?void 0:e.receiver)==null?void 0:d.did)||!1,autoConnect:!1,disableSwitchApp:!0,locale:l,extraParams:{provider:"wallet",...n.extraParams},baseUrl:window.location.origin,prefix:M(window.location.origin,B,O),messages:{title:t("receive.dialog.title"),scan:t("receive.dialog.scan"),confirm:t("receive.dialog.confirm"),success:t("receive.dialog.success")},onSuccess:h,onClose:_},{locale:l}):u.open({action:o,className:"connect",forceConnected:((v=e==null?void 0:e.receiver)==null?void 0:v.did)||!1,autoConnect:!1,disableSwitchApp:!0,locale:l,extraParams:n.extraParams,messages:{title:t("receive.dialog.title"),scan:t("receive.dialog.scan"),confirm:t("receive.dialog.confirm"),success:t("receive.dialog.success")},onSuccess:h,onClose:_})});return i.jsxs(ie,{children:[i.jsx(A,{loading:n.loading,size:"large",variant:"contained",className:"invite-receive__button","data-cy":"invite-receive-passport",color:"primary",onClick:w,children:t("invite.receive")}),i.jsxs("div",{className:"invite-receive__until",children:[t("invite.validUntil"),V(e.expireDate,l)]})]})}R.propTypes={invitation:r.object.isRequired,onLogin:r.func,onReceive:r.func,inService:r.bool,action:r.oneOf(["invite","issue-passport"])};R.defaultProps={onLogin:()=>{},onReceive:null,inService:!1,action:"invite"};const ie=f.div`
42
+ `;function R({invitation:e,onLogin:a,onReceive:c,inService:p,action:o}){var g;const{t,locale:l}=j(),{connectApi:u}=H(),{getPassportId:x}=J();let s;typeof window<"u"&&(s=(g=window==null?void 0:window.blocklet)==null?void 0:g.componentId);const n=U({loading:!1,extraParams:{baseUrl:window.location.origin,componentId:s,sourceAppPid:(e==null?void 0:e.sourceAppPid)||null}});E(async()=>{var v;const d=x();if(d&&(n.extraParams.passportId=d),o==="invite"?n.extraParams.inviteId=e.inviteId:o==="issue-passport"&&(n.extraParams.id=e.inviteId),p&&((v=e==null?void 0:e.receiver)!=null&&v.did)){n.loading=!0;try{const y=await Y.user.getUserPublicInfo({did:e.receiver.did});y!=null&&y.sourceAppPid&&(n.extraParams.sourceAppPid=y.sourceAppPid)}finally{n.loading=!1}}});const _=P(()=>{u.close()}),h=P((...d)=>{u.close(),a(...d)}),w=P(()=>{var d,v;if(typeof c=="function"){c();return}p?u.openPopup({action:o,className:"connect",forceConnected:((d=e==null?void 0:e.receiver)==null?void 0:d.did)||!1,autoConnect:!1,disableSwitchApp:!0,locale:l,extraParams:{provider:"wallet",...n.extraParams},baseUrl:window.location.origin,prefix:M(window.location.origin,B,O),messages:{title:t("receive.dialog.title"),scan:t("receive.dialog.scan"),confirm:t("receive.dialog.confirm"),success:t("receive.dialog.success")},onSuccess:h,onClose:_},{locale:l}):u.open({action:o,className:"connect",forceConnected:((v=e==null?void 0:e.receiver)==null?void 0:v.did)||!1,autoConnect:!1,disableSwitchApp:!0,locale:l,extraParams:n.extraParams,messages:{title:t("receive.dialog.title"),scan:t("receive.dialog.scan"),confirm:t("receive.dialog.confirm"),success:t("receive.dialog.success")},onSuccess:h,onClose:_})});return i.jsxs(ie,{children:[i.jsx(A,{loading:n.loading,size:"large",variant:"contained",className:"invite-receive__button","data-cy":"invite-receive-passport",color:"primary",onClick:w,children:t("invite.receive")}),i.jsxs("div",{className:"invite-receive__until",children:[t("invite.validUntil"),V(e.expireDate,l)]})]})}R.propTypes={invitation:r.object.isRequired,onLogin:r.func,onReceive:r.func,inService:r.bool,action:r.oneOf(["invite","issue-passport"])};R.defaultProps={onLogin:()=>{},onReceive:null,inService:!1,action:"invite"};const ie=f.div`
43
43
  text-align: center;
44
44
  .invite-receive__logo-wrapper {
45
45
  display: inline-flex;
@@ -109,7 +109,7 @@ import{bJ as $,j as i,P as r,n as f,r as m,f as q,D as H,t as j,v as U,aO as E,c
109
109
  .invite-receive__link {
110
110
  color: ${({theme:e})=>e.palette.primary.main};
111
111
  }
112
- `;function D({invitation:e}){const{t:a}=j(),c=m.useMemo(()=>(e.role.title||e.role.name).toUpperCase(),[e.role.title,e.role.name]),p=m.useMemo(()=>a("invite.message",{name:"{{name}}",role:c,dapp:"{{dapp}}"}),[a,c]),o=S(e.info.chainHost,e.inviter.did,"account"),t=N(p,{name(){return o?i.jsx("a",{target:"_blank",href:o,className:"invite-user__link",rel:"noreferrer",children:e.inviter.fullName},"name"):e.inviter.fullName},dapp(){return i.jsx("a",{target:"_blank",href:e.info.url,className:"invite-user__link",rel:"noreferrer",children:e.info.name},"dapp")}});return i.jsxs(re,{children:[i.jsx(z,{did:e.inviter.did,src:encodeURI(e.inviter.avatar),size:80,shape:"circle",variant:"circle"}),i.jsx("div",{className:"invite-user__message",children:t})]})}D.propTypes={invitation:r.object.isRequired};const re=f.div`
112
+ `;function q({invitation:e}){const{t:a}=j(),c=m.useMemo(()=>(e.role.title||e.role.name).toUpperCase(),[e.role.title,e.role.name]),p=m.useMemo(()=>a("invite.message",{name:"{{name}}",role:c,dapp:"{{dapp}}"}),[a,c]),o=S(e.info.chainHost,e.inviter.did,"account"),t=N(p,{name(){return o?i.jsx("a",{target:"_blank",href:o,className:"invite-user__link",rel:"noreferrer",children:e.inviter.fullName},"name"):e.inviter.fullName},dapp(){return i.jsx("a",{target:"_blank",href:e.info.url,className:"invite-user__link",rel:"noreferrer",children:e.info.name},"dapp")}});return i.jsxs(re,{children:[i.jsx(z,{did:e.inviter.did,src:encodeURI(e.inviter.avatar),size:80,shape:"circle",variant:"circle"}),i.jsx("div",{className:"invite-user__message",children:t})]})}q.propTypes={invitation:r.object.isRequired};const re=f.div`
113
113
  display: flex;
114
114
  flex-direction: column;
115
115
  justify-content: center;
@@ -155,7 +155,7 @@ import{bJ as $,j as i,P as r,n as f,r as m,f as q,D as H,t as j,v as U,aO as E,c
155
155
  .invite-user__link {
156
156
  color: ${({theme:e})=>e.palette.primary.main};
157
157
  }
158
- `;function T({invitation:e,...a}){return i.jsxs(ne,{...a,children:[i.jsx(z,{did:e.info.did,src:e.info.logo,style:{flexShrink:0}}),i.jsxs("div",{className:"invite-app__content",children:[i.jsx("div",{className:"invite-app__title",children:e.info.name}),i.jsx("div",{className:"invite-app__description",children:e.info.description})]})]})}T.propTypes={invitation:r.object.isRequired};const ne=f.div`
158
+ `;function D({invitation:e,...a}){return i.jsxs(ne,{...a,children:[i.jsx(z,{did:e.info.did,src:e.info.logo,style:{flexShrink:0}}),i.jsxs("div",{className:"invite-app__content",children:[i.jsx("div",{className:"invite-app__title",children:e.info.name}),i.jsx("div",{className:"invite-app__description",children:e.info.description})]})]})}D.propTypes={invitation:r.object.isRequired};const ne=f.div`
159
159
  display: flex;
160
160
  justify-content: space-between;
161
161
  align-items: center;
@@ -179,7 +179,7 @@ import{bJ as $,j as i,P as r,n as f,r as m,f as q,D as H,t as j,v as U,aO as E,c
179
179
  color: #999;
180
180
  overflow: hidden;
181
181
  }
182
- `;function I({getDataFn:e,passportColor:a,createPassportSvg:c,onLoginSuccess:p,checkFn:o,onReceive:t,inService:l,action:u,status:x}){var w,g,d;const s=W(e);if(s!=null&&s.loading)return i.jsx(X,{});if(s!=null&&s.error)return i.jsx(Q,{status:"404",title:(g=(w=s==null?void 0:s.error)==null?void 0:w.response)==null?void 0:g.data,description:""});const n=x==="success"||((d=s==null?void 0:s.data)==null?void 0:d.status)==="success",_=n?C:D,h=n?k:R;return i.jsx(oe,{className:"page-invite__wrapper",children:s!=null&&s.data?i.jsxs(i.Fragment,{children:[i.jsx(T,{invitation:s.data}),i.jsxs(L,{className:"page-invite__card",children:[i.jsx(_,{invitation:s.data}),i.jsx(b,{invitation:s.data,action:u,createPassportSvg:c,passportColor:a}),i.jsx(h,{invitation:s.data,action:u,onLogin:p,checkFn:o,onReceive:t,inService:l})]})]}):null})}I.propTypes={getDataFn:r.func.isRequired,checkFn:r.func.isRequired,createPassportSvg:r.func.isRequired,onLoginSuccess:r.func,onReceive:r.func,passportColor:r.string,inService:r.bool,action:r.oneOf(["invite","issue-passpor"]),status:r.oneOf(["success",""])};I.defaultProps={onLoginSuccess:()=>{},passportColor:"auto",onReceive:null,inService:!1,action:"invite",status:""};const oe=f.div`
182
+ `;function I({getDataFn:e,passportColor:a,createPassportSvg:c,onLoginSuccess:p,checkFn:o,onReceive:t,inService:l,action:u,status:x}){var w,g,d;const s=W(e);if(s!=null&&s.loading)return i.jsx(X,{});if(s!=null&&s.error)return i.jsx(Q,{status:"404",title:(g=(w=s==null?void 0:s.error)==null?void 0:w.response)==null?void 0:g.data,description:""});const n=x==="success"||((d=s==null?void 0:s.data)==null?void 0:d.status)==="success",_=n?C:q,h=n?k:R;return i.jsx(oe,{className:"page-invite__wrapper",children:s!=null&&s.data?i.jsxs(i.Fragment,{children:[i.jsx(D,{invitation:s.data}),i.jsxs(L,{className:"page-invite__card",children:[i.jsx(_,{invitation:s.data}),i.jsx(b,{invitation:s.data,action:u,createPassportSvg:c,passportColor:a}),i.jsx(h,{invitation:s.data,action:u,onLogin:p,checkFn:o,onReceive:t,inService:l})]})]}):null})}I.propTypes={getDataFn:r.func.isRequired,checkFn:r.func.isRequired,createPassportSvg:r.func.isRequired,onLoginSuccess:r.func,onReceive:r.func,passportColor:r.string,inService:r.bool,action:r.oneOf(["invite","issue-passpor"]),status:r.oneOf(["success",""])};I.defaultProps={onLoginSuccess:()=>{},passportColor:"auto",onReceive:null,inService:!1,action:"invite",status:""};const oe=f.div`
183
183
  max-width: 460px;
184
184
  max-height: 650px;
185
185
  min-height: 450px;
@@ -1 +1 @@
1
- import{aK as i,aL as o,j as s,g as u,fl as f}from"./index-B1ahK-2I.js";var e={},l=o;Object.defineProperty(e,"__esModule",{value:!0});var n=e.default=void 0,v=l(i()),d=s;n=e.default=(0,v.default)((0,d.jsx)("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"InfoOutlined");const a=f;var x=(t,r)=>a(t)===a(r);const h=u(x);export{n as d,h as i};
1
+ import{aK as i,aL as o,j as s,g as u,fm as f}from"./index-C87i5P5O.js";var e={},l=o;Object.defineProperty(e,"__esModule",{value:!0});var n=e.default=void 0,v=l(i()),d=s;n=e.default=(0,v.default)((0,d.jsx)("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"InfoOutlined");const a=f;var m=(t,r)=>a(t)===a(r);const h=u(m);export{n as d,h as i};
@@ -1 +1 @@
1
- import{g as r,eS as t}from"./index-B1ahK-2I.js";var u=t;function e(a,s){return u(a,s)}var o=e;const l=r(o);export{o as a,l as i};
1
+ import{g as r,eT as t}from"./index-C87i5P5O.js";var u=t;function e(a,s){return u(a,s)}var o=e;const l=r(o);export{o as a,l as i};