PageSourceSearch

https://mos.meddicc.com/_next/static/chunks/pages/metrics-bea2de759ca65649.js

js meddicc.com collected 2026-09-25 20:17:13 UTC 65,559 bytes, 1 lines download raw bytes

1try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="29ceb53c-5ca0-4a0e-89d1-50dddafd0da8",e._sentryDebugIdIdentifier="sentry-dbid-29ceb53c-5ca0-4a0e-89d1-50dddafd0da8")}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[367],{2979:(e,t,n)=>{"use strict";n.d(t,{O:()=>v});var i=n(37876),r=n(14e3),l=n(89099),s=n(14232),a=n(23377),o=n(68660),d=n(60509),c=n(64232),u=n(3228),m=n(1196),p=n(81130),h=n(89638),x=n(20843),g=n(54663),f=n(33216);let v=e=>{var t,n,v;let{excludeSingleProgramUsers:y,allowedPermissions:b,productToCheck:j,featureToCheck:w,withMembership:C,requireB2B:k,children:A}=e,M=(0,l.useRouter)(),I=(0,r.usePathname)(),{data:N,isLoading:S,isFetching:D}=(0,o.vf)(),{data:O,isLoading:P}=(0,u.Rd)(),{data:F,isLoading:L}=(0,m.xC)(Number(null==N||null==(t=N.organisation)?void 0:t.id),{skip:!(null==N||null==(n=N.organisation)?void 0:n.id)}),{data:z,isLoading:B}=(0,d.ZI)({userId:Number(null==N?void 0:N.id),endpoint:void 0,page:1,query:"",sort:null,entries:5,filter:""},{skip:!(null==N?void 0:N.id)}
1),[T,R]=(0,s.useState)(!1),E=null==N?void 0:N.permissionLevel;null==N||N.permissionLevel,p.E1.superAdmin;let Y=(0,s.useMemo)(()=>[...b,...a.uK],[b]),W=j===x.lk.ENABLE,_=C&&(null==N||null==(v=N.organisation)?void 0:v.id),V=(0,s.useMemo)(()=>{var e,t,n,i,r;if(!N)return;let l=!k||(null==N||null==(e=N.organisation)?void 0:e.orgType)===x.tW.B2B;if(!j&&!w)return l;let s=(0,c.ul)(F,C),a=null==I?void 0:I.includes("reports/enable"),o=j===x.lk.ENABLE&&z&&(null==z||null==(t=z.results)?void 0:t.length)>0,d=!j||(null==N||null==(n=N.products)?void 0:n.includes(String(j)))||o&&!a,u=!j||(null==N||null==(r=N.organisation)||null==(i=r.products)?void 0:i.includes(String(j))),m=(0,h.xS)(N,w,O),p=(0,h.Uc)(N,w,O);return d&&u&&!!(m&&p)&&s&&l},[j,N,z,O,C,F,I,w,k]),$=(0,s.useMemo)(()=>!S&&!!N&&!P&&(!W||!B)&&(!_||!L),[S,N,P,W,B,_,L]);return((0,s.useEffect)(()=>{var e;if(!$)return;let t=E&&Y.includes(E),n=y&&(0,c.W6)(F,z,null==N||null==(e=N.organisation)?void 0:e.isPersonal);V&&t&&!n?R(!1):R(!0)},[$,E,V,Y,j,w,y,N]),$)?T&&N?(0,i.jsx)(g.v,{handleClose:()=>M.push("/profile/".concat(null==N?void 0:N.slug)),handleDelete:()=>M.push("/profile/".concat(null==N?void 0:N.slug)),title:"No Available Products",message:(0,i.jsxs)("p",{children:["Unauthorized product access or no products are currently assigned to your account. Please contact your mOS admin or email MEDDICC Support at"," ",(0,i.jsxs)("a",{href:"mailto:[email protected]",className:"text-cobalt-blue-500",children:[" ","[email protected]"]})," ","to request access."]}),actionButtonTitle:"Close",isDelete:!1,hideCancel:!0}):V&&E&&Y.includes(E)?(0,i.jsx)(i.Fragment,{children:A}):null:(0,i.jsx)(f.y,{})}},3617:(e,t,n)=>{"use strict";n.d(t,{Y:()=>c});var i=n(37876);n(14232);var r=n(84976);let l=r.Ay.div.withConfig({componentId:"sc-937abbf5-0"})(["position:relative;display:block;margin-bottom:5px;padding-top:3px;padding-left:32px;font-size:16px;"]),s=r.Ay.label.withConfig({componentId:"sc-937abbf5-1"})(["display:inline;color:",";font-weight:",";font-size:",";line-height:",";user-select:none;a{color:",";font-weight:",";}"],e=>{let{theme:t}=e;return t.colors.black[40]},e=>{let{theme:t}=e;return t.fontWeight.regular},e=>{let{theme:t}=e;return t.fontSize.secondary},e=>{let{theme:t}=e;return t.lineHeight.secondary},e=>{let{theme:t}=e;return t.colors.primary[120]},e=>{let{theme:t}=e;return t.fontWeight.bold}),a=r.Ay.label.withConfig({componentId:"sc-937abbf5-2"})(["position:relative;left:-32px;color:",";font-size:",";line-height:",";"],e=>{let{theme:t}=e;return t.colors.error[20]},e=>{let{theme:t}=e;return t.fontSize.captionPrimary},e=>{let{theme:t}=e;return t.lineHeight.captionPrimary}),o=r.Ay.input.attrs({type:"checkbox"}).withConfig({componentId:"sc-937abbf5-3"})(["position:absolute;z-index:-1;opacity:0;"]),d=r.Ay.div.withConfig({componentId:"sc-937abbf5-4"})(["position:absolute;top:6px;left:0;width:16px;height:16px;box-shadow:inset 0 0 0 1.5px ",";border:0 solid ",";border-radius:4px;background:",";cursor:pointer;"," ",""],e=>{let{theme:t}=e;return t.colors.black[10]},e=>{let{theme:t}=e;return t.colors.pure.trueBlack},e=>{let{theme:t}=e;return t.colors.pure.white100},e=>{let{checked:t}=e;return t&&(0,r.AH)(["box-shadow:none;background-color:",";::after{box-sizing:unset;content:'';position:absolute;display:block;left:6px;top:2px;width:3px;height:8px;border:solid ",";border-width:0 2px 2px 0;transform:rotate(45deg);}::before{content:'';display:block;position:absolute;left:0;top:0;width:4.5rem;height:4.5rem;margin-left:-1.3rem;margin-top:-1.3rem;background:#2aa1c0;border-radius:3rem;opacity:0.6;z-index:99999;transform:scale(0);}"],e=>{let{theme:t}=e;return t.colors.primary[120]},e=>{let{theme:t}=e;return t.colors.pure.white100})},e=>{let{isDisabled:t,checked:n}=e;return t&&(0,r.AH)(["border:1.5px solid ",";background-color:",";box-shadow:none;cursor:default;",""],e=>{let{theme:t}=e;return t.colors.black[20]},e=>{let{theme:t}=e;return t.colors.black[5]},n&&(0,r.AH)(["::after{border:solid ",";border-width:0 2px 2px 0;top:1px;left:4px;}"],e=>{let{theme:t}=e;return t.colors.black[20]}))}),c=e=>{let{children:t="",disabled:n=!1,error:r,name:c,register:u,value:m,onChange:p,onClick:h,registerOptions:x,margin:g,padding:f,labelWidthFull:v,top:y,dataCy:b,hideCheckBoxIndicator:j}=e;return(0,i.jsx)(l,{style:{margin:g&&g,padding:f&&f,width:v?"100%":""},"data-sentry-element":"CheckboxGroup","data-sentry-component":"CheckboxField","data-sentry-source-file":"CheckboxField.tsx",children:(0,i.jsxs)(s,{"data-cy":b,"data-sentry-element":"CheckboxLabel","data-sentry-source-file":"CheckboxField.tsx",children:[t,r&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("br",{}),(0,i.jsx)(a,{children:null==r?void 0:r.message})]}),(0,i.jsx)(o,{checked:m,disabled:n,...null==u?void 0:u(c,x),onChange:e=>{p(e.target.checked),null==h||h()},"data-sentry-element":"CheckboxInput","data-sentry-source-file":"CheckboxField.tsx"}
1),(0,i.jsx)(d,{className:j?"hidden":"",style:{top:y&&y},checked:m,isDisabled:n,"data-sentry-element":"CheckboxIndicator","data-sentry-source-file":"CheckboxField.tsx"})]})})}},5101:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>e$});var i=n(37876),r=n(39324),l=n.n(r),s=n(86200),a=n(2979),o=n(23377),d=n(53088),c=n(14232),u=n(88992),m=n(31777),p=n(91722),h=n(64941),x=n(24856),g=n(87707),f=n(43371),v=n(2108),y=n(27772),b=n(52642),j=n(31448),w=n(3228),C=n(56860),k=n(17024),A=n(64268),M=n(34697),I=n(93062),N=n(21551),S=n(84976);let D=S.Ay.div.withConfig({componentId:"sc-1d274a41-0"})(["position:absolute;top:3rem;right:0;z-index:9999;min-width:15.5rem;box-shadow:rgba(0,0,0,0.08) 0 6px 12px;border-radius:5px;background-color:white;> div:first-child{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch;width:100%;padding:0.75rem;background:#f5f6f7;gap:0.5rem;}> div:nth-of-type(3){display:flex;justify-content:flex-end;align-items:center;align-self:stretch;padding:0.5rem 0.75rem;background:#f5f6f7;gap:0.5rem;}"]),O=S.Ay.div.withConfig({componentId:"sc-1d274a41-1"})(["display:flex;justify-content:space-between;align-items:center;padding:0.75rem 1rem;transition:0.5s background-color;:hover{background-color:#a0c8fd;cursor:pointer;}"]),P=S.Ay.div.withConfig({componentId:"sc-1d274a41-2"})(["display:flex;align-items:center;align-self:stretch;padding:0.75rem 1rem;transition:0.5s background-color;cursor:pointer;:hover{background-color:#a0c8fd;}"]);var F=n(28446),L=n(63370),z=n(48407);let B=e=>{var t;let n=(0,v.j)(),{filterRef:r,register:l,watch:s,setValue:a,getOpportunityOwners:d}=e,u="selectedOptions",p=(0,m.d4)(z.ls),g=(0,m.d4)(A.O4),f=(0,m.d4)(A.zk),y=(null==(t=k.kS.find(e=>e.name===g.selectedFilter))?void 0:t.options)||[];"company"===g.selectedFilter?y=p.map(e=>({...e,value:e.value.toString()})):"owner"===g.selectedFilter&&(y=f.map(e=>{var t,n;return{label:(null==e||null==(t=e.label)?void 0:t.toString())||"",value:(null==e||null==(n=e.value)?void 0:n.toString())||""}}));let b=s("searchInput"),j=s(u),w=(0,L.d7)(b,o.BL),C=e=>{let t=j.findIndex(t=>t===e.value);if(-1===t)a(u,[...j,e.value]);else{let e=[...j];e.splice(t,1),a(u,e)}};return(0,c.useEffect)(()=>{"owner"===g.selectedFilter&&d(w)},[g.selectedFilter,w]),(0,i.jsx)("div",{className:"relative",ref:r,"data-sentry-component":"FilterSubMenu","data-sentry-source-file":"FilterSubMenu.tsx",children:(0,i.jsxs)(D,{"data-sentry-element":"FilterMenuWrapper","data-sentry-source-file":"FilterSubMenu.tsx",children:[(0,i.jsx)("div",{children:(0,i.jsx)(x.A,{autoFocus:!0,register:l,name:"searchInput",icon:"/icons/layout/searchLine.svg",placeholder:"Search",className:"h-9 text-sm","data-sentry-element":"TextField","data-sentry-source-file":"FilterSubMenu.tsx"})}),(0,i.jsx)("div",{className:"max-h-48 overflow-y-auto",children:y.filter(e=>{var t,n,i,r,l;return"owner"===g.selectedFilter||!b||(null==e||null==(l=e.label)||null==(r=l.toLowerCase)||null==(i=r.call(l))||null==(n=i.includes)?void 0:n.call(i,null==b||null==(t=b.toLowerCase)?void 0:t.call(b)))}).map(e=>(0,i.jsx)(P,{onClick:()=>{C(e)},children:(0,i.jsx)(F.Y,{name:"".concat(e.value),value:j.some(t=>t===e.value)||!1,onChange:()=>{C(e)},onClick:e=>e.stopPropagation(),children:(0,i.jsx)("span",{className:"cursor-pointer text-xs",children:e.label})},"".concat(e.value))}))}),(0,i.jsxs)("div",{children:[(0,i.jsx)(h.$,{variant:"text",style:{color:"#111111",padding:"0.5rem"},onClick:()=>n((0,A.RB)({name:k.JO})),"data-sentry-element":"Button","data-sentry-source-file":"FilterSubMenu.tsx",children:"Cancel"}),(0,i.jsxs)(h.$,{variant:"isPrimary",onClick:()=>{n((0,A._F)({[g.selectedFilter]:j})),n((0,A.fL)())},"data-sentry-element":"Button","data-sentry-source-file":"FilterSubMenu.tsx",children:[(0,i.jsx)("img",{src:"/icons/checkLine.svg",alt:"Check line icon",role:"presentation"}),"Apply"]})]})]})})},T=e=>{let{getOpportunityOwners:t}=e,n=(0,c.useRef)(null),r=(0,v.j)(),l=(0,m.d4)(b.jh),s=(0,m.d4)(A.No),a=(0,m.d4)(A.O4),o=(0,m.d4)(A.Rb),d="selectedOptions",{watch:p,setValue:h,register:x}=(0,u.mN)({defaultValues:{searchInput:"",selectedOptions:[]}});return(0,c.useEffect)(()=>{let e=s[a.selectedFilter]||[];h("searchInput",""),a.name!==k.JO&&a.name?h(d,e):h(d,[])},[a.name,a.selectedFilter,h,s]),(0,N.A)(n,()=>{r((0,A.fL)())}),(0,i.jsx)(i.Fragment,{children:a.name===k.JO?(0,i.jsx)("div",{className:"relative",ref:n,children:(0,i.jsxs)(D,{children:[(0,i.jsxs)("div",{children:[(0,i.jsx)(I.j,{label:(0,i.jsx)("span",{className:"text-sm",children:"Archived Metrics Only"}),onChange:()=>{r((0,A._F)({isArchivedMetricsOnly:!s.isArchivedMetricsOnly})),r((0,A.ms)({filters:s,sortOrder:o,userId:null==l?void 0:l.id}))},value:s.isArchivedMetricsOnly||!1}),(0,i.jsx)(I.j,{label:(0,i.jsx)("span",{className:"text-sm",children:"Linked Opportunity"}),onChange:()=>{r((0,A._F)({hasLinkedOpportunity:!s.hasLinkedOpportunity})),r((0,A.ms)({filters:s,sortOrder:o,userId:null==l?void 0:l.id}))},value:s.hasLinkedOpportunity||!1})]}),(0,i.jsx)("div",{children:k.kS.map(e=>(0,i.jsxs)(O,{onClick:()=>r((0,A.RB)({name:k.CU,selectedFilter:e.name})),children:[(0,i.jsxs)("div",{className:"flex items-center justify-center",children:[(0,i.jsx)("img",{src:e.image,alt:"Filter menu icon",role:"presentation"}),(0,i.jsx)("span",{className:"ml-2 text-xs",children:e.label})]}),(0,i.jsx)("div",{className:"flex justify-center",children:(0,i.jsx)("img",{src:"/icons/arrowRightLine.svg",alt:"Arrow right line icon",role:"presentation"})})]}))})]})}):a.name&&(0,i.jsx)(B,{filterRef:n,register:x,watch:p,setValue:h,getOpportunityOwners:t})})},R=e=>{let{searchInput:t,profileMDBViewMode:n,getOpportunityOwners:r}=e,l=(0,v.j)(),s=(0,m.d4)(A.O4),a=(0,m.d4)(A.jO),o=(0,m.d4)(A.Rb),d="".concat((0,M.D)(o===k.ws.Desc?"new":"old"),"est first"),c=n?"":"lg:!text-base";return(0,i.jsxs)("div",{className:"flex","data-sentry-component":"ActionButtons","data-sentry-source-file":"ActionButtons.tsx",children:[(0,i.jsxs)(h.$,{className:(0,p.cn)("p-2 !text-xs",c),onClick:()=>{l((0,A.HX)())},"data-sentry-element":"Button","data-sentry-source-file":"ActionButtons.tsx",children:[(0,i.jsx)("img",{src:"/icons/sort.svg",alt:"Sort icon",role:"presentation"}),d]}),(0,i.jsxs)(h.$,{className:(0,p.cn)("ml-2 p-2 !text-xs",c),onClick:()=>{""!==s.name?l((0,A.fL)()):l((0,A.RB)({name:k.JO}))},"data-sentry-element":"Button","data-sentry-source-file":"ActionButtons.tsx",children:[(0,i.jsx)("img",{src:"/icons/filter.svg",alt:"Filter icon",role:"presentation"}),"Filter"]}),(0,i.jsx)(T,{getOpportunityOwners:r,"data-sentry-element":"FilterMenu","data-sentry-source-file":"ActionButtons.tsx"}),(a.length>0||0===a.length&&t.length>0)&&(0,i.jsxs)(h.$,{className:(0,p.cn)("ml-2 p-2 !text-xs",c),variant:"isPrimary",onClick:()=>{l((0,A.$0)({metric:k.Hg,name:k.Vp}))},children:[(0,i.jsx)("img",{src:"/icons/plus.svg",alt:"Add icon",role:"presentation"}),"Add Metrics"]})]})};var E=n(49396);let Y=S.Ay.div.withConfig({componentId:"sc-df9b086b-0"})(["display:flex;align-items:center;border:1px solid #cbccd7;border-radius:9999px;padding:0.25rem 0.5rem;background:#fff;font-size:0.75rem;letter-spacing:0.0625rem;gap:0.5rem;"]),W=S.Ay.div.withConfig({componentId:"sc-df9b086b-1"})(["display:flex;justify-content:center;align-items:center;border-radius:0.125rem;padding:0.25rem;background:#111;gap:0.5rem;"]),_=()=>{var e,t;let n=(0,v.j)(),r=(0,m.d4)(A.No),l=null==(e=k.kS.find(e=>"category"===e.name))?void 0:e.options,s=null==(t=k.kS.find(e=>"status"===e.name))?void 0:t.options,a=(0,m.d4)(z.ls),o=(0,m.d4)(A.zk),d=a.map(e=>({...e,value:e.value.toString()})),c=r.hasLinkedOpportunity||r.isArchivedMetricsOnly||r.status.length>0||r.category.length>0||r.owner.length>0||r.company.length>0;return(0,i.jsx)(i.Fragment,{children:c&&(0,i.jsxs)("div",{className:"mt-3 flex flex-wrap gap-3",children:[(0,i.jsx)(W,{children:(0,i.jsx)("img",{alt:"Filter fill icon",role:"presentation",src:"/icons/filterFill.svg"})}),r.isArchivedMetricsOnly&&(0,i.jsx)(Y,{children:"ARCHIVED METRICS"}),r.hasLinkedOpportunity&&(0,i.jsx)(Y,{children:"WITH LINKED OPPORTUNITY"}),r.category.length>0&&(0,i.jsxs)("div",{className:"flex items-center gap-2 bg-white px-2 py-1 text-xs",style:{border:"1px solid #cbccd7",borderRadius:k.xT,letterSpacing:"0.0625rem"},children:[(0,i.jsx)("span",{children:"CATEGORY"}),(0,i.jsx)("span",{className:"text-bold",children:r.category.map(e=>{var t,n;return(null==l||null==(n=l.find)||null==(t=n.call(l,t=>t.value===e))?void 0:t.label)||""}).join(", ")})]}),r.status.length>0&&(0,i.jsxs)(Y,{children:[(0,i.jsx)("span",{children:"STATUS"}),(0,i.jsx)("span",{className:"text-bold",children:r.status.map(e=>{var t,n;return(null==s||null==(n=s.find)||null==(t=n.call(s,t=>t.value===e))?void 0:t.label)||""}).join(", ")})]}),r.owner.length>0&&(0,i.jsxs)(Y,{children:[(0,i.jsx)("span",{children:"OWNER"}),(0,i.jsx)("span",{className:"text-bold",children:r.owner.map(e=>{var t,n;return(null==o||null==(n=o.find)||null==(t=n.call(o,t=>t.value===e))?void 0:t.label)||""}).join(", ").toUpperCase()})]}),r.company.length>0&&(0,i.jsxs)(Y,{children:[(0,i.jsx)("span",{children:"COMPANY"}),(0,i.jsx)("span",{className:"text-bold",children:r.company.map(e=>{var t,n;
1return(null==d||null==(n=d.find)||null==(t=n.call(d,t=>t.value===e.toString()))?void 0:t.label)||""}).join(", ").toUpperCase()})]}),(0,i.jsx)(h.$,{variant:"text",size:h.l.small,style:{color:"#111111"},onClick:()=>n((0,A.Ow)()),children:"Clear Filter"})]})})};var V=n(81130);let $=S.Ay.div.withConfig({componentId:"sc-df91aec7-0"})(["position:absolute;bottom:-8rem;left:-11rem;z-index:99999;width:12rem;height:initial;box-shadow:0 6px 12px rgba(0,0,0,0.08);border-radius:0.25rem;background-color:white;font-size:14px;"]),H=S.Ay.div.withConfig({componentId:"sc-df91aec7-1"})(["display:flex;align-items:center;width:100%;padding:0.75rem;"]),q=S.Ay.img.withConfig({componentId:"sc-df91aec7-2"})(["width:16px;height:16px;margin-right:0.5rem;"]),Q=e=>{var t,n,r,l;let{activeMetricSettings:s,metric:a,metricIndex:o,setActiveMetricSettings:d}=e,c=(0,m.d4)(b.jh),u=(0,m.d4)(b.Zn),p=null===V.ut||void 0===V.ut||null==(l=V.ut[u])||null==(r=l.toLowerCase)||null==(n=r.call(l))||null==(t=n.includes)?void 0:t.call(n,"admin"),x=(0,v.j)();return s===o?(0,i.jsxs)($,{children:[(0,i.jsx)(H,{children:(0,i.jsxs)(h.$,{variant:"text",onClick:e=>{e.preventDefault(),e.stopPropagation(),d(k.p),x((0,A.$0)({metric:a,name:k.CK}))},children:[(0,i.jsx)(q,{src:"/icons/eye.svg",alt:"Eye icon",role:"presentation"}),"Metric Information"]})}),(0,i.jsx)(H,{children:(0,i.jsxs)(h.$,{variant:"text",onClick:e=>{e.preventDefault(),e.stopPropagation(),d(k.p),x((0,A._1)({metric:a,name:k.TY}))},disabled:(null==a?void 0:a.type)!=="M1"||(null==a?void 0:a.isArchived),children:[(0,i.jsx)(q,{src:"/icons/chain.svg",alt:"Chain icon",role:"presentation"}),"Add to opportunity"]})}),(0,i.jsx)(H,{children:(0,i.jsxs)(h.$,{variant:"text",onClick:e=>{e.preventDefault(),e.stopPropagation(),d(k.p),x((0,A._1)({metric:a,name:k.cX}))},disabled:!p||(null==a?void 0:a.isArchived),children:[(0,i.jsx)(q,{src:"/icons/archive.svg",alt:"Archive icon",role:"presentation"}),"Archive Metric"]})}),(0,i.jsx)(H,{children:(0,i.jsxs)(h.$,{variant:"text",onClick:e=>{e.preventDefault(),e.stopPropagation(),d(k.p),x((0,A.$0)({metric:a,name:k.RA}))},disabled:(null==a?void 0:a.type)!=="M1"||(null==a?void 0:a.isArchived)||(null==a?void 0:a.createdBy)!==(null==c?void 0:c.id)&&!p,children:[(0,i.jsx)(q,{src:"/icons/editBoxLine.svg",alt:"Edit box line icon",role:"presentation"}),"Edit Metric"]})})]}):null},U=S.Ay.div.withConfig({componentId:"sc-551a9616-0"})(["width:",";min-width:",";border:1px solid #abacbe;border-radius:8px;padding:16px;background-color:white;transition:background 0.5s,box-shadow 0.5s,border 0.5s;cursor:pointer;:hover{box-shadow:0 4px 4px 0 rgba(0,0,0,0.25);border:1px solid #1778fb;background:#f0f6ff;}.settings-button{visibility:hidden;transition:visibility 0.25s;}:hover .settings-button{visibility:visible;}"],e=>{let{isSidebarActive:t,fullWidth:n}=e;return n?"inherit":t?"49%":"24.25%"},e=>{let{isSidebarActive:t}=e;return t?"49%":"24.25%"}),X=S.Ay.div.withConfig({componentId:"sc-551a9616-1"})(["display:flex;div:first-child{margin-right:0.5rem;}div:nth-child(2){margin-left:0.5rem;}"]),Z=S.Ay.div.withConfig({componentId:"sc-551a9616-2"})(["display:flex;justify-content:space-between;& > div:first-child{display:flex;& > div:nth-child(2){display:flex;gap:3px;margin:auto 0 auto 8px;& > span:first-child{display:flex;}}}"]),J=S.Ay.div.withConfig({componentId:"sc-551a9616-3"})(["margin-top:1rem;margin-bottom:1rem;font-size:16px;word-wrap:break-word;"]),G=S.Ay.p.withConfig({componentId:"sc-551a9616-4"})(["margin-top:0.25rem;font-size:12px;"," ",""],e=>{let{truncateValues:t}=e;return t&&(0,S.AH)(["overflow:hidden;width:100px;text-overflow:ellipsis;white-space:nowrap;"])},e=>{let{backgroundColor:t}=e;return t&&(0,S.AH)(["display:flex;align-items:center;border-radius:9999px;background-color:",";padding:3px 10px 3px 6px;"],t)}),K=S.Ay.p.withConfig({componentId:"sc-551a9616-5"})(["margin-bottom:0.25rem;font-size:10px;"]),ee=S.Ay.div.withConfig({componentId:"sc-551a9616-6"})(["display:flex;justify-content:center;align-items:center;margin-right:0.25rem;"]),et=e=>{var t,n,r,l,s;let{metric:a,onMetricMouseLeave:o,metricIndex:d,activeMetricSettings:c,setActiveMetricSettings:u,fullWidth:p,enableOptions:x,profileMDBViewMode:g}=e,f=(0,v.j)(),y=(0,m.d4)(A.a4),b=null===k.ZW||void 0===k.ZW||null==(t=k.ZW.find)?void 0:t.call(k.ZW,e=>e.value===(null==a?void 0:a.category)),j=null===k.hR||void 0===k.hR||null==(n=k.hR.find)?void 0:n.call(k.hR,e=>e.value===(null==a?void 0:a.status)),w=null===k.mE||void 0===k.mE||null==(r=k.mE.find)?void 0:r.call(k.mE,e=>e.label===((null==a?void 0:a.proven)?"Proven":"Unproven")),C=null===k.go||void 0===k.go||null==(l=k.go.find)?void 0:l.call(k.go,e=>e.value===(null==a?void 0:a.type));return(0,i.jsxs)(U,{className:"!w-full",onMouseLeave:o,isSidebarActive:!!(null==y?void 0:y.name)||g,fullWidth:p,onClick:()=>{var e;y.name&&(null==y||null==(e=y.metric)?void 0:e.pk)===(null==a?void 0:a.pk)?f((0,A.Xx)()):f((0,A.$0)({metric:a,name:k.CK}))},"data-sentry-element":"MetricContainer","data-sentry-component":"MetricCard","data-sentry-source-file":"MetricCard.tsx",children:[(0,i.jsxs)(Z,{"data-sentry-element":"MetricHeader","data-sentry-source-file":"MetricCard.tsx",children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("div",{className:"flex h-7 w-7 items-center justify-center rounded-sm text-xs text-white ".concat(null==C?void 0:C.backgroundColor),children:null==C?void 0:C.label}),(0,i.jsxs)("div",{children:[(0,i.jsx)("span",{children:(0,i.jsx)("img",{src:"/icons/metricsDatabase/link.svg",alt:"Link"})}),(0,i.jsx)("span",{children:null==a||null==(s=a.attachedOpportunities)?void 0:s.length}),"Opportunity"]})]}),x&&(0,i.jsxs)("div",{className:"relative",children:[(0,i.jsx)(h.$,{variant:"isPrimary",className:"settings-button",size:h.l.small,style:{padding:"0.25rem"},onClick:e=>{e.stopPropagation(),u(c>k.p?k.p:d)},children:(0,i.jsx)("img",{src:"/icons/moreVertical.svg",alt:"Vertical icon",role:"presentation",className:"h-4 w-4"})}),(0,i.jsx)(Q,{activeMetricSettings:c,metricIndex:d,setActiveMetricSettings:u,metric:a})]})]}),(0,i.jsx)(J,{className:"!max-w-md","data-sentry-element":"MetricTitle","data-sentry-source-file":"MetricCard.tsx",children:null==a?void 0:a.title}),(0,i.jsx)(X,{"data-sentry-element":"MetricInfoRow","data-sentry-source-file":"MetricCard.tsx",children:(0,i.jsxs)("div",{className:"my-2",children:[(0,i.jsx)(K,{"data-sentry-element":"MetricInfoRowLabel","data-sentry-source-file":"MetricCard.tsx",children:"Original Opportunity"}),(0,i.jsx)(G,{className:"break-word md:w-32 xl:w-52 2xl:w-72","data-sentry-element":"MetricInfoRowValue","data-sentry-source-file":"MetricCard.tsx",children:(null==a?void 0:a.opportunityLink)||"N/A"})]})}),(0,i.jsxs)(X,{className:"flex-col sm:flex-row","data-sentry-element":"MetricInfoRow","data-sentry-source-file":"MetricCard.tsx",children:[(0,i.jsxs)("div",{className:"my-2",children:[(0,i.jsx)(K,{"data-sentry-element":"MetricInfoRowLabel","data-sentry-source-file":"MetricCard.tsx",children:"Original Owner"}),(0,i.jsx)(G,{truncateValues:!0,"data-sentry-element":"MetricInfoRowValue","data-sentry-source-file":"MetricCard.tsx",children:(null==a?void 0:a.opportunityOwner)||"N
1/A"})]}),(0,i.jsxs)("div",{className:"my-2 !ms-0 sm:ms-2",children:[(0,i.jsx)(K,{"data-sentry-element":"MetricInfoRowLabel","data-sentry-source-file":"MetricCard.tsx",children:"Company"}),(0,i.jsx)(G,{truncateValues:!0,"data-sentry-element":"MetricInfoRowValue","data-sentry-source-file":"MetricCard.tsx",children:(null==a?void 0:a.companyName)||"N/A"})]})]}),(0,i.jsxs)(X,{"data-sentry-element":"MetricInfoRow","data-sentry-source-file":"MetricCard.tsx",children:[(0,i.jsxs)("div",{className:"my-2",children:[(0,i.jsx)(K,{"data-sentry-element":"MetricInfoRowLabel","data-sentry-source-file":"MetricCard.tsx",children:"Category"}),(0,i.jsxs)(G,{backgroundColor:null==b?void 0:b.backgroundColor,"data-sentry-element":"MetricInfoRowValue","data-sentry-source-file":"MetricCard.tsx",children:[(null==b?void 0:b.image)?(0,i.jsx)(ee,{children:(0,i.jsx)("img",{src:null==b?void 0:b.image,alt:"Category icon",role:"presentation"})}):"",null==b?void 0:b.label]})]}),(null==C?void 0:C.label)!=="M1"&&(0,i.jsxs)("div",{className:"my-2",children:[(0,i.jsx)(K,{children:"Status"}),(0,i.jsxs)(G,{backgroundColor:null==j?void 0:j.backgroundColor,children:[(0,i.jsx)(ee,{children:(0,i.jsx)("img",{src:null==j?void 0:j.image,alt:"Status icon",role:"presentation"})}),null==j?void 0:j.label]})]}),(null==C?void 0:C.label)!=="M2"&&(0,i.jsxs)("div",{className:"my-2",children:[(0,i.jsx)(K,{children:"\xa0"}),(0,i.jsxs)(G,{backgroundColor:null==w?void 0:w.backgroundColor,children:[(0,i.jsx)(ee,{children:(0,i.jsx)("img",{src:null==w?void 0:w.image,alt:"".concat(null==w?void 0:w.label," icon"),role:"presentation"})}),null==w?void 0:w.label]})]})]}),(null==a?void 0:a.isArchived)&&(0,i.jsx)("div",{className:"mt-auto",children:(0,i.jsxs)(h.$,{variant:"isPrimary",fullWidth:!0,disabled:!0,children:[(0,i.jsx)("img",{src:"/icons/archiveLine.svg",alt:"Archive line icon",role:"presentation",className:"h-4 w-4"}),"Archived"]})})]})};var en=n(5755),ei=n(68001),er=n(91122);let el=S.Ay.span.withConfig({componentId:"sc-b98b79fd-0"})(["font-weight:bold;font-size:18px;"]),es=S.Ay.div.withConfig({componentId:"sc-b98b79fd-1"})(["padding:",";overflow:auto;max-height:80%;"],e=>{let{padding:t}=e;return t||"1.5rem"}),ea=S.Ay.div.withConfig({componentId:"sc-b98b79fd-2"})(["background-color:#f5f6f7;font-weight:bold;font-size:12px;padding:0.75rem;text-align:left;"]),eo=S.Ay.div.withConfig({componentId:"sc-b98b79fd-3"})(["margin:0.75rem;border-bottom:1px solid #eeeef2;"]),ed=S.Ay.div.withConfig({componentId:"sc-b98b79fd-4"})(["display:flex;justify-content:space-between;align-items:center;& > div{display:flex;justify-content:space-between;width:100%;}"]),ec=S.Ay.div.withConfig({componentId:"sc-b98b79fd-5"})(["padding:0.75rem 0;display:flex;& > div:nth-child(1){width:50%;font-weight:bold;font-size:14px;}& > div:nth-child(2){width:50%;}.positiveImpact{margin-bottom:1em;}"]),eu=S.Ay.div.withConfig({componentId:"sc-b98b79fd-6"})(["& > div:nth-child(1){margin-bottom:0.5rem;font-weight:bold;font-size:16px;word-wrap:break-word;}& > div:nth-child(2){font-size:16px;}"]),em=S.Ay.div.withConfig({componentId:"sc-b98b79fd-7"})(["margin-top:",";border:",";& > div:last-child{border-bottom:",";}"],e=>{let{marginTop:t=!0}=e;return t?"1.5rem":""},e=>{let{border:t=!0}=e;return t?"1px solid #eeeef2":""},e=>{let{lastChildBorder:t=!1}=e;return t?"":"none"}),ep=S.Ay.div.withConfig({componentId:"sc-b98b79fd-8"})(["position:sticky;top:4.25rem;width:50rem;height:calc(100vh - 4.25rem);border-left:solid 1px #abacbe;background-color:#fafbfb;& > div:nth-child(1){padding:1rem 1.5rem;border-bottom:1px solid #eeeef2;& > div:nth-child(1){display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem;}}"]),eh=S.Ay.div.withConfig({componentId:"sc-b98b79fd-9"})(["",""],e=>{let{backgroundColor:t}=e;return t&&(0,S.AH)(["display:flex;align-items:center;border-radius:9999px;background-color:rgba(34,171,59,0.3);padding:2px;height:100%;margin:auto 0;"])}),ex=S.Ay.div.withConfig({componentId:"sc-f5987a2b-0"})([".velt-body{padding:20px;}.velt-comment-dialog--selected{.velt-body{padding:0 !important;}.velt-user-avatar{margin-left:'7px';background-color:#333;}}"]),eg=e=>{var t,n,r,l;let{activeSidebar:s}=e,[a,o]=(0,c.useState)("desc");return(0,i.jsxs)(ex,{"data-sentry-element":"MDBDivWrapper","data-sentry-component":"MD
1BComments","data-sentry-source-file":"MDBComments.tsx",children:[(0,i.jsx)("div",{className:"me-8 mt-5 flex justify-end",children:(0,i.jsxs)(h.$,{className:"my-auto p-2",onClick:()=>{o("asc"===a?"desc":"asc")},"data-sentry-element":"Button","data-sentry-source-file":"MDBComments.tsx",children:[(0,i.jsx)("img",{src:"/icons/sort.svg",alt:"Sort icon",role:"presentation"}),"desc"===a?"Newest":"Oldest"]})}),(0,i.jsx)(en.anL,{"data-sentry-element":"VeltWireframe","data-sentry-source-file":"MDBComments.tsx",children:(0,i.jsxs)(en.CQ9,{"data-sentry-element":"VeltInlineCommentsSectionWireframe","data-sentry-source-file":"MDBComments.tsx",children:[(0,i.jsx)(en.CQ9.Skeleton,{"data-sentry-element":"VeltInlineCommentsSectionWireframe.Skeleton","data-sentry-source-file":"MDBComments.tsx"}),(0,i.jsxs)(en.CQ9.Panel,{"data-sentry-element":"VeltInlineCommentsSectionWireframe.Panel","data-sentry-source-file":"MDBComments.tsx",children:[(0,i.jsx)(en.CQ9.ComposerContainer,{"data-sentry-element":"VeltInlineCommentsSectionWireframe.ComposerContainer","data-sentry-source-file":"MDBComments.tsx"}),(0,i.jsx)(en.JPQ,{condition:"{commentAnnotations.length} !== 0","data-sentry-element":"VeltIf","data-sentry-source-file":"MDBComments.tsx",children:(0,i.jsxs)("div",{className:"mt-6 flex flex-row gap-2 text-sm",children:[(0,i.jsx)(en.CQ9.CommentCount,{"data-sentry-element":"VeltInlineCommentsSectionWireframe.CommentCount","data-sentry-source-file":"MDBComments.tsx"}),(0,i.jsxs)("span",{className:"flex flex-row",children:["Comment",(0,i.jsx)(en.JPQ,{condition:"{commentAnnotations.length} > 1","data-sentry-element":"VeltIf","data-sentry-source-file":"MDBComments.tsx",children:"s"})]})]})}),(0,i.jsx)(en.CQ9.List,{"data-sentry-element":"VeltInlineCommentsSectionWireframe.List","data-sentry-source-file":"MDBComments.tsx"})]})]})}),(0,i.jsx)(en.Q05,{commentTool:!1,seenByUsers:!0,darkMode:!1,"data-sentry-element":"VeltComments","data-sentry-source-file":"MDBComments.tsx"}),(0,i.jsx)(em,{className:"mt-6 px-6",marginTop:!1,border:!1,lastChildBorder:!0,id:null==s||null==(n=s.metric)||null==(t=n.pk)?void 0:t.toString(),"data-velt-comments-target":"true","data-velt-target-inline-comment-element-id":"container-id","data-sentry-element":"SidebarTableInfo","data-sentry-source-file":"MDBComments.tsx",children:(0,i.jsx)(er.f,{sortOrder:a,pageName:"Metric Comments",id:null==s||null==(l=s.metric)||null==(r=l.pk)?void 0:r.toString(),"data-sentry-element":"VeltInlineCommentWrapper","data-sentry-source-file":"MDBComments.tsx"})})]})};var ef=n(35181);let ev=S.Ay.div.withConfig({componentId:"sc-ec0bb37e-0"})(["margin-bottom:1.5rem;border:1px solid #abacbe;border-radius:0.25rem;cursor:pointer;& > div:first-child{margin:0.75rem;& > div:nth-child(1){display:flex;justify-content:space-between;}}"]),ey=S.Ay.div.withConfig({componentId:"sc-ec0bb37e-1"})(["display:flex;font-size:14px;gap:4px;"]),eb=S.Ay.button.withConfig({componentId:"sc-ec0bb37e-2"})(["border:none;background:transparent;margin:auto 0;img{width:100%;}"]),ej=S.Ay.div.withConfig({componentId:"sc-ec0bb37e-3"})(["display:flex;width:50%;font-size:14px;gap:12px;margin:auto 0;"]),ew=S.Ay.div.withConfig({componentId:"sc-ec0bb37e-4"})(["display:flex;flex-direction:column;"]);S.Ay.span.withConfig({componentId:"sc-ec0bb37e-5"})(["font-size:10px;"]);let eC=e=>{let{name:t}=e;return(0,i.jsx)("a",{href:"/deals/".concat(t.opportunity__id),rel:"noopener noreferrer",target:"_blank","data-sentry-component":"LinkedOpportunityCard","data-sentry-source-file":"LinkedOpportunityCard.tsx",children:(0,i.jsx)(ev,{"data-sentry-element":"LinkedOpportunityContainer","data-sentry-source-file":"LinkedOpportunityCard.tsx",children:(0,i.jsx)("div",{children:(0,i.jsxs)("div",{children:[(0,i.jsxs)(ej,{"data-sentry-element":"FileInfoContainer","data-sentry-source-file":"LinkedOpportunityCard.tsx",children:[(0,i.jsx)(eh,{backgroundColor:k.Xp[0].backgroundColor,"data-sentry-element":"OpportunityContentIcon","data-sentry-source-file":"LinkedOpportunityCard.tsx",children:k.Xp[0].image&&(0,i.jsx)("img",{src:k.Xp[0].image,alt:"Status",role:"presentation",style:{maxWidth:"unset"}})}),(0,i.jsx)(ew,{className:"break-words lg:max-w-80","data-sentry-element":"FileDetailsContainer","data-sentry-source-file":"LinkedOpportunityCard.tsx",children:t.opportunity__name})]}),(0,i.jsx)(ey,{"data-sentry-element":"ButtonContainer","data-sentry-source-file":"LinkedOpportunityCard.tsx",children:(0,i.jsx)(eb,{type:"submit","data-sentry-element":"ButtonAction","data-sentry-source-file":"LinkedOpportunityCard.tsx",children:(0,i.jsx)("img",{src:"/icons/metricsDatabase/externalLink.svg",alt:"Delete Icon",role:"presentation"})})})]})})})})},ek=()=>{var e,t,n,r,s,a,o,d,u,p,x,g,f,b,j,w,C,M,I,N,S,D,O,P,F,L,z,B,T,R,E,Y,W,_,V,$;let H=(0,v.j)(),{VELT_API_KEY:Q}=l()().publicRuntimeConfig,U=(0,m.d4)(A.a4),[X,Z]=(0,c.useState)(k.QW[0]),J=null===k.ZW||void 0===k.ZW||null==(e=k.ZW.find)?void 0:e.call(k.ZW,e=>{var t;return e.value===(null==U||null==(t=U.metric)?void 0:t.category)}),K=null===k.hR||void 0===k.hR||null==(t=k.hR.find)?void 0:t.call(k.hR,e=>{var t;return e.value===(null==U||null==(t=U.metric)?void 0:t.status)}),et=null===k.go||void 0===k.go||null==(n=k.go.find)?void 0:n.call(k.go,e=>{var t;return e.value===(null==U||null==(t=U.metric)?void 0:t.type)});return(null==U?void 0:U.name)===k.CK?(0,i.jsxs)(ep,{children:[(0,i.jsxs)("div",{children:[(0,i.jsxs)("div",{children:[(0,i.jsx)(el,{children:"Metric Information"}),(0,i.jsx)("span",{children:(0,i.jsx)("img",{src:"/icons/close.svg",alt:"",role:"presentation",onClick:()=>
1{Z(k.QW[0]),H((0,A.Xx)())}})})]}),(0,i.jsx)(ed,{children:(0,i.jsxs)("div",{children:[(0,i.jsx)(ei.Ay,{value:X,onChange:e=>{Z(e)},options:k.QW.map(e=>{var t;return{...e,disabled:e.disabled&&(null==U||null==(t=U.metric)?void 0:t.type)!=="M1"}}),isOptionDisabled:e=>e.disabled,isSearchable:!1}),(!!(null==U||null==(s=U.metric)||null==(r=s.attachedOpportunities)?void 0:r.length)||(null==X?void 0:X.value)!=="Linked Opportunity")&&!(null==U||null==(a=U.metric)?void 0:a.isArchived)&&(0,i.jsxs)(h.$,{size:h.l.small,variant:"isPrimary",onClick:e=>{e.preventDefault(),e.stopPropagation(),H((0,A._1)({metric:null==U?void 0:U.metric,name:k.TY}))},disabled:(null==U||null==(o=U.metric)?void 0:o.type)!=="M1"||(null==U||null==(d=U.metric)?void 0:d.isArchived),children:[(0,i.jsx)("img",{src:"/icons/chain.svg",alt:"Chain icon",role:"presentation"}),"Add to Deal"]})]})})]}),(null==X?void 0:X.value)===k.QW[0].value&&(0,i.jsxs)(es,{children:[(0,i.jsxs)(eu,{children:[(0,i.jsx)("div",{className:"break-words",children:null==U||null==(u=U.metric)?void 0:u.title}),(0,i.jsxs)("div",{className:"mt-4 break-words",children:[(null==U||null==(p=U.metric)?void 0:p.description)&&(0,i.jsx)(y.EY,{className:"text-xs",children:"Description / Story"}),null==U||null==(x=U.metric)?void 0:x.description]}),(0,i.jsxs)("div",{className:"mt-2 break-words",children:[(null==U||null==(g=U.metric)?void 0:g.solution)&&(0,i.jsx)(y.EY,{className:"text-xs",children:"Solution or Product Purchased"}),null==U||null==(f=U.metric)?void 0:f.solution]})]}),(0,i.jsxs)(em,{children:[(0,i.jsx)(ea,{children:"Metric Information"}),(0,i.jsx)(eo,{children:(0,i.jsxs)(ec,{children:[(0,i.jsx)("div",{children:"Type"}),(0,i.jsx)("div",{children:(0,i.jsx)("div",{className:"flex h-7 w-7 items-center justify-center rounded-sm text-xs text-white ".concat(null==et?void 0:et.backgroundColor),children:null==et?void 0:et.label})})]})}),(0,i.jsx)(eo,{children:(0,i.jsxs)(ec,{children:[(0,i.jsx)("div",{children:"Category"}),(0,i.jsx)("div",{style:{width:"unset"}
1,children:(0,i.jsxs)(G,{backgroundColor:null==J?void 0:J.backgroundColor,children:[(null==J?void 0:J.image)?(0,i.jsx)(ee,{children:(0,i.jsx)("img",{src:null==J?void 0:J.image,alt:"",role:"presentation"})}):"",null==J?void 0:J.label]})})]})}),(0,i.jsx)(eo,{children:(0,i.jsxs)(ec,{children:[(0,i.jsx)("div",{children:"Negative Impact / Pain"}),(0,i.jsx)("div",{className:"whitespace-pre-line break-words",children:(null==U||null==(b=U.metric)?void 0:b.pain)||"N/A"})]})}),(0,i.jsx)(eo,{children:(0,i.jsxs)(ec,{children:[(0,i.jsx)("div",{children:"After State"}),(0,i.jsx)("div",{className:"whitespace-pre-line break-words",children:(null==U||null==(j=U.metric)?void 0:j.afterState)||"N/A"})]})}),(0,i.jsx)(eo,{children:(0,i.jsxs)(ec,{children:[(0,i.jsx)("div",{children:"Positive Impact"}),(0,i.jsx)("div",{className:"whitespace-pre-line break-words",children:null==U||null==(M=U.metric)||null==(C=M.metricImpact)||null==(w=C.filter(e=>!(null==e?void 0:e.isDeleted)))?void 0:w.map(e=>(0,i.jsxs)("div",{className:"positiveImpact",children:[(0,i.jsxs)("strong",{children:[null==e?void 0:e.value,null==e?void 0:e.unit]}),"\xa0",(null==e?void 0:e.increase)?"increase":"decrease","\xa0",(0,i.jsxs)("span",{children:["in\xa0",null==e?void 0:e.impact]})]}))})]})})]}),(0,i.jsxs)(em,{children:[(0,i.jsx)(ea,{children:"Deal Information"}),(0,i.jsx)(eo,{children:(0,i.jsxs)(ec,{children:[(0,i.jsx)("div",{children:"Original Deal"}),(0,i.jsx)("div",{className:"whitespace-pre-line break-words",children:(null==U||null==(I=U.metric)?void 0:I.opportunityLink)||"N/A"})]})}),(0,i.jsx)(eo,{children:(0,i.jsxs)(ec,{children:[(0,i.jsx)("div",{children:"Decision Criteria"}),(0,i.jsx)("div",{className:"whitespace-pre-line break-words",children:(null==U||null==(N=U.metric)?void 0:N.opportunityDecisionCriteria)||"N/A"})]})}),(0,i.jsx)(eo,{children:(0,i.jsxs)(ec,{children:[(0,i.jsx)("div",{children:"Deal Owner"}),(0,i.jsx)("div",{className:"whitespace-pre-line break-words",children:(null==U||null==(S=U.metric)?void 0:S.opportunityOwner)||"N/A"})]})}),(0,i.jsx)(eo,{children:(0,i.jsxs)(ec,{children:[(0,i.jsx)("div",{children:"Champion"}),(0,i.jsx)("div",{className:"whitespace-pre-line break-words",children:(null==U||null==(D=U.metric)?void 0:D.opportunityChampion)||"N/A"})]})}),(0,i.jsx)(eo,{children:(0,i.jsxs)(ec,{children:[(0,i.jsx)("div",{children:"Economic Buyer"}),(0,i.jsx)("div",{className:"whitespace-pre-line break-words",children:(null==U||null==(O=U.metric)?void 0:O.opportunityEconomicBuyer)||"N/A"})]})}),(null==U||null==(P=U.metric)?void 0:P.type)!=="M1"&&(0,i.jsx)(eo,{children:(0,i.jsxs)(ec,{children:[(0,i.jsx)("div",{className:"flex items-center",children:"Metric Status"}),(0,i.jsx)("div",{style:{width:"unset"}
1,children:(0,i.jsx)(G,{backgroundColor:null==K?void 0:K.backgroundColor,children:null==K?void 0:K.label})})]})})]}),(0,i.jsxs)(em,{children:[(0,i.jsx)(ea,{children:"Company Details"}),(0,i.jsx)(eo,{children:(0,i.jsxs)(ec,{children:[(0,i.jsx)("div",{children:"Company Name"}),(0,i.jsx)("div",{className:"whitespace-pre-line break-words",children:(null==U||null==(F=U.metric)?void 0:F.companyName)||"N/A"})]})}),(0,i.jsx)(eo,{children:(0,i.jsxs)(ec,{children:[(0,i.jsx)("div",{children:"Company Size"}),(0,i.jsx)("div",{className:"whitespace-pre-line break-words",children:(null==U||null==(L=U.metric)?void 0:L.companySize)||"N/A"})]})}),(0,i.jsx)(eo,{children:(0,i.jsxs)(ec,{children:[(0,i.jsx)("div",{children:"Industry"}),(0,i.jsx)("div",{className:"whitespace-pre-line break-words",children:(null==U||null==(z=U.metric)?void 0:z.companyIndustry)||"N/A"})]})}),(0,i.jsx)(eo,{children:(0,i.jsxs)(ec,{children:[(0,i.jsx)("div",{children:"Product"}),(0,i.jsx)("div",{className:"whitespace-pre-line break-words",children:(null==U||null==(B=U.metric)?void 0:B.companyProduct)||"N/A"})]})}),(0,i.jsx)(eo,{children:(0,i.jsxs)(ec,{children:[(0,i.jsx)("div",{children:"Geography"}),(0,i.jsx)("div",{className:"whitespace-pre-line break-words",children:(null==U||null==(T=U.metric)?void 0:T.companyGeo)||"N/A"})]})})]})]}),(null==X?void 0:X.value)===k.QW[1].value&&(0,i.jsx)(es,{children:(0,i.jsx)(em,{marginTop:!1,border:!1,lastChildBorder:!0,children:(null==U||null==(E=U.metric)||null==(R=E.attachedOpportunities)?void 0:R.length)?(0,i.jsx)(i.Fragment,{children:null==U||null==(W=U.metric)||null==(Y=W.attachedOpportunities)?void 0:Y.map(e=>(0,i.jsx)(eC,{name:e},"linked-opportunity-card-".concat(e.opportunity__id)))}):(0,i.jsxs)(y.FO,{children:[(0,i.jsxs)(y.EY,{secondary:!0,children:["This metric is not attached to any deal",(0,i.jsx)("br",{}),"Attach to Deal."]}),(0,i.jsxs)(h.$,{variant:"isPrimary",onClick:e=>{e.preventDefault(),e.stopPropagation(),H((0,A._1)({metric:null==U?void 0:U.metric,name:k.TY}))},disabled:(null==U||null==(_=U.metric)?void 0:_.type)!=="M1"||(null==U||null==(V=U.metric)?void 0:V.isArchived),children:[(0,i.jsx)(q,{src:"/icons/chain.svg",alt:"Chain icon",role:"presentation"}),"Add to deal",(null==U||null==($=U.metric)?void 0:$.isArchived)&&(0,i.jsx)(ef.m,{position:"top",children:"Archived metrics cannot be linked to deals"})]})]})})}),(null==X?void 0:X.value)===k.QW[2].value&&(0,i.jsx)(es,{padding:"0rem",children:(0,i.jsx)(en.Nsw,{apiKey:Q,children:(0,i.jsx)(eg,{activeSidebar:U})})})]}):null};var eA=n(71090),eM=n(39091),eI=n(51694),eN=n(53975),eS=n(20843),eD=n(21880);let eO=S.Ay.div.withConfig({componentId:"sc-a98e9462-0"})(["display:flex;align-items:center;"]),eP=S.Ay.div.withConfig({componentId:"sc-a98e9462-1"})(["display:flex;justify-content:center;align-items:center;width:2rem;height:2rem;margin-right:0.5rem;border-radius:50%;background-color:#96c3fd;"]),eF=S.Ay.div.withConfig({componentId:"sc-a98e9462-2"})(["display:flex;justify-content:flex-end;button:first-child{margin-right:0.5rem;}"]),eL=e=>{let{shouldDisplayModal:t,handleClose:n,activeMetric:r,isCrmOwnerV2Enabled:l,isAdmin:s,currentUserId:a,onClickAddButton:o}=e,d=(0,v.j)(),p=(0,m.d4)(A.ks),x=(0,m.d4)(A.rA),g=(0,m.d4)(A.pv),f=x.map(e=>({label:e.name,value:e.id})).sort((e,t)=>e.label.localeCompare(t.label)),y=eM.Ik().shape({opportunity:eD.SV}),{control:b,clearErrors:j,formState:{errors:w},watch:C,setValue:k,setError:M}=(0,u.mN)({defaultValues:{},resolver:(0,eA.t)(y)});(0,c.useEffect)(()=>{t&&k("opportunity",null)},[t,k]);let I=async e=>{e&&e.length>=2&&f.filter(t=>t.label.toLowerCase().includes(e.toLowerCase())).length<5&&g.next&&await d((0,A.cN)({endpoint:g.next,filters:{},isCrmOwnerV2Enabled:l,isAdmin:s,currentUserId:a}))},N=C("opportunity")||null;return t?(0,i.jsxs)(eN.a,{handleClose:n,title:(0,i.jsxs)(eO,{children:[(0,i.jsx)(eP,{children:(0,i.jsx)("img",{src:"/icons/addCircleFill.svg",alt:"Add circle fill icon",role:"presentation",className:"z-50 h-4 w-4"})}),"Add to Opportunity"]}),actionButtons:(0,i.jsxs)(eF,{children:[(0,i.jsx)(h.$,{variant:"text",style:{color:"#111111",padding:"0.5rem"},onClick:n,children:"Cancel"}),(0,i.jsxs)(h.$,{variant:"isPrimary",onClick:()=>{N?(j("opportunity"),o(N,r)):M("opportunity.value",{message:"Opportunity cannot be empty",type:"custom"})},disabled:p.addMetricToOpportunity===eS.IZ.LOADING,children:[(0,i.jsx)("img",{src:"/icons/addFill.svg",alt:"Add fill icon",role:"presentation"}),"Add to Opportunity"]})]}),children:[(0,i.jsx)("div",{className:"mb-4 text-left text-base",children:"Select opportunity where you want to add this Metric."}),(0,i.jsx)(u.xI,{control:b,name:"opportunity",render:e=>{var t,n;let{field:{value:r,onChange:l}}=e;return(0,i.jsx)(eI.m,{fullWidth:!0,onChange:l,value:r,label:"Cho
1ose opportunity",placeholder:"Select opportunity",data:f,isSearchable:!0,onInputChange:I,error:null==w||null==(n=w.opportunity)||null==(t=n.value)?void 0:t.message})}})]}):null},ez=S.Ay.div.withConfig({componentId:"sc-a98e9462-0"})(["display:flex;align-items:center;"]),eB=S.Ay.div.withConfig({componentId:"sc-a98e9462-1"})(["display:flex;justify-content:center;align-items:center;width:2rem;height:2rem;margin-right:0.5rem;border-radius:50%;background-color:#96c3fd;"]),eT=S.Ay.div.withConfig({componentId:"sc-a98e9462-2"})(["display:flex;justify-content:flex-end;button:first-child{margin-right:0.5rem;}"]),eR=e=>{let{disableArchiveButton:t,shouldDisplayModal:n,handleClose:r,activeMetric:l,onClickArchiveButton:s}=e;return n?(0,i.jsx)(eN.a,{handleClose:r,title:(0,i.jsxs)(ez,{children:[(0,i.jsx)(eB,{children:(0,i.jsx)("img",{src:"/icons/archiveFill.svg",alt:"Archive icon",role:"presentation",style:{height:"1rem",width:"1rem",zIndex:999}})}),"Archive"]}),actionButtons:(0,i.jsxs)(eT,{children:[(0,i.jsx)(h.$,{variant:"text",style:{color:"#111111",padding:"0.5rem"},onClick:r,children:"Cancel"}),(0,i.jsxs)(h.$,{variant:"isPrimary",onClick:s,disabled:t,children:[(0,i.jsx)("img",{src:"/icons/archiveLine.svg",alt:"Archive line icon",role:"presentation"}),"Archive Metric"]})]}),children:(0,i.jsxs)("div",{children:[(0,i.jsxs)("div",{className:"text-left text-base",children:["Are you sure you want to archive",(0,i.jsx)("span",{className:"mx-1 font-bold",children:null==l?void 0:l.title}),"from the Metrics Database?"]}),(0,i.jsx)("div",{className:"mt-4 text-left text-xs",children:"You can still view archived metrics through Filter."})]})}):null},eE=e=>{let{page:t,setPage:n}=e,r=(0,v.j)(),l=(0,m.d4)(b.jh),s=(0,m.d4)(A._w);return(0,i.jsxs)("div",{style:{alignItems:"center",alignSelf:"flex-end",display:"flex",gap:"1rem",marginTop:"0.5rem"},"data-sentry-component":"PaginationButtons","data-sentry-source-file":"PaginationButtons.tsx",children:[(0,i.jsx)(y.EY,{secondary:!0,"data-sentry-element":"Text","data-sentry-source-file":"PaginationButtons.tsx",children:"".concat(k.Jt*(t-1)+1,"-").concat(t*k.Jt<s.count?t*k.Jt:s.count," of ").concat(s.count)}),(0,i.jsx)(h.$,{disabled:1===t,variant:"text",onClick:e=>{e.preventDefault(),s.previous&&(r((0,A.ms)({endpoint:s.previous,userId:null==l?void 0:l.id})),n(e=>e-1))},"data-sentry-element":"Button","data-sentry-source-file":"PaginationButtons.tsx",children:(0,i.jsx)("img",{src:"/icons/chevronLeft.svg",alt:"Chevron left icon",role:"presentation"})}),(0,i.jsx)(h.$,{disabled:t*k.Jt>=s.count,variant:"text",onClick:e=>{e.preventDefault(),s.next&&(r((0,A.ms)({endpoint:s.next,userId:null==l?void 0:l.id})),n(e=>e+1))},"data-sentry-element":"Button","data-sentry-source-file":"PaginationButtons.tsx",children:(0,i.jsx)("img",{src:"/icons/chevronRight.svg",alt:"Chevron right icon",role:"presentation"})})]})};S.Ay.div.withConfig({componentId:"sc-6a84dab8-0"})(["display:flex;flex-wrap:wrap;width:100%;margin-top:2rem;gap:",";row-gap:0.75rem;"],e=>{let{isSidebarActive:t}=e;return t?"2%":"1%"});let eY=(0,S.Ay)(h.$).withConfig({componentId:"sc-6a84dab8-1"})(["border:none;background-color:"," !important;color:",";transition:background-color 0.3s,color 0.3s;&:hover{border:none;}&:active{background-color:",";color:",";}"],e=>{let{isTypeActive:t}=e;return t?"#D6E8FF":"transparent"},e=>{let{isTypeActive:t}=e;return t?"":"inherit"},e=>{let{isTypeActive:t}=e;return t?"#AEC8E5":"#D6E8FF"},e=>{let{isTypeActive:t}=e;return t?"":"#000"}),eW=S.Ay.div.withConfig({componentId:"sc-6a84dab8-2"})(["display:flex;gap:10px;margin-top:32px;"]),e_=e=>{let{asComponent:t=!1}=e,n=(0,v.j)(),r=(0,m.d4)(b.jh),l=(0,m.d4)(b.nX),s=(0,m.d4)(A.No),a=(0,m.d4)(A.jO),o=(0,m.d4)(A.Ni),M=(0,m.d4)(A.a4);(0,m.d4)(A.pv);let I=(0,m.d4)(A.Ir),N=(0,m.d4)(A.Rb),S=k.r[0],D=k.r.filter(e=>e!==S),{data:O}=(0,w.Rd)(),P=(0,c.useMemo)(()=>(0,C.TS)(O,r),[O,r]),{register:F,watch:L}=(0,u.mN)({defaultValues:{searchInput:""}}),z=L("searchInput"),B=async e=>{await n((0,A.cN)({endpoint:e,filters:{},isCrmOwnerV2Enabled:P,isAdmin:l,currentUserId:null==r?void 0:r.id}))},[T,Y]=(0,c.useState)(1);(0,c.useEffect)(()=>{let e=setTimeout(async()=>{Y(1),(0,d.pH)(await n((0,A.ms)({filters:s,sortOrder:N,search:z,userId:null==r?void 0:r.id})))},500);return()=>clearTimeout(e)},[s,N,z,n,null==r?void 0:r.id]);let[W,V]=(0,c.useState)(k.p),[$,H]=(0,c.useState)(!1),q=()=>{V(k.p)},Q=async e=>{H(!0);try{(0,d.pH)(await n((0,A.XR)({metricId:null==e?void 0:e.pk,userId:null==r?void 0:r.id}))),(0,g.P)("Successfully archived a Metric.","Metric archiving successful!",f.l.success,null),setTimeout(()=>{H(!1)},1500)}catch(e){(0,g.P)("Failed to archive a Metric.","Metric archiving failed!",f.l.error,null)}(0,d.pH)(await n((0,A.ms)({filters:s,sortOrder:N,userId:null==r?void 0:r.id}))),n((0,A.yC)())},U=async(e,t)=>{try{(0,d.pH)(await n((0,A.gk)({metricId:null==t?void 0:t.pk,opportunityId:null==e?void 0:e.value,userId:null==r?void 0:r.id}))),(0,g.P)("Successfully attached a Metric.","Metric attachment successful!",f.l.success,null);let i=(0,d.pH)(await n((0,A.ms)({filters:s,sortOrder:N,userId:null==r?void 0:r.id}))).results.find(e=>e.pk===(null==t?void 0:t.pk));i&&n((0,A.$0)({metric:i,name:k.CK}))}catch(e){(0,g.P)("Metric is already attached to this opportunity.","Failed to attach Metric!",f.l.error,null)}n((0,A.yC)())},X=async e=>{var t;let i=(0,d.pH)(await n((0,A.l4)(e||""))),l=i.findIndex(e=>e.value===(null==r?void 0:r.id));-1!==l&&i.splice(l,1),i=i.map(e=>{var t;return{...e,value:null==e||null==(t=e.value)?void 0:t.toString()}}),n((0,A.Cw)([{label:"".concat(null==r?void 0:r.firstName," ").concat(null==r?void 0:r.lastName),value:null==r||null==(t=r.id)?void 0:t.toString()},...i]))};return(0,c.useEffect)(()=>{n((0,A._F)({type:["M1"]})),n((0,A.LG)("M1")),n((0,A.ms)({sortOrder:N,filters:{...s,type:["M1"]},userId:null==r?void 0:r.id})),B(),n((0,j.U_)("")),X()},[]),(0,i.jsxs)("div",{className:"relative flex w-full","data-sentry-component":"MetricsDatabasePage","data-sentry-source-file":"MetricsDatabasePage.tsx",children:[(0,i.jsxs)(y.ts,{variant:y.R1.metricsDatabase,"data-sentry-element":"PageWrapperV2","data-sentry-source-file":"MetricsDatabasePage.tsx",children:[(0,i.jsx)(y.DZ,{as:"h2","data-sentry-element":"Heading","data-sentry-source-file":"MetricsDatabasePage.tsx",children:"Metrics Database"}),(0,i.jsx)(eR,{disableArchiveButton:$,shouldDisplayModal:o.name===k.cX,handleClose:()=>{n((0,A.yC)())},activeMetric:o.metric,onClickArchiveButton:()=>{Q(o.metric)},"data-sentry-element":"ModalArchiveMetric","data-sentry-source-file":"MetricsDatabasePage.tsx"}),(0,i.jsx)(eL,{shouldDisplayModal:o.name===k.TY,isCrmOwnerV2Enabled:P,isAdmin:l,currentUserId:null==r?void 0:r.id,handleClose:()=>{n((0,A.yC)())},activeMetric:o.metric,onClickAddButton:(e,t)=>{U(e,t)},"data-sentry-element":"ModalAddMetricToOpportunity","data-sentry-source-file":"MetricsDatabasePage.tsx"}),(0,i.jsxs)("div",{className:"mt-4 flex w-full justify-between gap-2",children:[(0,i.jsx)("div",{className:"my-auto w-100",children:(0,i.jsx)(x.A,{register:F,name:"searchInput",icon:"/icons/layout/searchLine.svg",iconLeft:!0,placeholder:"Search by metric name",marginTop:"0",className:"p-4 text-sm","data-sentry-element":"TextField","data-sentry-source-file":"MetricsDatabasePage.tsx"})}),(0,i.jsx)(R,{searchInput:z,profileMDBViewMode:t,getOpportunityOwners:X,"data-sentry-element":"ActionButtons","data-sentry-source-file":"MetricsDatabasePage.tsx"})]}),(0,i.jsx)(_,{"data-sentry-element":"FilterPills","data-sentry-source-file":"MetricsDatabasePage.tsx"}),(0,i.jsx)(eW,{"data-sentry-element":"MetricTabs","data-sentry-source-file":"MetricsDatabasePage.tsx",children:k.r.map(e=>(0,i.jsx)(eY,{isTypeActive:I===e,onClick:()=>{let t=e===S;n((0,A.LG)(e)),n((0,A._F)({type:[...t?D:[e]]}))},children:e},e))}),a.length||(null==z?void 0:z.length)?(0,i.jsx)("div",{className:(0,p.cn)("mt-8 grid w-full gap-4",(null==M?void 0:M.name)?"grid-cols-2":"grid-cols-4"),children:a.map((e,n)=>(0,i.jsx)(et,{enableOptions:!0,metric:e,onMetricMouseLeave:q,metricIndex:n,activeMetricSettings:W,setActiveMetricSettings:V,profileMDBViewMode:t,fullWidth:!1},e.pk))}):(0,i.jsxs)(y.FO,{children:[(0,i.jsxs)(y.EY,{secondary:!0,children:["You don't have a Metric to show.","M2"!==I&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("br",{}),(0,i.jsx)(y.EY,{secondary:!0,children:"Let's add your first Metric!"})]})]}),"M2"!==I&&(0,i.jsxs)(h.$,{variant:"isPrimary",onClick:()=>n((0,A.$0)({metric:null,name:k.Vp})),children:[(0,i.jsx)("img",{alt:"Plus icon",role:"presentation",src:"/icons/plus.svg"}),"Add Metric"]})]}),a.length>0&&(0,i.jsx)(eE,{page:T,setPage:Y}),!a.length&&(null==z?void 0:z.length)!==0&&(0,i.jsxs)(y.FO,{children:[(0,i.jsx)(y.EY,{children:"Metric not found!"}),(0,i.jsxs)(y.EY,{secondary:!0,children:["There's nothing related to \"",(0,i.jsx)("strong",{children:(0,i.jsx)("span",{className:"break-words lg:block lg:w-96",children:" ".concat(z)})}),'" inside the database.',(0,i.jsx)("br",{}),"Maybe a little spelling mistake?"]})]})]}),(0,i.jsx)(ek,{"data-sentry-element":"MetricDetailsSidebar","data-sentry-source-file":"MetricsDatabasePage.tsx"}),(0,i.jsx)(E.m,{stakeholderList:[],"data-sentry-element":"AddNewMetricSidebar","data-sentry-source-file":"MetricsDatabasePage.tsx"})]})},eV=()=>{let{NEXT_PUBLIC_PRODUCTS:e}=l()().publicRuntimeConfig;return(0,i.jsx)(s.P,{title:"Metrics Database",noPadding:!0,"data-sentry-element":"Layout","data-sentry-component":"MetricsDatabase","data-sentry-source-file":"metrics.tsx",children:(0,i.jsx)(a.O,{allowedPermissions:[...o.TG],productToCheck:e[0],"data-sentry-element":"ProtectedRoute","data-sentry-source-file":"metrics.tsx",children:(0,i.jsx)(e_,{"data-sentry-element":"MetricsDatabasePage","data-sentry-source-file":"metrics.tsx"})})})};eV.isRestricted=!0;let e$=eV}
1,20823:(e,t,n)=>{"use strict";n.d(t,{Y:()=>c});var i=n(37876);n(14232);var r=n(84976);let l=r.Ay.div.withConfig({componentId:"sc-5c29c5a8-0"})(["position:relative;display:block;margin-bottom:5px;padding-top:3px;padding-left:32px;font-size:16px;"]),s=r.Ay.label.withConfig({componentId:"sc-5c29c5a8-1"})(["color:",";font-weight:",";font-size:",";line-height:",";user-select:none;a{color:",";font-weight:",";}"],e=>{let{theme:t}=e;return t.colors.black[40]},e=>{let{theme:t}=e;return t.fontWeight.regular},e=>{let{theme:t}=e;return t.fontSize.secondary},e=>{let{theme:t}=e;return t.lineHeight.secondary},e=>{let{theme:t}=e;return t.colors.primary[120]},e=>{let{theme:t}=e;return t.fontWeight.bold}),a=r.Ay.label.withConfig({componentId:"sc-5c29c5a8-2"})(["position:relative;left:-32px;color:",";font-size:",";line-height:",";"],e=>{let{theme:t}=e;return t.colors.error[20]},e=>{let{theme:t}=e;return t.fontSize.captionPrimary},e=>{let{theme:t}=e;return t.lineHeight.captionPrimary}),o=r.Ay.input.attrs({type:"checkbox"}).withConfig({componentId:"sc-5c29c5a8-3"})(["position:absolute;z-index:-1;opacity:0;"]),d=r.Ay.div.withConfig({componentId:"sc-5c29c5a8-4"})(["position:absolute;top:6px;left:0;width:16px;height:16px;box-shadow:inset 0 0 0 1.5px #0d0c0c;border:0 solid #0d0c0c;border-radius:0.125rem;background:",";cursor:pointer;"," ",""],e=>{let{theme:t}=e;return t.colors.pure.white100},e=>{let{checked:t}=e;return t&&(0,r.AH)(["box-shadow:none;background-color:",";::after{box-sizing:unset;content:'';position:absolute;display:block;left:6px;top:2px;width:3px;height:8px;border:solid ",";border-width:0 2px 2px 0;transform:rotate(45deg);}::before{content:'';display:block;position:absolute;left:0;top:0;width:4.5rem;height:4.5rem;margin-left:-1.3rem;margin-top:-1.3rem;background:#2aa1c0;border-radius:3rem;opacity:0.6;z-index:99999;transform:scale(0);}"],e=>{let{theme:t}=e;return t.colors.primary[120]},e=>{let{theme:t}=e;return t.colors.pure.white100})},e=>{let{isDisabled:t,checked:n}=e;return t&&(0,r.AH)(["border:1.5px solid ",";background-color:",";box-shadow:none;cursor:default;",""],e=>{let{theme:t}=e;return t.colors.black[20]},e=>{let{theme:t}=e;return t.colors.black[5]},n&&(0,r.AH)(["::after{border:solid ",";border-width:0 2px 2px 0;top:1px;left:4px;}"],e=>{let{theme:t}=e;return t.colors.black[20]}))}),c=e=>{let{children:t="",disabled:n=!1,error:r,name:c,register:u,value:m,onChange:p,registerOptions:h,onClick:x}=e;return(0,i.jsx)(l,{onClick:x,"data-sentry-element":"CheckboxGroup","data-sentry-component":"CheckboxField","data-sentry-source-file":"CheckboxField.tsx",children:(0,i.jsxs)(s,{"data-sentry-element":"CheckboxLabel","data-sentry-source-file":"CheckboxField.tsx",children:[t,r&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("br",{}),(0,i.jsx)(a,{children:null==r?void 0:r.message})]}),(0,i.jsx)(o,{checked:m,disabled:n,...null==u?void 0:u(c,h),onChange:e=>p(e.target.checked),"data-sentry-element":"CheckboxInput","data-sentry-source-file":"CheckboxField.tsx"}),(0,i.jsx)(d,{checked:m,isDisabled:n,"data-sentry-element":"CheckboxIndicator","data-sentry-source-file":"CheckboxField.tsx"})]})})}},21880:(e,t,n)=>{"use strict";n.d(t,{M7:()=>x,Xk:()=>c,$N:()=>v,Jq:()=>a,jX:()=>p,DF:()=>h,SV:()=>g,CV:()=>f,Q$:()=>d,ue:()=>y,ee:()=>s});var i=n(39091);let r=RegExp("^(?=.*\\d)(?=.*[^A-Za-z0-9])(?=.*[a-z])(?=.*[A-Z]).{8,}$");var l=n(23377);let s="Please provide a shorter name",a=i.Yj().max(256,s).required("Name cannot be empty"),o="Password must be at least 8 characters, including one uppercase, one lowercase, one number and one special character",d="This field is required",c="Invalid Email.",u="can be 64 characters long only.",m="Job title ".concat(u),p={firstName:i.Yj().required("First name cannot be empty"),lastName:i.Yj().required("Last name cannot be empty")},h={confirmPassword:i.Yj().required(d).matches(r,o).oneOf([i.KR("password"),null],"The passwords don't match. Please double-check and try again."),firstName:i.Yj().required("First name cannot be empty"),isMarketingOptIn:i.lc(),lastName:i.Yj().required("Last name cannot be empty"),country:i.Yj().required("Country cannot be empty"),department:i.Yj().required("Department cannot be empty"),targetCustomerType:i.Yj().required("Organization type cannot be empty"),password:i.Yj().required(d).matches(r,o)},x=i.Ik().shape({value:i.Yj().required("Company cannot be empty")}),g=i.Ik().shape({value:i.Yj().required("Opportunity cannot be empty")}),f=i.Yj().required("Organization name cannot be empty").max(64,"Organization name ".concat(u)),v=i.Yj().nullable().max(64,m),y=i.Yj().required("Job title cannot be empty").max(64,m);i.Ik().shape({value:i.Yj().required(d).test("test/seniority-value-test",e=>l.Xu.some(t=>{let{value:n}=t;return n===e}))}).nullable()},28446:(e,t,n)=>{"use strict";n.d(t,{Y:()=>i.Y});var i=n(20823)},43508:(e,t,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/metrics",function(){return n(5101)}])},48407:(e,t,n)=>{"use strict";n.d(t,{E0:()=>d,Pz:()=>l,SU:()=>o,W_:()=>m,Y:()=>a,_N:()=>c,hq:()=>p,ks:()=>u,ls:()=>s});var i=n(35881);let r=e=>e.contacts,l=(0,i.Mz)(r,e=>e.contacts),s=(0,i.Mz)(r,e=>e.companies);(0,i.Mz)(r,e=>e.id);let a=(0,i.Mz)(r,e=>e.contactsCount),o=(0,i.Mz)(r,e=>e.totalCount),d=(0,i.Mz)(r,e=>e.next),c=(0,i.Mz)(r,e=>e.previous),u=(0,i.Mz)(r,e=>e.isSaving),m=(0,i.Mz)(r,e=>e.errors),p=(0,i.Mz)(r,e=>e.searchFilters)},53975:(e,t,n)=>{"use strict";n.d(t,{a:()=>f});var i=n(37876),r=n(14232),l=n(27772),s=n(45938),a=n(21551),o=n(84976),d=n(23377);let c=o.Ay.div.withConfig({componentId:"sc-9d74de7c-0"})(["position:fixed;top:50% !important;left:50%;z-index:9999;display:flex;justify-content:center;align-items:center;width:100vw;height:100% !important;min-height:100vh !important;transform:translate(-50%,-50%);animation:slideDown 0.3s ease-out;@keyframes slideDown{from{opacity:0;transform:translate(-50%,-60%);}to{opacity:1;transform:translate(-50%,-50%);}}"]),u=o.Ay.div.withConfig({componentId:"sc-9d74de7c-1"})(["display:flex;flex-direction:column;justify-content:flex-start;align-items:center;max-width:90%;max-height:80vh;box-shadow:0 6px 12px rgba(0,0,0,0.08);border-radius:",";background-color:",";&.closing{animation:slideUp 0.3s ease-in;}@keyframes slideUp{from{opacity:1;transform:translateY(0);}to{opacity:0;transform:translateY(-20px);}}::-webkit-scrollbar{width:4px;background:transparent;}::-webkit-scrollbar-track{margin-bottom:8px;background-color:transparent;}::-webkit-scrollbar-thumb{position:absolute;right:10px;border-radius:4px;background:",";background-clip:padding-box;}"],e=>{let{theme:t}=e;return t.borderRadius.large},e=>{let{theme:t}=e;return t.colors.pure.white100},e=>{let{theme:t}=e;return t.colors.black[10]}),m=o.Ay.div.withConfig({componentId:"sc-9d74de7c-2"})(["display:flex;justify-content:space-between;align-items:center;width:100%;gap:32px;padding:1rem 1.5rem;img{filter:"," !important;}"],d.dV.toBlack60),p=o.Ay.div.withConfig({componentId:"sc-9d74de7c-3"})(["position:absolute;top:50%;left:50%;z-index:-1;width:100vw;height:200% !important;min-height:100vh !important;background-color:",";transform:translate(-50%,-50%);backdrop-filter:blur(4px);"],e=>{let{theme:t}=e;return t.colors.alpha.alphaBlack16}
1),h=o.Ay.div.withConfig({componentId:"sc-9d74de7c-4"})(["border-top:1px solid #eeeef2;border-bottom:1px solid #eeeef2;padding:2rem 1.5rem;"]),x=o.Ay.div.withConfig({componentId:"sc-9d74de7c-5"})(["overflow:auto;overflow-x:hidden;display:flex;flex-direction:column;max-height:60vh;margin:2rem;::-webkit-scrollbar{width:4px;background:transparent;}::-webkit-scrollbar-track{margin-bottom:8px;background-color:transparent;}::-webkit-scrollbar-thumb{position:absolute;right:10px;border-radius:4px;background:",";background-clip:padding-box;}"],e=>{let{theme:t}=e;return t.colors.black[10]}),g=o.Ay.div.withConfig({componentId:"sc-9d74de7c-6"})(["width:100%;border-bottom-right-radius:",";border-bottom-left-radius:",";padding:1rem 1.5rem;background-color:#f5f6f7;"],e=>{let{theme:t}=e;return t.borderRadius.large},e=>{let{theme:t}=e;return t.borderRadius.large}),f=e=>{let{children:t,handleClose:n,title:o,titleClassName:d,actionButtons:f,large:v,hideClose:y,hideHeader:b,rounded:j,divider:w,noshadow:C,contentClassName:k,containerClassName:A}=e,M=(0,r.useRef)(null),I=(0,r.useRef)(null),[N,S]=(0,r.useState)(!1),D=()=>{S(!0),setTimeout(()=>{n()},300)};return(0,a.A)(M,D,!0),(0,s.AU)(I),(0,i.jsxs)(c,{className:"modal-custom",id:"modal",ref:I,"data-sentry-element":"ModalWrapper","data-sentry-component":"Modal","data-sentry-source-file":"Modal.tsx",children:[(0,i.jsx)(p,{onClick:D,"data-sentry-element":"ModalBlur","data-sentry-source-file":"Modal.tsx"}),(0,i.jsxs)(u,{className:"xs:mx-4 xs:w-10/12 lg:w-auto ".concat(N?"closing":""," ").concat(j?"rounded-xl":""," ").concat(C?"!shadow-none":"shadow-inherit"," ").concat(null!=A?A:""),ref:M,"data-sentry-element":"ModalContainer","data-sentry-source-file":"Modal.tsx",children:[!b&&(0,i.jsxs)(m,{children:[(0,i.jsx)(l.EY,{as:"h3",className:d,children:o}),!y&&(0,i.jsx)("img",{src:"/icons/close.svg",alt:"Close icon",role:"presentation",onClick:D})]}),w&&(0,i.jsx)("div",{className:"w-full border-t border-gray-200"}),v?(0,i.jsx)(x,{children:t}):(0,i.jsx)(h,{className:"xs:!w-full xs:!px-4 xs:!py-2 md:!px-[1.5rem] md:!py-[2rem] ".concat(b?"!border-t-0":""," ").concat(null!=k?k:""),children:t}),!!f&&(0,i.jsx)(g,{children:f})]})]})}},80174:(e,t,n)=>{"use strict";n.d(t,{T:()=>d});var i=n(37876),r=n(14232),l=n(4831),s=n(84976);let a=s.Ay.div.withConfig({componentId:"sc-f2d4cda7-0"})(["display:flex;flex-direction:column;margin-bottom:",";p{font-weight:",";span{color:",";font-weight:",";}}",""],e=>{let{marginBottomFormRow:t}=e;return t},e=>{let{theme:t}=e;return t.fontWeight.medium},e=>{let{theme:t}=e;return t.colors.black[40]},e=>{let{theme:t}=e;return t.fontWeight.regular},e=>{let{error:t}=e;return t&&(0,s.AH)(["> textarea:first-of-type{border-color:",";}"],e=>{let{theme:t}=e;return t.colors.error[20]})}),o=s.Ay.textarea.withConfig({componentId:"sc-f2d4cda7-1"})([""," resize:none;margin-top:2px;border:1px solid ",";border-radius:",";padding:10px 14px;font-size:",";line-height:",";word-break:break-word;:focus{outline:none;border:1px solid ",";}::placeholder{color:",";}:disabled{border:1px solid ",";background-color:",";::placeholder{color:",";}}"],e=>{let{autoResize:t}=e;return!t&&"height: 128px;"},e=>{let{theme:t}=e;return t.colors.black[10]},e=>{let{theme:t}=e;return t.borderRadius.medium},e=>{let{theme:t}=e;return t.fontSize.primary},e=>{let{theme:t}=e;return t.lineHeight.primary},e=>{let{theme:t}=e;return t.colors.primary[120]},e=>{let{theme:t}=e;return t.colors.black[60]},e=>{let{theme:t}=e;return t.colors.black[4]},e=>{let{theme:t}=e;return t.colors.black[4]},e=>{let{theme:t}=e;return t.colors.black[40]}),d=e=>{let{children:t,placeholder:n,name:s,register:d,className:c,textAreaClassName:u,disabled:m,error:p,marginBottomFormRow:h,value:x,dataCy:g,id:f,autoResize:v=!1,minRows:y=1,maxRows:b}=e,j=(0,r.useRef)(null),w=()=>{let e=j.current;if(!e||!v)return;e.style.height="auto";let t=e.scrollHeight,n=!1;if(y&&(t=Math.max(t,(parseInt(getComputedStyle(e).lineHeight)||20)*y)),b){let i=(parseInt(getComputedStyle(e).lineHeight)||20)*b;t>i&&(t=i,n=!0)}e.style.height=t+"px",e.style.overflowY=n?"auto":"hidden"};(0,r.useEffect)(()=>{v&&w()},[x,n,v]),(0,r.useEffect)(()=>
1{if(!v)return;let e=()=>{setTimeout(w,0)};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[v]);let{ref:C,...k}=d(s);return(0,i.jsxs)(a,{className:c,error:!!p,marginBottomFormRow:h,"data-sentry-element":"Wrapper","data-sentry-component":"Textarea","data-sentry-source-file":"Textarea.tsx",children:[t,(0,i.jsx)(o,{ref:e=>{C(e),j.current=e},id:null!=f?f:"",placeholder:n,disabled:m,value:x&&x,className:u,style:{...m?{color:"#7583A1"}:void 0,...v?{resize:"none"}:void 0},"data-cy":g,rows:v?y:void 0,...k,onChange:e=>{k.onChange(e),v&&w()},onInput:v?w:void 0,"data-sentry-element":"TextareaInput","data-sentry-source-file":"Textarea.tsx"}),(null==p?void 0:p.message)&&(0,i.jsx)("div",{style:{marginTop:"0.25rem"},children:(0,i.jsx)(l.sG,{children:null==p?void 0:p.message})})]})}},93062:(e,t,n)=>{"use strict";n.d(t,{j:()=>d});var i=n(37876);n(14232);var r=n(27772),l=n(84976);let s=l.Ay.label.withConfig({componentId:"sc-9404214a-0"})(["display:flex;gap:12px;align-items:center;cursor:pointer;input{display:none;}"]),a=l.Ay.span.withConfig({componentId:"sc-9404214a-1"})(["position:relative;display:flex;width:44px;height:24px;border-radius:0.25rem;background-color:#42526d;cursor:",";::after{content:'';position:absolute;top:50%;left:4px;width:16px;height:16px;box-shadow:0 32px 64px -12px #10182833;border-radius:0.25rem;background-color:",";transform:translateY(-50%);}",""],e=>{let{disabled:t}=e;return t?"not-allowed":"pointer"},e=>{let{theme:t}=e;return t.colors.pure.white100},e=>{let{checked:t}=e;return t&&(0,l.AH)(["background-color:#0045a3;::after{left:initial;right:4px;}"])}),o=l.Ay.img.withConfig({componentId:"sc-9404214a-2"})(["position:absolute;top:0.25rem;right:",";left:",";"],e=>{let{checked:t}=e;return t?"initial":"0.25rem"},e=>{let{checked:t}=e;return t?"0.25rem":"initial"}),d=e=>{let{value:t,onChange:n,label:l,preventDefault:d=!1,disabled:c,labelClass:u,...m}=e;return(0,i.jsxs)(s,{onClick:e=>d&&e.preventDefault(),"data-sentry-element":"Wrapper","data-sentry-component":"ToggleSwitch","data-sentry-source-file":"ToggleSwitch.tsx",children:[(0,i.jsx)("input",{...m,disabled:c,type:"checkbox",checked:t,onChange:e=>{d&&e.preventDefault(),n(e.target.checked)}}),(0,i.jsx)(a,{disabled:c,checked:t,"data-sentry-element":"Toggle","data-sentry-source-file":"ToggleSwitch.tsx",children:(0,i.jsx)(o,{src:"/icons/".concat(t?"checkFill":"closeLine",".svg"),alt:"Toggle icon",role:"presentation",checked:t,"data-sentry-element":"ToggleIcon","data-sentry-source-file":"ToggleSwitch.tsx"})}),l&&(0,i.jsx)(r.EY,{secondary:!0,className:u,children:l})]})}}},e=>{e.O(0,[9030,7972,4442,8001,3370,2163,6200,1694,9396,636,6593,8792],()=>e(e.s=43508)),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.