HEX
Server: LiteSpeed
System: Linux s3604.bom1.stableserver.net 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64
User: dmstechonline (1480)
PHP: 7.4.33
Disabled: NONE
Upload Files
File: /home/dmstechonline/whatsapp.dmstech.online/public/build/assets/Reset-fa1bc6c9.js
import{r as $,T as j,q as A,R as B,c as n,a as t,j as p,g as w,u as o,t as i,h as x,k as M,b as g,n as f,o as c,i as v}from"./app-884e4ce3.js";import{_ as b}from"./FormInput-ab713954.js";import{u as N,a as T}from"./ReCaptcha-55f58cbf.js";import{u as U}from"./useRtl-295d8c04.js";const S={class:"flex h-screen justify-center"},Z={class:"flex justify-center"},F={class:"w-[20em] mt-40"},L={class:"flex justify-center mb-5"},P=["src","alt"],q={key:1,class:"text-2xl mb-2"},z={class:"text-2xl text-center"},D={class:"text-center text-sm text-slate-500"},E={key:0,class:"text-sm bg-[green] text-white mb-2 py-2 px-1 text-center rounded"},K={key:1,class:"form-error text-[#b91c1c] text-xs"},G={class:"mt-6"},H={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"},Y={__name:"Reset",props:["flash","config","companyConfig"],setup(k){const{rtlClass:C,isRtl:J}=U(),r=k,u=$(!1),a=j({password:null,password_confirmation:null,recaptcha_response:null}),l=s=>{const e=r.config.find(m=>m.key===s);return e?e.value:""},V=async()=>{if(u.value=!0,l("recaptcha_active")==="1"){const e=await R();a.recaptcha_response=e}const s=window.location.href;a.post(s,{preserveScroll:!0,onFinish:()=>{u.value=!1}})},R=()=>new Promise(s=>{grecaptcha.ready(()=>{grecaptcha.execute(l("recaptcha_site_key"),{action:"submit"}).then(e=>{s(e)})})});return A(()=>{l("recaptcha_active")==="1"&&N(l("recaptcha_site_key"))}),B(()=>{T(l("recaptcha_site_key"))}),(s,e)=>{var m,h,_,y;return c(),n("div",{class:f(o(C))},[t("div",S,[t("div",Z,[t("div",F,[t("div",L,[p(o(v),{href:"/"},{default:w(()=>[r.companyConfig.logo?(c(),n("img",{key:0,class:"max-w-[180px]",src:"/media/"+r.companyConfig.logo,alt:r.companyConfig.company_name},null,8,P)):(c(),n("h4",q,i(r.companyConfig.company_name),1))]),_:1})]),t("h1",z,i(s.$t("Reset your password")),1),t("div",D,[x(i(s.$t("Remembered password?"))+" ",1),p(o(v),{href:"login",class:"text-sm text-primary-600 hover:underline dark:text-primary-500 border-b hover:border-none"},{default:w(()=>[x(i(s.$t("Login")),1)]),_:1})]),t("form",{onSubmit:e[2]||(e[2]=M(d=>V(),["prevent"])),class:"mt-5"},[(h=(m=r.flash)==null?void 0:m.status)!=null&&h.message?(c(),n("div",E,[t("span",null,i((y=(_=r.flash)==null?void 0:_.status)==null?void 0:y.message),1)])):g("",!0),p(b,{modelValue:o(a).password,"onUpdate:modelValue":e[0]||(e[0]=d=>o(a).password=d),name:s.$t("Password"),error:o(a).errors.password,type:"password",class:f("sm:col-span-6")},null,8,["modelValue","name","error"]),p(b,{modelValue:o(a).password_confirmation,"onUpdate:modelValue":e[1]||(e[1]=d=>o(a).password_confirmation=d),name:s.$t("Confirm password"),error:o(a).errors.password_confirmation,type:"password",class:f("sm:col-span-6 mt-5")},null,8,["modelValue","name","error"]),o(a).errors.recaptcha_response?(c(),n("div",K,i(o(a).errors.recaptcha_response),1)):g("",!0),t("div",G,[u.value?(c(),n("button",I,e[3]||(e[3]=[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)]))):(c(),n("button",H,i(s.$t("Reset password")),1))])],32)])])])],2)}}};export{Y as default};