PageSourceSearch

https://photodecor.it/_nuxt/CW4LYT5b.js

js photodecor.it collected 2026-10-03 18:50:31 UTC 7,552 bytes, 1 lines download raw bytes

1import{G as e,Ot as t,bt as s,ct as a,d as o,en as r,f as l,lt as n,m as i,p as d,u as p,v as c,vt as u,x,y as m}from"./3xMQmu_c.js";import{p as w,s as h}from"./BHyipOjY.js";import{n as g}from"./BiN1gED_.js";import{t as f}from"./Bcc4Oyfk.js";import{t as v}from"./BLJLhco7.js";import{t as y}from"./Cxp2e1r52.js";import{t as b}from"./BHMIgQv22.js";import{t as k}from"./aUe4A13j2.js";import{t as C}from"./BBeWiq922.js";import{t as j}from"./COgTQs-J.js";var z={class:"relative flex min-h-screen flex-col bg-gray-50 px-4 pt-8 sm:px-6 sm:pt-16 lg:px-8"},V={class:"sm:mx-auto sm:w-full sm:max-w-115"},N={key:0,class:"rounded-2xl bg-white px-6 py-7 shadow-xl sm:px-8 sm:py-9"},P={class:"mt-6 rounded-xl border border-green-200 bg-green-50 p-4 text-center"},A={key:1,class:"rounded-2xl bg-white px-6 py-7 shadow-xl sm:px-8 sm:py-9"},B={class:"space-y-3"},I={class:"group relative"},L=["type","aria-invalid"],M=["aria-label"],R={key:0,class:"mt-1.5 pl-1 text-xs text-red-600"},U={key:1,class:"mt-1.5 pl-1 text-xs text-gray-400"},_={class:"group relative"},q=["type","aria-invalid"],H=["aria-label"],O={key:0,class:"mt-1.5 pl-1 text-xs text-red-600"},G={key:0,class:"mt-4 flex items-center gap-2 rounded-xl bg-red-50 px-3.5 py-2.5 text-sm text-red-700"},S=["disabled"],X={key:0,class:"-ml-1 mr-2 h-4 w-4 animate-spin text-white",fill:"none",viewBox:"0 0 24 24"},Y=x({__name:"reset-password",setup(x){g({title:"Reset Password | Photodecor.it",meta:[{name:"robots",content:"noindex"}]});const Y=v(),D=u({password:"",passwordConfirm:""}),E=s(!1),F=s(!1),J=s(!1),K=s(!1),Q=s(!1),T=s(!1),W=u({password:!1,passwordConfirm:!1}),Z=p(()=>{const e=D.password;return e?(W.password||T.value)&&e.length<8?"La password deve avere almeno 8 caratteri":"":T.value?"Inserisci una password":""}),$=p(()=>{const e=D.passwordConfirm;return e?(W.passwordConfirm||T.value)&&e!==D.password?"Le password non corrispondono":"":T.value?"Conferma la password":""}),ee=p(()=>!!Z.value||!!$.value),te=async()=>{if(T.value=!0,!ee.value){E.value=!0,F.value=!1;try{const{data:e,error:t}=await Y.auth.updateUser({password:D.password});e.user?J.value=!0:t&&(F.value=!0)}catch(e){F.value=!0}finally{E.value=!1}}};return(s,p)=>{const u=f;return e(),i("div",z,[o("div",V,[t(J)?(e(),i("div",N,[p[9]||(p[9]=o("h2",{class:"text-center text-2xl font-bold tracking-tight text-gray-900"}," Password aggiornata ",-1)),o("div",P,[m(t(y),{class:"mx-auto h-9 w-9 text-green-600"}),p[6]||(p[6]=o("p",{class:"mt-2 text-sm font-semibold text-green-900"}," Nuova password impostata con successo ",-1)),p[7]||(p[7]=o("p",{class:"mt-1 text-sm text-green-700"}," Ora puoi accedere al tuo account con le nuove credenziali. ",-1))]),m(u,{to:"/"},{default:a(()=>[...p[8]||(p[8]=[o("button",{type:"button",class:"mt-5 flex w-full items-center justify-center rounded-xl bg-indigo-600 px-4 py-3.5 text-sm font-semibold text-white shadow-md shadow-indigo-600/20 transition-all hover:-translate-y-px hover:bg-indigo-700 hover:shadow-lg hover:shadow-indigo-600/30"}," Vai alla Home Page ",-1)])]),_:1})])):(e(),i("div",A,[p[14]||(p[14]=o("h2",{class:"text-center text-2xl font-bold tracking-tight text-gray-900"}," Crea una nuova password ",-1)),p[15]||(p[15]=o("p",{class:"mt-1.5 text-center text-sm text-gray-500"}," Inserisci la nuova password da usare per l'accesso ",-1)),o("form",{class:"mt-6",novalidate:"",onSubmit:w(te,["prevent"])},[o("div",B,[o("div",null,[o("div",I,[m(t(j),{class:"pointer-events-none absolute left-4 top-1/2 z-10 h-5 w-5 -translate-y-1/2 text-gray-400 transition-colors group-focus-within:text-indigo-600"}),n(o("input",{id:"reset-password","onUpdate:modelValue":p[0]||(p[0]=e=>t(D).password=e),type:t(K)?"text":"password",required:"",autocomplete:"new-password",minlength:"8",placeholder:" ","aria-invalid":!!t(Z),class:"peer h-14 w-full rounded-xl border-2 border-gray-200 bg-white pl-12 pr-12 pt-5 pb-1 text-[16px] text-gray-900 outline-none transition-colors placeholder:text-transparent focus:border-indigo-500 aria-invalid:border-red-500 aria-invalid:focus:border-red-500",onBlur:p[1]||(p[1]=e=>t(W).password=!0)},null,40,L),[[h,t(D).password]]),p[10]||(p[10]=o("label",{for:"reset-password",class:"pointer-events-none absolute left-12 top-2 text-xs font-medium text-gray-500 transition-all peer-placeholder-shown:top-1/2 peer-placeholder-shown:-translate-y-1/2 peer-placeholder-shown:text-base peer-placeholder-shown:font-normal peer-placeholder-shown:text-gray-500 peer-focus:top-2 peer-focus:translate-y-0 peer-focus:text-xs peer-focus:font-medium peer-focus:text-indigo-600"},"Nuova password",-1)),o("button",{type:"button",class:"absolute right-3 top-1/2 -translate-y-1/2 roun
1ded-lg p-1.5 text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-600","aria-label":t(K)?"Nascondi password":"Mostra password",onClick:p[2]||(p[2]=e=>K.value=!t(K))},[t(K)?(e(),l(t(k),{key:0,class:"h-5 w-5"})):(e(),l(t(C),{key:1,class:"h-5 w-5"}))],8,M)]),t(Z)?(e(),i("p",R,r(t(Z)),1)):(e(),i("p",U," Almeno 8 caratteri "))]),o("div",null,[o("div",_,[m(t(j),{class:"pointer-events-none absolute left-4 top-1/2 z-10 h-5 w-5 -translate-y-1/2 text-gray-400 transition-colors group-focus-within:text-indigo-600"}),n(o("input",{id:"reset-password-confirm","onUpdate:modelValue":p[3]||(p[3]=e=>t(D).passwordConfirm=e),type:t(Q)?"text":"password",required:"",autocomplete:"new-password",placeholder:" ","aria-invalid":!!t($),class:"peer h-14 w-full rounded-xl border-2 border-gray-200 bg-white pl-12 pr-12 pt-5 pb-1 text-[16px] text-gray-900 outline-none transition-colors placeholder:text-transparent focus:border-indigo-500 aria-invalid:border-red-500 aria-invalid:focus:border-red-500",onBlur:p[4]||(p[4]=e=>t(W).passwordConfirm=!0)},null,40,q),[[h,t(D).passwordConfirm]]),p[11]||(p[11]=o("label",{for:"reset-password-confirm",class:"pointer-events-none absolute left-12 top-2 text-xs font-medium text-gray-500 transition-all peer-placeholder-shown:top-1/2 peer-placeholder-shown:-translate-y-1/2 peer-placeholder-shown:text-base peer-placeholder-shown:font-normal peer-placeholder-shown:text-gray-500 peer-focus:top-2 peer-focus:translate-y-0 peer-focus:text-xs peer-focus:font-medium peer-focus:text-indigo-600"},"Conferma password",-1)),o("button",{type:"button",class:"absolute right-3 top-1/2 -translate-y-1/2 rounded-lg p-1.5 text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-600","aria-label":t(Q)?"Nascondi password":"Mostra password",onClick:p[5]||(p[5]=e=>Q.value=!t(Q))},[t(Q)?(e(),l(t(k),{key:0,class:"h-5 w-5"})):(e(),l(t(C),{key:1,class:"h-5 w-5"}))],8,H)]),t($)?(e(),i("p",O,r(t($)),1)):d("",!0)])]),t(F)?(e(),i("div",G,[m(t(b),{class:"h-4 w-4 shrink-0"}),p[12]||(p[12]=c(" Reset della password non riuscito. Riprova. ",-1))])):d("",!0),o("button",{type:"submit",disabled:t(E),class:"mt-5 flex w-full items-center justify-center rounded-xl bg-indigo-600 px-4 py-3.5 text-sm font-semibold text-white shadow-md shadow-indigo-600/20 transition-all hover:-translate-y-px hover:bg-indigo-700 hover:shadow-lg hover:shadow-indigo-600/30 disabled:cursor-not-allowed disabled:opacity-60 disabled:hover:translate-y-0 disabled:hover:shadow-md"},[t(E)?(e(),i("svg",X,[...p[13]||(p[13]=[o("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),o("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)])])):d("",!0),c(" "+r(t(E)?"Aggiornando...":"Imposta nuova password"),1)],8,S)],32)]))])])}}});export{Y 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.