1 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="3465c846-f8a9-5d06-9848-3424629239d5")}catch(e){}}(); 3import{_ as U}from"./DToY6O9K.js";import{aP as K,b6 as z,b7 as I,a$ as M,bN as R,bh as m,b4 as f,aY as t,b3 as r,aV as u,ct as j,ch as q,aT as l,aW as o,bp as v,aX as n,aS as $,cv as G,bU as H,bm as k,b5 as X,ba as Y,aZ as E,bi as Z,bj as J,cB as O}from"./BV2unoxx.js";import{_ as Q}from"./Yx9NL60_.js";import{_ as ee,S as B}from"./BwBadgh4.js";import{P as te}from"./DBmV_dfQ.js";import{u as oe}from"./BWwQxVup.js";import"./C4EMG4j5.js";import"./EW571HDc.js";import"./DJkQ8oyO.js";const se={key:0,class:"mt-xl grid-container desktop:mt-3xl"},ae={class:"mx-auto max-w-prose"},ne={class:"mx-auto mb-3xl max-w-[29rem] text-center max-tablet:max-w-[255px]"},re={class:"mb-3xl rounded-xl bg-base-B1 px-2xl py-xl"},ce={class:"text-4"},le={class:"mb-xl"},ie={class:"relative mb-3xl gap-xl rounded-xl bg-base-B1 px-2xl py-xl"},me={class:"text-4"},ue={class:"mb-xl"},de={key:0,class:"absolute left-1/2 z-10 -mt-4 flex w-max max-w-none -translate-x-1/2 -translate-y-11 items-center gap-xs rounded-sm bg-white p-s text-center shadow-[0_0_24px_1px_#DEDEDE]"},_e={class:"mb-0 whitespace-nowrap"},pe={key:2,class:"flex flex-col gap-m"},Ee=K({__name:"index",async setup(fe){let i,b;const d=k(""),x=k(!1),{user:g}=z(),y=I({withAuth:!0}),P=oe(),C=M(),{data:V,error:h}=([i,b]=R(()=>q("accounts",()=>y.get("users/me/merge-account"))),i=await i,b(),i),_=E(()=>V.value?.data),S=E(()=>_.value?.user.socialLinks?.filter(({provider:e})=>e==="email"));async function w(e,s){return(await y.post("users/me/merge-account",{provider:e,email:t(s)}))?.data}async function L(e){const{redirectUrl:s}=await w(e);window.location.href=s}function A(){P.add({translation:"mergeAccounts.alreadyConnected",type:"alert",timeout:5e3})}async function T({email:e}){if(S.value?.some(c=>c.email===e)){A();return}try{await w("email",e),x.value=!0}catch(c){if(c.status===422){A();return}return}}return(e,s)=>{const c=U,p=G,D=X,F=Y,N=Q,W=ee;return t(g)?(l(),m("div",se,[r(t(j),{"config-file":"true","default-config":!1},{default:u(()=>[o("div",ae,[r(c,{"left-button-label":e.$t("mergeAccounts.backToProfile"),"left-button-target":t(C)({name:"account-settings"})},{default:u(()=>[v(n(e.$t("mergeAccounts.header")),1)]),_:1},8,["left-button-label","left-button-target"]),o("p",ne,n(e.$t("mergeAccounts.text")),1),o("div",re,[o("h2",ce,n(e.$t("mergeAccounts.accounts.mainAccount")),1),o("p",le,n(e.$t("mergeAccounts.mainAccount.description")),1),r(te,{user:t(g),"bg-invert":!0},null,8,["user"])]),o("div",ie,[o("h2",me,n(e.$t("mergeAccounts.accounts.duplicateAccount")),1),o("p",ue,n(e.$t("mergeAccounts.duplicateAccount.description")),1),r(p,{id:"mergeAccounts","form-class":"mt-3xl",type:"form",actions:!1,onSubmit:T},{default:u(()=>[r(p,{modelValue:t(d),"onUpdate:modelValue":s[0]||(s[0]=a=>H(d)?d.value=a:null),type:"email",name:"email","floating-label":!1,label:e.$t("auth.form.email"),validation:"email|required"},null,8,["modelValue","label"]),r(D,{class:"mt-xl w-full",type:"submit"},{default:u(()=>[v(n(e.$t("content.button.continue")),1)]),_:1})]),_:1}),s[1]||(s[1]=o("div",{class:"my-xl flex items-center"},[o("div",{class:"flex-grow border-t border-gray-300"}),o("span",{class:"mx-4 text-gray-500"},"or"),o("div",{class:"flex-grow border-t border-gray-300"})],-1)),t(x)?(l(),m("div",de,[r(F,{name:"wr:metrics-success"}),o("p",_e,n(e.$t("mergeAccounts.connectEmail.success")),1)])):f("",!0),t(h)?(l(),$(N,{key:1,error:t(h)},null,8,["error"])):t(_)?(l(),m("section",pe,[(l(!0),m(Z,null,J(t(_).availableProviders.filter(a=>a!=="email"),a=>(l(),$(W,{key:a,title:e.$t(`mergeAccounts.connectWith.${a}`),type:a,"color-overrides":{[t(B).Google]:"bg-white",[t(B).Facebook]:"[&>svg_*]:!fill-white"},onClick:O(be=>L(a),["prevent"])},null,8,["title","type","color-overrides","onClick"]))),128))])):f("",!0)])])]),_:1})])):f("",!0)}}});export{Ee as default}; 4 5//# debugId=3465c846-f8a9-5d06-9848-3424629239d5
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.