@microsoft/teams-js 2.15.0-beta.2 → 2.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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 r=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(o=r))})),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:r}=e.exports;r.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,i,a=null;function s(...e){if(!s.enabled)return;const r=s,o=Number(new Date),i=o-(n||o);r.diff=i,r.prev=n,r.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 i=t.formatters[o];if("function"==typeof i){const t=e[a];n=i.call(r,t),e.splice(a,1),a--}return n})),t.formatArgs.call(r,e);(r.log||t.log).apply(r,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=r,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(o!==t.namespaces&&(o=t.namespaces,i=t.enabled(e)),i),set:e=>{a=e}}),"function"==typeof t.init&&t.init(s),s}function r(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}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 r=("string"==typeof e?e:"").split(/[\s,]+/),o=r.length;for(n=0;n<o;n++)r[n]&&("-"===(e=r[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,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;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,r=60*n,o=24*r,i=7*o,a=365.25*o;function s(e){if(!((e=String(e)).length>100)){var s=/^(-?(?:\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(s){var c=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*a;case"weeks":case"week":case"w":return c*i;case"days":case"day":case"d":return c*o;case"hours":case"hour":case"hrs":case"hr":case"h":return c*r;case"minutes":case"minute":case"mins":case"min":case"m":return c*n;case"seconds":case"second":case"secs":case"sec":case"s":return c*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}}}function c(e){var i=Math.abs(e);return i>=o?Math.round(e/o)+"d":i>=r?Math.round(e/r)+"h":i>=n?Math.round(e/n)+"m":i>=t?Math.round(e/t)+"s":e+"ms"}function u(e){var i=Math.abs(e);return i>=o?l(e,i,o,"day"):i>=r?l(e,i,r,"hour"):i>=n?l(e,i,n,"minute"):i>=t?l(e,i,t,"second"):e+" ms"}function l(e,t,n,r){var o=t>=1.5*n;return Math.round(e/n)+" "+r+(o?"s":"")}e.exports=function(e,t){t=t||{};var n=typeof e;if("string"===n&&e.length>0)return s(e);if("number"===n&&isFinite(e))return t.long?u(e):c(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}(()=>{n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}})(),(()=>{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 r={};return(()=>{"use strict";n.r(r),n.d(r,{ActionObjectType:()=>O,ChannelType:()=>B,ChildAppWindow:()=>Hn,DialogDimension:()=>W,ErrorCode:()=>D,FileOpenPreference:()=>R,FrameContexts:()=>x,HostClientType:()=>L,HostName:()=>H,LiveShareHost:()=>Zr,NotificationTypes:()=>Rt,ParentAppWindow:()=>xn,SecondaryM365ContentIdName:()=>M,TaskModuleDimension:()=>j,TeamType:()=>V,UserSettingTypes:()=>Mt,UserTeamRole:()=>_,ViewerActionTypes:()=>Ot,app:()=>ke,appEntity:()=>wo,appInitialization:()=>gr,appInstallDialog:()=>Kt,authentication:()=>Te,barCode:()=>hn,calendar:()=>Wn,call:()=>hr,chat:()=>gn,clipboard:()=>Rn,conversations:()=>Dt,dialog:()=>Pe,enablePrintCapability:()=>Er,executeDeepLink:()=>Vr,files:()=>po,geoLocation:()=>On,getAdaptiveCardSchemaVersion:()=>Nn,getContext:()=>Tr,getMruTabInstances:()=>Hr,getTabInstances:()=>Lr,initialize:()=>Sr,initializeWithFrameContext:()=>Wr,liveShare:()=>Jr,location:()=>Ln,logs:()=>kt,mail:()=>Bn,marketplace:()=>fo,media:()=>mn,meeting:()=>Vn,meetingRoom:()=>mo,menus:()=>Fe,monetization:()=>_n,navigateBack:()=>Gr,navigateCrossDomain:()=>zr,navigateToTab:()=>jr,notifications:()=>ho,openFilePreview:()=>Jt,pages:()=>Re,people:()=>jn,print:()=>Ir,profile:()=>zn,registerAppButtonClickHandler:()=>Ar,registerAppButtonHoverEnterHandler:()=>kr,registerAppButtonHoverLeaveHandler:()=>Rr,registerBackButtonHandler:()=>Or,registerBeforeUnloadHandler:()=>Dr,registerChangeSettingsHandler:()=>Ur,registerCustomHandler:()=>Gt,registerFocusEnterHandler:()=>Nr,registerFullScreenHandler:()=>Fr,registerOnLoadHandler:()=>Mr,registerOnThemeChangeHandler:()=>Pr,registerUserSettingsChangeHandler:()=>qt,remoteCamera:()=>go,returnFocus:()=>Br,search:()=>dr,secondaryBrowser:()=>Un,sendCustomEvent:()=>zt,sendCustomMessage:()=>jt,setFrameContext:()=>_r,settings:()=>wr,shareDeepLink:()=>xr,sharing:()=>fr,stageView:()=>pr,tasks:()=>qr,teams:()=>vo,teamsCore:()=>Ae,uploadCustomApp:()=>Bt,version:()=>Oe,video:()=>lr,videoEx:()=>yo,webStorage:()=>mr});var e="2.0.1",t="2.0.2",o="2.0.3",i="2.0.4",a="2.0.1",s="1.9.0",c="2.0.0",u="1.7.0",l="1.8.0",d="1.9.0",f=["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"],p=/^https:\/\//,m="https",h="teams.microsoft.com",g="The library has not yet been initialized",w="The runtime has not yet been initialized",v="The runtime version is not supported",C="The call was not properly started",y=function(){function e(){}return e.initializeCalled=!1,e.initializeCompleted=!1,e.additionalValidOrigins=[],e.isFramelessWindow=!1,e.printCapabilityEnabled=!1,e}(),b=(0,n(302).debug)("teamsJs");function S(e){return b.extend(e)}const E={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let I;const T=new Uint8Array(16);function P(){if(!I&&(I="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!I))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return I(T)}const F=[];for(let e=0;e<256;++e)F.push((e+256).toString(16).slice(1));function A(e,t=0){return(F[e[t+0]]+F[e[t+1]]+F[e[t+2]]+F[e[t+3]]+"-"+F[e[t+4]]+F[e[t+5]]+"-"+F[e[t+6]]+F[e[t+7]]+"-"+F[e[t+8]]+F[e[t+9]]+"-"+F[e[t+10]]+F[e[t+11]]+F[e[t+12]]+F[e[t+13]]+F[e[t+14]]+F[e[t+15]]).toLowerCase()}const k=function(e,t,n){if(E.randomUUID&&!t&&!e)return E.randomUUID();const r=(e=e||{}).random||(e.rng||P)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return A(r)};var R,O,M,D,N,U,L,H,x,V,_,W;!function(e){e.Inline="inline",e.Desktop="desktop",e.Web="web"}(R||(R={})),function(e){e.M365Content="m365content"}(O||(O={})),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"}(D||(D={})),function(e){e.GeoLocation="geolocation",e.Media="media"}(N||(N={})),function(e){e.TextPlain="text/plain",e.TextHtml="text/html",e.ImagePNG="image/png",e.ImageJPEG="image/jpeg"}(U||(U={})),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"}(L||(L={})),function(e){e.office="Office",e.outlook="Outlook",e.outlookWin32="OutlookWin32",e.orange="Orange",e.teams="Teams",e.teamsModern="TeamsModern"}(H||(H={})),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"}(x||(x={})),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"}(V||(V={})),function(e){e[e.Admin=0]="Admin",e[e.User=1]="User",e[e.Guest=2]="Guest"}(_||(_={})),function(e){e.Large="large",e.Medium="medium",e.Small="small"}(W||(W={}));var B,j=W;!function(e){e.Regular="Regular",e.Private="Private",e.Shared="Shared"}(B||(B={}));var z={errorCode:D.NOT_SUPPORTED_ON_PLATFORM},G={majorVersion:1,minorVersion:5},q={adaptiveCardSchemaVersion:{majorVersion:1,minorVersion:5}};function J(e,t){if("*."===e.substring(0,2)){var 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 K(e){if(!ie(e))return!1;var t=e.host;if(f.some((function(e){return J(e,t)})))return!0;for(var n=0,r=y.additionalValidOrigins;n<r.length;n++){var o=r[n];if(J("https://"===o.substring(0,8)?o.substring(8):o,t))return!0}return!1}function Z(e){return function(t,n){if(!t)throw new Error(e||n)}}function X(e,t){if("string"!=typeof e||"string"!=typeof t)return NaN;var n=e.split("."),r=t.split(".");function o(e){return/^\d+$/.test(e)}if(!n.every(o)||!r.every(o))return NaN;for(;n.length<r.length;)n.push("0");for(;r.length<n.length;)r.push("0");for(var i=0;i<n.length;++i)if(Number(n[i])!=Number(r[i]))return Number(n[i])>Number(r[i])?1:-1;return 0}function Q(){return k()}function $(e){return Object.keys(e).forEach((function(t){"object"==typeof e[t]&&$(e[t])})),Object.freeze(e)}function Y(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var o=e.apply(void 0,n);return o.then((function(e){t&&t(void 0,e)})).catch((function(e){t&&t(e)})),o}function ee(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var o=e.apply(void 0,n);return o.then((function(){t&&t(null)})).catch((function(e){t&&t(e)})),o}function te(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var o=e.apply(void 0,n);return o.then((function(e){t&&t(null,e)})).catch((function(e){t&&t(e,null)})),o}function ne(e,t,n){return new Promise((function(r,o){var i=setTimeout(o,t,n);e().then((function(e){clearTimeout(i),r(e)})).catch((function(e){clearTimeout(i),o(e)}))}))}function re(e){var 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!(X("".concat(e.majorVersion,".").concat(e.minorVersion),"".concat(G.majorVersion,".").concat(G.minorVersion))>=0)}function ie(e){return"https:"===e.protocol}function ae(e,t){return new Promise((function(n,r){e||r("MimeType cannot be null or empty."),t||r("Base64 string cannot be null or empty.");var o=atob(t);if(e.startsWith("image/")){for(var i=new Uint8Array(o.length),a=0;a<o.length;a++)i[a]=o.charCodeAt(a);n(new Blob([i],{type:e}))}n(new Blob([o],{type:e}))}))}function se(e){return new Promise((function(t,n){0===e.size&&n(new Error("Blob cannot be empty."));var r=new FileReader;r.onloadend=function(){r.result?t(r.result.toString().split(",")[1]):n(new Error("Failed to read the blob"))},r.onerror=function(){n(r.error)},r.readAsDataURL(e)}))}var ce=function(){return ce=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ce.apply(this,arguments)},ue=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},le=S("runtime"),de=3;function fe(e){return e.apiVersion===de}var pe={apiVersion:-1,supports:{}};function me(e){if(fe(e))return!0;throw-1===e.apiVersion?new Error(w):new Error(v)}var he=pe,ge={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:{appButton:{},tabs:{},config:{},backStack:{},fullTrust:{}},remoteCamera:{},stageView:{},teams:{fullTrust:{}},teamsCore:{},video:{sharedFrame:{}}}},we=[L.desktop,L.web,L.android,L.ios,L.rigel,L.surfaceHub,L.teamsRoomsWindows,L.teamsRoomsAndroid,L.teamsPhones,L.teamsDisplays];function ve(e){var t=e;if(t.apiVersion<de&&Ce.forEach((function(e){t.apiVersion===e.versionToUpgradeFrom&&(t=e.upgradeToNextVersion(t))})),fe(t))return t;throw new Error("Received a runtime that could not be upgraded to the latest version")}var Ce=[{versionToUpgradeFrom:1,upgradeToNextVersion:function(e){var t;return{apiVersion:2,hostVersionsInfo:void 0,isLegacyTeams:e.isLegacyTeams,supports:ce(ce({},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:function(e){var t=e.supports,n=(t.appNotification,ue(t,["appNotification"]));return ce(ce({},e),{apiVersion:3,supports:n})}}],ye={"1.9.0":[{capability:{location:{}},hostClientTypes:we}],"2.0.0":[{capability:{people:{}},hostClientTypes:we},{capability:{sharing:{}},hostClientTypes:[L.desktop,L.web]}],"2.0.1":[{capability:{teams:{fullTrust:{joinedTeams:{}}}},hostClientTypes:[L.android,L.desktop,L.ios,L.teamsRoomsAndroid,L.teamsPhones,L.teamsDisplays,L.web]},{capability:{webStorage:{}},hostClientTypes:[L.desktop]}],"2.0.5":[{capability:{webStorage:{}},hostClientTypes:[L.android,L.desktop,L.ios]}]},be=le.extend("generateBackCompatRuntimeConfig");function Se(e){be("generating back compat runtime config for %s",e);var t=ce({},ge.supports);be("Supported capabilities in config before updating based on highestSupportedVersion: %o",t),Object.keys(ye).forEach((function(n){X(e,n)>=0&&ye[n].forEach((function(e){e.hostClientTypes.includes(y.hostClientType)&&(t=ce(ce({},t),e.capability))}))}));var n={apiVersion:de,hostVersionsInfo:q,isLegacyTeams:!0,supports:t};return be("Runtime config after updating based on highestSupportedVersion: %o",n),n}var Ee=le.extend("applyRuntimeConfig");function Ie(e){"string"==typeof e.apiVersion&&(Ee("Trying to apply runtime with string apiVersion, processing as v1: %o",e),e=ce(ce({},e),{apiVersion:1})),Ee("Fast-forwarding runtime %o",e);var t=ve(e);Ee("Applying runtime %o",t),he=$(t)}var Te,Pe,Fe,Ae,ke,Re,Oe="2.15.0-beta.2",Me=S("internal"),De=Me.extend("ensureInitializeCalled"),Ne=Me.extend("ensureInitialized");function Ue(){if(!y.initializeCalled)throw De(g),new Error(g)}function Le(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!y.initializeCompleted)throw Ne("%s. initializeCalled: %s",g,y.initializeCalled.toString()),new Error(g);if(t&&t.length>0){for(var r=!1,o=0;o<t.length;o++)if(t[o]===y.frameContext){r=!0;break}if(!r)throw new Error("This call is only allowed in following contexts: ".concat(JSON.stringify(t),". ")+'Current context: "'.concat(y.frameContext,'".'))}return me(e)}function He(t){void 0===t&&(t=e);var n=X(y.clientSupportedSDKVersion,t);return!isNaN(n)&&n>=0}function xe(){return y.hostClientType==L.android||y.hostClientType==L.ios||y.hostClientType==L.ipados}function Ve(t){if(void 0===t&&(t=e),!xe())throw{errorCode:D.NOT_SUPPORTED_ON_PLATFORM};if(!He(t))throw{errorCode:D.OLD_PLATFORM}}function _e(e){var t=y.additionalValidOrigins.concat(e.filter((function(e){return"string"==typeof e&&p.test(e)}))),n={};t=t.filter((function(e){return!n[e]&&(n[e]=!0,!0)})),y.additionalValidOrigins=t}function We(){return"undefined"==typeof window}function Be(e){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:H.teams,clientType:e.hostClientType?e.hostClientType:L.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:e.userObjectId,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){var t,n,r;function o(e){return new Promise((function(n,r){if(y.hostClientType===L.desktop||y.hostClientType===L.android||y.hostClientType===L.ios||y.hostClientType===L.ipados||y.hostClientType===L.macos||y.hostClientType===L.rigel||y.hostClientType===L.teamsRoomsWindows||y.hostClientType===L.teamsRoomsAndroid||y.hostClientType===L.teamsPhones||y.hostClientType===L.teamsDisplays||y.hostClientType===L.surfaceHub){var o=document.createElement("a");o.href=e.url,n(ht("authentication.authenticate",[o.href,e.width,e.height,e.isExternal]).then((function(e){var t=e[0],n=e[1];if(t)return n;throw new Error(n)})))}else t={success:n,fail:r},c(e)}))}function i(e){return new Promise((function(t){t(ht("authentication.getAuthToken",[null==e?void 0:e.resources,null==e?void 0:e.claims,null==e?void 0:e.silent]))})).then((function(e){var t=e[0],n=e[1];if(t)return n;throw new Error(n)}))}function a(){return new Promise((function(e){e(ht("authentication.getUser"))})).then((function(e){var t=e[0],n=e[1];if(t)return n;throw new Error(n)}))}function s(){u();try{st.childWindow&&st.childWindow.close()}finally{st.childWindow=null,st.childOrigin=null}}function c(e){s();var t=e.width||600,n=e.height||400;t=Math.min(t,st.currentWindow.outerWidth-400),n=Math.min(n,st.currentWindow.outerHeight-200);var r=document.createElement("a");r.href=e.url.replace("{oauthRedirectMethod}","web");var o=void 0!==st.currentWindow.screenLeft?st.currentWindow.screenLeft:st.currentWindow.screenX,i=void 0!==st.currentWindow.screenTop?st.currentWindow.screenTop:st.currentWindow.screenY;o+=st.currentWindow.outerWidth/2-t/2,i+=st.currentWindow.outerHeight/2-n/2,st.childWindow=st.currentWindow.open(r.href,"_blank","toolbar=no, location=yes, status=no, menubar=no, scrollbars=yes, top="+i+", left="+o+", width="+t+", height="+n),st.childWindow?l():f("FailedToOpenWindow")}function u(){n&&(clearInterval(n),n=0),Xe("initialize"),Xe("navigateCrossDomain")}function l(){u(),n=st.currentWindow.setInterval((function(){if(!st.childWindow||st.childWindow.closed)f("CancelledByUser");else{var e=st.childOrigin;try{st.childOrigin="*",xt("ping")}finally{st.childOrigin=e}}}),100),Ze("initialize",(function(){return[x.authentication,y.hostClientType]})),Ze("navigateCrossDomain",(function(){return!1}))}function d(e){try{t&&t.success(e)}finally{t=null,s()}}function f(e){try{t&&t.fail(new Error(e))}finally{t=null,s()}}function p(e,t,n){if(e){var r=document.createElement("a");r.href=decodeURIComponent(e),r.host&&r.host!==window.location.host&&"outlook.office.com"===r.host&&r.search.indexOf("client_type=Win32_Outlook")>-1&&(t&&"result"===t&&(n&&(r.href=m(r.href,"result",n)),st.currentWindow.location.assign(m(r.href,"authSuccess",""))),t&&"reason"===t&&(n&&(r.href=m(r.href,"reason",n)),st.currentWindow.location.assign(m(r.href,"authFailure",""))))}}function m(e,t,n){var r=e.indexOf("#"),o=-1===r?"#":e.substr(r);return o=o+"&"+t+(""!==n?"="+n:""),(e=-1===r?e:e.substr(0,r))+o}e.initialize=function(){Ze("authentication.authenticate.success",d,!1),Ze("authentication.authenticate.failure",f,!1)},e.registerAuthenticationHandlers=function(e){r=e},e.authenticate=function(e){var t=void 0!==e,n=t?e:r;if(!n)throw new Error("No parameters are provided for authentication");return Le(he,x.content,x.sidePanel,x.settings,x.remove,x.task,x.stage,x.meetingStage),o(n).then((function(e){try{return n&&n.successCallback?(n.successCallback(e),""):e}finally{t||(r=null)}})).catch((function(e){try{if(n&&n.failureCallback)return n.failureCallback(e.message),"";throw e}finally{t||(r=null)}}))},e.getAuthToken=function(e){return Ue(),i(e).then((function(t){return e&&e.successCallback?(e.successCallback(t),""):t})).catch((function(t){if(e&&e.failureCallback)return e.failureCallback(t.message),"";throw t}))},e.getUser=function(e){return Ue(),a().then((function(t){return e&&e.successCallback?(e.successCallback(t),null):t})).catch((function(t){if(e&&e.failureCallback)return e.failureCallback(t.message),null;throw t}))},e.notifySuccess=function(e,t){p(t,"result",e),Le(he,x.authentication),wt("authentication.authenticate.success",[e]),Lt(st.parentWindow,(function(){return setTimeout((function(){return st.currentWindow.close()}),200)}))},e.notifyFailure=function(e,t){p(t,"reason",e),Le(he,x.authentication),wt("authentication.authenticate.failure",[e]),Lt(st.parentWindow,(function(){return setTimeout((function(){return st.currentWindow.close()}),200)}))},function(e){e.Public="public",e.EUDB="eudb",e.Other="other"}(e.DataResidency||(e.DataResidency={}))}(Te||(Te={})),function(e){var t=[];function n(e){y.frameContext&&(y.frameContext===x.task?t.push(e):Xe("messageForChild"))}e.initialize=function(){Ze("messageForChild",n,!1)},function(e){function n(){return Le(he)&&void 0!==(he.supports.dialog&&he.supports.dialog.url)}function r(e){return{url:e.url,height:e.size?e.size.height:W.Small,width:e.size?e.size.width:W.Small,title:e.title,fallbackUrl:e.fallbackUrl}}function o(e){var t=r(e);return t.completionBotId=e.completionBotId,t}e.open=function(e,t,o){if(Le(he,x.content,x.sidePanel,x.meetingStage),!n())throw z;o&&Ze("messageForParent",o),wt("tasks.startTask",[r(e)],(function(e,n){null==t||t({err:e,result:n}),Xe("messageForParent")}))},e.submit=function(e,t){if(Le(he,x.content,x.task),!n())throw z;wt("tasks.completeTask",[e,t?Array.isArray(t)?t:[t]:[]])},e.sendMessageToParentFromDialog=function(e){if(Le(he,x.task),!n())throw z;wt("messageForParent",[e])},e.sendMessageToDialog=function(e){if(Le(he,x.content,x.sidePanel,x.meetingStage),!n())throw z;wt("messageForChild",[e])},e.registerOnMessageFromParent=function(e){if(Le(he,x.task),!n())throw z;for(Xe("messageForChild"),Ze("messageForChild",e),t.reverse();t.length>0;){e(t.pop())}},e.isSupported=n,function(e){function t(){return Le(he)&&void 0!==(he.supports.dialog&&he.supports.dialog.url&&he.supports.dialog.url.bot)}e.open=function(e,n,r){if(Le(he,x.content,x.sidePanel,x.meetingStage),!t())throw z;r&&Ze("messageForParent",r),wt("tasks.startTask",[o(e)],(function(e,t){null==n||n({err:e,result:t}),Xe("messageForParent")}))},e.isSupported=t}(e.bot||(e.bot={})),e.getDialogInfoFromUrlDialogInfo=r,e.getDialogInfoFromBotUrlDialogInfo=o}(e.url||(e.url={})),e.isSupported=function(){return!(!Le(he)||!he.supports.dialog)},function(e){function t(){return!(!Le(he)||!he.supports.dialog)&&!!he.supports.dialog.update}e.resize=function(e){if(Le(he,x.content,x.sidePanel,x.task,x.meetingStage),!t())throw z;wt("tasks.updateTask",[e])},e.isSupported=t}(e.update||(e.update={})),function(e){function t(){var e=he.hostVersionsInfo&&he.hostVersionsInfo.adaptiveCardSchemaVersion&&!oe(he.hostVersionsInfo.adaptiveCardSchemaVersion);return Le(he)&&void 0!==(e&&he.supports.dialog&&he.supports.dialog.card)}function n(e){return{card:e.card,height:e.size?e.size.height:W.Small,width:e.size?e.size.width:W.Small,title:e.title}}function r(e){var t=n(e);return t.completionBotId=e.completionBotId,t}e.open=function(e,r){if(Le(he,x.content,x.sidePanel,x.meetingStage),!t())throw z;wt("tasks.startTask",[n(e)],(function(e,t){null==r||r({err:e,result:t})}))},e.isSupported=t,function(e){function t(){var e=he.hostVersionsInfo&&he.hostVersionsInfo.adaptiveCardSchemaVersion&&!oe(he.hostVersionsInfo.adaptiveCardSchemaVersion);return Le(he)&&void 0!==(e&&he.supports.dialog&&he.supports.dialog.card&&he.supports.dialog.card.bot)}e.open=function(e,n){if(Le(he,x.content,x.sidePanel,x.meetingStage),!t())throw z;wt("tasks.startTask",[r(e)],(function(e,t){null==n||n({err:e,result:t})}))},e.isSupported=t}(e.bot||(e.bot={}))}(e.adaptiveCard||(e.adaptiveCard={}))}(Pe||(Pe={})),function(e){!function(e){e[e.ifRoom=0]="ifRoom",e[e.overflowOnly=1]="overflowOnly"}(e.DisplayMode||(e.DisplayMode={}));var t,n,r,o=function(){return function(){this.enabled=!0,this.selected=!1}}();function i(e){r&&r(e)||(Le(he),wt("viewConfigItemPress",[e]))}function a(e){t&&t(e)||(Le(he),wt("handleNavBarMenuItemPress",[e]))}function s(e){n&&n(e)||(Le(he),wt("handleActionMenuItemPress",[e]))}function c(){return!(!Le(he)||!he.supports.menus)}e.MenuItem=o,function(e){e.dropDown="dropDown",e.popOver="popOver"}(e.MenuListType||(e.MenuListType={})),e.initialize=function(){Ze("navBarMenuItemPress",a,!1),Ze("actionMenuItemPress",s,!1),Ze("setModuleView",i,!1)},e.setUpViews=function(e,t){if(Le(he),!c())throw z;r=t,wt("setUpViews",[e])},e.setNavBarMenu=function(e,n){if(Le(he),!c())throw z;t=n,wt("setNavBarMenu",[e])},e.showActionMenu=function(e,t){if(Le(he),!c())throw z;n=t,wt("showActionMenu",[e])},e.isSupported=c}(Fe||(Fe={})),function(e){function t(){if("undefined"==typeof window)throw new Error("window object undefined at print call");window.print()}function n(e,t){e&&Le(he),e&&t&&t(),tt(e)}function r(e,t){e&&Le(he),e&&t&&t(),rt(e)}function o(){return!(!Le(he)||!he.supports.teamsCore)}e.enablePrintCapability=function(){if(!y.printCapabilityEnabled){if(Le(he),!o())throw z;y.printCapabilityEnabled=!0,document.addEventListener("keydown",(function(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,(function(){if(e&&!o())throw z}))},e.registerOnLoadHandlerHelper=n,e.registerBeforeUnloadHandler=function(e){r(e,(function(){if(e&&!o())throw z}))},e.registerBeforeUnloadHandlerHelper=r,e.isSupported=o}(Ae||(Ae={})),function(t){var n=S("app");t.Messages={AppLoaded:"appInitialization.appLoaded",Success:"appInitialization.success",Failure:"appInitialization.failure",ExpectedFailure:"appInitialization.expectedFailure"},function(e){e.AuthFailed="AuthFailed",e.Timeout="Timeout",e.Other="Other"}(t.FailedReason||(t.FailedReason={})),function(e){e.PermissionError="PermissionError",e.NotFound="NotFound",e.Throttling="Throttling",e.Offline="Offline",e.Other="Other"}(t.ExpectedFailureReason||(t.ExpectedFailureReason={})),t.isInitialized=function(){return y.initializeCompleted},t.getFrameContext=function(){return y.frameContext};var r=5e3;t.initialize=function(e){return We()?(n.extend("initialize")("window object undefined at initialization"),Promise.resolve()):ne((function(){return i(e)}),r,new Error("SDK initialization timed out."))};var o=n.extend("initializeHelper");function i(t){return new Promise((function(n){y.initializeCalled||(y.initializeCalled=!0,qe(),y.initializePromise=ut(t).then((function(t){var n=t.context,r=t.clientType,i=t.runtimeConfig,a=t.clientSupportedSDKVersion,s=void 0===a?e:a;y.frameContext=n,y.hostClientType=r,y.clientSupportedSDKVersion=s;try{o("Parsing %s",i);var c=JSON.parse(i);if(o("Checking if %o is a valid runtime object",null!=c?c:"null"),!c||!c.apiVersion)throw new Error("Received runtime config is invalid");i&&Ie(c)}catch(t){if(!(t instanceof SyntaxError))throw t;try{o("Attempting to parse %s as an SDK version",i),isNaN(X(i,e))||(y.clientSupportedSDKVersion=i);c=JSON.parse(s);if(o("givenRuntimeConfig parsed to %o",null!=c?c:"null"),!c)throw new Error("givenRuntimeConfig string was successfully parsed. However, it parsed to value of null");Ie(c)}catch(e){if(!(e instanceof SyntaxError))throw e;Ie(Se(y.clientSupportedSDKVersion))}}y.initializeCompleted=!0})),Te.initialize(),Fe.initialize(),Re.config.initialize(),Pe.initialize()),Array.isArray(t)&&_e(t),n(y.initializePromise)}))}function a(e){e&&Ue(),Ye(e)}t._initialize=function(e){st.currentWindow=e},t._uninitialize=function(){y.initializeCalled&&(y.frameContext&&(a(null),Re.backStack.registerBackButtonHandler(null),Re.registerFullScreenHandler(null),Ae.registerBeforeUnloadHandler(null),Ae.registerOnLoadHandler(null),kt.registerGetLogHandler(null)),y.frameContext===x.settings&&Re.config.registerOnSaveHandler(null),y.frameContext===x.remove&&Re.config.registerOnRemoveHandler(null),y.initializeCalled=!1,y.initializeCompleted=!1,y.initializePromise=null,y.additionalValidOrigins=[],y.frameContext=null,y.hostClientType=null,y.isFramelessWindow=!1,lt())},t.getContext=function(){return new Promise((function(e){Ue(),e(dt("getContext"))})).then((function(e){return Be(e)}))},t.notifyAppLoaded=function(){Ue(),wt(t.Messages.AppLoaded,[Oe])},t.notifySuccess=function(){Ue(),wt(t.Messages.Success,[Oe])},t.notifyFailure=function(e){Ue(),wt(t.Messages.Failure,[e.reason,e.message])},t.notifyExpectedFailure=function(e){Ue(),wt(t.Messages.ExpectedFailure,[e.reason,e.message])},t.registerOnThemeChangeHandler=a,t.openLink=function(e){return new Promise((function(t){Le(he,x.content,x.sidePanel,x.settings,x.task,x.stage,x.meetingStage),t(ft("executeDeepLink",e))}))}}(ke||(ke={})),function(e){function t(e){if(Le(he,x.content),!n())throw z;wt("setFrameContext",[e])}function n(){return!(!Le(he)||!he.supports.pages)}e.returnFocus=function(e){if(Le(he),!n())throw z;wt("returnFocus",[e])},e.registerFocusEnterHandler=function(e){$e("focusEnter",e,[],(function(){if(!n())throw z}))},e.setCurrentFrame=t,e.initializeWithFrameContext=function(e,n,r){ke.initialize(r).then((function(){return n&&n()})),t(e)},e.getConfig=function(){return new Promise((function(e){if(Le(he,x.content,x.settings,x.remove,x.sidePanel),!n())throw z;e(dt("settings.getSettings"))}))},e.navigateCrossDomain=function(e){return new Promise((function(t){if(Le(he,x.content,x.sidePanel,x.settings,x.remove,x.task,x.stage,x.meetingStage),!n())throw z;t(pt("navigateCrossDomain","Cross-origin navigation is only supported for URLs matching the pattern registered in the manifest.",e))}))},e.navigateToApp=function(e){return new Promise((function(t){if(Le(he,x.content,x.sidePanel,x.settings,x.task,x.stage,x.meetingStage),!n())throw z;he.isLegacyTeams?t(ft("executeDeepLink",re(e))):t(ft("pages.navigateToApp",e))}))},e.shareDeepLink=function(e){if(Le(he,x.content,x.sidePanel,x.meetingStage),!n())throw z;wt("shareDeepLink",[e.subPageId,e.subPageLabel,e.subPageWebUrl])},e.registerFullScreenHandler=function(e){$e("fullScreenChange",e,[],(function(){if(e&&!n())throw z}))},e.isSupported=n,function(e){function t(){return!(!Le(he)||!he.supports.pages)&&!!he.supports.pages.tabs}e.navigateToTab=function(e){return new Promise((function(n){if(Le(he),!t())throw z;n(pt("navigateToTab","Invalid internalTabInstanceId and/or channelId were/was provided",e))}))},e.getTabInstances=function(e){return new Promise((function(n){if(Le(he),!t())throw z;n(dt("getTabInstances",e))}))},e.getMruTabInstances=function(e){return new Promise((function(n){if(Le(he),!t())throw z;n(dt("getMruTabInstances",e))}))},e.isSupported=t}(e.tabs||(e.tabs={})),function(e){var t,n;function r(e,n){e&&Le(he,x.settings),n&&n(),t=e,e&&wt("registerHandler",["save"])}function o(e,t){e&&Le(he,x.remove,x.settings),t&&t(),n=e,e&&wt("registerHandler",["remove"])}function i(e){var n=new a(e);t?t(n):st.childWindow?xt("settings.save",[e]):n.notifySuccess()}e.initialize=function(){Ze("settings.save",i,!1),Ze("settings.remove",s,!1)},e.setValidityState=function(e){if(Le(he,x.settings,x.remove),!u())throw z;wt("settings.setValidityState",[e])},e.setConfig=function(e){return new Promise((function(t){if(Le(he,x.content,x.settings,x.sidePanel),!u())throw z;t(ft("settings.setSettings",e))}))},e.registerOnSaveHandler=function(e){r(e,(function(){if(e&&!u())throw z}))},e.registerOnSaveHandlerHelper=r,e.registerOnRemoveHandler=function(e){o(e,(function(){if(e&&!u())throw z}))},e.registerOnRemoveHandlerHelper=o,e.registerChangeConfigHandler=function(e){$e("changeSettings",e,[x.content],(function(){if(!u())throw z}))};var a=function(){function e(e){this.notified=!1,this.result=e||{}}return e.prototype.notifySuccess=function(){this.ensureNotNotified(),wt("settings.save.success"),this.notified=!0},e.prototype.notifyFailure=function(e){this.ensureNotNotified(),wt("settings.save.failure",[e]),this.notified=!0},e.prototype.ensureNotNotified=function(){if(this.notified)throw new Error("The SaveEvent may only notify success or failure once.")},e}();function s(){var e=new c;n?n(e):st.childWindow?xt("settings.remove",[]):e.notifySuccess()}var c=function(){function e(){this.notified=!1}return e.prototype.notifySuccess=function(){this.ensureNotNotified(),wt("settings.remove.success"),this.notified=!0},e.prototype.notifyFailure=function(e){this.ensureNotNotified(),wt("settings.remove.failure",[e]),this.notified=!0},e.prototype.ensureNotNotified=function(){if(this.notified)throw new Error("The removeEventType may only notify success or failure once.")},e}();function u(){return!(!Le(he)||!he.supports.pages)&&!!he.supports.pages.config}e.isSupported=u}(e.config||(e.config={})),function(e){var t;function n(){return new Promise((function(e){if(Le(he),!i())throw z;e(pt("navigateBack","Back navigation is not supported in the current client or context."))}))}function r(e,n){e&&Le(he),n&&n(),t=e,e&&wt("registerHandler",["backButton"])}function o(){t&&t()||(st.childWindow?xt("backButtonPress",[]):n())}function i(){return!(!Le(he)||!he.supports.pages)&&!!he.supports.pages.backStack}e._initialize=function(){Ze("backButtonPress",o,!1)},e.navigateBack=n,e.registerBackButtonHandler=function(e){r(e,(function(){if(e&&!i())throw z}))},e.registerBackButtonHandlerHelper=r,e.isSupported=i}(e.backStack||(e.backStack={})),function(e){function t(){return!(!Le(he)||!he.supports.pages)&&!!he.supports.pages.fullTrust}e.enterFullscreen=function(){if(Le(he,x.content),!t())throw z;wt("enterFullscreen",[])},e.exitFullscreen=function(){if(Le(he,x.content),!t())throw z;wt("exitFullscreen",[])},e.isSupported=t}(e.fullTrust||(e.fullTrust={})),function(e){function t(){return!(!Le(he)||!he.supports.pages)&&!!he.supports.pages.appButton}e.onClick=function(e){$e("appButtonClick",e,[x.content],(function(){if(!t())throw z}))},e.onHoverEnter=function(e){$e("appButtonHoverEnter",e,[x.content],(function(){if(!t())throw z}))},e.onHoverLeave=function(e){$e("appButtonHoverLeave",e,[x.content],(function(){if(!t())throw z}))},e.isSupported=t}(e.appButton||(e.appButton={})),function(e){function t(){return!(!Le(he)||!he.supports.pages)&&!!he.supports.pages.currentApp}e.navigateTo=function(e){return new Promise((function(n){if(Le(he,x.content,x.sidePanel,x.settings,x.task,x.stage,x.meetingStage),!t())throw z;n(mt("pages.currentApp.navigateTo",e))}))},e.navigateToDefaultPage=function(){return new Promise((function(e){if(Le(he,x.content,x.sidePanel,x.settings,x.task,x.stage,x.meetingStage),!t())throw z;e(mt("pages.currentApp.navigateToDefaultPage"))}))},e.isSupported=t}(e.currentApp||(e.currentApp={}))}(Re||(Re={}));var je=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},ze=S("handlers"),Ge=function(){function e(){}return e.handlers={},e}();function qe(){Ge.handlers.themeChange=et,Ge.handlers.load=nt,Ge.handlers.beforeUnload=ot,Re.backStack._initialize()}var Je=ze.extend("callHandler");function Ke(e,t){var n=Ge.handlers[e];return n?(Je("Invoking the registered handler for message %s with arguments %o",e,t),[!0,n.apply(this,t)]):st.childWindow?(xt(e,t),[!1,void 0]):(Je("Handler for action message %s not found.",e),[!1,void 0])}function Ze(e,t,n,r){void 0===n&&(n=!0),void 0===r&&(r=[]),t?(Ge.handlers[e]=t,n&&wt("registerHandler",je([e],r,!0))):delete Ge.handlers[e]}function Xe(e){delete Ge.handlers[e]}function Qe(e){return null!=Ge.handlers[e]}function $e(e,t,n,r){t&&Le.apply(void 0,je([he],n,!1)),r&&r(),Ze(e,t)}function Ye(e){Ge.themeChangeHandler=e,e&&wt("registerHandler",["themeChange"])}function et(e){Ge.themeChangeHandler&&Ge.themeChangeHandler(e),st.childWindow&&xt("themeChange",[e])}function tt(e){Ge.loadHandler=e,e&&wt("registerHandler",["load"])}function nt(e){Ge.loadHandler&&Ge.loadHandler(e),st.childWindow&&xt("load",[e])}function rt(e){Ge.beforeUnloadHandler=e,e&&wt("registerHandler",["beforeUnload"])}function ot(){var e=function(){wt("readyToUnload",[])};Ge.beforeUnloadHandler&&Ge.beforeUnloadHandler(e)||(st.childWindow?xt("beforeUnload"):e())}var it=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},at=S("communication"),st=function(){return function(){}}(),ct=function(){function e(){}return e.parentMessageQueue=[],e.childMessageQueue=[],e.nextMessageId=0,e.callbacks={},e.promiseCallbacks={},e}();function ut(e){if(ct.messageListener=function(e){return yt(e)},st.currentWindow=st.currentWindow||window,st.parentWindow=st.currentWindow.parent!==st.currentWindow.self?st.currentWindow.parent:st.currentWindow.opener,(st.parentWindow||e)&&st.currentWindow.addEventListener("message",ct.messageListener,!1),!st.parentWindow){var t=st.currentWindow;if(!t.nativeInterface)return Promise.reject(new Error("Initialization Failed. No Parent window found."));y.isFramelessWindow=!0,t.onNativeMessage=It}try{return st.parentOrigin="*",ht("initialize",[Oe,de]).then((function(e){return{context:e[0],clientType:e[1],runtimeConfig:e[2],clientSupportedSDKVersion:e[3]}}))}finally{st.parentOrigin=null}}function lt(){st.currentWindow&&st.currentWindow.removeEventListener("message",ct.messageListener,!1),st.currentWindow=null,st.parentWindow=null,st.parentOrigin=null,st.childWindow=null,st.childOrigin=null,ct.parentMessageQueue=[],ct.childMessageQueue=[],ct.nextMessageId=0,ct.callbacks={},ct.promiseCallbacks={}}function dt(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return ht(e,t).then((function(e){return e[0]}))}function ft(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return ht(e,t).then((function(e){var t=e[0],n=e[1];if(!t)throw new Error(n)}))}function pt(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return ht(e,n).then((function(e){var n=e[0],r=e[1];if(!n)throw new Error(r||t)}))}function mt(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return ht(e,t).then((function(e){var t=e[0],n=e[1];if(t)throw t;return n}))}function ht(e,t){return void 0===t&&(t=void 0),new Promise((function(n){n(gt(Ct(e,t).id))}))}function gt(e){return new Promise((function(t){ct.promiseCallbacks[e]=t}))}function wt(e,t,n){var r;t instanceof Function?n=t:t instanceof Array&&(r=t);var o=Ct(e,r);n&&(ct.callbacks[o.id]=n)}var vt=at.extend("sendMessageToParentHelper");function Ct(e,t){var n=vt,r=st.parentWindow,o=Vt(e,t);if(n("Message %i information: %o",o.id,{actionName:e,args:t}),y.isFramelessWindow)st.currentWindow&&st.currentWindow.nativeInterface&&(n("Sending message %i to parent via framelessPostMessage interface",o.id),st.currentWindow.nativeInterface.framelessPostMessage(JSON.stringify(o)));else{var i=At(r);r&&i?(n("Sending message %i to parent via postMessage",o.id),r.postMessage(o,i)):(n("Adding message %i to parent message queue",o.id),Ft(r).push(o))}return o}function yt(e){if(e&&e.data&&"object"==typeof e.data){var t=e.source||e.originalEvent&&e.originalEvent.source,n=e.origin||e.originalEvent&&e.originalEvent.origin;bt(t,n)&&(St(t,n),t===st.parentWindow?It(e):t===st.childWindow&&Pt(e))}}function bt(e,t){return(!st.currentWindow||e!==st.currentWindow)&&(!!(st.currentWindow&&st.currentWindow.location&&t&&t===st.currentWindow.location.origin)||K(new URL(t)))}function St(e,t){y.isFramelessWindow||st.parentWindow&&!st.parentWindow.closed&&e!==st.parentWindow?st.childWindow&&!st.childWindow.closed&&e!==st.childWindow||(st.childWindow=e,st.childOrigin=t):(st.parentWindow=e,st.parentOrigin=t),st.parentWindow&&st.parentWindow.closed&&(st.parentWindow=null,st.parentOrigin=null),st.childWindow&&st.childWindow.closed&&(st.childWindow=null,st.childOrigin=null),Ut(st.parentWindow),Ut(st.childWindow)}var Et=at.extend("handleParentMessage");function It(e){var t=Et;if("id"in e.data&&"number"==typeof e.data.id){var n=e.data,r=ct.callbacks[n.id];t("Received a response from parent for message %i",n.id),r&&(t("Invoking the registered callback for message %i with arguments %o",n.id,n.args),r.apply(null,it(it([],n.args,!0),[n.isPartialResponse],!1)),Tt(e)||(t("Removing registered callback for message %i",n.id),delete ct.callbacks[n.id]));var o=ct.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 ct.promiseCallbacks[n.id])}else if("func"in e.data&&"string"==typeof e.data.func){t("Received an action message %s from parent",(n=e.data).func),Ke(n.func,n.args)}else t("Received an unknown message: %O",e)}function Tt(e){return!0===e.data.isPartialResponse}function Pt(e){if("id"in e.data&&"func"in e.data){var t=e.data,n=Ke(t.func,t.args),r=n[0],o=n[1];r&&void 0!==o?Ht(t.id,Array.isArray(o)?o:[o]):wt(t.func,t.args,(function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(st.childWindow){var r=e.pop();Ht(t.id,e,r)}}))}}function Ft(e){return e===st.parentWindow?ct.parentMessageQueue:e===st.childWindow?ct.childMessageQueue:[]}function At(e){return e===st.parentWindow?st.parentOrigin:e===st.childWindow?st.childOrigin:null}var kt,Rt,Ot,Mt,Dt,Nt=at.extend("flushMessageQueue");function Ut(e){for(var t=At(e),n=Ft(e),r=e==st.parentWindow?"parent":"child";e&&t&&n.length>0;){var o=n.shift();Nt("Flushing message %i from "+r+" message queue via postMessage.",o.id),e.postMessage(o,t)}}function Lt(e,t){var n=st.currentWindow.setInterval((function(){0===Ft(e).length&&(clearInterval(n),t())}),100)}function Ht(e,t,n){var r=st.childWindow,o=_t(e,t,n),i=At(r);r&&i&&r.postMessage(o,i)}function xt(e,t){var n=st.childWindow,r=Wt(e,t),o=At(n);n&&o?n.postMessage(r,o):Ft(n).push(r)}function Vt(e,t){return{id:ct.nextMessageId++,func:e,timestamp:Date.now(),args:t||[]}}function _t(e,t,n){return{id:e,args:t||[],isPartialResponse:n}}function Wt(e,t){return{func:e,args:t||[]}}function Bt(e,t){Le(he),wt("uploadCustomApp",[e],t||Z())}function jt(e,t,n){Le(he),wt(e,t,n)}function zt(e,t){if(Le(he),!st.childWindow)throw new Error("The child window has not yet been initialized or is not present");xt(e,t)}function Gt(e,t){var n=this;Le(he),Ze(e,(function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return t.apply(n,e)}))}function qt(e,t){Le(he),Ze("userSettingsChange",t,!0,[e])}function Jt(e){Le(he,x.content,x.task),wt("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])}!function(e){function t(){return!(!Le(he)||!he.supports.logs)}e.registerGetLogHandler=function(e){if(e&&Le(he),e&&!t())throw z;e?Ze("log.request",(function(){wt("log.receive",[e()])})):Xe("log.request")},e.isSupported=t}(kt||(kt={})),function(e){e.fileDownloadStart="fileDownloadStart",e.fileDownloadComplete="fileDownloadComplete"}(Rt||(Rt={})),function(e){e.view="view",e.edit="edit",e.editNew="editNew"}(Ot||(Ot={})),function(e){e.fileOpenPreference="fileOpenPreference",e.theme="theme"}(Mt||(Mt={})),function(e){function t(){return!(!Le(he)||!he.supports.conversations)}e.openConversation=function(e){return new Promise((function(n){if(Le(he,x.content),!t())throw z;var r=ft("conversations.openConversation",{title:e.title,subEntityId:e.subEntityId,conversationId:e.conversationId,channelId:e.channelId,entityId:e.entityId});e.onStartConversation&&Ze("startConversation",(function(t,n,r,o){return e.onStartConversation({subEntityId:t,conversationId:n,channelId:r,entityId:o})})),e.onCloseConversation&&Ze("closeConversation",(function(t,n,r,o){return e.onCloseConversation({subEntityId:t,conversationId:n,channelId:r,entityId:o})})),n(r)}))},e.closeConversation=function(){if(Le(he,x.content),!t())throw z;wt("conversations.closeConversation"),Xe("startConversation"),Xe("closeConversation")},e.getChatMembers=function(){return new Promise((function(e){if(Le(he),!t())throw z;e(dt("getChatMembers"))}))},e.isSupported=t}(Dt||(Dt={}));var Kt,Zt="/l/app/",Xt="/l/meeting/new",Qt="attendees",$t="startTime",Yt="endTime",en="subject",tn="content",nn="/l/call/0/0",rn="source",on="withVideo",an="/l/chat/0/0",sn="users",cn="topicName",un="message";function ln(e,t,n){if(0===e.length)throw new Error("Must have at least one user when creating a chat deep link");var r="".concat(sn,"=")+e.map((function(e){return encodeURIComponent(e)})).join(","),o=void 0===t?"":"&".concat(cn,"=").concat(encodeURIComponent(t)),i=void 0===n?"":"&".concat(un,"=").concat(encodeURIComponent(n));return"".concat(m,"://").concat(h).concat(an,"?").concat(r).concat(o).concat(i)}function dn(e,t,n){if(0===e.length)throw new Error("Must have at least one target when creating a call deep link");var r="".concat(sn,"=")+e.map((function(e){return encodeURIComponent(e)})).join(","),o=void 0===t?"":"&".concat(on,"=").concat(encodeURIComponent(t)),i=void 0===n?"":"&".concat(rn,"=").concat(encodeURIComponent(n));return"".concat(m,"://").concat(h).concat(nn,"?").concat(r).concat(o).concat(i)}function fn(e,t,n,r,o){var i=void 0===e?"":"".concat(Qt,"=")+e.map((function(e){return encodeURIComponent(e)})).join(","),a=void 0===t?"":"&".concat($t,"=").concat(encodeURIComponent(t)),s=void 0===n?"":"&".concat(Yt,"=").concat(encodeURIComponent(n)),c=void 0===r?"":"&".concat(en,"=").concat(encodeURIComponent(r)),u=void 0===o?"":"&".concat(tn,"=").concat(encodeURIComponent(o));return"".concat(m,"://").concat(h).concat(Xt,"?").concat(i).concat(a).concat(s).concat(c).concat(u)}function pn(e){if(!e)throw new Error("App ID must be set when creating an app install dialog deep link");return"".concat(m,"://").concat(h).concat(Zt).concat(encodeURIComponent(e))}!function(e){function t(){return!(!Le(he)||!he.supports.appInstallDialog)}e.openAppInstallDialog=function(e){return new Promise((function(n){if(Le(he,x.content,x.sidePanel,x.settings,x.task,x.stage,x.meetingStage),!t())throw new Error("Not supported");he.isLegacyTeams?n(ft("executeDeepLink",pn(e.appId))):(wt("appInstallDialog.openAppInstallDialog",[e]),n())}))},e.isSupported=t}(Kt||(Kt={}));var mn,hn,gn,wn=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function vn(e,t){if(null==e||null==t||e.length<=0)return null;var n,r=1;return e.sort((function(e,t){return e.sequence>t.sequence?1:-1})),e.forEach((function(e){e.sequence==r&&(n=n?new Blob([n,e.file],{type:t}):new Blob([e.file],{type:t}),r++)})),n}function Cn(e,t){if(null==e||null==t)return null;for(var n=atob(e.chunk),r=new Array(n.length),o=0;o<n.length;o++)r[o]=n.charCodeAt(o);var i=new Uint8Array(r),a=new Blob([i],{type:t});return{sequence:e.chunkSequence,file:a}}function yn(e){In(e)?Ve(t):Tn(e)?Ve(o):En(e)&&Ve(i)}function bn(e){return!(e.mediaType!=mn.MediaType.Video||!e.videoProps||!e.videoProps.videoController)}function Sn(e){return!(null==e||e.maxMediaCount>10)}function En(e){var t;return!((null==e?void 0:e.mediaType)!=mn.MediaType.Image||!(null===(t=null==e?void 0:e.imageProps)||void 0===t?void 0:t.imageOutputFormats))}function In(e){return!(!e||e.mediaType!=mn.MediaType.VideoAndImage&&!e.videoAndImageProps)}function Tn(e){return!(!e||e.mediaType!=mn.MediaType.Video||!e.videoProps||e.videoProps.isFullScreenMode)}function Pn(e,t,n){return null!=e&&null!=t&&t==mn.FileFormat.ID&&null!=n}function Fn(e){return!(null==e||e.length<=0||e.length>10)}function An(e){return!e||!(null===e.timeOutIntervalInSec||e.timeOutIntervalInSec<=0||e.timeOutIntervalInSec>60)}function kn(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){!function(e){e.Base64="base64",e.ID="id"}(e.FileFormat||(e.FileFormat={}));var t=function(){return function(){}}();function n(){return!(!Le(he)||!he.supports.permissions)}e.File=t,e.captureImage=function(e){if(!e)throw new Error("[captureImage] Callback cannot be null");Le(he,x.content,x.task),y.isFramelessWindow?He(u)?wt("captureImage",e):e({errorCode:D.OLD_PLATFORM},void 0):e({errorCode:D.NOT_SUPPORTED_ON_PLATFORM},void 0)},e.hasPermission=function(){if(Le(he,x.content,x.task),!n())throw z;var e=N.Media;return new Promise((function(t){t(mt("permissions.has",e))}))},e.requestPermission=function(){if(Le(he,x.content,x.task),!n())throw z;var e=N.Media;return new Promise((function(t){t(mt("permissions.request",e))}))};var r=function(e){function t(t){void 0===t&&(t=null);var n=e.call(this)||this;return t&&(n.content=t.content,n.format=t.format,n.mimeType=t.mimeType,n.name=t.name,n.preview=t.preview,n.size=t.size),n}return wn(t,e),t.prototype.getMedia=function(e){if(!e)throw new Error("[get Media] Callback cannot be null");(Le(he,x.content,x.task),He(l))?Pn(this.mimeType,this.format,this.content)?He("2.0.0")?this.getMediaViaCallback(e):this.getMediaViaHandler(e):e({errorCode:D.INVALID_ARGUMENTS},null):e({errorCode:D.OLD_PLATFORM},null)},t.prototype.getMediaViaCallback=function(e){var t={mediaMimeType:this.mimeType,assembleAttachment:[]};wt("getMedia",[this.content],(function(n){if(e)if(n&&n.error)e(n.error,null);else if(n&&n.mediaChunk)if(n.mediaChunk.chunkSequence<=0){var r=vn(t.assembleAttachment,t.mediaMimeType);e(n.error,r)}else{var o=Cn(n.mediaChunk,t.mediaMimeType);t.assembleAttachment.push(o)}else e({errorCode:D.INTERNAL_ERROR,message:"data received is null"},null)}))},t.prototype.getMediaViaHandler=function(e){var t=Q(),n={mediaMimeType:this.mimeType,assembleAttachment:[]},r=[t,this.content];this.content&&e&&wt("getMedia",r),Ze("getMedia"+t,(function(r){if(e){var o=JSON.parse(r);if(o.error)e(o.error,null),Xe("getMedia"+t);else if(o.mediaChunk)if(o.mediaChunk.chunkSequence<=0){var i=vn(n.assembleAttachment,n.mediaMimeType);e(o.error,i),Xe("getMedia"+t)}else{var a=Cn(o.mediaChunk,n.mediaMimeType);n.assembleAttachment.push(a)}else e({errorCode:D.INTERNAL_ERROR,message:"data received is null"},null),Xe("getMedia"+t)}}))},t}(t);e.Media=r;var i,a,s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return wn(t,e),t.prototype.getMediaType=function(){return a.Video},t.prototype.notifyEventToApp=function(e){if(this.controllerCallback)switch(e){case i.StartRecording:if(this.controllerCallback.onRecordingStarted){this.controllerCallback.onRecordingStarted();break}}},t}(function(){function e(e){this.controllerCallback=e}return e.prototype.notifyEventToHost=function(e,t){Le(he,x.content,x.task);try{Ve(o)}catch(e){return void(t&&t(e))}wt("media.controller",[{mediaType:this.getMediaType(),mediaControllerEvent:e}],(function(e){t&&t(e)}))},e.prototype.stop=function(e){this.notifyEventToHost(i.StopRecording,e)},e}());e.VideoController=s,function(e){e[e.StartRecording=1]="StartRecording",e[e.StopRecording=2]="StopRecording"}(i=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"}(e.CameraStartMode||(e.CameraStartMode={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(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"}(e.ImageUriType||(e.ImageUriType={})),function(e){e[e.IMAGE=1]="IMAGE",e[e.PDF=2]="PDF"}(e.ImageOutputFormats||(e.ImageOutputFormats={})),e.selectMedia=function(e,t){if(!t)throw new Error("[select Media] Callback cannot be null");if(Le(he,x.content,x.task),He(l)){try{yn(e)}catch(e){return void t(e,null)}if(Sn(e)){wt("selectMedia",[e],(function(n,o,i){if(i)bn(e)&&e.videoProps.videoController.notifyEventToApp(i);else if(o){for(var a=[],s=0,c=o;s<c.length;s++){var u=c[s];a.push(new r(u))}t(n,a)}else t(n,null)}))}else{var n={errorCode:D.INVALID_ARGUMENTS};t(n,null)}}else{var o={errorCode:D.OLD_PLATFORM};t(o,null)}},e.viewImages=function(e,t){if(!t)throw new Error("[view images] Callback cannot be null");Le(he,x.content,x.task),He(l)?Fn(e)?wt("viewImages",[e],t):t({errorCode:D.INVALID_ARGUMENTS}):t({errorCode:D.OLD_PLATFORM})},e.scanBarCode=function(e,t){if(!e)throw new Error("[media.scanBarCode] Callback cannot be null");Le(he,x.content,x.task),y.hostClientType!==L.desktop&&y.hostClientType!==L.web&&y.hostClientType!==L.rigel&&y.hostClientType!==L.teamsRoomsWindows&&y.hostClientType!==L.teamsRoomsAndroid&&y.hostClientType!==L.teamsPhones&&y.hostClientType!==L.teamsDisplays?He(d)?An(t)?wt("media.scanBarCode",[t],e):e({errorCode:D.INVALID_ARGUMENTS},null):e({errorCode:D.OLD_PLATFORM},null):e({errorCode:D.NOT_SUPPORTED_ON_PLATFORM},null)}}(mn||(mn={})),function(e){function t(){return!!(Le(he)&&he.supports.barCode&&he.supports.permissions)}e.scanBarCode=function(e){return new Promise((function(n){if(Le(he,x.content,x.task),!t())throw z;if(!An(e))throw{errorCode:D.INVALID_ARGUMENTS};n(mt("media.scanBarCode",e))}))},e.hasPermission=function(){if(Le(he,x.content,x.task),!t())throw z;var e=N.Media;return new Promise((function(t){t(mt("permissions.has",e))}))},e.requestPermission=function(){if(Le(he,x.content,x.task),!t())throw z;var e=N.Media;return new Promise((function(t){t(mt("permissions.request",e))}))},e.isSupported=t}(hn||(hn={})),function(e){function t(e){return new Promise((function(t){if(Le(he,x.content,x.task),!n())throw z;he.isLegacyTeams?t(ft("executeDeepLink",ln([e.user],void 0,e.message))):t(ft("chat.openChat",{members:e.user,message:e.message}))}))}function n(){return!(!Le(he)||!he.supports.chat)}e.openChat=t,e.openGroupChat=function(e){return new Promise((function(r){if(e.users.length<1)throw Error("OpenGroupChat Failed: No users specified");if(1===e.users.length){t({user:e.users[0],message:e.message})}else{if(Le(he,x.content,x.task),!n())throw z;if(he.isLegacyTeams)r(ft("executeDeepLink",ln(e.users,e.topic,e.message)));else r(ft("chat.openChat",{members:e.users,message:e.message,topic:e.topic}))}}))},e.isSupported=n}(gn||(gn={}));var Rn,On,Mn=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))},Dn=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(e){return function(t){return c([e,t])}}function c(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}};function Nn(){return he.hostVersionsInfo?he.hostVersionsInfo.adaptiveCardSchemaVersion:void 0}!function(e){function t(){return!!(Le(he)&&navigator&&navigator.clipboard&&he.supports.clipboard)}e.write=function(e){return Mn(this,void 0,void 0,(function(){var n;return Dn(this,(function(r){switch(r.label){case 0:if(Le(he,x.content,x.task,x.stage,x.sidePanel),!t())throw z;if(!e.type||!Object.values(U).includes(e.type))throw new Error("Blob type ".concat(e.type," is not supported. Supported blob types are ").concat(Object.values(U)));return[4,se(e)];case 1:return n=r.sent(),[2,mt("clipboard.writeToClipboard",{mimeType:e.type,content:n})]}}))}))},e.read=function(){return Mn(this,void 0,void 0,(function(){var e,n,r;return Dn(this,(function(o){switch(o.label){case 0:if(Le(he,x.content,x.task,x.stage,x.sidePanel),!t())throw z;return xe()?(r=(n=JSON).parse,[4,mt("clipboard.readFromClipboard")]):[3,2];case 1:return[2,ae((e=r.apply(n,[o.sent()])).mimeType,e.content)];case 2:return[2,mt("clipboard.readFromClipboard")]}}))}))},e.isSupported=t}(Rn||(Rn={})),function(e){function t(){return!!(Le(he)&&he.supports.geoLocation&&he.supports.permissions)}e.getCurrentLocation=function(){if(Le(he,x.content,x.task),!t())throw z;return mt("location.getLocation",{allowChooseLocation:!1,showMap:!1})},e.hasPermission=function(){if(Le(he,x.content,x.task),!t())throw z;var e=N.GeoLocation;return new Promise((function(t){t(mt("permissions.has",e))}))},e.requestPermission=function(){if(Le(he,x.content,x.task),!t())throw z;var e=N.GeoLocation;return new Promise((function(t){t(mt("permissions.request",e))}))},e.isSupported=t,function(e){function t(){return!!(Le(he)&&he.supports.geoLocation&&he.supports.geoLocation.map&&he.supports.permissions)}e.chooseLocation=function(){if(Le(he,x.content,x.task),!t())throw z;return mt("location.getLocation",{allowChooseLocation:!0,showMap:!0})},e.showLocation=function(e){if(Le(he,x.content,x.task),!t())throw z;if(!e)throw{errorCode:D.INVALID_ARGUMENTS};return mt("location.showLocation",e)},e.isSupported=t}(e.map||(e.map={}))}(On||(On={}));var Un,Ln,Hn=function(){function e(){}return e.prototype.postMessage=function(e,t){Le(he),wt("messageForChild",[e],t||Z())},e.prototype.addEventListener=function(e,t){Le(he),"message"===e&&Ze("messageForParent",t)},e}(),xn=function(){function e(){}return Object.defineProperty(e,"Instance",{get:function(){return this._instance||(this._instance=new this)},enumerable:!1,configurable:!0}),e.prototype.postMessage=function(e,t){Le(he,x.task),wt("messageForParent",[e],t||Z())},e.prototype.addEventListener=function(e,t){Le(he,x.task),"message"===e&&Ze("messageForChild",t)},e}();!function(e){function t(){return!(!Le(he)||!he.supports.secondaryBrowser)}e.open=function(e){if(Le(he,x.content),!t())throw z;if(!e||!ie(e))throw{errorCode:D.INVALID_ARGUMENTS,message:"Invalid Url: Only https URL is allowed"};return mt("secondaryBrowser.open",e.toString())},e.isSupported=t}(Un||(Un={})),function(e){function t(){return!(!Le(he)||!he.supports.location)}e.getLocation=function(e,n){if(!n)throw new Error("[location.getLocation] Callback cannot be null");if(Le(he,x.content,x.task),!He(s))throw{errorCode:D.OLD_PLATFORM};if(!e)throw{errorCode:D.INVALID_ARGUMENTS};if(!t())throw z;wt("location.getLocation",[e],n)},e.showLocation=function(e,n){if(!n)throw new Error("[location.showLocation] Callback cannot be null");if(Le(he,x.content,x.task),!He(s))throw{errorCode:D.OLD_PLATFORM};if(!e)throw{errorCode:D.INVALID_ARGUMENTS};if(!t())throw z;wt("location.showLocation",[e],n)},e.isSupported=t}(Ln||(Ln={}));var Vn,_n,Wn,Bn,jn,zn,Gn=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))},qn=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(e){return function(t){return c([e,t])}}function c(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}};function Jn(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?Kn(e.persona):[!1,"triggerType must be a valid string"]:[!1,"targetElementBoundingRect must be a DOMRect"]:[!1,"A request object is required"]}function Kn(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){var t;function n(e,n){var r=this;wt("meeting.requestAppAudioHandling",[e.isAppHandlingAudio],(function(i,a){if(i&&null!=a)throw new Error("[requestAppAudioHandling] Callback response - both parameters cannot be set");if(i)throw new Error("[requestAppAudioHandling] Callback response - SDK error ".concat(i.errorCode," ").concat(i.message));if("boolean"!=typeof a)throw new Error("[requestAppAudioHandling] Callback response - isHostAudioless must be a boolean");Ze("meeting.micStateChanged",(function(n){return Gn(r,void 0,void 0,(function(){var r,i;return qn(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,e.micMuteStateChangedCallback(n)];case 1:return r=a.sent(),i=r.isMicMuted===n.isMicMuted,o(r,i?t.HostInitiated:t.AppDeclinedToChange),[3,3];case 2:return a.sent(),o(n,t.AppFailedToChange),[3,3];case 3:return[2]}}))}))})),n(a)}))}function r(e,t){wt("meeting.requestAppAudioHandling",[e.isAppHandlingAudio],(function(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 ".concat(e.errorCode," ").concat(e.message));if("boolean"!=typeof n)throw new Error("[requestAppAudioHandling] Callback response - isHostAudioless must be a boolean");Qe("meeting.micStateChanged")&&Xe("meeting.micStateChanged"),t(n)}))}function o(e,t){Le(he,x.sidePanel,x.meetingStage),wt("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"}(e.MeetingReactionType||(e.MeetingReactionType={})),function(e){e.Unknown="Unknown",e.Adhoc="Adhoc",e.Scheduled="Scheduled",e.Recurring="Recurring",e.Broadcast="Broadcast",e.MeetNow="MeetNow"}(e.MeetingType||(e.MeetingType={})),function(e){e.OneOnOneCall="oneOnOneCall",e.GroupCall="groupCall"}(e.CallType||(e.CallType={})),e.getIncomingClientAudioState=function(e){if(!e)throw new Error("[get incoming client audio state] Callback cannot be null");Le(he,x.sidePanel,x.meetingStage),wt("getIncomingClientAudioState",e)},e.toggleIncomingClientAudio=function(e){if(!e)throw new Error("[toggle incoming client audio] Callback cannot be null");Le(he,x.sidePanel,x.meetingStage),wt("toggleIncomingClientAudio",e)},e.getMeetingDetails=function(e){if(!e)throw new Error("[get meeting details] Callback cannot be null");Le(he,x.sidePanel,x.meetingStage,x.settings,x.content),wt("meeting.getMeetingDetails",e)},e.getAuthenticationTokenForAnonymousUser=function(e){if(!e)throw new Error("[get Authentication Token For AnonymousUser] Callback cannot be null");Le(he,x.sidePanel,x.meetingStage,x.task),wt("meeting.getAuthenticationTokenForAnonymousUser",e)},e.getLiveStreamState=function(e){if(!e)throw new Error("[get live stream state] Callback cannot be null");Le(he,x.sidePanel),wt("meeting.getLiveStreamState",e)},e.requestStartLiveStreaming=function(e,t,n){if(!e)throw new Error("[request start live streaming] Callback cannot be null");Le(he,x.sidePanel),wt("meeting.requestStartLiveStreaming",[t,n],e)},e.requestStopLiveStreaming=function(e){if(!e)throw new Error("[request stop live streaming] Callback cannot be null");Le(he,x.sidePanel),wt("meeting.requestStopLiveStreaming",e)},e.registerLiveStreamChangedHandler=function(e){if(!e)throw new Error("[register live stream changed handler] Handler cannot be null");Le(he,x.sidePanel),Ze("meeting.liveStreamChanged",e)},e.shareAppContentToStage=function(e,t){if(!e)throw new Error("[share app content to stage] Callback cannot be null");Le(he,x.sidePanel,x.meetingStage),wt("meeting.shareAppContentToStage",[t],e)},e.getAppContentStageSharingCapabilities=function(e){if(!e)throw new Error("[get app content stage sharing capabilities] Callback cannot be null");Le(he,x.sidePanel,x.meetingStage),wt("meeting.getAppContentStageSharingCapabilities",e)},e.stopSharingAppContentToStage=function(e){if(!e)throw new Error("[stop sharing app content to stage] Callback cannot be null");Le(he,x.sidePanel,x.meetingStage),wt("meeting.stopSharingAppContentToStage",e)},e.getAppContentStageSharingState=function(e){if(!e)throw new Error("[get app content stage sharing state] Callback cannot be null");Le(he,x.sidePanel,x.meetingStage),wt("meeting.getAppContentStageSharingState",e)},e.registerSpeakingStateChangeHandler=function(e){if(!e)throw new Error("[registerSpeakingStateChangeHandler] Handler cannot be null");Le(he,x.sidePanel,x.meetingStage),Ze("meeting.speakingStateChanged",e)},e.registerRaiseHandStateChangedHandler=function(e){if(!e)throw new Error("[registerRaiseHandStateChangedHandler] Handler cannot be null");Le(he,x.sidePanel,x.meetingStage),Ze("meeting.raiseHandStateChanged",e)},e.registerMeetingReactionReceivedHandler=function(e){if(!e)throw new Error("[registerMeetingReactionReceivedHandler] Handler cannot be null");Le(he,x.sidePanel,x.meetingStage),Ze("meeting.meetingReactionReceived",e)},function(e){e.setOptions=function(e){Le(he,x.sidePanel),e.contentUrl&&new URL(e.contentUrl),wt("meeting.appShareButton.setOptions",[e])}}(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(he,x.sidePanel,x.meetingStage),e.isAppHandlingAudio?n(e,t):r(e,t)},e.updateMicState=function(e){o(e,t.AppInitiated)}}(Vn||(Vn={})),function(e){function t(){return!(!Le(he)||!he.supports.monetization)}e.openPurchaseExperience=function(e,n){var r,o;return"function"==typeof e?(r=e,o=n):o=e,Le(he,x.content),te((function(){return new Promise((function(e){if(!t())throw z;e(mt("monetization.openPurchaseExperience",o))}))}),r)},e.isSupported=t}(_n||(_n={})),function(e){function t(){return!(!Le(he)||!he.supports.calendar)}e.openCalendarItem=function(e){return new Promise((function(n){if(Le(he,x.content),!t())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openCalendarItem");n(ft("calendar.openCalendarItem",e))}))},e.composeMeeting=function(e){return new Promise((function(n){if(Le(he,x.content),!t())throw new Error("Not supported");he.isLegacyTeams?n(ft("executeDeepLink",fn(e.attendees,e.startTime,e.endTime,e.subject,e.content))):n(ft("calendar.composeMeeting",e))}))},e.isSupported=t}(Wn||(Wn={})),function(e){function t(){return!(!Le(he)||!he.supports.mail)}e.openMailItem=function(e){return new Promise((function(n){if(Le(he,x.content),!t())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openMailItem");n(ft("mail.openMailItem",e))}))},e.composeMail=function(e){return new Promise((function(n){if(Le(he,x.content),!t())throw new Error("Not supported");n(ft("mail.composeMail",e))}))},e.isSupported=t,function(e){e.New="new",e.Reply="reply",e.ReplyAll="replyAll",e.Forward="forward"}(e.ComposeMailType||(e.ComposeMailType={}))}(Bn||(Bn={})),function(e){function t(e){return new Promise((function(t){if(!He(c))throw{errorCode:D.OLD_PLATFORM};if(!kn(e))throw{errorCode:D.INVALID_ARGUMENTS};if(!n())throw z;t(mt("people.selectPeople",e))}))}function n(){return!(!Le(he)||!he.supports.people)}e.selectPeople=function(e,n){var r,o,i;return Le(he,x.content,x.task,x.settings),"function"==typeof e?(o=(r=[e,n])[0],i=r[1]):i=e,Y(t,o,i)},e.isSupported=n}(jn||(jn={})),function(e){e.showProfile=function(e){return Le(he,x.content),new Promise((function(t){var n=Jn(e),r=n[0],o=n[1];if(!r)throw{errorCode:D.INVALID_ARGUMENTS,message:o};t(mt("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(he)||!he.supports.profile)}}(zn||(zn={}));var Zn,Xn=function(){function e(){}return e.setTimeout=function(t,n){var r=performance.now(),o=Q();return e.setTimeoutCallbacks[o]={callback:t,timeoutInMs:n,startedAtInMs:r},o},e.clearTimeout=function(t){delete e.setTimeoutCallbacks[t]},e.setInterval=function(t,n){e.setTimeout((function r(){t(),e.setTimeout(r,n)}),n)},e.tick=function(){var t=performance.now(),n=[];for(var r in e.setTimeoutCallbacks){t-(a=e.setTimeoutCallbacks[r]).startedAtInMs>=a.timeoutInMs&&n.push(r)}for(var o=0,i=n;o<i.length;o++){var a,s=i[o];(a=e.setTimeoutCallbacks[s]).callback(),delete e.setTimeoutCallbacks[s]}},e.setTimeoutCallbacks={},e}(),Qn=function(){function e(e,t){this.reportStatisticsResult=t,this.sampleCount=0,this.distributionBins=new Uint32Array(e)}return e.prototype.processStarts=function(e,t,n,r){Xn.tick(),this.suitableForThisSession(e,t,n,r)||this.reportAndResetSession(this.getStatistics(),e,r,t,n),this.start()},e.prototype.processEnds=function(){var 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},e.prototype.getStatistics=function(){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},e.prototype.start=function(){this.frameProcessingStartedAt=performance.now()},e.prototype.suitableForThisSession=function(e,t,n,r){return this.currentSession&&this.currentSession.effectId===e&&this.currentSession.effectParam===r&&this.currentSession.frameWidth===t&&this.currentSession.frameHeight===n},e.prototype.reportAndResetSession=function(e,t,n,r,o){var i=this;e&&this.reportStatisticsResult(e),this.resetCurrentSession(this.getNextTimeout(t,this.currentSession),t,n,r,o),this.timeoutId&&Xn.clearTimeout(this.timeoutId),this.timeoutId=Xn.setTimeout(function(){return i.reportAndResetSession(i.getStatistics(),t,n,r,o)}.bind(this),this.currentSession.timeoutInMs)},e.prototype.resetCurrentSession=function(e,t,n,r,o){this.currentSession={startedAtInMs:performance.now(),timeoutInMs:e,effectId:t,effectParam:n,frameWidth:r,frameHeight:o},this.sampleCount=0,this.distributionBins.fill(0)},e.prototype.getNextTimeout=function(t,n){return n&&n.effectId===t?Math.min(e.maxSessionTimeoutInMs,2*n.timeoutInMs):e.initialSessionTimeoutInMs},e.initialSessionTimeoutInMs=1e3,e.maxSessionTimeoutInMs=3e4,e}(),$n=function(){function e(t){var n=this;this.reportPerformanceEvent=t,this.isFirstFrameProcessed=!1,this.frameProcessTimeLimit=100,this.frameProcessingStartedAt=0,this.frameProcessingTimeCost=0,this.processedFrameCount=0,this.performanceStatistics=new Qn(e.distributionBinSize,(function(e){return n.reportPerformanceEvent("video.performance.performanceDataGenerated",[e])}))}return e.prototype.startMonitorSlowFrameProcessing=function(){var t=this;Xn.setInterval((function(){if(0!==t.processedFrameCount){var e=t.frameProcessingTimeCost/t.processedFrameCount;e>t.frameProcessTimeLimit&&t.reportPerformanceEvent("video.performance.frameProcessingSlow",[e]),t.frameProcessingTimeCost=0,t.processedFrameCount=0}}),e.calculateFPSInterval)},e.prototype.setFrameProcessTimeLimit=function(e){this.frameProcessTimeLimit=e},e.prototype.reportApplyingVideoEffect=function(e,t){var n,r;(null===(n=this.applyingEffect)||void 0===n?void 0:n.effectId)===e&&(null===(r=this.applyingEffect)||void 0===r?void 0:r.effectParam)===t||(this.applyingEffect={effectId:e,effectParam:t},this.appliedEffect=void 0)},e.prototype.reportVideoEffectChanged=function(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)},e.prototype.reportStartFrameProcessing=function(e,t){Xn.tick(),this.appliedEffect&&(this.frameProcessingStartedAt=performance.now(),this.performanceStatistics.processStarts(this.appliedEffect.effectId,e,t,this.appliedEffect.effectParam))},e.prototype.reportFrameProcessed=function(){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])))},e.prototype.reportGettingTextureStream=function(e){this.gettingTextureStreamStartedAt=performance.now(),this.currentStreamId=e},e.prototype.reportTextureStreamAcquired=function(){if(void 0!==this.gettingTextureStreamStartedAt){var e=performance.now()-this.gettingTextureStreamStartedAt;this.reportPerformanceEvent("video.performance.textureStreamAcquired",[this.currentStreamId,e])}},e.distributionBinSize=1e3,e.calculateFPSInterval=1e3,e}(),Yn=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))},er=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(e){return function(t){return c([e,t])}}function c(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}};function tr(e,t,n,r){return Yn(this,void 0,void 0,(function(){var o;return er(this,(function(i){switch(i.label){case 0:return o=or,[4,rr(e,n,r)];case 1:return[2,o.apply(void 0,[i.sent(),new ir(n,t)])]}}))}))}function nr(e,t,n,r){return Yn(this,void 0,void 0,(function(){var o;return er(this,(function(i){switch(i.label){case 0:return o=or,[4,rr(e,n,r)];case 1:return[2,o.apply(void 0,[i.sent(),new cr(n,t)])]}}))}))}function rr(e,t,n){return Yn(this,void 0,void 0,(function(){var r,o,i,a,s;return er(this,(function(c){switch(c.label){case 0:if(We())throw z;r=window.chrome,c.label=1;case 1:return c.trys.push([1,3,,4]),null==n||n.reportGettingTextureStream(e),[4,r.webview.getTextureStream(e)];case 2:if(o=c.sent(),0===(i=o.getVideoTracks()).length)throw new Error("No video track in stream ".concat(e));return null==n||n.reportTextureStreamAcquired(),[2,i[0]];case 3:throw a=c.sent(),s="Failed to get video track from stream ".concat(e,", error: ").concat(a),t(s),new Error("Internal error: can't get video track from stream ".concat(e));case 4:return[2]}}))}))}function or(e,t){if(We())throw z;var n=new(0,window.MediaStreamTrackProcessor)({track:e}).readable,r=new(0,window.MediaStreamTrackGenerator)({kind:"video"}),o=r.writable;return n.pipeThrough(new TransformStream(t)).pipeTo(o),r}!function(e){e.TimestampIsNull="timestamp of the original video frame is null",e.UnsupportedVideoFramePixelFormat="Unsupported video frame pixel format"}(Zn||(Zn={}));var ir=function(){return function(e,t){var n=this;this.notifyError=e,this.videoFrameHandler=t,this.transform=function(e,t){return Yn(n,void 0,void 0,(function(){var n,r,o,i;return er(this,(function(a){switch(a.label){case 0:if(null===(n=e.timestamp))return[3,5];a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.videoFrameHandler({videoFrame:e})];case 2:return r=a.sent(),o=new VideoFrame(r,{timestamp:n}),t.enqueue(o),e.close(),r.close(),[3,4];case 3:return i=a.sent(),e.close(),this.notifyError(i),[3,4];case 4:return[3,6];case 5:this.notifyError(Zn.TimestampIsNull),a.label=6;case 6:return[2]}}))}))}}}(),ar=function(){function e(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)}return Object.defineProperty(e.prototype,"oneTextureLayoutId",{get:function(){return this.headerDataView[0]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this.headerDataView[1]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"frameRowOffset",{get:function(){return this.headerDataView[2]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"frameFormat",{get:function(){return this.headerDataView[3]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"frameWidth",{get:function(){return this.headerDataView[4]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"frameHeight",{get:function(){return this.headerDataView[5]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"multiStreamHeaderRowOffset",{get:function(){return this.headerDataView[6]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"multiStreamCount",{get:function(){return this.headerDataView[7]},enumerable:!1,configurable:!0}),e}(),sr=function(){function e(e,t){this.metadataMap=new Map,this.AUDIO_INFERENCE_RESULT_STREAM_ID=828664161;for(var n=new Uint32Array(e),r=0,o=0;r<t;r++){var i=n[o++],a=n[o++],s=n[o++],c=new Uint8Array(e,a,s);this.metadataMap.set(i,c)}}return Object.defineProperty(e.prototype,"audioInferenceResult",{get:function(){return this.metadataMap.get(this.AUDIO_INFERENCE_RESULT_STREAM_ID)},enumerable:!1,configurable:!0}),e}(),cr=function(){return function(e,t){var n=this;this.notifyError=e,this.videoFrameHandler=t,this.shouldDiscardAudioInferenceResult=!1,this.transform=function(e,t){return Yn(n,void 0,void 0,(function(){var n,r,o,i,a,s,c,u;return er(this,(function(l){switch(l.label){case 0:if(null===(n=e.timestamp))return[3,6];l.label=1;case 1:return l.trys.push([1,4,,5]),[4,this.extractVideoFrameAndMetadata(e)];case 2:return r=l.sent(),o=r.videoFrame,i=r.metadata,a=(void 0===i?{}:i).audioInferenceResult,[4,this.videoFrameHandler({videoFrame:o,audioInferenceResult:a})];case 3:return s=l.sent(),c=new VideoFrame(s,{timestamp:n}),t.enqueue(c),o.close(),e.close(),s.close(),[3,5];case 4:return u=l.sent(),e.close(),this.notifyError(u),[3,5];case 5:return[3,7];case 6:this.notifyError(Zn.TimestampIsNull),l.label=7;case 7:return[2]}}))}))},this.extractVideoFrameAndMetadata=function(e){return Yn(n,void 0,void 0,(function(){var t,n,r,o,i,a;return er(this,(function(s){switch(s.label){case 0:if(We())throw z;if("NV12"!==e.format)throw this.notifyError(Zn.UnsupportedVideoFramePixelFormat),new Error(Zn.UnsupportedVideoFramePixelFormat);return t={x:0,y:0,width:e.codedWidth,height:2},n=new ArrayBuffer(t.width*t.height*3/2),[4,e.copyTo(n,{rect:t})];case 1:return s.sent(),r=new ar(n,this.notifyError),o={x:0,y:r.multiStreamHeaderRowOffset,width:e.codedWidth,height:e.codedHeight-r.multiStreamHeaderRowOffset},i=new ArrayBuffer(o.width*o.height*3/2),[4,e.copyTo(i,{rect:o})];case 2:return s.sent(),a=new sr(i,r.multiStreamCount),[2,{videoFrame:new VideoFrame(e,{timestamp:e.timestamp,visibleRect:{x:0,y:r.frameRowOffset,width:r.frameWidth,height:r.frameHeight}}),metadata:{audioInferenceResult:this.shouldDiscardAudioInferenceResult?void 0:a.audioInferenceResult}}]}}))}))},Ze("video.mediaStream.audioInferenceDiscardStatusChange",(function(e){var t=e.discardAudioInferenceResult;n.shouldDiscardAudioInferenceResult=t}))}}();function ur(e,t){return function(n,r){null==t||t.reportApplyingVideoEffect(n||"",r),e(n,r).then((function(){null==t||t.reportVideoEffectChanged(n||"",r),wt("video.videoEffectReadiness",[!0,n,void 0,r])})).catch((function(e){var t=e in lr.EffectFailureReason?e:lr.EffectFailureReason.InitializationFailure;wt("video.videoEffectReadiness",[!1,n,t,r])}))}}var lr,dr,fr,pr,mr,hr,gr,wr,vr=function(){return vr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},vr.apply(this,arguments)},Cr=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))},yr=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(e){return function(t){return c([e,t])}}function c(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},br=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function Sr(e,t){ke.initialize(t).then((function(){e&&e()}))}function Er(){Ae.enablePrintCapability()}function Ir(){Ae.print()}function Tr(e){Ue(),wt("getContext",(function(t){t.frameContext||(t.frameContext=y.frameContext),e(t)}))}function Pr(e){ke.registerOnThemeChangeHandler(e)}function Fr(e){$e("fullScreenChange",e,[])}function Ar(e){$e("appButtonClick",e,[x.content])}function kr(e){$e("appButtonHoverEnter",e,[x.content])}function Rr(e){$e("appButtonHoverLeave",e,[x.content])}function Or(e){Re.backStack.registerBackButtonHandlerHelper(e)}function Mr(e){Ae.registerOnLoadHandlerHelper(e)}function Dr(e){Ae.registerBeforeUnloadHandlerHelper(e)}function Nr(e){$e("focusEnter",e,[])}function Ur(e){$e("changeSettings",e,[x.content])}function Lr(e,t){Le(he),Re.tabs.getTabInstances(t).then((function(t){e(t)}))}function Hr(e,t){Le(he),Re.tabs.getMruTabInstances(t).then((function(t){e(t)}))}function xr(e){Re.shareDeepLink({subPageId:e.subEntityId,subPageLabel:e.subEntityLabel,subPageWebUrl:e.subEntityWebUrl})}function Vr(e,t){Le(he,x.content,x.sidePanel,x.settings,x.task,x.stage,x.meetingStage),t=t||Z(),ke.openLink(e).then((function(){t(!0)})).catch((function(e){t(!1,e.message)}))}function _r(e){Re.setCurrentFrame(e)}function Wr(e,t,n){Re.initializeWithFrameContext(e,t,n)}function Br(e){Re.returnFocus(e)}function jr(e,t){Le(he),t=t||Z(),Re.tabs.navigateToTab(e).then((function(){t(!0)})).catch((function(e){t(!1,e.message)}))}function zr(e,t){Le(he,x.content,x.sidePanel,x.settings,x.remove,x.task,x.stage,x.meetingStage),t=t||Z(),Re.navigateCrossDomain(e).then((function(){t(!0)})).catch((function(e){t(!1,e.message)}))}function Gr(e){Le(he),e=e||Z(),Re.backStack.navigateBack().then((function(){e(!0)})).catch((function(t){e(!1,t.message)}))}!function(e){var t=We()?void 0:new $n(wt);function n(e){wt("video.videoFrameProcessed",[e])}function r(e){wt("video.notifyError",[e])}function o(){return Le(he)&&!!he.supports.video&&(!!he.supports.video.mediaStream||!!he.supports.video.sharedFrame)}function i(e,n){var i=this;if(Le(he,x.sidePanel),!o()||!u())throw z;Ze("video.startVideoExtensibilityVideoStream",(function(n){return Cr(i,void 0,void 0,(function(){var o,i,s,c,u;return yr(this,(function(l){switch(l.label){case 0:return o=n.streamId,i=a(e,t),[4,tr(o,i,r,t)];case 1:return s=l.sent(),!We()&&(null===(u=null===(c=window.chrome)||void 0===c?void 0:c.webview)||void 0===u||u.registerTextureStream(o,s)),[2]}}))}))}),!1),wt("video.mediaStream.registerForVideoFrame",[n])}function a(e,t){var n=this;return function(r){return Cr(n,void 0,void 0,(function(){var n,o;return yr(this,(function(i){switch(i.label){case 0:return n=r.videoFrame,null==t||t.reportStartFrameProcessing(n.codedWidth,n.codedHeight),[4,e(r)];case 1:return o=i.sent(),null==t||t.reportFrameProcessed(),[2,o]}}))}))}}function s(e,i){if(Le(he,x.sidePanel),!o()||!d())throw z;Ze("video.newVideoFrame",(function(o){if(o){var i=o.timestamp;null==t||t.reportStartFrameProcessing(o.width,o.height),e(c(o),(function(){null==t||t.reportFrameProcessed(),n(i)}),r)}}),!1),wt("video.registerForVideoFrame",[i])}function c(e){if("videoFrameBuffer"in e)return e;var t=e.data,n=br(e,["data"]);return vr(vr({},n),{videoFrameBuffer:t})}function u(){var e;return Le(he,x.sidePanel)&&l()&&!!(null===(e=he.supports.video)||void 0===e?void 0:e.mediaStream)}function l(){var e,t,n,r;return!We()&&!(!(null===(t=null===(e=window.chrome)||void 0===e?void 0:e.webview)||void 0===t?void 0:t.getTextureStream)||!(null===(r=null===(n=window.chrome)||void 0===n?void 0:n.webview)||void 0===r?void 0:r.registerTextureStream))}function d(){var e;return Le(he,x.sidePanel)&&!!(null===(e=he.supports.video)||void 0===e?void 0:e.sharedFrame)}!function(e){e.NV12="NV12"}(e.VideoFrameFormat||(e.VideoFrameFormat={})),function(e){e.EffectChanged="EffectChanged",e.EffectDisabled="EffectDisabled"}(e.EffectChangeType||(e.EffectChangeType={})),function(e){e.InvalidEffectId="InvalidEffectId",e.InitializationFailure="InitializationFailure"}(e.EffectFailureReason||(e.EffectFailureReason={})),e.registerForVideoFrame=function(e){if(Le(he,x.sidePanel),!o())throw z;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(Ze("video.setFrameProcessTimeLimit",(function(e){return null==t?void 0:t.setFrameProcessTimeLimit(e.timeLimit)}),!1),u())i(e.videoFrameHandler,e.config);else{if(!d())throw z;s(e.videoBufferHandler,e.config)}null==t||t.startMonitorSlowFrameProcessing()},e.notifySelectedVideoEffectChanged=function(e,t){if(Le(he,x.sidePanel),!o())throw z;wt("video.videoEffectChanged",[e,t])},e.registerForVideoEffect=function(e){if(Le(he,x.sidePanel),!o())throw z;Ze("video.effectParameterChange",ur(e,t),!1),wt("video.registerForVideoEffect")},e.isSupported=o}(lr||(lr={})),function(e){var t="search.queryChange",n="search.queryClose",r="search.queryExecute";function o(){return!(!Le(he)||!he.supports.search)}e.registerHandlers=function(e,i,a){if(Le(he,x.content),!o())throw z;Ze(n,e),Ze(r,i),a&&Ze(t,a)},e.unregisterHandlers=function(){if(Le(he,x.content),!o())throw z;wt("search.unregister"),Xe(t),Xe(n),Xe(r)},e.isSupported=o,e.closeSearch=function(){return new Promise((function(e){if(Le(he,x.content),!o())throw new Error("Not supported");e(ft("search.closeSearch"))}))}}(dr||(dr={})),function(e){function t(t){return new Promise((function(n){if(!i())throw z;n(mt(e.SharingAPIMessages.shareWebContent,t))}))}function n(e){if(!(e&&e.content&&e.content.length))throw{errorCode:D.INVALID_ARGUMENTS,message:"Shared content is missing"}}function r(e){if(e.content.some((function(e){return!e.type})))throw{errorCode:D.INVALID_ARGUMENTS,message:"Shared content type cannot be undefined"};if(e.content.some((function(t){return t.type!==e.content[0].type})))throw{errorCode:D.INVALID_ARGUMENTS,message:"Shared content must be of the same type"}}function o(e){if("URL"!==e.content[0].type)throw{errorCode:D.INVALID_ARGUMENTS,message:"Content type is unsupported"};if(e.content.some((function(e){return!e.url})))throw{errorCode:D.INVALID_ARGUMENTS,message:"URLs are required for URL content types"}}function i(){return!(!Le(he)||!he.supports.sharing)}e.SharingAPIMessages={shareWebContent:"sharing.shareWebContent"},e.shareWebContent=function(e,i){try{n(e),r(e),o(e)}catch(e){return ee((function(){return Promise.reject(e)}),i)}return Le(he,x.content,x.sidePanel,x.task,x.stage,x.meetingStage),ee(t,i,e)},e.isSupported=i}(fr||(fr={})),function(e){function t(){return!(!Le(he)||!he.supports.stageView)}e.open=function(e){return new Promise((function(n){if(Le(he,x.content),!t())throw z;if(!e)throw new Error("[stageView.open] Stage view params cannot be null");n(mt("stageView.open",e))}))},e.isSupported=t}(pr||(pr={})),function(e){function t(){return!(!Le(he)||!he.supports.webStorage)}e.isWebStorageClearedOnUserLogOut=function(){return Le(he),t()},e.isSupported=t}(mr||(mr={})),function(e){var t;function n(){return!(!Le(he)||!he.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){return new Promise((function(r){var o;if(Le(he,x.content,x.task),!n())throw z;if(!he.isLegacyTeams)return wt("call.startCall",[e],r);r(dt("executeDeepLink",dn(e.targets,null===(o=e.requestedModalities)||void 0===o?void 0:o.includes(t.Video),e.source)).then((function(e){if(!e)throw new Error(C);return e})))}))},e.isSupported=n}(hr||(hr={})),function(e){e.Messages=ke.Messages,e.FailedReason=ke.FailedReason,e.ExpectedFailureReason=ke.ExpectedFailureReason,e.notifyAppLoaded=function(){ke.notifyAppLoaded()},e.notifySuccess=function(){ke.notifySuccess()},e.notifyFailure=function(e){ke.notifyFailure(e)},e.notifyExpectedFailure=function(e){ke.notifyExpectedFailure(e)}}(gr||(gr={})),function(e){e.setValidityState=function(e){Re.config.setValidityState(e)},e.getSettings=function(e){Le(he,x.content,x.settings,x.remove,x.sidePanel),Re.getConfig().then((function(t){e(t)}))},e.setSettings=function(e,t){Le(he,x.content,x.settings,x.sidePanel),t=t||Z(),Re.config.setConfig(e).then((function(){t(!0)})).catch((function(e){t(!1,e.message)}))},e.registerOnSaveHandler=function(e){Re.config.registerOnSaveHandlerHelper(e)},e.registerOnRemoveHandler=function(e){Re.config.registerOnRemoveHandlerHelper(e)}}(wr||(wr={}));var qr,Jr,Kr=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};!function(e){function t(e){return{url:e.url,size:{height:e.height?e.height:j.Small,width:e.width?e.width:j.Small},title:e.title,fallbackUrl:e.fallbackUrl}}function n(e){return{url:e.url,size:{height:e.height?e.height:j.Small,width:e.width?e.width:j.Small},title:e.title,fallbackUrl:e.fallbackUrl,completionBotId:e.completionBotId}}function r(e){return e.height=e.height?e.height:j.Small,e.width=e.width?e.width:j.Small,e}e.startTask=function(e,r){var o=r?function(e){return r(e.err,e.result)}:void 0;return void 0===e.card&&void 0===e.url||e.card?(Le(he,x.content,x.sidePanel,x.meetingStage),wt("tasks.startTask",[e],r)):void 0!==e.completionBotId?Pe.url.bot.open(n(e),o):Pe.url.open(t(e),o),new Hn},e.updateTask=function(e){(e=r(e)).width,e.height;var t=Kr(e,["width","height"]);if(Object.keys(t).length)throw new Error("resize requires a TaskInfo argument containing only width and height");Pe.update.resize(e)},e.submitTask=function(e,t){Pe.url.submit(e,t)},e.getDefaultSizeIfNotProvided=r}(qr||(qr={})),function(e){!function(e){e.guest="Guest",e.attendee="Attendee",e.presenter="Presenter",e.organizer="Organizer"}(e.UserMeetingRole||(e.UserMeetingRole={})),function(e){e.added="Added",e.alreadyExists="AlreadyExists",e.conflict="Conflict",e.notFound="NotFound"}(e.ContainerState||(e.ContainerState={})),e.isSupported=function(){return!(!Le(he,x.meetingStage,x.sidePanel)||!he.supports.interactive)}}(Jr||(Jr={}));var Zr=function(){function e(){}return e.prototype.getFluidTenantInfo=function(){return Xr(),new Promise((function(e){e(mt("interactive.getFluidTenantInfo"))}))},e.prototype.getFluidToken=function(e){return Xr(),new Promise((function(t){t(mt("interactive.getFluidToken",e))}))},e.prototype.getFluidContainerId=function(){return Xr(),new Promise((function(e){e(mt("interactive.getFluidContainerId"))}))},e.prototype.setFluidContainerId=function(e){return Xr(),new Promise((function(t){t(mt("interactive.setFluidContainerId",e))}))},e.prototype.getNtpTime=function(){return Xr(),new Promise((function(e){e(mt("interactive.getNtpTime"))}))},e.prototype.registerClientId=function(e){return Xr(),new Promise((function(t){t(mt("interactive.registerClientId",e))}))},e.prototype.getClientRoles=function(e){return Xr(),new Promise((function(t){t(mt("interactive.getClientRoles",e))}))},e.prototype.getClientInfo=function(e){return Xr(),new Promise((function(t){t(mt("interactive.getClientInfo",e))}))},e.create=function(){return Xr(),new e},e}();function Xr(){if(!Jr.isSupported())throw new Error("LiveShareHost Not supported")}const Qr=/^(?:[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 $r=function(e){return"string"==typeof e&&Qr.test(e)};var Yr=function(){return Yr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Yr.apply(this,arguments)},eo=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function to(e){try{return e.cartItems=no(e.cartItems),e}catch(e){throw new Error("Error deserializing cart")}}function no(e){return e.map((function(e){if(e.imageURL){var t=new URL(e.imageURL);e.imageURL=t}return e.accessories&&(e.accessories=no(e.accessories)),e}))}var ro=function(e){try{return e.map((function(e){var t=e.imageURL,n=e.accessories,r=eo(e,["imageURL","accessories"]),o=Yr({},r);return t&&(o.imageURL=t.href),n&&(o.accessories=ro(n)),o}))}catch(e){throw new Error("Error serializing cart items")}};function oo(e){if(!Array.isArray(e)||0===e.length)throw new Error("cartItems must be a non-empty array");for(var t=0,n=e;t<n.length;t++){var r=n[t];ao(r),io(r.accessories)}}function io(e){if(null!=e){if(!Array.isArray(e)||0===e.length)throw new Error("CartItem.accessories must be a non-empty array");for(var t=0,n=e;t<n.length;t++){var r=n[t];if(r.accessories)throw new Error("Item in CartItem.accessories cannot have accessories");ao(r)}}}function ao(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");co(e.price),uo(e.quantity)}function so(e){if(null!=e){if(!e)throw new Error("id must not be empty");if(!1===$r(e))throw new Error("id must be a valid UUID")}}function co(e){if("number"!=typeof e||e<0)throw new Error("price ".concat(e," must be a number not less than 0"));if(parseFloat(e.toFixed(3))!==e)throw new Error("price ".concat(e," must have at most 3 decimal places"))}function uo(e){if("number"!=typeof e||e<=0||parseInt(e.toString())!==e)throw new Error("quantity ".concat(e," must be an integer greater than 0"))}function lo(e){if(!Object.values(fo.CartStatus).includes(e))throw new Error("cartStatus ".concat(e," is not valid"))}var fo,po,mo,ho,go,wo,vo,Co=function(){return Co=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Co.apply(this,arguments)};!function(e){function t(){return!(!Le(he)||!he.supports.marketplace)}e.cartVersion={majorVersion:1,minorVersion:1},function(e){e.TACAdminUser="TACAdminUser",e.TeamsAdminUser="TeamsAdminUser",e.TeamsEndUser="TeamsEndUser"}(e.Intent||(e.Intent={})),function(e){e.Open="Open",e.Processing="Processing",e.Processed="Processed",e.Closed="Closed",e.Error="Error"}(e.CartStatus||(e.CartStatus={})),e.getCart=function(){if(Le(he,x.content,x.task),!t())throw z;return mt("marketplace.getCart",e.cartVersion).then(to)},e.addOrUpdateCartItems=function(n){if(Le(he,x.content,x.task),!t())throw z;if(!n)throw new Error("addOrUpdateCartItemsParams must be provided");return so(null==n?void 0:n.cartId),oo(null==n?void 0:n.cartItems),mt("marketplace.addOrUpdateCartItems",Co(Co({},n),{cartItems:ro(n.cartItems),cartVersion:e.cartVersion})).then(to)},e.removeCartItems=function(n){if(Le(he,x.content,x.task),!t())throw z;if(!n)throw new Error("removeCartItemsParams must be provided");if(so(null==n?void 0:n.cartId),!Array.isArray(null==n?void 0:n.cartItemIds)||0===(null==n?void 0:n.cartItemIds.length))throw new Error("cartItemIds must be a non-empty array");return mt("marketplace.removeCartItems",Co(Co({},n),{cartVersion:e.cartVersion})).then(to)},e.updateCartStatus=function(n){if(Le(he,x.content,x.task),!t())throw z;if(!n)throw new Error("updateCartStatusParams must be provided");return so(null==n?void 0:n.cartId),lo(null==n?void 0:n.cartStatus),mt("marketplace.updateCartStatus",Co(Co({},n),{cartVersion:e.cartVersion})).then(to)},e.isSupported=t}(fo||(fo={})),function(e){function t(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"}(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"}(e.CloudStorageProviderType||(e.CloudStorageProviderType={})),function(e){e.ClassMaterials="classMaterials"}(e.SpecialDocumentLibraryType||(e.SpecialDocumentLibraryType={})),function(e){e.Readonly="readonly"}(e.DocumentLibraryAccessType||(e.DocumentLibraryAccessType={})),function(e){e.Downloaded="Downloaded",e.Downloading="Downloading",e.Failed="Failed"}(e.FileDownloadStatus||(e.FileDownloadStatus={})),function(e){e.Download="DOWNLOAD",e.Upload="UPLOAD",e.Delete="DELETE"}(e.CloudStorageProviderFileAction||(e.CloudStorageProviderFileAction={})),e.getCloudStorageFolders=function(e,t){if(Le(he,x.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");wt("files.getCloudStorageFolders",[e],t)},e.addCloudStorageFolder=function(e,t){if(Le(he,x.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");wt("files.addCloudStorageFolder",[e],t)},e.deleteCloudStorageFolder=function(e,t,n){if(Le(he,x.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");wt("files.deleteCloudStorageFolder",[e,t],n)},e.getCloudStorageFolderContents=function(e,t,n){if(Le(he,x.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");wt("files.getCloudStorageFolderContents",[e,t],n)},e.openCloudStorageFile=function(e,t,n){if(Le(he,x.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");wt("files.openCloudStorageFile",[e,t,n])},e.getExternalProviders=function(e,t){if(void 0===e&&(e=!1),Le(he,x.content),!t)throw new Error("[files.getExternalProviders] Callback cannot be null");wt("files.getExternalProviders",[e],t)},e.copyMoveFiles=function(e,t,n,r,o,i){if(void 0===o&&(o=!1),Le(he,x.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(!r)throw new Error("[files.copyMoveFiles] destinationProviderCode cannot be null or empty");if(!i)throw new Error("[files.copyMoveFiles] callback cannot be null");wt("files.copyMoveFiles",[e,t,n,r,o],i)},e.getFileDownloads=function(e){if(Le(he,x.content),!e)throw new Error("[files.getFileDownloads] Callback cannot be null");wt("files.getFileDownloads",[],e)},e.openDownloadFolder=function(e,t){if(void 0===e&&(e=void 0),Le(he,x.content),!t)throw new Error("[files.openDownloadFolder] Callback cannot be null");wt("files.openDownloadFolder",[e],t)},e.addCloudStorageProvider=function(e){if(Le(he,x.content),!e)throw t(D.INVALID_ARGUMENTS,"[files.addCloudStorageProvider] callback cannot be null");wt("files.addCloudStorageProvider",[],e)},e.removeCloudStorageProvider=function(e,n){if(Le(he,x.content),!n)throw t(D.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] callback cannot be null");if(!e||!e.content)throw t(D.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] 3P cloud storage provider request content is missing");wt("files.removeCloudStorageProvider",[e],n)},e.addCloudStorageProviderFile=function(e,n){if(Le(he,x.content),!n)throw t(D.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw t(D.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] 3P cloud storage provider request content is missing");wt("files.addCloudStorageProviderFile",[e],n)},e.renameCloudStorageProviderFile=function(e,n){if(Le(he,x.content),!n)throw t(D.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw t(D.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] 3P cloud storage provider request content is missing");wt("files.renameCloudStorageProviderFile",[e],n)},e.deleteCloudStorageProviderFile=function(e,n){if(Le(he,x.content),!n)throw t(D.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw t(D.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] 3P cloud storage provider request content details are missing");wt("files.deleteCloudStorageProviderFile",[e],n)},e.downloadCloudStorageProviderFile=function(e,n){if(Le(he,x.content),!n)throw t(D.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw t(D.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");wt("files.downloadCloudStorageProviderFile",[e],n)},e.uploadCloudStorageProviderFile=function(e,n){if(Le(he,x.content),!n)throw t(D.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw t(D.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");if(!e.content.destinationFolder)throw t(D.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] Invalid destination folder details");wt("files.uploadCloudStorageProviderFile",[e],n)},e.registerCloudStorageProviderListChangeHandler=function(e){if(Le(he),!e)throw new Error("[registerCloudStorageProviderListChangeHandler] Handler cannot be null");Ze("files.cloudStorageProviderListChange",e)},e.registerCloudStorageProviderContentChangeHandler=function(e){if(Le(he),!e)throw new Error("[registerCloudStorageProviderContentChangeHandler] Handler cannot be null");Ze("files.cloudStorageProviderContentChange",e)}}(po||(po={})),function(e){function t(){return!(!Le(he)||!he.supports.meetingRoom)}e.getPairedMeetingRoomInfo=function(){return new Promise((function(e){if(Le(he),!t())throw z;e(mt("meetingRoom.getPairedMeetingRoomInfo"))}))},e.sendCommandToPairedMeetingRoom=function(e){return new Promise((function(n){if(!e||0==e.length)throw new Error("[meetingRoom.sendCommandToPairedMeetingRoom] Command name cannot be null or empty");if(Le(he),!t())throw z;n(mt("meetingRoom.sendCommandToPairedMeetingRoom",e))}))},e.registerMeetingRoomCapabilitiesUpdateHandler=function(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler] Handler cannot be null");if(Le(he),!t())throw z;Ze("meetingRoom.meetingRoomCapabilitiesUpdate",(function(t){Le(he),e(t)}))},e.registerMeetingRoomStatesUpdateHandler=function(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomStatesUpdateHandler] Handler cannot be null");if(Le(he),!t())throw z;Ze("meetingRoom.meetingRoomStatesUpdate",(function(t){Le(he),e(t)}))},e.isSupported=t}(mo||(mo={})),function(e){function t(){return!(!Le(he)||!he.supports.notifications)}e.showNotification=function(e){if(Le(he,x.content),!t())throw z;wt("notifications.showNotification",[e])},e.isSupported=t}(ho||(ho={})),function(e){function t(){return!(!Le(he)||!he.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"}(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"}(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"}(e.SessionTerminatedReason||(e.SessionTerminatedReason={})),e.getCapableParticipants=function(e){if(!e)throw new Error("[remoteCamera.getCapableParticipants] Callback cannot be null");if(Le(he,x.sidePanel),!t())throw z;wt("remoteCamera.getCapableParticipants",e)},e.requestControl=function(e,n){if(!e)throw new Error("[remoteCamera.requestControl] Participant cannot be null");if(!n)throw new Error("[remoteCamera.requestControl] Callback cannot be null");if(Le(he,x.sidePanel),!t())throw z;wt("remoteCamera.requestControl",[e],n)},e.sendControlCommand=function(e,n){if(!e)throw new Error("[remoteCamera.sendControlCommand] ControlCommand cannot be null");if(!n)throw new Error("[remoteCamera.sendControlCommand] Callback cannot be null");if(Le(he,x.sidePanel),!t())throw z;wt("remoteCamera.sendControlCommand",[e],n)},e.terminateSession=function(e){if(!e)throw new Error("[remoteCamera.terminateSession] Callback cannot be null");if(Le(he,x.sidePanel),!t())throw z;wt("remoteCamera.terminateSession",e)},e.registerOnCapableParticipantsChangeHandler=function(e){if(!e)throw new Error("[remoteCamera.registerOnCapableParticipantsChangeHandler] Handler cannot be null");if(Le(he,x.sidePanel),!t())throw z;Ze("remoteCamera.capableParticipantsChange",e)},e.registerOnErrorHandler=function(e){if(!e)throw new Error("[remoteCamera.registerOnErrorHandler] Handler cannot be null");if(Le(he,x.sidePanel),!t())throw z;Ze("remoteCamera.handlerError",e)},e.registerOnDeviceStateChangeHandler=function(e){if(!e)throw new Error("[remoteCamera.registerOnDeviceStateChangeHandler] Handler cannot be null");if(Le(he,x.sidePanel),!t())throw z;Ze("remoteCamera.deviceStateChange",e)},e.registerOnSessionStatusChangeHandler=function(e){if(!e)throw new Error("[remoteCamera.registerOnSessionStatusChangeHandler] Handler cannot be null");if(Le(he,x.sidePanel),!t())throw z;Ze("remoteCamera.sessionStatusChange",e)},e.isSupported=t}(go||(go={})),function(e){function t(){return!(!Le(he)||!he.supports.appEntity)}e.selectAppEntity=function(e,n,r,o){if(Le(he,x.content),!t())throw z;if(!e||0==e.length)throw new Error("[appEntity.selectAppEntity] threadId name cannot be null or empty");if(!o)throw new Error("[appEntity.selectAppEntity] Callback cannot be null");wt("appEntity.selectAppEntity",[e,n,r],o)},e.isSupported=t}(wo||(wo={})),function(e){function t(){return!(!Le(he)||!he.supports.teams)}!function(e){e[e.Regular=0]="Regular",e[e.Private=1]="Private",e[e.Shared=2]="Shared"}(e.ChannelType||(e.ChannelType={})),e.getTeamChannels=function(e,n){if(Le(he,x.content),!t())throw z;if(!e)throw new Error("[teams.getTeamChannels] groupId cannot be null or empty");if(!n)throw new Error("[teams.getTeamChannels] Callback cannot be null");wt("teams.getTeamChannels",[e],n)},e.refreshSiteUrl=function(e,n){if(Le(he),!t())throw z;if(!e)throw new Error("[teams.refreshSiteUrl] threadId cannot be null or empty");if(!n)throw new Error("[teams.refreshSiteUrl] Callback cannot be null");wt("teams.refreshSiteUrl",[e],n)},e.isSupported=t,function(e){function t(){return!(!Le(he)||!he.supports.teams)&&!!he.supports.teams.fullTrust}!function(e){function t(){return!(!Le(he)||!he.supports.teams)&&(!!he.supports.teams.fullTrust&&!!he.supports.teams.fullTrust.joinedTeams)}e.getUserJoinedTeams=function(e){return new Promise((function(n){if(Le(he),!t())throw z;if((y.hostClientType===L.android||y.hostClientType===L.teamsRoomsAndroid||y.hostClientType===L.teamsPhones||y.hostClientType===L.teamsDisplays)&&!He(a)){var r={errorCode:D.OLD_PLATFORM};throw new Error(JSON.stringify(r))}n(dt("getUserJoinedTeams",e))}))},e.isSupported=t}(e.joinedTeams||(e.joinedTeams={})),e.getConfigSetting=function(e){return new Promise((function(n){if(Le(he),!t())throw z;n(dt("getConfigSetting",e))}))},e.isSupported=t}(e.fullTrust||(e.fullTrust={}))}(vo||(vo={}));var yo,bo=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))},So=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(e){return function(t){return c([e,t])}}function c(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}};!function(e){var t,n=We()?void 0:new $n(wt);function r(e){return e.videoFrameBuffer=e.videoFrameBuffer||e.data,delete e.data,e}function o(){return Le(he),lr.isSupported()}function i(e){wt("video.videoFrameProcessed",[e])}function a(e,n){void 0===n&&(n=t.Warn),wt("video.notifyError",[e,n])}!function(e){e.Fatal="fatal",e.Warn="warn"}(t=e.ErrorLevel||(e.ErrorLevel={})),e.registerForVideoFrame=function(e){var t,s,c=this;if(!o())throw z;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(Le(he,x.sidePanel)){if(Ze("video.setFrameProcessTimeLimit",(function(e){return null==n?void 0:n.setFrameProcessTimeLimit(e)}),!1),null===(t=he.supports.video)||void 0===t?void 0:t.mediaStream)Ze("video.startVideoExtensibilityVideoStream",(function(t){return bo(c,void 0,void 0,(function(){var r,o,i,s,c;return So(this,(function(u){switch(u.label){case 0:return r=t.streamId,t.metadataInTexture?[4,nr(r,e.videoFrameHandler,a,n)]:[3,2];case 1:return i=u.sent(),[3,4];case 2:return[4,tr(r,e.videoFrameHandler,a,n)];case 3:i=u.sent(),u.label=4;case 4:return o=i,!We()&&(null===(c=null===(s=window.chrome)||void 0===s?void 0:s.webview)||void 0===c||c.registerTextureStream(r,o)),[2]}}))}))}),!1),wt("video.mediaStream.registerForVideoFrame",[e.config]);else{if(!(null===(s=he.supports.video)||void 0===s?void 0:s.sharedFrame))throw z;Ze("video.newVideoFrame",(function(t){if(t){null==n||n.reportStartFrameProcessing(t.width,t.height);var o=t.timestamp;e.videoBufferHandler(r(t),(function(){null==n||n.reportFrameProcessed(),i(o)}),a)}}),!1),wt("video.registerForVideoFrame",[e.config])}null==n||n.startMonitorSlowFrameProcessing()}},e.notifySelectedVideoEffectChanged=function(e,t,n){if(Le(he,x.sidePanel),!o())throw z;wt("video.videoEffectChanged",[e,t,n])},e.registerForVideoEffect=function(e){if(Le(he,x.sidePanel),!o())throw z;Ze("video.effectParameterChange",ur(e,n),!1),wt("video.registerForVideoEffect")},e.updatePersonalizedEffects=function(e){if(Le(he,x.sidePanel),!lr.isSupported())throw z;wt("video.personalizedEffectsChanged",[e])},e.isSupported=o,e.notifyFatalError=function(e){if(Le(he),!lr.isSupported())throw z;a(e,t.Fatal)}}(yo||(yo={}))})(),r})()));
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 r=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(o=r))})),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:r}=e.exports;r.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,i,a=null;function s(...e){if(!s.enabled)return;const r=s,o=Number(new Date),i=o-(n||o);r.diff=i,r.prev=n,r.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 i=t.formatters[o];if("function"==typeof i){const t=e[a];n=i.call(r,t),e.splice(a,1),a--}return n})),t.formatArgs.call(r,e);(r.log||t.log).apply(r,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=r,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(o!==t.namespaces&&(o=t.namespaces,i=t.enabled(e)),i),set:e=>{a=e}}),"function"==typeof t.init&&t.init(s),s}function r(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}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 r=("string"==typeof e?e:"").split(/[\s,]+/),o=r.length;for(n=0;n<o;n++)r[n]&&("-"===(e=r[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,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;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,r=60*n,o=24*r,i=7*o,a=365.25*o;function s(e){if(!((e=String(e)).length>100)){var s=/^(-?(?:\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(s){var c=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*a;case"weeks":case"week":case"w":return c*i;case"days":case"day":case"d":return c*o;case"hours":case"hour":case"hrs":case"hr":case"h":return c*r;case"minutes":case"minute":case"mins":case"min":case"m":return c*n;case"seconds":case"second":case"secs":case"sec":case"s":return c*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}}}function c(e){var i=Math.abs(e);return i>=o?Math.round(e/o)+"d":i>=r?Math.round(e/r)+"h":i>=n?Math.round(e/n)+"m":i>=t?Math.round(e/t)+"s":e+"ms"}function u(e){var i=Math.abs(e);return i>=o?l(e,i,o,"day"):i>=r?l(e,i,r,"hour"):i>=n?l(e,i,n,"minute"):i>=t?l(e,i,t,"second"):e+" ms"}function l(e,t,n,r){var o=t>=1.5*n;return Math.round(e/n)+" "+r+(o?"s":"")}e.exports=function(e,t){t=t||{};var n=typeof e;if("string"===n&&e.length>0)return s(e);if("number"===n&&isFinite(e))return t.long?u(e):c(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}(()=>{n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}})(),(()=>{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 r={};return(()=>{"use strict";n.r(r),n.d(r,{ActionObjectType:()=>O,ChannelType:()=>B,ChildAppWindow:()=>Wn,DialogDimension:()=>W,ErrorCode:()=>D,FileOpenPreference:()=>R,FrameContexts:()=>x,HostClientType:()=>L,HostName:()=>H,LiveShareHost:()=>eo,NotificationTypes:()=>Nt,ParentAppWindow:()=>Bn,SecondaryM365ContentIdName:()=>M,TaskModuleDimension:()=>j,TeamType:()=>V,UserSettingTypes:()=>Lt,UserTeamRole:()=>_,ViewerActionTypes:()=>Ut,app:()=>Me,appEntity:()=>So,appInitialization:()=>br,appInstallDialog:()=>$t,authentication:()=>Ae,barCode:()=>Cn,calendar:()=>Gn,call:()=>yr,chat:()=>yn,clipboard:()=>Nn,conversations:()=>Ht,dialog:()=>ke,enablePrintCapability:()=>Ar,executeDeepLink:()=>zr,files:()=>vo,geoLocation:()=>Un,getAdaptiveCardSchemaVersion:()=>xn,getContext:()=>Rr,getMruTabInstances:()=>Br,getTabInstances:()=>Wr,initialize:()=>Fr,initializeWithFrameContext:()=>qr,liveShare:()=>$r,location:()=>_n,logs:()=>Dt,mail:()=>qn,marketplace:()=>wo,media:()=>vn,meeting:()=>jn,meetingRoom:()=>Co,menus:()=>Re,monetization:()=>zn,navigateBack:()=>Xr,navigateCrossDomain:()=>Zr,navigateToTab:()=>Kr,notifications:()=>yo,openFilePreview:()=>Qt,pages:()=>De,people:()=>Jn,print:()=>kr,profile:()=>Kn,registerAppButtonClickHandler:()=>Dr,registerAppButtonHoverEnterHandler:()=>Nr,registerAppButtonHoverLeaveHandler:()=>Ur,registerBackButtonHandler:()=>Lr,registerBeforeUnloadHandler:()=>xr,registerChangeSettingsHandler:()=>_r,registerCustomHandler:()=>Zt,registerFocusEnterHandler:()=>Vr,registerFullScreenHandler:()=>Mr,registerOnLoadHandler:()=>Hr,registerOnThemeChangeHandler:()=>Or,registerUserSettingsChangeHandler:()=>Xt,remoteCamera:()=>bo,returnFocus:()=>Jr,search:()=>gr,secondaryBrowser:()=>Vn,sendCustomEvent:()=>Kt,sendCustomMessage:()=>Jt,setFrameContext:()=>Gr,settings:()=>Sr,shareDeepLink:()=>jr,sharing:()=>wr,stageView:()=>vr,tasks:()=>Qr,teams:()=>Eo,teamsCore:()=>Oe,uploadCustomApp:()=>qt,version:()=>Ne,video:()=>hr,videoEx:()=>To,webStorage:()=>Cr});var e="2.0.1",t="2.0.2",o="2.0.3",i="2.0.4",a="2.0.1",s="1.9.0",c="2.0.0",u="1.7.0",l="1.8.0",d="1.9.0",f=["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"],p=/^https:\/\//,m="https",h="teams.microsoft.com",g="The library has not yet been initialized",w="The runtime has not yet been initialized",v="The runtime version is not supported",C="The call was not properly started",y=function(){function e(){}return e.initializeCalled=!1,e.initializeCompleted=!1,e.additionalValidOrigins=[],e.isFramelessWindow=!1,e.printCapabilityEnabled=!1,e}(),b=(0,n(302).debug)("teamsJs");function S(e){return b.extend(e)}const E={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let I;const T=new Uint8Array(16);function P(){if(!I&&(I="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!I))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return I(T)}const F=[];for(let e=0;e<256;++e)F.push((e+256).toString(16).slice(1));function A(e,t=0){return(F[e[t+0]]+F[e[t+1]]+F[e[t+2]]+F[e[t+3]]+"-"+F[e[t+4]]+F[e[t+5]]+"-"+F[e[t+6]]+F[e[t+7]]+"-"+F[e[t+8]]+F[e[t+9]]+"-"+F[e[t+10]]+F[e[t+11]]+F[e[t+12]]+F[e[t+13]]+F[e[t+14]]+F[e[t+15]]).toLowerCase()}const k=function(e,t,n){if(E.randomUUID&&!t&&!e)return E.randomUUID();const r=(e=e||{}).random||(e.rng||P)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return A(r)};var R,O,M,D,N,U,L,H,x,V,_,W;!function(e){e.Inline="inline",e.Desktop="desktop",e.Web="web"}(R||(R={})),function(e){e.M365Content="m365content"}(O||(O={})),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"}(D||(D={})),function(e){e.GeoLocation="geolocation",e.Media="media"}(N||(N={})),function(e){e.TextPlain="text/plain",e.TextHtml="text/html",e.ImagePNG="image/png",e.ImageJPEG="image/jpeg"}(U||(U={})),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"}(L||(L={})),function(e){e.office="Office",e.outlook="Outlook",e.outlookWin32="OutlookWin32",e.orange="Orange",e.teams="Teams",e.teamsModern="TeamsModern"}(H||(H={})),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"}(x||(x={})),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"}(V||(V={})),function(e){e[e.Admin=0]="Admin",e[e.User=1]="User",e[e.Guest=2]="Guest"}(_||(_={})),function(e){e.Large="large",e.Medium="medium",e.Small="small"}(W||(W={}));var B,j=W;!function(e){e.Regular="Regular",e.Private="Private",e.Shared="Shared"}(B||(B={}));var z={errorCode:D.NOT_SUPPORTED_ON_PLATFORM},G={majorVersion:1,minorVersion:5},q={adaptiveCardSchemaVersion:{majorVersion:1,minorVersion:5}};function J(e,t){if("*."===e.substring(0,2)){var 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}var K=S("validateOrigin");function Z(e){if(!ae(e))return K("Origin %s is invalid because it is not using https protocol. Protocol being used: %s",e,e.protocol),!1;var t=e.host;if(f.some((function(e){return J(e,t)})))return!0;for(var n=0,r=y.additionalValidOrigins;n<r.length;n++){var o=r[n];if(J("https://"===o.substring(0,8)?o.substring(8):o,t))return!0}return K("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,f,y.additionalValidOrigins),!1}function X(e){return function(t,n){if(!t)throw new Error(e||n)}}function Q(e,t){if("string"!=typeof e||"string"!=typeof t)return NaN;var n=e.split("."),r=t.split(".");function o(e){return/^\d+$/.test(e)}if(!n.every(o)||!r.every(o))return NaN;for(;n.length<r.length;)n.push("0");for(;r.length<n.length;)r.push("0");for(var i=0;i<n.length;++i)if(Number(n[i])!=Number(r[i]))return Number(n[i])>Number(r[i])?1:-1;return 0}function $(){return k()}function Y(e){return Object.keys(e).forEach((function(t){"object"==typeof e[t]&&Y(e[t])})),Object.freeze(e)}function ee(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var o=e.apply(void 0,n);return o.then((function(e){t&&t(void 0,e)})).catch((function(e){t&&t(e)})),o}function te(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var o=e.apply(void 0,n);return o.then((function(){t&&t(null)})).catch((function(e){t&&t(e)})),o}function ne(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var o=e.apply(void 0,n);return o.then((function(e){t&&t(null,e)})).catch((function(e){t&&t(e,null)})),o}function re(e,t,n){return new Promise((function(r,o){var i=setTimeout(o,t,n);e().then((function(e){clearTimeout(i),r(e)})).catch((function(e){clearTimeout(i),o(e)}))}))}function oe(e){var 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!(Q("".concat(e.majorVersion,".").concat(e.minorVersion),"".concat(G.majorVersion,".").concat(G.minorVersion))>=0)}function ae(e){return"https:"===e.protocol}function se(e,t){return new Promise((function(n,r){e||r("MimeType cannot be null or empty."),t||r("Base64 string cannot be null or empty.");var o=atob(t);if(e.startsWith("image/")){for(var i=new Uint8Array(o.length),a=0;a<o.length;a++)i[a]=o.charCodeAt(a);n(new Blob([i],{type:e}))}n(new Blob([o],{type:e}))}))}function ce(e){return new Promise((function(t,n){0===e.size&&n(new Error("Blob cannot be empty."));var r=new FileReader;r.onloadend=function(){r.result?t(r.result.toString().split(",")[1]):n(new Error("Failed to read the blob"))},r.onerror=function(){n(r.error)},r.readAsDataURL(e)}))}function ue(){if(le())throw new Error("window object undefined at SSR check");return window}function le(){return"undefined"==typeof window}var de=function(){return de=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},de.apply(this,arguments)},fe=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},pe=S("runtime"),me=3;function he(e){return e.apiVersion===me}var ge={apiVersion:-1,supports:{}};function we(e){if(he(e))return!0;throw-1===e.apiVersion?new Error(w):new Error(v)}var ve=ge,Ce={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:{appButton:{},tabs:{},config:{},backStack:{},fullTrust:{}},remoteCamera:{},stageView:{},teams:{fullTrust:{}},teamsCore:{},video:{sharedFrame:{}}}},ye=[L.desktop,L.web,L.android,L.ios,L.rigel,L.surfaceHub,L.teamsRoomsWindows,L.teamsRoomsAndroid,L.teamsPhones,L.teamsDisplays];function be(e){var t=e;if(t.apiVersion<me&&Se.forEach((function(e){t.apiVersion===e.versionToUpgradeFrom&&(t=e.upgradeToNextVersion(t))})),he(t))return t;throw new Error("Received a runtime that could not be upgraded to the latest version")}var Se=[{versionToUpgradeFrom:1,upgradeToNextVersion:function(e){var t;return{apiVersion:2,hostVersionsInfo:void 0,isLegacyTeams:e.isLegacyTeams,supports:de(de({},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:function(e){var t=e.supports,n=(t.appNotification,fe(t,["appNotification"]));return de(de({},e),{apiVersion:3,supports:n})}}],Ee={"1.9.0":[{capability:{location:{}},hostClientTypes:ye}],"2.0.0":[{capability:{people:{}},hostClientTypes:ye},{capability:{sharing:{}},hostClientTypes:[L.desktop,L.web]}],"2.0.1":[{capability:{teams:{fullTrust:{joinedTeams:{}}}},hostClientTypes:[L.android,L.desktop,L.ios,L.teamsRoomsAndroid,L.teamsPhones,L.teamsDisplays,L.web]},{capability:{webStorage:{}},hostClientTypes:[L.desktop]}],"2.0.5":[{capability:{webStorage:{}},hostClientTypes:[L.android,L.desktop,L.ios]}]},Ie=pe.extend("generateBackCompatRuntimeConfig");function Te(e){Ie("generating back compat runtime config for %s",e);var t=de({},Ce.supports);Ie("Supported capabilities in config before updating based on highestSupportedVersion: %o",t),Object.keys(Ee).forEach((function(n){Q(e,n)>=0&&Ee[n].forEach((function(e){e.hostClientTypes.includes(y.hostClientType)&&(t=de(de({},t),e.capability))}))}));var n={apiVersion:me,hostVersionsInfo:q,isLegacyTeams:!0,supports:t};return Ie("Runtime config after updating based on highestSupportedVersion: %o",n),n}var Pe=pe.extend("applyRuntimeConfig");function Fe(e){"string"==typeof e.apiVersion&&(Pe("Trying to apply runtime with string apiVersion, processing as v1: %o",e),e=de(de({},e),{apiVersion:1})),Pe("Fast-forwarding runtime %o",e);var t=be(e);Pe("Applying runtime %o",t),ve=Y(t)}var Ae,ke,Re,Oe,Me,De,Ne="2.15.0",Ue=S("internal"),Le=Ue.extend("ensureInitializeCalled"),He=Ue.extend("ensureInitialized");function xe(){if(!y.initializeCalled)throw Le(g),new Error(g)}function Ve(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!y.initializeCompleted)throw He("%s. initializeCalled: %s",g,y.initializeCalled.toString()),new Error(g);if(t&&t.length>0){for(var r=!1,o=0;o<t.length;o++)if(t[o]===y.frameContext){r=!0;break}if(!r)throw new Error("This call is only allowed in following contexts: ".concat(JSON.stringify(t),". ")+'Current context: "'.concat(y.frameContext,'".'))}return we(e)}function _e(t){void 0===t&&(t=e);var n=Q(y.clientSupportedSDKVersion,t);return!isNaN(n)&&n>=0}function We(){return y.hostClientType==L.android||y.hostClientType==L.ios||y.hostClientType==L.ipados}function Be(t){if(void 0===t&&(t=e),!We())throw{errorCode:D.NOT_SUPPORTED_ON_PLATFORM};if(!_e(t))throw{errorCode:D.OLD_PLATFORM}}function je(e){var t=y.additionalValidOrigins.concat(e.filter((function(e){return"string"==typeof e&&p.test(e)}))),n={};t=t.filter((function(e){return!n[e]&&(n[e]=!0,!0)})),y.additionalValidOrigins=t}function ze(e){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:H.teams,clientType:e.hostClientType?e.hostClientType:L.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:e.userObjectId,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){var t,n,r;function o(e){return new Promise((function(n,r){if(y.hostClientType===L.desktop||y.hostClientType===L.android||y.hostClientType===L.ios||y.hostClientType===L.ipados||y.hostClientType===L.macos||y.hostClientType===L.rigel||y.hostClientType===L.teamsRoomsWindows||y.hostClientType===L.teamsRoomsAndroid||y.hostClientType===L.teamsPhones||y.hostClientType===L.teamsDisplays||y.hostClientType===L.surfaceHub){var o=document.createElement("a");o.href=e.url,n(wt("authentication.authenticate",[o.href,e.width,e.height,e.isExternal]).then((function(e){var t=e[0],n=e[1];if(t)return n;throw new Error(n)})))}else t={success:n,fail:r},c(e)}))}function i(e){return new Promise((function(t){t(wt("authentication.getAuthToken",[null==e?void 0:e.resources,null==e?void 0:e.claims,null==e?void 0:e.silent]))})).then((function(e){var t=e[0],n=e[1];if(t)return n;throw new Error(n)}))}function a(){return new Promise((function(e){e(wt("authentication.getUser"))})).then((function(e){var t=e[0],n=e[1];if(t)return n;throw new Error(n)}))}function s(){u();try{ut.childWindow&&ut.childWindow.close()}finally{ut.childWindow=null,ut.childOrigin=null}}function c(e){s();var t=e.width||600,n=e.height||400;t=Math.min(t,ut.currentWindow.outerWidth-400),n=Math.min(n,ut.currentWindow.outerHeight-200);var r=document.createElement("a");r.href=e.url.replace("{oauthRedirectMethod}","web");var o=void 0!==ut.currentWindow.screenLeft?ut.currentWindow.screenLeft:ut.currentWindow.screenX,i=void 0!==ut.currentWindow.screenTop?ut.currentWindow.screenTop:ut.currentWindow.screenY;o+=ut.currentWindow.outerWidth/2-t/2,i+=ut.currentWindow.outerHeight/2-n/2,ut.childWindow=ut.currentWindow.open(r.href,"_blank","toolbar=no, location=yes, status=no, menubar=no, scrollbars=yes, top="+i+", left="+o+", width="+t+", height="+n),ut.childWindow?l():f("FailedToOpenWindow")}function u(){n&&(clearInterval(n),n=0),$e("initialize"),$e("navigateCrossDomain")}function l(){u(),n=ut.currentWindow.setInterval((function(){if(!ut.childWindow||ut.childWindow.closed)f("CancelledByUser");else{var e=ut.childOrigin;try{ut.childOrigin="*",Bt("ping")}finally{ut.childOrigin=e}}}),100),Qe("initialize",(function(){return[x.authentication,y.hostClientType]})),Qe("navigateCrossDomain",(function(){return!1}))}function d(e){try{t&&t.success(e)}finally{t=null,s()}}function f(e){try{t&&t.fail(new Error(e))}finally{t=null,s()}}function p(e,t,n){if(e){var r=document.createElement("a");r.href=decodeURIComponent(e),r.host&&r.host!==ue().location.host&&"outlook.office.com"===r.host&&r.search.indexOf("client_type=Win32_Outlook")>-1&&(t&&"result"===t&&(n&&(r.href=m(r.href,"result",n)),ut.currentWindow.location.assign(m(r.href,"authSuccess",""))),t&&"reason"===t&&(n&&(r.href=m(r.href,"reason",n)),ut.currentWindow.location.assign(m(r.href,"authFailure",""))))}}function m(e,t,n){var r=e.indexOf("#"),o=-1===r?"#":e.substr(r);return o=o+"&"+t+(""!==n?"="+n:""),(e=-1===r?e:e.substr(0,r))+o}e.initialize=function(){Qe("authentication.authenticate.success",d,!1),Qe("authentication.authenticate.failure",f,!1)},e.registerAuthenticationHandlers=function(e){r=e},e.authenticate=function(e){var t=void 0!==e,n=t?e:r;if(!n)throw new Error("No parameters are provided for authentication");return Ve(ve,x.content,x.sidePanel,x.settings,x.remove,x.task,x.stage,x.meetingStage),o(n).then((function(e){try{return n&&n.successCallback?(n.successCallback(e),""):e}finally{t||(r=null)}})).catch((function(e){try{if(n&&n.failureCallback)return n.failureCallback(e.message),"";throw e}finally{t||(r=null)}}))},e.getAuthToken=function(e){return xe(),i(e).then((function(t){return e&&e.successCallback?(e.successCallback(t),""):t})).catch((function(t){if(e&&e.failureCallback)return e.failureCallback(t.message),"";throw t}))},e.getUser=function(e){return xe(),a().then((function(t){return e&&e.successCallback?(e.successCallback(t),null):t})).catch((function(t){if(e&&e.failureCallback)return e.failureCallback(t.message),null;throw t}))},e.notifySuccess=function(e,t){p(t,"result",e),Ve(ve,x.authentication),Ct("authentication.authenticate.success",[e]),_t(ut.parentWindow,(function(){return setTimeout((function(){return ut.currentWindow.close()}),200)}))},e.notifyFailure=function(e,t){p(t,"reason",e),Ve(ve,x.authentication),Ct("authentication.authenticate.failure",[e]),_t(ut.parentWindow,(function(){return setTimeout((function(){return ut.currentWindow.close()}),200)}))},function(e){e.Public="public",e.EUDB="eudb",e.Other="other"}(e.DataResidency||(e.DataResidency={}))}(Ae||(Ae={})),function(e){var t=[];function n(e){y.frameContext&&(y.frameContext===x.task?t.push(e):$e("messageForChild"))}e.initialize=function(){Qe("messageForChild",n,!1)},function(e){function n(){return Ve(ve)&&void 0!==(ve.supports.dialog&&ve.supports.dialog.url)}function r(e){return{url:e.url,height:e.size?e.size.height:W.Small,width:e.size?e.size.width:W.Small,title:e.title,fallbackUrl:e.fallbackUrl}}function o(e){var t=r(e);return t.completionBotId=e.completionBotId,t}e.open=function(e,t,o){if(Ve(ve,x.content,x.sidePanel,x.meetingStage),!n())throw z;o&&Qe("messageForParent",o),Ct("tasks.startTask",[r(e)],(function(e,n){null==t||t({err:e,result:n}),$e("messageForParent")}))},e.submit=function(e,t){if(Ve(ve,x.content,x.task),!n())throw z;Ct("tasks.completeTask",[e,t?Array.isArray(t)?t:[t]:[]])},e.sendMessageToParentFromDialog=function(e){if(Ve(ve,x.task),!n())throw z;Ct("messageForParent",[e])},e.sendMessageToDialog=function(e){if(Ve(ve,x.content,x.sidePanel,x.meetingStage),!n())throw z;Ct("messageForChild",[e])},e.registerOnMessageFromParent=function(e){if(Ve(ve,x.task),!n())throw z;for($e("messageForChild"),Qe("messageForChild",e),t.reverse();t.length>0;){e(t.pop())}},e.isSupported=n,function(e){function t(){return Ve(ve)&&void 0!==(ve.supports.dialog&&ve.supports.dialog.url&&ve.supports.dialog.url.bot)}e.open=function(e,n,r){if(Ve(ve,x.content,x.sidePanel,x.meetingStage),!t())throw z;r&&Qe("messageForParent",r),Ct("tasks.startTask",[o(e)],(function(e,t){null==n||n({err:e,result:t}),$e("messageForParent")}))},e.isSupported=t}(e.bot||(e.bot={})),e.getDialogInfoFromUrlDialogInfo=r,e.getDialogInfoFromBotUrlDialogInfo=o}(e.url||(e.url={})),e.isSupported=function(){return!(!Ve(ve)||!ve.supports.dialog)},function(e){function t(){return!(!Ve(ve)||!ve.supports.dialog)&&!!ve.supports.dialog.update}e.resize=function(e){if(Ve(ve,x.content,x.sidePanel,x.task,x.meetingStage),!t())throw z;Ct("tasks.updateTask",[e])},e.isSupported=t}(e.update||(e.update={})),function(e){function t(){var e=ve.hostVersionsInfo&&ve.hostVersionsInfo.adaptiveCardSchemaVersion&&!ie(ve.hostVersionsInfo.adaptiveCardSchemaVersion);return Ve(ve)&&void 0!==(e&&ve.supports.dialog&&ve.supports.dialog.card)}function n(e){return{card:e.card,height:e.size?e.size.height:W.Small,width:e.size?e.size.width:W.Small,title:e.title}}function r(e){var t=n(e);return t.completionBotId=e.completionBotId,t}e.open=function(e,r){if(Ve(ve,x.content,x.sidePanel,x.meetingStage),!t())throw z;Ct("tasks.startTask",[n(e)],(function(e,t){null==r||r({err:e,result:t})}))},e.isSupported=t,function(e){function t(){var e=ve.hostVersionsInfo&&ve.hostVersionsInfo.adaptiveCardSchemaVersion&&!ie(ve.hostVersionsInfo.adaptiveCardSchemaVersion);return Ve(ve)&&void 0!==(e&&ve.supports.dialog&&ve.supports.dialog.card&&ve.supports.dialog.card.bot)}e.open=function(e,n){if(Ve(ve,x.content,x.sidePanel,x.meetingStage),!t())throw z;Ct("tasks.startTask",[r(e)],(function(e,t){null==n||n({err:e,result:t})}))},e.isSupported=t}(e.bot||(e.bot={}))}(e.adaptiveCard||(e.adaptiveCard={}))}(ke||(ke={})),function(e){!function(e){e[e.ifRoom=0]="ifRoom",e[e.overflowOnly=1]="overflowOnly"}(e.DisplayMode||(e.DisplayMode={}));var t,n,r,o=function(){return function(){this.enabled=!0,this.selected=!1}}();function i(e){r&&r(e)||(Ve(ve),Ct("viewConfigItemPress",[e]))}function a(e){t&&t(e)||(Ve(ve),Ct("handleNavBarMenuItemPress",[e]))}function s(e){n&&n(e)||(Ve(ve),Ct("handleActionMenuItemPress",[e]))}function c(){return!(!Ve(ve)||!ve.supports.menus)}e.MenuItem=o,function(e){e.dropDown="dropDown",e.popOver="popOver"}(e.MenuListType||(e.MenuListType={})),e.initialize=function(){Qe("navBarMenuItemPress",a,!1),Qe("actionMenuItemPress",s,!1),Qe("setModuleView",i,!1)},e.setUpViews=function(e,t){if(Ve(ve),!c())throw z;r=t,Ct("setUpViews",[e])},e.setNavBarMenu=function(e,n){if(Ve(ve),!c())throw z;t=n,Ct("setNavBarMenu",[e])},e.showActionMenu=function(e,t){if(Ve(ve),!c())throw z;n=t,Ct("showActionMenu",[e])},e.isSupported=c}(Re||(Re={})),function(e){function t(){ue().print()}function n(e,t){e&&Ve(ve),e&&t&&t(),rt(e)}function r(e,t){e&&Ve(ve),e&&t&&t(),it(e)}function o(){return!(!Ve(ve)||!ve.supports.teamsCore)}e.enablePrintCapability=function(){if(!y.printCapabilityEnabled){if(Ve(ve),!o())throw z;y.printCapabilityEnabled=!0,document.addEventListener("keydown",(function(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,(function(){if(e&&!o())throw z}))},e.registerOnLoadHandlerHelper=n,e.registerBeforeUnloadHandler=function(e){r(e,(function(){if(e&&!o())throw z}))},e.registerBeforeUnloadHandlerHelper=r,e.isSupported=o}(Oe||(Oe={})),function(t){var n=S("app");t.Messages={AppLoaded:"appInitialization.appLoaded",Success:"appInitialization.success",Failure:"appInitialization.failure",ExpectedFailure:"appInitialization.expectedFailure"},function(e){e.AuthFailed="AuthFailed",e.Timeout="Timeout",e.Other="Other"}(t.FailedReason||(t.FailedReason={})),function(e){e.PermissionError="PermissionError",e.NotFound="NotFound",e.Throttling="Throttling",e.Offline="Offline",e.Other="Other"}(t.ExpectedFailureReason||(t.ExpectedFailureReason={})),t.isInitialized=function(){return y.initializeCompleted},t.getFrameContext=function(){return y.frameContext};var r=5e3;t.initialize=function(e){return le()?(n.extend("initialize")("window object undefined at initialization"),Promise.resolve()):re((function(){return i(e)}),r,new Error("SDK initialization timed out."))};var o=n.extend("initializeHelper");function i(t){return new Promise((function(n){y.initializeCalled||(y.initializeCalled=!0,Ke(),y.initializePromise=dt(t).then((function(t){var n=t.context,r=t.clientType,i=t.runtimeConfig,a=t.clientSupportedSDKVersion,s=void 0===a?e:a;y.frameContext=n,y.hostClientType=r,y.clientSupportedSDKVersion=s;try{o("Parsing %s",i);var c=JSON.parse(i);if(o("Checking if %o is a valid runtime object",null!=c?c:"null"),!c||!c.apiVersion)throw new Error("Received runtime config is invalid");i&&Fe(c)}catch(t){if(!(t instanceof SyntaxError))throw t;try{o("Attempting to parse %s as an SDK version",i),isNaN(Q(i,e))||(y.clientSupportedSDKVersion=i);c=JSON.parse(s);if(o("givenRuntimeConfig parsed to %o",null!=c?c:"null"),!c)throw new Error("givenRuntimeConfig string was successfully parsed. However, it parsed to value of null");Fe(c)}catch(e){if(!(e instanceof SyntaxError))throw e;Fe(Te(y.clientSupportedSDKVersion))}}y.initializeCompleted=!0})),Ae.initialize(),Re.initialize(),De.config.initialize(),ke.initialize()),Array.isArray(t)&&je(t),n(y.initializePromise)}))}function a(e){e&&xe(),tt(e)}t._initialize=function(e){ut.currentWindow=e},t._uninitialize=function(){y.initializeCalled&&(y.frameContext&&(a(null),De.backStack.registerBackButtonHandler(null),De.registerFullScreenHandler(null),Oe.registerBeforeUnloadHandler(null),Oe.registerOnLoadHandler(null),Dt.registerGetLogHandler(null)),y.frameContext===x.settings&&De.config.registerOnSaveHandler(null),y.frameContext===x.remove&&De.config.registerOnRemoveHandler(null),y.initializeCalled=!1,y.initializeCompleted=!1,y.initializePromise=null,y.additionalValidOrigins=[],y.frameContext=null,y.hostClientType=null,y.isFramelessWindow=!1,ft())},t.getContext=function(){return new Promise((function(e){xe(),e(pt("getContext"))})).then((function(e){return ze(e)}))},t.notifyAppLoaded=function(){xe(),Ct(t.Messages.AppLoaded,[Ne])},t.notifySuccess=function(){xe(),Ct(t.Messages.Success,[Ne])},t.notifyFailure=function(e){xe(),Ct(t.Messages.Failure,[e.reason,e.message])},t.notifyExpectedFailure=function(e){xe(),Ct(t.Messages.ExpectedFailure,[e.reason,e.message])},t.registerOnThemeChangeHandler=a,t.openLink=function(e){return new Promise((function(t){Ve(ve,x.content,x.sidePanel,x.settings,x.task,x.stage,x.meetingStage),t(mt("executeDeepLink",e))}))}}(Me||(Me={})),function(e){function t(e){if(Ve(ve,x.content),!n())throw z;Ct("setFrameContext",[e])}function n(){return!(!Ve(ve)||!ve.supports.pages)}e.returnFocus=function(e){if(Ve(ve),!n())throw z;Ct("returnFocus",[e])},e.registerFocusEnterHandler=function(e){et("focusEnter",e,[],(function(){if(!n())throw z}))},e.setCurrentFrame=t,e.initializeWithFrameContext=function(e,n,r){Me.initialize(r).then((function(){return n&&n()})),t(e)},e.getConfig=function(){return new Promise((function(e){if(Ve(ve,x.content,x.settings,x.remove,x.sidePanel),!n())throw z;e(pt("settings.getSettings"))}))},e.navigateCrossDomain=function(e){return new Promise((function(t){if(Ve(ve,x.content,x.sidePanel,x.settings,x.remove,x.task,x.stage,x.meetingStage),!n())throw z;t(ht("navigateCrossDomain","Cross-origin navigation is only supported for URLs matching the pattern registered in the manifest.",e))}))},e.navigateToApp=function(e){return new Promise((function(t){if(Ve(ve,x.content,x.sidePanel,x.settings,x.task,x.stage,x.meetingStage),!n())throw z;ve.isLegacyTeams?t(mt("executeDeepLink",oe(e))):t(mt("pages.navigateToApp",e))}))},e.shareDeepLink=function(e){if(Ve(ve,x.content,x.sidePanel,x.meetingStage),!n())throw z;Ct("shareDeepLink",[e.subPageId,e.subPageLabel,e.subPageWebUrl])},e.registerFullScreenHandler=function(e){et("fullScreenChange",e,[],(function(){if(e&&!n())throw z}))},e.isSupported=n,function(e){function t(){return!(!Ve(ve)||!ve.supports.pages)&&!!ve.supports.pages.tabs}e.navigateToTab=function(e){return new Promise((function(n){if(Ve(ve),!t())throw z;n(ht("navigateToTab","Invalid internalTabInstanceId and/or channelId were/was provided",e))}))},e.getTabInstances=function(e){return new Promise((function(n){if(Ve(ve),!t())throw z;n(pt("getTabInstances",e))}))},e.getMruTabInstances=function(e){return new Promise((function(n){if(Ve(ve),!t())throw z;n(pt("getMruTabInstances",e))}))},e.isSupported=t}(e.tabs||(e.tabs={})),function(e){var t,n;function r(e,n){e&&Ve(ve,x.settings),n&&n(),t=e,e&&Ct("registerHandler",["save"])}function o(e,t){e&&Ve(ve,x.remove,x.settings),t&&t(),n=e,e&&Ct("registerHandler",["remove"])}function i(e){var n=new a(e);t?t(n):ut.childWindow?Bt("settings.save",[e]):n.notifySuccess()}e.initialize=function(){Qe("settings.save",i,!1),Qe("settings.remove",s,!1)},e.setValidityState=function(e){if(Ve(ve,x.settings,x.remove),!u())throw z;Ct("settings.setValidityState",[e])},e.setConfig=function(e){return new Promise((function(t){if(Ve(ve,x.content,x.settings,x.sidePanel),!u())throw z;t(mt("settings.setSettings",e))}))},e.registerOnSaveHandler=function(e){r(e,(function(){if(e&&!u())throw z}))},e.registerOnSaveHandlerHelper=r,e.registerOnRemoveHandler=function(e){o(e,(function(){if(e&&!u())throw z}))},e.registerOnRemoveHandlerHelper=o,e.registerChangeConfigHandler=function(e){et("changeSettings",e,[x.content],(function(){if(!u())throw z}))};var a=function(){function e(e){this.notified=!1,this.result=e||{}}return e.prototype.notifySuccess=function(){this.ensureNotNotified(),Ct("settings.save.success"),this.notified=!0},e.prototype.notifyFailure=function(e){this.ensureNotNotified(),Ct("settings.save.failure",[e]),this.notified=!0},e.prototype.ensureNotNotified=function(){if(this.notified)throw new Error("The SaveEvent may only notify success or failure once.")},e}();function s(){var e=new c;n?n(e):ut.childWindow?Bt("settings.remove",[]):e.notifySuccess()}var c=function(){function e(){this.notified=!1}return e.prototype.notifySuccess=function(){this.ensureNotNotified(),Ct("settings.remove.success"),this.notified=!0},e.prototype.notifyFailure=function(e){this.ensureNotNotified(),Ct("settings.remove.failure",[e]),this.notified=!0},e.prototype.ensureNotNotified=function(){if(this.notified)throw new Error("The removeEventType may only notify success or failure once.")},e}();function u(){return!(!Ve(ve)||!ve.supports.pages)&&!!ve.supports.pages.config}e.isSupported=u}(e.config||(e.config={})),function(e){var t;function n(){return new Promise((function(e){if(Ve(ve),!i())throw z;e(ht("navigateBack","Back navigation is not supported in the current client or context."))}))}function r(e,n){e&&Ve(ve),n&&n(),t=e,e&&Ct("registerHandler",["backButton"])}function o(){t&&t()||(ut.childWindow?Bt("backButtonPress",[]):n())}function i(){return!(!Ve(ve)||!ve.supports.pages)&&!!ve.supports.pages.backStack}e._initialize=function(){Qe("backButtonPress",o,!1)},e.navigateBack=n,e.registerBackButtonHandler=function(e){r(e,(function(){if(e&&!i())throw z}))},e.registerBackButtonHandlerHelper=r,e.isSupported=i}(e.backStack||(e.backStack={})),function(e){function t(){return!(!Ve(ve)||!ve.supports.pages)&&!!ve.supports.pages.fullTrust}e.enterFullscreen=function(){if(Ve(ve,x.content),!t())throw z;Ct("enterFullscreen",[])},e.exitFullscreen=function(){if(Ve(ve,x.content),!t())throw z;Ct("exitFullscreen",[])},e.isSupported=t}(e.fullTrust||(e.fullTrust={})),function(e){function t(){return!(!Ve(ve)||!ve.supports.pages)&&!!ve.supports.pages.appButton}e.onClick=function(e){et("appButtonClick",e,[x.content],(function(){if(!t())throw z}))},e.onHoverEnter=function(e){et("appButtonHoverEnter",e,[x.content],(function(){if(!t())throw z}))},e.onHoverLeave=function(e){et("appButtonHoverLeave",e,[x.content],(function(){if(!t())throw z}))},e.isSupported=t}(e.appButton||(e.appButton={})),function(e){function t(){return!(!Ve(ve)||!ve.supports.pages)&&!!ve.supports.pages.currentApp}e.navigateTo=function(e){return new Promise((function(n){if(Ve(ve,x.content,x.sidePanel,x.settings,x.task,x.stage,x.meetingStage),!t())throw z;n(gt("pages.currentApp.navigateTo",e))}))},e.navigateToDefaultPage=function(){return new Promise((function(e){if(Ve(ve,x.content,x.sidePanel,x.settings,x.task,x.stage,x.meetingStage),!t())throw z;e(gt("pages.currentApp.navigateToDefaultPage"))}))},e.isSupported=t}(e.currentApp||(e.currentApp={}))}(De||(De={}));var Ge=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},qe=S("handlers"),Je=function(){function e(){}return e.handlers={},e}();function Ke(){Je.handlers.themeChange=nt,Je.handlers.load=ot,Je.handlers.beforeUnload=at,De.backStack._initialize()}var Ze=qe.extend("callHandler");function Xe(e,t){var n=Je.handlers[e];return n?(Ze("Invoking the registered handler for message %s with arguments %o",e,t),[!0,n.apply(this,t)]):ut.childWindow?(Bt(e,t),[!1,void 0]):(Ze("Handler for action message %s not found.",e),[!1,void 0])}function Qe(e,t,n,r){void 0===n&&(n=!0),void 0===r&&(r=[]),t?(Je.handlers[e]=t,n&&Ct("registerHandler",Ge([e],r,!0))):delete Je.handlers[e]}function $e(e){delete Je.handlers[e]}function Ye(e){return null!=Je.handlers[e]}function et(e,t,n,r){t&&Ve.apply(void 0,Ge([ve],n,!1)),r&&r(),Qe(e,t)}function tt(e){Je.themeChangeHandler=e,e&&Ct("registerHandler",["themeChange"])}function nt(e){Je.themeChangeHandler&&Je.themeChangeHandler(e),ut.childWindow&&Bt("themeChange",[e])}function rt(e){Je.loadHandler=e,e&&Ct("registerHandler",["load"])}function ot(e){Je.loadHandler&&Je.loadHandler(e),ut.childWindow&&Bt("load",[e])}function it(e){Je.beforeUnloadHandler=e,e&&Ct("registerHandler",["beforeUnload"])}function at(){var e=function(){Ct("readyToUnload",[])};Je.beforeUnloadHandler&&Je.beforeUnloadHandler(e)||(ut.childWindow?Bt("beforeUnload"):e())}var st=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},ct=S("communication"),ut=function(){return function(){}}(),lt=function(){function e(){}return e.parentMessageQueue=[],e.childMessageQueue=[],e.nextMessageId=0,e.callbacks={},e.promiseCallbacks={},e}();function dt(e){if(lt.messageListener=function(e){return Et(e)},ut.currentWindow=ut.currentWindow||ue(),ut.parentWindow=ut.currentWindow.parent!==ut.currentWindow.self?ut.currentWindow.parent:ut.currentWindow.opener,(ut.parentWindow||e)&&ut.currentWindow.addEventListener("message",lt.messageListener,!1),!ut.parentWindow){var t=ut.currentWindow;if(!t.nativeInterface)return Promise.reject(new Error("Initialization Failed. No Parent window found."));y.isFramelessWindow=!0,t.onNativeMessage=At}try{return ut.parentOrigin="*",wt("initialize",[Ne,me]).then((function(e){return{context:e[0],clientType:e[1],runtimeConfig:e[2],clientSupportedSDKVersion:e[3]}}))}finally{ut.parentOrigin=null}}function ft(){ut.currentWindow&&ut.currentWindow.removeEventListener("message",lt.messageListener,!1),ut.currentWindow=null,ut.parentWindow=null,ut.parentOrigin=null,ut.childWindow=null,ut.childOrigin=null,lt.parentMessageQueue=[],lt.childMessageQueue=[],lt.nextMessageId=0,lt.callbacks={},lt.promiseCallbacks={}}function pt(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return wt(e,t).then((function(e){return e[0]}))}function mt(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return wt(e,t).then((function(e){var t=e[0],n=e[1];if(!t)throw new Error(n)}))}function ht(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return wt(e,n).then((function(e){var n=e[0],r=e[1];if(!n)throw new Error(r||t)}))}function gt(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return wt(e,t).then((function(e){var t=e[0],n=e[1];if(t)throw t;return n}))}function wt(e,t){return void 0===t&&(t=void 0),new Promise((function(n){n(vt(bt(e,t).id))}))}function vt(e){return new Promise((function(t){lt.promiseCallbacks[e]=t}))}function Ct(e,t,n){var r;t instanceof Function?n=t:t instanceof Array&&(r=t);var o=bt(e,r);n&&(lt.callbacks[o.id]=n)}var yt=ct.extend("sendMessageToParentHelper");function bt(e,t){var n=yt,r=ut.parentWindow,o=jt(e,t);if(n("Message %i information: %o",o.id,{actionName:e,args:t}),y.isFramelessWindow)ut.currentWindow&&ut.currentWindow.nativeInterface&&(n("Sending message %i to parent via framelessPostMessage interface",o.id),ut.currentWindow.nativeInterface.framelessPostMessage(JSON.stringify(o)));else{var i=Mt(r);r&&i?(n("Sending message %i to parent via postMessage",o.id),r.postMessage(o,i)):(n("Adding message %i to parent message queue",o.id),Ot(r).push(o))}return o}var St=ct.extend("processMessage");function Et(e){if(e&&e.data&&"object"==typeof e.data){var t=e.source||e.originalEvent&&e.originalEvent.source,n=e.origin||e.originalEvent&&e.originalEvent.origin;Tt(t,n)?(Pt(t,n),t===ut.parentWindow?At(e):t===ut.childWindow&&Rt(e)):St("Message being ignored by app because it is either coming from the current window or a different window with an invalid origin")}else St("Unrecognized message format received by app, message being ignored. Message: %o",e)}var It=ct.extend("shouldProcessMessage");function Tt(e,t){if(ut.currentWindow&&e===ut.currentWindow)return It("Should not process message because it is coming from the current window"),!1;if(ut.currentWindow&&ut.currentWindow.location&&t&&t===ut.currentWindow.location.origin)return!0;var n=Z(new URL(t));return n||It("Message has an invalid origin of %s",t),n}function Pt(e,t){y.isFramelessWindow||ut.parentWindow&&!ut.parentWindow.closed&&e!==ut.parentWindow?ut.childWindow&&!ut.childWindow.closed&&e!==ut.childWindow||(ut.childWindow=e,ut.childOrigin=t):(ut.parentWindow=e,ut.parentOrigin=t),ut.parentWindow&&ut.parentWindow.closed&&(ut.parentWindow=null,ut.parentOrigin=null),ut.childWindow&&ut.childWindow.closed&&(ut.childWindow=null,ut.childOrigin=null),Vt(ut.parentWindow),Vt(ut.childWindow)}var Ft=ct.extend("handleParentMessage");function At(e){var t=Ft;if("id"in e.data&&"number"==typeof e.data.id){var n=e.data,r=lt.callbacks[n.id];t("Received a response from parent for message %i",n.id),r&&(t("Invoking the registered callback for message %i with arguments %o",n.id,n.args),r.apply(null,st(st([],n.args,!0),[n.isPartialResponse],!1)),kt(e)||(t("Removing registered callback for message %i",n.id),delete lt.callbacks[n.id]));var o=lt.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 lt.promiseCallbacks[n.id])}else if("func"in e.data&&"string"==typeof e.data.func){t("Received an action message %s from parent",(n=e.data).func),Xe(n.func,n.args)}else t("Received an unknown message: %O",e)}function kt(e){return!0===e.data.isPartialResponse}function Rt(e){if("id"in e.data&&"func"in e.data){var t=e.data,n=Xe(t.func,t.args),r=n[0],o=n[1];r&&void 0!==o?Wt(t.id,Array.isArray(o)?o:[o]):Ct(t.func,t.args,(function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(ut.childWindow){var r=e.pop();Wt(t.id,e,r)}}))}}function Ot(e){return e===ut.parentWindow?lt.parentMessageQueue:e===ut.childWindow?lt.childMessageQueue:[]}function Mt(e){return e===ut.parentWindow?ut.parentOrigin:e===ut.childWindow?ut.childOrigin:null}var Dt,Nt,Ut,Lt,Ht,xt=ct.extend("flushMessageQueue");function Vt(e){for(var t=Mt(e),n=Ot(e),r=e==ut.parentWindow?"parent":"child";e&&t&&n.length>0;){var o=n.shift();xt("Flushing message %i from "+r+" message queue via postMessage.",o.id),e.postMessage(o,t)}}function _t(e,t){var n=ut.currentWindow.setInterval((function(){0===Ot(e).length&&(clearInterval(n),t())}),100)}function Wt(e,t,n){var r=ut.childWindow,o=zt(e,t,n),i=Mt(r);r&&i&&r.postMessage(o,i)}function Bt(e,t){var n=ut.childWindow,r=Gt(e,t),o=Mt(n);n&&o?n.postMessage(r,o):Ot(n).push(r)}function jt(e,t){return{id:lt.nextMessageId++,func:e,timestamp:Date.now(),args:t||[]}}function zt(e,t,n){return{id:e,args:t||[],isPartialResponse:n}}function Gt(e,t){return{func:e,args:t||[]}}function qt(e,t){Ve(ve),Ct("uploadCustomApp",[e],t||X())}function Jt(e,t,n){Ve(ve),Ct(e,t,n)}function Kt(e,t){if(Ve(ve),!ut.childWindow)throw new Error("The child window has not yet been initialized or is not present");Bt(e,t)}function Zt(e,t){var n=this;Ve(ve),Qe(e,(function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return t.apply(n,e)}))}function Xt(e,t){Ve(ve),Qe("userSettingsChange",t,!0,[e])}function Qt(e){Ve(ve,x.content,x.task),Ct("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])}!function(e){function t(){return!(!Ve(ve)||!ve.supports.logs)}e.registerGetLogHandler=function(e){if(e&&Ve(ve),e&&!t())throw z;e?Qe("log.request",(function(){Ct("log.receive",[e()])})):$e("log.request")},e.isSupported=t}(Dt||(Dt={})),function(e){e.fileDownloadStart="fileDownloadStart",e.fileDownloadComplete="fileDownloadComplete"}(Nt||(Nt={})),function(e){e.view="view",e.edit="edit",e.editNew="editNew"}(Ut||(Ut={})),function(e){e.fileOpenPreference="fileOpenPreference",e.theme="theme"}(Lt||(Lt={})),function(e){function t(){return!(!Ve(ve)||!ve.supports.conversations)}e.openConversation=function(e){return new Promise((function(n){if(Ve(ve,x.content),!t())throw z;var r=mt("conversations.openConversation",{title:e.title,subEntityId:e.subEntityId,conversationId:e.conversationId,channelId:e.channelId,entityId:e.entityId});e.onStartConversation&&Qe("startConversation",(function(t,n,r,o){return e.onStartConversation({subEntityId:t,conversationId:n,channelId:r,entityId:o})})),e.onCloseConversation&&Qe("closeConversation",(function(t,n,r,o){return e.onCloseConversation({subEntityId:t,conversationId:n,channelId:r,entityId:o})})),n(r)}))},e.closeConversation=function(){if(Ve(ve,x.content),!t())throw z;Ct("conversations.closeConversation"),$e("startConversation"),$e("closeConversation")},e.getChatMembers=function(){return new Promise((function(e){if(Ve(ve),!t())throw z;e(pt("getChatMembers"))}))},e.isSupported=t}(Ht||(Ht={}));var $t,Yt="/l/app/",en="/l/meeting/new",tn="attendees",nn="startTime",rn="endTime",on="subject",an="content",sn="/l/call/0/0",cn="source",un="withVideo",ln="/l/chat/0/0",dn="users",fn="topicName",pn="message";function mn(e,t,n){if(0===e.length)throw new Error("Must have at least one user when creating a chat deep link");var r="".concat(dn,"=")+e.map((function(e){return encodeURIComponent(e)})).join(","),o=void 0===t?"":"&".concat(fn,"=").concat(encodeURIComponent(t)),i=void 0===n?"":"&".concat(pn,"=").concat(encodeURIComponent(n));return"".concat(m,"://").concat(h).concat(ln,"?").concat(r).concat(o).concat(i)}function hn(e,t,n){if(0===e.length)throw new Error("Must have at least one target when creating a call deep link");var r="".concat(dn,"=")+e.map((function(e){return encodeURIComponent(e)})).join(","),o=void 0===t?"":"&".concat(un,"=").concat(encodeURIComponent(t)),i=void 0===n?"":"&".concat(cn,"=").concat(encodeURIComponent(n));return"".concat(m,"://").concat(h).concat(sn,"?").concat(r).concat(o).concat(i)}function gn(e,t,n,r,o){var i=void 0===e?"":"".concat(tn,"=")+e.map((function(e){return encodeURIComponent(e)})).join(","),a=void 0===t?"":"&".concat(nn,"=").concat(encodeURIComponent(t)),s=void 0===n?"":"&".concat(rn,"=").concat(encodeURIComponent(n)),c=void 0===r?"":"&".concat(on,"=").concat(encodeURIComponent(r)),u=void 0===o?"":"&".concat(an,"=").concat(encodeURIComponent(o));return"".concat(m,"://").concat(h).concat(en,"?").concat(i).concat(a).concat(s).concat(c).concat(u)}function wn(e){if(!e)throw new Error("App ID must be set when creating an app install dialog deep link");return"".concat(m,"://").concat(h).concat(Yt).concat(encodeURIComponent(e))}!function(e){function t(){return!(!Ve(ve)||!ve.supports.appInstallDialog)}e.openAppInstallDialog=function(e){return new Promise((function(n){if(Ve(ve,x.content,x.sidePanel,x.settings,x.task,x.stage,x.meetingStage),!t())throw new Error("Not supported");ve.isLegacyTeams?n(mt("executeDeepLink",wn(e.appId))):(Ct("appInstallDialog.openAppInstallDialog",[e]),n())}))},e.isSupported=t}($t||($t={}));var vn,Cn,yn,bn=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function Sn(e,t){if(null==e||null==t||e.length<=0)return null;var n,r=1;return e.sort((function(e,t){return e.sequence>t.sequence?1:-1})),e.forEach((function(e){e.sequence==r&&(n=n?new Blob([n,e.file],{type:t}):new Blob([e.file],{type:t}),r++)})),n}function En(e,t){if(null==e||null==t)return null;for(var n=atob(e.chunk),r=new Array(n.length),o=0;o<n.length;o++)r[o]=n.charCodeAt(o);var i=new Uint8Array(r),a=new Blob([i],{type:t});return{sequence:e.chunkSequence,file:a}}function In(e){An(e)?Be(t):kn(e)?Be(o):Fn(e)&&Be(i)}function Tn(e){return!(e.mediaType!=vn.MediaType.Video||!e.videoProps||!e.videoProps.videoController)}function Pn(e){return!(null==e||e.maxMediaCount>10)}function Fn(e){var t;return!((null==e?void 0:e.mediaType)!=vn.MediaType.Image||!(null===(t=null==e?void 0:e.imageProps)||void 0===t?void 0:t.imageOutputFormats))}function An(e){return!(!e||e.mediaType!=vn.MediaType.VideoAndImage&&!e.videoAndImageProps)}function kn(e){return!(!e||e.mediaType!=vn.MediaType.Video||!e.videoProps||e.videoProps.isFullScreenMode)}function Rn(e,t,n){return null!=e&&null!=t&&t==vn.FileFormat.ID&&null!=n}function On(e){return!(null==e||e.length<=0||e.length>10)}function Mn(e){return!e||!(null===e.timeOutIntervalInSec||e.timeOutIntervalInSec<=0||e.timeOutIntervalInSec>60)}function Dn(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){!function(e){e.Base64="base64",e.ID="id"}(e.FileFormat||(e.FileFormat={}));var t=function(){return function(){}}();function n(){return!(!Ve(ve)||!ve.supports.permissions)}e.File=t,e.captureImage=function(e){if(!e)throw new Error("[captureImage] Callback cannot be null");Ve(ve,x.content,x.task),y.isFramelessWindow?_e(u)?Ct("captureImage",e):e({errorCode:D.OLD_PLATFORM},void 0):e({errorCode:D.NOT_SUPPORTED_ON_PLATFORM},void 0)},e.hasPermission=function(){if(Ve(ve,x.content,x.task),!n())throw z;var e=N.Media;return new Promise((function(t){t(gt("permissions.has",e))}))},e.requestPermission=function(){if(Ve(ve,x.content,x.task),!n())throw z;var e=N.Media;return new Promise((function(t){t(gt("permissions.request",e))}))};var r=function(e){function t(t){void 0===t&&(t=null);var n=e.call(this)||this;return t&&(n.content=t.content,n.format=t.format,n.mimeType=t.mimeType,n.name=t.name,n.preview=t.preview,n.size=t.size),n}return bn(t,e),t.prototype.getMedia=function(e){if(!e)throw new Error("[get Media] Callback cannot be null");(Ve(ve,x.content,x.task),_e(l))?Rn(this.mimeType,this.format,this.content)?_e("2.0.0")?this.getMediaViaCallback(e):this.getMediaViaHandler(e):e({errorCode:D.INVALID_ARGUMENTS},null):e({errorCode:D.OLD_PLATFORM},null)},t.prototype.getMediaViaCallback=function(e){var t={mediaMimeType:this.mimeType,assembleAttachment:[]};Ct("getMedia",[this.content],(function(n){if(e)if(n&&n.error)e(n.error,null);else if(n&&n.mediaChunk)if(n.mediaChunk.chunkSequence<=0){var r=Sn(t.assembleAttachment,t.mediaMimeType);e(n.error,r)}else{var o=En(n.mediaChunk,t.mediaMimeType);t.assembleAttachment.push(o)}else e({errorCode:D.INTERNAL_ERROR,message:"data received is null"},null)}))},t.prototype.getMediaViaHandler=function(e){var t=$(),n={mediaMimeType:this.mimeType,assembleAttachment:[]},r=[t,this.content];this.content&&e&&Ct("getMedia",r),Qe("getMedia"+t,(function(r){if(e){var o=JSON.parse(r);if(o.error)e(o.error,null),$e("getMedia"+t);else if(o.mediaChunk)if(o.mediaChunk.chunkSequence<=0){var i=Sn(n.assembleAttachment,n.mediaMimeType);e(o.error,i),$e("getMedia"+t)}else{var a=En(o.mediaChunk,n.mediaMimeType);n.assembleAttachment.push(a)}else e({errorCode:D.INTERNAL_ERROR,message:"data received is null"},null),$e("getMedia"+t)}}))},t}(t);e.Media=r;var i,a,s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return bn(t,e),t.prototype.getMediaType=function(){return a.Video},t.prototype.notifyEventToApp=function(e){if(this.controllerCallback)switch(e){case i.StartRecording:if(this.controllerCallback.onRecordingStarted){this.controllerCallback.onRecordingStarted();break}}},t}(function(){function e(e){this.controllerCallback=e}return e.prototype.notifyEventToHost=function(e,t){Ve(ve,x.content,x.task);try{Be(o)}catch(e){return void(t&&t(e))}Ct("media.controller",[{mediaType:this.getMediaType(),mediaControllerEvent:e}],(function(e){t&&t(e)}))},e.prototype.stop=function(e){this.notifyEventToHost(i.StopRecording,e)},e}());e.VideoController=s,function(e){e[e.StartRecording=1]="StartRecording",e[e.StopRecording=2]="StopRecording"}(i=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"}(e.CameraStartMode||(e.CameraStartMode={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(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"}(e.ImageUriType||(e.ImageUriType={})),function(e){e[e.IMAGE=1]="IMAGE",e[e.PDF=2]="PDF"}(e.ImageOutputFormats||(e.ImageOutputFormats={})),e.selectMedia=function(e,t){if(!t)throw new Error("[select Media] Callback cannot be null");if(Ve(ve,x.content,x.task),_e(l)){try{In(e)}catch(e){return void t(e,null)}if(Pn(e)){Ct("selectMedia",[e],(function(n,o,i){if(i)Tn(e)&&e.videoProps.videoController.notifyEventToApp(i);else if(o){for(var a=[],s=0,c=o;s<c.length;s++){var u=c[s];a.push(new r(u))}t(n,a)}else t(n,null)}))}else{var n={errorCode:D.INVALID_ARGUMENTS};t(n,null)}}else{var o={errorCode:D.OLD_PLATFORM};t(o,null)}},e.viewImages=function(e,t){if(!t)throw new Error("[view images] Callback cannot be null");Ve(ve,x.content,x.task),_e(l)?On(e)?Ct("viewImages",[e],t):t({errorCode:D.INVALID_ARGUMENTS}):t({errorCode:D.OLD_PLATFORM})},e.scanBarCode=function(e,t){if(!e)throw new Error("[media.scanBarCode] Callback cannot be null");Ve(ve,x.content,x.task),y.hostClientType!==L.desktop&&y.hostClientType!==L.web&&y.hostClientType!==L.rigel&&y.hostClientType!==L.teamsRoomsWindows&&y.hostClientType!==L.teamsRoomsAndroid&&y.hostClientType!==L.teamsPhones&&y.hostClientType!==L.teamsDisplays?_e(d)?Mn(t)?Ct("media.scanBarCode",[t],e):e({errorCode:D.INVALID_ARGUMENTS},null):e({errorCode:D.OLD_PLATFORM},null):e({errorCode:D.NOT_SUPPORTED_ON_PLATFORM},null)}}(vn||(vn={})),function(e){function t(){return!!(Ve(ve)&&ve.supports.barCode&&ve.supports.permissions)}e.scanBarCode=function(e){return new Promise((function(n){if(Ve(ve,x.content,x.task),!t())throw z;if(!Mn(e))throw{errorCode:D.INVALID_ARGUMENTS};n(gt("media.scanBarCode",e))}))},e.hasPermission=function(){if(Ve(ve,x.content,x.task),!t())throw z;var e=N.Media;return new Promise((function(t){t(gt("permissions.has",e))}))},e.requestPermission=function(){if(Ve(ve,x.content,x.task),!t())throw z;var e=N.Media;return new Promise((function(t){t(gt("permissions.request",e))}))},e.isSupported=t}(Cn||(Cn={})),function(e){function t(e){return new Promise((function(t){if(Ve(ve,x.content,x.task),!n())throw z;ve.isLegacyTeams?t(mt("executeDeepLink",mn([e.user],void 0,e.message))):t(mt("chat.openChat",{members:e.user,message:e.message}))}))}function n(){return!(!Ve(ve)||!ve.supports.chat)}e.openChat=t,e.openGroupChat=function(e){return new Promise((function(r){if(e.users.length<1)throw Error("OpenGroupChat Failed: No users specified");if(1===e.users.length){t({user:e.users[0],message:e.message})}else{if(Ve(ve,x.content,x.task),!n())throw z;if(ve.isLegacyTeams)r(mt("executeDeepLink",mn(e.users,e.topic,e.message)));else r(mt("chat.openChat",{members:e.users,message:e.message,topic:e.topic}))}}))},e.isSupported=n}(yn||(yn={}));var Nn,Un,Ln=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))},Hn=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(e){return function(t){return c([e,t])}}function c(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}};function xn(){return ve.hostVersionsInfo?ve.hostVersionsInfo.adaptiveCardSchemaVersion:void 0}!function(e){function t(){return!!(Ve(ve)&&navigator&&navigator.clipboard&&ve.supports.clipboard)}e.write=function(e){return Ln(this,void 0,void 0,(function(){var n;return Hn(this,(function(r){switch(r.label){case 0:if(Ve(ve,x.content,x.task,x.stage,x.sidePanel),!t())throw z;if(!e.type||!Object.values(U).includes(e.type))throw new Error("Blob type ".concat(e.type," is not supported. Supported blob types are ").concat(Object.values(U)));return[4,ce(e)];case 1:return n=r.sent(),[2,gt("clipboard.writeToClipboard",{mimeType:e.type,content:n})]}}))}))},e.read=function(){return Ln(this,void 0,void 0,(function(){var e,n,r;return Hn(this,(function(o){switch(o.label){case 0:if(Ve(ve,x.content,x.task,x.stage,x.sidePanel),!t())throw z;return We()||y.hostClientType===L.macos?(r=(n=JSON).parse,[4,gt("clipboard.readFromClipboard")]):[3,2];case 1:return[2,se((e=r.apply(n,[o.sent()])).mimeType,e.content)];case 2:return[2,gt("clipboard.readFromClipboard")]}}))}))},e.isSupported=t}(Nn||(Nn={})),function(e){function t(){return!!(Ve(ve)&&ve.supports.geoLocation&&ve.supports.permissions)}e.getCurrentLocation=function(){if(Ve(ve,x.content,x.task),!t())throw z;return gt("location.getLocation",{allowChooseLocation:!1,showMap:!1})},e.hasPermission=function(){if(Ve(ve,x.content,x.task),!t())throw z;var e=N.GeoLocation;return new Promise((function(t){t(gt("permissions.has",e))}))},e.requestPermission=function(){if(Ve(ve,x.content,x.task),!t())throw z;var e=N.GeoLocation;return new Promise((function(t){t(gt("permissions.request",e))}))},e.isSupported=t,function(e){function t(){return!!(Ve(ve)&&ve.supports.geoLocation&&ve.supports.geoLocation.map&&ve.supports.permissions)}e.chooseLocation=function(){if(Ve(ve,x.content,x.task),!t())throw z;return gt("location.getLocation",{allowChooseLocation:!0,showMap:!0})},e.showLocation=function(e){if(Ve(ve,x.content,x.task),!t())throw z;if(!e)throw{errorCode:D.INVALID_ARGUMENTS};return gt("location.showLocation",e)},e.isSupported=t}(e.map||(e.map={}))}(Un||(Un={}));var Vn,_n,Wn=function(){function e(){}return e.prototype.postMessage=function(e,t){Ve(ve),Ct("messageForChild",[e],t||X())},e.prototype.addEventListener=function(e,t){Ve(ve),"message"===e&&Qe("messageForParent",t)},e}(),Bn=function(){function e(){}return Object.defineProperty(e,"Instance",{get:function(){return this._instance||(this._instance=new this)},enumerable:!1,configurable:!0}),e.prototype.postMessage=function(e,t){Ve(ve,x.task),Ct("messageForParent",[e],t||X())},e.prototype.addEventListener=function(e,t){Ve(ve,x.task),"message"===e&&Qe("messageForChild",t)},e}();!function(e){function t(){return!(!Ve(ve)||!ve.supports.secondaryBrowser)}e.open=function(e){if(Ve(ve,x.content),!t())throw z;if(!e||!ae(e))throw{errorCode:D.INVALID_ARGUMENTS,message:"Invalid Url: Only https URL is allowed"};return gt("secondaryBrowser.open",e.toString())},e.isSupported=t}(Vn||(Vn={})),function(e){function t(){return!(!Ve(ve)||!ve.supports.location)}e.getLocation=function(e,n){if(!n)throw new Error("[location.getLocation] Callback cannot be null");if(Ve(ve,x.content,x.task),!_e(s))throw{errorCode:D.OLD_PLATFORM};if(!e)throw{errorCode:D.INVALID_ARGUMENTS};if(!t())throw z;Ct("location.getLocation",[e],n)},e.showLocation=function(e,n){if(!n)throw new Error("[location.showLocation] Callback cannot be null");if(Ve(ve,x.content,x.task),!_e(s))throw{errorCode:D.OLD_PLATFORM};if(!e)throw{errorCode:D.INVALID_ARGUMENTS};if(!t())throw z;Ct("location.showLocation",[e],n)},e.isSupported=t}(_n||(_n={}));var jn,zn,Gn,qn,Jn,Kn,Zn=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))},Xn=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(e){return function(t){return c([e,t])}}function c(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}};function Qn(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?$n(e.persona):[!1,"triggerType must be a valid string"]:[!1,"targetElementBoundingRect must be a DOMRect"]:[!1,"A request object is required"]}function $n(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){var t;function n(e,n){var r=this;Ct("meeting.requestAppAudioHandling",[e.isAppHandlingAudio],(function(i,a){if(i&&null!=a)throw new Error("[requestAppAudioHandling] Callback response - both parameters cannot be set");if(i)throw new Error("[requestAppAudioHandling] Callback response - SDK error ".concat(i.errorCode," ").concat(i.message));if("boolean"!=typeof a)throw new Error("[requestAppAudioHandling] Callback response - isHostAudioless must be a boolean");Qe("meeting.micStateChanged",(function(n){return Zn(r,void 0,void 0,(function(){var r,i;return Xn(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,e.micMuteStateChangedCallback(n)];case 1:return r=a.sent(),i=r.isMicMuted===n.isMicMuted,o(r,i?t.HostInitiated:t.AppDeclinedToChange),[3,3];case 2:return a.sent(),o(n,t.AppFailedToChange),[3,3];case 3:return[2]}}))}))})),n(a)}))}function r(e,t){Ct("meeting.requestAppAudioHandling",[e.isAppHandlingAudio],(function(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 ".concat(e.errorCode," ").concat(e.message));if("boolean"!=typeof n)throw new Error("[requestAppAudioHandling] Callback response - isHostAudioless must be a boolean");Ye("meeting.micStateChanged")&&$e("meeting.micStateChanged"),t(n)}))}function o(e,t){Ve(ve,x.sidePanel,x.meetingStage),Ct("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"}(e.MeetingReactionType||(e.MeetingReactionType={})),function(e){e.Unknown="Unknown",e.Adhoc="Adhoc",e.Scheduled="Scheduled",e.Recurring="Recurring",e.Broadcast="Broadcast",e.MeetNow="MeetNow"}(e.MeetingType||(e.MeetingType={})),function(e){e.OneOnOneCall="oneOnOneCall",e.GroupCall="groupCall"}(e.CallType||(e.CallType={})),e.getIncomingClientAudioState=function(e){if(!e)throw new Error("[get incoming client audio state] Callback cannot be null");Ve(ve,x.sidePanel,x.meetingStage),Ct("getIncomingClientAudioState",e)},e.toggleIncomingClientAudio=function(e){if(!e)throw new Error("[toggle incoming client audio] Callback cannot be null");Ve(ve,x.sidePanel,x.meetingStage),Ct("toggleIncomingClientAudio",e)},e.getMeetingDetails=function(e){if(!e)throw new Error("[get meeting details] Callback cannot be null");Ve(ve,x.sidePanel,x.meetingStage,x.settings,x.content),Ct("meeting.getMeetingDetails",e)},e.getAuthenticationTokenForAnonymousUser=function(e){if(!e)throw new Error("[get Authentication Token For AnonymousUser] Callback cannot be null");Ve(ve,x.sidePanel,x.meetingStage,x.task),Ct("meeting.getAuthenticationTokenForAnonymousUser",e)},e.getLiveStreamState=function(e){if(!e)throw new Error("[get live stream state] Callback cannot be null");Ve(ve,x.sidePanel),Ct("meeting.getLiveStreamState",e)},e.requestStartLiveStreaming=function(e,t,n){if(!e)throw new Error("[request start live streaming] Callback cannot be null");Ve(ve,x.sidePanel),Ct("meeting.requestStartLiveStreaming",[t,n],e)},e.requestStopLiveStreaming=function(e){if(!e)throw new Error("[request stop live streaming] Callback cannot be null");Ve(ve,x.sidePanel),Ct("meeting.requestStopLiveStreaming",e)},e.registerLiveStreamChangedHandler=function(e){if(!e)throw new Error("[register live stream changed handler] Handler cannot be null");Ve(ve,x.sidePanel),Qe("meeting.liveStreamChanged",e)},e.shareAppContentToStage=function(e,t){if(!e)throw new Error("[share app content to stage] Callback cannot be null");Ve(ve,x.sidePanel,x.meetingStage),Ct("meeting.shareAppContentToStage",[t],e)},e.getAppContentStageSharingCapabilities=function(e){if(!e)throw new Error("[get app content stage sharing capabilities] Callback cannot be null");Ve(ve,x.sidePanel,x.meetingStage),Ct("meeting.getAppContentStageSharingCapabilities",e)},e.stopSharingAppContentToStage=function(e){if(!e)throw new Error("[stop sharing app content to stage] Callback cannot be null");Ve(ve,x.sidePanel,x.meetingStage),Ct("meeting.stopSharingAppContentToStage",e)},e.getAppContentStageSharingState=function(e){if(!e)throw new Error("[get app content stage sharing state] Callback cannot be null");Ve(ve,x.sidePanel,x.meetingStage),Ct("meeting.getAppContentStageSharingState",e)},e.registerSpeakingStateChangeHandler=function(e){if(!e)throw new Error("[registerSpeakingStateChangeHandler] Handler cannot be null");Ve(ve,x.sidePanel,x.meetingStage),Qe("meeting.speakingStateChanged",e)},e.registerRaiseHandStateChangedHandler=function(e){if(!e)throw new Error("[registerRaiseHandStateChangedHandler] Handler cannot be null");Ve(ve,x.sidePanel,x.meetingStage),Qe("meeting.raiseHandStateChanged",e)},e.registerMeetingReactionReceivedHandler=function(e){if(!e)throw new Error("[registerMeetingReactionReceivedHandler] Handler cannot be null");Ve(ve,x.sidePanel,x.meetingStage),Qe("meeting.meetingReactionReceived",e)},function(e){e.setOptions=function(e){Ve(ve,x.sidePanel),e.contentUrl&&new URL(e.contentUrl),Ct("meeting.appShareButton.setOptions",[e])}}(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");Ve(ve,x.sidePanel,x.meetingStage),e.isAppHandlingAudio?n(e,t):r(e,t)},e.updateMicState=function(e){o(e,t.AppInitiated)}}(jn||(jn={})),function(e){function t(){return!(!Ve(ve)||!ve.supports.monetization)}e.openPurchaseExperience=function(e,n){var r,o;return"function"==typeof e?(r=e,o=n):o=e,Ve(ve,x.content),ne((function(){return new Promise((function(e){if(!t())throw z;e(gt("monetization.openPurchaseExperience",o))}))}),r)},e.isSupported=t}(zn||(zn={})),function(e){function t(){return!(!Ve(ve)||!ve.supports.calendar)}e.openCalendarItem=function(e){return new Promise((function(n){if(Ve(ve,x.content),!t())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openCalendarItem");n(mt("calendar.openCalendarItem",e))}))},e.composeMeeting=function(e){return new Promise((function(n){if(Ve(ve,x.content),!t())throw new Error("Not supported");ve.isLegacyTeams?n(mt("executeDeepLink",gn(e.attendees,e.startTime,e.endTime,e.subject,e.content))):n(mt("calendar.composeMeeting",e))}))},e.isSupported=t}(Gn||(Gn={})),function(e){function t(){return!(!Ve(ve)||!ve.supports.mail)}e.openMailItem=function(e){return new Promise((function(n){if(Ve(ve,x.content),!t())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openMailItem");n(mt("mail.openMailItem",e))}))},e.composeMail=function(e){return new Promise((function(n){if(Ve(ve,x.content),!t())throw new Error("Not supported");n(mt("mail.composeMail",e))}))},e.isSupported=t,function(e){e.New="new",e.Reply="reply",e.ReplyAll="replyAll",e.Forward="forward"}(e.ComposeMailType||(e.ComposeMailType={}))}(qn||(qn={})),function(e){function t(e){return new Promise((function(t){if(!_e(c))throw{errorCode:D.OLD_PLATFORM};if(!Dn(e))throw{errorCode:D.INVALID_ARGUMENTS};if(!n())throw z;t(gt("people.selectPeople",e))}))}function n(){return!(!Ve(ve)||!ve.supports.people)}e.selectPeople=function(e,n){var r,o,i;return Ve(ve,x.content,x.task,x.settings),"function"==typeof e?(o=(r=[e,n])[0],i=r[1]):i=e,ee(t,o,i)},e.isSupported=n}(Jn||(Jn={})),function(e){e.showProfile=function(e){return Ve(ve,x.content),new Promise((function(t){var n=Qn(e),r=n[0],o=n[1];if(!r)throw{errorCode:D.INVALID_ARGUMENTS,message:o};t(gt("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!(!Ve(ve)||!ve.supports.profile)}}(Kn||(Kn={}));var Yn,er=function(){function e(){}return e.setTimeout=function(t,n){var r=performance.now(),o=$();return e.setTimeoutCallbacks[o]={callback:t,timeoutInMs:n,startedAtInMs:r},o},e.clearTimeout=function(t){delete e.setTimeoutCallbacks[t]},e.setInterval=function(t,n){e.setTimeout((function r(){t(),e.setTimeout(r,n)}),n)},e.tick=function(){var t=performance.now(),n=[];for(var r in e.setTimeoutCallbacks){t-(a=e.setTimeoutCallbacks[r]).startedAtInMs>=a.timeoutInMs&&n.push(r)}for(var o=0,i=n;o<i.length;o++){var a,s=i[o];(a=e.setTimeoutCallbacks[s]).callback(),delete e.setTimeoutCallbacks[s]}},e.setTimeoutCallbacks={},e}(),tr=function(){function e(e,t){this.reportStatisticsResult=t,this.sampleCount=0,this.distributionBins=new Uint32Array(e)}return e.prototype.processStarts=function(e,t,n,r){er.tick(),this.suitableForThisSession(e,t,n,r)||this.reportAndResetSession(this.getStatistics(),e,r,t,n),this.start()},e.prototype.processEnds=function(){var 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},e.prototype.getStatistics=function(){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},e.prototype.start=function(){this.frameProcessingStartedAt=performance.now()},e.prototype.suitableForThisSession=function(e,t,n,r){return this.currentSession&&this.currentSession.effectId===e&&this.currentSession.effectParam===r&&this.currentSession.frameWidth===t&&this.currentSession.frameHeight===n},e.prototype.reportAndResetSession=function(e,t,n,r,o){var i=this;e&&this.reportStatisticsResult(e),this.resetCurrentSession(this.getNextTimeout(t,this.currentSession),t,n,r,o),this.timeoutId&&er.clearTimeout(this.timeoutId),this.timeoutId=er.setTimeout(function(){return i.reportAndResetSession(i.getStatistics(),t,n,r,o)}.bind(this),this.currentSession.timeoutInMs)},e.prototype.resetCurrentSession=function(e,t,n,r,o){this.currentSession={startedAtInMs:performance.now(),timeoutInMs:e,effectId:t,effectParam:n,frameWidth:r,frameHeight:o},this.sampleCount=0,this.distributionBins.fill(0)},e.prototype.getNextTimeout=function(t,n){return n&&n.effectId===t?Math.min(e.maxSessionTimeoutInMs,2*n.timeoutInMs):e.initialSessionTimeoutInMs},e.initialSessionTimeoutInMs=1e3,e.maxSessionTimeoutInMs=3e4,e}(),nr=function(){function e(t){var n=this;this.reportPerformanceEvent=t,this.isFirstFrameProcessed=!1,this.frameProcessTimeLimit=100,this.frameProcessingStartedAt=0,this.frameProcessingTimeCost=0,this.processedFrameCount=0,this.performanceStatistics=new tr(e.distributionBinSize,(function(e){return n.reportPerformanceEvent("video.performance.performanceDataGenerated",[e])}))}return e.prototype.startMonitorSlowFrameProcessing=function(){var t=this;er.setInterval((function(){if(0!==t.processedFrameCount){var e=t.frameProcessingTimeCost/t.processedFrameCount;e>t.frameProcessTimeLimit&&t.reportPerformanceEvent("video.performance.frameProcessingSlow",[e]),t.frameProcessingTimeCost=0,t.processedFrameCount=0}}),e.calculateFPSInterval)},e.prototype.setFrameProcessTimeLimit=function(e){this.frameProcessTimeLimit=e},e.prototype.reportApplyingVideoEffect=function(e,t){var n,r;(null===(n=this.applyingEffect)||void 0===n?void 0:n.effectId)===e&&(null===(r=this.applyingEffect)||void 0===r?void 0:r.effectParam)===t||(this.applyingEffect={effectId:e,effectParam:t},this.appliedEffect=void 0)},e.prototype.reportVideoEffectChanged=function(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)},e.prototype.reportStartFrameProcessing=function(e,t){er.tick(),this.appliedEffect&&(this.frameProcessingStartedAt=performance.now(),this.performanceStatistics.processStarts(this.appliedEffect.effectId,e,t,this.appliedEffect.effectParam))},e.prototype.reportFrameProcessed=function(){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])))},e.prototype.reportGettingTextureStream=function(e){this.gettingTextureStreamStartedAt=performance.now(),this.currentStreamId=e},e.prototype.reportTextureStreamAcquired=function(){if(void 0!==this.gettingTextureStreamStartedAt){var e=performance.now()-this.gettingTextureStreamStartedAt;this.reportPerformanceEvent("video.performance.textureStreamAcquired",[this.currentStreamId,e])}},e.distributionBinSize=1e3,e.calculateFPSInterval=1e3,e}(),rr=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))},or=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(e){return function(t){return c([e,t])}}function c(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}};function ir(e,t,n,r){var o,i;return rr(this,void 0,void 0,(function(){var a,s;return or(this,(function(c){switch(c.label){case 0:return a=cr(),!le()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),s=ur,[4,sr(e,n,r)];case 1:return s.apply(void 0,[c.sent(),new lr(n,t),a.writable]),[2]}}))}))}function ar(e,t,n,r){var o,i;return rr(this,void 0,void 0,(function(){var a,s;return or(this,(function(c){switch(c.label){case 0:return a=cr(),!le()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),s=ur,[4,sr(e,n,r)];case 1:return s.apply(void 0,[c.sent(),new pr(n,t),a.writable]),[2]}}))}))}function sr(e,t,n){return rr(this,void 0,void 0,(function(){var r,o,i,a,s;return or(this,(function(c){switch(c.label){case 0:if(le())throw z;r=ue().chrome,c.label=1;case 1:return c.trys.push([1,3,,4]),null==n||n.reportGettingTextureStream(e),[4,r.webview.getTextureStream(e)];case 2:if(o=c.sent(),0===(i=o.getVideoTracks()).length)throw new Error("No video track in stream ".concat(e));return null==n||n.reportTextureStreamAcquired(),[2,i[0]];case 3:throw a=c.sent(),s="Failed to get video track from stream ".concat(e,", error: ").concat(a),t(s),new Error("Internal error: can't get video track from stream ".concat(e));case 4:return[2]}}))}))}function cr(){if(le())throw z;var e=window.MediaStreamTrackGenerator;if(!e)throw z;return new e({kind:"video"})}function ur(e,t,n){new(0,ue().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"}(Yn||(Yn={}));var lr=function(){return function(e,t){var n=this;this.notifyError=e,this.videoFrameHandler=t,this.transform=function(e,t){return rr(n,void 0,void 0,(function(){var n,r,o,i;return or(this,(function(a){switch(a.label){case 0:if(null===(n=e.timestamp))return[3,5];a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.videoFrameHandler({videoFrame:e})];case 2:return r=a.sent(),o=new VideoFrame(r,{timestamp:n}),t.enqueue(o),e.close(),r.close(),[3,4];case 3:return i=a.sent(),e.close(),this.notifyError(i),[3,4];case 4:return[3,6];case 5:this.notifyError(Yn.TimestampIsNull),a.label=6;case 6:return[2]}}))}))}}}(),dr=function(){function e(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)}return Object.defineProperty(e.prototype,"oneTextureLayoutId",{get:function(){return this.headerDataView[0]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this.headerDataView[1]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"frameRowOffset",{get:function(){return this.headerDataView[2]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"frameFormat",{get:function(){return this.headerDataView[3]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"frameWidth",{get:function(){return this.headerDataView[4]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"frameHeight",{get:function(){return this.headerDataView[5]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"multiStreamHeaderRowOffset",{get:function(){return this.headerDataView[6]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"multiStreamCount",{get:function(){return this.headerDataView[7]},enumerable:!1,configurable:!0}),e}(),fr=function(){function e(e,t){this.metadataMap=new Map,this.AUDIO_INFERENCE_RESULT_STREAM_ID=828664161;for(var n=new Uint32Array(e),r=0,o=0;r<t;r++){var i=n[o++],a=n[o++],s=n[o++],c=new Uint8Array(e,a,s);this.metadataMap.set(i,c)}}return Object.defineProperty(e.prototype,"audioInferenceResult",{get:function(){return this.metadataMap.get(this.AUDIO_INFERENCE_RESULT_STREAM_ID)},enumerable:!1,configurable:!0}),e}(),pr=function(){return function(e,t){var n=this;this.notifyError=e,this.videoFrameHandler=t,this.shouldDiscardAudioInferenceResult=!1,this.transform=function(e,t){return rr(n,void 0,void 0,(function(){var n,r,o,i,a,s,c,u;return or(this,(function(l){switch(l.label){case 0:if(null===(n=e.timestamp))return[3,6];l.label=1;case 1:return l.trys.push([1,4,,5]),[4,this.extractVideoFrameAndMetadata(e)];case 2:return r=l.sent(),o=r.videoFrame,i=r.metadata,a=(void 0===i?{}:i).audioInferenceResult,[4,this.videoFrameHandler({videoFrame:o,audioInferenceResult:a})];case 3:return s=l.sent(),c=new VideoFrame(s,{timestamp:n}),t.enqueue(c),o.close(),e.close(),s.close(),[3,5];case 4:return u=l.sent(),e.close(),this.notifyError(u),[3,5];case 5:return[3,7];case 6:this.notifyError(Yn.TimestampIsNull),l.label=7;case 7:return[2]}}))}))},this.extractVideoFrameAndMetadata=function(e){return rr(n,void 0,void 0,(function(){var t,n,r,o,i,a;return or(this,(function(s){switch(s.label){case 0:if(le())throw z;if("NV12"!==e.format)throw this.notifyError(Yn.UnsupportedVideoFramePixelFormat),new Error(Yn.UnsupportedVideoFramePixelFormat);return t={x:0,y:0,width:e.codedWidth,height:2},n=new ArrayBuffer(t.width*t.height*3/2),[4,e.copyTo(n,{rect:t})];case 1:return s.sent(),r=new dr(n,this.notifyError),o={x:0,y:r.multiStreamHeaderRowOffset,width:e.codedWidth,height:e.codedHeight-r.multiStreamHeaderRowOffset},i=new ArrayBuffer(o.width*o.height*3/2),[4,e.copyTo(i,{rect:o})];case 2:return s.sent(),a=new fr(i,r.multiStreamCount),[2,{videoFrame:new VideoFrame(e,{timestamp:e.timestamp,visibleRect:{x:0,y:r.frameRowOffset,width:r.frameWidth,height:r.frameHeight}}),metadata:{audioInferenceResult:this.shouldDiscardAudioInferenceResult?void 0:a.audioInferenceResult}}]}}))}))},Qe("video.mediaStream.audioInferenceDiscardStatusChange",(function(e){var t=e.discardAudioInferenceResult;n.shouldDiscardAudioInferenceResult=t}))}}();function mr(e,t){return function(n,r){null==t||t.reportApplyingVideoEffect(n||"",r),e(n,r).then((function(){null==t||t.reportVideoEffectChanged(n||"",r),Ct("video.videoEffectReadiness",[!0,n,void 0,r])})).catch((function(e){var t=e in hr.EffectFailureReason?e:hr.EffectFailureReason.InitializationFailure;Ct("video.videoEffectReadiness",[!1,n,t,r])}))}}var hr,gr,wr,vr,Cr,yr,br,Sr,Er=function(){return Er=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Er.apply(this,arguments)},Ir=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))},Tr=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(e){return function(t){return c([e,t])}}function c(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},Pr=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function Fr(e,t){Me.initialize(t).then((function(){e&&e()}))}function Ar(){Oe.enablePrintCapability()}function kr(){Oe.print()}function Rr(e){xe(),Ct("getContext",(function(t){t.frameContext||(t.frameContext=y.frameContext),e(t)}))}function Or(e){Me.registerOnThemeChangeHandler(e)}function Mr(e){et("fullScreenChange",e,[])}function Dr(e){et("appButtonClick",e,[x.content])}function Nr(e){et("appButtonHoverEnter",e,[x.content])}function Ur(e){et("appButtonHoverLeave",e,[x.content])}function Lr(e){De.backStack.registerBackButtonHandlerHelper(e)}function Hr(e){Oe.registerOnLoadHandlerHelper(e)}function xr(e){Oe.registerBeforeUnloadHandlerHelper(e)}function Vr(e){et("focusEnter",e,[])}function _r(e){et("changeSettings",e,[x.content])}function Wr(e,t){Ve(ve),De.tabs.getTabInstances(t).then((function(t){e(t)}))}function Br(e,t){Ve(ve),De.tabs.getMruTabInstances(t).then((function(t){e(t)}))}function jr(e){De.shareDeepLink({subPageId:e.subEntityId,subPageLabel:e.subEntityLabel,subPageWebUrl:e.subEntityWebUrl})}function zr(e,t){Ve(ve,x.content,x.sidePanel,x.settings,x.task,x.stage,x.meetingStage),t=t||X(),Me.openLink(e).then((function(){t(!0)})).catch((function(e){t(!1,e.message)}))}function Gr(e){De.setCurrentFrame(e)}function qr(e,t,n){De.initializeWithFrameContext(e,t,n)}function Jr(e){De.returnFocus(e)}function Kr(e,t){Ve(ve),t=t||X(),De.tabs.navigateToTab(e).then((function(){t(!0)})).catch((function(e){t(!1,e.message)}))}function Zr(e,t){Ve(ve,x.content,x.sidePanel,x.settings,x.remove,x.task,x.stage,x.meetingStage),t=t||X(),De.navigateCrossDomain(e).then((function(){t(!0)})).catch((function(e){t(!1,e.message)}))}function Xr(e){Ve(ve),e=e||X(),De.backStack.navigateBack().then((function(){e(!0)})).catch((function(t){e(!1,t.message)}))}!function(e){var t=le()?void 0:new nr(Ct);function n(e){Ct("video.videoFrameProcessed",[e])}function r(e){Ct("video.notifyError",[e])}function o(){return Ve(ve)&&!!ve.supports.video&&(!!ve.supports.video.mediaStream||!!ve.supports.video.sharedFrame)}function i(e,n){var i=this;if(Ve(ve,x.sidePanel),!o()||!u())throw z;Qe("video.startVideoExtensibilityVideoStream",(function(n){return Ir(i,void 0,void 0,(function(){var o,i;return Tr(this,(function(s){switch(s.label){case 0:return o=n.streamId,i=a(e,t),[4,ir(o,i,r,t)];case 1:return s.sent(),[2]}}))}))}),!1),Ct("video.mediaStream.registerForVideoFrame",[n])}function a(e,t){var n=this;return function(r){return Ir(n,void 0,void 0,(function(){var n,o;return Tr(this,(function(i){switch(i.label){case 0:return n=r.videoFrame,null==t||t.reportStartFrameProcessing(n.codedWidth,n.codedHeight),[4,e(r)];case 1:return o=i.sent(),null==t||t.reportFrameProcessed(),[2,o]}}))}))}}function s(e,i){if(Ve(ve,x.sidePanel),!o()||!d())throw z;Qe("video.newVideoFrame",(function(o){if(o){var i=o.timestamp;null==t||t.reportStartFrameProcessing(o.width,o.height),e(c(o),(function(){null==t||t.reportFrameProcessed(),n(i)}),r)}}),!1),Ct("video.registerForVideoFrame",[i])}function c(e){if("videoFrameBuffer"in e)return e;var t=e.data,n=Pr(e,["data"]);return Er(Er({},n),{videoFrameBuffer:t})}function u(){var e;return Ve(ve,x.sidePanel)&&l()&&!!(null===(e=ve.supports.video)||void 0===e?void 0:e.mediaStream)}function l(){var e,t,n,r;return!(!(null===(t=null===(e=ue().chrome)||void 0===e?void 0:e.webview)||void 0===t?void 0:t.getTextureStream)||!(null===(r=null===(n=ue().chrome)||void 0===n?void 0:n.webview)||void 0===r?void 0:r.registerTextureStream))}function d(){var e;return Ve(ve,x.sidePanel)&&!!(null===(e=ve.supports.video)||void 0===e?void 0:e.sharedFrame)}!function(e){e.NV12="NV12"}(e.VideoFrameFormat||(e.VideoFrameFormat={})),function(e){e.EffectChanged="EffectChanged",e.EffectDisabled="EffectDisabled"}(e.EffectChangeType||(e.EffectChangeType={})),function(e){e.InvalidEffectId="InvalidEffectId",e.InitializationFailure="InitializationFailure"}(e.EffectFailureReason||(e.EffectFailureReason={})),e.registerForVideoFrame=function(e){if(Ve(ve,x.sidePanel),!o())throw z;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(Qe("video.setFrameProcessTimeLimit",(function(e){return null==t?void 0:t.setFrameProcessTimeLimit(e.timeLimit)}),!1),u())i(e.videoFrameHandler,e.config);else{if(!d())throw z;s(e.videoBufferHandler,e.config)}null==t||t.startMonitorSlowFrameProcessing()},e.notifySelectedVideoEffectChanged=function(e,t){if(Ve(ve,x.sidePanel),!o())throw z;Ct("video.videoEffectChanged",[e,t])},e.registerForVideoEffect=function(e){if(Ve(ve,x.sidePanel),!o())throw z;Qe("video.effectParameterChange",mr(e,t),!1),Ct("video.registerForVideoEffect")},e.isSupported=o}(hr||(hr={})),function(e){var t="search.queryChange",n="search.queryClose",r="search.queryExecute";function o(){return!(!Ve(ve)||!ve.supports.search)}e.registerHandlers=function(e,i,a){if(Ve(ve,x.content),!o())throw z;Qe(n,e),Qe(r,i),a&&Qe(t,a)},e.unregisterHandlers=function(){if(Ve(ve,x.content),!o())throw z;Ct("search.unregister"),$e(t),$e(n),$e(r)},e.isSupported=o,e.closeSearch=function(){return new Promise((function(e){if(Ve(ve,x.content),!o())throw new Error("Not supported");e(mt("search.closeSearch"))}))}}(gr||(gr={})),function(e){function t(t){return new Promise((function(n){if(!i())throw z;n(gt(e.SharingAPIMessages.shareWebContent,t))}))}function n(e){if(!(e&&e.content&&e.content.length))throw{errorCode:D.INVALID_ARGUMENTS,message:"Shared content is missing"}}function r(e){if(e.content.some((function(e){return!e.type})))throw{errorCode:D.INVALID_ARGUMENTS,message:"Shared content type cannot be undefined"};if(e.content.some((function(t){return t.type!==e.content[0].type})))throw{errorCode:D.INVALID_ARGUMENTS,message:"Shared content must be of the same type"}}function o(e){if("URL"!==e.content[0].type)throw{errorCode:D.INVALID_ARGUMENTS,message:"Content type is unsupported"};if(e.content.some((function(e){return!e.url})))throw{errorCode:D.INVALID_ARGUMENTS,message:"URLs are required for URL content types"}}function i(){return!(!Ve(ve)||!ve.supports.sharing)}e.SharingAPIMessages={shareWebContent:"sharing.shareWebContent"},e.shareWebContent=function(e,i){try{n(e),r(e),o(e)}catch(e){return te((function(){return Promise.reject(e)}),i)}return Ve(ve,x.content,x.sidePanel,x.task,x.stage,x.meetingStage),te(t,i,e)},e.isSupported=i}(wr||(wr={})),function(e){function t(){return!(!Ve(ve)||!ve.supports.stageView)}e.open=function(e){return new Promise((function(n){if(Ve(ve,x.content),!t())throw z;if(!e)throw new Error("[stageView.open] Stage view params cannot be null");n(gt("stageView.open",e))}))},e.isSupported=t}(vr||(vr={})),function(e){function t(){return!(!Ve(ve)||!ve.supports.webStorage)}e.isWebStorageClearedOnUserLogOut=function(){return Ve(ve),t()},e.isSupported=t}(Cr||(Cr={})),function(e){var t;function n(){return!(!Ve(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){return new Promise((function(r){var o;if(Ve(ve,x.content,x.task),!n())throw z;if(!ve.isLegacyTeams)return Ct("call.startCall",[e],r);r(pt("executeDeepLink",hn(e.targets,null===(o=e.requestedModalities)||void 0===o?void 0:o.includes(t.Video),e.source)).then((function(e){if(!e)throw new Error(C);return e})))}))},e.isSupported=n}(yr||(yr={})),function(e){e.Messages=Me.Messages,e.FailedReason=Me.FailedReason,e.ExpectedFailureReason=Me.ExpectedFailureReason,e.notifyAppLoaded=function(){Me.notifyAppLoaded()},e.notifySuccess=function(){Me.notifySuccess()},e.notifyFailure=function(e){Me.notifyFailure(e)},e.notifyExpectedFailure=function(e){Me.notifyExpectedFailure(e)}}(br||(br={})),function(e){e.setValidityState=function(e){De.config.setValidityState(e)},e.getSettings=function(e){Ve(ve,x.content,x.settings,x.remove,x.sidePanel),De.getConfig().then((function(t){e(t)}))},e.setSettings=function(e,t){Ve(ve,x.content,x.settings,x.sidePanel),t=t||X(),De.config.setConfig(e).then((function(){t(!0)})).catch((function(e){t(!1,e.message)}))},e.registerOnSaveHandler=function(e){De.config.registerOnSaveHandlerHelper(e)},e.registerOnRemoveHandler=function(e){De.config.registerOnRemoveHandlerHelper(e)}}(Sr||(Sr={}));var Qr,$r,Yr=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};!function(e){function t(e){return{url:e.url,size:{height:e.height?e.height:j.Small,width:e.width?e.width:j.Small},title:e.title,fallbackUrl:e.fallbackUrl}}function n(e){return{url:e.url,size:{height:e.height?e.height:j.Small,width:e.width?e.width:j.Small},title:e.title,fallbackUrl:e.fallbackUrl,completionBotId:e.completionBotId}}function r(e){return e.height=e.height?e.height:j.Small,e.width=e.width?e.width:j.Small,e}e.startTask=function(e,r){var o=r?function(e){return r(e.err,e.result)}:void 0;return void 0===e.card&&void 0===e.url||e.card?(Ve(ve,x.content,x.sidePanel,x.meetingStage),Ct("tasks.startTask",[e],r)):void 0!==e.completionBotId?ke.url.bot.open(n(e),o):ke.url.open(t(e),o),new Wn},e.updateTask=function(e){(e=r(e)).width,e.height;var t=Yr(e,["width","height"]);if(Object.keys(t).length)throw new Error("resize requires a TaskInfo argument containing only width and height");ke.update.resize(e)},e.submitTask=function(e,t){ke.url.submit(e,t)},e.getDefaultSizeIfNotProvided=r}(Qr||(Qr={})),function(e){!function(e){e.guest="Guest",e.attendee="Attendee",e.presenter="Presenter",e.organizer="Organizer"}(e.UserMeetingRole||(e.UserMeetingRole={})),function(e){e.added="Added",e.alreadyExists="AlreadyExists",e.conflict="Conflict",e.notFound="NotFound"}(e.ContainerState||(e.ContainerState={})),e.isSupported=function(){return!(!Ve(ve,x.meetingStage,x.sidePanel)||!ve.supports.interactive)}}($r||($r={}));var eo=function(){function e(){}return e.prototype.getFluidTenantInfo=function(){return to(),new Promise((function(e){e(gt("interactive.getFluidTenantInfo"))}))},e.prototype.getFluidToken=function(e){return to(),new Promise((function(t){t(gt("interactive.getFluidToken",e))}))},e.prototype.getFluidContainerId=function(){return to(),new Promise((function(e){e(gt("interactive.getFluidContainerId"))}))},e.prototype.setFluidContainerId=function(e){return to(),new Promise((function(t){t(gt("interactive.setFluidContainerId",e))}))},e.prototype.getNtpTime=function(){return to(),new Promise((function(e){e(gt("interactive.getNtpTime"))}))},e.prototype.registerClientId=function(e){return to(),new Promise((function(t){t(gt("interactive.registerClientId",e))}))},e.prototype.getClientRoles=function(e){return to(),new Promise((function(t){t(gt("interactive.getClientRoles",e))}))},e.prototype.getClientInfo=function(e){return to(),new Promise((function(t){t(gt("interactive.getClientInfo",e))}))},e.create=function(){return to(),new e},e}();function to(){if(!$r.isSupported())throw new Error("LiveShareHost Not supported")}const no=/^(?:[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 ro=function(e){return"string"==typeof e&&no.test(e)};var oo=function(){return oo=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},oo.apply(this,arguments)},io=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function ao(e){try{return e.cartItems=so(e.cartItems),e}catch(e){throw new Error("Error deserializing cart")}}function so(e){return e.map((function(e){if(e.imageURL){var t=new URL(e.imageURL);e.imageURL=t}return e.accessories&&(e.accessories=so(e.accessories)),e}))}var co=function(e){try{return e.map((function(e){var t=e.imageURL,n=e.accessories,r=io(e,["imageURL","accessories"]),o=oo({},r);return t&&(o.imageURL=t.href),n&&(o.accessories=co(n)),o}))}catch(e){throw new Error("Error serializing cart items")}};function uo(e){if(!Array.isArray(e)||0===e.length)throw new Error("cartItems must be a non-empty array");for(var t=0,n=e;t<n.length;t++){var r=n[t];fo(r),lo(r.accessories)}}function lo(e){if(null!=e){if(!Array.isArray(e)||0===e.length)throw new Error("CartItem.accessories must be a non-empty array");for(var t=0,n=e;t<n.length;t++){var r=n[t];if(r.accessories)throw new Error("Item in CartItem.accessories cannot have accessories");fo(r)}}}function fo(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");mo(e.price),ho(e.quantity)}function po(e){if(null!=e){if(!e)throw new Error("id must not be empty");if(!1===ro(e))throw new Error("id must be a valid UUID")}}function mo(e){if("number"!=typeof e||e<0)throw new Error("price ".concat(e," must be a number not less than 0"));if(parseFloat(e.toFixed(3))!==e)throw new Error("price ".concat(e," must have at most 3 decimal places"))}function ho(e){if("number"!=typeof e||e<=0||parseInt(e.toString())!==e)throw new Error("quantity ".concat(e," must be an integer greater than 0"))}function go(e){if(!Object.values(wo.CartStatus).includes(e))throw new Error("cartStatus ".concat(e," is not valid"))}var wo,vo,Co,yo,bo,So,Eo,Io=function(){return Io=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Io.apply(this,arguments)};!function(e){function t(){return!(!Ve(ve)||!ve.supports.marketplace)}e.cartVersion={majorVersion:1,minorVersion:1},function(e){e.TACAdminUser="TACAdminUser",e.TeamsAdminUser="TeamsAdminUser",e.TeamsEndUser="TeamsEndUser"}(e.Intent||(e.Intent={})),function(e){e.Open="Open",e.Processing="Processing",e.Processed="Processed",e.Closed="Closed",e.Error="Error"}(e.CartStatus||(e.CartStatus={})),e.getCart=function(){if(Ve(ve,x.content,x.task),!t())throw z;return gt("marketplace.getCart",e.cartVersion).then(ao)},e.addOrUpdateCartItems=function(n){if(Ve(ve,x.content,x.task),!t())throw z;if(!n)throw new Error("addOrUpdateCartItemsParams must be provided");return po(null==n?void 0:n.cartId),uo(null==n?void 0:n.cartItems),gt("marketplace.addOrUpdateCartItems",Io(Io({},n),{cartItems:co(n.cartItems),cartVersion:e.cartVersion})).then(ao)},e.removeCartItems=function(n){if(Ve(ve,x.content,x.task),!t())throw z;if(!n)throw new Error("removeCartItemsParams must be provided");if(po(null==n?void 0:n.cartId),!Array.isArray(null==n?void 0:n.cartItemIds)||0===(null==n?void 0:n.cartItemIds.length))throw new Error("cartItemIds must be a non-empty array");return gt("marketplace.removeCartItems",Io(Io({},n),{cartVersion:e.cartVersion})).then(ao)},e.updateCartStatus=function(n){if(Ve(ve,x.content,x.task),!t())throw z;if(!n)throw new Error("updateCartStatusParams must be provided");return po(null==n?void 0:n.cartId),go(null==n?void 0:n.cartStatus),gt("marketplace.updateCartStatus",Io(Io({},n),{cartVersion:e.cartVersion})).then(ao)},e.isSupported=t}(wo||(wo={})),function(e){function t(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"}(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"}(e.CloudStorageProviderType||(e.CloudStorageProviderType={})),function(e){e.ClassMaterials="classMaterials"}(e.SpecialDocumentLibraryType||(e.SpecialDocumentLibraryType={})),function(e){e.Readonly="readonly"}(e.DocumentLibraryAccessType||(e.DocumentLibraryAccessType={})),function(e){e.Downloaded="Downloaded",e.Downloading="Downloading",e.Failed="Failed"}(e.FileDownloadStatus||(e.FileDownloadStatus={})),function(e){e.Download="DOWNLOAD",e.Upload="UPLOAD",e.Delete="DELETE"}(e.CloudStorageProviderFileAction||(e.CloudStorageProviderFileAction={})),e.getCloudStorageFolders=function(e,t){if(Ve(ve,x.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");Ct("files.getCloudStorageFolders",[e],t)},e.addCloudStorageFolder=function(e,t){if(Ve(ve,x.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");Ct("files.addCloudStorageFolder",[e],t)},e.deleteCloudStorageFolder=function(e,t,n){if(Ve(ve,x.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");Ct("files.deleteCloudStorageFolder",[e,t],n)},e.getCloudStorageFolderContents=function(e,t,n){if(Ve(ve,x.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");Ct("files.getCloudStorageFolderContents",[e,t],n)},e.openCloudStorageFile=function(e,t,n){if(Ve(ve,x.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");Ct("files.openCloudStorageFile",[e,t,n])},e.getExternalProviders=function(e,t){if(void 0===e&&(e=!1),Ve(ve,x.content),!t)throw new Error("[files.getExternalProviders] Callback cannot be null");Ct("files.getExternalProviders",[e],t)},e.copyMoveFiles=function(e,t,n,r,o,i){if(void 0===o&&(o=!1),Ve(ve,x.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(!r)throw new Error("[files.copyMoveFiles] destinationProviderCode cannot be null or empty");if(!i)throw new Error("[files.copyMoveFiles] callback cannot be null");Ct("files.copyMoveFiles",[e,t,n,r,o],i)},e.getFileDownloads=function(e){if(Ve(ve,x.content),!e)throw new Error("[files.getFileDownloads] Callback cannot be null");Ct("files.getFileDownloads",[],e)},e.openDownloadFolder=function(e,t){if(void 0===e&&(e=void 0),Ve(ve,x.content),!t)throw new Error("[files.openDownloadFolder] Callback cannot be null");Ct("files.openDownloadFolder",[e],t)},e.addCloudStorageProvider=function(e){if(Ve(ve,x.content),!e)throw t(D.INVALID_ARGUMENTS,"[files.addCloudStorageProvider] callback cannot be null");Ct("files.addCloudStorageProvider",[],e)},e.removeCloudStorageProvider=function(e,n){if(Ve(ve,x.content),!n)throw t(D.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] callback cannot be null");if(!e||!e.content)throw t(D.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] 3P cloud storage provider request content is missing");Ct("files.removeCloudStorageProvider",[e],n)},e.addCloudStorageProviderFile=function(e,n){if(Ve(ve,x.content),!n)throw t(D.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw t(D.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] 3P cloud storage provider request content is missing");Ct("files.addCloudStorageProviderFile",[e],n)},e.renameCloudStorageProviderFile=function(e,n){if(Ve(ve,x.content),!n)throw t(D.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw t(D.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] 3P cloud storage provider request content is missing");Ct("files.renameCloudStorageProviderFile",[e],n)},e.deleteCloudStorageProviderFile=function(e,n){if(Ve(ve,x.content),!n)throw t(D.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw t(D.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] 3P cloud storage provider request content details are missing");Ct("files.deleteCloudStorageProviderFile",[e],n)},e.downloadCloudStorageProviderFile=function(e,n){if(Ve(ve,x.content),!n)throw t(D.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw t(D.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");Ct("files.downloadCloudStorageProviderFile",[e],n)},e.uploadCloudStorageProviderFile=function(e,n){if(Ve(ve,x.content),!n)throw t(D.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw t(D.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");if(!e.content.destinationFolder)throw t(D.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] Invalid destination folder details");Ct("files.uploadCloudStorageProviderFile",[e],n)},e.registerCloudStorageProviderListChangeHandler=function(e){if(Ve(ve),!e)throw new Error("[registerCloudStorageProviderListChangeHandler] Handler cannot be null");Qe("files.cloudStorageProviderListChange",e)},e.registerCloudStorageProviderContentChangeHandler=function(e){if(Ve(ve),!e)throw new Error("[registerCloudStorageProviderContentChangeHandler] Handler cannot be null");Qe("files.cloudStorageProviderContentChange",e)}}(vo||(vo={})),function(e){function t(){return!(!Ve(ve)||!ve.supports.meetingRoom)}e.getPairedMeetingRoomInfo=function(){return new Promise((function(e){if(Ve(ve),!t())throw z;e(gt("meetingRoom.getPairedMeetingRoomInfo"))}))},e.sendCommandToPairedMeetingRoom=function(e){return new Promise((function(n){if(!e||0==e.length)throw new Error("[meetingRoom.sendCommandToPairedMeetingRoom] Command name cannot be null or empty");if(Ve(ve),!t())throw z;n(gt("meetingRoom.sendCommandToPairedMeetingRoom",e))}))},e.registerMeetingRoomCapabilitiesUpdateHandler=function(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler] Handler cannot be null");if(Ve(ve),!t())throw z;Qe("meetingRoom.meetingRoomCapabilitiesUpdate",(function(t){Ve(ve),e(t)}))},e.registerMeetingRoomStatesUpdateHandler=function(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomStatesUpdateHandler] Handler cannot be null");if(Ve(ve),!t())throw z;Qe("meetingRoom.meetingRoomStatesUpdate",(function(t){Ve(ve),e(t)}))},e.isSupported=t}(Co||(Co={})),function(e){function t(){return!(!Ve(ve)||!ve.supports.notifications)}e.showNotification=function(e){if(Ve(ve,x.content),!t())throw z;Ct("notifications.showNotification",[e])},e.isSupported=t}(yo||(yo={})),function(e){function t(){return!(!Ve(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"}(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"}(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"}(e.SessionTerminatedReason||(e.SessionTerminatedReason={})),e.getCapableParticipants=function(e){if(!e)throw new Error("[remoteCamera.getCapableParticipants] Callback cannot be null");if(Ve(ve,x.sidePanel),!t())throw z;Ct("remoteCamera.getCapableParticipants",e)},e.requestControl=function(e,n){if(!e)throw new Error("[remoteCamera.requestControl] Participant cannot be null");if(!n)throw new Error("[remoteCamera.requestControl] Callback cannot be null");if(Ve(ve,x.sidePanel),!t())throw z;Ct("remoteCamera.requestControl",[e],n)},e.sendControlCommand=function(e,n){if(!e)throw new Error("[remoteCamera.sendControlCommand] ControlCommand cannot be null");if(!n)throw new Error("[remoteCamera.sendControlCommand] Callback cannot be null");if(Ve(ve,x.sidePanel),!t())throw z;Ct("remoteCamera.sendControlCommand",[e],n)},e.terminateSession=function(e){if(!e)throw new Error("[remoteCamera.terminateSession] Callback cannot be null");if(Ve(ve,x.sidePanel),!t())throw z;Ct("remoteCamera.terminateSession",e)},e.registerOnCapableParticipantsChangeHandler=function(e){if(!e)throw new Error("[remoteCamera.registerOnCapableParticipantsChangeHandler] Handler cannot be null");if(Ve(ve,x.sidePanel),!t())throw z;Qe("remoteCamera.capableParticipantsChange",e)},e.registerOnErrorHandler=function(e){if(!e)throw new Error("[remoteCamera.registerOnErrorHandler] Handler cannot be null");if(Ve(ve,x.sidePanel),!t())throw z;Qe("remoteCamera.handlerError",e)},e.registerOnDeviceStateChangeHandler=function(e){if(!e)throw new Error("[remoteCamera.registerOnDeviceStateChangeHandler] Handler cannot be null");if(Ve(ve,x.sidePanel),!t())throw z;Qe("remoteCamera.deviceStateChange",e)},e.registerOnSessionStatusChangeHandler=function(e){if(!e)throw new Error("[remoteCamera.registerOnSessionStatusChangeHandler] Handler cannot be null");if(Ve(ve,x.sidePanel),!t())throw z;Qe("remoteCamera.sessionStatusChange",e)},e.isSupported=t}(bo||(bo={})),function(e){function t(){return!(!Ve(ve)||!ve.supports.appEntity)}e.selectAppEntity=function(e,n,r,o){if(Ve(ve,x.content),!t())throw z;if(!e||0==e.length)throw new Error("[appEntity.selectAppEntity] threadId name cannot be null or empty");if(!o)throw new Error("[appEntity.selectAppEntity] Callback cannot be null");Ct("appEntity.selectAppEntity",[e,n,r],o)},e.isSupported=t}(So||(So={})),function(e){function t(){return!(!Ve(ve)||!ve.supports.teams)}!function(e){e[e.Regular=0]="Regular",e[e.Private=1]="Private",e[e.Shared=2]="Shared"}(e.ChannelType||(e.ChannelType={})),e.getTeamChannels=function(e,n){if(Ve(ve,x.content),!t())throw z;if(!e)throw new Error("[teams.getTeamChannels] groupId cannot be null or empty");if(!n)throw new Error("[teams.getTeamChannels] Callback cannot be null");Ct("teams.getTeamChannels",[e],n)},e.refreshSiteUrl=function(e,n){if(Ve(ve),!t())throw z;if(!e)throw new Error("[teams.refreshSiteUrl] threadId cannot be null or empty");if(!n)throw new Error("[teams.refreshSiteUrl] Callback cannot be null");Ct("teams.refreshSiteUrl",[e],n)},e.isSupported=t,function(e){function t(){return!(!Ve(ve)||!ve.supports.teams)&&!!ve.supports.teams.fullTrust}!function(e){function t(){return!(!Ve(ve)||!ve.supports.teams)&&(!!ve.supports.teams.fullTrust&&!!ve.supports.teams.fullTrust.joinedTeams)}e.getUserJoinedTeams=function(e){return new Promise((function(n){if(Ve(ve),!t())throw z;if((y.hostClientType===L.android||y.hostClientType===L.teamsRoomsAndroid||y.hostClientType===L.teamsPhones||y.hostClientType===L.teamsDisplays)&&!_e(a)){var r={errorCode:D.OLD_PLATFORM};throw new Error(JSON.stringify(r))}n(pt("getUserJoinedTeams",e))}))},e.isSupported=t}(e.joinedTeams||(e.joinedTeams={})),e.getConfigSetting=function(e){return new Promise((function(n){if(Ve(ve),!t())throw z;n(pt("getConfigSetting",e))}))},e.isSupported=t}(e.fullTrust||(e.fullTrust={}))}(Eo||(Eo={}));var To,Po=function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))},Fo=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(e){return function(t){return c([e,t])}}function c(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}};!function(e){var t,n=le()?void 0:new nr(Ct);function r(e,t){var n=this;return function(r){return Po(n,void 0,void 0,(function(){var n,o;return Fo(this,(function(i){switch(i.label){case 0:return n=r.videoFrame,t.reportStartFrameProcessing(n.codedWidth,n.codedHeight),[4,e(r)];case 1:return o=i.sent(),t.reportFrameProcessed(),[2,o]}}))}))}}function o(e){return e.videoFrameBuffer=e.videoFrameBuffer||e.data,delete e.data,e}function i(){return Ve(ve),hr.isSupported()}function a(e){Ct("video.videoFrameProcessed",[e])}function s(e,n){void 0===n&&(n=t.Warn),Ct("video.notifyError",[e,n])}!function(e){e.Fatal="fatal",e.Warn="warn"}(t=e.ErrorLevel||(e.ErrorLevel={})),e.registerForVideoFrame=function(e){var t,c,u=this;if(!i())throw z;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(Ve(ve,x.sidePanel)){if(Qe("video.setFrameProcessTimeLimit",(function(e){return null==n?void 0:n.setFrameProcessTimeLimit(e)}),!1),null===(t=ve.supports.video)||void 0===t?void 0:t.mediaStream)Qe("video.startVideoExtensibilityVideoStream",(function(t){return Po(u,void 0,void 0,(function(){var o,i,a;return Fo(this,(function(c){switch(c.label){case 0:return o=t.streamId,i=t.metadataInTexture,a=n?r(e.videoFrameHandler,n):e.videoFrameHandler,i?[4,ar(o,a,s,n)]:[3,2];case 1:return c.sent(),[3,4];case 2:return[4,ir(o,a,s,n)];case 3:c.sent(),c.label=4;case 4:return[2]}}))}))}),!1),Ct("video.mediaStream.registerForVideoFrame",[e.config]);else{if(!(null===(c=ve.supports.video)||void 0===c?void 0:c.sharedFrame))throw z;Qe("video.newVideoFrame",(function(t){if(t){null==n||n.reportStartFrameProcessing(t.width,t.height);var r=t.timestamp;e.videoBufferHandler(o(t),(function(){null==n||n.reportFrameProcessed(),a(r)}),s)}}),!1),Ct("video.registerForVideoFrame",[e.config])}null==n||n.startMonitorSlowFrameProcessing()}},e.notifySelectedVideoEffectChanged=function(e,t,n){if(Ve(ve,x.sidePanel),!i())throw z;Ct("video.videoEffectChanged",[e,t,n])},e.registerForVideoEffect=function(e){if(Ve(ve,x.sidePanel),!i())throw z;Qe("video.effectParameterChange",mr(e,n),!1),Ct("video.registerForVideoEffect")},e.updatePersonalizedEffects=function(e){if(Ve(ve,x.sidePanel),!hr.isSupported())throw z;Ct("video.personalizedEffectsChanged",[e])},e.isSupported=i,e.notifyFatalError=function(e){if(Ve(ve),!hr.isSupported())throw z;s(e,t.Fatal)}}(To||(To={}))})(),r})()));
2
2
  //# sourceMappingURL=MicrosoftTeams.min.js.map