PageSourceSearch

https://www2.betocarrero.com.br/assets/Passaporte-Dj8BMzkb.js

js betocarrero.com.br collected 2026-09-24 09:33:04 UTC 26,141 bytes, 3 lines download raw bytes

1import{r as n,f as ge,j as e,L as re,C as fe,Q as K,o as xe,s as be,u as he,A as je,a as ve,b as Ne,c as ye,d as Ce,S as we,H as ke,e as Se,g as ie,h as De,F as $e,i as _e,k as Ee,l as Ie,m as Pe,n as ce}from"./index-DpeRiJon.js";import{D as ne}from"./DateSheet-CGmVzmcU.js";import{i as Re,Y as Le}from"./cpf-ChL2IU4c.js";import{U as Fe}from"./upload-CauKUhFJ.js";import{S as de}from"./shopping-cart-DKXLKyW6.js";const pe="243854";function Ae(t){if(typeof t=="number")return{price:t};if(!t)return{};const r=t;return{price:r.effectivePrice??r.promotionalPrice??r.basePrice,formattedPrice:r.formattedPromotionalPrice??r.formattedPrice??r.formattedBasePrice??void 0}}function Te(t){var N,u,y,s,i,p,j,l,x,c;const r=String(t.code??t.productCode??((N=t.content)==null?void 0:N.code)??""),b=((u=t.content)==null?void 0:u.name)??((y=t.visit)==null?void 0:y.displayName)??t.displayName??t.name??((s=t.content)==null?void 0:s.title)??"",h=((i=t.visit)==null?void 0:i.shortDescription)??t.shortDescription??((p=t.content)==null?void 0:p.subName)??t.subName??"",I=((j=t.content)==null?void 0:j.imageThumb)??((l=t.content)==null?void 0:l.imageMobile)??((x=t.content)==null?void 0:x.imageDesktop)??t.imageThumb??t.imageUrl??t.image,P=Ae(((c=t.visit)==null?void 0:c.price)??t.price);return{code:r,title:b,subtitle:h,image:I,...P,discount:t.discountLabel??t.discount,slug:t.slug}}function Me(t){const r=t.slug??be(t.title||"item");return t.code===pe?"/opcionais/single-pass":`/opcional/${r}/${t.code}`}function qe({productCode:t,visitDate:r,locale:b="pt-BR",title:h="Tenha uma experiência completa!",subtitle:I="Garanta opcionais com descontos exclusivos e ainda evite filas."}){const[P,N]=n.useState([]),[u,y]=n.useState([]);return n.useEffect(()=>{if(!t)return;const s=new AbortController;return ge(t,{visitDate:r??void 0,locale:b,type:"cross-sale"},s.signal).then(i=>{const p=i.map(Te).filter(j=>j.code&&j.title);N(p),y(p.map(()=>0))}).catch(i=>{i.name!=="AbortError"&&(console.error("[CrossSell] Falha ao buscar recomendações:",i),N([]))}),()=>s.abort()},[t,r,b]),P.length?e.jsxs("section",{children:[e.jsx("h2",{className:"font-extrabold text-foreground text-lg mb-1",children:h}),e.jsx("p",{className:"text-sm text-muted-foreground mb-5",children:I}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4 mb-8",children:P.map((s,i)=>{const p=s.subtitle?s.subtitle.split(`
2`):[],j=p[0],l=p.slice(1),x=Me(s),c=s.code===pe;return e.jsxs("article",{className:"rounded-2xl bg-card shadow-sm border border-border overflow-hidden flex flex-col h-full",children:[e.jsxs("div",{className:"flex items-stretch gap-3",children:[e.jsx(re,{to:x,"aria-label":s.title,className:"w-24 h-24 flex-shrink-0 relative block",children:s.image&&e.jsx("img",{src:s.image,alt:s.title,className:"w-full h-full object-cover",loading:"lazy"})}),e.jsxs("div",{className:"min-w-0 flex-1 self-center pr-3 py-2",children:[e.jsx(re,{to:x,className:"block hover:underline",children:e.jsx("h3",{className:"font-extrabold text-foreground text-base leading-tight",children:s.title})}),j&&e.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-snug prose prose-sm max-w-none [&_a]:text-primary [&_a]:underline [&_strong]:text-foreground [&_ul]:list-disc [&_ul]:pl-4 [&_ol]:list-decimal [&_ol]:pl-4",dangerouslySetInnerHTML:{__html:j}})]})]}),e.jsxs("div",{className:"relative h-0",children:[e.jsx("div",{className:"absolute -left-2 -top-2 w-4 h-4 rounded-full bg-background"}),e.jsx("div",{className:"absolute -right-2 -top-2 w-4 h-4 rounded-full bg-background"}),e.jsx("div",{className:"absolute inset-x-3 -top-px border-t border-dashed border-border"})]}),e.jsxs("div",{className:"px-4 pt-3 pb-3 flex flex-col flex-1",children:[l.length>0&&e.jsx("div",{className:"text-xs text-muted-foreground leading-snug mb-3 prose prose-sm max-w-none [&_a]:text-primary [&_a]:underline [&_strong]:text-foreground [&_ul]:list-disc [&_ul]:pl-4 [&_ol]:list-decimal [&_ol]:pl-4",dangerouslySetInnerHTML:{__html:l.join(`
3`)}}),e.jsxs("div",{className:"flex items-center justify-between gap-3 mt-auto",children:[e.jsxs("div",{children:[e.jsx("span",{className:"font-extrabold text-foreground",children:s.formattedPrice??(s.price!=null?`R$ ${s.price}`:"")}),s.discount&&e.jsx("span",{className:"block bg-accent text-primary-dark text-[11px] font-bold px-2 py-0.5 rounded-full mt-1 w-fit",children:s.discount})]}),c?e.jsx(re,{to:x,"aria-label":`Ver detalhes de ${s.title}`,className:"w-9 h-9 rounded-full bg-accent text-accent-foreground flex items-center justify-center hover:bg-accent/90 transition-colors",children:e.jsx(fe,{className:"w-5 h-5",strokeWidth:3})}):e.jsx(K,{value:u[i]??0,onChange:R=>y(k=>k.map((S,D)=>
3D===i?R:S)),size:"md",productCode:s.code,visitDate:r??void 0,onAdd:xe})]})]})]},s.code)})})]}):null}const w=t=>t.replace(/\D/g,""),me=t=>t.replace(/[^a-zA-Z0-9]/g,"").toUpperCase(),ue=[{iso:"AR",label:"Argentina",countryId:10,placeholder:"000.000.000",unmask:w,mask:t=>w(t).slice(0,9).replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d)/,"$1.$2"),isValid:t=>t.length===9},{iso:"BO",label:"Bolívia",countryId:29,placeholder:"0000000",unmask:w,mask:t=>w(t).slice(0,7),isValid:t=>t.length===7},{iso:"CL",label:"Chile",countryId:43,placeholder:"000.000.000",unmask:w,mask:t=>w(t).slice(0,9).replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d)/,"$1.$2"),isValid:t=>t.length===9},{iso:"CO",label:"Colômbia",countryId:50,placeholder:"00000000",unmask:w,mask:t=>w(t).slice(0,8),isValid:t=>t.length===8},{iso:"EC",label:"Equador",countryId:63,placeholder:"00000000000",unmask:w,mask:t=>w(t).slice(0,11),isValid:t=>t.length===11},{iso:"MX",label:"México",countryId:153,placeholder:"XXXXXXXXXX",unmask:me,mask:t=>me(t).slice(0,10),isValid:t=>t.length===10},{iso:"PY",label:"Paraguai",countryId:174,placeholder:"000000",unmask:w,mask:t=>w(t).slice(0,6),isValid:t=>t.length===6}],Be=({productCode:t,visitDate:r})=>{const{toast:b}=he(),[h,I]=n.useState(!1),[P,N]=n.useState(!1),[u,y]=n.useState(!1),[s,i]=n.useState(""),[p,j]=n.useState("+55 "),[l,x]=n.useState(""),[c,R]=n.useState(""),[k,S]=n.useState(""),[D,O]=n.useState(""),[A,V]=n.useState(null),[M,U]=n.useState(null),[C,q]=n.useState(!1),[X,B]=n.useState(""),Y=n.useRef(null),W=n.useRef(null),a=C?ue.find(o=>o.iso===X)??null:null,g=async o=>{if(o.preventDefault(),!r){b({title:"Selecione a data da visita",variant:"destructive"});return}if(!u){b({title:"É necessário aceitar as condições de compra",variant:"destructive"});return}I(!0);try{const d=new FormData;d.append("productCode",String(t)),d.append("visitDate",r),d.append("quantity","1"),d.append("modalKey","modal-solicitacao-kelly"),d.append("contactName",s),d.append("contactPhone",p.replace(/\D/g,"")),d.append("contactEmail",l),d.append("recaptchaToken","test-token"),d.append("holders[0].fullName",c);const T=C&&a?a.unmask(k):k.replace(/\D/g,"");d.append("holders[0].document",T),d.append("holders[0].birthDate",D);const G=C&&a?a.countryId:26;d.append("holders[0].countryId",String(G)),A&&d.append("holders[0].idPhoto",A),M&&d.append("holders[0].medicalReport",M);const F=await fetch(`${je}/api/v1/passport-requests`,{method:"POST",body:d});if(!F.ok){let $=`HTTP ${F.status}`;try{const ae=await F.json();ae!=null&&ae.message&&($=ae.message)}catch{}const Q=new Error($);throw Q.status=F.status,Q}N(!0),b({title:"Solicitação enviada",description:"Recebemos sua solicitação. Em breve entraremos em contato."})}catch(d){b({title:"Erro ao enviar solicitação",description:d instanceof Error?d.message:"Tente novamente em instantes.",variant:"destructive"})}finally{I(!1)}},_=()=>{i(""),j("+55 "),x(""),R(""),S(""),O(""),V(null),U(null),y(!1),q(!1),B(""),N(!1)};if(P)return e.jsxs("div",{className:"max-w-[720px] mx-auto mb-8",children:[e.jsxs("div",{className:"rounded-2xl border border-border bg-card p-8 text-center",children:[e.jsx("h3",{className:"font-extrabold text-primary-dark text-xl mb-2",children:"Solicitação enviada"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Recebemos sua solicitação. Em breve entraremos em contato."})]}),e.jsx("div",{className:"text-center mt-4",children:e.jsx("button",{type:"button",onClick:_,className:"text-sm text-primary font-semibold underline",children:"Nova Solicitação"})})]});const E=a?a.unmask(k):k.replace(/\D/g,""),L=a?a.isValid(E):Re(k),z=a?E.length>0&&!L&&E.length>=(a.placeholder.replace(/\D/g,"").length||a.placeholder.length):E.length===11&&!L,le=o=>o.replace(/\D/g,"").slice(0,11).replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d{1,2})$/,"$1-$2"),Z=a?a.placeholder:"000.000.000-00",J=a?a.placeholder.length:14,oe=(a==null?void 0:a.iso)==="MX"?"text":"numeric",H=o=>{S(a?a.mask(o):le(o))},m=!!r&&u&&s.trim()!==""&&p.trim()!==""&&l.trim()!==""&&c.trim()!==""&&L&&D.trim()!==""&&!!A&&!!M&&(!C||!!a),f="w-full h-11 px-3 rounded-lg border border-border bg-card text-sm placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary",v="block text-sm font-semibold text-foreground mb-1.5",ee="rounded-xl border border-border p-5 md:p-6 mb-6",te="px-2 text-primary font-bold text-sm",se=(o,d,T,G,F)=>e.jsxs("div",{children:[e.jsxs("label",{className:v,children:[o," ",d&&e.jsx("span",{className:"font-normal text-muted-foreground",children:d})]}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{type:"text",readOnly:!0,value:(T==null?void 0:T.name)??"",onClick:()=>{var $;return($=F.current)==null?void 0:$.click()},className:`${f} pr-12 cursor-pointer`}),e.jsx("button",{type:"button",onClick:()=>{var $;return($=F.current)==null?void 0:$.click()},className:"absolute right-1 top-1 h-9 w-9 rounded-full flex items-center justify-center text-muted-foreground hover:bg-muted","aria-label":`Selecionar ${o}`,children:e.jsx(Fe,{className:"w-4 h-4"})}),e.jsx("input",{ref:F,type:"file",className:"hidden",onChange:$=>{var Q;return G(((Q=$.target.files)==null?void 0:Q[0])??null)}})]})]});return e.jsxs("form",{onSubmit:g,className:"mb-8 max-w-[720px] mx-auto",children:[e.jsx("h2",{className:"text-center text-primary-dark font-extrabold text-2xl md:text-3xl mb-6",children:"Solicitação de Passaporte Kelly"}),e.jsxs("fieldset",{className:ee,children:[e.jsx("legend",{className:te,children:"Informações de contato"}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:v,children:"Nome"}),e.jsx("input",{required:!0,value:s,onChange:o=>i(o.target.value),placeholder:"Nome Completo",className:f})]}),e.jsxs("div",{children:[e.jsx("label",{className:v,children:"Whatsapp"}),e.jsx("div",{className:"bcw-phone-wrapper bcw-phone-wrapper--plain",children:e.jsx(Le,{defaultCountry:"br",hideDropdown:!0,forceDialCode:!0,value:p,onChange:o=>j(o),inputProps:{placeholder:"11 99999-0000",required:!0}})})]}),e.jsxs("div",{children:[e.jsx("label",{className:v,children:"E-mail"}
3),e.jsx("input",{required:!0,type:"email",value:l,onChange:o=>x(o.target.value),placeholder:"[email protected]",className:f})]})]})]}),e.jsxs("fieldset",{className:ee,children:[e.jsx("legend",{className:te,children:"Informações do utilizador"}),e.jsx("div",{className:"mb-4",children:e.jsxs("div",{className:"flex flex-wrap items-center gap-x-6 gap-y-3",children:[e.jsx("label",{className:`${v} mb-0`,children:"Estrangeiro?"}),e.jsxs("label",{className:"flex items-center gap-2 text-sm cursor-pointer",children:[e.jsx("input",{type:"radio",name:"foreigner",checked:!C,onChange:()=>{q(!1),B(""),S("")},className:"w-4 h-4 accent-primary"}),"Não"]}),e.jsxs("label",{className:"flex items-center gap-2 text-sm cursor-pointer",children:[e.jsx("input",{type:"radio",name:"foreigner",checked:C,onChange:()=>{q(!0),S("")},className:"w-4 h-4 accent-primary"}),"Sim"]}),C&&e.jsx("div",{className:"min-w-[220px]",children:e.jsxs("select",{required:!0,value:X,onChange:o=>{B(o.target.value),S("")},className:f,children:[e.jsx("option",{value:"",children:"Selecione o país"}),ue.map(o=>e.jsx("option",{value:o.iso,children:o.label},o.iso))]})})]})}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 mb-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:v,children:"Nome"}),e.jsx("input",{required:!0,value:c,onChange:o=>R(o.target.value),placeholder:"Nome Completo",className:f})]}),e.jsxs("div",{children:[e.jsx("label",{className:v,children:"Documento"}),e.jsx("input",{required:!0,value:k,onChange:o=>H(o.target.value),placeholder:Z,inputMode:oe,maxLength:J,disabled:C&&!a,className:`${f} ${z?"border-destructive focus:ring-destructive/30":""}`}),z&&e.jsx("p",{className:"text-xs text-destructive mt-1 ml-3",children:"Documento inválido"})]}),e.jsxs("div",{children:[e.jsx("label",{className:v,children:"Data nascimento"}),e.jsx("input",{required:!0,type:"date",value:D,onChange:o=>O(o.target.value),placeholder:"dd/mm/aaaa",className:f})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[se("Documento","(com foto)",A,V,Y),se("Laudo médico",null,M,U,W)]})]}),e.jsx("p",{className:"text-sm text-muted-foreground text-center mb-4 px-2",children:"Com o passaporte Kelly você poderá desfrutar das atrações do parque, lembrando que cada brinquedo possui sua regra de segurança que deve ser obrigatoriamente respeitada."}),e.jsxs("label",{className:"flex items-center justify-center gap-2 mb-6 text-sm text-foreground cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:u,onChange:o=>y(o.target.checked),className:"w-4 h-4 accent-primary"}),"Eu li e entendi todas as condições de compra."]}),e.jsx("div",{className:"flex justify-center",children:e.jsx("button",{type:"submit",disabled:h||!m,className:"bg-accent text-accent-foreground px-10 py-3 rounded-full font-extrabold text-sm hover:bg-accent/90 transition-colors disabled:opacity-60 disabled:cursor-not-allowed",children:h?"Enviando...":"Solicitar"})})]})};function Oe(t){return t.price?typeof t.price=="number"?{price:t.price}:{price:t.price.effectivePrice??t.price.promotionalPrice??t.price.basePrice??0,formatted:t.price.formattedPromotionalPrice??t.price.formattedPrice??t.price.formattedBasePrice}:{price:0}}const Qe=()=>{var X,B,Y,W;ve();const{sku:t}=Ne(),[r,b]=n.useState(null),{selectedDate:h,dateLabel:I,setVisitDate:P}=ye(),N=I,u=h,y=a=>P(a);n.useEffect(()=>{if(!t){b(null);return}const a=new AbortController;return Ce(t,a.signal,"pt-BR",h??void 0).then(g=>b(g)).catch(g=>{g.name!=="AbortError"&&b(null)}),()=>a.abort()},[t,h]);const s=r==null?void 0:r.content,i=(X=r==null?void 0:r.visit)==null?void 0:X.price,p=(i==null?void 0:i.effectivePrice)??(i==null?void 0:i.promotionalPrice)??(i==null?void 0:i.basePrice),j=(i==null?void 0:i.formattedPromotionalPrice)??(i==null?void 0:i.formattedPrice),l={title:(s==null?void 0:s.name)??(s==null?void 0:s.title)??"",price:p??0,formattedPrice:j,imageDesktop:s==null?void 0:s.imageDesktop,imageMobile:s==null?void 0:s.imageMobile,longDescription:s==null?void 0:s.longDescription,seoTitle:s==null?void 0:s.seoTitle,seoDescription:s==null?void 0:s.seoDescription,highlightText:s==null?void 0:s.highlightText,highlightImage:s==null?void 0:s.highlightImage,tagColor:s==null?void 0:s.tagColor,textColor:s==null?void 0:s.textColor},x=n.useMemo(()=>{var a,g,_;return((_=(g=(a=r==null?void 0:r.visit)==null?void 0:a.variations)==null?void 0:g[0])==null?void 0:_.options)??[]},[r]),[c,R]=n.useState(1),[k,S]=n.useState([]),[D,O]=n.useState(!1),{toast:A}=he();n.useEffect(()=>{S(x.map(()=>0))},[x]);const V=n.useMemo(()=>l.price*c,[l.price,c]),M=(l.longDescription||"").includes("<!--[BOX DE SELEÇÃO]-->"),U=(l.longDescription||"").includes("<!--[FORM_KELLY]-->"),C=M||U,q=async()=>
3{if(t){if(!h){A({title:"Selecione uma data",description:"Escolha a data da visita antes de adicionar ao carrinho.",variant:"destructive"});return}O(!0);try{const a=x.map((g,_)=>{const E=k[_]??0,L=g.productCode??(g.id!=null?String(g.id):null);return E>0&&L?{productCode:L,quantity:E,visitDate:h}:null}).filter(Boolean);a.length>0?await Ee([{productCode:String(t),quantity:c,visitDate:h},...a]):await Ie({productCode:String(t),visitDate:h,quantity:c}),xe()}catch(a){console.error("[Passaporte] addCartItem failed",a),A({title:"Erro ao adicionar ao carrinho",description:Pe(a),variant:"destructive"})}finally{O(!1)}}};return e.jsxs(e.Fragment,{children:[e.jsx(we,{title:l.seoTitle??"Comprar Passaporte Beto Carrero — Data e Quantidade",description:l.seoDescription??"Selecione data, quantidade e idade dos visitantes para comprar seu passaporte do Beto Carrero World.",path:"/passaporte",type:"product",jsonLd:{"@context":"https://schema.org","@type":"Product",name:l.title,description:`${l.title} para o Beto Carrero World, o maior parque temático da América Latina.`,offers:{"@type":"Offer",price:l.price,priceCurrency:"BRL",availability:"https://schema.org/InStock",url:`https://www2.betocarrero.com.br/passaporte/${t}`}}}),e.jsxs("div",{className:"min-h-screen flex flex-col bg-background",children:[e.jsx(ke,{}),e.jsx("section",{className:"relative w-full",children:e.jsxs("div",{className:"relative max-w-[1200px] mx-auto md:max-w-full",children:[l.imageMobile?e.jsx("img",{src:l.imageMobile,alt:l.title,className:"lg:hidden w-full h-[320px] sm:h-[400px] object-cover",width:1200,height:440}):null,e.jsx("img",{src:l.imageDesktop??"",alt:l.title,className:`${l.imageMobile?"hidden lg:block":""} w-full h-[320px] sm:h-[400px] lg:h-[260px] object-cover`,width:1200,height:260}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-foreground
3/50 via-foreground/10 to-background"}),e.jsx(re,{to:"/passaportes","aria-label":"Voltar",className:"absolute top-8 left-3 w-9 h-9 rounded-full bg-background/90 flex items-center justify-center text-foreground hover:bg-background transition-colors",children:e.jsx(Se,{className:"w-5 h-5"})}),e.jsx("h1",{className:"absolute top-8 left-16 right-4 text-primary-foreground font-extrabold text-lg sm:text-xl md:text-2xl drop-shadow",children:l.title}),e.jsx("div",{className:"lg:hidden absolute inset-x-0 bottom-0 px-4 pb-4 sm:pb-6",children:e.jsxs("div",{className:"max-w-[640px] mx-auto space-y-7",children:[e.jsxs("div",{className:"bg-background/95 rounded-xl shadow-lg px-4 py-3 flex items-center justify-between gap-3",children:[e.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[e.jsx(ie,{className:"w-4 h-4 text-muted-foreground flex-shrink-0"}),e.jsx("span",{className:"text-sm text-foreground truncate",children:N})]}),e.jsx(ne,{value:u,onChange:y,productCode:t,children:e.jsx("button",{type:"button",className:"text-sm text-primary font-semibold underline",children:"alterar"})})]}),!C&&e.jsxs("div",{className:"px-1 flex items-center justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("p",{className:"font-extrabold text-foreground text-2xl leading-none",children:l.formattedPrice??`R$ ${l.price}`}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1 font-semibold",children:"por pessoa"})]}),e.jsx(K,{value:c,onChange:a=>R(a),min:1,size:"lg",productCode:t,visitDate:u,availability:(B=r==null?void 0:r.visit)==null?void 0:B.availability})]})]})})]})}),e.jsxs("main",{className:"flex-1",children:[e.jsx("div",{className:"max-w-[1200px] mx-auto md:max-w-full px-4 md:px-6 py-8",children:e.jsxs("div",{className:"flex flex-col lg:flex-row gap-8",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"border-t border-dashed border-border mb-6"}),(()=>{const a=l.longDescription||"",g=a.includes("<!--[GALLERY]-->"),_=a.split("<!--[GALLERY]-->"),E=_[0]??"",L=_[1]??"",z=(le,Z)=>{const J=le.split("<!--[BOX DE SELEÇÃO]-->");return J.map((oe,H)=>e.jsxs(n.Fragment,{children:[oe.split("<!--[FORM_KELLY]-->").map((m,f,v)=>e.jsxs(n.Fragment,{children:[m.trim()?e.jsx("div",{className:"text-sm text-muted-foreground leading-[1.75rem] text-justify mb-6 prose prose-sm max-w-none [&_a]:text-primary [&_a]:underline [&_h1]:font-extrabold [&_h1]:text-foreground [&_h2]:font-extrabold [&_h2]:text-foreground [&_h3]:font-extrabold [&_h3]:text-foreground [&_strong]:text-foreground [&_ul]:list-disc [&_ul]:pl-4 [&_ol]:list-decimal [&_ol]:pl-4 [&_li]:mb-1 [&_hr]:mt-8",dangerouslySetInnerHTML:{__html:m}}):null,f<v.length-1&&e.jsx(Be,{productCode:String(t??""),visitDate:u??""})]},`${Z}-${H}-k-${f}`)),H<J.length-1&&x.length>0&&e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 lg:grid-cols-4 gap-4 mb-8",children:x.map((m,f)=>{const v=m.imageThumb??m.imageMobile??m.imageDesktop??m.imageUrl??"",ee=m.productCode??(m.id!=null?String(m.id):void 0),{price:te,formatted:se}=Oe(m);return e.jsxs("article",{className:ce("rounded-2xl bg-card shadow-sm border border-border overflow-hidden",m.available===!1&&"opacity-60"),children:[e.jsxs("div",{className:"flex items-stretch gap-3",children:[e.jsx("div",{className:"w-20 h-20 flex-shrink-0 relative bg-muted",children:v?e.jsx("img",{src:v,alt:m.name??"",className:ce("w-full h-full object-cover",m.available===!1&&"grayscale"),loading:"lazy"}):null}),e.jsx("div",{className:"min-w-0 flex-1 self-center pr-3 py-2",children:e.jsx("h3",{className:"font-extrabold text-foreground text-sm leading-tight",children:m.name})})]}),e.jsxs("div",{className:"relative h-0",children:[e.jsx("div",{className:"absolute -left-2 -top-2 w-4 h-4 rounded-full bg-background"}),e.jsx("div",{className:"absolute -right-2 -top-2 w-4 h-4 rounded-full bg-background"}),e.jsx("div",{className:"absolute inset-x-3 -top-px border-t border-dashed border-border"})]}),e.jsxs("div",{className:"px-3 pt-3 pb-3 flex items-center justify-between gap-3",children:[e.jsx("span",{className:"font-extrabold text-foreground text-sm",children:se??`R$ ${te}`}),e.jsx(K,{value:k[f]??0,onChange:o=>S(d=>d.map((T,G)=>
3G===f?o:T)),size:"md",productCode:ee,visitDate:u,disabled:m.available===!1})]})]},m.id??m.productCode??m.name??f)})})]},`${Z}-${H}`))};return e.jsxs(e.Fragment,{children:[l.highlightText&&e.jsxs("div",{className:"rounded-2xl p-4 mb-6 flex items-start gap-3 shadow-sm",style:{backgroundColor:l.tagColor||void 0,color:l.textColor||void 0},children:[l.highlightImage&&e.jsx("img",{src:l.highlightImage,alt:"",className:"w-16 h-16 rounded-xl object-cover flex-shrink-0",loading:"lazy"}),e.jsx("div",{className:"text-sm font-medium leading-snug",dangerouslySetInnerHTML:{__html:l.highlightText}})]}),z(E,"before"),g&&e.jsx(qe,{productCode:t??void 0,visitDate:u??void 0,locale:"pt-BR"}),z(L,"after")]})})()]}),e.jsx("aside",{className:"lg:w-[340px] flex-shrink-0 hidden lg:block",children:e.jsxs("div",{className:"sticky top-20 border border-border rounded-xl p-5 bg-card shadow-sm",children:[e.jsx("h3",{className:"font-bold text-foreground text-base mb-4",children:"Data da visita"}),e.jsxs("div",{className:"flex items-center justify-between border border-border rounded-lg px-4 py-3 mb-4",children:[e.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[e.jsx(ie,{className:"w-4 h-4 text-muted-foreground flex-shrink-0"}),e.jsx("span",{className:"text-sm text-foreground truncate",children:N})]}),e.jsx(ne,{value:u,onChange:y,productCode:t,children:e.jsx("button",{type:"button",className:"text-sm text-primary font-semibold ml-2",children:"alterar"})})]}),!C&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex items-center justify-between mb-5",children:[e.jsxs("div",{children:[e.jsx("p",{className:"font-extrabold text-foreground text-xl leading-none",children:l.formattedPrice??`R$ ${l.price}`}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"por pessoa"})]}),e.jsx(K,{value:c,onChange:a=>R(a),min:0,size:"lg",productCode:t,visitDate:u,availability:(Y=r==null?void 0:r.visit)==null?void 0:Y.availability})]}),e.jsxs("div",{className:"border-t border-border pt-4 mb-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:"subtotal"}),e.jsxs("span",{className:"font-extrabold text-xl text-accent",children:["R$ ",V.toLocaleString("pt-BR",{minimumFractionDigits:2,maximumFractionDigits:2})]})]}),e.jsx("p",{className:"text-xs text-muted-foreground text-right mt-1",children:"em 10x sem juros"})]}),e.jsxs("button",{onClick:q,disabled:D||c===0,className:"w-full bg-accent text-accent-foreground py-3 rounded-lg font-extrabold text-sm hover:bg-accent/90 transition-colors flex items-center justify-center gap-2 disabled:opacity-60 disabled:cursor-not-allowed",children:[e.jsx(de,{className:"w-4 h-4"}),D?"Adicionando...":c===0?"Adicionar ao carrinho":`Adicionar ${c} ${c===1?"item":"itens"}`]})]})]})})]})}),e.jsx("div",{className:"lg:hidden sticky bottom-0 bg-card border-t border-border p-4 z-10",children:e.jsxs("div",{className:"container space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[e.jsx(ie,{className:"w-4 h-4 text-foreground flex-shrink-0"}),e.jsx("span",{className:"text-sm text-foreground font-bold truncate",children:N})]}),e.jsx(ne,{value:u,onChange:y,productCode:t,children:e.jsx("button",{type:"button",className:"text-sm text-primary underline",children:"alterar"})})]}),!C&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex items-center justify-between gap-3 border-t border-border pt-3",children:[e.jsxs("div",{children:[e.jsxs("p",{className:"font-extrabold text-foreground text-lg leading-none",children:["R$ ",V.toLocaleString("pt-BR",{minimumFractionDigits:2,maximumFractionDigits:2})]}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"em 10x sem juros"})]}),e.jsx(K,{value:c,onChange:a=>R(a),min:0,size:"lg",productCode:t,visitDate:u,availability:(W=r==null?void 0:r.visit)==null?void 0:W.availability})]}),e.jsxs("button",{onClick:q,disabled:D||c===0,className:"w-full bg-accent text-primary-dark py-3 rounded-full font-bold text-sm hover:bg-accent/90 transition-colors flex items-center justify-center gap-2 disabled:opacity-60 disabled:cursor-not-allowed",children:[e.jsx(de,{className:"w-4 h-4"}),D?"Adicionando...":c===0?"Adicionar ao carrinho":`Adicionar ${c} ${c===1?"item":"itens"}`]})]})]})})]}),e.jsx(De,{}),e.jsx($e,{}),e.jsx(_e,{})]})]})};export{Qe 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.