1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8431],{24774:(e,t,a)=>{a.d(t,{X:()=>R});var r=a(54568),l=a(73046),o=a(94902),s=a(98869),n=a(3738),d=a(72868),i=a(91767),u=a(9054),p=a(67406),c=a(7620);let m=e=>(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",...e,children:(0,r.jsx)("path",{d:"M10 2a8 8 0 0 1 6.32 12.905l5.387 5.388a1 1 0 0 1-1.32 1.497l-.094-.083-5.388-5.386A8 8 0 1 1 10 2Zm0 2a6 6 0 1 0 0 12 6 6 0 0 0 0-12Z",fill:"currentColor",fillRule:"evenodd"})}),x=c.forwardRef((e,t)=>{let{className:a,...l}=e;return(0,r.jsx)(p.uB,{ref:t,className:(0,u.cn)("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",a),...l})});x.displayName=p.uB.displayName,c.forwardRef((e,t)=>{let{className:a,...l}=e;return(0,r.jsxs)("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[(0,r.jsx)(m,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),(0,r.jsx)(p.uB.Input,{ref:t,className:(0,u.cn)("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",a),...l})]})}).displayName=p.uB.Input.displayName;let f=c.forwardRef((e,t)=>{let{className:a,...l}=e;return(0,r.jsx)(p.uB.List,{ref:t,className:(0,u.cn)("max-h-[300px] overflow-y-auto overflow-x-hidden",a),...l})});f.displayName=p.uB.List.displayName;let h=c.forwardRef((e,t)=>(0,r.jsx)(p.uB.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));h.displayName=p.uB.Empty.displayName;let g=c.forwardRef((e,t)=>{let{className:a,...l}=e;return(0,r.jsx)(p.uB.Group,{ref:t,className:(0,u.cn)("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",a),...l})});g.displayName=p.uB.Group.displayName,c.forwardRef((e,t)=>{let{className:a,...l}=e;return(0,r.jsx)(p.uB.Separator,{ref:t,className:(0,u.cn)("-mx-1 h-px bg-border",a),...l})}).displayName=p.uB.Separator.displayName;let v=c.forwardRef((e,t)=>{let{className:a,...l}=e;return(0,r.jsx)(p.uB.Item,{ref:t,className:(0,u.cn)('relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-cyan-hover data-[disabled="true"]:pointer-events-none data-[disabled="true"]:opacity-50',a),...l})});v.displayName=p.uB.Item.displayName;var w=a(86218);let y=w.bL,j=w.l9,b=c.forwardRef((e,t)=>{let{className:a,align:l="center",sideOffset:o=4,...s}=e;return(0,r.jsx)(w.ZL,{children:(0,r.jsx)(w.UC,{ref:t,align:l,sideOffset:o,className:(0,u.cn)("z-50 w-72 rounded-md border border-grey-medium p-4 shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a),...s})})});b.displayName=w.UC.displayName;let N=(0,c.createContext)({}),C=e=>{let{onValueSelect:t,inputValue:a,data:l,isLoading:o,open:s,onOpenChange:n,children:d,...i}=e,[u,p]=(0,c.useState)(!1),m=null!=n?n:p,f=null!=s?s:u,h=(0,c.useCallback)(e=>{t(e),m(!1)},[t,m]);return(0,r.jsx)(N.Provider,{value:{inputValue:a,data:l,onSelect:h,isLoading:o},children:(0,r.jsx)(y,{open:f,onOpenChange:m,...i,children:(0,r.jsx)(x,{onKeyDown:e=>!f&&e.preventDefault(),className:"overflow-visible",children:d})})})},k=e=>{let{...t}=e;return(0,r.jsx)(j,{...t})},B=e=>{let{...t}=e;return(0,r.jsx)(h,{...t})},S=e=>{let{children:t}=e,a=(0,c.useContext)(N);if(!a)throw Error("ComboboxContent should be used within ComboboxContainer");let{inputValue:l,data:o,onSelect:s,isLoading:n}=a;return(0,r.jsx)(b,{onOpenAutoFocus:e=>e.preventDefault(),className:"w-[var(--radix-popover-trigger-width)] p-0 rounded-lg shadow-md mt-2 bg-white text-grey-dark",children:(0,r.jsxs)(f,{"data-test":"combobox-command-list",children:[o.map((e,t)=>(0,r.jsx)(g,{heading:e.header,className:(0,u.cn)("text-grey-dark",n&&"opacity-50"),children:e.values.map((e,t)=>(0,r.jsx)(v,{className:"cursor-pointer hover:bg-grey-light text-xs text-blue-dark",value:e,onSelect:s,children:(0,r.jsx)(_,{needle:l,haystack:e},t)},t))},t)),t]})})},_=e=>{let{needle:t,haystack:a}=e;if(!t)return(0,r.jsx)(r.Fragment,{children:a});let l=(0,c.useMemo)(()=>t.trim().replace(/[^a-zA-Z0-9\s,üÃäÃöÃÃ]/g," ").split(/[\s,]+/).filter(
1Boolean),[t]),o=(0,c.useMemo)(()=>{let e=[a];for(let a of l){let r=[],l=RegExp(a,"gi");for(let a of e)for(let e of a.split(l)){var t;r.push(e);let o=null===(t=l.exec(a))||void 0===t?void 0:t[0];o&&r.push(o)}e=r}return e},[a,l]);return(0,r.jsx)("span",{children:o.map((e,t)=>l.some(t=>t.toLowerCase()===e.toLowerCase())?(0,r.jsx)("strong",{children:e},t):e)})},R=e=>{var t;let{initialValue:a,hideLabel:u,onChange:p,...m}=e,x=(0,i.U)(),f=(0,l.useTranslation)(),[h,g]=(0,c.useState)(a),[v,w]=(0,c.useState)(!1),y=(0,d.n)({input:h}),j=(0,c.useMemo)(()=>y.isSuccess?y.data.predictions:[],[null===(t=y.data)||void 0===t?void 0:t.predictions,y.isSuccess]),b=(0,c.useCallback)(async e=>{var t,a;g(e);let r=null!==(t=j.find(t=>t.description===e))&&void 0!==t?t:null;if(!r){p({option:null,geocoderResult:null});return}let l=r.place_id,{results:o}=await (0,n._)({placeId:l},x);p({option:r,geocoderResult:null!==(a=o.at(0))&&void 0!==a?a:null})},[x,p,j]),N=(0,c.useMemo)(()=>{let e=f("proprate:placesAutocomplete.header.street"),t={street_address:e,route:e,premise:e,postal_code:f("proprate:placesAutocomplete.header.postal_code")},a=new Map;for(let e of j)for(let l of e.types){var r;let o=t[l];if(!o)continue;let s=null!==(r=a.get(o))&&void 0!==r?r:{header:o,values:[]};s.values.push(e.description),a.set(o,s)}return Array.from(a.values())},[j,f]);return(0,r.jsxs)(C,{data:N,onValueSelect:b,inputValue:h,isLoading:y.isAutocompleteLoading,open:v,onOpenChange:w,children:[(0,r.jsx)(k,{asChild:!0,children:(0,r.jsx)(o.X,{type:"text",label:f("proprate:placesAutocomplete.label"),hideLabel:u,value:h,"data-test":"places-search-input",onKeyDown:e=>!v&&e.stopPropagation(),onChange:e=>{let t=e.target.value;if(g(t),!t.trim()){w(!1);return}v||w(!0)},...m})}),(0,r.jsx)(S,{children:(0,r.jsx)(B,{children:(0,r.jsxs)("div",{className:"p-3 space-y-2",children:[(0,r.jsx)(s.Paragraph,{size:"XS",bold:!0,children:f("proprate:placesAutocomplete.noOptions.title")}),(0,r.jsx)(s.Paragraph,{size:"XS",className:"text-grey-dark",children:f("proprate:placesAutocomplete.noOptions.caption")})]})})})]})}},98431:(e,t,a)=>{a.r(t),a.d(t,{LocationStep:()=>c});var r=a(54568),l=a(73046),o=a(93310),s=a(62565),n=a(24774),d=a(13172),i=a(17184),u=a(19198),p=a(89081);let c=()=>{let e=(0,l.useTranslation)(),t=(0,p.d8)((0,d.k)(e=>{var t;return null===(t=e.location)||void 0===t?void 0:t.data.address})),[a]=(0,p.d8)((0,d.k)(e=>{let{setLocation:t,setPlaceId:a}=e;return[t,a]})),{data:c}=(0,o.x)();return c?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(u.W,{title:e("proprate:tool.wizard.locationStep.title"),caption:e("proprate:tool.wizard.locationStep.caption")}),(0,r.jsxs)("div",{className:"w-full lg:max-w-xl",children:[(0,r.jsx)(i.u,{required:!0,value:t?t.trim():""}),(0,r.jsx)(n.X,{initialValue:null!=t?t:"",onChange:a,variant:"inverted"})]})]}):(0,r.jsx)(s.z,{})}}}]);
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.