@abtnode/webapp 1.16.23-beta-47ca27f8 → 1.16.23-beta-c9c4e08e
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 +6 -5
- package/build/index.html +1 -1
- package/build/service-worker.js +1 -1
- package/build/static/js/1986.60c8f2a6.chunk.js +1 -0
- package/build/static/js/{318.4b19c6e5.chunk.js → 318.e3aacd12.chunk.js} +1 -1
- package/build/static/js/4512.37518120.chunk.js +1 -0
- package/build/static/js/6064.36af74fc.chunk.js +1 -0
- package/build/static/js/{main.4f192644.js → main.269ef1c6.js} +2 -2
- package/package.json +1 -1
- package/build/static/js/5126.a0f7c984.chunk.js +0 -1
- package/build/static/js/9249.56a634fd.chunk.js +0 -1
- /package/build/static/js/{main.4f192644.js.LICENSE.txt → main.269ef1c6.js.LICENSE.txt} +0 -0
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[5126],{35126:(e,n,i)=>{i.r(n),i.d(n,{default:()=>he});var t=i(71171),r=i(5057),o=i(33518),s=i(85493),a=i(10458),c=i.n(a),l=i(6352),d=i.n(l),p=i(43681),u=i.n(p),v=i(26796),f=i(55898),h=i.n(f),m=i(79366),x=i(69544),g=i(35474),_=i(68420),w=i(13128),j=i(93350),y=i(96266);const b=(0,j.Z)((0,y.jsx)("path",{d:"M19 3H4.99c-1.11 0-1.98.89-1.98 2L3 19c0 1.1.88 2 1.99 2H19c1.1 0 2-.9 2-2V5c0-1.11-.9-2-2-2m0 12h-4c0 1.66-1.35 3-3 3s-3-1.34-3-3H4.99V5H19z"}),"Inbox");var k;function Z(e){let{invitation:n,createPassportSvg:i,passportColor:t}=e;const[o,s]=(0,r.useState)(!1),{t:a}=(0,r.useContext)(_.RD),c=(0,r.useMemo)((()=>(n.role.title||n.role.name).toUpperCase()),[n.role.title,n.role.name]),l=(0,r.useMemo)((()=>i({title:c,issuer:n.info.name,issuerDid:n.info.appDid,ownerName:"Your Name",ownerDid:n.info.appDid,preferredColor:n.info.passportColor||t})),[n,c]),d=(0,r.useCallback)((()=>{s(!0)}),[]),p=(0,r.useCallback)((()=>{s(!1)}),[]);return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(S,{children:(0,y.jsx)("div",{className:"invite-passport__card",onClick:d,children:(0,y.jsx)("div",{className:"invite-passport__cover",dangerouslySetInnerHTML:{__html:l}})})}),(0,y.jsx)(w.ZP,{open:o,title:a("invite.viewPermission"),PaperProps:{style:{minHeight:"auto",paddingBottom:"20px"}},onClose:p,children:n.role.permissions&&n.role.permissions.length>0?(0,y.jsx)("ul",{style:{listStyle:"circle",padding:"0 20px"},children:n.role.permissions.map((e=>(0,y.jsx)("li",{style:{listStyle:"circle"},children:e.description},e.name)))}):(0,y.jsxs)("div",{style:{color:"#999",textAlign:"center"},children:[(0,y.jsx)(b,{style:{width:"30px",height:"30px"}}),(0,y.jsx)("div",{children:a("invite.emptyPermission")})]})})]})}Z.propTypes={invitation:h().object.isRequired,createPassportSvg:h().func.isRequired,passportColor:h().string},Z.defaultProps={passportColor:"auto"};const S=o.Z.div(k||(k=(0,t.Z)(["\n display: flex;\n max-width: 350px;\n margin: 30px auto;\n .invite-passport__card {\n margin: 0 auto;\n width: 228px;\n height: 258px;\n flex-shrink: 0;\n .invite-passport__cover {\n cursor: pointer;\n width: 100%;\n height: 100%;\n }\n }\n .invite-passport__content {\n flex: 1;\n display: flex;\n flex-direction: column;\n }\n .invite-passport__title {\n font-weight: 700;\n font-size: 16px;\n }\n .invite-passport__description {\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n height: 3em;\n color: #999;\n font-size: 14px;\n }\n .invite-passport__view-permission {\n cursor: pointer;\n font-size: 14px;\n font-weight: 600;\n line-height: 18px;\n color: ",";\n }\n"])),(e=>{let{theme:n}=e;return n.palette.primary.main})),C=Z;var P,N=i(92459),z=i(74958),R=i(14491),T=i(70284),L=i(73545);function F(e){let{invitation:n,onLogin:i,onReceive:t,inService:o}=e;const{t:s,locale:a}=(0,_.PE)(),{connectApi:c}=(0,L.T)(),{getPassportId:l}=(0,T.Z)();let p;var u,v;"undefined"!==typeof window&&(p=null===(u=window)||void 0===u||null===(v=u.blocklet)||void 0===v?void 0:v.componentId);const f={passportId:l(),inviteId:n.inviteId,baseUrl:window.location.origin,componentId:p},h=(0,r.useCallback)((()=>{c.close()}),[c]),m=(0,r.useCallback)((function(){c.close(),i(...arguments)}),[i,c]),x=(0,r.useCallback)((()=>{"function"!==typeof t?o?c.openPopup({action:"invite",className:"connect",forceConnected:!1,autoConnect:!1,locale:a,extraParams:{provider:"wallet",...f},baseUrl:window.location.origin,prefix:d()(window.location.origin,z.Bu,z.nC),messages:{title:s("receive.dialog.title"),scan:s("receive.dialog.scan"),confirm:s("receive.dialog.confirm"),success:s("receive.dialog.success")},onSuccess:m,onClose:h},{locale:a}):c.open({action:"invite",className:"connect",forceConnected:!1,autoConnect:!1,locale:a,extraParams:f,messages:{title:s("receive.dialog.title"),scan:s("receive.dialog.scan"),confirm:s("receive.dialog.confirm"),success:s("receive.dialog.success")},onSuccess:m,onClose:h}):t()}),[c.openPopup]);return(0,y.jsxs)(I,{children:[(0,y.jsx)(N.Z,{size:"large",variant:"contained",className:"invite-receive__button","data-cy":"invite-receive-passport",color:"primary",onClick:x,children:s("invite.receive")}),(0,y.jsxs)("div",{className:"invite-receive__until",children:[s("invite.validUntil"),(0,R.o0)(n.expireDate,a)]})]})}F.propTypes={invitation:h().object.isRequired,onLogin:h().func,onReceive:h().func,inService:h().bool},F.defaultProps={onLogin:()=>{},onReceive:null,inService:!1};const I=o.Z.div(P||(P=(0,t.Z)(["\n text-align: center;\n .invite-receive__logo-wrapper {\n display: inline-flex;\n align-items: center;\n color: #9397a1;\n font-size: 14px;\n }\n .invite-receive__logo {\n height: 16px;\n margin-left: 8px;\n }\n .invite-receive__button {\n width: 100%;\n margin: 16px 0;\n white-space: nowrap;\n }\n .invite-receive__until {\n text-align: center;\n font-size: 14px;\n }\n .invite-receive__description {\n color: #999;\n text-align: left;\n list-style: decimal;\n padding: 0;\n padding-left: 1.2em;\n margin: 40px 0;\n }\n .invite-receive__description-item {\n list-style: decimal;\n }\n .invite-receive__link {\n color: ",";\n }\n"])),(e=>{let{theme:n}=e;return n.palette.primary.main})),E=F;var D;function U(e){let{onLogin:n}=e;const{t:i}=(0,_.PE)();return(0,y.jsx)(M,{children:(0,y.jsx)(N.Z,{size:"large",variant:"contained",className:"invite-receive__button","data-cy":"invite-receive-passport",color:"primary",onClick:()=>n(),children:i("common.connect")})})}U.propTypes={onLogin:h().func},U.defaultProps={onLogin:()=>{}};const M=o.Z.div(D||(D=(0,t.Z)(["\n text-align: center;\n .invite-receive__logo-wrapper {\n display: inline-flex;\n align-items: center;\n color: #9397a1;\n font-size: 14px;\n }\n .invite-receive__logo {\n height: 16px;\n margin-left: 8px;\n }\n .invite-receive__button {\n width: 100%;\n margin: 16px 0;\n white-space: nowrap;\n }\n .invite-receive__until {\n text-align: center;\n font-size: 14px;\n }\n .invite-receive__description {\n color: #999;\n text-align: left;\n list-style: decimal;\n padding: 0;\n padding-left: 1.2em;\n margin: 40px 0;\n }\n .invite-receive__description-item {\n list-style: decimal;\n }\n .invite-receive__link {\n color: ",";\n }\n"])),(e=>{let{theme:n}=e;return n.palette.primary.main})),q=U;var W,H=i(72333);function O(e){let{invitation:n}=e;const{t:i}=(0,_.PE)(),t=(0,r.useMemo)((()=>(n.role.title||n.role.name).toUpperCase()),[n.role.title,n.role.name]),o=(0,r.useMemo)((()=>i("invite.message",{name:"{{name}}",role:t,dapp:"{{dapp}}"})),[i,t]),s=(0,R.E8)(n.info.chainHost,n.inviter.did,"account"),a=(0,R.Zp)(o,{name:()=>s?(0,y.jsx)("a",{target:"_blank",href:s,className:"invite-user__link",rel:"noreferrer",children:n.inviter.fullName},"name"):n.inviter.fullName,dapp:()=>(0,y.jsx)("a",{target:"_blank",href:n.info.url,className:"invite-user__link",rel:"noreferrer",children:n.info.name},"dapp")});return(0,y.jsxs)(A,{children:[(0,y.jsx)(H.Z,{did:n.inviter.did,src:encodeURI(n.inviter.avatar),size:80,shape:"circle",variant:"circle"}),(0,y.jsx)("div",{className:"invite-user__message",children:a})]})}O.propTypes={invitation:h().object.isRequired};const A=o.Z.div(W||(W=(0,t.Z)(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n .invite-user__name {\n font-weight: 700;\n font-size: 16px;\n margin: 8px 0 2px 0;\n }\n .invite-user__address {\n font-size: 12px;\n }\n .invite-user__message {\n margin-top: 20px;\n font-weight: 700;\n /* width: 90%; */\n text-align: center;\n font-size: 18px;\n }\n .invite-user__link {\n color: ",";\n }\n"])),(e=>{let{theme:n}=e;return n.palette.primary.main})),B=O;var V,Y=i(87543),J=i(99582);function K(e){let{invitation:n,type:i}=e;const{t:t}=(0,_.PE)(),o=(0,r.useMemo)((()=>t("invite.success",{dapp:"{{dapp}}"})),[t]),s=(0,R.E8)(n.info.chainHost,n.inviter.did,"account"),a="receiver"===i?n.receiver:n.inviter,c=(0,R.Zp)(o,{name:()=>s?(0,y.jsx)("a",{target:"_blank",href:s,className:"invite-user__link",rel:"noreferrer",children:a.fullName},"name"):a.fullName,dapp:()=>(0,y.jsx)("a",{target:"_blank",href:n.info.url,className:"invite-user__link",rel:"noreferrer",children:n.info.name},"dapp")});return(0,y.jsxs)(G,{children:[(0,y.jsx)(Y.Z,{pt:1,color:"success.main",children:(0,y.jsx)(J.Z,{style:{fontSize:80}})}),(0,y.jsx)("div",{className:"invite-user__message",children:c})]})}K.propTypes={invitation:h().object.isRequired,type:h().oneOf("inviter","receiver")},K.defaultProps={type:"inviter"};const G=o.Z.div(V||(V=(0,t.Z)(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n .invite-user__name {\n font-weight: 700;\n font-size: 16px;\n margin: 8px 0 2px 0;\n }\n .invite-user__address {\n font-size: 12px;\n }\n .invite-user__message {\n margin-top: 20px;\n font-weight: 700;\n /* width: 90%; */\n text-align: center;\n font-size: 18px;\n }\n .invite-user__link {\n color: ",";\n }\n"])),(e=>{let{theme:n}=e;return n.palette.primary.main})),Q=K;var X;function $(e){let{invitation:n,...i}=e;return(0,y.jsxs)(ee,{...i,children:[(0,y.jsx)(H.Z,{did:n.info.did,src:n.info.logo,style:{flexShrink:0}}),(0,y.jsxs)("div",{className:"invite-app__content",children:[(0,y.jsx)("div",{className:"invite-app__title",children:n.info.name}),(0,y.jsx)("div",{className:"invite-app__description",children:n.info.description})]})]})}$.propTypes={invitation:h().object.isRequired};const ee=o.Z.div(X||(X=(0,t.Z)(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n overflow: hidden;\n .invite-app__content {\n flex: 1;\n margin: 0 12px;\n font-weight: 700;\n overflow: hidden;\n }\n .invite-app__title {\n line-height: 1;\n margin-bottom: 2px;\n overflow: hidden;\n }\n .invite-app__description {\n font-size: 12px;\n white-space: nowrap;\n text-overflow: ellipsis;\n height: 1.3em;\n color: #999;\n overflow: hidden;\n }\n"]))),ne=$;var ie,te=i(5766);function re(e){let{getDataFn:n,passportColor:i,createPassportSvg:t,onLoginSuccess:r,checkFn:o,onReceive:s,inService:a}=e;const c=(0,m.Z)(n);if(c.loading)return(0,y.jsx)(x.Z,{});var l,d;if(c.error)return(0,y.jsx)(g.Z,{status:"404",title:null===(l=c.error)||void 0===l||null===(d=l.response)||void 0===d?void 0:d.data,description:""});const p="success"===c.data.status,u=p?Q:B,v=p?q:E;return(0,y.jsxs)(oe,{className:"page-invite__wrapper",children:[(0,y.jsx)(ne,{invitation:c.data}),(0,y.jsxs)("div",{className:"page-invite__card",children:[(0,y.jsx)(u,{invitation:c.data}),(0,y.jsx)(C,{invitation:c.data,createPassportSvg:t,passportColor:i}),(0,y.jsx)(v,{invitation:c.data,onLogin:r,checkFn:o,onReceive:s,inService:a})]})]})}re.propTypes={getDataFn:h().func.isRequired,checkFn:h().func.isRequired,createPassportSvg:h().func.isRequired,onLoginSuccess:h().func,onReceive:h().func,passportColor:h().string,inService:h().bool},re.defaultProps={onLoginSuccess:()=>{},passportColor:"auto",onReceive:null,inService:!1};const oe=o.Z.div(ie||(ie=(0,t.Z)(["\n max-width: 460px;\n max-height: 650px;\n min-height: 450px;\n width: 90%;\n height: 80%;\n display: flex;\n flex-direction: column;\n .page-invite__card {\n background-color: #fff;\n border-radius: 4px;\n flex: 1;\n padding: 20px 30px;\n margin-top: 10px;\n }\n .page-invite__app {\n margin-top: 20px;\n }\n"]))),se=(0,te.Z)(re);var ae,ce=i(66935),le=i(13798),de=i(25339),pe=i(75793),ue=i(74094);function ve(e){const{api:n,session:i}=(0,de.Tt)(),{info:t}=(0,pe.h6)(),o=(0,s.useLocation)(),a=(0,s.useNavigate)(),{t:l,locale:p}=(0,_.PE)(),{encryptKey:f,decrypt:h}=(0,ce.R)(),[m,x]=(0,r.useState)(!1),g=(0,r.useMemo)((()=>new URLSearchParams(o.search).get("inviteId")),[o]),w=(0,v.default)((async()=>{if(!g)return null;let e;const{data:i}=await n.get("/api/invitation",{params:{inviteId:g}}),r=!!u()(t,"ownerNft.did")&&"owner"===i.role.name;if(r){const i=new URL(window.location.href);i.pathname=d()((0,ue.Y5)(),"/api/did/invite/token"),i.searchParams.set("_ek_",f),i.searchParams.set("inviteId",g);const{data:t}=await n.get(i.href);e=t}return{invitation:i,nextWorkflow:e,needReceiveNFT:r}})),j=(0,r.useCallback)((()=>{x(!0)}),[]),b=(0,r.useCallback)((()=>{if(w.error)throw w.error;return w.value.invitation}),[w]),k=(0,r.useCallback)((async e=>{e&&(0,ue.ZB)(h(e.sessionToken));const n=new URLSearchParams(o.search);n.delete("inviteId");const t=n.toString();await i.refresh(),a("/".concat(t?"?".concat(t):t),{replace:!0})}),[o,a,i]);if(w.loading)return(0,y.jsx)(le.Z,{});return(0,y.jsxs)(fe,{className:"page-invite",children:[u()(w,"value.needReceiveNFT")&&(0,y.jsx)(ce.Z,{action:"login",popup:!0,className:"connect",open:m,locale:p,baseUrl:t.launcher.url,checkFn:c().create({baseURL:t.launcher.url}).get,onSuccess:()=>{const e=new URL(window.location.href);e.pathname=d()((0,ue.Y5)(),"/api/did/invite/status"),e.searchParams.set("_t_",w.value.nextWorkflow.token),e.searchParams.set("locale",p);const t=setInterval((async()=>{const{data:r}=await n.get(e.href);"succeed"===r.status&&(clearInterval(t),i.updateConnectedInfo(r),k(r))}),2e3)},onClose:()=>{x(!1)},checkTimeout:3e5,webWalletUrl:(0,ue.yP)(t),extraParams:{nw:u()(w,"value.nextWorkflow.url")},messages:{title:l("invite.transferNFTDialog.title",{name:t.name}),scan:l("invite.transferNFTDialog.scan"),confirm:l("invite.transferNFTDialog.confirm"),success:l("invite.transferNFTDialog.success")},prefix:"/.well-known/service/api/did"}),(0,y.jsx)(se,{...e,getDataFn:b,createPassportSvg:e=>(0,ue.Ju)(e,t),checkFn:n.get,onLoginSuccess:k,passportColor:"default",onReceive:u()(w,"value.needReceiveNFT")?j:null})]})}const fe=o.Z.div(ae||(ae=(0,t.Z)(["\n width: 100vw;\n height: 100%;\n min-height: 100vh;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: #f6f8fa;\n overflow: auto;\n padding: 20px;\n"])));function he(){return(0,pe.h6)().loading?(0,y.jsx)(le.Z,{}):(0,y.jsx)(ve,{})}},5766:(e,n,i)=>{i.d(n,{Z:()=>l});var t=i(68420),r=i(77668),o=i.n(r),s=i(2586);const a={en:o()(s.Z),ar:()=>i.e(4465).then(i.bind(i,4465)).then((e=>o()(e.default))),de:()=>i.e(3803).then(i.bind(i,43803)).then((e=>o()(e.default))),es:()=>i.e(3930).then(i.bind(i,23930)).then((e=>o()(e.default))),fr:()=>i.e(2019).then(i.bind(i,82019)).then((e=>o()(e.default))),hi:()=>i.e(8590).then(i.bind(i,78768)).then((e=>o()(e.default))),id:()=>i.e(1575).then(i.bind(i,61575)).then((e=>o()(e.default))),ja:()=>i.e(233).then(i.bind(i,90233)).then((e=>o()(e.default))),ko:()=>i.e(8170).then(i.bind(i,48170)).then((e=>o()(e.default))),pt:()=>i.e(9586).then(i.bind(i,69586)).then((e=>o()(e.default))),ru:()=>i.e(1059).then(i.bind(i,81059)).then((e=>o()(e.default))),th:()=>i.e(5748).then(i.bind(i,55748)).then((e=>o()(e.default))),vi:()=>i.e(6906).then(i.bind(i,56906)).then((e=>o()(e.default))),"zh-TW":()=>i.e(4423).then(i.bind(i,64423)).then((e=>o()(e.default))),zh:()=>i.e(6944).then(i.bind(i,56944)).then((e=>o()(e.default)))};var c=i(96266);function l(e){return function(n){return(0,c.jsx)(t.Iw,{translations:a,children:(0,c.jsx)(e,{...n})})}}},99582:(e,n,i)=>{var t=i(71600);n.Z=void 0;var r=t(i(84115)),o=i(96266);n.Z=(0,r.default)((0,o.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"}),"CheckCircle")},92459:(e,n,i)=>{i.d(n,{Z:()=>c});var t=i(55898),r=i.n(t),o=i(28726),s=i(81089),a=i(96266);function c(e){let{children:n,...i}=e;return(0,a.jsxs)(o.Z,{color:"did",variant:"contained",...i,children:[(0,a.jsx)("span",{style:{fontWeight:400},children:n||"Continue With"}),(0,a.jsx)(s.Z,{style:{width:"auto",height:"1.2em",margin:"0 4px 0 8px"}})]})}c.propTypes={children:r().any},c.defaultProps={children:""}},35474:(e,n,i)=>{i.d(n,{Z:()=>z});var t={};i.r(t),i.d(t,{ComingSoon:()=>k,Error:()=>y,Forbidden:()=>w,Info:()=>Z,InternalServerError:()=>j,Maintenance:()=>b,PageNotFound:()=>_});var r,o=i(55898),s=i.n(o),a=i(71171),c=i(38332),l=i(47685),d=i(96266);function p(e){let{icon:n,title:i,description:t,extra:r,...o}=e;return(0,d.jsxs)(u,{...o,children:[n,"string"===typeof i?(0,d.jsx)(c.Z,{mt:3,fontSize:22,fontWeight:400,color:"#47494E",textAlign:"center",children:i}):i,"string"===typeof t?(0,d.jsx)(c.Z,{mt:1,fontSize:14,color:"#7F828B",textAlign:"center",children:t}):t,(0,d.jsx)(c.Z,{mt:3,children:r})]})}p.propTypes={icon:s().element,title:s().oneOfType([s().string,s().element]),description:s().oneOfType([s().string,s().element]),actions:s().any,extra:s().element},p.defaultProps={icon:void 0,title:"",description:"",actions:null,extra:void 0};const u=(0,l.zo)("div")(r||(r=(0,a.Z)(["\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n height: 100%;\n padding: 16px;\n\n background-color: #f7f8fb;\n"]))),v=p;var f=i(36134),h=i(11532);const m={en:{404:{title:"404 - Page Not Found",description:"Sorry about that, the page you are looking for does not exist or has been moved."},403:{title:"403 \u2013 Forbidden",description:"Sorry, you are not authorized to access this page."},500:{title:"500 - Internal Server Error",description:"An internal server error has occurred. Please try again later."},error:{title:"Application Error",description:"Something went wrong. Please try again later."},maintenance:{title:"Offline for maintenance",description:"This app is undergoing maintenance right now. Please check back later."},comingSoon:{title:"Coming Soon",description:"Our website is under construction. We'll be here soon with our new website."}},zh:{404:{title:"404 - \u9875\u9762\u672a\u627e\u5230",description:"\u5f88\u62b1\u6b49\uff0c\u60a8\u6b63\u5728\u5bfb\u627e\u7684\u9875\u9762\u4e0d\u5b58\u5728\u6216\u5df2\u88ab\u79fb\u52a8\u3002"},403:{title:"403 \u2013 \u7981\u6b62\u8bbf\u95ee",description:"\u5f88\u62b1\u6b49\uff0c\u60a8\u6ca1\u6709\u6743\u9650\u8bbf\u95ee\u6b64\u9875\u9762\u3002"},500:{title:"500 - \u5185\u90e8\u670d\u52a1\u5668\u9519\u8bef",description:"\u53d1\u751f\u4e86\u4e00\u4e2a\u5185\u90e8\u670d\u52a1\u5668\u9519\u8bef\u3002\u8bf7\u7a0d\u540e\u518d\u8bd5\u3002"},error:{title:"Application Error",description:"\u51fa\u9519\u4e86, \u8bf7\u7a0d\u540e\u518d\u8bd5\u3002"},maintenance:{title:"\u7ef4\u62a4\u4e2d",description:"\u5e94\u7528\u7a0b\u5e8f\u6b63\u5728\u8fdb\u884c\u7ef4\u62a4\u3002\u8bf7\u7a0d\u540e\u518d\u67e5\u770b\u3002"},comingSoon:{title:"\u5373\u5c06\u4e0a\u7ebf",description:"\u6211\u4eec\u7684\u7f51\u7ad9\u6b63\u5728\u5efa\u8bbe\u4e2d\u3002\u6211\u4eec\u5f88\u5feb\u5c31\u4f1a\u5728\u8fd9\u91cc\u63a8\u51fa\u6211\u4eec\u7684\u65b0\u7f51\u7ad9\u3002"}}};var x=i(68420);const g=e=>{e=["zh","en"].includes(e)?e:"";const{locale:n}=(0,x.PE)()||{locale:"en"},i=e||n;return m[i]?i:"en"};function _(e){let{locale:n,...i}=e;return n=g(n),(0,d.jsx)(v,{icon:(0,d.jsx)(S,{}),title:m[n][404].title,description:m[n][404].description,...i})}function w(e){let{locale:n,...i}=e;return n=g(n),(0,d.jsx)(v,{icon:(0,d.jsx)(S,{}),title:m[n][403].title,description:m[n][403].description,...i})}function j(e){let{locale:n,...i}=e;return n=g(n),(0,d.jsx)(v,{icon:(0,d.jsx)(S,{}),title:m[n][500].title,description:m[n][500].description,...i})}function y(e){let{locale:n,...i}=e;return n=g(n),(0,d.jsx)(v,{icon:(0,d.jsx)(S,{}),title:m[n].error.title,description:m[n].error.description,...i})}function b(e){let{locale:n,...i}=e;return n=g(n),(0,d.jsx)(v,{icon:(0,d.jsx)(C,{}),title:m[n].maintenance.title,description:m[n].maintenance.description,...i})}function k(e){let{locale:n,...i}=e;return n=g(n),(0,d.jsx)(v,{icon:(0,d.jsx)(C,{}),title:m[n].comingSoon.title,description:m[n].comingSoon.description,...i})}function Z(e){return(0,d.jsx)(v,{icon:(0,d.jsx)(C,{}),...e})}function S(e){const n=(0,l.Fg)();return(0,d.jsx)(h.Z,{style:{color:n.palette.error.main,fontSize:72},...e})}function C(e){const n=(0,l.Fg)();return(0,d.jsx)(f.Z,{style:{color:n.palette.info.main,fontSize:72},...e})}_.status="404",w.status="403",j.status="500",y.status="error",b.status="maintenance",k.status="comingSoon",Z.status="info";const P=Object.keys(t).reduce(((e,n)=>({...e,[t[n].status||n]:t[n]})),{});function N(e){let{status:n,...i}=e;if(n){if(P[n]){const e=P[n];return(0,d.jsx)(e,{...i})}throw new Error("Please provide a valid status for Result.status. Valid values are: ".concat(Object.keys(P).join(", ")))}return(0,d.jsx)(v,{...i})}N.propTypes={status:s().oneOfType([s().string,s().number]),...v.propTypes},N.defaultProps={status:""};const z=N},11532:(e,n,i)=>{var t=i(71600);n.Z=void 0;var r=t(i(56930)),o=i(96266);n.Z=(0,r.default)((0,o.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m4.3 14.3c-.39.39-1.02.39-1.41 0L12 13.41 9.11 16.3c-.39.39-1.02.39-1.41 0a.9959.9959 0 0 1 0-1.41L10.59 12 7.7 9.11a.9959.9959 0 0 1 0-1.41c.39-.39 1.02-.39 1.41 0L12 10.59l2.89-2.89c.39-.39 1.02-.39 1.41 0 .39.39.39 1.02 0 1.41L13.41 12l2.89 2.89c.38.38.38 1.02 0 1.41"}),"CancelRounded")},36134:(e,n,i)=>{var t=i(71600);n.Z=void 0;var r=t(i(56930)),o=i(96266);n.Z=(0,r.default)((0,o.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z"}),"Info")}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[9249],{49249:(e,n,t)=>{t.r(n),t.d(n,{default:()=>k});var s,i=t(71171),a=t(5057),o=t(33518),d=t(85493),l=t(60967),c=t(99582),r=t(87543),h=t(35966),u=t(28726),p=t(66935),f=t(8366),x=t(68420),b=t(35432),v=t(5766),m=t(70284),g=t(96266);const w=(0,o.Z)(h.Z)(s||(s=(0,i.Z)(["\n .header {\n text-align: center;\n margin-bottom: 8px;\n }\n\n .subheader {\n text-align: center;\n margin-bottom: 24px;\n }\n\n .login {\n padding: 24px;\n height: auto;\n min-height: 480px;\n display: flex;\n flex-direction: column;\n }\n\n .connect {\n background: #fafafa;\n }\n"]))),P=(0,v.Z)((function(e){var n,t,s,i;let{SessionContext:o,webWalletUrl:h}=e;const{api:v,session:P}=(0,a.useContext)(o),{t:Z,locale:j}=(0,a.useContext)(x.RD),[C,k]=(0,a.useState)(!1),W=(0,d.useNavigate)(),{setPassportId:N}=(0,m.Z)(),_={},{searchParams:E}=new URL(window.location.href),I=E.get("id");return I&&(_.id=I),(0,g.jsx)(w,{children:C?(0,g.jsx)("div",{className:"login",children:(0,g.jsx)("div",{className:"connect",children:(0,g.jsxs)(r.Z,{textAlign:"center",children:[(0,g.jsx)(r.Z,{mb:3,color:"success.main",children:(0,g.jsx)(c.Z,{style:{fontSize:60}})}),(0,g.jsx)(l.Z,{component:"p",variant:"body1",className:"subheader",children:Z("issuePassport.dialog.success")}),(0,g.jsx)(r.Z,{mt:3,children:(0,g.jsx)(u.Z,{variant:"contained",color:"primary",onClick:()=>{var e;try{P.logout()}catch(n){}((null===(e=window.env)||void 0===e?void 0:e.apiPrefix)||"").startsWith(b.WELLKNOWN_SERVICE_PATH_PREFIX)?W("".concat(b.WELLKNOWN_SERVICE_PATH_PREFIX,"/login"),{replace:!0}):W("/",{replace:!0})},children:Z("issuePassport.dialog.loginWithPassport")})})]})})}):(0,g.jsx)(f.Z,{did:(null===(n=window)||void 0===n||null===(t=n.blocklet)||void 0===t?void 0:t.appPid)||(null===(s=window)||void 0===s||null===(i=s.env)||void 0===i?void 0:i.appPid),children:(0,g.jsx)(r.Z,{sx:{width:"560px",maxWidth:"100%",height:"100%"},children:(0,g.jsx)(p.Z,{className:"connect",action:"issue-passport",forceConnected:!1,autoConnect:!1,checkFn:v.get,checkTimeout:6e5,webWalletUrl:h,onSuccess:e=>{null!==e&&void 0!==e&&e.passportId&&N(e.passportId),k(!0)},locale:j,messages:{title:Z("issuePassport.title"),scan:Z("issuePassport.description",{name:window.env.appName}),confirm:Z("issuePassport.dialog.confirm"),success:Z("issuePassport.dialog.success")},extraParams:_})})})})}));var Z=t(75793),j=t(25339),C=t(74094);function k(){const{info:e}=(0,Z.h6)(),n=(0,C.yP)(e);return(0,g.jsx)(P,{SessionContext:j.B3,webWalletUrl:n})}},5766:(e,n,t)=>{t.d(n,{Z:()=>c});var s=t(68420),i=t(77668),a=t.n(i),o=t(2586);const d={en:a()(o.Z),ar:()=>t.e(4465).then(t.bind(t,4465)).then((e=>a()(e.default))),de:()=>t.e(3803).then(t.bind(t,43803)).then((e=>a()(e.default))),es:()=>t.e(3930).then(t.bind(t,23930)).then((e=>a()(e.default))),fr:()=>t.e(2019).then(t.bind(t,82019)).then((e=>a()(e.default))),hi:()=>t.e(8590).then(t.bind(t,78768)).then((e=>a()(e.default))),id:()=>t.e(1575).then(t.bind(t,61575)).then((e=>a()(e.default))),ja:()=>t.e(233).then(t.bind(t,90233)).then((e=>a()(e.default))),ko:()=>t.e(8170).then(t.bind(t,48170)).then((e=>a()(e.default))),pt:()=>t.e(9586).then(t.bind(t,69586)).then((e=>a()(e.default))),ru:()=>t.e(1059).then(t.bind(t,81059)).then((e=>a()(e.default))),th:()=>t.e(5748).then(t.bind(t,55748)).then((e=>a()(e.default))),vi:()=>t.e(6906).then(t.bind(t,56906)).then((e=>a()(e.default))),"zh-TW":()=>t.e(4423).then(t.bind(t,64423)).then((e=>a()(e.default))),zh:()=>t.e(6944).then(t.bind(t,56944)).then((e=>a()(e.default)))};var l=t(96266);function c(e){return function(n){return(0,l.jsx)(s.Iw,{translations:d,children:(0,l.jsx)(e,{...n})})}}},99582:(e,n,t)=>{var s=t(71600);n.Z=void 0;var i=s(t(84115)),a=t(96266);n.Z=(0,i.default)((0,a.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"}),"CheckCircle")}}]);
|
|
File without changes
|