1import{a as A}from"/build/_shared/chunk-Q3HAHZE2.js";import{a as _}from"/build/_shared/chunk-XTT6PNML.js";import{a as w}from"/build/_shared/chunk-JPS3DGRW.js";import{a as P}from"/build/_shared/chunk-5MTAKDOC.js";import"/build/_shared/chunk-4WQ7OQ7J.js";import"/build/_shared/chunk-WDQ3WE5E.js";import"/build/_shared/chunk-4VELNM6Q.js";import"/build/_shared/chunk-GCKJM4HH.js";import"/build/_shared/chunk-EOENFGRQ.js";import"/build/_shared/chunk-PSRMH4SZ.js";import"/build/_shared/chunk-CH4SA4UP.js";import"/build/_shared/chunk-PN2OVXE2.js";import"/build/_shared/chunk-XCXV5GG4.js";import"/build/_shared/chunk-NPEQY5M3.js";import"/build/_shared/chunk-Z6UNV2HV.js";import"/build/_shared/chunk-PPEMARXT.js";import"/build/_shared/chunk-MCL6O6KD.js";import"/build/_shared/chunk-A7XV2CIQ.js";import{a as B}from"/build/_shared/chunk-J4VEWMG7.js";import"/build/_shared/chunk-IFG2I4V4.js";import"/build/_shared/chunk-ZFWMSUD2.js";import"/build/_shared/chunk-UN6XEYB5.js";import"/build/_shared/chunk-OYB3MNZ5.js";import"/build/_shared/chunk-PJTZGVAN.js";import{b}from"/build/_shared/chunk-3RORW3RG.js";import{a as v}from"/build/_shared/chunk-Q2BGUOPV.js";import"/build/_shared/chunk-LMMWGSZN.js";import"/build/_shared/chunk-UNARLSSB.js";import"/build/_shared/chunk-MD4J5AX5.js";import"/build/_shared/chunk-XDL6M32Q.js";import"/build/_shared/chunk-K2NTU73E.js";import"/build/_shared/chunk-GMAFWABT.js";import"/build/_shared/chunk-FJF3RONN.js";import"/build/_shared/chunk-VJ6GUMAL.js";import{d as x,e as F,f as M}from"/build/_shared/chunk-AJRMQYYP.js";import"/build/_shared/chunk-CSPHLCZO.js";import{G as S,J as I,q as D}from"/build/_shared/chunk-HWJS2VHR.js";import{a as K}from"/build/_shared/chunk-BK234B6G.js";import{c as f,p as y,s as L}from"/build/_shared/chunk-MTP6MU5Y.js";import{a as J,b as C}from"/build/_shared/chunk-PBIKXX5U.js";import{e as i}from"/build/_shared/chunk-ZGAAV4RY.js";var W=i(K());var o=i(J());var t=i(C()),Q="request_brochures",X=({data:s,location:n})=>x(F(s?.pageData.seoMetaTitle,s?.pageData.pageTitle),M(s?.pageData.seoMetaDescription,s?.pageData.introText),{image:s.pageData?.heroImage??s.photoGallery?.assets?.find(c=>c.youTubeUrl==="")?.asset,pathname:n.pathname});function T(){let{pageData:s,photoGallery:n,listings:c}=y(),G=f(),r=L(),[N,U]=(0,o.useState)(1),E=(0,o.useContext)(v),[q,a]=(0,o.useState)(!1),[k,m]=(0,o.useState)(!1),p=(0,o.useRef)();(0,o.useEffect)(()=>{let e=parseInt(sessionStorage.getItem("things_to_do_list")||"1",10);sessionStorage.removeItem("things_to_do_list"),U(e)},[]);let[O="",R=""]=(G["*"]??"").split("/");_(s.id??""),(0,o.useEffect)(()=>{r.state==="idle"&&r.data?.submitted&&(a(!0),m(!1),p.current?.reset())},[r]);let u=(s.brochureOptions??[])?.map(e=>e.fields),g=u.filter(Boolean).find(e=>"placeId"in e&&e.placeId)??{},j=`${"placeId"in g?g.placeId:""}`,h=[],l=[];return u.filter(e=>e?.showReceiveBrochureButton).forEach(e=>{h.push(e.id),l.push(e)}),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(I,{template:"resource",siteSectionLevel2:"things-to-do",siteSectionLevel3:O,siteSectionLevel4:R}),(0,t.jsx)(P,{pageData:s,photoGallery:n,listings:c,placeId:j,itemListId:"things_to_do_list",itemListName:"things to do grid",savedPageLocation:N,...l.length>0&&{renderBrochureForm:()=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(w,{title:"",brochures:!0,hideBrochures:!0,brochureList:l,selectedBrochures:h,isProcessing:k,FormComponent:r.Form,onSubmit:e=>{m(!0),window.grecaptcha?.enterprise?.ready(()=>{window.grecaptcha.enterprise.execute(E??"",{action:Q}).then(H=>{if(B(e,H),e.current){let V=new FormData(e.current).getAll("brochure"),d=[];V.forEach($=>{let z=$.split("-");d.push(z[0])}),S({event:"trigger-ga-event",eventAction:"not specified",eventCategory:"brochures|submit",eventLabel:JSON.stringify(d)}),p.current=e.current,r.submit(e.current)}})})}}),(0,t.jsx)(b,{isOpen:q,onClose:()=>{a(!1)},onRequestClose:()=>{a(!1)},hideClose:!0,containerStyle:{maxWidth:"24rem"},children:(0,t.jsxs)("div",{className:"h-full flex bg-white ml-auto mr-auto flex-col",children:[(0,t.jsx)(D,{onClick:()=>{a(!1)},className:"text-gray-400 cursor-pointer flex justify-end pr-2 pt-4 mb-[-35px] z-10"}),(0,t.jsxs)("div",{className:"flex flex-col justify-center items-center",children:[(0,t.jsx)("img",{className:"pt-5 pb-2",src:A,alt:"utah.com success"}),(0,t.jsx)("h1",{className:"font-bold pb-1",children:"SUCCESS!"}),(0,t.jsx)("div",{className:"pb-4",children:"Travel info coming your way soon."})]})]})})]})}})]})}export{T as default,X as meta};
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.