PageSourceSearch

https://www.wispa.org/dist/3027e3356804f9a1cd7e.js

js wispa.org collected 2026-10-02 10:33:48 UTC 6,451 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkPylot_Frontend=self.webpackChunkPylot_Frontend||[]).push([[4268],{94268:(e,o,t)=>{t.r(o),t.d(o,{default:()=>O});var l=t(64467),n=t(10467),a=t(80296),r=t(54756),c=t.n(r),i=t(96540),u=t(85914),s=t.n(u),d=t(71083),v=t(20982),m=t(66188),g=t(76564),f=t(28610),p=t(54048),h=t(23734),b=t(32573),y=t(94518),S=t(60078),_=t(63419);function E(e,o){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);o&&(l=l.filter((function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),t.push.apply(t,l)}return t}function k(e){for(var o=1;o<arguments.length;o++){var t=null!=arguments[o]?arguments[o]:{};o%2?E(Object(t),!0).forEach((function(o){(0,l.A)(e,o,t[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):E(Object(t)).forEach((function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(t,o))}))}return e}const O=function(e){var o,t,l,r,u,E,O,C=e.locations,L=e.origin,j=(0,i.useContext)(y.lj),w=(0,a.A)(j,2),N=w[0],P=(w[1],(0,i.useContext)(S.Q)),A=(0,a.A)(P,2),U=A[0],x=A[1],D=(0,i.useState)(!1),G=(0,a.A)(D,2),z=G[0],J=G[1],M=(0,i.useState)(!1),R=(0,a.A)(M,2),I=R[0],Q=R[1],F=(0,i.useState)(null),T=(0,a.A)(F,2),Z=T[0],V=T[1],q=(0,i.useState)(Math.floor(1e4*Math.random())),B=(0,a.A)(q,1)[0];(0,i.useEffect)((function(){var e=(0,h.r)("userLocation");J(e)}),[null==U?void 0:U.userLocation]);var K=function(){var e=(0,n.A)(c().mark((function e(o,t){var l,n,a,r,i,u,v,m,g,f,h,b,y,S;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l=s().decode("QUl6YVN5QkhGMUdEQnZMeVcwaUxUbndablNiS1JjSWN4LUZNT3Rn"),console.log("search",U.gak,l),n="https://maps.googleapis.com/maps/api/geocode/json?address=".concat(o,"&key=").concat(l),e.prev=3,e.next=6,d.A.get(n);case 6:v=e.sent,(m=null==v||null===(a=v.data)||void 0===a?void 0:a.results)&&"OK"===(null==v||null===(r=v.data)||void 0===r?void 0:r.status)?(b=null===(g=m[0])||void 0===g||null===(g=g.geometry)||void 0===g?void 0:g.location,x(k(k({},U),{locationsSorted:(0,p.JL)({latitude:b.lat,longitude:b.lng},C||(null===(f=N.locations)||void 0===f?void 0:f.coordinates),!!t&&o),focused:"map-module"===L?null:null===(h=U.locationsSorted[0])||void 0===h?void 0:h.slug,searchCoords:{latitude:b.lat,longitude:b.lng},zipSearch:!!t&&o})),(0,p.hN)(C?"#location-module-layout":"#location-selector-menu"),V("")):"ZERO_RESULTS"===(null==v||null===(i=v.data)||void 0===i?void 0:i.status)?V("No results found for: ".concat(o)):"REQUEST_DENIED"===(null==v||null===(u=v.data)||void 0===u?void 0:u.status)?V(null==v||null===(y=v.data)||void 0===y?void 0:y.error_message):console.log(null==v||null===(S=v.data)||void 0===S?void 0:S.error_message),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(3),console.log(e.t0);case 14:case"end":return e.stop()}}),e,null,[[3,11]])})));return function(o,t){return e.apply(this,arguments)}}();return i.createElement(i.Suspense,{fallback:i.createElement("div",null)},i.createElement(_.Cz,{className:"location-search ".concat(null==N||null===(o=N.locations)||void 0===o?void 0:o.location_selector_background_value),bgColor:(0,g.GG)(null==N||null===(t=N.locations)||void 0===t?void 0:t.location_selector_background_color,N),textColor:"dark"===(null==N||null===(l=N.locations)||void 0===l?void 0:l.location_selector_background_value)?"#fff":(0,g.GG)("body_copy_color",N),errorColor:"dark"===(null==N||null===(r=N.locations)||void 0===r?void 0:r.location_selector_background_value)?"#fff":"red"},i.createElement("form",{action:"#",onSubmit:function(e){return function(e){e.preventDefault();var o=new FormData(e.target).get("query");o&&K(o,(0,p.TV)(o))}(e)},role:"search","aria-label":"location search"},i.createElement("label",{htmlFor:"search-input"},i.createElement("span",{class:"show-for-sr"},"Search Locations"),i.createElement("input",{id:"location-search-".concat(B),type:"text",name:"query",placeholder:"Search by ZIP or City & State"}),i.createElement("div",{className:"reset",role:"button",onClick:function(){return(e=document.getElementById("location-search-".concat(B))).value="",e.focus(),V(""),void x(k(k({},U),{zipSearch:!1}));var e},"aria-label":"reset search"},i.createElement(v.g,{icon:m.GRI,title:"Reset"})),Z&&i.createElement("span",{class:"error"},Z)),i.createElement("button",{className:"search-submit",type:"submit","aria-label":"submit location search"},null!==(u=N.mvk_theme_config.header)&&void 0!==u&&u.search_icon_desktop?i.createElement(f.default,{data:null===(E=N.mvk_theme_config.header)||void 0===E?void 0:E.search_icon_desktop}):i.createElement(v.g,{icon:m.$UM,title:"Submit Search"}))),z&&i.createElement("div",{className:"my-location",role:"button",onClick:function(){return Q(!0),function(){var e=(0,h.r)("userLocation");if(e){var o,t,l=JSON.parse(e),n=l.latitude,a=l.longitude;x(k(k({},U),{},{userLocation:{latitude:n,longitude:a},locationsSorted:(0,p.JL)({latitude:n,longitude:a},C||(null===(o=N.locations)||void 0===o?void 0:o.coordinates),!1),focused:"map-module"===L?null:null===(t=U.locationsSorted[0])||void 0===t?void 0:t.slug,searchCoords:{latitude:n,longitude:a},zipSearch:!1})),Q(!1)}else{var r=!1;navigator.geolocation?navigator.geolocation.getCurrentPosition((function(e){var o,t,l=e.coords,n=l.latitude,a=l.longitude;r={latitude:n,longitude:a},x(k(k({},U),{userLocation:r,locationsSorted:(0,p.JL)({latitude:n,longitude:a},C||(null===(o=N.locations)||void 0===o?void 0:o.coordinates),!1),focused:"map-module"===L?null:null===(t=U.locationsSorted[0])||void 0===t?void 0:t.slug,searchCoords:r,zipSearch:!1})),Q(!1)}),(function(e){var o,t;x(k(k({},U),{userLocation:!1,locationsSorted:(0,p.JL)(!1,C||(null===(o=N.locations)||void 0===o?void 0:o.coordinates),!1),focused:"map-module"===L?null:null===(t=U.locationsSorted[0])||void 0===t?void 0:t.slug,searchCoords:{latitude:31.9686,longitude:99.9018},zipSearch:!1})),Q(!1),console.log("Error getting user location:",e.message)})):(x(k(k({},U),{userLocation:!1})),Q(!1))}}(),document.getElementById("location-search-".concat(B)).value="",(0,p.hN)(C?"#location-module-layout":"#location-selector-menu"),void V("")},"aria-label":"use my location"},!I&&i.createElement(v.g,{icon:m.C5p,title:"Use My Location"}),I&&i.createElement(b.default,{type:"dot-pulse",dotColor:"dark"===(null==N||null===(O=N.locations)||void 0===O?void 0:O.location_selector_background_value)?"#fff":(0,g.GG)("primary_color",N)}))))}}}]);
2//# sourceMappingURL=3027e3356804f9a1cd7e.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.