1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3932],{76210:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/trend-parceiros/convites",function(){return t(29777)}])},29777:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return Q}});var i=t(85893),r=t(67294),o=t(9008),s=t.n(o),a=t(68029),l=t(40846),c=t(96254),d=t(51615),p=t(65820),x=t(11163),m=t(87536),u=t(56312),f=t(63448),g=t(58306);let h=f.Ry({code:f.Z_().min(1,"Informe o c\xf3digo"),document:f.Z_().min(14,"CPF inv\xe1lido").refine(e=>(0,g.Sp)(e),{message:"CPF inv\xe1lido"}),documentPartner:f.Z_().min(18,"CNPJ inv\xe1lido").refine(e=>(0,g.le)(e),{message:"CNPJ inv\xe1lido"}),name:f.Z_().min(2,"Informe seu nome"),email:f.Z_().email("E-mail inv\xe1lido"),whatsApp:f.Z_().min(15,"WhatsApp inv\xe1lido")});var y=t(98875),j=t(73636),b=t(31748),v=t(12553),w=t(89583);let S=["document","event"];function P(e){let{currentStep:n}=e,t="success"===n||"generating"===n?3:S.indexOf(n);return(0,i.jsx)(j.U,{spacing:0,w:"100%",justify:"center",mb:4,children:S.map((e,n)=>{let o=n<t,s=n===t;return(0,i.jsxs)(r.Fragment,{children:[n>0&&(0,i.jsx)(a.x,{h:"2px",flex:1,maxW:"3rem",bg:o?"primary":"gray.200",transition:"background 0.3s"}),(0,i.jsx)(d.E.div,{animate:{scale:s?1.2:1},transition:{type:"spring",stiffness:300},children:(0,i.jsx)(b.C,{size:"28px",bg:o||s?"primary":"gray.200",color:"white",fontSize:"xs",fontWeight:"bold",transition:"background 0.3s",children:o?(0,i.jsx)(v.J,{as:w.l_A,boxSize:2.5}):n+1})})]},e)})})}var C=t(8186),F=t(50232),_=t(30980),z=t(48899),k=t(90092),A=t(32803),E=t(32179);function N(e){let{control:n,errors:t,onValidate:r,isValidating:o,onCpfBlur:s,isLookingUpCustomer:l,customerExists:c}=e,x=(0,m.qo)({control:n,name:"document"}),u=(0,m.qo)({control:n,name:"documentPartner"}),f=(null==x?void 0:x.replace(/\D/g,"").length)>=11,h=((null==u?void 0:u.replace(/\D/g,""))||"").length>=14,y=f&&(0,g.Sp)(x),b=h&&(0,g.le)(u||""),S=f&&!y,P=h&&!b;return(0,i.jsxs)(C.g,{spacing:4,align:"center",w:"100%",h:"100%",justify:"space-between",flex:1,children:[(0,i.jsxs)(C.g,{spacing:0,align:"center",w:"100%",children:[(0,i.jsx)(F.X,{fontFamily:"'Bebas Neue', sans-serif",fontSize:{base:"5xl",lg:"6xl"},fontWeight:"bold",lineHeight:1,textAlign:"center",children:"Seus documentos:"}),(0,i.jsxs)(C.g,{spacing:3,w:"100%",mt:2,children:[(0,i.jsxs)(a.x,{w:"100%",children:[(0,i.jsx)(_.l,{fontFamily:"'Poppins', sans-serif",fontSize:"sm",fontWeight:"600",mb:1,children:"CPF"}),(0,i.jsx)(A.B,{control:n,name:"document",mask:"999.999.999-99",error:t.document,bg:"#f9edd9",border:"none",rounded:"xl",h:"3.5rem",fontSize:"lg",fontFamily:"'Poppins', sans-serif",_focus:{border:"none",boxShadow:"none"},_hover:{borderColor:"transparent"},placeholder:"000.000.000-00",onBlur:s,isDisabled:!0===c})]}),(0,i.jsxs)(a.x,{w:"100%",children:[(0,i.jsx)(_.l,{fontFamily:"'Poppins', sans-serif",fontSize:"sm",fontWeight:"600",mb:1,children:"CNPJ da Empresa"}),(0,i.jsx)(A.B,{control:n,name:"documentPartner",mask:"99.999.999/9999-99",error:t.documentPartner,bg:"#f9edd9",border:"none",rounded:"xl",h:"3.5rem",fontSize:"lg",fontFamily:"'Poppins', sans-serif",_focus:{border:"none",boxShadow:"none"},_hover:{borderColor:"transparent"},placeholder:"00.000.000/0000-00"})]}),(0,i.jsxs)(a.x,{w:"100%",position:"relative",children:[(0,i.jsxs)(j.U,{justify:"space-between",mb:1,children:[(0,i.jsx)(_.l,{fontFamily:"'Poppins', sans-serif",fontSize:"sm",fontWeight:"600",mb:0,children:"Nome"}),l&&(0,i.jsx)(z.$,{size:"xs",color:"primary"})]}),(0,i.jsx)(A.B,{control:n,name:"name",error:t.name,bg:"#f9edd9",border:"none",rounded:"xl",h:"3.5rem",fontSize:"lg",fontFamily:"'Poppins', sans-serif",_focus:{border:"none",boxShadow:"none"},_hover:{borderColor:"transparent"},placeholder:"Seu nome completo",isDisabled:l||!0===c})]}),(0,i.jsxs)(a.x,{w:"100%",children:[(0,i.jsx)(_.l,{fontFamily:"'Poppins', sans-serif",fontSize:"sm",fontWeight:"600",mb:1,children:"Celular"}),(0,i.jsx)(A.B,{control:n,name:"whatsApp",mask:"(99) 99999-9999",error:t.whatsApp,bg:"#f9edd9",border:"none",rounded:"xl",h:"3.5rem",fontSize:"lg",fontFamily:"'Poppins', sans-serif",_focus:{border:"none",boxShadow:"none"},_hover:{borderColor:"transparent"},placeholder:"(00) 00000-0000",isDisabled:l})]}),(0,i.jsxs)(a.x,{w:"100%",children:[(0,i.jsx)(_.l,{fontFamily:"'Poppins', sans-serif",fontSize:"sm",fontWeight:"600",mb:1,children:"E-mail"}),(0,i.jsx)(A.B,{control:n,name:"email",error:t.email,bg:"#f9edd9",border:"none",rounded:"xl",h:"3.5rem",fontSize:"lg",fontFamily:"'Poppins', sans-serif",_focus:{border:"none",boxShadow:"none"},_hover:{borderColor:"transparent"},placeholder:"[email protected]",isDisabled:l||!0===c})]})]}),(0,i.jsx)(p.M,{children:(S||P)&&(0,i.jsx)(d.E.div,{initial:{opacity:0,y:-8}
1,animate:{opacity:1,y:0},exit:{opacity:0,y:-8},transition:{duration:.2},style:{width:"100%"},children:(0,i.jsxs)(j.U,{spacing:3,bg:"red.50",border:"1px solid",borderColor:"red.200",rounded:"xl",px:4,py:3,mt:3,w:"100%",align:"flex-start",children:[(0,i.jsx)(v.J,{as:w.gJy,color:"red.500",mt:1}),(0,i.jsx)(k.x,{fontFamily:"'Poppins', sans-serif",fontSize:"sm",color:"red.600",lineHeight:"tall",children:S&&P?"CPF e CNPJ informados s\xe3o inv\xe1lidos. Confira os dados e tente novamente.":S?"O CPF informado \xe9 inv\xe1lido. Confira os n\xfameros e tente novamente.":"O CNPJ informado \xe9 inv\xe1lido. Confira os n\xfameros e tente novamente."})]})})})]}),(0,i.jsx)(a.x,{w:"100%",minH:"48px",children:(0,i.jsx)(E.Y,{w:"100%",rounded:"2xl",size:"lg",fontSize:"lg",isLoading:o||l,loadingText:l?"Buscando dados...":"Verificando...",isDisabled:!(y&&b),onClick:r,children:"Continuar"})})]})}var D=t(54270),W=t(74032);function O(e){let{label:n,value:t}=e;return(0,i.jsx)(d.E.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},transition:{type:"spring",stiffness:300,duration:.3},children:(0,i.jsxs)(j.U,{bg:"green.50",rounded:"full",px:3,py:1,spacing:2,children:[(0,i.jsx)(v.J,{as:w.FJM,color:"green.500",boxSize:3}),(0,i.jsxs)(k.x,{fontSize:"xs",color:"green.700",fontWeight:"semibold",children:[n,": ",t]})]})})}let J=[{_id:"sold-out-01",title:"Apresenta\xe7\xe3o Trend SuperApp para Lojistas",date:"Ter\xe7a-feira, 13/05",time:"19h00",location:"Swiss Park Office â Campinas-SP",address:"Av. Antonio Artioli, 570, Ed. Zug, Sala de Conven\xe7\xf5es 01 e 02"},{_id:"sold-out-02",title:"Apresenta\xe7\xe3o Trend SuperApp para Lojistas",date:"Quarta-feira, 14/05",time:"19h00",location:"Swiss Park Office â Campinas-SP",address:"Av. Antonio Artioli, 570, Ed. Zug, Sala de Conven\xe7\xf5es 01 e 02"}];function I(e){let{events:n,selectedEventId:t,onSelect:r,onContinue:o,completedDocument:s,isLoading:l=!1}=e;return(0,i.jsxs)(C.g,{spacing:4,align:"center",w:"100%",h:"100%",justify:"space-between",flex:1,children:[(0,i.jsxs)(C.g,{spacing:3,align:"center",w:"100%",children:[(0,i.jsx)(j.U,{justify:"center",flexWrap:"wrap",children:(0,i.jsx)(O,{label:"Documento",value:s})}),(0,i.jsx)(F.X,{fontFamily:"'Bebas Neue', sans-serif",fontSize:{base:"4xl",lg:"5xl"},fontWeight:"bold",lineHeight:1,textAlign:"center",children:1===n.length?"Pr\xf3ximo Evento:":"Selecione o Evento:"}),(0,i.jsx)(k.x,{fontFamily:"'Poppins', sans-serif",fontSize:"sm",color:"gray.500",textAlign:"center",children:1===n.length?"Confirme sua presen\xe7a no evento abaixo":"Escolha uma das datas dispon\xedveis"}),(0,i.jsxs)(C.g,{spacing:3,w:"100%",mt:1,children:[l?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(D.O,{w:"100%",h:"90px",rounded:"2xl",startColor:"orange.100",endColor:"orange.200"}),(0,i.jsx)(D.O,{w:"100%",h:"90px",rounded:"2xl",startColor:"orange.100",endColor:"orange.200"})]}):n.map(e=>{let n=t===e._id;return(0,i.jsx)(d.E.div,{whileTap:{scale:.98},style:{width:"100%"},children:(0,i.jsxs)(a.x,{as:"button",type:"button",w:"100%",textAlign:"left",bg:n?"orange.50":"#f9edd9",border:"2px solid",borderColor:n?"primary":"transparent",rounded:"2xl",p:4,onClick:()=>r(e._id),transition:"all 0.2s",_hover:{borderColor:"primary",bg:"orange.50"},position:"relative",children:[n&&(0,i.jsx)(b.C,{size:"22px",bg:"primary",color:"white",position:"absolute",top:3,right:3,children:(0,i.jsx)(v.J,{as:w.FJM,boxSize:3.5})}),(0,i.jsxs)(C.g,{align:"flex-start",spacing:2,children:[(0,i.jsx)(k.x,{fontFamily:"'Bebas Neue', sans-serif",fontSize:"xl",lineHeight:1,color:"gray.800",pr:6,children:e.title}),(0,i.jsxs)(j.U,{spacing:2,flexWrap:"wrap",children:[(0,i.jsxs)(j.U,{spacing:1,children:[(0,i.jsx)(v.J,{as:w.IiJ,color:"primary",boxSize:3}),(0,i.jsx)(k.x,{fontFamily:"'Poppins', sans-serif",fontSize:"sm",fontWeight:"600",color:"gray.700",children:e.date})]}),(0,i.jsxs)(j.U,{spacing:1,children:[(0,i.jsx)(v.J,{as:w.qyc,color:"primary",boxSize:3}),(0,i.jsx)(k.x,{fontFamily:"'Poppins', sans-serif",fontSize:"sm",fontWeight:"600",color:"gray.700",children:e.time})]})]}),e.location&&(0,i.jsxs)(j.U,{spacing:1,align:"flex-start",children:[(0,i.jsx)(v.J,{as:w.Nh4,color:"primary",boxSize:3,mt:"2px",flexShrink:0}),(0,i.jsxs)(C.g,{align:"flex-start",spacing:0,children:[(0,i.jsx)(k.x,{fontFamily:"'Poppins', sans-serif",fontSize:"sm",fontWeight:"600",color:"gray.700",lineHeight:1.3,children:e.location}),e.address&&(0,i.jsx)(k.x,{fontFamily:"'Poppins', sans-serif",fontSize:"xs",color:"gray.500",lineHeight:1.3,children:e.address})]})]})]})]})},e._id)}),!l&&J.map(e=>(0,i.jsxs)(a.x,{w:"100%",textAlign:"left",bg:"gray.100",border:"2px s
1olid",borderColor:"gray.200",rounded:"2xl",p:4,position:"relative",opacity:.65,cursor:"not-allowed",children:[(0,i.jsx)(W.C,{position:"absolute",top:3,right:3,colorScheme:"red",variant:"solid",borderRadius:"md",fontSize:"10px",px:2,py:.5,children:"Esgotado"}),(0,i.jsxs)(C.g,{align:"flex-start",spacing:2,children:[(0,i.jsx)(k.x,{fontFamily:"'Bebas Neue', sans-serif",fontSize:"xl",lineHeight:1,color:"gray.500",pr:16,children:e.title}),(0,i.jsxs)(j.U,{spacing:2,flexWrap:"wrap",children:[(0,i.jsxs)(j.U,{spacing:1,children:[(0,i.jsx)(v.J,{as:w.IiJ,color:"gray.400",boxSize:3}),(0,i.jsx)(k.x,{fontFamily:"'Poppins', sans-serif",fontSize:"sm",fontWeight:"600",color:"gray.500",children:e.date})]}),(0,i.jsxs)(j.U,{spacing:1,children:[(0,i.jsx)(v.J,{as:w.qyc,color:"gray.400",boxSize:3}),(0,i.jsx)(k.x,{fontFamily:"'Poppins', sans-serif",fontSize:"sm",fontWeight:"600",color:"gray.500",children:e.time})]})]}),(0,i.jsxs)(j.U,{spacing:1,align:"flex-start",children:[(0,i.jsx)(v.J,{as:w.Nh4,color:"gray.400",boxSize:3,mt:"2px",flexShrink:0}),(0,i.jsxs)(C.g,{align:"flex-start",spacing:0,children:[(0,i.jsx)(k.x,{fontFamily:"'Poppins', sans-serif",fontSize:"sm",fontWeight:"600",color:"gray.500",lineHeight:1.3,children:e.location}),(0,i.jsx)(k.x,{fontFamily:"'Poppins', sans-serif",fontSize:"xs",color:"gray.400",lineHeight:1.3,children:e.address})]})]})]})]},e._id))]})]}),(0,i.jsx)(a.x,{w:"100%",children:(0,i.jsx)(E.Y,{w:"100%",rounded:"2xl",size:"lg",fontSize:"lg",isDisabled:!t,onClick:o,children:"Continuar"})})]})}var B=t(64831),T=t(38491),U=t(57879);function H(e){let{onReset:n,pdfUrl:t,eventTitle:r,eventDate:o,ticketCode:s}=e;return(0,i.jsxs)(C.g,{spacing:5,align:"center",w:"100%",py:4,children:[(0,i.jsx)(d.E.div,{initial:{scale:0,rotate:-45},animate:{scale:1,rotate:0},transition:{type:"spring",stiffness:200,damping:15,delay:.1},children:(0,i.jsx)(b.C,{size:"64px",bg:"green.400",children:(0,i.jsx)(v.J,{as:w.l_A,color:"white",boxSize:6})})}),(0,i.jsx)(d.E.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4,delay:.3},children:(0,i.jsx)(F.X,{fontFamily:"'Bebas Neue', sans-serif",fontSize:{base:"4xl",lg:"5xl"},color:"primary",lineHeight:1,textAlign:"center",children:"Ingresso gerado!"})}),(0,i.jsx)(d.E.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4,delay:.45},style:{width:"100%"},children:(0,i.jsx)(a.x,{bg:"#f9edd9",rounded:"2xl",px:6,py:5,w:"100%",children:(0,i.jsxs)(C.g,{spacing:2,align:"center",children:[r&&(0,i.jsx)(k.x,{fontFamily:"'Poppins', sans-serif",fontSize:{base:"sm",lg:"md"},fontWeight:"bold",textAlign:"center",color:"gray.800",children:r}),o&&(0,i.jsx)(k.x,{fontFamily:"'Poppins', sans-serif",fontSize:{base:"xs",lg:"sm"},textAlign:"center",color:"gray.600",children:o}),s&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(B.i,{borderColor:"orange.200"}),(0,i.jsx)(k.x,{fontFamily:"'Poppins', sans-serif",fontSize:"xs",color:"gray.500",letterSpacing:"widest",fontWeight:"semibold",children:s})]})]})})}),(0,i.jsx)(d.E.div,{initial:{opacity:0,y:15},animate:{opacity:1,y:0},transition:{duration:.4,delay:.6},style:{width:"100%"},children:(0,i.jsxs)(C.g,{spacing:3,w:"100%",children:[t&&(0,i.jsx)(T.z,{as:U.r,href:t,isExternal:!0,w:"100%",bg:"primary",color:"white",_hover:{bg:"red.700",textDecoration:"none"},leftIcon:(0,i.jsx)(v.J,{as:w.aBF}),fontFamily:"'Poppins', sans-serif",fontWeight:"semibold",fontSize:"md",size:"lg",rounded:"2xl",children:"Baixar ingresso em PDF"}),(0,i.jsx)(a.x,{w:"100%",bg:"green.50",borderWidth:1,borderColor:"green.200",rounded:"xl",px:4,py:3,children:(0,i.jsxs)(C.g,{spacing:1,align:"center",children:[(0,i.jsx)(v.J,{as:w.xpo,color:"green.500",boxSize:5}),(0,i.jsx)(k.x,{fontFamily:"'Poppins', sans-serif",fontSize:"xs",textAlign:"center",color:"green.700",children:"Voc\xea tamb\xe9m receber\xe1 o PDF no seu WhatsApp."})]})}),(0,i.jsx)(T.z,{variant:"ghost",size:"sm",onClick:n,fontFamily:"'Poppins', sans-serif",color:"gray.500",_hover:{color:"gray.700"},children:"Fazer novo cadastro"})]})})]})}let L=["Gerando seu ingresso...","Reservando seu lugar...","Preparando o PDF...","Quase l\xe1, finalizando tudo..."];function R(){let[e,n]=(0,r.useState)(0);return(0,r.useEffect)(()=>{let e=setInterval(()=>{n(e=>(e+1)%L.length)},1200);return()=>clearInterval(e)},[]),(0,i.jsxs)(C.g,{spacing:6,align:"center",w:"100%",py:6,position:"relative",overflow:"hidden",children:[(0,i.jsxs)(a.x,{position:"relative",w:"160px",h:"160px",children:[[0,1,2].map(e=>(0,i.jsx)(d.E.div,{initial:{scale:.6,opacity:.6},animate:{scale:[.6,1.4],opacity:[.6,0]},transition:{duration:1.8,repeat:1/0,ease:"easeOut",delay:.6*e},style:{position:"absolute",inset:0,border:"3px solid #8A0F01",borderRadius:"50%"}},"ring-".concat(e))),(0,i.jsx)(d.E.div,{animate:{rotate:[0,-8,8,-8,8,0],scale:[1,1.06,1]},transition:{duration:2,repeat:1/0,ease:"easeInOut"},style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center"},children:(0,i.jsx)(a.x,{w:"96px",h:"96px",rounded:"full",bg:"primary",display:"flex",alignItems:"center",justifyContent:"center",boxShadow:"0 12px 32px rgba(138, 15, 1, 0.35)",children:(0,i.jsx)(a.x,{as:w.QHb,color:"white",fontSize:"44px"})})}),[...Array(8)].map((e,n)=>{let t=n/8*Math.PI*2;return(0,i.jsx)(d.E.div,{initial:{opacity:0,scale:0}
1,animate:{opacity:[0,1,0],scale:[0,1,.4],x:78*Math.cos(t),y:78*Math.sin(t)},transition:{duration:1.4,repeat:1/0,delay:.15*n,ease:"easeOut"},style:{position:"absolute",top:"50%",left:"50%",width:8,height:8,marginLeft:-4,marginTop:-4,borderRadius:"50%",background:n%3==0?"#F6AD55":n%3==1?"#48BB78":"#8A0F01"}},"spark-".concat(n))})]}),(0,i.jsx)(F.X,{fontFamily:"'Bebas Neue', sans-serif",fontSize:{base:"3xl",lg:"4xl"},color:"primary",lineHeight:1,textAlign:"center",letterSpacing:"wide",children:"Gerando ingresso"}),(0,i.jsx)(a.x,{minH:"24px",w:"100%",textAlign:"center",children:(0,i.jsx)(p.M,{mode:"wait",children:(0,i.jsx)(d.E.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},exit:{opacity:0,y:-8},transition:{duration:.35},children:(0,i.jsx)(k.x,{fontFamily:"'Poppins', sans-serif",fontSize:{base:"sm",lg:"md"},fontWeight:"medium",color:"gray.600",children:L[e]})},e)})}),(0,i.jsx)(a.x,{w:"80%",h:"6px",bg:"gray.100",rounded:"full",overflow:"hidden",children:(0,i.jsx)(d.E.div,{initial:{x:"-100%"},animate:{x:"200%"},transition:{duration:1.6,repeat:1/0,ease:"easeInOut"},style:{width:"50%",height:"100%",background:"linear-gradient(90deg, transparent, #8A0F01, transparent)"}})})]})}let Z={initial:{opacity:0,x:30},animate:{opacity:1,x:0},exit:{opacity:0,x:-30},transition:{duration:.3,ease:"easeInOut"}};function q(){let{control:e,errors:n,currentStep:t,completedData:o,isValidatingDocument:s,isLookingUpCustomer:l,isLoadingEvents:f,orderResult:j,customerExists:b,events:v,selectedEventId:w,handleCpfBlur:S,handleSelectEvent:C,handleConfirmEvent:F,handleValidateDocument:_,handleReset:z}=function(){let e=(0,x.useRouter)(),n=e.query.productID||void 0,[t,i]=(0,r.useState)("document"),[o,s]=(0,r.useState)({}),[a,l]=(0,r.useState)(!1),[c,d]=(0,r.useState)(!1),[p,f]=(0,r.useState)(!1),[j,b]=(0,r.useState)(null),[v,w]=(0,r.useState)([]),[S,P]=(0,r.useState)(null),[C,F]=(0,r.useState)({pdfUrl:null,eventTitle:null,eventDate:null,ticketCode:null}),{control:_,trigger:z,getValues:k,setValue:A,reset:E,formState:{errors:N}}=(0,m.cI)({resolver:(0,u.F)(h),defaultValues:{code:"",document:"",documentPartner:"",name:"",email:"",whatsApp:""}}),D=async()=>{let e=k("document");if((0,g.Sp)(e)){d(!0);try{let{data:n,status:t}=await y.b.get("/trend-parceiros/check-customer",{params:{document:e.replace(/\D/g,"")},validateStatus:e=>e<400||404===e});if(404!==t&&(null==n?void 0:n._id)){if(b(!0),n.name&&A("name",n.name),n.email&&A("email",n.email),n.mobilePhone){let i=n.mobilePhone.replace(/\D/g,""),r=11===i.length?"(".concat(i.slice(0,2),") ").concat(i.slice(2,7),"-").concat(i.slice(7)):10===i.length?"(".concat(i.slice(0,2),") ").concat(i.slice(2,6),"-").concat(i.slice(6)):n.mobilePhone;A("whatsApp",r)}}else b(!1),A("name",""),A("email",""),A("whatsApp","")}catch(o){b(null)}finally{d(!1)}}},W=async()=>{let e=await z(["document","documentPartner"]);if(e){f(!0);try{let{data:n}=await y.b.get("/trend-parceiros/events"),t=n.map(e=>{let{date:n,time:t}=function(e){let n=new Date(e),t=new Intl.DateTimeFormat("pt-BR",{weekday:"long",timeZone:"America/Sao_Paulo"}).format(n),i=new Intl.DateTimeFormat("pt-BR",{day:"2-digit",month:"2-digit",timeZone:"America/Sao_Paulo"}).format(n),r=new Intl.DateTimeFormat("pt-BR",{hour:"2-digit",minute:"2-digit",hour12:!1,timeZone:"America/Sao_Paulo"}).format(n),o=t.charAt(0).toUpperCase()+t.slice(1),s=i.slice(0,5),a=r.replace(":","h");return{date:"".concat(o,", ").concat(s),time:a}}(e.eventDate);return{_id:e._id,title:"Apresenta\xe7\xe3o Trend SuperApp para Lojistas",date:n,time:t,location:"Swiss Park Office â Campinas-SP",address:"Av. Antonio Artioli, 570, Ed. Zug, Sala de Conven\xe7\xf5es 01 e 02"}});w(t),s(e=>({...e,document:k("document")})),i("event")}catch(r){}finally{f(!1)}}},O=e=>{P(e)},J=async()=>{if(!S)return;let e=k(),n=v.find(e=>e._id===S);i("generating");try{var t,r,o,s,a;let{data:l}=await y.b.post("/trend-parceiros/order",{productId:S,document:e.document.replace(/\D/g,""),email:e.email,phone:e.whatsApp.replace(/\D/g,""),name:e.name,documentPartner:e.documentPartner.replace(/\D/g,"")});F({pdfUrl:null!==(o=null===(t=l.items)||void 0===t?void 0:null===(r=t[0])||void 0===r?void 0:r.url)&&void 0!==o?o:null,ticketCode:null!==(s=l.orderCode)&&void 0!==s?s:null,eventTitle:null!==(a=null==n?void 0:n.title)&&void 0!==a?a:null,eventDate:n?"".concat(n.date," \xe0s ").concat(n.time):null}),i("success")}catch(c){i("event")}},I=()=>{E(),s({}),P(null),w([]),b(null),F({pdfUrl:null,eventTitle:null,eventDate:null,ticketCode:null}),i("document")};return{control:_,errors:N,currentStep:t,completedData:o,isValidatingDocument:a,isLookingUpCustomer:c,customerExists:j,orderResult:C,events:v,selectedEventId:S,isLoadingEvents:p,productId:n,handleCpfBlur:D,handleSelectEvent:O,handleConfirmEvent:J,handleValidateDocument:W,handleReset:I}}();return(0,i.jsx)(c.W,{maxW:1280,px:{base:4,lg:8},display:"flex",justifyContent:"center",position:"relative",children:(0,i.jsx)(d.E.div,{layout:!0,transition:{duration:.4,ease:[.25,.1,.25,1]},style:{width:"100%",maxWidth:"35rem"},children:(0,i.jsxs)(a.x,{bg:"#FFF",rounded:"2xl",p:{base:6,lg:10},w:"100%",minH:{base:"20rem",lg:"20rem"},borderWidth:4,borderColor:"primary",display:"flex",flexDirection:"column",children:[(0,i.jsx)(P,{currentStep:t}),(0,i.jsxs)(p.M,{mode:"wait",children:["document"===t&&(0,i.jsx)(d.E.div,{...Z,style:{flex:1,display:"flex"},children:(0,i.jsx)(N,{control:e,errors:n,onValidate:_,isValidating:s,onCpfBlur:S,isLookingUpCustomer:l,customerExists:b})},"document"),"event"===t&&(0,i.jsx)(d.E.div,{...Z,style:{flex:1,display:"flex"},children:(0,i.jsx)(I,{events:v,selectedEventId:w,onSelect:C,onContinue:F,completedDocument:o.document||"",isLoading:f})},"event"),"generating"===t&&(0,i.jsx)(d.E.div,{...Z,children:(0,i.jsx)(R,{})},"generating"),"success"===t&&(0,i.jsx)(d.E.div,{...Z,children:(0,i.jsx)(H,{onReset:z,pdfUrl:j.pdfUrl,eventTitle:j.eventTitle,eventDate:j.eventDate,ticketCode:j.ticketCode})},"success")]})]})})})}var G=t(41664),M=t.n(G),X=t(37945);function V(){return(0,i.jsx)(a.x,{as:"header",background:"linear-gradient(to left, #781212, #FF1C15)",py:4,children:(0,i.jsx)(c.W,{as:"section",maxW:1200,children:(0,i.jsxs)(j.U,{justify:"space-between",children:[(0,i.jsx)(X.E,{src:"/images/trend-parceiros/logo-white.svg",alt:"Trend SuperApp Parceiros Logo",h:{base:12,lg:16}}),(0,i.jsx)(M(),{href:"/trend-parceiros",children:(0,i.jsx)(E.Y,{bg:"white",_hover:{opacity:.8},color:"#1E1E1E",h:{base:"2.75rem",lg:"3.25rem"},rounded:"xl",children:"Acessar LP"})})]})})})}let $=()=>(0,i.jsxs)(s(),{children:[(0,i.jsx)("title",{children:"Convites - Trend SuperApp Parceiros"}
1),(0,i.jsx)("link",{rel:"preconnect",href:"https://fonts.googleapis.com"}),(0,i.jsx)("link",{rel:"preconnect",href:"https://fonts.gstatic.com",crossOrigin:"anonymous"}),(0,i.jsx)("link",{href:"https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Poppins:wght@400;600;700&display=swap",rel:"stylesheet"}),(0,i.jsx)("meta",{property:"fb:app_id",content:"1178101013323563"}),(0,i.jsx)("meta",{name:"description",content:"Convites - Trend SuperApp Parceiros"}),(0,i.jsx)("meta",{property:"og:url",content:"https://www.trendsuperapp.com.br/trend-parceiros/convites"}),(0,i.jsx)("meta",{property:"og:title",content:"Convites - Trend SuperApp Parceiros"}),(0,i.jsx)("meta",{property:"og:description",content:"Resgate seu convite e participe dos eventos exclusivos Trend SuperApp Parceiros!"}),(0,i.jsx)("meta",{property:"og:type",content:"website"}),(0,i.jsx)("meta",{property:"og:image",content:"https://www.trendsuperapp.com.br/images/logo/logo.png"}),(0,i.jsx)("meta",{property:"og:image:secure_url",content:"https://www.trendsuperapp.com.br/images/logo/logo.png"}),(0,i.jsx)("meta",{property:"og:image:alt",content:"Convites - Trend SuperApp Parceiros - Thumbnail"}),(0,i.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"}),(0,i.jsx)("style",{children:"\n html, body {\n scrollbar-width: none;\n }\n html::-webkit-scrollbar,\n body::-webkit-scrollbar {\n display: none;\n }\n "})]});function Q(){let{bootingApp:e}=(0,l.Eu)();return e?(0,i.jsx)($,{}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)($,{}),(0,i.jsxs)(a.x,{fontFamily:"'Poppins', sans-serif",overflowX:"hidden",display:"flex",flexDirection:"column",minH:"100vh",children:[(0,i.jsx)(V,{}),(0,i.jsx)(a.x,{bg:"#FEF0DF",py:8,flex:"1",children:(0,i.jsx)(q,{})})]})]})}},88357:function(e,n,t){"use strict";t.d(n,{w_:function(){return l}});var i=t(67294),r={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},o=i.createContext&&i.createContext(r),s=function(){return(s=Object.assign||function(e){for(var n,t=1,i=arguments.length;t<i;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e}).apply(this,arguments)},a=function(e,n){var t={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&0>n.indexOf(i)&&(t[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,i=Object.getOwnPropertySymbols(e);r<i.length;r++)0>n.indexOf(i[r])&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(t[i[r]]=e[i[r]]);return t};function l(e){return function(n){return i.createElement(c,s({attr:s({},e.attr)},n),function e(n){return n&&n.map(function(n,t){return i.createElement(n.tag,s({key:t},n.attr),e(n.child))})}(e.child))}}function c(e){var n=function(n){var t,r=e.attr,o=e.size,l=e.title,c=a(e,["attr","size","title"]),d=o||n.size||"1em";return n.className&&(t=n.className),e.className&&(t=(t?t+" ":"")+e.className),i.createElement("svg",s({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,c,{className:t,style:s(s({color:e.color||n.color},n.style),e.style),height:d,width:d,xmlns:"http://www.w3.org/2000/svg"}),l&&i.createElement("title",null,l),e.children)};return void 0!==o?i.createElement(o.Consumer,null,function(e){return n(e)}):n(r)}},74032:function(e,n,t){"use strict";t.d(n,{C:function(){return c}});var i=t(85893),r=t(65544),o=t(34926),s=t(49381),a=t(73035),l=t(17997);let c=(0,s.G)(function(e,n){let t=(0,a.m)("Badge",e),{className:s,...c}=(0,r.L)(e);return(0,i.jsx)(l.m.span,{ref:n,className:(0,o.cx)("chakra-badge",e.className),...c,__css:{display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle",...t}})});c.displayName="Badge"},96254:function(e,n,t){"use strict";t.d(n,{W:function(){return c}});var i=t(85893),r=t(65544),o=t(34926),s=t(49381),a=t(73035),l=t(17997);let c=(0,s.G)(function(e,n){let{className:t,centerContent:s,...c}=(0,r.L)(e),d=(0,a.m)("Container",e);return(0,i.jsx)(l.m.div,{ref:n,className:(0,o.cx)("chakra-container",t),...c,__css:{...d,...s&&{display:"flex",flexDirection:"column",alignItems:"center"}}})});c.displayName="Container"},30980:function(e,n,t){"use strict";t.d(n,{l:function(){return d}});var i=t(85893),r=t(65544),o=t(34926),s=t(54506),a=t(49381),l=t(73035),c=t(17997);let d=(0,a.G)(function(e,n){let t=(0,l.m)("FormLabel",e),a=(0,r.L)(e),{className:d,children:x,requiredIndicator:m=(0,i.jsx)(p,{}),optionalIndicator:u=null,...f}=a,g=(0,s.NJ)(),h=g?.getLabelProps(f,n)??{ref:n,...f};
1return(0,i.jsxs)(c.m.label,{...h,className:(0,o.cx)("chakra-form__label",a.className),__css:{display:"block",textAlign:"start",...t},children:[x,g?.isRequired?m:u]})});d.displayName="FormLabel";let p=(0,a.G)(function(e,n){let t=(0,s.NJ)(),r=(0,s.e)();if(!t?.isRequired)return null;let a=(0,o.cx)("chakra-form__required-indicator",e.className);return(0,i.jsx)(c.m.span,{...t?.getRequiredIndicatorProps(e,n),__css:r.requiredIndicator,className:a})});p.displayName="RequiredIndicator"},54270:function(e,n,t){"use strict";t.d(n,{O:function(){return y}});var i=t(85893),r=t(67294),o=t(43289),s=t(65544),a=t(34926),l=t(70917),c=t(70052),d=t(17997),p=t(49381),x=t(73035);let m=(0,d.m)("div",{baseStyle:{boxShadow:"none",backgroundClip:"padding-box",cursor:"default",color:"transparent",pointerEvents:"none",userSelect:"none","&::before, &::after, *":{visibility:"hidden"}}}),u=(0,o.gJ)("skeleton-start-color"),f=(0,o.gJ)("skeleton-end-color"),g=(0,l.F4)({from:{opacity:0},to:{opacity:1}}),h=(0,l.F4)({from:{borderColor:u.reference,background:u.reference},to:{borderColor:f.reference,background:f.reference}}),y=(0,p.G)((e,n)=>{let t={...e,fadeDuration:"number"==typeof e.fadeDuration?e.fadeDuration:.4,speed:"number"==typeof e.speed?e.speed:.8},o=(0,x.m)("Skeleton",t),l=function(){let e=(0,r.useRef)(!0);return(0,r.useEffect)(()=>{e.current=!1},[]),e.current}(),{startColor:p="",endColor:y="",isLoaded:j,fadeDuration:b,speed:v,className:w,fitContent:S,animation:P,...C}=(0,s.L)(t),[F,_]=(0,c.dQ)("colors",[p,y]),z=function(e){let n=(0,r.useRef)(void 0);return(0,r.useEffect)(()=>{n.current=e},[e]),n.current}(j),k=(0,a.cx)("chakra-skeleton",w),A={...F&&{[u.variable]:F},..._&&{[f.variable]:_}};if(j){let E=l||z?"none":`${g} ${b}s`;return(0,i.jsx)(d.m.div,{ref:n,className:k,__css:{animation:E},...C})}return(0,i.jsx)(m,{ref:n,className:k,...C,__css:{width:S?"fit-content":void 0,...o,...A,_dark:{...o._dark,...A},animation:P||`${v}s linear infinite alternate ${h}`}})});y.displayName="Skeleton"},50232:function(e,n,t){"use strict";t.d(n,{X:function(){return c}});var i=t(85893),r=t(65544),o=t(34926),s=t(49381),a=t(73035),l=t(17997);let c=(0,s.G)(function(e,n){let t=(0,a.m)("Heading",e),{className:s,...c}=(0,r.L)(e);return(0,i.jsx)(l.m.h2,{ref:n,className:(0,o.cx)("chakra-heading",e.className),...c,__css:t})});c.displayName="Heading"}},function(e){e.O(0,[5445,9774,2888,179],function(){return e(e.s=76210)}),_N_E=e.O()}]);
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.