1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4036],{4036:(e,t,i)=>{i.r(t),i.d(t,{default:()=>d});var r=i(50979),n=i(55024),a=i(79617),s=i(16342),l=i(26426),v=i(13741),o=i(84614),u=i(25963),c=i(42590);let d=function(e){let{onAddressSelect:t,children:i,containerRef:d,onManualAddressClick:h}=e,{t:x,i18n:p}=(0,o.Bd)(["common"]),f=(0,s.fB)({accessToken:n.J.MAPBOX_ACCESS_TOKEN(),language:p.language}),m=(0,u.useMemo)(()=>new a.p7(f,200),[f]),[g,k]=(0,u.useState)(!1),[j,w]=(0,u.useState)([]),A=(0,u.useRef)(null),C=async e=>{if(!e||e.length<5){g&&w([]);return}if(g)try{let{suggestions:t}=await m.suggest(e);t.length>0&&(w(t),k(!0))}catch(e){w([])}};return(0,u.useEffect)(()=>(w([]),k(!1),()=>{m.abort()}),[m]),(0,r.jsxs)(c.AM,{open:g&&j.length>0,children:[(0,r.jsx)(c.Wv,{asChild:!0,children:(0,r.jsx)("div",{ref:A,children:i({onChange:e=>{C(e)},onFocus:()=>k(!0),onBlur:()=>k(!1)})})}),(0,r.jsxs)(c.hl,{onOpenAutoFocus:e=>e.preventDefault(),onCloseAutoFocus:e=>e.preventDefault(),className:"vi-w-[--radix-popper-anchor-width] vi-py-0 vi-px-0 vi-overflow-y-auto vi-divide-y",sideOffset:8,align:"start",showArrow:!1,container:null==d?void 0:d.current,children:[j.map(e=>(0,r.jsx)("div",{onClick:()=>{f.canRetrieve(e)&&t(e,m.sessionToken),k(!1)},className:(0,l.A)("vi-flex vi-px-4 vi-py-3 vi-cursor-pointer vi-text-sm",{"hover:vi-bg-neutral-50 hover:vi-text-neutral-900 vi-text-neutral-500":!0,"dark:hover:vi-bg-neutral-900 dark:hover:vi-text-neutral-300 dark:vi-text-neutral-500":!0}),children:e.full_address},e.mapbox_id)),h&&(0,r.jsx)("div",{className:"vi-flex text-center vi-px-4 vi-py-3 vi-cursor-pointer vi-text-sm hover:vi-bg-neutral-50 hover:vi-text-neutral-900 dark:hover:vi-bg-neutral-900 dark:hover:vi-text-neutral-300 dark:vi-text-neutral-500",onClick:h,children:(0,r.jsxs)("div",{className:"vi-flex vi-gap-2 vi-items-center vi-mx-auto",children:[(0,r.jsx)(v.A,{className:"vi-size-4"}),(0,r.jsx)("div",{children:x("common:manualAddressFill")})]})})]})]})}}}]);
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.