1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4273],{9959:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/account/[accountId]",function(){return a(93617)}])},47337:function(e,t,a){"use strict";a.d(t,{U:function(){return c}});var s=a(38093),r=a(85453),n=a(91046),l=a(1702),o=a(56945),i=a(73657);let c=e=>{let{onClose:t,onConfirm:a,message:c,confirmText:d}=e;return(0,s.jsx)(n.u,{show:!0,as:o.Fragment,appear:!0,children:(0,s.jsxs)(l.Vq,{as:"div",className:"relative z-[60]",onClose:t,children:[(0,s.jsx)(n.x,{as:o.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,s.jsx)("div",{className:"fixed inset-0 bg-green-modal/75 transition-opacity dark:bg-black/75"})}),(0,s.jsx)("div",{className:"fixed inset-0 z-10 overflow-y-auto",children:(0,s.jsx)("div",{className:"flex min-h-full items-center justify-center p-4",children:(0,s.jsx)(n.x,{as:o.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4",enterTo:"opacity-100 translate-y-0",leave:"ease-in duration-200",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 translate-y-4",children:(0,s.jsx)(l.EM,{className:"relative w-full max-w-md
1space-y-4 overflow-hidden rounded-lg bg-white p-8 shadow-xl dark:bg-purple",children:(0,s.jsxs)("div",{className:"flex flex-col px-4 text-center",children:[(0,s.jsx)(i.v,{strokeWidth:2,className:"mx-auto h-16 w-16"}),(0,s.jsx)("p",{className:"text-center font-semibold text-pink-dark dark:text-pink-neon",children:null!=c?c:(0,s.jsx)(s.Fragment,{children:"Please note that this action is not reversible. Continue with caution."})}),(0,s.jsxs)("div",{className:"mt-5 flex justify-between",children:[(0,s.jsx)(r.z,{intent:"outline","aria-label":"close dialog",onClick:()=>t(),children:"Close"}),(0,s.jsx)(r.z,{"aria-label":null!=d?d:"continue",onClick:()=>{a(),t()},children:null!=d?d:"Continue"})]})]})})})})})]})})}},99295:function(e,t,a){"use strict";a.d(t,{w:function(){return d}});var s=a(38093),r=a(85453),n=a(91046),l=a(1702),o=a(56945),i=a(31590),c=a(74561);let d=e=>{let{onClose:t,title:a,content:d}=e;return(0,s.jsx)(n.u,{show:!0,as:o.Fragment,appear:!0,children:(0,s.jsxs)(l.Vq,{as:"div",className:"relative z-10",onClose:t,children:[(0,s.jsx)(n.x,{as:o.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,s.jsx)("div",{className:"fixed inset-0 bg-green-modal/75 dark:bg-black/75 transition-opacity"})}),(0,s.jsx)("div",{className:"fixed inset-0 z-10 overflow-y-auto",children:(0,s.jsx)("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:(0,s.jsx)(n.x,{as:o.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4",enterTo:"opacity-100 translate-y-0",leave:"ease-in duration-200",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 translate-y-4",children:(0,s.jsxs)(l.EM,{className:"relative w-full max-w-xs space-y-4 overflow-hidden rounded-lg bg-white dark:bg-purple p-8 shadow-xl",children:[(0,s.jsxs)("div",{children:[" ","dark"===c.C6?(0,s.jsx)(i.OF,{className:"mx-auto h-20 w-20"}):(0,s.jsx)(i.K2,{className:"mx-auto h-20 w-20"}),(0,s.jsx)(l.$N,{as:"h3",className:"text-center text-2xl font-bold",children:a}),(0,s.jsx)("p",{className:"mt-2 text-sm font-light",children:d})]}),(0,s.jsx)("div",{className:"mt-5 grid grid-cols-1 gap-3",children:(0,s.jsx)(r.z,{intent:"outline","aria-label":"close dialog",fullWidth:!0,onClick:()=>t(),children:"Close"})})]})})})})]})})}},47668:function(e,t,a){"use strict";a.d(t,{J:function(){return r}});var s=a(38093);let r=e=>(0,s.jsxs)("svg",{viewBox:"0 0 24 24",fill:"currentColor",width:"49",height:"47",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,s.jsx)("path",{d:"M10.0597 2.77945C9.88969 2.77945 9.7597 2.77945 9.6297 2.77945C7.8197 2.77945 5.9997 2.77945 4.1897 2.77945C3.2497 2.77945 2.79968 3.22939 2.79968 4.15939C2.79968 9.51939 2.79968 14.8794 2.79968 20.2394C2.79968 21.1394 3.25971 21.5994 4.16971 21.5994C8.01971 21.5994 11.8797 21.5994 15.7297 21.5994C16.4897 21.5994 16.9997 22.0194 17.0497 22.6594C17.1097 23.3794 16.5797 23.9394 15.8197 23.9494C14.5597 23.9594 13.2897 23.9494 12.0297 23.9494C9.40969 23.9494 6.78971 23.9494 4.16971 23.9494C1.92971 23.9494 0.429688 22.4494 0.429688 20.2094C0.429688 14.8494 0.429688 9.48943 0.429688 4.12943C0.429688 1.90943 1.91971 0.409424 4.13971 0.409424C6.68971 0.409424 9.23968 0.409414 11.7997 0.399414C12.2397 0.399414 12.5997 0.529417 12.9197 0.839417C14.9097 2.75942 16.9097 4.67944 18.9097 6.57944C19.2897 6.93944 19.4697 7.33941 19.4497 7.85941C19.4297 8.45941 19.4497 9.0694 19.4397 9.6694C19.4397 10.4694 18.9997 10.9894 18.3097 11.0294C17.6197 11.0694 17.1397 10.5994 17.0397 9.80942C17.0397 9.76942 17.0197 9.7294 17.0097 9.6694C15.6997 9.6694 14.3797 9.6694 13.0697 9.6694C12.3597 9.6694 11.7197 9.45944 11.1697 9.01944C10.4197 8.40944 10.0697 7.61939 10.0597 6.65939C10.0597 5.51939 10.0597 4.37941 10.0597 3.23941C10.0797 3.10941 10.0697 2.96945 10.0597 2.77945ZM12.4397 3.6694C12.4397 4.7894 12.4297 5.77944 12.4497 6.76944C12.4597 7.15944 12.7197 7.32945 13.0997 7.33945C13.4997 7.34945 13.8997 7.33945 14.3097 7.33945C14.9197 7.33945 15.5297 7.33945 16.2597 7.33945C14.9397 6.07945 13.7297 4.9194 12.4397 3.6694Z"}),(0,s.jsx)("path",{d:"M19.4696 18.0896C19.4696 18.9596 19.4796 19.8195 19.4696 20.6695C19.4596 21.5695 18.6796 22.1395 17.8796 21.8495C17.3996 21.6795 17.1196 21.2696 17.1096 20.6896C17.0996 19.9796 17.1096 19.2696 17.1096 18.5596C17.1096 18.4096 17.1096 18.2696 17.1096 18.0596C16.8496 18.0596 16.6296 18.0596 16.4096 18.0596C15.7796 18.0596 15.1496 18.0696 14.5196 18.0596C13.7496 18.0496 13.2096 17.5696 13.2096 16.8796C13.1996 16.1996 13.7396 15.6996 14.5096 15.6896C15.2196 15.6796 15.9296 15.6896 16.6396 15.6896C16.7796 15.6896 16.9296 15.6896 17.1196 15.6896C17.1196 14.8296 17.1196 14.0295 17.1196 13.2295C17.1196 13.0195 17.1296 12.7995 17.1896 12.5995C17.3296 12.1295 17.8096 11.8096 18.2996 11.8196C18.7896 11.8296 19.2596 12.1496 19.3996 12.6196C19.4596 12.8096 19.4696 13.0196 19.4696 13.2096C19.4796 14.0096 19.4696 14.8196 19.4696 15.6896C19.8696 15.6896 20.2296 15.6896 20.5996 15.6896C21.0296 15.6896 21.4596 15.6796 21.889
16 15.6896C22.6796 15.6996 23.1896 16.1595 23.1996 16.8595C23.1996 17.5695 22.6796 18.0495 21.8696 18.0495C21.1196 18.0595 20.3696 18.0496 19.6096 18.0596C19.5796 18.0596 19.5596 18.0696 19.4696 18.0896Z"})]})},73657:function(e,t,a){"use strict";a.d(t,{v:function(){return r}});var s=a(38093);let r=e=>(0,s.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"})})},5246:function(e,t,a){"use strict";a.d(t,{Q:function(){return l},p:function(){return n}});var s=a(66592),r=a(15934);let n=s.Ry({accountId:s.Z_(),amount:s.oQ.number({invalid_type_error:"Amount is not valid",required_error:"Amount is required"}).positive()}),l={async get(e,t){try{return await r.Mb.get("accounts/".concat(e),{headers:{...t?{Cookie:t}:{}}}).json()}catch(e){return(0,r.by)(e,"Unable to fetch account details.")}},async list(e,t){try{let a=new URLSearchParams;return null==t||t.forEach(e=>{a.append("include[]",e)}),await r.Mb.get("accounts",{searchParams:a,headers:{...e?{Cookie:e}:{}}}).json()}catch(e){return(0,r.by)(e,"Unable to fetch account list.")}},async create(e){try{return await r.Mb.post("accounts",{json:{name:e.name,assetId:e.asset.value}}).json()}catch(e){return(0,r.by)(e,"We were not able to create your account. Please try again.")}},async update(e){try{return await r.Mb.patch("accounts/".concat(e.accountId),{json:{isHidden:e.isHidden}}).json()}catch(e){return(0,r.by)(e,"We were not able to update your account. Please try again.")}},async deposit(e){try{return await r.Mb.post("accounts/".concat(e.accountId,"/fund"),{json:{amount:e.amount}}).json()}catch(e){return(0,r.by)(e,"We were not able to fund your account. Please try again.")}}}},94277:function(e,t,a){"use strict";a.d(t,{L_:function(){return n},NZ:function(){return o},jx:function(){return c},nG:function(){return l},tK:function(){return i}});var s=a(15934),r=a(66592);let n=r.Ry({walletAddressName:r.Z_().toLowerCase().min(3,{message:"The name of the wallet address should be at least 3 characters long"}),publicName:r.Z_().min(3,{message:"The public name of the wallet address should be at least 3 characters long"})}),l=r.Ry({publicName:r.Z_().min(3,{message:"The public name of the wallet address should be at least 3 characters long"})}),o=r.Ry({nickname:r.Z_().min(3,{message:"The nickname should be at least 3 characters long"})}),i=r.Ry({jwk:r.Z_(),nickname:r.Z_()}),c={async get(e,t){try{return await s.Mb.get("accounts/".concat(e.accountId,"/wallet-addresses/").concat(e.walletAddressId,"/keys"),{headers:{...t?{Cookie:t}:{}}}).json()}catch(e){return(0,s.by)(e,"We were not able to fetch information about the wallet address. Please try again.")}},async list(e,t){try{return await s.Mb.get("accounts/".concat(e,"/wallet-addresses"),{headers:{...t?{Cookie:t}:{}}}).json()}catch(e){return(0,s.by)(e,"Unable to fetch wallet addresses.")}},async listAll(e){try{return await s.Mb.get("wallet-addresses",{headers:{...e?{Cookie:e}:{}}}).json()}catch(e){return(0,s.by)(e,"Unable to fetch wallet addresses.")}},async create(e,t){try{return await s.Mb.post("accounts/".concat(e,"/wallet-addresses"),{json:t}).json()}catch(e){return(0,s.by)(e,"We were not able to create your wallet address. Please try again.")}},async update(e){try{return await s.Mb.patch("accounts/".concat(e.accountId,"/wallet-addresses/").concat(e.walletAddressId),{json:{publicName:e.publicName}}).json()}catch(e){return(0,s.by)(e,"We were not able to update your wallet address. Please try again.")}},async delete(e){try{return await s.Mb.delete("wallet-addresses/".concat(e)).json()}catch(e){return(0,s.by)(e,"We were not able to delete your wallet address. Please try again.")}},async generateKey(e){try{return await s.Mb.post("accounts/".concat(e.accountId,"/wallet-addresses/").concat(e.walletAddressId,"/register-key"),{json:{nickname:e.nickname}}).json()}catch(e){return(0,s.by)(e,"We were not able to generate a key for your wallet address. Please try again.")}},async uploadKey(e){try{return await s.Mb.post("accounts/".concat(e.accountId,"/wallet-addresses/").concat(e.walletAddressId,"/upload-key"),{json:{base64Key:e.jwk,nickname:e.nickname}}).json()}catch(e){return(0,s.by)(e,"We were not able to upload the provided JWK for the wallet address. Please try again.")}},async revokeKey(e){try{return await s.Mb.patch("accounts/".concat(e.accountId,"/wallet-addresses/").concat(e.walletAddressId,"/").concat(e.keyId,"/revoke-key")).json()}catch(e){return(0,s.by)(e,"We were not able to revoke the key. Please try again.")}},async revokeKeys(e){try{return await s.Mb.post("revoke-keys",{json:{keys:e}}).json()}catch(e){return(0,s.by)(e,"We were not able to revoke the developer keys. Please try again.")}},async getExternal(e){try{return await s.Mb.get("external-wallet-addresses?url=".concat(e)).json()}catch(e){return(0,s.by)(e,"Error fetching external wallet address details.")}}}}
1,93617:function(e,t,a){"use strict";a.r(t),a.d(t,{__N_SSP:function(){return B},default:function(){return Y}});var s=a(38093),r=a(85453),n=a(91046),l=a(1702),o=a(56945),i=a(45282),c=a(10508),d=a(28484),u=a(94277),m=a(53520),h=a(36960),x=a(74561),p=a(57223);let g=e=>{var t,a,g,y,f,v;let{onClose:j,accountName:w}=e,b=(0,m.useRouter)(),C=(0,c.w)({schema:u.L_}),{isUserFirstTime:N,setRunOnboarding:k,stepIndex:F,setStepIndex:P}=(0,p.t)(),I=b.query.accountId;return(0,s.jsx)(n.u,{show:!0,as:o.Fragment,appear:!0,children:(0,s.jsxs)(l.Vq,{as:"div",className:"relative z-10",onClose:j,children:[(0,s.jsx)(n.x,{as:o.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,s.jsx)("div",{className:"fixed inset-0 bg-green-modal/75 transition-opacity dark:bg-black/75"})}),(0,s.jsx)("div",{className:"fixed inset-0 z-10 overflow-y-auto",children:(0,s.jsx)("div",{className:"flex min-h-full items-center justify-center p-4",children:(0,s.jsx)(n.x,{as:o.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4",enterTo:"opacity-100 translate-y-0",leave:"ease-in duration-200",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 translate-y-4",children:(0,s.jsxs)(l.EM,{className:"relative w-full max-w-xl space-y-4 overflow-hidden rounded-lg bg-white p-8 shadow-xl dark:bg-purple",children:[(0,s.jsxs)(l.$N,{as:"h3",className:"text-center text-2xl font-bold",children:["Create Wallet Address"," ",(0,s.jsx)("div",{className:"text-sm",children:"(Payment Pointer)"})]}),(0,s.jsxs)(i.l,{form:C,onSubmit:async e=>{let t=await u.jx.create(I,e);if(t.success)b.replace(b.asPath),j(),N&&(P(F+1),k(!0));else{let{errors:e,message:a}=t;C.setError("root",{message:a}),e&&(0,h.Zt)(e).map(t=>C.setError(t,{message:e[t]}))}},children:[(0,s.jsx)(d.I,{disabled:!0,value:w,label:"Account",readOnly:!0}),(0,s.jsx)("div",{children:(0,s.jsx)(d.I,{addOn:x.qG,required:!0,label:"Wallet Address name",error:null===(g=C.formState)||void 0===g?void 0:null===(a=g.errors)||void 0===a?void 0:null===(t=a.walletAddressName)||void 0===t?void 0:t.message,...C.register("walletAddressName")})}),(0,s.jsx)(d.I,{required:!0,label:"Public name",placeholder:"test",error:null===(v=C.formState)||void 0===v?void 0:null===(f=v.errors)||void 0===f?void 0:null===(y=f.publicName)||void 0===y?void 0:y.message,...C.register("publicName")}),(0,s.jsxs)("div",{className:"mt-5 flex justify-between",children:[(0,s.jsx)(r.z,{intent:"outline","aria-label":"close dialog",onClick:()=>j(),children:"Cancel"}),(0,s.jsx)(r.z,{"aria-label":"create payment pointer",type:"submit",loading:C.formState.isSubmitting,children:"Create"})]})]})]})})})})]})})};var y=a(47668);let f=e=>(0,s.jsxs)("svg",{width:"33",height:"30",viewBox:"0 0 33 30",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,s.jsx)("path",{d:"M16.5498 29.4399C11.6498 29.4399 6.73978 29.4399 1.83978 29.4399C0.849783 29.4399 0.529785 29.1199 0.529785 28.1499C0.529785 22.5699 0.529785 16.9799 0.529785 11.3999C0.529785 10.4899 0.879785 10.1299 1.77979 10.1299C11.6298 10.1299 21.4798 10.1299 31.3398 10.1299C32.2498 10.1299 32.5998 10.4899 32.5998 11.3899C32.5998 16.9899 32.5998 22.5899 32.5998 28.1799C32.5998 29.0999 32.2698 29.4399 31.3498 29.4399C26.4098 29.4399 21.4798 29.4399 16.5498 29.4399ZM30.5898 27.4499C30.5898 22.3199 30.5898 17.2399 30.5898 12.1399C21.2198 12.1399 11.8798 12.1399 2.52979 12.1399C2.52979 17.2599 2.52979 22.3499 2.52979 27.4499C11.8898 27.4499 21.2198 27.4499 30.5898 27.4499Z"}),(0,s.jsx)("path",{d:"M15.4798 3.85945C14.8998 4.43945 14.3298 5.02945 13.7498 5.60945C13.4698 5.88945 13.1198 5.97945 12.7298 5.85945C12.3598 5.73945 12.0998 5.45949 12.0898 5.08949C12.0798 4.81949 12.1498 4.46949 12.3298 4.27949C13.4898 3.06949 14.6898 1.87948 15.8898 0.699475C16.2898 0.309475 16.8398 0.309455 17.2398 0.709455C18.4298 1.87945 19.6098 3.05946 20.7798 4.24946C21.1898 4.66946 21.1698 5.24948 20.7898 5.63948C20.3998 6.02948 19.8198 6.03948 19.3998 5.63948C18.8998 5.15948 18.4198 4.65945 17.9198 4.16945C17.8198 4.06945 17.7098 3.97947 17.5398 3.81947C17.5398 4.06947 17.5398 4.21947 17.5398 4.37947C17.5398 6.29947 17.5398 8.21948 17.5398 10.1395C17.5398 10.6895 17.1998 11.0894 16.6898 11.1694C16.2298 11.2394 15.7598 10.9395 15.6298 10.4895C15.5798 10.3195 15.5798 10.1394 15.5798 9.96943C15.5798 8.09943 15.5798 6.21944 15.5798 4.34944C15.5798 4.20944 15.5798 4.06946 15.5798 3.92946C15.5498 3.88946 15.5098 3.87945 15.4798 3.85945Z"}),(0,s.jsx)("path",{d:"M22.2596 19.7898C22.2596 22.9398 19.7196 25.4899 16.5796 25.5099C13.4296 25.5199 10.8596 22.9598 10.8496 19.7898C10.8496 16.6198 13.3996 14.0799 16.5696 14.0899C19.7196 14.0899 22.2596 16.6398 22.2596 19.7898ZM20.2896 19.8098C20.2996 17.7298 18.6496 16.0598 16.5696 16.0398C14.5296 16.0198 12.8396 17.6898 12.8296 19.7298C12.8096 21.8298 14.4896 23.5199 16.5696 23.5099C18.6196 23.5199 20.2796 21.8598 20.2896 19.8098Z"}),(0,s.jsx)("path",{d:"M28.68 19.7894C28.68 20.9494 27.74 21.8895 26.59 21.8995C25.43 21.9095 24.48 20.9594 24.48 19.7894C24.48 18.6194 25.42 17.6895 26.59 17.6895C27.74 17.6895 28.68
118.6294 28.68 19.7894Z"}),(0,s.jsx)("path",{d:"M8.90997 19.7894C8.90997 20.9494 7.96996 21.8895 6.81996 21.8995C5.65996 21.9095 4.70996 20.9594 4.70996 19.7894C4.70996 18.6194 5.64996 17.6895 6.81996 17.6895C7.96996 17.6895 8.90997 18.6294 8.90997 19.7894Z"})]});var v=a(25022),j=a(45853),w=a(80392),b=a(60678),C=a(5556),N=a(23550),k=a(96347),F=a(71426),P=a(99295);let I=e=>{var t,a,p;let{onClose:g,walletAddress:y}=e,[f,v]=(0,w.R)(),j=(0,m.useRouter)(),b=(0,c.w)({schema:u.nG,defaultValues:{publicName:y.publicName}});return(0,s.jsx)(n.u,{show:!0,as:o.Fragment,appear:!0,children:(0,s.jsxs)(l.Vq,{as:"div",className:"relative z-10",onClose:g,children:[(0,s.jsx)(n.x,{as:o.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,s.jsx)("div",{className:"fixed inset-0 bg-green-modal/75 dark:bg-black/75 transition-opacity"})}),(0,s.jsx)("div",{className:"fixed inset-0 z-10 overflow-y-auto",children:(0,s.jsx)("div",{className:"flex min-h-full items-center justify-center p-4",children:(0,s.jsx)(n.x,{as:o.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4",enterTo:"opacity-100 translate-y-0",leave:"ease-in duration-200",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 translate-y-4",children:(0,s.jsxs)(l.EM,{className:"relative w-full max-w-xl space-y-4 overflow-hidden rounded-lg bg-white dark:bg-purple p-8 shadow-xl",children:[(0,s.jsxs)(l.$N,{as:"h3",className:"text-center text-2xl font-medium",children:["Edit Wallet Address"," ",(0,s.jsx)("div",{className:"text-sm",children:"(Payment Pointer)"})]}),(0,s.jsx)("div",{className:"px-4",children:(0,s.jsxs)(i.l,{form:b,onSubmit:async e=>{let t=await u.jx.update({accountId:y.accountId,walletAddressId:y.id,publicName:e.publicName});if(t.success)f((0,s.jsx)(F.F,{content:t.message,onClose:()=>{j.replace(j.asPath),g()}}));else{let{errors:e,message:a}=t;b.setError("root",{message:a}),e&&(0,h.Zt)(e).map(t=>b.setError(t,{message:e[t]}))}},children:[(0,s.jsx)(d.I,{addOn:x.qG,disabled:!0,readOnly:!0,value:y.url.split("/")[1],label:"Wallet Address name"}),(0,s.jsx)(d.I,{required:!0,label:"Public name",error:null===(p=b.formState)||void 0===p?void 0:null===(a=p.errors)||void 0===a?void 0:null===(t=a.publicName)||void 0===t?void 0:t.message,...b.register("publicName")}),(0,s.jsxs)("div",{className:"mt-5 flex justify-between",children:[(0,s.jsx)(r.z,{intent:"outline","aria-label":"close dialog",onClick:()=>g(),children:"Cancel"}),(0,s.jsx)(r.z,{"aria-label":"save payment pointer",type:"submit",loading:b.formState.isSubmitting,children:"Save"})]})]})})]})})})})]})})};var M=a(47337),T=a(61986),A=a(93011),z=a(36790);let S=e=>{let{onClose:t,walletAddress:a}=e,{Image:i}=(0,z.y)(),c=a.url.replace("$","https://");return(0,s.jsx)(n.u,{show:!0,as:o.Fragment,appear:!0,children:(0,s.jsxs)(l.Vq,{as:"div",className:"relative z-10",onClose:t,children:[(0,s.jsx)(n.x,{as:o.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,s.jsx)("div",{className:"fixed inset-0 bg-green-modal/75 dark:bg-black/75 transition-opacity"})}),(0,s.jsx)("div",{className:"fixed inset-0 z-10 overflow-y-auto",children:(0,s.jsx)("div",{className:"flex min-h-full items-center justify-center p-4",children:(0,s.jsx)(n.x,{as:o.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4",enterTo:"opacity-100 translate-y-0",leave:"ease-in duration-200",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 translate-y-4",children:(0,s.jsxs)(l.EM,{className:"relative w-full max-w-xl space-y-4 overflow-hidden rounded-lg bg-white dark:bg-purple p-4 shadow-xl",children:[(0,s.jsxs)(l.$N,{as:"h3",className:"text-center text-2xl font-medium",children:["Register Wallet Address for a POS",(0,s.jsx)("div",{className:"text-sm",children:"(Payment Pointer)"})]}),(0,s.jsxs)("div",{className:"flex justify-between items-center flex-col",children:[(0,s.jsx)("div",{children:c}),(0,s.jsx)("div",{className:"pb-2",children:(0,s.jsx)(i,{text:JSON.stringify({paymentPointer:c,signSec:""}),options:{type:"image/jpeg",quality:1,errorCorrectionLevel:"M",margin:3,scale:4,width:200,color:{dar
1k:"#000",light:"#FFFFFF"}}})}),(0,s.jsx)(r.z,{intent:"outline","aria-label":"close dialog",onClick:()=>t(),children:"Done"})]})]})})})})]})})};var E=a(7242);let _=e=>new Promise((t,a)=>{let s=new window.Image;s.onload=()=>{var e;let a=document.createElement("canvas");a.width=s.naturalWidth,a.height=s.naturalHeight,null===(e=a.getContext("2d"))||void 0===e||e.drawImage(s,0,0),t(a)},s.onerror=()=>a(Error("Could not load image: ".concat(e))),s.src=e}),W=e=>{let{onClose:t,walletAddress:a}=e,[i,c]=(0,o.useState)(""),u=(0,o.useRef)(null),{Image:m}=(0,z.y)(),h=a.url.replace("$","https://"),x=new URL("/send",window.location.origin);x.searchParams.set("merchantWA",h),i&&x.searchParams.set("merchantDescription",i);let p=x.toString(),g=async()=>{var e;let t=null===(e=u.current)||void 0===e?void 0:e.querySelector("img");if(!(null==t?void 0:t.src))return;let a=new E.ZP({unit:"mm",format:"a4"}),s=a.internal.pageSize.getWidth(),r=a.internal.pageSize.getHeight();a.setFillColor(235,233,230),a.rect(0,0,s,r,"F");let n=await _("/interledger-big-half-logo.png"),l=n.height/n.width*s;a.addImage(n,"PNG",0,r-l,s,l);let o=(s-90)/2,i=25.4/96*60,c=r-25.4/96*130-90-25.4/96*60,d=await _("/interledger-technology.png"),m=90+2*i,h=d.height/d.width*m;a.addImage(d,"PNG",o-i,20,m,h);let x=await _("/scan-to-pay.png"),p=90+2*i,g=x.height/x.width*p;a.addImage(x,"PNG",o-i,c-i-20-g,p,g);let y=o-i,f=c-i,v=await _("/shadow.png"),j=(90+2*i)/(1646/2184);a.addImage(v,"PNG",y-268/2184*j,f-204/2184*j,j,j),a.addImage(t.src,"JPEG",o,c,90,90),a.save("Interledger-qr-code.pdf")};return(0,s.jsx)(n.u,{show:!0,as:o.Fragment,appear:!0,children:(0,s.jsxs)(l.Vq,{as:"div",className:"relative z-10",onClose:t,children:[(0,s.jsx)(n.x,{as:o.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,s.jsx)("div",{className:"fixed inset-0 bg-green-modal/75 dark:bg-black/75 transition-opacity"})}),(0,s.jsx)("div",{className:"fixed inset-0 z-10 overflow-y-auto",children:(0,s.jsx)("div",{className:"flex min-h-full items-center justify-center p-4",children:(0,s.jsx)(n.x,{as:o.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4",enterTo:"opacity-100 translate-y-0",leave:"ease-in duration-200",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 translate-y-4",children:(0,s.jsxs)(l.EM,{className:"relative w-full max-w-xl space-y-4 overflow-hidden rounded-lg bg-white dark:bg-purple p-4 shadow-xl",children:[(0,s.jsx)(l.$N,{as:"h3",className:"text-center text-2xl font-medium",children:"Generate QR code for a Wallet Address as a merchant"}),(0,s.jsxs)("div",{className:"flex justify-between items-center flex-col",children:[(0,s.jsx)("div",{children:h}),(0,s.jsx)("div",{className:"w-full py-2",children:(0,s.jsx)(d.I,{label:"Description",value:i,onChange:e=>c(e.target.value)})}),(0,s.jsx)("div",{className:"py-4",ref:u,children:(0,s.jsx)(m,{text:p,options:{type:"image/jpeg",quality:1,errorCorrectionLevel:"M",margin:3,scale:4,width:200,color:{dark:"#000",light:"#FFFFFF"}}})}),(0,s.jsxs)("div",{className:"flex justify-evenly w-full",children:[(0,s.jsx)(r.z,{intent:"outline","aria-label":"download QR code",onClick:g,children:"Download"}),(0,s.jsx)(r.z,{intent:"outline","aria-label":"close dialog",onClick:()=>t(),children:"Done"})]})]})]})})})})]})})},R=(0,o.createContext)({}),q=()=>{let e=(0,m.useRouter)(),{walletAddress:t}=(0,o.useContext)(R),[a,r]=(0,w.R)(),n=async t=>{let n=await u.jx.delete(t);n.success?a((0,s.jsx)(F.F,{onClose:()=>{r(),e.replace(e.asPath)},content:n.message})):a((0,s.jsx)(P.w,{onClose:r,content:n.message}))};return(0,s.jsx)(k.r,{"aria-label":"delete payment pointer",onClick:()=>a((0,s.jsx)(M.U,{confirmText:"Delete wallet address",onConfirm:()=>n(t.id),onClose:r})),children:"Delete"})},Z=()=>{let{walletAddress:e}=(0,o.useContext)(R),[t,a]=(0,w.R)();return(0,s.jsx)(k.r,{"aria-label":"edit payment pointer",onClick:()=>t((0,s.jsx)(I,{walletAddress:e,onClose:a})),children:"Edit"})},D=()=>{let{walletAddress:e}=(0,o.useContext)(R),[t,a]=(0,w.R)();return(0,s.jsx)(k.r,{"aria-label":"register POS for wallet address",onClick:()=>t((0,s.jsx)(S,{walletAddress:e,onClose:a})),children:"Register POS"})}
1,O=()=>{let{walletAddress:e}=(0,o.useContext)(R),[t,a]=(0,w.R)();return(0,s.jsx)(k.r,{"aria-label":"generate QR for wallet address as merchant",onClick:()=>t((0,s.jsx)(W,{walletAddress:e,onClose:a})),children:"QR"})},L=()=>{let{walletAddress:e}=(0,o.useContext)(R),[t,a]=(0,o.useState)(!1),r=(0,h.I6)((0,h.Y3)(e.url),e.isCard);return(0,o.useEffect)(()=>{setTimeout(()=>{a(!1)},4e3)},[t]),(0,s.jsx)(T.pn,{delayDuration:100,children:(0,s.jsxs)(T.u,{children:[(0,s.jsx)(T.aJ,{onClick:e=>{e.preventDefault(),a(!0),(0,A.v)(r)},children:(0,s.jsx)("p",{className:"underline decoration-dashed underline-offset-2",children:r})}),(0,s.jsx)(T._v,{onPointerDownOutside:e=>e.preventDefault(),children:t?"Copied":"Copy to clipboard"})]})})},V=e=>{let{walletAddress:t,idOnboarding:a}=e;return(0,s.jsx)(R.Provider,{value:{walletAddress:t,idOnboarding:a},children:(0,s.jsxs)("tr",{className:"cursor-pointer mb-5 sm:[&>td]:p-4 rounded-xl sm:[&>td]:border-b sm:[&>td]:border-green sm:dark:[&>td]:border-pink-neon hover:bg-grey-light sm:hover:bg-green-light dark:hover:bg-purple-dark bg-green-light dark:bg-pink-neon sm:bg-transparent sm:dark:bg-transparent flex flex-col sm:block justify-center items-center",children:[(0,s.jsx)("td",{children:(0,s.jsx)(L,{})}),(0,s.jsx)("td",{children:(0,s.jsx)(k.r,{href:"/transactions?walletAddressId=".concat(t.id),"aria-label":"view payment pointer transactions",id:a,children:"View"})}),(0,s.jsx)("td",{children:(0,s.jsx)(Z,{})}),(0,s.jsx)("td",{children:t.isCard?null:(0,s.jsx)(q,{})}),(0,s.jsx)("td",{children:(0,s.jsx)(D,{})}),(0,s.jsx)("td",{children:(0,s.jsx)(O,{})})]},t.id)})},U=e=>{let{account:t,walletAddresses:a}=e;return(0,s.jsx)("div",{className:"overflow-x-auto",children:(0,s.jsx)("table",{className:"min-w-[16rem] border-collapse",children:(0,s.jsx)("tbody",{children:a.map((e,a)=>(0,s.jsx)(V,{idOnboarding:"EUR"===t.assetCode&&0===a?"viewTransactions":"",walletAddress:e},e.id))})})})};var G=a(5246),K=a(40991),$=a(35726),J=a(73657);let Q=e=>{var t,a,u;let{onClose:x,accountId:p,assetCode:g}=e,y=(0,m.useRouter)(),f=(0,c.w)({schema:G.p}),{toast:v}=(0,K.pm)();return(0,o.useEffect)(()=>{f.setFocus("amount")},[]),(0,s.jsx)(n.u,{show:!0,as:o.Fragment,appear:!0,children:(0,s.jsxs)(l.Vq,{as:"div",className:"relative z-10",onClose:x,children:[(0,s.jsx)(n.x,{as:o.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,s.jsx)("div",{className:"fixed inset-0 bg-green-modal/75 transition-opacity dark:bg-black/75"})}),(0,s.jsx)("div",{className:"fixed inset-0 z-10 overflow-y-auto",children:(0,s.jsx)("div",{className:"flex min-h-full items-center justify-center p-4",children:(0,s.jsx)(n.x,{as:o.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4",enterTo:"opacity-100 translate-y-0",leave:"ease-in duration-200",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 translate-y-4",children:(0,s.jsxs)(l.EM,{className:"relative w-full max-w-xl space-y-4 overflow-hidden rounded-lg bg-white p-8 shadow-xl dark:bg-purple",children:[(0,s.jsx)(l.$N,{as:"h3",className:"text-center text-2xl font-bold",children:"Deposit to Account"}),(0,s.jsx)("p",{className:"text-xs text-center",children:"A small fee might be applied when making a deposit."}),(0,s.jsxs)("p",{className:" text-xs text-center",children:[(0,s.jsx)(J.v,{strokeWidth:2,className:"mr-2 inline-flex h-7 w-7 items-center justify-center"}),"After hitting the ~$10,000 USD daily deposit limit, you'll receive your funds in about 5 minutes."]}),(0,s.jsxs)(i.l,{form:f,onSubmit:async e=>{let t=await G.Q.deposit(e);if(t.success)y.replace(y.asPath),x(),v({description:(0,s.jsxs)("p",{children:[(0,s.jsx)($.d,{className:"mr-2 inline-flex h-8 w-8 items-center justify-center"}),"Deposit success"]}),variant:"success"});else{let{message:e}=t;f.setError("root",{message:e}
1),v({description:(0,s.jsxs)("p",{children:[(0,s.jsx)($.d,{className:"mr-2 inline-flex h-8 w-8 items-center justify-center"}),"Error while depositing account"]}),variant:"error"})}},children:[(0,s.jsx)("input",{type:"hidden",...f.register("accountId"),value:p}),(0,s.jsx)(d.I,{required:!0,label:"Amount",addOn:(0,h.jK)(g),error:null===(u=f.formState)||void 0===u?void 0:null===(a=u.errors)||void 0===a?void 0:null===(t=a.amount)||void 0===t?void 0:t.message,...f.register("amount")}),(0,s.jsxs)("div",{className:"mt-5 flex justify-between",children:[(0,s.jsx)(r.z,{intent:"outline","aria-label":"close dialog",onClick:()=>x(),children:"Cancel"}),(0,s.jsx)(r.z,{"aria-label":"deposit",type:"submit",loading:f.formState.isSubmitting,children:"Deposit"})]})]})]})})})})]})})},H=e=>{let{account:t,walletAddresses:a}=e,[r,n]=(0,w.R)(),{accountsSnapshot:l}=(0,b.R)(C.Y),i=(0,o.useMemo)(()=>{let e=l.find(e=>e.assetCode===t.assetCode);return(0,h.dN)({value:(null==e?void 0:e.balance)||t.balance,assetCode:t.assetCode,assetScale:t.assetScale})},[t,l]),{isUserFirstTime:c,setRunOnboarding:d,setStepIndex:u,stepIndex:m}=(0,p.t)();return(0,o.useEffect)(()=>{c&&setTimeout(()=>{u(m+1),d(!0)},500)},[]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(N.m,{title:t.name}),(0,s.jsxs)("div",{className:"mb-6",id:"balance",children:[(0,s.jsx)("h2",{className:"mb-2 text-xl",children:"Balance"}),(0,s.jsx)("div",{className:"text-3xl font-bold",children:i.amount})]}),(0,s.jsxs)("div",{className:"my-12 flex md:max-w-lg md:items-center gap-2 flex-col sm:flex-row",children:[(0,s.jsx)("div",{className:"flex",children:(0,s.jsxs)("button",{id:"walletAddress",onClick:()=>{c&&d(!1),r((0,s.jsx)(g,{accountName:t.name,onClose:n}))},className:"group flex aspect-square min-w-28 flex-shrink-0 flex-grow-0 basis-1/4 flex-col items-center justify-center rounded-lg border-2 text-center transition-[box-shadow] duration-200 dark:hover:shadow-glow-button dark:focus:shadow-glow-button",children:[(0,s.jsx)(y.J,{className:"mb-1 h-8 w-8 transition-[filter] duration-200 group-hover:dark:drop-shadow-glow-svg group-focus:dark:drop-shadow-glow-svg"}),(0,s.jsx)("span",{className:"text-center text-[smaller] leading-4 underline-offset-2 transition-transform group-hover:scale-110 group-hover:underline group-focus:scale-110 group-focus:underline group-focus:underline-offset-2 dark:group-hover:decoration-transparent",children:"Add wallet address"})]})}),(0,s.jsxs)("div",{className:"flex gap-4",children:[(0,s.jsxs)(k.r,{id:"fund",href:x.SU?"/deposit":void 0,onClick:x.SU?void 0:()=>{r((0,s.jsx)(Q,{accountId:t.id,assetCode:t.assetCode,onClose:n}))},className:"group flex aspect-square min-w-28 flex-shrink-0 flex-grow-0 basis-1/4 flex-col items-center justify-center rounded-lg border-2 text-center transition-[box-shadow] duration-200 dark:hover:shadow-glow-button dark:focus:shadow-glow-button",children:[(0,s.jsx)(v.c,{className:"mb-1 h-8 w-8 transition-[filter] duration-200 group-hover:dark:drop-shadow-glow-svg group-focus:dark:drop-shadow-glow-svg"}),(0,s.jsx)("span",{className:"text-center text-[smaller] leading-4 underline-offset-2 transition-transform group-hover:scale-110 group-hover:underline group-focus:scale-110 group-focus:underline group-focus:underline-offset-2 dark:group-hover:decoration-transparent",children:"Deposit"})]}),(0,s.jsxs)(k.r,{id:"withdraw",href:"/withdraw",className:"group flex aspect-square min-w-28 flex-shrink-0 flex-grow-0 basis-1/4 flex-col items-center justify-center rounded-lg border-2 text-center transition-[box-shadow] duration-200 dark:hover:shadow-glow-button dark:focus:shadow-glow-button",children:[(0,s.jsx)(f,{className:"mb-1 h-8 w-8 transition-[filter] duration-200 group-hover:dark:drop-shadow-glow-svg group-focus:dark:drop-shadow-glow-svg"}),(0,s.jsx)("span",{className:"text-center text-[smaller] leading-4 underline-offset-2 transition-transform group-hover:scale-110 group-hover:underline group-focus:scale-110 group-focus:underline group-focus:underline-offset-2 dark:group-hover:decoration-transparent",children:"Withdraw"})]})]})]}),(0,s.jsxs)("h2",{className:"mb-2 text-xl sm:text-2xl font-bold",children:["Wallet Address list ",(0,s.jsx)("div",{className:"text-sm",children:"(Payment Pointers)"})]}),a.length>0?(0,s.jsx)(U,{account:t,walletAddresses:a}):(0,s.jsx)("div",{className:"mt-4 text-sm",children:"No Wallet Addresses (Payment Pointers) found for this account."})]})};H.getLayout=function(e){return(0,s.jsx)(j.L,{isCardsVisible:e.props.user.isCardsVisible,children:e})};var B=!0,Y=H},61986:function(e,t,a){"use strict";a.d(t,{_v:function(){return d},aJ:function(){return c},pn:function(){return o},u:function(){return i}});var s=a(38093),r=a(56945),n=a(89304),l=a(41080);let o=n.zt,i=n.fC,c=n.xz,d=(0,r.forwardRef)((e,t)=>{let{className:a,sideOffset:r=4,...o}=e;return(0,s.jsx)(n.VY,{ref:t,sideOffset:r,className:(0,l.cx)("z-50 overflow-hidden rounded-md bg-green-dark text-white dark:bg-purple-bright px-3 py-1.5 text-xs",a),...o})});d.displayName=n.VY.displayName}},function(e){e.O(0,[4921,6811,8164,5075,6521,3171,1392,6867,9304,3869,1309,1450,2211,9053,2888,9774,179],function(){return e(e.s=9959)}),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.