PageSourceSearch

https://cdnweb.makusi.eus/vite/account-0d3c1b09.js

js makusi.eus collected 2026-09-25 07:05:30 UTC 14,082 bytes, 1 lines download raw bytes

1import{h as b,j as W,a as e,g as d,i as n,S as D,t as g,d as _,x as z,u as Y,Q as J,q as Xe,o as Ye,B as Je,T as et,k as fe,H as me}from"./index-e2ba511e.js";import{u as tt}from"./main.context-9e1fdb75.js";import{A as R}from"./api-f0f3fa1e.js";import{I as Q}from"./input-0bf011e9.js";import{A as nt}from"./account-extra-fields-46774c48.js";import{I as C}from"./icon-3e67d251.js";import{B as m,T as o,F as $e,s as lt}from"./focus-container-0e637d6b.js";import{F as st}from"./form-fb1ee009.js";import{P as p}from"./progress-dfb4d349.js";import{M as Z}from"./modal-05175024.js";import{P as it}from"./pin-0fc4b6e9.js";import{b as ve,g as rt,c as ot,l as at}from"./sso-f5e97330.js";import{f as ct,P as dt}from"./pin-dcba8437.js";import{i as ut}from"./utils-e211fe9a.js";import{T as _t}from"./t-error-5d04a8c2.js";import"./front-error-ba1c6c6c.js";import"./tab-key-handler-cd4812f6.js";import"./keyboard-4fb05e97.js";var gt=g("<div class=mo-updatePin__buttons--secondary>"),ft=g("<div class=mo-updatePin__buttons--primary>");function mt(t){const[a,h]=b(null),[i,v]=b(null),S=async(r,l)=>{v(l?r:null)},w=async()=>{var r;try{p.start(),h("sending");const l=i(),f={parental_pin:l},$="/api/v1/accounts/me";(await R.put($,f)).ok&&((r=t.onClose)==null||r.call(t,l))}finally{p.stop(),h(null)}},s=()=>config.SSO_ENABLED?ve(i(),w):w();return W(()=>{a()==="sending"?p.start():p.stop()}),e(Z,{class:"mo-updatePin",get show(){return!!t.isOpen},title:"profile_pinAdmin",get buttons(){return[(()=>{var r=d(gt);return n(r,e(m,{buttonStyle:"secondary",onClick:()=>{var l;return(l=t.onClose)==null?void 0:l.call(t,i())},extraPadding:!0,get children(){return[e(C,{filter:"secondary-text",icon:"cancel",size:"xl",sizeDesktop:"2xl"}),e(o,{size:"md",sizeDesktop:"lg",t:"cancel"})]}})),r})(),(()=>{var r=d(ft);return n(r,e(m,{buttonStyle:"primary",get isLoading(){return a()==="sending"},get disabled(){return a()!==null||!i()},type:"submit",extraPadding:!0,onClick:s,get children(){return[e(C,{filter:"primary-text",icon:"save",size:"xl",sizeDesktop:"2xl"}),e(o,{size:"md",sizeDesktop:"lg",t:"save"})]}})),r})()]},get children(){return e(D,{get when(){return t.isOpen},get children(){return e(it,{get size(){return t.size},onChange:S})}})}})}var pt=g("<div class=mo-updatePassword__error role=alert aria-live=assertive>"),$t=g("<div class=mo-updatePassword__form><!$><!/><!$><!/><!$><!/>");function vt(t){let a,h;const[i,v]=b(null),[S,w]=b(null),s=async()=>{var l;try{p.start(),v("sending");const f=a.value,$=h.value;if(!f||z.validatePassword(f))w("form_error_password");else if(f!==$)w("form_error_password_rep");else{const x={password:f},F="/api/v1/accounts/me";(await R.put(F,x)).ok&&((l=t.onClose)==null||l.call(t))}}finally{p.stop(),v(null)}},r=l=>{l.key==="Enter"&&!ut()&&s()};return W(()=>{i()==="sending"?p.start():p.stop()}),e(Z,{class:"mo-updatePassword",get onClose(){return t.onClose},get show(){return!!t.isOpen},title:"form_field_password",get buttons(){return[e(m,{buttonStyle:"secondary",onClick:()=>{var l;return(l=t.onClose)==null?void 0:l.call(t)},extraPadding:!0,get children(){return[e(C,{filter:"secondary-text",icon:"cancel",size:"xl",sizeDesktop:"2xl"}),e(o,{size:"md",sizeDesktop:"lg",t:"cancel"})]}}),e(m,{buttonStyle:"primary",get isLoading(){return i()==="sending"},get disabled(){return i()!==null},extraPadding:!0,onClick:s,get children(){return[e(C,{filter:"primary-text",icon:"save",size:"xl",sizeDesktop:"2xl"}),e(o,{size:"md",sizeDesktop:"lg",t:"save"})]}})]},get children(){return e(D,{get when(){return t.isOpen},get children(){var l=d($t),f=l.firstChild,[$,x]=_(f.nextSibling),F=$.nextSibling,[B,K]=_(F.nextSibling),q=B.nextSibling,[U,V]=_(q.nextSibling);return n(l,e(Q,{ref(k){var y=a;typeof y=="function"?y(k):a=k},type:"password",name:"password",placeholder:"form_field_password_placeholder",label:"form_field_password",required:!0,autocomplete:"new-password",onKeyDown:r}),$,x),n(l,e(Q,{ref(k){var y=h;typeof y=="function"?y(k):h=k},type:"password",placeholder:"form_field_password_repeat",label:"form_field_password_repeat",required:!0,autocomplete:"new-password",onKeyDown:r}),B,K),n(l,e(D,{get when(){return S()},get children(){var k=d(pt);return n(k,e(o,{size:"sm",sizeDesktop:"md",get t(){return S()}})),k}}),U,V),l}})}})}var bt=g("<div class=mo-closeSessionAllDevices__buttons--secondary>"),ht=g("<div class=mo-closeSessionAllDevices__buttons--primary>");function xt(t){const h=Y().wrappedNavigate(J()),[i,v]=b(null),S=async()=>{var s;try{p.start(),v("sending");const r="/api/v1/logout?all_devices=true";(await R.post(r)).ok&&(z.setCookies(null),z.setAccountId(null),h("/"),window.dispatchEvent(new CustomEvent("logoutalldevices")),(s=t.onClose)==null||s.call(t))}finally{p.stop(),v(null)}},w=s=>{var $,x;const{currentFocused:r,key:l,methods:f}=s.detail;
1return l==="ArrowLeft"&&f.focus(0),l==="ArrowRight"&&f.focus(1),l==="Enter"&&(($=r.node)==null||$.click()),l==="Escape"&&((x=t.onClose)==null||x.call(t)),!0};return W(()=>{i()==="sending"?p.start():p.stop()}),e(Z,{class:"mo-closeSessionAllDevices",get show(){return t.isOpen},title:"account_removeDevices_confirmation",role:"alertdialog",get buttons(){return e($e,{autoFocus:!0,onChildFocusKey:w,group:"playerPlay",index:0,get children(){return[(()=>{var s=d(bt);return n(s,e(m,{buttonStyle:"secondary",get onClick(){return t.onClose},extraPadding:!0,focusIndex:0,get children(){return[e(C,{filter:"secondary-text",icon:"cancel",size:"xl",sizeDesktop:"2xl"}),e(o,{size:"md",sizeDesktop:"lg",t:"cancel"})]}})),s})(),(()=>{var s=d(ht);return n(s,e(m,{buttonStyle:"primary",get isLoading(){return i()==="sending"},get disabled(){return i()!==null},extraPadding:!0,onClick:S,focusIndex:1,get children(){return[e(C,{filter:"primary-text",icon:"ok",size:"xl",sizeDesktop:"2xl"}),e(o,{size:"md",sizeDesktop:"lg",t:"ok"})]}})),s})()]}})}})}var yt=g('<p id=delete-account-description class="u-text u-text--2xl">'),St=g("<div class=mo-deleteAccount__buttons--secondary>"),wt=g("<div class=mo-deleteAccount__buttons--danger>");function kt(t){const a=Y(),h=a.wrappedNavigate(J()),[i,v]=b(null),S=async()=>{var s;try{p.start(),v("sending");const r=`/api/v1/accounts/${config.SSO_ENABLED?"sso":"me"}`;(await R.delete(r)).ok&&(z.setCookies(null),z.setAccountId(null),h("/"),(s=t.onClose)==null||s.call(t))}finally{p.stop(),v(null)}},w=s=>{var $,x;const{currentFocused:r,key:l,methods:f}=s.detail;
1return l==="ArrowLeft"&&f.focus(0),l==="ArrowRight"&&f.focus(1),l==="Enter"&&(($=r.node)==null||$.click()),l==="Escape"&&((x=t.onClose)==null||x.call(t)),!0};return W(()=>{i()==="sending"?p.start():p.stop()}),e(Z,{class:"mo-deleteAccount",title:"delete_account",get show(){return t.isOpen},ariaDescribedBy:"delete-account-description",role:"alertdialog",get buttons(){return e($e,{autoFocus:!0,onChildFocusKey:w,group:"playerPlay",index:0,get children(){return[(()=>{var s=d(St);return n(s,e(m,{buttonStyle:"secondary",get onClick(){return t.onClose},extraPadding:!0,focusIndex:0,get children(){return[e(C,{filter:"secondary-text",icon:"cancel",size:"xl",sizeDesktop:"2xl"}),e(o,{size:"md",sizeDesktop:"lg",t:"cancel"})]}})),s})(),(()=>{var s=d(wt);return n(s,e(m,{buttonStyle:"danger",get isLoading(){return i()==="sending"},get disabled(){return i()!==null},extraPadding:!0,onClick:S,focusIndex:1,get children(){return[e(C,{filter:"primary-text",icon:"ok",size:"xl",sizeDesktop:"2xl"}),e(o,{size:"md",sizeDesktop:"lg",t:"delete_account"})]}})),s})()]}})},get children(){return e(D,{get when(){return t.isOpen},get children(){var s=d(yt);return n(s,()=>a==null?void 0:a.t("delete_account_description")),s}})}})}var zt=g("<div class=p-account>"),Ct=g('<div class="p-account__title u-form__title"><!$><!/><h1 class="u-text u-text--2xl u-text--desktop-3xl">'),Dt=g('<div class="p-account__error u-form__error u-form__error--api"role=alert aria-live=assertive>'),Pt=g("<div class=u-form__field><!$><!/><div class=u-form__buttonField><!$><!/><div class=u-form__buttonRow><div class=u-form__buttonRow--secondary></div><div class=u-form__buttonRow--secondary>"),At=g('<div class="p-account__fields u-form__fields"><div class=u-form__row><div class=u-form__field></div><div class=u-form__field></div></div><div class=u-form__row><div class=u-form__field><!$><!/><div class=u-form__buttonField><!$><!/><div class=u-form__buttonRow><div class=u-form__buttonRow--secondary></div></div></div></div><!$><!/></div><!$><!/><div class=u-form__field></div><div class=u-form__field>'),pe=g("<div class=p-account__buttons--primary>"),Ot=g('<div class="p-account__buttons u-form__buttons"><div class=p-account__buttons--secondary></div><!$><!/><!$><!/>'),Et=g('<div class="p-account__form u-form"><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/>');function Xt(){const t=Y(),a=tt(),h=J(),i=t.wrappedNavigate(h),[v,S]=b(!1),[w,s]=b(null),[r,l]=b(!1),[f,$]=b(!1),[x,F]=b(!1),[B,K]=b(!1),[q,U]=b(null),[V,k]=b(null);t!=null&&t.isProfilesDisabled()&&i("/not-found",{replace:!0});const y=Xe(()=>config.SSO_ENABLED),be=async u=>{try{S(!0);const A=z.getAccountJsonFromFormData(u);Object.assign(A,{parental_pin:q()});const P="/api/v1/accounts/me",H=await R.put(P,A);H.ok?i("/"):(lt({top:0,behavior:"smooth"}),k(H.body.message))}catch(A){k(A.message)}finally{S(!1)}},he=async()=>{fe(()=>{U(null),ve(null,async()=>{await(a==null?void 0:a.refreshAll())})})},xe=()=>i("/account-sso"),ye=()=>{y()?i(`${me.PROFILES}/${z.getProfileId()}`):h(-1)},Se=()=>{y()?i(me.CHANGE_PASSWORD):$(!0)},ee=u=>{s(u),U(u==null?void 0:u.parental_pin)},te=()=>{z.setCookies(null),z.setAccountId(null),t==null||t.refreshTexts()},we=()=>{config.SSO_ENABLED?at(te):te()};return Ye(async()=>{if(config.SSO_ENABLED)rt(u=>{u&&(u.status==="OK"||u.errorCode===0)?ot(u).then(ee):(we(),i("/"))});else{const u=await R.get("/api/v1/profiles/me");u.ok?ee(u.body):i("/")}}),(()=>{var u=d(zt);return n(u,e(D,{get when(){return w()},keyed:!0,get fallback(){return e(Je,{mode:"overlay"})},children:A=>(()=>{var P=d(Et),H=P.firstChild,[ne,ke]=_(H.nextSibling),ze=ne.nextSibling,[le,Ce]=_(ze.nextSibling),De=le.nextSibling,[se,Pe]=_(De.nextSibling),Ae=se.nextSibling,[ie,Oe]=_(Ae.nextSibling),Ee=ie.nextSibling,[Ie,Le]=_(Ee.nextSibling);return n(P,e(st,{onSubmit:be,get loading(){return v()},autocomplete:"off",get children(){return[(()=>{var c=d(Ct),O=c.firstChild,[E,M]=_(O.nextSibling),I=E.nextSibling;return n(c,e(et,{get children(){return t==null?void 0:t.t("account")}}),E,M),n(I,()=>t==null?void 0:t.t("account")),c})(),e(D,{get when(){return V()},get children(){var c=d(Dt);return n(c,e(_t,{get errorCode(){return V()}})),c}}),(()=>{var c=d(At),O=c.firstChild,E=O.firstChild,M=E.nextSibling,I=O.nextSibling,T=I.firstChild,X=T.firstChild,[j,L]=_(X.nextSibling),re=j.nextSibling,Fe=re.firstChild,[oe,Me]=_(Fe.nextSibling),Ne=oe.nextSibling,Re=Ne.firstChild,Be=T.nextSibling,[Ue,Te]=_(Be.nextSibling),Ke=I.nextSibling,[ae,qe]=_(Ke.nextSibling),ce=ae.nextSibling,Ve=ce.nextSibling;return n(E,e(Q,{type:"text",name:"name",label:"form_field_name",placeholder:"form_field_name",get disabled(){return y()},required:!0,autocomplete:"name",get validation(){return z.validateName},get initialValue(){return A.account_name}})),n(M,e(Q,{name:"email",disabled:!0,label:"form_field_email",placeholder:"form_field_email",required:!0,autocomplete:"username",get initialValue(){return A.email},get validation(){return z.validateEMail}})),n(T,e(o,{role:"heading",ariaLevel:2,class:"u-form__label",size:"md",sizeDesktop:"lg",t:"form_field_password"}),j,L),n(re,e(o,{size:"sm",children:"********"}),oe,Me),n(Re,e(m,{buttonStyle:"secondary",onClick:Se,get children(){return e(o,{size:"sm",t:"account_changePassword"})}})),n(I,e(D,{get when(){var N,G;return(G=(N=t==null?void 0:t.settings())==null?void 0:N.age_ratings)==null?void 0:G.length},get children(){var N=d(Pt),G=N.firstChild,[de,He]=_(G.nextSibling),ue=de.nextSibling,je=ue.firstChild,[_e,Ge]=_(je.nextSibling),Qe=_e.nextSibling,ge=Qe.firstChild,We=ge.nextSibling;return n(N,e(o,{role:"heading",ariaLevel:2,class:"u-form__label",size:"md",sizeDesktop:"lg",t:"profile_pinAdmin"}),de,He),n(ue,e(D,{get when(){return ct(q())},get fallback(){return e(o,{size:"sm",children:"- - - -"})},children:Ze=>e(o,{get children(){return Ze()}})}),_e,Ge),n(ge,e(m,{buttonStyle:"secondary",onClick:()=>l(!0),get children(){return e(o,{size:"sm",t:"profile_changePinAdmin"})}})),n(We,e(m,{buttonStyle:"secondary",onClick:he,get children(){return e(o,{size:"sm",t:"remove"})}})),N}}),Ue,Te),n(c,e(nt,{data:A,mode:"update",get isDisabled(){return y()}}),ae,qe),n(ce,e(m,{format:"link",class:"p-account__btnLogoutAllDevices",onClick:()=>F(!0),get children(){return e(o,{color:"main-text",t:"account_removeDevices"})}})),n(Ve,e(m,{format:"link",class:"p-account__btnDeleteAccount",onClick:()=>K(!0),get children(){return e(o,{color:"main-text",t:"delete_account"})}})),c})(),(()=>{var c=d(Ot),O=c.firstChild,E=O.nextSibling,[M,I]=_(E.nextSibling),T=M.nextSibling,[X,j]=_(T.nextSibling);return n(O,e(m,{buttonStyle:"secondary",onClick:ye,extraPadding:!0,get children(){return[e(C,{filter:"secondary-text",icon:"caret",rotate:180,size:"xl",sizeDesktop:"2xl"}),e(o,{size:"md",sizeDesktop:"lg",t:"back"})]}})),n(c,e(D,{get when(){return y()},get children(){var L=d(pe);return n(L,e(m,{buttonStyle:"primary",onClick:xe,get isLoading(){return v()},extraPadding:!0,get children(){return[e(C,{icon:"edit",rotate:180,size:"xl",sizeDesktop:"2xl"}),e(o,{size:"md",sizeDesktop:"lg",t:"account_edit_data"})]}})),L}}),M,I),n(c,e(D,{get when(){return!y()},get children(){var L=d(pe);return n(L,e(m,{buttonStyle:"primary",get isLoading(){return v()},type:"submit",extraPadding:!0,get children(){return[e(C,{filter:"primary-text",icon:"save",size:"xl",sizeDesktop:"2xl"}),e(o,{size:"md",sizeDesktop:"lg",t:"save"})]}})),L}}),X,j),c})()]}}),ne,ke),n(P,e(mt,{size:dt,onClose:c=>
1{fe(async()=>{l(!1),c&&(U(c),await(a==null?void 0:a.refreshAll()))})},get isOpen(){return r()}}),le,Ce),n(P,e(vt,{onClose:()=>$(!1),get isOpen(){return f()}}),se,Pe),n(P,e(xt,{onClose:()=>F(!1),get isOpen(){return x()}}),ie,Oe),n(P,e(kt,{onClose:()=>K(!1),get isOpen(){return B()}}),Ie,Le),P})()})),u})()}export{Xt as default};

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.