1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[73376],{73376(e,t,s){s.d(t,{Dp:()=>o,YF:()=>h,H7:()=>m});var n=s(36977);const o=(0,n.createContext)(null);var r=s(14405),i=s(19061),c=s(93183),a=s(46720),l=s.n(a);const u=class{getSuggestions(){return(0,r._)(function*(){const e=yield baza.withCache(this.regionsUrl,()=>(0,r._)(function*(){return(yield baza.fetch(this.regionsUrl)).json()}).call(this)),t=[];return Object.values(e).forEach(e=>{Object.values(e.regions).forEach(e=>{Object.entries(e.cities).forEach(([s,n])=>{t.push({id:Number(s),regionName:e.name,geoName:n.name,get geoCoderName(){return`${this.regionName}, ${this.geoName}`},get autocompleteName(){return`${this.geoName} (${this.regionName})`}})})})}),t}).call(this)}constructor(e){const{regionsUrl:t,allRegionsUrl:s}=l().get("company-branches");this.regionsUrl=e?s:t}},g=class{getSuggestions(e,t){return(0,r._)(function*(){const s=baza.setUrlParams(this.autocompleteGeoUrl,{city:e.geoCoderName,addresses_only:1,term:t});return(yield baza.fetch(s)).json()}).call(this)}constructor(){const{autocompleteGeoUrl:e}=l().get("bulletin-view-controller-config");this.autocompleteGeoUrl=e}};function h({children:e,shouldFetchAllRegions:t=!1}){const[s,a]=(0,n.useState)([]),[l]=(0,n.useState)(()=>new g),[h,m]=(0,c.st)(()=>(0,r._)(function*(){const e=new u(t),s=yield e.getSuggestions();a(s)})(),!0);return(0,n.useEffect)(h,[]),(0,i.jsx)(o.Provider,{value:{geoList:s,loading:m,getAddressSuggestions:(e,t)=>l.getSuggestions(e,t)},children:e})}const m=function(e){const{geoList:t}=(0,c.az)(o);return(0,n.useMemo)(()=>t.find(t=>t.id===e),[t,e])}}}]); 2//# sourceMappingURL=/resources/source-maps/73376.b15f76adfb03b89f02ef.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.