1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9538],{45098:function(e,t,n){"use strict";n.d(t,{Z:function(){return _}});var r=n(87462),a=n(63366),o=n(63390),l=n(4953),i=n(17172),s=n(86523);let u=["ownerState"],c=["variants"],y=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function f(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}function d(e,t){return t&&e&&"object"==typeof e&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}let p=(0,i.Z)(),m=e=>e?e.charAt(0).toLowerCase()+e.slice(1):e;function h({defaultTheme:e,theme:t,themeId:n}){return 0===Object.keys(t).length?e:t[n]||t}function v(e,t,n){let{ownerState:l}=t,i=(0,a.Z)(t,u),s="function"==typeof e?e((0,r.Z)({ownerState:l},i)):e;if(Array.isArray(s))return s.flatMap(e=>v(e,(0,r.Z)({ownerState:l},i),n));if(s&&"object"==typeof s&&Array.isArray(s.variants)){let{variants:e=[]}=s,t=(0,a.Z)(s,c);return e.forEach(e=>{let a=!0;if("function"==typeof e.props?a=e.props((0,r.Z)({ownerState:l},i,l)):Object.keys(e.props).forEach(t=>{(null==l?void 0:l[t])!==e.props[t]&&i[t]!==e.props[t]&&(a=!1)}),a){Array.isArray(t)||(t=[t]);let a="function"==typeof e.style?e.style((0,r.Z)({ownerState:l},i,l)):e.style;t.push(n?d((0,o.internal_serializeStyles)(a),n):a)}}),t}return n?d((0,o.internal_serializeStyles)(s),n):s}var _=function(e={}){let{themeId:t,defaultTheme:n=p,rootShouldForwardProp:i=f,slotShouldForwardProp:u=f}=e,c=e=>(0,s.Z)((0,r.Z)({},e,{theme:h((0,r.Z)({},e,{defaultTheme:n,themeId:t}))}));return c.__mui_systemSx=!0,(e,s={})=>{var d;let p;(0,o.internal_processStyles)(e,e=>e.filter(e=>!(null!=e&&e.__mui_systemSx)));let{name:_,slot:g,skipVariantsResolver:C,skipSx:x,overridesResolver:k=(d=m(g))?(e,t)=>t[d]:null}=s,w=(0,a.Z)(s,y),Z=_&&_.startsWith("Mui")||g?"components":"custom",b=void 0!==C?C:g&&"Root"!==g&&"root"!==g||!1,T=x||!1,D=f;"Root"===g||"root"===g?D=i:g?D=u:"string"==typeof e&&e.charCodeAt(0)>96&&(D=void 0);let S=(0,o.default)(e,(0,r.Z)({shouldForwardProp:D,label:p},w)),j=e=>"function"==typeof e&&e.__emotion_real!==e||(0,l.P)(e)?a=>{let o=h({theme:a.theme,defaultTheme:n,themeId:t});return v(e,(0,r.Z)({},a,{theme:o}),o.modularCssLayers?Z:void 0)}:e,A=(a,...o)=>{let l=j(a),i=o?o.map(j):[];_&&k&&i.push(e=>{let a=h((0,r.Z)({},e,{defaultTheme:n,themeId:t}));if(!a.components||!a.components[_]||!a.components[_].styleOverrides)return null;let o=a.components[_].styleOverrides,l={};return Object.entries(o).forEach(([t,n])=>{l[t]=v(n,(0,r.Z)({},e,{theme:a}),a.modularCssLayers?"theme":void 0)}),k(e,l)}),_&&!b&&i.push(e=>{var a;let o=h((0,r.Z)({},e,{defaultTheme:n,themeId:t}));return v({variants:null==o||null==(a=o.components)||null==(a=a[_])?void 0:a.variants},(0,r.Z)({},e,{theme:o}),o.modularCssLayers?"theme":void 0)}),T||i.push(c);let s=i.length-o.length;if(Array.isArray(a)&&s>0){let e=Array(s).fill("");(l=[...a,...e]).raw=[...a.raw,...e]}let u=S(l,...i);return e.muiName&&(u.muiName=e.muiName),u};return S.withConfig&&(A.withConfig=S.withConfig),A}}()},64284:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/map",function(){return n(32567)}])},32567:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSP:function(){return T}});var r=n(20567),a=n(14932),o=n(85893),l=n(67294),i=n(60990),s=n(84677),u=n(26541),c=n(6897),y=n(20646),f=n(58045),d=n(28577),p=n(96788),m=n(39828),h=n(75435),v=n(65664),_=n(79177),g=n(87528);let C=[{key:"near-me",label:"\uD83D\uDCCD Near Me"},{key:"long-island",label:"Long Island"},{key:"nyc",label:"NYC"},{key:"baltimore",label:"Baltimore"},{key:"annapolis",label:"Annapolis"},{key:"ocean-city",label:"Ocean City"}],x={"long-island":{center:[-73.34159238491179,40.79157345621614],zoom:10},nyc:{center:[-73.9876405037836,40.75064253774992],zoom:11},baltimore:{center:[-76.61643519845838,39.284640974192726],zoom:11},annapolis:{center:[-76.51525587650268,38.96772105330125],zoom:12},"ocean-city":{center:[-75.06422444816985,38.39010373711956],zoom:11}},k=["Any type","Music","Open mic","Karaoke","Trivia","Comedy","DJ","Games","Other"],w=e=>{let t=new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),5,0,0,0)),n=new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),28,59,59,999));return{startTimestamp:m.EK.fromDate(t),endTimestamp:m.EK.fromDate(n)}},Z=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new WeakSet;if(null==e||"object"!=typeof e)return e;if(t.has(e))return"[Circular]";if(t.add(e),Array.isArray(e))return e.map(e=>Z(e,t));if("function"==typeof e.toDate)return e.toDate().toISOString();if("latitude"in e&&"longitude"in e)return{latitude:e.latitude,longitude:e.longitude};let n={};for(let[r,a]of Object.entries(e))"function"==typeof a||r.startsWith("_")||(n[r]=Z(a,t));return n};function b(e){let{activeRegion:t,onRegionClick:n,selectedDate:r,onDateChange:a,selectedType:l,onTypeChange:p,onMyLocation:m}=e;return(0,o.jsxs)(i.Z,{sx:{display:"flex",flexWrap:"wrap",gap:1,alignItems:"center",px:2,py:1,borderBottom:"1px solid #e0e0e0",backgroundColor:"#fff"},children:[C.map(e=>(0,o.jsx)(s.Z,{variant:t===e.key?"contained":"outlined",size:"small",onClick:()=>n(e.key),sx:{textTransform:"none",borderRadius:"20px"},children:e.label},e.key)),(0,o.jsx)(u.Z,{size:"small",type:"date",value:r,onChange:e=>a(e.target.value),InputLabelProps:{shrink:!0},sx:{width:150}}),(0,o.jsxs)(c.Z,{size:"small",sx:{minWidth:130},children:[(0,o.jsx)(y.Z,{children:"Type"}
1),(0,o.jsx)(f.Z,{label:"Type",value:l,onChange:e=>p(e.target.value),children:k.map(e=>(0,o.jsx)(d.Z,{value:e,children:e},e))})]}),(0,o.jsx)(s.Z,{size:"small",variant:"text",onClick:m,sx:{textTransform:"none",whiteSpace:"nowrap"},children:"\uD83D\uDCCD My location"})]})}var T=!0;t.default=e=>{let{initialEvents:t,initialDate:n}=e,[s,u]=(0,l.useState)(n.split("T")[0]),[c,y]=(0,l.useState)(t),[f,d]=(0,l.useState)(!1),[C,k]=(0,l.useState)(null),[T,D]=(0,l.useState)("Any type"),S=(0,l.useRef)(null),j=(0,l.useRef)(null),A=(0,l.useMemo)(()=>"Any type"===T?c:c.filter(e=>(e.eventtype||"").toLowerCase()===T.toLowerCase()),[c,T]),z=(0,l.useMemo)(()=>A.map(e=>(0,a._)((0,r._)({},e),{description:e.eventdescription,address1:e.address,venue_city:e.city,VENUE_ZIP:e.zip,main_date:(0,_.BV)(e.main_date,"yyyy-MM-dd hh:mm:ss a")||e.main_date,link:"/venues?internalLink=".concat(e.venueInternalLink||e.venueId)})),[A]),E=async e=>{d(!0);let{startTimestamp:t,endTimestamp:n}=w(new Date(e)),a=(0,m.hJ)(h.db,"events"),o=(0,m.IO)(a,(0,m.ar)("main_date",">=",t),(0,m.ar)("main_date","<=",n),(0,m.Xo)("main_date","asc"));try{let e=await (0,m.PL)(o);y(e.docs.map(e=>(0,r._)({id:e.id},Z(e.data()))))}catch(e){console.error("Error fetching events:",e)}finally{d(!1)}};(0,l.useEffect)(()=>{E(s)},[s]);let L=async e=>{if(k(e),"near-me"===e){let e=await (0,g.xf)({forceGeo:!0});if(e){let t={center:[e.lon,e.lat],zoom:11};j.current=t,S.current&&S.current.flyTo(t)}}else x[e]&&(j.current=x[e],S.current&&S.current.flyTo(x[e]))},M=async()=>{let e=await (0,g.xf)({forceGeo:!0});if(e){let t={center:[e.lon,e.lat],zoom:12};j.current=t,S.current&&S.current.flyTo(t)}k("near-me")};return(0,o.jsxs)(i.Z,{sx:{p:0,m:0},children:[(0,o.jsx)(b,{activeRegion:C,onRegionClick:L,selectedDate:s,onDateChange:u,selectedType:T,onTypeChange:D,onMyLocation:M}),f?(0,o.jsx)(p.Z,{variant:"body1",sx:{textAlign:"center",py:4},children:"Loading events..."}):(0,o.jsx)(v.Z,{eventView:!0,resizable:!0,showDistance:!1,onMapReady:e=>{S.current=e,j.current&&e.on("load",()=>e.flyTo(j.current))},markers:z})]})}}},function(e){e.O(0,[2634,4642,9190,5664,2888,9774,179],function(){return e(e.s=64284)}),_N_E=e.O()}]); 2//# sourceMappingURL=map-cb4de98014d71dd8.js.map
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.