"use strict";(self.webpackChunk_1js_files_in_taskbar=self.webpackChunk_1js_files_in_taskbar||[]).push([[540],{4178:(e,t,n)=>{n.r(t),n.d(t,{default:()=>u});var i=n(6062),o=n(90375),s=(n(39552),n(39583),n(33173));function r(){try{const e=JSON.parse(window.sessionStorage.getItem("mssearchux-cache-searchConfiguration")).cacheItems;for(const t in e){const n=e[t];if("object"==typeof n&&n.hasOwnProperty("value")){const e=JSON.parse(n.value);if("object"==typeof e&&e.hasOwnProperty("userAadObjectId")){return e.userAadObjectId}}}}catch(e){for(const e in window.localStorage){if(e.includes("Cortex.TopicsCapabilities-")){return e.replace("Cortex.TopicsCapabilities-","").slice(0,-1)}if(e.includes("userid"))try{const t=JSON.parse(e);for(const e in t)if("userid"===t[e][0])return t[e][1]}catch{continue}}}return null}function c(e){return 36===e.length&&5===e.split("-").length}const a=(0,i.Ex)("search-dl.quickActions.openChat.tooltip"),u=(0,o.w)({id:"ChatClick",entityType:"People",parameters:[{name:"person",entity:"People",isRequired:!0,validate:function(){const e=window.TeamsClient,t=r();return!!(e&&e.SDK&&t&&c(t))}}],execute:async e=>{let{person:t}=e;const n=function(e){const t=e.split("@")[0],n=r();return n&&t&&c(n)&&c(t)?`19:${t}_${n}@unq.gbl.spaces`:null}(t.value.id);if(!n)return Promise.reject("Could not generate conversationId");const i=window.TeamsClient.SDK,o={loginHint:function(){const e=(0,s._X)();if(e)return e;for(const e in window.localStorage)if(e.includes("sessionTracking_"))try{const t=JSON.parse(window.localStorage.getItem(e));if(t.upn)return t.upn}catch(e){continue}return null}()},a=await i.create(o),u=await a.conversations.get(),l=await u.getConversationById(n||"");if(!l)return Promise.reject(`Could not find conversation with id: ${n}`);l.render()},additionalProps:{showSuccess:!0,tooltip:a,icon:{iconName:"Message"}}})}}]);