PageSourceSearch

https://www.pizzahut.com.sv/assets/CertificateActivePage-DouNxCsM.js

js pizzahut.com.sv collected 2026-10-03 00:12:46 UTC 3,895 bytes, 1 lines download raw bytes

1import{j as e,B as l,v as B,a8 as E,T as H,a5 as F,G as g,aw as v,ax as I,ay as C,Y as G,K as O,av as R,y as $,r as x,U as q,V as L,H as M,az as N}from"./index-Dt5EksZL.js";import{u as V}from"./CertificatesService-MUXwLaax.js";import{H as z}from"./H4Sharp-CUdJIAqn.js";import{L as b}from"./LabelMontserrat-BnlpekFK.js";import{u as U,o as W,c as _,a as J,b as y}from"./yup.module-1hC9FDRL.js";import{S as K}from"./StyledForm-BJj0laLE.js";import{A as Y}from"./AlphaNumericInput-CouGrEoZ.js";import{s as j}from"./CheckoutCertificateButtonStyle-c_TbEAaJ.js";function Q({sender:i,amount:s,dedication:n,currencySymbol:o=""}){const r={divider:{display:"flex",margin:"16px auto",height:"2px",width:"50%",backgroundColor:t=>t.palette.BlackPH10.main},dedication:{color:t=>t.palette.BlackPH40.main}};return e.jsxs(l,{display:"flex",flexDirection:"column",alignItems:"center",children:[e.jsx(B,{children:i}),e.jsx(b,{children:"te ha enviado una Gift Card de regalo por"}),e.jsx(z,{children:`${o} ${s==null?void 0:s.toFixed(2)}`}),n&&e.jsxs(e.Fragment,{children:[e.jsx(l,{sx:r.divider}),e.jsx(b,{children:"Dedicatoria"}),e.jsx(b,{sx:r.dedication,children:`"${n}"`})]})]})}function X({onClick:i,sx:s}){return e.jsx(l,{sx:{...j.container,...s},children:e.jsxs(E,{variant:"contained",type:"submit",shape:"active",sx:j.button,onClick:i,children:[e.jsx(l,{x:j.info,children:e.jsx(H,{sx:j.label,children:"Activar Gift Card"})}),e.jsx(F,{})]})})}function Z({onSubmitForm:i,onErrorForm:s}){const{control:n,register:o,handleSubmit:r,formState:{errors:t}}=U({resolver:W(_(()=>J().shape({certcode:y().trim().required(C.cert.codeRequired).nullable(),usermail:y().trim().lowercase().required(C.cert.mailRequired).email(C.email).nullable()})))}),m=(a,f)=>{var h;return{name:a,error:!!(t!=null&&t[a]),helperText:(h=t==null?void 0:t[a])==null?void 0:h.message,inputProps:o(a)}};function c(a){typeof i=="function"&&i(a)}function p(a){typeof s=="function"&&s(a)}return e.jsx(l,{sx:{width:{xs:"100%",sm:"100%",md:"60%"},padding:"0 16px"},children:e.jsxs(K,{id:"form-add-card",sx:{marginTop:{xs:"16px",md:"24px"}},onSubmit:r(c,p),children:[e.jsxs(g,{container:!0,spacing:3,children:[e.jsxs(g,{item:!0,xs:12,children:[e.jsx(v,{htmlFor:"usermail",children:"Correo Electrónico"}),e.jsx(I,{variant:"outlined",control:n,autoComplete:"on",...m("usermail"),fullWidth:!0})]}),e.jsxs(g,{item:!0,xs:12,children:[e.jsx(v,{htmlFor:"certcode",children:"Código"}),e.jsx(Y,{variant:"outlined",control:n,uppercase:!0,punctuation:!1,...m("certcode"),fullWidth:!0})]})]}),e.jsx(X,{sx:{marginTop:"8px"}})]})})}function ce(){const i=V(),s=G(),{moneda:n}=O(),{code:o}=R(),r=$(),[t,m]=x.useState(),[c,p]=x.useState(),[a,f]=x.useState(!1),[h,S]=x.useState(!1);x.useEffect(()=>{s.setPageTitle("Activar Gift Card"),A()},[]);const A=async()=>{o||r("/");const d=await i.getCertificado({idcer:o});d?m(d):r("/")},T=async d=>{const{certcode:D,usermail:P}=d,u=await i.activarCertificado({idcer:o,correo:P,codigoCertificado:D});if(u){switch(u==null?void 0:u.status){case"00":f(!0);break;case"01":f(!0);break;case"03":f(!1);break}S(!0)}p(u)},w=d=>{switch(c==null?void 0:c.status){case"00":r("/");break;case"01":break;case"03":d===1&&(s.rememberThisPage(),r("/signup-account"));break}p(null)},k={styleContainer:{display:"flex",flexDirection:{xs:"column",md:"row"},justifyContent:"center",width:"100%"}};return e.jsxs(q,{children:[e.jsx(L,{page:"activate_certificate"}),e.jsx(M,{sx:{fontSize:"50px",pl:{xs:2,md:0},pb:{xs:2,md:1}},children:"Activar Gift Card"}),e.jsxs(l,{sx:k.styleContainer,children:[e.jsx(l,{sx:{padding:{xs:"32px 0",md:"32px"},width:{xs:"100%",md:"60%"}},children:t&&e.jsx(Q,{sender:t==null?void 0:t.REMITENTE,amount:t==null?void 0:t.MONTO,dedication:t==null?void 0:t.DEDICATORIA,currencySymbol:n})}),t&&e.jsx(Z,{onSubmitForm:T})]}),c&&e.jsx(N,{title:"Certificado",open:h,justClose:a,onAction:w,children:c.message})]})}export{ce 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.