1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[20515,42896,85063],{42896:(e,l,t)=>{t.r(l),t.d(l,{default:()=>s});var a=t(95155),r=t(12115),o=t(75182),n=t(85063);function s({value:e=null,onChange:l,placeholder:t="Search for a location...",className:u,inputId:i,types:c,resolve:d,countries:p,isDisabled:b=!1,isClearable:m=!0}){let[f,g]=(0,r.useState)([]),[v,h]=(0,r.useState)(!1),w=(0,r.useRef)(null),x=(0,r.useRef)(null),y=(0,r.useRef)(null),_=(0,r.useRef)(0);(0,r.useEffect)(()=>()=>clearTimeout(y.current),[]);let k=(0,r.useCallback)(async()=>{if(w.current)return w.current;try{let e=await (0,n.p)();e?.places&&!w.current&&(w.current=new e.places.AutocompleteService,x.current=new e.places.AutocompleteSessionToken)}catch(e){console.error("[PlacesAutocomplete]",e)}return w.current},[]),C=(0,r.useCallback)(async e=>{let l=++_.current,t=e?await k():null;if(l===_.current){if(!t||!e){g([]),h(!1);return}h(!0),t.getPlacePredictions({input:e,sessionToken:x.current,...c?{types:c}:{},...p?{componentRestrictions:{country:p}}:{}},e=>{l===_.current&&(h(!1),g((e??[]).map(e=>({value:e.place_id,label:e.description}))))})}},[p,c,k]),j=(0,r.useCallback)(e=>{if(clearTimeout(y.current),!e.trim()){_.current+=1,g([]),h(!1);return}y.current=setTimeout(()=>C(e),250)},[C]),N=(0,r.useCallback)(e=>{let t=e=>{l?.(e),g([]);let t=window.google?.maps?.places;t&&(x.current=new t.AutocompleteSessionToken)};e?"city"===d&&e.value?(0,n.geocodeByPlaceId)(e.value).then(l=>{let a=l?.[0];if(!a)return void t({label:e.label,value:{place_id:e.value,description:e.label}});let r=a.address_components||[],o=e=>{let l=r.find(l=>e.some(e=>l.types.includes(e)));return l?.long_name||""},n=o(["locality"])||o(["postal_town"])||o(["administrative_area_level_2"]),s=o(["administrative_area_level_1"]),u=o(["country"]),i=a.geometry?.location?.lat(),c=a.geometry?.location?.lng();t({label:`${n}, ${s}`,value:{place_id:e.value,description:e.label,city:n,state:s,country:u,latitude:i,longitude:c}})}).catch(l=>{console.error("[PlacesAutocomplete]",l),t({label:e.label,value:{place_id:e.value,description:e.label}})}):t({label:e.label,value:{place_id:e.value,description:e.label}}):t(null)},[l,d]),E=(0,r.useMemo)(()=>e?.label?{value:e.label,label:e.label}:null,[e]);return(0,a.jsx)(o.A,{className:u,inputId:i,options:f,value:E,onChange:N,onInputChange:j,disableLocalFilter:!0,isLoading:v,isClearable:m,isDisabled:b,placeholder:t})}},60529:(e,l,t)=>{t.d(l,{p:()=>n});var a=t(95155),r=t(12115),o=t(40980);let n=r.forwardRef(({className:e,type:l,...t},r)=>(0,a.jsx)("input",{type:l,className:(0,o.cn)("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm r
1ing-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...t}));n.displayName="Input"},75182:(e,l,t)=>{t.d(l,{A:()=>u});var a=t(95155),r=t(12115),o=t(29401),n=t(60529),s=t(40980);let u=function({options:e=[],value:l,onChange:t,isMulti:u=!1,isClearable:i=!1,isDisabled:c=!1,isLoading:d=!1,isCreatable:p=!1,placeholder:b="Select...",className:m,inputId:f,id:g,name:v,formatOptionLabel:h,noOptionsMessage:w,onInputChange:x,disableLocalFilter:y=!1,formatCreateLabel:_=e=>`Create "${e}"`,"aria-label":k}){let C=(0,r.useId)(),j=f??g??C,N=`${j}-list`,E=(0,r.useRef)(null),M=(0,r.useMemo)(()=>l?Array.isArray(l)?[...l]:[l]:[],[l]),D=(0,r.useMemo)(()=>new Set(M.map(e=>e.value)),[M]),S=!u&&M.length>0?M[0]:null,A=(0,r.useCallback)(e=>{let l=h?.(e);return"string"==typeof l||"number"==typeof l?String(l):e.label},[h]),P=(0,r.useCallback)(e=>{t?.(e)},[t]),I=u||p||y||!!x,R=(0,r.useMemo)(()=>S?e.some(e=>e.value===S.value)?[...e]:[S,...e]:[...e],[e,S]),[L,$]=(0,r.useState)(()=>
1!u&&S?A(S):""),[G,T]=(0,r.useState)(!1),[B,F]=(0,r.useState)(0),z=(0,r.useRef)(null),J=S?.value??"",K=S?A(S):"";(0,r.useEffect)(()=>{u||$(K)},[u,J,K]);let O=(0,r.useCallback)(e=>{$(e),x?.(e)},[x]),U=(0,r.useMemo)(()=>{let l=u?e.filter(e=>!D.has(e.value)):e,t=L.trim().toLowerCase();return!t||y||t===K.trim().toLowerCase()?[...l]:l.filter(e=>A(e).toLowerCase().includes(t))},[e,u,D,L,y,K,A]),q=(0,r.useCallback)(e=>{u?(D.has(e.value)||P([...M,e]),O(""),E.current?.focus()):(P(e),$(A(e)),x?.(""),T(!1))},[P,u,x,A,M,D,O]),Q=(0,r.useCallback)(e=>{let l=e.trim().toLowerCase();if(l)return U.find(e=>A(e).toLowerCase()===l)},[U,A]),V=p&&""!==L.trim()&&!Q(L)?_(L.trim()):void 0,X=U.length+ +!!V;(0,r.useEffect)(()=>{F(0)},[L,G]),(0,r.useEffect)(()=>{G&&z.current?.querySelector('[data-active="true"]')?.scrollIntoView({block:"nearest"})},[B,G]);let Y=(0,r.useCallback)(()=>{let e=L.trim();q({value:e,label:e,__isNew__:!0})},[q,L]),H=(0,r.useCallback)(()=>{P(u?[]:null),O("")},[P,u,O]),W=M.length>0,Z=d?"Loadingâ¦":0===X?w?.()??"No options":void 0;return I?(0,a.jsxs)("div",{className:"relative w-full",children:[(0,a.jsxs)("div",{className:(0,s.cn)("flex min-h-10 w-full flex-wrap items-center gap-1 rounded border bg-white px-2 py-1 text-[0.95rem]",c?"cursor-not-allowed border-slate-200 bg-slate-50":"border-slate-300 focus-within:border-slate-400",m),onMouseDown:e=>{e.target.closest("button")||c||e.target===E.current||(e.preventDefault(),E.current?.focus())},children:[u&&M.map(e=>(0,a.jsxs)("span",{className:"flex items-center gap-1 rounded bg-slate-100 py-0.5 pl-2 pr-1 text-[0.9rem] text-slate-900",children:[h?h(e):e.label,(0,a.jsx)("button",{type:"button","aria-label":`Remove ${e.label}`,disabled:c,className:"rounded p-0.5 text-slate-500 hover:bg-slate-200 hover:text-slate-900",onClick:()=>P(M.filter(l=>l.value!==e.value)),children:(0,a.jsx)(o.$8F,{"aria-hidden":!0,className:"h-3 w-3"})})]},e.value)),(0,a.jsx)(n.p,{ref:E,id:j,name:v,type:"text",role:"combobox","aria-expanded":G,"aria-controls":N,"aria-autocomplete":"list","aria-label":k,autoComplete:"off",disabled:c,value:L,placeholder:u&&W?"":b,onChange:e=>{O(e.target.value),T(!0)},onKeyDown:e=>{if(c)return;switch(e.key){case"ArrowDown":e.preventDefault(),T(!0),F(e=>Math.min(e+1,Math.max(X-1,0)));return;case"ArrowUp":e.preventDefault(),F(e=>Math.max(e-1,0));return;case"Escape":T(!1);return;case"Backspace":""===L&&u&&M.length>0&&P(M.slice(0,-1));return;case"Enter":break;default:return}if(G&&X>0){if(e.preventDefault(),V&&0===B)Y();else{let e=U[V?B-1:B];e&&q(e)}return}let l=L.trim(),t=Q(l);if(t){e.preventDefault(),q(t);return}p&&l&&(e.preventDefault(),Y())},onFocus:()=>T(!0),onBlur:()=>{let e;T(!1),e=L.trim(),p&&e&&!Q(e)?q({value:e,label:e,__isNew__:!0}):u?""!==L&&O(""):L!==K&&($(K),x?.(""))},className:"h-auto min-w-[4rem] flex-1 border-0 bg-transparent p-0 text-inherit !text-black shadow-none outline-none ring-offset-0 placeholder:text-gray-500 focus-visible:ring-0 focus-visible:ring-offset-0 disabled:cursor-not-allowed"}),i&&W&&!c&&(0,a.jsx)("button",{type:"button","aria-label":"Clear selection",className:"rounded p-1 text-slate-400 hover:text-slate-700",onClick:H,children:(0,a.jsx)(o.$8F,{"aria-hidden":!0,className:"h-4 w-4"})})]}),G&&(0,a.jsxs)("ul",{ref:z,id:N,role:"listbox",className:"absolute left-0 top-full z-[9999] m-0 mt-1 max-h-72 w-full list-none overflow-auto rounded-md border border-gray-200 bg-white p-1 text-sm shadow-lg",children:[Z&&(0,a.jsx)("li",{className:"px-3 py-2 !text-gray-500",children:Z}),V&&(0,a.jsx)("li",{children:(0,a.jsx)("button",{type:"button",role:"option","aria-selected":0===B,"data-active":0===B,className:(0,s.cn)("w-full rounded px-3 py-2 text-left !text-gray-900",0===B?"bg-gray-100":"hover:bg-gray-100"),onMouseEnter:()=>F(0),onMouseDown:e=>{e.preventDefault(),Y()},children:V})}),U.map((e,l)=>{let t=V?l+1:l,r=t===B,o=D.has(e.value);return(0,a.jsx)("li",{children:(0,a.jsx)("button",{type:"button",role:"option","aria-selected":o,"data-active":r,className:(0,s.cn)("w-full rounded px-3 py-2 text-left transition-colors",o?"bg-amber-500 !text-black":r?"bg-gray-300 !text-black":"!text-gray-800 hover:bg-gray-800"),onMouseEnter:()=>F(t),onMouseDown:l=>{l.preventDefault(),q(e)},children:h?h(e):A(e)})},e.value)})]})]}):(0,a.jsxs)("select",{id:j,name:v,"aria-label":k,disabled:c,value:S?.value??"",onChange:e=>{P(R.find(l=>l.value===e.target.value)??null)},className:(0,s.cn)("min-h-10 w-full rounded border bg-white px-2 py-1 text-[0.95rem] text-slate-900",c?"cursor-not-allowed border-slate-200 bg-slate-50":"border-slate-300 focus:border-slate-600",!S&&"text-slate-600",m),children:[(0,a.jsx)("option",{value:"",disabled:!i,children:d?"Loadingâ¦":b}),R.map(e=>(0,a.jsx)("option",{value:e.value,children:A(e)},e.value))]})}},85063:(e,l,t)=>{t.d(l,{geocodeByPlaceId:()=>s,p:()=>n});let a="__academicJobsMapsReady",r="google-maps-places-js",o=null;
1function n(e="AIzaSyDGJjCEwv_3_kTpyovGgMizGnyD881NRzQ"){return window.google?.maps?.places?Promise.resolve(window.google.maps):o||(e?o=new Promise((l,t)=>{if(window[a]=()=>l(window.google?.maps??null),document.getElementById(r))return;let n=document.createElement("script");n.id=r,n.async=!0,n.src=`https://maps.googleapis.com/maps/api/js?key=${encodeURIComponent(e)}&libraries=places&loading=async&callback=${a}`,n.onerror=()=>{o=null,t(Error("Failed to load the Google Maps JS API"))},document.head.appendChild(n)}):Promise.reject(Error("NEXT_PUBLIC_GOOGLE_MAPS_API_KEY is not set")))}async function s(e){let l=await n();if(!l)throw Error("Google Maps is unavailable");let t=new l.Geocoder;return new Promise((l,a)=>{t.geocode({placeId:e},(t,r)=>{"OK"===r&&t?l(t):a(Error(`Geocoding failed for "${e}": ${r}`))})})}}}]);
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.