1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/SelectDrawer-D3knAc-X.js","assets/.pnpm-BA7nqZ-x.js","assets/.pnpm-C-EqX9R9.css","assets/OutsideClickWrapper-LebR5WHg.js","assets/view_address-DCY8Jd7J.js","assets/SelectDrawer-BTlRPmEX.js","assets/claimAdjusterAction-oqeOq1lH.js","assets/SelectDrawer-DhgsEU8N.css","assets/inviteTeamMembers-BuKlfgUH.js","assets/ContactTypeRoleDropdown-CnQY_VQ1.js","assets/CheckXss-C7CSmM16.js","assets/claims--a32F5jc.js","assets/claims-BlPpEyBV.css","assets/ResetPasswordModal-D2-skNYc.js","assets/validatePassword-Bnfaf5h2.js","assets/PersonalInformationModal-BtSoe6Bc.js","assets/ProfilePhotoUpload-C_ZSaJ6W.js","assets/PersonalInformationCard-C35AGDMe.js","assets/QuickLink-DetevWAA.js","assets/EmailAndNotification-D01sTojM.js","assets/index-CF-VrjPL.js","assets/ConvertJsonKey-DdovfNat.js","assets/formModelTypeAction-BX-cGiIE.js","assets/SelectDrawer-B6nipIvf.js","assets/countries-Dt7FWKY3.js","assets/CommonExport-BBDaq8DK.js","assets/ClaimScoreTabDrawer-DK_5kMWs.js","assets/CustomMomentPicker-Ea8lqxL_.js","assets/index-iFLNUR8X.js","assets/closeClaimAction-CfqaYkj-.js","assets/UnSaveChangeModal-De5YQO7l.js","assets/claimNameAction-DnrWUrng.js","assets/index-C8GzeFRG.css","assets/Tasks-Dc_OkBhf.js","assets/taskRequestCountAction-BSSH3NqD.js","assets/CreateTaskModal-cUCzPczT.js","assets/index-Cyi992r8.js","assets/ReturnFullAddress-Dcgevuy6.js","assets/index-CHUDUlP0.js","assets/index-X4bD7v9n.css","assets/AdminSetting-yZq05bky.js","assets/CollaboratorContactTag-Ddt7npA4.js","assets/AdminSetting-PeiJBUln.css","assets/errorPage-CyoOG97g.js","assets/GlobalSearch-6Tp6aBod.js","assets/ClaimScoreView-CcLkwFrJ.js","assets/BulkAccess-CzH25YN1.js","assets/index-Bh4iAJFg.js","assets/EventDetailsModal-qsSJLhGj.js","assets/closedMatterUpdate-HKfd6u6E.js","assets/Upload-MHhBdGYz.js","assets/EventDetailsModal-BYau2s6X.css","assets/index-CLEa-5XL.css","assets/StaticPage-C-0SLnqf.js","assets/AddMatterModel-BKHEPVsV.js","assets/getGlobalFilter-Z-O_ZH9t.js","assets/CountyDropdown-B8Jn6a8G.js","assets/MatterSuccessModal-BatHuhXe.js","assets/AddClaimModel-CEhiAclc.js","assets/ClaimSuccessModal-0G3N7H06.js","assets/login-CVLArGX1.js","assets/2fa-D1317yYg.js","assets/Register-BJfrlhlE.js","assets/LinkExpire-DavniP66.js","assets/ResetPassword-_QLoKSed.js","assets/NewPassword-BWEMnJVd.js","assets/CheckEmail-BPMJO3DS.js","assets/sso-yDqG60wp.js"])))=>i.map(i=>d[i]); 2import{a as Ve,s as ie,j as a,F as G,f as Ms,c as Ee,b as so,d as ro,u as de,e as M,C as ze,g as Fs,q as $a,r as d,M as ot,h as oo,R as ke,B as X,L as Z,i as Rt,k as Me,S as nt,l as it,m as pa,n as Ga,o as be,A as ve,p as no,t as xa,v as io,w as ye,x as Mt,y as Ue,I as Ae,z as gt,D as Ft,E as lo,G as _a,H as
2ne,J as Zt,K as Xe,N as Le,O as lt,P as co,T as Oe,Q as Ye,U as uo,V as mo,W as ho,X as Ut,Y as jt,Z as fo,_ as Ie,$ as pt,a0 as K,a1 as go,a2 as Wt,a3 as po,a4 as xo,a5 as Us,a6 as Ps,a7 as _o,a8 as we,a9 as Va,aa as yo,ab as Co,ac as So,ad as bo,ae as To,af as _e,ag as oa,ah as ya,ai as wo,aj as zs,ak as Eo,al as kt,am as It,an as No,ao as St,ap as vo,aq as Bs,ar as jo,as as $s,at as Kt,au as Ha,av as mt,aw as ko,ax as Io,ay as Do,az as et,aA as Gs,aB as Vs,aC as Ao,aD as at,aE as Oo,aF as qa,aG as Pt,aH as Hs,aI as qs,aJ as Js,aK as Lo,aL as Ro,aM as Mo,aN as Fo,aO as Zs,aP as Nt,aQ as Te,aR as Uo,aS as Po,aT as zo,aU as Bo,aV as Ws,aW as $o,aX as Go,aY as Vo}from"./.pnpm-BA7nqZ-x.js";(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))o(i);new MutationObserver(i=>{for(const n of i)if(n.type==="childList")for(const l of n.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&o(l)}).observe(document,{childList:!0,subtree:!0});function s(i){const n={};return i.integrity&&(n.integrity=i.integrity),i.referrerPolicy&&(n.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?n.credentials="include":i.crossOrigin==="anonymous"?n.credentials="omit":n.credentials="same-origin",n}function o(i){if(i.ep)return;i.ep=!0;const n=s(i);fetch(i.href,n)}})();const qe=()=>{try{return window.self!==window.top}catch{return!0}},xt=()=>{try{const t="__localStorage_test__";return localStorage.setItem(t,t),localStorage.removeItem(t),!0}catch{return!1}},na=(t,e=null)=>{try{if(xt())return localStorage.getItem(t)}catch(s){console.warn(`Could not access localStorage for key "${t}":`,s)}return e},Ca=(t,e)=>{try{if(xt())return e==null?localStorage.removeItem(t):localStorage.setItem(t,e),!0}catch(s){console.warn(`Could not set localStorage for key "${t}":`,s)}return!1},Ho=t=>{try{if(xt())return localStorage.removeItem(t),!0}catch(e){console.warn(`Could not remove localStorage for key "${t}":`,e)}return!1},Sa=()=>{if(!qe())return null;if(document.referrer)try{return new URL(document.referrer).hostname}catch(t){console.log("Error parsing referrer URL:",t)}return null},qo=(t,e=null)=>{let s="";if(t.auth.remember_me===!0&&(e=15),e){var o=new Date;o.setTime(o.getTime()+e*24*60*60*1e3),s="expires="+o.toUTCString()}const i=Sa(),n=ba(),l={auth:{isLogin:t.auth.isLogin,token:t.auth.user?.token,user:{token:t.auth.user?.token,first_name:t.auth.user?.first_name,last_name:t.auth.user?.last_name,company_name:t.auth.user?.company_name,primary_email_address:t.auth.user?.primary_email_address},iframeDomain:n?.auth?.iframeDomain||i}},c=qe(),m="SameSite=None; Secure;",u=_t(),_=u&&u!=="localhost"?`domain=.${u};`:"",g=window.location.hostname,y=c?`domain=.${g};`:_;document.cookie=`state=${JSON.stringify(l)};${e?s+";":""}${m}${y}path=/`},ba=()=>{const t=qe(),e=document.cookie.split(";");let s=null;for(let o=0;o<e.length;o++){const i=e[o].trim();if(i.startsWith("state="))try{const n=JSON.parse(i.slice(6));if(!t||n?.auth?.isLogin===!0)return n;s||(s=n)}catch{}}return s||{}};function _t(t=window.location.hostname){if(t==="localhost")return"localhost";const e=t?.split(".");if(e.length<=2)return t;const s=e?.slice(-2)?.join("."),o=e?.length>3?e[e?.length-3]:null;return o?`${o}.${s}`:s}function je(t,e,s={}){const o=_t(),i=qe(),n=window.location.hostname;Ve.set(t,e,{domain:`.${i?n:o}`,secure:!0,sameSite:"None",path:"/",expires:1/3,...s})}function le(t){return Ve.get(t)}function Ks(){return ba()?.auth?.parentSession||!1}function st(t){const e=qe(),s=_t(),o=window.location.hostname,i={domain:`.${e?o:s}`,path:"/"};Ks()&&(i.secure=!0,i.sameSite="None"),Ve.remove(t,i)}function Dt(t){const e=_t();Ve.remove(t,{domain:`.${e}`,path:"/",secure:!0,sameSite:"None"})}const Ja=["deviceId","app_build_version","is_org_updated"];function Ta(){const t=qe(),e=_t(),s=window.location.hostname;t&&Ja.push("exposureId"),document.cookie?.split(";").forEach(l=>{const c=l.indexOf("="),m=c>-1?l.substring(0,c).trim():l.trim();Ja.includes(m)||(document.cookie=`${m}=; path=/; domain=.${t?s:e}; expires=Thu, 01 Jan 1970 00:00:00 GMT; Secure; SameSite=None`)});const o=Ve.get();delete o.deviceId,delete o.app_build_version,delete o.is_org_updated,t&&delete o.exposureId;const i=le("redirect_url"),n=l=>{const c={domain:l,path:"/"};return Ks()&&(c.secure=!0,c.sameSite="None"),c};i&&Object.keys(o)?.forEach(l=>{Ve.remove(l,n(i))}),Object.keys(o)?.forEach(l=>{Ve.remove(l,n(`.${e}`))}),Object.keys(o)?.forEach(l=>{Ve.remove(l,n(`.${window.location.hostname}`))})}function He(){return le("token")}function Fd(t){t?.token&&je("token",t.token),je("redirect_url",t?.redirect_url||"")}const tt=t=>({type:"NOTIFICATIONTYPE",payload:t});let bt;const Za="zendesk-sso-iframe",Ys="zendesk_sso_last_sync_ts",Jo=3e4;function Qs(){const e="support.claim-deck.com".trim().toLowerCase();if(e)try{return new URL(e).hostname}catch{return e.split(/[/?#]/)[0]||void 0}}function Xs(){Ca(Ys,String(Date.now()))}function Zo(){const t=Number(na(Ys));return Number.isFinite(t)?Date.now()-t<Jo:!1}function er(){if(bt)return bt;const t="92af6ad8-5ca5-4d19-b525-ac5aa6375eeb";return bt=new Promise(e=>{if(document.getElementById("ze-snippet"))return e();const s=document.createElement("script");s.id="ze-snippet",s.async=!0,s.src=`https://static.zdassets.com/ekr/snippet.js?key=${t}`,s.onload=()=>e(),s.onerror=()=>e(),document.head.appendChild(s)}),bt}function tr(t=15e3){return new Promise(e=>{if(window.zE)return e();const s=Date.now(),o=setInterval(()=>{(window.zE||Date.now()-s>t)&&(clearInterval(o),e())},150)})}async function wa(t){if(t&&(await er(),await tr(),!!window.zE))return new Promise((e,s)=>{window.zE("messenger","loginUser",o=>{try{o(t),e()}catch(i){console.error("Zendesk login callback error",i),s(i)}},o=>{o?(console.error("Zendesk login error",o),s(o)):e()})})}const Wa=1e3;function ar(t){return new Promise(e=>{if(!t){e();return}if(document.querySelector(`iframe[name="${Za}"]`)){setTimeout(e,Wa);return}const o=document.createElement("iframe");o.src=t,o.style.display="none",o.name=Za,o.onload=()=>{setTimeout(e,Wa)},o.onerror=()=>
2{console.error("Zendesk SSO iframe failed to load"),e()},document.body.appendChild(o)})}function Wo(t){if(!t)return!1;try{const s=new URL(t,window.location.origin).hostname.toLowerCase(),o=Qs();return!!o&&s===o}catch{return!1}}async function Ko(t,e,s){const o=t?.zendesk_jwt,i=Wo(e),n=[];if(o){const l=wa(o);i&&n.push(l)}if(t?.zendesk_sso_url&&!t?.is_staff){const l=async()=>{try{Xs();const c=await s.getNewSSO();c?.status===200&&c?.data&&c?.data?.url&&await ar(c?.data?.url||t.zendesk_sso_url)}catch(c){console.error("Zendesk SSO sync failed",c)}};i?n.push(l()):l()}n.length>0&&await Promise.all(n)}async function ht(){if(await tr(),!!window.zE)try{window.zE("messenger","logoutUser")}catch(t){console.error("Zendesk logout error",t)}}const Ea=t=>({type:"LOGIN",...t}),zt=()=>({type:"LOGOUT"}),ft=t=>({type:"UPDATE",...t}),Yo=t=>async(e,s)=>{const{user:o}=s().auth;return e(ft({user:{...o,token:t}})),e(ia())},ia=(t=!1,e=()=>{})=>async(s,o)=>{const{user:i}=o().auth,n=i.token;if(!n)return;const l=new J(!0,!0,!0);try{const c=await l.getTokenLogin(n);if(c.status===200)if(je("redirect_url",c.data.redirect_url),c.data){const m={...i,redirect_url:c.data.redirect_url,token:c.data.token,manual_claim_entry_enabled:c.data.manual_claim_entry_enabled,office_enable:c.data.office_enable,trial_expiry_date:c.data.trial_expiry_date,on_trial:c.data.on_trial,office_id:c.data.office_id,global_admin_office_id:c.data.global_admin_office_id,permission_level:c.data.permission_level,office_turned_on:c.data.office_turned_on,practice_area_cs_config_enabled:c.data.practice_area_cs_config_enabled,snapsheet_enable:c.data.snapsheet_enable,collaborator_enable:c.data.collaborator_enable};s(ft({user:m}));const u=c?.data?.redirect_url||"";if(t&&u){je("redirect_url",u||""),je("is_org_updated",!0);const _=le("app_build_version");if(_){const h=new Date;h.setTime(h.getTime()+720*60*60*1e3);const x="app_build_version";document.cookie=`${x}=${encodeURIComponent(_)};expires=${h.toUTCString()};path=/;SameSite=Strict${window.location.protocol==="https:"?";Secure":""}`,je("page_from","auto-login")}const g=window.location.href,y=!1,f=new URL(g);y||(f.host=u),e?.(f.toString())}}else ie.error({icon:a.jsx("i",{className:"fas fa-times-circle"}),className:"error-notification",message:"Error",description:c.data.message});else ie.error({icon:a.jsx("i",{className:"fas fa-times-circle"}),className:"error-notification",message:"Error",description:c.data.message})}catch(c){if(console.log(c),c?.canceled)return;c?.response||ie.error({icon:a.jsx("i",{className:"fas fa-times-circle"}),className:"error-notification",message:"Error",description:"Something went wrong"})}},Qo=()=>async(t,e)=>{const s=He(),{user:o}=e().auth;if(!s)return;const i=new J(!0,!0,!0);try{const n=await i.getTokenLogin(s);if(n?.status!==200||!n?.data){ie.error({icon:a.jsx(G,{icon:Ms}),className:"error-notification",message:"Error",description:n?.data?.message});return}const l=n.data;je("redirect_url",l.redirect_url),je("token",l.token);const{manual_claim_entry_enabled:c,office_enable:m,trial_expiry_date:u,on_trial:_,office_id:g,global_admin_office_id:y,permission_level:f,office_turned_on:h,practice_area_cs_config_enabled:x,snapsheet_enable:T,collaborator_enable:C,events_enable:L}=l;t(ft({hydratedFromCookie:!1,parentSession:!0,user:{...o,manual_claim_entry_enabled:c,office_enable:m,trial_expiry_date:u,on_trial:_,office_id:g,global_admin_office_id:y,permission_level:f,office_turned_on:h,practice_area_cs_config_enabled:x,snapsheet_enable:T,collaborator_enable:C,events_enable:L}})),Ca("company_org_type",l.company_org_type);const w=le("exposureId");if(w){const D=(await i?.getClaimIdByExposureId?.({exposure_id:w}))?.data?.claim_id;D&&je("from_to_url",`/claim/${D}/overview`)}t(Ea({...l,front_org_type:l.third_party_user?"client":"admin",login_user_role_type:l.company_org_type})),t(tt({global_notification:!!l.global_notification,matter:!!l.matter,task_request:!!l.task_request,system:!!l.system,event:!!l.event})),l.zendesk_jwt&&wa(l.zendesk_jwt),t(ft({hydratedFromCookie:!1}))}catch(n){console.log("Error Refreshing token",JSON.stringify(n))}};function Yt(){return async t=>{try{const s=await new J(!0,!0,!0).refreshZendeskToken();s?.status===200&&s?.data?.zendesk_jwt?t({type:"AUTH_UPDATE_ZENDESK_JWT",payload:s.data.zendesk_jwt}):ht()}catch(e){console.error("Zendesk JWT refresh error",e),ht()}}}const Xo="claimdeck-auth";let Ze=null,la=!1,At=null,Ot=null;const sr=()=>(Ze||(Ze=new BroadcastChannel(Xo)),Ze),en=()=>{localStorage.setItem("force_logout",String(Date.now())),sr().postMessage({type:"LOGOUT"})},tn=t=>{const e=sr();la||(la=!0,Ot=s=>
2{s.data?.type==="LOGOUT"&&t()},e.addEventListener("message",Ot),At=s=>{s.key==="force_logout"&&s.newValue!==s.oldValue&&t()},window.addEventListener("storage",At))},Na=()=>{Ze&&(Ot&&Ze.removeEventListener("message",Ot),At&&window.removeEventListener("storage",At),Ze.close()),Ze=null,la=!1},rr=(t,e)=>{localStorage.clear(),Na(),t?.dispatch(zt())},an=t=>{const e=window.location.hostname,s=le("redirect_url"),o=le("is_org_updated");s&&s!==e&&!o&&(en(),rr(t))},va=t=>{const[e]=t.split(".");return e==="app"},Bt=t=>({type:"internetFlagTYPE",payload:t}),sn=()=>{try{if(!xt()){console.warn("localStorage not available (likely due to iframe restrictions), falling back to cookie data");return}const e=localStorage.getItem("state");if(e){var t=JSON.parse(e);return t}else return}catch(e){console.warn("Error loading from localStorage:",e);return}},Ka=t=>{try{if(!xt()){console.warn("localStorage not available, skipping save");return}let e;t.userType?e={...t}:e={...t,userType:{currentUser:"client"}};const s=JSON.stringify(e);localStorage.setItem("state",s)}catch(e){console.warn("Error saving to localStorage:",e)}};var rn={isVisible:!1,slug:""};const on=(t=rn,e)=>e.type==="AUDITHISTORY"?{...t,...e}:t;var nn={isLogin:!1,user:{}};const ln=(t=nn,e)=>{switch(e.type){case"LOGIN":return delete e.type,{...t,isLogin:!0,user:e};case"LOGOUT":return localStorage.setItem("force_logout",Date.now()),localStorage.clear(),Ta(),{isLogin:!1,isIframeLogin:!1,parentSession:!1};case"UPDATE":return delete e.type,{...t,...e};case"AUTH_UPDATE_ZENDESK_JWT":return{...t,user:t.user?{...t.user,zendesk_jwt:e.payload}:t.user};default:return t}},cn={selectedEvents:[]},dn=(t=cn,e)=>{switch(e.type){case"BULK_EVENTS_UPDATE_ADD":return{...t,selectedEvents:t.selectedEvents.includes(e.payload)?t.selectedEvents:[...t.selectedEvents,e.payload]};case"BULK_EVENTS_UPDATE_REMOVE":return{...t,selectedEvents:t.selectedEvents.filter(s=>s!==e.payload)};case"BULK_EVENTS_RESET":return{...t,selectedEvents:[]};case"BULK_EVENTS_UPDATE_SET":return{...t,selectedEvents:e.payload};default:return t}};var un={isClaimAdjuster:!1};const mn=(t=un,e)=>e.type==="CLAIMADJUSTER"?(delete e.type,{...t,isClaimAdjuster:e.payload.isclaim}):t,Ya={data:null,loading:!1,error:null},hn=(t=Ya,e)=>{switch(e.type){case"GET_COURT_TYPE_START":return{...t,loading:!0};case"GET_COURT_TYPE_SUCCESS":return{...t,data:e.payload,loading:!1};case"GET_COURT_TYPE_ERROR":return{...t,loading:!1,error:e.payload};case"RESET_GET_COURT_TYPE":return{...Ya};default:return t}},Qa={data:{},loading:!1,error:null},fn=(t=Qa,e)=>{switch(e.type){case"GET_CLAIM_DETAILS_START":return{...t,loading:!0};case"GET_CLAIM_DETAILS_SUCCESS":return{...t,loading:!1,data:e.payload};case"GET_CLAIM_DETAILS_ERROR":return{...t,loading:!1,error:e.payload};case"SET_CLAIM_DETAILS":return{...t,data:e.payload};case"RESET_CLAIM_DETAILS":return{...t,...Qa};default:return t}};var gn={currentClaimName:""};const pn=(t=gn,e)=>e.type==="CLAIMNAME"?(delete e.type,{...t,currentClaimName:e.payload}):t;let xn={loading:!1,hasClaimNumbersAdded:!1,errors:{}};const _n=(t=xn,e)=>{switch(e.type){case"FETCH_CLAIM_NUMBERS_DETAILS_START":return{...t,loading:!0};case"FETCH_CLAIM_NUMBERS_DETAILS_SUCCESS":return{...t,loading:!1,hasClaimNumbersAdded:e.payload.hasClaimNumbersAdded,errors:{}};case"FETCH_CLAIM_NUMBERS_DETAILS_FAILURE":return{...t,loading:!1,errors:e.payload.errors};default:return t}};var yn={isClaimClose:!1,isClaimCloseNewFlag:!1,closeInfoCardShow:!1,claimStatusId:""};const Cn=(t=yn,e)=>e.type==="CLOSECLAIMTYPE"?(delete e.type,{...t,isClaimClose:!1,isClaimCloseNewFlag:e.payload.closeFlag,closeInfoCardShow:e.payload.closeInfoCardShow,claimStatusId:e.payload.claimStatusId}):t,Sn={headerHeight:0,commonFlagLoading:!1},bn=(t=Sn,e)=>{switch(e.type){case"UPDATE_COMMON_STATE":return{...t,...e.payload||{}};case"UPDATE_COMMON_USER_FLAG":return{...t,commonFlagLoading:e.payload};default:return t}},Qt={deleteOffice:{loading:!1,error:""},turnOffOffice:{loading:!1,error:""},officeList:{pageSize:10,page:1,totalCount:0,data:[],loading:!1,error:"",search:""},editOffice:{data:null,loading:!1,error:""},warningMessage:{data:null,loading:!1,error:""}},Tn=(t=Qt,e)=>{switch(e.type){case"DELETE_OFFICE_BY_ID_START":return{...t,deleteOffice:{...t.deleteOffice,loading:!0}};case"DELETE_OFFICE_BY_ID_SUCCESS":return{...t,deleteOffice:{...t.deleteOffice,loading:!1}};case"DELETE_OFFICE_BY_ID_ERROR":return{...t,deleteOffice:{...t.deleteOffice,loading:!1,error:e.payload}};case"GET_OFFICE_LIST_START":return{...t,officeList:{...t.officeList,loading:!0}};case"GET_OFFICE_LIST_SUCCESS":return{...t,officeList:{...t.officeList,...e.payload,loading:!1}};case"UPDATE_SEARCH_BY_OFFICE":return{...t,officeList:{...t.officeList,search:e.payload}};case"EDIT_OFFICE_DETAILS_START":return{...t,editOffice:{...t.editOffice,loading:!0}};case"EDIT_OFFICE_DETAILS_SUCCESS":return{...t,editOffice:{...t.editOffice,data:t.payload,loading:!1}};case"EDIT_OFFICE_DETAILS_ERROR":return{...t,editOffice:{...t.editOffice,loading:!1,error:e.payload}};case"RESET_COMMON_OFFICE_DATA":return{...Qt};
2case"TURN_OFFICE_BY_ORG_ID_START":return{...t,turnOffOffice:{...t.turnOffOffice,loading:!0}};case"TURN_OFFICE_BY_ORG_ID_SUCCESS":return{...t,turnOffOffice:{...t.turnOffOffice,loading:!1}};case"TURN_OFFICE_BY_ORG_ID_ERROR":case"GET_OFFICE_WARNING_MESSAGE_START":return{...t,warningMessage:{...t.warningMessage,loading:!0}};case"GET_OFFICE_WARNING_MESSAGE_ERROR":return{...t,warningMessage:{...t.warningMessage,loading:!1,error:e.payload}};case"RESET_OFFICES_LIST_DATA":return{...t,officeList:{...Qt.officeList}};default:return t}},Xt={data:{officeName:"",primaryPhoneNumber:"",phoneNumbers:[],streetAddress:"",country:"United States",city:"",state:null,zipcode:"",timezone:"",officeAdmins:[],teamMembers:[]},loading:!1,error:null,isShowValidationMessage:!1,selectedContacts:[],contacts:[],contactsLoading:!1,isDetailsUpdated:!1,isSelectedAll:!1},wn=(t=Xt,e)=>{switch(e.type){case"CREATE_OFFICE_START":return{...t,loading:!0};case"CREATE_OFFICE_SUCCESS":return{...t,loading:!1,isDetailsUpdated:!1};case"CREATE_OFFICE_ERROR":return{...t,loading:!1,error:e.payload};case"SET_OFFICE_FORM_DETAILS":return{...t,data:e.payload,isDetailsUpdated:!0};case"SET_VALIDATION_MESSAGE":return{...t,isShowValidationMessage:e.payload};case"SELECTED_CONTACTS":return{...t,selectedContacts:[...e.payload]};case"GET_CONTACTS_LIST_START":return{...t,contactsLoading:!0};case"GET_CONTACTS_LIST_SUCCESS":return{...t,contacts:e.payload,contactsLoading:!1};case"GET_CONTACTS_LIST_ERROR":return{...t,contactsLoading:!1};case"UPDATE_SELECT_ALL_TOGGLE":return{...t,isSelectedAll:e.payload};case"RESET_OFFICE_FORM_DETAILS":return{...Xt,data:{...Xt.data,...e.payload}};default:return t}},Xa={data:null,loading:!1,error:null,deleteLoading:!1,claim_events_subscription:!1,reloadEvents:null},En=(t=Xa,e)=>{switch(e.type){case"GET_EVENT_DETAILS_START":return{...t,loading:!0};case"GET_EVENT_DETAILS_SUCCESS":return{...t,loading:!1,data:e.payload};case"GET_EVENT_DETAILS_ERROR":return{...t,loading:!1,error:e.payload};case"SET_SELECTED_EVENT":return{...t,data:e.payload};case"RESET_EVENT_DETAILS":return{...t,...Xa,claim_events_subscription:t?.claim_events_subscription};case"DELETE_EVENT_DETAILS_START":return{...t,deleteLoading:!0};case"DELETE_EVENT_DETAILS_SUCCESS":return{...t,deleteLoading:!1};case"DELETE_EVENT_DETAILS_ERROR":return{...t,deleteLoading:!1,error:e.payload};case"SET_CLAIM_EVENTS_SUBSCRIPTION":return{...t,claim_events_subscription:e.payload};case"RELOAD_EVENT_LIST":return{...t,reloadEvents:e.payload};default:return t}},es={data:null,loading:!1,error:null,totalCount:0,updateLoading:!1,applyFilters:null,creators:[],categories:[],otherCategories:[],claimAssociationList:[],adjustersList:[],showResultsButton:!1,countLoading:!1,isFilterApply:!1},Nn=(t=es,e)=>{switch(e.type){case"GET_EVENT_FILTERS_START":return{...t,loading:!0};case"GET_EVENT_FILTERS_SUCCESS":return{...t,...e.payload,loading:!1};case"GET_EVENT_FILTERS_ERROR":return{...t,loading:!1,error:e.payload};case"UPDATE_EVENT_FILTERS_START":return{...t,updateLoading:!0};case"UPDATE_EVENT_FILTERS_SUCCESS":return{...t,...e.payload,updateLoading:!1};case"UPDATE_EVENT_FILTERS_ERROR":return{...t,updateLoading:!1,error:e.payload};case"SET_SELECTED_FILTERS_COUNT":return{...t,totalCount:e.payload,countLoading:!1};case"SET_SELECTED_FILTERS":return{...t,data:e.payload};case"SET_APPLIED_FILTERS":return{...t,applyFilters:e.payload};case"SET_EVENT_CREATORS_LIST":return{...t,creators:e.payload};case"SET_EVENT_CATEGORIES_LIST":return{...t,...e.payload};case"SET_SHOW_LIST_BUTTON":return{...t,showResultsButton:e.payload};case"SET_FILTERS_COUNT_LOADING":return{...t,countLoading:e.payload};case"SET_ADJUSTERS_LIST":return{...t,adjustersList:e.payload};case"GET_CLAIMS_LIST_START":return{...t,loading:!0};case"GET_CLAIMS_LIST_SUCCESS":return{...t,claimAssociationList:e.payload,loading:!1};case"GET_CLAIMS_LIST_ERROR":return{...t,loading:!1,error:e.payload};case"RESET_FILTERS":return{...t,...es,creators:t?.creators,categories:t?.categories,otherCategories:t?.categories,claimAssociationList:t?.claimAssociationList,adjustersList:t?.adjustersList,...e.payload};default:return t}},vn={isVisible:!1,slug:"Add New",isSuccessModalShow:!1,claimId:"",isClaimVisible:!1,isClaimSuccessModalShow:!1},jn=(t=vn,e)=>e.type==="FORMTYPE"?{...t,...e}
2:t,ts={count:void 0,unassignedContactsCount:void 0,offices:{data:[],loading:!1,error:""},unAssignedContacts:{data:[],loading:!1,error:""}},kn=(t=ts,e)=>{switch(e.type){case"GET_OFFICES_LIST_START":return{...t,offices:{...t?.offices,loading:!0}};case"GET_OFFICES_LIST_SUCCESS":return{...t,offices:{...t?.offices,data:e.payload,loading:!1}};case"GET_OFFICES_LIST_ERROR":return{...t,offices:{...t?.offices,error:e.payload,loading:!1}};case"ASSIGN_CONTACTS_START":return{...t,unAssignedContacts:{...t?.unAssignedContacts,loading:!0}};case"ASSIGN_CONTACTS_SUCCESS":return{...t,unAssignedContacts:{...t?.unAssignedContacts,data:e.payload,loading:!1}};case"ASSIGN_CONTACTS_ERROR":return{...t,unAssignedContacts:{...t?.unAssignedContacts,error:e.payload,loading:!1}};case"REFRESH_OFFICES_META_START":return{...t,loading:!0};case"REFRESH_OFFICES_META_SUCCESS":return{...t,count:e.payload.count,unassignedContactsCount:e.payload.unassignedContactsCount,loading:!1};case"SET_UNASSIGN_CONTACTS":return{...t};case"REFRESH_OFFICES_META_ERROR":return{...ts};default:return t}};var In={isContactAdded:!1};const Dn=(t=In,e)=>e.type==="GLOBALCONTACT"?(delete e.type,{...t,isContactAdded:e.payload}):t;var An={IsGlabalNotificationAvailable:!1,TaskDotShow:!1,MatterDotShow:!1,SyatemDotShow:!1,EventDotShow:!1};const On=(t=An,e)=>e.type==="NOTIFICATIONTYPE"?(delete e.type,{...t,IsGlabalNotificationAvailable:e.payload.global_notification,TaskDotShow:e.payload.task_request,MatterDotShow:e.payload.matter,SyatemDotShow:e.payload.system,EventDotShow:e.payload.event}):t;var Ln={search_keyword:"",total_count:0,claim_count:0,contact_count:0,document_count:0};const Rn=(t=Ln,e)=>e.type==="globalSearchTYPE"?(delete e.type,{...t,...e.payload}):t;var Mn={is_internet_on:!0};const Fn=(t=Mn,e)=>e.type==="internetFlagTYPE"?(delete e.type,{...t,...e.payload}):t;var Un={search_keyword:""};const Pn=(t=Un,e)=>e.type==="localSearchTYPE"?(delete e.type,{...t,...e.payload}):t;var zn={messenger_group_url:""};const Bn=(t=zn,e)=>e.type==="messengerChatTYPE"?(delete e.type,{...t,messenger_group_url:e.payload.messenger_group_url}):t;var $n=[];const Gn=(t=$n,e)=>e.type==="NUMBERNOTIFICATIONTYPE"?{...t,NumberNotificationType:e.payload}:t,Vn={data:{},visible:!1,loading:!1,error:null,contacts:[],totalContacts:0,tableLoading:!1,updateTableCount:0,all_user_ids:[]},Hn=(t=Vn,e)=>{switch(e.type){case"SHOW_OFFICE_DETAILS_DRAWER":return{...t,...e.payload||{},loading:!0};case"SHOW_OFFICE_DETAILS_DRAWER_SUCCESS":return{...t,data:e.payload,loading:!1};case"SHOW_OFFICE_DETAILS_DRAWER_ERROR":return{data:{},...t,loading:!1,error:e.payload};case"UPDATE_OFFICE_DETAILS_DRAWER":return{data:e.payload,...t};case"GET_OFFICE_CONTACTS_LIST":return{...t,tableLoading:!0};case"GET_OFFICE_CONTACTS_LIST_SUCCESS":return{...t,contacts:e.payload.contacts||[],totalContacts:e.payload.totalContacts||0,all_user_ids:e.payload.all_user_ids||[],tableLoading:!1};case"GET_OFFICE_CONTACTS_LIST_ERROR":return{...t,tableLoading:!1,error:e.payload};case"FORCE_UPDATE_CONTACTS_LIST_TABLE":return{...t,updateTableCount:t.updateTableCount+1};case"RESET_CONTACTS_LIST_TABLE":return{...t,contacts:[],totalContacts:0,tableLoading:!1};case"CLOSE_OFFICE_DETAILS_DRAWER":return{...t,data:{},visible:!1,loading:!1,error:null,contacts:[],totalContacts:0,tableLoading:!1,updateTableCount:0};default:return t}};var qn={};const Jn=(t=qn,e)=>e.type==="OVERVIEWNOTIFICATIONTYPE"?{...t,OverviewNotificationType:e.payload}:t;var Zn=[];const Wn=(t=Zn,e)=>e.type==="QUICKLINKTYPE"?{...t,QuickLinkType:e.payload}:t;var Kn={isPrivate:!1};const Yn=(t=Kn,e)=>e.type==="RESERVETYPE"?(delete e.type,{...t,isPrivate:e.payload}):t;var Qn={isVisible:!1,slug:""};const Xn=(t=Qn,e)=>e.type==="STATICPAGE"?{...t,...e}:t;var ei={pending_request:0,task_to_complete_Adjuster:0,incoming_request:0,task_to_complete_Attorney:0,isShowIncomingRequestTab:!1};const ti=(t=ei,e)=>{if(e.type==="TASKREQUESTCOUNTTYPE"){const s=e.payload||{};return{...t,pending_request:s?.pending_request??t.pending_request,task_to_complete_Adjuster:s?.task_to_complete_Adjuster??t.task_to_complete_Adjuster,incoming_request:s?.incoming_request??t.incoming_request,task_to_complete_Attorney:s?.task_to_complete_Attorney??t.task_to_complete_Attorney,isShowIncomingRequestTab:s?.incoming_request!==void 0?!!s?.incoming_request:t.isShowIncomingRequestTab}}else return t};var ai=[];const si=(t=ai,e)=>e.type==="USERQUICKLINKTYPE"?{...t,UserQuickLinkType:e.payload}:t;var ri={currentUser:"client"};const oi=(t=ri,e)=>e.type==="USERTYPE"?(delete e.type,{...t,...e}):t,ni={isOpen:!1,data:null,loading:!1,error:null},or=Ee({name:"addNewInviteCollaborator",initialState:ni,reducers:{toggleAddNewInviteCollaboratorModal:(t,e)=>{t.isOpen=e.payload},addNewInviteCollaboratorStart:t=>({...t,loading:!0}),addNewInviteCollaboratorSuccess:(t,e)=>({...t,data:e.payload,loading:!1}),addNewInviteCollaboratorError:(t,e)=>({...t,error:e.payload,loading:!1})}}),{toggleAddNewInviteCollaboratorModal:Ud,addNewInviteCollaboratorStart:Pd,addNewInviteCollaboratorSuccess:zd,addNewInviteCollaboratorError:Bd}=or.actions,ii=or.reducer,ea={individualContact:{data:null,loading:!1,error:null},claims:{data:[],loading:!1,error:null,next:null,pageSize:10,page:1,totalCount:0,search:""},filterCount:{contactCount:0,claimCount:0}},nr=Ee({name:"bulkAccess",initialState:ea,reducers:{getIndividualContactStart:t=>({...t,individualContact:{...t.individualContact,loading:!0}}),getIndividualContactSuccess:(t,e)=>({...t,individualContact:{...t.individualContact,data:e.payload,loading:!1}}),getIndividualContactError:(t,e)=>({...t,individualContact:{...t.individualContact,error:e.payload,loading:!1}}),getClaimsStart:t=>({...t,claims:{...t.claims,loading:!0}}),getClaimsSuccess:(t,e)=>({...t,claims:{...t.claims,...e.payload,loading:!1}}),getClaimsError:(t,e)=>({...t,claims:{...t.claims,error:e.payload,loading:!1}}),getFilterCountStart:t=>({...t,filterCount:{...t.filterCount,loading:!0}}),getFilterCountSuccess:(t,e)=>({...t,filterCount:{...t.filterCount,...e.payload,loading:!1}}),getFilterCountError:(t,e)=>({...t,filterCount:{...t.filterCount,error:e.payload,loading:!1}}),setClaimsSearchValue:(t,e)=>({...t,claims:{...t.claims,search:e.payload}}),resetBulkAccess:()=>({...ea}),resetClaimBulkAccess:t=>({...t,claims:{...ea?.claims}})}}),{getIndividualContactStart:$d,getIndividualContactSuccess:Gd,getIndividualContactError:Vd,getClaimsStart:Hd,getClaimsSuccess:qd,getClaimsError:Jd,getFilterCountStart:Zd,getFilterCountSuccess:Wd,getFilterCountError:Kd,setClaimsSearchValue:Yd,resetBulkAccess:Qd,resetClaimBulkAccess:Xd}=nr.actions,li=nr.reducer,ca=20,da=10,ua=0,as={contacts:[],loading:!1,error:null,limit:ca,offset:1,totalCount:0,loadMore:!1,addCollaboratorLoading:!1,collaboratorList:{data:[],loading:!1,error:null,totalCount:0,loadMore:!1,limit:da,offset:ua},pendingInvites:{data:[],loading:!1,error:null,totalCount:0,loadMore:!1,limit:da,offset:ua}},ir=Ee({name:"collaborator",initialState:as,reducers:{getCollaboratorsContactsStart:t=>{t.loading=!0},getCollaboratorsContactsSuccess:(t,e)=>({...t,loading:!1,...e.payload}),getCollaboratorsContactsError:(t,e)=>{t.loading=!1,t.error=e.payload},addCollaboratorStart:t=>{t.addCollaboratorLoading=!0},addCollaboratorSuccess:t=>({...t,addCollaboratorLoading:!1}),addCollaboratorError:(t,e)=>{t.addCollaboratorLoading=!1,t.error=e.payload},resetCollaboratorsContacts:t=>({...t,contacts:[],limit:ca,offset:1,totalCount:0,loadMore:!1}),resetCollaboratorPagination:t=>({...t,limit:ca,offset:1}),updateCollaboratorsContacts:(t,e)=>({...t,...e.payload}),updateContactListByType:(t,e)=>({...t,...e.payload}),resetCollaboratorsContactList:t=>({...t,collaboratorList:{data:[],loading:!1,error:null,totalCount:0,loadMore:!1,limit:da,offset:ua}}),resetCollaboratorTab:()=>as}}),{getCollaboratorsContactsStart:ci,getCollaboratorsContactsSuccess:di,getCollaboratorsContactsError:ss,addCollaboratorStart:ui,addCollaboratorSuccess:mi,addCollaboratorError:rs,resetCollaboratorsContacts:eu,resetCollaboratorPagination:tu,updateCollaboratorsContacts:au,updateContactListByType:su,resetCollaboratorsContactList:ru,resetCollaboratorTab:ou}=ir.actions,hi=ir.reducer,fi={data:null,loading:!1,error:null}
2,lr=Ee({name:"globalFilter",initialState:fi,reducers:{getGlobalFilterStart:t=>{t.data=null,t.loading=!0},getGlobalFilterSuccess:(t,e)=>{t.data=e.payload,t.loading=!1},getGlobalFilterError:(t,e)=>{t.loading=!1,t.error=e.payload}}}),{getGlobalFilterStart:nu,getGlobalFilterSuccess:iu,getGlobalFilterError:lu}=lr.actions,gi=lr.reducer,os={data:null,defaultConfiguration:null,currentConfiguration:null,loading:!1,error:null,showConfiguration:!1},cr=Ee({name:"matterConfiguration",initialState:os,reducers:{getMatterConfigurationStart:t=>{t.data=null,t.loading=!0},getMatterConfigurationSuccess:(t,e)=>{t.data=e.payload.data,t.defaultConfiguration=e.payload.defaultConfiguration,t.loading=!1},getMatterConfigurationError:(t,e)=>{t.loading=!1,t.error=e.payload},setShowConfiguration:(t,e)=>{t.showConfiguration=e.payload},setShowDefaultConfiguration:(t,e)=>{t.showConfiguration=e.payload,t.currentConfiguration=null},setCurrentConfiguration:(t,e)=>{t.showConfiguration=!!e.payload,t.currentConfiguration=e.payload},resetConfiguration:()=>({...os})}}),{getMatterConfigurationStart:cu,getMatterConfigurationSuccess:du,getMatterConfigurationError:uu,setShowConfiguration:mu,setShowDefaultConfiguration:hu,setCurrentConfiguration:fu,resetConfiguration:gu}=cr.actions,pi=cr.reducer,xi={loading:!1,error:null},dr=Ee({name:"matterDetailsContacts",initialState:xi,reducers:{getMatterDetailsContactsStart:t=>({...t,loading:!0}),getMatterDetailsContactsSuccess:(t,e)=>({...t,...e.payload,loading:!1}),getMatterDetailsContactsError:(t,e)=>({...t,error:e.payload,loading:!1})}}),{getMatterDetailsContactsStart:pu,getMatterDetailsContactsSuccess:xu,getMatterDetailsContactsError:_u}=dr.actions,_i=dr.reducer,ns={data:[],loading:!1,error:null,totalCount:0,page:1,limit:3},ur=Ee({name:"matterDrawerNotification",initialState:ns,reducers:{getMatterDrawerNotificationStart:t=>({...t,loading:!0}),getMatterDrawerNotificationSuccess:(t,e)=>({...t,...e.payload,loading:!1}),getMatterDrawerNotificationError:(t,e)=>({...t,error:e.payload,loading:!1}),updateMatterDrawerNotificationDetails:(t,e)=>({...t,...e.payload}),resetMatterDrawerNotificationData:()=>({...ns})}}),{getMatterDrawerNotificationStart:yu,getMatterDrawerNotificationSuccess:Cu,getMatterDrawerNotificationError:Su,updateMatterDrawerNotificationDetails:bu,resetMatterDrawerNotificationData:Tu}=ur.actions,yi=ur.reducer,is={matterId:null,requestId:null,scoreFieldsData:null,loading:!1,refreshing:!1,error:null},mr=Ee({name:"matterScore",initialState:is,reducers:{matterScoreRefreshScheduled:(t,e)=>{t.matterId===String(e.payload.matterId)&&t.scoreFieldsData&&(t.refreshing=!0,t.error=null)},getMatterScoreStart:(t,e)=>{const s=String(e.payload.matterId),o=!!(e.payload.preserveData&&t.matterId===s&&t.scoreFieldsData);t.matterId=s,t.requestId=e.payload.requestId??t.requestId,t.loading=!0,o||(t.scoreFieldsData=null,t.refreshing=!1),t.error=null},getMatterScoreSuccess:(t,e)=>{t.matterId!==String(e.payload.matterId)||e.payload.requestId!==void 0&&e.payload.requestId!==t.requestId||(t.scoreFieldsData=e.payload.data,t.loading=!1,t.refreshing=!1,t.error=null)},getMatterScoreError:(t,e)=>{t.matterId!==String(e.payload.matterId)||e.payload.requestId!==void 0&&e.payload.requestId!==t.requestId||(t.loading=!1,t.refreshing=!1,e.payload.preserveData||(t.scoreFieldsData=null),t.error=e.payload.message)},resetMatterScore:()=>is}}),{matterScoreRefreshScheduled:wu,getMatterScoreStart:Eu,getMatterScoreSuccess:Nu,getMatterScoreError:vu,resetMatterScore:ju}=mr.actions,Ci=mr.reducer,ls={loading:!1},hr=Ee({name:"matter",initialState:ls,reducers:{updateMatterStart:t=>{t.loading=!0},updateMatterEnd:t=>{t.loading=!1},updateMatterSuccess:t=>({...t,loading:!1}),resetMatterTab:()=>ls}}),{updateMatterStart:ku,updateMatterEnd:Iu,updateMatterSuccess:Du}=hr.actions,Si=hr.reducer,cs={organizationData:{data:null,loading:!1,error:null}},fr=Ee({name:"myOrganization",initialState:cs,reducers:{getOrganizationStart:t=>({...t,organizationData:{...t.organizationData,loading:!0}}),getOrganizationSuccess:(t,e)=>({...t,organizationData:{...t.organizationData,data:e.payload,loading:!1}}),getOrganizationError:(t,e)=>({...t,organizationData:{...t.organizationData,error:e.payload,loading:!1}}),resetOrgData:()=>({...cs})}}
2),{getOrganizationStart:bi,getOrganizationSuccess:Ti,getOrganizationError:ds,resetOrgData:Au}=fr.actions,wi=fr.reducer,us={events_enable:!1,office_enable:!1,manual_claim_entry_enabled:!1,business_unit_enable:!1,matter_litigation_id_enable:!1,legal_x_case_number_enable:!1,class_action_case_enable:!1,court_type_enable:!1,lock_closed_matter_updates:!1,court_type_na_enabled:!0,alternate_email_notification_enable:!1,sso_enforced:!1},gr=Ee({name:"organizationFeatureFlag",initialState:us,reducers:{setOrganizationFeatureFlags:(t,e)=>{Object.assign(t,e.payload)},resetOrganizationFeatureFlags:()=>us}}),{setOrganizationFeatureFlags:Ei,resetOrganizationFeatureFlags:Ou}=gr.actions,Ni=gr.reducer,vi={requestId:0},pr=Ee({name:"backgroundExportRefresh",initialState:vi,reducers:{requestBackgroundExportRefresh:t=>{t.requestId+=1}}}),{requestBackgroundExportRefresh:Lu}=pr.actions,ji=pr.reducer,ms={data:[],loading:!1,error:null,dailyDigests:!1,weeklyDigests:!1,updateLoading:!1},xr=Ee({name:"userEmailSetting",initialState:ms,reducers:{getUserEmailSettingsStart:t=>({...t,loading:!0}),getUserEmailSettingsSuccess:(t,e)=>({...t,loading:!1,...e.payload}),getUserEmailSettingsError:(t,e)=>({...t,error:e.payload,loading:!1}),updateUserEmailSettingsStart:(t,e)=>({...t,updateLoading:!0,data:e.payload.email_addresses,dailyDigests:e.payload.daily_digests,weeklyDigests:e.payload.weekly_digests}),updateUserEmailSettingsSuccess:(t,e)=>({...t,updateLoading:!1,...e.payload}),updateUserEmailSettingsError:(t,e)=>({...t,error:e.payload.error,...e.payload.previousSettings,updateLoading:!1}),resetUserEmailSettings:()=>({...ms})}}),{getUserEmailSettingsStart:Ru,getUserEmailSettingsSuccess:Mu,getUserEmailSettingsError:Fu,updateUserEmailSettingsStart:Uu,updateUserEmailSettingsSuccess:Pu,updateUserEmailSettingsError:zu}=xr.actions,ki=xr.reducer,Ii=so({auth:ln,userType:oi,staticPage:Xn,reserveType:Yn,formModelType:jn,closeClaim:Cn,messengerChat:Bn,globalSearch:Rn,notification:On,quickLink:Wn,userQuickLink:si,auditHistory:on,overviewNotification:Jn,numberNotification:Gn,taskRequestCountReducer:ti,globalContact:Dn,localSearch:Pn,currentClaimName:pn,claimAdjuster:mn,internetFlag:Fn,eventDetails:En,eventsFilters:Nn,bulkEventUpdate:dn,claimDetails:fn,claimNumberDetails:_n,createOffice:wn,genericOfficeReducer:kn,officeDetailsDrawerReducer:Hn,commonOfficeState:Tn,commonAppState:bn,claimCourtType:hn,globalFilter:gi,matterConfiguration:pi,bulkAccess:li,matterDrawerNotification:yi,matterDetailsContacts:_i,collaborator:hi,userEmailSettings:ki,organizationFeatureFlag:Ni,matter:Si,addNewInviteCollaborator:ii,myOrganization:wi,matterScore:Ci,backgroundExportRefresh:ji}),hs=!1,Di={immutableCheck:hs,serializableCheck:hs},fs=t=>{const{backgroundExportRefresh:e,...s}=t;return s},Ai=t=>{if(!t?.auth)return t;const{auth:e,...s}=t;return Object.keys(s).length?s:void 0}
2,Oi=({persistedStateCookie:t,persistedStateLocalstorage:e,hasCookieToken:s,isMainDomain:o})=>!s&&(e?.auth?.isLogin||t?.auth?.isLogin)?{preloadedState:Ai(e),shouldSave:!1}:!e?.auth?.isLogin&&t?.auth?.isLogin&&s&&!o?{preloadedState:{...t,auth:{...t.auth,hydratedFromCookie:!0,parentSession:!0}},shouldSave:!0}:!e&&t?{preloadedState:t,shouldSave:!0}:{preloadedState:e??void 0,shouldSave:!1},We=()=>{const t=ba(),e=sn(),{preloadedState:s,shouldSave:o}=Oi({persistedStateCookie:t,persistedStateLocalstorage:e,hasCookieToken:!!He(),isMainDomain:va(window.location.hostname)}),i=s;o&&s&&Ka(fs(s));const n=ro({reducer:Ii,middleware:l=>l(Di),preloadedState:i});return n.subscribe(()=>{const l=n.getState(),c=fs(l);qo(c),Ka(c)}),n};We();const ja=de,ma=M;var Li={};const Ri=Li.REACT_APP_ENCRYPTION_KEY||"12345215124s15154231241524123po2",_r=ze.enc.Utf8.parse(Ri),yr=ze.enc.Utf8.parse("1234567890123456");function Mi(t){return ze.AES.encrypt(t,_r,{iv:yr,mode:ze.mode.CBC,padding:ze.pad.Pkcs7}).toString()}function ka(t){return ze.AES.decrypt(t,_r,{iv:yr,mode:ze.mode.CBC,padding:ze.pad.Pkcs7}).toString(ze.enc.Utf8)}function Fi(t){var e=/\n/g;return t.replace(e,"<br>")}const Cr=t=>{let e=/[â]/g,s=/[â]/g,o=/[â]/g,i=/[â]/g;return t?t.toString().replaceAll(e,"'").replaceAll(s,"'").replaceAll(o,'"').replaceAll(i,'"'):""},Ui=async(t,e)=>{try{const s=await fetch(t,{method:"GET"});s.ok||console.error("Error downloading file");const o=await s.blob(),i=window.URL.createObjectURL(o),n=document.createElement("a");return n.href=i,n.download=e,document.body.appendChild(n),n.click(),document.body.removeChild(n),window.URL.revokeObjectURL(i),!0}catch(s){return console.error("Error downloading file:",s),!1}},Bu=(t,e)=>{try{const s=window.URL.createObjectURL(t),o=document.createElement("a");o.href=s,o.setAttribute("download",e),document.body.appendChild(o),o.click(),o.remove()}catch(s){return console.error("Error downloading file:",s),!1}},$u=t=>{if(!t)return"";const e=parseFloat(t);return e>=1e15?(e/1e15).toFixed(1):e>=1e12?(e/1e12).toFixed(0):e>=1e9?(e/1e9).toFixed(0):e>=1e6?(e/1e6).toFixed(0):t.toString()},Gu=t=>{if(!t)return"";const e=parseFloat(t);return e>=1e15?"Q":e>=1e12?"T":e>=1e9?"B":e>=1e6?"M":""},Vu=["ant-picker-dropdown","ant-select-dropdown","ant-dropdown","ant-tooltip","ant-modal-content","ant-modal-wrap"];function Hu(t=""){const e=t?.split("/");return e[e?.length-1]?.split(".")?.slice(0,-1)?.join(".")}function qu(t,e){if(!e)return t;try{const s=new URL(t,window.location.origin);return s.searchParams.set("return_to",e),s.toString()}catch(s){console.warn("Invalid baseUrl",s);const o=t.includes("?")?"&":"?";return`${t}${o}return_to=${encodeURIComponent(e)}`}}const Sr=t=>{if(!t)return!1;const e=!1;try{const s=new URL(t),{protocol:o}=s;if(o==="https:"||e&&o==="http:")return window.location.replace(s.href),!0}catch(s){console.warn("Invalid redirect URL",s)}return!1},r={getOverViewTaskData:{url:"ClaimMatterInformation/",method:"get"},getDocumentDataByClaimId:{url:"ClaimMatterInformation/",method:"get"},getBudgetDataByClaimId:{url:"NumbersTab/get_budget_data",method:"get"},getReserveDataByClaimId:{url:"NumbersTab/get_reserve_data",method:"get"},getClaimValuationByClaimId:{url:"NumbersTab/get_valuation_data",method:"get"},getPossibleCoverageByClaimId:{url:"NumbersTab/get_policy_data",method:"get"},getLiensDataByClaimId:{url:"NumbersTab/get_liens_data",method:"get"},getQuickViewData:{url:"ClaimMatterInformation/",method:"get"},getAllClaims:{url:"ClaimMatterInformation",method:"get"},ColumnMetricsData:{url:"ColumnMetricsData",method:"get"},getClaimById:{url:"ClaimMatterInformation/",method:"get"},getClaimTopBarById:{url:"ClaimMatterInformation/",method:"get"},getClaimValuationsById:{url:"ClaimValuation",method:"get"},getClaimValuationsByPlaintiffId:{url:"ClaimValuation/",method:"get"},getClaimValuationsForExport:{url:"ClaimValuation/current_data_export_valuation",method:"get"},getLiensByPlaintiffId:{url:"Liens/",method:"get"},getLiensDataForExport:{url:"Liens/GetLiensDataForExport",method:"get"},getClaimNumberById:{url:"ClaimMatterInformation/Numbers/",method:"get"},getLineById:{url:"Liens",method:"get"},patchClaimById:{url:"ClaimMatterInformation/",method:"patch"},getFilter:{url:"Filters/get",method:"get"},updateFilter:{url:"Filters/update",method:"patch"},getClaimTaskFilters:{url:"Filters/GetClaimTaskFilters/",method:"get"},updateTaskFilter:{url:"Filters/UpdateTaskFilters/",method:"patch"},updateSort:{url:"Sorts/update",method:"patch"},getSort:{url:"Sorts/get",method:"get"},getQuickFilters:{url:"quick_filters/get",method:"get"}
2,updateQuickFilters:{url:"quick_filters/update",method:"patch"},columnMetrics:{url:"ColumnMetrics/update",method:"patch"},columnMetricsGetdata:{url:"ColumnMetrics/get",method:"get"},columnsUpdate:{url:"Columns/update",method:"patch"},patchClaimViewDisplayDetails:{url:"Columns/update_display_columns",method:"patch"},getStaticPageCall:{url:"dynamicpage/",method:"get"},patchClaimValuationNote:{url:"ClaimValuation/",method:"patch"},patchDamageByPlaintiff:{url:"ClaimMatterInformation/Numbers/ClaimValuations/Damages/Bulk/Damages",method:"post"},patchLienByPlaintiff:{url:"Liens/",method:"post"},addClaimByPlaintiff:{url:"ClaimMatterInformation/Plaintiff/ClaimValuation",method:"post"},patchLiabilityByClaimValuation:{url:"ClaimMatterInformation/Numbers/ClaimValuations/Liability/",method:"put"},getMatterContacts:{url:"ClaimMatterInformation/",method:"get"},getUserRole:{url:"User/me",method:"get"},addCustomCategoryForClaim:{url:"configvalues",method:"post"},postRegisterStep:{url:"User/user_registration",method:"post"},postResetPassword:{url:"User/forgot_password",method:"post"},postLogin:{url:"User/login",method:"post"},getTokenLogin:{url:"User/GetDetailsOfToken/",method:"get"},postNewPassword:{url:"User/reset_password",method:"post"},loggedUserResetPassword:{url:"User/logged_user_reset_password",method:"post"},validatePassword:{url:"User/validate_password_with_previous_passwords",method:"get"},checkToken:{url:"User/check_token",method:"post"},refreshZendeskToken:{url:"User/refresh_zendesk_messaging_token",method:"get"},updateReserve:{url:"ClaimMatterInformation/Number/Reserve/",method:"put"},addReserve:{url:"ClaimMatterInformation/Number/Reserve",method:"post"},getAllContactCall:{url:"Contacts",method:"get"},getAllContactCallV2:{url:"Contacts/list_v2",method:"get"},createGlobalContact:{url:"Contacts",method:"post"},addCustomCategoryForContact:{url:"Contacts/create_configs",method:"post"},getAllClaimDropdownCall:{url:"Contacts/get_claims_dropdown",method:"get"},updateBudgetBill:{url:"ClaimMatterInformation/Numbers/",method:"patch"},getBudgetTypeAndCode:{url:"budget-type-and-code",method:"get"},getBudget:{url:"ClaimMatterInformation/Numbers/",method:"get"},addBudget:{url:"ClaimMatterInformation/Numbers/",method:"post"},removeFromClaim:{url:"ClaimContacts/",method:"get"},validateRemoveAccessFromClaim:{url:"ClaimContacts/",method:"get"},addBudgetTypeAndCode:{url:"budget-type-and-code",method:"post"},ActivateGlobalContactStatusCall:{url:"Contacts/",method:"patch"},ResendInviteContactCall:{url:"Organization/OurTeamMembers/",method:"patch"},editGlobalContact:{url:"Contacts/",method:"patch"},editMatterCollaborator:{url:"ClaimContacts/",method:"patch"},getClaimCoverageById:{url:"ClaimMatterInformation/Numbers/PossibleCoverages/",method:"get"},addPolicyByDefendentId:{url:"ClaimMatterInformation/Numbers/PossibleCoverages/Policy",method:"post"},editPolicyByDefendentId:{url:"ClaimMatterInformation/Numbers/PossibleCoverages/Policy/",method:"put"},deletePolicyByDefendentId:{url:"ClaimMatterInformation/Numbers/PossibleCoverages/Policy/",method:"delete"},getAllContactByClaimCall:{url:"ClaimContacts",method:"get"},getCompanyContactByClaimDropCall:{url:"ClaimContacts/get_person_or_company",method:"get"},editBudgetDetails:{url:"ClaimMatterInformation/Numbers/",method:"post"},deleteBudget:{url:"ClaimMatterInformation/Numbers/",method:"delete"},addContactForClaimAccess:{url:"ClaimContacts/associate_claims_to_contact",method:"post"},createClaimContact:{url:"ClaimContacts",method:"post"},getClaimDropDownMetaData:{url:"ClaimMatterInformation/GetMetaData",method:"get"},addClaimMatterInformation:{url:"ClaimMatterInformation",method:"post"},getAllDocumentByClaimCall:{url:"ClaimMatterInformation/",method:"get"},getS3Token:{url:"User/get_aws_token",method:"get"},getNegotiationById:{url:"Negotiation",method:"get"},editNegotiationNote:{url:"Negotiation/",method:"patch"},patchNegotiation:{url:"Negotiation/bulk_negotiation_logs",method:"patch"},getClaimAndMetaData:{url:"get_budget_estimate_drop",method:"get"},postCloseClaimData:{url:"ClaimMatterInformation/CloseClaimMatter/",method:"post"},getBudgetRates:{url:"ClaimMatterInformation/Numbers/",method:"get"},addDocumentFile:{url:"ClaimMatterInformation/",method:"post"},addDocumentFolder:{url:"ClaimMatterInformation/",method:"post"},deleteFileFolder:{url:"ClaimMatterInformation/",method:"post"},deletePermanentFileFolder:{url:"ClaimMatterInformation/",method:"post"},getAllDocument:{url:"ClaimMatterInformation/",method:"get"},getDropdownFilesFolder:{url:"ClaimMatterInformation/",method:"get"},renameFileFolder:{url:"ClaimMatterInformation/",method:"post"},downloadFileFolder:{url:"ClaimMatterInformation/",method:"post"},recoverDeleteFileFolder:{url:"ClaimMatterInformation/",method:"post"},moveFileFolder:{url:"ClaimMatterInformation/",method:"post"},logOutCall:{url:"User/logout",method:"get"},getTaskMetaData:{url:"Task/GetCreateTaskMetaData",method:"get"},getTaskClaimDropdown:{url:"Task/get_claims_dropdown",method:"get"},getTaskAssigneeDropdown:{url:"Task/get_assignee_dropdown",method:"get"},getTaskAuthorityDropdown:{url:"Task/get_authority_dropdown",method:"get"},postTask:{url:"Task",method:"post"},getNegotiationGraph:{url:"Negotiation/",method:"get"},recoverRootFileFolder:{url:"ClaimMatterInformation/",method:"post"},getGlobalTaskCall:{url:"Task",method:"get"},getGlobalMatterTaskCall:{url:"Task/MatterTask/",method:"get"},allNotification:{url:"notification",method:"get"},notificationStatus:{url:"notification/get_notification_status",method:"get"},updateNotification:{url:"notification/",method:"patch"},allGlobalNotification:{url:"notification/get_global_notifications",method:"get"},dismissAllNotification:{url:"notification/dismiss_all_notifications",method:"get"},dismissNotification:{url:"notification/",method:"delete"},readAllNotification:{url:"notification/read_all_notifications",method:"get"},deleteTask:{url:"Task/",method:"delete"},addArchiveCall:{url:"Task/AddToArchive/",method:"get"},addUndoCompleteCall:{url:"Task/UndoComplete/",method:"get"},addUndoArchiveCall:{url:"Task/UndoArchive/",method:"get"},approveRequestCall:{url:"Task/ApproveTask/",method:"get"},getNotes:{url:"Task/GetTaskNotes/",method:"get"},postNotes:{url:"Task/TaskNotes/",method:"post"},completeTaskCall:{url:"Task/CompleteTask/",method:"put"},rejectRequestCall:{url:"Task/RejectRequest/",method:"post"},MoveNotNeededTask:{url:"Task/NotNeeded/",method:"get"},UndoApproveCall:{url:"Task/UndoApprove/",method:"get"},UndoRejectCall:{url:"Task/UndoReject/",method:"get"},ResendRequest:{url:"Task/ResendRequest/",method:"post"},getAuditData:{url:"history",method:"get"},exportHistoricalData:{url:"history/export_historical_data",method:"get"},getHistoryDot:{url:"history/get_history_dots",method:"get"},getRolesAndContactTypesMetaData:{url:"Organization/OurTeamMembers/RolesAndContactTypesMetaData",method:"get"},postImportUser:{url:"Organization/OurTeamMembers/ImportUser",method:"post"},getOurTeamMembers:{url:"Organization/OurTeamMembers",method:"get"},getAllQuickLinks:{url:"QuickLinks",method:"get"},postQuickLinks:{url:"QuickLinks",method:"post"}
2,updateQuickLinks:{url:"QuickLinks/",method:"patch"},updateQuickLinksOrder:{url:"QuickLinks/UpdateOrder",method:"patch"},deleteQuickLinks:{url:"QuickLinks/",method:"delete"},getAllUserQuickLinks:{url:"UserQuickLinks",method:"get"},postUserQuickLinks:{url:"UserQuickLinks",method:"post"},updateUserQuickLinks:{url:"UserQuickLinks/",method:"patch"},updateUserQuickLinksOrder:{url:"UserQuickLinks/UpdateOrder",method:"patch"},deleteUserQuickLinks:{url:"UserQuickLinks/",method:"delete"},markAllReadHistory:{method:"get"},markSingleReadHistory:{method:"get"},getMessengerchannels:{url:"MessengerGroup",method:"get"},getAccountInformation:{url:"User/me",method:"get"},getNewVerificationCode:{url:"User/resend_code",method:"get"},updateAccountInformation:{url:"User/UpdateUser",method:"patch"},getNewSSO:{url:"User/generate_new_zendesk_url",method:"get"},getGlobalSearchData:{url:"globalsearch",method:"get"},patchClaimValuationByPlaintiff:{url:"ClaimMatterInformation/Plaintiff/ClaimValuation",method:"patch"},getRecentSearchData:{url:"recentlyviewed",method:"get"},postRecentSearchData:{url:"recentlyviewed",method:"post"},getS3Url:{url:"User/upload_file_to_s3",method:"post"},updateTask:{url:"Task/UpdateTask/",method:"patch"},GetCloseMatterDetails:{url:"ClaimMatterInformation/GetCloseMatterDetails/",method:"get"},getContactDropdownData:{url:"Contacts/get_claim_and_contact_types_dropdown",method:"get"},getContactById:{url:"ClaimContacts/",method:"get"},getContactDetailById:{url:"ClaimContacts/details/",method:"get"},patchCaseStatus:{url:"ClaimMatterInformation/UpdateClaimMatterStatus/",method:"patch"},getRoleAndContactTypeMetaData:{url:"ClaimContacts/get_roles_and_contact_types",method:"get"},getConfigValue:{url:"configvalue",method:"get"},updateGlobalValuationNotes:{url:"ClaimMatterInformation/UpdateClaimValuationsNotes/",method:"patch"},updateBudgetNotes:{url:"ClaimMatterInformation/UpdateBudgetNotes/",method:"patch"},multipartDocumentUpload:{url:"ClaimMatterInformation/",method:"post"},revokeAccesData:{url:"Organization/OurTeamMembers/",method:"post"},updateLiensNotes:{url:"ClaimMatterInformation/UpdateLiensNotes/",method:"patch"},updatePossibleCoverageNotes:{url:"ClaimMatterInformation/UpdatePossibleCoveragesNotes/",method:"patch"},getClaimScore:{url:"claimscore",method:"get"},patchClaimScore:{url:"claimscore/",method:"patch"},claimScoreColumns:{url:"claimscore/get_conditional_drop_down",method:"get"},getOrgData:{url:"bulk_grant_revoke_access/get_organization",method:"get"},getPracData:{url:"bulk_grant_revoke_access/get_practice_area",method:"get"},getClaimData:{url:"bulk_grant_revoke_access/get_claims_api",method:"get"},getBulkContactCall:{url:"bulk_grant_revoke_access/get_contact_api",method:"get"},postBulkAccess:{url:"bulk_grant_revoke_access",method:"post"},getContactTypeData:{url:"bulk_grant_revoke_access/get_contact_type",method:"get"},getIndividualContactData:{url:"bulk_grant_revoke_access/get_individual_contact",method:"get"},getFilterContactClaimsCount:{url:"bulk_grant_revoke_access/get_contact_claim_counts",method:"get"},listMessengerChannels:{url:"MessengerGroup/list_channels",method:"get"},backgroundExports:{url:"export",method:"get"},backgroundExportsUpdate:{url:"export/",method:"patch"},addBackgroundExport:{url:"export",method:"post"},getEventCategories:{url:"events_categories",method:"get"},getEventCategoriesFilter:{url:"scheduled_events/get_event_categories_filter_dropdown",method:"get"},addEventCategory:{url:"events_categories",method:"post"},updateEventCategory:{url:"events_categories/",method:"patch"},addEvent:{url:"events",method:"post"},getCommonDocuments:{url:"common_documents",method:"get"},multipartCommonDocumentUpload:{url:"common_documents/",method:"post"},addCommonDocumentFile:{url:"common_documents/addfile",method:"post"},addCommonMultipleDocumentFile:{url:"common_documents/addmultiplefiles",method:"post"},getOverviewEvent:{url:"scheduled_events",method:"get"},getEventList:{url:"scheduled_events",method:"get"},getEventFilter:{url:"Filters/get",method:"get"},updateEventFilter:{url:"Filters/update",method:"patch"},bulkEventUpdate:{url:"bulk_event_update",method:"post"},deleteEvent:{url:"scheduled_events",method:"delete"},editEvent:{url:"scheduled_events",method:"patch"},exportEvent:{url:"scheduled_events/export_event",method:"get"},updateUserTimeZone:{url:"User/user_timezone_update",method:"patch"},createOffice:{url:"offices",method:"post"},getOfficeList:{url:"offices",method:"get"},getContacts:{url:"Organization/OurTeamMembers",method:"get"},assignContacts:{url:"offices/attach_members",method:"post"},deleteOffice:{url:"offices/",method:"delete"},editOffice:{url:"offices/",method:"patch"},turnOffOffice:{url:"offices/turn-off-offices",method:"post"},getOfficeValidationMessage:{url:"offices/get-warning-modal-type",method:"post"},getChangeUsersPermission:{url:"offices/change_users_permission",method:"post"},getUserFeatures:{url:"User/user_features",method:"get"},getEventExport:{url:"scheduled_events/export_ical",method:"get"},addSubscriptionForEvent:{url:"claim_subscriptions/add_subscription",method:"post"},getEventUpdatesSubscription:{url:"claim_subscriptions/my_subscriptions",method:"get"},ssoLogin:{url:"v2/sso_validate_redirect",method:"post"},getCourtTypeOptions:{url:"ClaimMatterInformation/court_type_dropdown",method:"get"},getGlobalFiltersOptions:{url:"ClaimMatterInformation/global_filters",method:"get"},getMatterConfigurations:{url:"claimscore/get_matter_configuration_counts",method:"get"},addClaimScoreConfiguration:{url:"claimscore/create_configuration_set",method:"post"},deleteMatterTypeConfiguration:{url:"claimscore/delete_configuration_set",method:"delete"},addMatterCollaborators:{url:"ClaimContacts/add_matter_collaborators",method:"post"},getAllCollaboratorsListByType:{url:"ClaimContacts/list_v2",method:"get"},getAllCollaboratorsContactList:{url:"Contacts/my_collaborators",method:"get"},getClaimIdByExposureId:{url:"ClaimMatterInformation/get_claim_id_by_exposure_id",method:"get"},getUserEmailSettings:{url:"User/email_settings",method:"get"},patchUserEmailSettings:{url:"User/update_email_settings",method:"patch"},getOrganizationFeatureFlags:{url:"User/organization_feature_flags",method:"get"},addNewInviteCollaborator:{url:"ClaimContacts/invite_matter_collaborator",method:"post"}
2,getOrganizationDetails:{url:"organization-details",method:"get"},saveOrganizationDetails:{url:"organization-details",method:"patch"},updateMatterOrganizationContactTypes:{url:"ClaimMatterInformation",method:"patch"},resendPendingCollaboratorInvite:{url:"ClaimContacts",method:"post"},revokePendingCollaboratorInvite:{url:"ClaimContacts",method:"post"}},Pi="claimdeck:matter-score-refresh",zi="x-claimdeck-matter-score-refresh",Bi=new Set(["post","put","patch","delete"]),$i=t=>{window.dispatchEvent(new CustomEvent(Pi,{detail:{matterId:t}}))},Gi=(t,e)=>{const s=t?.get?.(e);if(typeof s=="string")return s;const o=t?.toJSON?.()??t,i=Object.entries(o||{}).find(([n])=>n.toLowerCase()===e);return typeof i?.[1]=="string"?i[1]:void 0},br=t=>{const e=Gi(t.headers,zi),s=t.config?.method?.toLowerCase();!s||!Bi.has(s)||!e||e.split(",").map(o=>o.trim()).filter(o=>!!o).forEach($i)};class J{static pendingRequests=new Map;constructor(e=!1,s=!1,o=!1,i=!0){if(this.axios=Fs.create({}),window.navigator.onLine){if(e){const n=window&&window.location&&window.location.hostname;let l,c,m=n,u;if(n.match(/^(.*\.)?localhost$/),l="https://api.claim-deck.com/api/",window.location.search){const g=new URLSearchParams(window.location.search),y=g.get("token");y&&(u=g.get("encrypt")==="true"?ka(y):y)}const _=window.location.pathname.includes("login");u&&_?c="token "+u+" "+n:s&&He()&&(c="token "+He()+" "+n),this.axios.interceptors.request.use(g=>{const y=new RegExp("^(?:[a-z]+:)?//","i"),f=Sa();if(g.headers["X-iframe-Domain"]=f,g={...g,headers:{...g.headers,"Content-Type":g.headers["Content-Type"]==="multipart/form-data"?g.headers["Content-Type"]:"application/json"},url:y.test(g.url)?g.url:l+g.url},i&&(g=this.addPendingRequest(g)),s){const h=He();_&&u?g.headers.Authorization="token "+u+" "+n:h?g.headers.Authorization="token "+h+" "+n:c&&(g.headers.Authorization=c),g.headers.domain=m,g.headers["Page-Url"]=window?.location?.href}else g.headers.domain=m,g.headers["Page-Url"]=window?.location?.href,window.location.pathname.includes("login")&&window.location.search&&c&&(g.headers.Authorization=c);return g},function(g){return Promise.reject(g)})}this.axios.interceptors.response.use(n=>(this.removePendingRequest(n.config),br(n),n),async n=>{if(n.config&&this.removePendingRequest(n.config),n.response){if(n.response.status>=500&&window.location.replace(`${window.location.origin}/500`),[401].includes(n.response.status)&&!window.location.pathname.includes("login")){qe()&&(Dt("token"),Dt("state")),ht();const m=We();Ta(),Na(),m.dispatch(zt());let u=n.response.data.message,_=n.response.data.result.message_title||"Session Expired";setTimeout(()=>{window.location.replace(`${window.location.origin}/401?error_title=${_}&error_message=${u}`)},2e3),await new Promise(g=>setTimeout(g,3e3))}return n.response}return n?.name==="CanceledError"||n?.code==="ERR_CANCELED"?Promise.reject({canceled:!0}):Promise.reject(n)})}else We().dispatch(Bt({is_internet_on:window?.navigator?.onLine})),window.location.reload()}getRequestKey(e){const s=e?.method?.toLowerCase()||"get",[o,i]=(e?.url||"").split("?");let n={...e?.params||{}};if(i){const m=$a?.parse?.(i)||{};n={...n,...m}}const l={...n};Object.prototype.hasOwnProperty.call(l,"search")&&(l.search="");const c=Object.keys(l)?.length?$a?.stringify?.(l,{sort:(m,u)=>m?.localeCompare(u)}):"";return[s,o,c].filter(Boolean).join("&")}addPendingRequest(e){const s=this.getRequestKey?.(e);let o=J?.pendingRequests?.get?.(s)||[];if(new URLSearchParams(e?.url?.split?.("?")?.[1]||"")?.has?.("search")||e?.params?.search)o?.forEach?.(l=>l?.abort?.()),o=[];else for(;o?.length>=2;)o?.shift?.()?.abort?.();const n=new AbortController;return e.signal=n?.signal,o?.push?.(n),J?.pendingRequests?.set?.(s,o),e}removePendingRequest(e){const s=this.getRequestKey(e);if(J.pendingRequests.has(s)){let o=J.pendingRequests.get(s);o.length>0&&o.shift(),o.length===0?J.pendingRequests.delete(s):J.pendingRequests.set(s,o)}}getTaskDataByClaimId=(e,s)=>this.axios({method:r.getOverViewTaskData.method,url:r.getOverViewTaskData.url+e+"/get_task_data",params:s});getDocumentDataByClaimId=(e,s)=>this.axios({method:r.getDocumentDataByClaimId.method,url:r.getDocumentDataByClaimId.url+e+"/get_document_data",params:s});getBudgetDataByClaimId=e=>this.axios({method:r.getBudgetDataByClaimId.method,url:r.getBudgetDataByClaimId.url,params:e});getReserveDataByClaimId=e=>this.axios({method:r.getReserveDataByClaimId.method,url:r.getReserveDataByClaimId.url,params:e});getClaimValuationByClaimId=e=>this.axios({method:r.getClaimValuationByClaimId.method,url:r.getClaimValuationByClaimId.url,params:e});getPossibleCoverageByClaimId=e=>this.axios({method:r.getPossibleCoverageByClaimId.method,url:r.getPossibleCoverageByClaimId.url,params:e});getLiensDataByClaimId=e=>this.axios({method:r.getLiensDataByClaimId.method,url:r.getLiensDataByClaimId.url,params:e});getQuickViewDataById=(e,s)=>this.axios({method:r.getQuickViewData.method,url:r.getQuickViewData.url+e+"/get_quick_view",params:s});getAllClaimsCall=(e,s)=>this.axios({method:r.getAllClaims.method,url:r.getAllClaims.url,data:JSON.stringify({...e}),params:s});ColumnMetricsData=(e,s)=>this.axios({method:r.ColumnMetricsData.method,url:r.ColumnMetricsData.url,data:JSON.stringify({...e}),params:s});getClaimById=e=>this.axios({method:r.getClaimById.method,url:r.getClaimById.url+e});getClaimTopBarById=e=>this.axios({method:r.getClaimTopBarById.method,url:r.getClaimTopBarById.url+e+"/get_overview_top_bar"});getClaimValuationsById=e=>this.axios({method:r.getClaimValuationsById.method,url:r.getClaimValuationsById.url,params:e});getClaimValuationsByPlaintiffId=e=>this.axios({method:r.getClaimValuationsByPlaintiffId.method,url:r.getClaimValuationsByPlaintiffId.url+e});getClaimValuationsForExport=e=>this.axios({method:r.getClaimValuationsForExport.method,url:r.getClaimValuationsForExport.url,params:e});getLiensByPlaintiffId=e=>this.axios({method:r.getLiensByPlaintiffId.method,url:r.getLiensByPlaintiffId.url+e});getLiensDataForExport=e=>this.axios({method:r.getLiensDataForExport.method,url:r.getLiensDataForExport.url,params:e});getClaimNumberById=e=>this.axios({method:r.getClaimNumberById.method,url:r.getClaimNumberById.url+e});getLineById=e=>this.axios({method:r.getLineById.method,url:r.getLineById.url,params:e});patchClaimById=(e,s,o)=>this.axios({method:r.patchClaimById.method,url:r.patchClaimById.url+e,data:JSON.stringify({...o}),params:s});
2updateFilter=(e,s)=>this.axios({method:r.updateFilter.method,url:r.updateFilter.url,data:JSON.stringify({...e}),params:s});getFilter=e=>this.axios({method:r.getFilter.method,url:r.getFilter.url,params:e});getClaimTaskFilters=(e,s)=>this.axios({method:r.getClaimTaskFilters.method,url:r.getClaimTaskFilters.url+e,params:s});updateTaskFilter=(e,s,o)=>this.axios({method:r.updateTaskFilter.method,url:r.updateTaskFilter.url+e,data:JSON.stringify({...s}),params:o});getSort=e=>this.axios({method:r.getSort.method,url:r.getSort.url,params:e});updateSort=(e,s)=>this.axios({method:r.updateSort.method,url:r.updateSort.url,data:JSON.stringify({...e}),params:s});getQuickFilters=e=>this.axios({method:r.getQuickFilters.method,url:r.getQuickFilters.url,params:e});updateQuickFilters=e=>this.axios({method:r.updateQuickFilters.method,url:r.updateQuickFilters.url,data:JSON.stringify({...e})});columnMetrics=(e,s)=>this.axios({method:r.columnMetrics.method,url:r.columnMetrics.url,data:JSON.stringify({...e}),params:s});columnMetricsGetdata=e=>this.axios({method:r.columnMetricsGetdata.method,url:r.columnMetricsGetdata.url,data:JSON.stringify({...e})});columnsUpdate=(e,s)=>this.axios({method:r.columnsUpdate.method,url:r.columnsUpdate.url,data:JSON.stringify({...e}),params:s});columnsHeaders=()=>this.axios({method:r.columnsHeaders.method,url:r.columnsHeaders.url});patchClaimViewDisplayDetails=e=>this.axios({method:r.patchClaimViewDisplayDetails.method,url:r.patchClaimViewDisplayDetails.url,data:JSON.stringify({...e})});getStaticPageCall=e=>this.axios({method:r.getStaticPageCall.method,url:r.getStaticPageCall.url+e});patchClaimValuationNote=(e,s)=>this.axios({method:r.patchClaimValuationNote.method,url:r.patchClaimValuationNote.url+e+"/edit_notes",data:JSON.stringify({...s})});patchDamageByPlaintiff=e=>this.axios({method:r.patchDamageByPlaintiff.method,url:r.patchDamageByPlaintiff.url,data:JSON.stringify({...e})});getMatterContacts=e=>this.axios({method:r.getMatterContacts.method,url:r.getMatterContacts.url+e+"/get_matter_contacts"});getUserRole=()=>this.axios({method:r.getUserRole.method,url:r.getUserRole.url});patchLienByPlaintiff=(e,s)=>this.axios({method:r.patchLienByPlaintiff.method,url:r.patchLienByPlaintiff.url+e+"/bulk_update",data:JSON.stringify({...s})});addClaimByPlaintiff=e=>this.axios({method:r.addClaimByPlaintiff.method,url:r.addClaimByPlaintiff.url,data:JSON.stringify({...e})});patchLiabilityByClaimValuation=(e,s)=>this.axios({method:r.patchLiabilityByClaimValuation.method,url:r.patchLiabilityByClaimValuation.url+e,data:JSON.stringify({...s})});addCustomCategoryForClaim=e=>this.axios({method:r.addCustomCategoryForClaim.method,url:r.addCustomCategoryForClaim.url,data:JSON.stringify({...e})});postRegisterStep=(e,s)=>this.axios({method:r.postRegisterStep.method,url:r.postRegisterStep.url,data:JSON.stringify({...s}),params:e});postResetPassword=e=>this.axios({method:r.postResetPassword.method,url:r.postResetPassword.url,data:JSON.stringify({...e})});postLogin=e=>this.axios({method:r.postLogin.method,url:r.postLogin.url,data:JSON.stringify({...e})});getTokenLogin=e=>this.axios({method:r.getTokenLogin.method,url:r.getTokenLogin.url+e});getNewVerificationCode=e=>this.axios({method:r.getNewVerificationCode.method,url:r.getNewVerificationCode.url,params:e});postNewPassword=e=>this.axios({method:r.postNewPassword.method,url:r.postNewPassword.url,data:JSON.stringify({...e})});loggedUserResetPassword=e=>this.axios({method:r.loggedUserResetPassword.method,url:r.loggedUserResetPassword.url,data:JSON.stringify({...e})});validatePassword=e=>this.axios({method:r.validatePassword.method,url:r.validatePassword.url,params:e});checkToken=(e,s)=>this.axios({method:r.checkToken.method,url:r.checkToken.url,data:JSON.stringify({...s}),params:e});refreshZendeskToken=(e,s)=>this.axios({method:r.refreshZendeskToken.method,url:r.refreshZendeskToken.url,data:JSON.stringify({...s}),params:e});updateReserve=(e,s)=>this.axios({method:r.updateReserve.method,url:r.updateReserve.url+e,data:JSON.stringify({...s})});addReserve=e=>this.axios({method:r.addReserve.method,url:r.addReserve.url,data:JSON.stringify({...e})});getAllContactCall=(e,s)=>this.axios({method:r.getAllContactCall.method,url:r.getAllContactCall.url,data:JSON.stringify({...e}),params:s});getAllContactCallV2=(e,s)=>this.axios({method:r.getAllContactCallV2.method,url:r.getAllContactCallV2.url,data:JSON.stringify({...e}),params:s});createGlobalContact=(e,s)=>this.axios({method:r.createGlobalContact.method,url:r.createGlobalContact.url,data:JSON.stringify({...s}),params:e});addCustomCategoryForContact=e=>this.axios({method:r.addCustomCategoryForContact.method,url:r.addCustomCategoryForContact.url,data:JSON.stringify({...e})});getAllClaimDropdownCall=e=>this.axios({method:r.getAllClaimDropdownCall.method,url:r.getAllClaimDropdownCall.url,params:e});updateBudgetBill=(e,s,o)=>this.axios({method:r.updateBudgetBill.method,url:r.updateBudgetBill.url+e+"/Budget/"+s,data:JSON.stringify({...o})});getBudgetTypeAndCode=()=>this.axios({method:r.getBudgetTypeAndCode.method,url:r.getBudgetTypeAndCode.url});getBudget=e=>this.axios({method:r.getBudget.method,url:r.getBudget.url+e+"/Budget"});addBudget=(e,s)=>this.axios({method:r.addBudget.method,url:r.addBudget.url+e+"/Budget",data:JSON.stringify({...s})});addBudgetTypeAndCode=e=>this.axios({method:r.addBudgetTypeAndCode.method,url:r.addBudgetTypeAndCode.url,data:JSON.stringify({...e})});ActivateGlobalContactStatusCall=(e,s)=>this.axios({method:r.ActivateGlobalContactStatusCall.method,url:r.ActivateGlobalContactStatusCall.url+e+"/activate_deactivate",data:JSON.stringify({...s})});ResendInviteContactCall=(e,s)=>this.axios({method:r.ResendInviteContactCall.method,url:r.ResendInviteContactCall.url+e+"/resend_invite",data:JSON.stringify({...s})});
2removeFromClaim=(e,s)=>this.axios({method:r.removeFromClaim.method,url:r.removeFromClaim.url+e+"/remove_from_claim",params:s});getRemoveFromClaimModalInfo=(e,s)=>this.axios({method:r.validateRemoveAccessFromClaim.method,url:r.validateRemoveAccessFromClaim.url+e+"/validate_remove_access_from_claim",params:s});editGlobalContact=(e,s,o)=>this.axios({method:r.editGlobalContact.method,url:r.editGlobalContact.url+e,data:JSON.stringify({...o}),params:s});editMatterCollaborator=(e,s)=>this.axios({method:r.editMatterCollaborator.method,url:r.editMatterCollaborator.url+e,data:JSON.stringify({...s})});getClaimCoverageById=e=>this.axios({method:r.getClaimCoverageById.method,url:r.getClaimCoverageById.url+e});addPolicyByDefendentId=e=>this.axios({method:r.addPolicyByDefendentId.method,url:r.addPolicyByDefendentId.url,data:JSON.stringify({...e})});editPolicyByDefendentId=(e,s)=>this.axios({method:r.editPolicyByDefendentId.method,url:r.editPolicyByDefendentId.url+s,data:JSON.stringify({...e})});deletePolicyByDefendentId=e=>this.axios({method:r.deletePolicyByDefendentId.method,url:r.deletePolicyByDefendentId.url+e});getAllContactByClaimCall=(e,s)=>this.axios({method:r.getAllContactByClaimCall.method,url:r.getAllContactByClaimCall.url,data:JSON.stringify({...e}),params:s});getCompanyContactByClaimDropCall=e=>this.axios({method:r.getCompanyContactByClaimDropCall.method,url:r.getCompanyContactByClaimDropCall.url,params:e});editBudgetDetails=(e,s,o)=>this.axios({method:r.editBudgetDetails.method,url:r.editBudgetDetails.url+e+"/Budget/"+s+"/EditBudgetDetails",data:JSON.stringify({...o})});deleteBudget=(e,s)=>this.axios({method:r.deleteBudget.method,url:r.deleteBudget.url+e+"/Budget/"+s});addContactForClaimAccess=e=>this.axios({method:r.addContactForClaimAccess.method,url:r.addContactForClaimAccess.url,data:JSON.stringify(e)});createClaimContact=(e,s)=>this.axios({method:r.createClaimContact.method,url:r.createClaimContact.url,data:JSON.stringify({...s}),params:e});getClaimDropDownMetaData=e=>this.axios({method:r.getClaimDropDownMetaData.method,url:r.getClaimDropDownMetaData.url,params:e});addClaimMatterInformation=e=>this.axios({method:r.addClaimMatterInformation.method,url:r.addClaimMatterInformation.url,data:JSON.stringify({...e})});getAllDocumentByClaimCall=(e,s,o)=>this.axios({method:r.getAllDocumentByClaimCall.method,url:o?r.getAllDocumentByClaimCall.url+e+"/Documents/"+o:r.getAllDocumentByClaimCall.url+e+"/Documents",params:s});getS3Token=()=>this.axios({method:r.getS3Token.method,url:r.getS3Token.url});getNegotiationById=e=>this.axios({method:r.getNegotiationById.method,url:r.getNegotiationById.url,params:e});editNegotiationNote=(e,s)=>this.axios({method:r.editNegotiationNote.method,url:r.editNegotiationNote.url+s,data:JSON.stringify({...e})});patchNegotiation=(e,s)=>this.axios({method:r.patchNegotiation.method,url:r.patchNegotiation.url,data:JSON.stringify({...e}),params:s});getClaimAndMetaData=e=>this.axios({method:r.getClaimAndMetaData.method,url:"ClaimMatterInformation/"+e+"/"+r.getClaimAndMetaData.url});postCloseClaimData=(e,s)=>this.axios({method:r.postCloseClaimData.method,url:r.postCloseClaimData.url+e,data:JSON.stringify({...s})});getBudgetRates=e=>this.axios({method:r.getBudgetRates.method,url:r.getBudgetRates.url+e+"/Budget/GetBudgetRates"});addDocumentFile=(e,s)=>this.axios({method:r.addDocumentFile.method,url:r.addDocumentFile.url+e+"/Documents/addfile",data:JSON.stringify({...s})});addMultipleDocumentFile=(e,s)=>this.axios({method:r.addDocumentFile.method,url:r.addDocumentFile.url+e+"/Documents/addmultiplefiles",data:JSON.stringify({...s})});addCommonMultipleDocumentFile=e=>this.axios({method:r.addCommonMultipleDocumentFile.method,url:r.addCommonMultipleDocumentFile.url,data:JSON.stringify({...e})});addDocumentFolder=(e,s)=>this.axios({method:r.addDocumentFolder.method,url:r.addDocumentFolder.url+e+"/Documents",data:JSON.stringify({...s})});deleteFileFolder=(e,s)=>this.axios({method:r.deleteFileFolder.method,url:r.deleteFileFolder.url+e+"/Documents/destroy_folder_file",data:JSON.stringify({...s})});deletePermanentFileFolder=(e,s)=>this.axios({method:r.deletePermanentFileFolder.method,url:r.deletePermanentFileFolder.url+e+"/Documents/delete_permanently",data:JSON.stringify({...s})});getAllDocument=e=>this.axios({method:r.getAllDocument.method,url:r.getAllDocument.url+e+"/Documents"});getDropdownFilesFolder=(e,s)=>this.axios({method:r.getDropdownFilesFolder.method,url:r.getDropdownFilesFolder.url+e+"/Documents/DropdownFilesFolder",params:{limit:100,...s}});renameFileFolder=(e,s,o,i)=>this.axios({method:r.renameFileFolder.method,url:r.renameFileFolder.url+e+"/Documents/RenameFileOrFolder/"+s,data:JSON.stringify({...o}),params:i});downloadFileFolder=(e,s)=>this.axios({method:r.downloadFileFolder.method,url:r.downloadFileFolder.url+e+"/Documents/download_action_details",data:JSON.stringify({...s})});recoverDeleteFileFolder=(e,s)=>
2this.axios({method:r.recoverDeleteFileFolder.method,url:r.recoverDeleteFileFolder.url+e+"/Documents/recover_folders_files",data:JSON.stringify({...s})});moveFileFolder=(e,s)=>this.axios({method:r.moveFileFolder.method,url:r.moveFileFolder.url+e+"/Documents/MoveFileOrFolder",data:JSON.stringify({...s})});logOutCall=()=>this.axios({method:r.logOutCall.method,url:r.logOutCall.url});getNegotiationGraph=(e,s)=>this.axios({method:r.getNegotiationGraph.method,url:r.getNegotiationGraph.url+e+"/get_graph_data",params:s});recoverRootFileFolder=(e,s)=>this.axios({method:r.recoverRootFileFolder.method,url:r.recoverRootFileFolder.url+e+"/Documents/recover_folders_files_to_root",data:JSON.stringify({...s})});getTaskMetaData=e=>this.axios({method:r.getTaskMetaData.method,url:r.getTaskMetaData.url,params:e});getTaskClaimsData=e=>this.axios({method:r.getTaskClaimDropdown.method,url:r.getTaskClaimDropdown.url,params:e});getTaskAssigneesData=e=>this.axios({method:r.getTaskAssigneeDropdown.method,url:r.getTaskAssigneeDropdown.url,params:e});getTaskAuthoritysData=e=>this.axios({method:r.getTaskAuthorityDropdown.method,url:r.getTaskAuthorityDropdown.url,params:e});postTask=e=>this.axios({method:r.postTask.method,url:r.postTask.url,data:JSON.stringify({...e})});getGlobalTaskCall=e=>this.axios({method:r.getGlobalTaskCall.method,url:r.getGlobalTaskCall.url,params:e});getGlobalMatterTaskCall=(e,s)=>this.axios({method:r.getGlobalMatterTaskCall.method,url:r.getGlobalMatterTaskCall.url+e,params:s});allNotification=e=>this.axios({method:r.allNotification.method,url:r.allNotification.url,params:e});notificationStatus=()=>this.axios({method:r.notificationStatus.method,url:r.notificationStatus.url});updateNotification=(e,s)=>this.axios({method:r.updateNotification.method,url:r.updateNotification.url+e,data:JSON.stringify({...s})});allGlobalNotification=e=>this.axios({method:r.allGlobalNotification.method,url:r.allGlobalNotification.url,params:e});dismissAllNotification=e=>this.axios({method:r.dismissAllNotification.method,url:r.dismissAllNotification.url,params:e});readAllNotification=e=>this.axios({method:r.readAllNotification.method,url:r.readAllNotification.url,params:e});dismissNotification=(e,s)=>this.axios({method:r.dismissNotification.method,url:r.dismissNotification.url+e,data:JSON.stringify({...s})});deleteTask=e=>this.axios({method:r.deleteTask.method,url:r.deleteTask.url+e});addArchiveCall=e=>this.axios({method:r.addArchiveCall.method,url:r.addArchiveCall.url+e});addUndoCompleteCall=e=>this.axios({method:r.addUndoCompleteCall.method,url:r.addUndoCompleteCall.url+e});addUndoArchiveCall=e=>this.axios({method:r.addUndoArchiveCall.method,url:r.addUndoArchiveCall.url+e});approveRequestCall=e=>this.axios({method:r.approveRequestCall.method,url:r.approveRequestCall.url+e});getNotes=e=>this.axios({method:r.getNotes.method,url:r.getNotes.url+e});postNotes=(e,s)=>this.axios({method:r.postNotes.method,url:r.postNotes.url+e,data:JSON.stringify({...s})});completeTaskCall=e=>this.axios({method:r.completeTaskCall.method,url:r.completeTaskCall.url+e});rejectRequestCall=(e,s)=>this.axios({method:r.rejectRequestCall.method,url:r.rejectRequestCall.url+e,data:JSON.stringify({...s})});MoveNotNeededTask=e=>this.axios({method:r.MoveNotNeededTask.method,url:r.MoveNotNeededTask.url+e});UndoRejectCall=e=>this.axios({method:r.UndoRejectCall.method,url:r.UndoRejectCall.url+e});UndoApproveCall=e=>this.axios({method:r.UndoApproveCall.method,url:r.UndoApproveCall.url+e});ResendRequest=(e,s)=>this.axios({method:r.ResendRequest.method,url:r.ResendRequest.url+e,data:JSON.stringify({...s})});exportHistoricalData=e=>this.axios({method:r.exportHistoricalData.method,url:r.exportHistoricalData.url,params:e});getHistoryDot=e=>this.axios({method:r.getHistoryDot.method,url:r.getHistoryDot.url,params:e});getRolesAndContactTypesMetaData=()=>this.axios({method:r.getRolesAndContactTypesMetaData.method,url:r.getRolesAndContactTypesMetaData.url});postImportUser=e=>this.axios({method:r.postImportUser.method,url:r.postImportUser.url,data:JSON.stringify({...e})});getOurTeamMembers=e=>this.axios({method:r.getOurTeamMembers.method,url:r.getOurTeamMembers.url,params:e});getAllQuickLinks=e=>this.axios({method:r.getAllQuickLinks.method,url:r.getAllQuickLinks.url,params:e});postQuickLinks=e=>this.axios({method:r.postQuickLinks.method,url:r.postQuickLinks.url,data:JSON.stringify({...e})});
2updateQuickLinks=(e,s)=>this.axios({method:r.updateQuickLinks.method,url:r.updateQuickLinks.url+e,data:JSON.stringify({...s})});updateQuickLinksOrder=e=>this.axios({method:r.updateQuickLinksOrder.method,url:r.updateQuickLinksOrder.url,data:JSON.stringify({...e})});deleteQuickLinks=e=>this.axios({method:r.deleteQuickLinks.method,url:r.deleteQuickLinks.url+e});getAllUserQuickLinks=e=>this.axios({method:r.getAllUserQuickLinks.method,url:r.getAllUserQuickLinks.url,params:e});postUserQuickLinks=e=>this.axios({method:r.postUserQuickLinks.method,url:r.postUserQuickLinks.url,data:JSON.stringify({...e})});updateUserQuickLinks=(e,s)=>this.axios({method:r.updateUserQuickLinks.method,url:r.updateUserQuickLinks.url+e,data:JSON.stringify({...s})});updateUserQuickLinksOrder=e=>this.axios({method:r.updateUserQuickLinksOrder.method,url:r.updateUserQuickLinksOrder.url,data:JSON.stringify({...e})});deleteUserQuickLinks=e=>this.axios({method:r.deleteUserQuickLinks.method,url:r.deleteUserQuickLinks.url+e});getAuditData=(e,s)=>this.axios({method:r.getAuditData.method,url:s?r.getAuditData.url+s:r.getAuditData.url,params:e});markAllReadHistory=e=>this.axios({method:r.markAllReadHistory.method,url:"history/read_all_notifications",params:e});markSingleReadHistory=e=>this.axios({method:r.markSingleReadHistory.method,url:"history/"+e+"/read_notification"});getMessengerchannels=()=>this.axios({method:r.getMessengerchannels.method,url:r.getMessengerchannels.url});getAccountInformation=()=>this.axios({method:r.getAccountInformation.method,url:r.getAccountInformation.url});updateAccountInformation=e=>this.axios({method:r.updateAccountInformation.method,url:r.updateAccountInformation.url,data:JSON.stringify({...e})});updateUserTimeZone=e=>this.axios({method:r.updateUserTimeZone.method,url:r.updateUserTimeZone.url,data:JSON.stringify({...e})});getNewSSO=()=>this.axios({method:r.getNewSSO.method,url:r.getNewSSO.url});getGlobalSearchData=e=>this.axios({method:r.getGlobalSearchData.method,url:r.getGlobalSearchData.url,params:e});patchClaimValuationByPlaintiff=(e,s)=>this.axios({method:r.patchClaimValuationByPlaintiff.method,url:r.patchClaimValuationByPlaintiff.url+"/"+s,data:JSON.stringify({...e})});getRecentSearchData=e=>this.axios({method:r.getRecentSearchData.method,url:r.getRecentSearchData.url,params:e});postRecentSearchData=e=>this.axios({method:r.postRecentSearchData.method,url:r.postRecentSearchData.url,data:JSON.stringify({...e})});updateTask=(e,s)=>this.axios({method:r.updateTask.method,url:r.updateTask.url+e,data:JSON.stringify({...s})});GetCloseMatterDetails=e=>this.axios({method:r.GetCloseMatterDetails.method,url:r.GetCloseMatterDetails.url+e});getContactDropdownData=e=>this.axios({method:r.getContactDropdownData.method,url:r.getContactDropdownData.url,params:e});getContactById=(e,s)=>this.axios({method:r.getContactById.method,url:r.getContactById.url+e,params:s});getContactDetailById=(e,s)=>this.axios({method:r.getContactDetailById.method,url:r.getContactDetailById.url+e,params:s});patchCaseStatus=(e,s)=>this.axios({method:r.patchCaseStatus.method,url:r.patchCaseStatus.url+e,data:JSON.stringify({...s})});getRoleAndContactTypeMetaData=()=>this.axios({method:r.getRoleAndContactTypeMetaData.method,url:r.getRoleAndContactTypeMetaData.url});getConfigValue=e=>this.axios({method:r.getConfigValue.method,url:r.getConfigValue.url,params:e});updateGlobalValuationNotes=(e,s)=>this.axios({method:r.updateGlobalValuationNotes.method,url:r.updateGlobalValuationNotes.url+e,data:JSON.stringify({...s})});updateBudgetNotes=(e,s)=>this.axios({method:r.updateBudgetNotes.method,url:r.updateBudgetNotes.url+e,data:JSON.stringify({...s})});updateLiensNotes=(e,s)=>this.axios({method:r.updateLiensNotes.method,url:r.updateLiensNotes.url+e,data:JSON.stringify({...s})});updatePossibleCoverageNotes=(e,s)=>this.axios({method:r.updatePossibleCoverageNotes.method,url:r.updatePossibleCoverageNotes.url+e,data:JSON.stringify({...s})});getS3Url=e=>this.axios({method:r.getS3Url.method,url:r.getS3Url.url,data:e,headers:{"Content-Type":"multipart/form-data"}});initializeMultipartUpload=(e,s)=>this.axios({method:r.multipartDocumentUpload.method,url:r.multipartDocumentUpload.url+e+"/Documents/createMultipart",data:s});initializeCommonMultipartUpload=e=>this.axios({method:r.multipartCommonDocumentUpload.method,url:r.multipartCommonDocumentUpload.url+"createMultipart",data:e});multipartDocumentUpload=(e,s)=>this.axios({method:r.multipartDocumentUpload.method,url:r.multipartDocumentUpload.url+e+"/Documents/uploadPart",data:s,headers:{"Content-Type":"multipart/form-data"}});multipartCommonDocumentUpload=e=>this.axios({method:r.multipartCommonDocumentUpload.method,url:r.multipartCommonDocumentUpload.url+"uploadPart",data:e,headers:{"Content-Type":"multipart/form-data"}});finalizeMultipartUpload=(e,s)=>this.axios({method:r.multipartDocumentUpload.method,url:r.multipartDocumentUpload.url+e+"/Documents/completeMultipart",data:s});finalizeCommonMultipartUpload=e=>this.axios({method:r.multipartCommonDocumentUpload.method,url:r.multipartCommonDocumentUpload.url+"completeMultipart",data:e});abortMultipartUpload=(e,s)=>this.axios({method:r.multipartDocumentUpload.method,url:r.multipartDocumentUpload.url+e+"/Documents/abortMultipartUpload",data:s});abortCommonMultipartUpload=e=>this.axios({method:r.multipartDocumentUpload.method,url:r.multipartDocumentUpload.url+"/abortMultipartUpload",data:e});revokeAccess=(e,s)=>this.axios({method:r.revokeAccesData.method,url:r.revokeAccesData.url+e+"/revoke_access",data:s});getClaimScore=e=>this.axios({method:r.getClaimScore.method,url:r.getClaimScore.url,params:e});patchClaimScore=(e,s)=>this.axios({method:r.patchClaimScore.method,url:r.patchClaimScore.url+e,data:JSON.stringify({...s})});getClaimScoreColumns=e=>this.axios({method:r.claimScoreColumns.method,url:r.claimScoreColumns.url,params:e});getOrgData=e=>this.axios({method:r.getOrgData.method,url:r.getOrgData.url,params:e});getPracData=e=>this.axios({method:r.getPracData.method,url:r.getPracData.url,params:e});getClaimData=e=>this.axios({method:r.getClaimData.method,url:r.getClaimData.url,params:e});getContactTypeData=e=>this.axios({method:r.getContactTypeData.method,url:r.getContactTypeData.url,params:e});getIndividualContactData=e=>this.axios({method:r.getIndividualContactData.method,url:r.getIndividualContactData.url,params:e});getFilterContactClaimsCount=e=>this.axios({method:r.getFilterContactClaimsCount.method,url:r.getFilterContactClaimsCount.url,params:e});getBulkContactCall=(e,s)=>this.axios({method:r.getBulkContactCall.method,url:r.getBulkContactCall.url,data:JSON.stringify({...e}),params:s});postBulkAccess=e=>this.axios({method:r.postBulkAccess.method,url:r.postBulkAccess.url,data:JSON.stringify({...e})});listMessengerChannels=e=>this.axios({method:r.listMessengerChannels.method,url:r.listMessengerChannels.url,params:e});
2addBackgroundExport=e=>this.axios({method:r.addBackgroundExport.method,url:r.addBackgroundExport.url,data:JSON.stringify({...e})});backgroundExports=e=>this.axios({method:r.backgroundExports.method,url:r.backgroundExports.url,params:e});backgroundExportsUpdate=(e,s)=>this.axios({method:r.backgroundExportsUpdate.method,url:r.backgroundExportsUpdate.url+e,data:JSON.stringify({...s})});getEventCategories=e=>this.axios({method:r.getEventCategories.method,url:r.getEventCategories.url,params:e});getEventCategoriesFilter=e=>this.axios({method:r.getEventCategoriesFilter.method,url:r.getEventCategoriesFilter.url,params:e});addEventCategory=e=>this.axios({method:r.addEventCategory.method,url:r.addEventCategory.url,data:JSON.stringify({...e})});updateEventCategory=(e,s)=>this.axios({method:r.updateEventCategory.method,url:r.updateEventCategory.url+e,data:JSON.stringify({...s})});addEvent=e=>this.axios({method:r.addEvent.method,url:r.addEvent.url,data:JSON.stringify({...e})});getCommonDocuments=e=>this.axios({method:r.getCommonDocuments.method,url:r.getCommonDocuments.url,params:e});addCommonDocuments=e=>this.axios({method:r.addCommonDocumentFile.method,url:r.addCommonDocumentFile.url,data:JSON.stringify({...e})});getOverviewEvent=e=>this.axios({method:r.getOverviewEvent.method,url:r.getOverviewEvent.url,params:e});getOverviewEventById=e=>this.axios({method:r.getOverviewEvent.method,url:r.getOverviewEvent.url+`/${e}`});getEventList=e=>this.axios({method:r.getEventList.method,url:r.getEventList.url,params:e});getUserEventFilters=e=>this.axios({method:r.getEventFilter.method,url:r.getEventFilter.url,params:e});getFiltersCount=e=>this.axios({method:r.getOverviewEvent.method,url:r.getOverviewEvent.url+"/get_filtered_events_count",params:e});updateUserEventFilters=({params:e,data:s})=>this.axios({method:r.updateEventFilter.method,url:r.updateEventFilter.url,params:e,data:JSON.stringify({...s})});getEventCreators=e=>this.axios({method:r.getOverviewEvent.method,url:r.getOverviewEvent.url+"/get_event_creators",params:e});bulkEventUpdate=e=>this.axios({method:r.bulkEventUpdate.method,url:r.bulkEventUpdate.url,data:JSON.stringify({...e})});deleteEventById=(e,s)=>this.axios({method:r.deleteEvent.method,url:r.deleteEvent.url+`/${e}?pattern=${s}`});editEventById=(e,s,o)=>this.axios({method:r.editEvent.method,url:r.editEvent.url+`/${e}`,params:s,data:JSON.stringify({...o})});getEventFilterClaimContacts=e=>this.axios({method:r.getOverviewEvent.method,url:r.getOverviewEvent.url+"/get_event_claim_contacts",params:e});exportEvent=e=>this.axios({method:r.exportEvent.method,url:r.exportEvent.url,params:e});createOffice=e=>this.axios({method:r.createOffice.method,url:r.createOffice.url,data:JSON.stringify({...e})});getOfficeList=e=>this.axios({method:r.getOfficeList.method,url:r.getOfficeList.url,params:e});getOfficeById=e=>this.axios({method:r.getOfficeList.method,url:r.getOfficeList.url+`/${e}`});getContactsList=e=>this.axios({method:r.getContacts.method,url:r.getContacts.url,params:e});assignContacts=(e,s={})=>this.axios({method:r.assignContacts.method,url:r.assignContacts.url,params:s,data:JSON.stringify(e)});deleteOfficeById=(e,s)=>this.axios({method:r.deleteOffice.method,url:r.deleteOffice.url+e,data:JSON.stringify(s)});editOfficeById=(e,s)=>this.axios({method:r.editOffice.method,url:r.editOffice.url+e,data:JSON.stringify(s)});turnOffOfficeByOrgId=e=>this.axios({method:r.turnOffOffice.method,url:r.turnOffOffice.url,data:JSON.stringify(e)});getOfficeValidationWarningMessage=e=>this.axios({method:r.getOfficeValidationMessage.method,url:r.getOfficeValidationMessage.url,data:JSON.stringify(e)});getChangeUsersPermission=e=>this.axios({method:r.getChangeUsersPermission.method,url:r.getChangeUsersPermission.url,data:JSON.stringify(e)});updateUserFeatureFlag=e=>this.axios({method:r.getUserFeatures.method,url:r.getUserFeatures.url,params:e});exportEventByClaimId=e=>this.axios({method:r.getEventExport.method,url:r.getEventExport.url,params:e});addSubscriptionForEvent=e=>this.axios({method:r.addSubscriptionForEvent.method,url:r.addSubscriptionForEvent.url,data:JSON.stringify(e)});getEventUpdatesSubscription=e=>this.axios({method:r.getEventUpdatesSubscription.method,url:r.getEventUpdatesSubscription.url,params:e});ssoLogin=e=>this.axios({method:r.ssoLogin.method,url:r.ssoLogin.url,data:JSON.stringify(e)});getCourtTypeOptions=e=>this.axios({method:r.getCourtTypeOptions.method,url:r.getCourtTypeOptions.url,params:e});getGlobalFilterOptions=e=>this.axios({method:r.getGlobalFiltersOptions.method,url:r.getGlobalFiltersOptions.url,params:e});getMatterConfigurations=()=>this.axios({method:r.getMatterConfigurations.method,url:r.getMatterConfigurations.url});addClaimScoreConfiguration=e=>this.axios({method:r.addClaimScoreConfiguration.method,url:r.addClaimScoreConfiguration.url,data:JSON.stringify({...e})});deleteMatterTypeConfiguration=(e="")=>this.axios({method:r.deleteMatterTypeConfiguration.method,url:r.deleteMatterTypeConfiguration.url+e});addMatterCollaborators=e=>this.axios({method:r.addMatterCollaborators.method,url:r.addMatterCollaborators.url,data:JSON.stringify(e)});getAllCollaboratorsListByType=e=>this.axios({method:r.getAllCollaboratorsListByType.method,url:r.getAllCollaboratorsListByType.url,params:e});getAllCollaboratorsContactList=e=>this.axios({method:r.getAllCollaboratorsContactList.method,url:r.getAllCollaboratorsContactList.url,params:e});getClaimIdByExposureId=e=>this.axios({method:r.getClaimIdByExposureId.method,url:r.getClaimIdByExposureId.url,params:e});getUserEmailSettings=()=>this.axios({method:r.getUserEmailSettings.method,url:r.getUserEmailSettings.url});patchUserEmailSettings=e=>this.axios({method:r.patchUserEmailSettings.method,url:r.patchUserEmailSettings.url,data:JSON.stringify(e)});getOrganizationFeatureFlags=()=>this.axios({method:r.getOrganizationFeatureFlags.method,url:r.getOrganizationFeatureFlags.url});addNewInviteCollaborator=e=>this.axios({method:r.addNewInviteCollaborator.method,url:r.addNe
2wInviteCollaborator.url,data:JSON.stringify(e)});getOrganizationDetails=e=>this.axios({method:r.getOrganizationDetails.method,url:r.getOrganizationDetails.url+"/"+e});saveOrganizationDetails=(e,s)=>this.axios({method:r.saveOrganizationDetails.method,url:r.saveOrganizationDetails.url+"/"+e,data:JSON.stringify(s)});updateMatterOrganizationContactTypes=(e,s,o)=>this.axios({method:r.updateMatterOrganizationContactTypes.method,url:r.updateMatterOrganizationContactTypes.url+"/"+e+"/organizations/"+s,data:JSON.stringify(o)});resendPendingCollaboratorInvite=e=>this.axios({method:r.resendPendingCollaboratorInvite.method,url:r.resendPendingCollaboratorInvite.url+"/"+e+"/resend_invite"});revokePendingCollaboratorInvite=e=>this.axios({method:r.revokePendingCollaboratorInvite.method,url:r.revokePendingCollaboratorInvite.url+"/"+e+"/revoke_invite"})}const Vi=(t=!1)=>{const e=He(),s=M(n=>n?.auth?.isLogin),o=M(n=>n?.auth?.user?.is_staff),i=M(n=>n?.auth?.user?.zendesk_sso_url);return d.useEffect(()=>{if(t||Zo())return;s&&e&&!o&&i&&(async()=>{try{const c=await new J(!0,!0,!0).getNewSSO();c?.status===200&&c?.data&&c?.data?.url&&(Xs(),await ar(c?.data?.url||i))}catch(l){console.error("Zendesk SSO init failed",l)}})()},[s,o,i,t,e]),null},Tr=({title:t,open:e,classNames:s,okButtonProps:o,children:i,...n})=>a.jsx(ot,{title:a.jsxs("div",{style:{display:"flex",alignItems:"flex-start",flexDirection:"column",gap:12},children:[a.jsx("h1",{style:{lineHeight:"32px",fontSize:28,fontWeight:600},children:t?.title}),t?.subTitle&&a.jsx("span",{className:"sub-title",style:{textAlign:"left",fontSize:14,lineHeight:"20px",fontWeight:400},children:t?.subTitle})]}),open:e,closeIcon:a.jsx(G,{icon:oo}),classNames:{body:"p-8",footer:"[&.ant-modal-footer]:p-8",...s||{}},className:"office-modal",cancelButtonProps:{className:"btn-grey lg-btn"},okButtonProps:{className:"lg-btn",...o||{}},style:{maxWidth:624},width:"100%",...n,children:i}),Ia="/assets/login_screenclaimdeck-logo-white-CIQrq3xT.png";class Hi extends ke.Component{constructor(e){super(e),this.state={error:null,errorInfo:null}}componentDidCatch(e,s){this.setState({error:e,errorInfo:s})}render(){return this.state.errorInfo?a.jsx(a.Fragment,{children:a.jsxs("div",{className:"authentication flex",children:[a.jsx("aside",{className:"flex items-center justify-center",children:a.jsx("img",{src:Ia,alt:"logo-white",width:"145"})}),a.jsx("div",{className:"au-steps",children:a.jsx("div",{id:"div-page-not-found",className:"scard-body not-found flex items-center justify-center",children:a.jsxs("div",{className:"max-w-[950px]",children:[a.jsxs("div",{className:"emptydata",children:[a.jsx("h1",{children:"Oops, something went wrong!"}),a.jsx("p",{children:" System may have new updates, please refresh the page. ."}),a.jsx(X,{className:"btn",type:"submit",onClick:()=>{window.location.reload()},"aria-label":"submit",children:"Refresh"}),a.jsx("p",{children:a.jsxs("details",{className:"mt-3.75",children:["The page you were looking for could not be found. It might have been removed, renamed, or did not exist in the first place.",this.state.error&&this.state.error.toString(),a.jsx("br",{}),this.state.errorInfo.componentStack]})})]}),a.jsx("div",{className:"flex items-center justify-center"})]})})})]})}):this.props.children}}const wr=()=>{const t=new URLSearchParams(window.location.search),e=t.get("error_title"),s=t.get("error_message");return a.jsx(a.Fragment,{children:a.jsxs("div",{className:"authentication flex",children:[a.jsx("aside",{className:"flex items-center justify-center",children:a.jsx("img",{src:Ia,alt:"logo-white",width:"145",className:"w-[145px]"})}),a.jsx("div",{className:"au-steps",children:a.jsx("div",{id:"div-page-not-found",className:"scard-body not-found flex items-center justify-center",children:a.jsxs("div",{className:"max-w-[490px]",children:[a.jsxs("div",{className:"emptydata",children:[a.jsx("h1",{children:e||"Something went wrong!"}),a.jsx("p",{children:s||"Session Unauthorized"}),a.jsx(X,{className:"btn",type:"default",children:a.jsx(Z,{to:"login",className:"primary-link sm-link",children:"Login"})})]}),a.jsx("div",{className:"flex items-center justify-center"})]})})})]})})},qi=Object.freeze(Object.defineProperty({__proto__:null,default:wr},Symbol.toStringTag,{value:"Module"}));function Ji(){const t=de(),e=()=>{t(Bt({is_internet_on:window?.navigator?.onLine})),window.location.reload()};return a.jsx(a.Fragment,{children:a.jsxs("div",{className:"authentication flex",children:[a.jsx("aside",{className:"flex items-center justify-center",children:a.jsx("img",{src:Ia,alt:"logo-white",width:"145",className:"w-[145px]"})}),a.jsx("div",{className:"au-steps",children:a.jsx("div",{id:"div-page-not-found",className:"scard-body not-found flex items-center justify-center",children:a.jsxs("div",{className:"max-w-[490px]",children:[a.jsxs("div",{className:"emptydata",children:[a.jsx("h1",{children:"Sorry, it looks like youâre unable to connect to the internet."}),a.jsx("p",{children:"Check your internet connection and retry below."}),a.jsx(X,{className:"btn",type:"submit",onClick:e,"aria-label":"submit",children:"Retry"})]}),a.jsx("div",{className:"flex items-center justify-center"})]})})})]})})}const Zi=(t=6e4)=>{const e=qe(),s=M(l=>
2l?.auth?.isLogin),[o,i]=d.useState(!1);return d.useEffect(()=>{if(!s||e)return;let l=le("app_build_version")||"";const c=async()=>{try{const u=await fetch("/build-meta.json",{cache:"no-store"});if(!u.ok)return;const{version:_}=await u.json(),g=le("is_org_updated");le("page_from")||g?(st("page_from"),st("is_org_updated")):l&&l!==_&&i(!0);const f=new Date;f.setTime(f.getTime()+720*60*60*1e3);const h="app_build_version";document.cookie=`${h}=${encodeURIComponent(_)};expires=${f.toUTCString()};path=/;SameSite=Strict${window.location.protocol==="https:"?";Secure":""}`,l=_}catch{}};c();const m=setInterval(c,t);return()=>clearInterval(m)},[t,e,s]),{isNewVersion:o,reloadPage:()=>window.location.reload()}};function Wi(t){return!/^(?:.*\.)?(dev|qa|uat)\.claim-deck\.com$/.test(t)}const Ju=t=>{if(!t.includes("localhost")){if(t.includes("dev.claim-deck.com")){t!=="app.dev.claim-deck.com"&&window.location.assign("https://app.dev.claim-deck.com/login");return}if(t.includes("syzygy.stage-codal.net")){t!=="syzygylegal.syzygy.stage-codal.net"&&window.location.assign("https://syzygylegal.syzygy.stage-codal.net/login");return}if(t.includes("qa.claim-deck.com")){t!=="app.qa.claim-deck.com"&&window.location.assign("https://app.qa.claim-deck.com/login");return}if(t.includes("syzygyqa.stage-codal.net")){t!=="syzygylegal.syzygyqa.stage-codal.net"&&window.location.assign("https://syzygylegal.syzygyqa.stage-codal.net/login");return}if(t.includes("syzygyuat.stage-codal.net")){t!=="syzygylegal.syzygyuat.stage-codal.net"&&window.location.assign("https://syzygylegal.syzygyuat.stage-codal.net/login");return}if(t.includes("uat.claim-deck.com")){t!=="app.uat.claim-deck.com"&&window.location.assign("https://app.uat.claim-deck.com/login");return}if(t.includes("stage.claim-deck.com")){t!=="app.stage.claim-deck.com"&&window.location.assign("https://app.stage.claim-deck.com/login");return}if(t.includes("claimdeckdev.stage-codal.net")){t!=="app.claimdeckdev.stage-codal.net"&&window.location.assign("https://app.claimdeckdev.stage-codal.net/login/login");return}Wi(t)&&t!=="app.claim-deck.com"&&window.location.assign("https://app.claim-deck.com/login")}},Ki=()=>{const t=window.location.hostname,e=le("redirect_url"),s=le("is_org_updated");if(t===e||s==="true")return;const o="https",i="";if(va(t)&&e){const n=new URLSearchParams(window.location.search).get("return_to"),l=n?`?return_to=${encodeURIComponent(n)}`:"";window.location.href=`${o}://${e}${i}${l}`}},pe={white:"#ffffff",black:"#000000"},Er={font_10:"10px"},Yi={md:"768px"},{Sider:Qi,Content:Xi}=Rt;Me(Rt.Header)` 3 // background: #fff; 4 // position: fixed; 5 // top: 900px; 6 // padding: 0; 7 // .trigger-icon { 8 // display: none; 9 // font-size: ${Er.font_10}; 10 // position: fixed; 11 // z-index: 222; 12 // padding: 0 15px 0 25px; 13 // top: 23px; 14 // -webkit-transition: all 0.2s ease-in-out; 15 // -moz-transition: all 0.2s ease-in-out; 16 // -ms-transition: all 0.2s ease-in-out; 17 // -o-transition: all 0.2s ease-in-out; 18 // transition: all 0.2s ease-in-out; 19 // :hover { 20 // margin-left: -3px; 21 // } 22 // @media (min-width: 768px) { 23 // @keyframes bounceInRight { 24 // 0% { 25 // opacity: 0; 26 // transform: translate(6px, 0px); 27 // } 28 // 50% { 29 // opacity: 1; 30 // } 31 // 100% { 32 // opacity: 0; 33 // transform: translate(-3px, 0px); 34 // } 35 // } 36 // @-webkit-keyframes bounceInRight { 37 // 0% { 38 // opacity: 0; 39 // transform: translate(6px, 0px); 40 // } 41 // 50% { 42 // opacity: 1; 43 // } 44 // 100% { 45 // opacity: 0; 46 // transform: translate(-3px, 0px); 47 // } 48 // } 49 // } 50 // } 51`;const el=Me(Rt.Header)` 52 // background-color: #fff; 53 // -webkit-box-shadow: 0px 0px 2px 0px rgba(0, 0, 0, 0.2) !important; 54 // -moz-box-shadow: 0px 0px 2px 0px rgba(0, 0, 0, 0.2) !important; 55 // box-shadow: 0px 0px 2px 0px rgba(0, 0, 0, 0.2) !important; 56 // color: #000; 57 // position: fixed; 58 // z-index: 10000; 59 // top: 0; 60 // width: 100%; 61 62 // @media only screen and (max-width: 992px) { 63 // width: 100%; 64 // margin-left: 0px; 65 // } 66`;Me.div` 67 // height: 64px; 68 // background-color: ${pe.white}; 69 // &.collapsed-logo { 70 // max-width: 100%; 71 // padding: 0; 72 // img { 73 // max-width: 100%; 74 // height: 100%; 75 // } 76 // } 77 // -webkit-box-shadow: 4px 0px 21px 0px rgba(0, 0, 0, 0.09) !important; 78 // -moz-box-shadow: 4px 0px 21px 0px rgba(0, 0, 0, 0.09) !important; 79 // box-shadow: 4px 0px 21px 0px rgba(0, 0, 0, 0.09) !important; 80 81 // @media only screen and (max-width: 992px) { 82 // -webkit-box-shadow: none !important; 83 // -moz-box-shadow: none !important; 84 // box-shadow: none !important; 85 // } 86 // text-align: center; 87 // padding-top: 8px; 88`;const tl=Me(Rt)` 89 // padding-left: 250px; 90 // padding-top: 0px; 91 -webkit-transition: all 0.4s ease-in-out; 92 -moz-transition: all 0.4s ease-in-out; 93 -ms-transition: all 0.4s ease-in-out; 94 -o-transition: all 0.4s ease-in-out; 95 transition: all 0.4s ease-in-out; 96 // .back-to-top { 97 // z-index: 1; 98 // } 99 // .back-top { 100 // border-radius: 5px; 101 // @media only screen and (max-width: 767px) { 102 // -moz-transform: scale(0.8); 103 // -webkit-transform: scale(0.8); 104 // -o-transform: scale(0.8); 105 // -ms-transform: scale(0.8); 106 // transform: scale(0.8); 107 // position: relative; 108 // left: 20px; 109 // top: 25px; 110 // } 111 // color: #fff; 112 // display: inline-block; 113 // background-color: ${pe.blue}; 114 115 // #cta { 116 // width: 100%; 117 // cursor: pointer; 118 // position: absolute; 119 // } 120 // #cta .arrow { 121 // left: 30%; 122 // } 123 // .arrow { 124 // position: absolute; 125 // bottom: 0; 126 // margin-left: 0px; 127 // width: 12px; 128 // height: 12px; 129 // background-size: contain; 130 // top: 15px; 131 // } 132 // .segunda { 133 // margin-left: 8px; 134 // } 135 // .next { 136 // background-image: url(data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgNTEyIDUxMiI+PHN0eWxlPi5zdDB7ZmlsbDojZmZmfTwvc3R5bGU+PHBhdGggY2xhc3M9InN0MCIgZD0iTTMxOS4xIDIxN2MyMC4yIDIwLjIgMTkuOSA1My4yLS42IDczLjdzLTUzLjUgMjAuOC03My43LjZsLTE5MC0xOTBjLTIwLjEtMjAuMi0xOS44LTUzLjIuNy03My43UzEwOSA2LjggMTI5LjEgMjdsMTkwIDE5MHoiLz48cGF0aCBjbGFzcz0ic3QwIiBkPSJNMzE5LjEgMjkwLjVjMjAuMi0yMC4yIDE5LjktNTMuMi0uNi03My43cy01My41LTIwLjgtNzMuNy0uNmwtMTkwIDE5MGMtMjAuMiAyMC4yLTE5LjkgNTMuMi42IDczLjdzNTMuNSAyMC44IDczLjcuNmwxOTAtMTkweiIvPjwvc3ZnPg==); 137 // } 138 // } 139`,al=Me(Qi)` 140 top: ${t=>t.headerHeight}px; 141 // background-color: ${pe.purple} !important; 142 // min-height: 100vh; 143 // position: fixed; 144 // top: 0; 145 // z-index: 98; 146 147 // & .ant-layout-sider-zero-width-trigger { 148 // background: white !important; 149 // color: ${pe.black} !important; 150 // top: 13px; 151 // z-index: 9999; 152 // } 153 154 // & .ant-layout-sider-zero-width-trigger:hover { 155 // background: white !important; 156 // color: ${pe.black}; 157 // z-index: 9999; 158 // } 159 160 // @media (max-width: 992px) { 161 // display: block; 162 // position: fixed; 163 // z-index: 9999; 164 165 // .side-logos { 166 // display: none; 167 // > div { 168 // position: absolute; 169 // left: 0; 170 // top: 0; 171 // width: 100%; 172 // transition: all 0.2s ease-in-out; 173 // } 174 175 // @media (min-width: 1100px) { 176 // .default-logo img { 177 // left: -11px; 178 // position: relative; 179 // } 180 // } 181 // } 182 // } 183`,sl=Me(Xi)` 184 margin-top: ${t=>t.headerHeight}px !important; 185 // color: ${pe.black}; 186 // margin-top: 64px; 187 188 // &.remove-top-space { 189 // margin-top: 70px; 190 // padding-bottom: 0; 191 // } 192 // &.remove-top-space-404 { 193 // margin-top: 0; 194 // } 195 196 // @media only screen and (max-width: 992px) { 197 // margin-left: 0px; 198 // } 199`,rl=Me.div` 200 width: 100vw; 201 height: 100vh; 202 position: absolute; 203 top: 0; 204 left: 0; 205 background: white; 206 z-index: 100; 207`,ol=a.jsx(it,{style:{fontSize:50},spin:!0});function Ne(){return a.jsx(rl,{className:"loader2",children:a.jsx(nt,{indicator:ol,className:"global-loader",size:"large",height:80,width:80})})}const Nr=d.createContext(null),nl=({children:t})=>
207{const[e,s]=d.useState(null),o=n=>{s(n)},i=()=>{s(null)};return a.jsx(Nr.Provider,{value:{churnInfo:e,login:o,logout:i},children:t})},il=/^[0-9A-Za-z]+$/,Zu="Zipcode must match the required pattern. ex-78ABCIO. No special characters are allowed.",Wu=/^(?:[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*|'(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*')@(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-zA-Z0-9-]*[a-zA-Z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/,Ku=/^(https?:\/\/)(?:www\.)?linkedin.com\/(\w+:{0,1}\w*@)?(\S+)(:([0-9])+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/,Yu="Please add valid LinkedIn URL",Qu=/^((http|ftp|https|www|smtp):\/\/)[-a-zA-Z0-9@%._~#=]{1,256}\.[a-zA-Z0-9()]{1,6}([-a-zA-Z0-9()@:%_.~#?&//=]*)$/,ll=/^\+?[\d\s().-]{7,20}$/,Xu=1e17,vr="https://claimdeck.zendesk.com/hc/en-us",he={GLOBAL_ADMIN:"Global Admin",OFFICE_ADMIN:"Office Admin",TEAM_MEMBER:"Team Member"},ut={THREE_SECONDS:3e3,TWENTY_SECONDS:2e4,TWO_MINUTES:12e4},cl=[he.GLOBAL_ADMIN],dl=["bmp","gif","heic","jpg","jpeg","png","tif"],ul=["doc","docm","docx","dot","dotx","eml","emz","htm","html","msg","pdf","rtf","txt","xml"],ml=["csv","xls","xlsm","xlsx","xlt"],hl=["ppt","pptx"],fl=["3gp","3gpp","emf","mdi","midi","mov","mp3","mp4","mpg","mpeg","wav","wave","wma"],gl=["zip"],em=[...dl,...ul,...ml,...hl,...fl,...gl],tm=["bmp","csv","doc","docx","gif","jpg","jpeg","pdf","png","ppt","pptx","txt","xls","xlsx","mp4"],am=t=>t.map(e=>`.${e}`),sm=(t,e=50)=>t?.length>e?t?.substring(0,e)+"...":t,rm=(t=!0)=>{const e=[{title:"State",value:"state"},{title:"Federal",value:"federal"}];return t?[{title:"N/A",value:"N/A"},...e]:[{title:"",value:""},...e]};function Fe(){const{permission_level:t="",office_enable:e,office_turned_on:s}=M(m=>m.auth.user),o=d.useMemo(()=>({isGlobalAdmin:he.GLOBAL_ADMIN?.toLowerCase()===t?.toLowerCase(),isOfficeAdmin:he.OFFICE_ADMIN?.toLowerCase()===t?.toLowerCase(),isTeamMember:he.TEAM_MEMBER?.toLowerCase()===t?.toLowerCase()}),[t]),i=(m="")=>he.GLOBAL_ADMIN?.toLowerCase()===m?.toLowerCase(),n=(m="")=>he.OFFICE_ADMIN?.toLowerCase()===m?.toLowerCase(),l=(m="")=>he.TEAM_MEMBER?.toLowerCase()===m?.toLowerCase(),c=d.useMemo(()=>e?o?.isGlobalAdmin||o?.isOfficeAdmin:cl.includes(t),[e,t,o?.isGlobalAdmin,o?.isOfficeAdmin]);return{...o,currentPermission:t,isOfficeFlagEnable:e,isOrgOfficeFlagEnable:s,isUserHasGlobalAdminPermission:c,checkIsGlobalAdmin:i,checkIsOfficeAdmin:n,checkIsTeamMember:l}}function Qe(){const t=d.useCallback(({description:o,message:i}={})=>{ie.success({icon:a.jsx(G,{icon:pa}),className:"success-notification",message:i||"Success",description:o})},[]),e=d.useCallback(({description:o,message:i,className:n,iconType:l}={})=>{const c=l==="warning"?Ga:Ms;ie.error({icon:a.jsx(G,{icon:c}),className:n||"error-notification",message:i||"Error",description:o||"Something went wrong"})},[]),s=d.useCallback((o,i)=>{let n=o,l=i;if(o&&typeof o=="object"){const{message:c,description:m}=o;n=c,l=m}ie.warning({icon:a.jsx(G,{icon:Ga}),className:"warning-notification",message:n||"Warning",description:l})},[]);return{showSuccessToast:t,showErrorToast:e,showWarningToast:s}}function pl(t){return typeof t=="object"&&t!==null&&"canceled"in t}function gs(t){const e=t;if(!(pl(e)&&e.canceled)){if(e?.isAxiosError){const s=e;return s.response?.data?.message??s.message}return e instanceof Error?e.message:"Something went wrong"}}const xl=(t,e)=>{const s=new J(!0,!0,!0);return async o=>{o(bi());try{const i=await s.getOrganizationDetails(t);if(i.status===200&&i?.data){const n=i?.data;o(Ti(n))}else o(ds({message:"Error",description:i?.data?.message||"Something went wrong"})),e?.(i?.data?.message||"Something went wrong")}catch(i){o(ds({message:"Error",description:gs(i)})),e?.(gs(i))}}},om=(t,e,s,o)=>{const i=new J(!0,!0,!0);return async()=>{try{const n=await i.saveOrganizationDetails(t,e);n.status===200?s?.(n.data):o?.({message:"Error",description:n?.data?.message||"Something went wrong"})}catch(n){const l=n;if("canceled"in l&&l.canceled)return;l.response?o?.({message:"Error",description:l.response?.data?.message}):o?.({message:"Error",description:"Something went wrong"})}}};function jr(t,e=50,s="..."){if(typeof t!="string")throw new TypeError("Expected a string as the first argument");return t.length<=e?t:t.slice(0,e)+s}const nm=t=>{const e=document.querySelector(t);e&&e.scrollTo({top:0,behavior:"smooth"})},ps=t=>
207t?t.trim().split(" ").filter(Boolean).map(o=>o.charAt(0).toUpperCase()).join("").slice(0,2):"?",_l={xl:{containerClass:"h-12 w-12 min-w-12",textClass:"text-5 font-semibold leading-6",antSize:48},lg:{containerClass:"h-10 w-10 min-w-10",textClass:"text-[16px] font-semibold leading-5",antSize:40},md:{containerClass:"h-8 w-8 min-w-8",textClass:"text-[14px] font-semibold leading-4",antSize:32},sm:{containerClass:"h-6 w-6 min-w-6",textClass:"text-3 font-semibold leading-4",antSize:24},xs:{containerClass:"h-4 w-4 min-w-4",textClass:"text-[10px] font-semibold leading-4",antSize:16}},yl=({status:t,displayName:e,profileImage:s,isPerson:o=!0,className:i,size:n="md"})=>{const l=ma(h=>h.auth?.user?.collaborator_enable),c=l?t:"Active",{containerClass:m,textClass:u,antSize:_}=_l[n],g=be(m,i,"inline-flex items-center justify-center"),y=be(u,"flex h-full w-full items-center justify-center text-center");let f=null;return c==="Active"||c==="Has Access"?s?f=a.jsx(ve,{size:_,className:be(m,i),src:s}):f=a.jsx(ve,{size:_,className:be(g,"bg-blue"),children:a.jsx("span",{className:be(y,"text-white"),children:ps(e)})}):c==="Pending Access"?f=a.jsx(ve,{size:_,className:be(g,"bg-gray-600"),icon:a.jsx(G,{icon:no,className:u,style:{color:"#FFFFFF"}})}):c==="No Access"||l&&t===null?f=a.jsx(ve,{size:_,className:be(g,"bg-white border border-gray-300"),icon:a.jsx(G,{icon:o?xa:io,className:u,style:{color:"rgba(17, 23, 62, 0.3)"}})}):c==="Deactivated"&&(f=a.jsx(ve,{size:_,className:be(g,"bg-white border border-gray-300"),children:a.jsx("span",{className:be(y,"text-gray-300"),children:ps(e)})})),f?a.jsx("div",{className:"shrink-0",children:f}):null},Cl=a.jsx(it,{style:{fontSize:50},spin:!0}),$t=t=>a.jsx(nt,{indicator:Cl,className:t.className,size:"large",height:100,width:100}),im=Object.freeze(Object.defineProperty({__proto__:null,default:$t},Symbol.toStringTag,{value:"Module"}));window.location.hostname.match(/^(.*\.)?localhost$/);const Be=new Map,kr=t=>{const e=t?.method?.toLowerCase()||"get",[s,o]=(t?.url||"").split("?");let i={...t?.params||{}};if(o)try{const c=new URLSearchParams(o);for(const[m,u]of c.entries())i[m]=u}catch{}const n={...i};Object.prototype.hasOwnProperty.call(n,"search")&&(n.search="");const l=Object.keys(n).length?Object.keys(n).sort().map(c=>`${c}=${n[c]}`).join("&"):"";return[e,s,l].filter(Boolean).join("|")},Sl=t=>{if(["/bulk_grant_revoke_access/get_contact_api"].some(m=>t.url?.includes(m)))return t;const o=kr(t);let i=Be.get(o)||[];if(new URLSearchParams(t?.url?.split("?")[1]||"").has("search")||t?.params?.search)i.forEach(m=>{m.signal.aborted||m.abort()}),i=[];else for(;i.length>=2;){const m=i.shift();m.signal.aborted||m.abort()}const c=new AbortController;return t.signal=c.signal,i.push(c),Be.set(o,i),t},xs=t=>{const e=kr(t);if(Be.has(e)){let s=Be.get(e);s.length>0&&s.shift(),s.length===0?Be.delete(e):Be.set(e,s)}},ce=Fs.create({baseURL:"https://api.claim-deck.com/api/"});ce.interceptors.request.use(t=>{if(!window.navigator.onLine)return We().dispatch(Bt({is_internet_on:!1})),Promise.reject({code:"INTERNET_DISCONNECTED",message:"No internet connection"});t=Sl(t);const e=window.location.search.replace("?encrypt=true&token=",""),o=We().getState(),i=o.auth?.user?.token?o.auth?.user?.token:ka(e),n=window.location.hostname;return i&&(t.headers.Authorization=`token ${i} ${n}`),t.headers["Content-Type"]==="multipart/form-data"||t.data instanceof FormData||t.isMultipart?delete t.headers["Content-Type"]:t.headers["Content-Type"]="application/json",t.headers.domain=n,t.headers["Page-Url"]=window.location.href,t.headers["X-iframe-Domain"]=Sa(),t},t=>Promise.reject(t));ce.interceptors.response.use(t=>(xs(t.config),br(t),t),async t=>{if(t.config&&xs(t.config),t?.name==="AbortError"||t?.code==="ERR_CANCELED")return Promise.reject({canceled:!0});if(t.response){const{status:e}=t.response;if(e>=500&&window.location.replace(`${window.location.origin}/500`),e===401&&!t?.config?.suppressAuthRedirect){We().dispatch(zt());let o=t.response.data.message,i=t.response.data.result?.message_title||"Session Expired";setTimeout(()=>{window.location.replace(`${window.location.origin}/401?error_title=${i}&error_message=${o}`)},1e3),await new Promise(n=>setTimeout(n,3e3))}}return t.response});setInterval(()=>{for(const[t,e]of Be.entries()){const s=e.filter(o=>!o.signal.aborted);s.length===0?Be.delete(t):s.length<e.length&&Be.set(t,s)}},30*1e3);const Ir=(t="")=>typeof t!="string"?"":t.toLowerCase().split(" ").map(e=>e.charAt(0).toUpperCase()+e.substring(1)).join(" "),{Option:bl}=ye,Tl=[{value:"average",label:"Average"},{value:"median",label:"Median"},{value:"sum",label:"Sum"},{value:"count",label:"Count"},{value:"none",label:"None"}],wl=[{value:"count",label:"Count"},{value:"none",label:"None"}],El=({data:t,tableContent:e,metricsData:s,setMetricsData:o})=>
207{const[i,n]=d.useState(),l=async h=>{const x=s.map(C=>C.column_name===t.mapping?{...C,selected_metric_option:h}:C);o(x);let T={selected_metrics:[...x.filter(C=>C.selected_metric_option!=="none").map(C=>({column_name:C.column_name,selected_metric_option:C.selected_metric_option}))]};try{const C=await ce.patch("/ColumnMetrics/update",T);C.status===200&&(C.data||ie.error({icon:a.jsx("i",{className:"fas fa-times-circle"}),className:"error-notification",message:"Error",description:C.data.message}))}catch(C){console.log(C)}},c=s&&s.find(h=>h.column_name===t.mapping),m=t.is_numeric,u=h=>{n(h!=="none"?h:void 0)},_=d.useMemo(()=>m?Tl:wl,[m]),g=c&&c.selected_metric_option,y=d.useMemo(()=>{let h;if(i?h=_.find(x=>x.value===i):g&&(h=_.find(x=>x.value===g)),h&&h.label&&h.value!=="none"){const x=s&&s.find(T=>T.column_name===t.mapping);if(x&&x[h.value]!==void 0)return`${Ir(h.label)}: ${x[h.value]}`}return"Calculate"},[i,_,g,s]),f=d.useMemo(()=>{const h=y&&y.split(": ")[0];return _.filter(x=>x.value!==i).filter(x=>x.label!==h)},[y,_,i]);return a.jsx(a.Fragment,{children:!e&&a.jsx("div",{className:"footer-select",children:a.jsx(ye,{placement:"topRight",defaultValue:y,variant:"borderless",onChange:h=>{u(h),l(h)},suffixIcon:a.jsx("i",{className:"far fa-angle-down"}),value:y,children:f.map(h=>a.jsx(bl,{value:h.value,children:h.label},h.value))})})})},dt=Me(Mt)` 208 & .ant-table-thead > tr > th { 209 color: ${pe.table_header}; 210 text-transform: capitalize; 211 font-weight: 500; 212 background: ${pe.white}; 213 border-bottom: none; 214 transition: background 0.3s ease; 215 cursor: -webkit-grab; 216 cursor: grab; 217 } 218 219 & .ant-table-thead > tr:first-child > th:first-child { 220 text-align: left; 221 min-width: initial; 222 } 223 224 & .ant-table-tbody > tr > td { 225 border-bottom: none; 226 font-size: ${Er.font_10}; 227 color: ${pe.blue}; 228 text-align: left; 229 padding: 15px 16px; 230 line-height: 15px; 231 position: relative; 232 233 & .ant-dropdown-link { 234 position: absolute; 235 top: 0px; 236 left: 16px; 237 width: calc(100% - 16px); 238 height: 100%; 239 display: flex; 240 align-items: center; 241 } 242 } 243 & .ant-table-tbody > tr:nth-of-type(odd) { 244 background: ${pe.table_gray}; 245 } 246 & .ant-table-tbody > tr:nth-of-type(even) { 247 background: ${pe.white}; 248 } 249 250 & .ant-table-tbody > tr.ant-table-row { 251 cursor: ${t=>t.isRowClick?"pointer":"default"}; 252 } 253 254 & .ant-table-row-selected > td { 255 background: ${pe.light_blue} !important; 256 } 257 258 & .ant-checkbox-inner::after { 259 // display: none; 260 } 261 262 & .ant-checkbox-checked > span { 263 background: ${pe.mat_blue}; 264 } 265 266 & a { 267 color: ${pe.blue}; 268 } 269 & a:hover { 270 color: ${pe.blue}; 271 } 272 273 & i { 274 color: #c2c1c5; 275 } 276 277 $ i:hover { 278 color: #c2c1c5; 279 } 280 281 & .ant-table-pagination.ant-pagination { 282 margin: 16px; 283 } 284`,ha=t=>{const[e,s]=d.useState([]),[o,i]=d.useState(t.columns||[]),[n,l]=d.useState(t.dataSource||[]);d.useEffect(()=>{(t.columns!==o||t.dataSource!==n)&&(i(t.columns||[]),l(t.dataSource||[]))},[t.columns,t.dataSource]);const c=L=>{s(L)},{dataSource:m,columns:u,changeTable:_,isSummary:g,totalCountData:y,tableContent:f,metricsData:h,setMetricsData:x,isCallApi:T,isRowClick:C=!1}=t;return a.jsx("div",{className:`${_?"dashtbl":"dashtbl removable-tbl"}`,children:a.jsx(dt,{summary:()=>a.jsx(a.Fragment,{children:g&&m.length>0&&a.jsx(dt.Summary,{fixed:!0,children:a.jsxs(dt.Summary.Row,{children:[a.jsx(dt.Summary.Cell,{fixed:!0,children:a.jsxs("span",{style:{fontWeight:600},children:["Metrics for all ",y," items"]})}),u.map((L,w)=>w!==0?a.jsx(dt.Summary.Cell,{children:a.jsx(El,{data:L,index:w,tableContent:f,footerData:e,metricsData:h,setMetricsData:x,firstChange:v=>c(v),isApiCall:T})},w):null)]})})}),rowClassName:"editable-row",columns:u||[],data:m||[],pagination:{position:["none"]},variant:"borderless",tableClassName:"first-column-width",scroll:{x:600,y:"240"},...t,isRowClick:C,showSorterTooltip:{placement:"topRight",target:"ant-table-column-title"}})})},lm=Object.freeze(Object.defineProperty({__proto__:null,default:ha},Symbol.toStringTag,{value:"Module"}));function Nl(t){return a.jsx("svg",{"aria-hidden":"true",focusable:"false","data-prefix":"fa","data-icon":"fa-times",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 30 30","data-fa-i2svg":"",height:12,width:11,...t,children:a.jsx("path",{d:"M 7 4 C 6.744125 4 6.4879687 4.0974687 6.2929688 4.2929688 L 4.2929688 6.2929688 C 3.9019687 6.6839688 3.9019687 7.3170313 4.2929688 7.7070312 L 11.585938 15 L 4.2929688 22.292969 C 3.9019687 22.683969 3.9019687 23.317031 4.2929688 23.707031 L 6.2929688 25.707031 C 6.6839688 26.098031 7.3170313 26.098031 7.7070312 25.707031 L 15 18.414062 L 22.292969 25.707031 C 22.682969 26.098031 23.317031 26.098031 23.707031 25.707031 L 25.707031 23.707031 C 26.098031 23.316031 26.098031 22.682969 25.707031 22.292969 L 18.414062 15 L 25.707031 7.7070312 C 26.098031 7.3170312 26.098031 6.6829688 25.707031 6.2929688 L 23.707031 4.2929688 C 23.316031 3.9019687 22.682969 3.9019687 22.292969 4.2929688 L 15 11.585938 L 7.7070312 4.2929688 C 7.5115312 4.0974687 7.255875 4 7 4 z"})})}const _s=t=>a.jsxs("svg",{width:"116",height:"104",viewBox:"0 0 116 104",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:[a.jsx("path",{d:"M58.0031 77.3999C58.4621 77.3999 58.8341 77.0267 58.8341 76.5664C58.8341 76.1061 58.4621 75.7329 58.0031 75.7329C57.5442 75.7329 57.1722 76.1061 57.1722 76.5664C57.1722 77.0267 57.5442 77.3999 58.0031 77.3999Z",fill:"#5463D2"}),a.jsx("path",{d:"M58.0031 77.3999C58.4621 77.3999 58.8341 77.0267 58.8341 76.5664C58.8341 76.1061 58.4621 75.7329 58.0031 75.7329C57.5442 75.7329 57.1722 76.1061 57.1722 76.5664C57.1722 77.0267 57.5442 77.3999 58.0031 77.3999Z",fill:"white",fillOpacity:"0.55"}),a.jsx("path",{d:"M33.8627 14.6506V18.3077",stroke:"#5463D2",strokeLinecap:"round",strokeLinejoin:"round"}),a.jsx("path",{d:"M33.8627 14.6506V18.3077",stroke:"white",strokeOpacity:"0.55",strokeLinecap:"round",strokeLinejoin:"round"}),a.jsx("path",{d:"M32.0312 16.4795H35.6858",stroke:"#5463D2",strokeLinecap:"round",strokeLinejoin:"round"}),a.jsx("path",{d:"M32.0312 16.4795H35.6858",stroke:"white",strokeOpacity:"0.55",strokeLinecap:"round",strokeLinejoin:"round"}),a.jsx("path",{d:"M75.3687 37.7158C68.2715 37.7158 61.0472 37.4267 54.2892 35.5386C47.6585 33.693 41.5704 30.1125 36.1437 25.9706C32.5908 23.2746 29.3
284603 21.1228 24.7475 21.446C20.2349 21.691 15.9196 23.3812 12.4357 26.2683C6.56803 31.4222 7.44987 40.9732 9.79862 47.658C13.326 57.7533 24.0607 64.7868 33.1844 69.337C43.7241 74.6185 55.3068 77.6887 66.9148 79.4492C77.0899 81.0056 90.1649 82.1283 98.9834 75.469C107.081 69.337 109.303 55.3549 107.318 45.9145C106.837 43.1257 105.357 40.6093 103.155 38.8385C97.4656 34.6626 88.9779 37.4522 82.5845 37.5883C80.2103 37.6393 77.7937 37.6988 75.3687 37.7158Z",fill:"#5463D2"}),a.jsx("path",{d:"M75.3687 37.7158C68.2715 37.7158 61.0472 37.4267 54.2892 35.5386C47.6585 33.693 41.5704 30.1125 36.1437 25.9706C32.5908 23.2746 29.3603 21.1228 24.7475 21.446C20.2349 21.691 15.9196 23.3812 12.4357 26.2683C6.56803 31.4222 7.44987 40.9732 9.79862 47.658C13.326 57.7533 24.0607 64.7868 33.1844 69.337C43.7241 74.6185 55.3068 77.6887 66.9148 79.4492C77.0899 81.0056 90.1649 82.1283 98.9834 75.469C107.081 69.337 109.303 55.3549 107.318 45.9145C106.837 43.1257 105.357 40.6093 103.155 38.8385C97.4656 34.6626 88.9779 37.4522 82.5845 37.5883C80.2103 37.6393 77.7937 37.6988 75.3687 37.7158Z",fill:"white",fillOpacity:"0.88"}),a.jsx("path",{d:"M63.8878 9.66696C64.3467 9.66696 64.7187 9.29379 64.7187 8.83348C64.7187 8.37316 64.3467 8 63.8878 8C63.4288 8 63.0568 8.37316 63.0568 8.83348C63.0568 9.29379 63.4288 9.66696 63.8878 9.66696Z",fill:"#5463D2"}),a.jsx("path",{d:"M63.8878 9.66696C64.3467 9.66696 64.7187 9.29379 64.7187 8.83348C64.7187 8.37316 64.3467 8 63.8878 8C63.4288 8 63.0568 8.37316 63.0568 8.83348C63.0568 9.29379 63.4288 9.66696 63.8878 9.66696Z",fill:"white",fillOpacity:"0.55"}),a.jsx("path",{d:"M20.7114 74.5676V78.2247",stroke:"#5463D2",strokeLinecap:"round",strokeLinejoin:"round"}),a.jsx("path",{d:"M20.7114 74.5676V78.2247",stroke:"white",strokeOpacity:"0.55",strokeLinecap:"round",strokeLinejoin:"round"}),a.jsx("path",{d:"M18.8884 76.3961H22.5345",stroke:"#5463D2",strokeLinecap:"round",strokeLinejoin:"round"}),a.jsx("path",{d:"M18.8884 76.3961H22.5345",stroke:"white",strokeOpacity:"0.55",strokeLinecap:"round",strokeLinejoin:"round"}),a.jsx("path",{d:"M58.3423 96C75.5335 96 89.4696 95.128 89.4696 94.0524C89.4696 92.9767 75.5335 92.1047 58.3423 92.1047C41.1512 92.1047 27.215 92.9767 27.215 94.0524C27.215 95.128 41.1512 96 58.3423 96Z",fill:"#5463D2"}),a.jsx("path",{d:"M58.3423 96C75.5335 96 89.4696 95.128 89.4696 94.0524C89.4696 92.9767 75.5335 92.1047 58.3423 92.1047C41.1512 92.1047 27.215 92.9767 27.215 94.0524C27.215 95.128 41.1512 96 58.3423 96Z",fill:"white",fillOpacity:"0.85"}),a.jsx("path",{d:"M83.3646 73.1899H29.5977C29.2378 73.1896 28.8824 73.111 28.5558 72.9594C28.2293 72.8078 27.9395 72.5868 27.7064 72.3119C27.4734 72.0369 27.3027 71.7144 27.2061 71.3667C27.1096 71.019 27.0894 70.6545 27.1472 70.2982L34.0238 28.4713C34.1167 27.8891 34.4138 27.3594 34.8615 26.9774C35.3092 26.5954 35.8781 26.3862 36.4659 26.3876H90.2328C90.5923 26.3876 90.9476 26.4662 91.2738 26.6179C91.6 26.7695 91.8894 26.9907 92.1218 27.2659C92.3542 27.5411 92.524 27.8637 92.6196 28.2114C92.715 28.5591 92.7339 28.9235 92.6748 29.2792L85.832 71.1062C85.7368 71.
2846919 85.4356 72.2241 84.983 72.6063C84.5304 72.9886 83.9562 73.1956 83.3646 73.1899Z",fill:"#5463D2"}),a.jsx("path",{d:"M83.3646 73.1899H29.5977C29.2378 73.1896 28.8824 73.111 28.5558 72.9594C28.2293 72.8078 27.9395 72.5868 27.7064 72.3119C27.4734 72.0369 27.3027 71.7144 27.2061 71.3667C27.1096 71.019 27.0894 70.6545 27.1472 70.2982L34.0238 28.4713C34.1167 27.8891 34.4138 27.3594 34.8615 26.9774C35.3092 26.5954 35.8781 26.3862 36.4659 26.3876H90.2328C90.5923 26.3876 90.9476 26.4662 91.2738 26.6179C91.6 26.7695 91.8894 26.9907 92.1218 27.2659C92.3542 27.5411 92.524 27.8637 92.6196 28.2114C92.715 28.5591 92.7339 28.9235 92.6748 29.2792L85.832 71.1062C85.7368 71.6919 85.4356 72.2241 84.983 72.6063C84.5304 72.9886 83.9562 73.1956 83.3646 73.1899Z",fill:"white",fillOpacity:"0.55"}),a.jsx("path",{d:"M84.027 25.2936L52.1122 11.0011C51.1714 10.5798 50.0683 11.0032 49.6483 11.9468L39.5333 34.67C39.1133 35.6136 39.5354 36.72 40.4762 37.1413L72.391 51.4338C73.3317 51.8551 74.4349 51.4317 74.8549 50.4882L84.9699 27.765C85.3899 26.8214 84.9678 25.7149 84.027 25.2936Z",fill:"white"}),a.jsx("path",{d:"M84.027 25.2936L52.1122 11.0011C51.1714 10.5798 50.0683 11.0032 49.6483 11.9468L39.5333 34.67C39.1133 35.6136 39.5354 36.72 40.4762 37.1413L72.391 51.4338C73.3317 51.8551 74.4349 51.4317 74.8549 50.4882L84.9699 27.765C85.3899 26.8214 84.9678 25.7149 84.027 25.2936Z",stroke:"#5463D2",strokeLinecap:"round",strokeLinejoin:"round"}),a.jsx("path",{d:"M84.027 25.2936L52.1122 11.0011C51.1714 10.5798 50.0683 11.0032 49.6483 11.9468L39.5333 34.67C39.1133 35.6136 39.5354 36.72 40.4762 37.1413L72.391 51.4338C73.3317 51.8551 74.4349 51.4317 74.8549 50.4882L84.9699 27.765C85.3899 26.8214 84.9678 25.7149 84.027 25.2936Z",stroke:"white",strokeOpacity:"0.55",strokeLinecap:"round",strokeLinejoin:"round"}),a.jsx("path",{d:"M56.7906 29.6959C57.6307 28.5136 58.8524 27.659 60.2489 27.2769C61.6453 26.8947 63.1305 27.0086 64.4528 27.5992C65.7751 28.1897 66.8531 29.2207 67.5043 30.5173C68.1554 31.814 68.3396 33.2965 68.0256 34.7138",stroke:"#5463D2",strokeLinecap:"round",strokeLinejoin:"round"}),a.jsx("path",{d:"M56.7906 29.6959C57.6307 28.5136 58.8524 27.659 60.2489 27.2769C61.6453 26.8947 63.1305 27.0086 64.4528 27.5992C65.7751 28.1897 66.8531 29.2207 67.5043 30.5173C68.1554 31.814 68.3396 33.2965 68.0256 34.7138",stroke:"white",strokeOpacity:"0.55",strokeLinecap:"round",strokeLinejoin:"round"}),a.jsx("path",{d:"M72.8662 29.2622C73.5687 29.2622 74.1381 28.691 74.1381 27.9864C74.1381 27.2819 73.5687 26.7107 72.8662 26.7107C72.1638 26.7107 71.5944 27.2819 71.5944 27.9864C71.5944 28.691 72.1638 29.2622 72.8662 29.2622Z",fill:"#5463D2"}),a.jsx("path",{d:"M72.8662 29.2622C73.5687 29.2622 74.1381 28.691 74.1381 27.9864C74.1381 27.2819 73.5687 26.7107 72.8662 26.7107C72.1638 26.7107 71.5944 27.2819 71.5944 27.9864C71.5944 28.691 72.1638 29.2622 72.8662 29.2622Z",fill:"white",fillOpacity:"0.55"}),a.jsx("path",{d:"M60.1474 23.3088C60.8498 23.3088 61.4193 22.7376 61.4193 22.0331C61.4193 21.3285 60.8498 20.7573 60.1474 20.7573C59.4449 20.7573 58.8755 21.3285 58.8755 22.0331C58.8755 22.7376 59.4449 23.3088 60.1474 23.3088Z",fill:"#5463D2"}),a.jsx("path",{d:"M60.1474 23.3088C60.8498 23.3088 61.4193 22.7376 61.4193 22.0331C61.4193 21.3285 60.8498 20.7573 60.1474 20.7573C59.4449 20.7573 58.8755 21.3285 58.8755 22.0331C58.8755 22.7376 59.4449 23.3088 60.1474 23.3088Z",fill:"white",fillOpacity:"0.55"}),a.jsx("path",{d:"M83.1271 73.1729H29.0974C28.4399 73.1706 27.8102 72.9071 27.3461 72.44C26.882 71.9729 26.6214 71.3404 26.6214 70.681V32.4686C26.6135 32.1371 26.6717 31.8073 26.7925 31.4986C26.9132 31.19 27.0942 30.9086 27.3248 30.6709C27.5554 30.4333 27.831 30.2442 28.1353 30.1148C28.4397 29.9854 28.7668 29.9182 29.0974 29.9171H48.7777C49.2344 29.9188 49.6817 30.0467 50.0707 30.2868C50.4596 30.5268 50.775 30.8698 50.9823 31.2779L53.7889 36.7891C53.9955 37.1978 54.3107 37.5413 54.6998 37.7814C55.0889 38.0216 55.5367 38.1491 55.9936 38.1498H83.1271C83.7838 38.1498 84.4136 38.4115 84.8779 38.8772C85.3422 39.3429 85.6031 39.9746 85.6031 40.6332V70.681C85.6031 71.3404 85.3425 71.9729 84.8784 72.44C84.4143 72.9071 83.7846 73.1706 83.1271 73.1729Z",fill:"white"}),a.jsx("path",{d:"M83.1271 73.1729H29.0974C28.4399 73.1706 27.8102 72.9071 27.3461 72.44C26.882 71.9729 26.6214 71.3404 26.6214 70.681V32.4686C26.6135 32.1371 26.6717 3
2841.8073 26.7925 31.4986C26.9132 31.19 27.0942 30.9086 27.3248 30.6709C27.5554 30.4333 27.831 30.2442 28.1353 30.1148C28.4397 29.9854 28.7668 29.9182 29.0974 29.9171H48.7777C49.2344 29.9188 49.6817 30.0467 50.0707 30.2868C50.4596 30.5268 50.775 30.8698 50.9823 31.2779L53.7889 36.7891C53.9955 37.1978 54.3107 37.5413 54.6998 37.7814C55.0889 38.0216 55.5367 38.1491 55.9936 38.1498H83.1271C83.7838 38.1498 84.4136 38.4115 84.8779 38.8772C85.3422 39.3429 85.6031 39.9746 85.6031 40.6332V70.681C85.6031 71.3404 85.3425 71.9729 84.8784 72.44C84.4143 72.9071 83.7846 73.1706 83.1271 73.1729Z",stroke:"#5463D2",strokeLinecap:"round",strokeLinejoin:"round"}),a.jsx("path",{d:"M83.1271 73.1729H29.0974C28.4399 73.1706 27.8102 72.9071 27.3461 72.44C26.882 71.9729 26.6214 71.3404 26.6214 70.681V32.4686C26.6135 32.1371 26.6717 31.8073 26.7925 31.4986C26.9132 31.19 27.0942 30.9086 27.3248 30.6709C27.5554 30.4333 27.831 30.2442 28.1353 30.1148C28.4397 29.9854 28.7668 29.9182 29.0974 29.9171H48.7777C49.2344 29.9188 49.6817 30.0467 50.0707 30.2868C50.4596 30.5268 50.775 30.8698 50.9823 31.2779L53.7889 36.7891C53.9955 37.1978 54.3107 37.5413 54.6998 37.7814C55.0889 38.0216 55.5367 38.1491 55.9936 38.1498H83.1271C83.7838 38.1498 84.4136 38.4115 84.8779 38.8772C85.3422 39.3429 85.6031 39.9746 85.6031 40.6332V70.681C85.6031 71.3404 85.3425 71.9729 84.8784 72.44C84.4143 72.9071 83.7846 73.1706 83.1271 73.1729Z",stroke:"white",strokeOpacity:"0.55",strokeLinecap:"round",strokeLinejoin:"round"}),a.jsx("path",{d:"M74.809 39.4511C71.6877 39.4494 68.636 40.3762 66.0399 42.1143C63.4438 43.8525 61.4199 46.3238 60.2243 49.2158C59.0286 52.1077 58.7149 55.2904 59.3228 58.3612C59.9308 61.432 61.433 64.253 63.6395 66.4674C65.846 68.6818 68.6577 70.19 71.7189 70.8014C74.7802 71.4128 77.9534 71.0999 80.8373 69.9022C83.7212 68.7045 86.1862 66.6758 87.9205 64.0728C89.6547 61.4698 90.5804 58.4094 90.5804 55.2786C90.5804 51.0824 88.9191 47.0578 85.9616 44.0898C83.0041 41.1218 78.9926 39.4533 74.809 39.4511Z",fill:"white"}),a.jsx("path",{d:"M74.809 39.4511C71.6877 39.4494 68.636 40.3762 66.0399 42.1143C63.4438 43.8525 61.4199 46.3238 60.2243 49.2158C59.0286 52.1077 58.7149 55.2904 59.3228 58.3612C59.9308 61.432 61.433 64.253 63.6395 66.4674C65.846 68.6818 68.6577 70.19 71.7189 70.8014C74.7802 71.4128 77.9534 71.0999 80.8373 69.9022C83.7212 68.7045 86.1862 66.6758 87.9205 64.0728C89.6547 61.4698 90.5804 58.4094 90.5804 55.2786C90.5804 51.0824 88.9191 47.0578 85.9616 44.0898C83.0041 41.1218 78.9926 39.4533 74.809 39.4511Z",stroke:"#5463D2",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),a.jsx("path",{d:"M74.809 39.4511C71.6877 39.4494 68.636 40.3762 66.0399 42.1143C63.4438 43.8525 61.4199 46.3238 60.2243 49.2158C59.0286 52.1077 58.7149 55.2904 59.3228 58.3612C59.9308 61.432 61.433 64.253 63.6395 66.4674C65.846 68.6818 68.6577 70.19 71.7189 70.8014C74.7802 71.4128 77.9534 71.0999 80.8373 69.9022C83.7212 68.7045 86.1862 66.6758 87.9205 64.0728C89.6547 61.4698 90.5804 58.4094 90.5804 55.2786C90.5804 51.0824 88.9191 47.0578 85.9616 44.0898C83.0041 41.1218 78.9926 39.4533 74.809 39.4511Z",stroke:"white",strokeOpacity:"0.55",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),a.jsx("path",{d:"M86.0356 66.76L90.2413 70.9784",stroke:"#5463D2",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),a.jsx("path",{d:"M86.0356 66.76L90.2413 70.9784",stroke:"white",strokeOpacity:"0.55",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),a.jsx("path",{d:"M89.7659 68.929L88.4593 70.3C87.8736 70.9145 87.8955 71.889 88.5082 72.4764L99.8472 83.3488C100.46 83.9363 101.431 83.9143 102.017 83.2998L103.324 81.9288C103.909 81.3143 103.888 80.3398 103.275 79.7524L91.9358 68.88C91.3231 68.2926 90.3516 68.3145 89.7659 68.929Z",fill:"#5463D2"}),a.jsx("path",{d:"M89.7659 68.929L88.4593 70.3C87.8736 70.9145 87.8955 71.889 88.5082 72.4764L99.8472 83.3488C100.46 83.9363 101.431 83.9143 102.017 83.2998L103.324 81.9288C103.909 81.3143 103.888 80.3398 103.275 79.7524L91.9358 68.88C91.3231 68.2926 90.3516 68.3145 89.7659 68.929Z",fill:"white",fillOpacity:"0.55"}),a.jsx("path",{d:"M98.1609 8.8335V12.4991",stroke:"#5463D2",strokeLinecap:"round",strokeLinejoin:"round"}),a.jsx("path",{d:"M98.1609 8.8335V12.4991",stroke:"white",strokeOpacity:"0.55",strokeLinecap:"round",strokeLinejoin:"round"}),a.jsx("path",{d:"M96.3293 10.6707H99.9839",stroke:"#5463D2",strokeLinecap:"round",strokeLinejoin:"round"}),a.jsx("path",{d:"M96.3293 10.6707H99.9839",stroke:"white",strokeOpacity:"0.55",strokeLinecap:"round",strokeLinejoin:"round"})]});function ys(t){return a.jsx("svg",{className:"svg-inline--fa fa-info-circle fa-w-16 text-danger","aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"info-circle",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512","data-fa-i2svg":"",...t,children:a.jsx("path",{fill:"currentColor",d:"M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z"})})}const Dr=d.createContext(),vl=100,jl=200,kl=5e3,ta=()=>({debug:!1,track_pageview:!1,persistence:"localStorage",autocapture:{pageview:!1,capture_text_content:!0},record_sessions_percent:100,record_mask_all_text:!0,record_network:!0}),Il=t=>`${t?.first_name||""} ${t?.last_name||""}`.trim(),Cs=(t,e)=>{if(!t)return null;const{id:s,first_name:o,last_name:i,primary_email_address:n,organization:l,organization_user_belongs_to:c,organization_type:m}=t,u=Il(t);return!u||[s,o,i,n,l,c,m].some(y=>!y)?null:{payload:{$name:u,$email:n,org_id:l,org_name:c,org_type:m,user_uuid:s,env:e,firstName:o,lastName:i,user_name:u,user_email:n,email:n},distinctId:s}},Dl=({children:t})=>{const e=M(p=>p.auth.user),s=M(p=>p.auth?.isLogin),o=d.useRef(!1),i=d.useRef(!1),n=d.useRef(!1),l=d.useRef(!1),c=d.useRef(null),m=d.useRef(null),u=d.useRef([]),_=d.useRef(!1),g=d.useRef(null),y=d.useRef(null),f=d.useRef(s),h=d.useRef(e),x=d.useRef(()=>{});h.current=e;const T=()=>{c.current&&(clearTimeout(c.current),c.current=null)},C=()=>{u.current.forEach(({eventName:p,props:S}
284)=>{Ue.track(p,S)}),u.current=[]},L=()=>{i.current||(i.current=!0,C())},w=()=>{if(n.current)return;const{autocapture:p}=ta();Ue.set_config({autocapture:{...p,pageview:"full-url"}}),n.current=!0},v=p=>{if(!p)return!1;const{payload:S,distinctId:I}=p,q=JSON.stringify(S),V=g.current!==I,b=y.current!==q;return!V&&!b&&_.current||((V||!_.current)&&(Ue.identify(I),g.current=I),Ue.people.set({...S,last_login:new Date().toISOString()}),Ue.register(S),y.current=q,_.current=!0),!0};x.current=()=>{if(!o.current||i.current)return;const S=Cs(h.current,"production");if(S&&v(S)){L(),w();return}if(m.current||(m.current=Date.now()),Date.now()-m.current>=kl){l.current||(console.warn("Mixpanel: skipping enriched initial pageview because user properties were not ready in time; enabling baseline pageview tracking."),l.current=!0),T(),m.current=null,L(),w();return}c.current=setTimeout(()=>x.current(),jl)},d.useEffect(()=>(o.current||(Ue.init("f6f373e10f0b5f84275d295d74b652a4",ta()),o.current=!0),()=>{T()}),[]),d.useEffect(()=>{o.current&&(f.current&&!s&&(Ue.reset(),Ue.set_config(ta()),T(),m.current=null,i.current=!1,n.current=!1,l.current=!1,_.current=!1,g.current=null,y.current=null,u.current=[]),f.current=s)},[s]),d.useEffect(()=>{if(!o.current)return;const S=Cs(e,"production");if(i.current){S&&v(S)&&w();return}T(),x.current()},[e]);const D=d.useCallback((p,S)=>{o.current&&i.current?Ue.track(p,S):o.current?(u.current.push({eventName:p,props:S}),u.current.length>vl&&u.current.shift()):console.warn("Mixpanel: track called before initialization.")},[]),j=d.useMemo(()=>({track:D}),[D]);return a.jsx(Dr.Provider,{value:j,children:t})},Al=()=>d.useContext(Dr);var Ol=(t=>(t.HAS_ACCESS="has_access",t.PENDING_ACCESS="pending_access",t))(Ol||{});const Re=(t,e="Something went wrong")=>{const s=t?.data?.message??t?.response?.data?.message;return{message:typeof s=="string"&&s.trim()?s:e,raw:t}},cm=(t,e,s)=>{const o=new J(!0,!0,!0);return async(i,n)=>{const c=n().collaborator?.contacts;i(ci());try{const m=await o.getAllCollaboratorsContactList(t);m.status===200&&m?.data?(i(di({contacts:t?.offset===0?[...m?.data?.results||[]]:[...c,...m?.data?.results||[]],totalCount:m?.data?.count,loadMore:!!m?.data?.next})),e?.(m?.data)):(i(ss({message:"Error",description:m?.data?.message||"Something went wrong"})),s?.())}catch(m){i(ss({message:"Error",description:m.response?.data?.message||"Something went wrong"})),s?.()}}},dm=(t,e=()=>{},s=()=>{})=>{const o=new J(!0,!0,!0);return async i=>{i(ui());try{const n=await o.addMatterCollaborators(t);if(n?.status===200)i(mi()),e?.();else{const l=Re(n);s?.(l),i(rs({message:"Error",description:l.message}))}}catch(n){const l=n;if("canceled"in l&&l.canceled)return;const c=Re(l);s?.(c),i(rs({message:"Error",description:c.message}))}}},um=(t,e=()=>{},s=()=>{})=>{const o=new J(!0,!0,!0);return async()=>{try{const i=await o.getAllCollaboratorsListByType(t);i.status===200&&i?.data?e(i?.data):s(i?.data?.message||"Something went wrong")}catch(i){s(i?.response?.data?.message||"Something went wrong")}}},mm=(t,e=()=>{},s=()=>{})=>{const o=new J(!0,!0,!0);return async()=>{try{const i=await o.updateMatterOrganizationContactTypes(t.matterId,t.orgId,{contact_type_id:t.contact_type_id});i.status===200&&i?.data?e():s(Re(i))}catch(i){s(Re(i))}}},Ss=(t,e,s=()=>{})=>{const o=new J(!0,!0,!0);return async()=>{try{const i=await o.getAllContactCallV2([],{...t});i.status===200?e?.(i.data):s?.(i?.data?.message||"Something went wrong")}catch(i){const n=i;if(n.canceled)return;s?.(n.response?.data?.message||"Something went wrong")}}},hm=(t,e=()=>{},s=()=>{})=>{const o=new J(!0,!0,!0);return async()=>{try{const i=await o.resendPendingCollaboratorInvite(t);i.status===200&&i?.data?e():s(Re(i))}catch(i){s(Re(i))}}},fm=(t,e=()=>{},s=()=>{})=>{const o=new J(!0,!0,!0);return async()=>{try{const i=await o.revokePendingCollaboratorInvite(t);i.status===200&&i?.data?e():s(Re(i))}catch(i){s(Re(i))}}},gm=(t,e,s=()=>{},o=()=>{})=>{const i=new J(!0,!0,!0);return async()=>{try{const n=await i.editMatterCollaborator(t,e);n.status===200&&n?.data?s():o(Re(n))}catch(n){o(Re(n))}}};function Ll(t,e,s,o=!0){const i=new URLSearchParams(e.search??"");i.delete(s);const n=i.toString();t.replace({...e,...o?{state:void 0}:{},search:n?`?${n}`:""})}const{Option:De}=ye,{Search:Rl}=Ae,Ml=t=>a.jsx(pt,{load:K(()=>
284import("./SelectDrawer-D3knAc-X.js"),__vite__mapDeps([0,1,2,3,4])),componentProps:t});function Fl({savePDF:t,containerRef:e,organizationId:s,collaboratorOnly:o=!1,hideFilters:i=!1,hideCompanyName:n=!1}){const l=d.useRef(new J(!0,!0,!0)),{front_org_type:c,...m}=M(R=>R.auth.user),u=gt(),_=Ft(),g=u.state,y=new URLSearchParams(u.search).get("search"),f=ja(),{track:h}=Al(),{showErrorToast:x}=Qe(),T=d.useRef(null),[C,L]=d.useState(!1),[w,v]=d.useState(0),[D,j]=d.useState([]),[p,S]=d.useState({visible:!1}),[I,q]=d.useState([]),[V,b]=d.useState([]),[E,k]=d.useState("all_contacts"),[U,ae]=d.useState(g?.search??y??""),[F,ee]=lo.useStateWithCallbackLazy({page:1,pageSize:20}),[H,W]=d.useState(),[Y,Ce]=d.useState(),[A,re]=d.useState(!1),[se,te]=d.useState(!1),[O,N]=d.useState(!1),[P,Q]=d.useState({visible:!1,data:{}}),[,oe]=d.useState(),me=d.useRef(new _a({autoForceUpdate:{forceUpdate:oe}})),[z,fe]=d.useState({columnKey:"display_name",order:"ascend"}),xe=[{title:"Contact type",key:"contact_type__config_value"},{title:"Company",key:"company"},{title:"City",key:"addresses__city",ellipsis:!0},{title:"State",key:"addresses__state"},{title:"Managed By",key:"organization__company_name"}],Se=R=>{if(!R||!R.columnKey||!R.order)return"";const{order:B,columnKey:$}=R;return B==="descend"?`-${$}`:$},Je=(R,B,$)=>{const ge=Se(z),ct={limit:$?$.pageSize:F.pageSize,offset:$?$.pageSize*($.page-1):F.pageSize*(F.page-1),search:B,ordering:ge,is_person:E==="people_only"?!0:E==="companies_only"?!1:void 0,organization:s||(E==="managed_by_my_company"?m.organization:null),user__is_active:E==="contacts_with_access"?!0:void 0,...o?{collaborator_only:!0}:{}};i&&(ct.exclude_filters=!0),L(!0),f(Ss(ct,qt=>{j(qt.results||[]),v(qt.count||0),L(!1);const Jt=g?.search||y;if(Jt){const za=qt.results?.find(Ba=>Ba?.primary_email_address===Jt||Ba?.display_name===Jt);za&&Q({visible:!0,data:za}),Ll(_,u,"search")}},()=>{L(!1)}))},Ct=async()=>{const R={table_name:"contacts"};try{const B=await l.current.getFilter(R);B.status===200?B.data.global_contacts_operations?(q(JSON.parse(JSON.stringify(B.data.global_contacts_operations))),b(JSON.parse(JSON.stringify(B.data.global_contacts_operations)))):(q([]),b([])):x({message:"Error",description:"Something went wrong"})}catch(B){const $=B;if("canceled"in $&&$.canceled)return;x({message:"Error",description:$.response?.data?.message||"Something went wrong"})}},Ge=R=>{const B=Se(z),$={limit:w,offset:0,search:U,ordering:B,is_person:E==="people_only"?!0:E==="companies_only"?!1:void 0,organization:s||(E==="managed_by_my_company"?m.organization:null),user__is_active:E==="contacts_with_access"?!0:void 0,...o?{collaborator_only:!0}:{}};i&&($.exclude_filters=!0),f(Ss($,ge=>{ge.results&&W(ge.results)}))},Jr=()=>{const R=e.current||document.body;setTimeout(()=>{t(R,{paperSize:"auto",margin:40,fileName:`Contacts ${Ie().format()}`},()=>{W(void 0),te(!1)})},1e3)},Zr=()=>{let R=[{label:"Name",key:"display_name"},{label:"Company",key:"company_name"},{label:"Managed By",key:"managed_by"},{label:"Email",key:"primary_email_address"},{label:"Contact Type",key:"contact_type"},{label:"Assigned Matters",key:"assigned_matters_count"}],B=[];H&&H.length>0&&H.forEach($=>{B.push({display_name:$.display_name,company_name:$.company||"-",managed_by:$.organization?.company_name||"-",primary_email_address:$.primary_email_address||"-",contact_type:$.contact_type?$.contact_type.text:"-",assigned_matters_count:$.assigned_matters_count||0})}),Ce({headers:R,fileData:B})},Wr=()=>{H&&se?Jr():H&&O&&Zr()},Ua=d.useCallback(Wr,[H,se,O]);d.useEffect(()=>{Ct()},[]),d.useEffect(()=>{Ua()},[Ua]),d.useEffect(()=>{if(Y&&O){const R=T.current;R?.link&&R.link.click(),N(!1),W(void 0)}},[Y,O]),d.useEffect(()=>{Je(!1,U,F)},[U,F,z,E]);const Kr=async()=>{if(me.current.fields.column_name&&me.current.fields.operator&&(me.current.fields.column_value||me.current.fields.column_value===void 0)){const R=V.map(ge=>({column_name:ge.column_name,operator:ge.operator,column_value:ge.column_value||null})),B={global_contacts_operations:R.length>0?R:null},$={table_name:"contacts"};try{const ge=await l.current.updateFilter({...B},{...$});if(ge.status===200){S({visible:!1}),ee({...F,page:1},()=>{});const ct=ge.data.result.global_contacts_operations||[];q(JSON.parse(JSON.stringify(ct))),b(JSON.parse(JSON.stringify(ct))),Je(!1,U,{...F,page:1})}}catch{x({message:"Error",description:"Something went wrong"})}}else me.current.showMessages(),oe(Math.random())},Vt=(R,B,$)=>{me.current.purgeFields();const ge=[...V];
284ge[$]={...ge[$],[R]:B},b(ge),me.current.hideMessageFor(R)},Yr=a.jsx(ne,{children:a.jsxs("div",{children:[V.map((R,B)=>a.jsxs(Zt,{className:"flex items-center gap-2 px-2 py-1 m-2 flex-start",children:[a.jsxs(Xe,{className:"flex items-center w-20",children:[a.jsx("div",{className:"flex justify-center m-1 mr-1",children:a.jsx(Nl,{width:14,height:14,onClick:()=>{const $=[...V];$.splice(B,1),b($)}})}),B===0?a.jsx(a.Fragment,{children:"Where"}):a.jsx(a.Fragment,{children:"and"})]}),a.jsxs(Xe,{children:[a.jsx(ye,{showSearch:!0,placeholder:"Choose Column",value:R.column_name,onChange:$=>Vt("column_name",$,B),suffixIcon:a.jsx(Le,{}),children:xe.map($=>a.jsx(De,{value:$.key,title:$.title,children:$.title},$.key))}),me.current.message("column_name",R.column_name,"required")]}),a.jsxs(Xe,{children:[a.jsxs(ye,{placeholder:"Choose Operator",onChange:$=>Vt("operator",$,B),value:R.operator,suffixIcon:a.jsx(Le,{}),children:[a.jsx(De,{value:"contains",children:"contains..."},"contains"),a.jsx(De,{value:"does_not_contains",children:"does not contain..."},"does_not_contains"),a.jsx(De,{value:"is",children:"is..."},"is"),a.jsx(De,{value:"is_not",children:"is not..."},"is_not"),a.jsx(De,{value:"is_empty",children:"is empty"},"is_empty"),a.jsx(De,{value:"is_not_empty",children:"is not empty"},"is_not_empty")]}),me.current.message("operator",R.operator,"required")]}),a.jsx(Xe,{children:R.operator!=="is_empty"&&R.operator!=="is_not_empty"&&a.jsxs(a.Fragment,{children:[a.jsx(Ae,{value:R.column_value||"",onChange:$=>Vt("column_value",$.target.value,B)}),me.current.message("column_value",R.column_value,"required")]})})]},B)),V.length===0&&a.jsx(Zt,{className:"p-3 text-gray-500",children:"No filters applied to this view"}),a.jsxs(Zt,{className:"flex items-center justify-between action-row",children:[a.jsx(Xe,{children:a.jsxs(X,{className:"btn sm-btn btn-bdr",onClick:()=>{me.current.hideMessages(),b([...V,{column_name:void 0,operator:void 0,column_value:void 0}])},children:[a.jsx(G,{icon:lt})," Â Add filter"]})}),a.jsx(Xe,{children:a.jsx(X,{className:"ant-btn btn sm-btn",onClick:Kr,loading:C,children:"Apply"})})]})]},"1")}),Qr=R=>a.jsx(yl,{status:R?.status,displayName:R?.display_name,profileImage:R?.profile_image,isPerson:R?.is_person,size:"md"}),Ht=[{title:"Name",dataIndex:"display_name",key:"display_name",sorter:!0,render:(R,B)=>a.jsxs("div",{className:"avatar-info",children:[Qr(B),a.jsx("div",{className:"leading-4 pointer wrap-text",children:B.display_name})]})},{title:"Company",dataIndex:"company",key:"company",sorter:!0,render:(R,B)=>B.company||"-"},{title:"Managed By",dataIndex:"organization__company_name",key:"organization__company_name",sorter:!0,hidden:n,render:(R,B)=>{const $=B.organization?.company_name||"-";return B?.status==="Active"?a.jsxs(Z,{to:{pathname:`global-contact/organization/${B?.organization?.id}`},className:"ml-1 text-sm font-semibold leading-4 cursor-pointer text-primary",children:[$,"Â ",a.jsx(G,{style:{color:"#5463d2"},icon:co})]}):$}},{title:"Email",dataIndex:"primary_email_address",key:"primary_email_address",sorter:!0,render:(R,B)=>B.primary_email_address||"-"},{title:"Contact Type",dataIndex:"contact_type__config_value",key:"contact_type__config_value",sorter:!0,render:(R,B)=>B?.contact_type?.text?a.jsx(Oe,{className:"font-medium text-3 leading-4 text-[rgba(17,23,62,0.84)] py-[1px] bg-primary/7 border-primary/25 w-fit",children:B.contact_type.text}):"-"},{title:"Assigned Matters",dataIndex:"assigned_matters_count",key:"assigned_matters_count",sorter:!0,render:(R,B)=>B.assigned_matters_count||0}].filter(R=>!R.hidden),Xr=`${100/Ht.length}%`,eo=Ht.map(R=>({...R,width:Xr})),Pa=Ht.map(R=>({...R,sorter:!1})),to=(R,B,$)=>{Array.isArray($)||(fe({columnKey:$.columnKey,order:$.order}),ee({...F,page:1},()=>{}))},ao=R=>{ae(R),ee({...F,page:1},()=>{})};return a.jsxs("div",{className:"bg-white rounded-[6px] shadow-[0_4px_10px_0_#0E164A1A]","data-testid":"collaborator-table-head",children:[a.jsx("div",{className:"p-6 card-header noExport pb-[30px] border-b border-solid border-b-[rgba(231,232,235,1)]",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("div",{className:"flex",children:i?a.jsx("div",{"data-testid":"collaborator-header-placeholder",children:a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:be("head-iconn h-11 w-11 group-hover:bg-white/95 bg-primary/7 border-primary/12"),children:a.jsx(G,{icon:mo,className:"size-5"})}),a.jsx("h1",{className:"mb-0 font-semibold leading-6 text-5 text-secondary","data-testid":"contacts-title",children:"All Collaborators"})]})}):a.jsxs(a.Fragment,{children:[a.jsx(Ye,{dropdownRender:()=>Yr,trigger:["click"],onOpenChange:R=>{R||b(I),S({visible:R})},open:p.visible,overlayClassName:V.length===0?"lg-dropdown filter-ddown emdrop zindex":"lg-ex-dropdown filter-ddown zindex",children:a.jsxs(X,{className:I.length>0?"btn btn-filter active":"btn btn-filter","data-testid":"collaborator-filter-button",children:[a.jsx(G,{icon:uo}),a.jsxs("span",{children:[I.length>0&&a.jsxs(a.Fragment,{children:[I.length," "]}),I.length>1?"Filters":"Filter"]})]})}),a.jsxs(ye,{className:"ant-filterbtn w-25",value:E,"data-testid":"collaborator-view-selector",onChange:R=>{ee({...F,page:1},()=>{}),k(R)},suffixIcon:a.jsx(Le,{}),children:[a.jsx(De,{value:"all_contacts",children:"All Contacts"}),a.jsx(De,{value:"people_only",children:"People Only"}),a.jsx(De,{value:"companies_only",children:"Companies Only"}),a.jsx(De,{value:"managed_by_my_company",children:"Managed by My Company"})]})]})}),a.jsxs("div",{className:"flex",children:[a.jsx("div",{className:"search-btn",children:a.jsx(Rl,{placeholder:"Search",className:"ant-searchbtn",allowClear:!0,"data-testid":"collaborator-search-input",onChange:R=>{ao(R.target.value)},value:U})}),c!=="client"&&a.jsxs(X,{className:"btn btn-blue","data-testid":"collaborator-ex
284port-button",onClick:()=>{re(!0),Ce(void 0),W(void 0),te(!1),N(!1)},children:["Export ",a.jsx(G,{icon:ho})]})]})]})}),a.jsxs("div",{className:"noExport",children:[C&&a.jsx($t,{className:"component-loader"}),a.jsx(ha,{className:"collaborator-table",parentClassName:"fix-sorter-flex","data-testid":"collaborator-select-table",rowClassName:(R,B)=>be("cursor-pointer",{"[&>td]:bg-[rgba(250,250,251,1)] hover:[&>td]:bg-[rgba(250,250,251,1)]":B%2===0,"[&>td]:bg-white hover:[&>td]:bg-white":B%2!==0}),locale:{emptyText:C?a.jsx("div",{className:"h-[600px]"}):a.jsxs("div",{className:"flex flex-col items-center py-14",children:[a.jsx(_s,{className:"h-[195px] w-[220px]","data-testid":"fa-empty-state-icon"}),a.jsxs("div",{children:[a.jsx("div",{className:"flex items-center gap-4 mb-1",children:a.jsx("p",{className:"font-semibold leading-5 text-16 text-secondary/90",children:"There are currently no contacts."})}),a.jsx("small",{className:"text-xs font-normal leading-4",children:"Create contacts in your Matter â Contacts."})]})]})},columns:eo,dataSource:D,scroll:{x:!1},pagination:!1,onChange:to,onRow:R=>({onClick:()=>{Q({visible:!0,data:R})}})}),D&&a.jsx("div",{className:"noExport","data-testid":"collaborator-pagination-container",children:a.jsx(Ut,{total:w,showTotal:(R,B)=>`${B[0]}-${B[1]} of ${R} items`,defaultPageSize:F.pageSize,current:F.page,pageSizeOptions:[20,50,100,200],onChange:(R,B)=>{ee({...F,page:R,pageSize:B},$=>{Je(!1,U,$)})},showSizeChanger:{showSearch:!1}})})]}),a.jsx("div",{className:"cursor matter-tbl pdf-matter-tbl contacttbl",children:a.jsx(jt,{variant:"borderless",children:A&&se&&a.jsx(ha,{rowClassName:(R,B)=>B%2===0?"[&>td]:bg-[rgba(250,250,251,1)] hover:[&>td]:bg-[rgba(250,250,251,1)]":"[&>td]:bg-white hover:[&>td]:bg-white",className:"bg-tbl remove-extra-column",locale:{emptyText:C?a.jsx("div",{className:"h-[600px]"}):a.jsxs("div",{className:"flex flex-col items-center py-14",children:[a.jsx(_s,{className:"h-[195px] w-[220px]","data-testid":"fa-empty-state-icon"}),a.jsxs("div",{children:[a.jsx("div",{className:"flex items-center gap-4 mb-1",children:a.jsx("p",{className:"font-semibold leading-5 text-16 text-secondary/90",children:"There are currently no contacts."})}),a.jsx("small",{className:"text-xs font-normal leading-4",children:"Create contacts in your Matter â Contacts."})]})]})},columns:Pa&&Pa,dataSource:H||[],scroll:{x:!0,y:!1},pagination:!1})})}),A&&a.jsx(ot,{title:"Export Contacts",open:A,onCancel:()=>re(!1),footer:a.jsxs(a.Fragment,{children:[a.jsx(X,{onClick:()=>re(!1),className:"btn lg-btn btn-filter mr-[7x]",children:"Cancel"}),a.jsx(X,{loading:se,"data-testid":"collaborator-export-pdf-confirm",onClick:async()=>{h("export_requested",{export_type:"contacts",export_format:"pdf"}),te(!0),await Ge()},className:"btn lg-btn mr-[7px]",children:"Export PDF"}),a.jsx(X,{loading:O,"data-testid":"collaborator-export-csv-confirm",onClick:async()=>{h("export_requested",{export_type:"contacts",export_format:"csv"}),N(!0),await Ge()},className:"btn lg-btn",children:"Export CSV"}),Y&&a.jsx(fo,{ref:T,data:Y.fileData,headers:Y.headers,filename:`Contacts ${Ie().format()}.csv`})]}),children:a.jsx("div",{className:"modal-body",children:a.jsxs("p",{children:["You're about to export ",a.jsx("b",{children:w})," contacts. Are you sure?"]})})}),a.jsx("div",{id:"drawer-container","data-testid":"collaborator-drawer-container",children:P.visible&&a.jsx(Ml,{visible:P.visible,data:P.data,onClose:R=>{Q({visible:!1,data:{}}),R===!0&&Je(!1,U)}})})]})}function Ul(){const{orgId:t}=go(),e=ja(),{showErrorToast:s}=Qe(),o=gt(),i=Ft(),n=d.useRef(null),l=d.useRef(null),{data:c,loading:m}=M(C=>C.myOrganization.organizationData),u=M(C=>C.auth.user.organization),{isGlobalAdmin:_,isUserHasGlobalAdminPermission:g}=Fe();d.useEffect(()=>{t&&e(xl(t,C=>{s({message:"Error",description:C})}))},[t]);const y=c?.primary_phone_number,f=c?.phone_numbers||[],h=C=>{if(!C)return[];const L=C.street_address||"",w=[C.city,C.state,C.zip_code].filter(Boolean).join(", "),v=C.country||"";return[L,w,v].filter(Boolean)};h(c?.addresses?.[0]);const x=(C,L,w=`${L}s`)=>C===1?`+1 ${L}`:`+${C} ${w}`,T=()=>{i.push({pathname:"/admin-setting",state:{...o.state??{},tab:"my-organization"}})};return a.jsxs("section",{className:"px-12",children:[a.jsxs(Wt,{className:"py-4",children:[a.jsx(Wt.Item,{children:a.jsx(po,{to:"/global-contact",className:"font-medium leading-4 underline align-text-top text-3",children:"Contacts"})},0),a.jsx(Wt.Item,{className:"font-medium leading-4 text-3",children:c?.company_name||""},1)]}),a.jsx(xo,{ref:n,paperSize:"auto",margin:20,scale:5,fileName:`Contacts ${Ie().format()}`,author:"KendoReact Team",children:a.jsxs("div",{ref:l,className:"contactpdf pdf-bg",children:[a.jsx("div",{className:"rounded-[6px] bg-white shadow-[0px_4px_10px_0px_rgba(14,22,74,0.1)]",children:m?a.jsx("div",{className:"flex items-center justify-center w-full px-6 py-6",role:"button",tabIndex:0,children:a.jsx(nt,{indicator:a.jsx(it,{className:"text-[48px]",spin:!0}),size:"default"})}):a.jsxs("div",{className:"flex gap-6 p-6",children:[a.jsx("div",{className:"text-primary h-[120px] w-[120px] bg-primary/7 border-primary/25 border-solid border rounded-[6px] flex items-center justify-center",children:a.jsx(G,{className:"h-12 w-9",icon:Us})}),a.jsxs("div",{className:"flex-1",children:[a.jsxs("div",{className:"flex justify-between",children:[a.jsxs("div",{children:[a.jsx("h1",{className:"mb-0 leading-8",children:c?.company_name||""}),a.jsxs("h4",{className:"mt-1 mb-0 text-sm leading-4 text-secondary/74",children:["Total Assigned Matters:  ",a.jsx("span",{className:"font-medium leading-4 text-primary",children:c?.total_assigned_matters?a.jsx(Z,{to:`/global-claim?${new URLSearchParams({organizationId:String(c.id
284),organizationName:c.company_name||""}).toString()}`,className:"underline",children:c?.total_assigned_matters}):0})]})]}),u===t&&_&&g&&a.jsx(Ye,{popupRender:()=>a.jsx(ne,{children:a.jsx(ne.Item,{"data-testid":"admin-settings",onClick:T,children:"Admin Settings"})}),placement:"bottomLeft",trigger:["click"],children:a.jsx(X,{"data-testid":"organization-contacts-action",className:"w-8 h-8 p-0 ml-4 leading-none border rounded-md text-primary border-gray-450",children:a.jsx("span",{children:a.jsx(G,{icon:Ps})})})})]}),a.jsxs("div",{className:"relative flex",children:[a.jsxs("div",{className:"flex flex-col gap-1 py-4 pr-4",children:[a.jsx("p",{className:"font-normal leading-4 text-secondary/74 text-3",children:"Contact Type"}),c?.default_contact_type?.text?a.jsx(Oe,{className:"font-medium text-3 leading-4 text-[rgba(17,23,62,0.84)] py-[1px] bg-primary/7 border-primary/25 w-fit",children:c.default_contact_type.text}):a.jsx("span",{className:"text-sm leading-4 text-secondary/84",children:"-"})]}),a.jsx("div",{className:"w-[1px] h-6 bg-[#E7E8EB] self-center"}),a.jsxs("div",{className:"flex flex-col gap-1 px-4 py-4",children:[a.jsx("p",{className:"font-normal leading-4 text-secondary/74 text-3",children:"Phone Number"}),y||f.length?(()=>{const C=[y,...f].filter(Boolean),L=C?.slice(0,2),w=C?.slice(2);return a.jsxs(a.Fragment,{children:[L?.map(v=>a.jsxs("a",{href:`tel:${v}`,className:"flex items-center text-sm leading-4 cursor-pointer text-secondary/84",children:[v,a.jsx(G,{className:"ml-2 text-[#868994]",icon:_o})]},v)),w.length>0&&a.jsx(we,{title:a.jsx("div",{className:"flex flex-col",children:w.map(v=>a.jsx("span",{className:"text-sm leading-4 text-white-0",children:v},v))}),placement:"top",children:a.jsxs("span",{tabIndex:0,role:"button",className:"ml-1 text-sm font-semibold leading-4 cursor-pointer text-primary",onMouseDown:v=>v.stopPropagation(),onKeyUp:v=>v.preventDefault(),children:[x(w.length,"phone number")," "]})})]})})():a.jsx("span",{className:"text-sm leading-4 text-secondary/84",children:"-"})]}),a.jsx("div",{className:"w-[1px] h-6 bg-[#E7E8EB] self-center"}),a.jsxs("div",{className:"flex flex-col gap-1 px-4 py-4",children:[a.jsx("p",{className:"font-normal leading-4 text-secondary/74 text-3",children:"Email"}),c?.primary_email_address||c?.email_addresses?.length?(()=>{const C=[c?.primary_email_address,...c?.email_addresses||[]].filter(Boolean),L=C.slice(0,2),w=C.slice(2);return a.jsxs(a.Fragment,{children:[L.map(v=>a.jsxs("a",{href:`mailto:${v}`,className:"ml-1 text-sm font-bold leading-4 break-all cursor-pointer text-primary",children:[v,"Â ",a.jsx(G,{icon:Va})]},v)),w.length>0&&a.jsx(we,{placement:"top",title:a.jsx("div",{className:"flex flex-col",children:w.map(v=>a.jsx("span",{className:"text-sm leading-4 text-white-0",children:v},v))}),children:a.jsx("span",{tabIndex:0,role:"button",className:"ml-1 text-sm font-semibold leading-4 cursor-pointer text-primary",onMouseDown:v=>v.stopPropagation(),onKeyUp:v=>v.preventDefault(),children:x(w.length,"email address")})})]})})():a.jsx("span",{className:"text-sm leading-4 text-secondary/84",children:"-"})]}),a.jsx("div",{className:"w-[1px] h-6 bg-[#E7E8EB] self-center"}),a.jsxs("div",{className:"flex flex-col gap-1 px-4 py-4",children:[a.jsx("p",{className:"font-normal leading-4 text-secondary/74 text-3",children:"Website"}),c?.website_urls?.length?(()=>{const C=(Array.isArray(c.website_urls)?c.website_urls:[c.website_urls]).filter(Boolean),L=C.slice(0,2),w=C.slice(2);return a.jsxs(a.Fragment,{children:[L.map(v=>{const D=v.startsWith("http")?v:`https://${v}`;return a.jsxs("a",{href:D,target:"_blank",rel:"noopener noreferrer",className:"ml-1 text-sm font-bold leading-4 break-all cursor-pointer text-primary",children:[v,"Â ",a.jsx(G,{icon:Va})]},v)}),w.length>0&&a.jsx(we,{placement:"top",title:a.jsx("div",{className:"flex flex-col",children:w.map(v=>a.jsx("span",{className:"text-sm leading-4 text-white-0",children:v},v))}),children:a.jsxs("span",{tabIndex:0,role:"button",className:"ml-1 text-sm font-semibold leading-4 cursor-pointer text-primary",onMouseDown:v=>v.stopPropagation(),onKeyUp:v=>v.preventDefault(),children:[x(w.length,"website")," "]})})]})})():a.jsx("span",{className:"text-sm leading-4 text-secondary/84",children:"-"})]}),a.jsx("div",{className:"w-[1px] h-6 bg-[#E7E8EB] self-center"}),a.jsxs("div",{className:"flex flex-col gap-1 py-4 pl-4",children:[a.jsx("p",{className:"font-normal leading-4 text-secondary/74 text-3",children:"Address"}),c?.addresses?.length?(()=>{const C=c.addresses,L=C[0],w=C.slice(1),v=h(L);return a.jsxs(a.Fragment,{children:[v.map((D,j)=>a.jsxs("span",{className:"text-sm leading-4 text-secondary/84",children:[j===0&&a.jsxs(a.Fragment,{children:[D," ",a.jsx(G,{className:"text-[#868994]",icon:yo})]}),j!==0&&D]},j)),w.length>0&&a.jsx(we,{placement:"top",title:a.jsx("div",{className:"flex flex-col gap-2",children:w.map((D,j)=>a.jsx("div",{className:"text-sm leading-4 text-white-0",children:h(D).map((p,S)=>a.jsx("div",{children:p},S))},j))}),children:a.jsx("span",{tabIndex:0,role:"button",className:"text-sm font-semibold leading-4 cursor-pointer text-primary",onMouseDown:D=>D.stopPropagation(),onKeyUp:D=>D.preventDefault(),children:x(w.length,"address")})})]})})():a.jsx("span",{className:"text-sm leading-4 text-secondary/84",children:"-"})]})]})]})]})}),a.jsx("div",{className:"mt-8",children:a.jsx(Fl,{savePDF:Co,containerRef:l,organizationId:t,collaboratorOnly:!0,hideFilters:!0,hideCompanyName:!0})})]})})]})}const Pl="/assets/logo-B29GA6Kw.png",zl="/assets/no_image-D3OhrNUn.png",Bl="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20fill='%23f6c804'%20viewBox='0%200%20512%20512'%3e%3c!--!%20Font%20Awesome%20Pro%206.1.1%20by%20@fontawesome%20-%20https://fontawesome.com%20License%20-%20https://fontawesome.com/license%20(Commercial%20License)%20Copyright%202022%20Fonticons,%20Inc.%20--%3e%3cpath%20d='M506.3%20417l-213.3-364c-16.33-28-57.54-28-73.98%200l-2
28413.2%20364C-10.59%20444.9%209.849%20480%2042.74%20480h426.6C502.1%20480%20522.6%20445%20506.3%20417zM232%20168c0-13.25%2010.75-24%2024-24S280%20154.8%20280%20168v128c0%2013.25-10.75%2024-23.1%2024S232%20309.3%20232%20296V168zM256%20416c-17.36%200-31.44-14.08-31.44-31.44c0-17.36%2014.07-31.44%2031.44-31.44s31.44%2014.08%2031.44%2031.44C287.4%20401.9%20273.4%20416%20256%20416z'/%3e%3c/svg%3e",$e=t=>a.jsx(nt,{indicator:a.jsx(it,{style:{fontSize:t?.size||50},spin:!0}),className:t.className,size:"large",height:40,width:40,...t}),pm=Object.freeze(Object.defineProperty({__proto__:null,default:$e},Symbol.toStringTag,{value:"Module"})),Da=t=>$l(t.text.replace(/ /g,"_"));function $l(t){const e=t&&t.match(/\b(\w)/g);return e&&e.join("")}function rt(t="",e="-"){if(!t)return e;const s=t.replace(/[^\d+]/g,"").replace(/(?!^)\+/g,""),o=new So("US").input(s),i=bo(o,"US");return!i||!i.isPossible()?o:i.country==="US"?i.formatNational():i.formatInternational()}function bs(t="",e="US"){try{const s=To(t,e);return s.country==="US"?s.nationalNumber:s.number}catch{return""}}function Aa(t,e=500){const[s,o]=d.useState(t);return d.useEffect(()=>{const i=setTimeout(()=>{o(t)},e);return()=>{clearTimeout(i)}},[t,e]),s}const Ke=()=>{const t=new J(!0,!0,!0);return async(e,s)=>{const{user:o}=s().auth;e({type:"REFRESH_OFFICES_META_START"});try{let i={count:0,unassignedContactsCount:void 0};if(o?.permission_level===he.GLOBAL_ADMIN){const l=await t.getOfficeList({limit:1});l?.status===200&&l?.data&&(i.count=l?.data?.count)}const n=await t.getOurTeamMembers({limit:1,assigned_to_office:!1});n.status===200&&n?.data&&(i.unassignedContactsCount=n?.data?.count),e({type:"REFRESH_OFFICES_META_SUCCESS",payload:i})}catch{e({type:"REFRESH_OFFICES_META_ERROR"})}}},xm=(t,e=()=>{},s=()=>{})=>async o=>{o({type:"CREATE_OFFICE_START"});try{const i=await ce.post("/offices",t);i.status===201&&i?.data?(o({type:"CREATE_OFFICE_SUCCESS",payload:i?.data}),o(Ke()),e(i?.data)):(o({type:"CREATE_OFFICE_ERROR",payload:{message:"Error",description:i?.data?.message||"Something went wrong"}}),s({message:"Error",description:i?.data?.message||"Something went wrong"}))}catch(i){o({type:"CREATE_OFFICE_ERROR",payload:{message:"Error",description:i?.response?"Page Not Found":"Something went wrong"}}),s(i)}},Ar=t=>{const e=new J(!0,!0,!0);return async s=>{s({type:"GET_CONTACTS_LIST_START"});try{const o=await e.getContactsList(t);o.status===200&&o?.data?s({type:"GET_CONTACTS_LIST_SUCCESS",payload:o?.data||[]}):s({type:"GET_CONTACTS_LIST_ERROR",payload:{message:"Error",description:o?.data?.message||"Something went wrong"}})}catch(o){if(o?.canceled)return;s({type:"GET_CONTACTS_LIST_ERROR",payload:{message:"Error",description:o?.response?"Page Not Found":"Something went wrong"}})}}},{Text:Ts,Link:Gl}=_e;function Oa({icon:t=null,title:e,subTitle:s,buttonLabel:o,linkLabel:i="Learn More",onClick:n=()=>{},showButtons:l=!0,customButton:c=null}){return a.jsxs("div",{className:"no-data-wrapper no-data-wrapper-gap",children:[t,a.jsxs("div",{className:"no-data-wrapper",style:{width:560},children:[a.jsx(Ts,{className:"title",children:e}),a.jsx(Ts,{className:"sub-title !text-sm",children:s})]}),l&&a.jsxs("div",{className:"no-data-wrapper",style:{gap:16},children:[c||a.jsxs(X,{className:"button-ofc",onClick:n,children:[o,a.jsx("i",{className:"fas fa-plus"})]}),a.jsx(Gl,{href:vr,target:"_blank",className:"hyper-link",children:i})]})]})}const _m=(t,e={},s=()=>{},o=()=>{})=>{const i=new J(!0,!0,!0);return async n=>{n({type:"DELETE_OFFICE_BY_ID_START"});try{const l=await i.deleteOfficeById(t,e);l.status===204?(n({type:"DELETE_OFFICE_BY_ID_SUCCESS"}),s()):(n({type:"DELETE_OFFICE_BY_ID_ERROR",payload:{message:"Error",description:l?.data?.message||"Something went wrong"}}),o({message:"Error",description:l?.data?.message||"Something went wrong"}))}catch(l){if(l?.canceled)return;console.log(l),n({type:"DELETE_OFFICE_BY_ID_ERROR",payload:{message:"Error",description:l?.response?"Page Not Found":"Something went wrong"}}),o({message:"Error",description:l?.response?"Page Not Found":"Something went wrong"})}}},ws=(t,e=()=>{},s=()=>{})=>{const o=new J(!0,!0,!0);return async(i,n)=>{const l=n().commonOfficeState;i({type:"GET_OFFICE_LIST_START"});try{const c=await o.getOfficeList(t);if(c.status===200&&c?.data){const m=c?.data?.results?.map(u=>({value:u?.id,label:u?.name,...u}));
284i({type:"GET_OFFICE_LIST_SUCCESS",payload:{...l?.officeList||{},data:[...l.officeList.data||[],...m],page:l.officeList.page+1,totalCount:c?.data?.count||0}}),e(c?.data)}else s({message:"Error",description:c?.data?.message||"Something went wrong"})}catch(c){if(c?.canceled)return;s({message:"Error",description:c?.response?"Page Not Found":"Something went wrong"})}}},Vl=(t,e,s=()=>{},o=()=>{})=>{const i=new J(!0,!0,!0);return async n=>{n({type:"EDIT_OFFICE_DETAILS_START"});try{const l=await i.editOfficeById(t,e);l.status===200&&l?.data?(n({type:"EDIT_OFFICE_DETAILS_SUCCESS",payload:l?.data}),s()):(n({type:"EDIT_OFFICE_DETAILS_ERROR",payload:{message:"Error",description:l?.data?.message||"Something went wrong"}}),o({message:"Error",description:l?.data?.message||"Something went wrong"}))}catch(l){if(l?.canceled)return;n({type:"EDIT_OFFICE_DETAILS_ERROR",payload:{message:"Error",description:l?.response?.message||"Something went wrong"}}),console.log(l?.response?.message),o({message:"Error",description:l?.response?.message||"Something went wrong"})}}},ym=(t,e=()=>{},s=()=>{})=>{const o=new J(!0,!0,!0);return async i=>{i({type:"TURN_OFFICE_BY_ORG_ID_START"});try{const n=await o.turnOffOfficeByOrgId({organization_id:t});n.status===200?(i({type:"TURN_OFFICE_BY_ORG_ID_SUCCESS"}),e({message:"Success",description:n?.data?.message||"Office has been turned off successfully."})):(i({type:"TURN_OFFICE_BY_ORG_ID_ERROR",payload:{message:"Error",description:n?.data?.message||"Something went wrong"}}),s({message:"Error",description:n?.data?.message||"Something went wrong"}))}catch(n){if(n?.canceled)return;console.log(n),i({type:"TURN_OFFICE_BY_ORG_ID_ERROR",payload:{message:"Error",description:n?.response?"Page Not Found":"Something went wrong"}}),s({message:"Error",description:n?.response?"Page Not Found":"Something went wrong"})}}},Hl=(t,e=()=>{},s=()=>{})=>{const o=new J(!0,!0,!0);return async i=>{i({type:"GET_OFFICE_WARNING_MESSAGE_START"});try{const n=await o.getOfficeValidationWarningMessage(t);n.status===200?(i({type:"GET_OFFICE_WARNING_MESSAGE_ERROR"}),e(n.data)):(i({type:"GET_OFFICE_WARNING_MESSAGE_ERROR",payload:{message:"Error",description:n?.data?.message||"Something went wrong"}}),s({message:"Error",description:n?.data?.message||"Something went wrong"}))}catch(n){if(n?.canceled)return;console.log(n),i({type:"GET_OFFICE_WARNING_MESSAGE_ERROR",payload:{message:"Error",description:n?.message||"Something went wrong"}}),s({message:"Error",description:n?.message||"Something went wrong"})}}},Cm=(t=()=>{},e=()=>{})=>{const s=new J(!0,!0,!0);return async(o,i)=>{const{user:n}=i().auth;try{const l=await s.getAccountInformation();l.status===200?(o(ft({user:{...n,office_id:l.data.office_id,global_admin_office_id:l.data.global_admin_office_id,permission_level:l.data.permission_level,office_enable:l.data.office_enable,office_turned_on:l.data.office_turned_on,practice_area_cs_config_enabled:l.data.practice_area_cs_config_enabled,snapsheet_enable:l.data.snapsheet_enable,collaborator_enable:l.data.collaborator_enable}})),t()):e({message:"Error",description:l?.data?.message||"Something went wrong"})}catch(l){if(l?.canceled)return;e({message:"Error",description:l?.response?"Page Not Found":"Something went wrong"})}}},ql=(t=()=>{},e=()=>{})=>{const s=new J(!0,!0,!0);return async o=>{o({type:"UPDATE_COMMON_USER_FLAG",payload:!0});try{const i=await s.updateUserFeatureFlag({reset_refresh_required_reason:!0});i.status===200?(t(),o({type:"UPDATE_COMMON_USER_FLAG",payload:!1})):(e({message:"Error",description:i?.data?.message||"Something went wrong"}),o({type:"UPDATE_COMMON_USER_FLAG",payload:!1}))}catch(i){if(o({type:"UPDATE_COMMON_USER_FLAG",payload:!1}),i?.canceled)return;e({message:"Error",description:i?.response?"Page Not Found":"Something went wrong"})}}},Sm=(t,e=()=>{},s=()=>{})=>{const o=new J(!0,!0,!0);return async i=>{i({type:"GET_OFFICES_LIST_START"});try{const n=await o.getOfficeList(t);n.status===200&&n?.data?(i({type:"GET_OFFICES_LIST_SUCCESS",payload:n?.data}),e(n?.data)):(i({type:"GET_OFFICES_LIST_ERROR",payload:{message:"Error",description:n?.data?.message||"Something went wrong"}}),s({message:"Error",description:n?.data?.message||"Something went wrong"}))}catch(n){if(n?.canceled)return;i({type:"GET_OFFICES_LIST_ERROR",payload:{message:"Error",description:n?.response?"Page Not Found":"Something went wrong"}}),s({message:"Error",description:n?.response?"Page Not Found":"Something went wrong"})}}},La=(t,e=()=>{},s=()=>{})=>{const o=new J(!0,!0,!0);return async i=>{i({type:"ASSIGN_CONTACTS_START"});try{const n=await o.assignContacts(t);n.status===200&&n?.data?(i({type:"ASSIGN_CONTACTS_SUCCESS",payload:n?.data}),i(Ke()),i({type:"FORCE_UPDATE_CONTACTS_LIST_TABLE"}),e(n?.data)):(i({type:"ASSIGN_CONTACTS_ERROR",payload:{message:"Error",description:n?.data?.message||"Something went wrong"}}),s({message:"Error",description:n?.data?.message||"Something went wrong"}))}catch(n){if(n?.canceled)return;i({type:"ASSIGN_CONTACTS_ERROR",payload:{message:"Error",description:n?.response?"Page Not Found":"Something went wrong"}}),s({message:"Error",description:n?.response?"Page Not Found":"Something went wrong"})}}},Jl=(t,e=()=>{},s=()=>{})=>{const o=new J(!0,!0,!0);return async i=>{i({type:"ASSIGN_CONTACTS_START"});try{const n=await o.getChangeUsersPermission(t);n.status===200&&n?.data?(i({type:"ASSIGN_CONTACTS_SUCCESS",payload:n?.data}),i(Ke()),i({type:"FORCE_UPDATE_CONTACTS_LIST_TABLE"}),e(n?.data)):(i({type:"ASSIGN_CONTACTS_ERROR",payload:{message:"Error",description:n?.data?.message||"Something went wrong"}}),s({message:"Error",description:n?.data?.message||"Something went wrong"}))}catch(n){if(n?.canceled)return;i({type:"ASSIGN_CONTACTS_ERROR",payload:{message:"Error",description:n?.response?"Page Not Found":"Something went wrong"}}),s({message:"Error",description:n?.response?"Page Not Found":"Something went wrong"})}}},Tt=[{value:"Global Admin",label:"Global Admin"},{value:"Office Admin",label:"Office Admin"},{value:"Team Member",label:"Team Member"}],Zl=({type:t},e="")=>{switch(t){case"OFFICE_WITHOUT_OFFICE_ADMIN":return`If saved, ${e} will no longer have an Office Admin.`;case"OFFICE_WITHOUT_TEAM_MEMBER":return`If saved, ${e} will no longer have an Team Member.`;case"OFFICE_WITHOUT_ANY_USER":return`If saved, ${e} will no longer have the user(s).`;default:return!1}},Wl=t=>a.jsx("div",{...t,children:a.jsx(Le,{})});function Kl(t){const e=ke.createRef(),s=()=>{const{data:f,loadMore:h,hasMore:x,loading:T}=t,C=document.getElementById(`infinite-select-${(f||[]).length-1}`),L=e.current.getBoundingClientRect().top;if(C){const w=C.getBoundingClientRect().top-L,v=e.current.getBoundingClientRect().height;w-15<v&&!T&&x&&h()}},{data:o,value:i,loading:n,className:l,disabled:c=!1,suffixIcon:m,placeholder:u="",onChange:_=()=>{},onBlur:g=()=>{},onSearch:y=()=>{}}=t;return a.jsx(ye,{style:t?.style||{},onPopupScroll:s,popupRender:f=>a.jsxs("div",{ref:e,id:"dropdown",children:[f,a.jsx("div",{className:"loader-loading-more",style:{width:"100%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx(nt,{indicator:a.jsx(it,{type:"loading",style:{fontSize:20},spin:!0}),spinning:n})})]}),showSearch:!0,filterOption:(f,h)=>(h?.label||h?.children)?.toLowerCase().indexOf(f.toLowerCase())>=0,placeholder:n&&!o?.length?"Loading...":u,value:i,onChange:_,components:{DropdownIndicator:Wl},onBlur:g,className:l,disabled:c,suffixIcon:m,onSearch:y,children:o.map(({label:f,value:h,...x},T)=>a.jsx(ye.Option,{id:`infinite-select-${T}`,value:h,...x,children:f},h))})}function Or({open:t,selectedContact:e,onCancel:s,onSubmit:o,title:i="Assign User",queryParams:n={reassign:!1},totalContacts:l=0,isUpdatePermission:c=!1,isAssignedUser:m=!1}){const u=de(),{showSuccessToast:_,showErrorToast:g}=Qe(),[y,f]=d.useState(null),[,h]=d.useState(),{id:x}=M(z=>z.auth.user),{selectedContacts:T,isSelectedAll:C}=M(z=>z?.createOffice),{currentPermission:L,isGlobalAdmin:w,isOfficeAdmin:v,isOfficeFlagEnable:D,isOrgOfficeFlagEnable:j,checkIsGlobalAdmin:p,checkIsOfficeAdmin:S}=Fe(),{unAssignedContacts:I}=M(z=>z.genericOfficeReducer),{warningMessage:q}=M(z=>z.commonOfficeState),{data:V={}}=M(z=>
284z.officeDetailsDrawerReducer),[b,E]=d.useState(!1),{officeList:{data:k,loading:U,pageSize:ae,page:F,totalCount:ee,search:H}}=M(z=>z.commonOfficeState),W=d.useMemo(()=>w?k:k?.filter(z=>!p(z?.label)),[w,k?.length,k]),Y=d.useMemo(()=>T?.filter(z=>z?.user!==x),[T,x]);d.useEffect(()=>{if(w){const z={limit:ae,offset:ae*(F-1),search:H||""};u(ws(z))}},[w]);const Ce=()=>{if(W?.length<ee){const z={limit:ae,offset:ae*(F-1),search:H||""};u(ws(z))}},A=z=>{se.current.fieldValid(z)?se.current.hideMessageFor(z):(se.current.showMessages(),h(1))},re=d.useMemo(()=>p(y?.permission_level||"")&&k?.length||!p(y?.permission_level||"")&&k?.length>1,[p,y?.permission_level,k?.length]),se=d.useRef(new _a({autoForceUpdate:{forceUpdate:h}})),te=se.current?.message("permission_level",y?.permission_level||"","required",{messages:{required:"The permission level field is required"}}),O=re?se.current?.message("officeId",y?.officeId||"","required",{messages:{required:"The office field is required"}}):"";d.useEffect(()=>{const z=e?.office?.id||Y?.[0]?.office?.id||null,fe=e?.office?.name||Y?.[0]?.office?.name||null,xe=e?.permission_level||Y?.[0]?.permission_level||null;if(c&&(v||w)&&z){const Se=p(xe);f({officeId:z,officeName:fe,permission_level:Y?.length>1&&!Se?null:xe})}},[Y?.length,c,v,w,e?.id]);const N=()=>{const z=Y?.length&&!e?.id?Y?.map(xe=>xe?.user):[e?.user],fe={users:C?[]:z,source_office_id:e?.office?.id||Y?.[0]?.office?.id||void 0,target_office_id:y?.officeId||void 0,target_permission_level:y?.permission_level||"",all_users_selected:C};u(Hl(fe,xe=>{const Se=Zl(xe,e?.office?.name||Y?.[0]?.office?.name);E(Se)}))};d.useEffect(()=>{j&&D&&(W?.length&&w||v)&&y?.officeId&&y?.permission_level&&c&&N()},[w,v,c,D,W?.length,y?.officeId,y?.permission_level,j]);const P=z=>p(z)?{officeId:W?.[0]?.value,officeName:W?.[0]?.label}:p(y?.officeName)?{officeId:null,officeName:""}:{officeId:y?.officeId,officeName:y?.officeName},Q=z=>p(z)?{permission_level:z}:p(y?.permission_level)?{permission_level:null}:{permission_level:y?.permission_level},oe=()=>{if(se.current?.allValid()){const fe=Y?.length&&!e?.id?Y?.map(Ge=>Ge?.user):[e?.user],xe=m&&v?V?.id:e?.office?.id||Y?.[0]?.office?.id,Se={users:C?[]:fe,source_office_id:xe,target_office_id:m&&v?xe:y?.officeId,target_permission_level:y?.permission_level,all_users_selected:C,...n},Je=Ge=>{se.current.purgeFields(),_({description:c?Ge?.message||"User(s) have been successfully updated.":`${y?.permission_level}(s) have been added to an office.`}),u({type:"UPDATE_SELECT_ALL_TOGGLE",payload:!1}),o()},Ct=Ge=>{g({description:Ge?.description})};u(re||m?La(Se,Je,Ct):Jl(Se,Je,Ct))}else se.current.showMessages(),h(fe=>fe+1)},me=d.useMemo(()=>{switch(L){case he.GLOBAL_ADMIN:return Tt&&W?.length>1?Tt:Tt?.filter(z=>!S(z.value));case he.OFFICE_ADMIN:return Tt?.filter(z=>!p(z.value));default:return[]}},[p,S,L,W?.length]);return a.jsx(ot,{title:a.jsxs("div",{children:[a.jsx("h1",{children:i}),a.jsx("span",{className:"sub-title truncate",title:Y?.length>1&&!e?.id?"":e?.display_name||Y?.[0]?.display_name,children:Y?.length>1&&!e?.id?`${C?l:Y?.length} User(s) selected`:jr(e?.display_name||Y?.[0]?.display_name||"")}),(te||O)&&a.jsx(ya,{type:"error",message:"This form contains errors. Please correct them before continuing.",showIcon:!0,icon:a.jsx("i",{className:"fa fa-exclamation-triangle","aria-hidden":"true"}),className:"error-message",style:{maxWidth:"100%"}})]}),open:t,closeIcon:a.jsx("i",{className:"far fa-times","aria-hidden":"true"}),className:"assigned-contacts-modal",width:624,destroyOnHidden:!0,centered:!0,onCancel:s,footer:[a.jsx(ke.Fragment,{children:a.jsx("div",{className:"modal-footer-container",children:a.jsxs("div",{style:{display:"flex",flex:1,justifyContent:"flex-end",gap:16},children:[a.jsx(X,{onClick:s,className:"btn btn-grey lg-btn",children:"Cancel"}),a.jsx(X,{onClick:oe,className:"btn lg-btn",loading:I?.loading,style:{margin:"0px !important"},disabled:I?.loading||q?.loading,children:c?`Update ${Y?.length>1&&!e?.id?`${C?l:Y?.length} User(s)`:"User(s)"}`:"Assign User"})]})})},"footer-buttons")],children:a.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:16},className:"assigned-contacts-form",children:[a.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[a.jsxs(_e.Text,{className:"form-title",children:["Permission Level",a.jsx("span",{style:{color:"#D83535",marginLeft:4},children:"*"})]}),a.jsx(ye,{showSearch:!0,filterOption:(z,fe)=>fe?.label?.toLowerCase().indexOf(z.toLowerCase())>=0,placeholder:"Select a permission level",value:y?.permission_level,onChange:z=>{const{officeId:fe,officeName:xe}=P(z);f(Se=>({...Se,permission_level:z,officeId:fe,officeName:xe}))},suffixIcon:a.jsxs("div",{className:"select-icon-wrapper",children:[te&&a.jsx("span",{className:"error-text flex",children:a.jsx(G,{icon:oa})}),a.jsx("span",{className:"flex flex-1",children:a.jsx(Le,{})})]}),options:me,className:te?"error-select-selection-search":""}),a.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:a.jsx("span",{className:"error-message-input",style:{flexGrow:1},children:te})})]}),!p(y?.permission_level)&&w&&a.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[a.jsxs(_e.Text,{className:"form-title",children:["Office",!!(W?.length&&re)&&a.jsx("span",{style:{color:"#D83535",marginLeft:4},children:"*"})]}),a.jsx(Kl,{placeholder:W?.length?"Select an office":"No Office(s) to select",data:W,hasMore:W.length<ee,loadMore:Ce,loading:U,className:O?"error-select-selection-search error-filed":"",disabled:!W?.length||!re||!W?.length,suffixIcon:a.jsxs("div",{className:"select-icon-wrapper",children:[O&&a.jsx("span",{className:"error-text flex",children:a.jsx(G,{icon:oa})}),a.jsx(Le,{})]}),value:W?.length?y?.officeId:y?.office?.name,onChange:(z,fe)=>{const{permission_level:xe}=Q(fe?.name);f(Se=>({...Se,officeId:z,permission_level:xe,officeName:fe?.name}))},onBlur:()=>A("officeId"),onSearch:z=>{u({type:"UPDATE_SEARCH_BY_OFFICE",payload:z})}}),a.jsx("div",{style:{display:"flex",flexDirection:"column"},children:a.jsx("span",{className:"error-message-input",style:{flexGrow:1},children:O})})]}),b&&a.jsxs("div",{style:{fontSize:12,fontWeight:400,lineHeight:"16px",display:"flex",color:"#9
284C7811",gap:8,marginTop:8},children:[a.jsx("span",{children:a.jsx("i",{style:{height:12,width:12,color:"#E8B931"},className:"fas fa-exclamation-triangle","aria-hidden":"true"})}),a.jsx("span",{children:b})]})]})})}const{Search:Yl}=Ae,Ql=[{title:"User Name",key:"contact_name",mapping:"display_name",width:150,sorter:!0,fixed:!0,defaultSortOrder:"ascend",render:(t,e,s)=>a.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[t?.profile_image?a.jsx(ve,{src:t?.profile_image,alt:"user",className:"lg-avatar"}):a.jsx(ve,{className:"bg-blue lg-avatar",children:t?.display_name&&a.jsx(a.Fragment,{children:t?.display_name.split(" ").length>0&&t?.display_name.split(" ").map((o,i)=>a.jsx(Da,{text:o.toUpperCase()},i))})}),a.jsx(_e.Text,{style:{marginLeft:16},children:t?.display_name})]},`${e}-${s}`)},{title:"Email",dataIndex:"primary_email_address",key:"primary_email_address",render:t=>t||"-",width:150},{title:"Phone Number",dataIndex:"primary_phone_number",key:"primary_phone_number",render:t=>rt(t),width:100},{title:"Status",key:"status",width:100,render:(t,e,s)=>a.jsx(ke.Fragment,{children:t?.status?.toLowerCase()==="active"?a.jsx(Oe,{className:"ant-tag-green",children:t?.status}):t?.status?.toLowerCase()==="inactive"?a.jsx(Oe,{className:"ant-tag-no-access",children:t?.status}):a.jsx(Oe,{className:"ant-tag-success",children:t?.status})},`${t}-${e}-${s}`)}];function Lr({open:t,onCancel:e,subTitle:s,title:o,onSubmit:i}){const n=de(),{selectedContacts:l,contacts:c,contactsLoading:m}=M(j=>j?.createOffice),[u,_]=d.useState({page:1,pageSize:10}),[g,y]=d.useState(""),[f,h]=d.useState("ascend"),x=Aa(g),[T,C]=d.useState(!1),L=j=>{n({type:"SELECTED_CONTACTS",payload:j})};d.useEffect(()=>{w()},[x,u?.pageSize,u?.page,f]);const w=()=>{n(Ar({search:g,ordering:f==="ascend"?"display_name":"-display_name",limit:u?.pageSize,offset:u.pageSize*(u.page-1),exclude_global_admins:!0,assigned_to_office:!1}))},v=[...Ql],D=()=>{w(),C(!1)};return a.jsxs(a.Fragment,{children:[a.jsx(ot,{title:a.jsxs(a.Fragment,{children:[a.jsx("h1",{children:o}),a.jsx("span",{className:"sub-title",children:s})]}),open:t,closeIcon:a.jsx("i",{className:"far fa-times","aria-hidden":"true"}),classNames:{body:"p-0"},className:"add-unassigned-contacts-modal",width:"100%",style:{maxWidth:1100},destroyOnHidden:!0,centered:!0,onCancel:e,footer:a.jsx(ke.Fragment,{children:(c?.results?.length||m||x)&&a.jsxs(a.Fragment,{children:[a.jsx(Ut,{total:c?.count,showTotal:(j,p)=>`${p[0]}-${p[1]} of ${j} items`,defaultPageSize:u.pageSize,current:u.page,pageSizeOptions:[10,20,50,100,200],showSizeChanger:{showSearch:!1},responsive:!0,className:"pagination-select",position:"bottomLeft",onChange:(j,p)=>{_({page:j,pageSize:p})}}),a.jsx("div",{style:{display:"flex",width:"100%",borderTop:"1px solid rgb(231, 232, 235)"},children:a.jsx("div",{className:"flex-1 flex",children:a.jsxs(X,{onClick:()=>C(!0),className:"btn lg-btn",style:{marginLeft:"auto"},disabled:!l?.length,children:[l?.length?`Add (${l?.length}) User(s)`:"Add User(s)",a.jsx(G,{icon:lt})]})})})]})},"modal-footer"),children:a.jsx("div",{className:"unassigned-contact-list-container",children:c?.results?.length||m||x?a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{display:"inline-flex",alignItems:"center",justifyContent:"flex-end",padding:"16px 24px",borderBottom:"1px solid #e7e8eb"},children:a.jsx(Yl,{className:"ant-searchbtn",placeholder:"Search",allowClear:!0,onChange:j=>y(j.target.value),onSearch:()=>{g?.length===0&&(y(""),_({...u,page:1}))},style:{width:200,margin:0},value:g})}),a.jsx(Mt,{pagination:!1,filtered:!0,columns:v,dataSource:c?.results,loading:{indicator:a.jsx($e,{}),spinning:m},rowKey:j=>j.id,scroll:{y:380},rowSelection:{columnWidth:50,selectedRowKeys:l?.map(j=>j?.id),onSelect:j=>{if(l?.find(S=>S?.id===j?.id)){const S=l?.filter(I=>I?.id!==j?.id);L([...S])}else L([...l,j])}},rowClassName:j=>l?.find(S=>S?.id===j?.id)?"active":"",onChange:(j,p,S)=>{h(S?.order||"ascend")},className:"contact-list-modal"})]}):a.jsx("div",{className:"no-data-container",children:a.jsx(Oa,{title:a.jsx(a.Fragment,{children:"You don't currently have any unassigned users to add to this office"}),subTitle:"Looking to add users to this office? Reassign users from existing office
284s or add new users to your organization.",showButtons:!1})})})}),!!T&&a.jsx(Or,{open:!!T,selectedContact:T,onCancel:()=>{n({type:"RESET_OFFICES_LIST_DATA"}),C(!1)},onSubmit:()=>{D(),i()},totalContacts:c?.count,isAssignedUser:!0})]})}function Xl(){const t=gt(),e=de(),{unassignedContactsCount:s,count:o}=M(l=>l.genericOfficeReducer),[i,n]=d.useState(!1);return d.useEffect(()=>{e(Ke())},[o,e]),d.useEffect(()=>{const l=document.querySelector("#main-header")?.clientHeight||90;e({type:"UPDATE_COMMON_STATE",payload:{headerHeight:l}})},[e,t.key,s]),t.pathname.includes("admin-setting")||!s||!o?null:a.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#fffbe6",border:"1px solid #ffe58f",gap:30},children:[a.jsxs("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",gap:8},children:[a.jsx("span",{style:{width:"24px",height:"24px",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("i",{className:"fas fa-exclamation-triangle","aria-hidden":"true",style:{width:14,height:12,lineHeight:"0px",color:"#FBC800"}})}),a.jsx("span",{style:{fontSize:12,fontWeight:600,lineHeight:"14px",color:"#11173EE5"},children:`${s} user(s) are not currently assigned to an office`})]}),a.jsx("span",{style:{display:"flex",height:16,justifyContent:"center",alignItems:"center",gap:"7px",color:"#5463d2",fontSize:"12px",fontStyle:"normal",fontWeight:700,lineHeight:"12px",cursor:"pointer"},onClick:()=>n(!0),children:"Assign Users"}),i&&a.jsx(Lr,{open:i,onCancel:()=>{e({type:"SELECTED_CONTACTS",payload:[]}),e({type:"RESET_OFFICES_LIST_DATA"}),n(!1)},onSubmit:()=>{e({type:"SELECTED_CONTACTS",payload:[]}),e(Ke())},title:"Unassigned Users",subTitle:"View and assign unassigned users from your organization to your offices."})]})}const ec=Me(jt)` 285 border: 1px solid ${pe.light_gray_border}; 286 287 & .ant-card-body { 288 padding: 0px !important; 289 } 290 @media only screen and (max-width: ${Yi.md}) { 291 &.custom-card-title .ant-row-justify-start { 292 align-content: flex-start; 293 flex-direction: column; 294 > div { 295 width: 100%; 296 div { 297 padding-left: 0; 298 } 299 } 300 } 301 } 302 .pointer { 303 display: inline-block; 304 cursor: pointer; 305 } 306`,tc=Me.div` 307 padding: 15px 30px 30px 30px; 308 @media only screen and (max-width: 600px) { 309 .mobile-center { 310 text-align: center; 311 } 312 } 313 .project--shopdrawing { 314 .quotes-card { 315 padding-top: 25px; 316 min-height: 240px; 317 } 318 .bold { 319 font-family: 'Segoe UI Bold'; 320 } 321 } 322`,ac=a.jsx(it,{style:{fontSize:50},spin:!0}),Pe=t=>
322a.jsx("div",{children:a.jsx(tc,{children:a.jsx(ec,{variant:"borderless",children:a.jsx(nt,{indicator:ac,className:t.className,size:"large",height:40,width:40})})})});function sc(){return new Date().toString().match(/\(([^\)]+)\)$/)[1].match(/\b(\w)/g).join("")}const yt=()=>{const t=d.useContext(Nr);if(!t)throw new Error("useChurnZero must be used within a ChurnZeroProvider");return t},fa=(t="")=>{const e=Fi(Cr(t));return zs.sanitize(e)},Rr=(t="")=>wo(t),rc=(t="")=>Rr(fa(t)),bm=(t="")=>{const e=Cr(t);return zs.sanitize(e,{ALLOWED_TAGS:[],ALLOWED_ATTR:[]})},Tm=(t="",e="")=>{const s=fa(t),o=fa(e);return Rr(Eo.execute(s,o))},Gt=()=>{const e=M(_=>_.auth.user)?.timezone||kt.tz.guess(),s=kt.tz.setDefault(e),o=()=>s().add(30-s().minute()%30,"minutes").startOf("minute"),i=e,n=o(),l=s(n).add(1,"hour");return{moment:s,DEFAULT_EVENT_TIME_DATA:{dateTime:n,tz:i},DEFAULT_EVENT_END_TIME_DATA:{dateTime:l,tz:i},EVENT_END_DT_OBJ:l,EVENT_START_DT_OBJ:n,CURRENT_TIMEZONE:i,getNext30MinuteMark:o,replaceTimezoneWithoutChangingTime:(_,g,y)=>{const f=s.tz(_,g).format("YYYY-MM-DDTHH:mm:ss");return s.tz(f,y)}}},Lt=t=>({type:"localSearchTYPE",payload:t});function wt(t){const{moment:e,CURRENT_TIMEZONE:s}=Gt(),o=de(),i=["before_seven_day"],n=yt();return d.useEffect(()=>{try{n.churnInfo&&n.churnInfo.trackEvent("Dismissed Alert","User dismissed the alert")}catch(l){console.log(l)}},[n.churnInfo]),a.jsx(a.Fragment,{children:a.jsx(ya,{description:a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"nrow-block",children:a.jsxs("div",{className:"flex flex-start",children:[a.jsx("span",{className:"bg-ico",children:a.jsx("i",{className:"fas fa-info-circle"})}),a.jsxs("div",{className:"ndetail",children:[a.jsx("div",{className:"flex nmsg",children:a.jsx("p",{className:"wrap-text",children:rc((t?.currentData?.notification||"")?.replace(/<br\s*\/?>/gi," ").replace(/\s+/g," ").trim())})}),t.currentData.notification_from==="budget"?a.jsx("u",{children:a.jsx(Z,{className:"primary-link sm-link",style:{textAlign:"left",display:"block"},onClick:()=>t.parentOnCloseDrawer(),to:`/claim/${t.currentData.claim}/numbers/explore-budget?search=${t?.currentData?.notification_extra_info?.id}`,children:"View"})}):t.currentData.notification_from==="settlement_negotiation"?a.jsx("u",{children:a.jsx(Z,{className:"primary-link sm-link",style:{textAlign:"left",display:"block"},onClick:()=>t.parentOnCloseDrawer(),to:`/claim/${t.currentData.claim}/numbers/explore-settlement`,children:"View"})}):t.currentData.notification_from==="claim_valuation"?a.jsx("u",{children:a.jsx(Z,{className:"primary-link sm-link",style:{textAlign:"left",display:"block"},onClick:()=>t.parentOnCloseDrawer(),to:`/claim/${t.currentData.claim}/numbers/explore-claim-valuation?search=${t?.currentData?.notification_extra_info?.id}`,children:"View"})}):t.currentData.notification_from==="claim_numbers"?a.jsx("u",{children:a.jsx(Z,{className:"primary-link sm-link",style:{textAlign:"left",display:"block"},onClick:()=>t.parentOnCloseDrawer(),to:`/claim/${t.currentData.claim}/numbers`,children:"View"})}):t.currentData.notification_from==="liens"?a.jsx("u",{children:a.jsx(Z,{className:"primary-link sm-link",style:{textAlign:"left",display:"block"},onClick:()=>t.parentOnCloseDrawer(),to:`/claim/${t.currentData.claim}/numbers/explore-liens`,children:"View"})}):t.currentData.notification_from==="claim_dashboard"||t.currentData.notification_from==="claim_table_module"?a.jsx("u",{children:a.jsx(Z,{className:"primary-link sm-link",style:{textAlign:"left",display:"block"},onClick:()=>t.parentOnCloseDrawer(),to:`/claim/${t.currentData.claim}/overview`,children:"View"})}):(t.currentData.notification_from==="task"||t.currentData.notification_from==="request")&&i?.includes(t?.currentData?.notification_type?.notification_type)?a.jsx("u",{children:a.jsx(Z,{onClick:()=>{t.parentOnCloseDrawer()},className:"primary-link sm-link",style:{textAlign:"left",display:"block"},to:{pathname:`/claim/${t?.currentData?.claim}/tasks`,search:t.currentData.notification_extra_info?.id?`?id=${t.currentData.notification_extra_info.id}&law=${t.currentData.notification_extra_info.law}&name=${t.currentData.notification_extra_info.name}&carrier=${t.currentData.notification_extra_info.carrier}`:""},children:"View"})}):(t.currentData.notification_from==="task"||t.currentData.notification_from==="request")&&!i?.includes(t?.currentData?.notification_type?.notification_type)?a.jsx("u",{children:a.jsx(Z,{onClick:()=>{t.parentOnCloseDrawer()},className:"primary-link sm-link",style:{textAlign:"left",display:"block"},to:{pathname:"/global-task",search:t.currentData.notification_extra_info?.id?`?id=${t.currentData.notification_extra_info.id}&law=${t.currentData.notification_extra_info.law}&name=${t.currentData.notification_extra_info.name}&carrier=${t.currentData.notification_extra_info.carrier}`:""},children:"View"})}):t.currentData.notification_from==="documents"?a.jsx("u",{children:t.currentData.folder_id?a.jsx(Z,{to:`/claim/${t.currentData.claim}/${t.currentData.notification_from}/${t.currentData.folder_id}?document_id=${t?.currentData?.document_id}`,className:"primary-link sm-link",style:{textAlign:"left",display:"block"},onClick:()=>{o(Lt({search_keyword:t.currentData.document_name})),t.parentOnCloseDrawer()},children:"View"}):a.jsx(Z,{to:`/claim/${t.currentData.claim}/${t.currentData.notification_from}?document_id=${t?.currentData?.document_id}`,className:"primary-link sm-link",style:{textAlign:"left",display:"block"},onClick:()=>{o(Lt({search_keyword:t.currentData.document_name})),t.parentOnCloseDrawer()},children:"View"})}):t.currentData.notification_from==="claim_contact"?a.jsx("u",{children:a.jsx(Z,{className:"primary-link sm-link",style:{textAlign:"left",display:"block"},onClick:()=>t.parentOnCloseDrawer(),to:`/claim/${t.currentData.claim}/contacts`,children:"View"})}):t?.currentData?.notification_from==="event"?a.jsx("u",{children:t?.currentData?.notification_type?.notification_type!=="delete_event"&&a.jsx(Z,{className:"primary-link sm-link",style:{textAlign:"left",display:"block"},onClick:()=>t.parentOnCloseDrawer(),to:{pathname:"/events",search:t.currentData.notification_extra_info?.id?`?id=${t?.currentData?.notification_extra_info?.id}&s=${Ie.utc(t?.currentData?.notification_extra_info?.start_time).format("YYYY-MM-DD")}&e=${Ie.utc(t?.currentData?.notification_extra_info?.start_time).add(30,"days").format("YYYY-MM-DD")}`:""},children:"View"})}):t.currentData.notification_from===void 0?"":a.jsx("u",{children:a.jsx(Z,{className:"primary-link sm-link",style:{textAlign:"left",display:"block"},onClick:()=>t.parentOnCloseDrawer(),to:`/claim/${t.currentData.claim}/${t.currentData.notification_from}`,children:"View"})}),a.jsxs("div",{className:"flex items-center justify-between mt-1 leading-4",children:[t.currentData.message_display_text.includes("hours")||t.currentData.message_display_text.includes("Now")?a.jsxs("span",{className:"ntime",children:[t.currentData.message_display_text," "]}):a.jsx("span",{className:"text-xs ntime",children:t?.useCustomMoment?e.utc(t.currentData.message_display_text).tz(s).format("ddd L hh:mm A z"):Ie.utc(t.currentData.message_display_text).local().format("ddd L hh:mm A")+" "+sc()}),!t.currentData.read_status&&a.jsx("span",{className:"nread-link",children:a.jsx("u",{children:a.jsx(Z,{className:"primary-link sm-link",onClick:()=>t.parentReadNotification(t.currentData.id),children:"Mark as Read"})})})]})]})]})}),!t.currentData.read_status&&a.jsx("div",{className:"ndot"})]}),className:t.currentData.read_status?"nrow read":"nrow",type:"warning",closable:!0,onClose:()=>
322{t.parentDismissNotification(t.currentData.id),n?.churnInfo&&n?.churnInfo.trackEvent("Dismissed Notification","User dismissed the notification")}})})}const Et=It.TabPane;function oc(t){let e=M(b=>b.auth.user.third_party_user);const s=t.visible,[o,i]=d.useState(e?"system":"task_request"),[n,l]=d.useState([]),[c,m]=d.useState(!1),[u,_]=d.useState(1),[g,y]=d.useState(0),f=M(b=>b.notification.TaskDotShow),h=M(b=>b.notification.MatterDotShow),x=M(b=>b.notification.SyatemDotShow),T=M(b=>b.notification.EventDotShow),C=M(b=>b.organizationFeatureFlag?.events_enable),L=de(),w=yt(),v=async()=>{m(!0);const b={limit:20,offset:20*(u-1),filter_by:o.toString()},E=await ce.get("/notification/get_global_notifications",{params:b});if(E.status===200){if(E.data){let k;u!==1?k=[...n]:k=[],E.data.results&&E.data.results.length>0&&(E.data.results.forEach(U=>{k.push(U)}),l(k),E.data.next?y(!0):y(!1))}}else ie.error({icon:a.jsx("i",{className:"fas fa-times-circle"}),className:"error-notification",message:"Error",description:E.data.message});m(!1)},D=d.useCallback(v,[o,u]);d.useEffect(()=>{D()},[D]);const j=async()=>{const b={filter_by:o.toString()},E=await ce.get("/notification/dismiss_all_notifications",{params:b});if(E.status===200){let k={};o.toString()==="task_request"?k={global_notification:h===!0||x===!0||T===!0,matter:h,task_request:!1,system:x,event:T}:o.toString()==="matter"?k={global_notification:f===!0||x===!0||T===!0,matter:!1,task_request:f,system:x,event:T}:o.toString()==="system"?k={global_notification:h===!0||f===!0||T===!0,matter:h,task_request:f,system:!1,event:T}:o.toString()==="event"&&(k={global_notification:h===!0||f===!0||x===!0,matter:h,task_request:f,system:x,event:!1}),L(tt(k)),l([])}else ie.error({icon:a.jsx("i",{className:"fas fa-times-circle"}),className:"error-notification",message:"Error",description:E.data.message})},p=async()=>{const b={filter_by:o.toString()},E=await ce.get("/notification/read_all_notifications",{params:b});if(E.status===200){let k={};v(),o.toString()==="task_request"?k={global_notification:h===!0||x===!0||T===!0,matter:h,task_request:!1,system:x,event:T}:o.toString()==="matter"?k={global_notification:f===!0||x===!0||T===!0,matter:!1,task_request:f,system:x,event:T}:o.toString()==="system"?k={global_notification:h===!0||f===!0||T===!0,matter:h,task_request:f,system:!1,event:T}:o.toString()==="event"&&(k={global_notification:h===!0||f===!0||x===!0,matter:h,task_request:f,system:x,event:!1}),L(tt(k))}else ie.error({icon:a.jsx("i",{className:"fas fa-times-circle"}),className:"error-notification",message:"Error",description:E.data.message})},S=async b=>{let E={read_status:!0,filter_by:o.toString()};const k=await ce.patch("/notification/"+b,E);if(k.status===200){let U=[...n],ae=U.findIndex(ee=>ee.id===b);U[ae].read_status=!0,l(U);let F={};o.toString()==="task_request"?F={global_notification:k.data?k.data.global:!1,matter:h,task_request:k.data?k.data.task_request:!1,system:x}:o.toString()==="matter"?F={global_notification:k.data?k.data.global:!1,matter:k.data?k.data.matter:!1,task_request:f,system:x}:o.toString()==="system"?F={global_notification:k.data?k.data.global:!1,matter:h,task_request:f,system:k.data&&k.data.system}:o.toString()==="event"&&(F={global_notification:k.data?k.data.global:!1,matter:h,task_request:f,system:x,event:k.data&&k.data.event}),L(tt(F))}else ie.error({icon:a.jsx("i",{className:"fas fa-times-circle"}),className:"error-notification",message:"Error",description:k.data.message});m(!1)},I=async b=>{const E=await ce.delete("/notification/"+b,{params:{filter_by:o.toString()}});if(E.status===200){if(E.data){let k={};o.toString()==="task_request"?k={global_notification:E.data?E.data.global:!1,matter:h,task_request:E.data&&E.data.task_request,system:x}:o.toString()==="matter"?k={global_notification:E.data?E.data.global:!1,matter:E.data&&E.data.matter,task_request:f,system:x}:o.toString()==="system"?k={global_notification:E.data?E.data.global:!1,matter:h,task_request:f,system:E.data&&E.data.system}:o.toString()==="event"&&(k={global_notification:E.data?E.data.global:!1,matter:h,task_request:f,system:x,event:E.data&&E.data.event}),L(tt(k))}}else ie.error({icon:a.jsx("i",{className:"fas fa-times-circle"}),className:"error-notification",message:"Error",description:E.data.message});m(!1)},q=async b=>{i(b),l([]),_(1),y(0)};d.useEffect(()=>{o.toString()==="system"&&w?.churnInfo&&w?.churnInfo.trackEvent("Viewed System Notifications",'User
322clicked on "System" tab'),o.toString()==="matter"&&w?.churnInfo&&w?.churnInfo.trackEvent("Viewed Matter Updates Notifications",'User clicked on "Matter Updates" tab')},[w.churnInfo,o]);const V=()=>{t.onCloseDrawer(!0),w.churnInfo&&w.churnInfo.trackEvent("Viewed Tasks & Requests Notifications","User clicked on Notification Bell")};return a.jsx(No,{width:640,height:445,open:s,placement:"right",classNames:{wrapper:"h-[445px] top-[65px]",body:"notification-drawer overflow-hidden translate-x-0 translate-y-0 p-0",content:"rounded-md content-footer-full",header:"border-b-0"},...t,closeIcon:a.jsxs("p",{onClick:V,className:"text-sm font-semibold",children:["Close Notifications  ",a.jsx("i",{className:"far fa-times"})]}),title:a.jsx("h3",{className:"mb-6",children:"Notifications"}),children:a.jsxs(It,{activeKey:o.toString(),onChange:q,animated:!0,tabBarStyle:{paddingTop:25,borderBottom:"1px solid #e7e8eb",boxShadow:"none"},children:[!e&&a.jsx(Et,{tab:a.jsxs("span",{children:["Tasks & Requests",f&&a.jsx("span",{className:"ndot"})]}),children:a.jsx(d.Suspense,{fallback:a.jsx(Pe,{className:"global-loader"}),children:a.jsxs("div",{className:"card-container",children:[c&&a.jsx($e,{className:"global-loader1"}),a.jsx("div",{className:"ntlist",children:n.length>0?a.jsxs("div",{className:"notify-list",children:[a.jsxs("div",{className:"nline",children:[a.jsx(Z,{className:"active",onClick:()=>p(),children:"Mark All as Read"}),a.jsx(Z,{onClick:()=>j(),children:"Dismiss All"})]}),a.jsx("div",{id:"scrollableDiv",style:{height:"calc(445px - 173px)",overflow:"auto"},children:a.jsx(St,{dataLength:n&&n.length,next:()=>{_(u+1)},hasMore:g,loader:c,scrollableTarget:"scrollableDiv",initialScrollY:0,className:"sidebar",children:n.map((b,E)=>a.jsx(wt,{currentData:b,IsLinkVisible:!1,parentReadNotification:S,parentDismissNotification:I,parentOnCloseDrawer:V,notificationType:"task"},E))})})]}):!c&&a.jsx("div",{className:"nodatafound",children:a.jsxs("h3",{children:["Tasks & Requests are ",a.jsx("br",{})," all caught up!"]})})})]})})},"task_request"),!e&&a.jsx(Et,{tab:a.jsxs("span",{className:"notify-ico treqcell sm-trcell",children:[a.jsx("span",{children:"Matter Updates"}),h&&a.jsx("span",{className:"ndot"})]}),children:a.jsx(d.Suspense,{fallback:a.jsx(Pe,{className:"global-loader"}),children:o==="matter"&&a.jsxs("div",{className:"card-container",children:[c&&a.jsx($e,{className:"global-loader1"}),a.jsx("div",{className:"ntlist",children:n.length>0?a.jsxs("div",{className:"notify-list",children:[a.jsxs("div",{className:"nline",children:[a.jsx(Z,{className:"active",onClick:()=>p(),children:"Mark All as Read"}),a.jsx(Z,{onClick:()=>j(),children:"Dismiss All"})]}),a.jsx("div",{id:"scrollableDivMatter",style:{height:"calc(445px - 173px)",overflow:"auto"},children:a.jsx(St,{dataLength:n&&n.length,next:()=>{_(u+1)},hasMore:g,loader:c,scrollableTarget:"scrollableDivMatter",initialScrollY:0,children:n.map((b,E)=>a.jsx(wt,{currentData:b,IsLinkVisible:!1,parentReadNotification:S,parentDismissNotification:I,parentOnCloseDrawer:V},E))})})]}):!c&&a.jsx("div",{className:"nodatafound",children:a.jsxs("h3",{children:["Matter Updates are",a.jsx("br",{})," all caught up!"]})})})]})})},"matter"),a.jsx(Et,{tab:a.jsxs("span",{className:"notify-ico treqcell sm-trcell",children:[a.jsx("span",{children:"System"}),x&&a.jsx("span",{className:"ndot"})]}),className:"border-t-0 shadow-none",children:a.jsx(d.Suspense,{fallback:a.jsx(Pe,{className:"global-loader"}),children:o==="system"&&a.jsxs("div",{className:"card-container",children:[c&&a.jsx($e,{className:"global-loader1"}),a.jsx("div",{className:"ntlist",children:n.length>0?a.jsxs("div",{className:"notify-list",children:[a.jsxs("div",{className:"nline",children:[a.jsx(Z,{className:"active",onClick:()=>p(),children:"Mark All as Read"}),a.jsx(Z,{onClick:()=>j(),children:"Dismiss All"})]}),a.jsx("div",{id:"scrollableDivSystem",style:{height:"calc(445px - 173px)",overflow:"auto"},children:a.jsx(St,{dataLength:n&&n.length,next:()=>{_(u+1)},hasMore:g,loader:c,scrollableTarget:"scrollableDivSystem",initialScrollY:0,children:n.map((b,E)=>a.jsx(wt,{currentData:b,IsLinkVisible:!1,parentReadNotification:S,parentDism
322issNotification:I,parentOnCloseDrawer:V},E))})})]}):!c&&a.jsx("div",{className:"nodatafound",children:a.jsxs("h3",{children:["System is ",a.jsx("br",{})," all caught up!"]})})})]})})},"system"),C&&a.jsx(Et,{tab:a.jsxs("span",{className:"notify-ico treqcell sm-trcell",children:[a.jsx("span",{children:"Event"}),T&&a.jsx("span",{className:"ndot"})]}),children:a.jsx(d.Suspense,{fallback:a.jsx(Pe,{className:"global-loader"}),children:o==="event"&&a.jsxs("div",{className:"card-container",children:[c&&a.jsx($e,{className:"global-loader1"}),a.jsx("div",{className:"ntlist",children:n.length>0?a.jsxs("div",{className:"notify-list",children:[a.jsxs("div",{className:"nline",children:[a.jsx(Z,{className:"active",onClick:()=>p(),children:"Mark All as Read"}),a.jsx(Z,{onClick:()=>j(),children:"Dismiss All"})]}),a.jsx("div",{id:"scrollableDivEvent",style:{height:"calc(445px - 173px)",overflow:"auto"},children:a.jsx(St,{dataLength:n&&n.length,next:()=>{_(u+1)},hasMore:g,loader:c,scrollableTarget:"scrollableDivEvent",initialScrollY:0,children:n.map((b,E)=>a.jsx(wt,{currentData:b,IsLinkVisible:!1,parentReadNotification:S,parentDismissNotification:I,parentOnCloseDrawer:V,useCustomMoment:!0},E))})})]}):!c&&a.jsx("div",{className:"nodatafound",children:a.jsxs("h3",{children:["Event is ",a.jsx("br",{})," all caught up!"]})})})]})})},"event")]})})}var Mr={REACT_APP_CHURNZERO_URL:"https://claim-deck.us2app.churnzero.net/churnzero.js",REACT_APP_CHURNZERO_ALLOWED_EMAILS:"[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected]"};function Ra(t){return String(t||"").trim().toLowerCase()}let Es=null,Ns=[];function nc(){const{REACT_APP_CHURNZERO_ALLOWED_EMAILS:t=""}=Mr;return Es!==t&&(Es=t,Ns=t.split(",").map(Ra).filter(Boolean)),Ns}function ic(t){const e=Ra(t);return e?nc().includes(e):!1}function Fr(t){const{REACT_APP_CHURNZERO_URL:e=""}=Mr;let s=Ra(t);if(!s.includes("@")||s.startsWith("@")||s.endsWith("@"))return!1;let o=!0;return e.includes("claim-deck-dev"),(s.includes("@yopmail.com")||s.includes("@claim-deck.com")||s.includes("@syzygylegaltech.com")||s.includes("@codal.com")||s.includes("@codaldemo.com"))&&(ic(s)?o=!0:o=!1),o}function lc(t,e){return{isTestCompany:!1,domainAllowed:!1,allowlistedTestEmail:!1,shouldInitializeChurnZero:!1}}function wm(t,e){}const cc=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,Ma=t=>{const e=String(t||"").trim();return e&&cc.test(e)?e:null},Fa=t=>String(t||"").trim()||null,dc=(t,e)=>{if(!t?.company_name||!t?.primary_email_address||!e?.shouldInitializeChurnZero)return null;const s=Fa(t?.company_id);if(!s)return null;const o=Ma(t?.id);return o?{accountId:s,contactId:o}:null},Em=(t,e,s)=>{const o=t||{};if(!s?.shouldInitializeChurnZero)return null;const i=Fa(o.company_id);if(!i)return null;const n=Ma(o.id||e);return n?{accountId:i,contactId:n}:null},uc=async(t,e)=>{const s=Fa(t);if(!s)return null;const o=Ma(e);return o?await vo.Client.connect({url:"https://claim-deck.us2app.churnzero.net/churnzero.js",apiKey:"1!Du0tzJya6M1KU7t1Mh8jtgFv-NcR-0bbBHs91KwbXIwt10A3",accountId:s,contactId:o}):null},vt=t=>({type:"globalSearchTYPE",payload:t}),mc=["associated_claims_count"];function hc({item:t,type:e,searchKeyword:s,onNavigate:o}){const i=Object.keys(t?.matchObj??{}).filter(l=>!mc.includes(l)),n=(l,c)=>{switch(l){case"claim":return{pathname:`/claim/${c?.id}/overview`};case"contact":return{pathname:c?.matter_id&&c?.associated_claims_count===1?`/claim/${c?.matter_id}/contacts/2/searchTerm/${c?.id}`:"/global-contact",state:{normalRedirect:!0,search:c?.primary_email_address||c?.full_name}};case"document":return{pathname:`/claim/${c?.matter_id}/documents/${c?.folder??""}`};default:return""}};return a.jsx(ne.Item,{value:t?.id,children:a.jsxs("div",{className:"search-row",children:[a.jsx(Z,{to:n(e,t),className:"primary-link text-secondary/74 w-full",onClick:o,children:a.jsxs("div",{className:"srow flex items-start justify-start",children:[a.jsxs("div",{children:[e==="claim"&&a.jsx(G,{icon:Bs}),e==="contact"&&a.jsx(G,{icon:xa}),e==="document"&&a.jsx(a.Fragment,{children:t?.is_folder?a.jsx(G,{icon:jo}):a.jsx(G,{icon:$s})})]}),a.jsxs("div",{className:"sbind flex overflow-hidden whitespace-nowrap",children:[a.jsx("span",{className:"shrink-0",title:t?.claim_name||t?.full_name||t.name||"",children:a.jsx(Kt,{highlightClassName:"highlightMatch",searchWords:[s],autoEscape:!0,textToHighlight:t?.claim_name||t?.full_name||t.name||""})}
322),a.jsx("span",{className:"htext font-normal !self-baseline overflow-hidden text-ellipsis whitespace-nowrap pl-1.5 flex-1",title:t?.claim_number||t?.primary_email_address||t.matter||t.claim||"",children:a.jsx(Kt,{highlightClassName:"highlightMatch",searchWords:[s],autoEscape:!0,textToHighlight:t?.claim_number||t?.primary_email_address||t.matter||t.claim||""})})]})]})}),a.jsxs("div",{className:"stags",children:[i?.map((l,c)=>c<3?a.jsxs("span",{className:"stag-li",children:[Ir(l?.replace(/_/g," ")),":"," ",l!=="claim_overview"&&l!=="current_resolution_strategy"&&l!=="claim_snopsis"&&a.jsx(Kt,{highlightClassName:"highlightMatch",searchWords:[s],autoEscape:!0,textToHighlight:t[l]}),(l==="claim_overview"||l==="current_resolution_strategy"||l==="claim_snopsis")&&a.jsxs(a.Fragment,{children:["Â ...",a.jsx("div",{className:"highlightMatch",children:s}),"..."]})]},c):null),i?.length>4&&a.jsxs("span",{className:"stag-li",children:["+",i?.length-3]})]})]},t?.id)},t?.id)}const aa=3,sa={claim:new Set(["claim_name","claim_number","id"]),contacts:new Set(["full_name","id","primary_email_address","first_name","last_name","matter_id"]),document:new Set(["name","id","matter","matter_id","is_folder","is_link","file_link","file","folder"])},ra=(t=[],e=new Set)=>t.map(s=>{const o=Object.fromEntries(Object.entries(s).filter(([i])=>!e.has(i)));return{...s,matchObj:o}});function fc(){const t=de(),e=yt(),s=Ft(),{claim_count:o,contact_count:i,document_count:n}=M(A=>A.globalSearch),l=M(A=>A.globalSearch.search_keyword),[c,m]=d.useState(l),[u,_]=d.useState(!1),[g,y]=d.useState(!1),[f,h]=d.useState([]),[x,T]=d.useState([]),[C,L]=d.useState([]),[w,v]=d.useState([]),[D,j]=d.useState([]),[p,S]=d.useState([]),[I,q]=d.useState(),[V,b]=d.useState(!1),E=async()=>{y(!0);let A={limit:3,offset:0,section:"claim,document,contact"};const re=await ce.get("/recentlyviewed",{params:A});re.status===200?re.data&&(v(re?.data?.claims?.data||[]),j(re?.data?.contacts?.data||[]),S(re?.data?.documents?.data||[]),y(!1)):y(!1),y(!1)},k=d.useCallback(async(A,re)=>{_(!0);let se={limit:re?10:3,offset:0,section:"claim,document,contact",q:A};const te=await ce.get("/globalsearch",{params:se});if(te.status===200&&te.data){t(vt({search_keyword:A,total_count:te?.data?.total_count!==0?te?.data?.total_count:0,claim_count:te?.data?.total_count!==0?te?.data?.claims?.count:0,contact_count:te?.data?.total_count!==0?te?.data?.contacts?.count:0,document_count:te?.data?.total_count!==0?te.data?.documents?.count:0})),t(Lt({search_keyword:A}));try{e.churnInfo&&Fr(login_user_email)&&e.churnInfo.trackEvent("Global Search","User clicked search CTA",1)}catch(Q){console.log(Q)}const O=ra(te?.data?.claims?.data,sa.claim),N=ra(te?.data?.contacts?.data,sa.contacts),P=ra(te?.data?.documents?.data,sa.document);h([...O]),T([...N]),L([...P])}_(!1)},[e.churnInfo,t]);d.useEffect(()=>(l&&k(l),()=>{t(vt({search_keyword:"",total_count:0,claim_count:0,contact_count:0,document_count:0})),h([]),T([]),L([])}),[]);const U=d.useCallback((A,re,se)=>a.jsx(hc,{type:A,item:re,searchKeyword:c,onNavigate:se},re?.id),[c]),ae=(A="")=>{m(A),A?.length===0&&(t(vt({search_keyword:A,total_count:0,claim_count:0,contact_count:0,document_count:0})),k(""),E())},F=d.useCallback(()=>{t(Lt({search_keyword:""})),b(!1)},[t]),ee=d.useMemo(()=>c?a.jsx(Z,{to:"/global-search",className:"global-search-icon [&_.ant-btn-icon>svg]:hover:text-primary",children:a.jsx(X,{icon:a.jsx(G,{icon:Ha,height:12,width:12,className:"text-white"}),className:"btn"})}):null,[c]),H=d.useMemo(()=>c?a.jsxs(a.Fragment,{children:[[...f?.slice(0,aa)||[]].map(A=>U("claim",A,F)),o>3&&f&&a.jsx("span",{className:"primary-link sm-link showMorebutton w-fit",onClick:()=>{s.push("/global-search",{tab:"0"}),b(!1)},children:"View More"})]}):w?.map(A=>a.jsx(ne.Item,{value:A?.id,children:a.jsx("div",{className:"m-0 search-row",children:a.jsx(Z,{to:`/claim/${A.id}/overview`,className:"w-full primary-link text-secondary/74",onClick:F,children:a.jsxs("div",{className:"flex items-start gap-1 srow ",children:[a.jsx("div",{className:"m-y-auto",children:a.jsx(G,{icon:Bs})}),a.jsxs("div",{className:"flex items-center overflow-hidden sbind whitespace-nowrap",children:[a.jsx("span",{className:"shrink-0",title:A?.claim_name,children:A?.claim_name}),a.jsx("span",{className:"htext overflow-hidden text-ellipsis whitespace-nowrap pl-1.5 flex-1",title:A?.claim_number,children:A?.claim_number})]})]})})},A?.id)},A?.id)),[c,w,f,o,U,F,s]),W=d.useMemo(()=>c?a.jsxs(a.Fragment,{children:[[...x?.slice(0,aa)||[]].map(A=>U("contact",A,F)),x&&i>3&&a.jsx("span",{className:"primary-link sm-link showMorebutton w-fit",onClick:()=>{s.push("/global-search",{tab:"1"}),b(!1)},children:"View More"})]}):D?.map(A=>{const se={pathname:A?.matter_id&&A?.associated_claims_count===1?`/claim/${A?.matter_id}/contacts/2/searchTerm/${A?.id}`:"/global-contact",state:{normalRedirect:!0,search:A?.primary_email_address||A?.full_name}};return a.jsx(ne.Item,{value:A?.id,children:a.jsx("div",{className:"m-0 search-row",children:a.jsx(Z,{to:se,className:"w-full primary-link text-secondary/74",onClick:F,children:a.jsxs("div",{className:"flex items-start gap-1 srow",children:[a.jsx("div",{className:"m-y-auto",children:a.jsx(G,{icon:xa})}),a.jsxs("div",{className:"flex items-center overflow-hidden sbind whitespace-nowrap",children:[a.jsx("span",{className:"shrink-0",title:A.full_name,children:A.full_name}),a.jsx("span",{className:"htext overflow-hidden text-ellipsis whitespace-nowrap pl-1.5 flex-1",title:A.primary_email_address,children:A.primary_email_address})]})]})})},A?.id)},A?.id)}),[c,D,x,i,U,F,s]),Y=d.useMemo(()=>c?a.jsxs(a.Fragment,{children:[[...C?.slice(0,aa)||[]].map(A=>U("document",A,F)),C&&n>3&&a.jsx("span",{className:"primary-link sm-link showMorebutton w-fit",onClick:()=>{s.push("/global-search",{tab:"2"}),b(!1)},children:"View More"})]}):p?.map(A=>a.jsx(ne.Item,{value:A?.id,children:a.jsx("div",{className:"m-0 search-row",children:a.jsx(Z,{to:A?.is_folder&&A?.folder?`/claim/${A?.matter_id}/documents/${A?.folder}`:`/claim/${A?.matter_id}/documents`,className:"w-full primary-link text-secondary/74",onClick:F,children:a.jsxs("div",{className:"flex items-start gap-1 srow",children:[a.jsx("div",{className:"m-y-auto",children:a.jsx(G,{icon:$s})}),a.jsxs("div",{className:"flex items-center overflow-hidden sbind whitespace-nowrap",children:[a.jsx("span",{className:"shrink-0",title:A?.name,children:A?.name}),a.jsx("span",{className:"htext overflow-hidden text-ellipsis whitespace-nowrap pl-1.5 flex-1",title:A?.claim,children:A?.claim})]})]})})},A?.id)},A?.id)),[p,C,U,F,c,n,s]),Ce=d.useMemo(()=>c?.length>=2&&!f?.length&&!x?.length&&!C?.length&&!u&&!g,[f?.length,x?.length,C?.length,g,u,c?.length]);return a.jsx(Ye,{onOpenChange:A=>{b(A),A&&!c&&E()},open:V,overlayClassName:"search-dropdown component-loader-parent",trigger:["click"],destroyOnHidden:!0,autoAdjustOverflow:!0,overlayStyle:{width:516,minHeight:200},dropdownRender:()=>a.jsxs("div",{className:be("flex flex-col w-full h-full min-h-[200px]",Ce?"justify-center":"justify-between"),children:[!!(u||g)&&a.jsx($t,{className:"component-loader"}),Ce&&a.jsxs("div",{className:"w-full no-data",children:[a.jsx(G,{icon:Ha,className:"no-data-icon"}),a.jsx("div",{children:"No results found"})]}),!Ce&&a.jsxs(ne,{className:"max-h-[480px] w-full overflow-auto overflow-x-hidden cursor-default scrollbar",children:[a.jsx(ne.ItemGroup,{title:`${c?"":"Recently Viewed"} Matters`?.trim(),className:"item-group",children:H},"Matters"),a.jsx(mt,{className:"my-5"}),a.jsx(ne.ItemGroup,{title:`${c?"":"Recently Viewed"} Contacts`?.trim(),className:"item-group",children:W},"Contacts"),a.jsx(mt,{className:"my-5"}),a.jsx(ne.ItemGroup,{title:`${c?"":"Recently Viewed"} Documents`?.trim(),className:"item-group",children:Y},"Documents")]}),!!(c&&(f?.length||x?.length||C?.length))&&a.jsx(ko,{className:"p-5",children:a.jsx(Z,{to:"/global-search",onClick:()=>{b(!1)},children:a.jsxs(X,{children:["All Search Results ",a.jsx(G,{icon:Io,className:"ml-1"})]})})})]}),placement:"bottomCenter",children:a.jsx("div",{className:"flex items-center search-wrapper fitem-rinner",children:a.jsx(Ae,{size:"small",placeholder:"Search any matters, contacts, or documents",allowClear:!0,value:c,onChange:A=>ae(A.target.value),onKeyDown:A=>{A.key==="Enter"&&(b(!1),s.push("/global-search"))},onKeyUp:A=>{A.persist(),I&&window.clearTimeout(I),q(setTimeout(function(){A.target.value.length>=2&&k(A.target.value)},500))},suffix:ee,classNames:{input:"h-[95%]"}})})})}const gc=t=>({type:"messengerChatTYPE",payload:t}),Ur=()=>{const t=ja(),e=yt(),s=ma(n=>n?.auth?.user?.primary_email_address),o=ma(n=>n?.auth?.parentSession);return{handleLogout:n=>
322{st("token"),st("redirect_url"),o&&(Dt("token"),Dt("state")),sessionStorage.clear(),localStorage.clear(),ht(),t(gc("")),Fr(s)&&e?.logout(),Ta(),Na(),t(zt()),n?.()}}},pc=({text:t,className:e="",icon:s=Gs,iconClassName:o="cursor-pointer text-gray-600",children:i})=>{const[n,l]=d.useState(!1),[c,m]=d.useState(!1),u=()=>{m(!1),l(!0),setTimeout(()=>{l(!1)},1e3)},_=a.jsxs("div",{onClick:g=>{g.stopPropagation(),l(!1)},role:"button",tabIndex:0,onKeyDown:g=>{(g.key==="Enter"||g.key===" ")&&(g.stopPropagation(),l(!1))},children:[a.jsx(G,{icon:pa}),"Â Copied"]});return a.jsx("span",{className:"ml-2",children:a.jsx(Do.CopyToClipboard,{text:t||"",onCopy:u,children:a.jsxs("span",{className:`inline-flex items-center ${e}`,role:"button",tabIndex:0,"aria-label":"Copy to clipboard",onKeyDown:g=>{(g.key==="Enter"||g.key===" ")&&(g.stopPropagation(),u())},children:[i&&a.jsx("span",{className:"mr-2 truncate",children:i}),a.jsx(et,{content:_,trigger:"click",open:n,children:a.jsx(et,{content:"Copy to Clipboard",open:!n&&c,onOpenChange:m,children:a.jsx("span",{className:"m-0 flex items-center",children:a.jsx(G,{icon:s,className:o,"aria-hidden":"true"})})})})]})})})},Nm=()=>t=>{t({type:"CLOSE_OFFICE_DETAILS_DRAWER"})},Pr=(t,e={})=>{const s=new J(!0,!0,!0);return async o=>{o({type:"SHOW_OFFICE_DETAILS_DRAWER",payload:e});try{const i=await s.getOfficeById(t);i.status===200&&i?.data?o({type:"SHOW_OFFICE_DETAILS_DRAWER_SUCCESS",payload:i?.data}):o({type:"SHOW_OFFICE_DETAILS_DRAWER_ERROR",payload:{message:"Error",description:i?.data?.message||"Something went wrong"}})}catch(i){if(i?.canceled)return;o({type:"SHOW_OFFICE_DETAILS_DRAWER_ERROR",payload:{message:"Error",description:i?.response?"Page Not Found":"Something went wrong"}})}}},xc=(t,e=()=>{},s=()=>{})=>{const o=new J(!0,!0,!0);return async i=>{i({type:"GET_OFFICE_CONTACTS_LIST"});try{const n=await o.getOurTeamMembers(t);n.status===200&&n?.data?(i({type:"GET_OFFICE_CONTACTS_LIST_SUCCESS",payload:{contacts:n?.data?.results,totalContacts:n?.data?.count,all_user_ids:n?.data?.all_user_ids?.map(l=>({user:l,office:n?.data?.results?.[0]?.office,permission_level:n?.data?.results?.[0]?.permission_level}))}}),e("Get Users Successfully")):(i({type:"GET_OFFICE_CONTACTS_LIST_ERROR",payload:{message:"Error",description:n?.data?.message||"Something went wrong"}}),s({message:"Error",description:n?.data?.message||"Something went wrong"}))}catch(n){if(n?.canceled)return;i({type:"GET_OFFICE_CONTACTS_LIST_ERROR",payload:{message:"Error",description:n?.response?"Page Not Found":"Something went wrong"}}),s({message:"Error",description:n?.response?"Page Not Found":"Something went wrong"})}}},{Search:_c}=Ae,yc=[{title:"User Name",key:"contact_name",mapping:"display_name",sorter:!0,fixed:!0,width:200,defaultSortOrder:"ascend",render:(t,e,s)=>a.jsxs("div",{style:{display:"flex",alignItems:"center",maxWidth:200},children:[a.jsx("div",{children:t?.profile_image?a.jsx(ve,{src:t?.profile_image,alt:"user",className:"lg-avatar"}):a.jsx(ve,{className:"bg-blue lg-avatar",children:t?.display_name&&a.jsx(a.Fragment,{children:t?.display_name?.split(" ")?.length>0&&t?.display_name.split(" ").map((o,i)=>a.jsx(Da,{text:o.toUpperCase()},i))})})}),a.jsx("div",{className:"flex-1",children:a.jsx(we,{placement:"top",classNames:{root:"lg-tooltip"},title:t?.display_name,children:a.jsx("p",{className:"mb-0 ellipsis-text ml-4 max-w-[180px]",children:t?.display_name})})})]},`${e}-${s}`)},{title:"Email",dataIndex:"primary_email_address",key:"primary_email_address",ellipsis:!0,width:200,render:t=>a.jsx(we,{placement:"top",classNames:{body:"lg-tooltip"},title:t,children:a.jsx("p",{className:"mb-0 ellipsis-text",style:{maxWidth:"200px"},children:t})})},{title:"Phone Number",dataIndex:"primary_phone_number",key:"primary_phone_number",width:200,render:t=>a.jsx(we,{placement:"top",classNames:{body:"lg-tooltip"},title:t,children:a.jsx("p",{className:"mb-0 ellipsis-text",style:{maxWidth:"150px"},children:rt(t)})})},{title:"Status",key:"status",render:(t,e,s)=>a.jsx(ke.Fragment,{children:t?.status?.toLowerCase()==="active"?a.jsx(Oe,{className:"ant-tag-green",children:t?.status}):t?.status?.toLowerCase()==="inactive"?a.jsx(Oe,{className:"ant-tag-no-access",children:t?.status}):a.jsx(Oe,{className:"ant-tag-success",children:t?.status})},`${t}-${e}-${s}`)}],zr=({open:t,onCancel:e,subTitle:s,title:o,onSubmit:i,loading:n=!1})=>{const l=de(),{data:c,selectedContacts:m,contacts:u,contactsLoading:_}=M(j=>
322j?.createOffice),[g,y]=d.useState({page:1,pageSize:10}),[f,h]=d.useState(""),[x,T]=d.useState("ascend"),C=Aa(f),L=j=>{l({type:"SELECTED_CONTACTS",payload:j})},w=d.useMemo(()=>[...c?.officeAdmins||[],...c?.teamMembers||[]].map(j=>j?.id)?.join(","),[c?.officeAdmins?.length,c?.teamMembers?.length]);d.useEffect(()=>{v()},[C,g?.pageSize,g?.page,x]);const v=()=>{l(Ar({search:f,ordering:x==="ascend"?"display_name":"-display_name",limit:g?.pageSize,offset:g.pageSize*(g.page-1),exclude_global_admins:!0,exclude_members:w,assigned_to_office:!1}))},D=j=>{if(m?.find(S=>S?.user===j?.user)){const S=m?.filter(I=>I?.user!==j?.user);L([...S])}else L([...m,j])};return a.jsx(ot,{title:a.jsxs(a.Fragment,{children:[a.jsx("h1",{children:o}),a.jsx("span",{className:"sub-title",children:s})]}),open:t,closeIcon:a.jsx("i",{className:"far fa-times","aria-hidden":"true"}),classNames:{body:"p-8",footer:"p-0"},className:"add-contacts-modal",width:"100%",style:{maxWidth:900},destroyOnHidden:!0,centered:!0,onCancel:e,footer:a.jsxs(a.Fragment,{children:[(u?.results?.length||_||C)&&a.jsx(Ut,{total:u?.count,showTotal:(j,p)=>`${p[0]}-${p[1]} of ${j} items`,defaultPageSize:g.pageSize,current:g.page,pageSizeOptions:[10,20,50,100,200],showSizeChanger:{showSearch:!1},responsive:!0,className:"pagination-select",position:"bottomLeft",onChange:(j,p)=>{y({page:j,pageSize:p});const S=document.getElementsByClassName("ant-table-body"),I=S[S.length-1];I&&I.scrollTo({top:0,behavior:"smooth"})}}),!!u?.results?.length&&a.jsx("div",{className:"modal-footer-container",children:a.jsx("div",{style:{display:"flex",width:"100%",justifyContent:"flex-end"},children:a.jsxs(X,{onClick:i,disabled:n||!m?.length,className:"btn lg-btn",style:{marginLeft:"auto"},loading:n,children:[`Add ${m?.length?`(${m?.length})`:""} User(s)`,a.jsx(G,{icon:lt})]})})})]}),children:a.jsx("div",{className:"contact-list-container",style:{height:500,maxHeight:600},children:u?.results?.length||_||C?a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{display:"inline-flex",alignItems:"center",justifyContent:"flex-end",padding:"16px 24px",borderBottom:"1px solid #e7e8eb"},children:a.jsx(_c,{className:"ant-searchbtn",placeholder:"Search",allowClear:!0,onChange:j=>h(j.target.value),onSearch:()=>{f?.length===0&&(h(""),y({...g,page:1}))},style:{width:200,margin:0},value:f})}),a.jsx(Mt,{pagination:!1,filtered:!0,columns:yc,dataSource:u?.results,loading:{indicator:a.jsx($e,{}),spinning:_},rowKey:j=>j.id,scroll:{y:"calc(434px - 43px)",x:!0},style:{height:434},rowSelection:{columnWidth:80,selectedRowKeys:m?.map(j=>j?.id),onSelect:j=>D(j)},onRow:j=>({onClick:p=>{p.preventDefault(),D(j)}}),rowClassName:j=>m?.find(S=>S?.id===j?.id)?"active":"",onChange:(j,p,S)=>{T(S?.order||"ascend")},className:"contact-list-modal",width:1100})]}):a.jsx("div",{className:"no-data-container",children:a.jsx(Oa,{title:a.jsx(a.Fragment,{children:"You don't currently have any unassigned users to add to this office"}),subTitle:"Looking to add users to this office? Reassign users from existing offices or add new users to your organization.",showButtons:!1})})})})},{Option:Cc}=ye,Br=t=>{const[e,s]=d.useState({options:[],loading:!0});return d.useEffect(()=>{s({options:Vs.getAllCountries().filter(o=>t.customCountries?t.customCountries.includes(o.name):o),loading:!1})},[t.customCountries]),a.jsx(ye,{allowClear:!0,showSearch:!0,getPopupContainer:o=>o,filterOption:(o,i)=>i.props.children.toLowerCase().indexOf(o.toLowerCase())>=0,disabled:e.loading,loading:e.loading,...t,children:e?.options?.map(o=>a.jsx(Cc,{value:o.name,children:o.name},o.name))})},vm=Object.freeze(Object.defineProperty({__proto__:null,default:Br},Symbol.toStringTag,{value:"Module"})),{Option:Sc}=ye,$r=({countryname:t,...e})=>{const s=n=>{const l=Vs.getAllCountries().find(({name:c})=>c===n);return l?l.isoCode:void 0},o=d.useMemo(()=>t?s(t):void 0,[t]),i=d.useMemo(()=>o?Ao.getStatesOfCountry(o):[],[o]);return a.jsx(ye,{showSearch:!0,allowClear:!0,placeholder:"Select state",getPopupContainer:n=>n,filterOption:(n,l)=>l.props.children.toLowerCase().includes(n.toLowerCase()),...e,children:i.map(n=>a.jsx(ke.Fragment,{children:n.name!=="Midway Atoll"&&a.jsx(Sc,{value:n.name,children:n.name},n.name)},n?.name))})},jm=Object.freeze(Object.defineProperty({__proto__:null,default:$r},Symbol.toStringTag,{value:"Module"})),ga=d.forwardRef((t,e)=>{const s=d.useRef(null),{onKeyDown:o,onChange:i,value:n,placeholder:l="Enter phone number",disabled:c=!1,name:m,className:u="",..._}=t,g=y=>{const f=y.key,h=y.currentTarget.value,x=y.ctrlKey||y.metaKey;/^\d$/.test(f)||["Backspace","Delete","Tab","ArrowLeft","ArrowRight","Home","End"].includes(f)||f==="+"&&!h.includes("+")&&y.currentTarget.selectionStart===0||x&&["a","c","v","x","z"].includes(f.toLowerCase())||y.preventDefault(),o?.(y)};return d.useImperativeHandle(e,()=>s.current?.input),a.jsx(Ae,{..._,ref:s,onKeyDown:g,onChange:y=>{const f=y.target,h=f.value,x=f.selectionStart??h.length,T=h.slice(0,x).replace(/\D/g,"").length,C=rt(h,"");i?.(C),setTimeout(()=>{const L=s.current?.input;if(!L)return;let w=0;for(let v=0;v<=C.length;v++)if(/\d/.test(C[v])&&w++,w===T){L.setSelectionRange(v+1,v+1);break}},0)},value:rt(n,""),placeholder:l,disabled:c,name:m,className:u,"data-testid":"phone-number-input"})});ga.displayName="PhoneNumberInput";const bc={ACDT:"Australian Central Daylight Time",ACST:"Australian Central Standard Time",ACT:"Acre Time",ADT:"Atlantic Daylight Time",AEDT:"Australian Eastern Daylight Time",AEST:"Australian Eastern Standard Time",AFT:"Afghanistan Time",AKDT:"Alaska Daylight Time",AKST:"Alaska Standard Time",ALMT:"Alma-Ata Time",AMST:"Amazon Summer Time",AMT:"Amazon Time",ANAT:"Anadyr Time",AQTT:"Aqtobe Time",ART:"Argentina Time",AST:"Atlantic Standard Time",AWDT:"Australian Western Daylight Time",AWST:"Australian Western Standard Time",AZOST:"Azores Summer Time",AZOT:"Azores Standard Time",AZT:"Azerbaijan Time",BNT:"Brunei Darussalam Time",BOT:"Bolivia Time",BRST:"BrasÃlia Summer Time",BRT:"BrasÃlia Time",BST:"British Summer Time",BTT:"Bhutan Time",CAST:"Casey Time",CAT:"Central Africa Time",CCT:"Cocos Islands Time",CDT:"Central Daylight Time",CEST:"Central European Summer Time",CET:"Central European Time",CHADT:"Chatham Island Daylight Time",CHAST:"Chatham Island
322Standard Time",CHOT:"Choibalsan Time",CHUT:"Chuuk Time",CIST:"Clipperton Island Standard Time",CIT:"Central Indonesia Time",CKT:"Cook Island Time",CLST:"Chile Summer Time",CLT:"Chile Standard Time",COST:"Colombia Summer Time",COT:"Colombia Time",CST:"Central Standard Time",CT:"China Time",CVT:"Cape Verde Time",CWST:"Central Western Standard Time",CXT:"Christmas Island Time",DAVT:"Davis Time",DDUT:"Dumont-d'Urville Time",DFT:"AIX specific equivalent of Central European Time",EASST:"Easter Island Summer Time",EAST:"Easter Island Standard Time",EAT:"East Africa Time",ECT:"Ecuador Time",EDT:"Eastern Daylight Time",EEST:"Eastern European Summer Time",EET:"Eastern European Time",EGST:"Eastern Greenland Summer Time",EGT:"Eastern Greenland Time",EST:"Eastern Standard Time",FET:"Further-Eastern European Time",FJT:"Fiji Time",FKST:"Falkland Islands Summer Time",FKT:"Falkland Islands Time",FNT:"Fernando de Noronha Time",GALT:"Galápagos Time",GAMT:"Gambier Time",GET:"Georgia Standard Time",GFT:"French Guiana Time",GILT:"Gilbert Island Time",GMT:"Greenwich Mean Time",GST:"Gulf Standard Time",GYT:"Guyana Time",HADT:"Hawaii-Aleutian Daylight Time",HAEC:"Heure Avancée d'Europe Centrale",HAST:"Hawaii-Aleutian Standard Time",HKT:"Hong Kong Time",HMT:"Heard and McDonald Islands Time",HOVT:"Hovd Time",ICT:"Indochina Time",IDT:"Israel Daylight Time",IOT:"Indian Chagos Time",IRDT:"Iran Daylight Time",IRKT:"Irkutsk Time",IRST:"Iran Standard Time",IST:"India Standard Time",JST:"Japan Standard Time",KGT:"Kyrgyzstan Time",KOST:"Kosrae Time",KRAT:"Krasnoyarsk Time",KST:"Korea Standard Time",LHDT:"Lord Howe Daylight Time",LHST:"Lord Howe Standard Time",LINT:"Line Islands Time",MAGT:"Magadan Time",MART:"Marquesas Time",MAWT:"Mawson Time",MDT:"Mountain Daylight Time",MET:"Middle European Time",MEST:"Middle European Summer Time",MHT:"Marshall Islands Time",MIST:"Macquarie Island Station Time",MIT:"Marquesas Islands Time",MMT:"Myanmar Time",MSK:"Moscow Time",MST:"Mountain Standard Time",MUT:"Mauritius Time",MVT:"Maldives Time",MYT:"Malaysia Time",NCT:"New Caledonia Time",NDT:"Newfoundland Daylight Time",NFT:"Norfolk Island Time",NOVT:"Novosibirsk Time",NPT:"Nepal Time",NST:"Newfoundland Standard Time",NT:"Newfoundland Time",NUT:"Niue Time",NZDT:"New Zealand Daylight Time",NZST:"New Zealand Standard Time",OMST:"Omsk Time",ORAT:"Oral Time",PDT:"Pacific Daylight Time",PET:"Peru Time",PETT:"Kamchatka Time",PGT:"Papua New Guinea Time",PHOT:"Phoenix Island Time",PHT:"Philippine Time",PKT:"Pakistan Standard Time",PMDT:"Saint Pierre and Miquelon Daylight Time",PMST:"Saint Pierre and Miquelon Standard Time",PONT:"Pohnpei Standard Time",PST:"Pacific Standard Time",PWT:"Palau Time",PYST:"Paraguay Summer Time",PYT:"Paraguay Time",RET:"Réunion Time",ROTT:"Rothera Time",SAKT:"Sakhalin Island Time",SAMT:"Samara Time",SAST:"South Africa Standard Time",SBT:"Solomon Islands Time",SCT:"Seychelles Time",SGT:"Singapore Time",SLST:"Sri Lanka Standard Time",SRET:"Srednekolymsk Time",SRT:"Suriname Time",SST
322:"Samoa Standard Time",SYOT:"Showa Station Time",TAHT:"Tahiti Time",THA:"Thailand Standard Time",TFT:"Indian/Kerguelen",TJT:"Tajikistan Time",TKT:"Tokelau Time",TLT:"East Timor Time",TMT:"Turkmenistan Time",TOT:"Tonga Time",TVT:"Tuvalu Time",UCT:"Coordinated Universal Time",ULAT:"Ulaanbaatar Time",USZ1:"Kaliningrad Time",UYST:"Uruguay Summer Time",UYT:"Uruguay Standard Time",UZT:"Uzbekistan Time",VET:"Venezuelan Standard Time",VLAT:"Vladivostok Time",VOLT:"Volgograd Time",VOST:"Vostok Station Time",VUT:"Vanuatu Time",WAKT:"Wake Island Time",WAST:"West Africa Summer Time",WAT:"West Africa Time",WEST:"Western European Summer Time",WET:"Western European Time",WIT:"Western Indonesia Time",WST:"Western Standard Time",YAKT:"Yakutsk Time",YEKT:"Yekaterinburg Time"},Tc=/^[A-Za-z]+$/;function wc(){const[t,e]=d.useState([]);return d.useEffect(()=>{(()=>{let o=kt.tz.names();const i=o.filter(c=>c.startsWith("America/")),n=kt.tz.zonesForCountry("GB");o=[...i,...n,...o.filter(c=>!i.includes(c)&&!n.includes(c))];const l=o?.reduce((c,m)=>{const u=Ie.tz(m).utcOffset(),_=Ie.tz(m).zoneAbbr(),g=Math.floor(Math.abs(u)/60),y=Math.abs(u)%60,h=`UTC${u>=0?"+":"-"}${String(g).padStart(2,"0")}:${String(y).padStart(2,"0")}`,x=Ie.tz(m).format("z"),T=bc[x]||x;return Tc.test(_)&&(c=[...c,{value:m,offset:h,standardName:x,fullName:T,label:`(${h}) ${x} - ${m}`}]),c},[]);e(l)})()},[]),{timeZones:t}}const Ec=({data:t,validator:e,handleUpdate:s,setForceUpdate:o})=>{const{timeZones:i}=wc(),{CURRENT_TIMEZONE:n}=Gt(),{isGlobalAdmin:l}=Fe(),c=e.message("officeName",t?.officeName,"required|max:50",{messages:{required:"The office name field is required",max:"Office name cannot be greater than 50 characters."}}),m=e?.message("primaryPhoneNumber",t?.primaryPhoneNumber,"primaryPhoneNumber"),u=e?.message("zipcode",t?.zipcode,"zipcode"),_=f=>{s({...t,...f})},g=(f,h)=>{const x=[...t?.phoneNumbers||[]];x[f]=h?.trim(),s({...t,phoneNumbers:[...x]})},y=()=>{s({...t,phoneNumbers:[...t?.phoneNumbers||[],""]})};return a.jsx("div",{className:"office-details-form",children:a.jsxs("div",{className:"office-form w-full",children:[a.jsxs("div",{className:"w-full",children:[a.jsxs(_e.Text,{className:"form-title",children:["Office Name",a.jsx("span",{style:{color:"#D83535",marginLeft:4},children:"*"})]}),a.jsx(Ae,{name:"officeName",placeholder:"Enter an office name",value:t?.officeName||"",onChange:f=>_({officeName:f.target.value}),onBlur:()=>e.showMessageFor("officeName"),suffix:a.jsx(ys,{style:{visibility:c?"visible":"hidden"}}),className:c?"error":"",max:50,maxLength:50,disabled:!l}),a.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:[a.jsx("span",{className:"error-message-input",style:{flexGrow:1},children:c}),l&&a.jsx("p",{className:"form-title",style:{justifySelf:"end",margin:0,color:"#11173EBD"},children:`${t?.officeName?.trim()?.length}/50`})]})]}),a.jsx(mt,{style:{borderColor:"#E7E8EB",marginBlock:24}}),a.jsxs("div",{className:"w-full",children:[a.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[a.jsx(_e.Text,{className:"form-title",children:"Primary Phone Number"}),a.jsx(ga,{name:"primaryPhoneNumber",placeholder:"Enter a phone number",value:t?.primaryPhoneNumber,onChange:f=>{_({primaryPhoneNumber:f})},onBlur:()=>{e.fieldValid("primaryPhoneNumber")?e.hideMessageFor("primaryPhoneNumber"):(e.showMessageFor("primaryPhoneNumber"),o(h=>h+1))},suffix:a.jsx(ys,{style:{visibility:m?"visible":"hidden"}}),className:`mt-1 max-w-[calc(100%-35px)] ${m?"error":""}`}),a.jsx("span",{className:"error-message-input",children:m})]}),t?.phoneNumbers?.map((f,h)=>a.jsxs("div",{style:{marginTop:h?0:12},children:[!h&&a.jsx(_e.Text,{className:"form-title",children:"Phone Number"}),a.jsxs("div",{className:"phone-container",style:{marginTop:h?16:4,justifyContent:"flex-start",width:"100%"},children:[a.jsx(ga,{name:`phone-number-${h+1}`,placeholder:"Enter a phone number",value:f,onChange:x=>g(h,x),onBlur:()=>{e.fieldValid("phoneNumbers["+h+"]")?e.hideMessageFor("phoneNumbers["+h+"]"):(e.showMessageFor("phoneNumbers["+h+"]"),o(T=>T+1))},className:"form-input mt-1"}),a.jsx("span",{className:"trash-ico",style:{cursor:"pointer",color:"#868994"},onClick:()=>{t?.phoneNumbers?.splice(h,1),_({phoneNumbers:[...t?.phoneNumbers||[]]})}
322,children:a.jsx("i",{className:"fas fa-trash-alt"})})]}),a.jsx("span",{className:"error-message-input",children:e.message("phoneNumbers["+h+"]",f,"primaryPhoneNumber|max:255",{messages:{phone:"The phone number must be a valid phone number.",max:"The phone number must be a valid phone number."}})})]},h)),a.jsxs(X,{className:"text-button flex [&>span]:text-xs p-0",onClick:()=>y(),children:[a.jsx(G,{icon:lt,width:12,height:12,className:"w-3 h-3"}),"Add Phone Number"]})]}),a.jsx(mt,{style:{borderColor:"#E7E8EB",marginBlock:24}}),a.jsxs("div",{className:"office-address-box",children:[a.jsxs("div",{children:[a.jsx(_e.Text,{className:"form-title",children:"Street Address"}),a.jsx(Ae,{name:"streetAddress",placeholder:"Enter a street address",className:"form-input white",value:t?.streetAddress,onChange:f=>{_({streetAddress:f.target.value})}})]}),a.jsxs("div",{className:"office-address-section",children:[a.jsxs("div",{className:"office-address-section-box",children:[a.jsx(_e.Text,{className:"form-title",children:a.jsx("label",{style:{marginRight:4},children:"Country"})}),a.jsx(Br,{onChange:f=>{_({country:f,state:null})},suffixIcon:a.jsx(Le,{}),value:t?.country,placeholder:"Select a country"})]}),a.jsxs("div",{className:"office-address-section-box",children:[a.jsx(_e.Text,{className:"form-title",children:"State (Region/Province)"}),a.jsx($r,{onChange:f=>{_({state:f})},suffixIcon:a.jsx(Le,{}),value:t?.state,countryname:t?.country,placeholder:"Select a state"})]}),a.jsxs("div",{className:"office-address-section-box",children:[a.jsx(_e.Text,{className:"form-title",children:"City"}),a.jsx(Ae,{name:"city",placeholder:"Enter a city",className:"form-input white",onChange:f=>{_({city:f.target.value})},value:t?.city})]})]}),a.jsxs("div",{className:"office-address-section",children:[a.jsxs("div",{className:"office-address-section-box",children:[a.jsx(_e.Text,{className:"form-title",children:"Zip Code"}),a.jsx(Ae,{name:"zipcode",placeholder:"Enter a zip code",value:t?.zipcode,onChange:f=>{_({zipcode:f.target.value||""})},className:`form-input white ${u?"error":""}`}),a.jsx("span",{className:"error-message-input",children:u})]}),a.jsxs("div",{className:"office-address-section-box",style:{overflow:"hidden"},children:[a.jsx(_e.Text,{className:"form-title",children:"Time Zone"}),a.jsx(ye,{showSearch:!0,filterOption:(f,h)=>h?.label?.toLowerCase().indexOf(f.toLowerCase())>=0,placeholder:"Timezone",value:t?.timezone||n,onChange:f=>_({timezone:f}),suffixIcon:a.jsx(Le,{}),options:i})]})]})]})]})})};function Nc({officeId:t,officeInfo:e,open:s,onCancel:o,onSubmit:i}){const n=de(),{showErrorToast:l}=Qe(),[,c]=d.useState(),[m,u]=d.useState(null),{editOffice:{loading:_}}=M(x=>x.commonOfficeState),g=d.useRef(new _a({autoForceUpdate:{forceUpdate:c},validators:{primaryPhoneNumber:{message:"The phone number must be a valid phone number.",rule:x=>new RegExp(ll).test(x)},zipcode:{message:"The Zip Code must match the required pattern.",rule:x=>il.test(x)}}})),y=d.useMemo(()=>g.current,[g.current]);d.useEffect(()=>{t&&e&&u({officeName:e?.name||"",primaryPhoneNumber:e?.primary_phone_number||"",phoneNumbers:e?.phone_numbers||[],streetAddress:e?.address?.street_address||"",country:e?.address?.country||"United States",city:e?.address?.city||"",state:e?.address?.state||null,zipcode:e?.address?.zip_code||"",timezone:e?.timezone||""})},[t,e]);const f=x=>{u({...x})},h=()=>{if(y.allValid()){const{officeName:x,primaryPhoneNumber:T,phoneNumbers:C,streetAddress:L,country:w,city:v,state:D,zipcode:j,timezone:p}=m,S={name:x,address:{street_address:L,country:w,city:v,state:D,zip_code:j},primary_phone_number:bs(T),phone_numbers:C?.map(I=>bs(I))||[],timezone:p};n(Vl(t,S,()=>{i()},I=>{l(I)}))}else y.showMessages(),c(1)};return a.jsx(ot,{title:a.jsxs("div",{children:[a.jsx("h1",{children:"Edit Office"}),a.jsx("span",{className:"sub-title",style:{marginTop:12},children:"Edit or add office details."})]}),open:s,closeIcon:a.jsx("i",{className:"far fa-times","aria-hidden":"true"}),bodyStyle:{padding:32},className:"edit-office-modal",destroyOnHidden:!0,centered:!0,onCancel:o,footer:a.jsx("div",{className:"modal-footer-container",children:a.jsx("div",{style:{display:"flex",width:"100%"},children:a.jsxs("div",{className:"flex-1 flex",style:{justifyContent:"flex-end",gap:16},children:[a.jsx(X,{onClick:o,className:"btn btn-filter submit-btn",children:"Discard Edits"}),a.jsx(X,{onClick:h,disabled:_,loading:_,className:"btn lg-btn submit-btn",children:"Save Edits"})]})})}),style:{maxWidth:700},width:"100%",children:a.jsx(Ec,{data:m,validator:y,handleUpdate:f,setForceUpdate:c})})}function vs({keyIndex:t,leftIcon:e,isDisabled:s=!1,onClick:o,title:i,toolTipText:n=""}){return a.jsx(ne.Item,{eventKey:t,style:{padding:12,lineHeight:"16px",cursor:s?"not-allowed":"pointer"},disabled:s,onClick:l=>{l.domEvent.preventDefault(),l.domEvent.stopPropagation(),s||o(l)},children:a.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[a.jsx("span",{style:{width:20,textAlign:"center",height:20,padding:2},children:e}),a.jsx("span",{style:{marginLeft:12},children:i}),n&&s&&a.jsx(we,{placement:"topLeft",classNames:{body:"lg-tooltip"},title:n,children:a.jsx("span",{style:{padding:2,flex:1,textAlign:"right"},children:a.jsx("i",{className:"fas fa-info-circle",style:{color:"#70748B"}})})})]})},t)}const vc=t=>a.jsx(pt,{load:K(()=>
322import("./SelectDrawer-BTlRPmEX.js"),__vite__mapDeps([5,1,2,6,3,7])),componentProps:t}),jc=t=>a.jsx(pt,{load:K(()=>import("./inviteTeamMembers-BuKlfgUH.js"),__vite__mapDeps([8,1,2,9,10,11,12])),componentProps:t}),{Search:kc}=Ae,Ic=({totalContacts:t,setShowContactsModal:e,setShowAssignedContactModal:s,selectedContacts:o})=>{const{isGlobalAdmin:i}=Fe();return i?a.jsxs(a.Fragment,{children:[t===1?a.jsx(we,{placement:"top",classNames:{root:"lg-tooltip"},popupVisible:!0,title:"Looking to edit permission level to another office? You must have more than one global admin in your organization in order to reassign a global admin.",children:a.jsx(X,{style:{height:32,color:"#ffffff",backgroundColor:"#d0d0d0"},className:"btn btn-blue",disabled:!0,iconPosition:"end",icon:a.jsx(G,{icon:at,style:{width:12,height:12}}),children:"Edit permissions & office"})}):a.jsx(X,{className:"btn",style:{height:32,color:o?"#5463d2":"#ffffff",backgroundColor:o?"#ffffff":"#d0d0d0",marginLeft:16},onClick:s,disabled:!o,iconPosition:"end",icon:a.jsx(G,{icon:at,style:{width:12,height:12}}),children:`Edit permissions & office ${o?`(${o})`:""}`?.trim()}),a.jsx(X,{iconPosition:"end",icon:a.jsx(G,{icon:at,style:{width:12,height:12}}),className:"btn btn-blue",style:{height:32},onClick:e,children:"Add Global Admins"})]}):null},Dc=({setShowContactsModal:t,setShowAssignedContactModal:e,selectedContacts:s,setModalFor:o,officeDetails:i})=>{const n=de(),{isGlobalAdmin:l,isOfficeAdmin:c,isTeamMember:m}=Fe(),[u,_]=d.useState(!1),g=y=>{o(y),t(!0)};return a.jsxs(a.Fragment,{children:[!m&&a.jsxs(a.Fragment,{children:[a.jsx(X,{className:"btn btn-blue",style:{height:32,color:s?"#5463d2":"#ffffff",backgroundColor:s?"#ffffff":"#d0d0d0",marginLeft:16},onClick:e,disabled:!s,iconPosition:"end",icon:a.jsx(G,{icon:at,className:"w-3 h-3"}),children:`${l?"Edit permissions & office":"Edit permissions"} ${s?`(${s})`:""}`?.trim()}),c&&a.jsx(X,{className:"btn",style:{height:32,marginLeft:16},onClick:()=>{_(!0)},iconPosition:"end",icon:a.jsx(G,{icon:lt,className:"w-3 h-3"}),children:"Invite a Team Member"}),u&&a.jsx(d.Suspense,{fallback:a.jsx(Ne,{}),children:a.jsx(jc,{open:u,onClose:y=>{_(!1),y&&(n(Pr(i?.id)),n({type:"FORCE_UPDATE_CONTACTS_LIST_TABLE"}))},officeDetails:i})})]}),l&&a.jsx(Ye,{dropdownRender:()=>Gr(g),placement:"topCenter",children:a.jsx(X,{className:"btn btn-blue dropdown-btn-without-border",style:{display:"flex",justifyContent:"center",alignItems:"center",borderRadius:4,padding:"11px 15px !important",height:32},iconPosition:"end",icon:a.jsx(G,{icon:at,style:{width:12,height:12}}),children:"Add Office Users"})})]})},Ac=({iconClass:t,title:e,officeId:s,isGlobalAdminOffice:o,isGlobalAdminList:i,officeDetails:n})=>{const l=de(),{CURRENT_TIMEZONE:c}=Gt(),{showSuccessToast:m,showErrorToast:u}=Qe(),[_,g]=d.useState({page:1,pageSize:10}),[y,f]=d.useState(""),[h,x]=d.useState(),T=Aa(y),{id:C}=M(N=>N.auth.user),[L,w]=d.useState(!1),[v,D]=d.useState(null),[j,p]=d.useState(he.OFFICE_ADMIN),[S,I]=d.useState({visible:!1,data:{}}),{isGlobalAdmin:q,isOfficeAdmin:V,isTeamMember:b}=Fe(),{contacts:E,all_user_ids:k,totalContacts:U,tableLoading:ae,updateTableCount:F}=M(N=>N.officeDetailsDrawerReducer),{unAssignedContacts:ee}=M(N=>N.genericOfficeReducer),{selectedContacts:H,isSelectedAll:W}=M(N=>N?.createOffice),Y=async(N,P,Q,oe)=>{const me={office_id:N,limit:oe?.pageSize,offset:oe.pageSize*(oe.page-1),...P&&{search:P},...Q&&{ordering:Q}};l(xc(me,()=>{},z=>{u(z)}))};d.useEffect(()=>{l({type:"RESET_OFFICE_FORM_DETAILS",payload:{timezone:c,country:"United States"}})},[]),d.useEffect(()=>{s&&Y(s,T,h,_)},[F,s,T,h,_?.pageSize,_?.page]);const Ce=({value:N,index:P,row:Q})=>{const oe=()=>{window.open(`/messenger/user/${Q?.user}`,"_blank")};return a.jsxs(ne,{style:{paddingBlock:"6px !important",border:1,borderRadius:4,minWidth:280},children:[a.jsx(vs,{keyIndex:`send-message-${N?.id}-${P}`,onClick:()=>{oe()},leftIcon:a.jsx("i",{className:"fas fa-comments",style:{color:"#70748B"}},`office-send-message-${P}`),title:"Message",isDisabled:!1,toolTipText:""}),(q||V&&!o)&&a.jsx(vs,{keyIndex:`edit-permission-level-${N?.id}-${P}`,onClick:()=>{D(N)},leftIcon:a.jsx("i",{className:"fas fa-edit",style:{color:"#70748B"}},`office-edit-permission-level-${P}`),title:q?"Edit permissions & office ":"Edit Permission level",isDisabled:o&&U===1||C===Q?.user,toolTipText:q?"Looking to edit your permission level? You must have one other global admin in your organization in order to edit your permission level.":""})]},`menu-team-${N?.id}-${P}`)},A=[{title:"User Name",key:"display_name",mapping:"display_name",width:200,sorter:!0,fixed:!0,defaultSortOrder:"ascend",render:(N,P,Q)=>a.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[N?.profile_image?a.jsx(ve,{src:N?.profile_image,alt:"user",className:"lg-avatar"}):a.jsx(ve,{className:"bg-blue lg-avatar",children:N?.display_name&&a.jsx(a.Fragment,{children:N?.display_name.split(" ").length>0&&N?.display_name.split(" ").map((oe,me)=>a.jsx(Da,{text:oe.toUpperCase()},me))})}),a.jsx(we,{placement:"top",classNames:{root:"lg-tooltip"},title:N?.display_name,children:a.jsxs("p",{className:"mb-0 ellipsis-text",style:{marginLeft:16,width:200},children:[N?.display_name," ",N?.user===C&&a.jsx("span",{children:"(me)"})]})})]},`${P}-${Q}`)},{title:"Permission Level",dataIndex:"permission_level",key:"permission_level",render:N=>a.jsx(we,{placement:"top",classNames:{root:"lg-tooltip"},title:N,children:a.jsx("p",{className:"mb-0 ellipsis-text",style:{width:150},children:N||"-"})}),width:250},{title:"Email",dataIndex:"primary_email_address",key:"primary_email_address",ellipsis:!0,width:200,render:N=>a.jsx(we,{placement:"top",classNames:{root:"lg-tooltip"},title:N,children:a.jsx("p",{className:"mb-0 ellipsis-text",style:{width:200},children:N||"-"})})},{title:"Phone Number",dataIndex:"primary_phone_number",key:"primary_phone_number",width:200,render:N=>a.jsx(we,{placement:"top",classNames:{root:"lg-tooltip"},title:N,children:a.jsx("p",{className:"mb-0 ellipsis-text",style:{width:150},children:rt(N)})})},{title:"Status",key:"status",width:200,render:(N,P,Q)=>a.jsx(ke.Fragment,{children:N?.status?.toLowerCase()==="active"?a.jsx(Oe,{className:"ant-tag-green",children:N?.status}):N?.status?.toLowerCase()==="inactive"?a.jsx(Oe,{className:"ant-tag-no-access",children:N?.status}):a.jsx(Oe,{className:"ant-tag-success",children:N?.status})},`${N}-${P}-${Q}`)},{title:"",align:"center",key:"action",width:200,render:(N,P,Q)=>a.jsxs("div",{className:"flex justify-between gap-10",children:[a.jsx("span",{className:"text-sm font-bold leading-[18px] text-primary",onClick:()=>{I({visible:!0,data:P})},children:"View"}),P?.user!==C&&a.jsx(Ye,{getPopupContainer:()=>document.body,dropdownRender:()=>Ce({value:N,row:P,index:Q}),placement:"topLeft",trigger:["hover"],destroyPopupOnHide:!0,className:"w-10",overlayClassName:"overlay-container",children:a.jsx("span",{className:"flex items-center justify-center",onClick:oe=>{oe.preventDefault(),oe.stopPropagation()},children:a.jsx(G,{icon:Ps,className:"text-sm cursor-pointer text-primary"})})},`drop-down-${N?.id}-${Q}`)]},`drop-down-${N?.id}-${Q}`)}],re=()=>{const N={users:H?.map(P=>
322P?.user),source_office_id:H?.[0]?.office?.id,target_office_id:s,target_permission_level:o?he.GLOBAL_ADMIN:j,all_users_selected:W};l(La(N,()=>{l({type:"SELECTED_CONTACTS",payload:[]}),l({type:"UPDATE_SELECT_ALL_TOGGLE",payload:!1}),l({type:"FORCE_UPDATE_CONTACTS_LIST_TABLE"}),m({description:a.jsxs("span",{children:[`${o?"Global admin":j}`,"(s) have been added to the ",a.jsx("strong",{children:o?"Global Admins":n?.name})," office."]})}),w(!1)},P=>{u({description:P?.description})}))},se=N=>{l({type:"SELECTED_CONTACTS",payload:N})},te=N=>{if(l({type:"UPDATE_SELECT_ALL_TOGGLE",payload:!1}),H?.find(Q=>Q?.user===N?.user)){const Q=H?.filter(oe=>oe?.user!==N?.user);se([...Q])}else se([...H,N])},O=d.useMemo(()=>H?.filter(P=>P?.user!==C)?.length,[H,H?.length]);return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"office-contact-list-container",style:{height:"100%",maxHeight:900},children:[a.jsx("div",{style:{width:"100%"},children:a.jsxs("div",{className:"wrapper",children:[a.jsxs("div",{style:{display:"flex",gap:16,alignItems:"center",justifyContent:"center"},children:[a.jsx("div",{className:"left-icon",children:a.jsx("i",{className:t,style:{color:"#5463D2"}})}),a.jsx("div",{className:"header-title",children:a.jsx("h3",{style:{margin:"0px !important"},children:e})})]}),a.jsxs("div",{className:"",style:{display:"inline-flex",alignItems:"center",justifyContent:"center"},children:[a.jsx("div",{className:"search-btn",children:a.jsx(kc,{className:"ant-searchbtn",placeholder:"Search",allowClear:!0,onChange:N=>{f(N.target.value),g(P=>({...P,page:1}))},onSearch:N=>{N?.length===0&&(f(""),g(P=>({...P,page:1})))},style:{width:200,padding:0,margin:0},value:y})}),o?a.jsx(Ic,{totalContacts:k?.length,selectedContacts:O,setShowContactsModal:()=>{l({type:"SELECTED_CONTACTS",payload:[]}),w(!0)},setShowAssignedContactModal:()=>D(!0)}):a.jsx(Dc,{totalContacts:k?.length,selectedContacts:O,setShowContactsModal:()=>{l({type:"SELECTED_CONTACTS",payload:[]}),w(!0)},setShowAssignedContactModal:()=>D(!0),setModalFor:p,officeDetails:n})]})]})}),a.jsx(mt,{style:{margin:0}}),a.jsx(Mt,{filtered:!0,pagination:!1,columns:A,dataSource:E,loading:{indicator:a.jsx($e,{}),spinning:ae},rowKey:N=>N?.user,scroll:{y:"calc(567px - 56px)",x:!0},style:{height:"100%"},rowSelection:b||i&&!q?null:{columnWidth:80,selectedRowKeys:H?.map(N=>N?.user),onSelect:N=>te(N),renderCell:(N,P,Q,oe)=>P?.user===C?null:oe,onSelectAll:N=>{se(N?[...k]:[]),l({type:"UPDATE_SELECT_ALL_TOGGLE",payload:N})}},onChange:(N,P,Q)=>{Q.column?x(Q.order==="ascend"?"":"-"+Q.column.key):x("")},onRow:N=>({onClick:P=>{P.preventDefault(),P.stopPropagation(),I({visible:!0,data:N})}}),rowClassName:N=>S?.data?.id===N?.id?"active table-row":"table-row"}),a.jsx(Ut,{total:U,showTotal:(N,P)=>`${P[0]}-${P[1]} of ${N} items`,defaultPageSize:_.pageSize,current:_.page,pageSizeOptions:[10,20,50,100,200],showSizeChanger:{showSearch:!1},responsive:!0,className:"pagination-select",position:"bottomLeft",onChange:(N,P)=>{g({page:N,pageSize:P});const Q=document.getElementsByClassName("ant-table-body"),oe=Q[Q.length-1];oe&&oe.scrollTo({top:0,behavior:"smooth"})}})]}),L&&a.jsx(zr,{open:L,onCancel:()=>{l({type:"SELECTED_CONTACTS",payload:[]}),w(!1)},onSubmit:()=>re(),title:o?"Add Global Admins":`Add ${j}s`,subTitle:`Select users from your organization to add to this office as an ${o?"Global Admin":j}. Note: users already assigned to an office wonât appear in the table below.`,loading:ee?.loading}),!!v&&a.jsx(Or,{currentOfficeId:s,open:!!v,selectedContact:v,onCancel:()=>{l({type:"RESET_OFFICES_LIST_DATA"}),D(null)},onSubmit:()=>{Y(s,T,h,_),D(null)},isShowOfficeList:!0,title:q?"Edit permissions & office":"Edit permissions",totalContacts:O,isUpdatePermission:!0,queryParams:{reassign:!0}}),a.jsx("div",{id:"drawer-container",children:S.visible&&a.jsx(d.Suspense,{fallback:a.jsx(Ne,{}),children:a.jsx(vc,{visible:S.visible,data:S.data,onClose:()=>{I({visible:!1,data:{}})},isLastGlobalAdmin:U===1&&o,isGlobalAdminList:i})})})]})},Oc=({items:t=[]})=>{const[e,s]=ke.useState({}),[o,i]=d.useState({});if(t=t.filter(Boolean),!t||t.length===0)return a.jsx("span",{className:"office-detail-items-content",children:"-"});t=t?.map((l,c)=>({text:l,id:c}));let n=t;return t.length>2&&(n=t.slice(0,2)),a.jsxs("div",{className:"flex",style:{justifyContent:"center",gap:"4px",flexDirection:"column"},children:[n.map((l,c)=>
322a.jsx(ke.Fragment,{children:a.jsxs("h5",{className:"flex",children:[a.jsx(qa,{text:l?.text,onCopy:()=>{let m={...o};m[c]=!1,i(m),{...e},s({...e,[c]:!0}),setTimeout(()=>{s({...e,[c]:!1})},1e3)},children:a.jsxs("span",{className:"number-clipboard",children:[a.jsx("span",{className:"ellipsis-text",children:rt(l?.text)}),a.jsx(et,{content:"Copy to Clipboard",open:!e[c]&&o[c],onOpenChange:m=>{let u={...o};u[c]=m,i(u)},children:a.jsx("span",{className:"m-0",children:a.jsx(G,{icon:Gs,className:"cursor-pointer text-gray-600"})})})]})}),a.jsx(et,{content:a.jsxs("div",{onClick:()=>{let m={...e};m[c]=!1,s(m)},children:[a.jsx(G,{icon:pa}),"Â Copied"]}),trigger:"click",open:e[c]})]})},c)),n?.length!==t?.length&&a.jsx(et,{classNames:{root:"phone-number-overlay"},content:a.jsx("div",{className:"flex",style:{flexDirection:"column",gap:6,alignItems:"flex-start",width:"100%"},children:t?.slice(2,t.length)?.map((l,c)=>a.jsx(ke.Fragment,{children:a.jsx(qa,{text:l?.text,onCopy:()=>{s({...e,[l?.id]:!0}),setTimeout(()=>{s({...e,[l?.id]:!1})},500)},children:a.jsx("span",{style:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",textAlign:"left"},children:a.jsxs("span",{className:"number-clipboard",children:[a.jsx("span",{className:"ellipsis-text",children:l?.text}),a.jsxs("span",{children:[a.jsx(et,{content:e?"Copied":"Copy",trigger:"click",open:e[l?.id]}),a.jsx("i",{className:"fas fa-copy cur-pointer","aria-hidden":"true",style:{color:"#FFF"}})]})]})})})},c))}),children:a.jsxs("span",{className:"highlight-text cursor-pointer",children:["+",t.length-2," phone number"]})})]})},Gr=t=>a.jsxs(ne,{children:[a.jsx(ne.Item,{onClick:()=>t(he.OFFICE_ADMIN),children:a.jsxs("div",{children:[a.jsx("i",{className:"fas fa-user-crown"})," Â Add Office Admins"]})},"add_office_admins"),a.jsx(ne.Item,{onClick:()=>t(he.TEAM_MEMBER),children:a.jsxs("div",{children:[a.jsx("i",{className:"fas fa-user"})," Â Add Team Members"]})},"add_team_members")]}),js=({officeId:t=void 0,currentUserOffice:e=!1,isGlobalAdminList:s=!1})=>{const o=de(),{isGlobalAdmin:i,isOfficeAdmin:n,checkIsGlobalAdmin:l}=Fe(),{showSuccessToast:c,showErrorToast:m}=Qe(),[u,_]=d.useState(t),[g,y]=d.useState(!1),[f,h]=d.useState(!1),[x,T]=d.useState(!1),[C,L]=d.useState(he.OFFICE_ADMIN),{selectedContacts:w,isSelectedAll:v}=M(H=>H?.createOffice),{unAssignedContacts:D,unassignedContactsCount:j,loading:p}=M(H=>H?.genericOfficeReducer),{data:S={},loading:I,updateTableCount:q}=M(H=>H.officeDetailsDrawerReducer),V=d.useMemo(()=>S?.name===he.GLOBAL_ADMIN,[S?.name]),b=H=>{o(Pr(H))},E=async()=>{try{const W=(await ce.get("User/me")).data?.office_id;if(!W)return;_(W),b(W)}catch(H){m({message:"Error",description:H?.description||"Something went wrong"})}};d.useEffect(()=>{e?E():t&&b(t),o(Ke())},[t,e,q]);const k=H=>{L(H),h(!0)},U=()=>{if(!u)return;const H={users:v?[]:w?.map(W=>W?.user),source_office_id:w?.[0]?.office?.id,target_office_id:u,target_permission_level:C,all_users_selected:v};o(La(H,()=>{o({type:"SELECTED_CONTACTS",payload:[]}),c({description:`${C}(s) has been added to an office`}),b(u),h(!1)},W=>{m({description:W?.description})}))},ae=()=>{y(!1),b(u)},F=d.useMemo(()=>S?.name?a.jsx(G,{icon:S?.name===he.GLOBAL_ADMIN?Oo:Us,className:"icon"}):null,[S?.name,S]),ee=d.useMemo(()=>n&&!s&&!l(S?.name)&&!p&&j>0,[s,n,S?.name,j,p]);return a.jsxs("div",{className:"flex flex-col w-full gap-6 mb-14",children:[ee&&a.jsx("div",{className:"w-full",children:a.jsx(ya,{className:"items-center max-w-full px-4 py-3 mt-0 text-sm alert-box bg-gray-120 border-primary border-opacity-65",message:"",description:a.jsxs("span",{className:"text-sm",children:["There are",a.jsx("span",{className:"mx-1 font-medium",children:j}),"users in your organization that arenât assigned to an office.",a.jsx("a",{className:"no-underline text-[#11173ebd] ml-1",href:vr,target:"_blank",children:a.jsx("u",{children:"Learn More"})})]}),type:"warning",showIcon:!0,action:a.jsx("span",{className:"text-xs font-bold leading-4 cursor-pointer text-primary",onClick:()=>T(!0),children:"Assign Users to My Office"}),icon:a.jsx("div",{className:"m-0 w-6 h-6 flex items-center !mr-1",children:a.jsx(G,{icon:oa,className:"w-4 h-4 leading-none text-primary "})})})}),a.jsxs(jt,{variant:"borderless",style:{width:"100%"},className:"component-loader-relative",children:[I&&a.jsx($t,{className:"component-loader"}),a.jsxs("div",{className:"flex",style:{gap:"24px"},children:[a.jsx("div",{className:"flex",children:a.jsx("div",{className:"office-details-icon",children:F})}),a.jsxs("div",{className:"flex",style:{flexDirection:"column",flexGrow:1,gap:16,alignSelf:"flex-start"},children:[a.jsxs("div",{className:"flex",style:{justifyContent:"space-between",width:"100%"},children:[a.jsx("h3",{className:"m-0",style:{alignSelf:"center",justifySelf:"center",fontSize:28,lineHeight:"32px"},children:S.name}),(i||n)&&!V&&a.jsx(X,{className:"flex items-center btn btn-blue noExport",onClick:()=>y(!0),icon:a.jsx(G,{icon:at}),iconPosition:"end",children:"Edit"})]}),a.jsxs("div",{className:"flex",style:{gap:"16px"},children:[a.jsxs("div",{className:"flex",style:{flexDirection:"column",gap:"4px"},children:[a.jsx("span",{className:"office-detail-items-title",children:V?"Global Admins":"Office Users"}),a.jsx("span",{className:"office-detail-items-content",children:S?.office_contacts_count||0})]}),!V&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"ruler-container"}),a.jsxs("div",{className:"flex",style:{flexDirection:"column",gap:"4px"},children:[a.jsx("span",{className:"office-detail-items-title",children:"Phone Numbers"}),a.jsx(Oc,{items:[S?.primary_phone_number,...S?.phone_numbers||[]]})]}),a.jsx("div",{className:"ruler-container"}),a.jsxs("div",{className:"flex",style:{flexDirection:"column",gap:"4px"},children:[a.jsx("span",{className:"office-detail-items-title",children:"Address"}),a.jsx("span",{className:"office-detail-items-content",children:S?.address_one_line?a.jsxs("span",{className:"line-clamp-3",children:[S?.address_one_line,a.jsx(pc,{text:S?.address_one_line})]}):"-"})]})]})]})]})]})]}),a.jsxs(jt,{className:"contact-list-card-container",children:[!!(S?.office_contacts_count&&!I)&&a.jsx(Ac,{title:V?"Global Admins":"Office Users",iconClass:V?"fas fa-users-cog":"fas fa-users-crown",officeId:u,isGlobalAdminOffice:V,officeDetails:S,isGlobalAdminList:s}),!!(Object.keys(S)?.length&&!S?.office_contacts_count&&!I)&&a.jsx("div",{style:{height:543,display:"flex",alignItems:"center",justifyContent:"center"},children:a.jsx(Oa,{title:a.jsx(a.Fragment,{children:"You havenât added any users to this office yet"}),subTitle:"Looking to add users to this office? Reassign users from existing office
322s or add new users to your organization.",linkLabel:"Learn More Office Users",customButton:a.jsx(Ye,{popupRender:()=>Gr(k),placement:"topCenter",children:a.jsxs(X,{className:"blue-btn lg-btn dropdown-btn-without-border",style:{display:"flex",justifyContent:"center",alignItems:"center",borderRadius:4,padding:"11px 15px !important",height:"auto"},children:[a.jsxs("span",{style:{fontWeight:700,fontSize:14,lineHeight:"16px"},children:["Add Office Users"," "]}),a.jsx(G,{icon:lt,style:{marginLeft:12,width:14,height:14}})]})})})})]}),f&&a.jsx(zr,{open:f,onCancel:()=>{o({type:"SELECTED_CONTACTS",payload:[]}),h(!1)},onSubmit:()=>U(),title:`Add ${C}s`,subTitle:`Select users from your organization to add to this office as an ${C}. Note: users already assigned to an office wonât appear in the table below.`,loading:D?.loading}),g&&a.jsx(Nc,{officeId:u,officeInfo:S,open:g,onCancel:()=>y(!1),onSubmit:ae}),x&&a.jsx(Lr,{open:x,onCancel:()=>{o({type:"SELECTED_CONTACTS",payload:[]}),o({type:"RESET_OFFICES_LIST_DATA"}),T(!1)},onSubmit:()=>{o(Ke()),o({type:"SELECTED_CONTACTS",payload:[]}),T(!1)},title:"Unassigned Users",subTitle:"View and assign unassigned users from your organization to your offices."})]})},Lc=t=>a.jsx(pt,{load:K(()=>import("./ResetPasswordModal-D2-skNYc.js"),__vite__mapDeps([13,1,2,14])),componentProps:t}),Rc=t=>a.jsx(pt,{load:K(()=>import("./PersonalInformationModal-BtSoe6Bc.js"),__vite__mapDeps([15,1,2,10,16])),componentProps:t}),ue={MY_QUICK_LINKS:"my-quick-links",ACCOUNT_INFORMATION:"account-information",MY_OFFICE:"my-office",MY_GLOBAL_ADMINS:"my-global-admins",EMAIL_NOTIFICATION:"email-notification"},Mc=d.lazy(()=>K(()=>import("./PersonalInformationCard-C35AGDMe.js"),__vite__mapDeps([17,1,2,4]))),Fc=d.lazy(()=>K(()=>import("./QuickLink-DetevWAA.js"),__vite__mapDeps([18,1,2]))),Uc=d.lazy(()=>K(()=>import("./EmailAndNotification-D01sTojM.js"),__vite__mapDeps([19,1,2])));function Pc(){const t=Ft(),e=gt(),s=de(),{CURRENT_TIMEZONE:o}=Gt(),{isTeamMember:i,isOfficeFlagEnable:n}=Fe(),[l,c]=d.useState(!1),[m,u]=d.useState(!1),[_,g]=d.useState(!1),[y,f]=d.useState(),[h,x]=d.useState(ue.MY_QUICK_LINKS),T=M(D=>D.auth.user),{tab:C}=e.state||{},L=It.TabPane;d.useEffect(()=>{C?x(C):n&&i&&T?.global_admin_office_id?x(ue.MY_GLOBAL_ADMINS):x(ue.MY_QUICK_LINKS)},[C,n,i,T?.global_admin_office_id]),d.useEffect(()=>{s({type:"SELECTED_CONTACTS",payload:[]}),s({type:"RESET_OFFICE_FORM_DETAILS",payload:{timezone:o,country:"United States"}})},[h]);const w=D=>{x(D.toString()),D?.toString()===ue.ACCOUNT_INFORMATION&&v(),t.push({pathname:e.pathname,state:{...e.state,tab:D}})},v=async()=>{try{const D=await ce.get("User/me");D.status===200?(f(D.data),s(Ea({...T,first_name:D.data.first_name,last_name:D.data.last_name,office_id:D.data.office_id,global_admin_office_id:D.data.global_admin_office_id,permission_level:D.data.permission_level,office_enable:D.data.office_enable,office_turned_on:D.data.office_turned_on,practice_area_cs_config_enabled:D.data.practice_area_cs_config_enabled,snapsheet_enable:D.data.snapsheet_enable,collaborator_enable:D.data.collaborator_enable}))):ie.error({icon:a.jsx("i",{className:"fas fa-times-circle"}),className:"error-notification",message:"Error",description:D.data.message})}catch(D){if(console.log(D),D?.canceled)return;D?.response?ie.error({icon:a.jsx("i",{className:"fas fa-times-circle"}),className:"error-notification",message:"Error",description:"Page not found"}):ie.error({icon:a.jsx("i",{className:"fas fa-times-circle"}),className:"error-notification",message:"Error",description:"Something went wrong"})}};return d.useEffect(()=>{v()},[]),a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"mainContainer",children:[a.jsx("div",{className:"flex items-center justify-between page-heading",children:a.jsxs("div",{className:"flex items-center justify-between flex1",children:[a.jsx("div",{className:"head-icon",children:a.jsx("i",{className:"fas fa-user-cog"})}),a.jsx("h1",{children:"Account Settings"})]})}),a.jsxs("div",{className:"block-row quick-links section-scroll",children:[a.jsxs("div",{className:"flex items-center justify-end pt-0 pb-0 pr-0 card-header",children:[h.toString()===ue.ACCOUNT_INFORMATION&&a.jsxs(a.Fragment,{children:[T?.provider==="internal"&&a.jsxs(X,{className:"btn-bdr ml-15",onClick:()=>u(!0),children:["Reset Password  ",a.jsx("i",{className:"fas fa-plus"})]}),a.jsxs(X,{className:"btn ml-15",onClick:()=>g(!0),children:["Edit Account Information   ",a.jsx("i",{className:"far fa-edit"})]})]}),h.toString()===ue.MY_QUICK_LINKS&&a.jsxs(X,{onClick:()=>c(!0),children:["Add New Quick Link  ",a.jsx("i",{className:"fas fa-plus"})]})]}),a.jsx("div",{className:be("page-container mt-25",{"pt-8":h===ue.EMAIL_NOTIFICATION}),children:a.jsxs(It,{className:"page-tab-detail",activeKey:h.toString(),tabPosition:"left",onChange:w,children:[!!(n&&i&&T?.global_admin_office_id)&&a.jsxs(a.Fragment,{children:[T?.office_id&&a.jsx(L,{tab:a.jsx(a.Fragment,{children:a.jsx("div",{className:"tabname noExport",children:"My Office"})}),children:h===ue.MY_OFFICE&&a.jsx(d.Suspense,{fallback:a.jsx(Pe,{className:"global-loader"}),children:a.jsx(js,{currentUserOffice:!0,isGlobalAdminList:!0})})},ue.MY_OFFICE),a.jsx(L,{tab:a.jsx(a.Fragment,{children:a.jsx("div",{className:"tabname noExport",children:"My Global Admins"})}),children:h===ue.MY_GLOBAL_ADMINS&&a.jsx(d.Suspense,{fallback:a.jsx(Pe,{className:"global-loader"}),children:a.jsx(js,{officeId:T?.global_admin_office_id,isGlobalAdminList:!0})})},ue.MY_GLOBAL_ADMINS)]}),a.jsx(L,{tab:a.jsx(a.Fragment,{children:a.jsx("div",{className:"tabname",children:"My Quick Links"})}),children:a.jsx("div",{children:a.jsx(d.Suspense,{fallback:a.jsx(Pe,{className:"global-loader"}),children:h===ue.MY_QUICK_LINKS&&a.jsx(Fc,{addNewQuickLinkShow:l,onClose:D=>{c(D)}})})})},ue.MY_QUICK_LINKS),a.jsx(L,{tab:a.jsx(a.Fragment,{children:a.jsx("div",{className:"tabname",children:"Account Information"})}),children:a.jsx("div",{children:a.jsx(d.Suspense,{fallback:a.jsx(Pe,{className:"global-loader"}),children:h===ue.ACCOUNT_INFORMATION&&a.jsx(Mc,{currentUserData:y})})})},ue.ACCOUNT_INFORMATION),a.jsx(L,{tab:a.jsx(a.Fragment,{children:a.jsx("div",{className:"tabname",children:"Email & Notifications"})}),children:a.jsx("div",{children:a.jsx(d.Suspense,{fallback:a.jsx(Pe,{className:"global-loader"}),children:h===ue.EMAIL_NOTIFICATION&&a.jsx(Uc,{currentUserData:y})})})},ue.EMAIL_NOTIFICATION)]})})]})]}),m&&a.jsx(Lc,{open:m,onClose:()=>{u(!1)}}),_&&a.jsx(Rc,{open:_,currentUserData:y,onClose:(D,j)=>{D&&f(j),g(!1)}})]})}const zc=Pt(Pc),Bc=Object.freeze(Object.defineProperty({__proto__:null,TabKeys:ue,default:zc},Symbol.toStringTag,{value:"Module"})),$c=t=>{const e=new Error(t?.data?.message||`Unexpected organization feature flags response: ${t?.status}`);return e.name="AxiosError",e.response=t,e},Gc=()=>{const t=new J(!0,!0,!0);return async e=>{const s=async(o=1)=>{try{return await t.getOrganizationFeatureFlags()}catch(i){if(!i?.response&&o>0)return s(o-1);throw i}};try{const o=await s();if(o?.status!==200||!o?.data)throw $c(o);const i=o?.data;e(Ei(i))}catch(o){console.log(o.response?.data?.message||"Something went wrong")}}},Vc="/assets/spinner-hvxYYwAe.gif";function Hc(t){return new Worker("/assets/apiWorker-BbFz0bm4.js",{name:t?.name})}const ks=({callback:t,url:e,method:s,token:o,timer:i,name:n="worker"})=>{const l=d.useRef(null),c=d.useRef(t),m=d.useCallback(()=>{const u=l.current;if(u){l.current=null;try{u.postMessage({type:"stop"})}catch{}try{u.onmessage=null}catch{}try{u.terminate()}catch{}}},[]);return d.useEffect(()=>{c.current=t},[t]),d.useEffect(()=>{const u=()=>{m()};return window.addEventListener("beforeunload",u),()=>{window.removeEventListener("beforeunload",u)}},[m]),d.useEffect(()=>
322(e&&s&&o&&(l.current=new Hc({name:n}),l.current.onmessage=u=>{const{type:_,data:g,error:y}=u.data;_==="success"?c.current?.(g):_==="error"&&console.error("Worker Error:",y)},l.current.postMessage({type:"start",url:e,method:s,token:o,timer:i})),()=>{m()}),[e,s,o,i,n,m]),l};function qc(){const t=ut.THREE_SECONDS,e=ut.TWENTY_SECONDS,s=window&&window.location&&window.location.hostname,{showErrorToast:o}=Qe(),i=de(),n=M(E=>E.auth.user.token),l=M(E=>E.backgroundExportRefresh?.requestId),[c,m]=d.useState(!1),[u,_]=d.useState([]),[g,y]=d.useState([]),[f,h]=d.useState(e),[x,T]=d.useState(!1),[C,L]=d.useState(null),{commonFlagLoading:w}=M(E=>E.commonAppState),{handleLogout:v}=Ur(),D=d.useRef(l),j=async E=>{const k=E.map(async U=>{const ae=U.file?.split("/").pop()?.split("?")[0];if(!U.file||!ae){o({message:"Error",description:"Unable to download export file"}),y(F=>F.filter(ee=>ee.id!==U.id));return}Ui(U.file,ae),await p(U.id),y(F=>F.filter(ee=>ee.id!==U.id))});await Promise.allSettled(k)},p=async E=>{try{const k=await ce.patch("/export/"+E,{is_exported:!0});k.status!==200&&o({message:"Error",description:k.data.message})}catch(k){console.log(k),o({message:"Error",description:"Something went wrong"})}},S=async()=>{m(!0);const E=u.map(k=>k.id);try{const k=await Promise.allSettled(E.map(F=>ce.patch(`/export/${F}`,{operation:"cancel"}))),U=E.filter((F,ee)=>{const H=k[ee];if(H.status==="rejected")return!0;const W=H.value.data?.task_status;return H.value.status!==200||!["canceled","completed","error"].includes(W)}),ae=E.filter(F=>!U.includes(F));_(F=>F.filter(ee=>!ae.includes(ee.id))),U.length>0&&o({message:"Unable to cancel export",description:"Please try again."})}finally{m(!1)}},I=E=>{const k=E.filter(F=>F.task_status==="in_progress"),U=E.filter(F=>F.task_status==="completed"),ae=k.length>0;y(U),_(k),h(ae?t:e)},q=E=>{E?.refresh_required_reason_type==="user_group_changed"||E?.refresh_required_reason_type==="account_setting_changed"?(i(ia()),T(!0)):E?.refresh_required_reason_type==="org_updated"&&(V.current&&(V.current.postMessage({type:"stop"}),V.current.terminate(),V.current=null),b.current&&(b.current.postMessage({type:"stop"}),b.current.terminate(),b.current=null),i(ia(!0,()=>{const k=He(),U=Mi(k),F=`${new URLSearchParams({encrypt:"true",token:U}).toString()}`,ee=le("redirect_url");je("token",k);const H=`https://${ee}/login?${F}`.trim();L(H),T(!0)})))},V=ks({callback:I,url:`https://api.claim-deck.com/api/${r.backgroundExports.url}?is_exported=false`,method:r.backgroundExports.method,token:"token "+n+" "+s,timer:f}),b=ks({callback:q,url:`https://api.claim-deck.com/api/${r.getUserFeatures.url}`,method:r.getUserFeatures.method,token:"token "+n+" "+s,timer:ut.TWO_MINUTES});return d.useEffect(()=>{D.current!==l&&(D.current=l,h(t))},[t,l]),a.jsxs("div",{className:"notification-grouping",children:[u?.length>0&&a.jsxs("div",{className:"notify-sec",children:[a.jsxs("div",{className:"flex items-center justify-center h-full",children:[a.jsx("i",{className:"fas fa-file-download",style:{fontSize:"20px"}}),a.jsxs("span",{className:"wrap-text text-left ml-2.5 mr-2.5",children:[u.length," export(s) in progress..."," ",a.jsx("a",{onClick:()=>{c||S()},children:a.jsx("u",{children:c?"Canceling...":"Cancel"})})]})]}),a.jsx("img",{src:Vc,alt:"loader",height:"30",width:30})]}),g?.length>0&&a.jsx("div",{className:"notify-sec",children:a.jsxs("div",{className:"flex items-center h-full",children:[a.jsx("i",{className:"fas fa-file-download",style:{fontSize:"20px"}}),a.jsxs("span",{className:"wrap-text text-left ml-2.5",children:[g.length," export(s) is ready to download."," ",a.jsx("a",{onClick:()=>j(g),className:"ml-2.5",children:a.jsx("u",{children:"click here"})})]})]})}),x&&a.jsx(Tr,{title:{title:"Warning"},okText:"Continue",open:x,closable:!1,onOk:()=>{i(ql(()=>{C?v(()=>{window.location.replace(C.toString())}):window.location.reload(),T(!1)}))},maskClosable:!1,destroyOnHidden:!0,cancelButtonProps:{className:"hidden"},confirmLoading:w,okButtonProps:{disabled:w},children:a.jsx(_e.Text,{children:"Your session was refreshed due to account changes. Please continue where you left off."})})]})}const Jc=30;function Is(t){return typeof t=="string"?t.trim():""}
322function Vr(t,e){return[Is(t),Is(e)].filter(Boolean).join(" ")}function Zc(t,e){return jr(Vr(t,e),Jc)}function Wc(){const t=gt(),e=de(),s=Hs(),o=qs.getSdk(s),[i,n]=d.useState(!1),l=M(O=>O.auth.user.first_name),c=M(O=>O.auth.user.last_name),m=M(O=>O.auth.user.company_name),{on_trial:u,trial_expiry_date:_}=M(O=>O.auth.user),g=Ie(Ie(new Date(_)).format("MM-DD-yyyy")).diff(Ie().format("MM-DD-yyyy"),"days"),y=M(O=>O?.notification?.IsGlabalNotificationAvailable),f=M(O=>O?.messengerChat?.messenger_group_url),h=M(O=>O.auth?.user?.profile_pic),x=M(O=>O?.auth?.user?.third_party_user),T=M(O=>O?.auth?.user),C=yt(),[L,w]=d.useState(!1),{currentPermission:v,isGlobalAdmin:D,isOfficeFlagEnable:j,isOrgOfficeFlagEnable:p,checkIsTeamMember:S}=Fe(),{handleLogout:I}=Ur(),[q,V]=d.useState(!1),b=t?.pathname?.includes("overview")||t?.pathname?.includes("numbers")||t?.pathname?.includes("contacts")||t?.pathname?.includes("documents")||t?.pathname?.includes("tasks"),E=d.useMemo(()=>{if(j&&p)return!S(T?.permission_level);if(D&&!x)return!0},[x,D,j,p,T?.permission_level]);d.useEffect(function(){async function O(){const P=await o?.groupChannel?.getChannel(f);P&&P?.unreadMessageCount>0?V(!0):V(!1)}var N=setInterval(function(){f&&b&&O()},ut.THREE_SECONDS);return function(){clearInterval(N)}},[o,f,b]);const k=async()=>{const O=await ce.get("notification/get_notification_status");if(O.status===200){let N={};N={global_notification:O.data?O.data.global:!1,matter:O.data?O.data.matter:!1,task_request:O.data?O.data.task_request:!1,system:O.data?O.data.system:!1,event:O.data?O.data.event:!1},e(tt(N))}else ie.error({icon:a.jsx("i",{className:"fas fa-times-circle"}),className:"error-notification",message:"Error",description:O.data.message})},U=d.useCallback(k,[]);d.useEffect(()=>{U()},[U]);const ae=async()=>{if(!T?.company_name||!T?.primary_email_address)return;const O=lc(T.company_name,T.primary_email_address),N=dc(T,O);if(N){const P=await uc(N.accountId,N.contactId);P&&C.login(P)}},F=d.useCallback(ae,[]),ee=async()=>{try{const O=await ce.get("User/me");O.status===200&&(e(Ea({...T,office_id:O.data.office_id,global_admin_office_id:O.data.global_admin_office_id,permission_level:O.data.permission_level,office_enable:O.data.office_enable,office_turned_on:O.data.office_turned_on,practice_area_cs_config_enabled:O.data.practice_area_cs_config_enabled,snapsheet_enable:O.data.snapsheet_enable,collaborator_enable:O.data.collaborator_enable})),e(Gc()))}catch(O){if(console.log(O),O?.canceled)return;ie.error({icon:a.jsx("i",{className:"fas fa-times-circle"}),className:"error-notification",message:"Error",description:"Something went wrong"})}},H=d.useCallback(ee,[v]);d.useEffect(()=>{H()},[H]),d.useEffect(()=>{C.churnInfo||F()},[F,C.churnInfo]);const W=()=>{e(vt({search_keyword:"",total_count:0,claim_count:0,contact_count:0,document_count:0}))},Y=d.useCallback(W,[]),Ce=Vr(l,c),A=Zc(l,c);d.useEffect(()=>{Y()},[Y]);const re=async()=>{if(w(!0),le("token"))try{const O=await ce.get("/User/logout");O.status===200?(I(),ie.success({icon:a.jsx("i",{className:"fas fa-check-circle"}),className:"success-notification",message:"Success",description:"You've logged out of your account."})):(ie.error({icon:a.jsx("i",{className:"fas fa-times-circle"}),className:"error-notification",message:"Error",description:O.data.message}),w(!1))}catch(O){if(console.log(O),w(!1),O?.canceled)return;ie.error({icon:a.jsx("i",{className:"fas fa-times-circle"}),className:"error-notification",message:"Error",description:"Something went wrong"})}else I()},se=d.useMemo(()=>a.jsxs(ne,{className:"header_menu",children:[a.jsxs(ne.Item,{children:[a.jsx("i",{className:"mr-2 fas fa-user-cog"}),a.jsx(Z,{to:{pathname:"/account-setting",state:{tab:ue.ACCOUNT_INFORMATION}},children:"Account Settings"})]},"1"),E&&a.jsxs(ne.Item,{children:[a.jsx("i",{className:"mr-2 fas fa-user-shield"}),a.jsx(Z,{to:{pathname:"/admin-setting"},children:"Admin Settings"})]},"2"),a.jsxs(ne.Item,{onClick:()=>{re()},children:[a.jsx("i",{className:"mr-2 far fa-sign-out"}),"Log Out"]},"3")]}),[E]),te=()=>{n(!1)};return a.jsxs(a.Fragment,{children:[a.jsx(qc,{}),L&&a.jsx($e,{className:"global-loader"}),u&&a.jsxs("div",{className:"trial-expiry flex justify-center items-center",children:[a.jsx("img",{className:"mr-5 max-w-3",src:Bl,alt:""})," Your trial will expire in ",g," days"]}),a.jsxs("div",{className:"flex items-center justify-between gap-4 pl-5 pr-8 bg-white header max-h-16",children:[a.jsx("div",{className:"logo flex-[0_0_auto] text-center",children:a.jsx(Z,{to:"/global-claim",children:a.jsx("img",{src:Pl,alt:"logo",width:"42"})})}),a.jsx("div",{className:"flex items-center flex-1 ml-6 text-left hleft",children:a.jsx(fc,{})}),a.jsxs("div",{className:"hright flex items-center flex-[0_0_auto] text-center gap-4",children:[a.jsx("div",{className:`${i?"notification active":"notification"} m-0`,onClick:()=>{k(),n(!0),C?.churnInfo&&C?.churnInfo.trackEvent("Viewed Tasks & Requests Notifications","User clicked on Notification Bell")},children:a.jsx(Js,{size:"default",color:"#d83535",dot:y,classNames:{indicator:`right-[2px] top-[3px] ${i&&"w-2.5 h-2.5"}`,root:"leading-none"},children:a.jsx(G,{icon:Lo})})}),a.jsxs("div",{className:"flex items-center justify-center gap-4",children:[a.jsx(Ye,{popupClassName:"",dropdownRender:()=>se,children:a.jsxs(X,{className:"flex p-0 border-none hover:border-none",children:[a.jsxs("span",{className:"username mr-1 flex max-w-[33ch] min-w-0 flex-col items-start justify-start text-left",title:Ce,children:[a.jsx("span",{className:"block w-full truncate font-semibold leading-5 text-left",children:A}),a.jsx("small",{className:"block w-full truncate font-semibold text-left",children:m})]}),a.jsx(Le,{})]})}),a.jsx(ve,{className:"m-0",size:42,src:h&&h!==""?h:zl,alt:Ce})]})]})]}),!!(j&&p&&D)&&a.jsx(Xl,{}),i&&a.jsx(oc,{onCloseDrawer:te,onClose:()=>te(),visible:i}),b&&f!==""&&a.jsx(Z,{to:`/messenger/group/${f}`,children:a.jsxs("div",{className:"newmsg",children:[a.jsx(G,{icon:Ro}),q&&a.jsx("div",{className:"ndot"})]})})]})}const Hr=Pt(Wc);Hr.displayName="MainHeader";const Kc=t=>({type:"QUICKLINKTYPE",payload:t.quick_link_data}),Ds=t=>({type:"STATICPAGE",...t}),Yc=t=>({type:"USERQUICKLINKTYPE",payload:t.quick_link_data});function Qc(t){const e=de(),s=Hs(),{isGlobalAdmin:o}=Fe(),i=qs.getSdk(s),n=M(p=>p.quickLink.QuickLinkType),l=M(p=>p.userQuickLink.UserQuickLinkType),c=M(p=>p.auth.user.third_party_user),m=M(p=>p.organizationFeatureFlag?.events_enable),[u,_]=d.useState({visible:!1,
322count:0}),[g,y]=d.useState([]),h=new Date().getFullYear();d.useEffect(()=>{async function p(){const I=i&&i?.groupChannel&&await i?.groupChannel.getTotalUnreadMessageCount();I&&I>0?_({visible:!0,count:I}):_({visible:!1,count:0})}let S=setInterval(function(){p()},ut.THREE_SECONDS);return function(){clearInterval(S)}},[i]);const x=d.useMemo(()=>{if(c)return[{to:"/global-claim",icon:"fas fa-gavel",title:"Matters",key:"claims"},{to:"/messenger",icon:"fas fa-comments-alt",title:"Messenger",key:"messenger"},{icon:"fas fa-question-circle",title:"Support",key:"support"}];{let p=[];return p=[{to:"/global-claim",icon:"fas fa-gavel",title:"Matters",key:"claims"},{to:"/events",icon:"fas fa-calendar-check",title:"Milestones & Events",key:"events"},{to:"/global-task",icon:"fal fa-tasks",title:"Tasks & Requests",key:"tasks-requests"},{to:"/global-contact",icon:"fas fa-users",title:"Contacts",key:"contacts"},{to:"/messenger",icon:"fas fa-comments-alt",title:"Messenger",key:"messenger"},{to:o?"/admin-setting":"/account-setting",icon:"fas fa-share-square",title:"Quick Links",key:"quicklink",state:{tab:o?"quick-links":"my-quick-links"},children:[...l||[],...n||[]].map((S,I)=>({key:`${S?.name}-${I}`,label:a.jsx("a",{target:"_blank",rel:"noopener noreferrer",href:S.url,children:S.name})}))},{icon:"fas fa-question-circle",title:"Support",key:"support"}],m||p.splice(1,1),p}},[c,o,l,n,m]),T=d.useCallback(()=>{for(var p=0;p<x.length;p++){const S=x[p];if(S.to&&location.pathname.startsWith(S.to))return S.key}},[x]),C=async()=>{if(!c)try{const p={limit:1e7,offset:0},S=await ce.get("/QuickLinks",{params:p});if(S.status===200){let I=S.data.results;e(Kc({quick_link_data:I}))}}catch(p){console.log(p)}},L=d.useCallback(C,[]);d.useEffect(()=>{L()},[L]);const w=async()=>{if(!c)try{const p=await ce.get("/UserQuickLinks");if(p.status===200){let S=p.data.results;e(Yc({quick_link_data:S}))}}catch(p){console.log(p)}},v=d.useCallback(w,[]);d.useEffect(()=>{v()},[v]);const D=d.useMemo(()=>x?.map(p=>{const S=p?.key?.toLowerCase()==="support";return{key:p?.key,"data-userflow-target":S?"help":void 0,icon:a.jsx(Js,{count:u?.count>99?"99+":u?.count,classNames:{indicator:`${p?.key?.toLowerCase()==="messenger"?"block":"hidden"} leading-5 rounded-full h-4 w-4 flex items-center -top-1 min-w-4 text-2.5`},children:a.jsx("span",{className:`${p.icon} sidebar-icon-span focus:text-primary w-4 h-4 focus:fill-white focus:font-semibold`})}
322),label:p?.key?.toLowerCase()==="support"||p?.key?.toLowerCase()==="quicklink"?a.jsx("button",{className:"text-gray-400 flex font-medium no-underline text-sm tracking-[0] leading-5 focus:text-white focus:font-semibold",children:a.jsx("span",{className:"ml-2.5 !p-0",children:p.title})}):a.jsx(Z,{to:{pathname:p.to,state:p?.state||null},className:"text-gray-400 flex font-medium no-underline text-sm tracking-[0] leading-5 focus:text-white focus:font-semibold",children:a.jsx("span",{className:"pl-2.5",children:p.title})}),className:`${p?.key?.toLowerCase()==="quicklink"?"pt-1":"pt-5"} ${S?"sidebar-support":""}`?.trim(),children:p.children,onTitleClick:({key:I})=>{I==="quicklink"&&t.collapsed&&t?.toggleMenu()}}}),[t,x,u?.count]),j=p=>{y(p)};return d.useEffect(()=>{t.collapsed?y([]):y(["quicklink"])},[t.collapsed]),a.jsxs(a.Fragment,{children:[a.jsx(ne,{theme:"dark",mode:"inline",openKeys:g,selectedKeys:[T(t?.location?.pathname)],items:D,rootClassName:"sidebar sidebar-menu h-full",triggerSubMenuAction:null,expandIcon:({isOpen:p})=>p?a.jsx(Mo,{}):a.jsx(Fo,{}),onOpenChange:j}),a.jsxs("div",{className:"flex w-full px-0 pb-2 text-white footer-links bottom-10 justify-evenly bg-slate-600",children:[a.jsx("span",{className:"cursor-pointer text-[rgba(255, 255, 255, 0.84)] text-[10px] font-medium tracking-[0] leading-3 underline hover:text-white focus:text-white",onClick:()=>{e(Ds({...{isVisible:!0,slug:"privacy-policy"}}))},children:"Privacy Policy"}),a.jsx("span",{className:"cursor-pointer text-[rgba(255, 255, 255, 0.84)] text-[10px] font-medium tracking-[0] leading-3 underline hover:text-white focus:text-white",onClick:()=>{e(Ds({...{isVisible:!0,slug:"terms-of-service"}}))},children:"Terms of Service"}),a.jsxs("span",{className:"text-[rgba(255, 255, 255, 0.84)] text-[10px] font-medium tracking-[0] leading-3 no-underline ",children:["©",h]})]})]})}const qr=Pt(Qc);qr.displayName="MainSidebar";const Xc=ke.memo(qr);function ed(t){try{const e=t.split(".")[1],s=JSON.parse(atob(e.replace(/-/g,"+").replace(/_/g,"/")));return typeof s.exp=="number"?s.exp:null}catch{return null}}const td=({children:t})=>{const e=de(),s=M(l=>l?.auth?.user),o=s?.zendesk_jwt,i=d.useRef(null),n=d.useRef(null);return d.useEffect(()=>{er()},[]),d.useEffect(()=>{if(n.current&&(clearTimeout(n.current),n.current=null),!s||!o){i.current&&(ht(),i.current=null);return}o!==i.current&&(wa(o),i.current=o);const l=ed(o);if(l){const c=l*1e3-Date.now(),m=6e4;c>m?n.current=setTimeout(()=>{e(Yt())},c-m):(c>0,e(Yt()))}},[s,o,e]),t},As=t=>Object.fromEntries(Object.entries(t).filter(([,e])=>e!=null&&e!=="")),ad=({children:t})=>{const e=M(c=>c.auth?.isLogin),s=M(c=>c.auth.user),o=d.useRef(null),i=d.useRef(!1),n=s?.organization_id||s?.organization||s?.company_id,l=[s?.first_name,s?.last_name].filter(Boolean).join(" ");return d.useEffect(()=>{if(!["uat","production"].includes("production")||!e||!s?.id)return;let c=!1;return(async()=>{try{const u=await K(()=>import("./userflow-BFhlPNBg.js"),[]);if(c)return;const _=u.default;o.current=_,i.current||(_.init("ct_us1_nussk3kbnraszfd2gtc5dzoija"),i.current=!0),await _.identify(s.id,As({name:s.display_name||l||void 0,first_name:s.first_name,last_name:s.last_name,email:s.email||s.primary_email_address,signed_up_at:s.date_joined,organization_id:n,timezone:s.timezone})),n&&await _.group(n,As({name:s.company_name||s.organization_user_belongs_to,organization_domain:s.organization_domain,organization_type:s.organization_type||s.company_org_type}))}catch(u){console.error("Failed to initialize Userflow:",u)}})(),()=>{c=!0}},[e,s,n,l]),d.useEffect(()=>{!e&&o.current&&i.current&&(o.current.reset(),i.current=!1)},[e]),d.useEffect(()=>()=>{o.current&&i.current&&(o.current.reset(),i.current=!1)},[]),t},sd=d.lazy(()=>K(()=>import("./index-CF-VrjPL.js"),__vite__mapDeps([20,1,2,21,22,23,24,25,3,26,27]))),rd=d.lazy(()=>K(()=>import("./index-iFLNUR8X.js").then(t=>t.v),__vite__mapDeps([28,1,2,29,4,24,21,10,30,23,25,3,26,27,31,32]))),od=d.lazy(()=>K(()=>import("./Tasks-Dc_OkBhf.js"),__vite__mapDeps([33,1,2,34,35,27,10]))),nd=d.lazy(()=>K(()=>import("./index-Cyi992r8.js"),__vite__mapDeps([36,1,2,37,4]))),id=d.lazy(()=>K(()=>import("./index-CHUDUlP0.js"),__vite__mapDeps([38,1,2,39]))),ld=d.lazy(()=>K(()=>import("./AdminSetting-yZq05bky.js").then(t=>t.A),__vite__mapDeps([40,1,2,9,30,41,42]))),cd=d.lazy(()=>K(()=>Promise.resolve().then(()=>Bc),void 0)),Os=d.lazy(()=>K(()=>import("./errorPage-CyoOG97g.js"),__vite__mapDeps([43,1,2]))),dd=d.lazy(()=>K(()=>Promise.resolve().then(()=>qi),void 0)),ud=d.lazy(()=>K(()=>import("./GlobalSearch-6Tp6aBod.js"),__vite__mapDeps([44,1,2]))),md=d.lazy(()=>K(()=>import("./ClaimScoreView-CcLkwFrJ.js"),__vite__mapDeps([45,1,2,21,31,26])
322)),hd=d.lazy(()=>K(()=>import("./BulkAccess-CzH25YN1.js"),__vite__mapDeps([46,1,2]))),fd=d.lazy(()=>K(()=>import("./index-Bh4iAJFg.js").then(t=>t.i),__vite__mapDeps([47,1,2,48,3,27,49,50,51,52]))),gd=[{exact:!0,path:"/global-claim",component:()=>a.jsx(sd,{})},{exact:!0,path:"/claim/:id/:tabkey/:subTab?/:searchPara?/:contactId?",component:()=>a.jsx(rd,{})},{exact:!0,path:"/global-task",component:()=>a.jsx(od,{})},{exact:!0,path:"/global-contact/:searchPara?",component:()=>a.jsx(nd,{})},{exact:!0,path:"/global-contact/organization/:orgId",component:()=>a.jsx(Ul,{})},{exact:!0,path:"/messenger/:chat_type?/:group_url?",component:()=>a.jsx(id,{})},{exact:!0,path:"/admin-setting/:officeId?",component:()=>a.jsx(ld,{})},{exact:!0,path:"/account-setting/:current_tab?",component:()=>a.jsx(cd,{})},{exact:!0,path:"/404",component:()=>a.jsx(Os,{})},{exact:!0,path:"/500",component:()=>a.jsx(Os,{internalServerError:!0})},{exact:!0,path:"/401",component:()=>a.jsx(dd,{})},{exact:!0,path:"/global-search",component:()=>a.jsx(ud,{})},{exact:!0,path:"/claim_score/:id",component:()=>a.jsx(md,{})},{exact:!0,path:"/bulk-access-contacts",component:()=>a.jsx(hd,{})},{exact:!0,path:"/events",component:()=>a.jsx(fd,{})}];function pd(t){const e=de(),[s,o]=d.useState(!0),[i]=d.useState(!1),{headerHeight:n}=M(u=>u.commonAppState),l=()=>{o(!s)};d.useEffect(()=>{const u=t?.location?.pathname.includes("claim_score")||t?.location?.pathname.includes("bulk-access-contacts")?0:90,_=document.querySelector("#main-header")?.clientHeight||u;e({type:"UPDATE_COMMON_STATE",payload:{headerHeight:_}})},[]);function c(u){d.useEffect(()=>{function _(g){u.current&&!u.current.contains(g.target)&&o(!0)}return document.addEventListener("mousedown",_),()=>{document.removeEventListener("mousedown",_)}},[u])}const m=d.useRef(null);return c(m),a.jsx(td,{children:a.jsx(Dl,{children:a.jsx(ad,{children:a.jsxs(tl,{children:[!(t?.location?.pathname.includes("claim_score")||t?.location?.pathname.includes("bulk-access-contacts"))&&a.jsxs(a.Fragment,{children:[a.jsx(el,{id:"main-header",className:"bg-white fixed top-0 w-full z-10 flex flex-col has-[claim-score]:hidden !p-0",children:a.jsx(Hr,{collapsedsidebar:s})}),a.jsx(al,{trigger:null,collapsed:s,collapsedWidth:70,width:250,className:`fixed h-full bg-slate-600 z-[10] ${s?"off-sidebar flex-[0_0_80px]":"on-sidebar flex-[0_0_260px]"} 323 `,headerHeight:n,children:a.jsxs("div",{style:{height:"calc(100% - 200px)"},ref:m,children:[a.jsxs("div",{className:`side-logos pt-12 pb-4 flex items-center px-4 cursor-pointer ${s?"justify-center":""}`,onClick:()=>{l()},children:[a.jsx("span",{className:"text-gray-600 font-medium text-right text-sm pl-[15px] ease-in-out collapse-bar",children:"Collapse  "}),a.jsx("span",{id:"right-arrow-menu",className:"ant-btn py-1.5 px-2.5",children:a.jsx("i",{className:"fas fa-arrow-right"})})]}),a.jsx(Xc,{dotFlag:i,collapsed:s,toggleMenu:l})]})})]}),a.jsx(sl,{headerHeight:n,className:`${t.location.pathname.includes("404")?"remove-top-space-404":"remove-top-space"} loader-full-width ${t?.location?.pathname.includes("claim_score")||t?.location?.pathname.includes("bulk-access-contacts")?"pl-0":"pl-[70px]"}`,children:a.jsx(d.Suspense,{className:"loader",fallback:a.jsx(Ne,{}),children:a.jsxs(Zs,{children:[gd.map((u,_)=>a.jsx(Nt,{exact:u.exact!==!1,path:`${u.path}`,component:u.component,...t},_)),a.jsx(Te,{from:"/",to:"/404"}),a.jsx(Te,{from:"/",to:"/401"})]})})})]})})})})}const xd=Pt(pd),_d=d.lazy(()=>K(()=>import("./StaticPage-C-0SLnqf.js"),__vite__mapDeps([53,1,2]))),yd=d.lazy(()=>K(()=>import("./AddMatterModel-BKHEPVsV.js"),__vite__mapDeps([54,1,2,55,24,22,11,12,27,56,10]))),Cd=d.lazy(()=>K(()=>import("./MatterSuccessModal-BatHuhXe.js"),__vite__mapDeps([57,1,2,29,22]))),Sd=d.lazy(()=>K(()=>import("./AddClaimModel-CEhiAclc.js"),__vite__mapDeps([58,1,2,24,55,22,11,12,27,56,10]))),bd=d.lazy(()=>K(()=>import("./ClaimSuccessModal-0G3N7H06.js"),__vite__mapDeps([59,1,2,29,22]))),Ls=d.lazy(()=>K(()=>import("./login-CVLArGX1.js"),__vite__mapDeps([60,1,2]))),Td=d.lazy(()=>K(()=>import("./2fa-D1317yYg.js"),__vite__mapDeps([61,1,2]))),wd=d.lazy(()=>K(()=>import("./Register-BJfrlhlE.js"),__vite__mapDeps([62,1,2,16,11,12]))),Ed=d.lazy(()=>K(()=>import("./LinkExpire-DavniP66.js"),__vite__mapDeps([63,1,2]))),Nd=d.lazy(()=>K(()=>import("./ResetPassword-_QLoKSed.js"),__vite__mapDeps([64,1,2]))),vd=d.lazy(()=>K(()=>import("./NewPassword-BWEMnJVd.js"),__vite__mapDeps([65,1,2,14]))),jd=d.lazy(()=>K(()=>import("./CheckEmail-BPMJO3DS.js"),__vite__mapDeps([66,1,2]))),kd=d.lazy(()=>K(()=>import("./sso-yDqG60wp.js"),__vite__mapDeps([67,1,2]))),Rs="originalParentDomain",Id=Uo({}),Dd=({returnTo:t})=>{const e=M(i=>i?.auth?.user),[s,o]=d.useState(!1);if(d.useEffect(()=>{(async()=>{try{const n=new J(!0,!0,!0);await Ko(e,t,n)}catch(n){console.error("Zendesk sync error:",n)}finally{o(!0)}})()},[e,t]),!s)return a.jsx(Ne,{});if(t&&Sr(t))return null;try{const i=new URL(t||"",window.location.origin);return a.jsx(Te,{to:{pathname:i.pathname,search:i.search}})}catch(i){return console.error("Invalid returnTo URL, redirecting to default route:",t,i),a.jsx(Te,{to:{pathname:"/global-claim"}})}};function Ad(){const t=Po(),e=d.useRef(new J(!0,!0,!0)),s=de(),{isNewVersion:o,reloadPage:i}=Zi(),n=He(),l=M(I=>I?.auth?.isLogin),c=M(I=>I?.auth?.user?.is_staff),m=M(I=>I?.auth?.user?.id),u=M(I=>I?.auth?.user?.first_name),_=M(I=>I?.auth?.user?.last_name),g=M(I=>I.auth?.hydratedFromCookie),y="09FA376F-D6CD-4364-8906-31E4840EA6BD",f=Qs(),h=new URLSearchParams(window.location.search),x=Object.fromEntries(h||{}),T=h.get("token"),C=window.location.pathname.includes("change-password"),L=!!h.get("return_to")||!!le
323("return_to"),[w,v]=d.useState(!!T&&!C&&l),D=le("is_org_updated"),j=M(I=>I.internetFlag&&I.internetFlag?.is_internet_on);Vi(w),d.useEffect(()=>{n&&!w&&Ki()},[w,n]),d.useEffect(()=>{l&&g&&n&&s(Qo())},[l,g,n,s]),d.useEffect(()=>{if(l&&n){const I=window.location.hostname;if(!n||va(I))return;tn(()=>{rr(t)}),an(t)}},[t,l,n]),d.useEffect(()=>{const I=async V=>{if(g)return;const b=await e.current?.getClaimIdByExposureId?.({exposure_id:V});if(b?.data?.claim_id){st("from_to_url");const E=`/claim/${b?.data?.claim_id}/overview`;window.location.pathname!==E&&window.location.replace(E)}},q=le("exposureId");if(x?.exposureId||q){const V=x?.exposureId||q;je("exposureId",V),V&&l&&I(V)}},[x?.exposureId,l,g]),d.useEffect(()=>{w&&T&&l&&(async()=>{try{const q=ka(T);q&&q!==n&&s(Yo(q))}catch(q){console.error(q)}finally{v(!1)}})()},[T,w,s,n,l]),d.useEffect(()=>{let I=le(Rs);if(!I){const q=document.referrer;q&&(I=new URL(q).hostname,je(Rs,I,{expires:15}))}},[]),d.useEffect(()=>{s(Bt({is_internet_on:window?.navigator?.onLine}))},[s]);const p=({component:I,isLoggedIn:q,...V})=>a.jsx(Nt,{...V,render:b=>{if(q&&c)return a.jsx(Te,{to:{pathname:"/bulk-access-contacts",state:{from:b.location}}});if(q&&!c){const k=new URLSearchParams(b.location.search).get("return_to"),U=k||le("return_to");if(!k&&U&&st("return_to"),U){try{const ee=new URL(U,window.location.origin).hostname.toLowerCase();if(f&&ee===f)return a.jsx(Dd,{returnTo:U})}catch(F){console.error("Invalid returnTo URL",U,F)}if(Sr(U))return null;try{const F=new URL(U,window.location.origin);return a.jsx(Te,{to:{pathname:F.pathname,search:F.search}})}catch{return a.jsx(Te,{to:{pathname:U}})}}const ae=le("from_to_url");return a.jsx(Te,{to:{pathname:ae||"/global-claim",state:{from:b.location}}})}else return!q&&b.location.pathname==="/"?a.jsx(Te,{to:{pathname:"/login",state:{from:b.location}}}):a.jsx(d.Suspense,{className:"loader",fallback:a.jsx(Ne,{}),children:a.jsx(I,{...b})})}}),S=({component:I,isLoggedIn:q,...V})=>a.jsx(Nt,{...V,render:b=>{if(c&&b.location.pathname==="/bulk-access-contacts")return a.jsx(d.Suspense,{className:"loader",fallback:a.jsx(Ne,{}),children:a.jsx(I,{...b})});if(!c)if(q)if(b.location.pathname==="/"){if(na("redirect_url")){const k=na("redirect_url");return Ho("redirect_url"),a.jsx(Te,{to:{pathname:k,state:{from:b.location}}})}const E=le("from_to_url");return a.jsx(Te,{to:{pathname:E||"/global-claim",state:{from:b.location}}})}else return a.jsxs(a.Fragment,{children:[m&&a.jsx(Bo,{appId:y,theme:"light",userId:m,nickname:`${u||""} ${_||""}`.trim(),useMessageGrouping:!0,children:a.jsx(I,{...b})}),b.location.pathname!=="/"&&a.jsx(d.Suspense,{className:"loader",fallback:a.jsx(Ne,{}),children:a.jsx(Sd,{...b})}),a.jsx(d.Suspense,{className:"loader",fallback:a.jsx(Ne,{}),children:a.jsx(Cd,{...b})}),a.jsx(d.Suspense,{className:"loader",fallback:a.jsx(Ne,{}),children:a.jsx(yd,{...b})}),a.jsx(d.Suspense,{className:"loader",fallback:a.jsx(Ne,{}),children:a.jsx(bd,{...b})})]});else return b.location.pathname==="/"?a.jsx(Te,{to:{pathname:"/",state:{from:b.location}}}):(b?.location?.pathname!=="/login"&&!b?.location?.key&&Ca("redirect_url",b?.location?.pathname),D?null:a.jsx(Te,{to:{pathname:"/login",state:{from:b.location}}}))}});return a.jsx("div",{className:"App",children:a.jsx(Hi,{children:a.jsxs(nl,{children:[a.jsx(Tr,{title:{title:"New update available"},okText:"Refresh Now",open:o&&!L,closable:!1,onOk:()=>i(),maskClosable:!1,destroyOnHidden:!0,cancelButtonProps:{className:"hidden"},children:a.jsx(_e.Text,{children:"Weâve made some improvements and added new features! Please refresh the page to get the latest version."})}),a.jsx(a.Fragment,{children:w?a.jsx(Ne,{}):j?a.jsxs(zo,{history:Id,basename:"",children:[a.jsx(Nt,{render:({location:I})=>a.jsxs(Zs,{location:I,children:[a.jsx(p,{isLoggedIn:l,path:"/",exact:!0,title:"Login",component:Ls}),a.jsx(p,{isLoggedIn:l,path:"/2fa-code",exact:!0,title:"2fa",component:Td}),a.jsx(p,{isLoggedIn:l,path:"/login/sso",exact:!0,title:"sso",component:kd}),a.jsx(p,{isLoggedIn:l,path:"/recover-account",exact:!0,title:"Recover Account",component:Nd}),a.jsx(p,{isLoggedIn:l,path:"/check-email",exact:!0,title:"CheckEmail",component:jd}),a.jsx(p,{isLoggedIn:l,path:"/change-password",exact:!0,title:"NewPassword",component:vd}),a.jsx(p,{isLoggedIn:l,path:"/401",exact:!0,title:"errorMessage",component:wr}),a.jsx(p,{isLoggedIn:l,path:"/login/:token?",exact:!0,title:"Login",component:Ls}),a.jsx(p,{isLoggedIn:l,path:"/user-registration",exact:!0,title:"Register",component:wd}),a.jsx(p,{isLoggedIn:l,path:"/link-expire",exact:!0,title:"Link Expire",component:Ed}),a.jsx(S,{path:"/",component:xd,isLoggedIn:l})]})}),a.jsx(d.Suspense,{className:"loader",fallback:a.jsx(Ne,{}),children:a.jsx(_d,{})})]}):a.jsx(Ji,{})})]})})})}const Od=(t,e)=>t.type==="error"&&t.error?.source==="source"&&t.error?.source_type==="browser"&&t.error?.message?.includes("ResizeObserver loop")&&e?.error instanceof Error;Ws.init({applicationId:"a6f341ab-f911-4321-b36c-7bc4ee39923f",clientToken:"pubb96bb6f5d4e4306ae2b6914ff5932dc0",site:"datadoghq.com",service:"prod-frontend",env:"production",sessionSampleRate:100,sessionReplaySampleRate:100,trackUserInteractions:!0,defaultPrivacyLevel:"mask-user-input",startSessionReplayRecordingManually:!0,beforeSend:(t,e)=>!Od(t,e)});Ws.startSessionReplayRecording();const Ld={fontFamily:"Montserrat",fontSize:14,components:{DatePicker:{colorBorder:"var(--secondary)",hoverBorderColor:"var(--primary)",activeBorderColor:"var(--primary)",activeShadow:"0 0 0 2px #1677ff",inputFontSize:14,colorText:"var(--textColor)",borderRadius:4,borderRadiusLG:4,controlHeight:32,controlHeightLG:40,colorBgContainer:"var(--bgColor)",paddingInline:12,fontSizeIcon:14,colorIcon:"var(--iconColor)"},Input:{colorBorder:"var(--secondary)",hoverBorderColor:"var(--primary)",activeBorderColor:"var(--primary)",activeShadow:"0 0 0 2px #1677ff",colorText:"var(--textColor)",borderRadius:4,borderRadiusLG:4,controlHeight:32,controlHeightLG:40,inputFontSize:14,inputFontSizeLG:14,colorBg
323Container:"var(--bgColor)",paddingInline:12,fontSizeIcon:14,colorIcon:"var(--iconColor)"},InputNumber:{colorBorder:"var(--secondary)",hoverBorderColor:"var(--primary)",activeBorderColor:"var(--primary)",activeShadow:"0 0 0 2px #1677ff",colorText:"var(--textColor)",borderRadius:4,borderRadiusLG:4,controlHeight:32,controlHeightLG:40,inputFontSize:14,inputFontSizeLG:14,colorBgContainer:"var(--bgColor)",paddingInline:12,fontSizeIcon:14,colorIcon:"var(--iconColor)"},Select:{activeOutlineColor:"var(--primary)",colorBgElevated:"var(--primary)",colorBorder:"var(--secondary)",hoverBorderColor:"var(--primary)",activeBorderColor:"var(--primary)",inputFontSize:14,colorText:"var(--textColor)",borderRadius:4,borderRadiusLG:4,controlHeight:32,controlHeightLG:40,colorBgContainer:"var(--bgColor)",paddingInline:12,fontSizeIcon:14,colorIcon:"var(--iconColor)",optionPadding:"0 11px"},Textarea:{controlHeight:100,colorBgContainer:"var(--bgColor)",colorBorder:"var(--secondary)",hoverBorderColor:"var(--primary)",activeBorderColor:"var(--primary)"},Button:{defaultHoverColor:"var(--primary)",defaultHoverBorderColor:"var(--primary)"},Menu:{darkItemColor:"var(--color-gray)",darkItemHoverBg:"transparent",darkItemHoverColor:"var(--primary)",darkItemSelectedColor:"var(--primary)",itemActiveBg:"var(--primary)",darkItemBg:"var(--slate-700)",darkSubMenuItemBg:"var(--slate-700)",siderBg:"var(--slate-700)"},Table:{cellFontSize:14,cellPaddingBlock:15,footerColor:"var(--color-white)"},Pagination:{itemBg:"transparent",itemActiveBg:"transparent"},Radio:{dotSize:10},Drawer:{}},token:{fontFamily:"Montserrat",colorPrimary:"#5463d2",colorBgTextHover:"transparent"},hashed:!1},Rd=We();console.log=()=>{};$o.createRoot(document.getElementById("root")).render(a.jsx(Go,{store:Rd,children:a.jsx(Vo,{theme:Ld,children:a.jsx(Ad,{})})}));export{Gu as $,J as A,Zu as B,Br as C,ll as D,Wu as E,wm as F,Em as G,bs as H,Yu as I,_t as J,qu as K,Ku as L,Xu as M,Al as N,Aa as O,ga as P,Fr as Q,Nl as R,Ds as S,$e as T,Bl as U,ha as V,Tu as W,Da as X,rt as Y,il as Z,Cr as _,Qe as a,Yc as a$,$u as a0,Ir as a1,sc as a2,$t as a3,bm as a4,Eu as a5,Nu as a6,vu as a7,gs as a8,wu as a9,Fe as aA,gu as aB,mu as aC,js as aD,vr as aE,ym as aF,nu as aG,iu as aH,lu as aI,am as aJ,dl as aK,Zd as aL,Wd as aM,Kd as aN,Hd as aO,qd as aP,Jd as aQ,Xd as aR,Qd as aS,zt as aT,Ta as aU,Bu as aV,wc as aW,ys as aX,em as aY,We as aZ,ht as a_,ja as aa,ma as ab,Pi as ac,Pl as ad,Pe as ae,gc as af,Lt as ag,Vu as ah,Fl as ai,Ll as aj,Ne as ak,yl as al,zl as am,Tr as an,_m as ao,Ke as ap,cu as aq,du as ar,uu as as,fu as at,Qu as au,om as av,Ti as aw,xl as ax,xm as ay,Cm as az,$r as b,Ru as b0,Mu as b1,Fu as b2,Uu as b3,Pu as b4,zu as b5,he as b6,Or as b7,ws as b8,Tt as b9,Lu as bA,jr as bB,Kc as bC,_s as bD,hu as bE,Oa as bF,zr as bG,La as bH,Pr as bI,xc as bJ,Nm as bK,Sm as bL,Lr as bM,sm as bN,Hl as bO,Zl as bP,Tm as bQ,ku as bR,Du as bS,Iu as bT,im as bU,lm as bV,pm as bW,vm as bX,jm as bY,Kl as ba,cl as bb,nm as bc,pu as bd,_u as be,gm as bf,hm as bg,fm as bh,mm as bi,cm as bj,tu as bk,ps as bl,eu as bm,au as bn,Ud as bo,dm as bp,Pd as bq,zd as br,Bd as bs,Ol as bt,su as bu,um as bv,ru as bw,ou as bx,tm as by,Hu as bz,ce as c,Gt as d,Ju as e,ia as f,rm as g,je as h,ka as i,Fd as j,Ca as k,Ia as l,le as m,Ea as n,tt as o,lc as p,uc as q,Ma as r,rc as s,Ko as t,yt as u,st as v,Sr as w,na as x,Ho as y,Mi as 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.