1"use strict";(self.webpackChunkPylot_Frontend=self.webpackChunkPylot_Frontend||[]).push([[2964],{2964:(e,t,n)=>{n.r(t),n.d(t,{default:()=>_});var o=n(64467),i=n(10467),r=n(80296),l=n(54756),a=n.n(l),s=n(96540),c=n(52376),d=n(65848),u=n(111),h=n(54869),p=n(47767),g=n(15474),m=n(94518),f=n(60078),v=n(63419);function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){(0,o.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var w=function(e){var t,n,o,i,r,l,a,d,u,h,p,g,m,f,y,b,w,_,E=e.index,k=e.location,S=e.locationData,I=e.settings,L=!!S&&(null==S||null===(t=S.mvk_item_content)||void 0===t?void 0:t.custom_fields),O="".concat(null!=L&&null!==(n=L.address_info)&&void 0!==n&&n.address_line_1?"".concat(null==L||null===(o=L.address_info)||void 0===o?void 0:o.address_line_1,","):"").concat(null!=L&&null!==(i=L.address_info)&&void 0!==i&&i.address_line_2?" ".concat(null==L||null===(r=L.address_info)||void 0===r?void 0:r.address_line_2,","):""),C="".concat(null!=L&&null!==(l=L.address_info)&&void 0!==l&&l.city?"".concat(null==L||null===(a=L.address_info)||void 0===a?void 0:a.city,", "):""," ").concat(null==L||null===(d=L.address_info)||void 0===d?void 0:d.state_province," ").concat(null==L||null===(u=L.address_info)||void 0===u?void 0:u.postal_code_zip),P="https://www.google.com/maps/place/".concat(null==L||null===(h=L.address_info)||void 0===h?void 0:h.address_line_1.replace(/ /g,"+"),"+").concat(null==L||null===(p=L.address_info)||void 0===p?void 0:p.city.replace(/ /g,"+"),"+").concat(null==L||null===(g=L.address_info)||void 0===g?void 0:g.state_province.replace(/ /g,"+"),"+").concat(null==L||null===(m=L.address_info)||void 0===m?void 0:m.postal_code_zip.replace(/ /g,"+")),j=!(null==L||null===(f=L.contact_info)||void 0===f||!f.phone)&&(null==L||null===(y=L.contact_info)||void 0===y?void 0:y.phone),A=k.external_link?"_blank":null;return s.createElement(v.Fu,{className:"info-window"},s.createElement("div",{className:"content-wrapper"},s.createElement("h6",{className:"title"},(0,c.decode)(k.name)),s.createElement("a",{className:"address",href:P,target:"_blank","aria-label":"directions to ".concat((0,c.decode)(k.name))},O,O?s.createElement("br",null):"",C),s.createElement("a",{className:"phone",href:"tel:".concat(j)},j),(null==k?void 0:k.distance)&&s.createElement("p",{className:"distance-hours"},(Math.round(100*parseFloat(null==k?void 0:k.distance))/100).toFixed(1)," miles away"),(null==S?void 0:S.todays_hours)&&s.createElement("p",{className:"todays-hours"},null!=S&&null!==(b=S.todays_hours)&&void 0!==b&&b.closed?null==S||null===(w=S.todays_hours)||void 0===w?void 0:w.closed:"Open today: ".concat(null==S?void 0:S.todays_hours.start_time," - ").concat(null==S?void 0:S.todays_hours.end_time)),s.createElement("a",{id:"info-window-".concat(E),target:A,className:"location-link white-txt primary-bg",href:k.url},null==I||null===(_=I.locations)||void 0===_?void 0:_.select_location_button_text)))};const _=function(e){var t,n=e.focused,o=e.locations,l=e.origin,y=e.handleBoundsChange,_=(0,s.useContext)(m.lj),E=(0,r.A)(_,2),k=E[0],S=(E[1],(0,s.useContext)(m.Mc)),I=(0,r.A)(S,1)[0],L=(0,s.useState)(Math.floor(1e4*Math.random())),O=(0,r.A)(L,1)[0],C=(0,s.useContext)(f.Q),P=(0,r.A)(C,2),j=P[0],A=P[1],x=(0,s.useState)(o),F=(0,r.A)(x,2),N=F[0],R=F[1],M=(0,s.useState)(null),D=(0,r.A)(M,2),$=D[0],U=D[1],B=(0,s.useState)(null),K=(0,r.A)(B,2),T=K[0],Z=K[1],G=(0,s.useState)([]),z=(0,r.A)(G,2),J=z[0],H=z[1],W=(0,s.useState)(!1),q=(0,r.A)(W,2),Q=q[0],V=q[1],X=(0,p.Zp)();return(0,s.useEffect)((function(){y&&y(N)}),[N]),(0,s.useEffect)((function(){var e=(0,g.Z)();if(!Q&&(j.gak||e)){var t=j.gak||e,r=new h.aH({apiKey:t,version:"weekly"});V(r)}Q&&Q.load().then((0,i.A)(a().mark((function e(){var t,i,r,h,p,g,m,f,v,y,_,E,S,L,C,P,x;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,google.maps.importLibrary("maps");case 2:return m=e.sent,f=m.Map,v=m.InfoWindow,e.next=7,google.maps.importLibrary("marker");case 7:y=e.sent,_=y.AdvancedMarkerElement,E=T||new v({content:""}),S=function(e,t,n,o){var i=d.renderToString(s.createElement(w,{index:e,location:o,locationData:I[o.slug],settings:k}));E.setContent(i),E.open(t,n)},L=document.getElementById("map-".concat(O)),(C=$||!!L&&new f(L,{center:{lat:null!=j&&null!==(t=j.userLocation)&&void 0!==t&&t.latitude?parseFloat(null==j||null===(i=j.userLocation)||void 0===i?void 0:i.latitude):-34.397,lng:null!=j&&null!==(r=j.userLocation)&&void 0!==r&&r.longitude?parseFloat(null==j||null===(h=j.userLocation)||void 0===h?void 0:h.longitude):150.644},zoom:15,mapId:null!=k&&null!==(p=k.locations)&&void 0!==p&&p.map_id?null==k||null===(g=k.locations)||void 0===g?void 0:g.map_id:O.toString(),streetViewControl:!1,mapTypeControl:!1,fullscreenControl:!1}))&&(J.forEach((function(e){return null==e?void 0:e.setMap(null)})),H([]),P=new google.maps.LatLngBounds,x=null==o?void 0:o.map((function(e,t){var o,i=!(null==e||!e.lat)&&parseFloat(null==e?void 0:e.lat),r=!(null==e||!e.lng)&&parseFloat(null==e?void 0:e.lng);if(!i||!r)return null;var a=(0,c.decode)(e.name),s=new URL(e.url).pathname,d=null!=k&&null!==(o=k.locations)&&void 0!==o&&o.map_icon?document.createElement("img"):null;d&&(d.src="https://".concat(config.domain).concat(k.locations.map_icon.url));var u={position:{lat:i,lng:r},map:C,title:a,id:e.slug};d&&(u.content=d);var h=new _(u);return"map-module"===l&&(null!=j&&j.searchCoords?(C.setCenter(new google.maps.LatLng(parseFloat(null==j?void 0:j.searchCoords.latitude),parseFloat(null==j?void 0:j.searchCoords.longitude))),C.setZoom(9)):P.extend(new google.maps.LatLng(i,r)),google.maps.event.addListener(E,"domready",(function(){var e=document.getElementById("info-window-".concat(t));e&&(e.onclick=function(t){e.target||(t.preventDefault(),X(s))})}))),l&&h.addListener("click",(function(){A(b(b({},j),{focused:e.slug,searchCoords:null})),"map-module"===l&&S(t,C,h,e)})),n&&e.slug===n&&(l&&"location-selector"!==l||!i||!r||(C.setCenter(new google.maps.LatLng(i,r)),C.setZoom(15)),"map-module"===l&&S(t,C,h,e)),h})),H(x),"map-module"===l&&o&&$&&google.maps.event.addListener(C,"bounds_changed",(function(){R(o.filter((function(e){var t=!(null==e||!e.lat)&&parseFloat(null==e?void 0:e.lat),n=!(null==e||!e.lng)&&parseFloat(null==e?void 0:e.lng);return C.getBounds().contains({lat:t,lng:n})})))})),"map-module"!==l||$||C.fitBounds(P),$||U(C),T||Z(E),"location-selector"===l&&new u.w1({newMarkers:x,map:C}));case 14:case"end":return e.stop()}}),e)})))).catch((function(e){console.log(e)}))}),[Q,null==j?void 0:j.gak,n,o,null==j?void 0:j.userLocation,null==j?void 0:j.searchCoords]),s.createElement(s.Suspense,{fallback:s.createElement("div",null)},s.createElement(v.W6,{className:"map-container",primaryColor:null==k||null===(t=k.design.colors)||void 0===t?void 0:t.primary_color},s.createElement("div",{id:"map-".concat(O),className:"google-map"})))}},54869:(e,t,n)=>
1{function o(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}n.d(t,{aH:()=>a}),"function"==typeof SuppressedError&&SuppressedError;var i=o((function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var o,i,r;if(Array.isArray(t)){if((o=t.length)!=n.length)return!1;for(i=o;0!=i--;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((o=(r=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(i=o;0!=i--;)if(!Object.prototype.hasOwnProperty.call(n,r[i]))return!1;for(i=o;0!=i--;){var l=r[i];if(!e(t[l],n[l]))return!1}return!0}return t!=t&&n!=n}));const r="__googleMapsScriptId";var l;!function(e){e[e.INITIALIZED=0]="INITIALIZED",e[e.LOADING=1]="LOADING",e[e.SUCCESS=2]="SUCCESS",e[e.FAILURE=3]="FAILURE"}(l||(l={}));class a{constructor({apiKey:e,authReferrerPolicy:t,channel:n,client:o,id:l=r,language:s,libraries:c=[],mapIds:d,nonce:u,region:h,retries:p=3,url:g="https://maps.googleapis.com/maps/api/js",version:m}){if(this.callbacks=[],this.done=!1,this.loading=!1,this.errors=[],this.apiKey=e,this.authReferrerPolicy=t,this.channel=n,this.client=o,this.id=l||r,this.language=s,this.libraries=c,this.mapIds=d,this.nonce=u,this.region=h,this.retries=p,this.url=g,this.version=m,a.instance){if(!i(this.options,a.instance.options))throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(a.instance.options)}`);return a.instance}a.instance=this}get options(){return{version:this.version,apiKey:this.apiKey,channel:this.channel,client:this.client,id:this.id,libraries:this.libraries,language:this.language,region:this.region,mapIds:this.mapIds,nonce:this.nonce,url:this.url,authReferrerPolicy:this.authReferrerPolicy}}get status(){return this.errors.length?l.FAILURE:this.done?l.SUCCESS:this.loading?l.LOADING:l.INITIALIZED}get failed(){return this.done&&!this.loading&&this.errors.length>=this.retries+1}createUrl(){let e=this.url;return e+="?callback=__googleMapsCallback&loading=async",this.apiKey&&(e+=`&key=${this.apiKey}`),this.channel&&(e+=`&channel=${this.channel}`),this.client&&(e+=`&client=${this.client}`),this.libraries.length>0&&(e+=`&libraries=${this.libraries.join(",")}`),this.language&&(e+=`&language=${this.language}`),this.region&&(e+=`®ion=${this.region}`),this.version&&(e+=`&v=${this.version}`),this.mapIds&&(e+=`&map_ids=${this.mapIds.join(",")}`),this.authReferrerPolicy&&(e+=`&auth_referrer_policy=${this.authReferrerPolicy}`),e}deleteScript(){const e=document.getElementById(this.id);e&&e.remove()}load(){return this.loadPromise()}loadPromise(){return new Promise(((e,t)=>{this.loadCallback((n=>{n?t(n.error):e(window.google)}))}))}importLibrary(e){return this.execute(),google.maps.importLibrary(e)}loadCallback(e){this.callbacks.push(e),this.execute()}setScript(){var e,t;if(document.getElementById(this.id))return void this.callback();const n={key:this.apiKey,channel:this.channel,client:this.client,libraries:this.libraries.length&&this.libraries,v:this.version,mapIds:this.mapIds,language:this.language,region:this.region,authReferrerPolicy:this.authReferrerPolicy};Object.keys(n).forEach((e=>!n[e]&&delete n[e])),(null===(t=null===(e=null===window||void 0===window?void 0:window.google)||void 0===e?void 0:e.maps)||void 0===t?void 0:t.importLibrary)||(e=>{let t,n,o,i="The Google Maps JavaScript API",r="google",l="importLibrary",a="__ib__",s=document,c=window;c=c[r]||(c[r]={});const d=c.maps||(c.maps={}),u=new Set,h=new URLSearchParams,p=()=>t||(t=new Promise(((l,c)=>{return p=this,g=void 0,f=function*(){var p;for(o in yield n=s.createElement("script"),n.id=this.id,h.set("libraries",[...u]+""),e)h.set(o.replace(/[A-Z]/g,(e=>"_"+e[0].toLowerCase())),e[o]);h.set("callback",r+".maps."+a),n.src=this.url+"?"+h,d[a]=l,n.onerror=()=>t=c(Error(i+" could not load.")),n.nonce=this.nonce||(null===(p=s.querySelector("script[n
1once]"))||void 0===p?void 0:p.nonce)||"",s.head.append(n)},new((m=void 0)||(m=Promise))((function(e,t){function n(e){try{i(f.next(e))}catch(e){t(e)}}function o(e){try{i(f.throw(e))}catch(e){t(e)}}function i(t){var i;t.done?e(t.value):(i=t.value,i instanceof m?i:new m((function(e){e(i)}))).then(n,o)}i((f=f.apply(p,g||[])).next())}));var p,g,m,f})));d[l]?console.warn(i+" only loads once. Ignoring:",e):d[l]=(e,...t)=>u.add(e)&&p().then((()=>d[l](e,...t)))})(n);const o=this.libraries.map((e=>this.importLibrary(e)));o.length||o.push(this.importLibrary("core")),Promise.all(o).then((()=>this.callback()),(e=>{const t=new ErrorEvent("error",{error:e});this.loadErrorCallback(t)}))}reset(){this.deleteScript(),this.done=!1,this.loading=!1,this.errors=[],this.onerrorEvent=null}resetIfRetryingFailed(){this.failed&&this.reset()}loadErrorCallback(e){if(this.errors.push(e),this.errors.length<=this.retries){const e=this.errors.length*Math.pow(2,this.errors.length);console.error(`Failed to load Google Maps script, retrying in ${e} ms.`),setTimeout((()=>{this.deleteScript(),this.setScript()}),e)}else this.onerrorEvent=e,this.callback()}callback(){this.done=!0,this.loading=!1,this.callbacks.forEach((e=>{e(this.onerrorEvent)})),this.callbacks=[]}execute(){if(this.resetIfRetryingFailed(),!this.loading)if(this.done)this.callback();else{if(window.google&&window.google.maps&&window.google.maps.version)return console.warn("Google Maps already loaded outside @googlemaps/js-api-loader. This may result in undesirable behavior as options and script parameters may not match."),void this.callback();this.loading=!0,this.setScript()}}}}}]); 2//# sourceMappingURL=0712b90c03f0652e1f22.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.