PageSourceSearch

https://www.usabmx.com/_next/static/chunks/8110-575b5219a515d5ab.js

js usabmx.com collected 2026-10-03 19:15:38 UTC 29,978 bytes, 10 lines download raw bytes

1try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="32a4b18b-14c1-4a09-88d9-97871b4c8193",e._sentryDebugIdIdentifier="sentry-dbid-32a4b18b-14c1-4a09-88d9-97871b4c8193")}catch(e){}"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8110],{4379:function(e,t,a){a.d(t,{J:function(){return i}});var l=a(85893);a(67294);let n=e=>(0,l.jsx)("svg",{width:e.width?e.width:12,height:e.height?e.height:10,viewBox:"0 0 12 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e.className?e.className:"fill-website-",...e,children:(0,l.jsx)("path",{d:"M4.07573 9.47768L0.175729 5.41518C-0.0585762 5.17111 -0.0585762 4.77538 0.175729 4.53129L1.02424 3.64741C1.25854 3.40331 1.63846 3.40331 1.87277 3.64741L4.49999 6.38408L10.1272 0.522406C10.3615 0.278339 10.7414 0.278339 10.9758 0.522406L11.8243 1.40629C12.0586 1.65036 12.0586 2.04609 11.8243 2.29018L4.92426 9.4777C4.68993 9.72177 4.31003 9.72177 4.07573 9.47768V9.47768Z"})});var s=a(62908);let i=({labelText:e,name:t,textColor:a,labelStyle:i,border:r,textStyle:o,isError:c,defaultChecked:x,onChange:d,onBlur:u,children:p,value:m,settermsandconditionCheckBox:h,borderColor:g,containerStyle:f,isHoverBg:b=!0,isDisabled:w,rightTickStyle:v,isRelative:k=!0,iconChildren:j,checked:C,isObtained:N=!1})=>(0,l.jsxs)("label",{className:`${k?"relative":""}  cursor-pointer ${w?"pointer-events-none":""} `,children:[(0,l.jsx)("input",{type:"checkbox",id:t,name:t,className:`peer absolute opacity-0 ${r&&r} `,onChange:e=>{d?.(e),h?.(e?.target?.checked)},onBlur:e=>{u?.(e)},defaultChecked:x,value:m,checked:C,disabled:w}),(0,l.jsxs)("p",{className:`${f&&f} 
2				 text-website-white ${a} min-h-[20px] pl-[26px] border-none  relative text-[16px] pt-1
3                before:top-[2px] before:left-[0] before:transition-all before:absolute before:inline-block before:bg-website-white before:h-[18px] before:w-[18px] before:border-[1px] 
4					${g?`before:${g}`:"before:border-website-darkBlue"}
5                 ${b&&"peer-checked:before:bg-website-lightBlue"} 
6                 ${c&&"before:border-website-red"} 
7                 ${w&&"before:border-website-onHoverBlue peer-checked:before:border-none peer-checked:before:bg-website-ultraLightBlue before:bg-website-ultraLightBlue text-website-ultraLightBlue"}
8				   			 ${N&&"before:!bg-website-ultraLightBlue before:!border-website-onHoverBlue"}
9				  peer-hover:before:bg-website-darkBlue peer-checked:before:border-website-lightBlue 
10				  ${i&&i} '> `,children:[e&&(0,l.jsx)("span",{className:(0,s.cn)(o,"font-montserrat font-medium"),children:e}),p]}),(0,l.jsx)("span",{className:`opacity-0 absolute left-[3px] top-[6px] peer-checked:opacity-[1] transition-all  ${v&&v}`,children:j||(0,l.jsx)(n,{className:"fill-website-white"})})]})},98110:function(e,t,a){a.d(t,{C:function(){return H},Z:function(){return J}});var l=a(85893),n=a(67294),s=a(11163),i=a(37054),r=a(40321),o=a(50612),c=a(31480);let x=({position:e,icon:t,iconWidth:a,iconHeight:l,title:s,zIndex:r,onClick:o})=>{let c=(0,i.YP)(),x=(0,n.useRef)(null),d=(0,n.useRef)(null),u=(0,n.useRef)(o),p=!!o,m=(0,n.useRef)({position:e,icon:t,iconWidth:a,iconHeight:l,title:s,zIndex:r,isClickable:p});return m.current={position:e,icon:t,iconWidth:a,iconHeight:l,title:s,zIndex:r,isClickable:p},(0,n.useEffect)(()=>{u.current=o},[o]),(0,n.useEffect)(()=>{if(!c)return;let e=m.current,t=new google.maps.marker.AdvancedMarkerElement({map:c,position:e.position,title:e.title||"",zIndex:e.zIndex,gmpClickable:e.isClickable}),a=document.createElement("img");a.alt="",a.src=e.icon,a.width=e.iconWidth,a.height=e.iconHeight,t.append(a);let l=()=>u.current?.();return t.addEventListener("gmp-click",l),x.current=t,d.current=a,()=>{t.removeEventListener("gmp-click",l),t.map=null,x.current=null,d.current=null}},[c]),(0,n.useEffect)(()=>{x.current&&(x.current.position=e)},[e.lat,e.lng]),(0,n.useEffect)(()=>{x.current&&(x.current.title=s||"")},[s]),(0,n.useEffect)(()=>{x.current&&(x.current.zIndex=r)},[r]),(0,n.useEffect)(()=>{x.current&&(x.current.gmpClickable=p)},[p]),(0,n.useEffect)(()=>{d.current&&(d.current.src=t,d.current.width=a,d.current.height=l)},[t,l,a]),null},d="places,geometry,marker".split(",");var u=a(25675),p=a.n(u),m=a(90168);let h=({url:e,onClick:t})=>(0,l.jsxs)("div",{className:"h-full w-full relative cursor-pointer",onClick:t,children:[(0,l.jsx)(p(),{src:e,alt:"Click to load map",fill:!0,className:"w-full h-full object-contain",priority:!0}),(0,l.jsx)("div",{style:{position:"absolute",inset:0,background:"rgba(0,0,0,0.35)",display:"flex",alignItems:"center",justifyContent:"center",color:"#fff",fontSize:18,fontWeight:500},children:"Click to load map"})]}),g=({mapProps:e,children:t,isActive:a=!1,onActivate:n})=>{if(!a){let{center:t,zoom:a=4}=e,s=(0,m.t)(Number(t.lat),Number(t.lng),!1,{zoom:a,width:600,height:600,maptype:"roadmap"});return(0,l.jsx)(h,{url:s,onClick:()=>{n?.()}})}return(0,l.jsx)(i.b6,{...e,mapContainerClassName:"w-full h-full",children:t})};var f=a(14926),b=a(4379),w=a(45336);let v=e=>(0,l.jsx)("svg",{width:"16",height:"17",viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.7797 14.333L12.6644 11.2177C12.5238 11.0771 12.3332 10.999 12.1332 10.999H11.6239C12.4863 9.89596 12.9987 8.50859 12.9987 6.99937C12.9987 3.40909 10.0896 0.5 6.49937 0.5C2.90909 0.5 0 3.40909 0 6.99937C0 10.5896 2.90909 13.4987 6.49937 13.4987C8.00859 13.4987 9.39596 12.9863 10.499 12.1239V12.6332C10.499 12.8332 10.5771 13.0238 10.7177 13.1644L13.833 16.2797C14.1267 16.5734 14.6017 16.5734 14.8923 16.2797L15.7766 15.3954C16.0703 15.1017 16.0703 14.6267 15.7797 14.333ZM6.49809 10.9992C4.28893 10.9992 2.49848 9.21189 2.49848 6.99961C2.49848 4.79045 4.2858 3 6.49809 3C8.70725 3 10.4977 4.78733 10.4977 6.99961C10.4977 9.20877 8.71037 10.9992 6.49809 10.9992Z",fill:"currentColor"})}),k=e=>(0,l.jsx)("svg",{width:"16",height:"17",viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 0.5C3.58172 0.5 0 4.08172 0 8.5C0 12.9183 3.58172 16.5 8 16.5C12.4183 16.5 16 12.9183 16 8.5C16 6.37827 15.1571 4.34344 13.6569 2.84315C12.1566 1.34285 10.1217 0.5 8 0.5ZM11.9203 10.6005C12.0715 10.7526 12.0715 10.9984 11.9203 11.1505L10.6503 12.4205C10.4981 12.5718 10.2524 12.5718 10.1003 12.4205L8.00026 10.3105L5.90026 12.4205C5.74813 12.5718 5.50238 12.5718 5.35026 12.4205L4.08026 11.1505C3.92898 10.9984 3.92898 10.7526 4.08026 10.6005L6.19026 8.50049L4.08026 6.40049C3.92898 6.24836 3.92898 6.00262 4.08026 5.85049L5.35026 4.57049C5.50238 4.41921 5.74813 4.41921 5.90026 4.57049L8.00026 6.69049L10.1003 4.58049C10.2524 4.42921 10.4981 4.42921 10.6503 4.58049L11.9303 5.85049C12.0815 6.00262 12.0815 6.24836 11.9303 6.40049L9.81026 8.50049L11.9203 10.6005Z",fill:"currentColor"})}),j=({debounce:e=300,requestOptions:t}={})=>
10{let[a,l]=(0,n.useState)(!1),[s,i]=(0,n.useState)(""),[r,o]=(0,n.useState)([]),c=(0,n.useRef)(0),x=(0,n.useRef)(!0),d=(0,n.useCallback)(()=>{c.current+=1,o([])},[]),u=(0,n.useCallback)((e,t=!0)=>{x.current=t,i(e),t&&e.trim()||d()},[d]);return(0,n.useEffect)(()=>{let e=!0;return(async()=>{if("undefined"!=typeof google)try{await google.maps.importLibrary("places"),e&&l(!0)}catch(t){e&&console.error("Failed to load the Google Maps Places library",t)}})(),()=>{e=!1}},[]),(0,n.useEffect)(()=>{let l=s.trim();if(!a||!x.current||!l)return;let n=++c.current,i=window.setTimeout(async()=>{try{let e=await google.maps.places.AutocompleteSuggestion.fetchAutocompleteSuggestions({...t,input:l});if(n!==c.current)return;let a=e.suggestions.reduce((e,t)=>{let a=t.placePrediction;return a&&e.push({description:a.text.toString(),placeId:a.placeId}),e},[]);o(a)}catch(e){n===c.current&&(console.error("Failed to fetch Google Maps place suggestions",e),o([]))}},e);return()=>{window.clearTimeout(i),n===c.current&&(c.current+=1)}},[e,a,t,s]),{ready:a,setValue:u,suggestions:{data:r},value:s}},C={includedRegionCodes:["us","ca"]},N=(e,t)=>e.find(e=>e.types.includes(t)),y=({location:e,onLocationChange:t,onChange:a,placeholder:s,clearButton:i=!1,placesAutocompleteArgs:r})=>{let{ready:o,value:c,setValue:x,suggestions:{data:d}}=j({requestOptions:C,...r}),u=(0,n.useRef)(void 0),p=i&&""!==c?(0,l.jsxs)("button",{type:"button",className:"text-website-wildBlueYonder",onClick:()=>{x("")},children:[(0,l.jsx)("span",{className:"sr-only",children:"Clear input"}),(0,l.jsx)(k,{})]}):null,m=(0,n.useCallback)(async e=>{x(e,!1);try{let{results:a}=await new google.maps.Geocoder().geocode({address:e,language:"en-US"}),l=a[0];if(!l)return;let n=N(l.address_components,"administrative_area_level_1"),s=N(l.address_components,"locality"),i=N(l.address_components,"postal_code");t?.(l.geometry.location.lat(),l.geometry.location.lng(),e,s?.long_name!==n?.long_name?s?.long_name:void 0,n?.long_name,n?.short_name,i?.short_name)}catch(e){console.error("Failed to geocode selected address",e)}},[t,x]);return(0,n.useEffect)(()=>{u.current!==e&&(u.current=e,e!==c&&(e?m(e):x("")))},[m,e,x,c]),(0,l.jsxs)(w.hQ,{onSelect:m,className:"mt-[10px] relative",children:[(0,l.jsx)(w.gA,{value:c,onChange:e=>{let t=e.target.value;x(t),a?.(t)},disabled:!o,className:"combobox-input rounded-sm border border-ultraLightBlue bg-website-white !px-9 w-full py-[14px] truncate font-montserrat font-medium text-[16px] leading-none text-website-darkBlue focus-visible:outline-none",placeholder:s}),p&&(0,l.jsx)("span",{className:"absolute w-4 h-4 leading-none right-[10px] top-1/2 transform -translate-y-1/2",children:p}),(0,l.jsx)("span",{className:"absolute w-4 h-4 left-[10px] xs:right-[10px] top-1/2 transform -translate-y-1/2 text-website-ultraLightBlue",children:(0,l.jsx)(v,{})}),(0,l.jsx)(w.SF,{children:d.length>0&&(0,l.jsx)(w.Gk,{className:"w-full relative bg-website-white max-h-[133px] overflow-y-scroll z-[10]",children:d.map(({placeId:e,description:t})=>(0,l.jsx)(w.O2,{value:t,className:"bg-website-white px-[14px] py-[14px] hover:bg-website-bdazzledBlue/[0.08] text-website-midBlack text-[16px] leading-[16px] text-website-midBalck"},e))})})]})};var L=a(24205),M=a(72498),B=a(41664),S=a.n(B),_=a(62908);let E=e=>(0,l.jsx)("svg",{width:"20",height:"30",viewBox:"0 0 20 30",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,l.jsx)("path",{d:"M1.84141 0.238145L0.277592 1.57939C-0.0925308 1.89684 -0.0925308 2.41158 0.277592 2.72911L14.5501 15L0.277592 27.2709C-0.0925308 27.5883 -0.0925308 28.1031 0.277592 28.4206L1.84141 29.7619C2.21154 30.0794 2.81166 30.0794 3.18187 29.7619L19.7224 15.5749C20.0925 15.2574 20.0925 14.7427 19.7224 14.4252L3.18187 0.238145C2.81166 -0.0793817 2.21154 -0.0793817 1.84141 0.238145Z",fill:"currentColor"})}),$=({id:e,name:t,address:a,link:n,logo:s,onTrackCard:i,distance:r,locationAllowed:o,geoIpLocation:c,showDistancesOnTrackCard:x,isShowArrow:d=!0,isSelected:u=!1,onTrackSelect:m})=>{let h=Number(r),g=Number.isFinite(h)&&h>=0;return(0,l.jsxs)("div",{className:(0,_.cn)("p-4 xxsMax:pt-5 xxsMax:px-[15px] flex justify-between gap-x-[15px] xxsMax:gap-x-[10px] bg-website-maastrichtDarkBlue smMax:bg-website-maastrichtDarkBlue border-2 border-transparent transition-colors",m&&"cursor-pointer",u&&"border-website-lightBlue"),role:m?"button":void 0,tabIndex:m?0:void 0,"aria-pressed":m?u:void 0,onClick:m,onKeyDown:e=>
10{m&&("Enter"===e.key||" "===e.key)&&(e.preventDefault(),m())},children:[(0,l.jsxs)("div",{className:"flex gap-x-[15px] xxsMax:gap-x-[10px] max-w-[calc(100%-35px)] xxsMax:max-w-[calc(100%-30px)] w-full",children:[(0,l.jsxs)("div",{className:"flex flex-col justify-center xxsMax:justify-start xxsMax:w-[48px]",children:[(0,l.jsx)("div",{className:(0,_.cn)("relative w-[67px] aspect-[67/54] mb-[14px] xxsMax:w-[57px] xxsMax:aspect-[57/46]",s&&"leading-[0]"),children:s?(0,l.jsx)(p(),{src:(0,_.Jn)(s),alt:"",width:67,height:54,className:"aspect-ratio-img"}):(0,l.jsx)("div",{className:"bg-website-aeroBlue w-full h-full flex items-center justify-center rounded",children:(0,l.jsx)("p",{className:"text-[12px] font-medium font-montserrat text-website-white text-center",children:"No logo"})})}),o&&c&&g&&(0,l.jsxs)("p",{className:"text-[11px] text-center font-bold font-montserrat leading-[11px] tracking-[0.2px] text-website-ultraLightBlue xxsMax:text-[10px] xxsMax:leading-[11px] break-words",children:[r," miles"]}),!c&&x&&(0,l.jsxs)("p",{className:"text-[11px] text-center font-bold font-montserrat leading-[11px] tracking-[0.2px] text-website-ultraLightBlue xxsMax:text-[10px] xxsMax:leading-[11px] break-words",children:[r," miles"]})]}),(0,l.jsxs)("div",{className:"flex flex-col gap-y-[5px] max-w-[calc(100%-82px)] xxsMax:max-w-[calc(100%-67px)]",children:[(0,l.jsx)("p",{className:"text-website-white font-montserrat font-semibold uppercase text-[18px] leading-[22px] xxsMax:text-[16px] xxsMax:leading-[20px]",children:t}),(0,l.jsx)("p",{className:"max-w-full truncate text-website-ultraLightBlue font-montserrat font-medium text-[16px] leading-[22px] xxsMax:text-[13px] xxsMax:leading-[20px]",children:a}),(0,l.jsx)(S(),{href:n,legacyBehavior:!0,children:(0,l.jsx)("a",{className:"text-website-lightBlue underline font-montserrat font-medium uppercase text-[14px] leading-[20px] xxsMax:text-[13px] xxsMax:leading-[20px] w-fit",target:"_blank",rel:"noreferrer noopener",onClick:e=>e.stopPropagation(),children:"Visit Website"})})]})]}),d&&(0,l.jsx)("button",{type:"button",className:"shrink-0 self-center cursor-pointer text-white",onClick:t=>{t.stopPropagation(),i?.(e)},children:(0,l.jsx)(E,{})})]})},I=({value:e,handleTrackCard:t,onTrackSelect:a,locationAllowed:n,geoIpLocationFound:s,showDistancesOnTrackCard:i,isShowArrow:r,isSelected:o})=>{let c=e.state_abbreviation||e.state||"",x=(0,_.IN)(c,e?.name),d=(0,_.FT)({country:e?.country,stateAbbreviation:c,trackName:e?.name}),u=e.website_url||d||(x?`/tracks/${x}`:"/tracks/find-tracks");return(0,l.jsx)($,{id:e?.id,name:e?.name,address:`${e.address_line_1} ${e.city}, ${e.state_abbreviation} ${e.postal_code}`,link:u,logo:e?.track_logo,onTrackCard:t,distance:Math.round(e?.calculated_distance),locationAllowed:n,geoIpLocation:s,showDistancesOnTrackCard:i,isShowArrow:r,isSelected:o,onTrackSelect:a&&e?()=>a(e):void 0})};var D=a(30771),T=a(91999);let P={enableHighAccuracy:!0,timeout:5e3,maximumAge:0},R=()=>{try{let e=sessionStorage.getItem(T._);return"accepted"===e||"declined"===e?e:null}catch{return null}},A=e=>{try{sessionStorage.setItem(T._,e)}catch{}},F=({onPositionChange:e}={})=>{let[t,a]=(0,n.useState)("checking"),[l,s]=(0,n.useState)(null),[i,r]=(0,n.useState)(null),[o,c]=(0,n.useState)(!1),x=(0,n.useCallback)(()=>{if(!navigator.geolocation){a("unavailable");return}a("requesting"),navigator.geolocation.getCurrentPosition(t=>{let l={lat:t.coords.latitude,lng:t.coords.longitude};s(l),a("ready"),e?.(l)},e=>{if(e.code===e.PERMISSION_DENIED){s(null),a("blocked");return}a("unavailable")},P)},[e]);(0,n.useEffect)(()=>{let e=!1;return(async()=>{if(!navigator.geolocation){a("unavailable");return}c(!0);let t=R();if(r(t),"declined"===t){a("idle");return}let l=null;if(navigator.permissions?.query)try{l=(await navigator.permissions.query({name:"geolocation"})).state}catch{}if(!e){if("denied"===l){a("blocked");return}if("granted"===l||"accepted"===t){r("accepted"),x();return}a("consent-required")}})(),()=>{e=!0}},[x]);let d=(0,n.useCallback)(()=>{A("accepted"),r("accepted"),x()},[x]),u=(0,n.useCallback)(()=>{A("declined"),r("declined"),s(null),a("idle")},[]),p=(0,n.useCallback)(()=>
10{if(o&&"blocked"!==t&&"checking"!==t&&"requesting"!==t){if("ready"===t||"accepted"===i){x();return}a("consent-required")}},[i,o,x,t]);return{status:t,position:l,isConsentModalOpen:"consent-required"===t,canLocate:o&&"blocked"!==t&&"checking"!==t&&"requesting"!==t,allowLocation:d,declineLocation:u,handleLocateMe:p}};var q=a(82407);let z={lat:37.09024,lng:-95.712891},O=e=>{if(!e.latitude?.trim()||!e.longitude?.trim())return!1;let t=Number(e.latitude),a=Number(e.longitude);return Number.isFinite(t)&&Number.isFinite(a)},Z=e=>{if(!e)return"";let t=[e.city,e.state_abbreviation||e.state].filter(Boolean).join(", ");return[e.address_line_1,t,e.postal_code].filter(Boolean).join(" ")},G=e=>{if(!e)return"";let t=e.state_abbreviation||e.state||"",a=(0,_.FT)({country:e.country,stateAbbreviation:t,trackName:e.name}),l=(0,_.IN)(t,e.name);return e.website_url||a||(l?`/tracks/${l}`:"")},H=({className:e,searchLabel:t="Search by City, State, postal code",searchPlaceholder:a="Search by Track Name"})=>{let{isLoaded:u}=(0,i.Db)({googleMapsApiKey:"AIzaSyCIZh63x3g11GC3P9vsdC0gqq0X12CYJdQ",libraries:d}),p=(0,r.I0)(),m=(0,n.useRef)(null),h=(0,s.useRouter)(),{query:w}=h,[v,k]=(0,n.useState)(null),[j,C]=(0,n.useState)(""),[N,B]=(0,n.useState)("string"==typeof w?.currentLocation?w.currentLocation:""),[S,E]=(0,n.useState)([]),[$,T]=(0,n.useState)([]),[P,R]=(0,n.useState)(1),[A,H]=(0,n.useState)(!1),[J,U]=(0,n.useState)(!1),[W,Y]=(0,n.use
10State)(200),[K,V]=(0,n.useState)([]),X=(0,D.ac)("(max-width: 991px)")?6:7,[Q,ee]=(0,n.useState)(!1),[et,ea]=(0,n.useState)(null),[el,en]=(0,n.useState)(null),[es,ei]=(0,n.useState)(!1),{status:er,position:eo,isConsentModalOpen:ec,canLocate:ex,allowLocation:ed,declineLocation:eu,handleLocateMe:ep}=F({onPositionChange:(0,n.useCallback)(e=>{k(e),C(""),Y(200),ei(!1),ea(null),en(null),R(1)},[])}),em=null!==eo,eh="checking"===er||"consent-required"===er||"requesting"===er,eg=(0,n.useMemo)(()=>$.filter(O),[$]),ef=eg.find(e=>e.id===et)??null,eb=ef?{lat:Number(ef.latitude),lng:Number(ef.longitude)}:null,ew=Z(ef),ev=G(ef),ek=v??z,ej=(0,n.useCallback)(e=>{let t=e??m.current?.getBounds();if(t){if(!eg.length){V([]);return}V(eg.filter(e=>t.contains({lat:Number(e.latitude),lng:Number(e.longitude)})))}},[eg]);(0,n.useEffect)(function(){m.current?.setZoom(X)},[ek,X]);let{isShowAllTrackLoading:eC}=(0,r.v9)(e=>e?.showTrack),{isFindTrackOnDenyButtonLoading:eN}=(0,r.v9)(e=>e?.findTrackOnDenyButton),ey=e=>{C(""),h.push({pathname:`/tracks/find-tracks/${e}`,query:{currentLocation:j}},`/tracks/find-tracks/${e}`)},eL=(e,t,a)=>{k({lat:e,lng:t}),C(a||""),U(!0),H(!1),ea(null),en(null),R(1),em||ei(!0)},eM=()=>{Q||ee(!0)},eB=e=>{e?.id&&(ea(e.id),en(e.id),eM())};(0,n.useEffect)(function(){!eh&&em&&(v||N)&&p((0,c.zC)({currentPageNumber:1,pageLimit:0,isIndoorRace:A,latitude:v?.lat,longitude:v?.lng,miles:W})).then(e=>{U(!0),E(e?.payload?.data),T(e?.payload?.data)})},[A,eh,em,N,v]),(0,n.useEffect)(function(){eh||em||(v?p((0,c.zC)({currentPageNumber:1,pageLimit:0,isIndoorRace:A,latitude:v.lat,longitude:v.lng,miles:W})).then(e=>{U(!0),E(e?.payload?.data),T(e?.payload?.data),ei(!0)}):p((0,o.FF)({currentPageNumber:1,pageLimit:0,isIndoorRace:A})).then(e=>{U(!0),E(e?.payload?.data),T(e?.payload?.data),ei(!1)}))},[A,eh,em,N,v]),(0,n.useEffect)(()=>{ej()},[ej]);let eS=!Q&&(em||es),e_=(0,n.useMemo)(()=>{let e=S??[];if(Q){let t=new Set(K.map(e=>e.id));return e.filter(e=>t.has(e?.id))}return eS?e.filter(e=>null!=e.calculated_distance&&e.calculated_distance<W):e},[W,S,Q,eS,K]),eE=e_.length,e$=Q?`${eE} tracks found in this map area`:`${eE} tracks found${eS?` within ${W} miles`:""}`,eI=function({results:e,requestedPageNumber:t,selectedResultId:a,resultsPerPage:l}){if(null!==a){let t=e.findIndex(e=>e.id===a);if(t>=0)return Math.floor(t/l)+1}return Math.min(Math.max(1,t),Math.max(1,Math.ceil(e.length/l)))}({results:e_,requestedPageNumber:P,selectedResultId:el,resultsPerPage:3}),eD=(0,n.useMemo)(()=>{let e=(eI-1)*3;return e_.slice(e,e+3)},[eI,e_]),eT=e=>{H(e?.target?.checked),ea(null),en(null),R(1)},eP=!eD.length&&!A;return(0,l.jsxs)("div",{className:(0,_.cn)("max-w-[1230px] pt-20 pb-[100px] px-[30px] smMax:p-0 smMax:pb-8 mx-auto w-full",e),children:[(0,l.jsxs)("div",{className:"w-full p-10 smMax:bg-website-darkBlue bg-website-darkBlue flex gap-x-7 smMax:flex-col smMax:px-[15px] smMax:pt-5 smMax:pb-[25px]",children:[(0,l.jsxs)("div",{className:"max-w-[calc(56.33%-14px)] w-full smMax:max-w-full",children:[(0,l.jsxs)("div",{className:"sm:hidden mb-[15px]",children:[(0,l.jsxs)("div",{className:"w-full mb-[15px]",children:[(0,l.jsx)("p",{className:"text-[14px] leading-[20px] text-website-brightGray font-EvelethRegular mb-[10px]",children:t}),u&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("p",{className:"uppercase text-[16px] leading-[22px] font-EvelethRegular mb-[10px] text-website-brightGray",children:"Search"}),(0,l.jsx)("div",{className:"w-full",children:(0,l.jsx)(y,{placeholder:a,clearButton:!0,location:N||j,onLocationChange:(e,t,a)=>{eL(e,t,a)}})})]})]}),(0,l.jsx)("div",{className:"mb-[25px]",children:(0,l.jsxs)("div",{className:"flex justify-between items-center gap-2",children:[(0,l.jsx)("div",{className:"checkbox",children:(0,l.jsx)(b.J,{labelText:"Search only indoor tracks",name:"indoor-mobile",textColor:"text-website-white font-montserrat font-medium text-[16px] leading-[16px]",checked:A,isDisabled:eP,onChange:eT})}),ex&&(0,l.jsxs)("button",{type:"button",className:"text-website-pictonBlue text-[14px] leading-[17px] underline font-montserrat font-medium flex icons-center gap-x-2 items-center",onClick:ep,children:[(0,l.jsx)("span",{children:(0,l.jsx)(q.D,{})}),"Locate me"]})]})}),J&&(0,l.jsx)("p",{className:"text-[14px] leading-[20px] text-website-brightGray font-montserrat font-medium",children:e$})]}),(0,l.jsx)("div",{className:"find-track-map w-full h-[600px] smMax:h-[450px] xxsMax:h-[345px]",children:u&&S?(0,l.jsxs)(g,{isActive:Q,onActivate:eM,mapProps:{zoom:X,center:ek,clickableIcons:!1,options:{mapId:"DEMO_MAP_ID"},onLoad:e=>{m.current=e},onUnmount:()=>{m.current=null},onIdle:()=>{let e=m.current,t=e?.getBounds(),a=t?.getCenter(),l=t?.getNorthEast();e&&t&&a&&l&&(E($),Y(Math.round(google.maps.geometry.spherical.computeDistanceBetween(a,l)/1e3*.621371)),ej(t))},onDragStart:()=>{C(""),B("")}},children:[Q&&eg.map((e,t)=>(0,l.jsx)(x,{position:{lat:Number(e?.latitude),lng:Number(e.longitude)}
10,icon:"/images/track-details/circle.svg",iconWidth:15,iconHeight:16,title:e?.name,zIndex:ef?.id===e.id?2:1,onClick:()=>eB(e)},e.id||`marker-${t}`)),Q&&eb&&(0,l.jsx)(i.kp,{position:eb,onCloseClick:()=>{R(eI),ea(null),en(null)},children:(0,l.jsxs)("div",{className:"min-w-[210px] max-w-[250px] overflow-hidden rounded-[6px] bg-white font-montserrat shadow-[0_10px_30px_rgba(0,22,48,0.22)]",children:[(0,l.jsxs)("div",{className:"bg-website-darkBlue px-3 py-2 pr-9",children:[(0,l.jsxs)("p",{className:"text-[10px] leading-[14px] font-bold uppercase tracking-[0.3px] text-website-lightBlue",children:["Track #",ef?.xref_track_number||ef?.id]}),(0,l.jsx)("p",{className:"mt-[2px] text-[15px] leading-[18px] font-bold uppercase text-white",children:ef?.name})]}),(0,l.jsxs)("div",{className:"px-3 py-2",children:[ew&&(0,l.jsx)("p",{className:"text-[12px] leading-[16px] font-medium text-website-darkBlue/80",children:ew}),ev&&(0,l.jsx)("a",{className:"mt-2 inline-flex text-[11px] leading-[14px] font-bold uppercase text-website-lightBlue underline",href:ev,target:"_blank",rel:"noreferrer noopener",children:"Visit website"})]})]})})]}):(0,l.jsx)("div",{className:"flex justify-center items-center h-full",children:(0,l.jsx)(f.aN,{text:"Loading...",className:"font-semibold flex-row text-website-white"})})})]}),(0,l.jsxs)("div",{className:"smMax:max-w-full w-full max-w-[calc(43.67%-14px)]",children:[(0,l.jsxs)("div",{className:"w-full",children:[(0,l.jsxs)("div",{className:"w-full smMax:hidden",children:[(0,l.jsx)("p",{className:"text-[18px] leading-[20px] tracking-[0.8px] text-website-brightGray font-EvelethRegular",children:t}),u&&(0,l.jsx)("div",{className:"mb-[20px] xs:m-0 relative xsMax:w-full",children:(0,l.jsx)(y,{placeholder:a,clearButton:!0,location:N||j,onLocationChange:(e,t,a)=>{eL(e,t,a)}})})]}),(0,l.jsx)("div",{className:"mt-[20px] xsMax:hidden",children:(0,l.jsxs)("div",{className:"flex justify-between",children:[(0,l.jsx)("div",{className:"checkbox",children:(0,l.jsx)(b.J,{labelText:"Search only indoor tracks",name:"indoor-desktop",textColor:"text-website-white font-montserrat font-medium text-[16px] leading-[16px]",checked:A,isDisabled:eP,onChange:eT})}),ex&&(0,l.jsxs)("button",{type:"button",className:"text-website-pictonBlue underline font-medium font-montserrat leading-5 flex icons-center gap-x-2",onClick:ep,children:[(0,l.jsx)("span",{children:(0,l.jsx)(q.D,{})}),"Locate me"]})]})})]}),eC||eN?(0,l.jsx)("div",{className:"flex justify-center mt-10",children:(0,l.jsx)(f.aN,{text:"Loading...",className:"font-semibold flex-row text-website-white"})}):eD?.length?(0,l.jsxs)("div",{className:"max-w-full mt-[7px] xsMax:mt-[23px] w-full",children:[J&&(0,l.jsx)("p",{className:"text-[14px] leading-[20px] text-website-brightGray font-montserrat font-medium mt-[20px] smMax:hidden",children:e$}),(0,l.jsx)("div",{className:"mt-[15px]",children:(0,l.jsx)("div",{className:"flex flex-col gap-y-[10px]",children:eD.map((e,t)=>(0,l.jsx)(I,{value:e,handleTrackCard:ey,onTrackSelect:eB,locationAllowed:em,geoIpLocationFound:em,showDistancesOnTrackCard:es,isSelected:ef?.id===e.id},e.id||`track-${t}`))})}),eE>3&&(0,l.jsx)("div",{className:"flex justify-center w-full mt-[20px]",children:(0,l.jsx)(M.R,{itemsPerPage:3,totalDataCount:eE,setCurrentPageNumber:e=>{en(null),R(e)},currentPageNumber:eI,arrowColor:"fill-website-ultraLightBlue"})})]}):J?(0,l.jsx)("p",{className:"text-website-white text-center mt-14 font-semibold uppercase font-EvelethRegular",children:"No Tracks Found"}):null]})]}),(0,l.jsx)(f.u_,{isOpen:ec,onOpenChange:e=>{e||eu()},id:"accessLocationFindTrack",ariaLabelledBy:"access-location-find-track-title",ariaDescribedBy:"access-location-find-track-description",dialogClassName:"p-4",shouldLightDismiss:!1,unmountWhenClosed:!0,children:(0,l.jsxs)("div",{className:"relative max-w-[450px] w-full flex flex-col justify-center items-center rounded-[5px] bg-website-white p-[30px] xsMax:pt-5 xsMax:px-[15px] xsMax:pb-[15px] xsMax:max-w-[315px] shadow-modal-shadow",children:[(0,l.jsx)("p",{id:"access-location-find-track-title",className:"text-[22px] xsMax:text-[18px] xsMax:leading-[24px] leading-[30px] uppercase text-website-darkBlue font-EvelethRegular text-center mb-4",children:"ACCESS TO YOUR LOCATION"}),(0,l.jsx)("p",{id:"access-location-find-track-description",className:"text-[16px] leading-[20px] text-website-darkBlue text-center mb-5 font-montserrat font-medium xsMax:text-[14px] xsMax:leading-[17px]",children:"To improve your browsing experience, we use your current location to display the USABMX Tracks and Events closest to you. Allow USABMX to access your location?"}),(0,l.jsx)("div",{className:"w-full mb-2.5",children:(0,l.jsx)(L.K,{buttonText:"Allow",background:"bg-website-lightBlue",textColor:"text-white",textSize:"text-[14px] !leading-[20px]",classname:"w-full hover:xs:opacity-75 transition-opacity rounded-sm",onClick:ed})}),(0,l.jsx)("div",{className:"w-full",children:(0,l.jsx)(L.K,{buttonText:"close",background:"bg-website-brightGray",textColor:"text-website-darkBlue ",textSize:"text-[14px] !leading-[20px]",classname:"w-full hover:xs:opacity-75 transition-opacity rounded-sm",onClick:eu})})]})})]})};var J=H},72498:function(e,t,a){a.d(t,{R:function(){return c}});var l=a(85893),n=a(11358),s=a.n(n),i=a(3248),r=a(94695),o=a(62908);let c=({itemsPerPage:e,totalDataCount:t,setCurrentPageNumber:a,currentPageNumber:n,textStyle:c,activeLinkClassName:x,arrowColor:d="fill-website-white",arrowColorRight:u,arrowColorLeft:p})=>(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(s(),{breakLabel:"...",nextLabel:(0,l.jsx)(r.E,{color:u||d}),previousLabel:(0,l.jsx)(i.g,{color:p||d}),onPageChange:e=>a(e.selected+1),pageRangeDisplayed:5,pageCount:Math.ceil(t/e),renderOnZeroPageCount:null,className:(0,o.cn)("mr-[10px] last:mr-0 flex text-center leading-[28px] text-website-white  items-center",c),pageLinkClassName:"text-[16px] leading-[32px] mx-[5px] font-montserrat font-medium inline-block h-[30px] min-w-[30px] xsMax:h-[25px] xsMax:min-w-[25px] xsMax:leading-[26.5px]",activeLinkClassName:(0,o.cn)("bg-website-lightBlue rounded-[100px]",x),marginPagesDisplayed:1,previousLinkClassName:"mt-[10px]",forcePage:n-1})})},3248:function(e,t,a){a.d(t,{g:function(){return n}});var l=a(85893);let n=({color:e})=>
10(0,l.jsx)("svg",{width:"8",height:"12",viewBox:"0 0 8 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M0.86278 6.39807L5.72153 10.9529C5.95578 11.1725 6.33578 11.1725 6.57003 10.9529L7.13678 10.4216C7.37078 10.2022 7.37103 9.8469 7.13778 9.62706L3.28703 6.00034L7.13753 2.37338C7.37103 2.15354 7.37053 1.79823 7.13653 1.57885L6.56978 1.04752C6.33553 0.827913 5.95553 0.827913 5.72128 1.04752L0.86278 5.6026C0.62853 5.82221 0.62853 6.17846 0.86278 6.39807Z",className:`${e||"fill-website-ultraLightBlue"}`})})},94695:function(e,t,a){a.d(t,{E:function(){return n}});var l=a(85893);let n=({color:e})=>(0,l.jsx)("svg",{width:"8",height:"12",viewBox:"0 0 8 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M7.13681 5.60236L2.27806 1.04752C2.04381 0.82791 1.66381 0.82791 1.42956 1.04752L0.862813 1.57885C0.628813 1.79822 0.628563 2.15354 0.861813 2.37338L4.71256 6.0001L0.862062 9.62705C0.628562 9.84689 0.629062 10.2022 0.863062 10.4216L1.42981 10.9529C1.66406 11.1725 2.04406 11.1725 2.27831 10.9529L7.13681 6.39783C7.37106 6.17822 7.37106 5.82197 7.13681 5.60236Z",className:`${e||"fill-website-ultraLightBlue"}`})})},91999:function(e,t,a){a.d(t,{F:function(){return l},_:function(){return n}});let l="passwordChanged",n="findTrackLocationConsent"},90168:function(e,t,a){a.d(t,{t:function(){return l}});let l=(e,t,a=!1,{zoom:l=10,width:n=520,height:s=390,maptype:i="roadmap"}={})=>{let r=`${n}x${s}`,o={center:`${e},${t}`,zoom:String(l),size:r,scale:"2",maptype:i,key:"AIzaSyCIZh63x3g11GC3P9vsdC0gqq0X12CYJdQ"};return a&&(o.markers=`${e},${t}`),`https://maps.googleapis.com/maps/api/staticmap?${new URLSearchParams(o).toString()}`}}}]);

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.