PageSourceSearch

https://app.dfx.swiss/static/js/5856.e222e00d.chunk.js

js dfx.swiss collected 2026-10-01 13:53:49 UTC 20,305 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunk_dfx_swiss_services_react=self.webpackChunk_dfx_swiss_services_react||[]).push([[5856],{33026:(e,s,n)=>{n.d(s,{A:()=>i});var l=n(7290),t=n(65043),a=n(4237),r=n(70579);function i(e){let{label:s,items:n=[],hideItemsText:i="",showItemsText:o="",noItemsHint:d=!1,addButtonOnClick:u}=e;const{translate:m}=(0,a.M)(),[x,f]=(0,t.useState)(),[b,h]=(0,t.useState)(!1),[g,p]=(0,t.useState)(!1);return(0,r.jsx)(r.Fragment,{children:n.length||d?(0,r.jsxs)(l.QB,{full:!0,gap:2,children:[(0,r.jsxs)("h1",{className:"relative text-dfxGray-800 font-semibold text-base flex justify-center items-center",children:[s,(0,r.jsx)("button",{className:"absolute right-[14px] border rounded-[10px] bg-white border-dfxGray-700 hover:bg-dfxRed-100 hover:border-dfxRed-100",onClick:u,onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),hidden:!u,children:(0,r.jsx)(l.g$,{icon:l.E7.PLUS,color:g?l.Li.WHITE:l.Li.DARK_GRAY,size:l.lK.MD})})]}),n.length?(0,r.jsxs)(l.CB,{alignContent:l.Jx.BETWEEN,children:[n.filter((e=>b||!e.isDisabled)).map((e=>(0,r.jsxs)(l.eL,{onClick:e.onClick,children:[(0,r.jsxs)("div",{className:"flex flex-col items-start gap-1",children:[(0,r.jsxs)("div",{className:"flex flex-row gap-2 font-semibold ".concat(e.isDisabled?"text-dfxGray-700":""),children:[e.label,e.tag&&(0,r.jsx)("div",{className:"flex bg-dfxGray-400 font-bold rounded-sm px-1.5 text-2xs items-center justify-center",children:e.tag})]}),(0,r.jsx)("div",{className:"text-xs text-dfxGray-700",children:e.subLabel})]}),e.menuItems&&(0,r.jsxs)("div",{className:"relative flex items-center",children:[(0,r.jsx)("button",{onClick:()=>f(e),children:(0,r.jsx)(l.g$,{icon:l.E7.THREE_DOTS_VERT,color:l.Li.BLUE})}),(null===x||void 0===x?void 0:x.key)===e.key&&(0,r.jsx)(c,{menuItems:e.menuItems,onClose:()=>f(void 0)})]})]},e.key))),n.some((e=>e.isDisabled))&&(0,r.jsx)(l.eL,{children:(0,r.jsxs)("div",{className:"flex flex-row w-full justify-between items-start gap-1 text-xs cursor-pointer select-none text-dfxGray-700 hover:text-dfxGray-800",onClick:()=>h((e=>!e)),children:[(0,r.jsx)("div",{children:b?i:o}),(0,r.jsx)(l.g$,{icon:b?l.E7.EXPAND_LESS:l.E7.EXPAND_MORE,color:l.Li.DARK_GRAY})]})})]}):(0,r.jsx)("p",{className:"text-xs text-dfxGray-700",children:m("general/errors","No entries yet")})]}):(0,r.jsx)(r.Fragment,{})})}function c(e){let{menuItems:s,onClose:n}=e;const l=(0,t.useRef)(null);return(0,t.useEffect)((()=>{if(document){function e(e){var s;null!==(s=l.current)&&void 0!==s&&s.contains(e.target)||n()}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)}}),[]),(0,r.jsx)("div",{ref:l,className:"absolute right-5 top-3 border border-dfxGray-400 shadow-md z-10 bg-white rounded-md overflow-clip",children:(0,r.jsx)("div",{className:"flex flex-col divide-y-0.5 divide-dfxGray-400 items-start bg-dfxGray-100 w-36",children:s.filter((e=>!e.hidden)).map((e=>(0,r.jsx)("button",{className:"hover:bg-dfxGray-300 w-full text-left px-4 py-2",onClick:s=>{s.stopPropagation(),e.onClick(),e.closeOnClick&&n()},children:e.label},e.label)))})})}},44774:(e,s,n)=>{n.d(s,{q:()=>i});var l=n(7290),t=n(65043),a=n(33857),r=n(70579);function i(e){let{message:s,messageContent:n,cancelLabel:i,confirmLabel:c,onCancel:o,onConfirm:d}=e;const[u,m]=(0,t.useState)(!1),[x,f]=(0,t.useState)();return(0,r.jsxs)(l.QB,{gap:6,full:!0,children:[s&&(0,r.jsx)("p",{className:"text-dfxBlue-800 mb-2 text-center",children:s}),n,(0,r.jsxs)(l.Sl,{gap:4,spanAcross:!0,children:[(0,r.jsx)(l.OV,{color:l.J8.STURDY_WHITE,width:l.Kl.FULL,label:i,onClick:o}),(0,r.jsx)(l.OV,{width:l.Kl.FULL,label:c,onClick:function(){m(!0),f(void 0),d().catch((e=>{var s;return f(null!==(s=e.message)&&void 0!==s?s:"Unknown error")})).finally((()=>m(!1)))},isLoading:u})]}),x&&(0,r.jsx)("div",{children:(0,r.jsx)(a.E,{message:x})})]})}},84745:(e,s,n)=>{n.d(s,{Z:()=>d});var l=n(21437),t=n(7290),a=n(65043),r=n(24858),i=n(4237),c=n(33857),o=n(70579);function d(e){let{label:s,autocomplete:n,prefill:d,placeholder:u,validation:m,onCancel:x,onEdit:f}=e;const{translate:b,translateError:h}=(0,i.M)(),[g,p]=(0,a.useState)(!1),[v,C]=(0,a.useState)(),{control:E,handleSubmit:j,formState:{isValid:y,errors:A}}=(0,r.mN)({mode:"onTouched",defaultValues:{label:d}});function N(e){p(!0),C(void 0),f(e.label).catch((e=>{var s;return C(null!==(s=e.message)&&void 0!==s?s:"Unknown error")})).finally((()=>p(!1)))}const D=l.Aq.createRules({label:[l.RH.Required,m]});return(0,o.jsxs)(t.QB,{gap:6,full:!0,children:[(0,o.jsx)(t.lV,{control:E,rules:D,errors:A,onSubmit:j(N),translate:h,children:(0,o.jsxs)(t.QB,{gap:3,full:!0,children:[(0,o.jsx)(t.sQ,{name:"label",autocomplete:n,label:null!==s&&void 0!==s?s:b("screens/settings","Label"),placeholder:null!==u&&void 0!==u?u:b("screens/settings","Label"),full:!0,smallLabel:!0}),(0,o.jsxs)(t.Sl,{gap:6,spanAcross:!0,children:[(0,o.jsx)(t.OV,{color:t.J8.STURDY_WHITE,width:t.Kl.FULL,label:b("general/actions","Cancel"),onClick:x}),(0,o.jsx)(t.OV,{type:"submit",label:b("general/actions","Save"),onClick:j(N),width:t.Kl.FULL,disabled:!y,isLoading:g})]})]})}),v&&(0,o.jsx)("div",{children:(0,o.jsx)(c.E,{message:v})})]})}},23934:(e,s,n)=>{n.d(s,{N:()=>m});var l=n(21437),t=n(7290),a=n(65043),r=n(24858),i=n(41137),c=n(4237),o=n(18230),d=n(33857),u=n(70579);function m(e){let{onSubmit:s,confirmationText:n}=e;const{translate:m,translateError:x}=(0,c.M)(),{navigate:f}=(0,o.c)(),[b,h]=(0,a.useState)(),[g,p]=(0,a.useState)(),[v,C]=(0,a.useState)(),[E,j]=(0,a.useState)(!1),{control:y,handleSubmit:A,formState:{errors:N,isValid:D}}=(0,r.mN)({mode:"onTouched"}),{createAccount:S}=(0,l.K4)(),{allowedCountries:L}=(0,c.M)();async function k(e){h(void 0),p(void 0),C(void 0),j(!0),S(e).then(n?C:s).catch((e=>{var s,n;if(400===e.statusCode&&null!==(s=e.message)&&void 0!==s&&s.includes("Multi-account IBAN"))p((0,u.jsxs)(i.x6,{i18nKey:"general/errors.iban",children:["This is a multi-account IBAN and cannot be added as a personal account. Please open a supp
1ort ticket at ",(0,u.jsx)(t.ah,{label:new URL("support","https://app.dfx.swiss").href,onClick:()=>f("/support/issue?issue-type=".concat(l.F7.GENERIC_ISSUE)),dark:!0})," and attach the bank transaction confirmation as a PDF."]}));else if(400===e.statusCode&&null!==(n=e.message)&&void 0!==n&&n.includes("KYC only account"))p((0,u.jsxs)(i.x6,{i18nKey:"general/errors.ibanKycOnly",children:["A bank account can only be added once a wallet is linked to this account. ",(0,u.jsx)(t.ah,{label:m("screens/home","Connect your wallet"),onClick:()=>f("/connect",{setRedirect:!0}),dark:!0})]}));else{var a;h(null!==(a=e.message)&&void 0!==a?a:"Unknown error")}})).finally((()=>j(!1)))}const T=l.Aq.createRules({iban:[l.RH.Required,l.RH.Iban(L)]});return v?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("p",{className:"text-dfxGray-700",children:n}),(0,u.jsx)(t.OV,{color:t.J8.RED,label:m("general/actions","OK"),onClick:()=>s(v)})]}):(0,u.jsx)(t.lV,{control:y,rules:T,errors:N,onSubmit:A(k),translate:x,children:(0,u.jsxs)(t.QB,{gap:4,children:[(0,u.jsx)(t.sQ,{name:"iban",autocomplete:"iban",label:m("screens/payment","IBAN"),placeholder:"XX XXXX XXXX XXXX XXXX X"}),(0,u.jsx)(t.sQ,{name:"label",autocomplete:"iban-label",label:m("screens/sell","Optional - Account Designation"),placeholder:m("screens/sell","e.g. Deutsche Bank")}),(0,u.jsx)(t.IW,{spacing:-1}),b&&(0,u.jsx)("div",{className:"text-center",children:(0,u.jsx)(d.E,{message:b})}),g&&(0,u.jsx)("div",{className:"text-left",children:(0,u.jsx)(t.vp,{invertedIcon:!0,children:g})}),(0,u.jsx)(t.OV,{type:"submit",disabled:!D,color:t.J8.RED,label:m("general/actions","Add bank account"),onClick:A(k),isLoading:E,caps:!0,width:t.Kl.FULL,className:"mb-4"})]})})}},89751:(e,s,n)=>{n.d(s,{d:()=>a});var l=n(65043),t=n(35475);function a(e,s){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const[a,r]=(0,t.ok)(),i=a.get("a");(0,l.useEffect)((()=>{i===e&&s.current&&n&&setTimeout((()=>{var e;null===(e=s.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"start"}),a.delete("a"),r(a,{replace:!0})}),100)}),[i,e,n])}},75856:(e,s,n)=>{n.r(s),n.d(s,{OverlayType:()=>S,SettingsOverlay:()=>w,default:()=>T});var l=n(21437),t=n(7290),a=n(75270),r=n.n(a),i=n(65043),c=n(24858),o=n(41137),d=n(33026),u=n(44774),m=n(33857),x=n(69356),f=n(4237),b=n(70579);function h(e){let{bankAccount:s,onClose:n}=e;const{translate:a,translateError:r}=(0,f.M)(),{updateAccount:o}=(0,l.K4)(),{currencies:d}=(0,l.I_)(),{rootRef:u}=(0,x.L)(),[h,g]=(0,i.useState)(!1),[p,v]=(0,i.useState)(),{watch:C,control:E,handleSubmit:j,formState:{errors:y}}=(0,c.mN)({mode:"onChange",defaultValues:{label:s.label,preferredCurrency:s.preferredCurrency}}),A=C();function N(){g(!0),v(void 0);const e={label:A.label,preferredCurrency:A.preferredCurrency};o(s.id,e).then((()=>n())).catch((e=>v(e.message))).finally((()=>g(!1)))}return(0,b.jsxs)(t.QB,{gap:6,full:!0,children:[(0,b.jsx)(t.lV,{control:E,errors:y,onSubmit:j(N),translate:r,children:(0,b.jsxs)(t.QB,{gap:6,full:!0,children:[(0,b.jsx)(t.sQ,{name:"label",autocomplete:"label",label:a("screens/settings","Label"),placeholder:a("screens/settings","Label"),full:!0,smallLabel:!0}),(0,b.jsx)(t.lF,{rootRef:u,name:"preferredCurrency",label:a("screens/settings","Currency"),smallLabel:!0,placeholder:a("general/actions","Select")+"...",items:null!==d&&void 0!==d?d:[],labelFunc:e=>null===e||void 0===e?void 0:e.name}),(0,b.jsxs)(t.Sl,{gap:6,spanAcross:!0,children:[(0,b.jsx)(t.OV,{color:t.J8.STURDY_WHITE,width:t.Kl.FULL,label:a("general/actions","Cancel"),onClick:n}),(0,b.jsx)(t.OV,{type:"submit",label:a("general/actions","Save"),onClick:j(N),width:t.Kl.FULL,disabled:A.label===s.label&&A.preferredCurrency===s.preferredCurrency,isLoading:h})]})]})}),p&&(0,b.jsx)("div",{children:(0,b.jsx)(m.E,{message:p})})]})}var g=n(84745),p=n(23934),v=n(82358),C=n(98648),E=n(52730),j=n(89751),y=n(79803),A=n(15631),N=n(18230),D=n(74886);let S=function(e){return e[e.NONE=0]="NONE",e[e.DELETE_ADDRESS=1]="DELETE_ADDRESS",e[e.DELETE_ACCOUNT=2]="DELETE_ACCOUNT",e[e.RENAME_ADDRESS=3]="RENAME_ADDRESS",e[e.EDIT_BANK_ACCOUNT=4]="EDIT_BANK_ACCOUNT",e[e.ADD_BANK_ACCOUNT=5]="ADD_BANK_ACCOUNT",e[e.DELETE_BANK_ACCOUNT=6]="DELETE_BANK_ACCOUNT",e}({});const L={[S.NONE]:"",[S.DELETE_ADDRESS]:"Delete address",[S.DELETE_ACCOUNT]:"Delete account",[S.RENAME_ADDRESS]:"Rename address",[S.EDIT_BANK_ACCOUNT]:"Edit bank account",[S.ADD_BANK_ACCOUNT]:"Add bank account",[S.DELETE_BANK_ACCOUNT]:"Delete bank account"};function k(){const[e,s]=(0,i.useState)(!1),n=(0,i.useRef)();return(0,i.useEffect)((()=>()=>{void 0!==n.current&&clearTimeout(n.current)}),[]),[e,function(){s(!0),void 0!==n.current&&clearTimeout(n.current),n.current=setTimeout((()=>s(!1)),2e3)}]}function T(){const{translate:e,language:s,currency:n,availableLanguages:a,changeLanguage:o,changeCurrency:u}=(0,f.M)(),{currencies:m}=(0,l.I_)(),{user:h,isUserLoading:g,userAddresses:p,updateCallSettings:C}=(0,l.ur)(),{width:T}=(0,E.$)(),{navigate:_}=(0,N.c)(),{rootRef:O}=(0,x.L)(),{bankAccounts:R,updateAccount:B,isLoading:U}=(0,l.K4)(),K=(0,i.useRef)(null);(0,j.d)("call",K,!g);const[I,F]=(0,i.useState)(),[V,X]=(0,i.useState)(S.NONE),[G,M]=(0,i.useState)(!1);(0,y.em)("/login");const{control:P,setValue:Q,formState:{errors:H}}=(0,c.mN)(),q=(0,c.FH)({control:P,name:"language"}),W=(0,c.FH)({control:P,name:"currency"}),[Y,J]=k(),[$,z]=k(),Z=(0,c.FH)({control:P,name:"preferredPhoneTimes"}),ee=(0,c.FH)({control:P,name:"acceptCall"});function se(){X(S.NONE),F(void 0)}(0,i.useEffect)((()=>{s&&!q&&Q("language",s)}),[s]),(0,i.useEffect)((()=>{n&&!W&&Q("currency",n)}),[n]),(0,i.useEffect)((()=>{null!==h&&void 0!==h&&h.kyc.preferredPhoneTimes&&!Z&&Q("preferredPhoneTimes",h.kyc.preferredPhoneTimes)}),[null===h||void 0===h?void 0:h.kyc.preferredPhoneTimes]),(0,i.useEffect)((()=>{const e=null===h||void 0===h?void 0:h.kyc.phoneCallAccepted;null!=e&&null==ee&&Q("acceptCall",e)}
1),[null===h||void 0===h?void 0:h.kyc.phoneCallAccepted]),(0,i.useEffect)((()=>{q&&(null===q||void 0===q?void 0:q.id)!==(null===s||void 0===s?void 0:s.id)&&(o(q),J())}),[q]),(0,i.useEffect)((()=>{W&&(null===W||void 0===W?void 0:W.id)!==(null===n||void 0===n?void 0:n.id)&&(u(W),z())}),[W]),(0,i.useEffect)((()=>{Z&&JSON.stringify(Z)!==JSON.stringify(null===h||void 0===h?void 0:h.kyc.preferredPhoneTimes)&&C(Z)}),[Z]),(0,i.useEffect)((()=>{void 0!==ee&&ee!==(null===h||void 0===h?void 0:h.kyc.phoneCallAccepted)&&C(void 0,ee)}),[ee]);const ne=L[V]?"".concat(e("general/actions",L[V]),"?"):e("screens/settings","Settings"),le=p.sort(D.m0),te=null===h||void 0===h?void 0:h.disabledAddresses.filter((e=>!e.isCustody)).sort(D.m0),ae=le.concat(null!==te&&void 0!==te?te:[]);return(0,A.K)({title:ne,onBack:V?()=>se():void 0}),(0,b.jsx)(b.Fragment,{children:V?(0,b.jsx)(w,{type:V,data:I,onClose:se}):(0,b.jsxs)(t.QB,{full:!0,gap:8,children:[(0,b.jsxs)(t.QB,{full:!0,gap:4,children:[(0,b.jsxs)("div",{className:"relative w-full",children:[(0,b.jsxs)("div",{"data-testid":"settings-saved-language",className:"absolute text-sm text-dfxRed-100 text-right w-full pr-4 pointer-events-none transition-opacity duration-100 ".concat(Y?"opacity-100":"opacity-0"),children:[e("screens/payment","Saved"),"!"]}),(0,b.jsx)(t.lV,{control:P,errors:H,children:(0,b.jsx)(t.lF,{rootRef:O,name:"language",label:e("screens/settings","Language"),smallLabel:!0,placeholder:e("general/actions","Select")+"...",items:a,labelFunc:e=>e.name,descriptionFunc:e=>e.foreignName})})]}),(0,b.jsxs)("div",{className:"relative w-full",children:[(0,b.jsxs)("div",{"data-testid":"settings-saved-currency",className:"absolute text-sm text-dfxRed-100 text-right w-full pr-4 pointer-events-none transition-opacity duration-100 ".concat($?"opacity-100":"opacity-0"),children:[e("screens/payment","Saved"),"!"]}),(0,b.jsx)(t.lV,{control:P,errors:H,children:(0,b.jsx)(t.lF,{rootRef:O,name:"currency",label:e("screens/settings","Currency"),smallLabel:!0,placeholder:e("general/actions","Select")+"...",items:null!==m&&void 0!==m?m:[],labelFunc:e=>e.name})})]})]}),U?(0,b.jsx)("div",{className:"flex mt-4 w-full justify-center items-center",children:(0,b.jsx)(t.pF,{size:t.HU.LG})}):R&&(0,b.jsx)(t.QB,{full:!0,gap:2,children:(0,b.jsx)(d.A,{label:e("screens/iban","Your Bank Accounts"),addButtonOnClick:()=>X(S.ADD_BANK_ACCOUNT),noItemsHint:!0,items:R.map((s=>{var n,t;return{key:s.id,label:null!==(n=s.label)&&void 0!==n?n:"".concat(s.iban.slice(0,2)," ").concat(s.iban.slice(-4)),subLabel:(0,D.WK)(null!==(t=l.Aq.formatIban(s.iban))&&void 0!==t?t:s.iban,{width:T}),tag:s.default?e("screens/settings","Default").toUpperCase():void 0,menuItems:[{label:e("general/actions","Copy"),onClick:()=>r()(s.iban),closeOnClick:!0},{label:e("general/actions","Edit"),onClick:()=>{F(s),X(S.EDIT_BANK_ACCOUNT)}},{label:e("general/actions","Delete"),onClick:()=>{F(s),X(S.DELETE_BANK_ACCOUNT)},closeOnClick:!0}].concat(s.default?[]:{label:e("general/actions","Set default"),onClick:()=>B(s.id,{default:!0}),closeOnClick:!0})}}))})}),!g&&(0,b.jsx)(d.A,{label:e("screens/settings","Your Addresses"),addButtonOnClick:()=>_("/connect"),hideItemsText:e("screens/settings","Hide deleted addresses"),showItemsText:e("screens/settings","Show deleted addresses"),noItemsHint:!0,items:ae.map((s=>{var n,l,t;const a=null!==(n=null===h||void 0===h?void 0:h.disabledAddresses.some((e=>e.address===s.address)))&&void 0!==n&&n;return{key:s.address,label:null!==(l=s.label)&&void 0!==l?l:s.wallet,subLabel:(0,D.WK)(s.address,{width:T}),isDisabled:a,tag:s.address===(null===h||void 0===h||null===(t=h.activeAddress)||void 0===t?void 0:t.address)?e("screens/settings","Active").toUpperCase():void 0,menuItems:[{label:e("general/actions","Copy"),onClick:()=>r()(s.address),closeOnClick:!0},{label:e("general/actions","Open Explorer"),onClick:()=>window.open(s.explorerUrl,"_blank"),closeOnClick:!0},{label:e("general/actions","Rename"),onClick:()=>{F(s),X(S.RENAME_ADDRESS)},hidden:a},{label:e("general/actions","Delete"),onClick:()=>{F(s),X(S.DELETE_ADDRESS)},hidden:a}]}}))}),!g&&(!(null!==h&&void 0!==h&&h.kyc.phoneCallStatus)||![l.$5.COMPLETED,l.$5.FAILED].includes(h.kyc.phoneCallStatus))&&(0,b.jsxs)(t.QB,{full:!0,gap:2,children:[(0,b.jsx)("h1",{ref:K,className:"text-dfxGray-800 font-semibold text-base flex justify-center items-center",children:e("screens/settings","Verification Call")}),(0,b.jsxs)(t.QB,{full:!0,gap:4,children:[(0,b.jsx)("p",{className:"text-dfxGray-700 text-sm text-center",children:e("screens/settings","Verification may require a phone call. Should we call you?")}),(0,b.jsx)(t.lV,{control:P,errors:H,children:(0,b.jsx)(t.lF,{rootRef:O,name:"acceptCall",label:e("screens/settings","Phone verification"),smallLabel:!0,placeholder:e("general/actions","Select")+"...",items:[!0,!1],labelFunc:s=>e("screens/settings",s?"Yes, call me":"No, don't call me")})}),ee&&(0,b.jsx)(t.lV,{control:P,errors:H,children:(0,b.jsx)(t.rW,{rootRef:O,name:"preferredPhoneTimes",label:e("screens/settings","Preferred call time"),smallLabel:!0,placeholder:e("general/actions","Select")+"...",items:Object.values(l.uP),labelFunc:s=>e("screens/settings",v.hK[s])})})]})]}),(0,b.jsxs)(t.QB,{full:!0,gap:2,children:[(0,b.jsxs)("button",{type:"button",className:"text-dfxGray-800 font-semibold text-base flex justify-center items-center gap-1 w-full","aria-expanded":G,onClick:()=>M((e=>!e)),children:[e("screens/settings","Danger Zone"),(0,b.jsx)(t.g$,{icon:G?t.E7.EXPAND_LESS:t.E7.EXPAND_MORE,size:t.lK.LG})]}),G&&(0,b.jsxs)(t.QB,{full:!0,gap:4,children:[(0,b.jsx)("p",{className:"text-dfxGray-700 text-sm text-center",children:e("screens/settings","Deleting your account ends our business relationship. Under Swiss law we are required to retain all data for 10 years and then permanently delete it.")}),(0,b.jsx)(t.OV,{width:t.Kl.FULL,label:e("general/actions","Delete account"),onClick:()=>X(S.DELETE_ACCOUNT)})]})]})]})})}function w(e){var s,n;let{type:t,data:a,onClose:r}=e;const{user:i}=(0,l.ur)(),{width:c}=(0,E.$)(),{translate:d}=(0,f.M)(),{setWallet:m}=(0,C.u2)(),{deleteAddress:x,deleteAccount:j,renameAddress:y}=(0,l.ur)(),{updateAccount:A}=(0,l.K4)();switch(t){case S.DELETE_ADDRESS:const e=(0,D.WK)(a?(0,v.xh)(a):"",{width:c});return(0,b.jsx)(u.q,{messageContent:(0,b.jsx)("p",{className:"text-dfxBlue-800 mb-2",children:(0,b.jsxs)(o.x6,{i18nKey:"screens/settings.delete",values:{address:e}
1,children:["Are you sure you want to delete the address ",(0,b.jsx)("strong",{children:e})," from your DFX account? This action is irreversible."]})}),cancelLabel:d("general/actions","Cancel"),confirmLabel:d("general/actions","Delete"),onCancel:r,onConfirm:async()=>{if(a){var e;const s=a;await x(s.address),s.address===(null===i||void 0===i||null===(e=i.activeAddress)||void 0===e?void 0:e.address)&&m()}r()}});case S.DELETE_ACCOUNT:return(0,b.jsx)(u.q,{message:d("screens/settings","Deleting your account ends our business relationship. Under Swiss law we are required to retain all data for 10 years and then permanently delete it."),cancelLabel:d("general/actions","Cancel"),confirmLabel:d("general/actions","Delete"),onCancel:r,onConfirm:async()=>{await j(),m(),r()}});case S.RENAME_ADDRESS:const t=a;return(0,b.jsx)(g.Z,{label:d("screens/settings","Address name"),autocomplete:"address-label",prefill:null!==(s=null===t||void 0===t?void 0:t.label)&&void 0!==s?s:null===t||void 0===t?void 0:t.wallet,placeholder:d("screens/settings","Address name"),onCancel:r,onEdit:async e=>{t&&await y(t.address,e),r()}});case S.EDIT_BANK_ACCOUNT:return(0,b.jsx)(h,{bankAccount:a,onClose:r});case S.ADD_BANK_ACCOUNT:return(0,b.jsx)(p.N,{onSubmit:e=>r(),confirmationText:d("screens/iban","The bank account has been added, all transactions from this IBAN will now be associated with your account.")});case S.DELETE_BANK_ACCOUNT:const f=a,C=(0,D.WK)(null!==(n=l.Aq.formatIban(f.iban))&&void 0!==n?n:f.iban,{width:c});return(0,b.jsx)(u.q,{messageContent:(0,b.jsx)("p",{className:"text-dfxBlue-800 mb-2",children:(0,b.jsxs)(o.x6,{i18nKey:"screens/settings.delete_iban",values:{address:C},children:["Are you sure you want to delete the bank account ",(0,b.jsx)("strong",{children:C})," from your DFX account?"]})}),cancelLabel:d("general/actions","Cancel"),confirmLabel:d("general/actions","Delete"),onCancel:r,onConfirm:async()=>{await A(f.id,{active:!1}),r()}});default:return(0,b.jsx)(b.Fragment,{})}}}}]);
2//# sourceMappingURL=5856.e222e00d.chunk.js.map

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.