1import{_ as O}from"./er7mJA20.js";import{d as G,J,A as Q,c as K,i as r,a as c,b as e,g as f,w as S,t as a,B as W,f as m,u as l,C as u,l as i,D as p,E as d,M as T,h as X,o as _,e as Z,Q as ee,v as te,_ as se}from"./Dki5OcH0.js";import{_ as le}from"./DSkIamBW.js";import{_ as oe}from"./D87CfIvf.js";import{_ as ae}from"./DtOgmEyk.js";const ne={class:"flex"},ie={class:"xl:hidden"},re={class:"relative hidden h-screen flex-1 xl:flex"},ue={class:"flex flex-1 items-center justify-center"},de={class:"w-full px-5 py-16 md:w-[354px] xl:px-2 xl:py-4"},_e={class:"flex w-full flex-col"},ce={class:"text-xl text-mt-black-100",style:{"font-weight":"500"}},pe={class:"py-2 text-left text-sm"},me={class:"flex flex-col"},ge={key:0,class:"flex w-full flex-col"},fe={class:"pb-1 pt-3 text-sm"},ve=["placeholder"],xe={key:1,class:"flex w-full flex-col"},he={class:"pb-1 pt-3 text-sm"},be=["placeholder"],ye={key:2,class:"flex w-full flex-col"},$e={class:"pb-1 pt-3 text-sm"},we=["placeholder"],ke={key:3,class:"flex w-full flex-col"},Ve={class:"pb-1 pt-3 text-sm"},ze=["placeholder"],Ce={key:4,class:"flex w-full flex-col"},Ye={class:"pb-1 pt-3 text-sm"},Ue=["placeholder"],qe={key:5,class:"flex w-full flex-col"},Me={class:"pb-1 pt-3 text-sm"},De=["placeholder"],Ie={class:"text-xs text-gray-500"},Le={key:6,class:"flex w-full flex-col"},Ne={class:"pb-1 pt-3 text-sm"},Se=["placeholder"],Ae={key:7,class:"flex w-full flex-col"},Be={class:"pb-1 pt-3 text-sm"},Ee=["placeholder"],Te={key:0,class:"flex flex-row items-center pt-4"},Fe={for:"org-terms",class:"pl-2 text-sm"},He={key:1},Pe={class:"pb-2 pt-6 text-xl text-mt-black-100",style:{"font-weight":"500"}},Re={class:"flex flex-col"},je={class:"pb-1 pt-3 text-sm"},Oe={class:"flex flex-col"},Ge={class:"pb-1 pt-3 text-sm"},Je={class:"flex flex-col"},Qe={class:"pb-1 pt-3 text-sm"},Ke={class:"flex flex-col"},We={class:"pb-1 pt-3 text-sm"},Xe={class:"flex flex-col"},Ze={class:"pb-1 pt-3 text-sm"},et={class:"flex flex-row items-center pt-4"},tt={for:"terms",class:"pl-2 text-sm"},st={key:0},lt={class:"py-4 text-center text-sm text-mt-blue-200"},ot={href:"/login",title:"Login to your Megatix account",class:"text-mt-blue-800 underline"},at={class:"text-sm text-mt-error"},nt={key:0},it={class:"pl-1 underline",href:"/dashboard/v2",title:"Manage Events",s:""},rt=G({__name:"index",setup(ut){const{t:I}=J(),L=Q(),g=K(()=>te("countryCode").value==="vn");r("");const x=r(""),h=r(""),b=r(""),y=r(""),$=r(""),w=r(!1),n=r(""),v=r(""),k=r(""),V=r(""),z=r(""),C=r(""),A=r(void 0),Y=r(""),U=r(""),q=r(!1),F=g.value?"/vn/organisers-agreement":"/terms-conditions";function H(){n.value="";const s=L.isLoggedIn;if(!v.value.trim().length)return n.value="You must include an organization name.",!1;if(!k.value.trim().length)return n.value="You must include an organization address.",!1;if(!V.value.trim().length)return n.value="You must include an organization contact email.",!1;if(!z.value.trim().length)return n.value="You must include an organization contact phone number.",!1;if(!v.value.trim().length)return n.value="You must include an organization name.",!1;if(!A.value)return n.value="You must include an organization documentation file.",!1;if(!C.value.trim().length)return n.value="You must include an organization tax ID.",!1;if(!Y.value.trim().length)return n.value="You must include an organization issuance date.",!1;if(!U.value.trim().length)return n.value="You must include an organization issuing authority.",!1;if(!q.value)return n.value="You must accept the organization declaration.",!1;if(!s){if(!x.value.trim().length)return n.value="You must include a first name.",!1;if(!h.value.trim().length)return n.value="You must include a last name.",!1;if(!b.value.trim().length)return n.value="You must include a phone number.",!1;if(!y.value.trim().length)return n.value="You must include an email address.",!1;if(!$.value.trim().length)return n.value="You must include a password.",!1}return w.value?!0:(n.value="You must accept the terms and conditions.",!1)}const M=r(!1);async function P(){if(M.value||!H())return;M.value=!0;let s;try{const t={first_name:x.value,last_name:h.value,phone:b.value,email:y.value,password:$.value,terms:w.value,org_name:v.value,org_address:k.value,org_phone:z.value,org_email:V.value,org_tax_id:C.value,org_issuance_date:Y.value,org_issuing_authority:U.value,org_declaration:q.value,org_file_documentation:A.value};if(s=await L.registerVnSocialOrganization(t),L.user){const N=I("register_vn_social_org_success_message_1"),D=I("register_vn_social_org_success_message_2"),B=I("register_vn_social_org_success_message_3"),E=`<div><div class="font-bold">${N}</div><div class="my-2">${D}</div><div>${B}</div></div>`;ee(E,{dangerouslyHTMLString:!0,autoClose:!1,type:"success",onClose:()=>{window.location.href="/"}})}s&&s.message&&(n.value=`${s.message}`)}catch{n.value=I("register_vn_social_org_unsuccessful")}finally{M.value=!1}}function R(s){const t=s.target;A.value=t.files?t.files[0]:void 0}return(s,t)=>{const N=O,D=X,B=le,E=oe,j=ae;return _(),c("div",ne,[e("div",ie,[f(D,{to:"/",alt:"Megatix Home Page",class:"absolute left-0 top-0 z-10 px-6 py-5"},{default:S(()=>[f(N,{ticketLeftColour:"#263373",ticketRightColour:"#0A97D6",textColour:"#263373",height:32})]),_:1})]),e("div",re,[f(D,{to:"/",alt:"Megatix Home Page",class:"absolute left-0 top-0 z-10 px-6 py-5"},{default:S(()=>[f(N,{ticketLeftColour:"#263373",ticketRightColour:"#0A97D6",textColour:"#263373",height:32})]),_:1}),f(B)]),e("div",ue,[e("div",de,[e("div",_e,[e("h2",ce,a(s.$t("register_vn_social_org_title")),1),e("p",pe,a(s.$t("register_vn_social_org_subtitle_1")),1),e("form",{onSubmit:W(P,["prevent"])},[e("div",me,[l(g)?(_(),c("div",ge,[e("label",fe,[i(a(s.$t("register_vn_social_org_organization_name"))+" ",1),t[14]||(t[14]=e("span",{class:"text-red-500"},"*",-1))]),u(e("input",{"onUpdate:modelValue":t[0]||(t[0]=o=>d(v)?v.value=o:null),name:"socialorg",type:"text",class:"login-input",tabindex:"1",required:"",autofocus:"",placeholder:s.$t("register_vn_social_org_organization_name_placeholder")},null,8,ve),[[p,l(v)]])])):m("",!0),l(g)?(_(),c("div",xe,[e("label",he,[i(a(s.$t("register_vn_social_org_address"))+" ",1),t[15]||(t[15]=e("span",{class:"text-red-500"},"*",-1))]),u(e("textarea",{"onUpdate:modelValue":t[1]||(t[1]=o=>d(k)?k.value=o:null),name:"socialorg",rows:"3",type:"text",class:"login-textarea",tabindex:"1",required:"",autofocus:"",placeholder:s.$t("register_vn_social_org_address_placeholder")},null,8,be),[[p,l(k)]])])):m("",!0),l(g)?(_(),c("div",ye,[e("label",$e,[i(a(s.$t("register_vn_social_org_phone"))+" ",1),t[16
1]||(t[16]=e("span",{class:"text-red-500"},"*",-1))]),u(e("input",{"onUpdate:modelValue":t[2]||(t[2]=o=>d(z)?z.value=o:null),name:"socialorg",type:"text",class:"login-input",tabindex:"1",required:"",autofocus:"",placeholder:s.$t("register_vn_social_org_phone_placeholder")},null,8,we),[[p,l(z)]])])):m("",!0),l(g)?(_(),c("div",ke,[e("label",Ve,[i(a(s.$t("register_vn_social_org_contact_email"))+" ",1),t[17]||(t[17]=e("span",{class:"text-red-500"},"*",-1))]),u(e("input",{"onUpdate:modelValue":t[3]||(t[3]=o=>d(V)?V.value=o:null),name:"socialorg",type:"email",class:"login-input",tabindex:"1",required:"",autofocus:"",placeholder:s.$t("register_vn_social_org_contact_email_placeholder")},null,8,ze),[[p,l(V)]])])):m("",!0),l(g)?(_(),c("div",Ce,[e("label",Ye,[i(a(s.$t("register_vn_social_org_tax_id"))+" ",1),t[18]||(t[18]=e("span",{class:"text-red-500"},"*",-1))]),u(e("input",{"onUpdate:modelValue":t[4]||(t[4]=o=>d(C)?C.value=o:null),name:"socialorg",type:"text",class:"login-input",tabindex:"1",required:"",autofocus:"",placeholder:s.$t("register_vn_social_org_tax_id_placeholder")},null,8,Ue),[[p,l(C)]])])):m("",!0),l(g)?(_(),c("div",qe,[e("label",Me,[i(a(s.$t("register_vn_social_org_documentation"))+" ",1),t[19]||(t[19]=e("span",{class:"text-red-500"},"*",-1))]),e("input",{name:"socialorg",type:"file",class:"login-input",tabindex:"1",required:"",autofocus:"",placeholder:s.$t("register_vn_social_org_documentation_placeholder"),onChange:R},null,40,De),e("span",Ie,a(s.$t("register_vn_social_org_file_subtitle")),1)])):m("",!0),l(g)?(_(),c("div",Le,[e("label",Ne,[i(a(s.$t("register_vn_social_org_issuance_date"))+" ",1),t[20]||(t[20]=e("span",{class:"text-red-500"},"*",-1))]),u(e("input",{"onUpdate:modelValue":t[5]||(t[5]=o=>d(Y)?Y.value=o:null),name:"socialorg",type:"date",class:"login-input",tabindex:"1",required:"",autofocus:"",placeholder:s.$t("register_vn_social_org_issuance_date_placeholder")},null,8,Se),[[p,l(Y)]])])):m("",!0),l(g)?(_(),c("div",Ae,[e("label",Be,[i(a(s.$t("register_vn_social_org_issuing_authority"))+" ",1),t[21]||(t[21]=e("span",{class:"text-red-500"},"*",-1))]),u(e("input",{"onUpdate:modelValue":t[6]||(t[6]=o=>d(U)?U.value=o:null),name:"socialorg",type:"text",class:"login-input",tabindex:"1",required:"",autofocus:"",placeholder:s.$t("register_vn_social_org_issuing_authority_placeholder")},null,8,Ee),[[p,l(U)]])])):m("",!0)]),l(g)?(_(),c("div",Te,[u(e("input",{id:"org-terms","onUpdate:modelValue":t[7]||(t[7]=o=>d(q)?q.value=o:null),type:"checkbox",name:"org-terms",class:"size-5 rounded-md border-mt-blue-200 ring-0 focus:border-mt-blue-200 focus:ring-[3px] focus:ring-blue-200",tabindex:"1",required:""},null,512),[[T,l(q)]]),e("label",Fe,[i(a(s.$t("register_vn_social_org_confirm_ts_and_cs_1"))+" ",1),t[22]||(t[22]=e("span",{class:"text-red-500"},"*",-1))])])):m("",!0),l(L).isLoggedIn?m("",!0):(_(),c("div",He,[e("h2",Pe,a(s.$t("register_presenter_create_your_account")),1),e("div",Re,[e("label",je,[i(a(s.$t("register_user_first_name"))+" ",1),t[23]||(t[23]=e("span",{class:"text-red-500"},"*",-1))]),u(e("input",{name:"first_name",type:"text",class:"login-input","onUpdate:modelValue":t[8]||(t[8]=o=>d(x)?x.value=o:null),tabindex:"2",required:""},null,512),[[p,l(x)]])]),e("div",Oe,[e("label",Ge,[i(a(s.$t("register_user_last_name"))+" ",1),t[24]||(t[24]=e("span",{class:"text-red-500"},"*",-1))]),u(e("input",{name:"last_name",type:"text",class:"login-input","onUpdate:modelValue":t[9]||(t[9]=o=>d(h)?h.value=o:null),tabindex:"3",required:""},null,512),[[p,l(h)]])]),e("div",Je,[e("label",Qe,[i(a(s.$t("register_user_phone"))+" ",1),t[25]||(t[25]=e("span",{class:"text-red-500"},"*",-1))]),u(e("input",{name:"phone",type:"tel",class:"login-input","onUpdate:modelValue":t[10]||(t[10]=o=>d(b)?b.value=o:null),tabindex:"4",required:""},null,512),[[p,l(b)]])]),e("div",Ke,[e("label",We,[i(a(s.$t("register_user_email"))+" ",1),t[26]||(t[26]=e("span",{class:"text-red-500"},"*",-1))]),u(e("input",{name:"email",type:"email",class:"login-input","onUpdate:modelValue":t[11]||(t[11]=o=>d(y)?y.value=o:null),tabindex:"5",required:""},null,512),[[p,l(y)]])]),e("div",Xe,[e("label",Ze,[i(a(s.$t("register_user_password"))+" ",1),t[27]||(t[27]=e("span",{class:"text-red-500"},"*",-1))]),u(e("input",{name:"password",type:"password",class:"login-input","onUpdate:modelValue":t[12]||(t[12]=o=>d($)?$.value=o:null),tabindex:"6",required:""},null,512),[[p,l($)]])])])),e("div",et,[u(e("input",{type:"checkbox",name:"terms",class:"size-5 rounded-md border-mt-blue-200 ring-0 focus:border-mt-blue-200 focus:ring-[3px] focus:ring-blue-200",tabindex:"7",id:"terms","onUpdate:modelValue":t[13]||(t[13]=o=>d(w)?w.value=o:null),required:""},null,512),[[T,l(w)]]),e("label",tt,[i(a(s.$t("register_presenter_confirm_ts_and_cs_1"))+" ",1),f(D,{to:l(F),class:"text-mt-blue-800 underline",target:"_blank"},{default:S(()=>[i(a(s.$t("register_presenter_confirm_ts_and_cs_2")),1)]),_:1},8,["to"]),i(" "+a(s.$t("register_presenter_confirm_ts_and_cs_3"))+" ",1),t[28]||(t[28]=e("span",{class:"text-red-500"},"*",-1))])]),e("div",null,[f(j,{tabindex:"8",classes:"w-full mt-4 h-12 flex justify-center items-center text-md",disabled:l(M)},{default:S(()=>[l(M)?(_(),Z(E,{key:1,bgColourClass:"bg-mt-blue-900",class:"pl-2"})):(_(),c("span",st,a(s.$t("register_presenter_register")),1))]),_:1},8,["disabled"])]),e("p",lt,[i(a(s.$t("register_presenter_have_account_1"))+" ",1),e("a",ot,a(s.$t("register_presenter_have_account_2")),1)])],32),e("span",at,[i(a(l(n)),1),l(n).includes("You already have access")?(_(),c("span",nt,[e("a",it,a(s.$t("register_presenter_access_dashboard_1")),1),i(a(s.$t("register_presenter_access_dashboard_2")),1)])):m("",!0)])])])])])}}}),gt=se(rt,[["__scopeId","data-v-18249385"]]);export{gt 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.