Your IP : 216.73.217.77


Current Path : /home/users/unlimited/www/whatsapp-crm/public/build/assets/
Upload File :
Current File : /home/users/unlimited/www/whatsapp-crm/public/build/assets/Register-5df75cc5.js

import{r as A,T as $,q as z,R as M,c as l,a as t,e as c,f as v,u as a,t as m,k as x,g as H,n as d,b as h,o as i,l as V,j}from"./app-43851608.js";import{_ as p}from"./FormInput-4a309017.js";import{u as B,a as F}from"./ReCaptcha-55f58cbf.js";const U={class:"flex h-screen justify-center"},N={class:"flex justify-center items-center"},R={class:"w-[20em] md:w-[30em]"},S={class:"flex justify-center mb-5"},q=["src","alt"],L={key:1,class:"text-2xl mb-2"},T={class:"text-2xl text-center"},Z={class:"text-center text-sm text-slate-500"},E={class:"mt-5 grid gap-x-6 gap-y-4 grid-cols-6"},O={class:"mt-5"},P={class:"mt-5"},D={class:"mt-5 grid gap-x-6 gap-y-4 grid-cols-6"},K={key:0,class:"form-error text-[#b91c1c] text-xs"},Q={class:"mt-6"},G={key:0,type:"submit",class:"rounded-md bg-primary px-3 py-3 text-sm text-white shadow-sm w-full"},I={key:1,type:"button",class:"rounded-md bg-primary px-3 py-3 text-sm text-white shadow-sm w-full flex justify-center"},J=t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24"},[t("path",{fill:"currentColor",d:"M12 2A10 10 0 1 0 22 12A10 10 0 0 0 12 2Zm0 18a8 8 0 1 1 8-8A8 8 0 0 1 12 20Z",opacity:".5"}),t("path",{fill:"currentColor",d:"M20 12h2A10 10 0 0 0 12 2V4A8 8 0 0 1 20 12Z"},[t("animateTransform",{attributeName:"transform",dur:"1s",from:"0 12 12",repeatCount:"indefinite",to:"360 12 12",type:"rotate"})])],-1),W=[J],X={key:0,class:"flex justify-center my-6"},Y={class:"text-sm text-gray-500 px-4 text-center"},ee={class:"flex justify-center gap-4"},ae={key:0,href:"/social-login/facebook",class:"border rounded-full p-2 cursor-pointer"},te=t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"30",viewBox:"0 0 256 256"},[t("path",{fill:"#1877F2",d:"M256 128C256 57.308 198.692 0 128 0C57.308 0 0 57.307 0 128c0 63.888 46.808 116.843 108 126.445V165H75.5v-37H108V99.8c0-32.08 19.11-49.8 48.347-49.8C170.352 50 185 52.5 185 52.5V84h-16.14C152.958 84 148 93.867 148 103.99V128h35.5l-5.675 37H148v89.445c61.192-9.602 108-62.556 108-126.445"}),t("path",{fill:"#FFF",d:"m177.825 165l5.675-37H148v-24.01C148 93.866 152.959 84 168.86 84H185V52.5S170.352 50 156.347 50C127.11 50 108 67.72 108 99.8V128H75.5v37H108v89.445A128.959 128.959 0 0 0 128 256a128.9 128.9 0 0 0 20-1.555V165h29.825"})],-1),oe=[te],se={key:1,href:"/social-login/google",class:"border rounded-full p-2 cursor-pointer"},re=j('<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" viewBox="0 0 128 128"><path fill="#fff" d="M44.59 4.21a63.28 63.28 0 0 0 4.33 120.9a67.6 67.6 0 0 0 32.36.35a57.13 57.13 0 0 0 25.9-13.46a57.44 57.44 0 0 0 16-26.26a74.33 74.33 0 0 0 1.61-33.58H65.27v24.69h34.47a29.72 29.72 0 0 1-12.66 19.52a36.16 36.16 0 0 1-13.93 5.5a41.29 41.29 0 0 1-15.1 0A37.16 37.16 0 0 1 44 95.74a39.3 39.3 0 0 1-14.5-19.42a38.31 38.31 0 0 1 0-24.63a39.25 39.25 0 0 1 9.18-14.91A37.17 37.17 0 0 1 76.13 27a34.28 34.28 0 0 1 13.64 8q5.83-5.8 11.64-11.63c2-2.09 4.18-4.08 6.15-6.22A61.22 61.22 0 0 0 87.2 4.59a64 64 0 0 0-42.61-.38z"></path><path fill="#e33629" d="M44.59 4.21a64 64 0 0 1 42.61.37a61.22 61.22 0 0 1 20.35 12.62c-2 2.14-4.11 4.14-6.15 6.22Q95.58 29.23 89.77 35a34.28 34.28 0 0 0-13.64-8a37.17 37.17 0 0 0-37.46 9.74a39.25 39.25 0 0 0-9.18 14.91L8.76 35.6A63.53 63.53 0 0 1 44.59 4.21z"></path><path fill="#f8bd00" d="M3.26 51.5a62.93 62.93 0 0 1 5.5-15.9l20.73 16.09a38.31 38.31 0 0 0 0 24.63q-10.36 8-20.73 16.08a63.33 63.33 0 0 1-5.5-40.9z"></path><path fill="#587dbd" d="M65.27 52.15h59.52a74.33 74.33 0 0 1-1.61 33.58a57.44 57.44 0 0 1-16 26.26c-6.69-5.22-13.41-10.4-20.1-15.62a29.72 29.72 0 0 0 12.66-19.54H65.27c-.01-8.22 0-16.45 0-24.68z"></path><path fill="#319f43" d="M8.75 92.4q10.37-8 20.73-16.08A39.3 39.3 0 0 0 44 95.74a37.16 37.16 0 0 0 14.08 6.08a41.29 41.29 0 0 0 15.1 0a36.16 36.16 0 0 0 13.93-5.5c6.69 5.22 13.41 10.4 20.1 15.62a57.13 57.13 0 0 1-25.9 13.47a67.6 67.6 0 0 1-32.36-.35a63 63 0 0 1-23-11.59A63.73 63.73 0 0 1 8.75 92.4z"></path></svg>',1),ne=[re],me={__name:"Register",props:["flash","config","companyConfig"],setup(b){const n=b,_=A(!1),e=$({first_name:null,last_name:null,organization_name:null,email:null,password:null,password_confirmation:null,recaptcha_response:null}),u=s=>{const o=n.config.find(f=>f.key===s);return o?o.value:""},C=async()=>{if(_.value=!0,u("recaptcha_active")==="1"){const s=await k();e.recaptcha_response=s}e.post("signup",{preserveScroll:!0,onFinish:()=>{_.value=!1}})},k=()=>new Promise(s=>{grecaptcha.ready(()=>{grecaptcha.execute(u("recaptcha_site_key"),{action:"submit"}).then(o=>{s(o)})})});return z(()=>{u("recaptcha_active")==="1"&&B(u("recaptcha_site_key"))}),M(()=>{F(u("recaptcha_site_key"))}),(s,o)=>{var f,g,y,w;return i(),l("div",U,[t("div",N,[t("div",R,[t("div",S,[c(a(V),{href:"/"},{default:v(()=>[n.companyConfig.logo?(i(),l("img",{key:0,class:"max-w-[180px]",src:"/media/"+n.companyConfig.logo,alt:n.companyConfig.company_name},null,8,q)):(i(),l("h4",L,m(n.companyConfig.company_name),1))]),_:1})]),t("h1",T,m(s.$t("Create account")),1),t("div",Z,[x(m(s.$t("Already have an account?"))+" ",1),c(a(V),{href:"login",class:"text-sm text-primary-600 dark:text-primary-500 border-b hover:border-gray-500"},{default:v(()=>[x(m(s.$t("Login")),1)]),_:1})]),t("form",{onSubmit:o[6]||(o[6]=H(r=>C(),["prevent"])),class:"mt-5 pb-10"},[t("div",E,[c(p,{modelValue:a(e).first_name,"onUpdate:modelValue":o[0]||(o[0]=r=>a(e).first_name=r),name:s.$t("First name"),error:a(e).errors.first_name,type:"text",class:d("col-span-3")},null,8,["modelValue","name","error"]),c(p,{modelValue:a(e).last_name,"onUpdate:modelValue":o[1]||(o[1]=r=>a(e).last_name=r),name:s.$t("Last name"),error:a(e).errors.last_name,type:"text",class:d("col-span-3")},null,8,["modelValue","name","error"])]),t("div",O,[c(p,{modelValue:a(e).organization_name,"onUpdate:modelValue":o[2]||(o[2]=r=>a(e).organization_name=r),name:s.$t("Organization name"),error:a(e).errors.organization_name,type:"text",class:d("sm:col-span-6")},null,8,["modelValue","name","error"])]),t("div",P,[c(p,{modelValue:a(e).email,"onUpdate:modelValue":o[3]||(o[3]=r=>a(e).email=r),name:s.$t("Email"),error:a(e).errors.email,type:"email",class:d("sm:col-span-3")},null,8,["modelValue","name","error"])]),t("div",D,[c(p,{modelValue:a(e).password,"onUpdate:modelValue":o[4]||(o[4]=r=>a(e).password=r),name:s.$t("Password"),error:a(e).errors.password,type:"password",class:d("col-span-3")},null,8,["modelValue","name","error"]),c(p,{modelValue:a(e).password_confirmation,"onUpdate:modelValue":o[5]||(o[5]=r=>a(e).password_confirmation=r),name:s.$t("Confirm password"),error:a(e).errors.password_confirmation,type:"password",class:d("col-span-3")},null,8,["modelValue","name","error"])]),a(e).errors.recaptcha_response?(i(),l("div",K,m(a(e).errors.recaptcha_response),1)):h("",!0),t("div",Q,[_.value?(i(),l("button",I,W)):(i(),l("button",G,m(s.$t("Create account")),1))])],32),((f=n.companyConfig)==null?void 0:f.allow_facebook_login)==="1"||((g=n.companyConfig)==null?void 0:g.allow_google_login)==="1"?(i(),l("div",X,[t("span",Y,m(s.$t("Or continue with")),1)])):h("",!0),t("div",ee,[((y=n.companyConfig)==null?void 0:y.allow_facebook_login)==="1"?(i(),l("a",ae,oe)):h("",!0),((w=n.companyConfig)==null?void 0:w.allow_google_login)==="1"?(i(),l("a",se,ne)):h("",!0)])])])])}}};export{me as default};