@microsoft/teams-js 2.19.1-beta.0 → 2.20.0-beta.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,2 +1,2 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("microsoftTeams",[],t):"object"==typeof exports?exports.microsoftTeams=t():e.microsoftTeams=t()}("undefined"!=typeof self?self:this,(()=>(()=>{var e={302:(e,t,n)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let o=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(o++,"%c"===e&&(i=o))})),t.splice(i,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(65)(t);const{formatters:o}=e.exports;o.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},65:(e,t,n)=>{e.exports=function(e){function t(e){let n,i,r,a=null;function s(...e){if(!s.enabled)return;const o=s,i=Number(new Date),r=i-(n||i);o.diff=r,o.prev=n,o.curr=i,n=i,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,i)=>{if("%%"===n)return"%";a++;const r=t.formatters[i];if("function"==typeof r){const t=e[a];n=r.call(o,t),e.splice(a,1),a--}return n})),t.formatArgs.call(o,e);(o.log||t.log).apply(o,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=o,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(i!==t.namespaces&&(i=t.namespaces,r=t.enabled(e)),r),set:e=>{a=e}}),"function"==typeof t.init&&t.init(s),s}function o(e,n){const o=t(this.namespace+(void 0===n?":":n)+e);return o.log=this.log,o}function i(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(i),...t.skips.map(i).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const o=("string"==typeof e?e:"").split(/[\s,]+/),i=o.length;for(n=0;n<i;n++)o[n]&&("-"===(e=o[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,o;for(n=0,o=t.skips.length;n<o;n++)if(t.skips[n].test(e))return!1;for(n=0,o=t.names.length;n<o;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(247),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},247:e=>{var t=1e3,n=60*t,o=60*n,i=24*o;function r(e){if(!((e=String(e)).length>100)){var r=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(r){var a=parseFloat(r[1]);switch((r[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*a;case"weeks":case"week":case"w":return 6048e5*a;case"days":case"day":case"d":return a*i;case"hours":case"hour":case"hrs":case"hr":case"h":return a*o;case"minutes":case"minute":case"mins":case"min":case"m":return a*n;case"seconds":case"second":case"secs":case"sec":case"s":return a*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}}}function a(e){var r=Math.abs(e);return r>=i?Math.round(e/i)+"d":r>=o?Math.round(e/o)+"h":r>=n?Math.round(e/n)+"m":r>=t?Math.round(e/t)+"s":e+"ms"}function s(e){var r=Math.abs(e);return r>=i?l(e,r,i,"day"):r>=o?l(e,r,o,"hour"):r>=n?l(e,r,n,"minute"):r>=t?l(e,r,t,"second"):e+" ms"}function l(e,t,n,o){var i=t>=1.5*n;return Math.round(e/n)+" "+o+(i?"s":"")}e.exports=function(e,t){t=t||{};var n=typeof e;if("string"===n&&e.length>0)return r(e);if("number"===n&&isFinite(e))return t.long?s(e):a(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}}},t={};function n(o){var i=t[o];if(void 0!==i)return i.exports;var r=t[o]={exports:{}};return e[o](r,r.exports,n),r.exports}(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;n.t=function(o,i){if(1&i&&(o=this(o)),8&i)return o;if("object"==typeof o&&o){if(4&i&&o.__esModule)return o;if(16&i&&"function"==typeof o.then)return o}var r=Object.create(null);n.r(r);var a={};e=e||[null,t({}),t([]),t(t)];for(var s=2&i&&o;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((e=>a[e]=()=>o[e]));return a.default=()=>o,n.d(r,a),r}})(),(()=>{n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})}})(),(()=>{n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var o={};return(()=>{"use strict";n.r(o),n.d(o,{ActionObjectType:()=>A,ChannelType:()=>B,ChildAppWindow:()=>Po,DialogDimension:()=>x,ErrorCode:()=>O,FileOpenPreference:()=>F,FrameContexts:()=>N,HostClientType:()=>D,HostName:()=>L,LiveShareHost:()=>Qi,NotificationTypes:()=>kn,ParentAppWindow:()=>Io,SecondaryM365ContentIdName:()=>M,TaskModuleDimension:()=>W,TeamType:()=>U,UserSettingTypes:()=>Dn,UserTeamRole:()=>V,ViewerActionTypes:()=>Hn,app:()=>gt,appEntity:()=>Ir,appInitialization:()=>hi,appInstallDialog:()=>Kn,authentication:()=>Qe,barCode:()=>po,calendar:()=>Ho,call:()=>mi,chat:()=>mo,clipboard:()=>wo,conversations:()=>Gn,dialog:()=>ot,enablePrintCapability:()=>bi,executeDeepLink:()=>Ni,externalAppAuthentication:()=>gr,externalAppCardActions:()=>mr,files:()=>Cr,geoLocation:()=>So,getAdaptiveCardSchemaVersion:()=>yo,getContext:()=>Pi,getMruTabInstances:()=>Di,getTabInstances:()=>Hi,initialize:()=>Si,initializeWithFrameContext:()=>Vi,liveShare:()=>Zi,location:()=>_o,logs:()=>On,mail:()=>Lo,marketplace:()=>pr,media:()=>Xn,meeting:()=>Fo,meetingRoom:()=>vr,menus:()=>rt,monetization:()=>Oo,navigateBack:()=>zi,navigateCrossDomain:()=>Gi,navigateToTab:()=>Wi,notifications:()=>br,openFilePreview:()=>Bn,pages:()=>Tt,people:()=>xo,print:()=>yi,profile:()=>Bo,registerAppButtonClickHandler:()=>_i,registerAppButtonHoverEnterHandler:()=>Ei,registerAppButtonHoverLeaveHandler:()=>Ri,registerBackButtonHandler:()=>Fi,registerBeforeUnloadHandler:()=>Mi,registerChangeSettingsHandler:()=>ki,registerCustomHandler:()=>Vn,registerFocusEnterHandler:()=>Oi,registerFullScreenHandler:()=>Ti,registerOnLoadHandler:()=>Ai,registerOnThemeChangeHandler:()=>Ii,registerUserSettingsChangeHandler:()=>xn,remoteCamera:()=>yr,returnFocus:()=>Bi,search:()=>ai,secondaryBrowser:()=>bo,sendCustomEvent:()=>Un,sendCustomMessage:()=>Nn,setFrameContext:()=>Ui,settings:()=>ji,shareDeepLink:()=>Li,sharing:()=>si,stageView:()=>li,tasks:()=>Ji,teams:()=>Tr,teamsCore:()=>No,thirdPartyCloudStorage:()=>wi,uploadCustomApp:()=>Ln,version:()=>Me,videoEffects:()=>ri,videoEffectsEx:()=>_r,visualMedia:()=>di,webStorage:()=>fi});const e=(0,n(302).debug)("teamsJs");function t(t){return e.extend(t)}function i(e,t){return`${e}_${t}`}function r(e){return/^v\d+_[\w.]+$/.test(e)}var a,s;!function(e){e.V_0="v0",e.V_1="v1",e.V_2="v2",e.V_3="v3"}(a||(a={})),function(e){e.App_GetContext="app.getContext",e.App_Initialize="app.initialize",e.App_NotifyAppLoaded="app.notifyAppLoaded",e.App_NotifyExpectedFailure="app.notifyExpectedFailure",e.App_NotifyFailure="app.notifyFailure",e.App_NotifySuccess="app.notifySuccess",e.App_OpenLink="app.openLink",e.App_RegisterOnThemeChangeHandler="app.registerOnThemeChangeHandler",e.AppEntity_SelectAppEntity="appEntity.selectAppEntity",e.BarCode_HasPermission="barCode.hasPermission",e.BarCode_RequestPermission="barCode.requestPermission",e.BarCode_ScanBarCode="barCode.scanBarCode",e.Calendar_ComposeMeeting="calendar.composeMeeting",e.Calendar_OpenCalendarItem="calendar.openCalendarItem",e.Call_StartCall="call.startCall",e.Chat_OpenChat="chat.openChat",e.Chat_OpenGroupChat="chat.openGroupChat",e.Clipboard_Read="clipboard.read",e.Clipboard_Write="clipboard.write",e.Conversations_CloseConversation="conversations.closeConversation",e.Conversations_GetChatMember="conversations.getChatMember",e.Conversations_OpenConversation="conversations.openConversation",e.Conversations_RegisterCloseConversationHandler="conversations.registerCloseConversationHandler",e.Conversations_RegisterStartConversationHandler="conversations.registerStartConversationHandler",e.Dialog_AdaptiveCard_Bot_Open="dialog.adaptiveCard.bot.open",e.Dialog_AdaptiveCard_Open="dialog.adaptiveCard.open",e.Dialog_Update_Resize="dialog.update.resize",e.Dialog_Url_Bot_Open="dialog.url.bot.open",e.Dialog_Url_Open="dialog.url.open",e.Dialog_Url_Submit="dialog.url.submit",e.Dialog_Url_SendMessageToParentFromDialog="dialog.url.sendMessageToParentFromDialog",e.Dialog_Url_SendMessageToDialog="dialog.url.sendMessageToDialog",e.Files_AddCloudStorageFolder="files.addCloudStorageFolder",e.Files_AddCloudStorageProvider="files.addCloudStorageProvider",e.Files_AddCloudStorageProviderFile="files.addCloudStorageProviderFile",e.Files_CopyMoveFiles="files.copyMoveFiles",e.Files_DeleteCloudStorageFolder="files.deleteCloudStorageFolder",e.Files_DeleteCloudStorageProviderFile="files.deleteCloudStorageProviderFile",e.Files_DownloadCloudStorageProviderFile="files.downloadCloudStorageProviderFile",e.Files_GetCloudStorageFolderContents="files.getCloudStorageFolderContents",e.Files_GetCloudStorageFolders="files.getCloudStorageFolders",e.Files_GetExternalProviders="files.getExternalProviders",e.Files_GetFileDownloads="files.getFileDownloads",e.Files_OpenCloudStorageFile="files.openCloudStorageFile",e.Files_OpenDownloadFolder="files.openDownloadFolder",e.Files_RegisterCloudStorageProviderContentChangeHandler="files.registerCloudStorageProviderContentChangeHandler",e.Files_RegisterCloudStorageProviderListChangeHandler="files.registerCloudStorageProviderListChangeHandler",e.Files_RemoveCloudStorageProvider="files.removeCloudStorageProvider",e.Files_RenameCloudStorageProviderFile="files.renameCloudStorageProviderFile",e.Files_UploadCloudStorageProviderFile="files.uploadCloudStorageProviderFile",e.GeoLocation_GetCurrentLocation="geoLocation.getCurrentLocation",e.GeoLocation_HasPermission="geoLocation.hasPermission",e.GeoLocation_Map_ChooseLocation="geoLocation.map.chooseLocation",e.GeoLocation_RequestPermission="geoLocation.hasPermission",e.GeoLocation_ShowLocation="geoLocation.showLocation",e.Interactive_GetClientInfo="interactive.getClientInfo",e.Interactive_GetClientRoles="interactive.getClientRoles",e.Interactive_GetFluidContainerId="interactive.getFluidContainerId",e.Interactive_GetFluidTenantInfo="interactive.getFluidTenantInfo",e.Interactive_GetFluidToken="interactive.getFluidToken",e.Interactive_GetNtpTime="interactive.getNtpTime",e.Interactive_RegisterClientId="interactive.registerClientId",e.Interactive_SetFluidContainerId="interactive.setFluidContainerId",e.Location_GetLocation="location.getLocation",e.Location_ShowLocation="location.showLocation",e.Logs_Receive="log.receive",e.Logs_RegisterLogRequestHandler="log.request",e.Mail_ComposeMail="mail.composeMail",e.Mail_OpenMailItem="mail.openMailItem",e.Marketplace_AddOrUpdateCartItems="marketplace.addOrUpdateCartItems",e.Marketplace_GetCart="marketplace.getCart",e.Marketplace_RemoveCardItems="marketplace.removeCartItems",e.Marketplace_UpdateCartStatus="marketplace.updateCartStatus",e.Media_CaptureImage="media.captureImage",e.Media_Controller="media.controller",e.Media_GetMedia="media.getMedia",e.Media_HasPermission="media.hasPermission",e.Media_RequestPermission="media.requestPermission",e.Media_ScanBarCode="media.scanBarCode",e.Media_SelectMedia="media.selectMedia",e.Media_ViewImages="media.viewImages",e.Meeting_AppShareButton_SetOptions="meeting.appShareButton.setOptions",e.Meeting_GetAppContentStageSharingCapabilities="meeting.getAppContentStageSharingCapabilities",e.Meeting_GetAppContentStageSharingState="meeting.getAppContentStageSharingState",e.Meeting_GetAuthenticationTokenForAnonymousUser="meeting.getAuthenticationTokenForAnonymousUser",e.Meeting_GetIncomingClientAudioState="meeting.getIncomingClientAudioState",e.Meeting_GetLiveStreamState="meeting.getLiveStreamState",e.Meeting_GetMeetingDetails="meeting.getMeetingDetails",e.Meeting_RegisterAudioDeviceSelectionChangedHandler="meeting.registerAudioDeviceSelectionChangedHandler",e.Meeting_RegisterLiveStreamChangedHandler="meeting.registerLiveStreamChangedHandler",e.Meeting_RegisterMeetingReactionReceivedHandler="meeting.registerMeetingReactionReceivedHandler",e.Meeting_RegisterMicStateChangeHandler="meeting.registerMicStateChangeHandler",e.Meeting_RegisterRaiseHandStateChangedHandler="meeting.registerRaiseHandStateChangedHandler",e.Meeting_RegisterSpeakingStateChangeHandler="meeting.registerSpeakingStateChangeHandler",e.Meeting_RequestAppAudioHandling="meeting.requestAppAudioHandling",e.Meeting_RequestStartLiveStreaming="meeting.requestStartLiveStreaming",e.Meeting_RequestStopLiveStreaming="meeting.requestStopLiveStreaming",e.Meeting_SetMicStateWithReason="meeting.setMicStateWithReason",e.Meeting_ShareAppContentToStage="meeting.shareAppContentToStage",e.Meeting_StopSharingAppContentToStage="meeting.stopSharingAppContentToStage",e.Meeting_ToggleIncomingClientAudio="meeting.toggleIncomingClientAudio",e.MeetingRoom_GetPairedMeetingRoomInfo="meetingRoom.getPairedMeetingRoomInfo",e.MeetingRoom_RegisterMeetingRoomCapabilitiesUpdateHandler="meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler",e.MeetingRoom_RegisterMeetingRoomStatesUpdateHandler="meetingRoom.registerMeetingRoomStatesUpdateHandler",e.MeetingRoom_SendCommandToPairedMeetingRoom="meetingRoom.sendCommandToPairedMeetingRoom",e.Menus_HandleActionMenuItemPress="menus.handleActionMenuItemPress",e.Menus_HandleNavBarMenuItemPress="menus.handleNavBarMenuItemPress",e.Menus_HandleViewConfigItemPress="menus.handleViewConfigItemPress",e.Menus_RegisterActionMenuItemPressHandler="menus.registerActionMenuItemPressHandler",e.Menus_RegisterNavBarMenuItemPressHandler="menus.registerNavBarMenuItemPressHandler",e.Menus_RegisterSetModuleViewHandler="menus.registerSetModuleViewHandler",e.Menus_SetNavBarMenu="menus.setNavBarMenu",e.Menus_SetUpViews="menus.setUpViews",e.Menus_ShowActionMenu="menus.showActionMenu",e.Monetization_OpenPurchaseExperience="monetization.openPurchaseExperience",e.Navigation_NavigateBack="navigation.navigateBack",e.Navigation_NavigateCrossDomain="navigation.navigateCrossDomain",e.Navigation_NavigateToTab="navigation.navigateToTab",e.Navigation_ReturnFocus="navigation.returnFocus",e.Notifications_ShowNotification="notifications.showNotification",e.Pages_AppButton_OnClick="pages.appButton.onClick",e.Pages_AppButton_OnHoverEnter="pages.appButton.onHoverEnter",e.Pages_AppButton_OnHoverLeave="pages.appButton.onHoverLeave",e.Pages_BackStack_NavigateBack="pages.backStack.navigateBack",e.Pages_BackStack_RegisterBackButtonHandler="pages.backStack.registerBackButtonHandler",e.Pages_Config_RegisterChangeConfigHandler="pages.config.registerChangeConfigHandler",e.Pages_Config_RegisterOnRemoveHandlerHelper="pages.config.registerOnRemoveHandlerHelper",e.Pages_Config_RegisterOnSaveHandlerHelper="pages.config.registerOnSaveHandlerHelper",e.Pages_Config_SetConfig="pages.config.setConfig",e.Pages_Config_SetValidityState="pages.config.setValidityState",e.Pages_CurrentApp_NavigateTo="pages.currentApp.navigateTo",e.Pages_CurrentApp_NavigateToDefaultPage="pages.currentApp.navigateToDefaultPage",e.Pages_FullTrust_EnterFullscreen="pages.fullTrust.enterFullscreen",e.Pages_FullTrust_ExitFullscreen="pages.fullTrust.exitFullscreen",e.Pages_GetConfig="pages.getConfig.",e.Pages_NavigateCrossDomain="pages.navigateCrossDomain",e.Pages_NavigateToApp="pages.navigateToApp",e.Pages_RegisterFocusEnterHandler="pages.registerFocusEnterHandler",e.Pages_RegisterFullScreenHandler="pages.registerFullScreenHandler",e.Pages_ReturnFocus="pages.returnFocus",e.Pages_SetCurrentFrame="pages.setCurrentFrame",e.Pages_ShareDeepLink="pages.shareDeepLink",e.Pages_Tabs_GetMruTabInstances="pages.tabs.getMruTabInstances",e.Pages_Tabs_GetTabInstances="pages.tabs.getTabInstances",e.Pages_Tabs_NavigateToTab="pages.tabs.navigateToTab",e.People_SelectPeople="people.selectPeople",e.PublicAPIs_ExecuteDeepLink="executeDeepLink",e.PublicAPIs_GetContext="getContext",e.PublicAPIs_GetMruTabInstances="getMruTabInstances",e.PublicAPIs_GetTabInstances="getTabInstances",e.PublicAPIs_Initialize="initialize",e.PublicAPIs_RegisterAppButtonClickHandler="registerAppButtonClickHandler",e.PublicAPIs_RegisterAppButtonHoverEnterHandler="registerAppButtonHoverEnterHandler",e.PublicAPIs_RegisterAppButtonHoverLeaveHandler="registerAppButtonHoverLeaveHandler",e.PublicAPIs_RegisterBackButtonHandler="registerBackButtonHandler",e.PublicAPIs_RegisterChangeSettingsHandler="registerChangeSettingsHandler",e.PublicAPIs_RegisterFocusEnterHandler="registerFocusEnterHandler",e.PublicAPIs_RegisterFullScreenHandler="registerFullScreenHandler",e.PublicAPIs_RegisterOnLoadHandler="registerOnLoadHandler",e.PublicAPIs_RegisterOnThemeChangeHandlerHelper="registerOnThemeChangeHandlerHelper",e.PublicAPIs_SetFrameContext="setFrameContext",e.PublicAPIs_ShareDeepLink="shareDeepLink",e.RegisterHandler="registerHandler",e.RegisterOnThemeChangeHandler="registerOnThemeChangeHandler",e.Settings_Remove_Failure="settings.remove.failure",e.Settings_Remove_Success="settings.remove.success",e.Settings_Save_Failure="settings.save.failure",e.Settings_Save_Success="settings.save.success",e.Tasks_StartTask="tasks.startTask",e.Tasks_SubmitTask="tasks.submitTask",e.Tasks_UpdateTask="tasks.updateTask"}(s||(s={}));const l=JSON.parse('{"validOrigins":["teams.microsoft.com","teams.microsoft.us","gov.teams.microsoft.us","dod.teams.microsoft.us","int.teams.microsoft.com","teams.live.com","devspaces.skype.com","ssauth.skype.com","local.teams.live.com","local.teams.live.com:8080","local.teams.office.com","local.teams.office.com:8080","outlook.office.com","outlook-sdf.office.com","outlook.office365.com","outlook-sdf.office365.com","outlook.live.com","outlook-sdf.live.com","*.teams.microsoft.com","*.www.office.com","www.office.com","word.office.com","excel.office.com","powerpoint.office.com","www.officeppe.com","*.www.microsoft365.com","www.microsoft365.com","bing.com","edgeservices.bing.com","www.bing.com","www.staging-bing-int.com","teams.cloud.microsoft","outlook.cloud.microsoft","m365.cloud.microsoft","copilot.microsoft.com"]}');const c="2.0.1",u="2.0.3",d="1.9.0",f="1.8.0",p=n.t(l,2).validOrigins,g=new URL("https://res.cdn.office.net/teams-js/validDomains/json/validDomains.json"),m=/^https:\/\//,h="https",C="teams.microsoft.com",w="The library has not yet been initialized",v="The runtime has not yet been initialized",S="The runtime version is not supported";class b{}b.initializeCalled=!1,b.initializeCompleted=!1,b.additionalValidOrigins=[],b.initializePromise=void 0,b.isFramelessWindow=!1,b.frameContext=void 0,b.hostClientType=void 0,b.printCapabilityEnabled=!1;const y={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let P;const I=new Uint8Array(16);function T(){if(!P&&(P="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!P))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return P(I)}const _=[];for(let e=0;e<256;++e)_.push((e+256).toString(16).slice(1));function E(e,t=0){return(_[e[t+0]]+_[e[t+1]]+_[e[t+2]]+_[e[t+3]]+"-"+_[e[t+4]]+_[e[t+5]]+"-"+_[e[t+6]]+_[e[t+7]]+"-"+_[e[t+8]]+_[e[t+9]]+"-"+_[e[t+10]]+_[e[t+11]]+_[e[t+12]]+_[e[t+13]]+_[e[t+14]]+_[e[t+15]]).toLowerCase()}const R=function(e,t,n){if(y.randomUUID&&!t&&!e)return y.randomUUID();const o=(e=e||{}).random||(e.rng||T)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=o[e];return t}return E(o)};var F,A,M,O,k,H,D,L,N,U,V,x;!function(e){e.Inline="inline",e.Desktop="desktop",e.Web="web"}(F||(F={})),function(e){e.M365Content="m365content"}(A||(A={})),function(e){e.DriveId="driveId",e.GroupId="groupId",e.SiteId="siteId",e.UserId="userId"}(M||(M={})),function(e){e[e.NOT_SUPPORTED_ON_PLATFORM=100]="NOT_SUPPORTED_ON_PLATFORM",e[e.INTERNAL_ERROR=500]="INTERNAL_ERROR",e[e.NOT_SUPPORTED_IN_CURRENT_CONTEXT=501]="NOT_SUPPORTED_IN_CURRENT_CONTEXT",e[e.PERMISSION_DENIED=1e3]="PERMISSION_DENIED",e[e.NETWORK_ERROR=2e3]="NETWORK_ERROR",e[e.NO_HW_SUPPORT=3e3]="NO_HW_SUPPORT",e[e.INVALID_ARGUMENTS=4e3]="INVALID_ARGUMENTS",e[e.UNAUTHORIZED_USER_OPERATION=5e3]="UNAUTHORIZED_USER_OPERATION",e[e.INSUFFICIENT_RESOURCES=6e3]="INSUFFICIENT_RESOURCES",e[e.THROTTLE=7e3]="THROTTLE",e[e.USER_ABORT=8e3]="USER_ABORT",e[e.OPERATION_TIMED_OUT=8001]="OPERATION_TIMED_OUT",e[e.OLD_PLATFORM=9e3]="OLD_PLATFORM",e[e.FILE_NOT_FOUND=404]="FILE_NOT_FOUND",e[e.SIZE_EXCEEDED=1e4]="SIZE_EXCEEDED"}(O||(O={})),function(e){e.GeoLocation="geolocation",e.Media="media"}(k||(k={})),function(e){e.TextPlain="text/plain",e.TextHtml="text/html",e.ImagePNG="image/png",e.ImageJPEG="image/jpeg"}(H||(H={})),function(e){e.desktop="desktop",e.web="web",e.android="android",e.ios="ios",e.ipados="ipados",e.macos="macos",e.rigel="rigel",e.surfaceHub="surfaceHub",e.teamsRoomsWindows="teamsRoomsWindows",e.teamsRoomsAndroid="teamsRoomsAndroid",e.teamsPhones="teamsPhones",e.teamsDisplays="teamsDisplays"}(D||(D={})),function(e){e.office="Office",e.outlook="Outlook",e.outlookWin32="OutlookWin32",e.orange="Orange",e.places="Places",e.teams="Teams",e.teamsModern="TeamsModern"}(L||(L={})),function(e){e.settings="settings",e.content="content",e.authentication="authentication",e.remove="remove",e.task="task",e.sidePanel="sidePanel",e.stage="stage",e.meetingStage="meetingStage"}(N||(N={})),function(e){e[e.Standard=0]="Standard",e[e.Edu=1]="Edu",e[e.Class=2]="Class",e[e.Plc=3]="Plc",e[e.Staff=4]="Staff"}(U||(U={})),function(e){e[e.Admin=0]="Admin",e[e.User=1]="User",e[e.Guest=2]="Guest"}(V||(V={})),function(e){e.Large="large",e.Medium="medium",e.Small="small"}(x||(x={}));var B,W=x;!function(e){e.Regular="Regular",e.Private="Private",e.Shared="Shared"}(B||(B={}));const G={errorCode:O.NOT_SUPPORTED_ON_PLATFORM},z=1,j=5,q={adaptiveCardSchemaVersion:{majorVersion:1,minorVersion:5}},$=new Error("Invalid input count: Must supply a valid image count (limit of 10)."),J=new Error("Invalid response: Received more images than the specified max limit in the response.");function K(e){return(t,n)=>{if(!t)throw new Error(e||n)}}function Z(e,t){if("string"!=typeof e||"string"!=typeof t)return NaN;const n=e.split("."),o=t.split(".");function i(e){return/^\d+$/.test(e)}if(!n.every(i)||!o.every(i))return NaN;for(;n.length<o.length;)n.push("0");for(;o.length<n.length;)o.push("0");for(let e=0;e<n.length;++e)if(Number(n[e])!=Number(o[e]))return Number(n[e])>Number(o[e])?1:-1;return 0}function Q(){return R()}function X(e){return Object.keys(e).forEach((t=>{"object"==typeof e[t]&&X(e[t])})),Object.freeze(e)}function Y(e,t,...n){const o=e(...n);return o.then((e=>{t&&t(void 0,e)})).catch((e=>{t&&t(e)})),o}function ee(e,t,...n){const o=e(...n);return o.then((()=>{t&&t(null)})).catch((e=>{t&&t(e)})),o}function te(e,t,...n){const o=e(...n);return o.then((e=>{t&&t(null,e)})).catch((e=>{t&&t(e,null)})),o}function ne(e,t,n){return new Promise(((o,i)=>{const r=setTimeout(i,t,n);e().then((e=>{clearTimeout(r),o(e)})).catch((e=>{clearTimeout(r),i(e)}))}))}function oe(e){const t=new URL("https://teams.microsoft.com/l/entity/"+encodeURIComponent(e.appId)+"/"+encodeURIComponent(e.pageId));return e.webUrl&&t.searchParams.append("webUrl",e.webUrl),(e.channelId||e.subPageId)&&t.searchParams.append("context",JSON.stringify({channelId:e.channelId,subEntityId:e.subPageId})),t.toString()}function ie(e){return!(Z(`${e.majorVersion}.${e.minorVersion}`,`${z}.${j}`)>=0)}function re(e){return"https:"===e.protocol}function ae(e,t){return new Promise(((n,o)=>{e||o("MimeType cannot be null or empty."),t||o("Base64 string cannot be null or empty.");const i=atob(t);if(e.startsWith("image/")){const t=new Uint8Array(i.length);for(let e=0;e<i.length;e++)t[e]=i.charCodeAt(e);n(new Blob([t],{type:e}))}n(new Blob([i],{type:e}))}))}function se(e){return new Promise(((t,n)=>{0===e.size&&n(new Error("Blob cannot be empty."));const o=new FileReader;o.onloadend=()=>{o.result?t(o.result.toString().split(",")[1]):n(new Error("Failed to read the blob"))},o.onerror=()=>{n(o.error)},o.readAsDataURL(e)}))}function le(){if(ce())throw new Error("window object undefined at SSR check");return window}function ce(){return"undefined"==typeof window}const ue=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function de(e){if(!ue.test(e))throw new Error("App ID is not valid. Must be GUID format. App ID: "+e)}var fe=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]])}return n};const pe=t("runtime"),ge=3;function me(e){return e.apiVersion===ge}const he={apiVersion:-1,supports:{}};function Ce(e){if(me(e))return!0;throw-1===e.apiVersion?new Error(v):new Error(S)}let we=he;const ve={apiVersion:3,hostVersionsInfo:q,isLegacyTeams:!0,supports:{appInstallDialog:{},appEntity:{},call:{},chat:{},conversations:{},dialog:{card:{bot:{}},url:{bot:{}},update:{}},interactive:{},logs:{},meetingRoom:{},menus:{},monetization:{},notifications:{},pages:{config:{},backStack:{},fullTrust:{}},remoteCamera:{},teams:{fullTrust:{}},teamsCore:{},video:{sharedFrame:{}}}},Se=[D.desktop,D.web,D.rigel,D.surfaceHub,D.teamsRoomsWindows,D.teamsRoomsAndroid,D.teamsPhones,D.teamsDisplays],be=[D.android,D.ios,D.ipados],ye=[...Se,...be];function Pe(e){let t=e;if(t.apiVersion<ge&&Ie.forEach((e=>{t.apiVersion===e.versionToUpgradeFrom&&(t=e.upgradeToNextVersion(t))})),me(t))return t;throw new Error("Received a runtime that could not be upgraded to the latest version")}const Ie=[{versionToUpgradeFrom:1,upgradeToNextVersion:e=>{var t;return{apiVersion:2,hostVersionsInfo:void 0,isLegacyTeams:e.isLegacyTeams,supports:Object.assign(Object.assign({},e.supports),{dialog:e.supports.dialog?{card:void 0,url:e.supports.dialog,update:null===(t=e.supports.dialog)||void 0===t?void 0:t.update}:void 0})}}},{versionToUpgradeFrom:2,upgradeToNextVersion:e=>{const t=e.supports,{appNotification:n}=t,o=fe(t,["appNotification"]);return Object.assign(Object.assign({},e),{apiVersion:3,supports:o})}}],Te={"1.0.0":[{capability:{pages:{appButton:{},tabs:{}},stageView:{}},hostClientTypes:Se}],"1.9.0":[{capability:{location:{}},hostClientTypes:ye}],"2.0.0":[{capability:{people:{}},hostClientTypes:ye},{capability:{sharing:{}},hostClientTypes:[D.desktop,D.web]}],"2.0.1":[{capability:{teams:{fullTrust:{joinedTeams:{}}}},hostClientTypes:[D.android,D.desktop,D.ios,D.teamsRoomsAndroid,D.teamsPhones,D.teamsDisplays,D.web]},{capability:{webStorage:{}},hostClientTypes:[D.desktop]}],"2.0.5":[{capability:{webStorage:{}},hostClientTypes:[D.android,D.ios]}],"2.0.8":[{capability:{sharing:{}},hostClientTypes:[D.android,D.ios]}]},_e=pe.extend("generateBackCompatRuntimeConfig");function Ee(e,t){const n=Object.assign({},e);for(const o in t)Object.prototype.hasOwnProperty.call(t,o)&&("object"!=typeof t[o]||Array.isArray(t[o])?o in e||(n[o]=t[o]):n[o]=Ee(e[o]||{},t[o]));return n}function Re(e,t,n){_e("generating back compat runtime config for %s",e);let o=Object.assign({},t.supports);_e("Supported capabilities in config before updating based on highestSupportedVersion: %o",o),Object.keys(n).forEach((t=>{Z(e,t)>=0&&n[t].forEach((e=>{void 0!==b.hostClientType&&e.hostClientTypes.includes(b.hostClientType)&&(o=Ee(o,e.capability))}))}));const i={apiVersion:ge,hostVersionsInfo:q,isLegacyTeams:!0,supports:o};return _e("Runtime config after updating based on highestSupportedVersion: %o",i),i}const Fe=pe.extend("applyRuntimeConfig");function Ae(e){"string"==typeof e.apiVersion&&(Fe("Trying to apply runtime with string apiVersion, processing as v1: %o",e),e=Object.assign(Object.assign({},e),{apiVersion:1})),Fe("Fast-forwarding runtime %o",e);const t=Pe(e);Fe("Applying runtime %o",t),we=X(t)}const Me="2.19.1-beta.0",Oe=t("internal"),ke=Oe.extend("ensureInitializeCalled"),He=Oe.extend("ensureInitialized");function De(){if(!b.initializeCalled)throw ke(w),new Error(w)}function Le(e,...t){if(!b.initializeCompleted)throw He("%s. initializeCalled: %s",w,b.initializeCalled.toString()),new Error(w);if(t&&t.length>0){let e=!1;for(let n=0;n<t.length;n++)if(t[n]===b.frameContext){e=!0;break}if(!e)throw new Error(`This call is only allowed in following contexts: ${JSON.stringify(t)}. Current context: "${b.frameContext}".`)}return Ce(e)}function Ne(e=c){const t=Z(b.clientSupportedSDKVersion,e);return!isNaN(t)&&t>=0}function Ue(){return b.hostClientType==D.android||b.hostClientType==D.ios||b.hostClientType==D.ipados}function Ve(e=c){if(!Ue()){throw{errorCode:O.NOT_SUPPORTED_ON_PLATFORM}}if(!Ne(e)){throw{errorCode:O.OLD_PLATFORM}}}function xe(e){let t=b.additionalValidOrigins.concat(e.filter((e=>"string"==typeof e&&m.test(e))));const n={};t=t.filter((e=>!n[e]&&(n[e]=!0,!0))),b.additionalValidOrigins=t}function Be(e){return null==e}var We=function(e,t,n,o){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,r){function a(e){try{l(o.next(e))}catch(e){r(e)}}function s(e){try{l(o.throw(e))}catch(e){r(e)}}function l(e){e.done?n(e.value):i(e.value).then(a,s)}l((o=o.apply(e,t||[])).next())}))};let Ge=[];const ze=t("validateOrigin");function je(){return We(this,void 0,void 0,(function*(){yield $e()}))}function qe(){return 0!==Ge.length}function $e(){return We(this,void 0,void 0,(function*(){return qe()?Ge:ce()?(Ge=p,p):fetch(g).then((e=>{if(!e.ok)throw new Error("Invalid Response from Fetch Call");return e.json().then((e=>{if(Je(JSON.stringify(e)))return Ge=e.validOrigins,Ge;throw new Error("Valid Origins List Is Invalid")}))})).catch((e=>(ze("validOrigins fetch call to CDN failed with error: %s. Defaulting to fallback list",e),Ge=p,Ge)))}))}function Je(e){let t=JSON.parse(e);try{t=JSON.parse(e)}catch(e){return!1}if(!t.validOrigins)return!1;for(const e of t.validOrigins)try{new URL("https://"+e)}catch(t){return ze("isValidOriginsFromCDN call failed to validate origin: %s",e),!1}return!0}function Ke(e,t){if("*."===e.substring(0,2)){const n=e.substring(1);if(t.length>n.length&&t.split(".").length===n.split(".").length&&t.substring(t.length-n.length)===n)return!0}else if(e===t)return!0;return!1}function Ze(e){return $e().then((t=>{if(!re(e))return ze("Origin %s is invalid because it is not using https protocol. Protocol being used: %s",e,e.protocol),!1;const n=e.host;if(t.some((e=>Ke(e,n))))return!0;for(const e of b.additionalValidOrigins){if(Ke("https://"===e.substring(0,8)?e.substring(8):e,n))return!0}return ze("Origin %s is invalid because it is not an origin approved by this library or included in the call to app.initialize.\nOrigins approved by this library: %o\nOrigins included in app.initialize: %o",e,t,b.additionalValidOrigins),!1}))}var Qe;!function(e){let t,n,o,i;function r(e){return new Promise(((n,o)=>{if(b.hostClientType===D.desktop||b.hostClientType===D.android||b.hostClientType===D.ios||b.hostClientType===D.ipados||b.hostClientType===D.macos||b.hostClientType===D.rigel||b.hostClientType===D.teamsRoomsWindows||b.hostClientType===D.teamsRoomsAndroid||b.hostClientType===D.teamsPhones||b.hostClientType===D.teamsDisplays||b.hostClientType===D.surfaceHub){const t=document.createElement("a");t.href=e.url,n(an("authentication.authenticate",[t.href,e.width,e.height,e.isExternal]).then((([e,t])=>{if(e)return t;throw new Error(t)})))}else t={success:n,fail:o},c(e)}))}function a(e){return new Promise((t=>{t(an("authentication.getAuthToken",[null==e?void 0:e.resources,null==e?void 0:e.claims,null==e?void 0:e.silent]))})).then((([e,t])=>{if(e)return t;throw new Error(t)}))}function s(){return new Promise((e=>{e(an("authentication.getUser"))})).then((([e,t])=>{if(e)return t;throw new Error(t)}))}function l(){u();try{$t.childWindow&&$t.childWindow.close()}finally{$t.childWindow=null,$t.childOrigin=null}}function c(e){l();let t=e.width||600,n=e.height||400;t=Math.min(t,$t.currentWindow.outerWidth-400),n=Math.min(n,$t.currentWindow.outerHeight-200);const o=document.createElement("a");o.href=e.url.replace("{oauthRedirectMethod}","web");let i=void 0!==$t.currentWindow.screenLeft?$t.currentWindow.screenLeft:$t.currentWindow.screenX,r=void 0!==$t.currentWindow.screenTop?$t.currentWindow.screenTop:$t.currentWindow.screenY;i+=$t.currentWindow.outerWidth/2-t/2,r+=$t.currentWindow.outerHeight/2-n/2,$t.childWindow=$t.currentWindow.open(o.href,"_blank","toolbar=no, location=yes, status=no, menubar=no, scrollbars=yes, top="+r+", left="+i+", width="+t+", height="+n),$t.childWindow?d():p("FailedToOpenWindow")}function u(){n&&(clearInterval(n),n=0),Ht("initialize"),Ht("navigateCrossDomain")}function d(){u(),n=$t.currentWindow.setInterval((()=>{if(!$t.childWindow||$t.childWindow.closed)p("CancelledByUser");else{const e=$t.childOrigin;try{$t.childOrigin="*",En("ping")}finally{$t.childOrigin=e}}}),100),kt("initialize",(()=>[N.authentication,b.hostClientType])),kt("navigateCrossDomain",(()=>!1))}function f(e){try{t&&t.success(e)}finally{t=void 0,l()}}function p(e){try{t&&t.fail(new Error(e))}finally{t=void 0,l()}}function g(e,t,n){if(e){const o=document.createElement("a");o.href=decodeURIComponent(e),o.host&&o.host!==le().location.host&&"outlook.office.com"===o.host&&o.search.indexOf("client_type=Win32_Outlook")>-1&&(t&&"result"===t&&(n&&(o.href=m(o.href,"result",n)),$t.currentWindow.location.assign(m(o.href,"authSuccess",""))),t&&"reason"===t&&(n&&(o.href=m(o.href,"reason",n)),$t.currentWindow.location.assign(m(o.href,"authFailure",""))))}}function m(e,t,n){const o=e.indexOf("#");let i=-1===o?"#":e.substr(o);return i=i+"&"+t+(""!==n?"="+n:""),(e=-1===o?e:e.substr(0,o))+i}e.initialize=function(){kt("authentication.authenticate.success",f,!1),kt("authentication.authenticate.failure",p,!1)},e.registerAuthenticationHandlers=function(e){o=e},e.authenticate=function(e){const t=void 0!==e,n=t?e:o;if(!n)throw new Error("No parameters are provided for authentication");return Le(we,N.content,N.sidePanel,N.settings,N.remove,N.task,N.stage,N.meetingStage),r(n).then((e=>{try{return n&&n.successCallback?(n.successCallback(e),""):e}finally{t||(o=void 0)}})).catch((e=>{try{if(n&&n.failureCallback)return n.failureCallback(e.message),"";throw e}finally{t||(o=void 0)}}))},e.getAuthToken=function(e){return De(),a(e).then((t=>e&&e.successCallback?(e.successCallback(t),""):t)).catch((t=>{if(e&&e.failureCallback)return e.failureCallback(t.message),"";throw t}))},e.getUser=function(e){return De(),s().then((t=>e&&e.successCallback?(e.successCallback(t),null):t)).catch((t=>{if(e&&e.failureCallback)return e.failureCallback(t.message),null;throw t}))},e.notifySuccess=function(e,t){g(t,"result",e),Le(we,N.authentication),cn("authentication.authenticate.success",[e]),Tn($t.parentWindow,(()=>setTimeout((()=>$t.currentWindow.close()),200)))},e.notifyFailure=function(e,t){g(t,"reason",e),Le(we,N.authentication),cn("authentication.authenticate.failure",[e]),Tn($t.parentWindow,(()=>setTimeout((()=>$t.currentWindow.close()),200)))},function(e){e.Public="public",e.EUDB="eudb",e.Other="other"}(i=e.DataResidency||(e.DataResidency={}))}(Qe||(Qe={}));const Xe=a.V_2;function Ye(e,t){if(Le(we,N.content,N.sidePanel,N.task,N.meetingStage),!ot.update.isSupported())throw G;ln(e,"tasks.updateTask",[t])}function et(e,t,n,o){if(Le(we,N.content,N.sidePanel,N.meetingStage),!ot.url.isSupported())throw G;o&&kt("messageForParent",o);ln(e,"tasks.startTask",[ot.url.getDialogInfoFromUrlDialogInfo(t)],((e,t)=>{null==n||n({err:e,result:t}),Ht("messageForParent")}))}function tt(e,t,n,o){if(Le(we,N.content,N.sidePanel,N.meetingStage),!ot.url.bot.isSupported())throw G;o&&kt("messageForParent",o);ln(e,"tasks.startTask",[ot.url.getDialogInfoFromBotUrlDialogInfo(t)],((e,t)=>{null==n||n({err:e,result:t}),Ht("messageForParent")}))}function nt(e,t,n){if(Le(we,N.content,N.task),!ot.url.isSupported())throw G;ln(e,"tasks.completeTask",[t,n?Array.isArray(n)?n:[n]:[]])}var ot;!function(e){const t=[];function n(e){b.frameContext&&(b.frameContext===N.task?t.push(e):Ht("messageForChild"))}let o,r,a;e.initialize=function(){kt("messageForChild",n,!1)},function(e){function n(){return Le(we)&&void 0!==(we.supports.dialog&&we.supports.dialog.url)}let o;function r(e){return{url:e.url,height:e.size?e.size.height:x.Small,width:e.size?e.size.width:x.Small,title:e.title,fallbackUrl:e.fallbackUrl}}e.open=function(e,t,n){et(i(Xe,s.Dialog_Url_Open),e,t,n)},e.submit=function(e,t){nt(i(Xe,s.Dialog_Url_Submit),e,t)},e.sendMessageToParentFromDialog=function(e){if(Le(we,N.task),!n())throw G;ln(i(Xe,s.Dialog_Url_SendMessageToParentFromDialog),"messageForParent",[e])},e.sendMessageToDialog=function(e){if(Le(we,N.content,N.sidePanel,N.meetingStage),!n())throw G;ln(i(Xe,s.Dialog_Url_SendMessageToDialog),"messageForChild",[e])},e.registerOnMessageFromParent=function(e){if(Le(we,N.task),!n())throw G;for(Ht("messageForChild"),kt("messageForChild",e),t.reverse();t.length>0;){e(t.pop())}},e.isSupported=n,function(e){e.open=function(e,t,n){tt(i(Xe,s.Dialog_Url_Bot_Open),e,t,n)},e.isSupported=function(){return Le(we)&&void 0!==(we.supports.dialog&&we.supports.dialog.url&&we.supports.dialog.url.bot)}}(o=e.bot||(e.bot={})),e.getDialogInfoFromUrlDialogInfo=r,e.getDialogInfoFromBotUrlDialogInfo=function(e){const t=r(e);return t.completionBotId=e.completionBotId,t}}(o=e.url||(e.url={})),e.isSupported=function(){return!(!Le(we)||!we.supports.dialog)},function(e){e.resize=function(e){Ye(i(Xe,s.Dialog_Update_Resize),e)},e.isSupported=function(){return!(!Le(we)||!we.supports.dialog)&&!!we.supports.dialog.update}}(r=e.update||(e.update={})),function(e){function t(){const e=we.hostVersionsInfo&&we.hostVersionsInfo.adaptiveCardSchemaVersion&&!ie(we.hostVersionsInfo.adaptiveCardSchemaVersion);return Le(we)&&void 0!==(e&&we.supports.dialog&&we.supports.dialog.card)}let n;function o(e){return{card:e.card,height:e.size?e.size.height:x.Small,width:e.size?e.size.width:x.Small,title:e.title}}function r(e){const t=o(e);return t.completionBotId=e.completionBotId,t}e.open=function(e,n){if(Le(we,N.content,N.sidePanel,N.meetingStage),!t())throw G;const r=o(e);ln(i(Xe,s.Dialog_AdaptiveCard_Open),"tasks.startTask",[r],((e,t)=>{null==n||n({err:e,result:t})}))},e.isSupported=t,function(e){function t(){const e=we.hostVersionsInfo&&we.hostVersionsInfo.adaptiveCardSchemaVersion&&!ie(we.hostVersionsInfo.adaptiveCardSchemaVersion);return Le(we)&&void 0!==(e&&we.supports.dialog&&we.supports.dialog.card&&we.supports.dialog.card.bot)}e.open=function(e,n){if(Le(we,N.content,N.sidePanel,N.meetingStage),!t())throw G;const o=r(e);ln(i(Xe,s.Dialog_AdaptiveCard_Bot_Open),"tasks.startTask",[o],((e,t)=>{null==n||n({err:e,result:t})}))},e.isSupported=t}(n=e.bot||(e.bot={}))}(a=e.adaptiveCard||(e.adaptiveCard={}))}(ot||(ot={}));const it=a.V_2;var rt;!function(e){let t,n,o,r,a;!function(e){e[e.ifRoom=0]="ifRoom",e[e.overflowOnly=1]="overflowOnly"}(t=e.DisplayMode||(e.DisplayMode={}));function l(e){a&&a(e)||(Le(we),ln(i(it,s.Menus_HandleViewConfigItemPress),"viewConfigItemPress",[e]))}function c(e){o&&o(e)||(Le(we),ln(i(it,s.Menus_HandleNavBarMenuItemPress),"handleNavBarMenuItemPress",[e]))}function u(e){r&&r(e)||(Le(we),ln(i(it,s.Menus_HandleActionMenuItemPress),"handleActionMenuItemPress",[e]))}function d(){return!(!Le(we)||!we.supports.menus)}e.MenuItem=class{constructor(){this.enabled=!0,this.selected=!1}},function(e){e.dropDown="dropDown",e.popOver="popOver"}(n=e.MenuListType||(e.MenuListType={})),e.initialize=function(){Ot(i(it,s.Menus_RegisterNavBarMenuItemPressHandler),"navBarMenuItemPress",c,!1),Ot(i(it,s.Menus_RegisterActionMenuItemPressHandler),"actionMenuItemPress",u,!1),Ot(i(it,s.Menus_RegisterSetModuleViewHandler),"setModuleView",l,!1)},e.setUpViews=function(e,t){if(Le(we),!d())throw G;a=t,ln(i(it,s.Menus_SetUpViews),"setUpViews",[e])},e.setNavBarMenu=function(e,t){if(Le(we),!d())throw G;o=t,ln(i(it,s.Menus_SetNavBarMenu),"setNavBarMenu",[e])},e.showActionMenu=function(e,t){if(Le(we),!d())throw G;r=t,ln(i(it,s.Menus_ShowActionMenu),"showActionMenu",[e])},e.isSupported=d}(rt||(rt={}));const at=a.V_2,st=5e3,lt=t("app");function ct(e,t){if(ce()){return lt.extend("initialize")("window object undefined at initialization"),Promise.resolve()}return ne((()=>dt(e,t)),st,new Error("SDK initialization timed out."))}const ut=lt.extend("initializeHelper");function dt(e,t){return new Promise((n=>{b.initializeCalled||(b.initializeCalled=!0,Rt(),b.initializePromise=Kt(t,e).then((({context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:o=c})=>{b.frameContext=e,b.hostClientType=t,b.clientSupportedSDKVersion=o;try{ut("Parsing %s",n);const e=JSON.parse(n);if(ut("Checking if %o is a valid runtime object",null!=e?e:"null"),!e||!e.apiVersion)throw new Error("Received runtime config is invalid");n&&Ae(e)}catch(e){if(!(e instanceof SyntaxError))throw e;try{ut("Attempting to parse %s as an SDK version",n),isNaN(Z(n,c))||(b.clientSupportedSDKVersion=n);const e=JSON.parse(o);if(ut("givenRuntimeConfig parsed to %o",null!=e?e:"null"),!e)throw new Error("givenRuntimeConfig string was successfully parsed. However, it parsed to value of null");Ae(e)}catch(e){if(!(e instanceof SyntaxError))throw e;Ae(Re(b.clientSupportedSDKVersion,ve,Te))}}b.initializeCompleted=!0})),Qe.initialize(),rt.initialize(),Tt.config.initialize(),ot.initialize()),Array.isArray(t)&&xe(t),void 0!==b.initializePromise?n(b.initializePromise):ut("GlobalVars.initializePromise is unexpectedly undefined")}))}function ft(e,t){!Be(t)&&De(),Nt(e,t)}function pt(e,t){return new Promise((n=>{Le(we,N.content,N.sidePanel,N.settings,N.task,N.stage,N.meetingStage),n(Yt(e,"executeDeepLink",t))}))}var gt;function mt(e){var t;return{actionInfo:e.actionInfo,app:{locale:e.locale,sessionId:e.appSessionId?e.appSessionId:"",theme:e.theme?e.theme:"default",iconPositionVertical:e.appIconPosition,osLocaleInfo:e.osLocaleInfo,parentMessageId:e.parentMessageId,userClickTime:e.userClickTime,userFileOpenPreference:e.userFileOpenPreference,host:{name:e.hostName?e.hostName:L.teams,clientType:e.hostClientType?e.hostClientType:D.web,sessionId:e.sessionId?e.sessionId:"",ringId:e.ringId},appLaunchId:e.appLaunchId},page:{id:e.entityId,frameContext:e.frameContext?e.frameContext:b.frameContext,subPageId:e.subEntityId,isFullScreen:e.isFullScreen,isMultiWindow:e.isMultiWindow,sourceOrigin:e.sourceOrigin},user:{id:null!==(t=e.userObjectId)&&void 0!==t?t:"",displayName:e.userDisplayName,isCallingAllowed:e.isCallingAllowed,isPSTNCallingAllowed:e.isPSTNCallingAllowed,licenseType:e.userLicenseType,loginHint:e.loginHint,userPrincipalName:e.userPrincipalName,tenant:e.tid?{id:e.tid,teamsSku:e.tenantSKU}:void 0},channel:e.channelId?{id:e.channelId,displayName:e.channelName,relativeUrl:e.channelRelativeUrl,membershipType:e.channelType,defaultOneNoteSectionId:e.defaultOneNoteSectionId,ownerGroupId:e.hostTeamGroupId,ownerTenantId:e.hostTeamTenantId}:void 0,chat:e.chatId?{id:e.chatId}:void 0,meeting:e.meetingId?{id:e.meetingId}:void 0,sharepoint:e.sharepoint,team:e.teamId?{internalId:e.teamId,displayName:e.teamName,type:e.teamType,groupId:e.groupId,templateId:e.teamTemplateId,isArchived:e.isTeamArchived,userRole:e.userTeamRole}:void 0,sharePointSite:e.teamSiteUrl||e.teamSiteDomain||e.teamSitePath||e.mySitePath||e.mySiteDomain?{teamSiteUrl:e.teamSiteUrl,teamSiteDomain:e.teamSiteDomain,teamSitePath:e.teamSitePath,teamSiteId:e.teamSiteId,mySitePath:e.mySitePath,mySiteDomain:e.mySiteDomain}:void 0}}!function(e){const n=t("app");let o,r,a;e.Messages={AppLoaded:"appInitialization.appLoaded",Success:"appInitialization.success",Failure:"appInitialization.failure",ExpectedFailure:"appInitialization.expectedFailure"},function(e){e.AuthFailed="AuthFailed",e.Timeout="Timeout",e.Other="Other"}(o=e.FailedReason||(e.FailedReason={})),function(e){e.PermissionError="PermissionError",e.NotFound="NotFound",e.Throttling="Throttling",e.Offline="Offline",e.Other="Other"}(r=e.ExpectedFailureReason||(e.ExpectedFailureReason={})),e.isInitialized=function(){return b.initializeCompleted},e.getFrameContext=function(){return b.frameContext},function(){if(ce())return;const e=document.getElementsByTagName("script"),t=e&&e[e.length-1]&&e[e.length-1].src,o="Today, teamsjs can only be used from a single script or you may see undefined behavior. This log line is used to help detect cases where teamsjs is loaded multiple times -- it is always written. The presence of the log itself does not indicate a multi-load situation, but multiples of these log lines will. If you would like to use teamjs from more than one script at the same time, please open an issue at https://github.com/OfficeDev/microsoft-teams-library-js/issues";t&&0!==t.length?n("teamsjs is being used from %s. %s",t,o):n("teamsjs is being used from a script tag embedded directly in your html. %s",o)}(),e.initialize=function(e){return je(),ct(i(at,s.App_Initialize),e)},e._initialize=function(e){$t.currentWindow=e},e._uninitialize=function(){b.initializeCalled&&(Ft(),b.initializeCalled=!1,b.initializeCompleted=!1,b.initializePromise=void 0,b.additionalValidOrigins=[],b.frameContext=void 0,b.hostClientType=void 0,b.isFramelessWindow=!1,Zt())},e.getContext=function(){return new Promise((e=>{De(),e(Qt(i(at,s.App_GetContext),"getContext"))})).then((e=>mt(e)))},e.notifyAppLoaded=function(){De(),ln(i(at,s.App_NotifyAppLoaded),e.Messages.AppLoaded,[Me])},e.notifySuccess=function(){De(),ln(i(at,s.App_NotifySuccess),e.Messages.Success,[Me])},e.notifyFailure=function(t){De(),ln(i(at,s.App_NotifyFailure),e.Messages.Failure,[t.reason,t.message])},e.notifyExpectedFailure=function(t){De(),ln(i(at,s.App_NotifyExpectedFailure),e.Messages.ExpectedFailure,[t.reason,t.message])},e.registerOnThemeChangeHandler=function(e){ft(i(at,s.App_RegisterOnThemeChangeHandler),e)},e.openLink=function(e){return pt(i(at,s.App_OpenLink),e)},function(e){e.registerBeforeSuspendOrTerminateHandler=function(e){if(!e)throw new Error("[app.lifecycle.registerBeforeSuspendOrTerminateHandler] Handler cannot be null");Le(we),Gt(e)},e.registerOnResumeHandler=function(e){if(!e)throw new Error("[app.lifecycle.registerOnResumeHandler] Handler cannot be null");Le(we),zt(e)}}(a=e.lifecycle||(e.lifecycle={}))}(gt||(gt={}));const ht=a.V_2;function Ct(e,t){return new Promise((n=>{if(Le(we,N.content,N.sidePanel,N.settings,N.remove,N.task,N.stage,N.meetingStage),!Tt.isSupported())throw G;n(tn(e,"navigateCrossDomain","Cross-origin navigation is only supported for URLs matching the pattern registered in the manifest.",t))}))}function wt(e){return new Promise((t=>{if(Le(we),!Tt.backStack.isSupported())throw G;t(tn(e,"navigateBack","Back navigation is not supported in the current client or context."))}))}function vt(e,t){return new Promise((n=>{if(Le(we),!Tt.tabs.isSupported())throw G;n(tn(e,"navigateToTab","Invalid internalTabInstanceId and/or channelId were/was provided",t))}))}function St(e,t){if(Le(we),!Tt.isSupported())throw G;ln(e,"returnFocus",[t])}function bt(e,t){return new Promise((n=>{if(Le(we),!Tt.tabs.isSupported())throw G;n(Qt(e,"getTabInstances",t))}))}function yt(e,t){return new Promise((n=>{if(Le(we),!Tt.tabs.isSupported())throw G;n(Qt(e,"getMruTabInstances",t))}))}function Pt(e,t){if(Le(we,N.content,N.sidePanel,N.meetingStage),!Tt.isSupported())throw G;ln(e,"shareDeepLink",[t.subPageId,t.subPageLabel,t.subPageWebUrl])}function It(e,t){if(Le(we,N.content),!Tt.isSupported())throw G;ln(e,"setFrameContext",[t])}var Tt;!function(e){function t(e){It(i(ht,s.Pages_SetCurrentFrame),e)}function n(){return!(!Le(we)||!we.supports.pages)}let o,r,a,l,c,u;e.returnFocus=function(e){St(i(ht,s.Pages_ReturnFocus),e)},e.registerFocusEnterHandler=function(e){Lt(i(ht,s.Pages_RegisterFocusEnterHandler),"focusEnter",e,[],(()=>{if(!n())throw G}))},e.setCurrentFrame=t,e.initializeWithFrameContext=function(e,n,o){gt.initialize(o).then((()=>n&&n())),t(e)},e.getConfig=function(){return new Promise((e=>{if(Le(we,N.content,N.settings,N.remove,N.sidePanel),!n())throw G;e(Qt(i(ht,s.Pages_GetConfig),"settings.getSettings"))}))},e.navigateCrossDomain=function(e){return Ct(i(ht,s.Pages_NavigateCrossDomain),e)},e.navigateToApp=function(e){return new Promise((t=>{if(Le(we,N.content,N.sidePanel,N.settings,N.task,N.stage,N.meetingStage),!n())throw G;const o=i(ht,s.Pages_NavigateCrossDomain);we.isLegacyTeams?t(Yt(o,"executeDeepLink",oe(e))):t(Yt(o,"pages.navigateToApp",e))}))},e.shareDeepLink=function(e){return Pt(i(ht,s.Pages_ShareDeepLink),e)},e.registerFullScreenHandler=function(e){Lt(i(ht,s.Pages_RegisterFullScreenHandler),"fullScreenChange",e,[],(()=>{if(!Be(e)&&!n())throw G}))},e.isSupported=n,function(e){e.navigateToTab=function(e){return vt(i(ht,s.Pages_Tabs_NavigateToTab),e)},e.getTabInstances=function(e){return bt(i(ht,s.Pages_Tabs_GetTabInstances),e)},e.getMruTabInstances=function(e){return yt(i(ht,s.Pages_Tabs_GetMruTabInstances),e)},e.isSupported=function(){return!(!Le(we)||!we.supports.pages)&&!!we.supports.pages.tabs}}(o=e.tabs||(e.tabs={})),function(e){let t,n;function o(e,n){!Be(e)&&Le(we,N.settings),n&&n(),t=e,!Be(e)&&ln(i(ht,s.Pages_Config_RegisterOnSaveHandlerHelper),"registerHandler",["save"])}function r(e,t){!Be(e)&&Le(we,N.remove,N.settings),t&&t(),n=e,!Be(e)&&ln(i(ht,s.Pages_Config_RegisterOnRemoveHandlerHelper),"registerHandler",["remove"])}function a(e){const n=new l(e);t?t(n):$t.childWindow?En("settings.save",[e]):n.notifySuccess()}e.initialize=function(){kt("settings.save",a,!1),kt("settings.remove",c,!1)},e.setValidityState=function(e){if(Le(we,N.settings,N.remove),!d())throw G;ln(i(ht,s.Pages_Config_SetValidityState),"settings.setValidityState",[e])},e.setConfig=function(e){return new Promise((t=>{if(Le(we,N.content,N.settings,N.sidePanel),!d())throw G;t(Yt(i(ht,s.Pages_Config_SetConfig),"settings.setSettings",e))}))},e.registerOnSaveHandler=function(e){o(e,(()=>{if(!Be(e)&&!d())throw G}))},e.registerOnSaveHandlerHelper=o,e.registerOnRemoveHandler=function(e){r(e,(()=>{if(!Be(e)&&!d())throw G}))},e.registerOnRemoveHandlerHelper=r,e.registerChangeConfigHandler=function(e){Lt(i(ht,s.Pages_Config_RegisterChangeConfigHandler),"changeSettings",e,[N.content],(()=>{if(!d())throw G}))};class l{constructor(e){this.notified=!1,this.result=e||{}}notifySuccess(){this.ensureNotNotified(),ln(i(ht,s.Settings_Save_Success),"settings.save.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),ln(i(ht,s.Settings_Save_Failure),"settings.save.failure",[e]),this.notified=!0}ensureNotNotified(){if(this.notified)throw new Error("The SaveEvent may only notify success or failure once.")}}function c(){const e=new u;n?n(e):$t.childWindow?En("settings.remove",[]):e.notifySuccess()}class u{constructor(){this.notified=!1}notifySuccess(){this.ensureNotNotified(),ln(i(ht,s.Settings_Remove_Success),"settings.remove.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),ln(i(ht,s.Settings_Remove_Failure),"settings.remove.failure",[e]),this.notified=!0}ensureNotNotified(){if(this.notified)throw new Error("The removeEventType may only notify success or failure once.")}}function d(){return!(!Le(we)||!we.supports.pages)&&!!we.supports.pages.config}e.isSupported=d}(r=e.config||(e.config={})),function(e){let t;function n(){return wt(i(ht,s.Pages_BackStack_NavigateBack))}function o(e,n,o){!Be(n)&&Le(we),o&&o(),t=n,!Be(n)&&ln(e,"registerHandler",["backButton"])}function r(){t&&t()||($t.childWindow?En("backButtonPress",[]):n())}function a(){return!(!Le(we)||!we.supports.pages)&&!!we.supports.pages.backStack}e._initialize=function(){kt("backButtonPress",r,!1)},e.navigateBack=n,e.registerBackButtonHandler=function(e){o(i(ht,s.Pages_BackStack_RegisterBackButtonHandler),e,(()=>{if(!Be(e)&&!a())throw G}))},e.registerBackButtonHandlerHelper=o,e.isSupported=a}(a=e.backStack||(e.backStack={})),function(e){function t(){return!(!Le(we)||!we.supports.pages)&&!!we.supports.pages.fullTrust}e.enterFullscreen=function(){if(Le(we,N.content),!t())throw G;ln(i(ht,s.Pages_FullTrust_EnterFullscreen),"enterFullscreen",[])},e.exitFullscreen=function(){if(Le(we,N.content),!t())throw G;ln(i(ht,s.Pages_FullTrust_ExitFullscreen),"exitFullscreen",[])},e.isSupported=t}(l=e.fullTrust||(e.fullTrust={})),function(e){function t(){return!(!Le(we)||!we.supports.pages)&&!!we.supports.pages.appButton}e.onClick=function(e){Lt(i(ht,s.Pages_AppButton_OnClick),"appButtonClick",e,[N.content],(()=>{if(!t())throw G}))},e.onHoverEnter=function(e){Lt(i(ht,s.Pages_AppButton_OnHoverEnter),"appButtonHoverEnter",e,[N.content],(()=>{if(!t())throw G}))},e.onHoverLeave=function(e){Lt(i(ht,s.Pages_AppButton_OnHoverLeave),"appButtonHoverLeave",e,[N.content],(()=>{if(!t())throw G}))},e.isSupported=t}(c=e.appButton||(e.appButton={})),function(e){function t(){return!(!Le(we)||!we.supports.pages)&&!!we.supports.pages.currentApp}e.navigateTo=function(e){return new Promise((n=>{if(Le(we,N.content,N.sidePanel,N.settings,N.task,N.stage,N.meetingStage),!t())throw G;n(nn(i(ht,s.Pages_CurrentApp_NavigateTo),"pages.currentApp.navigateTo",e))}))},e.navigateToDefaultPage=function(){return new Promise((e=>{if(Le(we,N.content,N.sidePanel,N.settings,N.task,N.stage,N.meetingStage),!t())throw G;e(nn(i(ht,s.Pages_CurrentApp_NavigateToDefaultPage),"pages.currentApp.navigateToDefaultPage"))}))},e.isSupported=t}(u=e.currentApp||(e.currentApp={}))}(Tt||(Tt={}));const _t=t("handlers");class Et{static initializeHandlers(){Et.handlers.themeChange=Ut,Et.handlers.load=xt,Et.handlers.beforeUnload=Wt,Tt.backStack._initialize()}static uninitializeHandlers(){Et.handlers={},Et.themeChangeHandler=null,Et.loadHandler=null,Et.beforeUnloadHandler=null,Et.beforeSuspendOrTerminateHandler=null,Et.resumeHandler=null}}function Rt(){Et.initializeHandlers()}function Ft(){Et.uninitializeHandlers()}Et.handlers={},Et.themeChangeHandler=null,Et.loadHandler=null,Et.beforeUnloadHandler=null,Et.beforeSuspendOrTerminateHandler=null,Et.resumeHandler=null;const At=_t.extend("callHandler");function Mt(e,t){const n=Et.handlers[e];if(n){At("Invoking the registered handler for message %s with arguments %o",e,t);return[!0,n.apply(this,t)]}return $t.childWindow?(En(e,t),[!1,void 0]):(At("Handler for action message %s not found.",e),[!1,void 0])}function Ot(e,t,n,o=!0,i=[]){n?(Et.handlers[t]=n,o&&ln(e,"registerHandler",[t,...i])):delete Et.handlers[t]}function kt(e,t,n=!0,o=[]){t?(Et.handlers[e]=t,n&&ln(i(a.V_0,s.RegisterHandler),"registerHandler",[e,...o])):delete Et.handlers[e]}function Ht(e){delete Et.handlers[e]}function Dt(e){return null!=Et.handlers[e]}function Lt(e,t,n,o,i){n&&Le(we,...o),i&&i(),kt(t,n)}function Nt(e,t){Et.themeChangeHandler=t,!Be(t)&&ln(e,"registerHandler",["themeChange"])}function Ut(e){Et.themeChangeHandler&&Et.themeChangeHandler(e),$t.childWindow&&En("themeChange",[e])}function Vt(e){Et.loadHandler=e,!Be(e)&&ln(i(a.V_2,s.RegisterHandler),"registerHandler",["load"])}function xt(e){Et.resumeHandler?Et.resumeHandler(e):Et.loadHandler&&Et.loadHandler(e),$t.childWindow&&En("load",[e])}function Bt(e){Et.beforeUnloadHandler=e,!Be(e)&&ln(i(a.V_2,s.RegisterHandler),"registerHandler",["beforeUnload"])}function Wt(){const e=()=>{cn("readyToUnload",[])};Et.beforeSuspendOrTerminateHandler?(Et.beforeSuspendOrTerminateHandler(),$t.childWindow?En("beforeUnload"):e()):Et.beforeUnloadHandler&&Et.beforeUnloadHandler(e)||($t.childWindow?En("beforeUnload"):e())}function Gt(e){Et.beforeSuspendOrTerminateHandler=e,!Be(e)&&cn("registerHandler",["beforeUnload"])}function zt(e){Et.resumeHandler=e,!Be(e)&&cn("registerHandler",["load"])}var jt=function(e,t,n,o){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,r){function a(e){try{l(o.next(e))}catch(e){r(e)}}function s(e){try{l(o.throw(e))}catch(e){r(e)}}function l(e){e.done?n(e.value):i(e.value).then(a,s)}l((o=o.apply(e,t||[])).next())}))};const qt=t("communication");class $t{}class Jt{}function Kt(e,t){if(Jt.messageListener=e=>jt(this,void 0,void 0,(function*(){return yield pn(e)})),$t.currentWindow=$t.currentWindow||le(),$t.parentWindow=$t.currentWindow.parent!==$t.currentWindow.self?$t.currentWindow.parent:$t.currentWindow.opener,($t.parentWindow||e)&&$t.currentWindow.addEventListener("message",Jt.messageListener,!1),!$t.parentWindow){const e=$t.currentWindow;if(!e.nativeInterface)return Promise.reject(new Error("Initialization Failed. No Parent window found."));b.isFramelessWindow=!0,e.onNativeMessage=wn}try{return $t.parentOrigin="*",rn(t,"initialize",[Me,ge]).then((([e,t,n,o])=>({context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:o})))}finally{$t.parentOrigin=null}}function Zt(){$t.currentWindow&&$t.currentWindow.removeEventListener("message",Jt.messageListener,!1),$t.currentWindow=null,$t.parentWindow=null,$t.parentOrigin=null,$t.childWindow=null,$t.childOrigin=null,Jt.parentMessageQueue=[],Jt.childMessageQueue=[],Jt.nextMessageId=0,Jt.callbacks={},Jt.promiseCallbacks={}}function Qt(e,t,...n){return rn(e,t,n).then((([e])=>e))}function Xt(e,...t){return an(e,t).then((([e])=>e))}function Yt(e,t,...n){return rn(e,t,n).then((([e,t])=>{if(!e)throw new Error(t)}))}function en(e,...t){return an(e,t).then((([e,t])=>{if(!e)throw new Error(t)}))}function tn(e,t,n,...o){return rn(e,t,o).then((([e,t])=>{if(!e)throw new Error(t||n)}))}function nn(e,t,...n){return rn(e,t,n).then((([e,t])=>{if(e)throw e;return t}))}function on(e,...t){return an(e,t).then((([e,t])=>{if(e)throw e;return t}))}function rn(e,t,n=void 0){if(!r(e))throw Error(`apiVersionTag: ${e} passed in doesn't follow the pattern starting with 'v' followed by digits, then underscore with words, please check.`);return new Promise((o=>{o(sn(dn(e,t,n).id))}))}function an(e,t=void 0){return new Promise((n=>{n(sn(dn(i(a.V_0,"testing"),e,t).id))}))}function sn(e){return new Promise((t=>{Jt.promiseCallbacks[e]=t}))}function ln(e,t,n,o){let i;if(n instanceof Function?o=n:n instanceof Array&&(i=n),!r(e))throw Error(`apiVersionTag: ${e} passed in doesn't follow the pattern starting with 'v' followed by digits, then underscore with words, please check.`);const a=dn(e,t,i);o&&(Jt.callbacks[a.id]=o)}function cn(e,t,n){let o;t instanceof Function?n=t:t instanceof Array&&(o=t);const r=dn(i(a.V_0,"testing"),e,o);n&&(Jt.callbacks[r.id]=n)}Jt.parentMessageQueue=[],Jt.childMessageQueue=[],Jt.nextMessageId=0,Jt.callbacks={},Jt.promiseCallbacks={};const un=qt.extend("sendMessageToParentHelper");function dn(e,t,n){const o=un,i=$t.parentWindow,r=Rn(e,t,n);if(o("Message %i information: %o",r.id,{actionName:t,args:n}),b.isFramelessWindow)$t.currentWindow&&$t.currentWindow.nativeInterface&&(o("Sending message %i to parent via framelessPostMessage interface",r.id),$t.currentWindow.nativeInterface.framelessPostMessage(JSON.stringify(r)));else{const e=yn(i);i&&e?(o("Sending message %i to parent via postMessage",r.id),i.postMessage(r,e)):(o("Adding message %i to parent message queue",r.id),bn(i).push(r))}return r}const fn=qt.extend("processMessage");function pn(e){return jt(this,void 0,void 0,(function*(){if(!e||!e.data||"object"!=typeof e.data)return void fn("Unrecognized message format received by app, message being ignored. Message: %o",e);const t=e.source||e.originalEvent&&e.originalEvent.source,n=e.origin||e.originalEvent&&e.originalEvent.origin;return mn(t,n).then((o=>{o?(hn(t,n),t===$t.parentWindow?wn(e):t===$t.childWindow&&Sn(e)):fn("Message being ignored by app because it is either coming from the current window or a different window with an invalid origin")}))}))}const gn=qt.extend("shouldProcessMessage");function mn(e,t){return jt(this,void 0,void 0,(function*(){if($t.currentWindow&&e===$t.currentWindow)return gn("Should not process message because it is coming from the current window"),!1;if($t.currentWindow&&$t.currentWindow.location&&t&&t===$t.currentWindow.location.origin)return!0;{const e=yield Ze(new URL(t));return e||gn("Message has an invalid origin of %s",t),e}}))}function hn(e,t){b.isFramelessWindow||$t.parentWindow&&!$t.parentWindow.closed&&e!==$t.parentWindow?$t.childWindow&&!$t.childWindow.closed&&e!==$t.childWindow||($t.childWindow=e,$t.childOrigin=t):($t.parentWindow=e,$t.parentOrigin=t),$t.parentWindow&&$t.parentWindow.closed&&($t.parentWindow=null,$t.parentOrigin=null),$t.childWindow&&$t.childWindow.closed&&($t.childWindow=null,$t.childOrigin=null),In($t.parentWindow),In($t.childWindow)}const Cn=qt.extend("handleParentMessage");function wn(e){const t=Cn;if("id"in e.data&&"number"==typeof e.data.id){const n=e.data,o=Jt.callbacks[n.id];t("Received a response from parent for message %i",n.id),o&&(t("Invoking the registered callback for message %i with arguments %o",n.id,n.args),o.apply(null,[...n.args,n.isPartialResponse]),vn(e)||(t("Removing registered callback for message %i",n.id),delete Jt.callbacks[n.id]));const i=Jt.promiseCallbacks[n.id];i&&(t("Invoking the registered promise callback for message %i with arguments %o",n.id,n.args),i(n.args),t("Removing registered promise callback for message %i",n.id),delete Jt.promiseCallbacks[n.id])}else if("func"in e.data&&"string"==typeof e.data.func){const n=e.data;t("Received an action message %s from parent",n.func),Mt(n.func,n.args)}else t("Received an unknown message: %O",e)}function vn(e){return!0===e.data.isPartialResponse}function Sn(e){if("id"in e.data&&"func"in e.data){const t=e.data,[n,o]=Mt(t.func,t.args);n&&void 0!==o?_n(t.id,Array.isArray(o)?o:[o]):cn(t.func,t.args,((...e)=>{if($t.childWindow){const n=e.pop();_n(t.id,e,n)}}))}}function bn(e){return e===$t.parentWindow?Jt.parentMessageQueue:e===$t.childWindow?Jt.childMessageQueue:[]}function yn(e){return e===$t.parentWindow?$t.parentOrigin:e===$t.childWindow?$t.childOrigin:null}const Pn=qt.extend("flushMessageQueue");function In(e){const t=yn(e),n=bn(e),o=e==$t.parentWindow?"parent":"child";for(;e&&t&&n.length>0;){const i=n.shift();Pn("Flushing message %i from "+o+" message queue via postMessage.",null==i?void 0:i.id),e.postMessage(i,t)}}function Tn(e,t){let n;n=$t.currentWindow.setInterval((()=>{0===bn(e).length&&(clearInterval(n),t())}),100)}function _n(e,t,n){const o=$t.childWindow,i=Fn(e,t,n),r=yn(o);o&&r&&o.postMessage(i,r)}function En(e,t){const n=$t.childWindow,o=An(e,t),i=yn(n);n&&i?n.postMessage(o,i):bn(n).push(o)}function Rn(e,t,n){return{id:Jt.nextMessageId++,func:t,timestamp:Date.now(),args:n||[],apiversiontag:e}}function Fn(e,t,n){return{id:e,args:t||[],isPartialResponse:n}}function An(e,t){return{func:e,args:t||[]}}const Mn=a.V_1;var On,kn,Hn,Dn;function Ln(e,t){Le(we),cn("uploadCustomApp",[e],t||K())}function Nn(e,t,n){Le(we),cn(e,t,n)}function Un(e,t){if(Le(we),!$t.childWindow)throw new Error("The child window has not yet been initialized or is not present");En(e,t)}function Vn(e,t){Le(we),kt(e,((...e)=>t.apply(this,e)))}function xn(e,t){Le(we),kt("userSettingsChange",t,!0,[e])}function Bn(e){Le(we,N.content,N.task);cn("openFilePreview",[e.entityId,e.title,e.description,e.type,e.objectUrl,e.downloadUrl,e.webPreviewUrl,e.webEditUrl,e.baseUrl,e.editFile,e.subEntityId,e.viewerAction,e.fileOpenPreference,e.conversationId,e.sizeInBytes])}!function(e){function t(){return!(!Le(we)||!we.supports.logs)}e.registerGetLogHandler=function(e){if(!Be(e)&&Le(we),!Be(e)&&!t())throw G;e?Ot(i(Mn,s.Logs_RegisterLogRequestHandler),"log.request",(()=>{const t=e();ln(i(Mn,s.Logs_Receive),"log.receive",[t])})):Ht("log.request")},e.isSupported=t}(On||(On={})),function(e){e.fileDownloadStart="fileDownloadStart",e.fileDownloadComplete="fileDownloadComplete"}(kn||(kn={})),function(e){e.view="view",e.edit="edit",e.editNew="editNew"}(Hn||(Hn={})),function(e){e.fileOpenPreference="fileOpenPreference",e.theme="theme"}(Dn||(Dn={}));const Wn=a.V_1;var Gn;!function(e){function t(){return!(!Le(we)||!we.supports.conversations)}e.openConversation=function(e){return new Promise((n=>{if(Le(we,N.content),!t())throw G;const o=Yt(i(Wn,s.Conversations_OpenConversation),"conversations.openConversation",{title:e.title,subEntityId:e.subEntityId,conversationId:e.conversationId,channelId:e.channelId,entityId:e.entityId});e.onStartConversation&&Ot(i(Wn,s.Conversations_RegisterStartConversationHandler),"startConversation",((t,n,o,i)=>{var r;return null===(r=e.onStartConversation)||void 0===r?void 0:r.call(e,{subEntityId:t,conversationId:n,channelId:o,entityId:i})})),e.onCloseConversation&&Ot(i(Wn,s.Conversations_RegisterCloseConversationHandler),"closeConversation",((t,n,o,i)=>{var r;return null===(r=e.onCloseConversation)||void 0===r?void 0:r.call(e,{subEntityId:t,conversationId:n,channelId:o,entityId:i})})),n(o)}))},e.closeConversation=function(){if(Le(we,N.content),!t())throw G;ln(i(Wn,s.Conversations_CloseConversation),"conversations.closeConversation"),Ht("startConversation"),Ht("closeConversation")},e.getChatMembers=function(){return new Promise((e=>{if(Le(we),!t())throw G;e(Qt(i(Wn,s.Conversations_GetChatMember),"getChatMembers"))}))},e.isSupported=t}(Gn||(Gn={}));const zn="users";function jn(e,t,n){if(0===e.length)throw new Error("Must have at least one user when creating a chat deep link");const o=`${zn}=`+e.map((e=>encodeURIComponent(e))).join(","),i=void 0===t?"":`&topicName=${encodeURIComponent(t)}`,r=void 0===n?"":`&message=${encodeURIComponent(n)}`;return`${h}://${C}/l/chat/0/0?${o}${i}${r}`}function qn(e,t,n){if(0===e.length)throw new Error("Must have at least one target when creating a call deep link");const o=`${zn}=`+e.map((e=>encodeURIComponent(e))).join(","),i=void 0===t?"":`&withVideo=${encodeURIComponent(t)}`,r=void 0===n?"":`&source=${encodeURIComponent(n)}`;return`${h}://${C}/l/call/0/0?${o}${i}${r}`}function $n(e,t,n,o,i){const r=void 0===e?"":"attendees="+e.map((e=>encodeURIComponent(e))).join(","),a=void 0===t?"":`&startTime=${encodeURIComponent(t)}`,s=void 0===n?"":`&endTime=${encodeURIComponent(n)}`,l=void 0===o?"":`&subject=${encodeURIComponent(o)}`,c=void 0===i?"":`&content=${encodeURIComponent(i)}`;return`${h}://${C}/l/meeting/new?${r}${a}${s}${l}${c}`}function Jn(e){if(!e)throw new Error("App ID must be set when creating an app install dialog deep link");return`${h}://${C}/l/app/${encodeURIComponent(e)}`}var Kn;!function(e){function t(){return!(!Le(we)||!we.supports.appInstallDialog)}e.openAppInstallDialog=function(e){return new Promise((n=>{if(Le(we,N.content,N.sidePanel,N.settings,N.task,N.stage,N.meetingStage),!t())throw new Error("Not supported");we.isLegacyTeams?n(en("executeDeepLink",Jn(e.appId))):(cn("appInstallDialog.openAppInstallDialog",[e]),n())}))},e.isSupported=t}(Kn||(Kn={}));const Zn=a.V_1,Qn=t("media");var Xn;function Yn(e,t){if(null==e||null==t||e.length<=0)return null;let n=null,o=1;return e.sort(((e,t)=>e.sequence>t.sequence?1:-1)),e.forEach((e=>{e.sequence==o&&(n=n?new Blob([n,e.file],{type:t}):new Blob([e.file],{type:t}),o++)})),n}function eo(e,t){if(null==e||null==t)return null;const n=atob(e.chunk),o=new Array(n.length);for(let e=0;e<n.length;e++)o[e]=n.charCodeAt(e);const i=new Uint8Array(o),r=new Blob([i],{type:t});return{sequence:e.chunkSequence,file:r}}function to(e){ro(e)?Ve("2.0.2"):ao(e)?Ve(u):io(e)&&Ve("2.0.4")}function no(e){return!(e.mediaType!=Xn.MediaType.Video||!e.videoProps||!e.videoProps.videoController)}function oo(e){return!(null==e||e.maxMediaCount>10)}function io(e){var t;return!((null==e?void 0:e.mediaType)!=Xn.MediaType.Image||!(null===(t=null==e?void 0:e.imageProps)||void 0===t?void 0:t.imageOutputFormats))}function ro(e){return!(!e||e.mediaType!=Xn.MediaType.VideoAndImage&&!e.videoAndImageProps)}function ao(e){return!(!e||e.mediaType!=Xn.MediaType.Video||!e.videoProps||e.videoProps.isFullScreenMode)}function so(e,t,n){return null!=e&&null!=t&&t==Xn.FileFormat.ID&&null!=n}function lo(e){return!(null==e||e.length<=0||e.length>10)}function co(e){return!e||!(null===e.timeOutIntervalInSec||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec<=0||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec>60)}function uo(e){if(e){if(e.title&&"string"!=typeof e.title)return!1;if(e.setSelected&&"object"!=typeof e.setSelected)return!1;if(e.openOrgWideSearchInChatOrChannel&&"boolean"!=typeof e.openOrgWideSearchInChatOrChannel)return!1;if(e.singleSelect&&"boolean"!=typeof e.singleSelect)return!1}return!0}!function(e){let t,n,o,r,a,l,c;!function(e){e.Base64="base64",e.ID="id"}(t=e.FileFormat||(e.FileFormat={}));class d{}function p(){return!(!Le(we)||!we.supports.permissions)}e.File=d,e.captureImage=function(e){if(!e)throw new Error("[captureImage] Callback cannot be null");if(Le(we,N.content,N.task),b.isFramelessWindow)if(Ne("1.7.0"))ln(i(Zn,s.Media_CaptureImage),"captureImage",e);else{e({errorCode:O.OLD_PLATFORM},[])}else{e({errorCode:O.NOT_SUPPORTED_ON_PLATFORM},[])}},e.hasPermission=function(){if(Le(we,N.content,N.task),!p())throw G;const e=k.Media;return new Promise((t=>{t(nn(i(Zn,s.Media_HasPermission),"permissions.has",e))}))},e.requestPermission=function(){if(Le(we,N.content,N.task),!p())throw G;const e=k.Media;return new Promise((t=>{t(nn(i(Zn,s.Media_RequestPermission),"permissions.request",e))}))};class g extends d{constructor(e){super(),e&&(this.content=e.content,this.format=e.format,this.mimeType=e.mimeType,this.name=e.name,this.preview=e.preview,this.size=e.size)}getMedia(e){if(!e)throw new Error("[get Media] Callback cannot be null");if(Le(we,N.content,N.task),Ne(f))if(so(this.mimeType,this.format,this.content))Ne("2.0.0")?this.getMediaViaCallback(e):this.getMediaViaHandler(e);else{e({errorCode:O.INVALID_ARGUMENTS},new Blob)}else{e({errorCode:O.OLD_PLATFORM},new Blob)}}getMediaViaCallback(e){const t={mediaMimeType:this.mimeType,assembleAttachment:[]},n=[this.content];ln(i(Zn,s.Media_GetMedia),"getMedia",n,(function(n){if(e)if(n&&n.error)e(n.error,new Blob);else if(n&&n.mediaChunk)if(n.mediaChunk.chunkSequence<=0){const o=Yn(t.assembleAttachment,t.mediaMimeType);e(n.error,null!=o?o:new Blob)}else{const e=eo(n.mediaChunk,t.mediaMimeType);e?t.assembleAttachment.push(e):Qn(`Received a null assemble attachment for when decoding chunk sequence ${n.mediaChunk.chunkSequence}; not including the chunk in the assembled file.`)}else e({errorCode:O.INTERNAL_ERROR,message:"data received is null"},new Blob)}))}getMediaViaHandler(e){const t=Q(),n={mediaMimeType:this.mimeType,assembleAttachment:[]},o=[t,this.content];this.content&&!Be(e)&&ln(i(Zn,s.Media_GetMedia),"getMedia",o),kt("getMedia"+t,(function(o){if(e){const i=JSON.parse(o);if(i.error)e(i.error,new Blob),Ht("getMedia"+t);else if(i.mediaChunk)if(i.mediaChunk.chunkSequence<=0){const o=Yn(n.assembleAttachment,n.mediaMimeType);e(i.error,null!=o?o:new Blob),Ht("getMedia"+t)}else{const e=eo(i.mediaChunk,n.mediaMimeType);e&&n.assembleAttachment.push(e)}else e({errorCode:O.INTERNAL_ERROR,message:"data received is null"},new Blob),Ht("getMedia"+t)}}))}}e.Media=g;class m{constructor(e){this.controllerCallback=e}notifyEventToHost(e,t){Le(we,N.content,N.task);try{Ve(u)}catch(e){return void(t&&t(e))}const n={mediaType:this.getMediaType(),mediaControllerEvent:e};ln(i(Zn,s.Media_Controller),"media.controller",[n],(e=>{t&&t(e)}))}stop(e){this.notifyEventToHost(n.StopRecording,e)}}e.VideoController=class extends m{getMediaType(){return a.Video}notifyEventToApp(e){if(this.controllerCallback)switch(e){case n.StartRecording:if(this.controllerCallback.onRecordingStarted){this.controllerCallback.onRecordingStarted();break}}}},function(e){e[e.StartRecording=1]="StartRecording",e[e.StopRecording=2]="StopRecording"}(n=e.MediaControllerEvent||(e.MediaControllerEvent={})),function(e){e[e.Photo=1]="Photo",e[e.Document=2]="Document",e[e.Whiteboard=3]="Whiteboard",e[e.BusinessCard=4]="BusinessCard"}(o=e.CameraStartMode||(e.CameraStartMode={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(r=e.Source||(e.Source={})),function(e){e[e.Image=1]="Image",e[e.Video=2]="Video",e[e.VideoAndImage=3]="VideoAndImage",e[e.Audio=4]="Audio"}(a=e.MediaType||(e.MediaType={})),function(e){e[e.ID=1]="ID",e[e.URL=2]="URL"}(l=e.ImageUriType||(e.ImageUriType={})),function(e){e[e.IMAGE=1]="IMAGE",e[e.PDF=2]="PDF"}(c=e.ImageOutputFormats||(e.ImageOutputFormats={})),e.selectMedia=function(e,t){if(!t)throw new Error("[select Media] Callback cannot be null");if(Le(we,N.content,N.task),!Ne(f)){const e={errorCode:O.OLD_PLATFORM};return void t(e,[])}try{to(e)}catch(e){return void t(e,[])}if(!oo(e)){const e={errorCode:O.INVALID_ARGUMENTS};return void t(e,[])}const n=[e];ln(i(Zn,s.Media_SelectMedia),"selectMedia",n,((n,o,i)=>{var r,a;if(i)return void(no(e)&&(null===(a=null===(r=null==e?void 0:e.videoProps)||void 0===r?void 0:r.videoController)||void 0===a||a.notifyEventToApp(i)));if(!o)return void t(n,[]);const s=[];for(const e of o)s.push(new g(e));t(n,s)}))},e.viewImages=function(e,t){if(!t)throw new Error("[view images] Callback cannot be null");if(Le(we,N.content,N.task),!Ne(f)){return void t({errorCode:O.OLD_PLATFORM})}if(!lo(e)){return void t({errorCode:O.INVALID_ARGUMENTS})}const n=[e];ln(i(Zn,s.Media_ViewImages),"viewImages",n,t)},e.scanBarCode=function(e,t){if(!e)throw new Error("[media.scanBarCode] Callback cannot be null");if(Le(we,N.content,N.task),b.hostClientType!==D.desktop&&b.hostClientType!==D.web&&b.hostClientType!==D.rigel&&b.hostClientType!==D.teamsRoomsWindows&&b.hostClientType!==D.teamsRoomsAndroid&&b.hostClientType!==D.teamsPhones&&b.hostClientType!==D.teamsDisplays)if(Ne("1.9.0"))if(co(t))ln(i(Zn,s.Media_ScanBarCode),"media.scanBarCode",[t],e);else{e({errorCode:O.INVALID_ARGUMENTS},"")}else{e({errorCode:O.OLD_PLATFORM},"")}else{e({errorCode:O.NOT_SUPPORTED_ON_PLATFORM},"")}}}(Xn||(Xn={}));const fo=a.V_2;var po;!function(e){function t(){return!!(Le(we)&&we.supports.barCode&&we.supports.permissions)}e.scanBarCode=function(e){return new Promise((n=>{if(Le(we,N.content,N.task),!t())throw G;if(!co(e))throw{errorCode:O.INVALID_ARGUMENTS};n(nn(i(fo,s.BarCode_ScanBarCode),"media.scanBarCode",e))}))},e.hasPermission=function(){if(Le(we,N.content,N.task),!t())throw G;const e=k.Media;return new Promise((t=>{t(nn(i(fo,s.BarCode_HasPermission),"permissions.has",e))}))},e.requestPermission=function(){if(Le(we,N.content,N.task),!t())throw G;const e=k.Media;return new Promise((t=>{t(nn(i(fo,s.BarCode_RequestPermission),"permissions.request",e))}))},e.isSupported=t}(po||(po={}));const go=a.V_2;var mo;!function(e){function t(e,t){return new Promise((o=>{if(Le(we,N.content,N.task),!n())throw G;if(we.isLegacyTeams)o(Yt(e,"executeDeepLink",jn([t.user],void 0,t.message)));else{o(Yt(e,"chat.openChat",{members:[t.user],message:t.message}))}}))}function n(){return!(!Le(we)||!we.supports.chat)}e.openChat=function(e){return t(i(go,s.Chat_OpenChat),e)},e.openGroupChat=function(e){const o=i(go,s.Chat_OpenGroupChat);return new Promise((i=>{if(e.users.length<1)throw Error("OpenGroupChat Failed: No users specified");if(1===e.users.length){const n={user:e.users[0],message:e.message};i(t(o,n))}else{if(Le(we,N.content,N.task),!n())throw G;if(we.isLegacyTeams)i(Yt(o,"executeDeepLink",jn(e.users,e.topic,e.message)));else{i(Yt(o,"chat.openChat",{members:e.users,message:e.message,topic:e.topic}))}}}))},e.isSupported=n}(mo||(mo={}));var ho=function(e,t,n,o){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,r){function a(e){try{l(o.next(e))}catch(e){r(e)}}function s(e){try{l(o.throw(e))}catch(e){r(e)}}function l(e){e.done?n(e.value):i(e.value).then(a,s)}l((o=o.apply(e,t||[])).next())}))};const Co=a.V_2;var wo;!function(e){function t(){return!!(Le(we)&&navigator&&navigator.clipboard&&we.supports.clipboard)}e.write=function(e){return ho(this,void 0,void 0,(function*(){if(Le(we,N.content,N.meetingStage,N.task,N.settings,N.stage,N.sidePanel),!t())throw G;if(!e.type||!Object.values(H).includes(e.type))throw new Error(`Blob type ${e.type} is not supported. Supported blob types are ${Object.values(H)}`);const n=yield se(e),o={mimeType:e.type,content:n};return nn(i(Co,s.Clipboard_Write),"clipboard.writeToClipboard",o)}))},e.read=function(){return ho(this,void 0,void 0,(function*(){if(Le(we,N.content,N.meetingStage,N.task,N.settings,N.stage,N.sidePanel),!t())throw G;if(Ue()||b.hostClientType===D.macos){const e=JSON.parse(yield on("clipboard.readFromClipboard"));return ae(e.mimeType,e.content)}return nn(i(Co,s.Clipboard_Read),"clipboard.readFromClipboard")}))},e.isSupported=t}(wo||(wo={}));const vo=a.V_2;var So,bo;function yo(){return we.hostVersionsInfo?we.hostVersionsInfo.adaptiveCardSchemaVersion:void 0}!function(e){function t(){return!!(Le(we)&&we.supports.geoLocation&&we.supports.permissions)}let n;e.getCurrentLocation=function(){if(Le(we,N.content,N.task),!t())throw G;return nn(i(vo,s.GeoLocation_GetCurrentLocation),"location.getLocation",{allowChooseLocation:!1,showMap:!1})},e.hasPermission=function(){if(Le(we,N.content,N.task),!t())throw G;const e=k.GeoLocation;return new Promise((t=>{t(nn(i(vo,s.GeoLocation_HasPermission),"permissions.has",e))}))},e.requestPermission=function(){if(Le(we,N.content,N.task),!t())throw G;const e=k.GeoLocation;return new Promise((t=>{t(nn(i(vo,s.GeoLocation_RequestPermission),"permissions.request",e))}))},e.isSupported=t,function(e){function t(){return!!(Le(we)&&we.supports.geoLocation&&we.supports.geoLocation.map&&we.supports.permissions)}e.chooseLocation=function(){if(Le(we,N.content,N.task),!t())throw G;return nn(i(vo,s.GeoLocation_Map_ChooseLocation),"location.getLocation",{allowChooseLocation:!0,showMap:!0})},e.showLocation=function(e){if(Le(we,N.content,N.task),!t())throw G;if(!e)throw{errorCode:O.INVALID_ARGUMENTS};return nn(i(vo,s.GeoLocation_ShowLocation),"location.showLocation",e)},e.isSupported=t}(n=e.map||(e.map={}))}(So||(So={}));class Po{postMessage(e,t){Le(we),cn("messageForChild",[e],t||K())}addEventListener(e,t){Le(we),"message"===e&&kt("messageForParent",t)}}class Io{static get Instance(){return this._instance||(this._instance=new this)}postMessage(e,t){Le(we,N.task),cn("messageForParent",[e],t||K())}addEventListener(e,t){Le(we,N.task),"message"===e&&kt("messageForChild",t)}}!function(e){function t(){return!(!Le(we)||!we.supports.secondaryBrowser)}e.open=function(e){if(Le(we,N.content),!t())throw G;if(!e||!re(e))throw{errorCode:O.INVALID_ARGUMENTS,message:"Invalid Url: Only https URL is allowed"};return on("secondaryBrowser.open",e.toString())},e.isSupported=t}(bo||(bo={}));const To=a.V_1;var _o;!function(e){function t(){return!(!Le(we)||!we.supports.location)}e.getLocation=function(e,n){if(!n)throw new Error("[location.getLocation] Callback cannot be null");if(Le(we,N.content,N.task),!Ne(d))throw{errorCode:O.OLD_PLATFORM};if(!e)throw{errorCode:O.INVALID_ARGUMENTS};if(!t())throw G;ln(i(To,s.Location_GetLocation),"location.getLocation",[e],n)},e.showLocation=function(e,n){if(!n)throw new Error("[location.showLocation] Callback cannot be null");if(Le(we,N.content,N.task),!Ne(d))throw{errorCode:O.OLD_PLATFORM};if(!e)throw{errorCode:O.INVALID_ARGUMENTS};if(!t())throw G;ln(i(To,s.Location_ShowLocation),"location.showLocation",[e],n)},e.isSupported=t}(_o||(_o={}));var Eo=function(e,t,n,o){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,r){function a(e){try{l(o.next(e))}catch(e){r(e)}}function s(e){try{l(o.throw(e))}catch(e){r(e)}}function l(e){e.done?n(e.value):i(e.value).then(a,s)}l((o=o.apply(e,t||[])).next())}))};const Ro=a.V_1;var Fo;!function(e){let t,n,o,r,a,l;function c(e,n){ln(i(Ro,s.Meeting_RequestAppAudioHandling),"meeting.requestAppAudioHandling",[e.isAppHandlingAudio],((o,r)=>{if(o&&null!=r)throw new Error("[requestAppAudioHandling] Callback response - both parameters cannot be set");if(o)throw new Error(`[requestAppAudioHandling] Callback response - SDK error ${o.errorCode} ${o.message}`);if("boolean"!=typeof r)throw new Error("[requestAppAudioHandling] Callback response - isHostAudioless must be a boolean");Ot(i(Ro,s.Meeting_RegisterMicStateChangeHandler),"meeting.micStateChanged",(n=>Eo(this,void 0,void 0,(function*(){try{const o=yield e.micMuteStateChangedCallback(n);d(o,o.isMicMuted===n.isMicMuted?t.HostInitiated:t.AppDeclinedToChange)}catch(e){d(n,t.AppFailedToChange)}}))));Ot(i(Ro,s.Meeting_RegisterAudioDeviceSelectionChangedHandler),"meeting.audioDeviceSelectionChanged",(t=>{var n;null===(n=e.audioDeviceSelectionChangedCallback)||void 0===n||n.call(e,t)})),n(r)}))}function u(e,t){ln(i(Ro,s.Meeting_RequestAppAudioHandling),"meeting.requestAppAudioHandling",[e.isAppHandlingAudio],((e,n)=>{if(e&&null!=n)throw new Error("[requestAppAudioHandling] Callback response - both parameters cannot be set");if(e)throw new Error(`[requestAppAudioHandling] Callback response - SDK error ${e.errorCode} ${e.message}`);if("boolean"!=typeof n)throw new Error("[requestAppAudioHandling] Callback response - isHostAudioless must be a boolean");Dt("meeting.micStateChanged")&&Ht("meeting.micStateChanged"),Dt("meeting.audioDeviceSelectionChanged")&&Ht("meeting.audioDeviceSelectionChanged"),t(n)}))}function d(e,t){Le(we,N.sidePanel,N.meetingStage),ln(i(Ro,s.Meeting_SetMicStateWithReason),"meeting.updateMicState",[e,t])}!function(e){e[e.HostInitiated=0]="HostInitiated",e[e.AppInitiated=1]="AppInitiated",e[e.AppDeclinedToChange=2]="AppDeclinedToChange",e[e.AppFailedToChange=3]="AppFailedToChange"}(t||(t={})),function(e){e.like="like",e.heart="heart",e.laugh="laugh",e.surprised="surprised",e.applause="applause"}(n=e.MeetingReactionType||(e.MeetingReactionType={})),function(e){e.Unknown="Unknown",e.Adhoc="Adhoc",e.Scheduled="Scheduled",e.Recurring="Recurring",e.Broadcast="Broadcast",e.MeetNow="MeetNow"}(o=e.MeetingType||(e.MeetingType={})),function(e){e.OneOnOneCall="oneOnOneCall",e.GroupCall="groupCall"}(r=e.CallType||(e.CallType={})),function(e){e.Collaborative="Collaborative",e.ScreenShare="ScreenShare"}(a=e.SharingProtocol||(e.SharingProtocol={})),e.getIncomingClientAudioState=function(e){if(!e)throw new Error("[get incoming client audio state] Callback cannot be null");Le(we,N.sidePanel,N.meetingStage),ln(i(Ro,s.Meeting_GetIncomingClientAudioState),"getIncomingClientAudioState",e)},e.toggleIncomingClientAudio=function(e){if(!e)throw new Error("[toggle incoming client audio] Callback cannot be null");Le(we,N.sidePanel,N.meetingStage),ln(i(Ro,s.Meeting_ToggleIncomingClientAudio),"toggleIncomingClientAudio",e)},e.getMeetingDetails=function(e){if(!e)throw new Error("[get meeting details] Callback cannot be null");Le(we,N.sidePanel,N.meetingStage,N.settings,N.content),ln(i(Ro,s.Meeting_GetMeetingDetails),"meeting.getMeetingDetails",e)},e.getAuthenticationTokenForAnonymousUser=function(e){if(!e)throw new Error("[get Authentication Token For AnonymousUser] Callback cannot be null");Le(we,N.sidePanel,N.meetingStage,N.task),ln(i(Ro,s.Meeting_GetAuthenticationTokenForAnonymousUser),"meeting.getAuthenticationTokenForAnonymousUser",e)},e.getLiveStreamState=function(e){if(!e)throw new Error("[get live stream state] Callback cannot be null");Le(we,N.sidePanel),ln(i(Ro,s.Meeting_GetLiveStreamState),"meeting.getLiveStreamState",e)},e.requestStartLiveStreaming=function(e,t,n){if(!e)throw new Error("[request start live streaming] Callback cannot be null");Le(we,N.sidePanel),ln(i(Ro,s.Meeting_RequestStartLiveStreaming),"meeting.requestStartLiveStreaming",[t,n],e)},e.requestStopLiveStreaming=function(e){if(!e)throw new Error("[request stop live streaming] Callback cannot be null");Le(we,N.sidePanel),ln(i(Ro,s.Meeting_RequestStopLiveStreaming),"meeting.requestStopLiveStreaming",e)},e.registerLiveStreamChangedHandler=function(e){if(!e)throw new Error("[register live stream changed handler] Handler cannot be null");Le(we,N.sidePanel),Ot(i(Ro,s.Meeting_RegisterLiveStreamChangedHandler),"meeting.liveStreamChanged",e)},e.shareAppContentToStage=function(e,t,n={sharingProtocol:a.Collaborative}){if(!e)throw new Error("[share app content to stage] Callback cannot be null");Le(we,N.sidePanel,N.meetingStage),ln(i(Ro,s.Meeting_ShareAppContentToStage),"meeting.shareAppContentToStage",[t,n],e)},e.getAppContentStageSharingCapabilities=function(e){if(!e)throw new Error("[get app content stage sharing capabilities] Callback cannot be null");Le(we,N.sidePanel,N.meetingStage),ln(i(Ro,s.Meeting_GetAppContentStageSharingCapabilities),"meeting.getAppContentStageSharingCapabilities",e)},e.stopSharingAppContentToStage=function(e){if(!e)throw new Error("[stop sharing app content to stage] Callback cannot be null");Le(we,N.sidePanel,N.meetingStage),ln(i(Ro,s.Meeting_StopSharingAppContentToStage),"meeting.stopSharingAppContentToStage",e)},e.getAppContentStageSharingState=function(e){if(!e)throw new Error("[get app content stage sharing state] Callback cannot be null");Le(we,N.sidePanel,N.meetingStage),ln(i(Ro,s.Meeting_GetAppContentStageSharingState),"meeting.getAppContentStageSharingState",e)},e.registerSpeakingStateChangeHandler=function(e){if(!e)throw new Error("[registerSpeakingStateChangeHandler] Handler cannot be null");Le(we,N.sidePanel,N.meetingStage),Ot(i(Ro,s.Meeting_RegisterSpeakingStateChangeHandler),"meeting.speakingStateChanged",e)},e.registerRaiseHandStateChangedHandler=function(e){if(!e)throw new Error("[registerRaiseHandStateChangedHandler] Handler cannot be null");Le(we,N.sidePanel,N.meetingStage),Ot(i(Ro,s.Meeting_RegisterRaiseHandStateChangedHandler),"meeting.raiseHandStateChanged",e)},e.registerMeetingReactionReceivedHandler=function(e){if(!e)throw new Error("[registerMeetingReactionReceivedHandler] Handler cannot be null");Le(we,N.sidePanel,N.meetingStage),Ot(i(Ro,s.Meeting_RegisterMeetingReactionReceivedHandler),"meeting.meetingReactionReceived",e)},function(e){e.setOptions=function(e){Le(we,N.sidePanel),e.contentUrl&&new URL(e.contentUrl),ln(i(Ro,s.Meeting_AppShareButton_SetOptions),"meeting.appShareButton.setOptions",[e])}}(l=e.appShareButton||(e.appShareButton={})),e.requestAppAudioHandling=function(e,t){if(!t)throw new Error("[requestAppAudioHandling] Callback response cannot be null");if(!e.micMuteStateChangedCallback)throw new Error("[requestAppAudioHandling] Callback Mic mute state handler cannot be null");Le(we,N.sidePanel,N.meetingStage),e.isAppHandlingAudio?c(e,t):u(e,t)},e.updateMicState=function(e){d(e,t.AppInitiated)}}(Fo||(Fo={}));const Ao=a.V_1,Mo=a.V_2;var Oo;!function(e){function t(){return!(!Le(we)||!we.supports.monetization)}e.openPurchaseExperience=function(e,n){let o,r,a="";return"function"==typeof e?(o=e,r=n,a=i(Ao,s.Monetization_OpenPurchaseExperience)):(r=e,a=i(Mo,s.Monetization_OpenPurchaseExperience)),Le(we,N.content),te((()=>new Promise((e=>{if(!t())throw G;e(nn(a,"monetization.openPurchaseExperience",r))}))),o)},e.isSupported=t}(Oo||(Oo={}));const ko=a.V_2;var Ho;!function(e){function t(){return!(!Le(we)||!we.supports.calendar)}e.openCalendarItem=function(e){return new Promise((n=>{if(Le(we,N.content),!t())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openCalendarItem");n(Yt(i(ko,s.Calendar_OpenCalendarItem),"calendar.openCalendarItem",e))}))},e.composeMeeting=function(e){return new Promise((n=>{if(Le(we,N.content),!t())throw new Error("Not supported");we.isLegacyTeams?n(en("executeDeepLink",$n(e.attendees,e.startTime,e.endTime,e.subject,e.content))):n(Yt(i(ko,s.Calendar_ComposeMeeting),"calendar.composeMeeting",e))}))},e.isSupported=t}(Ho||(Ho={}));const Do=a.V_2;var Lo,No;!function(e){function t(){return!(!Le(we)||!we.supports.mail)}let n;e.openMailItem=function(e){return new Promise((n=>{if(Le(we,N.content),!t())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openMailItem");n(Yt(i(Do,s.Mail_OpenMailItem),"mail.openMailItem",e))}))},e.composeMail=function(e){return new Promise((n=>{if(Le(we,N.content),!t())throw new Error("Not supported");n(Yt(i(Do,s.Mail_ComposeMail),"mail.composeMail",e))}))},e.isSupported=t,function(e){e.New="new",e.Reply="reply",e.ReplyAll="replyAll",e.Forward="forward"}(n=e.ComposeMailType||(e.ComposeMailType={}))}(Lo||(Lo={})),function(e){function t(){le().print()}function n(e,t){!Be(e)&&Le(we),!Be(e)&&t&&t(),Vt(e)}function o(e,t){!Be(e)&&Le(we),!Be(e)&&t&&t(),Bt(e)}function i(){return!(!Le(we)||!we.supports.teamsCore)}e.enablePrintCapability=function(){if(!b.printCapabilityEnabled){if(Le(we),!i())throw G;b.printCapabilityEnabled=!0,document.addEventListener("keydown",(e=>{(e.ctrlKey||e.metaKey)&&80===e.keyCode&&(t(),e.cancelBubble=!0,e.preventDefault(),e.stopImmediatePropagation())}))}},e.print=t,e.registerOnLoadHandler=function(e){n(e,(()=>{if(!Be(e)&&!i())throw G}))},e.registerOnLoadHandlerHelper=n,e.registerBeforeUnloadHandler=function(e){o(e,(()=>{if(!Be(e)&&!i())throw G}))},e.registerBeforeUnloadHandlerHelper=o,e.isSupported=i}(No||(No={}));const Uo=a.V_1,Vo=a.V_2;var xo,Bo;function Wo(e){return e?e.modality&&"string"!=typeof e.modality?[!1,"modality must be a string"]:e.targetElementBoundingRect&&"object"==typeof e.targetElementBoundingRect?e.triggerType&&"string"==typeof e.triggerType?Go(e.persona):[!1,"triggerType must be a valid string"]:[!1,"targetElementBoundingRect must be a DOMRect"]:[!1,"A request object is required"]}function Go(e){return e?e.displayName&&"string"!=typeof e.displayName?[!1,"displayName must be a string"]:e.identifiers&&"object"==typeof e.identifiers?e.identifiers.AadObjectId||e.identifiers.Smtp||e.identifiers.Upn?e.identifiers.AadObjectId&&"string"!=typeof e.identifiers.AadObjectId?[!1,"AadObjectId identifier must be a string"]:e.identifiers.Smtp&&"string"!=typeof e.identifiers.Smtp?[!1,"Smtp identifier must be a string"]:e.identifiers.Upn&&"string"!=typeof e.identifiers.Upn?[!1,"Upn identifier must be a string"]:[!0,void 0]:[!1,"at least one valid identifier must be provided"]:[!1,"persona identifiers object must be provided"]:[!1,"persona object must be provided"]}!function(e){function t(e,t){return new Promise((o=>{if(!Ne("2.0.0"))throw{errorCode:O.OLD_PLATFORM};if(!uo(t))throw{errorCode:O.INVALID_ARGUMENTS};if(!n())throw G;o(nn(e,"people.selectPeople",t))}))}function n(){return!(!Le(we)||!we.supports.people)}e.selectPeople=function(e,n){let o,r;Le(we,N.content,N.task,N.settings);let a="";return"function"==typeof e?([o,r]=[e,n],a=i(Uo,s.People_SelectPeople)):(r=e,a=i(Vo,s.People_SelectPeople)),Y(t,o,a,r)},e.isSupported=n}(xo||(xo={})),function(e){e.showProfile=function(e){return Le(we,N.content),new Promise((t=>{const[n,o]=Wo(e);if(!n)throw{errorCode:O.INVALID_ARGUMENTS,message:o};t(on("profile.showProfile",{modality:e.modality,persona:e.persona,triggerType:e.triggerType,targetRectangle:{x:e.targetElementBoundingRect.x,y:e.targetElementBoundingRect.y,width:e.targetElementBoundingRect.width,height:e.targetElementBoundingRect.height}}))}))},e.isSupported=function(){return!(!Le(we)||!we.supports.profile)}}(Bo||(Bo={}));var zo,jo=function(e,t,n,o){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,r){function a(e){try{l(o.next(e))}catch(e){r(e)}}function s(e){try{l(o.throw(e))}catch(e){r(e)}}function l(e){e.done?n(e.value):i(e.value).then(a,s)}l((o=o.apply(e,t||[])).next())}))};function qo(e,t,n,o){var i,r;return jo(this,void 0,void 0,(function*(){const a=Ko();!ce()&&(null===(r=null===(i=window.chrome)||void 0===i?void 0:i.webview)||void 0===r||r.registerTextureStream(e,a)),Zo(yield Jo(e,n,o),new Qo(n,t),a.writable)}))}function $o(e,t,n,o){var i,r;return jo(this,void 0,void 0,(function*(){const a=Ko();!ce()&&(null===(r=null===(i=window.chrome)||void 0===i?void 0:i.webview)||void 0===r||r.registerTextureStream(e,a)),Zo(yield Jo(e,n,o),new ei(n,t),a.writable)}))}function Jo(e,t,n){return jo(this,void 0,void 0,(function*(){if(ce())throw G;const o=le().chrome;try{null==n||n.reportGettingTextureStream(e);const t=(yield o.webview.getTextureStream(e)).getVideoTracks();if(0===t.length)throw new Error(`No video track in stream ${e}`);return null==n||n.reportTextureStreamAcquired(),t[0]}catch(n){throw t(`Failed to get video track from stream ${e}, error: ${n}`),new Error(`Internal error: can't get video track from stream ${e}`)}}))}function Ko(){if(ce())throw G;const e=window.MediaStreamTrackGenerator;if(!e)throw G;return new e({kind:"video"})}function Zo(e,t,n){new(0,le().MediaStreamTrackProcessor)({track:e}).readable.pipeThrough(new TransformStream(t)).pipeTo(n)}!function(e){e.TimestampIsNull="timestamp of the original video frame is null",e.UnsupportedVideoFramePixelFormat="Unsupported video frame pixel format"}(zo||(zo={}));class Qo{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.transform=(e,t)=>jo(this,void 0,void 0,(function*(){const n=e.timestamp;if(null!==n)try{const o=yield this.videoFrameHandler({videoFrame:e}),i=new VideoFrame(o,{timestamp:n});t.enqueue(i),e.close(),o.close()}catch(t){e.close(),this.notifyError(t)}else this.notifyError(zo.TimestampIsNull)}))}}class Xo{constructor(e,t){if(this.headerBuffer=e,this.notifyError=t,this.ONE_TEXTURE_INPUT_ID=1869900081,this.INVALID_HEADER_ERROR="Invalid video frame header",this.UNSUPPORTED_LAYOUT_ERROR="Unsupported texture layout",this.headerDataView=new Uint32Array(e),this.headerDataView.length<8)throw this.notifyError(this.INVALID_HEADER_ERROR),new Error(this.INVALID_HEADER_ERROR);if(this.headerDataView[0]!==this.ONE_TEXTURE_INPUT_ID)throw this.notifyError(this.UNSUPPORTED_LAYOUT_ERROR),new Error(this.UNSUPPORTED_LAYOUT_ERROR)}get oneTextureLayoutId(){return this.headerDataView[0]}get version(){return this.headerDataView[1]}get frameRowOffset(){return this.headerDataView[2]}get frameFormat(){return this.headerDataView[3]}get frameWidth(){return this.headerDataView[4]}get frameHeight(){return this.headerDataView[5]}get multiStreamHeaderRowOffset(){return this.headerDataView[6]}get multiStreamCount(){return this.headerDataView[7]}}class Yo{constructor(e,t){this.metadataMap=new Map,this.AUDIO_INFERENCE_RESULT_STREAM_ID=828664161;const n=new Uint32Array(e);for(let o=0,i=0;o<t;o++){const t=n[i++],o=n[i++],r=n[i++],a=new Uint8Array(e,o,r);this.metadataMap.set(t,a)}}get audioInferenceResult(){return this.metadataMap.get(this.AUDIO_INFERENCE_RESULT_STREAM_ID)}}class ei{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.shouldDiscardAudioInferenceResult=!1,this.transform=(e,t)=>jo(this,void 0,void 0,(function*(){const n=e.timestamp;if(null!==n)try{const{videoFrame:o,metadata:{audioInferenceResult:i}={}}=yield this.extractVideoFrameAndMetadata(e),r=yield this.videoFrameHandler({videoFrame:o,audioInferenceResult:i}),a=new VideoFrame(r,{timestamp:n});t.enqueue(a),o.close(),e.close(),r.close()}catch(t){e.close(),this.notifyError(t)}else this.notifyError(zo.TimestampIsNull)})),this.extractVideoFrameAndMetadata=e=>jo(this,void 0,void 0,(function*(){if(ce())throw G;if("NV12"!==e.format)throw this.notifyError(zo.UnsupportedVideoFramePixelFormat),new Error(zo.UnsupportedVideoFramePixelFormat);const t={x:0,y:0,width:e.codedWidth,height:2},n=new ArrayBuffer(t.width*t.height*3/2);yield e.copyTo(n,{rect:t});const o=new Xo(n,this.notifyError),i={x:0,y:o.multiStreamHeaderRowOffset,width:e.codedWidth,height:e.codedHeight-o.multiStreamHeaderRowOffset},r=new ArrayBuffer(i.width*i.height*3/2);yield e.copyTo(r,{rect:i});const a=new Yo(r,o.multiStreamCount);return{videoFrame:new VideoFrame(e,{timestamp:e.timestamp,visibleRect:{x:0,y:o.frameRowOffset,width:o.frameWidth,height:o.frameHeight}}),metadata:{audioInferenceResult:this.shouldDiscardAudioInferenceResult?void 0:a.audioInferenceResult}}})),kt("video.mediaStream.audioInferenceDiscardStatusChange",(({discardAudioInferenceResult:e})=>{this.shouldDiscardAudioInferenceResult=e}))}}function ti(e,t){return(n,o)=>{null==t||t.reportApplyingVideoEffect(n||"",o),e(n,o).then((()=>{null==t||t.reportVideoEffectChanged(n||"",o),cn("video.videoEffectReadiness",[!0,n,void 0,o])})).catch((e=>{const t=e in ri.EffectFailureReason?e:ri.EffectFailureReason.InitializationFailure;cn("video.videoEffectReadiness",[!1,n,t,o])}))}}class ni{static setTimeout(e,t){const n=performance.now(),o=Q();return ni.setTimeoutCallbacks[o]={callback:e,timeoutInMs:t,startedAtInMs:n},o}static clearTimeout(e){delete ni.setTimeoutCallbacks[e]}static setInterval(e,t){ni.setTimeout((function n(){e(),ni.setTimeout(n,t)}),t)}static tick(){const e=performance.now(),t=[];for(const n in ni.setTimeoutCallbacks){const o=ni.setTimeoutCallbacks[n];e-o.startedAtInMs>=o.timeoutInMs&&t.push(n)}for(const e of t){ni.setTimeoutCallbacks[e].callback(),delete ni.setTimeoutCallbacks[e]}}}ni.setTimeoutCallbacks={};class oi{constructor(e,t){this.reportStatisticsResult=t,this.sampleCount=0,this.distributionBins=new Uint32Array(e)}processStarts(e,t,n,o){ni.tick(),this.suitableForThisSession(e,t,n,o)||this.reportAndResetSession(this.getStatistics(),e,o,t,n),this.start()}processEnds(){const e=performance.now()-this.frameProcessingStartedAt,t=Math.floor(Math.max(0,Math.min(this.distributionBins.length-1,e)));this.distributionBins[t]+=1,this.sampleCount+=1}getStatistics(){return this.currentSession?{effectId:this.currentSession.effectId,effectParam:this.currentSession.effectParam,frameHeight:this.currentSession.frameHeight,frameWidth:this.currentSession.frameWidth,duration:performance.now()-this.currentSession.startedAtInMs,sampleCount:this.sampleCount,distributionBins:this.distributionBins.slice()}:null}start(){this.frameProcessingStartedAt=performance.now()}suitableForThisSession(e,t,n,o){return this.currentSession&&this.currentSession.effectId===e&&this.currentSession.effectParam===o&&this.currentSession.frameWidth===t&&this.currentSession.frameHeight===n}reportAndResetSession(e,t,n,o,i){e&&this.reportStatisticsResult(e),this.resetCurrentSession(this.getNextTimeout(t,this.currentSession),t,n,o,i),this.timeoutId&&ni.clearTimeout(this.timeoutId),this.timeoutId=ni.setTimeout((()=>this.reportAndResetSession(this.getStatistics(),t,n,o,i)).bind(this),this.currentSession.timeoutInMs)}resetCurrentSession(e,t,n,o,i){this.currentSession={startedAtInMs:performance.now(),timeoutInMs:e,effectId:t,effectParam:n,frameWidth:o,frameHeight:i},this.sampleCount=0,this.distributionBins.fill(0)}getNextTimeout(e,t){return t&&t.effectId===e?Math.min(oi.maxSessionTimeoutInMs,2*t.timeoutInMs):oi.initialSessionTimeoutInMs}}oi.initialSessionTimeoutInMs=1e3,oi.maxSessionTimeoutInMs=3e4;class ii{constructor(e){this.reportPerformanceEvent=e,this.isFirstFrameProcessed=!1,this.frameProcessTimeLimit=100,this.frameProcessingStartedAt=0,this.frameProcessingTimeCost=0,this.processedFrameCount=0,this.performanceStatistics=new oi(ii.distributionBinSize,(e=>this.reportPerformanceEvent("video.performance.performanceDataGenerated",[e])))}startMonitorSlowFrameProcessing(){ni.setInterval((()=>{if(0===this.processedFrameCount)return;const e=this.frameProcessingTimeCost/this.processedFrameCount;e>this.frameProcessTimeLimit&&this.reportPerformanceEvent("video.performance.frameProcessingSlow",[e]),this.frameProcessingTimeCost=0,this.processedFrameCount=0}),ii.calculateFPSInterval)}setFrameProcessTimeLimit(e){this.frameProcessTimeLimit=e}reportApplyingVideoEffect(e,t){var n,o;(null===(n=this.applyingEffect)||void 0===n?void 0:n.effectId)===e&&(null===(o=this.applyingEffect)||void 0===o?void 0:o.effectParam)===t||(this.applyingEffect={effectId:e,effectParam:t},this.appliedEffect=void 0)}reportVideoEffectChanged(e,t){void 0===this.applyingEffect||this.applyingEffect.effectId!==e&&this.applyingEffect.effectParam!==t||(this.appliedEffect={effectId:e,effectParam:t},this.applyingEffect=void 0,this.isFirstFrameProcessed=!1)}reportStartFrameProcessing(e,t){ni.tick(),this.appliedEffect&&(this.frameProcessingStartedAt=performance.now(),this.performanceStatistics.processStarts(this.appliedEffect.effectId,e,t,this.appliedEffect.effectParam))}reportFrameProcessed(){var e;this.appliedEffect&&(this.processedFrameCount++,this.frameProcessingTimeCost+=performance.now()-this.frameProcessingStartedAt,this.performanceStatistics.processEnds(),this.isFirstFrameProcessed||(this.isFirstFrameProcessed=!0,this.reportPerformanceEvent("video.performance.firstFrameProcessed",[Date.now(),this.appliedEffect.effectId,null===(e=this.appliedEffect)||void 0===e?void 0:e.effectParam])))}reportGettingTextureStream(e){this.gettingTextureStreamStartedAt=performance.now(),this.currentStreamId=e}reportTextureStreamAcquired(){if(void 0!==this.gettingTextureStreamStartedAt){const e=performance.now()-this.gettingTextureStreamStartedAt;this.reportPerformanceEvent("video.performance.textureStreamAcquired",[this.currentStreamId,e])}}}ii.distributionBinSize=1e3,ii.calculateFPSInterval=1e3;var ri,ai,si,li,ci=function(e,t,n,o){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,r){function a(e){try{l(o.next(e))}catch(e){r(e)}}function s(e){try{l(o.throw(e))}catch(e){r(e)}}function l(e){e.done?n(e.value):i(e.value).then(a,s)}l((o=o.apply(e,t||[])).next())}))},ui=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]])}return n};!function(e){const t=ce()?void 0:new ii(cn);let n,o,i;function r(e){cn("video.videoFrameProcessed",[e])}function a(e){cn("video.notifyError",[e])}function s(){return Le(we)&&!!we.supports.video&&(!!we.supports.video.mediaStream||!!we.supports.video.sharedFrame)}function l(e,n){if(Le(we,N.sidePanel),!s()||!f())throw G;kt("video.startVideoExtensibilityVideoStream",(n=>ci(this,void 0,void 0,(function*(){const{streamId:o}=n,i=c(e,t);yield qo(o,i,a,t)}))),!1),cn("video.mediaStream.registerForVideoFrame",[n])}function c(e,t){return n=>ci(this,void 0,void 0,(function*(){const o=n.videoFrame;null==t||t.reportStartFrameProcessing(o.codedWidth,o.codedHeight);const i=yield e(n);return null==t||t.reportFrameProcessed(),i}))}function u(e,n){if(Le(we,N.sidePanel),!s()||!g())throw G;kt("video.newVideoFrame",(n=>{if(n){const o=n.timestamp;null==t||t.reportStartFrameProcessing(n.width,n.height),e(d(n),(()=>{null==t||t.reportFrameProcessed(),r(o)}),a)}}),!1),cn("video.registerForVideoFrame",[n])}function d(e){if("videoFrameBuffer"in e)return e;{const{data:t}=e,n=ui(e,["data"]);return Object.assign(Object.assign({},n),{videoFrameBuffer:t})}}function f(){var e;return Le(we,N.sidePanel)&&p()&&!!(null===(e=we.supports.video)||void 0===e?void 0:e.mediaStream)}function p(){var e,t,n,o;return!(!(null===(t=null===(e=le().chrome)||void 0===e?void 0:e.webview)||void 0===t?void 0:t.getTextureStream)||!(null===(o=null===(n=le().chrome)||void 0===n?void 0:n.webview)||void 0===o?void 0:o.registerTextureStream))}function g(){var e;return Le(we,N.sidePanel)&&!!(null===(e=we.supports.video)||void 0===e?void 0:e.sharedFrame)}!function(e){e.NV12="NV12"}(n=e.VideoFrameFormat||(e.VideoFrameFormat={})),function(e){e.EffectChanged="EffectChanged",e.EffectDisabled="EffectDisabled"}(o=e.EffectChangeType||(e.EffectChangeType={})),function(e){e.InvalidEffectId="InvalidEffectId",e.InitializationFailure="InitializationFailure"}(i=e.EffectFailureReason||(e.EffectFailureReason={})),e.registerForVideoFrame=function(e){if(Le(we,N.sidePanel),!s())throw G;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(kt("video.setFrameProcessTimeLimit",(e=>null==t?void 0:t.setFrameProcessTimeLimit(e.timeLimit)),!1),f())l(e.videoFrameHandler,e.config);else{if(!g())throw G;u(e.videoBufferHandler,e.config)}null==t||t.startMonitorSlowFrameProcessing()},e.notifySelectedVideoEffectChanged=function(e,t){if(Le(we,N.sidePanel),!s())throw G;cn("video.videoEffectChanged",[e,t])},e.registerForVideoEffect=function(e){if(Le(we,N.sidePanel),!s())throw G;kt("video.effectParameterChange",ti(e,t),!1),cn("video.registerForVideoEffect")},e.isSupported=s}(ri||(ri={})),function(e){const t="search.queryChange",n="search.queryClose",o="search.queryExecute";function i(){return!(!Le(we)||!we.supports.search)}e.registerHandlers=function(e,r,a){if(Le(we,N.content),!i())throw G;kt(n,e),kt(o,r),a&&kt(t,a)},e.unregisterHandlers=function(){if(Le(we,N.content),!i())throw G;cn("search.unregister"),Ht(t),Ht(n),Ht(o)},e.isSupported=i,e.closeSearch=function(){return new Promise((e=>{if(Le(we,N.content),!i())throw new Error("Not supported");e(en("search.closeSearch"))}))}}(ai||(ai={})),function(e){function t(t){return new Promise((n=>{if(!r())throw G;n(on(e.SharingAPIMessages.shareWebContent,t))}))}function n(e){if(!(e&&e.content&&e.content.length)){throw{errorCode:O.INVALID_ARGUMENTS,message:"Shared content is missing"}}}function o(e){let t;if(e.content.some((e=>!e.type)))throw t={errorCode:O.INVALID_ARGUMENTS,message:"Shared content type cannot be undefined"},t;if(e.content.some((t=>t.type!==e.content[0].type)))throw t={errorCode:O.INVALID_ARGUMENTS,message:"Shared content must be of the same type"},t}function i(e){let t;if("URL"!==e.content[0].type)throw t={errorCode:O.INVALID_ARGUMENTS,message:"Content type is unsupported"},t;if(e.content.some((e=>!e.url)))throw t={errorCode:O.INVALID_ARGUMENTS,message:"URLs are required for URL content types"},t}function r(){return!(!Le(we)||!we.supports.sharing)}e.SharingAPIMessages={shareWebContent:"sharing.shareWebContent"},e.shareWebContent=function(e,r){try{n(e),o(e),i(e)}catch(e){return ee((()=>Promise.reject(e)),r)}return Le(we,N.content,N.sidePanel,N.task,N.stage,N.meetingStage),ee(t,r,e)},e.isSupported=r}(si||(si={})),function(e){let t;function n(){return!(!Le(we)||!we.supports.stageView)}!function(e){e.modal="modal",e.popout="popout",e.popoutWithChat="popoutWithChat"}(t=e.StageViewOpenMode||(e.StageViewOpenMode={})),e.open=function(e){return new Promise((t=>{if(Le(we,N.content),!n())throw G;if(!e)throw new Error("[stageView.open] Stage view params cannot be null");t(on("stageView.open",e))}))},e.isSupported=n}(li||(li={}));var di,fi,pi=function(e,t,n,o){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,r){function a(e){try{l(o.next(e))}catch(e){r(e)}}function s(e){try{l(o.throw(e))}catch(e){r(e)}}function l(e){e.done?n(e.value):i(e.value).then(a,s)}l((o=o.apply(e,t||[])).next())}))};!function(e){let t,n,o;!function(e){e[e.FrontOrRear=1]="FrontOrRear",e[e.FrontOnly=2]="FrontOnly",e[e.RearOnly=3]="RearOnly"}(t=e.CameraRestriction||(e.CameraRestriction={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(n=e.Source||(e.Source={})),e.hasPermission=function(){if(Le(we,N.content,N.task),!o.isSupported())throw G;return on("permissions.has",k.Media)},e.requestPermission=function(){if(Le(we,N.content,N.task),!o.isSupported())throw G;return on("permissions.request",k.Media)},function(e){function t(){return!!(Le(we)&&we.supports.visualMedia&&we.supports.visualMedia.image&&we.supports.permissions)}function n(){if(!t())throw G}function o(e){if(!e||e.maxVisualMediaCount>10||e.maxVisualMediaCount<1)throw $}function i(e,t){if(t.length>e)throw J}e.captureImages=function(e){return pi(this,void 0,void 0,(function*(){Le(we,N.content,N.task),n(),o(e);const t=yield on("visualMedia.image.captureImages",e);return i(e.maxVisualMediaCount,t),t}))},e.retrieveImages=function(e){return pi(this,void 0,void 0,(function*(){Le(we,N.content,N.task),n(),o(e);const t=yield on("visualMedia.image.retrieveImages",e);return i(e.maxVisualMediaCount,t),t}))},e.isSupported=t}(o=e.image||(e.image={}))}(di||(di={})),function(e){function t(){return!(!Le(we)||!we.supports.webStorage)}e.isWebStorageClearedOnUserLogOut=function(){return Le(we),t()},e.isSupported=t}(fi||(fi={}));const gi=a.V_2;var mi,hi;!function(e){let t;function n(){return!(!Le(we)||!we.supports.call)}!function(e){e.Unknown="unknown",e.Audio="audio",e.Video="video",e.VideoBasedScreenSharing="videoBasedScreenSharing",e.Data="data"}(t=e.CallModalities||(e.CallModalities={})),e.startCall=function(e){const o=i(gi,s.Call_StartCall);return new Promise((i=>{var r;if(Le(we,N.content,N.task),!n())throw G;if(!we.isLegacyTeams)return ln(o,"call.startCall",[e],i);i(Qt(o,"executeDeepLink",qn(e.targets,null===(r=e.requestedModalities)||void 0===r?void 0:r.includes(t.Video),e.source)).then((e=>{if(!e)throw new Error("The call was not properly started");return e})))}))},e.isSupported=n}(mi||(mi={})),function(e){e.Messages=gt.Messages,e.FailedReason=gt.FailedReason,e.ExpectedFailureReason=gt.ExpectedFailureReason,e.notifyAppLoaded=function(){gt.notifyAppLoaded()},e.notifySuccess=function(){gt.notifySuccess()},e.notifyFailure=function(e){gt.notifyFailure(e)},e.notifyExpectedFailure=function(e){gt.notifyExpectedFailure(e)}}(hi||(hi={}));const Ci=t("thirdPartyCloudStorage");var wi;!function(e){class t{constructor(e,t){this.fileType=e,this.assembleAttachment=t}}let n=[],o=null,i=!0,r=null;function a(e){if(r)if(e&&e.error)r([],e.error),r=null;else if(e&&e.fileChunk)try{i||0!==e.fileChunk.chunkSequence||(Ci("Last chunk is not received or 'endOfFile' value for previous chunk was not set to true"),i=!0,r([],{errorCode:O.INTERNAL_ERROR,message:"error occurred while receiving data"}),n=[],r=null);const a=eo(e.fileChunk,e.fileType);if(a?(o||(o=new t(e.fileType,[])),o.assembleAttachment.push(a)):(Ci(`Received a null assemble attachment for when decoding chunk sequence ${e.fileChunk.chunkSequence}; not including the chunk in the assembled file.`),r?r([],{errorCode:O.INTERNAL_ERROR,message:"error occurred while receiving data"}):r=null,n=[],r=null,i=!0),i=e.fileChunk.endOfFile,e.fileChunk.endOfFile&&o){const t=Yn(o.assembleAttachment,o.fileType);if(t){const o=new File([t],e.fileName,{type:t.type});n.push(o)}e.isLastFile&&r&&(r(n,e.error),n=[],r=null,i=!0),o=null}}catch(e){r&&(r([],{errorCode:O.INTERNAL_ERROR,message:e}),n=[],r=null,i=!0)}else r([],{errorCode:O.INTERNAL_ERROR,message:"data received is null"}),n=[],r=null,i=!0}function s(){return!(!Le(we)||!we.supports.thirdPartyCloudStorage)}e.getDragAndDropFiles=function(e,t){if(!t)throw new Error("[getDragAndDropFiles] Callback cannot be null");if(e&&""!==e){if(Le(we,N.content,N.task),!s())throw G;if(r)throw r=null,new Error("getDragAndDropFiles cannot be called twice");r=t,i=!0,cn("thirdPartyCloudStorage.getDragAndDropFiles",[e],a)}else{t([],{errorCode:O.INVALID_ARGUMENTS})}},e.isSupported=s}(wi||(wi={}));const vi=a.V_1;function Si(e,t){ct(i(vi,s.PublicAPIs_Initialize),t).then((()=>{e&&e()}))}function bi(){No.enablePrintCapability()}function yi(){No.print()}function Pi(e){De(),ln(i(vi,s.PublicAPIs_GetContext),"getContext",(t=>{t.frameContext||(t.frameContext=b.frameContext),e(t)}))}function Ii(e){ft(i(vi,s.PublicAPIs_RegisterOnThemeChangeHandlerHelper),e)}function Ti(e){Lt(i(vi,s.PublicAPIs_RegisterFullScreenHandler),"fullScreenChange",e,[])}function _i(e){Lt(i(vi,s.PublicAPIs_RegisterAppButtonClickHandler),"appButtonClick",e,[N.content])}function Ei(e){Lt(i(vi,s.PublicAPIs_RegisterAppButtonHoverEnterHandler),"appButtonHoverEnter",e,[N.content])}function Ri(e){Lt(i(vi,s.PublicAPIs_RegisterAppButtonHoverLeaveHandler),"appButtonHoverLeave",e,[N.content])}function Fi(e){Tt.backStack.registerBackButtonHandlerHelper(i(vi,s.PublicAPIs_RegisterBackButtonHandler),e)}function Ai(e){No.registerOnLoadHandlerHelper(e)}function Mi(e){No.registerBeforeUnloadHandlerHelper(e)}function Oi(e){Lt(i(vi,s.PublicAPIs_RegisterFocusEnterHandler),"focusEnter",e,[])}function ki(e){Lt(i(vi,s.PublicAPIs_RegisterChangeSettingsHandler),"changeSettings",e,[N.content])}function Hi(e,t){Le(we),bt(i(vi,s.PublicAPIs_GetTabInstances),t).then((t=>{e(t)}))}function Di(e,t){Le(we),yt(i(vi,s.PublicAPIs_GetMruTabInstances),t).then((t=>{e(t)}))}function Li(e){Pt(i(vi,s.PublicAPIs_ShareDeepLink),{subPageId:e.subEntityId,subPageLabel:e.subEntityLabel,subPageWebUrl:e.subEntityWebUrl})}function Ni(e,t){Le(we,N.content,N.sidePanel,N.settings,N.task,N.stage,N.meetingStage);const n=null!=t?t:K();pt(i(vi,s.PublicAPIs_ExecuteDeepLink),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function Ui(e){It(i(vi,s.PublicAPIs_SetFrameContext),e)}function Vi(e,t,n){ct(i(vi,s.PublicAPIs_Initialize),n).then((()=>t&&t())),It(i(vi,s.PublicAPIs_SetFrameContext),e)}const xi=a.V_1;function Bi(e){St(i(xi,s.Navigation_ReturnFocus),e)}function Wi(e,t){Le(we);const n=null!=t?t:K();vt(i(xi,s.Navigation_NavigateToTab),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function Gi(e,t){Le(we,N.content,N.sidePanel,N.settings,N.remove,N.task,N.stage,N.meetingStage);const n=null!=t?t:K();Ct(i(xi,s.Navigation_NavigateCrossDomain),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function zi(e){Le(we);const t=null!=e?e:K();wt(i(xi,s.Navigation_NavigateBack)).then((()=>{t(!0)})).catch((e=>{t(!1,e.message)}))}var ji;!function(e){e.setValidityState=function(e){Tt.config.setValidityState(e)},e.getSettings=function(e){Le(we,N.content,N.settings,N.remove,N.sidePanel),Tt.getConfig().then((t=>{e(t)}))},e.setSettings=function(e,t){Le(we,N.content,N.settings,N.sidePanel);const n=null!=t?t:K();Tt.config.setConfig(e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))},e.registerOnSaveHandler=function(e){Tt.config.registerOnSaveHandlerHelper(e)},e.registerOnRemoveHandler=function(e){Tt.config.registerOnRemoveHandlerHelper(e)}}(ji||(ji={}));var qi=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]])}return n};const $i=a.V_1;var Ji;!function(e){function t(e){if(void 0===e.url)throw new Error("url property of taskInfo object can't be undefined");return{url:e.url,size:{height:e.height?e.height:W.Small,width:e.width?e.width:W.Small},title:e.title,fallbackUrl:e.fallbackUrl}}function n(e){if(void 0===e.url||void 0===e.completionBotId)throw new Error(`Both url ${e.url} and completionBotId ${e.completionBotId} are required for bot url dialog. At least one is undefined.`);return{url:e.url,size:{height:e.height?e.height:W.Small,width:e.width?e.width:W.Small},title:e.title,fallbackUrl:e.fallbackUrl,completionBotId:e.completionBotId}}function o(e){return e.height=e.height?e.height:W.Small,e.width=e.width?e.width:W.Small,e}e.startTask=function(e,o){const r=i($i,s.Tasks_StartTask),a=o?e=>{var t,n;return o(null!==(t=e.err)&&void 0!==t?t:"",null!==(n=e.result)&&void 0!==n?n:"")}:void 0;return void 0===e.card&&void 0===e.url||e.card?(Le(we,N.content,N.sidePanel,N.meetingStage),ln(r,"tasks.startTask",[e],o)):void 0!==e.completionBotId?tt(r,n(e),a):et(r,t(e),a),new Po},e.updateTask=function(e){e=o(e);const{width:t,height:n}=e,r=qi(e,["width","height"]);if(Object.keys(r).length)throw new Error("resize requires a TaskInfo argument containing only width and height");Ye(i($i,s.Tasks_UpdateTask),e)},e.submitTask=function(e,t){nt(i($i,s.Tasks_SubmitTask),e,t)},e.getDefaultSizeIfNotProvided=o}(Ji||(Ji={}));const Ki=a.V_2;var Zi;!function(e){let t,n;!function(e){e.guest="Guest",e.attendee="Attendee",e.presenter="Presenter",e.organizer="Organizer"}(t=e.UserMeetingRole||(e.UserMeetingRole={})),function(e){e.added="Added",e.alreadyExists="AlreadyExists",e.conflict="Conflict",e.notFound="NotFound"}(n=e.ContainerState||(e.ContainerState={})),e.isSupported=function(){return!(!Le(we,N.meetingStage,N.sidePanel)||!we.supports.interactive)}}(Zi||(Zi={}));class Qi{getFluidTenantInfo(){return Xi(),new Promise((e=>{e(nn(i(Ki,s.Interactive_GetFluidTenantInfo),"interactive.getFluidTenantInfo"))}))}getFluidToken(e){return Xi(),new Promise((t=>{t(nn(i(Ki,s.Interactive_GetFluidToken),"interactive.getFluidToken",e))}))}getFluidContainerId(){return Xi(),new Promise((e=>{e(nn(i(Ki,s.Interactive_GetFluidContainerId),"interactive.getFluidContainerId"))}))}setFluidContainerId(e){return Xi(),new Promise((t=>{t(nn(i(Ki,s.Interactive_SetFluidContainerId),"interactive.setFluidContainerId",e))}))}getNtpTime(){return Xi(),new Promise((e=>{e(nn(i(Ki,s.Interactive_GetNtpTime),"interactive.getNtpTime"))}))}registerClientId(e){return Xi(),new Promise((t=>{t(nn(i(Ki,s.Interactive_RegisterClientId),"interactive.registerClientId",e))}))}getClientRoles(e){return Xi(),new Promise((t=>{t(nn(i(Ki,s.Interactive_GetClientRoles),"interactive.getClientRoles",e))}))}getClientInfo(e){return Xi(),new Promise((t=>{t(nn(i(Ki,s.Interactive_GetClientInfo),"interactive.getClientInfo",e))}))}static create(){return Xi(),new Qi}}function Xi(){if(!Zi.isSupported())throw new Error("LiveShareHost Not supported")}const Yi=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;const er=function(e){return"string"==typeof e&&Yi.test(e)};var tr=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]])}return n};function nr(e){try{return e.cartItems=or(e.cartItems),e}catch(e){throw new Error("Error deserializing cart")}}function or(e){return e.map((e=>{if(e.imageURL){const t=new URL(e.imageURL);e.imageURL=t}return e.accessories&&(e.accessories=or(e.accessories)),e}))}const ir=e=>{try{return e.map((e=>{const{imageURL:t,accessories:n}=e,o=tr(e,["imageURL","accessories"]),i=Object.assign({},o);return t&&(i.imageURL=t.href),n&&(i.accessories=ir(n)),i}))}catch(e){throw new Error("Error serializing cart items")}};function rr(e){if(!Array.isArray(e)||0===e.length)throw new Error("cartItems must be a non-empty array");for(const t of e)sr(t),ar(t.accessories)}function ar(e){if(null!=e){if(!Array.isArray(e)||0===e.length)throw new Error("CartItem.accessories must be a non-empty array");for(const t of e){if(t.accessories)throw new Error("Item in CartItem.accessories cannot have accessories");sr(t)}}}function sr(e){if(!e.id)throw new Error("cartItem.id must not be empty");if(!e.name)throw new Error("cartItem.name must not be empty");cr(e.price),ur(e.quantity)}function lr(e){if(null!=e){if(!e)throw new Error("id must not be empty");if(!1===er(e))throw new Error("id must be a valid UUID")}}function cr(e){if("number"!=typeof e||e<0)throw new Error(`price ${e} must be a number not less than 0`);if(parseFloat(e.toFixed(3))!==e)throw new Error(`price ${e} must have at most 3 decimal places`)}function ur(e){if("number"!=typeof e||e<=0||parseInt(e.toString())!==e)throw new Error(`quantity ${e} must be an integer greater than 0`)}function dr(e){if(!Object.values(pr.CartStatus).includes(e))throw new Error(`cartStatus ${e} is not valid`)}const fr=a.V_2;var pr,gr,mr;!function(e){let t,n;function o(){return!(!Le(we)||!we.supports.marketplace)}e.cartVersion={majorVersion:1,minorVersion:1},function(e){e.TACAdminUser="TACAdminUser",e.TeamsAdminUser="TeamsAdminUser",e.TeamsEndUser="TeamsEndUser"}(t=e.Intent||(e.Intent={})),function(e){e.Open="Open",e.Processing="Processing",e.Processed="Processed",e.Closed="Closed",e.Error="Error"}(n=e.CartStatus||(e.CartStatus={})),e.getCart=function(){if(Le(we,N.content,N.task),!o())throw G;return nn(i(fr,s.Marketplace_GetCart),"marketplace.getCart",e.cartVersion).then(nr)},e.addOrUpdateCartItems=function(t){if(Le(we,N.content,N.task),!o())throw G;if(!t)throw new Error("addOrUpdateCartItemsParams must be provided");return lr(null==t?void 0:t.cartId),rr(null==t?void 0:t.cartItems),nn(i(fr,s.Marketplace_AddOrUpdateCartItems),"marketplace.addOrUpdateCartItems",Object.assign(Object.assign({},t),{cartItems:ir(t.cartItems),cartVersion:e.cartVersion})).then(nr)},e.removeCartItems=function(t){if(Le(we,N.content,N.task),!o())throw G;if(!t)throw new Error("removeCartItemsParams must be provided");if(lr(null==t?void 0:t.cartId),!Array.isArray(null==t?void 0:t.cartItemIds)||0===(null==t?void 0:t.cartItemIds.length))throw new Error("cartItemIds must be a non-empty array");return nn(i(fr,s.Marketplace_RemoveCardItems),"marketplace.removeCartItems",Object.assign(Object.assign({},t),{cartVersion:e.cartVersion})).then(nr)},e.updateCartStatus=function(t){if(Le(we,N.content,N.task),!o())throw G;if(!t)throw new Error("updateCartStatusParams must be provided");return lr(null==t?void 0:t.cartId),dr(null==t?void 0:t.cartStatus),nn(i(fr,s.Marketplace_UpdateCartStatus),"marketplace.updateCartStatus",Object.assign(Object.assign({},t),{cartVersion:e.cartVersion})).then(nr)},e.isSupported=o}(pr||(pr={})),function(e){const t="Action.Execute";let n,o,i;function r(e){if(e.requestType===n.ActionExecuteInvokeRequest){const n=e;if(n.type!==t){throw{errorCode:i.INTERNAL_ERROR,message:`Invalid action type ${n.type}. Action type must be "${t}"`}}}else if(e.requestType===n.QueryMessageExtensionRequest){if(e.commandId.length>64)throw new Error("originalRequestInfo.commandId exceeds the maximum size of 64 characters");if(e.parameters.length>5)throw new Error("originalRequestInfo.parameters exceeds the maximum size of 5");for(const t of e.parameters){if(t.name.length>64)throw new Error("originalRequestInfo.parameters.name exceeds the maximum size of 64 characters");if(t.value.length>512)throw new Error("originalRequestInfo.parameters.value exceeds the maximum size of 512 characters")}}}function a(){return!(!Le(we)||!we.supports.externalAppAuthentication)}!function(e){e.ActionExecuteInvokeRequest="ActionExecuteInvokeRequest",e.QueryMessageExtensionRequest="QueryMessageExtensionRequest"}(n=e.OriginalRequestType||(e.OriginalRequestType={})),function(e){e.ActionExecuteInvokeResponse="ActionExecuteInvokeResponse",e.QueryMessageExtensionResponse="QueryMessageExtensionResponse"}(o=e.InvokeResponseType||(e.InvokeResponseType={})),function(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}(i=e.InvokeErrorCode||(e.InvokeErrorCode={})),e.authenticateAndResendRequest=function(e,t,n){if(Le(we,N.content),!a())throw G;return de(e),r(n),an("externalAppAuthentication.authenticateAndResendRequest",[e,n,t.url.href,t.width,t.height,t.isExternal]).then((([e,t])=>{if(e&&null!=t.responseType)return t;throw t}))},e.authenticateWithSSO=function(e,t){if(Le(we,N.content),!a())throw G;return de(e),an("externalAppAuthentication.authenticateWithSSO",[e,t.claims,t.silent]).then((([e,t])=>{if(!e)throw t}))},e.authenticateWithSSOAndResendRequest=function(e,t,n){if(Le(we,N.content),!a())throw G;return de(e),r(n),an("externalAppAuthentication.authenticateWithSSOAndResendRequest",[e,n,t.claims,t.silent]).then((([e,t])=>{if(e&&null!=t.responseType)return t;throw t}))},e.isSupported=a}(gr||(gr={})),function(e){let t,n,o;function i(){return!(!Le(we)||!we.supports.externalAppCardActions)}!function(e){e.DeepLinkDialog="DeepLinkDialog",e.DeepLinkOther="DeepLinkOther",e.DeepLinkStageView="DeepLinkStageView",e.GenericUrl="GenericUrl"}(t=e.ActionOpenUrlType||(e.ActionOpenUrlType={})),function(e){e.INTERNAL_ERROR="INTERNAL_ERROR",e.INVALID_LINK="INVALID_LINK",e.NOT_SUPPORTED="NOT_SUPPORTED"}(n=e.ActionOpenUrlErrorCode||(e.ActionOpenUrlErrorCode={})),function(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}(o=e.ActionSubmitErrorCode||(e.ActionSubmitErrorCode={})),e.processActionSubmit=function(e,t){if(Le(we,N.content),!i())throw G;return de(e),an("externalAppCardActions.processActionSubmit",[e,t]).then((([e,t])=>{if(!e)throw t}))},e.processActionOpenUrl=function(e,t){if(Le(we,N.content),!i())throw G;return de(e),an("externalAppCardActions.processActionOpenUrl",[e,t.href]).then((([e,t])=>{if(e)throw e;return t}))},e.isSupported=i}(mr||(mr={}));const hr=a.V_1;var Cr;!function(e){let t,n,o,r,a,l;function c(e,t){return{errorCode:e,message:t}}!function(e){e.Dropbox="DROPBOX",e.Box="BOX",e.Sharefile="SHAREFILE",e.GoogleDrive="GOOGLEDRIVE",e.Egnyte="EGNYTE",e.SharePoint="SharePoint"}(t=e.CloudStorageProvider||(e.CloudStorageProvider={})),function(e){e[e.Sharepoint=0]="Sharepoint",e[e.WopiIntegration=1]="WopiIntegration",e[e.Google=2]="Google",e[e.OneDrive=3]="OneDrive",e[e.Recent=4]="Recent",e[e.Aggregate=5]="Aggregate",e[e.FileSystem=6]="FileSystem",e[e.Search=7]="Search",e[e.AllFiles=8]="AllFiles",e[e.SharedWithMe=9]="SharedWithMe"}(n=e.CloudStorageProviderType||(e.CloudStorageProviderType={})),function(e){e.ClassMaterials="classMaterials"}(o=e.SpecialDocumentLibraryType||(e.SpecialDocumentLibraryType={})),function(e){e.Readonly="readonly"}(r=e.DocumentLibraryAccessType||(e.DocumentLibraryAccessType={})),function(e){e.Downloaded="Downloaded",e.Downloading="Downloading",e.Failed="Failed"}(a=e.FileDownloadStatus||(e.FileDownloadStatus={})),function(e){e.Download="DOWNLOAD",e.Upload="UPLOAD",e.Delete="DELETE"}(l=e.CloudStorageProviderFileAction||(e.CloudStorageProviderFileAction={})),e.getCloudStorageFolders=function(e,t){if(Le(we,N.content),!e||0===e.length)throw new Error("[files.getCloudStorageFolders] channelId name cannot be null or empty");if(!t)throw new Error("[files.getCloudStorageFolders] Callback cannot be null");ln(i(hr,s.Files_GetCloudStorageFolders),"files.getCloudStorageFolders",[e],t)},e.addCloudStorageFolder=function(e,t){if(Le(we,N.content),!e||0===e.length)throw new Error("[files.addCloudStorageFolder] channelId name cannot be null or empty");if(!t)throw new Error("[files.addCloudStorageFolder] Callback cannot be null");ln(i(hr,s.Files_AddCloudStorageFolder),"files.addCloudStorageFolder",[e],t)},e.deleteCloudStorageFolder=function(e,t,n){if(Le(we,N.content),!e)throw new Error("[files.deleteCloudStorageFolder] channelId name cannot be null or empty");if(!t)throw new Error("[files.deleteCloudStorageFolder] folderToDelete cannot be null or empty");if(!n)throw new Error("[files.deleteCloudStorageFolder] Callback cannot be null");ln(i(hr,s.Files_DeleteCloudStorageFolder),"files.deleteCloudStorageFolder",[e,t],n)},e.getCloudStorageFolderContents=function(e,t,n){if(Le(we,N.content),!e||!t)throw new Error("[files.getCloudStorageFolderContents] folder/providerCode name cannot be null or empty");if(!n)throw new Error("[files.getCloudStorageFolderContents] Callback cannot be null");if("isSubdirectory"in e&&!e.isSubdirectory)throw new Error("[files.getCloudStorageFolderContents] provided folder is not a subDirectory");ln(i(hr,s.Files_GetCloudStorageFolderContents),"files.getCloudStorageFolderContents",[e,t],n)},e.openCloudStorageFile=function(e,t,n){if(Le(we,N.content),!e||!t)throw new Error("[files.openCloudStorageFile] file/providerCode cannot be null or empty");if(e.isSubdirectory)throw new Error("[files.openCloudStorageFile] provided file is a subDirectory");ln(i(hr,s.Files_OpenCloudStorageFile),"files.openCloudStorageFile",[e,t,n])},e.getExternalProviders=function(e=!1,t){if(Le(we,N.content),!t)throw new Error("[files.getExternalProviders] Callback cannot be null");ln(i(hr,s.Files_GetExternalProviders),"files.getExternalProviders",[e],t)},e.copyMoveFiles=function(e,t,n,o,r=!1,a){if(Le(we,N.content),!e||0===e.length)throw new Error("[files.copyMoveFiles] selectedFiles cannot be null or empty");if(!t)throw new Error("[files.copyMoveFiles] providerCode cannot be null or empty");if(!n)throw new Error("[files.copyMoveFiles] destinationFolder cannot be null or empty");if(!o)throw new Error("[files.copyMoveFiles] destinationProviderCode cannot be null or empty");if(!a)throw new Error("[files.copyMoveFiles] callback cannot be null");ln(i(hr,s.Files_CopyMoveFiles),"files.copyMoveFiles",[e,t,n,o,r],a)},e.getFileDownloads=function(e){if(Le(we,N.content),!e)throw new Error("[files.getFileDownloads] Callback cannot be null");ln(i(hr,s.Files_GetFileDownloads),"files.getFileDownloads",[],e)},e.openDownloadFolder=function(e=void 0,t){if(Le(we,N.content),!t)throw new Error("[files.openDownloadFolder] Callback cannot be null");ln(i(hr,s.Files_OpenDownloadFolder),"files.openDownloadFolder",[e],t)},e.addCloudStorageProvider=function(e){if(Le(we,N.content),!e)throw c(O.INVALID_ARGUMENTS,"[files.addCloudStorageProvider] callback cannot be null");ln(i(hr,s.Files_AddCloudStorageProvider),"files.addCloudStorageProvider",[],e)},e.removeCloudStorageProvider=function(e,t){if(Le(we,N.content),!t)throw c(O.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] callback cannot be null");if(!e||!e.content)throw c(O.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] 3P cloud storage provider request content is missing");ln(i(hr,s.Files_RemoveCloudStorageProvider),"files.removeCloudStorageProvider",[e],t)},e.addCloudStorageProviderFile=function(e,t){if(Le(we,N.content),!t)throw c(O.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw c(O.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] 3P cloud storage provider request content is missing");ln(i(hr,s.Files_AddCloudStorageProviderFile),"files.addCloudStorageProviderFile",[e],t)},e.renameCloudStorageProviderFile=function(e,t){if(Le(we,N.content),!t)throw c(O.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw c(O.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] 3P cloud storage provider request content is missing");ln(i(hr,s.Files_RenameCloudStorageProviderFile),"files.renameCloudStorageProviderFile",[e],t)},e.deleteCloudStorageProviderFile=function(e,t){if(Le(we,N.content),!t)throw c(O.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw c(O.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] 3P cloud storage provider request content details are missing");ln(i(hr,s.Files_DeleteCloudStorageProviderFile),"files.deleteCloudStorageProviderFile",[e],t)},e.downloadCloudStorageProviderFile=function(e,t){if(Le(we,N.content),!t)throw c(O.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw c(O.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");ln(i(hr,s.Files_DownloadCloudStorageProviderFile),"files.downloadCloudStorageProviderFile",[e],t)},e.uploadCloudStorageProviderFile=function(e,t){if(Le(we,N.content),!t)throw c(O.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw c(O.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");if(!e.content.destinationFolder)throw c(O.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] Invalid destination folder details");ln(i(hr,s.Files_UploadCloudStorageProviderFile),"files.uploadCloudStorageProviderFile",[e],t)},e.registerCloudStorageProviderListChangeHandler=function(e){if(Le(we),!e)throw new Error("[registerCloudStorageProviderListChangeHandler] Handler cannot be null");Ot(i(hr,s.Files_RegisterCloudStorageProviderListChangeHandler),"files.cloudStorageProviderListChange",e)},e.registerCloudStorageProviderContentChangeHandler=function(e){if(Le(we),!e)throw new Error("[registerCloudStorageProviderContentChangeHandler] Handler cannot be null");Ot(i(hr,s.Files_RegisterCloudStorageProviderContentChangeHandler),"files.cloudStorageProviderContentChange",e)}}(Cr||(Cr={}));const wr=a.V_1;var vr;!function(e){function t(){return!(!Le(we)||!we.supports.meetingRoom)}e.getPairedMeetingRoomInfo=function(){return new Promise((e=>{if(Le(we),!t())throw G;e(nn(i(wr,s.MeetingRoom_GetPairedMeetingRoomInfo),"meetingRoom.getPairedMeetingRoomInfo"))}))},e.sendCommandToPairedMeetingRoom=function(e){return new Promise((n=>{if(!e||0==e.length)throw new Error("[meetingRoom.sendCommandToPairedMeetingRoom] Command name cannot be null or empty");if(Le(we),!t())throw G;n(nn(i(wr,s.MeetingRoom_SendCommandToPairedMeetingRoom),"meetingRoom.sendCommandToPairedMeetingRoom",e))}))},e.registerMeetingRoomCapabilitiesUpdateHandler=function(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler] Handler cannot be null");if(Le(we),!t())throw G;Ot(i(wr,s.MeetingRoom_RegisterMeetingRoomCapabilitiesUpdateHandler),"meetingRoom.meetingRoomCapabilitiesUpdate",(t=>{Le(we),e(t)}))},e.registerMeetingRoomStatesUpdateHandler=function(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomStatesUpdateHandler] Handler cannot be null");if(Le(we),!t())throw G;Ot(i(wr,s.MeetingRoom_RegisterMeetingRoomStatesUpdateHandler),"meetingRoom.meetingRoomStatesUpdate",(t=>{Le(we),e(t)}))},e.isSupported=t}(vr||(vr={}));const Sr=a.V_1;var br,yr;!function(e){function t(){return!(!Le(we)||!we.supports.notifications)}e.showNotification=function(e){if(Le(we,N.content),!t())throw G;ln(i(Sr,s.Notifications_ShowNotification),"notifications.showNotification",[e])},e.isSupported=t}(br||(br={})),function(e){let t,n,o;function i(){return!(!Le(we)||!we.supports.remoteCamera)}!function(e){e.Reset="Reset",e.ZoomIn="ZoomIn",e.ZoomOut="ZoomOut",e.PanLeft="PanLeft",e.PanRight="PanRight",e.TiltUp="TiltUp",e.TiltDown="TiltDown"}(t=e.ControlCommand||(e.ControlCommand={})),function(e){e[e.CommandResetError=0]="CommandResetError",e[e.CommandZoomInError=1]="CommandZoomInError",e[e.CommandZoomOutError=2]="CommandZoomOutError",e[e.CommandPanLeftError=3]="CommandPanLeftError",e[e.CommandPanRightError=4]="CommandPanRightError",e[e.CommandTiltUpError=5]="CommandTiltUpError",e[e.CommandTiltDownError=6]="CommandTiltDownError",e[e.SendDataError=7]="SendDataError"}(n=e.ErrorReason||(e.ErrorReason={})),function(e){e[e.None=0]="None",e[e.ControlDenied=1]="ControlDenied",e[e.ControlNoResponse=2]="ControlNoResponse",e[e.ControlBusy=3]="ControlBusy",e[e.AckTimeout=4]="AckTimeout",e[e.ControlTerminated=5]="ControlTerminated",e[e.ControllerTerminated=6]="ControllerTerminated",e[e.DataChannelError=7]="DataChannelError",e[e.ControllerCancelled=8]="ControllerCancelled",e[e.ControlDisabled=9]="ControlDisabled",e[e.ControlTerminatedToAllowOtherController=10]="ControlTerminatedToAllowOtherController"}(o=e.SessionTerminatedReason||(e.SessionTerminatedReason={})),e.getCapableParticipants=function(e){if(!e)throw new Error("[remoteCamera.getCapableParticipants] Callback cannot be null");if(Le(we,N.sidePanel),!i())throw G;cn("remoteCamera.getCapableParticipants",e)},e.requestControl=function(e,t){if(!e)throw new Error("[remoteCamera.requestControl] Participant cannot be null");if(!t)throw new Error("[remoteCamera.requestControl] Callback cannot be null");if(Le(we,N.sidePanel),!i())throw G;cn("remoteCamera.requestControl",[e],t)},e.sendControlCommand=function(e,t){if(!e)throw new Error("[remoteCamera.sendControlCommand] ControlCommand cannot be null");if(!t)throw new Error("[remoteCamera.sendControlCommand] Callback cannot be null");if(Le(we,N.sidePanel),!i())throw G;cn("remoteCamera.sendControlCommand",[e],t)},e.terminateSession=function(e){if(!e)throw new Error("[remoteCamera.terminateSession] Callback cannot be null");if(Le(we,N.sidePanel),!i())throw G;cn("remoteCamera.terminateSession",e)},e.registerOnCapableParticipantsChangeHandler=function(e){if(!e)throw new Error("[remoteCamera.registerOnCapableParticipantsChangeHandler] Handler cannot be null");if(Le(we,N.sidePanel),!i())throw G;kt("remoteCamera.capableParticipantsChange",e)},e.registerOnErrorHandler=function(e){if(!e)throw new Error("[remoteCamera.registerOnErrorHandler] Handler cannot be null");if(Le(we,N.sidePanel),!i())throw G;kt("remoteCamera.handlerError",e)},e.registerOnDeviceStateChangeHandler=function(e){if(!e)throw new Error("[remoteCamera.registerOnDeviceStateChangeHandler] Handler cannot be null");if(Le(we,N.sidePanel),!i())throw G;kt("remoteCamera.deviceStateChange",e)},e.registerOnSessionStatusChangeHandler=function(e){if(!e)throw new Error("[remoteCamera.registerOnSessionStatusChangeHandler] Handler cannot be null");if(Le(we,N.sidePanel),!i())throw G;kt("remoteCamera.sessionStatusChange",e)},e.isSupported=i}(yr||(yr={}));const Pr=a.V_1;var Ir,Tr;!function(e){function t(){return!(!Le(we)||!we.supports.appEntity)}e.selectAppEntity=function(e,n,o,r){if(Le(we,N.content),!t())throw G;if(!e||0==e.length)throw new Error("[appEntity.selectAppEntity] threadId name cannot be null or empty");if(!r)throw new Error("[appEntity.selectAppEntity] Callback cannot be null");ln(i(Pr,s.AppEntity_SelectAppEntity),"appEntity.selectAppEntity",[e,n,o],r)},e.isSupported=t}(Ir||(Ir={})),function(e){let t,n;function o(){return!(!Le(we)||!we.supports.teams)}!function(e){e[e.Regular=0]="Regular",e[e.Private=1]="Private",e[e.Shared=2]="Shared"}(t=e.ChannelType||(e.ChannelType={})),e.getTeamChannels=function(e,t){if(Le(we,N.content),!o())throw G;if(!e)throw new Error("[teams.getTeamChannels] groupId cannot be null or empty");if(!t)throw new Error("[teams.getTeamChannels] Callback cannot be null");cn("teams.getTeamChannels",[e],t)},e.refreshSiteUrl=function(e,t){if(Le(we),!o())throw G;if(!e)throw new Error("[teams.refreshSiteUrl] threadId cannot be null or empty");if(!t)throw new Error("[teams.refreshSiteUrl] Callback cannot be null");cn("teams.refreshSiteUrl",[e],t)},e.isSupported=o,function(e){let t;function n(){return!(!Le(we)||!we.supports.teams)&&!!we.supports.teams.fullTrust}!function(e){function t(){return!(!Le(we)||!we.supports.teams)&&(!!we.supports.teams.fullTrust&&!!we.supports.teams.fullTrust.joinedTeams)}e.getUserJoinedTeams=function(e){return new Promise((n=>{if(Le(we),!t())throw G;if((b.hostClientType===D.android||b.hostClientType===D.teamsRoomsAndroid||b.hostClientType===D.teamsPhones||b.hostClientType===D.teamsDisplays)&&!Ne("2.0.1")){const e={errorCode:O.OLD_PLATFORM};throw new Error(JSON.stringify(e))}n(Xt("getUserJoinedTeams",e))}))},e.isSupported=t}(t=e.joinedTeams||(e.joinedTeams={})),e.getConfigSetting=function(e){return new Promise((t=>{if(Le(we),!n())throw G;t(Xt("getConfigSetting",e))}))},e.isSupported=n}(n=e.fullTrust||(e.fullTrust={}))}(Tr||(Tr={}));var _r,Er=function(e,t,n,o){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,r){function a(e){try{l(o.next(e))}catch(e){r(e)}}function s(e){try{l(o.throw(e))}catch(e){r(e)}}function l(e){e.done?n(e.value):i(e.value).then(a,s)}l((o=o.apply(e,t||[])).next())}))};!function(e){e.frameProcessingTimeoutInMs=2e3;const t=ce()?void 0:new ii(cn);let n;function o(){const t=setTimeout((()=>{l(`Frame not processed in ${e.frameProcessingTimeoutInMs}ms`,n.Warn)}),e.frameProcessingTimeoutInMs);return function(){clearTimeout(t)}}function i(e,t){return n=>Er(this,void 0,void 0,(function*(){const i=n.videoFrame;t.reportStartFrameProcessing(i.codedWidth,i.codedHeight);const r=o(),a=yield e(n);return r(),t.reportFrameProcessed(),a}))}function r(e){return e.videoFrameBuffer=e.videoFrameBuffer||e.data,delete e.data,e}function a(){return Le(we),ri.isSupported()}function s(e){cn("video.videoFrameProcessed",[e])}function l(e,t=n.Warn){cn("video.notifyError",[e,t])}!function(e){e.Fatal="fatal",e.Warn="warn"}(n=e.ErrorLevel||(e.ErrorLevel={})),e.registerForVideoFrame=function(e){var n,c;if(!a())throw G;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(Le(we,N.sidePanel)){if(kt("video.setFrameProcessTimeLimit",(e=>null==t?void 0:t.setFrameProcessTimeLimit(e)),!1),null===(n=we.supports.video)||void 0===n?void 0:n.mediaStream)kt("video.startVideoExtensibilityVideoStream",(n=>Er(this,void 0,void 0,(function*(){const{streamId:o,metadataInTexture:r}=n,a=t?i(e.videoFrameHandler,t):e.videoFrameHandler;r?yield $o(o,a,l,t):yield qo(o,a,l,t)}))),!1),cn("video.mediaStream.registerForVideoFrame",[e.config]);else{if(!(null===(c=we.supports.video)||void 0===c?void 0:c.sharedFrame))throw G;kt("video.newVideoFrame",(n=>{if(n){null==t||t.reportStartFrameProcessing(n.width,n.height);const i=o(),a=n.timestamp;e.videoBufferHandler(r(n),(()=>{i(),null==t||t.reportFrameProcessed(),s(a)}),l)}}),!1),cn("video.registerForVideoFrame",[e.config])}null==t||t.startMonitorSlowFrameProcessing()}},e.notifySelectedVideoEffectChanged=function(e,t,n){if(Le(we,N.sidePanel),!a())throw G;cn("video.videoEffectChanged",[e,t,n])},e.registerForVideoEffect=function(e){if(Le(we,N.sidePanel),!a())throw G;kt("video.effectParameterChange",ti(e,t),!1),cn("video.registerForVideoEffect")},e.updatePersonalizedEffects=function(e){if(Le(we,N.sidePanel),!ri.isSupported())throw G;cn("video.personalizedEffectsChanged",[e])},e.isSupported=a,e.notifyFatalError=function(e){if(Le(we),!ri.isSupported())throw G;l(e,n.Fatal)}}(_r||(_r={}))})(),o})()));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("microsoftTeams",[],t):"object"==typeof exports?exports.microsoftTeams=t():e.microsoftTeams=t()}("undefined"!=typeof self?self:this,(()=>(()=>{var e={302:(e,t,n)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let i=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(i++,"%c"===e&&(o=i))})),t.splice(o,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(65)(t);const{formatters:i}=e.exports;i.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},65:(e,t,n)=>{e.exports=function(e){function t(e){let n,o,r,a=null;function s(...e){if(!s.enabled)return;const i=s,o=Number(new Date),r=o-(n||o);i.diff=r,i.prev=n,i.curr=o,n=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,o)=>{if("%%"===n)return"%";a++;const r=t.formatters[o];if("function"==typeof r){const t=e[a];n=r.call(i,t),e.splice(a,1),a--}return n})),t.formatArgs.call(i,e);(i.log||t.log).apply(i,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=i,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(o!==t.namespaces&&(o=t.namespaces,r=t.enabled(e)),r),set:e=>{a=e}}),"function"==typeof t.init&&t.init(s),s}function i(e,n){const i=t(this.namespace+(void 0===n?":":n)+e);return i.log=this.log,i}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(o),...t.skips.map(o).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const i=("string"==typeof e?e:"").split(/[\s,]+/),o=i.length;for(n=0;n<o;n++)i[n]&&("-"===(e=i[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,i;for(n=0,i=t.skips.length;n<i;n++)if(t.skips[n].test(e))return!1;for(n=0,i=t.names.length;n<i;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(247),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},247:e=>{var t=1e3,n=60*t,i=60*n,o=24*i;function r(e){if(!((e=String(e)).length>100)){var r=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(r){var a=parseFloat(r[1]);switch((r[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*a;case"weeks":case"week":case"w":return 6048e5*a;case"days":case"day":case"d":return a*o;case"hours":case"hour":case"hrs":case"hr":case"h":return a*i;case"minutes":case"minute":case"mins":case"min":case"m":return a*n;case"seconds":case"second":case"secs":case"sec":case"s":return a*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}}}function a(e){var r=Math.abs(e);return r>=o?Math.round(e/o)+"d":r>=i?Math.round(e/i)+"h":r>=n?Math.round(e/n)+"m":r>=t?Math.round(e/t)+"s":e+"ms"}function s(e){var r=Math.abs(e);return r>=o?l(e,r,o,"day"):r>=i?l(e,r,i,"hour"):r>=n?l(e,r,n,"minute"):r>=t?l(e,r,t,"second"):e+" ms"}function l(e,t,n,i){var o=t>=1.5*n;return Math.round(e/n)+" "+i+(o?"s":"")}e.exports=function(e,t){t=t||{};var n=typeof e;if("string"===n&&e.length>0)return r(e);if("number"===n&&isFinite(e))return t.long?s(e):a(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}}},t={};function n(i){var o=t[i];if(void 0!==o)return o.exports;var r=t[i]={exports:{}};return e[i](r,r.exports,n),r.exports}(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;n.t=function(i,o){if(1&o&&(i=this(i)),8&o)return i;if("object"==typeof i&&i){if(4&o&&i.__esModule)return i;if(16&o&&"function"==typeof i.then)return i}var r=Object.create(null);n.r(r);var a={};e=e||[null,t({}),t([]),t(t)];for(var s=2&o&&i;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((e=>a[e]=()=>i[e]));return a.default=()=>i,n.d(r,a),r}})(),(()=>{n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})}})(),(()=>{n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var i={};return(()=>{"use strict";n.r(i),n.d(i,{ActionObjectType:()=>A,ChannelType:()=>B,ChildAppWindow:()=>Ui,DialogDimension:()=>x,ErrorCode:()=>O,FileOpenPreference:()=>F,FrameContexts:()=>D,HostClientType:()=>V,HostName:()=>N,LiveShareHost:()=>br,NotificationTypes:()=>Qn,ParentAppWindow:()=>xi,SecondaryM365ContentIdName:()=>M,TaskModuleDimension:()=>W,TeamType:()=>L,UserSettingTypes:()=>Xn,UserTeamRole:()=>U,ViewerActionTypes:()=>Zn,app:()=>gt,appEntity:()=>Zr,appInitialization:()=>Bo,appInstallDialog:()=>pi,authentication:()=>Ze,barCode:()=>Ai,calendar:()=>Xi,call:()=>xo,chat:()=>Oi,clipboard:()=>Vi,conversations:()=>si,dialog:()=>it,enablePrintCapability:()=>jo,executeDeepLink:()=>lr,externalAppAuthentication:()=>xr,externalAppCardActions:()=>Br,files:()=>Gr,geoLocation:()=>Di,getAdaptiveCardSchemaVersion:()=>Li,getContext:()=>Jo,getMruTabInstances:()=>ar,getTabInstances:()=>rr,initialize:()=>qo,initializeWithFrameContext:()=>dr,liveShare:()=>Pr,location:()=>zi,logs:()=>Kn,mail:()=>eo,marketplace:()=>Ur,media:()=>hi,meeting:()=>$i,meetingRoom:()=>qr,menus:()=>rt,monetization:()=>Qi,navigateBack:()=>mr,navigateCrossDomain:()=>gr,navigateToTab:()=>pr,notifications:()=>$r,openFilePreview:()=>ri,pages:()=>Tt,people:()=>oo,print:()=>$o,profile:()=>lo,registerAppButtonClickHandler:()=>Zo,registerAppButtonHoverEnterHandler:()=>Xo,registerAppButtonHoverLeaveHandler:()=>Yo,registerBackButtonHandler:()=>er,registerBeforeUnloadHandler:()=>nr,registerChangeSettingsHandler:()=>or,registerCustomHandler:()=>ii,registerFocusEnterHandler:()=>ir,registerFullScreenHandler:()=>Qo,registerOnLoadHandler:()=>tr,registerOnThemeChangeHandler:()=>Ko,registerUserSettingsChangeHandler:()=>oi,remoteCamera:()=>Kr,returnFocus:()=>fr,search:()=>Mo,secondaryBrowser:()=>Wi,sendCustomEvent:()=>ni,sendCustomMessage:()=>ti,setFrameContext:()=>cr,settings:()=>Cr,shareDeepLink:()=>sr,sharing:()=>Oo,stageView:()=>Ho,tasks:()=>Sr,teams:()=>Yr,teamsCore:()=>to,thirdPartyCloudStorage:()=>Go,uploadCustomApp:()=>ei,version:()=>Me,videoEffects:()=>Fo,videoEffectsEx:()=>na,visualMedia:()=>Do,webStorage:()=>Lo});const e=(0,n(302).debug)("teamsJs");function t(t){return e.extend(t)}function o(e,t){return`${e}_${t}`}function r(e){return/^v\d+_[\w.]+$/.test(e)}var a,s;!function(e){e.V_0="v0",e.V_1="v1",e.V_2="v2",e.V_3="v3"}(a||(a={})),function(e){e.App_GetContext="app.getContext",e.App_Initialize="app.initialize",e.App_NotifyAppLoaded="app.notifyAppLoaded",e.App_NotifyExpectedFailure="app.notifyExpectedFailure",e.App_NotifyFailure="app.notifyFailure",e.App_NotifySuccess="app.notifySuccess",e.App_OpenLink="app.openLink",e.App_RegisterOnThemeChangeHandler="app.registerOnThemeChangeHandler",e.AppEntity_SelectAppEntity="appEntity.selectAppEntity",e.BarCode_HasPermission="barCode.hasPermission",e.BarCode_RequestPermission="barCode.requestPermission",e.BarCode_ScanBarCode="barCode.scanBarCode",e.Calendar_ComposeMeeting="calendar.composeMeeting",e.Calendar_OpenCalendarItem="calendar.openCalendarItem",e.Call_StartCall="call.startCall",e.Chat_OpenChat="chat.openChat",e.Chat_OpenGroupChat="chat.openGroupChat",e.Clipboard_Read="clipboard.read",e.Clipboard_Write="clipboard.write",e.Conversations_CloseConversation="conversations.closeConversation",e.Conversations_GetChatMember="conversations.getChatMember",e.Conversations_OpenConversation="conversations.openConversation",e.Conversations_RegisterCloseConversationHandler="conversations.registerCloseConversationHandler",e.Conversations_RegisterStartConversationHandler="conversations.registerStartConversationHandler",e.Dialog_AdaptiveCard_Bot_Open="dialog.adaptiveCard.bot.open",e.Dialog_AdaptiveCard_Open="dialog.adaptiveCard.open",e.Dialog_Update_Resize="dialog.update.resize",e.Dialog_Url_Bot_Open="dialog.url.bot.open",e.Dialog_Url_Open="dialog.url.open",e.Dialog_Url_Submit="dialog.url.submit",e.Dialog_Url_ParentCommunication_SendMessageToParentFromDialog="dialog.url.parentCommunication.sendMessageToParentFromDialog",e.Dialog_Url_ParentCommunication_SendMessageToDialog="dialog.url.parentCommunication.sendMessageToDialog",e.Files_AddCloudStorageFolder="files.addCloudStorageFolder",e.Files_AddCloudStorageProvider="files.addCloudStorageProvider",e.Files_AddCloudStorageProviderFile="files.addCloudStorageProviderFile",e.Files_CopyMoveFiles="files.copyMoveFiles",e.Files_DeleteCloudStorageFolder="files.deleteCloudStorageFolder",e.Files_DeleteCloudStorageProviderFile="files.deleteCloudStorageProviderFile",e.Files_DownloadCloudStorageProviderFile="files.downloadCloudStorageProviderFile",e.Files_GetCloudStorageFolderContents="files.getCloudStorageFolderContents",e.Files_GetCloudStorageFolders="files.getCloudStorageFolders",e.Files_GetExternalProviders="files.getExternalProviders",e.Files_GetFileDownloads="files.getFileDownloads",e.Files_OpenCloudStorageFile="files.openCloudStorageFile",e.Files_OpenDownloadFolder="files.openDownloadFolder",e.Files_RegisterCloudStorageProviderContentChangeHandler="files.registerCloudStorageProviderContentChangeHandler",e.Files_RegisterCloudStorageProviderListChangeHandler="files.registerCloudStorageProviderListChangeHandler",e.Files_RemoveCloudStorageProvider="files.removeCloudStorageProvider",e.Files_RenameCloudStorageProviderFile="files.renameCloudStorageProviderFile",e.Files_UploadCloudStorageProviderFile="files.uploadCloudStorageProviderFile",e.GeoLocation_GetCurrentLocation="geoLocation.getCurrentLocation",e.GeoLocation_HasPermission="geoLocation.hasPermission",e.GeoLocation_Map_ChooseLocation="geoLocation.map.chooseLocation",e.GeoLocation_RequestPermission="geoLocation.requestPermission",e.GeoLocation_ShowLocation="geoLocation.showLocation",e.Interactive_GetClientInfo="interactive.getClientInfo",e.Interactive_GetClientRoles="interactive.getClientRoles",e.Interactive_GetFluidContainerId="interactive.getFluidContainerId",e.Interactive_GetFluidTenantInfo="interactive.getFluidTenantInfo",e.Interactive_GetFluidToken="interactive.getFluidToken",e.Interactive_GetNtpTime="interactive.getNtpTime",e.Interactive_RegisterClientId="interactive.registerClientId",e.Interactive_SetFluidContainerId="interactive.setFluidContainerId",e.Location_GetLocation="location.getLocation",e.Location_ShowLocation="location.showLocation",e.Logs_Receive="log.receive",e.Logs_RegisterLogRequestHandler="log.request",e.Mail_ComposeMail="mail.composeMail",e.Mail_OpenMailItem="mail.openMailItem",e.Marketplace_AddOrUpdateCartItems="marketplace.addOrUpdateCartItems",e.Marketplace_GetCart="marketplace.getCart",e.Marketplace_RemoveCardItems="marketplace.removeCartItems",e.Marketplace_UpdateCartStatus="marketplace.updateCartStatus",e.Media_CaptureImage="media.captureImage",e.Media_Controller="media.controller",e.Media_GetMedia="media.getMedia",e.Media_HasPermission="media.hasPermission",e.Media_RequestPermission="media.requestPermission",e.Media_ScanBarCode="media.scanBarCode",e.Media_SelectMedia="media.selectMedia",e.Media_ViewImages="media.viewImages",e.Meeting_AppShareButton_SetOptions="meeting.appShareButton.setOptions",e.Meeting_GetAppContentStageSharingCapabilities="meeting.getAppContentStageSharingCapabilities",e.Meeting_GetAppContentStageSharingState="meeting.getAppContentStageSharingState",e.Meeting_GetAuthenticationTokenForAnonymousUser="meeting.getAuthenticationTokenForAnonymousUser",e.Meeting_GetIncomingClientAudioState="meeting.getIncomingClientAudioState",e.Meeting_GetLiveStreamState="meeting.getLiveStreamState",e.Meeting_GetMeetingDetails="meeting.getMeetingDetails",e.Meeting_RegisterAudioDeviceSelectionChangedHandler="meeting.registerAudioDeviceSelectionChangedHandler",e.Meeting_RegisterLiveStreamChangedHandler="meeting.registerLiveStreamChangedHandler",e.Meeting_RegisterMeetingReactionReceivedHandler="meeting.registerMeetingReactionReceivedHandler",e.Meeting_RegisterMicStateChangeHandler="meeting.registerMicStateChangeHandler",e.Meeting_RegisterRaiseHandStateChangedHandler="meeting.registerRaiseHandStateChangedHandler",e.Meeting_RegisterSpeakingStateChangeHandler="meeting.registerSpeakingStateChangeHandler",e.Meeting_RequestAppAudioHandling="meeting.requestAppAudioHandling",e.Meeting_RequestStartLiveStreaming="meeting.requestStartLiveStreaming",e.Meeting_RequestStopLiveStreaming="meeting.requestStopLiveStreaming",e.Meeting_SetMicStateWithReason="meeting.setMicStateWithReason",e.Meeting_ShareAppContentToStage="meeting.shareAppContentToStage",e.Meeting_StopSharingAppContentToStage="meeting.stopSharingAppContentToStage",e.Meeting_ToggleIncomingClientAudio="meeting.toggleIncomingClientAudio",e.MeetingRoom_GetPairedMeetingRoomInfo="meetingRoom.getPairedMeetingRoomInfo",e.MeetingRoom_RegisterMeetingRoomCapabilitiesUpdateHandler="meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler",e.MeetingRoom_RegisterMeetingRoomStatesUpdateHandler="meetingRoom.registerMeetingRoomStatesUpdateHandler",e.MeetingRoom_SendCommandToPairedMeetingRoom="meetingRoom.sendCommandToPairedMeetingRoom",e.Menus_HandleActionMenuItemPress="menus.handleActionMenuItemPress",e.Menus_HandleNavBarMenuItemPress="menus.handleNavBarMenuItemPress",e.Menus_HandleViewConfigItemPress="menus.handleViewConfigItemPress",e.Menus_RegisterActionMenuItemPressHandler="menus.registerActionMenuItemPressHandler",e.Menus_RegisterNavBarMenuItemPressHandler="menus.registerNavBarMenuItemPressHandler",e.Menus_RegisterSetModuleViewHandler="menus.registerSetModuleViewHandler",e.Menus_SetNavBarMenu="menus.setNavBarMenu",e.Menus_SetUpViews="menus.setUpViews",e.Menus_ShowActionMenu="menus.showActionMenu",e.Monetization_OpenPurchaseExperience="monetization.openPurchaseExperience",e.Navigation_NavigateBack="navigation.navigateBack",e.Navigation_NavigateCrossDomain="navigation.navigateCrossDomain",e.Navigation_NavigateToTab="navigation.navigateToTab",e.Navigation_ReturnFocus="navigation.returnFocus",e.Notifications_ShowNotification="notifications.showNotification",e.Pages_AppButton_OnClick="pages.appButton.onClick",e.Pages_AppButton_OnHoverEnter="pages.appButton.onHoverEnter",e.Pages_AppButton_OnHoverLeave="pages.appButton.onHoverLeave",e.Pages_BackStack_NavigateBack="pages.backStack.navigateBack",e.Pages_BackStack_RegisterBackButtonHandler="pages.backStack.registerBackButtonHandler",e.Pages_Config_RegisterChangeConfigHandler="pages.config.registerChangeConfigHandler",e.Pages_Config_RegisterOnRemoveHandler="pages.config.registerOnRemoveHandler",e.Pages_Config_RegisterOnSaveHandler="pages.config.registerOnSaveHandler",e.Pages_Config_SetConfig="pages.config.setConfig",e.Pages_Config_SetValidityState="pages.config.setValidityState",e.Pages_CurrentApp_NavigateTo="pages.currentApp.navigateTo",e.Pages_CurrentApp_NavigateToDefaultPage="pages.currentApp.navigateToDefaultPage",e.Pages_FullTrust_EnterFullscreen="pages.fullTrust.enterFullscreen",e.Pages_FullTrust_ExitFullscreen="pages.fullTrust.exitFullscreen",e.Pages_GetConfig="pages.getConfig.",e.Pages_NavigateCrossDomain="pages.navigateCrossDomain",e.Pages_NavigateToApp="pages.navigateToApp",e.Pages_RegisterFocusEnterHandler="pages.registerFocusEnterHandler",e.Pages_RegisterFullScreenHandler="pages.registerFullScreenHandler",e.Pages_RemoveEvent_NotifyFailure="pages.removeEvent.notifyFailure",e.Pages_RemoveEvent_NotifySuccess="pages.removeEvent.notifySuccess",e.Pages_ReturnFocus="pages.returnFocus",e.Pages_SaveEvent_NotifyFailure="pages.saveEvent.notifyFailure",e.Pages_SaveEvent_NotifySuccess="pages.saveEvent.notifySuccess",e.Pages_SetCurrentFrame="pages.setCurrentFrame",e.Pages_ShareDeepLink="pages.shareDeepLink",e.Pages_Tabs_GetMruTabInstances="pages.tabs.getMruTabInstances",e.Pages_Tabs_GetTabInstances="pages.tabs.getTabInstances",e.Pages_Tabs_NavigateToTab="pages.tabs.navigateToTab",e.People_SelectPeople="people.selectPeople",e.PrivateAPIs_OpenFilePreview="openFilePreview",e.PrivateAPIs_RegisterCustomHandler="registerCustomHandler",e.PrivateAPIs_RegisterUserSettingsChangeHandler="registerUserSettingsChangeHandler",e.PrivateAPIs_SendCustomMessage="sendCustomMessage",e.PrivateAPIs_UploadCustomApp="uploadCustomApp",e.Profile_ShowProfile="profile.showProfile",e.PublicAPIs_ExecuteDeepLink="executeDeepLink",e.PublicAPIs_GetContext="getContext",e.PublicAPIs_GetMruTabInstances="getMruTabInstances",e.PublicAPIs_GetTabInstances="getTabInstances",e.PublicAPIs_Initialize="initialize",e.PublicAPIs_RegisterAppButtonClickHandler="registerAppButtonClickHandler",e.PublicAPIs_RegisterAppButtonHoverEnterHandler="registerAppButtonHoverEnterHandler",e.PublicAPIs_RegisterAppButtonHoverLeaveHandler="registerAppButtonHoverLeaveHandler",e.PublicAPIs_RegisterBackButtonHandler="registerBackButtonHandler",e.PublicAPIs_RegisterChangeSettingsHandler="registerChangeSettingsHandler",e.PublicAPIs_RegisterFocusEnterHandler="registerFocusEnterHandler",e.PublicAPIs_RegisterFullScreenHandler="registerFullScreenHandler",e.PublicAPIs_RegisterOnLoadHandler="registerOnLoadHandler",e.PublicAPIs_RegisterOnThemeChangeHandlerHelper="registerOnThemeChangeHandlerHelper",e.PublicAPIs_SetFrameContext="setFrameContext",e.PublicAPIs_ShareDeepLink="shareDeepLink",e.RegisterHandler="registerHandler",e.RegisterOnThemeChangeHandler="registerOnThemeChangeHandler",e.RemoteCamera_GetCapableParticipants="remoteCamera.getCapableParticipants",e.RemoteCamera_RegisterOnCapableParticipantsChangeHandler="remoteCamera.registerOnCapableParticipantsChangeHandler",e.RemoteCamera_RegisterOnDeviceStateChangeHandler="remoteCamera.registerOnDeviceStateChangeHandler",e.RemoteCamera_RegisterOnErrorHandler="remoteCamera.registerOnErrorHandler",e.RemoteCamera_RegisterOnSessionStatusChangeHandler="remoteCamera.registerOnSessionStatusChangeHandler",e.RemoteCamera_RequestControl="remoteCamera.requestControl",e.RemoteCamera_SendControlCommand="remoteCamera.sendControlCommand",e.RemoteCamera_TerminateSession="remoteCamera.terminateSession",e.Search_CloseSearch="search.closeSearch",e.Search_RegisterOnChangeHandler="search.registerOnChangeHandler",e.Search_RegisterOnClosedHandler="search.registerOnClosedHandler",e.Search_RegisterOnExecutedHandler="search.registerOnExecutedHandler",e.Search_UnregisterHandlers="search.unregisterHandlers",e.SecondaryBrowser_OpenUrl="secondaryBrowser.openUrl",e.Settings_GetSettings="settings.getSettings",e.Settings_RegisterOnRemoveHandler="settings.registerOnRemoveHandler",e.Settings_RegisterOnSaveHandler="settings.registerOnSaveHandler",e.Settings_Remove_Failure="settings.remove.failure",e.Settings_Remove_Success="settings.remove.success",e.Settings_Save_Failure="settings.save.failure",e.Settings_Save_Success="settings.save.success",e.Settings_SetSettings="settings.setSettings",e.Settings_SetValidityState="settings.setValidityState",e.StageView_Open="stageView.open",e.Tasks_StartTask="tasks.startTask",e.Tasks_SubmitTask="tasks.submitTask",e.Tasks_UpdateTask="tasks.updateTask",e.Teams_FullTrust_GetConfigSetting="teams.fullTrust.getConfigSetting",e.Teams_FullTrust_JoinedTeams_GetUserJoinedTeams="teams.fullTrust.joinedTeams.getUserJoinedTeams",e.Teams_GetTeamChannels="teams.getTeamChannels",e.Teams_RefreshSiteUrl="teams.refreshSiteUrl",e.VideoEffects_MediaStream_RegisterForVideoFrame="videoEffects.mediaStream.registerForVideoFrame",e.VideoEffects_NotifySelectedVideoEffectChanged="videoEffects.notifySelectedVideoEffectChanged",e.VideoEffects_NotifyError="videoEffects.notifyError",e.VideoEffects_NotifyVideoFrameProcessed="videoEffects.notifyVideoFrameProcessed",e.VideoEffects_RegisterEffectParameterChangeHandler="videoEffects.registerEffectParameterChangeHandler",e.VideoEffects_RegisterForVideoEffect="videoEffects.registerForVideoEffect",e.VideoEffects_RegisterForVideoFrame="videoEffects.registerForVideoFrame",e.VideoEffects_RegisterSetFrameProcessTimeLimitHandler="videoEffects.setFrameProcessTimeLimitHandler",e.VideoEffects_RegisterStartVideoExtensibilityVideoStreamHandler="videoEffects.startVideoExtensibilityVideoStreamHandler",e.VideoEffects_RegisterForVideoBufferHandler="videoEffects.registerForVideoBufferHandler",e.VideoEffectsEx_MediaStream_RegisterForVideoFrame="videoEffectsEX.mediaStream.registerForVideoFrame",e.VideoEffectsEx_NotifyError="videoEffectsEx.notifyError",e.VideoEffectsEx_NotifySelectedVideoEffectChanged="videoEffectsEx.notifySelectedVideoEffectChanged",e.VideoEffectsEx_NotifyVideoFrameProcessed="videoEffectsEx.notifyVideoFrameProcessed",e.VideoEffectsEx_RegisterEffectParameterChangeHandler="videoEffectsEx.registerEffectParamterChangeHandler",e.VideoEffectsEx_RegisterForVideoEffect="videoEffectsEx.registerForVideoEffect",e.VideoEffectsEx_RegisterForVideoFrame="videoEffectsEx.registerForVideoFrame",e.VideoEffectsEx_RegisterNewVideoFrameHandler="videoEffectsEx.registerNewVideoFrameHandler",e.VideoEffectsEx_RegisterSetFrameProcessTimeLimitHandler="videoEffectsEX.registerSetFrameProcessTimeLimitHandler",e.VideoEffectsEx_RegisterStartVideoExtensibilityVideoStreamHandler="videoEffectsEX.registerStartVideoExtensibilityVideoStreamHandler",e.VideoEffectsEx_UpdatePersonalizedEffects="videoEffectsEx.updatePersonalizedEffects",e.VideoPerformanceMonitor_Constructor="videoPerformanceMonitor.performanceDataGenerated",e.VideoPerformanceMonitor_ReportFrameProcessed="videoPerformanceMonitor.reportFrameProcessed",e.VideoPerformanceMonitor_ReportTextureStreamAcquired="videoPerformanceMonitor.reportTextureStreamAcquired",e.VideoPerformanceMonitor_StartMonitorSlowFrameProcessing="videoPerformanceMonitor.startMonitorSlowFrameProcessing",e.VisualMedia_HasPermission="visualMedia.hasPermission",e.VisualMedia_Image_CaptureImages="visualMedia.image.captureImages",e.VisualMedia_Image_RetrieveImages="visualMedia.image.retrieveImages",e.VisualMedia_RequestPermission="visualMedia.requestPermission"}(s||(s={}));const l=JSON.parse('{"validOrigins":["teams.microsoft.com","teams.microsoft.us","gov.teams.microsoft.us","dod.teams.microsoft.us","int.teams.microsoft.com","*.teams.microsoft.com","outlook.office.com","outlook-sdf.office.com","outlook.office365.com","outlook-sdf.office365.com","outlook.live.com","outlook-sdf.live.com","teams.live.com","local.teams.live.com","local.teams.live.com:8080","local.teams.office.com","local.teams.office.com:8080","devspaces.skype.com","ssauth.skype.com","*.www.office.com","www.office.com","word.office.com","excel.office.com","powerpoint.office.com","www.officeppe.com","*.www.microsoft365.com","www.microsoft365.com","bing.com","edgeservices.bing.com","www.bing.com","www.staging-bing-int.com","teams.cloud.microsoft","outlook.cloud.microsoft","m365.cloud.microsoft","copilot.microsoft.com","windows.msn.com"]}');const c="2.0.1",d="2.0.3",u="1.9.0",f="1.8.0",p=n.t(l,2).validOrigins,g=new URL("https://res.cdn.office.net/teams-js/validDomains/json/validDomains.json"),m=/^https:\/\//,h="https",C="teams.microsoft.com",v="The library has not yet been initialized",w="The runtime has not yet been initialized",S="The runtime version is not supported";class y{}y.initializeCalled=!1,y.initializeCompleted=!1,y.additionalValidOrigins=[],y.initializePromise=void 0,y.isFramelessWindow=!1,y.frameContext=void 0,y.hostClientType=void 0,y.printCapabilityEnabled=!1;const P={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let b;const _=new Uint8Array(16);function E(){if(!b&&(b="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!b))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return b(_)}const I=[];for(let e=0;e<256;++e)I.push((e+256).toString(16).slice(1));function R(e,t=0){return(I[e[t+0]]+I[e[t+1]]+I[e[t+2]]+I[e[t+3]]+"-"+I[e[t+4]]+I[e[t+5]]+"-"+I[e[t+6]]+I[e[t+7]]+"-"+I[e[t+8]]+I[e[t+9]]+"-"+I[e[t+10]]+I[e[t+11]]+I[e[t+12]]+I[e[t+13]]+I[e[t+14]]+I[e[t+15]]).toLowerCase()}const T=function(e,t,n){if(P.randomUUID&&!t&&!e)return P.randomUUID();const i=(e=e||{}).random||(e.rng||E)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=i[e];return t}return R(i)};var F,A,M,O,k,H,V,N,D,L,U,x;!function(e){e.Inline="inline",e.Desktop="desktop",e.Web="web"}(F||(F={})),function(e){e.M365Content="m365content"}(A||(A={})),function(e){e.DriveId="driveId",e.GroupId="groupId",e.SiteId="siteId",e.UserId="userId"}(M||(M={})),function(e){e[e.NOT_SUPPORTED_ON_PLATFORM=100]="NOT_SUPPORTED_ON_PLATFORM",e[e.INTERNAL_ERROR=500]="INTERNAL_ERROR",e[e.NOT_SUPPORTED_IN_CURRENT_CONTEXT=501]="NOT_SUPPORTED_IN_CURRENT_CONTEXT",e[e.PERMISSION_DENIED=1e3]="PERMISSION_DENIED",e[e.NETWORK_ERROR=2e3]="NETWORK_ERROR",e[e.NO_HW_SUPPORT=3e3]="NO_HW_SUPPORT",e[e.INVALID_ARGUMENTS=4e3]="INVALID_ARGUMENTS",e[e.UNAUTHORIZED_USER_OPERATION=5e3]="UNAUTHORIZED_USER_OPERATION",e[e.INSUFFICIENT_RESOURCES=6e3]="INSUFFICIENT_RESOURCES",e[e.THROTTLE=7e3]="THROTTLE",e[e.USER_ABORT=8e3]="USER_ABORT",e[e.OPERATION_TIMED_OUT=8001]="OPERATION_TIMED_OUT",e[e.OLD_PLATFORM=9e3]="OLD_PLATFORM",e[e.FILE_NOT_FOUND=404]="FILE_NOT_FOUND",e[e.SIZE_EXCEEDED=1e4]="SIZE_EXCEEDED"}(O||(O={})),function(e){e.GeoLocation="geolocation",e.Media="media"}(k||(k={})),function(e){e.TextPlain="text/plain",e.TextHtml="text/html",e.ImagePNG="image/png",e.ImageJPEG="image/jpeg"}(H||(H={})),function(e){e.desktop="desktop",e.web="web",e.android="android",e.ios="ios",e.ipados="ipados",e.macos="macos",e.rigel="rigel",e.surfaceHub="surfaceHub",e.teamsRoomsWindows="teamsRoomsWindows",e.teamsRoomsAndroid="teamsRoomsAndroid",e.teamsPhones="teamsPhones",e.teamsDisplays="teamsDisplays"}(V||(V={})),function(e){e.office="Office",e.outlook="Outlook",e.outlookWin32="OutlookWin32",e.orange="Orange",e.places="Places",e.teams="Teams",e.teamsModern="TeamsModern"}(N||(N={})),function(e){e.settings="settings",e.content="content",e.authentication="authentication",e.remove="remove",e.task="task",e.sidePanel="sidePanel",e.stage="stage",e.meetingStage="meetingStage"}(D||(D={})),function(e){e[e.Standard=0]="Standard",e[e.Edu=1]="Edu",e[e.Class=2]="Class",e[e.Plc=3]="Plc",e[e.Staff=4]="Staff"}(L||(L={})),function(e){e[e.Admin=0]="Admin",e[e.User=1]="User",e[e.Guest=2]="Guest"}(U||(U={})),function(e){e.Large="large",e.Medium="medium",e.Small="small"}(x||(x={}));var B,W=x;!function(e){e.Regular="Regular",e.Private="Private",e.Shared="Shared"}(B||(B={}));const G={errorCode:O.NOT_SUPPORTED_ON_PLATFORM},z=1,q=5,j={adaptiveCardSchemaVersion:{majorVersion:1,minorVersion:5}},$=new Error("Invalid input count: Must supply a valid image count (limit of 10)."),J=new Error("Invalid response: Received more images than the specified max limit in the response.");function K(e){return(t,n)=>{if(!t)throw new Error(e||n)}}function Q(e,t){if("string"!=typeof e||"string"!=typeof t)return NaN;const n=e.split("."),i=t.split(".");function o(e){return/^\d+$/.test(e)}if(!n.every(o)||!i.every(o))return NaN;for(;n.length<i.length;)n.push("0");for(;i.length<n.length;)i.push("0");for(let e=0;e<n.length;++e)if(Number(n[e])!=Number(i[e]))return Number(n[e])>Number(i[e])?1:-1;return 0}function Z(){return T()}function X(e){return Object.keys(e).forEach((t=>{"object"==typeof e[t]&&X(e[t])})),Object.freeze(e)}function Y(e,t,...n){const i=e(...n);return i.then((e=>{t&&t(void 0,e)})).catch((e=>{t&&t(e)})),i}function ee(e,t,...n){const i=e(...n);return i.then((()=>{t&&t(null)})).catch((e=>{t&&t(e)})),i}function te(e,t,...n){const i=e(...n);return i.then((e=>{t&&t(null,e)})).catch((e=>{t&&t(e,null)})),i}function ne(e,t,n){return new Promise(((i,o)=>{const r=setTimeout(o,t,n);e().then((e=>{clearTimeout(r),i(e)})).catch((e=>{clearTimeout(r),o(e)}))}))}function ie(e){const t=new URL("https://teams.microsoft.com/l/entity/"+encodeURIComponent(e.appId)+"/"+encodeURIComponent(e.pageId));return e.webUrl&&t.searchParams.append("webUrl",e.webUrl),(e.channelId||e.subPageId)&&t.searchParams.append("context",JSON.stringify({channelId:e.channelId,subEntityId:e.subPageId})),t.toString()}function oe(e){return!(Q(`${e.majorVersion}.${e.minorVersion}`,`${z}.${q}`)>=0)}function re(e){return"https:"===e.protocol}function ae(e,t){return new Promise(((n,i)=>{e||i("MimeType cannot be null or empty."),t||i("Base64 string cannot be null or empty.");const o=atob(t);if(e.startsWith("image/")){const t=new Uint8Array(o.length);for(let e=0;e<o.length;e++)t[e]=o.charCodeAt(e);n(new Blob([t],{type:e}))}n(new Blob([o],{type:e}))}))}function se(e){return new Promise(((t,n)=>{0===e.size&&n(new Error("Blob cannot be empty."));const i=new FileReader;i.onloadend=()=>{i.result?t(i.result.toString().split(",")[1]):n(new Error("Failed to read the blob"))},i.onerror=()=>{n(i.error)},i.readAsDataURL(e)}))}function le(){if(ce())throw new Error("window object undefined at SSR check");return window}function ce(){return"undefined"==typeof window}const de=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function ue(e){if(!de.test(e))throw new Error("App ID is not valid. Must be GUID format. App ID: "+e)}var fe=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]])}return n};const pe=t("runtime"),ge=4;function me(e){return e.apiVersion===ge}const he={apiVersion:-1,supports:{}};function Ce(e){if(me(e))return!0;throw-1===e.apiVersion?new Error(w):new Error(S)}let ve=he;const we={apiVersion:4,hostVersionsInfo:j,isLegacyTeams:!0,supports:{appInstallDialog:{},appEntity:{},call:{},chat:{},conversations:{},dialog:{card:{bot:{}},url:{bot:{},parentCommunication:{}},update:{}},interactive:{},logs:{},meetingRoom:{},menus:{},monetization:{},notifications:{},pages:{config:{},backStack:{},fullTrust:{}},remoteCamera:{},teams:{fullTrust:{}},teamsCore:{},video:{sharedFrame:{}}}},Se=[V.desktop,V.web,V.rigel,V.surfaceHub,V.teamsRoomsWindows,V.teamsRoomsAndroid,V.teamsPhones,V.teamsDisplays],ye=[V.android,V.ios,V.ipados],Pe=[...Se,...ye];function be(e){let t=e;if(t.apiVersion<ge&&_e.forEach((e=>{t.apiVersion===e.versionToUpgradeFrom&&(t=e.upgradeToNextVersion(t))})),me(t))return t;throw new Error("Received a runtime that could not be upgraded to the latest version")}const _e=[{versionToUpgradeFrom:1,upgradeToNextVersion:e=>{var t;return{apiVersion:2,hostVersionsInfo:void 0,isLegacyTeams:e.isLegacyTeams,supports:Object.assign(Object.assign({},e.supports),{dialog:e.supports.dialog?{card:void 0,url:e.supports.dialog,update:null===(t=e.supports.dialog)||void 0===t?void 0:t.update}:void 0})}}},{versionToUpgradeFrom:2,upgradeToNextVersion:e=>{const t=e.supports,{appNotification:n}=t,i=fe(t,["appNotification"]);return Object.assign(Object.assign({},e),{apiVersion:3,supports:i})}},{versionToUpgradeFrom:3,upgradeToNextVersion:e=>{var t,n,i,o,r;return{apiVersion:4,hostVersionsInfo:e.hostVersionsInfo,isLegacyTeams:e.isLegacyTeams,supports:Object.assign(Object.assign({},e.supports),{dialog:e.supports.dialog?{card:null===(t=e.supports.dialog)||void 0===t?void 0:t.card,url:{bot:null===(i=null===(n=e.supports.dialog)||void 0===n?void 0:n.url)||void 0===i?void 0:i.bot,parentCommunication:(null===(o=e.supports.dialog)||void 0===o?void 0:o.url)?{}:void 0},update:null===(r=e.supports.dialog)||void 0===r?void 0:r.update}:void 0})}}}],Ee={"1.0.0":[{capability:{pages:{appButton:{},tabs:{}},stageView:{}},hostClientTypes:Se}],"1.9.0":[{capability:{location:{}},hostClientTypes:Pe}],"2.0.0":[{capability:{people:{}},hostClientTypes:Pe},{capability:{sharing:{}},hostClientTypes:[V.desktop,V.web]}],"2.0.1":[{capability:{teams:{fullTrust:{joinedTeams:{}}}},hostClientTypes:[V.android,V.desktop,V.ios,V.teamsRoomsAndroid,V.teamsPhones,V.teamsDisplays,V.web]},{capability:{webStorage:{}},hostClientTypes:[V.desktop]}],"2.0.5":[{capability:{webStorage:{}},hostClientTypes:[V.android,V.ios]}],"2.0.8":[{capability:{sharing:{}},hostClientTypes:[V.android,V.ios]}]},Ie=pe.extend("generateBackCompatRuntimeConfig");function Re(e,t){const n=Object.assign({},e);for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&("object"!=typeof t[i]||Array.isArray(t[i])?i in e||(n[i]=t[i]):n[i]=Re(e[i]||{},t[i]));return n}function Te(e,t,n){Ie("generating back compat runtime config for %s",e);let i=Object.assign({},t.supports);Ie("Supported capabilities in config before updating based on highestSupportedVersion: %o",i),Object.keys(n).forEach((t=>{Q(e,t)>=0&&n[t].forEach((e=>{void 0!==y.hostClientType&&e.hostClientTypes.includes(y.hostClientType)&&(i=Re(i,e.capability))}))}));const o={apiVersion:ge,hostVersionsInfo:j,isLegacyTeams:!0,supports:i};return Ie("Runtime config after updating based on highestSupportedVersion: %o",o),o}const Fe=pe.extend("applyRuntimeConfig");function Ae(e){"string"==typeof e.apiVersion&&(Fe("Trying to apply runtime with string apiVersion, processing as v1: %o",e),e=Object.assign(Object.assign({},e),{apiVersion:1})),Fe("Fast-forwarding runtime %o",e);const t=be(e);Fe("Applying runtime %o",t),ve=X(t)}const Me="2.20.0-beta.1",Oe=t("internal"),ke=Oe.extend("ensureInitializeCalled"),He=Oe.extend("ensureInitialized");function Ve(){if(!y.initializeCalled)throw ke(v),new Error(v)}function Ne(e,...t){if(!y.initializeCompleted)throw He("%s. initializeCalled: %s",v,y.initializeCalled.toString()),new Error(v);if(t&&t.length>0){let e=!1;for(let n=0;n<t.length;n++)if(t[n]===y.frameContext){e=!0;break}if(!e)throw new Error(`This call is only allowed in following contexts: ${JSON.stringify(t)}. Current context: "${y.frameContext}".`)}return Ce(e)}function De(e=c){const t=Q(y.clientSupportedSDKVersion,e);return!isNaN(t)&&t>=0}function Le(){return y.hostClientType==V.android||y.hostClientType==V.ios||y.hostClientType==V.ipados}function Ue(e=c){if(!Le()){throw{errorCode:O.NOT_SUPPORTED_ON_PLATFORM}}if(!De(e)){throw{errorCode:O.OLD_PLATFORM}}}function xe(e){let t=y.additionalValidOrigins.concat(e.filter((e=>"string"==typeof e&&m.test(e))));const n={};t=t.filter((e=>!n[e]&&(n[e]=!0,!0))),y.additionalValidOrigins=t}function Be(e){return null==e}var We=function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,r){function a(e){try{l(i.next(e))}catch(e){r(e)}}function s(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){e.done?n(e.value):o(e.value).then(a,s)}l((i=i.apply(e,t||[])).next())}))};let Ge=[];const ze=t("validateOrigin");function qe(){return We(this,void 0,void 0,(function*(){yield $e()}))}function je(){return 0!==Ge.length}function $e(){return We(this,void 0,void 0,(function*(){return je()?Ge:ce()?(Ge=p,p):fetch(g).then((e=>{if(!e.ok)throw new Error("Invalid Response from Fetch Call");return e.json().then((e=>{if(Je(JSON.stringify(e)))return Ge=e.validOrigins,Ge;throw new Error("Valid Origins List Is Invalid")}))})).catch((e=>(ze("validOrigins fetch call to CDN failed with error: %s. Defaulting to fallback list",e),Ge=p,Ge)))}))}function Je(e){let t=JSON.parse(e);try{t=JSON.parse(e)}catch(e){return!1}if(!t.validOrigins)return!1;for(const e of t.validOrigins)try{new URL("https://"+e)}catch(t){return ze("isValidOriginsFromCDN call failed to validate origin: %s",e),!1}return!0}function Ke(e,t){if("*."===e.substring(0,2)){const n=e.substring(1);if(t.length>n.length&&t.split(".").length===n.split(".").length&&t.substring(t.length-n.length)===n)return!0}else if(e===t)return!0;return!1}function Qe(e){return $e().then((t=>{if(!re(e))return ze("Origin %s is invalid because it is not using https protocol. Protocol being used: %s",e,e.protocol),!1;const n=e.host;if(t.some((e=>Ke(e,n))))return!0;for(const e of y.additionalValidOrigins){if(Ke("https://"===e.substring(0,8)?e.substring(8):e,n))return!0}return ze("Origin %s is invalid because it is not an origin approved by this library or included in the call to app.initialize.\nOrigins approved by this library: %o\nOrigins included in app.initialize: %o",e,t,y.additionalValidOrigins),!1}))}var Ze;!function(e){let t,n,i,o;function r(e){return new Promise(((n,i)=>{if(y.hostClientType===V.desktop||y.hostClientType===V.android||y.hostClientType===V.ios||y.hostClientType===V.ipados||y.hostClientType===V.macos||y.hostClientType===V.rigel||y.hostClientType===V.teamsRoomsWindows||y.hostClientType===V.teamsRoomsAndroid||y.hostClientType===V.teamsPhones||y.hostClientType===V.teamsDisplays||y.hostClientType===V.surfaceHub){const t=document.createElement("a");t.href=e.url,n(gn("authentication.authenticate",[t.href,e.width,e.height,e.isExternal]).then((([e,t])=>{if(e)return t;throw new Error(t)})))}else t={success:n,fail:i},c(e)}))}function a(e){return new Promise((t=>{t(gn("authentication.getAuthToken",[null==e?void 0:e.resources,null==e?void 0:e.claims,null==e?void 0:e.silent,null==e?void 0:e.tenantId]))})).then((([e,t])=>{if(e)return t;throw new Error(t)}))}function s(){return new Promise((e=>{e(gn("authentication.getUser"))})).then((([e,t])=>{if(e)return t;throw new Error(t)}))}function l(){d();try{nn.childWindow&&nn.childWindow.close()}finally{nn.childWindow=null,nn.childOrigin=null}}function c(e){l();let t=e.width||600,n=e.height||400;t=Math.min(t,nn.currentWindow.outerWidth-400),n=Math.min(n,nn.currentWindow.outerHeight-200);const i=document.createElement("a");i.href=e.url.replace("{oauthRedirectMethod}","web");let o=void 0!==nn.currentWindow.screenLeft?nn.currentWindow.screenLeft:nn.currentWindow.screenX,r=void 0!==nn.currentWindow.screenTop?nn.currentWindow.screenTop:nn.currentWindow.screenY;o+=nn.currentWindow.outerWidth/2-t/2,r+=nn.currentWindow.outerHeight/2-n/2,nn.childWindow=nn.currentWindow.open(i.href,"_blank","toolbar=no, location=yes, status=no, menubar=no, scrollbars=yes, top="+r+", left="+o+", width="+t+", height="+n),nn.childWindow?u():p("FailedToOpenWindow")}function d(){n&&(clearInterval(n),n=0),Dt("initialize"),Dt("navigateCrossDomain")}function u(){d(),n=nn.currentWindow.setInterval((()=>{if(!nn.childWindow||nn.childWindow.closed)p("CancelledByUser");else{const e=nn.childOrigin;try{nn.childOrigin="*",Gn("ping")}finally{nn.childOrigin=e}}}),100),Nt("initialize",(()=>[D.authentication,y.hostClientType])),Nt("navigateCrossDomain",(()=>!1))}function f(e){try{t&&t.success(e)}finally{t=void 0,l()}}function p(e){try{t&&t.fail(new Error(e))}finally{t=void 0,l()}}e.initialize=function(){Nt("authentication.authenticate.success",f,!1),Nt("authentication.authenticate.failure",p,!1)},e.registerAuthenticationHandlers=function(e){i=e},e.authenticate=function(e){const t=void 0!==e,n=t?e:i;if(!n)throw new Error("No parameters are provided for authentication");return Ne(ve,D.content,D.sidePanel,D.settings,D.remove,D.task,D.stage,D.meetingStage),r(n).then((e=>{try{return n&&n.successCallback?(n.successCallback(e),""):e}finally{t||(i=void 0)}})).catch((e=>{try{if(n&&n.failureCallback)return n.failureCallback(e.message),"";throw e}finally{t||(i=void 0)}}))},e.getAuthToken=function(e){return Ve(),a(e).then((t=>e&&e.successCallback?(e.successCallback(t),""):t)).catch((t=>{if(e&&e.failureCallback)return e.failureCallback(t.message),"";throw t}))},e.getUser=function(e){return Ve(),s().then((t=>e&&e.successCallback?(e.successCallback(t),null):t)).catch((t=>{if(e&&e.failureCallback)return e.failureCallback(t.message),null;throw t}))},e.notifySuccess=function(e,t){Ne(ve,D.authentication),Cn("authentication.authenticate.success",[e]),Bn(nn.parentWindow,(()=>setTimeout((()=>nn.currentWindow.close()),200)))},e.notifyFailure=function(e,t){Ne(ve,D.authentication),Cn("authentication.authenticate.failure",[e]),Bn(nn.parentWindow,(()=>setTimeout((()=>nn.currentWindow.close()),200)))},function(e){e.Public="public",e.EUDB="eudb",e.Other="other"}(o=e.DataResidency||(e.DataResidency={}))}(Ze||(Ze={}));const Xe=a.V_2;function Ye(e,t){if(Ne(ve,D.content,D.sidePanel,D.task,D.meetingStage),!it.update.isSupported())throw G;hn(e,"tasks.updateTask",[t])}function et(e,t,n,i){if(Ne(ve,D.content,D.sidePanel,D.meetingStage),!it.url.isSupported())throw G;i&&Nt("messageForParent",i);hn(e,"tasks.startTask",[it.url.getDialogInfoFromUrlDialogInfo(t)],((e,t)=>{null==n||n({err:e,result:t}),Dt("messageForParent")}))}function tt(e,t,n,i){if(Ne(ve,D.content,D.sidePanel,D.meetingStage),!it.url.bot.isSupported())throw G;i&&Nt("messageForParent",i);hn(e,"tasks.startTask",[it.url.getDialogInfoFromBotUrlDialogInfo(t)],((e,t)=>{null==n||n({err:e,result:t}),Dt("messageForParent")}))}function nt(e,t,n){if(Ne(ve,D.content,D.task),!it.url.isSupported())throw G;hn(e,"tasks.completeTask",[t,n?Array.isArray(n)?n:[n]:[]])}var it;!function(e){const t=[];function n(e){y.frameContext&&(y.frameContext===D.task?t.push(e):Dt("messageForChild"))}let i,r,a;e.initialize=function(){Nt("messageForChild",n,!1)},function(e){let n,i;function r(e){return{url:e.url,height:e.size?e.size.height:x.Small,width:e.size?e.size.width:x.Small,title:e.title,fallbackUrl:e.fallbackUrl}}e.open=function(e,t,n){et(o(Xe,s.Dialog_Url_Open),e,t,n)},e.submit=function(e,t){nt(o(Xe,s.Dialog_Url_Submit),e,t)},function(e){function n(){var e,t;return Ne(ve)&&!!(null===(t=null===(e=ve.supports.dialog)||void 0===e?void 0:e.url)||void 0===t?void 0:t.parentCommunication)}e.sendMessageToParentFromDialog=function(e){if(Ne(ve,D.task),!n())throw G;hn(o(Xe,s.Dialog_Url_ParentCommunication_SendMessageToParentFromDialog),"messageForParent",[e])},e.sendMessageToDialog=function(e){if(Ne(ve,D.content,D.sidePanel,D.meetingStage),!n())throw G;hn(o(Xe,s.Dialog_Url_ParentCommunication_SendMessageToDialog),"messageForChild",[e])},e.registerOnMessageFromParent=function(e){if(Ne(ve,D.task),!n())throw G;for(Dt("messageForChild"),Nt("messageForChild",e),t.reverse();t.length>0;){e(t.pop())}},e.isSupported=n}(n=e.parentCommunication||(e.parentCommunication={})),e.isSupported=function(){return Ne(ve)&&void 0!==(ve.supports.dialog&&ve.supports.dialog.url)},function(e){e.open=function(e,t,n){tt(o(Xe,s.Dialog_Url_Bot_Open),e,t,n)},e.isSupported=function(){return Ne(ve)&&void 0!==(ve.supports.dialog&&ve.supports.dialog.url&&ve.supports.dialog.url.bot)}}(i=e.bot||(e.bot={})),e.getDialogInfoFromUrlDialogInfo=r,e.getDialogInfoFromBotUrlDialogInfo=function(e){const t=r(e);return t.completionBotId=e.completionBotId,t}}(i=e.url||(e.url={})),e.isSupported=function(){return!(!Ne(ve)||!ve.supports.dialog)},function(e){e.resize=function(e){Ye(o(Xe,s.Dialog_Update_Resize),e)},e.isSupported=function(){return!(!Ne(ve)||!ve.supports.dialog)&&!!ve.supports.dialog.update}}(r=e.update||(e.update={})),function(e){function t(){const e=ve.hostVersionsInfo&&ve.hostVersionsInfo.adaptiveCardSchemaVersion&&!oe(ve.hostVersionsInfo.adaptiveCardSchemaVersion);return Ne(ve)&&void 0!==(e&&ve.supports.dialog&&ve.supports.dialog.card)}let n;function i(e){return{card:e.card,height:e.size?e.size.height:x.Small,width:e.size?e.size.width:x.Small,title:e.title}}function r(e){const t=i(e);return t.completionBotId=e.completionBotId,t}e.open=function(e,n){if(Ne(ve,D.content,D.sidePanel,D.meetingStage),!t())throw G;const r=i(e);hn(o(Xe,s.Dialog_AdaptiveCard_Open),"tasks.startTask",[r],((e,t)=>{null==n||n({err:e,result:t})}))},e.isSupported=t,function(e){function t(){const e=ve.hostVersionsInfo&&ve.hostVersionsInfo.adaptiveCardSchemaVersion&&!oe(ve.hostVersionsInfo.adaptiveCardSchemaVersion);return Ne(ve)&&void 0!==(e&&ve.supports.dialog&&ve.supports.dialog.card&&ve.supports.dialog.card.bot)}e.open=function(e,n){if(Ne(ve,D.content,D.sidePanel,D.meetingStage),!t())throw G;const i=r(e);hn(o(Xe,s.Dialog_AdaptiveCard_Bot_Open),"tasks.startTask",[i],((e,t)=>{null==n||n({err:e,result:t})}))},e.isSupported=t}(n=e.bot||(e.bot={}))}(a=e.adaptiveCard||(e.adaptiveCard={}))}(it||(it={}));const ot=a.V_2;var rt;!function(e){let t,n,i,r,a;!function(e){e[e.ifRoom=0]="ifRoom",e[e.overflowOnly=1]="overflowOnly"}(t=e.DisplayMode||(e.DisplayMode={}));function l(e){a&&a(e)||(Ne(ve),hn(o(ot,s.Menus_HandleViewConfigItemPress),"viewConfigItemPress",[e]))}function c(e){i&&i(e)||(Ne(ve),hn(o(ot,s.Menus_HandleNavBarMenuItemPress),"handleNavBarMenuItemPress",[e]))}function d(e){r&&r(e)||(Ne(ve),hn(o(ot,s.Menus_HandleActionMenuItemPress),"handleActionMenuItemPress",[e]))}function u(){return!(!Ne(ve)||!ve.supports.menus)}e.MenuItem=class{constructor(){this.enabled=!0,this.selected=!1}},function(e){e.dropDown="dropDown",e.popOver="popOver"}(n=e.MenuListType||(e.MenuListType={})),e.initialize=function(){Vt(o(ot,s.Menus_RegisterNavBarMenuItemPressHandler),"navBarMenuItemPress",c,!1),Vt(o(ot,s.Menus_RegisterActionMenuItemPressHandler),"actionMenuItemPress",d,!1),Vt(o(ot,s.Menus_RegisterSetModuleViewHandler),"setModuleView",l,!1)},e.setUpViews=function(e,t){if(Ne(ve),!u())throw G;a=t,hn(o(ot,s.Menus_SetUpViews),"setUpViews",[e])},e.setNavBarMenu=function(e,t){if(Ne(ve),!u())throw G;i=t,hn(o(ot,s.Menus_SetNavBarMenu),"setNavBarMenu",[e])},e.showActionMenu=function(e,t){if(Ne(ve),!u())throw G;r=t,hn(o(ot,s.Menus_ShowActionMenu),"showActionMenu",[e])},e.isSupported=u}(rt||(rt={}));const at=a.V_2,st=5e3,lt=t("app");function ct(e,t){if(ce()){return lt.extend("initialize")("window object undefined at initialization"),Promise.resolve()}return ne((()=>ut(e,t)),st,new Error("SDK initialization timed out."))}const dt=lt.extend("initializeHelper");function ut(e,t){return new Promise((n=>{y.initializeCalled||(y.initializeCalled=!0,Mt(),y.initializePromise=rn(t,e).then((({context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:i=c})=>{y.frameContext=e,y.hostClientType=t,y.clientSupportedSDKVersion=i;try{dt("Parsing %s",n);const e=JSON.parse(n);if(dt("Checking if %o is a valid runtime object",null!=e?e:"null"),!e||!e.apiVersion)throw new Error("Received runtime config is invalid");n&&Ae(e)}catch(e){if(!(e instanceof SyntaxError))throw e;try{dt("Attempting to parse %s as an SDK version",n),isNaN(Q(n,c))||(y.clientSupportedSDKVersion=n);const e=JSON.parse(i);if(dt("givenRuntimeConfig parsed to %o",null!=e?e:"null"),!e)throw new Error("givenRuntimeConfig string was successfully parsed. However, it parsed to value of null");Ae(e)}catch(e){if(!(e instanceof SyntaxError))throw e;Ae(Te(y.clientSupportedSDKVersion,we,Ee))}}y.initializeCompleted=!0})),Ze.initialize(),rt.initialize(),Tt.config.initialize(),it.initialize()),Array.isArray(t)&&xe(t),void 0!==y.initializePromise?n(y.initializePromise):dt("GlobalVars.initializePromise is unexpectedly undefined")}))}function ft(e,t){!Be(t)&&Ve(),xt(e,t)}function pt(e,t){return new Promise((n=>{Ne(ve,D.content,D.sidePanel,D.settings,D.task,D.stage,D.meetingStage),n(ln(e,"executeDeepLink",t))}))}var gt;function mt(e){var t;return{actionInfo:e.actionInfo,app:{locale:e.locale,sessionId:e.appSessionId?e.appSessionId:"",theme:e.theme?e.theme:"default",iconPositionVertical:e.appIconPosition,osLocaleInfo:e.osLocaleInfo,parentMessageId:e.parentMessageId,userClickTime:e.userClickTime,userFileOpenPreference:e.userFileOpenPreference,host:{name:e.hostName?e.hostName:N.teams,clientType:e.hostClientType?e.hostClientType:V.web,sessionId:e.sessionId?e.sessionId:"",ringId:e.ringId},appLaunchId:e.appLaunchId},page:{id:e.entityId,frameContext:e.frameContext?e.frameContext:y.frameContext,subPageId:e.subEntityId,isFullScreen:e.isFullScreen,isMultiWindow:e.isMultiWindow,sourceOrigin:e.sourceOrigin},user:{id:null!==(t=e.userObjectId)&&void 0!==t?t:"",displayName:e.userDisplayName,isCallingAllowed:e.isCallingAllowed,isPSTNCallingAllowed:e.isPSTNCallingAllowed,licenseType:e.userLicenseType,loginHint:e.loginHint,userPrincipalName:e.userPrincipalName,tenant:e.tid?{id:e.tid,teamsSku:e.tenantSKU}:void 0},channel:e.channelId?{id:e.channelId,displayName:e.channelName,relativeUrl:e.channelRelativeUrl,membershipType:e.channelType,defaultOneNoteSectionId:e.defaultOneNoteSectionId,ownerGroupId:e.hostTeamGroupId,ownerTenantId:e.hostTeamTenantId}:void 0,chat:e.chatId?{id:e.chatId}:void 0,meeting:e.meetingId?{id:e.meetingId}:void 0,sharepoint:e.sharepoint,team:e.teamId?{internalId:e.teamId,displayName:e.teamName,type:e.teamType,groupId:e.groupId,templateId:e.teamTemplateId,isArchived:e.isTeamArchived,userRole:e.userTeamRole}:void 0,sharePointSite:e.teamSiteUrl||e.teamSiteDomain||e.teamSitePath||e.mySitePath||e.mySiteDomain?{teamSiteUrl:e.teamSiteUrl,teamSiteDomain:e.teamSiteDomain,teamSitePath:e.teamSitePath,teamSiteId:e.teamSiteId,mySitePath:e.mySitePath,mySiteDomain:e.mySiteDomain}:void 0}}!function(e){const n=t("app");let i,r,a;e.Messages={AppLoaded:"appInitialization.appLoaded",Success:"appInitialization.success",Failure:"appInitialization.failure",ExpectedFailure:"appInitialization.expectedFailure"},function(e){e.AuthFailed="AuthFailed",e.Timeout="Timeout",e.Other="Other"}(i=e.FailedReason||(e.FailedReason={})),function(e){e.PermissionError="PermissionError",e.NotFound="NotFound",e.Throttling="Throttling",e.Offline="Offline",e.Other="Other"}(r=e.ExpectedFailureReason||(e.ExpectedFailureReason={})),e.isInitialized=function(){return y.initializeCompleted},e.getFrameContext=function(){return y.frameContext},function(){if(ce())return;const e=document.getElementsByTagName("script"),t=e&&e[e.length-1]&&e[e.length-1].src,i="Today, teamsjs can only be used from a single script or you may see undefined behavior. This log line is used to help detect cases where teamsjs is loaded multiple times -- it is always written. The presence of the log itself does not indicate a multi-load situation, but multiples of these log lines will. If you would like to use teamjs from more than one script at the same time, please open an issue at https://github.com/OfficeDev/microsoft-teams-library-js/issues";t&&0!==t.length?n("teamsjs is being used from %s. %s",t,i):n("teamsjs is being used from a script tag embedded directly in your html. %s",i)}(),e.initialize=function(e){return qe(),ct(o(at,s.App_Initialize),e)},e._initialize=function(e){nn.currentWindow=e},e._uninitialize=function(){y.initializeCalled&&(Ot(),y.initializeCalled=!1,y.initializeCompleted=!1,y.initializePromise=void 0,y.additionalValidOrigins=[],y.frameContext=void 0,y.hostClientType=void 0,y.isFramelessWindow=!1,an())},e.getContext=function(){return new Promise((e=>{Ve(),e(sn(o(at,s.App_GetContext),"getContext"))})).then((e=>mt(e)))},e.notifyAppLoaded=function(){Ve(),hn(o(at,s.App_NotifyAppLoaded),e.Messages.AppLoaded,[Me])},e.notifySuccess=function(){Ve(),hn(o(at,s.App_NotifySuccess),e.Messages.Success,[Me])},e.notifyFailure=function(t){Ve(),hn(o(at,s.App_NotifyFailure),e.Messages.Failure,[t.reason,t.message])},e.notifyExpectedFailure=function(t){Ve(),hn(o(at,s.App_NotifyExpectedFailure),e.Messages.ExpectedFailure,[t.reason,t.message])},e.registerOnThemeChangeHandler=function(e){ft(o(at,s.App_RegisterOnThemeChangeHandler),e)},e.openLink=function(e){return pt(o(at,s.App_OpenLink),e)},function(e){e.registerBeforeSuspendOrTerminateHandler=function(e){if(!e)throw new Error("[app.lifecycle.registerBeforeSuspendOrTerminateHandler] Handler cannot be null");Ne(ve),jt(e)},e.registerOnResumeHandler=function(e){if(!e)throw new Error("[app.lifecycle.registerOnResumeHandler] Handler cannot be null");Ne(ve),$t(e)}}(a=e.lifecycle||(e.lifecycle={}))}(gt||(gt={}));const ht=a.V_2;function Ct(e,t){return new Promise((n=>{if(Ne(ve,D.content,D.sidePanel,D.settings,D.remove,D.task,D.stage,D.meetingStage),!Tt.isSupported())throw G;n(dn(e,"navigateCrossDomain","Cross-origin navigation is only supported for URLs matching the pattern registered in the manifest.",t))}))}function vt(e){return new Promise((t=>{if(Ne(ve),!Tt.backStack.isSupported())throw G;t(dn(e,"navigateBack","Back navigation is not supported in the current client or context."))}))}function wt(e,t){return new Promise((n=>{if(Ne(ve),!Tt.tabs.isSupported())throw G;n(dn(e,"navigateToTab","Invalid internalTabInstanceId and/or channelId were/was provided",t))}))}function St(e,t){if(Ne(ve),!Tt.isSupported())throw G;hn(e,"returnFocus",[t])}function yt(e,t){return new Promise((n=>{if(Ne(ve),!Tt.tabs.isSupported())throw G;n(sn(e,"getTabInstances",t))}))}function Pt(e,t){return new Promise((n=>{if(Ne(ve),!Tt.tabs.isSupported())throw G;n(sn(e,"getMruTabInstances",t))}))}function bt(e,t){if(Ne(ve,D.content,D.sidePanel,D.meetingStage),!Tt.isSupported())throw G;hn(e,"shareDeepLink",[t.subPageId,t.subPageLabel,t.subPageWebUrl])}function _t(e,t){if(Ne(ve,D.content),!Tt.isSupported())throw G;hn(e,"setFrameContext",[t])}function Et(e,t){if(Ne(ve,D.settings,D.remove),!Tt.config.isSupported())throw G;hn(e,"settings.setValidityState",[t])}function It(e){return new Promise((t=>{if(Ne(ve,D.content,D.settings,D.remove,D.sidePanel),!Tt.isSupported())throw G;t(sn(e,"settings.getSettings"))}))}function Rt(e,t){return new Promise((n=>{if(Ne(ve,D.content,D.settings,D.sidePanel),!Tt.config.isSupported())throw G;n(ln(e,"settings.setSettings",t))}))}var Tt;!function(e){function t(e){_t(o(ht,s.Pages_SetCurrentFrame),e)}function n(){return!(!Ne(ve)||!ve.supports.pages)}let i,r,a,l,c,d;e.returnFocus=function(e){St(o(ht,s.Pages_ReturnFocus),e)},e.registerFocusEnterHandler=function(e){Ut(o(ht,s.Pages_RegisterFocusEnterHandler),"focusEnter",e,[],(()=>{if(!n())throw G}))},e.setCurrentFrame=t,e.initializeWithFrameContext=function(e,n,i){gt.initialize(i).then((()=>n&&n())),t(e)},e.getConfig=function(){return It(o(ht,s.Pages_GetConfig))},e.navigateCrossDomain=function(e){return Ct(o(ht,s.Pages_NavigateCrossDomain),e)},e.navigateToApp=function(e){return new Promise((t=>{if(Ne(ve,D.content,D.sidePanel,D.settings,D.task,D.stage,D.meetingStage),!n())throw G;const i=o(ht,s.Pages_NavigateCrossDomain);ve.isLegacyTeams?t(ln(i,"executeDeepLink",ie(e))):t(ln(i,"pages.navigateToApp",e))}))},e.shareDeepLink=function(e){return bt(o(ht,s.Pages_ShareDeepLink),e)},e.registerFullScreenHandler=function(e){Ut(o(ht,s.Pages_RegisterFullScreenHandler),"fullScreenChange",e,[],(()=>{if(!Be(e)&&!n())throw G}))},e.isSupported=n,function(e){e.navigateToTab=function(e){return wt(o(ht,s.Pages_Tabs_NavigateToTab),e)},e.getTabInstances=function(e){return yt(o(ht,s.Pages_Tabs_GetTabInstances),e)},e.getMruTabInstances=function(e){return Pt(o(ht,s.Pages_Tabs_GetMruTabInstances),e)},e.isSupported=function(){return!(!Ne(ve)||!ve.supports.pages)&&!!ve.supports.pages.tabs}}(i=e.tabs||(e.tabs={})),function(e){let t,n;function i(e,n,i){!Be(n)&&Ne(ve,D.settings),i&&i(),t=n,!Be(n)&&hn(e,"registerHandler",["save"])}function r(e,t,i){!Be(t)&&Ne(ve,D.remove,D.settings),i&&i(),n=t,!Be(t)&&hn(e,"registerHandler",["remove"])}function a(e){const n=new l(e);t?t(n):nn.childWindow?Gn("settings.save",[e]):n.notifySuccess()}e.initialize=function(){Nt("settings.save",a,!1),Nt("settings.remove",c,!1)},e.setValidityState=function(e){return Et(o(ht,s.Pages_Config_SetValidityState),e)},e.setConfig=function(e){return Rt(o(ht,s.Pages_Config_SetConfig),e)},e.registerOnSaveHandler=function(e){i(o(ht,s.Pages_Config_RegisterOnSaveHandler),e,(()=>{if(!Be(e)&&!u())throw G}))},e.registerOnSaveHandlerHelper=i,e.registerOnRemoveHandler=function(e){r(o(ht,s.Pages_Config_RegisterOnRemoveHandler),e,(()=>{if(!Be(e)&&!u())throw G}))},e.registerOnRemoveHandlerHelper=r,e.registerChangeConfigHandler=function(e){Ut(o(ht,s.Pages_Config_RegisterChangeConfigHandler),"changeSettings",e,[D.content],(()=>{if(!u())throw G}))};class l{constructor(e){this.notified=!1,this.result=e||{}}notifySuccess(){this.ensureNotNotified(),hn(o(ht,s.Pages_SaveEvent_NotifySuccess),"settings.save.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),hn(o(ht,s.Pages_SaveEvent_NotifyFailure),"settings.save.failure",[e]),this.notified=!0}ensureNotNotified(){if(this.notified)throw new Error("The SaveEvent may only notify success or failure once.")}}function c(){const e=new d;n?n(e):nn.childWindow?Gn("settings.remove",[]):e.notifySuccess()}class d{constructor(){this.notified=!1}notifySuccess(){this.ensureNotNotified(),hn(o(ht,s.Pages_RemoveEvent_NotifySuccess),"settings.remove.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),hn(o(ht,s.Pages_RemoveEvent_NotifyFailure),"settings.remove.failure",[e]),this.notified=!0}ensureNotNotified(){if(this.notified)throw new Error("The removeEventType may only notify success or failure once.")}}function u(){return!(!Ne(ve)||!ve.supports.pages)&&!!ve.supports.pages.config}e.isSupported=u}(r=e.config||(e.config={})),function(e){let t;function n(){return vt(o(ht,s.Pages_BackStack_NavigateBack))}function i(e,n,i){!Be(n)&&Ne(ve),i&&i(),t=n,!Be(n)&&hn(e,"registerHandler",["backButton"])}function r(){t&&t()||(nn.childWindow?Gn("backButtonPress",[]):n())}function a(){return!(!Ne(ve)||!ve.supports.pages)&&!!ve.supports.pages.backStack}e._initialize=function(){Nt("backButtonPress",r,!1)},e.navigateBack=n,e.registerBackButtonHandler=function(e){i(o(ht,s.Pages_BackStack_RegisterBackButtonHandler),e,(()=>{if(!Be(e)&&!a())throw G}))},e.registerBackButtonHandlerHelper=i,e.isSupported=a}(a=e.backStack||(e.backStack={})),function(e){function t(){return!(!Ne(ve)||!ve.supports.pages)&&!!ve.supports.pages.fullTrust}e.enterFullscreen=function(){if(Ne(ve,D.content),!t())throw G;hn(o(ht,s.Pages_FullTrust_EnterFullscreen),"enterFullscreen",[])},e.exitFullscreen=function(){if(Ne(ve,D.content),!t())throw G;hn(o(ht,s.Pages_FullTrust_ExitFullscreen),"exitFullscreen",[])},e.isSupported=t}(l=e.fullTrust||(e.fullTrust={})),function(e){function t(){return!(!Ne(ve)||!ve.supports.pages)&&!!ve.supports.pages.appButton}e.onClick=function(e){Ut(o(ht,s.Pages_AppButton_OnClick),"appButtonClick",e,[D.content],(()=>{if(!t())throw G}))},e.onHoverEnter=function(e){Ut(o(ht,s.Pages_AppButton_OnHoverEnter),"appButtonHoverEnter",e,[D.content],(()=>{if(!t())throw G}))},e.onHoverLeave=function(e){Ut(o(ht,s.Pages_AppButton_OnHoverLeave),"appButtonHoverLeave",e,[D.content],(()=>{if(!t())throw G}))},e.isSupported=t}(c=e.appButton||(e.appButton={})),function(e){function t(){return!(!Ne(ve)||!ve.supports.pages)&&!!ve.supports.pages.currentApp}e.navigateTo=function(e){return new Promise((n=>{if(Ne(ve,D.content,D.sidePanel,D.settings,D.task,D.stage,D.meetingStage),!t())throw G;n(un(o(ht,s.Pages_CurrentApp_NavigateTo),"pages.currentApp.navigateTo",e))}))},e.navigateToDefaultPage=function(){return new Promise((e=>{if(Ne(ve,D.content,D.sidePanel,D.settings,D.task,D.stage,D.meetingStage),!t())throw G;e(un(o(ht,s.Pages_CurrentApp_NavigateToDefaultPage),"pages.currentApp.navigateToDefaultPage"))}))},e.isSupported=t}(d=e.currentApp||(e.currentApp={}))}(Tt||(Tt={}));const Ft=t("handlers");class At{static initializeHandlers(){At.handlers.themeChange=Bt,At.handlers.load=Gt,At.handlers.beforeUnload=qt,Tt.backStack._initialize()}static uninitializeHandlers(){At.handlers={},At.themeChangeHandler=null,At.loadHandler=null,At.beforeUnloadHandler=null,At.beforeSuspendOrTerminateHandler=null,At.resumeHandler=null}}function Mt(){At.initializeHandlers()}function Ot(){At.uninitializeHandlers()}At.handlers={},At.themeChangeHandler=null,At.loadHandler=null,At.beforeUnloadHandler=null,At.beforeSuspendOrTerminateHandler=null,At.resumeHandler=null;const kt=Ft.extend("callHandler");function Ht(e,t){const n=At.handlers[e];if(n){kt("Invoking the registered handler for message %s with arguments %o",e,t);return[!0,n.apply(this,t)]}return nn.childWindow?(Gn(e,t),[!1,void 0]):(kt("Handler for action message %s not found.",e),[!1,void 0])}function Vt(e,t,n,i=!0,o=[]){n?(At.handlers[t]=n,i&&hn(e,"registerHandler",[t,...o])):delete At.handlers[t]}function Nt(e,t,n=!0,i=[]){t?(At.handlers[e]=t,n&&hn(o(a.V_0,s.RegisterHandler),"registerHandler",[e,...i])):delete At.handlers[e]}function Dt(e){delete At.handlers[e]}function Lt(e){return null!=At.handlers[e]}function Ut(e,t,n,i,o){n&&Ne(ve,...i),o&&o(),Nt(t,n)}function xt(e,t){At.themeChangeHandler=t,!Be(t)&&hn(e,"registerHandler",["themeChange"])}function Bt(e){At.themeChangeHandler&&At.themeChangeHandler(e),nn.childWindow&&Gn("themeChange",[e])}function Wt(e){At.loadHandler=e,!Be(e)&&hn(o(a.V_2,s.RegisterHandler),"registerHandler",["load"])}function Gt(e){At.resumeHandler?At.resumeHandler(e):At.loadHandler&&At.loadHandler(e),nn.childWindow&&Gn("load",[e])}function zt(e){At.beforeUnloadHandler=e,!Be(e)&&hn(o(a.V_2,s.RegisterHandler),"registerHandler",["beforeUnload"])}function qt(){const e=()=>{Cn("readyToUnload",[])};At.beforeSuspendOrTerminateHandler?(At.beforeSuspendOrTerminateHandler(),nn.childWindow?Gn("beforeUnload"):e()):At.beforeUnloadHandler&&At.beforeUnloadHandler(e)||(nn.childWindow?Gn("beforeUnload"):e())}function jt(e){At.beforeSuspendOrTerminateHandler=e,!Be(e)&&Cn("registerHandler",["beforeUnload"])}function $t(e){At.resumeHandler=e,!Be(e)&&Cn("registerHandler",["load"])}const Jt=t("nestedAppAuth"),Kt=Jt.extend("tryPolyfillWithNestedAppAuthBridge");var Qt;function Zt(e,t,n){var i;const o=Kt;if(y.isFramelessWindow)return void o("Cannot polyfill nestedAppAuthBridge as current window is frameless");if(!t)return void o("Cannot polyfill nestedAppAuthBridge as current window does not exist");const r=(()=>{try{return JSON.parse(e)}catch(e){return null}})();if(!r||!(null===(i=r.supports)||void 0===i?void 0:i.nestedAppAuth))return void o("Cannot polyfill nestedAppAuthBridge as current hub does not support nested app auth");const a=t;if(a.nestedAppAuthBridge)return void o("nestedAppAuthBridge already exists on current window, skipping polyfill");const s=Yt(a,n);s&&(a.nestedAppAuthBridge=s)}!function(e){e.Request="NestedAppAuthRequest",e.Response="NestedAppAuthResponse"}(Qt||(Qt={}));const Xt=Jt.extend("createNestedAppAuthBridge");function Yt(e,t){const n=Xt;if(!e)return n("nestedAppAuthBridge cannot be created as current window does not exist"),null;const{onMessage:i,sendPostMessage:o}=t,r=e=>t=>i(t,e);return{addEventListener:(t,i)=>{"message"===t?e.addEventListener(t,r(i)):n(`Event ${t} is not supported by nestedAppAuthBridge`)},postMessage:e=>{const t=(()=>{try{return JSON.parse(e)}catch(e){return null}})();t&&"object"==typeof t&&t.messageType===Qt.Request?o(e):n("Unrecognized data format received by app, message being ignored. Message: %o",e)},removeEventListener:(t,n)=>{e.removeEventListener(t,r(n))}}}var en=function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,r){function a(e){try{l(i.next(e))}catch(e){r(e)}}function s(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){e.done?n(e.value):o(e.value).then(a,s)}l((i=i.apply(e,t||[])).next())}))};const tn=t("communication");class nn{}class on{}function rn(e,t){if(on.messageListener=e=>en(this,void 0,void 0,(function*(){return yield En(e)})),nn.currentWindow=nn.currentWindow||le(),nn.parentWindow=nn.currentWindow.parent!==nn.currentWindow.self?nn.currentWindow.parent:nn.currentWindow.opener,nn.topWindow=nn.currentWindow.top,(nn.parentWindow||e)&&nn.currentWindow.addEventListener("message",on.messageListener,!1),!nn.parentWindow){const e=nn.currentWindow;if(!e.nativeInterface)return Promise.reject(new Error("Initialization Failed. No Parent window found."));y.isFramelessWindow=!0,e.onNativeMessage=On}try{return nn.parentOrigin="*",pn(t,"initialize",[Me,ge]).then((([e,t,n,i])=>(Zt(i,nn.currentWindow,{onMessage:Rn,sendPostMessage:wn}),{context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:i})))}finally{nn.parentOrigin=null}}function an(){nn.currentWindow&&nn.currentWindow.removeEventListener("message",on.messageListener,!1),nn.currentWindow=null,nn.parentWindow=null,nn.parentOrigin=null,nn.childWindow=null,nn.childOrigin=null,on.parentMessageQueue=[],on.childMessageQueue=[],on.nextMessageId=0,on.callbacks={},on.promiseCallbacks={}}function sn(e,t,...n){return pn(e,t,n).then((([e])=>e))}function ln(e,t,...n){return pn(e,t,n).then((([e,t])=>{if(!e)throw new Error(t)}))}function cn(e,...t){return gn(e,t).then((([e,t])=>{if(!e)throw new Error(t)}))}function dn(e,t,n,...i){return pn(e,t,i).then((([e,t])=>{if(!e)throw new Error(t||n)}))}function un(e,t,...n){return pn(e,t,n).then((([e,t])=>{if(e)throw e;return t}))}function fn(e,...t){return gn(e,t).then((([e,t])=>{if(e)throw e;return t}))}function pn(e,t,n=void 0){if(!r(e))throw Error(`apiVersionTag: ${e} passed in doesn't follow the pattern starting with 'v' followed by digits, then underscore with words, please check.`);return new Promise((i=>{i(mn(bn(e,t,n).id))}))}function gn(e,t=void 0){return new Promise((n=>{n(mn(bn(o(a.V_0,"testing"),e,t).id))}))}function mn(e){return new Promise((t=>{on.promiseCallbacks[e]=t}))}function hn(e,t,n,i){let o;if(n instanceof Function?i=n:n instanceof Array&&(o=n),!r(e))throw Error(`apiVersionTag: ${e} passed in doesn't follow the pattern starting with 'v' followed by digits, then underscore with words, please check.`);const a=bn(e,t,o);i&&(on.callbacks[a.id]=i)}function Cn(e,t,n){let i;t instanceof Function?n=t:t instanceof Array&&(i=t);const r=bn(o(a.V_0,"testing"),e,i);n&&(on.callbacks[r.id]=n)}on.parentMessageQueue=[],on.childMessageQueue=[],on.topMessageQueue=[],on.nextMessageId=0,on.callbacks={},on.promiseCallbacks={};const vn=tn.extend("sendNestedAuthRequestToTopWindow");function wn(e){const t=vn,n=nn.topWindow,i=qn(e);return t("Message %i information: %o",i.id,{actionName:i.func}),yn(n,i)}const Sn=tn.extend("sendRequestToTargetWindowHelper");function yn(e,t){const n=Sn,i=Ln(e);if(y.isFramelessWindow)nn.currentWindow&&nn.currentWindow.nativeInterface&&(n(`Sending message %i to ${i} via framelessPostMessage interface`,t.id),nn.currentWindow.nativeInterface.framelessPostMessage(JSON.stringify(t)));else{const o=Dn(e);e&&o?(n(`Sending message %i to ${i} via postMessage`,t.id),e.postMessage(t,o)):(n(`Adding message %i to ${i} message queue`,t.id),Nn(e).push(t))}return t}const Pn=tn.extend("sendMessageToParentHelper");function bn(e,t,n){const i=Pn,o=nn.parentWindow,r=zn(e,t,n);return i("Message %i information: %o",r.id,{actionName:t,args:n}),yn(o,r)}const _n=tn.extend("processMessage");function En(e){return en(this,void 0,void 0,(function*(){if(!e||!e.data||"object"!=typeof e.data)return void _n("Unrecognized message format received by app, message being ignored. Message: %o",e);const t=e.source||e.originalEvent&&e.originalEvent.source,n=e.origin||e.originalEvent&&e.originalEvent.origin;return Fn(t,n).then((i=>{i?(An(t,n),t===nn.parentWindow?On(e):t===nn.childWindow&&Hn(e)):_n("Message being ignored by app because it is either coming from the current window or a different window with an invalid origin")}))}))}const In=tn.extend("processAuthBridgeMessage");function Rn(e,t){var n,i;const o=In;if(!e||!e.data||"object"!=typeof e.data)return void o("Unrecognized message format received by app, message being ignored. Message: %o",e);const{args:r}=e.data,[,a]=null!=r?r:[],s=(()=>{try{return JSON.parse(a)}catch(e){return null}})();if(!s||"object"!=typeof s||s.messageType!==Qt.Response)return void o("Unrecognized data format received by app, message being ignored. Message: %o",e);const l=e.source||(null===(n=null==e?void 0:e.originalEvent)||void 0===n?void 0:n.source),c=e.origin||(null===(i=null==e?void 0:e.originalEvent)||void 0===i?void 0:i.origin);l?Fn(l,c)?(nn.topWindow&&!nn.topWindow.closed&&l!==nn.topWindow||(nn.topWindow=l,nn.topOrigin=c),nn.topWindow&&nn.topWindow.closed&&(nn.topWindow=null,nn.topOrigin=null),xn(nn.topWindow),t(a)):o("Message being ignored by app because it is either coming from the current window or a different window with an invalid origin"):o("Message being ignored by app because it is coming for a target that is null")}const Tn=tn.extend("shouldProcessMessage");function Fn(e,t){return en(this,void 0,void 0,(function*(){if(nn.currentWindow&&e===nn.currentWindow)return Tn("Should not process message because it is coming from the current window"),!1;if(nn.currentWindow&&nn.currentWindow.location&&t&&t===nn.currentWindow.location.origin)return!0;{const e=yield Qe(new URL(t));return e||Tn("Message has an invalid origin of %s",t),e}}))}function An(e,t){y.isFramelessWindow||nn.parentWindow&&!nn.parentWindow.closed&&e!==nn.parentWindow?nn.childWindow&&!nn.childWindow.closed&&e!==nn.childWindow||(nn.childWindow=e,nn.childOrigin=t):(nn.parentWindow=e,nn.parentOrigin=t),nn.parentWindow&&nn.parentWindow.closed&&(nn.parentWindow=null,nn.parentOrigin=null),nn.childWindow&&nn.childWindow.closed&&(nn.childWindow=null,nn.childOrigin=null),xn(nn.parentWindow),xn(nn.childWindow)}const Mn=tn.extend("handleParentMessage");function On(e){const t=Mn;if("id"in e.data&&"number"==typeof e.data.id){const n=e.data,i=on.callbacks[n.id];t("Received a response from parent for message %i",n.id),i&&(t("Invoking the registered callback for message %i with arguments %o",n.id,n.args),i.apply(null,[...n.args,n.isPartialResponse]),kn(e)||(t("Removing registered callback for message %i",n.id),delete on.callbacks[n.id]));const o=on.promiseCallbacks[n.id];o&&(t("Invoking the registered promise callback for message %i with arguments %o",n.id,n.args),o(n.args),t("Removing registered promise callback for message %i",n.id),delete on.promiseCallbacks[n.id])}else if("func"in e.data&&"string"==typeof e.data.func){const n=e.data;t("Received an action message %s from parent",n.func),Ht(n.func,n.args)}else t("Received an unknown message: %O",e)}function kn(e){return!0===e.data.isPartialResponse}function Hn(e){if("id"in e.data&&"func"in e.data){const t=e.data,[n,i]=Ht(t.func,t.args);n&&void 0!==i?Wn(t.id,Array.isArray(i)?i:[i]):Cn(t.func,t.args,((...e)=>{if(nn.childWindow){const n=e.pop();Wn(t.id,e,n)}}))}}function Vn(){return nn.topWindow!==nn.parentWindow}function Nn(e){return e===nn.topWindow&&Vn()?on.topMessageQueue:e===nn.parentWindow?on.parentMessageQueue:e===nn.childWindow?on.childMessageQueue:[]}function Dn(e){return e===nn.topWindow&&Vn()?nn.topOrigin:e===nn.parentWindow?nn.parentOrigin:e===nn.childWindow?nn.childOrigin:null}function Ln(e){return e===nn.topWindow&&Vn()?"top":e===nn.parentWindow?"parent":e===nn.childWindow?"child":null}const Un=tn.extend("flushMessageQueue");function xn(e){const t=Dn(e),n=Nn(e),i=Ln(e);for(;e&&t&&n.length>0;){const o=n.shift();Un("Flushing message %i from "+i+" message queue via postMessage.",null==o?void 0:o.id),e.postMessage(o,t)}}function Bn(e,t){let n;n=nn.currentWindow.setInterval((()=>{0===Nn(e).length&&(clearInterval(n),t())}),100)}function Wn(e,t,n){const i=nn.childWindow,o=jn(e,t,n),r=Dn(i);i&&r&&i.postMessage(o,r)}function Gn(e,t){const n=nn.childWindow,i=$n(e,t),o=Dn(n);n&&o?n.postMessage(i,o):Nn(n).push(i)}function zn(e,t,n){return{id:on.nextMessageId++,func:t,timestamp:Date.now(),args:n||[],apiversiontag:e}}function qn(e){return{id:on.nextMessageId++,func:"nestedAppAuth.execute",timestamp:Date.now(),args:[],data:e}}function jn(e,t,n){return{id:e,args:t||[],isPartialResponse:n}}function $n(e,t){return{func:e,args:t||[]}}const Jn=a.V_1;var Kn,Qn,Zn,Xn;!function(e){function t(){return!(!Ne(ve)||!ve.supports.logs)}e.registerGetLogHandler=function(e){if(!Be(e)&&Ne(ve),!Be(e)&&!t())throw G;e?Vt(o(Jn,s.Logs_RegisterLogRequestHandler),"log.request",(()=>{const t=e();hn(o(Jn,s.Logs_Receive),"log.receive",[t])})):Dt("log.request")},e.isSupported=t}(Kn||(Kn={})),function(e){e.fileDownloadStart="fileDownloadStart",e.fileDownloadComplete="fileDownloadComplete"}(Qn||(Qn={})),function(e){e.view="view",e.edit="edit",e.editNew="editNew"}(Zn||(Zn={})),function(e){e.fileOpenPreference="fileOpenPreference",e.theme="theme"}(Xn||(Xn={}));const Yn=a.V_1;function ei(e,t){Ne(ve),hn(o(Yn,s.PrivateAPIs_UploadCustomApp),"uploadCustomApp",[e],t||K())}function ti(e,t,n){Ne(ve),hn(o(Yn,s.PrivateAPIs_SendCustomMessage),e,t,n)}function ni(e,t){if(Ne(ve),!nn.childWindow)throw new Error("The child window has not yet been initialized or is not present");Gn(e,t)}function ii(e,t){Ne(ve),Vt(o(Yn,s.PrivateAPIs_RegisterCustomHandler),e,((...e)=>t.apply(this,e)))}function oi(e,t){Ne(ve),Vt(o(Yn,s.PrivateAPIs_RegisterUserSettingsChangeHandler),"userSettingsChange",t,!0,[e])}function ri(e){Ne(ve,D.content,D.task);const t=[e.entityId,e.title,e.description,e.type,e.objectUrl,e.downloadUrl,e.webPreviewUrl,e.webEditUrl,e.baseUrl,e.editFile,e.subEntityId,e.viewerAction,e.fileOpenPreference,e.conversationId,e.sizeInBytes];hn(o(Yn,s.PrivateAPIs_OpenFilePreview),"openFilePreview",t)}const ai=a.V_1;var si;!function(e){function t(){return!(!Ne(ve)||!ve.supports.conversations)}e.openConversation=function(e){return new Promise((n=>{if(Ne(ve,D.content),!t())throw G;const i=ln(o(ai,s.Conversations_OpenConversation),"conversations.openConversation",{title:e.title,subEntityId:e.subEntityId,conversationId:e.conversationId,channelId:e.channelId,entityId:e.entityId});e.onStartConversation&&Vt(o(ai,s.Conversations_RegisterStartConversationHandler),"startConversation",((t,n,i,o)=>{var r;return null===(r=e.onStartConversation)||void 0===r?void 0:r.call(e,{subEntityId:t,conversationId:n,channelId:i,entityId:o})})),e.onCloseConversation&&Vt(o(ai,s.Conversations_RegisterCloseConversationHandler),"closeConversation",((t,n,i,o)=>{var r;return null===(r=e.onCloseConversation)||void 0===r?void 0:r.call(e,{subEntityId:t,conversationId:n,channelId:i,entityId:o})})),n(i)}))},e.closeConversation=function(){if(Ne(ve,D.content),!t())throw G;hn(o(ai,s.Conversations_CloseConversation),"conversations.closeConversation"),Dt("startConversation"),Dt("closeConversation")},e.getChatMembers=function(){return new Promise((e=>{if(Ne(ve),!t())throw G;e(sn(o(ai,s.Conversations_GetChatMember),"getChatMembers"))}))},e.isSupported=t}(si||(si={}));const li="users";function ci(e,t,n){if(0===e.length)throw new Error("Must have at least one user when creating a chat deep link");const i=`${li}=`+e.map((e=>encodeURIComponent(e))).join(","),o=void 0===t?"":`&topicName=${encodeURIComponent(t)}`,r=void 0===n?"":`&message=${encodeURIComponent(n)}`;return`${h}://${C}/l/chat/0/0?${i}${o}${r}`}function di(e,t,n){if(0===e.length)throw new Error("Must have at least one target when creating a call deep link");const i=`${li}=`+e.map((e=>encodeURIComponent(e))).join(","),o=void 0===t?"":`&withVideo=${encodeURIComponent(t)}`,r=void 0===n?"":`&source=${encodeURIComponent(n)}`;return`${h}://${C}/l/call/0/0?${i}${o}${r}`}function ui(e,t,n,i,o){const r=void 0===e?"":"attendees="+e.map((e=>encodeURIComponent(e))).join(","),a=void 0===t?"":`&startTime=${encodeURIComponent(t)}`,s=void 0===n?"":`&endTime=${encodeURIComponent(n)}`,l=void 0===i?"":`&subject=${encodeURIComponent(i)}`,c=void 0===o?"":`&content=${encodeURIComponent(o)}`;return`${h}://${C}/l/meeting/new?${r}${a}${s}${l}${c}`}function fi(e){if(!e)throw new Error("App ID must be set when creating an app install dialog deep link");return`${h}://${C}/l/app/${encodeURIComponent(e)}`}var pi;!function(e){function t(){return!(!Ne(ve)||!ve.supports.appInstallDialog)}e.openAppInstallDialog=function(e){return new Promise((n=>{if(Ne(ve,D.content,D.sidePanel,D.settings,D.task,D.stage,D.meetingStage),!t())throw new Error("Not supported");ve.isLegacyTeams?n(cn("executeDeepLink",fi(e.appId))):(Cn("appInstallDialog.openAppInstallDialog",[e]),n())}))},e.isSupported=t}(pi||(pi={}));const gi=a.V_1,mi=t("media");var hi;function Ci(e,t){if(null==e||null==t||e.length<=0)return null;let n=null,i=1;return e.sort(((e,t)=>e.sequence>t.sequence?1:-1)),e.forEach((e=>{e.sequence==i&&(n=n?new Blob([n,e.file],{type:t}):new Blob([e.file],{type:t}),i++)})),n}function vi(e,t){if(null==e||null==t)return null;const n=atob(e.chunk),i=new Array(n.length);for(let e=0;e<n.length;e++)i[e]=n.charCodeAt(e);const o=new Uint8Array(i),r=new Blob([o],{type:t});return{sequence:e.chunkSequence,file:r}}function wi(e){bi(e)?Ue("2.0.2"):_i(e)?Ue(d):Pi(e)&&Ue("2.0.4")}function Si(e){return!(e.mediaType!=hi.MediaType.Video||!e.videoProps||!e.videoProps.videoController)}function yi(e){return!(null==e||e.maxMediaCount>10)}function Pi(e){var t;return!((null==e?void 0:e.mediaType)!=hi.MediaType.Image||!(null===(t=null==e?void 0:e.imageProps)||void 0===t?void 0:t.imageOutputFormats))}function bi(e){return!(!e||e.mediaType!=hi.MediaType.VideoAndImage&&!e.videoAndImageProps)}function _i(e){return!(!e||e.mediaType!=hi.MediaType.Video||!e.videoProps||e.videoProps.isFullScreenMode)}function Ei(e,t,n){return null!=e&&null!=t&&t==hi.FileFormat.ID&&null!=n}function Ii(e){return!(null==e||e.length<=0||e.length>10)}function Ri(e){return!e||!(null===e.timeOutIntervalInSec||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec<=0||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec>60)}function Ti(e){if(e){if(e.title&&"string"!=typeof e.title)return!1;if(e.setSelected&&"object"!=typeof e.setSelected)return!1;if(e.openOrgWideSearchInChatOrChannel&&"boolean"!=typeof e.openOrgWideSearchInChatOrChannel)return!1;if(e.singleSelect&&"boolean"!=typeof e.singleSelect)return!1}return!0}!function(e){let t,n,i,r,a,l,c;!function(e){e.Base64="base64",e.ID="id"}(t=e.FileFormat||(e.FileFormat={}));class u{}function p(){return!(!Ne(ve)||!ve.supports.permissions)}e.File=u,e.captureImage=function(e){if(!e)throw new Error("[captureImage] Callback cannot be null");if(Ne(ve,D.content,D.task),y.isFramelessWindow)if(De("1.7.0"))hn(o(gi,s.Media_CaptureImage),"captureImage",e);else{e({errorCode:O.OLD_PLATFORM},[])}else{e({errorCode:O.NOT_SUPPORTED_ON_PLATFORM},[])}},e.hasPermission=function(){if(Ne(ve,D.content,D.task),!p())throw G;const e=k.Media;return new Promise((t=>{t(un(o(gi,s.Media_HasPermission),"permissions.has",e))}))},e.requestPermission=function(){if(Ne(ve,D.content,D.task),!p())throw G;const e=k.Media;return new Promise((t=>{t(un(o(gi,s.Media_RequestPermission),"permissions.request",e))}))};class g extends u{constructor(e){super(),e&&(this.content=e.content,this.format=e.format,this.mimeType=e.mimeType,this.name=e.name,this.preview=e.preview,this.size=e.size)}getMedia(e){if(!e)throw new Error("[get Media] Callback cannot be null");if(Ne(ve,D.content,D.task),De(f))if(Ei(this.mimeType,this.format,this.content))De("2.0.0")?this.getMediaViaCallback(e):this.getMediaViaHandler(e);else{e({errorCode:O.INVALID_ARGUMENTS},new Blob)}else{e({errorCode:O.OLD_PLATFORM},new Blob)}}getMediaViaCallback(e){const t={mediaMimeType:this.mimeType,assembleAttachment:[]},n=[this.content];hn(o(gi,s.Media_GetMedia),"getMedia",n,(function(n){if(e)if(n&&n.error)e(n.error,new Blob);else if(n&&n.mediaChunk)if(n.mediaChunk.chunkSequence<=0){const i=Ci(t.assembleAttachment,t.mediaMimeType);e(n.error,null!=i?i:new Blob)}else{const e=vi(n.mediaChunk,t.mediaMimeType);e?t.assembleAttachment.push(e):mi(`Received a null assemble attachment for when decoding chunk sequence ${n.mediaChunk.chunkSequence}; not including the chunk in the assembled file.`)}else e({errorCode:O.INTERNAL_ERROR,message:"data received is null"},new Blob)}))}getMediaViaHandler(e){const t=Z(),n={mediaMimeType:this.mimeType,assembleAttachment:[]},i=[t,this.content];this.content&&!Be(e)&&hn(o(gi,s.Media_GetMedia),"getMedia",i),Nt("getMedia"+t,(function(i){if(e){const o=JSON.parse(i);if(o.error)e(o.error,new Blob),Dt("getMedia"+t);else if(o.mediaChunk)if(o.mediaChunk.chunkSequence<=0){const i=Ci(n.assembleAttachment,n.mediaMimeType);e(o.error,null!=i?i:new Blob),Dt("getMedia"+t)}else{const e=vi(o.mediaChunk,n.mediaMimeType);e&&n.assembleAttachment.push(e)}else e({errorCode:O.INTERNAL_ERROR,message:"data received is null"},new Blob),Dt("getMedia"+t)}}))}}e.Media=g;class m{constructor(e){this.controllerCallback=e}notifyEventToHost(e,t){Ne(ve,D.content,D.task);try{Ue(d)}catch(e){return void(t&&t(e))}const n={mediaType:this.getMediaType(),mediaControllerEvent:e};hn(o(gi,s.Media_Controller),"media.controller",[n],(e=>{t&&t(e)}))}stop(e){this.notifyEventToHost(n.StopRecording,e)}}e.VideoController=class extends m{getMediaType(){return a.Video}notifyEventToApp(e){if(this.controllerCallback)switch(e){case n.StartRecording:if(this.controllerCallback.onRecordingStarted){this.controllerCallback.onRecordingStarted();break}}}},function(e){e[e.StartRecording=1]="StartRecording",e[e.StopRecording=2]="StopRecording"}(n=e.MediaControllerEvent||(e.MediaControllerEvent={})),function(e){e[e.Photo=1]="Photo",e[e.Document=2]="Document",e[e.Whiteboard=3]="Whiteboard",e[e.BusinessCard=4]="BusinessCard"}(i=e.CameraStartMode||(e.CameraStartMode={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(r=e.Source||(e.Source={})),function(e){e[e.Image=1]="Image",e[e.Video=2]="Video",e[e.VideoAndImage=3]="VideoAndImage",e[e.Audio=4]="Audio"}(a=e.MediaType||(e.MediaType={})),function(e){e[e.ID=1]="ID",e[e.URL=2]="URL"}(l=e.ImageUriType||(e.ImageUriType={})),function(e){e[e.IMAGE=1]="IMAGE",e[e.PDF=2]="PDF"}(c=e.ImageOutputFormats||(e.ImageOutputFormats={})),e.selectMedia=function(e,t){if(!t)throw new Error("[select Media] Callback cannot be null");if(Ne(ve,D.content,D.task),!De(f)){const e={errorCode:O.OLD_PLATFORM};return void t(e,[])}try{wi(e)}catch(e){return void t(e,[])}if(!yi(e)){const e={errorCode:O.INVALID_ARGUMENTS};return void t(e,[])}const n=[e];hn(o(gi,s.Media_SelectMedia),"selectMedia",n,((n,i,o)=>{var r,a;if(o)return void(Si(e)&&(null===(a=null===(r=null==e?void 0:e.videoProps)||void 0===r?void 0:r.videoController)||void 0===a||a.notifyEventToApp(o)));if(!i)return void t(n,[]);const s=[];for(const e of i)s.push(new g(e));t(n,s)}))},e.viewImages=function(e,t){if(!t)throw new Error("[view images] Callback cannot be null");if(Ne(ve,D.content,D.task),!De(f)){return void t({errorCode:O.OLD_PLATFORM})}if(!Ii(e)){return void t({errorCode:O.INVALID_ARGUMENTS})}const n=[e];hn(o(gi,s.Media_ViewImages),"viewImages",n,t)},e.scanBarCode=function(e,t){if(!e)throw new Error("[media.scanBarCode] Callback cannot be null");if(Ne(ve,D.content,D.task),y.hostClientType!==V.desktop&&y.hostClientType!==V.web&&y.hostClientType!==V.rigel&&y.hostClientType!==V.teamsRoomsWindows&&y.hostClientType!==V.teamsRoomsAndroid&&y.hostClientType!==V.teamsPhones&&y.hostClientType!==V.teamsDisplays)if(De("1.9.0"))if(Ri(t))hn(o(gi,s.Media_ScanBarCode),"media.scanBarCode",[t],e);else{e({errorCode:O.INVALID_ARGUMENTS},"")}else{e({errorCode:O.OLD_PLATFORM},"")}else{e({errorCode:O.NOT_SUPPORTED_ON_PLATFORM},"")}}}(hi||(hi={}));const Fi=a.V_2;var Ai;!function(e){function t(){return!!(Ne(ve)&&ve.supports.barCode&&ve.supports.permissions)}e.scanBarCode=function(e){return new Promise((n=>{if(Ne(ve,D.content,D.task),!t())throw G;if(!Ri(e))throw{errorCode:O.INVALID_ARGUMENTS};n(un(o(Fi,s.BarCode_ScanBarCode),"media.scanBarCode",e))}))},e.hasPermission=function(){if(Ne(ve,D.content,D.task),!t())throw G;const e=k.Media;return new Promise((t=>{t(un(o(Fi,s.BarCode_HasPermission),"permissions.has",e))}))},e.requestPermission=function(){if(Ne(ve,D.content,D.task),!t())throw G;const e=k.Media;return new Promise((t=>{t(un(o(Fi,s.BarCode_RequestPermission),"permissions.request",e))}))},e.isSupported=t}(Ai||(Ai={}));const Mi=a.V_2;var Oi;!function(e){function t(e,t){return new Promise((i=>{if(Ne(ve,D.content,D.task),!n())throw G;if(ve.isLegacyTeams)i(ln(e,"executeDeepLink",ci([t.user],void 0,t.message)));else{i(ln(e,"chat.openChat",{members:[t.user],message:t.message}))}}))}function n(){return!(!Ne(ve)||!ve.supports.chat)}e.openChat=function(e){return t(o(Mi,s.Chat_OpenChat),e)},e.openGroupChat=function(e){const i=o(Mi,s.Chat_OpenGroupChat);return new Promise((o=>{if(e.users.length<1)throw Error("OpenGroupChat Failed: No users specified");if(1===e.users.length){const n={user:e.users[0],message:e.message};o(t(i,n))}else{if(Ne(ve,D.content,D.task),!n())throw G;if(ve.isLegacyTeams)o(ln(i,"executeDeepLink",ci(e.users,e.topic,e.message)));else{o(ln(i,"chat.openChat",{members:e.users,message:e.message,topic:e.topic}))}}}))},e.isSupported=n}(Oi||(Oi={}));var ki=function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,r){function a(e){try{l(i.next(e))}catch(e){r(e)}}function s(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){e.done?n(e.value):o(e.value).then(a,s)}l((i=i.apply(e,t||[])).next())}))};const Hi=a.V_2;var Vi;!function(e){function t(){return!!(Ne(ve)&&navigator&&navigator.clipboard&&ve.supports.clipboard)}e.write=function(e){return ki(this,void 0,void 0,(function*(){if(Ne(ve,D.content,D.meetingStage,D.task,D.settings,D.stage,D.sidePanel),!t())throw G;if(!e.type||!Object.values(H).includes(e.type))throw new Error(`Blob type ${e.type} is not supported. Supported blob types are ${Object.values(H)}`);const n=yield se(e),i={mimeType:e.type,content:n};return un(o(Hi,s.Clipboard_Write),"clipboard.writeToClipboard",i)}))},e.read=function(){return ki(this,void 0,void 0,(function*(){if(Ne(ve,D.content,D.meetingStage,D.task,D.settings,D.stage,D.sidePanel),!t())throw G;if(Le()||y.hostClientType===V.macos){const e=JSON.parse(yield fn("clipboard.readFromClipboard"));return ae(e.mimeType,e.content)}return un(o(Hi,s.Clipboard_Read),"clipboard.readFromClipboard")}))},e.isSupported=t}(Vi||(Vi={}));const Ni=a.V_2;var Di;function Li(){return ve.hostVersionsInfo?ve.hostVersionsInfo.adaptiveCardSchemaVersion:void 0}!function(e){function t(){return!!(Ne(ve)&&ve.supports.geoLocation&&ve.supports.permissions)}let n;e.getCurrentLocation=function(){if(Ne(ve,D.content,D.task),!t())throw G;return un(o(Ni,s.GeoLocation_GetCurrentLocation),"location.getLocation",{allowChooseLocation:!1,showMap:!1})},e.hasPermission=function(){if(Ne(ve,D.content,D.task),!t())throw G;const e=k.GeoLocation;return new Promise((t=>{t(un(o(Ni,s.GeoLocation_HasPermission),"permissions.has",e))}))},e.requestPermission=function(){if(Ne(ve,D.content,D.task),!t())throw G;const e=k.GeoLocation;return new Promise((t=>{t(un(o(Ni,s.GeoLocation_RequestPermission),"permissions.request",e))}))},e.isSupported=t,function(e){function t(){return!!(Ne(ve)&&ve.supports.geoLocation&&ve.supports.geoLocation.map&&ve.supports.permissions)}e.chooseLocation=function(){if(Ne(ve,D.content,D.task),!t())throw G;return un(o(Ni,s.GeoLocation_Map_ChooseLocation),"location.getLocation",{allowChooseLocation:!0,showMap:!0})},e.showLocation=function(e){if(Ne(ve,D.content,D.task),!t())throw G;if(!e)throw{errorCode:O.INVALID_ARGUMENTS};return un(o(Ni,s.GeoLocation_ShowLocation),"location.showLocation",e)},e.isSupported=t}(n=e.map||(e.map={}))}(Di||(Di={}));class Ui{postMessage(e,t){Ne(ve),Cn("messageForChild",[e],t||K())}addEventListener(e,t){Ne(ve),"message"===e&&Nt("messageForParent",t)}}class xi{static get Instance(){return this._instance||(this._instance=new this)}postMessage(e,t){Ne(ve,D.task),Cn("messageForParent",[e],t||K())}addEventListener(e,t){Ne(ve,D.task),"message"===e&&Nt("messageForChild",t)}}const Bi=a.V_2;var Wi;!function(e){function t(){return!(!Ne(ve)||!ve.supports.secondaryBrowser)}e.open=function(e){if(Ne(ve,D.content),!t())throw G;if(!e||!re(e))throw{errorCode:O.INVALID_ARGUMENTS,message:"Invalid Url: Only https URL is allowed"};return un(o(Bi,s.SecondaryBrowser_OpenUrl),"secondaryBrowser.open",e.toString())},e.isSupported=t}(Wi||(Wi={}));const Gi=a.V_1;var zi;!function(e){function t(){return!(!Ne(ve)||!ve.supports.location)}e.getLocation=function(e,n){if(!n)throw new Error("[location.getLocation] Callback cannot be null");if(Ne(ve,D.content,D.task),!De(u))throw{errorCode:O.OLD_PLATFORM};if(!e)throw{errorCode:O.INVALID_ARGUMENTS};if(!t())throw G;hn(o(Gi,s.Location_GetLocation),"location.getLocation",[e],n)},e.showLocation=function(e,n){if(!n)throw new Error("[location.showLocation] Callback cannot be null");if(Ne(ve,D.content,D.task),!De(u))throw{errorCode:O.OLD_PLATFORM};if(!e)throw{errorCode:O.INVALID_ARGUMENTS};if(!t())throw G;hn(o(Gi,s.Location_ShowLocation),"location.showLocation",[e],n)},e.isSupported=t}(zi||(zi={}));var qi=function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,r){function a(e){try{l(i.next(e))}catch(e){r(e)}}function s(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){e.done?n(e.value):o(e.value).then(a,s)}l((i=i.apply(e,t||[])).next())}))};const ji=a.V_1;var $i;!function(e){let t,n,i,r,a,l;function c(e,n){hn(o(ji,s.Meeting_RequestAppAudioHandling),"meeting.requestAppAudioHandling",[e.isAppHandlingAudio],((i,r)=>{if(i&&null!=r)throw new Error("[requestAppAudioHandling] Callback response - both parameters cannot be set");if(i)throw new Error(`[requestAppAudioHandling] Callback response - SDK error ${i.errorCode} ${i.message}`);if("boolean"!=typeof r)throw new Error("[requestAppAudioHandling] Callback response - isHostAudioless must be a boolean");Vt(o(ji,s.Meeting_RegisterMicStateChangeHandler),"meeting.micStateChanged",(n=>qi(this,void 0,void 0,(function*(){try{const i=yield e.micMuteStateChangedCallback(n);u(i,i.isMicMuted===n.isMicMuted?t.HostInitiated:t.AppDeclinedToChange)}catch(e){u(n,t.AppFailedToChange)}}))));Vt(o(ji,s.Meeting_RegisterAudioDeviceSelectionChangedHandler),"meeting.audioDeviceSelectionChanged",(t=>{var n;null===(n=e.audioDeviceSelectionChangedCallback)||void 0===n||n.call(e,t)})),n(r)}))}function d(e,t){hn(o(ji,s.Meeting_RequestAppAudioHandling),"meeting.requestAppAudioHandling",[e.isAppHandlingAudio],((e,n)=>{if(e&&null!=n)throw new Error("[requestAppAudioHandling] Callback response - both parameters cannot be set");if(e)throw new Error(`[requestAppAudioHandling] Callback response - SDK error ${e.errorCode} ${e.message}`);if("boolean"!=typeof n)throw new Error("[requestAppAudioHandling] Callback response - isHostAudioless must be a boolean");Lt("meeting.micStateChanged")&&Dt("meeting.micStateChanged"),Lt("meeting.audioDeviceSelectionChanged")&&Dt("meeting.audioDeviceSelectionChanged"),t(n)}))}function u(e,t){Ne(ve,D.sidePanel,D.meetingStage),hn(o(ji,s.Meeting_SetMicStateWithReason),"meeting.updateMicState",[e,t])}!function(e){e[e.HostInitiated=0]="HostInitiated",e[e.AppInitiated=1]="AppInitiated",e[e.AppDeclinedToChange=2]="AppDeclinedToChange",e[e.AppFailedToChange=3]="AppFailedToChange"}(t||(t={})),function(e){e.like="like",e.heart="heart",e.laugh="laugh",e.surprised="surprised",e.applause="applause"}(n=e.MeetingReactionType||(e.MeetingReactionType={})),function(e){e.Unknown="Unknown",e.Adhoc="Adhoc",e.Scheduled="Scheduled",e.Recurring="Recurring",e.Broadcast="Broadcast",e.MeetNow="MeetNow"}(i=e.MeetingType||(e.MeetingType={})),function(e){e.OneOnOneCall="oneOnOneCall",e.GroupCall="groupCall"}(r=e.CallType||(e.CallType={})),function(e){e.Collaborative="Collaborative",e.ScreenShare="ScreenShare"}(a=e.SharingProtocol||(e.SharingProtocol={})),e.getIncomingClientAudioState=function(e){if(!e)throw new Error("[get incoming client audio state] Callback cannot be null");Ne(ve,D.sidePanel,D.meetingStage),hn(o(ji,s.Meeting_GetIncomingClientAudioState),"getIncomingClientAudioState",e)},e.toggleIncomingClientAudio=function(e){if(!e)throw new Error("[toggle incoming client audio] Callback cannot be null");Ne(ve,D.sidePanel,D.meetingStage),hn(o(ji,s.Meeting_ToggleIncomingClientAudio),"toggleIncomingClientAudio",e)},e.getMeetingDetails=function(e){if(!e)throw new Error("[get meeting details] Callback cannot be null");Ne(ve,D.sidePanel,D.meetingStage,D.settings,D.content),hn(o(ji,s.Meeting_GetMeetingDetails),"meeting.getMeetingDetails",e)},e.getAuthenticationTokenForAnonymousUser=function(e){if(!e)throw new Error("[get Authentication Token For AnonymousUser] Callback cannot be null");Ne(ve,D.sidePanel,D.meetingStage,D.task),hn(o(ji,s.Meeting_GetAuthenticationTokenForAnonymousUser),"meeting.getAuthenticationTokenForAnonymousUser",e)},e.getLiveStreamState=function(e){if(!e)throw new Error("[get live stream state] Callback cannot be null");Ne(ve,D.sidePanel),hn(o(ji,s.Meeting_GetLiveStreamState),"meeting.getLiveStreamState",e)},e.requestStartLiveStreaming=function(e,t,n){if(!e)throw new Error("[request start live streaming] Callback cannot be null");Ne(ve,D.sidePanel),hn(o(ji,s.Meeting_RequestStartLiveStreaming),"meeting.requestStartLiveStreaming",[t,n],e)},e.requestStopLiveStreaming=function(e){if(!e)throw new Error("[request stop live streaming] Callback cannot be null");Ne(ve,D.sidePanel),hn(o(ji,s.Meeting_RequestStopLiveStreaming),"meeting.requestStopLiveStreaming",e)},e.registerLiveStreamChangedHandler=function(e){if(!e)throw new Error("[register live stream changed handler] Handler cannot be null");Ne(ve,D.sidePanel),Vt(o(ji,s.Meeting_RegisterLiveStreamChangedHandler),"meeting.liveStreamChanged",e)},e.shareAppContentToStage=function(e,t,n={sharingProtocol:a.Collaborative}){if(!e)throw new Error("[share app content to stage] Callback cannot be null");Ne(ve,D.sidePanel,D.meetingStage),hn(o(ji,s.Meeting_ShareAppContentToStage),"meeting.shareAppContentToStage",[t,n],e)},e.getAppContentStageSharingCapabilities=function(e){if(!e)throw new Error("[get app content stage sharing capabilities] Callback cannot be null");Ne(ve,D.sidePanel,D.meetingStage),hn(o(ji,s.Meeting_GetAppContentStageSharingCapabilities),"meeting.getAppContentStageSharingCapabilities",e)},e.stopSharingAppContentToStage=function(e){if(!e)throw new Error("[stop sharing app content to stage] Callback cannot be null");Ne(ve,D.sidePanel,D.meetingStage),hn(o(ji,s.Meeting_StopSharingAppContentToStage),"meeting.stopSharingAppContentToStage",e)},e.getAppContentStageSharingState=function(e){if(!e)throw new Error("[get app content stage sharing state] Callback cannot be null");Ne(ve,D.sidePanel,D.meetingStage),hn(o(ji,s.Meeting_GetAppContentStageSharingState),"meeting.getAppContentStageSharingState",e)},e.registerSpeakingStateChangeHandler=function(e){if(!e)throw new Error("[registerSpeakingStateChangeHandler] Handler cannot be null");Ne(ve,D.sidePanel,D.meetingStage),Vt(o(ji,s.Meeting_RegisterSpeakingStateChangeHandler),"meeting.speakingStateChanged",e)},e.registerRaiseHandStateChangedHandler=function(e){if(!e)throw new Error("[registerRaiseHandStateChangedHandler] Handler cannot be null");Ne(ve,D.sidePanel,D.meetingStage),Vt(o(ji,s.Meeting_RegisterRaiseHandStateChangedHandler),"meeting.raiseHandStateChanged",e)},e.registerMeetingReactionReceivedHandler=function(e){if(!e)throw new Error("[registerMeetingReactionReceivedHandler] Handler cannot be null");Ne(ve,D.sidePanel,D.meetingStage),Vt(o(ji,s.Meeting_RegisterMeetingReactionReceivedHandler),"meeting.meetingReactionReceived",e)},function(e){e.setOptions=function(e){Ne(ve,D.sidePanel),e.contentUrl&&new URL(e.contentUrl),hn(o(ji,s.Meeting_AppShareButton_SetOptions),"meeting.appShareButton.setOptions",[e])}}(l=e.appShareButton||(e.appShareButton={})),e.requestAppAudioHandling=function(e,t){if(!t)throw new Error("[requestAppAudioHandling] Callback response cannot be null");if(!e.micMuteStateChangedCallback)throw new Error("[requestAppAudioHandling] Callback Mic mute state handler cannot be null");Ne(ve,D.sidePanel,D.meetingStage),e.isAppHandlingAudio?c(e,t):d(e,t)},e.updateMicState=function(e){u(e,t.AppInitiated)}}($i||($i={}));const Ji=a.V_1,Ki=a.V_2;var Qi;!function(e){function t(){return!(!Ne(ve)||!ve.supports.monetization)}e.openPurchaseExperience=function(e,n){let i,r,a="";return"function"==typeof e?(i=e,r=n,a=o(Ji,s.Monetization_OpenPurchaseExperience)):(r=e,a=o(Ki,s.Monetization_OpenPurchaseExperience)),Ne(ve,D.content),te((()=>new Promise((e=>{if(!t())throw G;e(un(a,"monetization.openPurchaseExperience",r))}))),i)},e.isSupported=t}(Qi||(Qi={}));const Zi=a.V_2;var Xi;!function(e){function t(){return!(!Ne(ve)||!ve.supports.calendar)}e.openCalendarItem=function(e){return new Promise((n=>{if(Ne(ve,D.content),!t())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openCalendarItem");n(ln(o(Zi,s.Calendar_OpenCalendarItem),"calendar.openCalendarItem",e))}))},e.composeMeeting=function(e){return new Promise((n=>{if(Ne(ve,D.content),!t())throw new Error("Not supported");ve.isLegacyTeams?n(cn("executeDeepLink",ui(e.attendees,e.startTime,e.endTime,e.subject,e.content))):n(ln(o(Zi,s.Calendar_ComposeMeeting),"calendar.composeMeeting",e))}))},e.isSupported=t}(Xi||(Xi={}));const Yi=a.V_2;var eo,to;!function(e){function t(){return!(!Ne(ve)||!ve.supports.mail)}let n;e.openMailItem=function(e){return new Promise((n=>{if(Ne(ve,D.content),!t())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openMailItem");n(ln(o(Yi,s.Mail_OpenMailItem),"mail.openMailItem",e))}))},e.composeMail=function(e){return new Promise((n=>{if(Ne(ve,D.content),!t())throw new Error("Not supported");n(ln(o(Yi,s.Mail_ComposeMail),"mail.composeMail",e))}))},e.isSupported=t,function(e){e.New="new",e.Reply="reply",e.ReplyAll="replyAll",e.Forward="forward"}(n=e.ComposeMailType||(e.ComposeMailType={}))}(eo||(eo={})),function(e){function t(){le().print()}function n(e,t){!Be(e)&&Ne(ve),!Be(e)&&t&&t(),Wt(e)}function i(e,t){!Be(e)&&Ne(ve),!Be(e)&&t&&t(),zt(e)}function o(){return!(!Ne(ve)||!ve.supports.teamsCore)}e.enablePrintCapability=function(){if(!y.printCapabilityEnabled){if(Ne(ve),!o())throw G;y.printCapabilityEnabled=!0,document.addEventListener("keydown",(e=>{(e.ctrlKey||e.metaKey)&&80===e.keyCode&&(t(),e.cancelBubble=!0,e.preventDefault(),e.stopImmediatePropagation())}))}},e.print=t,e.registerOnLoadHandler=function(e){n(e,(()=>{if(!Be(e)&&!o())throw G}))},e.registerOnLoadHandlerHelper=n,e.registerBeforeUnloadHandler=function(e){i(e,(()=>{if(!Be(e)&&!o())throw G}))},e.registerBeforeUnloadHandlerHelper=i,e.isSupported=o}(to||(to={}));const no=a.V_1,io=a.V_2;var oo;function ro(e){return e?e.modality&&"string"!=typeof e.modality?[!1,"modality must be a string"]:e.targetElementBoundingRect&&"object"==typeof e.targetElementBoundingRect?e.triggerType&&"string"==typeof e.triggerType?ao(e.persona):[!1,"triggerType must be a valid string"]:[!1,"targetElementBoundingRect must be a DOMRect"]:[!1,"A request object is required"]}function ao(e){return e?e.displayName&&"string"!=typeof e.displayName?[!1,"displayName must be a string"]:e.identifiers&&"object"==typeof e.identifiers?e.identifiers.AadObjectId||e.identifiers.Smtp||e.identifiers.Upn?e.identifiers.AadObjectId&&"string"!=typeof e.identifiers.AadObjectId?[!1,"AadObjectId identifier must be a string"]:e.identifiers.Smtp&&"string"!=typeof e.identifiers.Smtp?[!1,"Smtp identifier must be a string"]:e.identifiers.Upn&&"string"!=typeof e.identifiers.Upn?[!1,"Upn identifier must be a string"]:[!0,void 0]:[!1,"at least one valid identifier must be provided"]:[!1,"persona identifiers object must be provided"]:[!1,"persona object must be provided"]}!function(e){function t(e,t){return new Promise((i=>{if(!De("2.0.0"))throw{errorCode:O.OLD_PLATFORM};if(!Ti(t))throw{errorCode:O.INVALID_ARGUMENTS};if(!n())throw G;i(un(e,"people.selectPeople",t))}))}function n(){return!(!Ne(ve)||!ve.supports.people)}e.selectPeople=function(e,n){let i,r;Ne(ve,D.content,D.task,D.settings);let a="";return"function"==typeof e?([i,r]=[e,n],a=o(no,s.People_SelectPeople)):(r=e,a=o(io,s.People_SelectPeople)),Y(t,i,a,r)},e.isSupported=n}(oo||(oo={}));const so=a.V_2;var lo;!function(e){e.showProfile=function(e){return Ne(ve,D.content),new Promise((t=>{const[n,i]=ro(e);if(!n)throw{errorCode:O.INVALID_ARGUMENTS,message:i};const r={modality:e.modality,persona:e.persona,triggerType:e.triggerType,targetRectangle:{x:e.targetElementBoundingRect.x,y:e.targetElementBoundingRect.y,width:e.targetElementBoundingRect.width,height:e.targetElementBoundingRect.height}};t(un(o(so,s.Profile_ShowProfile),"profile.showProfile",r))}))},e.isSupported=function(){return!(!Ne(ve)||!ve.supports.profile)}}(lo||(lo={}));var co,uo=function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,r){function a(e){try{l(i.next(e))}catch(e){r(e)}}function s(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){e.done?n(e.value):o(e.value).then(a,s)}l((i=i.apply(e,t||[])).next())}))};function fo(e,t,n,i){var o,r;return uo(this,void 0,void 0,(function*(){const a=mo();!ce()&&(null===(r=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===r||r.registerTextureStream(e,a)),ho(yield go(e,n,i),new Co(n,t),a.writable)}))}function po(e,t,n,i){var o,r;return uo(this,void 0,void 0,(function*(){const a=mo();!ce()&&(null===(r=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===r||r.registerTextureStream(e,a)),ho(yield go(e,n,i),new So(n,t),a.writable)}))}function go(e,t,n){return uo(this,void 0,void 0,(function*(){if(ce())throw G;const i=le().chrome;try{null==n||n.reportGettingTextureStream(e);const t=(yield i.webview.getTextureStream(e)).getVideoTracks();if(0===t.length)throw new Error(`No video track in stream ${e}`);return null==n||n.reportTextureStreamAcquired(),t[0]}catch(n){throw t(`Failed to get video track from stream ${e}, error: ${n}`),new Error(`Internal error: can't get video track from stream ${e}`)}}))}function mo(){if(ce())throw G;const e=window.MediaStreamTrackGenerator;if(!e)throw G;return new e({kind:"video"})}function ho(e,t,n){new(0,le().MediaStreamTrackProcessor)({track:e}).readable.pipeThrough(new TransformStream(t)).pipeTo(n)}!function(e){e.TimestampIsNull="timestamp of the original video frame is null",e.UnsupportedVideoFramePixelFormat="Unsupported video frame pixel format"}(co||(co={}));class Co{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.transform=(e,t)=>uo(this,void 0,void 0,(function*(){const n=e.timestamp;if(null!==n)try{const i=yield this.videoFrameHandler({videoFrame:e}),o=new VideoFrame(i,{timestamp:n});t.enqueue(o),e.close(),i.close()}catch(t){e.close(),this.notifyError(t)}else this.notifyError(co.TimestampIsNull)}))}}class vo{constructor(e,t){if(this.headerBuffer=e,this.notifyError=t,this.ONE_TEXTURE_INPUT_ID=1869900081,this.INVALID_HEADER_ERROR="Invalid video frame header",this.UNSUPPORTED_LAYOUT_ERROR="Unsupported texture layout",this.headerDataView=new Uint32Array(e),this.headerDataView.length<8)throw this.notifyError(this.INVALID_HEADER_ERROR),new Error(this.INVALID_HEADER_ERROR);if(this.headerDataView[0]!==this.ONE_TEXTURE_INPUT_ID)throw this.notifyError(this.UNSUPPORTED_LAYOUT_ERROR),new Error(this.UNSUPPORTED_LAYOUT_ERROR)}get oneTextureLayoutId(){return this.headerDataView[0]}get version(){return this.headerDataView[1]}get frameRowOffset(){return this.headerDataView[2]}get frameFormat(){return this.headerDataView[3]}get frameWidth(){return this.headerDataView[4]}get frameHeight(){return this.headerDataView[5]}get multiStreamHeaderRowOffset(){return this.headerDataView[6]}get multiStreamCount(){return this.headerDataView[7]}}class wo{constructor(e,t){this.metadataMap=new Map,this.AUDIO_INFERENCE_RESULT_STREAM_ID=828664161;const n=new Uint32Array(e);for(let i=0,o=0;i<t;i++){const t=n[o++],i=n[o++],r=n[o++],a=new Uint8Array(e,i,r);this.metadataMap.set(t,a)}}get audioInferenceResult(){return this.metadataMap.get(this.AUDIO_INFERENCE_RESULT_STREAM_ID)}}class So{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.shouldDiscardAudioInferenceResult=!1,this.transform=(e,t)=>uo(this,void 0,void 0,(function*(){const n=e.timestamp;if(null!==n)try{const{videoFrame:i,metadata:{audioInferenceResult:o}={}}=yield this.extractVideoFrameAndMetadata(e),r=yield this.videoFrameHandler({videoFrame:i,audioInferenceResult:o}),a=new VideoFrame(r,{timestamp:n});t.enqueue(a),i.close(),e.close(),r.close()}catch(t){e.close(),this.notifyError(t)}else this.notifyError(co.TimestampIsNull)})),this.extractVideoFrameAndMetadata=e=>uo(this,void 0,void 0,(function*(){if(ce())throw G;if("NV12"!==e.format)throw this.notifyError(co.UnsupportedVideoFramePixelFormat),new Error(co.UnsupportedVideoFramePixelFormat);const t={x:0,y:0,width:e.codedWidth,height:2},n=new ArrayBuffer(t.width*t.height*3/2);yield e.copyTo(n,{rect:t});const i=new vo(n,this.notifyError),o={x:0,y:i.multiStreamHeaderRowOffset,width:e.codedWidth,height:e.codedHeight-i.multiStreamHeaderRowOffset},r=new ArrayBuffer(o.width*o.height*3/2);yield e.copyTo(r,{rect:o});const a=new wo(r,i.multiStreamCount);return{videoFrame:new VideoFrame(e,{timestamp:e.timestamp,visibleRect:{x:0,y:i.frameRowOffset,width:i.frameWidth,height:i.frameHeight}}),metadata:{audioInferenceResult:this.shouldDiscardAudioInferenceResult?void 0:a.audioInferenceResult}}})),Nt("video.mediaStream.audioInferenceDiscardStatusChange",(({discardAudioInferenceResult:e})=>{this.shouldDiscardAudioInferenceResult=e}))}}function yo(e,t){return(n,i)=>{null==t||t.reportApplyingVideoEffect(n||"",i),e(n,i).then((()=>{null==t||t.reportVideoEffectChanged(n||"",i),Cn("video.videoEffectReadiness",[!0,n,void 0,i])})).catch((e=>{const t=e in Fo.EffectFailureReason?e:Fo.EffectFailureReason.InitializationFailure;Cn("video.videoEffectReadiness",[!1,n,t,i])}))}}class Po{static setTimeout(e,t){const n=performance.now(),i=Z();return Po.setTimeoutCallbacks[i]={callback:e,timeoutInMs:t,startedAtInMs:n},i}static clearTimeout(e){delete Po.setTimeoutCallbacks[e]}static setInterval(e,t){Po.setTimeout((function n(){e(),Po.setTimeout(n,t)}),t)}static tick(){const e=performance.now(),t=[];for(const n in Po.setTimeoutCallbacks){const i=Po.setTimeoutCallbacks[n];e-i.startedAtInMs>=i.timeoutInMs&&t.push(n)}for(const e of t){Po.setTimeoutCallbacks[e].callback(),delete Po.setTimeoutCallbacks[e]}}}Po.setTimeoutCallbacks={};class bo{constructor(e,t){this.reportStatisticsResult=t,this.sampleCount=0,this.distributionBins=new Uint32Array(e)}processStarts(e,t,n,i){Po.tick(),this.suitableForThisSession(e,t,n,i)||this.reportAndResetSession(this.getStatistics(),e,i,t,n),this.start()}processEnds(){const e=performance.now()-this.frameProcessingStartedAt,t=Math.floor(Math.max(0,Math.min(this.distributionBins.length-1,e)));this.distributionBins[t]+=1,this.sampleCount+=1}getStatistics(){return this.currentSession?{effectId:this.currentSession.effectId,effectParam:this.currentSession.effectParam,frameHeight:this.currentSession.frameHeight,frameWidth:this.currentSession.frameWidth,duration:performance.now()-this.currentSession.startedAtInMs,sampleCount:this.sampleCount,distributionBins:this.distributionBins.slice()}:null}start(){this.frameProcessingStartedAt=performance.now()}suitableForThisSession(e,t,n,i){return this.currentSession&&this.currentSession.effectId===e&&this.currentSession.effectParam===i&&this.currentSession.frameWidth===t&&this.currentSession.frameHeight===n}reportAndResetSession(e,t,n,i,o){e&&this.reportStatisticsResult(e),this.resetCurrentSession(this.getNextTimeout(t,this.currentSession),t,n,i,o),this.timeoutId&&Po.clearTimeout(this.timeoutId),this.timeoutId=Po.setTimeout((()=>this.reportAndResetSession(this.getStatistics(),t,n,i,o)).bind(this),this.currentSession.timeoutInMs)}resetCurrentSession(e,t,n,i,o){this.currentSession={startedAtInMs:performance.now(),timeoutInMs:e,effectId:t,effectParam:n,frameWidth:i,frameHeight:o},this.sampleCount=0,this.distributionBins.fill(0)}getNextTimeout(e,t){return t&&t.effectId===e?Math.min(bo.maxSessionTimeoutInMs,2*t.timeoutInMs):bo.initialSessionTimeoutInMs}}bo.initialSessionTimeoutInMs=1e3,bo.maxSessionTimeoutInMs=3e4;const _o=a.V_2;class Eo{constructor(e){this.reportPerformanceEvent=e,this.isFirstFrameProcessed=!1,this.frameProcessTimeLimit=100,this.frameProcessingStartedAt=0,this.frameProcessingTimeCost=0,this.processedFrameCount=0,this.performanceStatistics=new bo(Eo.distributionBinSize,(e=>this.reportPerformanceEvent(o(_o,s.VideoPerformanceMonitor_Constructor),"video.performance.performanceDataGenerated",[e])))}startMonitorSlowFrameProcessing(){Po.setInterval((()=>{if(0===this.processedFrameCount)return;const e=this.frameProcessingTimeCost/this.processedFrameCount;e>this.frameProcessTimeLimit&&this.reportPerformanceEvent(o(_o,s.VideoPerformanceMonitor_StartMonitorSlowFrameProcessing),"video.performance.frameProcessingSlow",[e]),this.frameProcessingTimeCost=0,this.processedFrameCount=0}),Eo.calculateFPSInterval)}setFrameProcessTimeLimit(e){this.frameProcessTimeLimit=e}reportApplyingVideoEffect(e,t){var n,i;(null===(n=this.applyingEffect)||void 0===n?void 0:n.effectId)===e&&(null===(i=this.applyingEffect)||void 0===i?void 0:i.effectParam)===t||(this.applyingEffect={effectId:e,effectParam:t},this.appliedEffect=void 0)}reportVideoEffectChanged(e,t){void 0===this.applyingEffect||this.applyingEffect.effectId!==e&&this.applyingEffect.effectParam!==t||(this.appliedEffect={effectId:e,effectParam:t},this.applyingEffect=void 0,this.isFirstFrameProcessed=!1)}reportStartFrameProcessing(e,t){Po.tick(),this.appliedEffect&&(this.frameProcessingStartedAt=performance.now(),this.performanceStatistics.processStarts(this.appliedEffect.effectId,e,t,this.appliedEffect.effectParam))}reportFrameProcessed(){var e;this.appliedEffect&&(this.processedFrameCount++,this.frameProcessingTimeCost+=performance.now()-this.frameProcessingStartedAt,this.performanceStatistics.processEnds(),this.isFirstFrameProcessed||(this.isFirstFrameProcessed=!0,this.reportPerformanceEvent(o(_o,s.VideoPerformanceMonitor_ReportFrameProcessed),"video.performance.firstFrameProcessed",[Date.now(),this.appliedEffect.effectId,null===(e=this.appliedEffect)||void 0===e?void 0:e.effectParam])))}reportGettingTextureStream(e){this.gettingTextureStreamStartedAt=performance.now(),this.currentStreamId=e}reportTextureStreamAcquired(){if(void 0!==this.gettingTextureStreamStartedAt){const e=performance.now()-this.gettingTextureStreamStartedAt;this.reportPerformanceEvent(o(_o,s.VideoPerformanceMonitor_ReportTextureStreamAcquired),"video.performance.textureStreamAcquired",[this.currentStreamId,e])}}}Eo.distributionBinSize=1e3,Eo.calculateFPSInterval=1e3;var Io=function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,r){function a(e){try{l(i.next(e))}catch(e){r(e)}}function s(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){e.done?n(e.value):o(e.value).then(a,s)}l((i=i.apply(e,t||[])).next())}))},Ro=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]])}return n};const To=a.V_2;var Fo;!function(e){const t=ce()?void 0:new Eo(hn);let n,i,r;function a(e){hn(o(To,s.VideoEffects_NotifyVideoFrameProcessed),"video.videoFrameProcessed",[e])}function l(e){hn(o(To,s.VideoEffects_NotifyError),"video.notifyError",[e])}function c(){return Ne(ve)&&!!ve.supports.video&&(!!ve.supports.video.mediaStream||!!ve.supports.video.sharedFrame)}function d(e,n){if(Ne(ve,D.sidePanel),!c()||!g())throw G;Vt(o(To,s.VideoEffects_RegisterStartVideoExtensibilityVideoStreamHandler),"video.startVideoExtensibilityVideoStream",(n=>Io(this,void 0,void 0,(function*(){const{streamId:i}=n,o=u(e,t);yield fo(i,o,l,t)}))),!1),hn(o(To,s.VideoEffects_MediaStream_RegisterForVideoFrame),"video.mediaStream.registerForVideoFrame",[n])}function u(e,t){return n=>Io(this,void 0,void 0,(function*(){const i=n.videoFrame;null==t||t.reportStartFrameProcessing(i.codedWidth,i.codedHeight);const o=yield e(n);return null==t||t.reportFrameProcessed(),o}))}function f(e,n){if(Ne(ve,D.sidePanel),!c()||!h())throw G;Vt(o(To,s.VideoEffects_RegisterForVideoBufferHandler),"video.newVideoFrame",(n=>{if(n){const i=n.timestamp;null==t||t.reportStartFrameProcessing(n.width,n.height),e(p(n),(()=>{null==t||t.reportFrameProcessed(),a(i)}),l)}}),!1),hn(o(To,s.VideoEffects_RegisterForVideoFrame),"video.registerForVideoFrame",[n])}function p(e){if("videoFrameBuffer"in e)return e;{const{data:t}=e,n=Ro(e,["data"]);return Object.assign(Object.assign({},n),{videoFrameBuffer:t})}}function g(){var e;return Ne(ve,D.sidePanel)&&m()&&!!(null===(e=ve.supports.video)||void 0===e?void 0:e.mediaStream)}function m(){var e,t,n,i;return!(!(null===(t=null===(e=le().chrome)||void 0===e?void 0:e.webview)||void 0===t?void 0:t.getTextureStream)||!(null===(i=null===(n=le().chrome)||void 0===n?void 0:n.webview)||void 0===i?void 0:i.registerTextureStream))}function h(){var e;return Ne(ve,D.sidePanel)&&!!(null===(e=ve.supports.video)||void 0===e?void 0:e.sharedFrame)}!function(e){e.NV12="NV12"}(n=e.VideoFrameFormat||(e.VideoFrameFormat={})),function(e){e.EffectChanged="EffectChanged",e.EffectDisabled="EffectDisabled"}(i=e.EffectChangeType||(e.EffectChangeType={})),function(e){e.InvalidEffectId="InvalidEffectId",e.InitializationFailure="InitializationFailure"}(r=e.EffectFailureReason||(e.EffectFailureReason={})),e.registerForVideoFrame=function(e){if(Ne(ve,D.sidePanel),!c())throw G;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(Vt(o(To,s.VideoEffects_RegisterSetFrameProcessTimeLimitHandler),"video.setFrameProcessTimeLimit",(e=>null==t?void 0:t.setFrameProcessTimeLimit(e.timeLimit)),!1),g())d(e.videoFrameHandler,e.config);else{if(!h())throw G;f(e.videoBufferHandler,e.config)}null==t||t.startMonitorSlowFrameProcessing()},e.notifySelectedVideoEffectChanged=function(e,t){if(Ne(ve,D.sidePanel),!c())throw G;hn(o(To,s.VideoEffects_NotifySelectedVideoEffectChanged),"video.videoEffectChanged",[e,t])},e.registerForVideoEffect=function(e){if(Ne(ve,D.sidePanel),!c())throw G;Vt(o(To,s.VideoEffects_RegisterEffectParameterChangeHandler),"video.effectParameterChange",yo(e,t),!1),hn(o(To,s.VideoEffects_RegisterForVideoEffect),"video.registerForVideoEffect")},e.isSupported=c}(Fo||(Fo={}));const Ao=a.V_2;var Mo;!function(e){const t="search.queryChange",n="search.queryClose",i="search.queryExecute";function r(){return!(!Ne(ve)||!ve.supports.search)}e.registerHandlers=function(e,a,l){if(Ne(ve,D.content),!r())throw G;Vt(o(Ao,s.Search_RegisterOnClosedHandler),n,e),Vt(o(Ao,s.Search_RegisterOnExecutedHandler),i,a),l&&Vt(o(Ao,s.Search_RegisterOnChangeHandler),t,l)},e.unregisterHandlers=function(){if(Ne(ve,D.content),!r())throw G;hn(o(Ao,s.Search_UnregisterHandlers),"search.unregister"),Dt(t),Dt(n),Dt(i)},e.isSupported=r,e.closeSearch=function(){return new Promise((e=>{if(Ne(ve,D.content),!r())throw new Error("Not supported");e(ln(o(Ao,s.Search_CloseSearch),"search.closeSearch"))}))}}(Mo||(Mo={}));a.V_1,a.V_2;var Oo;!function(e){function t(t){return new Promise((n=>{if(!r())throw G;n(fn(e.SharingAPIMessages.shareWebContent,t))}))}function n(e){if(!(e&&e.content&&e.content.length)){throw{errorCode:O.INVALID_ARGUMENTS,message:"Shared content is missing"}}}function i(e){let t;if(e.content.some((e=>!e.type)))throw t={errorCode:O.INVALID_ARGUMENTS,message:"Shared content type cannot be undefined"},t;if(e.content.some((t=>t.type!==e.content[0].type)))throw t={errorCode:O.INVALID_ARGUMENTS,message:"Shared content must be of the same type"},t}function o(e){let t;if("URL"!==e.content[0].type)throw t={errorCode:O.INVALID_ARGUMENTS,message:"Content type is unsupported"},t;if(e.content.some((e=>!e.url)))throw t={errorCode:O.INVALID_ARGUMENTS,message:"URLs are required for URL content types"},t}function r(){return!(!Ne(ve)||!ve.supports.sharing)}e.SharingAPIMessages={shareWebContent:"sharing.shareWebContent"},e.shareWebContent=function(e,r){try{n(e),i(e),o(e)}catch(e){return ee((()=>Promise.reject(e)),r)}return Ne(ve,D.content,D.sidePanel,D.task,D.stage,D.meetingStage),ee(t,r,e)},e.isSupported=r}(Oo||(Oo={}));const ko=a.V_2;var Ho;!function(e){let t;function n(){return!(!Ne(ve)||!ve.supports.stageView)}!function(e){e.modal="modal",e.popout="popout",e.popoutWithChat="popoutWithChat"}(t=e.StageViewOpenMode||(e.StageViewOpenMode={})),e.open=function(e){return new Promise((t=>{if(Ne(ve,D.content),!n())throw G;if(!e)throw new Error("[stageView.open] Stage view params cannot be null");t(un(o(ko,s.StageView_Open),"stageView.open",e))}))},e.isSupported=n}(Ho||(Ho={}));var Vo=function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,r){function a(e){try{l(i.next(e))}catch(e){r(e)}}function s(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){e.done?n(e.value):o(e.value).then(a,s)}l((i=i.apply(e,t||[])).next())}))};const No=a.V_2;var Do,Lo;!function(e){let t,n,i;!function(e){e[e.FrontOrRear=1]="FrontOrRear",e[e.FrontOnly=2]="FrontOnly",e[e.RearOnly=3]="RearOnly"}(t=e.CameraRestriction||(e.CameraRestriction={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(n=e.Source||(e.Source={})),e.hasPermission=function(){if(Ne(ve,D.content,D.task),!i.isSupported())throw G;const e=k.Media;return un(o(No,s.VisualMedia_HasPermission),"permissions.has",e)},e.requestPermission=function(){if(Ne(ve,D.content,D.task),!i.isSupported())throw G;const e=k.Media;return un(o(No,s.VisualMedia_RequestPermission),"permissions.request",e)},function(e){function t(){return!!(Ne(ve)&&ve.supports.visualMedia&&ve.supports.visualMedia.image&&ve.supports.permissions)}function n(){if(!t())throw G}function i(e){if(!e||e.maxVisualMediaCount>10||e.maxVisualMediaCount<1)throw $}function r(e,t){if(t.length>e)throw J}e.captureImages=function(e){return Vo(this,void 0,void 0,(function*(){Ne(ve,D.content,D.task),n(),i(e);const t=yield un(o(No,s.VisualMedia_Image_CaptureImages),"visualMedia.image.captureImages",e);return r(e.maxVisualMediaCount,t),t}))},e.retrieveImages=function(e){return Vo(this,void 0,void 0,(function*(){Ne(ve,D.content,D.task),n(),i(e);const t=yield un(o(No,s.VisualMedia_Image_RetrieveImages),"visualMedia.image.retrieveImages",e);return r(e.maxVisualMediaCount,t),t}))},e.isSupported=t}(i=e.image||(e.image={}))}(Do||(Do={})),function(e){function t(){return!(!Ne(ve)||!ve.supports.webStorage)}e.isWebStorageClearedOnUserLogOut=function(){return Ne(ve),t()},e.isSupported=t}(Lo||(Lo={}));const Uo=a.V_2;var xo,Bo;!function(e){let t;function n(){return!(!Ne(ve)||!ve.supports.call)}!function(e){e.Unknown="unknown",e.Audio="audio",e.Video="video",e.VideoBasedScreenSharing="videoBasedScreenSharing",e.Data="data"}(t=e.CallModalities||(e.CallModalities={})),e.startCall=function(e){const i=o(Uo,s.Call_StartCall);return new Promise((o=>{var r;if(Ne(ve,D.content,D.task),!n())throw G;if(!ve.isLegacyTeams)return hn(i,"call.startCall",[e],o);o(sn(i,"executeDeepLink",di(e.targets,null===(r=e.requestedModalities)||void 0===r?void 0:r.includes(t.Video),e.source)).then((e=>{if(!e)throw new Error("The call was not properly started");return e})))}))},e.isSupported=n}(xo||(xo={})),function(e){e.Messages=gt.Messages,e.FailedReason=gt.FailedReason,e.ExpectedFailureReason=gt.ExpectedFailureReason,e.notifyAppLoaded=function(){gt.notifyAppLoaded()},e.notifySuccess=function(){gt.notifySuccess()},e.notifyFailure=function(e){gt.notifyFailure(e)},e.notifyExpectedFailure=function(e){gt.notifyExpectedFailure(e)}}(Bo||(Bo={}));const Wo=t("thirdPartyCloudStorage");var Go;!function(e){class t{constructor(e,t){this.fileType=e,this.assembleAttachment=t}}let n=[],i=null,o=!0,r=null;function a(e){if(r)if(e&&e.error)r([],e.error),r=null;else if(e&&e.fileChunk)try{o||0!==e.fileChunk.chunkSequence||(Wo("Last chunk is not received or 'endOfFile' value for previous chunk was not set to true"),o=!0,r([],{errorCode:O.INTERNAL_ERROR,message:"error occurred while receiving data"}),n=[],r=null);const a=vi(e.fileChunk,e.fileType);if(a?(i||(i=new t(e.fileType,[])),i.assembleAttachment.push(a)):(Wo(`Received a null assemble attachment for when decoding chunk sequence ${e.fileChunk.chunkSequence}; not including the chunk in the assembled file.`),r?r([],{errorCode:O.INTERNAL_ERROR,message:"error occurred while receiving data"}):r=null,n=[],r=null,o=!0),o=e.fileChunk.endOfFile,e.fileChunk.endOfFile&&i){const t=Ci(i.assembleAttachment,i.fileType);if(t){const i=new File([t],e.fileName,{type:t.type});n.push(i)}e.isLastFile&&r&&(r(n,e.error),n=[],r=null,o=!0),i=null}}catch(e){r&&(r([],{errorCode:O.INTERNAL_ERROR,message:e}),n=[],r=null,o=!0)}else r([],{errorCode:O.INTERNAL_ERROR,message:"data received is null"}),n=[],r=null,o=!0}function s(){return!(!Ne(ve)||!ve.supports.thirdPartyCloudStorage)}e.getDragAndDropFiles=function(e,t){if(!t)throw new Error("[getDragAndDropFiles] Callback cannot be null");if(e&&""!==e){if(Ne(ve,D.content,D.task),!s())throw G;if(r)throw r=null,new Error("getDragAndDropFiles cannot be called twice");r=t,o=!0,Cn("thirdPartyCloudStorage.getDragAndDropFiles",[e],a)}else{t([],{errorCode:O.INVALID_ARGUMENTS})}},e.isSupported=s}(Go||(Go={}));const zo=a.V_1;function qo(e,t){ct(o(zo,s.PublicAPIs_Initialize),t).then((()=>{e&&e()}))}function jo(){to.enablePrintCapability()}function $o(){to.print()}function Jo(e){Ve(),hn(o(zo,s.PublicAPIs_GetContext),"getContext",(t=>{t.frameContext||(t.frameContext=y.frameContext),e(t)}))}function Ko(e){ft(o(zo,s.PublicAPIs_RegisterOnThemeChangeHandlerHelper),e)}function Qo(e){Ut(o(zo,s.PublicAPIs_RegisterFullScreenHandler),"fullScreenChange",e,[])}function Zo(e){Ut(o(zo,s.PublicAPIs_RegisterAppButtonClickHandler),"appButtonClick",e,[D.content])}function Xo(e){Ut(o(zo,s.PublicAPIs_RegisterAppButtonHoverEnterHandler),"appButtonHoverEnter",e,[D.content])}function Yo(e){Ut(o(zo,s.PublicAPIs_RegisterAppButtonHoverLeaveHandler),"appButtonHoverLeave",e,[D.content])}function er(e){Tt.backStack.registerBackButtonHandlerHelper(o(zo,s.PublicAPIs_RegisterBackButtonHandler),e)}function tr(e){to.registerOnLoadHandlerHelper(e)}function nr(e){to.registerBeforeUnloadHandlerHelper(e)}function ir(e){Ut(o(zo,s.PublicAPIs_RegisterFocusEnterHandler),"focusEnter",e,[])}function or(e){Ut(o(zo,s.PublicAPIs_RegisterChangeSettingsHandler),"changeSettings",e,[D.content])}function rr(e,t){Ne(ve),yt(o(zo,s.PublicAPIs_GetTabInstances),t).then((t=>{e(t)}))}function ar(e,t){Ne(ve),Pt(o(zo,s.PublicAPIs_GetMruTabInstances),t).then((t=>{e(t)}))}function sr(e){bt(o(zo,s.PublicAPIs_ShareDeepLink),{subPageId:e.subEntityId,subPageLabel:e.subEntityLabel,subPageWebUrl:e.subEntityWebUrl})}function lr(e,t){Ne(ve,D.content,D.sidePanel,D.settings,D.task,D.stage,D.meetingStage);const n=null!=t?t:K();pt(o(zo,s.PublicAPIs_ExecuteDeepLink),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function cr(e){_t(o(zo,s.PublicAPIs_SetFrameContext),e)}function dr(e,t,n){ct(o(zo,s.PublicAPIs_Initialize),n).then((()=>t&&t())),_t(o(zo,s.PublicAPIs_SetFrameContext),e)}const ur=a.V_1;function fr(e){St(o(ur,s.Navigation_ReturnFocus),e)}function pr(e,t){Ne(ve);const n=null!=t?t:K();wt(o(ur,s.Navigation_NavigateToTab),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function gr(e,t){Ne(ve,D.content,D.sidePanel,D.settings,D.remove,D.task,D.stage,D.meetingStage);const n=null!=t?t:K();Ct(o(ur,s.Navigation_NavigateCrossDomain),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function mr(e){Ne(ve);const t=null!=e?e:K();vt(o(ur,s.Navigation_NavigateBack)).then((()=>{t(!0)})).catch((e=>{t(!1,e.message)}))}const hr=a.V_1;var Cr;!function(e){e.setValidityState=function(e){Et(o(hr,s.Settings_SetValidityState),e)},e.getSettings=function(e){Ne(ve,D.content,D.settings,D.remove,D.sidePanel),It(o(hr,s.Settings_GetSettings)).then((t=>{e(t)}))},e.setSettings=function(e,t){Ne(ve,D.content,D.settings,D.sidePanel);const n=null!=t?t:K();Rt(o(hr,s.Settings_SetSettings),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))},e.registerOnSaveHandler=function(e){Tt.config.registerOnSaveHandlerHelper(o(hr,s.Settings_RegisterOnSaveHandler),e)},e.registerOnRemoveHandler=function(e){Tt.config.registerOnRemoveHandlerHelper(o(hr,s.Settings_RegisterOnRemoveHandler),e)}}(Cr||(Cr={}));var vr=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]])}return n};const wr=a.V_1;var Sr;!function(e){function t(e){if(void 0===e.url)throw new Error("url property of taskInfo object can't be undefined");return{url:e.url,size:{height:e.height?e.height:W.Small,width:e.width?e.width:W.Small},title:e.title,fallbackUrl:e.fallbackUrl}}function n(e){if(void 0===e.url||void 0===e.completionBotId)throw new Error(`Both url ${e.url} and completionBotId ${e.completionBotId} are required for bot url dialog. At least one is undefined.`);return{url:e.url,size:{height:e.height?e.height:W.Small,width:e.width?e.width:W.Small},title:e.title,fallbackUrl:e.fallbackUrl,completionBotId:e.completionBotId}}function i(e){return e.height=e.height?e.height:W.Small,e.width=e.width?e.width:W.Small,e}e.startTask=function(e,i){const r=o(wr,s.Tasks_StartTask),a=i?e=>{var t,n;return i(null!==(t=e.err)&&void 0!==t?t:"",null!==(n=e.result)&&void 0!==n?n:"")}:void 0;return void 0===e.card&&void 0===e.url||e.card?(Ne(ve,D.content,D.sidePanel,D.meetingStage),hn(r,"tasks.startTask",[e],i)):void 0!==e.completionBotId?tt(r,n(e),a):et(r,t(e),a),new Ui},e.updateTask=function(e){e=i(e);const{width:t,height:n}=e,r=vr(e,["width","height"]);if(Object.keys(r).length)throw new Error("resize requires a TaskInfo argument containing only width and height");Ye(o(wr,s.Tasks_UpdateTask),e)},e.submitTask=function(e,t){nt(o(wr,s.Tasks_SubmitTask),e,t)},e.getDefaultSizeIfNotProvided=i}(Sr||(Sr={}));const yr=a.V_2;var Pr;!function(e){let t,n;!function(e){e.guest="Guest",e.attendee="Attendee",e.presenter="Presenter",e.organizer="Organizer"}(t=e.UserMeetingRole||(e.UserMeetingRole={})),function(e){e.added="Added",e.alreadyExists="AlreadyExists",e.conflict="Conflict",e.notFound="NotFound"}(n=e.ContainerState||(e.ContainerState={})),e.isSupported=function(){return!(!Ne(ve,D.meetingStage,D.sidePanel)||!ve.supports.interactive)}}(Pr||(Pr={}));class br{getFluidTenantInfo(){return _r(),new Promise((e=>{e(un(o(yr,s.Interactive_GetFluidTenantInfo),"interactive.getFluidTenantInfo"))}))}getFluidToken(e){return _r(),new Promise((t=>{t(un(o(yr,s.Interactive_GetFluidToken),"interactive.getFluidToken",e))}))}getFluidContainerId(){return _r(),new Promise((e=>{e(un(o(yr,s.Interactive_GetFluidContainerId),"interactive.getFluidContainerId"))}))}setFluidContainerId(e){return _r(),new Promise((t=>{t(un(o(yr,s.Interactive_SetFluidContainerId),"interactive.setFluidContainerId",e))}))}getNtpTime(){return _r(),new Promise((e=>{e(un(o(yr,s.Interactive_GetNtpTime),"interactive.getNtpTime"))}))}registerClientId(e){return _r(),new Promise((t=>{t(un(o(yr,s.Interactive_RegisterClientId),"interactive.registerClientId",e))}))}getClientRoles(e){return _r(),new Promise((t=>{t(un(o(yr,s.Interactive_GetClientRoles),"interactive.getClientRoles",e))}))}getClientInfo(e){return _r(),new Promise((t=>{t(un(o(yr,s.Interactive_GetClientInfo),"interactive.getClientInfo",e))}))}static create(){return _r(),new br}}function _r(){if(!Pr.isSupported())throw new Error("LiveShareHost Not supported")}const Er=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;const Ir=function(e){return"string"==typeof e&&Er.test(e)};var Rr=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]])}return n};function Tr(e){try{return e.cartItems=Fr(e.cartItems),e}catch(e){throw new Error("Error deserializing cart")}}function Fr(e){return e.map((e=>{if(e.imageURL){const t=new URL(e.imageURL);e.imageURL=t}return e.accessories&&(e.accessories=Fr(e.accessories)),e}))}const Ar=e=>{try{return e.map((e=>{const{imageURL:t,accessories:n}=e,i=Rr(e,["imageURL","accessories"]),o=Object.assign({},i);return t&&(o.imageURL=t.href),n&&(o.accessories=Ar(n)),o}))}catch(e){throw new Error("Error serializing cart items")}};function Mr(e){if(!Array.isArray(e)||0===e.length)throw new Error("cartItems must be a non-empty array");for(const t of e)kr(t),Or(t.accessories)}function Or(e){if(null!=e){if(!Array.isArray(e)||0===e.length)throw new Error("CartItem.accessories must be a non-empty array");for(const t of e){if(t.accessories)throw new Error("Item in CartItem.accessories cannot have accessories");kr(t)}}}function kr(e){if(!e.id)throw new Error("cartItem.id must not be empty");if(!e.name)throw new Error("cartItem.name must not be empty");Vr(e.price),Nr(e.quantity)}function Hr(e){if(null!=e){if(!e)throw new Error("id must not be empty");if(!1===Ir(e))throw new Error("id must be a valid UUID")}}function Vr(e){if("number"!=typeof e||e<0)throw new Error(`price ${e} must be a number not less than 0`);if(parseFloat(e.toFixed(3))!==e)throw new Error(`price ${e} must have at most 3 decimal places`)}function Nr(e){if("number"!=typeof e||e<=0||parseInt(e.toString())!==e)throw new Error(`quantity ${e} must be an integer greater than 0`)}function Dr(e){if(!Object.values(Ur.CartStatus).includes(e))throw new Error(`cartStatus ${e} is not valid`)}const Lr=a.V_2;var Ur,xr,Br;!function(e){let t,n;function i(){return!(!Ne(ve)||!ve.supports.marketplace)}e.cartVersion={majorVersion:1,minorVersion:1},function(e){e.TACAdminUser="TACAdminUser",e.TeamsAdminUser="TeamsAdminUser",e.TeamsEndUser="TeamsEndUser"}(t=e.Intent||(e.Intent={})),function(e){e.Open="Open",e.Processing="Processing",e.Processed="Processed",e.Closed="Closed",e.Error="Error"}(n=e.CartStatus||(e.CartStatus={})),e.getCart=function(){if(Ne(ve,D.content,D.task),!i())throw G;return un(o(Lr,s.Marketplace_GetCart),"marketplace.getCart",e.cartVersion).then(Tr)},e.addOrUpdateCartItems=function(t){if(Ne(ve,D.content,D.task),!i())throw G;if(!t)throw new Error("addOrUpdateCartItemsParams must be provided");return Hr(null==t?void 0:t.cartId),Mr(null==t?void 0:t.cartItems),un(o(Lr,s.Marketplace_AddOrUpdateCartItems),"marketplace.addOrUpdateCartItems",Object.assign(Object.assign({},t),{cartItems:Ar(t.cartItems),cartVersion:e.cartVersion})).then(Tr)},e.removeCartItems=function(t){if(Ne(ve,D.content,D.task),!i())throw G;if(!t)throw new Error("removeCartItemsParams must be provided");if(Hr(null==t?void 0:t.cartId),!Array.isArray(null==t?void 0:t.cartItemIds)||0===(null==t?void 0:t.cartItemIds.length))throw new Error("cartItemIds must be a non-empty array");return un(o(Lr,s.Marketplace_RemoveCardItems),"marketplace.removeCartItems",Object.assign(Object.assign({},t),{cartVersion:e.cartVersion})).then(Tr)},e.updateCartStatus=function(t){if(Ne(ve,D.content,D.task),!i())throw G;if(!t)throw new Error("updateCartStatusParams must be provided");return Hr(null==t?void 0:t.cartId),Dr(null==t?void 0:t.cartStatus),un(o(Lr,s.Marketplace_UpdateCartStatus),"marketplace.updateCartStatus",Object.assign(Object.assign({},t),{cartVersion:e.cartVersion})).then(Tr)},e.isSupported=i}(Ur||(Ur={})),function(e){const t="Action.Execute";let n,i,o;function r(e){if(e.requestType===n.ActionExecuteInvokeRequest){const n=e;if(n.type!==t){throw{errorCode:o.INTERNAL_ERROR,message:`Invalid action type ${n.type}. Action type must be "${t}"`}}}else if(e.requestType===n.QueryMessageExtensionRequest){if(e.commandId.length>64)throw new Error("originalRequestInfo.commandId exceeds the maximum size of 64 characters");if(e.parameters.length>5)throw new Error("originalRequestInfo.parameters exceeds the maximum size of 5");for(const t of e.parameters){if(t.name.length>64)throw new Error("originalRequestInfo.parameters.name exceeds the maximum size of 64 characters");if(t.value.length>512)throw new Error("originalRequestInfo.parameters.value exceeds the maximum size of 512 characters")}}}function a(){return!(!Ne(ve)||!ve.supports.externalAppAuthentication)}!function(e){e.ActionExecuteInvokeRequest="ActionExecuteInvokeRequest",e.QueryMessageExtensionRequest="QueryMessageExtensionRequest"}(n=e.OriginalRequestType||(e.OriginalRequestType={})),function(e){e.ActionExecuteInvokeResponse="ActionExecuteInvokeResponse",e.QueryMessageExtensionResponse="QueryMessageExtensionResponse"}(i=e.InvokeResponseType||(e.InvokeResponseType={})),function(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}(o=e.InvokeErrorCode||(e.InvokeErrorCode={})),e.authenticateAndResendRequest=function(e,t,n){if(Ne(ve,D.content),!a())throw G;return ue(e),r(n),gn("externalAppAuthentication.authenticateAndResendRequest",[e,n,t.url.href,t.width,t.height,t.isExternal]).then((([e,t])=>{if(e&&null!=t.responseType)return t;throw t}))},e.authenticateWithSSO=function(e,t){if(Ne(ve,D.content),!a())throw G;return ue(e),gn("externalAppAuthentication.authenticateWithSSO",[e,t.claims,t.silent]).then((([e,t])=>{if(!e)throw t}))},e.authenticateWithSSOAndResendRequest=function(e,t,n){if(Ne(ve,D.content),!a())throw G;return ue(e),r(n),gn("externalAppAuthentication.authenticateWithSSOAndResendRequest",[e,n,t.claims,t.silent]).then((([e,t])=>{if(e&&null!=t.responseType)return t;throw t}))},e.isSupported=a}(xr||(xr={})),function(e){let t,n,i;function o(){return!(!Ne(ve)||!ve.supports.externalAppCardActions)}!function(e){e.DeepLinkDialog="DeepLinkDialog",e.DeepLinkOther="DeepLinkOther",e.DeepLinkStageView="DeepLinkStageView",e.GenericUrl="GenericUrl"}(t=e.ActionOpenUrlType||(e.ActionOpenUrlType={})),function(e){e.INTERNAL_ERROR="INTERNAL_ERROR",e.INVALID_LINK="INVALID_LINK",e.NOT_SUPPORTED="NOT_SUPPORTED"}(n=e.ActionOpenUrlErrorCode||(e.ActionOpenUrlErrorCode={})),function(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}(i=e.ActionSubmitErrorCode||(e.ActionSubmitErrorCode={})),e.processActionSubmit=function(e,t){if(Ne(ve,D.content),!o())throw G;return ue(e),gn("externalAppCardActions.processActionSubmit",[e,t]).then((([e,t])=>{if(!e)throw t}))},e.processActionOpenUrl=function(e,t){if(Ne(ve,D.content),!o())throw G;return ue(e),gn("externalAppCardActions.processActionOpenUrl",[e,t.href]).then((([e,t])=>{if(e)throw e;return t}))},e.isSupported=o}(Br||(Br={}));const Wr=a.V_1;var Gr;!function(e){let t,n,i,r,a,l;function c(e,t){return{errorCode:e,message:t}}!function(e){e.Dropbox="DROPBOX",e.Box="BOX",e.Sharefile="SHAREFILE",e.GoogleDrive="GOOGLEDRIVE",e.Egnyte="EGNYTE",e.SharePoint="SharePoint"}(t=e.CloudStorageProvider||(e.CloudStorageProvider={})),function(e){e[e.Sharepoint=0]="Sharepoint",e[e.WopiIntegration=1]="WopiIntegration",e[e.Google=2]="Google",e[e.OneDrive=3]="OneDrive",e[e.Recent=4]="Recent",e[e.Aggregate=5]="Aggregate",e[e.FileSystem=6]="FileSystem",e[e.Search=7]="Search",e[e.AllFiles=8]="AllFiles",e[e.SharedWithMe=9]="SharedWithMe"}(n=e.CloudStorageProviderType||(e.CloudStorageProviderType={})),function(e){e.ClassMaterials="classMaterials"}(i=e.SpecialDocumentLibraryType||(e.SpecialDocumentLibraryType={})),function(e){e.Readonly="readonly"}(r=e.DocumentLibraryAccessType||(e.DocumentLibraryAccessType={})),function(e){e.Downloaded="Downloaded",e.Downloading="Downloading",e.Failed="Failed"}(a=e.FileDownloadStatus||(e.FileDownloadStatus={})),function(e){e.Download="DOWNLOAD",e.Upload="UPLOAD",e.Delete="DELETE"}(l=e.CloudStorageProviderFileAction||(e.CloudStorageProviderFileAction={})),e.getCloudStorageFolders=function(e,t){if(Ne(ve,D.content),!e||0===e.length)throw new Error("[files.getCloudStorageFolders] channelId name cannot be null or empty");if(!t)throw new Error("[files.getCloudStorageFolders] Callback cannot be null");hn(o(Wr,s.Files_GetCloudStorageFolders),"files.getCloudStorageFolders",[e],t)},e.addCloudStorageFolder=function(e,t){if(Ne(ve,D.content),!e||0===e.length)throw new Error("[files.addCloudStorageFolder] channelId name cannot be null or empty");if(!t)throw new Error("[files.addCloudStorageFolder] Callback cannot be null");hn(o(Wr,s.Files_AddCloudStorageFolder),"files.addCloudStorageFolder",[e],t)},e.deleteCloudStorageFolder=function(e,t,n){if(Ne(ve,D.content),!e)throw new Error("[files.deleteCloudStorageFolder] channelId name cannot be null or empty");if(!t)throw new Error("[files.deleteCloudStorageFolder] folderToDelete cannot be null or empty");if(!n)throw new Error("[files.deleteCloudStorageFolder] Callback cannot be null");hn(o(Wr,s.Files_DeleteCloudStorageFolder),"files.deleteCloudStorageFolder",[e,t],n)},e.getCloudStorageFolderContents=function(e,t,n){if(Ne(ve,D.content),!e||!t)throw new Error("[files.getCloudStorageFolderContents] folder/providerCode name cannot be null or empty");if(!n)throw new Error("[files.getCloudStorageFolderContents] Callback cannot be null");if("isSubdirectory"in e&&!e.isSubdirectory)throw new Error("[files.getCloudStorageFolderContents] provided folder is not a subDirectory");hn(o(Wr,s.Files_GetCloudStorageFolderContents),"files.getCloudStorageFolderContents",[e,t],n)},e.openCloudStorageFile=function(e,t,n){if(Ne(ve,D.content),!e||!t)throw new Error("[files.openCloudStorageFile] file/providerCode cannot be null or empty");if(e.isSubdirectory)throw new Error("[files.openCloudStorageFile] provided file is a subDirectory");hn(o(Wr,s.Files_OpenCloudStorageFile),"files.openCloudStorageFile",[e,t,n])},e.getExternalProviders=function(e=!1,t){if(Ne(ve,D.content),!t)throw new Error("[files.getExternalProviders] Callback cannot be null");hn(o(Wr,s.Files_GetExternalProviders),"files.getExternalProviders",[e],t)},e.copyMoveFiles=function(e,t,n,i,r=!1,a){if(Ne(ve,D.content),!e||0===e.length)throw new Error("[files.copyMoveFiles] selectedFiles cannot be null or empty");if(!t)throw new Error("[files.copyMoveFiles] providerCode cannot be null or empty");if(!n)throw new Error("[files.copyMoveFiles] destinationFolder cannot be null or empty");if(!i)throw new Error("[files.copyMoveFiles] destinationProviderCode cannot be null or empty");if(!a)throw new Error("[files.copyMoveFiles] callback cannot be null");hn(o(Wr,s.Files_CopyMoveFiles),"files.copyMoveFiles",[e,t,n,i,r],a)},e.getFileDownloads=function(e){if(Ne(ve,D.content),!e)throw new Error("[files.getFileDownloads] Callback cannot be null");hn(o(Wr,s.Files_GetFileDownloads),"files.getFileDownloads",[],e)},e.openDownloadFolder=function(e=void 0,t){if(Ne(ve,D.content),!t)throw new Error("[files.openDownloadFolder] Callback cannot be null");hn(o(Wr,s.Files_OpenDownloadFolder),"files.openDownloadFolder",[e],t)},e.addCloudStorageProvider=function(e){if(Ne(ve,D.content),!e)throw c(O.INVALID_ARGUMENTS,"[files.addCloudStorageProvider] callback cannot be null");hn(o(Wr,s.Files_AddCloudStorageProvider),"files.addCloudStorageProvider",[],e)},e.removeCloudStorageProvider=function(e,t){if(Ne(ve,D.content),!t)throw c(O.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] callback cannot be null");if(!e||!e.content)throw c(O.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] 3P cloud storage provider request content is missing");hn(o(Wr,s.Files_RemoveCloudStorageProvider),"files.removeCloudStorageProvider",[e],t)},e.addCloudStorageProviderFile=function(e,t){if(Ne(ve,D.content),!t)throw c(O.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw c(O.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] 3P cloud storage provider request content is missing");hn(o(Wr,s.Files_AddCloudStorageProviderFile),"files.addCloudStorageProviderFile",[e],t)},e.renameCloudStorageProviderFile=function(e,t){if(Ne(ve,D.content),!t)throw c(O.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw c(O.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] 3P cloud storage provider request content is missing");hn(o(Wr,s.Files_RenameCloudStorageProviderFile),"files.renameCloudStorageProviderFile",[e],t)},e.deleteCloudStorageProviderFile=function(e,t){if(Ne(ve,D.content),!t)throw c(O.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw c(O.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] 3P cloud storage provider request content details are missing");hn(o(Wr,s.Files_DeleteCloudStorageProviderFile),"files.deleteCloudStorageProviderFile",[e],t)},e.downloadCloudStorageProviderFile=function(e,t){if(Ne(ve,D.content),!t)throw c(O.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw c(O.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");hn(o(Wr,s.Files_DownloadCloudStorageProviderFile),"files.downloadCloudStorageProviderFile",[e],t)},e.uploadCloudStorageProviderFile=function(e,t){if(Ne(ve,D.content),!t)throw c(O.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw c(O.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");if(!e.content.destinationFolder)throw c(O.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] Invalid destination folder details");hn(o(Wr,s.Files_UploadCloudStorageProviderFile),"files.uploadCloudStorageProviderFile",[e],t)},e.registerCloudStorageProviderListChangeHandler=function(e){if(Ne(ve),!e)throw new Error("[registerCloudStorageProviderListChangeHandler] Handler cannot be null");Vt(o(Wr,s.Files_RegisterCloudStorageProviderListChangeHandler),"files.cloudStorageProviderListChange",e)},e.registerCloudStorageProviderContentChangeHandler=function(e){if(Ne(ve),!e)throw new Error("[registerCloudStorageProviderContentChangeHandler] Handler cannot be null");Vt(o(Wr,s.Files_RegisterCloudStorageProviderContentChangeHandler),"files.cloudStorageProviderContentChange",e)}}(Gr||(Gr={}));const zr=a.V_1;var qr;!function(e){function t(){return!(!Ne(ve)||!ve.supports.meetingRoom)}e.getPairedMeetingRoomInfo=function(){return new Promise((e=>{if(Ne(ve),!t())throw G;e(un(o(zr,s.MeetingRoom_GetPairedMeetingRoomInfo),"meetingRoom.getPairedMeetingRoomInfo"))}))},e.sendCommandToPairedMeetingRoom=function(e){return new Promise((n=>{if(!e||0==e.length)throw new Error("[meetingRoom.sendCommandToPairedMeetingRoom] Command name cannot be null or empty");if(Ne(ve),!t())throw G;n(un(o(zr,s.MeetingRoom_SendCommandToPairedMeetingRoom),"meetingRoom.sendCommandToPairedMeetingRoom",e))}))},e.registerMeetingRoomCapabilitiesUpdateHandler=function(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler] Handler cannot be null");if(Ne(ve),!t())throw G;Vt(o(zr,s.MeetingRoom_RegisterMeetingRoomCapabilitiesUpdateHandler),"meetingRoom.meetingRoomCapabilitiesUpdate",(t=>{Ne(ve),e(t)}))},e.registerMeetingRoomStatesUpdateHandler=function(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomStatesUpdateHandler] Handler cannot be null");if(Ne(ve),!t())throw G;Vt(o(zr,s.MeetingRoom_RegisterMeetingRoomStatesUpdateHandler),"meetingRoom.meetingRoomStatesUpdate",(t=>{Ne(ve),e(t)}))},e.isSupported=t}(qr||(qr={}));const jr=a.V_1;var $r;!function(e){function t(){return!(!Ne(ve)||!ve.supports.notifications)}e.showNotification=function(e){if(Ne(ve,D.content),!t())throw G;hn(o(jr,s.Notifications_ShowNotification),"notifications.showNotification",[e])},e.isSupported=t}($r||($r={}));const Jr=a.V_1;var Kr;!function(e){let t,n,i;function r(){return!(!Ne(ve)||!ve.supports.remoteCamera)}!function(e){e.Reset="Reset",e.ZoomIn="ZoomIn",e.ZoomOut="ZoomOut",e.PanLeft="PanLeft",e.PanRight="PanRight",e.TiltUp="TiltUp",e.TiltDown="TiltDown"}(t=e.ControlCommand||(e.ControlCommand={})),function(e){e[e.CommandResetError=0]="CommandResetError",e[e.CommandZoomInError=1]="CommandZoomInError",e[e.CommandZoomOutError=2]="CommandZoomOutError",e[e.CommandPanLeftError=3]="CommandPanLeftError",e[e.CommandPanRightError=4]="CommandPanRightError",e[e.CommandTiltUpError=5]="CommandTiltUpError",e[e.CommandTiltDownError=6]="CommandTiltDownError",e[e.SendDataError=7]="SendDataError"}(n=e.ErrorReason||(e.ErrorReason={})),function(e){e[e.None=0]="None",e[e.ControlDenied=1]="ControlDenied",e[e.ControlNoResponse=2]="ControlNoResponse",e[e.ControlBusy=3]="ControlBusy",e[e.AckTimeout=4]="AckTimeout",e[e.ControlTerminated=5]="ControlTerminated",e[e.ControllerTerminated=6]="ControllerTerminated",e[e.DataChannelError=7]="DataChannelError",e[e.ControllerCancelled=8]="ControllerCancelled",e[e.ControlDisabled=9]="ControlDisabled",e[e.ControlTerminatedToAllowOtherController=10]="ControlTerminatedToAllowOtherController"}(i=e.SessionTerminatedReason||(e.SessionTerminatedReason={})),e.getCapableParticipants=function(e){if(!e)throw new Error("[remoteCamera.getCapableParticipants] Callback cannot be null");if(Ne(ve,D.sidePanel),!r())throw G;hn(o(Jr,s.RemoteCamera_GetCapableParticipants),"remoteCamera.getCapableParticipants",e)},e.requestControl=function(e,t){if(!e)throw new Error("[remoteCamera.requestControl] Participant cannot be null");if(!t)throw new Error("[remoteCamera.requestControl] Callback cannot be null");if(Ne(ve,D.sidePanel),!r())throw G;hn(o(Jr,s.RemoteCamera_RequestControl),"remoteCamera.requestControl",[e],t)},e.sendControlCommand=function(e,t){if(!e)throw new Error("[remoteCamera.sendControlCommand] ControlCommand cannot be null");if(!t)throw new Error("[remoteCamera.sendControlCommand] Callback cannot be null");if(Ne(ve,D.sidePanel),!r())throw G;hn(o(Jr,s.RemoteCamera_SendControlCommand),"remoteCamera.sendControlCommand",[e],t)},e.terminateSession=function(e){if(!e)throw new Error("[remoteCamera.terminateSession] Callback cannot be null");if(Ne(ve,D.sidePanel),!r())throw G;hn(o(Jr,s.RemoteCamera_TerminateSession),"remoteCamera.terminateSession",e)},e.registerOnCapableParticipantsChangeHandler=function(e){if(!e)throw new Error("[remoteCamera.registerOnCapableParticipantsChangeHandler] Handler cannot be null");if(Ne(ve,D.sidePanel),!r())throw G;Vt(o(Jr,s.RemoteCamera_RegisterOnCapableParticipantsChangeHandler),"remoteCamera.capableParticipantsChange",e)},e.registerOnErrorHandler=function(e){if(!e)throw new Error("[remoteCamera.registerOnErrorHandler] Handler cannot be null");if(Ne(ve,D.sidePanel),!r())throw G;Vt(o(Jr,s.RemoteCamera_RegisterOnErrorHandler),"remoteCamera.handlerError",e)},e.registerOnDeviceStateChangeHandler=function(e){if(!e)throw new Error("[remoteCamera.registerOnDeviceStateChangeHandler] Handler cannot be null");if(Ne(ve,D.sidePanel),!r())throw G;Vt(o(Jr,s.RemoteCamera_RegisterOnDeviceStateChangeHandler),"remoteCamera.deviceStateChange",e)},e.registerOnSessionStatusChangeHandler=function(e){if(!e)throw new Error("[remoteCamera.registerOnSessionStatusChangeHandler] Handler cannot be null");if(Ne(ve,D.sidePanel),!r())throw G;Vt(o(Jr,s.RemoteCamera_RegisterOnSessionStatusChangeHandler),"remoteCamera.sessionStatusChange",e)},e.isSupported=r}(Kr||(Kr={}));const Qr=a.V_1;var Zr;!function(e){function t(){return!(!Ne(ve)||!ve.supports.appEntity)}e.selectAppEntity=function(e,n,i,r){if(Ne(ve,D.content),!t())throw G;if(!e||0==e.length)throw new Error("[appEntity.selectAppEntity] threadId name cannot be null or empty");if(!r)throw new Error("[appEntity.selectAppEntity] Callback cannot be null");hn(o(Qr,s.AppEntity_SelectAppEntity),"appEntity.selectAppEntity",[e,n,i],r)},e.isSupported=t}(Zr||(Zr={}));const Xr=a.V_1;var Yr;!function(e){let t,n;function i(){return!(!Ne(ve)||!ve.supports.teams)}!function(e){e[e.Regular=0]="Regular",e[e.Private=1]="Private",e[e.Shared=2]="Shared"}(t=e.ChannelType||(e.ChannelType={})),e.getTeamChannels=function(e,t){if(Ne(ve,D.content),!i())throw G;if(!e)throw new Error("[teams.getTeamChannels] groupId cannot be null or empty");if(!t)throw new Error("[teams.getTeamChannels] Callback cannot be null");hn(o(Xr,s.Teams_GetTeamChannels),"teams.getTeamChannels",[e],t)},e.refreshSiteUrl=function(e,t){if(Ne(ve),!i())throw G;if(!e)throw new Error("[teams.refreshSiteUrl] threadId cannot be null or empty");if(!t)throw new Error("[teams.refreshSiteUrl] Callback cannot be null");hn(o(Xr,s.Teams_RefreshSiteUrl),"teams.refreshSiteUrl",[e],t)},e.isSupported=i,function(e){let t;function n(){return!(!Ne(ve)||!ve.supports.teams)&&!!ve.supports.teams.fullTrust}!function(e){function t(){return!(!Ne(ve)||!ve.supports.teams)&&(!!ve.supports.teams.fullTrust&&!!ve.supports.teams.fullTrust.joinedTeams)}e.getUserJoinedTeams=function(e){return new Promise((n=>{if(Ne(ve),!t())throw G;if((y.hostClientType===V.android||y.hostClientType===V.teamsRoomsAndroid||y.hostClientType===V.teamsPhones||y.hostClientType===V.teamsDisplays)&&!De("2.0.1")){const e={errorCode:O.OLD_PLATFORM};throw new Error(JSON.stringify(e))}n(sn(o(Xr,s.Teams_FullTrust_JoinedTeams_GetUserJoinedTeams),"getUserJoinedTeams",e))}))},e.isSupported=t}(t=e.joinedTeams||(e.joinedTeams={})),e.getConfigSetting=function(e){return new Promise((t=>{if(Ne(ve),!n())throw G;t(sn(o(Xr,s.Teams_FullTrust_GetConfigSetting),"getConfigSetting",e))}))},e.isSupported=n}(n=e.fullTrust||(e.fullTrust={}))}(Yr||(Yr={}));var ea=function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,r){function a(e){try{l(i.next(e))}catch(e){r(e)}}function s(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){e.done?n(e.value):o(e.value).then(a,s)}l((i=i.apply(e,t||[])).next())}))};const ta=a.V_2;var na;!function(e){e.frameProcessingTimeoutInMs=2e3;const t=ce()?void 0:new Eo(hn);let n;function i(){const t=setTimeout((()=>{d(`Frame not processed in ${e.frameProcessingTimeoutInMs}ms`,n.Warn)}),e.frameProcessingTimeoutInMs);return function(){clearTimeout(t)}}function r(e,t){return n=>ea(this,void 0,void 0,(function*(){const o=n.videoFrame;t.reportStartFrameProcessing(o.codedWidth,o.codedHeight);const r=i(),a=yield e(n);return r(),t.reportFrameProcessed(),a}))}function a(e){return e.videoFrameBuffer=e.videoFrameBuffer||e.data,delete e.data,e}function l(){return Ne(ve),Fo.isSupported()}function c(e){hn(o(ta,s.VideoEffectsEx_NotifyVideoFrameProcessed),"video.videoFrameProcessed",[e])}function d(e,t=n.Warn){hn(o(ta,s.VideoEffectsEx_NotifyError),"video.notifyError",[e,t])}!function(e){e.Fatal="fatal",e.Warn="warn"}(n=e.ErrorLevel||(e.ErrorLevel={})),e.registerForVideoFrame=function(e){var n,u;if(!l())throw G;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(Ne(ve,D.sidePanel)){if(Vt(o(ta,s.VideoEffectsEx_RegisterSetFrameProcessTimeLimitHandler),"video.setFrameProcessTimeLimit",(e=>null==t?void 0:t.setFrameProcessTimeLimit(e)),!1),null===(n=ve.supports.video)||void 0===n?void 0:n.mediaStream)Vt(o(ta,s.VideoEffectsEx_RegisterStartVideoExtensibilityVideoStreamHandler),"video.startVideoExtensibilityVideoStream",(n=>ea(this,void 0,void 0,(function*(){const{streamId:i,metadataInTexture:o}=n,a=t?r(e.videoFrameHandler,t):e.videoFrameHandler;o?yield po(i,a,d,t):yield fo(i,a,d,t)}))),!1),hn(o(ta,s.VideoEffectsEx_MediaStream_RegisterForVideoFrame),"video.mediaStream.registerForVideoFrame",[e.config]);else{if(!(null===(u=ve.supports.video)||void 0===u?void 0:u.sharedFrame))throw G;Vt(o(ta,s.VideoEffectsEx_RegisterNewVideoFrameHandler),"video.newVideoFrame",(n=>{if(n){null==t||t.reportStartFrameProcessing(n.width,n.height);const o=i(),r=n.timestamp;e.videoBufferHandler(a(n),(()=>{o(),null==t||t.reportFrameProcessed(),c(r)}),d)}}),!1),hn(o(ta,s.VideoEffectsEx_RegisterForVideoFrame),"video.registerForVideoFrame",[e.config])}null==t||t.startMonitorSlowFrameProcessing()}},e.notifySelectedVideoEffectChanged=function(e,t,n){if(Ne(ve,D.sidePanel),!l())throw G;hn(o(ta,s.VideoEffectsEx_NotifySelectedVideoEffectChanged),"video.videoEffectChanged",[e,t,n])},e.registerForVideoEffect=function(e){if(Ne(ve,D.sidePanel),!l())throw G;Vt(o(ta,s.VideoEffectsEx_RegisterEffectParameterChangeHandler),"video.effectParameterChange",yo(e,t),!1),hn(o(ta,s.VideoEffectsEx_RegisterForVideoEffect),"video.registerForVideoEffect")},e.updatePersonalizedEffects=function(e){if(Ne(ve,D.sidePanel),!Fo.isSupported())throw G;hn(o(ta,s.VideoEffectsEx_UpdatePersonalizedEffects),"video.personalizedEffectsChanged",[e])},e.isSupported=l,e.notifyFatalError=function(e){if(Ne(ve),!Fo.isSupported())throw G;d(e,n.Fatal)}}(na||(na={}))})(),i})()));
2
2
  //# sourceMappingURL=MicrosoftTeams.min.js.map