Signal:l,reason:o,...s}=a,i=(0,f.VA)(s);e((0,p.apiCall)({method:"salesHome.notifications.formatShare",args:i,abortSignal:l,reason:o})).then(e=>{n(e)}).catch(e=>{(0,g.default)({getState:t}).error(`API call to salesHome.notifications.formatShare
						with reason ${o} failed, initiated by generated fetcher`),r(e)})}));b.meta={name:"salesHomeNotificationsFormatShareFetcher",key:"createFetcherSalesHomeNotificationsFormatShareFetcher",description:"salesHome.notifications.formatShare generated fetcher"};var h=a(0x3711e82d),E=a(0x32d3ef3d),x=a(0xcea4a81c),y=a(0x113cdbbd7),A=a(0x1608420cc),C=a(0x103f48cb9),k=a(0x1506d547b),S=a(0xf7a922a4),N=a(0x181fc1a60);let w=(0,u.A)("salesHome.notifications.share generated fetcher",(e,t,a)=>new _.S((n,r)=>{let{abortSignal:l,reason:o,...s}=a,i=(0,f.VA)(s);e((0,p.apiCall)({method:"salesHome.notifications.share",args:i,abortSignal:l,reason:o})).then(e=>{n(e)}).catch(e=>{(0,g.default)({getState:t}).error(`API call to salesHome.notifications.share
						with reason ${o} failed, initiated by generated fetcher`),r(e)})}));w.meta={name:"salesHomeNotificationsShareFetcher",key:"createFetcherSalesHomeNotificationsShareFetcher",description:"salesHome.notifications.share generated fetcher"};var v=a(0x1d600678),O=a(0xa6b90d4b),I=a(0x24cf1145d),M=a(0x226892387);let R=new s.Ay("modernselling"),ForwardNotificationModal=e=>{let{createdTs:t,notificationType:a,isAdminCreated:l,msgOps:s,selectedChannelId:i,opportunityId:c,attachmentBlocks:d,salesforceRecord:m}=e,_=(0,r.wA)(),p="forward-sales-notification-dialog",u=R.t("Forward this notification");c&&(u=R.t("Forward this record update"));let g=R.t("Forward"),f=(0,n.useCallback)(()=>_((0,I.I)({channelOrMemberId:i,reason:p})).then(e=>{let a=_((0,O.A)({msgOps:s,channelId:e}))||[];return _(w({createdTs:t,channelId:e,...a.length&&{shareBlocks:a},reason:"sales-home-forward-notification",opportunityId:c}))}),[_,i,s,t,c]),b=(0,n.useMemo)(()=>({onClick:{enableClogAction:!0},elementName:"forward_notification_modal_btn",elementValue:t}),[t]),S=(0,n.useMemo)(()=>d&&n.createElement("div",{className:"c-message_attachment_v2"},n.createElement(C.A,{version2:!0}),n.createElement("div",null,n.createElement(A.A,{blocks:d,service:void 0,channelId:i,blocksContainerContext:y.pi.share_dialog}),m&&n.createElement("div",{className:"margin_top_100"},n.createElement(x.a,{entityState:E.w.enabled,size:E.S.expanded,record:m,showActionsBar:!1,isInteractive:!1})))),[d,m,i]),T=(0,M.d4)(e=>(0,v.x)(e,"salesforce_forwarding")?.default==="speedbump");return n.createElement(o.A,{eventId:h.EventId.LOB_SALES_HOME,uiComponentName:h.UiComponentName.LOB_NOTIFICATION_FORWARD_MODAL,channelId:i,lobNotificationType:a,isLobNotificationWorkflowAdmin:l},n.createElement(k.A,{...e,title:u,goButtonText:g,goButtonAutoClogProps:b,goHandler:f,dialogType:N.hs.NOTIFICATION,shareReason:p,notificationType:a,attachment:S,forwardingSpeedbumpEnabled:T}))};ForwardNotificationModal.displayName="ForwardNotificationModal";let T=(0,S.A)(ForwardNotificationModal);var F=a(0x11c82607b),H=a(0x46dbff89);let L=(0,F.Ay)("Opens the Forward Notification Modal",(e,t,a)=>{e((0,H.q)({element:n.createElement(T,a)}))});L.meta={name:"openForwardNotificationModal",key:"createThunkOpenForwardNotificationModal",description:"Opens the Forward Notification Modal"};let P=new s.Ay("modernselling"),ActionBarForward=({hasFocus:e,createdTs:t,notificationType:a,isAdminCreated:s,opportunityId:_})=>{let p=(0,r.wA)(),{maybeClosePeek:u}=(0,n.useContext)(m.Z),g=P.t("Forward notification");_&&(g=P.t("Forward record update"));let f=(0,n.useCallback)(()=>!e,[e]),E=(0,n.useCallback)(async e=>{e.stopPropagation();let n=await p(b({createdTs:t,opportunityId:_,reason:"sales-home-get-notification-blocks"}));if(n&&n.ok){let{content_blocks:e,attachment_blocks:r,salesforce_record:l}=n;p(L({createdTs:t,notificationType:a,isAdminCreated:s,contentBlocks:e,attachmentBlocks:r,salesforceRecord:l,opportunityId:_}))}u()},[p,t,_,u,a,s]),x=(0,n.useCallback)(()=>({onClick:{enableClogAction:!0},elementName:"forward_notification_action_bar",elementValue:t}),[t]);return(0,n.useEffect)(()=>{let e=new l.A;return e.bindAll([{keys:["f"],handler:E,filter:f,action:"keyup"}]),()=>e.reset()},[f,E]),n.createElement(o.A,{eventId:h.EventId.LOB_SALES_HOME,uiComponentName:h.UiComponentName.LOB_NOTIFICATION_ACTIONS_BAR,lobNotificationType:a,isLobNotificationWorkflowAdmin:s},n.createElement(d.Ay,{tip:g,position:"top"},n.createElement(i.A,{"aria-label":g,onClick:E,className:"c-message_actions__button",size:"small",autoClogProps:x()},n.createElement(c.Ah,{name:"share-message"}))))};ActionBarForward.displayName="ActionBarForward"},0x1090ee536:(e,t,a)=>{"use strict";a.d(t,{H:()=>ActionBarMore});var n=a(0xbad225b5),r=a(0x20482ad21),l=a(0x344bb842),o=a(0x99233ecb),s=a(0x4c96e5d9);let i=new r.Ay("modernselling"),ActionBarMore=({children:e,onMenuOpen:t,onMenuClose:a})=>{let r=(0,n.useCallback)(t=>n.createElement(o.Ay,t,e),[e]);return n.createElement(o.cQ,{onOpen:t,onClose:a,renderMenu:r,position:"left-bottom"},n.createElement(s.Ay,{tip:i.t("More actions"),position:"top"},n.createElement(l.A,{"aria-label":i.t("More actions"),className:"c-message_actions__button",size:"small",svgIconProps:{name:"ellipsis-vertical-filled"}})))};ActionBarMore.displayName="ActionBarMore"},0x21b980720:(e,t,a)=>{"use strict";a.d(t,{E:()=>ActionBar});var n=a(0xbad225b5),r=a(0x120c268ad),l=a.n(r);let ActionBar=({children:e,isVisible:t})=>n.createElement("div",{className:l()("p-sales_feed__action_bar",t&&"p-sales_feed__action_bar--visible")},n.createElement("div",{className:"c-message_actions__container"},n.createElement("div",{className:"c-message_actions__group",role:"group"},e)));ActionBar.displayName="ActionBar"},0x139d2f9a8:(e,t,a)=>{"use strict";a.d(t,{_:()=>useMenuItemCreator});var n=a(0xbad225b5),r=a(0x16cf1da63),l=a(0x20482ad21),o=a(0xf4097f62),s=a(0x13638bd77);let i=new l.Ay("modernselling"),useMenuItemCreator=e=>{let t=(0,r.wA)(),a=(0,n.useCallback)(()=>{t((0,s.b)({memberId:e}))},[t,e]);return{label:i.rt("Notification created by {admin}",{admin:n.createElement(o.A,{id:e})}),onSelect:a}};useMenuItemCreator.displayName="useMenuItemCreator"},0xcdc086ce:(e,t,a)=>{"use strict";a.d(t,{e:()=>useMenuItemEdit});var n=a(0xbad225b5),r=a(0x16cf1da63),l=a(0x20482ad21),o=a(0x156eec78a),s=a(0x139aa1a7),i=a(0xcefedbca);let c=new l.Ay("modernselling"),useMenuItemEdit=(e,t=!1)=>{let a=(0,o.Q)(),l=(0,r.wA)(),d=(0,n.useCallback)(()=>{e&&(a({viewType:t?s.D.SalesAdministration:s.D.SalesNotifications}),l((0,i.A)({workflowId:e,isAdmin:t})))},[e,a,l,t]),m=(0,n.useMemo)(()=>({onClick:{enableClogAction:!0},elementName:"lob_notifications_edit",workflowId:e,isLobNotificationWorkflowAdmin:t}),[t,e]);return{label:c.t("Edit notification conditions"),onSelect:d,autoClogProps:m}}},0xc77a8bc3:(e,t,a)=>{"use strict";a.d(t,{z:()=>useMenuItemMute});var n=a(0xbad225b5),r=a(0x20482ad21),l=a(0x10490d62c);let o=new r.Ay("modernselling"),useMenuItemMute=(e,t)=>{let a=(0,l.A)(),[r,s]=(0,n.useState)(t),i=(0,n.useCallback)(()=>{e&&a(e,!r).then(()=>{s(!r)})},[a,r,e]),c=o.t("Mute notification"),d=o.t("Unmute notification");return{label:r?d:c,onSelect:i}}},0x23b93d6d0:(e,t,a)=>{"use strict";a.d(t,{Z:()=>FeedItemScheduled});var n=a(0xbad225b5),r=a(0x20482ad21),l=a(0xb90d5858),o=a(0x2501a2cee),s=a(0x21b980720),i=a(0x1090ee536),c=a(0x139d2f9a8),d=a(0xcdc086ce),m=a(0xc77a8bc3),_=a(0x1e5093c5a),p=a(0xfca33088),u=a(0xbf61ff25);let g=new r.Ay("modernselling"),FeedItemScheduled=({notification:e,isWorkflowPreview:t,isStepPreview:a,...r})=>{let{is_acn:f,is_workflow_deleted:b,is_workflow_editable:h,is_workflow_muted:E,notification_display_columns:x,notification_display_type:y,payload:{opportunities:A,generic_records:C,workflow:k},workflow_created_by:S,workflow_id:N,salesforce_org_id:w,created_ts:v}=e,O=(0,m.z)(N,E),I=(0,d.e)(N,f),M=(0,c._)(S),R=(0,n.useMemo)(()=>n.createElement(o.Ah,{name:"calendar"}),[]),T=(0,n.useCallback)(({isVisible:e,onMenuOpen:t,onMenuClose:a})=>{let r=f&&!!N&&!b,o=h&&!b;return r||o||f?n.createElement(s.E,{isVisible:e},n.createElement(i.H,{onMenuOpen:t,onMenuClose:a},r&&n.createElement(l.A,{onSelected:O.onSelect},O.label),o&&n.createElement(l.A,{onSelected:I.onSelect,autoClogProps:I.autoClogProps},I.label),f&&n.createElement(l.A,{className:"padding_top_75",description:M.label,onSelected:M.onSelect}))):null},[f,N,O,I,M,h,b]),F=(0,n.useCallback)(()=>{let e=C?.length?C:A;return x?.length&&e?.length&&k?.subtitle?n.createElement(p.N,{columns:x,displayType:y,records:e,title:k.subtitle,workflowId:N,salesforceOrgId:w,notificationCreatedTs:v,isWorkflowPreview:t,isStepPreview:a}):null},[C,A,x,k.subtitle,y,N,w,v,t,a]);return n.createElement(_.G,{...r,headerIcon:R,headerText:g.t("Scheduled"),iconFallbackUrl:u,notification:e,renderActionBar:T,renderMore:F,isWorkflowPreview:t,isStepPreview:a})};FeedItemScheduled.displayName="FeedItemScheduled"},0x1e5093c5a:(e,t,a)=>{"use strict";a.d(t,{G:()=>FeedItem});var n=a(0xbad225b5),r=a(0x16cf1da63),l=a(0x120c268ad),o=a.n(l),s=a(0x14fad6485),i=a(0x40c0d834),c=a(0x1faa3f1ac),d=a(0x113cdbbd7),m=a(0x944e06df),_=a(0x754ea859),p=a(0x184825275),u=a(0x6960d8b9),g=a(0xc0b7c558);let FeedItem=({hasFocus:e,headerIcon:t,headerText:a,headerLinkUrl:l,iconFallbackUrl:f,isFirst:b,notification:h,renderActionBar:E,renderInlineActions:x,renderMore:y,withHeaderWrapper:A,isWorkflowPreview:C,isStepPreview:k})=>{let{body:S,workflow_id:N,created_ts:w,icon_url:v,is_unread:O,salesforce_org_id:I,payload:{workflow:{title:M,service_id:R,service_team_id:T},opportunities:F=[],records:H=[]}}=h,{windowRef:L}=(0,n.useContext)(s._0),P=(0,n.useRef)(null),[D,U]=(0,n.useState)(!1),[G,B]=(0,n.useState)(!1),V=e||D||G,$=(0,r.wA)(),z=(0,n.useCallback)(()=>{U(!0)},[]),W=(0,n.useCallback)(()=>{U(!1)},[]),Y=(0,n.useCallback)(()=>{B(!0)},[]),j=(0,n.useCallback)(()=>{B(!1),L.deref()?.requestAnimationFrame(()=>{U(P.current?.matches(":hover")===!0)})},[L]),K=(0,n.useCallback)(()=>{let e=F.length?F[0]?.slack_record_id:(0,g.j)(I,H[0].record_identifier);e&&$((0,_.c)({recordId:e}))},[$,F,H,I]),q=(0,n.useMemo)(()=>{let e=n.createElement("div",{className:o()("display_flex align_items_center",{sk_foreground_max:!O,sk_primary_foreground:O,bold:O})},t,n.createElement("div",{className:"caption margin_left_25 margin_right_25"},a));if(l){let t=F.length||H.length&&I;e=n.createElement(c.A,{className:"p-sales_feed__item__header__link",href:t?"":l,target:"_blank",onClick:t?K:void 0},e)}return A&&(e=A(e)),e},[O,t,a,l,A,K,F,H,I]),X=(0,n.useMemo)(()=>({hasFocus:e,isVisible:V,onMenuOpen:Y,onMenuClose:j}),[j,Y,e,V]),Q=(0,n.useCallback)(e=>{let t={serviceId:R,serviceTeamId:T,container:{type:d.pi.lob_notification,notificationTs:w},actions:[e]};return $((0,p.W)(t))},[R,T,w,$]);return n.createElement(i.A,{clogImpression:!0,elementName:"lob_sales_notification_item",elementValue:w,workflowId:N},n.createElement("div",{ref:P,onPointerOver:z,onPointerLeave:W,className:o()("p-sales_feed__item",{"p-sales_feed__item--first":b,"p-sales_feed__item--preview":C,"p-sales_feed__item--no-border":C&&!k})},n.createElement("div",{className:o()("p-sales_feed__item__inner",{"p-sales_feed__item__inner--preview":C})},!C&&n.createElement("div",{className:"display_flex justify_content_between align_items_center"},q,n.createElement("div",{className:"display_flex align_items_center"},n.createElement("div",{className:o()("caption",{bold:O})},(0,u.Yq)(w,"{status_expiration}")),O&&n.createElement("div",{className:"p-sales_feed__item__unread_dot"}))),n.createElement("div",{className:o()("display_flex",{margin_top_50:!C})},n.createElement("img",{className:"p-sales_feed__item__icon",src:v||f,alt:M}),n.createElement("div",{className:"flex_one display_flex"},n.createElement("div",{className:"flex_one"},n.createElement("div",{className:"sk_primary_foreground black"},M),n.createElement(m.A,{blocks:S,blocksContainerContext:d.pi.sales_home_notification,onAction:Q}),y?.()),x&&n.createElement("div",{className:"flex_shrink_none"},x()))),E?.(X))))};FeedItem.displayName="FeedItem"},0x129529b49:(e,t,a)=>{"use strict";a.d(t,{E:()=>OpportunityHoverCardTrigger});var n=a(0xbad225b5),r=a(0x1cbdfeceb),l=a(0x217f0c263),o=a(0x14fad6485),s=a(0x1f3598f80),i=a(0xc745739a),c=a(0x20482ad21),d=a(0x2b7f0bcc),m=a(0x102edf836),_=a(0x11a296110),p=a(0x1ee57b3a0),u=a(0x1fa67866c),g=a(0xb1ea448c),f=a(0x128d54e52),b=a(0x1535e80f3),h=a(0x15fb82076),E=a(0x2501a2cee),x=a(0x4c96e5d9),y=a(0x12b6a33fc),A=a(0x16cf1da63),C=a(0xe874a88a),k=a(0x22a29f141),S=a(0x1dfdeb1c8),N=a(0x1ec68d6a3),w=a(0xe747dd27);let v=(0,S.A)("sfdc.getOpportunity generated fetcher",(e,t,a)=>new C.S((n,r)=>{let{abortSignal:l,reason:o,...s}=a,i=(0,w.VA)(s);e((0,k.apiCall)({method:"sfdc.getOpportunity",args:i,abortSignal:l,reason:o})).then(e=>{n(e)}).catch(e=>{(0,N.default)({getState:t}).error(`API call to sfdc.getOpportunity
						with reason ${o} failed, initiated by generated fetcher`),r(e)})}));function useFetchOpportunityInfo(){let e=(0,A.wA)();return(0,n.useCallback)((t,a)=>e(v({id:t,reason:"sales-home-get-opportunity-info",salesforceOrgId:a})),[e])}v.meta={name:"sfdcGetOpportunityFetcher",key:"createFetcherSfdcGetOpportunityFetcher",description:"sfdc.getOpportunity generated fetcher"};var O=a(0x1c659cbb1),I=a(0x110b4f809),M=a(0xe38b5635),R=a(0x1ed767a16),T=a(0x6960d8b9),F=a(0x226892387),H=a(0x1c8beab7f);let L=a.p+"crown-f27246b.svg",P=new c.Ay("modernselling"),D={elementName:"open_in_salesforce",onClick:{enableClogAction:!0}},U={elementName:"copy_opportunity_link",onClick:{enableClogAction:!0}},G=new RegExp(/\bhttps?:\/\/[^\s]+\b/g),OpportunityNextStep=({nextStep:e})=>{let t=e.split(G),a=e.match(G)||[],r=t.reduce((e,t,r)=>{if(e.push(t),r<a.length){let t=a[r];e.push(n.createElement(h.A,{key:r+t,href:t}))}return e},[]);return n.createElement(n.Fragment,null,r)};OpportunityNextStep.displayName="OpportunityNextStep";let OpportunityHoverCard=({opportunity:e,record:t,salesforceOrgId:a})=>{let r,l=e?.id??t?.record_identifier,o=e?.record_link??t?.record_link,s=useFetchOpportunityInfo(),i=(0,F.d4)(H.cc),[c,h]=(0,n.useState)(),[A,C]=(0,n.useState)(!0),[k,S]=(0,n.useState)(!1),[N,w]=(0,I.A)(!1,2e3);(0,n.useEffect)(()=>{l&&s(l,a).then(e=>{h(e)}).catch(()=>{S(!0)}).finally(()=>{C(!1)})},[s,l,a]);let v=(0,n.useCallback)(()=>n.createElement(O.f1,{className:"p-sales_feed__opp_hover_card_avatar",size:36,imageUrl:L,isInteractive:!1}),[]),G=(0,n.useCallback)(()=>n.createElement(O.Ay,{className:"c-base_entity__avatar",size:b.RG.small,userId:e?.owner.slack_user_id,isInteractive:!1,tabIndex:-1,ariaHidden:!0}),[e]),B=(0,n.useCallback)(()=>{(0,R.x3)(o),w(!0)},[o,w]),V=i.length>1?i.find(e=>e.salesforce_org_id===a)?.name:void 0;return r=c?V?c.account?.name?P.rt("Opportunity in {account_name}, <b>{salesforceOrgName}</b>",{account_name:c.account.name,salesforceOrgName:V}):P.rt("Opportunity in <b>{salesforceOrgName}</b>",{salesforceOrgName:V}):c.account?.name?P.t("Opportunity in {account_name}",{account_name:c.account.name}):P.t("Opportunity"):V?P.rt("Opportunity in <b>{salesforceOrgName}</b>",{salesforceOrgName:V}):"Opportunity",n.createElement(M.A,{elevation:4,size:"medium",className:"p-sales_feed__opp_hover_card"},A&&n.createElement(u.A,{className:"margin_top_200"},n.createElement(g.A,{size:"jumbo"})),k&&n.createElement(u.A,null,n.createElement(d.Ay,{type:"boxed",level:"error",className:"margin_bottom_150"},P.rt("Oops\u2026 we had trouble fetching opportunity info"))),c&&n.createElement(n.Fragment,null,n.createElement(p.A,null,n.createElement(f.Ay,{size:"medium",avatar:v,text:n.createElement(f.CG,{className:"black",withTruncationTooltip:!0},c.name),subtext:n.createElement(f.sT,{className:"caption p-sales_feed__opp_hover_card_header_subtext"},r)})),n.createElement(u.A,null,n.createElement("div",{className:"p-sales_feed__opp_hover_card_details_container"},n.createElement("div",{className:"p-sales_feed__opp_hover_card_stage_details"},n.createElement("div",{className:"p-sales_feed__opp_hover_card_details_label"},P.t("Stage")),n.createElement("div",{className:"p-sales_feed__opp_hover_card_stage_details_pill"},c.stage)),n.createElement("div",{className:"p-sales_feed__opp_hover_card_details"},n.createElement("div",{className:"p-sales_feed__opp_hover_card_details_label"},P.t("Close date")),(0,T.Yq)((0,T.$4)(c.close_date,{parseFormat:"YYYY-MM-DD",returnMoment:!0}),"{date_slash}")),n.createElement("div",{className:"p-sales_feed__opp_hover_card_details"},n.createElement("div",{className:"p-sales_feed__opp_hover_card_details_label"},P.t("Amount")),c.amount.display_value),n.createElement("div",{className:"p-sales_feed__opp_hover_card_owner_details"},n.createElement("div",{className:"p-sales_feed__opp_hover_card_details_label"},P.t("Owner")),n.createElement(f.Ay,{avatar:G,className:"c-member c-member--small",text:n.createElement("span",{className:"c-member__primary_content"},n.createElement(f.CG,{className:"c-member_name"},c.owner.name)),size:"small"}))),""!==c.next_step?n.createElement("div",{className:"p-sales_feed__opp_hover_card_next_steps_details"},n.createElement("div",{className:"p-sales_feed__opp_hover_card_details_label"},P.t("Next Step")),n.createElement(OpportunityNextStep,{nextStep:c.next_step})):null,n.createElement("div",{className:"p-sales_feed__opp_hover_card_actions"},n.createElement(m.z9,{className:"p-sales_feed__opp_hover_card_linkbutton",size:"medium",type:"outline",href:o,autoClogProps:D},n.createElement("span",{className:"p-sales_feed__opp_hover_card_linkbutton_text"},P.t("Open in Salesforce")),n.createElement(E.Ah,{inline:!0,name:"new-window"})),n.createElement(x.Ay,{tip:N?P.t("Copied!"):P.t("Copy link"),status:N?y.YU.Success:y.YU.Info},n.createElement(_.Ay,{className:"p-sales_feed__opp_hover_card_copybutton",size:"medium",type:"outline",onClick:B,autoClogProps:U,"aria-label":N?P.t("Copied"):P.t("Copy Salesforce Url")},n.createElement(E.Ah,{name:"files"})))))))};OpportunityHoverCard.displayName="OpportunityHoverCard";let OpportunityHoverCardTrigger=({children:e,opportunity:t,record:a,salesforceOrgId:c})=>{let{windowRef:d}=(0,n.useContext)(o._0),[m,_]=(0,n.useState)(null),p=(0,n.useRef)(null),u=(0,n.useCallback)(()=>{let e=(e=>{let{pageYOffset:t,innerWidth:a,innerHeight:n}=e.deref()||{pageYOffset:0,innerWidth:0,innerHeight:0};return{top:(0,i.ci)(t+10),right:a-16,bottom:t+n-10,left:16}})(d),t=p.current.getBoundingClientRect(),a={top:void 0,bottom:void 0,right:void 0,left:void 0},n=t.right+345>e.right,r=t.bottom+250>e.bottom,l=t.top-250<e.top;if(n){let n=e.right-(t.left+345)<0;r&&l?(a.top=t.bottom+12,a.right=e.right-t.left+25):(r?a.bottom=e.bottom-t.y+12:l?a.top=t.bottom+12:a.bottom=e.bottom-t.y+25,a.left=t.left),n&&(a.right=12,a.left="auto")}else l&&r?(a.top=t.top-100,a.left=t.right+12):r?(a.left=t.left,a.bottom=e.bottom-t.y+25):l?(a.top=t.bottom+12,a.left=t.left):(a.left=t.right+12,a.top=t.top);return a},[d]),g=(0,n.useCallback)(()=>{_(null)},[]),f=(0,n.useCallback)(()=>{let e=u();_(n.createElement(l.A,{isOpen:!0,className:"opportunity-hover-modal",overlayClassName:"p-sales_feed__opportunity_hover_card__modal",shouldFocusAfterRender:!0,shouldCloseOnEsc:!0,onRequestClose:g},n.createElement("div",{className:"p-sales_feed__opportunity_hover_card__popover",style:e},n.createElement(OpportunityHoverCard,{record:a,opportunity:t,salesforceOrgId:c}))))},[u,a,t,g,c]),[b,h]=(0,s.i)(f),[E,x]=(0,s.i)(g),y=(0,n.useCallback)(()=>(x(),m)?void h():b(350),[x,b,h,m]),A=(0,n.useCallback)(()=>(h(),m)?E(250):void x(),[h,E,x,m]);return n.createElement("span",{className:"p-sales_feed__opportunity_hover_card",onMouseOver:y,onMouseLeave:A,onClick:y,role:"presentation",onFocus:r.A,ref:p},e,m)};OpportunityHoverCardTrigger.displayName="OpportunityHoverCardTrigger"},0xfca33088:(e,t,a)=>{"use strict";a.d(t,{N:()=>P});var n=a(0xbad225b5),r=a(0x120c268ad),l=a.n(r),o=a(0x11a296110),s=a(0x2501a2cee),i=a(0x1fdec3e16),c=a(0x16cf1da63),d=a(0x77727995),m=a(0x130d89881),_=a(0x1a043bf26),p=a(0x20482ad21),u=a(0x1d104c491),g=a(0x2493ba930),f=a.n(g);let b=new p.Ay("workflow_builder");function getColumnSortField(e){return e.sort_payload_field??e.payload_field}let getGenericRecordValue=(e,t)=>{let a=(0,d.A)(e.record_fields,t.key);return a.record_field_sort_value??a.record_field_rendered_value},isGenericRecord=e=>"record_identifier"in e&&void 0!==e.record_identifier;function getRecordKey(e){return isGenericRecord(e)?e.record_identifier:e.id}function getRecordName(e){return isGenericRecord(e)?e.record_name??b.t("Missing Data"):e.name}function getObjectType(e){return isGenericRecord(e)?e.object_identifier:u.Dj.Opportunity}function getRecordField(e,t){return isGenericRecord(e)?getGenericRecordField(e,t)??b.t("Missing Data"):e[t]}function getGenericRecordField(e,t){return e.record_fields[t]?.record_field_rendered_value}function getInitialSortByValue(e){let t=e.find(e=>e.primary_sort)||e[0],a=t?.primary_sort?.toLowerCase();return{key:getColumnSortField(t),dir:"desc"===a||"descending"===a?"desc":"asc"}}function getDisplayTypeClassNames(e){return{text:f()[`${e}_text`]||f().standard_text,border:f()[`${e}_border`]||f().standard_border,borderDark:f()[`${e}_border_dark`]||f().standard_border_dark,lightText:f()[`${e}_light_text`]||f().standard_light_text,background:f()[`${e}_background`]||f().standard_background}}function RecordsListTableHeader({column:e,displayType:t,isSortAsc:a,isSortKey:r,onClick:c}){let d=getDisplayTypeClassNames(t);return n.createElement(o.Nm,{onClick:c,className:l()(f().records_list_table_cell,f().records_list_table_cell_header,d.text)},n.createElement(i.A,{withTooltip:!0,lines:1},e.name),r&&n.createElement(s.Ah,{name:a?"arrow-up":"arrow-down",size:"16"}))}RecordsListTableHeader.displayName="RecordsListTableHeader";let h=new p.Ay("modernselling");function RecordsListTablePagination({pageRange:[e,t],totalItems:a,autoClogProps:r,onNextClick:l,onPrevClick:i}){return n.createElement("div",{className:f().records_list_table_pagination},n.createElement(o.Nm,{"aria-label":h.t("Previous page"),autoClogProps:r,disabled:!i,onClick:i},n.createElement(s.Ah,{name:"caret-left",size:"16"})),n.createElement("span",null,h.t("Showing {start}-{end} of {totalItems}",{start:e+1,end:t,totalItems:a})),n.createElement(o.Nm,{"aria-label":h.t("Next page"),autoClogProps:r,disabled:!l,onClick:l},n.createElement(s.Ah,{name:"caret-right",size:"16"})))}RecordsListTablePagination.displayName="RecordsListTablePagination";var E=a(0x4c96e5d9),x=a(0x146e4ebc8),y=a(0x174bb7323),A=a(0x1faa3f1ac),C=a(0x1feb18f19),k=a(0x129529b49),S=a(0x11928a844),N=a.n(S);let Stage=e=>n.createElement("div",{className:l()(N().stage,{[N().previous]:"previous"===e.type,[N().current]:"current"===e.type})},n.createElement(i.A,{lines:1,withTooltip:!0},e.children));Stage.displayName="Stage";var w=a(0x113cdbbd7),v=a(0x944e06df),O=a(0x81d6854c),I=a(0xf01a9d50);let M=new p.Ay("modernselling");function MaybeHoverCard({record:e,children:t,shouldHide:a,salesforceOrgId:r}){return a||isGenericRecord(e)?n.createElement(n.Fragment,null,t):n.createElement(k.E,{opportunity:e,salesforceOrgId:r},t)}function MaybeLink({record:e,children:t,shouldHide:a}){return a?n.createElement(n.Fragment,null,t):n.createElement(A.A,{href:e.record_link},t)}MaybeHoverCard.displayName="MaybeHoverCard",MaybeLink.displayName="MaybeLink";let renderRecordDeltaValue=e=>{if(isGenericRecord(e)||!e.amount_change||!e.amount_change_raw)return null;let t=e.amount_raw?.amount||0,a=e.amount_change_raw.amount,r=e.amount_change_raw.percent,l=!t&&100===r,o=`${l?"-":""}${r}%`;return 0x7fffffff===r&&(o=M.t("New")),n.createElement("div",{className:l||a<0?f().amount_change_negative:f().amount_change_positive},n.createElement(i.A,{lines:1,withTooltip:!0},n.createElement("span",{className:"bold"},e.amount_change),n.createElement("span",null," (",o,")")))};renderRecordDeltaValue.displayName="renderRecordDeltaValue";let renderRecordNameValue=(e,t,{isPreview:a,showHoverCard:r},l)=>n.createElement(MaybeHoverCard,{record:e,shouldHide:a||!r,salesforceOrgId:l},n.createElement(MaybeLink,{record:e,shouldHide:!r},n.createElement(A.A,null,n.createElement(i.A,{lines:1},n.createElement(s.Ah,{inline:!0,...(0,I.C)(getObjectType(e))}),n.createElement("span",{className:"margin_left_25 bold"},getRecordName(e)))))),renderOpportunityRecordStageChangeValue=e=>n.createElement(C.c,{space:"75"},n.createElement(Stage,{type:"previous"},e.prev_stage),n.createElement(s.Ah,{name:"arrow-right"}),n.createElement(Stage,{type:"current"},e.stage));renderOpportunityRecordStageChangeValue.displayName="renderOpportunityRecordStageChangeValue";let renderOpportunityRecordRichTextValue=(e,t)=>"close_date_change"===t.payload_field?n.createElement(v.A,{blocks:e.close_date_change?.blocks,blocksContainerContext:w.pi.sales_home_notification}):n.createElement(C.c,{space:"75"},n.createElement(O.A,null));renderOpportunityRecordRichTextValue.displayName="renderOpportunityRecordRichTextValue";let renderOpportunityRecordStageValue=e=>n.createElement(Stage,{type:"current"},e.stage);renderOpportunityRecordStageValue.displayName="renderOpportunityRecordStageValue";let renderRecordValueAsString=(e,t)=>n.createElement(i.A,{lines:1,withTooltip:!0},n.createElement("span",{className:t.primary_sort?"bold":void 0},(0,y.A)(getRecordField(e,t.payload_field))));function renderRecordValue(e,t,a,n){return isGenericRecord(e)?renderGenericRecordValue(e,t,a):renderOpportunityRecordValue(e,t,a,n)}function renderOpportunityRecordValue(e,t,a,n){switch(t.type){case"name":return renderRecordNameValue(e,t,a,n);case"stage":return renderOpportunityRecordStageValue(e);case"stage_change":return renderOpportunityRecordStageChangeValue(e);case"rich_text":return renderOpportunityRecordRichTextValue(e,t);case"delta":return renderRecordDeltaValue(e,t,a);default:return renderRecordValueAsString(e,t,a)}}function renderGenericRecordValue(e,t,a,n){return"name"===t.type?renderRecordNameValue(e,t,a,n):renderRecordValueAsString(e,t,a)}let R=new p.Ay("modernselling");function RecordsListTableRow({columns:e,isFocused:t,isPreview:a,record:r,salesforceOrgId:o,notificationCreatedTs:s,isLastRow:i,isWorkflowPreview:c}){let[d,m]=(0,n.useState)(!1),_=(0,n.useMemo)(()=>{if(a)return[];let e=getRecordKey(r);return[{key:"opportunity-share-button",enabled:!!s,render:()=>e&&s&&n.createElement(x.V,{hasFocus:!!t,createdTs:s,notificationType:"record",isAdminCreated:!0,opportunityId:e})}].filter(({enabled:e=!0})=>e)},[a,r,s,t]),p=!a&&_.length>0,u=(0,n.useCallback)(()=>m(!0),[]),g=(0,n.useCallback)(()=>m(!1),[]),b=!a,h=n.createElement("div",{onPointerOver:u,onPointerLeave:g,className:l()(f().records_list_table_row,f().records_list_table_row_body,{[f().records_list_table_row_border]:!i}),style:b?{cursor:"pointer"}:void 0},e.map(t=>c?n.createElement("div",{key:t.name,className:l()(f().records_list_table_cell,f().preview_table_cell,getDisplayTypeClassNames("standard").background)}):n.createElement("div",{key:t.name,className:l()(f().records_list_table_cell,{[f().records_list_table_cell_2_col]:2===e.length})},renderRecordValue(r,t,{isPreview:a,showHoverCard:!1},o))),p&&n.createElement("div",{className:l()(f().records_list_action_bar_container,p&&(t||d)&&f().records_list_action_bar_container_visible)},_.map(({key:e,render:t})=>n.createElement(n.Fragment,{key:e},t()))));return b?n.createElement(E.Ay,{tip:R.t("Open Record"),position:"top"},h):h}RecordsListTableRow.displayName="RecordsListTableRow";var T=a(0x106809bc6);function getPageRange(e,t,a){return[(0,T.A)(e,0,a-1),(0,T.A)(e+t,t,a)]}function usePagination(e,{pageSize:t}){let[a,r]=(0,n.useState)(0);(0,n.useEffect)(()=>r(0),[t]);let l=e.length,o=Math.ceil(l/t),s=a>=t,i=a<l-t,c=(0,n.useCallback)(()=>r(0),[]),d=(0,n.useCallback)(()=>r(e=>e-t),[t]),m=(0,n.useCallback)(()=>r(e=>e+t),[t]),_=(0,n.useMemo)(()=>getPageRange(a,t,l),[a,t,l]);return{page:(0,n.useMemo)(()=>e.slice(..._),[e,_]),prev:s?d:void 0,next:i?m:void 0,range:_,reset:c,totalPages:o}}var F=a(0x754ea859),H=a(0xc0b7c558);function RecordsListTable({columns:e,displayType:t,isPreview:a,records:r,paginationAutoClogProps:o,salesforceOrgId:s,notificationCreatedTs:i,isWorkflowPreview:p,isStepPreview:u}){let[g,b]=(0,n.useState)(!1),[h,E]=(0,n.useState)(()=>getInitialSortByValue(e)),x=getDisplayTypeClassNames(t),{page:y,reset:A,...C}=usePagination((0,n.useMemo)(()=>p?[...r]:[...r].sort((e,t)=>{let a="asc"===h.dir,n=isGenericRecord(e)?getGenericRecordValue(e,h):(0,d.A)(e,h.key),r=isGenericRecord(t)?getGenericRecordValue(t,h):(0,d.A)(t,h.key);return("string"==typeof n&&"string"==typeof r&&(n=n.toLocaleUpperCase(),r=r.toLocaleUpperCase()),void 0===n)?1:void 0===r?-1:n<r?a?-1:1:n>r?a?1:-1:0}),[p,r,h]),{pageSize:5}),k=(0,n.useCallback)(e=>()=>{A(),E(({key:t,dir:a})=>({key:e,dir:e===t&&"asc"===a?"desc":"asc"}))},[A]),S=(0,n.useCallback)(e=>{let a=getColumnSortField(e);return n.createElement(RecordsListTableHeader,{key:e.name,column:e,displayType:t,isSortAsc:"asc"===h.dir,isSortKey:!p&&a===h.key,onClick:k(a)})},[h,k,t,p]),N=(0,n.useCallback)((r,{hasFocus:l,hasFocusWithin:o})=>n.createElement(RecordsListTableRow,{key:getRecordKey(y[r]),columns:e,displayType:t,isFocused:l||o,isPreview:a,record:y[r],salesforceOrgId:s,notificationCreatedTs:i,isLastRow:r===y.length-1,isWorkflowPreview:p}),[y,e,t,a,s,i,p]),w=(0,n.useCallback)(()=>b(!0),[]),v=(0,n.useCallback)(()=>b(!1),[]),O=(0,c.wA)(),I=(0,n.useCallback)(e=>{O((0,F.c)({recordId:y[e.id].slack_record_id??(0,H.j)(s,getRecordKey(y[e.id]))}))},[O,y,s]);return n.createElement("div",{onPointerOver:w,onPointerLeave:v,className:l()(x.background,f().records_list_table,{[f().records_list_table_workflow_preview]:p,[f().records_list_table_workflow_step_preview]:u})},n.createElement("div",{className:f().records_list_table_row},e.map(S)),n.createElement(m.A,{disableHeight:!0},({width:e})=>n.createElement(_.A,{keys:Object.keys(y),width:e,height:51*y.length,rowRenderer:N,onItemClick:a?void 0:I,containerClassName:l()(f().records_list_table_rows_container,g&&!p?x.borderDark:x.border)})),C.totalPages>1&&n.createElement(RecordsListTablePagination,{pageRange:C.range,totalItems:r.length,autoClogProps:o,onNextClick:C.next,onPrevClick:C.prev}))}RecordsListTable.displayName="RecordsListTable";var L=a(0x3711e82d);let P=n.memo(({columns:e,displayType:t="standard",isWorkflowPreview:a,isExpandedByDefault:r=a,isPreview:c,isStepPreview:d,records:m,title:_,workflowId:p,salesforceOrgId:u,notificationCreatedTs:g})=>{let[b,h]=(0,n.useState)(r),E=(0,n.useCallback)(()=>h(e=>!e),[]),x=getDisplayTypeClassNames(t),y=(0,n.useCallback)(e=>{if(!c)return{onClick:{enableClogAction:!0},eventId:L.EventId.LOB_NOTIFICATIONS,elementName:e,workflowId:p}},[p,c]);return n.createElement("div",{className:l()(f().records_list_container,{[f().preview_not_expanded]:a&&!b})},n.createElement(o.Nm,{autoClogProps:y("expand_notification"),className:l()(x.text,x.background,f().records_list_toggle,b&&f().records_list_toggle_expanded),onClick:E},n.createElement(s.Ah,{name:b?"caret-down-filled":"caret-right-filled",size:"20"}),a?n.createElement(i.A,{withTooltip:!0,lines:1},n.createElement("span",{className:f().records_list_title},_)):n.createElement(n.Fragment,null,n.createElement("span",{className:f().records_list_title},_),n.createElement("span",{className:x.text},m.length))),b&&n.createElement(RecordsListTable,{columns:e,displayType:t,isPreview:c,records:m,paginationAutoClogProps:y("show_more"),salesforceOrgId:u,notificationCreatedTs:g,isWorkflowPreview:a,isStepPreview:d}))})}}]);
//# sourceMappingURL=https://slack.com/source-maps/bv1-13/gantry-v2-async-client-sales-home-view.d1769e4b6f086371b431.min.js.mapØA
—Eoúô