@abtnode/webapp 1.16.27-beta-9397aa36 → 1.16.27-beta-43ab3adf

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 (165) hide show
  1. package/blocklet.js +1 -1
  2. package/blocklet.yml +1 -1
  3. package/dist/assets/{Add-BYcTrfwq.js → Add-BlWdL5hq.js} +1 -1
  4. package/dist/assets/{ArrowDropDown-Ce8utXjU.js → ArrowDropDown-BRSuKRSZ.js} +1 -1
  5. package/dist/assets/{Autocomplete-BgbFIwgC.js → Autocomplete-DzQAgmMV.js} +1 -1
  6. package/dist/assets/{Breadcrumbs-DhzWQAd5.js → Breadcrumbs-BQD6r-rf.js} +1 -1
  7. package/dist/assets/{ButtonGroup-DsDQPFq5.js → ButtonGroup-CqHbqvIj.js} +1 -1
  8. package/dist/assets/{CheckCircle-z0EmvxpD.js → CheckCircle-CSPlY_20.js} +1 -1
  9. package/dist/assets/{ChevronLeft-CwZ4eGkY.js → ChevronLeft-zlmw0JTD.js} +1 -1
  10. package/dist/assets/{ChevronRight-DF2TQuxF.js → ChevronRight-hhdO2z__.js} +1 -1
  11. package/dist/assets/{Close-TD13_jXp.js → Close-BfNzQHXc.js} +1 -1
  12. package/dist/assets/{Delete-B32Y4H9I.js → Delete-HYXbanP_.js} +1 -1
  13. package/dist/assets/DeleteOutline-mQ8p8X2l.js +1 -0
  14. package/dist/assets/{Done-Dh00ds6i.js → Done-1q2rveFh.js} +1 -1
  15. package/dist/assets/{Edit-BJLfjGzO.js → Edit-BowBuCq8.js} +1 -1
  16. package/dist/assets/{EditIcon-BM1-fNyQ.js → EditIcon-nFgXy_Ap.js} +1 -1
  17. package/dist/assets/{FilterList-0wFVrPUc.js → FilterList-CFsrQPpD.js} +1 -1
  18. package/dist/assets/{Google-Bh_n6egY.js → Google-Dm0Bt78U.js} +1 -1
  19. package/dist/assets/{Https-C3LwivZ6.js → Https-CspPw1QL.js} +1 -1
  20. package/dist/assets/{InfoOutlined-Dv-PS_K9.js → InfoOutlined-DD-Zg0Tj.js} +1 -1
  21. package/dist/assets/{InputAdornment-BsJrfw9W.js → InputAdornment-Dy1fA12v.js} +1 -1
  22. package/dist/assets/{InputLabel-3Wx_imEU.js → InputLabel-BXQy_ZSg.js} +1 -1
  23. package/dist/assets/{LastPage-IxsHKdZG.js → LastPage-C7awZPyV.js} +1 -1
  24. package/dist/assets/{Launch-0VxvnuWe.js → Launch-Eb8N22dN.js} +1 -1
  25. package/dist/assets/{Link-D4THmfDH.js → Link-euuV_LRf.js} +1 -1
  26. package/dist/assets/{LoadingButton-kMo-bLLA.js → LoadingButton-DVHwr9De.js} +1 -1
  27. package/dist/assets/{LockIcon-DVMXWBuj.js → LockIcon-Ca85OyYH.js} +1 -1
  28. package/dist/assets/{Loop-8YHpWrw7.js → Loop-vUb_fmsc.js} +1 -1
  29. package/dist/assets/{MoreVert-Dy-UXLSF.js → MoreVert-gaCnI5Xf.js} +1 -1
  30. package/dist/assets/{Pagination-CvzuQKWn.js → Pagination-DfzcotPN.js} +1 -1
  31. package/dist/assets/{Public-Cy1SlD9D.js → Public-BEijyP_7.js} +1 -1
  32. package/dist/assets/{SchemaReference.es-Wg6qjI2Q.js → SchemaReference.es-ncoplB18.js} +1 -1
  33. package/dist/assets/{Search-CLqP6dSG.js → Search-Cz2kpFbT.js} +1 -1
  34. package/dist/assets/{Select-DacRJUpT.js → Select-D6ACs1xY.js} +1 -1
  35. package/dist/assets/{Skeleton-B635xq9w.js → Skeleton-DWKEXisW.js} +1 -1
  36. package/dist/assets/{Slider-kWM3QD3U.js → Slider-DKraNvrD.js} +1 -1
  37. package/dist/assets/{Stepper-CfMuItAU.js → Stepper-CZFVEfLi.js} +1 -1
  38. package/dist/assets/{TextField-ChYCqgnF.js → TextField-DRrSIaR4.js} +1 -1
  39. package/dist/assets/{ToggleButtonGroup-D-TzdChr.js → ToggleButtonGroup-CBvNwQed.js} +1 -1
  40. package/dist/assets/{ViewList-C9rEsLfO.js → ViewList-CxKdhgAh.js} +1 -1
  41. package/dist/assets/{actions-BwC0xihZ.js → actions-QLA3pt8S.js} +1 -1
  42. package/dist/assets/{actions-DLUCcZnb.js → actions-jzQJLd83.js} +1 -1
  43. package/dist/assets/{agreement-C-3kwpSq.js → agreement-Bd_YDn4J.js} +1 -1
  44. package/dist/assets/api-sSit_7Kw.js +1 -0
  45. package/dist/assets/{app-avatar-CLoA8FKQ.js → app-avatar-DH3uT_Nr.js} +1 -1
  46. package/dist/assets/{audit-logs-CQgLtoSJ.js → audit-logs-DwuYsIhc.js} +1 -1
  47. package/dist/assets/{brace-fold.es-C7pAHsAz.js → brace-fold.es-DBcYme5k.js} +1 -1
  48. package/dist/assets/{bundle-avatar-C0jAIMBi.js → bundle-avatar-4GKn5oRs.js} +1 -1
  49. package/dist/assets/{chart-CCJil07D.js → chart-BhmgRFRd.js} +1 -1
  50. package/dist/assets/{click-to-copy-BxRY2T53.js → click-to-copy-BJBKnF7C.js} +1 -1
  51. package/dist/assets/{closebrackets.es-CW-znL7B.js → closebrackets.es-CLLTB-Rw.js} +1 -1
  52. package/dist/assets/{codemirror.es-BCKCN0pa.js → codemirror.es-DiBSlxeg.js} +1 -1
  53. package/dist/assets/{comment.es--JXaP270.js → comment.es-DTp5sWbp.js} +1 -1
  54. package/dist/assets/{config-navigation-9U1-i3qG.js → config-navigation-Dh_BXFIi.js} +1 -1
  55. package/dist/assets/{delete-confirm-Cu52-w9K.js → delete-confirm-CNU7dJ17.js} +1 -1
  56. package/dist/assets/{detail-TSZFt17G.js → detail-CESxJL-2.js} +3 -3
  57. package/dist/assets/{dialog.es-DdP5pxPG.js → dialog.es-D1H3OJaa.js} +1 -1
  58. package/dist/assets/{download-BTNda_FN.js → download-Htx7YW1G.js} +1 -1
  59. package/dist/assets/{foldgutter.es-gix6KVwn.js → foldgutter.es-C2ROsMEX.js} +1 -1
  60. package/dist/assets/getValidReactChildren-BXQ8AiZt.js +1 -0
  61. package/dist/assets/{hint.es-BkoxNExU.js → hint.es-QDCU5iC6.js} +1 -1
  62. package/dist/assets/{hint.es2-D0UclqLD.js → hint.es2-BteAZTtw.js} +1 -1
  63. package/dist/assets/{iframe-Dry0Q1RC.js → iframe-CIfJru42.js} +1 -1
  64. package/dist/assets/{index-DHy7fnHK.js → index--hCEdE0S.js} +1 -1
  65. package/dist/assets/{index-DKleljgS.js → index-2dK67bGl.js} +1 -1
  66. package/dist/assets/{index-D4mUNiA3.js → index-8fCm2Jic.js} +1 -1
  67. package/dist/assets/{index-udgf9h3j.js → index-B2x_NkGk.js} +1 -1
  68. package/dist/assets/{index-nk7Jeg9T.js → index-B6H1TQgD.js} +1 -1
  69. package/dist/assets/{index-4SekL7Au.js → index-BFmN77vD.js} +1 -1
  70. package/dist/assets/{index-DHBWVWpd.js → index-BNasUWiN.js} +1 -1
  71. package/dist/assets/{index-CcI2gztc.js → index-BZvR35Hj.js} +1 -1
  72. package/dist/assets/{index-CJjmaZOb.js → index-BcsyQdON.js} +1 -1
  73. package/dist/assets/{index-MgqsR5Yr.js → index-Bh-DJU8Z.js} +1 -1
  74. package/dist/assets/{index-BmYduQjf.js → index-Bm4qa0nV.js} +1 -1
  75. package/dist/assets/{index-C6Wak-Bp.js → index-BrX8n3kg.js} +1 -1
  76. package/dist/assets/{index-BOyFzt02.js → index-BsU6rGWy.js} +1 -1
  77. package/dist/assets/{index-tCtD2xpl.js → index-Bu9Gdw_x.js} +1 -1
  78. package/dist/assets/{index-D1qmIEQe.js → index-C01qpSwK.js} +1 -1
  79. package/dist/assets/index-C2H71CT1.js +21 -0
  80. package/dist/assets/{index-D1IHJL8V.js → index-C39X5nSU.js} +1 -1
  81. package/dist/assets/{index-DyLmBsrc.js → index-CJRh33cD.js} +1 -1
  82. package/dist/assets/{index-DYIWxxvc.js → index-CN4-jpgI.js} +10 -10
  83. package/dist/assets/{index-fzAzVQZ7.js → index-CTyxnc1Q.js} +1 -1
  84. package/dist/assets/{index-DZ38lcnS.js → index-CgLCDu24.js} +2 -2
  85. package/dist/assets/{index-ByTAZBnH.js → index-CpNJmBAT.js} +1 -1
  86. package/dist/assets/{index-DdYi7g5A.js → index-D1-aBvtW.js} +1 -1
  87. package/dist/assets/{index-CLLusFhD.js → index-D4Db9ftV.js} +1 -1
  88. package/dist/assets/{index-DdImsIrU.js → index-DBd7rWWn.js} +1 -1
  89. package/dist/assets/{index-cto27BjI.js → index-DBlH-4qz.js} +2 -2
  90. package/dist/assets/{index-MraPT5rJ.js → index-DEBI0lGj.js} +1 -1
  91. package/dist/assets/{index-CV5o0SmN.js → index-DFCC9v5j.js} +5 -5
  92. package/dist/assets/{index-CwvvU6sG.js → index-DI-gzmKu.js} +1 -1
  93. package/dist/assets/{index-Bq3EqJlL.js → index-DNRVE0NP.js} +1 -1
  94. package/dist/assets/index-DQZaP4Az.js +54 -0
  95. package/dist/assets/{index-BkfzVG1e.js → index-DWTs3F9i.js} +1 -1
  96. package/dist/assets/{index-CivlhCtE.js → index-DddM0S9V.js} +1 -1
  97. package/dist/assets/{index-BPb4u19B.js → index-DnYXtUxe.js} +1 -1
  98. package/dist/assets/{index-C9snPGrA.js → index-Dz5x-Zd5.js} +1 -1
  99. package/dist/assets/{index-CZxztyyO.js → index-GQiNlTaJ.js} +1 -1
  100. package/dist/assets/{index-CpMrB60J.js → index-Hkok7PnJ.js} +3 -3
  101. package/dist/assets/{index-RXFOkpdO.js → index-Mdw0srMB.js} +1 -1
  102. package/dist/assets/{index-D2aPyZEh.js → index-RLS72NCQ.js} +3 -3
  103. package/dist/assets/{index-58xom0se.js → index-f3gCWa9h.js} +1 -1
  104. package/dist/assets/{index-BYxU5EuJ.js → index-rJLRm37D.js} +1 -1
  105. package/dist/assets/{index-Z23xnW60.js → index-rfYAdo12.js} +1 -1
  106. package/dist/assets/{index-Cybcu3bZ.js → index-uyaXmUh9.js} +1 -1
  107. package/dist/assets/{index.es-VZygEdns.js → index.es-BU-QQy1a.js} +1 -1
  108. package/dist/assets/{index.esm-Bpp1W-0n.js → index.esm-UN3QaGsN.js} +1 -1
  109. package/dist/assets/{info-addon.es-Dz55t6aF.js → info-addon.es-30ukilBE.js} +1 -1
  110. package/dist/assets/{info.es-DlvBMDVd.js → info.es-2lPs4qsI.js} +1 -1
  111. package/dist/assets/{install-from-url-BfQGdJqB.js → install-from-url-BQJWpTKl.js} +1 -1
  112. package/dist/assets/{invitation-Db4MC3JQ.js → invitation-BpNMGSxV.js} +1 -1
  113. package/dist/assets/{isEqual-SGvPf73-.js → isEqual-C9LQO0Wo.js} +1 -1
  114. package/dist/assets/{item-BftAM0Zi.js → item-CE4vGuWF.js} +1 -1
  115. package/dist/assets/{javascript.es-BNj6-t-x.js → javascript.es-C13fQY0O.js} +1 -1
  116. package/dist/assets/{jump-to-line.es-DgFeCONV.js → jump-to-line.es-BqUFIspc.js} +1 -1
  117. package/dist/assets/{jump.es-DW68RHsu.js → jump.es-E5FdtiiP.js} +1 -1
  118. package/dist/assets/{line-1yBH41Wd.js → line-ODorkEX8.js} +3 -3
  119. package/dist/assets/{lint.es-DmdHzCyK.js → lint.es-CmOxC0-j.js} +1 -1
  120. package/dist/assets/{lint.es2-CgJGCOHv.js → lint.es2-f8EXNnrq.js} +1 -1
  121. package/dist/assets/{lint.es3-BL6uCIJs.js → lint.es3-BxgO4Daf.js} +1 -1
  122. package/dist/assets/{list-header-CwzHI2Rt.js → list-header-DF2AUmaz.js} +1 -1
  123. package/dist/assets/{log-Ec_QJxk0.js → log-CNVd8L59.js} +1 -1
  124. package/dist/assets/{lottie-LUS1MfCT.js → lottie-BuomNMnt.js} +1 -1
  125. package/dist/assets/{matchbrackets.es-CHrUGVwe.js → matchbrackets.es-Dhn5dtU-.js} +1 -1
  126. package/dist/assets/{memory-yOjaiNVs.js → memory-BSkx1Ub2.js} +1 -1
  127. package/dist/assets/{mode.es-CmPIaKTd.js → mode.es-BfudmPy3.js} +1 -1
  128. package/dist/assets/{mode.es2-CpVpeZ6j.js → mode.es2-DvlBoAjR.js} +1 -1
  129. package/dist/assets/{mode.es3-BhW-mRJe.js → mode.es3-JiFk1pWJ.js} +1 -1
  130. package/dist/assets/{onlineParser.es-DLbzJOgY.js → onlineParser.es-BSW2adyc.js} +1 -1
  131. package/dist/assets/{overview-BjZwvO3w.js → overview-CXRCvckQ.js} +1 -1
  132. package/dist/assets/{react-BX905qse.js → react-DwbfLI7Z.js} +3 -3
  133. package/dist/assets/{redux-BfgfWfKE.js → redux-Bu4pculE.js} +1 -1
  134. package/dist/assets/{resource-dialog-D46mQ3iv.js → resource-dialog-BL8JdZuL.js} +1 -1
  135. package/dist/assets/{runtime-BudjolOf.js → runtime-KfScM6FA.js} +1 -1
  136. package/dist/assets/{search.es-J1x6rp7i.js → search.es-yd0fhcZk.js} +1 -1
  137. package/dist/assets/{searchcursor.es-DGZQjnVx.js → searchcursor.es-Dy_G_QZQ.js} +1 -1
  138. package/dist/assets/service-BUuflGft.js +1 -0
  139. package/dist/assets/{show-hint.es-DgCG1PfH.js → show-hint.es-BbqPLgHC.js} +1 -1
  140. package/dist/assets/{slicedToArray-j5L_xxoK.js → slicedToArray-CUj4BDqr.js} +1 -1
  141. package/dist/assets/{spaces-BzjtPxcp.js → spaces-DbeGuVPF.js} +1 -1
  142. package/dist/assets/{sublime.es-BmvW8WLk.js → sublime.es-Bu1xK-a6.js} +1 -1
  143. package/dist/assets/{switch-control-2xhJNPLI.js → switch-control-Oh1i031K.js} +1 -1
  144. package/dist/assets/{table-icons-DNH5IpNS.js → table-icons-gSPlUUro.js} +2 -2
  145. package/dist/assets/{tag-DwIjrotQ.js → tag-tXL4aJpc.js} +1 -1
  146. package/dist/assets/{team-Bds6tH0s.js → team-B2Py-5R-.js} +1 -1
  147. package/dist/assets/{toUpper-DmN3YmMF.js → toUpper-fPzt0_fA.js} +1 -1
  148. package/dist/assets/{traffic-DRJFVCky.js → traffic-C7SAOKwi.js} +1 -1
  149. package/dist/assets/{url-evaluation-Dw2A031X.js → url-evaluation-OWrig3n8.js} +1 -1
  150. package/dist/assets/{use-blocklet-info-for-connect-did-spaces-CWFXmzXz.js → use-blocklet-info-for-connect-did-spaces-tLVaGUOx.js} +1 -1
  151. package/dist/assets/{useLocalStorage-C7ck6rDl.js → useLocalStorage-Den65TTd.js} +1 -1
  152. package/dist/assets/{util-BHhvzew-.js → util-BjsuBWBH.js} +1 -1
  153. package/dist/assets/{wait-container-DrkB9Qje.js → wait-container-CnNsD3cH.js} +1 -1
  154. package/dist/assets/{withStyles-DQBIFjtv.js → withStyles-fo91W1eJ.js} +1 -1
  155. package/dist/assets/{wrap-locale-BMwksOY3.js → wrap-locale-BSXKmMbJ.js} +1 -1
  156. package/dist/index.html +1 -1
  157. package/dist/service-worker.js +1 -1
  158. package/package.json +1 -1
  159. package/dist/assets/DeleteOutline-CfcGLGyQ.js +0 -1
  160. package/dist/assets/DeleteOutline-DvvZ31vT.js +0 -1
  161. package/dist/assets/api-Dg1aNjni.js +0 -1
  162. package/dist/assets/getValidReactChildren-BSSAKXXh.js +0 -1
  163. package/dist/assets/index-7VEn8pMG.js +0 -21
  164. package/dist/assets/index-CPsoyw3K.js +0 -54
  165. package/dist/assets/service-1xIndkC2.js +0 -1
@@ -1,4 +1,4 @@
1
- import{r as y,j as e,g as m3,bm as _,q as X,m as Y,D as Z,B as v,C as k,w as Ae,J as He,K as n3,P as S,bO as w,n as Q,cl as q,dG as z,fL as b3,aY as le,aZ as ce,a3 as j,ae as h3,A as R,fM as Ee,Q as h,fN as Ie,M as De,b as ue,aL as de,aM as Je,F as k3,U as w3,aO as a3,W as K3,cY as f3,fO as Fe,fP as pe,dM as X3,dI as fe,dJ as Z3,fQ as Ge,fR as me,dL as he,fS as ge,fT as Be,fU as ye,v as Ne,az as d3,T as Oe,f as Te,H as Se,V as M3}from"./index-cto27BjI.js";import{d as g3}from"./Add-BYcTrfwq.js";import{S as o3}from"./index-MgqsR5Yr.js";import{d as l3}from"./EditIcon-BM1-fNyQ.js";import{d as Ce}from"./LockIcon-DVMXWBuj.js";import{L as B3,S as y3,d as xe}from"./list-header-CwzHI2Rt.js";import{b as s3,u as Pe}from"./team-Bds6tH0s.js";import{T as W,F as ve}from"./TextField-ChYCqgnF.js";import{C as Re}from"./Google-Bh_n6egY.js";import{E as N3}from"./index-58xom0se.js";import{l as Q3}from"./index-D4mUNiA3.js";import{j as Me}from"./index-DKleljgS.js";import{I as Le}from"./InputAdornment-BsJrfw9W.js";import{I as Ve}from"./InputLabel-3Wx_imEU.js";import{T as _e,a as J3}from"./ToggleButtonGroup-D-TzdChr.js";import{O as We}from"./Select-DacRJUpT.js";import"./ButtonGroup-DsDQPFq5.js";import"./getValidReactChildren-BSSAKXXh.js";import"./Search-CLqP6dSG.js";import"./isEqual-SGvPf73-.js";var O3={};Object.defineProperty(O3,"__esModule",{value:!0});var i3=O3.default=void 0;Ue(y);var L3=e;function Ue(n){return n&&n.__esModule?n:{default:n}}function V3(n,o){var i=Object.keys(n);if(Object.getOwnPropertySymbols){var H=Object.getOwnPropertySymbols(n);o&&(H=H.filter(function(I){return Object.getOwnPropertyDescriptor(n,I).enumerable})),i.push.apply(i,H)}return i}function _3(n){for(var o=1;o<arguments.length;o++){var i=arguments[o]!=null?arguments[o]:{};o%2?V3(Object(i),!0).forEach(function(H){je(n,H,i[H])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):V3(Object(i)).forEach(function(H){Object.defineProperty(n,H,Object.getOwnPropertyDescriptor(i,H))})}return n}function je(n,o,i){return o=be(o),o in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i,n}function be(n){var o=ke(n,"string");return typeof o=="symbol"?o:String(o)}function ke(n,o){if(typeof n!="object"||!n)return n;var i=n[Symbol.toPrimitive];if(i!==void 0){var H=i.call(n,o||"default");if(typeof H!="object")return H;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(n)}var T3=function(o){return(0,L3.jsx)("svg",_3(_3({},o),{},{children:(0,L3.jsx)("path",{d:"M8.438 4.313H8.25a.188.188 0 0 0 .188-.188v.188h7.124v-.188c0 .103.085.188.188.188h-.188V6h1.688V4.125c0-.827-.673-1.5-1.5-1.5h-7.5c-.827 0-1.5.673-1.5 1.5V6h1.688V4.312zM20.25 6H3.75a.75.75 0 0 0-.75.75v.75c0 .103.084.188.188.188h1.415l.579 12.257c.038.8.698 1.43 1.498 1.43h10.64c.802 0 1.46-.628 1.498-1.43l.579-12.258h1.416A.188.188 0 0 0 21 7.5v-.75a.75.75 0 0 0-.75-.75zm-3.11 13.688H6.86l-.567-12h11.414l-.567 12z"})}))};T3.defaultProps={width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"};T3.displayName="delete";i3=O3.default=T3;var Y3={exports:{}},q3={exports:{}};(function(){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o={rotl:function(i,H){return i<<H|i>>>32-H},rotr:function(i,H){return i<<32-H|i>>>H},endian:function(i){if(i.constructor==Number)return o.rotl(i,8)&16711935|o.rotl(i,24)&4278255360;for(var H=0;H<i.length;H++)i[H]=o.endian(i[H]);return i},randomBytes:function(i){for(var H=[];i>0;i--)H.push(Math.floor(Math.random()*256));return H},bytesToWords:function(i){for(var H=[],I=0,c=0;I<i.length;I++,c+=8)H[c>>>5]|=i[I]<<24-c%32;return H},wordsToBytes:function(i){for(var H=[],I=0;I<i.length*32;I+=8)H.push(i[I>>>5]>>>24-I%32&255);return H},bytesToHex:function(i){for(var H=[],I=0;I<i.length;I++)H.push((i[I]>>>4).toString(16)),H.push((i[I]&15).toString(16));return H.join("")},hexToBytes:function(i){for(var H=[],I=0;I<i.length;I+=2)H.push(parseInt(i.substr(I,2),16));return H},bytesToBase64:function(i){for(var H=[],I=0;I<i.length;I+=3)for(var c=i[I]<<16|i[I+1]<<8|i[I+2],u=0;u<4;u++)I*8+u*6<=i.length*8?H.push(n.charAt(c>>>6*(3-u)&63)):H.push("=");return H.join("")},base64ToBytes:function(i){i=i.replace(/[^A-Z0-9+\/]/ig,"");for(var H=[],I=0,c=0;I<i.length;c=++I%4)c!=0&&H.push((n.indexOf(i.charAt(I-1))&Math.pow(2,-2*c+8)-1)<<c*2|n.indexOf(i.charAt(I))>>>6-c*2);return H}};q3.exports=o})();var we=q3.exports,G3={utf8:{stringToBytes:function(n){return G3.bin.stringToBytes(unescape(encodeURIComponent(n)))},bytesToString:function(n){return decodeURIComponent(escape(G3.bin.bytesToString(n)))}},bin:{stringToBytes:function(n){for(var o=[],i=0;i<n.length;i++)o.push(n.charCodeAt(i)&255);return o},bytesToString:function(n){for(var o=[],i=0;i<n.length;i++)o.push(String.fromCharCode(n[i]));return o.join("")}}},W3=G3;/*!
1
+ import{r as y,j as e,g as m3,bm as _,q as X,m as Y,D as Z,B as v,C as k,w as Ae,J as He,K as n3,P as S,bO as w,n as Q,cl as q,dG as z,fL as b3,aY as le,aZ as ce,a3 as j,ae as h3,A as R,fM as Ee,Q as h,fN as Ie,M as De,b as ue,aL as de,aM as Je,F as k3,U as w3,aO as a3,W as K3,cY as f3,fO as Fe,fP as pe,dM as X3,dI as fe,dJ as Z3,fQ as Ge,fR as me,dL as he,fS as ge,fT as Be,fU as ye,v as Ne,az as d3,T as Oe,f as Te,H as Se,V as M3}from"./index-DBlH-4qz.js";import{d as g3}from"./Add-BlWdL5hq.js";import{S as o3}from"./index-Bh-DJU8Z.js";import{d as l3}from"./EditIcon-nFgXy_Ap.js";import{d as Ce}from"./LockIcon-Ca85OyYH.js";import{L as B3,S as y3,d as xe}from"./list-header-DF2AUmaz.js";import{b as s3,u as Pe}from"./team-B2Py-5R-.js";import{T as W,F as ve}from"./TextField-DRrSIaR4.js";import{C as Re}from"./Google-Dm0Bt78U.js";import{E as N3}from"./index-f3gCWa9h.js";import{l as Q3}from"./index-8fCm2Jic.js";import{j as Me}from"./index-2dK67bGl.js";import{I as Le}from"./InputAdornment-Dy1fA12v.js";import{I as Ve}from"./InputLabel-BXQy_ZSg.js";import{T as _e,a as J3}from"./ToggleButtonGroup-CBvNwQed.js";import{O as We}from"./Select-D6ACs1xY.js";import"./ButtonGroup-CqHbqvIj.js";import"./getValidReactChildren-BXQ8AiZt.js";import"./Search-Cz2kpFbT.js";import"./isEqual-C9LQO0Wo.js";var O3={};Object.defineProperty(O3,"__esModule",{value:!0});var i3=O3.default=void 0;Ue(y);var L3=e;function Ue(n){return n&&n.__esModule?n:{default:n}}function V3(n,o){var i=Object.keys(n);if(Object.getOwnPropertySymbols){var H=Object.getOwnPropertySymbols(n);o&&(H=H.filter(function(I){return Object.getOwnPropertyDescriptor(n,I).enumerable})),i.push.apply(i,H)}return i}function _3(n){for(var o=1;o<arguments.length;o++){var i=arguments[o]!=null?arguments[o]:{};o%2?V3(Object(i),!0).forEach(function(H){je(n,H,i[H])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):V3(Object(i)).forEach(function(H){Object.defineProperty(n,H,Object.getOwnPropertyDescriptor(i,H))})}return n}function je(n,o,i){return o=be(o),o in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i,n}function be(n){var o=ke(n,"string");return typeof o=="symbol"?o:String(o)}function ke(n,o){if(typeof n!="object"||!n)return n;var i=n[Symbol.toPrimitive];if(i!==void 0){var H=i.call(n,o||"default");if(typeof H!="object")return H;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(n)}var T3=function(o){return(0,L3.jsx)("svg",_3(_3({},o),{},{children:(0,L3.jsx)("path",{d:"M8.438 4.313H8.25a.188.188 0 0 0 .188-.188v.188h7.124v-.188c0 .103.085.188.188.188h-.188V6h1.688V4.125c0-.827-.673-1.5-1.5-1.5h-7.5c-.827 0-1.5.673-1.5 1.5V6h1.688V4.312zM20.25 6H3.75a.75.75 0 0 0-.75.75v.75c0 .103.084.188.188.188h1.415l.579 12.257c.038.8.698 1.43 1.498 1.43h10.64c.802 0 1.46-.628 1.498-1.43l.579-12.258h1.416A.188.188 0 0 0 21 7.5v-.75a.75.75 0 0 0-.75-.75zm-3.11 13.688H6.86l-.567-12h11.414l-.567 12z"})}))};T3.defaultProps={width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"};T3.displayName="delete";i3=O3.default=T3;var Y3={exports:{}},q3={exports:{}};(function(){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o={rotl:function(i,H){return i<<H|i>>>32-H},rotr:function(i,H){return i<<32-H|i>>>H},endian:function(i){if(i.constructor==Number)return o.rotl(i,8)&16711935|o.rotl(i,24)&4278255360;for(var H=0;H<i.length;H++)i[H]=o.endian(i[H]);return i},randomBytes:function(i){for(var H=[];i>0;i--)H.push(Math.floor(Math.random()*256));return H},bytesToWords:function(i){for(var H=[],I=0,c=0;I<i.length;I++,c+=8)H[c>>>5]|=i[I]<<24-c%32;return H},wordsToBytes:function(i){for(var H=[],I=0;I<i.length*32;I+=8)H.push(i[I>>>5]>>>24-I%32&255);return H},bytesToHex:function(i){for(var H=[],I=0;I<i.length;I++)H.push((i[I]>>>4).toString(16)),H.push((i[I]&15).toString(16));return H.join("")},hexToBytes:function(i){for(var H=[],I=0;I<i.length;I+=2)H.push(parseInt(i.substr(I,2),16));return H},bytesToBase64:function(i){for(var H=[],I=0;I<i.length;I+=3)for(var c=i[I]<<16|i[I+1]<<8|i[I+2],u=0;u<4;u++)I*8+u*6<=i.length*8?H.push(n.charAt(c>>>6*(3-u)&63)):H.push("=");return H.join("")},base64ToBytes:function(i){i=i.replace(/[^A-Z0-9+\/]/ig,"");for(var H=[],I=0,c=0;I<i.length;c=++I%4)c!=0&&H.push((n.indexOf(i.charAt(I-1))&Math.pow(2,-2*c+8)-1)<<c*2|n.indexOf(i.charAt(I))>>>6-c*2);return H}};q3.exports=o})();var we=q3.exports,G3={utf8:{stringToBytes:function(n){return G3.bin.stringToBytes(unescape(encodeURIComponent(n)))},bytesToString:function(n){return decodeURIComponent(escape(G3.bin.bytesToString(n)))}},bin:{stringToBytes:function(n){for(var o=[],i=0;i<n.length;i++)o.push(n.charCodeAt(i)&255);return o},bytesToString:function(n){for(var o=[],i=0;i<n.length;i++)o.push(String.fromCharCode(n[i]));return o.join("")}}},W3=G3;/*!
2
2
  * Determine if an object is a Buffer
3
3
  *
4
4
  * @author Feross Aboukhadijeh <https://feross.org>
@@ -1,4 +1,4 @@
1
- import{bS as Wo,j as e,aL as Vt,aM as _t,q as z,Q as j,az as me,P as r,A,bm as W,r as g,f as ye,br as qe,b as K,hJ as po,hK as uo,aP as Hn,V as Nt,cl as Ne,n as O,hL as Ho,K as Q,gR as Yo,bO as Le,aX as xe,aW as ut,hM as Te,M as fe,a3 as $,D as qt,F as k,bp as Ko,Z as We,a0 as Yn,b0 as Jo,fM as Qo,fN as Zo,C as ie,fh as Xo,y as mo,aw as at,a2 as Ee,x as Lt,hN as $o,hO as es,B as Z,bc as fo,H as Wt,hP as ts,m as X,a4 as ns,eI as os,W as ho,$ as go,al as ss,w as rs,J as xo,R as Ve,X as is,hQ as yo,U as ue,aB as as,aC as ls,aD as cs,i as mt,ay as Co,hR as ds,cI as ps,bh as us,hk as ms,hS as fs,aA as Kn,cF as hs,hT as gs,ae as Oe,aK as jo,bQ as Ht,cn as xs,hU as ys,b7 as Cs,z as js,aY as Ot,T as vs,bK as we,aO as _e,au as Ut,dN as Ss,gn as Ft,hV as Mt,gp as Gt,bs as vo,fY as zt,aG as Rs,dV as bs,hW as Ts,aZ as Es,G as st,gr as ws,hX as Ps,bP as Is}from"./index-cto27BjI.js";import{d as Jn}from"./Add-BYcTrfwq.js";import{a as ks,R as it,F as Us,L as Bs,d as Yt,b as Kt}from"./line-1yBH41Wd.js";import{C as Ds,A as As,d as Ns}from"./agreement-C-3kwpSq.js";import{E as Ls}from"./index-58xom0se.js";import{b as Os,a as Fs,c as Ms,u as Jt,e as Gs}from"./actions-DLUCcZnb.js";import{S as zs}from"./switch-control-2xhJNPLI.js";import{u as Vs}from"./detail-TSZFt17G.js";import{d as So}from"./Edit-BJLfjGzO.js";import{T as _s}from"./index-D1qmIEQe.js";import{T as qs,M as Ws,t as Hs}from"./table-icons-DNH5IpNS.js";import{C as Qn}from"./click-to-copy-BxRY2T53.js";import{T as Y}from"./TextField-ChYCqgnF.js";import{d as Qt}from"./Link-D4THmfDH.js";import{c as Ys,C as Ks,a as Js,b as Qs,D as Zs,A as Xs,B as $s,d as er,S as tr}from"./item-BftAM0Zi.js";import{u as nr,a as or,P as Ro,L as Zn,A as sr,S as rr}from"./index-BPb4u19B.js";import{u as bo,t as ir}from"./toUpper-DmN3YmMF.js";import{u as oe,a as ar}from"./team-Bds6tH0s.js";import{c as lr,d as cr,a as dr,e as pr,f as ur,g as Xn,h as mr,i as $n}from"./spaces-BzjtPxcp.js";import{d as fr}from"./EditIcon-BM1-fNyQ.js";import{d as hr}from"./Done-Dh00ds6i.js";import{C as gr}from"./Google-Bh_n6egY.js";import{I as xr,B as yr}from"./install-from-url-BfQGdJqB.js";import{a as eo}from"./api-Dg1aNjni.js";import{v as To,a as lt}from"./util-BHhvzew-.js";import{P as Cr,u as jr}from"./use-blocklet-info-for-connect-did-spaces-CWFXmzXz.js";import{D as vr}from"./DeleteOutline-CfcGLGyQ.js";import{S as to}from"./index-MgqsR5Yr.js";import{d as Sr}from"./ArrowDropDown-Ce8utXjU.js";import{_ as Rr}from"./useLocalStorage-C7ck6rDl.js";import{d as br}from"./LockIcon-DVMXWBuj.js";import{d as ft}from"./Delete-B32Y4H9I.js";import{d as Eo}from"./Launch-0VxvnuWe.js";import{C as Tr}from"./delete-confirm-Cu52-w9K.js";import{W as He}from"./tag-DwIjrotQ.js";import{d as Er}from"./InfoOutlined-Dv-PS_K9.js";import{R as wr,b as no,B as wo}from"./url-evaluation-Dw2A031X.js";import{B as Pr}from"./bundle-avatar-C0jAIMBi.js";import{A as Ir}from"./actions-BwC0xihZ.js";import{I as Bt}from"./index-CZxztyyO.js";import{a as kr}from"./index-MraPT5rJ.js";import"./ButtonGroup-DsDQPFq5.js";import"./getValidReactChildren-BSSAKXXh.js";import"./index-BYxU5EuJ.js";import"./index-4SekL7Au.js";import"./MoreVert-Dy-UXLSF.js";import"./app-avatar-CLoA8FKQ.js";import"./Breadcrumbs-DhzWQAd5.js";import"./FilterList-0wFVrPUc.js";import"./Select-DacRJUpT.js";import"./InputLabel-3Wx_imEU.js";import"./LastPage-IxsHKdZG.js";import"./slicedToArray-j5L_xxoK.js";import"./Search-CLqP6dSG.js";import"./ChevronLeft-CwZ4eGkY.js";import"./ChevronRight-DF2TQuxF.js";import"./DeleteOutline-DvvZ31vT.js";import"./redux-BfgfWfKE.js";import"./Skeleton-B635xq9w.js";import"./InputAdornment-BsJrfw9W.js";import"./memoize-one.esm-BdPwpGay.js";import"./index-DKleljgS.js";import"./preact.module-B1z5cdvs.js";import"./Close-TD13_jXp.js";import"./lottie-LUS1MfCT.js";import"./Stepper-CfMuItAU.js";import"./index-DdYi7g5A.js";const Ur=Wo(e.jsx("path",{d:"M14.17 5 19 9.83V19H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V9.83c0-.53-.21-1.04-.59-1.41l-4.83-4.83c-.37-.38-.88-.59-1.41-.59M7 15h10v2H7zm0-4h10v2H7zm0-4h7v2H7z"}),"TextSnippetOutlined");var Zt={},Br=_t;Object.defineProperty(Zt,"__esModule",{value:!0});var Po=Zt.default=void 0,Dr=Br(Vt()),Ar=e;Po=Zt.default=(0,Dr.default)((0,Ar.jsx)("path",{d:"M21 10.12h-6.78l2.74-2.82c-2.73-2.7-7.15-2.8-9.88-.1-2.73 2.71-2.73 7.08 0 9.79s7.15 2.71 9.88 0C18.32 15.65 19 14.08 19 12.1h2c0 1.98-.88 4.55-2.64 6.29-3.51 3.48-9.21 3.48-12.72 0-3.5-3.47-3.53-9.11-.02-12.58s9.14-3.47 12.65 0L21 3zM12.5 8v4.25l3.5 2.08-.72 1.21L11 13V8z"}),"Update");function Xt({children:t,...o}){const{t:s}=z(),{updateAutoCheckUpdate:l,autoCheckUpdate:n}=Vs(),i=async()=>{try{const a=!(n!=null&&n.enabled);await l({enabled:a}),A.success(s(a?"storage.spaces.autoCheckUpdate.enabled":"storage.spaces.autoCheckUpdate.disabled"))}catch(a){A.error(a.message)}},p=!!(n!=null&&n.enabled);return e.jsxs(j,{display:"flex",flexDirection:"row",alignItems:"center",children:[t,e.jsx(me,{title:s("storage.spaces.autoCheckUpdate.title"),arrow:!0,placement:"right",children:e.jsx("div",{children:e.jsx(zs,{checked:p,onChange:i,name:"enableWelcomePage",style:{...o.style,zoom:.8}})})})]})}Xt.propTypes={children:r.any};Xt.defaultProps={children:null};const Nr=(t,o)=>{let{description:s}=t;return(Object.values(K.CHAIN_PROP_MAP).includes(t.key)||Ho(t))&&(s?s=`${s} (${o("blocklet.config.sharedToAllComponents")})`:s=o("blocklet.config.sharedToAllComponents")),s&&e.jsx("div",{style:{marginLeft:12},children:s})},Dt=(t,o,s=[])=>!(s!=null&&s.length)&&!t.custom&&!["CHAIN_ID","CHAIN_HOST"].includes(t.key)&&!o.meta.environments.find(l=>l.name===t.key)&&o.children.every(l=>!l.meta.environments.find(n=>n.name===t.key))?!0:t.custom;function ct({blocklet:t,ancestors:o}){const s=W(),{inService:l}=s,{t:n}=g.useContext(ye),i=[...o.map(f=>f.meta.did),t.meta.did],p=()=>A.success(n("blocklet.config.changedTip")),a=f=>Dt(f,t,o);if(qe(t.status)||t.status==="unknown"&&qe(t.status))return null;const u=async f=>{if(!f.key.trim()||!f.value.trim()){A.error(n("blocklet.config.environment.keyValueRequired"));return}if(f.key.startsWith("BLOCKLET_")||f.key.startsWith("COMPONENT_")){A.error(n("blocklet.config.environment.invalidKey"));return}f.custom=!0;try{const S=await s.api.configBlocklet({input:{did:i,configs:[f]}});p(S.blocklet)}catch(S){A.error(Q(S))}},x=async(f,S)=>{if(f.required&&(!f.key.trim()||!f.value.trim())){A.error(n("blocklet.config.environment.keyValueRequired"));return}if(f.key.startsWith("BLOCKLET_")&&!K.BLOCKLET_CONFIGURABLE_KEY[f.key]){A.error(n("blocklet.config.environment.invalidKey"));return}if(f.key===K.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE){const P=Yo(f);if(P){A.error(P);return}}const R=[{...f,value:f.secure&&f.value==="__encrypted__"?"":f.value}];if(f.key!==S.key){if(!Dt(f,t,o)){A.error("Only key of custom env can be changed");return}R.push({key:S.key,custom:!0})}try{const P=await s.api.configBlocklet({input:{did:i,configs:R}});p(P.blocklet)}catch(P){A.error(Q(P))}},y=async f=>{if(f.required){A.error(n("blocklet.config.environment.deleteForbidden"));return}if(!Dt(f,t,o)){A.error("Only key of custom env can be changed");return}try{const S=await s.api.configBlocklet({input:{did:i,configs:[{key:f.key,custom:!0}]}});p(S.blocklet)}catch(S){A.error(Q(S))}},d=(t.configs||[]).filter(f=>!K.BLOCKLET_CONFIGURABLE_KEY[f.key]),v=po(o[0],t),c=uo(t,o[0]),h=d.map(f=>({...f,value:Object.values(K.CHAIN_PROP_MAP).includes(f.key)&&Object.keys(v).includes(f.key)?v[f.key]:v[f.key]||f.value})),C=h.some(f=>f.key&&f.key.startsWith("BWA_")),m={onRowAdd:u,onRowUpdate:x,onRowDelete:y,isDeletable:a},b=()=>[{title:n("common.key"),field:"key",initialEditValue:"Key",width:"30%",render:f=>e.jsx(Qn,{value:f.value,style:{color:f.required&&!f.value?"#ff4436":"#222222",fontWeight:f.required?"bold":"normal"},children:f.key}),editComponent:f=>{const{value:S,rowData:R,onChange:P}=f;return e.jsx(oo,{children:e.jsx(Y,{fullWidth:!0,size:"small",disabled:a(R)===!1,value:S,onChange:L=>P(L.target.value),variant:"outlined",label:"Key",placeholder:n("blocklet.config.environment.key"),margin:"dense",autoFocus:!0})})}},{title:n("common.value"),field:"value",initialEditValue:"Value",width:"calc((100% - (96px + 30%)) / 1)",render:f=>f.value?f.secure?"******":e.jsx(Qn,{unstyled:!0,value:f.value,style:{wordBreak:"break-all"},children:f.value}):null,editComponent:f=>{const{value:S,rowData:R,onChange:P}=f;return e.jsxs(oo,{children:[e.jsx(Y,{fullWidth:!0,size:"small",value:S==="__encrypted__"?"":S,onChange:L=>P(L.target.value),variant:"outlined",label:n("common.value"),placeholder:n("blocklet.config.environment.value"),margin:"dense",autoFocus:!0}),Nr(R,n)]})}}];return e.jsxs(Lr,{children:[!!c.length&&e.jsx(Hn,{severity:"error",style:{marginTop:24},children:n("blocklet.config.missingRequired")}),C&&e.jsx(Hn,{severity:"info",children:n("blocklet.config.environment.tip")}),e.jsx(Nt,{permission:l?"":"mutate_blocklets",role:l?Ne:[],children:f=>e.jsx(qs,{className:"config-table",children:e.jsx(Ws,{title:e.jsx("h4",{children:n("common.environment")}),columns:b(),icons:{...Os,...Hs},options:{emptyRowsWhenPaging:!1,actionsColumnIndex:-1,tableLayout:"auto",maxBodyHeight:"100%",paging:!1,search:!1},localization:{header:{actions:n("common.actions")},body:{emptyDataSourceMessage:n("common.noData")}},data:h,editable:f?m:{}})})})]})}ct.propTypes={blocklet:r.object.isRequired,ancestors:r.array};ct.defaultProps={ancestors:[]};const Lr=O.div`
1
+ import{bS as Wo,j as e,aL as Vt,aM as _t,q as z,Q as j,az as me,P as r,A,bm as W,r as g,f as ye,br as qe,b as K,hJ as po,hK as uo,aP as Hn,V as Nt,cl as Ne,n as O,hL as Ho,K as Q,gR as Yo,bO as Le,aX as xe,aW as ut,hM as Te,M as fe,a3 as $,D as qt,F as k,bp as Ko,Z as We,a0 as Yn,b0 as Jo,fM as Qo,fN as Zo,C as ie,fh as Xo,y as mo,aw as at,a2 as Ee,x as Lt,hN as $o,hO as es,B as Z,bc as fo,H as Wt,hP as ts,m as X,a4 as ns,eI as os,W as ho,$ as go,al as ss,w as rs,J as xo,R as Ve,X as is,hQ as yo,U as ue,aB as as,aC as ls,aD as cs,i as mt,ay as Co,hR as ds,cI as ps,bh as us,hk as ms,hS as fs,aA as Kn,cF as hs,hT as gs,ae as Oe,aK as jo,bQ as Ht,cn as xs,hU as ys,b7 as Cs,z as js,aY as Ot,T as vs,bK as we,aO as _e,au as Ut,dN as Ss,gn as Ft,hV as Mt,gp as Gt,bs as vo,fY as zt,aG as Rs,dV as bs,hW as Ts,aZ as Es,G as st,gr as ws,hX as Ps,bP as Is}from"./index-DBlH-4qz.js";import{d as Jn}from"./Add-BlWdL5hq.js";import{a as ks,R as it,F as Us,L as Bs,d as Yt,b as Kt}from"./line-ODorkEX8.js";import{C as Ds,A as As,d as Ns}from"./agreement-Bd_YDn4J.js";import{E as Ls}from"./index-f3gCWa9h.js";import{b as Os,a as Fs,c as Ms,u as Jt,e as Gs}from"./actions-jzQJLd83.js";import{S as zs}from"./switch-control-Oh1i031K.js";import{u as Vs}from"./detail-CESxJL-2.js";import{d as So}from"./Edit-BowBuCq8.js";import{T as _s}from"./index-C01qpSwK.js";import{T as qs,M as Ws,t as Hs}from"./table-icons-gSPlUUro.js";import{C as Qn}from"./click-to-copy-BJBKnF7C.js";import{T as Y}from"./TextField-DRrSIaR4.js";import{d as Qt}from"./Link-euuV_LRf.js";import{c as Ys,C as Ks,a as Js,b as Qs,D as Zs,A as Xs,B as $s,d as er,S as tr}from"./item-CE4vGuWF.js";import{u as nr,a as or,P as Ro,L as Zn,A as sr,S as rr}from"./index-DnYXtUxe.js";import{u as bo,t as ir}from"./toUpper-fPzt0_fA.js";import{u as oe,a as ar}from"./team-B2Py-5R-.js";import{c as lr,d as cr,a as dr,e as pr,f as ur,g as Xn,h as mr,i as $n}from"./spaces-DbeGuVPF.js";import{d as fr}from"./EditIcon-nFgXy_Ap.js";import{d as hr}from"./Done-1q2rveFh.js";import{C as gr}from"./Google-Dm0Bt78U.js";import{I as xr,B as yr}from"./install-from-url-BQJWpTKl.js";import{a as eo}from"./api-sSit_7Kw.js";import{v as To,a as lt}from"./util-BjsuBWBH.js";import{P as Cr,u as jr}from"./use-blocklet-info-for-connect-did-spaces-tLVaGUOx.js";import{d as vr}from"./DeleteOutline-mQ8p8X2l.js";import{S as to}from"./index-Bh-DJU8Z.js";import{d as Sr}from"./ArrowDropDown-BRSuKRSZ.js";import{_ as Rr}from"./useLocalStorage-Den65TTd.js";import{d as br}from"./LockIcon-Ca85OyYH.js";import{d as ft}from"./Delete-HYXbanP_.js";import{d as Eo}from"./Launch-Eb8N22dN.js";import{C as Tr}from"./delete-confirm-CNU7dJ17.js";import{W as He}from"./tag-tXL4aJpc.js";import{d as Er}from"./InfoOutlined-DD-Zg0Tj.js";import{R as wr,b as no,B as wo}from"./url-evaluation-OWrig3n8.js";import{B as Pr}from"./bundle-avatar-4GKn5oRs.js";import{A as Ir}from"./actions-QLA3pt8S.js";import{I as Bt}from"./index-GQiNlTaJ.js";import{a as kr}from"./index-DEBI0lGj.js";import"./ButtonGroup-CqHbqvIj.js";import"./getValidReactChildren-BXQ8AiZt.js";import"./index-rJLRm37D.js";import"./index-BFmN77vD.js";import"./MoreVert-gaCnI5Xf.js";import"./app-avatar-DH3uT_Nr.js";import"./Breadcrumbs-BQD6r-rf.js";import"./FilterList-CFsrQPpD.js";import"./Select-D6ACs1xY.js";import"./InputLabel-BXQy_ZSg.js";import"./LastPage-C7awZPyV.js";import"./slicedToArray-CUj4BDqr.js";import"./Search-Cz2kpFbT.js";import"./ChevronLeft-zlmw0JTD.js";import"./ChevronRight-hhdO2z__.js";import"./redux-Bu4pculE.js";import"./Skeleton-DWKEXisW.js";import"./InputAdornment-Dy1fA12v.js";import"./memoize-one.esm-BdPwpGay.js";import"./index-2dK67bGl.js";import"./preact.module-B1z5cdvs.js";import"./Close-BfNzQHXc.js";import"./lottie-BuomNMnt.js";import"./Stepper-CZFVEfLi.js";import"./index-D1-aBvtW.js";const Ur=Wo(e.jsx("path",{d:"M14.17 5 19 9.83V19H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V9.83c0-.53-.21-1.04-.59-1.41l-4.83-4.83c-.37-.38-.88-.59-1.41-.59M7 15h10v2H7zm0-4h10v2H7zm0-4h7v2H7z"}),"TextSnippetOutlined");var Zt={},Br=_t;Object.defineProperty(Zt,"__esModule",{value:!0});var Po=Zt.default=void 0,Dr=Br(Vt()),Ar=e;Po=Zt.default=(0,Dr.default)((0,Ar.jsx)("path",{d:"M21 10.12h-6.78l2.74-2.82c-2.73-2.7-7.15-2.8-9.88-.1-2.73 2.71-2.73 7.08 0 9.79s7.15 2.71 9.88 0C18.32 15.65 19 14.08 19 12.1h2c0 1.98-.88 4.55-2.64 6.29-3.51 3.48-9.21 3.48-12.72 0-3.5-3.47-3.53-9.11-.02-12.58s9.14-3.47 12.65 0L21 3zM12.5 8v4.25l3.5 2.08-.72 1.21L11 13V8z"}),"Update");function Xt({children:t,...o}){const{t:s}=z(),{updateAutoCheckUpdate:l,autoCheckUpdate:n}=Vs(),i=async()=>{try{const a=!(n!=null&&n.enabled);await l({enabled:a}),A.success(s(a?"storage.spaces.autoCheckUpdate.enabled":"storage.spaces.autoCheckUpdate.disabled"))}catch(a){A.error(a.message)}},p=!!(n!=null&&n.enabled);return e.jsxs(j,{display:"flex",flexDirection:"row",alignItems:"center",children:[t,e.jsx(me,{title:s("storage.spaces.autoCheckUpdate.title"),arrow:!0,placement:"right",children:e.jsx("div",{children:e.jsx(zs,{checked:p,onChange:i,name:"enableWelcomePage",style:{...o.style,zoom:.8}})})})]})}Xt.propTypes={children:r.any};Xt.defaultProps={children:null};const Nr=(t,o)=>{let{description:s}=t;return(Object.values(K.CHAIN_PROP_MAP).includes(t.key)||Ho(t))&&(s?s=`${s} (${o("blocklet.config.sharedToAllComponents")})`:s=o("blocklet.config.sharedToAllComponents")),s&&e.jsx("div",{style:{marginLeft:12},children:s})},Dt=(t,o,s=[])=>!(s!=null&&s.length)&&!t.custom&&!["CHAIN_ID","CHAIN_HOST"].includes(t.key)&&!o.meta.environments.find(l=>l.name===t.key)&&o.children.every(l=>!l.meta.environments.find(n=>n.name===t.key))?!0:t.custom;function ct({blocklet:t,ancestors:o}){const s=W(),{inService:l}=s,{t:n}=g.useContext(ye),i=[...o.map(f=>f.meta.did),t.meta.did],p=()=>A.success(n("blocklet.config.changedTip")),a=f=>Dt(f,t,o);if(qe(t.status)||t.status==="unknown"&&qe(t.status))return null;const u=async f=>{if(!f.key.trim()||!f.value.trim()){A.error(n("blocklet.config.environment.keyValueRequired"));return}if(f.key.startsWith("BLOCKLET_")||f.key.startsWith("COMPONENT_")){A.error(n("blocklet.config.environment.invalidKey"));return}f.custom=!0;try{const S=await s.api.configBlocklet({input:{did:i,configs:[f]}});p(S.blocklet)}catch(S){A.error(Q(S))}},x=async(f,S)=>{if(f.required&&(!f.key.trim()||!f.value.trim())){A.error(n("blocklet.config.environment.keyValueRequired"));return}if(f.key.startsWith("BLOCKLET_")&&!K.BLOCKLET_CONFIGURABLE_KEY[f.key]){A.error(n("blocklet.config.environment.invalidKey"));return}if(f.key===K.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE){const P=Yo(f);if(P){A.error(P);return}}const R=[{...f,value:f.secure&&f.value==="__encrypted__"?"":f.value}];if(f.key!==S.key){if(!Dt(f,t,o)){A.error("Only key of custom env can be changed");return}R.push({key:S.key,custom:!0})}try{const P=await s.api.configBlocklet({input:{did:i,configs:R}});p(P.blocklet)}catch(P){A.error(Q(P))}},y=async f=>{if(f.required){A.error(n("blocklet.config.environment.deleteForbidden"));return}if(!Dt(f,t,o)){A.error("Only key of custom env can be changed");return}try{const S=await s.api.configBlocklet({input:{did:i,configs:[{key:f.key,custom:!0}]}});p(S.blocklet)}catch(S){A.error(Q(S))}},d=(t.configs||[]).filter(f=>!K.BLOCKLET_CONFIGURABLE_KEY[f.key]),v=po(o[0],t),c=uo(t,o[0]),h=d.map(f=>({...f,value:Object.values(K.CHAIN_PROP_MAP).includes(f.key)&&Object.keys(v).includes(f.key)?v[f.key]:v[f.key]||f.value})),C=h.some(f=>f.key&&f.key.startsWith("BWA_")),m={onRowAdd:u,onRowUpdate:x,onRowDelete:y,isDeletable:a},b=()=>[{title:n("common.key"),field:"key",initialEditValue:"Key",width:"30%",render:f=>e.jsx(Qn,{value:f.value,style:{color:f.required&&!f.value?"#ff4436":"#222222",fontWeight:f.required?"bold":"normal"},children:f.key}),editComponent:f=>{const{value:S,rowData:R,onChange:P}=f;return e.jsx(oo,{children:e.jsx(Y,{fullWidth:!0,size:"small",disabled:a(R)===!1,value:S,onChange:L=>P(L.target.value),variant:"outlined",label:"Key",placeholder:n("blocklet.config.environment.key"),margin:"dense",autoFocus:!0})})}},{title:n("common.value"),field:"value",initialEditValue:"Value",width:"calc((100% - (96px + 30%)) / 1)",render:f=>f.value?f.secure?"******":e.jsx(Qn,{unstyled:!0,value:f.value,style:{wordBreak:"break-all"},children:f.value}):null,editComponent:f=>{const{value:S,rowData:R,onChange:P}=f;return e.jsxs(oo,{children:[e.jsx(Y,{fullWidth:!0,size:"small",value:S==="__encrypted__"?"":S,onChange:L=>P(L.target.value),variant:"outlined",label:n("common.value"),placeholder:n("blocklet.config.environment.value"),margin:"dense",autoFocus:!0}),Nr(R,n)]})}}];return e.jsxs(Lr,{children:[!!c.length&&e.jsx(Hn,{severity:"error",style:{marginTop:24},children:n("blocklet.config.missingRequired")}),C&&e.jsx(Hn,{severity:"info",children:n("blocklet.config.environment.tip")}),e.jsx(Nt,{permission:l?"":"mutate_blocklets",role:l?Ne:[],children:f=>e.jsx(qs,{className:"config-table",children:e.jsx(Ws,{title:e.jsx("h4",{children:n("common.environment")}),columns:b(),icons:{...Os,...Hs},options:{emptyRowsWhenPaging:!1,actionsColumnIndex:-1,tableLayout:"auto",maxBodyHeight:"100%",paging:!1,search:!1},localization:{header:{actions:n("common.actions")},body:{emptyDataSourceMessage:n("common.noData")}},data:h,editable:f?m:{}})})})]})}ct.propTypes={blocklet:r.object.isRequired,ancestors:r.array};ct.defaultProps={ancestors:[]};const Lr=O.div`
2
2
  .config-table {
3
3
  margin-bottom: 24px;
4
4
  position: relative;
@@ -63,7 +63,7 @@ import{bS as Wo,j as e,aL as Vt,aM as _t,q as z,Q as j,az as me,P as r,A,bm as W
63
63
  .ux-dialog_right {
64
64
  padding-right: 20px;
65
65
  }
66
- `,{NODE_MODES:so}=k,Vr=({mode:t,previousMode:o}={})=>t===so.SERVERLESS||o===so.SERVERLESS;var Io={isInServerlessMode:Vr};function _r(){const[t,o]=g.useState(null),{blocklet:s}=oe();return g.useEffect(()=>{o(lr(s))},[s]),{storageEndpoint:t}}const ko=g.createContext({}),{Provider:qr,Consumer:el}=ko;function $t({children:t}){const[o,s]=g.useState(!1),[l,n]=g.useState(null),{blocklet:i,actions:{refreshBlocklet:p}}=oe(),{storageEndpoint:a}=_r(),{api:u}=W();Ko(async()=>{try{if(s(!0),Yn.isEmpty(a)){n(null);return}const c=await cr(a);n(c)}catch(c){console.error(c),A.error(c.message)}finally{s(!1)}},[a]);const x=()=>{n(null),p()},y=async c=>{n(c),await d(c.endpoint),p()},d=async c=>{await u.configBlocklet({input:{did:[i.meta.did],configs:[{key:K.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT,value:c}]}}),p()};g.useEffect(()=>{async function c(){if(!l)return;const h=await dr(l.endpoint,l.name),C=Yn.merge(l,{name:h});n(C)}c()},[]);const v=!!(a&&l);return e.jsx(qr,{value:{loading:o,spaceGateway:l,deleteSpaceGateway:x,updateSpaceGateway:y,storageEndpoint:a,settingStorageEndpoint:d,hasStorageEndpoint:v},children:t})}$t.propTypes={children:We.node.isRequired};$t.defaultProps={};function en(){return g.useContext(ko)}const tn={description:r.string,editing:r.bool,onChange:r.func,required:r.bool,value:r.any,componentProps:r.object,render:r.func,renderFormItem:r.func};function nn({editing:t,value:o,onChange:s}){const[l,n]=g.useState(!1),i=g.useRef(),p=g.useRef(o);g.useEffect(()=>{let d=null;return t&&(d=setTimeout(()=>{n(!0)},50)),()=>{clearTimeout(d)}},[t]);const a=d=>{p.current=d,s(d)},u=()=>{n(!1),s(p.current)},x=e.jsx(j,{className:"form-item-input slot",px:1,children:e.jsxs(j,{display:"flex",alignItems:"center",children:[o,o!=="auto"&&e.jsx("div",{style:{marginLeft:4,backgroundColor:o,width:"1em",height:"1em",borderRadius:"0.2em"}})]})}),y=e.jsxs(j,{display:"flex",flexGrow:1,alignItems:"center",height:"40px",onKeyDown:u,children:[e.jsx(j,{display:"flex",alignItems:"center",onClick:()=>n(!0),children:e.jsx("div",{ref:i,style:{flexShrink:0,marginLeft:"8px",backgroundColor:o,width:"32px",height:"32px",boxSizing:"border-box",borderRadius:"8px",border:"1px solid #eee",cursor:o==="auto"?"default":"pointer"}})}),e.jsx(Jo,{open:l,anchorEl:i.current,onClose:()=>n(!1),anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},children:e.jsx(gr,{color:o,onChange:d=>a(d.hex)})})]});return t?y:x}nn.propTypes=tn;function on({editing:t,description:o,value:s,onChange:l,componentProps:n,...i}){const{placeholder:p}=n,a=g.useRef(s),u=y=>{y.key==="Enter"&&l(a.current,"confirm")},x=y=>{a.current=y,l(y)};return t?e.jsx(Y,{style:{flex:1},fullWidth:!0,value:s,onChange:y=>{y.persist(),x(y.target.value)},autoFocus:!0,size:"small",variant:"outlined",placeholder:o||p,onKeyDown:u,...i}):e.jsx(j,{px:1,className:"form-item-input slot",children:s})}on.propTypes=tn;on.defaultProps={componentProps:{}};function sn({editing:t,value:o,onChange:s,componentProps:l,...n}){const{blocklet:i}=l,p=o==="auto"?Qo.getPassportColorFromDid(i.appDid):o;return e.jsxs(j,{display:"flex",alignItems:"center",children:[e.jsx("div",{style:{width:96,marginRight:12},dangerouslySetInnerHTML:{__html:Zo({title:"Owner",issuer:fe(i),issuerDid:i.appDid,ownerName:"Your Name",ownerDid:i.appDid,preferredColor:o||"auto"})}}),e.jsx(nn,{...n,editing:t,value:t?p:o,onChange:s,componentProps:l})]})}sn.propTypes={...tn,componentProps:r.shape({blocklet:r.object.isRequired}).isRequired};sn.defaultProps={};const Wr={input:on,color:nn,passport:sn,uploader:t=>e.jsx(Bs,{...t.componentProps})};function Hr(t,{editing:o=!1}){const{componentType:s="input",render:l,renderFormItem:n}=t;return o&&n?n:!o&&l?l:Wr[s==null?void 0:s.toLowerCase()]}function rn({schema:t,loading:o,value:s,defaultValue:l,onChange:n,style:i,disabled:p}){const a=Object.prototype.toString.call(s)==="[object Object]",[u,x]=g.useState(null),[y,d]=g.useState(a?s:l),v=g.useRef();function c(m,b,f){const{key:S,secure:R}=m,L=y[S]!==b,N={...y,[S]:b};L&&d(N),n({[S]:b},{allValues:N,action:f,currentItem:m}),f==="confirm"&&R&&d({...y,[S]:"__encrypted__"}),["confirm","cancel"].includes(f)?h(null):h(m)}function h(m){if(m){v.current=y[m.key],x(m);return}v.current=null,x(null)}function C(m,{editing:b=!1}){const{key:f}=m,S=a?s[f]:y[f];return S==="__encrypted__"?b?"":"******":S}return e.jsx(Yr,{className:"form",style:i,children:t==null?void 0:t.map(m=>{const{key:b,description:f,required:S,solo:R=!1,hidden:P=!1,componentProps:L={}}=m;if(P)return null;const N=!!(u&&b===u.key),D=C(m,{editing:N}),B=Hr(m,{editing:N}),F={inputProps:{"data-cy":"schema-form-item-component"},key:b,description:f,editing:N,value:D,onChange:(I,H="change")=>c(m,I,H),componentProps:L};return e.jsxs(j,{className:"form-item",children:[!R&&e.jsxs(j,{className:"form-item-label",style:{color:S&&!D?"#ff0000":"#333"},children:[f,S&&e.jsx(it,{})]}),e.jsxs(j,{className:"form-item-body",children:[e.jsx(j,{className:"form-item-input",sx:{textAlign:R?"center":"left"},children:e.jsx(B,{...F})}),!R&&e.jsx(j,{className:"form-item-action",children:N?e.jsxs(e.Fragment,{children:[e.jsx($,{"data-cy":"schema-form-item-confirm",onClick:()=>{c(m,D,"confirm")},disabled:p||o,size:"large",children:o?e.jsx(ie,{size:24}):e.jsx(hr,{})}),e.jsx($,{"data-cy":"schema-form-item-cancel",onClick:()=>{c(m,v.current,"cancel")},disabled:p||o,size:"large",children:e.jsx(Xo,{})})]}):e.jsx($,{"data-cy":"schema-form-item-edit",onClick:()=>{c(m,y[b],"edit")},disabled:p||u,size:"large",children:e.jsx(fr,{})})})]})]},b)})})}rn.propTypes={schema:r.array.isRequired,loading:r.bool,onChange:r.func.isRequired,value:r.object,defaultValue:r.object,style:r.object,disabled:r.bool};rn.defaultProps={loading:!1,value:void 0,defaultValue:{},style:{},disabled:!1};const Yr=O(Us)``;function an({meta:t,onCancel:o,mode:s,handlePaySuccess:l}){const{t:n,locale:i}=z(),{info:p}=W(),a=mo(p),[u,x]=g.useState(null),y=new URL(t==null?void 0:t.registryUrl).origin,d=fe({meta:t}),v=async(h,C)=>{const m=({downloadTokenList:S})=>{l({downloadTokenList:S})},b=S=>{A.error(S),o(S)};function f(S){return es(()=>eo.get(S).then(async({data:R})=>{const P=R==null?void 0:R.downloadTokenList;if(R.status==="succeed"){if(P&&P.length)await m({downloadTokenList:P});else return await b(n("blocklet.component.missDownloadTokenTip")),!0;return!0}return R.status==="error"?(console.error("vc error: ",R),await b(R==null?void 0:R.error),!0):!1}),{interval:1e3})}if(s==="purchase"&&u){const{statusUrl:S}=$o(u);await f(S)}else await m({downloadTokenList:h.downloadTokenList&&C(h.downloadTokenList)})};if(g.useEffect(()=>{if(s==="purchase"){const h=new URL(y);h.pathname="/api/did/verify-purchase-blocklet/token",h.searchParams.set("serverDid",p.did),h.searchParams.set("blockletDid",t==null?void 0:t.did);try{eo.get(h.href).then(({data:C})=>{const m=`${C.url}`;x(m)})}catch(C){console.error("get next workflow url error: ",C)}}return()=>{x(null)}},[s]),s==="purchase"&&!u)return"";const c={verify:{action:"verify-purchase-blocklet",checkFn:at.create({baseURL:y}).get,extraParams:{serverDid:p.did,blockletDid:t==null?void 0:t.did},messages:{title:n("store.purchase.verify.auth.title",{name:d}),scan:n("store.purchase.verify.auth.scan"),confirm:n("store.purchase.verify.auth.confirm"),success:n("store.purchase.verify.auth.success")}},purchase:{action:"acquire-asset",checkFn:at.create({baseURL:Ee(y,"/store")}).get,extraParams:{factory:t.nftFactory,nw:u},messages:{title:n("store.purchase.auth.title",{name:d}),scan:n("store.purchase.auth.scan"),confirm:n("store.purchase.auth.confirm"),success:e.jsxs(e.Fragment,{children:[e.jsx("p",{children:n("store.purchase.auth.success")}),e.jsx("p",{children:n("blocklet.component.purchaseComponentSecondCheckTip")})]})}}};return e.jsx(Lt,{open:!0,locale:i,popup:!1,saveConnect:!1,className:"connect",baseUrl:y,onSuccess:v,cancelWhenScanned:o,onClose:o,checkTimeout:60*5e3,webWalletUrl:a,disableClose:!0,showDownload:!1,...c[s]})}an.propTypes={...Ys,handlePaySuccess:r.func,mode:r.oneOf(["verify","purchase"]).isRequired};an.defaultProps={handlePaySuccess:()=>{}};const ln=g.forwardRef(({mode:t,...o},s)=>{const[l,n]=g.useState(t!=="both"?t:"verify"),[i,p]=g.useState(t!=="both"?2:1),a=x=>{x!==l&&n(x)},u=()=>{l&&i!==2&&p(2)};return g.useImperativeHandle(s,()=>({onNext:u,getCurrentStep:()=>i})),i===1?e.jsx("div",{style:{maxWidth:520},children:e.jsx(Ks,{action:l,onNext:null,onSelect:a})}):e.jsx(an,{...o,mode:l})});ln.propTypes={mode:r.oneOf(["both","verify","purchase"]).isRequired,ref:r.any};ln.defaultProps={ref:{}};const Kr=ln;function Jr({...t}){return e.jsx(Z,{className:"bottom-button",variant:"contained",color:"primary",...t})}function cn({key:t}={key:"sm"}){const o=fo();return Wt(o.breakpoints.down(t))}function dn({blocklet:t,onStartNow:o,children:s,disabled:l}){const{t:n}=z(),i=cn();return!t||ts(t.meta)?e.jsx(Qr,{children:s}):e.jsxs(Zr,{isMobile:i,children:[e.jsx(Jr,{className:"start-now",variant:"contained",color:"primary",disabled:l,onClick:()=>o(),children:n("setup.startNow")}),e.jsx(j,{display:"flex",alignItems:"center",children:s})]})}dn.propTypes={blocklet:r.object,onStartNow:r.func,children:r.any,disabled:r.bool};dn.defaultProps={blocklet:null,onStartNow:()=>{},children:null,disabled:!1};const Qr=O(j)`
66
+ `,{NODE_MODES:so}=k,Vr=({mode:t,previousMode:o}={})=>t===so.SERVERLESS||o===so.SERVERLESS;var Io={isInServerlessMode:Vr};function _r(){const[t,o]=g.useState(null),{blocklet:s}=oe();return g.useEffect(()=>{o(lr(s))},[s]),{storageEndpoint:t}}const ko=g.createContext({}),{Provider:qr,Consumer:$a}=ko;function $t({children:t}){const[o,s]=g.useState(!1),[l,n]=g.useState(null),{blocklet:i,actions:{refreshBlocklet:p}}=oe(),{storageEndpoint:a}=_r(),{api:u}=W();Ko(async()=>{try{if(s(!0),Yn.isEmpty(a)){n(null);return}const c=await cr(a);n(c)}catch(c){console.error(c),A.error(c.message)}finally{s(!1)}},[a]);const x=()=>{n(null),p()},y=async c=>{n(c),await d(c.endpoint),p()},d=async c=>{await u.configBlocklet({input:{did:[i.meta.did],configs:[{key:K.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT,value:c}]}}),p()};g.useEffect(()=>{async function c(){if(!l)return;const h=await dr(l.endpoint,l.name),C=Yn.merge(l,{name:h});n(C)}c()},[]);const v=!!(a&&l);return e.jsx(qr,{value:{loading:o,spaceGateway:l,deleteSpaceGateway:x,updateSpaceGateway:y,storageEndpoint:a,settingStorageEndpoint:d,hasStorageEndpoint:v},children:t})}$t.propTypes={children:We.node.isRequired};$t.defaultProps={};function en(){return g.useContext(ko)}const tn={description:r.string,editing:r.bool,onChange:r.func,required:r.bool,value:r.any,componentProps:r.object,render:r.func,renderFormItem:r.func};function nn({editing:t,value:o,onChange:s}){const[l,n]=g.useState(!1),i=g.useRef(),p=g.useRef(o);g.useEffect(()=>{let d=null;return t&&(d=setTimeout(()=>{n(!0)},50)),()=>{clearTimeout(d)}},[t]);const a=d=>{p.current=d,s(d)},u=()=>{n(!1),s(p.current)},x=e.jsx(j,{className:"form-item-input slot",px:1,children:e.jsxs(j,{display:"flex",alignItems:"center",children:[o,o!=="auto"&&e.jsx("div",{style:{marginLeft:4,backgroundColor:o,width:"1em",height:"1em",borderRadius:"0.2em"}})]})}),y=e.jsxs(j,{display:"flex",flexGrow:1,alignItems:"center",height:"40px",onKeyDown:u,children:[e.jsx(j,{display:"flex",alignItems:"center",onClick:()=>n(!0),children:e.jsx("div",{ref:i,style:{flexShrink:0,marginLeft:"8px",backgroundColor:o,width:"32px",height:"32px",boxSizing:"border-box",borderRadius:"8px",border:"1px solid #eee",cursor:o==="auto"?"default":"pointer"}})}),e.jsx(Jo,{open:l,anchorEl:i.current,onClose:()=>n(!1),anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},children:e.jsx(gr,{color:o,onChange:d=>a(d.hex)})})]});return t?y:x}nn.propTypes=tn;function on({editing:t,description:o,value:s,onChange:l,componentProps:n,...i}){const{placeholder:p}=n,a=g.useRef(s),u=y=>{y.key==="Enter"&&l(a.current,"confirm")},x=y=>{a.current=y,l(y)};return t?e.jsx(Y,{style:{flex:1},fullWidth:!0,value:s,onChange:y=>{y.persist(),x(y.target.value)},autoFocus:!0,size:"small",variant:"outlined",placeholder:o||p,onKeyDown:u,...i}):e.jsx(j,{px:1,className:"form-item-input slot",children:s})}on.propTypes=tn;on.defaultProps={componentProps:{}};function sn({editing:t,value:o,onChange:s,componentProps:l,...n}){const{blocklet:i}=l,p=o==="auto"?Qo.getPassportColorFromDid(i.appDid):o;return e.jsxs(j,{display:"flex",alignItems:"center",children:[e.jsx("div",{style:{width:96,marginRight:12},dangerouslySetInnerHTML:{__html:Zo({title:"Owner",issuer:fe(i),issuerDid:i.appDid,ownerName:"Your Name",ownerDid:i.appDid,preferredColor:o||"auto"})}}),e.jsx(nn,{...n,editing:t,value:t?p:o,onChange:s,componentProps:l})]})}sn.propTypes={...tn,componentProps:r.shape({blocklet:r.object.isRequired}).isRequired};sn.defaultProps={};const Wr={input:on,color:nn,passport:sn,uploader:t=>e.jsx(Bs,{...t.componentProps})};function Hr(t,{editing:o=!1}){const{componentType:s="input",render:l,renderFormItem:n}=t;return o&&n?n:!o&&l?l:Wr[s==null?void 0:s.toLowerCase()]}function rn({schema:t,loading:o,value:s,defaultValue:l,onChange:n,style:i,disabled:p}){const a=Object.prototype.toString.call(s)==="[object Object]",[u,x]=g.useState(null),[y,d]=g.useState(a?s:l),v=g.useRef();function c(m,b,f){const{key:S,secure:R}=m,L=y[S]!==b,N={...y,[S]:b};L&&d(N),n({[S]:b},{allValues:N,action:f,currentItem:m}),f==="confirm"&&R&&d({...y,[S]:"__encrypted__"}),["confirm","cancel"].includes(f)?h(null):h(m)}function h(m){if(m){v.current=y[m.key],x(m);return}v.current=null,x(null)}function C(m,{editing:b=!1}){const{key:f}=m,S=a?s[f]:y[f];return S==="__encrypted__"?b?"":"******":S}return e.jsx(Yr,{className:"form",style:i,children:t==null?void 0:t.map(m=>{const{key:b,description:f,required:S,solo:R=!1,hidden:P=!1,componentProps:L={}}=m;if(P)return null;const N=!!(u&&b===u.key),D=C(m,{editing:N}),B=Hr(m,{editing:N}),F={inputProps:{"data-cy":"schema-form-item-component"},key:b,description:f,editing:N,value:D,onChange:(I,H="change")=>c(m,I,H),componentProps:L};return e.jsxs(j,{className:"form-item",children:[!R&&e.jsxs(j,{className:"form-item-label",style:{color:S&&!D?"#ff0000":"#333"},children:[f,S&&e.jsx(it,{})]}),e.jsxs(j,{className:"form-item-body",children:[e.jsx(j,{className:"form-item-input",sx:{textAlign:R?"center":"left"},children:e.jsx(B,{...F})}),!R&&e.jsx(j,{className:"form-item-action",children:N?e.jsxs(e.Fragment,{children:[e.jsx($,{"data-cy":"schema-form-item-confirm",onClick:()=>{c(m,D,"confirm")},disabled:p||o,size:"large",children:o?e.jsx(ie,{size:24}):e.jsx(hr,{})}),e.jsx($,{"data-cy":"schema-form-item-cancel",onClick:()=>{c(m,v.current,"cancel")},disabled:p||o,size:"large",children:e.jsx(Xo,{})})]}):e.jsx($,{"data-cy":"schema-form-item-edit",onClick:()=>{c(m,y[b],"edit")},disabled:p||u,size:"large",children:e.jsx(fr,{})})})]})]},b)})})}rn.propTypes={schema:r.array.isRequired,loading:r.bool,onChange:r.func.isRequired,value:r.object,defaultValue:r.object,style:r.object,disabled:r.bool};rn.defaultProps={loading:!1,value:void 0,defaultValue:{},style:{},disabled:!1};const Yr=O(Us)``;function an({meta:t,onCancel:o,mode:s,handlePaySuccess:l}){const{t:n,locale:i}=z(),{info:p}=W(),a=mo(p),[u,x]=g.useState(null),y=new URL(t==null?void 0:t.registryUrl).origin,d=fe({meta:t}),v=async(h,C)=>{const m=({downloadTokenList:S})=>{l({downloadTokenList:S})},b=S=>{A.error(S),o(S)};function f(S){return es(()=>eo.get(S).then(async({data:R})=>{const P=R==null?void 0:R.downloadTokenList;if(R.status==="succeed"){if(P&&P.length)await m({downloadTokenList:P});else return await b(n("blocklet.component.missDownloadTokenTip")),!0;return!0}return R.status==="error"?(console.error("vc error: ",R),await b(R==null?void 0:R.error),!0):!1}),{interval:1e3})}if(s==="purchase"&&u){const{statusUrl:S}=$o(u);await f(S)}else await m({downloadTokenList:h.downloadTokenList&&C(h.downloadTokenList)})};if(g.useEffect(()=>{if(s==="purchase"){const h=new URL(y);h.pathname="/api/did/verify-purchase-blocklet/token",h.searchParams.set("serverDid",p.did),h.searchParams.set("blockletDid",t==null?void 0:t.did);try{eo.get(h.href).then(({data:C})=>{const m=`${C.url}`;x(m)})}catch(C){console.error("get next workflow url error: ",C)}}return()=>{x(null)}},[s]),s==="purchase"&&!u)return"";const c={verify:{action:"verify-purchase-blocklet",checkFn:at.create({baseURL:y}).get,extraParams:{serverDid:p.did,blockletDid:t==null?void 0:t.did},messages:{title:n("store.purchase.verify.auth.title",{name:d}),scan:n("store.purchase.verify.auth.scan"),confirm:n("store.purchase.verify.auth.confirm"),success:n("store.purchase.verify.auth.success")}},purchase:{action:"acquire-asset",checkFn:at.create({baseURL:Ee(y,"/store")}).get,extraParams:{factory:t.nftFactory,nw:u},messages:{title:n("store.purchase.auth.title",{name:d}),scan:n("store.purchase.auth.scan"),confirm:n("store.purchase.auth.confirm"),success:e.jsxs(e.Fragment,{children:[e.jsx("p",{children:n("store.purchase.auth.success")}),e.jsx("p",{children:n("blocklet.component.purchaseComponentSecondCheckTip")})]})}}};return e.jsx(Lt,{open:!0,locale:i,popup:!1,saveConnect:!1,className:"connect",baseUrl:y,onSuccess:v,cancelWhenScanned:o,onClose:o,checkTimeout:60*5e3,webWalletUrl:a,disableClose:!0,showDownload:!1,...c[s]})}an.propTypes={...Ys,handlePaySuccess:r.func,mode:r.oneOf(["verify","purchase"]).isRequired};an.defaultProps={handlePaySuccess:()=>{}};const ln=g.forwardRef(({mode:t,...o},s)=>{const[l,n]=g.useState(t!=="both"?t:"verify"),[i,p]=g.useState(t!=="both"?2:1),a=x=>{x!==l&&n(x)},u=()=>{l&&i!==2&&p(2)};return g.useImperativeHandle(s,()=>({onNext:u,getCurrentStep:()=>i})),i===1?e.jsx("div",{style:{maxWidth:520},children:e.jsx(Ks,{action:l,onNext:null,onSelect:a})}):e.jsx(an,{...o,mode:l})});ln.propTypes={mode:r.oneOf(["both","verify","purchase"]).isRequired,ref:r.any};ln.defaultProps={ref:{}};const Kr=ln;function Jr({...t}){return e.jsx(Z,{className:"bottom-button",variant:"contained",color:"primary",...t})}function cn({key:t}={key:"sm"}){const o=fo();return Wt(o.breakpoints.down(t))}function dn({blocklet:t,onStartNow:o,children:s,disabled:l}){const{t:n}=z(),i=cn();return!t||ts(t.meta)?e.jsx(Qr,{children:s}):e.jsxs(Zr,{isMobile:i,children:[e.jsx(Jr,{className:"start-now",variant:"contained",color:"primary",disabled:l,onClick:()=>o(),children:n("setup.startNow")}),e.jsx(j,{display:"flex",alignItems:"center",children:s})]})}dn.propTypes={blocklet:r.object,onStartNow:r.func,children:r.any,disabled:r.bool};dn.defaultProps={blocklet:null,onStartNow:()=>{},children:null,disabled:!1};const Qr=O(j)`
67
67
  width: 100%;
68
68
  margin-top: auto;
69
69
  padding-top: 24px;
@@ -1 +1 @@
1
- import{r as E,q as j,z as I,j as e,X as W,C as k,cB as T,Q as v,x as L,A as h,F as N,u as R,y as S,an as U,af as b}from"./index-cto27BjI.js";import{w as F}from"./wrap-locale-BMwksOY3.js";function _({SessionContext:t,webWalletUrl:a,onSuccess:c}){var g,u;const{api:o,session:n}=E.useContext(t),{t:s,locale:w}=j(),m=I(),{searchParams:l}=new URL(window.location.href),d=l.get("redirect"),P=async(r,C)=>{c(r,C),await n.refresh(),h.success(s("exchangePassport.success")),setTimeout(()=>{if(d){const i=decodeURIComponent(d);i.startsWith(N.WELLKNOWN_SERVICE_PATH_PREFIX)?m(i,{replace:!0}):window.location=i}else window.location=window.env.pathPrefix||window.env.apiPrefix||"/"},3e3)},f=r=>{h.error(r.message)},x={},p=l.get("componentId");return p&&(x.componentId=p),n.loading?e.jsx(W,{children:e.jsx(k,{})}):e.jsx(T,{did:((g=window==null?void 0:window.blocklet)==null?void 0:g.appPid)||((u=window==null?void 0:window.env)==null?void 0:u.appPid),children:e.jsx(v,{sx:{width:"560px",maxWidth:"100%",height:"100%"},children:e.jsx(L,{className:"connect",action:"exchange-passport",checkFn:o.get,checkTimeout:10*60*1e3,webWalletUrl:a,onSuccess:P,onError:f,locale:w,messages:{title:s("exchangePassport.dialog.title"),scan:s("exchangePassport.dialog.scan"),confirm:s("exchangePassport.dialog.confirm"),success:s("exchangePassport.dialog.success")},extraParams:x,extraContent:null})})})}const y=F(_);function D(){const{info:t}=R(),a=S(t),c=(o,n)=>{o.sessionToken&&b(n(o.sessionToken))};return e.jsx(y,{SessionContext:U,webWalletUrl:a,onSuccess:c})}export{D as default};
1
+ import{r as E,q as j,z as I,j as e,X as W,C as k,cB as T,Q as v,x as L,A as h,F as N,u as R,y as S,an as U,af as b}from"./index-DBlH-4qz.js";import{w as F}from"./wrap-locale-BSXKmMbJ.js";function _({SessionContext:t,webWalletUrl:a,onSuccess:c}){var g,u;const{api:o,session:n}=E.useContext(t),{t:s,locale:w}=j(),m=I(),{searchParams:l}=new URL(window.location.href),d=l.get("redirect"),P=async(r,C)=>{c(r,C),await n.refresh(),h.success(s("exchangePassport.success")),setTimeout(()=>{if(d){const i=decodeURIComponent(d);i.startsWith(N.WELLKNOWN_SERVICE_PATH_PREFIX)?m(i,{replace:!0}):window.location=i}else window.location=window.env.pathPrefix||window.env.apiPrefix||"/"},3e3)},f=r=>{h.error(r.message)},x={},p=l.get("componentId");return p&&(x.componentId=p),n.loading?e.jsx(W,{children:e.jsx(k,{})}):e.jsx(T,{did:((g=window==null?void 0:window.blocklet)==null?void 0:g.appPid)||((u=window==null?void 0:window.env)==null?void 0:u.appPid),children:e.jsx(v,{sx:{width:"560px",maxWidth:"100%",height:"100%"},children:e.jsx(L,{className:"connect",action:"exchange-passport",checkFn:o.get,checkTimeout:10*60*1e3,webWalletUrl:a,onSuccess:P,onError:f,locale:w,messages:{title:s("exchangePassport.dialog.title"),scan:s("exchangePassport.dialog.scan"),confirm:s("exchangePassport.dialog.confirm"),success:s("exchangePassport.dialog.success")},extraParams:x,extraContent:null})})})}const y=F(_);function D(){const{info:t}=R(),a=S(t),c=(o,n)=>{o.sessionToken&&b(n(o.sessionToken))};return e.jsx(y,{SessionContext:U,webWalletUrl:a,onSuccess:c})}export{D as default};
@@ -1 +1 @@
1
- import{cY as m,r as p,g as z}from"./index-cto27BjI.js";var M={},B={},u={},x={},g={};g.__esModule=!0;g.joinClassNames=void 0;g.joinClassNames=function(){for(var s=[],r=0;r<arguments.length;r++)s[r]=arguments[r];return s.filter(function(d){return d}).join(" ")};(function(s){var r=m&&m.__assign||function(){return r=Object.assign||function(n){for(var o,t=1,a=arguments.length;t<a;t++){o=arguments[t];for(var e in o)Object.prototype.hasOwnProperty.call(o,e)&&(n[e]=o[e])}return n},r.apply(this,arguments)};s.__esModule=!0;var d=p,i=g,v=function(n){var o=n.className,t=n.maxHeight,a=n.color,e=n.lineSpacing,l=e===void 0?"0.7em":e,c=n.style,f={maxHeight:t,width:"100%",height:"1em",backgroundColor:a,marginTop:l};return d.createElement("div",{className:i.joinClassNames("text-row",o),style:r(r({},f),c)})};s.default=v})(x);var P={};(function(s){var r=m&&m.__assign||function(){return r=Object.assign||function(n){for(var o,t=1,a=arguments.length;t<a;t++){o=arguments[t];for(var e in o)Object.prototype.hasOwnProperty.call(o,e)&&(n[e]=o[e])}return n},r.apply(this,arguments)};s.__esModule=!0;var d=p,i=g,v=function(n){var o=n.className,t=n.style,a=n.color,e={backgroundColor:a,borderRadius:"500rem",width:"100%",height:"100%"};return d.createElement("div",{className:i.joinClassNames("round-shape",o),style:r(r({},e),t)})};s.default=v})(P);var L={};(function(s){var r=m&&m.__assign||function(){return r=Object.assign||function(n){for(var o,t=1,a=arguments.length;t<a;t++){o=arguments[t];for(var e in o)Object.prototype.hasOwnProperty.call(o,e)&&(n[e]=o[e])}return n},r.apply(this,arguments)};s.__esModule=!0;var d=p,i=g,v=function(n){var o=n.className,t=n.style,a=n.color,e={backgroundColor:a,width:"100%",height:"100%",marginRight:10};return d.createElement("div",{className:i.joinClassNames("rect-shape",o),style:r(r({},e),t)})};s.default=v})(L);var k={};(function(s){var r=m&&m.__assign||function(){return r=Object.assign||function(a){for(var e,l=1,c=arguments.length;l<c;l++){e=arguments[l];for(var f in e)Object.prototype.hasOwnProperty.call(e,f)&&(a[f]=e[f])}return a},r.apply(this,arguments)};s.__esModule=!0;var d=p,i=x,v=g,n={width:"100%"},o=[97,100,94,90,98,95,98,40],t=function(a){var e=a.rows,l=a.lineSpacing,c=a.color,f=a.style,j=a.className,w=a.widths,_=w===void 0?o:w,h=function(R){return{maxHeight:100/(e*2-1)+"%",width:_[(R+_.length)%_.length]+"%"}};return d.createElement("div",{className:v.joinClassNames("text-block",j),style:r(r({},n),f)},Array.apply(null,Array(e)).map(function(R,N){return d.createElement(i.default,{color:c,style:h(N),lineSpacing:N!==0?l:0,key:N})}))};s.default=t})(k);var A={};(function(s){var r=m&&m.__assign||function(){return r=Object.assign||function(a){for(var e,l=1,c=arguments.length;l<c;l++){e=arguments[l];for(var f in e)Object.prototype.hasOwnProperty.call(e,f)&&(a[f]=e[f])}return a},r.apply(this,arguments)};s.__esModule=!0;var d=p,i=k,v=P,n=g,o={display:"flex"},t=function(a){var e=a.className,l=a.style,c=a.color,f=a.rows;return d.createElement("div",{className:n.joinClassNames("media-block",e),style:r(r({},o),l)},d.createElement(v.default,{color:c,style:{minHeight:55,width:55,minWidth:55,marginRight:10}}),d.createElement(i.default,{color:c,rows:f}))};s.default=t})(A);u.__esModule=!0;u.media=u.text=u.rect=u.round=u.textRow=u.MediaBlock=u.TextBlock=u.RectShape=u.RoundShape=u.TextRow=void 0;var H=x;u.TextRow=H.default;var D=P;u.RoundShape=D.default;var F=L;u.RectShape=F.default;var W=k;u.TextBlock=W.default;var $=A;u.MediaBlock=$.default;u.textRow=H.default;u.round=D.default;u.rect=F.default;u.text=W.default;u.media=$.default;(function(s){var r=m&&m.__assign||function(){return r=Object.assign||function(t){for(var a,e=1,l=arguments.length;e<l;e++){a=arguments[e];for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(t[c]=a[c])}return t},r.apply(this,arguments)},d=m&&m.__rest||function(t,a){var e={};for(var l in t)Object.prototype.hasOwnProperty.call(t,l)&&a.indexOf(l)<0&&(e[l]=t[l]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,l=Object.getOwnPropertySymbols(t);c<l.length;c++)a.indexOf(l[c])<0&&Object.prototype.propertyIsEnumerable.call(t,l[c])&&(e[l[c]]=t[l[c]]);return e};s.__esModule=!0;var i=p,v=u,n=g,o=function(t){var a=t.delay,e=a===void 0?0:a,l=t.type,c=l===void 0?"text":l,f=t.color,j=f===void 0?"#CDCDCD":f,w=t.rows,_=w===void 0?3:w,h=t.ready,R=t.firstLaunchOnly,N=t.children,C=t.className,G=t.showLoadingAnimation,y=t.customPlaceholder,I=d(t,["delay","type","color","rows","ready","firstLaunchOnly","children","className","showLoadingAnimation","customPlaceholder"]),E=i.useState(h),O=E[0],S=E[1],b=i.useRef(null),V=function(){var T=G?n.joinClassNames("show-loading-animation",C):C;if(y&&i.isValidElement(y)){var Y=n.joinClassNames(y.props.className,T);return i.cloneElement(y,{className:Y})}else if(y)return y;var q=v[c];return i.createElement(q,r({},I,{color:j,rows:_,className:T}))};return i.useEffect(function(){!R&&O&&!h?e&&e>0?b.current=window.setTimeout(function(){S(!1)},e):S(!1):h&&(b.current&&window.clearTimeout(b.current),O||S(!0))},[R,O,h,e]),i.useEffect(function(){return function(){b.current&&window.clearTimeout(b.current)}},[]),O?N:V()};s.default=o})(B);(function(s){s.__esModule=!0;var r=B;s.default=r.default})(M);const K=z(M);export{K as R};
1
+ import{cY as m,r as p,g as z}from"./index-DBlH-4qz.js";var M={},B={},u={},x={},g={};g.__esModule=!0;g.joinClassNames=void 0;g.joinClassNames=function(){for(var s=[],r=0;r<arguments.length;r++)s[r]=arguments[r];return s.filter(function(d){return d}).join(" ")};(function(s){var r=m&&m.__assign||function(){return r=Object.assign||function(n){for(var o,t=1,a=arguments.length;t<a;t++){o=arguments[t];for(var e in o)Object.prototype.hasOwnProperty.call(o,e)&&(n[e]=o[e])}return n},r.apply(this,arguments)};s.__esModule=!0;var d=p,i=g,v=function(n){var o=n.className,t=n.maxHeight,a=n.color,e=n.lineSpacing,l=e===void 0?"0.7em":e,c=n.style,f={maxHeight:t,width:"100%",height:"1em",backgroundColor:a,marginTop:l};return d.createElement("div",{className:i.joinClassNames("text-row",o),style:r(r({},f),c)})};s.default=v})(x);var P={};(function(s){var r=m&&m.__assign||function(){return r=Object.assign||function(n){for(var o,t=1,a=arguments.length;t<a;t++){o=arguments[t];for(var e in o)Object.prototype.hasOwnProperty.call(o,e)&&(n[e]=o[e])}return n},r.apply(this,arguments)};s.__esModule=!0;var d=p,i=g,v=function(n){var o=n.className,t=n.style,a=n.color,e={backgroundColor:a,borderRadius:"500rem",width:"100%",height:"100%"};return d.createElement("div",{className:i.joinClassNames("round-shape",o),style:r(r({},e),t)})};s.default=v})(P);var L={};(function(s){var r=m&&m.__assign||function(){return r=Object.assign||function(n){for(var o,t=1,a=arguments.length;t<a;t++){o=arguments[t];for(var e in o)Object.prototype.hasOwnProperty.call(o,e)&&(n[e]=o[e])}return n},r.apply(this,arguments)};s.__esModule=!0;var d=p,i=g,v=function(n){var o=n.className,t=n.style,a=n.color,e={backgroundColor:a,width:"100%",height:"100%",marginRight:10};return d.createElement("div",{className:i.joinClassNames("rect-shape",o),style:r(r({},e),t)})};s.default=v})(L);var k={};(function(s){var r=m&&m.__assign||function(){return r=Object.assign||function(a){for(var e,l=1,c=arguments.length;l<c;l++){e=arguments[l];for(var f in e)Object.prototype.hasOwnProperty.call(e,f)&&(a[f]=e[f])}return a},r.apply(this,arguments)};s.__esModule=!0;var d=p,i=x,v=g,n={width:"100%"},o=[97,100,94,90,98,95,98,40],t=function(a){var e=a.rows,l=a.lineSpacing,c=a.color,f=a.style,j=a.className,w=a.widths,_=w===void 0?o:w,h=function(R){return{maxHeight:100/(e*2-1)+"%",width:_[(R+_.length)%_.length]+"%"}};return d.createElement("div",{className:v.joinClassNames("text-block",j),style:r(r({},n),f)},Array.apply(null,Array(e)).map(function(R,N){return d.createElement(i.default,{color:c,style:h(N),lineSpacing:N!==0?l:0,key:N})}))};s.default=t})(k);var A={};(function(s){var r=m&&m.__assign||function(){return r=Object.assign||function(a){for(var e,l=1,c=arguments.length;l<c;l++){e=arguments[l];for(var f in e)Object.prototype.hasOwnProperty.call(e,f)&&(a[f]=e[f])}return a},r.apply(this,arguments)};s.__esModule=!0;var d=p,i=k,v=P,n=g,o={display:"flex"},t=function(a){var e=a.className,l=a.style,c=a.color,f=a.rows;return d.createElement("div",{className:n.joinClassNames("media-block",e),style:r(r({},o),l)},d.createElement(v.default,{color:c,style:{minHeight:55,width:55,minWidth:55,marginRight:10}}),d.createElement(i.default,{color:c,rows:f}))};s.default=t})(A);u.__esModule=!0;u.media=u.text=u.rect=u.round=u.textRow=u.MediaBlock=u.TextBlock=u.RectShape=u.RoundShape=u.TextRow=void 0;var H=x;u.TextRow=H.default;var D=P;u.RoundShape=D.default;var F=L;u.RectShape=F.default;var W=k;u.TextBlock=W.default;var $=A;u.MediaBlock=$.default;u.textRow=H.default;u.round=D.default;u.rect=F.default;u.text=W.default;u.media=$.default;(function(s){var r=m&&m.__assign||function(){return r=Object.assign||function(t){for(var a,e=1,l=arguments.length;e<l;e++){a=arguments[e];for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(t[c]=a[c])}return t},r.apply(this,arguments)},d=m&&m.__rest||function(t,a){var e={};for(var l in t)Object.prototype.hasOwnProperty.call(t,l)&&a.indexOf(l)<0&&(e[l]=t[l]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,l=Object.getOwnPropertySymbols(t);c<l.length;c++)a.indexOf(l[c])<0&&Object.prototype.propertyIsEnumerable.call(t,l[c])&&(e[l[c]]=t[l[c]]);return e};s.__esModule=!0;var i=p,v=u,n=g,o=function(t){var a=t.delay,e=a===void 0?0:a,l=t.type,c=l===void 0?"text":l,f=t.color,j=f===void 0?"#CDCDCD":f,w=t.rows,_=w===void 0?3:w,h=t.ready,R=t.firstLaunchOnly,N=t.children,C=t.className,G=t.showLoadingAnimation,y=t.customPlaceholder,I=d(t,["delay","type","color","rows","ready","firstLaunchOnly","children","className","showLoadingAnimation","customPlaceholder"]),E=i.useState(h),O=E[0],S=E[1],b=i.useRef(null),V=function(){var T=G?n.joinClassNames("show-loading-animation",C):C;if(y&&i.isValidElement(y)){var Y=n.joinClassNames(y.props.className,T);return i.cloneElement(y,{className:Y})}else if(y)return y;var q=v[c];return i.createElement(q,r({},I,{color:j,rows:_,className:T}))};return i.useEffect(function(){!R&&O&&!h?e&&e>0?b.current=window.setTimeout(function(){S(!1)},e):S(!1):h&&(b.current&&window.clearTimeout(b.current),O||S(!0))},[R,O,h,e]),i.useEffect(function(){return function(){b.current&&window.clearTimeout(b.current)}},[]),O?N:V()};s.default=o})(B);(function(s){s.__esModule=!0;var r=B;s.default=r.default})(M);const K=z(M);export{K as R};
@@ -1,4 +1,4 @@
1
- import{g as O,_ as F,P as o,s as Q,j as e,I as Y,r as p,u as q,c as X,a as P,b as R,L as J,d as K,e as Z,f as ee,h as ne,W as T,i as te,T as j,k as ae,l as b,m as g,G as v,n as V,p as se,C as re,o as L}from"./index-cto27BjI.js";import{f as oe}from"./index-D9k2I5J1.js";import{I as E}from"./index-CZxztyyO.js";import{C as I}from"./click-to-copy-BxRY2T53.js";import{w as ie}from"./withStyles-DQBIFjtv.js";var le=F,ce=le(function(n,i,r){return n+(r?" ":"")+i.toLowerCase()}),me=ce;const de=O(me);function w({icon:n,value:i,name:r,url:x,animated:c,LinkComponent:l,prefix:d}){const s=e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"metric__image",children:e.jsx(Y,{name:n,alt:typeof r=="string"?r:"",size:30,prefix:d,color:"#222222"})}),e.jsxs("div",{children:[e.jsx("div",{className:`metric__number ${c?"metric__number--animated":""}`,dangerouslySetInnerHTML:{__html:i}}),e.jsx("div",{className:"metric__name",children:r})]})]});return e.jsx(ue,{children:x?e.jsx(l,{to:x,children:s}):s})}w.propTypes={icon:o.string.isRequired,value:o.oneOfType([o.string,o.number]).isRequired,name:o.node.isRequired,animated:o.bool,url:o.string,LinkComponent:o.any,prefix:o.string};w.defaultProps={animated:!1,url:"",LinkComponent:null,prefix:"/images"};const ue=Q("div")`
1
+ import{g as O,_ as F,P as o,s as Q,j as e,I as Y,r as p,u as q,c as X,a as P,b as R,L as J,d as K,e as Z,f as ee,h as ne,W as T,i as te,T as j,k as ae,l as b,m as g,G as v,n as V,p as se,C as re,o as L}from"./index-DBlH-4qz.js";import{f as oe}from"./index-D9k2I5J1.js";import{I as E}from"./index-GQiNlTaJ.js";import{C as I}from"./click-to-copy-BJBKnF7C.js";import{w as ie}from"./withStyles-fo91W1eJ.js";var le=F,ce=le(function(n,i,r){return n+(r?" ":"")+i.toLowerCase()}),me=ce;const de=O(me);function w({icon:n,value:i,name:r,url:x,animated:c,LinkComponent:l,prefix:d}){const s=e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"metric__image",children:e.jsx(Y,{name:n,alt:typeof r=="string"?r:"",size:30,prefix:d,color:"#222222"})}),e.jsxs("div",{children:[e.jsx("div",{className:`metric__number ${c?"metric__number--animated":""}`,dangerouslySetInnerHTML:{__html:i}}),e.jsx("div",{className:"metric__name",children:r})]})]});return e.jsx(ue,{children:x?e.jsx(l,{to:x,children:s}):s})}w.propTypes={icon:o.string.isRequired,value:o.oneOfType([o.string,o.number]).isRequired,name:o.node.isRequired,animated:o.bool,url:o.string,LinkComponent:o.any,prefix:o.string};w.defaultProps={animated:!1,url:"",LinkComponent:null,prefix:"/images"};const ue=Q("div")`
2
2
  border-left: 1px solid ${n=>n.theme.typography.color.main};
3
3
  padding: 10px 0 10px 16px;
4
4
  @media (max-width: ${n=>n.theme.breakpoints.values.sm}px) {
@@ -1 +1 @@
1
- import{g as j,cY as O}from"./index-cto27BjI.js";function J(i,t){for(var r=0;r<t.length;r++){const a=t[r];if(typeof a!="string"&&!Array.isArray(a)){for(const e in a)if(e!=="default"&&!(e in i)){const s=Object.getOwnPropertyDescriptor(a,e);s&&Object.defineProperty(i,e,s.get?s:{enumerable:!0,get:()=>a[e]})}}}return Object.freeze(Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}))}var d={default:O,call:function(i,t,r){var a="";typeof t=="function"&&(r=t,t={});var e={data:t===void 0?null:t};if(typeof r=="function"){var s="dscb"+window.dscb++;window[s]=r,e._dscbstub=s}return e=JSON.stringify(e),window._dsbridge?a=_dsbridge.call(i,e):(window._dswk||navigator.userAgent.indexOf("_dsbridge")!=-1)&&(a=prompt("_dsbridge="+i,e)),JSON.parse(a||"{}").data},register:function(i,t,r){var a=r?window._dsaf:window._dsf;window._dsInit||(window._dsInit=!0,setTimeout(function(){d.call("_dsb.dsinit")},0)),typeof t=="object"?a._obs[i]=t:a[i]=t},registerAsyn:function(i,t){this.register(i,t,!0)},hasNativeMethod:function(i,t){return this.call("_dsb.hasNativeMethod",{name:i,type:t||"all"})},disableJavascriptDialogBlock:function(i){this.call("_dsb.disableJavascriptDialogBlock",{disable:i!==!1})}};(function(){if(!window._dsf){var i={_dsf:{_obs:{}},_dsaf:{_obs:{}},dscb:0,dsBridge:d,close:function(){d.call("_dsb.closePage")},_handleMessageFromNative:function(r){var a=JSON.parse(r.data),e={id:r.callbackId,complete:!0},s=this._dsf[r.method],o=this._dsaf[r.method],p=function(u,_){e.data=u.apply(_,a),d.call("_dsb.returnValue",e)},v=function(u,_){a.push(function(w,y){e.data=w,e.complete=y!==!1,d.call("_dsb.returnValue",e)}),u.apply(_,a)};if(s)p(s,this._dsf);else if(o)v(o,this._dsaf);else{var l=r.method.split(".");if(l.length<2)return;var g=l.pop(),b=l.join("."),c=this._dsf._obs,f=c[b]||{},n=f[g];if(n&&typeof n=="function"){p(n,f);return}if(c=this._dsaf._obs,f=c[b]||{},n=f[g],n&&typeof n=="function"){v(n,f);return}}}};for(var t in i)window[t]=i[t];d.register("_hasJavascriptMethod",function(r,a){var e=r.split(".");if(e.length<2)return!!(_dsf[e]||_dsaf[e]);var r=e.pop(),s=e.join("."),o=_dsf._obs[s]||_dsaf._obs[s];return o&&!!o[r]})}})();var h=d;const N=j(h),k=J({__proto__:null,default:N},[h]);export{k as i};
1
+ import{g as j,cY as O}from"./index-DBlH-4qz.js";function J(i,t){for(var r=0;r<t.length;r++){const a=t[r];if(typeof a!="string"&&!Array.isArray(a)){for(const e in a)if(e!=="default"&&!(e in i)){const s=Object.getOwnPropertyDescriptor(a,e);s&&Object.defineProperty(i,e,s.get?s:{enumerable:!0,get:()=>a[e]})}}}return Object.freeze(Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}))}var d={default:O,call:function(i,t,r){var a="";typeof t=="function"&&(r=t,t={});var e={data:t===void 0?null:t};if(typeof r=="function"){var s="dscb"+window.dscb++;window[s]=r,e._dscbstub=s}return e=JSON.stringify(e),window._dsbridge?a=_dsbridge.call(i,e):(window._dswk||navigator.userAgent.indexOf("_dsbridge")!=-1)&&(a=prompt("_dsbridge="+i,e)),JSON.parse(a||"{}").data},register:function(i,t,r){var a=r?window._dsaf:window._dsf;window._dsInit||(window._dsInit=!0,setTimeout(function(){d.call("_dsb.dsinit")},0)),typeof t=="object"?a._obs[i]=t:a[i]=t},registerAsyn:function(i,t){this.register(i,t,!0)},hasNativeMethod:function(i,t){return this.call("_dsb.hasNativeMethod",{name:i,type:t||"all"})},disableJavascriptDialogBlock:function(i){this.call("_dsb.disableJavascriptDialogBlock",{disable:i!==!1})}};(function(){if(!window._dsf){var i={_dsf:{_obs:{}},_dsaf:{_obs:{}},dscb:0,dsBridge:d,close:function(){d.call("_dsb.closePage")},_handleMessageFromNative:function(r){var a=JSON.parse(r.data),e={id:r.callbackId,complete:!0},s=this._dsf[r.method],o=this._dsaf[r.method],p=function(u,_){e.data=u.apply(_,a),d.call("_dsb.returnValue",e)},v=function(u,_){a.push(function(w,y){e.data=w,e.complete=y!==!1,d.call("_dsb.returnValue",e)}),u.apply(_,a)};if(s)p(s,this._dsf);else if(o)v(o,this._dsaf);else{var l=r.method.split(".");if(l.length<2)return;var g=l.pop(),b=l.join("."),c=this._dsf._obs,f=c[b]||{},n=f[g];if(n&&typeof n=="function"){p(n,f);return}if(c=this._dsaf._obs,f=c[b]||{},n=f[g],n&&typeof n=="function"){v(n,f);return}}}};for(var t in i)window[t]=i[t];d.register("_hasJavascriptMethod",function(r,a){var e=r.split(".");if(e.length<2)return!!(_dsf[e]||_dsaf[e]);var r=e.pop(),s=e.join("."),o=_dsf._obs[s]||_dsaf._obs[s];return o&&!!o[r]})}})();var h=d;const N=j(h),k=J({__proto__:null,default:N},[h]);export{k as i};
@@ -1,4 +1,4 @@
1
- const __vite__fileDeps=["./index-CLLusFhD.js","./index-D9k2I5J1.js","./index-CZxztyyO.js","./click-to-copy-BxRY2T53.js","./withStyles-DQBIFjtv.js","./index-BmYduQjf.js","./useLocalStorage-C7ck6rDl.js","./index-DHBWVWpd.js","./FilterList-0wFVrPUc.js","./Select-DacRJUpT.js","./Delete-B32Y4H9I.js","./InputLabel-3Wx_imEU.js","./TextField-ChYCqgnF.js","./LastPage-IxsHKdZG.js","./index-BOyFzt02.js","./redux-BfgfWfKE.js","./Search-CLqP6dSG.js","./index-58xom0se.js","./MoreVert-Dy-UXLSF.js","./url-evaluation-Dw2A031X.js","./tag-DwIjrotQ.js","./actions-DLUCcZnb.js","./ButtonGroup-DsDQPFq5.js","./getValidReactChildren-BSSAKXXh.js","./index-D4mUNiA3.js","./isEqual-SGvPf73-.js","./install-from-url-BfQGdJqB.js","./Stepper-CfMuItAU.js","./app-avatar-CLoA8FKQ.js","./Add-BYcTrfwq.js","./index-MgqsR5Yr.js","./index-DYIWxxvc.js","./index-BPb4u19B.js","./Skeleton-B635xq9w.js","./Close-TD13_jXp.js","./lottie-LUS1MfCT.js","./wait-container-DrkB9Qje.js","./Launch-0VxvnuWe.js","./DeleteOutline-CfcGLGyQ.js","./DeleteOutline-DvvZ31vT.js","./spaces-BzjtPxcp.js","./api-Dg1aNjni.js","./index-7VEn8pMG.js","./item-BftAM0Zi.js","./index-DKleljgS.js","./index-MraPT5rJ.js","./InputAdornment-BsJrfw9W.js","./preact.module-B1z5cdvs.js","./Done-Dh00ds6i.js","./delete-confirm-Cu52-w9K.js","./item-CxkJY_14.css","./ArrowDropDown-Ce8utXjU.js","./Breadcrumbs-DhzWQAd5.js","./index-CivlhCtE.js","./index-D1qmIEQe.js","./index.esm-Bpp1W-0n.js","./switch-control-2xhJNPLI.js","./Link-D4THmfDH.js","./logo-BKA11TRi.js","./LoadingButton-kMo-bLLA.js","./Public-Cy1SlD9D.js","./InfoOutlined-Dv-PS_K9.js","./CheckCircle-z0EmvxpD.js","./ChevronRight-DF2TQuxF.js","./Edit-BJLfjGzO.js","./Https-C3LwivZ6.js","./Slider-kWM3QD3U.js","./index-D1IHJL8V.js","./download-BTNda_FN.js","./download-D33dFtt_.css","./index-DyLmBsrc.js","./audit-logs-CQgLtoSJ.js","./index-4SekL7Au.js","./index-D4PP6P2d.css","./Pagination-CvzuQKWn.js","./index-Cybcu3bZ.js","./index-BYxU5EuJ.js","./Loop-8YHpWrw7.js","./ViewList-C9rEsLfO.js","./list-header-CwzHI2Rt.js","./index-nk7Jeg9T.js","./resource-dialog-D46mQ3iv.js","./index-DdYi7g5A.js","./team-Bds6tH0s.js","./actions-BwC0xihZ.js","./index-fzAzVQZ7.js","./EditIcon-BM1-fNyQ.js","./LockIcon-DVMXWBuj.js","./Google-Bh_n6egY.js","./ToggleButtonGroup-D-TzdChr.js","./detail-TSZFt17G.js","./index-CwvvU6sG.js","./index-tCtD2xpl.js","./invitation-Db4MC3JQ.js","./index-RXFOkpdO.js","./index-C6Wak-Bp.js","./wrap-locale-BMwksOY3.js","./index-D2aPyZEh.js","./index-ByTAZBnH.js","./index-Bq3EqJlL.js","./agreement-C-3kwpSq.js","./index-udgf9h3j.js","./index-CJjmaZOb.js","./index-CV5o0SmN.js","./index-C7igR7se.css","./index-BkfzVG1e.js","./traffic-DRJFVCky.js","./iframe-Dry0Q1RC.js","./ChevronLeft-CwZ4eGkY.js","./chart-CCJil07D.js","./bundle-avatar-C0jAIMBi.js","./memory-yOjaiNVs.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
1
+ const __vite__fileDeps=["./index-D4Db9ftV.js","./index-D9k2I5J1.js","./index-GQiNlTaJ.js","./click-to-copy-BJBKnF7C.js","./withStyles-fo91W1eJ.js","./index-Bm4qa0nV.js","./useLocalStorage-Den65TTd.js","./index-BNasUWiN.js","./FilterList-CFsrQPpD.js","./Select-D6ACs1xY.js","./Delete-HYXbanP_.js","./InputLabel-BXQy_ZSg.js","./TextField-DRrSIaR4.js","./LastPage-C7awZPyV.js","./index-BsU6rGWy.js","./redux-Bu4pculE.js","./Search-Cz2kpFbT.js","./index-f3gCWa9h.js","./MoreVert-gaCnI5Xf.js","./url-evaluation-OWrig3n8.js","./tag-tXL4aJpc.js","./actions-jzQJLd83.js","./ButtonGroup-CqHbqvIj.js","./getValidReactChildren-BXQ8AiZt.js","./index-8fCm2Jic.js","./isEqual-C9LQO0Wo.js","./install-from-url-BQJWpTKl.js","./Stepper-CZFVEfLi.js","./app-avatar-DH3uT_Nr.js","./Add-BlWdL5hq.js","./index-Bh-DJU8Z.js","./index-CN4-jpgI.js","./index-DnYXtUxe.js","./Skeleton-DWKEXisW.js","./Close-BfNzQHXc.js","./lottie-BuomNMnt.js","./wait-container-CnNsD3cH.js","./Launch-Eb8N22dN.js","./DeleteOutline-mQ8p8X2l.js","./spaces-DbeGuVPF.js","./api-sSit_7Kw.js","./index-C2H71CT1.js","./item-CE4vGuWF.js","./index-2dK67bGl.js","./index-DEBI0lGj.js","./InputAdornment-Dy1fA12v.js","./preact.module-B1z5cdvs.js","./Done-1q2rveFh.js","./delete-confirm-CNU7dJ17.js","./item-CxkJY_14.css","./ArrowDropDown-BRSuKRSZ.js","./Breadcrumbs-BQD6r-rf.js","./index-DddM0S9V.js","./index-C01qpSwK.js","./index.esm-UN3QaGsN.js","./switch-control-Oh1i031K.js","./Link-euuV_LRf.js","./logo-BKA11TRi.js","./LoadingButton-DVHwr9De.js","./Public-BEijyP_7.js","./InfoOutlined-DD-Zg0Tj.js","./CheckCircle-CSPlY_20.js","./ChevronRight-hhdO2z__.js","./Edit-BowBuCq8.js","./Https-CspPw1QL.js","./Slider-DKraNvrD.js","./index-C39X5nSU.js","./download-Htx7YW1G.js","./download-D33dFtt_.css","./index-CJRh33cD.js","./audit-logs-DwuYsIhc.js","./index-BFmN77vD.js","./index-D4PP6P2d.css","./Pagination-DfzcotPN.js","./index-uyaXmUh9.js","./index-rJLRm37D.js","./Loop-vUb_fmsc.js","./ViewList-CxKdhgAh.js","./list-header-DF2AUmaz.js","./index-B6H1TQgD.js","./resource-dialog-BL8JdZuL.js","./index-D1-aBvtW.js","./team-B2Py-5R-.js","./actions-QLA3pt8S.js","./index-CTyxnc1Q.js","./EditIcon-nFgXy_Ap.js","./LockIcon-Ca85OyYH.js","./Google-Dm0Bt78U.js","./ToggleButtonGroup-CBvNwQed.js","./detail-CESxJL-2.js","./index-DI-gzmKu.js","./index-Bu9Gdw_x.js","./invitation-BpNMGSxV.js","./index-Mdw0srMB.js","./index-BrX8n3kg.js","./wrap-locale-BSXKmMbJ.js","./index-RLS72NCQ.js","./index-CpNJmBAT.js","./index-DNRVE0NP.js","./agreement-Bd_YDn4J.js","./index-B2x_NkGk.js","./index-BcsyQdON.js","./index-DFCC9v5j.js","./index-C7igR7se.css","./index-DWTs3F9i.js","./traffic-C7SAOKwi.js","./iframe-CIfJru42.js","./ChevronLeft-zlmw0JTD.js","./chart-BhmgRFRd.js","./bundle-avatar-4GKn5oRs.js","./memory-BSkx1Ub2.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
2
2
  function mG(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var mt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Wt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ui(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var gG={exports:{}},d4={},yG={exports:{}},Vn={};/**
3
3
  * @license React
4
4
  * react.production.min.js
@@ -2513,4 +2513,4 @@ ${r}
2513
2513
  padding-top: 16px;
2514
2514
  ${e=>e.scrollable?"":"overflow: hidden"};
2515
2515
  }
2516
- `;function E8t(){const{t:e}=ho(),{session:t}=E0(),{info:n,refresh:r}=_l();return Yi(ui.TeamEvents.userUpdated,({teamDid:i,user:o})=>{i===n.did&&o&&!o.approved&&t&&t.user&&t.user.did===o.did&&(fi.warning(e("session.forbidLogin"),{autoHideDuration:10*1e3}),t.logout())}),Yi(gn.EVENTS.NOTIFICATION_CREATE,i=>{i.entityType==="node"&&r({silent:!0})}),Yi(gn.EVENTS.NODE_UPDATED,()=>{r({silent:!0})}),null}var xt={},A8t=Iie;function R8t(e){return e&&e.length?A8t(e):[]}var gue=R8t;const RAt=Wt(gue);class k8t{constructor(t){this.value=t,this.next=void 0}}let D8t=class{constructor(){this.clear()}enqueue(t){const n=new k8t(t);this._head?(this._tail.next=n,this._tail=n):(this._head=n,this._tail=n),this._size++}dequeue(){const t=this._head;if(t)return this._head=this._head.next,this._size--,t.value}clear(){this._head=void 0,this._tail=void 0,this._size=0}get size(){return this._size}*[Symbol.iterator](){let t=this._head;for(;t;)yield t.value,t=t.next}};var O8t=D8t;const L8t=O8t,I8t=e=>{if(!((Number.isInteger(e)||e===1/0)&&e>0))throw new TypeError("Expected `concurrency` to be a number from 1 and up");const t=new L8t;let n=0;const r=()=>{n--,t.size>0&&t.dequeue()()},i=async(s,l,...c)=>{n++;const u=(async()=>s(...c))();l(u);try{await u}catch{}r()},o=(s,l,...c)=>{t.enqueue(i.bind(null,s,l,...c)),(async()=>(await Promise.resolve(),n<e&&t.size>0&&t.dequeue()()))()},a=(s,...l)=>new Promise(c=>{o(s,c,...l)});return Object.defineProperties(a,{activeCount:{get:()=>n},pendingCount:{get:()=>t.size},clearQueue:{value:()=>{t.clear()}}}),a};var P8t=I8t,wI={};Object.defineProperty(wI,"__esModule",{value:!0});const M8t=e=>!!(e!=null&&e.main);var DAt=wI.default=M8t,D0=mt&&mt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xt,"__esModule",{value:!0});xt.isPackBlocklet=xt.isGatewayBlocklet=oCt=xt.isAccessible=xt.isRunning=xt.isBeforeInstalled=iCt=xt.isInProgress=rCt=xt.getBlockletServices=nCt=xt.getBlockletAppIdList=eCt=xt.getRolesFromAuthConfig=xt.isPreferenceKey=kb=xt.isExternalBlocklet=xt.getBlockletChainInfo=xt.getChainInfo=xt.getConnectAppUrl=xt.getParentComponentName=xt.filterComponentsV2=xt.findComponentByIdV2=xt.findComponentV2=xt.findComponentById=xt.findComponent=xt.getComponentBundleId=xt.getComponentName=xt.getComponentId=Vue=xt.replaceSlotToIp=xt.getComponentWhoCanAccess=Q8t=xt.getWhoCanAccess=X8t=xt.findServiceFromMeta=xt.findWebInterfacePort=Z8t=xt.findWebInterface=xt.fixBlockletStatus=Y8t=xt.getAppDescription=J8t=xt.getDisplayName=K8t=xt.getAppName=G8t=xt.hasRunnableComponent=xt.wipeSensitiveData=j8t=xt.isEnvShareable=xt.isEnvShareableToClient=z8t=xt.getComponentMissingConfigs=V8t=xt.getAppMissingConfigs=q8t=xt.getSharedConfigObj=W8t=xt.isDeletableBlocklet=xt.forEachComponentV2Sync=xt.forEachComponentV2=U8t=xt.forEachChildSync=xt.forEachChild=Nf=xt.forEachBlockletSync=xt.forEachBlocklet=xt.isFreeComponent=H8t=xt.isFreeBlocklet=xt.getAppUrl=void 0;xt.hasResourceType=$8t=xt.hasStartEngine=void 0;const _f=D0(E6),N8t=D0(gue),sG=D0(vie),yue=D0(P8t),B8t=D0(gn),Jn=ui,TI=D0(wI);var $8t=xt.hasStartEngine=TI.default;const{NODE_SERVICES:l4,SLOT_FOR_IP_DNS_SITE:F8t,WHO_CAN_ACCESS:u4,WHO_CAN_ACCESS_PREFIX_ROLES:lG}=B8t.default,vy=(e,t=[])=>`${t.map(n=>n&&n.meta?n.meta.did:"").join("/")}${t.length?"/":""}${e&&e.meta?e.meta.did:""}`;xt.getComponentId=vy;const vue=(e,t=[])=>`${t.map(n=>n&&n.meta?n.meta.name:"").join("/")}${t.length?"/":""}${e&&e.meta?e.meta.name:""}`;xt.getComponentName=vue;const bue=e=>`${e.meta.bundleName}@${e.meta.version}`;xt.getComponentBundleId=bue;const wue=e=>{if(!e)return"";const t=e.split("/");return t.pop(),!t.length||(t[t.length-1].startsWith("@")&&t.pop(),!t.length)?"":t.join("/")};xt.getParentComponentName=wue;const uc=(e,t,{parallel:n=!1,concurrencyLimit:r=5,sync:i,params:o,_parent:a,_root:s,_level:l=0,_tasks:c,_ancestors:u=[],_limit:d}={})=>{const p=s||a||e,g=vy(e,u),v=u.concat(e);if(i){const x=t(e,{parent:a,root:p,level:l,params:o,ancestors:u,id:g});if(e.children)for(const D of e.children)uc(D,t,{sync:i,params:x,_parent:e,_root:p,_level:l+1,_ancestors:v});return null}if(!n)return new Promise(async(x,D)=>{try{const L=await t(e,{parent:a,root:p,level:l,ancestors:u,params:o,id:g});if(e.children)for(const P of e.children)await uc(P,t,{params:L,_parent:e,_root:p,_level:l+1,_ancestors:v});x(null)}catch(L){D(L)}});const b=d||(0,yue.default)(r),E=c||[];if(E.push(b(()=>t(e,{parent:a,root:p,level:l,ancestors:u,id:g}))),e.children)for(const x of e.children)uc(x,t,{parallel:n,_parent:e,_root:p,_level:l+1,_tasks:E,_ancestors:v,_limit:b});return c?null:Promise.all(E)};xt.forEachBlocklet=uc;const Mh=(e,t)=>uc(e,t,{sync:!0});var Nf=xt.forEachBlockletSync=Mh;const xI=(e,t,{parallel:n=!1,concurrencyLimit:r=5,sync:i}={})=>{if(i){if(e.children)for(const s of e.children)t(s);return null}if(!n)return new Promise(async(s,l)=>{try{if(e.children)for(const c of e.children)await t(c);s(null)}catch(c){l(c)}});const o=(0,yue.default)(r),a=[];if(e.children)for(const s of e.children)a.push(o(()=>t(s)));return Promise.all(a)};xt.forEachComponentV2=xI;const SI=(e,t)=>xI(e,t,{sync:!0});xt.forEachComponentV2Sync=SI;const _I=(e,t,n)=>uc(e,(r,i)=>i.level===0?{}:t(r,i),n);xt.forEachChild=_I;const CI=(e,t)=>_I(e,t,{sync:!0});var U8t=xt.forEachChildSync=CI;const vw=(e,t,{_ancestors:n=[],returnAncestors:r=!1}={})=>{if(!t)return null;if(t(e,{ancestors:n}))return r?{component:e,ancestors:n}:e;for(const i of e.children||[]){const o=n.concat(e),a=vw(i,t,{_ancestors:o,returnAncestors:r});if(a)return a}return null};xt.findComponent=vw;const Tue=(e,t,{returnAncestors:n=!1}={})=>(Array.isArray(t)&&(t=t.join("/")),vw(e,(r,{ancestors:i})=>{const o=vy(r,i);return t===o},{returnAncestors:n}));xt.findComponentById=Tue;const EI=(e,t)=>{if(!t)return null;for(const n of e.children||[])if(t(n,e))return n;return null};xt.findComponentV2=EI;const xue=(e,t)=>t?(Array.isArray(t)&&(t=t.join("/")),EI(e,(n,r)=>{if(t.includes("/")){const i=vy(n,[r]);return t===i}return t===n.meta.did})):null;xt.findComponentByIdV2=xue;const Sue=(e,t)=>{if(!t)return[];const n=[];for(const r of e.children||[])t(r,e)&&n.push(r);return n};xt.filterComponentsV2=Sue;const _ue=e=>!!e&&!!(e.key||e.name)&&!e.secure&&e.shared!==!1&&!Jn.BLOCKLET_CONFIGURABLE_KEY[e.key||e.name];xt.isEnvShareableToClient=_ue;const c4=e=>!!e&&!!(e.key||e.name)&&!e.secure&&!!e.shared&&!Jn.BLOCKLET_CONFIGURABLE_KEY[e.key||e.name];var j8t=xt.isEnvShareable=c4;const bw=(e,t)=>{const n={};return!e||!t||(Array.isArray(e.configs)&&e.configs.forEach(({key:r,value:i,secure:o})=>{if(!c4({key:r,secure:o,shared:!0}))return;const a=(e.configObj||{})[r]||i,s=(t.configs||[]).find(l=>l.key===r);(!s||c4(s)||!s.value&&!(t.configObj||{})[s.key])&&(n[r]=a)}),(e.configs||[]).forEach(({key:r,value:i})=>{[Jn.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_CHAIN_HOST,Jn.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_CHAIN_ID,Jn.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_CHAIN_TYPE].includes(r)&&(n[Jn.CHAIN_PROP_MAP[r]]=i)})),n};var q8t=xt.getSharedConfigObj=bw;const ww=e=>e.key.startsWith(Jn.BLOCKLET_PREFERENCE_PREFIX)===!0;xt.isPreferenceKey=ww;const Cue=(e,t)=>!!(e.required&&(!e.value&&!t[e.key]||Object.values(Jn.CHAIN_PROP_MAP).includes(e.key)&&Object.keys(t).includes(e.key)&&!t[e.key])),Eue=(e={})=>{const t=[];return SI(e,n=>{var o;if(((o=n.meta)==null?void 0:o.group)===Jn.BlockletGroup.gateway)return;const r=n.configs||[],i=bw(e,n);r.forEach(a=>{Cue(a,i)&&t.push({did:n.meta.did,key:a.key,description:a.description})})}),t.filter(n=>!ww(n))};var V8t=xt.getAppMissingConfigs=Eue;const Aue=(e={},t={})=>{const n=[],r=e.configs||[],i=bw(t,e);return r.forEach(o=>{Cue(o,i)&&n.push({did:e.meta.did,key:o.key,description:o.description})}),n};var z8t=xt.getComponentMissingConfigs=Aue;const Rue=e=>e.payment?(e.payment.price||[]).map(n=>n.value||0).every(n=>n===0):!0;var H8t=xt.isFreeBlocklet=Rue;const kue=e=>!e.payment||!e.payment.componentPrice?!0:!e.payment.componentPrice.length;xt.isFreeComponent=kue;const Due=e=>e&&(uc(e,t=>{t.configs&&(t.configs=t.configs.filter(n=>!ww(n)),t.configs.forEach(n=>{n.secure&&(n.value=n.value?"__encrypted__":"")})),(t.environments||[]).forEach(n=>{["BLOCKLET_APP_SK","BLOCKLET_APP_PSK"].includes(n.key)&&(n.value="__encrypted__")}),(t.migratedFrom||[]).forEach(n=>{n.appSk="__encrypted__"}),delete e.configObj,delete e.environmentObj},{sync:!0}),e);xt.wipeSensitiveData=Due;const Oue=e=>{if(!e)return!1;const t=e.environments.find(n=>n.key==="BLOCKLET_DELETABLE");return t?t.value==="yes":!0};var W8t=xt.isDeletableBlocklet=Oue;const Lue=e=>(e==null?void 0:e.group)===Jn.BlockletGroup.gateway;xt.isGatewayBlocklet=Lue;const Iue=e=>(e==null?void 0:e.group)===Jn.BlockletGroup.pack;xt.isPackBlocklet=Iue;const Pue=e=>{let t=!1;return Mh(e,n=>{n.meta.group!==Jn.BlockletGroup.gateway&&(t=!0)}),t};var G8t=xt.hasRunnableComponent=Pue;const f4=(e,t=!1)=>{if(!e)return"";const{meta:n}=e;let r;if(!t&&e.environments){const i=e.environments.find(o=>o.key==="BLOCKLET_APP_NAME");i&&i.value&&(r=i.value)}return r||n.title||n.name};var K8t=xt.getAppName=f4,J8t=xt.getDisplayName=f4;const Mue=(e,t=!1)=>{if(!e)return"";const{meta:n}=e;let r;if(!t&&e.environments){const i=e.environments.find(o=>o.key==="BLOCKLET_APP_DESCRIPTION");i&&i.value&&(r=i.value)}return r||n.description||n.name};var Y8t=xt.getAppDescription=Mue;function Nue(e){var r,i,o;const t=(o=(i=(r=e==null?void 0:e.site)==null?void 0:r.domainAliases)==null?void 0:i.sort((a,s)=>{var l,c,u,d;return(l=a.accessibility)!=null&&l.accessible&&((c=s.accessibility)!=null&&c.accessible)?+a.isProtected-+s.isProtected:+((u=s.accessibility)==null?void 0:u.accessible)-+((d=a.accessibility)==null?void 0:d.accessible)}))==null?void 0:o.map(a=>{var c;const s=(c=a==null?void 0:a.domainStatus)!=null&&c.isHttps?"https://":"http://",l=a==null?void 0:a.value;return`${s}${l}`}).filter(Boolean);return t==null?void 0:t[0]}xt.getAppUrl=Nue;const Bue=e=>{e&&(Mh(e,t=>{t.status=(0,Jn.fromBlockletStatus)(t.status),t.source!==void 0&&(t.source=(0,Jn.fromBlockletSource)(t.source))}),e.settings&&(e.settings.children||[]).forEach(t=>{Mh(t,n=>{n.status=(0,Jn.fromBlockletStatus)(n.status),n.source!==void 0&&(n.source=(0,Jn.fromBlockletSource)(n.source))})}))};xt.fixBlockletStatus=Bue;const Tw=e=>{if(!e)return null;const t=e.meta||e||{},{interfaces:n=[]}=t;return Array.isArray(n)?n.find(r=>r.type===Jn.BLOCKLET_INTERFACE_TYPE_WEB):null};var Z8t=xt.findWebInterface=Tw;const $ue=e=>{if(!e)return null;const t=Tw(e),{ports:n}=e;return!t||!n?null:n[t.port]};xt.findWebInterfacePort=$ue;const xw=(e,t)=>{const n=[t];t===l4.AUTH&&n.push(l4.AUTH_SERVICE);const r=Tw(e);return r?(r.services||[]).find(i=>n.includes(i.name)):null};var X8t=xt.findServiceFromMeta=xw;const Fue=e=>{if(!e)return u4.ALL;if((0,_f.default)(e,"settings.whoCanAccess"))return e.settings.whoCanAccess;const t=xw(e.meta,l4.AUTH);return(0,_f.default)(t,"config.whoCanAccess")?t.config.whoCanAccess:u4.ALL};var Q8t=xt.getWhoCanAccess=Fue;const Uue=(e,t)=>{const n=(e.configs||[]).find(i=>i.key===Jn.BLOCKLET_CONFIGURABLE_KEY.COMPONENT_ACCESS_WHO);if(n)return n.value;if(t&&(0,_f.default)(t,"settings.whoCanAccess")&&(0,_f.default)(t,"settings.whoCanAccess")!==u4.ALL)return(0,_f.default)(t,"settings.whoCanAccess");const r=xw(e.meta,l4.AUTH);return(0,_f.default)(r,"config.whoCanAccess")?r.config.whoCanAccess:u4.ALL};xt.getComponentWhoCanAccess=Uue;const jue=({request:e,baseUrl:t})=>{const n=e.headers["x-blocklet-did"]||"",r=e.headers["x-blocklet-real-did"]||"",i=e.headers["x-path-prefix"]||"/",o=e.headers["x-group-path-prefix"]||"/";let a=t;return n!==r&&i!==o&&(a=(0,sG.default)((0,sG.default)(a,"/").replace(i,o),"")),a};xt.getConnectAppUrl=jue;const que=(e,t)=>{const n=(t||"").includes(":")?":":/\./;return(e||"").replace(F8t,(t||"").replace(new RegExp(n,"g"),"-"))};var Vue=xt.replaceSlotToIp=que;const b1=e=>{const t=Object.entries(Jn.CHAIN_INFO_CONFIG).reduce((n,r)=>{const[i,[o,a]]=r;return n[o]=(0,_f.default)(e,i)||a,n},{});return t.type==="ethereum"&&t.id==="none"&&(t.id="1"),t};xt.getChainInfo=b1;const zue=e=>{const t=b1({});if(!e)return t;const n=b1(e.configObj);if(n.host!=="none")return n;let r;return CI(e,i=>{if(r&&r.host!=="none")return;const o=b1(i.configObj);o.host!=="none"&&(r=o)}),r||t};xt.getBlockletChainInfo=zue;const Hue=e=>!!(e!=null&&e.controller);var kb=xt.isExternalBlocklet=Hue;const Wue=e=>e.whoCanAccess.startsWith(lG)?e.whoCanAccess.substring(lG.length).split(","):[];var eCt=xt.getRolesFromAuthConfig=Wue;const tCt=e=>{const t=Array.isArray(e.migratedFrom)?e.migratedFrom.map(n=>n.appDid):[];return(0,N8t.default)([e.appDid,e.appPid,...t].filter(Boolean))};var nCt=xt.getBlockletAppIdList=tCt;const Gue=e=>{const t=[];return e&&Mh(e,n=>{var i;(((i=n.meta)==null?void 0:i.interfaces)||[]).filter(o=>o.type===Jn.BLOCKLET_INTERFACE_TYPE_SERVICE).forEach(o=>{const a=o.port||{};t.push({name:o.name,protocol:o.protocol,port:Number(a.external),upstreamPort:Number((n.ports||{})[a.internal])})})}),t};var rCt=xt.getBlockletServices=Gue;const Kue=e=>[Jn.BlockletStatus.downloading,Jn.BlockletStatus.waiting,Jn.BlockletStatus.starting,Jn.BlockletStatus.installing,Jn.BlockletStatus.stopping,Jn.BlockletStatus.upgrading,"downloading","waiting","starting","installing","extracting","stopping","upgrading","restarting","deleting"].includes(e);var iCt=xt.isInProgress=Kue;const Jue=e=>[Jn.BlockletStatus.added,Jn.BlockletStatus.waiting,Jn.BlockletStatus.downloading,Jn.BlockletStatus.installing,"added","waiting","downloading","installing"].includes(e);xt.isBeforeInstalled=Jue;const Yue=e=>[Jn.BlockletStatus.running,"running"].includes(e);xt.isRunning=Yue;const Zue=e=>[Jn.BlockletStatus.running,Jn.BlockletStatus.waiting,Jn.BlockletStatus.downloading,"running","waiting","downloading"].includes(e);var oCt=xt.isAccessible=Zue;const Xue=(e,{type:t,did:n}={type:"",did:""})=>{var r,i,o;return e?!(0,TI.default)(e.meta)&&((o=(i=(r=e.meta)==null?void 0:r.resource)==null?void 0:i.bundles)==null?void 0:o.length)>0&&(e.meta.resource.bundles||[]).some(a=>a.type===t&&a.did===n):!1};xt.hasResourceType=Xue;xt.default={isFreeBlocklet:Rue,isFreeComponent:kue,forEachBlocklet:uc,forEachBlockletSync:Mh,forEachChild:_I,forEachChildSync:CI,forEachComponentV2:xI,forEachComponentV2Sync:SI,isDeletableBlocklet:Oue,getSharedConfigObj:bw,getAppMissingConfigs:Eue,getComponentMissingConfigs:Aue,isEnvShareableToClient:_ue,isEnvShareable:c4,wipeSensitiveData:Due,hasRunnableComponent:Pue,getAppName:f4,getAppDescription:Mue,getAppUrl:Nue,getDisplayName:f4,fixBlockletStatus:Bue,findWebInterface:Tw,findWebInterfacePort:$ue,findServiceFromMeta:xw,getWhoCanAccess:Fue,getComponentWhoCanAccess:Uue,replaceSlotToIp:que,getComponentId:vy,getComponentName:vue,getComponentBundleId:bue,findComponent:vw,findComponentById:Tue,findComponentV2:EI,findComponentByIdV2:xue,filterComponentsV2:Sue,getParentComponentName:wue,getConnectAppUrl:jue,getChainInfo:b1,getBlockletChainInfo:zue,isExternalBlocklet:Hue,isPreferenceKey:ww,getRolesFromAuthConfig:Wue,getBlockletServices:Gue,isInProgress:Kue,isBeforeInstalled:Jue,isRunning:Yue,isAccessible:Zue,isGatewayBlocklet:Lue,isPackBlocklet:Iue,hasStartEngine:TI.default,hasResourceType:Xue};const Que=(e,t=!1)=>{const n=e.routing.adminPath;return t?encodeURIComponent(Ln(window.location.origin,n)):Ln(window.location.origin,n)},OAt=(e,t,n)=>{const r=Que(t),i=Ln(n,`/api/blocklets/${e.did}/blocklet.json`),o=new URL(Ln(r,"/launch-blocklet/agreement"));return o.searchParams.set("blocklet_meta_url",i),o.searchParams.set("from",window.location.href),o.href},aCt=async(e,{getIP:t}={})=>{if(!e||!e.length)return[];if(!t||!e.some(r=>r.value.includes(gn.SLOT_FOR_IP_DNS_SITE)))return e;const n=await t();return n?e.map(r=>{try{return r.value=Vue(r.value,n),r}catch{return r}}).filter(Boolean):e},sCt=e=>{const t={didSpace:null};return Nf(e,n=>{var r,i;t.didSpace===ui.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED||t.didSpace===ui.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED_ON_SETUP||(i=(r=n==null?void 0:n.meta)==null?void 0:r.capabilities)!=null&&i.didSpace&&(t.didSpace=n.meta.capabilities.didSpace)}),t},uG=async(e,{fixRuntime:t=!0,oldBlocklet:n,getIP:r}={})=>{if(e.site||(e.site={domainAliases:[],rules:[]}),e.site.rules.forEach(i=>{i.from.pathPrefix=aO(i.from.pathPrefix||"/")}),e.site.rules=Nie(e.site.rules,i=>i.from.pathPrefix),t===!0)e.site.domainAliases=await aCt(e.site.domainAliases,{getIP:r}),e.appRuntimeInfo&&(e.appRuntimeInfo.startAt=new Date-e.appRuntimeInfo.uptime),Nf(e,i=>{i.runtimeInfo&&(i.runtimeInfo.startAt=new Date-i.runtimeInfo.uptime)});else if(t==="merge-old"&&n){e.site.domainAliases=n.site.domainAliases,e.appRuntimeInfo=n.appRuntimeInfo;const i={};Nf(n,(o,{id:a})=>{i[a]=o}),Nf(e,(o,{id:a})=>{const s=i[a];s&&(o.runtimeInfo=s.runtimeInfo,o.diskInfo=s.diskInfo,o.engine=s.engine)})}else e.site.domainAliases=[];e.capabilities=sCt(e)},cG="arcblock",LAt=(e,t=!1)=>{let n;return t?(n=(e.configs||[]).find(r=>r.key==="BLOCKLET_APP_CHAIN_TYPE"),n&&n.value||(n=(e.environments||[]).find(r=>["CHAIN_TYPE","BLOCKLET_APP_CHAIN_TYPE"].includes(r.key)),n&&n.value)?n.value:cG):(n=(e.environments||[]).find(r=>["CHAIN_TYPE","BLOCKLET_APP_CHAIN_TYPE"].includes(r.name)),n&&n.default?n.default:cG)},IAt=e=>!zk(e==null?void 0:e.controller);let Q8=null;const lCt=async()=>{const e=window.env.apiPrefix||"/",t=Ln(e,"/api/dns-resolve?accessible=1");try{return(await ND.get(t)).data.address}catch{return null}},fG=()=>(Q8||(Q8=lCt()),Q8),ece=F.createContext({}),{Provider:uCt,Consumer:PAt}=ece,dG=(e,t,n)=>n?e.map(r=>{const i={...r},o=t.find(a=>a.meta.did===r.meta.did);return o&&n.forEach(a=>{i[a]=o[a]}),i}):t;function cCt({children:e}){const t=_l(),n=iw(),[r,i]=F.useState(null),[o,a]=F.useState(!1),[s,l]=F.useState([]),[c,u]=F.useState([]),[d,p]=F.useState(!1),g=(P,q)=>{kb(P)?u(q):l(q)},v=4,b=async({silent:P=!0,retries:q=v,updates:M,useCache:j=!0}={})=>{P||a(!0);try{i(null);const{blocklets:K}=await n.getBlocklets({input:{useCache:j}});for(const G of K)await uG(G,{getIP:fG});const ne=K.filter(G=>!kb(G)),le=K.filter(kb);l(G=>dG(G,ne,M)),u(G=>dG(G,le,M)),a(!1),p(!0)}catch(K){q>0?setTimeout(()=>b({silent:P,retries:q-1,useCache:j}),1e3):(a(!1),i(K))}},E=async P=>{try{const{blocklet:q}=await t.api.getBlocklet({input:{did:P.meta.did,attachRuntimeInfo:!0}});await uG(q,{getIP:fG}),g(q,M=>M.some(j=>j.meta.did===q.meta.did)?M.map(j=>j.meta.did===q.meta.did?q:j):[...M,q])}catch(q){i(q)}},x=P=>{t.refresh(),E(P)};F.useEffect(()=>{b({silent:!1})},[]);const D=P=>{const q={};Nf(P,(M,{id:j})=>{q[j]=ui.fromBlockletStatus(M.status)}),g(P,M=>M.map(j=>(j.meta.did===P.meta.did&&Nf(j,(K,{id:ne})=>{q[ne]&&(K.status=q[ne])}),j)))};Yi(ui.BlockletEvents.added,P=>{P.status=ui.fromBlockletStatus(P.status),g(P,q=>[...q,P])}),Yi(ui.BlockletEvents.removed,P=>{t.refresh(),g(P,q=>q.filter(M=>M.meta.did!==P.meta.did))}),Yi(ui.BlockletEvents.statusChange,D),Yi(ui.BlockletEvents.installed,x),Yi(ui.BlockletEvents.upgraded,x),Yi(ui.BlockletEvents.updated,E),Yi(ui.BlockletEvents.startFailed,E),Yi(ui.BlockletEvents.reloaded,E);const L={loading:o,error:r,data:s,externalData:c,refresh:b,initialized:d,api:n};return I.jsx(uCt,{value:{blocklets:L},children:e})}function MAt(){const{blocklets:e}=F.useContext(ece);return e}const fCt=({user:e,launchType:t,nftId:n})=>{var r;if(!e)return!1;if(t==="serverless"){if(!n)throw new Error("nftId is required");return((r=e==null?void 0:e.controller)==null?void 0:r.nftId)===n}return(e.permissions||[]).includes("mutate_blocklets")},NAt=e=>{var t,n;return e.isGetBlocklet&&((n=(t=e.runtimeBlocklet)==null?void 0:t.controller)==null?void 0:n.consumedAt)},BAt=async e=>{const t=Ndt({blocklet:e});let n="";return n=t.find(r=>{try{const{hostname:i}=new URL(r);return tae.isSlpDomain(i)}catch(i){return console.error(i),!1}}),n||(n=await Udt(t)),n},tce=F.createContext({}),{Provider:dCt,Consumer:$At}=tce;function pCt({children:e}){const{session:t}=E0(),{t:n}=ho(),{api:r,info:i}=_l(),[o]=bY(),a=iw(),s=o.get("launchType"),l=o.get("fromLauncher"),c=o.get("blocklet_meta_url")||"",u=o.get("nftId")||"",d=o.get("launcherSessionId")||"",p=o.get("launcherUrl")||"",g=new URL(c).origin,[v,b]=F.useState({meta:null,appDid:o.get("appDid")||null,sessionId:o.get("sessionId")||null,isFree:!0,isExternal:!1,isInstalling:!1,isInstalled:!1,isRunning:!1,launcherSession:null}),E=(le,G)=>b(N=>({...N,appDid:le,sessionId:G})),x=fCt({user:t.user,launchType:s,nftId:u}),[D,L]=F.useState(null),[P,q]=F.useState(!0),M=F.useMemo(()=>i?Que(i):"",[i]),j=async le=>{if(!le)throw new Error("appDid should not be empty");const{blocklet:G}=await r.getBlocklet({input:{did:le,attachConfig:!1}});if(!G)return null;const N=ui.BlockletStatus[G.status],T=!!u,f=N<ui.BlockletStatus.installed,h=N===ui.BlockletStatus.installed,w=N===ui.BlockletStatus.running;return b(C=>({...C,isInstalled:h,isRunning:w,isExternal:T,isInstalling:f})),{isInstalled:h,isRunning:w,isExternal:T,isInstalling:f}},K=async()=>{q(!0);try{if(!c)throw new Error(n("common.invalidParam"));const[{meta:le,isFree:G},{launcherSession:N,error:T}]=await Promise.all([r.getBlockletMetaFromUrl({input:{url:c,checkPrice:!0}}),d?r.getLauncherSession({input:{launcherSessionId:d,launcherUrl:p}}):Promise.resolve({})]);if(d&&!N)throw new Error(`Launch session invalid: ${T}`);if(!le)throw new Error(n("LaunchBlockletBlocklet.error.loadMetaFailed"));let f={};x&&v.appDid&&(f=await j(v.appDid)),b(h=>({...h,...f,meta:le,isFree:G,launcherSession:N}))}catch(le){console.error(le),L(le.message)}finally{q(!1)}};F.useEffect(()=>{var le,G,N;((le=t==null?void 0:t.user)==null?void 0:le.role)===gn.SERVER_ROLES.EXTERNAL_BLOCKLET_CONTROLLER&&((N=(G=t==null?void 0:t.user)==null?void 0:G.controller)==null?void 0:N.nftId)!==u&&t.logout(),K()},[]),F.useEffect(()=>{P||!v.meta||(x?v.appDid&&j(v.appDid).catch(le=>{fi.error(le.message)}):(b(le=>({...le,isInstalled:!1,isRunning:!1,isExternal:!1})),L(null)))},[x]);const ne={meta:v.meta,isFree:v.isFree,appDid:v.appDid,sessionId:v.sessionId,isInstalling:v.isInstalling,isInstalled:v.isInstalled,isExternal:v.isExternal,isRunning:v.isRunning,serverUrl:M,storeUrl:g,blockletMetaUrl:c,fromLauncher:l,loading:P,error:D,api:a,getBlocklet:j,setAppDid:E,launcherUrl:p,launcherSession:v.launcherSession,launcherSessionId:d};return I.jsx(dCt,{value:ne,children:e})}function FAt(){return F.useContext(tce)}function nce(){return new URLSearchParams(yi().search)}const rce=F.createContext(),{Provider:hCt,Consumer:UAt}=rce;function ice({children:e}){const n=nce().get("blocklet_meta_url"),r=G_t(async()=>{const{data:o}=await oO.get(n);return o});if(r.loading)return I.jsx(ra,{children:I.jsx(sa,{})});const i={meta:r.value,error:r.error};return I.jsx(hCt,{value:i,children:e})}ice.propTypes={children:Y.any.isRequired};function jAt(){return F.useContext(rce)}const mCt=F.lazy(()=>mn(()=>import("./index-CLLusFhD.js"),__vite__mapDeps([0,1,2,3,4]),import.meta.url)),gCt=F.lazy(()=>mn(()=>import("./index-BmYduQjf.js"),__vite__mapDeps([5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,2,27,28,29,30]),import.meta.url)),yCt=F.lazy(()=>mn(()=>import("./index-DYIWxxvc.js"),__vite__mapDeps([31,32,33,34,35,36,6,37,38,39,40,41,12,9,11,25,18,17]),import.meta.url)),vCt=F.lazy(()=>mn(()=>import("./index-7VEn8pMG.js"),__vite__mapDeps([42,6,43,44,17,16,45,9,46,47,29,12,11,37,48,38,39,49,3,18,22,23,50,51,52]),import.meta.url)),bCt=F.lazy(()=>mn(()=>import("./index-CivlhCtE.js"),__vite__mapDeps([53,54,10,51,55,56,45,12,9,11,7,8,13,14,15,16,17,18,57,49,3,2,58,6,59,60,29,19,20,61,62,63,64,65,4,66]),import.meta.url)),wCt=F.lazy(()=>mn(()=>import("./index-D1IHJL8V.js"),__vite__mapDeps([67,68,22,23,9,69]),import.meta.url)),TCt=F.lazy(()=>mn(()=>import("./index-DyLmBsrc.js"),__vite__mapDeps([70,54,10,71,72,73,17,6,9,11,74,13,75,76,29,77,78,79,16,12,7,8,14,15,18,80,81,82,45,20,83,3,2,84,85,30,22,23,86,87,88,24,25,44,46,89,1,49,64]),import.meta.url)),xCt=F.lazy(()=>mn(()=>import("./detail-TSZFt17G.js").then(e=>e.d),__vite__mapDeps([90,54,10,19,20,21,6,18,22,23,28,83,40,41,52]),import.meta.url)),SCt=F.lazy(()=>mn(()=>import("./index-Z23xnW60.js"),[],import.meta.url)),_Ct=F.lazy(()=>mn(()=>import("./index-CwvvU6sG.js"),__vite__mapDeps([91,1,74,13]),import.meta.url)),CCt=F.lazy(()=>mn(()=>import("./index-tCtD2xpl.js"),__vite__mapDeps([92,93,94,95,62,96]),import.meta.url)),ECt=F.lazy(()=>mn(()=>import("./index-D2aPyZEh.js"),__vite__mapDeps([97,62,78,48,96,27]),import.meta.url)),ACt=F.lazy(()=>mn(()=>import("./index-ByTAZBnH.js"),__vite__mapDeps([98,96]),import.meta.url)),RCt=F.lazy(()=>mn(()=>import("./index-Bq3EqJlL.js"),__vite__mapDeps([99,32,33,34,35,36,100,72,73,41,25,6,58]),import.meta.url)),kCt=F.lazy(()=>mn(()=>import("./index-udgf9h3j.js"),__vite__mapDeps([101,94]),import.meta.url)),DCt=F.lazy(()=>mn(()=>import("./index-CJjmaZOb.js"),__vite__mapDeps([102,93,94,95,62,96]),import.meta.url)),OCt=F.lazy(()=>mn(()=>import("./index-CV5o0SmN.js").then(e=>e.a2),__vite__mapDeps([103,104]),import.meta.url)),LCt=F.lazy(()=>mn(()=>import("./index-BkfzVG1e.js"),__vite__mapDeps([105,54,10,106,107,108,63,9,109,12,11,46,7,8,13,14,15,16,17,18,28,110,111,4,6,89,23]),import.meta.url));function oce(){const e=_l(),{session:t}=E0(),{wallet:n}=e0(),r=t.user&&t.user.did;return F.useEffect(()=>{const i=fw();return r?i.connect():i.isConnected()&&i.disconnect(),()=>{i.isConnected()&&i.disconnect()}},[r]),F.useEffect(()=>{if(n)return()=>{};const i=()=>{document.visibilityState==="visible"&&t.refresh()};return document.addEventListener("visibilitychange",i),()=>{document.removeEventListener("visibilitychange",i)}},[]),{node:e,session:t}}function ICt(){var a;const{t:e}=ho(),{node:t,session:n}=oce(),r=yi();F.useEffect(()=>{window.tracker&&typeof window.tracker.pageView=="function"&&window.tracker.pageView(`${r.pathname}${r.search}`)},[r]),F.useEffect(()=>{var s;((s=n==null?void 0:n.user)==null?void 0:s.role)===gn.SERVER_ROLES.EXTERNAL_BLOCKLET_CONTROLLER&&n.logout()},[(a=n==null?void 0:n.user)==null?void 0:a.role]);const i=I.jsx(sa,{});if(t.loading||n.loading)return I.jsx(ra,{children:i});if(!t.info.initialized)return A8e.getServerAuthMethod(t.info)==="nft"?I.jsx(uL,{action:"verify-owner"}):I.jsx(ra,{children:I.jsx(F5t,{})});if(t.info.upgradeSessionId)return I.jsx(ra,{children:I.jsx(cle,{})});if(!n.user)return I.jsx(fL,{loadingEle:i});const o=I.jsx(ra,{children:I.jsx(sa,{})});return I.jsx(S8t,{children:I.jsxs(cCt,{children:[I.jsx(K5t,{}),I.jsx(nxt,{}),I.jsx(E8t,{}),I.jsx(F.Suspense,{fallback:o,children:I.jsxs(I4,{children:[I.jsx(sr,{path:"/dashboard",element:I.jsx(Xo,{fullWidth:!0,title:"Dashboard",children:I.jsx(mCt,{})})}),I.jsx(sr,{path:"/blocklets",element:I.jsx(Xo,{fullWidth:!0,title:e("common.blocklets"),children:I.jsx(gCt,{})})}),I.jsx(sr,{path:"/blocklets/:did/:tab",element:I.jsx(Xo,{fullWidth:!0,title:"Blocklets",children:I.jsx(xCt,{})})}),I.jsx(sr,{path:"/settings/:tab",element:I.jsx(Xo,{fullWidth:!0,title:e("common.setting"),children:I.jsx(bCt,{})})}),I.jsx(sr,{path:"/eula",element:I.jsx(Xo,{fullWidth:!0,title:e("setup.steps.eula"),children:I.jsx(SCt,{})})}),I.jsx(sr,{path:"/store",element:I.jsx(Xo,{fullWidth:!0,title:e("common.store"),children:I.jsx(vCt,{})})}),I.jsx(sr,{path:"/console",element:I.jsx(Xo,{title:`GraphQL ${e("common.console")}`,scrollable:!1,fullWidth:!0,children:I.jsx(OCt,{})})}),I.jsx(sr,{path:"/notifications",element:I.jsx(Xo,{children:I.jsx(_Ct,{})})}),I.jsx(sr,{path:"/team/:tab",element:I.jsx(Xo,{fullWidth:!0,title:e("common.team"),children:I.jsx(TCt,{})})}),I.jsx(sr,{path:"/logs/:name",element:I.jsx(Xo,{scrollable:!1,fullWidth:!0,title:e("common.logs"),children:I.jsx(wCt,{})})}),I.jsx(sr,{path:"/analytics/:tab",element:I.jsx(Xo,{fullWidth:!0,title:e("common.analytics"),children:I.jsx(LCt,{})})}),I.jsx(sr,{path:"/",element:I.jsx(Gs,{to:"/dashboard",replace:!0})}),I.jsx(sr,{path:"/team",element:I.jsx(Gs,{to:"/team/members",replace:!0})}),I.jsx(sr,{path:"/analytics",element:I.jsx(Gs,{to:"/analytics/traffic",replace:!0})}),I.jsx(sr,{path:"/logs",element:I.jsx(Gs,{to:"/logs/abtnode",replace:!0})}),I.jsx(sr,{path:"/router",element:I.jsx(Gs,{to:"/router/rules",replace:!0})}),I.jsx(sr,{path:"/settings",element:I.jsx(Gs,{to:"/settings/basic",replace:!0})}),I.jsx(sr,{path:"/marketplace",element:I.jsx(Gs,{to:"/store",replace:!0})}),I.jsx(sr,{path:"/marketplace/:did",element:I.jsx(Gs,{to:"/store/:did",replace:!0})}),I.jsx(sr,{path:"*",element:I.jsx(kCt,{})})]})})]})})}function Qc({children:e}){const{node:t,session:n}=oce();return t.loading||!n.initialized&&n.loading?I.jsx(ra,{children:I.jsx(sa,{})}):t.info.upgradeSessionId?I.jsx(ra,{children:I.jsx(cle,{})}):e}function PCt(){const{changeLocale:e}=ho(),t=nce();F.useEffect(()=>{const r=t.get("locale");r&&["zh","en"].includes(r)&&e(r)},[]);const n=I.jsx(ra,{children:I.jsx(sa,{})});return I.jsx(F.Suspense,{fallback:n,children:I.jsxs(I4,{children:[I.jsx(sr,{path:`${gn.WELLKNOWN_SERVICE_PATH_PREFIX}/issue-passport`,element:I.jsx(Qc,{children:I.jsx(CCt,{})})}),I.jsx(sr,{path:`${gn.WELLKNOWN_SERVICE_PATH_PREFIX}/lost-passport`,element:I.jsx(Qc,{children:I.jsx(ECt,{})})}),I.jsx(sr,{path:`${gn.WELLKNOWN_SERVICE_PATH_PREFIX}/exchange-passport`,element:I.jsx(Qc,{children:I.jsx(ACt,{})})}),I.jsx(sr,{path:"/accept-server",element:I.jsx(Qc,{children:I.jsx(uL,{action:"accept-server"})})}),I.jsx(sr,{path:"/launch-blocklet/*",element:I.jsx(Qc,{children:I.jsx(pCt,{children:I.jsx(RCt,{})})})}),I.jsx(sr,{path:"/blocklets/restore/*",element:I.jsx(Qc,{children:I.jsx(ice,{children:I.jsx(yCt,{})})})}),I.jsx(sr,{path:`${gn.WELLKNOWN_SERVICE_PATH_PREFIX}/invite`,element:I.jsx(Qc,{children:I.jsx(DCt,{})})}),I.jsx(sr,{path:"/*",element:I.jsx(ICt,{})})]})})}function MCt(){const e=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";return I.jsxs(I.Fragment,{children:[I.jsx(Y7,{}),I.jsx(mY,{history:aCe,basename:e,children:I.jsx(pxt,{children:I.jsx(PCt,{})})})]})}const NCt=kJ(document.getElementById("root"));NCt.render(I.jsx(MCt,{}));const pG=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";Rye(`${pG}/service-worker.js`.replace(/\/+/g,"/"),{registrationOptions:{scope:pG},registered(){console.info("Service worker has been registered.")},ready(){console.info("Service worker is active.")},cached(){console.info("Content has been cached for offline use.")},updatefound(){console.info("New content is downloading.")},updated(){console.info("New content is available; please refresh.")},offline(){console.info("No internet connection found. App is running in offline mode.")},error(e){console.error("Error during service worker registration:",e)}});export{HD as $,fi as A,Ds as B,sa as C,d9 as D,bY as E,gn as F,Tx as G,Ms as H,NL as I,Fat as J,pft as K,pQ as L,J8t as M,V8t as N,fl as O,Y as P,ct as Q,zk as R,YD as S,iue as T,J1 as U,yw as V,vL as W,ra as X,kc as Y,I2e as Z,ylt as _,Yi as a,HEt as a$,Qp as a0,gO as a1,Ln as a2,ro as a3,E5 as a4,QTt as a5,yAt as a6,mOe as a7,Ok as a8,SOe as a9,iAt as aA,T5 as aB,Fle as aC,$dt as aD,NOe as aE,aCt as aF,aO as aG,Nie as aH,fG as aI,WEt as aJ,pae as aK,ma as aL,po as aM,aCe as aN,Mdt as aO,bk as aP,qEt as aQ,FDe as aR,nAt as aS,G_t as aT,oO as aU,zEt as aV,cAt as aW,Pdt as aX,lQ as aY,eQ as aZ,uLe as a_,gQ as aa,Que as ab,jAt as ac,A8e as ad,yL as ae,mO as af,BAt as ag,_Et as ah,NAt as ai,fw as aj,nce as ak,QEt as al,aI as am,sL as an,P7 as ao,I4 as ap,sr as aq,Gs as ar,pu as as,vl as at,gz as au,OAt as av,ND as aw,E0 as ax,H8t as ay,Mo as az,ui as b,dl as b$,Lk as b0,H7e as b1,rke as b2,Bdt as b3,uAt as b4,Jle as b5,DCe as b6,Lct as b7,j6 as b8,q6 as b9,Bre as bA,$re as bB,s9 as bC,g9 as bD,Iie as bE,Qg as bF,XXe as bG,gie as bH,l9 as bI,Ple as bJ,iCt as bK,W8t as bL,FEt as bM,G8t as bN,CAt as bO,IEt as bP,tAt as bQ,bEt as bR,pa as bS,kt as bT,bc as bU,me as bV,i4e as bW,Nt as bX,un as bY,an as bZ,pn as b_,_Q as ba,en as bb,Wr as bc,Ju as bd,vh as be,eAt as bf,N5 as bg,nY as bh,ea as bi,CQ as bj,ig as bk,mAt as bl,Yie as bm,LAt as bn,Nf as bo,jQ as bp,mn as bq,$Et as br,S7e as bs,rCt as bt,kb as bu,gY as bv,gAt as bw,a9 as bx,Zh as by,Vg as bz,iw as c,iEt as c$,Pt as c0,sn as c1,hu as c2,wke as c3,pt as c4,Wn as c5,nE as c6,K7 as c7,Fr as c8,G7 as c9,G5t as cA,dw as cB,FAt as cC,LGe as cD,fCt as cE,oAt as cF,Udt as cG,DAt as cH,XEt as cI,If as cJ,yi as cK,hi as cL,BD as cM,BEt as cN,PEt as cO,MEt as cP,Dle as cQ,uxt as cR,pk as cS,Ui as cT,QCt as cU,Dm as cV,e1 as cW,mct as cX,mt as cY,bre as cZ,$Ct as c_,tEt as ca,kEt as cb,Ndt as cc,tae as cd,Ole as ce,sAt as cf,D5 as cg,uG as ch,nCt as ci,O7e as cj,I7e as ck,qdt as cl,kOe as cm,a7e as cn,pue as co,_8t as cp,HIe as cq,_t as cr,tIe as cs,Pr as ct,Th as cu,ou as cv,gi as cw,e0 as cx,Bg as cy,Zu as cz,MAt as d,lZ as d$,Gne as d0,V5 as d1,r8t as d2,T3e as d3,pAt as d4,Qa as d5,W7 as d6,gc as d7,b6 as d8,qa as d9,pd as dA,ey as dB,RJe as dC,sX as dD,Kn as dE,eEt as dF,eh as dG,lX as dH,Qt as dI,wu as dJ,z9 as dK,jZe as dL,moe as dM,VEt as dN,JRe as dO,m3 as dP,n5e as dQ,hc as dR,Ro as dS,AZ as dT,A5e as dU,N6 as dV,os as dW,t0 as dX,F6 as dY,n0 as dZ,J7 as d_,Ai as da,Rt as db,ZX as dc,GRe as dd,Ua as de,EEt as df,AEt as dg,GD as dh,KDe as di,K1 as dj,v3 as dk,vQ as dl,YOe as dm,mF as dn,hF as dp,HOe as dq,fEt as dr,on as ds,jCt as dt,UCt as du,FCt as dv,qCt as dw,Fh as dx,qD as dy,O5 as dz,Y_t as e,xie as e$,F6e as e0,j6e as e1,J2e as e2,$Y as e3,Eg as e4,HCt as e5,GCt as e6,WCt as e7,zCt as e8,a4e as e9,Hc as eA,OCe as eB,sEt as eC,lEe as eD,uEe as eE,EEe as eF,lEt as eG,nr as eH,Op as eI,URe as eJ,Dv as eK,R7e as eL,bx as eM,_ke as eN,Lm as eO,UDe as eP,BOe as eQ,b3 as eR,cLe as eS,cm as eT,OLe as eU,Jl as eV,a3 as eW,o3 as eX,HLe as eY,FLe as eZ,pEt as e_,wg as ea,jh as eb,KB as ec,VCt as ed,Wf as ee,M4e as ef,M7 as eg,MZ as eh,ZCt as ei,KCt as ej,g6e as ek,mc as el,bZ as em,j4e as en,v6e as eo,YCt as ep,tE as eq,p6e as er,m6e as es,bl as et,y6e as eu,e4e as ev,g6 as ew,V5e as ex,JCt as ey,$5e as ez,Oc as f,lk as f$,Ls as f0,UE as f1,Z7 as f2,oZ as f3,fQ as f4,JGe as f5,qh as f6,CZ as f7,i6 as f8,Cg as f9,NEt as fA,mI as fB,UQ as fC,BCt as fD,yc as fE,qYe as fF,Dc as fG,GEt as fH,yd as fI,JEt as fJ,REt as fK,ZEt as fL,Zie as fM,Uoe as fN,C5t as fO,E9 as fP,Ase as fQ,dae as fR,E6 as fS,$2t as fT,Die as fU,s5e as fV,NZ as fW,X7 as fX,Gn as fY,M6 as fZ,cOe as f_,$7 as fa,T3 as fb,TF as fc,Jf as fd,di as fe,eat as ff,jo as fg,m0 as fh,tn as fi,$g as fj,THe as fk,KIe as fl,kJ as fm,o0 as fn,Qn as fo,nte as fp,Qee as fq,O6 as fr,mft as fs,dZ as ft,v6 as fu,g3 as fv,g7 as fw,$Q as fx,Eee as fy,q5t as fz,Wt as g,vEe as g$,w8e as g0,ZL as g1,rEt as g2,tI as g3,eI as g4,I5 as g5,TEt as g6,jL as g7,my as g8,WL as g9,L6 as gA,Nre as gB,rk as gC,S_e as gD,ik as gE,Mct as gF,ak as gG,LEt as gH,vie as gI,lft as gJ,WD as gK,IAt as gL,dAt as gM,oCt as gN,Q8t as gO,jEt as gP,KEt as gQ,YEt as gR,R5 as gS,X8t as gT,eCt as gU,Hre as gV,Wre as gW,zre as gX,iie as gY,kZ as gZ,l3 as g_,OHe as ga,i0 as gb,Kle as gc,C5 as gd,Eot as ge,Bot as gf,Cne as gg,Mk as gh,mit as gi,Wie as gj,ed as gk,A5 as gl,z1 as gm,B6 as gn,wx as go,$6 as gp,iAe as gq,nQ as gr,xCe as gs,PX as gt,v2e as gu,UEt as gv,aAt as gw,tSt as gx,Pg as gy,gCe as gz,gL as h,p9 as h$,w3e as h0,Mwt as h1,jwt as h2,zwt as h3,Kwt as h4,Zwt as h5,LTt as h6,ITt as h7,gle as h8,yle as h9,XOe as hA,dEt as hB,eTt as hC,pE as hD,mE as hE,fle as hF,a5e as hG,zD as hH,PB as hI,q8t as hJ,z8t as hK,j8t as hL,$8t as hM,rAt as hN,Ybt as hO,hAt as hP,lAt as hQ,YH as hR,xEt as hS,Z8t as hT,Vct as hU,rQ as hV,EAt as hW,U8t as hX,K8t as hY,Y8t as hZ,Iot as h_,Vze as ha,dnt as hb,wI as hc,Ih as hd,vEt as he,Jze as hf,DEt as hg,mEt as hh,fAt as hi,FV as hj,l1 as hk,tPe as hl,VQ as hm,w3 as hn,hEt as ho,Y1 as hp,XCt as hq,R5e as hr,aEt as hs,SCe as ht,C7e as hu,A9e as hv,x9e as hw,uEt as hx,R9e as hy,cEt as hz,bh as i,FIe as i0,TAt as i1,wAt as i2,FQ as i3,gne as i4,RAt as i5,XX as i6,I as j,Rf as k,OEt as l,Xt as m,Za as n,q5 as o,QA as p,ho as q,F as r,tr as s,u8t as t,_l as u,X_t as v,hDe as w,B9 as x,hO as y,Ec as z};
2516
+ `;function E8t(){const{t:e}=ho(),{session:t}=E0(),{info:n,refresh:r}=_l();return Yi(ui.TeamEvents.userUpdated,({teamDid:i,user:o})=>{i===n.did&&o&&!o.approved&&t&&t.user&&t.user.did===o.did&&(fi.warning(e("session.forbidLogin"),{autoHideDuration:10*1e3}),t.logout())}),Yi(gn.EVENTS.NOTIFICATION_CREATE,i=>{i.entityType==="node"&&r({silent:!0})}),Yi(gn.EVENTS.NODE_UPDATED,()=>{r({silent:!0})}),null}var xt={},A8t=Iie;function R8t(e){return e&&e.length?A8t(e):[]}var gue=R8t;const RAt=Wt(gue);class k8t{constructor(t){this.value=t,this.next=void 0}}let D8t=class{constructor(){this.clear()}enqueue(t){const n=new k8t(t);this._head?(this._tail.next=n,this._tail=n):(this._head=n,this._tail=n),this._size++}dequeue(){const t=this._head;if(t)return this._head=this._head.next,this._size--,t.value}clear(){this._head=void 0,this._tail=void 0,this._size=0}get size(){return this._size}*[Symbol.iterator](){let t=this._head;for(;t;)yield t.value,t=t.next}};var O8t=D8t;const L8t=O8t,I8t=e=>{if(!((Number.isInteger(e)||e===1/0)&&e>0))throw new TypeError("Expected `concurrency` to be a number from 1 and up");const t=new L8t;let n=0;const r=()=>{n--,t.size>0&&t.dequeue()()},i=async(s,l,...c)=>{n++;const u=(async()=>s(...c))();l(u);try{await u}catch{}r()},o=(s,l,...c)=>{t.enqueue(i.bind(null,s,l,...c)),(async()=>(await Promise.resolve(),n<e&&t.size>0&&t.dequeue()()))()},a=(s,...l)=>new Promise(c=>{o(s,c,...l)});return Object.defineProperties(a,{activeCount:{get:()=>n},pendingCount:{get:()=>t.size},clearQueue:{value:()=>{t.clear()}}}),a};var P8t=I8t,wI={};Object.defineProperty(wI,"__esModule",{value:!0});const M8t=e=>!!(e!=null&&e.main);var DAt=wI.default=M8t,D0=mt&&mt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xt,"__esModule",{value:!0});xt.isPackBlocklet=xt.isGatewayBlocklet=oCt=xt.isAccessible=xt.isRunning=xt.isBeforeInstalled=iCt=xt.isInProgress=rCt=xt.getBlockletServices=nCt=xt.getBlockletAppIdList=eCt=xt.getRolesFromAuthConfig=xt.isPreferenceKey=kb=xt.isExternalBlocklet=xt.getBlockletChainInfo=xt.getChainInfo=xt.getConnectAppUrl=xt.getParentComponentName=xt.filterComponentsV2=xt.findComponentByIdV2=xt.findComponentV2=xt.findComponentById=xt.findComponent=xt.getComponentBundleId=xt.getComponentName=xt.getComponentId=Vue=xt.replaceSlotToIp=xt.getComponentWhoCanAccess=Q8t=xt.getWhoCanAccess=X8t=xt.findServiceFromMeta=xt.findWebInterfacePort=Z8t=xt.findWebInterface=xt.fixBlockletStatus=Y8t=xt.getAppDescription=J8t=xt.getDisplayName=K8t=xt.getAppName=G8t=xt.hasRunnableComponent=xt.wipeSensitiveData=j8t=xt.isEnvShareable=xt.isEnvShareableToClient=z8t=xt.getComponentMissingConfigs=V8t=xt.getAppMissingConfigs=q8t=xt.getSharedConfigObj=W8t=xt.isDeletableBlocklet=xt.forEachComponentV2Sync=xt.forEachComponentV2=U8t=xt.forEachChildSync=xt.forEachChild=Nf=xt.forEachBlockletSync=xt.forEachBlocklet=xt.isFreeComponent=H8t=xt.isFreeBlocklet=xt.getAppUrl=void 0;xt.hasResourceType=$8t=xt.hasStartEngine=void 0;const _f=D0(E6),N8t=D0(gue),sG=D0(vie),yue=D0(P8t),B8t=D0(gn),Jn=ui,TI=D0(wI);var $8t=xt.hasStartEngine=TI.default;const{NODE_SERVICES:l4,SLOT_FOR_IP_DNS_SITE:F8t,WHO_CAN_ACCESS:u4,WHO_CAN_ACCESS_PREFIX_ROLES:lG}=B8t.default,vy=(e,t=[])=>`${t.map(n=>n&&n.meta?n.meta.did:"").join("/")}${t.length?"/":""}${e&&e.meta?e.meta.did:""}`;xt.getComponentId=vy;const vue=(e,t=[])=>`${t.map(n=>n&&n.meta?n.meta.name:"").join("/")}${t.length?"/":""}${e&&e.meta?e.meta.name:""}`;xt.getComponentName=vue;const bue=e=>`${e.meta.bundleName}@${e.meta.version}`;xt.getComponentBundleId=bue;const wue=e=>{if(!e)return"";const t=e.split("/");return t.pop(),!t.length||(t[t.length-1].startsWith("@")&&t.pop(),!t.length)?"":t.join("/")};xt.getParentComponentName=wue;const uc=(e,t,{parallel:n=!1,concurrencyLimit:r=5,sync:i,params:o,_parent:a,_root:s,_level:l=0,_tasks:c,_ancestors:u=[],_limit:d}={})=>{const p=s||a||e,g=vy(e,u),v=u.concat(e);if(i){const x=t(e,{parent:a,root:p,level:l,params:o,ancestors:u,id:g});if(e.children)for(const D of e.children)uc(D,t,{sync:i,params:x,_parent:e,_root:p,_level:l+1,_ancestors:v});return null}if(!n)return new Promise(async(x,D)=>{try{const L=await t(e,{parent:a,root:p,level:l,ancestors:u,params:o,id:g});if(e.children)for(const P of e.children)await uc(P,t,{params:L,_parent:e,_root:p,_level:l+1,_ancestors:v});x(null)}catch(L){D(L)}});const b=d||(0,yue.default)(r),E=c||[];if(E.push(b(()=>t(e,{parent:a,root:p,level:l,ancestors:u,id:g}))),e.children)for(const x of e.children)uc(x,t,{parallel:n,_parent:e,_root:p,_level:l+1,_tasks:E,_ancestors:v,_limit:b});return c?null:Promise.all(E)};xt.forEachBlocklet=uc;const Mh=(e,t)=>uc(e,t,{sync:!0});var Nf=xt.forEachBlockletSync=Mh;const xI=(e,t,{parallel:n=!1,concurrencyLimit:r=5,sync:i}={})=>{if(i){if(e.children)for(const s of e.children)t(s);return null}if(!n)return new Promise(async(s,l)=>{try{if(e.children)for(const c of e.children)await t(c);s(null)}catch(c){l(c)}});const o=(0,yue.default)(r),a=[];if(e.children)for(const s of e.children)a.push(o(()=>t(s)));return Promise.all(a)};xt.forEachComponentV2=xI;const SI=(e,t)=>xI(e,t,{sync:!0});xt.forEachComponentV2Sync=SI;const _I=(e,t,n)=>uc(e,(r,i)=>i.level===0?{}:t(r,i),n);xt.forEachChild=_I;const CI=(e,t)=>_I(e,t,{sync:!0});var U8t=xt.forEachChildSync=CI;const vw=(e,t,{_ancestors:n=[],returnAncestors:r=!1}={})=>{if(!t)return null;if(t(e,{ancestors:n}))return r?{component:e,ancestors:n}:e;for(const i of e.children||[]){const o=n.concat(e),a=vw(i,t,{_ancestors:o,returnAncestors:r});if(a)return a}return null};xt.findComponent=vw;const Tue=(e,t,{returnAncestors:n=!1}={})=>(Array.isArray(t)&&(t=t.join("/")),vw(e,(r,{ancestors:i})=>{const o=vy(r,i);return t===o},{returnAncestors:n}));xt.findComponentById=Tue;const EI=(e,t)=>{if(!t)return null;for(const n of e.children||[])if(t(n,e))return n;return null};xt.findComponentV2=EI;const xue=(e,t)=>t?(Array.isArray(t)&&(t=t.join("/")),EI(e,(n,r)=>{if(t.includes("/")){const i=vy(n,[r]);return t===i}return t===n.meta.did})):null;xt.findComponentByIdV2=xue;const Sue=(e,t)=>{if(!t)return[];const n=[];for(const r of e.children||[])t(r,e)&&n.push(r);return n};xt.filterComponentsV2=Sue;const _ue=e=>!!e&&!!(e.key||e.name)&&!e.secure&&e.shared!==!1&&!Jn.BLOCKLET_CONFIGURABLE_KEY[e.key||e.name];xt.isEnvShareableToClient=_ue;const c4=e=>!!e&&!!(e.key||e.name)&&!e.secure&&!!e.shared&&!Jn.BLOCKLET_CONFIGURABLE_KEY[e.key||e.name];var j8t=xt.isEnvShareable=c4;const bw=(e,t)=>{const n={};return!e||!t||(Array.isArray(e.configs)&&e.configs.forEach(({key:r,value:i,secure:o})=>{if(!c4({key:r,secure:o,shared:!0}))return;const a=(e.configObj||{})[r]||i,s=(t.configs||[]).find(l=>l.key===r);(!s||c4(s)||!s.value&&!(t.configObj||{})[s.key])&&(n[r]=a)}),(e.configs||[]).forEach(({key:r,value:i})=>{[Jn.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_CHAIN_HOST,Jn.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_CHAIN_ID,Jn.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_CHAIN_TYPE].includes(r)&&(n[Jn.CHAIN_PROP_MAP[r]]=i)})),n};var q8t=xt.getSharedConfigObj=bw;const ww=e=>e.key.startsWith(Jn.BLOCKLET_PREFERENCE_PREFIX)===!0;xt.isPreferenceKey=ww;const Cue=(e,t)=>!!(e.required&&(!e.value&&!t[e.key]||Object.values(Jn.CHAIN_PROP_MAP).includes(e.key)&&Object.keys(t).includes(e.key)&&!t[e.key])),Eue=(e={})=>{const t=[];return SI(e,n=>{var o;if(((o=n.meta)==null?void 0:o.group)===Jn.BlockletGroup.gateway)return;const r=n.configs||[],i=bw(e,n);r.forEach(a=>{Cue(a,i)&&t.push({did:n.meta.did,key:a.key,description:a.description})})}),t.filter(n=>!ww(n))};var V8t=xt.getAppMissingConfigs=Eue;const Aue=(e={},t={})=>{const n=[],r=e.configs||[],i=bw(t,e);return r.forEach(o=>{Cue(o,i)&&n.push({did:e.meta.did,key:o.key,description:o.description})}),n};var z8t=xt.getComponentMissingConfigs=Aue;const Rue=e=>e.payment?(e.payment.price||[]).map(n=>n.value||0).every(n=>n===0):!0;var H8t=xt.isFreeBlocklet=Rue;const kue=e=>!e.payment||!e.payment.componentPrice?!0:!e.payment.componentPrice.length;xt.isFreeComponent=kue;const Due=e=>e&&(uc(e,t=>{t.configs&&(t.configs=t.configs.filter(n=>!ww(n)),t.configs.forEach(n=>{n.secure&&(n.value=n.value?"__encrypted__":"")})),(t.environments||[]).forEach(n=>{["BLOCKLET_APP_SK","BLOCKLET_APP_PSK"].includes(n.key)&&(n.value="__encrypted__")}),(t.migratedFrom||[]).forEach(n=>{n.appSk="__encrypted__"}),delete e.configObj,delete e.environmentObj},{sync:!0}),e);xt.wipeSensitiveData=Due;const Oue=e=>{if(!e)return!1;const t=e.environments.find(n=>n.key==="BLOCKLET_DELETABLE");return t?t.value==="yes":!0};var W8t=xt.isDeletableBlocklet=Oue;const Lue=e=>(e==null?void 0:e.group)===Jn.BlockletGroup.gateway;xt.isGatewayBlocklet=Lue;const Iue=e=>(e==null?void 0:e.group)===Jn.BlockletGroup.pack;xt.isPackBlocklet=Iue;const Pue=e=>{let t=!1;return Mh(e,n=>{n.meta.group!==Jn.BlockletGroup.gateway&&(t=!0)}),t};var G8t=xt.hasRunnableComponent=Pue;const f4=(e,t=!1)=>{if(!e)return"";const{meta:n}=e;let r;if(!t&&e.environments){const i=e.environments.find(o=>o.key==="BLOCKLET_APP_NAME");i&&i.value&&(r=i.value)}return r||n.title||n.name};var K8t=xt.getAppName=f4,J8t=xt.getDisplayName=f4;const Mue=(e,t=!1)=>{if(!e)return"";const{meta:n}=e;let r;if(!t&&e.environments){const i=e.environments.find(o=>o.key==="BLOCKLET_APP_DESCRIPTION");i&&i.value&&(r=i.value)}return r||n.description||n.name};var Y8t=xt.getAppDescription=Mue;function Nue(e){var r,i,o;const t=(o=(i=(r=e==null?void 0:e.site)==null?void 0:r.domainAliases)==null?void 0:i.sort((a,s)=>{var l,c,u,d;return(l=a.accessibility)!=null&&l.accessible&&((c=s.accessibility)!=null&&c.accessible)?+a.isProtected-+s.isProtected:+((u=s.accessibility)==null?void 0:u.accessible)-+((d=a.accessibility)==null?void 0:d.accessible)}))==null?void 0:o.map(a=>{var c;const s=(c=a==null?void 0:a.domainStatus)!=null&&c.isHttps?"https://":"http://",l=a==null?void 0:a.value;return`${s}${l}`}).filter(Boolean);return t==null?void 0:t[0]}xt.getAppUrl=Nue;const Bue=e=>{e&&(Mh(e,t=>{t.status=(0,Jn.fromBlockletStatus)(t.status),t.source!==void 0&&(t.source=(0,Jn.fromBlockletSource)(t.source))}),e.settings&&(e.settings.children||[]).forEach(t=>{Mh(t,n=>{n.status=(0,Jn.fromBlockletStatus)(n.status),n.source!==void 0&&(n.source=(0,Jn.fromBlockletSource)(n.source))})}))};xt.fixBlockletStatus=Bue;const Tw=e=>{if(!e)return null;const t=e.meta||e||{},{interfaces:n=[]}=t;return Array.isArray(n)?n.find(r=>r.type===Jn.BLOCKLET_INTERFACE_TYPE_WEB):null};var Z8t=xt.findWebInterface=Tw;const $ue=e=>{if(!e)return null;const t=Tw(e),{ports:n}=e;return!t||!n?null:n[t.port]};xt.findWebInterfacePort=$ue;const xw=(e,t)=>{const n=[t];t===l4.AUTH&&n.push(l4.AUTH_SERVICE);const r=Tw(e);return r?(r.services||[]).find(i=>n.includes(i.name)):null};var X8t=xt.findServiceFromMeta=xw;const Fue=e=>{if(!e)return u4.ALL;if((0,_f.default)(e,"settings.whoCanAccess"))return e.settings.whoCanAccess;const t=xw(e.meta,l4.AUTH);return(0,_f.default)(t,"config.whoCanAccess")?t.config.whoCanAccess:u4.ALL};var Q8t=xt.getWhoCanAccess=Fue;const Uue=(e,t)=>{const n=(e.configs||[]).find(i=>i.key===Jn.BLOCKLET_CONFIGURABLE_KEY.COMPONENT_ACCESS_WHO);if(n)return n.value;if(t&&(0,_f.default)(t,"settings.whoCanAccess")&&(0,_f.default)(t,"settings.whoCanAccess")!==u4.ALL)return(0,_f.default)(t,"settings.whoCanAccess");const r=xw(e.meta,l4.AUTH);return(0,_f.default)(r,"config.whoCanAccess")?r.config.whoCanAccess:u4.ALL};xt.getComponentWhoCanAccess=Uue;const jue=({request:e,baseUrl:t})=>{const n=e.headers["x-blocklet-did"]||"",r=e.headers["x-blocklet-real-did"]||"",i=e.headers["x-path-prefix"]||"/",o=e.headers["x-group-path-prefix"]||"/";let a=t;return n!==r&&i!==o&&(a=(0,sG.default)((0,sG.default)(a,"/").replace(i,o),"")),a};xt.getConnectAppUrl=jue;const que=(e,t)=>{const n=(t||"").includes(":")?":":/\./;return(e||"").replace(F8t,(t||"").replace(new RegExp(n,"g"),"-"))};var Vue=xt.replaceSlotToIp=que;const b1=e=>{const t=Object.entries(Jn.CHAIN_INFO_CONFIG).reduce((n,r)=>{const[i,[o,a]]=r;return n[o]=(0,_f.default)(e,i)||a,n},{});return t.type==="ethereum"&&t.id==="none"&&(t.id="1"),t};xt.getChainInfo=b1;const zue=e=>{const t=b1({});if(!e)return t;const n=b1(e.configObj);if(n.host!=="none")return n;let r;return CI(e,i=>{if(r&&r.host!=="none")return;const o=b1(i.configObj);o.host!=="none"&&(r=o)}),r||t};xt.getBlockletChainInfo=zue;const Hue=e=>!!(e!=null&&e.controller);var kb=xt.isExternalBlocklet=Hue;const Wue=e=>e.whoCanAccess.startsWith(lG)?e.whoCanAccess.substring(lG.length).split(","):[];var eCt=xt.getRolesFromAuthConfig=Wue;const tCt=e=>{const t=Array.isArray(e.migratedFrom)?e.migratedFrom.map(n=>n.appDid):[];return(0,N8t.default)([e.appDid,e.appPid,...t].filter(Boolean))};var nCt=xt.getBlockletAppIdList=tCt;const Gue=e=>{const t=[];return e&&Mh(e,n=>{var i;(((i=n.meta)==null?void 0:i.interfaces)||[]).filter(o=>o.type===Jn.BLOCKLET_INTERFACE_TYPE_SERVICE).forEach(o=>{const a=o.port||{};t.push({name:o.name,protocol:o.protocol,port:Number(a.external),upstreamPort:Number((n.ports||{})[a.internal])})})}),t};var rCt=xt.getBlockletServices=Gue;const Kue=e=>[Jn.BlockletStatus.downloading,Jn.BlockletStatus.waiting,Jn.BlockletStatus.starting,Jn.BlockletStatus.installing,Jn.BlockletStatus.stopping,Jn.BlockletStatus.upgrading,"downloading","waiting","starting","installing","extracting","stopping","upgrading","restarting","deleting"].includes(e);var iCt=xt.isInProgress=Kue;const Jue=e=>[Jn.BlockletStatus.added,Jn.BlockletStatus.waiting,Jn.BlockletStatus.downloading,Jn.BlockletStatus.installing,"added","waiting","downloading","installing"].includes(e);xt.isBeforeInstalled=Jue;const Yue=e=>[Jn.BlockletStatus.running,"running"].includes(e);xt.isRunning=Yue;const Zue=e=>[Jn.BlockletStatus.running,Jn.BlockletStatus.waiting,Jn.BlockletStatus.downloading,"running","waiting","downloading"].includes(e);var oCt=xt.isAccessible=Zue;const Xue=(e,{type:t,did:n}={type:"",did:""})=>{var r,i,o;return e?!(0,TI.default)(e.meta)&&((o=(i=(r=e.meta)==null?void 0:r.resource)==null?void 0:i.bundles)==null?void 0:o.length)>0&&(e.meta.resource.bundles||[]).some(a=>a.type===t&&a.did===n):!1};xt.hasResourceType=Xue;xt.default={isFreeBlocklet:Rue,isFreeComponent:kue,forEachBlocklet:uc,forEachBlockletSync:Mh,forEachChild:_I,forEachChildSync:CI,forEachComponentV2:xI,forEachComponentV2Sync:SI,isDeletableBlocklet:Oue,getSharedConfigObj:bw,getAppMissingConfigs:Eue,getComponentMissingConfigs:Aue,isEnvShareableToClient:_ue,isEnvShareable:c4,wipeSensitiveData:Due,hasRunnableComponent:Pue,getAppName:f4,getAppDescription:Mue,getAppUrl:Nue,getDisplayName:f4,fixBlockletStatus:Bue,findWebInterface:Tw,findWebInterfacePort:$ue,findServiceFromMeta:xw,getWhoCanAccess:Fue,getComponentWhoCanAccess:Uue,replaceSlotToIp:que,getComponentId:vy,getComponentName:vue,getComponentBundleId:bue,findComponent:vw,findComponentById:Tue,findComponentV2:EI,findComponentByIdV2:xue,filterComponentsV2:Sue,getParentComponentName:wue,getConnectAppUrl:jue,getChainInfo:b1,getBlockletChainInfo:zue,isExternalBlocklet:Hue,isPreferenceKey:ww,getRolesFromAuthConfig:Wue,getBlockletServices:Gue,isInProgress:Kue,isBeforeInstalled:Jue,isRunning:Yue,isAccessible:Zue,isGatewayBlocklet:Lue,isPackBlocklet:Iue,hasStartEngine:TI.default,hasResourceType:Xue};const Que=(e,t=!1)=>{const n=e.routing.adminPath;return t?encodeURIComponent(Ln(window.location.origin,n)):Ln(window.location.origin,n)},OAt=(e,t,n)=>{const r=Que(t),i=Ln(n,`/api/blocklets/${e.did}/blocklet.json`),o=new URL(Ln(r,"/launch-blocklet/agreement"));return o.searchParams.set("blocklet_meta_url",i),o.searchParams.set("from",window.location.href),o.href},aCt=async(e,{getIP:t}={})=>{if(!e||!e.length)return[];if(!t||!e.some(r=>r.value.includes(gn.SLOT_FOR_IP_DNS_SITE)))return e;const n=await t();return n?e.map(r=>{try{return r.value=Vue(r.value,n),r}catch{return r}}).filter(Boolean):e},sCt=e=>{const t={didSpace:null};return Nf(e,n=>{var r,i;t.didSpace===ui.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED||t.didSpace===ui.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED_ON_SETUP||(i=(r=n==null?void 0:n.meta)==null?void 0:r.capabilities)!=null&&i.didSpace&&(t.didSpace=n.meta.capabilities.didSpace)}),t},uG=async(e,{fixRuntime:t=!0,oldBlocklet:n,getIP:r}={})=>{if(e.site||(e.site={domainAliases:[],rules:[]}),e.site.rules.forEach(i=>{i.from.pathPrefix=aO(i.from.pathPrefix||"/")}),e.site.rules=Nie(e.site.rules,i=>i.from.pathPrefix),t===!0)e.site.domainAliases=await aCt(e.site.domainAliases,{getIP:r}),e.appRuntimeInfo&&(e.appRuntimeInfo.startAt=new Date-e.appRuntimeInfo.uptime),Nf(e,i=>{i.runtimeInfo&&(i.runtimeInfo.startAt=new Date-i.runtimeInfo.uptime)});else if(t==="merge-old"&&n){e.site.domainAliases=n.site.domainAliases,e.appRuntimeInfo=n.appRuntimeInfo;const i={};Nf(n,(o,{id:a})=>{i[a]=o}),Nf(e,(o,{id:a})=>{const s=i[a];s&&(o.runtimeInfo=s.runtimeInfo,o.diskInfo=s.diskInfo,o.engine=s.engine)})}else e.site.domainAliases=[];e.capabilities=sCt(e)},cG="arcblock",LAt=(e,t=!1)=>{let n;return t?(n=(e.configs||[]).find(r=>r.key==="BLOCKLET_APP_CHAIN_TYPE"),n&&n.value||(n=(e.environments||[]).find(r=>["CHAIN_TYPE","BLOCKLET_APP_CHAIN_TYPE"].includes(r.key)),n&&n.value)?n.value:cG):(n=(e.environments||[]).find(r=>["CHAIN_TYPE","BLOCKLET_APP_CHAIN_TYPE"].includes(r.name)),n&&n.default?n.default:cG)},IAt=e=>!zk(e==null?void 0:e.controller);let Q8=null;const lCt=async()=>{const e=window.env.apiPrefix||"/",t=Ln(e,"/api/dns-resolve?accessible=1");try{return(await ND.get(t)).data.address}catch{return null}},fG=()=>(Q8||(Q8=lCt()),Q8),ece=F.createContext({}),{Provider:uCt,Consumer:PAt}=ece,dG=(e,t,n)=>n?e.map(r=>{const i={...r},o=t.find(a=>a.meta.did===r.meta.did);return o&&n.forEach(a=>{i[a]=o[a]}),i}):t;function cCt({children:e}){const t=_l(),n=iw(),[r,i]=F.useState(null),[o,a]=F.useState(!1),[s,l]=F.useState([]),[c,u]=F.useState([]),[d,p]=F.useState(!1),g=(P,q)=>{kb(P)?u(q):l(q)},v=4,b=async({silent:P=!0,retries:q=v,updates:M,useCache:j=!0}={})=>{P||a(!0);try{i(null);const{blocklets:K}=await n.getBlocklets({input:{useCache:j}});for(const G of K)await uG(G,{getIP:fG});const ne=K.filter(G=>!kb(G)),le=K.filter(kb);l(G=>dG(G,ne,M)),u(G=>dG(G,le,M)),a(!1),p(!0)}catch(K){q>0?setTimeout(()=>b({silent:P,retries:q-1,useCache:j}),1e3):(a(!1),i(K))}},E=async P=>{try{const{blocklet:q}=await t.api.getBlocklet({input:{did:P.meta.did,attachRuntimeInfo:!0}});await uG(q,{getIP:fG}),g(q,M=>M.some(j=>j.meta.did===q.meta.did)?M.map(j=>j.meta.did===q.meta.did?q:j):[...M,q])}catch(q){i(q)}},x=P=>{t.refresh(),E(P)};F.useEffect(()=>{b({silent:!1})},[]);const D=P=>{const q={};Nf(P,(M,{id:j})=>{q[j]=ui.fromBlockletStatus(M.status)}),g(P,M=>M.map(j=>(j.meta.did===P.meta.did&&Nf(j,(K,{id:ne})=>{q[ne]&&(K.status=q[ne])}),j)))};Yi(ui.BlockletEvents.added,P=>{P.status=ui.fromBlockletStatus(P.status),g(P,q=>[...q,P])}),Yi(ui.BlockletEvents.removed,P=>{t.refresh(),g(P,q=>q.filter(M=>M.meta.did!==P.meta.did))}),Yi(ui.BlockletEvents.statusChange,D),Yi(ui.BlockletEvents.installed,x),Yi(ui.BlockletEvents.upgraded,x),Yi(ui.BlockletEvents.updated,E),Yi(ui.BlockletEvents.startFailed,E),Yi(ui.BlockletEvents.reloaded,E);const L={loading:o,error:r,data:s,externalData:c,refresh:b,initialized:d,api:n};return I.jsx(uCt,{value:{blocklets:L},children:e})}function MAt(){const{blocklets:e}=F.useContext(ece);return e}const fCt=({user:e,launchType:t,nftId:n})=>{var r;if(!e)return!1;if(t==="serverless"){if(!n)throw new Error("nftId is required");return((r=e==null?void 0:e.controller)==null?void 0:r.nftId)===n}return(e.permissions||[]).includes("mutate_blocklets")},NAt=e=>{var t,n;return e.isGetBlocklet&&((n=(t=e.runtimeBlocklet)==null?void 0:t.controller)==null?void 0:n.consumedAt)},BAt=async e=>{const t=Ndt({blocklet:e});let n="";return n=t.find(r=>{try{const{hostname:i}=new URL(r);return tae.isSlpDomain(i)}catch(i){return console.error(i),!1}}),n||(n=await Udt(t)),n},tce=F.createContext({}),{Provider:dCt,Consumer:$At}=tce;function pCt({children:e}){const{session:t}=E0(),{t:n}=ho(),{api:r,info:i}=_l(),[o]=bY(),a=iw(),s=o.get("launchType"),l=o.get("fromLauncher"),c=o.get("blocklet_meta_url")||"",u=o.get("nftId")||"",d=o.get("launcherSessionId")||"",p=o.get("launcherUrl")||"",g=new URL(c).origin,[v,b]=F.useState({meta:null,appDid:o.get("appDid")||null,sessionId:o.get("sessionId")||null,isFree:!0,isExternal:!1,isInstalling:!1,isInstalled:!1,isRunning:!1,launcherSession:null}),E=(le,G)=>b(N=>({...N,appDid:le,sessionId:G})),x=fCt({user:t.user,launchType:s,nftId:u}),[D,L]=F.useState(null),[P,q]=F.useState(!0),M=F.useMemo(()=>i?Que(i):"",[i]),j=async le=>{if(!le)throw new Error("appDid should not be empty");const{blocklet:G}=await r.getBlocklet({input:{did:le,attachConfig:!1}});if(!G)return null;const N=ui.BlockletStatus[G.status],T=!!u,f=N<ui.BlockletStatus.installed,h=N===ui.BlockletStatus.installed,w=N===ui.BlockletStatus.running;return b(C=>({...C,isInstalled:h,isRunning:w,isExternal:T,isInstalling:f})),{isInstalled:h,isRunning:w,isExternal:T,isInstalling:f}},K=async()=>{q(!0);try{if(!c)throw new Error(n("common.invalidParam"));const[{meta:le,isFree:G},{launcherSession:N,error:T}]=await Promise.all([r.getBlockletMetaFromUrl({input:{url:c,checkPrice:!0}}),d?r.getLauncherSession({input:{launcherSessionId:d,launcherUrl:p}}):Promise.resolve({})]);if(d&&!N)throw new Error(`Launch session invalid: ${T}`);if(!le)throw new Error(n("LaunchBlockletBlocklet.error.loadMetaFailed"));let f={};x&&v.appDid&&(f=await j(v.appDid)),b(h=>({...h,...f,meta:le,isFree:G,launcherSession:N}))}catch(le){console.error(le),L(le.message)}finally{q(!1)}};F.useEffect(()=>{var le,G,N;((le=t==null?void 0:t.user)==null?void 0:le.role)===gn.SERVER_ROLES.EXTERNAL_BLOCKLET_CONTROLLER&&((N=(G=t==null?void 0:t.user)==null?void 0:G.controller)==null?void 0:N.nftId)!==u&&t.logout(),K()},[]),F.useEffect(()=>{P||!v.meta||(x?v.appDid&&j(v.appDid).catch(le=>{fi.error(le.message)}):(b(le=>({...le,isInstalled:!1,isRunning:!1,isExternal:!1})),L(null)))},[x]);const ne={meta:v.meta,isFree:v.isFree,appDid:v.appDid,sessionId:v.sessionId,isInstalling:v.isInstalling,isInstalled:v.isInstalled,isExternal:v.isExternal,isRunning:v.isRunning,serverUrl:M,storeUrl:g,blockletMetaUrl:c,fromLauncher:l,loading:P,error:D,api:a,getBlocklet:j,setAppDid:E,launcherUrl:p,launcherSession:v.launcherSession,launcherSessionId:d};return I.jsx(dCt,{value:ne,children:e})}function FAt(){return F.useContext(tce)}function nce(){return new URLSearchParams(yi().search)}const rce=F.createContext(),{Provider:hCt,Consumer:UAt}=rce;function ice({children:e}){const n=nce().get("blocklet_meta_url"),r=G_t(async()=>{const{data:o}=await oO.get(n);return o});if(r.loading)return I.jsx(ra,{children:I.jsx(sa,{})});const i={meta:r.value,error:r.error};return I.jsx(hCt,{value:i,children:e})}ice.propTypes={children:Y.any.isRequired};function jAt(){return F.useContext(rce)}const mCt=F.lazy(()=>mn(()=>import("./index-D4Db9ftV.js"),__vite__mapDeps([0,1,2,3,4]),import.meta.url)),gCt=F.lazy(()=>mn(()=>import("./index-Bm4qa0nV.js"),__vite__mapDeps([5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,2,27,28,29,30]),import.meta.url)),yCt=F.lazy(()=>mn(()=>import("./index-CN4-jpgI.js"),__vite__mapDeps([31,32,33,34,35,36,6,37,38,39,40,12,9,11,25,18,17]),import.meta.url)),vCt=F.lazy(()=>mn(()=>import("./index-C2H71CT1.js"),__vite__mapDeps([41,6,42,43,17,16,44,9,45,46,29,12,11,37,47,38,48,3,18,22,23,49,50,51]),import.meta.url)),bCt=F.lazy(()=>mn(()=>import("./index-DddM0S9V.js"),__vite__mapDeps([52,53,10,50,54,55,44,12,9,11,7,8,13,14,15,16,17,18,56,48,3,2,57,6,58,59,29,19,20,60,61,62,63,64,4,65]),import.meta.url)),wCt=F.lazy(()=>mn(()=>import("./index-C39X5nSU.js"),__vite__mapDeps([66,67,22,23,9,68]),import.meta.url)),TCt=F.lazy(()=>mn(()=>import("./index-CJRh33cD.js"),__vite__mapDeps([69,53,10,70,71,72,17,6,9,11,73,13,74,75,29,76,77,78,16,12,7,8,14,15,18,79,80,81,44,20,82,3,2,83,84,30,22,23,85,86,87,24,25,43,45,88,1,48,63]),import.meta.url)),xCt=F.lazy(()=>mn(()=>import("./detail-CESxJL-2.js").then(e=>e.d),__vite__mapDeps([89,53,10,19,20,21,6,18,22,23,28,82,39,40,51]),import.meta.url)),SCt=F.lazy(()=>mn(()=>import("./index-rfYAdo12.js"),[],import.meta.url)),_Ct=F.lazy(()=>mn(()=>import("./index-DI-gzmKu.js"),__vite__mapDeps([90,1,73,13]),import.meta.url)),CCt=F.lazy(()=>mn(()=>import("./index-Bu9Gdw_x.js"),__vite__mapDeps([91,92,93,94,61,95]),import.meta.url)),ECt=F.lazy(()=>mn(()=>import("./index-RLS72NCQ.js"),__vite__mapDeps([96,61,77,47,95,27]),import.meta.url)),ACt=F.lazy(()=>mn(()=>import("./index-CpNJmBAT.js"),__vite__mapDeps([97,95]),import.meta.url)),RCt=F.lazy(()=>mn(()=>import("./index-DNRVE0NP.js"),__vite__mapDeps([98,32,33,34,35,36,99,71,72,40,25,6,57]),import.meta.url)),kCt=F.lazy(()=>mn(()=>import("./index-B2x_NkGk.js"),__vite__mapDeps([100,93]),import.meta.url)),DCt=F.lazy(()=>mn(()=>import("./index-BcsyQdON.js"),__vite__mapDeps([101,92,93,94,61,95]),import.meta.url)),OCt=F.lazy(()=>mn(()=>import("./index-DFCC9v5j.js").then(e=>e.a2),__vite__mapDeps([102,103]),import.meta.url)),LCt=F.lazy(()=>mn(()=>import("./index-DWTs3F9i.js"),__vite__mapDeps([104,53,10,105,106,107,62,9,108,12,11,45,7,8,13,14,15,16,17,18,28,109,110,4,6,88,23]),import.meta.url));function oce(){const e=_l(),{session:t}=E0(),{wallet:n}=e0(),r=t.user&&t.user.did;return F.useEffect(()=>{const i=fw();return r?i.connect():i.isConnected()&&i.disconnect(),()=>{i.isConnected()&&i.disconnect()}},[r]),F.useEffect(()=>{if(n)return()=>{};const i=()=>{document.visibilityState==="visible"&&t.refresh()};return document.addEventListener("visibilitychange",i),()=>{document.removeEventListener("visibilitychange",i)}},[]),{node:e,session:t}}function ICt(){var a;const{t:e}=ho(),{node:t,session:n}=oce(),r=yi();F.useEffect(()=>{window.tracker&&typeof window.tracker.pageView=="function"&&window.tracker.pageView(`${r.pathname}${r.search}`)},[r]),F.useEffect(()=>{var s;((s=n==null?void 0:n.user)==null?void 0:s.role)===gn.SERVER_ROLES.EXTERNAL_BLOCKLET_CONTROLLER&&n.logout()},[(a=n==null?void 0:n.user)==null?void 0:a.role]);const i=I.jsx(sa,{});if(t.loading||n.loading)return I.jsx(ra,{children:i});if(!t.info.initialized)return A8e.getServerAuthMethod(t.info)==="nft"?I.jsx(uL,{action:"verify-owner"}):I.jsx(ra,{children:I.jsx(F5t,{})});if(t.info.upgradeSessionId)return I.jsx(ra,{children:I.jsx(cle,{})});if(!n.user)return I.jsx(fL,{loadingEle:i});const o=I.jsx(ra,{children:I.jsx(sa,{})});return I.jsx(S8t,{children:I.jsxs(cCt,{children:[I.jsx(K5t,{}),I.jsx(nxt,{}),I.jsx(E8t,{}),I.jsx(F.Suspense,{fallback:o,children:I.jsxs(I4,{children:[I.jsx(sr,{path:"/dashboard",element:I.jsx(Xo,{fullWidth:!0,title:"Dashboard",children:I.jsx(mCt,{})})}),I.jsx(sr,{path:"/blocklets",element:I.jsx(Xo,{fullWidth:!0,title:e("common.blocklets"),children:I.jsx(gCt,{})})}),I.jsx(sr,{path:"/blocklets/:did/:tab",element:I.jsx(Xo,{fullWidth:!0,title:"Blocklets",children:I.jsx(xCt,{})})}),I.jsx(sr,{path:"/settings/:tab",element:I.jsx(Xo,{fullWidth:!0,title:e("common.setting"),children:I.jsx(bCt,{})})}),I.jsx(sr,{path:"/eula",element:I.jsx(Xo,{fullWidth:!0,title:e("setup.steps.eula"),children:I.jsx(SCt,{})})}),I.jsx(sr,{path:"/store",element:I.jsx(Xo,{fullWidth:!0,title:e("common.store"),children:I.jsx(vCt,{})})}),I.jsx(sr,{path:"/console",element:I.jsx(Xo,{title:`GraphQL ${e("common.console")}`,scrollable:!1,fullWidth:!0,children:I.jsx(OCt,{})})}),I.jsx(sr,{path:"/notifications",element:I.jsx(Xo,{children:I.jsx(_Ct,{})})}),I.jsx(sr,{path:"/team/:tab",element:I.jsx(Xo,{fullWidth:!0,title:e("common.team"),children:I.jsx(TCt,{})})}),I.jsx(sr,{path:"/logs/:name",element:I.jsx(Xo,{scrollable:!1,fullWidth:!0,title:e("common.logs"),children:I.jsx(wCt,{})})}),I.jsx(sr,{path:"/analytics/:tab",element:I.jsx(Xo,{fullWidth:!0,title:e("common.analytics"),children:I.jsx(LCt,{})})}),I.jsx(sr,{path:"/",element:I.jsx(Gs,{to:"/dashboard",replace:!0})}),I.jsx(sr,{path:"/team",element:I.jsx(Gs,{to:"/team/members",replace:!0})}),I.jsx(sr,{path:"/analytics",element:I.jsx(Gs,{to:"/analytics/traffic",replace:!0})}),I.jsx(sr,{path:"/logs",element:I.jsx(Gs,{to:"/logs/abtnode",replace:!0})}),I.jsx(sr,{path:"/router",element:I.jsx(Gs,{to:"/router/rules",replace:!0})}),I.jsx(sr,{path:"/settings",element:I.jsx(Gs,{to:"/settings/basic",replace:!0})}),I.jsx(sr,{path:"/marketplace",element:I.jsx(Gs,{to:"/store",replace:!0})}),I.jsx(sr,{path:"/marketplace/:did",element:I.jsx(Gs,{to:"/store/:did",replace:!0})}),I.jsx(sr,{path:"*",element:I.jsx(kCt,{})})]})})]})})}function Qc({children:e}){const{node:t,session:n}=oce();return t.loading||!n.initialized&&n.loading?I.jsx(ra,{children:I.jsx(sa,{})}):t.info.upgradeSessionId?I.jsx(ra,{children:I.jsx(cle,{})}):e}function PCt(){const{changeLocale:e}=ho(),t=nce();F.useEffect(()=>{const r=t.get("locale");r&&["zh","en"].includes(r)&&e(r)},[]);const n=I.jsx(ra,{children:I.jsx(sa,{})});return I.jsx(F.Suspense,{fallback:n,children:I.jsxs(I4,{children:[I.jsx(sr,{path:`${gn.WELLKNOWN_SERVICE_PATH_PREFIX}/issue-passport`,element:I.jsx(Qc,{children:I.jsx(CCt,{})})}),I.jsx(sr,{path:`${gn.WELLKNOWN_SERVICE_PATH_PREFIX}/lost-passport`,element:I.jsx(Qc,{children:I.jsx(ECt,{})})}),I.jsx(sr,{path:`${gn.WELLKNOWN_SERVICE_PATH_PREFIX}/exchange-passport`,element:I.jsx(Qc,{children:I.jsx(ACt,{})})}),I.jsx(sr,{path:"/accept-server",element:I.jsx(Qc,{children:I.jsx(uL,{action:"accept-server"})})}),I.jsx(sr,{path:"/launch-blocklet/*",element:I.jsx(Qc,{children:I.jsx(pCt,{children:I.jsx(RCt,{})})})}),I.jsx(sr,{path:"/blocklets/restore/*",element:I.jsx(Qc,{children:I.jsx(ice,{children:I.jsx(yCt,{})})})}),I.jsx(sr,{path:`${gn.WELLKNOWN_SERVICE_PATH_PREFIX}/invite`,element:I.jsx(Qc,{children:I.jsx(DCt,{})})}),I.jsx(sr,{path:"/*",element:I.jsx(ICt,{})})]})})}function MCt(){const e=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";return I.jsxs(I.Fragment,{children:[I.jsx(Y7,{}),I.jsx(mY,{history:aCe,basename:e,children:I.jsx(pxt,{children:I.jsx(PCt,{})})})]})}const NCt=kJ(document.getElementById("root"));NCt.render(I.jsx(MCt,{}));const pG=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";Rye(`${pG}/service-worker.js`.replace(/\/+/g,"/"),{registrationOptions:{scope:pG},registered(){console.info("Service worker has been registered.")},ready(){console.info("Service worker is active.")},cached(){console.info("Content has been cached for offline use.")},updatefound(){console.info("New content is downloading.")},updated(){console.info("New content is available; please refresh.")},offline(){console.info("No internet connection found. App is running in offline mode.")},error(e){console.error("Error during service worker registration:",e)}});export{HD as $,fi as A,Ds as B,sa as C,d9 as D,bY as E,gn as F,Tx as G,Ms as H,NL as I,Fat as J,pft as K,pQ as L,J8t as M,V8t as N,fl as O,Y as P,ct as Q,zk as R,YD as S,iue as T,J1 as U,yw as V,vL as W,ra as X,kc as Y,I2e as Z,ylt as _,Yi as a,HEt as a$,Qp as a0,gO as a1,Ln as a2,ro as a3,E5 as a4,QTt as a5,yAt as a6,mOe as a7,Ok as a8,SOe as a9,iAt as aA,T5 as aB,Fle as aC,$dt as aD,NOe as aE,aCt as aF,aO as aG,Nie as aH,fG as aI,WEt as aJ,pae as aK,ma as aL,po as aM,aCe as aN,Mdt as aO,bk as aP,qEt as aQ,FDe as aR,nAt as aS,G_t as aT,oO as aU,zEt as aV,cAt as aW,Pdt as aX,lQ as aY,eQ as aZ,uLe as a_,gQ as aa,Que as ab,jAt as ac,A8e as ad,yL as ae,mO as af,BAt as ag,_Et as ah,NAt as ai,fw as aj,nce as ak,QEt as al,aI as am,sL as an,P7 as ao,I4 as ap,sr as aq,Gs as ar,pu as as,vl as at,gz as au,OAt as av,ND as aw,E0 as ax,H8t as ay,Mo as az,ui as b,dl as b$,Lk as b0,H7e as b1,rke as b2,Bdt as b3,uAt as b4,Jle as b5,DCe as b6,Lct as b7,j6 as b8,q6 as b9,Bre as bA,$re as bB,s9 as bC,g9 as bD,Iie as bE,Qg as bF,XXe as bG,gie as bH,l9 as bI,Ple as bJ,iCt as bK,W8t as bL,FEt as bM,G8t as bN,CAt as bO,IEt as bP,tAt as bQ,bEt as bR,pa as bS,kt as bT,bc as bU,me as bV,i4e as bW,Nt as bX,un as bY,an as bZ,pn as b_,_Q as ba,en as bb,Wr as bc,Ju as bd,vh as be,eAt as bf,N5 as bg,nY as bh,ea as bi,CQ as bj,ig as bk,mAt as bl,Yie as bm,LAt as bn,Nf as bo,jQ as bp,mn as bq,$Et as br,S7e as bs,rCt as bt,kb as bu,gY as bv,gAt as bw,a9 as bx,Zh as by,Vg as bz,iw as c,iEt as c$,Pt as c0,sn as c1,hu as c2,wke as c3,pt as c4,Wn as c5,nE as c6,K7 as c7,Fr as c8,G7 as c9,G5t as cA,dw as cB,FAt as cC,LGe as cD,fCt as cE,oAt as cF,Udt as cG,DAt as cH,XEt as cI,If as cJ,yi as cK,hi as cL,BD as cM,BEt as cN,PEt as cO,MEt as cP,Dle as cQ,uxt as cR,pk as cS,Ui as cT,QCt as cU,Dm as cV,e1 as cW,mct as cX,mt as cY,bre as cZ,$Ct as c_,tEt as ca,kEt as cb,Ndt as cc,tae as cd,Ole as ce,sAt as cf,D5 as cg,uG as ch,nCt as ci,O7e as cj,I7e as ck,qdt as cl,kOe as cm,a7e as cn,pue as co,_8t as cp,HIe as cq,_t as cr,tIe as cs,Pr as ct,Th as cu,ou as cv,gi as cw,e0 as cx,Bg as cy,Zu as cz,MAt as d,lZ as d$,Gne as d0,V5 as d1,r8t as d2,T3e as d3,pAt as d4,Qa as d5,W7 as d6,gc as d7,b6 as d8,qa as d9,pd as dA,ey as dB,RJe as dC,sX as dD,Kn as dE,eEt as dF,eh as dG,lX as dH,Qt as dI,wu as dJ,z9 as dK,jZe as dL,moe as dM,VEt as dN,JRe as dO,m3 as dP,n5e as dQ,hc as dR,Ro as dS,AZ as dT,A5e as dU,N6 as dV,os as dW,t0 as dX,F6 as dY,n0 as dZ,J7 as d_,Ai as da,Rt as db,ZX as dc,GRe as dd,Ua as de,EEt as df,AEt as dg,GD as dh,KDe as di,K1 as dj,v3 as dk,vQ as dl,YOe as dm,mF as dn,hF as dp,HOe as dq,fEt as dr,on as ds,jCt as dt,UCt as du,FCt as dv,qCt as dw,Fh as dx,qD as dy,O5 as dz,Y_t as e,xie as e$,F6e as e0,j6e as e1,J2e as e2,$Y as e3,Eg as e4,HCt as e5,GCt as e6,WCt as e7,zCt as e8,a4e as e9,Hc as eA,OCe as eB,sEt as eC,lEe as eD,uEe as eE,EEe as eF,lEt as eG,nr as eH,Op as eI,URe as eJ,Dv as eK,R7e as eL,bx as eM,_ke as eN,Lm as eO,UDe as eP,BOe as eQ,b3 as eR,cLe as eS,cm as eT,OLe as eU,Jl as eV,a3 as eW,o3 as eX,HLe as eY,FLe as eZ,pEt as e_,wg as ea,jh as eb,KB as ec,VCt as ed,Wf as ee,M4e as ef,M7 as eg,MZ as eh,ZCt as ei,KCt as ej,g6e as ek,mc as el,bZ as em,j4e as en,v6e as eo,YCt as ep,tE as eq,p6e as er,m6e as es,bl as et,y6e as eu,e4e as ev,g6 as ew,V5e as ex,JCt as ey,$5e as ez,Oc as f,lk as f$,Ls as f0,UE as f1,Z7 as f2,oZ as f3,fQ as f4,JGe as f5,qh as f6,CZ as f7,i6 as f8,Cg as f9,NEt as fA,mI as fB,UQ as fC,BCt as fD,yc as fE,qYe as fF,Dc as fG,GEt as fH,yd as fI,JEt as fJ,REt as fK,ZEt as fL,Zie as fM,Uoe as fN,C5t as fO,E9 as fP,Ase as fQ,dae as fR,E6 as fS,$2t as fT,Die as fU,s5e as fV,NZ as fW,X7 as fX,Gn as fY,M6 as fZ,cOe as f_,$7 as fa,T3 as fb,TF as fc,Jf as fd,di as fe,eat as ff,jo as fg,m0 as fh,tn as fi,$g as fj,THe as fk,KIe as fl,kJ as fm,o0 as fn,Qn as fo,nte as fp,Qee as fq,O6 as fr,mft as fs,dZ as ft,v6 as fu,g3 as fv,g7 as fw,$Q as fx,Eee as fy,q5t as fz,Wt as g,vEe as g$,w8e as g0,ZL as g1,rEt as g2,tI as g3,eI as g4,I5 as g5,TEt as g6,jL as g7,my as g8,WL as g9,L6 as gA,Nre as gB,rk as gC,S_e as gD,ik as gE,Mct as gF,ak as gG,LEt as gH,vie as gI,lft as gJ,WD as gK,IAt as gL,dAt as gM,oCt as gN,Q8t as gO,jEt as gP,KEt as gQ,YEt as gR,R5 as gS,X8t as gT,eCt as gU,Hre as gV,Wre as gW,zre as gX,iie as gY,kZ as gZ,l3 as g_,OHe as ga,i0 as gb,Kle as gc,C5 as gd,Eot as ge,Bot as gf,Cne as gg,Mk as gh,mit as gi,Wie as gj,ed as gk,A5 as gl,z1 as gm,B6 as gn,wx as go,$6 as gp,iAe as gq,nQ as gr,xCe as gs,PX as gt,v2e as gu,UEt as gv,aAt as gw,tSt as gx,Pg as gy,gCe as gz,gL as h,p9 as h$,w3e as h0,Mwt as h1,jwt as h2,zwt as h3,Kwt as h4,Zwt as h5,LTt as h6,ITt as h7,gle as h8,yle as h9,XOe as hA,dEt as hB,eTt as hC,pE as hD,mE as hE,fle as hF,a5e as hG,zD as hH,PB as hI,q8t as hJ,z8t as hK,j8t as hL,$8t as hM,rAt as hN,Ybt as hO,hAt as hP,lAt as hQ,YH as hR,xEt as hS,Z8t as hT,Vct as hU,rQ as hV,EAt as hW,U8t as hX,K8t as hY,Y8t as hZ,Iot as h_,Vze as ha,dnt as hb,wI as hc,Ih as hd,vEt as he,Jze as hf,DEt as hg,mEt as hh,fAt as hi,FV as hj,l1 as hk,tPe as hl,VQ as hm,w3 as hn,hEt as ho,Y1 as hp,XCt as hq,R5e as hr,aEt as hs,SCe as ht,C7e as hu,A9e as hv,x9e as hw,uEt as hx,R9e as hy,cEt as hz,bh as i,FIe as i0,TAt as i1,wAt as i2,FQ as i3,gne as i4,RAt as i5,XX as i6,I as j,Rf as k,OEt as l,Xt as m,Za as n,q5 as o,QA as p,ho as q,F as r,tr as s,u8t as t,_l as u,X_t as v,hDe as w,B9 as x,hO as y,Ec as z};
@@ -1 +1 @@
1
- import{bY as $,bZ as x,bT as d,c4 as e,c3 as y,c5 as k,eW as m,eX as C,r as M,bX as z,bV as l,j as i,c0 as j,fr as R,c1 as B,s as T,P,aY as E}from"./index-cto27BjI.js";function N(t){return x("MuiSwitch",t)}const o=$("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),O=["className","color","edge","size","sx"],_=R(),D=t=>{const{classes:a,edge:s,size:r,color:p,checked:u,disabled:h}=t,b={root:["root",s&&`edge${e(s)}`,`size${e(r)}`],switchBase:["switchBase",`color${e(p)}`,u&&"checked",h&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},g=B(b,N,a);return l({},a,g)},I=d("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(t,a)=>{const{ownerState:s}=t;return[a.root,s.edge&&a[`edge${e(s.edge)}`],a[`size${e(s.size)}`]]}})({display:"inline-flex",width:34+12*2,height:14+12*2,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,[`& .${o.thumb}`]:{width:16,height:16},[`& .${o.switchBase}`]:{padding:4,[`&.${o.checked}`]:{transform:"translateX(16px)"}}}}]}),U=d(y,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(t,a)=>{const{ownerState:s}=t;return[a.switchBase,{[`& .${o.input}`]:a.input},s.color!=="default"&&a[`color${e(s.color)}`]]}})(({theme:t})=>({position:"absolute",top:0,left:0,zIndex:1,color:t.vars?t.vars.palette.Switch.defaultColor:`${t.palette.mode==="light"?t.palette.common.white:t.palette.grey[300]}`,transition:t.transitions.create(["left","transform"],{duration:t.transitions.duration.shortest}),[`&.${o.checked}`]:{transform:"translateX(20px)"},[`&.${o.disabled}`]:{color:t.vars?t.vars.palette.Switch.defaultDisabledColor:`${t.palette.mode==="light"?t.palette.grey[100]:t.palette.grey[600]}`},[`&.${o.checked} + .${o.track}`]:{opacity:.5},[`&.${o.disabled} + .${o.track}`]:{opacity:t.vars?t.vars.opacity.switchTrackDisabled:`${t.palette.mode==="light"?.12:.2}`},[`& .${o.input}`]:{left:"-100%",width:"300%"}}),({theme:t})=>({"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:k(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(t.palette).filter(([,a])=>a.main&&a.light).map(([a])=>({props:{color:a},style:{[`&.${o.checked}`]:{color:(t.vars||t).palette[a].main,"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette[a].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:k(t.palette[a].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${o.disabled}`]:{color:t.vars?t.vars.palette.Switch[`${a}DisabledColor`]:`${t.palette.mode==="light"?m(t.palette[a].main,.62):C(t.palette[a].main,.55)}`}},[`&.${o.checked} + .${o.track}`]:{backgroundColor:(t.vars||t).palette[a].main}}}))]})),X=d("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(t,a)=>a.track})(({theme:t})=>({height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:t.transitions.create(["opacity","background-color"],{duration:t.transitions.duration.shortest}),backgroundColor:t.vars?t.vars.palette.common.onBackground:`${t.palette.mode==="light"?t.palette.common.black:t.palette.common.white}`,opacity:t.vars?t.vars.opacity.switchTrack:`${t.palette.mode==="light"?.38:.3}`})),A=d("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(t,a)=>a.thumb})(({theme:t})=>({boxShadow:(t.vars||t).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"})),V=M.forwardRef(function(a,s){const r=_({props:a,name:"MuiSwitch"}),{className:p,color:u="primary",edge:h=!1,size:b="medium",sx:g}=r,f=z(r,O),c=l({},r,{color:u,edge:h,size:b}),n=D(c),w=i.jsx(A,{className:n.thumb,ownerState:c});return i.jsxs(I,{className:j(n.root,p),sx:g,ownerState:c,children:[i.jsx(U,l({type:"checkbox",icon:w,checkedIcon:w,ref:s,ownerState:c},f,{classes:l({},n,{root:n.switchBase})})),i.jsx(X,{className:n.track,ownerState:c})]})}),L=V,v=T(t=>i.jsx(L,{focusVisibleClassName:".Mui-focusVisible",disableRipple:!0,...t}))(({theme:t})=>({width:42,height:26,padding:0,"& .MuiSwitch-switchBase":{padding:0,margin:2,transitionDuration:"300ms","&.Mui-checked":{transform:"translateX(16px)",color:"#fff","& + .MuiSwitch-track":{backgroundColor:t.palette.mode==="dark"?"#2ECA45":"#65C466",opacity:1,border:0},"&.Mui-disabled + .MuiSwitch-track":{opacity:.5}},"&.Mui-focusVisible .MuiSwitch-thumb":{color:"#33cf4d",border:"6px solid #fff"},"&.Mui-disabled .MuiSwitch-thumb":{color:t.palette.mode==="light"?t.palette.grey[100]:t.palette.grey[600]},"&.Mui-disabled + .MuiSwitch-track":{opacity:t.palette.mode==="light"?.7:.3}},"& .MuiSwitch-thumb":{boxSizing:"border-box",width:22,height:22},"& .MuiSwitch-track":{borderRadius:26/2,backgroundColor:t.palette.mode==="light"?"#E9E9EA":"#39393D",opacity:1,transition:t.transitions.create(["background-color"],{duration:500})}}));function S({labelProps:t,...a}){return t?i.jsx(E,{control:i.jsx(v,{...a}),...t}):i.jsx(v,{...a})}S.propTypes={labelProps:P.object};S.defaultProps={labelProps:null};export{S,L as a};
1
+ import{bY as $,bZ as x,bT as d,c4 as e,c3 as y,c5 as k,eW as m,eX as C,r as M,bX as z,bV as l,j as i,c0 as j,fr as R,c1 as B,s as T,P,aY as E}from"./index-DBlH-4qz.js";function N(t){return x("MuiSwitch",t)}const o=$("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),O=["className","color","edge","size","sx"],_=R(),D=t=>{const{classes:a,edge:s,size:r,color:p,checked:u,disabled:h}=t,b={root:["root",s&&`edge${e(s)}`,`size${e(r)}`],switchBase:["switchBase",`color${e(p)}`,u&&"checked",h&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},g=B(b,N,a);return l({},a,g)},I=d("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(t,a)=>{const{ownerState:s}=t;return[a.root,s.edge&&a[`edge${e(s.edge)}`],a[`size${e(s.size)}`]]}})({display:"inline-flex",width:34+12*2,height:14+12*2,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,[`& .${o.thumb}`]:{width:16,height:16},[`& .${o.switchBase}`]:{padding:4,[`&.${o.checked}`]:{transform:"translateX(16px)"}}}}]}),U=d(y,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(t,a)=>{const{ownerState:s}=t;return[a.switchBase,{[`& .${o.input}`]:a.input},s.color!=="default"&&a[`color${e(s.color)}`]]}})(({theme:t})=>({position:"absolute",top:0,left:0,zIndex:1,color:t.vars?t.vars.palette.Switch.defaultColor:`${t.palette.mode==="light"?t.palette.common.white:t.palette.grey[300]}`,transition:t.transitions.create(["left","transform"],{duration:t.transitions.duration.shortest}),[`&.${o.checked}`]:{transform:"translateX(20px)"},[`&.${o.disabled}`]:{color:t.vars?t.vars.palette.Switch.defaultDisabledColor:`${t.palette.mode==="light"?t.palette.grey[100]:t.palette.grey[600]}`},[`&.${o.checked} + .${o.track}`]:{opacity:.5},[`&.${o.disabled} + .${o.track}`]:{opacity:t.vars?t.vars.opacity.switchTrackDisabled:`${t.palette.mode==="light"?.12:.2}`},[`& .${o.input}`]:{left:"-100%",width:"300%"}}),({theme:t})=>({"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:k(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(t.palette).filter(([,a])=>a.main&&a.light).map(([a])=>({props:{color:a},style:{[`&.${o.checked}`]:{color:(t.vars||t).palette[a].main,"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette[a].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:k(t.palette[a].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${o.disabled}`]:{color:t.vars?t.vars.palette.Switch[`${a}DisabledColor`]:`${t.palette.mode==="light"?m(t.palette[a].main,.62):C(t.palette[a].main,.55)}`}},[`&.${o.checked} + .${o.track}`]:{backgroundColor:(t.vars||t).palette[a].main}}}))]})),X=d("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(t,a)=>a.track})(({theme:t})=>({height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:t.transitions.create(["opacity","background-color"],{duration:t.transitions.duration.shortest}),backgroundColor:t.vars?t.vars.palette.common.onBackground:`${t.palette.mode==="light"?t.palette.common.black:t.palette.common.white}`,opacity:t.vars?t.vars.opacity.switchTrack:`${t.palette.mode==="light"?.38:.3}`})),A=d("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(t,a)=>a.thumb})(({theme:t})=>({boxShadow:(t.vars||t).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"})),V=M.forwardRef(function(a,s){const r=_({props:a,name:"MuiSwitch"}),{className:p,color:u="primary",edge:h=!1,size:b="medium",sx:g}=r,f=z(r,O),c=l({},r,{color:u,edge:h,size:b}),n=D(c),w=i.jsx(A,{className:n.thumb,ownerState:c});return i.jsxs(I,{className:j(n.root,p),sx:g,ownerState:c,children:[i.jsx(U,l({type:"checkbox",icon:w,checkedIcon:w,ref:s,ownerState:c},f,{classes:l({},n,{root:n.switchBase})})),i.jsx(X,{className:n.track,ownerState:c})]})}),L=V,v=T(t=>i.jsx(L,{focusVisibleClassName:".Mui-focusVisible",disableRipple:!0,...t}))(({theme:t})=>({width:42,height:26,padding:0,"& .MuiSwitch-switchBase":{padding:0,margin:2,transitionDuration:"300ms","&.Mui-checked":{transform:"translateX(16px)",color:"#fff","& + .MuiSwitch-track":{backgroundColor:t.palette.mode==="dark"?"#2ECA45":"#65C466",opacity:1,border:0},"&.Mui-disabled + .MuiSwitch-track":{opacity:.5}},"&.Mui-focusVisible .MuiSwitch-thumb":{color:"#33cf4d",border:"6px solid #fff"},"&.Mui-disabled .MuiSwitch-thumb":{color:t.palette.mode==="light"?t.palette.grey[100]:t.palette.grey[600]},"&.Mui-disabled + .MuiSwitch-track":{opacity:t.palette.mode==="light"?.7:.3}},"& .MuiSwitch-thumb":{boxSizing:"border-box",width:22,height:22},"& .MuiSwitch-track":{borderRadius:26/2,backgroundColor:t.palette.mode==="light"?"#E9E9EA":"#39393D",opacity:1,transition:t.transitions.create(["background-color"],{duration:500})}}));function S({labelProps:t,...a}){return t?i.jsx(E,{control:i.jsx(v,{...a}),...t}):i.jsx(v,{...a})}S.propTypes={labelProps:P.object};S.defaultProps={labelProps:null};export{S,L as a};