1import{o as e}from"./rolldown-runtime.DAXXjFlN.js";import{nn as t}from"./vendor-datadog.CbXwTgUc.js";import{c as n}from"./app-hooks-useBoolean-LocalizationProvider.BXNw5IM4.js";import{n as r}from"./vendor-use-debounce-use-debounce-dist-index.module.D3MEg9co.js";import{t as i}from"./app-ui-hooks-useCommonGoogleMapsLoader.CPK7zzwc.js";var a=e(t()),o={Address:`address`},s=e=>{let{isLoaded:t,loadError:n}=i(),r=(0,a.useRef)(null);return(0,a.useEffect)(()=>{t&&(r.current=new google.maps.places.AutocompleteService)},[t]),{getQueryPredictions:(0,a.useCallback)(async t=>new Promise((n,i)=>{if(!r.current){i(Error(`Google service is not available.`));return}let a={input:t,...e?.componentRestrictions&&{componentRestrictions:e.componentRestrictions},...e?.types&&{types:e.types}};r.current.getPlacePredictions(a,(e,t)=>n({predictions:e,status:t}))}),[e?.componentRestrictions,e?.types]),isLoaded:t,loadError:n}},c=e=>{let{getQueryPredictions:t}=s(e?.googlePlacesOptions),[i,o]=(0,a.useState)(e?.defaultInput??``),[c]=r(i,e?.debounceMs??0);return{input:i,setInput:o,query:n({queryKey:[`places`,c],queryFn:()=>t(c),enabled:!!c})}};export{o as n,c as t};
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.