@abtnode/blocklet-services 1.17.3-beta-20251119-102907-28b69b76 → 1.17.3-beta-20251121-135300-8e451e6e

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 (152) hide show
  1. package/dist/assets/{access-control-DTCMjhKk.js → access-control-nEfPjX9L.js} +1 -1
  2. package/dist/assets/{add-component-core-CUr388CN.js → add-component-core-CvN1A_dW.js} +1 -1
  3. package/dist/assets/{add-resource-Dc856hpt.js → add-resource-B9_aO4fk.js} +1 -1
  4. package/dist/assets/{addon-B40hGwgm.js → addon-VQ1uddFd.js} +1 -1
  5. package/dist/assets/{advanced-Br_YsN3-.js → advanced-DrQgmCdX.js} +1 -1
  6. package/dist/assets/{aigne-H9M2qziH.js → aigne-Bnseq7nJ.js} +1 -1
  7. package/dist/assets/{appearance-CZaZuJSH.js → appearance-B-5PmK14.js} +1 -1
  8. package/dist/assets/ar-Dz5bxvSE.js +7 -0
  9. package/dist/assets/{arrow-down.svg-B4fW36cY.js → arrow-down.svg-CpfG-t7r.js} +1 -1
  10. package/dist/assets/{audit-logs-CdBxa8MQ.js → audit-logs-DZUc-RBS.js} +1 -1
  11. package/dist/assets/{authorize-BF4yXQyf.js → authorize-CHAjiVSh.js} +1 -1
  12. package/dist/assets/{bind-account-D6p5CBbp.js → bind-account-NDZClqum.js} +1 -1
  13. package/dist/assets/{branding-CoyX7jAw.js → branding-C9cXITVH.js} +1 -1
  14. package/dist/assets/{branding-DNryM-GG.js → branding-CO4Sr13R.js} +1 -1
  15. package/dist/assets/{branding-B7dM6NSY.js → branding-CmgULIp-.js} +1 -1
  16. package/dist/assets/{bundle-avatar--3Ig7ZeD.js → bundle-avatar-Dtrtu9tJ.js} +1 -1
  17. package/dist/assets/{complete-DPTGJDLo.js → complete-Bb4ybro9.js} +1 -1
  18. package/dist/assets/{component-C9douaIx.js → component-DaJPU9PG.js} +35 -35
  19. package/dist/assets/{config-DLpmAnUO.js → config-BU9M-TDw.js} +1 -1
  20. package/dist/assets/{config-DbJRjGKg.js → config-DCVvdigc.js} +1 -1
  21. package/dist/assets/{config-BuIjAxID.js → config-DV7G62tB.js} +1 -1
  22. package/dist/assets/{config-navigation-ebep7Vaw.js → config-navigation-CesehlHG.js} +2 -2
  23. package/dist/assets/{config-space-BIBMi9yR.js → config-space-CNnFak18.js} +1 -1
  24. package/dist/assets/{confirm-CklyzxUV.js → confirm-CvbX7Jj-.js} +1 -1
  25. package/dist/assets/{connect-D1S9h2vl.js → connect-B1N-w3eV.js} +1 -1
  26. package/dist/assets/{connect-sHh18260.js → connect-Nix-snxX.js} +1 -1
  27. package/dist/assets/{connect-to-CN0n_rfw.js → connect-to-DBGTL_TU.js} +1 -1
  28. package/dist/assets/{dashboard-BOEp1A3P.js → dashboard-BahbXvzp.js} +6 -6
  29. package/dist/assets/de-Ztxy5vEB.js +7 -0
  30. package/dist/assets/{delete-confirm-DOWoUCR5.js → delete-confirm-ByS6hl26.js} +1 -1
  31. package/dist/assets/{domain-_Mg8zUon.js → domain-BpamjKaC.js} +1 -1
  32. package/dist/assets/{domain-action-card-COcfS69j.js → domain-action-card-Cp48mNnX.js} +1 -1
  33. package/dist/assets/{domains-HnFn4BU9.js → domains-Dh12Syq6.js} +1 -1
  34. package/dist/assets/{email-CY8kCkSP.js → email-BMJdUyBy.js} +1 -1
  35. package/dist/assets/engine-B0uUUVPG.js +1 -0
  36. package/dist/assets/es-Cd-spoK_.js +9 -0
  37. package/dist/assets/{exchange-passport-DPA710jd.js → exchange-passport-DHKedqAo.js} +1 -1
  38. package/dist/assets/{form-CaWm2WdL.js → form-D4lC8hNg.js} +1 -1
  39. package/dist/assets/fr-k8jXteN1.js +7 -0
  40. package/dist/assets/{fuel-DAxqtWTp.js → fuel-D2QywWA1.js} +1 -1
  41. package/dist/assets/{gen-access-key-DnFZ5j_f.js → gen-access-key-CsAuE1ey.js} +1 -1
  42. package/dist/assets/{gen-simple-access-key-D0cY_mzH.js → gen-simple-access-key-BOAC0Yfv.js} +1 -1
  43. package/dist/assets/{get-safe-url-b0FoyA1U.js → get-safe-url-D0cItynk.js} +1 -1
  44. package/dist/assets/hi-CvpI1-tn.js +5 -0
  45. package/dist/assets/{home-BLXMP7Fn.js → home-sZAuweUB.js} +1 -1
  46. package/dist/assets/id-D8coHs1U.js +7 -0
  47. package/dist/assets/{iframe-Cf5bT_6x.js → iframe-NYFbYzoQ.js} +1 -1
  48. package/dist/assets/{index-CWtomC5e.js → index--7-DPN_c.js} +1 -1
  49. package/dist/assets/{index-B11Boj2H.js → index-9P0uzLew.js} +1 -1
  50. package/dist/assets/{index-DX8eFzfu.js → index-BEkcjGoQ.js} +1 -1
  51. package/dist/assets/{index-WkJweVHY.js → index-BH-HC7Ph.js} +1 -1
  52. package/dist/assets/{index-zNB-v-t2.js → index-BOoBQ7dY.js} +1 -1
  53. package/dist/assets/{index-CQOXFqub.js → index-BWJVW6O0.js} +1 -1
  54. package/dist/assets/{index-CLUTu1X-.js → index-Ba6mPf9I.js} +1 -1
  55. package/dist/assets/{index-gIzQEnMj.js → index-BiLP0QV2.js} +3 -3
  56. package/dist/assets/{index-DKSVm7e-.js → index-C3V_Ak74.js} +1 -1
  57. package/dist/assets/{index-DiqdSyj7.js → index-CK2ZwMoB.js} +5 -5
  58. package/dist/assets/{index-DnuNgd04.js → index-CWtUSVIH.js} +1 -1
  59. package/dist/assets/{index--t-eBalO.js → index-Cc_JDDUW.js} +1 -1
  60. package/dist/assets/{index-DIpoCt72.js → index-CdVfZKvV.js} +1 -1
  61. package/dist/assets/{index-aRHQsmOg.js → index-Cfrh8736.js} +1 -1
  62. package/dist/assets/{index-BBGDYmGN.js → index-Ch20_Gn6.js} +1 -1
  63. package/dist/assets/{index-XwZTnGB3.js → index-Ch3guul5.js} +1 -1
  64. package/dist/assets/{index-BYMI0ny4.js → index-Cl9r3uEV.js} +1 -1
  65. package/dist/assets/{index-Crb5v_oP.js → index-CyU0h18X.js} +1 -1
  66. package/dist/assets/{index-CS-lh8B6.js → index-DHkYqLAY.js} +1 -1
  67. package/dist/assets/{index-BQ7b2rES.js → index-DYUtJWG8.js} +1 -1
  68. package/dist/assets/{index-CALyM1b7.js → index-DZXHhkOt.js} +1 -1
  69. package/dist/assets/index-Dh70orck.js +1 -0
  70. package/dist/assets/{index-C-fUoCuC.js → index-DtgymkwS.js} +1 -1
  71. package/dist/assets/{index-DW1-kshH.js → index-kx2x1q2N.js} +1 -1
  72. package/dist/assets/{index-B9JcYhlg.js → index-sEUo7wfw.js} +1 -1
  73. package/dist/assets/{index-DByR2J-y.js → index-vI-j8RJ2.js} +2 -2
  74. package/dist/assets/{invitation-DDf3OBDz.js → invitation-DTvxpx-M.js} +1 -1
  75. package/dist/assets/{invitations-D12iZAQL.js → invitations-DaZ82lJz.js} +1 -1
  76. package/dist/assets/{invite-Df9QWw7t.js → invite-B9UmiQDw.js} +1 -1
  77. package/dist/assets/{isURL-bkdgf1x2.js → isURL-DI8OpvEf.js} +1 -1
  78. package/dist/assets/{issue-passport-gNt3LqEb.js → issue-passport-D5GApp70.js} +1 -1
  79. package/dist/assets/{item-1yEVSl8f.js → item-D1yR_MDv.js} +1 -1
  80. package/dist/assets/ja-Dkn5OA2r.js +9 -0
  81. package/dist/assets/ko-DXfRo0NY.js +9 -0
  82. package/dist/assets/{landing-page-DIy3L18O.js → landing-page-BIWKEZD_.js} +1 -1
  83. package/dist/assets/{layout-CgGSszKF.js → layout-BLkdV05j.js} +1 -1
  84. package/dist/assets/{list-CSWSdurz.js → list-Cyphcnxa.js} +1 -1
  85. package/dist/assets/{list-Bj4EH_EL.js → list-rzFnsBFB.js} +1 -1
  86. package/dist/assets/{localization-CgrsqMtL.js → localization-DorjASD7.js} +1 -1
  87. package/dist/assets/{log-B_J8mg8B.js → log-CJ_iyIlL.js} +1 -1
  88. package/dist/assets/{login-Bio30C4m.js → login-DGJOwn5p.js} +1 -1
  89. package/dist/assets/{login-oauth-callback-D0EhzZTU.js → login-oauth-callback-BYfBr2PG.js} +1 -1
  90. package/dist/assets/{logo-uploader-DnA7whvY.js → logo-uploader-JGejQIFw.js} +1 -1
  91. package/dist/assets/{lost-passport-CM51lU3r.js → lost-passport-BNK7HPbD.js} +1 -1
  92. package/dist/assets/{open-window-z11fkxAm.js → open-window-C3jjCeaT.js} +1 -1
  93. package/dist/assets/{over-due-invoice-payment-B7tDPPws.js → over-due-invoice-payment-Db3XRUjV.js} +1 -1
  94. package/dist/assets/{overview-1UV4-LGy.js → overview-BXpe9azn.js} +1 -1
  95. package/dist/assets/{passport-BxAsPdEH.js → passport-D9DnlXMQ.js} +1 -1
  96. package/dist/assets/{passport-item-DmCvf5Er.js → passport-item-DouM676j.js} +1 -1
  97. package/dist/assets/{permission-t78Xon7o.js → permission-CFZyPM8U.js} +1 -1
  98. package/dist/assets/{preferences-K24ynDKn.js → preferences-DfiBTjAd.js} +1 -1
  99. package/dist/assets/{profile-embed-DXvSNJu_.js → profile-embed-Dt_zuZJQ.js} +1 -1
  100. package/dist/assets/pt-CNQsUMCu.js +5 -0
  101. package/dist/assets/{publish-resource-BM96DWgo.js → publish-resource-CO34lIX9.js} +1 -1
  102. package/dist/assets/ru-CjyCft4V.js +5 -0
  103. package/dist/assets/{runtime-RJv_jEZF.js → runtime-C2bubBwk.js} +1 -1
  104. package/dist/assets/sdk-lNpIX04q.js +1 -0
  105. package/dist/assets/{security-C-ANgtMR.js → security-D5ayNbch.js} +1 -1
  106. package/dist/assets/{session-Dt50YAVT.js → session-DkvXxWtg.js} +1 -1
  107. package/dist/assets/{setup-BryxUu7A.js → setup-DvZls4Lo.js} +1 -1
  108. package/dist/assets/{simple-select-DZvdqo7G.js → simple-select-BP2aEPA1.js} +1 -1
  109. package/dist/assets/{spaces-BRmoEATc.js → spaces-Crb6xNg_.js} +1 -1
  110. package/dist/assets/{start-CChSAOWC.js → start-DEanO3ch.js} +1 -1
  111. package/dist/assets/{starting-progress-Dn3jpzSc.js → starting-progress-CZvfzqkC.js} +1 -1
  112. package/dist/assets/status-De4_OTsm.js +1 -0
  113. package/dist/assets/{step-actions-BursUhDh.js → step-actions-B3C_rdx7.js} +1 -1
  114. package/dist/assets/{studio-Cfhka82V.js → studio-BqxKVD_H.js} +1 -1
  115. package/dist/assets/{team-W2Fdvkfl.js → team-zaYl7mkh.js} +1 -1
  116. package/dist/assets/th-WQWRMKAv.js +5 -0
  117. package/dist/assets/{traffic-DKKjsKRb.js → traffic-ZVRPMYlF.js} +1 -1
  118. package/dist/assets/{transfer-Dji3lOoL.js → transfer-vhH8WqET.js} +1 -1
  119. package/dist/assets/{unsubscribe-Dszf0vso.js → unsubscribe-D400O_ym.js} +1 -1
  120. package/dist/assets/{use-app-logo-Bu9kUO2d.js → use-app-logo-RgeQYsuM.js} +1 -1
  121. package/dist/assets/{user-center-BuHH3C1u.js → user-center-Dyu4ORgh.js} +2 -2
  122. package/dist/assets/{user-follower-Bn21LRum.js → user-follower-DoonDjSz.js} +1 -1
  123. package/dist/assets/{util-qnRu_NH_.js → util-BIClPSUX.js} +1 -1
  124. package/dist/assets/{util-Byg5myf8.js → util-Dcv5G2iK.js} +1 -1
  125. package/dist/assets/vi-Br98wbNi.js +5 -0
  126. package/dist/assets/{wait-connect-z8A2YqYx.js → wait-connect-DUwp6hVe.js} +1 -1
  127. package/dist/assets/{wizard-gl51MV0G.js → wizard-CXL7I23B.js} +1 -1
  128. package/dist/assets/{wizard-components-Bu-3Twf8.js → wizard-components-CZc8F6Ff.js} +1 -1
  129. package/dist/assets/{wrap-locale-DwrX4tfZ.js → wrap-locale-D5BJMkAL.js} +1 -1
  130. package/dist/assets/{zh-5FnkOdV9.js → zh-BvhUUizT.js} +1 -1
  131. package/dist/assets/{zh-Daif36Hm.js → zh-DB1zAstv.js} +1 -1
  132. package/dist/assets/zh-tw-DVMVT9am.js +9 -0
  133. package/dist/index.html +1 -1
  134. package/dist/service-worker.js +1 -1
  135. package/package.json +23 -23
  136. package/dist/assets/ar-CCM7LUa7.js +0 -7
  137. package/dist/assets/de-STCToRpb.js +0 -7
  138. package/dist/assets/engine-D5_fEmdT.js +0 -1
  139. package/dist/assets/es-CrUw-8oc.js +0 -9
  140. package/dist/assets/fr-B6GuZu9m.js +0 -7
  141. package/dist/assets/hi-Cw_VH7M3.js +0 -5
  142. package/dist/assets/id-ErxRX4DU.js +0 -7
  143. package/dist/assets/index-DCa5wWAd.js +0 -1
  144. package/dist/assets/ja-CvssCilG.js +0 -9
  145. package/dist/assets/ko-CwfYSSYs.js +0 -9
  146. package/dist/assets/pt-DiKRyIZy.js +0 -5
  147. package/dist/assets/ru-5wNmeEUO.js +0 -5
  148. package/dist/assets/sdk-2Xqu2SZD.js +0 -1
  149. package/dist/assets/status-Ukzm4O8y.js +0 -1
  150. package/dist/assets/th-B6ebKspD.js +0 -5
  151. package/dist/assets/vi-PpVWvm1I.js +0 -5
  152. package/dist/assets/zh-tw-C3Px30Ps.js +0 -9
@@ -1,4 +1,4 @@
1
- import{at as fe,j as Y,W as te,J as Ye,bi as Xe,Q as Je,ak as _e,a6 as Le,cO as Ze,y as Fe,bc as We,M as Ue,cj as Qe,z as et}from"./vendor-mui-core-___CiWHn.js";import{u as tt}from"./useLocalStorage-CbmitI3m.js";import{p as De,a as it,d as rt,g as Ne,r as oe}from"./vendor-react-CUXIiAnY.js";import{d as st,n as Re}from"./vendor-utils-Doa0RxLS.js";import{aG as nt,_ as $e,a1 as ot}from"./index-DiqdSyj7.js";import{V as at,n as Ae,b as ht,H as lt}from"./vendor-ux-pxYpYMxD.js";import{B as ct}from"./bundle-avatar--3Ig7ZeD.js";import"./vendor-arcblock-DBEMYjVA.js";import"./vendor-hooks-L8kZVRUL.js";import"./lottie-web-4koyQiv_.js";var ye={exports:{}},Be;function dt(){return Be||(Be=1,function(G,V){(function(j,K){G.exports=K()})(globalThis,()=>(()=>{var j={4567:function(R,s,o){var c=this&&this.__decorate||function(e,r,a,f){var p,g=arguments.length,l=g<3?r:f===null?f=Object.getOwnPropertyDescriptor(r,a):f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(e,r,a,f);else for(var m=e.length-1;m>=0;m--)(p=e[m])&&(l=(g<3?p(l):g>3?p(r,a,l):p(r,a))||l);return g>3&&l&&Object.defineProperty(r,a,l),l},_=this&&this.__param||function(e,r){return function(a,f){r(a,f,e)}};Object.defineProperty(s,"__esModule",{value:!0}),s.AccessibilityManager=void 0;const n=o(9042),d=o(9924),u=o(844),v=o(4725),h=o(2585),t=o(3656);let i=s.AccessibilityManager=class extends u.Disposable{constructor(e,r,a,f){super(),this._terminal=e,this._coreBrowserService=a,this._renderService=f,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let p=0;p<this._terminal.rows;p++)this._rowElements[p]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[p]);if(this._topBoundaryFocusListener=p=>this._handleBoundaryFocus(p,0),this._bottomBoundaryFocusListener=p=>this._handleBoundaryFocus(p,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new d.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize(p=>this._handleResize(p.rows))),this.register(this._terminal.onRender(p=>this._refreshRows(p.start,p.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(p=>this._handleChar(p))),this.register(this._terminal.onLineFeed(()=>this._handleChar(`
1
+ import{at as fe,j as Y,W as te,J as Ye,bi as Xe,Q as Je,ak as _e,a6 as Le,cO as Ze,y as Fe,bc as We,M as Ue,cj as Qe,z as et}from"./vendor-mui-core-___CiWHn.js";import{u as tt}from"./useLocalStorage-CbmitI3m.js";import{p as De,a as it,d as rt,g as Ne,r as oe}from"./vendor-react-CUXIiAnY.js";import{d as st,n as Re}from"./vendor-utils-Doa0RxLS.js";import{aG as nt,_ as $e,a1 as ot}from"./index-CK2ZwMoB.js";import{V as at,n as Ae,b as ht,H as lt}from"./vendor-ux-pxYpYMxD.js";import{B as ct}from"./bundle-avatar-Dtrtu9tJ.js";import"./vendor-arcblock-DBEMYjVA.js";import"./vendor-hooks-L8kZVRUL.js";import"./lottie-web-4koyQiv_.js";var ye={exports:{}},Be;function dt(){return Be||(Be=1,function(G,V){(function(j,K){G.exports=K()})(globalThis,()=>(()=>{var j={4567:function(R,s,o){var c=this&&this.__decorate||function(e,r,a,f){var p,g=arguments.length,l=g<3?r:f===null?f=Object.getOwnPropertyDescriptor(r,a):f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(e,r,a,f);else for(var m=e.length-1;m>=0;m--)(p=e[m])&&(l=(g<3?p(l):g>3?p(r,a,l):p(r,a))||l);return g>3&&l&&Object.defineProperty(r,a,l),l},_=this&&this.__param||function(e,r){return function(a,f){r(a,f,e)}};Object.defineProperty(s,"__esModule",{value:!0}),s.AccessibilityManager=void 0;const n=o(9042),d=o(9924),u=o(844),v=o(4725),h=o(2585),t=o(3656);let i=s.AccessibilityManager=class extends u.Disposable{constructor(e,r,a,f){super(),this._terminal=e,this._coreBrowserService=a,this._renderService=f,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let p=0;p<this._terminal.rows;p++)this._rowElements[p]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[p]);if(this._topBoundaryFocusListener=p=>this._handleBoundaryFocus(p,0),this._bottomBoundaryFocusListener=p=>this._handleBoundaryFocus(p,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new d.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize(p=>this._handleResize(p.rows))),this.register(this._terminal.onRender(p=>this._refreshRows(p.start,p.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(p=>this._handleChar(p))),this.register(this._terminal.onLineFeed(()=>this._handleChar(`
2
2
  `))),this.register(this._terminal.onA11yTab(p=>this._handleTab(p))),this.register(this._terminal.onKey(p=>this._handleKey(p.key))),this.register(this._terminal.onBlur(()=>this._clearLiveRegion())),this.register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this.register((0,t.addDisposableDomListener)(document,"selectionchange",()=>this._handleSelectionChange())),this.register(this._coreBrowserService.onDprChange(()=>this._refreshRowsDimensions())),this._refreshRows(),this.register((0,u.toDisposable)(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(e){for(let r=0;r<e;r++)this._handleChar(" ")}_handleChar(e){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==e&&(this._charsToAnnounce+=e):this._charsToAnnounce+=e,e===`
3
3
  `&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=n.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(e){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(e)||this._charsToConsume.push(e)}_refreshRows(e,r){this._liveRegionDebouncer.refresh(e,r,this._terminal.rows)}_renderRows(e,r){const a=this._terminal.buffer,f=a.lines.length.toString();for(let p=e;p<=r;p++){const g=a.lines.get(a.ydisp+p),l=[],m=g?.translateToString(!0,void 0,void 0,l)||"",E=(a.ydisp+p+1).toString(),x=this._rowElements[p];x&&(m.length===0?(x.innerText=" ",this._rowColumns.set(x,[0,1])):(x.textContent=m,this._rowColumns.set(x,l)),x.setAttribute("aria-posinset",E),x.setAttribute("aria-setsize",f))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(e,r){const a=e.target,f=this._rowElements[r===0?1:this._rowElements.length-2];if(a.getAttribute("aria-posinset")===(r===0?"1":`${this._terminal.buffer.lines.length}`)||e.relatedTarget!==f)return;let p,g;if(r===0?(p=a,g=this._rowElements.pop(),this._rowContainer.removeChild(g)):(p=this._rowElements.shift(),g=a,this._rowContainer.removeChild(p)),p.removeEventListener("focus",this._topBoundaryFocusListener),g.removeEventListener("focus",this._bottomBoundaryFocusListener),r===0){const l=this._createAccessibilityTreeNode();this._rowElements.unshift(l),this._rowContainer.insertAdjacentElement("afterbegin",l)}else{const l=this._createAccessibilityTreeNode();this._rowElements.push(l),this._rowContainer.appendChild(l)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(r===0?-1:1),this._rowElements[r===0?1:this._rowElements.length-2].focus(),e.preventDefault(),e.stopImmediatePropagation()}_handleSelectionChange(){if(this._rowElements.length===0)return;const e=document.getSelection();if(!e)return;if(e.isCollapsed)return void(this._rowContainer.contains(e.anchorNode)&&this._terminal.clearSelection());if(!e.anchorNode||!e.focusNode)return void console.error("anchorNode and/or focusNode are null");let r={node:e.anchorNode,offset:e.anchorOffset},a={node:e.focusNode,offset:e.focusOffset};if((r.node.compareDocumentPosition(a.node)&Node.DOCUMENT_POSITION_PRECEDING||r.node===a.node&&r.offset>a.offset)&&([r,a]=[a,r]),r.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(r={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(r.node))return;const f=this._rowElements.slice(-1)[0];if(a.node.compareDocumentPosition(f)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(a={node:f,offset:f.textContent?.length??0}),!this._rowContainer.contains(a.node))return;const p=({node:m,offset:E})=>{const x=m instanceof Text?m.parentNode:m;let L=parseInt(x?.getAttribute("aria-posinset"),10)-1;if(isNaN(L))return console.warn("row is invalid. Race condition?"),null;const b=this._rowColumns.get(x);if(!b)return console.warn("columns is null. Race condition?"),null;let A=E<b.length?b[E]:b.slice(-1)[0]+1;return A>=this._terminal.cols&&(++L,A=0),{row:L,column:A}},g=p(r),l=p(a);if(g&&l){if(g.row>l.row||g.row===l.row&&g.column>=l.column)throw new Error("invalid range");this._terminal.select(g.column,g.row,(l.row-g.row)*this._terminal.cols-g.column+l.column)}}_handleResize(e){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let r=this._rowContainer.children.length;r<this._terminal.rows;r++)this._rowElements[r]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[r]);for(;this._rowElements.length>e;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const e=this._coreBrowserService.mainDocument.createElement("div");return e.setAttribute("role","listitem"),e.tabIndex=-1,this._refreshRowDimensions(e),e}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let e=0;e<this._terminal.rows;e++)this._refreshRowDimensions(this._rowElements[e])}}_refreshRowDimensions(e){e.style.height=`${this._renderService.dimensions.css.cell.height}px`}};s.AccessibilityManager=i=c([_(1,h.IInstantiationService),_(2,v.ICoreBrowserService),_(3,v.IRenderService)],i)},3614:(R,s)=>{function o(d){return d.replace(/\r?\n/g,"\r")}function c(d,u){return u?"\x1B[200~"+d+"\x1B[201~":d}function _(d,u,v,h){d=c(d=o(d),v.decPrivateModes.bracketedPasteMode&&h.rawOptions.ignoreBracketedPasteMode!==!0),v.triggerDataEvent(d,!0),u.value=""}function n(d,u,v){const h=v.getBoundingClientRect(),t=d.clientX-h.left-10,i=d.clientY-h.top-10;u.style.width="20px",u.style.height="20px",u.style.left=`${t}px`,u.style.top=`${i}px`,u.style.zIndex="1000",u.focus()}Object.defineProperty(s,"__esModule",{value:!0}),s.rightClickHandler=s.moveTextAreaUnderMouseCursor=s.paste=s.handlePasteEvent=s.copyHandler=s.bracketTextForPaste=s.prepareTextForTerminal=void 0,s.prepareTextForTerminal=o,s.bracketTextForPaste=c,s.copyHandler=function(d,u){d.clipboardData&&d.clipboardData.setData("text/plain",u.selectionText),d.preventDefault()},s.handlePasteEvent=function(d,u,v,h){d.stopPropagation(),d.clipboardData&&_(d.clipboardData.getData("text/plain"),u,v,h)},s.paste=_,s.moveTextAreaUnderMouseCursor=n,s.rightClickHandler=function(d,u,v,h,t){n(d,u,v),t&&h.rightClickSelect(d),u.value=h.selectionText,u.select()}},7239:(R,s,o)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.ColorContrastCache=void 0;const c=o(1505);s.ColorContrastCache=class{constructor(){this._color=new c.TwoKeyMap,this._css=new c.TwoKeyMap}setCss(_,n,d){this._css.set(_,n,d)}getCss(_,n){return this._css.get(_,n)}setColor(_,n,d){this._color.set(_,n,d)}getColor(_,n){return this._color.get(_,n)}clear(){this._color.clear(),this._css.clear()}}},3656:(R,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.addDisposableDomListener=void 0,s.addDisposableDomListener=function(o,c,_,n){o.addEventListener(c,_,n);let d=!1;return{dispose:()=>{d||(d=!0,o.removeEventListener(c,_,n))}}}},3551:function(R,s,o){var c=this&&this.__decorate||function(i,e,r,a){var f,p=arguments.length,g=p<3?e:a===null?a=Object.getOwnPropertyDescriptor(e,r):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(i,e,r,a);else for(var l=i.length-1;l>=0;l--)(f=i[l])&&(g=(p<3?f(g):p>3?f(e,r,g):f(e,r))||g);return p>3&&g&&Object.defineProperty(e,r,g),g},_=this&&this.__param||function(i,e){return function(r,a){e(r,a,i)}};Object.defineProperty(s,"__esModule",{value:!0}),s.Linkifier=void 0;const n=o(3656),d=o(8460),u=o(844),v=o(2585),h=o(4725);let t=s.Linkifier=class extends u.Disposable{get currentLink(){return this._currentLink}constructor(i,e,r,a,f){super(),this._element=i,this._mouseService=e,this._renderService=r,this._bufferService=a,this._linkProviderService=f,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new d.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new d.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,u.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,u.toDisposable)(()=>{this._lastMouseEvent=void 0,this._activeProviderReplies?.clear()})),this.register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0})),this.register((0,n.addDisposableDomListener)(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this.register((0,n.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,n.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,n.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(i){this._lastMouseEvent=i;const e=this._positionFromMouseEvent(i,this._element,this._mouseService);if(!e)return;this._isMouseOut=!1;const r=i.composedPath();for(let a=0;a<r.length;a++){const f=r[a];if(f.classList.contains("xterm"))break;if(f.classList.contains("xterm-hover"))return}this._lastBufferCell&&e.x===this._lastBufferCell.x&&e.y===this._lastBufferCell.y||(this._handleHover(e),this._lastBufferCell=e)}_handleHover(i){if(this._activeLine!==i.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(i,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,i)||(this._clearCurrentLink(),this._askForLink(i,!0))}_askForLink(i,e){this._activeProviderReplies&&e||(this._activeProviderReplies?.forEach(a=>{a?.forEach(f=>{f.link.dispose&&f.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=i.y);let r=!1;for(const[a,f]of this._linkProviderService.linkProviders.entries())e?this._activeProviderReplies?.get(a)&&(r=this._checkLinkProviderResult(a,i,r)):f.provideLinks(i.y,p=>{if(this._isMouseOut)return;const g=p?.map(l=>({link:l}));this._activeProviderReplies?.set(a,g),r=this._checkLinkProviderResult(a,i,r),this._activeProviderReplies?.size===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(i.y,this._activeProviderReplies)})}_removeIntersectingLinks(i,e){const r=new Set;for(let a=0;a<e.size;a++){const f=e.get(a);if(f)for(let p=0;p<f.length;p++){const g=f[p],l=g.link.range.start.y<i?0:g.link.range.start.x,m=g.link.range.end.y>i?this._bufferService.cols:g.link.range.end.x;for(let E=l;E<=m;E++){if(r.has(E)){f.splice(p--,1);break}r.add(E)}}}}_checkLinkProviderResult(i,e,r){if(!this._activeProviderReplies)return r;const a=this._activeProviderReplies.get(i);let f=!1;for(let p=0;p<i;p++)this._activeProviderReplies.has(p)&&!this._activeProviderReplies.get(p)||(f=!0);if(!f&&a){const p=a.find(g=>this._linkAtPosition(g.link,e));p&&(r=!0,this._handleNewLink(p))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!r)for(let p=0;p<this._activeProviderReplies.size;p++){const g=this._activeProviderReplies.get(p)?.find(l=>this._linkAtPosition(l.link,e));if(g){r=!0,this._handleNewLink(g);break}}return r}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(i){if(!this._currentLink)return;const e=this._positionFromMouseEvent(i,this._element,this._mouseService);e&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,e)&&this._currentLink.link.activate(i,this._currentLink.link.text)}_clearCurrentLink(i,e){this._currentLink&&this._lastMouseEvent&&(!i||!e||this._currentLink.link.range.start.y>=i&&this._currentLink.link.range.end.y<=e)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,u.disposeArray)(this._linkCacheDisposables))}_handleNewLink(i){if(!this._lastMouseEvent)return;const e=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);e&&this._linkAtPosition(i.link,e)&&(this._currentLink=i,this._currentLink.state={decorations:{underline:i.link.decorations===void 0||i.link.decorations.underline,pointerCursor:i.link.decorations===void 0||i.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,i.link,this._lastMouseEvent),i.link.decorations={},Object.defineProperties(i.link.decorations,{pointerCursor:{get:()=>this._currentLink?.state?.decorations.pointerCursor,set:r=>{this._currentLink?.state&&this._currentLink.state.decorations.pointerCursor!==r&&(this._currentLink.state.decorations.pointerCursor=r,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",r))}},underline:{get:()=>this._currentLink?.state?.decorations.underline,set:r=>{this._currentLink?.state&&this._currentLink?.state?.decorations.underline!==r&&(this._currentLink.state.decorations.underline=r,this._currentLink.state.isHovered&&this._fireUnderlineEvent(i.link,r))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(r=>{if(!this._currentLink)return;const a=r.start===0?0:r.start+1+this._bufferService.buffer.ydisp,f=this._bufferService.buffer.ydisp+1+r.end;if(this._currentLink.link.range.start.y>=a&&this._currentLink.link.range.end.y<=f&&(this._clearCurrentLink(a,f),this._lastMouseEvent)){const p=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);p&&this._askForLink(p,!1)}})))}_linkHover(i,e,r){this._currentLink?.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(e,!0),this._currentLink.state.decorations.pointerCursor&&i.classList.add("xterm-cursor-pointer")),e.hover&&e.hover(r,e.text)}_fireUnderlineEvent(i,e){const r=i.range,a=this._bufferService.buffer.ydisp,f=this._createLinkUnderlineEvent(r.start.x-1,r.start.y-a-1,r.end.x,r.end.y-a-1,void 0);(e?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(f)}_linkLeave(i,e,r){this._currentLink?.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(e,!1),this._currentLink.state.decorations.pointerCursor&&i.classList.remove("xterm-cursor-pointer")),e.leave&&e.leave(r,e.text)}_linkAtPosition(i,e){const r=i.range.start.y*this._bufferService.cols+i.range.start.x,a=i.range.end.y*this._bufferService.cols+i.range.end.x,f=e.y*this._bufferService.cols+e.x;return r<=f&&f<=a}_positionFromMouseEvent(i,e,r){const a=r.getCoords(i,e,this._bufferService.cols,this._bufferService.rows);if(a)return{x:a[0],y:a[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(i,e,r,a,f){return{x1:i,y1:e,x2:r,y2:a,cols:this._bufferService.cols,fg:f}}};s.Linkifier=t=c([_(1,h.IMouseService),_(2,h.IRenderService),_(3,v.IBufferService),_(4,h.ILinkProviderService)],t)},9042:(R,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.tooMuchOutput=s.promptLabel=void 0,s.promptLabel="Terminal input",s.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(R,s,o){var c=this&&this.__decorate||function(h,t,i,e){var r,a=arguments.length,f=a<3?t:e===null?e=Object.getOwnPropertyDescriptor(t,i):e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(h,t,i,e);else for(var p=h.length-1;p>=0;p--)(r=h[p])&&(f=(a<3?r(f):a>3?r(t,i,f):r(t,i))||f);return a>3&&f&&Object.defineProperty(t,i,f),f},_=this&&this.__param||function(h,t){return function(i,e){t(i,e,h)}};Object.defineProperty(s,"__esModule",{value:!0}),s.OscLinkProvider=void 0;const n=o(511),d=o(2585);let u=s.OscLinkProvider=class{constructor(h,t,i){this._bufferService=h,this._optionsService=t,this._oscLinkService=i}provideLinks(h,t){const i=this._bufferService.buffer.lines.get(h-1);if(!i)return void t(void 0);const e=[],r=this._optionsService.rawOptions.linkHandler,a=new n.CellData,f=i.getTrimmedLength();let p=-1,g=-1,l=!1;for(let m=0;m<f;m++)if(g!==-1||i.hasContent(m)){if(i.loadCell(m,a),a.hasExtendedAttrs()&&a.extended.urlId){if(g===-1){g=m,p=a.extended.urlId;continue}l=a.extended.urlId!==p}else g!==-1&&(l=!0);if(l||g!==-1&&m===f-1){const E=this._oscLinkService.getLinkData(p)?.uri;if(E){const x={start:{x:g+1,y:h},end:{x:m+(l||m!==f-1?0:1),y:h}};let L=!1;if(!r?.allowNonHttpProtocols)try{const b=new URL(E);["http:","https:"].includes(b.protocol)||(L=!0)}catch{L=!0}L||e.push({text:E,range:x,activate:(b,A)=>r?r.activate(b,A,x):v(0,A),hover:(b,A)=>r?.hover?.(b,A,x),leave:(b,A)=>r?.leave?.(b,A,x)})}l=!1,a.hasExtendedAttrs()&&a.extended.urlId?(g=m,p=a.extended.urlId):(g=-1,p=-1)}}t(e)}};function v(h,t){if(confirm(`Do you want to navigate to ${t}?
4
4
 
@@ -1 +1 @@
1
- import{j as e,ak as p,T as I,W as c,am as K,Q as O,bO as de,a6 as pe}from"./vendor-mui-core-___CiWHn.js";import{f as fe,a as ue,b as ge,h as me}from"./vendor-hooks-L8kZVRUL.js";import{r as J,i as he}from"./vendor-react-CUXIiAnY.js";import{a as we,a8 as xe,R as ye,c as L,au as Pe,H as Q,s as ke,b as ve,a2 as $,av as je,aw as be}from"./index-DiqdSyj7.js";import{C as W,b as _,J as Ie,c as Ce}from"./vendor-utils-Doa0RxLS.js";import{o as Te}from"./vendor-arcblock-DBEMYjVA.js";import{$ as Le,e as _e,V as X,B,d as Re,C as We,D as Ae,H as M,y as Ee,F as V}from"./vendor-ux-pxYpYMxD.js";import{u as Ne}from"./use-passport-id-B-b-_oYF.js";import{g as z}from"./get-safe-url-b0FoyA1U.js";import{d as R}from"./logger-QD2VS2Mb.js";import"./lottie-web-4koyQiv_.js";function G({blocklet:a=window.blocklet}){return e.jsxs(p,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"space-between"},children:[e.jsx(Le,{variant:"rounded",shape:"square",did:a.appPid,src:a.appLogo,size:80}),e.jsx(I,{component:"h2",variant:"h6",children:a.appName}),e.jsx(_e,{did:a.appPid})]})}const Se=J.memo(G);G.propTypes={blocklet:c.shape({appName:c.string,appLogo:c.string,appPid:c.string})};const Ue=()=>window.blocklet?.componentMountPoints?.find(s=>s.did==="z2qaCNvKMv5GjouKdcDWexv6WqtHbpNPQDnAk")?.mountPoint;function Y({children:a=null,cta:s=null,...i}){return e.jsxs(p,{...i,children:[a?e.jsx(p,{sx:{maxHeight:"50vh",overflow:"hidden",position:"relative",":after":{content:'""',position:"absolute",left:0,right:0,bottom:0,height:"80%",background:"linear-gradient(transparent, #fff 85%)"}},children:a}):null,s?e.jsx(p,{sx:{display:"flex",flexDirection:"column",alignItems:"center",py:4,borderRadius:2},children:s}):null]})}Y.propTypes={children:c.node,cta:c.node};function Z({passports:a=[],onConnect:s=()=>{},redirect:i,...y}){const{t:f}=X(),P=Ue(),k=l=>{const g=l?.payable;return P&&g?W(P,`/api/redirect/checkout/${g}?redirect=${i}`):null};return e.jsxs(p,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:2,minHeight:"100vh",maxWidth:"400px",margin:"auto",paddingBottom:{sx:0,md:15}},children:[e.jsx(Se,{}),e.jsx(Y,{...y,cta:e.jsxs(e.Fragment,{children:[e.jsx(I,{variant:"h4",sx:{mx:2,textAlign:"center",fontWeight:"bold",color:"warning.main"},children:f("login.accessLimit.title")}),e.jsx(I,{variant:"body1",sx:{maxWidth:620,mt:2,mx:2,textAlign:"center",color:"gray"},children:f("login.accessLimit.description")}),e.jsx(p,{sx:{display:"flex",flexWrap:"wrap",justifyContent:"center",gap:1,mt:5},children:a?.map(l=>{const g=k(l);return g?e.jsx(K,{title:f("login.accessLimit.buyPassport"),arrow:!0,placement:"top",children:e.jsx(O,{color:"primary",variant:"contained",endIcon:e.jsx(de,{}),href:g,target:"_blank",children:l.title||l.name})},l.name):e.jsx(K,{title:f("login.connectWithPassport"),arrow:!0,placement:"top",children:e.jsx(O,{color:"inherit",variant:"contained",onClick:s,children:l.title||l.name})},l.name)})}),e.jsxs(I,{variant:"body1",sx:{mt:2,color:"grey.400"},children:[e.jsx(p,{component:"span",sx:{display:"inline-block",mr:1},children:f("login.accessLimit.alreadyHavePassport")}),e.jsx(p,{component:"span",sx:{textDecoration:"underline",cursor:"pointer",color:"primary.main"},onClick:s,children:f("common.connect")})]})]})})]})}Z.propTypes={passports:c.arrayOf(c.shape({name:c.string.isRequired,title:c.string,payable:c.string})),onConnect:c.func,onClose:c.func,redirect:c.string.isRequired};function ze(){const a=J.useRef(null),{session:s}=we(),{t:i,locale:y}=X(),{getPassportId:f}=Ne(),P=he(),k=B(),l=Re(),{encryptKey:g,decrypt:ee}=xe(),v=fe(s),{searchParams:o}=new URL(window.location.href),m={passportId:f()},A=o.get("componentId"),E=o.get("authenticated"),ne=o.get("sessionToken"),te=o.get("refreshToken"),oe=o.get("requiredRoles"),u=o.get("redirect"),d=o.get("forceConnected"),j=o.get("sourceAppPid"),C=o.get("origin"),N=o.get("autoConnectWebview"),S=o.get("popup"),U=o.get("showQuickConnect");let h=o.get("inviter");if(!h&&u)try{h=(u.startsWith("http")?new URL(u):new URL(u,window.location.origin)).searchParams.get("inviter")}catch{}h=h||localStorage.getItem("inviter"),A&&(m.componentId=A),k&&(m.visitorId=k),h&&(m.inviter=h),Ce(j)||(j==="null"?m.sourceAppPid=null:j!==null&&(m.sourceAppPid=j));let D=[];try{D=JSON.parse(oe)}catch{}const ie=async n=>{const t=o.get("fromWallet");R("login page notifyWallet",{data:n,fromWallet:t,"browser.wallet":l.wallet}),n&&String(t)==="1"&&l.wallet&&await Promise.any([V.asyncCall("arcSetToken",n),$(3e3)])},T=n=>o.get("encrypted")?ee(n):n,q=async n=>{n&&await ie(n),setTimeout(()=>{if(u){const t=decodeURIComponent(u);t.startsWith(L.WELLKNOWN_SERVICE_PATH_PREFIX)?P(t,{replace:!0}):window.location.replace(z(t))}else window.location.replace(window.env.pathPrefix||"/")},50)},se=n=>{const t={did:n.user.did,host:window.location.host,appPid:window.blocklet.appPid,visitorId:B(),sourceAppPid:n.user.sourceAppPid,fullName:n.user.fullName};R("bridge callArc: onLogin",t),V.callArc("onLogin",t)},H=async(n,t)=>{const w=t(n.sessionToken),b=t(n.refreshToken),x=t(n.visitorId);R("login page onLogin",{result:n,decodeSessionToken:w,decodeRefreshToken:b,decodeVisitorId:x}),ke(w),ve(b),n.visitorId&&Ee(x),await s.refresh(),await $(100),se(v.current);const r={};o.get("saveConnect")?(r.connected_did=v.current.user.did,r.connected_pk=v.current.user.pk,r.connected_wallet_os=v.current.walletOS,r.connected_app=je()):(r.connected_did=o.get("connected_did"),r.connected_pk=o.get("connected_pk"),r.connected_app=o.get("connected_app"),r.connected_wallet_os=o.get("connected_wallet_os")),be(r,!0),q({sessionToken:w,refreshToken:b,visitorId:x})},re=ue(()=>C==="switch-did"?d&&typeof d=="string"?{title:i("login.switchSpecifiedDid.title"),scan:i("login.switchSpecifiedDid.scan",{did:d}),confirm:i("login.switchSpecifiedDid.confirm"),success:i("login.switchSpecifiedDid.success")}:{title:i("login.switchDid.title"),scan:i("login.switchDid.scan"),confirm:i("login.switchDid.confirm"),success:i("login.switchDid.success")}:{title:i("login.connect.title"),scan:i("login.connect.scan"),confirm:i("login.connect.confirm"),success:i("login.connect.success")},[d,C,i]),F=ge(()=>{const n=window?.blocklet,t={className:"connect",popup:!1,action:"login",passkeyBehavior:"both",onSuccess:H,onError:ce,locale:y,messages:re,extraParams:m,baseUrl:window.location.origin,prefix:W(window.location.origin,L.WELLKNOWN_SERVICE_PATH_PREFIX,ye)};d&&(t.forceConnected=d,t.extraParams.enableSwitchApp=!1,t.extraParams.forceConnected=d),t.options||(t.options={}),C==="switch-did"?t.options.showQuickConnect=!0:_(U)||([!1,"false"].includes(U)?t.options.showQuickConnect=!1:t.options.showQuickConnect=!0);const w=We();Ae()&&(t.extraParams.sourceAppPid=w.appPid);const x=W(window.location.origin,L.WELLKNOWN_SERVICE_PATH_PREFIX,"connect"),r={params:Pe(encodeURIComponent(JSON.stringify(t))),appPid:n?.appPid,appName:n?.appName,locale:y,redirect:window.location.href,_ek_:g};_(N)||(r.autoConnectWebview=N),_(S)||(r.popup=S),r.disableClose=!0;const le=z(Ie(x,r),{allowDomains:null});window.location.href=le});me(()=>{if(o.get("sessionToken")){const n=o.get("visitorId");if(!n){M.error("Unexpected login response from server: visitorId is required");return}H({sessionToken:T(ne),refreshToken:T(te),visitorId:T(n)},t=>t)}else!s.user||d&&s.user.did!==d?F():!E&&!o.get("sessionToken")&&q()});const ce=n=>{M.error(n.message)},ae=o.has("popup");if(s.loading||s.user){if(!E||o.get("sessionToken"))return e.jsxs(e.Fragment,{children:[e.jsx(Q,{children:e.jsx("title",{children:i("pageTitle.login")})}),e.jsx(Te,{children:ae?null:e.jsx(pe,{})})]});const n=u?new URL(u,window.location.origin).href:window.location.href;return e.jsx(Z,{onConnect:F,passports:D,redirect:n})}return e.jsxs(e.Fragment,{children:[e.jsx(Q,{children:e.jsx("title",{children:i("pageTitle.login")})}),e.jsx(p,{sx:{"box-sizing":"border-box",width:"100%",height:"100vh",position:"relative",display:"flex","flex-direction":"column",".connect":{background:"#fafafa"}},ref:a})]})}export{ze as default};
1
+ import{j as e,ak as p,T as I,W as c,am as K,Q as O,bO as de,a6 as pe}from"./vendor-mui-core-___CiWHn.js";import{f as fe,a as ue,b as ge,h as me}from"./vendor-hooks-L8kZVRUL.js";import{r as J,i as he}from"./vendor-react-CUXIiAnY.js";import{a as we,a8 as xe,R as ye,c as L,au as Pe,H as Q,s as ke,b as ve,a2 as $,av as je,aw as be}from"./index-CK2ZwMoB.js";import{C as W,b as _,J as Ie,c as Ce}from"./vendor-utils-Doa0RxLS.js";import{o as Te}from"./vendor-arcblock-DBEMYjVA.js";import{$ as Le,e as _e,V as X,B,d as Re,C as We,D as Ae,H as M,y as Ee,F as V}from"./vendor-ux-pxYpYMxD.js";import{u as Ne}from"./use-passport-id-B-b-_oYF.js";import{g as z}from"./get-safe-url-D0cItynk.js";import{d as R}from"./logger-QD2VS2Mb.js";import"./lottie-web-4koyQiv_.js";function G({blocklet:a=window.blocklet}){return e.jsxs(p,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"space-between"},children:[e.jsx(Le,{variant:"rounded",shape:"square",did:a.appPid,src:a.appLogo,size:80}),e.jsx(I,{component:"h2",variant:"h6",children:a.appName}),e.jsx(_e,{did:a.appPid})]})}const Se=J.memo(G);G.propTypes={blocklet:c.shape({appName:c.string,appLogo:c.string,appPid:c.string})};const Ue=()=>window.blocklet?.componentMountPoints?.find(s=>s.did==="z2qaCNvKMv5GjouKdcDWexv6WqtHbpNPQDnAk")?.mountPoint;function Y({children:a=null,cta:s=null,...i}){return e.jsxs(p,{...i,children:[a?e.jsx(p,{sx:{maxHeight:"50vh",overflow:"hidden",position:"relative",":after":{content:'""',position:"absolute",left:0,right:0,bottom:0,height:"80%",background:"linear-gradient(transparent, #fff 85%)"}},children:a}):null,s?e.jsx(p,{sx:{display:"flex",flexDirection:"column",alignItems:"center",py:4,borderRadius:2},children:s}):null]})}Y.propTypes={children:c.node,cta:c.node};function Z({passports:a=[],onConnect:s=()=>{},redirect:i,...y}){const{t:f}=X(),P=Ue(),k=l=>{const g=l?.payable;return P&&g?W(P,`/api/redirect/checkout/${g}?redirect=${i}`):null};return e.jsxs(p,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:2,minHeight:"100vh",maxWidth:"400px",margin:"auto",paddingBottom:{sx:0,md:15}},children:[e.jsx(Se,{}),e.jsx(Y,{...y,cta:e.jsxs(e.Fragment,{children:[e.jsx(I,{variant:"h4",sx:{mx:2,textAlign:"center",fontWeight:"bold",color:"warning.main"},children:f("login.accessLimit.title")}),e.jsx(I,{variant:"body1",sx:{maxWidth:620,mt:2,mx:2,textAlign:"center",color:"gray"},children:f("login.accessLimit.description")}),e.jsx(p,{sx:{display:"flex",flexWrap:"wrap",justifyContent:"center",gap:1,mt:5},children:a?.map(l=>{const g=k(l);return g?e.jsx(K,{title:f("login.accessLimit.buyPassport"),arrow:!0,placement:"top",children:e.jsx(O,{color:"primary",variant:"contained",endIcon:e.jsx(de,{}),href:g,target:"_blank",children:l.title||l.name})},l.name):e.jsx(K,{title:f("login.connectWithPassport"),arrow:!0,placement:"top",children:e.jsx(O,{color:"inherit",variant:"contained",onClick:s,children:l.title||l.name})},l.name)})}),e.jsxs(I,{variant:"body1",sx:{mt:2,color:"grey.400"},children:[e.jsx(p,{component:"span",sx:{display:"inline-block",mr:1},children:f("login.accessLimit.alreadyHavePassport")}),e.jsx(p,{component:"span",sx:{textDecoration:"underline",cursor:"pointer",color:"primary.main"},onClick:s,children:f("common.connect")})]})]})})]})}Z.propTypes={passports:c.arrayOf(c.shape({name:c.string.isRequired,title:c.string,payable:c.string})),onConnect:c.func,onClose:c.func,redirect:c.string.isRequired};function ze(){const a=J.useRef(null),{session:s}=we(),{t:i,locale:y}=X(),{getPassportId:f}=Ne(),P=he(),k=B(),l=Re(),{encryptKey:g,decrypt:ee}=xe(),v=fe(s),{searchParams:o}=new URL(window.location.href),m={passportId:f()},A=o.get("componentId"),E=o.get("authenticated"),ne=o.get("sessionToken"),te=o.get("refreshToken"),oe=o.get("requiredRoles"),u=o.get("redirect"),d=o.get("forceConnected"),j=o.get("sourceAppPid"),C=o.get("origin"),N=o.get("autoConnectWebview"),S=o.get("popup"),U=o.get("showQuickConnect");let h=o.get("inviter");if(!h&&u)try{h=(u.startsWith("http")?new URL(u):new URL(u,window.location.origin)).searchParams.get("inviter")}catch{}h=h||localStorage.getItem("inviter"),A&&(m.componentId=A),k&&(m.visitorId=k),h&&(m.inviter=h),Ce(j)||(j==="null"?m.sourceAppPid=null:j!==null&&(m.sourceAppPid=j));let D=[];try{D=JSON.parse(oe)}catch{}const ie=async n=>{const t=o.get("fromWallet");R("login page notifyWallet",{data:n,fromWallet:t,"browser.wallet":l.wallet}),n&&String(t)==="1"&&l.wallet&&await Promise.any([V.asyncCall("arcSetToken",n),$(3e3)])},T=n=>o.get("encrypted")?ee(n):n,q=async n=>{n&&await ie(n),setTimeout(()=>{if(u){const t=decodeURIComponent(u);t.startsWith(L.WELLKNOWN_SERVICE_PATH_PREFIX)?P(t,{replace:!0}):window.location.replace(z(t))}else window.location.replace(window.env.pathPrefix||"/")},50)},se=n=>{const t={did:n.user.did,host:window.location.host,appPid:window.blocklet.appPid,visitorId:B(),sourceAppPid:n.user.sourceAppPid,fullName:n.user.fullName};R("bridge callArc: onLogin",t),V.callArc("onLogin",t)},H=async(n,t)=>{const w=t(n.sessionToken),b=t(n.refreshToken),x=t(n.visitorId);R("login page onLogin",{result:n,decodeSessionToken:w,decodeRefreshToken:b,decodeVisitorId:x}),ke(w),ve(b),n.visitorId&&Ee(x),await s.refresh(),await $(100),se(v.current);const r={};o.get("saveConnect")?(r.connected_did=v.current.user.did,r.connected_pk=v.current.user.pk,r.connected_wallet_os=v.current.walletOS,r.connected_app=je()):(r.connected_did=o.get("connected_did"),r.connected_pk=o.get("connected_pk"),r.connected_app=o.get("connected_app"),r.connected_wallet_os=o.get("connected_wallet_os")),be(r,!0),q({sessionToken:w,refreshToken:b,visitorId:x})},re=ue(()=>C==="switch-did"?d&&typeof d=="string"?{title:i("login.switchSpecifiedDid.title"),scan:i("login.switchSpecifiedDid.scan",{did:d}),confirm:i("login.switchSpecifiedDid.confirm"),success:i("login.switchSpecifiedDid.success")}:{title:i("login.switchDid.title"),scan:i("login.switchDid.scan"),confirm:i("login.switchDid.confirm"),success:i("login.switchDid.success")}:{title:i("login.connect.title"),scan:i("login.connect.scan"),confirm:i("login.connect.confirm"),success:i("login.connect.success")},[d,C,i]),F=ge(()=>{const n=window?.blocklet,t={className:"connect",popup:!1,action:"login",passkeyBehavior:"both",onSuccess:H,onError:ce,locale:y,messages:re,extraParams:m,baseUrl:window.location.origin,prefix:W(window.location.origin,L.WELLKNOWN_SERVICE_PATH_PREFIX,ye)};d&&(t.forceConnected=d,t.extraParams.enableSwitchApp=!1,t.extraParams.forceConnected=d),t.options||(t.options={}),C==="switch-did"?t.options.showQuickConnect=!0:_(U)||([!1,"false"].includes(U)?t.options.showQuickConnect=!1:t.options.showQuickConnect=!0);const w=We();Ae()&&(t.extraParams.sourceAppPid=w.appPid);const x=W(window.location.origin,L.WELLKNOWN_SERVICE_PATH_PREFIX,"connect"),r={params:Pe(encodeURIComponent(JSON.stringify(t))),appPid:n?.appPid,appName:n?.appName,locale:y,redirect:window.location.href,_ek_:g};_(N)||(r.autoConnectWebview=N),_(S)||(r.popup=S),r.disableClose=!0;const le=z(Ie(x,r),{allowDomains:null});window.location.href=le});me(()=>{if(o.get("sessionToken")){const n=o.get("visitorId");if(!n){M.error("Unexpected login response from server: visitorId is required");return}H({sessionToken:T(ne),refreshToken:T(te),visitorId:T(n)},t=>t)}else!s.user||d&&s.user.did!==d?F():!E&&!o.get("sessionToken")&&q()});const ce=n=>{M.error(n.message)},ae=o.has("popup");if(s.loading||s.user){if(!E||o.get("sessionToken"))return e.jsxs(e.Fragment,{children:[e.jsx(Q,{children:e.jsx("title",{children:i("pageTitle.login")})}),e.jsx(Te,{children:ae?null:e.jsx(pe,{})})]});const n=u?new URL(u,window.location.origin).href:window.location.href;return e.jsx(Z,{onConnect:F,passports:D,redirect:n})}return e.jsxs(e.Fragment,{children:[e.jsx(Q,{children:e.jsx("title",{children:i("pageTitle.login")})}),e.jsx(p,{sx:{"box-sizing":"border-box",width:"100%",height:"100vh",position:"relative",display:"flex","flex-direction":"column",".connect":{background:"#fafafa"}},ref:a})]})}export{ze as default};
@@ -1 +1 @@
1
- import{j as e,av as d,ak as r,T as m,aX as p,Q as u}from"./vendor-mui-core-___CiWHn.js";import{g as x,j as f,h}from"./vendor-hooks-L8kZVRUL.js";import{u as c}from"./vendor-react-CUXIiAnY.js";import{g as j,c as y,k as w,u as C}from"./index-DiqdSyj7.js";import{V as v}from"./vendor-ux-pxYpYMxD.js";import{C as k}from"./vendor-utils-Doa0RxLS.js";import"./vendor-arcblock-DBEMYjVA.js";import"./lottie-web-4koyQiv_.js";const M="authorization_response",A=j();function L(){const{t:s}=v(),[n]=c(),a=()=>{window.close()};return h(()=>{const i=n.get("state"),l=n.get("code"),t={type:M,response:{code:l}};if(window.opener)try{const o=new URL(i);window.opener.postMessage(t,o.origin),setTimeout(()=>{window.close()},2e3)}catch(o){console.error("Invalid login caller",o)}}),e.jsx(p,{severity:"success",children:e.jsxs(r,{sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignContent:"center",gap:1},children:[s("login.needManualClose"),e.jsx(r,{sx:{textAlign:"center"},children:e.jsx(u,{variant:"outlined",size:"small",onClick:a,children:s("login.closeWindow")})})]})})}function b(){const{blocklet:s}=window,[n]=c(),a=n.get("error"),i=n.get("error_description"),l=n.get("state"),t=x({errorMesage:"",loading:!0});f(async()=>{if(a)t.errorMesage=i,t.loading=!1;else try{const g=new URL(l);(await A.federated.getTrustedDomains()).includes(g.hostname)||(t.errorMesage="Invalid login caller")}catch{t.errorMesage="Invalid login caller"}finally{t.loading=!1}},[a,i,l]);const o=k(y.WELLKNOWN_SERVICE_PATH_PREFIX,`/blocklet/logo?&version=${s?.meta?.version||""}`);return e.jsx(d,{sx:{display:"flex",flexDirection:"column",minHeight:"100vh",justifyContent:"center",alignContent:"center"},children:e.jsxs(r,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:2,minHeight:"100vh",margin:"auto",paddingBottom:{sx:0,md:15}},children:[e.jsxs(r,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:.5},children:[e.jsx(r,{component:"img",src:o,alt:`${s?.appName||"site"} logo`,sx:{width:80}}),e.jsx(m,{variant:"h6",component:"p",children:s?.appName})]}),t.loading?t.errorMesage?e.jsx(w,{error:{message:t.errorMesage}}):e.jsx(L,{}):null,e.jsx(C,{sx:{mt:4}})]})})}export{b as default};
1
+ import{j as e,av as d,ak as r,T as m,aX as p,Q as u}from"./vendor-mui-core-___CiWHn.js";import{g as x,j as f,h}from"./vendor-hooks-L8kZVRUL.js";import{u as c}from"./vendor-react-CUXIiAnY.js";import{g as j,c as y,k as w,u as C}from"./index-CK2ZwMoB.js";import{V as v}from"./vendor-ux-pxYpYMxD.js";import{C as k}from"./vendor-utils-Doa0RxLS.js";import"./vendor-arcblock-DBEMYjVA.js";import"./lottie-web-4koyQiv_.js";const M="authorization_response",A=j();function L(){const{t:s}=v(),[n]=c(),a=()=>{window.close()};return h(()=>{const i=n.get("state"),l=n.get("code"),t={type:M,response:{code:l}};if(window.opener)try{const o=new URL(i);window.opener.postMessage(t,o.origin),setTimeout(()=>{window.close()},2e3)}catch(o){console.error("Invalid login caller",o)}}),e.jsx(p,{severity:"success",children:e.jsxs(r,{sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignContent:"center",gap:1},children:[s("login.needManualClose"),e.jsx(r,{sx:{textAlign:"center"},children:e.jsx(u,{variant:"outlined",size:"small",onClick:a,children:s("login.closeWindow")})})]})})}function b(){const{blocklet:s}=window,[n]=c(),a=n.get("error"),i=n.get("error_description"),l=n.get("state"),t=x({errorMesage:"",loading:!0});f(async()=>{if(a)t.errorMesage=i,t.loading=!1;else try{const g=new URL(l);(await A.federated.getTrustedDomains()).includes(g.hostname)||(t.errorMesage="Invalid login caller")}catch{t.errorMesage="Invalid login caller"}finally{t.loading=!1}},[a,i,l]);const o=k(y.WELLKNOWN_SERVICE_PATH_PREFIX,`/blocklet/logo?&version=${s?.meta?.version||""}`);return e.jsx(d,{sx:{display:"flex",flexDirection:"column",minHeight:"100vh",justifyContent:"center",alignContent:"center"},children:e.jsxs(r,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:2,minHeight:"100vh",margin:"auto",paddingBottom:{sx:0,md:15}},children:[e.jsxs(r,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:.5},children:[e.jsx(r,{component:"img",src:o,alt:`${s?.appName||"site"} logo`,sx:{width:80}}),e.jsx(m,{variant:"h6",component:"p",children:s?.appName})]}),t.loading?t.errorMesage?e.jsx(w,{error:{message:t.errorMesage}}):e.jsx(L,{}):null,e.jsx(C,{sx:{mt:4}})]})})}export{b as default};
@@ -1,5 +1,5 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=[window.__toCdnUrl("assets/vendor-ux-DYcPPYq2.css"),window.__toCdnUrl("assets/index-DrVXX4fX.css"),window.__toCdnUrl("assets/index-B5LvOF-F.css")])))=>i.map(i=>d[i]);
2
- import{V as O,q as _,_ as q}from"./vendor-ux-pxYpYMxD.js";import{r as m}from"./vendor-react-CUXIiAnY.js";import{j as o,ak as u,at as k,W as e}from"./vendor-mui-core-___CiWHn.js";import{n as d,C as z}from"./vendor-utils-Doa0RxLS.js";const C=m.lazy(()=>q(()=>import("./index-DByR2J-y.js"),__vite__mapDeps([0,1,2]),import.meta.url).then(t=>({default:t.Uploader}))),F="/blocklet/logo/upload",c=[".png",".jpg",".jpeg",".webp",".bmp",".ico"];function U({url:t,height:f=80,width:g="auto",enabled:s=!0,allowSVG:h=!0,type:r,did:a,prefix:b,headers:x=d,aspectRatio:l=1,minWidth:P=256,minHeight:R=256,onUploaded:j=d,children:n=null}){const{t:v,locale:w}=O(),i=m.useRef(null),p=()=>{i.current?.open()},y=()=>{j(),i.current?.close()},E={cursor:s?"pointer":"default","&::after":{content:`"${v("common.switch")}"`}};return o.jsxs(S,{id:`uploader-${a}-${r}`,children:[o.jsx(C,{ref:i,locale:w,popup:!0,onUploadFinish:y,plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:z(b,F,r,a),disableMediaKitPrefix:!0,disableMediaKitStatus:!0},coreProps:{restrictions:{allowedFileExts:h?[...c,".svg"]:c,maxFileSize:1024*1024*5,maxNumberOfFiles:1}},dashboardProps:{autoOpen:"imageEditor"},imageEditorProps:{actions:{revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!1,cropWidescreen:!1,cropWidescreenVertical:!1},cropperOptions:{autoCrop:!0,autoCropArea:1,aspectRatio:l,initialAspectRatio:l,croppedCanvasOptions:{minWidth:P,minHeight:R}}},tusProps:{headers:x}}),n?o.jsx(u,{onClick:p,children:n}):o.jsx(u,{className:_("uploader-wrapper",s&&"enabled"),sx:E,onClick:p,children:o.jsx("img",{alt:r,src:t,style:{width:g,height:f}})})]},`uploader-${a}-${r}`)}U.propTypes={url:e.string.isRequired,type:e.oneOf(["square","rect","favicon","splash-portrait","splash-landscape","og-image"]).isRequired,did:e.string.isRequired,prefix:e.string.isRequired,headers:e.func,onUploaded:e.func,height:e.number,width:e.any,enabled:e.bool,allowSVG:e.bool,aspectRatio:e.number,minWidth:e.number,minHeight:e.number,children:e.node};const S=k.div`
2
+ import{V as O,q as _,_ as q}from"./vendor-ux-pxYpYMxD.js";import{r as m}from"./vendor-react-CUXIiAnY.js";import{j as o,ak as u,at as k,W as e}from"./vendor-mui-core-___CiWHn.js";import{n as d,C as z}from"./vendor-utils-Doa0RxLS.js";const C=m.lazy(()=>q(()=>import("./index-vI-j8RJ2.js"),__vite__mapDeps([0,1,2]),import.meta.url).then(t=>({default:t.Uploader}))),F="/blocklet/logo/upload",c=[".png",".jpg",".jpeg",".webp",".bmp",".ico"];function U({url:t,height:f=80,width:g="auto",enabled:s=!0,allowSVG:h=!0,type:r,did:a,prefix:b,headers:x=d,aspectRatio:l=1,minWidth:P=256,minHeight:R=256,onUploaded:j=d,children:n=null}){const{t:v,locale:w}=O(),i=m.useRef(null),p=()=>{i.current?.open()},y=()=>{j(),i.current?.close()},E={cursor:s?"pointer":"default","&::after":{content:`"${v("common.switch")}"`}};return o.jsxs(S,{id:`uploader-${a}-${r}`,children:[o.jsx(C,{ref:i,locale:w,popup:!0,onUploadFinish:y,plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:z(b,F,r,a),disableMediaKitPrefix:!0,disableMediaKitStatus:!0},coreProps:{restrictions:{allowedFileExts:h?[...c,".svg"]:c,maxFileSize:1024*1024*5,maxNumberOfFiles:1}},dashboardProps:{autoOpen:"imageEditor"},imageEditorProps:{actions:{revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!1,cropWidescreen:!1,cropWidescreenVertical:!1},cropperOptions:{autoCrop:!0,autoCropArea:1,aspectRatio:l,initialAspectRatio:l,croppedCanvasOptions:{minWidth:P,minHeight:R}}},tusProps:{headers:x}}),n?o.jsx(u,{onClick:p,children:n}):o.jsx(u,{className:_("uploader-wrapper",s&&"enabled"),sx:E,onClick:p,children:o.jsx("img",{alt:r,src:t,style:{width:g,height:f}})})]},`uploader-${a}-${r}`)}U.propTypes={url:e.string.isRequired,type:e.oneOf(["square","rect","favicon","splash-portrait","splash-landscape","og-image"]).isRequired,did:e.string.isRequired,prefix:e.string.isRequired,headers:e.func,onUploaded:e.func,height:e.number,width:e.any,enabled:e.bool,allowSVG:e.bool,aspectRatio:e.number,minWidth:e.number,minHeight:e.number,children:e.node};const S=k.div`
3
3
  .uploader-wrapper {
4
4
  display: inline-flex;
5
5
  position: relative;
@@ -1,4 +1,4 @@
1
- import{j as e,at as $,W as v,J as A,ak as r,b4 as F,b0 as U,T as N,bP as z,bQ as X,bR as H,a$ as B,av as J,bF as V,bS as G,bT as Q}from"./vendor-mui-core-___CiWHn.js";import{p as O,d as q,n as I,_ as K,s as Y,V as Z}from"./vendor-ux-pxYpYMxD.js";import{r as d}from"./vendor-react-CUXIiAnY.js";import{g as ee,n as te}from"./vendor-hooks-L8kZVRUL.js";import{v as D,J as L,H as se,S as oe,s as ae,b as ne}from"./index-DiqdSyj7.js";import{T as re}from"./vendor-utils-Doa0RxLS.js";import{N as ie}from"./index-DIpoCt72.js";import{W as ce}from"./did-address-BKqL0vbP.js";import{w as le}from"./wrap-locale-DwrX4tfZ.js";import{u as pe}from"./use-passport-id-B-b-_oYF.js";import{g as de}from"./get-safe-url-b0FoyA1U.js";import{c as me}from"./passport-BxAsPdEH.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-DBEMYjVA.js";import"./index-DCa5wWAd.js";import"./create-passport-svg-k1mCsufD.js";function W({list:s=[],width:l=300,height:m=400,cardSpace:p=40,onSelect:i=()=>{},defaultIndex:k=0}){const[u,h]=d.useState(0),[o,x]=d.useState(0),b=d.useRef(null),f=n=>{if(n<0||n>s.length-1)return;h(n);const c=b.current.clientWidth;x(n*(l+p)-(c-l)/2+p*.5),i(n)};d.useEffect(()=>{f(k);const n=c=>c.preventDefault();b.current.addEventListener("touchmove",n,{passive:!1})},[]);let a;const j=n=>{a=n.touches[0].clientX},y=n=>{const c=n.changedTouches[0],w=a-c.clientX;Math.abs(w)>60&&(w>0?f(u+1):f(u-1))};return e.jsx(ue,{ref:b,onTouchStart:j,onTouchEnd:y,children:e.jsx("div",{className:"card-container",style:{transform:`translate(${-o}px, 0)`},children:s.map((n,c)=>e.jsx("div",{className:`card-item ${c===u?"selected":""}`,style:{width:l,height:m,margin:p/2},onClick:()=>f(c),children:n.display?e.jsx("div",{className:"card-content",children:e.jsx(ie,{data:n.display,style:{width:"100%",height:"100%"}})}):e.jsx("div",{className:"card-content",dangerouslySetInnerHTML:{__html:n.src}})},n.id))})})}const ue=$.div`
1
+ import{j as e,at as $,W as v,J as A,ak as r,b4 as F,b0 as U,T as N,bP as z,bQ as X,bR as H,a$ as B,av as J,bF as V,bS as G,bT as Q}from"./vendor-mui-core-___CiWHn.js";import{p as O,d as q,n as I,_ as K,s as Y,V as Z}from"./vendor-ux-pxYpYMxD.js";import{r as d}from"./vendor-react-CUXIiAnY.js";import{g as ee,n as te}from"./vendor-hooks-L8kZVRUL.js";import{v as D,J as L,H as se,S as oe,s as ae,b as ne}from"./index-CK2ZwMoB.js";import{T as re}from"./vendor-utils-Doa0RxLS.js";import{N as ie}from"./index-CdVfZKvV.js";import{W as ce}from"./did-address-BKqL0vbP.js";import{w as le}from"./wrap-locale-D5BJMkAL.js";import{u as pe}from"./use-passport-id-B-b-_oYF.js";import{g as de}from"./get-safe-url-D0cItynk.js";import{c as me}from"./passport-D9DnlXMQ.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-DBEMYjVA.js";import"./index-Dh70orck.js";import"./create-passport-svg-k1mCsufD.js";function W({list:s=[],width:l=300,height:m=400,cardSpace:p=40,onSelect:i=()=>{},defaultIndex:k=0}){const[u,h]=d.useState(0),[o,x]=d.useState(0),b=d.useRef(null),f=n=>{if(n<0||n>s.length-1)return;h(n);const c=b.current.clientWidth;x(n*(l+p)-(c-l)/2+p*.5),i(n)};d.useEffect(()=>{f(k);const n=c=>c.preventDefault();b.current.addEventListener("touchmove",n,{passive:!1})},[]);let a;const j=n=>{a=n.touches[0].clientX},y=n=>{const c=n.changedTouches[0],w=a-c.clientX;Math.abs(w)>60&&(w>0?f(u+1):f(u-1))};return e.jsx(ue,{ref:b,onTouchStart:j,onTouchEnd:y,children:e.jsx("div",{className:"card-container",style:{transform:`translate(${-o}px, 0)`},children:s.map((n,c)=>e.jsx("div",{className:`card-item ${c===u?"selected":""}`,style:{width:l,height:m,margin:p/2},onClick:()=>f(c),children:n.display?e.jsx("div",{className:"card-content",children:e.jsx(ie,{data:n.display,style:{width:"100%",height:"100%"}})}):e.jsx("div",{className:"card-content",dangerouslySetInnerHTML:{__html:n.src}})},n.id))})})}const ue=$.div`
2
2
  overflow: hidden;
3
3
  mask-image: linear-gradient(to left, transparent, black 3%, black 97%, transparent);
4
4
  overflow: hidden;
@@ -1 +1 @@
1
- import{j as s}from"./vendor-mui-core-___CiWHn.js";import{r as e}from"./vendor-react-CUXIiAnY.js";import{g as m}from"./get-safe-url-b0FoyA1U.js";import"./index-DiqdSyj7.js";import"./vendor-ux-pxYpYMxD.js";import"./vendor-utils-Doa0RxLS.js";import"./vendor-hooks-L8kZVRUL.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-DBEMYjVA.js";function S(){const r=e.useRef(null),n=e.useRef(Date.now());return e.useEffect(()=>{const t=`open-window-url-${new URLSearchParams(window.location.search).get("key")}`;return r.current=setInterval(()=>{if(Date.now()-n.current>10*1e3){localStorage.removeItem(t),clearInterval(r.current);return}const o=localStorage.getItem(t);if(o)try{const{url:a,time:i}=JSON.parse(o);localStorage.removeItem(t),Date.now()-i<10*1e3&&(window.location.href=m(a,{allowDomains:null}))}catch{}},200),()=>clearInterval(r.current)},[]),s.jsx("div",{})}export{S as default};
1
+ import{j as s}from"./vendor-mui-core-___CiWHn.js";import{r as e}from"./vendor-react-CUXIiAnY.js";import{g as m}from"./get-safe-url-D0cItynk.js";import"./index-CK2ZwMoB.js";import"./vendor-ux-pxYpYMxD.js";import"./vendor-utils-Doa0RxLS.js";import"./vendor-hooks-L8kZVRUL.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-DBEMYjVA.js";function S(){const r=e.useRef(null),n=e.useRef(Date.now());return e.useEffect(()=>{const t=`open-window-url-${new URLSearchParams(window.location.search).get("key")}`;return r.current=setInterval(()=>{if(Date.now()-n.current>10*1e3){localStorage.removeItem(t),clearInterval(r.current);return}const o=localStorage.getItem(t);if(o)try{const{url:a,time:i}=JSON.parse(o);localStorage.removeItem(t),Date.now()-i<10*1e3&&(window.location.href=m(a,{allowDomains:null}))}catch{}},200),()=>clearInterval(r.current)},[]),s.jsx("div",{})}export{S as default};
@@ -1 +1 @@
1
- import{D as be,j as t,b1 as v,aX as se,Q as B,T as S,b0 as ge}from"./vendor-mui-core-___CiWHn.js";import{r as d}from"./vendor-react-CUXIiAnY.js";import{V as Ce,b as je,H as h}from"./vendor-ux-pxYpYMxD.js";import{C as w,d as ke}from"./vendor-utils-Doa0RxLS.js";import{k as Se}from"./vendor-hooks-L8kZVRUL.js";import{w as we,x as M,y as Pe,z as Ee,C as z,D as De,E as $e,F as Te,L as oe,G as Ie}from"./index-DiqdSyj7.js";const ie=async n=>{if(!n.subscriptionId&&!n.customerId)throw new Error("Either subscriptionId or customerId must be provided");let y;return n.subscriptionId?y=`/api/subscriptions/${n.subscriptionId}/overdue/invoices`:y=`/api/customers/${n.customerId}/overdue/invoices`,(await De.get(n.authToken?w(y,`?authToken=${n.authToken}`):y)).data};function ze({subscriptionId:n=void 0,customerId:y=void 0,mode:H="default",dialogProps:g={open:!0},children:P=void 0,onPaid:q=()=>{},detailLinkOptions:p={enabled:!0},successToast:O=!0,alertMessage:N="",authToken:U=void 0}){const{t:r,locale:ce}=Ce(),E=be(),{connect:D,session:ae}=we(),[ue,le]=d.useState(""),[V,x]=d.useState(!1),[de,$]=d.useState(g.open||!1),[me,pe]=d.useState({}),[ye,f]=d.useState({}),[T,I]=d.useState({}),W=d.useRef(T),G=n?"subscription":"customer",u=y||ae?.user?.did,K=n||u,C=d.useRef(u);d.useEffect(()=>{W.current=T},[T]);const{data:i={summary:{},invoices:[]},error:L,loading:fe,runAsync:Q}=Se(()=>ie({subscriptionId:n,customerId:u,authToken:U}),{ready:!!n||!!u,onSuccess:e=>{e.customer?.id&&e.customer?.id!==C.current&&(C.current=e.customer?.id)}}),R=d.useMemo(()=>n?w(M(),`/customer/subscription/${n}`):u?w(M(),"/customer/invoice/past-due"):"",[n,u]),a=d.useMemo(()=>i?.summary?Object.values(i.summary):[],[i?.summary]),X=async e=>{if(W.current[e])try{if((await ie({subscriptionId:n,customerId:u,authToken:U})).invoices?.some(l=>l.currency_id===e))return;I(l=>{const m={...l};return delete m[e],m}),f(l=>({...l,[e]:"success"}))}catch(s){console.error("Error checking Stripe payment completion:",s);return}O&&(h.close(),h.success(r("payment.customer.invoice.paySuccess"))),x(!1),(await Q()).invoices?.length===0&&($(!1),q(K,e,G))},ve=ke(e=>X(e),1e3,{leading:!1,trailing:!0,maxWait:5e3}),_=Pe(),j=Ee("events"),he=async()=>{let e=!1;return await Ie(async()=>(e=(await Q()).invoices?.length===0,e),{interval:2e3,timeout:3*60*1e3}),e},J=async(e,o=!1)=>{if(_)try{const s=await he();O&&(h.close(),h.success(r("payment.customer.invoice.paySuccess"))),s&&($(!1),q(K,e,G))}catch(s){console.error("Check payment status failed:",s)}else o&&(I(s=>({...s,[e]:!0})),f(s=>({...s,[e]:"processing"})))};d.useEffect(()=>{if(!j||_)return;const e=({response:o})=>{const c=`${n||o.customer_id}-${o.currency_id}`;(n&&o.subscription_id===n||u&&u===o.customer_id||C.current&&C.current===o.customer_id)&&(me[c]||(pe(l=>({...l,[c]:1})),ve(o.currency_id)))};return j.on("invoice.paid",e),()=>{j.off("invoice.paid",e)}},[j,n,u]);const Y=e=>{const{currency:o,method:s}=e;if(s.type==="stripe"){h.error(r("payment.subscription.overdue.notSupport"));return}if(!V&&(le(o.id),x(!0),f(c=>({...c,[o.id]:"idle"})),["arcblock","ethereum","base"].includes(s.type))){const c={currencyId:o.id};n?c.subscriptionId=n:u&&(c.customerId=u),D.open({locale:ce,containerEl:void 0,saveConnect:!1,action:"collect-batch",prefix:w(M(),"/api/did"),useSocket:!_,extraParams:c,messages:{scan:r("common.connect.defaultScan"),title:r("payment.customer.invoice.payBatch"),confirm:r("common.connect.confirm")},onSuccess:()=>{D.close(),J(o.id),x(!1),f(l=>({...l,[o.id]:"success"}))},onClose:()=>{D.close(),x(!1)},onError:l=>{h.error($e(l)),f(m=>({...m,[o.id]:"error"})),x(!1)}})}},k=()=>{$(!1),g.onClose?.()},Z=e=>{p.onClick?(e.preventDefault(),p.onClick(e)):p.enabled||(e.preventDefault(),k())};if(fe)return null;const ee=()=>p.title?p.title:r(n?"payment.subscription.overdue.view":"payment.customer.pastDue.view"),te=(e,o=!0,s={variant:"contained"})=>{const{currency:c}=e,l=V&&ue===c.id,m=ye[c.id]||"idle";if(m==="success")return t.jsx(B,{variant:s?.variant||"contained",size:"small",onClick:()=>X(c.id),...o?{}:{color:"success",startIcon:t.jsx(ge,{})},children:r("payment.subscription.overdue.paid")});if(e.method.type==="stripe"){let A=r("payment.subscription.overdue.payNow");return m==="error"?A=r("payment.subscription.overdue.retry"):m==="processing"&&(A=r("payment.subscription.overdue.processing")),t.jsx(Te,{subscriptionId:n,customerId:n?void 0:u,currencyId:c.id,paymentMethod:e.method,onSuccess:()=>{J(c.id,!0)},onError:()=>{f(b=>({...b,[c.id]:"error"})),I(b=>({...b,[c.id]:!1}))},children:(b,ne)=>t.jsx(oe,{variant:s?.variant||"contained",size:"small",disabled:ne||m==="processing",loading:ne||m==="processing",onClick:b,sx:s?.sx,children:A})})}return t.jsx(oe,{variant:s?.variant||"contained",size:"small",disabled:l,loading:l,onClick:()=>Y(e),sx:s?.sx,children:r(m==="error"?"payment.subscription.overdue.retry":"payment.subscription.overdue.payNow")})},F=e=>e.name&&e.type!=="arcblock"?` (${e.name})`:"",re=()=>{if(n&&i.subscription)return a.length===1?r("payment.subscription.overdue.title",{name:i.subscription?.description,count:i.invoices?.length,total:z(a[0]?.amount,a[0]?.currency?.decimal),symbol:a[0]?.currency?.symbol,method:F(a[0]?.method)}):r("payment.subscription.overdue.simpleTitle",{name:i.subscription?.description,count:i.invoices?.length});if(u){let e="";return a.length===1?e=r("payment.customer.overdue.title",{subscriptionCount:i.subscriptionCount||0,count:i.invoices?.length,total:z(a[0]?.amount,a[0]?.currency?.decimal),symbol:a[0]?.currency?.symbol,method:F(a[0]?.method)}):e=r("payment.customer.overdue.simpleTitle",{subscriptionCount:i.subscriptionCount||0,count:i.invoices?.length}),N?`${e}${N}`:`${e}${r("payment.customer.overdue.defaultAlert")}`}return""},xe=()=>n&&i.subscription?r("payment.subscription.overdue.empty",{name:i.subscription?.description}):r("payment.customer.overdue.empty");return H==="custom"&&P&&typeof P=="function"?t.jsx(v,{children:P(Y,{subscription:i?.subscription,summary:i?.summary,invoices:i?.invoices,subscriptionCount:i?.subscriptionCount,detailUrl:R})}):t.jsx(je,{PaperProps:{style:{minHeight:"auto"}},...g||{},open:de,title:g?.title||r("payment.subscription.overdue.pastDue"),sx:{"& .MuiDialogContent-root":{pt:0}},onClose:k,children:L?t.jsx(se,{severity:"error",children:L.message}):t.jsxs(v,{sx:{gap:1},children:[a.length===0&&t.jsxs(t.Fragment,{children:[t.jsx(se,{severity:"success",children:xe()}),t.jsx(v,{direction:"row",sx:{justifyContent:"flex-end",mt:2},children:t.jsx(B,{variant:"outlined",color:"primary",onClick:k,sx:{width:"fit-content"},children:r("common.know")})})]}),a.length===1&&t.jsxs(t.Fragment,{children:[t.jsxs(S,{variant:"body1",sx:{color:"text.secondary"},children:[re(),p.enabled&&t.jsxs(t.Fragment,{children:[t.jsx("br",{}),r("payment.subscription.overdue.description"),t.jsx("a",{href:R,target:"_blank",onClick:Z,rel:"noreferrer",style:{color:E.palette.text.link},children:ee()})]})]}),t.jsxs(v,{direction:"row",sx:{justifyContent:"flex-end",gap:2,mt:2},children:[t.jsx(B,{variant:"outlined",color:"primary",onClick:k,children:r("common.cancel")}),te(a[0])]})]}),a.length>1&&t.jsxs(t.Fragment,{children:[t.jsxs(S,{variant:"body1",sx:{color:"text.secondary"},children:[re(),p.enabled&&t.jsxs(t.Fragment,{children:[t.jsx("br",{}),r("payment.subscription.overdue.description"),t.jsx("a",{href:R,target:"_blank",rel:"noreferrer",onClick:Z,style:{color:E.palette.text.link},children:ee()})]})]}),t.jsx(S,{variant:"body1",sx:{color:"text.secondary"},children:r("payment.subscription.overdue.list")}),t.jsx(v,{children:a.map(e=>t.jsxs(v,{direction:"row",sx:{justifyContent:"space-between",alignItems:"center",py:1,px:.5,borderBottom:"1px solid",borderColor:"divider","&:hover":{backgroundColor:()=>E.palette.grey[100]},mt:0},children:[t.jsx(S,{children:r("payment.subscription.overdue.total",{total:z(e?.amount,e?.currency?.decimal),currency:e?.currency?.symbol,method:F(e?.method)})}),te(e,!1,{variant:"text",sx:{color:"text.link"}})]},e?.currency?.id))})]})]})})}export{ze as O};
1
+ import{D as be,j as t,b1 as v,aX as se,Q as B,T as S,b0 as ge}from"./vendor-mui-core-___CiWHn.js";import{r as d}from"./vendor-react-CUXIiAnY.js";import{V as Ce,b as je,H as h}from"./vendor-ux-pxYpYMxD.js";import{C as w,d as ke}from"./vendor-utils-Doa0RxLS.js";import{k as Se}from"./vendor-hooks-L8kZVRUL.js";import{w as we,x as M,y as Pe,z as Ee,C as z,D as De,E as $e,F as Te,L as oe,G as Ie}from"./index-CK2ZwMoB.js";const ie=async n=>{if(!n.subscriptionId&&!n.customerId)throw new Error("Either subscriptionId or customerId must be provided");let y;return n.subscriptionId?y=`/api/subscriptions/${n.subscriptionId}/overdue/invoices`:y=`/api/customers/${n.customerId}/overdue/invoices`,(await De.get(n.authToken?w(y,`?authToken=${n.authToken}`):y)).data};function ze({subscriptionId:n=void 0,customerId:y=void 0,mode:H="default",dialogProps:g={open:!0},children:P=void 0,onPaid:q=()=>{},detailLinkOptions:p={enabled:!0},successToast:O=!0,alertMessage:N="",authToken:U=void 0}){const{t:r,locale:ce}=Ce(),E=be(),{connect:D,session:ae}=we(),[ue,le]=d.useState(""),[V,x]=d.useState(!1),[de,$]=d.useState(g.open||!1),[me,pe]=d.useState({}),[ye,f]=d.useState({}),[T,I]=d.useState({}),W=d.useRef(T),G=n?"subscription":"customer",u=y||ae?.user?.did,K=n||u,C=d.useRef(u);d.useEffect(()=>{W.current=T},[T]);const{data:i={summary:{},invoices:[]},error:L,loading:fe,runAsync:Q}=Se(()=>ie({subscriptionId:n,customerId:u,authToken:U}),{ready:!!n||!!u,onSuccess:e=>{e.customer?.id&&e.customer?.id!==C.current&&(C.current=e.customer?.id)}}),R=d.useMemo(()=>n?w(M(),`/customer/subscription/${n}`):u?w(M(),"/customer/invoice/past-due"):"",[n,u]),a=d.useMemo(()=>i?.summary?Object.values(i.summary):[],[i?.summary]),X=async e=>{if(W.current[e])try{if((await ie({subscriptionId:n,customerId:u,authToken:U})).invoices?.some(l=>l.currency_id===e))return;I(l=>{const m={...l};return delete m[e],m}),f(l=>({...l,[e]:"success"}))}catch(s){console.error("Error checking Stripe payment completion:",s);return}O&&(h.close(),h.success(r("payment.customer.invoice.paySuccess"))),x(!1),(await Q()).invoices?.length===0&&($(!1),q(K,e,G))},ve=ke(e=>X(e),1e3,{leading:!1,trailing:!0,maxWait:5e3}),_=Pe(),j=Ee("events"),he=async()=>{let e=!1;return await Ie(async()=>(e=(await Q()).invoices?.length===0,e),{interval:2e3,timeout:3*60*1e3}),e},J=async(e,o=!1)=>{if(_)try{const s=await he();O&&(h.close(),h.success(r("payment.customer.invoice.paySuccess"))),s&&($(!1),q(K,e,G))}catch(s){console.error("Check payment status failed:",s)}else o&&(I(s=>({...s,[e]:!0})),f(s=>({...s,[e]:"processing"})))};d.useEffect(()=>{if(!j||_)return;const e=({response:o})=>{const c=`${n||o.customer_id}-${o.currency_id}`;(n&&o.subscription_id===n||u&&u===o.customer_id||C.current&&C.current===o.customer_id)&&(me[c]||(pe(l=>({...l,[c]:1})),ve(o.currency_id)))};return j.on("invoice.paid",e),()=>{j.off("invoice.paid",e)}},[j,n,u]);const Y=e=>{const{currency:o,method:s}=e;if(s.type==="stripe"){h.error(r("payment.subscription.overdue.notSupport"));return}if(!V&&(le(o.id),x(!0),f(c=>({...c,[o.id]:"idle"})),["arcblock","ethereum","base"].includes(s.type))){const c={currencyId:o.id};n?c.subscriptionId=n:u&&(c.customerId=u),D.open({locale:ce,containerEl:void 0,saveConnect:!1,action:"collect-batch",prefix:w(M(),"/api/did"),useSocket:!_,extraParams:c,messages:{scan:r("common.connect.defaultScan"),title:r("payment.customer.invoice.payBatch"),confirm:r("common.connect.confirm")},onSuccess:()=>{D.close(),J(o.id),x(!1),f(l=>({...l,[o.id]:"success"}))},onClose:()=>{D.close(),x(!1)},onError:l=>{h.error($e(l)),f(m=>({...m,[o.id]:"error"})),x(!1)}})}},k=()=>{$(!1),g.onClose?.()},Z=e=>{p.onClick?(e.preventDefault(),p.onClick(e)):p.enabled||(e.preventDefault(),k())};if(fe)return null;const ee=()=>p.title?p.title:r(n?"payment.subscription.overdue.view":"payment.customer.pastDue.view"),te=(e,o=!0,s={variant:"contained"})=>{const{currency:c}=e,l=V&&ue===c.id,m=ye[c.id]||"idle";if(m==="success")return t.jsx(B,{variant:s?.variant||"contained",size:"small",onClick:()=>X(c.id),...o?{}:{color:"success",startIcon:t.jsx(ge,{})},children:r("payment.subscription.overdue.paid")});if(e.method.type==="stripe"){let A=r("payment.subscription.overdue.payNow");return m==="error"?A=r("payment.subscription.overdue.retry"):m==="processing"&&(A=r("payment.subscription.overdue.processing")),t.jsx(Te,{subscriptionId:n,customerId:n?void 0:u,currencyId:c.id,paymentMethod:e.method,onSuccess:()=>{J(c.id,!0)},onError:()=>{f(b=>({...b,[c.id]:"error"})),I(b=>({...b,[c.id]:!1}))},children:(b,ne)=>t.jsx(oe,{variant:s?.variant||"contained",size:"small",disabled:ne||m==="processing",loading:ne||m==="processing",onClick:b,sx:s?.sx,children:A})})}return t.jsx(oe,{variant:s?.variant||"contained",size:"small",disabled:l,loading:l,onClick:()=>Y(e),sx:s?.sx,children:r(m==="error"?"payment.subscription.overdue.retry":"payment.subscription.overdue.payNow")})},F=e=>e.name&&e.type!=="arcblock"?` (${e.name})`:"",re=()=>{if(n&&i.subscription)return a.length===1?r("payment.subscription.overdue.title",{name:i.subscription?.description,count:i.invoices?.length,total:z(a[0]?.amount,a[0]?.currency?.decimal),symbol:a[0]?.currency?.symbol,method:F(a[0]?.method)}):r("payment.subscription.overdue.simpleTitle",{name:i.subscription?.description,count:i.invoices?.length});if(u){let e="";return a.length===1?e=r("payment.customer.overdue.title",{subscriptionCount:i.subscriptionCount||0,count:i.invoices?.length,total:z(a[0]?.amount,a[0]?.currency?.decimal),symbol:a[0]?.currency?.symbol,method:F(a[0]?.method)}):e=r("payment.customer.overdue.simpleTitle",{subscriptionCount:i.subscriptionCount||0,count:i.invoices?.length}),N?`${e}${N}`:`${e}${r("payment.customer.overdue.defaultAlert")}`}return""},xe=()=>n&&i.subscription?r("payment.subscription.overdue.empty",{name:i.subscription?.description}):r("payment.customer.overdue.empty");return H==="custom"&&P&&typeof P=="function"?t.jsx(v,{children:P(Y,{subscription:i?.subscription,summary:i?.summary,invoices:i?.invoices,subscriptionCount:i?.subscriptionCount,detailUrl:R})}):t.jsx(je,{PaperProps:{style:{minHeight:"auto"}},...g||{},open:de,title:g?.title||r("payment.subscription.overdue.pastDue"),sx:{"& .MuiDialogContent-root":{pt:0}},onClose:k,children:L?t.jsx(se,{severity:"error",children:L.message}):t.jsxs(v,{sx:{gap:1},children:[a.length===0&&t.jsxs(t.Fragment,{children:[t.jsx(se,{severity:"success",children:xe()}),t.jsx(v,{direction:"row",sx:{justifyContent:"flex-end",mt:2},children:t.jsx(B,{variant:"outlined",color:"primary",onClick:k,sx:{width:"fit-content"},children:r("common.know")})})]}),a.length===1&&t.jsxs(t.Fragment,{children:[t.jsxs(S,{variant:"body1",sx:{color:"text.secondary"},children:[re(),p.enabled&&t.jsxs(t.Fragment,{children:[t.jsx("br",{}),r("payment.subscription.overdue.description"),t.jsx("a",{href:R,target:"_blank",onClick:Z,rel:"noreferrer",style:{color:E.palette.text.link},children:ee()})]})]}),t.jsxs(v,{direction:"row",sx:{justifyContent:"flex-end",gap:2,mt:2},children:[t.jsx(B,{variant:"outlined",color:"primary",onClick:k,children:r("common.cancel")}),te(a[0])]})]}),a.length>1&&t.jsxs(t.Fragment,{children:[t.jsxs(S,{variant:"body1",sx:{color:"text.secondary"},children:[re(),p.enabled&&t.jsxs(t.Fragment,{children:[t.jsx("br",{}),r("payment.subscription.overdue.description"),t.jsx("a",{href:R,target:"_blank",rel:"noreferrer",onClick:Z,style:{color:E.palette.text.link},children:ee()})]})]}),t.jsx(S,{variant:"body1",sx:{color:"text.secondary"},children:r("payment.subscription.overdue.list")}),t.jsx(v,{children:a.map(e=>t.jsxs(v,{direction:"row",sx:{justifyContent:"space-between",alignItems:"center",py:1,px:.5,borderBottom:"1px solid",borderColor:"divider","&:hover":{backgroundColor:()=>E.palette.grey[100]},mt:0},children:[t.jsx(S,{children:r("payment.subscription.overdue.total",{total:z(e?.amount,e?.currency?.decimal),currency:e?.currency?.symbol,method:F(e?.method)})}),te(e,!1,{variant:"text",sx:{color:"text.link"}})]},e?.currency?.id))})]})]})})}export{ze as O};
@@ -1,4 +1,4 @@
1
- import{j as e,ak as n,ar as E,a$ as te,at as Q,W as p,am as k,cq as ne,T as _,c2 as L,bf as M}from"./vendor-mui-core-___CiWHn.js";import{r as u,a as oe}from"./vendor-react-CUXIiAnY.js";import{U as h,V as A,n as se,z as ae,Q as ie}from"./vendor-ux-pxYpYMxD.js";import{d as re}from"./keyboard-arrow-down-rounded-8U0_i9QO.js";import{f as D}from"./index-BojVbZw0.js";import{p as le}from"./dashboard-BOEp1A3P.js";import{_ as ce,ac as me,ae as de,aT as pe,ad as ue,c as T,e as he,a1 as q}from"./index-DiqdSyj7.js";import{v as xe}from"./index-0wVxGFHL.js";import{u as ge}from"./useAsyncRetry-MDM8jCoS.js";import{C as fe}from"./vendor-utils-Doa0RxLS.js";import{u as ve}from"./team-W2Fdvkfl.js";import{W as v}from"./did-address-BKqL0vbP.js";import{V as be}from"./status-Ukzm4O8y.js";import{c as je}from"./spaces-BRmoEATc.js";import"./vendor-hooks-L8kZVRUL.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-DBEMYjVA.js";import"./useLocalStorage-CbmitI3m.js";import"./index-DBs9Ljax.js";import"./confirm-CklyzxUV.js";import"./get-safe-url-b0FoyA1U.js";import"./session-Dt50YAVT.js";import"./passport-BxAsPdEH.js";import"./create-passport-svg-k1mCsufD.js";import"./useSetState-cWrp7qoX.js";import"./index-DKSVm7e-.js";import"./over-due-invoice-payment-B7tDPPws.js";import"./use-mobile-yOnqxyr6.js";import"./useAsync-tRHUJQgE.js";import"./isURL-bkdgf1x2.js";import"./use-app-logo-Bu9kUO2d.js";import"./omit-CPVfFmp-.js";import"./api-DcGGeMWE.js";const ke={width:24,height:24,body:'<path fill="currentColor" d="m12 10.8l-3.9 3.9q-.275.275-.7.275t-.7-.275q-.275-.275-.275-.7t.275-.7l4.6-4.6q.3-.3.7-.3t.7.3l4.6 4.6q.275.275.275.7t-.275.7q-.275.275-.7.275t-.7-.275L12 10.8Z"/>'},ye={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 17a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2zm12 0a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2zM9 5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2zM6 15v-1a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v1m-6-6v3"/>'},we={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 7a4 4 0 1 0 8 0a4 4 0 1 0-8 0M3 21v-2a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v2m1-17.87a4 4 0 0 1 0 7.75M21 21v-2a4 4 0 0 0-3-3.85"/>'},Se={width:24,height:24,body:'<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M7 12h3v4H7z"/><path d="M10 6H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h16a1 1 0 0 0 1-1V7a1 1 0 0 0-1-1h-6"/><path d="M10 4a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1zm4 12h2m-2-4h4"/></g>'},Te={width:24,height:24,body:'<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M19.5 7A9 9 0 0 0 12 3a8.991 8.991 0 0 0-7.484 4"/><path d="M11.5 3a16.989 16.989 0 0 0-1.826 4M12.5 3a16.989 16.989 0 0 1 1.828 4M19.5 17a9 9 0 0 1-7.5 4a8.991 8.991 0 0 1-7.484-4"/><path d="M11.5 21a16.989 16.989 0 0 1-1.826-4m2.826 4a16.989 16.989 0 0 0 1.828-4M2 10l1 4l1.5-4L6 14l1-4m10 0l1 4l1.5-4l1.5 4l1-4M9.5 10l1 4l1.5-4l1.5 4l1-4"/></g>'},O={width:24,height:24,body:'<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M3 12a9 9 0 1 0 18 0a9 9 0 0 0-18 0"/><path d="M12 7v5l3 3"/></g>'},_e={width:24,height:24,body:'<path fill="currentColor" d="M12 14q-.825 0-1.413-.588T10 12q0-.825.588-1.413T12 10q.825 0 1.413.588T14 12q0 .825-.588 1.413T12 14Zm0 7q-3.475 0-6.025-2.288T3.05 13H5.1q.35 2.6 2.313 4.3T12 19q2.925 0 4.963-2.038T19 12q0-2.925-2.038-4.963T12 5q-1.725 0-3.225.8T6.25 8H9v2H3V4h2v2.35q1.275-1.6 3.113-2.475T12 3q1.875 0 3.513.713t2.85 1.924q1.212 1.213 1.925 2.85T21 12q0 1.875-.713 3.513t-1.924 2.85q-1.213 1.212-2.85 1.925T12 21Z"/>'};function W({icon:t,value:s,name:o,url:i="",animated:l=!1,LinkComponent:d=te,loading:x=!1}){const g=()=>oe.isValidElement(t)?t:e.jsx(n,{component:h,icon:t,alt:typeof o=="string"?o:"",sx:{fontSize:30}});if(x)return e.jsxs(V,{children:[t&&e.jsx(n,{className:"metric__image",children:e.jsx(E,{variant:"circular",width:32,height:32})}),e.jsxs(n,{children:[e.jsx(E,{className:`metric__number ${l?"metric__number--animated":""}`,variant:"rounded",width:160,height:"36px",sx:{mb:1}}),e.jsx(E,{className:"metric__name",variant:"rounded",width:80,height:20})]})]});const f=e.jsxs(e.Fragment,{children:[t&&e.jsx(n,{className:"metric__image",children:g()}),e.jsxs(n,{children:[u.isValidElement(s)?e.jsx(n,{className:`metric__number ${l?"metric__number--animated":""}`,children:s}):e.jsx(n,{className:`metric__number ${l?"metric__number--animated":""}`,dangerouslySetInnerHTML:{__html:s}}),e.jsx(n,{className:"metric__name",children:o})]})]});return e.jsx(V,{children:i?e.jsx(d,{href:i,sx:{textDecoration:"none"},children:f}):f})}W.propTypes={icon:p.string.isRequired,value:p.string.isRequired,name:p.string.isRequired,url:p.string,animated:p.bool,LinkComponent:p.elementType,loading:p.bool};const V=Q(n)`
1
+ import{j as e,ak as n,ar as E,a$ as te,at as Q,W as p,am as k,cq as ne,T as _,c2 as L,bf as M}from"./vendor-mui-core-___CiWHn.js";import{r as u,a as oe}from"./vendor-react-CUXIiAnY.js";import{U as h,V as A,n as se,z as ae,Q as ie}from"./vendor-ux-pxYpYMxD.js";import{d as re}from"./keyboard-arrow-down-rounded-8U0_i9QO.js";import{f as D}from"./index-BojVbZw0.js";import{p as le}from"./dashboard-BahbXvzp.js";import{_ as ce,ac as me,ae as de,aT as pe,ad as ue,c as T,e as he,a1 as q}from"./index-CK2ZwMoB.js";import{v as xe}from"./index-0wVxGFHL.js";import{u as ge}from"./useAsyncRetry-MDM8jCoS.js";import{C as fe}from"./vendor-utils-Doa0RxLS.js";import{u as ve}from"./team-zaYl7mkh.js";import{W as v}from"./did-address-BKqL0vbP.js";import{V as be}from"./status-De4_OTsm.js";import{c as je}from"./spaces-Crb6xNg_.js";import"./vendor-hooks-L8kZVRUL.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-DBEMYjVA.js";import"./useLocalStorage-CbmitI3m.js";import"./index-DBs9Ljax.js";import"./confirm-CvbX7Jj-.js";import"./get-safe-url-D0cItynk.js";import"./session-DkvXxWtg.js";import"./passport-D9DnlXMQ.js";import"./create-passport-svg-k1mCsufD.js";import"./useSetState-cWrp7qoX.js";import"./index-C3V_Ak74.js";import"./over-due-invoice-payment-Db3XRUjV.js";import"./use-mobile-yOnqxyr6.js";import"./useAsync-tRHUJQgE.js";import"./isURL-DI8OpvEf.js";import"./use-app-logo-RgeQYsuM.js";import"./omit-CPVfFmp-.js";import"./api-DcGGeMWE.js";const ke={width:24,height:24,body:'<path fill="currentColor" d="m12 10.8l-3.9 3.9q-.275.275-.7.275t-.7-.275q-.275-.275-.275-.7t.275-.7l4.6-4.6q.3-.3.7-.3t.7.3l4.6 4.6q.275.275.275.7t-.275.7q-.275.275-.7.275t-.7-.275L12 10.8Z"/>'},ye={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 17a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2zm12 0a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2zM9 5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2zM6 15v-1a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v1m-6-6v3"/>'},we={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 7a4 4 0 1 0 8 0a4 4 0 1 0-8 0M3 21v-2a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v2m1-17.87a4 4 0 0 1 0 7.75M21 21v-2a4 4 0 0 0-3-3.85"/>'},Se={width:24,height:24,body:'<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M7 12h3v4H7z"/><path d="M10 6H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h16a1 1 0 0 0 1-1V7a1 1 0 0 0-1-1h-6"/><path d="M10 4a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1zm4 12h2m-2-4h4"/></g>'},Te={width:24,height:24,body:'<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M19.5 7A9 9 0 0 0 12 3a8.991 8.991 0 0 0-7.484 4"/><path d="M11.5 3a16.989 16.989 0 0 0-1.826 4M12.5 3a16.989 16.989 0 0 1 1.828 4M19.5 17a9 9 0 0 1-7.5 4a8.991 8.991 0 0 1-7.484-4"/><path d="M11.5 21a16.989 16.989 0 0 1-1.826-4m2.826 4a16.989 16.989 0 0 0 1.828-4M2 10l1 4l1.5-4L6 14l1-4m10 0l1 4l1.5-4l1.5 4l1-4M9.5 10l1 4l1.5-4l1.5 4l1-4"/></g>'},O={width:24,height:24,body:'<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M3 12a9 9 0 1 0 18 0a9 9 0 0 0-18 0"/><path d="M12 7v5l3 3"/></g>'},_e={width:24,height:24,body:'<path fill="currentColor" d="M12 14q-.825 0-1.413-.588T10 12q0-.825.588-1.413T12 10q.825 0 1.413.588T14 12q0 .825-.588 1.413T12 14Zm0 7q-3.475 0-6.025-2.288T3.05 13H5.1q.35 2.6 2.313 4.3T12 19q2.925 0 4.963-2.038T19 12q0-2.925-2.038-4.963T12 5q-1.725 0-3.225.8T6.25 8H9v2H3V4h2v2.35q1.275-1.6 3.113-2.475T12 3q1.875 0 3.513.713t2.85 1.924q1.212 1.213 1.925 2.85T21 12q0 1.875-.713 3.513t-1.924 2.85q-1.213 1.212-2.85 1.925T12 21Z"/>'};function W({icon:t,value:s,name:o,url:i="",animated:l=!1,LinkComponent:d=te,loading:x=!1}){const g=()=>oe.isValidElement(t)?t:e.jsx(n,{component:h,icon:t,alt:typeof o=="string"?o:"",sx:{fontSize:30}});if(x)return e.jsxs(V,{children:[t&&e.jsx(n,{className:"metric__image",children:e.jsx(E,{variant:"circular",width:32,height:32})}),e.jsxs(n,{children:[e.jsx(E,{className:`metric__number ${l?"metric__number--animated":""}`,variant:"rounded",width:160,height:"36px",sx:{mb:1}}),e.jsx(E,{className:"metric__name",variant:"rounded",width:80,height:20})]})]});const f=e.jsxs(e.Fragment,{children:[t&&e.jsx(n,{className:"metric__image",children:g()}),e.jsxs(n,{children:[u.isValidElement(s)?e.jsx(n,{className:`metric__number ${l?"metric__number--animated":""}`,children:s}):e.jsx(n,{className:`metric__number ${l?"metric__number--animated":""}`,dangerouslySetInnerHTML:{__html:s}}),e.jsx(n,{className:"metric__name",children:o})]})]});return e.jsx(V,{children:i?e.jsx(d,{href:i,sx:{textDecoration:"none"},children:f}):f})}W.propTypes={icon:p.string.isRequired,value:p.string.isRequired,name:p.string.isRequired,url:p.string,animated:p.bool,LinkComponent:p.elementType,loading:p.bool};const V=Q(n)`
2
2
  border-left: 1px solid ${t=>t.theme.palette.divider};
3
3
  padding: 10px 0 10px 16px;
4
4
  @media (max-width: ${t=>t.theme.breakpoints.values.sm}px) {
@@ -1 +1 @@
1
- import{c as r}from"./create-passport-svg-k1mCsufD.js";import{C as t}from"./vendor-utils-Doa0RxLS.js";import{c as s}from"./index-DiqdSyj7.js";const e=o=>r({...o,issuerAvatarUrl:t(window.location.origin,s.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo")});export{e as c};
1
+ import{c as r}from"./create-passport-svg-k1mCsufD.js";import{C as t}from"./vendor-utils-Doa0RxLS.js";import{c as s}from"./index-CK2ZwMoB.js";const e=o=>r({...o,issuerAvatarUrl:t(window.location.origin,s.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo")});export{e as c};
@@ -1 +1 @@
1
- import{j as t,b1 as b,b4 as k,T as m,am as M,W as s,s as T,U as $,ak as g,bH as f,bI as x,bJ as q,bK as N,bL as L,bM as R,bN as B}from"./vendor-mui-core-___CiWHn.js";import{V as h,z as F,A as S}from"./vendor-ux-pxYpYMxD.js";import{ar as E,as as P,at as V}from"./index-DiqdSyj7.js";import{U as H}from"./ua-parser-DP5omx3I.js";import{a as w}from"./vendor-react-CUXIiAnY.js";import{a as G}from"./vendor-hooks-L8kZVRUL.js";import{W as j}from"./did-address-BKqL0vbP.js";import{p as J}from"./util-Byg5myf8.js";import{u as K}from"./team-W2Fdvkfl.js";function Y(e){return!e||typeof e!="string"?"break-all":e.includes(" ")?"break-word":"break-all"}function z({logo:e="",name:r="",description:n="",size:l=40,variant:a="rounded",sx:d={},className:p="",logoName:u="",tooltip:o=null}){const i={width:l,height:l,...d},y=typeof r=="string"?r:e,v=t.jsxs(b,{direction:"row",spacing:1,className:`info-card-wrapper ${p}`,sx:{alignItems:"center",cursor:o?"pointer":"default"},children:[e?t.jsx(k,{src:e,alt:u??y,variant:a,sx:i}):t.jsx(k,{variant:a,sx:i,children:y?.slice(0,1)}),t.jsxs(b,{direction:"column",sx:{alignItems:"flex-start",justifyContent:"space-around",wordBreak:Y(r),minWidth:{xs:100,sm:140}},children:[t.jsx(m,{variant:"body1",component:"div",sx:{color:"text.primary"},children:r}),n&&t.jsx(m,{variant:"subtitle1",sx:{color:"text.secondary"},children:n})]})]});return o?t.jsx(M,{title:o,placement:"top-start",slotProps:{tooltip:{sx:{bgcolor:c=>c.palette.mode==="dark"?"#2a2e37":"#ffffff",color:c=>c.palette.mode==="dark"?"#ffffff":c.palette.text.primary,boxShadow:"0 2px 10px rgba(0, 0, 0, 0.15)",borderRadius:2,padding:"10px 16px",fontSize:14,maxWidth:400,minWidth:240,wordBreak:"break-word",border:c=>c.palette.mode==="dark"?"1px solid #3a3f48":"1px solid #e0e0e0","& .MuiTooltip-arrow":{color:c=>c.palette.mode==="dark"?"#2a2e37":"#ffffff","&::before":{border:c=>c.palette.mode==="dark"?"1px solid #3a3f48":"1px solid #e0e0e0",backgroundColor:c=>c.palette.mode==="dark"?"#2a2e37":"#ffffff"}}}}},children:v}):v}z.propTypes={logo:s.string,name:s.oneOfType([s.string,s.node]).isRequired,description:s.oneOfType([s.string,s.node]),size:s.oneOfType([s.number,s.string]),variant:s.oneOf(["square","rounded","circular"]),sx:s.object,className:s.string,logoName:s.string,tooltip:s.oneOfType([s.string,s.node])};function _(e){try{if(!e.trim())return{device:{icon:t.jsx(x,{fontSize:"small"}),text:"Unknown Device"},os:{icon:null,text:"Unknown OS"},browser:{icon:t.jsx(f,{fontSize:"small"}),text:"Unknown Browser"}};const n=new H(e).getResult();let l="";const a=e.split(/\s+/).find(o=>o.startsWith("arcwallet"));if(a){const o=a.split("/");o.length>1&&S.coerce(o[1])&&(l=S.coerce(o[1]).version)}const d=(()=>{const{type:o="",model:i=""}=n.device;return o==="mobile"?{icon:t.jsx(q,{fontSize:"small"}),text:i||"Mobile Device"}:o==="tablet"?{icon:t.jsx(N,{fontSize:"small"}),text:i||"Tablet"}:{icon:t.jsx(L,{fontSize:"small"}),text:i||"Desktop"}})(),p=(()=>{const{name:o="",version:i=""}=n.os;return o.toLowerCase().includes("mac")?{icon:t.jsx(R,{fontSize:"small"}),text:`${o} ${i}`}:o.toLowerCase().includes("ios")?{icon:t.jsx(R,{fontSize:"small"}),text:`${o} ${i}`}:o.toLowerCase().includes("android")?{icon:t.jsx(B,{fontSize:"small"}),text:`${o} ${i}`}:o.toLowerCase().includes("windows")?{icon:t.jsx(x,{fontSize:"small"}),text:`${o} ${i}`}:{icon:null,text:o?`${o} ${i}`:"Unknown OS"}})(),u=(()=>{const{name:o="",version:i=""}=n.browser;return{icon:t.jsx(f,{fontSize:"small"}),text:o?`${o} ${i}`:"Unknown Browser"}})();return{device:d,os:p,browser:u,...l?{walletVersion:{icon:null,text:l}}:{}}}catch(r){return console.error("Error parsing user agent:",r),{device:{icon:t.jsx(x,{fontSize:"small"}),text:"Unknown Device"},os:{icon:null,text:"Unknown OS"},browser:{icon:t.jsx(f,{fontSize:"small"}),text:"Unknown Browser"}}}}function C({ua:e}){const r=_(e);return t.jsx(b,{spacing:1,children:Object.entries(r).map(([n,{icon:l,text:a}])=>t.jsxs(g,{sx:{display:"flex",alignItems:"center",gap:1},children:[t.jsx(g,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:l}),t.jsx(m,{variant:"body2",sx:{display:"flex"},children:a})]},n))})}C.propTypes={ua:s.string.isRequired};const Q=()=>{const{t:e}=h(),r={$all:e("common.all"),owner:"Owner",admin:"Admin",member:"Member",guest:"Guest"};return{SYSTEM_ROLES:r,formatRoleName:l=>{const a=(l||"").toLowerCase();return a.startsWith("$")?r[a]||a.slice(1):r[a]||a}}},X=(e,r=!1)=>{const n=r?1:.6;switch(e){case"owner":return`rgba(232, 222, 255, ${n})`;case"admin":return`rgba(227, 242, 253, ${n})`;case"member":return`rgba(232, 245, 233, ${n})`;case"guest":return`rgba(245, 245, 245, ${n})`;default:return`rgba(245, 245, 245, ${n})`}},Z=T($)(({role:e})=>({backgroundColor:X(e.toLowerCase()),color:"#000000"})),ee=e=>{switch(e){case"valid":return r=>r.palette.success.light;case"expired":return r=>r.palette.text.disabled;case"revoked":return r=>r.palette.error.light;default:return r=>r.palette.warning.light}},re=T($)(({theme:e,status:r})=>({backgroundColor:ee(r)(e),color:"#FFFFFF"}));function U({did:e}){return t.jsx(j,{size:14,responsive:!1,compact:!0,copyable:!1,did:e})}U.propTypes={did:s.string.isRequired};function I({timestamp:e,locale:r}){return t.jsx(g,{sx:{minWidth:"100px"},children:t.jsx(F,{value:e,locale:r})})}I.propTypes={timestamp:s.number.isRequired,locale:s.string.isRequired};function W({name:e="",role:r}){const{formatRoleName:n}=Q();return t.jsx(Z,{label:n(e||r),size:"small",role:e||r,sx:{borderRadius:1}})}W.propTypes={role:s.string.isRequired,name:s.string};function O({status:e}){const{t:r}=h();return t.jsx(re,{label:r(`team.passport.statusMap.${e}`),size:"small",status:e,sx:{borderRadius:1}})}O.propTypes={status:s.string.isRequired};function A({source:e}){const{t:r}=h();return e?r(`team.passport.sourceMaps.${e}`):"-"}A.propTypes={source:s.string.isRequired};function D({user:e,size:r="default",tooltip:n=!1,inService:l=!1}){const{teamDid:a}=K(),d=w.useMemo(()=>J(e.avatar,a,l),[e.avatar,a,l]),p=w.useMemo(()=>t.jsx(j,{did:e?.did,compact:!0,responsive:!1,sx:{whiteSpace:"nowrap"},size:12}),[e?.did]),u=G(()=>({...e,avatar:d}),[e,d]);return r==="small"?t.jsx(z,{variant:"circular",logo:d,name:t.jsx(m,{sx:{maxWidth:320,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},className:"customer-link-name",children:e.fullName||e.email}),...r==="small"?{tooltip:n?t.jsx(j,{did:e?.did}):!1,size:24}:{description:p,size:36}}):t.jsx(E,{user:u,avatarSize:r==="small"?24:36,cardType:V.Detailed,infoType:P.Minimal,sx:{padding:0,border:"none"},showDid:!0,didProps:{compact:!0,responsive:!1},showHoverCard:!1})}D.propTypes={user:s.object.isRequired,size:s.string,tooltip:s.bool,inService:s.bool};const te=w.memo(D),ue=e=>t.jsx(U,{did:e}),me=(e,r)=>t.jsx(W,{name:e,role:r}),fe=e=>t.jsx(O,{status:e}),xe=(e,r)=>t.jsx(I,{timestamp:e,locale:r}),be=e=>t.jsx(A,{source:e}),ge=(e,r=!1)=>t.jsx(te,{user:e,inService:r}),we=e=>t.jsx(C,{ua:e});export{me as a,fe as b,xe as c,be as d,we as e,ue as f,ge as r,Q as u};
1
+ import{j as t,b1 as b,b4 as k,T as m,am as M,W as s,s as T,U as $,ak as g,bH as f,bI as x,bJ as q,bK as N,bL as L,bM as R,bN as B}from"./vendor-mui-core-___CiWHn.js";import{V as h,z as F,A as S}from"./vendor-ux-pxYpYMxD.js";import{ar as E,as as P,at as V}from"./index-CK2ZwMoB.js";import{U as H}from"./ua-parser-DP5omx3I.js";import{a as w}from"./vendor-react-CUXIiAnY.js";import{a as G}from"./vendor-hooks-L8kZVRUL.js";import{W as j}from"./did-address-BKqL0vbP.js";import{p as J}from"./util-Dcv5G2iK.js";import{u as K}from"./team-zaYl7mkh.js";function Y(e){return!e||typeof e!="string"?"break-all":e.includes(" ")?"break-word":"break-all"}function z({logo:e="",name:r="",description:n="",size:l=40,variant:a="rounded",sx:d={},className:p="",logoName:u="",tooltip:o=null}){const i={width:l,height:l,...d},y=typeof r=="string"?r:e,v=t.jsxs(b,{direction:"row",spacing:1,className:`info-card-wrapper ${p}`,sx:{alignItems:"center",cursor:o?"pointer":"default"},children:[e?t.jsx(k,{src:e,alt:u??y,variant:a,sx:i}):t.jsx(k,{variant:a,sx:i,children:y?.slice(0,1)}),t.jsxs(b,{direction:"column",sx:{alignItems:"flex-start",justifyContent:"space-around",wordBreak:Y(r),minWidth:{xs:100,sm:140}},children:[t.jsx(m,{variant:"body1",component:"div",sx:{color:"text.primary"},children:r}),n&&t.jsx(m,{variant:"subtitle1",sx:{color:"text.secondary"},children:n})]})]});return o?t.jsx(M,{title:o,placement:"top-start",slotProps:{tooltip:{sx:{bgcolor:c=>c.palette.mode==="dark"?"#2a2e37":"#ffffff",color:c=>c.palette.mode==="dark"?"#ffffff":c.palette.text.primary,boxShadow:"0 2px 10px rgba(0, 0, 0, 0.15)",borderRadius:2,padding:"10px 16px",fontSize:14,maxWidth:400,minWidth:240,wordBreak:"break-word",border:c=>c.palette.mode==="dark"?"1px solid #3a3f48":"1px solid #e0e0e0","& .MuiTooltip-arrow":{color:c=>c.palette.mode==="dark"?"#2a2e37":"#ffffff","&::before":{border:c=>c.palette.mode==="dark"?"1px solid #3a3f48":"1px solid #e0e0e0",backgroundColor:c=>c.palette.mode==="dark"?"#2a2e37":"#ffffff"}}}}},children:v}):v}z.propTypes={logo:s.string,name:s.oneOfType([s.string,s.node]).isRequired,description:s.oneOfType([s.string,s.node]),size:s.oneOfType([s.number,s.string]),variant:s.oneOf(["square","rounded","circular"]),sx:s.object,className:s.string,logoName:s.string,tooltip:s.oneOfType([s.string,s.node])};function _(e){try{if(!e.trim())return{device:{icon:t.jsx(x,{fontSize:"small"}),text:"Unknown Device"},os:{icon:null,text:"Unknown OS"},browser:{icon:t.jsx(f,{fontSize:"small"}),text:"Unknown Browser"}};const n=new H(e).getResult();let l="";const a=e.split(/\s+/).find(o=>o.startsWith("arcwallet"));if(a){const o=a.split("/");o.length>1&&S.coerce(o[1])&&(l=S.coerce(o[1]).version)}const d=(()=>{const{type:o="",model:i=""}=n.device;return o==="mobile"?{icon:t.jsx(q,{fontSize:"small"}),text:i||"Mobile Device"}:o==="tablet"?{icon:t.jsx(N,{fontSize:"small"}),text:i||"Tablet"}:{icon:t.jsx(L,{fontSize:"small"}),text:i||"Desktop"}})(),p=(()=>{const{name:o="",version:i=""}=n.os;return o.toLowerCase().includes("mac")?{icon:t.jsx(R,{fontSize:"small"}),text:`${o} ${i}`}:o.toLowerCase().includes("ios")?{icon:t.jsx(R,{fontSize:"small"}),text:`${o} ${i}`}:o.toLowerCase().includes("android")?{icon:t.jsx(B,{fontSize:"small"}),text:`${o} ${i}`}:o.toLowerCase().includes("windows")?{icon:t.jsx(x,{fontSize:"small"}),text:`${o} ${i}`}:{icon:null,text:o?`${o} ${i}`:"Unknown OS"}})(),u=(()=>{const{name:o="",version:i=""}=n.browser;return{icon:t.jsx(f,{fontSize:"small"}),text:o?`${o} ${i}`:"Unknown Browser"}})();return{device:d,os:p,browser:u,...l?{walletVersion:{icon:null,text:l}}:{}}}catch(r){return console.error("Error parsing user agent:",r),{device:{icon:t.jsx(x,{fontSize:"small"}),text:"Unknown Device"},os:{icon:null,text:"Unknown OS"},browser:{icon:t.jsx(f,{fontSize:"small"}),text:"Unknown Browser"}}}}function C({ua:e}){const r=_(e);return t.jsx(b,{spacing:1,children:Object.entries(r).map(([n,{icon:l,text:a}])=>t.jsxs(g,{sx:{display:"flex",alignItems:"center",gap:1},children:[t.jsx(g,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:l}),t.jsx(m,{variant:"body2",sx:{display:"flex"},children:a})]},n))})}C.propTypes={ua:s.string.isRequired};const Q=()=>{const{t:e}=h(),r={$all:e("common.all"),owner:"Owner",admin:"Admin",member:"Member",guest:"Guest"};return{SYSTEM_ROLES:r,formatRoleName:l=>{const a=(l||"").toLowerCase();return a.startsWith("$")?r[a]||a.slice(1):r[a]||a}}},X=(e,r=!1)=>{const n=r?1:.6;switch(e){case"owner":return`rgba(232, 222, 255, ${n})`;case"admin":return`rgba(227, 242, 253, ${n})`;case"member":return`rgba(232, 245, 233, ${n})`;case"guest":return`rgba(245, 245, 245, ${n})`;default:return`rgba(245, 245, 245, ${n})`}},Z=T($)(({role:e})=>({backgroundColor:X(e.toLowerCase()),color:"#000000"})),ee=e=>{switch(e){case"valid":return r=>r.palette.success.light;case"expired":return r=>r.palette.text.disabled;case"revoked":return r=>r.palette.error.light;default:return r=>r.palette.warning.light}},re=T($)(({theme:e,status:r})=>({backgroundColor:ee(r)(e),color:"#FFFFFF"}));function U({did:e}){return t.jsx(j,{size:14,responsive:!1,compact:!0,copyable:!1,did:e})}U.propTypes={did:s.string.isRequired};function I({timestamp:e,locale:r}){return t.jsx(g,{sx:{minWidth:"100px"},children:t.jsx(F,{value:e,locale:r})})}I.propTypes={timestamp:s.number.isRequired,locale:s.string.isRequired};function W({name:e="",role:r}){const{formatRoleName:n}=Q();return t.jsx(Z,{label:n(e||r),size:"small",role:e||r,sx:{borderRadius:1}})}W.propTypes={role:s.string.isRequired,name:s.string};function O({status:e}){const{t:r}=h();return t.jsx(re,{label:r(`team.passport.statusMap.${e}`),size:"small",status:e,sx:{borderRadius:1}})}O.propTypes={status:s.string.isRequired};function A({source:e}){const{t:r}=h();return e?r(`team.passport.sourceMaps.${e}`):"-"}A.propTypes={source:s.string.isRequired};function D({user:e,size:r="default",tooltip:n=!1,inService:l=!1}){const{teamDid:a}=K(),d=w.useMemo(()=>J(e.avatar,a,l),[e.avatar,a,l]),p=w.useMemo(()=>t.jsx(j,{did:e?.did,compact:!0,responsive:!1,sx:{whiteSpace:"nowrap"},size:12}),[e?.did]),u=G(()=>({...e,avatar:d}),[e,d]);return r==="small"?t.jsx(z,{variant:"circular",logo:d,name:t.jsx(m,{sx:{maxWidth:320,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},className:"customer-link-name",children:e.fullName||e.email}),...r==="small"?{tooltip:n?t.jsx(j,{did:e?.did}):!1,size:24}:{description:p,size:36}}):t.jsx(E,{user:u,avatarSize:r==="small"?24:36,cardType:V.Detailed,infoType:P.Minimal,sx:{padding:0,border:"none"},showDid:!0,didProps:{compact:!0,responsive:!1},showHoverCard:!1})}D.propTypes={user:s.object.isRequired,size:s.string,tooltip:s.bool,inService:s.bool};const te=w.memo(D),ue=e=>t.jsx(U,{did:e}),me=(e,r)=>t.jsx(W,{name:e,role:r}),fe=e=>t.jsx(O,{status:e}),xe=(e,r)=>t.jsx(I,{timestamp:e,locale:r}),be=e=>t.jsx(A,{source:e}),ge=(e,r=!1)=>t.jsx(te,{user:e,inService:r}),we=e=>t.jsx(C,{ua:e});export{me as a,fe as b,xe as c,be as d,we as e,ue as f,ge as r,Q as u};
@@ -1 +1 @@
1
- import{j as l,W as n}from"./vendor-mui-core-___CiWHn.js";import{u as m}from"./session-Dt50YAVT.js";function c({permission:i="",role:t="",component:e=null,children:o=null}){const{session:r}=m();let s=!0;const u=[].concat(i).filter(Boolean),f=[].concat(t).filter(Boolean);if(u.length){const p=r.user&&r.user.permissions||[];s=u.some(a=>p.includes(a))}return s&&f.length&&(s=f.includes(r.user.role)),typeof e=="function"?e(s):typeof o=="function"?o(s):s&&(e||o)||null}function x(i,t,e){return function(r){return l.jsx(c,{permission:t,role:e,children:s=>l.jsx(i,{...r,hasPermission:s})})}}c.propTypes={permission:n.oneOfType([n.string,n.arrayOf(n.string)]),role:n.oneOfType([n.string,n.arrayOf(n.string)]),component:n.oneOfType([n.func,n.node]),children:n.oneOfType([n.func,n.node])};export{c as P,x as w};
1
+ import{j as l,W as n}from"./vendor-mui-core-___CiWHn.js";import{u as m}from"./session-DkvXxWtg.js";function c({permission:i="",role:t="",component:e=null,children:o=null}){const{session:r}=m();let s=!0;const u=[].concat(i).filter(Boolean),f=[].concat(t).filter(Boolean);if(u.length){const p=r.user&&r.user.permissions||[];s=u.some(a=>p.includes(a))}return s&&f.length&&(s=f.includes(r.user.role)),typeof e=="function"?e(s):typeof o=="function"?o(s):s&&(e||o)||null}function x(i,t,e){return function(r){return l.jsx(c,{permission:t,role:e,children:s=>l.jsx(i,{...r,hasPermission:s})})}}c.propTypes={permission:n.oneOfType([n.string,n.arrayOf(n.string)]),role:n.oneOfType([n.string,n.arrayOf(n.string)]),component:n.oneOfType([n.func,n.node]),children:n.oneOfType([n.func,n.node])};export{c as P,x as w};
@@ -1 +1 @@
1
- import{j as o}from"./vendor-mui-core-___CiWHn.js";import{C as t}from"./vendor-utils-Doa0RxLS.js";import{I as s}from"./iframe-Cf5bT_6x.js";import{c as e}from"./index-DiqdSyj7.js";import{S as m}from"./studio-Cfhka82V.js";import"./vendor-react-CUXIiAnY.js";import"./vendor-ux-pxYpYMxD.js";import"./vendor-hooks-L8kZVRUL.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-DBEMYjVA.js";import"./index-DKSVm7e-.js";function L(){const r=new URLSearchParams;r.set("title","Preference Builder"),r.set("schemaKey",t(window.location.origin,e.WELLKNOWN_SERVICE_PATH_PREFIX,"/api/studio/preferences"));const i=`${t(window.location.origin,e.WELLKNOWN_SERVICE_PATH_PREFIX,"/hosted/form-builder/")}?${r.toString()}`;return o.jsx(m,{children:o.jsx(s,{url:i,width:"100%",height:"100%",frameBorder:0,styles:{border:0}})})}export{L as default};
1
+ import{j as o}from"./vendor-mui-core-___CiWHn.js";import{C as t}from"./vendor-utils-Doa0RxLS.js";import{I as s}from"./iframe-NYFbYzoQ.js";import{c as e}from"./index-CK2ZwMoB.js";import{S as m}from"./studio-BqxKVD_H.js";import"./vendor-react-CUXIiAnY.js";import"./vendor-ux-pxYpYMxD.js";import"./vendor-hooks-L8kZVRUL.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-DBEMYjVA.js";import"./index-C3V_Ak74.js";function L(){const r=new URLSearchParams;r.set("title","Preference Builder"),r.set("schemaKey",t(window.location.origin,e.WELLKNOWN_SERVICE_PATH_PREFIX,"/api/studio/preferences"));const i=`${t(window.location.origin,e.WELLKNOWN_SERVICE_PATH_PREFIX,"/hosted/form-builder/")}?${r.toString()}`;return o.jsx(m,{children:o.jsx(s,{url:i,width:"100%",height:"100%",frameBorder:0,styles:{border:0}})})}export{L as default};
@@ -1 +1 @@
1
- import{j as r}from"./vendor-mui-core-___CiWHn.js";import{$ as o}from"./user-center-BuHH3C1u.js";import{H as i}from"./index-DiqdSyj7.js";import{V as e}from"./vendor-ux-pxYpYMxD.js";import"./vendor-react-CUXIiAnY.js";import"./vendor-hooks-L8kZVRUL.js";import"./vendor-utils-Doa0RxLS.js";import"./index--t-eBalO.js";import"./arrow-down.svg-B4fW36cY.js";import"./revoke.svg-CuiCGfVW.js";import"./index-DIpoCt72.js";import"./index-JqMHvzVF.js";import"./vendor-arcblock-DBEMYjVA.js";import"./index-CQOXFqub.js";import"./index-DRYJ0xIl.js";import"./index-BojVbZw0.js";import"./index-DDc9u4Rr.js";import"./lottie-web-4koyQiv_.js";function R(){const{t}=e();return r.jsxs(r.Fragment,{children:[r.jsx(i,{children:r.jsx("title",{children:t("pageTitle.userCenter")})}),r.jsx(o,{onlyProfile:!0,currentTab:"",disableAutoRedirect:!0})]})}export{R as default};
1
+ import{j as r}from"./vendor-mui-core-___CiWHn.js";import{$ as o}from"./user-center-Dyu4ORgh.js";import{H as i}from"./index-CK2ZwMoB.js";import{V as e}from"./vendor-ux-pxYpYMxD.js";import"./vendor-react-CUXIiAnY.js";import"./vendor-hooks-L8kZVRUL.js";import"./vendor-utils-Doa0RxLS.js";import"./index-Cc_JDDUW.js";import"./arrow-down.svg-CpfG-t7r.js";import"./revoke.svg-CuiCGfVW.js";import"./index-CdVfZKvV.js";import"./index-JqMHvzVF.js";import"./vendor-arcblock-DBEMYjVA.js";import"./index-BWJVW6O0.js";import"./index-DRYJ0xIl.js";import"./index-BojVbZw0.js";import"./index-DDc9u4Rr.js";import"./lottie-web-4koyQiv_.js";function R(){const{t}=e();return r.jsxs(r.Fragment,{children:[r.jsx(i,{children:r.jsx("title",{children:t("pageTitle.userCenter")})}),r.jsx(o,{onlyProfile:!0,currentTab:"",disableAutoRedirect:!0})]})}export{R as default};