@abtnode/webapp 1.16.25-beta-e3dbef52 → 1.16.25-beta-be3a37f4
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.
- package/blocklet.js +1 -1
- package/blocklet.yml +1 -1
- package/build/asset-manifest.json +34 -32
- package/build/index.html +1 -1
- package/build/service-worker.js +1 -1
- package/build/static/js/1059.6e162d98.chunk.js +1 -0
- package/build/static/js/1294.0d2e94ed.chunk.js +1 -0
- package/build/static/js/1575.aa6c5f63.chunk.js +1 -0
- package/build/static/js/2019.2558fef7.chunk.js +1 -0
- package/build/static/js/233.87becf3a.chunk.js +1 -0
- package/build/static/js/{2842.80969a8e.chunk.js → 2842.1eebcd69.chunk.js} +1 -1
- package/build/static/js/2960.a4c9635f.chunk.js +1 -0
- package/build/static/js/{318.c745e01c.chunk.js → 318.ecb043b8.chunk.js} +2 -2
- package/build/static/js/3803.15148b1f.chunk.js +1 -0
- package/build/static/js/3930.787c608b.chunk.js +1 -0
- package/build/static/js/4296.b3d15061.chunk.js +1 -0
- package/build/static/js/4423.da2620a9.chunk.js +1 -0
- package/build/static/js/4465.0cc40dce.chunk.js +1 -0
- package/build/static/js/{6490.29c409f4.chunk.js → 4509.f22f0238.chunk.js} +2 -2
- package/build/static/js/4549.06c2fd1f.chunk.js +1 -0
- package/build/static/js/{9646.c6adee42.chunk.js → 4852.5da43bce.chunk.js} +1 -1
- package/build/static/js/5748.a89331a1.chunk.js +1 -0
- package/build/static/js/6230.16addc8e.chunk.js +1 -0
- package/build/static/js/6472.2c5056ae.chunk.js +2 -0
- package/build/static/js/{3674.faf3a2e9.chunk.js.LICENSE.txt → 6472.2c5056ae.chunk.js.LICENSE.txt} +0 -2
- package/build/static/js/6511.7c767ea5.chunk.js +1 -0
- package/build/static/js/6706.134ef362.chunk.js +2 -0
- package/build/static/js/6706.134ef362.chunk.js.LICENSE.txt +1 -0
- package/build/static/js/6743.e0b3dc71.chunk.js +2 -0
- package/build/static/js/6906.73c16873.chunk.js +1 -0
- package/build/static/js/6931.61297d93.chunk.js +1 -0
- package/build/static/js/6944.50b5e54e.chunk.js +1 -0
- package/build/static/js/8170.7d39c62a.chunk.js +1 -0
- package/build/static/js/8590.fcb1c27a.chunk.js +1 -0
- package/build/static/js/9132.43a3ec2a.chunk.js +1 -0
- package/build/static/js/9586.dab3f0ad.chunk.js +1 -0
- package/build/static/js/9590.3877fd54.chunk.js +2 -0
- package/build/static/js/main.e2907b63.js +2 -0
- package/build/static/js/{main.5e9a9632.js.LICENSE.txt → main.e2907b63.js.LICENSE.txt} +3 -3
- package/package.json +1 -1
- package/build/static/js/1059.47c68713.chunk.js +0 -1
- package/build/static/js/1575.7c51888f.chunk.js +0 -1
- package/build/static/js/2019.b2fd5835.chunk.js +0 -1
- package/build/static/js/233.6633c4f0.chunk.js +0 -1
- package/build/static/js/2960.ac6f7a4e.chunk.js +0 -1
- package/build/static/js/3674.faf3a2e9.chunk.js +0 -2
- package/build/static/js/3803.c0312e3c.chunk.js +0 -1
- package/build/static/js/3930.bfa70d11.chunk.js +0 -1
- package/build/static/js/4423.bd20b413.chunk.js +0 -1
- package/build/static/js/4465.0f74e0ab.chunk.js +0 -1
- package/build/static/js/4549.b6be8e74.chunk.js +0 -1
- package/build/static/js/5672.066bb632.chunk.js +0 -1
- package/build/static/js/5748.2d3e72b1.chunk.js +0 -1
- package/build/static/js/5887.aada06d9.chunk.js +0 -2
- package/build/static/js/6230.e3bb9a7d.chunk.js +0 -1
- package/build/static/js/6281.0309a9fe.chunk.js +0 -2
- package/build/static/js/6511.d9a32267.chunk.js +0 -1
- package/build/static/js/6906.44480f01.chunk.js +0 -1
- package/build/static/js/6931.d2496fd4.chunk.js +0 -1
- package/build/static/js/6944.4c8d8699.chunk.js +0 -1
- package/build/static/js/8170.7bcdd129.chunk.js +0 -1
- package/build/static/js/8590.f6ea2144.chunk.js +0 -1
- package/build/static/js/9132.edb81af8.chunk.js +0 -1
- package/build/static/js/9586.ce440947.chunk.js +0 -1
- package/build/static/js/main.5e9a9632.js +0 -2
- /package/build/static/css/{3674.b61738f8.chunk.css → 6472.b61738f8.chunk.css} +0 -0
- /package/build/static/js/{318.c745e01c.chunk.js.LICENSE.txt → 318.ecb043b8.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{5887.aada06d9.chunk.js.LICENSE.txt → 4509.f22f0238.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{6281.0309a9fe.chunk.js.LICENSE.txt → 6743.e0b3dc71.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{6490.29c409f4.chunk.js.LICENSE.txt → 9590.3877fd54.chunk.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[6511],{86511:(e,t,n)=>{n.r(t),n.d(t,{default:()=>ne});var a=n(71171),i=n(5057),o=n(33518),l=n(85493),s=n(15849),c=n(68420),r=n(11750),d=n(39434),u=n(39948),p=n(1340),m=n(94464),v=n(88574),h=n(28726),g=n(38242),b=n(81010),f=n(87363),y=(n(5892),n(86229)),k=n(1722),x=n(35432),w=n(22425),P=n(58238),j=n(29054),S=n(73545),B=n(14491),Z=n(4651),C=n(96266);const E=e=>{const t={};let n=null;return(0,g.forEachBlockletSync)(e,(e=>{t[e.meta.bundleDid]?n=(0,g.getDisplayName)(e,!0):e.meta.bundleDid&&(t[e.meta.bundleDid]=!0)})),n},L=(e,t,n)=>{const{hostname:a,href:i}=e;if(!t)return i;if(n){var o;const e=/\d+[-.]\d+[-.]\d+[-.]\d+/.exec(a);if(!e)return i;const n=e[0],l=(((null===(o=t.site)||void 0===o?void 0:o.domainAliases)||[]).map((e=>e.value)).filter(Boolean).find((e=>e.endsWith(x.DEFAULT_DID_DOMAIN)))||"").replace(".".concat(x.DEFAULT_DID_DOMAIN),"");return l?i.replace(a,"".concat(l,"-").concat(n,".").concat(x.DEFAULT_IP_DOMAIN_SUFFIX)):i}return i.replace(t.meta.bundleDid,t.appPid)};function _(){const{t:e}=(0,c.PE)(),{api:t}=(0,S.T)(),{blocklet:n}=(0,j.y0)(),{inService:a}=(0,P.h6)(),[o,l]=(0,i.useState)(!1),[s,r]=(0,i.useState)(5),d=n&&n.structVersion!==x.APP_STRUCT_VERSION;return[d&&(0,C.jsxs)(v.Z,{type:"warning",style:{margin:"12px 0"},children:[(0,C.jsxs)(u.Z,{display:"flex",alignItems:"center",children:[(0,C.jsx)(h.Z,{variant:"contained",size:"small",color:"primary",onClick:()=>(()=>{try{if("running"===n.status)return void y.Z.error(e("blocklet.migrate.tip.running"));const t=E(n);if(t)return void y.Z.error(e("blocklet.migrate.tip.duplicate",{name:t}));l(!0)}catch(t){y.Z.error((0,B.Z)(t))}})(),style:{marginRight:8},children:e("blocklet.migrate.intro.l1")}),(0,C.jsx)("span",{children:e("blocklet.migrate.intro.l2")})]}),["l3","l4","l5","l6"].map((t=>(0,C.jsx)(u.Z,{display:"flex",alignItems:"center",children:e("blocklet.migrate.intro.".concat(t))},t)))]},"alert"),n&&(0,C.jsx)(w.Z,{popup:!0,open:o,saveConnect:!1,forceConnected:!1,action:"migrate-app-to-struct-v2",checkFn:t.get,checkTimeout:3e5,onSuccess:()=>{const e=L(window.location,n,a);setTimeout((()=>{window.location.href=e}),5e3),r(5),setInterval((()=>{r((e=>e-1))}),1e3)},extraParams:{appDid:n.appDid,did:n.meta.did,wt:(0,Z.iK)(n,!0),title:(0,g.getDisplayName)(n)},messages:{title:e("blocklet.migrate.title"),scan:e("blocklet.migrate.scan"),confirm:e("blocklet.migrate.confirm"),success:s>=0?e("blocklet.migrate.success",{sec:s}):"Redirecting..."},onClose:()=>l(!1)},"connect")]}_.propTypes={};var D,A=n(35966),N=n(85531),G=n(44846),U=n(78123),T=n(75793),I=n(17022),O=n(21289),K=n(74094),z=n(7199);const R=(0,i.lazy)((()=>Promise.all([n.e(7718),n.e(7020),n.e(4549)]).then(n.bind(n,64549)))),F=(0,i.lazy)((()=>Promise.all([n.e(7718),n.e(7020),n.e(8537),n.e(4631),n.e(2294),n.e(6547),n.e(9085),n.e(5760),n.e(506),n.e(2362),n.e(4852),n.e(4509),n.e(6230)]).then(n.bind(n,64558)))),M=(0,i.lazy)((()=>Promise.all([n.e(7718),n.e(7020),n.e(4631),n.e(6547),n.e(6743),n.e(506),n.e(4852),n.e(1294),n.e(3555),n.e(4775)]).then(n.bind(n,14775)))),V=(0,i.lazy)((()=>Promise.all([n.e(7718),n.e(442),n.e(9662),n.e(7676),n.e(8986)]).then(n.bind(n,13239)))),Y=(0,i.lazy)((()=>Promise.all([n.e(7718),n.e(7020),n.e(5745),n.e(9725),n.e(5374),n.e(592),n.e(5979),n.e(2537)]).then(n.bind(n,75979)))),$=(0,i.lazy)((()=>Promise.all([n.e(7718),n.e(7020),n.e(8537),n.e(4631),n.e(2294),n.e(6547),n.e(9085),n.e(5760),n.e(6743),n.e(6706),n.e(9590),n.e(4296),n.e(3216)]).then(n.bind(n,75672)))),W=(0,i.lazy)((()=>Promise.all([n.e(7718),n.e(7020),n.e(8537),n.e(4631),n.e(2294),n.e(9085),n.e(4901),n.e(1685),n.e(5015)]).then(n.bind(n,85555)))),X=(0,i.lazy)((()=>Promise.all([n.e(7718),n.e(7020),n.e(8537),n.e(4631),n.e(2294),n.e(9085),n.e(2911),n.e(4901),n.e(5745),n.e(442),n.e(5526),n.e(9725),n.e(7638),n.e(1685),n.e(7657),n.e(3135),n.e(406),n.e(1846),n.e(318)]).then(n.bind(n,20318)))),J=(0,i.lazy)((()=>Promise.all([n.e(7718),n.e(9327),n.e(8219)]).then(n.bind(n,92379)))),Q=(0,i.lazy)((()=>Promise.all([n.e(7718),n.e(7020),n.e(8537),n.e(4631),n.e(2294),n.e(6547),n.e(9085),n.e(5760),n.e(7534)]).then(n.bind(n,87534)))),q=(0,i.lazy)((()=>Promise.all([n.e(7718),n.e(7020),n.e(4901),n.e(4232),n.e(2611)]).then(n.bind(n,42611)))),H=(0,i.lazy)((()=>Promise.all([n.e(7718),n.e(7020),n.e(8537),n.e(4631),n.e(2294),n.e(6547),n.e(9085),n.e(5760),n.e(406),n.e(1846),n.e(9552)]).then(n.bind(n,39552)))),ee=e=>{let{children:t}=e;return t};function te(){var e;const t=(0,l.useNavigate)(),{tab:n="overview"}=(0,l.useParams)(),{did:a,blocklet:o,error:w,client:P,actions:{setBlocklet:j,refreshBlocklet:S}}=(0,O.y0)(),{refresh:B}=(0,T.h6)(),{t:Z}=(0,c.PE)(),E=(0,i.useCallback)((()=>(0,C.jsx)(V,{scope:a})),[a]),L=(null===o||void 0===o||null===(e=o.environments.find((e=>"BLOCKLET_APP_URL"===e.key)))||void 0===e?void 0:e.value)||window.location.origin,D=e=>(0,K.bV)(e,L),N=e=>{t("/blocklets/".concat(a,"/").concat(e))},te=e=>{e&&j(e),S()},ne=!o||(0,K.wS)(o.status)?[]:(0,g.getAppMissingConfigs)(o);let ie=null;const oe=[{label:Z("common.overview"),value:"overview"},{breadcrumbsLabel:Z("common.components"),label:(0,C.jsx)(p.Z,{color:"error",variant:"dot",invisible:!ne.length,children:Z("common.components")}),value:"components"}];if(w)ie=(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(v.Z,{type:"error",variant:"icon",children:(0,K.Z)(w)}),(0,C.jsx)(h.Z,{onClick:()=>S(),children:(0,C.jsx)("span",{style:{textDecoration:"underline"},children:Z("common.retry")})})]});else if(o){var le;const e={overview:(0,C.jsx)(R,{}),configuration:F,navigation:M,services:W,members:(0,C.jsx)($,{type:"blocklet",createPassportSvg:D}),passports:Y,components:X,"audit-logs":E,logs:J,runtime:(0,C.jsx)(Q,{}),traffic:(0,C.jsx)(q,{client:P,did:a}),storage:(0,C.jsx)(H,{})};"configuration"===n&&(0,K.wS)(o.status)&&N("overview"),(0,K.wS)(o.status)||(oe.push({label:Z("common.members"),value:"members"}),oe.push({label:Z("common.passport"),value:"passports"}),oe.push({label:Z("common.configuration"),value:"configuration"})),oe.push({label:Z("common.auditLogs"),value:"audit-logs"}),o&&null!==(le=o.children)&&void 0!==le&&le.length&&o.structVersion===x.APP_STRUCT_VERSION&&oe.push({label:Z("common.logs"),value:"logs"}),oe.push({label:Z("common.configNavigation"),value:"navigation"}),oe.push({label:Z("common.runtime"),value:"runtime"}),oe.push({label:Z("common.traffic"),value:"traffic"}),oe.push({label:Z("common.storage"),value:"storage"});(0,g.getBlockletServices)(o).length&&oe.splice(2,0,{label:Z("blocklet.services"),value:"services"});const t=e[n]||e.overview;ie=(0,C.jsxs)(f.g,{type:"components",children:[!(0,g.isExternalBlocklet)(o)&&(0,C.jsx)(m.Z,{tabs:oe,current:n,onChange:N,scrollButtons:"auto"}),(0,C.jsx)("div",{className:"page-content",children:(0,C.jsx)(i.Suspense,{fallback:(0,C.jsx)(A.Z,{relative:"parent",children:(0,C.jsx)(G.Z,{})}),children:(0,i.isValidElement)(t)?t:(0,C.jsx)(t,{blocklet:o,onUpdate:te,createPassportSvg:D})})})]})}else ie=(0,C.jsx)(A.Z,{relative:"parent",children:(0,C.jsx)(G.Z,{})});const se=oe.find((e=>e.value===n)),ce=o?I.G6:ee;return(0,C.jsx)(ce,{teamDid:a,children:(0,C.jsxs)(ae,{children:[(0,C.jsxs)(d.Z,{separator:"\u203a","aria-label":"breadcrumb",className:"page-breadcrumb",children:[(0,C.jsx)(s.Link,{color:"textSecondary",to:"/blocklets",children:Z("common.blocklets")}),(0,C.jsx)(s.NavLink,{to:"/blocklets/".concat(a,"/overview"),style:e=>e?{color:"inherit"}:{},children:Z("common.detail")}),(0,C.jsx)(r.Z,{color:"textSecondary",children:se?se.breadcrumbsLabel||se.label:""})]}),(0,C.jsxs)(r.Z,{component:"div",className:"page-header",children:[(0,C.jsxs)(r.Z,{component:"h2",variant:"h4",className:"page-title",color:"textPrimary",children:[o?(0,C.jsx)(k.Z,{blocklet:o,style:{marginRight:16}}):null,o?(0,C.jsxs)(u.Z,{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,children:[(0,C.jsx)(u.Z,{children:(0,g.getDisplayName)(o)}),"unknown"!==(null===o||void 0===o?void 0:o.status)&&(0,C.jsx)(b.Z,{size:"12px",status:o.status,source:o.source,progress:o.progress})]}):"".concat(Z("common.blocklet")," ").concat(Z("common.detail"))]}),(0,C.jsx)(z.Z,{permission:"mutate_blocklets",children:!!o&&!(0,g.isExternalBlocklet)(o)&&(0,C.jsx)(U.Z,{className:"page-actions",blocklet:o,onStart:()=>{},onComplete:e=>{let{action:n,error:a}=e;a?y.Z.error(a.message):"remove"===n?(B(),t("/blocklets")):S()},variant:"group"})})]}),(0,C.jsx)(_,{}),ie]})})}function ne(){const{did:e}=(0,l.useParams)();return e?(0,C.jsx)(O.$8,{did:e,children:(0,C.jsx)(N.wV,{children:(0,C.jsx)(te,{})})}):null}const ae=o.Z.main(D||(D=(0,a.Z)(["\n .page-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n flex-wrap: wrap;\n gap: 16px;\n }\n\n .page-title {\n display: flex;\n align-items: center;\n\n .page-link {\n font-size: 15px;\n margin-top: 8px;\n margin-left: 8px;\n }\n }\n\n .page-content {\n margin-top: 16px;\n }\n\n @media (max-width: ","px) {\n .page-header {\n flex-direction: column;\n align-items: flex-start;\n .page-actions,\n .MuiButtonGroup-root {\n width: 100%;\n }\n .MuiButtonGroup-root {\n .MuiButtonBase-root {\n flex: 1;\n }\n .blocklet-action-text {\n display: none;\n }\n }\n }\n\n .page-title {\n margin-bottom: 15px;\n }\n }\n"])),(e=>e.theme.breakpoints.values.md))},85531:(e,t,n)=>{n.d(t,{wV:()=>w,XN:()=>P});var a=n(5057),i=n(55898),o=n.n(i),l=n(86229),s=n(68420),c=n(77277),r=n(29054),d=n(84584),u=n(41899),p=n(58238),m=n(65873);var v=n(14491);function h(){var e;let{setLoading:t,refresh:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{blocklet:i,actions:{refreshBlocklet:o}}=(0,r.y0)(),s=null===i||void 0===i||null===(e=i.meta)||void 0===e?void 0:e.did,[c,h]=(0,a.useState)([]),{api:g}=(0,p.h6)();return(0,u.Z)((async()=>{try{if(!s)return void h([]);null===t||void 0===t||t(!0);const{spaceGateways:e}=await g.getBlockletSpaceGateways({input:{did:s}}),n=await async function(e){let{blockletDid:t,nodeApi:n,spaceGateways:a}=e,i=!1;const o=await Promise.all(a.map((async e=>{let{name:t}=e;const n=await(0,d.nU)(e.endpoint);return(0,m.isEmpty)(n)||n===t||(t=n,i=!0),{...e,name:t}})));return i&&await Promise.all(o.filter((e=>e.did)).map((e=>n.updateBlockletSpaceGateway({input:{did:t,where:{did:e.did},spaceGateway:{...e}}})))),o}({blockletDid:s,nodeApi:g,spaceGateways:e});h(null!==n&&void 0!==n?n:[])}catch(e){console.error(e),l.Z.error((0,v.Z)(e))}finally{null===t||void 0===t||t(!1)}}),[s,o,n]),{spaceGateways:c}}function g(){var e;let{deps:t,setLoading:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{deps:[],setLoading:()=>{}};const{blocklet:i}=(0,r.y0)(),[o,s]=(0,a.useState)([]),{api:c}=(0,p.h6)(),d=(0,m.debounce)((async()=>{try{if(n(!0),!i)return void s([]);const{backups:e}=await c.getBlockletBackups({input:{did:i.meta.did}});s(null!==e&&void 0!==e?e:[])}catch(e){console.error(e),l.Z.error((0,v.Z)(e))}finally{n(!1)}}),2e3);return(0,u.Z)((async()=>{d()}),[null===i||void 0===i||null===(e=i.meta)||void 0===e?void 0:e.did].concat(t)),{backups:o}}const b=function(e){let{appDid:t}=e;const{backups:n}=g(),[i,o]=(0,a.useState)({message:"",progress:0,completed:!1}),l=(0,p.h6)(),{ws:{useSubscription:s}}=l;return s(c.BlockletEvents.backupProgress,(e=>{t===(null===e||void 0===e?void 0:e.appDid)&&o((()=>({...e})))}),[t]),(0,a.useEffect)((()=>{var e;if(null!==n&&void 0!==n&&n.length&&(0,m.isNull)(null===(e=n[0])||void 0===e?void 0:e.status)){const[e]=n;o((()=>({message:e.message,progress:e.progress,completed:Boolean(e.progress>=100)})))}}),[n]),i};var f=n(96266);const y=(0,a.createContext)({}),{Provider:k,Consumer:x}=y;function w(e){let{children:t}=e;const{t:n}=(0,s.PE)(),{api:i}=(0,p.h6)(),{blocklet:o}=(0,r.y0)(),[m,v]=(0,a.useState)(!1),[y,x]=(0,a.useState)(!1),{spaceGateways:w}=h({refresh:y,setLoading:v}),P=b({appDid:null===o||void 0===o?void 0:o.appDid}),[j,S]=(0,a.useState)(!1),B=(0,a.useMemo)((()=>(0,d.mo)(null===o||void 0===o?void 0:o.environments)),[o,y,j]),[Z,C]=(0,a.useState)(!1),{backups:E}=g({deps:[P],setLoading:C}),[L,_]=(0,a.useState)(null===w||void 0===w?void 0:w.find((e=>e.endpoint===B))),[D,A]=(0,a.useState)(!1),N=function(){var e;let{deps:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{deps:[]};const{blocklet:n}=(0,r.y0)(),{api:i}=(0,p.h6)(),[o,l]=(0,a.useState)(null);return(0,u.Z)((async()=>{var e;if(null!==n&&void 0!==n&&null!==(e=n.meta)&&void 0!==e&&e.did){const{autoBackup:e}=await i.getAutoBackup({input:{did:n.meta.did}});l(e)}}),[null===n||void 0===n||null===(e=n.meta)||void 0===e?void 0:e.did].concat(t)),o}({deps:[D]}),[G,U]=(0,a.useState)(!1),T=function(){var e;let{deps:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{deps:[]};const{blocklet:n}=(0,r.y0)(),{api:i}=(0,p.h6)(),[o,l]=(0,a.useState)(null);return(0,u.Z)((async()=>{var e;if(null!==n&&void 0!==n&&null!==(e=n.meta)&&void 0!==e&&e.did){const{autoCheckUpdate:e}=await i.getAutoCheckUpdate({input:{did:n.meta.did}});l(e)}}),[null===n||void 0===n||null===(e=n.meta)||void 0===e?void 0:e.did].concat(t)),o}({deps:[G]}),I=()=>{x((e=>!e))};return(0,f.jsx)(k,{value:{spaceGateways:w,selectedSpaceGateway:L,addSpaceGateway:async(e,t)=>{w.push({...e,loading:!0}),await i.addBlockletSpaceGateway({input:{did:o.meta.did,spaceGateway:e}}),B!==t&&await i.configBlocklet({input:{did:[o.meta.did],configs:[{key:c.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:t}]}}),I(),_(e)},deleteSpaceGateway:async e=>{e&&(e.endpoint!==B?(await i.deleteBlockletSpaceGateway({input:{did:o.meta.did,spaceGatewayDid:null===e||void 0===e?void 0:e.did}}),I(),_(e)):l.Z.warning(n("storage.spaces.gateway.delete.failedForConnected")))},updateSpaceGateway:async e=>{var t;await i.updateBlockletSpaceGateway({input:{did:o.meta.did,where:{did:e.did},spaceGateway:e}}),B!==e.endpoint&&await i.configBlocklet({input:{did:[o.meta.did],configs:[{key:c.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:e.endpoint}]}}),l.Z.success(n("storage.spaces.connectedWithName",{name:null!==(t=null===e||void 0===e?void 0:e.name)&&void 0!==t?t:"DID Spaces"})),I()},refreshSpaceGateways:I,spaceGatewaysLoading:m,spaceGatewayIsSelected:e=>(null===e||void 0===e?void 0:e.endpoint)===B,updateAutoBackup:async e=>{await i.updateAutoBackup({input:{did:o.meta.did,autoBackup:e}}),A((e=>!e))},updateAutoCheckUpdate:async e=>{await i.updateAutoCheckUpdate({input:{did:o.meta.did,autoCheckUpdate:e}}),U((e=>!e))},autoCheckUpdate:T,backupEndpoint:B,backupProgress:P,backups:E,backupsLoading:Z,refreshBackupEndpoint:()=>{S((e=>!e))},autoBackup:N},children:t})}function P(){return(0,a.useContext)(y)}w.propTypes={children:o().any.isRequired},w.defaultProps={}},60344:(e,t,n)=>{n.d(t,{hi:()=>o,od:()=>i.a});var a=n(10458),i=n.n(a);i().defaults.timeout=1e4;const o=i().create()},84584:(e,t,n)=>{n.d(t,{EJ:()=>f,Jf:()=>b,LQ:()=>u,Nb:()=>p,UV:()=>y,Xv:()=>r,Z3:()=>k,ag:()=>v,mo:()=>m,nD:()=>d,nU:()=>g,w2:()=>h});var a=n(82434),i=n.n(a),o=n(77277),l=n(65873),s=n(2842),c=n(60344);function r(e){const t=e.replace(/\/api\/space\/.+/,""),n=e.replace(/\/$/,"").split("/"),a=n.at(-4),i=n.at(-2);return(0,s.xn)(t,"space",a,"apps",i,"explorer?key=/apps/".concat(i,"/.did-objects/").concat(i,"/"))}function d(e){const t=e.replace(/\/api\/space\/.+/,""),n=e.replace(/\/$/,"").split("/").at(-4);return(0,s.xn)(t,"space",n)}function u(e){return e.replace(/\/$/,"").split("/").at(-4)}async function p(e){try{if(!i()(e))return!1;const{headers:t}=await c.hi.head(e,{timeout:5e3});return"true"===t["x-listable"]&&"true"===t["x-readable"]&&"true"===t["x-writeable"]}catch(t){return console.error(t),!1}}function m(e){var t;return(null===e||void 0===e||null===(t=e.find((e=>e.key===o.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT)))||void 0===t?void 0:t.value)||""}function v(e){const t=new URL(e);return(0,s.xn)(t.origin,t.pathname)}async function h(e){try{if(!i()(e))return!1;const t=v(e),n=(0,s.xn)(t,"space/api/did/one-click-authorization/token"),{status:a,data:o}=await c.hi.get(n,{timeout:5e3});return 200===a&&(0,l.isObject)(o)}catch(t){return console.error(t),!1}}async function g(e){let{timeout:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{timeout:3e3};try{if(!i()(e))return"";const{headers:n}=await c.hi.head(e,{timeout:t}),a=n["x-space-name"];return a?decodeURIComponent(a):""}catch(n){return console.error(n),""}}function b(e){const t=e.replace(/\/api\/space\/.+/,""),n=e.replace(/\/$/,"").split("/").at(-4);return(0,s.xn)(t,"/api/space/nft/display?spaceDid=".concat(n))}const f=e=>{var t,n;return(null===e||void 0===e||null===(t=e.configs)||void 0===t||null===(n=t.find((e=>e.key===o.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT)))||void 0===n?void 0:n.value)||null};async function y(e){const t={};return t.did=u(e),t.name=await g(e),t.url=function(e){return null===e||void 0===e?void 0:e.replace(/\/api\/space\/.+/,"")}(e),t.endpoint=e,t}async function k(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{timeout:3e4,withSearchParams:!0};if(!(0,l.isString)(e))throw new Error("url(".concat(e,") must be a string"));const a=e.startsWith("http")?e:"https://".concat(e),i=new URL(a),{data:o}=await c.hi.get((0,s.xn)(i.origin,"/__blocklet__.js?type=json"),{timeout:n.timeout}),r=null===(t=o.componentMountPoints.findLast((e=>"z8iZnaYxnkMD5AKRjTKiCb8pQr1ut8UantAcf"===e.did)))||void 0===t?void 0:t.mountPoint;if(!r)throw new Error("MountPoint(".concat(r,") not found"));const d=(0,s.xn)(i.origin,r);return n.withSearchParams&&i.searchParams.get("spaceDid")?(0,s.xn)(d,"?spaceDid=".concat(i.searchParams.get("spaceDid"))):d}}}]);
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 6706.134ef362.chunk.js.LICENSE.txt */
|
|
2
|
+
(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[6706],{87806:(e,i,t)=>{"use strict";i.Z=void 0;(n=t(5057))&&n.__esModule;var n,o=t(96266);function r(e,i){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);i&&(n=n.filter((function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable}))),t.push.apply(t,n)}return t}function s(e){for(var i=1;i<arguments.length;i++){var t=null!=arguments[i]?arguments[i]:{};i%2?r(Object(t),!0).forEach((function(i){a(e,i,t[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):r(Object(t)).forEach((function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))}))}return e}function a(e,i,t){return(i=function(e){var i=function(e,i){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,i||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===i?String:Number)(e)}(e,"string");return"symbol"==typeof i?i:String(i)}(i))in e?Object.defineProperty(e,i,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[i]=t,e}var l=function(e){return(0,o.jsx)("svg",s(s({},e),{},{children:(0,o.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.25 10a6.75 6.75 0 1 1 13.5 0 6.75 6.75 0 0 1-13.5 0zM10 1.75a8.25 8.25 0 1 0 0 16.5 8.25 8.25 0 0 0 0-16.5zM8.03 6.97a.75.75 0 0 0-1.06 1.06l5 5a.75.75 0 1 0 1.06-1.06l-5-5z"})}))};l.defaultProps={width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},l.displayName="revoke";i.Z=l},12049:(e,i,t)=>{"use strict";t.d(i,{qY:()=>_,YZ:()=>be});t(1192),t(2484),t(5873),t(79787);var n=t(96266),o=t(47220),r=t(76223),s=t(68420),a=t(11337),l=t(43907),c=t(55498),d=t(13727),u=t(72113),p=t(7469),m=t(25228),f=t(39948),b=t(67680),w=t(99360),h=t(55898),g=t.n(h),v=t(5057),x=t(56556);function y(e){let{optionalComponent:i,index:t,installStatus:o,hasPermission:s,t:a}=e;const l="stopped"===o||"running"===o;return(0,n.jsxs)(f.Z,{children:[0===t?null:(0,n.jsx)(f.Z,{sx:{width:"100%",height:"1px",backgroundColor:r.E.gray6}}),(0,n.jsxs)(f.Z,{sx:{padding:"20px 24px",paddingTop:.5,marginTop:2,display:"flex",flexDirection:"row",justifyContent:"start",alignItems:"flex-start"},children:[(0,n.jsx)("img",{style:{width:60,height:60,minWidth:60,minHeight:60},src:i.logoUrl,alt:i.meta.title}),(0,n.jsxs)(f.Z,{sx:{display:"flex",flexDirection:"column",justifyContent:"start",alignItems:"start",marginLeft:2},children:[(0,n.jsxs)(f.Z,{sx:{fontSize:"16px",fontWeight:"bold",cursor:"pointer",".link-icon":{opacity:0},":hover .link-icon":{opacity:1}},onClick:()=>{var e;return null===(e=i.meta)||void 0===e||e.did,void window.open(null===i||void 0===i?void 0:i.storeUrl,"_blank")},children:[i.meta.title,(0,n.jsxs)(f.Z,{sx:{paddingLeft:1,fontSize:"13px",fontWeight:"400"},component:"span",children:[i.meta.version,(0,n.jsx)(c.JO,{className:"link-icon",icon:"fluent:open-20-filled",style:{color:r.E.primaryBase,fontSize:16,transform:"translate(6px, 3px)",transition:"all 0.3s"}})]})]}),(0,n.jsx)(f.Z,{sx:{marginTop:0,opacity:.7},children:i.meta.description}),(0,n.jsx)(f.Z,{sx:{display:s?"flex":"none",flexDirection:"row",gap:1},children:o?(0,n.jsx)(f.Z,{sx:{marginTop:2,opacity:.7},children:l?(0,n.jsx)(x.Z,{variant:"contained",onClick:()=>{window.location.reload()},children:a("componentInstallerRefresh")},"refresh"):(0,n.jsx)(x.Z,{disabled:!0,sx:{color:"#333"},startIcon:(0,n.jsx)(c.JO,{icon:"line-md:loading-loop",style:{color:"#333",fontSize:16}}),variant:"contained",children:o},"status")}):(0,n.jsx)(x.Z,{sx:{marginTop:2},variant:"contained",className:"button",onClick:()=>{var e;return null===(e=i.meta)||void 0===e||e.did,void window.open(null===i||void 0===i?void 0:i.installUrl,"_blank")},children:a("componentInstallerInstall")},"install")}),l?(0,n.jsx)(f.Z,{sx:{marginTop:2,opacity:.7},children:a("componentInstallerSuccessInstalled")}):null]})]})]})}y.propTypes={t:g().func.isRequired,optionalComponent:g().object.isRequired,index:g().number.isRequired,installStatus:g().string,hasPermission:g().bool.isRequired},y.defaultProps={installStatus:""};const k={zh:{componentInstallerTitle:"\u7f3a\u5c11\u7ec4\u4ef6",componentInstallerInstall:"\u5b89\u88c5",componentInstallerClose:"\u5173\u95ed",componentInstallerRefresh:"\u91cd\u8f7d\u9875\u9762",componentInstallerSuccessInstalled:"\u5b89\u88c5\u6210\u529f\uff0c\u8bf7\u91cd\u8f7d\u9875\u9762\u67e5\u770b\u53d8\u5316\u3002",componentInstallerSuggestions:"\u8bf7\u8054\u7cfb\u7cfb\u7edf\u7ba1\u7406\u5458\u5b89\u88c5\u8be5\u7ec4\u4ef6\u3002",componentInstallerNoDefinedInBlockletYML:"\u7ec4\u4ef6\u672a\u5728 blocklet.yml \u4e2d\u5b9a\u4e49"},en:{componentInstallerTitle:"Missing component",componentInstallerInstall:"Install",componentInstallerClose:"Close",componentInstallerRefresh:"Refresh",componentInstallerSuccessInstalled:"Successfully installed, please refresh the page to see the changes.",componentInstallerSuggestions:"Please contact the system administrator to install the component.",componentInstallerNoDefinedInBlockletYML:"The component is not defined in blocklet.yml"}};var j=t(74958),S=t(6352),I=t.n(S);const O=e=>"string"===typeof e?new Set(e.split(";;")):new Set(e);const C=function(e){let{did:i,onInstalled:t,onError:n}=e;const o=Array.isArray(i)?i.join(";;"):i,[r,s]=(0,v.useState)({}),a=(0,v.useRef)({onInstalled:t,onError:n});a.current={onInstalled:t,onError:n};const{optionalComponents:l,componentMountPoints:c}=window.blocklet,d=(0,v.useMemo)((()=>{var e;if(!l||!l.length)return[];const i=O(o),t=l.filter((e=>i.has(e.meta.did)));return null===(e=t?a.current.onError:a.current.onInstalled)||void 0===e||e(t),t}),[o,l]),u=(0,v.useMemo)((()=>{if(d.length)return!0;const e=O(o);return(c||[]).find((i=>e.has(i.did)))}),[d,c,o]);return d.forEach((e=>{e.storeUrl=I()(e.meta.homepage,"blocklets",e.meta.did),e.installUrl=I()(window.blocklet.appUrl,j.Bu,"/admin/components?install-component=".concat(e.meta.did))})),(0,v.useEffect)((()=>{const e=e=>{var i,t,n;if(e.origin===window.blocklet.appUrl&&"component-installer"===(null===(i=e.data)||void 0===i?void 0:i.kind)&&null!==(t=e.data)&&void 0!==t&&null!==(n=t.blocklet)&&void 0!==n&&n.children){var r,a;let i=!1;const t=O(o);null===(r=e.data)||void 0===r||null===(a=r.blocklet)||void 0===a||a.children.forEach((e=>{var n;t.has(null===(n=e.meta)||void 0===n?void 0:n.did)&&(i=!0,s((i=>{var t;return{...i,[null===(t=e.meta)||void 0===t?void 0:t.did]:e.status||"waiting"}})))})),i||s({})}};return window.addEventListener("message",e),()=>{window.removeEventListener("message",e)}}),[o]),{optComponents:d,installed:!d.length&&u,installStatus:r,setInstallStatus:s,definedInBlockletYML:u}};function T(e){let{warnIcon:i,did:t,noPermissionMute:h,onInstalled:g,onError:x,children:j,closeByOutSize:S,onClose:I,fallback:O,disabled:T,roles:_=["owner","admin"]}=e;const{locale:Z}=(0,s.PE)(),E=(0,w.Z)((function(e){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,a.I)(k,e,Z,"en",i)})),{installed:N,optComponents:R,installStatus:P,definedInBlockletYML:A}=C({did:t,onInstalled:g,onError:x}),z=(0,v.useContext)(o.B3),B=()=>{null===I||void 0===I||I(!1)};return T?j:(0,n.jsx)(l.Z,{session:null===z||void 0===z?void 0:z.session,roles:_,children:e=>{let{hasPermission:o}=e;return N?j:h&&!o?O||null:"function"===typeof j?(0,n.jsxs)(n.Fragment,{children:[O,j({hasPermission:o,optComponents:R,installStatus:P})]}):(0,n.jsxs)(n.Fragment,{children:[O,(0,n.jsx)(u.d,{onClickAway:e=>{e.preventDefault(),e.stopPropagation(),S&&B()},children:(0,n.jsx)(p.Z,{in:!0,timeout:350,children:(0,n.jsx)(m.Z,{variant:"outlined",sx:{position:"fixed",top:20,right:20,zIndex:3e3,borderRadius:3,width:400,maxWidth:"90vw",borderColor:r.E.lineStep,border:"0 !important",fontSize:"14px",textAlign:"left",boxShadow:"0px 8px 16px 0px ".concat(r.E.gray6,", 0px 0px 0px 1px ").concat(r.E.gray6)},children:A?(0,n.jsxs)(f.Z,{sx:{display:"flex",flexDirection:"column"},children:[(0,n.jsxs)(f.Z,{sx:{padding:"20px 24px",marginLeft:0,display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start"},children:[i||(0,n.jsx)(c.JO,{icon:"mdi:warning-box",style:{color:"yellowgreen",fontSize:24}}),(0,n.jsx)(f.Z,{sx:{marginLeft:1,fontSize:"16px",fontWeight:"bold"},children:E("componentInstallerTitle")}),(0,n.jsx)(f.Z,{sx:{flex:1}}),I?(0,n.jsx)(b.Z,{variant:"outlined",className:"button",onClick:B,children:(0,n.jsx)(d.default,{})}):null]}),(0,n.jsx)(f.Z,{sx:{width:"100%",height:"1px",backgroundColor:r.E.gray6}}),(0,n.jsx)(f.Z,{sx:{maxHeight:"70vh",overflowY:"auto"},children:R.map(((e,i)=>{var t,r;return(0,n.jsx)(y,{t:E,hasPermission:o,index:i,optionalComponent:e,installStatus:P[null===(t=e.meta)||void 0===t?void 0:t.did]},(null===(r=e.meta)||void 0===r?void 0:r.did)||i)}))}),o?null:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(f.Z,{sx:{width:"100%",height:"1px",backgroundColor:r.E.gray6}}),(0,n.jsx)(f.Z,{sx:{padding:"20px 24px"},children:(0,n.jsx)(f.Z,{sx:{opacity:1},children:E("componentInstallerSuggestions")})})]})]}):(0,n.jsxs)(f.Z,{sx:{display:"flex",flexDirection:"column"},children:[(0,n.jsxs)(f.Z,{sx:{padding:"20px 24px",marginLeft:0,display:"flex",alignItems:"center",flexDirection:"row",justifyContent:"flex-start"},children:[i||(0,n.jsx)(c.JO,{icon:"mdi:warning-box",style:{color:"yellowgreen",fontSize:24}}),(0,n.jsx)(f.Z,{sx:{marginLeft:1,fontSize:"16px",fontWeight:"bold"},children:E("componentInstallerTitle")}),(0,n.jsx)(f.Z,{sx:{flex:1}}),I?(0,n.jsx)(b.Z,{variant:"outlined",className:"button",onClick:B,children:(0,n.jsx)(d.default,{})}):null]}),(0,n.jsx)(f.Z,{sx:{width:"100%",height:"1px",backgroundColor:r.E.gray6}}),(0,n.jsxs)(f.Z,{sx:{padding:"20px 24px",marginTop:0},children:[E("componentInstallerNoDefinedInBlockletYML"),": ",t]})]})})})})]})}})}function _(e){return window.blocklet?(0,n.jsx)(T,{...e}):e.children}T.propTypes={disabled:g().bool,warnIcon:g().node,did:g().oneOfType([g().string,g().arrayOf(g().string)]).isRequired,noPermissionMute:g().bool,onInstalled:g().func,onError:g().func,children:g().any.isRequired,closeByOutSize:g().bool,onClose:g().func,fallback:g().node,roles:g().array},T.defaultProps={disabled:!1,warnIcon:null,noPermissionMute:!1,onInstalled:null,onError:null,closeByOutSize:!1,onClose:null,fallback:null,roles:["owner","admin"]},_.propTypes={...T.propTypes,children:g().any.isRequired},_.defaultProps={...T.defaultProps};t(28018),t(94464),t(25710),t(28726);var Z=t(13128);t(71569),t(25842);t(23939);var E=t(49384);t(60251);var N=t(95712);t(47685),t(72966),t(92706);t(94457);var R=t(26538),P=t.n(R),A=t(87806);function z(e){let{passport:i,user:t,color:o,width:r,icon:a,children:l,createPassportSvg:c,...d}=e;const{t:u}=(0,s.PE)();return(0,n.jsxs)(f.Z,{...d,sx:{display:"flex",alignItems:"center",...null===d||void 0===d?void 0:d.sx},children:[(0,n.jsx)(f.Z,{className:"passport-item__display",dangerouslySetInnerHTML:{__html:c({title:i.title||i.name,issuer:i.issuer&&i.issuer.name,issuerDid:i.issuer&&i.issuer.id,ownerName:t.fullName,ownerDid:t.did,ownerAvatarUrl:t.avatar,revoked:i.revoked,preferredColor:o,width:r})}}),(0,n.jsxs)(f.Z,{className:"passport-item__body",sx:{p:0,ml:3,mt:0},children:[(0,n.jsxs)(f.Z,{className:"passport-item__title",sx:{display:"flex",alignItems:"center",fontWeight:400,fontSize:"16px",lineHeight:1.1875,color:"#222222"},children:[P()(i.title),(0,n.jsxs)(f.Z,{className:"passport-item__status-icon",sx:{svg:{fill:"#bfbfbf",height:"1.2em",marginLeft:"0.4em"}},children:[a,i.revoked&&(0,n.jsx)(A.Z,{})]})]}),i.expirationDate&&(0,n.jsx)(f.Z,{className:"passport-item__title",sx:{display:"flex",alignItems:"center",fontWeight:400,fontSize:"16px",lineHeight:1.1875,color:"#222222"},children:u("team.passport.validUntil",{date:i.expirationDate})}),l]})]})}z.propTypes={passport:g().any.isRequired,user:g().any.isRequired,color:g().string.isRequired,createPassportSvg:g().func.isRequired,icon:g().any,children:g().any,width:g().number},z.defaultProps={icon:null,children:null,width:150};t(35432),t(30278),t(76818);const B=(0,v.createContext)({}),{Provider:L,Consumer:M}=B;t(82790),t(86229),t(82434),t(14506),t(16967);const D=new(t(99132).x);var U=t(71171),q=(t(35966),t(33518)),W=(t(22425),t(75506),t(10458)),F=t.n(W);F().defaults.timeout=1e4;F().create();t.p;t(22256);t.p;var H;(0,q.Z)(f.Z)(H||(H=(0,U.Z)(["\n .selected-container {\n position: absolute;\n right: 0px;\n bottom: 0px;\n display: flex;\n -webkit-box-pack: end;\n justify-content: flex-end;\n align-items: flex-end;\n width: 32px;\n height: 32px;\n border-radius: 0px 0px 8px;\n color: rgb(255, 255, 255);\n overflow: hidden;\n transition: all 0.4s ease 0s;\n\n &::after {\n position: absolute;\n z-index: 0;\n left: 60px;\n top: 60px;\n display: block;\n width: 0px;\n height: 0px;\n border-width: 16px;\n border-style: solid;\n border-color: transparent #1dc1c7 #1dc1c7 transparent;\n transition: all 0.1s ease 0s;\n content: '';\n }\n\n .selected-icon {\n visibility: hidden;\n width: 60%;\n height: 60%;\n position: relative;\n z-index: 2;\n margin: 0px 1px 1px 0px;\n font-size: 16px;\n transition: all 0.2s ease 0s;\n }\n }\n\n .selected-container.selected {\n &::after {\n left: 0px;\n top: 0px;\n }\n\n .selected-icon {\n visibility: visible;\n }\n }\n"])));var V;(0,q.Z)(f.Z)(V||(V=(0,U.Z)(["\n height: 100%;\n overflow-y: auto;\n"])));var Y=t(75760),G=t(79366),J=t(93066),$=t(62219),X=t.n($),K=t(35833),Q=t.n(K),ee=t(14520);class ie extends Error{constructor(e){super(),this.name="AbortError",this.message=e}}const te=e=>void 0===globalThis.DOMException?new ie(e):new DOMException(e),ne=e=>{const i=void 0===e.reason?te("This operation was aborted."):e.reason;return i instanceof Error?i:te(i)};const oe=Symbol("skip");async function re(e,i){return async function(e,i){let{concurrency:t=Number.POSITIVE_INFINITY,stopOnError:n=!0,signal:o}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new Promise(((r,s)=>{if(void 0===e[Symbol.iterator]&&void 0===e[Symbol.asyncIterator])throw new TypeError("Expected `input` to be either an `Iterable` or `AsyncIterable`, got (".concat(typeof e,")"));if("function"!==typeof i)throw new TypeError("Mapper function is required");if(!Number.isSafeInteger(t)&&t!==Number.POSITIVE_INFINITY||!(t>=1))throw new TypeError("Expected `concurrency` to be an integer from 1 and up or `Infinity`, got `".concat(t,"` (").concat(typeof t,")"));const a=[],l=[],c=new Map;let d=!1,u=!1,p=!1,m=0,f=0;const b=void 0===e[Symbol.iterator]?e[Symbol.asyncIterator]():e[Symbol.iterator](),w=e=>{d=!0,u=!0,s(e)};o&&(o.aborted&&w(ne(o)),o.addEventListener("abort",(()=>{w(ne(o))})));const h=async()=>{if(u)return;const e=await b.next(),t=f;if(f++,e.done){if(p=!0,0===m&&!u){if(!n&&l.length>0)return void w(new AggregateError(l));if(u=!0,0===c.size)return void r(a);const e=[];for(const[i,t]of a.entries())c.get(i)!==oe&&e.push(t);r(e)}}else m++,(async()=>{try{const n=await e.value;if(u)return;const o=await i(n,t);o===oe&&c.set(t,o),a[t]=o,m--,await h()}catch(o){if(n)w(o);else{l.push(o),m--;try{await h()}catch(o){w(o)}}}})()};(async()=>{for(let i=0;i<t;i++){try{await h()}catch(e){w(e);break}if(p||d)break}})()}))}(e,(e=>e()),i)}var se=t(75239),ae=t(11750),le=t(19654);function ce(e){let{user:i,sessionUser:t}=e;const o=(0,J.Z)((()=>{var e;return null===(e=(null===i||void 0===i?void 0:i.passports)||[])||void 0===e?void 0:e.find((e=>e.name===t.role))}),[null===i||void 0===i?void 0:i.passports,null===t||void 0===t?void 0:t.role]);return(0,n.jsxs)(f.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,n.jsx)(N.Z,{size:40,variant:"circle",shape:"circle",src:t.avatar,did:t.did}),(0,n.jsxs)(f.Z,{children:[(0,n.jsxs)(f.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,n.jsx)(ae.Z,{sx:{whiteSpace:"normal",wordBreak:"break-all"},children:t.fullName}),(0,n.jsx)(le.Z,{label:(null===o||void 0===o?void 0:o.title)||(null===o||void 0===o?void 0:o.name)||"Guest",size:"small",variant:"outlined",sx:{flexShrink:0,fontWeight:"bold",fontSize:"12px",color:r.E.textBase,borderColor:r.E.strokeBorderStrong,backgroundColor:"transparent",textTransform:"capitalize",pr:1,pl:.5}})]}),(0,n.jsx)(ae.Z,{variant:"body2",color:"grey",children:t.email})]})]})}const de={zh:{confirm:"\u786e\u8ba4",cancel:"\u53d6\u6d88",visitorId:"\u8bbe\u5907\u6807\u8bc6",deviceType:"\u8bbe\u5907\u7c7b\u578b",platform:"\u64cd\u4f5c\u7cfb\u7edf",walletOS:"\u94b1\u5305\u7c7b\u578b",role:"\u89d2\u8272",fullname:"\u59d3\u540d",email:"\u90ae\u7bb1",avatar:"\u5934\u50cf",user:"\u7528\u6237",updatedAt:"\u6700\u8fd1\u6d3b\u52a8\u65f6\u95f4",lastLoginIp:"\u6700\u8fd1\u6d3b\u52a8\u5730\u5740",actions:"\u64cd\u4f5c",logoutAll:"\u6ce8\u9500\u6240\u6709\u4f1a\u8bdd",logoutAllTips:"\u4e0d\u4f1a\u6ce8\u9500\u5f53\u524d\u4f1a\u8bdd",logout:"\u6ce8\u9500",currentSession:"\u5f53\u524d\u4f1a\u8bdd",unknown:"\u672a\u77e5",logoutThisSession:"\u6ce8\u9500\u6307\u5b9a\u4f1a\u8bdd",logoutThisSessionConfirm:"\u786e\u5b9a\u8981\u6ce8\u9500\u6b64\u4f1a\u8bdd\u5417?",logoutAllSession:"\u6ce8\u9500\u6240\u6709\u4f1a\u8bdd",logoutAllSessionConfirm:"\u786e\u5b9a\u8981\u6ce8\u9500\u6240\u6709\u4f1a\u8bdd\u5417?"},en:{confirm:"Confirm",cancel:"Cancel",visitorId:"Device ID",deviceType:"Device Type",platform:"Platform",walletOS:"Wallet OS",role:"Role",fullname:"Fullname",email:"Email",avatar:"Avatar",user:"User",updatedAt:"Last Active Time",actions:"Actions",lastLoginIp:"Last Login IP",logoutAll:"Logout all",logoutAllTips:"Will not logout current session",logout:"Logout",currentSession:"Current Session",unknown:"Unknown",logoutThisSession:"Logout this session",logoutThisSessionConfirm:"Are you sure to logout this session?",logoutAllSession:"Logout all sessions",logoutAllSessionConfirm:"Are you sure to logout all sessions?"}},ue="Reserved IP",pe="ip-region-cache";async function me(e){let i="",t={};try{const e=localStorage.getItem(pe);e&&(t=JSON.parse(e))}catch{t={}}if(t[e])i=t[e];else{try{i=await async function(e){const i="https://api.ip.sb/geoip/".concat(e),t=await fetch(i),n=await t.json();let o="";return n.error?n.reserved&&(o=ue):o=[n.country,n.region,n.city].filter(Boolean).join("/"),o}(e)}catch{console.warn("Fail to get ip region from ip.sb")}if(!i)try{i=await async function(e){const i="https://ipapi.co/".concat(e,"/json/"),t=await fetch(i),n=await t.json();let o="";return n.error?n.reserved&&(o=ue):o=[n.country_name,n.region,n.city].filter(Boolean).join("/"),o}(e)}catch{console.warn("Fail to get ip region from ip-api.co")}}if(i){const n=Object.keys(t);n.length>100&&delete t[n[0]],t[e]&&delete t[e],t[e]=i,localStorage.setItem(pe,JSON.stringify(t))}return i}const fe=e=>new(Q())(e,{browser:[[/(ArcWallet)\/([\w\.]+)/i],[Q().BROWSER.NAME,Q().BROWSER.VERSION]]}).getResult();function be(e){let{user:i,showAction:t=!0,showUser:o=!0}=e;const r=(0,ee.OP)(),{locale:l}=(0,s.PE)(),{confirmApi:c,confirmHolder:d}=(0,Z.N4)(),u=(0,w.Z)((function(e){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,a.I)(de,e,l,"en",i)})),p=(0,w.Z)((async()=>{let e=null===i||void 0===i?void 0:i.userSessions;e||(e=await D.userSession.getUserSessions({did:i.did}));try{var t;const i=null===(t=e)||void 0===t?void 0:t.map(((e,i)=>[i,e.lastLoginIp])).filter((e=>!!e[1])),n=null===i||void 0===i?void 0:i.map((e=>e[1])),o=await async function(e){return Promise.all(e.map((e=>me(e))))}(n);for(let t=0;t<o.length;t++){const n=o[t],r=i[t];e[r[0]].ipRegion=n}}catch(o){console.warn("Failed to convert ip to region"),console.error(o)}const n=(new Date).getTime();return X()(e,(e=>e.visitorId===r?-1:n-new Date(e.updatedAt).getTime()))})),m=(0,G.Z)(p),b=(0,J.Z)((()=>m.data||[]),[m.data]),h=(0,J.Z)((()=>b.reduce(((e,i)=>(e[i.lastLoginIp]=i.ipRegion,e)),{})),[b]),g=(0,w.Z)((e=>{let{visitorId:i}=e;c.open({title:u("logoutThisSession"),content:u("logoutThisSessionConfirm"),confirmButtonText:u("confirm"),cancelButtonText:u("cancel"),onConfirm:async()=>{await D.user.logout({visitorId:i}),m.refresh(),c.close()}})})),v=(0,J.Z)((()=>b.filter((e=>e.visitorId!==r))),[b]),y=(0,w.Z)((()=>{c.open({title:u("logoutAllSession"),content:u("logoutAllSessionConfirm"),confirmButtonText:u("confirm"),cancelButtonText:u("cancel"),onConfirm:async()=>{const e=v.map((e=>()=>D.user.logout({visitorId:e.visitorId})));await re(e,{concurrency:3,stopOnError:!1}),m.refresh(),c.close()}})})),k=[];t&&k.push((0,n.jsx)(se.Z,{title:u("logoutAllTips"),children:(0,n.jsx)(x.Z,{sx:{ml:.5},size:"small",variant:"contained",color:"error",onClick:y,disabled:0===v.length,children:u("logoutAll")})},"logoutAll"));const j=(0,J.Z)((()=>({search:!1,sort:!1,download:!1,filter:!1,print:!1,expandableRowsOnClick:!1,searchDebounceTime:600})),[]),S=[{label:u("platform"),name:"platform",options:{customBodyRenderLite:e=>{var i,t;const o=b[e],r=fe(o.ua);return(0,n.jsx)(f.Z,{children:[null===(i=r.os)||void 0===i?void 0:i.name,null===(t=r.os)||void 0===t?void 0:t.version].filter(Boolean).join("/")||u("unknown")})}}},{label:u("deviceType"),name:"deviceType",options:{customBodyRenderLite:e=>{var i,t;const o=b[e],r=fe(o.ua);return(0,n.jsx)(f.Z,{children:[null===(i=r.browser)||void 0===i?void 0:i.name,null===(t=r.browser)||void 0===t?void 0:t.version].filter(Boolean).join("/")||u("unknown")})}}},{label:u("walletOS"),name:"walletOS",options:{customBodyRenderLite:e=>{var i;const t=b[e];return(0,n.jsx)(f.Z,{children:(null===(i=t.extra)||void 0===i?void 0:i.walletOS)||u("unknown")})}}},o&&{label:u("user"),name:"user",options:{customBodyRenderLite:e=>{const t=b[e];return(0,n.jsx)(ce,{sessionUser:t.user,user:i})}}},{label:u("updatedAt"),name:"updatedAt",options:{customBodyRenderLite:e=>{const i=b[e];return(0,n.jsx)(E.Z,{value:i.updatedAt,relativeRange:2592e5,locale:l})}}},{label:u("lastLoginIp"),name:"lastLoginIp",options:{customBodyRenderLite:e=>{const i=b[e];return(0,n.jsx)(f.Z,{children:h[i.lastLoginIp]?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(ae.Z,{variant:"body2",children:h[i.lastLoginIp]}),(0,n.jsx)(ae.Z,{variant:"body2",color:"grey",children:i.lastLoginIp||u("unknown")})]}):(0,n.jsx)(ae.Z,{children:i.lastLoginIp||u("unknown")})})}}},t&&{label:u("actions"),name:"actions",options:{customBodyRenderLite:e=>{const i=b[e];return(0,n.jsx)(f.Z,{children:(0,n.jsx)(x.Z,{sx:{whiteSpace:"nowrap",fontSize:"12px",px:1},disabled:r===i.visitorId,variant:"outlined",size:"small",color:"error",onClick:()=>g({visitorId:i.visitorId}),children:r===i.visitorId?u("currentSession"):u("logout")})})}}}].filter(Boolean);return(0,n.jsxs)(f.Z,{sx:{".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"}},children:[d,(0,n.jsx)(Y.Z,{locale:l,data:b,columns:S,customButtons:k,options:j,loading:m.loading})]})}},30278:(e,i,t)=>{var n=t(31104),o=t(43676);e.exports=function(e,i){return e&&e.length?o(e,n(i,2)):[]}},94166:function(e,i,t){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var i,t=1,n=arguments.length;t<n;t++)for(var o in i=arguments[t])Object.prototype.hasOwnProperty.call(i,o)&&(e[o]=i[o]);return e},n.apply(this,arguments)},o=this&&this.__rest||function(e,i){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&i.indexOf(n)<0&&(t[n]=e[n]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)i.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(t[n[o]]=e[n[o]])}return t};i.__esModule=!0;var r=t(5057),s=t(18294),a=t(49266);i.default=function(e){var i=e.delay,t=void 0===i?0:i,l=e.type,c=void 0===l?"text":l,d=e.color,u=void 0===d?"#CDCDCD":d,p=e.rows,m=void 0===p?3:p,f=e.ready,b=e.firstLaunchOnly,w=e.children,h=e.className,g=e.showLoadingAnimation,v=e.customPlaceholder,x=o(e,["delay","type","color","rows","ready","firstLaunchOnly","children","className","showLoadingAnimation","customPlaceholder"]),y=r.useState(f),k=y[0],j=y[1],S=r.useRef(null);return r.useEffect((function(){b||!k||f?f&&(S.current&&window.clearTimeout(S.current),k||j(!0)):t&&t>0?S.current=window.setTimeout((function(){j(!1)}),t):j(!1)}),[b,k,f,t]),r.useEffect((function(){return function(){S.current&&window.clearTimeout(S.current)}}),[]),k?w:function(){var e=g?a.joinClassNames("show-loading-animation",h):h;if(v&&r.isValidElement(v)){var i=a.joinClassNames(v.props.className,e);return r.cloneElement(v,{className:i})}if(v)return v;var t=s[c];return r.createElement(t,n({},x,{color:u,rows:m,className:e}))}()}},22256:(e,i,t)=>{"use strict";var n=t(94166);i.Z=n.default},98392:function(e,i,t){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var i,t=1,n=arguments.length;t<n;t++)for(var o in i=arguments[t])Object.prototype.hasOwnProperty.call(i,o)&&(e[o]=i[o]);return e},n.apply(this,arguments)};i.__esModule=!0;var o=t(5057),r=t(49354),s=t(12208),a=t(49266),l={display:"flex"};i.default=function(e){var i=e.className,t=e.style,c=e.color,d=e.rows;return o.createElement("div",{className:a.joinClassNames("media-block",i),style:n(n({},l),t)},o.createElement(s.default,{color:c,style:{minHeight:55,width:55,minWidth:55,marginRight:10}}),o.createElement(r.default,{color:c,rows:d}))}},16102:function(e,i,t){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var i,t=1,n=arguments.length;t<n;t++)for(var o in i=arguments[t])Object.prototype.hasOwnProperty.call(i,o)&&(e[o]=i[o]);return e},n.apply(this,arguments)};i.__esModule=!0;var o=t(5057),r=t(49266);i.default=function(e){var i=e.className,t=e.style,s={backgroundColor:e.color,width:"100%",height:"100%",marginRight:10};return o.createElement("div",{className:r.joinClassNames("rect-shape",i),style:n(n({},s),t)})}},12208:function(e,i,t){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var i,t=1,n=arguments.length;t<n;t++)for(var o in i=arguments[t])Object.prototype.hasOwnProperty.call(i,o)&&(e[o]=i[o]);return e},n.apply(this,arguments)};i.__esModule=!0;var o=t(5057),r=t(49266);i.default=function(e){var i=e.className,t=e.style,s={backgroundColor:e.color,borderRadius:"500rem",width:"100%",height:"100%"};return o.createElement("div",{className:r.joinClassNames("round-shape",i),style:n(n({},s),t)})}},49354:function(e,i,t){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var i,t=1,n=arguments.length;t<n;t++)for(var o in i=arguments[t])Object.prototype.hasOwnProperty.call(i,o)&&(e[o]=i[o]);return e},n.apply(this,arguments)};i.__esModule=!0;var o=t(5057),r=t(13672),s=t(49266),a={width:"100%"},l=[97,100,94,90,98,95,98,40];i.default=function(e){var i=e.rows,t=e.lineSpacing,c=e.color,d=e.style,u=e.className,p=e.widths,m=void 0===p?l:p,f=function(e){return{maxHeight:100/(2*i-1)+"%",width:m[(e+m.length)%m.length]+"%"}};return o.createElement("div",{className:s.joinClassNames("text-block",u),style:n(n({},a),d)},Array.apply(null,Array(i)).map((function(e,i){return o.createElement(r.default,{color:c,style:f(i),lineSpacing:0!==i?t:0,key:i})})))}},13672:function(e,i,t){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var i,t=1,n=arguments.length;t<n;t++)for(var o in i=arguments[t])Object.prototype.hasOwnProperty.call(i,o)&&(e[o]=i[o]);return e},n.apply(this,arguments)};i.__esModule=!0;var o=t(5057),r=t(49266);i.default=function(e){var i=e.className,t=e.maxHeight,s=e.color,a=e.lineSpacing,l=void 0===a?"0.7em":a,c=e.style,d={maxHeight:t,width:"100%",height:"1em",backgroundColor:s,marginTop:l};return o.createElement("div",{className:r.joinClassNames("text-row",i),style:n(n({},d),c)})}},18294:(e,i,t)=>{"use strict";i.__esModule=!0,i.media=i.text=i.rect=i.round=i.textRow=i.MediaBlock=i.TextBlock=i.RectShape=i.RoundShape=i.TextRow=void 0;var n=t(13672);i.TextRow=n.default;var o=t(12208);i.RoundShape=o.default;var r=t(16102);i.RectShape=r.default;var s=t(49354);i.TextBlock=s.default;var a=t(98392);i.MediaBlock=a.default,i.textRow=n.default,i.round=o.default,i.rect=r.default,i.text=s.default,i.media=a.default},49266:(e,i)=>{"use strict";i.__esModule=!0,i.joinClassNames=void 0,i.joinClassNames=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return e.filter((function(e){return e})).join(" ")}},35833:function(e,i,t){var n;!function(o,r){"use strict";var s="function",a="undefined",l="object",c="string",d="major",u="model",p="name",m="type",f="vendor",b="version",w="architecture",h="console",g="mobile",v="tablet",x="smarttv",y="wearable",k="embedded",j="Amazon",S="Apple",I="ASUS",O="BlackBerry",C="Browser",T="Chrome",_="Firefox",Z="Google",E="Huawei",N="LG",R="Microsoft",P="Motorola",A="Opera",z="Samsung",B="Sharp",L="Sony",M="Xiaomi",D="Zebra",U="Facebook",q="Chromium OS",W="Mac OS",F=function(e){for(var i={},t=0;t<e.length;t++)i[e[t].toUpperCase()]=e[t];return i},H=function(e,i){return typeof e===c&&-1!==V(i).indexOf(V(e))},V=function(e){return e.toLowerCase()},Y=function(e,i){if(typeof e===c)return e=e.replace(/^\s\s*/,""),typeof i===a?e:e.substring(0,500)},G=function(e,i){for(var t,n,o,a,c,d,u=0;u<i.length&&!c;){var p=i[u],m=i[u+1];for(t=n=0;t<p.length&&!c&&p[t];)if(c=p[t++].exec(e))for(o=0;o<m.length;o++)d=c[++n],typeof(a=m[o])===l&&a.length>0?2===a.length?typeof a[1]==s?this[a[0]]=a[1].call(this,d):this[a[0]]=a[1]:3===a.length?typeof a[1]!==s||a[1].exec&&a[1].test?this[a[0]]=d?d.replace(a[1],a[2]):r:this[a[0]]=d?a[1].call(this,d,a[2]):r:4===a.length&&(this[a[0]]=d?a[3].call(this,d.replace(a[1],a[2])):r):this[a]=d||r;u+=2}},J=function(e,i){for(var t in i)if(typeof i[t]===l&&i[t].length>0){for(var n=0;n<i[t].length;n++)if(H(i[t][n],e))return"?"===t?r:t}else if(H(i[t],e))return"?"===t?r:t;return e},$={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"},X={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[b,[p,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[b,[p,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[p,b],[/opios[\/ ]+([\w\.]+)/i],[b,[p,A+" Mini"]],[/\bopr\/([\w\.]+)/i],[b,[p,A]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[b,[p,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[p,b],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[b,[p,"UC"+C]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[b,[p,"WeChat"]],[/konqueror\/([\w\.]+)/i],[b,[p,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[b,[p,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[b,[p,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[b,[p,"Smart Lenovo "+C]],[/(avast|avg)\/([\w\.]+)/i],[[p,/(.+)/,"$1 Secure "+C],b],[/\bfocus\/([\w\.]+)/i],[b,[p,_+" Focus"]],[/\bopt\/([\w\.]+)/i],[b,[p,A+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[b,[p,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[b,[p,"Dolphin"]],[/coast\/([\w\.]+)/i],[b,[p,A+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[b,[p,"MIUI "+C]],[/fxios\/([-\w\.]+)/i],[b,[p,_]],[/\bqihu|(qi?ho?o?|360)browser/i],[[p,"360 "+C]],[/(oculus|sailfish|huawei|vivo)browser\/([\w\.]+)/i],[[p,/(.+)/,"$1 "+C],b],[/samsungbrowser\/([\w\.]+)/i],[b,[p,z+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[p,/_/g," "],b],[/metasr[\/ ]?([\d\.]+)/i],[b,[p,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[p,"Sogou Mobile"],b],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[p,b],[/(lbbrowser)/i,/\[(linkedin)app\]/i],[p],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[p,U],b],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[p,b],[/\bgsa\/([\w\.]+) .*safari\//i],[b,[p,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[b,[p,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[b,[p,T+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[p,T+" WebView"],b],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[b,[p,"Android "+C]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[p,b],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[b,[p,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[b,p],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[p,[b,J,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[p,b],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[p,"Netscape"],b],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[b,[p,_+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[p,b],[/(cobalt)\/([\w\.]+)/i],[p,[b,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[w,"amd64"]],[/(ia32(?=;))/i],[[w,V]],[/((?:i[346]|x)86)[;\)]/i],[[w,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[w,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[w,"armhf"]],[/windows (ce|mobile); ppc;/i],[[w,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[w,/ower/,"",V]],[/(sun4\w)[;\)]/i],[[w,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[w,V]]],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],[u,[f,z],[m,v]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[u,[f,z],[m,g]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[u,[f,S],[m,g]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[u,[f,S],[m,v]],[/(macintosh);/i],[u,[f,S]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[u,[f,B],[m,g]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[u,[f,E],[m,v]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[u,[f,E],[m,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)?)(?: bui|\))/i],[[u,/_/g," "],[f,M],[m,g]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[u,/_/g," "],[f,M],[m,v]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[u,[f,"OPPO"],[m,g]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[u,[f,"Vivo"],[m,g]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[u,[f,"Realme"],[m,g]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[u,[f,P],[m,g]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[u,[f,P],[m,v]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[u,[f,N],[m,v]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[u,[f,N],[m,g]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[u,[f,"Lenovo"],[m,v]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[u,/_/g," "],[f,"Nokia"],[m,g]],[/(pixel c)\b/i],[u,[f,Z],[m,v]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[u,[f,Z],[m,g]],[/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],[u,[f,L],[m,g]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[u,"Xperia Tablet"],[f,L],[m,v]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[u,[f,"OnePlus"],[m,g]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[u,[f,j],[m,v]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[u,/(.+)/g,"Fire Phone $1"],[f,j],[m,g]],[/(playbook);[-\w\),; ]+(rim)/i],[u,f,[m,v]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[u,[f,O],[m,g]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[u,[f,I],[m,v]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[u,[f,I],[m,g]],[/(nexus 9)/i],[u,[f,"HTC"],[m,v]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[f,[u,/_/g," "],[m,g]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[u,[f,"Acer"],[m,v]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[u,[f,"Meizu"],[m,g]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[u,[f,"Ulefone"],[m,g]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[f,u,[m,g]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[f,u,[m,v]],[/(surface duo)/i],[u,[f,R],[m,v]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[u,[f,"Fairphone"],[m,g]],[/(u304aa)/i],[u,[f,"AT&T"],[m,g]],[/\bsie-(\w*)/i],[u,[f,"Siemens"],[m,g]],[/\b(rct\w+) b/i],[u,[f,"RCA"],[m,v]],[/\b(venue[\d ]{2,7}) b/i],[u,[f,"Dell"],[m,v]],[/\b(q(?:mv|ta)\w+) b/i],[u,[f,"Verizon"],[m,v]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[u,[f,"Barnes & Noble"],[m,v]],[/\b(tm\d{3}\w+) b/i],[u,[f,"NuVision"],[m,v]],[/\b(k88) b/i],[u,[f,"ZTE"],[m,v]],[/\b(nx\d{3}j) b/i],[u,[f,"ZTE"],[m,g]],[/\b(gen\d{3}) b.+49h/i],[u,[f,"Swiss"],[m,g]],[/\b(zur\d{3}) b/i],[u,[f,"Swiss"],[m,v]],[/\b((zeki)?tb.*\b) b/i],[u,[f,"Zeki"],[m,v]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[f,"Dragon Touch"],u,[m,v]],[/\b(ns-?\w{0,9}) b/i],[u,[f,"Insignia"],[m,v]],[/\b((nxa|next)-?\w{0,9}) b/i],[u,[f,"NextBook"],[m,v]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[f,"Voice"],u,[m,g]],[/\b(lvtel\-)?(v1[12]) b/i],[[f,"LvTel"],u,[m,g]],[/\b(ph-1) /i],[u,[f,"Essential"],[m,g]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[u,[f,"Envizen"],[m,v]],[/\b(trio[-\w\. ]+) b/i],[u,[f,"MachSpeed"],[m,v]],[/\btu_(1491) b/i],[u,[f,"Rotor"],[m,v]],[/(shield[\w ]+) b/i],[u,[f,"Nvidia"],[m,v]],[/(sprint) (\w+)/i],[f,u,[m,g]],[/(kin\.[onetw]{3})/i],[[u,/\./g," "],[f,R],[m,g]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[u,[f,D],[m,v]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[u,[f,D],[m,g]],[/smart-tv.+(samsung)/i],[f,[m,x]],[/hbbtv.+maple;(\d+)/i],[[u,/^/,"SmartTV"],[f,z],[m,x]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[f,N],[m,x]],[/(apple) ?tv/i],[f,[u,S+" TV"],[m,x]],[/crkey/i],[[u,T+"cast"],[f,Z],[m,x]],[/droid.+aft(\w+)( bui|\))/i],[u,[f,j],[m,x]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[u,[f,B],[m,x]],[/(bravia[\w ]+)( bui|\))/i],[u,[f,L],[m,x]],[/(mitv-\w{5}) bui/i],[u,[f,M],[m,x]],[/Hbbtv.*(technisat) (.*);/i],[f,u,[m,x]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[f,Y],[u,Y],[m,x]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[m,x]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[f,u,[m,h]],[/droid.+; (shield) bui/i],[u,[f,"Nvidia"],[m,h]],[/(playstation [345portablevi]+)/i],[u,[f,L],[m,h]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[u,[f,R],[m,h]],[/((pebble))app/i],[f,u,[m,y]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[u,[f,S],[m,y]],[/droid.+; (glass) \d/i],[u,[f,Z],[m,y]],[/droid.+; (wt63?0{2,3})\)/i],[u,[f,D],[m,y]],[/(quest( 2| pro)?)/i],[u,[f,U],[m,y]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[f,[m,k]],[/(aeobc)\b/i],[u,[f,j],[m,k]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[u,[m,g]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[u,[m,v]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[m,v]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[m,g]],[/(android[-\w\. ]{0,9});.+buil/i],[u,[f,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[b,[p,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[b,[p,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[p,b],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[b,p]],os:[[/microsoft (windows) (vista|xp)/i],[p,b],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[p,[b,J,$]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[b,J,$],[p,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[b,/_/g,"."],[p,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[p,W],[b,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[b,p],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[p,b],[/\(bb(10);/i],[b,[p,O]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[b,[p,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[b,[p,_+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[b,[p,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[b,[p,"watchOS"]],[/crkey\/([\d\.]+)/i],[b,[p,T+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[p,q],b],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/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) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[p,b],[/(sunos) ?([\w\.\d]*)/i],[[p,"Solaris"],b],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[p,b]]},K=function(e,i){if(typeof e===l&&(i=e,e=r),!(this instanceof K))return new K(e,i).getResult();var t=typeof o!==a&&o.navigator?o.navigator:r,n=e||(t&&t.userAgent?t.userAgent:""),h=t&&t.userAgentData?t.userAgentData:r,x=i?function(e,i){var t={};for(var n in e)i[n]&&i[n].length%2===0?t[n]=i[n].concat(e[n]):t[n]=e[n];return t}(X,i):X,y=t&&t.userAgent==n;return this.getBrowser=function(){var e,i={};return i[p]=r,i[b]=r,G.call(i,n,x.browser),i[d]=typeof(e=i[b])===c?e.replace(/[^\d\.]/g,"").split(".")[0]:r,y&&t&&t.brave&&typeof t.brave.isBrave==s&&(i[p]="Brave"),i},this.getCPU=function(){var e={};return e[w]=r,G.call(e,n,x.cpu),e},this.getDevice=function(){var e={};return e[f]=r,e[u]=r,e[m]=r,G.call(e,n,x.device),y&&!e[m]&&h&&h.mobile&&(e[m]=g),y&&"Macintosh"==e[u]&&t&&typeof t.standalone!==a&&t.maxTouchPoints&&t.maxTouchPoints>2&&(e[u]="iPad",e[m]=v),e},this.getEngine=function(){var e={};return e[p]=r,e[b]=r,G.call(e,n,x.engine),e},this.getOS=function(){var e={};return e[p]=r,e[b]=r,G.call(e,n,x.os),y&&!e[p]&&h&&"Unknown"!=h.platform&&(e[p]=h.platform.replace(/chrome os/i,q).replace(/macos/i,W)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return n},this.setUA=function(e){return n=typeof e===c&&e.length>500?Y(e,500):e,this},this.setUA(n),this};K.VERSION="1.0.37",K.BROWSER=F([p,b,d]),K.CPU=F([w]),K.DEVICE=F([u,f,m,h,g,x,v,y,k]),K.ENGINE=K.OS=F([p,b]),typeof i!==a?(e.exports&&(i=e.exports=K),i.UAParser=K):t.amdO?(n=function(){return K}.call(i,t,i,e))===r||(e.exports=n):typeof o!==a&&(o.UAParser=K);var Q=typeof o!==a&&(o.jQuery||o.Zepto);if(Q&&!Q.ua){var ee=new K;Q.ua=ee.getResult(),Q.ua.get=function(){return ee.getUA()},Q.ua.set=function(e){ee.setUA(e);var i=ee.getResult();for(var t in i)Q.ua[t]=i[t]}}}("object"===typeof window?window:this)},81534:(e,i,t)=>{"use strict";function n(e){for(var i=1;i<arguments.length;i++){var t=arguments[i];for(var n in t)e[n]=t[n]}return e}t.d(i,{Z:()=>o});var o=function e(i,t){function o(e,o,r){if("undefined"!==typeof document){"number"===typeof(r=n({},t,r)).expires&&(r.expires=new Date(Date.now()+864e5*r.expires)),r.expires&&(r.expires=r.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var s="";for(var a in r)r[a]&&(s+="; "+a,!0!==r[a]&&(s+="="+r[a].split(";")[0]));return document.cookie=e+"="+i.write(o,e)+s}}return Object.create({set:o,get:function(e){if("undefined"!==typeof document&&(!arguments.length||e)){for(var t=document.cookie?document.cookie.split("; "):[],n={},o=0;o<t.length;o++){var r=t[o].split("="),s=r.slice(1).join("=");try{var a=decodeURIComponent(r[0]);if(n[a]=i.read(s,a),e===a)break}catch(l){}}return e?n[e]:n}},remove:function(e,i){o(e,"",n({},i,{expires:-1}))},withAttributes:function(i){return e(this.converter,n({},this.attributes,i))},withConverter:function(i){return e(n({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(i)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"})}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! js-cookie v3.0.5 | MIT */
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 6743.e0b3dc71.chunk.js.LICENSE.txt */
|
|
2
|
+
"use strict";(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[6743],{5873:(e,n,t)=>{t.d(n,{Z:()=>m});var o=t(96266),i=(t(49631),t(5057)),r=t(55898),s=t.n(r),l=t(47220),a=t(68420),c=t(1033),d=t(615),u=t(6504),f=t(94457),p=t(59763),h=t(25162);function g(e){var n;let{meta:t,fallbackUrl:r,invalidPathFallback:s,headerAddons:d,sessionManagerProps:g,links:m,...v}=e;(0,h.x)();const b=(0,i.useContext)(l.B3),x=null===b||void 0===b||null===(n=b.session)||void 0===n?void 0:n.user,y=null===x||void 0===x?void 0:x.role,{locale:k}=(0,a.PE)()||{},w=(0,i.useMemo)((()=>{const e=Object.assign({},window.blocklet,t);try{return(0,f.RX)(e)}catch(n){return console.error("Failed to format blocklet info",n,e),e}}),[t]),{localizedNav:j,flattened:T,matchedIndex:M}=(0,i.useMemo)((()=>{var e;let n=(0,f.KN)(null===w||void 0===w||null===(e=w.navigation)||void 0===e?void 0:e.dashboard,k)||[];n=(0,f.Kb)(n,y),n=(0,u._J)(n,(e=>({title:e.title,url:e.link,icon:e.icon?(0,o.jsx)("iconify-icon",{height:"100%",width:"100%",icon:e.icon}):null,external:!0,children:e.items})),"items");const t=(0,u.Ik)(n).filter((e=>!!e.url)),i=(0,u.RX)(t.map((e=>e.url)));return-1!==i&&(t[i].active=!0),{localizedNav:n,flattened:t,matchedIndex:i}}),[w,k,y]),C="function"===typeof m?m(j):[...j,...m];if((0,i.useLayoutEffect)((()=>{!x||null!==T&&void 0!==T&&T.length||!r||(window.location.href=r)}),[r]),(0,i.useLayoutEffect)((()=>{var e;x&&null!==T&&void 0!==T&&T.length&&-1===M&&(s?s():window.location.href=(null===(e=T[0])||void 0===e?void 0:e.url)||f.iU)}),[s,T,M]),!w.appName)return null;const{appLogo:A,appLogoRect:Z,appName:P}=w,E=(0,o.jsx)(p.Z,{formattedBlocklet:w,addons:d,sessionManagerProps:g});return(0,o.jsx)(c.Z,{title:P,fullWidth:!0,sidebarWidth:128,legacy:!1,links:C,...v,headerProps:{homeLink:f.iU,logo:(0,o.jsx)("img",{src:Z||A,alt:"logo"}),addons:E,...v.headerProps}})}g.propTypes={meta:d.u,fallbackUrl:s().string,invalidPathFallback:s().func,headerAddons:s().oneOfType([s().func,s().node]),sessionManagerProps:d.r,links:s().oneOfType([s().array,s().func])},g.defaultProps={meta:{},fallbackUrl:f.iU,invalidPathFallback:null,headerAddons:void 0,sessionManagerProps:{showRole:!0,onLogout:()=>{window.location.href=f.iU}},links:[]};const m=g},2484:(e,n,t)=>{t.d(n,{Z:()=>Y});var o,i=t(71171),r=t(96266),s=t(5057),l=t(55898),a=t.n(l),c=t(47685),d=t(52439),u=t(68420),f=t(71569),p=t(76223),h=t(24914),g=t.n(h),m=t(9498),v=t(39948);function b(e){let{name:n,logo:t,description:o,...i}=e;if(!n&&!t&&!o)return null;const l=(0,s.isValidElement)(t)?t:(0,r.jsx)("img",{src:t,alt:n});return(0,r.jsxs)(x,{...i,children:[(0,r.jsxs)("div",{children:[t&&(0,r.jsx)("div",{className:"footer-brand-logo",children:l}),n&&(0,r.jsx)("div",{className:"footer-brand-name",children:n})]}),o&&(0,r.jsx)("div",{className:"footer-brand-desc",children:o})]})}b.propTypes={name:a().node,logo:a().node,description:a().string},b.defaultProps={name:"",logo:"",description:""};const x=(0,c.zo)("div")(o||(o=(0,i.Z)(["\n display: flex;\n flex-direction: column;\n font-size: 14px;\n a {\n text-decoration: none;\n color: inherit;\n }\n > div:first-of-type {\n display: flex;\n align-items: center;\n }\n .footer-brand-logo {\n display: flex;\n align-items: center;\n margin-right: 16px;\n line-height: 1;\n img,\n svg {\n width: auto;\n height: 44px;\n max-height: 44px;\n }\n }\n .footer-brand-name {\n font-size: 16px;\n font-weight: bold;\n }\n .footer-brand-desc {\n margin-top: 16px;\n }\n\n "," {\n width: auto;\n }\n\n "," {\n .footer-brand-logo {\n img,\n svg {\n height: 32px;\n max-height: 32px;\n }\n }\n }\n"])),(e=>e.theme.breakpoints.down("sm")),(e=>e.theme.breakpoints.down("md")));var y,k=t(9978),w=t(76720),j=t(79787);function T(e){let{links:n,flowLayout:t,...o}=e;const[i,l]=(0,s.useState)(-1);if(null===n||void 0===n||!n.length)return null;const a=n.some((e=>{var n;return null===(n=e.items)||void 0===n?void 0:n.length})),c=e=>{let{label:n,link:t,icon:o,render:i,props:s}=e,l=n;return i?l=i({label:n,link:t,props:s}):t&&(l=(0,r.jsx)("a",{href:t,"aria-label":"Footer link for ".concat(n),...s,children:n})),(0,r.jsxs)(r.Fragment,{children:[o&&(0,r.jsx)(j.Z,{icon:o,size:20,sx:{mr:.5}}),l]})};return(0,r.jsx)(M,{...o,className:(0,k.Z)(o.className,{"footer-links--grouped":a,"footer-links--flow":t}),children:(0,r.jsxs)("div",{className:"footer-links-inner",children:[t&&n.map(((e,n)=>(0,r.jsx)("span",{className:"footer-links-item",children:c(e)},n))),!t&&n.map(((e,n)=>{const{items:t}=e,o=n===i;return(0,r.jsxs)("div",{className:(0,k.Z)("footer-links-group",{"footer-links-group--active":o}),onClick:()=>l(i===n?-1:n),children:[(0,r.jsxs)("span",{className:"footer-links-item",children:[c(e),!(null===t||void 0===t||!t.length)&&(0,r.jsx)("span",{className:"footer-links-group-expand-icon",children:(0,r.jsx)(w.Z,{style:{transform:"rotate(".concat(o?180:0,"deg)")}})})]}),!(null===t||void 0===t||!t.length)&&(0,r.jsx)("div",{className:"footer-links-sub",children:t.map(((e,n)=>(0,r.jsx)("span",{className:"footer-links-item",children:c(e)},n)))})]},n)}))]})})}T.propTypes={links:a().arrayOf(a().shape({label:a().string,link:a().string,render:a().func,props:a().object})),flowLayout:a().bool},T.defaultProps={links:[],flowLayout:!1};const M=(0,c.zo)("div")(y||(y=(0,i.Z)(["\n overflow: hidden;\n color: ",";\n .footer-links-inner {\n display: flex;\n justify-content: space-between;\n margin: 0 -8px;\n }\n .footer-links-group,\n .footer-links-sub {\n display: flex;\n flex-direction: column;\n }\n .footer-links-sub .footer-links-item {\n color: ",";\n }\n .footer-links-group-expand-icon {\n display: none;\n position: absolute;\n right: 16px;\n top: 50%;\n transform: translate(0, -50%);\n line-height: 1;\n svg {\n width: auto;\n height: 0.75em;\n }\n }\n .footer-links-item {\n display: inline-flex;\n align-items: center;\n position: relative;\n padding: 4px 8px;\n font-size: 14px;\n }\n &.footer-links--grouped {\n .footer-links-group {\n > .footer-links-item {\n font-weight: bold;\n }\n .footer-links-sub {\n margin-top: 8px;\n }\n }\n }\n a {\n display: inline-block;\n max-width: 150px;\n color: inherit;\n text-decoration: none;\n &:hover {\n text-decoration: underline;\n }\n }\n\n &.footer-links--flow {\n display: inline-flex;\n .footer-links-inner {\n justify-content: center;\n flex-wrap: wrap;\n margin: 0 -8px;\n .footer-links-item {\n padding: 0 8px;\n }\n .footer-links-item + .footer-links-item::before {\n content: '';\n position: absolute;\n left: 0;\n top: 50%;\n transform: translate(0, -50%);\n height: 1em;\n border-left: 1px solid ",";\n }\n }\n }\n\n "," {\n .footer-links-inner {\n flex-direction: column;\n margin: 0;\n }\n .footer-links-sub {\n display: none;\n }\n .footer-links-group {\n position: relative;\n padding: 12px 0;\n .footer-links-item .footer-links-group-expand-icon {\n display: inline-block;\n }\n }\n .footer-links-group + .footer-links-group {\n border-top: 1px solid ",";\n }\n .footer-links-group--active {\n .footer-links-sub {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n .footer-links-item {\n flex: 0 0 50%;\n }\n }\n }\n .footer-links-item {\n padding-left: 0;\n padding-right: 0;\n font-size: 13px;\n }\n &.footer-links--grouped {\n .footer-links-group {\n > .footer-links-item {\n font-size: 14px;\n }\n }\n }\n\n &.footer-links--flow {\n .footer-links-inner {\n flex-direction: row;\n }\n }\n }\n"])),(e=>e.theme.palette.grey[600]),(e=>e.theme.palette.grey[900]),(e=>e.theme.palette.grey[400]),(e=>e.theme.breakpoints.down("md")),(e=>e.theme.palette.grey[200]));var C;function A(e){let{items:n,...t}=e;const o=(0,c.Fg)();return null!==n&&void 0!==n&&n.length?(0,r.jsx)(Z,{...t,children:n.map(((e,n)=>(0,r.jsx)("a",{href:e.link,target:"_blank","aria-label":"Social media icon".concat(e.title?" for ".concat(e.title):""),rel:"noreferrer",children:(0,r.jsx)(j.Z,{icon:e.icon||e.title,sx:{bgcolor:o.palette.grey[600],color:"#fff"},size:24,component:"span"})},n)))}):null}A.propTypes={items:a().arrayOf(a().shape({icon:a().string,link:a().string}))},A.defaultProps={items:null};const Z=(0,c.zo)("div")(C||(C=(0,i.Z)(["\n display: inline-flex;\n flex-wrap: wrap;\n align-items: center;\n justify-content: center;\n gap: 20px;\n a {\n color: ",";\n text-decoration: none;\n &:hover {\n color: ",";\n }\n }\n "," {\n gap: 12px;\n }\n"])),(e=>e.theme.palette.grey[400]),(e=>e.theme.palette.primary.light),(e=>e.theme.breakpoints.down("md")));var P;function E(e){let{owner:n,year:t,...o}=e;return(0,r.jsxs)(S,{...o,children:["Copyright \xa9 ",t," ",n]})}E.propTypes={owner:a().string,year:a().string},E.defaultProps={owner:"ArcBlock",year:"".concat((new Date).getFullYear())};const S=(0,c.zo)("p")(P||(P=(0,i.Z)(["\n display: flex;\n align-items: center;\n margin: 0;\n font-size: 13px;\n"])));var I,O=t(22139);function N(e){let{children:n,autoCenter:t,...o}=e;return n?(0,r.jsx)(z,{...o,className:(0,k.Z)(o.className,{"footer-row-auto-center":t}),children:n}):null}N.propTypes={children:a().any,autoCenter:a().bool},N.defaultProps={children:null,autoCenter:!1};const z=(0,c.zo)(v.Z)(I||(I=(0,i.Z)(["\n display: flex;\n justify-content: space-between;\n & + & {\n margin-top: 24px;\n }\n &.footer-row-auto-center > *:only-child {\n margin: 0 auto;\n }\n\n "," {\n align-items: stretch;\n flex-direction: column;\n gap: 16px;\n > * {\n flex: 1 0 100%;\n }\n &.footer-row-auto-center > * {\n margin: 0 auto;\n }\n }\n"])),(e=>e.theme.breakpoints.down("md")));var R;function _(e){var n;let{elements:t,data:o,...i}=e;return(0,r.jsx)(L,{...i,children:(0,r.jsxs)(O.Z,{children:[(0,r.jsxs)(v.Z,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},justifyContent:"space-between",alignItems:{xs:"center",md:"space-between"},gap:2,pb:3},children:[(0,r.jsx)(v.Z,{children:t.brand}),(0,r.jsx)(v.Z,{lineHeight:1,children:t.socialMedia})]}),!(null===(n=o.navigation)||void 0===n||!n.length)&&(0,r.jsx)(v.Z,{sx:{mb:6,pt:3,borderTop:1,borderColor:"grey.200"},children:t.navigation}),(0,r.jsxs)(N,{sx:{pt:3,borderTop:1,borderColor:"grey.200"},autoCenter:!0,children:[t.copyright,t.links]})]})})}_.propTypes={elements:a().shape({brand:a().element,navigation:a().element,socialMedia:a().element,copyright:a().element,links:a().element}).isRequired,data:a().object.isRequired};const L=(0,c.zo)("div")(R||(R=(0,i.Z)(["\n padding: 32px 0 24px 0;\n .footer-brand-name,\n .footer-brand-desc {\n display: none;\n }\n && .footer-brand-logo {\n margin-right: 0;\n }\n"]))),q=_;var F;function H(e){let{elements:n,data:t,...o}=e;return(0,r.jsx)(U,{...o,children:(0,r.jsxs)(O.Z,{className:"plain-layout-container",children:[!!t.links&&(0,r.jsxs)(N,{sx:{width:1},autoCenter:!0,children:[n.copyright,n.links]}),!t.links&&(0,r.jsxs)(r.Fragment,{children:[(0,s.cloneElement)(n.brand,{name:null,description:null}),n.copyright]})]})})}H.propTypes={elements:a().shape({brand:a().element,navigation:a().element,socialMedia:a().element,copyright:a().element,links:a().element}).isRequired,data:a().object.isRequired};const U=(0,c.zo)("div")(F||(F=(0,i.Z)(["\n padding: 24px 0;\n .plain-layout-container {\n display: flex;\n justify-content: space-between;\n align-items: center;\n flex-wrap: wrap;\n gap: 8px;\n }\n"]))),B=[{name:"plain",support:(e,n)=>{var t,o;return!(null!==(t=n.navigation)&&void 0!==t&&t.length)&&!(null!==(o=n.socialMedia)&&void 0!==o&&o.length)},component:H},{name:"standard",support:()=>!0,component:q}],D=B.reduce(((e,n)=>({...e,[n.name]:n})),{});function J(e){var n,t;const{brand:o,navigation:i,socialMedia:s,copyright:l,links:a,layout:c,...d}=e,u={brand:o?(0,r.jsx)(b,{...o}):null,navigation:null!==i&&void 0!==i&&i.length?(0,r.jsx)(T,{links:i}):null,socialMedia:null!==s&&void 0!==s&&s.length?(0,r.jsx)(A,{items:s}):null,copyright:(()=>{const e=(null===l||void 0===l?void 0:l.owner)||(null===o||void 0===o?void 0:o.name);return e?(0,r.jsx)(E,{owner:e,year:(null===l||void 0===l?void 0:l.year)||void 0}):null})(),links:null!==a&&void 0!==a&&a.length?(0,r.jsx)(T,{flowLayout:!0,links:a}):null};let f=null;var p;"auto"===c?f=B.find((n=>n.support(u,e))).component:f=null===(p=D[c])||void 0===p?void 0:p.component;if(!f)throw new Error("layout ".concat(c," is not supported."));return(0,r.jsxs)(v.Z,{position:"relative",...d,children:[(0,r.jsx)(f,{elements:u,data:e}),(0,r.jsx)(v.Z,{position:"absolute",right:16,bottom:0,fontSize:12,sx:{color:"transparent","::selection":{background:"#000",color:"#fff"}},children:null===(n=window)||void 0===n||null===(t=n.blocklet)||void 0===t?void 0:t.version})]})}J.propTypes={brand:a().shape({name:a().node,description:a().string,logo:a().node}),navigation:a().arrayOf(a().shape({label:a().node,link:a().string})),socialMedia:a().arrayOf(a().shape({icon:a().node,link:a().string})),copyright:a().shape({owner:a().string,year:a().oneOfType([a().string,a().number])}),links:a().arrayOf(a().shape({label:a().node,link:a().string})),layout:a().oneOf(["auto","standard","plain"])},J.defaultProps={brand:null,navigation:null,copyright:null,socialMedia:null,links:null,layout:"auto"};const $=J;var K,Q=t(6504),W=t(94457),X=t(615);function V(e){var n,t,o,i;let{meta:l,theme:a,...c}=e;const{locale:d}=(0,u.PE)()||{},f=(0,s.useMemo)((()=>{const e=Object.assign({},window.blocklet,l);try{return(0,W.RX)(e)}catch(n){return console.error("Failed to format blocklet info",n,e),e}}),[l]);if(!f.appName)return null;const{appLogo:p,appLogoRect:h,appName:v,appDescription:b,description:x,theme:y,copyright:k}=f,w={footerNav:(0,W.KN)(null===f||void 0===f||null===(n=f.navigation)||void 0===n?void 0:n.footer,d)||[],socialMedia:(0,W.KN)(null===f||void 0===f||null===(t=f.navigation)||void 0===t?void 0:t.social,d)||[],links:(0,W.KN)(null===f||void 0===f||null===(o=f.navigation)||void 0===o?void 0:o.bottom,d)||[]},j={brand:{name:v,description:b||x,logo:h||p},navigation:(0,Q._J)(w.footerNav,(e=>({...e,label:e.title,link:e.link})),"items"),copyright:k,socialMedia:w.socialMedia,links:w.links.map((e=>({...e,label:e.title})))};return(0,r.jsx)(m.Z,{theme:a,children:(0,r.jsx)(G,{...j,...g()(c,["bordered"]),$bordered:null===c||void 0===c?void 0:c.bordered,$bgcolor:null===y||void 0===y||null===(i=y.background)||void 0===i?void 0:i.footer})})}V.propTypes={meta:X.u,theme:a().object},V.defaultProps={meta:{},theme:null};const G=(0,c.zo)($)(K||(K=(0,i.Z)(["\n ","\n color: ",";\n ","\n font-family: Inter, Avenir, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif,\n 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';\n"])),(e=>{let{$bordered:n}=e;return"border-top: 1px solid ".concat(n?p.E.strokeSep:"#eee",";")}),(e=>e.theme.palette.grey[600]),(e=>{let{$bgcolor:n}=e;return n&&"background-color: ".concat(n,";")})),Y=(0,d.withErrorBoundary)(V,{FallbackComponent:f.H})},1192:(e,n,t)=>{t.d(n,{Z:()=>A});var o,i=t(71171),r=t(96266),s=t(5057),l=t(55898),a=t.n(l),c=t(52439),d=t(71569),u=t(47685),f=t(60391),p=t(48250),h=t(68420),g=t(76223),m=t(24914),v=t.n(m),b=t(79787),x=t(9498),y=t(615),k=t(6504),w=t(94457),j=t(59763),T=t(25162);function M(e){var n,t;let{meta:o,addons:i,sessionManagerProps:l,homeLink:a,theme:c,hideNavMenu:d,...u}=e;(0,T.x)();const{locale:f}=(0,h.PE)()||{},g=(0,s.useMemo)((()=>{const e=Object.assign({},window.blocklet,o);try{return(0,w.RX)(e)}catch(n){return console.error("Failed to format blocklet info",n,e),e}}),[o]);if(!g.appName)return null;const{appLogo:m,appLogoRect:y,theme:M}=g,A=(e=>{if(null===e||void 0===e||!e.length)return{navItems:[],activeId:null};let n=1;const t=(0,k._J)(e,(e=>{var t,o;const i=e.icon?(0,r.jsx)(b.Z,{icon:e.icon}):null;if(e.items)return{id:"".concat(n++),label:e.title,icon:i,children:e.items};let s={};return(null!==(t=e.link)&&void 0!==t&&t.startsWith("http://")||null!==(o=e.link)&&void 0!==o&&o.startsWith("https://"))&&(s={target:"_blank",rel:"noreferrer"}),{id:"".concat(n++),label:(0,r.jsx)("a",{href:e.link,...s,children:e.title}),icon:i,link:e.link}}),"items"),o=(0,k.Ik)(t),i=(0,k.RX)(o.map((e=>e.link)));return{navItems:t,activeId:i>=0?o[i].id:null}})((0,w.KN)(null===g||void 0===g||null===(n=g.navigation)||void 0===n?void 0:n.header,f)),{navItems:Z,activeId:P}=A,E="function"===typeof i?e=>i(e,{navigation:A}):i,S=(0,r.jsx)(j.Z,{formattedBlocklet:g,addons:E,sessionManagerProps:l});return(0,r.jsx)(x.Z,{theme:c,children:(0,r.jsx)(C,{homeLink:a,logo:(0,r.jsx)("img",{src:y||m,alt:"logo"}),addons:S,...v()(u,["bordered"]),$bordered:null===u||void 0===u?void 0:u.bordered,$bgcolor:null===M||void 0===M||null===(t=M.background)||void 0===t?void 0:t.header,children:d||null===Z||void 0===Z||!Z.length?null:e=>{let{isMobile:n}=e;return(0,r.jsx)(p.Z,{mode:n?"inline":"horizontal",activeId:P,items:Z,className:"header-nav",bgColor:"transparent",textColor:"#777"})}})})}M.propTypes={meta:y.u,addons:a().oneOfType([a().func,a().node]),sessionManagerProps:y.r,homeLink:a().string,theme:a().object,hideNavMenu:a().bool},M.defaultProps={meta:{},addons:null,sessionManagerProps:{showRole:!0},homeLink:w.iU,theme:null,hideNavMenu:!1};const C=(0,u.zo)(f.z)(o||(o=(0,i.Z)(["\n ","\n font-family: Inter, Avenir, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif,\n 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';\n .header-logo {\n min-width: 44px;\n }\n ","\n "," {\n .header-logo {\n min-width: 32px;\n }\n }\n .header-nav {\n .navmenu-sub .navmenu-item {\n min-width: 80px;\n }\n }\n .header-nav.navmenu--horizontal {\n .navmenu-root > .navmenu-sub,\n .navmenu-root > .navmenu-item {\n padding: 16px 4px;\n\n .navmenu-sub-container {\n padding-top: 0;\n }\n }\n .navmenu-item-icon > .MuiAvatar-root,\n .navmenu-sub-icon > .MuiAvatar-root {\n width: 20px;\n height: 20px;\n }\n }\n"])),(e=>{let{$bgcolor:n}=e;return"background-color: ".concat(n||"#fff",";")}),(e=>{let{$bordered:n}=e;return n?"border-bottom: 1px solid ".concat(g.E.strokeSep,";"):""}),(e=>e.theme.breakpoints.down("md"))),A=(0,c.withErrorBoundary)(M,{FallbackComponent:d.H})},79787:(e,n,t)=>{t.d(n,{Z:()=>a});var o=t(96266),i=(t(49631),t(55898)),r=t.n(i),s=t(62681),l=t(6504);function a(e){let{icon:n,size:t,sx:i,...r}=e;const a=[...Array.isArray(i)?i:[i]];if(t&&a.push({width:t,height:t}),r.variant||a.push({"&.MuiAvatar-root":{color:"inherit",fontWeight:"bold",backgroundColor:"transparent",borderRadius:0},"&.MuiAvatar-root svg":{width:"100%",height:"100%"}}),(0,l.CB)(n))return(0,o.jsx)(s.Z,{as:"span",...r,src:n,sx:a});if((0,l.Xk)(n)){const e=t?.6*t+4:0;return(0,o.jsx)(s.Z,{as:"span",...r,sx:a,children:(0,o.jsx)("iconify-icon",{icon:n,height:e||void 0})})}return n&&"string"===typeof n?(a.push({"&.MuiAvatar-root":{display:"inline-flex",...t&&{fontSize:t-2}}}),(0,o.jsx)(s.Z,{as:"span",...r,sx:a,children:Array.from(n)[0]})):null}a.propTypes={icon:r().string.isRequired,size:r().number,sx:r().oneOfType([r().array,r().func,r().object])},a.defaultProps={size:null,sx:null}},94457:(e,n,t)=>{t.d(n,{KN:()=>c,Kb:()=>p,RX:()=>u,iU:()=>a});var o,i,r,s,l=t(6504);const a=(null===(o=window)||void 0===o||null===(i=o.blocklet)||void 0===i?void 0:i.groupPrefix)||(null===(r=window)||void 0===r||null===(s=r.blocklet)||void 0===s?void 0:s.prefix)||"/",c=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en";if(null===e||void 0===e||!e.length)return e;const t=(e,n)=>{if("string"===typeof e){if((0,l.CB)(e)){const t=new URL(e);return t.searchParams.set("locale",n),t.href}const t=new URL(e,window.location.origin);return t.searchParams.set("locale",n),t.pathname+t.search}return"object"===typeof e?e[n]||(null===e||void 0===e?void 0:e.en)||(null===e||void 0===e?void 0:e.zh):e};return(0,l._J)(e,(e=>{var o,i,r;return{...e,title:(i=e.title,r=n,"string"===typeof i?i:"object"===typeof i?i[r]||(null===i||void 0===i?void 0:i.en)||(null===i||void 0===i?void 0:i.zh):i),link:null!==(o=e.items)&&void 0!==o&&o.length?e.link:t(e.link,n),_rawLink:e.link}}),"items")},d=e=>{if(null===e||void 0===e||!e.length)return null;const n=(e=>(0,l._J)(e,(e=>e.role?{...e,role:Array.isArray(e.role)?e.role:[e.role]}:e),"items"))(e),t={header:[],footer:[],social:[],bottom:[],dashboard:[],sessionManager:[],userCenter:[]};return n.forEach((e=>{if(e.section){if(Array.isArray(e.section))e.section.forEach((n=>{var o;null===(o=t[n])||void 0===o||o.push(e)}));else if("string"===typeof e.section){var n;null===(n=t[e.section])||void 0===n||n.push(e)}}else t.header.push(e)})),t},u=e=>{if(!e)return null;const n={...e};return n.theme=(e=>{const n={...e},t=null===e||void 0===e?void 0:e.background;return"string"===typeof t?n.background={header:t,footer:t,default:t}:t&&"object"===typeof t&&(n.background={header:t.header||t.default,footer:t.footer||t.default,default:t.default}),n})(n.theme),n.navigation=d(f(n.navigation)),n},f=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return(0,l.fA)(e,((e,n)=>{var t;return!!e.link||(null===(t=n.filteredChildren)||void 0===t?void 0:t.length)}),"items")},p=(e,n)=>(0,l.fA)(e,((e,t)=>{const o=!e.role||n&&e.role.includes(n);var i;return t.isLeaf?o:o&&(null===(i=t.filteredChildren)||void 0===i?void 0:i.length)}),"items")},59763:(e,n,t)=>{t.d(n,{Z:()=>O});var o=t(96266),i=(t(49631),t(5057)),r=t(55898),s=t.n(r),l=t(47220),a=t(51724),c=t(67680),d=t(49020),u=t(72113),f=t(7469),p=t(25228),h=t(19577),g=t(2478),m=t(79278),v=t(39948),b=t(11750),x=t(55498);const y={top:-960,width:960,height:960,body:'<path fill="currentColor" d="M510-600v-210q0-12.75 8.625-21.375T540-840h270q12.75 0 21.375 8.625T840-810v210q0 12.75-8.625 21.375T810-570H540q-12.75 0-21.375-8.625T510-600M120-480v-330q0-12.75 8.625-21.375T150-840h270q12.75 0 21.375 8.625T450-810v330q0 12.75-8.625 21.375T420-450H150q-12.75 0-21.375-8.625T120-480m390 330v-330q0-12.75 8.625-21.375T540-510h270q12.75 0 21.375 8.625T840-480v330q0 12.75-8.625 21.375T810-120H540q-12.75 0-21.375-8.625T510-150m-390 0v-210q0-12.75 8.625-21.375T150-390h270q12.75 0 21.375 8.625T450-360v210q0 12.75-8.625 21.375T420-120H150q-12.75 0-21.375-8.625T120-150m60-360h210v-270H180zm390 330h210v-270H570zm0-450h210v-150H570zM180-180h210v-150H180zm210-150"/>'},k={width:24,height:24,body:'<path fill="currentColor" d="M15.95 12.3L11.7 8.05q-.15-.15-.212-.325t-.063-.375q0-.2.063-.375t.212-.325l4.25-4.25q.15-.15.325-.212t.375-.063q.2 0 .375.063t.325.212l4.25 4.25q.15.15.213.325t.062.375q0 .2-.063.375t-.212.325l-4.25 4.25q-.15.15-.325.213t-.375.062q-.2 0-.375-.062t-.325-.213ZM3 10V4q0-.425.288-.713T4 3h6q.425 0 .713.288T11 4v6q0 .425-.288.713T10 11H4q-.425 0-.713-.288T3 10Zm10 10v-6q0-.425.288-.713T14 13h6q.425 0 .713.288T21 14v6q0 .425-.288.713T20 21h-6q-.425 0-.713-.288T13 20ZM3 20v-6q0-.425.288-.713T4 13h6q.425 0 .713.288T11 14v6q0 .425-.288.713T10 21H4q-.425 0-.713-.288T3 20ZM5 9h4V5H5v4Zm11.675 1.2L19.5 7.375L16.675 4.55L13.85 7.375l2.825 2.825ZM15 19h4v-4h-4v4ZM5 19h4v-4H5v4ZM9 9Zm4.85-1.625ZM9 15Zm6 0Z"/>'};var w=t(12673),j=t(99360),T=t(28726),M=t(76223),C=t(21998),A=t(43907);function Z(e){var n;let{session:t,locale:r,size:s}=e;const l=(null===(n=window)||void 0===n?void 0:n.blocklet)||{},a=(l.navigation||[]).filter((e=>"sessionManager"===e.section&&!["/sessionManager"].includes(e.id))).filter((e=>{var n;return!!((null===e||void 0===e?void 0:e.role)||[]).includes((null===t||void 0===t||null===(n=t.user)||void 0===n?void 0:n.role)||"guest")})).map((e=>{const n=((null===l||void 0===l?void 0:l.componentMountPoints)||[]).find((n=>e.component===n.name));return{...e,component:n}})),Z=(0,i.useRef)(null),P=(0,w.Z)({open:!1}),E=(0,j.Z)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:!P.open;P.open=e}));return 0!==a.length&&null!==t&&void 0!==t&&t.user?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(c.Z,{size:"medium",ref:Z,onClick:()=>E(),children:(0,o.jsx)(x.JO,{icon:y,fontSize:s,style:{transform:"scale(1.08)"}})}),(0,o.jsx)(d.Z,{open:P.open,onClose:()=>E(!1),anchorEl:Z.current,transition:!0,placement:"bottom-end",sx:{zIndex:1600},children:e=>{let{TransitionProps:n}=e;return(0,o.jsx)(u.d,{onClickAway:e=>{e.preventDefault(),e.stopPropagation(),E(!1)},children:(0,o.jsx)(f.Z,{...n,timeout:350,children:(0,o.jsxs)(p.Z,{variant:"outlined",sx:{borderRadius:3,width:350,maxWidth:"90vw",borderColor:M.E.lineStep,p:2,border:"0 !important",boxShadow:"0px 8px 16px 0px ".concat(M.E.gray6,", 0px 0px 0px 1px ").concat(M.E.gray6)},children:[(0,o.jsx)(h.Z,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, 100px)",gridAutoRows:"minmax(100px, max-content)",justifyContent:"space-between",maxHeight:350,overflowY:"auto",p:0},children:a.map((e=>{var n,t;return(0,o.jsx)(g.ZP,{disablePadding:!0,children:(0,o.jsxs)(m.Z,{href:e.link,sx:{p:1,display:"flex",flexDirection:"column",alignItems:"center",gap:1,width:"100%",height:"100%",borderRadius:2,"&:hover":{backgroundColor:M.E.surfacePrimarySubtitle}},children:[null!==e&&void 0!==e&&null!==(n=e.component)&&void 0!==n&&n.did?(0,o.jsx)(v.Z,{component:"img",src:"".concat(C.Bu,"/blocklet/logo-bundle/").concat(e.component.did),sx:{borderRadius:2,width:50,height:50,objectFit:"contain"}}):(0,o.jsx)(x.JO,{fontSize:50,icon:e.icon||k,color:M.E.textSubtitle}),(0,o.jsx)(b.Z,{sx:{fontSize:"12px",color:M.E.textBase,textAlign:"center",lineHeight:"normal"},children:(null===(t=e.title)||void 0===t?void 0:t[r])||e.title})]})},e.id)}))}),(0,o.jsx)(A.Z,{session:t,children:(0,o.jsx)(T.Z,{variant:"outlined",fullWidth:!0,href:C.Rt,sx:{mt:1,borderRadius:2,color:M.E.textBase,borderColor:M.E.lineBorderStrong,"&:hover":{color:M.E.primaryBase,borderColor:M.E.primaryBase}},children:"zh"===r?"\u7ba1\u7406":"Manage"})})]})})})}})]}):null}Z.propTypes={session:s().object.isRequired,locale:s().string,size:s().number},Z.defaultProps={locale:"en",size:24};var P=t(30296),E=t(68420),S=t(615),I=t(94457);function O(e){var n,t,r,s;let{formattedBlocklet:c,addons:d,sessionManagerProps:u}=e;const f=(0,i.useContext)(l.B3),{locale:p}=(0,E.PE)()||{},{enableConnect:h=!0,enableLocale:g=!0}=c,m=!(null===f||void 0===f||null===(n=f.session)||void 0===n||!n.user);let v=(0,I.KN)(null===c||void 0===c||null===(t=c.navigation)||void 0===t?void 0:t.sessionManager,p)||[];v=(0,I.Kb)(v,null===f||void 0===f||null===(r=f.session)||void 0===r||null===(s=r.user)||void 0===s?void 0:s.role);const b=(()=>{if(d&&"function"!==typeof d)return Array.isArray(d)?d:[d];let e=[];if(g&&p&&e.push((0,o.jsx)(P.Z,{showText:!1},"locale-selector")),h&&f){const n=[];if(m){(v?v.slice(0,5):[]).forEach((e=>{n.push({label:e.title,icon:e.icon?(0,o.jsx)("iconify-icon",{icon:e.icon,height:24,style:{marginRight:8}}):null,component:"a",href:e.link,key:e.link})}))}e.push((0,o.jsx)(Z,{session:f.session,locale:p},"session-blocklet")),e.push((0,o.jsx)(a.Z,{session:f.session,locale:p,menu:n,showRole:!0,...u},"session-user"))}return"function"===typeof d&&(e=d(e)||[]),e})();return(0,i.createElement)(o.Fragment,null,...Array.isArray(b)?b:[b])}O.propTypes={formattedBlocklet:s().object.isRequired,addons:s().oneOfType([s().func,s().node]),sessionManagerProps:S.r},O.defaultProps={addons:null,sessionManagerProps:{showRole:!0}}},9498:(e,n,t)=>{t.d(n,{Z:()=>a});var o=t(96266),i=t(55898),r=t.n(i),s=t(47685);const l=(0,s.jG)();function a(e){let{theme:n,children:t}=e;const i=n?(0,s.jG)(n):l;return(0,o.jsx)(s.f6,{theme:i,children:t})}a.propTypes={children:r().any.isRequired,theme:r().object},a.defaultProps={theme:null}},25162:(e,n,t)=>{t.d(n,{x:()=>r});var o=t(5057),i=t(60829);const r=()=>{const e=(0,i.Z)();(0,o.useEffect)((()=>{e.wallet&&t.e(2365).then(t.t.bind(t,72365,23)).then((e=>{e.call||(e=e.default),e.call("arcHideTopBar","{}")})).catch((e=>{console.error("load dsbridge error",e)}))}),[e])}},615:(e,n,t)=>{t.d(n,{r:()=>s,u:()=>r});var o=t(55898),i=t.n(o);const r=i().shape({appLogo:i().node,appName:i().string,theme:i().shape({background:i().string}),enableConnect:i().bool,enableLocale:i().bool,navigation:i().arrayOf(i().shape({title:i().oneOfType([i().string,i().object]),link:i().oneOfType([i().string,i().object]),icon:i().string,items:i().arrayOf(i().shape({title:i().oneOfType([i().string,i().object]),link:i().oneOfType([i().string,i().object])}))}))}),s=i().shape({showText:i().bool,showRole:i().bool,switchDid:i().bool,switchProfile:i().bool,switchPassport:i().bool,disableLogout:i().bool,onLogin:i().func,onLogout:i().func,onSwitchDid:i().func,onSwitchProfile:i().func,onSwitchPassport:i().func,menu:i().array,menuRender:i().func,dark:i().bool,size:i().number})},6504:(e,n,t)=>{t.d(n,{CB:()=>s,Ik:()=>i,RX:()=>a,Xk:()=>l,_J:()=>o,fA:()=>r});const o=function(e,n){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"children";return e.map((e=>Array.isArray(e[t])?n({...e,[t]:o(e[t],n,t)}):n(e)))},i=function(e){const n=[];return o(e,(e=>n.push(e)),arguments.length>1&&void 0!==arguments[1]?arguments[1]:"children"),n},r=function(e,n){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"children";return e.map((e=>({...e}))).filter((e=>{const o=e[t];if(Array.isArray(o)){const i=r(o,n,t);e[t]=null!==i&&void 0!==i&&i.length?i:void 0}const i={filteredChildren:e[t],isLeaf:!(null!==o&&void 0!==o&&o.length)};return n(e,i)}))},s=e=>/^https?:\/\//.test(e),l=e=>/^[\w-]+:[\w-]+$/.test(e),a=function(){const e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map(((e,n)=>({path:e,index:n}))).filter((e=>(e=>{if(!e||null===e||void 0===e||!e.startsWith("/"))return!1;const n=e=>e.endsWith("/")?e:"".concat(e,"/"),t=n(window.location.pathname),o=n(new URL(e,window.location.origin).pathname);return t.startsWith(o)})(e.path)));if(null===e||void 0===e||!e.length)return-1;return e.slice(1).reduce(((e,n)=>e.path.length>=n.path.length?e:n),e[0]).index}},49631:(e,n,t)=>{var o=t(56666);const i=Object.freeze({left:0,top:0,width:16,height:16}),r=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),s=Object.freeze({...i,...r}),l=Object.freeze({...s,body:"",hidden:!1}),a=Object.freeze({width:null,height:null}),c=Object.freeze({...a,...r});const d=/[\s,]+/;const u={...c,preserveAspectRatio:""};function f(e){const n={...u},t=(n,t)=>e.getAttribute(n)||t;var o;return n.width=t("width",null),n.height=t("height",null),n.rotate=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const t=e.replace(/^-?[0-9.]*/,"");function o(e){for(;e<0;)e+=4;return e%4}if(""===t){const n=parseInt(e);return isNaN(n)?0:o(n)}if(t!==e){let n=0;switch(t){case"%":n=25;break;case"deg":n=90}if(n){let i=parseFloat(e.slice(0,e.length-t.length));return isNaN(i)?0:(i/=n,i%1===0?o(i):0)}}return n}(t("rotate","")),o=n,t("flip","").split(d).forEach((e=>{switch(e.trim()){case"horizontal":o.hFlip=!0;break;case"vertical":o.vFlip=!0}})),n.preserveAspectRatio=t("preserveAspectRatio",t("preserveaspectratio","")),n}const p=/^[a-z0-9]+(-[a-z0-9]+)*$/,h=function(e,n,t){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";const i=e.split(":");if("@"===e.slice(0,1)){if(i.length<2||i.length>3)return null;o=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const e=i.pop(),t=i.pop(),r={provider:i.length>0?i[0]:o,prefix:t,name:e};return n&&!g(r)?null:r}const r=i[0],s=r.split("-");if(s.length>1){const e={provider:o,prefix:s.shift(),name:s.join("-")};return n&&!g(e)?null:e}if(t&&""===o){const e={provider:o,prefix:"",name:r};return n&&!g(e,t)?null:e}return null},g=(e,n)=>!!e&&!(""!==e.provider&&!e.provider.match(p)||!(n&&""===e.prefix||e.prefix.match(p))||!e.name.match(p));function m(e,n){const t=function(e,n){const t={};!e.hFlip!==!n.hFlip&&(t.hFlip=!0),!e.vFlip!==!n.vFlip&&(t.vFlip=!0);const o=((e.rotate||0)+(n.rotate||0))%4;return o&&(t.rotate=o),t}(e,n);for(const o in l)o in r?o in e&&!(o in t)&&(t[o]=r[o]):o in n?t[o]=n[o]:o in e&&(t[o]=e[o]);return t}function v(e,n,t){const o=e.icons,i=e.aliases||Object.create(null);let r={};function s(e){r=m(o[e]||i[e],r)}return s(n),t.forEach(s),m(e,r)}function b(e,n){const t=[];if("object"!==typeof e||"object"!==typeof e.icons)return t;e.not_found instanceof Array&&e.not_found.forEach((e=>{n(e,null),t.push(e)}));const o=function(e,n){const t=e.icons,o=e.aliases||Object.create(null),i=Object.create(null);return(n||Object.keys(t).concat(Object.keys(o))).forEach((function e(n){if(t[n])return i[n]=[];if(!(n in i)){i[n]=null;const t=o[n]&&o[n].parent,r=t&&e(t);r&&(i[n]=[t].concat(r))}return i[n]})),i}(e);for(const i in o){const r=o[i];r&&(n(i,v(e,i,r)),t.push(i))}return t}const x={provider:"",aliases:{},not_found:{},...i};function y(e,n){for(const t in n)if(t in e&&typeof e[t]!==typeof n[t])return!1;return!0}function k(e){if("object"!==typeof e||null===e)return null;const n=e;if("string"!==typeof n.prefix||!e.icons||"object"!==typeof e.icons)return null;if(!y(e,x))return null;const t=n.icons;for(const i in t){const e=t[i];if(!i.match(p)||"string"!==typeof e.body||!y(e,l))return null}const o=n.aliases||Object.create(null);for(const i in o){const e=o[i],n=e.parent;if(!i.match(p)||"string"!==typeof n||!t[n]&&!o[n]||!y(e,l))return null}return n}const w=Object.create(null);function j(e,n){const t=w[e]||(w[e]=Object.create(null));return t[n]||(t[n]=function(e,n){return{provider:e,prefix:n,icons:Object.create(null),missing:new Set}}(e,n))}function T(e,n){return k(n)?b(n,((n,t)=>{t?e.icons[n]=t:e.missing.add(n)})):[]}function M(e,n){let t=[];return("string"===typeof e?[e]:Object.keys(w)).forEach((e=>{("string"===typeof e&&"string"===typeof n?[n]:Object.keys(w[e]||{})).forEach((n=>{const o=j(e,n);t=t.concat(Object.keys(o.icons).map((t=>(""!==e?"@"+e+":":"")+n+":"+t)))}))})),t}let C=!1;function A(e){return"boolean"===typeof e&&(C=e),C}function Z(e){const n="string"===typeof e?h(e,!0,C):e;if(n){const e=j(n.provider,n.prefix),t=n.name;return e.icons[t]||(e.missing.has(t)?null:void 0)}}function P(e,n){const t=h(e,!0,C);if(!t)return!1;return function(e,n,t){try{if("string"===typeof t.body)return e.icons[n]={...t},!0}catch(o){}return!1}(j(t.provider,t.prefix),t.name,n)}function E(e,n){if("object"!==typeof e)return!1;if("string"!==typeof n&&(n=e.provider||""),C&&!n&&!e.prefix){let n=!1;return k(e)&&(e.prefix="",b(e,((e,t)=>{t&&P(e,t)&&(n=!0)}))),n}const t=e.prefix;if(!g({provider:n,prefix:t,name:"a"}))return!1;return!!T(j(n,t),e)}function S(e){return!!Z(e)}function I(e){const n=Z(e);return n?{...s,...n}:null}function O(e,n){e.forEach((e=>{const t=e.loaderCallbacks;t&&(e.loaderCallbacks=t.filter((e=>e.id!==n)))}))}let N=0;const z=Object.create(null);function R(e,n){z[e]=n}function _(e){return z[e]||z[""]}var L={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function q(e,n,t,o){const i=e.resources.length,r=e.random?Math.floor(Math.random()*i):e.index;let s;if(e.random){let n=e.resources.slice(0);for(s=[];n.length>1;){const e=Math.floor(Math.random()*n.length);s.push(n[e]),n=n.slice(0,e).concat(n.slice(e+1))}s=s.concat(n)}else s=e.resources.slice(r).concat(e.resources.slice(0,r));const l=Date.now();let a,c="pending",d=0,u=null,f=[],p=[];function h(){u&&(clearTimeout(u),u=null)}function g(){"pending"===c&&(c="aborted"),h(),f.forEach((e=>{"pending"===e.status&&(e.status="aborted")})),f=[]}function m(e,n){n&&(p=[]),"function"===typeof e&&p.push(e)}function v(){c="failed",p.forEach((e=>{e(void 0,a)}))}function b(){f.forEach((e=>{"pending"===e.status&&(e.status="aborted")})),f=[]}function x(){if("pending"!==c)return;h();const o=s.shift();if(void 0===o)return f.length?void(u=setTimeout((()=>{h(),"pending"===c&&(b(),v())}),e.timeout)):void v();const i={status:"pending",resource:o,callback:(n,t)=>{!function(n,t,o){const i="success"!==t;switch(f=f.filter((e=>e!==n)),c){case"pending":break;case"failed":if(i||!e.dataAfterTimeout)return;break;default:return}if("abort"===t)return a=o,void v();if(i)return a=o,void(f.length||(s.length?x():v()));if(h(),b(),!e.random){const t=e.resources.indexOf(n.resource);-1!==t&&t!==e.index&&(e.index=t)}c="completed",p.forEach((e=>{e(o)}))}(i,n,t)}};f.push(i),d++,u=setTimeout(x,e.rotate),t(o,n,i.callback)}return"function"===typeof o&&p.push(o),setTimeout(x),function(){return{startTime:l,payload:n,status:c,queriesSent:d,queriesPending:f.length,subscribe:m,abort:g}}}function F(e){const n={...L,...e};let t=[];function o(){t=t.filter((e=>"pending"===e().status))}return{query:function(e,i,r){const s=q(n,e,i,((e,n)=>{o(),r&&r(e,n)}));return t.push(s),s},find:function(e){return t.find((n=>e(n)))||null},setIndex:e=>{n.index=e},getIndex:()=>n.index,cleanup:o}}function H(e){let n;if("string"===typeof e.resources)n=[e.resources];else if(n=e.resources,!(n instanceof Array)||!n.length)return null;return{resources:n,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:!0===e.random,index:e.index||0,dataAfterTimeout:!1!==e.dataAfterTimeout}}const U=Object.create(null),B=["https://api.simplesvg.com","https://api.unisvg.com"],D=[];for(;B.length>0;)1===B.length||Math.random()>.5?D.push(B.shift()):D.push(B.pop());function J(e,n){const t=H(n);return null!==t&&(U[e]=t,!0)}function $(e){return U[e]}function K(){return Object.keys(U)}function Q(){}U[""]=H({resources:["https://api.iconify.design"].concat(D)});const W=Object.create(null);function X(e,n,t){let o,i;if("string"===typeof e){const n=_(e);if(!n)return t(void 0,424),Q;i=n.send;const r=function(e){if(!W[e]){const n=$(e);if(!n)return;const t={config:n,redundancy:F(n)};W[e]=t}return W[e]}(e);r&&(o=r.redundancy)}else{const n=H(e);if(n){o=F(n);const t=_(e.resources?e.resources[0]:"");t&&(i=t.send)}}return o&&i?o.query(n,i,t)().abort:(t(void 0,424),Q)}const V="iconify2",G="iconify",Y=G+"-count",ee=G+"-version",ne=36e5,te=168;function oe(e,n){try{return e.getItem(n)}catch(t){}}function ie(e,n,t){try{return e.setItem(n,t),!0}catch(o){}}function re(e,n){try{e.removeItem(n)}catch(t){}}function se(e,n){return ie(e,Y,n.toString())}function le(e){return parseInt(oe(e,Y))||0}const ae={local:!0,session:!0},ce={local:new Set,session:new Set};let de=!1;let ue="undefined"===typeof window?{}:window;function fe(e){const n=e+"Storage";try{if(ue&&ue[n]&&"number"===typeof ue[n].length)return ue[n]}catch(t){}ae[e]=!1}function pe(e,n){const t=fe(e);if(!t)return;const o=oe(t,ee);if(o!==V){if(o){const e=le(t);for(let n=0;n<e;n++)re(t,G+n.toString())}return ie(t,ee,V),void se(t,0)}const i=Math.floor(Date.now()/ne)-te,r=e=>{const o=G+e.toString(),r=oe(t,o);if("string"===typeof r){try{const t=JSON.parse(r);if("object"===typeof t&&"number"===typeof t.cached&&t.cached>i&&"string"===typeof t.provider&&"object"===typeof t.data&&"string"===typeof t.data.prefix&&n(t,e))return!0}catch(s){}re(t,o)}};let s=le(t);for(let l=s-1;l>=0;l--)r(l)||(l===s-1?(s--,se(t,s)):ce[e].add(l))}function he(){if(!de){de=!0;for(const e in ae)pe(e,(e=>{const n=e.data,t=j(e.provider,n.prefix);if(!T(t,n).length)return!1;const o=n.lastModified||-1;return t.lastModifiedCached=t.lastModifiedCached?Math.min(t.lastModifiedCached,o):o,!0}))}}function ge(e,n){function t(t){let o;if(!ae[t]||!(o=fe(t)))return;const i=ce[t];let r;if(i.size)i.delete(r=Array.from(i).shift());else if(r=le(o),!se(o,r+1))return;const s={cached:Math.floor(Date.now()/ne),provider:e.provider,data:n};return ie(o,G+r.toString(),JSON.stringify(s))}de||he(),n.lastModified&&!function(e,n){const t=e.lastModifiedCached;if(t&&t>=n)return t===n;if(e.lastModifiedCached=n,t)for(const o in ae)pe(o,(t=>{const o=t.data;return t.provider!==e.provider||o.prefix!==e.prefix||o.lastModified===n}));return!0}(e,n.lastModified)||Object.keys(n.icons).length&&(n.not_found&&delete(n=Object.assign({},n)).not_found,t("local")||t("session"))}function me(){}function ve(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout((()=>{e.iconsLoaderFlag=!1,function(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout((()=>{e.pendingCallbacksFlag=!1;const n=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!n.length)return;let t=!1;const o=e.provider,i=e.prefix;n.forEach((n=>{const r=n.icons,s=r.pending.length;r.pending=r.pending.filter((n=>{if(n.prefix!==i)return!0;const s=n.name;if(e.icons[s])r.loaded.push({provider:o,prefix:i,name:s});else{if(!e.missing.has(s))return t=!0,!0;r.missing.push({provider:o,prefix:i,name:s})}return!1})),r.pending.length!==s&&(t||O([e],n.id),n.callback(r.loaded.slice(0),r.missing.slice(0),r.pending.slice(0),n.abort))}))})))}(e)})))}const be=(e,n)=>{const t=function(e){let n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],t=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const o=[];return e.forEach((e=>{const i="string"===typeof e?h(e,n,t):e;i&&o.push(i)})),o}(e,!0,A()),o=function(e){const n={loaded:[],missing:[],pending:[]},t=Object.create(null);e.sort(((e,n)=>e.provider!==n.provider?e.provider.localeCompare(n.provider):e.prefix!==n.prefix?e.prefix.localeCompare(n.prefix):e.name.localeCompare(n.name)));let o={provider:"",prefix:"",name:""};return e.forEach((e=>{if(o.name===e.name&&o.prefix===e.prefix&&o.provider===e.provider)return;o=e;const i=e.provider,r=e.prefix,s=e.name,l=t[i]||(t[i]=Object.create(null)),a=l[r]||(l[r]=j(i,r));let c;c=s in a.icons?n.loaded:""===r||a.missing.has(s)?n.missing:n.pending;const d={provider:i,prefix:r,name:s};c.push(d)})),n}(t);if(!o.pending.length){let e=!0;return n&&setTimeout((()=>{e&&n(o.loaded,o.missing,o.pending,me)})),()=>{e=!1}}const i=Object.create(null),r=[];let s,l;return o.pending.forEach((e=>{const{provider:n,prefix:t}=e;if(t===l&&n===s)return;s=n,l=t,r.push(j(n,t));const o=i[n]||(i[n]=Object.create(null));o[t]||(o[t]=[])})),o.pending.forEach((e=>{const{provider:n,prefix:t,name:o}=e,r=j(n,t),s=r.pendingIcons||(r.pendingIcons=new Set);s.has(o)||(s.add(o),i[n][t].push(o))})),r.forEach((e=>{const{provider:n,prefix:t}=e;i[n][t].length&&function(e,n){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(n).sort():e.iconsToLoad=n,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout((()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:t}=e,o=e.iconsToLoad;let i;delete e.iconsToLoad,o&&(i=_(n))&&i.prepare(n,t,o).forEach((t=>{X(n,t,(n=>{if("object"!==typeof n)t.icons.forEach((n=>{e.missing.add(n)}));else try{const t=T(e,n);if(!t.length)return;const o=e.pendingIcons;o&&t.forEach((e=>{o.delete(e)})),ge(e,n)}catch(o){console.error(o)}ve(e)}))}))})))}(e,i[n][t])})),n?function(e,n,t){const o=N++,i=O.bind(null,t,o);if(!n.pending.length)return i;const r={id:o,icons:n,callback:e,abort:i};return t.forEach((e=>{(e.loaderCallbacks||(e.loaderCallbacks=[])).push(r)})),i}(n,o,r):me},xe=e=>new Promise(((n,t)=>{const o="string"===typeof e?h(e,!0):e;o?be([o||e],(i=>{if(i.length&&o){const e=Z(o);if(e)return void n({...s,...e})}t(e)})):t(e)}));function ye(e,n){const t="string"===typeof e?h(e,!0,!0):null;if(!t){const n=function(e){try{const n="string"===typeof e?JSON.parse(e):e;if("string"===typeof n.body)return{...n}}catch(n){}}(e);return{value:e,data:n}}const o=Z(t);if(void 0!==o||!t.prefix)return{value:e,name:t,data:o};const i=be([t],(()=>n(e,t,Z(t))));return{value:e,name:t,loading:i}}function ke(e){return e.hasAttribute("inline")}let we=!1;try{we=0===navigator.vendor.indexOf("Apple")}catch(cn){}const je=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Te=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Me(e,n,t){if(1===n)return e;if(t=t||100,"number"===typeof e)return Math.ceil(e*n*t)/t;if("string"!==typeof e)return e;const o=e.split(je);if(null===o||!o.length)return e;const i=[];let r=o.shift(),s=Te.test(r);for(;;){if(s){const e=parseFloat(r);isNaN(e)?i.push(r):i.push(Math.ceil(e*n*t)/t)}else i.push(r);if(r=o.shift(),void 0===r)return i.join("");s=!s}}const Ce=e=>"unset"===e||"undefined"===e||"none"===e;function Ae(e,n){const t={...s,...e},o={...c,...n},i={left:t.left,top:t.top,width:t.width,height:t.height};let r=t.body;[t,o].forEach((e=>{const n=[],t=e.hFlip,o=e.vFlip;let s,l=e.rotate;switch(t?o?l+=2:(n.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),n.push("scale(-1 1)"),i.top=i.left=0):o&&(n.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),n.push("scale(1 -1)"),i.top=i.left=0),l<0&&(l-=4*Math.floor(l/4)),l%=4,l){case 1:s=i.height/2+i.top,n.unshift("rotate(90 "+s.toString()+" "+s.toString()+")");break;case 2:n.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:s=i.width/2+i.left,n.unshift("rotate(-90 "+s.toString()+" "+s.toString()+")")}l%2===1&&(i.left!==i.top&&(s=i.left,i.left=i.top,i.top=s),i.width!==i.height&&(s=i.width,i.width=i.height,i.height=s)),n.length&&(r='<g transform="'+n.join(" ")+'">'+r+"</g>")}));const l=o.width,a=o.height,d=i.width,u=i.height;let f,p;null===l?(p=null===a?"1em":"auto"===a?u:a,f=Me(p,d/u)):(f="auto"===l?d:l,p=null===a?Me(f,u/d):"auto"===a?u:a);const h={},g=(e,n)=>{Ce(n)||(h[e]=n.toString())};return g("width",f),g("height",p),h.viewBox=i.left.toString()+" "+i.top.toString()+" "+d.toString()+" "+u.toString(),{attributes:h,body:r}}let Ze=(()=>{let e;try{if(e=fetch,"function"===typeof e)return e}catch(cn){}})();function Pe(e){Ze=e}function Ee(){return Ze}const Se={prepare:(e,n,t)=>{const o=[],i=function(e,n){const t=$(e);if(!t)return 0;let o;if(t.maxURL){let e=0;t.resources.forEach((n=>{const t=n;e=Math.max(e,t.length)}));const i=n+".json?icons=";o=t.maxURL-e-t.path.length-i.length}else o=0;return o}(e,n),r="icons";let s={type:r,provider:e,prefix:n,icons:[]},l=0;return t.forEach(((t,a)=>{l+=t.length+1,l>=i&&a>0&&(o.push(s),s={type:r,provider:e,prefix:n,icons:[]},l=t.length),s.icons.push(t)})),o.push(s),o},send:(e,n,t)=>{if(!Ze)return void t("abort",424);let o=function(e){if("string"===typeof e){const n=$(e);if(n)return n.path}return"/"}(n.provider);switch(n.type){case"icons":{const e=n.prefix,t=n.icons.join(",");o+=e+".json?"+new URLSearchParams({icons:t}).toString();break}case"custom":{const e=n.uri;o+="/"===e.slice(0,1)?e.slice(1):e;break}default:return void t("abort",400)}let i=503;Ze(e+o).then((e=>{const n=e.status;if(200===n)return i=501,e.json();setTimeout((()=>{t(function(e){return 404===e}(n)?"abort":"next",n)}))})).then((e=>{"object"===typeof e&&null!==e?setTimeout((()=>{t("success",e)})):setTimeout((()=>{404===e?t("abort",e):t("next",i)}))})).catch((()=>{t("next",i)}))}};function Ie(e,n){switch(e){case"local":case"session":ae[e]=n;break;case"all":for(const e in ae)ae[e]=n}}const Oe="data-style";let Ne="";function ze(e){Ne=e}function Re(e,n){let t=Array.from(e.childNodes).find((e=>e.hasAttribute&&e.hasAttribute(Oe)));t||(t=document.createElement("style"),t.setAttribute(Oe,Oe),e.appendChild(t)),t.textContent=":host{display:inline-block;vertical-align:"+(n?"-0.125em":"0")+"}span,svg{display:block}"+Ne}function _e(){let e;R("",Se),A(!0);try{e=window}catch(cn){}if(e){if(he(),void 0!==e.IconifyPreload){const n=e.IconifyPreload,t="Invalid IconifyPreload syntax.";"object"===typeof n&&null!==n&&(n instanceof Array?n:[n]).forEach((e=>{try{("object"!==typeof e||null===e||e instanceof Array||"object"!==typeof e.icons||"string"!==typeof e.prefix||!E(e))&&console.error(t)}catch(n){console.error(t)}}))}if(void 0!==e.IconifyProviders){const t=e.IconifyProviders;if("object"===typeof t&&null!==t)for(const e in t){const o="IconifyProviders["+e+"] is invalid.";try{const n=t[e];if("object"!==typeof n||!n||void 0===n.resources)continue;J(e,n)||console.error(o)}catch(n){console.error(o)}}}}return{enableCache:e=>Ie(e,!0),disableCache:e=>Ie(e,!1),iconExists:S,getIcon:I,listIcons:M,addIcon:P,addCollection:E,calculateSize:Me,buildIcon:Ae,loadIcons:be,loadIcon:xe,addAPIProvider:J,appendCustomStyle:ze,_api:{getAPIConfig:$,setAPIModule:R,sendAPIQuery:X,setFetch:Pe,getFetch:Ee,listAPIProviders:K}}}function Le(e,n){let t=-1===e.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const o in n)t+=" "+o+'="'+n[o]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+t+">"+e+"</svg>"}const qe={"background-color":"currentColor"},Fe={"background-color":"transparent"},He={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},Ue={"-webkit-mask":qe,mask:qe,background:Fe};for(const dn in Ue){const e=Ue[dn];for(const n in He)e[dn+"-"+n]=He[n]}function Be(e){return e?e+(e.match(/^[-0-9.]+$/)?"px":""):"inherit"}let De;function Je(e){return void 0===De&&function(){try{De=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch(cn){De=null}}(),De?De.createHTML(e):e}function $e(e,n){const t=n.icon.data,o=n.customisations,i=Ae(t,o);o.preserveAspectRatio&&(i.attributes.preserveAspectRatio=o.preserveAspectRatio);const r=n.renderedMode;let l;if("svg"===r)l=function(e){const n=document.createElement("span"),t=e.attributes;let o="";t.width||(o="width: inherit;"),t.height||(o+="height: inherit;"),o&&(t.style=o);const i=Le(e.body,t);return n.innerHTML=Je(i),n.firstChild}(i);else l=function(e,n,t){const o=document.createElement("span");let i=e.body;-1!==i.indexOf("<a")&&(i+="\x3c!-- "+Date.now()+" --\x3e");const r=e.attributes,s='url("'+(c=Le(i,{...r,width:n.width+"",height:n.height+""}),"data:image/svg+xml,"+function(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}(c)+'")'),l=o.style,a={"--svg":s,width:Be(r.width),height:Be(r.height),...t?qe:Fe};var c;for(const d in a)l.setProperty(d,a[d]);return o}(i,{...s,...t},"mask"===r);const a=Array.from(e.childNodes).find((e=>{const n=e.tagName&&e.tagName.toUpperCase();return"SPAN"===n||"SVG"===n}));a?"SPAN"===l.tagName&&a.tagName===l.tagName?a.setAttribute("style",l.getAttribute("style")):e.replaceChild(l,a):e.appendChild(l)}function Ke(e,n,t){return{rendered:!1,inline:n,icon:e,lastRender:t&&(t.rendered?t:t.lastRender)}}const Qe=function(){let e,n,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"iconify-icon";try{e=window.customElements,n=window.HTMLElement}catch(cn){return}if(!e||!n)return;const i=e.get(t);if(i)return i;const r=["icon","mode","inline","width","height","rotate","flip"],s=class extends n{constructor(){super(),(0,o.Z)(this,"_shadowRoot",void 0),(0,o.Z)(this,"_state",void 0),(0,o.Z)(this,"_checkQueued",!1);const e=this._shadowRoot=this.attachShadow({mode:"open"}),n=ke(this);Re(e,n),this._state=Ke({value:""},n),this._queueCheck()}static get observedAttributes(){return r.slice(0)}attributeChangedCallback(e){if("inline"===e){const e=ke(this),n=this._state;e!==n.inline&&(n.inline=e,Re(this._shadowRoot,e))}else this._queueCheck()}get icon(){const e=this.getAttribute("icon");if(e&&"{"===e.slice(0,1))try{return JSON.parse(e)}catch(cn){}return e}set icon(e){"object"===typeof e&&(e=JSON.stringify(e)),this.setAttribute("icon",e)}get inline(){return ke(this)}set inline(e){e?this.setAttribute("inline","true"):this.removeAttribute("inline")}restartAnimation(){const e=this._state;if(e.rendered){const n=this._shadowRoot;if("svg"===e.renderedMode)try{return void n.lastChild.setCurrentTime(0)}catch(cn){}$e(n,e)}}get status(){const e=this._state;return e.rendered?"rendered":null===e.icon.data?"failed":"loading"}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout((()=>{this._check()})))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;const e=this._state,n=this.getAttribute("icon");if(n!==e.icon.value)return void this._iconChanged(n);if(!e.rendered)return;const t=this.getAttribute("mode"),o=f(this);(e.attrMode!==t||function(e,n){for(const t in u)if(e[t]!==n[t])return!0;return!1}(e.customisations,o))&&this._renderIcon(e.icon,o,t)}_iconChanged(e){const n=ye(e,((e,n,t)=>{const o=this._state;if(o.rendered||this.getAttribute("icon")!==e)return;const i={value:e,name:n,data:t};i.data?this._gotIconData(i):o.icon=i}));n.data?this._gotIconData(n):this._state=Ke(n,this._state.inline,this._state)}_gotIconData(e){this._checkQueued=!1,this._renderIcon(e,f(this),this.getAttribute("mode"))}_renderIcon(e,n,t){const o=function(e,n){switch(n){case"svg":case"bg":case"mask":return n}return"style"===n||!we&&-1!==e.indexOf("<a")?-1===e.indexOf("currentColor")?"bg":"mask":"svg"}(e.data.body,t),i=this._state.inline;$e(this._shadowRoot,this._state={rendered:!0,icon:e,inline:i,customisations:n,attrMode:t,renderedMode:o})}};r.forEach((e=>{e in s.prototype||Object.defineProperty(s.prototype,e,{get:function(){return this.getAttribute(e)},set:function(n){null!==n?this.setAttribute(e,n):this.removeAttribute(e)}})}));const l=_e();for(const o in l)s[o]=s.prototype[o]=l[o];return e.define(t,s),s}()||_e(),{enableCache:We,disableCache:Xe,iconExists:Ve,getIcon:Ge,listIcons:Ye,addIcon:en,addCollection:nn,calculateSize:tn,buildIcon:on,loadIcons:rn,loadIcon:sn,addAPIProvider:ln,_api:an}=Qe}}]);
|