1import"../chunks/DsnmJJEf.js";import{p as ae,u as H,j as r,h as p,d as A,t as J,g as t,a as j,b as se,i as s,e as l,r as u,k as ie,n as oe,f as ne}from"../chunks/BmHZF-Ji.js";import{g as le,e as ue,s as E}from"../chunks/BExEIMBW.js";import{i as K}from"../chunks/-fyEMkTP.js";import{k as pe}from"../chunks/CShzh0tH.js";import{h as ve}from"../chunks/CCIXsJkK.js";import{s as b,r as m}from"../chunks/CMdR6SIr.js";import{t as me,s as de}from"../chunks/BdC6Ru2K.js";import{b as h,a as fe}from"../chunks/DMXwTEvS.js";import"../chunks/Bz87HSL5.js";import{G as _e}from"../chunks/BPROxWfp.js";import{a as i,t as o,s as ce}from"../chunks/iYnuDXpu.js";var be=A('<input type="text" required/> <input type="text" required/>',1),he=A('<small class="error">⨠<!></small>'),ye=A('<form class="form svelte-uk29bf"><div class="header"> </div> <div class="body"><!> <input type="text"/> <input type="text"/> <input type="tel"/> <!> <div class="terms svelte-uk29bf"><input type="checkbox"/> <div class="text"><div> <a href="/general-terms" class="svelte-uk29bf"> </a>.</div></div></div> <button type="submit"> </button> <!></div></form>');function Te(M,O){ae(O,!0),H(()=>{i.keyId&&(i.user||le("/auth/login"))}),H(()=>{i.user&&(r(y,i.user.FirstName,!0),r(g,i.user.LastName,!0),r(x,i.user.Phone,!0),r(d,i.user.Identity.toString(),!0),r(k,i.user.Company,!0),r(I,i.user.Vat,!0),r(w,i.user.AgreeTerms==1))});let y=p(""),g=p(""),x=p(""),d=p("0"),k=p(""),I=p(""),w=p(!1),Q=!1,f=p("");async function R(e){e.preventDefault(),r(f,"");const a=await ce.postUserUpdate(t(d),t(y),t(g),t(x),t(k),t(I),t(w));if(a==null){r(f,"Failed to update profile");return}if(Number.parseInt(a.ErrCode)){r(f,a.ErrText,!0);return}window.location.href="/profile"}var _=ye();_.inert=Q;var F=l(_),W=l(F,!0);u(F);var D=s(F,2),L=l(D);pe(L,()=>i.langId,e=>{{let a=ie(()=>[{label:o("person"),value:"1"},{label:o("company"),value:"0"}]);_e(e,{name:"type",get data(){return t(a)},get value(){return t(d)},set value(n){r(d,n,!0)}})}});var N=s(L,2);m(N);var q=s(N,2);m(q);var C=s(q,2);m(C);var P=s(C,2);{var X=e=>{var a=be(),n=ne(a);m(n);var c=s(n,2);m(c),J((v,U)=>{b(n,"placeholder",v),b(c,"placeholder",U)},[()=>o("company"),()=>o("vat")]),h(n,()=>t(k),v=>r(k,v)),h(c,()=>t(I),v=>r(I,v)),j(e,a)};K(P,e=>{t(d)=="0"&&e(X)})}var G=s(P,2),S=l(G);m(S);var V=s(S,2),$=l(V),z=l($,!0),B=s(z),Y=l(B,!0);u(B),oe(),u($),u(V),u(G);var T=s(G,2),Z=l(T,!0);u(T);var ee=s(T,2);{var te=e=>{var a=he(),n=s(l(a));ve(n,()=>t(f)),u(a),me(3,a,()=>de),j(e,a)};K(ee,e=>{t(f)&&e(te)})}u(D),u(_),J((e,a,n,c,v,U,re)=>{E(W,e),b(N,"placeholder",a),b(q,"placeholder",n),b(C,"placeholder",c),E(z,v),E(Y,U),E(Z,re)},[()=>o("edit_profile"),()=>o("first_name"),()=>o("last_name"),()=>o("phone"),()=>o("terms"),()=>o("terms_link"),()=>o("save")]),ue("submit",_,R),h(N,()=>t(y),e=>r(y,e)),h(q,()=>t(g),e=>r(g,e)),h(C,()=>t(x),e=>r(x,e)),fe(S,()=>t(w),e=>r(w,e)),j(M,_),se()}export{Te as component};
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.