@abtnode/blocklet-services 1.16.46-beta-20250709-123154-c05c363c → 1.16.47-beta-20250710-073736-01b9c1bc

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 (109) hide show
  1. package/api/index.js +11 -0
  2. package/api/libs/image.js +1 -1
  3. package/dist/assets/{access-control-CMbWBbA-.js → access-control-D9ajNfrY.js} +1 -1
  4. package/dist/assets/{add-component-core-C_-47aWH.js → add-component-core-BUbtTpoW.js} +2 -2
  5. package/dist/assets/{add-resource-CF3PYVap.js → add-resource-CtM0iCKK.js} +1 -1
  6. package/dist/assets/{addon-BU6EtMS1.js → addon-DCIzT5_Z.js} +1 -1
  7. package/dist/assets/{advanced-BsXG5Uen.js → advanced-CC1tbROy.js} +1 -1
  8. package/dist/assets/{appearance-DnQKeY3-.js → appearance-CS0deqWb.js} +1 -1
  9. package/dist/assets/{arrow-down.svg-CaNNzVmj.js → arrow-down.svg-BykEFw6H.js} +1 -1
  10. package/dist/assets/{audit-logs-BdTL3Ee_.js → audit-logs-CYNqDQoO.js} +1 -1
  11. package/dist/assets/{authorize-D3GrNEeY.js → authorize-CXMrv2qg.js} +1 -1
  12. package/dist/assets/{branding-xOC7tV88.js → branding-BXu_IrWA.js} +2 -2
  13. package/dist/assets/{branding-DU4A47RN.js → branding-CerBGo3n.js} +1 -1
  14. package/dist/assets/{bundle-avatar-mX0oF7zo.js → bundle-avatar-BzV5PyCo.js} +1 -1
  15. package/dist/assets/{complete-DyNDIJOz.js → complete-Derz7Riq.js} +1 -1
  16. package/dist/assets/{component-DTQzu9Ux.js → component-D_LcLvga.js} +3 -3
  17. package/dist/assets/{config-DlVTbC3O.js → config-BZak2zrL.js} +1 -1
  18. package/dist/assets/{config-CLS5JN-Q.js → config-Bzod-0Gd.js} +1 -1
  19. package/dist/assets/{config-navigation-beAE71Co.js → config-navigation-BIPzVxTz.js} +3 -3
  20. package/dist/assets/{config-space-p8dvh7nV.js → config-space-bJO1Pq2d.js} +1 -1
  21. package/dist/assets/{confirm-CCJkd_GP.js → confirm-_x5prMc6.js} +1 -1
  22. package/dist/assets/{connect-CRMI4vhC.js → connect-DMnnk6Yx.js} +1 -1
  23. package/dist/assets/{connect-Bscwq6pz.js → connect-Du3HB8Ck.js} +1 -1
  24. package/dist/assets/{connect-to-DK_UHSXd.js → connect-to-CWHsYUA6.js} +1 -1
  25. package/dist/assets/{dashboard-EECTIwDT.js → dashboard-e9cJiXmU.js} +3 -3
  26. package/dist/assets/{delete-confirm-OwSiQs5a.js → delete-confirm-DBhhuh63.js} +1 -1
  27. package/dist/assets/{domain-Bqb4STve.js → domain-CouGHCP6.js} +1 -1
  28. package/dist/assets/{domain-action-card-78ZAvOXg.js → domain-action-card-BzjWIWJc.js} +1 -1
  29. package/dist/assets/{domains-Cc33cE6l.js → domains-BcqusidF.js} +1 -1
  30. package/dist/assets/{email-CW26NZg4.js → email-BxJbHVNF.js} +1 -1
  31. package/dist/assets/engine-CbuJOouR.js +1 -0
  32. package/dist/assets/{exchange-passport-ARTNldc_.js → exchange-passport-D7pdvAln.js} +1 -1
  33. package/dist/assets/{form-C7DadyRx.js → form-RlCPH3oL.js} +1 -1
  34. package/dist/assets/{fuel-CdmuLJ5m.js → fuel-BHhjNMAS.js} +1 -1
  35. package/dist/assets/{gen-access-key-DmGPdafH.js → gen-access-key-Cg9O2Wh7.js} +1 -1
  36. package/dist/assets/{get-safe-url-CFJ4a0MT.js → get-safe-url-70dNOHyP.js} +1 -1
  37. package/dist/assets/{home-DSXcBmq0.js → home-BMGT804L.js} +1 -1
  38. package/dist/assets/{iframe-CTQOWc1h.js → iframe-DnqoUNAW.js} +1 -1
  39. package/dist/assets/{index-DO3jlY1J.js → index--xoJi0Oj.js} +1 -1
  40. package/dist/assets/{index-DRCXfYI5.js → index-6xRm42_o.js} +1 -1
  41. package/dist/assets/{index-DjGGLSgp.js → index-B0stLJYN.js} +1 -1
  42. package/dist/assets/{index-DaWCw-fb.js → index-BCUaY7ta.js} +1 -1
  43. package/dist/assets/{index-MvpWBcrT.js → index-BE2l5xAg.js} +1 -1
  44. package/dist/assets/{index-Bk5yhzGt.js → index-BM8TdfbN.js} +1 -1
  45. package/dist/assets/{index-waZfnNlB.js → index-BWv4abon.js} +1 -1
  46. package/dist/assets/{index-Kcu6d0fi.js → index-BfqC3XQE.js} +1 -1
  47. package/dist/assets/{index-DJhjl40G.js → index-Bqnrq_qv.js} +1 -1
  48. package/dist/assets/{index-S9T-sBWO.js → index-CDq77s86.js} +4 -4
  49. package/dist/assets/{index-CzlSSzt5.js → index-CGAgz-tD.js} +1 -1
  50. package/dist/assets/{index-DMKmqbPb.js → index-CTVZqg23.js} +1 -1
  51. package/dist/assets/{index-Cs_Iwqc6.js → index-CV2-Ra10.js} +1 -1
  52. package/dist/assets/{index-n70kyMPo.js → index-Cj5h-Tfb.js} +1 -1
  53. package/dist/assets/{index-kQLw_ftN.js → index-D830QhSG.js} +1 -1
  54. package/dist/assets/{index-DYWITQqN.js → index-DAExpjL_.js} +1 -1
  55. package/dist/assets/{index-DhbrYLsW.js → index-DZZp9n8Q.js} +1 -1
  56. package/dist/assets/{index-C410XMZO.js → index-Dapt6sZR.js} +1 -1
  57. package/dist/assets/{index-DKdSMDX6.js → index-DhFdjB1D.js} +1 -1
  58. package/dist/assets/{index-BuCfItTx.js → index-T7E5JhUh.js} +3 -3
  59. package/dist/assets/{index-ClY8OPfZ.js → index-ZosxPaRN.js} +1 -1
  60. package/dist/assets/{index-CnZyhA37.js → index-glbEl-Pn.js} +1 -1
  61. package/dist/assets/{index-CHgWkvhM.js → index-tnuA-tTl.js} +4 -4
  62. package/dist/assets/{invitation-S4WXAiey.js → invitation-C6_hcRBi.js} +1 -1
  63. package/dist/assets/{invite-COY7brfc.js → invite-DLUpRfAh.js} +1 -1
  64. package/dist/assets/{issue-passport-BSa2KdpC.js → issue-passport-DCSyjcCc.js} +1 -1
  65. package/dist/assets/{item-C-9-K-dS.js → item-D9OLZ5b9.js} +1 -1
  66. package/dist/assets/{landing-page-C3ZqUsaQ.js → landing-page-C4ZUBLGU.js} +1 -1
  67. package/dist/assets/{layout-CFnEKAtz.js → layout-BcCpT3Sj.js} +1 -1
  68. package/dist/assets/{list-B7ZF5Ul0.js → list-BlDvw1so.js} +1 -1
  69. package/dist/assets/{list-Dvw6k9Fn.js → list-CJmxDpTz.js} +2 -2
  70. package/dist/assets/{localization-B4hOUoCq.js → localization-H6VEIn1X.js} +1 -1
  71. package/dist/assets/{log-CQyBD4pJ.js → log-Bo8H0pew.js} +1 -1
  72. package/dist/assets/{login-yfGJSAJb.js → login-COCCrN_2.js} +1 -1
  73. package/dist/assets/{login-oauth-callback-BXAgY8t2.js → login-oauth-callback-BBKbLyu-.js} +1 -1
  74. package/dist/assets/{logo-uploader-DL_O0r92.js → logo-uploader-CnbjQmUt.js} +2 -2
  75. package/dist/assets/{lost-passport-BeFjTnh-.js → lost-passport-DsXYEZzf.js} +1 -1
  76. package/dist/assets/{open-window-PnHF0kAn.js → open-window-LUOmt0hD.js} +1 -1
  77. package/dist/assets/{over-due-invoice-payment-COY8cvLu.js → over-due-invoice-payment-CuQ5h3hN.js} +1 -1
  78. package/dist/assets/{overview-Cd-vxOiy.js → overview-Cn9TZC8v.js} +1 -1
  79. package/dist/assets/{passport-item-DelVKtIt.js → passport-item-DmWZqcWM.js} +1 -1
  80. package/dist/assets/{permission-B4gBENoO.js → permission-3PNyBKZ2.js} +1 -1
  81. package/dist/assets/{preferences-CjO06ZIQ.js → preferences-DVGAbEme.js} +1 -1
  82. package/dist/assets/{profile-embed-BitC6ZoS.js → profile-embed-CI5k42bk.js} +1 -1
  83. package/dist/assets/{publish-resource-Ck5quuGX.js → publish-resource-EHXQz0a8.js} +1 -1
  84. package/dist/assets/{runtime-B-Viq2us.js → runtime-WlpSIzes.js} +1 -1
  85. package/dist/assets/sdk-6bZnDL_f.js +1 -0
  86. package/dist/assets/{security-J0LBanar.js → security-pXCcg1d2.js} +1 -1
  87. package/dist/assets/{session-CD-6TrlW.js → session-CvQ97dDY.js} +1 -1
  88. package/dist/assets/{setup-CpWZbzzi.js → setup-DNMNAWdA.js} +3 -3
  89. package/dist/assets/{spaces-Jt4I6QVN.js → spaces-DVGE8nur.js} +1 -1
  90. package/dist/assets/{start-DFxA6tPZ.js → start-CgAXib9j.js} +1 -1
  91. package/dist/assets/{status-B2xgYwSq.js → status-CxWCFwty.js} +1 -1
  92. package/dist/assets/{step-actions-BnfP6cxN.js → step-actions-Cmo-e1Kn.js} +1 -1
  93. package/dist/assets/{studio-CiSsKpFb.js → studio-BoYrF6Kl.js} +1 -1
  94. package/dist/assets/{traffic-C0Ugjtml.js → traffic-2Q6t1xaL.js} +1 -1
  95. package/dist/assets/{transfer-BrnC_C-u.js → transfer-B7bfp-Lw.js} +1 -1
  96. package/dist/assets/{unsubscribe-Df9woQco.js → unsubscribe-B1VOJ7QT.js} +1 -1
  97. package/dist/assets/{use-blocklet-logo-B1g1jSm8.js → use-blocklet-logo-C7qZcidt.js} +1 -1
  98. package/dist/assets/{user-center-lZ9ifkcH.js → user-center-BfW2lvH2.js} +3 -3
  99. package/dist/assets/{user-center-Dicuqlij.js → user-center-Cg8K5HLJ.js} +3 -3
  100. package/dist/assets/{user-sessions-DmuUfMxJ.js → user-sessions-DEwJRITu.js} +1 -1
  101. package/dist/assets/{util-Doke8P4Y.js → util-B-cMjJCC.js} +1 -1
  102. package/dist/assets/{util-BTNHVX94.js → util-CNKleiqU.js} +1 -1
  103. package/dist/assets/{wrap-locale-CfJqsNLW.js → wrap-locale-Bf1-s-bS.js} +1 -1
  104. package/dist/assets/{zh-DJzU8mmk.js → zh-CEmPmptr.js} +1 -1
  105. package/dist/index.html +1 -1
  106. package/dist/service-worker.js +1 -1
  107. package/package.json +23 -23
  108. package/dist/assets/engine-CcVO7RNx.js +0 -1
  109. package/dist/assets/sdk-Bg2mtU3m.js +0 -1
@@ -1 +1 @@
1
- import{j as e,av as d,ak as r,T as m,aX as p,V as u}from"./vendor-mui-core-p6jGoroc.js";import{g as x,j as f,h}from"./vendor-hooks-zCCbpt45.js";import{u as c}from"./vendor-react-x2lQvn4m.js";import{g as j,c as y,k as w,u as C}from"./index-S9T-sBWO.js";import{T as v}from"./vendor-ux-TkkDR0Gn.js";import{C as k}from"./vendor-utils-CtD44yV-.js";import"./vendor-arcblock-BndcJjQO.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,V as u}from"./vendor-mui-core-p6jGoroc.js";import{g as x,j as f,h}from"./vendor-hooks-zCCbpt45.js";import{u as c}from"./vendor-react-x2lQvn4m.js";import{g as j,c as y,k as w,u as C}from"./index-CDq77s86.js";import{T as v}from"./vendor-ux-TkkDR0Gn.js";import{C as k}from"./vendor-utils-CtD44yV-.js";import"./vendor-arcblock-BndcJjQO.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,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-BuCfItTx.js","assets/index-S9T-sBWO.js","assets/vendor-mui-core-p6jGoroc.js","assets/vendor-react-x2lQvn4m.js","assets/vendor-ux-TkkDR0Gn.js","assets/vendor-utils-CtD44yV-.js","assets/vendor-hooks-zCCbpt45.js","assets/lottie-web-4koyQiv_.js","assets/vendor-ux-DYcPPYq2.css","assets/vendor-arcblock-BndcJjQO.js","assets/index-DrVXX4fX.css","assets/index-MGxe3V9B.js","assets/index-DRYJ0xIl.js","assets/index-B5LvOF-F.css"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-T7E5JhUh.js","assets/index-CDq77s86.js","assets/vendor-mui-core-p6jGoroc.js","assets/vendor-react-x2lQvn4m.js","assets/vendor-ux-TkkDR0Gn.js","assets/vendor-utils-CtD44yV-.js","assets/vendor-hooks-zCCbpt45.js","assets/lottie-web-4koyQiv_.js","assets/vendor-ux-DYcPPYq2.css","assets/vendor-arcblock-BndcJjQO.js","assets/index-DrVXX4fX.css","assets/index-MGxe3V9B.js","assets/index-DRYJ0xIl.js","assets/index-B5LvOF-F.css"])))=>i.map(i=>d[i]);
2
2
  import{at as n,ak as l,j as t,$ as o}from"./vendor-mui-core-p6jGoroc.js";import{T as z,z as E,_ as F}from"./vendor-ux-TkkDR0Gn.js";import{r as f}from"./vendor-react-x2lQvn4m.js";import{n as c,C as O}from"./vendor-utils-CtD44yV-.js";const W=n.span`
3
3
  color: ${e=>e.theme.palette.error.main};
4
4
  &::before {
@@ -102,7 +102,7 @@ import{at as n,ak as l,j as t,$ as o}from"./vendor-mui-core-p6jGoroc.js";import{
102
102
  }
103
103
  }
104
104
  }
105
- `,_=f.lazy(()=>F(()=>import("./index-BuCfItTx.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13])).then(e=>({default:e.Uploader}))),q="/blocklet/logo/upload",m=[".png",".jpg",".jpeg",".webp",".bmp",".ico"];function C({url:e,height:h=80,width:g="auto",enabled:s=!0,allowSVG:x=!0,type:r,did:i,prefix:b,headers:w=c,aspectRatio:p=1,minWidth:v=256,minHeight:k=256,onUploaded:y=c,children:d=null}){const{t:$,locale:R}=z(),a=f.useRef(null),u=()=>{a.current?.open()},j=()=>{y(),a.current?.close()},P={cursor:s?"pointer":"default","&::after":{content:`"${$("common.switch")}"`}};return t.jsxs(M,{id:`uploader-${i}-${r}`,children:[t.jsx(_,{ref:a,locale:R,popup:!0,onUploadFinish:j,plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:O(b,q,r,i),disableMediaKitPrefix:!0,disableMediaKitStatus:!0},coreProps:{restrictions:{allowedFileExts:x?[...m,".svg"]:m,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:p,initialAspectRatio:p,croppedCanvasOptions:{minWidth:v,minHeight:k}}},tusProps:{headers:w}}),d?t.jsx(l,{onClick:u,children:d}):t.jsx(l,{className:E("uploader-wrapper",s&&"enabled"),sx:P,onClick:u,children:t.jsx("img",{alt:r,src:e,style:{width:g,height:h}})})]},`uploader-${i}-${r}`)}C.propTypes={url:o.string.isRequired,type:o.oneOf(["square","rect","favicon","splash-portrait","splash-landscape","og-image"]).isRequired,did:o.string.isRequired,prefix:o.string.isRequired,headers:o.func,onUploaded:o.func,height:o.number,width:o.any,enabled:o.bool,allowSVG:o.bool,aspectRatio:o.number,minWidth:o.number,minHeight:o.number,children:o.node};const M=n.div`
105
+ `,_=f.lazy(()=>F(()=>import("./index-T7E5JhUh.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13])).then(e=>({default:e.Uploader}))),q="/blocklet/logo/upload",m=[".png",".jpg",".jpeg",".webp",".bmp",".ico"];function C({url:e,height:h=80,width:g="auto",enabled:s=!0,allowSVG:x=!0,type:r,did:i,prefix:b,headers:w=c,aspectRatio:p=1,minWidth:v=256,minHeight:k=256,onUploaded:y=c,children:d=null}){const{t:$,locale:R}=z(),a=f.useRef(null),u=()=>{a.current?.open()},j=()=>{y(),a.current?.close()},P={cursor:s?"pointer":"default","&::after":{content:`"${$("common.switch")}"`}};return t.jsxs(M,{id:`uploader-${i}-${r}`,children:[t.jsx(_,{ref:a,locale:R,popup:!0,onUploadFinish:j,plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:O(b,q,r,i),disableMediaKitPrefix:!0,disableMediaKitStatus:!0},coreProps:{restrictions:{allowedFileExts:x?[...m,".svg"]:m,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:p,initialAspectRatio:p,croppedCanvasOptions:{minWidth:v,minHeight:k}}},tusProps:{headers:w}}),d?t.jsx(l,{onClick:u,children:d}):t.jsx(l,{className:E("uploader-wrapper",s&&"enabled"),sx:P,onClick:u,children:t.jsx("img",{alt:r,src:e,style:{width:g,height:h}})})]},`uploader-${i}-${r}`)}C.propTypes={url:o.string.isRequired,type:o.oneOf(["square","rect","favicon","splash-portrait","splash-landscape","og-image"]).isRequired,did:o.string.isRequired,prefix:o.string.isRequired,headers:o.func,onUploaded:o.func,height:o.number,width:o.any,enabled:o.bool,allowSVG:o.bool,aspectRatio:o.number,minWidth:o.number,minHeight:o.number,children:o.node};const M=n.div`
106
106
  .uploader-wrapper {
107
107
  display: inline-flex;
108
108
  position: relative;
@@ -1,5 +1,5 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-C-vjjw9E.js","assets/vendor-react-x2lQvn4m.js"])))=>i.map(i=>d[i]);
2
- import{j as e,at as $,$ as v,O as U,ak as p,b4 as z,b0 as X,T as N,bE as H,bF as B,bG as G,a$ as J,av as O,bH as V,bI as Q,bJ as q}from"./vendor-mui-core-p6jGoroc.js";import{b as K,c as Y,n as I,_ as Z,h as ee,T as te}from"./vendor-ux-TkkDR0Gn.js";import{r as u}from"./vendor-react-x2lQvn4m.js";import{g as se,n as oe}from"./vendor-hooks-zCCbpt45.js";import{$ as D,E as L,H as ae,d as ne,S as re,s as ie,b as ce}from"./index-S9T-sBWO.js";import{T as le}from"./vendor-utils-CtD44yV-.js";import{N as pe}from"./index-DO3jlY1J.js";import{W as de}from"./did-address-BdvYNOBf.js";import{w as ue}from"./wrap-locale-CfJqsNLW.js";import{u as me}from"./use-passport-id-B-b-_oYF.js";import{g as he}from"./get-safe-url-CFJ4a0MT.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-BndcJjQO.js";function E({list:s=[],width:c=300,height:m=400,cardSpace:l=40,onSelect:i=()=>{},defaultIndex:y=0}){const[h,k]=u.useState(0),[x,o]=u.useState(0),d=u.useRef(null),f=n=>{if(n<0||n>s.length-1)return;k(n);const r=d.current.clientWidth;o(n*(c+l)-(r-c)/2+l*.5),i(n)};u.useEffect(()=>{f(y);const n=r=>r.preventDefault();d.current.addEventListener("touchmove",n,{passive:!1})},[]);let b;const a=n=>{b=n.touches[0].clientX},w=n=>{const r=n.changedTouches[0],j=b-r.clientX;Math.abs(j)>60&&(j>0?f(h+1):f(h-1))};return e.jsx(xe,{ref:d,onTouchStart:a,onTouchEnd:w,children:e.jsx("div",{className:"card-container",style:{transform:`translate(${-x}px, 0)`},children:s.map((n,r)=>e.jsx("div",{className:`card-item ${r===h?"selected":""}`,style:{width:c,height:m,margin:l/2},onClick:()=>f(r),children:n.display?e.jsx("div",{className:"card-content",children:e.jsx(pe,{data:n.display,style:{width:"100%",height:"100%"}})}):e.jsx("div",{className:"card-content",dangerouslySetInnerHTML:{__html:n.src}})},n.id))})})}const xe=$.div`
2
+ import{j as e,at as $,$ as v,O as U,ak as p,b4 as z,b0 as X,T as N,bE as H,bF as B,bG as G,a$ as J,av as O,bH as V,bI as Q,bJ as q}from"./vendor-mui-core-p6jGoroc.js";import{b as K,c as Y,n as I,_ as Z,h as ee,T as te}from"./vendor-ux-TkkDR0Gn.js";import{r as u}from"./vendor-react-x2lQvn4m.js";import{g as se,n as oe}from"./vendor-hooks-zCCbpt45.js";import{$ as D,E as L,H as ae,d as ne,S as re,s as ie,b as ce}from"./index-CDq77s86.js";import{T as le}from"./vendor-utils-CtD44yV-.js";import{N as pe}from"./index--xoJi0Oj.js";import{W as de}from"./did-address-BdvYNOBf.js";import{w as ue}from"./wrap-locale-Bf1-s-bS.js";import{u as me}from"./use-passport-id-B-b-_oYF.js";import{g as he}from"./get-safe-url-70dNOHyP.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-BndcJjQO.js";function E({list:s=[],width:c=300,height:m=400,cardSpace:l=40,onSelect:i=()=>{},defaultIndex:y=0}){const[h,k]=u.useState(0),[x,o]=u.useState(0),d=u.useRef(null),f=n=>{if(n<0||n>s.length-1)return;k(n);const r=d.current.clientWidth;o(n*(c+l)-(r-c)/2+l*.5),i(n)};u.useEffect(()=>{f(y);const n=r=>r.preventDefault();d.current.addEventListener("touchmove",n,{passive:!1})},[]);let b;const a=n=>{b=n.touches[0].clientX},w=n=>{const r=n.changedTouches[0],j=b-r.clientX;Math.abs(j)>60&&(j>0?f(h+1):f(h-1))};return e.jsx(xe,{ref:d,onTouchStart:a,onTouchEnd:w,children:e.jsx("div",{className:"card-container",style:{transform:`translate(${-x}px, 0)`},children:s.map((n,r)=>e.jsx("div",{className:`card-item ${r===h?"selected":""}`,style:{width:c,height:m,margin:l/2},onClick:()=>f(r),children:n.display?e.jsx("div",{className:"card-content",children:e.jsx(pe,{data:n.display,style:{width:"100%",height:"100%"}})}):e.jsx("div",{className:"card-content",dangerouslySetInnerHTML:{__html:n.src}})},n.id))})})}const xe=$.div`
3
3
  overflow: hidden;
4
4
  mask-image: linear-gradient(to left, transparent, black 3%, black 97%, transparent);
5
5
  overflow: hidden;
@@ -1 +1 @@
1
- import{j as s}from"./vendor-mui-core-p6jGoroc.js";import{r as e}from"./vendor-react-x2lQvn4m.js";import{g as m}from"./get-safe-url-CFJ4a0MT.js";import"./index-S9T-sBWO.js";import"./vendor-ux-TkkDR0Gn.js";import"./vendor-utils-CtD44yV-.js";import"./vendor-hooks-zCCbpt45.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-BndcJjQO.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-p6jGoroc.js";import{r as e}from"./vendor-react-x2lQvn4m.js";import{g as m}from"./get-safe-url-70dNOHyP.js";import"./index-CDq77s86.js";import"./vendor-ux-TkkDR0Gn.js";import"./vendor-utils-CtD44yV-.js";import"./vendor-hooks-zCCbpt45.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-BndcJjQO.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{J as le,j as t,b1 as p,aX as G,V as h,T as k,b0 as de}from"./vendor-mui-core-p6jGoroc.js";import{r as l}from"./vendor-react-x2lQvn4m.js";import{T as me,H as f,a as ye}from"./vendor-ux-TkkDR0Gn.js";import{C as w,d as pe}from"./vendor-utils-CtD44yV-.js";import{k as fe}from"./vendor-hooks-zCCbpt45.js";import{v as ve,w as A,x as he,y as xe,z as B,A as be,B as ge,L as Ce,C as je}from"./index-S9T-sBWO.js";const ke=async n=>{if(!n.subscriptionId&&!n.customerId)throw new Error("Either subscriptionId or customerId must be provided");let m;return n.subscriptionId?m=`/api/subscriptions/${n.subscriptionId}/overdue/invoices`:m=`/api/customers/${n.customerId}/overdue/invoices`,(await be.get(n.authToken?w(m,`?authToken=${n.authToken}`):m)).data};function Ie({subscriptionId:n=void 0,customerId:m=void 0,mode:R="default",dialogProps:x={open:!0},children:S=void 0,onPaid:z=()=>{},detailLinkOptions:d={enabled:!0},successToast:M=!0,alertMessage:q="",authToken:Q=void 0}){const{t:r,locale:Y}=me(),T=le(),{connect:$,session:Z}=ve(),[H,ee]=l.useState(""),[O,v]=l.useState(!1),[te,P]=l.useState(x.open||!1),[re,ne]=l.useState({}),[se,E]=l.useState({}),N=n?"subscription":"customer",i=m||Z?.user?.did,U=n||i,b=l.useRef(i),{data:s={summary:{},invoices:[]},error:V,loading:oe,runAsync:W}=fe(()=>ke({subscriptionId:n,customerId:i,authToken:Q}),{ready:!!n||!!i,onSuccess:e=>{e.customer?.id&&e.customer?.id!==b.current&&(b.current=e.customer?.id)}}),g=l.useMemo(()=>n?w(A(),`/customer/subscription/${n}`):i?w(A(),"/customer/invoice/past-due"):"",[n,i]),o=l.useMemo(()=>s?.summary?Object.values(s.summary):[],[s?.summary]),ie=pe(async e=>{M&&(f.close(),f.success(r("payment.customer.invoice.paySuccess"))),v(!1),(await W()).invoices?.length===0&&(P(!1),z(U,e,N))},1e3,{leading:!1,trailing:!0,maxWait:5e3}),I=he(),_=xe("events"),ce=async()=>{let e=!1;return await je(async()=>(e=(await W()).invoices?.length===0,e),{interval:2e3,timeout:3*60*1e3}),e},ae=async()=>{if(I)try{const e=await ce();M&&(f.close(),f.success(r("payment.customer.invoice.paySuccess"))),e&&(P(!1),z(U,H,N))}catch(e){console.error("Check payment status failed:",e)}};l.useEffect(()=>{_&&!I&&_.on("invoice.paid",({response:e})=>{const a=`${n||e.customer_id}-${e.currency_id}`;(n&&e.subscription_id===n||i&&i===e.customer_id||b.current&&b.current===e.customer_id)&&(re[a]||(ne(u=>({...u,[a]:1})),ie(e.currency_id)))})},[_,n,i]);const D=e=>{const{currency:c,method:a}=e;if(a.type==="stripe"){f.error(r("payment.subscription.overdue.notSupport"));return}if(!O&&(ee(c.id),v(!0),E(u=>({...u,[c.id]:"idle"})),["arcblock","ethereum","base"].includes(a.type))){const u={currencyId:c.id};n?u.subscriptionId=n:i&&(u.customerId=i),$.open({locale:Y,containerEl:void 0,saveConnect:!1,action:"collect-batch",prefix:w(A(),"/api/did"),useSocket:!I,extraParams:u,messages:{scan:r("common.connect.defaultScan"),title:r("payment.customer.invoice.payBatch"),confirm:r("common.connect.confirm")},onSuccess:()=>{$.close(),ae(),v(!1),E(y=>({...y,[c.id]:"success"}))},onClose:()=>{$.close(),v(!1)},onError:y=>{f.error(ge(y)),E(j=>({...j,[c.id]:"error"})),v(!1)}})}},C=()=>{P(!1),x.onClose?.()},J=e=>{d.onClick?(e.preventDefault(),d.onClick(e)):d.enabled||(e.preventDefault(),C())};if(oe)return null;const K=()=>d.title?d.title:r(n?"payment.subscription.overdue.view":"payment.customer.pastDue.view"),L=(e,c=!0,a={variant:"contained"})=>{const{currency:u}=e,y=O&&H===u.id,j=se[u.id]||"idle";return j==="success"?t.jsx(h,{variant:a?.variant||"contained",size:"small",...c?{}:{color:"success",startIcon:t.jsx(de,{})},children:r("payment.subscription.overdue.paid")}):j==="error"?t.jsx(h,{variant:"contained",size:"small",onClick:()=>D(e),...a,children:r("payment.subscription.overdue.retry")}):e.method.type==="stripe"?t.jsx(h,{variant:"contained",color:"primary",onClick:()=>window.open(g,"_blank"),...a,children:r("payment.subscription.overdue.viewNow")}):t.jsx(Ce,{variant:"contained",size:"small",disabled:y,loading:y,onClick:()=>D(e),...a,children:r("payment.subscription.overdue.payNow")})},F=e=>e.name&&e.type!=="arcblock"?` (${e.name})`:"",X=()=>{if(n&&s.subscription)return o.length===1?r("payment.subscription.overdue.title",{name:s.subscription?.description,count:s.invoices?.length,total:B(o[0]?.amount,o[0]?.currency?.decimal),symbol:o[0]?.currency?.symbol,method:F(o[0]?.method)}):r("payment.subscription.overdue.simpleTitle",{name:s.subscription?.description,count:s.invoices?.length});if(i){let e="";return o.length===1?e=r("payment.customer.overdue.title",{subscriptionCount:s.subscriptionCount||0,count:s.invoices?.length,total:B(o[0]?.amount,o[0]?.currency?.decimal),symbol:o[0]?.currency?.symbol,method:F(o[0]?.method)}):e=r("payment.customer.overdue.simpleTitle",{subscriptionCount:s.subscriptionCount||0,count:s.invoices?.length}),q?`${e}${q}`:`${e}${r("payment.customer.overdue.defaultAlert")}`}return""},ue=()=>n&&s.subscription?r("payment.subscription.overdue.empty",{name:s.subscription?.description}):r("payment.customer.overdue.empty");return R==="custom"&&S&&typeof S=="function"?t.jsx(p,{children:S(D,{subscription:s?.subscription,summary:s?.summary,invoices:s?.invoices,subscriptionCount:s?.subscriptionCount,detailUrl:g})}):t.jsx(ye,{PaperProps:{style:{minHeight:"auto"}},...x||{},open:te,title:x?.title||r("payment.subscription.overdue.pastDue"),sx:{"& .MuiDialogContent-root":{pt:0}},onClose:C,children:V?t.jsx(G,{severity:"error",children:V.message}):t.jsxs(p,{sx:{gap:1},children:[o.length===0&&t.jsxs(t.Fragment,{children:[t.jsx(G,{severity:"success",children:ue()}),t.jsx(p,{direction:"row",sx:{justifyContent:"flex-end",mt:2},children:t.jsx(h,{variant:"outlined",color:"primary",onClick:C,sx:{width:"fit-content"},children:r("common.know")})})]}),o.length===1&&t.jsxs(t.Fragment,{children:[t.jsxs(k,{variant:"body1",sx:{color:"text.secondary"},children:[X(),d.enabled&&t.jsxs(t.Fragment,{children:[t.jsx("br",{}),r("payment.subscription.overdue.description"),t.jsx("a",{href:g,target:"_blank",onClick:J,rel:"noreferrer",style:{color:T.palette.text.link},children:K()})]})]}),t.jsxs(p,{direction:"row",sx:{justifyContent:"flex-end",gap:2,mt:2},children:[t.jsx(h,{variant:"outlined",color:"primary",onClick:C,children:r("common.cancel")}),L(o[0])]})]}),o.length>1&&t.jsxs(t.Fragment,{children:[t.jsxs(k,{variant:"body1",sx:{color:"text.secondary"},children:[X(),d.enabled&&t.jsxs(t.Fragment,{children:[t.jsx("br",{}),r("payment.subscription.overdue.description"),t.jsx("a",{href:g,target:"_blank",rel:"noreferrer",onClick:J,style:{color:T.palette.text.link},children:K()})]})]}),t.jsx(k,{variant:"body1",sx:{color:"text.secondary"},children:r("payment.subscription.overdue.list")}),t.jsx(p,{children:o.map(e=>t.jsxs(p,{direction:"row",sx:{justifyContent:"space-between",alignItems:"center",py:1,px:.5,borderBottom:"1px solid",borderColor:"grey.200","&:hover":{backgroundColor:()=>T.palette.grey[100]},mt:0},children:[t.jsx(k,{children:r("payment.subscription.overdue.total",{total:B(e?.amount,e?.currency?.decimal),currency:e?.currency?.symbol,method:F(e?.method)})}),L(e,!1,{variant:"text",sx:{color:"text.link"}})]},e?.currency?.id))})]})]})})}export{Ie as O};
1
+ import{J as le,j as t,b1 as p,aX as G,V as h,T as k,b0 as de}from"./vendor-mui-core-p6jGoroc.js";import{r as l}from"./vendor-react-x2lQvn4m.js";import{T as me,H as f,a as ye}from"./vendor-ux-TkkDR0Gn.js";import{C as w,d as pe}from"./vendor-utils-CtD44yV-.js";import{k as fe}from"./vendor-hooks-zCCbpt45.js";import{v as ve,w as A,x as he,y as xe,z as B,A as be,B as ge,L as Ce,C as je}from"./index-CDq77s86.js";const ke=async n=>{if(!n.subscriptionId&&!n.customerId)throw new Error("Either subscriptionId or customerId must be provided");let m;return n.subscriptionId?m=`/api/subscriptions/${n.subscriptionId}/overdue/invoices`:m=`/api/customers/${n.customerId}/overdue/invoices`,(await be.get(n.authToken?w(m,`?authToken=${n.authToken}`):m)).data};function Ie({subscriptionId:n=void 0,customerId:m=void 0,mode:R="default",dialogProps:x={open:!0},children:S=void 0,onPaid:z=()=>{},detailLinkOptions:d={enabled:!0},successToast:M=!0,alertMessage:q="",authToken:Q=void 0}){const{t:r,locale:Y}=me(),T=le(),{connect:$,session:Z}=ve(),[H,ee]=l.useState(""),[O,v]=l.useState(!1),[te,P]=l.useState(x.open||!1),[re,ne]=l.useState({}),[se,E]=l.useState({}),N=n?"subscription":"customer",i=m||Z?.user?.did,U=n||i,b=l.useRef(i),{data:s={summary:{},invoices:[]},error:V,loading:oe,runAsync:W}=fe(()=>ke({subscriptionId:n,customerId:i,authToken:Q}),{ready:!!n||!!i,onSuccess:e=>{e.customer?.id&&e.customer?.id!==b.current&&(b.current=e.customer?.id)}}),g=l.useMemo(()=>n?w(A(),`/customer/subscription/${n}`):i?w(A(),"/customer/invoice/past-due"):"",[n,i]),o=l.useMemo(()=>s?.summary?Object.values(s.summary):[],[s?.summary]),ie=pe(async e=>{M&&(f.close(),f.success(r("payment.customer.invoice.paySuccess"))),v(!1),(await W()).invoices?.length===0&&(P(!1),z(U,e,N))},1e3,{leading:!1,trailing:!0,maxWait:5e3}),I=he(),_=xe("events"),ce=async()=>{let e=!1;return await je(async()=>(e=(await W()).invoices?.length===0,e),{interval:2e3,timeout:3*60*1e3}),e},ae=async()=>{if(I)try{const e=await ce();M&&(f.close(),f.success(r("payment.customer.invoice.paySuccess"))),e&&(P(!1),z(U,H,N))}catch(e){console.error("Check payment status failed:",e)}};l.useEffect(()=>{_&&!I&&_.on("invoice.paid",({response:e})=>{const a=`${n||e.customer_id}-${e.currency_id}`;(n&&e.subscription_id===n||i&&i===e.customer_id||b.current&&b.current===e.customer_id)&&(re[a]||(ne(u=>({...u,[a]:1})),ie(e.currency_id)))})},[_,n,i]);const D=e=>{const{currency:c,method:a}=e;if(a.type==="stripe"){f.error(r("payment.subscription.overdue.notSupport"));return}if(!O&&(ee(c.id),v(!0),E(u=>({...u,[c.id]:"idle"})),["arcblock","ethereum","base"].includes(a.type))){const u={currencyId:c.id};n?u.subscriptionId=n:i&&(u.customerId=i),$.open({locale:Y,containerEl:void 0,saveConnect:!1,action:"collect-batch",prefix:w(A(),"/api/did"),useSocket:!I,extraParams:u,messages:{scan:r("common.connect.defaultScan"),title:r("payment.customer.invoice.payBatch"),confirm:r("common.connect.confirm")},onSuccess:()=>{$.close(),ae(),v(!1),E(y=>({...y,[c.id]:"success"}))},onClose:()=>{$.close(),v(!1)},onError:y=>{f.error(ge(y)),E(j=>({...j,[c.id]:"error"})),v(!1)}})}},C=()=>{P(!1),x.onClose?.()},J=e=>{d.onClick?(e.preventDefault(),d.onClick(e)):d.enabled||(e.preventDefault(),C())};if(oe)return null;const K=()=>d.title?d.title:r(n?"payment.subscription.overdue.view":"payment.customer.pastDue.view"),L=(e,c=!0,a={variant:"contained"})=>{const{currency:u}=e,y=O&&H===u.id,j=se[u.id]||"idle";return j==="success"?t.jsx(h,{variant:a?.variant||"contained",size:"small",...c?{}:{color:"success",startIcon:t.jsx(de,{})},children:r("payment.subscription.overdue.paid")}):j==="error"?t.jsx(h,{variant:"contained",size:"small",onClick:()=>D(e),...a,children:r("payment.subscription.overdue.retry")}):e.method.type==="stripe"?t.jsx(h,{variant:"contained",color:"primary",onClick:()=>window.open(g,"_blank"),...a,children:r("payment.subscription.overdue.viewNow")}):t.jsx(Ce,{variant:"contained",size:"small",disabled:y,loading:y,onClick:()=>D(e),...a,children:r("payment.subscription.overdue.payNow")})},F=e=>e.name&&e.type!=="arcblock"?` (${e.name})`:"",X=()=>{if(n&&s.subscription)return o.length===1?r("payment.subscription.overdue.title",{name:s.subscription?.description,count:s.invoices?.length,total:B(o[0]?.amount,o[0]?.currency?.decimal),symbol:o[0]?.currency?.symbol,method:F(o[0]?.method)}):r("payment.subscription.overdue.simpleTitle",{name:s.subscription?.description,count:s.invoices?.length});if(i){let e="";return o.length===1?e=r("payment.customer.overdue.title",{subscriptionCount:s.subscriptionCount||0,count:s.invoices?.length,total:B(o[0]?.amount,o[0]?.currency?.decimal),symbol:o[0]?.currency?.symbol,method:F(o[0]?.method)}):e=r("payment.customer.overdue.simpleTitle",{subscriptionCount:s.subscriptionCount||0,count:s.invoices?.length}),q?`${e}${q}`:`${e}${r("payment.customer.overdue.defaultAlert")}`}return""},ue=()=>n&&s.subscription?r("payment.subscription.overdue.empty",{name:s.subscription?.description}):r("payment.customer.overdue.empty");return R==="custom"&&S&&typeof S=="function"?t.jsx(p,{children:S(D,{subscription:s?.subscription,summary:s?.summary,invoices:s?.invoices,subscriptionCount:s?.subscriptionCount,detailUrl:g})}):t.jsx(ye,{PaperProps:{style:{minHeight:"auto"}},...x||{},open:te,title:x?.title||r("payment.subscription.overdue.pastDue"),sx:{"& .MuiDialogContent-root":{pt:0}},onClose:C,children:V?t.jsx(G,{severity:"error",children:V.message}):t.jsxs(p,{sx:{gap:1},children:[o.length===0&&t.jsxs(t.Fragment,{children:[t.jsx(G,{severity:"success",children:ue()}),t.jsx(p,{direction:"row",sx:{justifyContent:"flex-end",mt:2},children:t.jsx(h,{variant:"outlined",color:"primary",onClick:C,sx:{width:"fit-content"},children:r("common.know")})})]}),o.length===1&&t.jsxs(t.Fragment,{children:[t.jsxs(k,{variant:"body1",sx:{color:"text.secondary"},children:[X(),d.enabled&&t.jsxs(t.Fragment,{children:[t.jsx("br",{}),r("payment.subscription.overdue.description"),t.jsx("a",{href:g,target:"_blank",onClick:J,rel:"noreferrer",style:{color:T.palette.text.link},children:K()})]})]}),t.jsxs(p,{direction:"row",sx:{justifyContent:"flex-end",gap:2,mt:2},children:[t.jsx(h,{variant:"outlined",color:"primary",onClick:C,children:r("common.cancel")}),L(o[0])]})]}),o.length>1&&t.jsxs(t.Fragment,{children:[t.jsxs(k,{variant:"body1",sx:{color:"text.secondary"},children:[X(),d.enabled&&t.jsxs(t.Fragment,{children:[t.jsx("br",{}),r("payment.subscription.overdue.description"),t.jsx("a",{href:g,target:"_blank",rel:"noreferrer",onClick:J,style:{color:T.palette.text.link},children:K()})]})]}),t.jsx(k,{variant:"body1",sx:{color:"text.secondary"},children:r("payment.subscription.overdue.list")}),t.jsx(p,{children:o.map(e=>t.jsxs(p,{direction:"row",sx:{justifyContent:"space-between",alignItems:"center",py:1,px:.5,borderBottom:"1px solid",borderColor:"grey.200","&:hover":{backgroundColor:()=>T.palette.grey[100]},mt:0},children:[t.jsx(k,{children:r("payment.subscription.overdue.total",{total:B(e?.amount,e?.currency?.decimal),currency:e?.currency?.symbol,method:F(e?.method)})}),L(e,!1,{variant:"text",sx:{color:"text.link"}})]},e?.currency?.id))})]})]})})}export{Ie as O};
@@ -1,4 +1,4 @@
1
- import{j as e,ak as n,ar as D,a$ as te,at as F,$ as p,am as k,cu as ne,T as _,bY as L,bt as M}from"./vendor-mui-core-p6jGoroc.js";import{r as u,a as oe}from"./vendor-react-x2lQvn4m.js";import{I as h,T as A,n as se,A as ae,a0 as ie}from"./vendor-ux-TkkDR0Gn.js";import{d as re}from"./keyboard-arrow-down-rounded-8U0_i9QO.js";import{f as E}from"./index-BojVbZw0.js";import{u as le,p as ce}from"./dashboard-EECTIwDT.js";import{_ as me,Y as de,a0 as pe,aA as ue,Z as he,c as T,ad as N}from"./index-S9T-sBWO.js";import{v as xe}from"./index-VGO-dEle.js";import{u as ge}from"./dot-DWse_kXZ.js";import{C as fe}from"./vendor-utils-CtD44yV-.js";import{W as v}from"./did-address-BdvYNOBf.js";import{V as ve}from"./status-B2xgYwSq.js";import{c as be}from"./spaces-Jt4I6QVN.js";import"./vendor-hooks-zCCbpt45.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-BndcJjQO.js";import"./useLocalStorage-DHCQcCRn.js";import"./index-DBs9Ljax.js";import"./confirm-CCJkd_GP.js";import"./get-safe-url-CFJ4a0MT.js";import"./session-CD-6TrlW.js";import"./use-blocklet-logo-B1g1jSm8.js";import"./useSetState-BWrXo9eH.js";import"./index-CnZyhA37.js";import"./over-due-invoice-payment-COY8cvLu.js";import"./use-mobile-DpkDXDwi.js";import"./useAsync-C8Ma6muj.js";import"./omit-C6lXG4Q2.js";import"./api-CpYSt0CS.js";const je={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"/>'},ke={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"/>'},ye={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"/>'},we={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>'},Se={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>'},Te={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 K({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(D,{variant:"circular",width:32,height:32})}),e.jsxs(n,{children:[e.jsx(D,{className:`metric__number ${l?"metric__number--animated":""}`,variant:"rounded",width:160,height:"36px",sx:{mb:1}}),e.jsx(D,{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})}K.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=F(n)`
1
+ import{j as e,ak as n,ar as D,a$ as te,at as F,$ as p,am as k,cu as ne,T as _,bY as L,bt as M}from"./vendor-mui-core-p6jGoroc.js";import{r as u,a as oe}from"./vendor-react-x2lQvn4m.js";import{I as h,T as A,n as se,A as ae,a0 as ie}from"./vendor-ux-TkkDR0Gn.js";import{d as re}from"./keyboard-arrow-down-rounded-8U0_i9QO.js";import{f as E}from"./index-BojVbZw0.js";import{u as le,p as ce}from"./dashboard-e9cJiXmU.js";import{_ as me,Y as de,a0 as pe,aA as ue,Z as he,c as T,ad as N}from"./index-CDq77s86.js";import{v as xe}from"./index-VGO-dEle.js";import{u as ge}from"./dot-DWse_kXZ.js";import{C as fe}from"./vendor-utils-CtD44yV-.js";import{W as v}from"./did-address-BdvYNOBf.js";import{V as ve}from"./status-CxWCFwty.js";import{c as be}from"./spaces-DVGE8nur.js";import"./vendor-hooks-zCCbpt45.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-BndcJjQO.js";import"./useLocalStorage-DHCQcCRn.js";import"./index-DBs9Ljax.js";import"./confirm-_x5prMc6.js";import"./get-safe-url-70dNOHyP.js";import"./session-CvQ97dDY.js";import"./use-blocklet-logo-C7qZcidt.js";import"./useSetState-BWrXo9eH.js";import"./index-glbEl-Pn.js";import"./over-due-invoice-payment-CuQ5h3hN.js";import"./use-mobile-DpkDXDwi.js";import"./useAsync-C8Ma6muj.js";import"./omit-C6lXG4Q2.js";import"./api-CpYSt0CS.js";const je={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"/>'},ke={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"/>'},ye={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"/>'},we={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>'},Se={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>'},Te={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 K({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(D,{variant:"circular",width:32,height:32})}),e.jsxs(n,{children:[e.jsx(D,{className:`metric__number ${l?"metric__number--animated":""}`,variant:"rounded",width:160,height:"36px",sx:{mb:1}}),e.jsx(D,{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})}K.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=F(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{j as b,b1 as Ie,b4 as $e,T as we,am as Ei,$ as h,s as di,ak as Me,Y as ci,bK as ge,bL as ve,bM as Si,bN as Ai,bO as Oi,bP as Ve,bQ as Ci}from"./vendor-mui-core-p6jGoroc.js";import{T as Be,A as Ti}from"./vendor-ux-TkkDR0Gn.js";import{g as _i,a as Ii,l as Mi}from"./index-DKdSMDX6.js";import{an as We}from"./index-S9T-sBWO.js";import{a as je}from"./vendor-react-x2lQvn4m.js";import{a as ji}from"./vendor-hooks-zCCbpt45.js";import{W as Ue}from"./did-address-BdvYNOBf.js";import{p as Ui}from"./util-Doke8P4Y.js";import{u as Hi}from"./dashboard-EECTIwDT.js";var Li="2.0.3",He=500,Ge="user-agent",V="",Xe="?",ue="function",z="undefined",W="object",Le="string",k="browser",_="cpu",T="device",O="engine",S="os",F="result",s="name",i="type",o="vendor",n="version",y="architecture",se="major",t="model",re="console",u="mobile",g="tablet",v="smarttv",C="wearable",xe="xr",oe="embedded",K="inapp",Ne="brands",N="formFactors",Pe="fullVersionList",$="platform",qe="platformVersion",fe="bitness",D="sec-ch-ua",zi=D+"-full-version-list",Di=D+"-arch",Bi=D+"-"+fe,Ni=D+"-form-factors",Pi=D+"-"+u,qi=D+"-"+t,wi=D+"-"+$,Fi=wi+"-version",ui=[Ne,Pe,u,t,$,qe,y,N,fe],le="Amazon",P="Apple",Ye="ASUS",Ke="BlackBerry",B="Google",Qe="Huawei",Ze="Lenovo",Je="Honor",de="LG",ke="Microsoft",ye="Motorola",Re="Nvidia",ei="OnePlus",Ee="OPPO",Q="Samsung",ii="Sharp",Z="Sony",Se="Xiaomi",Ae="Zebra",ti="Chrome",ri="Chromium",U="Chromecast",$i="Edge",J="Firefox",ee="Opera",Oe="Facebook",oi="Sogou",q="Mobile ",ie=" Browser",ze="Windows",Vi=typeof window!==z,R=Vi&&window.navigator?window.navigator:void 0,H=R&&R.userAgentData?R.userAgentData:void 0,Wi=function(e,r){var a={},w=r;if(!be(r)){w={};for(var d in r)for(var p in r[d])w[p]=r[d][p].concat(w[p]?w[p]:[])}for(var c in e)a[c]=w[c]&&w[c].length%2===0?w[c].concat(e[c]):e[c];return a},pe=function(e){for(var r={},a=0;a<e.length;a++)r[e[a].toUpperCase()]=e[a];return r},De=function(e,r){if(typeof e===W&&e.length>0){for(var a in e)if(I(e[a])==I(r))return!0;return!1}return X(e)?I(r).indexOf(I(e))!==-1:!1},be=function(e,r){for(var a in e)return/^(browser|cpu|device|engine|os)$/.test(a)||(r?be(e[a]):!1)},X=function(e){return typeof e===Le},Ce=function(e){if(e){for(var r=[],a=G(/\\?\"/g,e).split(","),w=0;w<a.length;w++)if(a[w].indexOf(";")>-1){var d=ne(a[w]).split(";v=");r[w]={brand:d[0],version:d[1]}}else r[w]=ne(a[w]);return r}},I=function(e){return X(e)?e.toLowerCase():e},Te=function(e){return X(e)?G(/[^\d\.]/g,e).split(".")[0]:void 0},M=function(e){for(var r in e){var a=e[r];typeof a==W&&a.length==2?this[a[0]]=a[1]:this[a]=void 0}return this},G=function(e,r){return X(r)?r.replace(e,V):r},te=function(e){return G(/\\?\"/g,e)},ne=function(e,r){if(X(e))return e=G(/^\s\s*/,e),typeof r===z?e:e.substring(0,He)},_e=function(e,r){if(!(!e||!r))for(var a=0,w,d,p,c,m,l;a<r.length&&!m;){var f=r[a],E=r[a+1];for(w=d=0;w<f.length&&!m&&f[w];)if(m=f[w++].exec(e),m)for(p=0;p<E.length;p++)l=m[++d],c=E[p],typeof c===W&&c.length>0?c.length===2?typeof c[1]==ue?this[c[0]]=c[1].call(this,l):this[c[0]]=c[1]:c.length===3?typeof c[1]===ue&&!(c[1].exec&&c[1].test)?this[c[0]]=l?c[1].call(this,l,c[2]):void 0:this[c[0]]=l?l.replace(c[1],c[2]):void 0:c.length===4&&(this[c[0]]=l?c[3].call(this,l.replace(c[1],c[2])):void 0):this[c]=l||void 0;a+=2}},L=function(e,r){for(var a in r)if(typeof r[a]===W&&r[a].length>0){for(var w=0;w<r[a].length;w++)if(De(r[a][w],e))return a===Xe?void 0:a}else if(De(r[a],e))return a===Xe?void 0:a;return r.hasOwnProperty("*")?r["*"]:e},si={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},ni={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},ai={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[n,[s,q+"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[n,[s,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[s,n],[/opios[\/ ]+([\w\.]+)/i],[n,[s,ee+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[n,[s,ee+" GX"]],[/\bopr\/([\w\.]+)/i],[n,[s,ee]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[n,[s,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[n,[s,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:lg |qute)browser)\/([-\w\.]+)/i,/(heytap|ovi|115|surf)browser\/([\d\.]+)/i,/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i],[s,n],[/quark(?:pc)?\/([-\w\.]+)/i],[n,[s,"Quark"]],[/\bddg\/([\w\.]+)/i],[n,[s,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[n,[s,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[n,[s,"WeChat"]],[/konqueror\/([\w\.]+)/i],[n,[s,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[n,[s,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[n,[s,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[n,[s,"Smart "+Ze+ie]],[/(avast|avg)\/([\w\.]+)/i],[[s,/(.+)/,"$1 Secure"+ie],n],[/\bfocus\/([\w\.]+)/i],[n,[s,J+" Focus"]],[/\bopt\/([\w\.]+)/i],[n,[s,ee+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[n,[s,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[n,[s,"Dolphin"]],[/coast\/([\w\.]+)/i],[n,[s,ee+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[n,[s,"MIUI"+ie]],[/fxios\/([\w\.-]+)/i],[n,[s,q+J]],[/\bqihoobrowser\/?([\w\.]*)/i],[n,[s,"360"]],[/\b(qq)\/([\w\.]+)/i],[[s,/(.+)/,"$1Browser"],n],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[s,/(.+)/,"$1"+ie],n],[/samsungbrowser\/([\w\.]+)/i],[n,[s,Q+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[n,[s,oi+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[s,oi+" Mobile"],n],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[s,n],[/(lbbrowser|rekonq)/i],[s],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[n,s],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[s,Oe],n,[i,K]],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(instagram|snapchat)[\/ ]([-\w\.]+)/i],[s,n,[i,K]],[/\bgsa\/([\w\.]+) .*safari\//i],[n,[s,"GSA"],[i,K]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[n,[s,"TikTok"],[i,K]],[/\[(linkedin)app\]/i],[s,[i,K]],[/(chromium)[\/ ]([-\w\.]+)/i],[s,n],[/headlesschrome(?:\/([\w\.]+)| )/i],[n,[s,ti+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[s,ti+" WebView"],n],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[n,[s,"Android"+ie]],[/chrome\/([\w\.]+) mobile/i],[n,[s,q+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[s,n],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[n,[s,q+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[s,q+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[n,s],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[s,[n,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[s,n],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[s,q+J],n],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[s,"Netscape"],n],[/(wolvic|librewolf)\/([\w\.]+)/i],[s,n],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[n,[s,J+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[s,[n,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[s,[n,/[^\d\.]+./,V]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[y,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[y,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[y,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[y,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[y,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[y,/ower/,V,I]],[/ sun4\w[;\)]/i],[[y,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[y,I]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[t,[o,Q],[i,g]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[t,[o,Q],[i,u]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[t,[o,P],[i,u]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[t,[o,P],[i,g]],[/(macintosh);/i],[t,[o,P]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[t,[o,ii],[i,u]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[t,[o,Je],[i,g]],[/honor([-\w ]+)[;\)]/i],[t,[o,Je],[i,u]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[t,[o,Qe],[i,g]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[t,[o,Qe],[i,u]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[t,/_/g," "],[o,Se],[i,g]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[t,/_/g," "],[o,Se],[i,u]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[t,[o,Ee],[i,u]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[t,[o,L,{OnePlus:["304","403","203"],"*":Ee}],[i,g]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[t,[o,"BLU"],[i,u]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[t,[o,"Vivo"],[i,u]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[t,[o,"Realme"],[i,u]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[t,[o,ye],[i,u]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[t,[o,ye],[i,g]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[t,[o,de],[i,g]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch))(\w+)/i,/\blg-?([\d\w]+) bui/i],[t,[o,de],[i,u]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[t,[o,Ze],[i,g]],[/(nokia) (t[12][01])/i],[o,t,[i,g]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[t,/_/g," "],[i,u],[o,"Nokia"]],[/(pixel (c|tablet))\b/i],[t,[o,B],[i,g]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[t,[o,B],[i,u]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[t,[o,Z],[i,u]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[t,"Xperia Tablet"],[o,Z],[i,g]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[t,[o,ei],[i,u]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[t,[o,le],[i,g]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[t,/(.+)/g,"Fire Phone $1"],[o,le],[i,u]],[/(playbook);[-\w\),; ]+(rim)/i],[t,o,[i,g]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[t,[o,Ke],[i,u]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[t,[o,Ye],[i,g]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[t,[o,Ye],[i,u]],[/(nexus 9)/i],[t,[o,"HTC"],[i,g]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[o,[t,/_/g," "],[i,u]],[/tcl (xess p17aa)/i,/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i],[t,[o,"TCL"],[i,g]],[/droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i],[t,[o,"TCL"],[i,u]],[/(itel) ((\w+))/i],[[o,I],t,[i,L,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[t,[o,"Acer"],[i,g]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[t,[o,"Meizu"],[i,u]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[t,[o,"Ulefone"],[i,u]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[t,[o,"Energizer"],[i,u]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[t,[o,"Cat"],[i,u]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[t,[o,"Smartfren"],[i,u]],[/droid.+; (a(?:015|06[35]|142p?))/i],[t,[o,"Nothing"],[i,u]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[t,[o,"Archos"],[i,g]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[t,[o,"Archos"],[i,u]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[o,t,[i,g]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (blu|hmd|imo|tcl)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i,/(oppo) ?([\w ]+) bui/i],[o,t,[i,u]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[o,t,[i,g]],[/(surface duo)/i],[t,[o,ke],[i,g]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[t,[o,"Fairphone"],[i,u]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[t,[o,Re],[i,g]],[/(sprint) (\w+)/i],[o,t,[i,u]],[/(kin\.[onetw]{3})/i],[[t,/\./g," "],[o,ke],[i,u]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[t,[o,Ae],[i,g]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[t,[o,Ae],[i,u]],[/smart-tv.+(samsung)/i],[o,[i,v]],[/hbbtv.+maple;(\d+)/i],[[t,/^/,"SmartTV"],[o,Q],[i,v]],[/tcast.+(lg)e?. ([-\w]+)/i],[o,t,[i,v]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[o,de],[i,v]],[/(apple) ?tv/i],[o,[t,P+" TV"],[i,v]],[/crkey.*devicetype\/chromecast/i],[[t,U+" Third Generation"],[o,B],[i,v]],[/crkey.*devicetype\/([^/]*)/i],[[t,/^/,"Chromecast "],[o,B],[i,v]],[/fuchsia.*crkey/i],[[t,U+" Nest Hub"],[o,B],[i,v]],[/crkey/i],[[t,U],[o,B],[i,v]],[/(portaltv)/i],[t,[o,Oe],[i,v]],[/droid.+aft(\w+)( bui|\))/i],[t,[o,le],[i,v]],[/(shield \w+ tv)/i],[t,[o,Re],[i,v]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[t,[o,ii],[i,v]],[/(bravia[\w ]+)( bui|\))/i],[t,[o,Z],[i,v]],[/(mi(tv|box)-?\w+) bui/i],[t,[o,Se],[i,v]],[/Hbbtv.*(technisat) (.*);/i],[o,t,[i,v]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[o,ne],[t,ne],[i,v]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[t,[i,v]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[i,v]],[/(ouya)/i,/(nintendo) (\w+)/i],[o,t,[i,re]],[/droid.+; (shield)( bui|\))/i],[t,[o,Re],[i,re]],[/(playstation \w+)/i],[t,[o,Z],[i,re]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[t,[o,ke],[i,re]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[t,[o,Q],[i,C]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[o,t,[i,C]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[t,[o,Ee],[i,C]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[t,[o,P],[i,C]],[/(opwwe\d{3})/i],[t,[o,ei],[i,C]],[/(moto 360)/i],[t,[o,ye],[i,C]],[/(smartwatch 3)/i],[t,[o,Z],[i,C]],[/(g watch r)/i],[t,[o,de],[i,C]],[/droid.+; (wt63?0{2,3})\)/i],[t,[o,Ae],[i,C]],[/droid.+; (glass) \d/i],[t,[o,B],[i,xe]],[/(pico) (4|neo3(?: link|pro)?)/i],[o,t,[i,xe]],[/(quest( \d| pro)?s?).+vr/i],[t,[o,Oe],[i,xe]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[o,[i,oe]],[/(aeobc)\b/i],[t,[o,le],[i,oe]],[/(homepod).+mac os/i],[t,[o,P],[i,oe]],[/windows iot/i],[[i,oe]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+?(mobile|vr|\d) safari/i],[t,[i,L,{mobile:"Mobile",xr:"VR","*":g}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[i,g]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[i,u]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[t,[o,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[n,[s,$i+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[s,n],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[n,[s,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[s,n],[/ladybird\//i],[[s,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[n,s]],os:[[/microsoft (windows) (vista|xp)/i],[s,n],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[s,[n,L,si]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[n,L,si],[s,ze]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[n,/_/g,"."],[s,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[s,"macOS"],[n,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[n,[s,U+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[n,[s,U+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[n,[s,U+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[n,[s,U+" Linux"]],[/crkey\/([\d\.]+)/i],[n,[s,U]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[n,s],[/(ubuntu) ([\w\.]+) like android/i],[[s,/(.+)/,"$1 Touch"],n],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/\.; ]?([\d\.]*)/i],[s,n],[/\(bb(10);/i],[n,[s,Ke]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[n,[s,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[n,[s,J+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[n,[s,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[n,[s,"watchOS"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[s,"Chrome OS"],n],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) (\w+)/i,/(xbox); +xbox ([^\);]+)/i,/(pico) .+os([\w\.]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux)(?: arm\w*| x86\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[s,n],[/(sunos) ?([\w\.\d]*)/i],[[s,"Solaris"],n],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[s,n]]},ce=function(){var e={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return M.call(e.init,[[k,[s,n,se,i]],[_,[y]],[T,[i,t,o]],[O,[s,n]],[S,[s,n]]]),M.call(e.isIgnore,[[k,[n,se]],[O,[n]],[S,[n]]]),M.call(e.isIgnoreRgx,[[k,/ ?browser$/i],[S,/ ?os$/i]]),M.call(e.toString,[[k,[s,n]],[_,[y]],[T,[o,t]],[O,[s,n]],[S,[s,n]]]),e}(),Gi=function(e,r){var a=ce.init[r],w=ce.isIgnore[r]||0,d=ce.isIgnoreRgx[r]||0,p=ce.toString[r]||0;function c(){M.call(this,a)}return c.prototype.getItem=function(){return e},c.prototype.withClientHints=function(){return H?H.getHighEntropyValues(ui).then(function(m){return e.setCH(new bi(m,!1)).parseCH().get()}):e.parseCH().get()},c.prototype.withFeatureCheck=function(){return e.detectFeature().get()},r!=F&&(c.prototype.is=function(m){var l=!1;for(var f in this)if(this.hasOwnProperty(f)&&!De(w,f)&&I(d?G(d,this[f]):this[f])==I(d?G(d,m):m)){if(l=!0,m!=z)break}else if(m==z&&l){l=!l;break}return l},c.prototype.toString=function(){var m=V;for(var l in p)typeof this[p[l]]!==z&&(m+=(m?" ":V)+this[p[l]]);return m||z}),H||(c.prototype.then=function(m){var l=this,f=function(){for(var A in l)l.hasOwnProperty(A)&&(this[A]=l[A])};f.prototype={is:c.prototype.is,toString:c.prototype.toString};var E=new f;return m(E),E}),new c};function bi(e,r){if(e=e||{},M.call(this,ui),r)M.call(this,[[Ne,Ce(e[D])],[Pe,Ce(e[zi])],[u,/\?1/.test(e[Pi])],[t,te(e[qi])],[$,te(e[wi])],[qe,te(e[Fi])],[y,te(e[Di])],[N,Ce(e[Ni])],[fe,te(e[Bi])]]);else for(var a in e)this.hasOwnProperty(a)&&typeof e[a]!==z&&(this[a]=e[a])}function li(e,r,a,w){return this.get=function(d){return d?this.data.hasOwnProperty(d)?this.data[d]:void 0:this.data},this.set=function(d,p){return this.data[d]=p,this},this.setCH=function(d){return this.uaCH=d,this},this.detectFeature=function(){if(R&&R.userAgent==this.ua)switch(this.itemType){case k:R.brave&&typeof R.brave.isBrave==ue&&this.set(s,"Brave");break;case T:!this.get(i)&&H&&H[u]&&this.set(i,u),this.get(t)=="Macintosh"&&R&&typeof R.standalone!==z&&R.maxTouchPoints&&R.maxTouchPoints>2&&this.set(t,"iPad").set(i,g);break;case S:!this.get(s)&&H&&H[$]&&this.set(s,H[$]);break;case F:var d=this.data,p=function(c){return d[c].getItem().detectFeature().get()};this.set(k,p(k)).set(_,p(_)).set(T,p(T)).set(O,p(O)).set(S,p(S))}return this},this.parseUA=function(){return this.itemType!=F&&_e.call(this.data,this.ua,this.rgxMap),this.itemType==k&&this.set(se,Te(this.get(n))),this},this.parseCH=function(){var d=this.uaCH,p=this.rgxMap;switch(this.itemType){case k:case O:var c=d[Pe]||d[Ne],m;if(c)for(var l in c){var f=c[l].brand||c[l],E=c[l].version;this.itemType==k&&!/not.a.brand/i.test(f)&&(!m||/chrom/i.test(m)&&f!=ri)&&(f=L(f,{Chrome:"Google Chrome",Edge:"Microsoft Edge","Chrome WebView":"Android WebView","Chrome Headless":"HeadlessChrome","Huawei Browser":"HuaweiBrowser","MIUI Browser":"Miui Browser","Opera Mobi":"OperaMobile",Yandex:"YaBrowser"}),this.set(s,f).set(n,E).set(se,Te(E)),m=f),this.itemType==O&&f==ri&&this.set(n,E)}break;case _:var A=d[y];A&&(A&&d[fe]=="64"&&(A+="64"),_e.call(this.data,A+";",p));break;case T:if(d[u]&&this.set(i,u),d[t]&&(this.set(t,d[t]),!this.get(i)||!this.get(o))){var x={};_e.call(x,"droid 9; "+d[t]+")",p),!this.get(i)&&x.type&&this.set(i,x.type),!this.get(o)&&x.vendor&&this.set(o,x.vendor)}if(d[N]){var ae;if(typeof d[N]!="string")for(var Fe=0;!ae&&Fe<d[N].length;)ae=L(d[N][Fe++],ni);else ae=L(d[N],ni);this.set(i,ae)}break;case S:var me=d[$];if(me){var he=d[qe];me==ze&&(he=parseInt(Te(he),10)>=13?"11":"10"),this.set(s,me).set(n,he)}this.get(s)==ze&&d[t]=="Xbox"&&this.set(s,"Xbox").set(n,void 0);break;case F:var yi=this.data,Y=function(Ri){return yi[Ri].getItem().setCH(d).parseCH().get()};this.set(k,Y(k)).set(_,Y(_)).set(T,Y(T)).set(O,Y(O)).set(S,Y(S))}return this},M.call(this,[["itemType",e],["ua",r],["uaCH",w],["rgxMap",a],["data",Gi(this,e)]]),this}function j(e,r,a){if(typeof e===W?(be(e,!0)?(typeof r===W&&(a=r),r=e):(a=e,r=void 0),e=void 0):typeof e===Le&&!be(r,!0)&&(a=r,r=void 0),a&&typeof a.append===ue){var w={};a.forEach(function(l,f){w[f]=l}),a=w}if(!(this instanceof j))return new j(e,r,a).getResult();var d=typeof e===Le?e:a&&a[Ge]?a[Ge]:R&&R.userAgent?R.userAgent:V,p=new bi(a,!0),c=r?Wi(ai,r):ai,m=function(l){return l==F?function(){return new li(l,d,c,p).set("ua",d).set(k,this.getBrowser()).set(_,this.getCPU()).set(T,this.getDevice()).set(O,this.getEngine()).set(S,this.getOS()).get()}:function(){return new li(l,d,c[l],p).parseUA().get()}};return M.call(this,[["getBrowser",m(k)],["getCPU",m(_)],["getDevice",m(T)],["getEngine",m(O)],["getOS",m(S)],["getResult",m(F)],["getUA",function(){return d}],["setUA",function(l){return X(l)&&(d=l.length>He?ne(l,He):l),this}]]).setUA(d),this}j.VERSION=Li;j.BROWSER=pe([s,n,se,i]);j.CPU=pe([y]);j.DEVICE=pe([t,o,i,re,u,v,g,C,oe]);j.ENGINE=j.OS=pe([s,n]);function Xi(e){return!e||typeof e!="string"?"break-all":e.includes(" ")?"break-word":"break-all"}function fi({logo:e="",name:r="",description:a="",size:w=40,variant:d="rounded",sx:p={},className:c="",logoName:m="",tooltip:l=null}){const f={width:w,height:w,...p},E=typeof r=="string"?r:e,A=b.jsxs(Ie,{direction:"row",spacing:1,className:`info-card-wrapper ${c}`,sx:{alignItems:"center",cursor:l?"pointer":"default"},children:[e?b.jsx($e,{src:e,alt:m??E,variant:d,sx:f}):b.jsx($e,{variant:d,sx:f,children:E?.slice(0,1)}),b.jsxs(Ie,{direction:"column",sx:{alignItems:"flex-start",justifyContent:"space-around",wordBreak:Xi(r),minWidth:{xs:100,sm:140}},children:[b.jsx(we,{variant:"body1",component:"div",sx:{color:"text.primary"},children:r}),a&&b.jsx(we,{variant:"subtitle1",sx:{color:"text.secondary"},children:a})]})]});return l?b.jsx(Ei,{title:l,placement:"top-start",slotProps:{tooltip:{sx:{bgcolor:x=>x.palette.mode==="dark"?"#2a2e37":"#ffffff",color:x=>x.palette.mode==="dark"?"#ffffff":x.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:x=>x.palette.mode==="dark"?"1px solid #3a3f48":"1px solid #e0e0e0","& .MuiTooltip-arrow":{color:x=>x.palette.mode==="dark"?"#2a2e37":"#ffffff","&::before":{border:x=>x.palette.mode==="dark"?"1px solid #3a3f48":"1px solid #e0e0e0",backgroundColor:x=>x.palette.mode==="dark"?"#2a2e37":"#ffffff"}}}}},children:A}):A}fi.propTypes={logo:h.string,name:h.oneOfType([h.string,h.node]).isRequired,description:h.oneOfType([h.string,h.node]),size:h.oneOfType([h.number,h.string]),variant:h.oneOf(["square","rounded","circular"]),sx:h.object,className:h.string,logoName:h.string,tooltip:h.oneOfType([h.string,h.node])};function Yi(e){try{if(!e.trim())return{device:{icon:b.jsx(ve,{fontSize:"small"}),text:"Unknown Device"},os:{icon:null,text:"Unknown OS"},browser:{icon:b.jsx(ge,{fontSize:"small"}),text:"Unknown Browser"}};const a=new j(e).getResult();let w="";const d=e.split(/\s+/).find(l=>l.startsWith("arcwallet"));if(d){const l=d.split("/");l.length>1&&We.coerce(l[1])&&(w=We.coerce(l[1]).version)}const p=(()=>{const{type:l="",model:f=""}=a.device;return l==="mobile"?{icon:b.jsx(Si,{fontSize:"small"}),text:f||"Mobile Device"}:l==="tablet"?{icon:b.jsx(Ai,{fontSize:"small"}),text:f||"Tablet"}:{icon:b.jsx(Oi,{fontSize:"small"}),text:f||"Desktop"}})(),c=(()=>{const{name:l="",version:f=""}=a.os;return l.toLowerCase().includes("mac")?{icon:b.jsx(Ve,{fontSize:"small"}),text:`${l} ${f}`}:l.toLowerCase().includes("ios")?{icon:b.jsx(Ve,{fontSize:"small"}),text:`${l} ${f}`}:l.toLowerCase().includes("android")?{icon:b.jsx(Ci,{fontSize:"small"}),text:`${l} ${f}`}:l.toLowerCase().includes("windows")?{icon:b.jsx(ve,{fontSize:"small"}),text:`${l} ${f}`}:{icon:null,text:l?`${l} ${f}`:"Unknown OS"}})(),m=(()=>{const{name:l="",version:f=""}=a.browser;return{icon:b.jsx(ge,{fontSize:"small"}),text:l?`${l} ${f}`:"Unknown Browser"}})();return{device:p,os:c,browser:m,...w?{walletVersion:{icon:null,text:w}}:{}}}catch(r){return console.error("Error parsing user agent:",r),{device:{icon:b.jsx(ve,{fontSize:"small"}),text:"Unknown Device"},os:{icon:null,text:"Unknown OS"},browser:{icon:b.jsx(ge,{fontSize:"small"}),text:"Unknown Browser"}}}}function pi({ua:e}){const r=Yi(e);return b.jsx(Ie,{spacing:1,children:Object.entries(r).map(([a,{icon:w,text:d}])=>b.jsxs(Me,{sx:{display:"flex",alignItems:"center",gap:1},children:[b.jsx(Me,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:w}),b.jsx(we,{variant:"body2",sx:{display:"flex"},children:d})]},a))})}pi.propTypes={ua:h.string.isRequired};const Ki=()=>{const{t:e}=Be(),r={$all:e("common.all"),owner:"Owner",admin:"Admin",member:"Member",guest:"Guest"};return{SYSTEM_ROLES:r,formatRoleName:w=>{const d=(w||"").toLowerCase();return d.startsWith("$")?r[d]||d.slice(1):r[d]||d}}},Qi=(e,r=!1)=>{const a=r?1:.6;switch(e){case"owner":return`rgba(232, 222, 255, ${a})`;case"admin":return`rgba(227, 242, 253, ${a})`;case"member":return`rgba(232, 245, 233, ${a})`;case"guest":return`rgba(245, 245, 245, ${a})`;default:return`rgba(245, 245, 245, ${a})`}},Zi=di(ci)(({role:e})=>({backgroundColor:Qi(e.toLowerCase()),color:"#000000"})),Ji=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}},et=di(ci)(({theme:e,status:r})=>({backgroundColor:Ji(r)(e),color:"#FFFFFF"}));function mi({did:e}){return b.jsx(Ue,{size:14,responsive:!1,compact:!0,copyable:!1,did:e})}mi.propTypes={did:h.string.isRequired};function hi({timestamp:e,locale:r}){return b.jsx(Me,{sx:{minWidth:"100px"},children:b.jsx(Ti,{value:e,locale:r})})}hi.propTypes={timestamp:h.number.isRequired,locale:h.string.isRequired};function gi({name:e="",role:r}){const{formatRoleName:a}=Ki();return b.jsx(Zi,{label:a(e||r),size:"small",role:e||r,sx:{borderRadius:1}})}gi.propTypes={role:h.string.isRequired,name:h.string};function vi({status:e}){const{t:r}=Be();return b.jsx(et,{label:r(`team.passport.statusMap.${e}`),size:"small",status:e,sx:{borderRadius:1}})}vi.propTypes={status:h.string.isRequired};function xi({source:e}){const{t:r}=Be();return e?r(`team.passport.sourceMaps.${e}`):"-"}xi.propTypes={source:h.string.isRequired};function ki({user:e,size:r="default",tooltip:a=!1,inService:w=!1}){const{teamDid:d}=Hi(),p=je.useMemo(()=>Ui(e.avatar,d,w),[e.avatar,d,w]),c=je.useMemo(()=>b.jsx(Ue,{did:e?.did,compact:!0,responsive:!1,sx:{whiteSpace:"nowrap"},size:12}),[e?.did]),m=ji(()=>({...e,avatar:p}),[e,p]);return r==="small"?b.jsx(fi,{variant:"circular",logo:p,name:b.jsx(we,{sx:{maxWidth:320,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},className:"customer-link-name",children:e.fullName||e.email}),...r==="small"?{tooltip:a?b.jsx(Ue,{did:e?.did}):!1,size:24}:{description:c,size:36}}):b.jsx(_i,{user:m,avatarSize:r==="small"?24:36,cardType:Mi.Detailed,infoType:Ii.Minimal,sx:{padding:0,border:"none"},showDid:!0,didProps:{compact:!0,responsive:!1},showHoverCard:!1})}ki.propTypes={user:h.object.isRequired,size:h.string,tooltip:h.bool,inService:h.bool};const it=je.memo(ki),wt=e=>b.jsx(mi,{did:e}),ut=(e,r)=>b.jsx(gi,{name:e,role:r}),bt=e=>b.jsx(vi,{status:e}),ft=(e,r)=>b.jsx(hi,{timestamp:e,locale:r}),pt=e=>b.jsx(xi,{source:e}),mt=(e,r=!1)=>b.jsx(it,{user:e,inService:r}),ht=e=>b.jsx(pi,{ua:e});export{mt as a,bt as b,ft as c,pt as d,ht as e,wt as f,ut as r,Ki as u};
1
+ import{j as b,b1 as Ie,b4 as $e,T as we,am as Ei,$ as h,s as di,ak as Me,Y as ci,bK as ge,bL as ve,bM as Si,bN as Ai,bO as Oi,bP as Ve,bQ as Ci}from"./vendor-mui-core-p6jGoroc.js";import{T as Be,A as Ti}from"./vendor-ux-TkkDR0Gn.js";import{g as _i,a as Ii,l as Mi}from"./index-DhFdjB1D.js";import{an as We}from"./index-CDq77s86.js";import{a as je}from"./vendor-react-x2lQvn4m.js";import{a as ji}from"./vendor-hooks-zCCbpt45.js";import{W as Ue}from"./did-address-BdvYNOBf.js";import{p as Ui}from"./util-B-cMjJCC.js";import{u as Hi}from"./dashboard-e9cJiXmU.js";var Li="2.0.3",He=500,Ge="user-agent",V="",Xe="?",ue="function",z="undefined",W="object",Le="string",k="browser",_="cpu",T="device",O="engine",S="os",F="result",s="name",i="type",o="vendor",n="version",y="architecture",se="major",t="model",re="console",u="mobile",g="tablet",v="smarttv",C="wearable",xe="xr",oe="embedded",K="inapp",Ne="brands",N="formFactors",Pe="fullVersionList",$="platform",qe="platformVersion",fe="bitness",D="sec-ch-ua",zi=D+"-full-version-list",Di=D+"-arch",Bi=D+"-"+fe,Ni=D+"-form-factors",Pi=D+"-"+u,qi=D+"-"+t,wi=D+"-"+$,Fi=wi+"-version",ui=[Ne,Pe,u,t,$,qe,y,N,fe],le="Amazon",P="Apple",Ye="ASUS",Ke="BlackBerry",B="Google",Qe="Huawei",Ze="Lenovo",Je="Honor",de="LG",ke="Microsoft",ye="Motorola",Re="Nvidia",ei="OnePlus",Ee="OPPO",Q="Samsung",ii="Sharp",Z="Sony",Se="Xiaomi",Ae="Zebra",ti="Chrome",ri="Chromium",U="Chromecast",$i="Edge",J="Firefox",ee="Opera",Oe="Facebook",oi="Sogou",q="Mobile ",ie=" Browser",ze="Windows",Vi=typeof window!==z,R=Vi&&window.navigator?window.navigator:void 0,H=R&&R.userAgentData?R.userAgentData:void 0,Wi=function(e,r){var a={},w=r;if(!be(r)){w={};for(var d in r)for(var p in r[d])w[p]=r[d][p].concat(w[p]?w[p]:[])}for(var c in e)a[c]=w[c]&&w[c].length%2===0?w[c].concat(e[c]):e[c];return a},pe=function(e){for(var r={},a=0;a<e.length;a++)r[e[a].toUpperCase()]=e[a];return r},De=function(e,r){if(typeof e===W&&e.length>0){for(var a in e)if(I(e[a])==I(r))return!0;return!1}return X(e)?I(r).indexOf(I(e))!==-1:!1},be=function(e,r){for(var a in e)return/^(browser|cpu|device|engine|os)$/.test(a)||(r?be(e[a]):!1)},X=function(e){return typeof e===Le},Ce=function(e){if(e){for(var r=[],a=G(/\\?\"/g,e).split(","),w=0;w<a.length;w++)if(a[w].indexOf(";")>-1){var d=ne(a[w]).split(";v=");r[w]={brand:d[0],version:d[1]}}else r[w]=ne(a[w]);return r}},I=function(e){return X(e)?e.toLowerCase():e},Te=function(e){return X(e)?G(/[^\d\.]/g,e).split(".")[0]:void 0},M=function(e){for(var r in e){var a=e[r];typeof a==W&&a.length==2?this[a[0]]=a[1]:this[a]=void 0}return this},G=function(e,r){return X(r)?r.replace(e,V):r},te=function(e){return G(/\\?\"/g,e)},ne=function(e,r){if(X(e))return e=G(/^\s\s*/,e),typeof r===z?e:e.substring(0,He)},_e=function(e,r){if(!(!e||!r))for(var a=0,w,d,p,c,m,l;a<r.length&&!m;){var f=r[a],E=r[a+1];for(w=d=0;w<f.length&&!m&&f[w];)if(m=f[w++].exec(e),m)for(p=0;p<E.length;p++)l=m[++d],c=E[p],typeof c===W&&c.length>0?c.length===2?typeof c[1]==ue?this[c[0]]=c[1].call(this,l):this[c[0]]=c[1]:c.length===3?typeof c[1]===ue&&!(c[1].exec&&c[1].test)?this[c[0]]=l?c[1].call(this,l,c[2]):void 0:this[c[0]]=l?l.replace(c[1],c[2]):void 0:c.length===4&&(this[c[0]]=l?c[3].call(this,l.replace(c[1],c[2])):void 0):this[c]=l||void 0;a+=2}},L=function(e,r){for(var a in r)if(typeof r[a]===W&&r[a].length>0){for(var w=0;w<r[a].length;w++)if(De(r[a][w],e))return a===Xe?void 0:a}else if(De(r[a],e))return a===Xe?void 0:a;return r.hasOwnProperty("*")?r["*"]:e},si={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},ni={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},ai={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[n,[s,q+"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[n,[s,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[s,n],[/opios[\/ ]+([\w\.]+)/i],[n,[s,ee+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[n,[s,ee+" GX"]],[/\bopr\/([\w\.]+)/i],[n,[s,ee]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[n,[s,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[n,[s,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:lg |qute)browser)\/([-\w\.]+)/i,/(heytap|ovi|115|surf)browser\/([\d\.]+)/i,/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i],[s,n],[/quark(?:pc)?\/([-\w\.]+)/i],[n,[s,"Quark"]],[/\bddg\/([\w\.]+)/i],[n,[s,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[n,[s,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[n,[s,"WeChat"]],[/konqueror\/([\w\.]+)/i],[n,[s,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[n,[s,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[n,[s,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[n,[s,"Smart "+Ze+ie]],[/(avast|avg)\/([\w\.]+)/i],[[s,/(.+)/,"$1 Secure"+ie],n],[/\bfocus\/([\w\.]+)/i],[n,[s,J+" Focus"]],[/\bopt\/([\w\.]+)/i],[n,[s,ee+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[n,[s,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[n,[s,"Dolphin"]],[/coast\/([\w\.]+)/i],[n,[s,ee+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[n,[s,"MIUI"+ie]],[/fxios\/([\w\.-]+)/i],[n,[s,q+J]],[/\bqihoobrowser\/?([\w\.]*)/i],[n,[s,"360"]],[/\b(qq)\/([\w\.]+)/i],[[s,/(.+)/,"$1Browser"],n],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[s,/(.+)/,"$1"+ie],n],[/samsungbrowser\/([\w\.]+)/i],[n,[s,Q+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[n,[s,oi+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[s,oi+" Mobile"],n],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[s,n],[/(lbbrowser|rekonq)/i],[s],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[n,s],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[s,Oe],n,[i,K]],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(instagram|snapchat)[\/ ]([-\w\.]+)/i],[s,n,[i,K]],[/\bgsa\/([\w\.]+) .*safari\//i],[n,[s,"GSA"],[i,K]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[n,[s,"TikTok"],[i,K]],[/\[(linkedin)app\]/i],[s,[i,K]],[/(chromium)[\/ ]([-\w\.]+)/i],[s,n],[/headlesschrome(?:\/([\w\.]+)| )/i],[n,[s,ti+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[s,ti+" WebView"],n],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[n,[s,"Android"+ie]],[/chrome\/([\w\.]+) mobile/i],[n,[s,q+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[s,n],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[n,[s,q+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[s,q+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[n,s],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[s,[n,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[s,n],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[s,q+J],n],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[s,"Netscape"],n],[/(wolvic|librewolf)\/([\w\.]+)/i],[s,n],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[n,[s,J+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[s,[n,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[s,[n,/[^\d\.]+./,V]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[y,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[y,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[y,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[y,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[y,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[y,/ower/,V,I]],[/ sun4\w[;\)]/i],[[y,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[y,I]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[t,[o,Q],[i,g]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[t,[o,Q],[i,u]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[t,[o,P],[i,u]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[t,[o,P],[i,g]],[/(macintosh);/i],[t,[o,P]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[t,[o,ii],[i,u]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[t,[o,Je],[i,g]],[/honor([-\w ]+)[;\)]/i],[t,[o,Je],[i,u]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[t,[o,Qe],[i,g]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[t,[o,Qe],[i,u]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[t,/_/g," "],[o,Se],[i,g]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[t,/_/g," "],[o,Se],[i,u]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[t,[o,Ee],[i,u]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[t,[o,L,{OnePlus:["304","403","203"],"*":Ee}],[i,g]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[t,[o,"BLU"],[i,u]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[t,[o,"Vivo"],[i,u]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[t,[o,"Realme"],[i,u]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[t,[o,ye],[i,u]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[t,[o,ye],[i,g]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[t,[o,de],[i,g]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch))(\w+)/i,/\blg-?([\d\w]+) bui/i],[t,[o,de],[i,u]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[t,[o,Ze],[i,g]],[/(nokia) (t[12][01])/i],[o,t,[i,g]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[t,/_/g," "],[i,u],[o,"Nokia"]],[/(pixel (c|tablet))\b/i],[t,[o,B],[i,g]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[t,[o,B],[i,u]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[t,[o,Z],[i,u]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[t,"Xperia Tablet"],[o,Z],[i,g]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[t,[o,ei],[i,u]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[t,[o,le],[i,g]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[t,/(.+)/g,"Fire Phone $1"],[o,le],[i,u]],[/(playbook);[-\w\),; ]+(rim)/i],[t,o,[i,g]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[t,[o,Ke],[i,u]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[t,[o,Ye],[i,g]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[t,[o,Ye],[i,u]],[/(nexus 9)/i],[t,[o,"HTC"],[i,g]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[o,[t,/_/g," "],[i,u]],[/tcl (xess p17aa)/i,/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i],[t,[o,"TCL"],[i,g]],[/droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i],[t,[o,"TCL"],[i,u]],[/(itel) ((\w+))/i],[[o,I],t,[i,L,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[t,[o,"Acer"],[i,g]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[t,[o,"Meizu"],[i,u]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[t,[o,"Ulefone"],[i,u]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[t,[o,"Energizer"],[i,u]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[t,[o,"Cat"],[i,u]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[t,[o,"Smartfren"],[i,u]],[/droid.+; (a(?:015|06[35]|142p?))/i],[t,[o,"Nothing"],[i,u]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[t,[o,"Archos"],[i,g]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[t,[o,"Archos"],[i,u]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[o,t,[i,g]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (blu|hmd|imo|tcl)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i,/(oppo) ?([\w ]+) bui/i],[o,t,[i,u]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[o,t,[i,g]],[/(surface duo)/i],[t,[o,ke],[i,g]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[t,[o,"Fairphone"],[i,u]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[t,[o,Re],[i,g]],[/(sprint) (\w+)/i],[o,t,[i,u]],[/(kin\.[onetw]{3})/i],[[t,/\./g," "],[o,ke],[i,u]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[t,[o,Ae],[i,g]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[t,[o,Ae],[i,u]],[/smart-tv.+(samsung)/i],[o,[i,v]],[/hbbtv.+maple;(\d+)/i],[[t,/^/,"SmartTV"],[o,Q],[i,v]],[/tcast.+(lg)e?. ([-\w]+)/i],[o,t,[i,v]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[o,de],[i,v]],[/(apple) ?tv/i],[o,[t,P+" TV"],[i,v]],[/crkey.*devicetype\/chromecast/i],[[t,U+" Third Generation"],[o,B],[i,v]],[/crkey.*devicetype\/([^/]*)/i],[[t,/^/,"Chromecast "],[o,B],[i,v]],[/fuchsia.*crkey/i],[[t,U+" Nest Hub"],[o,B],[i,v]],[/crkey/i],[[t,U],[o,B],[i,v]],[/(portaltv)/i],[t,[o,Oe],[i,v]],[/droid.+aft(\w+)( bui|\))/i],[t,[o,le],[i,v]],[/(shield \w+ tv)/i],[t,[o,Re],[i,v]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[t,[o,ii],[i,v]],[/(bravia[\w ]+)( bui|\))/i],[t,[o,Z],[i,v]],[/(mi(tv|box)-?\w+) bui/i],[t,[o,Se],[i,v]],[/Hbbtv.*(technisat) (.*);/i],[o,t,[i,v]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[o,ne],[t,ne],[i,v]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[t,[i,v]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[i,v]],[/(ouya)/i,/(nintendo) (\w+)/i],[o,t,[i,re]],[/droid.+; (shield)( bui|\))/i],[t,[o,Re],[i,re]],[/(playstation \w+)/i],[t,[o,Z],[i,re]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[t,[o,ke],[i,re]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[t,[o,Q],[i,C]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[o,t,[i,C]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[t,[o,Ee],[i,C]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[t,[o,P],[i,C]],[/(opwwe\d{3})/i],[t,[o,ei],[i,C]],[/(moto 360)/i],[t,[o,ye],[i,C]],[/(smartwatch 3)/i],[t,[o,Z],[i,C]],[/(g watch r)/i],[t,[o,de],[i,C]],[/droid.+; (wt63?0{2,3})\)/i],[t,[o,Ae],[i,C]],[/droid.+; (glass) \d/i],[t,[o,B],[i,xe]],[/(pico) (4|neo3(?: link|pro)?)/i],[o,t,[i,xe]],[/(quest( \d| pro)?s?).+vr/i],[t,[o,Oe],[i,xe]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[o,[i,oe]],[/(aeobc)\b/i],[t,[o,le],[i,oe]],[/(homepod).+mac os/i],[t,[o,P],[i,oe]],[/windows iot/i],[[i,oe]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+?(mobile|vr|\d) safari/i],[t,[i,L,{mobile:"Mobile",xr:"VR","*":g}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[i,g]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[i,u]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[t,[o,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[n,[s,$i+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[s,n],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[n,[s,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[s,n],[/ladybird\//i],[[s,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[n,s]],os:[[/microsoft (windows) (vista|xp)/i],[s,n],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[s,[n,L,si]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[n,L,si],[s,ze]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[n,/_/g,"."],[s,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[s,"macOS"],[n,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[n,[s,U+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[n,[s,U+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[n,[s,U+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[n,[s,U+" Linux"]],[/crkey\/([\d\.]+)/i],[n,[s,U]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[n,s],[/(ubuntu) ([\w\.]+) like android/i],[[s,/(.+)/,"$1 Touch"],n],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/\.; ]?([\d\.]*)/i],[s,n],[/\(bb(10);/i],[n,[s,Ke]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[n,[s,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[n,[s,J+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[n,[s,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[n,[s,"watchOS"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[s,"Chrome OS"],n],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) (\w+)/i,/(xbox); +xbox ([^\);]+)/i,/(pico) .+os([\w\.]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux)(?: arm\w*| x86\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[s,n],[/(sunos) ?([\w\.\d]*)/i],[[s,"Solaris"],n],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[s,n]]},ce=function(){var e={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return M.call(e.init,[[k,[s,n,se,i]],[_,[y]],[T,[i,t,o]],[O,[s,n]],[S,[s,n]]]),M.call(e.isIgnore,[[k,[n,se]],[O,[n]],[S,[n]]]),M.call(e.isIgnoreRgx,[[k,/ ?browser$/i],[S,/ ?os$/i]]),M.call(e.toString,[[k,[s,n]],[_,[y]],[T,[o,t]],[O,[s,n]],[S,[s,n]]]),e}(),Gi=function(e,r){var a=ce.init[r],w=ce.isIgnore[r]||0,d=ce.isIgnoreRgx[r]||0,p=ce.toString[r]||0;function c(){M.call(this,a)}return c.prototype.getItem=function(){return e},c.prototype.withClientHints=function(){return H?H.getHighEntropyValues(ui).then(function(m){return e.setCH(new bi(m,!1)).parseCH().get()}):e.parseCH().get()},c.prototype.withFeatureCheck=function(){return e.detectFeature().get()},r!=F&&(c.prototype.is=function(m){var l=!1;for(var f in this)if(this.hasOwnProperty(f)&&!De(w,f)&&I(d?G(d,this[f]):this[f])==I(d?G(d,m):m)){if(l=!0,m!=z)break}else if(m==z&&l){l=!l;break}return l},c.prototype.toString=function(){var m=V;for(var l in p)typeof this[p[l]]!==z&&(m+=(m?" ":V)+this[p[l]]);return m||z}),H||(c.prototype.then=function(m){var l=this,f=function(){for(var A in l)l.hasOwnProperty(A)&&(this[A]=l[A])};f.prototype={is:c.prototype.is,toString:c.prototype.toString};var E=new f;return m(E),E}),new c};function bi(e,r){if(e=e||{},M.call(this,ui),r)M.call(this,[[Ne,Ce(e[D])],[Pe,Ce(e[zi])],[u,/\?1/.test(e[Pi])],[t,te(e[qi])],[$,te(e[wi])],[qe,te(e[Fi])],[y,te(e[Di])],[N,Ce(e[Ni])],[fe,te(e[Bi])]]);else for(var a in e)this.hasOwnProperty(a)&&typeof e[a]!==z&&(this[a]=e[a])}function li(e,r,a,w){return this.get=function(d){return d?this.data.hasOwnProperty(d)?this.data[d]:void 0:this.data},this.set=function(d,p){return this.data[d]=p,this},this.setCH=function(d){return this.uaCH=d,this},this.detectFeature=function(){if(R&&R.userAgent==this.ua)switch(this.itemType){case k:R.brave&&typeof R.brave.isBrave==ue&&this.set(s,"Brave");break;case T:!this.get(i)&&H&&H[u]&&this.set(i,u),this.get(t)=="Macintosh"&&R&&typeof R.standalone!==z&&R.maxTouchPoints&&R.maxTouchPoints>2&&this.set(t,"iPad").set(i,g);break;case S:!this.get(s)&&H&&H[$]&&this.set(s,H[$]);break;case F:var d=this.data,p=function(c){return d[c].getItem().detectFeature().get()};this.set(k,p(k)).set(_,p(_)).set(T,p(T)).set(O,p(O)).set(S,p(S))}return this},this.parseUA=function(){return this.itemType!=F&&_e.call(this.data,this.ua,this.rgxMap),this.itemType==k&&this.set(se,Te(this.get(n))),this},this.parseCH=function(){var d=this.uaCH,p=this.rgxMap;switch(this.itemType){case k:case O:var c=d[Pe]||d[Ne],m;if(c)for(var l in c){var f=c[l].brand||c[l],E=c[l].version;this.itemType==k&&!/not.a.brand/i.test(f)&&(!m||/chrom/i.test(m)&&f!=ri)&&(f=L(f,{Chrome:"Google Chrome",Edge:"Microsoft Edge","Chrome WebView":"Android WebView","Chrome Headless":"HeadlessChrome","Huawei Browser":"HuaweiBrowser","MIUI Browser":"Miui Browser","Opera Mobi":"OperaMobile",Yandex:"YaBrowser"}),this.set(s,f).set(n,E).set(se,Te(E)),m=f),this.itemType==O&&f==ri&&this.set(n,E)}break;case _:var A=d[y];A&&(A&&d[fe]=="64"&&(A+="64"),_e.call(this.data,A+";",p));break;case T:if(d[u]&&this.set(i,u),d[t]&&(this.set(t,d[t]),!this.get(i)||!this.get(o))){var x={};_e.call(x,"droid 9; "+d[t]+")",p),!this.get(i)&&x.type&&this.set(i,x.type),!this.get(o)&&x.vendor&&this.set(o,x.vendor)}if(d[N]){var ae;if(typeof d[N]!="string")for(var Fe=0;!ae&&Fe<d[N].length;)ae=L(d[N][Fe++],ni);else ae=L(d[N],ni);this.set(i,ae)}break;case S:var me=d[$];if(me){var he=d[qe];me==ze&&(he=parseInt(Te(he),10)>=13?"11":"10"),this.set(s,me).set(n,he)}this.get(s)==ze&&d[t]=="Xbox"&&this.set(s,"Xbox").set(n,void 0);break;case F:var yi=this.data,Y=function(Ri){return yi[Ri].getItem().setCH(d).parseCH().get()};this.set(k,Y(k)).set(_,Y(_)).set(T,Y(T)).set(O,Y(O)).set(S,Y(S))}return this},M.call(this,[["itemType",e],["ua",r],["uaCH",w],["rgxMap",a],["data",Gi(this,e)]]),this}function j(e,r,a){if(typeof e===W?(be(e,!0)?(typeof r===W&&(a=r),r=e):(a=e,r=void 0),e=void 0):typeof e===Le&&!be(r,!0)&&(a=r,r=void 0),a&&typeof a.append===ue){var w={};a.forEach(function(l,f){w[f]=l}),a=w}if(!(this instanceof j))return new j(e,r,a).getResult();var d=typeof e===Le?e:a&&a[Ge]?a[Ge]:R&&R.userAgent?R.userAgent:V,p=new bi(a,!0),c=r?Wi(ai,r):ai,m=function(l){return l==F?function(){return new li(l,d,c,p).set("ua",d).set(k,this.getBrowser()).set(_,this.getCPU()).set(T,this.getDevice()).set(O,this.getEngine()).set(S,this.getOS()).get()}:function(){return new li(l,d,c[l],p).parseUA().get()}};return M.call(this,[["getBrowser",m(k)],["getCPU",m(_)],["getDevice",m(T)],["getEngine",m(O)],["getOS",m(S)],["getResult",m(F)],["getUA",function(){return d}],["setUA",function(l){return X(l)&&(d=l.length>He?ne(l,He):l),this}]]).setUA(d),this}j.VERSION=Li;j.BROWSER=pe([s,n,se,i]);j.CPU=pe([y]);j.DEVICE=pe([t,o,i,re,u,v,g,C,oe]);j.ENGINE=j.OS=pe([s,n]);function Xi(e){return!e||typeof e!="string"?"break-all":e.includes(" ")?"break-word":"break-all"}function fi({logo:e="",name:r="",description:a="",size:w=40,variant:d="rounded",sx:p={},className:c="",logoName:m="",tooltip:l=null}){const f={width:w,height:w,...p},E=typeof r=="string"?r:e,A=b.jsxs(Ie,{direction:"row",spacing:1,className:`info-card-wrapper ${c}`,sx:{alignItems:"center",cursor:l?"pointer":"default"},children:[e?b.jsx($e,{src:e,alt:m??E,variant:d,sx:f}):b.jsx($e,{variant:d,sx:f,children:E?.slice(0,1)}),b.jsxs(Ie,{direction:"column",sx:{alignItems:"flex-start",justifyContent:"space-around",wordBreak:Xi(r),minWidth:{xs:100,sm:140}},children:[b.jsx(we,{variant:"body1",component:"div",sx:{color:"text.primary"},children:r}),a&&b.jsx(we,{variant:"subtitle1",sx:{color:"text.secondary"},children:a})]})]});return l?b.jsx(Ei,{title:l,placement:"top-start",slotProps:{tooltip:{sx:{bgcolor:x=>x.palette.mode==="dark"?"#2a2e37":"#ffffff",color:x=>x.palette.mode==="dark"?"#ffffff":x.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:x=>x.palette.mode==="dark"?"1px solid #3a3f48":"1px solid #e0e0e0","& .MuiTooltip-arrow":{color:x=>x.palette.mode==="dark"?"#2a2e37":"#ffffff","&::before":{border:x=>x.palette.mode==="dark"?"1px solid #3a3f48":"1px solid #e0e0e0",backgroundColor:x=>x.palette.mode==="dark"?"#2a2e37":"#ffffff"}}}}},children:A}):A}fi.propTypes={logo:h.string,name:h.oneOfType([h.string,h.node]).isRequired,description:h.oneOfType([h.string,h.node]),size:h.oneOfType([h.number,h.string]),variant:h.oneOf(["square","rounded","circular"]),sx:h.object,className:h.string,logoName:h.string,tooltip:h.oneOfType([h.string,h.node])};function Yi(e){try{if(!e.trim())return{device:{icon:b.jsx(ve,{fontSize:"small"}),text:"Unknown Device"},os:{icon:null,text:"Unknown OS"},browser:{icon:b.jsx(ge,{fontSize:"small"}),text:"Unknown Browser"}};const a=new j(e).getResult();let w="";const d=e.split(/\s+/).find(l=>l.startsWith("arcwallet"));if(d){const l=d.split("/");l.length>1&&We.coerce(l[1])&&(w=We.coerce(l[1]).version)}const p=(()=>{const{type:l="",model:f=""}=a.device;return l==="mobile"?{icon:b.jsx(Si,{fontSize:"small"}),text:f||"Mobile Device"}:l==="tablet"?{icon:b.jsx(Ai,{fontSize:"small"}),text:f||"Tablet"}:{icon:b.jsx(Oi,{fontSize:"small"}),text:f||"Desktop"}})(),c=(()=>{const{name:l="",version:f=""}=a.os;return l.toLowerCase().includes("mac")?{icon:b.jsx(Ve,{fontSize:"small"}),text:`${l} ${f}`}:l.toLowerCase().includes("ios")?{icon:b.jsx(Ve,{fontSize:"small"}),text:`${l} ${f}`}:l.toLowerCase().includes("android")?{icon:b.jsx(Ci,{fontSize:"small"}),text:`${l} ${f}`}:l.toLowerCase().includes("windows")?{icon:b.jsx(ve,{fontSize:"small"}),text:`${l} ${f}`}:{icon:null,text:l?`${l} ${f}`:"Unknown OS"}})(),m=(()=>{const{name:l="",version:f=""}=a.browser;return{icon:b.jsx(ge,{fontSize:"small"}),text:l?`${l} ${f}`:"Unknown Browser"}})();return{device:p,os:c,browser:m,...w?{walletVersion:{icon:null,text:w}}:{}}}catch(r){return console.error("Error parsing user agent:",r),{device:{icon:b.jsx(ve,{fontSize:"small"}),text:"Unknown Device"},os:{icon:null,text:"Unknown OS"},browser:{icon:b.jsx(ge,{fontSize:"small"}),text:"Unknown Browser"}}}}function pi({ua:e}){const r=Yi(e);return b.jsx(Ie,{spacing:1,children:Object.entries(r).map(([a,{icon:w,text:d}])=>b.jsxs(Me,{sx:{display:"flex",alignItems:"center",gap:1},children:[b.jsx(Me,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:w}),b.jsx(we,{variant:"body2",sx:{display:"flex"},children:d})]},a))})}pi.propTypes={ua:h.string.isRequired};const Ki=()=>{const{t:e}=Be(),r={$all:e("common.all"),owner:"Owner",admin:"Admin",member:"Member",guest:"Guest"};return{SYSTEM_ROLES:r,formatRoleName:w=>{const d=(w||"").toLowerCase();return d.startsWith("$")?r[d]||d.slice(1):r[d]||d}}},Qi=(e,r=!1)=>{const a=r?1:.6;switch(e){case"owner":return`rgba(232, 222, 255, ${a})`;case"admin":return`rgba(227, 242, 253, ${a})`;case"member":return`rgba(232, 245, 233, ${a})`;case"guest":return`rgba(245, 245, 245, ${a})`;default:return`rgba(245, 245, 245, ${a})`}},Zi=di(ci)(({role:e})=>({backgroundColor:Qi(e.toLowerCase()),color:"#000000"})),Ji=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}},et=di(ci)(({theme:e,status:r})=>({backgroundColor:Ji(r)(e),color:"#FFFFFF"}));function mi({did:e}){return b.jsx(Ue,{size:14,responsive:!1,compact:!0,copyable:!1,did:e})}mi.propTypes={did:h.string.isRequired};function hi({timestamp:e,locale:r}){return b.jsx(Me,{sx:{minWidth:"100px"},children:b.jsx(Ti,{value:e,locale:r})})}hi.propTypes={timestamp:h.number.isRequired,locale:h.string.isRequired};function gi({name:e="",role:r}){const{formatRoleName:a}=Ki();return b.jsx(Zi,{label:a(e||r),size:"small",role:e||r,sx:{borderRadius:1}})}gi.propTypes={role:h.string.isRequired,name:h.string};function vi({status:e}){const{t:r}=Be();return b.jsx(et,{label:r(`team.passport.statusMap.${e}`),size:"small",status:e,sx:{borderRadius:1}})}vi.propTypes={status:h.string.isRequired};function xi({source:e}){const{t:r}=Be();return e?r(`team.passport.sourceMaps.${e}`):"-"}xi.propTypes={source:h.string.isRequired};function ki({user:e,size:r="default",tooltip:a=!1,inService:w=!1}){const{teamDid:d}=Hi(),p=je.useMemo(()=>Ui(e.avatar,d,w),[e.avatar,d,w]),c=je.useMemo(()=>b.jsx(Ue,{did:e?.did,compact:!0,responsive:!1,sx:{whiteSpace:"nowrap"},size:12}),[e?.did]),m=ji(()=>({...e,avatar:p}),[e,p]);return r==="small"?b.jsx(fi,{variant:"circular",logo:p,name:b.jsx(we,{sx:{maxWidth:320,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},className:"customer-link-name",children:e.fullName||e.email}),...r==="small"?{tooltip:a?b.jsx(Ue,{did:e?.did}):!1,size:24}:{description:c,size:36}}):b.jsx(_i,{user:m,avatarSize:r==="small"?24:36,cardType:Mi.Detailed,infoType:Ii.Minimal,sx:{padding:0,border:"none"},showDid:!0,didProps:{compact:!0,responsive:!1},showHoverCard:!1})}ki.propTypes={user:h.object.isRequired,size:h.string,tooltip:h.bool,inService:h.bool};const it=je.memo(ki),wt=e=>b.jsx(mi,{did:e}),ut=(e,r)=>b.jsx(gi,{name:e,role:r}),bt=e=>b.jsx(vi,{status:e}),ft=(e,r)=>b.jsx(hi,{timestamp:e,locale:r}),pt=e=>b.jsx(xi,{source:e}),mt=(e,r=!1)=>b.jsx(it,{user:e,inService:r}),ht=e=>b.jsx(pi,{ua:e});export{mt as a,bt as b,ft as c,pt as d,ht as e,wt as f,ut as r,Ki as u};
@@ -1 +1 @@
1
- import{j as l,$ as n}from"./vendor-mui-core-p6jGoroc.js";import{u as m}from"./session-CD-6TrlW.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,$ as n}from"./vendor-mui-core-p6jGoroc.js";import{u as m}from"./session-CvQ97dDY.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-p6jGoroc.js";import{C as t}from"./vendor-utils-CtD44yV-.js";import{I as s}from"./iframe-CTQOWc1h.js";import{c as e}from"./index-S9T-sBWO.js";import{S as m}from"./studio-CiSsKpFb.js";import"./vendor-react-x2lQvn4m.js";import"./vendor-ux-TkkDR0Gn.js";import"./vendor-hooks-zCCbpt45.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-BndcJjQO.js";import"./index-CnZyhA37.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-p6jGoroc.js";import{C as t}from"./vendor-utils-CtD44yV-.js";import{I as s}from"./iframe-DnqoUNAW.js";import{c as e}from"./index-CDq77s86.js";import{S as m}from"./studio-BoYrF6Kl.js";import"./vendor-react-x2lQvn4m.js";import"./vendor-ux-TkkDR0Gn.js";import"./vendor-hooks-zCCbpt45.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-BndcJjQO.js";import"./index-glbEl-Pn.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-p6jGoroc.js";import o from"./user-center-lZ9ifkcH.js";import{H as i}from"./index-S9T-sBWO.js";import{T as e}from"./vendor-ux-TkkDR0Gn.js";import"./vendor-react-x2lQvn4m.js";import"./vendor-hooks-zCCbpt45.js";import"./vendor-utils-CtD44yV-.js";import"./index-kQLw_ftN.js";import"./arrow-down.svg-CaNNzVmj.js";import"./user-sessions-DmuUfMxJ.js";import"./index-DO3jlY1J.js";import"./index-ClQB4tO4.js";import"./github-icon-CH2zo-td.js";import"./vendor-arcblock-BndcJjQO.js";import"./index-DjGGLSgp.js";import"./index-DRYJ0xIl.js";import"./index-BojVbZw0.js";import"./index-DHPu60AO.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-p6jGoroc.js";import o from"./user-center-BfW2lvH2.js";import{H as i}from"./index-CDq77s86.js";import{T as e}from"./vendor-ux-TkkDR0Gn.js";import"./vendor-react-x2lQvn4m.js";import"./vendor-hooks-zCCbpt45.js";import"./vendor-utils-CtD44yV-.js";import"./index-D830QhSG.js";import"./arrow-down.svg-BykEFw6H.js";import"./user-sessions-DEwJRITu.js";import"./index--xoJi0Oj.js";import"./index-ClQB4tO4.js";import"./github-icon-CH2zo-td.js";import"./vendor-arcblock-BndcJjQO.js";import"./index-B0stLJYN.js";import"./index-DRYJ0xIl.js";import"./index-BojVbZw0.js";import"./index-DHPu60AO.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 +1 @@
1
- import{O as n,j as i,ak as l}from"./vendor-mui-core-p6jGoroc.js";import{j as d,r as c}from"./vendor-react-x2lQvn4m.js";import{T as u,a as h}from"./vendor-ux-TkkDR0Gn.js";import g from"./index-CHgWkvhM.js";import"./vendor-utils-CtD44yV-.js";import"./vendor-hooks-zCCbpt45.js";import"./lottie-web-4koyQiv_.js";import"./index-S9T-sBWO.js";import"./vendor-arcblock-BndcJjQO.js";import"./confirm-CCJkd_GP.js";import"./index-DBs9Ljax.js";import"./session-CD-6TrlW.js";import"./did-address-BdvYNOBf.js";import"./empty-spinner-CpvmEmwT.js";import"./bundle-avatar-mX0oF7zo.js";import"./shorten-label-OzRq4VRH.js";import"./list-header-DZoSW08k.js";import"./click-to-copy-DlFJrA7H.js";import"./question-mark-circle.svg-YsMacl4Q.js";import"./useSetState-BWrXo9eH.js";import"./engine-CcVO7RNx.js";import"./api-CpYSt0CS.js";import"./vendor-mui-x-CkcHHKbJ.js";import"./react-beautiful-dnd.esm-Cjgywj65.js";import"./raf-schd.esm-BZ5FB5HD.js";import"./item-C-9-K-dS.js";import"./delete-confirm-OwSiQs5a.js";import"./get-safe-url-CFJ4a0MT.js";import"./index-ClQB4tO4.js";import"./index-E_Fpmc4w.js";import"./index-BSmqpzfQ.js";const r=new URL(window.location.href),s=r.searchParams.get("mode")==="dialog",w=s?"":r.searchParams.get("padding")||"";function J(){const{t:p}=u(),{componentDid:o}=d(),a=n(t=>t.breakpoints.down("md")),m=t=>{t.stopPropagation(),window.parent.postMessage({event:"resourceDialog.close",componentDid:o},"*")};c.useEffect(()=>{window.parent.postMessage({event:"resourceDialog.loaded",componentDid:o},"*")},[o]);const e=i.jsx(g,{padding:w,initUrl:r});return s?i.jsx(h,{className:"studio-dialog",title:p("blocklet.publish.blockletStudio"),maxWidth:!1,fullWidth:!1,PaperProps:{style:a?{width:"100%",height:window.innerHeight}:{maxWidth:1350,minWidth:930,width:"80%"}},onClose:m,showCloseButton:!0,disableEscapeKeyDown:!0,open:!0,children:i.jsx(l,{sx:{height:"72vh",overflow:"auto",position:"relative"},children:e})}):e}export{J as default};
1
+ import{O as n,j as i,ak as l}from"./vendor-mui-core-p6jGoroc.js";import{j as d,r as c}from"./vendor-react-x2lQvn4m.js";import{T as u,a as h}from"./vendor-ux-TkkDR0Gn.js";import g from"./index-tnuA-tTl.js";import"./vendor-utils-CtD44yV-.js";import"./vendor-hooks-zCCbpt45.js";import"./lottie-web-4koyQiv_.js";import"./index-CDq77s86.js";import"./vendor-arcblock-BndcJjQO.js";import"./confirm-_x5prMc6.js";import"./index-DBs9Ljax.js";import"./session-CvQ97dDY.js";import"./did-address-BdvYNOBf.js";import"./empty-spinner-CpvmEmwT.js";import"./bundle-avatar-BzV5PyCo.js";import"./shorten-label-OzRq4VRH.js";import"./list-header-DZoSW08k.js";import"./click-to-copy-DlFJrA7H.js";import"./question-mark-circle.svg-YsMacl4Q.js";import"./useSetState-BWrXo9eH.js";import"./engine-CbuJOouR.js";import"./api-CpYSt0CS.js";import"./vendor-mui-x-CkcHHKbJ.js";import"./react-beautiful-dnd.esm-Cjgywj65.js";import"./raf-schd.esm-BZ5FB5HD.js";import"./item-D9OLZ5b9.js";import"./delete-confirm-DBhhuh63.js";import"./get-safe-url-70dNOHyP.js";import"./index-ClQB4tO4.js";import"./index-E_Fpmc4w.js";import"./index-BSmqpzfQ.js";const r=new URL(window.location.href),s=r.searchParams.get("mode")==="dialog",w=s?"":r.searchParams.get("padding")||"";function J(){const{t:p}=u(),{componentDid:o}=d(),a=n(t=>t.breakpoints.down("md")),m=t=>{t.stopPropagation(),window.parent.postMessage({event:"resourceDialog.close",componentDid:o},"*")};c.useEffect(()=>{window.parent.postMessage({event:"resourceDialog.loaded",componentDid:o},"*")},[o]);const e=i.jsx(g,{padding:w,initUrl:r});return s?i.jsx(h,{className:"studio-dialog",title:p("blocklet.publish.blockletStudio"),maxWidth:!1,fullWidth:!1,PaperProps:{style:a?{width:"100%",height:window.innerHeight}:{maxWidth:1350,minWidth:930,width:"80%"}},onClose:m,showCloseButton:!0,disableEscapeKeyDown:!0,open:!0,children:i.jsx(l,{sx:{height:"72vh",overflow:"auto",position:"relative"},children:e})}):e}export{J as default};
@@ -1 +1 @@
1
- import{r as v}from"./vendor-react-x2lQvn4m.js";import{J as T,n as k,j as n,$ as r,ak as y,T as g,bY as I,at as D,am as H,bZ as G,b_ as O}from"./vendor-mui-core-p6jGoroc.js";import{B as Y,p as q}from"./dashboard-EECTIwDT.js";import{T as R,C as J,I as V,D as Z}from"./vendor-ux-TkkDR0Gn.js";import{at as w,au as C,_ as K,Y as P,f as M,av as Q}from"./index-S9T-sBWO.js";import{V as X}from"./vendor-utils-CtD44yV-.js";import{x as S}from"./index-DRYJ0xIl.js";import{B as z}from"./base-chart-D2xQQY8-.js";import{B as ee}from"./bundle-avatar-mX0oF7zo.js";import"./vendor-arcblock-BndcJjQO.js";import"./vendor-hooks-zCCbpt45.js";import"./useLocalStorage-DHCQcCRn.js";import"./index-DBs9Ljax.js";import"./confirm-CCJkd_GP.js";import"./get-safe-url-CFJ4a0MT.js";import"./session-CD-6TrlW.js";import"./use-blocklet-logo-B1g1jSm8.js";import"./dot-DWse_kXZ.js";import"./useAsync-C8Ma6muj.js";import"./useSetState-BWrXo9eH.js";import"./index-CnZyhA37.js";import"./over-due-invoice-payment-COY8cvLu.js";import"./use-mobile-DpkDXDwi.js";import"./lottie-web-4koyQiv_.js";import"./index-biihuQJV.js";function U({title:s="",cpus:f=[],currentLoad:i=0,history:u=[],empty:l=null,onHover:p=()=>{},hoverIndex:a=null}){const{t:d,locale:x}=R(),t=T(),o=`${s||d("common.cpu")} (${Math.floor(i||0)}%)`,e=100,m=80,c=$=>`${$}%`,L=[{max:m,color:k(t.palette.primary.main,t.palette.mode==="dark"?.15:.08)},{min:m,max:100,color:k(t.palette.warning.main,t.palette.mode==="dark"?.18:.12)},{min:100,color:k(t.palette.error.main,t.palette.mode==="dark"?.25:.18)}],b={silent:!0,symbol:["none","none"],data:[{yAxis:100,lineStyle:{color:t.palette.error.main,type:"dashed",width:1.5},label:{formatter:`${c(100)}`,position:"insideEndTop",color:t.palette.text.secondary,padding:[2,4],borderRadius:2}},{yAxis:m,lineStyle:{color:t.palette.warning.light,type:"dashed",width:1.5},label:{formatter:`${c(m)}`,position:"insideEndTop",color:t.palette.text.secondary,padding:[2,4],borderRadius:2}}]},j=n.jsx("span",{children:`${d("system.cores")}: ${f?.length||0}`}),B=$=>w($,"HH:mm",x);return n.jsx(z,{title:o,total:e,history:u,valueFn:c,xAxisFormat:B,visualMapPieces:L,markLineData:b,extraInfo:j,empty:l,onHover:p,hoverIndex:a})}U.propTypes={title:r.string,cpus:r.array,currentLoad:r.number,history:r.array,empty:r.node,onHover:r.func,hoverIndex:r.number};function E({instanceCount:s=null,title:f="",total:i=null,used:u=null,history:l=[],empty:p=null,onHover:a=()=>{},hoverIndex:d=null}){const{t:x,locale:t}=R(),o=T(),e=!!i,m=i-u,c=e?`(${C(u)}, ${Math.floor(u/i*100)}%)`:"",L=`${f||x("common.memory")} ${c}`,b=Math.ceil(i*.8),j=h=>S(h,{short:!0,iec:!0}),B=[];s&&B.push({title:x("system.instances"),metric:s}),e&&B.push({title:x("system.free"),metric:j(m)});const $=[{max:b,color:k(o.palette.primary.main,o.palette.mode==="dark"?.15:.08)},{min:b,max:i,color:k(o.palette.warning.main,o.palette.mode==="dark"?.18:.12)},{min:i,color:k(o.palette.error.main,o.palette.mode==="dark"?.25:.18)}],N={silent:!0,symbol:["none","none"],data:[{yAxis:i,lineStyle:{color:o.palette.error.main,type:"dashed",width:1.5},label:{formatter:`${j(i)}`,position:"insideEndTop",color:o.palette.text.secondary,padding:[2,4],borderRadius:2}},{yAxis:b,lineStyle:{color:o.palette.warning.light,type:"dashed",width:1.5},label:{formatter:`${j(b)}`,position:"insideEndTop",color:o.palette.text.secondary,padding:[2,4],borderRadius:2}}]},A=n.jsx(n.Fragment,{children:B.map((h,_)=>n.jsxs(y,{sx:{marginLeft:_===0?0:1,display:"inline-flex"},children:[h.title,": ",h.metric]},h.title))}),W=h=>w(h,"HH:mm",t);return n.jsx(z,{title:L,total:i,history:l,valueFn:j,xAxisFormat:W,visualMapPieces:$,markLineData:N,extraInfo:A,empty:p,onHover:a,hoverIndex:d})}E.propTypes={title:r.string,instanceCount:r.number,total:r.number,used:r.number,history:r.array,empty:r.node,onHover:r.func,hoverIndex:r.number};function F({blocklet:s,cpuHistory:f=[],memoryHistory:i=[],...u}){const{t:l}=R(),{info:p}=K(),{runtimeHistory:a}=P(),[d,x]=v.useState(null),t=v.useCallback(e=>s.status!=="running"?n.jsx(g,{children:l("blocklet.runtimeInfo.noRunning")}):e.length?null:n.jsx(J,{children:l("common.empty")}),[s.status,l]),o=v.useCallback(e=>{x(e)},[]);return a.length===0?n.jsx(g,{children:l("blocklet.runtimeInfo.noRunning")}):n.jsxs(te,{component:"div",...u,memoryHistory:i,cpuHistory:f,children:[n.jsxs(I,{className:"page-metrics",container:!0,spacing:5,children:[n.jsx(I,{sx:{pt:"16px !important"},size:12,children:n.jsx(g,{sx:{fontSize:"16px",fontWeight:"bold"},children:"CPU"})}),a?.map(e=>n.jsx(I,{sx:{pt:"16px !important"},size:{lg:4,md:6,sm:6,xs:12},children:n.jsx(U,{title:`${e.name} CPU`,empty:t(e.cpu),currentLoad:e.appRuntimeInfo?.cpuUsage||0,cpus:e.appRuntimeInfo?.cpus||[],history:e.cpu,onHover:o,hoverIndex:d,style:{height:150}})},`${e.key}-cpu`))]}),n.jsxs(I,{className:"page-metrics",container:!0,spacing:5,sx:{mt:1},children:[n.jsx(I,{sx:{pt:"16px !important"},size:12,children:n.jsx(g,{sx:{fontSize:"16px",fontWeight:"bold"},children:"Memory"})}),a?.map(e=>n.jsx(I,{sx:{pt:"16px !important"},size:{lg:4,md:6,sm:6,xs:12},children:n.jsx(E,{title:`${e.name} Memory`,empty:t(e.memory),total:p.runtimeConfig?.blockletMaxMemoryLimit?S.parseSize(`${p.runtimeConfig.blockletMaxMemoryLimit*(e.key===s?.meta?.did?a.length-1:1)}MiB`):0,used:e.appRuntimeInfo?.memoryUsage||0,history:e.memory,onHover:o,hoverIndex:d,style:{height:150}})},`${e.key}-memory`))]})]})}F.propTypes={blocklet:r.object.isRequired,cpuHistory:r.arrayOf(r.shape({date:r.number,value:r.number})),memoryHistory:r.arrayOf(r.shape({date:r.number,value:r.number}))};const te=D(g)``;function Le(){const{t:s,locale:f}=R(),[i,u]=v.useState(6),{blocklet:l,actions:{refreshBlocklet:p}}=P(),a=v.useMemo(()=>{const t=[];return M.forEachBlockletSync(l,(o,{ancestors:e,id:m,level:c})=>{o?.meta?.did&&o.meta.did!==l.meta.did&&t.push({type:"blocklet",groupId:l.meta.did,groupName:M.getDisplayName(l),id:m,name:M.getDisplayName(o,!0),blocklet:l,component:o,level:c-1>=0?c-1:0,runtimeInfo:o.runtimeInfo,ancestors:e})}),t},[l]);v.useEffect(()=>{p({hours:i});const t=setInterval(()=>{p({hours:i})},1e3*10);return()=>{clearInterval(t)}},[i]);const d=t=>q(Number(t||0),{locale:Q(f)}),x=[{label:s("common.name"),name:"name",options:{customBodyRenderLite(t){const{name:o,component:e,level:m,ancestors:c}=a[t];return n.jsxs(y,{sx:{display:"flex",alignItems:"center",pl:m*2},children:[n.jsx(ee,{size:20,blocklet:e,ancestors:c}),n.jsx(y,{sx:{ml:1},children:o}),n.jsx(Y,{variant:"pin",style:{marginLeft:8},status:e.status,source:e.source,progress:e.progress})]})}}},{label:s("common.uptime"),name:"runtimeInfo.uptime",options:{customBodyRenderLite(t){const{runtimeInfo:o,component:e}=a[t];return!e?.status||e.status!=="running"?n.jsx(H,{title:s("common.noData"),children:"--"}):d(o?.uptime)}}},{label:s("blocklet.runtimeInfo.memoryUsage"),name:"runtimeInfo.memoryUsage",options:{customBodyRenderLite(t){const{runtimeInfo:o,component:e}=a[t];return!e?.status||e.status!=="running"?n.jsx(H,{title:s("common.noData"),children:"--"}):C(o?.memoryUsage||0)}}},{label:s("blocklet.runtimeInfo.cpuUsage"),name:"runtimeInfo.cpuUsage",options:{customBodyRenderLite(t){const{runtimeInfo:o,component:e}=a[t];return!e?.status||e.status!=="running"?n.jsx(H,{title:s("common.noData"),children:"--"}):`${(o?.cpuUsage||0).toFixed(1)}%`}}},{label:s("analytics.runtime"),name:"runtimeInfo.runtime",options:{customBodyRenderLite(t){const{runtimeInfo:o}=a[t];return o?.uptime?n.jsxs(y,{sx:{display:"flex",alignItems:"center"},children:[n.jsx(V,{icon:o?.runningDocker?"catppuccin:docker-ignore":"logos:nodejs-icon"}),n.jsx(y,{sx:{ml:1},children:o?.runningDocker?"Docker":"Nodejs"})]}):null}}},{label:s("blocklet.runtimeInfo.processId"),name:"runtimeInfo.pid",options:{customBodyRenderLite(t){const{runtimeInfo:o,component:e}=a[t];return!e?.status||e.status!=="running"?n.jsx(H,{title:s("common.noData"),children:"--"}):o?.pid}}},{label:s("blocklet.runtimeInfo.port"),name:"runtimeInfo.port",options:{customBodyRenderLite(t){const{runtimeInfo:o,component:e}=a[t];return!e?.status||e.status!=="running"?n.jsx(H,{title:s("common.noData"),children:"--"}):o?.port}}}];return n.jsxs(ne,{component:"div",children:[n.jsxs(y,{sx:{display:"flex",justifyContent:"space-between",flexDirection:"row",mb:2},children:[n.jsx(g,{component:"h3",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},sx:{mb:2},children:s("analytics.trend")}),n.jsx(G,{size:"small",exclusive:!0,value:i,onChange:(t,o)=>{X(o)&&u(o)},children:[1,3,6,12,24].map(t=>n.jsxs(O,{value:t,children:[t,"H"]},t))})]}),n.jsx(y,{children:n.jsx(F,{blocklet:l})}),n.jsx(y,{sx:{mt:3},children:n.jsx(Z,{title:s("analytics.detail"),className:"monitor-table",locale:f,data:a,columns:x,options:{search:!1,download:!1,filter:!1,print:!1,viewColumns:!1,pagination:!1,rowsPerPage:100}})})]})}const ne=D(g)``;export{Le as default};
1
+ import{r as v}from"./vendor-react-x2lQvn4m.js";import{J as T,n as k,j as n,$ as r,ak as y,T as g,bY as I,at as D,am as H,bZ as G,b_ as O}from"./vendor-mui-core-p6jGoroc.js";import{B as Y,p as q}from"./dashboard-e9cJiXmU.js";import{T as R,C as J,I as V,D as Z}from"./vendor-ux-TkkDR0Gn.js";import{at as w,au as C,_ as K,Y as P,f as M,av as Q}from"./index-CDq77s86.js";import{V as X}from"./vendor-utils-CtD44yV-.js";import{x as S}from"./index-DRYJ0xIl.js";import{B as z}from"./base-chart-D2xQQY8-.js";import{B as ee}from"./bundle-avatar-BzV5PyCo.js";import"./vendor-arcblock-BndcJjQO.js";import"./vendor-hooks-zCCbpt45.js";import"./useLocalStorage-DHCQcCRn.js";import"./index-DBs9Ljax.js";import"./confirm-_x5prMc6.js";import"./get-safe-url-70dNOHyP.js";import"./session-CvQ97dDY.js";import"./use-blocklet-logo-C7qZcidt.js";import"./dot-DWse_kXZ.js";import"./useAsync-C8Ma6muj.js";import"./useSetState-BWrXo9eH.js";import"./index-glbEl-Pn.js";import"./over-due-invoice-payment-CuQ5h3hN.js";import"./use-mobile-DpkDXDwi.js";import"./lottie-web-4koyQiv_.js";import"./index-biihuQJV.js";function U({title:s="",cpus:f=[],currentLoad:i=0,history:u=[],empty:l=null,onHover:p=()=>{},hoverIndex:a=null}){const{t:d,locale:x}=R(),t=T(),o=`${s||d("common.cpu")} (${Math.floor(i||0)}%)`,e=100,m=80,c=$=>`${$}%`,L=[{max:m,color:k(t.palette.primary.main,t.palette.mode==="dark"?.15:.08)},{min:m,max:100,color:k(t.palette.warning.main,t.palette.mode==="dark"?.18:.12)},{min:100,color:k(t.palette.error.main,t.palette.mode==="dark"?.25:.18)}],b={silent:!0,symbol:["none","none"],data:[{yAxis:100,lineStyle:{color:t.palette.error.main,type:"dashed",width:1.5},label:{formatter:`${c(100)}`,position:"insideEndTop",color:t.palette.text.secondary,padding:[2,4],borderRadius:2}},{yAxis:m,lineStyle:{color:t.palette.warning.light,type:"dashed",width:1.5},label:{formatter:`${c(m)}`,position:"insideEndTop",color:t.palette.text.secondary,padding:[2,4],borderRadius:2}}]},j=n.jsx("span",{children:`${d("system.cores")}: ${f?.length||0}`}),B=$=>w($,"HH:mm",x);return n.jsx(z,{title:o,total:e,history:u,valueFn:c,xAxisFormat:B,visualMapPieces:L,markLineData:b,extraInfo:j,empty:l,onHover:p,hoverIndex:a})}U.propTypes={title:r.string,cpus:r.array,currentLoad:r.number,history:r.array,empty:r.node,onHover:r.func,hoverIndex:r.number};function E({instanceCount:s=null,title:f="",total:i=null,used:u=null,history:l=[],empty:p=null,onHover:a=()=>{},hoverIndex:d=null}){const{t:x,locale:t}=R(),o=T(),e=!!i,m=i-u,c=e?`(${C(u)}, ${Math.floor(u/i*100)}%)`:"",L=`${f||x("common.memory")} ${c}`,b=Math.ceil(i*.8),j=h=>S(h,{short:!0,iec:!0}),B=[];s&&B.push({title:x("system.instances"),metric:s}),e&&B.push({title:x("system.free"),metric:j(m)});const $=[{max:b,color:k(o.palette.primary.main,o.palette.mode==="dark"?.15:.08)},{min:b,max:i,color:k(o.palette.warning.main,o.palette.mode==="dark"?.18:.12)},{min:i,color:k(o.palette.error.main,o.palette.mode==="dark"?.25:.18)}],N={silent:!0,symbol:["none","none"],data:[{yAxis:i,lineStyle:{color:o.palette.error.main,type:"dashed",width:1.5},label:{formatter:`${j(i)}`,position:"insideEndTop",color:o.palette.text.secondary,padding:[2,4],borderRadius:2}},{yAxis:b,lineStyle:{color:o.palette.warning.light,type:"dashed",width:1.5},label:{formatter:`${j(b)}`,position:"insideEndTop",color:o.palette.text.secondary,padding:[2,4],borderRadius:2}}]},A=n.jsx(n.Fragment,{children:B.map((h,_)=>n.jsxs(y,{sx:{marginLeft:_===0?0:1,display:"inline-flex"},children:[h.title,": ",h.metric]},h.title))}),W=h=>w(h,"HH:mm",t);return n.jsx(z,{title:L,total:i,history:l,valueFn:j,xAxisFormat:W,visualMapPieces:$,markLineData:N,extraInfo:A,empty:p,onHover:a,hoverIndex:d})}E.propTypes={title:r.string,instanceCount:r.number,total:r.number,used:r.number,history:r.array,empty:r.node,onHover:r.func,hoverIndex:r.number};function F({blocklet:s,cpuHistory:f=[],memoryHistory:i=[],...u}){const{t:l}=R(),{info:p}=K(),{runtimeHistory:a}=P(),[d,x]=v.useState(null),t=v.useCallback(e=>s.status!=="running"?n.jsx(g,{children:l("blocklet.runtimeInfo.noRunning")}):e.length?null:n.jsx(J,{children:l("common.empty")}),[s.status,l]),o=v.useCallback(e=>{x(e)},[]);return a.length===0?n.jsx(g,{children:l("blocklet.runtimeInfo.noRunning")}):n.jsxs(te,{component:"div",...u,memoryHistory:i,cpuHistory:f,children:[n.jsxs(I,{className:"page-metrics",container:!0,spacing:5,children:[n.jsx(I,{sx:{pt:"16px !important"},size:12,children:n.jsx(g,{sx:{fontSize:"16px",fontWeight:"bold"},children:"CPU"})}),a?.map(e=>n.jsx(I,{sx:{pt:"16px !important"},size:{lg:4,md:6,sm:6,xs:12},children:n.jsx(U,{title:`${e.name} CPU`,empty:t(e.cpu),currentLoad:e.appRuntimeInfo?.cpuUsage||0,cpus:e.appRuntimeInfo?.cpus||[],history:e.cpu,onHover:o,hoverIndex:d,style:{height:150}})},`${e.key}-cpu`))]}),n.jsxs(I,{className:"page-metrics",container:!0,spacing:5,sx:{mt:1},children:[n.jsx(I,{sx:{pt:"16px !important"},size:12,children:n.jsx(g,{sx:{fontSize:"16px",fontWeight:"bold"},children:"Memory"})}),a?.map(e=>n.jsx(I,{sx:{pt:"16px !important"},size:{lg:4,md:6,sm:6,xs:12},children:n.jsx(E,{title:`${e.name} Memory`,empty:t(e.memory),total:p.runtimeConfig?.blockletMaxMemoryLimit?S.parseSize(`${p.runtimeConfig.blockletMaxMemoryLimit*(e.key===s?.meta?.did?a.length-1:1)}MiB`):0,used:e.appRuntimeInfo?.memoryUsage||0,history:e.memory,onHover:o,hoverIndex:d,style:{height:150}})},`${e.key}-memory`))]})]})}F.propTypes={blocklet:r.object.isRequired,cpuHistory:r.arrayOf(r.shape({date:r.number,value:r.number})),memoryHistory:r.arrayOf(r.shape({date:r.number,value:r.number}))};const te=D(g)``;function Le(){const{t:s,locale:f}=R(),[i,u]=v.useState(6),{blocklet:l,actions:{refreshBlocklet:p}}=P(),a=v.useMemo(()=>{const t=[];return M.forEachBlockletSync(l,(o,{ancestors:e,id:m,level:c})=>{o?.meta?.did&&o.meta.did!==l.meta.did&&t.push({type:"blocklet",groupId:l.meta.did,groupName:M.getDisplayName(l),id:m,name:M.getDisplayName(o,!0),blocklet:l,component:o,level:c-1>=0?c-1:0,runtimeInfo:o.runtimeInfo,ancestors:e})}),t},[l]);v.useEffect(()=>{p({hours:i});const t=setInterval(()=>{p({hours:i})},1e3*10);return()=>{clearInterval(t)}},[i]);const d=t=>q(Number(t||0),{locale:Q(f)}),x=[{label:s("common.name"),name:"name",options:{customBodyRenderLite(t){const{name:o,component:e,level:m,ancestors:c}=a[t];return n.jsxs(y,{sx:{display:"flex",alignItems:"center",pl:m*2},children:[n.jsx(ee,{size:20,blocklet:e,ancestors:c}),n.jsx(y,{sx:{ml:1},children:o}),n.jsx(Y,{variant:"pin",style:{marginLeft:8},status:e.status,source:e.source,progress:e.progress})]})}}},{label:s("common.uptime"),name:"runtimeInfo.uptime",options:{customBodyRenderLite(t){const{runtimeInfo:o,component:e}=a[t];return!e?.status||e.status!=="running"?n.jsx(H,{title:s("common.noData"),children:"--"}):d(o?.uptime)}}},{label:s("blocklet.runtimeInfo.memoryUsage"),name:"runtimeInfo.memoryUsage",options:{customBodyRenderLite(t){const{runtimeInfo:o,component:e}=a[t];return!e?.status||e.status!=="running"?n.jsx(H,{title:s("common.noData"),children:"--"}):C(o?.memoryUsage||0)}}},{label:s("blocklet.runtimeInfo.cpuUsage"),name:"runtimeInfo.cpuUsage",options:{customBodyRenderLite(t){const{runtimeInfo:o,component:e}=a[t];return!e?.status||e.status!=="running"?n.jsx(H,{title:s("common.noData"),children:"--"}):`${(o?.cpuUsage||0).toFixed(1)}%`}}},{label:s("analytics.runtime"),name:"runtimeInfo.runtime",options:{customBodyRenderLite(t){const{runtimeInfo:o}=a[t];return o?.uptime?n.jsxs(y,{sx:{display:"flex",alignItems:"center"},children:[n.jsx(V,{icon:o?.runningDocker?"catppuccin:docker-ignore":"logos:nodejs-icon"}),n.jsx(y,{sx:{ml:1},children:o?.runningDocker?"Docker":"Nodejs"})]}):null}}},{label:s("blocklet.runtimeInfo.processId"),name:"runtimeInfo.pid",options:{customBodyRenderLite(t){const{runtimeInfo:o,component:e}=a[t];return!e?.status||e.status!=="running"?n.jsx(H,{title:s("common.noData"),children:"--"}):o?.pid}}},{label:s("blocklet.runtimeInfo.port"),name:"runtimeInfo.port",options:{customBodyRenderLite(t){const{runtimeInfo:o,component:e}=a[t];return!e?.status||e.status!=="running"?n.jsx(H,{title:s("common.noData"),children:"--"}):o?.port}}}];return n.jsxs(ne,{component:"div",children:[n.jsxs(y,{sx:{display:"flex",justifyContent:"space-between",flexDirection:"row",mb:2},children:[n.jsx(g,{component:"h3",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},sx:{mb:2},children:s("analytics.trend")}),n.jsx(G,{size:"small",exclusive:!0,value:i,onChange:(t,o)=>{X(o)&&u(o)},children:[1,3,6,12,24].map(t=>n.jsxs(O,{value:t,children:[t,"H"]},t))})]}),n.jsx(y,{children:n.jsx(F,{blocklet:l})}),n.jsx(y,{sx:{mt:3},children:n.jsx(Z,{title:s("analytics.detail"),className:"monitor-table",locale:f,data:a,columns:x,options:{search:!1,download:!1,filter:!1,print:!1,viewColumns:!1,pagination:!1,rowsPerPage:100}})})]})}const ne=D(g)``;export{Le as default};
@@ -0,0 +1 @@
1
+ import{g as o}from"./index-CDq77s86.js";const e=o();export{e as b};
@@ -1,4 +1,4 @@
1
- import{T as Z,I as O,b as ee,H as E,a as ce,n as ae,D as de,j as De}from"./vendor-ux-TkkDR0Gn.js";import{g as oe,k as Y,b as w,a as ue,h as ye}from"./vendor-hooks-zCCbpt45.js";import{r as k}from"./vendor-react-x2lQvn4m.js";import{j as e,ak as P,am as q,I as N,bb as K,$ as y,J as te,G as _,H as We,V as $,T as Fe,cQ as Ne,cR as Le,M as Ve,E as L,b5 as J,b6 as V,C as X,F as Me,Y as Ue,b7 as Ze,q as $e,b9 as Xe,bm as ge,bn as ve,b1 as Ge,at as Ye}from"./vendor-mui-core-p6jGoroc.js";import{Y as re,_ as se,c as T,aN as me,b6 as Ce}from"./index-S9T-sBWO.js";import{n as U,a2 as Q,a3 as Ke,Y as G,C as Je,G as Pe,a4 as xe,c as M,o as be}from"./vendor-utils-CtD44yV-.js";import{u as fe,C as F}from"./index.esm-BONQrRCU.js";import{S as ne}from"./simple-select-CywFjRfu.js";import{u as je}from"./dashboard-EECTIwDT.js";import{A as Se}from"./config-CLS5JN-Q.js";import{u as Qe}from"./use-mobile-B8-JPkft.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-BndcJjQO.js";import"./useLocalStorage-DHCQcCRn.js";import"./index-DBs9Ljax.js";import"./confirm-CCJkd_GP.js";import"./get-safe-url-CFJ4a0MT.js";import"./session-CD-6TrlW.js";import"./use-blocklet-logo-B1g1jSm8.js";import"./dot-DWse_kXZ.js";import"./useAsync-C8Ma6muj.js";import"./useSetState-BWrXo9eH.js";import"./index-CnZyhA37.js";import"./over-due-invoice-payment-COY8cvLu.js";import"./use-mobile-DpkDXDwi.js";const eo={width:24,height:24,body:'<path fill="currentColor" d="M11 14.2V6q0-.425.288-.713T12 5q.425 0 .713.288T13 6v8.2l2.9-2.9q.275-.275.7-.275t.7.275q.275.275.275.7t-.275.7l-4.6 4.6q-.3.3-.7.3t-.7-.3l-4.6-4.6q-.275-.275-.275-.7t.275-.7q.275-.275.7-.275t.7.275l2.9 2.9Z"/>'},oo={width:24,height:24,body:'<path fill="currentColor" d="m11 8.8l-2.9 2.9q-.275.275-.7.275t-.7-.275q-.275-.275-.275-.7t.275-.7l4.6-4.6q.3-.3.7-.3t.7.3l4.6 4.6q.275.275.275.7t-.275.7q-.275.275-.7.275t-.7-.275L13 8.8V17q0 .425-.288.713T12 18q-.425 0-.713-.288T11 17V8.8Z"/>'},pe={width:24,height:24,body:'<path fill="currentColor" d="M7 21q-.825 0-1.413-.588T5 19V6q-.425 0-.713-.288T4 5q0-.425.288-.713T5 4h4q0-.425.288-.713T10 3h4q.425 0 .713.288T15 4h4q.425 0 .713.288T20 5q0 .425-.288.713T19 6v13q0 .825-.588 1.413T17 21H7Zm2-4h2V8H9v9Zm4 0h2V8h-2v9Z"/>'},he={width:24,height:24,body:'<path fill="currentColor" d="M4 21q-.425 0-.713-.288T3 20v-2.425q0-.4.15-.763t.425-.637L16.2 3.575q.3-.275.663-.425t.762-.15q.4 0 .775.15t.65.45L20.425 5q.3.275.437.65T21 6.4q0 .4-.138.763t-.437.662l-12.6 12.6q-.275.275-.638.425t-.762.15H4ZM17.6 7.8L19 6.4L17.6 5l-1.4 1.4l1.4 1.4Z"/>'};function we({enabled:o,showUp:t=!0,showDown:c=!0,showSwitch:n=!0,showDelete:r=!0,showEdit:l=!0,disableEdit:d=!1,disableSwitch:u=!1,onClickUp:i=()=>{},onClickDown:s=()=>{},onClickSwitch:f=()=>{},onClickDelete:h=()=>{},onClickEdit:H=()=>{}}){const{t:x}=Z();return e.jsxs(P,{sx:{display:"flex",alignItems:"center",gap:0},onClick:I=>I.stopPropagation(),children:[l?e.jsx(q,{title:x("common.edit"),children:e.jsx(N,{size:"small",onClick:H,color:"success",disabled:d,children:e.jsx(O,{icon:he,fontSize:18})})}):null,r?e.jsx(q,{title:x("common.delete"),children:e.jsx(N,{size:"small",onClick:h,color:"error",children:e.jsx(O,{icon:pe,fontSize:18})})}):null,n?e.jsx(q,{title:x(o?"common.enabled":"common.disabled"),children:e.jsx(K,{size:"small",checked:o,onClick:f,disabled:u})}):null,t?e.jsx(q,{title:x("common.moveUp"),children:e.jsx(N,{size:"small",onClick:i,disabled:d,children:e.jsx(O,{icon:oo,fontSize:20})})}):null,c?e.jsx(q,{title:x("common.moveDown"),children:e.jsx(N,{size:"small",onClick:s,disabled:d,children:e.jsx(O,{icon:eo,fontSize:20})})}):null]})}we.propTypes={enabled:y.bool.isRequired,showUp:y.bool,showDown:y.bool,showSwitch:y.bool,showDelete:y.bool,showEdit:y.bool,disableEdit:y.bool,disableSwitch:y.bool,onClickUp:y.func,onClickDown:y.func,onClickSwitch:y.func,onClickDelete:y.func,onClickEdit:y.func};function He({ref:o=null}){const{t}=k.useContext(ee),{blocklet:c}=re(),{api:n}=se(),r=c?.meta?.did,d=te()?.transitions?.duration?.leavingScreen||300,u=oe({mode:"add",show:!1,isDefaultRule:!1,callback:U,get dialogTitle(){return this.mode==="edit"?t("securityRule.edit"):this.mode==="view"?t("securityRule.view"):t("securityRule.add")}}),i=Y(async()=>{const{accessPolicies:g}=await n.getBlockletAccessPolicies({input:{did:r}});return Q(g,C=>C.isProtected?1:0)},{manual:!0}),s=Y(async()=>{const{responseHeaderPolicies:g}=await n.getBlockletResponseHeaderPolicies({input:{did:r}});return Q(g,C=>C.isProtected?1:0)},{manual:!0}),{handleSubmit:f,control:h,watch:H,setValue:x,getValues:I,reset:B,formState:{errors:A}}=fe({mode:"onChange",defaultValues:{componentDid:"",pathPattern:"",responseHeaderPolicyId:"",accessPolicyId:"",remark:""}}),D=w(()=>{B(),u.mode="add"}),S=w(()=>{u.show=!1,setTimeout(()=>{D()},d)}),b=w((g,C=null)=>{u.show=!0,C&&(u.isDefaultRule=C.id===T.SECURITY_RULE_DEFAULT_ID,u.mode="edit",x("componentDid",C.componentDid),x("pathPattern",C.pathPattern),x("responseHeaderPolicyId",C.responseHeaderPolicyId),x("accessPolicyId",C.accessPolicyId),x("remark",C.remark||"")),g?u.callback=g:u.mode="view",i.run(),s.run()});k.useImperativeHandle(o,()=>({open:b,close:S}),[b,S]);const m=w(()=>{const[g,C]=I(["accessPolicyId","responseHeaderPolicyId"]);return!g&&!C?t("securityRule.form.accessPolicyOrResponseHeaderPolicyRequired"):!0}),a=w(g=>{const C=m();C===!0?u.callback(g,S):E.error(C)}),j=H("componentDid"),z=w(g=>{const C=g?.trim();if(!C)return t("common.requiredErrorText",{name:t("securityRule.form.pathPattern")});if(j){if(C.startsWith("/"))return t("securityRule.form.pathPatternErrorText")}else if(!C.startsWith("/")&&C!=="*")return t("securityRule.form.pathPatternErrorText");return!0}),p=w(g=>g?.trim()?!0:t("common.requiredErrorText",{name:t("securityRule.form.accessPolicy")})),v=w(g=>g?.trim()?!0:t("common.requiredErrorText",{name:t("securityRule.form.responseHeaderPolicy")})),R=ue(()=>{const C=(c?.children||[]).find(_e=>_e.meta.did===j);return C?.mountPoint?Ke(C.mountPoint):null},[c,j]);return e.jsx(ce,{open:u.show,title:u.dialogTitle,onClose:S,PaperProps:{style:{minHeight:"unset"}},actions:e.jsx(ae,{color:"primary",autoFocus:!0,variant:"contained",onClick:f(a),children:t("common.confirm")}),children:e.jsxs("form",{noValidate:!0,autoComplete:"off",children:[u.isDefaultRule?null:e.jsx(F,{name:"componentDid",control:h,render:({field:g})=>e.jsx(ne,{fullWidth:!0,margin:"dense",size:"small",label:t("securityRule.form.component"),placeholer:t("securityRule.form.componentPlaceholder"),options:c.children.map(C=>({title:C.meta.title,value:C.meta.did,description:C.mountPoint})),error:!!A?.componentDid?.message,helperText:A?.componentDid?.message||"Choose belong to component",...G(g,"ref"),readOnly:u.mode==="view"})}),e.jsx(F,{name:"pathPattern",control:h,rules:{validate:z},render:({field:g})=>e.jsx(_,{fullWidth:!0,required:!0,margin:"dense",size:"small",placeholder:t("securityRule.form.pathPatternPlaceholder"),label:t("securityRule.form.pathPattern"),error:!!A?.pathPattern?.message,helperText:A?.pathPattern?.message||"/abc/bcd or /abc or /abc/*",...g,disabled:u.isDefaultRule||u.mode==="view",slotProps:{input:{startAdornment:R?e.jsx(We,{position:"start",children:R}):null}}})}),e.jsx(F,{name:"accessPolicyId",control:h,rules:{validate:u.isDefaultRule?p:U},render:({field:g})=>e.jsx(ne,{fullWidth:!0,required:u.isDefaultRule,margin:"dense",size:"small",label:t("securityRule.form.accessPolicy"),placeholer:t("securityRule.form.accessPolicyPlaceholder"),options:(i.data||[]).map(C=>({value:C.id,title:C.name,description:C.description})),error:!!A?.accessPolicyId?.message,helperText:A?.accessPolicyId?.message||t("securityRule.form.accessPolicyHelperText"),...G(g,"ref"),disabled:u.mode==="view"})}),e.jsx(F,{name:"responseHeaderPolicyId",control:h,rules:{validate:u.isDefaultRule?v:U},render:({field:g})=>e.jsx(ne,{fullWidth:!0,required:u.isDefaultRule,margin:"dense",size:"small",label:t("securityRule.form.responseHeaderPolicy"),placeholer:t("securityRule.form.responseHeaderPolicyPlaceholder"),options:(s.data||[]).map(C=>({title:C.name,value:C.id,description:C.description})),error:!!A?.responseHeaderPolicyId?.message,helperText:A?.responseHeaderPolicyId?.message||t("securityRule.form.responseHeaderPolicyHelperText"),...G(g,"ref"),disabled:u.mode==="view"})}),e.jsx(F,{name:"remark",control:h,render:({field:g})=>e.jsx(_,{fullWidth:!0,multiline:!0,minRows:3,maxRows:7,size:"small",margin:"dense",placeholder:t("securityRule.form.remarkPlaceholder"),label:t("securityRule.form.remark"),helperText:A?.message,...g,disabled:u.mode==="view"})})]})})}He.propTypes={ref:y.any};const W=async(o,t="Failed to saved")=>{try{await o()}catch(c){E.error(c?.message||t)}};function to(){const{t:o,locale:t}=Z(),{blocklet:c}=re(),{api:n}=se(),r=c?.meta?.did,l=te(),d=k.useRef(null),u=k.useRef(null),{confirmApi:i,confirmHolder:s}=me(),f=Y(async()=>{const{securityRules:p}=await n.getBlockletSecurityRules({input:{did:r,includeDisabled:!0}});return p}),h=p=>p.id===T.SECURITY_RULE_DEFAULT_ID,H=w(p=>(c?.children||[]).find(R=>R.meta.did===p)?.mountPoint),x=(f.data||[]).map(p=>{if(p.componentDid){const v=H(p.componentDid);p._disabled=v===void 0}return p}),I=x.filter(p=>!h(p)),B=(p,v)=>{W(async()=>{const R=p.target.checked;await n.updateBlockletSecurityRule({input:{did:r,data:{id:v.id,enabled:R}}}),E.success(o("common.succeeded")),f.run()})},A=(p,v,R)=>{W(async()=>{const g=R-1,C=x[g];await Promise.all([n.updateBlockletSecurityRule({input:{did:r,data:{id:v.id,priority:C.priority}}}),n.updateBlockletSecurityRule({input:{did:r,data:{id:C.id,priority:v.priority}}})]),E.success(o("common.succeeded")),f.run()})},D=(p,v,R)=>{W(async()=>{const g=R+1,C=x[g];await Promise.all([n.updateBlockletSecurityRule({input:{did:r,data:{id:v.id,priority:C.priority}}}),n.updateBlockletSecurityRule({input:{did:r,data:{id:C.id,priority:v.priority}}})]),E.success(o("common.succeeded")),f.run()})},S=()=>{d.current.open((p,v)=>{W(async()=>{await n.addBlockletSecurityRule({input:{did:r,data:p}}),E.success(o("common.succeeded")),f.run(),v()})})},b=(p,v)=>{d.current.open((R,g)=>{W(async()=>{await n.updateBlockletSecurityRule({input:{did:r,data:{...R,id:v.id}}}),E.success(o("common.succeeded")),f.run(),g()})},v)},m=(p,v)=>{i.open({title:o("securityRule.delete.title"),content:o("securityRule.delete.description"),confirmButtonText:o("common.confirm"),confirmButtonProps:{color:"error"},cancelButtonText:o("common.cancel"),onConfirm(R){W(async()=>{await n.deleteBlockletSecurityRule({input:{did:r,id:v.id}}),E.success(o("common.succeeded")),f.run(),R()})}})},a={sort:!1,download:!1,filter:!1,print:!1,search:!1,viewColumns:!1,expandableRowsOnClick:!0,searchDebounceTime:600,onRowClick(p,{dataIndex:v},R){if(u.current?.contains(R.target)){const g=x[v];d.current.open(void 0,g)}},setRowProps:(p,v)=>x[v]._disabled?{title:o("securityRule.useless"),style:{backgroundColor:l.palette.action.disabledBackground,cursor:"default"}}:{}},j=[e.jsx($,{size:"small",variant:"outlined",onClick:()=>{f.run()},sx:{mr:1},children:o("common.refresh")},"refresh"),e.jsx($,{size:"small",variant:"contained",onClick:S,children:o("common.add")})],z=[{label:o("securityRule.form.pathPattern"),name:"pathPattern",options:{customBodyRenderLite(p){const v=x[p];return e.jsx(P,{sx:{whiteSpace:"nowrap"},children:v.id===T.SECURITY_RULE_DEFAULT_ID?"Default":Je(H(v.componentDid),v.pathPattern)})}}},{label:o("responseHeaderPolicy.title"),name:"responseHeaderPolicy",options:{customBodyRenderLite(p){return x[p].responseHeaderPolicy?.name}}},{label:o("accessPolicy.title"),name:"accessPolicyId",options:{customBodyRenderLite(p){return x[p].accessPolicy?.name}}},{label:o("securityRule.form.remark"),name:"remark"},{label:o("common.actions"),name:"",width:100,align:"center",verticalKeyAlign:"center",options:{customBodyRenderLite(p){const v=x[p],R=h(v);return e.jsx(we,{disableEdit:v._disabled,disableSwitch:v._disabled,enabled:v.enabled,showSwitch:!R,showDelete:!R,showUp:p>0&&!R,showDown:p<I.length-1&&!R,onClickSwitch:g=>{B(g,v)},onClickUp:g=>{A(g,v,p)},onClickDown:g=>{D(g,v,p)},onClickEdit:g=>{b(g,v)},onClickDelete:g=>{m(g,v)}})}}}].filter(Boolean);return e.jsxs(P,{sx:{display:"flex",flexDirection:"column",gap:2},ref:u,children:[e.jsx(de,{verticalKeyWidth:100,locale:t,title:e.jsxs(P,{sx:{display:"flex",alignItems:"center",gap:1},children:[o("securityRule.title")," ",e.jsx(Fe,{variant:"body2",children:o("securityRule.sortByDescription")})]}),data:x,columns:z,customButtons:j,options:a,loading:f.loading}),e.jsx(He,{ref:d}),s]})}const Re={width:24,height:24,body:'<path fill="currentColor" d="M5 21q-.825 0-1.413-.588T3 19V5q0-.825.588-1.413T5 3h14q.825 0 1.413.588T21 5v14q0 .825-.588 1.413T19 21H5Zm0-2h14V7H5v12Zm7-2q-2.05 0-3.663-1.113T6 13q.725-1.775 2.337-2.888T12 9q2.05 0 3.663 1.113T18 13q-.725 1.775-2.337 2.888T12 17Zm0-2.5q-.625 0-1.063-.438T10.5 13q0-.625.438-1.063T12 11.5q.625 0 1.063.438T13.5 13q0 .625-.438 1.063T12 14.5Zm0 1q1.05 0 1.775-.725T14.5 13q0-1.05-.725-1.775T12 10.5q-1.05 0-1.775.725T9.5 13q0 1.05.725 1.775T12 15.5Z"/>'};function Te({value:o,onChange:t,...c}){const n="roles",r="roles_reverse",{t:l,locale:d}=Z(),u=[...Se,{value:n,icon:Ne,title:{zh:"指定通行证可访问",en:"Accessible to selected passports"},description:{zh:"只有指定的通行证可以访问",en:"Only specified passports can access"}},{value:r,icon:Le,title:{zh:"指定通行证不可以访问",en:"Accessible to not selected passports"},description:{zh:"只有指定的通行证不可以访问",en:"Only specified passports can't access"}}];return e.jsx(_,{...c,label:l("blocklet.config.access.description"),select:!0,fullWidth:!0,value:o,onChange:t,slotProps:{select:{renderValue:i=>{const s=u.find(f=>f.value===i);return s?e.jsxs(P,{children:[e.jsx(P,{component:s.icon,sx:{mr:1,fontSize:18,verticalAlign:"text-bottom",color:"text.secondary"}}),s.title[d]||s.title.en]}):null}}},children:u.map(i=>e.jsxs(Ve,{value:i.value,sx:{display:"block","& .tip":{fontSize:"12px",color:`${({theme:s})=>s.palette.text.secondary}`}},children:[e.jsxs(P,{sx:{display:"flex",alignItems:"center"},children:[e.jsx(P,{component:i.icon,sx:{mr:1,fontSize:18,verticalAlign:"text-bottom",color:"text.secondary"}}),e.jsx(P,{children:i.title[d]||i.title.en})]}),e.jsx(P,{className:"tip",children:i.description[d]||i.description.en})]}))})}Te.propTypes={value:y.string,onChange:y.func};const ke=o=>{const t={name:o.name,description:o.description},{roles:c=null,reverse:n}=o;return c===null?n===!1&&(t.whoCanAccess=T.WHO_CAN_ACCESS.ALL,t.roles=null):c.length===0&&n===!0?(t.whoCanAccess=T.WHO_CAN_ACCESS.INVITED,t.roles=[]):xe(c,[T.WHO_CAN_ACCESS.OWNER])&&n===!1?(t.whoCanAccess=T.WHO_CAN_ACCESS.OWNER,t.roles=[T.WHO_CAN_ACCESS.OWNER]):xe(c,[T.WHO_CAN_ACCESS.OWNER,T.WHO_CAN_ACCESS.ADMIN])&&n===!1?(t.whoCanAccess=T.WHO_CAN_ACCESS.ADMIN,t.roles=[T.WHO_CAN_ACCESS.OWNER,T.WHO_CAN_ACCESS.ADMIN]):(t.whoCanAccess=n?"roles_reverse":"roles",t.roles=c),t},ro=o=>{const t={name:o.name,description:o.description},{roles:c=null,whoCanAccess:n}=o;return n==="roles"?(t.roles=c,t.reverse=!1):n==="roles_reverse"?(t.roles=c,t.reverse=!0):n===T.WHO_CAN_ACCESS.ALL?(t.roles=null,t.reverse=!1):n===T.WHO_CAN_ACCESS.INVITED?(t.roles=[],t.reverse=!0):n===T.WHO_CAN_ACCESS.OWNER?(t.roles=[T.WHO_CAN_ACCESS.OWNER],t.reverse=!1):n===T.WHO_CAN_ACCESS.ADMIN&&(t.roles=[T.WHO_CAN_ACCESS.OWNER,T.WHO_CAN_ACCESS.ADMIN],t.reverse=!1),t},so=o=>o instanceof Object?{origin:o.origin?{override:o.origin?.override??!0,value:o.origin?.value?.join(`
1
+ import{T as Z,I as O,b as ee,H as E,a as ce,n as ae,D as de,j as De}from"./vendor-ux-TkkDR0Gn.js";import{g as oe,k as Y,b as w,a as ue,h as ye}from"./vendor-hooks-zCCbpt45.js";import{r as k}from"./vendor-react-x2lQvn4m.js";import{j as e,ak as P,am as q,I as N,bb as K,$ as y,J as te,G as _,H as We,V as $,T as Fe,cQ as Ne,cR as Le,M as Ve,E as L,b5 as J,b6 as V,C as X,F as Me,Y as Ue,b7 as Ze,q as $e,b9 as Xe,bm as ge,bn as ve,b1 as Ge,at as Ye}from"./vendor-mui-core-p6jGoroc.js";import{Y as re,_ as se,c as T,aN as me,b6 as Ce}from"./index-CDq77s86.js";import{n as U,a2 as Q,a3 as Ke,Y as G,C as Je,G as Pe,a4 as xe,c as M,o as be}from"./vendor-utils-CtD44yV-.js";import{u as fe,C as F}from"./index.esm-BONQrRCU.js";import{S as ne}from"./simple-select-CywFjRfu.js";import{u as je}from"./dashboard-e9cJiXmU.js";import{A as Se}from"./config-Bzod-0Gd.js";import{u as Qe}from"./use-mobile-B8-JPkft.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-BndcJjQO.js";import"./useLocalStorage-DHCQcCRn.js";import"./index-DBs9Ljax.js";import"./confirm-_x5prMc6.js";import"./get-safe-url-70dNOHyP.js";import"./session-CvQ97dDY.js";import"./use-blocklet-logo-C7qZcidt.js";import"./dot-DWse_kXZ.js";import"./useAsync-C8Ma6muj.js";import"./useSetState-BWrXo9eH.js";import"./index-glbEl-Pn.js";import"./over-due-invoice-payment-CuQ5h3hN.js";import"./use-mobile-DpkDXDwi.js";const eo={width:24,height:24,body:'<path fill="currentColor" d="M11 14.2V6q0-.425.288-.713T12 5q.425 0 .713.288T13 6v8.2l2.9-2.9q.275-.275.7-.275t.7.275q.275.275.275.7t-.275.7l-4.6 4.6q-.3.3-.7.3t-.7-.3l-4.6-4.6q-.275-.275-.275-.7t.275-.7q.275-.275.7-.275t.7.275l2.9 2.9Z"/>'},oo={width:24,height:24,body:'<path fill="currentColor" d="m11 8.8l-2.9 2.9q-.275.275-.7.275t-.7-.275q-.275-.275-.275-.7t.275-.7l4.6-4.6q.3-.3.7-.3t.7.3l4.6 4.6q.275.275.275.7t-.275.7q-.275.275-.7.275t-.7-.275L13 8.8V17q0 .425-.288.713T12 18q-.425 0-.713-.288T11 17V8.8Z"/>'},pe={width:24,height:24,body:'<path fill="currentColor" d="M7 21q-.825 0-1.413-.588T5 19V6q-.425 0-.713-.288T4 5q0-.425.288-.713T5 4h4q0-.425.288-.713T10 3h4q.425 0 .713.288T15 4h4q.425 0 .713.288T20 5q0 .425-.288.713T19 6v13q0 .825-.588 1.413T17 21H7Zm2-4h2V8H9v9Zm4 0h2V8h-2v9Z"/>'},he={width:24,height:24,body:'<path fill="currentColor" d="M4 21q-.425 0-.713-.288T3 20v-2.425q0-.4.15-.763t.425-.637L16.2 3.575q.3-.275.663-.425t.762-.15q.4 0 .775.15t.65.45L20.425 5q.3.275.437.65T21 6.4q0 .4-.138.763t-.437.662l-12.6 12.6q-.275.275-.638.425t-.762.15H4ZM17.6 7.8L19 6.4L17.6 5l-1.4 1.4l1.4 1.4Z"/>'};function we({enabled:o,showUp:t=!0,showDown:c=!0,showSwitch:n=!0,showDelete:r=!0,showEdit:l=!0,disableEdit:d=!1,disableSwitch:u=!1,onClickUp:i=()=>{},onClickDown:s=()=>{},onClickSwitch:f=()=>{},onClickDelete:h=()=>{},onClickEdit:H=()=>{}}){const{t:x}=Z();return e.jsxs(P,{sx:{display:"flex",alignItems:"center",gap:0},onClick:I=>I.stopPropagation(),children:[l?e.jsx(q,{title:x("common.edit"),children:e.jsx(N,{size:"small",onClick:H,color:"success",disabled:d,children:e.jsx(O,{icon:he,fontSize:18})})}):null,r?e.jsx(q,{title:x("common.delete"),children:e.jsx(N,{size:"small",onClick:h,color:"error",children:e.jsx(O,{icon:pe,fontSize:18})})}):null,n?e.jsx(q,{title:x(o?"common.enabled":"common.disabled"),children:e.jsx(K,{size:"small",checked:o,onClick:f,disabled:u})}):null,t?e.jsx(q,{title:x("common.moveUp"),children:e.jsx(N,{size:"small",onClick:i,disabled:d,children:e.jsx(O,{icon:oo,fontSize:20})})}):null,c?e.jsx(q,{title:x("common.moveDown"),children:e.jsx(N,{size:"small",onClick:s,disabled:d,children:e.jsx(O,{icon:eo,fontSize:20})})}):null]})}we.propTypes={enabled:y.bool.isRequired,showUp:y.bool,showDown:y.bool,showSwitch:y.bool,showDelete:y.bool,showEdit:y.bool,disableEdit:y.bool,disableSwitch:y.bool,onClickUp:y.func,onClickDown:y.func,onClickSwitch:y.func,onClickDelete:y.func,onClickEdit:y.func};function He({ref:o=null}){const{t}=k.useContext(ee),{blocklet:c}=re(),{api:n}=se(),r=c?.meta?.did,d=te()?.transitions?.duration?.leavingScreen||300,u=oe({mode:"add",show:!1,isDefaultRule:!1,callback:U,get dialogTitle(){return this.mode==="edit"?t("securityRule.edit"):this.mode==="view"?t("securityRule.view"):t("securityRule.add")}}),i=Y(async()=>{const{accessPolicies:g}=await n.getBlockletAccessPolicies({input:{did:r}});return Q(g,C=>C.isProtected?1:0)},{manual:!0}),s=Y(async()=>{const{responseHeaderPolicies:g}=await n.getBlockletResponseHeaderPolicies({input:{did:r}});return Q(g,C=>C.isProtected?1:0)},{manual:!0}),{handleSubmit:f,control:h,watch:H,setValue:x,getValues:I,reset:B,formState:{errors:A}}=fe({mode:"onChange",defaultValues:{componentDid:"",pathPattern:"",responseHeaderPolicyId:"",accessPolicyId:"",remark:""}}),D=w(()=>{B(),u.mode="add"}),S=w(()=>{u.show=!1,setTimeout(()=>{D()},d)}),b=w((g,C=null)=>{u.show=!0,C&&(u.isDefaultRule=C.id===T.SECURITY_RULE_DEFAULT_ID,u.mode="edit",x("componentDid",C.componentDid),x("pathPattern",C.pathPattern),x("responseHeaderPolicyId",C.responseHeaderPolicyId),x("accessPolicyId",C.accessPolicyId),x("remark",C.remark||"")),g?u.callback=g:u.mode="view",i.run(),s.run()});k.useImperativeHandle(o,()=>({open:b,close:S}),[b,S]);const m=w(()=>{const[g,C]=I(["accessPolicyId","responseHeaderPolicyId"]);return!g&&!C?t("securityRule.form.accessPolicyOrResponseHeaderPolicyRequired"):!0}),a=w(g=>{const C=m();C===!0?u.callback(g,S):E.error(C)}),j=H("componentDid"),z=w(g=>{const C=g?.trim();if(!C)return t("common.requiredErrorText",{name:t("securityRule.form.pathPattern")});if(j){if(C.startsWith("/"))return t("securityRule.form.pathPatternErrorText")}else if(!C.startsWith("/")&&C!=="*")return t("securityRule.form.pathPatternErrorText");return!0}),p=w(g=>g?.trim()?!0:t("common.requiredErrorText",{name:t("securityRule.form.accessPolicy")})),v=w(g=>g?.trim()?!0:t("common.requiredErrorText",{name:t("securityRule.form.responseHeaderPolicy")})),R=ue(()=>{const C=(c?.children||[]).find(_e=>_e.meta.did===j);return C?.mountPoint?Ke(C.mountPoint):null},[c,j]);return e.jsx(ce,{open:u.show,title:u.dialogTitle,onClose:S,PaperProps:{style:{minHeight:"unset"}},actions:e.jsx(ae,{color:"primary",autoFocus:!0,variant:"contained",onClick:f(a),children:t("common.confirm")}),children:e.jsxs("form",{noValidate:!0,autoComplete:"off",children:[u.isDefaultRule?null:e.jsx(F,{name:"componentDid",control:h,render:({field:g})=>e.jsx(ne,{fullWidth:!0,margin:"dense",size:"small",label:t("securityRule.form.component"),placeholer:t("securityRule.form.componentPlaceholder"),options:c.children.map(C=>({title:C.meta.title,value:C.meta.did,description:C.mountPoint})),error:!!A?.componentDid?.message,helperText:A?.componentDid?.message||"Choose belong to component",...G(g,"ref"),readOnly:u.mode==="view"})}),e.jsx(F,{name:"pathPattern",control:h,rules:{validate:z},render:({field:g})=>e.jsx(_,{fullWidth:!0,required:!0,margin:"dense",size:"small",placeholder:t("securityRule.form.pathPatternPlaceholder"),label:t("securityRule.form.pathPattern"),error:!!A?.pathPattern?.message,helperText:A?.pathPattern?.message||"/abc/bcd or /abc or /abc/*",...g,disabled:u.isDefaultRule||u.mode==="view",slotProps:{input:{startAdornment:R?e.jsx(We,{position:"start",children:R}):null}}})}),e.jsx(F,{name:"accessPolicyId",control:h,rules:{validate:u.isDefaultRule?p:U},render:({field:g})=>e.jsx(ne,{fullWidth:!0,required:u.isDefaultRule,margin:"dense",size:"small",label:t("securityRule.form.accessPolicy"),placeholer:t("securityRule.form.accessPolicyPlaceholder"),options:(i.data||[]).map(C=>({value:C.id,title:C.name,description:C.description})),error:!!A?.accessPolicyId?.message,helperText:A?.accessPolicyId?.message||t("securityRule.form.accessPolicyHelperText"),...G(g,"ref"),disabled:u.mode==="view"})}),e.jsx(F,{name:"responseHeaderPolicyId",control:h,rules:{validate:u.isDefaultRule?v:U},render:({field:g})=>e.jsx(ne,{fullWidth:!0,required:u.isDefaultRule,margin:"dense",size:"small",label:t("securityRule.form.responseHeaderPolicy"),placeholer:t("securityRule.form.responseHeaderPolicyPlaceholder"),options:(s.data||[]).map(C=>({title:C.name,value:C.id,description:C.description})),error:!!A?.responseHeaderPolicyId?.message,helperText:A?.responseHeaderPolicyId?.message||t("securityRule.form.responseHeaderPolicyHelperText"),...G(g,"ref"),disabled:u.mode==="view"})}),e.jsx(F,{name:"remark",control:h,render:({field:g})=>e.jsx(_,{fullWidth:!0,multiline:!0,minRows:3,maxRows:7,size:"small",margin:"dense",placeholder:t("securityRule.form.remarkPlaceholder"),label:t("securityRule.form.remark"),helperText:A?.message,...g,disabled:u.mode==="view"})})]})})}He.propTypes={ref:y.any};const W=async(o,t="Failed to saved")=>{try{await o()}catch(c){E.error(c?.message||t)}};function to(){const{t:o,locale:t}=Z(),{blocklet:c}=re(),{api:n}=se(),r=c?.meta?.did,l=te(),d=k.useRef(null),u=k.useRef(null),{confirmApi:i,confirmHolder:s}=me(),f=Y(async()=>{const{securityRules:p}=await n.getBlockletSecurityRules({input:{did:r,includeDisabled:!0}});return p}),h=p=>p.id===T.SECURITY_RULE_DEFAULT_ID,H=w(p=>(c?.children||[]).find(R=>R.meta.did===p)?.mountPoint),x=(f.data||[]).map(p=>{if(p.componentDid){const v=H(p.componentDid);p._disabled=v===void 0}return p}),I=x.filter(p=>!h(p)),B=(p,v)=>{W(async()=>{const R=p.target.checked;await n.updateBlockletSecurityRule({input:{did:r,data:{id:v.id,enabled:R}}}),E.success(o("common.succeeded")),f.run()})},A=(p,v,R)=>{W(async()=>{const g=R-1,C=x[g];await Promise.all([n.updateBlockletSecurityRule({input:{did:r,data:{id:v.id,priority:C.priority}}}),n.updateBlockletSecurityRule({input:{did:r,data:{id:C.id,priority:v.priority}}})]),E.success(o("common.succeeded")),f.run()})},D=(p,v,R)=>{W(async()=>{const g=R+1,C=x[g];await Promise.all([n.updateBlockletSecurityRule({input:{did:r,data:{id:v.id,priority:C.priority}}}),n.updateBlockletSecurityRule({input:{did:r,data:{id:C.id,priority:v.priority}}})]),E.success(o("common.succeeded")),f.run()})},S=()=>{d.current.open((p,v)=>{W(async()=>{await n.addBlockletSecurityRule({input:{did:r,data:p}}),E.success(o("common.succeeded")),f.run(),v()})})},b=(p,v)=>{d.current.open((R,g)=>{W(async()=>{await n.updateBlockletSecurityRule({input:{did:r,data:{...R,id:v.id}}}),E.success(o("common.succeeded")),f.run(),g()})},v)},m=(p,v)=>{i.open({title:o("securityRule.delete.title"),content:o("securityRule.delete.description"),confirmButtonText:o("common.confirm"),confirmButtonProps:{color:"error"},cancelButtonText:o("common.cancel"),onConfirm(R){W(async()=>{await n.deleteBlockletSecurityRule({input:{did:r,id:v.id}}),E.success(o("common.succeeded")),f.run(),R()})}})},a={sort:!1,download:!1,filter:!1,print:!1,search:!1,viewColumns:!1,expandableRowsOnClick:!0,searchDebounceTime:600,onRowClick(p,{dataIndex:v},R){if(u.current?.contains(R.target)){const g=x[v];d.current.open(void 0,g)}},setRowProps:(p,v)=>x[v]._disabled?{title:o("securityRule.useless"),style:{backgroundColor:l.palette.action.disabledBackground,cursor:"default"}}:{}},j=[e.jsx($,{size:"small",variant:"outlined",onClick:()=>{f.run()},sx:{mr:1},children:o("common.refresh")},"refresh"),e.jsx($,{size:"small",variant:"contained",onClick:S,children:o("common.add")})],z=[{label:o("securityRule.form.pathPattern"),name:"pathPattern",options:{customBodyRenderLite(p){const v=x[p];return e.jsx(P,{sx:{whiteSpace:"nowrap"},children:v.id===T.SECURITY_RULE_DEFAULT_ID?"Default":Je(H(v.componentDid),v.pathPattern)})}}},{label:o("responseHeaderPolicy.title"),name:"responseHeaderPolicy",options:{customBodyRenderLite(p){return x[p].responseHeaderPolicy?.name}}},{label:o("accessPolicy.title"),name:"accessPolicyId",options:{customBodyRenderLite(p){return x[p].accessPolicy?.name}}},{label:o("securityRule.form.remark"),name:"remark"},{label:o("common.actions"),name:"",width:100,align:"center",verticalKeyAlign:"center",options:{customBodyRenderLite(p){const v=x[p],R=h(v);return e.jsx(we,{disableEdit:v._disabled,disableSwitch:v._disabled,enabled:v.enabled,showSwitch:!R,showDelete:!R,showUp:p>0&&!R,showDown:p<I.length-1&&!R,onClickSwitch:g=>{B(g,v)},onClickUp:g=>{A(g,v,p)},onClickDown:g=>{D(g,v,p)},onClickEdit:g=>{b(g,v)},onClickDelete:g=>{m(g,v)}})}}}].filter(Boolean);return e.jsxs(P,{sx:{display:"flex",flexDirection:"column",gap:2},ref:u,children:[e.jsx(de,{verticalKeyWidth:100,locale:t,title:e.jsxs(P,{sx:{display:"flex",alignItems:"center",gap:1},children:[o("securityRule.title")," ",e.jsx(Fe,{variant:"body2",children:o("securityRule.sortByDescription")})]}),data:x,columns:z,customButtons:j,options:a,loading:f.loading}),e.jsx(He,{ref:d}),s]})}const Re={width:24,height:24,body:'<path fill="currentColor" d="M5 21q-.825 0-1.413-.588T3 19V5q0-.825.588-1.413T5 3h14q.825 0 1.413.588T21 5v14q0 .825-.588 1.413T19 21H5Zm0-2h14V7H5v12Zm7-2q-2.05 0-3.663-1.113T6 13q.725-1.775 2.337-2.888T12 9q2.05 0 3.663 1.113T18 13q-.725 1.775-2.337 2.888T12 17Zm0-2.5q-.625 0-1.063-.438T10.5 13q0-.625.438-1.063T12 11.5q.625 0 1.063.438T13.5 13q0 .625-.438 1.063T12 14.5Zm0 1q1.05 0 1.775-.725T14.5 13q0-1.05-.725-1.775T12 10.5q-1.05 0-1.775.725T9.5 13q0 1.05.725 1.775T12 15.5Z"/>'};function Te({value:o,onChange:t,...c}){const n="roles",r="roles_reverse",{t:l,locale:d}=Z(),u=[...Se,{value:n,icon:Ne,title:{zh:"指定通行证可访问",en:"Accessible to selected passports"},description:{zh:"只有指定的通行证可以访问",en:"Only specified passports can access"}},{value:r,icon:Le,title:{zh:"指定通行证不可以访问",en:"Accessible to not selected passports"},description:{zh:"只有指定的通行证不可以访问",en:"Only specified passports can't access"}}];return e.jsx(_,{...c,label:l("blocklet.config.access.description"),select:!0,fullWidth:!0,value:o,onChange:t,slotProps:{select:{renderValue:i=>{const s=u.find(f=>f.value===i);return s?e.jsxs(P,{children:[e.jsx(P,{component:s.icon,sx:{mr:1,fontSize:18,verticalAlign:"text-bottom",color:"text.secondary"}}),s.title[d]||s.title.en]}):null}}},children:u.map(i=>e.jsxs(Ve,{value:i.value,sx:{display:"block","& .tip":{fontSize:"12px",color:`${({theme:s})=>s.palette.text.secondary}`}},children:[e.jsxs(P,{sx:{display:"flex",alignItems:"center"},children:[e.jsx(P,{component:i.icon,sx:{mr:1,fontSize:18,verticalAlign:"text-bottom",color:"text.secondary"}}),e.jsx(P,{children:i.title[d]||i.title.en})]}),e.jsx(P,{className:"tip",children:i.description[d]||i.description.en})]}))})}Te.propTypes={value:y.string,onChange:y.func};const ke=o=>{const t={name:o.name,description:o.description},{roles:c=null,reverse:n}=o;return c===null?n===!1&&(t.whoCanAccess=T.WHO_CAN_ACCESS.ALL,t.roles=null):c.length===0&&n===!0?(t.whoCanAccess=T.WHO_CAN_ACCESS.INVITED,t.roles=[]):xe(c,[T.WHO_CAN_ACCESS.OWNER])&&n===!1?(t.whoCanAccess=T.WHO_CAN_ACCESS.OWNER,t.roles=[T.WHO_CAN_ACCESS.OWNER]):xe(c,[T.WHO_CAN_ACCESS.OWNER,T.WHO_CAN_ACCESS.ADMIN])&&n===!1?(t.whoCanAccess=T.WHO_CAN_ACCESS.ADMIN,t.roles=[T.WHO_CAN_ACCESS.OWNER,T.WHO_CAN_ACCESS.ADMIN]):(t.whoCanAccess=n?"roles_reverse":"roles",t.roles=c),t},ro=o=>{const t={name:o.name,description:o.description},{roles:c=null,whoCanAccess:n}=o;return n==="roles"?(t.roles=c,t.reverse=!1):n==="roles_reverse"?(t.roles=c,t.reverse=!0):n===T.WHO_CAN_ACCESS.ALL?(t.roles=null,t.reverse=!1):n===T.WHO_CAN_ACCESS.INVITED?(t.roles=[],t.reverse=!0):n===T.WHO_CAN_ACCESS.OWNER?(t.roles=[T.WHO_CAN_ACCESS.OWNER],t.reverse=!1):n===T.WHO_CAN_ACCESS.ADMIN&&(t.roles=[T.WHO_CAN_ACCESS.OWNER,T.WHO_CAN_ACCESS.ADMIN],t.reverse=!1),t},so=o=>o instanceof Object?{origin:o.origin?{override:o.origin?.override??!0,value:o.origin?.value?.join(`
2
2
  `),smart:o.origin?.smart??!0}:void 0,methods:o.methods,allowedHeaders:o.allowedHeaders?{override:o.allowedHeaders?.override??!0,value:o.allowedHeaders?.value?.join(`
3
3
  `)}:void 0,exposedHeaders:o.exposedHeaders?{override:o.exposedHeaders?.override??!0,value:o.exposedHeaders?.value?.join(`
4
4
  `)}:void 0,maxAge:o.maxAge,optionsSuccessStatus:o.optionsSuccessStatus,preflightContinue:o.preflightContinue,credentials:o.credentials}:void 0,no=o=>o instanceof Object?{origin:{override:o.origin?.override,value:o.origin?.value?.split(`
@@ -1 +1 @@
1
- import{r as o}from"./vendor-react-x2lQvn4m.js";import{K as t}from"./index-S9T-sBWO.js";function s(){return o.useContext(t)}export{s as u};
1
+ import{r as o}from"./vendor-react-x2lQvn4m.js";import{K as t}from"./index-CDq77s86.js";function s(){return o.useContext(t)}export{s as u};