move",args:c,abortSignal:s,reason:l})).then(e=>{n(e)}).catch(e=>{(0,d.Ay)({getState:t}).error(`API call to users.consent.remove
						with reason ${l} failed, initiated by generated fetcher`),r(e)})}));x.meta={name:"usersConsentRemoveFetcher",key:"createFetcherUsersConsentRemoveFetcher",description:"users.consent.remove generated fetcher"};let g=(0,u.Ay)("Remove user consent for provided scopes for an app",async(e,t,{appId:a,scopeIds:n,reason:r})=>{let s=(0,d.Ay)({getState:t,label:_});try{await e(x({appId:a,scopes:n.join(","),reason:r})),e((0,h.ID)({appId:a,scopeIds:n}))}catch{s.error(Error(`Error removing scopes: ${n}`))}});g.meta={name:"removeUserConsentScopes",key:"createThunkRemoveUserConsentScopes",description:"Remove user consent for provided scopes for an app"};let useUserConsentScopes=(e,t)=>{let a=(0,r.wA)(),i=(0,s.d4)(t=>(0,l.iV)(t,e)),[o,c]=(0,n.useState)(!1),[d,m]=(0,n.useState)(!1),{availableScopeIds:p,grantedScopeIds:u,scopeLabelsById:h}=i??{},_=(0,n.useCallback)(async(n=!1)=>{e&&(m(!0),await a(f({appId:e,refetch:n,reason:t})),m(!1))},[e,a,t]);return{isUpdatingScopes:o,isLoadingScopes:d,grantedScopeIds:u,scopeLabelsById:h,availableScopeIds:p,getScopes:_,addScopes:(0,n.useCallback)(async n=>{e&&0!==n.length&&(c(!0),await a(b({appId:e,scopeIds:n,reason:t})),c(!1))},[e,a,t]),removeScopes:(0,n.useCallback)(async n=>{e&&0!==n.length&&(c(!0),await a(g({appId:e,scopeIds:n,reason:t})),c(!1))},[e,a,t])}}},0x12a672fd0:(e,t,a)=>{"use strict";a.d(t,{A:()=>X});var n=a(0xbad225b5),r=a(0x2286acf6c),s=a(0x17478cdb7),l=a(0x1e2051844),i=a(0x9e671ad),o=a(0xb97b797e),c=a(0x20482ad21),d=a(0x2264e6ea3),m=a(0xb62e6bf4),p=a(0xbb0c5132),u=a(0xe28ad2a3),h=a(0x344bb842),_=a(0x4c96e5d9),b=a(0x110b4f809),A=a(0x1ed767a16);let f=new c.Ay("user_groups"),x={name:"copy"};function CopyUserGroupId({userGroupId:e}){let t,a,[r,s]=(0,b.A)(!1,2e3),l=(0,n.useCallback)(()=>{(0,A.x3)(e),s(!0)},[e,s]);return r?(a=_.YU.Success,t=f.t("Copied!")):t=f.t("Copy user group id"),n.createElement(n.Fragment,null,f.t("User Group ID: {id}",{id:e})," ",n.createElement(_.Ay,{status:a,tip:t},n.createElement(h.A,{size:"small",onClick:l,"aria-label":f.t("Copy user group id"),svgIconProps:x})))}CopyUserGroupId.displayName="CopyUserGroupId";var g=a(0x11bc0cbc0),E=a(0xdbe50be6),C=a(0x124cfb3b3),y=a(0x33830eed),v=a(0x15e263568),k=a(0x11c82607b);let S=(0,k.Ay)("Validate the user group form",(e,t,{name:a,handle:n,prevName:r,prevHandle:s,targetTeam:l})=>Promise.all([e((0,v.Ay)({name:a,prevName:r,targetTeam:l})),e((0,y.Ay)({handle:n,prevHandle:s,reason:"user_group_form",targetTeam:l}))]).then(([e,t])=>({nameError:e,handleError:t})));S.meta={name:"validate",key:"createThunkValidate",description:"Validate the user group form"};var I=a(0x61f75169),N=a(0x1ec68d6a3),w=a(0x1c91944c9),T=a(0x9b971e7e),M=a(0x1ccef1c6f),R=a(0xdeaf4051),O=a(0x19c76d181),P=a(0x1fcbb004d),D=a(0x16ffed5ab),L=a(0x1b3f947f1),U=a(0x475c9cfe),H=a(0x1f2aad211),F=a(0x21f3c49e8),V=a(0x18def662b),G=a(0x5acf92f2),B=a(0xf035982d);let q=(0,k.Ay)("Create a new user group",(e,t,{channels:a,additionalChannels:n,name:r,handle:s,description:l,users:i,isUserGroupSectionEnabled:o,reason:c,teamId:d})=>{let m={};return d&&(m.teamId=d),s&&(m.handle=s),l&&(m.description=l),a&&(m.channels=a),(0,V.cq)(t())&&(m.enableSection=!!o),(0,V.Ow)(t())&&n&&(m.additionalChannels=n.length>0?n:void 0),e((0,B.F)({name:r,reason:c,teamId:d,...m})).then(({usergroup:t})=>(!(0,F.A)(i)&&t&&e((0,G.W)({usergroup:t.id,users:i,reason:c})),t)).catch(e=>{throw(0,N.Ay)({getState:t}).error("USER_GROUPS",`Error in createUserGroup: ${JSON.stringify(e)}`),e})});q.meta={name:"createUserGroup",key:"createThunkCreateUserGroup",description:"Create a new user group"};var W=a(0x11cd1a647),K=a(0xb465bd49);let z=new c.Ay("user_groups"),$=(0,N.Wo)(),Y=class extends n.PureComponent{formRef=null;userGroupMemberManagementRef=null;constructor(e){super(e),this.state={formSubmitPending:!1,errors:{nameError:"",handleError:"",purposeError:"",memberError:""},formStep:(e=>e?C.U.EDIT:C.U.DETAILS)(this.props.userGroupId),submitError:"",requiredFieldsEmpty:!1,detailsFormValues:{name:this.props.userGroupName||"",handle:this.props.userGroupHandle||"",purpose:this.props.userGroupPurpose||"",channels:this.props.userGroupDefaultChannels||[],additionalChannels:this.props.userGroupAdditionalChannels||[],workspaceId:this.props.userGroupTeamId||this.props.currentTeamId||"",isUserGroupSectionEnabled:this.props.isUserGroupSectionEnabled},selectedTeamIdForNewUserGroup:null,purposeTooLong:!1,membersSharedUserGroupSection:this.props.currentUserId?[this.props.currentUserId]:[]},(0,o.v)(this,["setFormErrors","setUserGroupFormRef","setUserGroupMemberManagementRef","setRequiredFieldsEmpty","onSubmitSuccess","onSubmitFailure","onDetailsStepComplete","onEditDialogSubmit","onCreateDialogSubmit","getDialogProps","shouldShowCloseDialogSpeedBump","onSelectedItemsChange","onPurposeChange","onSelectedTeamChange","onSelectedMembersChange","onDefaultChannelsUpdate","onAdditionalChannelsUpdate","onUserGroupSectionCheckboxChange"]),this.onPurposeChange=(0,r.A)(this.onPurposeChange,300).bind(this),this.onSelectedTeamChange=(0,r.A)(this.onSelectedTeamChange,300).bind(this),this.onSelectedMembersChange=(0,r.A)(this.onSelectedMembersChange,300).bind(this),this.onDefaultChannelsUpdate=(0,r.A)(this.onDefaultChannelsUpdate,300).bind(this),this.onAdditionalChannelsUpdate=(0,r.A)(this.onAdditionalChannelsUpdate,300).bind(this),this.onUserGroupSectionCheckboxChange=(0,r.A)(this.onUserGroupSectionCheckboxChange,300).bind(this)}onCreateDialogSubmit(){let{selectedTeamIdForNewUserGroup:e,detailsFormValues:{name:t,handle:a,purpose:r,workspaceId:l,channels:i,additionalChannels:o,isUserGroupSectionEnabled:c}={}}=this.state;if(!this.userGroupMemberManagementRef)return!1;if(!this.userGroupMemberManagementRef.validateUpdatedGroupMemberCount())return this.setRequiredFieldsEmpty(!0),!1;let d=this.userGroupMemberManagementRef.getUpdatedUserGroupMembers();return this.props.createUserGroup({name:(0,s.A)(t),handle:a??"",description:r??"",channels:i??[],additionalChannels:o??[],isUserGroupSectionEnabled:c??!1,teamId:e??l??"",users:d??[],reason:"onCreateDialogSubmit"}).then(({id:e})=>{this.props.showUserGroupDetails({groupId:e}),this.props.addUserGroupIds([e])}).then(()=>{this.props.enqueueToast({element:n.createElement(p.Ay,null,z.t("User group created!"))}),this.onSubmitSuccess()}).catch(e=>{this.props.enqueueToast({element:n.createElement(p.Ay,null,z.t("We\u2019re not sure why, but that didn\u2019t work. Try again?"))}),$.error(`Error creating user group: ${e}`),this.onSubmitFailure(e)})}onDetailsStepComplete(){let e=this.formRef?.getFormValues();this.setFormSubmitPending(!0);let{formStep:t,selectedTeamIdForNewUserGroup:a,detailsFormValues:{workspaceId:n}}=this.state,{userGroupName:r,userGroupHandle:s}=this.props,l=t===C.U.EDIT;return this.props.validate({...e,prevName:r,prevHandle:s,targetTeam:a??n}).then(t=>{this.setFormErrors(t),this.hasValidationErrors(t)||(l?this.onEditDialogSubmit(e):(this.setDetailsFormValues(e),this.setDialogStep(C.U.MEMBERS)))}).finally(()=>{this.setFormSubmitPending(!1)})}onEditDialogSubmit({name:e,handle:t,purpose:a,channels:r,isUserGroupSectionEnabled:l}){let{userGroupId:i,userGroup:o}=this.props,{detailsFormValues:{additionalChannels:c}}=this.state;if(!i)throw Error("User group ID is required for editing");return this.props.updateUserGroup({groupId:i,teamId:(0,I.$Q)(o)||"",name:(0,s.A)(e),handle:t,description:a,channels:r,additionalChannels:c,users:[],isUserGroupSectionEnabled:l,reason:"onEditDialogSubmit"}).then(()=>{this.props.enqueueToast({element:n.createElement(p.Ay,null,z.t("Group has been updated."))}),this.onSubmitSuccess()}).catch(e=>{$.error(`Error editing user group: ${e}`),this.onSubmitFailure(e)})}onPurposeChange(e){let t=e.length>140;this.setState(()=>({purposeTooLong:t}))}onSelectedTeamChange(e){this.setState(()=>({selectedTeamIdForNewUserGroup:e}))}onSelectedItemsChange(e){this.setRequiredFieldsEmpty(!e.length)}onSelectedMembersChange(e){this.setRequiredFieldsEmpty(!e.length),this.setState(()=>({membersSharedUserGroupSection:e}))}onDefaultChannelsUpdate(e){let t=e.map(e=>e.value);this.setState(e=>({detailsFormValues:{...e.detailsFormValues,channels:t}}))}onAdditionalChannelsUpdate(e){let t=e.map(e=>e.value);this.setState(e=>({detailsFormValues:{...e.detailsFormValues,additionalChannels:t}}))}onUserGroupSectionCheckboxChange(e){this.setState(t=>({detailsFormValues:{...t.detailsFormValues,isUserGroupSectionEnabled:e}}))}onSubmitFailure(e){this.setFormSubmitPending(!1),this.setApiError(e?.name??e)}onSubmitSuccess(){this.setFormSubmitPending(!1),this.props.closeModal(),this.setApiError("")}getDialogProps(){switch(this.state.formStep){case C.U.DETAILS:return{title:z.t("Create User Group"),contentLabel:z.t("Create User Group"),goButtonText:z.t("Next"),onGo:this.onDetailsStepComplete,shouldCloseOnCancel:!0,cancelText:z.t("Cancel"),shouldCloseOnGo:!1,footerText:z.t("Step 1 of 2")};case C.U.EDIT:return{title:z.t("Edit User Group"),contentLabel:z.t("Edit User Group"),goButtonText:z.t("Save"),onGo:this.onDetailsStepComplete,shouldCloseOnCancel:!0,cancelText:z.t("Cancel"),shouldCloseOnGo:!1,footerText:null};case C.U.MEMBERS:default:return{title:z.t("Add members"),contentLabel:z.t("Add members"),shouldCloseOnGo:!0,bodyClassName:"p-user_group_member_management__dialog_body",onGo:this.onCreateDialogSubmit,goButtonText:z.t("Create Group"),shouldCloseOnCancel:!1,cancelText:z.t("Back"),onCancel:()=>{this.setDialogStep(C.U.DETAILS)},footerText:z.t("Step 2 of 2")}}}setApiError(e){this.setState(()=>({submitError:e}))}setDetailsFormValues(e){this.setState(t=>({detailsFormValues:{...t.detailsFormValues,...e}}))}setDialogStep(e){this.setState(()=>({formStep:e}))}setFormErrors(e){this.setState(t=>({errors:{...t.errors,...e}}))}setFormSubmitPending(e){this.setState(()=>({formSubmitPending:e}))}setRequiredFieldsEmpty(e){this.setState(()=>({requiredFieldsEmpty:e}))}setUserGroupFormRef(e){this.formRef=e}setUserGroupMemberManagementRef(e){this.userGroupMemberManagementRef=e}hasValidationErrors(e){return!!(0,l.A)(e,e=>!!(e&&e.length))}shouldShowCloseDialogSpeedBump(e){let{formStep:t}=this.state,a=t===C.U.MEMBERS;if("go"===e||a)return!1;let n=this.formRef?.getFormValues();return!(0,i.A)(this.state.detailsFormValues,n)}renderDetailsForm(){var e;let{detailsFormValues:{workspaceId:t},selectedTeamIdForNewUserGroup:a}=this.state;return n.createElement("div",null,n.createElement(g.A,{isUnifiedGridMode:this.props.isUnifiedGridMode,detailsFormValues:this.state.detailsFormValues,errors:this.state.errors,submitError:this.state.submitError,setFormErrors:this.setFormErrors,onRef:e=>this.setUserGroupFormRef(e),setRequiredFieldsEmpty:this.setRequiredFieldsEmpty,onPurposeChange:this.onPurposeChange,onTargetTeamChange:this.onSelectedTeamChange,purposeMaxLength:140,userGroup:!(e=this.props.userGroup)||(0,I.Zx)(e)?{id:"",name:"",handle:"",description:"",team_id:"",is_usergroup:!0}:e,formStep:this.state.formStep,onSelectedMembersChange:this.onSelectedMembersChange,membersSharedUserGroupSection:this.state.membersSharedUserGroupSection,focusKey:this.props.focusKey,targetTeam:a??t,getAllWorkspacesUserCanCreateGroupsIn:this.props.getAllWorkspacesUserCanCreateGroupsIn,getAllWorkspacesUserCanEditGroupsIn:this.props.getAllWorkspacesUserCanEditGroupsIn,validateUserGroupName:this.props.validateUserGroupName,validateUserGroupHandle:this.props.validateUserGroupHandle,seenUserGroupSectionsNewBadge:this.props.seenUserGroupSectionsNewBadge,countOfUserGroupSectionsInteractions:this.props.countOfUserGroupSectionsInteractions,currentUserId:this.props.currentUserId}))}renderDialogStep(){let{formStep:e}=this.state,t=e===C.U.DETAILS,a=e===C.U.EDIT,n=e===C.U.MEMBERS;return t||a?this.renderDetailsForm():n?this.renderMemberSelector():""}renderMemberSelector(){let{detailsFormValues:{workspaceId:e},selectedTeamIdForNewUserGroup:t}=this.state;return n.createElement(E.A,{ref:this.setUserGroupMemberManagementRef,groupId:this.props.userGroupId??"",targetTeam:t??e,onSelectedItemsChange:this.onSelectedItemsChange})}renderFooterText(){return this.state.formStep!==C.U.EDIT?null:n.createElement(CopyUserGroupId,{userGroupId:this.props.userGroupId??""})}render(){let{detailsFormValues:{workspaceId:e},selectedTeamIdForNewUserGroup:t,errors:a,requiredFieldsEmpty:r,purposeTooLong:s,formSubmitPending:l,formStep:i}=this.state,{getAllWorkspacesUserCanCreateGroupsIn:o}=this.props,c=o.includes(t??e),d=i===C.U.DETAILS,m=!c&&d||this.hasValidationErrors(a)||r||s,p=this.getDialogProps();return n.createElement(u.Ay,{onClose:this.props.closeModal,showCancelButton:!0,goButtonIsDisabled:m,goButtonIsPending:l,getShouldShowSpeedBump:this.shouldShowCloseDialogSpeedBump,speedBumpCancelButtonText:z.t("Keep Editing"),speedBumpContinueButtonText:z.t("Close"),speedBumpTitleText:z.t("Your work won\u2019t be saved - are you sure you want to close?"),footerText:this.renderFooterText(),className:"p-user_group_create_edit__dialog",title:p.title,contentLabel:p.contentLabel,goButtonText:p.goButtonText,onGo:p.onGo,shouldCloseOnCancel:p.shouldCloseOnCancel,cancelText:p.cancelText,shouldCloseOnGo:p.shouldCloseOnGo,bodyClassName:p.bodyClassName,onCancel:p.onCancel},this.renderDialogStep())}};Y.displayName="UserGroupEditCreateDialog";let j={createUserGroup:q,updateUserGroup:K.A,closeModal:P.O,enqueueToast:D.M,showUserGroupDetails:R.q,validate:S,addUserGroupIds:L.aq,bulkEditUserGroupMembers:H.A,validateUserGroupName:v.Ay,validateUserGroupHandle:y.Ay,seenUserGroupSectionsNewBadge:W.p},X=(0,w.N)((e,t)=>{let a=(0,U.lJ)(e,t.userGroupId??""),n=(0,I.$Q)(a),r=(0,T.JY)(e),s=(0,T.s_)(e),l=(0,d.JV)(r),i=(0,I.DF)(a);return{userGroup:a,userGroupId:t.userGroupId,isUnifiedGridMode:l&&(0,m.ss)(e),currentTeamId:s,userGroupTeamId:n,userGroupName:(0,I.ue)(a)??"",userGroupHandle:n?(0,I.x_)(a,{includeAtSign:!1})??"":"",userGroupPurpose:(0,I.NF)(a)??"",userGroupDefaultChannels:(0,U.UN)(e,{userGroup:a})??[],userGroupAdditionalChannels:(0,U.E_)(e,{userGroup:a})??[],getAllWorkspacesUserCanCreateGroupsIn:(0,I.dR)(e),getAllWorkspacesUserCanEditGroupsIn:(0,I.f4)(e),isUserGroupSectionEnabled:i,currentUserId:(0,O.WR)(e),countOfUserGroupSectionsInteractions:(0,M.ty)(e,"seen_usergroup_section_new_badge")??0}},j)(Y)},0x11bc0cbc0:(e,t,a)=>{"use strict";a.d(t,{g:()=>q,A:()=>z});var n=a(0xbad225b5),r=a(0x2286acf6c),s=a(0xb97b797e),l=a(0x20482ad21),i=a(0x2b7f0bcc),o=a(0xb04bc36e),c=a(0x1d2cd7755),d=a(0x126f22530),m=a(0x5299a396),p=a(0x189a28b3e),u=a(0x1cbdfeceb),h=a(0x677a139e),_=a(0x15bd59d31),b=a(0x19dc73101),A=a(0xf159cb74),f=a(0x73d7ee71),x=a(0x16df7a1d3);let g=new l.Ay("user_groups"),E={targetTeamId:null,selectedChannels:[],onChange:u.A,inputRef:null};let UserGroupDefaultChannelPicker=class UserGroupDefaultChannelPicker extends n.PureComponent{static defaultProps=E;getSelectedOptions(){return(this.props.selectedChannels||[]).map(e=>({value:e}))}renderChannelOption=e=>n.createElement(_.A,{channel:e.entity,channelId:e.value});render(){let{isUnifiedGridMode:e,targetTeamId:t,onChange:a,inputRef:r}=this.props,s=g.t("Channels"),l=g.t("Group members are added to these channels automatically.");return n.createElement(c.A,{htmlFor:"user_group_default_channel_select",id:"user_group_default_channel",key:"user_group_default_channel",text:s},n.createElement(b.h,{isDisabled:!t,selectedOptions:this.getSelectedOptions(),renderOption:this.renderChannelOption,width:"100%",optionsRowHeight:32,onSelectedItemsChange:a,selectId:"user_group_default_channel_select",searcherOptions:{entities:{channels:{includePublic:!0,includePrivate:!0,includeRequired:!0,includeFromAnotherTeam:!1,includeMpims:!1,includeArchived:!1,searchPreviousNames:!1,onlyVisibleMpims:!1}},limit:100,tiered:!0,sort:{frecency:!0},filter:e&&t?e=>(0,A.c)(e)===t||(0,f.R)({},e).includes(t)||(0,x.S)(e):null},inputRef:r}),n.createElement(h.A,null,l))}};UserGroupDefaultChannelPicker.displayName="UserGroupDefaultChannelPicker";var C=a(0x17294c72a),y=a(0x1d24ec95f),v=a(0x1d1911997),k=a(0x11aaf59fe),S=a(0x1de80d519),I=a(0xfca3fd81),N=a(0xa1832ae4),w=a(0x1edb6b65f),T=a(0x226892387),M=a(0x1ee439e69);let R=new l.Ay("create_channel_modal"),UserGroupSelectWorkspaceDropdown=({selectedWorkspaceId:e,userGroupTeamId:t,onSelectedWorkspaceIdChange:a})=>{let r=(0,T.d4)(M.eD),{workspaceOptions:s,mergedOptions:l}=(0,n.useMemo)(()=>{let e=(0,C.A)(r,e=>(0,N.F1)(e)),[t,a]=(0,y.A)(e,e=>(0,w.N)(e)),n=t.length>0,makeWorkspaceOption=e=>({label:(0,N.F1)(e),value:e,key:e.id}),s=a.map(e=>makeWorkspaceOption(e)),l=t.map(e=>makeWorkspaceOption(e));return{workspaceOptions:[...n?[{label:"Internal workspaces",options:s}]:s,...n?[{label:"Events",options:l}]:[]],mergedOptions:[...s,...l]}},[r]),i=(0,n.useCallback)(e=>{a(e.value.id)},[a]),o=l.find(t=>t.key===e),d=(0,n.useCallback)(e=>n.createElement(S.e,{className:"padding_0",id:e.value.id}),[]);return n.createElement(c.A,{id:"workspace-select--label",htmlFor:"workspace-select",type:c.Q.block,cursor:"pointer",text:R.t("Workspace"),className:"margin_bottom_100"},n.createElement(v.Ay,{classPrefix:"p-user_group",selectId:"user_group_select_workspace",isDisabled:!!t,options:s,onOptionSelected:i,renderSelectedOption:d,selectedOption:o,placeholderText:R.t("Select a workspace"),ariaLabel:R.t("Please select a workspace"),ariaDescribedBy:"workspace-select--label",size:k.hu.MEDIUM,width:"100%",showDropdownIcon:!0,isRequired:!0,focusOnMount:!0,autoClogProps:I.mg,expandOnFocus:!1}))};UserGroupSelectWorkspaceDropdown.displayName="UserGroupSelectWorkspaceDropdown";var O=a(0x124cfb3b3),P=a(0x61f75169),D=a(0x33830eed),L=a(0x15e263568),U=a(0x1c91944c9),H=a(0x1ccef1c6f),F=a(0x19c76d181),V=a(0x11cd1a647);let G=a.p+"user-group-section-group-2a032a7.png",B=new l.Ay("user_groups"),q={NAME:"name",CHANNELS:"channels"},W=class extends n.PureComponent{nameInputRef;channelSelectInputRef;apiErrorRef;constructor(e){super(e),this.state={name:e.detailsFormValues?.name||"",handle:e.detailsFormValues?.handle||"",purpose:e.detailsFormValues?.purpose||"",channels:e.detailsFormValues?.channels||[],workspaceId:e.detailsFormValues?.workspaceId||"",isUserGroupSectionEnabled:e.detailsFormValues?.isUserGroupSectionEnabled||!1};const t=!this.state.name||!this.state.handle;this.props.setRequiredFieldsEmpty(!!t),this.validateUserGroupName=(0,r.A)(this.validateUserGroupName,300).bind(this),this.validateUserGroupHandle=(0,r.A)(this.validateUserGroupHandle,300).bind(this),(0,s.v)(this,["onNameChange","onHandleChange","onPurposeChange","onChannelsUpdate","onSelectedWorkspaceIdChange","maybeRenderError","focusNameInput","onUserGroupSectionOptionChange","getFormValues"]),this.nameInputRef=n.createRef(),this.channelSelectInputRef=n.createRef(),this.apiErrorRef=n.createRef()}componentDidMount(){this.props.onRef(this),this.props.focusKey===q.CHANNELS?this.focusChannelSelectInput():this.focusNameInput(),this.props.countOfUserGroupSectionsInteractions<4&&this.props.seenUserGroupSectionsNewBadge()}componentDidUpdate(e){if(e!==this.props){let e=!this.state.name||!this.state.handle;this.props.setRequiredFieldsEmpty(!!e)}}componentWillUnmount(){this.props.onRef(void 0)}onChannelsUpdate=e=>{let t=e.map(e=>e.value);this.setState(()=>({channels:t}))};onHandleChange=e=>{let t=e.replace(/ /g,"");return(this.setState(()=>({handle:t}))," "!==e.charAt(0))?this.validateUserGroupHandle(t):Promise.resolve("")};onNameChange=e=>(this.setState(()=>({name:e})),this.validateUserGroupName(e));onPurposeChange=e=>{this.props.onPurposeChange(e),this.setState(()=>({purpose:e}))};onSelectedWorkspaceIdChange=e=>{this.props.onTargetTeamChange(e),this.setState(()=>({workspaceId:e}))};onUserGroupSectionOptionChange=()=>{this.setState(e=>({isUserGroupSectionEnabled:!e.isUserGroupSectionEnabled}))};getFormValues(){return this.state}focusNameInput=()=>{this.nameInputRef.current?.focus()};focusChannelSelectInput=()=>{this.channelSelectInputRef.current?.focus()};maybeRenderError(){let e,{submitError:t,getAllWorkspacesUserCanCreateGroupsIn:a,getAllWorkspacesUserCanEditGroupsIn:r}=this.props,{workspaceId:s}=this.state,l=!a.includes(s)&&!r.includes(s);return l&&(e=B.t("You do not have permission to create user groups in this workspace.")),t&&(e=B.t("We\u2019re not sure why, but that didn\u2019t work. Try again?"),this.apiErrorRef.current?.scrollIntoView(),"too_many_linked_channels"===t&&(e=B.t("User groups can\u2019t have more than 100 default channels."))),(l||t)&&n.createElement(i.Ay,{level:"error",type:"inline",className:"margin_bottom_100"},e)}maybeRenderAutogeneratedUserGroupAlert(){let e,t=this.props.userGroup;if(!(0,P.r2)(t))return null;let a=B.t("This user group is automatically generated for Workspace Admins."),r=B.t("This user group is automatically generated for Workspace Owners.");return(0,P.cA)(t)&&(e=r),(0,P.ZZ)(t)&&(e=a),n.createElement(i.Ay,{level:"info",type:"inline",className:"margin_bottom_100"},e)}validateUserGroupHandle=e=>{let{userGroup:t}=this.props;return this.props.validateUserGroupHandle({handle:e,prevHandle:(0,P.x_)(t,{includeAtSign:!1}),reason:"user-group-edit-create-form",targetTeam:this.state.workspaceId}).then(e=>(this.props.setFormErrors({handleError:e}),e))};validateUserGroupName=e=>{let{userGroup:t}=this.props;return this.props.validateUserGroupName({name:e,prevName:(0,P.ue)(t),reason:"user-group-edit-create-form",targetTeam:this.state.workspaceId}).then(e=>(this.props.setFormErrors({nameError:e}),e))};renderDefaultChannelSelect(){let{isUnifiedGridMode:e,userGroup:t}=this.props,a=(0,P.$Q)(t)||this.state?.workspaceId||null;return n.createElement(UserGroupDefaultChannelPicker,{isUnifiedGridMode:e,targetTeamId:a,selectedChannels:this.state.channels,onChange:this.onChannelsUpdate,formStep:this.props.formStep,inputRef:this.channelSelectInputRef})}renderUserGroupHandleField(){let{isUnifiedGridMode:e,errors:t,userGroup:a,getAllWorkspacesUserCanCreateGroupsIn:r,formStep:s}=this.props,{workspaceId:l,handle:i}=this.state,o=r.includes(l),m=s===O.U.DETAILS,p=!o&&m||(0,P.r2)(a)||e&&!l,u=B.t("e.g. accounts-team"),h=B.t("You\u2019ll use the display name to get the group\u2019s attention. It should be all lowercase, with no spaces."),_=B.t("Handle");return n.createElement("div",null,n.createElement(c.A,{htmlFor:"handle_label",id:"user_group_handle",key:"user_group_handle",text:_},n.createElement(d.A,{name:"user_group_handle",id:"handle_input",placeholder:u,"aria-labelledby":"user_group_handle",value:i,type:"text",onChange:this.onHandleChange,errorText:t.handleError,hintText:h,isRequired:!0,icon:"mentions",useInlineAlert:!0,isDisabled:p})))}renderWorkspaceSelect=()=>this.props.isUnifiedGridMode&&n.createElement(UserGroupSelectWorkspaceDropdown,{userGroupTeamId:(0,P.$Q)(this.props?.userGroup),selectedWorkspaceId:this.state.workspaceId,onSelectedWorkspaceIdChange:this.onSelectedWorkspaceIdChange});renderUserGroupNameField(){let{isUnifiedGridMode:e,errors:t,userGroup:a,getAllWorkspacesUserCanCreateGroupsIn:r,formStep:s}=this.props,{workspaceId:l,name:i}=this.state,o=r.includes(l),m=s===O.U.DETAILS,p=!o&&m||(0,P.r2)(a)||e&&!l,u=B.t("Name"),h=B.t("e.g. Accounts Team");return n.createElement("div",null,n.createElement(c.A,{htmlFor:"name_label",id:"user_group_name",key:"user_group_name",text:u},n.createElement(d.A,{name:"user_group_name",ref:this.nameInputRef,id:"name_input",placeholder:h,"aria-labelledby":"user_group_name",value:i,type:"text",onChange:this.onNameChange,errorText:t.nameError,isRequired:!0,useInlineAlert:!0,isDisabled:p})))}renderUserGroupPurposeField(){let e=B.t("Purpose"),t=B.t("What is this group about?");return n.createElement("div",null,n.createElement(c.A,{htmlFor:"purpose_label",id:"user_group_purpose",key:"user_group_purpose",text:e,optional:!0},n.createElement(m.A,{name:"user_group_purpose",id:"purpose_input",labelId:"user_group_purpose",value:this.state.purpose,type:"text",onChange:this.onPurposeChange,errorText:this.props.errors.purposeError,hintText:t,maxCharacterLimit:this.props.purposeMaxLength,useInlineAlert:!0,size:"small"})))}renderEnableSectionCheckbox(){let{countOfUserGroupSectionsInteractions:e}=this.props,t=B.t("Add group channels as a section in Home"),a=B.t("Organize the channels into a section in the Home sidebar for all group members."),r=B.t("User group section");return n.createElement("div",{className:"p-user_group_create_form__section_toggle_container"},n.createElement("div",{className:"p-user_group_create_form__section_toggle_container_body"},n.createElement("div",{className:"p-user_group_create_form__section_toggle_container_body__title"},t,e<4&&n.createElement(o.A,null,B.t("NEW"))),n.createElement("div",{className:"p-user_group_create_form__section_toggle_container_body__subtext"},a),n.createElement(p.A,{className:"p-user_group_create_form__section_toggle_container_body__switch","data-qa":"enable_user_group_section_toggle",isToggled:this.state.isUserGroupSectionEnabled,onChange:this.onUserGroupSectionOptionChange,ariaLabel:`Toggle ${t}`})),n.createElement("div",{className:"p-user_group_create_form__section_toggle_container_image"},n.createElement("img",{src:G,alt:r})))}render(){return n.createElement("div",{ref:this.apiErrorRef},this.maybeRenderError(),this.maybeRenderAutogeneratedUserGroupAlert(),n.createElement("form",{className:"p-user_group_create_form"},this.renderWorkspaceSelect(),this.renderUserGroupNameField(),this.renderUserGroupHandleField(),this.renderUserGroupPurposeField(),this.renderDefaultChannelSelect(),this.renderEnableSectionCheckbox()))}};W.displayName="UserGroupEditCreateForm";let K={validateUserGroupName:L.Ay,validateUserGroupHandle:D.Ay,seenUserGroupSectionsNewBadge:V.p,currentUserId:null,detailsFormValues:{name:"",handle:"",purpose:"",channels:[],workspaceId:"",isUserGroupSectionEnabled:!1},errors:{nameError:"",handleError:"",purposeError:""},submitError:"",getAllWorkspacesUserCanCreateGroupsIn:[],getAllWorkspacesUserCanEditGroupsIn:[],focusKey:q.NAME,countOfUserGroupSectionsInteractions:0,targetTeam:void 0},z=(0,U.N)(e=>({currentUserId:(0,F.WR)(e),getAllWorkspacesUserCanCreateGroupsIn:(0,P.dR)(e),getAllWorkspacesUserCanEditGroupsIn:(0,P.f4)(e),countOfUserGroupSectionsInteractions:(0,H.ty)(e,"seen_usergroup_section_new_badge")??0}),K)(W)},0xdbe50be6:(e,t,a)=>{"use strict";a.d(t,{A:()=>S});var n=a(0xbad225b5),r=a(0x1cbdfeceb),s=a(0x21f3c49e8),l=a(0xb97b797e),i=a(0x20482ad21),o=a(0x2b7f0bcc),c=a(0xb1ea448c),d=a(0x11aaf59fe),m=a(0x16cf1da63),p=a(0x10d53599f),u=a(0x19dc73101),h=a(0x18def662b),_=a(0x82980ab8),b=a(0x61f75169),A=a(0x226892387),f=a(0x2d90c1a8),x=a(0x475c9cfe);let g=new i.Ay("user_groups"),EditUserGroupMembers=({groupId:e,onSelectedItemsChange:t,searcherSelectSize:a,membersSharedUserGroupSection:r,isCreateSharedSectionModal:s,shouldShowHint:l,shouldShowError:i,currentMemberIds:o})=>{let c=(0,m.wA)(),E=(0,A.d4)(t=>(0,x.lJ)(t,e)),C=o??(0,b.IM)(E),y=(0,A.d4)(h.Ow),v=(0,n.useMemo)(()=>r?[...r].map(e=>({label:(0,_.Fh)(c((0,f.A)(e))),value:e})):[],[c,r]),k=(0,n.useMemo)(()=>[...C].map(e=>({label:(0,_.Fh)(c((0,f.A)(e))),value:e})),[c,C]),S=(0,n.useCallback)(e=>n.createElement(p.A,{id:e.value}),[]),I=(0,n.useMemo)(()=>[{id:"hint",message:y?g.t("You can also add more people later."):""}],[y]),N=(0,n.useMemo)(()=>{let e=[];return y&&i&&e.push({id:"no_members",message:g.t("User groups need to have at least one member.")}),e},[y,i]);return n.createElement(u.h,{isRequired:!0,focusOnMount:!0,key:"edit_user_group_members",selectId:"edit_user_group_members",width:"100%",size:a||d.hu.LARGE,maxHeight:148,optionsRowHeight:32,placeholderText:g.t("Search by name"),searcherOptions:{entities:{members:{includeSelf:!0,onlyLocalTeam:!0,includeAllExternal:!1,includeSlackbot:!1,includeBots:!1,includeDeleted:!1,includeGuests:!1,includeProfileOnlyUsers:!0}},allowEmptyQuery:!0,sort:{source:"user-group-member-select",frecency:!0,selfFirst:!1},limit:40,filter:!1},selectedOptions:s?v:k,renderOption:S,onSelectedItemsChange:t,hints:l?I:null,errors:N})};EditUserGroupMembers.displayName="EditUserGroupMembers";let E=(0,n.memo)(EditUserGroupMembers);var C=a(0x1c91944c9),y=a(0xb49dd8e4);let v=new i.Ay("user_groups"),k=class extends n.PureComponent{static defaultProps={groupId:void 0,targetTeam:void 0,onSelectedItemsChange:r.A,userGroupMemberIds:[],isInternalSpacesDetailForm:!1};keyCommands;constructor(e){super(e),this.state={updatedGroupMembers:e.userGroupMemberIds,displayNoMemberError:!1,haveUpsertedExistingMembers:!1},(0,l.v)(this,["setAllMembers","onSelectedItemsChange"])}componentDidMount(){let{groupId:e}=this.props;e&&this.props.fetchAndUpsertUserGroupMembers({groupId:e}).then(e=>{this.setState(()=>({haveUpsertedExistingMembers:!0}));let t=e?.users;t&&!(0,s.A)(t)&&(this.setState(()=>({updatedGroupMembers:t})),this.props.onSelectedItemsChange(t))})}componentWillUnmount(){this.keyCommands&&this.keyCommands.reset()}onSelectedItemsChange=e=>{this.setDisplayNoMemberError(!e.length),this.setAllMembers(e.map(e=>e.value)),this.props.onSelectedItemsChange(e.map(e=>e.value))};getUpdatedUserGroupMembers(){return this.state.updatedGroupMembers}setAllMembers=e=>{this.setState(()=>({updatedGroupMembers:e}))};setDisplayNoMemberError=e=>{this.setState(()=>({displayNoMemberError:e}))};maybeRenderNoMembersAlert(){let{isInternalSpacesDetailForm:e}=this.props;return!this.state.displayNoMemberError||e?null:n.createElement(o.Ay,{type:"inline",level:"error",className:"margin_bottom_100","data-qa":"user-group-error"},v.t("User groups need to have at least one member."))}validateUpdatedGroupMemberCount(){let e=this.state.updatedGroupMembers.length>0;return e||this.setDisplayNoMemberError(!0),e}renderLoadingSpinner(){return n.createElement("div",{className:"full_height full_width display_flex align_items_center","data-qa":"user-group-loading"},n.createElement(c.A,{size:"jumbo",className:"inline_block full_width margin_top_200"}))}renderUserGroupMemberSelector(){let{haveUpsertedExistingMembers:e,displayNoMemberError:t}=this.state,{groupId:a,targetTeam:r,isInternalSpacesDetailForm:s}=this.props,l=s?"":"p-user_group_member_selector";return n.createElement("div",{className:l,"data-qa":"user-group-member-management-body"},!a||e?n.createElement("div",null,this.maybeRenderNoMembersAlert(),n.createElement(E,{groupId:this.props.groupId??"",targetTeam:r,onSelectedItemsChange:this.onSelectedItemsChange,currentMemberIds:this.state.updatedGroupMembers,searcherSelectSize:s?d.hu.MEDIUM:void 0,shouldShowHint:s,shouldShowError:s&&t})):n.createElement("div",{className:"p-user_group_member_selector_loading_spinner_container"},this.renderLoadingSpinner()))}render(){return this.renderUserGroupMemberSelector()}};k.displayName="UserGroupMemberManagement";let S=(0,C.N)((e,{groupId:t,targetTeam:a})=>{let n=(0,x.lJ)(e,t);return{userGroupMemberIds:(0,b.IM)(n),targetTeam:a??(0,b.$Q)(n)}},e=>({fetchAndUpsertUserGroupMembers:t=>e((0,y.A)(t))}),null,{forwardRef:!0})(k)},0x124cfb3b3:(e,t,a)=>{"use strict";a.d(t,{U:()=>n});let n={DETAILS:"details",EDIT:"edit",MEMBERS:"members"}},0x64104cf3:(e,t,a)=>{"use strict";a.d(t,{C:()=>i});var n=a(0xbad225b5),r=a(0x5b1935a6);let s=n.lazy(()=>Promise.resolve().then(a.bind(a,0x7ef166c2)).then(e=>({default:e.PlatformAiAppsDataAccessConsentAlert}))),l=n.lazy(()=>Promise.resolve().then(a.bind(a,0x21fd58d52)).then(e=>({default:e.PlatformAiAppsDataAccessConsentBanner}))),i={spaceName:r.xu.AI_APPS_CHAT_TAB,notifications:{[r.ze.PLATFORM_AI_APPS_DATA_ACCESS_CONSENT_ALERT]:{component:s},[r.ze.PLATFORM_AI_APPS_DATA_ACCESS_CONSENT_BANNER]:{component:l}}}},0x20648f540:(e,t,a)=>{"use strict";a.r(t),a.d(t,{SlackAiChannelSummariesCoachmark:()=>SlackAiChannelSummariesCoachmark,default:()=>x});var n=a(0xbad225b5),r=a(0x16cf1da63),s=a(0x20482ad21),l=a(0xb90de824),i=a(0x13953efe6),o=a(0x3989021c),c=a(0x5eedb646),d=a(0x218842a12),m=a(0x3711e82d),p=a(0x226892387),u=a(0x1400f598e),h=a(0x365a4cc3),_=a(0x5b1935a6),b=a(0x1472af90a),A=a(0x18632f75a);d.g.SLACK_AI_CHANNEL_SUMMARIES_COACHMARK;let f=new s.Ay("assistant"),SlackAiChannelSummariesCoachmark=({children:e,recordNotificationEventImpression:t})=>{let a=(0,r.wA)(),s=(0,n.useMemo)(()=>({eventId:m.EventId.NATIVE_AI,uiStep:m.UiStep.SLACK_AI_CHANNEL_SUMMARIES_COACHMARK,elementName:c.H.NUX_COACHMARK}),[]),d=f.t("Get caught up anytime"),x=f.t("Whenever you\u2019re new to a channel or feeling behind, an AI summary is just a click away."),g=(0,p.d4)(h.eE),{isOpen:E,closeCoachmark:C}=(0,o.A)(_.ze.SLACK_AI_CHANNEL_SUMMARIES_COACHMARK,_.xu.IN_PRODUCT_COACHMARK);(0,n.useEffect)(()=>{E&&t&&t()},[E,t]);let y=(0,n.useCallback)(()=>{a((0,u.bJ)(!1)),E&&(C(),a((0,A.z)({component:b.G7.SlackAiNfxSummary,type:b.X8.Dismiss,reason:"slackAiInteractionsCounter"}))),g&&a((0,u._)(!1))},[C,a,E,g]),v=(0,n.useMemo)(()=>n.createElement(l.Ay,{orientation:i.YC.Bottom,isOpen:E||g,width:400,arrowPosition:95,offsetX:-10,title:d,ariaLabel:d,bodyText:x,closeCoachmark:y,autoClogProps:s}),[E,g,d,y,s,x]);return n.createElement(i.Ay,{coachmarkElement:v,orientation:i.YC.BottomLeft},e)};SlackAiChannelSummariesCoachmark.displayName="SlackAiChannelSummariesCoachmark";let x=SlackAiChannelSummariesCoachmark},0x21fda2db:(e,t,a)=>{"use strict";a.d(t,{h:()=>SlackAiHeroAsset});var n=a(0xbad225b5),r=a(0x120c268ad),s=a.n(r),l=a(0x172dd1bf5),i=a(0x223ac29bb),o=a(0x1ccef1c6f),c=a(0x226892387),d=a(0x1fb2d2a87);let SlackAiHeroAsset=({animationSet:e,staticDark1x:t,staticDark2x:a,staticLight1x:r,staticLight2x:m,className:p,staticHeight:u})=>{let h=(0,c.d4)(e=>(0,o.ty)(e,"a11y_animations")),_=(0,c.d4)(e=>"dark"===(0,d.to)(e)),b=(0,i.Yp)();if(h&&("en-US"===b||"en-GB"===b))return n.createElement(l.e,{getAnimationImport:e[_?"getAnimationDark":"getAnimationLight"],minHeight:e.height,autoplay:!0,loop:!0,className:p});let A=_?`${t} 1x, ${a} 2x`:`${r} 1x, ${m} 2x`;return n.createElement("img",{height:u||"190px",className:s()("full_width block",p),alt:"","aria-hidden":!0,srcSet:A})};SlackAiHeroAsset.displayName="SlackAiHeroAsset"},0x238955a0b:(e,t,a)=>{"use strict";a.d(t,{H:()=>SlackAiNuxCoachmark});var n=a(0xbad225b5),r=a(0x120c268ad),s=a.n(r),l=a(0x14fad6485),i=a(0x20482ad21),o=a(0xb90de824),c=a(0x13953efe6),d=a(0x235fec370),m=a(0x5eedb646),p=a(0x3711e82d),u=a(0x226892387),h=a(0x1e3eb45fd),_=a(0x1ae45580b);let b=new i.Ay("assistant"),SlackAiNuxCoachmark=({isOpen:e,dismissCoachmark:t,titleText:a,bodyText:r,arrowPosition:i,arrowCenterOnAnchor:A,offsetX:f,offsetY:x,onClickPrimaryButton:g,onClickSecondaryButton:E,primaryCallToActionText:C,secondaryCallToActionText:y,stepNumber:v,totalStepCount:k,children:S,orientation:I,centerOnArrow:N,clogUiStep:w,hero:T,className:M,cutoutTopBottomPadding:R=0,cutoutLeftRightPadding:O=0})=>{let P=(0,u.d4)(h.hS),D=(0,u.d4)(_.M),{windowRef:L}=(0,n.useContext)(l._0),U=(0,n.useMemo)(()=>n.createElement("div",{className:"p-slack_ai_nux_coachmark__asset_container"},T),[T]),H=(0,n.useMemo)(()=>({eventId:p.EventId.NATIVE_AI,uiStep:w,elementName:m.H.NUX_COACHMARK}),[w]),F=(0,n.useMemo)(()=>n.createElement("div",null,n.createElement("div",{className:s()("c-coachmarkv2__body",{margin_bottom_150:!!v})},r),!!v&&n.createElement("div",{className:"p-slack_ai_nux_coachmark__steps"},b.t("{stepNumber} of {totalStepCount}",{stepNumber:v,totalStepCount:k}))),[r,v,k]),{renderCoachmarkChildren:V}=(0,d._)({dismissCoachmark:t,topBottomPadding:R,leftRightPadding:O});(0,n.useEffect)(()=>{e&&L.deref()?.requestAnimationFrame(()=>{L.deref()?.document.querySelector(".p-slack_ai_nux_coachmark .c-button--primary")?.focus?.()})},[e,L]);let G=(0,n.useMemo)(()=>n.createElement(o.Ay,{className:s()("p-slack_ai_nux_coachmark",`p-slack_ai_nux_coachmark--orientation-${I}`,M),hero:U,isOpen:e,width:400,arrowPosition:i,arrowCenterOnAnchor:A,centerOnArrow:N,offsetX:f,offsetY:x,title:a,ariaLabel:a,bodyText:F,onClickPrimaryButton:g,onClickSecondaryButton:E,primaryCallToActionText:C,secondaryCallToActionText:y,hideCloseButton:!1,closeCoachmark:t,autoClogProps:H}),[I,M,U,e,i,A,N,f,x,a,F,g,E,C,y,t,H]);return D&&e&&P?n.createElement(c.Ay,{coachmarkElement:G,orientation:I},V(S)):S};SlackAiNuxCoachmark.displayName="SlackAiNuxCoachmark"},0x1a84f8520:(e,t,a)=>{"use strict";a.d(t,{P:()=>m});var n=a(0xbad225b5),r=a(0x20482ad21),s=a(0x6e87d4ec),l=a(0xe1644a69),i=a(0x1ecc7f772),o=a(0x226892387),c=a(0x217553e42);let d=new r.Ay("assistant");function ChannelRecapMaxLimitToastNonMemoized({channelIds:e}){let t,a=(0,o.d4)(t=>(0,c.OL)(t,e[0])),r=(0,l.T)({type:"summary"});if(e.length>1)t=d.t("{numberOfChannels} channels not added. Recap can have a max of 249 channels",{numberOfChannels:e.length});else{let e=(0,i.Mn)(a),n=`#${e||"channel"}`;t=d.t("{channelDisplayName} not added. Recap can have a max of 249 channels",{channelDisplayName:n})}return n.createElement(s.A,{duration:3e3,svgIconProps:r},n.createElement("span",null,t))}ChannelRecapMaxLimitToastNonMemoized.displayName="ChannelRecapMaxLimitToastNonMemoized";let m=(0,n.memo)(ChannelRecapMaxLimitToastNonMemoized)},0x1550c1995:(e,t,a)=>{"use strict";a.d(t,{N:()=>ey});var n,r,s=a(0xbad225b5),l=a(0x16cf1da63),i=a(0x120c268ad),o=a.n(i),c=a(0x130d89881),d=a(0x21343fa5a),m=a(0x20482ad21),p=a(0x11a296110),u=a(0x210cf696f),h=a(0x15014e268),_=a(0x2501a2cee),b=a(0x4c96e5d9),A=a(0x9c0c23e6),f=a(0x929229c1),x=a(0x226d2c646),g=a(0x1f2082e6f),E=a(0x129f50c4),C=a(0x19ab18890),y=a(0xba4aff95),v=a(0x201f2115b),k=a(0x5eedb646),S=a(0x45bd075),I=a(0x1d2cd7755),N=a(0x189a28b3e),w=a(0x151cc49d5),T=a(0x14c39ae0f),M=a(0x1ec69ee01),R=a(0x12185e091),O=a(0x1ecc7f772),P=a(0x280afe13),D=a(0x136bdf2c4),L=a(0x114ffe897),U=a(0x8baf11b5),H=a(0x226892387),F=a(0x217553e42);let V=new m.Ay("assistant"),RecapChannelManagementEntity=({channelId:e,isRecapped:t,isMutedOverride:a,onRecapToggled:n,onMuteToggled:r,hideCheckBox:l=!1,hideMuteToggle:i=!1,showAsUnselected:c=!1,first:d=!1,last:m=!1})=>{let p=V.t("Muted"),u=V.t("Unmuted"),h=(0,H.d4)(t=>(0,F.OL)(t,e)),b=(0,H.d4)(e=>(0,O.SB)(e,h,{publicChannelIncludeHashSign:!1,imIncludeAtSign:!1})),A=(0,R.Zp)(h),f=(0,H.d4)(t=>void 0!==a?a:(0,U.B)(t,e)),x=f?p:u,g=(0,R.LI)(h),E=(0,R.yz)(h),C=(0,P.e)(h),y=(0,L.D)(h),v=(0,M.Cx)(h),k=(0,H.d4)(e=>(0,D.Z)(e,h)?.[0]),G=k?(0,M.N4)(h):void 0,B=`recap_channel_management_checkbox__${e}`,q=`recap_channel_management_switch__${e}`,W=(0,s.useCallback)(()=>{n(e)},[e,n]),K=(0,s.useCallback)(()=>{r?.(e,!f)},[e,r,f]),z=(0,s.useMemo)(()=>{let e;return e=g||y?s.createElement(w.A,{className:"p-recap_channel_management_entity__channel_prefix",userId:C,isSlackbotChannel:y,isSlackSecurityBotChannel:v,isAppIm:!0}):E?s.createElement(T.A,{className:"p-recap_channel_management_entity__channel_prefix",mpimMember:k||void 0,userCount:G||0}):s.createElement(_.Ah,{name:A?"lock":"channel",size:"16"}),s.createElement("div",{className:"p-recap_channel_management_entity__channel_label_inner"},e,s.createElement("div",{className:"p-recap_channel_management_entity__channel_name"},b))},[b,C,G,A,k,y,v,g,E]);return s.createElement("div",{"data-qa":"recap_channel_list_item",className:o()("p-recap_channel_management_entity",{"p-recap_channel_management_entity--selected":t&&!c,"p-recap_channel_management_entity--first":d,"p-recap_channel_management_entity--last":m})},s.createElement(I.A,{text:z,className:"p-recap_channel_management_entity__channel_label",htmlFor:l?q:B},!l&&s.createElement(S.A,{id:B,checked:t,onChange:W,"data-qa":"recap_channel_list_item_checkbox"})),!i&&s.createElement(I.A,{text:x,className:o()("p-recap_channel_management_entity__mute_label",{"p-recap_channel_management_entity__mute_label--unmuted":!f,"p-recap_channel_management_entity__mute_label--disabled":!t}),htmlFor:q},s.createElement(N.A,{id:q,className:"p-recap_channel_management_entity__mute_switch",ariaLabel:V.t("Toggle mute for channel"),isToggled:f,onChange:K,isDisabled:!t,dataQa:`recap_channel_list_item_checkbox_toggle_${f}`})))};RecapChannelManagementEntity.displayName="RecapChannelManagementEntity";var G=a(0x339b339c);let B={small:100,medium:200,large:300},RecapChannelManagementLoadingEntity=()=>{let e=(0,s.useMemo)(()=>s.createElement(G.A,{size:"medium",sizes:B}),[]);return s.createElement("div",{className:o()("p-recap_channel_management_entity")},s.createElement(I.A,{text:e,className:"p-recap_channel_management_entity__channel_label"},s.createElement(S.A,{disabled:!0})))};RecapChannelManagementLoadingEntity.displayName="RecapChannelManagementLoadingEntity";var q=a(0x11b7023b5),W=a(0x2120d7f64),K=a(0x20e80190e),z=a(0x3711e82d),$=a(0x1ccef1c6f),Y=a(0x1400f598e),j=a(0x365a4cc3),X=a(0x6d8ce6ed),Q=a(0x127c62b25),Z=a(0x6e87d4ec),J=a(0x1be37a18e),ee=a(0x1006f8a2b),et=a(0x6aa3bf15);let ea=new m.Ay("assistant");function TurnOffRecapToast(){let e=(0,l.wA)(),t=(0,H.d4)(et.e),a=(0,s.useCallback)(()=>{e((0,ee.A)({activeSection:J._.sidebar}))},[e]),n=(0,s.useCallback)(({text:e})=>s.createElement(u.A,{onClick:a},e),[a]),r=ea.rt("You\u2019ll no longer receive recaps. To hide it from your sidebar, visit <link>preferences.</link>",{"<link>":n});return s.createElement(Z.A,{duration:6e3,svgIconProps:t},s.createElement("span",null,r))}TurnOffRecapToast.displayName="TurnOffRecapToast";var en=a(0x11c82607b),er=a(0xf3c65e54),es=a(0x5b1935a6);let el=(0,en.Ay)("Sets users recap feature to unenrolled state",async(e,t)=>{e((0,er.A)({notificationName:es.ze.SLACK_AI_DIGEST_NUX_EDUCATION,action:es.hw.DISMISS})),e((0,Y.bg)(!0))});el.meta={name:"abandonRecapOnboarding",key:"createThunkAbandonRecapOnboarding",description:"Sets users recap feature to unenrolled state"};var ei=a(0xbee164fb),eo=a(0x23b062cb3),ec=a(0x16ffed5ab);let ed=(0,en.Ay)("Unsubscribes from all recap channels and abandons recap onboarding",async(e,t)=>{let a=(0,j._D)(t()),n=Object.keys(a).filter(e=>a[e]);try{await e((0,ei._)({channelIds:n,reason:"recap-opt-out"})),e((0,Y.d9)(!0)),e((0,Y.zV)())}catch{return e((0,eo.r)())}return e(el()),e((0,ec.M)({element:s.createElement(TurnOffRecapToast,null)}))});ed.meta={name:"turnOffRecap",key:"createThunkTurnOffRecap",description:"Unsubscribes from all recap channels and abandons recap onboarding"};var em=a(0x1f48e3aa4),ep=a(0x8f36a342),eu=a(0x1380694ee),eh=a(0x1fcbb004d);let e_=a.p+"onboarding_sidebar_footer_img-63f5d7b.svg",eb=a.p+"onboarding_sidebar_footer_mute_img-98a3e5a.svg",eA={eventId:z.EventId.NATIVE_AI,onClick:{enableClogAction:!0},elementName:k.H.DIGEST_RECOMMENDER_ADD_CHANNELS},ef={eventId:z.EventId.NATIVE_AI,onClick:{enableClogAction:!0},elementName:k.H.DIGEST_RECOMMENDER_MUTE_CHANNELS},ex=new m.Ay("assistant");var eg=((n=eg||{})[n.SectionHeader=0]="SectionHeader",n[n.RecapChannelEntity=1]="RecapChannelEntity",n[n.RecapChannelLoadingEntity=2]="RecapChannelLoadingEntity",n),eE=((r=eE||{})[r.ChooseChannels=0]="ChooseChannels",r[r.MuteChannels=1]="MuteChannels",r);let RecapManageChannelsModal=({isOnboardingMode:e,previewChannelIds:t,isOpenedFromMutedChannelCoachmark:a,onSaveChanges:n,onCloseModal:r,isOpenedFromMutingEducationBanner:i})=>{let m=(0,s.useMemo)(()=>({label:ex.t("Show: All channels"),value:"all"}),[]),S=ex.t("Show: Recapped channels"),I=(0,s.useMemo)(()=>({label:S,value:"selected"}),[S]),N=(0,s.useMemo)(()=>[m,I],[m,I]),w=(0,l.wA)(),T=(0,H.d4)(j.rV)===em.MO.Recap,P=(0,s.useMemo)(()=>{let t=k.H.RECAP_MANAGE_CHANNELS_MODAL;return e?t=k.H.RECAP_MANAGE_CHANNELS_MODAL_ONBOARDING:i&&(t=k.H.RECAP_MANAGE_CHANNELS_MODAL_MUTE_BANNER_ONBOARDING),{eventId:z.EventId.NATIVE_AI,elementName:t}},[e,i]),D=(0,W.v)(),L=(0,W.v)(),V=(0,s.useRef)(null),[G,B]=(0,s.useState)(I),Z=(0,s.useCallback)(e=>{e.value===I.value?B(I):B(m)},[B,I,m]),J=(0,H.d4)(j._D),ee=(0,H.d4)(U.m),et=(0,H.d4)(e=>!(0,$.ty)(e,"a11y_animations")),ea=(0,H.d4)(e=>(0,$.ty)(e,v.Dk)),en=(0,H.Z2)(eu.VH),er=(0,g.k)(),es=(0,s.useCallback)(e=>!(0,R.LI)(e)&&!(0,R.yz)(e),[]),{sidebarSectionsOrdered:el}=(0,E.Q)({getChannelSectionPref:er,orderedChannelSections:en,channelFilter:es}),ei=(0,H.d4)(M.ed),[eo,ec]=(0,s.useState)([]),[eg,eE]=(0,s.useState)(!1),eC=+!!i,[ey,ev]=(0,s.useState)(eC),ek=(0,s.useRef)(),{isRecommendedChannelsLoading:eS,recommendedChannelIds:eI,fetchRecommendedChannels:eN}=(0,q.U)();(0,d.A)(()=>{!e||t&&t.length>0||eN({reason:"digest-recommender-modal"}).then(e=>{ek.current=e.requestId})});let ew=(0,s.useCallback)(e=>{let{value:t}=e;return s.createElement(f.A,{id:t})},[]),eT=(0,s.useCallback)(()=>!1,[]),eM=(0,s.useCallback)(async e=>e.filter(e=>!eo.includes(e.value)&&!t?.includes(e.value)),[eo,t]),eR=(0,s.useCallback)(()=>ex.t("No results"),[]),eO=(0,s.useMemo)(()=>({entities:{channels:{includeArchived:!1,onlyIfMember:!0}},sort:{frecency:!0,preferChannelMembers:!0,preferChannelsUserBelongsTo:!0},allowEmptyQuery:!1}),[]),eP=(0,s.useCallback)(()=>{let e={};return t?.forEach(t=>{e[t]={isRecapped:!0,isMuted:!0}}),e},[t]),[eD,eL]=(0,s.useState)(eP()),eU=(0,s.useCallback)(e=>{ec([e.value,...eo]),eL({...eD,[e.value]:{isRecapped:!0,isMuted:!!ea}})},[eo,eD,ea]);(0,s.useEffect)(()=>{V.current?.scrollToOffset(0)},[eo,ey,G]);let eH=(0,s.useMemo)(()=>Object.values(eD).filter(e=>e.isRecapped).length,[eD]),eF=(0,s.useMemo)(()=>Object.values(eD).length,[eD]);(0,s.useEffect)(()=>{i&&eL(Object.fromEntries(Object.keys(J).filter(e=>J[e]).map(e=>[e,{isRecapped:!0,isMuted:!!ee?.[e]}])))},[i,J,ee]);let eV=(0,s.useMemo)(()=>Object.keys(eD).filter(e=>eD[e].isRecapped),[eD]),eG=(0,s.useMemo)(()=>eV.filter(e=>eD[e]?.isMuted),[eV,eD]),eB=(0,s.useMemo)(()=>({0:{id:0,title:ex.t("Choose channels"),subtitle:0===ey?ex.t("Tell Slack AI what to recap"):ex.t("{numChannels, plural, =1 {# Channel} other {# Channels}} added",{numChannels:eH}),modalTitle:ex.t("Choose channels for your recap"),modalSubtitle:ex.rt("<strong>Tip:</strong> We recommend adding ones you like to keep tabs on but aren\u2019t active in, because those tend to be okay to catch up on once a day."),img:e_,stepCompleted:0!==ey},1:{id:1,title:ex.t("Mute"),subtitle:ex.t("Declutter your sidebar"),modalTitle:ex.t("Mute channels for a quieter sidebar"),modalSubtitle:ex.t("Muting recapped channels keeps them gray and unbolded in your sidebar, so they\u2019re less distracting. They still get a badge if you\u2019re mentioned."),img:eb}}),[ey,eH]),eq=e&&1===ey,eW=e&&0===ey,eK=(0,s.useCallback)(e=>{let t=!(eD[e]?.isRecapped??J[e]);if(J[e]||!1!==t)eL({...eD,[e]:{...eD[e],isRecapped:t,...!0===t?{isMuted:!0}:{}}});else{let{[e]:t,...a}=eD;eL(a)}},[J,eD]),ez=(0,s.useCallback)(e=>{"Enter"===e.key&&(e.preventDefault(),e.id&&eK(e.id))},[eK]);(0,s.useEffect)(()=>{eI&&eI.length>0&&e&&eL(e=>{let t={...e};return eI.forEach(e=>{if(!t[e]){let a=!!J[e]&&!!ee?.[e];t[e]={isRecapped:!0,isMuted:a}}}),t})},[eI,ea,e,J,ee]);let e$=(0,s.useCallback)(()=>{let e={};Object.keys(eD).forEach(t=>{e[t]={...eD[t],isMuted:0===eG.length}}),eL(e)},[eD,eG.length]),eY=(0,s.useCallback)(()=>{eq&&eG?.length!==0?D.openSpeedBump({onCancel:()=>{w((0,eh.O)()),r?.()},onContinue:()=>{e$(),D.closeSpeedBump()}}):(w((0,eh.O)()),r?.())},[eq,eG?.length,r,w,e$,D]),ej=(0,s.useCallback)((e,t)=>{eL({...eD,[e]:{...eD[e],isMuted:t}})},[eD]),eX=(0,s.useMemo)(()=>[{type:0,id:"preview-section-header",name:ex.t("Your Channels")},...eV.map(e=>({type:1,channelId:e,id:e}))],[eV]),eQ=(0,s.useMemo)(()=>{let a=[];return eo.forEach(e=>{a.push({type:1,id:`manual-add-${e}`,channelId:e})}),e||G.value===m.value?((t?.length||eS||eI?.length)&&a.push({type:0,id:"preview-section-header",name:ex.t("Suggested channels")}),t&&t.length>0?t.forEach(e=>{a.push({type:1,id:`suggested-${e}`,channelId:e})}):eS?Array(q._).fill(null).forEach((e,t)=>{a.push({type:2,id:`recommended-loading-${t}`})}):eI?.forEach(e=>{a.push({type:1,id:`recommended-${e}`,channelId:e})}),el.forEach(e=>{let t=e.channelsAssociatedOrdered.filter(e=>!(eI?.includes(e)||ei.includes(e)));if(0===t.length)return;let n=e.channelSection.name;e.channelSection.type===ep.VZ.Stars&&(n=ex.t("Starred")),a.push({type:0,id:e.channelSection.id,name:n,emoji:e.channelSection.emoji}),t.forEach(e=>{a.push({type:1,id:e,channelId:e})})})):Object.entries(J).forEach(([e,t])=>{t&&!eo.includes(e)&&a.push({type:1,id:e,channelId:e})}),a},[eo,e,G.value,m.value,t,eS,eI,el,ei,J]),eZ=(0,s.useMemo)(()=>eQ.filter(e=>eD[e.channelId??""]?.isRecapped??J[e.channelId??""]??!1).length,[eQ,eD,J]),eJ=(0,s.useCallback)(e=>"preview-section-header"===e.id&&eq?s.createElement(u.A,{onClick:e$,"data-qa":`recap_manage_channels_${0===eG.length?"mute":"unmute"}_all_toggle_button`},0===eG.length?ex.t("Mute All"):ex.t("Unmute All")):null,[eq,eG.length,e$]),renderFooterLink=()=>s.createElement(y.A,{className:"display_flex align_items_center",articleId:0xc2f1229,forceOpenInBrowser:!0},s.createElement(_.Ah,{name:"help",size:"16"}),s.createElement("span",{className:"margin_left_25"},ex.t("Learn about muting")));renderFooterLink.displayName="renderFooterLink";let e0=(0,s.useCallback)(()=>eq||eW?s.createElement(x.u,{className:"p-recap_manage_channels_modal__searcher",selectId:"recap-manage-channels-search-select",width:"100%",placeholderText:ex.t("Search by channel name"),searcherOptions:eO,renderOption:ew,inputIcon:"search",onOptionSelected:eU,showDropdownIcon:!1,shouldOptionBeSelected:eT,processOptions:eM,emptyStateMessage:eR,expandOnClick:!1,focusOnMount:!0,expandOnFocus:!1}):s.createElement("div",{className:"p-recap_manage_channels_modal__searcher"},s.createElement("div",{className:"p-recap_manage_channels_modal_searcher_title"},ex.t("{numChannels, plural, =1 {# selected channel} other {# selected channels}} ",{numChannels:eZ})),s.createElement(x.u,{selectId:"recap-manage-channels-search-select",placeholderText:ex.t("Search by name"),searcherOptions:eO,renderOption:ew,inputIcon:"search",width:"190px",onOptionSelected:eU,showDropdownIcon:!1,shouldOptionBeSelected:eT,processOptions:eM,emptyStateMessage:eR,expandOnClick:!1,focusOnMount:!0,size:"small",expandOnFocus:!1}),s.createElement(h.Ay,{options:N,selectedOption:G,ariaLabel:ex.t("Please select a filter"),selectId:"channel-list-filter",width:"182px",size:"small",onOptionSelected:Z})),[eq,eW,eZ,eO,ew,eU,eT,eM,eR,N,G,Z]),e1=(0,s.useCallback)(t=>{let a=eQ[t];return(eq&&(a=eX[t]),0===a.type)?s.createElement("div",{className:o()("p-recap_manage_channels_modal__list_section_name",{"p-recap_manage_channels_modal__list_section_name--not_first":t>0,"p-recap_manage_channels_modal__list_section_name--unmute-all":eq})},a.emoji&&s.createElement(C.Ay,{emojiSize:C.lw.SMALL,text:a.emoji,className:"margin_right_50"}),s.createElement("span",null,a.name),"preview-section-header"===a.id&&(0===ey||!e)&&s.createElement(b.Ay,{tip:ex.t("Includes channels you visit often but don\u2019t tend to send messages in")},s.createElement("span",{className:"padding_left_25"},s.createElement(_.Ah,{name:"help",size:"16"}))),eJ(a)):1===a.type&&a.channelId?s.createElement(RecapChannelManagementEntity,{key:a.id,channelId:a.channelId,isRecapped:eq||(eD[a.channelId]?.isRecapped??J[a.channelId]??!1),first:0===t,last:t===eQ.length-1,hideCheckBox:eq,showAsUnselected:eq,isMutedOverride:eD[a.channelId]?.isMuted,onRecapToggled:eK,onMuteToggled:ej,hideMuteToggle:e&&1!==ey}):2===a.type?s.createElement(RecapChannelManagementLoadingEntity,null):null},[eQ,eq,eX,ey,eJ,eD,J,eK,ej,e]),e2=(0,s.useCallback)(()=>{ev(0)},[ev]),e4=(0,s.useCallback)(async()=>{eE(!0),T&&(w((0,Y.wX)(null)),w((0,X.t)())),await w((0,Q.y)({modifiedChannels:eD,previewChannelIds:t,recommendedChannelIds:eI,isOnboardingMode:!i&&e,recommendRequestId:ek.current})),n?.(),eE(!1)},[T,w,eD,t,eI,i,e,n]),e5=(0,s.useCallback)(()=>{L.openSpeedBump({onCancel:()=>{L.closeSpeedBump()},onContinue:async()=>{eE(!0);try{await w(ed())}finally{eE(!1),w((0,eh.O)())}}})},[w,L]),e8=(0,s.useMemo)(()=>e?eB[ey]?.modalTitle:ex.t("Manage recap"),[e,eB,ey]),e6=ex.t("Save"),e3=ex.t("Back");if(e&&(e6=a?ex.t("Update Next Recap"):ex.t("Add {numChannels, plural, =0 {Channels} =1 {# Channel} other {# Channels}}",{numChannels:eH})),eq){let e=eG?.length;e6=0===e?ex.t("Continue Without Muting"):ex.t("Mute {numChannels, plural, =1 {# Channel} other {# Channels}} ",{numChannels:e})}let e9=ex.t("Stop receiving recaps"),e7=(0,s.useMemo)(()=>i?renderFooterLink():s.createElement(u.A,{onClick:e5},e9),[i,e5,e9]),te=ex.t("Include channels in Recap"),tt=eq?eX:eQ,ta=(0,H.Z2)(e=>{let t={};for(let a of tt)if(1===a.type&&a.channelId){let n=(0,F.OL)(e,a.channelId);t[a.channelId]=(0,O.SB)(e,n,{publicChannelIncludeHashSign:!1,imIncludeAtSign:!1})}return t}),tn=(0,s.useCallback)(({index:e})=>{let t=tt[e];if(t?.type!==1||!t.channelId)return;let a=ta[t.channelId]||"",n=eq||(eD[t.channelId]?.isRecapped??J[t.channelId]??!1),r=eD[t.channelId]?.isMuted??!1;return{"aria-label":ex.t("{channelName}, {isChannelSelected}, {isChannelMuted}",{channelName:a,isChannelSelected:n?"selected":"not selected",isChannelMuted:r?"muted":"not muted"})}},[tt,ta,eq,eD,J]);return s.createElement(K.dW,{closeModal:eY,autoClogProps:P,showCloseButton:!0,centered:!0,className:o()("p-recap_manage_channels_modal",{"p-recap_manage_channels_modal--no-animation":et,"p-recap_manage_channels_modal--with-sidebar":e})},s.createElement("div",{className:o()("p-recap_manage_channels_modal__body",{"p-recap_manage_channels_modal__body--non_onboarding":!e})},s.createElement(K.rQ,{className:"p-recap_manage_channels_modal__header"},s.createElement(K.Rc,{className:"p-recap_manage_channels_modal__title",title:e8,subtitle:e?eB[ey]?.modalSubtitle:void 0}),!e&&e&&s.createElement("p",null,ex.t("We recommend channels you like to keep tabs on, but aren\u2019t active in. They\u2019ll be muted when you add them, but you can unmute anytime.")),eW||!e?e0():null),s.createElement(K.$m,{className:"p-recap_manage_channels_modal__content"},s.createElement(K.qf,{className:"p-recap_manage_channels_modal__content_section"},s.createElement(c.A,{className:"p-recap_manage_channels_modal__list"},({width:e,height:t})=>s.createElement(A.A,{width:e,height:t,keys:eq?eX.map(e=>e.id):eQ.map(e=>e.id),rowRenderer:e1,getPropsForItem:tn,animateOnScroll:!1,ref:V,onItemKeyDown:ez,"aria-label":te})))),s.createElement(K.jl,{className:"p-recap_manage_channels_modal__footer"},e7,s.createElement(K.ox,{className:"display_flex"},!i&&eq&&s.createElement(p.Ay,{type:"outline",onClick:e2,"data-qa":"recap_manage_channels_back_button"},e3),s.createElement(p.lV,{type:"primary",onClick:e4,loading:eg,autoClogProps:eq?ef:eA,disabled:0===eF,"data-qa":"recap_manage_channels_submit_button","aria-label":e6},e6)))),D.speedBumpState.isVisible&&s.createElement(K.ty,{"data-qa":"recap_manage_channels_speedbump",heading:ex.t("Not sure about muting?"),description:ex.t("You can always skip muting for now and make changes later."),continueButtonLabel:ex.t("Unmute All"),continueButtonType:"primary",cancelButtonLabel:ex.t("Exit Setup"),onContinue:D.speedBumpState.onContinue,onCancel:D.speedBumpState.onCancel}),L.speedBumpState.isVisible&&s.createElement(K.ty,{heading:ex.t("Stop receiving recaps?"),description:ex.t("Your suggested channels will no longer be automatically summarized. You can start receiving recaps again anytime."),continueButtonLabel:ex.t("Stop Recaps"),continueButtonType:"danger",cancelButtonLabel:ex.t("Cancel"),onContinue:L.speedBumpState.onContinue,onCancel:L.speedBumpState.onCancel}))};RecapManageChannelsModal.displayName="RecapManageChannelsModal";var eC=a(0x46dbff89);let ey=(0,en.Ay)("Open the digest channel recommender modal",(e,t,a)=>{e((0,eC.q)({element:s.createElement(RecapManageChannelsModal,{previewChannelIds:a?.previewChannelIds,isOnboardingMode:a?.forceOnboardingMode||!!a?.previewChannelIds,onCloseModal:a?.onCloseModal,onSaveChanges:a?.onSaveChanges,isOpenedFromMutingEducationBanner:a?.isOpenedFromMutingEducationBanner})}))});ey.meta={name:"openDigestRecommenderModal",key:"createThunkOpenDigestRecommenderModal",description:"Open the digest channel recommender modal"}},0x11b7023b5:(e,t,a)=>{"use strict";a.d(t,{U:()=>useRecommendedChannelsFetcher,_:()=>d});var n=a(0xbad225b5),r=a(0x16cf1da63),s=a(0x1a39b25c),l=a(0x226892387),i=a(0x1400f598e),o=a(0x365a4cc3),c=a(0x19c76d181);let d=7;function useRecommendedChannelsFetcher(){let e=(0,r.wA)(),[t,a]=(0,n.useState)(!1),m=(0,l.d4)(c.WR);return{isRecommendedChannelsLoading:t,recommendedChannelIds:(0,l.d4)(o.Xh)??void 0,fetchRecommendedChannels:(0,n.useCallback)(async({reason:t="ai-recap-onboarding"}={})=>{let n;a(!0);try{n=await e((0,s.Q)({reason:t,source:"ai-recap-onboarding-channels",limit:d,query:[m]}))}finally{a(!1)}if(n.ok){let t=n.channelIds.slice(0,d);e((0,i.v7)(t))}return n},[m,e])}}},0xd5dccb9e:(e,t,a)=>{"use strict";a.d(t,{A:()=>k});var n=a(0xbad225b5),r=a(0x16cf1da63),s=a(0x1075d3a9c),l=a.n(s),i=a(0x40c0d834),o=a(0x13776886e),c=a(0x20482ad21),d=a(0x2503b7c1),m=a(0x5eedb646),p=a(0x1ec69ee01),u=a(0x20e80190e),h=a(0x3711e82d),_=a(0x6960d8b9),b=a(0x57d5a5b5),A=a(0x226892387),f=a(0x1e3eb45fd),x=a(0x365a4cc3),g=a(0x54b5fc4b),E=a(0x1f48e3aa4),C=a(0x217553e42),y=a(0x1fcbb004d);let v=new c.Ay("assistant"),AiSummaryHeaderMenuDateModal=({channelId:e,navigateToMainTab:t})=>{let a,s=(0,n.useRef)(),c=(0,r.wA)(),k=(0,A.d4)(f.Jd),S=(0,A.d4)(t=>(0,x.JU)(t,{channelId:e})),I=(0,b.FM)(new Date,b.DX),N=(0,A.d4)(t=>(0,C.OL)(t,e)),w=(0,p.B9)(N),T=(0,o.A)(w,"{date_num}"),M=(0,n.useCallback)(e=>{s.current=e},[]),R=(0,n.useCallback)(()=>c((0,y.O)()),[c]),O=(0,n.useCallback)(({selectedEndDate:a,selectedStartDate:n})=>{let r=`${l()(n).unix()}.000000`,i=`${l()(a).endOf("day").unix()}.000000`;s.current?.({elementName:m.H.SUMMARY_CHANNEL_HEADER_MENU_CUSTOM_SAVE_BUTTON,action:h.UiAction.CLICK,nativeAiChannelSummaryStartTs:r,nativeAiChannelSummaryEndTs:i}),c((0,g.i)({channelId:e,type:E.Tj.Channel,subtype:E.KY.CustomRange,startTs:r,endTs:i,navigateToMainTab:t,entryPoint:E.lZ.CustomDateModal})),R()},[e,c,R,t]);return k?n.createElement(u.dW,{closeModal:R,maxWidth:672},n.createElement(u.rQ,null,n.createElement(u.Rc,{title:v.t("Summarize custom date range")})),n.createElement(u.$m,null,n.createElement(u.qf,{className:"p-ai_summary_header_menu_date_modal__content"},n.createElement(i.A,{eventId:h.EventId.NATIVE_AI,nativeAiSummaryType:E.Tj.Channel,nativeAiSummaryChannelId:e,nativeAiSummarySubtype:E.KY.CustomRange,elementName:m.H.SUMMARY_CHANNEL_HEADER_MENU_CUSTOM_DATE_RANGE_PICKER,trackClogRef:M,clogImpression:!0,...S},n.createElement(d.Ur,{className:"p-ai_summary_header_menu_date_modal","aria-label":v.t("Custom channel summary date range picker"),dateFormat:b.DX,displayFormat:b.DX,useRealInputs:!0,renderCalendarInPopover:!1,showPreviousMonth:!0,focusOnMount:!0,startInputPlaceholder:v.t("Start date (ex. {dateExample})",{dateExample:I}),endInputPlaceholder:v.t("End date (ex. {dateExample})",{dateExample:I}),disableDatesBefore:(a=l()().subtract(1,"year"),(0,_.ez)(a.toDate(),l()(T).toDate(),{units:"year",useFractionalUnits:!0})>1?(0,o.A)(a,"{date_num}"):T),disableDatesAfter:I,onSave:O,buttonSize:"medium",showSaveCancelButtons:!0,disableSaveWhenNoDatesSelected:!0,saveButtonCopy:v.t("Summarize"),onCalendarClose:R}))))):null};AiSummaryHeaderMenuDateModal.displayName="AiSummaryHeaderMenuDateModal";let k=n.memo(AiSummaryHeaderMenuDateModal)},0x33442ada:(e,t,a)=>{"use strict";a.d(t,{A:()=>ef});var n=a(0xbad225b5),r=a(0x16cf1da63),s=a(0x120c268ad),l=a.n(s),i=a(0x1f022ebd9),o=a(0x20482ad21),c=a(0x344bb842),d=a(0x99233ecb),m=a(0x4c96e5d9),p=a(0x5eedb646),u=a(0x1789e94fa),h=a(0x3989021c),_=a(0x20648f540),b=a(0x21fda2db);let A=a.p+"slack-ai-channel-summaries-coachmark.dark@1x-80dd910.png",f=a.p+"slack-ai-channel-summaries-coachmark.dark@2x-040b064.png",x=a.p+"slack-ai-channel-summaries-coachmark.light@1x-1141d20.png",g=a.p+"slack-ai-channel-summaries-coachmark.light@2x-babfd4a.png",E={getAnimationLight:()=>a.e("lottie-slack-ai-channel-summaries-nux-light").then(a.t.bind(a,0x22c183fd2,23)),getAnimationDark:()=>a.e("lottie-slack-ai-channel-summaries-nux-dark").then(a.t.bind(a,0x1a2fc32e8,23)),height:"190px"},SlackAiChannelSummariesNuxCoachmarkHero=()=>n.createElement(b.h,{animationSet:E,staticDark1x:A,staticDark2x:f,staticLight1x:x,staticLight2x:g});SlackAiChannelSummariesNuxCoachmarkHero.displayName="SlackAiChannelSummariesNuxCoachmarkHero";var C=a(0x238955a0b),y=a(0x5e7c6650),v=a(0x20e80190e),k=a(0x3711e82d),S=a(0x226892387),I=a(0x1400f598e),N=a(0x1e3eb45fd),w=a(0x1ae45580b),T=a(0x365a4cc3),M=a(0x6d8ce6ed),R=a(0x1f48e3aa4),O=a(0x5b1935a6),P=a(0x1fcbb004d),D=a(0x46dbff89),L=a(0x1472af90a),U=a(0x18632f75a);let H=new o.Ay("assistant"),F={spaceName:O.xu.IN_PRODUCT_COACHMARK,notifications:{[O.ze.SLACK_AI_CHANNEL_SUMMARIES_COACHMARK]:{component:n.lazy(()=>Promise.resolve().then(a.bind(a,0x20648f540)))}}},SlackAiChannelSummariesNuxCoachmark=({children:e})=>{let t=(0,r.wA)(),a=(0,S.d4)(w.M),s=(0,S.d4)(y.Ew),l=(0,S.d4)(T.rV),i=(0,n.useCallback)(()=>{t((0,I.wX)(null)),t((0,M.t)())},[t]),o=l===R.MO.ChannelSummariesCoachmark,c=(0,S.d4)(N.Z2),{isOpen:d,closeCoachmark:m}=(0,h.A)(O.ze.SLACK_AI_CONTEXTUAL_SUMMARIES_COACHMARK,O.xu.IN_PRODUCT_COACHMARK),p=(0,S.d4)(T.eE),b=(0,n.useCallback)(()=>{d&&(m(),t((0,U.z)({component:L.G7.SlackAiNfxSummary,type:L.X8.Dismiss,reason:"slackAiInteractionsCounter"})))},[m,t,d]),A=(0,n.useCallback)(()=>{t((0,D.q)({element:n.createElement(v.dW,{className:"p-slack_ai_nux_coachmark__loading_modal"},n.createElement("div",null))})),t((0,I.wX)(R.MO.SearchAnswersCoachmark))},[t]);(0,n.useEffect)(()=>()=>{o&&setTimeout(()=>{t((0,P.O)())},1e3)},[t,o]);let f=k.UiStep.SLACK_AI_NUX_CHANNEL_SUMMARIES_COACHMARK,x=(0,n.useMemo)(()=>n.createElement(SlackAiChannelSummariesNuxCoachmarkHero,null),[]);return(d&&(f=k.UiStep.SLACK_AI_CONTEXTUAL_SUMMARIES_COACHMARK),c)?p?n.createElement(_.SlackAiChannelSummariesCoachmark,null,e):n.createElement(u.A,{...F,shouldAlwaysRenderChildren:!0},e):a?n.createElement(C.H,{isOpen:d||o,dismissCoachmark:d?b:i,titleText:H.t("Get caught up quickly"),bodyText:H.t("Summaries capture what\u2019s important in any thread, channel or DM, so you can jump right back in."),onClickPrimaryButton:o?A:void 0,primaryCallToActionText:H.t("Next"),stepNumber:o?1:void 0,totalStepCount:s?3:2,arrowCenterOnAnchor:!0,offsetX:-25,orientation:"bottom-left",clogUiStep:f,hero:x,useCustomOverlay:!d,cutoutTopBottomPadding:8,cutoutLeftRightPadding:16},e):e};SlackAiChannelSummariesNuxCoachmark.displayName="SlackAiChannelSummariesNuxCoachmark";var V=a(0xe1644a69),G=a(0xd5dccb9e),B=a(0xd843ab47),q=a(0x1c5cc37cc),W=a(0x54b5fc4b),K=a(0x8688a5a),z=a(0x579f81ad),$=a(0xc561af5),Y=a(0x8afe108f);let j=new o.Ay("assistant"),AiSummaryHeaderMenuItems=({menuProps:e,channelId:t,isMember:a,isDmOrMpdm:s})=>{let l=(0,n.useRef)(new q.A),[i,o]=(0,n.useState)(!1),c=(0,r.wA)(),m=(0,S.d4)(N.Jd),u=(0,S.d4)(N.hS),{getSiblingViewWithUiState:h}=(0,n.useContext)(B.A),_=(0,S.d4)(e=>(0,T.nh)(e,{channelId:t,getSiblingViewWithUiState:h})),b=(0,S.d4)(e=>(0,T.nc)(e,{channelId:t})),A=(0,S.d4)(e=>!!(0,T.fp)(e,{channelId:t})),f=(0,S.d4)(e=>{let a=(0,$.T_)(e,t);return a?.slices&&a?.reachedEnd});(0,n.useEffect)(()=>{f||i||(o(!0),c((0,Y.A)({channelId:t,historyRateLimiter:l.current,oldestTs:void 0,latestTs:void 0})))},[f,t,c,i]);let x=(0,S.d4)(e=>t?(0,T.Vy)(e,{channelId:t,type:R.Tj.Channel,subtype:R.KY.Week,unreadTs:_||void 0}):null),g=(0,S.d4)(e=>t?(0,T.Vy)(e,{channelId:t,type:R.Tj.Channel,subtype:R.KY.Unreads,unreadTs:_||void 0}):null),E=(0,n.useCallback)(()=>{c((0,D.q)({element:n.createElement(G.A,{channelId:t})}))},[t,c]),C=(0,n.useCallback)(e=>()=>{let a,n=!1;t&&(e===R.KY.Unreads&&(a=g),e===R.KY.Week&&(a=x),n=(0,T.r_)(a),a&&n?c((0,K.x)({aiSummaryId:a.id,openInPlace:!0})):c((0,W.i)({channelId:t,type:R.Tj.Channel,subtype:e,unreadTs:_||void 0,entryPoint:R.lZ.ChannelHeaderMenuButton})))},[t,c,x,g,_]),y=(0,S.d4)(e=>(0,T.JU)(e,{channelId:t})),v=(0,n.useMemo)(()=>({eventId:k.EventId.NATIVE_AI,onClick:{enableClogAction:!0},nativeAiSummaryChannelId:t,nativeAiSummaryType:R.Tj.Channel,...y}),[y,t]),I=(0,n.useMemo)(()=>({...v,elementName:p.H.SUMMARY_CHANNEL_HEADER_MENU_UNREADS,nativeAiOpenExistingSummary:(0,T.r_)(g),nativeAiSummarySubtype:R.KY.Unreads}),[g,v]),w=(0,n.useMemo)(()=>({...v,elementName:p.H.SUMMARY_CHANNEL_HEADER_MENU_WEEK,nativeAiOpenExistingSummary:(0,T.r_)(x),nativeAiSummarySubtype:R.KY.Week}),[x,v]),M=(0,n.useMemo)(()=>({...v,nativeAiSummarySubtype:R.KY.CustomRange,elementName:p.H.SUMMARY_CHANNEL_HEADER_MENU_CUSTOM}),[v]),O=(0,S.d4)(e=>(0,T.p2)(e,{channelId:t})),P=(0,n.useCallback)(()=>{c((0,z.O)({channelId:t,isDigested:!O}))},[c,t,O]),L=(0,n.useMemo)(()=>({...v,elementName:O?p.H.SUMMARY_CHANNEL_HEADER_MENU_DAILY_DIGEST_REMOVE:p.H.SUMMARY_CHANNEL_HEADER_MENU_DAILY_DIGEST_ADD,nativeAiSummaryType:R.Tj.Channel,nativeAiSummarySubtype:R.KY.Digest,channelId:t}),[v,O,t]);return m?n.createElement(d.Ay,{...e,"aria-label":j.t("Summarize\u2026")},n.createElement(d.c$,{label:j.t("Summarize\u2026")}),n.createElement(d.Dr,{onSelected:C(R.KY.Unreads),disabled:!_,label:j.t("Unreads"),autoClogProps:I,"data-qa":"ai_summary_summarize_channel_menu_unreads"}),n.createElement(d.Dr,{onSelected:C(R.KY.Week),disabled:!b,label:j.t("Last 7 days"),autoClogProps:w,"data-qa":"ai_summary_summarize_channel_menu_last_week"}),n.createElement(d.Dr,{label:j.t("Custom date range"),onSelected:E,disabled:!A,autoClogProps:M,"data-qa":"ai_summary_summarize_channel_menu_custom"}),u&&a&&!s&&n.createElement(n.Fragment,null,n.createElement(d.bX,null),n.createElement(d.Dr,{label:O?j.t("Remove from recap"):j.t("Add to recap"),onSelected:P,autoClogProps:L,danger:O,"data-qa":"ai_summary_summarize_channel_menu_digest"}))):null};AiSummaryHeaderMenuItems.displayName="AiSummaryHeaderMenuItems";let X=n.memo(AiSummaryHeaderMenuItems);var Q=a(0x1075d3a9c),Z=a.n(Q),J=a(0x1d01572a2),ee=a(0xebdd009e),et=a(0xf052d367),ea=a(0x19895585a);let en=L.G7.SlackAiNfxSummarizeButtonLabel;var er=a(0x3225bd5e),es=a(0x12185e091),el=a(0x114ffe897),ei=a(0xf6ed6f31),eo=a(0x1ccef1c6f),ec=a(0xbaaab71e),ed=a(0x11c82607b),em=a(0xafce781a);let ep=(0,ed.Ay)("Record AI summary interactions",async(e,t,{channelId:a},n)=>{if(await e((0,U.b)({interactions:[{component:L.G7.SlackAiNfxSummary,type:L.X8.Dismiss}],useCache:!0,cacheFilter:et.kI,reason:"useSlackAiInteractionsCounter"})),0===(0,et.ky)(t(),L.G7.SlackAiNfxSummary,L.X8.Dismiss)){let{getSiblingViewWithUiState:r}=n(ec.U);(0,T.nh)(t(),{channelId:a,getSiblingViewWithUiState:r,minimumUnreadCount:20})&&await e((0,em.u2)({event:{type:O.jo.SLACK_AI_NFX_ELIGIBLE_CHANNEL_OPENED}}))}});ep.meta={name:"maybeShowNfxContextualCoachmarks",key:"createThunkMaybeShowNfxContextualCoachmarks",description:"Record AI summary interactions"};var eu=a(0x217553e42),eh=a(0xaa15ef41),e_=a(0x7230bced),eb=a.n(e_);let eA=new o.Ay("assistant"),AiSummaryHeaderMenu=({channelId:e,experimentViewHeaderButtonPolishGroupOn:t})=>{let a=(0,r.wA)(),s=(0,S.d4)(N.Jd),o=(0,S.d4)(e=>!(0,eo.ty)(e,"a11y_animations")),u=(0,S.d4)(T.tl),h=(0,S.d4)(T.IR),_=(0,S.d4)(t=>(0,eu.OL)(t,e)),b=(0,ei.bl)(_),A=(0,S.d4)(eh.L),f=(0,es.JM)(_),{showButtonLabel:x,isButtonLabelDismissed:g}=(e=>{let t=(0,r.wA)(),a=(0,S.d4)(e=>!!(0,et.ky)(e,en,L.X8.Dismiss)),s=(0,S.d4)(e=>(0,et.ky)(e,en,L.X8.Click)),l=(0,S.d4)(e=>(0,et.kI)(e,en,L.X8.Impression)),i=(0,S.d4)(ee.Ul),{getSiblingView:o}=(0,n.useContext)(B.A),c=(0,S.d4)(e=>!!o(e,{container:ea.mq.Secondary})),d=s>=5,m=e&&!c||l&&!i&&!c&&!a;(0,J.A)(()=>{t((0,U.b)({interactions:[{component:en,type:L.X8.Dismiss},{component:en,type:L.X8.Click},{component:en,type:L.X8.Impression}],useCache:!0,cacheFilter:et.kI,reason:"slackAiNfxButtonLabelCounter"}))});let p=(0,S.d4)(e=>(0,et.ky)(e,en,L.X8.Impression)>0);(0,n.useEffect)(()=>{l&&!p&&t((0,U.z)({component:en,type:L.X8.Impression,reason:"slackAiNfxButtonLabelCounter"}))},[t,l,p]);let u=(0,S.d4)(e=>{if(!l||a)return!1;if(d)return!0;let t=(0,et.zU)(e,en,L.X8.Impression);return!!t&&Z()().diff(1e3*t,"days")>=7});return(0,n.useEffect)(()=>{u&&t((0,U.z)({component:en,type:L.X8.Dismiss,reason:"slackAiNfxButtonLabelCounter"}))},[t,u]),{showButtonLabel:m,isButtonLabelDismissed:a}})(!!u);(0,i.A)(()=>{if(u)return()=>{a((0,I.TB)())}},[u]),(0,n.useEffect)(()=>{let e;return h&&(e=setTimeout(()=>{a((0,I.m$)())},1e4)),()=>{clearTimeout(e)}});let E=(0,n.useRef)(h);(0,n.useEffect)(()=>{h&&(E.current=h)},[h]),(0,n.useEffect)(()=>{!h&&E.current&&a((0,I.TB)())},[h,a]),(0,n.useEffect)(()=>{a(ep({channelId:e}))},[a,e]);let C=(0,S.d4)(t=>(0,T.JU)(t,{channelId:e})),y=(0,n.useMemo)(()=>({eventId:k.EventId.NATIVE_AI,elementName:p.H.SUMMARY_CHANNEL_HEADER_MENU,onClick:{enableClogAction:!0},nativeAiSummaryChannelId:e,nativeAiSummaryType:R.Tj.Channel,...C}),[C,e]),v=(0,n.useCallback)(t=>n.createElement(X,{menuProps:t,channelId:e,isMember:b,isDmOrMpdm:f}),[e,b,f]),w=(0,n.useCallback)(()=>{u&&a((0,I.TB)()),g||a((0,U.z)({component:en,type:L.X8.Click,reason:"slackAiNfxButtonLabelCounter"}))},[a,g,u]),M=f?eA.t("Summarize DM"):eA.t("Summarize channel"),O=(0,n.useMemo)(()=>n.createElement(er.P,{tooltipTitle:M}),[M]),P=A?O:M;if(!s||(0,el.D)(_))return null;let D=n.createElement(d.cQ,{renderMenu:v,position:"bottom-right",offsetY:-5,offsetX:5,onOpen:w},n.createElement(m.Ay,{tip:P,position:"bottom",delay:m.PK},n.createElement(c.A,{"aria-label":M,autoClogProps:y,className:l()("p-ai_summary_header_menu__button",eb().viewHeaderActionButton,{"p-ai_summary_header_menu__button--highlight":u,"p-ai_summary_header_menu__button--pulse":u&&h&&!o,"p-ai_summary_header_menu__button--with-label":x,no_border:t}),"data-qa":"ai_summary_summarize_channel_menu_button"},n.createElement(V.o,{type:"summary",size:"20"}),x&&n.createElement("span",{className:"p-ai_summary_header_menu__button_label"},eA.t("Summarize")))));return n.createElement(SlackAiChannelSummariesNuxCoachmark,null,D)};AiSummaryHeaderMenu.displayName="AiSummaryHeaderMenu";let ef=n.memo(AiSummaryHeaderMenu)},0x21fdd4266:(e,t,a)=>{"use strict";a.d(t,{A:()=>I});var n=a(0xbad225b5),r=a(0x16cf1da63),s=a(0x20482ad21),l=a(0x99233ecb),i=a(0x139aa1a7),o=a(0x5eedb646),c=a(0xd5dccb9e),d=a(0xd843ab47),m=a(1927545e3),p=a(0x1ec69ee01),u=a(0x3711e82d),h=a(0x1c5cc37cc),_=a(0x226892387),b=a(0x1e3eb45fd),A=a(0x365a4cc3),f=a(0x54b5fc4b),x=a(0x8688a5a),g=a(0x1f48e3aa4),E=a(0xc561af5),C=a(0x8afe108f),y=a(0x217553e42),v=a(0x46dbff89),k=a(0x19895585a);let S=new s.Ay("assistant"),ChannelContextSummarizeSubmenu=({menuProps:e,channelId:t,isSidebar:a,isHeader:s,isDmTabItem:I})=>{let N=(0,n.useRef)(new h.A),w=(0,r.wA)(),T=(0,_.d4)(b.Jd),M=(0,_.d4)(e=>(0,y.OL)(e,t)),R=(0,p.KJ)(M),[O,P]=(0,n.useState)(!1),{getViewSet:D}=(0,n.useContext)(d.A),L=(0,_.d4)(e=>{if(a||s)return!1;let t=D(e)?.[k.mq.Primary];return t?.viewType===i.D.Page&&t.id===m.c.Unreads}),U=(0,_.d4)(e=>{let a=(0,E.T_)(e,t);return a?.slices&&a?.reachedEnd});(0,n.useEffect)(()=>{U||O||(P(!0),w((0,C.A)({channelId:t,historyRateLimiter:N.current,oldestTs:void 0,latestTs:void 0})))},[U,t,w,O]);let H=(0,_.d4)(e=>(0,A.nc)(e,{channelId:t})),F=(0,_.d4)(e=>(0,A.Vy)(e,{channelId:t,type:g.Tj.Channel,subtype:g.KY.Week})),V=!!F&&(F.status===g.nM.Complete||F.status===g.nM.InProgress)&&!F.error,G=(0,n.useCallback)(()=>{w((0,v.q)({element:n.createElement(c.A,{channelId:t,navigateToMainTab:!L})}))},[t,w,L]),B=(0,n.useCallback)(()=>{V?w((0,x.x)({aiSummaryId:F.id,openInPlace:L})):w((0,f.i)({channelId:t,type:g.Tj.Channel,subtype:g.KY.Week,navigateToMainTab:!L,entryPoint:g.lZ.ChannelContextSubmenu}))},[t,w,F,V,L]),q=(0,n.useCallback)(()=>{w((0,f.i)({channelId:t,type:g.Tj.Channel,subtype:g.KY.Unreads,navigateToMainTab:!L,entryPoint:g.lZ.ChannelContextSubmenu}))},[t,w,L]),W=(0,_.d4)(e=>(0,A.JU)(e,{channelId:t})),K=(0,n.useMemo)(()=>({eventId:u.EventId.NATIVE_AI,nativeAiSummaryChannelId:t,nativeAiSummaryType:g.Tj.Channel,...W}),[W,t]),z=(0,n.useMemo)(()=>({onClick:{enableClogAction:!0},elementName:I?o.H.SUMMARY_DM_TAB_ITEM_CONTEXT_MENU_UNREADS:o.H.SUMMARY_CHANNEL_CONTEXT_MENU_UNREADS,nativeAiSummarySubtype:g.KY.Unreads}),[I]),$=(0,n.useMemo)(()=>({elementName:I?o.H.SUMMARY_DM_TAB_ITEM_CONTEXT_MENU_WEEK:o.H.SUMMARY_CHANNEL_CONTEXT_MENU_WEEK,nativeAiOpenExistingSummary:V,nativeAiSummarySubtype:g.KY.Week}),[V,I]),Y=(0,n.useMemo)(()=>({nativeAiSummarySubtype:g.KY.CustomRange,elementName:I?o.H.SUMMARY_DM_TAB_ITEM_CONTEXT_MENU_CUSTOM:o.H.SUMMARY_CHANNEL_CONTEXT_MENU_CUSTOM}),[I]);return T?n.createElement(l.Ay,{...e,autoClogProps:K},n.createElement(l.Dr,{onSelected:q,disabled:!R,label:S.t("Unreads"),autoClogProps:z}),n.createElement(l.Dr,{onSelected:B,disabled:!H,label:S.t("Last 7 days"),autoClogProps:$}),n.createElement(l.Dr,{label:S.t("Custom date range"),onSelected:G,autoClogProps:Y})):null};ChannelContextSummarizeSubmenu.displayName="ChannelContextSummarizeSubmenu";let I=n.memo(ChannelContextSummarizeSubmenu)},0x3aa7a8c5:(e,t,a)=>{"use strict";a.d(t,{A:()=>g});var n=a(0xbad225b5),r=a(0x120c268ad),s=a.n(r),l=a(0x839ba347),i=a(0x106809bc6),o=a(0x20482ad21),c=a(0xb1ea448c),d=a(0x20d4ba6b9),m=a(0x118faaab2),p=a(0x21d6ed371),u=a(0x1b0a362c3),h=a(0x15c7516a2),_=a(0xd2efd513),b=a(0x105ecbbed),A=a(0x1e5196cdf),f=a.n(A);let x=new o.Ay("threads"),LoadOlderMessage=({minimumVisibleTs:e="",rootMsg:t,messages:a,theme:r="light",currentDragTarget:o,isLoading:A=!1,dataQa:g="load_older_message",isMessagingMaxWidthEnabled:E=!1})=>{let C=[],y=(0,h.j)(t),v=(0,p.M$)(t)||"";(0,l.A)(a||{},(e,t)=>{(0,p.aw)(e)||(0,_.A)(e)||t===y||!(t<=v)||C.push(t)});let k=(0,p.UV)(t)-C.length,S=C.filter(t=>t<e),I=(0,i.A)(k+S.length,0,m.p);if(!I)return null;let N=s()(f().loadOlderMessages,{"p-threads_view_load_older_message--with-gutter":"dense"===r,[f().loadMessagesMaxWidth]:E}),w=x.t("Loading more replies");return n.createElement(d.A,{isMessagingMaxWidthEnabled:E,threadKey:(0,b.Iu)((0,p.WY)(t),(0,u.L)(t)),currentDragTarget:o},n.createElement("div",{className:N,"data-qa":g},x.t("Show {showPrevCount, plural, =1 {# more reply} other {# more replies}}",{showPrevCount:I}),A?n.createElement(c.A,{size:"medium",className:"margin_left_25",inline:!0,loadingMessage:w}):null))};LoadOlderMessage.displayName="LoadOlderMessage";let g=LoadOlderMessage},0x118faaab2:(e,t,a)=>{"use strict";a.d(t,{E:()=>r,p:()=>n});let n=100,r=8},0xe8ebac0:(e,t,a)=>{"use strict";a.d(t,{Ay:()=>w,Sb:()=>N,ks:()=>I});var n,r=a(0x44f8fc76),s=a(0x130c2e810),l=a(0x23a67ace),i=a(0x96de2457),o=a(0x8ed587af),c=a(0x10027d8bc),d=a(0x4c6fcfc3),m=a(0x6f213e53),p=a(0x114ffe897),u=a(0xf6ed6f31),h=a(0xebdd009e),_=a(0x190a9df19),b=a(0x1bc4b3ad8),A=a(0x20c81ddcb),f=a(0x1e3eb45fd),x=a(0x21bfacd01),g=a(0x217553e42),E=a(0x14149c126),C=a(0xe684f705),y=a(0x18a17ca8f),v=a(0x1cc3e0618),k=a(0x19895585a),S=a(0x1731631dc),I=((n={}).AvatarStack="avatar_stack",n.InviteCta="invite_cta",n.ShareQuip="share_quip",n.QuipDivider="quip_divider",n.CloseTile="close_tile",n.Call="call",n.RefreshAllUnreads="refresh_all_unreads",n.Huddle="huddle",n.Notifications="notifications",n.SummarizeChannel="summarize_channel",n.Search="search",n.NewAgentConversation="new_agent_conversation",n.AgentSplitConversation="agent_split_conversation",n.NewAssistantConversation="new_assistant_conversation",n.AiTemplateBuilder="ai_template_builder",n.MultiView="multi_view",n.Tasks="tasks",n.NewSlackbotConversation="new_slackbot_conversation",n);let N=(0,b.F)((e,{id:t})=>(0,d.A)(e,t),e=>(0,y.s_)(e),e=>(0,_.$G)(e),e=>(0,v.Fo)(e),e=>(0,v.$f)(e),e=>(0,C.on)(e),e=>(0,C.cA)(e)?.first_login,(e,t,a,n,r,s,l)=>e===d.q.Channel&&!!t&&(n&&!(void 0!==l&&l>=0x69950100)&&r?s<=4:a&&s<4)),w=(0,b.F)((e,{id:t})=>(0,d.A)(e,t),(e,{id:t})=>(0,m.F)((0,g.OL)(e,t)),(e,{id:t})=>(0,r.Xk)(e,(0,g.OL)(e,t)),(e,{id:t})=>(0,h.Bn)(e,(0,g.OL)(e,t)),e=>(0,r.vf)(e),e=>(0,f.Jd)(e),(e,{id:t})=>(0,l.oO)(e)&&(0,s.Hm)(e,t),(e,{id:t})=>(0,i.c_)(e)&&(0,A.vM)(e,t),e=>(0,o.k8)(e),e=>(0,x.V)(e),e=>(0,S.yX)(e),(e,t)=>N(e,t),(e,{id:t})=>(0,c.gT)(e)&&(0,c.Dj)(e)&&(0,p.D)((0,g.OL)(e,t)),(e,{id:t})=>(0,u.bl)((0,g.OL)(e,t)),(e,{isChildWindow:t})=>t,(e,{viewContainer:t})=>t,e=>"on"===(0,E._Z)(e,"view_header_button_polish"),(e,t,a,n,r,s,l,i,o,c,m,p,u,h,_,b,A)=>{let f=[];return e===d.q.Unknown?[]:(p||e!==d.q.Channel&&e!==d.q.MPDM||t||f.push("avatar_stack"),p&&f.push("invite_cta"),n&&f.push("huddle"),l&&A&&f.push("new_agent_conversation"),i&&A&&f.push("new_assistant_conversation"),u&&A&&f.push("new_slackbot_conversation"),(e===d.q.Channel&&h||e===d.q.MPDM||e===d.q.DM||e===d.q.App)&&f.push("notifications"),e===d.q.Tasks&&f.push("tasks"),a&&r&&!n&&f.push("call"),l&&!A&&f.push("new_agent_conversation"),i&&!A&&f.push("new_assistant_conversation"),c||_&&!m||b===k.mq.Split||l||i||e!==d.q.Channel&&e!==d.q.MPDM&&e!==d.q.DM&&e!==d.q.App||f.push("multi_view"),s&&(e===d.q.Channel||e===d.q.MPDM||e===d.q.DM)&&f.push("summarize_channel"),u&&!A&&f.push("new_slackbot_conversation"),o&&(e===d.q.Channel||e===d.q.DM||e===d.q.MPDM)&&f.push("search"),"quip_divider"===f[f.length-1]&&f.pop(),f)})},0x8e94e52f:(e,t,a)=>{"use strict";a.d(t,{A:()=>s9});var n=a(0xbad225b5),r=a(0x120c268ad),s=a.n(r),l=a(0x40c0d834),i=a(0x20482ad21),o=a(0x344bb842),c=a(0xbe505324),d=a(0x4c96e5d9),m=a(0xb041cb4d),p=a(0x24248d4e9),u=a(0x139aa1a7),h=a(0x129702595),_=a(0x130c2e810),b=a(0x1701a737a),A=a(0x18def662b),f=a(0xbc05fc30),x=a(0x2162c8d08),g=a(0x16cf1da63),E=a(0x12185e091),C=a(0xa7600044),y=a(0x226892387),v=a(0x1e3eb45fd),k=a(0x217553e42);let S=new i.Ay("assistant"),EditTopicLabelButton=({channelId:e})=>{let t=(0,g.wA)(),a=(0,y.d4)(v.d2),r=(0,y.d4)(t=>(0,k.OL)(t,e)),s=(0,E.yz)(r),l=(0,n.useCallback)(()=>{t((0,C.A)({channelId:e}))},[e,t]),i=(0,n.useMemo)(()=>({name:"edit"}),[]);if(!a||!s)return null;let c=S.t("Edit topic label");return n.createElement(d.Ay,{position:"top",tip:c},n.createElement(o.A,{svgIconProps:i,"aria-label":c,size:"x-small",onClick:l,className:"margin_right_50"}))};EditTopicLabelButton.displayName="EditTopicLabelButton";var I=a(0x1fd3f6e20),N=a(0x11bca15f5),w=a.n(N);let T=new i.Ay("slackbot-ai");function SlackbotAiPreviewBadge(){return n.createElement("div",{className:w().badge},n.createElement(I.v,{style:I.u.Informative},T.t("Preview")))}SlackbotAiPreviewBadge.displayName="SlackbotAiPreviewBadge";var M=a(0xab14083d),R=a(0x188325880),O=a(0xe8ebac0),P=a(0x4c6fcfc3),D=a(0x1c8650194),L=a(0xc8b3fd9b),U=a(0x62a17882),H=a(0x14fad6485),F=a(0x88a463e7),V=a(0xd6a16321),G=a(0x6d72337),B=a(0x216a87ae3),q=a(0x3d75f87c),W=a(0x1ed65ccda),K=a(0x19895585a);let AgentHomeMultiViewMenuButton=({channelId:e,multiViewMenuClogProps:t,multiViewMenuClassName:a})=>{let r=(0,g.wA)(),{windowId:s}=(0,n.useContext)(H._0),l=(0,y.d4)(t=>(0,B.Q6)(t,e,!1,s)),i=(0,n.useCallback)(()=>{r((0,W.T)({channelId:e,isSplitView:!0,threadTs:l}))},[l,e,r]),o=(0,n.useCallback)(async()=>{await r((0,G.Bb)({viewSet:{[K.mq.Primary]:{id:e,viewType:u.D.AppSpace}},shouldShowSearch:!1})),r((0,q.L)({channelId:e,threadTs:l}))},[l,e,r]);return n.createElement(F.c,{navProps:(0,V.bH)(e,{threadTs:l}),autoClogProps:t,className:a,onSplitViewClick:i,onNewWindowClick:o})};AgentHomeMultiViewMenuButton.displayName="AgentHomeMultiViewMenuButton";var z=a(0x188f4457c),$=a(0x1774bc1e8),Y=a(0x1d8931caf),j=a(0x100c31b19),X=a(0x96de2457),Q=a(0x15b0ab821),Z=a(0xf91e43cd),J=a(0x1789e94fa),ee=a(0x1562fc439),et=a(0x5b1935a6);let ea=n.lazy(()=>Promise.resolve().then(a.bind(a,0x10b067691)).then(e=>({default:e.CreatorGuidedSetupInvitationCoachmark}))),en={spaceName:et.xu.IN_PRODUCT_COACHMARK,notifications:{[et.ze.CREATOR_GUIDED_SETUP_INVITATION_COACHMARK]:{component:ea}}};var er=a(0x2a101827),es=a(0x33442ada),el=a(0x1c760ba43),ei=a(0x1a02c72b5),eo=a(0x14149c126),ec=a(0xeb4f1a4d),ed=a(0x862076b9),em=a.n(ed);let ep=new i.Ay("assistant"),SlackbotAiNewChatButton=({channelId:e})=>{let t=(0,g.wA)(),a=(0,y.d4)(e=>"on"===(0,eo._Z)(e,"view_header_button_polish")),r=(0,n.useCallback)(()=>{t((0,ec.xM)({channelId:e,threadTs:null})),t((0,ei.o)((0,V.id)(e,{tabId:el.fY.SlackbotAiConversation})))},[e,t]),l=a?ep.t("New"):ep.t("New message",{fallbackHash:"1ed2e7b50fa1dbbf1693d1c38adf270c04db10c6",fallbackHashNs:"client"});return n.createElement(d.Ay,{position:"bottom",tip:l},n.createElement(o.A,{"aria-label":l,onClick:r,className:s()(em().button,{[em().buttonPolish]:a}),svgIconProps:{name:"compose",size:"20"}}))};SlackbotAiNewChatButton.displayName="SlackbotAiNewChatButton";var eu=a(0xb90de824),eh=a(0x13953efe6),e_=a(0x245208d6a),eb=a(0xfbede66),eA=a(0x172dd1bf5);let ef=a.p+"huddles_static-aef6d1b.png";var ex=a(0x243e10ead),eg=a(0xd843ab47),eE=a(0x3711e82d),eC=a(0x1ccef1c6f),ey=a(0x475fe7d6),ev=a(0x1b02505ff),ek=a(0x113d1778),eS=a(0x18a17ca8f),eI=a(0x1de0eefdb),eN=a(0x48d992ab),ew=a.n(eN);let eT=new i.Ay("solutions_onboarding"),eM=s()("p-solutions_onboarding_huddles_coachmark",ew().container),eR={elementName:"solutions_onboarding_huddles_coachmark",elementType:eE.ElementType.COACHMARK,eventId:eE.EventId.NEWXP_TEAM_CREATE},isSolutionsType=e=>e===ex.L3,SolutionsOnboardingHuddlesCoachmark=({children:e})=>{let[t,r]=(0,n.useState)(!1),l=(0,g.wA)(),{getPrimaryView:i}=(0,n.useContext)(eg.A),{onAfterOpen:o}=(0,eb.j)({className:eM,highlightPadding:{left:-6,right:6,top:6,bottom:6},backgroundClassName:ew().overlay}),{clogDismissFromOverlay:c}=(0,e_.V)(eM,eR),d=(0,y.d4)(e=>(0,eC.ty)(e,"a11y_animations")),m=(0,y.d4)(e=>i(e)?.id),p=(0,y.d4)(eI.BX),u=(0,y.d4)(eS.kT),h=(0,y.d4)(e=>{let t=(0,eC.ty)(e,ex.u5)??"",a=t.length?t.split("|").filter(isSolutionsType):[];return a?.includes(ex.L3)}),_=(0,n.useCallback)(()=>a.e("lottie-huddles.json").then(a.t.bind(a,0x207bdcb8a,23)),[]),b=(0,n.useMemo)(()=>n.createElement("div",{className:s()(ew().hero,ew().borderRadius,{"padding_right_125 padding_left_125 padding_top_125":d,[ew().heroAnimated]:d,[ew().heroStatic]:!d})},d?n.createElement(eA.e,{autoplay:!0,getAnimationImport:_,loop:!0,svgClassName:s()(ew().hero,ew().heroAnimated,ew().borderRadius)}):n.createElement("img",{alt:"","aria-hidden":!0,"data-qa":"solutions_onboarding_huddles_coachmark_static_img",src:ef,className:s()(ew().hero,ew().heroStatic,ew().borderRadius)})),[d,_]),A=(0,n.useCallback)(e=>{c(e),l((0,ek.W3)(!1)),r(!1)},[c,l]),f=(0,n.useCallback)(()=>{l((0,ey.A)({channelId:m,entryPoint:ev.su.SOLUTIONS_ONBOARDING_HUDDLE_COACHMARK})),A()},[l,m,A]);(0,n.useEffect)(()=>{u&&h&&r(!0)},[u,h]);let x=eT.t("Talk it out in a huddle"),E=eT.t("Instantly connect over audio, video and screen sharing. Anyone in the channel can join."),C=eT.t("Try Huddles"),v=eT.t("Maybe Later"),k=eT.t("Huddles are the quickest way to meet with your team. Start a voice or video huddle from any conversation"),S=(0,n.useMemo)(()=>n.createElement(eu.Ay,{alignActionsRight:!0,ariaLabel:k,arrowPosition:85,autoClogProps:eR,bodyText:E,className:s()(eM,{"p-solutions_onboarding_huddles_coachmark--static":!d}),closeCoachmark:A,hero:b,isOpen:t,offsetX:-300,onAfterOpen:o,onClickPrimaryButton:f,onClickSecondaryButton:A,orientation:eh.YC.Right,primaryCallToActionText:C,secondaryCallToActionText:v,title:x,width:400}),[d,k,E,A,b,t,o,C,v,f,x]);return t&&p?n.createElement(eh.Ay,{coachmarkElement:S,orientation:"bottom"},e):n.createElement(n.Fragment,null,e)};SolutionsOnboardingHuddlesCoachmark.displayName="SolutionsOnboardingHuddlesCoachmark";var eO=a(0x11a296110),eP=a(0x18dac2b8e),eD=a(0x8c8bafa3),eL=a(0x1d2cd7755),eU=a(0x5299a396),eH=a(0x1faa3f1ac),eF=a(0x6b4903c1),eV=a(0x20e80190e),eG=a(0xe6970e83);let eB=new i.Ay("todos"),TodosFeedbackModal=({closeModal:e})=>{let t=(0,g.wA)(),a=eF.AJ.TodosSurvey,[r,s]=(0,n.useState)(""),[l,i]=(0,n.useState)(!1),o="R013XS7LDL2",c=`https://${(0,eD.qF)()}`,d=(0,n.useCallback)(()=>{i(!0),t((0,eF.S)({isOk:!1,notOkResponses:[],comments:r,callId:o,type:a})).then(()=>{i(!1),e?.()})},[t,r,a,e]),m=(0,n.useCallback)(()=>{t((0,eF.S)({isOk:!1,notOkResponses:[eF.p.Dismiss],callId:o,type:a})),e?.()},[e,t,a]),p=(0,n.useCallback)(e=>{s(e)},[]),u=eB.rt("Tell us how we can improve\u2026").props?.children;return n.createElement(eV.dW,{dataQa:"todos_feedback_modal",labelledby:"todos_feedback_modal_title",closeModal:m,showCloseButton:!0,centered:!0},n.createElement(n.Fragment,null,n.createElement(eV.rQ,null,n.createElement(eV.Rc,{id:"todos_feedback_modal_title",title:eB.t("Share your feedback for To-dos")})),n.createElement(eV.$m,null,n.createElement(eV.qf,null,n.createElement(eL.A,{className:"padding_top_75",text:eB.t("Questions, bug reports, feedback - we\u2019re here for it all."),id:"details"},n.createElement(eU.A,{name:"details",id:"details",onChange:p,value:r,placeholder:u,maxCharacterLimit:200})))),n.createElement(eV.jl,null,n.createElement(eH.A,{href:`${c}/privacy-policy`,target:"_blank"},eB.t("Privacy Policy")),n.createElement(eV.ox,null,n.createElement(eO.$n,{onClick:m,type:"outline","data-qa":"todos_feedback_dismiss"},eB.t("Cancel")),n.createElement(eO.lV,{loading:l,onClick:d,"data-qa":"todos_feedback_submit"},eB.t("Submit"))))))};TodosFeedbackModal.displayName="TodosFeedbackModal";let eq=(0,eG.A)(TodosFeedbackModal);var eW=a(0x184deeba7),eK=a(0x11c82607b),ez=a(0x17cc44ffa);let e$=(0,eK.Ay)("Send Todos feedback",(e,t)=>{let a=(0,eW.L)(t()),n=(0,eP.Cu)();e(a&&!n?(0,ez.L)({hermesLinkTriggerUIContext:{location:"internal_feedback"},linkTriggerUrl:"https://slack.com/shortcuts/Ft086Q1JEAVA/0144149d1d39c28711a5924529560405",reason:"trip-trigger-for-sending-todos-feedback"}):eq())});e$.meta={name:"sendTodosFeedback",key:"createThunkSendTodosFeedback",description:"Send Todos feedback"};var eY=a(0x24558b75f),ej=a(0x2449f9f39),eX=a(0x21bfacd01),eQ=a(0x16a219575),eZ=a.n(eQ),eJ=a(0x7230bced),e0=a.n(eJ);let e1={name:"open-in-window"},e2=new i.Ay("todos"),e4=n.memo(()=>{let e=(0,g.wA)(),t=(0,eY.M2)(),a=(0,y.d4)(eX.V),{isChildWindow:r}=(0,n.useContext)(eg.A),l=(0,y.d4)(e=>"on"===(0,eo._Z)(e,"view_header_button_polish")),i=(0,n.useCallback)(()=>{e((0,ej.X)({tabName:K.k6.Todos,shouldNavigateInContext:!0}))},[e]),c=(0,n.useCallback)(()=>{e(e$())},[e]);return n.createElement("div",{className:s()(eZ().headerRightSection)},n.createElement(eO.Ay,{type:"outline",size:"small",className:eZ().feedbackButton,onClick:c},e2.t("Give Feedback",{fallbackHashNs:"classic_nav",fallbackHash:"f16d0952b805f9b741174c5336159bc8d826a949"})),!r&&t&&a&&n.createElement(o.A,{"aria-label":e2.t("Open in new window"),onClick:i,svgIconProps:e1}),n.createElement(F.c,{navProps:(0,V.ox)(),noBorder:l,className:e0().viewHeaderActionButton}))});var e5=a(0xa20ecf9c);function getFullLayoutWidth(e,t){return t?e?.columnIdentifier===K.mq.Primary?(e?.columnLayout?.width||0)+(e?.otherColumnLayouts?.secondary?.width||0):e?.columnLayout?.width:e?.columnLayout?.width}var e8=a(0x18ba7eec);let e6=[O.ks.Search,O.ks.Notifications];function useActionsToMoveToMenu(){let e=(0,p.G)(),t=getFullLayoutWidth((0,e8.j)(),e);return(0,e5.g)(t)?[]:t<h.P1?e6:t<h.yj?e6.slice(0,-1):[]}var e3=a(0x1cc3e0618);function useInviteCtaExposureLogging({experimentInviteEntrypointsSmallTenuredIsTreatment:e,isPrimaryOwner:t,isNonEnterprise:a,teamSize:r,viewActions:s,isChannelView:l,userCreatedTs:i}){let o=(0,g.wA)();(0,n.useEffect)(()=>{let e=void 0!==i&&i>=0x69950100;a&&l&&!e&&(t?4===r:r>=1&&r<=4)&&o((0,e3.s5)())},[e,t,a,r,s,l,i,o])}function QuipDividerAction(){return n.createElement("div",{className:"p-quip_title__actions__divider"})}QuipDividerAction.displayName="QuipDividerAction";var e9=a(0x99233ecb),e7=a(0x1595bdd0),te=a(0x357885ff),tt=a(0x133aaa7da),ta=a(0x2501a2cee),tn=a(0x278a9c27),tr=a(0x125de1ee5),ts=a(0x9ae53e23),tl=a(0x91728dda),ti=a(0x10cf39bbb),to=a(0x22c5d61d5),tc=a(0xfadc3278),td=a(0x1966324d3),tm=a(0x17a53869),tp=a(0x1e4389f2),tu=a(0x19407ae97),th=a(0xea85cdc2),t_=a(0x18c2d4c6f),tb=a(0x2242d2151),tA=a(0xb045f7a5),tf=a(0x45bd075),tx=a(0x1d57b7d4c),tg=a(0x11da06923);let tE=new i.Ay("message"),tC={verticalAlign:"-0.2em"},FlagChannelContentSelector=({channelName:e,channelTopic:t,channelPurpose:a,selectedName:r,selectedTopic:s,selectedDescription:l,onNameChange:i,onTopicChange:o,onDescriptionChange:c,loading:d})=>{let m=(0,y.d4)(tg.FZ),p=e&&""===t&&""===a,u=(0,n.useCallback)(e=>{i(e.target.checked)},[i]),h=(0,n.useCallback)(e=>{o(e.target.checked)},[o]),_=(0,n.useCallback)(e=>{c(e.target.checked)},[c]);return m?n.createElement("div",{className:"margin_top_150"},!p&&n.createElement(tx.A,null,m?tE.t("What would you like to flag?"):""),e&&n.createElement("div",{className:"margin_top_100"},""===t&&""===a?n.createElement("div",{className:"p-flag_dialog_channel_content_dialog__channel_name"},n.createElement(ta.Ah,{name:"channel",size:"20",style:tC,inline:!0}),n.createElement("span",{className:"p-flag_dialog_channel_content_dialog__channel_name-text"},e)):n.createElement(eL.A,{type:"inline",cursor:"pointer",text:tE.t("Channel name"),subtext:`#${e}`},n.createElement(tf.A,{id:"flag-channel-name",name:"flag-channel-name",checked:r,onChange:u,disabled:d}))),""!==t&&n.createElement("div",{className:"margin_top_100"},n.createElement(eL.A,{type:"inline",cursor:"pointer",text:tE.t("Topic"),subtext:t},n.createElement(tf.A,{id:"flag-channel-topic",name:"flag-channel-topic",checked:s,onChange:h,disabled:d}))),""!==a&&n.createElement("div",{className:"margin_top_100"},n.createElement(eL.A,{type:"inline",cursor:"pointer",text:tE.t("Description"),subtext:a},n.createElement(tf.A,{id:"flag-channel-description",name:"flag-channel-description",checked:l,onChange:_,disabled:d})))):null};FlagChannelContentSelector.displayName="FlagChannelContentSelector";var ty=a(0x4e57c6f8),tv=a(0x22a29f141),tk=a(0x1ec69ee01),tS=a(0x53f531a4);let tI=new i.Ay("message"),FlagChannelDetailsDialog=({channelId:e})=>{let t=(0,g.wA)(),[a,r]=(0,n.useState)(""),[s,l]=(0,n.useState)(!1),[i,o]=(0,n.useState)(!1),[c,d]=(0,n.useState)(!1),m=(0,y.d4)(t=>(0,k.OL)(t,e)),p=(0,y.d4)(tg.FZ),{isContentReviewEnabled:u}=(0,tb.A)(),h=(0,tS.j)(m),_=(0,tk.cU)(m),b=(0,tk.z8)(m),A=""!==h&&""===_&&""===b,f=s||i||c||A,x=(0,n.useCallback)(()=>{let n=[];return s&&n.push("channel_name"),i&&n.push("channel_topic"),c&&n.push("channel_description"),A&&n.push("channel_name"),t((0,tv.apiCall)({method:"moderation.flags.create",args:{channel_id:e,item_id:e,type:ty.bI.CHANNEL_DETAILS,reason:a,channel_details_flagged:n},reason:"flag-channel-details"}))},[e,t,a,s,i,c,A]),E=(0,n.useCallback)(()=>{},[]),C=(0,n.useMemo)(()=>p?n.createElement(n.Fragment,null,n.createElement("p",null,p?tI.t("Your organization\u2019s Content Admins will review your report and have the option to take action based on your organization\u2019s policies."):""),n.createElement("p",null,p?tI.t("Are you sure you want to flag this channel content as inappropriate?"):"")):null,[p]),v=p?tI.t("Flag channel details"):"",S=p?tI.t("Channel content has been flagged"):"",I=p?tI.t("Report the channel details to your organization\u2019s Content Admins. Content Admins can see your name and your reason for flagging. Others won\u2019t know you\u2019ve flagged the channel details."):"",N=p?tI.t("Please provide details"):"",w=p?"flag_channel_content":"",T=(0,n.useMemo)(()=>n.createElement(FlagChannelContentSelector,{channelName:h,channelTopic:_,channelPurpose:b,selectedName:s,selectedTopic:i,selectedDescription:c,onNameChange:l,onTopicChange:o,onDescriptionChange:d,loading:!1}),[h,_,b,s,i,c]);return p&&u?n.createElement(tA.A,{contentId:e,contentType:ty.bI.CHANNEL_DETAILS,handleClickReport:E,onSubmit:x,titleText:v,submittedTitleText:S,reason:a,setReason:r,infoText:I,speedBumpText:C,placeholderText:N,contentTypePrefix:w,fieldsMissing:!f,customContentSelector:T}):null};FlagChannelDetailsDialog.displayName="FlagChannelDetailsDialog";var tN=a(0x46dbff89);let tw=(0,eK.Ay)("Channel actions: Flag channel content",(e,t,{channelId:a})=>{e((0,tN.q)({element:n.createElement(FlagChannelDetailsDialog,{channelId:a})}))});tw.meta={name:"flagChannelContentDetails",key:"createThunkFlagChannelContentDetails",description:"Channel actions: Flag channel content"};var tT=a(0x1af295f88);let tM=new i.Ay("message"),FlagMpdmTopicDialog=({channelId:e})=>{let t=(0,g.wA)(),[a,r]=(0,n.useState)(""),s=(0,y.d4)(t=>(0,k.OL)(t,e)),l=(0,y.d4)(tg.FZ),{isContentReviewEnabled:i}=(0,tb.A)(),o=(0,tk.cU)(s),c=(0,n.useCallback)(()=>t((0,tv.apiCall)({method:"moderation.flags.create",args:{channel_id:e,item_id:e,type:ty.bI.CHANNEL_DETAILS,reason:a,channel_details_flagged:["channel_topic"]},reason:"flag-mpdm-topic"})),[e,t,a]),d=(0,n.useCallback)(()=>{},[]),m=l?tM.t("Your organization\u2019s Content Admins will review your report and have the option to take action based on your organization\u2019s policies."):"",p=l?tM.t("Are you sure you want to flag this conversation topic as inappropriate?"):"",u=(0,n.useMemo)(()=>l?n.createElement(n.Fragment,null,n.createElement("p",null,m),n.createElement("p",null,p)):null,[m,l,p]),h=l?tM.t("Flag conversation topic"):"",_=l?tM.t("Conversation topic has been flagged"):"",b=l?tM.t("Report the conversation topic to your organization\u2019s Content Admins. Content Admins can see your name and your reason for flagging. Others won\u2019t know you\u2019ve flagged the topic."):"",A=l?tM.t("Why are you flagging this?"):"",f=l?"flag_mpdm_topic":"",x=(0,n.useMemo)(()=>n.createElement(tT.H,{contentType:"channel_topic",channelTopic:o}),[o]),E=l?tM.t("Why are you flagging this?"):"",C=(0,n.useMemo)(()=>n.createElement("div",{className:"margin_top_125"},n.createElement(tx.A,null,E)),[E]);return l&&i?n.createElement(tA.A,{contentId:e,contentType:ty.bI.CHANNEL_DETAILS,handleClickReport:d,onSubmit:c,titleText:h,submittedTitleText:_,reason:a,setReason:r,infoText:b,speedBumpText:u,placeholderText:A,contentTypePrefix:f,fieldsMissing:!1,customContentSelector:x,customLegend:C}):null};FlagMpdmTopicDialog.displayName="FlagMpdmTopicDialog";let tR=(0,eK.Ay)("Channel actions: Flag MPDM topic",(e,t,{channelId:a})=>{e((0,tN.q)({element:n.createElement(FlagMpdmTopicDialog,{channelId:a})}))});tR.meta={name:"flagMpdmTopic",key:"createThunkFlagMpdmTopic",description:"Channel actions: Flag MPDM topic"};var tO=a(0x81187f00),tP=a(0x1be37a18e),tD=a(0x102edf836),tL=a(0x139c79d16);let tU=new i.Ay("report_to_slack"),tH=["channel_name","channel_topic","channel_description"];function isReportContentType(e){return tH.includes(e)}let ReportChannelContentSelector=({channelName:e,channelTopic:t,channelPurpose:a,selectedOption:r,onSelectionChange:s,loading:l,experimentReportConversationDetailsToSlackGroupOn:i})=>{let o=(0,n.useCallback)(e=>{let t=e.target.value;isReportContentType(t)&&s(t)},[s]),c=i?tU.t("What would you like to report?"):"",d=i?tU.t("Channel name"):"",m=i?tU.t("Topic"):"",p=i?tU.t("Description"):"";return i?n.createElement("div",{className:"margin_top_150"},n.createElement(tx.A,null,c),e&&n.createElement("div",{className:"margin_top_100"},n.createElement(eL.A,{type:"inline",cursor:"pointer",text:d,subtext:`#${e}`},n.createElement(tL.A,{id:"report-channel-name",name:"report-channel-content",value:"channel_name",checked:"channel_name"===r,onChange:o,disabled:l}))),t&&n.createElement("div",{className:"margin_top_100"},n.createElement(eL.A,{type:"inline",cursor:"pointer",text:m,subtext:t},n.createElement(tL.A,{id:"report-channel-topic",name:"report-channel-content",value:"channel_topic",checked:"channel_topic"===r,onChange:o,disabled:l}))),a&&""!==a&&n.createElement("div",{className:"margin_top_100"},n.createElement(eL.A,{type:"inline",cursor:"pointer",text:p,subtext:a},n.createElement(tL.A,{id:"report-channel-description",name:"report-channel-content",value:"channel_description",checked:"channel_description"===r,onChange:o,disabled:l})))):null};ReportChannelContentSelector.displayName="ReportChannelContentSelector";var tF=a(0x1fcbb004d);let tV=new i.Ay("report_to_slack"),ReportChannelToSlackModal=({channelId:e})=>{let t=(0,g.wA)(),[a,r]=(0,n.useState)(null),s=(0,y.d4)(t=>(0,k.OL)(t,e)),l=(0,y.d4)(e=>"on"===(0,eo._Z)(e,"report_conversation_details_to_slack")),i=(0,tS.j)(s),o=(0,tk.cU)(s),c=(0,tk.z8)(s),d=(0,n.useCallback)(()=>{t((0,tF.O)())},[t]),m=(0,n.useCallback)(()=>{},[]),p=l?tV.t("Report to Slack"):"",u=l?tV.t("Placeholder text"):"";return l?n.createElement(eV.dW,{closeModal:d,isOpen:!0,centered:!0,"data-qa":"report_channel_to_slack_dialog"},n.createElement(eV.rQ,null,n.createElement(eV.Rc,{title:p})),n.createElement(eV.$m,null,n.createElement(eV.qf,null,n.createElement("p",null,u),n.createElement(ReportChannelContentSelector,{channelName:i,channelTopic:o,channelPurpose:c,selectedOption:a,onSelectionChange:r,loading:!1,experimentReportConversationDetailsToSlackGroupOn:l}))),n.createElement(eV.jl,null,n.createElement(eV.ox,null,n.createElement(tD.Ay,{onClick:m,disabled:!a,"data-qa":"report_channel_to_slack_submit_btn"},p)))):null};ReportChannelToSlackModal.displayName="ReportChannelToSlackModal";let tG=(0,eK.Ay)("Channel actions: Report channel to Slack",(e,t,{channelId:a})=>{e((0,tN.q)({element:n.createElement(ReportChannelToSlackModal,{channelId:a})}))});tG.meta={name:"openReportChannelToSlackModal",key:"createThunkOpenReportChannelToSlackModal",description:"Channel actions: Report channel to Slack"};var tB=a(0x21fdd4266),tq=a(0x1189daa8d),tW=a(0x1bb79a9ad),tK=a(0x1dfbc7c4c),tz=a(0xe8e28706),t$=a(0x20d440ee3),tY=a(0x15d55664b),tj=a(0xbaaab71e),tX=a(0x11cdf8541),tQ=a(0x115aa5ac3),tZ=a(0x42a2d0a3),tJ=a(0x1ecc7f772),t0=a(0x280afe13),t1=a(0x6f213e53),t2=a(0x189391f29),t4=a(0x114ffe897),t5=a(0x19d55d0e1),t8=a(0x1ede77aa4),t6=a(0xf6ed6f31),t3=a(0xc1963a64),t9=a(0xbd3de346),t7=a(0x22fd0ecc8),ae=a(0xebdd009e),at=a(0x1ad2b0609),aa=a(0x70de3606),an=a(0x1b9d5cc0c),ar=a(0x2378cf6ec),as=a(0x71e68ec7),al=a(0x167d76333),ai=a(0xa1832ae4),ao=a(0x22fb75fe3),ac=a(0x8f58d804),ad=a(0x1ed767a16),am=a(0x45012309),ap=a(0x1529370e7),au=a(0xb2fd4d95),ah=a(0x10079cc7),a_=a(0x107e97a6b),ab=a(0xcaa08ff7),aA=a(0x2513da192),af=a(0x23717bef),ax=a(0xb1f0729f),ag=a(0x8baf11b5),aE=a(0x9b971e7e),aC=a(0x1839c7b32),ay=a(0x12f41fc32),av=a(0x1d197de93),ak=a(0x22eca849f),aS=a(0x13638bd77),aI=a(0x1459cd48f),aN=a(0x1006f8a2b),aw=a(0x162ff0093),aT=a(0x133250315),aM=a(0xd4df61da),aR=a(0x225278752),aO=a(0x365a4cc3),aP=a(0x579f81ad),aD=a(0x5dd1c0f2),aL=a(0x18c9d2489),aU=a(0x10ed819ce),aH=a(0x82f31053),aF=a(0x8f36a342),aV=a(0x1380694ee),aG=a(0x1d01649c6),aB=a(0x133d6089b),aq=a(0x1c030e023),aW=a(0x17a41206b),aK=a(0x14ea3ce99),az=a(0xb129c1d5),a$=a(0xe70d2547),aY=a(0xf9cb31c6),aj=a(0xb9604b6),aX=a(0x20061cab9),aQ=a(0xe684f705),aZ=a(0xc1360909),aJ=a(0x1cec50b3c),a0=a(0x1ee439e69),a1=a(0x9271cc31),a2=a(0x1731631dc);let a4=new i.Ay("menu");function getChannelSectionsTemplate({dispatch:e,props:t}){let{channel:a,channelSection:n,isStarred:r,sidebar:s,header:l,orderedChannelSections:i,isPaid:o,isEditMode:c,allEditModeSelectedChannels:d,clogger:m,addListsToSidebarEnabled:p,allowEditingChannelSections:u=!0,isExternalWorkspaceChannel:h}=t;if(!s&&!l&&(!a||0===Object.keys(a).length)||h||n?.type===aF.VZ.ExternalWorkspace||!(p&&(0,t5.jT)(a))&&!(0,t6.bl)(a)||(0,t1.F)(a))return[];let _=[];if(!u)return _;let b=!i.some(e=>e.type===aF.VZ.Standard),A=(0,E.JM)(a);if(b){if(r?_.push({label:A?a4.t("Unstar conversation"):a4.t("Unstar channel"),click:()=>{clogItemClick({clogger:m,sidebar:s,label:A?tp.A.UNSTAR_CONVERSATION:tp.A.UNSTAR_CHANNEL}),e((0,aR.A)(!1,{channel:a.id}))},dataQa:"channel_ctx_menu_unstar"}):_.push({label:A?a4.t("Star conversation"):a4.t("Star channel"),click:()=>{clogItemClick({clogger:m,sidebar:s,label:A?tp.A.STAR_CONVERSATION:tp.A.STAR_CHANNEL}),e((0,aR.A)(!0,{channel:a.id}))},dataQa:"channel_ctx_menu_star"}),o&&(0,tZ.V)(a)){let t=A?a4.t("Move conversation"):a4.t("Move channel");_.push({label:t,click:()=>{m.track(eE.EventId.CHANNEL_SECTIONS_MOVE_TO_NEW_SECTION,{contexts:{ui_context:{action:eE.UiAction.CLICK,ui_component:eE.UiComponent.SIDEBAR,ui_element:eE.UiElement.SIDEBAR_CHANNEL_ITEM}}}),e((0,tc.i)({action:to.TH.CREATE_AND_MOVE,channelIds:[a.id]}))},dataQa:"channel_ctx_menu_move_to_new_section"})}return _}if(o){let e=c?d:[a],n=e.some(e=>(0,E.JM)(e)),r=a4.t("Move {itemCount, plural, =1 {channel} other {channels}}",{itemCount:e.length});n&&(r=a4.t("Move {itemCount, plural, =1 {conversation} other {conversations}}",{itemCount:e.length})),_.push({type:tt.A.submenu,label:r,renderSubmenu:e=>renderChannelSectionsSubmenu(t,e),submenuWidth:"auto",dataQa:"channel_ctx_menu_move"})}return _}function getCopyTemplate({dispatch:e,props:t}){let{id:a,channel:n,channelUrl:r,channelName:s,sidebar:l,clogger:i,isQuipDoc:o,quipFile:c,canHuddle:d,experimentHappyEmailsGroupOn:m,showChannelEmailAddress:p,channelEmailAddressEnabledByOrg:u}=t,h=[{label:a4.t("Copy name"),click:()=>{if(clogItemClick({clogger:i,sidebar:l,label:tp.A.COPY_CHANNEL_NAME}),o){let e=(0,t7.SB)(c);(0,ad.x3)(e)}else e((0,av.A)(a))},dataQa:"channel_ctx_menu_copy_name"},{label:a4.t("Copy link"),click:()=>{clogItemClick({clogger:i,sidebar:l,label:tp.A.COPY_CHANNEL_LINK}),(0,ad.x3)(r)},dataQa:"channel_ctx_menu_copy_link"}];return d&&h.push({label:a4.t("Copy huddle link"),click:()=>{e((0,ak.r)({channelId:a}))}}),m&&p&&u&&h.push({label:a4.t("Copy channel email address"),click:()=>{clogItemClick({clogger:i,sidebar:l,label:tp.A.COPY_EMAIL_ADDRESS}),e((0,aH.U)({channelId:a,createIfNotExists:!0})).then(e=>{e.address&&((0,E.LI)(n)?(0,ad.x3)(`"@${s} (Slack)" <${e.address}>`):(0,E.yz)(n)?(0,ad.x3)(`"${s} (Slack)" <${e.address}>`):(0,ad.x3)(`"#${s} (Slack)" <${e.address}>`))})}}),[{type:tt.A.submenu,label:a4.t("Copy"),dataQa:"copy_submenu",template:h,submenuWidth:"auto"}]}function getFlagChannelContentTemplate({dispatch:e,props:t}){let{id:a,sidebar:n,channel:r,clogger:s,experimentFlagConversationDetailsGroupOn:l,isContentReviewEnabled:i}=t;if(!l||!i)return[];let o="",c=(0,tS.j)(r),d=(0,tk.cU)(r),m=(0,tk.z8)(r);return((0,E.yz)(r)&&d?o=l?a4.t("Flag conversation topic"):"":c&&(m||d)&&!(0,E.JM)(r)?o=l?a4.t("Flag channel details"):"":(0,E.JM)(r)||(o=l?a4.t("Flag channel name"):""),""===o)?[]:[{label:o,click:()=>{clogItemClick({clogger:s,sidebar:n,label:"FLAG_CHANNEL_DETAILS"}),(0,E.yz)(r)&&d?e(tR({channelId:a})):e(tw({channelId:a}))},dataQa:"channel_ctx_menu_flag_content",className:"p-channel_actions_menu__flag"}]}function getSalesforceAppTemplate({dispatch:e,props:t}){let{isSalesforceApp:a,clogger:n}=t,r=[];return a&&r.push({label:a4.t("Manage Salesforce orgs"),click:()=>{clogItemClick({clogger:n,label:"manage_salesforce_orgs"}),e((0,aN.A)({activeSection:tP._.salesforce}))}}),r}function clogItemClick({clogger:e,sidebar:t,label:a}){let n;n=t?{ui_context:{action:eE.UiAction.CLICK,ui_component:eE.UiComponent.SIDEBAR,ui_element:eE.UiElement.SIDEBAR_CHANNEL_ITEM,entry_point:"sidebar"}}:{ui_context:{action:eE.UiAction.CLICK,entry_point:"channel_header_more_menu"}},e.track(eE.EventId.CONTEXT_MENU_ACTION,{label:a,contexts:n,is_iap1:!0})}function renderChannelSectionsSubmenu(e,t){let{channel:a,channelSection:r,onEnterEditModeClick:s,clogger:l}=e;return n.createElement(td.A,{channel:a,showEditButton:!!s,reason:"channel-ctx-menu",onEnterEditModeClick:()=>{s&&r&&(s({channelSection:r}),l.track(eE.EventId.CONTEXT_MENU_ACTION,{contexts:{ui_context:{action:eE.UiAction.CLICK,ui_component:eE.UiComponent.SIDEBAR,ui_element:eE.UiElement.SIDEBAR_CHANNEL_ITEM,ui_component_name:"Channel"}},label:"organize"}))},clogTrack:(e,t)=>{switch(e){case td.O.MOVE_TO_SECTION:l.track(eE.EventId.CHANNEL_SECTIONS_CHANNELS_MOVE,{contexts:{ui_context:{action:eE.UiAction.CLICK,ui_component:eE.UiComponent.SIDEBAR,ui_element:eE.UiElement.SIDEBAR_CHANNEL_ITEM}},insert:{[t.channelSection.id]:t.channels.map(e=>e.id)},sectionType:{[t.channelSection.id]:t.channelSection?.type===tQ.Ri.Standard?"custom":t.channelSection?.type}});break;case td.O.MOVE_TO_NEW_SECTION:l.track(eE.EventId.CHANNEL_SECTIONS_MOVE_TO_NEW_SECTION,{contexts:{ui_context:{action:eE.UiAction.CLICK,ui_component:eE.UiComponent.SIDEBAR,ui_element:eE.UiElement.SIDEBAR_CHANNEL_ITEM}}});break;case td.O.REMOVE_FROM_SECTION:l.track(eE.EventId.CHANNEL_SECTIONS_CHANNELS_MOVE,{contexts:{ui_context:{action:eE.UiAction.CLICK,ui_component:eE.UiComponent.SIDEBAR,ui_element:eE.UiElement.SIDEBAR_CHANNEL_ITEM}},remove:t.remove.reduce((e,t)=>({[t.channelSectionId]:t.channelIds}),{}),sectionType:{[t.channelSection.id]:t.channelSection?.type===tQ.Ri.Standard?"custom":t.channelSection?.type}})}},...t})}function getDetailsTemplate({dispatch:e,props:t}){let{channel:a,id:n,isAppSpace:r,isAgent:s,isQuipDoc:l,isSearch:i,clogger:o,sidebar:c}=t,d=(0,E.JM)(a),m="";m=r?a4.t("Open app details"):d?a4.t("Open conversation details"):l?a4.t("Open canvas details"):a4.t("Open channel details");let p=s||!a?[]:[{dataQa:"channel_details_modal",label:m,click:()=>{clogItemClick({clogger:o,sidebar:c,label:"open_details_modal"}),e((0,aw.A)({id:n}))}}];if((0,E.LI)(a)){let t=s?a4.t("View agent profile"):a4.t("View full profile");p.push({label:t,click:()=>{clogItemClick({clogger:o,sidebar:c,label:"view_profile"}),e((0,aS.b)({memberId:(0,t0.e)(a)}))},dataQa:"channel_view_user_profile"})}return i&&p.push({dataQa:"open_in_home_action",label:a4.t("Open in home"),click:()=>{clogItemClick({clogger:o,sidebar:c,label:"open_in_home"}),e((0,aT.p)({channelId:n}))}}),p}function getSearchTemplate({dispatch:e,props:t}){let{channel:a,sidebar:n,clogger:r}=t;return[{label:(0,E.JM)(a)?a4.t("Search in conversation"):a4.t("Search in channel"),click:()=>(clogItemClick({clogger:r,sidebar:n,label:tp.A.SEARCH_CHANNEL}),e((0,aM.Il)({entity:a,openMethod:"click_channel_context",skipAttentionOnChatCheck:!0}))),dataQa:"channel_ctx_menu_search_in_channel"}]}function getProTrialSummarizeTemplate({dispatch:e,props:t}){let{isFreeTeam:a,channel:n,experimentPnpDeferredFeaturesGroupOn:r,clogger:s,sidebar:l}=t,i=[],o=(0,E.JM)(n);if(!a||!r)return i;let c=o?a4.t("Summarize conversation"):a4.t("Summarize channel");return i.push({label:(0,t$.A)(c),click:()=>(clogItemClick({clogger:s,sidebar:l,label:"summarize_trial"}),e((0,aJ.r)({entryPoint:"channel-context-menu",promoType:ah.ZO.PaidFeatureTrial,promoSubtype:ah.zG.SlackAI}))),dataQa:"channel_ctx_menu_pro_trial_entry_point_summarize"}),i}function getAiTemplate({dispatch:e,props:t}){let{id:a,channel:r,sidebar:s,header:l,clogger:i,isAiRecapEnabled:o,canSummarize:c,isChannelDigested:d,isExternalWorkspaceChannel:m,shouldShowMoreActions:p,actionsToMoveToMenu:u,isUnreadSummaryPillNewEnabled:h}=t,_=[];if(m)return _;if(c){let e=(0,E.JM)(r)?a4.t("Summarize conversation"):a4.t("Summarize channel");_.push({type:tt.A.submenu,label:e,renderSubmenu:e=>n.createElement(tB.A,{channelId:r.id,menuProps:e,isSidebar:s,isHeader:l}),submenuWidth:"auto",dataQa:"channel_ctx_menu_summarize"}),h||!p||u?.includes(O.ks.SummarizeChannel)||_.pop()}return o&&(0,t6.bl)(r)&&!(0,E.JM)(r)&&_.push({label:d?a4.t("Remove from recap"):a4.t("Add to recap"),click:()=>(clogItemClick({clogger:i,sidebar:s,label:d?tp.A.REMOVE_FROM_DAILY_DIGEST:tp.A.ADD_TO_DAILY_DIGEST}),e((0,aP.O)({channelId:a,isDigested:!d}))),danger:d,dataQa:"channel_ctx_menu_add_to_daily_digest"}),_}function getNotificationsTemplate({dispatch:e,props:t}){let{channel:a,sidebar:r,isMuted:s,desktopNotifySetting:l,clogger:i,isUserVIP:o,canToggleVip:c}=t,d=[],m=(0,t0.e)(a);if(c){let t=o?a4.t("Remove from VIP"):a4.t("Add to VIP");d.push({label:t,click:()=>{e((0,aA.C)(m)),clogItemClick({clogger:i,sidebar:r,label:o?tp.A.REMOVE_PRIORITY_USER:tp.A.ADD_PRIORITY_USER})}})}return!(0,E.LI)(a)&&(0,t6.bl)(a)&&!((0,E.Zp)(a)&&(0,t1.F)(a))&&d.push({type:tt.A.submenu,label:a4.t("Edit notifications"),description:(0,tu.j)({desktopNotifySetting:l,isChannelMuted:s,notificationDisabledType:(0,as.ug)(),forceShowText:!0}),submenuWidth:"320px",click:()=>{clogItemClick({clogger:i,sidebar:r})},renderSubmenu:e=>n.createElement(t_.A,{subtype:"channel-notification-submenu"},n.createElement(tm.$,{channelId:a.id,...e})),dataQa:"channel_ctx_menu_change_notifications"}),d}function getHideTemplate({dispatch:e,props:t}){let{channel:a,sidebar:n,canHide:r,isUserHidden:s,imChannelMemberName:l,clogger:i}=t;if(r&&l){let t=(0,t0.e)(a);return[{label:s?a4.t("Unhide"):a4.t("Hide"),danger:!s,click:()=>{clogItemClick({clogger:i,sidebar:n,label:s?tp.A.UNHIDE_USER:tp.A.HIDE_USER}),e((0,a$.q)(t))},dataQa:"channel_ctx_menu_hide_user"}]}return[]}function getReportToSlackTemplate({dispatch:e,props:t}){let{id:a,channel:n,sidebar:r,clogger:s,isReportToSlackEnabled:l,experimentReportConversationDetailsToSlackGroupOn:i}=t;return l&&i&&n?[{label:a4.t("Report to Slack"),click:()=>{clogItemClick({clogger:s,sidebar:r,label:"report_to_slack"}),e(tG({channelId:a}))},dataQa:"channel_ctx_menu_report_to_slack"}]:[]}function getLeaveTemplate({dispatch:e,props:t}){let{channel:a,id:n,hasDraft:r}=t,s=(0,E.JM)(a),l=((0,t6.bl)(a)||(0,E.Zp)(a))&&!((0,E.Zp)(a)&&(0,t1.F)(a));return((0,E.JM)(a)&&r&&(l=!1),s)?[]:l?[{label:s?a4.t("Close conversation"):a4.t("Leave channel"),click:()=>{clogItemClick({clogger:t.clogger,sidebar:t.sidebar,label:s?tp.A.LEAVE_CONVERSATION:tp.A.LEAVE_CHANNEL}),s?e((0,aq.U)({channelId:n})):e((0,aI.B)({channelId:n}))},danger:!0,dataQa:"channel_ctx_menu_leave"}]:[]}function getChannelSettingsTemplate({dispatch:e,props:t}){let{id:a,channel:n,clogger:r,sidebar:s}=t,l=!!n&&!(0,E.JM)(n);return(0,e7.A)([l?{label:a4.t("Edit settings"),click:()=>{clogItemClick({clogger:r,sidebar:s,label:"open_channel_settings"}),e((0,aw.A)({id:a,defaultTab:ti.n.Settings}))}}:void 0])}function getWorkflowTemplate({dispatch:e,props:t}){let{id:a,channel:n,clogger:r,sidebar:s}=t;return!n||(0,E.JM)(n)||(0,E.Zp)(n)&&!(0,t6.bl)(n)?[]:[{label:a4.t("Add a workflow"),click:()=>{clogItemClick({clogger:r,sidebar:s,label:"add_workflow"}),e((0,tY.Ay)({source:eE.UiPage.CHANNEL_WORKFLOWS,frecency:!0,includeAutomatedTriggers:!0,onInsertWorkflow:(t,n)=>e((0,aL.eV)({channelId:a,type:ao.x.SHORTCUT,title:n?.name??t,reason:"channel-tab-add-bookmark",shortcutId:t})).then(()=>e((0,ei.o)((0,V.id)(a,{tabId:el.fY.Workflows}))))}))}}]}function getSolutionsSettingsTemplate({dispatch:e,props:t}){let{showAddSolutionOption:a,id:n}=t;return a?[{label:a4.t("Add template to channel"),click:()=>{e((0,tq.y)({channelId:n,entryPoint:tK.o.ChannelOverflow}))},autoClogProps:{uiComponentName:"add_solution_to_channel",entryPoint:"channel_header_more_menu",onClick:{enableClogAction:!0}}}]:[]}function getMembersTemplate({dispatch:e,props:t}){let{id:a,memberCounts:n,channel:r,actionsToMoveToMenu:s,clogger:l,sidebar:i}=t;return!s?.includes(O.ks.AvatarStack)||(0,E.JM)(r)?[]:[{label:a4.t("View members"),description:n?.counts.member_count,classNameListItem:"p-view_header__more__member",click:()=>{clogItemClick({clogger:l,sidebar:i,label:"summarize"}),e((0,aw.A)({id:a,defaultTab:ti.n.Members}))},dataQa:"channel_view_members"}]}function getNewWindowTemplate({dispatch:e,props:t}){let{isMainWindow:a,canOpenInMultiViewWindow:r,isBBModeEnabled:s,experimentSplitViewChildWindowsEnabled:l,isSplitContainer:i,view:o,id:c,clogger:d,sidebar:m,shouldShowSplitViewNuxBadge:p,experimentSplitViewMoveOutGroupOn:h}=t,_=[];return!s&&(a||l)&&(o?.viewType===u.D.Channel||o?.viewType===u.D.AppSpace)&&!i&&_.push({label:a4.t("Open in split view"),icon:n.createElement(ta.Ah,{name:"move-to-split-view",size:"16"}),dataQa:"channel_ctx_open_split",click:()=>{p&&e((0,aX.Ay)({spaceName:et.xu.CHANNEL_HEADER_MORE_MENU_OPEN_SPLIT,action:et.hw.CLICK})),clogItemClick({clogger:d,sidebar:m,label:"open_in_split_view"}),e((0,tr.p)({navProps:o,clogParams:{entryPoint:"view-header-more-menu"}}))},badgeLabel:p?a4.t("NEW"):""}),h&&(a||l)&&o?.viewType===u.D.Channel&&i&&_.push({label:h?a4.t("Open in main view"):"Open in main view",icon:n.createElement(ta.Ah,{name:"open-in-main-view",size:"16"}),dataQa:"channel_ctx_open_main",click:()=>{clogItemClick({clogger:d,sidebar:m,label:"open_in_main_view"}),e((0,tn.S)({navProps:o,clogParams:{entryPoint:"view-header-more-menu"}}))}}),a&&(0,eY.M2)()&&r&&_.push({label:a4.t("Open in new window"),icon:n.createElement(ta.Ah,{name:"open-in-window",size:"16"}),dataQa:"channel_ctx_open_window",click:()=>{clogItemClick({clogger:d,sidebar:m,label:"open_in_new_window"}),e((0,tO.s)({viewId:c,clogParams:{uiComponentName:"channel_context_menu",entryPoint:"view_header_more"}}))}}),_}function getAiAppsTemplate({dispatch:e,props:t}){let{isAiAppSpace:a,isAppInSunroof:n,isAppEligibleForSunroof:r,aiAppsToShowUserPref:s,channel:l,experimentAiAppsModifyTopbarMenusGroupOn:i}=t;if(!i||!a||!l||!r)return[];let o=(0,t0.e)(l);return o?n?[{label:a4.t("Remove app from your top bar"),click:()=>{let t=(0,aC.O)(s,o,!1);e((0,ay.AZ)({pref:"ai_apps_to_show",value:t,reason:"channel_header_more_menu"}))}}]:[{label:a4.t("Add app to your top bar"),click:()=>{let t=(0,aC.O)(s,o,!0);e((0,ay.AZ)({pref:"ai_apps_to_show",value:t,reason:"channel_header_more_menu"}))}}]:[]}function mapStateToPropsOnDemand(e,{id:t,sidebar:a}){let n,r,s,l,i,o=(0,k.OL)(e,t);o?(n=(0,tJ.SB)(e,o,{publicChannelIncludeHashSign:!1,imIncludeAtSign:!1}),s=(0,E.t8)(o),r=(0,E.QR)(o)):r=!0;let c=(0,ag.B)(e,t),d=(c||(0,t6.bl)(o)&&!(0,t4.D)(o)&&!(0,tk.Cx)(o))&&!((0,E.Zp)(o)&&(0,t1.F)(o)),p=(0,a0.H7)(e),u=(0,aV.VH)(e);a||(l=(0,aZ.q8)(e,t));let h=!1,b=!1,A=(0,aV.a2)(e);A.forEach(t=>{!(0,t6.bl)(t)||(0,t4.D)(t)||(0,t8.K)(e,t)||((0,ag.B)(e,t.id)?b=!0:h=!0)}),(0,E.LI)(o)||(i=(0,as.gn)(e,t));let f=(0,t0.e)(o),x=(0,aB.A)(e,o),g=x?(0,aQ.nv)(e,f,{preferNonExistentToNull:!1,fetchIfMissing:!1}):void 0,C=x&&(0,an.PV)(g),y=f?(0,ar.I)(e,f,!1,!1,!1,!1):void 0,S=(0,E.LI)(o)&&(0,an.TF)((0,aQ.nv)(e,f,{fetchIfMissing:!1}))&&!(0,ax.SI)(e,"hide_person_opt_out"),I=(0,az.a)(e,f),N=(0,ap.Ay)(t),w=(0,a_.QY)(t),T=w?(0,aK.Lp)(e,w):void 0,M=N&&T?(0,t9.IE)(T,(0,aE.ZT)(e)):(0,ai.Zl)(p,(0,au.iu)({channelId:t})),R=!!(0,ae.Bn)(e,o)&&((0,af.d)(e,o?.id,"can_huddle")?.enabled??!0),O=(0,v.hS)(e),P=!1;O&&(P=(0,aO.p2)(e,{channelId:t}));let D=(0,aO.b5)(e,o),L=(0,m.WF)(e,o,f),U=!!C&&(0,aD.rQ)(e,C),H=x&&(0,tz.yk)(e,t),F=H&&(0,tz.or)(e,t),V=H?(0,aC.L)(e):void 0,G=(0,ts.y)(e,o)&&(0,tl.Xf)(e),B=(0,_.Hm)(e,t);return{teamId:(0,aE.ZT)(e),channel:o,channelName:n,channelUrl:M,isNonExistent:r,isUnknown:s,isMuted:c,isStarred:(0,tk.m2)(e,o),canHide:S,isUserHidden:I,isPaid:(0,ai.qR)(p),canMute:d,memberCounts:l,clogger:(0,am.eo)({state:e}),desktopNotifySetting:i,isAppSpace:x,member:g,imChannelMemberName:y,appId:C,isQuipDoc:N,quipFile:T,isAgent:B||U,isAiAppSpace:H,isAppInSunroof:F,isAppEligibleForSunroof:H&&!U,aiAppsToShowUserPref:V,orderedChannelSections:u,isEditMode:(0,aV.Ou)(e),allEditModeSelectedChannels:A,canMuteSelectedChannels:h,canUnmuteSelectedChannels:b,isClientOnline:(0,aW.Pb)(e),hasPendingChannelSectionSetRequest:(0,aG.T)(e),hasDraft:(0,tk.yc)(e,t),experimentConversationViewsGroupOn:(0,eY.n3)(e),canCreateCanvas:(0,al.F)(e),experimentHappyEmailsGroupOn:"on"===(0,eo._Z)(e,"happy_emails"),canHuddle:R,experimentHuddlesLaterGroupOn:(0,aY.MJ)(e),channelIsSelfIm:(0,t3.V)(e,o),isCurrentUserInHuddle:(0,ae.bD)(e,t),doesCurrentChannelHaveHuddle:(0,ae.Xx)(e,t),canOpenInMultiViewWindow:(0,ac.A)(e,t),addListsToSidebarEnabled:(0,aa.fn)(e),isAiRecapEnabled:O,canSummarize:D,isChannelDigested:P,isExternalWorkspaceChannel:(0,t2.R)(e,o),canToggleVip:L,isBBModeEnabled:(0,eX.V)(e),experimentSplitViewChildWindowsEnabled:(0,a2.yX)(e),experimentPnpDeferredFeaturesGroupOn:"on"===(0,eo._Z)(e,"pnp_deferred_features"),experimentAiAppsModifyTopbarMenusGroupOn:"on"===(0,eo._Z)(e,"ai_apps_modify_topbar_menus"),experimentFlagConversationDetailsGroupOn:(0,tg.FZ)(e),isContentReviewEnabled:!!(0,ax.SI)(e,"content_review_enabled"),shouldShowSplitViewNuxBadge:(0,aj.Hp)(e,et.xu.CHANNEL_HEADER_MORE_MENU_OPEN_SPLIT)===et.ze.EDUCATION_SPLIT_VIEW_NUX,isUnreadSummaryPillNewEnabled:(0,v.MM)(e),experimentSplitViewMoveOutGroupOn:(0,a2.Kb)(e),isSalesforceApp:G,showChannelEmailAddress:(0,aU.ut)(e,o),channelEmailAddressEnabledByOrg:(0,aU.iL)(e),isReportToSlackEnabled:(0,at.J)(e),experimentReportConversationDetailsToSlackGroupOn:"on"===(0,eo._Z)(e,"report_conversation_details_to_slack")}}renderChannelSectionsSubmenu.displayName="renderChannelSectionsSubmenu",getAiTemplate.displayName="getAiTemplate",getNotificationsTemplate.displayName="getNotificationsTemplate",getNewWindowTemplate.displayName="getNewWindowTemplate";let a5=(0,eK.Ay)("Gets a context menu template, triggered by ChannelContextMenu",(e,t,{id:a,type:n,sidebar:r,header:s,channelSection:l,onEnterEditModeClick:i,allowEditingChannelSections:o,shouldShowMoreActions:c,actionsToMoveToMenu:d},m)=>{let p=m(tX.C).windowId||K.N2,u=t(),h=(0,a1.hZ)(u,{windowId:p}),_=(0,k.OL)(u,a),b=!!_&&(0,tW.C)(u,_),A=(0,a0.H7)(u),f=(0,ai.tc)(A),x=(0,t0.e)(_),g=(0,ab.mF)(u,x),E=(0,a1.e6)(u);if(p===K.N2){let e=(0,a1.F8)(u,{tab:E,container:K.mq.Primary}),t=(0,a1.F8)(u,{tab:E,container:K.mq.Secondary});h={[K.mq.Primary]:e},t&&(h[K.mq.Secondary]=t)}let{container:C,view:y}=m(tj.U),v=C===K.mq.Split,S={id:a,sidebar:r,header:s,channelSection:l,onEnterEditModeClick:i,viewSet:h,isMainWindow:p===K.N2,allowEditingChannelSections:o,shouldShowMoreActions:c,actionsToMoveToMenu:d,showAddSolutionOption:b,isUserVIP:g,isSplitContainer:v,view:y,isSearch:"search"===E,isFreeTeam:f,...mapStateToPropsOnDemand(t(),{id:a,sidebar:r})};if("pageLink"===n||"allThreadsLink"===n)return[];let I=getNewWindowTemplate({dispatch:e,props:S}),N=getDetailsTemplate({dispatch:e,props:S}),w=getProTrialSummarizeTemplate({dispatch:e,props:S}),T=getAiTemplate({dispatch:e,props:S}),M=getNotificationsTemplate({dispatch:e,props:S}),R=getChannelSectionsTemplate({dispatch:e,props:S}),O=getLeaveTemplate({dispatch:e,props:S}),P=getChannelSettingsTemplate({dispatch:e,props:S}),D=getSolutionsSettingsTemplate({dispatch:e,props:S}),L=getCopyTemplate({dispatch:e,props:S}),U=S.isSearch?[]:getSearchTemplate({dispatch:e,props:S}),H=getMembersTemplate({dispatch:e,props:S}),F=getWorkflowTemplate({dispatch:e,props:S}),V=getHideTemplate({dispatch:e,props:S}),G=getAiAppsTemplate({dispatch:e,props:S}),B=getFlagChannelContentTemplate({dispatch:e,props:S}),q=getSalesforceAppTemplate({dispatch:e,props:S}),W=getReportToSlackTemplate({dispatch:e,props:S}),z=[q,(0,te.A)([N,H]),w,T,(0,te.A)([M,R])];return z.push((0,te.A)([D,F,P]),(0,te.A)([L,U]),(0,te.A)([I]),(0,te.A)([B,W,O,V]),G),(0,th.X)(z)});a5.meta={name:"getContextMenuTemplate",key:"createThunkGetContextMenuTemplate",description:"Gets a context menu template, triggered by ChannelContextMenu"};let a8=new i.Ay("view-header"),a6={name:"ellipsis-vertical-filled",size:"20"};function ViewHeaderMore({channelId:e}){let t=(0,g.wA)(),a=useActionsToMoveToMenu(),r=(0,n.useCallback)(r=>{let s=t(a5({id:e,shouldShowMoreActions:!0,actionsToMoveToMenu:a,source:"viewHeaderMore"}));return n.createElement(l.A,{enableClogImpressionOffScreen:!0,eventId:eE.EventId.VIEW_HEADER,clogImpression:!0,elementName:"view_header_more_menu"},n.createElement(e9.a,{...r,template:s}))},[e,t,a]);return n.createElement(e9.cQ,{renderMenu:r,position:"bottom-left",offsetY:-5,offsetX:5},n.createElement(d.Ay,{tip:a8.t("More actions"),position:"bottom"},n.createElement(o.A,{"aria-label":a8.t("More channel actions"),className:"p-view_header__more",svgIconProps:a6})))}ViewHeaderMore.displayName="ViewHeaderMore";var a3=a(0xb0d7103e),a9=a(0x19eab7fe0),a7=a(0x11ed18a56),ne=a.n(a7);let CompoundAvatarStack=({channelId:e,key:t="compound-avatar-stack",showFiveAvatars:a,showPresence:r,showIconOnly:l,hideOutline:i})=>n.createElement("div",{className:s()(ne().container,{no_border:i}),key:t},n.createElement(a9.A,{key:`${t}-members`,channelId:e,showFiveAvatars:a,showPresence:r,showIconOnly:l,hideOutline:!0}),n.createElement("div",{className:ne().verticalDivider}),n.createElement(a9.A,{key:`${t}-agents`,channelId:e,showFiveAvatars:a,showPresence:r,showIconOnly:l,showAgents:!0,hideOutline:!0}));CompoundAvatarStack.displayName="CompoundAvatarStack";var nt=a(0x16e80f9af),na=a(0x16ef98cf),nn=a(0x1c14ee6d4),nr=a(0x1b654c3cf);let ns=new i.Ay("channel_header"),nl=(0,n.memo)(({channelId:e,size:t="medium"})=>{let a=(0,g.wA)(),r=(0,y.d4)(e3.uE),s=(0,y.d4)(e3.Fo),l=(0,y.d4)(e3.$f),i=(0,y.d4)(t=>(0,O.Sb)(t,{id:e})),o=r?`${eE.UiComponentVariant.INVITE_ENTRYPOINTS_SMALL_TENURED}_${r}`:void 0,c=(0,n.useMemo)(()=>{if(i&&s)return l?nn.K3.ChannelHeaderInviteCTATreatment:nn.K3.ChannelHeaderInviteCTAControl},[i,s,l]),d=(0,n.useCallback)(()=>{a((0,nr._)({channelId:e,entryPoint:na.kP.ChannelHeader,inviteSource:c}))},[a,e,c]),m=(0,n.useMemo)(()=>({elementName:"channel_header_invite_teammates_cta",onClick:{enableClogAction:!0},uiComponentVariant:o}),[o]),p=ns.t("Invite teammates");return n.createElement(nt.A,{clogImpression:!0,elementName:"channel_header_invite_teammates_cta",eventId:eE.EventId.NEWXP_TEAM_CREATE,uiComponentVariant:o},n.createElement(eO.Ay,{onClick:d,autoClogProps:m,type:"outline",size:t,"aria-label":p,"data-qa":"invite-teammates-cta"},n.createElement("div",{className:"margin_right_25","aria-hidden":"true"},n.createElement(ta.Ah,{name:"user-add",size:"small"===t?"16":"20"})),p))});var ni=a(0x190a9df19),no=a(0x40b0507e),nc=a(0x1c91944c9),nd=a(0xfd109cfc),nm=a(0x74bbb29a),np=a(0x1682adc03);let nu={uiComponentName:"view-header-actions",entryPoint:"channel-header"};function ViewHeaderBigButton({id:e,channel:t,experimentAiAppsAgentforceHomeViewGroupOn:a,showFiveAvatarsInstack:r,showPresenceInAvatarStack:i,isChannelThreadSummariesEnabled:o,showDecorateDefaultChannelsCoachmark:c,showSolutionsOnboardingHuddlesCoachmark:d,nonBotMemberCount:m}){let{isChildWindow:p,container:u}=(0,n.useContext)(eg.A),h=(0,y.d4)(t=>(0,O.Ay)(t,{id:e,isChildWindow:p,viewContainer:u})),_=(0,y.d4)(e3.$f),b=(0,y.d4)(ni.$G),A=(0,y.d4)(eS.s_);useInviteCtaExposureLogging({experimentInviteEntrypointsSmallTenuredIsTreatment:_,isPrimaryOwner:b,isNonEnterprise:A,teamSize:m,viewActions:h,isChannelView:(0,y.d4)(t=>(0,P.A)(t,e))===P.q.Channel,userCreatedTs:(0,y.d4)(aQ.cA)?.first_login});let f=(0,y.d4)(e=>"on"===(0,eo._Z)(e,"agent_channel_header")),x=!(0,E.JM)(t),g=f&&x,C=(0,y.d4)(e=>"on"===(0,eo._Z)(e,"view_header_button_polish")),k=useActionsToMoveToMenu(),S=(0,y.d4)(e=>(0,eS.Y8)(e,{tip:nm.ml.Huddles})),I=(0,y.d4)(eS.Si),N=(0,y.d4)(v.MM),w=(0,y.d4)(a1.e6)===K.k6.Search,T=[nm.ml.Huddles],M=(0,U.y3)()?eE.UiComponentName.PROGRESSIVE_DISCLOSURE_HUDDLES_DESKTOP:eE.UiComponentName.PROGRESSIVE_DISCLOSURE_HUDDLES_WEB;if(!h.length)return null;let R=[...h];k.length&&(0,L.A)(R,e=>k.includes(e));let D=R.map(s=>{switch(s){case O.ks.Call:return n.createElement(Y.A,{key:O.ks.Call,channelId:e});case O.ks.InviteCta:return n.createElement(nl,{key:O.ks.InviteCta,channelId:e,size:"small"});case O.ks.Notifications:return n.createElement($.y,{channel:t,source:"channel_header",size:"small",key:O.ks.Notifications,experimentViewHeaderButtonPolishGroupOn:C});case O.ks.AvatarStack:return n.createElement(J.A,{channelId:e,notifications:en.notifications,shouldAlwaysRenderChildren:!0,spaceName:en.spaceName,key:O.ks.AvatarStack},n.createElement(l.A,{clogImpression:!0,eventId:eE.EventId.AVATAR_STACK,key:O.ks.AvatarStack},g?n.createElement(CompoundAvatarStack,{channelId:e,showFiveAvatars:r,showPresence:i,showIconOnly:o}):n.createElement(a9.A,{key:O.ks.AvatarStack,channelId:e,showFiveAvatars:r,showPresence:i,showIconOnly:o,hideOutline:C})));case O.ks.RefreshAllUnreads:return n.createElement(j.A,{key:O.ks.RefreshAllUnreads,shouldIncludeLabel:!1});case O.ks.QuipDivider:return n.createElement(QuipDividerAction,{key:O.ks.QuipDivider});case O.ks.Huddle:{let t=n.createElement(Q.A,{channelId:e,key:O.ks.Huddle,subtype:Z.g.ChannelHeader});if(S)return n.createElement(er.Ay,{tips:T,uiComponentVariant:I?nm.O1.SomeoneJoins:nm.O1.NobodyJoins,uiComponentName:M,key:O.ks.Huddle},t);if(c)return n.createElement(J.A,{...ee.JJ,key:O.ks.Huddle},t);if(d)return n.createElement(SolutionsOnboardingHuddlesCoachmark,{key:"huddle-coachmark"},t);return t}case O.ks.Tasks:return n.createElement(e4,{key:O.ks.Tasks});case O.ks.SummarizeChannel:return N?null:n.createElement(es.A,{channelId:e,key:O.ks.SummarizeChannel,experimentViewHeaderButtonPolishGroupOn:C});case O.ks.Search:return w?null:n.createElement(a3.V,{channel:t,key:O.ks.Search});case O.ks.NewAgentConversation:return n.createElement(n.Fragment,null,n.createElement(z.q,{key:O.ks.NewAgentConversation,type:"agent",channelId:e,isSplitView:!1}),a&&n.createElement(AgentHomeMultiViewMenuButton,{channelId:e,multiViewMenuClogProps:nu,multiViewMenuClassName:e0().viewHeaderActionButton}));case O.ks.NewAssistantConversation:return n.createElement(n.Fragment,null,n.createElement(z.q,{key:O.ks.NewAssistantConversation,type:"ai-app",channelId:e,isSplitView:!1}),a&&n.createElement(AgentHomeMultiViewMenuButton,{channelId:e,multiViewMenuClogProps:nu,multiViewMenuClassName:e0().viewHeaderActionButton}));case O.ks.NewSlackbotConversation:return n.createElement(SlackbotAiNewChatButton,{channelId:e,key:O.ks.NewSlackbotConversation});default:return null}});return e!==O.ks.Tasks&&D.push(n.createElement(ViewHeaderMore,{channelId:e,key:"more"})),n.createElement("div",{className:s()("p-view_header__actions",{"p-view_header__actions--gap-6px":C})},D)}ViewHeaderBigButton.displayName="ViewHeaderBigButton";let nh=(0,nc.N)((e,{id:t})=>{let a=(0,k.OL)(e,t)??void 0,n=!!a&&(0,no.G)(e,a),r=(0,np.a)(e),s=!!(r&&r<10),l=(0,aQ.on)(e);return{channel:a,isUserExternalLimited:n,experimentAiAppsAgentforceHomeViewGroupOn:(0,X.c_)(e),showPresenceInAvatarStack:s,showFiveAvatarsInstack:s,isChannelThreadSummariesEnabled:(0,v.Jd)(e),showDecorateDefaultChannelsCoachmark:(0,nd.LT)(e,et.ze.DEFAULT_CHANNELS_HUDDLE_TUTORIAL_TIP),showSolutionsOnboardingHuddlesCoachmark:(0,eS.Z7)(e,a?.id),nonBotMemberCount:l}})(ViewHeaderBigButton);var n_=a(0x1edd896c2),nb=a(0x1bcf35bbd),nA=a(0x7041edd8),nf=a(0x1ec15c8f9),nx=a(0x4b06b6e);let ng=new i.Ay("app_home");function ViewHeaderAppHomeContextTeam({channelId:e}){let t=(0,y.d4)(X.c_),a=(0,g.wA)(),r=(0,y.d4)(t=>(0,nf.YD)(t,{channelId:e})),l=(0,y.Z2)(t=>{let a=(0,nf.IH)(t,{channelId:e});return(0,a0.DK)(t,a)}),i=(0,n.useCallback)(t=>{a((0,nA.Y)({channelId:e,teamId:t}))},[a,e]),{isHomeEnabled:o}=(0,y.d4)(t=>(0,nx.NJ)(t,e));return o&&r&&l&&!(l.length<=1)?n.createElement("div",{className:s()("p-view_header__app_home_context_container",{"p-view_header__app_home_context_container--flexible":t})},n.createElement("div",{className:"p-view_header__app_home_context_container-button-container"},n.createElement(nb.A,{teamsList:l,handleTeamSelected:i,selectedTeamId:r,label:ng.t("Use app with settings from\u2026")},n.createElement(tD.Ay,{type:"outline",size:"small"},n.createElement(n_.G,{id:r,truncate:!0}),n.createElement(ta.Ah,{name:"caret-down",inline:!0}))))):null}ViewHeaderAppHomeContextTeam.displayName="ViewHeaderAppHomeContextTeam";let nE=ViewHeaderAppHomeContextTeam;var nC=a(0xa6f3163b),ny=a(0x11bd07e39),nv=a(0x7cc399fd),nk=a(0x248d2fb56),nS=a(0x2338b8604),nI=a(0x6cc5eee0),nN=a(0x217a7a62d),nw=a(0x110330473),nT=a(0xadd564f8),nM=a(0x7f81b930),nR=a(0x1b3ecb90f),nO=a(0x34e1a173),nP=a(0x1e5a5a10a),nD=a(0x21786854d),nL=a(0x10027d8bc),nU=a(0x20b6afb22),nH=a(0x2130932c2),nF=a(0x15f8e452a),nV=a(0x16dc59f6a),nG=a(0x1c659cbb1),nB=a(0x40bfc888),nq=a(0x1e5781b84),nW=a(0x1b154a8c4);function DMTitle({id:e}){let t=(0,y.d4)(t=>(0,k.OL)(t,e)),a=(0,t0.e)(t),r=(0,nW.M)(t),s=(0,y.d4)(m.Gn),l=(0,y.d4)(ab.MY),i=!!(s&&l&&(0,E.LI)(t)&&(0,t0.e)(t)&&l.includes((0,t0.e)(t)||""));return n.createElement(n.Fragment,null,n.createElement("div",{className:"p-view_header__avatar"},n.createElement(nG.Ay,{userId:a,size:nG.RG.small,showBadge:!1,isInteractive:!1,showPresence:!0})),n.createElement("span",{className:"p-view_header__truncated_text"},n.createElement(nq.A,{className:"p-view_header__member_name",id:a,showMemberNameIfHidden:!0})),r&&n.createElement(nF.A,{inline:!0,type:"hourglass","data-qa":"view_header_pending_icon"}),i&&n.createElement(nV.A,{forceBadge:!0,size:"20"}),n.createElement(nB.A,{memberId:a,className:"p-view_header__custom_status",noText:!0,tooltip:!1}))}DMTitle.displayName="DMTitle";let nK=DMTitle;var nz=a(0x133293439),n$=a(0x33644bb7),nY=a(0x21f3c49e8);let nj=new i.Ay("classic_nav"),AllThreadsHeader=()=>n.createElement("div",{className:"p-ia__view_header__title","data-qa":"ia_view_header_threads"},nj.t("Threads"));AllThreadsHeader.displayName="AllThreadsHeader";var nX=a(0x1cbc015b8);function PageTitle({id:e}){let t=(0,nX.gY)(e),a=(0,y.d4)(e=>(0,n$.A)(t?.label)?t?.label(e):void 0);return"Vall_threads"===e?n.createElement(AllThreadsHeader,null):(0,nY.A)(t)?null:t.header?n.createElement(n.Fragment,null,t.header({className:"p-ia__view_header__page_header"})):n.createElement("span",{className:"p-view_header__truncated_text"},a)}PageTitle.displayName="PageTitle";let nQ=PageTitle;var nZ=a(0xbe0b63ff),nJ=a(0x3bc7bbd5),n0=a(0x1fdec3e16),n1=a(0x1fda0b46e),n2=a(0x182c9b0b0),n4=a(0x6019b546),n5=a(0x20c81ddcb),n8=a(0x1f4bff87c),n6=a(0x11bab834e),n3=a(0x1459852c4),n9=a(0x19c76d181),n7=a(0xd93ecf94),re=a(0x1c2a1a838),rt=a(0x2ccaa535),ra=a.n(rt);let rn=new i.Ay("ai_apps"),rr=(0,n2.A)(({button:e,channelId:t,view:a})=>{let r=(0,g.wA)(),s=(0,y.d4)(X.wP),l=(0,y.d4)(X.by),i=(0,y.d4)(n1.g),c=(0,y.d4)(X.c_),d=(0,y.d4)(e=>(0,tz.yk)(e,t)),m=(0,y.d4)(e=>(0,n5.vM)(e,t)),p=(0,y.d4)(e=>(0,_.Hm)(e,t)),u=(0,y.d4)(e=>(0,tz.Bi)(e,t)),h=i&&p,[b,A]=(0,n.useState)(!1),f=(0,n.useRef)(null),x=(0,y.d4)(e=>"on"===(0,eo._Z)(e,"view_header_button_polish")),E=(0,y.d4)(e=>{if((0,aB.A)(e,t))return(0,n6.GS)(e,t)}),C=E?.legacy_app?.agentforce?.salesforce_org_id,v=(0,y.d4)(e=>C?(0,re.kO)(e,C):void 0),k=E?.app_user?.id,S=(0,y.d4)(n9.WR),{threadTs:I}=(0,y.d4)(e=>(0,n5.VP)(e,k,n8.v.ChatView)),N=(0,y.d4)(e=>{if(I)return(0,n7.Ld)(e,t,I)}),w=(0,n.useCallback)(()=>{r((0,n4.h6)({aiAppState:{threadTs:void 0,skipReusingRecentMessage:!0},botUserId:k,aiAppSurface:n8.v.ChatView})),r((0,n4.m5)({threadEntryPoint:n8.m.AppHome})),r((0,ei.o)((0,V.fn)({channelId:t,tabId:n3.K.Chat})))},[r,k,t]),T=(0,n.useCallback)(()=>{k&&r((0,ei.o)((0,V.gk)({appUserId:k})))},[k,r]);if((0,n.useEffect)(()=>{let e=(0,nJ.A)(()=>{f.current&&f.current.offsetWidth<=350?A(!0):A(!1)});if(f.current)return e.observe(f.current),()=>{e.disconnect()}},[]),!d||!k||!s)return e;let M=I&&N?.reply_users?.includes(S),R=I&&N?.user===S,O=I&&N?.subtype!=="assistant_app_thread",P=a?.params?.tabId===n3.K.Chat&&!M&&!R&&!O,D=x?rn.t("New"):rn.t("New Chat");return n.createElement("div",{className:ra().header,ref:f},e,h&&(0,nZ.uz)(v)?n.createElement("div",{className:ra().agentOrg},!b&&n.createElement(n.Fragment,null,n.createElement(n0.A,{lines:1},v.name),n.createElement("div",{className:ra().agentWarningContainer},n.createElement(n0.A,{lines:1}," ",rn.t("This tool uses generative AI, which can produce inaccurate or harmful responses. Review for accuracy and safety before using.",{fallbackHashNs:"hermes_builtin_functions",fallbackHash:"2b76d52e4795645ff93b5c43d556d3050f91f7e8"}))))):null,n.createElement("div",{className:ra().actions},!h&&!(c&&m)&&!u&&!P&&n.createElement(eO.Ay,{type:"primary",size:"small",onClick:w,disabled:P},n.createElement(ta.Ah,{name:x?"plus":"add-comment"}),"\xa0",D),l?n.createElement(o.A,{"aria-label":rn.t("About app"),onClick:T,size:"small",className:x?e0().viewHeaderActionButton:void 0},n.createElement(ta.Ah,{name:"info",size:"20"})):null))});var rs=a(0x210cf696f),rl=a(0x58199183),ri=a(0x2376ea9bb),ro=a(0x398c0114),rc=a(0x2b7f0bcc),rd=a(0x10bae7b36);let rm=a.p+"external_workspaces_home_sidebar-0516759.png";function ExternalWorkspaceAddToHomeHeroImage({animationClassNames:e,staticClassNames:t}){let r=(0,y.d4)(e=>!!(0,eC.ty)(e,"a11y_animations")),l=(0,n.useCallback)(()=>a.e("lottie-external-workspaces-home-sidebar.json").then(a.t.bind(a,0x12185450c,23)),[]);return(0,n.useMemo)(()=>r?n.createElement(eA.e,{getAnimationImport:l,autoplay:!0,loop:!0,svgClassName:e}):n.createElement("img",{alt:"",role:"presentation",src:rm,className:s()("full_max_width",t)}),[e,r,l,t])}ExternalWorkspaceAddToHomeHeroImage.displayName="ExternalWorkspaceAddToHomeHeroImage";var rp=a(0x6e87d4ec),ru=a(0x1c4509efe),rh=a(0x2264e6ea3),r_=a(0x8a03b47e);let rb=(0,eK.Ay)("Create a new channel section for an external workspace",(e,t,{externalWorkspaceId:a})=>{let n=t(),r=(0,aV.W4)(n),s=e((0,ru.b)({workspaceIds:[a],nextChannelSectionId:r||"",reason:"external-workspace-add-to-home"})),undo=async()=>{try{await s}catch{return}let{resultPromise:t}=e((0,r_._)({channelSectionId:(e=>{if((0,rh.Ay)(e))return e.replace(/^T/,"L")})(a),reason:"undo-external-workspace-add-to-home"}));return t};return{dispatchPromise:s,undo}});rb.meta={name:"createExternalWorkspaceChannelSection",key:"createThunkCreateExternalWorkspaceChannelSection",description:"Create a new channel section for an external workspace"};var rA=a(0x6ea1f0ed),rf=a(0x16ffed5ab);let rx=new i.Ay("shared_workspaces"),rg={name:"home"},rE=(0,eK.Ay)("Create an external workspace channel section and give the user feedback",async(e,t,{channelCount:a,workspaceId:r})=>{let{dispatchPromise:s,undo:l}=e(rb({externalWorkspaceId:r}));await s;let handleUndo=async()=>{e((0,rA.Z)());try{await l()}catch(t){e((0,rf.M)({element:n.createElement(rp.A,null,rx.t("Unable to undo."))}));return}e((0,ei.o)({...(0,V.n5)(r),options:{navigateInPlace:!0}}))};handleUndo.displayName="handleUndo",e((0,rf.M)({element:n.createElement(rp.A,{svgIconProps:rg},n.createElement("strong",null,rx.t("{channelCount, plural, =1 {# channel} other {# channels}} added to your Home sidebar.",{channelCount:a})),n.createElement(eO.Nm,{className:"margin_left_50 underline",onClick:handleUndo},rx.t("Undo")))})),e((0,ei.o)({...(0,V.n5)(r),options:{forceTab:K.k6.Home}}))});rE.meta={name:"addToHomeWithFeedback",key:"createThunkAddToHomeWithFeedback",description:"Create an external workspace channel section and give the user feedback"};var rC=a(0xf159cb74);let ry=(0,a(0x1bc4b3ad8).F)(k.DM,(e,t)=>t,(e,t)=>e.filter(e=>(0,rC.c)(e)===t)),rv=new i.Ay("shared_workspaces");function AddToHomeConfirmationModal({onClose:e,workspaceId:t}){let a=(0,g.wA)(),r=(0,y.d4)(e=>ry(e,t)),s=(0,n.useMemo)(()=>r.filter(tk.Ez),[r]),[l,i]=(0,n.useState)("idle"),o=(0,n.useCallback)(async()=>{i("loading");try{await a(rE({channelCount:s.length,workspaceId:t})),e()}catch(e){i("error")}},[a,s.length,e,t]),c=(0,n.useMemo)(()=>n.createElement(ExternalWorkspaceAddToHomeHeroImage,null),[]);return n.createElement(rd.A,{headerImage:c,title:rv.t("Show {channelCount, plural, =1 {# external channel} other {# external channels}} on your Home",{channelCount:s.length}),isSubmitButtonALoadingButton:!0,submitButtonText:rv.t("Show on Home"),onSubmit:o,isSubmitting:"loading"===l,onCancel:e,onClose:e},n.createElement("span",null,rv.rt("These channels will now appear in a section called {workspaceName} so you can easily access them.",{workspaceName:n.createElement(rl.A,{id:t})})),"error"===l?n.createElement(rc.Ay,{className:"margin_top_100",level:rc.A_.error,type:rc.QE.inline},rv.t("Unable to add section to Home. Please try again.")):null)}AddToHomeConfirmationModal.displayName="AddToHomeConfirmationModal";var rk=a(0x6affae29),rS=a(0x217c68a35),rI=a(0x1d99e9583),rN=a(0x12d16c402),rw=a(0x4a46258e),rT=a(0x15e3c2e33),rM=a(0x24f5b5d9b);let rR=new i.Ay("slack_connect_hub"),SharedWorkspaceLeaveConfirmationModal=({id:e})=>{let t=(0,g.wA)(),a=(0,y.d4)(rT.U),[r,s]=(0,n.useState)(!1),[l,i]=(0,n.useState)(null),o=(0,n.useCallback)(()=>t((0,tF.O)()),[t]),c=(0,n.useCallback)(async()=>{s(!0),i(null);try{await t((0,rw.E)({reason:"channel_section_menu__leave_sc_workspace",externalTeamId:e})),a?t((0,ei.o)((0,V.JJ)())):t((0,rM.R)())}catch(e){i(e?.name?{name:e.name,method:e.method??""}:null)}s(!1)},[t,e,a]);return n.createElement(eV.aF,{"data-qa":rI.g9.Modal},n.createElement(eV.rQ,{"data-qa":rI.g9.Header},n.createElement(eV.Rc,{title:rR.t("Are you sure you want to leave?"),"data-qa":rI.g9.TitleBar,className:"break_word"})),n.createElement(eV.$m,{className:"margin_0","data-qa":rI.g9.Content},n.createElement(eV.qf,null,l&&n.createElement(rN.A,{error:l}),n.createElement("ul",{className:"p-slack_connect_workspace_confirmation_modal--content margin_0"},n.createElement("li",{className:"break_word"},rR.rt("If you want to rejoin {workspace} in the future, you\u2019ll need to request a new invitation.",{workspace:n.createElement(rl.A,{id:e})}))))),n.createElement(eV.jl,{"data-qa":rI.g9.Footer},n.createElement(eV.ox,{"data-qa":rI.g9.FooterActions},n.createElement(eV.s_,{"data-qa":rI.g9.CloseButton,type:"outline",onClick:o,"aria-label":rR.t("Cancel")},rR.t("Cancel")),n.createElement(eO.lV,{type:"danger",loading:r,onClick:c,disabled:!!l,"aria-label":rR.t("Leave")},rR.t("Leave")))))};SharedWorkspaceLeaveConfirmationModal.displayName="SharedWorkspaceLeaveConfirmationModal";let rO=(0,eK.Ay)("Opens the Slack Connect Workspace Leave Confirmation Modal",(e,t,a)=>{e((0,tN.q)({element:n.createElement(SharedWorkspaceLeaveConfirmationModal,a),isStackable:!1}))});rO.meta={name:"openSharedWorkspaceLeaveConfirmationModal",key:"createThunkOpenSharedWorkspaceLeaveConfirmationModal",description:"Opens the Slack Connect Workspace Leave Confirmation Modal"};var rP=a(0xedd798d2),rD=a(0x1c7cb6e50),rL=a(0x1fa458710),rU=a(0x1d774a049),rH=a(0xbea6f915);let rF=new i.Ay("external_workspace_canvas"),createCanvasAndPinToExternalWorkspace=({dispatch:e,externalTeamId:t,externalWorkspaceName:a,reason:r})=>{e((0,rP.T)({externalTeamId:t,reason:r})).then(r=>{let{fileId:s}=(0,rD.A)(r);e((0,rH.wo)({externalWorkspaceId:t,canvasToAdd:{canvas_id:s,is_onboarding:!1}})),e((0,rL.A)({fileId:s,source:rU.f.EXTERNAL_WORKSPACE_ABOUT_PAGE,forceOpenInCurrentTab:!0,externalWorkspaceId:t})),e((0,rf.M)({element:n.createElement(rp.A,{svgIconProps:{name:"check"}},rF.rt("Successfully pinned canvas to {workspaceName}",{workspaceName:a}))}))}).catch(t=>{let r;r=t.name===rP._.MaxPinnedCanvasesReached?rF.rt("{workspaceName} already has two canvases pinned, which is the maximum. Please unpin a canvas and try again.",{workspaceName:a}):rF.t("There was a problem pinning this canvas. Give it another try in a few minutes."),e((0,rf.M)({element:n.createElement(rp.A,{svgIconProps:{name:"warning"}},r)}))})};createCanvasAndPinToExternalWorkspace.displayName="createCanvasAndPinToExternalWorkspace";var rV=a(0x4ba2406),rG=a(0x1c100a3ca);let rB=["channels_to_home","create_pinned_canvas","create_channel","invite_to_slack_connect_workspace","manage_external_workspace","leave_slack_connect_workspace"],rq=new i.Ay("menu");function buildInvitePeopleMenuItem({canUserCreateSlackConnectWorkspaceInvites:e,externalWorkspaceId:t,dispatch:a,dataQa:n}){if(e)return{label:rq.rt("Invite people"),click:()=>a((0,rV.A)({isOpeningFromRedirect:!1,targetTeamId:t,source:nn.K3.ExternalWorkspaceInvite})),dataQa:n}}var rW=a(0x4433d67f),rK=a(0xa5fcf051),rz=a(0x13eb6f5d3),r$=a(0x1983be4f4),rY=a(0xcc576ddd);let rj=new i.Ay("events"),ExternalWorkspaceActionsMenu=({workspaceId:e,isViewingFromHome:t=!1,isWorkspaceHeaderMenu:a=!1,classNames:r,ariaLabel:s,...l})=>{let i=(0,g.wA)(),o=(0,y.d4)(t=>(0,r$.VW)(t,e)),c=(0,y.d4)(t=>(0,rK.F)(t,e)),d=(0,y.d4)(t=>(0,rz.Uq)(t,[e])),m=(0,y.d4)(t=>(0,rY.f)(t,e)),[p]=(0,rW.A)(({closeModal:t})=>({element:n.createElement(AddToHomeConfirmationModal,{onClose:t,workspaceId:e})})),u=!d&&!o&&!c,h=(0,y.d4)(t=>(0,a0._J)(t,e)),_=rB.map(e=>(({item:e,dispatch:t,externalWorkspace:a,canUserCreateSlackConnectWorkspaceInvites:n,canCreateChannelsInExternalWorkspace:r,canUserCreatePinnedCanvasItem:s,dataQa:l,shouldRemoveSeparators:i,openAddToHomeConfirmationModal:o,isWorkspaceAddedToHome:c,isWorkspaceHeaderMenu:d})=>{let m=(0,ai.F1)(a),p={label:rq.t("Leave space"),click:()=>t(rO({id:a.id})),danger:!0,dataQa:l},u={label:rq.rt("Show all channels on Home"),click:o,key:"channels-to-home"};switch(e){case"create_channel":if(!r)return[];return[{label:rq.rt("Create channel"),click:()=>{t((0,rG.A)({entryPoint:rS.IV.ChannelSidebarSlackConnectSection,initialWorkspaceId:a.id}))}}];case"create_pinned_canvas":if(!s)return[];return[{label:rq.t("Create a pinned canvas"),click:()=>createCanvasAndPinToExternalWorkspace({dispatch:t,externalTeamId:a.id,externalWorkspaceName:m,reason:"file-actions-create-pinnned-canvas-to-external-workspace"}),dataQa:l}];case"invite_to_slack_connect_workspace":{let e=buildInvitePeopleMenuItem({canUserCreateSlackConnectWorkspaceInvites:n,dispatch:t,externalWorkspaceId:a.id,dataQa:l});return e?[e]:[]}case"manage_external_workspace":return[];case"leave_slack_connect_workspace":return i&&!d?[p]:[{type:"separator"},p];case"channels_to_home":if(c||!d)return[];return i?[u]:[u,{type:"separator"}];default:return(0,rk.Kh)(e)}})({item:e,dispatch:i,externalWorkspace:h,isViewingFromHome:t,canUserCreateSlackConnectWorkspaceInvites:o,canUserCreatePinnedCanvasItem:c,canCreateChannelsInExternalWorkspace:d,shouldRemoveSeparators:u,openAddToHomeConfirmationModal:p,isWorkspaceAddedToHome:m,isWorkspaceHeaderMenu:a})).flat(),b=(0,n.useMemo)(()=>{let e={children:n.createElement(ro.A,{customTeam:h,key:"team-blurb-menu-item",isMenuItem:!1,ariaDescribedById:"team-blurb-text",customSubtitle:rj.t("External workspace")}),type:tt.A.custom,key:"team-blurb-menu-item"};return a&&2===_.length?[e,..._]:a&&_.length>2?[e,{type:tt.A.separator},..._]:u?[..._]:_},[h,u,a,_]);return n.createElement(e9.a,{...l,template:b,menuClassNames:r,"aria-label":s})};ExternalWorkspaceActionsMenu.displayName="ExternalWorkspaceActionsMenu";var rX=a(0xe4034a92),rQ=a(0x2cb8617a),rZ=a.n(rQ);let rJ=new i.Ay("view-header"),WorkspaceTitle=({id:e})=>{let t=(0,g.wA)(),a=(0,y.d4)(t=>(0,a0._J)(t,e)),r=(0,y.d4)(e=>(0,rX.m)(e,a)),s=(0,ai.F1)(a),l=(0,y.d4)(e=>(0,rK.F)(e,a?.id)),{activeTab:i}=(0,n.useContext)(eg.A),o=i===K.k6.Home,c=o||l,d=(0,n.useCallback)(()=>t((0,ei.o)((0,V.yC)(e,r??""))),[t,e,r]),m=(0,n.useCallback)(t=>n.createElement(ExternalWorkspaceActionsMenu,{workspaceId:e,isViewingFromHome:o,...t}),[o,e]);return n.createElement("div",{className:"display_flex align_items_center full_width"},n.createElement("div",{className:"flex_one margin_right_50"},rJ.rt("About {eventWorkspaceName}",{eventWorkspaceName:s,fallbackHash:"c504481406d6c0affd1a61d286544b800185576a",fallbackHashNs:"client"})),r||c?n.createElement("div",{className:"display_flex align_items_center"},r&&n.createElement("div",{className:"display_flex align_items_center margin_right_100"},n.createElement(ri.A,{id:r,className:"margin_right_50"}),n.createElement("span",{className:rZ().hostTeamName},n.createElement(n0.A,{lines:1,withTooltip:!0},rJ.rt("Hosted by {hostTeamName}",{hostTeamName:n.createElement(rs.A,{onClick:d},n.createElement(rl.A,{id:r})),fallbackHash:"b181a5a42772471933dc95dce6181c2025e91b61",fallbackHashNs:"events"})))),n.createElement(e9.cQ,{renderMenu:m,position:"bottom-left"},n.createElement(eO.Nm,{className:rZ().actionsIcon},n.createElement(ta.Ah,{name:"ellipsis-vertical-filled",size:"20"})))):null)};WorkspaceTitle.displayName="WorkspaceTitle";var r0=a(0x14dbdd890),r1=a(0xbd520b0f),r2=a(0x12a672fd0),r4=a(0x11bc0cbc0),r5=a(0x61f75169),r8=a(0x475c9cfe),r6=a(0x114056aef),r3=a(0x1ec1a529f),r9=a.n(r3);let r7=new i.Ay("view-header"),AboutUserGroupTitle=({id:e})=>{let t=(0,g.wA)(),a=(0,y.d4)(A.Ow),r=(0,y.d4)(n9.WR),l=(0,y.d4)(t=>(0,r8.lJ)(t,e)),i=(0,r5.ue)(l),c=(0,r5.$Q)(l),d=(0,y.d4)(e=>!!c&&(0,r5.wC)(e,c)),m=(0,n.useCallback)(()=>{t((0,r6.A)({groupId:e,memberId:r}))},[t,r,e]),p=(0,n.useCallback)(a=>{t((0,tN.q)({element:n.createElement(r2.A,{userGroupId:e,focusKey:a})}))},[t,e]),u=(0,n.useMemo)(()=>[{label:a?r7.t("Edit user group details"):"",show:d,click:()=>p(r4.g.NAME)},{type:tt.A.separator,key:"separator-0",dataQa:"separator-0",show:d},{label:a?r7.t("Add channels"):"",show:d,click:()=>p(r4.g.CHANNELS)},{type:tt.A.separator,key:"separator-1",dataQa:"separator-1",show:d},{danger:!0,label:a?r7.t("Leave User Group"):"",click:m}].filter(e=>void 0===e.show||e.show),[d,m,p,a]),h=(0,n.useCallback)(e=>n.createElement(e9.a,{...e,template:u,stripTerminalSeparators:!0}),[u]),_=(0,n.useCallback)(()=>{t((0,r1.f)({userGroup:l}))},[t,l]);if(!a)return null;let b=a?r7.t("Share this channel section"):"";return n.createElement("div",{className:"display_flex align_items_center full_width"},n.createElement("div",{className:"flex_one margin_right_50"},r7.rt("About {userGroupName}",{userGroupName:i})),n.createElement("div",{className:"display_flex align_items_center margin_left_auto"},n.createElement("div",{className:s()(r9().share_usergroup_header_button__container)},n.createElement(o.A,{className:s()(r9().usergroup_share_button),size:"small","aria-label":b,svgIconProps:{name:"share-message",size:"20"},onClick:_})),n.createElement(e9.cQ,{renderMenu:h,position:"bottom-left"},n.createElement(eO.Nm,{className:"align_self_center margin_left_50"},n.createElement(ta.Ah,{name:"ellipsis-vertical-filled",size:"20"})))))};AboutUserGroupTitle.displayName="AboutUserGroupTitle";var se=a(0x11ed04fa0),st=a(0x22f41d75),sa=a(1927545e3),sn=a(0x4003bce0),sr=a(0x16ed1b0dc),ss=a(0x14cb5efef),sl=a(0x1ba23e63c),si=a(0x16d481b37),so=a(0xd76c2ee8),sc=a(0xafce781a),sd=a(0xc4a84715),sm=a(0x140b65eaf),sp=a(0x1b32efd32),su=a(0x1f57aea47);let sh="channel_name",s_=n.lazy(()=>Promise.resolve().then(a.bind(a,0x89d65102))),sb=n.lazy(()=>Promise.resolve().then(a.bind(a,0x105dd6c49)).then(e=>({default:e.LeadFormSetupChannelDetailsCoachmark}))),sA={spaceName:et.xu.IN_PRODUCT_COACHMARK,notifications:{[et.ze.AGENTFORCE_CHANNEL_MANAGERS_EDU]:{component:s_},[et.ze.DOWNMARKET_CRM_LEAD_FORM_SETUP_CHANNEL_DETAILS_COACHMARK]:{component:sb}}},sf=new i.Ay("channel_details"),sx=new i.Ay("activity"),sg={uiStep:eE.UiStep.VIEW_HEADER_BIG_BUTTON_CLICK,onClick:{enableClogAction:!0}};function view_header_big_button_ViewHeaderBigButton({id:e,displayName:t,teamName:a,topic:r,customStatusText:l,customStatusEmoji:i,huddleChannelId:o,viewType:c,memberIdFromIm:m,file:p,isTemplate:h,shoutyWorkspaceNameIsEnabled:_,isRecord:b,isExternalWorkspacePage:A,view:f,isColumnNarrow:x}){let E,C=(0,g.wA)(),v=(0,y.d4)(ny.K),k=(0,y.d4)(aY.Ie),S=(0,y.d4)(se.U6),I=!!(0,y.d4)(ss.N),N=(0,y.d4)(su.oY),w=(0,y.d4)(t=>(0,nN.Kh)(t,e)),T=(0,y.d4)(nL.j0),M=(0,y.d4)(e=>"on"===(0,eo._Z)(e,"slack_crm_leads_web_form")),R=(0,y.d4)(t=>{if(M&&c===P.q.Channel&&(0,sr.A)(e))return(0,aj.Hp)(t,et.xu.IN_PRODUCT_COACHMARK,e)}),{isDragging:O,dragRef:D}=(0,st.N)({type:nM.Lg,item:{id:e,type:u.D.Channel}});(0,n.useEffect)(()=>{O&&(0,d.Ws)()},[O]),(0,n.useEffect)(()=>{!I||N||!(0,sr.A)(e)||c!==P.q.Channel||w&&C((0,sc.u2)({event:{type:et.jo.REQUEST_SPACES,spaces:[et.xu.IN_PRODUCT_COACHMARK]},channelId:e}))},[C,I,e,N,c,w]);let L=(0,n.useCallback)(async t=>{f&&await C((0,nD.d)({e:t,navProps:f}))||C((0,sl.A)({id:e}))},[C,e,f]),[U,H]=(0,n.useState)(!1),F=(0,n.useCallback)(e=>{H(e)},[H]),V=null,G=t;switch(c){case P.q.Channel:E=n.createElement(nH.A,{id:e,onTruncate:F,hideTitleSuffix:!0,inViewHeader:!0}),V=n.createElement(J.A,{spaceName:sA.spaceName,notifications:sA.notifications,channelScopedId:e});break;case P.q.DM:E=n.createElement(nK,{id:e,statusEmoji:i}),l&&(G=`${t} ${i} ${l}`);break;case P.q.MPDM:E=n.createElement(nz.A,{id:e,shouldTruncate:!0,showTooltip:!0});break;case P.q.App:E=n.createElement(nU.A,{id:e});break;case P.q.Page:E=n.createElement(nQ,{id:e});break;case P.q.Doc:E=n.createElement(nw.Ay,{id:e,showFallbackView:!0});break;case P.q.AboutWorkspace:E=n.createElement(WorkspaceTitle,{id:e});break;case P.q.AboutUserGroup:E=n.createElement(AboutUserGroupTitle,{id:e});break;case P.q.Tasks:E=n.createElement(nQ,{id:sa.c.Todos});break;case P.q.ActivityNotification:E=T?sx.t("Slack"):"Slack";break;case P.q.Unknown:default:E=n.createElement("span",{className:"p-view_header__unknown"})}let B=c===P.q.Channel||c===P.q.DM||c===P.q.MPDM||c===P.q.App&&!(0,sn.Ay)(e),q=(0,n.useCallback)(({children:t})=>B?n.createElement(nT.A,{header:!0,id:e},t):t,[B,e]),W=(0,n.useCallback)(()=>k&&o?n.createElement(n.Fragment,null,n.createElement(nO.z,{channelId:o}),n.createElement(nP.A,{channelId:o,className:"c-custom_status__tooltip margin_left_25"})):m&&(l||i)?n.createElement(n.Fragment,null,i&&n.createElement(nv.A,{emoji:i,memberId:m,emojiSize:nR.lw.SMALL,showTooltips:!1}),l&&n.createElement(nS.A,{memberId:m,className:"c-custom_status__tooltip margin_left_25",emojiSize:nR.lw.SMALL,text:l}),n.createElement(nk.A,{className:"c-custom_status__expiration c-tooltip__subtitle",memberId:m})):void 0,[i,l,k,o,m]),K=(0,n.useCallback)(()=>M&&R===et.ze.DOWNMARKET_CRM_LEAD_FORM_SETUP_CHANNEL_DETAILS_COACHMARK?null:n.createElement("div",{className:s()("p-view_header__big_button__tooltip",{"p-view_header__big_button__tooltip--centered":_})},!U&&n.createElement("div",{className:"p-view_header__big_button__tooltip_header"},sf.t("Get channel details")),!U&&x&&r&&n.createElement("div",{className:"p-view_header__big_button__tooltip_topic"},n.createElement(nI.A,{noSpecials:!0,noLinking:!0,text:r})),_&&n.createElement("span",{className:"p-view_header__big_button__tooltip_subheader"},sf.rt("{channelName} is in<br></br>{workspaceName}",{channelName:t,workspaceName:a})),U&&!_&&n.createElement(n.Fragment,null,n.createElement("div",{className:"p-view_header__big_button__tooltip_name"},t),r&&n.createElement("div",{className:"p-view_header__big_button__tooltip_topic"},n.createElement(nI.A,{noSpecials:!0,noLinking:!0,text:r}))),b&&n.createElement(r0.r,{channelId:e})),[t,M,e,x,b,U,R,_,a,r]);if(c===P.q.Doc&&!(0,t9.ZG)(p,{includeTempQuipDocs:!0}))return null;if(B){let a=n.createElement(nC.A,{"aria-label":G,onClick:L,className:s()("p-view_header__big_button",`p-view_header__big_button--${c}`,{"p-view_header__big_button--is_dragging":v&&O}),autoClogProps:sg,"data-qa":"channel_name_button",ref:D},n.createElement("div",{className:"p-view_header__title","data-qa":sh},E,V,!S&&n.createElement("div",{className:"align_self_center margin_right_25_negative"},n.createElement(ta.Ah,{name:"caret-down"}))));return l||i||o?n.createElement(q,null,n.createElement(d.Ay,{tip:W,position:"top",maxWidth:"large",delay:0},a)):c===P.q.Channel&&t?n.createElement(q,null,n.createElement(d.Ay,{tip:K,position:"bottom",maxWidth:"large",delay:d.PK},a)):c===P.q.App?n.createElement(q,null,n.createElement(rr,{button:a,channelId:e})):n.createElement(q,null,a)}return n.createElement("div",{className:s()("p-view_header__big_button--inactive",`p-view_header__big_button--${c}`,"p-view_header__big_button",{"p-view_header__big_button--template":h})},n.createElement("div",{className:"p-view_header__title","data-qa":sh},E,V,A?n.createElement("span",{className:"caption sk_foreground_max margin_left_50"},sf.t("Powered by Slack Connect")):null))}view_header_big_button_ViewHeaderBigButton.displayName="ViewHeaderBigButton";let sE=(0,n2.A)((0,nc.N)((e,t)=>{let a,n,r,s,l,i,o;if("treatment"===(0,eo._Z)(e,"concurrent_channel_switch_v2")){let{view:e}=t,n=t.id;a=(e?.viewType===u.D.Channel?e?.id:e?.params?.parentTab)||n}else a=t.id;let c=(0,k.OL)(e,a),d=(0,P.A)(e,a),m=d===P.q.Channel||d===P.q.DM||d===P.q.MPDM;if(d===P.q.DM&&(r=(n=(0,t0.e)(c))?(0,sp.A)(e,n):void 0,s=n?(0,sd.A)(e,n):void 0,l=n?(0,sm.A)(e,n):void 0),d===P.q.Doc){let t=(0,a_.EX)(a).fileIdOrQuipThreadId;i=t?(0,aK.Lp)(e,t):void 0,o=(0,t9.dE)(i)}let p=(0,so.Q)(e,{channel:c}),h=(0,si.a)(e,{channel:c,xwsAlpha:!0});return{id:a,displayName:m?(0,tJ.SB)(e,c,{imIncludeAtSign:!1})??"":"",teamName:h,topic:(0,tk.cU)(c),customStatusText:r,customStatusEmoji:s,huddleChannelId:l,viewType:d,isMuted:(0,ag.B)(e,a),memberIdFromIm:n,file:i,isTemplate:o,shoutyWorkspaceNameIsEnabled:p,isRecord:(0,E.rI)(c),isExternalWorkspacePage:a===sa.c.BrowseExternalWorkspaces}})(view_header_big_button_ViewHeaderBigButton));var sC=a(0x1df96de4c),sy=a(0x32fdd755),sv=a(0x2520382cd),sk=a(0x1b97710f3),sS=a(0x151a93a75),sI=a(0x12b78cc75);let sN=new i.Ay("view-header"),ViewHeaderStar=({channelId:e})=>{let t=(0,g.wA)(),a=(0,y.d4)(t=>(0,P.A)(t,e)),r=(0,y.d4)(t=>(0,k.OL)(t,e)),l=(0,y.d4)(aV.jV),i=(0,y.d4)(e=>r&&r.id?(0,aV.qu)(e,r.id):sC.Ml),o=(0,y.d4)(e=>(0,tk.m2)(e,r)),c=(0,y.d4)(a0.H7),m=!(0,ai.qR)(c),p=(0,y.d4)(t=>(0,n6.GS)(t,e)),u=!!p&&(0,sS.L)(p),h=(0,y.d4)(e=>"on"===(0,eo._Z)(e,"view_header_button_polish")),_=sN.t("Unstar agent"),b=sN.t("Star agent"),A=sN.t("Move agent"),f={eventId:eE.EventId.CHANNEL_HEADER_STAR_ICON_CLICK,elementName:"channel_header_star_icon",onClick:{enableClogAction:!0},view_type:a},x=(0,n.useMemo)(()=>{if(m)switch(a){case P.q.Channel:return o?sN.t("Unstar channel"):sN.t("Star channel");case P.q.App:if(u)return o?_:b;return o?sN.t("Unstar app"):sN.t("Star app");default:return o?sN.t("Unstar conversation"):sN.t("Star conversation")}let e=i[0],t=e&&l[e]?.name;if(t)return sN.t("Currently in: {sectionName}",{sectionName:t});if(o)return sN.t("Currently in Starred");switch(a){case P.q.Channel:return sN.t("Move channel");case P.q.App:if(u)return A;return sN.t("Move app");default:return sN.t("Move conversation")}},[a,m,o,i,l,u,_,b,A]),E=i.find(e=>l[e]?.emoji),C=(0,sv.$)({hasChannelSectionEmoji:!!E,isStarred:o,isInStandardSection:i.length>0});if(m)return n.createElement(d.Ay,{position:"bottom",tip:x},n.createElement(eO.Nm,{className:s()("p-view_header_star_action_button",{"p-view_header_star_action_button_icon":!o,"p-view_header_star_action_button_filled":o}),"aria-label":x,autoClogProps:f,onClick:()=>{o?t((0,aR.A)(!1,{channel:e})):t((0,sI.A)({channelId:e}))}},n.createElement(ta.Ah,C)));let v=E?l[E]?.emoji:void 0;return n.createElement(sy.A,{channelId:e,offsetX:60,source:"channel_header"},n.createElement("div",null,n.createElement(sk.D,{channelSectionEmoji:v,channelSectionIcon:C,isStarred:o,toolTipText:x,ariaLabel:x,channelSectionIconAutoClogProps:f,experimentViewHeaderButtonPolishGroupOn:h})))};ViewHeaderStar.displayName="ViewHeaderStar";var sw=a(0x2343fde45),sT=a(0x20089abe2),sM=a(0x1fe886fee);let sR=new i.Ay("classic_nav"),sO=class extends n.Component{containerRef;cssRef;constructor(e){super(e),this.onClick=this.onClick.bind(this),this.containerRef=n.createRef(),this.cssRef=n.createRef()}componentDidMount(){this.updateHoverSize(this.props.contentWidth)}componentDidUpdate(){this.updateHoverSize(this.props.contentWidth)}updateHoverSize(e){if(e&&0!==e&&e<800){let t=`
				:root {
					--p-modal_info_topic__hover_size: ${.5*e}px;
				}
			`;this.cssRef.current=t}else this.cssRef.current=void 0}onClick(e){if(this.props.showMemberList)return void this.props.openAboutChannelModal({defaultTab:ti.n.Members,id:this.props.channelId});let t=e.target;t&&"A"===t.tagName||this.props.readOnly||(!this.containerRef.current||!t||this.containerRef.current.contains(t))&&(this.props.openChannelTopicDialog({channelId:this.props.channelId}),this.props.clogger.track(eE.EventId.CLASSIC_NAV,{contexts:{ui_context:{action:"CLICK",ui_component:"CHANNEL_HEADER",ui_element:"NAV_CHANNEL_TOPIC"}}}))}render(){let{topic:e,readOnly:t,hasKeyboardFocus:a,hasKeyboardFocusWithin:r,isImOrMpim:l,experimentChannelTabsV5GroupOn:i,showMemberList:o,memberList:c,editButtonRef:d}=this.props;if(t&&!e&&!o)return null;let m=l?sR.t("Edit topic"):sR.t("Edit channel topic",{fallbackHash:"5301648dcf6b53cefc9ed52999aaa92d4603cae0"}),p=s()("p-classic_nav__model__title__info__topic__content",{"p-classic_nav__model__title__info__topic__content--channel_tabs":i}),u=n.createElement("div",{className:"p-classic_nav__model__title__info__topic__content"},sR.t("Add a topic"));o?u=n.createElement("div",{className:p},n.createElement(n0.A,{lines:1},c)):e&&(u=n.createElement(nI.A,{text:e,className:p,emojiSize:nR.lw.SMALL,noJumbomoji:!0,noHighlights:!0}));let h=s()({"p-classic_nav__model__title__info__item":!0,"p-classic_nav__model__title__info__topic":!0,"p-classic_nav__model__title__info__topic--empty":!e,"p-classic_nav__model__title__info__topic--readonly":t,"p-classic_nav__model__title__info__topic--focus-within":r||a},this.props.className),_=t||o?null:n.createElement(eO.Nm,{"aria-label":m,className:"p-classic_nav__model__title__info__topic__edit",onClick:this.onClick,ref:d},sR.t("Edit"));return n.createElement(n.Fragment,null,n.createElement(eO.Nm,{className:h,onClick:this.onClick,onFocus:this.props.onFocus,onBlur:this.props.onBlur},n.createElement("div",{className:"p-classic_nav__model__title__info__topic__text",ref:this.props.textRef},u)),_,n.createElement("style",{className:"p-model_info_topic__css"},this.cssRef.current))}};sO.displayName="ModelInfoTopic";let sP=(0,sw.A)((0,nc.N)((e,{channelId:t})=>{let a=(0,k.OL)(e,t);return{topic:(0,tk.cU)(a),readOnly:!(0,sT.P)(e,t),clogger:(0,am.eo)({state:e}),isImOrMpim:(0,E.JM)(a),experimentChannelTabsV5GroupOn:(0,se.U6)(e),showMemberList:(0,E.yz)(a)&&(0,sM.h)(e),memberList:(0,tJ.Xx)(e,a,null,!0)}},e=>({openChannelTopicDialog:(...t)=>e((0,C.A)(...t)),openAboutChannelModal:(...t)=>e((0,sl.A)(...t))}))(sO));var sD=a(0x7fbb7bb1),sL=a(0x16172bfe5);function ViewHeaderTopic({id:e}){let t=(0,y.d4)(t=>(0,P.A)(t,e)),a=(0,y.d4)(t=>{let a=(0,k.OL)(t,e);return(0,tk.cU)(a)}),[r,l]=(0,n.useState)(),[i,o]=(0,n.useState)(),[c,d]=(0,n.useState)(!1),m=(0,n.useRef)(null),p=(0,n.useCallback)(({offset:e})=>{e&&l({width:e.width,height:e.height})},[]),u=(0,n.useCallback)(({scroll:e})=>{e&&o({width:e.width,height:e.height})},[]);return((0,n.useEffect)(()=>{if(!r||!i)return;let e=m?.current?.getBoundingClientRect()?.width,t=r.width-(e?e+8:40);d(i.width>t||i.height>r.height)},[r,i]),a)?n.createElement(sD.A,{offset:!0,onResize:p},({measureRef:a})=>n.createElement("div",{className:s()("p-view_header__topic_container",{"p-view_header__topic_container--truncated":c,"p-view_header__topic_container--dm_topic":t===P.q.DM||t===P.q.MPDM}),ref:a},n.createElement(sD.A,{scroll:!0,onResize:u},({measureRef:t})=>n.createElement(sL.T.Consumer,null,a=>{let r=a?.columns??{},s=r[K.mq.Primary]??0,l=r[K.mq.Secondary]??0;return n.createElement(sP,{channelId:e,className:"p-view_header__topic",textRef:t,contentWidth:s+l,editButtonRef:m})})))):null}ViewHeaderTopic.displayName="ViewHeaderTopic";var sU=a(0x50ff7328),sH=a(0x9ccef20a),sF=a(0xab2e2cf4),sV=a(0x51b81145),sG=a(0x54536a24),sB=a(0xa144a6db),sq=a(0x2000be496),sW=a(0xaa596f75),sK=a(0x382cbff6),sz=a(0x242503693),s$=a(0x303eaaff),sY=a(0x18d28c7d9),sj=a(0x1046e372c),sX=a(0x12cbe336e),sQ=a(0xa985ed31),sZ=a(0x10c92383d),sJ=a(0x166d96bf1),s0=a(0x18358a245),s1=a(0x46a42efe),s2=a(0x1d23c7f2c),s4=a(0x547c586f),s5=a(0x117f78ac8),s8=a(0x16082db4b);let s6=new i.Ay("view-header"),s3={name:"close"};function ViewHeader({closeView:e,id:t,hideActions:a,shouldShowSidebarToggle:r=!1,isInstantSlackInviteeSession:i=!1,viewType:m,showQuipActivityHistoryHeader:p,viewCanBeClosed:_,fileId:A,otherColumnLayouts:g,experimentIsHuddlesChannel:E,experimentHideAllSidebarsGroupOn:C,isRecord:y,shouldShowBackButton:v,experimentSlackAiSuggestedTopicsGroupOn:k,experimentMpdmTopicNamesGroupOn:S,container:I,isChannelMember:N,bookmarksEnabled:w,hideHeader:T,channelSpaceLayout:L,container:U,columnLayout:H,experimentViewHeaderOverflowBordersGroupOn:F,hideBorder:V,view:G,experimentChannelTabsV5GroupOn:B,isVipAvailableForCurrentTeam:q,isAgent:W,children:z,experimentSidebarVisualUpdatesM1Enabled:$,showSlackbotPreviewBadge:Y,experimentDesktopUiSimplificationGroupOn:j,experimentTodayPageGroupOn:X,experimentActivityPriorityGroupOn:Q}){let Z=(0,n.useRef)(null),J=H?.width,[ee,et]=(0,n.useState)(!1),ea=(0,n.useCallback)(e=>{Z.current=e,et(Z.current?.getButtons()?.length>0)},[]),en=(0,n.useCallback)(e=>e?.container!==K.mq.Sidebar&&!!ee&&Z.current?.focus(),[ee]);(0,sV.A)(sz.Ay.VIEW_HEADER,en);let er=(0,n.useCallback)(()=>{e?.()},[e]),es=I===K.mq.Split?h.BR:h.ZM,el=!!(J&&J<2*es),ei=(0,n.useCallback)(()=>{if(p){let e=(0,sB.f)().params.entityId,{versionId:t}=(0,a_.EX)(e);return n.createElement(b.A,{versionId:t})}if(j&&X&&G?.viewType===u.D.Page&&G?.id===sa.c.TodayV2)return n.createElement(M.Q,null);let e=s6.t("Close"),s=m===P.q.Channel&&N||m===P.q.DM||m===P.q.MPDM||m===P.q.App,l=g?.[K.mq.Sidebar]?.isCollapsed;return E?null:n.createElement(n.Fragment,null,!C&&(l||r)&&n.createElement(D.A,null),v&&n.createElement(x.A,null),s&&n.createElement(ViewHeaderStar,{channelId:t}),n.createElement("div",{className:"p-view_header__text"},Q&&G?.viewType===u.D.ActivityMlResults&&n.createElement("h3",null,"ML Results"),!i&&n.createElement(n.Fragment,null,n.createElement(sE,{id:t,isColumnNarrow:el}),Y&&n.createElement(SlackbotAiPreviewBadge,null),k&&S&&n.createElement(EditTopicLabelButton,{channelId:t}),n.createElement(R.l,{channelId:t}),n.createElement(f.A,{id:A})),y&&n.createElement(sH.e,{channelId:t}),!i&&n.createElement(ViewHeaderTopic,{id:t}),m===P.q.App&&n.createElement(nE,{channelId:t})),!a&&n.createElement(nh,{id:t}),_&&(!v||I===K.mq.Split)&&n.createElement(d.Ay,{key:O.ks.CloseTile,tip:e,position:"bottom-right",delay:d.PK,hideFromScreenReader:!0},n.createElement(o.A,{svgIconProps:s3,onClick:er,"aria-label":e,className:"p-ia__view_header__button--close"})))},[p,j,X,G?.viewType,G?.id,m,N,g,E,C,r,v,t,i,el,Y,k,S,A,y,a,_,I,er,Q]);if(T||t===sa.c.Empty)return null;let eo=!w,ec=F&&(V||t===sa.c.Drafts||t===sa.c.Sent||t===sa.c.Inbox||t===sa.c.ScheduledMessages||!W&&G?.viewType===u.D.AppSpace)||q&&t===sJ.E.allThreads,ed=s()("p-view_header","p-view_header--tiles","p-view_header--with-star-header-icon",{"p-view_header--with-bookmarks-bar":w,"p-view_header--without-bookmarks-bar":eo,"p-view_header--solid":P.q.Doc===m||eo,"p-view_header--with-channel-canvas":L===s1.z.PRIMARY,"p-view_header--narrow":el,"p-view_header--without-bottom-border":ec,"p-view_header--with-channel-tabs":B&&!W,"p-view_header--visual-updates-m1":$}),em=s6.t("Primary view actions"),ep=n.createElement(c.A,{key:t,"aria-label":em,ref:ea,className:ed,"data-qa":"view_header"},ei()),eu=n.createElement(l.A,{eventId:eE.EventId.VIEW_HEADER,clogImpression:!1,disableAutoReferringUiContext:!0},ep,z),eh=G?.id||t;if((0,sY.A)(G??eh)){let e;(0,ap.Ay)(eh)||eh===P.q.ChannelCanvas?e="QuipHeaderView":G?.viewType===u.D.List&&(e="ListHeader");let t=(0,sj.A)({viewContainer:U??void 0});e&&(eu=n.createElement(s$.A,{id:e,index:t},eu))}return eu}ViewHeader.displayName="ViewHeader";let s9=(0,sF.t)((0,n2.A)((0,nc.N)((e,{id:t,container:a,windowId:n,getSiblingView:r,view:s,getPrimaryView:l})=>{let i=(0,s8.j)(e,{windowId:n})?.columnMode===s5.oZ.Single,o=(0,p.e)(e,{getPrimaryView:l}),c=!!s?.prev||a===K.mq.Secondary&&i&&!o,d=t||(r(e,{container:K.mq.Primary})?.id??""),u=(0,nX.gY)(d),h=!1;u?.isChannelHeaderHidden&&(h=u.isChannelHeaderHidden(e));let b=d===sG.XV,f=(0,sB.f)().params.entityId,{fileIdOrQuipThreadId:x}=(0,a_.EX)(t),g=(0,sQ.A)(x)?x:void 0,C=(0,s4.A)(e,{container:a,windowId:n}),y=(0,k.OL)(e,d);return{bookmarksEnabled:(0,sq.Nu)(e,t),isAllUnreadsPage:b,showQuipActivityHistoryHeader:!!(0,sW.O4)(e)&&(0,sZ.A)(f),hideHeader:h,viewType:(0,P.A)(e,t),isInstantSlackInviteeSession:(0,sU.A)(e),channelSpaceLayout:(0,s0.q7)(e,t)||void 0,viewCanBeClosed:C,fileId:g,experimentViewHeaderOverflowBordersGroupOn:"on"===(0,eo._Z)(e,"view_header_overflow_borders"),experimentIsHuddlesChannel:(0,aY.a$)(e)&&(0,E.cb)(y),experimentHideAllSidebarsGroupOn:(0,sX.Ob)(e),isRecord:(0,E.rI)(y),experimentChannelTabsV5GroupOn:(0,se.U6)(e),isVipAvailableForCurrentTeam:(0,m.Gn)(e),shouldShowBackButton:c,isAgent:(0,_.yB)(e,y),experimentSlackAiSuggestedTopicsGroupOn:(0,v.d2)(e),experimentMpdmTopicNamesGroupOn:(0,sM.h)(e),isChannelMember:(0,t6.bl)(y),experimentSidebarVisualUpdatesM1Enabled:(0,A.in)(e),showSlackbotPreviewBadge:(0,s2.N)(e,t),experimentDesktopUiSimplificationGroupOn:(0,sX.hi)(e),experimentTodayPageGroupOn:(0,sK.d9)(e)}})(ViewHeader)))},0x18b99f8ca:(e,t,a)=>{"use strict";a.d(t,{S:()=>o});var n=a(0xe874a88a),r=a(0x22a29f141),s=a(0x1dfdeb1c8),l=a(0x1ec68d6a3),i=a(0xe747dd27);let o=(0,s.A)("aiApps.history generated fetcher",(e,t,a)=>new n.S((n,s)=>{let{abortSignal:o,reason:c,...d}=a,m=(0,i.VA)(d);e((0,r.apiCall)({method:"aiApps.history",args:m,abortSignal:o,reason:c})).then(e=>{n(e)}).catch(e=>{(0,l.Ay)({getState:t}).error(`API call to aiApps.history
						with reason ${c} failed, initiated by generated fetcher`),s(e)})}));o.meta={name:"aiAppsHistoryFetcher",key:"createFetcherAiAppsHistoryFetcher",description:"aiApps.history generated fetcher"}},0x215f010e4:(e,t,a)=>{"use strict";a.d(t,{A:()=>TraceNavigation});var n=a(0xbad225b5),r=a(0xd843ab47),s=a(0xedbc2765),l=a(0x1229d92d),i=a(0x226892387),o=a(0xe822f938);function TraceView({label:e,id:t,visible:a,upToDate:r,remove:l,viewName:c,windowRef:d,splitView:m}){let p=(0,i.d4)(o.b0),u=(0,n.useRef)(p||-1);return(0,n.useEffect)(()=>{let cancel=a=>{s.LI.has({label:e,id:t})&&("blur"===a.type?s.LI.remove({label:e,id:t,reason:"refocused"}):"offline"===a.type?s.LI.remove({label:e,id:t,reason:"not_online"}):"visibilitychange"===a.type&&d.deref()?.document.hidden&&s.LI.addTags({label:e,id:t,tags:{was_hidden:!0}}))};return d.deref()?.addEventListener("visibilitychange",cancel),d.deref()?.addEventListener("offline",cancel),d.deref()?.addEventListener("blur",cancel),()=>{d.deref()?.addEventListener("visibilitychange",cancel),d.deref()?.removeEventListener("offline",cancel),d.deref()?.removeEventListener("blur",cancel)}},[e,t]),s.LI.has({label:e,id:t})&&p!==u.current&&s.LI.remove({label:e,id:t,reason:"refocused"}),u.current=p||-1,(0,n.useEffect)(()=>{s.LI.has({label:e,id:t})&&(c&&s.LI.addTags({label:e,id:t,tags:{view_name:c}}),m&&s.LI.addTags({label:e,id:t,tags:{split_view_present:!0}}))},[t,e,c,m]),(0,n.useEffect)(()=>{l&&s.LI.has({label:e,id:t})&&s.LI.remove({label:e,id:t,reason:"manual"})},[l,e,t]),(0,n.useEffect)(()=>{a&&s.LI.has({label:e,id:t})&&(d.deref()?.document.hasFocus()?s.LI.markPhase({label:e,id:t,phase:s.a0.Visible}):s.LI.remove({label:e,id:t,reason:"refocused"}))},[a,e,t]),(0,n.useEffect)(()=>{r&&s.LI.has({label:e,id:t})&&(d.deref()?.document.hasFocus()?s.LI.markPhase({label:e,id:t,phase:s.a0.UpToDate}):s.LI.remove({label:e,id:t,reason:"refocused"}))},[r,e,t]),null}let c=(0,l.A)(TraceView);var d=a(0x9271cc31);function TraceNavigation({visible:e,upToDate:t,remove:a,viewName:l}){let{activeTab:o,view:m,navigationTraceId:p}=(0,n.useContext)(r.A),u=(0,i.d4)(d.Oy),h=m?.viewType;return o&&h&&p?n.createElement(c,{label:s.gC.Navigation,id:p,visible:e,upToDate:t,remove:a,viewName:l,splitView:u}):null}TraceNavigation.displayName="TraceNavigation"},0xecc921bc:(e,t,a)=>{"use strict";a.d(t,{D:()=>r});var n=a(0xd89ed9da);let r=(0,a(0x11c82607b).Ay)("Convert timestamp to human readable datetime",(e,t,{timestamp:a,do24hrTime:r,uncapitalized:s=!0})=>{let l=t();return(0,n.A)(l,a,{do24hrTime:r,uncapitalized:s})});r.meta={name:"toHumanReadableDateAndTime",key:"createThunkToHumanReadableDateAndTime",description:"Convert timestamp to human readable datetime"}},0x3d75f87c:(e,t,a)=>{"use strict";a.d(t,{L:()=>o,R:()=>c});var n=a(0x139aa1a7),r=a(0x11c82607b),s=a(0x665ca02e),l=a(0x19895585a),i=a(0x9271cc31);let o=(0,r.Ay)("Updates the active thread state for any child windows that have this channel open as an AppSpace",(e,t,{channelId:a,threadTs:r})=>{let o=t();(0,i.f6)(o).forEach(t=>{let c=(0,i.Yi)(o,{container:l.mq.Primary,windowId:t});c?.id===a&&c?.viewType===n.D.AppSpace&&e((0,s.ZU)({channelId:a,threadTs:r,isSplitView:!1,windowId:t}))})});o.meta={name:"setAgentHomeActiveThreadForChildWindows",key:"createThunkSetAgentHomeActiveThreadForChildWindows",description:"Updates the active thread state for any child windows that have this channel open as an AppSpace"};let c=(0,r.Ay)("Sets the active thread on the agent home view using the right window id and split view state",async(e,t,{channelId:a,threadTs:r})=>{let c=t(),d=(0,i.e6)(c),m=(0,i.F8)(c,{tab:d,container:l.mq.Primary}),p=(0,i.Oy)(c),u=!!(p&&p.viewType===n.D.AgentHomeConversation&&p.params?.channelId===a);u&&e((0,s.ZU)({channelId:a,threadTs:r,isSplitView:u})),m?.id===a&&(m?.viewType===n.D.AgentHomeConversation||m?.viewType===n.D.AppSpace)&&e((0,s.ZU)({channelId:a,threadTs:r,isSplitView:!1})),e(o({channelId:a,threadTs:r}))});c.meta={name:"maybeSetAgentHomeActiveThread",key:"createThunkMaybeSetAgentHomeActiveThread",description:"Sets the active thread on the agent home view using the right window id and split view state"}},0x1804d4b8b:(e,t,a)=>{"use strict";a.d(t,{L:()=>i});var n=a(0x11cdf8541),r=a(0x11c82607b),s=a(0x665ca02e),l=a(0x216a87ae3);let i=(0,r.Ay)("Call subscriptions.thread.getView and merge in results",async(e,t,{channelId:a,isLoading:r,isSplitView:i},o)=>{let c=t(),{windowId:d}=o(n.C),m=(0,l.Q6)(c,a,i,d),p=(0,l.e5)(c,a,i,d);m&&r&&!p||e((0,s.D_)({channelId:a,isLoading:r,isSplitView:i}))});i.meta={name:"maybeSetAgentHomeViewModeLoading",key:"createThunkMaybeSetAgentHomeViewModeLoading",description:"Call subscriptions.thread.getView and merge in results"}},0xaf1c3c94:(e,t,a)=>{"use strict";a.d(t,{s:()=>c});var n=a(0x194add20b),r=a(0xe8e28706),s=a(0x151a93a75),l=a(0x1cf0d97e1),i=a(0x20c81ddcb),o=a(0x14149c126);let c=(0,l.Ay)((e,t)=>{let a=(0,s.JE)(e,t),l="on"===(0,o._Z)(e,"ai_consent_banner"),c=(0,s.R7)(t),{availableScopeIds:d,grantedScopeIds:m}=(0,i.iV)(e,c)??{},p=!!m&&m.length>0,u=!!d&&d.length>0,h=l&&(0,r.UH)(e,c)&&!(0,n.kJ)(c)&&(u||p);return a||h});c.meta={name:"shouldShowAppPermissions",key:"createSelectorShouldShowAppPermissions",description:(e,t)=>{let a=(0,s.JE)(e,t),l="on"===(0,o._Z)(e,"ai_consent_banner"),c=(0,s.R7)(t),{availableScopeIds:d,grantedScopeIds:m}=(0,i.iV)(e,c)??{},p=!!m&&m.length>0,u=!!d&&d.length>0,h=l&&(0,r.UH)(e,c)&&!(0,n.kJ)(c)&&(u||p);return a||h}}},0x1ba78943d:(e,t,a)=>{"use strict";a.d(t,{Y:()=>s,y:()=>r});var n=a(0xcf658893);let r=(0,n.Ay)("Sets AI memories for the current user");r.meta={name:"setAiMemories",key:"createActionSetAiMemories",description:"Sets AI memories for the current user"};let s=(0,n.Ay)("Removes the AI memory with the given memoryId from the store");s.meta={name:"removeAiMemory",key:"createActionRemoveAiMemory",description:"Removes the AI memory with the given memoryId from the store"}},0x6d8ce6ed:(e,t,a)=>{"use strict";a.d(t,{t:()=>d});var n=a(0x11c82607b),r=a(0xb9604b6),s=a(0xafce781a),l=a(0x20061cab9),i=a(0xf3c65e54),o=a(0x5b1935a6),c=a(0x1fcbb004d);let d=(0,n.Ay)("Dismiss Slack AI NFX tour",async(e,t,a)=>{let n=t();(0,r.Hp)(n,o.xu.LAUNCH_MODAL)?await e((0,l.Ay)({spaceName:o.xu.LAUNCH_MODAL,action:a?.skipRecordingDismiss?o.hw.CLICK:o.hw.DISMISS})):(await e((0,i.A)({notificationName:o.ze.SLACK_AI_NUX_EDUCATION,action:a?.skipRecordingDismiss?o.hw.CLICK:o.hw.DISMISS})),e((0,c.O)())),await e((0,s.iR)({event:{type:o.jo.REQUEST_SPACES,spaces:[o.xu.SIDEBAR_MENU_HEADER,o.xu.IN_PRODUCT_COACHMARK]}}))});d.meta={name:"dismissSlackAiNfxTour",key:"createThunkDismissSlackAiNfxTour",description:"Dismiss Slack AI NFX tour"}},0xb2eafc44:(e,t,a)=>{"use strict";a.d(t,{$:()=>i});var n=a(0x5b3210ae),r=a(0x1ec68d6a3),s=a(0x11c82607b),l=a(0x1400f598e);let i=(0,s.Ay)("Fetches recap unread channels",async e=>{try{let t=await e((0,n.Z)({reason:"fetch-recap-unread-channels"}));if(!t.ok)return void(0,r.Ay)({label:"daily-digest"}).error(Error("failed to fetch recap unread channels"));e((0,l.$v)({channels:t.channels}))}catch{(0,r.Ay)({label:"daily-digest"}).error(Error("error fetching recap unread channels"))}});i.meta={name:"fetchRecapUnreadChannels",key:"createThunkFetchRecapUnreadChannels",description:"Fetches recap unread channels"}},0xbee164fb:(e,t,a)=>{"use strict";a.d(t,{_:()=>c});var n=a(0x1fa01bf86),r=a(0x12901f3b2),s=a(0x3711e82d),l=a(0x45012309),i=a(0x11c82607b),o=a(0x1400f598e);let c=(0,i.Ay)("Unsubscribes a list of channels from recap",async(e,t,{channelIds:a,reason:i})=>{if(0===a.length)return;let c=t(),d=await e((0,r.I)({reason:i,channels:a}));(0,n.Y)(c)&&d.ok&&(0,l.eo)({state:c}).track(s.EventId.CHANNEL_NOTIFICATION_SETTINGS_SET_MUTE,{value:!1,entry_point:"recap",channel_ids:a}),e((0,o.Pb)({channelIds:a}))});c.meta={name:"removeChannelsFromRecap",key:"createThunkRemoveChannelsFromRecap",description:"Unsubscribes a list of channels from recap"}},0x127c62b25:(e,t,a)=>{"use strict";a.d(t,{y:()=>w});var n=a(0xbad225b5),r=a(0xe0376d2),s=a(0x20482ad21),l=a(0x6e87d4ec),i=a(0x1fa01bf86),o=a(0x5eedb646),c=a(0x3711e82d),d=a(0x45012309),m=a(0x11c82607b),p=a(0x19c76d181);let u=(0,m.Ay)("Clog accepted channels from recommender modal or digest preview",async(e,t,{channelIdsInOrder:a,acceptedPreviewChannelIds:n,acceptedRecommendedChannelIds:r,acceptedManualChannelIds:s,recommendRequestId:l})=>{let i=t(),m=(0,d.eo)({state:i}),u=(0,p.WR)(i),clogRecommendAccept=({channelId:e,requestId:t})=>{let n=a.findIndex(t=>t===e),r={contexts:{ui_context:{ui_properties:{element_name:o.H.DIGEST_RECOMMENDER_RECOMMENDED_CHANNEL}}},request_id:t,selected_id_v2:String(e),selected_position:n,selected_type:"channel"};m.track(c.EventId.RECOMMEND_ACCEPT,r)},h=`recap_${u}`;n?.forEach(e=>{clogRecommendAccept({channelId:e,requestId:h})}),r?.forEach(e=>{clogRecommendAccept({channelId:e,requestId:l??""})}),s?.forEach(e=>{(({channelId:e,requestId:t})=>{let n=a.findIndex(t=>t===e);m.track(c.EventId.NATIVE_AI,{contexts:{ui_context:{ui_properties:{element_name:o.H.DIGEST_RECOMMENDER_MANUAL_CHANNEL}}},channel_id:e,selected_position:n,request_id:t})})({channelId:e,requestId:h})})});u.meta={name:"clogRecommendedRecapChannels",key:"createThunkClogRecommendedRecapChannels",description:"Clog accepted channels from recommender modal or digest preview"};var h=a(0x94a64c46),_=a(0x158bdfb1b),b=a(0x1ec68d6a3),A=a(0x204fe6114),f=a(0x1400f598e),x=a(0x1e3eb45fd),g=a(0x365a4cc3),E=a(0x6aa3bf15),C=a(0xb2eafc44),y=a(0xbee164fb),v=a(0x23b062cb3),k=a(0x25366f1fb),S=a(0x1fcbb004d),I=a(0x16ffed5ab);let N=new s.Ay("assistant"),w=(0,m.Ay)("Saves updates states for recap channels (adds, removes, mutes, unmutes). Will trigger muted channel NUX, add channel clogs.",async(e,t,{modifiedChannels:a,isOnboardingMode:s,previewChannelIds:o,recommendedChannelIds:m,recommendRequestId:p})=>{let w=(0,b.Wo)({label:"daily-digest-save-modifed-recap-channels"}),T=(0,g.T7)(t()),M=(0,x.YX)(t());s&&e((0,f.Nb)(!0));let R=Object.entries(a).map(([e,t])=>({channelId:e,...t})),O=R.map(e=>e.channelId),P=R.filter(e=>!0===e.isMuted).map(e=>e.channelId),D=R.filter(e=>!1===e.isMuted).map(e=>e.channelId),L=R.filter(e=>e.isRecapped).map(e=>e.channelId),U=R.filter(e=>!1===e.isRecapped).map(e=>e.channelId),H=O.filter(e=>!U.includes(e)),F=(0,r.A)([...L,...H]);if(e((0,S.O)()),F.length>0){try{let a=await e((0,h.G)({reason:"recap-manage-channels-modal",channels:F,unmutedChannels:s?F:D}));(0,i.Y)(t())&&a.ok&&(0,d.eo)({state:t()}).track(c.EventId.CHANNEL_NOTIFICATION_SETTINGS_SET_MUTE,{value:!0,entry_point:"recap",channel_ids:L}),M&&e((0,C.$)())}catch(t){return w.error(Error(`${t}`)),e((0,v.r)())}L.length>0&&e((0,f.GI)({channelIds:L})),s||P.forEach(t=>{e((0,A.t)({id:t,muted:!0}))}),D.forEach(t=>{e((0,A.t)({id:t,muted:!1}))})}if(U?.length>0){try{await e((0,y._)({channelIds:U,reason:"recap-manage-channels-modal"}))}catch(t){return w.error(Error(`${t}`)),e((0,v.r)())}U.forEach(t=>{e((0,A.t)({id:t,muted:!1}))})}let V=(0,g.Pq)(t());V&&V.isPreview&&!(0,g.T7)(t())&&!s&&e((0,f.d9)(!0)),s?e((0,_._)({newContentRefresh:M,reason:"recap-manage-channels-modal"})):e((0,f.Zn)(!0));let G=L.filter(e=>o?.includes(e)),B=L.filter(e=>m?.includes(e)),q=L.filter(e=>!o?.includes(e)&&!m?.includes(e));e(u({channelIdsInOrder:(0,r.A)([...G,...L]),acceptedPreviewChannelIds:G,acceptedManualChannelIds:q,acceptedRecommendedChannelIds:B,recommendRequestId:p})),T||e((0,k.P)({targetChannelId:L[0]}));let W=(0,E.e)(t(),{type:"summary"});if(!s){let t=n.createElement(l.A,{duration:3e3,svgIconProps:W},n.createElement("span",null,N.t("Changes to recap saved")));return e((0,I.M)({element:t}))}});w.meta={name:"saveModifiedRecapChannels",key:"createThunkSaveModifiedRecapChannels",description:"Saves updates states for recap channels (adds, removes, mutes, unmutes). Will trigger muted channel NUX, add channel clogs."}},0x23b062cb3:(e,t,a)=>{"use strict";a.d(t,{r:()=>d});var n=a(0xbad225b5),r=a(0x20482ad21),s=a(0x6e87d4ec),l=a(0x11c82607b),i=a(0x6aa3bf15),o=a(0x16ffed5ab);let c=new r.Ay("assistant"),d=(0,l.Ay)("An error toast displayed when updating a channel recap fails",async(e,t)=>{let a=(0,i.e)(t()),r=n.createElement(s.A,{duration:3e3,svgIconProps:a},n.createElement("span",null,c.t("Error occured, changes to recap not saved",{fallbackHash:"7f2f6a15cf8da2b27e5a4af47b58e7ad71c0b3d9",fallbackHashNs:"toast"})));return e((0,o.M)({element:r}))});d.meta={name:"showChannelRecapErrorToast",key:"createThunkShowChannelRecapErrorToast",description:"An error toast displayed when updating a channel recap fails"}},0x579f81ad:(e,t,a)=>{"use strict";a.d(t,{O:()=>D});var n=a(0xbad225b5),r=a(0x139aa1a7),s=a(0x1fa01bf86),l=a(0x1a84f8520),i=a(0x16cf1da63),o=a(0x20482ad21),c=a(0x11a296110),d=a(0x6e87d4ec),m=a(0x167c26d3),p=a(0x1fdec3e16),u=a(0x1550c1995),h=a(0xe1644a69),_=a(0x1ecc7f772),b=a(0x226892387),A=a(0x217553e42);let f=new o.Ay("assistant"),ToggleRecapChannelToast=({channelId:e,isDigested:t,wasChannelPreviouslyMuted:a,hasApiErrors:r,skipMutingCopy:s})=>{let l,o=(0,n.useRef)(null),x=(0,b.d4)(t=>(0,A.OL)(t,e)),g=(0,i.wA)(),E=(0,_.Mn)(x),C="",y=`#${E||"channel"}`;r?l=t?f.rt("Something went wrong. <b>{channelNameText}</b> not added to future recaps",{channelNameText:y}):f.rt("Something went wrong. <b>{channelNameText}</b> not removed from future recaps",{channelNameText:y}):r||(t?s?(l=f.rt("<b>{channelNameText}</b> added to future recaps",{channelNameText:y}),C=f.t("Manage channels")):a?l=f.rt("<b>{channelNameText}</b> added to future recaps",{channelNameText:y}):(l=s?f.rt("<b>{channelNameText}</b> added to future recaps and muted",{channelNameText:y}):f.rt("{channelNameText} added to future recaps and muted",{channelNameText:y}),C=f.t("Manage muting")):l=s?f.rt("<b>{channelNameText}</b> removed from future recap",{channelNameText:y}):a?f.rt("<b>{channelNameText}</b> removed from future recap and unmuted",{channelNameText:y}):f.rt("<b>{channelNameText}</b> removed from future recap",{channelNameText:y}));let v=(0,n.useCallback)(()=>{g((0,u.N)()),o.current?.hideToast()},[g]),k=(0,n.useMemo)(()=>n.createElement(c.Nm,{className:"p-ai_summary_ready_toast__item",onClick:v},n.createElement("span",{className:"p-ai_summary_ready_toast__subtitle"},n.createElement(p.A,{lines:1},C))),[v,C]),S=(0,h.T)({type:"summary"});return C?n.createElement(m.A,{svgIconProps:S,svgIconClassName:"p-ai_summary_ready_toast__icon",customButton:k,ref:o,duration:3e3},n.createElement("div",{className:"flex_one overflow_hidden"},n.createElement("div",null,l))):n.createElement(d.A,{duration:3e3,svgIconProps:S},n.createElement("span",{className:""},l))};ToggleRecapChannelToast.displayName="ToggleRecapChannelToast";var x=a(0xbaaab71e),g=a(0x94a64c46),E=a(0x12901f3b2),C=a(0x3711e82d),y=a(0x45012309),v=a(0x1ec68d6a3),k=a(0x11c82607b),S=a(0x8baf11b5),I=a(0x1ccef1c6f),N=a(0x1400f598e),w=a(0x1e3eb45fd),T=a(0x365a4cc3),M=a(0xb2eafc44),R=a(0x25366f1fb),O=a(0x16ffed5ab),P=a(0x19895585a);let D=(0,k.Ay)("Adds or removes a channel from daily digest",async(e,t,{channelId:a,isDigested:i,skipMuting:o},c)=>{let d,m=0,p=t(),u=(0,T.Pq)(p),h=(0,T.T7)(p),_=(0,w.YX)(p),{getViewSet:b}=c(x.U),A=b(p)||{},f=A?.[P.mq.Primary]?.viewType===r.D.DailyDigest,k=(0,S.B)(p,a);!i&&!u?.isPreview&&(e((0,N.pt)({channelId:a})),(0,I.ty)(p,"a11y_animations")&&f&&(m=300)),setTimeout(async()=>{let r;e((0,N.mt)({channelId:a,isDigested:i})),u?.isPreview&&!h&&e((0,N.d9)(!0));let c=!1;try{let t=i?await e((0,g.G)({reason:"add-to-daily-digest",channelId:a,unmutedChannels:o&&!k?[a]:[]})):await e((0,E.I)({reason:"remove-from-daily-digest",channelId:a}));_&&e((0,M.$)()),(d=t.ok&&i&&!h&&f)&&e((0,R.P)({targetChannelId:a})),(0,s.Y)(p)&&t.ok&&(0,y.eo)({state:p}).track(C.EventId.CHANNEL_NOTIFICATION_SETTINGS_SET_MUTE,{value:i,entry_point:"recap"}),t.ok||((0,v.Ay)({label:"daily-digest"}).error(Error("Failed to toggle daily digest for channel")),c=!0)}catch(e){r=e?.data?.error,(0,v.Ay)({label:"daily-digest"}).error(Error("Error toggling daily digest for channel")),c=!0}finally{if(!d){let t;t=r===g.L.ChannelSubscriptionLimitReached?n.createElement(l.P,{channelIds:[a]}):(({channelId:e,isDigested:t,hasApiErrors:a,wasChannelPreviouslyMuted:r,skipMutingCopy:s})=>n.createElement(ToggleRecapChannelToast,{channelId:e,isDigested:t,wasChannelPreviouslyMuted:r,hasApiErrors:a,skipMutingCopy:s}))({channelId:a,isDigested:i,hasApiErrors:c,wasChannelPreviouslyMuted:k,skipMutingCopy:o}),e((0,O.M)({element:t}))}e((0,N.pt)({channelId:null})),c&&(e((0,N.mt)({channelId:a,isDigested:!i})),u&&u.isPreview&&(0,T.T7)(t())&&e((0,N.d9)(!1)))}},m)});D.meta={name:"toggleDailyDigestForChannel",key:"createThunkToggleDailyDigestForChannel",description:"Adds or removes a channel from daily digest"}},0x25366f1fb:(e,t,a)=>{"use strict";a.d(t,{P:()=>c});var n=a(0x11c82607b),r=a(0x1400f598e),s=a(0x217553e42),l=a(0xb9604b6),i=a(0xafce781a),o=a(0x5b1935a6);let c=(0,n.Ay)("Fetch target channel for the NUX tour",async(e,t,{targetChannelId:a})=>{a&&(0,s.OL)(t(),a)&&(await e((0,i.iR)({event:{type:o.jo.DIGEST_CHANNEL_ADDED}})),(0,l.Hp)(t(),o.xu.IN_PRODUCT_COACHMARK)===o.ze.SLACK_AI_DIGEST_ADDED_CHANNEL_EDUCATION&&e((0,r.zD)(a)))});c.meta={name:"triggerDigestAddedChannelCoachmark",key:"createThunkTriggerDigestAddedChannelCoachmark",description:"Fetch target channel for the NUX tour"}},0x81aa8a82:(e,t,a)=>{"use strict";a.d(t,{A:()=>f});var n=a(0x21f3c49e8),r=a(0x7d48dd65),s=a(0x839ba347),l=a(0x18af67efb),i=a(0x17294c72a),o=a(0x20bafd237),c=a(0x1ee15af19),d=a(0x21d6ed371),m=a(0x1337d9fa2),p=a(0x105ecbbed),u=a(0x1ec68d6a3),h=a(0x11c82607b),_=a(0x1f3db393),b=a(0x1a22a97a4);let A=(0,h.Ay)("Add threads and messages to the relevant stores",(e,t,a)=>{let{threads:h,isProcessingAiAppThreads:A=!1}=a,f=(0,u.Ay)({getState:t,label:"ALL-THREADS-STORE"}),x=[];h?h.forEach(t=>{if(!t.root_msg)return void f.error("subscriptions.thread.getView: missing root_msg");if(!t.root_msg.ts)return void f.error(`#incd-200925-4189: root_msg has no ts; [${t.root_msg.channel}, ${t.root_msg.thread_ts}, ${t.root_msg.subtype}]`);if(!t.root_msg.thread_ts&&!A)return void f.error(`subscriptions.thread.getView: root_msg has no thread_ts; ${t.root_msg.channel}-${t.root_msg.ts}`);if(!t.root_msg.channel)return void f.error("subscriptions.thread.getView: no channel ID on root message");if(!t.root_msg.subscribed&&!A)return void f.error(`subscriptions.thread.getView: not subscribed to ${t.root_msg.channel}-${t.root_msg.ts}`);let a=t.unread_replies||[],u=t.latest_replies||[],h=t.root_msg,g=(0,p.Iu)(h.channel,h.ts),E=a.concat(u);if((0,n.A)(E)&&!A)return void f.error(`subscriptions.thread.getView: no replies for ${g}`);let C=(0,r.A)(E,e=>!e.ts);C.length&&f.error(`#incd-200925-4189: got a reply (${C.length}) with no ts for ${g}`);let y=(0,r.A)(E,m.SM);if(y.length&&(0,s.A)(y,e=>{e.root&&e.root.ts||f.error(`#incd-200925-4189: missing root ts in ${e.ts} in ${g}`)}),E.length){let e=(0,l.A)(E,"ts");e.length!==E.length&&(f.error(`subscriptions.thread.getView: duplicate replies to ${t.root_msg.channel}-${t.root_msg.ts}`),E=e),E=(0,i.A)(E,"ts")}let[v,...k]=e((0,_.A)({imsgs:[h,...E],channelId:h.channel}));(0,d.UV)(h)>E.length?(e((0,b.A)({msgs:[v],channelId:g,oldest:h.ts,hasMore:{hasMoreStart:!1,hasMoreEnd:!0}})),e((0,b.A)({msgs:k,channelId:g,latest:(0,o.A)(E)?.ts,oldest:(0,c.A)(E)?.ts,hasMore:{hasMoreStart:!0,hasMoreEnd:!1}}))):e((0,b.A)({msgs:[v,...k],channelId:g,latest:(0,o.A)(E)?.ts,hasMore:{hasMoreStart:!1,hasMoreEnd:!1}})),x.push({threadKey:(0,p.Iu)(h.channel,h.ts),sortTs:((0,o.A)(k)||h).ts,hasUnreads:a.length>0,isPriority:!!t.priority})}):f.error("subscriptions.thread.getView: missing threads");let g=(0,i.A)(x,({sortTs:e,hasUnreads:t}={})=>`${+!!t}-${e}`).reverse();return(0,n.A)(g)?{allThreads:[],cursorTs:void 0,maxTs:void 0}:{allThreads:g,cursorTs:(0,o.A)(g).sortTs,maxTs:(0,c.A)(g).sortTs}});A.meta={name:"processThreads",key:"createThunkProcessThreads",description:"Add threads and messages to the relevant stores"};let f=A},0x7041edd8:(e,t,a)=>{"use strict";a.d(t,{Y:()=>n});let n=(0,a(0xcf658893).Ay)("upsert app team context to the store");n.meta={name:"upsertAppHomeContextTeam",key:"createActionUpsertAppHomeContextTeam",description:"upsert app team context to the store"}},0xbb9da753:(e,t,a)=>{"use strict";a.d(t,{A:()=>o});var n=a(0x105b0d320),r=a(0x11c82607b),s=a(0x9b971e7e),l=a(0x1dd8fbd34);let i=(0,r.Ay)("Reload view",(e,t,{id:a})=>{let r=t(),i=(0,s.ZT)(r);(0,n.A)(a)&&i&&(0,l.S)().fetchObjectWithId(i,a)});i.meta={name:"reloadView",key:"createThunkReloadView",description:"Reload view"};let o=i},0x1cc3e0618:(e,t,a)=>{"use strict";a.d(t,{$f:()=>c,Fo:()=>m,s5:()=>u,uE:()=>i});var n=a(0x1cf0d97e1),r=a(0x11c82607b),s=a(0xce702808),l=a(0x14149c126);let i=(0,n.Ay)(e=>(0,l.ze)(e,"invite_entrypoints_small_tenured"));i.meta={name:"inviteEntrypointsSmallTenuredGetAssignment",key:"createSelectorInviteEntrypointsSmallTenuredGetAssignment",description:e=>(0,l.ze)(e,"invite_entrypoints_small_tenured")};let o=(0,n.Ay)(e=>"control"===(0,l.ze)(e,"invite_entrypoints_small_tenured"));o.meta={name:"inviteEntrypointsSmallTenuredIsControl",key:"createSelectorInviteEntrypointsSmallTenuredIsControl",description:e=>"control"===(0,l.ze)(e,"invite_entrypoints_small_tenured")};let c=(0,n.Ay)(e=>"treatment"===(0,l.ze)(e,"invite_entrypoints_small_tenured"));c.meta={name:"inviteEntrypointsSmallTenuredIsTreatment",key:"createSelectorInviteEntrypointsSmallTenuredIsTreatment",description:e=>"treatment"===(0,l.ze)(e,"invite_entrypoints_small_tenured")};let d=(0,n.Ay)(e=>["treatment"].includes((0,l.ze)(e,"invite_entrypoints_small_tenured")??""));d.meta={name:"inviteEntrypointsSmallTenuredIsAnyTreatment",key:"createSelectorInviteEntrypointsSmallTenuredIsAnyTreatment",description:e=>["treatment"].includes((0,l.ze)(e,"invite_entrypoints_small_tenured")??"")};let m=(0,n.Ay)(e=>o(e)||d(e));m.meta={name:"inviteEntrypointsSmallTenuredIsExposed",key:"createSelectorInviteEntrypointsSmallTenuredIsExposed",description:e=>o(e)||d(e)};let p=(0,n.Ay)(e=>["aa_control","aa_treatment"].includes((0,l.ze)(e,"invite_entrypoints_small_tenured")??""));p.meta={name:"inviteEntrypointsSmallTenuredIsAAExposed",key:"createSelectorInviteEntrypointsSmallTenuredIsAAExposed",description:e=>["aa_control","aa_treatment"].includes((0,l.ze)(e,"invite_entrypoints_small_tenured")??"")};let u=(0,r.Ay)("Log exposure for the invite_entrypoints_small_tenured experiment if it is exposed",(e,t,{sendImmediately:a=!1}={})=>{let n=t();(m(n)||p(n))&&((e,{sendImmediately:t=!1}={})=>{let a=(0,l.KK)(e,"invite_entrypoints_small_tenured");a&&a.log_exposures&&(0,s.K)("invite_entrypoints_small_tenured",a,e,t)})(n,{sendImmediately:a})});u.meta={name:"inviteEntrypointsSmallTenuredMaybeLogExposure",key:"createThunkInviteEntrypointsSmallTenuredMaybeLogExposure",description:"Log exposure for the invite_entrypoints_small_tenured experiment if it is exposed"}},0x1b3f947f1:(e,t,a)=>{"use strict";a.d(t,{Ri:()=>i,aq:()=>r,eW:()=>s,m:()=>l,qX:()=>o});var n=a(0xcf658893);let r=(0,n.Ay)("Add user group IDs to the flexpane");r.meta={name:"addUserGroupIds",key:"createActionAddUserGroupIds",description:"Add user group IDs to the flexpane"};let s=(0,n.Ay)("Set the user groups flexpane scroll offset");s.meta={name:"saveScrollmark",key:"createActionSaveScrollmark",description:"Set the user groups flexpane scroll offset"};let l=(0,n.Ay)("Set the cursor mark");l.meta={name:"setCursorMark",key:"createActionSetCursorMark",description:"Set the cursor mark"};let i=(0,n.Ay)("Set the search query");i.meta={name:"setSearchQuery",key:"createActionSetSearchQuery",description:"Set the search query"};let o=(0,n.Ay)("Resets user groups flexpane list to initial state");o.meta={name:"resetUserGroupsFlexpane",key:"createActionResetUserGroupsFlexpane",description:"Resets user groups flexpane list to initial state"}},0x1f2aad211:(e,t,a)=>{"use strict";a.d(t,{A:()=>c});var n=a(0x5acf92f2),r=a(0x1ec68d6a3),s=a(0x11c82607b),l=a(0xaac3cc35);let i="BULK_EDIT_USER_GROUPS",o=(0,s.Ay)("Fetch and upsert the members of a user group",async(e,t,{groupId:a,teamId:s,users:o,reason:c="bulkEditUserGroupMembers"})=>{let d={};s&&(d.teamId=s);try{let{ok:t,usergroup:r}=await e((0,n.W)({usergroup:a,users:o,reason:c,...d}));if(t)return e((0,l.zz)({groupId:r?.id,users:r?.users})),r;return t}catch(e){throw(0,r.Ay)({getState:t}).error(i,e),Error(`${i} - ${e}`)}});o.meta={name:"bulkEditUserGroupMembers",key:"createThunkBulkEditUserGroupMembers",description:"Fetch and upsert the members of a user group"};let c=o},0x114056aef:(e,t,a)=>{"use strict";a.d(t,{A:()=>m});var n=a(0x1aba66b56),r=a(0x1673f3229),s=a(0x5acf92f2),l=a(0x61f75169),i=a(0x1ec68d6a3),o=a(0x11c82607b),c=a(0x475c9cfe);let d=(0,o.Ay)("Remove a group member from a user group",(e,t,{groupId:a,memberId:o,reason:d="removeUserGroupMember"})=>{let m=(0,i.Ay)({getState:t}),p=(0,c.lJ)(t(),a),u=(0,l.IM)(p);if(!(0,n.A)(u,o))return m.warn(`removeUserGroupMember: No member with id ${o} found in groupId ${a}`);let h=(0,r.A)(u,o);return e((0,s.W)({usergroup:a,users:h,reason:d})).catch(e=>{throw m.error("USER_GROUPS",`Error in removeUserGroupMember: ${JSON.stringify(e)}`),e})});d.meta={name:"removeUserGroupMember",key:"createThunkRemoveUserGroupMember",description:"Remove a group member from a user group"};let m=d},0x11cd1a647:(e,t,a)=>{"use strict";a.d(t,{p:()=>l});var n=a(0x11c82607b),r=a(0x1ccef1c6f),s=a(0x12f41fc32);let l=(0,n.Ay)("User has seen the user group sections new badge; record for new badge decay",(e,t)=>{let a=(0,r.ty)(t(),"seen_usergroup_section_new_badge")??0;e((0,s.AZ)({pref:"seen_usergroup_section_new_badge",value:a+1}))});l.meta={name:"seenUserGroupSectionsNewBadge",key:"createThunkSeenUserGroupSectionsNewBadge",description:"User has seen the user group sections new badge; record for new badge decay"}},0x15840cd33:(e,t,a)=>{"use strict";a.d(t,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var n=a(0x19895585a),r=a(0x9271cc31);let __WEBPACK_DEFAULT_EXPORT__=(e,{windowId:t=n.N2,container:a=n.mq.Primary}={})=>t===n.N2?(0,r.F8)(e,{tab:(0,r.e6)(e),container:a})?.params?.tabId:(0,r.Yi)(e,{windowId:t,container:a})?.params?.tabId},0x4d2e7b47:(e,t,a)=>{"use strict";a.d(t,{X:()=>isViewStale});var n=a(0x15f4f83cf);let isViewStale=e=>!!(0,n.uz)(e)&&!!e.isStale},0xe4034a92:(e,t,a)=>{"use strict";a.d(t,{m:()=>n});let n=(0,a(0x1cf0d97e1).Ay)((e,t)=>{});n.meta={name:"getExternalSelfWorkspaceHostId",key:"createSelectorGetExternalSelfWorkspaceHostId",description:(e,t)=>{}}},0x1344f0076:(e,t,a)=>{"use strict";a.d(t,{q:()=>toDateObjectDayjs});var n=a(0x25405bc17),r=a(0x1f355b555);function toDateObjectDayjs(e,{parseFormat:t="unix",returnDayjs:a}={}){let s,l;if(r.Ay.isDayjs(e))return a?e:(0,r.Ay)(e).toDate();if((0,n.A)(e))return a?(0,r.Ay)(e.getTime()):e;let i="unix"!==t;return(i&&"string"==typeof e&&(l=e),i||"string"!=typeof e&&"number"!=typeof e||(l="string"==typeof e?parseFloat(e):e),i&&(s=(0,r.Ay)(l,t)),i||"number"!=typeof l||(s=l.toString().split(".")[0].length>11?(0,r.Ay)(l):r.Ay.unix(l)),a)?s||(0,r.Ay)():s?(0,r.Ay)(s).toDate():(0,r.Ay)().toDate()}},0x33830eed:(e,t,a)=>{"use strict";let n,r;a.d(t,{Ay:()=>p});var s=a(0xe874a88a),l=a(0x20482ad21),i=a(0x1f7b0911b),o=a(0x3ed00af5),c=a(0x11c82607b);let d=new l.Ay("user_groups");function initErrorStrings(e){n={hasHandleRequiredWarning:d.t("Please enter a handle for this group."),hasMaxLengthWarning:d.t("Handles can\u2019t be more than {maxLength} characters.",{maxLength:80}),hasReservedHandle:d.t("The group name @{handle} is reserved and cannot be used.",{handle:e}),hasSpecialsWarning:d.t("Handles can only contain letters or numbers."),hasPunctuationWarning:d.t("Handles can only contain letters or numbers."),hasLowercaseWarning:d.t("Handles can only be in lowercase."),hasHandleTakenWarning:d.t("This handle is already in use by a member, channel, or another group."),nonLatinCharacterWarning:d.t("Handles can only contain letters or numbers."),unknownError:d.t("Sorry, something went wrong. Please try a different handle.")}}function initReservedHandles(){r={admins:d.t("admins"),owners:d.t("owners")}}let m=(0,c.Ay)("Validate user group handle",(e,t,{handle:a,prevHandle:l,reason:c,targetTeam:d})=>(initErrorStrings(a),initReservedHandles(),a&&a.trim())?a===l?s.S.resolve(""):a.toLowerCase()===r.admins.toLowerCase()||a.toLowerCase()===r.owners.toLowerCase()?s.S.resolve(n.hasReservedHandle):/[ ,;'`~!@#$%^&*+=\\:"<>?|]/.test(a.trim())?s.S.resolve(n.hasSpecialsWarning):/^[-|_]+$/.test(a)?s.S.resolve(n.hasPunctuationWarning):/[A-Z]/.test(a)?s.S.resolve(n.hasLowercaseWarning):(0,o.A)(a)>80?s.S.resolve(n.hasMaxLengthWarning):e((0,i.S)({handle:a,reason:c,targetTeam:d})).then(()=>"").catch(e=>{let t=e?.data?.error;return"handle_already_exists"===t?n.hasHandleTakenWarning:"bad_handle"===t?n.nonLatinCharacterWarning:n.unknownError}):s.S.resolve(n.hasHandleRequiredWarning));m.meta={name:"validateUserGroupHandle",key:"createThunkValidateUserGroupHandle",description:"Validate user group handle"};let p=m;Object.defineProperty({},"handleErrorStrings",{get:()=>n,set:e=>{n=e}})},0x15e263568:(e,t,a)=>{"use strict";let n,r;a.d(t,{Ay:()=>p});var s=a(0xe874a88a),l=a(0x20482ad21),i=a(0x69509bae),o=a(0x3ed00af5),c=a(0x11c82607b);let d=new l.Ay("user_groups");function initErrorStrings(e){r={hasNameRequiredWarning:d.t("Please enter a name for this group."),hasReservedName:d.t('The name "{name}" is reserved and cannot be used.',{name:e}),hasMaxLengthWarning:d.t("Names can\u2019t be more than {maxLength} characters.",{maxLength:80}),hasNameTakenWarning:d.t("This name is already in use by another group."),unknownError:d.t("Sorry, something went wrong. Please try a different name.")}}function initReservedNames(){n={admins:d.t("Team Admins"),owners:d.t("Team Owners")}}let m=(0,c.Ay)("Validate user group name",async(e,t,{name:a,prevName:l,reason:c,targetTeam:d})=>{if(initErrorStrings(a),initReservedNames(),!a||!a.trim())return s.S.resolve(r.hasNameRequiredWarning);let m=a.toLowerCase().trim();return l&&m===l.toLowerCase().trim()?s.S.resolve(""):m===n.admins.toLowerCase()||m===n.owners.toLowerCase()?s.S.resolve(r.hasReservedName):(0,o.A)(a)>80?s.S.resolve(r.hasMaxLengthWarning):e((0,i.N)({name:a,reason:c,targetTeam:d})).then(()=>"").catch(e=>"name_already_exists"===e?.data?.error?r.hasNameTakenWarning:r.unknownError)});m.meta={name:"validateUserGroupName",key:"createThunkValidateUserGroupName",description:"Validate user group name"};let p=m;Object.defineProperty({},"nameErrorStrings",{get:()=>r,set:e=>{r=e}})},0x1ccd2ebc8:(e,t,a)=>{"use strict";a.d(t,{T:()=>TeamOrEnterpriseIcon});var n=a(0xbad225b5),r=a(0x20ada2503),s=a(0x2376ea9bb);function TeamOrEnterpriseIcon({isNarrowWindow:e,className:t}){let{currentTeamName:a,currentTeamIcon:l}=(0,r.k)();return n.createElement(s.U,{icon:l,size:e?24:36,teamName:a,className:t})}TeamOrEnterpriseIcon.displayName="TeamOrEnterpriseIcon"},0x20ada2503:(e,t,a)=>{"use strict";a.d(t,{k:()=>useCurrentTeamInfo,q:()=>h});var n=a(0x1df96de4c),r=a(0x136939b88),s=a(0xd66cda03),l=a(0xa1832ae4),i=a(0x184deeba7),o=a(0x1bb02f2c4),c=a(0x9b971e7e),d=a(0x1d600678),m=a(0xdf55e8f3),p=a(0x226892387),u=a(0x1ee439e69);let h=(0,m.eI)(e=>{let t=(0,u.H7)(e),a=(0,u.fu)(e);if(!a)return null;let n=(0,d.x)(e,"use_workspace_icon_for_single_workspace_users",(0,l.ZT)(a)),r=(((0,c.kN)(e)??[]).length??0)===1,s=n&&r?a:null;if(s){let e=(0,l.F1)(t),a=(0,l.Rf)(s);return{teamName:e,teamIcon:a,teamUrl:(0,l.Zl)(t,"",!0),teamId:(0,l.ZT)(s)}}return null}),useCurrentTeamInfo=()=>{let e=(0,s.cw)(o.getAllWorkspaces)??n.Ml,t=(0,p.d4)(u.H7),a=(0,l.ZT)(t)??void 0,c=(0,p.d4)(h),d=(0,s.cw)(e=>(0,o.hasWorkspaceFailedToBoot)(e,a)),m=(0,s.cw)(o.getWorkspacesMeta),_=c?.teamId&&m?.[c?.teamId]?m?.[c?.teamId]:m?.[a],b=d?_?.icon:c?.teamIcon??(0,l.Rf)(t),A=d?_?.name:c?.teamName??(0,l.F1)(t),f=c?.teamUrl??(0,l.Zl)(t,"",!0),x=(0,p.d4)(r.y),g=(0,p.d4)(i.L);x&&g&&(b=r.X,A="Slack Corp");let E=e.filter(e=>e!==a).slice(0,2);return{currentTeamId:a,currentTeamName:A,currentTeamIcon:b,currentTeamUrl:f,otherWorkspaces:E}}},0x19d2eb08e:(e,t,a)=>{"use strict";a.d(t,{A:()=>ew});var n=a(0xbad225b5),r=a(0x11db163e2),s=a(0x16cf1da63),l=a(0x120c268ad),i=a.n(l),o=a(0x65455bc3),c=a(0x17294c72a),d=a(0x1cbdfeceb),m=a(0x20482ad21),p=a(0x11a296110),u=a(0x15f8e452a),h=a(0x7877defb),_=a(0x172fd810a),b=a(0x6dca35d8),A=a(0x228f4405d),f=a(0xbff972e0),x=a(0x2190b3693),g=a(0xc66ee342),E=a(0x157a21f39),C=a(0x71b12df5),y=a(0xa55583b6),v=a(0x1774bc1e8),k=a(0x12855ff08),S=a(0xbf92670f),I=a(0x1cf494e6d),N=a(0x1d8931caf),w=a(0x4c6fcfc3),T=a(0xa1755fb1),M=a(0x42a2d0a3),R=a(0x1ec69ee01),O=a(0x12185e091),P=a(0x1ecc7f772),D=a(0x280afe13),L=a(0x6f213e53),U=a(0x189391f29),H=a(0x114ffe897),F=a(0xf6ed6f31),V=a(0xbd3de346),G=a(0x108d3428e),B=a(0x76eb49bb),q=a(0x34046f51),W=a(0x143fb6398),K=a(0xa1832ae4),z=a(0x24a88897e),$=a(0x49e911f4),Y=a(0x3711e82d),j=a(0x13638bd77),X=a(0x7a48cfc4),Q=a(0x160cc4dd0),Z=a(0x6c4e5fb),J=a(0x1f0481a17),ee=a(0x226892387),et=a(0x19c76d181),ea=a(0x1d06e350e),en=a(0xf184ac53),er=a(0x217553e42),es=a(0x14149c126),el=a(0x672820bb),ei=a(0x1ee439e69);let eo=new m.Ay("channel_tabs"),ec={offsetX:-4,offsetY:-2},ed={uiStep:Y.UiStep.CHANNEL_DETAILS_JOIN,onClick:{enableClogAction:!0}};function AboutTab({channelId:e}){let t,a=(0,s.wA)(),r=(0,ee.d4)(e=>!(0,K.qR)((0,ei.H7)(e))),l=(0,ee.d4)(t=>(0,er.OL)(t,e)),m=(0,ee.d4)(t=>(0,w.A)(t,e)),Y=(0,ee.d4)(et.WR),em=(0,D.e)(l),ep=Y===em,eu=(0,ee.d4)(ei.H7),eh=(0,ee.d4)(e=>"on"===(0,es._Z)(e,"channel_manager_pilot")),e_=(0,ee.d4)(e=>(0,q._)(e,l)),eb=(0,ee.d4)(t=>(0,E.A)(t,e).length>0),eA=(0,ee.d4)($.DM),ef=(0,ee.d4)(e=>(0,z.P)(e,l)),ex=!(0,F.bl)(l)&&ef,eg=(0,ee.d4)(e=>(0,P.SB)(e,l))??"",eE=(0,ee.d4)(e=>(0,U.R)(e,l)),eC=(0,B.dp)(eu),ey=(0,O.JM)(l),ev=m===w.q.App,ek=!r&&!ey,[eS,eI]=(0,n.useState)(!0),eN=(0,n.useCallback)(async()=>{ek&&(eI(!0),a((0,en.y)({channelId:e,shouldFetchMemberObjects:!0})).then(()=>eI(!1)))},[a,e,ek]);(0,n.useEffect)(()=>{eh&&eN()},[eN,eh]);let ew=(0,n.useCallback)(()=>{a((0,j.b)({memberId:em}))},[em,a]),eT=(0,n.useCallback)(()=>{a((0,Z.$)({channelId:e,memberId:em,entryPoint:"about-tab"}))},[a,em,e]),eM=(0,n.useCallback)(()=>{a((0,X.C)({channelId:e}))},[a,e]),[eR,eO]=(0,n.useState)({isLoading:!0,fileIds:[],hasMore:!1});(0,n.useEffect)(()=>{a((0,el.e)({channelId:e,count:5,reason:"about-tab/sharedFiles"})).then(({files:e,paging:t})=>{let a=e?.filter(e=>!(0,G.A)(e));eO({isLoading:!1,fileIds:(0,o.A)((0,c.A)(a,e=>(0,V.VP)(e))).map(e=>e.id),hasMore:t&&t?.pages>1||!1})}).catch(()=>{eO({isLoading:!1,fileIds:[],hasMore:!1})})},[a,e]);let eP=(0,n.useCallback)(()=>{let t=ea.ri.CHANNEL_FILES,n=t===ea.ri.CHANNEL_FILES?{channelFilesId:`files-${e}`}:{};a((0,Q.A)({entity:t,initialFilter:{filter:"in",value:[e]},routeParams:n}))},[a,e]),eD=(0,n.useCallback)(e=>n.createElement(u.A,{...e,type:"add-user"}),[]),eL=(0,n.useCallback)(()=>a((0,J.A)({channelId:e,openModalProps:{isStackable:!0}})),[e,a]),eU=(0,n.useCallback)(()=>m===w.q.DM&&!ev&&!(0,L.F)(l)&&!ep&&!(0,H.D)(l)&&!(0,R.Cx)(l)&&(!r||!(0,W.ju)(l)),[l,ev,r,ep,m]),eH="";switch(m){case w.q.Channel:t=n.createElement(b.A,{id:e,isLoadingChannelManagers:eS,experimentChannelManagerPilotGroupOn:eh}),eH=eo.t("View more files shared in {channelDisplayName}",{channelDisplayName:eg});break;case w.q.DM:t=null,eH=eo.t("View more files shared in this conversation");break;case w.q.MPDM:t=null,eH=eo.t("View more files shared in this group DM");break;case w.q.App:t=n.createElement(_.A,{channelId:e});break;default:t=null}let eF=(0,M.V)(l)&&!r,eV=m===w.q.Channel&&((0,W.ju)(l)||eE),eG=m===w.q.DM,eB=eU(),eq=(0,n.useCallback)(()=>(0,H.D)(l)?n.createElement(S.A,{channelId:e,onOpenHelpCenter:d.A}):(0,R.Cx)(l)?n.createElement(I.Q,null):n.createElement(y.A,{memberId:em,onOpenProfile:ew,hidePhone:eC}),[l,eC,e,em,ew]),eW=n.createElement(n.Fragment,null,t,eG&&eq(),eB&&n.createElement(g.A,null,n.createElement(x.A,{ariaLabel:eo.t("Add people to this conversation"),onClick:eL,renderTitleIcon:eD,title:eo.t("Add people to this conversation"),dataQa:"invite-members"})),eV&&n.createElement(g.A,null,n.createElement(A.Vz,{id:e})),e_&&n.createElement(g.A,null,n.createElement(x.A,{ariaLabel:eo.t("Remove connection"),className:"sk_raspberry_red",onClick:eT,renderTitleIcon:e=>n.createElement(u.A,{...e,type:"times-circle"}),title:eo.t("Remove connection")}))),eK=n.createElement(h.$u,{id:e});return n.createElement("div",{className:"p-tabs__about_tab"},n.createElement("div",{className:"p-about_modal__title_controls"},(0,F.bl)(l)&&n.createElement(n.Fragment,null,n.createElement(T.A,{channelId:e,renderButton:({buttonProps:e,sectionIcon:t})=>n.createElement(p.Ay,{...e,className:i()("p-about_modal__section_picker",{"p-about_modal__section_picker--star_only":!eF}),size:"small",type:"outline"},t,eF&&n.createElement(u.A,{"aria-hidden":!0,className:"p-about_modal__action_icon_suffix",inline:!0,size:"inherit",type:"chevron-medium-down"})),triggerProps:ec}),n.createElement(v.y,{channel:l})),ex&&n.createElement(p.Ay,{className:"p-about_modal__join",onClick:eM,type:"primary",size:"small",autoClogProps:ed},eo.t("Join Channel")),n.createElement(N.A,{channelId:e,useIaDetailsStyle:!0})),eW,eb&&!eA&&eK,n.createElement(C.A,{id:e}),!ev&&!(0,H.D)(l)&&!(0,R.Cx)(l)&&n.createElement(k.A,{channel:l,isLoading:eR.isLoading,fileIds:eR.fileIds,hasMore:eR.hasMore,moreButtonAriaLabel:eH,onShowMoreClick:eP,onFileClick:d.A}),n.createElement(f.A,{copyText:e,copyTooltip:eo.t("Copy channel id")},eo.t("Channel ID: {channelId}",{channelId:e})))}AboutTab.displayName="AboutTab";var em=a(0x228a081c7),ep=a(0x5c09e6f0),eu=a(0x1b59f68c5),eh=a(0x43c785dd),e_=a(0x423127f),eb=a(0x90ed0101),eA=a(0x24920ed7f),ef=a(0x10a716a94),ex=a(0x130ce1117),eg=a(0x207fd1c2c),eE=a(0x96de2457),eC=a(0x182c9b0b0),ey=a(0x1ede77aa4),ev=a(0x1c91944c9),ek=a(0x1459852c4),eS=a(0x19895585a),eI=a(0x15840cd33);let TabView=({tab:e,primaryView:t,isAppIm:a})=>{let s,l=(0,ee.d4)(e=>(0,er.OL)(e,t)),i=(0,D.e)(l),o=(0,ee.d4)(et.WR),c=(0,ee.d4)(e=>(0,R._V)(e,l)),d=(0,ee.d4)(eE.c_),m=(0,eh.T)(),p=(0,n.useCallback)(e=>{"ArrowLeft"===e.key&&e.target.closest(`.${r.Gn}`)&&m()},[m]);if(!e)return null;let u=`${t}${e}`,h="p-tab_view__error_boundary",_=null;switch(e){case ek.K.About:a?(s=ek.K.About,_=n.createElement(ef.A,{subtype:"app_space",key:u,className:h},n.createElement(eA.A,{channelId:t}))):_=n.createElement(ef.A,{subtype:"about_tab",key:u,className:h},n.createElement(AboutTab,{channelId:t}));break;case ek.K.App:s=ek.K.App,_=n.createElement(ef.A,{subtype:"app_home",key:u,className:h},n.createElement(eb.A,{channelId:t}));break;case ek.K.Threads:if(!t)return null;s=ek.K.Threads,_=n.createElement(ef.A,{subtype:d?"agent_home_view_tab_view":"ai_app_history_tab_view",key:u,className:h},d?n.createElement(e_.C,{channelId:t}):n.createElement(eg.p,{channelId:t,currentUserId:o,lastRead:c,isChatView:!0}));break;case ek.K.Chat:s=ek.K.Chat,_=n.createElement(ef.A,{subtype:"app_threads",key:u,className:h},n.createElement(ex.default,{botUserId:i,isChatView:!0}));break;case ek.K.SFListView:s=ek.K.SFListView,_=n.createElement(ef.A,{subtype:"sf_list_view_tab",key:u,className:h},n.createElement(eu.c,{channelId:t,botUserId:i}));break;case ek.K.Memories:s=ek.K.Memories,_=n.createElement(ef.A,{subtype:"memories_tab",key:u,className:h},n.createElement(em.A,{channelId:t}));break;case ek.K.Tasks:s=ek.K.Tasks,_=n.createElement(ef.A,{subtype:"tasks_tab",key:u,className:h},n.createElement(ep.A,{botUserId:i}));break;default:_=n.createElement(n.Fragment,null,e)}return n.createElement("div",{onKeyDown:p,role:"tabpanel","aria-labelledby":s,style:{flexGrow:1,overflowY:"hidden"}},_)};TabView.displayName="TabView";let eN=(0,ev.N)((e,t)=>{let a=t.primaryView||t.getSiblingView(e,{container:eS.mq.Primary})?.id;return{tab:t.tab||(0,eI.A)(e,{windowId:t.windowId,container:t.container}),primaryView:a,isAppIm:(0,ey.K)(e,a)}}),ew=(0,eC.A)(eN(TabView))},0x228a081c7:(e,t,a)=>{"use strict";a.d(t,{A:()=>I});var n=a(0xbad225b5),r=a(0x16cf1da63),s=a(0x21f3c49e8),l=a(0x20482ad21),i=a(0x17e096b34),o=a(0xf2b9b0e6),c=a(0xf66117e7),d=a(0x96dd42eb),m=a(0xe874a88a),p=a(0x22a29f141),u=a(0x1dfdeb1c8),h=a(0x1ec68d6a3),_=a(0xe747dd27);let b=(0,u.A)("ai.alpha.sidekicks.getOrCreateMemoryCanvas generated fetcher",(e,t,a)=>new m.S((n,r)=>{let{abortSignal:s,reason:l,...i}=a,o=(0,_.VA)(i);e((0,p.apiCall)({method:"ai.alpha.sidekicks.getOrCreateMemoryCanvas",args:o,abortSignal:s,reason:l})).then(e=>{n(e)}).catch(e=>{(0,h.Ay)({getState:t}).error(`API call to ai.alpha.sidekicks.getOrCreateMemoryCanvas
						with reason ${l} failed, initiated by generated fetcher`),r(e)})}));b.meta={name:"aiAlphaSidekicksGetOrCreateMemoryCanvasFetcher",key:"createFetcherAiAlphaSidekicksGetOrCreateMemoryCanvasFetcher",description:"ai.alpha.sidekicks.getOrCreateMemoryCanvas generated fetcher"};var A=a(0x280afe13),f=a(0x1b9d5cc0c),x=a(0xa985ed31),g=a(0x107e97a6b),E=a(0x226892387),C=a(0x217553e42),y=a(0xe684f705),v=a(0x17c6237ae),k=a.n(v);let S=new l.Ay("sidekicks"),MemoriesTab=({channelId:e})=>{let t=(0,r.wA)(),[a,l]=(0,n.useState)(null),[m,p]=(0,n.useState)(!0),[u,h]=(0,n.useState)(null),_=(0,E.d4)(d.Q),v=(0,E.d4)(t=>(0,C.OL)(t,e)),I=(0,A.e)(v),N=(0,E.d4)(e=>(0,y.nv)(e,I)),w=(0,f.wg)(N);(0,s.A)(w)&&(w=_?S.t("Untitled Sidekick"):"Untitled Sidekick");let T=v?.properties?.memory_canvas?.file_id,M=a?(0,g.Lo)({id:a}):null;return((0,n.useEffect)(()=>{T?((0,x.A)(T)?l(T):h("Invalid existing canvas ID format"),p(!1)):v&&!a&&(p(!0),h(null),(async()=>{try{let a=await t(b({channelId:e,reason:"getOrCreateMemoryCanvas-for-memories-tab"}));if(a&&a.canvas&&a.canvas.id){let e=a.canvas.id;(0,x.A)(e)?l(e):h("Invalid canvas file ID format")}else h("Failed to create memory canvas")}catch{h("Error creating memory canvas")}finally{p(!1)}})())},[t,e,v,T,a]),_)?n.createElement("div",{style:{padding:"20px",height:"100%",display:"flex",flexDirection:"column"}},m&&n.createElement("div",{style:{flex:1}},n.createElement(c.A,{className:k().loading})),u&&n.createElement("div",{style:{color:"red",padding:"20px",textAlign:"center"}},n.createElement("p",null,S.t("Error loading memory canvas: {error}",{error:u})),n.createElement("p",null,S.t("Please try refreshing the tab."))),M&&!m&&!u&&n.createElement("div",{style:{flex:1,minHeight:"400px"}},n.createElement(o.A,{id:M},n.createElement(i.A,{entityId:M,shouldLiveUpdate:!0,overrideTitlePlaceholder:S.t("Memories"),overrideTextPlaceholder:S.t("Tell {agentName} what it should know about you. You can also ask {agentName} to remember things during conversations, and they\u2019ll show up here.",{agentName:w})}))),!a&&!m&&!u&&n.createElement("div",{style:{padding:"20px",textAlign:"center"}},n.createElement("p",null,S.t("No memory canvas available for this channel.")))):null};MemoriesTab.displayName="MemoriesTab";let I=MemoriesTab},0x5c09e6f0:(e,t,a)=>{"use strict";a.d(t,{A:()=>es});var n=a(0xbad225b5),r=a(0x16cf1da63),s=a(0x1f022ebd9),l=a(0x20482ad21),i=a(0x102edf836),o=a(0xb1ea448c),c=a(0x22b8621cf),d=a(0x11c86845f),m=a(0x32d3ef3d),p=a(0xfa28400d),u=a(0x10bae7b36),h=a(0x6e87d4ec),_=a(0x1f355b555),b=a(0x4bdf0df6),A=a(0x1d2cd7755),f=a(0x126f22530),x=a(0x5299a396),g=a(0x15dd8a31),E=a(0x6374e095),C=a(0x96dd42eb),y=a(0xe874a88a),v=a(0x22a29f141),k=a(0x1dfdeb1c8),S=a(0x1ec68d6a3),I=a(0xe747dd27);let N=(0,k.A)("ai.savedPrompts.addTrigger generated fetcher",(e,t,a)=>new y.S((n,r)=>{let{abortSignal:s,reason:l,...i}=a,o=(0,I.VA)(i);e((0,v.apiCall)({method:"ai.savedPrompts.addTrigger",args:o,abortSignal:s,reason:l})).then(e=>{n(e)}).catch(e=>{(0,S.Ay)({getState:t}).error(`API call to ai.savedPrompts.addTrigger
						with reason ${l} failed, initiated by generated fetcher`),r(e)})}));N.meta={name:"aiSavedPromptsAddTriggerFetcher",key:"createFetcherAiSavedPromptsAddTriggerFetcher",description:"ai.savedPrompts.addTrigger generated fetcher"};let w=(0,k.A)("ai.savedPrompts.create generated fetcher",(e,t,a)=>new y.S((n,r)=>{let{abortSignal:s,reason:l,...i}=a,o=(0,I.VA)(i);e((0,v.apiCall)({method:"ai.savedPrompts.create",args:o,abortSignal:s,reason:l})).then(e=>{n(e)}).catch(e=>{(0,S.Ay)({getState:t}).error(`API call to ai.savedPrompts.create
						with reason ${l} failed, initiated by generated fetcher`),r(e)})}));w.meta={name:"aiSavedPromptsCreateFetcher",key:"createFetcherAiSavedPromptsCreateFetcher",description:"ai.savedPrompts.create generated fetcher"};let T=(0,k.A)("ai.savedPrompts.update generated fetcher",(e,t,a)=>new y.S((n,r)=>{let{abortSignal:s,reason:l,...i}=a,o=(0,I.VA)(i);e((0,v.apiCall)({method:"ai.savedPrompts.update",args:o,abortSignal:s,reason:l})).then(e=>{n(e)}).catch(e=>{(0,S.Ay)({getState:t}).error(`API call to ai.savedPrompts.update
						with reason ${l} failed, initiated by generated fetcher`),r(e)})}));T.meta={name:"aiSavedPromptsUpdateFetcher",key:"createFetcherAiSavedPromptsUpdateFetcher",description:"ai.savedPrompts.update generated fetcher"};let M=(0,k.A)("ai.savedPrompts.updateTrigger generated fetcher",(e,t,a)=>new y.S((n,r)=>{let{abortSignal:s,reason:l,...i}=a,o=(0,I.VA)(i);e((0,v.apiCall)({method:"ai.savedPrompts.updateTrigger",args:o,abortSignal:s,reason:l})).then(e=>{n(e)}).catch(e=>{(0,S.Ay)({getState:t}).error(`API call to ai.savedPrompts.updateTrigger
						with reason ${l} failed, initiated by generated fetcher`),r(e)})}));M.meta={name:"aiSavedPromptsUpdateTriggerFetcher",key:"createFetcherAiSavedPromptsUpdateTriggerFetcher",description:"ai.savedPrompts.updateTrigger generated fetcher"};var R=a(0x1b9d5cc0c),O=a(0x20e80190e),P=a(0x226892387),D=a(0x19c76d181),L=a(0xe684f705),U=a(0x1fcbb004d),H=a(0x11eae4d05);let F=new l.Ay("work-objects");function BaseAgentTaskModal({botUserId:e,prompt:t,onAdded:a}){let s=(0,r.wA)(),l=(0,P.d4)(C.Q),[i,o]=(0,n.useState)(!1),c=(0,P.d4)(D.WR),d=(0,P.d4)(e=>(0,L.nv)(e,c,{preferNonExistentToNull:!1})),m=(0,R.et)(d)??b.vp,p=(0,n.useMemo)(()=>t&&t.triggers.length>0&&t.triggers[0].next_fire_at_ts?_.Ay.unix(t.triggers[0].next_fire_at_ts).tz(m).toISOString():(0,_.Ay)().tz(m).startOf("day").add(9,"hour").toISOString(),[m,t]),u=(0,n.useMemo)(()=>t&&t.triggers.length>0&&t.triggers[0].frequency||"weekly",[t]),h=l?F.t("Untitled task"):"Untitled task",[y,v]=(0,n.useState)(t?.name??h),[k,S]=(0,n.useState)(t?.prompt_text||""),[I,H]=(0,n.useState)(u),[V,G]=(0,n.useState)(p),B=(0,n.useMemo)(()=>[{label:"Hourly",value:"hourly"},{label:"Daily",value:"daily"},{label:"Weekly",value:"weekly"},{label:"Monthly",value:"monthly"}],[]),q=(0,n.useCallback)(e=>{G(e)},[]),W=(0,n.useCallback)(e=>{H(e.value)},[]),K=(0,n.useCallback)(()=>s((0,U.O)()),[s]),z=(0,n.useCallback)(async()=>{if(k&&!i){o(!0);try{let n;(n=t?await s(T({id:t.id,name:y,prompt:{text:k},reason:"update task from tasks tab"})):await s(w({agentUserId:e,name:y??h,prompt:{text:k},reason:"create task from tasks tab"}))).ok&&(n=t&&t.triggers.length>0?await s(M({id:t.triggers[0].id,savedPromptId:t.id,trigger:{type:"chronological",chronological:{frequency:I,nextFireAtTs:(0,_.Ay)(V).unix()}},reason:"update task from tasks tab"})):await s(N({savedPromptId:n.id,trigger:{type:"chronological",chronological:{frequency:I,nextFireAtTs:(0,_.Ay)(V).unix()}},reason:"create task from tasks tab"})),a?.(),K())}finally{o(!1)}}},[k,t,s,y,e,h,a,K,I,V,i]),$=!!t,Y=(0,n.useMemo)(()=>$?l?F.t("Update a task"):"Update a task":l?F.t("Add a task"):"Add a task",[l,$]);return n.createElement(O.dW,{isOpen:!0,closeModal:K,dataQa:"agent-task-modal",fullscreen:!1,labelledby:"agent-task-modal-title-bar"},n.createElement(O.rQ,null,n.createElement(O.Rc,{id:"agent-task-modal-title-bar",title:Y})),n.createElement(O.$m,null,n.createElement(O.qf,null,n.createElement("div",null,n.createElement(A.A,{text:"Name",htmlFor:"prompt-name",id:"prompt-name-label"},n.createElement(f.A,{ariaDescribedById:"prompt-name-label",name:"prompt-name",id:"prompt-name",placeholder:h,onChange:v,value:y,size:"medium"})),n.createElement(A.A,{text:"Instructions",htmlFor:"prompt-text",id:"prompt-text-label"},n.createElement(x.A,{ariaDescribedById:"prompt-text-label",isRequired:!0,name:"prompt-text",id:"prompt-text",onChange:S,value:k,size:"medium"})),n.createElement(A.A,{text:"Frequency",htmlFor:"prompt-frequency",id:"prompt-frequency-label"},n.createElement(g.A,{options:B,ariaLabel:"Please select an option",selectId:"prompt-frequency",width:250,selectedOption:B.find(e=>e.value===I)||B[0],onOptionSelected:W})),n.createElement("div",{className:"margin_top_75"},n.createElement(E.e,{onChange:q,required:!0,value:V}))))),n.createElement(O.jl,null,n.createElement(O.ox,null,n.createElement(O.s_,{type:"outline","aria-label":l?F.t("Cancel"):"Cancel"},l?F.t("Cancel"):"Cancel"),n.createElement(O.s_,{disabled:i,loading:i,onClick:z,"aria-label":l?F.t("Save"):"Save"},l?F.t("Save"):"Save"))))}BaseAgentTaskModal.displayName="BaseAgentTaskModal";let V=n.memo(BaseAgentTaskModal),G=(0,H.e)(V),B=(0,k.A)("ai.savedPrompts.delete generated fetcher",(e,t,a)=>new y.S((n,r)=>{let{abortSignal:s,reason:l,...i}=a,o=(0,I.VA)(i);e((0,v.apiCall)({method:"ai.savedPrompts.delete",args:o,abortSignal:s,reason:l})).then(e=>{n(e)}).catch(e=>{(0,S.Ay)({getState:t}).error(`API call to ai.savedPrompts.delete
						with reason ${l} failed, initiated by generated fetcher`),r(e)})}));B.meta={name:"aiSavedPromptsDeleteFetcher",key:"createFetcherAiSavedPromptsDeleteFetcher",description:"ai.savedPrompts.delete generated fetcher"};let q=(0,k.A)("ai.savedPrompts.execute generated fetcher",(e,t,a)=>new y.S((n,r)=>{let{abortSignal:s,reason:l,...i}=a,o=(0,I.VA)(i);e((0,v.apiCall)({method:"ai.savedPrompts.execute",args:o,abortSignal:s,reason:l})).then(e=>{n(e)}).catch(e=>{(0,S.Ay)({getState:t}).error(`API call to ai.savedPrompts.execute
						with reason ${l} failed, initiated by generated fetcher`),r(e)})}));q.meta={name:"aiSavedPromptsExecuteFetcher",key:"createFetcherAiSavedPromptsExecuteFetcher",description:"ai.savedPrompts.execute generated fetcher"};var W=a(0xecc921bc),K=a(0x46dbff89),z=a(0x16ffed5ab),$=a(0x21a911dc2),Y=a.n($);let j=m.S.compact,X=m.w.enabled,Q=new l.Ay("sidekicks"),Z={name:"trash"},J={name:"edit"},ee={name:"play"},TaskItem=({renderedInListVariant:e,task:t,onAdded:a})=>{let s=(0,r.wA)(),l=(0,P.d4)(C.Q),[i,o]=(0,n.useState)(!1),m=(0,n.useCallback)(()=>{s((0,U.O)())},[s]),_=(0,n.useCallback)(async()=>{(await s(B({savedPromptId:t.id,reason:"remove task from tasks tab"}))).ok&&(a?.(),s((0,U.O)()))},[s,a,t.id]),b=(0,n.useCallback)(()=>{s((0,K.q)({element:n.createElement(u.A,{submitButtonType:"danger",cancelButtonText:l?Q.t("Cancel"):"Cancel",submitButtonText:l?Q.t("Remove"):"Remove",title:l?Q.t("Remove task?"):"Remove task?",onClose:m,onCancel:m,onSubmit:_},n.createElement("p",null,l?Q.t("This task will be removed and no longer run"):"This task will be removed and no longer run"))}))},[s,l,m,_]),A=(0,n.useCallback)(()=>{s(G({prompt:t,onAdded:a}))},[s,a,t]),f=(0,n.useCallback)(async()=>{if(!i){o(!0);try{(await s(q({id:t.id,reason:"run task from tasks tab"}))).ok&&s((0,z.M)({element:n.createElement(h.A,{showCloseButton:!0},n.createElement("div",null,l?Q.t("Task enqueued! You will receive a response soon."):"Task enqueued! You will receive a response soon."))}))}finally{o(!1)}}},[s,t,i,l]),x=(0,n.useMemo)(()=>{let e=l?Q.t("Run Task"):"Run Task",t=l?Q.t("Edit Task"):"Edit Task",a=l?Q.t("Remove Task"):"Remove Task";return n.createElement("div",{className:Y().actionbarContainer},n.createElement(d.A,null,n.createElement(c.A,{"aria-label":e,svgIconProps:ee,tooltipLabel:e,tooltipPosition:"top",onClick:f,isDisabled:i,buttonSize:"small"}),n.createElement(c.A,{"aria-label":t,svgIconProps:J,tooltipLabel:t,tooltipPosition:"top",onClick:A,buttonSize:"small"}),n.createElement(c.A,{"aria-label":a,svgIconProps:Z,tooltipLabel:a,tooltipPosition:"top",onClick:b,buttonSize:"small"})))},[l,A,b,f,i]),g=(0,n.useMemo)(()=>{if(t.triggers.length>0){let e=s((0,W.D)({timestamp:t.triggers[0].next_fire_at_ts,uncapitalized:!1}));return n.createElement(n.Fragment,null,n.createElement("span",{className:Y().promptFrequency},t.triggers[0].frequency)," |"," ",e)}},[s,t.triggers]);return n.createElement(p.Ay,{entityState:X,actionsBar:x,isFullWidth:!0,isRemovable:!1,isFullHeight:!0,renderedInListVariant:e,size:j,withBorder:!0},n.createElement("div",{className:Y().prompt},n.createElement("div",{className:Y().promptName},t.name),n.createElement("div",{className:Y().promptText},t.prompt_text),g&&n.createElement("div",{className:Y().promptTrigger},g)))};TaskItem.displayName="TaskItem";let et=(0,k.A)("ai.savedPrompts.list generated fetcher",(e,t,a)=>new y.S((n,r)=>{let{abortSignal:s,reason:l,...i}=a,o=(0,I.VA)(i);e((0,v.apiCall)({method:"ai.savedPrompts.list",args:o,abortSignal:s,reason:l})).then(e=>{n(e)}).catch(e=>{(0,S.Ay)({getState:t}).error(`API call to ai.savedPrompts.list
						with reason ${l} failed, initiated by generated fetcher`),r(e)})}));et.meta={name:"aiSavedPromptsListFetcher",key:"createFetcherAiSavedPromptsListFetcher",description:"ai.savedPrompts.list generated fetcher"};var ea=a(0x16123413f),en=a.n(ea);let er=new l.Ay("sidekicks"),TasksTab=({botUserId:e})=>{let t=(0,r.wA)(),a=(0,P.d4)(C.Q),[l,c]=(0,n.useState)(!1),[d,m]=(0,n.useState)(),p=(0,n.useCallback)(async()=>{try{if(l)return;c(!0);let a=await t(et({agentUserId:e,reason:"load tasks tab"}));a.ok&&m(a.saved_prompts)}finally{c(!1)}},[e,t,l]);(0,s.A)(()=>{p()},[]);let u=(0,n.useCallback)(()=>{t(G({botUserId:e,onAdded:p}))},[e,t,p]),h=(0,n.useCallback)(e=>d&&0===e&&1===d.length?"single":0===e?"first":d&&e===d.length-1?"last":"middle",[d]);return n.createElement("div",{className:en().tasksContainer},l&&!d&&n.createElement(o.A,null),n.createElement("div",null,d&&d.map((e,t)=>n.createElement(TaskItem,{key:e.id,task:e,onAdded:p,renderedInListVariant:h(t)}))),n.createElement("div",{className:en().footer},n.createElement(i.Ay,{onClick:u,type:i.QE.primary},a?er.t("Add Task"):"Add Task")))};TasksTab.displayName="TasksTab";let es=TasksTab},0x136939b88:(e,t,a)=>{"use strict";a.d(t,{X:()=>r,y:()=>isNativeWorkspaceEnabled});var n=a(0x14149c126);function isNativeWorkspaceEnabled(e){return"on"===(0,n._Z)(e,"native_workspace_icon")}let r={image_34:"https://avatars.slack-edge.com/2019-01-25/533817971746_45bcbaddb85f60f9099c_34.png",image_44:"https://avatars.slack-edge.com/2019-01-25/533817971746_45bcbaddb85f60f9099c_44.png",image_68:"https://avatars.slack-edge.com/2019-01-25/533817971746_45bcbaddb85f60f9099c_68.png",image_88:"https://avatars.slack-edge.com/2019-01-25/533817971746_45bcbaddb85f60f9099c_88.png",image_102:"https://avatars.slack-edge.com/2019-01-25/533817971746_45bcbaddb85f60f9099c_102.png",image_132:"https://avatars.slack-edge.com/2019-01-25/533817971746_45bcbaddb85f60f9099c_132.png",image_230:"https://avatars.slack-edge.com/2019-01-25/533817971746_45bcbaddb85f60f9099c_230.png",image_default:!1}},0x105dd6c49:(e,t,a)=>{"use strict";a.r(t),a.d(t,{LeadFormSetupChannelDetailsCoachmark:()=>LeadFormSetupChannelDetailsCoachmark});var n=a(0xbad225b5),r=a(0x16cf1da63),s=a(0x20482ad21),l=a(0x11a296110),i=a(0x13953efe6),o=a(0x10cf39bbb),c=a(0x3989021c),d=a(0x218842a12),m=a(0x1ba23e63c),p=a(0x226892387),u=a(0x14149c126),h=a(0xb9604b6),_=a(0x5b1935a6);let b=new s.Ay("slack_first_crm"),A=d.g.DOWNMARKET_CRM_LEAD_FORM_SETUP_CHANNEL_DETAILS_COACHMARK,LeadFormSetupChannelDetailsCoachmark=({channelScopedId:e})=>{let t=(0,r.wA)(),a=(0,p.d4)(e=>"on"===(0,u._Z)(e,"slack_crm_leads_web_form")),s=(0,p.d4)(t=>(0,h.OL)(t,_.xu.IN_PRODUCT_COACHMARK,e)),d=s?.dismissalType,{closeCoachmark:f,renderCoachmark:x}=(0,c.A)(A,_.xu.IN_PRODUCT_COACHMARK,e),g=(0,n.useCallback)(async a=>{a?.preventDefault(),a?.stopPropagation(),t((0,m.A)({id:e,defaultTab:o.n.Integrations})),f()},[t,e,f]),E=(0,n.useCallback)(e=>{e?.preventDefault(),e?.stopPropagation(),f()},[f]),C=a?b.t("Manage your web form here"):"Manage your web form here",y=a?b.t("Find form settings and your code snippet by clicking on the channel name and opening the Integrations tab."):"Find form settings and your code snippet by clicking on the channel name and opening the Integrations tab.",v=a?b.t("Set up a web form later"):"Set up a web form later",k=a?b.t("Create a web form at any time by clicking on the channel name and opening the Integrations tab."):"Create a web form at any time by clicking on the channel name and opening the Integrations tab.",S=(0,n.useMemo)(()=>"complete"===d?C:v,[d,C,v]),I=(0,n.useMemo)(()=>"complete"===d?y:k,[d,y,k]),N=x({title:S,bodyText:(0,n.useMemo)(()=>n.createElement("div",null,n.createElement("p",null,I),n.createElement("div",{className:"display_flex gap_50"},n.createElement(l.Ay,{size:"small",type:"primary",onClick:E},a?b.t("Got It"):"Got It"),n.createElement(l.Ay,{size:"small",type:"outline",onClick:g},a?b.t("Show Me"):"Show Me"))),[I,E,g,a]),closeCoachmark:E,arrowPosition:10,offsetX:-200});return n.createElement(i.Ay,{coachmarkElement:N,orientation:"bottom"})};LeadFormSetupChannelDetailsCoachmark.displayName="LeadFormSetupChannelDetailsCoachmark"},0x6374e095:(e,t,a)=>{"use strict";a.d(t,{e:()=>DateTimeInput});var n=a(0xbad225b5),r=a(0x1b63e435a),s=a.n(r),l=a(0x1407c6c2c),i=a(0x4bdf0df6),o=a(0x20482ad21),c=a(0x2503b7c1),d=a(0x1d2cd7755),m=a(0x1e586fbba),p=a(0x9154b87c),u=a(0x1feb18f19),h=a(0x1e217163d),_=a(0x124d99cb0),b=a(0x1b9d5cc0c),A=a(0x226892387),f=a(0x19c76d181),x=a(0xe684f705);let g=new o.Ay("workflow_builder"),DateTimeInput=({caption:e,errors:t,onBlur:a,onChange:r,required:o,timezone:E,value:C,isInWorkflowBuilder:y})=>{let v=(0,A.d4)(f.WR),k=(0,A.d4)(e=>(0,x.nv)(e,v,{preferNonExistentToNull:!1})),S=(0,b.et)(k)??i.vp,I=E||S,N=(0,n.useMemo)(()=>s().tz(I),[I]),{valueDate:w,valueTime:T}=(0,n.useMemo)(()=>{let e=(0,_.lP)(C,I);return e?.isValid()?{valueDate:e.format("YYYY-MM-DD"),valueTime:e.format("HH:mm")}:{}},[I,C]),M=(0,n.useCallback)((e,t)=>{r((0,_.lP)(`${e} ${t}`,I).toISOString()),a?.()},[r,a,I]),R=(0,n.useCallback)(e=>{w&&T&&M(e,T)},[w,M,T]),O=(0,n.useCallback)(e=>{e&&T&&w&&M(w,e)},[T,w,M]),P=(0,n.useCallback)(()=>a?.(),[a]),D=(0,l.A)();return n.createElement(h.B,{space:"50"},n.createElement(h.B,{space:"0"},n.createElement(d.A,{text:g.t("Starts on"),htmlFor:D}),n.createElement(u.c,{space:"50",alignY:"start"},n.createElement("div",{className:"flex_one"},n.createElement(c.b,{id:D,selectedDate:w,dateFormat:"YYYY-MM-DD",displayFormat:"MMMM D, YYYY",disableDatesBefore:N.format("YYYY-MM-DD"),"aria-label":g.t("Select a date"),onBlur:P,onDateChange:R,isInvalid:!!t?.length,required:o})),y&&n.createElement("span",{className:"margin_50","aria-hidden":!0},g.t("at")),n.createElement("div",{className:"flex_one"},n.createElement(p.Ay,{onBlur:P,onChange:O,width:"100%",value:T,ariaLabel:g.t("Select a time"),optionsHourIncrement:"quarter",isInvalid:!!t?.length,isRequired:o,allowCustomInput:!0,showTimeZone:!1})))),e&&n.createElement("div",{className:"caption sk_foreground_max"},e),t?.map(e=>n.createElement(m.A,{key:e.id,className:"margin_0"},e.message)))};DateTimeInput.displayName="DateTimeInput"},0x1b59f68c5:(e,t,a)=>{"use strict";a.d(t,{c:()=>SalesforceAppListViewBrowser});var n=a(0xbad225b5),r=a(0x16cf1da63),s=a(0x1d6bd08c3),l=a(0x1dd89c232),i=a(0x11602a38a),o=a(0x12f1a6c38),c=a(0x256e816e),d=a(0x24558b75f),m=a(0x226892387),p=a(0x1459852c4),u=a(0xb5f70001);let BaseSalesforceAppListViewBrowser=({botUserId:e,channelId:t})=>{let a=(0,r.wA)(),{salesforceOrgId:h}=(0,n.useContext)(c.C),_=(0,o.o)(),b=(0,n.useCallback)(e=>{let[t,a,...n]=e.id.split("-"),r=n.join(""),s=(0,d.Cz)(e);_({id:a,label:r,objectType:t,salesforceOrgId:h},{forceNewWindow:s,openInHome:!s})},[_,h]),A=(0,m.d4)(t=>(0,i.d_)(t,e,p.K.SFListView));return(0,n.useEffect)(()=>{A||a((0,u.A)({tabId:p.K.Messages,channelId:t,shouldReplaceState:!0}))},[t,a,A]),n.createElement(s.Y,{hidePageTitle:!0,onListItemSelect:b,origin:l.i.SalesforceApp,salesElevateOrgsOnly:!1,showListViewRecommendations:!0,shouldRetainState:!0})};BaseSalesforceAppListViewBrowser.displayName="BaseSalesforceAppListViewBrowser";let SalesforceAppListViewBrowser=({botUserId:e,channelId:t})=>n.createElement(c.G,null,n.createElement(BaseSalesforceAppListViewBrowser,{botUserId:e,channelId:t}))},0x43c785dd:(e,t,a)=>{"use strict";a.d(t,{T:()=>useNavigateOutOfMessageList});var n=a(0xbad225b5),r=a(0x14fad6485),s=a(0xf8dd7f80),l=a(0x134e233cc),i=a(0x11db163e2),o=a(0x1384f171),c=a(0x139aa1a7),d=a(0xd843ab47),m=a(0x242503693),p=a(0x1a54d5ba1),u=a(0x226892387),h=a(0x19895585a);function windowFocusIsInsideListItem(e){let t=e.deref()?.document.activeElement;return!!t&&!!t.closest(`.${i.Gn}`)}let useNavigateOutOfMessageList=()=>{let{windowRef:e}=(0,n.useContext)(r._0),{getViewSetWithUiState:t}=(0,n.useContext)(d.A),a=(0,u.d4)(o.Qw),i=(0,u.d4)(o.S9),_=(0,u.d4)(p.w8),b=(0,u.d4)(t),A=b?.[h.mq.Sidebar],{transitionFocusTo:f}=(0,l.Gx)(),x=(0,s.getGenericLogger)({label:"navigate_out_of_message_list"});return(0,n.useCallback)(()=>{let t=windowFocusIsInsideListItem(e);if(!t||!(a||i))return void x.debug("Navigation aborted",{reason:t?"experiment_disabled":"focus_not_in_list_item",focusIsInsideListItem:t,experimentActivityKeyboardGroupOn:a,experimentActivityKeyboardV2GroupOn:i});if(A?.id===c.D.ActivityInbox){let e=A?.uiState?.focusHistoryState?.lastFocusedItem,t=_?.key,a=e===t,n=a?e:t;x.info("Navigating out of message list to activity list",{lastFocusedItem:n,storedLastFocusedItem:e,selectedItemKey:t,selectedItemType:_?.type,usesStoredValue:a,sidebarViewId:A?.id}),f({focusKey:m.Ay.VIEW_ACTIVITY_LIST,focusMetadata:{uiState:{focusHistoryState:{lastFocusedItem:n}}}})}else x.debug("Navigation skipped: not in Activity Inbox view",{sidebarViewId:A?.id})},[a,i,_?.key,_?.type,A?.id,A?.uiState?.focusHistoryState?.lastFocusedItem,f,e,x])}}}]);
//# sourceMappingURL=https://slack.com/source-maps/bv1-13/gantry-v2-async-client-calendar-view.7c3d58dacd4cd62448d7.min.js.mapØA
—Eoúô