1"use strict";(globalThis.webpackChunk_archive_intel_client_ui||=[]).push([[8490],{27756(e,s,t){t(50016);const n=t.p+"static/media/slack.f72dc2ba3ed352b7d5d1b99dcd038f80.svg";t.d(s,["A",0,n])},57527(e,s,t){var n=t(45361),a=t(12213),r=t(90686);const i="ftpserver.archiveintel.com",l="https://adminapi.archiveintel.com/admin/",o={beforeLoginAPI:function(e){return new Promise((s,t)=>{var r=new URLSearchParams;for(let n in e.body)r.append(n,e.body[n]);n.A.post(`${l}${e.action}`,e.isFormData?r:e.body,{headers:{"Content-Type":"application/json"}}).then(e=>{s(e.data)}).catch(s=>{if(e.isShowError)t(this.errorHandler(s));else{var n,r,i,l;if(null!==s&&void 0!==s&&null!==(n=s.response)&&void 0!==n&&null!==(r=n.data)&&void 0!==r&&r.message)a.oR.error(null===s||void 0===s||null===(i=s.response)||void 0===i||null===(l=i.data)||void 0===l?void 0:l.message);t(s)}})})},beforeLoginPutAPI:function(e){return new Promise((s,t)=>{var r=new URLSearchParams;for(let n in e.body)r.append(n,e.body[n]);n.A.put(`${l}${e.action}`,e.isFormData?r:e.body,{headers:{"Content-Type":"application/json"}}).then(e=>{s(e.data)}).catch(s=>{e.isShowError?t(this.errorHandler(s)):(a.oR.error("Invalid details"),t(s))})})},beforeLoginGetAPI:function(e){return new Promise((s,t)=>{const r=new URLSearchParams;for(let n in e.body)r.append(n,e.body[n]);const i=`${l}${e.action}${r.toString()}`;n.A.get(i,{headers:{"Content-Type":"application/json"}}).then(e=>{s(e.data)}).catch(s=>{e.isShowError?t(this.errorHandler(s)):(a.oR.error("Invalid details"),t(s))})})},postAPI:function(e){return new Promise((s,t)=>{var a=new URLSearchParams;for(let n in e.body)a.append(n,e.body[n]);const r={Authorization:"Bearer "+e.access_token,"X-tenant-id":e.t_id,"Content-Type":"application/json"};n.A.post(`${l}${e.action}`,e.isFormData?a:e.body,{headers:r}).then(e=>{s(e.data)}).catch(s=>{e.isShowError?t(this.errorHandler(s)):t(s)})})},getAPI:function(e){return new Promise((s,t)=>{const a={"Content-Type":"application/x-www-form-urlencoded",Authorization:"Bearer "+e.access_token};null!==e.t_id&&void 0!==e.t_id&&""!==e.t_id&&"undefined"!==e.t_id&&(a["X-tenant-id"]=e.t_id),n.A.get(`${l}${e.action}`,{headers:a}).then(e=>{s(e.data)}).catch(s=>{e.isShowError?t(this.errorHandler(s)):t(s)})})},putAPI:function(e){return new Promise((s,t)=>{let a=new URLSearchParams;for(let n in e.body)a.append(n,e.body[n]);const r={"Content-Type":"application/json",Authorization:"Bearer "+e.access_token,"X-tenant-id":e.t_id};var i={headers:r};e.signal&&(i={headers:r,signal:e.signal}),n.A.put(`${l}${e.action}`,e.body,i).then(e=>{s(e.data)}).catch(s=>{s&&s.response&&401===s.response.status&&this.logout(),e.isShowError?t(this.errorHandler(s)):t(s)})})},deleteAPI:function(e){return new Promise((s,t)=>{const a={"Content-Type":"application/x-www-form-urlencoded",Authorization:"Bearer "+e.access_token,"X-tenant-id":e.t_id};n.A.delete(`${l}${e.action}`,{headers:a}).then(e=>{s(e.data)}).catch(s=>{e.isShowError?t(this.errorHandler(s)):t(s)})})},uploadAPI:function(e){let s=new FormData;return e._file&&e.key&&s.append(e.key,e._file),new Promise((t,a)=>{for(let n in e.body)s.append(n,e.body[n]);const r={Authorization:"Bearer "+e.access_token,"X-tenant-id":e.t_id};n.A.post(`${l}${e.action}`,s,{headers:r}).then(e=>{t(e.data)}).catch(s=>{e.isShowError?a(this.errorHandler(s)):a(s)})})},multiUploadAPI:function(e){let s=new FormData;return Array.isArray(e._fileArray)&&e.key?e._fileArray.forEach((t,n)=>{s.append(`${e.key}`,t)}):e._file&&e.key&&s.append(e.key,e._file),new Promise((t,a)=>{for(let n in e.body)s.append(n,e.body[n]);const r={Authorization:"Bearer "+e.access_token,"X-tenant-id":e.t_id};n.A.post(`${l}${e.action}`,s,{headers:r}).then(e=>{t(e.data)}).catch(s=>{e.isShowError?a(this.errorHandler(s)):a(s)})})},errorHandler:function(e){var s,t;return null!==(s=e)&&void 0!==s&&s.response&&(e=e.response),e&&e.status?401===e.status?(t="Unauthorized",this.logout()):t=404===e.status?"Server Not Responding":500===e.status?e&&e.data&&e.data.ErrorDetails&&e.data.ErrorDetails.message||"A server error occurred. Please contact customer support.":e.data.message:t="Server Not Responding",a.oR.error(t),t},addLoader(e,s){if(e){var t=document.getElementById(e);if(t){t.disabled=!0;var n=document.createElement("span");n.innerHTML='<span style="margin-right:5px" class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span><span className="visually-hidden"></span>',t.prepend(n)}}},removeLoader(e){if(e){var s=document.getElementById(e);null!=s&&(s.disabled=!1,s.removeChild(s.childNodes[0]))}},logout(){localStorage.clear(),window.location.href="/login"},ftpPostAPI:function(e){return new Promise((s,t)=>{var a=new URLSearchParams;for(let n in e.body)a.append(n,e.body[n]);n.A.post(`${i}${e.action}`,e.isFormData?a:e.body,{headers:{"X-Requested-With":"XmlHttpRequest",Accept:"application/json, text/plain, */*"},withCredentials:!0}).then(e=>{s(e.headers["set-cookie"])}).catch(s=>{e.isShowError?t(this.errorHandler(s)):t(s)})})},ftpUploadAPI:function(e){let s=new FormData;
1return e._file&&e.key&&s.append(e.key,e._file),new Promise((t,a)=>{for(let n in e.body)s.append(n,e.body[n]);const l={withCredentials:!0,onUploadProgress:s=>{e.dispatch((0,r.qG)((100*s.progress).toFixed(2)))}};n.A.post(`${i}${e.action}`,e._file,l).then(e=>{t(e.data)}).catch(s=>{e.isShowError?a(this.errorHandler(s)):a(s)})})}};t.d(s,["A",0,o])},98092(e,s,t){t.d(s,{A:()=>h});var n=t(50016);var a=t(3787),r=t(71521),i=t(75248),l=t(74161),o=t.n(l);const c=function(e,s){let t=(0,n.useRef)(s);return(0,n.useEffect)(()=>{let s=s=>{t&&t.current&&!function(e,s){var t=s.parentNode;for(;null!=t;){if(e.id&&t.id==e.id)return!0;t=t.parentNode}return!1}(t.current,s.target)&&e(t.current.id)};return document.addEventListener("mousedown",s),()=>{document.removeEventListener("mousedown",s)}}),t};var d=t(79886),m=t.n(d),u=(t(54178),t(90076));const h=e=>{const[s,t]=(0,n.useState)(!1),l=(0,n.useRef)(!1),[d,h]=(0,n.useState)("MM-DD-yyyy");let x=c(()=>{t(!1)},void 0);(0,n.useEffect)(()=>{e.displayFormat&&h(e.displayFormat)},[e.displayFormat]);return(0,u.jsx)("div",{id:"pickerDiv",ref:x,children:(0,u.jsxs)(r.A,{onClick:()=>{l.current?l.current=!1:t(!0)},className:"ab"===e.addMb?" mClass":"mb-3 mClass",children:[(0,u.jsx)(i.A.Control,{"aria-describedby":"basic-addon2",value:o()(e.date).format(d),onChange:()=>{}}),(0,u.jsx)(r.A.Text,{id:"basic-addon2",className:"mClass",children:(0,u.jsx)(a.wBy,{size:18,className:"icon"})}),s?(0,u.jsx)("div",{className:"posClass "+(e.isShowTop?"showTop":"")+(null!==e&&void 0!==e&&e.isInChatBot?" align-center":""),children:(0,u.jsx)(m(),{selected:e.date,onChange:s=>{return n=s,l.current=!0,e.selectDate(n),void t(!1);var n},showTimeSelect:e.showTime,timeIntervals:5,inline:!0,showMonthDropdown:!0,showYearDropdown:!0,dropdownMode:"select",minDate:e.minDate,maxDate:e.maxDate,filterTime:e=>{const s=new Date,t=new Date(e);return s.getTime()<t.getTime()}})}):""]})})}},71145(e,s,t){var n=t(62668),a=t(92658),r=t(96997),i=t(26545),l=t(72100),o=t(9431),c=t(14411),d=t(8308),m=t(51746),u=t(7412),h=t(63168),x=t(50016),p=t(90076);const b=()=>{const e=(0,o.d4)(e=>{var s;return null!==(s=e.pI.profileImage)&&void 0!==s?s:l}),s=(0,o.d4)(e=>e.uN.name),t=(0,o.d4)(e=>e.uE.email),[b,j]=(0,x.useState)(!0);return(0,p.jsx)(p.Fragment,{children:(0,p.jsx)("header",{className:"site-header",children:(0,p.jsx)(n.A,{fluid:!0,className:"header-nav",children:(0,p.jsxs)(r.A,{expand:"lg",children:[(0,p.jsx)(r.A.Brand,{className:"me-5",children:(0,p.jsx)("img",{src:i,width:200,alt:""})}),(0,p.jsx)(r.A.Toggle,{"aria-controls":"basic-navbar-nav"}),(0,p.jsx)("div",{className:"d-flex align-items-center ms-auto gap-3",children:(0,p.jsxs)(a.A,{className:"profile-dd",children:[(0,p.jsxs)(a.A.Toggle,{children:[(0,p.jsxs)("div",{className:"d-flex gap-2",children:[(0,p.jsx)("div",{children:(0,p.jsx)("img",{src:b?h:e,onLoad:()=>j(!1),width:35,height:35,className:" rounded-circle object-fit-cover",alt:"",onError:e=>{j(!1),e.target.src=l,e.target.className="w-100 object-fit-cover border"}})}),(0,p.jsxs)("div",{children:[(0,p.jsx)("p",{className:"font-14 mb-0 text-dark font-medium",children:s}),(0,p.jsx)("p",{className:"font-12 mb-0 text-secondary",children:t})]})]}),(0,p.jsx)(c.GoChevronDown,{size:16,className:"icon"})]}),(0,p.jsx)(a.A.Menu,{align:"end",children:(0,p.jsxs)(d.N_,{to:"/login",className:" dropdown-item",onClick:()=>{m.A.logout()},children:[(0,p.jsx)(u.URL,{size:14,className:"me-2"})," Logout"]})})]})})]})})})})};t.d(s,["A",0,b])},4295(e,s,t){t.d(s,{A:()=>o});var n=t(8308),a=t(12606);t(50016);const r=t.p+"static/media/icon-dashboard.e3754379f8204cdfa92e55d9a9fc88cf.svg";var i=t(18981),l=t(90076);const o=()=>(0,l.jsx)(l.Fragment,{children:(0,l.jsx)("div",{id:"vertical_menu",className:"verticle-menu-compliance px-2",children:(0,l.jsxs)("div",{className:"menu-list",children:[(0,l.jsxs)(n.N_,{id:"t-1",to:"/compliance-overview",className:"menu-item",children:[" ",(0,l.jsx)("img",{src:r,alt:"icon",className:"menu-icon"})," ",(0,l.jsx)("span",{className:"nav-text",children:"Overview"})]}),(0,l.jsxs)(n.N_,{id:"t-1",to:"/compliance-client",className:"menu-item",children:[" ",(0,l.jsx)("img",{src:a.A,alt:"icon",className:"menu-icon"})," ",(0,l.jsx)("span",{className:"nav-text",children:"Manage Clients"})]}),(0,l.jsxs)(n.N_,{id:"t-1",to:"/compliance-connector-report",className:"menu-item",children:[" ",(0,l.jsx)("img",{src:i.A,alt:"icon",className:"menu-icon"})," ",(0,l.jsx)("span",{className:"nav-text",children:"Connector Report"})]})]})})})},92223(e,s,t){t.r(s),t.d(s,{default:()=>Ie});var n=t.cw(function(e,s){const n=t.p+"static/media/sample.66ed74a63a672261af93.csv";e.exports=n}),a=t(50016),r=t(13161),i=t(9876),l=t(40763),o=t(40013),c=t(63942),d=t(24944),m=t(86295),u=t(35935),h=t(90076);const x=e=>{var s;const[t,n]=(0,a.useState)(""),[r,i]=(0,a.useState)(null),[c,d]=(0,a.useState)([]),[x,p]=(0,a.useState)([]),{t:b}=(0,m.B)(),{register:j,setValue:v,watch:f}=(0,u.mN)(),g=f();return(0,a.useEffect)(()=>{var s;(g.on_demand_encryption=!1,v("on_demand_encryption",!1),g.importer=!1,g.unified_achiever=!1,v("unified_achiever",!1),g.new_review_system=!1,v("new_review_system",!1),g.voice_calls=!1,v("voice_calls",!1),e.client&&null!==e.client)&&(n("/manage-clients/add-client/"+e.client.id),i(e.client),(null===(s=e.client.domains)||void 0===s?void 0:s.length)>0&&p(e.client.domains),g.on_demand_encryption=e.client.on_demand_encryption,v("on_demand_encryption",e.client.on_demand_encryption),g.importer=e.client.importer,v("importer",e.client.importer),g.unified_achiever=e.client.unified_achiever,v("unified_achiever",e.client.unified_achiever),g.new_review_system=e.client.new_review_system,v("new_review_system",e.client.new_review_system),g.voice_calls=e.client.voice_calls,v("voice_calls",e.client.voice_calls))},[e.client]),(0,a.useEffect)(()=>{!e.clientInfo||null===e.clientInfo&&void 0===e.clientInfo||d(e.clientInfo.user_integrations)},[e.clientInfo]),(0,h.jsx)(h.Fragment,{children:e.client?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(l.A,{children:(0,h.jsx)(o.A,{children:(0,h.jsx)("div",{className:"d-flex justify-content-between align-items-center mb-0",children:(0,h.jsx)("h4",{className:"font-bold font-20 mb-3",children:r?r.name:""})})})}),(0,h.jsx)(l.A,{children:(0,h.jsxs)(o.A,{children:[" ",(0,h.jsx)("div",{className:"d-flex justify-content-between align-items-center mb-4",children:(0,h.jsx)("h4",{className:"font-bold font-16 mb-3",children:r?r.email:""})})]})}),(0,h.jsxs)(l.A,{children:[(0,h.jsxs)(o.A,{className:"mb-2",lg:3,children:[(0,h.jsx)("label",{className:"mb-1",children:"Tenant ID"}),(0,h.jsx)("div",{className:" text-secondary font-14 mb-4",children:r?r.unique_id:""}),(0,h.jsx)("label",{className:"mb-1",children:"Compliance Officer"}),(0,h.jsx)("div",{className:" text-secondary font-14 mb-4",children:"------------------"})]}),(0,h.jsxs)(o.A,{className:"mb-2",lg:3,children:[(0,h.jsx)("label",{className:"mb-1",children:"DB Node"}),(0,h.jsx)("div",{className:" text-secondary font-14",children:r?r.db_note:""})]}),(0,h.jsxs)(o.A,{className:"mb-2",lg:3,children:[(0,h.jsx)("label",{className:"mb-1",children:"Inbound Archiv
1ing"}),(0,h.jsx)("div",{className:" text-secondary font-14 mb-4",children:r?r.inbound_archiving:""}),(0,h.jsx)("label",{className:"mb-1",children:"Outbound Archiving"}),(0,h.jsx)("div",{className:" text-secondary font-14 mb-4",children:r?r.outbound_archiving:""})]}),(0,h.jsx)(o.A,{lg:3})]}),(0,h.jsxs)(l.A,{children:[null!==r&&void 0!==r&&r.emailSystem?(0,h.jsxs)(o.A,{className:"mb-4",lg:3,children:[(0,h.jsx)("label",{className:"mb-1",children:"Email Service Provider"}),(0,h.jsx)("div",{className:"text-secondary font-14 mb-4",children:r?"GSUITE"===r.emailSystem?"G-Suite":"MICROSOFT"===r.emailSystem?"Microsoft":r.emailSystem:""})]}):"",(0,h.jsxs)(o.A,{className:"mb-4",lg:3,children:[(0,h.jsx)("label",{className:"mb-1",children:"Database Utilization"}),(0,h.jsxs)("div",{className:"text-secondary font-14 mb-4",children:[null!==r&&void 0!==r&&r.dbSize?null===r||void 0===r?void 0:r.dbSize:0," GB"]})]}),(0,h.jsxs)(o.A,{className:"mb-4",lg:3,children:[(0,h.jsx)("label",{className:"mb-1",children:"S3 Utilization "}),(0,h.jsxs)("div",{className:"text-secondary font-14 mb-4",children:[null!==r&&void 0!==r&&r.s3Size?null===r||void 0===r?void 0:r.s3Size:0," GB"]})]})]}),(0,h.jsx)(l.A,{children:(0,h.jsxs)(o.A,{className:"mb-4",lg:3,children:[(0,h.jsx)("label",{className:"mb-1",children:"AI Model"}),(0,h.jsx)("div",{className:"text-secondary font-14 mb-4",children:null===r||void 0===r||null===(s=r.ai_model)||void 0===s?void 0:s.aiModelName})]})})]}):""})},p=e=>{var s,t,n,r,i,c,d,u,x,p;const{t:b}=(0,m.B)(),[j,v]=(0,a.useState)("");return(0,a.useEffect)(()=>{e.client&&v("/manage-clients/add-client/"+e.client.id)},[e.client]),(0,h.jsx)(h.Fragment,{children:(0,h.jsxs)(l.A,{className:"",children:[(0,h.jsxs)(o.A,{className:"mb-4",children:[(0,h.jsx)("label",{className:"mb-1",children:"Address 1"}),(0,h.jsx)("div",{className:" text-secondary font-14",children:null===(s=e.client)||void 0===s?void 0:s.billing_address_1})]}),(0,h.jsxs)(o.A,{className:"mb-4",children:[(0,h.jsx)("label",{className:"mb-1",children:"Address 2"}),(0,h.jsx)("div",{className:" text-secondary font-14",children:null===(t=e.client)||void 0===t?void 0:t.billing_address_2})]}),(0,h.jsxs)(o.A,{className:"mb-4",children:[(0,h.jsx)("label",{className:"mb-1",children:"Zip Code"}),(0,h.jsx)("div",{className:" text-secondary font-14",children:null===(n=e.client)||void 0===n||null===(r=n.city)||void 0===r?void 0:r.zipCode})]}),(0,h.jsxs)(o.A,{className:"mb-4",children:[(0,h.jsx)("label",{className:"mb-1",children:"City"}),(0,h.jsx)("div",{className:" text-secondary font-14",children:null===(i=e.client)||void 0===i||null===(c=i.city)||void 0===c?void 0:c.cityName})]}),(0,h.jsxs)(o.A,{className:"mb-4",children:[(0,h.jsx)("label",{className:"mb-1",children:"State"}),(0,h.jsx)("div",{className:" text-secondary font-14",children:null===(d=e.client)||void 0===d||null===(u=d.state)||void 0===u?void 0:u.stateName})]}),(0,h.jsxs)(o.A,{className:"mb-4",children:[(0,h.jsx)("label",{className:"mb-1",children:"Country"}),(0,h.jsx)("div",{className:" text-secondary font-14",children:null===(x=e.client)||void 0===x||null===(p=x.country)||void 0===p?void 0:p.countryName})]})]})})};var b=t(75248),j=t(66628),v=t(57527),f=t(12213),g=t(26498),A=t(9431);const _=e=>{const s=(0,A.d4)(e=>e.aT.aT),{t:t}=((0,A.wA)(),(0,m.B)()),[n,r]=(0,a.useState)([]),[i,c]=(0,a.useState)([]),[d,x]=(0,a.useState)(!1),[p,_]=(0,a.useState)([]),{register:S,handleSubmit:N,setValue:y,watch:w,clearErrors:C}=(0,u.mN)();let E=w();const[I,O]=(0,a.useState)(null);(0,a.useEffect)(()=>{if(e.clientInfo){if(O(e.clientInfo),E.on_demand_encryption=e.clientInfo.on_demand_encryption,y("on_demand_encryption",e.clientInfo.on_demand_encryption),E.importer=e.clientInfo.importer,y("importer",e.clientInfo.importer),E.unified_achiever=e.clientInfo.unified_achiever,y("unified_achiever",e.clientInfo.unified_achiever),E.new_review_system=e.clientInfo.new_review_system,y("new_review_system",e.clientInfo.new_review_system),E.voice_calls=e.clientInfo.voice_calls,y("voice_calls",e.clientInfo.voice_calls),E.chatbotEnabled=e.clientInfo.chatbotEnabled,y("chatbotEnabled",e.clientInfo.chatbotEnabled),e.clientInfo.domains&&null!=e.clientInfo.domains){let s=[];
1e.clientInfo.domains.forEach(e=>{s.push({label:e,value:e})}),E.domains=s,c(s),y("domains",i)}e.clientInfo.user_integrations.length>0&&(_(e.clientInfo.user_integrations),e.clientInfo.user_integrations.forEach(e=>{if("ON"===e.integrationStatus){let s={id:e.id};n.push(s)}}))}},[e.clientInfo]);const P=(e,s)=>{"on_demand_encryption"===s?(E.on_demand_encryption=e,y("on_demand_encryption",e)):"importer"===s?(E.importer=e,y("importer",e)):"unified_achiever"===s?(E.unified_achiever=e,y("unified_achiever",e)):"new_review_system"===s?(E.new_review_system=e,y("new_review_system",e)):"voice_calls"===s?(E.voice_calls=e,y("voice_calls",e)):"chatbotEnabled"===s&&(E.chatbotEnabled=e,y("chatbotEnabled",e))},M=(e,s)=>{(e=>{if(T(e)){let s=[...n];s=s.filter(s=>s.id!==e),r(s)}else{let s={id:e};r([...n,s])}})(s);let t=p.map(t=>t.id===s?{...t,integrationStatus:e}:t);_(t)},T=e=>n.some(s=>s.id===e);return(0,h.jsx)(h.Fragment,{children:e.client?(0,h.jsx)(h.Fragment,{children:(0,h.jsx)(b.A,{className:"form-style normal",name:"Verify",id:"Verify",onSubmit:N(()=>{let t=[];return i.forEach(e=>{t.push(e.label)}),E.domains=t,E.id=e.clientInfo.id,E.user_integrations=n,v.A.addLoader("save"),v.A.putAPI({action:"client/info",body:E,isShowError:!0,access_token:s}).then(s=>{f.oR.success(s.message),e.sendData("updated",E),v.A.removeLoader("save"),r([])}).catch(e=>(f.oR.error(e.message),v.A.removeLoader("save"),e))},()=>{}),children:(0,h.jsxs)(l.A,{className:"mb-3",children:[(0,h.jsxs)(o.A,{lg:6,children:[(0,h.jsx)("h4",{className:"font-18 mb-3",children:"Integrations"}),(0,h.jsx)(l.A,{className:" row-cols-md-2 row-cols-lg-0",children:p.length>0&&p.map(e=>(0,h.jsx)(o.A,{children:(0,h.jsxs)("div",{className:"p-2 rounded border d-flex gap-2 mb-3",children:[(0,h.jsx)(b.A.Check,{disabled:!0,type:"switch",id:e.id,checked:"ON"===e.integrationStatus,className:"labe-text-dark checkbox-success",onChange:()=>{"ON"===e.integrationStatus?M("OFF",e.id):M("ON",e.id)}}),(0,h.jsx)("label",{className:"font-14",children:"SMS"===e.codeName?"Android SMS":"IMESSAGE"===e.codeName?"iMessage":"MY_REPCHAT"===e.codeName?"MyRepChat":"TEAMS"===e.codeName?"Teams Chat":"WHATSAPP"===e.codeName?"WhatsApp":"YOUTUBE"===e.codeName?"YouTube":"ZOOM_SMS"===e.codeName?"Zoom SMS":"ZOOM_CHAT"===e.codeName?"Zoom Chat":j.A.removeUnderScore(e.codeName)})]})}))})]}),(0,h.jsxs)(o.A,{lg:12,className:"mb-4",children:[(0,h.jsx)("label",{className:"mb-1",children:"Enabled Features"}),(0,h.jsxs)("div",{className:"d-flex gap-3",children:[(0,h.jsx)(b.A.Check,{...S("on_demand_encryption"),type:"checkbox",disabled:!0,id:"On-Demand",label:"Email Encryption",checked:!0===E.on_demand_encryption,onChange:()=>{P(!E.on_demand_encryption,"on_demand_encryption")}}),(0,h.jsx)(b.A.Check,{...S("voice_calls"),type:"checkbox",disabled:!0,id:"voice_calls",label:"Vault",checked:!0===E.voice_calls,onChange:()=>{P(!E.voice_calls,"voice_calls")}}),(0,h.jsx)(b.A.Check,{...S("chatbotEnabled"),type:"checkbox",disabled:!0,id:"chatbotEnabled",label:"AI Compliance Bot",checked:!0===E.chatbotEnabled,onChange:()=>{P(!E.chatbotEnabled,"chatbotEnabled")}})]})]})]})})}):(0,h.jsx)(g.default,{})})};var S=t(71521),N=t(76211),y=t(84351),w=t(75284),C=t(72678),E=t(76859),I=t(96617),O=t(80474),P=t(59693);const M=e=>{const s=(0,A.d4)(e=>e.aT.aT),[t,r]=(0,a.useState)(),[i,c]=(0,a.useState)(""),[d,m]=(0,a.useState)(!1),[x,p]=(0,a.useState)(!1),{register:j,handleSubmit:g,formState:{errors:_}}=(0,u.mN)();return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(y.A.Header,{closeButton:!0,children:(0,h.jsx)(y.A.Title,{children:"Import Users"})}),(0,h.jsx)(y.A.Body,{children:(0,h.jsxs)(b.A,{className:"form-style",onSubmit:g(()=>{if(!t)return m(!0),void c("Please select CSV file");if(t&&"text/csv"!==t.type)return m(!0),void c("Please select valid CSV file only");m(!1),c("");let n={create_email:x};return v.A.addLoader("import_btn"),v.A.uploadAPI({action:"import-users/"+e.clientID,body:n,_file:t,key:"file",access_token:s}).then(s=>{f.oR.success(s.message),e.parentCallback(!1),v.A.removeLoader("import_btn")}).catch(s=>{var t,n,a,r;null!==s&&void 0!==s&&null!==(t=s.response)&&void 0!==t&&null!==(n=t.data)&&void 0!==n&&n.message&&f.oR.error(null===s||void 0===s||null===(a=s.response)||void 0===a||null===(r=a.data)||void 0===r?void 0:r.message);return v.A.removeLoader("import_btn"),e.parentCallback(!1),[]})}),children:[(0,h.jsxs)("div",{className:"upload-btn-container mb-2",children:[(0,h.jsxs)("label",{htmlFor:"fileImport",children:[(0,h.jsx)(C.PiUploadSimple,{size:18,className:"me-3"}),t?null===t||void 0===t?void 0:t.name:"Upload File"]}),(0,h.jsx)("input",{...j("fileImport",{required:!0}
1),type:"file",id:"fileImport",accept:" ",onChange:e=>{e.target.files&&r(e.target.files[0])}})]}),(0,h.jsxs)(l.A,{children:[(0,h.jsxs)(o.A,{className:"font-12 text-secondary mb-3",children:["*You can upload CSV files of Users",d?(0,h.jsx)(I.J,{title:i,modeError:!0}):(0,h.jsx)(h.Fragment,{children:_.fileImport&&(0,h.jsx)(I.J,{title:"Please select file",modeError:!0})})]}),(0,h.jsx)(o.A,{className:"item-align-end font-12",style:{textAlign:"end"},children:(0,h.jsx)("a",{href:n(),download:"users-sample.csv",target:"_blank",rel:"noreferrer",children:"Download sample"})})]}),(0,h.jsx)(l.A,{className:"mb-3",children:(0,h.jsx)(o.A,{children:(0,h.jsx)(b.A.Check,{type:"checkbox",id:"createEmailConnector",label:(0,h.jsxs)(h.Fragment,{children:["Configure Auto Email Connector ",(0,h.jsx)(O.t,{st:(0,h.jsx)("span",{children:(0,h.jsx)(P.Q9E,{})}),message:"If you select this checkbox, an email connector will automatically be created for all users you import.",position:"top",id:"info-icon-tooltip"})]}),onChange:()=>{p(e=>!e)}})})}),(0,h.jsx)("div",{children:(0,h.jsx)(E.A,{type:"submit",id:"import_btn",className:"btn btn-brand-1 w-100",children:"Import"})})]})})]})};var T=t(54011),k=t(39515),D=t(37950);var R=t(13729);const L=e=>{var s,t;const n=(0,A.d4)(e=>e.aT.aT),{register:r,handleSubmit:i,setValue:c,formState:{errors:d},clearErrors:x,setError:p,watch:g}=(0,u.mN)();let _=g();const{register:S,handleSubmit:N,setValue:w,formState:{errors:C},clearErrors:O,setError:P,watch:M}=(0,u.mN)();let T=M();const{t:L}=(0,m.B)(),[F,U]=(0,a.useState)(!1),[z,B]=(0,a.useState)(!1),[$,H]=(0,a.useState)(!1),[G,K]=(0,a.useState)({value:"select_domain",label:"Select domain"}),[V,Y]=(0,a.useState)({value:"select_reportTo",label:"Select reporting person"}),[W,Z]=(0,a.useState)({value:"select_role",label:"Select role"}),[q,J]=(0,a.useState)(!1),[X,Q]=(0,a.useState)(""),ee=()=>{J(!1)};(0,a.useEffect)(()=>{_.review_logs=!1,c("review_logs",!1),_.add_edit_user=!1,c("add_edit_user",!1),_.add_edit_trigers=!1,c("add_edit_trigers",!1),_.monthly_review_reminders=!1,c("monthly_review_reminders",!1),_.new_outgoing_email_triggered=!1,c("new_outgoing_email_triggered",!1),_.triggered_email_bypassed=!1,c("triggered_email_bypassed",!1),""!==e.id&&se(e.id)},[e.id]);const se=s=>v.A.getAPI({action:"client/user?user_id="+s+"&client_id="+e.clientId,body:null,isShowError:!0,access_token:n}).then(e=>{if(null!=e){if(_.first_name=e.first_name,c("first_name",e.first_name),_.last_name=e.last_name,c("last_name",e.last_name),Q(e.email),c("email",e.email),"COMPLAINCE_OFFICER"===e.role_type)Q(e.email),_.email=e.email,c("email",e.email);else{let s=e.email.split("@");if(2===s.length){_.email1=s[0],c("email1",s[0]);let e={label:s[1],value:""};K(e),c("domain",e.label)}if(e.report_to){let s={label:e.report_to.firstName+" "+e.report_to.lastName,value:e.report_to.id};Y(s),_.report_to=s.value,c("report_to",s.value)}}if(e.role){let s={label:"COMPLIANCE_OFFICER"===e.role.role?"Compliance":j.A.removeUnderScore(e.role.role),value:e.role.id};_.role_id=s.value,c("role_id",s.value)}_.review_logs=e.review_logs,c("review_logs",e.review_logs),_.add_edit_trigers=e.add_edit_trigers,c("add_edit_trigers",e.add_edit_trigers),_.new_outgoing_email_triggered=e.new_outgoing_email_triggered,c("new_outgoing_email_triggered",e.new_outgoing_email_triggered),_.monthly_review_reminders=e.monthly_review_reminders,c("monthly_review_reminders",e.monthly_review_reminders),_.triggered_email_bypassed=e.triggered_email_bypassed,c("triggered_email_bypassed",e.triggered_email_bypassed),_.add_edit_user=e.add_edit_user,c("add_edit_user",e.add_edit_user)}}).catch(e=>(f.oR.error(e.message),e)),te=(e,s)=>{"first_name"===s?(_.first_name=e,c("first_name",e),x("first_name"),""===_.first_name&&p("first_name",{type:"custom",message:""})):"last_name"===s?(_.last_name=e,c("last_name",e),x("last_name"),""===_.last_name&&p("last_name",{type:"custom",message:""})):"email1"===s?(_.email1=e,c("email1",e),x("email1"),""===_.email1&&p("email1",{type:"custom",message:""})):"email"===s&&(_.email=e,c("email",e),x("email"),""===_.email&&p("email",{type:"custom",message:""}))},ne=(e,s)=>{"review_logs"===s?(_.review_logs=e,c("review_logs",e)):"add_edit_user"===s?(_.add_edit_user=e,c("add_edit_user",e)):"add_edit_triger
1s"===s?(_.add_edit_trigers=e,c("add_edit_trigers",e)):"monthly_review_reminders"===s?(_.monthly_review_reminders=e,c("monthly_review_reminders",e)):"new_outgoing_email_triggered"===s?(_.new_outgoing_email_triggered=e,c("new_outgoing_email_triggered",e)):"triggered_email_bypassed"===s&&(_.triggered_email_bypassed=e,c("triggered_email_bypassed",e))},ae=(e,s)=>{"newPassword"===s?(w("newPassword",e),O("newPassword"),""===T.newPassword&&P("newPassword",{type:"custom",message:"Please enter new password"})):"cpassword"===s&&(w("cpassword",e),O("cpassword"),""===T.cpassword&&P("cpassword",{type:"custom",message:"Please enter confirm password"}))};return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(y.A.Header,{closeButton:!0,children:(0,h.jsx)(y.A.Title,{children:""===e.id?"Add New User":"Edit User"})}),(0,h.jsxs)(y.A.Body,{children:[(0,h.jsxs)(b.A,{className:"w-100 form-style",name:"Verify",id:"Verify",onSubmit:i(()=>{if("Compliance"!==W.label){if(""===_.domain||void 0===_.domain)return void U(!0);U(!1)}if(""!==_.role_id&&void 0!==_.role_id){if(!(""==_.report_to&&"Basic user"===W.label||void 0===_.report_to&&"Basic user"===W.label))return B(!1),"Compliance"!==W.label&&(_.email=_.email1+"@"+_.domain),delete _.email1,delete _.domain,_.client_id=e.clientId,v.A.addLoader("save11"),""==e.id?v.A.postAPI({action:"client/user",body:_,isShowError:!0,access_token:n}).then(s=>{f.oR.success(s.message),v.A.removeLoader("save11"),e.closeCanvasFlag(!0)}).catch(e=>(f.oR.error(e.message),v.A.removeLoader("save11"),e)):(_.id=e.id,v.A.putAPI({action:"client/user",body:_,isShowError:!0,access_token:n}).then(s=>{f.oR.success(s.message),v.A.removeLoader("save11"),e.closeCanvasFlag(!0)}).catch(e=>(f.oR.error(e.message),v.A.removeLoader("save11"),e)));B(!0)}else H(!0)},e=>{}),children:[(0,h.jsxs)(l.A,{children:[(0,h.jsx)(o.A,{lg:6,children:(0,h.jsxs)(k.A,{controlId:"FirstName",label:"First name",className:"mb-3",children:[(0,h.jsx)("input",{...r("first_name",{required:!0}),type:"text",className:"form-control ps-0 ",placeholder:L("Organization.first_name"),onChange:e=>{te(e.target.value,"first_name")}}),d.first_name&&(0,h.jsx)(I.J,{title:"Please enter first name",modeError:!0,showStar:!0,type:""})]})}),(0,h.jsx)(o.A,{lg:6,children:(0,h.jsxs)(k.A,{controlId:"LastName",label:"Last name",className:"mb-3",children:[(0,h.jsx)("input",{...r("last_name",{required:!0}),type:"text",className:"form-control ps-0",placeholder:L("Organization.last_name"),onChange:e=>{te(e.target.value,"last_name")}}),d.last_name&&(0,h.jsx)(I.J,{title:"Please enter last name",modeError:!0,classNames:"ps-2",showStar:!0,type:""})]})})]}),(0,h.jsx)(l.A,{children:(0,h.jsxs)(o.A,{lg:12,className:"mb-3",children:[(0,h.jsx)(D.default,{menuPortalTarget:document.body,styles:{menuPortal:e=>({...e,zIndex:9999})},...r("role_id"),cacheOptions:!0,defaultOptions:!0,onChange:e=>{Z(e),_.role_id=e.value,c("role_id",e.value)},loadOptions:s=>new Promise(s=>v.A.getAPI({action:"role/list",access_token:n}).then(t=>{let n;t.length>0?(n=e.id&&"COMPLIANCE_OFFICER"!==e.role?t.filter(e=>"COMPLIANCE_OFFICER"!==e.role).map(e=>({value:e.id,label:"COMPLIANCE_OFFICER"===e.role?"Compliance":j.A.removeUnderScore(e.role)})):t.map(e=>({value:e.id,label:"COMPLIANCE_OFFICER"===e.role?"Compliance":j.A.removeUnderScore(e.role)})),s(n)):s([])}).catch(e=>(s([]),e))),value:W,isDisabled:"COMPLIANCE_OFFICER"===e.role}),void 0!==_.role_id&&""!==_.role_id||!$?"":(0,h.jsx)(I.J,{title:"Please select role",modeError:!0})]})}),"Compliance"===W.label?(0,h.jsx)(l.A,{className:" align-items-center",children:(0,h.jsx)(o.A,{lg:12,children:(0,h.jsxs)(k.A,{controlId:"Email",label:"Email",className:"mb-3",children:[(0,h.jsx)("input",{...r("email",{required:"Please enter email",pattern:{value:/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,60}$/i,message:"Invalid email format"}}),type:"text",className:"form-control ps-0",placeholder:"Email",onChange:e=>{te(e.target.value,"email")},defaultValue:X}),d.email&&(0,h.jsx)(I.J,{title:null===(s=d.email.message)||void 0===s?void 0:s.toString(),modeError:!0,showStar:!0,type:""})]})})}):(0,h.jsxs)(l.A,{className:" align-items-center",children:[(0,h.jsx)(o.A,{children:(0,h.jsxs)(k.A,{controlId:"Email",label:"Email",className:"mb-3",children:[(0,h.jsx)("input",{...r("email1",{required:"Please enter email",pattern:{value:/^[a-zA-Z0-9._%+-]+$/,message:"Invalid email format"}}),type:"text",className:"form-control ps-0",placeholder:L("Organization.email"),onChange:e=>{te(e.target.value,"email1")}}),d.email1&&(0,h.jsx)(I.J,{title:null===(t=d.email1.message)||void 0===t?void 0:t.toString(),modeError:!0,showStar:!0,type:""})]})}),(0,h.jsxs)(o.A,{className:"mb-3 p-0",style:{maxWidth:"10px"},children:[" ",(0,h.jsx)("span",{children:"@"})]}),(0,h.jsx)(o.A,{className:"mb-3",children:(0,h.jsxs)("div",{children:[(0,h.jsx)(D.default,{menuPortalTarget:document.body,styles:{menuPortal:e=>({...e,zIndex:9999})},...r("domain",{required:!0}),cacheOptions:!0,defaultOptions:!0,onChange:e=>{U(!1),_.domain=e.label,c("domain",e.label),K(e)},loadOptions:s=>new Promise(s=>v.A.getAPI({action:"domain/list?client_id="+e.clientId,body:null,access_token:n}).then(e=>{if(e.length>0){let t=e.map((e,s)=>({value:s+1,label:e.name}));1===e.length&&(K(t),c("domain",t[0].label)),s(t)}else s([])}).catch(e=>(s([]),e))),value:G}),void 0!==_.domain&&""!==_.domain||!F?"":(0,h.jsx)(I.J,{title:"Please select domain",modeError:!0})]})})]}),"Basic user"===W.label?(0,h.jsx)(l.A,{children:(0,h.jsxs)(o.A,{lg:12,className:"mb-3",children:[(0,h.jsx)(D.default,{...r("report_to"),cacheOptions:!0,defaultOptions:!0,onChange:e=>{Y(e),_.report_to=e.value,c("report_to",e.value)},loadOptions:s=>new Promise(s=>v.A.getAPI({action:"report/list?client_id="+e.clientId,body:null,access_token:n}).then(t=>{if(t.length>0){let n=t.filter(s=>s.id!==e.id).map((e,s)=>({value:e.id,label:e.first_name+" "+e.last_name}));s(n)}else s([])}).catch(e=>(s([]),e))),value:V}
1),void 0!==_.report_to&&""!==_.report_to||!z?"":(0,h.jsx)(I.J,{title:"Please select reporting user",modeError:!0})]})}):"","Compliance"===W.label?(0,h.jsxs)("div",{className:"row mb-3",children:[(0,h.jsxs)(o.A,{lg:6,className:"mb-2",children:[(0,h.jsx)("label",{className:"font-1 font-medium mb-2 font-18",children:"Organization permissions"}),(0,h.jsx)(b.A.Check,{...r("review_logs"),type:"checkbox",className:"mb-3",id:"Canreviewlogs",label:"Can review logs",onChange:()=>{ne(!_.review_logs,"review_logs")}}),(0,h.jsx)(b.A.Check,{...r("add_edit_user"),type:"checkbox",className:"mb-3",id:"Canadd/editusers",label:"Can add/edit users",onChange:()=>{ne(!_.add_edit_user,"add_edit_user")}}),(0,h.jsx)(b.A.Check,{...r("add_edit_trigers"),type:"checkbox",className:"mb-3",id:"Canadd/edittriggers",label:"Can add/edit flagging words",onChange:()=>{ne(!_.add_edit_trigers,"add_edit_trigers")}})]}),(0,h.jsxs)(o.A,{lg:6,className:"mb-2",children:[(0,h.jsx)("label",{className:"font-1 font-medium mb-2 font-18",children:"Email notifications"}),(0,h.jsx)(b.A.Check,{...r("monthly_review_reminders"),type:"checkbox",className:"mb-3",id:"Monthlyreviewreminders",label:"Monthly review reminders",onChange:()=>{ne(!_.monthly_review_reminders,"monthly_review_reminders")}}),(0,h.jsx)(b.A.Check,{...r("new_outgoing_email_triggered"),type:"checkbox",className:"mb-3",id:"Newoutgoingemail",label:"Monthly flag reports",onChange:()=>{ne(!_.new_outgoing_email_triggered,"new_outgoing_email_triggered")}})]})]}):"","Account admin"===W.label?(0,h.jsx)("div",{className:"row mb-3",children:(0,h.jsxs)(o.A,{lg:6,className:"mb-2",children:[(0,h.jsx)("label",{className:"font-1 font-medium mb-2 font-18",children:"Email notifications"}),(0,h.jsx)(b.A.Check,{...r("monthly_review_reminders"),type:"checkbox",className:"mb-3",id:"Monthlyreviewreminders",label:"Monthly review reminders",onChange:()=>{ne(!_.monthly_review_reminders,"monthly_review_reminders")}}),(0,h.jsx)(b.A.Check,{...r("new_outgoing_email_triggered"),type:"checkbox",className:"mb-3",id:"Newoutgoingemail",label:"Monthly flag reports",onChange:()=>{ne(!_.new_outgoing_email_triggered,"new_outgoing_email_triggered")}})]})}):"",(0,h.jsxs)("div",{children:[(0,h.jsx)(E.A,{type:"submit",className:"btn btn-brand-1 w-100 mb-2",id:"save11",children:"Save"}),(0,h.jsx)("span",{className:"mt-2 text-danger font-12",children:"Note: Compliance users cannot add any connectors or view billing."})]})]}),""===e.id?"":(0,h.jsx)(o.A,{className:"item-align-end font-12",style:{textAlign:"end"},children:(0,h.jsx)(h.Fragment,{children:(0,h.jsx)("a",{onClick:()=>{J(!0)},className:"font-14 cursor-pointer",children:"Change Password"})})})]}),(0,h.jsxs)(y.A,{show:q,onHide:ee,placement:"end",children:[(0,h.jsx)(y.A.Header,{closeButton:!0,children:(0,h.jsx)(y.A.Title,{children:"Change Password"})}),(0,h.jsx)(b.A,{className:"w-100",name:"Verify",id:"Verify",onSubmit:N(()=>{if(T.newPassword!==T.cpassword)return void P("cpassword",{type:"custom",message:"Those passwords didn\u2019t match. Try again."});let e={password:T.newPassword,email:X};return v.A.addLoader("save1"),v.A.putAPI({action:"change/user-password",body:e,isShowError:!0,access_token:n}).then(e=>{v.A.removeLoader("save1"),f.oR.success(e.message),ee()}).catch(e=>(v.A.removeLoader("save1"),e))},e=>{""===_.domain||void 0===_.domain?U(!0):U(!1),""===_.report_to||void 0===_.report_to?B(!0):B(!1),""===_.role_id||void 0===_.role_id?H(!0):H(!1)}),children:(0,h.jsxs)(y.A.Body,{className:"form-style",children:[(0,h.jsxs)("div",{className:"px-3 pt-3",children:[(0,h.jsxs)("div",{className:"input-group mb-2 mt-1",children:[(0,h.jsx)(R.A,{requiredMsg:{...S("newPassword",{required:"Please enter new password",pattern:{value:/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[@#$%^&+=!*-])(?=.*[a-zA-Z@#$%^&+=!*-]).{6,}$/,message:"Please enter valid password that satisfy below criteria"}})},inputFieldClassName:"form-control border-end-0 border-start-0 ps-0",id:"",name:"",label:"Password",placeholder:"New Password",method:e=>{ae(e.target.value,"newPassword")},onError:C.newPassword?(0,h.jsx)("div",{className:"mb-2",children:(0,h.jsx)(I.J,{title:C.newPassword.message?C.newPassword.message.toString():"",modeError:!0,showStar:!0,type:"password"})}):""})," "]}),(0,h.jsx)("div",{className:"input-group mb-2 mt-0",children:(0,h.jsx)(R.A,{requiredMsg:{...S("cpassword",{required:"Please enter confirm password"})},inputFieldClassName:"form-control border-end-0 border-start-0 ps-0",id:"",name:"",label:"Password",placeholder:"Confirm Password",method:e=>{ae(e.target.value,"cpassword")},onError:C.cpassword?(0,h.jsx)(I.J,{title:C.cpassword.message?C.cpassword.message.toString():"",modeError:!0,showStar:!0,type:"password"}):""})})]}),(0,h.jsxs)("div",{className:"font-12 text-danger px-3 mb-3",children:["Your password must meet the following criteria:",(0,h.jsx)("br",{}),(0,h.jsxs)("div",{className:"px-3",children:["- Minimum length of 6 characters.",(0,h.jsx)("br",{}),"- At least 1 uppercase letter.",(0,h.jsx)("br",{}),"- At least 1 lowercase letter.",(0,h.jsx)("br",{}),"- At least 1 number.",(0,h.jsx)("br",{}),"- Special characters allowed: ! @ # $ % ^ & * - + =",(0,h.jsx)("br",{})]})]}),(0,h.jsx)("div",{className:"px-3",children:(0,h.jsx)(E.A,{className:"btn-brand-1 w-100",type:"submit",id:"save1",children:"Save"})})]})})]})]})};
1var F=t(16990),U=t(85984),z=t(6733),B=t(74161),$=t.n(B);const H=e=>{const s=(0,A.d4)(e=>e.aT.aT),{t:t}=(0,m.B)(),{setValue:n,watch:i,reset:c}=(0,u.mN)();i();const[d,x]=(0,a.useState)(!1),[p,_]=(0,a.useState)(!1),[E,I]=(0,a.useState)(""),[O,P]=(0,a.useState)(!1),k=()=>{x(!1),se(!1),re("")},[D,R]=(0,a.useState)(!1),[B,H]=(0,a.useState)(!1),[G,K]=(0,a.useState)(0),[V,Y]=(0,a.useState)([]),[W,Z]=(0,a.useState)(""),[q,J]=(0,a.useState)("DESC"),[X,Q]=(0,a.useState)(1),[ee,se]=(0,a.useState)(!1),[te,ne]=(0,a.useState)(""),[ae,re]=(0,a.useState)(""),[ie,le]=(0,a.useState)(""),[oe,ce]=(0,a.useState)("first_name"),[de,me]=(0,a.useState)(""),[ue,he]=(0,a.useState)({value:"Select role",label:"Select Role"});(0,a.useEffect)(()=>{e.client&&(xe(e.client.id),I(e.client.id))},[W,q,X,e.client,ie]);const xe=e=>{H(!0);const t={page:X.toString(),sort_by:W,order_by:q,client_id:e,keyword:ie};let n=new URLSearchParams(t).toString();return v.A.getAPI({action:"client/users/list?"+n,body:null,isShowError:!0,access_token:s}).then(e=>{Y(e.list),K(e.count),H(!1)}).catch(e=>(f.oR.error(e.message),H(!1),e))};return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(l.A,{className:" justify-content-end",children:(0,h.jsx)(o.A,{md:6,className:"d-flex gap-3 justify-content-end mb-3",children:(0,h.jsxs)(S.A,{className:"table-search-box border",children:[(0,h.jsx)(S.A.Text,{id:"basic-addon1",children:(0,h.jsx)(F.IoSearchOutline,{className:"icon"})}),(0,h.jsx)(b.A.Control,{placeholder:"Search for anything",onKeyDown:e=>{"Enter"===e.key&&le(e.currentTarget.value)}})]})})}),(0,h.jsxs)("div",{className:"table-card",children:[(0,h.jsx)(r.A,{className:"table-container",children:(0,h.jsxs)(N.A,{className:"table-style",children:[(0,h.jsx)("thead",{children:(0,h.jsxs)("tr",{children:[(0,h.jsxs)("th",{onClick:()=>{Z("first_name"),ce("first_name")},children:["First Name","first_name"===W&&"DESC"===q&&"first_name"===oe?(0,h.jsx)(U.MdOutlineKeyboardArrowDown,{className:"sort-icon cursor-pointer",size:14,onClick:()=>{J("ASC"),Z("first_name"),ce("first_name")}}):"first_name"===oe?(0,h.jsx)(U.MdOutlineKeyboardArrowUp,{className:"sort-icon cursor-pointer",size:14,onClick:()=>{J("DESC"),Z("first_name")}}):""]}),(0,h.jsxs)("th",{onClick:()=>{Z("last_name"),ce("last_name")},children:["Last Name","last_name"===W&&"DESC"===q&&"last_name"===oe?(0,h.jsx)(U.MdOutlineKeyboardArrowDown,{className:"sort-icon cursor-pointer",size:14,onClick:()=>{J("ASC"),Z("last_name")}}):"last_name"===oe?(0,h.jsx)(U.MdOutlineKeyboardArrowUp,{className:"sort-icon cursor-pointer",size:14,onClick:()=>{J("DESC"),Z("last_name")}}):""]}),(0,h.jsxs)("th",{onClick:()=>{Z("email"),ce("email")},children:["Email","email"===W&&"DESC"===q&&"email"===oe?(0,h.jsx)(U.MdOutlineKeyboardArrowDown,{className:"sort-icon cursor-pointer",size:14,onClick:()=>{J("ASC"),Z("email")}}):"email"===oe?(0,h.jsx)(U.MdOutlineKeyboardArrowUp,{className:"sort-icon cursor-pointer",size:14,onClick:()=>{J("DESC"),Z("email")}}):""]}),(0,h.jsxs)("th",{onClick:()=>{Z("role_id"),ce("role_id")},children:["Role","role_id"===W&&"DESC"===q&&"role_id"===oe?(0,h.jsx)(U.MdOutlineKeyboardArrowDown,{className:"sort-icon cursor-pointer",size:14,onClick:()=>{J("ASC"),Z("role_id")}}):"role_id"===oe?(0,h.jsx)(U.MdOutlineKeyboardArrowUp,{className:"sort-icon cursor-pointer",size:14,onClick:()=>{J("DESC"),Z("role_id")}}):""]}),(0,h.jsxs)("th",{onClick:()=>{Z("last_login"),ce("last_login")},children:["Last Login","last_login"===W&&"DESC"===q?(0,h.jsx)(U.MdOutlineKeyboardArrowDown,{className:"sort-icon cursor-pointer",size:14,onClick:()=>{J("ASC"),Z("last_login")}}):"last_login"===oe?(0,h.jsx)(U.MdOutlineKeyboardArrowUp,{className:"sort-icon cursor-pointer",size:14,onClick:()=>{J("DESC"),Z("last_login")}}):""]})]})}),(0,h.jsx)("tbody",{children:B?(0,h.jsx)("tr",{children:(0,h.jsx)("td",{colSpan:6,children:(0,h.jsx)(g.default,{customClass:"remove-loader-height"})})}):V.length>0?V.map((e,s)=>(0,h.jsxs)("tr",{children:[(0,h.jsx)("td",{children:e.first_name}),(0,h.jsx)("td",{children:e.last_name}),(0,h.jsx)("td",{children:e.email}),(0,h.jsx)("td",{children:"COMPLIANCE_OFFICER"===e.role_type?"Compliance":j.A.removeUnderScore(e.role_type)}),(0,h.jsx)("td",{children:e.last_login?$()(e.last_login).format("MM-DD-YYYY hh:mm A"):"-"})]})):(0,h.jsx)("tr",{children:(0,h.jsx)("td",{colSpan:12,children:(0,h.jsx)("div",{className:"table-wrap position-relative w-100",children:(0,h.jsx)("div",{className:"no-data-found w-100",children:(0,h.jsxs)("div",{className:"text-center",children:[(0,h.jsx)("img",{src:T.A,width:110,className:"mb-3",alt:""}),(0,h.jsx)("h3",{className:"text-secondary font-12",children:t("Common.No_Record_Found")})]})})})})})})]})}),(0,h.jsx)(z.A,{pagination:100,totalItems:G,changePage:e=>{Q(e)},changeCurrentPage:X})]}),(0,h.jsx)(y.A,{show:d,onHide:k,placement:"end",children:(0,h.jsx)(L,{id:ae,role:de,clientId:E,closeCanvasFlag:s=>{s&&(k(),xe(e.client.id))}})}),(0,h.jsx)(y.A,{show:D,onHide:()=>R(!1),placement:"end",children:(0,h.jsx)(M,{parentCallback:s=>{R(s),xe(e.client.id)},clientID:e.client?e.client.id:""})}),(0,h.jsxs)(w.default,{show:O,onHide:()=>{P(!1)},centered:!0,children:[(0,h.jsx)(w.default.Header,{closeButton:!0,className:" border-0 pb-0"}),(0,h.jsx)(w.default.Body,{children:(0,h.jsxs)("div",{className:"text-center",children:[(0,h.jsx)("h2",{className:"text-warning",children:(0,h.jsx)(C.PiSealWarning,{size:70})}),(0,h.jsx)("h4",{className:"font-18",children:"Limit reached !"})]})}),(0,h.jsx)(w.default.Footer,{className:" justify-content-center border-0 pt-0"})]})]})};var G=t(2181);const K=e=>{const s=(0,A.d4)(e=>e.aT.aT),{t:t}=(0,m.B)(),{register:n,handleSubmit:r,setValue:i,formState:{errors:l},watch:c}=(0,u.mN)();let d=c();(0,a.useEffect)(()=>{e.client&&(d.encryption=e.client.encryption,i("encryption",e.client.encryption))},[e.client]);return(0,h.jsx)(h.Fragment,{children:(0,h.jsxs)(b.A,{className:"form-style normal",name:"Verify",id:"Verify",onSubmit:r(()=>(d.id=e.client.id,v.A.addLoader("save111"),v.A.putAPI({action:"client/encryption",body:d,isShowError:!0,access_token:s}).then(e=>{f.oR.success(e.message),v.A.removeLoader("save111")}
1).catch(e=>(f.oR.error(e.message),v.A.removeLoader("save111"),e))),()=>{}),children:[(0,h.jsx)("label",{className:"mb-2",children:"Encryption text for all users"}),(0,h.jsxs)(o.A,{lg:6,className:"mb-2",children:[(0,h.jsx)("textarea",{...n("encryption",{required:!0}),rows:10,className:"h-100 form-control",cols:60,value:d.encryption,placeholder:"Enter text",onChange:e=>{d.encryption=e.target.value,i("encryption",e.target.value)}}),l.encryption&&(0,h.jsx)(I.J,{title:t("add_client.enter_encrptionText"),modeError:!0,showStar:!0,type:"",classNames:"mb-2"})]}),(0,h.jsx)(o.A,{lg:6,children:(0,h.jsx)("div",{className:"text-center",children:(0,h.jsx)(E.A,{className:"btn-brand-1",type:"submit",id:"save111",children:"Save"})})})]})})};var V=t(42978),Y=t(36911),W=t(80192),Z=t(63471),q=t(30283),J=t(29570),X=t(3994),Q=t(70288),ee=t(58047),se=t(32032),te=t(87333),ne=t(1265),ae=t(9207),re=t(76056),ie=t(717);t(66008),t(84590);t.p;var le=t(66959),oe=t(89867);const ce=e=>{(0,A.d4)(e=>e.uR.role),(0,A.d4)(e=>e.aT.aT);const[s,t]=(0,a.useState)([]);(0,a.useEffect)(()=>{const s=null===e||void 0===e?void 0:e.currentSubscriptionList.filter(e=>"ON"===e.integrationStatus&&("SMS"===(null===e||void 0===e?void 0:e.codeName)||"WEBSITE"===(null===e||void 0===e?void 0:e.codeName)||"EMAIL"===(null===e||void 0===e?void 0:e.codeName)||"IMESSAGE"===(null===e||void 0===e?void 0:e.codeName)||"MY_REPCHAT"===(null===e||void 0===e?void 0:e.codeName)));t(s)},[e.currentSubscriptionList]);const{t:n}=(0,m.B)();return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(y.A.Header,{closeButton:!0,children:(0,h.jsx)(y.A.Title,{children:"Connectors"})}),(0,h.jsx)(y.A.Body,{children:s.length>0?s.map((e,s)=>("ON"!==e.integrationStatus||"SMS"!==(null===e||void 0===e?void 0:e.codeName)&&"WEBSITE"!==(null===e||void 0===e?void 0:e.codeName)&&"EMAIL"!==(null===e||void 0===e?void 0:e.codeName)&&"IMESSAGE"!==(null===e||void 0===e?void 0:e.codeName)&&(null===e||void 0===e||e.codeName),"")):(0,h.jsx)("div",{className:"table-wrap position-relative w-100",children:(0,h.jsx)("div",{className:"no-data-found w-100",children:(0,h.jsxs)("div",{className:"text-center",children:[(0,h.jsx)("img",{src:T.A,width:110,className:"mb-3",alt:""}),(0,h.jsx)("h3",{className:"text-secondary font-12",children:"No Valid Connectors Found"})]})})})})]})};t(36241);var de=t(84474),me=t(40526),ue=t(27756),he=t(41548);const xe=e=>{var s,t;const n=(0,A.d4)(e=>e.aT.aT),i=(0,a.useRef)(null),{register:c,handleSubmit:d,setValue:m,clearErrors:x,formState:{errors:p}}=(0,u.mN)(),{register:_,handleSubmit:S,setValue:N,formState:{errors:P},clearErrors:M,setError:L,watch:F}=(0,u.mN)();let z=F();const{register:B,handleSubmit:$,setValue:H,formState:{errors:K},clearErrors:xe,setError:pe,watch:be}=(0,u.mN)();let je=be();const{register:ve,handleSubmit:fe,setValue:ge,formState:{errors:Ae},clearErrors:_e,setError:Se,watch:Ne}=(0,u.mN)();let ye=Ne();const{register:we,handleSubmit:Ce,setValue:Ee,formState:{errors:Ie},clearErrors:Oe,setError:Pe,watch:Me}=(0,u.mN)();let Te=Me();(0,G.g)(),(0,G.Zp)();const[ke,De]=(0,a.useState)(""),[Re,Le]=(0,a.useState)(),[Fe,Ue]=(0,a.useState)(""),[ze,Be]=(0,a.useState)(!1),[$e,He]=(0,a.useState)(""),[Ge,Ke]=(0,a.useState)(!1),[Ve,Ye]=(0,a.useState)(!1),[We,Ze]=(0,a.useState)(!1),[qe,Je]=(0,a.useState)(!1),[Xe,Qe]=(0,a.useState)(!1),[es,ss]=(0,a.useState)(),[ts,ns]=(0,a.useState)({value:"",label:"Select user"}),[as,rs]=(0,a.useState)(!1),[is,ls]=(0,a.useState)(!1),[os,cs]=(0,a.useState)([]),[ds,ms]=(0,a.useState)([]),[us,hs]=(0,a.useState)([]),[xs,ps]=(0,a.useState)([]),[bs,js]=(0,a.useState)([]),[vs,fs]=(0,a.useState)(!1),[gs,As]=(0,a.useState)({consumed:0,purchased:0,known:!1}),[_s,Ss]=(0,a.useState)({consumed:0,purchased:0,known:!1}),Ns=e=>e.known?`${e.consumed}/${e.purchased}`:"\u2014",[ys,ws]=(0,a.useState)(!1),[Cs,Es]=(0,a.useState)(""),[Is,Os]=(0,a.useState)(""),[Ps,Ms]=(0,a.useState)(!1),[Ts,ks]=(0,a.useState)(""),[Ds,Rs]=(0,a.useState)(!1),[Ls,Fs]=(0,a.useState)(!1),[Us,zs]=(0,a.useState)(!1);(0,a.useEffect)(()=>{(e.client||"Connect"===e.tab)&&(Hs(),$s())},[e.client,e.tab]);const Bs=()=>Ze(!1),$s=()=>{var s;const t=null===(s=e.client)||void 0===s?void 0:s.tenantId;return t?(ls(!0),re.D.getLicenseCounts(void 0,t).then(e=>{const s=s=>{var t,n,a;const r=(null!==e&&void 0!==e?e:[]).find(e=>e.connectorGroup===s);return{consumed:null!==(t=null===r||void 0===r?void 0:r.consumedLicenses)&&void 0!==t?t:0,purchased:null!==(n=null!==(a=null===r||void 0===r?void 0:r.purchasedLicenses)&&void 0!==a?a:null===r||void 0===r?void 0:r.totalLicenses)&&void 0!==n?n:0,known:!!r}};As(s(ie.ConnectorGroup.TEXT)),Ss(s(ie.ConnectorGroup.STANDARD)),ls(!1)}).catch(e=>(As({consumed:0,purchased:0,known:!1}),Ss({consumed:0,purchased:0,known:!1}),ls(!1),e))):(As({consumed:0,purchased:0,known:!1}),Ss({consumed:0,purchased:0,known:!1}),Promise.resolve())},Hs=()=>(ls(!0),v.A.getAPI({action:"connector/list?client_id="+e.client.id,body:null,isShowError:!0,access_token:n}).then(e=>{if(0!==e.length){let s=[],t=[],n=[],a=[];
1e.forEach(e=>{["FACEBOOK","X","LINKEDIN","INSTAGRAM","YOUTUBE"].includes(e.type)?s.push(e):["TEAMS","ZOOM_CHAT","SLACK"].includes(e.type)?a.push(e):["SMS","ZOOM_SMS","MY_REPCHAT","RING_CENTRAL","WHATSAPP"].includes(e.type)?n.push(e):t.push(e)}),cs(t),ms(s),hs(a),ps(n)}else cs([]),ms([]),hs([]),ps([]);ls(!1)}).catch(e=>(ls(!1),e))),Gs=s=>(ws(!0),Ms(!0),v.A.getAPI({action:`imessage/credentials?uia_id=${s.id}&client_id=${e.client.id}`,body:null,isShowError:!0,access_token:n}).then(e=>{var t,n,a,r,i;(ks(s.id),Es(e.appleId),void 0!==(null===e||void 0===e?void 0:e.machine_details)||null!==(null===e||void 0===e?void 0:e.machine_details))&&ss({id:null===e||void 0===e||null===(t=e.machine_details)||void 0===t?void 0:t.ip_address,hostname:null===e||void 0===e||null===(n=e.machine_details)||void 0===n?void 0:n.hostname,value:null===e||void 0===e||null===(a=e.machine_details)||void 0===a?void 0:a.id,label:`${null===e||void 0===e||null===(r=e.machine_details)||void 0===r?void 0:r.hostname} (${null===e||void 0===e||null===(i=e.machine_details)||void 0===i?void 0:i.ip_address})`});Os(e.password),H("host",null===e||void 0===e?void 0:e.ip_address),je.host=null===e||void 0===e?void 0:e.ip_address,xe("host"),H("username",null===e||void 0===e?void 0:e.username),je.username=null===e||void 0===e?void 0:e.username,xe("username"),H("machinePassword",null===e||void 0===e?void 0:e.machine_password),je.machinePassword=null===e||void 0===e?void 0:e.machine_password,xe("machinePassword"),Ms(!1)}).catch(e=>(Ms(!1),e))),Ks=e=>{navigator.clipboard.writeText(e).then(()=>{f.oR.success("Copied")}).catch(e=>{console.error("Failed to copy: ",e)})};return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)("div",{className:"page-contetn page-integration",children:[(0,h.jsx)(o.A,{md:12,className:"d-flex gap-3 justify-content-end mb-3"}),is?(0,h.jsx)(g.default,{}):(0,h.jsx)(h.Fragment,{children:os.length>0||xs.length>0||us.length>0||ds.length>0?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("div",{children:xs&&xs.length>0&&xs.map((e,s)=>(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("div",{className:"text-end mb-2 me-5 mt-2 social-buy-btn-margin1",children:0==s?(0,h.jsx)("span",{className:"me-2 ",children:Ns(gs)}):""}),(0,h.jsxs)(r.A,{className:"inetegration-card border",children:[(0,h.jsx)("div",{className:"col-md-2 d-flex justify-content-center align-items-center",children:(0,h.jsxs)("div",{className:"d-flex gap-2 align-items-center",children:[(0,h.jsx)("img",{src:"SMS"===e.type?X.A:"RING_CENTRAL"===e.type?ae:"ZOOM_SMS"===e.type||"ZOOM_CHAT"===e.type?ee.A:"IMESSAGE"===e.type?le:"MY_REPCHAT"===e.type?oe:"WHATSAPP"===e.type?me.A:"",onError:e=>{e.target.src=Y},width:30,alt:""}),(0,h.jsx)("span",{className:" font-medium",children:"SMS"===e.type?"Android SMS":"MY_REPCHAT"===e.type?"MyRepChat":"RING_CENTRAL"===e.type?"Ring Central":"WHATSAPP"===e.type?"WhatsApp":"ZOOM_SMS"===e.type?"Zoom SMS":j.A.titleCase(e.type.replaceAll("_"," "))})]})}),(0,h.jsx)("div",{className:"border-start col-md-10",children:(0,h.jsxs)("table",{className:"integration-table",children:[(0,h.jsxs)("tr",{children:[(0,h.jsxs)("td",{width:"16.66%",children:[(0,h.jsx)("span",{className:"font-14 text-secondary font-bold",children:"SMS"===e.type||"IMESSAGE"===e.type?"Platform Type":"Name"})," "]}),(0,h.jsxs)("td",{width:"16.66%",children:[" ",(0,h.jsx)("span",{className:"font-14 text-secondary font-bold ",children:"User Name"})]}),(0,h.jsxs)("td",{width:"16.66%",children:[" ",(0,h.jsx)("span",{className:"font-14 text-secondary font-bold",children:"Email"})]}),"SMS"===e.type||"IMESSAGE"===e.type||"MY_REPCHAT"===e.type||"RING_CENTRAL"===e.type||"ZOOM_SMS"===e.type||"WHATSAPP"===e.type?(0,h.jsx)("td",{width:"16.66%",children:(0,h.jsx)("span",{className:"font-14 text-secondary font-bold",children:"Ref Id"})}):(0,h.jsx)("td",{width:"16.66%"}),"IMESSAGE"===e.type||"MY_REPCHAT"===e.type||"WEBSITE"===e.type||"RING_CENTRAL"===e.type||"EMAIL"===e.type||"ZOOM_SMS"===e.type||"WHATSAPP"===e.type?(0,h.jsx)("td",{width:"16.66%"}):"","SMS"===e.type||"WHATSAPP"===e.type?(0,h.jsxs)("td",{width:"16.66%",className:"text-center",children:[" ",(0,h.jsx)("span",{className:"font-14 text-secondary font-bold ",children:"Account Type"})]}):"",(0,h.jsxs)("td",{width:"16.66%",className:"text-center",children:[" ",(0,h.jsx)("span",{className:"font-14 text-secondary font-bold ",children:"Status"})]})]}),e.list&&e.list.length>0&&e.list.map(s=>{var t,n,a;return(0,h.jsxs)("tr",{children:["SMS"===e.type||"IMESSAGE"===e.type?(0,h.jsxs)("td",{width:"16.66%",children:[" ",(0,h.jsx)("span",{className:"text-brand font-14",children:s.platformType})]}):(0,h.jsx)("td",{width:"16.66%",className:"text-nowrap",children:(0,h.jsx)("span",{className:"text-brand font-14 action-btns unset-center",children:(0,h.jsx)(O.t,{st:(0,h.jsx)("span",{children:j.A.truncate(j.A.removeUnderScore(s.name),25)}),message:s.name,position:"top",id:"c_btn"})})}),(0,h.jsx)("td",{className:"text-nowrap",children:(0,h.jsx)("span",{className:"action-btns unset-center",children:(null===(t=s.tenantUser)||void 0===t?void 0:t.firstName)+" "+(null===(n=s.tenantUser)||void 0===n?void 0:n.lastName)})}),(0,h.jsx)("td",{children:null===(a=s.tenantUser)||void 0===a?void 0:a.email}),"WEBSITE"===e.type||"EMAIL"===e.type?(0,h.jsx)("td",{width:"16.66%"}):(0,h.jsx)("td",{children:(0,h.jsx)(O.t,{st:(0,h.jsx)("span",{children:j.A.truncate(s.refId,15)}),message:s.refId,position:"top",id:"c_btn"})}),"IMESSAGE"===e.type?(0,h.jsx)("td",{className:"action-btns text-center unset-center",children:(0,h.jsxs)(E.A,{className:"action-btn btn-view btn-light font-12",title:"View",onClick:()=>{Je(!1),Gs(s),zs(!1)},children:[(0,h.jsx)(U.MdOutlineRemoveRedEye,{className:"icon"}),"View"]}
1)}):"SMS"===e.type?"":(0,h.jsx)("span",{children:" "}),"SMS"===e.type||"WHATSAPP"===e.type?(0,h.jsx)("td",{className:"text-center",width:"16.66%",children:(0,h.jsx)("span",{className:"status-badge active",children:s.accountType})}):"",(0,h.jsx)("td",{className:"text-center",width:"16.66%",children:s.disconnectedDate?(0,h.jsx)("span",{className:"font-14 text-danger text-nowrap",children:"Disconnected "}):"ACTIVE"===s.accountStatus?(0,h.jsx)("span",{className:"font-14 text-success text-nowrap",children:"Connected "}):"INACTIVE"===s.accountStatus?(0,h.jsx)("span",{className:"font-14 text-danger text-nowrap",children:"Disconnected "}):"CONFIGURATION_PENDING"===s.accountStatus?(0,h.jsx)("span",{className:"font-14 text-primary text-nowrap",children:"Configuration Pending "}):"CONNECTION_ERROR"===s.accountStatus?(0,h.jsx)("span",{className:"font-14 text-danger text-nowrap",children:"Connection Error"}):"RECONNECT"===s.accountStatus?(0,h.jsx)("span",{className:"font-14 text-reconnect text-nowrap",children:"Reconnect"}):""})]})})]})})]})]}))}),(0,h.jsx)("div",{children:us&&us.length>0&&us.map((e,s)=>(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("div",{className:"text-end mb-2 me-5 mt-2 social-buy-btn-margin1",children:0==s?(0,h.jsx)("span",{className:"me-2 ",children:Ns(_s)}):""}),(0,h.jsxs)(r.A,{className:"inetegration-card border",children:[(0,h.jsx)("div",{className:"col-md-2 d-flex justify-content-center align-items-center",children:(0,h.jsxs)("div",{className:"d-flex gap-2 align-items-center",children:[(0,h.jsx)("img",{src:"ZOOM_CHAT"===e.type?ee.A:"TEAMS"===e.type?se.A:"SLACK"===e.type?ue.A:"",onError:e=>{e.target.src=Y},width:30,alt:""}),(0,h.jsx)("span",{className:" font-medium",children:"TEAMS"===e.type?"Teams Chat":"ZOOM_Chat"===e.type?"Zoom Chat":j.A.titleCase(e.type.replaceAll("_"," "))})]})}),(0,h.jsx)("div",{className:"border-start col-md-10",children:(0,h.jsxs)("table",{className:"integration-table",children:[(0,h.jsxs)("tr",{children:[(0,h.jsxs)("td",{width:"16.66%",children:[(0,h.jsx)("span",{className:"font-14 text-secondary font-bold",children:"SMS"===e.type||"IMESSAGE"===e.type?"Platform Type":"Name"})," "]}),(0,h.jsxs)("td",{width:"16.66%",children:[" ",(0,h.jsx)("span",{className:"font-14 text-secondary font-bold ",children:"User Name"})]}),(0,h.jsxs)("td",{width:"16.66%",children:[" ",(0,h.jsx)("span",{className:"font-14 text-secondary font-bold",children:"Email"})]}),"SMS"===e.type||"IMESSAGE"===e.type||"MY_REPCHAT"===e.type||"RING_CENTRAL"===e.type||"ZOOM_SMS"===e.type?(0,h.jsx)("td",{width:"16.66%",children:(0,h.jsx)("span",{className:"font-14 text-secondary font-bold",children:"Ref Id"})}):(0,h.jsx)("td",{width:"16.66%"}),("SMS"===e.type||"IMESSAGE"===e.type||"MY_REPCHAT"===e.type||"WEBSITE"===e.type||"RING_CENTRAL"===e.type||"EMAIL"===e.type||e.type,(0,h.jsx)("td",{width:"16.66%"})),(0,h.jsxs)("td",{width:"16.66%",className:"text-center",children:[" ",(0,h.jsx)("span",{className:"font-14 text-secondary font-bold ",children:"Account Status"})]})]}),e.list&&e.list.length>0&&e.list.map(s=>{var t,n,a;return(0,h.jsxs)("tr",{children:["SMS"===e.type||"IMESSAGE"===e.type?(0,h.jsxs)("td",{width:"16.66%",children:[" ",(0,h.jsx)("span",{className:"text-brand font-14",children:s.platformType})]}):(0,h.jsx)("td",{width:"16.66%",className:"text-nowrap",children:(0,h.jsx)("span",{className:"text-brand font-14 action-btns unset-center",children:(0,h.jsx)(O.t,{st:(0,h.jsx)("span",{children:j.A.truncate(j.A.removeUnderScore(s.name),25)}),message:s.name,position:"top",id:"c_btn"})})}),(0,h.jsx)("td",{className:"text-nowrap",children:(0,h.jsx)("span",{className:"action-btns unset-center ",children:(null===(t=s.tenantUser)||void 0===t?void 0:t.firstName)+" "+(null===(n=s.tenantUser)||void 0===n?void 0:n.lastName)})}),(0,h.jsx)("td",{children:null===(a=s.tenantUser)||void 0===a?void 0:a.email}),"WEBSITE"===e.type||"EMAIL"===e.type?(0,h.jsx)("td",{width:"16.66%"}):(0,h.jsx)("td",{children:(0,h.jsx)(O.t,{st:(0,h.jsx)("span",{children:j.A.truncate(s.refId,15)}),message:s.refId,position:"top",id:"c_btn"})}),"IMESSAGE"===e.type?(0,h.jsx)("td",{className:"action-btns text-center unset-center",children:(0,h.jsxs)(E.A,{className:"action-btn btn-view btn-light font-12",title:"View",onClick:()=>{Gs(s),zs(!1)},children:[(0,h.jsx)(U.MdOutlineRemoveRedEye,{className:"icon"}),"View"]}
1)}):(0,h.jsx)("span",{children:" "}),(0,h.jsx)("td",{className:"text-center",width:"16.66%",children:s.disconnectedDate?(0,h.jsx)("span",{className:"font-14 text-danger text-nowrap",children:"Disconnected "}):"ACTIVE"===s.accountStatus?(0,h.jsx)("span",{className:"font-14 text-success text-nowrap",children:"Connected "}):"INACTIVE"===s.accountStatus?"IMESSAGE"===e.type?(0,h.jsx)(O.t,{st:(0,h.jsx)("span",{className:"font-14 text-warning text-nowrap",children:"Inactive"}),message:(0,ie.getIMessageInactiveTooltip)(he.Y),position:"top",id:`imessage-inactive-${s.id}`}):(0,h.jsx)("span",{className:"font-14 text-danger text-nowrap",children:"Disconnected "}):"CONFIGURATION_PENDING"===s.accountStatus?(0,h.jsx)("span",{className:"font-14 text-primary text-nowrap",children:"Configuration Pending "}):"CONNECTION_ERROR"===s.accountStatus?"IMESSAGE"===e.type?(0,h.jsx)(O.t,{st:(0,h.jsx)("span",{className:"font-14 text-danger text-nowrap",children:"Connection Error"}),message:ie.IMESSAGE_CONNECTION_ERROR_TOOLTIP,position:"top",id:`imessage-connection-error-${s.id}`}):(0,h.jsx)("span",{className:"font-14 text-danger text-nowrap",children:"Connection Error"}):"RECONNECT"===s.accountStatus?(0,h.jsx)("span",{className:"font-14 text-reconnect text-nowrap",children:"Reconnect"}):""})]})})]})})]})]}))}),(0,h.jsx)("div",{children:os&&os.length>0&&os.map(e=>(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("div",{className:"text-end mb-2 me-5 mt-2 social-buy-btn-margin1",children:["SMS","IMESSAGE","WHATSAPP"].includes(e.type)?(0,h.jsx)("span",{className:"me-2 ",children:Ns(gs)}):""!==e.type?(0,h.jsx)("span",{className:"me-2 ",children:Ns(_s)}):""}),(0,h.jsxs)(r.A,{className:"inetegration-card border",children:[(0,h.jsx)("div",{className:"col-md-2 d-flex justify-content-center align-items-center",children:(0,h.jsxs)("div",{className:"d-flex gap-2 align-items-center",children:[(0,h.jsx)("img",{src:"WEBSITE"===e.type?Q.A:"EMAIL"===e.type?ne.A:"IMESSAGE"===e.type?le:"",onError:e=>{e.target.src=Y},width:30,alt:""}),(0,h.jsx)("span",{className:" font-medium",children:"IMESSAGE"==e.type?"iMessage":j.A.titleCase(e.type.replaceAll("_"," "))})]})}),(0,h.jsx)("div",{className:"border-start col-md-10",children:(0,h.jsxs)("table",{className:"integration-table",children:[(0,h.jsxs)("tr",{children:[(0,h.jsxs)("td",{width:"16.66%",children:[(0,h.jsx)("span",{className:"font-14 text-secondary font-bold",children:"SMS"===e.type||"IMESSAGE"===e.type?"Platform Type":"Name"})," "]}),(0,h.jsxs)("td",{width:"16.66%",children:[" ",(0,h.jsx)("span",{className:"font-14 text-secondary font-bold ",children:"User Name"})]}),(0,h.jsxs)("td",{width:"16.66%",children:[" ",(0,h.jsx)("span",{className:"font-14 text-secondary font-bold",children:"Email"})]}),"SMS"===e.type||"IMESSAGE"===e.type||"MY_REPCHAT"===e.type||"RING_CENTRAL"===e.type||"ZOOM_SMS"===e.type?(0,h.jsx)("td",{width:"16.66%",children:(0,h.jsx)("span",{className:"font-14 text-secondary font-bold",children:"Ref Id"})}):(0,h.jsx)("td",{width:"16.66%"}),"SMS"===e.type||"IMESSAGE"===e.type||"MY_REPCHAT"===e.type||"WEBSITE"===e.type||"RING_CENTRAL"===e.type||"EMAIL"===e.type||"ZOOM_SMS"===e.type?(0,h.jsx)("td",{width:"16.66%"}):"","IMESSAGE"===e.type?(0,h.jsxs)("td",{width:"16.66%",className:"text-center",children:[" ",(0,h.jsx)("span",{className:"font-14 text-secondary font-bold ",children:"Account Type"})]}):"",(0,h.jsxs)("td",{width:"16.66%",className:"text-center",children:[" ",(0,h.jsx)("span",{className:"font-14 text-secondary font-bold ",children:"Status"})]})]}),e.list&&e.list.length>0&&e.list.map(s=>{var t,n,a;return(0,h.jsxs)("tr",{children:["SMS"===e.type||"IMESSAGE"===e.type?(0,h.jsxs)("td",{width:"16.66%",children:[" ",(0,h.jsx)("span",{className:"text-brand font-14",children:s.platformType})]}):(0,h.jsx)("td",{width:"16.66%",className:"text-nowrap",children:(0,h.jsx)("span",{className:"text-brand font-14 action-btns unset-center",children:(0,h.jsx)(O.t,{st:(0,h.jsx)("span",{children:j.A.truncate(j.A.removeUnderScore(s.name),25)}),message:s.name,position:"top",id:"c_btn"})})}),(0,h.jsx)("td",{className:"text-nowrap",children:(0,h.jsx)("span",{className:"action-btns unset-center ",children:(null===(t=s.tenantUser)||void 0===t?void 0:t.firstName)+" "+(null===(n=s.tenantUser)||void 0===n?void 0:n.lastName)})}),(0,h.jsx)("td",{children:null===(a=s.tenantUser)||void 0===a?void 0:a.email}),"WEBSITE"===e.type||"EMAIL"===e.type?(0,h.jsx)("td",{width:"16.66%"}):(0,h.jsx)("td",{children:(0,h.jsx)(O.t,{st:(0,h.jsx)("span",{children:j.A.truncate(s.refId,15)}),message:s.refId,position:"top",id:"c_btn"})}),"IMESSAGE"===e.type?(0,h.jsx)("td",{className:"action-btns text-center unset-center",children:(0,h.jsxs)(E.A,{className:"action-btn btn-view btn-light font-12",title:"View",onClick:()=>{ge("uia_id",s.id),Gs(s),zs(!1)},children:[(0,h.jsx)(U.MdOutlineRemoveRedEye,{className:"icon"}),"View"]}
1)}):(0,h.jsx)("span",{children:" "}),"IMESSAGE"===e.type?(0,h.jsx)("td",{className:"text-center",width:"16.66%",children:"IMESSAGE"===e.type?(0,h.jsx)("span",{className:"status-badge active",children:s.accountType}):""}):"",(0,h.jsx)("td",{className:"text-center",width:"16.66%",children:s.disconnectedDate?(0,h.jsx)("span",{className:"font-14 text-danger text-nowrap",children:"Disconnected "}):"ACTIVE"===s.accountStatus?(0,h.jsx)("span",{className:"font-14 text-success text-nowrap",children:"Connected "}):"INACTIVE"===s.accountStatus?"IMESSAGE"===e.type?(0,h.jsx)(O.t,{st:(0,h.jsx)("span",{className:"font-14 text-warning text-nowrap",children:s.disconnectedDate?"Disconnected":"Inactive"}),message:(0,ie.getIMessageInactiveTooltip)(he.Y),position:"top",id:`imessage-inactive-${s.id}`}):(0,h.jsx)("span",{className:"font-14 text-danger text-nowrap",children:"Disconnected"}):"CONFIGURATION_PENDING"===s.accountStatus?(0,h.jsx)("span",{className:"font-14 text-primary text-nowrap",children:"Configuration Pending "}):"CONNECTION_ERROR"===s.accountStatus?"IMESSAGE"===e.type?(0,h.jsx)(O.t,{st:(0,h.jsx)("span",{className:"font-14 text-danger text-nowrap",children:"Connection Error"}),message:ie.IMESSAGE_CONNECTION_ERROR_TOOLTIP,position:"top",id:`imessage-connection-error-${s.id}`}):(0,h.jsx)("span",{className:"font-14 text-danger text-nowrap",children:"Connection Error"}):"RECONNECT"===s.accountStatus?(0,h.jsx)("span",{className:"font-14 text-reconnect text-nowrap",children:"Reconnect"}):""})]})})]})})]})]}))}),ds&&ds.length>0?(0,h.jsxs)(r.A,{className:"p-1 border-0",children:[(0,h.jsx)("div",{className:"text-end me-5 mb-2 mt-2 social-buy-btn-margin1",children:(0,h.jsx)("span",{className:"me-2",children:Ns(_s)})}),ds.map(e=>(0,h.jsx)(h.Fragment,{children:(0,h.jsxs)(r.A,{className:"inetegration-card border",children:[(0,h.jsx)("div",{className:"col-md-2 d-flex justify-content-center align-items-center",children:(0,h.jsxs)("div",{className:"d-flex gap-2 align-items-center",children:[(0,h.jsx)("img",{src:"FACEBOOK"===e.type?W.A:"X"===e.type?Z.A:"LINKEDIN"===e.type?J.A:"INSTAGRAM"===e.type?q.A:"ZOOM"===e.type?ee.A:"TEAMS"===e.type?se.A:"YOUTUBE"===e.type?te.A:"",onError:e=>{e.target.src=Y},width:30,alt:""}),(0,h.jsx)("span",{className:" font-medium",children:"LINKEDIN"!==e.type?j.A.titleCase(e.type):"LinkedIn"})]})}),(0,h.jsx)("div",{className:"border-start col-md-10",children:(0,h.jsxs)("table",{className:"integration-table",children:[(0,h.jsxs)("tr",{children:[(0,h.jsx)("td",{width:"16.66%",children:(0,h.jsx)("span",{className:"font-14 text-secondary",children:"Connected Accounts"})}),(0,h.jsx)("td",{width:"16.66%"}),(0,h.jsx)("td",{width:"16.66%"}),(0,h.jsx)("td",{width:"16.66%",className:"text-center me-2"})]}),e.list&&e.list.length>0&&e.list.map(e=>{var s,t,n;return(0,h.jsxs)("tr",{children:[(0,h.jsx)("td",{width:"16.66%",children:(0,h.jsx)("span",{className:"text-brand font-14",children:(0,h.jsx)(O.t,{st:(0,h.jsx)("span",{children:j.A.truncate(j.A.removeUnderScore(e.name),50)}),message:e.name,position:"top",id:"c_btn"})})}),(0,h.jsx)("td",{children:(null===(s=e.tenantUser)||void 0===s?void 0:s.firstName)+" "+(null===(t=e.tenantUser)||void 0===t?void 0:t.lastName)}),(0,h.jsx)("td",{children:null===(n=e.tenantUser)||void 0===n?void 0:n.email}),(0,h.jsx)("td",{children:(0,h.jsx)(O.t,{st:(0,h.jsx)("span",{children:j.A.truncate(e.refId,15)}),message:e.refId,position:"top",id:"c_btn"})}),(0,h.jsx)("td",{className:"text-center",width:"16.66%",children:(0,h.jsx)("span",{className:"status-badge active",children:e.accountType})}),(0,h.jsx)("td",{className:"text-center",width:"16.66%",children:e.disconnectedDate?(0,h.jsx)("span",{className:"font-14 text-danger text-nowrap",children:"Disconnected "}):"ACTIVE"===e.accountStatus?(0,h.jsx)("span",{className:"font-14 text-success text-nowrap",children:"Connected "}):"INACTIVE"===e.accountStatus?(0,h.jsx)("span",{className:"font-14 text-danger text-nowrap",children:"Disconnected "}):"CONFIGURATION_PENDING"===e.accountStatus?(0,h.jsx)("span",{className:"font-14 text-primary text-nowrap",children:"Configuration Pending "}):"CONNECTION_ERROR"===e.accountStatus?(0,h.jsx)("span",{className:"font-14 text-danger text-nowrap",children:"Connection
1Error"}):"RECONNECT"===e.accountStatus?(0,h.jsx)("span",{className:"font-14 text-reconnect text-nowrap",children:"Reconnect"}):""})]})})]})})]})}))]}):""]}):(0,h.jsx)("div",{className:"table-wrap position-relative",children:(0,h.jsx)("div",{className:"no-data-flound bg-white py-5 rounded-4",children:(0,h.jsxs)("div",{className:"text-center",children:[(0,h.jsx)("img",{alt:"",src:T.A,width:110,className:"mb-3"}),(0,h.jsx)("h3",{className:"text-secondary font-12",children:"No data found"})]})})})})]}),(0,h.jsx)(y.A,{show:We,onHide:Bs,placement:"end",children:(0,h.jsx)(ce,{parentCallback:e=>{Ze(e),Hs(),$s(),Bs(),$s()},clientId:null===(s=e.client)||void 0===s?void 0:s.id,availableSMS:gs.purchased,useSMSCount:gs.consumed,avaialbleWebsite:_s.purchased,usedWebsite:_s.consumed,availableEmail:_s.purchased,usedEmail:_s.consumed,currentSubscriptionList:null===e||void 0===e?void 0:e.currentSubscriptionList,avaialbleImessage:gs.purchased,usedImessage:gs.consumed})}),(0,h.jsxs)(y.A,{show:Ve,onHide:()=>Ye(!1),placement:"end",children:[(0,h.jsx)(y.A.Header,{closeButton:!0,children:(0,h.jsx)(y.A.Title,{children:"Import"})}),(0,h.jsx)(y.A.Body,{children:(0,h.jsxs)(b.A,{className:"form-style",onSubmit:d(()=>{f.oR.success("File imported successfully"),Ye(!1)}),children:[(0,h.jsxs)("div",{className:"upload-btn-container mb-2",children:[(0,h.jsxs)("label",{htmlFor:"fileImport",children:[(0,h.jsx)(C.PiUploadSimple,{size:18,className:"me-3"}),Re?null===Re||void 0===Re?void 0:Re.name:"Upload"]}),(0,h.jsx)("input",{...c("fileImport",{required:!0}),type:"file",id:"fileImport",accept:" "})]}),(0,h.jsx)(l.A,{children:(0,h.jsxs)(o.A,{className:"font-12 text-secondary",children:["*You can upload zip files",ze?(0,h.jsx)(I.J,{title:Fe,modeError:!0}):(0,h.jsx)(h.Fragment,{children:p.fileImport&&(0,h.jsx)(I.J,{title:"Please select file",modeError:!0})})]})}),(0,h.jsx)("div",{className:"pt-3 ",children:(0,h.jsxs)("div",{className:"input-group mb-2 mt-1 w-100",children:[(0,h.jsx)(R.A,{requiredMsg:{..._("newPassword",{required:"Please enter new password",pattern:{value:/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[@#$%^&+=!-*])(?=.*[a-zA-Z@#$%^&+=!-*]).{6,}$/,message:"Passwords should contain a combination of four character types[Uppercase letters +Lowercase letters + Numbers+Special Character]"}})},inputFieldClassName:"form-control border-end-0 border-start-0 ps-0",id:"",name:"",label:"Password",placeholder:"Password",method:e=>{var s;s=e.target.value,"newPassword"==="newPassword"&&(N("newPassword",s),M("newPassword"),""===z.newPassword&&L("newPassword",{type:"custom",message:"Please enter password"}))},onError:P.newPassword?(0,h.jsx)("div",{className:"mb-2",children:(0,h.jsx)(I.J,{title:P.newPassword.message?P.newPassword.message.toString():"",modeError:!0,showStar:!0,type:"password"})}):""})," "]})}),(0,h.jsx)("div",{children:(0,h.jsx)(E.A,{type:"submit",id:"import_btn",className:"btn btn-brand-1 w-100",children:"Import"})})]})})]}),(0,h.jsxs)(y.A,{show:ys,onHide:()=>ws(!1),placement:"end",children:[(0,h.jsx)(y.A.Header,{closeButton:!0,children:(0,h.jsx)(y.A.Title,{children:"Apple ID Credentials"})}),(0,h.jsx)(y.A.Body,{children:Ps?(0,h.jsx)(g.default,{}):(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)("div",{className:"form-style",children:[(0,h.jsxs)("div",{className:"password-container",children:[(0,h.jsxs)("p",{children:["Apple Id : ",(0,h.jsx)("b",{className:"px-2",children:Cs})]}),(0,h.jsx)(O.t,{st:(0,h.jsx)("span",{children:(0,h.jsx)(C.PiCopySimpleBold,{style:{cursor:"pointer",marginLeft:"10px"},onClick:()=>Ks(Cs)})}),message:"Copy",position:"top",id:"c_btn"})]}),(0,h.jsxs)("div",{className:"password-container",children:[(0,h.jsxs)("span",{children:["Password: ",(0,h.jsxs)("b",{ref:i,className:"px-2",children:[" ",Us?Is:(0,h.jsx)("span",{style:{marginTop:"3px"},children:"*".repeat(Is.length)})]})]}),""!==Is&&null!==Is&&void 0!==Is?(0,h.jsxs)("div",{className:" d-flex gap-2",children:[(0,h.jsx)("span",{className:"icon ",onClick:()=>{zs(!Us)},children:Us?(0,h.jsx)(de.BsEyeSlash,{size:16}):(0,h.jsx)(de.BsEye,{size:16})}),(0,h.jsx)(O.t,{st:(0,h.jsx)("span",{children:(0,h.jsx)(C.PiCopySimpleBold,{style:{cursor:"pointer",marginLeft:"10px"},onClick:()=>Ks(Is)})}),message:"Copy",position:"top",id:"c_btn"})]}):""]}),(0,h.jsx)("div",{className:"mb-3",children:""!==Is&&null!==Is&&void 0!==Is?(0,h.jsx)("div",{className:"d-flex justify-content-end mt-2",children:(0,h.jsx)("a",{id:"reset-btn",className:"font-12 cursor-pointer",onClick:()=>{Fs(!0)},children:"Clear Password"})}):""})]}),(0,h.jsxs)(b.A,{className:"form-style",onSubmit:$(()=>void 0==(null===es||void 0===es?void 0:es.id)||""==(null===es||void 0===es?void 0:es.id)?(Je(!0),!1):(v.A.addLoader("credentials_s
1ave_btn"),v.A.postAPI({action:`nomachine/credential?client_id=${e.client.id}&machine_id=${es.value}&uia_id=${Ts}`,body:null,isShowError:!0,access_token:n}).then(e=>{f.oR.success(e.message),v.A.removeLoader("credentials_save_btn"),ws(!1)}).catch(e=>(v.A.removeLoader("credentials_save_btn"),e))),()=>{if(void 0===(null===es||void 0===es?void 0:es.id)||""===(null===es||void 0===es?void 0:es.id))return Je(!0),!1}),autoComplete:"off",children:[(0,h.jsxs)(o.A,{lg:12,className:"mb-3",children:[(0,h.jsx)(D.default,{...c("host"),cacheOptions:!0,defaultOptions:!0,onChange:e=>{Je(!1),H("host",e.id),je.host=e.id,ss(e)},loadOptions:e=>new Promise(s=>v.A.getAPI({action:"machine-list?page=1&keyword="+e,access_token:n}).then(e=>{if(e.list.length>0){var t=e.list.map((e,s)=>({id:e.ip_address,hostname:e.hostname,value:e.id,label:e.hostname+" ("+e.ip_address+")"}));s(t)}else s([])}).catch(e=>(s([]),e))),defaultValue:void 0!==(null===es||void 0===es?void 0:es.id)?es:"",placeholder:"Select host"}),void 0!==je.host&&""!==je.host||!qe?"":(0,h.jsx)(I.J,{title:"Please select host",modeError:!0})]}),(0,h.jsx)("div",{children:(0,h.jsx)(E.A,{type:"submit",id:"credentials_save_btn",className:"btn btn-brand-1 w-100",children:"Save"})})]})]})})]}),(0,h.jsxs)(y.A,{show:as,onHide:()=>{Qe(!1),rs(!1)},placement:"end",children:[(0,h.jsx)(y.A.Header,{closeButton:!0,children:(0,h.jsx)(y.A.Title,{children:"Edit Username"})}),(0,h.jsx)(y.A.Body,{children:(0,h.jsxs)(b.A,{className:"form-style",onSubmit:fe(()=>void 0===ts.value||""===ts.value?(Qe(!0),!1):(v.A.addLoader("username_save_btn"),v.A.putAPI({action:`update/connector-user?user_id=${ye.user_id}&uia_id=${ye.uia_id}&account_type=${ye.accountType}`,body:null,isShowError:!0,access_token:n}).then(e=>{f.oR.success(e.message),rs(!1),Hs(),$s(),v.A.removeLoader("username_save_btn"),ns({value:"",label:"Select user"})}).catch(e=>(v.A.removeLoader("username_save_btn"),e)))),autoComplete:"off",children:[(0,h.jsxs)(o.A,{lg:12,className:"mb-3",children:[(0,h.jsx)(D.default,{...ve("username"),cacheOptions:!0,defaultOptions:!0,onChange:e=>{Qe(!1),ge("user_id",e.value),ye.user_id=e.value,ns(e)},loadOptions:s=>new Promise(t=>{var a;return v.A.getAPI({action:`client/users?client_id=${null===(a=e.client)||void 0===a?void 0:a.id}&keyword=`+s,access_token:n}).then(e=>{if(e.length>0){var s=e.filter(e=>"COMPLIANCE_OFFICER"!==e.role_type).map((e,s)=>({value:e.id,label:e.first_name+" "+e.last_name}));t(s)}else t([])}).catch(e=>(t([]),e))}),value:ts,placeholder:"Select user"}),void 0!==ts.value&&""!==ts.value||!Xe?"":(0,h.jsx)(I.J,{title:"Please select user",modeError:!0})]}),"IMESSAGE"===ye.integrationType||"SMS"===ye.integrationType||"WHATSAPP"===ye.integrationType?(0,h.jsxs)(o.A,{lg:12,className:"mb-3",children:[(0,h.jsxs)(b.A.Select,{...ve("accountType",{required:"IMESSAGE"===ye.integrationType||"SMS"===ye.integrationType}),onChange:e=>{ge("accountType",e.target.value)},children:[(0,h.jsx)("option",{selected:!0,disabled:!0,value:"",children:"Account type"}),(0,h.jsx)("option",{value:"BUSINESS",children:"Business"}),(0,h.jsx)("option",{value:"PERSONAL",children:"Personal"})]}),Ae.accountType&&(0,h.jsx)(I.J,{title:"Please select account type",modeError:!0,showStar:!0,type:""})]}):"",(0,h.jsx)("div",{children:(0,h.jsx)(E.A,{type:"submit",id:"username_save_btn",className:"btn btn-brand-1 w-100",children:"Save"})})]})})]}),(0,h.jsxs)(y.A,{show:vs,onHide:()=>fs(!1),placement:"end",className:"righSide-modal size-md",children:[(0,h.jsx)(y.A.Header,{closeButton:!0,children:(0,h.jsx)(y.A.Title,{children:"Edit Website"})}),(0,h.jsx)(V.A,{children:(0,h.jsxs)(b.A,{className:"w-100 form-style",name:"Verify",id:"Verify",onSubmit:Ce(()=>{var e={uia_id:Te.uia_id,name:Te.name};return v.A.addLoader("website-edit-save"),v.A.putAPI({action:`connector/website-update?user_id=${ye.user_id}`,body:e,isShowError:!0,access_token:n}).then(e=>{f.oR.success(e.message),v.A.removeLoader("website-edit-save"),Hs(),$s(),fs(!1)}).catch(e=>(v.A.removeLoader("website-edit-save"),f.oR.error(e.message),e))}),children:[(0,h.jsxs)(k.A,{controlId:"FirstName",label:"Website URL",className:"mb-3",children:[(0,h.jsx)(b.A.Control,{...we("name",{required:"Please enter website URL",pattern:{value:/^(https?|ftp):\/\/[^\s/$.?#]+(\.[^\s/$.?#]+)+[^\s]*(\/[^\s]*)?[a-zA-Z]{2,}\/?$/i,message:"Please enter valid website URL starts with https://www."}}),type:"text",className:"form-control ps-0 ",placeholder:"Website URL",defaultValue:"https://www.",onChange:e=>{Te.name=e.target.value,Ee("name",e.target.value)}}),Ie.name&&(0,h.jsx)(I.J,{title:null===(t=Ie.name.message)||void 0===t?void 0:t.toString(),modeError:!0,showStar:!0,type:""})]}),(0,h.jsx)("div",{children:(0,h.jsx)(E.A,{type:"submit",className:"btn btn-brand-1 w-100",id:"website-edit-save",children:"Save"})})]})})]}),(0,h.jsxs)(w.default,{show:Ls,onHide:()=>Fs(!1),centered:!0,children:[(0,h.jsx)(w.default.Header,{closeButton:!0,onClick:()=>Fs(!1),className:" border-0 pb-0"}),(0,h.jsx)(w.default.Body,{children:(0,h.jsxs)("div",{className:"text-center",children:[(0,h.jsx)("h2",{className:"text-danger",children:(0,h.jsx)(C.PiSealWarning,{size:70})}),(0,h.jsx)("h4",{className:"font-18",children:"Are you sure you want to clear password"})]})}),(0,h.jsxs)(w.default.Footer,{className:" justify-content-center border-0 pt-0",children:[(0,h.jsx)(E.A,{className:"btn-brand-light",onClick:()=>Fs(!1),children:"No"}),(0,h.jsx)(E.A,{className:"btn-brand-1",onClick:()=>(Fs(!1),v.A.addLoader("reset-btn"),v.A.putAPI({action:`password-clear?client_id=${e.client.id}&uia_id=${ye.uia_id}`,body:null,isShowError:!0,access_token:n}).then(e=>{Os(""),f.oR.success(e.message),v.A.removeLoader("reset-btn"),ws(!1)}).catch(e=>(v.A.removeLoader("reset-btn"),ws(!1),e))),id:"save11",children:"Yes"})]})]})]})};var pe=t(98092);const be=e=>{const s=(0,A.d4)(e=>e.aT.aT),{register:t,handleSubmit:n,setValue:r,formState:{errors:i},clearErrors:c,setError:d,watch:x}=(0,u.mN)();let p=x();const{t:g}=(0,m.B)(),[_,S]=(0,a.useState)({value:"select_sub",label:"Select Subscription Plan"}
1),[N,w]=(0,a.useState)(!1),[C,O]=(0,a.useState)(!1),[P,M]=(0,a.useState)(!1),[T,R]=(0,a.useState)(!1),[L,F]=(0,a.useState)(!1),[U,z]=(0,a.useState)(!1),[B,H]=(0,a.useState)("");(0,a.useEffect)(()=>{""!==e.id?G(e.id):r("paymentStatus","PENDING")},[e.id]);const G=t=>v.A.getAPI({action:"client-subscription?clientId="+e.clientId+"&subscriptionId="+t,body:null,isShowError:!0,access_token:s}).then(e=>{var s;(O("PAID"===e.paymentStatus),S({value:e.plan_name,label:j.A.titleCase(e.plan_name)}),r("numberOfEmails",e.number_of_emails),r("numberOfSMS",e.numberOfSMS),r("numberOfWebsites",e.numberOfWebsites),r("numberOfConnectors",e.numberOfConnectors),r("numberOfImessage",e.numberOfImessage),r("numberOfChat",e.numberOfChat),r("price",e.price),e.end_date)?r("end_date",new Date(e.end_date)):"YEARLY"===e.plan?((s=new Date(e.created_date)).setFullYear(s.getFullYear()+1),r("end_date",s)):((s=new Date(e.created_date)).setMonth(s.getMonth()+1),r("end_date",s));e.start_date?r("start_date",new Date(e.start_date)):r("start_date",new Date(e.created_date)),r("paymentStatus",e.paymentStatus),H(e.clientSubscriptionId),r("subscriptionId",e.subscriptionId)}).catch(e=>(f.oR.error(e.message),e)),K=(e,s)=>{"numberOfEmails"===s?(p.numberOfEmails=e,r("numberOfEmails",e),c("numberOfEmails"),""===p.numberOfEmails&&d("numberOfEmails",{type:"custom",message:""})):"numberOfSMS"===s?(p.numberOfSMS=e,r("numberOfSMS",e),c("numberOfSMS"),""===p.numberOfSMS&&d("numberOfSMS",{type:"custom",message:""})):"numberOfConnectors"===s?(p.numberOfConnectors=e,r("numberOfConnectors",e),c("numberOfConnectors"),""===p.numberOfConnectors&&d("numberOfConnectors",{type:"custom",message:""})):"numberOfWebsites"===s?(p.numberOfWebsites=e,r("numberOfWebsites",e),c("numberOfWebsites"),""===p.numberOfWebsites&&d("numberOfWebsites",{type:"custom",message:""})):"price"===s?(p.price=e,r("price",e),c("price"),""===p.price&&d("price",{type:"custom",message:""})):"numberOfConnectors"===s?(p.numberOfConnectors=e,r("numberOfConnectors",e),c("numberOfConnectors"),""===p.numberOfConnectors&&d("numberOfConnectors",{type:"custom",message:""})):"numberOfImessage"===s?(p.numberOfImessage=e,r("numberOfImessage",e),c("numberOfImessage"),""===p.numberOfImessage&&d("numberOfImessage",{type:"custom",message:""})):"numberOfChat"===s&&(p.numberOfChat=e,r("numberOfChat",e),c("numberOfChat"),""===p.numberOfChat&&d("numberOfChat",{type:"custom",message:""}))};return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(y.A.Header,{closeButton:!0,children:(0,h.jsx)(y.A.Title,{children:""===e.id?"Add Subscription":"Edit Subscription"})}),(0,h.jsx)(y.A.Body,{children:(0,h.jsxs)(b.A,{className:"w-100 form-style",name:"Verify",id:"Verify",onSubmit:n(()=>{if(void 0!==p.subscriptionId)if(null!==p.start_date)if(F(!1),null!==p.end_date){if(z(!1),!$()(p.start_date).isAfter(p.end_date))return M(!1),p.clientId=e.clientId,p.numberOfImessage=parseInt(p.numberOfImessage),p.numberOfChat=parseInt(p.numberOfChat),v.A.addLoader("save11"),""===e.id?v.A.postAPI({action:"susbcription/client",body:p,isShowError:!0,access_token:s}).then(s=>{f.oR.success(s.message),v.A.removeLoader("save11"),e.closeCanvasFlag(!0)}).catch(s=>(f.oR.error(s.message),v.A.removeLoader("save11"),e.closeCanvasFlag(!1),s)):(p.clientSubscriptionId=B,v.A.putAPI({action:"client-subscription",body:p,isShowError:!0,access_token:s}).then(s=>{f.oR.success(s.message),v.A.removeLoader("save11"),e.closeCanvasFlag(!0)}).catch(s=>(f.oR.error(s.message),v.A.removeLoader("save11"),e.closeCanvasFlag(!1),s)));M(!0)}else z(!0);else F(!0);else w(!0)},e=>{console.log(e),void 0===p.subscriptionId&&w(!0)}),children:[(0,h.jsx)(o.A,{md:12,children:(0,h.jsxs)(b.A.Group,{className:"mb-3",controlId:"formBasicEmail",style:{zIndex:"999px"},children:[(0,h.jsx)(D.default,{...t("subscriptionId"),isDisabled:C,cacheOptions:!0,defaultOptions:!0,onChange:e=>{if(p.subscriptionId=e.value,r("subscriptionId",e.value),S(e),c("subscriptionId"),w(!1),r("numberOfEmails",e.number_of_users),r("numberOfSMS",e.numberOfSMS),r("numberOfWebsites",e.numberOfWebsites),r("numberOfConnectors",e.numberOfConnectors),r("numberOfImessage",e.numberOfImessage),r("numberOfChat",e.numberOfChat),r("price",e.price),"MONTHLY"===e.plan)(s=new Date).setMonth(s.getMonth()+1),r("start_date",new Date),r("end_date",s);else if("YEARLY"===e.plan){var s;(s=new Date).setFullYear(s.getFullYear()+1),r("start_date",new Date),r("end_date",s)}},loadOptions:t=>new Promise(n=>v.A.getAPI({action:"subscriptions?keyword="+t+"&client_id="+e.clientId,body:null,access_token:s}).then(e=>{if(e.length>0){let s=e.map(e=>({value:e.id,label:e.plan_name,number_of_users:e.number_of_users,numberOfSMS:e.numberOfSMS,numberOfWebsites:e.numberOfWebsites,numberOfConnectors:e.numberOfConnectors,numberOfImessage:e.numberOfImessage,numberOfChat:e.numberOfChat,plan:e.plan,price:e.price}));n(s)}else n([])}).catch(e=>e)),value:_,placeholder:g("add_client.Select_Subscription")}),void 0!==p.subscriptionId&&""!==p.subscriptionId||!N?"":(0,h.jsx)(I.J,{title:g("add_client.Subscription_validation"),modeError:!0})]})}),"select_sub"!==_.value?(0,h.jsxs)(h.Fragment,{children:[" ",(0,h.jsx)(o.A,{lg:12,md:6,children:(0,h.jsxs)(k.A,{controlId:"LastName",label:"Number of emails",className:"mb-3 z-0",children:[(0,h.jsx)("input",{...t("numberOfEmails",{required:!0}),type:"number",className:"form-control ps-0",placeholder:"Number of emails",onChange:e=>{K(e.target.value,"numberOfEmails")}}),i.numberOfEmails&&(0,h.jsx)(I.J,{title:"Please enter number of emails",modeError:!0,
1classNames:"ps-2",showStar:!0,type:""})]})}),(0,h.jsx)(o.A,{lg:12,md:12,children:(0,h.jsxs)(k.A,{controlId:"numberOfSMS",label:"Number of text",className:"mb-3 z-0",children:[(0,h.jsx)("input",{...t("numberOfSMS",{required:!0}),type:"number",className:"form-control ps-0",placeholder:"=Number of Android SMS",onChange:e=>{K(e.target.value,"numberOfSMS")}}),i.numberOfSMS&&(0,h.jsx)(I.J,{title:"Please enter number of text",modeError:!0,classNames:"ps-2",showStar:!0,type:""})]})}),(0,h.jsx)(o.A,{lg:12,md:12,children:(0,h.jsxs)(k.A,{controlId:"LastName",label:"Number of websites",className:"mb-3 z-0",children:[(0,h.jsx)("input",{...t("numberOfWebsites",{required:!0}),type:"number",className:"form-control ps-0",placeholder:g("Organization.last_name"),onChange:e=>{K(e.target.value,"numberOfWebsites")}}),i.numberOfWebsites&&(0,h.jsx)(I.J,{title:"Please enter number of websites",modeError:!0,classNames:"ps-2",showStar:!0,type:""})]})}),(0,h.jsx)(o.A,{lg:12,md:6,children:(0,h.jsxs)(k.A,{controlId:"numberOfConnectors",label:"Number of social",className:"mb-3",style:{zIndex:"0"},children:[(0,h.jsx)("input",{...t("numberOfConnectors",{required:!0}),type:"number",className:"form-control ps-0",placeholder:"Number of social",onChange:e=>{K(e.target.value,"numberOfConnectors")}}),i.numberOfConnectors&&(0,h.jsx)(I.J,{title:"Please enter number of social",modeError:!0,classNames:"ps-2",showStar:!0,type:""})]})}),(0,h.jsx)(o.A,{lg:12,md:6,children:(0,h.jsxs)(k.A,{controlId:"numberOfImessage",label:"Number of iMessage",className:"mb-3",style:{zIndex:"0"},children:[(0,h.jsx)("input",{...t("numberOfImessage",{required:!1}),type:"number",className:"form-control ps-0",placeholder:"Number of iMessage",onChange:e=>{K(e.target.value,"numberOfImessage")}}),i.numberOfImessage&&(0,h.jsx)(I.J,{title:"Please enter number of iMessage",modeError:!0,classNames:"ps-2",showStar:!0,type:""})]})}),(0,h.jsx)(o.A,{lg:12,md:6,children:(0,h.jsxs)(k.A,{controlId:"numberOfChat",label:"Number of chat",className:"mb-3",style:{zIndex:"0"},children:[(0,h.jsx)("input",{...t("numberOfChat",{required:!1}),type:"number",className:"form-control ps-0",placeholder:"Number of chat",onChange:e=>{K(e.target.value,"numberOfChat")}}),i.numberOfChat&&(0,h.jsx)(I.J,{title:"Please enter number of chat",modeError:!0,classNames:"ps-2",showStar:!0,type:""})]})}),(0,h.jsx)(o.A,{lg:12,md:6,children:(0,h.jsxs)(k.A,{controlId:"price",label:"Price",className:"mb-3",style:{zIndex:"0"},children:[(0,h.jsx)("input",{...t("price",{required:!0}),disabled:C,type:"number",className:"form-control ps-0",placeholder:"Price",onChange:e=>{K(e.target.value,"price")}}),i.Price&&(0,h.jsx)(I.J,{title:"Please enter price",modeError:!0,classNames:"ps-2",showStar:!0,type:""})]})}),(0,h.jsx)(o.A,{md:12,lg:12,className:"mb-3",children:(0,h.jsxs)("div",{className:"",children:[(0,h.jsxs)(b.A.Select,{...t("paymentStatus",{required:!0}),disabled:C,onChange:e=>{p.paymentStatus=e.target.value,r("paymentStatus",e.target.value),""!==p.paymentStatus&&c("paymentStatus")},"aria-label":"Select Platform mt-2 mb-2",children:[(0,h.jsx)("option",{value:"",selected:!0,disabled:!0,children:"Select Payment Status"}),(0,h.jsx)("option",{value:"PAID",selected:"PAID"===p.paymentStatus,children:"Paid"}),"PAYMENT_DUE"!==p.paymentStatus?(0,h.jsx)("option",{value:"PENDING",selected:"PENDING"===p.paymentStatus,children:"Pending"}):"","PAYMENT_DUE"!==p.paymentStatus?(0,h.jsx)("option",{value:"TRIAL",selected:"TRIAL"===p.paymentStatus,children:"Trial"}):"",""!==e.id?(0,h.jsx)("option",{value:"PAYMENT_DUE",selected:"PAYMENT_DUE"===p.paymentStatus,children:"Payment Due"}):""]}),i.paymentStatus&&(0,h.jsx)(I.J,{title:"Please select payment status",modeError:!0,showStar:!0,type:""})]})}),""!==p.paymentStatus&&"PENDING"!==p.paymentStatus?(0,h.jsxs)(l.A,{children:[(0,h.jsxs)(o.A,{lg:6,md:6,className:"mb-0",children:[(0,h.jsx)(pe.A,{...t("start_date"),date:p.start_date,selectDate:e=>{r("start_date",e)},minDate:new Date,isShowTop:!0}),L?(0,h.jsx)("div",{className:"mb-2 mt-0",children:(0,h.jsx)(I.J,{modeError:!0,title:"Select start date"})}):""]}),(0,h.jsxs)(o.A,{lg:6,md:6,className:"mb-0",children:[(0,h.jsx)(pe.A,{...t("end_date"),date:p.end_date,selectDate:e=>{r("end_date",e)},minDate:p.start_date,isShowTop:!0}),U?(0,h.jsx)("div",{className:"mb-2 mt-0",children:(0,h.jsx)(I.J,{modeError:!0,title:"Select end date"})}):""]}),P?(0,h.jsxs)("div",{className:"mt-0 mb-2",children:[" ",(0,h.jsx)(I.J,{modeError:!0,title:"End date must be greater than start date"})]}):""]}):""]}):"",(0,h.jsx)("div",{children:(0,h.jsx)(E.A,{type:"submit",className:"btn btn-brand-1 w-100",id:"save11",children:"Save"})})]})})]})},je=e=>{var s,t,n,i,c,d,m,u,x,p,j,_,w,C,E,I,O,P,M;const k=(0,A.d4)(e=>e.aT.aT),D=(0,G.zy)(),[R,L]=(0,a.useState)(!1),[B,H]=(0,a.useState)(!1),K=()=>{L(!1),re(!1),ce("")},[V,Y]=(0,a.useState)(!1),[W,Z]=(0,a.useState)(0),[q,J]=(0,a.useState)([]),[X,Q]=(0,a.useState)("status"),[ee,se]=(0,a.useState)("ASC"),[te,ne]=(0,a.useState)(1),[ae,re]=(0,a.useState)(!1),[ie,le]=(0,a.useState)(""),[oe,ce]=(0,a.useState)(""),[de,me]=(0,a.useState)(""),[ue,he]=(0,a.useState)("status"),[xe,pe]=(0,a.useState)(),[je,ve]=(0,a.useState)(0),[fe,ge]=(0,a.useState)(0),[Ae,_e]=(0,a.useState)(0),[Se,Ne]=(0,a.useState)(0),[ye,we]=(0,a.useState)(0),[Ce,Ee]=(0,a.useState)(0);(0,a.useEffect)(()=>{e.clientId&&Ie(e.clientId)},[X,ee,te,de,e.clientId]),(0,a.useEffect)(()=>{null!==D.state&&Oe()},[]);const Ie=e=>{Y(!0);const s={page:te.toString(),sort_by:X,order_by:ee,client_id:e,keyword:de};let t=new URLSearchParams(s).toString();return v.A.getAPI({action:"subscription/list-client?"+t,body:null,isShowError:!0,access_token:k}).then(e=>{J(e.list),Z(e.count),Y(!1)}).catch(e=>(J([]),f.oR.error(e.message),Y(!1),e))},Oe=()=>(Y(!0),v.A.getAPI({action:`current-subscription?client_id=${e.clientId}`,body:null,isShowError:!0,access_token:k}).then(e=>{pe(null===e||void 0===e?void 0:e.result),Z(null===e||void 0===e?void 0:e.count),Y(!1),ve(((null===e||void 0===e?void 0:e.result.client.numberOfUsers)-(null===e||void 0===e?void 0:e.result.subscription.numberOfUsers))*(null===e||void 0===e?void 0:e.result.subscription.costPerUser)),ge(((null===e||void 0===e?void 0:e.result.client.numberOfConnectors)-(null===e||void 0===e?void 0:e.result.subscription.numberOfConnectors))*(null===e||void 0===e?void 0:e.result.subscription.costPerConnector)),_e(((null===e||void 0===e?void 0:e.result.client.numberOfWebsites)-(null===e||void 0===e?void 0:e.result.subscription.numberOfWebsites))*(null===e||void 0===e?void 0:e.result.subscription.costPerWebsite)),Ne(((null===e||void 0===e?void 0:e.result.client.numberOfSMS)-(null===e||void 0===e?void 0:e.result.subscription.numberOfSMS))*(null===e||void 0===e?void 0:e.result.subscription.costperSMS)),we(((null===e||void 0===e?void 0:e.result.client.numberOfImessage)-(null===e||void 0===e?void 0:e.result.subscription.numberOfImessage))*(null!==e&&void 0!==e&&e.result.subscription.costPerImessage?null===e||void 0===e?void 0:e.result.subscription.costPerImessage:0)),Ee(((null===e||void 0===e?void 0:e.result.client.numberOfChat)-(null===e||void 0===e?void 0:e.result.subscription.numberOfChat))*(null!==e&&void 0!==e&&e.result.subscription.costPerChat?null===e||void 0===e?void 0:e.result.subscription.costPerChat:0))}).catch(e=>(Y(!1),e)));return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(l.A,{className:"justify-content-end",children:(0,h.jsx)(o.A,{md:6,className:"d-flex gap-3 justify-content-end mb-3",children:(0,h.jsxs)(S.A,{className:"table-search-box border",children:[(0,h.jsx)(S.A.Text,{id:"basic-addon1",children:(0,h.jsx)(F.IoSearchOutline,{className:"icon"})}),(0,h.jsx)(b.A.Control,{placeholder:"Search for anything",onKeyDown:e=>{"Enter"===e.key&&me(e.currentTarget.value)}})]})})}),(0,h.jsx)("div",{className:"table-card",children:(0,h.jsxs)(r.A,{className:"table-container-sub",children:[(0,h.jsxs)(N.A,{className:"table-style",children:[(0,h.jsx)("thead",{children:(0,h.jsxs)("tr",{children:[(0,h.jsxs)("th",{className:"cursor-pointer text-center",onClick:()=>{Q("plan_name"),he("plan_name")},children:["Plan Name","plan_name"===X&&"DESC"===ee&&"plan_name"===ue?(0,h.jsx)(U.MdOutlineKeyboardArrowDown,{className:"sort-icon cursor-pointer",size:14,onClick:()=>{se("ASC"),Q("plan_name"),he("plan_name")}}):"plan_name"===ue?(0,h.jsx)(U.MdOutlineKeyboardArrowUp,{className:"sort-icon cursor-pointer",size:14,onClick:()=>{se("DESC"),Q("plan_name")}}):""]}),(0,h.jsxs)("th",{className:"cursor-pointer text-center",onClick:()=>{Q("number_of_users"),he("number_of_users")},children:["# Of Emails","number_of_users"===X&&"DESC"===ee&&"number_of_users"===ue?(0,h.jsx)(U.MdOutlineKeyboardArrowDown,{className:"sort-icon cursor-pointer",size:14,onClick:()=>{se("ASC"),Q("number_of_users"),he("number_of_users")}}):"number_of_users"===ue?(0,h.jsx)(U.MdOutlineKeyboardArrowUp,{className:"sort-icon cursor-pointer",size:14,onClick:()=>{se("DESC"),Q("number_of_users")}}):""]}),(0,h.jsxs)("th",{className:"cursor-pointer text-center",onClick:()=>{Q("number_of_sms"),he("number_of_sms")},children:["# Of Text","number_of_sms"===X&&"DESC"===ee&&"number_of_sms"===ue?(0,h.jsx)(U.MdOutlineKeyboardArrowDown,{className:"sort-icon cursor-pointer",size:14,onClick:()=>{se("ASC"),Q("number_of_sms"),he("number_of_sms")}}):"number_of_sms"===ue?(0,h.jsx)(U.MdOutlineKeyboardArrowUp,{className:"sort-icon cursor-pointer",size:14,onClick:()=>{se("DESC"),Q("number_of_sms")}}):""]}),(0,h.jsxs)("th",{className:"cursor-pointer text-center",onClick:()=>{Q("number_of_websites"),he("number_of_websites")},children:["# Of Websites","number_of_websites"===X&&"DESC"===ee&&"number_of_websites"===ue?(0,h.jsx)(U.MdOutlineKeyboardArrowDown,{className:"sort-icon cursor-pointer",size:14,onClick:()=>{se("ASC"),Q("number_of_websites"),he("number_of_websites")}}):"number_of_websites"===ue?(0,h.jsx)(U.MdOutlineKeyboardArrowUp,{className:"sort-icon cursor-pointer",size:14,onClick:()=>{se("DESC"),Q("number_of_websites")}}):""]}),(0,h.jsxs)("th",{className:"cursor-pointer text-center",onClick:()=>{Q("number_of_connectors"),he("number_of_connectors")},children:["# Of Social","number_of_connectors"===X&&"DESC"===ee&&"number_of_connectors"===ue?(0,h.jsx)(U.MdOutlineKeyboardArrowDown,{className:"sort-icon cursor-pointer",size:14,onClick:()=>{se("ASC"),Q("number_of_connectors"),he("number_of_connectors")}}):"number_of_connectors"===ue?(0,h.jsx)(U.MdOutlineKeyboardArrowUp,{className:"sort-icon cursor-pointer",size:14,onClick:()=>{se("DESC"),Q("number_of_connectors")}}):""]}),(0,h.jsxs)("th",{className:"cursor-pointer text-center",onClick:()=>{Q("numberOfImessage"),he("numberOfImessage")},children:["# Of iMessage","numberOfImessage"===X&&"DESC"===ee&&"numberOfImessage"===ue?(0,h.jsx)(U.MdOutlineKeyboardArrowDown,{className:"sort-icon cursor-pointer",size:14,onClick:()=>{se("ASC"),Q("numberOfImessage"),he("numberOfImessage")}}):"numberOfImessage"===ue?(0,h.jsx)(U.MdOutlineKeyboardArrowUp,{className:"sort-icon cursor-pointer",size:14,onClick:()=>{se("DESC"),Q("numberOfImessage")}}):""]}),(0,h.jsxs)("th",{className:"cursor-pointer text-center",onClick:()=>{Q("numberOfChat"),he("numberOfChat")},children:["# Of Chat","numberOfChat"===X&&"DESC"===ee&&"numberOfChat"===ue?(0,h.jsx)(U.MdOutlineKeyboardArrowDown,{className:"sort-icon cursor-pointer",size:14,onClick:()=>{se("ASC"),Q("numberOfChat"),he("numberOfChat")}}):"numberOfChat"===ue?(0,h.jsx)(U.MdOutlineKeyboardArrowUp,{className:"sort-icon cursor-pointer",size:14,onClick:()=>{se("DESC"),Q("numberOfChat")}}):""]}),(0,h.jsx)("th",{className:"text-center",children:"Price"}),(0,h.jsxs)("th",{className:"cursor-pointer text-center",onClick:()=>{Q("paymentStatus"),he("paymentStatus")},children:["Payment Status","paymentStatus"===X&&"DESC"===ee&&"paymentStatus"===ue?(0,h.jsx)(U.MdOutlineKeyboardArrowDown,{className:"sort-icon cursor-pointer",size:14,onClick:()=>{se("ASC"),Q("paymentStatus"),he("paymentStatus")}}):"paymentStatus"===ue?(0,h.jsx)(U.MdOutlineKeyboardArrowUp,{className:"sort-icon cursor-pointer",size:14,onClick:()=>{se("DESC"),Q("paymentStatus")}}):""]}),(0,h.jsx)("th",{className:"text-center",children:"Status"}),(0,h.jsx)("th",{className:"text-center",children:"Start Date"}),(0,h.jsx)("th",{className:"text-center",children:"End Date"}),(0,h.jsx)("th",{className:"text-center",children:"Cancelled Date"})]})}),(0,h.jsx)("tbody",{children:V?(0,h.jsx)("tr",{children:(0,h.jsx)("td",{colSpan:12,children:(0,h.jsx)("div",{className:"table-wrap position-relative w-100",children:(0,h.jsx)("div",{className:"w-100",children:(0,h.jsx)(g.default,{customClass:"remove-loader-position"})})})})}):(0,h.jsx)(h.Fragment,{children:q&&q.length>0?q.map(e=>(0,h.jsxs)("tr",{children:[(0,h.jsx)("td",{className:"text-center",children:e.plan_name}),(0,h.jsx)("td",{className:"text-center",children:e.number_of_users}),(0,h.jsx)("td",{className:"text-center",children:e.numberOfSMS}),(0,h.jsx)("td",{className:"text-center",children:e.numberOfWebsites}),(0,h.jsx)("td",{className:"text-center",children:e.numberOfConnectors}),(0,h.jsx)("td",{className:"text-center",children:e.numberOfImessage}),(0,h.jsx)("td",{className:"text-center",children:e.numberOfChat}),(0,h.jsxs)("td",{className:"text-center text-nowrap",children:["$ ",e.price]}),(0,h.jsx)("td",{className:"text-center text-nowrap",children:(0,h.jsx)("span",{className:"PENDING"===e.paymentStatus?"status-badge pending":"PAID"===e.paymentStatus?"status-badge active":"TRIAL"===e.paymentStatus?"status-badge trial":"PAYMENT_DUE"===e.paymentStatus?"status-badge payment_due":"",children:e.paymentStatus.replaceAll("_"," ")})}),(0,h.jsx)("td",{style:{textAlign:"center"},children:(0,h.jsx)("span",{className:"ACTIVE"===e.status?"status-badge active":"CANCELLED"===e.status?"status-badge cancelled":"EXPIRED"===e.status?"status-badge expired":"",children:e.status})}),(0,h.jsx)("td",{className:"text-center text-nowrap",children:$()(e.start_date).local().format("MM-DD-YYYY")}
1),(0,h.jsx)("td",{className:"text-center text-nowrap",children:$()(e.end_date).local().format("MM-DD-YYYY")}),(0,h.jsx)("td",{className:"text-center",children:e.cancelled_at&&null!==e.cancelled_at?$()(e.cancelled_at).local().format("MM-DD-YYYY"):"-"})]})):(0,h.jsx)("tr",{children:(0,h.jsx)("td",{colSpan:12,children:(0,h.jsx)("div",{className:"table-wrap position-relative w-100",children:(0,h.jsx)("div",{className:"w-100",children:(0,h.jsxs)("div",{className:"text-center",style:{marginTop:"65px"},children:[(0,h.jsx)("img",{src:T.A,width:110,className:"mb-3"}),(0,h.jsx)("h3",{className:"text-secondary font-12",children:"No Record Found"})]})})})})})})})]}),(0,h.jsx)(z.A,{pagination:100,totalItems:W,changePage:e=>{ne(e)},changeCurrentPage:te})]})}),(!V&&q.length>0&&je+fe+Ae+Se+ye+Ce)>0?(0,h.jsx)("div",{className:"table-card",children:(0,h.jsxs)(r.A,{className:"table-container",children:[(0,h.jsx)("h5",{className:"mt-2",children:"Current Charges"}),(0,h.jsx)("div",{className:"table-card d-flex gap-2 align-items-center rounded-0 mb-3",children:(0,h.jsxs)(N.A,{className:"table-style",children:[(0,h.jsx)("thead",{children:(0,h.jsxs)("tr",{children:[(0,h.jsx)("th",{children:"Connectors"}),(0,h.jsx)("th",{style:{textAlign:"center"},children:"Additional Number"}),(0,h.jsx)("th",{style:{textAlign:"center"},children:"Cost Per Connector"}),(0,h.jsx)("th",{style:{textAlign:"center"},children:"Additional Amount"})]})}),(0,h.jsxs)("tbody",{children:[je>0?(0,h.jsxs)("tr",{children:[(0,h.jsx)("td",{children:"Email"}),(0,h.jsx)("td",{style:{textAlign:"center"},children:(null===xe||void 0===xe||null===(s=xe.client)||void 0===s?void 0:s.numberOfUsers)-(null===xe||void 0===xe||null===(t=xe.subscription)||void 0===t?void 0:t.numberOfUsers)}),(0,h.jsx)("td",{style:{textAlign:"center"},children:null===xe||void 0===xe||null===(n=xe.subscription)||void 0===n?void 0:n.costPerUser}),(0,h.jsxs)("td",{style:{textAlign:"center"},children:["$ ",je]})]}):"",fe>0?(0,h.jsxs)("tr",{children:[(0,h.jsx)("td",{children:"Social"}),(0,h.jsx)("td",{style:{textAlign:"center"},children:(null===xe||void 0===xe||null===(i=xe.client)||void 0===i?void 0:i.numberOfConnectors)-(null===xe||void 0===xe||null===(c=xe.subscription)||void 0===c?void 0:c.numberOfConnectors)}),(0,h.jsx)("td",{style:{textAlign:"center"},children:null===xe||void 0===xe||null===(d=xe.subscription)||void 0===d?void 0:d.costPerConnector}),(0,h.jsxs)("td",{style:{textAlign:"center"},children:["$ ",fe]})]}):"",Ae>0?(0,h.jsxs)("tr",{children:[(0,h.jsx)("td",{children:"Website"}),(0,h.jsx)("td",{style:{textAlign:"center"},children:(null===xe||void 0===xe||null===(m=xe.client)||void 0===m?void 0:m.numberOfWebsites)-(null===xe||void 0===xe||null===(u=xe.subscription)||void 0===u?void 0:u.numberOfWebsites)}),(0,h.jsx)("td",{style:{textAlign:"center"},children:null===xe||void 0===xe||null===(x=xe.subscription)||void 0===x?void 0:x.costPerWebsite}),(0,h.jsxs)("td",{style:{textAlign:"center"},children:["$ ",Ae]})]}):"",Se>0?(0,h.jsxs)("tr",{children:[(0,h.jsx)("td",{children:"Text"}),(0,h.jsx)("td",{style:{textAlign:"center"},children:(null===xe||void 0===xe||null===(p=xe.client)||void 0===p?void 0:p.numberOfSMS)-(null===xe||void 0===xe||null===(j=xe.subscription)||void 0===j?void 0:j.numberOfSMS)}),(0,h.jsx)("td",{style:{textAlign:"center"},children:null===xe||void 0===xe||null===(_=xe.subscription)||void 0===_?void 0:_.costperSMS}),(0,h.jsxs)("td",{style:{textAlign:"center"},children:["$ ",Se]})]}):"",ye>0?(0,h.jsxs)("tr",{children:[(0,h.jsx)("td",{children:"iMessage"}),(0,h.jsx)("td",{style:{textAlign:"center"},children:(null===xe||void 0===xe||null===(w=xe.client)||void 0===w?void 0:w.numberOfImessage)-(null===xe||void 0===xe||null===(C=xe.subscription)||void 0===C?void 0:C.numberOfImessage)}),(0,h.jsx)("td",{style:{textAlign:"center"},children:null===xe||void 0===xe||null===(E=xe.subscription)||void 0===E?void 0:E.costPerImessage}),(0,h.jsxs)("td",{style:{textAlign:"center"},children:["$ ",ye]})]}):"",Ce>0?(0,h.jsxs)("tr",{children:[(0,h.jsx)("td",{children:"Chat"}),(0,h.jsx)("td",{style:{textAlign:"center"},children:(null===xe||void 0===xe||null===(I=xe.client)||void 0===I?void 0:I.numberOfChat)-(null===xe||void 0===xe||null===(O=xe.subscription)||void 0===O?void 0:O.numberOfChat)}),(0,h.jsx)("td",{style:{textAlign:"center"},children:null===xe||void 0===xe||null===(P=xe.subscription)||void 0===P?void 0:P.costPerChat}),(0,h.jsxs)("td",{style:{textAlign:"center"},children:["$ ",Ce]})]}):"",(0,h.jsx)("tr",{children:(0,h.jsx)("td",{colSpan:5,children:(0,h.jsx)("hr",{})})}),(0,h.jsxs)("tr",{children:[(0,h.jsx)("td",{children:"Subtotal"}),(0,h.jsx)("td",{}),(0,h.jsx)("td",{}),(0,h.jsxs)("td",{style:{textAlign:"center"},children:["$ ",je+fe+Ae+Se+ye+Ce]})]}),(0,h.jsxs)("tr",{children:[(0,h.jsx)("td",{children:"Plan Price"}),(0,h.jsx)("td",{}),(0,h.jsx)("td",{}),(0,h.jsxs)("td",{style:{textAlign:"center"},children:["$ ",null===xe||void 0===xe?void 0:xe.price]})]}),(0,h.jsx)("tr",{children:(0,h.jsx)("td",{colSpan:5,children:(0,h.jsx)("hr",{})})}),(0,h.jsxs)("tr",{children:[(0,h.jsx)("td",{children:"Total"}),(0,h.jsx)("td",{}),(0,h.jsx)("td",{}),(0,h.jsxs)("td",{style:{textAlign:"center"},children:["$ ",je+fe+Ae+Se+ye+Ce+(null===xe||void 0===xe?void 0:xe.price)]})]})]})]})})]})}):"",(0,h.jsx)(y.A,{show:R,onHide:K,placement:"end",children:(0,h.jsx)(be,{id:oe,clientId:null!==(M=e.clientId)&&void 0!==M?M:e.clientId,closeCanvasFlag:s=>{s&&(Ie(e.clientId),e.changeInSubscription(!0)),K()}})})]})};var ve=t(93161);const fe=e=>{var s;const t=(0,A.d4)(e=>e.aT.aT),{register:n,handleSubmit:r,setValue:i,formState:{errors:l},clearErrors:o,setError:c,watch:d}=(0,u.mN)();let x=d();const{t:p}=(0,m.B)();(0,a.useEffect)(()=>{""!==e.id&&j(e.id)},[e.id]);const j=e=>v.A.getAPI({action:"client/user?user_id="+e,body:null,isShowError:!0,access_token:t}).then(e=>{}).catch(e=>(f.oR.error(e.message),e)),g=(e,s)=>{"userName"===s?(i("userName",e),o("userName"),""===x.userName&&c("userName",{type:"custom",message:""})):"password"===s&&(x.password=e,i("password",e),o("password"),""===x.password&&c("password",{type:"custom",message:""}))};return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(y.A.Header,{closeButton:!0,children:(0,h.jsx)(y.A.Title,{children:""===e.id?"Add FTP User":"Edit FTP User"})}),(0,h.jsx)(y.A.Body,{children:(0,h.jsxs)(b.A,{className:"w-100 form-style",name:"Verify",id:"Verify",onSubmit:r(()=>(x.clientId=e.clientId,v.A.addLoader("save11"),v.A.postAPI({action:"create/ftp/user",body:x,isShowError:!0,access_token:t}).then(s=>{f.oR.success(s.message),v.A.removeLoader("save11"),e.closeCanvasFlag(!0)}).catch(s=>(f.oR.error(s.message),v.A.removeLoader("save11"),e.closeCanvasFlag(!1),s)))),children:[(0,h.jsxs)("div",{className:"form-group",children:[(0,h.jsxs)("div",{className:"input-group mb-2",children:[(0,h.jsx)("span",{className:"input-group-text bg-white border-end-0 text-secondary",children:(0,h.jsx)(ve.EmZ,{size:16})}),(0,h.jsx)("input",{...n("userName",{required:"Please enter user name",pattern:{value:/^[a-zA-Z]+[a-zA-Z0-9]*$/,message:"Username must start with a letter and contain only alphanumeric characters (no spaces or special characters)"}}),type:"text",className:"form-control border-start-0 ps-0",placeholder:"User name",onChange:e=>{g(e.target.value,"userName")}})]}),l.userName&&(0,h.jsxs)("div",{className:"mb-4",children:[" ",(0,h.jsx)(I.J,{title:null===(s=l.userName.message)||void 0===s?void 0:s.toString(),modeError:!0,showStar:!0,type:""})]})]}),(0,h.jsx)("div",{className:"form-group mb-2",children:(0,h.jsx)("div",{className:"input-group mb-3 mt-1",children:(0,h.jsx)(R.A,{requiredMsg:{...n("password",{required:"Please enter password",pattern:{value:/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[@#$%^&+=!])(?=.*[a-zA-Z@#$%^&+=!]).{6,}$/,message:"Passwords should contain a combination of four character types[Uppercase letters +Lowercase letters + Numbers+Special Character]"}})},inputFieldClassName:"form-control border-end-0 border-start-0 ps-0",id:"",name:"",label:"Password",placeholder:p("Login.Password"),method:e=>{g(e.target.value,"password")},onError:l.password?(0,h.jsx)("div",{className:"mb-4",children:(0,h.jsx)(I.J,{title:l.password.message?l.password.message.toString():"",modeError:!0,showStar:!0,type:"password"})}):""})})}),(0,h.jsx)("div",{children:(0,h.jsx)(E.A,{type:"submit",className:"btn btn-brand-1 w-100",id:"save11",children:"Save"})})]})})]})},ge=e=>{var s;const t=(0,A.d4)(e=>e.aT.aT),[n,i]=(0,a.useState)(!1),c=()=>{i(!1),M("")},[d,m]=(0,a.useState)(!1),[u,x]=(0,a.useState)(0),[p,j]=(0,a.useState)([]),[_,w]=(0,a.useState)("createdDate"),[C,E]=(0,a.useState)("ASC"),[I,O]=(0,a.useState)(1),[P,M]=(0,a.useState)(""),[k,D]=(0,a.useState)(""),[R,L]=(0,a.useState)("user_name"),[B,$]=(0,a.useState)([]);(0,a.useEffect)(()=>{e.clientId&&H(e.clientId)},[_,C,I,k,e.clientId]);const H=e=>{m(!0);
1const s={page:I.toString(),sort_by:_,order_by:C,client_id:e,keyword:k};let n=new URLSearchParams(s).toString();return v.A.getAPI({action:"ftp/users/list?"+n,body:null,isShowError:!0,access_token:t}).then(e=>{j(e.list),x(e.count),m(!1)}).catch(e=>(j([]),f.oR.error(e.message),m(!1),e))},G=e=>{$(s=>s.includes(e)?s.filter(s=>s!==e):[...s,e])};return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(l.A,{className:" justify-content-end",children:(0,h.jsx)(o.A,{md:6,className:"d-flex gap-3 justify-content-end mb-3",children:(0,h.jsxs)(S.A,{className:"table-search-box border",children:[(0,h.jsx)(S.A.Text,{id:"basic-addon1",children:(0,h.jsx)(F.IoSearchOutline,{className:"icon"})}),(0,h.jsx)(b.A.Control,{placeholder:"Search for anything",onKeyDown:e=>{"Enter"===e.key&&D(e.currentTarget.value)}})]})})}),(0,h.jsx)("div",{className:"table-card",children:(0,h.jsxs)(r.A,{className:"table-container",children:[(0,h.jsxs)(N.A,{className:"table-style",children:[(0,h.jsx)("thead",{children:(0,h.jsxs)("tr",{children:[(0,h.jsxs)("th",{className:"cursor-pointer",onClick:()=>{w("user_name"),L("user_name")},children:["User Name","user_name"===_&&"DESC"===C&&"user_name"===R?(0,h.jsx)(U.MdOutlineKeyboardArrowDown,{className:"sort-icon cursor-pointer",size:14,onClick:()=>{E("ASC"),w("user_name"),L("user_name")}}):"user_name"===R?(0,h.jsx)(U.MdOutlineKeyboardArrowUp,{className:"sort-icon cursor-pointer",size:14,onClick:()=>{E("DESC"),w("user_name")}}):""]}),(0,h.jsxs)("th",{className:"cursor-pointer",onClick:()=>{w("password"),L("password")},children:["Password","password"===_&&"DESC"===C&&"password"===R?(0,h.jsx)(U.MdOutlineKeyboardArrowDown,{className:"sort-icon cursor-pointer",size:14,onClick:()=>{E("ASC"),w("password"),L("password")}}):"password"===R?(0,h.jsx)(U.MdOutlineKeyboardArrowUp,{className:"sort-icon cursor-pointer",size:14,onClick:()=>{E("DESC"),w("password")}}):""]}),(0,h.jsxs)("th",{className:"cursor-pointer",onClick:()=>{w("host_name"),L("host_name")},children:["Host Name","host_name"===_&&"DESC"===C&&"host_name"===R?(0,h.jsx)(U.MdOutlineKeyboardArrowDown,{className:"sort-icon cursor-pointer",size:14,onClick:()=>{E("ASC"),w("host_name"),L("host_name")}}):"host_name"===R?(0,h.jsx)(U.MdOutlineKeyboardArrowUp,{className:"sort-icon cursor-pointer",size:14,onClick:()=>{E("DESC"),w("host_name")}}):""]}),(0,h.jsxs)("th",{className:"cursor-pointer",onClick:()=>{w("port"),L("port")},children:["Port","port"===_&&"DESC"===C&&"port"===R?(0,h.jsx)(U.MdOutlineKeyboardArrowDown,{className:"sort-icon cursor-pointer",size:14,onClick:()=>{E("ASC"),w("port"),L("port")}}):"port"===R?(0,h.jsx)(U.MdOutlineKeyboardArrowUp,{className:"sort-icon cursor-pointer",size:14,onClick:()=>{E("DESC"),w("port")}}):""]})]})}),(0,h.jsx)("tbody",{children:d?(0,h.jsx)("tr",{children:(0,h.jsx)("td",{colSpan:6,children:(0,h.jsx)(g.default,{customClass:"remove-loader-height"})})}):(0,h.jsx)(h.Fragment,{children:p&&p.length>0?p.map(e=>{return(0,h.jsxs)("tr",{children:[(0,h.jsx)("td",{children:e.user_name}),(0,h.jsxs)("td",{width:"500px",children:[(0,h.jsx)("span",{className:"me-2 p-1 px-1",children:B.includes(e.id)?e.password:(s=e.password,s.replace(/./g,"*"))}),B.includes(e.id)?(0,h.jsx)(de.BsEye,{className:"cursor-pointer",size:16,onClick:()=>G(e.id)}):(0,h.jsx)(de.BsEyeSlash,{className:"cursor-pointer",size:16,onClick:()=>G(e.id)})]}),(0,h.jsx)("td",{children:e.host_name}),(0,h.jsx)("td",{children:e.port})]});var s}):(0,h.jsx)("tr",{children:(0,h.jsx)("td",{colSpan:6,children:(0,h.jsx)("div",{className:"table-wrap position-relative w-100",children:(0,h.jsx)("div",{className:"no-data-found1 w-100",children:(0,h.jsxs)("div",{className:"text-center",children:[(0,h.jsx)("img",{src:T.A,width:110,className:"mb-3"}),(0,h.jsx)("h3",{className:"text-secondary font-12",children:"No Record Found"})]})})})})})})})]}),(0,h.jsx)(z.A,{pagination:100,totalItems:u,changePage:e=>{O(e)},changeCurrentPage:I})]})}),(0,h.jsx)(y.A,{show:n,onHide:c,placement:"end",children:(0,h.jsx)(fe,{id:P,clientId:null!==(s=e.clientId)&&void 0!==s?s:e.clientId,closeCanvasFlag:s=>{s&&H(e.clientId),c()}})})]})};var Ae=t(3787);const _e=e=>{var s;const t=(0,A.d4)(e=>e.aT.aT),[n,i]=(0,a.useState)(!1),[l,c]=(0,a.useState)(1),[d,m]=(0,a.useState)("dateTime"),[x,p]=(0,a.useState)("DESC"),[_,S]=(0,a.useState)("dateTime"),[w,C]=(0,a.useState)([]),[O,P]=(0,a.useState)(0),[M,D]=(0,a.useState)(!1),[R,L]=(0,a.useState)(!1),[F,B]=(0,a.useState)(null),[H,G]=(0,a.useState)(!1),{register:K,handleSubmit:V,setValue:Y,formState:{errors:W},clearErrors:Z,setError:q,watch:J,reset:X}=(0,u.mN)();let Q=J();const{register:ee,handleSubmit:se,setValue:te,formState:{errors:ne},clearErrors:ae,setError:re,watch:ie,reset:le}=(0,u.mN)();let oe=ie();const[ce,de]=(0,a.useState)({value:"",label:"Select user"});(0,a.useEffect)(()=>{me()}
1,[l,d,x]);const me=()=>{i(!0);const s={page:l.toString(),client_id:e.clientId,sort_by:d,order_by:x};var n=new URLSearchParams(s).toString();return v.A.getAPI({action:"client-invoices?"+n,body:null,isShowError:!0,access_token:t}).then(e=>{C(null===e||void 0===e?void 0:e.list),P(null===e||void 0===e?void 0:e.count),i(!1)}).catch(e=>(i(!1),e))};return(0,h.jsxs)(h.Fragment,{children:[n?(0,h.jsx)(g.default,{}):(null===w||void 0===w?void 0:w.length)>0?(0,h.jsxs)("div",{className:"table-card",children:[(0,h.jsxs)(N.A,{className:"table-style",children:[(0,h.jsx)("thead",{children:(0,h.jsxs)("tr",{children:[(0,h.jsxs)("th",{onClick:()=>{m("invoice_number"),S("invoice_number")},children:["Invoice No","invoice_number"===d&&"DESC"===x&&"invoice_number"===_?(0,h.jsx)(U.MdOutlineKeyboardArrowDown,{className:"sort-icon cursor-pointer",size:14,onClick:()=>{p("ASC"),m("invoice_number")}}):"invoice_number"===_?(0,h.jsx)(U.MdOutlineKeyboardArrowUp,{className:"sort-icon cursor-pointer",size:14,onClick:()=>{p("DESC"),m("invoice_number")}}):""]}),(0,h.jsx)("th",{children:"Status"}),(0,h.jsxs)("th",{onClick:()=>{m("created_date"),S("created_date")},children:["Date","created_date"===d&&"DESC"===x&&"created_date"===_?(0,h.jsx)(U.MdOutlineKeyboardArrowDown,{className:"sort-icon cursor-pointer",size:14,onClick:()=>{p("ASC"),m("created_date"),S("created_date")}}):"created_date"===_?(0,h.jsx)(U.MdOutlineKeyboardArrowUp,{className:"sort-icon cursor-pointer",size:14,onClick:()=>{p("DESC"),m("created_date")}}):""]}),(0,h.jsxs)("th",{onClick:()=>{m("amount"),S("amount")},children:["Amount","amount"===d&&"DESC"===x&&"amount"===_?(0,h.jsx)(U.MdOutlineKeyboardArrowDown,{className:"sort-icon cursor-pointer",size:14,onClick:()=>{p("ASC"),m("amount"),S("amount")}}):"amount"===_?(0,h.jsx)(U.MdOutlineKeyboardArrowUp,{className:"sort-icon cursor-pointer",size:14,onClick:()=>{p("DESC"),m("amount")}}):""]}),(0,h.jsx)("th",{className:"",children:"Action"})]})}),(0,h.jsx)("tbody",{children:w&&w.length>0?w.map((e,s)=>(0,h.jsxs)("tr",{className:e.id,children:[(0,h.jsxs)("td",{children:[null===e||void 0===e?void 0:e.invoiceNumber," "]}),(0,h.jsx)("td",{children:(0,h.jsx)("span",{className:"PAID"==(null===e||void 0===e?void 0:e.transactionStatus)?"status-badge active":"PAYMENT_DUE"==(null===e||void 0===e?void 0:e.transactionStatus)?"status-badge payment_due":"status-badge trial",children:j.A.titleCase(null===e||void 0===e?void 0:e.transactionStatus).replaceAll("_"," ")})}),(0,h.jsx)("td",{children:$()(e.createdDate).format("MM-DD-YY hh:mm A")}),(0,h.jsxs)("td",{children:["$ ",e.amount]}),(0,h.jsx)("td",{children:(0,h.jsxs)("div",{className:"action-btns",style:{display:"flex",gap:"8px",justifyContent:"flex-start",alignItems:"center"},children:["PAID"===(null===e||void 0===e?void 0:e.transactionStatus)||"PAYMENT_DUE"===(null===e||void 0===e?void 0:e.transactionStatus)||"PENDING"===(null===e||void 0===e?void 0:e.transactionStatus)?(0,h.jsxs)(E.A,{className:"action-btn btn-view btn-light font-12",title:"View",onClick:()=>{var s;s=null===e||void 0===e?void 0:e.invoicePath,window.open(s)},children:[(0,h.jsx)(U.MdOutlineRemoveRedEye,{className:"align-text-top",size:16}),"View"]}):"","PAYMENT_DUE"===(null===e||void 0===e?void 0:e.transactionStatus)?(0,h.jsxs)(E.A,{className:"action-btn btn-trial btn-light font-12",title:"Send Mail",onClick:()=>{B(e.id),D(!0),ae("email"),le()},children:[(0,h.jsx)(Ae.tUM,{className:"align-text-top",size:12}),"Send Mail"]}):"","PAYMENT_DUE"===(null===e||void 0===e?void 0:e.transactionStatus)?(0,h.jsxs)(E.A,{className:"action-btn btn-delete btn-light font-12",style:{borderRadius:"15px"},title:"Send Mail",onClick:()=>{G(!0),Y("updatePaymentStatus","PAYMENT_DUE"),Y("trxId",e.id)},children:[(0,h.jsx)(U.MdOutlineModeEdit,{className:"align-text-top",size:12}),"Edit"]}):""]})}),(0,h.jsx)("td",{}),(0,h.jsx)("td",{})]})):""})]}),(0,h.jsx)(z.A,{pagination:100,totalItems:O,changePage:e=>{c(e)},changeCurrentPage:l})]}):(0,h.jsx)(r.A,{children:(0,h.jsx)("div",{className:"table-wrap position-relative w-100",children:(0,h.jsx)("div",{className:"no-data-found w-100",children:(0,h.jsxs)("div",{className:"text-center",children:[(0,h.jsx)("img",{src:T.A,width:110,className:"mb-3",alt:""}),(0,h.jsx)("h3",{className:"text-secondary font-12",children:"No Record Found"})]})})})}),(0,h.jsxs)(y.A,{show:M,onHide:()=>{L(!1),D(!1)},placement:"end",children:[(0,h.jsx)(y.A.Header,{closeButton:!0,children:(0,h.jsx)(y.A.Title,{children:"Send Email"})}),(0,h.jsx)(y.A.Body,{children:(0,h.jsxs)(b.A,{className:"form-style",onSubmit:se(()=>{v.A.addLoader("username_save_btn");var s={clientId:e.clientId,transactionId:F,email:oe.email};return v.A.postAPI({action:"payment/request",body:s,isShowError:!0,access_token:t}).then(e=>{f.oR.success(e.message),D(!1),v.A.removeLoader("username_save_btn"),de({value:"",label:"Select user"}),B(null)}
1).catch(e=>(f.oR.error(e.message),v.A.removeLoader("username_save_btn"),e))}),autoComplete:"off",children:[(0,h.jsx)(o.A,{lg:12,className:"mb-3",children:(0,h.jsxs)(k.A,{controlId:"Email",label:"Email",className:"mb-3",children:[(0,h.jsx)("input",{...ee("email",{required:"Please enter email",pattern:{value:/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,60}$/i,message:"Invalid email format"}}),type:"text",className:"form-control ps-0",placeholder:"Email",onChange:e=>{te("email",e.target.value)}}),ne.email&&(0,h.jsx)(I.J,{title:null===(s=ne.email.message)||void 0===s?void 0:s.toString(),modeError:!0,showStar:!0,type:""})]})}),(0,h.jsx)("div",{children:(0,h.jsx)(E.A,{type:"submit",id:"username_save_btn",className:"btn btn-brand-1 w-100",children:"Send Email"})})]})})]}),(0,h.jsxs)(y.A,{show:H,onHide:()=>{G(!1)},placement:"end",children:[(0,h.jsx)(y.A.Header,{closeButton:!0,children:(0,h.jsx)(y.A.Title,{children:"Edit Payment Status"})}),(0,h.jsx)(y.A.Body,{children:(0,h.jsxs)(b.A,{className:"form-style",onSubmit:V(()=>{v.A.addLoader("save-btn");const s={clientId:e.clientId,transactionId:Q.trxId,paymentStatus:Q.updatePaymentStatus};return v.A.putAPI({action:"inovice-status",body:s,isShowError:!0,access_token:t}).then(e=>{me(),Y("trxId",""),Y("updatePaymentStatus",""),v.A.removeLoader("save-btn"),G(!1)}).catch(e=>(v.A.removeLoader("save-btn"),e))}),autoComplete:"off",children:[(0,h.jsx)(o.A,{lg:12,className:"mb-3",children:(0,h.jsxs)(b.A.Select,{...K("updatePaymentStatus",{required:!0}),onChange:e=>{Y("updatePaymentStatus",e.target.value)},"aria-label":"Select Platform mt-2 mb-2",children:[(0,h.jsx)("option",{value:"",disabled:!0,children:"Select Payment Status"}),(0,h.jsx)("option",{value:"PAID",selected:"PAID"===Q.updatePaymentStatus,children:"Paid"}),(0,h.jsx)("option",{value:"PAYMENT_DUE",selected:"PAYMENT_DUE"===Q.updatePaymentStatus,children:"Payment Due"})]})}),(0,h.jsx)("div",{children:(0,h.jsx)(E.A,{type:"submit",id:"save-btn",className:"btn btn-brand-1 w-100",children:"Save"})})]})})]})]})},Se=e=>{var s;const t=(0,A.d4)(e=>e.aT.aT),n=(0,A.d4)(e=>{var s;return null===e||void 0===e||null===(s=e.profile)||void 0===s?void 0:s.otherService}),[r,i]=(0,a.useState)(!!n),[c,d]=(0,a.useState)(n||null),{register:m,handleSubmit:x,setValue:p,formState:{errors:j},watch:g,reset:_,clearErrors:S}=(0,u.mN)(),N=g();(0,a.useEffect)(()=>{_(),i(!!n),p("check",!!n),p("fromEmail",n),d(n)},[e.tab]),(0,a.useEffect)(()=>{N.check||(p("fromEmail",""),i(!1))},[N.check]);const y=s=>{if(!e.clientId)return!1;v.A.addLoader("other-email-save-btn");let n={clientId:e.clientId,fromEmail:s};return v.A.putAPI({action:"client/other-service",body:n,isShowError:!0,access_token:t}).then(e=>{d(s),f.oR.success(""!==s?"Enabled email other Text/SMS":"Disabled email other Text/SMS"),v.A.removeLoader("other-email-save-btn")}).catch(e=>(v.A.removeLoader("other-email-save-btn"),e))};return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(l.A,{className:"justify-content-between px-2",children:(0,h.jsx)(o.A,{md:6,className:"mb-3",children:(0,h.jsx)(b.A.Check,{type:"checkbox",id:"other-email-check",label:"Enable email Other Text/SMS",onChange:e=>{e.target.checked?(p("check",!0),i(!0)):(_(),p("fromEmail",""),p("check",!1),i(!1),c&&y(""))},checked:N.check||!1})})}),N.check&&(0,h.jsxs)(b.A,{className:"w-100 form-style",name:"Verify",id:"Verify",onSubmit:x(()=>y(N.fromEmail)),autoComplete:"off",children:[(0,h.jsx)(l.A,{className:"justify-content-between px-2",children:(0,h.jsx)(o.A,{md:12,lg:6,children:(0,h.jsxs)(k.A,{controlId:"fromEmail",label:"From Email",className:"mb-2",children:[(0,h.jsx)("input",{...m("fromEmail",{required:"Please enter from email",pattern:{value:/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i,message:"Please enter valid from email"}}),type:"text",className:"form-control ps-0 ",placeholder:"",onChange:e=>{S("fromEmail"),p("fromEmail",e.target.value)},autoComplete:"nope"}),j.fromEmail&&(0,h.jsx)(I.J,{title:null===(s=j.fromEmail.message)||void 0===s?void 0:s.toString(),modeError:!0,showStar:!0,type:""})]})})}),(0,h.jsx)("div",{className:"px-2",children:(0,h.jsx)(E.A,{type:"submit",className:"btn btn-brand-1 w-20",id:"other-email-save-btn",children:"Submit"})})]})]})};var Ne=t(88124),ye=t(7135);const we=e=>{var s;const t=(0,A.d4)(e=>e.aT.aT),{t:n}=(0,m.B)(),{register:i,handleSubmit:c,setValue:d,formState:{errors:x},clearErrors:p,setError:j,watch:_,reset:w,control:O}=(0,u.mN)();_();const{register:P,handleSubmit:M,setValue:D,formState:{errors:R},clearErrors:L,setError:B,watch:$}=(0,u.mN)();$();const[H,G]=(0,a.useState)(!1),[K,V]=(0,a.useState)(!1),[Y,W]=(0,a.useState)(""),[Z,q]=(0,a.useState)(!1),[J,X]=(0,a.useState)(!1),[Q,ee]=(0,a.useState)(0),[se,te]=(0,a.useState)([]),[ne,ae]=(0,a.useState)(""),[re,ie]=(0,a.useState)("DESC"),[le,oe]=(0,a.useState)(1),[ce,de]=(0,a.useState)(""),[me,ue]=(0,a.useState)(""),[he,xe]=(0,a.useState)(""),[pe,be]=(0,a.useState)("domain_name"),[je,ve]=(0,a.useState)(),[fe,ge]=(0,a.useState)(""),[Ae,_e]=(0,a.useState)(!1),[Se,we]=(0,a.useState)([]);(0,a.useEffect)(()=>{e.client&&(Ce(e.client.id),W(e.client.id))},[ne,re,le,e.client,he]);const Ce=e=>{X(!0);const s={page:""!==he?"1":le.toString(),sort_by:ne,order_by:re,id:e,keyword:he};let n=new URLSearchParams(s).toString();return v.A.postAPI({action:"client/domain-list?"+n,body:null,isShowError:!0,access_token:t}).then(e=>{te(e.list),ee(e.count),X(!1)}).catch(e=>(f.oR.error(e.message),X(!1),e))};return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(l.A,{className:" justify-content-end",children:(0,h.jsxs)(o.A,{md:6,className:"d-flex gap-3 justify-content-end mb-3",children:[(0,h.jsxs)(S.A,{className:"table-search-box border",children:[(0,h.jsx)(S.A.Text,{id:"basic-addon1",children:(0,h.jsx)(F.IoSearchOutline,{className:"icon"})}),(0,h.jsx)(b.A.Control,{placeholder:"Search for domain",onKeyDown:e=>{"Enter"===e.key&&xe(e.currentTarget.value)}})]}),(0,h.jsx)(E.A,{className:"btn-brand-1 text-nowrap",onClick:()=>{G(!0),w()},children:"+ Add"}),(0,h.jsxs)(E.A,{className:"btn-brand-light text-nowrap",onClick:()=>{ve(null),q(!0)},children:[(0,h.jsx)(ye.kvS,{size:18,className:"me-1"}),"Import"]})]})}),(0,h.jsxs)("div",{className:"table-card",children:[(0,h.jsx)(r.A,{className:"table-container",children:(0,h.jsxs)(N.A,{className:"table-style",children:[(0,h.jsx)("thead",{children:(0,h.jsxs)("tr",{children:[(0,h.jsxs)("th",{onClick:()=>{ae("domain_name"),be("domain_name")},children:["Domain","domain_name"===ne&&"DESC"===re&&"domain_name"===pe?(0,h.jsx)(U.MdOutlineKeyboardArrowDown,{className:"sort-icon cursor-pointer",size:14,onClick:()=>{ie("ASC"),ae("domain_name"),be("domain_name")}}):"domain_name"===pe?(0,h.jsx)(U.MdOutlineKeyboardArrowUp,{className:"sort-icon cursor-pointer",size:14,onClick:()=>{ie("DESC"),ae("domain_name")}}):""]}),(0,h.jsx)("th",{className:"",children:n("Common.action")})]})}),(0,h.jsx)("tbody",{children:J?(0,h.jsx)("tr",{children:(0,h.jsx)("td",{colSpan:6,children:(0,h.jsx)(g.default,{customClass:"remove-loader-height"})})}):se.length>0?se.map((s,t)=>(0,h.jsxs)("tr",{children:[(0,h.jsx)("td",{children:s.name}),(0,h.jsx)("td",{children:(0,h.jsx)("div",{className:"action-btns",style:{display:"flex",gap:"8px",justifyContent:"flex-start",alignItems:"center"},children:(0,h.jsx)(E.A,{className:"action-btn btn-delete",title:"Delete",onClick:()=>{de(`client/domain-delete?client_id=${e.client.id}&domain_id=${s.id}`),V(!0)},children:(0,h.jsx)(C.PiTrash,{className:"icon"})})})})]})):(0,h.jsx)("tr",{children:(0,h.jsx)("td",{colSpan:12,children:(0,h.jsx)("div",{className:"table-wrap position-relative w-100",children:(0,h.jsx)("div",{className:"no-data-found w-100",children:(0,h.jsxs)("div",{className:"text-center",children:[(0,h.jsx)("img",{src:T.A,width:110,className:"mb-3",alt:""}),(0,h.jsx)("h3",{className:"text-secondary font-12",children:n("Common.No_Record_Found")})]})})})})})})]})}),(0,h.jsx)(z.A,{pagination:100,totalItems:Q,changePage:e=>{oe(e)},changeCurrentPage:le})]}),(0,h.jsxs)(y.A,{show:H,onHide:()=>G(!1),placement:"end",children:[(0,h.jsx)(y.A.Header,{closeButton:!0,children:(0,h.jsx)(y.A.Title,{children:"Add Domain"})}),(0,h.jsx)(y.A.Body,{children:(0,h.jsxs)(b.A,{className:"form-style",onSubmit:c(()=>{let s={id:e.client.id,domains:Se.toString()};return v.A.addLoader("domain_add_btn"),v.A.postAPI({action:"client-domain",body:s,isShowError:!0,access_token:t}).then(s=>{f.oR.success(s.message),Ce(e.client.id),G(!1),v.A.removeLoader("domain_add_btn")}).catch(e=>(f.oR.error(e.message),v.A.removeLoader("domain_add_btn"),e))}),children:[(0,h.jsxs)("div",{className:"mt-1 mb-3",children:[(0,h.jsx)(u.xI,{name:"domain",control:O,rules:{required:"Please enter domain",validate:e=>{var s,t;const n=null===e||void 0===e||null===(s=e.split(","))||void 0===s?void 0:s.map(e=>null===e||void 0===e?void 0:e.trim()),a=/^(([a-zA-Z]{1})|([a-zA-Z]{1}[a-zA-Z]{1})|([a-zA-Z]{1}[0-9]{1})|([0-9]{1}[a-zA-Z]{1})|([a-zA-Z0-9][a-zA-Z0-9-_]{1,61}[a-zA-Z0-9]))\.([a-zA-Z0-9-]+\.[a-zA-Z0-9-]+|[a-zA-Z0-9-]+)$/i;if((null===n||void 0===n||null===(t=n.filter(e=>""!==e))||void 0===t?void 0:t.length)>0){for(const e of n)if(!a.test(e))return"Please enter a valid domain (e.g., gmail.com) or a comma-separated list of such domains (e.g., gmail.com, yahoo.co.in)";return!0}}},render:e=>{let{field:s}=e;return(0,h.jsx)(k.A,{controlId:"domain",label:"Domain",children:(0,h.jsx)(b.A.Control,{type:"text",onCh
1ange:e=>{s.onChange(e);const t=e.target.value.split(",").map(e=>e.trim());we(t)},placeholder:"Domain"})})}}),x.domain&&(0,h.jsx)(I.J,{title:null===(s=x.domain.message)||void 0===s?void 0:s.toString(),modeError:!0,showStar:!0,type:""})]}),(0,h.jsx)("div",{children:(0,h.jsx)(E.A,{type:"submit",id:"domain_add_btn",className:"btn btn-brand-1 w-100 mt-2",children:"Save"})})]})})]}),(0,h.jsxs)(y.A,{show:Z,onHide:()=>q(!1),placement:"end",children:[(0,h.jsx)(y.A.Header,{closeButton:!0,children:(0,h.jsx)(y.A.Title,{children:"Import"})}),(0,h.jsx)(y.A.Body,{children:(0,h.jsxs)(b.A,{className:"form-style",onSubmit:M(()=>je?(null===je||void 0===je?void 0:je.size)>5368709120?(_e(!0),void ge("File size must be less than 5GB")):"csv"!=(null===je||void 0===je?void 0:je.name.split(".")[1])&&"csv"!=(null===je||void 0===je?void 0:je.name.split(".")[1])?(_e(!0),void ge("Please select csv file")):(_e(!1),ge(""),v.A.addLoader("domain_import_btn"),v.A.uploadAPI({action:`import-domain?client_id=${e.client.id}`,body:null,_file:je,key:"file",access_token:t}).then(s=>{f.oR.success(s.message),Ce(e.client.id),q(!1),v.A.removeLoader("domain_import_btn")}).catch(e=>{var s,t,n,a;null!==e&&void 0!==e&&null!==(s=e.response)&&void 0!==s&&null!==(t=s.data)&&void 0!==t&&t.message&&f.oR.error(null===e||void 0===e||null===(n=e.response)||void 0===n||null===(a=n.data)||void 0===a?void 0:a.message);return q(!1),v.A.removeLoader("domain_import_btn"),[]})):(_e(!0),void ge("Please select csv file"))),children:[(0,h.jsxs)("div",{className:"upload-btn-container mb-2",children:[(0,h.jsxs)("label",{htmlFor:"fileImport",children:[(0,h.jsx)(C.PiUploadSimple,{size:18,className:"me-3"}),je?null===je||void 0===je?void 0:je.name:"Upload"]}),(0,h.jsx)("input",{...P("fileImport",{required:!1}),type:"file",id:"fileImport",accept:" ",onChange:e=>{e.target.files&&(ve(e.target.files[0]),D("fileImport",e.target.files[0]),_e(!1),ge(""))}})]}),(0,h.jsx)(l.A,{children:(0,h.jsxs)(o.A,{className:"font-12 text-secondary",children:["*You can upload csv file",Ae?(0,h.jsx)(I.J,{title:fe,modeError:!0}):""]})}),(0,h.jsx)("div",{children:(0,h.jsx)(E.A,{type:"submit",id:"domain_import_btn",className:"btn btn-brand-1 w-100 mt-2",children:"Import"})}),(0,h.jsx)("div",{style:{textAlign:"end",marginBottom:"10px"},children:(0,h.jsx)("a",{className:"font-12",style:{color:"#0000FF",cursor:"pointer"},href:"/import-domain-sample.csv",download:"import-domain-sample.csv",children:"Download sample file"})})]})})]}),(0,h.jsx)(Ne.A,{action:ce,show:K,onDelete:s=>(s&&Ce(e.client.id),void V(!1)),type:"",deleteMethod:"DELETE"})]})};
1var Ce=t(71145),Ee=t(4295);const Ie=()=>{const e=(0,A.d4)(e=>e.aT.aT),s=(0,A.d4)(e=>{var s;return null===e||void 0===e||null===(s=e.profile)||void 0===s?void 0:s.setOtherServiceOn}),[t,n]=((0,A.wA)(),(0,a.useState)(null));let m=(0,G.g)();const[u,b]=(0,a.useState)(null),[j,f]=(0,a.useState)(""),[S,N]=(0,a.useState)(!1),[y,w]=(0,a.useState)("TabInvoice"),[C,E]=(0,a.useState)(""),[I,O]=(0,a.useState)([]);(0,a.useEffect)(()=>{m.id&&(P(m.id),M(m.id))},[m.id]);const P=s=>(f(""),v.A.getAPI({action:"client/"+s,body:null,isShowError:!0,access_token:e}).then(e=>{n(e),e.client_subscription&&"ACTIVE"===e.client_subscription.status&&f("ACTIVE")}).catch(e=>e)),M=s=>(N(!0),v.A.getAPI({action:"client/info/"+s,body:null,isShowError:!0,access_token:e}).then(e=>{0===Object.keys(e).length?b(null):(b(e),O(e.user_integrations)),N(!1)}).catch(e=>(N(!1),e)));return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(Ce.A,{}),(0,h.jsxs)("div",{id:"main-app",className:"layout-veritcle-menu",children:[(0,h.jsx)(Ee.A,{}),(0,h.jsx)("div",{className:"app-body",children:(0,h.jsxs)("div",{className:"page-contetn page-flagging",children:[(0,h.jsx)("div",{className:"d-flex justify-content-between align-items-center mb-3",children:(0,h.jsx)(d.A,{Title:"View Client",subTitle:t&&t.name})}),S?(0,h.jsx)(g.default,{customClass:"component-loader1"}):(0,h.jsx)(r.A,{className:"content-card",style:{minHeight:"300px"},children:(0,h.jsxs)(i.A.Container,{id:"left-tabs-example",defaultActiveKey:y,children:[(0,h.jsxs)(l.A,{children:[(0,h.jsx)(o.A,{children:(0,h.jsx)(c.A,{variant:"pills",className:"tab-style-1 mb-3",style:{backgroundColor:"#f0eeee"},children:null!==u&&"ACTIVE"===j?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(c.A.Item,{children:(0,h.jsx)(c.A.Link,{eventKey:"TabInvoice",onClick:()=>{E("")},children:"Invoice"})}),(0,h.jsx)(c.A.Item,{children:(0,h.jsx)(c.A.Link,{eventKey:"TabUsers",onClick:()=>{E("")},children:"Users"})}),(0,h.jsx)(c.A.Item,{children:(0,h.jsx)(c.A.Link,{eventKey:"TabConnectors",onClick:()=>{E("Connect")},children:"Connectors"})}),(0,h.jsx)(c.A.Item,{children:(0,h.jsx)(c.A.Link,{eventKey:"TabEncryption",children:"Encryption"})}),(0,h.jsx)(c.A.Item,{children:(0,h.jsx)(c.A.Link,{eventKey:"TabFTP",children:"FTP"})}),s&&(0,h.jsx)(c.A.Item,{children:(0,h.jsx)(c.A.Link,{eventKey:"TabOther",onClick:()=>{E("TabOther")},children:"Other"})}),(0,h.jsx)(c.A.Item,{children:(0,h.jsx)(c.A.Link,{eventKey:"TabDomain",children:"Domains"})})]}):""})}),(0,h.jsx)(o.A,{className:"d-flex gap-3 justify-content-end align-items-start"})]}),(0,h.jsxs)(i.A.Content,{children:[(0,h.jsx)(i.A.Pane,{eventKey:"TabGenral",children:(0,h.jsx)(x,{client:t,clientInfo:u,sendData:e=>{"updated"===e&&(M(m.id),w("TabGenral"))}})}),(0,h.jsx)(i.A.Pane,{eventKey:"TabLocation",children:(0,h.jsx)(p,{client:t})}),(0,h.jsx)(i.A.Pane,{eventKey:"TabFeatures",children:(0,h.jsx)(_,{client:t,clientInfo:u,sendData:(e,s)=>{"updated"===e&&(M(m.id),t.on_demand_encryption=s.on_demand_encryption,t.importer=s.importer,t.unified_achiever=s.unified_achiever,t.new_review_system=s.new_review_system,t.voice_calls=s.voice_calls,w("TabFeatures"))}})}),(0,h.jsx)(i.A.Pane,{eventKey:"TabSubscription",children:(0,h.jsx)(je,{clientId:m.id,changeInSubscription:e=>{e&&m.id?(f("ACTIVE"),M(m.id)):f("INACTIVE"),w("TabSubscription")}})}),(0,h.jsx)(i.A.Pane,{eventKey:"TabInvoice",children:(0,h.jsx)(_e,{clientId:m.id})}),(0,h.jsx)(i.A.Pane,{eventKey:"TabUsers",children:(0,h.jsx)(H,{client:t})}),(0,h.jsx)(i.A.Pane,{eventKey:"TabConnectors",children:(0,h.jsx)(xe,{client:t,tab:C,currentSubscriptionList:I})}),(0,h.jsx)(i.A.Pane,{eventKey:"TabEncryption",children:(0,h.jsx)(K,{client:t})}),(0,h.jsx)(i.A.Pane,{eventKey:"TabFTP",children:(0,h.jsx)(ge,{clientId:m.id})}),(0,h.jsx)(i.A.Pane,{eventKey:"TabOther",children:(0,h.jsx)(Se,{tab:C,clientId:m.id})}),(0,h.jsx)(i.A.Pane,{eventKey:"TabDomain",children:(0,h.jsx)(we,{tab:C,client:t})})]})]})})]})})]})]})}},36241(){},63168(e,s,t){e.exports=t.p+"static/media/dashboard-loader.d7c1531fc46f80e20598.gif"}}]);
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.