1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[431],{50254:(e,t,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/contacts",function(){return s(67793)}])},64972:(e,t,s)=>{"use strict";s.d(t,{$:()=>u});var l=s(37876),a=s(69241),r=s(14232),n=s(58221);let i=()=>!0,u=e=>{let{items:t,isLoading:s,setFilter:u,setSelected:o,placeholder:c="Search for a user...",className:d,onClearRef:f,defaultValue:m,minLength:h=1,hideMenu:g=!1,filterValue:b}=e,[y,p]=(0,r.useState)([]),[v,x]=(0,r.useState)(!1),[E,w]=(0,r.useState)(!1),[N,j]=(0,r.useState)(m),[S,_]=(0,r.useState)("");(0,r.useEffect)(()=>{if(m!==N&&(x(!1),j(m)),m&&!v){let e=t.find(e=>e.label.toLowerCase()===m.toLowerCase()||e.value===m);e?p([e]):p([{label:m,value:m}]),void 0===b&&_(m)}},[m,t,v,N,b]),(0,r.useEffect)(()=>{""===b&&y.length>0&&(p([]),w(!0))},[b,y.length]);let C=e=>{u(e),x(!0),void 0===b&&_(e),e.length>0&&w(!1)},L=(0,r.useCallback)(()=>{x(!0),w(!0),p([]),void 0===b&&_("")},[b]);return(0,r.useEffect)(()=>{f&&f(L)},[f,L]),(0,r.useEffect)(()=>{if(E){o(null);return}if(y.length>0&&v||y.length>0&&!v){o(y[0].value);return}v||m||o(null)},[y,o,v,E,m]),(0,l.jsx)(n.EX,{filterBy:i,id:"autocompleteAsync",clearButton:!0,isLoading:s,labelKey:"label",onSearch:C,options:t,placeholder:c,useCache:!1,minLength:h,onChange:e=>{x(!0),0===e.length?E&&p([]):(p(e.map(e=>e)),w(!1))},selectHint:(e,t)=>"Enter"===t.key||"Tab"===t.key,selected:y,onInputChange:C,onFocus:()=>{x(!0)},renderInput:e=>{let t,{inputRef:s,referenceElementRef:r,...n}=e;return t=void 0!==b?b:v?S:n.value,(0,l.jsx)("input",{...n,value:t,ref:s,className:(0,a.A)("text-gray-500 rounded-md bg-gray-50 focus:bg-white focus:border-custom-blue-600 w-64 border px-4 py-3 outline-none",d)})},renderMenu:(e,t,s)=>{let{newSelectionPrefix:a,paginationText:i,renderMenuItemChildren:u,...o}=t,c=e.map((e,t)=>(0,l.jsx)(r.Fragment,{children:(0,l.jsx)(n.Dr,{className:"bg-gray-50",option:e,position:t,children:(0,l.jsx)(n.MD,{highlightClassName:"bg-gray-50",search:s.text,children:e.label})},e.value)},"".concat(e.value,"-").concat(t)));return g||0===c.length?null:(0,l.jsx)(n.W1,{...o,className:"text-gray-500 rounded-md bg-gray-50 focus:bg-white focus:border-custom-blue-600 mt-14 w-64 cursor-pointer border py-3 pl-4 pr-4 outline-none",children:c})}})}},67793:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>d});var l=s(37876),a=s(61718),r=s(34329),n=s(14232),i=s(87184),u=s(64972),o=s(86806),c=s(67768);function d(){let e=(0,c.jE)(),{isAdmin:t,setUserId:s}=o.f.useAdminStore.getState(),{items:d,setFilter:f,isLoading:m}=(0,i.Q)();return(0,n.useEffect)(()=>()=>{s("")},[s]),(0,l.jsx)(a.q,{type:"admin-only",children:(0,l.jsxs)("div",{className:"flex h-full flex-col",children:[(0,l.jsx)("div",{className:"mb-2 w-fit flex-none md:mb-2",children:(0,l.jsx)(u.$,{items:null!=d?d:[],isLoading:m,setFilter:f,setSelected:l=>{if(t){let t=!!l;s(null!=l?l:""),t&&(e.invalidateQueries({queryKey:["ContactListKey"]}),e.invalidateQueries({queryKey:["EmailContactListKey"]}),e.invalidateQueries({queryKey:["getTeams"]}))}}})}),(0,l.jsx)("div",{className:"min-h-[60vh] flex-1 md:min-h-0",children:(0,l.jsx)(r.default,{isAdminView:!0})})]})})}},87184:(e,t,s)=>{"use strict";s.d(t,{Q:()=>o});var l,a,r=s(14232),n=s(74359),i=s(20704),u=s(77055);(l||(l={})).getUsers=e=>i.f.get({resSchema:u.W.ToUserListTransform},"/admin/users/",{params:{filter:e.filter}}),(a||(a={})).useGetUsers=e=>(0,n.I)({queryKey:["users",e.filter],queryFn:()=>l.getUsers(e),enabled:e.enabled,staleTime:0});let o=()=>{let[e,t]=r.useState(""),[s,l]=r.useState([]),{data:n,isLoading:i}=a.useGetUsers({enabled:!0,filter:e});return(0,r.useEffect)(()=>{(null==n?void 0:n.users)&&l(n.users.map(e=>({value:e.id,label:"".concat(e.id.split("-")[0]," - ").concat(e.firstName," ").concat(e.lastName)})))},[n]),(0,r.useMemo)(()=>({items:s,setFilter:t,isLoading:i}),[s,i])}}},e=>{var t=t=>e(e.s=t);e.O(0,[3665,3431,9734,4209,3538,5199,8883,4239,4523,8135,8221,1467,6965,3502,2750,2270,4522,6345,896,4329,636,6593,8792],()=>t(50254)),_N_E=e.O()}]);
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.