PageSourceSearch

https://dealcompass.co/static/js/8384.012eab51.chunk.js

js dealcompass.co collected 2026-10-04 23:45:26 UTC 31,121 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[8384],{29941:(e,t,l)=>{l.r(t),l.d(t,{HeatMapEditMode:()=>F,default:()=>A});var i=l(89379),r=l(65043),n=l(24966),o=l(90801),a=l(70565),s=l(90442),d=l(91368);const p=l.p+"static/media/googleMapIcon.b3a6ffdd64a03c26fc22.webp";var c=l(76234),x=l(22285),u=l(67863),g=l(12543),h=l(51238),v=l(2364),f=l(5685),y=l(85369),D=l(95263),m=l(80140),j=l(70579);const I=e=>{let{isOpen:t,onClose:l,dealFilters:n,setDealFilters:a,datasets:s,setDatasets:d,currentDataset:p}=e;const{dealHeaderColumns:x,contactHeaderColumns:u}=(0,r.useContext)(o.C),g=(0,r.useMemo)(()=>{var e;return null===(e=s.find(e=>e.DatasetID===(null===p||void 0===p?void 0:p.DatasetID)))||void 0===e?void 0:e.DataType},[s,p]),h=(0,r.useMemo)(()=>"Deals"===g?x.filter(e=>"Dropdown"!==e.CellType&&"Multi-Select"!==e.CellType).map(e=>e.HeaderColumnID.toString()):u.filter(e=>"Dropdown"!==e.CellType&&"Multi-Select"!==e.CellType&&"Number"===e.DataType).map(e=>e.HeaderColumnID.toString()),[x,u,g]),[v,f]=(0,r.useState)(""),[I,b]=(0,r.useState)(""),[C,S]=(0,r.useState)("");return t?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)("div",{style:{position:"fixed",top:"0",right:"0",width:"100vw",height:"100vh",zIndex:"2000",background:"rgba(0,0,0,0.1)"},onClick:()=>{console.log("Background clicked"),l(!1)}}),(0,j.jsxs)("div",{style:{position:"fixed",top:"calc(50vh - 200px)",left:"calc(50vw - 300px)",width:"600px",height:"400px",zIndex:"2001",background:"white",borderRadius:"4px",padding:"10px",display:"flex",flexDirection:"column"},children:[(0,j.jsx)("p",{style:{fontSize:"18px",fontWeight:"600"},children:"Filters"}),(0,j.jsxs)("div",{style:{display:"flex",padding:"10px",justifyContent:"space-between",alignItems:"center"},children:[(0,j.jsxs)("select",{onChange:e=>{f(e.target.value)},value:v,style:{border:"1px solid rgb(209,209,209)",padding:"5px",borderRadius:"3px"},children:[(0,j.jsx)("option",{value:"",children:"Select Column"}),"Deals"===g?x.filter(e=>"Dropdown"!==e.CellType&&"Multi-Select"!==e.CellType).map((e,t)=>(0,j.jsx)("option",{value:e.HeaderColumnID,children:e.Name},t)):u.filter(e=>"Dropdown"!==e.CellType&&"Multi-Select"!==e.CellType).map((e,t)=>(0,j.jsx)("option",{value:e.HeaderColumnID,children:e.Name},t))]}),(0,j.jsxs)("select",{onChange:e=>{b(e.target.value)},value:I,style:{border:"1px solid rgb(209,209,209)",padding:"5px",borderRadius:"3px"},children:[(0,j.jsx)("option",{value:"",children:"Select Operator"}),(0,j.jsx)("option",{value:"=",children:"Equals"}),(0,j.jsx)("option",{value:"!=",children:"Not Equals"}),(0,j.jsx)("option",{value:">",children:"Greater Than"}),(0,j.jsx)("option",{value:"<",children:"Less Than"}),(0,j.jsx)("option",{value:"<=",children:"Less Than or Equals"}),(0,j.jsx)("option",{value:">=",children:"Greater Than or Equals"})]}),(0,j.jsx)("input",{type:"text",placeholder:"Enter Value",value:C,onChange:e=>{S(e.target.value)},style:{border:"1px solid rgb(209,209,209)",padding:"5px",borderRadius:"3px"}}),(0,j.jsx)("div",{onClick:()=>{""!==v&&""!==I&&""!==C&&(a(e=>{const t=e.findIndex(e=>e.colId.toString()===v.toString());if(-1!==t){const l=[...e],r=l[t],n=(0,i.A)((0,i.A)({},r),{},{filters:[...r.filters,{operator:I,value:C}]});return l[t]=n,console.log(l),d(e=>e.map(e=>e.DatasetID===p.DatasetID?(0,i.A)((0,i.A)({},e),{},{dealFilters:l}):e)),l}{const t=[...e,{colId:v,filters:[{operator:I,value:C}]}];return console.log(t),d(e=>e.map(e=>e.DatasetID===p.DatasetID?(0,i.A)((0,i.A)({},e),{},{dealFilters:t}):e)),t}}),f(""),b(""),S(""))},style:{display:"flex",alignItems:"center",justifyContent:"center",background:""===v||""===I||""===C?"rgb(230,230,230)":"rgb(38,42,91)",cursor:""===v||""===I||""===C?"not-allowed":"pointer",padding:"5px",borderRadius:"3px"},children:(0,j.jsx)(D.OiG,{style:{color:""===v||""===I||""===C?"rgb(150,150,150)":"white"}})})]}),(0,j.jsx)("div",{style:{flex:"1",minHeight:"0",width:"100%",overflow:"hidden",display:"flex",flexDirection:"column"},children:(0,j.jsx)(c.A,{autoHide:!1,style:{flex:"1",minHeight:"0",width:"100%",marginTop:"20px"},children:(0,j.jsxs)("div",{style:{paddingLeft:"25px",display:"flex",flexDirection:"column",gap:"20px"},children:[0===n.filter(e=>h.includes(e.colId.toString())&&e.filters.length>0).length&&(0,j.jsx)("div",{style:{color:"rgb(150,150,150)"},children:"No additional filters added"}),n.filter(e=>h.includes(e.colId.toString())&&e.filters.length>0).map((e,t)=>{const l="Deals"===g?x.find(t=>t.HeaderColumnID.toString()===e.colId.toString()):u.find(t=>t.HeaderColumnID.toString()===e.colId.toString());return(0,j.jsxs)("div",{children:[(0,j.jsx)("div",{children:"Deals"===g?x.find(t=>t.HeaderColumnID.toString()===e.colId).Name:u.find(t=>t.HeaderColumnID.toString()===e.colId).Name}),(0,j.jsx)("div",{style:{marginLeft:"25px",fontSize:"14px",borderLeft:"3px solid rgb(38,42,91)",padding:"5px 10px",display:"flex",flexDirection:"column",gap:"10px"},children:e.filters.map((t,r)=>{var n;return(0,j.jsxs)("div",{children:[(0,j.jsxs)("div",{style:{display:"flex",gap:"5px"},children:[(0,j.jsx)("div",{children:"="===t.operator?"Equals":"!="===t.operator?"Does not equal":">"===t.operator?"Is greater than":"<"===t.operator?"Is less than":"<="===t.operator?"Is less than or equal to":">="===t.operator?"Is greater than or equal to":""}),(0,j.jsx)("div",{children:(0,m.RA)(l,t.value)}),(0,j.jsx)("div",{style:{cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",marginLeft:"15px"},onClick:()=>{a(t=>{const l=[...t],n=l.findIndex(t=>t.colId.toString()===e.colId.toString()),o=l[n],a=(0,i.A)((0,i.A)({},o),{},{filters:o.filters.filter((e,t)=>
1t!==r)});return l[n]=a,d(e=>e.map(e=>e.DatasetID===p.DatasetID?(0,i.A)((0,i.A)({},e),{},{dealFilters:l}):e)),l})},children:(0,j.jsx)(y.H8h,{style:{color:"rgb(150,150,150)"}})})]}),(null===(n=e.filters)||void 0===n?void 0:n.length)>0&&r!==e.filters.length-1&&(0,j.jsx)("div",{style:{marginTop:"10px",marginLeft:"20px",color:"rgb(150,150,150)"},children:"or"})]},r)})}),t!==n.filter(e=>h.includes(e.colId.toString())&&e.filters.length>0).length-1&&(0,j.jsx)("div",{style:{marginTop:"10px",marginLeft:"50px",color:"rgb(150,150,150)"},children:"and"})]},t)})]})})}),(0,j.jsx)("div",{style:{width:"100%",display:"flex",justifyContent:"center",alignItems:"center"},children:(0,j.jsx)("div",{style:{border:"1px solid rgb(209,209,209)",padding:"5px 10px",borderRadius:"2px",cursor:"pointer"},onClick:()=>{l(!1)},children:"Done"})})]})]}):null};var b=l(33865);const C=e=>{let{marker:t,glyph:l}=e;return(0,j.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64",width:"32",height:"32",children:[(0,j.jsx)("title",{children:"map pin"}),(0,j.jsxs)("g",{transform:"matrix(.18403 0 0 .17534 214.35 -157.87)",children:[(0,j.jsx)("path",{d:"M-995.72 1225.8c-0.2729-0.7794-1.645-6.0275-3.049-11.662-4.441-17.823-12.122-36.988-22.546-56.255-5.9844-11.061-7.0667-12.824-24.551-40-28.252-43.911-33.217-56.241-32.173-79.89 0.9573-21.672 8.2717-37.909 24.149-53.61 13.179-13.032 27.807-20.549 45.601-23.432 44.097-7.1446 86.878 21.883 95.546 64.828 2.0208 10.012 1.5723 27.243-0.95271 36.604-2.77 10.269-13.883 31.045-29.589 55.315-28.348 43.807-39.082 65.687-47.119 96.05-3.1117 11.755-4.3985 14.673-5.3161 12.052z",fill:t,stroke:t,strokeWidth:"5.7"}),(0,j.jsx)("path",{d:"M-962.86 1042.4c0 16.568-14.071 30-31.429 30-17.357 0-31.429-13.432-31.429-30 0-16.569 14.071-30 31.429-30s31.429 13.431 31.429 30z",fill:l,transform:"matrix(1.0955 0 0 1.0955 94.909 -88.07)"})]})]})};var S=l(70649),w=l(34960),k=l(82235);const A=e=>{var t;let{gl:l,currentDash:c,widget:x,mapRef:h,randomLocations:v}=e;const f=(0,r.useRef)(x),{userProfile:y}=(0,r.useContext)(g.cy),[D,m]=(0,r.useState)(!1),{setDashboards:I,dashboards:b,sendJsonMessage:C,sendFailedMessage:w}=(0,r.useContext)(o.C),{triggerLoadAlert:A,triggerSuccessAlert:F,triggerFailAlert:T}=(0,r.useContext)(d.Y),{isLoaded:N}=(0,r.useContext)(s.Rd),R=(0,r.useCallback)(async()=>{try{var e,t;m(!0);const r=await(0,a.qw)(f.current,null,"GET_MAP_TILE"),n=r.filter(e=>{var t,l;return e.location&&null!==(null===(t=e.location)||void 0===t?void 0:t.lat)&&null!==(null===(l=e.location)||void 0===l?void 0:l.lng)});var l,i;return(0,u.ne)(n,null===(e=f.current)||void 0===e?void 0:e.center,null===(t=f.current)||void 0===t?void 0:t.zoom,L),console.log("geocodedLocations",n),r?void 0:(m(!1),void(0,u.ne)([],null===(l=f.current)||void 0===l?void 0:l.center,null===(i=f.current)||void 0===i?void 0:i.zoom,L))}catch(o){var r,n;return m(!1),void(0,u.ne)([],null===(r=f.current)||void 0===r?void 0:r.center,null===(n=f.current)||void 0===n?void 0:n.zoom,L)}finally{m(!1)}},[]),[H,L]=(0,r.useState)(null);(0,r.useEffect)(()=>{setTimeout(()=>{R()},400)},[R,c]),(0,r.useEffect)(()=>{var e;(null===(e=f.current)||void 0===e?void 0:e.mapid)!==(null===x||void 0===x?void 0:x.mapid)&&(f.current=x,R())},[x,R]),(0,r.useEffect)(()=>{f.current=x},[x]);const[M,z]=(0,r.useState)(!1),[E,G]=(0,r.useState)(!1),[W,O]=(0,r.useState)(!1);return N?(0,j.jsxs)("div",{style:{height:"calc(100% - 10px)",width:"100%",position:"relative",display:"flex",marginTop:"10px",flexDirection:"column"},children:[(0,j.jsx)("h4",{children:null===x||void 0===x?void 0:x.Name}),(!x.Location||!x.ContactLocation)&&(0,j.jsx)("div",{style:{position:"absolute",top:"-20px",left:"calc(50% - 150px)",width:"300px",color:"red",fontSize:"12px"},children:"Please specify location columns in settings"}),(0,j.jsxs)("div",{id:"map",ref:h,style:{flex:"1",minHeight:"0",width:"100%",display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column",gap:"10px",border:"1px solid rgb(209,209,209)",background:"rgb(202,223,232)"},children:[(0,j.jsx)("img",{src:p,alt:"",style:{height:"40px"}}),(0,j.jsx)("p",{style:{width:"100%",padding:"0px 15px",textAlign:"center"},children:"Oops! There was an issue loading your map. Click here to re-generate it."}),(0,j.jsx)("div",{style:{cursor:"pointer",background:"rgb(38,42,91)",color:"white",padding:"5px 10px",borderRadius:"3px"},onClick:()=>{(async()=>{await(0,u.vU)(),R()})()},children:"Regenerate"})]}),(0,j.jsx)("button",{style:{position:"absolute",top:null!==x&&void 0!==x&&x.Name&&""!==(null===x||void 0===x?void 0:x.Name.trim())?"30px":"
110px",right:"60px",zIndex:"2",border:"1px solid rgba(0,0,0,0.1)",background:"white",fontFamily:"'DM Sans', sans-serif",padding:"5px 10px",borderRadius:"2px",cursor:"pointer"},onClick:()=>{D||(()=>{let e,t;if(!u.Tj)return;e=u.Tj.center,t=u.Tj.zoom;const r=[...b];let n,o=[];I(r=>(o=r.map(r=>{if(r.DashboardID.toString()===c.toString()){let o=JSON.parse(r.Layout);return o=o.map(r=>{if(r.i.toString()===l.i.toString()){let l=r.widget;"object"===typeof l&&null!==l||(l={});const n=(0,i.A)((0,i.A)({},l),{},{zoom:t,center:e});return(0,i.A)((0,i.A)({},r),{},{widget:n})}return r}),n=o,(0,i.A)((0,i.A)({},r),{},{Layout:JSON.stringify(o)})}return r}),o)),A("Saving..."),(0,a.fB)(c,JSON.stringify(n),"Layout",y,w).then(e=>{F("Saved map settings"),C({type:"dashboardsUpdate"})},e=>{A(),T("Failed to update dashboard"),I(r)})})()},children:D?"Fetching locations...":"Save as default position"}),E?(0,j.jsxs)("div",{style:{position:"absolute",top:null!==x&&void 0!==x&&x.Name&&""!==(null===x||void 0===x?void 0:x.Name.trim())?"80px":"60px",right:"10px",zIndex:"2",border:"1px solid rgba(0,0,0,0.1)",background:"white",fontFamily:"'DM Sans', sans-serif",borderRadius:"2px",cursor:"pointer",height:"fit-content",width:"fit-content",display:"flex",flexDirection:"column",padding:"10px",gap:"5px"},children:[null===(t=x.Datasets)||void 0===t?void 0:t.map(e=>(0,j.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"5px"},children:[(0,j.jsx)("div",{style:{height:"10px",width:"10px",background:S.l.find(t=>t.ColorID===e.ColorID).Marker,borderRadius:"50%"}}),(0,j.jsx)("p",{style:{fontSize:"12px"},children:e.Name})]},e.DatasetID)),(0,j.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,j.jsx)("div",{style:{cursor:"pointer",padding:"3px 7px",borderRadius:"2px",border:"1px solid rgb(209,209,209)",fontSize:"12px"},onClick:()=>{G(!1)},children:"Close"})})]}):(0,j.jsx)("button",{style:{position:"absolute",top:null!==x&&void 0!==x&&x.Name&&""!==(null===x||void 0===x?void 0:x.Name.trim())?"80px":"60px",right:"10px",zIndex:"2",border:"1px solid rgba(0,0,0,0.1)",background:"white",fontFamily:"'DM Sans', sans-serif",padding:"5px",borderRadius:"2px",cursor:"pointer",display:"flex",justifyContent:"center",alignItems:"center"},onClick:()=>{G(!0)},children:(0,j.jsx)(n.ino,{})}),!H&&!1,H&&(null===H||void 0===H?void 0:H.startsWith("deal-"))&&(0,j.jsx)(k.UB,{showNewMarker:H.split("deal-")[1],dealInfoIsCollapsed:W,setDealInfoIsCollapsed:O}),H&&(null===H||void 0===H?void 0:H.startsWith("user-"))&&(0,j.jsx)(k.v7,{showNewMarker:H.split("user-")[1],dealInfoIsCollapsed:W,setDealInfoIsCollapsed:O})]}):(0,j.jsx)("div",{children:"Loading"})},F=e=>{var t,l,n,s,p,x,v;let{widget:f,currentDash:y,gl:D,currentWidgetID:m,onClose:S}=e;const{userProfile:k}=(0,r.useContext)(g.cy),{contactHeaderColumns:A,setDashboards:F,dealHeaderColumns:R,dashboards:H,sendJsonMessage:L,sendFailedMessage:M}=(0,r.useContext)(o.C),{triggerFailAlert:z,triggerLoadAlert:E,triggerSuccessAlert:G}=(0,r.useContext)(d.Y),[W,O]=(0,r.useState)(null===f||void 0===f?void 0:f.Name),[U,B]=(0,r.useState)(null===f||void 0===f?void 0:f.Location),[q,J]=(0,r.useState)(null===f||void 0===f?void 0:f.ContactLocation),[V,P]=(0,r.useState)(f.Datasets||[]),X=(e,t)=>{const l=te.find(t=>t.colId.toString()===e.toString());le(l?r=>{let n=[];if(l.filters.find(e=>e.value===t)){const e=r.filter(e=>e.colId.toString()!==l.colId.toString()),o=(0,i.A)((0,i.A)({},l),{},{filters:[...l.filters.filter(e=>e.value!==t)]});n=[...e,o]}else{const o=r.filter(t=>t.colId.toString()!==e.toString()),a=(0,i.A)((0,i.A)({},l),{},{filters:[...l.filters,{value:t,operator:"="}]});n=[...o,a]}return P(e=>e.map(e=>e.DatasetID===$.DatasetID?(0,i.A)((0,i.A)({},e),{},{dealFilters:n}):e)),n}:l=>{let r=[...l,{colId:e,filters:[{value:t,operator:"="}]}];return P(e=>e.map(e=>e.DatasetID===$.DatasetID?(0,i.A)((0,i.A)({},e),{},{dealFilters:r}):e)),r})},_=e=>{if(e){if(te.find(e=>{var t;return"-1"===(null===(t=e.colId)||void 0===t?void 0:t.toString())})){const t=e.map(e=>({operator:"=",value:e.value}));le(e=>{let l=e.map(e=>{var l;return"-1"===(null===(l=e.colId)||void 0===l?void 0:l.toString())?(0,i.A)((0,i.A)({},e),{},{filters:[...t]}):e});return P(e=>e.map(e=>e.DatasetID===$.DatasetID?(0,i.A)((0,i.A)({},e),{},{dealFilters:l}):e)),l})}else{const t={colId:"-1",filters:e.map(e=>({operator:"=",value:e.value}))};le(e=>{let l=[...e,t];return P(e=>e.map(e=>e.DatasetID===$.DatasetID?(0,i.A)((0,i.A)({},e),{},{dealFilters:l}):e)),l})}}else le(e=>{let t=e.filter(e=>{var t;return"-1"!==(null===(t=e.colId)||void 0===t?void 0:t.toString())});return P(e=>e.map(e=>e.DatasetID===$.DatasetID?(0,i.A)((0,i.A)({},e),{},{dealFilters:t}):e)),t})},[Y,K]=(0,r.useState)("General"),[Q,Z]=(0,r.useState)(!1),[$,ee]=(0,r.useState)(null===V||void 0===V?void 0:V[0]),[te,le]=(0,r.useState)((null===V||void 0===V||null===(t=V[0])||void 0===t?void 0:t.dealFilters)||[]);(0,r.useEffect)(()=>{V.find(e=>e.DatasetID===(null===$||void 0===$?void 0:$.DatasetID))||ee(null===V||void 0===V?void 0:V[0])},[V,null===$||void 0===$?void 0:$.DatasetID]),(0,r.useEffect)(()=>{var e;le((null===(e=V.find(e=>e.DatasetID===(null===$||void 0===$?void 0:$.DatasetID)))||void 0===e?void 0:e.dealFilters)||[])},[V,$]);const ie=(0,r.useRef)(null),[re,ne]=(0,r.useState)(!1);(0,r.useEffect)(()=>{const e=e=>{ie.current&&!ie.current.contains(e.target)&&ne(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[]);const[oe,ae]=(0,r.useState)(!1),[se,de]=(0,r.useState)(""),[pe,ce]=(0,r.useState)("");(0,r.useEffect)(()=>{var e;ce(null===(e=V.find(e=>e.DatasetID===(null===$||void 0===$?void 0:$.DatasetID)))||void 0===e?void 0:e.Name)},[null===$||void 0===$?void 0:$.DatasetID,V]);return(0,j.jsxs)("div",{style:{display:"flex",flexDirection:"column",width:"100%",flex:"1",minHeight:"0",userSelect:"none"},children:[(0,j.jsx)("style",{children:"\n          .selectedDealFilter {\n            background: rgb(230,230,230);\n          }\n          "}),(0,j.jsxs)("div",{style:{width:"100%",height:"40px",display:"flex",alignItems:"center",gap:"10px",marginTop:"10px"},children:[(0,j.jsx)("p",{onClick:()=>{K("General")},style:{background:"General"===Y?"rgb(230,230,230)":"",padding:"5px",borderRadius:"2px",cursor:"pointer"},children:"General"}),(0,j.jsx)("p",{onClick:()=>{K("Filters")},style:{background:"Filters"===Y?"rgb(230,230,230)":"",padding:"5px",borderRadius:"2px",cursor:"pointer"},children:"Datasets"})]}),(0,j.jsx)("hr",{style:{width:"100%",marginTop:"10px",border:"1px solid rgb(209,209,209)",marginBottom:"10px"}}),(0,j.jsxs)("div",{style:{flex:"1",minHeight:"0",width:"100%",display:"flex",flexDirection:"column"},children:[(0,j.jsx)("div",{style:{flex:"1",minHeight:"0",overflow:"hidden",
1width:"100%"},children:(0,j.jsx)(c.A,{autoHide:!1,style:{height:"100%",width:"100%"},children:(0,j.jsxs)("div",{style:{paddingTop:"0px",display:"flex",flexDirection:"column",justifyContent:"flex-start",alignItems:"flex-start",gap:"15px",width:"100%"},children:["General"===Y&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)("div",{style:{display:"flex",gap:"5px",justifyContent:"flex-start",alignItems:"center"},children:[(0,j.jsx)("h5",{children:"Title: "}),(0,j.jsx)("input",{style:{width:"200px",padding:"5px",borderRadius:"2px",border:"1px solid rgba(0,0,0,0.1)"},placeholder:"Type title here...",value:W,onChange:e=>{O(e.target.value)}})]}),(0,j.jsxs)("div",{style:{display:"flex",gap:"10px",alignItems:"center"},children:[(0,j.jsx)("h5",{children:"Location: "}),(0,j.jsxs)("select",{style:{width:"200px",padding:"5px",borderRadius:"2px",border:U?"1px solid rgba(0,0,0,0.1)":"1px solid red",outline:"none"},value:U,onChange:e=>{B(e.target.value)},children:[(0,j.jsx)("option",{value:"",children:"Select Location"}),R.map(e=>(0,j.jsx)("option",{value:e.Name,children:e.Name},e.Name))]})]}),(0,j.jsxs)("div",{style:{display:"flex",gap:"10px",alignItems:"center"},children:[(0,j.jsx)("h5",{children:"Location (Contacts): "}),(0,j.jsxs)("select",{style:{width:"200px",padding:"5px",borderRadius:"2px",border:q?"1px solid rgba(0,0,0,0.1)":"1px solid red",outline:"red"},value:q,onChange:e=>{J(e.target.value)},children:[(0,j.jsx)("option",{value:"",children:"Select Location"}),A.map(e=>(0,j.jsx)("option",{value:e.Name,children:e.Name},e.Name))]})]})]}),"Filters"===Y&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)("div",{style:{position:"sticky",height:"fit-content",top:"0px",width:"100%",paddingRight:"15px",display:"flex",alignItems:"center",gap:"5px",background:"white",justifyContent:"flex-end",zIndex:"100"},ref:ie,children:[(0,j.jsxs)("div",{style:{border:"1px solid rgb(209,209,209)",borderRadius:"2px",padding:"5px 10px",cursor:"pointer",fontSize:"14px",background:"white",display:"flex",alignItems:"center",gap:"5px"},onClick:()=>{ne(!re)},children:[(null===(l=V.find(e=>e.DatasetID===(null===$||void 0===$?void 0:$.DatasetID)))||void 0===l?void 0:l.Name)||"Click to select dataset",(0,j.jsx)(w.pte,{})]}),re&&(0,j.jsxs)("div",{style:{position:"absolute",top:"calc(35px)",right:"15px",border:"1px solid rgb(209,209,209)",borderRadius:"2px",background:"white",zIndex:"2",width:"200px",minHeight:"200px",maxHeight:"200px",overflow:"hidden",display:"flex",flexDirection:"column",boxShadow:"0px 0px 5px rgba(0,0,0,0.1)",padding:"5px"},children:[(0,j.jsx)("div",{style:{flex:"1",minHeight:"0",width:"100%",overflow:"hidden",display:"flex",flexDirection:"column"},children:(0,j.jsxs)(c.A,{autoHide:!1,style:{width:"100%",minHeight:"0",flex:"1",paddingRight:"15px"},children:[null===V||void 0===V?void 0:V.map((e,t)=>(0,j.jsxs)("div",{className:"".concat(e.DatasetID===(null===$||void 0===$?void 0:$.DatasetID)?"selectedDealFilter":""),style:{padding:"5px",cursor:"pointer",fontSize:"14px",display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",borderRadius:"2px"},onClick:()=>{ee(e),ne(!1)},children:[e.Name,(0,j.jsx)("div",{onClick:()=>{P(t=>t.filter(t=>t.DatasetID!==e.DatasetID))},children:"x"})]},t)),oe&&(0,j.jsxs)("div",{style:{padding:"5px",cursor:"pointer",fontSize:"14px",display:"flex",alignItems:"center",gap:"5px"},children:[(0,j.jsx)("input",{style:{flex:"1",minWidth:"0",padding:"5px",borderRadius:"2px",border:"1px solid rgba(0,0,0,0.1)"},placeholder:"Type dataset name here...",value:se,onChange:e=>{de(e.target.value)}}),(0,j.jsx)("div",{onClick:()=>{P(e=>[...e,{Name:se,DatasetID:(0,h.A)(),dealFilters:[],ColorID:"blue",DataType:"Deals"}]),ae(!1),de("")},children:(0,j.jsx)(b.q9z,{})}),(0,j.jsx)("div",{onClick:()=>{ae(!1),de("")},children:(0,j.jsx)(b.jkL,{})})]})]})}),(0,j.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%"},children:(0,j.jsx)("div",{style:{fontSize:"12px",cursor:"pointer",padding:"5px 10px",border:"1px solid rgb(209,209,209)",borderRadius:"2px"},onClick:()=>{ae(!0)},children:"Add dataset"})})]})]}),$&&(0,j.jsx)(j.Fragment,{children:(0,j.jsx)("div",{style:{display:"flex",justifyContent:"flex-start",flexDirection:"column",alignItems:"flex-start",ga
1p:"5px",width:"100%"},children:(0,j.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"5px",padding:"0px 10px 10px 10px"},children:[(0,j.jsxs)("div",{style:{marginBottom:"20px",display:"flex",flexDirection:"column",gap:"5px"},children:[(0,j.jsx)("h5",{children:"Dataset Name"}),(0,j.jsx)("input",{value:pe,onChange:e=>{ce(e.target.value)},onBlur:e=>{var t;t=e.target.value,P(e=>e.map(e=>e.DatasetID===$.DatasetID?(0,i.A)((0,i.A)({},e),{},{Name:t}):e))},style:{border:"1px solid rgb(209,209,209)",borderRadius:"2px",padding:"5px",width:"150px",fontSize:"14px"}})]}),(0,j.jsxs)("div",{style:{marginBottom:"20px",display:"flex",flexDirection:"column",gap:"5px"},children:[(0,j.jsx)("h5",{children:"Data Type"}),(0,j.jsxs)("div",{style:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:"10px"},children:[(0,j.jsx)("div",{style:{borderRadius:"2px",padding:"3px",display:"flex",justifyContent:"center",alignItems:"center",cursor:"pointer",border:"Deals"===(null===(n=V.find(e=>e.DatasetID===$.DatasetID))||void 0===n?void 0:n.DataType)?"2px solid rgb(38,42,91)":"1px solid rgb(209,209,209)",background:"Deals"===(null===(s=V.find(e=>e.DatasetID===$.DatasetID))||void 0===s?void 0:s.DataType)?"rgb(230,230,230)":"white"},onClick:()=>{P(e=>e.map(e=>e.DatasetID===$.DatasetID?(0,i.A)((0,i.A)({},e),{},{DataType:"Deals",dealFilters:[]}):e))},children:"Deals"}),(0,j.jsx)("div",{style:{borderRadius:"2px",padding:"3px",display:"flex",justifyContent:"center",alignItems:"center",cursor:"pointer",border:"Contacts"===(null===(p=V.find(e=>e.DatasetID===$.DatasetID))||void 0===p?void 0:p.DataType)?"2px solid rgb(38,42,91)":"1px solid rgb(209,209,209)",background:"Contacts"===(null===(x=V.find(e=>e.DatasetID===$.DatasetID))||void 0===x?void 0:x.DataType)?"rgb(230,230,230)":"white"},onClick:()=>{P(e=>e.map(e=>e.DatasetID===$.DatasetID?(0,i.A)((0,i.A)({},e),{},{DataType:"Contacts",dealFilters:[]}):e))},children:"Contacts"})]})]}),(0,j.jsxs)("div",{style:{marginBottom:"20px",display:"flex",flexDirection:"column",gap:"5px"},children:[(0,j.jsx)("h5",{children:"Marker Color"}),(0,j.jsx)("div",{style:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:"10px"},children:[{ColorID:"red",Marker:"rgb(200,94,78)",Glyph:"white"},{ColorID:"blue",Marker:"rgb(38,42,91)",Glyph:"white"},{ColorID:"black",Marker:"rgb(185,180,180)",Glyph:"white"},{ColorID:"purple",Marker:"rgb(112,19,119)",Glyph:"white"},{ColorID:"green",Marker:"rgb(53,121,32)",Glyph:"white"},{ColorID:"orange",Marker:"rgb(232,130,48)",Glyph:"white"},{ColorID:"yellow",Marker:"rgb(236,176,61)",Glyph:"white"},{ColorID:"pink",Marker:"rgb(227,54,140)",Glyph:"white"}].map((e,t)=>{var l,r;return(0,j.jsx)("div",{style:{borderRadius:"2px",padding:"3px",display:"flex",justifyContent:"center",alignItems:"center",cursor:"pointer",border:(null===(l=V.find(e=>e.DatasetID===$.DatasetID))||void 0===l?void 0:l.ColorID)===e.ColorID?"2px solid rgb(38,42,91)":"1px solid rgb(209,209,209)",background:(null===(r=V.find(e=>e.DatasetID===$.DatasetID))||void 0===r?void 0:r.ColorID)===e.ColorID?"rgb(230,230,230)":"white"},onClick:()=>{P(t=>t.map(t=>t.DatasetID===$.DatasetID?(0,i.A)((0,i.A)({},t),{},{ColorID:e.ColorID}):t))},children:(0,j.jsx)(C,{marker:e.Marker,glyph:e.Glyph})})})})]})]})})}),$&&(0,j.jsx)(j.Fragment,{children:"Deals"===(null===(v=V.find(e=>e.DatasetID===(null===$||void 0===$?void 0:$.DatasetID)))||void 0===v?void 0:v.DataType)?(0,j.jsx)(T,{dealFilters:te,toggleDealFilter:X,currentDataset:$,handleSelectChange:_}):(0,j.jsx)(N,{dealFilters:te,toggleDealFilter:X,currentDataset:$,handleSelectChange:_})})]})]})})}),"Filters"===Y&&$&&(0,j.jsx)("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",padding:"5px"},children:(0,j.jsx)("div",{style:{border:"1px solid rgb(209,209,209)",borderRadius:"2px",padding:"5px",fontSize:"12px",width:"fit-content",cursor:"pointer"},onClick:()=>{Z(!0)},children:"More filters"})}),(0,j.jsx)(I,{isOpen:Q,onClose:Z,dealFilters:te,setDealFilters:le,datasets:V,setDatasets:P,currentDataset:$},null===$||void 0===$?void 0:$.DatasetID),(0,j.jsx)("hr",{style:{width:"100%",border:"1px solid rgb(209,209,209)",marginBottom:"10px"}}),(0,j.jsx)("div",{style:{width:"100%",height:"30px",display:"flex",justifyContent:"center",alignItems:"center"},children:(0,j.jsx)("div",{style:{cursor:"pointer",background:"rgb(38,42,91)",color:"white",padding:"5px 10px",borderRadius:"2px"},onClick:()=>{(()=>{let e;const t=[...H];let l=[];F(t=>(l=t.map(t=>{if(t.DashboardID.toString()===y.toString()){let l=JSON.parse(t.
1Layout);return l=l.map(e=>{if(e.i.toString()===D.i.toString()){let t=e.widget;const l=(0,i.A)((0,i.A)({},t),{},{Name:W,Location:U,ContactLocation:q,dealFilters:te,id:m,mapid:(0,h.A)(),Datasets:V});return(0,i.A)((0,i.A)({},e),{},{widget:l})}return e}),e=l,(0,i.A)((0,i.A)({},t),{},{Layout:JSON.stringify(l)})}return t}),l)),E(),(0,a.fB)(y,JSON.stringify(e),"Layout",k,M).then(e=>{G("Saved successfully"),L({type:"dashboardsUpdate"})},e=>{E(),z("Failed to update dashboard"),F(t)})})(),setTimeout(()=>{(async()=>{await(0,u.vU)()})()},100)},children:"Save"})})]})]})},T=e=>{var t,l,i,n,a,s,d,p,c,u;let{dealFilters:g,toggleDealFilter:h,currentDataset:y,handleSelectChange:D}=e;const{clients:m,dealHeaderColumns:I}=(0,r.useContext)(o.C);return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)("div",{children:[(0,j.jsx)("h3",{style:{fontWeight:"600",color:"rgb(50,50,50)",fontSize:"15px"},children:"Deals"}),(0,j.jsxs)("div",{onClick:()=>{h("Starred","Starred")},style:{fontWeight:null!==(t=g.find(e=>"Starred"===e.colId.toString()))&&void 0!==t&&null!==(l=t.filters)&&void 0!==l&&l.find(e=>"Starred"===e.value)?"600":"400",cursor:"pointer",useSelect:"none",display:"flex",alignItems:"center",gap:"5px",paddingLeft:"10px"},children:[null!==(i=g.find(e=>"Starred"===e.colId.toString()))&&void 0!==i&&null!==(n=i.filters)&&void 0!==n&&n.find(e=>"Starred"===e.value)?(0,j.jsx)(x.auO,{style:{color:"rgb(38,42,91)"}}):(0,j.jsx)(x.XiU,{style:{color:"rgb(38,42,91)"}}),(0,j.jsx)("p",{style:{fontSize:"14px",color:"rgb(50,50,50)"},children:"Starred"})]}),(0,j.jsxs)("div",{onClick:()=>{h("Starred","Unstarred")},style:{fontWeight:null!==(a=g.find(e=>"Starred"===e.colId.toString()))&&void 0!==a&&null!==(s=a.filters)&&void 0!==s&&s.find(e=>"Unstarred"===e.value)?"600":"400",cursor:"pointer",useSelect:"none",display:"flex",alignItems:"center",gap:"5px",paddingLeft:"10px"},children:[null!==(d=g.find(e=>"Starred"===e.colId.toString()))&&void 0!==d&&null!==(p=d.filters)&&void 0!==p&&p.find(e=>"Unstarred"===e.value)?(0,j.jsx)(x.auO,{style:{color:"rgb(38,42,91)"}}):(0,j.jsx)(x.XiU,{style:{color:"rgb(38,42,91)"}}),(0,j.jsx)("p",{style:{fontSize:"14px",color:"rgb(50,50,50)"},children:"Unstarred"})]})]}),I.filter(e=>"Dropdown"===e.CellType||"Multi-Select"===e.CellType).map(e=>(0,j.jsxs)("div",{style:{borderRadius:"4px",padding:"10px",userSelect:"none"},children:[(0,j.jsx)("div",{style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between"},children:(0,j.jsx)("h3",{style:{fontWeight:"600",color:"rgb(50,50,50)",fontSize:"15px"},children:e.Name})}),JSON.parse(e.DropdownValues||"[]").map((t,l)=>{var i,r;const n=null===(i=g.find(t=>t.colId.toString()===e.HeaderColumnID.toString()))||void 0===i||null===(r=i.filters)||void 0===r?void 0:r.find(e=>e.value===t.Value);return(0,j.jsxs)("div",{onClick:()=>{h(e.HeaderColumnID,t.Value)},style:{display:"flex",alignItems:"center",gap:"5px",fontWeight:n?"600":"400",cursor:"pointer",useSelect:"none",paddingLeft:"10px"},children:[n?(0,j.jsx)(x.auO,{style:{color:"rgb(38,42,91)"}}):(0,j.jsx)(x.XiU,{style:{color:"rgb(38,42,91)"}}),(0,j.jsx)("p",{style:{fontSize:"14px",color:"rgb(50,50,50)"},children:t.Value})]},l)})]},e.HeaderColumnID)),(0,j.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"5px",padding:"10px",borderRadius:"3px",minWidth:"250px"},children:[(0,j.jsx)("h3",{style:{fontWeight:"700",color:"rgb(50,50,50)",fontSize:"14px"},children:"Managed By"}),(0,j.jsx)(v.Ay,{isMulti:!0,options:m.map(e=>({value:e.ClientID,label:e.Name})),value:null===(c=g.find(e=>{var t;return"-1"===(null===(t=e.colId)||void 0===t?void 0:t.toString())}))||void 0===c||null===(u=c.filters)||void 0===u?void 0:u.map(e=>{const t=m.find(t=>t.UserID.toString()===e.value.toString());return{value:t.ClientID,label:t.Name}}),onChange:D,styles:f._H})]},null===y||void 0===y?void 0:y.DatasetID)]})},N=e=>{let{dealFilters:t,toggleDealFilter:l}=e;const{contactHeaderColumns:i}=(0,r.useContext)(o.C);return(0,j.jsx)(j.Fragment,{children:(0,j.jsx)("div",{style:{flex:"1",minHeight:"0",width:"100%",overflow:"hidden"},children:(0,j.jsx)(c.A,{autoHide:!1,style:{height:"100%",width:"100%",paddingRight:"15px"},children:i.filter(e=>"Dropdown"===e.CellType||"Multi-Select"===e.CellType).map((e,i)=>(0,j.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"5px",padding:"10px",borderRadius:"3px"},children:[(0,j.jsx)("div",{style:{display:"flex",alignItems:"center"},children:(0,j.jsx)("h3",{style:{fontWeight:"700",color:"rgb(50,50,50)",fontSize:"14px",flex:"1",minWidth:"0"},children:e.Name})}),JSON.parse(e.DropdownValues||"[]").map((i,r)=>{var n,o,a,s;return(0,j.jsxs)("div",{onClick:()=>{l(e.HeaderColumnID,i.Value)},style:{fontWeight:null!==(n=t.find(t=>{var l;return(null===(l=t.colId)||void 0===l?void 0:l.toString())===e.HeaderColumnID.toString()}))&&void 0!==n&&null!==(o=n.filters)&&void 0!==o&&o.find(e=>e.value===i.Value)?"600":"400",cursor:"pointer",useSelect:"none",display:"flex",alignItems:"center",gap:"5px",paddingLeft:"10px"},children:[null!==(a=t.find(t=>{var l;return(null===(l=t.colId)||void 0===l?void 0:l.toString())===e.HeaderColumnID.toString()}))&&void 0!==a&&null!==(s=a.filters)&&void 0!==s&&s.find(e=>e.value===i.Value)?(0,j.jsx)(x.auO,{style:{color:"rgb(38,42,91)"}}):(0,j.jsx)(x.XiU,{style:{color:"rgb(38,42,91)"}}),(0,j.jsx)("p",{style:{fontSize:"14px",color:"rgb(50,50,50)"},children:i.Value})]},r)})]},i))})})})}}}]);

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.