PageSourceSearch

https://spothero.com/consumer-seo/_next/static/chunks/4799.75a35c02e2b54425.js

js spothero.com collected 2026-10-01 08:45:58 UTC 8,161 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="3db2a345-457c-4dde-8cd9-a1760025a051",e._sentryDebugIdIdentifier="sentry-dbid-3db2a345-457c-4dde-8cd9-a1760025a051")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4799],{44799:function(e,t,n){"use strict";n.r(t),n.d(t,{FeaturedEventCard:function(){return FeaturedEventCard},FeaturedEventItem:function(){return FeaturedEventItem},FeaturedEvents:function(){return FeaturedEvents},fetchFeaturedEventsData:function(){return fetchFeaturedEventsData}});var r=n(97458);n(52983);var i=n(89659),a=n(92593),l=n(41483),s=n(95720),o=n(89384),d=n(42958),u=n(4233),c=n(61668),h=n(43678);let formatEventDate=e=>{let t=(0,h.ZP)(e);return{month:t.format("MMM").toUpperCase(),day:t.format("D"),dateTime:t.format("ddd, MMM D YYYY [at] h:mm A")}},FeaturedEventItem=e=>{let{event:t,eventUrl:n}=e,{month:o,day:d,dateTime:h}=formatEventDate(t.starts);return(0,r.jsxs)(s.r,{href:n,display:"flex",gap:3,alignItems:{base:"flex-start",desktop:"center"},justifyContent:"space-between",padding:3,paddingTop:4,borderRadius:"md",border:"1px solid",borderColor:"gray.200",minHeight:"109px","data-testid":"FeaturedEventItem","aria-label":"Find parking for ".concat(t.title),sx:{"&:hover":{background:"gray.light",textDecoration:"none"},"&:hover .EventDate":{transform:"scale(1.08)"}},children:[(0,r.jsxs)(l.k,{className:"EventDate","data-testid":"EventDate",width:"37px",height:"37px",borderWidth:"1px",borderColor:"black",rounded:"md",overflow:"hidden",flexDirection:"column",textAlign:"center",justifyContent:"center",flexShrink:0,transition:"transform 0.15s ease-in-out",children:[(0,r.jsx)(a.xv,{fontSize:"xs",fontWeight:"semibold",color:"white",backgroundColor:"black",textAlign:"center",textTransform:"uppercase",lineHeight:4,children:o}),(0,r.jsx)(l.k,{flexGrow:1,align:"center",justify:"center",backgroundColor:"white",color:"black",fontWeight:"semibold",fontSize:"base",lineHeight:4,children:d})]}),(0,r.jsxs)(l.k,{minWidth:0,flex:1,flexDirection:{base:"column",desktop:"row"},alignItems:{base:"flex-start",desktop:"center"},justifyContent:"space-between",gap:2,children:[(0,r.jsxs)(l.k,{minWidth:0,flexDirection:"column",gap:2,"data-testid":"EventInfo",children:[(0,r.jsx)(a.xv,{fontSize:"base",fontWeight:"semibold",color:"black",noOfLines:2,as:"h5",children:t.title}),(0,r.jsx)(a.xv,{fontSize:"sm",fontWeight:"semibold",color:"gray.600",as:"h6",children:h})]}),(0,r.jsxs)(l.k,{flexShrink:0,whiteSpace:"nowrap","data-testid":"FindParkingLink",color:"text.link.light",fontSize:"base",fontWeight:"semibold",alignItems:"center",gap:1,children:[(0,r.jsx)(i.xu,{children:"Find Parking"}),(0,r.jsx)(u.J,{as:c.Z,width:"5",height:"5"})]})]})]})};var f=n(86709);let buildSearchUrl=(e,t)=>(0,f.I)("".concat(e,"/search"),t,!0).href,buildFeaturedEventUrl=(e,t,n)=>{let r=buildSearchUrl(e,t);if(!n)return r;try{let e=new URL(n);if("https:"!==e.protocol)return r;return(0,f.I)(n,{$desktop_url:r}).href}catch(e){return r}},FeaturedEventCard=e=>{let{item:t,events:n,destinationTitle:u}=e,{image:c,destination_id:h,operator_id:f,tune_base_url:v}=t,{siteUrl:g}=(0,d.Z)();if(0===n.length||!h)return null;let p=buildFeaturedEventUrl(g,{kind:"destination",id:h,operator_id:f},v);return(0,r.jsxs)(i.xu,{borderRadius:"lg",border:"1px solid",borderColor:"gray.100",shadow:"md",overflow:"hidden",children:[(null==c?void 0:c.url)&&(0,r.jsx)(i.xu,{position:"relative",width:"100%",height:"134px",children:(0,r.jsx)(o.Z,{src:c.url,alt:c.alt||u||"Event venue",layout:"fill",objectFit:"cover"})}),(0,r.jsxs)(i.xu,{padding:{base:4,tablet:6},children:[u&&(0,r.jsx)(a.X6,{as:"h3",fontSize:{base:"lg",tablet:"xl"},marginBottom:4,children:u}),(0,r.jsx)(a.rj,{gap:3,marginBottom:4,children:n.map((e,t)=>(0,r.jsx)(a.P4,{colSpan:{base:12,tablet:6},display:t>=3?{base:"none",tablet:"block"}:void 0,children:(0,r.jsx)(FeaturedEventItem,{event:e,eventUrl:buildFeaturedEventUrl(g,{kind:"event",id:e.id,operator_id:null!=f?f:null},v)})},e.id))}),(0,r.jsx)(l.k,{justifyContent:"center",children:(0,r.jsx)(a.zx,{as:s.r,href:p,"aria-label":u?"View all events for ".concat(u):"View all events",children:"View All Events"})})]})]})},v={SECTION_VERTICAL:{base:8,tablet:16},CARD_GAP:{base:6,tablet:8}},FeaturedEvents=e=>{let{slice:t,featuredEventsData:n={}}=e,{items:s}=t;if(!(null==s?void 0:s.length))return null;let o=s.slice(0,4).map((e,t)=>{let r=e.destination_id?n[e.destination_id]:void 0;return{item:e,destinationData:r,originalIndex:t}}).filter(e=>{let{item:t,destinationData:n}=e;return(null==n?void 0:n.events)&&n.events.length>0&&t.destination_id});return 0===o.length?null:(0,r.jsx)(i.xu,{as:"section",id:"upcoming-events","data-testid":"UpcomingEvents",paddingTop:v.SECTION_VERTICAL,paddingBottom:v.SECTION_VERTICAL,children:(0,r.jsxs)(a.W2,{children:[(0,r.jsx)(a.X6,{as:"h2",fontSize:{base:"xl",tablet:"2xl"},marginBottom:v.CARD_GAP,children:"Upcoming Events"}),(0,r.jsx)(l.k,{direction:"column",gap:v.CARD_GAP,children:o.map(e=>{let{item:t,destinationData:n,originalIndex:a}=e;return(0,r.jsx)(i.xu,{display:a>=3?{base:"none",tablet:"block"}:void 0,children:(0,r.jsx)(FeaturedEventCard,{item:t,events:(null==n?void 0:n.events)||[],destinationTitle:(null==n?void 0:n.destinationTitle)||""})},t.destination_id||a)})})]})})};var g=n(68867),p=n(55338),b=n.n(p),x=n(36474),m=n(53617);let getById=async e=>{let{id:t,spotheroV1ApiUrl:n=x.spotheroV1ApiUrl}=e,r=new URL("".concat(n,"/destinations/").concat(t,"/"));r.searchParams.append("include","can_have_events,has_upcoming_events,destination,airport,spothero_city_slug");let i=await b()(r.href),a=await (0,m.L)(i).json();return a.data};var E=n(44195);let fetchDestinationData=async e=>{let[t,n]=await Promise.allSettled([(0,g.vw)({destinationId:e,numberOfEvents:4}),getById({id:String(e)}
1)]),r="fulfilled"===t.status?t.value:[],i="fulfilled"===n.status?n.value:null;return[e,{events:r,destinationTitle:(null==i?void 0:i.title)||""}]},fetchFeaturedEventsData=async e=>{let t=null==e?void 0:e.filter(e=>e.slice_type===E.N.FEATURED_EVENTS);if(!(null==t?void 0:t.length))return{};let n=new Set;for(let e of t)for(let t of e.items||[])t.destination_id&&n.add(t.destination_id);if(0===n.size)return{};let r=[...n].slice(0,4),i=await Promise.allSettled(r.map(fetchDestinationData)),a={};for(let e of i)if("fulfilled"===e.status){let[t,n]=e.value;a[t]=n}return a}},53617:function(e,t,n){"use strict";n.d(t,{L:function(){return okOrThrow}});let FetchError=class FetchError extends Error{constructor(e,t,n,r){super(r||"fetch failed. Status: ".concat(e,". Status Text: ").concat(t,". URL: ").concat(n)),this.name="FetchError",this.status=e,this.statusText=t,this.url=n}};function okOrThrow(e){if(!e.ok)throw new FetchError(e.status,e.statusText,e.url,"fetch failed. Something went wrong. Status: ".concat(e.status,". URL: ").concat(e.url));return e}},86709:function(e,t,n){"use strict";n.d(t,{I:function(){return urlWithParams}});let urlWithParams=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=new URL(e);return Object.entries(t).forEach(e=>{let[t,i]=e;n&&null==i||r.searchParams.append(t,String(i))}),r}},68867:function(e,t,n){"use strict";n.d(t,{C_:function(){return getSearchEvents},vw:function(){return getEvents}});var r=n(43678),i=n(86709),a=n(36474),l=n(53617),s=n(92783);let getEvents=async e=>{let{destinationId:t,spotheroV1ApiUrl:n=a.spotheroV1ApiUrl,starts:s=(0,r.ZP)().format(),numberOfEvents:o}=e,d=(0,i.I)("".concat(n,"/events/"),{destination_id:t,page_size:o||0,starts:s,include:"search_url"});try{let e=await fetch(d.href),t=await (0,l.L)(e).json(),n=Array.isArray(t.data.results)?t.data.results:[];return n}catch(e){return[]}},getSearchEvents=async e=>{let{searchTerm:t,craigUrl:n,limit:r,cityId:a=null}=e,o=(0,i.I)("".concat(n,"/events/search"),{search_query:t,limit:r,...a&&{city_id:a}});try{let e=await fetch(o.href),t=await (0,l.L)(e).json();return(null==t?void 0:t.results)||[]}catch(e){return(null==e?void 0:e.status)!==400&&(null==e?void 0:e.status)!==404&&s.Tb(e),[]}}},55338:function(){}}]);

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.