@microsoft/teams-js 2.39.0 → 2.39.1
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.
- package/README.md +4 -4
- package/dist/esm/packages/teams-js/dts/internal/validOrigins.d.ts +7 -0
- package/dist/esm/packages/teams-js/dts/private/copilot/sidePanelInterfaces.d.ts +26 -0
- package/dist/esm/packages/teams-js/dts/private/nestedAppAuth/nestedAppAuthBridge.d.ts +1 -1
- package/dist/esm/packages/teams-js/src/artifactsForCDN/validDomains.json.js +1 -1
- package/dist/esm/packages/teams-js/src/internal/validOrigins.js +1 -1
- package/dist/esm/packages/teams-js/src/private/nestedAppAuth/nestedAppAuthBridge.js +1 -1
- package/dist/esm/packages/teams-js/src/public/version.js +1 -1
- package/dist/umd/MicrosoftTeams.js +51 -27
- package/dist/umd/MicrosoftTeams.js.map +1 -1
- package/dist/umd/MicrosoftTeams.min.js +1 -1
- package/dist/umd/MicrosoftTeams.min.js.map +1 -1
- package/package.json +1 -1
@@ -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={933:(e,t)=>{"use strict";t.byteLength=function(e){var t=s(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,i=s(e),a=i[0],u=i[1],l=new o(c(e,a,u)),d=0,f=u>0?a-4:a;for(n=0;n<f;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],l[d++]=t>>16&255,l[d++]=t>>8&255,l[d++]=255&t;2===u&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,l[d++]=255&t);1===u&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,l[d++]=t>>8&255,l[d++]=255&t);return l},t.fromByteArray=function(e){for(var t,r=e.length,o=r%3,i=[],a=16383,s=0,c=r-o;s<c;s+=a)i.push(l(e,s,s+a>c?c:s+a));1===o?(t=e[r-1],i.push(n[t>>2]+n[t<<4&63]+"==")):2===o&&(t=(e[r-2]<<8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return i.join("")};for(var n=[],r=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)n[a]=i[a],r[i.charCodeAt(a)]=a;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function c(e,t,n){return 3*(t+n)/4-n}function u(e){return n[e>>18&63]+n[e>>12&63]+n[e>>6&63]+n[63&e]}function l(e,t,n){for(var r,o=[],i=t;i<n;i+=3)r=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]),o.push(u(r));return o.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},815:(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(530)(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},530:(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(821),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}},821:e=>{var t=1e3,n=60*t,r=60*n,o=24*r,i=7*o;function a(e){if(!((e=String(e)).length>100)){var a=/^(-?(?:\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(a){var s=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return s*i;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*r;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}function s(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 c(e){var i=Math.abs(e);return i>=o?u(e,i,o,"day"):i>=r?u(e,i,r,"hour"):i>=n?u(e,i,n,"minute"):i>=t?u(e,i,t,"second"):e+" ms"}function u(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 a(e);if("number"===n&&isFinite(e))return t.long?c(e):s(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}(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;n.t=function(r,o){if(1&o&&(r=this(r)),8&o)return r;if("object"==typeof r&&r){if(4&o&&r.__esModule)return r;if(16&o&&"function"==typeof r.then)return r}var i=Object.create(null);n.r(i);var a={};e=e||[null,t({}),t([]),t(t)];for(var s=2&o&&r;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((e=>a[e]=()=>r[e]));return a.default=()=>r,n.d(i,a),i}})(),(()=>{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:()=>ke,AppId:()=>Xr,ChannelType:()=>dn,ChildAppWindow:()=>Rm,DialogDimension:()=>ln,EduType:()=>He,EmailAddress:()=>Bp,ErrorCode:()=>Ne,FileOpenPreference:()=>Fe,FrameContexts:()=>an,HostClientType:()=>rn,HostName:()=>on,LiveShareHost:()=>rC,NotificationTypes:()=>zc,ParentAppWindow:()=>Fm,RenderingSurfaces:()=>sn,SecondaryM365ContentIdName:()=>Me,TaskModuleDimension:()=>ln,TeamType:()=>cn,UUID:()=>Wn,UserSettingTypes:()=>qc,UserTeamRole:()=>un,ValidatedSafeString:()=>Zr,ViewerActionTypes:()=>$c,activateChildProxyingCommunication:()=>Sr,app:()=>i,appEntity:()=>B,appInitialization:()=>Ie,appInstallDialog:()=>Z,authentication:()=>Q,barCode:()=>Y,calendar:()=>le,call:()=>Ae,chat:()=>ee,clipboard:()=>te,conversations:()=>b,copilot:()=>T,dialog:()=>f,enablePrintCapability:()=>mw,executeDeepLink:()=>kw,externalAppAuthentication:()=>O,externalAppAuthenticationForCEA:()=>R,externalAppCardActions:()=>F,externalAppCardActionsForCEA:()=>k,externalAppCardActionsForDA:()=>M,externalAppCommands:()=>N,files:()=>x,geoLocation:()=>oe,getAdaptiveCardSchemaVersion:()=>Tm,getContext:()=>vw,getCurrentFeatureFlagsState:()=>Ar,getMruTabInstances:()=>Rw,getTabInstances:()=>Ow,hostEntity:()=>J,initialize:()=>gw,initializeWithFrameContext:()=>Nw,liveShare:()=>Re,location:()=>ae,logs:()=>S,mail:()=>fe,marketplace:()=>Ve,media:()=>X,meeting:()=>ce,meetingRoom:()=>D,menus:()=>p,messageChannels:()=>U,monetization:()=>ue,navigateBack:()=>Hw,navigateCrossDomain:()=>Lw,navigateToTab:()=>Uw,nestedAppAuth:()=>ne,nestedAppAuthBridge:()=>L,notifications:()=>H,openFilePreview:()=>Yc,otherAppStateChange:()=>_,overwriteFeatureFlagsState:()=>Pr,pages:()=>y,people:()=>ge,print:()=>hw,profile:()=>me,registerAppButtonClickHandler:()=>yw,registerAppButtonHoverEnterHandler:()=>Sw,registerAppButtonHoverLeaveHandler:()=>bw,registerBackButtonHandler:()=>Ew,registerBeforeUnloadHandler:()=>Iw,registerChangeSettingsHandler:()=>Tw,registerCustomHandler:()=>Zc,registerFocusEnterHandler:()=>Pw,registerFullScreenHandler:()=>Cw,registerOnLoadHandler:()=>Aw,registerOnThemeChangeHandler:()=>ww,registerUserSettingsChangeHandler:()=>Xc,remoteCamera:()=>V,returnFocus:()=>Dw,search:()=>he,secondaryBrowser:()=>ie,sendCustomEvent:()=>Qc,sendCustomMessage:()=>Kc,setFeatureFlagsState:()=>Ir,setFrameContext:()=>Mw,settings:()=>Te,shareDeepLink:()=>Fw,sharing:()=>we,sidePanelInterfaces:()=>I,stageView:()=>ye,store:()=>K,tasks:()=>Oe,teams:()=>z,teamsCore:()=>pe,thirdPartyCloudStorage:()=>Pe,uploadCustomApp:()=>Jc,version:()=>Cr,videoEffects:()=>$,videoEffectsEx:()=>q,visualMedia:()=>be,webStorage:()=>Ee});var e={};n.r(e),n.d(e,{_clearTelemetryPort:()=>ao,getTelemetryPort:()=>oo,isSupported:()=>io});var t={};n.r(t),n.d(t,{_clearDataLayerPort:()=>go,getDataLayerPort:()=>fo,isSupported:()=>po});var o={};n.r(o),n.d(o,{registerBeforeSuspendOrTerminateHandler:()=>mo,registerOnResumeHandler:()=>ho});var i={};n.r(i),n.d(i,{ExpectedFailureReason:()=>So,FailedReason:()=>yo,Messages:()=>Co,_initialize:()=>Io,_uninitialize:()=>Po,getContext:()=>To,getFrameContext:()=>Eo,initialize:()=>Ao,isInitialized:()=>bo,lifecycle:()=>o,notifyAppLoaded:()=>Oo,notifyExpectedFailure:()=>ko,notifyFailure:()=>Fo,notifySuccess:()=>Ro,openLink:()=>xo,registerHostToAppPerformanceMetricsHandler:()=>No,registerOnThemeChangeHandler:()=>Mo});var a={};n.r(a),n.d(a,{isSupported:()=>Lo,resize:()=>Uo});var s={};n.r(s),n.d(s,{isSupported:()=>_o,open:()=>Ho});var c={};n.r(c),n.d(c,{isSupported:()=>jo,registerOnMessageFromParent:()=>Wo,sendMessageToDialog:()=>Bo,sendMessageToParentFromDialog:()=>Vo});var u={};n.r(u),n.d(u,{bot:()=>s,getDialogInfoFromBotUrlDialogInfo:()=>Jo,getDialogInfoFromUrlDialogInfo:()=>Go,isSupported:()=>qo,open:()=>zo,parentCommunication:()=>c,submit:()=>$o});var l={};n.r(l),n.d(l,{isSupported:()=>ai,open:()=>ii});var d={};n.r(d),n.d(d,{bot:()=>l,isSupported:()=>ci,open:()=>si});var f={};n.r(f),n.d(f,{adaptiveCard:()=>d,initialize:()=>ui,isSupported:()=>li,update:()=>a,url:()=>u});var p={};n.r(p),n.d(p,{DisplayMode:()=>fi,MenuItem:()=>gi,MenuListType:()=>pi,initialize:()=>yi,isSupported:()=>Ti,setNavBarMenu:()=>Ei,setUpViews:()=>Si,showActionMenu:()=>Ii});var g={};n.r(g),n.d(g,{initialize:()=>Oi,isSupported:()=>Vi,registerChangeConfigHandler:()=>Ui,registerOnRemoveHandler:()=>Ni,registerOnRemoveHandlerHelper:()=>xi,registerOnSaveHandler:()=>ki,registerOnSaveHandlerHelper:()=>Mi,setConfig:()=>Fi,setValidityState:()=>Ri});var m={};n.r(m),n.d(m,{isSupported:()=>ma,onClick:()=>fa,onHoverEnter:()=>pa,onHoverLeave:()=>ga});var h={};n.r(h),n.d(h,{_initialize:()=>ha,isSupported:()=>ya,navigateBack:()=>va,registerBackButtonHandler:()=>wa,registerBackButtonHandlerHelper:()=>Ca});var v={};n.r(v),n.d(v,{isSupported:()=>Ea,navigateTo:()=>Sa,navigateToDefaultPage:()=>ba});var w={};n.r(w),n.d(w,{enterFullscreen:()=>Aa,exitFullscreen:()=>Ia,isSupported:()=>Pa});var C={};n.r(C),n.d(C,{getMruTabInstances:()=>Ra,getTabInstances:()=>Oa,isSupported:()=>Fa,navigateToTab:()=>Ta});var y={};n.r(y),n.d(y,{EnterFocusType:()=>ka,ReturnFocusType:()=>Ma,appButton:()=>m,backStack:()=>h,config:()=>g,currentApp:()=>v,fullTrust:()=>w,getConfig:()=>La,initializeWithFrameContext:()=>Ua,isSupported:()=>Wa,navigateCrossDomain:()=>Ha,navigateToApp:()=>_a,registerFocusEnterHandler:()=>xa,registerFullScreenHandler:()=>Ba,returnFocus:()=>Na,setCurrentFrame:()=>Da,shareDeepLink:()=>Va,tabs:()=>C});var S={};n.r(S),n.d(S,{isSupported:()=>jc,registerGetLogHandler:()=>Wc});var b={};n.r(b),n.d(b,{closeConversation:()=>nu,getChatMembers:()=>ru,isSupported:()=>ou,openConversation:()=>tu});var E={};n.r(E),n.d(E,{isSupported:()=>cu,sendCustomTelemetryData:()=>uu});var A={};n.r(A),n.d(A,{getEligibilityInfo:()=>gu,isSupported:()=>pu});var I={};n.r(I),n.d(I,{ContentItemType:()=>hu,MediaSelectionType:()=>vu,SidePanelErrorCode:()=>Cu,SidePanelErrorImpl:()=>yu,UserConsent:()=>wu});var P={};n.r(P),n.d(P,{copilotSidePanelNotSupportedOnPlatformError:()=>Ou,getContent:()=>Iu,isResponseAReportableError:()=>Au,isSupported:()=>Eu,preCheckUserConsent:()=>Pu,registerUserActionContentSelect:()=>Tu});var T={};n.r(T),n.d(T,{customTelemetry:()=>E,eligibility:()=>A,sidePanel:()=>P});var O={};n.r(O),n.d(O,{ActionExecuteInvokeRequestType:()=>Du,ActionExecuteResponseHandler:()=>_u,InvokeErrorCode:()=>Hu,InvokeResponseType:()=>Lu,OriginalRequestType:()=>Uu,SerializableActionExecuteInvokeRequest:()=>Nu,authenticateAndResendRequest:()=>zu,authenticateWithOauth2:()=>Gu,authenticateWithPowerPlatformConnectorPlugins:()=>Ju,authenticateWithSSO:()=>$u,authenticateWithSSOAndResendRequest:()=>qu,isActionExecuteResponse:()=>xu,isInvokeError:()=>Vu,isSupported:()=>Ku,validateActionExecuteInvokeRequest:()=>Wu});var R={};n.r(R),n.d(R,{authenticateAndResendRequest:()=>el,authenticateWithOauth:()=>Yu,authenticateWithSSO:()=>Xu,authenticateWithSSOAndResendRequest:()=>tl,isSupported:()=>nl,validateInput:()=>rl});var F={};n.r(F),n.d(F,{ActionOpenUrlErrorCode:()=>al,ActionOpenUrlType:()=>il,isSupported:()=>ul,processActionOpenUrl:()=>cl,processActionSubmit:()=>sl});var k={};n.r(k),n.d(k,{isSupported:()=>gl,processActionOpenUrl:()=>fl,processActionSubmit:()=>pl});var M={};n.r(M),n.d(M,{SerializableActionOpenUrlDialogInfo:()=>bl,isSupported:()=>yl,processActionOpenUrlDialog:()=>Cl});var N={};n.r(N),n.d(N,{isSupported:()=>Pl,processActionCommand:()=>Il});var x={};n.r(x),n.d(x,{CloudStorageProvider:()=>Ol,CloudStorageProviderFileAction:()=>Nl,CloudStorageProviderType:()=>Rl,DocumentLibraryAccessType:()=>kl,FileDownloadStatus:()=>Ml,SpecialDocumentLibraryType:()=>Fl,addCloudStorageFolder:()=>Dl,addCloudStorageProvider:()=>jl,addCloudStorageProviderFile:()=>$l,copyMoveFiles:()=>Vl,deleteCloudStorageFolder:()=>Ul,deleteCloudStorageProviderFile:()=>Gl,downloadCloudStorageProviderFile:()=>Jl,getCloudStorageFolderContents:()=>Ll,getCloudStorageFolders:()=>xl,getExternalProviders:()=>_l,getFileDownloads:()=>Bl,openCloudStorageFile:()=>Hl,openDownloadFolder:()=>Wl,registerCloudStorageProviderContentChangeHandler:()=>Zl,registerCloudStorageProviderListChangeHandler:()=>Ql,removeCloudStorageProvider:()=>zl,renameCloudStorageProviderFile:()=>ql,uploadCloudStorageProviderFile:()=>Kl});var D={};n.r(D),n.d(D,{getPairedMeetingRoomInfo:()=>ed,isSupported:()=>od,registerMeetingRoomCapabilitiesUpdateHandler:()=>nd,registerMeetingRoomStatesUpdateHandler:()=>rd,sendCommandToPairedMeetingRoom:()=>td});var U={};n.r(U),n.d(U,{dataLayer:()=>t,isSupported:()=>id,telemetry:()=>e});var L={};n.r(L),n.d(L,{initialize:()=>ld,version:()=>ad});var H={};n.r(H),n.d(H,{isSupported:()=>Cd,showNotification:()=>wd});var _={};n.r(_),n.d(_,{isSupported:()=>Ad,notifyInstallCompleted:()=>Ed,registerAppInstallationHandler:()=>Sd,unregisterAppInstallationHandler:()=>bd});var V={};n.r(V),n.d(V,{ControlCommand:()=>Pd,ErrorReason:()=>Td,SessionTerminatedReason:()=>Od,getCapableParticipants:()=>Rd,isSupported:()=>Ld,registerOnCapableParticipantsChangeHandler:()=>Nd,registerOnDeviceStateChangeHandler:()=>Dd,registerOnErrorHandler:()=>xd,registerOnSessionStatusChangeHandler:()=>Ud,requestControl:()=>Fd,sendControlCommand:()=>kd,terminateSession:()=>Md});var B={};n.r(B),n.d(B,{isSupported:()=>Vd,selectAppEntity:()=>_d});var W={};n.r(W),n.d(W,{getUserJoinedTeams:()=>Wd,isSupported:()=>jd});var j={};n.r(j),n.d(j,{getConfigSetting:()=>$d,isSupported:()=>qd,joinedTeams:()=>W});var z={};n.r(z),n.d(z,{ChannelType:()=>Jd,fullTrust:()=>j,getTeamChannels:()=>Kd,isSupported:()=>Zd,refreshSiteUrl:()=>Qd});var $={};n.r($),n.d($,{EffectChangeType:()=>cf,EffectFailureReason:()=>uf,VideoFrameFormat:()=>sf,isSupported:()=>mf,notifySelectedVideoEffectChanged:()=>df,registerForVideoEffect:()=>ff,registerForVideoFrame:()=>lf});var q={};n.r(q),n.d(q,{ErrorLevel:()=>_f,frameProcessingTimeoutInMs:()=>Lf,isSupported:()=>Gf,notifyFatalError:()=>Qf,notifySelectedVideoEffectChanged:()=>zf,registerForVideoEffect:()=>$f,registerForVideoFrame:()=>Vf,updatePersonalizedEffects:()=>qf});var G={};n.r(G),n.d(G,{addAndConfigure:()=>op,getAll:()=>ip,isSupported:()=>up,reconfigure:()=>ap,remove:()=>cp,rename:()=>sp});var J={};n.r(J),n.d(J,{AppTypes:()=>fp,isSupported:()=>pp,tab:()=>G});var K={};n.r(K),n.d(K,{isSupported:()=>Ep,openAppDetail:()=>yp,openFullStore:()=>Cp,openInContextStore:()=>Sp,openSpecificStore:()=>bp});var Q={};n.r(Q),n.d(Q,{DataResidency:()=>_p,authenticate:()=>kp,getAuthToken:()=>Np,getUser:()=>Dp,notifyFailure:()=>Hp,notifySuccess:()=>Lp,registerAuthenticationHandlers:()=>Fp});var Z={};n.r(Z),n.d(Z,{isSupported:()=>cg,openAppInstallDialog:()=>sg});var X={};n.r(X),n.d(X,{CameraStartMode:()=>pg,File:()=>wg,FileFormat:()=>dg,ImageOutputFormats:()=>vg,ImageUriType:()=>hg,Media:()=>Eg,MediaControllerEvent:()=>fg,MediaType:()=>mg,Source:()=>gg,VideoController:()=>Ig,captureImage:()=>Cg,hasPermission:()=>yg,requestPermission:()=>Sg,scanBarCode:()=>Og,selectMedia:()=>Pg,viewImages:()=>Tg});var Y={};n.r(Y),n.d(Y,{hasPermission:()=>jg,isSupported:()=>$g,requestPermission:()=>zg,scanBarCode:()=>Wg});var ee={};n.r(ee),n.d(ee,{isSupported:()=>Qg,openChat:()=>Gg,openGroupChat:()=>Kg});var te={};n.r(te),n.d(te,{isSupported:()=>tm,read:()=>em,write:()=>Yg});var ne={};n.r(ne),n.d(ne,{addNAATrustedOrigins:()=>pm,canParentManageNAATrustedOrigins:()=>cm,deleteNAATrustedOrigins:()=>gm,getParentOrigin:()=>sm,isDeeplyNestedAuthSupported:()=>um,isNAAChannelRecommended:()=>am});var re={};n.r(re),n.d(re,{chooseLocation:()=>Cm,isSupported:()=>Sm,showLocation:()=>ym});var oe={};n.r(oe),n.d(oe,{getCurrentLocation:()=>Em,hasPermission:()=>Am,isSupported:()=>Pm,map:()=>re,requestPermission:()=>Im});var ie={};n.r(ie),n.d(ie,{isSupported:()=>Nm,open:()=>Mm});var ae={};n.r(ae),n.d(ae,{getLocation:()=>Dm,isSupported:()=>Lm,showLocation:()=>Um});var se={};n.r(se),n.d(se,{setOptions:()=>_m});var ce={};n.r(ce),n.d(ce,{CallType:()=>$m,EventActionSource:()=>Gm,MeetingReactionType:()=>jm,MeetingType:()=>zm,SharingProtocol:()=>qm,appShareButton:()=>se,getAppContentStageSharingCapabilities:()=>oh,getAppContentStageSharingState:()=>ah,getAuthenticationTokenForAnonymousUser:()=>Xm,getIncomingClientAudioState:()=>Jm,getLiveStreamState:()=>Ym,getMeetingDetails:()=>Qm,getMeetingDetailsVerbose:()=>Zm,joinMeeting:()=>lh,registerLiveStreamChangedHandler:()=>nh,registerMeetingReactionReceivedHandler:()=>uh,registerRaiseHandStateChangedHandler:()=>ch,registerSpeakingStateChangeHandler:()=>sh,requestAppAudioHandling:()=>dh,requestStartLiveStreaming:()=>eh,requestStopLiveStreaming:()=>th,shareAppContentToStage:()=>rh,stopSharingAppContentToStage:()=>ih,toggleIncomingClientAudio:()=>Km,updateMicState:()=>gh});var ue={};n.r(ue),n.d(ue,{isSupported:()=>Ch,openPurchaseExperience:()=>wh});var le={};n.r(le),n.d(le,{composeMeeting:()=>bh,isSupported:()=>Eh,openCalendarItem:()=>Sh});var de={};n.r(de),n.d(de,{composeMailWithHandoff:()=>Th,isSupported:()=>Oh});var fe={};n.r(fe),n.d(fe,{ComposeMailType:()=>xh,composeMail:()=>Mh,handoff:()=>de,isSupported:()=>Nh,openMailItem:()=>kh});var pe={};n.r(pe),n.d(pe,{enablePrintCapability:()=>Uh,isSupported:()=>Wh,print:()=>Lh,registerBeforeUnloadHandler:()=>Vh,registerBeforeUnloadHandlerHelper:()=>Bh,registerOnLoadHandler:()=>Hh,registerOnLoadHandlerHelper:()=>_h});var ge={};n.r(ge),n.d(ge,{isSupported:()=>Gh,selectPeople:()=>$h});var me={};n.r(me),n.d(me,{isSupported:()=>Xh,showProfile:()=>Zh});var he={};n.r(he),n.d(he,{closeSearch:()=>av,isSupported:()=>iv,registerHandlers:()=>rv,unregisterHandlers:()=>ov});var ve={};n.r(ve),n.d(ve,{getContent:()=>uv,isSupported:()=>lv});var we={};n.r(we),n.d(we,{SharingAPIMessages:()=>pv,history:()=>ve,isSupported:()=>Cv,shareWebContent:()=>gv});var Ce={};n.r(Ce),n.d(Ce,{close:()=>Sv,isSupported:()=>bv});var ye={};n.r(ye),n.d(ye,{StageViewOpenMode:()=>Av,isSupported:()=>Pv,open:()=>Iv,self:()=>Ce});var Se={};n.r(Se),n.d(Se,{captureImages:()=>Fv,isSupported:()=>Mv,retrieveImages:()=>kv});var be={};n.r(be),n.d(be,{CameraRestriction:()=>Lv,Source:()=>Hv,hasPermission:()=>_v,image:()=>Se,requestPermission:()=>Vv});var Ee={};n.r(Ee),n.d(Ee,{isSupported:()=>Gv,isWebStorageClearedOnUserLogOut:()=>$v});var Ae={};n.r(Ae),n.d(Ae,{CallModalities:()=>Kv,isSupported:()=>Zv,startCall:()=>Qv});var Ie={};n.r(Ie),n.d(Ie,{ExpectedFailureReason:()=>So,FailedReason:()=>yo,Messages:()=>Co,notifyAppLoaded:()=>Yv,notifyExpectedFailure:()=>nw,notifyFailure:()=>tw,notifySuccess:()=>ew});var Pe={};n.r(Pe),n.d(Pe,{getDragAndDropFiles:()=>lw,isSupported:()=>fw});var Te={};n.r(Te),n.d(Te,{getSettings:()=>Bw,registerOnRemoveHandler:()=>zw,registerOnSaveHandler:()=>jw,setSettings:()=>Ww,setValidityState:()=>Vw});var Oe={};n.r(Oe),n.d(Oe,{getDefaultSizeIfNotProvided:()=>Xw,startTask:()=>Gw,submitTask:()=>Kw,updateTask:()=>Jw});var Re={};n.r(Re),n.d(Re,{ContainerState:()=>tC,LiveShareHost:()=>rC,UserMeetingRole:()=>eC,isSupported:()=>nC});var Fe,ke,Me,Ne,xe,De,Ue,Le,He,_e,Ve={};function Be(e){return void 0!==(null==e?void 0:e.errorCode)}n.r(Ve),n.d(Ve,{CartStatus:()=>CC,Intent:()=>wC,addOrUpdateCartItems:()=>SC,cartVersion:()=>vC,getCart:()=>yC,isSupported:()=>AC,removeCartItems:()=>bC,updateCartStatus:()=>EC}),function(e){e.Inline="inline",e.Desktop="desktop",e.Web="web"}(Fe||(Fe={})),function(e){e.M365Content="m365content"}(ke||(ke={})),function(e){e.DriveId="driveId",e.GroupId="groupId",e.SiteId="siteId",e.UserId="userId"}(Me||(Me={})),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"}(Ne||(Ne={})),function(e){e.GeoLocation="geolocation",e.Media="media"}(xe||(xe={})),function(e){e.BCAIS="bcais",e.BCWAF="bcwaf",e.BCWBF="bcwbf"}(De||(De={})),function(e){e.Faculty="faculty",e.Student="student",e.Other="other"}(Ue||(Ue={})),function(e){e.Adult="adult",e.MinorNoParentalConsentRequired="minorNoParentalConsentRequired",e.MinorWithoutParentalConsent="minorWithoutParentalConsent",e.MinorWithParentalConsent="minorWithParentalConsent",e.NonAdult="nonAdult"}(Le||(Le={})),function(e){e.HigherEducation="higherEducation",e.K12="k12",e.Other="other"}(He||(He={})),function(e){e.TextPlain="text/plain",e.TextHtml="text/html",e.ImagePNG="image/png",e.ImageJPEG="image/jpeg"}(_e||(_e={}));const We=JSON.parse('{"validOrigins":["teams.microsoft.com","teams.microsoft.us","gov.teams.microsoft.us","dod.teams.microsoft.us","int.teams.microsoft.com","outlook.office.com","outlook-sdf.office.com","outlook.office365.com","outlook-sdf.office365.com","outlook.live.com","outlook-sdf.live.com","teams.live.com","local.teams.live.com","local.teams.live.com:8080","local.teams.office.com","local.teams.office.com:8080","devspaces.skype.com","*.www.office.com","www.office.com","word.office.com","excel.office.com","powerpoint.office.com","www.officeppe.com","*.www.microsoft365.com","www.microsoft365.com","bing.com","edgeservices.bing.com","work.bing.com","www.bing.com","www.staging-bing-int.com","*.cloud.microsoft","*.m365.cloud.microsoft","chatuxmanager.svc.cloud.microsoft","copilot.microsoft.com","windows.msn.com","fa000000125.resources.office.net","fa000000129.resources.office.net","fa000000124.resources.office.net","fa000000128.resources.office.net","fa000000136.resources.office.net"]}');const je="2.0.1",ze="2.0.2",$e="2.0.3",qe="2.0.4",Ge="2.0.1",Je="1.9.0",Ke="2.0.0",Qe="1.7.0",Ze="1.8.0",Xe="1.9.0",Ye=n.t(We,2).validOrigins,et=1500,tt=new URL("https://res.cdn.office.net/teams-js/validDomains/json/validDomains.json"),nt=/^https:\/\//,rt="https",ot="teams.microsoft.com",it="The library has not yet been initialized",at="The runtime has not yet been initialized",st="The runtime version is not supported",ct="The call was not properly started";var ut=n(933);const lt=ft,dt=2147483647;function ft(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return gt(e)}return pt(e,t,n)}function pt(e,t,n){if("string"==typeof e)return wt(e,t);if(ArrayBuffer.isView(e))return It(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(yt(e,ArrayBuffer)||e&&yt(e.buffer,ArrayBuffer))return Pt(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(yt(e,SharedArrayBuffer)||e&&yt(e.buffer,SharedArrayBuffer)))return Pt(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return ft.from(r,t,n);const o=Gt(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return ft.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function gt(e){return mt(e),ht(e<0?0:0|vt(e))}function mt(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function ht(e){if(e>dt)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,ft.prototype),t}function vt(e){if(e>=dt)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+dt.toString(16)+" bytes");return 0|e}function wt(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!ft.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|Ct(e,t);let r=ht(n);const o=r.write(e,t);return o!==n&&(r=r.slice(0,o)),r}function Ct(e,t){if(ft.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||yt(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return St(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return bt(e).length;default:if(o)return r?-1:St(e).length;t=(""+t).toLowerCase(),o=!0}}function yt(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function St(e,t){let n;t=t||1/0;const r=e.length;let o=null;const i=[];for(let a=0;a<r;++a){if(n=e.charCodeAt(a),n>55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function bt(e){return ut.toByteArray(At(e))}ft.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),ft.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required"),ft.from=function(e,t,n){return pt(e,t,n)},Object.setPrototypeOf(ft.prototype,Uint8Array.prototype),Object.setPrototypeOf(ft,Uint8Array),ft.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},ft.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==ft.prototype};const Et=/[^+/0-9A-Za-z-_]/g;function At(e){if((e=(e=e.split("=")[0]).trim().replace(Et,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}function It(e){if(yt(e,Uint8Array)){const t=new Uint8Array(e);return Pt(t.buffer,t.byteOffset,t.byteLength)}return Tt(e)}function Pt(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');let r;return r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(r,ft.prototype),r}function Tt(e){const t=e.length<0?0:0|vt(e.length),n=ht(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function Ot(e,t,n){n=Math.min(e.length,n);const r=[];let o=t;for(;o<n;){const t=e[o];let i=null,a=t>239?4:t>223?3:t>191?2:1;if(o+a<=n){let n,r,s,c;switch(a){case 1:t<128&&(i=t);break;case 2:n=e[o+1],128==(192&n)&&(c=(31&t)<<6|63&n,c>127&&(i=c));break;case 3:n=e[o+1],r=e[o+2],128==(192&n)&&128==(192&r)&&(c=(15&t)<<12|(63&n)<<6|63&r,c>2047&&(c<55296||c>57343)&&(i=c));break;case 4:n=e[o+1],r=e[o+2],s=e[o+3],128==(192&n)&&128==(192&r)&&128==(192&s)&&(c=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&s,c>65535&&c<1114112&&(i=c))}}null===i?(i=65533,a=1):i>65535&&(i-=65536,r.push(i>>>10&1023|55296),i=56320|1023&i),r.push(i),o+=a}return kt(r)}function Rt(e,t,n){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return Mt(this,t,n);case"utf8":case"utf-8":return Ot(this,t,n);case"ascii":return Nt(this,t,n);case"latin1":case"binary":return xt(this,t,n);case"base64":return Dt(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ut(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}ft.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?Ot(this,0,e):Rt.apply(this,arguments)};const Ft=4096;function kt(e){const t=e.length;if(t<=Ft)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=Ft));return n}function Mt(e,t,n){const r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);let o="";for(let r=t;r<n;++r)o+=qt[e[r]];return o}function Nt(e,t,n){let r="";n=Math.min(e.length,n);for(let o=t;o<n;++o)r+=String.fromCharCode(127&e[o]);return r}function xt(e,t,n){let r="";n=Math.min(e.length,n);for(let o=t;o<n;++o)r+=String.fromCharCode(e[o]);return r}function Dt(e,t,n){return 0===t&&n===e.length?ut.fromByteArray(e):ut.fromByteArray(e.slice(t,n))}function Ut(e,t,n){const r=e.slice(t,n);let o="";for(let e=0;e<r.length-1;e+=2)o+=String.fromCharCode(r[e]+256*r[e+1]);return o}function Lt(e,t,n,r){n=Number(n)||0;const o=e.length-n;r?(r=Number(r))>o&&(r=o):r=o;const i=t.length;let a;for(r>i/2&&(r=i/2),a=0;a<r;++a){const r=parseInt(t.substr(2*a,2),16);if($t(r))return a;e[n+a]=r}return a}function Ht(e,t,n,r){return zt(St(t,e.length-n),e,n,r)}function _t(e,t,n,r){return zt(Wt(t),e,n,r)}function Vt(e,t,n,r){return zt(bt(t),e,n,r)}function Bt(e,t,n,r){return zt(jt(t,e.length-n),e,n,r)}function Wt(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}function jt(e,t){let n,r,o;const i=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,o=n%256,i.push(o),i.push(r);return i}function zt(e,t,n,r){let o;for(o=0;o<r&&!(o+n>=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function $t(e){return e!=e}ft.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let i=!1;for(;;)switch(r){case"hex":return Lt(this,e,t,n);case"utf8":case"utf-8":return Ht(this,e,t,n);case"ascii":case"latin1":case"binary":return _t(this,e,t,n);case"base64":return Vt(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Bt(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}};const qt=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let o=0;o<16;++o)t[r+o]=e[n]+e[o]}return t}();function Gt(e){if(ft.isBuffer(e)){const t=0|vt(e.length),n=ht(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||$t(e.length)?ht(0):Tt(e):"Buffer"===e.type&&Array.isArray(e.data)?Tt(e.data):void 0}const Jt={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Kt;const Qt=new Uint8Array(16);function Zt(){if(!Kt&&(Kt="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Kt))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Kt(Qt)}const Xt=[];for(let e=0;e<256;++e)Xt.push((e+256).toString(16).slice(1));function Yt(e,t=0){return Xt[e[t+0]]+Xt[e[t+1]]+Xt[e[t+2]]+Xt[e[t+3]]+"-"+Xt[e[t+4]]+Xt[e[t+5]]+"-"+Xt[e[t+6]]+Xt[e[t+7]]+"-"+Xt[e[t+8]]+Xt[e[t+9]]+"-"+Xt[e[t+10]]+Xt[e[t+11]]+Xt[e[t+12]]+Xt[e[t+13]]+Xt[e[t+14]]+Xt[e[t+15]]}const en=function(e,t,n){if(Jt.randomUUID&&!t&&!e)return Jt.randomUUID();const r=(e=e||{}).random||(e.rng||Zt)();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 Yt(r)},tn=/^(?:[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 nn=function(e){return"string"==typeof e&&tn.test(e)};var rn,on,an,sn,cn,un,ln,dn;!function(e){e.desktop="desktop",e.web="web",e.android="android",e.ios="ios",e.ipados="ipados",e.macos="macos",e.visionOS="visionOS",e.rigel="rigel",e.surfaceHub="surfaceHub",e.teamsRoomsWindows="teamsRoomsWindows",e.teamsRoomsAndroid="teamsRoomsAndroid",e.teamsPhones="teamsPhones",e.teamsDisplays="teamsDisplays"}(rn||(rn={})),function(e){e.office="Office",e.outlook="Outlook",e.outlookWin32="OutlookWin32",e.orange="Orange",e.places="Places",e.teams="Teams",e.teamsModern="TeamsModern"}(on||(on={})),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"}(an||(an={})),function(e){e.copilotSidePanel="copilotSidePanel"}(sn||(sn={})),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"}(cn||(cn={})),function(e){e[e.Admin=0]="Admin",e[e.User=1]="User",e[e.Guest=2]="Guest"}(un||(un={})),function(e){e.Large="large",e.Medium="medium",e.Small="small"}(ln||(ln={})),function(e){e.Regular="Regular",e.Private="Private",e.Shared="Shared"}(dn||(dn={}));const fn={errorCode:Ne.NOT_SUPPORTED_ON_PLATFORM},pn={majorVersion:1,minorVersion:5},gn={adaptiveCardSchemaVersion:{majorVersion:1,minorVersion:5}},mn=new Error("Invalid input count: Must supply a valid image count (limit of 10)."),hn=new Error("Invalid response: Received more images than the specified max limit in the response.");function vn(e){return(t,n)=>{if(!t)throw new Error(e||n)}}function wn(e,t){if("string"!=typeof e||"string"!=typeof t)return NaN;const 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(let e=0;e<n.length;++e)if(Number(n[e])!=Number(r[e]))return Number(n[e])>Number(r[e])?1:-1;return 0}function Cn(){return en()}function yn(e){return Object.keys(e).forEach((t=>{null!==e[t]&&void 0!==e[t]&&"object"==typeof e[t]&&yn(e[t])})),Object.freeze(e)}function Sn(e,t,...n){const r=e(...n);return r.then((e=>{t&&t(void 0,e)})).catch((e=>{t&&t(e)})),r}function bn(e,t,...n){const r=e(...n);return r.then((()=>{t&&t(null)})).catch((e=>{t&&t(e)})),r}function En(e,t,...n){const r=e(...n);return r.then((e=>{t&&t(null,e)})).catch((e=>{t&&t(e,null)})),r}function An(e,t,n){return new Promise(((r,o)=>{const i=setTimeout(o,t,n);e().then((e=>{clearTimeout(i),r(e)})).catch((e=>{clearTimeout(i),o(e)}))}))}function In(e){const t=new URL("https://teams.microsoft.com/l/entity/"+encodeURIComponent(e.appId.toString())+"/"+encodeURIComponent(e.pageId));return e.webUrl&&t.searchParams.append("webUrl",e.webUrl.toString()),(e.chatId||e.channelId||e.subPageId)&&t.searchParams.append("context",JSON.stringify({chatId:e.chatId,channelId:e.channelId,subEntityId:e.subPageId})),t.toString()}function Pn(e){return!(wn(`${e.majorVersion}.${e.minorVersion}`,`${pn.majorVersion}.${pn.minorVersion}`)>=0)}function Tn(e){return"https:"===e.protocol}function On(e,t){return new Promise(((n,r)=>{if(e||r("MimeType cannot be null or empty."),t||r("Base64 string cannot be null or empty."),e.startsWith("image/")){const r=atob(t),o=new Uint8Array(r.length);for(let e=0;e<r.length;e++)o[e]=r.charCodeAt(e);n(new Blob([o],{type:e}))}const o=lt.from(t,"base64").toString();n(new Blob([o],{type:e}))}))}function Rn(e){return new Promise(((t,n)=>{0===e.size&&n(new Error("Blob cannot be empty."));const r=new FileReader;r.onloadend=()=>{r.result?t(r.result.toString().split(",")[1]):n(new Error("Failed to read the blob"))},r.onerror=()=>{n(r.error)},r.readAsDataURL(e)}))}function Fn(){if(kn())throw new Error("window object undefined at SSR check");return window}function kn(){return"undefined"==typeof window}function Mn(e,t){if(Dn(e)||!Un(e)||!Ln(e))throw t||new Error("id is not valid.")}function Nn(e,t){const n=e.toString().toLocaleLowerCase();if(Dn(n))throw t||new Error("Invalid Url");if(n.length>2048)throw t||new Error("Url exceeds the maximum size of 2048 characters");if(!Tn(e))throw t||new Error("Url should be a valid https url")}function xn(e){const t=document.createElement("a");return t.href=e,new URL(t.href)}function Dn(e){return new RegExp(`${/<script[^>]*>|<script[^&]*>|%3Cscript[^%]*%3E/gi.source}|${/<\/script[^>]*>|<\/script[^&]*>|%3C\/script[^%]*%3E/gi.source}`,"gi").test(e)}function Un(e){return e.length<256&&e.length>4}function Ln(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n<32||n>126)return!1}return!0}function Hn(e){if(!e)throw new Error("id must not be empty");if(!1===nn(e))throw new Error("id must be a valid UUID")}const _n=!!performance&&"now"in performance;function Vn(){return _n?performance.now()+performance.timeOrigin:void 0}function Bn(e,t=0){if(t>1e3)return!1;if(void 0===e||"boolean"==typeof e||"number"==typeof e||"bigint"==typeof e||"string"==typeof e||null===e)return!0;if(Array.isArray(e))return e.every((e=>Bn(e,t+1)));return!("object"!=typeof e||"[object Object]"!==Object.prototype.toString.call(e)||Object.getPrototypeOf(e)!==Object.prototype&&null!==Object.getPrototypeOf(e))&&Object.keys(e).every((n=>Bn(e[n],t+1)))}class Wn{constructor(e=Cn()){this.uuid=e,Hn(e)}toString(){return this.uuid}serialize(){return this.toString()}}function jn(e){if(!(e instanceof Wn))throw new Error(`Potential id (${JSON.stringify(e)}) is invalid; it is not an instance of UUID class.`)}class zn{}zn.initializeCalled=!1,zn.initializeCompleted=!1,zn.additionalValidOrigins=[],zn.initializePromise=void 0,zn.isFramelessWindow=!1,zn.frameContext=void 0,zn.hostClientType=void 0,zn.printCapabilityEnabled=!1,zn.teamsJsInstanceId=(new Wn).toString();var $n=n(815);const qn=new Wn,Gn=$n.debug.formatArgs;$n.debug.formatArgs=function(e){e[0]=`(${(new Date).toISOString()}): ${e[0]} [${qn.toString()}]`,Gn.call(this,e)};const Jn=(0,$n.debug)("teamsJs");function Kn(e){return Jn.extend(e)}function Qn(e,t){return`${e}_${t}`}function Zn(e){return/^v\d+_[\w.]+$/.test(e)}var Xn=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};const Yn=Kn("runtime"),er=4;function tr(e){return e.apiVersion===er}const nr={apiVersion:-1,supports:{}};function rr(e){if(tr(e))return!0;throw-1===e.apiVersion?new Error(at):new Error(st)}let or=nr;const ir={apiVersion:4,isNAAChannelRecommended:!1,isDeeplyNestedAuthSupported:!1,hostVersionsInfo:gn,isLegacyTeams:!0,supports:{appInstallDialog:{},appEntity:{},call:{},chat:{},conversations:{},dialog:{card:{bot:{}},url:{bot:{},parentCommunication:{}},update:{}},interactive:{},logs:{},meetingRoom:{},menus:{},monetization:{},notifications:{},pages:{config:{},backStack:{},fullTrust:{}},remoteCamera:{},teams:{fullTrust:{}},teamsCore:{},video:{sharedFrame:{}}}},ar=[rn.desktop,rn.web,rn.rigel,rn.surfaceHub,rn.teamsRoomsWindows,rn.teamsRoomsAndroid,rn.teamsPhones,rn.teamsDisplays],sr=[rn.android,rn.ios,rn.ipados,rn.visionOS],cr=[...ar,...sr];function ur(e){let t=e;if(t.apiVersion<er&&lr.forEach((e=>{t.apiVersion===e.versionToUpgradeFrom&&(t=e.upgradeToNextVersion(t))})),tr(t))return t;throw new Error("Received a runtime that could not be upgraded to the latest version")}const lr=[{versionToUpgradeFrom:1,upgradeToNextVersion:e=>{var t;return{apiVersion:2,hostVersionsInfo:void 0,isLegacyTeams:e.isLegacyTeams,supports:Object.assign(Object.assign({},e.supports),{dialog:e.supports.dialog?{card:void 0,url:e.supports.dialog,update:null===(t=e.supports.dialog)||void 0===t?void 0:t.update}:void 0})}}},{versionToUpgradeFrom:2,upgradeToNextVersion:e=>{const t=e.supports,{appNotification:n}=t,r=Xn(t,["appNotification"]);return Object.assign(Object.assign({},e),{apiVersion:3,supports:r})}},{versionToUpgradeFrom:3,upgradeToNextVersion:e=>{var t,n,r,o,i;return{apiVersion:4,hostVersionsInfo:e.hostVersionsInfo,isNAAChannelRecommended:e.isNAAChannelRecommended,isLegacyTeams:e.isLegacyTeams,supports:Object.assign(Object.assign({},e.supports),{dialog:e.supports.dialog?{card:null===(t=e.supports.dialog)||void 0===t?void 0:t.card,url:{bot:null===(r=null===(n=e.supports.dialog)||void 0===n?void 0:n.url)||void 0===r?void 0:r.bot,parentCommunication:(null===(o=e.supports.dialog)||void 0===o?void 0:o.url)?{}:void 0},update:null===(i=e.supports.dialog)||void 0===i?void 0:i.update}:void 0})}}}],dr="2.1.2",fr={"1.0.0":[{capability:{pages:{appButton:{},tabs:{}},stageView:{}},hostClientTypes:ar}],"1.9.0":[{capability:{location:{}},hostClientTypes:cr}],"2.0.0":[{capability:{people:{}},hostClientTypes:cr},{capability:{sharing:{}},hostClientTypes:[rn.desktop,rn.web]}],"2.0.1":[{capability:{teams:{fullTrust:{joinedTeams:{}}}},hostClientTypes:[rn.android,rn.desktop,rn.ios,rn.teamsRoomsAndroid,rn.teamsPhones,rn.teamsDisplays,rn.web]},{capability:{webStorage:{}},hostClientTypes:[rn.desktop]}],"2.0.5":[{capability:{webStorage:{}},hostClientTypes:[rn.android,rn.ios]}],"2.0.8":[{capability:{sharing:{}},hostClientTypes:[rn.android,rn.ios]}],"2.1.1":[{capability:{nestedAppAuth:{}},hostClientTypes:[rn.android,rn.ios,rn.ipados,rn.visionOS]}],"2.1.2":[]},pr=Yn.extend("generateBackCompatRuntimeConfig");function gr(e,t){const n=Object.assign({},e);for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&("object"!=typeof t[r]||Array.isArray(t[r])?r in e||(n[r]=t[r]):n[r]=gr(e[r]||{},t[r]));return n}function mr(e,t,n){pr("generating back compat runtime config for %s",e);let r=Object.assign({},t.supports);pr("Supported capabilities in config before updating based on highestSupportedVersion: %o",r),Object.keys(n).forEach((t=>{wn(e,t)>=0&&n[t].forEach((e=>{void 0!==zn.hostClientType&&e.hostClientTypes.includes(zn.hostClientType)&&(r=gr(r,e.capability))}))}));const o={apiVersion:er,hostVersionsInfo:gn,isLegacyTeams:!0,supports:r};return pr("Runtime config after updating based on highestSupportedVersion: %o",o),o}const hr=Yn.extend("applyRuntimeConfig");function vr(e){"string"==typeof e.apiVersion&&(hr("Trying to apply runtime with string apiVersion, processing as v1: %o",e),e=Object.assign(Object.assign({},e),{apiVersion:1})),hr("Fast-forwarding runtime %o",e);const t=ur(e);hr("Applying runtime %o",t),or=yn(t)}function wr(e){return null!=e&&void 0!==e.serialize&&"function"==typeof e.serialize}const Cr="2.39.0",yr={childProxyingCommunication:!1};function Sr(){yr.childProxyingCommunication=!0}function br(){return yr.childProxyingCommunication}let Er={disableEnforceOriginMatchForChildResponses:!1};function Ar(){return Er}function Ir(e){Er=e}function Pr(e){return Ir(Object.assign(Object.assign({},Er),e)),Ar()}var Tr=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};const Or=e=>{const{uuid:t}=e,n=Tr(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})},Rr=e=>{const{uuidAsString:t}=e,n=Tr(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new Wn(t):void 0})},Fr=e=>{const{uuidAsString:t}=e,n=Tr(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new Wn(t):void 0})},kr=e=>{const{uuid:t}=e,n=Tr(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})};function Mr(e){return void 0!==e.uuidAsString?`${e.uuidAsString} (legacy id: ${e.id})`:void 0!==e.uuid?`${e.uuid.toString()} (legacy id: ${e.id})`:`legacy id: ${e.id} (no uuid)`}const Nr=Kn("flushMessageQueue");function xr(e,t,n,r){if(e&&t&&0!==n.length)for(;n.length>0;){const o=n.shift();if(o){const n=Or(o);Nr("Flushing message %s from %s message queue via postMessage.",Mr(n),r),e.postMessage(n,t)}}}const Dr=Kn("internal"),Ur=Dr.extend("ensureInitializeCalled"),Lr=Dr.extend("ensureInitialized");function Hr(){if(!zn.initializeCalled)throw Ur(it),new Error(it)}function _r(e,...t){if(!zn.initializeCompleted)throw Lr("%s. initializeCalled: %s",it,zn.initializeCalled.toString()),new Error(it);if(t&&t.length>0){let e=!1;for(let n=0;n<t.length;n++)if(t[n]===zn.frameContext){e=!0;break}if(!e)throw new Error(`This call is only allowed in following contexts: ${JSON.stringify(t)}. Current context: "${zn.frameContext}".`)}return rr(e)}function Vr(e=je){const t=wn(zn.clientSupportedSDKVersion,e);return!isNaN(t)&&t>=0}function Br(){return zn.hostClientType==rn.android||zn.hostClientType==rn.ios||zn.hostClientType==rn.ipados||zn.hostClientType==rn.visionOS}function Wr(e=je){if(!Br()){throw{errorCode:Ne.NOT_SUPPORTED_ON_PLATFORM}}if(!Vr(e)){throw{errorCode:Ne.OLD_PLATFORM}}}function jr(e){let t=zn.additionalValidOrigins.concat(e.filter((e=>"string"==typeof e&&nt.test(e))));const n={};t=t.filter((e=>!n[e]&&(n[e]=!0,!0))),zn.additionalValidOrigins=t}function zr(e){if(!Jr(e))throw new Error(`Potential app id (${e}) is invalid; its length ${e.length} is not within the length limits (${qr}-${Gr}).`)}function $r(e){if(Dn(e))throw new Error(`Potential app id (${e}) is invalid; it contains script tags.`);if(Kr(e))throw new Error(`Potential app id (${e}) is invalid; it contains non-printable characters.`)}const qr=4,Gr=256;function Jr(e){return e.length<Gr&&e.length>qr}function Kr(e){return[...e].some((e=>{const t=e.charCodeAt(0);return t<32||t>126}))}function Qr(e){if(!(e instanceof Xr))throw new Error(`Potential app id (${e}) is invalid; it is not an instance of AppId class.`)}class Zr{constructor(e){this.idAsString=e,$r(e)}serialize(){return this.toString()}toString(){return this.idAsString}}class Xr extends Zr{constructor(e){super(e),zr(e)}toJSON(){return{appIdAsString:this.toString()}}}function Yr(e){return null==e}var eo=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())}))};let to;const no="v1",ro=Kn("messageChannels.telemetry");function oo(){return eo(this,void 0,void 0,(function*(){if(to)return ro("Returning telemetry port from cache"),to;if(!io())throw fn;return to=yield dc(Qn(no,"messageChannels.telemetry.getTelemetryPort"),"messageChannels.telemetry.getTelemetryPort"),to}))}function io(){var e;return!(!_r(or)||!(null===(e=or.supports.messageChannels)||void 0===e?void 0:e.telemetry))}function ao(){to=void 0}var so=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())}))};let co;const uo="v1",lo=Kn("messageChannels.dataLayer");function fo(){return so(this,void 0,void 0,(function*(){if(co)return lo("Returning dataLayer port from cache"),co;if(!po())throw fn;return co=yield dc(Qn(uo,"messageChannels.dataLayer.getDataLayerPort"),"messageChannels.dataLayer.getDataLayerPort"),co}))}function po(){var e;return!(!_r(or)||!(null===(e=or.supports.messageChannels)||void 0===e?void 0:e.dataLayer))}function go(){co=void 0}function mo(e){if(!e)throw new Error("[app.lifecycle.registerBeforeSuspendOrTerminateHandler] Handler cannot be null");_r(or),Os(e)}function ho(e){if(!e)throw new Error("[app.lifecycle.registerOnResumeHandler] Handler cannot be null");_r(or),Rs(e)}const vo="v2",wo=Kn("app"),Co={AppLoaded:"appInitialization.appLoaded",Success:"appInitialization.success",Failure:"appInitialization.failure",ExpectedFailure:"appInitialization.expectedFailure"};var yo,So;function bo(){return zn.initializeCompleted}function Eo(){return zn.frameContext}function Ao(e){return qi(Qn(vo,"app.initialize"),e)}function Io(e){Ys.currentWindow=e}function Po(){zn.initializeCalled&&(fs(),zn.initializeCalled=!1,zn.initializeCompleted=!1,zn.initializePromise=void 0,zn.additionalValidOrigins=[],zn.frameContext=void 0,zn.hostClientType=void 0,zn.isFramelessWindow=!1,ao(),go(),nc())}function To(){return new Promise((e=>{Hr(),e(rc(Qn(vo,"app.getContext"),"getContext"))})).then((e=>Do(e)))}function Oo(){Hr(),Gi(Qn(vo,"app.notifyAppLoaded"))}function Ro(){return Qi(Qn(vo,"app.notifySuccess"))}function Fo(e){Hr(),Ki(Qn(vo,"app.notifyFailure"),e)}function ko(e){Hr(),Ji(Qn(vo,"app.notifyExpectedFailure"),e)}function Mo(e){ta(Qn(vo,"app.registerOnThemeChangeHandler"),e)}function No(e){Ss(e)}function xo(e){return na(Qn(vo,"app.openLink"),e)}function Do(e){var t;return{actionInfo:e.actionInfo,app:{locale:e.locale,sessionId:e.appSessionId?e.appSessionId:"",theme:e.theme?e.theme:"default",iconPositionVertical:e.appIconPosition,osLocaleInfo:e.osLocaleInfo,parentMessageId:e.parentMessageId,userClickTime:e.userClickTime,userClickTimeV2:e.userClickTimeV2,userFileOpenPreference:e.userFileOpenPreference,host:{name:e.hostName?e.hostName:on.teams,clientType:e.hostClientType?e.hostClientType:rn.web,sessionId:e.sessionId?e.sessionId:"",ringId:e.ringId},appLaunchId:e.appLaunchId,appId:e.appId?new Xr(e.appId):void 0,manifestVersion:e.manifestVersion},page:{id:e.entityId,frameContext:e.frameContext?e.frameContext:zn.frameContext,renderingSurface:e.renderingSurface?e.renderingSurface:void 0,subPageId:e.subEntityId,isFullScreen:e.isFullScreen,isMultiWindow:e.isMultiWindow,isBackgroundLoad:e.isBackgroundLoad,sourceOrigin:e.sourceOrigin},user:{id:null!==(t=e.userObjectId)&&void 0!==t?t:"",displayName:e.userDisplayName,isCallingAllowed:e.isCallingAllowed,isPSTNCallingAllowed:e.isPSTNCallingAllowed,licenseType:e.userLicenseType,loginHint:e.loginHint,userPrincipalName:e.userPrincipalName,tenant:e.tid?{id:e.tid,teamsSku:e.tenantSKU}:void 0},channel:e.channelId?{id:e.channelId,displayName:e.channelName,relativeUrl:e.channelRelativeUrl,membershipType:e.channelType,defaultOneNoteSectionId:e.defaultOneNoteSectionId,ownerGroupId:e.hostTeamGroupId,ownerTenantId:e.hostTeamTenantId}:void 0,chat:e.chatId?{id:e.chatId}:void 0,meeting:e.meetingId?{id:e.meetingId}:void 0,sharepoint:e.sharepoint,team:e.teamId?{internalId:e.teamId,displayName:e.teamName,type:e.teamType,groupId:e.groupId,templateId:e.teamTemplateId,isArchived:e.isTeamArchived,userRole:e.userTeamRole}:void 0,sharePointSite:e.teamSiteUrl||e.teamSiteDomain||e.teamSitePath||e.mySitePath||e.mySiteDomain?{teamSiteUrl:e.teamSiteUrl,teamSiteDomain:e.teamSiteDomain,teamSitePath:e.teamSitePath,teamSiteId:e.teamSiteId,mySitePath:e.mySitePath,mySiteDomain:e.mySiteDomain}:void 0,dialogParameters:e.dialogParameters||{}}}function Uo(e){Zo(Qn(Ko,"dialog.update.resize"),e)}function Lo(){return!(!_r(or)||!or.supports.dialog)&&!!or.supports.dialog.update}function Ho(e,t,n){Yo(Qn(Ko,"dialog.url.bot.open"),e,t,n)}function _o(){return _r(or)&&void 0!==(or.supports.dialog&&or.supports.dialog.url&&or.supports.dialog.url.bot)}function Vo(e){if(_r(or,an.task),!jo())throw fn;gc(Qn(Ko,"dialog.url.parentCommunication.sendMessageToParentFromDialog"),"messageForParent",[e])}function Bo(e){if(_r(or,an.content,an.sidePanel,an.meetingStage),!jo())throw fn;gc(Qn(Ko,"dialog.url.parentCommunication.sendMessageToDialog"),"messageForChild",[e])}function Wo(e){if(_r(or,an.task),!jo())throw fn;for(hs("messageForChild"),ms(Qn(Ko,"dialog.url.parentCommunication.registerMessageForChildHandler"),"messageForChild",e),ri.reverse();ri.length>0;){e(ri.pop())}}function jo(){var e,t;return _r(or)&&!!(null===(t=null===(e=or.supports.dialog)||void 0===e?void 0:e.url)||void 0===t?void 0:t.parentCommunication)}function zo(e,t,n){Xo(Qn(Ko,"dialog.url.open"),e,t,n)}function $o(e,t){ei(Qn(Ko,"dialog.url.submit"),e,t)}function qo(){return _r(or)&&void 0!==(or.supports.dialog&&or.supports.dialog.url)}function Go(e){return{url:e.url,height:e.size?e.size.height:ln.Small,width:e.size?e.size.width:ln.Small,title:e.title,fallbackUrl:e.fallbackUrl}}function Jo(e){const t=Go(e);return t.completionBotId=e.completionBotId,t}!function(e){e.AuthFailed="AuthFailed",e.Timeout="Timeout",e.Other="Other"}(yo||(yo={})),function(e){e.PermissionError="PermissionError",e.NotFound="NotFound",e.Throttling="Throttling",e.Offline="Offline",e.Other="Other"}(So||(So={})),wo("teamsjs instance is version %s, starting at %s UTC (%s local)",Cr,(new Date).toISOString(),(new Date).toLocaleString()),function(){if(kn())return;const e=document.getElementsByTagName("script"),t=e&&e[e.length-1]&&e[e.length-1].src,n="Today, teamsjs can only be used from a single script or you may see undefined behavior. This log line is used to help detect cases where teamsjs is loaded multiple times -- it is always written. The presence of the log itself does not indicate a multi-load situation, but multiples of these log lines will. If you would like to use teamjs from more than one script at the same time, please open an issue at https://github.com/OfficeDev/microsoft-teams-library-js/issues";t&&0!==t.length?wo("teamsjs is being used from %s. %s",t,n):wo("teamsjs is being used from a script tag embedded directly in your html. %s",n)}();const Ko="v2",Qo="dialog.submit should not be called from FrameContext.content.\nIf dialog.submit was called from inside the dialog, please disregard this message.\nThis issue occurs due to a bug in Teams mobile where the dialog is incorrectly identified as being in the content FrameContext.\nWe are working to resolve this.";function Zo(e,t){if(_r(or,an.content,an.sidePanel,an.task,an.meetingStage),!Lo())throw fn;gc(e,"tasks.updateTask",[t])}function Xo(e,t,n,r){if(_r(or,an.content,an.sidePanel,an.meetingStage),!qo())throw fn;r&&ms(Qn(Ko,"dialog.url.registerMessageForParentHandler"),"messageForParent",r);gc(e,"tasks.startTask",[Go(t)],((e,t)=>{null==n||n({err:e,result:t}),hs("messageForParent")}))}function Yo(e,t,n,r){if(_r(or,an.content,an.sidePanel,an.meetingStage),!_o())throw fn;r&&ms(Qn(Ko,"dialog.url.bot.registerMessageForParentHandler"),"messageForParent",r);gc(e,"tasks.startTask",[Jo(t)],((e,t)=>{null==n||n({err:e,result:t}),hs("messageForParent")}))}function ei(e,t,n){if(_r(or,an.content,an.task),!qo())throw fn;zn.frameContext===an.content&&console.warn(Qo),gc(e,"tasks.completeTask",[t,n?Array.isArray(n)?n:[n]:[]])}function ti(e){return{card:e.card,height:e.size?e.size.height:ln.Small,width:e.size?e.size.width:ln.Small,title:e.title}}function ni(e){const t=ti(e);return t.completionBotId=e.completionBotId,t}const ri=[];function oi(e){zn.frameContext&&(zn.frameContext===an.task?ri.push(e):hs("messageForChild"))}function ii(e,t){if(_r(or,an.content,an.sidePanel,an.meetingStage),!ai())throw fn;const n=ni(e);gc(Qn(Ko,"dialog.adaptiveCard.bot.open"),"tasks.startTask",[n],((e,n)=>{null==t||t({err:e,result:n})}))}function ai(){const e=or.hostVersionsInfo&&or.hostVersionsInfo.adaptiveCardSchemaVersion&&!Pn(or.hostVersionsInfo.adaptiveCardSchemaVersion);return _r(or)&&void 0!==(e&&or.supports.dialog&&or.supports.dialog.card&&or.supports.dialog.card.bot)}function si(e,t){if(_r(or,an.content,an.sidePanel,an.meetingStage),!ci())throw fn;const n=ti(e);gc(Qn(Ko,"dialog.adaptiveCard.open"),"tasks.startTask",[n],((e,n)=>{null==t||t({err:e,result:n})}))}function ci(){const e=or.hostVersionsInfo&&or.hostVersionsInfo.adaptiveCardSchemaVersion&&!Pn(or.hostVersionsInfo.adaptiveCardSchemaVersion);return _r(or)&&void 0!==(e&&or.supports.dialog&&or.supports.dialog.card)}function ui(){ms(Qn(Ko,"dialog.registerMessageForChildHandler"),"messageForChild",oi,!1)}function li(){return!(!_r(or)||!or.supports.dialog)}const di="v2";var fi,pi;!function(e){e[e.ifRoom=0]="ifRoom",e[e.overflowOnly=1]="overflowOnly"}(fi||(fi={}));class gi{constructor(){this.enabled=!0,this.selected=!1}}let mi,hi,vi,wi,Ci;function yi(){ms(Qn(di,"menus.registerNavBarMenuItemPressHandler"),"navBarMenuItemPress",Ai,!1),ms(Qn(di,"menus.registerActionMenuItemPressHandler"),"actionMenuItemPress",Pi,!1),ms(Qn(di,"menus.registerSetModuleViewHandler"),"setModuleView",bi,!1)}function Si(e,t){if(_r(or),!Ti())throw fn;vi=t,gc(Qn(di,"menus.setUpViews"),"setUpViews",[e])}function bi(e){vi&&vi(e)||(_r(or),gc(Qn(di,"menus.handleViewConfigItemPress"),"viewConfigItemPress",[e]))}function Ei(e,t){if(_r(or),!Ti())throw fn;mi=t,gc(Qn(di,"menus.setNavBarMenu"),"setNavBarMenu",[e])}function Ai(e){mi&&mi(e)||(_r(or),gc(Qn(di,"menus.handleNavBarMenuItemPress"),"handleNavBarMenuItemPress",[e]))}function Ii(e,t){if(_r(or),!Ti())throw fn;hi=t,gc(Qn(di,"menus.showActionMenu"),"showActionMenu",[e])}function Pi(e){hi&&hi(e)||(_r(or),gc(Qn(di,"menus.handleActionMenuItemPress"),"handleActionMenuItemPress",[e]))}function Ti(){return!(!_r(or)||!or.supports.menus)}function Oi(){ms(Qn(ja,"pages.config.registerSettingsSaveHandler"),"settings.save",Di,!1),ms(Qn(ja,"pages.config.registerSettingsRemoveHandler"),"settings.remove",Hi,!1)}function Ri(e){return Xa(Qn(ja,"pages.config.setValidityState"),e)}function Fi(e){return es(Qn(ja,"pages.config.setConfig"),e)}function ki(e){Mi(Qn(ja,"pages.config.registerOnSaveHandler"),e,(()=>{if(!Yr(e)&&!Vi())throw fn}))}function Mi(e,t,n){!Yr(t)&&_r(or,an.settings),n&&n(),wi=t,!Yr(t)&&gc(e,"registerHandler",["save"])}function Ni(e){xi(Qn(ja,"pages.config.registerOnRemoveHandler"),e,(()=>{if(!Yr(e)&&!Vi())throw fn}))}function xi(e,t,n){!Yr(t)&&_r(or,an.remove,an.settings),n&&n(),Ci=t,!Yr(t)&&gc(e,"registerHandler",["remove"])}function Di(e){const t=new Li(e);wi?wi(t):xs()?Bs("settings.save",[e]):t.notifySuccess()}function Ui(e){ws(Qn(ja,"pages.config.registerChangeConfigHandler"),"changeSettings",e,[an.content],(()=>{if(!Vi())throw fn}))}!function(e){e.dropDown="dropDown",e.popOver="popOver"}(pi||(pi={}));class Li{constructor(e){this.notified=!1,this.result=e||{}}notifySuccess(){this.ensureNotNotified(),gc(Qn(ja,"pages.saveEvent.notifySuccess"),"settings.save.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),gc(Qn(ja,"pages.saveEvent.notifyFailure"),"settings.save.failure",[e]),this.notified=!0}ensureNotNotified(){if(this.notified)throw new Error("The SaveEvent may only notify success or failure once.")}}function Hi(){const e=new _i;Ci?Ci(e):xs()?Bs("settings.remove",[]):e.notifySuccess()}class _i{constructor(){this.notified=!1}notifySuccess(){this.ensureNotNotified(),gc(Qn(ja,"pages.removeEvent.notifySuccess"),"settings.remove.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),gc(Qn(ja,"pages.removeEvent.notifyFailure"),"settings.remove.failure",[e]),this.notified=!0}ensureNotNotified(){if(this.notified)throw new Error("The removeEventType may only notify success or failure once.")}}function Vi(){return!(!_r(or)||!or.supports.pages)&&!!or.supports.pages.config}class Bi{}class Wi extends Bi{validate(e){return!0}deserialize(e){return e}}var ji=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())}))};const zi=6e4,$i=Kn("app");function qi(e,t){if(kn()){return $i.extend("initialize")("window object undefined at initialization"),Promise.resolve()}return An((()=>ea(e,t)),zi,new Error("SDK initialization timed out."))}function Gi(e){gc(e,Co.AppLoaded,[Cr])}function Ji(e,t){gc(e,Co.ExpectedFailure,[t.reason,t.message])}function Ki(e,t){gc(e,Co.Failure,[t.reason,t.message])}function Qi(e){return ji(this,void 0,void 0,(function*(){if(zn.initializeCompleted)return Xi(e);if(!zn.initializePromise)throw new Error(it);return zn.initializePromise.then((()=>Xi(e)))}))}function Zi(){var e;return _r(or)&&!!(null===(e=or.supports.app)||void 0===e?void 0:e.notifySuccessResponse)}function Xi(e){return ji(this,void 0,void 0,(function*(){return Zi()?uc(Co.Success,[Cr],new Wi,e).then((()=>({hasFinishedSuccessfully:!0}))):(gc(e,Co.Success,[Cr]),{hasFinishedSuccessfully:"unknown"})}))}const Yi=$i.extend("initializeHelper");function ea(e,t){return new Promise((n=>{zn.initializeCalled||(zn.initializeCalled=!0,ds(),zn.initializePromise=tc(t,e).then((({context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r=je})=>{zn.frameContext=e,zn.hostClientType=t,zn.clientSupportedSDKVersion=r;try{Yi("Parsing %s",n);const e=JSON.parse(n);if(Yi("Checking if %o is a valid runtime object",null!=e?e:"null"),!e||!e.apiVersion)throw new Error("Received runtime config is invalid");n&&vr(e)}catch(e){if(!(e instanceof SyntaxError))throw e;try{Yi("Attempting to parse %s as an SDK version",n),isNaN(wn(n,je))||(zn.clientSupportedSDKVersion=n);const e=JSON.parse(r);if(Yi("givenRuntimeConfig parsed to %o",null!=e?e:"null"),!e)throw new Error("givenRuntimeConfig string was successfully parsed. However, it parsed to value of null");vr(e)}catch(e){if(!(e instanceof SyntaxError))throw e;vr(mr(zn.clientSupportedSDKVersion,ir,fr))}}zn.initializeCompleted=!0})),yi(),Oi(),ui()),Array.isArray(t)&&jr(t),void 0!==zn.initializePromise?n(zn.initializePromise):Yi("GlobalVars.initializePromise is unexpectedly undefined")}))}function ta(e,t){!Yr(t)&&Hr(),Cs(e,t)}function na(e,t){return new Promise((n=>{_r(or,an.content,an.sidePanel,an.settings,an.task,an.stage,an.meetingStage),n(oc(e,"executeDeepLink",t))}))}var ra=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())}))};let oa=[];const ia=Kn("validateOrigin");function aa(){return ra(this,void 0,void 0,(function*(){yield ca()}))}function sa(){return 0===oa.length}function ca(e=!1){return ra(this,void 0,void 0,(function*(){if(!sa()&&!e)return oa;if(kn())return oa=Ye,Ye;{ia("Initiating fetch call to acquire valid origins list from CDN");const e=new AbortController,t=setTimeout((()=>e.abort()),et);return fetch(tt,{signal:e.signal}).then((e=>{if(clearTimeout(t),!e.ok)throw new Error("Invalid Response from Fetch Call");return ia("Fetch call completed and retrieved valid origins list from CDN"),e.json().then((e=>{if(ua(JSON.stringify(e)))return oa=e.validOrigins,oa;throw new Error("Valid origins list retrieved from CDN is invalid")}))})).catch((e=>("AbortError"===e.name?ia(`validOrigins fetch call to CDN failed due to Timeout of ${et} ms. Defaulting to fallback list`):ia("validOrigins fetch call to CDN failed with error: %s. Defaulting to fallback list",e),oa=Ye,oa)))}}))}function ua(e){let t=JSON.parse(e);try{t=JSON.parse(e)}catch(e){return!1}if(!t.validOrigins)return!1;for(const e of t.validOrigins)try{new URL("https://"+e)}catch(t){return ia("isValidOriginsFromCDN call failed to validate origin: %s",e),!1}return!0}function la(e,t){if("*."===e.substring(0,2)){const n=e.substring(1);if(t.length>n.length&&t.split(".").length===n.split(".").length&&t.substring(t.length-n.length)===n)return!0}else if(e===t)return!0;return!1}function da(e,t){return ca(t).then((t=>{if(!Tn(e))return ia("Origin %s is invalid because it is not using https protocol. Protocol being used: %s",e,e.protocol),!1;const n=e.host;if(t.some((e=>la(e,n))))return!0;for(const e of zn.additionalValidOrigins){if(la("https://"===e.substring(0,8)?e.substring(8):e,n))return!0}return ia("Origin %s is invalid because it is not an origin approved by this library or included in the call to app.initialize.\nOrigins approved by this library: %o\nOrigins included in app.initialize: %o",e,t,zn.additionalValidOrigins),!1}))}function fa(e){ws(Qn(ja,"pages.appButton.onClick"),"appButtonClick",e,[an.content],(()=>{if(!ma())throw fn}))}function pa(e){ws(Qn(ja,"pages.appButton.onHoverEnter"),"appButtonHoverEnter",e,[an.content],(()=>{if(!ma())throw fn}))}function ga(e){ws(Qn(ja,"pages.appButton.onHoverLeave"),"appButtonHoverLeave",e,[an.content],(()=>{if(!ma())throw fn}))}function ma(){return!(!_r(or)||!or.supports.pages)&&!!or.supports.pages.appButton}function ha(){as()}function va(){return $a(Qn(ja,"pages.backStack.navigateBack"))}function wa(e){Ca(Qn(ja,"pages.backStack.registerBackButtonHandler"),e,(()=>{if(!Yr(e)&&!ya())throw fn}))}function Ca(e,t,n){!Yr(t)&&_r(or),n&&n(),is(t),!Yr(t)&&gc(e,"registerHandler",["backButton"])}function ya(){return!(!_r(or)||!or.supports.pages)&&!!or.supports.pages.backStack}function Sa(e){return new Promise((t=>{if(_r(or,an.content,an.sidePanel,an.settings,an.task,an.stage,an.meetingStage),!Ea())throw fn;t(ac(Qn(ja,"pages.currentApp.navigateTo"),"pages.currentApp.navigateTo",e))}))}function ba(){return new Promise((e=>{if(_r(or,an.content,an.sidePanel,an.settings,an.task,an.stage,an.meetingStage),!Ea())throw fn;e(ac(Qn(ja,"pages.currentApp.navigateToDefaultPage"),"pages.currentApp.navigateToDefaultPage"))}))}function Ea(){return!(!_r(or)||!or.supports.pages)&&!!or.supports.pages.currentApp}function Aa(){if(_r(or,an.content),!Pa())throw fn;gc(Qn(ja,"pages.fullTrust.enterFullscreen"),"enterFullscreen",[])}function Ia(){if(_r(or,an.content),!Pa())throw fn;gc(Qn(ja,"pages.fullTrust.exitFullscreen"),"exitFullscreen",[])}function Pa(){return!(!_r(or)||!or.supports.pages)&&!!or.supports.pages.fullTrust}function Ta(e){return qa(Qn(ja,"pages.tabs.navigateToTab"),e)}function Oa(e){return Ja(Qn(ja,"pages.tabs.getTabInstances"),e)}function Ra(e){return Ka(Qn(ja,"pages.tabs.getMruTabInstances"),e)}function Fa(){return!(!_r(or)||!or.supports.pages)&&!!or.supports.pages.tabs}var ka,Ma;function Na(e){const t=Qn(ja,"pages.returnFocus");if(_r(or),!Wa())throw fn;if(void 0===e&&gc(t,"returnFocus",[!1]),"boolean"==typeof e)gc(t,"returnFocus",[e]);else switch(e){case Ma.PreviousLandmark:case Ma.GoToActivityFeed:gc(t,"returnFocus",[!1,e]);break;case Ma.NextLandmark:gc(t,"returnFocus",[!0,e])}}function xa(e){ws(Qn(ja,"pages.registerFocusEnterHandler"),"focusEnter",e,[],(()=>{if(!Wa())throw fn}))}function Da(e){Za(Qn(ja,"pages.setCurrentFrame"),e)}function Ua(e,t,n){aa(),qi(Qn(ja,"pages.initializeWithFrameContext"),n).then((()=>t&&t())),Da(e)}function La(){return Ya(Qn(ja,"pages.getConfig."))}function Ha(e){return za(Qn(ja,"pages.navigateCrossDomain"),e)}function _a(e){return new Promise((t=>{if(_r(or,an.content,an.sidePanel,an.settings,an.task,an.stage,an.meetingStage),!Wa())throw fn;const n=Qn(ja,"pages.navigateToApp");if(or.isLegacyTeams){t(oc(n,"executeDeepLink",In(ts(e)?e:ns(e))))}else{t(oc(n,"pages.navigateToApp",ts(e)?rs(e):e))}}))}function Va(e){return Qa(Qn(ja,"pages.shareDeepLink"),e)}function Ba(e){ws(Qn(ja,"pages.registerFullScreenHandler"),"fullScreenChange",e,[],(()=>{if(!Yr(e)&&!Wa())throw fn}))}function Wa(){return!(!_r(or)||!or.supports.pages)}aa(),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.Read=2]="Read",e[e.Compose=3]="Compose"}(ka||(ka={})),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.GoToActivityFeed=2]="GoToActivityFeed"}(Ma||(Ma={}));const ja="v2";function za(e,t){return new Promise((n=>{if(_r(or,an.content,an.sidePanel,an.settings,an.remove,an.task,an.stage,an.meetingStage),!Wa())throw fn;n(ic(e,"navigateCrossDomain","Cross-origin navigation is only supported for URLs matching the pattern registered in the manifest.",t))}))}function $a(e){return new Promise((t=>{if(_r(or),!ya())throw fn;t(ic(e,"navigateBack","Back navigation is not supported in the current client or context."))}))}function qa(e,t){return new Promise((n=>{if(_r(or),!Fa())throw fn;n(ic(e,"navigateToTab","Invalid internalTabInstanceId and/or channelId were/was provided",t))}))}function Ga(e,t){if(_r(or),!Wa())throw fn;gc(e,"returnFocus",[t])}function Ja(e,t){return new Promise((n=>{if(_r(or),!Fa())throw fn;n(rc(e,"getTabInstances",t))}))}function Ka(e,t){return new Promise((n=>{if(_r(or),!Fa())throw fn;n(rc(e,"getMruTabInstances",t))}))}function Qa(e,t){if(_r(or,an.content,an.sidePanel,an.meetingStage),!Wa())throw fn;gc(e,"shareDeepLink",[t.subPageId,t.subPageLabel,t.subPageWebUrl])}function Za(e,t){if(_r(or,an.content),!Wa())throw fn;gc(e,"setFrameContext",[t])}function Xa(e,t){if(_r(or,an.settings,an.remove),!Vi())throw fn;gc(e,"settings.setValidityState",[t])}function Ya(e){return new Promise((t=>{if(_r(or,an.content,an.settings,an.remove,an.sidePanel),!Wa())throw fn;t(rc(e,"settings.getSettings"))}))}function es(e,t){return new Promise((n=>{if(_r(or,an.content,an.settings,an.sidePanel),!Vi())throw fn;n(oc(e,"settings.setSettings",t))}))}function ts(e){return e.appId instanceof Xr}function ns(e){return Object.assign(Object.assign({},e),{appId:new Xr(e.appId),webUrl:e.webUrl?new URL(e.webUrl):void 0})}function rs(e){return Object.assign(Object.assign({},e),{appId:e.appId.toString(),webUrl:e.webUrl?e.webUrl.toString():void 0})}let os;function is(e){os=e}function as(){ms(Qn(ja,"pages.backStack.registerBackButtonPressHandler"),"backButtonPress",ss,!1)}function ss(){os&&os()||(xs()?Bs("backButtonPress",[]):va())}var cs=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())}))};const us=Kn("handlers");class ls{static initializeHandlers(){ls.handlers.themeChange=ys,ls.handlers.load=As,ls.handlers.beforeUnload=Ts,as()}static uninitializeHandlers(){ls.handlers={},ls.themeChangeHandler=null,ls.loadHandler=null,ls.beforeUnloadHandler=null,ls.beforeSuspendOrTerminateHandler=null,ls.resumeHandler=null}}function ds(){ls.initializeHandlers()}function fs(){ls.uninitializeHandlers()}ls.handlers={},ls.themeChangeHandler=null,ls.loadHandler=null,ls.beforeUnloadHandler=null,ls.beforeSuspendOrTerminateHandler=null,ls.resumeHandler=null,ls.hostToAppPerformanceMetricsHandler=null;const ps=us.extend("callHandler");function gs(e,t){const n=ls.handlers[e];if(n){ps("Invoking the registered handler for message %s with arguments %o",e,t);return[!0,n.apply(this,t)]}return xs()?(Bs(e,t),[!1,void 0]):(ps("Handler for action message %s not found.",e),[!1,void 0])}function ms(e,t,n,r=!0,o=[]){n?(ls.handlers[t]=n,r&&gc(e,"registerHandler",[t,...o])):delete ls.handlers[t]}function hs(e){delete ls.handlers[e]}function vs(e){return null!=ls.handlers[e]}function ws(e,t,n,r,o){n&&_r(or,...r),o&&o(),ms(e,t,n)}function Cs(e,t){ls.themeChangeHandler=t,!Yr(t)&&gc(e,"registerHandler",["themeChange"])}function ys(e){ls.themeChangeHandler&&ls.themeChangeHandler(e),xs()&&Bs("themeChange",[e])}function Ss(e){ls.hostToAppPerformanceMetricsHandler=e}function bs(e){ls.hostToAppPerformanceMetricsHandler&&ls.hostToAppPerformanceMetricsHandler(e)}function Es(e,t){ls.loadHandler=t,!Yr(t)&&gc(e,"registerHandler",["load"])}function As(e){const t=Is(e);ls.resumeHandler?(ls.resumeHandler(t),xs()&&Bs("load",[t])):ls.loadHandler&&(ls.loadHandler(e),xs()&&Bs("load",[e]))}function Is(e){return{entityId:e.entityId,contentUrl:new URL(e.contentUrl)}}function Ps(e,t){ls.beforeUnloadHandler=t,!Yr(t)&&gc(e,"registerHandler",["beforeUnload"])}function Ts(){return cs(this,void 0,void 0,(function*(){const e=()=>{gc(Qn("v2","handleBeforeUnload"),"readyToUnload",[])};ls.beforeSuspendOrTerminateHandler?(yield ls.beforeSuspendOrTerminateHandler(),xs()?Bs("beforeUnload"):e()):ls.beforeUnloadHandler&&ls.beforeUnloadHandler(e)||(xs()?Bs("beforeUnload"):e())}))}function Os(e){ls.beforeSuspendOrTerminateHandler=e,!Yr(e)&&gc(Qn("v2","registerBeforeSuspendOrTerminateHandler"),"registerHandler",["beforeUnload"])}function Rs(e){ls.resumeHandler=e,!Yr(e)&&gc(Qn("v2","registerOnResumeHandler"),"registerHandler",["load"])}var Fs=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())}))};const ks=Kn("childProxyingCommunication");class Ms{}function Ns(){Ms.window=null,Ms.origin=null,Ms.messageQueue=[]}function xs(){return!!br()&&!!Ms.window}function Ds(e,t){return!!br()&&(Ms.window&&!Ms.window.closed&&e!==Ms.window||(Ms.window=e,Ms.origin=t),Ms.window&&Ms.window.closed?(Ms.window=null,Ms.origin=null,!1):Ms.window===e)}function Us(e,t,n,r){return Fs(this,void 0,void 0,(function*(){Ms.window===t&&(xr(Ms.window,Ms.origin,Ms.messageQueue,"child"),Hs(e,n,r))}))}Ms.messageQueue=[];const Ls=ks.extend("handleIncomingMessageFromChild");function Hs(e,t,n){if(void 0===e.data.id||void 0===e.data.func)return;const r=Rr(e.data),[o,i]=gs(r.func,r.args);if(o&&void 0!==i)return Ls("Handler called in response to message %s from child. Returning response from handler to child, action: %s.",Mr(r),r.func),void Vs(r.id,r.uuid,Array.isArray(i)?i:[i]);Ls("No handler for message %s from child found; relaying message on to parent, action: %s. Relayed message will have a new id.",Mr(r),r.func),_s(r,t,n)}function _s(e,t,n){const r=t(Qn("v2","tasks.startTask"),e.func,e.args,!0,e.teamsJsInstanceId),o=Ms.origin;n(r.uuid,((...t)=>{if(!Ms.window)return;if(!Ar().disableEnforceOriginMatchForChildResponses&&o!==Ms.origin)return void Ls("Origin of child window has changed, not sending response back to child window");const n=t.pop();Ls("Message from parent being relayed to child, id: %s",Mr(e)),Vs(e.id,e.uuid,t,n)}))}function Vs(e,t,n,r){const o=Ms.window,i=Ws(e,t,n,r),a=kr(i),s=Ms.origin;o&&s&&(Ls("Sending message %s to %s via postMessage, args = %o",Mr(a),"child",a.args),o.postMessage(a,s))}function Bs(e,t){const n=Ms.window,r=js(e,t),o=Ms.origin;n&&o?n.postMessage(r,o):Ms.messageQueue.push(r)}function Ws(e,t,n,r){return{id:e,uuid:t,args:n||[],isPartialResponse:r}}function js(e,t){return{func:e,args:t||[]}}class zs{static storeCallbackInformation(e,t){zs.callbackInformation.set(e,t)}static clearMessages(){zs.callbackInformation.clear()}static deleteMessageInformation(e){zs.callbackInformation.delete(e)}static handleOneWayPerformanceMetrics(e,t,n){const r=e.monotonicTimestamp;r&&n?bs({actionName:e.func,messageDelay:n-r,requestStartedAt:r}):t("Unable to send performance metrics for event %s",e.func)}static handlePerformanceMetrics(e,t,n,r){const o=zs.callbackInformation.get(e);o&&t.monotonicTimestamp&&r?(bs({actionName:o.name,messageDelay:r-t.monotonicTimestamp,requestStartedAt:o.calledAt}),zs.deleteMessageInformation(e)):n("Unable to send performance metrics for callback %s with arguments %o",e.toString(),t.args)}}zs.callbackInformation=new Map;const $s=Kn("nestedAppAuthUtils"),qs=$s.extend("tryPolyfillWithNestedAppAuthBridge"),Gs="v2";function Js(e,t,n){var r;const o=qs;if(zn.isFramelessWindow)return void o("Cannot polyfill nestedAppAuthBridge as current window is frameless");if(!t)return void o("Cannot polyfill nestedAppAuthBridge as current window does not exist");if(t.parent!==t.top)return void o("Default NAA bridge injection not supported in nested iframe. Use standalone NAA bridge instead.");const i=(()=>{try{return JSON.parse(e)}catch(e){return null}})();if(!i||!(null===(r=i.supports)||void 0===r?void 0:r.nestedAppAuth))return void o("Cannot polyfill nestedAppAuthBridge as current hub does not support nested app auth");const a=t;if(a.nestedAppAuthBridge)return void o("nestedAppAuthBridge already exists on current window, skipping polyfill");const s=Qs(a,n);s&&(a.nestedAppAuthBridge=s)}const Ks=$s.extend("createNestedAppAuthBridge");function Qs(e,t){const n=Ks;if(!e)return n("nestedAppAuthBridge cannot be created as current window does not exist"),null;const{onMessage:r,sendPostMessage:o}=t,i=e=>t=>r(t,e);return{addEventListener:(t,r)=>{"message"===t?e.addEventListener(t,i(r)):n(`Event ${t} is not supported by nestedAppAuthBridge`)},postMessage:e=>{const t=(()=>{try{return JSON.parse(e)}catch(e){return null}})();if(!t||"object"!=typeof t||"NestedAppAuthRequest"!==t.messageType)return void n("Unrecognized data format received by app, message being ignored. Message: %o",e);const r=Qn(Gs,"nestedAppAuth.execute");o(e,r)},removeEventListener:(t,n)=>{e.removeEventListener(t,i(n))}}}var Zs=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())}))};const Xs=Kn("communication");class Ys{}class ec{}function tc(e,t){if(ec.messageListener=e=>bc(e),Ys.currentWindow=Ys.currentWindow||Fn(),Ys.parentWindow=Ys.currentWindow.parent!==Ys.currentWindow.self?Ys.currentWindow.parent:Ys.currentWindow.opener,Ys.topWindow=Ys.currentWindow.top,(Ys.parentWindow||e)&&Ys.currentWindow.addEventListener("message",ec.messageListener,!1),!Ys.parentWindow){const e=Ys.currentWindow;if(!e.nativeInterface)return Promise.reject(new Error("Initialization Failed. No Parent window found."));zn.isFramelessWindow=!0,e.onNativeMessage=Mc}try{return Ys.parentOrigin="*",sc(t,"initialize",[Cr,er,e]).then((([e,t,n,r])=>(Js(r,Ys.currentWindow,{onMessage:Ac,sendPostMessage:hc}),{context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r})))}finally{Ys.parentOrigin=null}}function nc(){Ys.currentWindow&&Ys.currentWindow.removeEventListener("message",ec.messageListener,!1),Ys.currentWindow=null,Ys.parentWindow=null,Ys.parentOrigin=null,ec.parentMessageQueue=[],ec.nextMessageId=0,ec.callbacks.clear(),ec.promiseCallbacks.clear(),ec.portCallbacks.clear(),ec.legacyMessageIdsToUuidMap={},zs.clearMessages(),Ns()}function rc(e,t,...n){return sc(e,t,n).then((([e])=>e))}function oc(e,t,...n){return sc(e,t,n).then((([e,t])=>{if(!e)throw new Error(t)}))}function ic(e,t,n,...r){return sc(e,t,r).then((([e,t])=>{if(!e)throw new Error(t||n)}))}function ac(e,t,...n){return sc(e,t,n).then((([e,t])=>{if(e)throw e;return t}))}function sc(e,t,n=void 0){if(!Zn(e))throw Error(`apiVersionTag: ${e} passed in doesn't follow the pattern starting with 'v' followed by digits, then underscore with words, please check.`);return new Promise((r=>{r(pc(yc(e,t,n).uuid))}))}function cc(e){return e.map((e=>wr(e)?e.serialize():e))}function uc(e,t,n,r,o){var i;return Zs(this,void 0,void 0,(function*(){const a=cc(t),[s]=yield sc(r,e,a);if(o&&o(s)||!o&&Be(s))throw new Error(`${s.errorCode}, message: ${null!==(i=s.message)&&void 0!==i?i:"None"}`);if(n.validate(s))return n.deserialize(s);throw new Error(`${Ne.INTERNAL_ERROR}, message: Invalid response from host - ${JSON.stringify(s)}`)}))}function lc(e,t,n,r){var o;return Zs(this,void 0,void 0,(function*(){const i=cc(t),[a]=yield sc(n,e,i);if(r&&r(a)||!r&&Be(a))throw new Error(`${a.errorCode}, message: ${null!==(o=a.message)&&void 0!==o?o:"None"}`);if(void 0!==a)throw new Error(`${Ne.INTERNAL_ERROR}, message: Invalid response from host`)}))}function dc(e,t,n=void 0){if(!Zn(e))throw Error(`apiVersionTag: ${e} passed in doesn't follow the pattern starting with 'v' followed by digits, then underscore with words, please check.`);return fc(yc(e,t,n).uuid)}function fc(e){return new Promise(((t,n)=>{ec.portCallbacks.set(e,((e,r)=>{e instanceof MessagePort?t(e):n(r&&r.length>0?r[0]:new Error("Host responded without port or error details."))}))}))}function pc(e){return new Promise((t=>{ec.promiseCallbacks.set(e,t)}))}function gc(e,t,n,r){let o;if(n instanceof Function?r=n:n instanceof Array&&(o=n),!Zn(e))throw Error(`apiVersionTag: ${e} passed in doesn't follow the pattern starting with 'v' followed by digits, then underscore with words, please check.`);const i=yc(e,t,o);r&&ec.callbacks.set(i.uuid,r)}ec.parentMessageQueue=[],ec.topMessageQueue=[],ec.nextMessageId=0,ec.callbacks=new Map,ec.promiseCallbacks=new Map,ec.portCallbacks=new Map,ec.legacyMessageIdsToUuidMap={};const mc=Xs.extend("sendNestedAuthRequestToTopWindow");function hc(e,t){const n=mc,r=Ys.topWindow,o=Vc(e,t);return n("Message %s information: %o",Mr(o),{actionName:o.func}),wc(r,o)}const vc=Xs.extend("sendRequestToTargetWindowHelper");function wc(e,t){const n=vc,r=Lc(e),o=Or(t);if(zn.isFramelessWindow)Ys.currentWindow&&Ys.currentWindow.nativeInterface&&(n("Sending message %s to %s via framelessPostMessage interface",Mr(o),r),Ys.currentWindow.nativeInterface.framelessPostMessage(JSON.stringify(o)));else{const i=Uc(e);e&&i?(n("Sending message %s to %s via postMessage",Mr(o),r),e.postMessage(o,i)):(n("Adding message %s to %s message queue",Mr(o),r),Dc(e).push(t))}return t}const Cc=Xs.extend("sendMessageToParentHelper");function yc(e,t,n,r,o){const i=Cc,a=Ys.parentWindow,s=_c(e,t,n,r,o);return zs.storeCallbackInformation(s.uuid,{name:t,calledAt:s.timestamp}),i("Message %s information: %o",Mr(s),{actionName:t,args:n}),wc(a,s)}const Sc=Xs.extend("processIncomingMessage");function bc(e){return Zs(this,void 0,void 0,(function*(){if(!e||!e.data||"object"!=typeof e.data)return void Sc("Unrecognized message format received by app, message being ignored. Message: %o",e);const t=e.source||e.originalEvent&&e.originalEvent.source,n=e.origin||e.originalEvent&&e.originalEvent.origin;return Pc(t,n).then((r=>{r?(Tc(t,n),t!==Ys.parentWindow?Ds(t,n)&&Us(e,t,yc,((e,t)=>ec.callbacks.set(e,t))):Mc(e)):Sc("Message being ignored by app because it is either coming from the current window or a different window with an invalid origin, message: %o, source: %o, origin: %o",e,t,n)}))}))}const Ec=Xs.extend("processAuthBridgeMessage");function Ac(e,t){var n,r;const o=Ec;if(!e||!e.data||"object"!=typeof e.data)return void o("Unrecognized message format received by app, message being ignored. Message: %o",e);const{args:i}=e.data,[,a]=null!=i?i:[],s=(()=>{try{return JSON.parse(a)}catch(e){return null}})();if(!s||"object"!=typeof s||"NestedAppAuthResponse"!==s.messageType)return void o("Unrecognized data format received by app, message being ignored. Message: %o",e);const c=e.source||(null===(n=null==e?void 0:e.originalEvent)||void 0===n?void 0:n.source),u=e.origin||(null===(r=null==e?void 0:e.originalEvent)||void 0===r?void 0:r.origin);c?Pc(c,u)?(Ys.topWindow&&!Ys.topWindow.closed&&c!==Ys.topWindow||(Ys.topWindow=c,Ys.topOrigin=u),Ys.topWindow&&Ys.topWindow.closed&&(Ys.topWindow=null,Ys.topOrigin=null),xr(Ys.topWindow,Ys.topOrigin,ec.topMessageQueue,"top"),t(a)):o("Message being ignored by app because it is either coming from the current window or a different window with an invalid origin"):o("Message being ignored by app because it is coming for a target that is null")}const Ic=Xs.extend("shouldProcessIncomingMessage");function Pc(e,t){return Zs(this,void 0,void 0,(function*(){if(Ys.currentWindow&&e===Ys.currentWindow)return Ic("Should not process message because it is coming from the current window"),!1;if(Ys.currentWindow&&Ys.currentWindow.location&&t&&t===Ys.currentWindow.location.origin)return!0;{let e;try{e=new URL(t)}catch(e){return Ic("Message has an invalid origin of %s",t),!1}const n=yield da(e);return n||Ic("Message has an invalid origin of %s",t),n}}))}function Tc(e,t){zn.isFramelessWindow||Ys.parentWindow&&!Ys.parentWindow.closed&&e!==Ys.parentWindow||(Ys.parentWindow=e,Ys.parentOrigin=t),Ys.parentWindow&&Ys.parentWindow.closed&&(Ys.parentWindow=null,Ys.parentOrigin=null),xr(Ys.parentWindow,Ys.parentOrigin,ec.parentMessageQueue,"parent")}const Oc=Xs.extend("handleIncomingMessageFromParent");function Rc(e){const t=Oc;if(!e.uuid)return ec.legacyMessageIdsToUuidMap[e.id];{const t=e.uuid,n=Fc(ec.callbacks,t);if(n)return n;const r=Fc(ec.promiseCallbacks,t);if(r)return r;const o=Fc(ec.portCallbacks,t);if(o)return o}t("Received message %s that failed to produce a callbackId",Mr(e))}function Fc(e,t){if(t){const n=[...e].find((([e,n])=>e.toString()===t.toString()));if(n)return n[0]}}function kc(e,t){const n=Fc(t,e.uuid);n&&t.delete(n),e.uuid?ec.legacyMessageIdsToUuidMap={}:delete ec.legacyMessageIdsToUuidMap[e.id]}function Mc(e){const t=Oc,n=Vn();if("id"in e.data&&"number"==typeof e.data.id){const r=e.data,o=Fr(r),i=Rc(o);if(i){const r=ec.callbacks.get(i);t("Received a response from parent for message %s",i.toString()),zs.handlePerformanceMetrics(i,o,t,n),r&&(t("Invoking the registered callback for message %s with arguments %o",i.toString(),o.args),r.apply(null,[...o.args,o.isPartialResponse]),Nc(e)||(t("Removing registered callback for message %s",i.toString()),kc(o,ec.callbacks)));const a=ec.promiseCallbacks.get(i);a&&(t("Invoking the registered promise callback for message %s with arguments %o",i.toString(),o.args),a(o.args),t("Removing registered promise callback for message %s",i.toString()),kc(o,ec.promiseCallbacks));const s=ec.portCallbacks.get(i);if(s){let n;t("Invoking the registered port callback for message %s with arguments %o",i.toString(),o.args),e.ports&&e.ports[0]instanceof MessagePort&&(n=e.ports[0]),s(n,o.args),t("Removing registered port callback for message %s",i.toString()),kc(o,ec.portCallbacks)}o.uuid&&(ec.legacyMessageIdsToUuidMap={})}}else if("func"in e.data&&"string"==typeof e.data.func){const r=e.data;zs.handleOneWayPerformanceMetrics(r,t,n),t('Received a message from parent %s, action: "%s"',Mr(r),r.func),gs(r.func,r.args)}else t("Received an unknown message: %O",e)}function Nc(e){return!0===e.data.isPartialResponse}function xc(){return Ys.topWindow!==Ys.parentWindow}function Dc(e){return e===Ys.topWindow&&xc()?ec.topMessageQueue:e===Ys.parentWindow?ec.parentMessageQueue:[]}function Uc(e){return e===Ys.topWindow&&xc()?Ys.topOrigin:e===Ys.parentWindow?Ys.parentOrigin:null}function Lc(e){return e===Ys.topWindow&&xc()?"top":e===Ys.parentWindow?"parent":null}function Hc(e,t){let n;n=Ys.currentWindow.setInterval((()=>{0===Dc(e).length&&(clearInterval(n),t())}),100)}function _c(e,t,n,r,o){const i=ec.nextMessageId++,a=new Wn;ec.legacyMessageIdsToUuidMap[i]=a;const s=!0===r?o:zn.teamsJsInstanceId;return{id:i,uuid:a,func:t,timestamp:Date.now(),monotonicTimestamp:Vn(),args:n||[],apiVersionTag:e,isProxiedFromChild:null!=r&&r,teamsJsInstanceId:s}}function Vc(e,t){const n=ec.nextMessageId++,r=new Wn;return ec.legacyMessageIdsToUuidMap[n]=r,{id:n,uuid:r,func:"nestedAppAuth.execute",timestamp:Date.now(),monotonicTimestamp:Vn(),apiVersionTag:t,args:[],data:e}}const Bc="v1";function Wc(e){if(!Yr(e)&&_r(or),!Yr(e)&&!jc())throw fn;e?ms(Qn(Bc,"log.request"),"log.request",(()=>{const t=e();gc(Qn(Bc,"log.receive"),"log.receive",[t])})):hs("log.request")}function jc(){return!(!_r(or)||!or.supports.logs)}var zc,$c,qc;!function(e){e.fileDownloadStart="fileDownloadStart",e.fileDownloadComplete="fileDownloadComplete"}(zc||(zc={})),function(e){e.view="view",e.edit="edit",e.editNew="editNew"}($c||($c={})),function(e){e.fileOpenPreference="fileOpenPreference",e.theme="theme"}(qc||(qc={}));const Gc="v1";function Jc(e,t){_r(or),gc(Qn(Gc,"uploadCustomApp"),"uploadCustomApp",[e],t||vn())}function Kc(e,t,n){_r(or),gc(Qn(Gc,"sendCustomMessage"),e,t,n)}function Qc(e,t){if(_r(or),!xs())throw new Error("The child window has not yet been initialized or is not present");Bs(e,t)}function Zc(e,t){_r(or),ms(Qn(Gc,"registerCustomHandler"),e,((...e)=>t.apply(this,e)))}function Xc(e,t){_r(or),ms(Qn(Gc,"registerUserSettingsChangeHandler"),"userSettingsChange",t,!0,[e])}function Yc(e){_r(or,an.content,an.task);const t=[e.entityId,e.title,e.description,e.type,e.objectUrl,e.downloadUrl,e.webPreviewUrl,e.webEditUrl,e.baseUrl,e.editFile,e.subEntityId,e.viewerAction,e.fileOpenPreference,e.conversationId,e.sizeInBytes];gc(Qn(Gc,"openFilePreview"),"openFilePreview",t)}const eu="v1";function tu(e){return new Promise((t=>{if(_r(or,an.content),!ou())throw fn;const n=oc(Qn(eu,"conversations.openConversation"),"conversations.openConversation",{title:e.title,subEntityId:e.subEntityId,conversationId:e.conversationId,channelId:e.channelId,entityId:e.entityId});e.onStartConversation&&ms(Qn(eu,"conversations.registerStartConversationHandler"),"startConversation",((t,n,r,o)=>{var i;return null===(i=e.onStartConversation)||void 0===i?void 0:i.call(e,{subEntityId:t,conversationId:n,channelId:r,entityId:o})})),e.onCloseConversation&&ms(Qn(eu,"conversations.registerCloseConversationHandler"),"closeConversation",((t,n,r,o)=>{var i;return null===(i=e.onCloseConversation)||void 0===i?void 0:i.call(e,{subEntityId:t,conversationId:n,channelId:r,entityId:o})})),t(n)}))}function nu(){if(_r(or,an.content),!ou())throw fn;gc(Qn(eu,"conversations.closeConversation"),"conversations.closeConversation"),hs("startConversation"),hs("closeConversation")}function ru(){return new Promise((e=>{if(_r(or),!ou())throw fn;e(rc(Qn(eu,"conversations.getChatMember"),"getChatMembers"))}))}function ou(){return!(!_r(or)||!or.supports.conversations)}var iu=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())}))};const au="v2",su=Kn("copilot");function cu(){var e;return _r(or)&&!!(null===(e=or.supports.copilot)||void 0===e?void 0:e.customTelemetry)}function uu(e,t){var n;return void 0===t&&(t=null!==(n=Vn())&&void 0!==n?n:Date.now()),iu(this,void 0,void 0,(function*(){return _r(or),su("Sending custom telemetry data to host for stage: %s to record timestamp: %s",e,t),lc("copilot.customTelemetry.sendCustomTelemetryData",[e.toString(),t],Qn(au,"copilot.customTelemetry.sendCustomTelemetryData"))}))}var lu=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())}))};const du="v2",fu=Kn("copilot");function pu(){var e,t;return _r(or)&&(!!(null===(e=or.hostVersionsInfo)||void 0===e?void 0:e.appEligibilityInformation)||!!(null===(t=or.supports.copilot)||void 0===t?void 0:t.eligibility))}function gu(e){var t,n;return lu(this,void 0,void 0,(function*(){if(_r(or),!pu())throw new Error(`Error code: ${fn.errorCode}, message: Not supported on platform`);if((null===(t=or.hostVersionsInfo)||void 0===t?void 0:t.appEligibilityInformation)&&!e)return fu("Eligibility information is already available on runtime."),or.hostVersionsInfo.appEligibilityInformation;fu("Eligibility information is not available on runtime. Requesting from host.");const r=yield rc(Qn(du,"copilot.eligibility.getEligibilityInfo"),"copilot.eligibility.getEligibilityInfo",e);if(Be(r))throw new Error(`Error code: ${r.errorCode}, message: ${null!==(n=r.message)&&void 0!==n?n:"Failed to get eligibility information from the host."}`);if(!mu(r))throw new Error("Error deserializing eligibility information");return r}))}function mu(e){return void 0!==e.ageGroup&&void 0!==e.cohort&&void 0!==e.userClassification&&void 0!==e.isCopilotEligible&&void 0!==e.isCopilotEnabledRegion&&void 0!==e.isOptedOutByAdmin&&(!e.featureSet||void 0!==e.featureSet.serverFeatures&&void 0!==e.featureSet.uxFeatures)}var hu,vu,wu,Cu;!function(e){e.EMAIL="email",e.TEXT="text",e.MEDIA="media",e.CALENDAR_INVITE="calendarInvite",e.WEB_PAGE="webPage",e.MIXED="mixed"}(hu||(hu={})),function(e){e.IMAGE="image",e.AUDIO="audio",e.VIDEO="video"}(vu||(vu={})),function(e){e.Accepted="accepted",e.NotAccepted="not_accepted"}(wu||(wu={})),function(e){e.ConsentNotAccepted="consent_not_accepted",e.PageContentBlockedPolicy="page_content_blocked_policy",e.PageContentBlockedDlp="page_content_blocked_dlp",e.PageContentTypeNotSupportedYet="page_content_type_not_supported_yet",e.PageContentSizeNotSupported="page_content_size_not_supported",e.PageContextChanged="page_context_changed",e.PageContentExtractionFailed="page_content_extraction_failed",e.PageContentSizeNotSupportedPDF="page_content_size_not_supported_pdf",e.NotSupportedOnPlatform="not_supported_on_platform",e.OtherError="other_error"}(Cu||(Cu={}));class yu extends Error{constructor(e,t){super(t),this.errorCode=e,this.name="SidePanelError"}}var Su=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())}))};const bu="v2";function Eu(){var e;return _r(or)&&!!(null===(e=or.supports.copilot)||void 0===e?void 0:e.sidePanel)}function Au(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(Cu).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)||Be(e)}function Iu(e){return Su(this,void 0,void 0,(function*(){_r(or);return uc("copilot.sidePanel.getContent",e?[new ku(e)]:[],new Ru,Qn(bu,"copilot.sidePanel.getContent"),Au)}))}function Pu(){return Su(this,void 0,void 0,(function*(){return _r(or),uc("copilot.sidePanel.preCheckUserConsent",[],new Fu,Qn(bu,"copilot.sidePanel.preCheckUserConsent"),Au)}))}function Tu(e){ws(Qn(bu,"copilot.sidePanel.registerUserActionContentSelect"),"copilot.sidePanel.userActionContentSelect",e,[an.content],(()=>{if(!Eu())throw Ou}))}const Ou=new yu(Cu.NotSupportedOnPlatform,"This API is not supported on the current platform.");class Ru extends Bi{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class Fu extends Bi{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class ku{constructor(e){this.contentRequest=e}serialize(){return this.contentRequest}}const Mu="v2";class Nu{constructor(e){this.invokeRequest=e}serialize(){return this.invokeRequest}}function xu(e){const t=e;return t.responseType===Lu.ActionExecuteInvokeResponse&&void 0!==t.value&&void 0!==t.statusCode&&void 0!==t.type}const Du="Action.Execute";var Uu,Lu,Hu;!function(e){e.ActionExecuteInvokeRequest="ActionExecuteInvokeRequest",e.QueryMessageExtensionRequest="QueryMessageExtensionRequest"}(Uu||(Uu={})),function(e){e.ActionExecuteInvokeResponse="ActionExecuteInvokeResponse",e.QueryMessageExtensionResponse="QueryMessageExtensionResponse"}(Lu||(Lu={}));class _u extends Bi{validate(e){return xu(e)}deserialize(e){return e}}function Vu(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(Hu).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)}function Bu(e){e.requestType===Uu.ActionExecuteInvokeRequest?Wu(e):e.requestType===Uu.QueryMessageExtensionRequest&&ju(e)}function Wu(e){if(e.type!==Du){throw{errorCode:Hu.INTERNAL_ERROR,message:`Invalid action type ${e.type}. Action type must be "${Du}"`}}if(!Bn(e.data)){throw{errorCode:Hu.INTERNAL_ERROR,message:`Invalid data type ${typeof e.data}. Data must be a primitive or a plain object.`}}}function ju(e){if(e.commandId.length>64)throw new Error("originalRequestInfo.commandId exceeds the maximum size of 64 characters");if(e.parameters.length>5)throw new Error("originalRequestInfo.parameters exceeds the maximum size of 5");for(const t of e.parameters){if(t.name.length>64)throw new Error("originalRequestInfo.parameters.name exceeds the maximum size of 64 characters");if(t.value.length>512)throw new Error("originalRequestInfo.parameters.value exceeds the maximum size of 512 characters")}}function zu(e,t,n){if(_r(or,an.content),!Ku())throw fn;const r=new Xr(e);return Bu(n),sc(Qn(Mu,"externalAppAuthentication.authenticateAndResendRequest"),"externalAppAuthentication.authenticateAndResendRequest",[r.toString(),n,t.url.href,t.width,t.height,t.isExternal]).then((([e,t])=>{if(e&&null!=t.responseType)return t;throw t}))}function $u(e,t){if(_r(or,an.content),!Ku())throw fn;const n=new Xr(e);return sc(Qn(Mu,"externalAppAuthentication.authenticateWithSSO"),"externalAppAuthentication.authenticateWithSSO",[n.toString(),t.claims,t.silent]).then((([e,t])=>{if(!e)throw t}))}function qu(e,t,n){if(_r(or,an.content),!Ku())throw fn;const r=new Xr(e);return Bu(n),sc(Qn(Mu,"externalAppAuthentication.authenticateWithSSOAndResendRequest"),"externalAppAuthentication.authenticateWithSSOAndResendRequest",[r.toString(),n,t.claims,t.silent]).then((([e,t])=>{if(e&&null!=t.responseType)return t;throw t}))}function Gu(e,t,n){if(_r(or,an.content),!Ku())throw fn;return Mn(e,new Error("titleId is Invalid.")),Mn(t,new Error("oauthConfigId is Invalid.")),sc(Qn(Mu,"externalAppAuthentication.authenticateWithOauth2"),"externalAppAuthentication.authenticateWithOauth2",[e,t,n.width,n.height,n.isExternal]).then((([e,t])=>{if(!e)throw t}))}function Ju(e,t,n){if(_r(or,an.content),!Ku())throw fn;return Mn(e,new Error("titleId is Invalid.")),t&&Nn(t),sc(Qn(Mu,"externalAppAuthentication.authenticateWithPowerPlatformConnectorPlugins"),"externalAppAuthentication.authenticateWithPowerPlatformConnectorPlugins",[e,null==t?void 0:t.toString(),null==n?void 0:n.width,null==n?void 0:n.height,null==n?void 0:n.isExternal]).then((([e,t])=>{if(!e)throw t}))}function Ku(){return!(!_r(or)||!or.supports.externalAppAuthentication)}!function(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}(Hu||(Hu={}));var Qu=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())}))};const Zu="v2";function Xu(e,t,n){return Qu(this,void 0,void 0,(function*(){if(_r(or,an.content),!nl())throw fn;return rl(e,t),lc("externalAppAuthenticationForCEA.authenticateWithSSO",[e,t,n.authId,n.connectionName,n.claims,n.silent],Qn(Zu,"externalAppAuthenticationForCEA.authenticateWithSSO"),Vu)}))}function Yu(e,t,n){return Qu(this,void 0,void 0,(function*(){if(_r(or,an.content),!nl())throw fn;return rl(e,t),lc("externalAppAuthenticationForCEA.authenticateWithOauth",[e,t,n.url.href,n.width,n.height,n.isExternal],Qn(Zu,"externalAppAuthenticationForCEA.authenticateWithOauth"),Vu)}))}function el(e,t,n,r){return Qu(this,void 0,void 0,(function*(){if(_r(or,an.content),!nl())throw fn;return rl(e,t),Wu(r),uc("externalAppAuthenticationForCEA.authenticateAndResendRequest",[e,t,new Nu(r),n.url.href,n.width,n.height,n.isExternal],new _u,Qn(Zu,"externalAppAuthenticationForCEA.authenticateAndResendRequest"),Vu)}))}function tl(e,t,n,r){return Qu(this,void 0,void 0,(function*(){if(_r(or,an.content),!nl())throw fn;return rl(e,t),Wu(r),uc("externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest",[e,t,new Nu(r),n.authId,n.connectionName,n.claims,n.silent],new _u,Qn(Zu,"externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest"),Vu)}))}function nl(){return!(!_r(or)||!or.supports.externalAppAuthenticationForCEA)}function rl(e,t){Mn(t,new Error("conversation id is not valid.")),Qr(e)}const ol="v2";var il,al;function sl(e,t){if(_r(or,an.content),!ul())throw fn;const n=new Xr(e);return sc(Qn(ol,"externalAppCardActions.processActionSubmit"),"externalAppCardActions.processActionSubmit",[n.toString(),t]).then((([e,t])=>{if(!e)throw t}))}function cl(e,t,n){if(_r(or,an.content),!ul())throw fn;const r=new Xr(e);return sc(Qn(ol,"externalAppCardActions.processActionOpenUrl"),"externalAppCardActions.processActionOpenUrl",[r.toString(),t.href,n]).then((([e,t])=>{if(e)throw e;return t}))}function ul(){return!(!_r(or)||!or.supports.externalAppCardActions)}!function(e){e.DeepLinkDialog="DeepLinkDialog",e.DeepLinkOther="DeepLinkOther",e.DeepLinkStageView="DeepLinkStageView",e.GenericUrl="GenericUrl"}(il||(il={})),function(e){e.INTERNAL_ERROR="INTERNAL_ERROR",e.INVALID_LINK="INVALID_LINK",e.NOT_SUPPORTED="NOT_SUPPORTED"}(al||(al={}));var ll=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())}))};const dl="v2";function fl(e,t,n){return ll(this,void 0,void 0,(function*(){if(_r(or,an.content),!gl())throw fn;rl(e,t);const[r,o]=yield sc(Qn(dl,"externalAppCardActionsForCEA.processActionOpenUrl"),"externalAppCardActionsForCEA.processActionOpenUrl",[e.toString(),t,n.href]);if(r)throw r;return o}))}function pl(e,t,n){return ll(this,void 0,void 0,(function*(){if(_r(or,an.content),!gl())throw fn;rl(e,t);const r=yield rc(Qn(dl,"externalAppCardActionsForCEA.processActionSubmit"),"externalAppCardActionsForCEA.processActionSubmit",e.toString(),t,n);if(r)throw r}))}function gl(){return!(!_r(or)||!or.supports.externalAppCardActionsForCEA)}var ml;function hl(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(ml).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)}!function(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}(ml||(ml={}));var vl=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())}))};const wl="v2";function Cl(e,t,n){return vl(this,void 0,void 0,(function*(){if(_r(or,an.content),!yl())throw fn;return Sl(e,n),lc("externalAppCardActionsForDA.processActionOpenUrlDialog",[e,new bl(t),n],Qn(wl,"externalAppCardActionsForDA.processActionOpenUrlDialog"),hl)}))}function yl(){return!(!_r(or)||!or.supports.externalAppCardActionsForDA)}function Sl(e,t){Qr(e),jn(t)}class bl{constructor(e){this.info=e}serialize(){const{url:e,title:t,size:n}=this.info;return{url:e.href,title:t,size:n}}}var El=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())}))};const Al="v2";function Il(e,t,n){return El(this,void 0,void 0,(function*(){if(_r(or,an.content),!Pl())throw fn;const r=new Xr(e),[o,i]=yield sc(Qn(Al,"externalAppCommands.processActionCommand"),"externalAppCommands.processActionCommand",[r.toString(),t,n]);if(o)throw o;return i}))}function Pl(){return!(!_r(or)||!or.supports.externalAppCommands)}const Tl="v1";var Ol,Rl,Fl,kl,Ml,Nl;function xl(e,t){if(_r(or,an.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");gc(Qn(Tl,"files.getCloudStorageFolders"),"files.getCloudStorageFolders",[e],t)}function Dl(e,t){if(_r(or,an.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");gc(Qn(Tl,"files.addCloudStorageFolder"),"files.addCloudStorageFolder",[e],t)}function Ul(e,t,n){if(_r(or,an.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");gc(Qn(Tl,"files.deleteCloudStorageFolder"),"files.deleteCloudStorageFolder",[e,t],n)}function Ll(e,t,n){if(_r(or,an.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");gc(Qn(Tl,"files.getCloudStorageFolderContents"),"files.getCloudStorageFolderContents",[e,t],n)}function Hl(e,t,n){if(_r(or,an.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");gc(Qn(Tl,"files.openCloudStorageFile"),"files.openCloudStorageFile",[e,t,n])}function _l(e=!1,t){if(_r(or,an.content),!t)throw new Error("[files.getExternalProviders] Callback cannot be null");gc(Qn(Tl,"files.getExternalProviders"),"files.getExternalProviders",[e],t)}function Vl(e,t,n,r,o=!1,i){if(_r(or,an.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");gc(Qn(Tl,"files.copyMoveFiles"),"files.copyMoveFiles",[e,t,n,r,o],i)}function Bl(e){if(_r(or,an.content),!e)throw new Error("[files.getFileDownloads] Callback cannot be null");gc(Qn(Tl,"files.getFileDownloads"),"files.getFileDownloads",[],e)}function Wl(e=void 0,t){if(_r(or,an.content),!t)throw new Error("[files.openDownloadFolder] Callback cannot be null");gc(Qn(Tl,"files.openDownloadFolder"),"files.openDownloadFolder",[e],t)}function jl(e){if(_r(or,an.content),!e)throw Xl(Ne.INVALID_ARGUMENTS,"[files.addCloudStorageProvider] callback cannot be null");gc(Qn(Tl,"files.addCloudStorageProvider"),"files.addCloudStorageProvider",[],e)}function zl(e,t){if(_r(or,an.content),!t)throw Xl(Ne.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] callback cannot be null");if(!e||!e.content)throw Xl(Ne.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] 3P cloud storage provider request content is missing");gc(Qn(Tl,"files.removeCloudStorageProvider"),"files.removeCloudStorageProvider",[e],t)}function $l(e,t){if(_r(or,an.content),!t)throw Xl(Ne.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw Xl(Ne.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] 3P cloud storage provider request content is missing");gc(Qn(Tl,"files.addCloudStorageProviderFile"),"files.addCloudStorageProviderFile",[e],t)}function ql(e,t){if(_r(or,an.content),!t)throw Xl(Ne.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw Xl(Ne.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] 3P cloud storage provider request content is missing");gc(Qn(Tl,"files.renameCloudStorageProviderFile"),"files.renameCloudStorageProviderFile",[e],t)}function Gl(e,t){if(_r(or,an.content),!t)throw Xl(Ne.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw Xl(Ne.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] 3P cloud storage provider request content details are missing");gc(Qn(Tl,"files.deleteCloudStorageProviderFile"),"files.deleteCloudStorageProviderFile",[e],t)}function Jl(e,t){if(_r(or,an.content),!t)throw Xl(Ne.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw Xl(Ne.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");gc(Qn(Tl,"files.downloadCloudStorageProviderFile"),"files.downloadCloudStorageProviderFile",[e],t)}function Kl(e,t){if(_r(or,an.content),!t)throw Xl(Ne.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw Xl(Ne.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");if(!e.content.destinationFolder)throw Xl(Ne.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] Invalid destination folder details");gc(Qn(Tl,"files.uploadCloudStorageProviderFile"),"files.uploadCloudStorageProviderFile",[e],t)}function Ql(e){if(_r(or),!e)throw new Error("[registerCloudStorageProviderListChangeHandler] Handler cannot be null");ms(Qn(Tl,"files.registerCloudStorageProviderListChangeHandler"),"files.cloudStorageProviderListChange",e)}function Zl(e){if(_r(or),!e)throw new Error("[registerCloudStorageProviderContentChangeHandler] Handler cannot be null");ms(Qn(Tl,"files.registerCloudStorageProviderContentChangeHandler"),"files.cloudStorageProviderContentChange",e)}function Xl(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"}(Ol||(Ol={})),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"}(Rl||(Rl={})),function(e){e.ClassMaterials="classMaterials"}(Fl||(Fl={})),function(e){e.Readonly="readonly"}(kl||(kl={})),function(e){e.Downloaded="Downloaded",e.Downloading="Downloading",e.Failed="Failed"}(Ml||(Ml={})),function(e){e.Download="DOWNLOAD",e.Upload="UPLOAD",e.Delete="DELETE"}(Nl||(Nl={}));const Yl="v1";function ed(){return new Promise((e=>{if(_r(or),!od())throw fn;e(ac(Qn(Yl,"meetingRoom.getPairedMeetingRoomInfo"),"meetingRoom.getPairedMeetingRoomInfo"))}))}function td(e){return new Promise((t=>{if(!e||0==e.length)throw new Error("[meetingRoom.sendCommandToPairedMeetingRoom] Command name cannot be null or empty");if(_r(or),!od())throw fn;t(ac(Qn(Yl,"meetingRoom.sendCommandToPairedMeetingRoom"),"meetingRoom.sendCommandToPairedMeetingRoom",e))}))}function nd(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler] Handler cannot be null");if(_r(or),!od())throw fn;ms(Qn(Yl,"meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler"),"meetingRoom.meetingRoomCapabilitiesUpdate",(t=>{_r(or),e(t)}))}function rd(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomStatesUpdateHandler] Handler cannot be null");if(_r(or),!od())throw fn;ms(Qn(Yl,"meetingRoom.registerMeetingRoomStatesUpdateHandler"),"meetingRoom.meetingRoomStatesUpdate",(t=>{_r(or),e(t)}))}function od(){return!(!_r(or)||!or.supports.meetingRoom)}function id(){return!(!_r(or)||!or.supports.messageChannels)}const ad="1.0.0",sd={onMessage:function(e,t){if(!e||!e.data||"object"!=typeof e.data||null===e.data)return void md("Invalid message format, ignoring. Message: %o",e);if(!fd(e.source,e.origin))return void md("Message source/origin not allowed, ignoring.");const{args:n}=e.data,[,r]=null!=n?n:[],o=(()=>{try{return JSON.parse(r)}catch(e){return hd("Failed to parse response message:",e),null}})();if(!o||"NestedAppAuthResponse"!==o.messageType)return void md("Invalid response format, ignoring. Message: %o",e);t(r)}};let cd=null,ud=!1;function ld(e,t,n=!1){if(ud=n,!e)throw new Error("Cannot polyfill nestedAppAuthBridge as the current window does not exist");if(!t)throw new Error("Top origin is required to initialize the Nested App Auth Bridge");try{const e=new URL(t);if("https:"!==e.protocol)throw new Error(`Invalid top origin: ${t}. Only HTTPS origins are allowed.`);cd=e.origin}catch(e){throw new Error(`Failed to initialize bridge: invalid top origin: ${t}`)}const r=e;if(r.nestedAppAuthBridge)return void md("Nested App Auth Bridge is already present");const o=dd(r);o&&(r.nestedAppAuthBridge=o)}function dd(e){const t=new WeakMap,{onMessage:n}=sd,r=e=>t=>n(t,e);return{addEventListener:(n,o)=>{if("message"===n){const i=r(o);t.set(o,i),e.addEventListener(n,i)}else md(`Event ${n} is not supported by nestedAppAuthBridge`)},postMessage:t=>{if(!e.top)throw new Error("window.top is not available for posting messages");try{const n=JSON.parse(t);if("object"==typeof n&&"NestedAppAuthRequest"===n.messageType){const n=pd(t);if(e===e.top||!cd)return void hd("Not in an embedded iframe; skipping postMessage.");e.top.postMessage(n,cd)}}catch(e){return void hd("Failed to parse message:",e,"Original message:",t)}},removeEventListener:(n,r)=>{const o=t.get(r);o&&(e.removeEventListener(n,o),t.delete(r))}}}function fd(e,t){if(e&&e!==window.top)return md("Should not process message because it is not coming from the top window"),!1;if(t===cd)try{return"https:"===new URL(t).protocol}catch(e){return hd("Invalid message origin URL:",e),!1}return!1}function pd(e){const t=Date.now();return{id:gd(),uuid:en(),func:"nestedAppAuth.execute",timestamp:t,apiVersionTag:"v2_nestedAppAuth.execute",monotonicTimestamp:t,args:[],data:e}}function gd(){return"undefined"!=typeof crypto&&crypto.randomUUID?crypto.randomUUID():Math.random().toString(36).substring(2,11)}function md(...e){ud&&console.log(...e)}function hd(...e){ud&&console.error(...e)}const vd="v1";function wd(e){if(_r(or,an.content),!Cd())throw fn;gc(Qn(vd,"notifications.showNotification"),"notifications.showNotification",[e])}function Cd(){return!(!_r(or)||!or.supports.notifications)}const yd="v2";function Sd(e){if(!Ad())throw new Error(Ne.NOT_SUPPORTED_ON_PLATFORM.toString());if(Yr(e))throw new Error(Ne.INVALID_ARGUMENTS.toString());ms(Qn(yd,"otherApp.install"),"otherApp.install",e)}function bd(){if(!Ad())throw new Error(Ne.NOT_SUPPORTED_ON_PLATFORM.toString());gc(Qn(yd,"otherApp.unregisterInstall"),"otherApp.unregisterInstall"),hs("otherApp.install")}function Ed(e){if(!Ad())throw new Error(Ne.NOT_SUPPORTED_ON_PLATFORM.toString());return lc("otherApp.notifyInstallCompleted",[e.toString()],Qn(yd,"otherApp.notifyInstallCompleted"))}function Ad(){return!(!_r(or)||!or.supports.otherAppStateChange)}const Id="v1";var Pd,Td,Od;function Rd(e){if(!e)throw new Error("[remoteCamera.getCapableParticipants] Callback cannot be null");if(_r(or,an.sidePanel),!Ld())throw fn;gc(Qn(Id,"remoteCamera.getCapableParticipants"),"remoteCamera.getCapableParticipants",e)}function Fd(e,t){if(!e)throw new Error("[remoteCamera.requestControl] Participant cannot be null");if(!t)throw new Error("[remoteCamera.requestControl] Callback cannot be null");if(_r(or,an.sidePanel),!Ld())throw fn;gc(Qn(Id,"remoteCamera.requestControl"),"remoteCamera.requestControl",[e],t)}function kd(e,t){if(!e)throw new Error("[remoteCamera.sendControlCommand] ControlCommand cannot be null");if(!t)throw new Error("[remoteCamera.sendControlCommand] Callback cannot be null");if(_r(or,an.sidePanel),!Ld())throw fn;gc(Qn(Id,"remoteCamera.sendControlCommand"),"remoteCamera.sendControlCommand",[e],t)}function Md(e){if(!e)throw new Error("[remoteCamera.terminateSession] Callback cannot be null");if(_r(or,an.sidePanel),!Ld())throw fn;gc(Qn(Id,"remoteCamera.terminateSession"),"remoteCamera.terminateSession",e)}function Nd(e){if(!e)throw new Error("[remoteCamera.registerOnCapableParticipantsChangeHandler] Handler cannot be null");if(_r(or,an.sidePanel),!Ld())throw fn;ms(Qn(Id,"remoteCamera.registerOnCapableParticipantsChangeHandler"),"remoteCamera.capableParticipantsChange",e)}function xd(e){if(!e)throw new Error("[remoteCamera.registerOnErrorHandler] Handler cannot be null");if(_r(or,an.sidePanel),!Ld())throw fn;ms(Qn(Id,"remoteCamera.registerOnErrorHandler"),"remoteCamera.handlerError",e)}function Dd(e){if(!e)throw new Error("[remoteCamera.registerOnDeviceStateChangeHandler] Handler cannot be null");if(_r(or,an.sidePanel),!Ld())throw fn;ms(Qn(Id,"remoteCamera.registerOnDeviceStateChangeHandler"),"remoteCamera.deviceStateChange",e)}function Ud(e){if(!e)throw new Error("[remoteCamera.registerOnSessionStatusChangeHandler] Handler cannot be null");if(_r(or,an.sidePanel),!Ld())throw fn;ms(Qn(Id,"remoteCamera.registerOnSessionStatusChangeHandler"),"remoteCamera.sessionStatusChange",e)}function Ld(){return!(!_r(or)||!or.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"}(Pd||(Pd={})),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"}(Td||(Td={})),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"}(Od||(Od={}));const Hd="v1";function _d(e,t,n,r){if(_r(or,an.content),!Vd())throw fn;if(!e||0==e.length)throw new Error("[appEntity.selectAppEntity] threadId name cannot be null or empty");if(!r)throw new Error("[appEntity.selectAppEntity] Callback cannot be null");gc(Qn(Hd,"appEntity.selectAppEntity"),"appEntity.selectAppEntity",[e,t,n],r)}function Vd(){return!(!_r(or)||!or.supports.appEntity)}const Bd="v1";function Wd(e){return new Promise((t=>{if(_r(or),!jd())throw fn;if((zn.hostClientType===rn.android||zn.hostClientType===rn.teamsRoomsAndroid||zn.hostClientType===rn.teamsPhones||zn.hostClientType===rn.teamsDisplays)&&!Vr(Ge)){const e={errorCode:Ne.OLD_PLATFORM};throw new Error(JSON.stringify(e))}t(rc(Qn(Bd,"teams.fullTrust.joinedTeams.getUserJoinedTeams"),"getUserJoinedTeams",e))}))}function jd(){return!(!_r(or)||!or.supports.teams)&&(!!or.supports.teams.fullTrust&&!!or.supports.teams.fullTrust.joinedTeams)}const zd="v1";function $d(e){return new Promise((t=>{if(_r(or),!qd())throw fn;t(rc(Qn(zd,"teams.fullTrust.getConfigSetting"),"getConfigSetting",e))}))}function qd(){return!(!_r(or)||!or.supports.teams)&&!!or.supports.teams.fullTrust}const Gd="v1";var Jd;function Kd(e,t){if(_r(or,an.content),!Zd())throw fn;if(!e)throw new Error("[teams.getTeamChannels] groupId cannot be null or empty");if(!t)throw new Error("[teams.getTeamChannels] Callback cannot be null");gc(Qn(Gd,"teams.getTeamChannels"),"teams.getTeamChannels",[e],t)}function Qd(e,t){if(_r(or),!Zd())throw fn;if(!e)throw new Error("[teams.refreshSiteUrl] threadId cannot be null or empty");if(!t)throw new Error("[teams.refreshSiteUrl] Callback cannot be null");gc(Qn(Gd,"teams.refreshSiteUrl"),"teams.refreshSiteUrl",[e],t)}function Zd(){return!(!_r(or)||!or.supports.teams)}!function(e){e[e.Regular=0]="Regular",e[e.Private=1]="Private",e[e.Shared=2]="Shared"}(Jd||(Jd={}));class Xd{static setTimeout(e,t){const n=performance.now(),r=Cn();return Xd.setTimeoutCallbacks[r]={callback:e,timeoutInMs:t,startedAtInMs:n},r}static clearTimeout(e){delete Xd.setTimeoutCallbacks[e]}static setInterval(e,t){Xd.setTimeout((function n(){e(),Xd.setTimeout(n,t)}),t)}static tick(){const e=performance.now(),t=[];for(const n in Xd.setTimeoutCallbacks){const r=Xd.setTimeoutCallbacks[n];e-r.startedAtInMs>=r.timeoutInMs&&t.push(n)}for(const e of t){Xd.setTimeoutCallbacks[e].callback(),delete Xd.setTimeoutCallbacks[e]}}}Xd.setTimeoutCallbacks={};class Yd{constructor(e,t){this.reportStatisticsResult=t,this.sampleCount=0,this.distributionBins=new Uint32Array(e)}processStarts(e,t,n,r){Xd.tick(),this.suitableForThisSession(e,t,n,r)||this.reportAndResetSession(this.getStatistics(),e,r,t,n),this.start()}processEnds(){const e=performance.now()-this.frameProcessingStartedAt,t=Math.floor(Math.max(0,Math.min(this.distributionBins.length-1,e)));this.distributionBins[t]+=1,this.sampleCount+=1}getStatistics(){return this.currentSession?{effectId:this.currentSession.effectId,effectParam:this.currentSession.effectParam,frameHeight:this.currentSession.frameHeight,frameWidth:this.currentSession.frameWidth,duration:performance.now()-this.currentSession.startedAtInMs,sampleCount:this.sampleCount,distributionBins:this.distributionBins.slice()}:null}start(){this.frameProcessingStartedAt=performance.now()}suitableForThisSession(e,t,n,r){return this.currentSession&&this.currentSession.effectId===e&&this.currentSession.effectParam===r&&this.currentSession.frameWidth===t&&this.currentSession.frameHeight===n}reportAndResetSession(e,t,n,r,o){e&&this.reportStatisticsResult(e),this.resetCurrentSession(this.getNextTimeout(t,this.currentSession),t,n,r,o),this.timeoutId&&Xd.clearTimeout(this.timeoutId),this.timeoutId=Xd.setTimeout((()=>this.reportAndResetSession(this.getStatistics(),t,n,r,o)).bind(this),this.currentSession.timeoutInMs)}resetCurrentSession(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)}getNextTimeout(e,t){return t&&t.effectId===e?Math.min(Yd.maxSessionTimeoutInMs,2*t.timeoutInMs):Yd.initialSessionTimeoutInMs}}Yd.initialSessionTimeoutInMs=1e3,Yd.maxSessionTimeoutInMs=3e4;const ef="v2";class tf{constructor(e){this.reportPerformanceEvent=e,this.isFirstFrameProcessed=!1,this.frameProcessTimeLimit=100,this.frameProcessingStartedAt=0,this.frameProcessingTimeCost=0,this.processedFrameCount=0,this.performanceStatistics=new Yd(tf.distributionBinSize,(e=>this.reportPerformanceEvent(Qn(ef,"videoPerformanceMonitor.performanceDataGenerated"),"video.performance.performanceDataGenerated",[e])))}startMonitorSlowFrameProcessing(){Xd.setInterval((()=>{if(0===this.processedFrameCount)return;const e=this.frameProcessingTimeCost/this.processedFrameCount;e>this.frameProcessTimeLimit&&this.reportPerformanceEvent(Qn(ef,"videoPerformanceMonitor.startMonitorSlowFrameProcessing"),"video.performance.frameProcessingSlow",[e]),this.frameProcessingTimeCost=0,this.processedFrameCount=0}),tf.calculateFPSInterval)}setFrameProcessTimeLimit(e){this.frameProcessTimeLimit=e}reportApplyingVideoEffect(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)}reportVideoEffectChanged(e,t){void 0===this.applyingEffect||this.applyingEffect.effectId!==e&&this.applyingEffect.effectParam!==t||(this.appliedEffect={effectId:e,effectParam:t},this.applyingEffect=void 0,this.isFirstFrameProcessed=!1)}reportStartFrameProcessing(e,t){Xd.tick(),this.appliedEffect&&(this.frameProcessingStartedAt=performance.now(),this.performanceStatistics.processStarts(this.appliedEffect.effectId,e,t,this.appliedEffect.effectParam))}reportFrameProcessed(){var e;this.appliedEffect&&(this.processedFrameCount++,this.frameProcessingTimeCost+=performance.now()-this.frameProcessingStartedAt,this.performanceStatistics.processEnds(),this.isFirstFrameProcessed||(this.isFirstFrameProcessed=!0,this.reportPerformanceEvent(Qn(ef,"videoPerformanceMonitor.reportFrameProcessed"),"video.performance.firstFrameProcessed",[Date.now(),this.appliedEffect.effectId,null===(e=this.appliedEffect)||void 0===e?void 0:e.effectParam])))}reportGettingTextureStream(e){this.gettingTextureStreamStartedAt=performance.now(),this.currentStreamId=e}reportTextureStreamAcquired(){if(void 0!==this.gettingTextureStreamStartedAt){const e=performance.now()-this.gettingTextureStreamStartedAt;this.reportPerformanceEvent(Qn(ef,"videoPerformanceMonitor.reportTextureStreamAcquired"),"video.performance.textureStreamAcquired",[this.currentStreamId,e])}}}tf.distributionBinSize=1e3,tf.calculateFPSInterval=1e3;var nf=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())}))},rf=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};const of="v2",af=kn()?void 0:new tf(gc);var sf,cf,uf;function lf(e){if(_r(or,an.sidePanel),!mf())throw fn;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(ms(Qn(of,"videoEffects.setFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==af?void 0:af.setFrameProcessTimeLimit(e.timeLimit)),!1),yf())hf(e.videoFrameHandler,e.config);else{if(!bf())throw fn;wf(e.videoBufferHandler,e.config)}null==af||af.startMonitorSlowFrameProcessing()}function df(e,t){if(_r(or,an.sidePanel),!mf())throw fn;gc(Qn(of,"videoEffects.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t])}function ff(e){if(_r(or,an.sidePanel),!mf())throw fn;ms(Qn(of,"videoEffects.registerEffectParameterChangeHandler"),"video.effectParameterChange",xf(e,af),!1),gc(Qn(of,"videoEffects.registerForVideoEffect"),"video.registerForVideoEffect")}function pf(e){gc(Qn(of,"videoEffects.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function gf(e){gc(Qn(of,"videoEffects.notifyError"),"video.notifyError",[e])}function mf(){return _r(or)&&!!or.supports.video&&(!!or.supports.video.mediaStream||!!or.supports.video.sharedFrame)}function hf(e,t){if(_r(or,an.sidePanel),!mf()||!yf())throw fn;ms(Qn(of,"videoEffects.startVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(t=>nf(this,void 0,void 0,(function*(){const{streamId:n}=t,r=vf(e,af);yield If(n,r,gf,af)}))),!1),gc(Qn(of,"videoEffects.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[t])}function vf(e,t){return n=>nf(this,void 0,void 0,(function*(){const r=n.videoFrame;null==t||t.reportStartFrameProcessing(r.codedWidth,r.codedHeight);const o=yield e(n);return null==t||t.reportFrameProcessed(),o}))}function wf(e,t){if(_r(or,an.sidePanel),!mf()||!bf())throw fn;ms(Qn(of,"videoEffects.registerForVideoBufferHandler"),"video.newVideoFrame",(t=>{if(t){const n=t.timestamp;null==af||af.reportStartFrameProcessing(t.width,t.height),e(Cf(t),(()=>{null==af||af.reportFrameProcessed(),pf(n)}),gf)}}),!1),gc(Qn(of,"videoEffects.registerForVideoFrame"),"video.registerForVideoFrame",[t])}function Cf(e){if("videoFrameBuffer"in e)return e;{const{data:t}=e,n=rf(e,["data"]);return Object.assign(Object.assign({},n),{videoFrameBuffer:t})}}function yf(){var e;return _r(or,an.sidePanel)&&Sf()&&!!(null===(e=or.supports.video)||void 0===e?void 0:e.mediaStream)}function Sf(){var e,t,n,r;return!(!(null===(t=null===(e=Fn().chrome)||void 0===e?void 0:e.webview)||void 0===t?void 0:t.getTextureStream)||!(null===(r=null===(n=Fn().chrome)||void 0===n?void 0:n.webview)||void 0===r?void 0:r.registerTextureStream))}function bf(){var e;return _r(or,an.sidePanel)&&!!(null===(e=or.supports.video)||void 0===e?void 0:e.sharedFrame)}!function(e){e.NV12="NV12"}(sf||(sf={})),function(e){e.EffectChanged="EffectChanged",e.EffectDisabled="EffectDisabled"}(cf||(cf={})),function(e){e.InvalidEffectId="InvalidEffectId",e.InitializationFailure="InitializationFailure"}(uf||(uf={}));var Ef=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())}))};const Af="v2";function If(e,t,n,r){var o,i;return Ef(this,void 0,void 0,(function*(){const a=Of();!kn()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),Rf(yield Tf(e,n,r),new Ff(n,t),a.writable)}))}function Pf(e,t,n,r){var o,i;return Ef(this,void 0,void 0,(function*(){const a=Of();!kn()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),Rf(yield Tf(e,n,r),new Nf(n,t),a.writable)}))}function Tf(e,t,n){return Ef(this,void 0,void 0,(function*(){if(kn())throw fn;const r=Fn().chrome;try{null==n||n.reportGettingTextureStream(e);const t=(yield r.webview.getTextureStream(e)).getVideoTracks();if(0===t.length)throw new Error(`No video track in stream ${e}`);return null==n||n.reportTextureStreamAcquired(),t[0]}catch(n){throw t(`Failed to get video track from stream ${e}, error: ${n}`),new Error(`Internal error: can't get video track from stream ${e}`)}}))}function Of(){if(kn())throw fn;const e=window.MediaStreamTrackGenerator;if(!e)throw fn;return new e({kind:"video"})}function Rf(e,t,n){new(0,Fn().MediaStreamTrackProcessor)({track:e}).readable.pipeThrough(new TransformStream(t)).pipeTo(n)}class Ff{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.transform=(e,t)=>Ef(this,void 0,void 0,(function*(){const n=e.timestamp;if(null!==n)try{const r=yield this.videoFrameHandler({videoFrame:e}),o=new VideoFrame(r,{timestamp:n});t.enqueue(o),e.close(),r.close()}catch(t){e.close(),this.notifyError(t)}else this.notifyError("timestamp of the original video frame is null")}))}}class kf{constructor(e,t){if(this.headerBuffer=e,this.notifyError=t,this.ONE_TEXTURE_INPUT_ID=1869900081,this.INVALID_HEADER_ERROR="Invalid video frame header",this.UNSUPPORTED_LAYOUT_ERROR="Unsupported texture layout",this.headerDataView=new Uint32Array(e),this.headerDataView.length<8)throw this.notifyError(this.INVALID_HEADER_ERROR),new Error(this.INVALID_HEADER_ERROR);if(this.headerDataView[0]!==this.ONE_TEXTURE_INPUT_ID)throw this.notifyError(this.UNSUPPORTED_LAYOUT_ERROR),new Error(this.UNSUPPORTED_LAYOUT_ERROR)}get oneTextureLayoutId(){return this.headerDataView[0]}get version(){return this.headerDataView[1]}get frameRowOffset(){return this.headerDataView[2]}get frameFormat(){return this.headerDataView[3]}get frameWidth(){return this.headerDataView[4]}get frameHeight(){return this.headerDataView[5]}get multiStreamHeaderRowOffset(){return this.headerDataView[6]}get multiStreamCount(){return this.headerDataView[7]}}class Mf{constructor(e,t){this.metadataMap=new Map,this.AUDIO_INFERENCE_RESULT_STREAM_ID=828664161,this.ATTRIBUTE_ID_MAP_STREAM_ID=1296320833;const n=new Uint32Array(e);for(let r=0,o=0;r<t;r++){const t=n[o++],r=n[o++],i=n[o++],a=new Uint8Array(e,r,i);this.metadataMap.set(t,a)}}get audioInferenceResult(){return this.metadataMap.get(this.AUDIO_INFERENCE_RESULT_STREAM_ID)}get attributes(){const e=this.metadataMap.get(this.ATTRIBUTE_ID_MAP_STREAM_ID);if(void 0===e)return;const t=new Map,n=new TextDecoder("utf-8");let r=0;const o=e[r]+(e[++r]<<8)+(e[++r]<<16)+(e[++r]<<24);for(let i=0;i<o&&r<e.length-1;i++){const o=e[++r]+(e[++r]<<8)+(e[++r]<<16)+(e[++r]<<24),i=e.findIndex(((e,t,n)=>0==e&&t>r)),a=n.decode(e.slice(++r,i)),s=this.metadataMap.get(o);void 0!==s&&t.set(a,s);r=i+(4-(i-r)%4-1)}return t}}class Nf{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.shouldDiscardAudioInferenceResult=!1,this.transform=(e,t)=>Ef(this,void 0,void 0,(function*(){const n=e.timestamp;if(null!==n)try{const{videoFrame:r,metadata:{audioInferenceResult:o,attributes:i}={}}=yield this.extractVideoFrameAndMetadata(e),a=yield this.videoFrameHandler({videoFrame:r,audioInferenceResult:o,attributes:i}),s=new VideoFrame(a,{timestamp:n});t.enqueue(s),r.close(),e.close(),a.close()}catch(t){e.close(),this.notifyError(t)}else this.notifyError("timestamp of the original video frame is null")})),this.extractVideoFrameAndMetadata=e=>Ef(this,void 0,void 0,(function*(){if(kn())throw fn;if("NV12"!==e.format)throw this.notifyError("Unsupported video frame pixel format"),new Error("Unsupported video frame pixel format");const t={x:0,y:0,width:e.codedWidth,height:2},n=new ArrayBuffer(t.width*t.height*3/2);yield e.copyTo(n,{rect:t});const r=new kf(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);yield e.copyTo(i,{rect:o});const a=new Mf(i,r.multiStreamCount);return{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,attributes:a.attributes}}})),ms(Qn(Af,"videoEffectsUtils.transformerWithMetadata.constructor"),"video.mediaStream.audioInferenceDiscardStatusChange",(({discardAudioInferenceResult:e})=>{this.shouldDiscardAudioInferenceResult=e}))}}function xf(e,t){return(n,r)=>{null==t||t.reportApplyingVideoEffect(n||"",r),e(n,r).then((()=>{null==t||t.reportVideoEffectChanged(n||"",r),gc(Qn(Af,"videoEffectsUtils.reportVideoEffectChanged"),"video.videoEffectReadiness",[!0,n,void 0,r])})).catch((e=>{const t=e in uf?e:uf.InitializationFailure;gc(Qn(Af,"videoEffectsUtils.effectFailure"),"video.videoEffectReadiness",[!1,n,t,r])}))}}var Df=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())}))};const Uf="v2",Lf=2e3,Hf=kn()?void 0:new tf(gc);var _f;function Vf(e){var t,n;if(!Gf())throw fn;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(_r(or,an.sidePanel)){if(ms(Qn(Uf,"videoEffectsEX.registerSetFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==Hf?void 0:Hf.setFrameProcessTimeLimit(e)),!1),null===(t=or.supports.video)||void 0===t?void 0:t.mediaStream)ms(Qn(Uf,"videoEffectsEX.registerStartVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(t=>Df(this,void 0,void 0,(function*(){const{streamId:n,metadataInTexture:r}=t,o=Hf?Wf(e.videoFrameHandler,Hf):e.videoFrameHandler;r?yield Pf(n,o,Kf,Hf):yield If(n,o,Kf,Hf)}))),!1),gc(Qn(Uf,"videoEffectsEX.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[e.config]);else{if(!(null===(n=or.supports.video)||void 0===n?void 0:n.sharedFrame))throw fn;ms(Qn(Uf,"videoEffectsEx.registerNewVideoFrameHandler"),"video.newVideoFrame",(t=>{if(t){null==Hf||Hf.reportStartFrameProcessing(t.width,t.height);const n=Bf(),r=t.timestamp;e.videoBufferHandler(jf(t),(()=>{n(),null==Hf||Hf.reportFrameProcessed(),Jf(r)}),Kf)}}),!1),gc(Qn(Uf,"videoEffectsEx.registerForVideoFrame"),"video.registerForVideoFrame",[e.config])}null==Hf||Hf.startMonitorSlowFrameProcessing()}}function Bf(){const e=setTimeout((()=>{Kf(`Frame not processed in ${Lf}ms`,_f.Warn)}),Lf);return function(){clearTimeout(e)}}function Wf(e,t){return n=>Df(this,void 0,void 0,(function*(){const r=n.videoFrame;t.reportStartFrameProcessing(r.codedWidth,r.codedHeight);const o=Bf(),i=yield e(n);return o(),t.reportFrameProcessed(),i}))}function jf(e){return e.videoFrameBuffer=e.videoFrameBuffer||e.data,delete e.data,e}function zf(e,t,n){if(_r(or,an.sidePanel),!Gf())throw fn;gc(Qn(Uf,"videoEffectsEx.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t,n])}function $f(e){if(_r(or,an.sidePanel),!Gf())throw fn;ms(Qn(Uf,"videoEffectsEx.registerEffectParamterChangeHandler"),"video.effectParameterChange",xf(e,Hf),!1),gc(Qn(Uf,"videoEffectsEx.registerForVideoEffect"),"video.registerForVideoEffect")}function qf(e){if(_r(or,an.sidePanel),!mf())throw fn;gc(Qn(Uf,"videoEffectsEx.updatePersonalizedEffects"),"video.personalizedEffectsChanged",[e])}function Gf(){return _r(or),mf()}function Jf(e){gc(Qn(Uf,"videoEffectsEx.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function Kf(e,t=_f.Warn){gc(Qn(Uf,"videoEffectsEx.notifyError"),"video.notifyError",[e,t])}function Qf(e){if(_r(or),!mf())throw fn;Kf(e,_f.Fatal)}!function(e){e.Fatal="fatal",e.Warn="warn"}(_f||(_f={}));const Zf="v2";class Xf extends Bi{validate(e){return"ConfigurableTab"===e.tabType}deserialize(e){return e}}class Yf{constructor(e){this.configurableTabInstance=e}serialize(){return this.configurableTabInstance}}class ep{constructor(e){this.hostEntityId=e}serialize(){return this.hostEntityId}}class tp extends Bi{validate(e){return"ConfigurableTab"===e.tabType||"StaticTab"===e.tabType}deserialize(e){return e}}class np{constructor(e){this.hostEntityTabInstance=e}serialize(){return this.hostEntityTabInstance}}class rp extends Bi{validate(e){const t=new tp;let n=!0;return e.allTabs&&e.allTabs.forEach((e=>{n||(n=t.validate(e))})),n}deserialize(e){return e}}function op(e,t){if(_r(or),!up())throw new Error(`Error code: ${Ne.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);if(lp(e.threadId),t&&0===t.length)throw new Error(`Error code: ${Ne.INVALID_ARGUMENTS}, message: App types cannot be an empty array`);return uc("hostEntity.tab.addAndConfigure",[new ep(e),t],new tp,Qn(Zf,"hostEntity.tab.addAndConfigure"))}function ip(e){if(_r(or),!up())throw new Error(`Error code: ${Ne.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return lp(e.threadId),uc("hostEntity.tab.getAll",[new ep(e)],new rp,Qn(Zf,"hostEntity.tab.getAll"))}function ap(e,t){if(_r(or),!up())throw new Error(`Error code: ${Ne.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return dp(e),lp(t.threadId),uc("hostEntity.tab.reconfigure",[new Yf(e),new ep(t)],new Xf,Qn(Zf,"hostEntity.tab.reconfigure"))}function sp(e,t){if(_r(or),!up())throw new Error(`Error code: ${Ne.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return dp(e),lp(t.threadId),uc("hostEntity.tab.rename",[new Yf(e),new ep(t)],new Xf,Qn(Zf,"hostEntity.tab.rename"))}function cp(e,t){if(_r(or),!up())throw new Error(`Error code: ${Ne.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return lp(t.threadId),dp(e),uc("hostEntity.tab.remove",[new np(e),new ep(t)],new Wi,Qn(Zf,"hostEntity.tab.remove"))}function up(){var e;return!!(_r(or)&&pp()&&(null===(e=or.supports.hostEntity)||void 0===e?void 0:e.tab))}function lp(e){if(!e||0==e.length)throw new Error(`Error code: ${Ne.INVALID_ARGUMENTS}, message: ThreadId cannot be null or empty`)}function dp(e){if(!(null==e?void 0:e.internalTabInstanceId)||0===e.internalTabInstanceId.length)throw new Error(`Error code: ${Ne.INVALID_ARGUMENTS}, message: TabId cannot be null or empty`)}var fp;function pp(){return!(!_r(or)||!or.supports.hostEntity)}!function(e){e.edu="EDU",e.baseTownhall="BASE_TOWNHALL",e.streamingTownhall="STREAMING_TOWNHALL"}(fp||(fp={}));var gp=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())}))};const mp="v2",hp="Invalid store dialog size",vp="No App Id present, but AppId needed to open AppDetail store",wp="No Collection Id present, but CollectionId needed to open a store specific to a collection";function Cp(e){return gp(this,void 0,void 0,(function*(){Ap();const{size:t}=null!=e?e:{};return lc("store.openFullStore",[Ip(t)],Qn(mp,"store.openFullStore"))}))}function yp(e){return gp(this,void 0,void 0,(function*(){Ap();const{size:t,appId:n}=e;if(!(n instanceof Xr))throw new Error(vp);return lc("store.openAppDetail",[Ip(t),n],Qn(mp,"store.openAppDetail"))}))}function Sp(e){return gp(this,void 0,void 0,(function*(){Ap();const{size:t,appCapability:n,appMetaCapabilities:r,installationScope:o,filteredOutAppIds:i}=null!=e?e:{};return lc("store.openInContextStore",[Ip(t),n,r,o,null==i?void 0:i.map((e=>e.toString()))],Qn(mp,"store.openInContextStore"))}))}function bp(e){return gp(this,void 0,void 0,(function*(){Ap();const{size:t,collectionId:n}=e;if(void 0===n)throw new Error(wp);return lc("store.openSpecificStore",[Ip(t),n],Qn(mp,"store.openSpecificStore"))}))}function Ep(){return _r(or)&&!!or.supports.store}function Ap(){if(_r(or,an.content,an.sidePanel,an.meetingStage),!Ep())throw fn}function Ip(e){if(void 0===e)return;const{width:t,height:n}=e;if(void 0!==t&&"number"==typeof t&&t<0)throw new Error(hp);if(void 0!==n&&"number"==typeof n&&n<0)throw new Error(hp);return JSON.stringify(e)}var Pp=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())}))};const Tp="v1",Op="v2";let Rp;function Fp(e){Rp=e}function kp(e){const t=void 0!==e,n=t?e:Rp;if(!n)throw new Error("No parameters are provided for authentication");_r(or,an.content,an.sidePanel,an.settings,an.remove,an.task,an.stage,an.meetingStage);return Mp(n.successCallback||n.failureCallback?Qn(Tp,"authentication.authenticate"):Qn(Op,"authentication.authenticate"),n).then((e=>{try{return n&&n.successCallback?(n.successCallback(e),""):e}finally{t||(Rp=void 0)}})).catch((e=>{try{if(n&&n.failureCallback)return n.failureCallback(e.message),"";throw e}finally{t||(Rp=void 0)}}))}function Mp(e,t){return Pp(this,void 0,void 0,(function*(){const n=xn(t.url);return Nn(n),sc(e,"authentication.authenticate",[n.href,t.width,t.height,t.isExternal]).then((([e,t])=>{if(e)return t;throw new Error(t)}))}))}function Np(e){Hr();return xp(e&&(e.successCallback||e.failureCallback)?Qn(Tp,"authentication.getAuthToken"):Qn(Op,"authentication.getAuthToken"),e).then((t=>e&&e.successCallback?(e.successCallback(t),""):t)).catch((t=>{if(e&&e.failureCallback)return e.failureCallback(t.message),"";throw t}))}function xp(e,t){return new Promise((n=>{n(sc(e,"authentication.getAuthToken",[null==t?void 0:t.resources,null==t?void 0:t.claims,null==t?void 0:t.silent,null==t?void 0:t.tenantId]))})).then((([e,t])=>{if(e)return t;throw new Error(t)}))}function Dp(e){Hr();return Up(e&&(e.successCallback||e.failureCallback)?Qn(Tp,"authentication.getUser"):Qn(Op,"authentication.getUser")).then((t=>e&&e.successCallback?(e.successCallback(t),null):t)).catch((t=>{const n=`Error returned, code = ${t.errorCode}, message = ${t.message}`;if(e&&e.failureCallback)return e.failureCallback(n),null;throw new Error(n)}))}function Up(e){return new Promise((t=>{t(sc(e,"authentication.getUser"))})).then((([e,t])=>{if(e)return t;throw t}))}function Lp(e,t){_r(or,an.authentication);gc(Qn(t?Tp:Op,"authentication.notifySuccess"),"authentication.authenticate.success",[e]),Hc(Ys.parentWindow,(()=>setTimeout((()=>Ys.currentWindow.close()),200)))}function Hp(e,t){_r(or,an.authentication);gc(Qn(t?Tp:Op,"authentication.notifyFailure"),"authentication.authenticate.failure",[e]),Hc(Ys.parentWindow,(()=>setTimeout((()=>Ys.currentWindow.close()),200)))}var _p;function Vp(e){const t=!e||e.length<=0,n=null==e?void 0:e.indexOf("@"),r=null==e?void 0:e.indexOf(".",n);if(t||-1===n||-1===r)throw new Error("Input email address does not have the correct format.")}!function(e){e.Public="public",e.EUDB="eudb",e.Other="other"}(_p||(_p={}));class Bp{constructor(e){this.val=e,Vp(e)}toString(){return this.val}}const Wp="/l/app/",jp="/l/meeting/new",zp="attendees",$p="startTime",qp="endTime",Gp="subject",Jp="content",Kp="/l/call/0/0",Qp="source",Zp="withVideo",Xp="/l/chat/0/0",Yp="users",eg="topicName",tg="message";function ng(e,t,n){if(0===e.length)throw new Error("Must have at least one user when creating a chat deep link");const r=`${Yp}=`+e.map((e=>encodeURIComponent(e))).join(","),o=void 0===t?"":`&${eg}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${tg}=${encodeURIComponent(n)}`;return`${rt}://${ot}${Xp}?${r}${o}${i}`}function rg(e,t,n){if(0===e.length)throw new Error("Must have at least one target when creating a call deep link");const r=`${Yp}=`+e.map((e=>encodeURIComponent(e))).join(","),o=void 0===t?"":`&${Zp}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${Qp}=${encodeURIComponent(n)}`;return`${rt}://${ot}${Kp}?${r}${o}${i}`}function og(e,t,n,r,o){const i=void 0===e?"":`${zp}=`+e.map((e=>encodeURIComponent(e))).join(","),a=void 0===t?"":`&${$p}=${encodeURIComponent(t)}`,s=void 0===n?"":`&${qp}=${encodeURIComponent(n)}`,c=void 0===r?"":`&${Gp}=${encodeURIComponent(r)}`,u=void 0===o?"":`&${Jp}=${encodeURIComponent(o)}`;return`${rt}://${ot}${jp}?${i}${a}${s}${c}${u}`}function ig(e){if(!e)throw new Error("App ID must be set when creating an app install dialog deep link");return`${rt}://${ot}${Wp}${encodeURIComponent(e)}`}const ag="v1";function sg(e){return new Promise((t=>{if(_r(or,an.content,an.sidePanel,an.settings,an.task,an.stage,an.meetingStage),!cg())throw new Error("Not supported");const n=Qn(ag,"appInstallDialog.openAppInstallDialog");or.isLegacyTeams?t(oc(n,"executeDeepLink",ig(e.appId))):(gc(n,"appInstallDialog.openAppInstallDialog",[e]),t())}))}function cg(){return!(!_r(or)||!or.supports.appInstallDialog)}const ug="v1",lg=Kn("media");var dg,fg,pg,gg,mg,hg,vg;!function(e){e.Base64="base64",e.ID="id"}(dg||(dg={}));class wg{}function Cg(e){if(!e)throw new Error("[captureImage] Callback cannot be null");if(_r(or,an.content,an.task),zn.isFramelessWindow)if(Vr(Qe))gc(Qn(ug,"media.captureImage"),"captureImage",e);else{e({errorCode:Ne.OLD_PLATFORM},[])}else{e({errorCode:Ne.NOT_SUPPORTED_ON_PLATFORM},[])}}function yg(){if(_r(or,an.content,an.task),!bg())throw fn;const e=xe.Media;return new Promise((t=>{t(ac(Qn(ug,"media.hasPermission"),"permissions.has",e))}))}function Sg(){if(_r(or,an.content,an.task),!bg())throw fn;const e=xe.Media;return new Promise((t=>{t(ac(Qn(ug,"media.requestPermission"),"permissions.request",e))}))}function bg(){return!(!_r(or)||!or.supports.permissions)}class Eg extends wg{constructor(e){super(),e&&(this.content=e.content,this.format=e.format,this.mimeType=e.mimeType,this.name=e.name,this.preview=e.preview,this.size=e.size)}getMedia(e){if(!e)throw new Error("[get Media] Callback cannot be null");if(_r(or,an.content,an.task),Vr(Ze))if(Lg(this.mimeType,this.format,this.content))Vr("2.0.0")?this.getMediaViaCallback(e):this.getMediaViaHandler(e);else{e({errorCode:Ne.INVALID_ARGUMENTS},new Blob)}else{e({errorCode:Ne.OLD_PLATFORM},new Blob)}}getMediaViaCallback(e){const t={mediaMimeType:this.mimeType,assembleAttachment:[]},n=[this.content];gc(Qn(ug,"media.getMedia"),"getMedia",n,(function(n){if(e)if(n&&n.error)e(n.error,new Blob);else if(n&&n.mediaChunk)if(n.mediaChunk.chunkSequence<=0){const r=Rg(t.assembleAttachment,t.mediaMimeType);e(n.error,null!=r?r:new Blob)}else{const e=Fg(n.mediaChunk,t.mediaMimeType);e?t.assembleAttachment.push(e):lg(`Received a null assemble attachment for when decoding chunk sequence ${n.mediaChunk.chunkSequence}; not including the chunk in the assembled file.`)}else e({errorCode:Ne.INTERNAL_ERROR,message:"data received is null"},new Blob)}))}getMediaViaHandler(e){const t=Cn(),n={mediaMimeType:this.mimeType,assembleAttachment:[]},r=[t,this.content];this.content&&!Yr(e)&&gc(Qn(ug,"media.getMedia"),"getMedia",r),ms(Qn(ug,"media.registerGetMediaRequestHandler"),"getMedia"+t,(function(r){if(e){const o=JSON.parse(r);if(o.error)e(o.error,new Blob),hs("getMedia"+t);else if(o.mediaChunk)if(o.mediaChunk.chunkSequence<=0){const r=Rg(n.assembleAttachment,n.mediaMimeType);e(o.error,null!=r?r:new Blob),hs("getMedia"+t)}else{const e=Fg(o.mediaChunk,n.mediaMimeType);e&&n.assembleAttachment.push(e)}else e({errorCode:Ne.INTERNAL_ERROR,message:"data received is null"},new Blob),hs("getMedia"+t)}}))}}class Ag{constructor(e){this.controllerCallback=e}notifyEventToHost(e,t){_r(or,an.content,an.task);try{Wr($e)}catch(e){return void(t&&t(e))}const n={mediaType:this.getMediaType(),mediaControllerEvent:e};gc(Qn(ug,"media.controller"),"media.controller",[n],(e=>{t&&t(e)}))}stop(e){this.notifyEventToHost(fg.StopRecording,e)}}class Ig extends Ag{getMediaType(){return mg.Video}notifyEventToApp(e){if(this.controllerCallback)switch(e){case fg.StartRecording:if(this.controllerCallback.onRecordingStarted){this.controllerCallback.onRecordingStarted();break}}}}function Pg(e,t){if(!t)throw new Error("[select Media] Callback cannot be null");if(_r(or,an.content,an.task),!Vr(Ze)){const e={errorCode:Ne.OLD_PLATFORM};return void t(e,[])}try{kg(e)}catch(e){return void t(e,[])}if(!Ng(e)){const e={errorCode:Ne.INVALID_ARGUMENTS};return void t(e,[])}const n=[e];gc(Qn(ug,"media.selectMedia"),"selectMedia",n,((n,r,o)=>{var i,a;if(o)return void(Mg(e)&&(null===(a=null===(i=null==e?void 0:e.videoProps)||void 0===i?void 0:i.videoController)||void 0===a||a.notifyEventToApp(o)));if(!r)return void t(n,[]);const s=[];for(const e of r)s.push(new Eg(e));t(n,s)}))}function Tg(e,t){if(!t)throw new Error("[view images] Callback cannot be null");if(_r(or,an.content,an.task),!Vr(Ze)){return void t({errorCode:Ne.OLD_PLATFORM})}if(!Hg(e)){return void t({errorCode:Ne.INVALID_ARGUMENTS})}const n=[e];gc(Qn(ug,"media.viewImages"),"viewImages",n,t)}function Og(e,t){if(!e)throw new Error("[media.scanBarCode] Callback cannot be null");if(_r(or,an.content,an.task),zn.hostClientType!==rn.desktop&&zn.hostClientType!==rn.web&&zn.hostClientType!==rn.rigel&&zn.hostClientType!==rn.teamsRoomsWindows&&zn.hostClientType!==rn.teamsRoomsAndroid&&zn.hostClientType!==rn.teamsPhones&&zn.hostClientType!==rn.teamsDisplays)if(Vr(Xe))if(_g(t))gc(Qn(ug,"media.scanBarCode"),"media.scanBarCode",[t],e);else{e({errorCode:Ne.INVALID_ARGUMENTS},"")}else{e({errorCode:Ne.OLD_PLATFORM},"")}else{e({errorCode:Ne.NOT_SUPPORTED_ON_PLATFORM},"")}}function Rg(e,t){if(null==e||null==t||e.length<=0)return null;let n=null,r=1;return e.sort(((e,t)=>e.sequence>t.sequence?1:-1)),e.forEach((e=>{e.sequence==r&&(n=n?new Blob([n,e.file],{type:t}):new Blob([e.file],{type:t}),r++)})),n}function Fg(e,t){if(null==e||null==t)return null;const n=atob(e.chunk),r=new Array(n.length);for(let e=0;e<n.length;e++)r[e]=n.charCodeAt(e);const o=new Uint8Array(r),i=new Blob([o],{type:t});return{sequence:e.chunkSequence,file:i}}function kg(e){Dg(e)?Wr(ze):Ug(e)?Wr($e):xg(e)&&Wr(qe)}function Mg(e){return!(e.mediaType!=mg.Video||!e.videoProps||!e.videoProps.videoController)}function Ng(e){return!(null==e||e.maxMediaCount>10)}function xg(e){var t;return!((null==e?void 0:e.mediaType)!=mg.Image||!(null===(t=null==e?void 0:e.imageProps)||void 0===t?void 0:t.imageOutputFormats))}function Dg(e){return!(!e||e.mediaType!=mg.VideoAndImage&&!e.videoAndImageProps)}function Ug(e){return!(!e||e.mediaType!=mg.Video||!e.videoProps||e.videoProps.isFullScreenMode)}function Lg(e,t,n){return null!=e&&null!=t&&t==dg.ID&&null!=n}function Hg(e){return!(null==e||e.length<=0||e.length>10)}function _g(e){return!e||!(null===e.timeOutIntervalInSec||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec<=0||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec>60)}function Vg(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){e[e.StartRecording=1]="StartRecording",e[e.StopRecording=2]="StopRecording"}(fg||(fg={})),function(e){e[e.Photo=1]="Photo",e[e.Document=2]="Document",e[e.Whiteboard=3]="Whiteboard",e[e.BusinessCard=4]="BusinessCard"}(pg||(pg={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(gg||(gg={})),function(e){e[e.Image=1]="Image",e[e.Video=2]="Video",e[e.VideoAndImage=3]="VideoAndImage",e[e.Audio=4]="Audio"}(mg||(mg={})),function(e){e[e.ID=1]="ID",e[e.URL=2]="URL"}(hg||(hg={})),function(e){e[e.IMAGE=1]="IMAGE",e[e.PDF=2]="PDF"}(vg||(vg={}));const Bg="v2";function Wg(e){return new Promise((t=>{if(_r(or,an.content,an.task),!$g())throw fn;if(!_g(e))throw{errorCode:Ne.INVALID_ARGUMENTS};t(ac(Qn(Bg,"barCode.scanBarCode"),"media.scanBarCode",e))}))}function jg(){if(_r(or,an.content,an.task),!$g())throw fn;const e=xe.Media;return new Promise((t=>{t(ac(Qn(Bg,"barCode.hasPermission"),"permissions.has",e))}))}function zg(){if(_r(or,an.content,an.task),!$g())throw fn;const e=xe.Media;return new Promise((t=>{t(ac(Qn(Bg,"barCode.requestPermission"),"permissions.request",e))}))}function $g(){return!!(_r(or)&&or.supports.barCode&&or.supports.permissions)}const qg="v2";function Gg(e){return Jg(Qn(qg,"chat.openChat"),e)}function Jg(e,t){return new Promise((n=>{if(_r(or,an.content,an.task),!Qg())throw fn;if(or.isLegacyTeams)n(oc(e,"executeDeepLink",ng([t.user],void 0,t.message)));else{n(oc(e,"chat.openChat",{members:[t.user],message:t.message}))}}))}function Kg(e){const t=Qn(qg,"chat.openGroupChat");return new Promise((n=>{if(e.users.length<1)throw Error("OpenGroupChat Failed: No users specified");if(1===e.users.length){const r={user:e.users[0],message:e.message};n(Jg(t,r))}else{if(_r(or,an.content,an.task),!Qg())throw fn;if(or.isLegacyTeams)n(oc(t,"executeDeepLink",ng(e.users,e.topic,e.message)));else{n(oc(t,"chat.openChat",{members:e.users,message:e.message,topic:e.topic}))}}}))}function Qg(){return!(!_r(or)||!or.supports.chat)}var Zg=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())}))};const Xg="v2";function Yg(e){return Zg(this,void 0,void 0,(function*(){if(_r(or,an.content,an.meetingStage,an.task,an.settings,an.stage,an.sidePanel),!tm())throw fn;if(!e.type||!Object.values(_e).includes(e.type))throw new Error(`Blob type ${e.type} is not supported. Supported blob types are ${Object.values(_e)}`);const t=yield Rn(e),n={mimeType:e.type,content:t};return ac(Qn(Xg,"clipboard.write"),"clipboard.writeToClipboard",n)}))}function em(){return Zg(this,void 0,void 0,(function*(){_r(or,an.content,an.meetingStage,an.task,an.settings,an.stage,an.sidePanel);const e=Qn(Xg,"clipboard.read");if(!tm())throw fn;const t=yield ac(e,"clipboard.readFromClipboard");if("string"==typeof t){const e=JSON.parse(t);return On(e.mimeType,e.content)}return t}))}function tm(){return zn.isFramelessWindow?!(!_r(or)||!or.supports.clipboard):!!(_r(or)&&navigator&&navigator.clipboard&&or.supports.clipboard)}var nm=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())}))};const rm="v2",om={validate:e=>Array.isArray(e)||"object"==typeof e,deserialize:e=>e};var im;function am(){var e;return null!==(e=_r(or)&&(or.isNAAChannelRecommended||dm()))&&void 0!==e&&e}function sm(){return _r(or),Ys.parentOrigin}function cm(){var e;return null!==(e=_r(or)&&or.canParentManageNAATrustedOrigins)&&void 0!==e&&e}function um(){var e;return null!==(e=_r(or)&&(or.isDeeplyNestedAuthSupported||lm()))&&void 0!==e&&e}function lm(){return!!(_r(or)&&fm()&&or.isLegacyTeams&&Vr(dr))}function dm(){return!!(_r(or)&&fm()&&or.isLegacyTeams&&or.supports.nestedAppAuth)}function fm(){return zn.hostClientType===rn.android||zn.hostClientType===rn.ios||zn.hostClientType===rn.ipados||zn.hostClientType===rn.visionOS}function pm(e){return nm(this,void 0,void 0,(function*(){if(!cm())throw fn;const t=e.map(hm);return mm(im.ADD,t)}))}function gm(e){return nm(this,void 0,void 0,(function*(){if(!cm())throw fn;const t=e.map(hm);return mm(im.DELETE,t)}))}function mm(e,t){return nm(this,void 0,void 0,(function*(){if(window.parent!==window.top)throw new Error("This API is only available in the top-level parent.");if(!Array.isArray(t)||0===t.length)throw new Error(`The '${t}' parameter is required and must be a non-empty array.`);return uc("nestedAppAuth.manageNAATrustedOrigins",[new vm(e,t)],om,Qn(rm,"nestedAppAuth.manageNAATrustedOrigins"))}))}function hm(e){try{return new URL(e).origin.toLowerCase()}catch(t){throw new Error(`Invalid origin provided: ${e}`)}}!function(e){e.ADD="ADD",e.DELETE="DELETE"}(im||(im={}));class vm{constructor(e,t){this.action=e,this.appOrigins=t}serialize(){return{action:this.action,appOrigins:this.appOrigins}}}const wm="v2";function Cm(){if(_r(or,an.content,an.task),!Sm())throw fn;return ac(Qn(wm,"geoLocation.map.chooseLocation"),"location.getLocation",{allowChooseLocation:!0,showMap:!0})}function ym(e){if(_r(or,an.content,an.task),!Sm())throw fn;if(!e)throw{errorCode:Ne.INVALID_ARGUMENTS};return ac(Qn(wm,"geoLocation.showLocation"),"location.showLocation",e)}function Sm(){return!!(_r(or)&&or.supports.geoLocation&&or.supports.geoLocation.map&&or.supports.permissions)}const bm="v2";function Em(){if(_r(or,an.content,an.task),!Pm())throw fn;return ac(Qn(bm,"geoLocation.getCurrentLocation"),"location.getLocation",{allowChooseLocation:!1,showMap:!1})}function Am(){if(_r(or,an.content,an.task),!Pm())throw fn;const e=xe.GeoLocation;return new Promise((t=>{t(ac(Qn(bm,"geoLocation.hasPermission"),"permissions.has",e))}))}function Im(){if(_r(or,an.content,an.task),!Pm())throw fn;const e=xe.GeoLocation;return new Promise((t=>{t(ac(Qn(bm,"geoLocation.requestPermission"),"permissions.request",e))}))}function Pm(){return!!(_r(or)&&or.supports.geoLocation&&or.supports.permissions)}function Tm(){return or.hostVersionsInfo?or.hostVersionsInfo.adaptiveCardSchemaVersion:void 0}const Om="v1";class Rm{postMessage(e,t){_r(or),gc(Qn(Om,"appWindow.childAppWindow.postMessage"),"messageForChild",[e],t||vn())}addEventListener(e,t){_r(or),"message"===e&&ms(Qn(Om,"appWindow.childAppWindow.addEventListener"),"messageForParent",t)}}class Fm{static get Instance(){return this._instance||(this._instance=new this)}postMessage(e,t){_r(or,an.task),gc(Qn(Om,"appWindow.parentAppWindow.postMessage"),"messageForParent",[e],t||vn())}addEventListener(e,t){_r(or,an.task),"message"===e&&ms(Qn(Om,"appWindow.parentAppWindow.addEventListener"),"messageForChild",t)}}const km="v2";function Mm(e){if(_r(or,an.content),!Nm())throw fn;if(!e||!Tn(e))throw{errorCode:Ne.INVALID_ARGUMENTS,message:"Invalid Url: Only https URL is allowed"};return ac(Qn(km,"secondaryBrowser.openUrl"),"secondaryBrowser.open",e.toString())}function Nm(){return!(!_r(or)||!or.supports.secondaryBrowser)}const xm="v1";function Dm(e,t){if(!t)throw new Error("[location.getLocation] Callback cannot be null");if(_r(or,an.content,an.task),!Vr(Je))throw{errorCode:Ne.OLD_PLATFORM};if(!e)throw{errorCode:Ne.INVALID_ARGUMENTS};if(!Lm())throw fn;gc(Qn(xm,"location.getLocation"),"location.getLocation",[e],t)}function Um(e,t){if(!t)throw new Error("[location.showLocation] Callback cannot be null");if(_r(or,an.content,an.task),!Vr(Je))throw{errorCode:Ne.OLD_PLATFORM};if(!e)throw{errorCode:Ne.INVALID_ARGUMENTS};if(!Lm())throw fn;gc(Qn(xm,"location.showLocation"),"location.showLocation",[e],t)}function Lm(){return!(!_r(or)||!or.supports.location)}const Hm="v1";function _m(e){_r(or,an.sidePanel),e.contentUrl&&new URL(e.contentUrl),gc(Qn(Hm,"meeting.appShareButton.setOptions"),"meeting.appShareButton.setOptions",[e])}var Vm=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())}))};const Bm="v1";var Wm,jm,zm,$m,qm,Gm;function Jm(e){if(!e)throw new Error("[get incoming client audio state] Callback cannot be null");_r(or,an.sidePanel,an.meetingStage),gc(Qn(Bm,"meeting.getIncomingClientAudioState"),"getIncomingClientAudioState",e)}function Km(e){if(!e)throw new Error("[toggle incoming client audio] Callback cannot be null");_r(or,an.sidePanel,an.meetingStage),gc(Qn(Bm,"meeting.toggleIncomingClientAudio"),"toggleIncomingClientAudio",e)}function Qm(e){if(!e)throw new Error("[get meeting details] Callback cannot be null");_r(or,an.sidePanel,an.meetingStage,an.settings,an.content),gc(Qn(Bm,"meeting.getMeetingDetails"),"meeting.getMeetingDetails",e)}function Zm(){var e,t,n;return Vm(this,void 0,void 0,(function*(){let r;_r(or,an.sidePanel,an.meetingStage,an.settings,an.content);try{const e=!0;r=yield ac(Qn("v2","meeting.getMeetingDetailsVerbose"),"meeting.getMeetingDetails",e)}catch(t){throw new Error(null===(e=null==t?void 0:t.errorCode)||void 0===e?void 0:e.toString())}if(((null===(t=r.details)||void 0===t?void 0:t.type)==$m.GroupCall||(null===(n=r.details)||void 0===n?void 0:n.type)==$m.OneOnOneCall)&&!r.details.originalCallerInfo)throw new Error(Ne.NOT_SUPPORTED_ON_PLATFORM.toString());return r}))}function Xm(e){if(!e)throw new Error("[get Authentication Token For AnonymousUser] Callback cannot be null");_r(or,an.sidePanel,an.meetingStage,an.task),gc(Qn(Bm,"meeting.getAuthenticationTokenForAnonymousUser"),"meeting.getAuthenticationTokenForAnonymousUser",e)}function Ym(e){if(!e)throw new Error("[get live stream state] Callback cannot be null");_r(or,an.sidePanel),gc(Qn(Bm,"meeting.getLiveStreamState"),"meeting.getLiveStreamState",e)}function eh(e,t,n){if(!e)throw new Error("[request start live streaming] Callback cannot be null");_r(or,an.sidePanel),gc(Qn(Bm,"meeting.requestStartLiveStreaming"),"meeting.requestStartLiveStreaming",[t,n],e)}function th(e){if(!e)throw new Error("[request stop live streaming] Callback cannot be null");_r(or,an.sidePanel),gc(Qn(Bm,"meeting.requestStopLiveStreaming"),"meeting.requestStopLiveStreaming",e)}function nh(e){if(!e)throw new Error("[register live stream changed handler] Handler cannot be null");_r(or,an.sidePanel),ms(Qn(Bm,"meeting.registerLiveStreamChangedHandler"),"meeting.liveStreamChanged",e)}function rh(e,t,n={sharingProtocol:qm.Collaborative}){if(!e)throw new Error("[share app content to stage] Callback cannot be null");_r(or,an.sidePanel,an.meetingStage),gc(Qn(Bm,"meeting.shareAppContentToStage"),"meeting.shareAppContentToStage",[t,n],e)}function oh(e){if(!e)throw new Error("[get app content stage sharing capabilities] Callback cannot be null");_r(or,an.sidePanel,an.meetingStage),gc(Qn(Bm,"meeting.getAppContentStageSharingCapabilities"),"meeting.getAppContentStageSharingCapabilities",e)}function ih(e){if(!e)throw new Error("[stop sharing app content to stage] Callback cannot be null");_r(or,an.sidePanel,an.meetingStage),gc(Qn(Bm,"meeting.stopSharingAppContentToStage"),"meeting.stopSharingAppContentToStage",e)}function ah(e){if(!e)throw new Error("[get app content stage sharing state] Callback cannot be null");_r(or,an.sidePanel,an.meetingStage),gc(Qn(Bm,"meeting.getAppContentStageSharingState"),"meeting.getAppContentStageSharingState",e)}function sh(e){if(!e)throw new Error("[registerSpeakingStateChangeHandler] Handler cannot be null");_r(or,an.sidePanel,an.meetingStage),ms(Qn(Bm,"meeting.registerSpeakingStateChangeHandler"),"meeting.speakingStateChanged",e)}function ch(e){if(!e)throw new Error("[registerRaiseHandStateChangedHandler] Handler cannot be null");_r(or,an.sidePanel,an.meetingStage),ms(Qn(Bm,"meeting.registerRaiseHandStateChangedHandler"),"meeting.raiseHandStateChanged",e)}function uh(e){if(!e)throw new Error("[registerMeetingReactionReceivedHandler] Handler cannot be null");_r(or,an.sidePanel,an.meetingStage),ms(Qn(Bm,"meeting.registerMeetingReactionReceivedHandler"),"meeting.meetingReactionReceived",e)}function lh(e){if(void 0===(null==e?void 0:e.joinWebUrl)||null===(null==e?void 0:e.joinWebUrl))return Promise.reject(new Error("Invalid joinMeetingParams"));_r(or);const t={joinWebUrl:e.joinWebUrl.href,source:e.source||Gm.Other};return ac(Qn("v2","meeting.joinMeeting"),"meeting.joinMeeting",t)}function dh(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");_r(or,an.sidePanel,an.meetingStage),e.isAppHandlingAudio?fh(e,t):ph(e,t)}function fh(e,t){gc(Qn(Bm,"meeting.requestAppAudioHandling"),"meeting.requestAppAudioHandling",[e.isAppHandlingAudio],((n,r)=>{if(n&&null!=r)throw new Error("[requestAppAudioHandling] Callback response - both parameters cannot be set");if(n)throw new Error(`[requestAppAudioHandling] Callback response - SDK error ${n.errorCode} ${n.message}`);if("boolean"!=typeof r)throw new Error("[requestAppAudioHandling] Callback response - isHostAudioless must be a boolean");ms(Qn(Bm,"meeting.registerMicStateChangeHandler"),"meeting.micStateChanged",(t=>Vm(this,void 0,void 0,(function*(){try{const n=yield e.micMuteStateChangedCallback(t);mh(n,n.isMicMuted===t.isMicMuted?Wm.HostInitiated:Wm.AppDeclinedToChange)}catch(e){mh(t,Wm.AppFailedToChange)}}))));ms(Qn(Bm,"meeting.registerAudioDeviceSelectionChangedHandler"),"meeting.audioDeviceSelectionChanged",(t=>{var n;null===(n=e.audioDeviceSelectionChangedCallback)||void 0===n||n.call(e,t)})),t(r)}))}function ph(e,t){gc(Qn(Bm,"meeting.requestAppAudioHandling"),"meeting.requestAppAudioHandling",[e.isAppHandlingAudio],((e,n)=>{if(e&&null!=n)throw new Error("[requestAppAudioHandling] Callback response - both parameters cannot be set");if(e)throw new Error(`[requestAppAudioHandling] Callback response - SDK error ${e.errorCode} ${e.message}`);if("boolean"!=typeof n)throw new Error("[requestAppAudioHandling] Callback response - isHostAudioless must be a boolean");vs("meeting.micStateChanged")&&hs("meeting.micStateChanged"),vs("meeting.audioDeviceSelectionChanged")&&hs("meeting.audioDeviceSelectionChanged"),t(n)}))}function gh(e){mh(e,Wm.AppInitiated)}function mh(e,t){_r(or,an.sidePanel,an.meetingStage),gc(Qn(Bm,"meeting.setMicStateWithReason"),"meeting.updateMicState",[e,t])}!function(e){e[e.HostInitiated=0]="HostInitiated",e[e.AppInitiated=1]="AppInitiated",e[e.AppDeclinedToChange=2]="AppDeclinedToChange",e[e.AppFailedToChange=3]="AppFailedToChange"}(Wm||(Wm={})),function(e){e.like="like",e.heart="heart",e.laugh="laugh",e.surprised="surprised",e.applause="applause"}(jm||(jm={})),function(e){e.Unknown="Unknown",e.Adhoc="Adhoc",e.Scheduled="Scheduled",e.Recurring="Recurring",e.Broadcast="Broadcast",e.MeetNow="MeetNow"}(zm||(zm={})),function(e){e.OneOnOneCall="oneOnOneCall",e.GroupCall="groupCall"}($m||($m={})),function(e){e.Collaborative="Collaborative",e.ScreenShare="ScreenShare"}(qm||(qm={})),function(e){e.M365CalendarGridContextMenu="m365_calendar_grid_context_menu",e.M365CalendarGridPeek="m365_calendar_grid_peek",e.M365CalendarGridEventCardJoinButton="m365_calendar_grid_event_card_join_button",e.M365CalendarFormRibbonJoinButton="m365_calendar_form_ribbon_join_button",e.M365CalendarFormJoinTeamsMeetingButton="m365_calendar_form_join_teams_meeting_button",e.Other="other"}(Gm||(Gm={}));const hh="v1",vh="v2";function wh(e,t){let n,r,o="";"function"==typeof e?(n=e,r=t,o=Qn(hh,"monetization.openPurchaseExperience")):(r=e,o=Qn(vh,"monetization.openPurchaseExperience"));return _r(or,an.content),En((()=>new Promise((e=>{if(!Ch())throw fn;e(ac(o,"monetization.openPurchaseExperience",r))}))),n)}function Ch(){return!(!_r(or)||!or.supports.monetization)}const yh="v2";function Sh(e){return new Promise((t=>{if(_r(or,an.content),!Eh())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openCalendarItem");t(oc(Qn(yh,"calendar.openCalendarItem"),"calendar.openCalendarItem",e))}))}function bh(e){return new Promise((t=>{if(_r(or,an.content),!Eh())throw new Error("Not supported");const n=Qn(yh,"calendar.composeMeeting");or.isLegacyTeams?t(oc(n,"executeDeepLink",og(e.attendees,e.startTime,e.endTime,e.subject,e.content))):t(oc(n,"calendar.composeMeeting",e))}))}function Eh(){return!(!_r(or)||!or.supports.calendar)}const Ah="v2";function Ih(e){e&&0!==e.length&&e.forEach((e=>{Vp(e)}))}function Ph(e){if(!e.handoffId||0==e.handoffId.trim().length||""===e.handoffId.trim())throw new Error("handoffId should not be null or empty string.");const t=e.composeMailParams;t.type===xh.New&&(Ih(t.toRecipients),Ih(t.ccRecipients),Ih(t.bccRecipients))}function Th(e){if(_r(or,an.content),!Oh())throw new Error("Not supported");return Ph(e),lc("mail.handoff.composeMail",[new Rh(e)],Qn(Ah,"mail.handoff.composeMail"))}function Oh(){return!!(_r(or)&&or.supports.mail&&or.supports.mail.handoff)}class Rh{constructor(e){this.composeMailParamsWithHandoff=e}serialize(){return this.composeMailParamsWithHandoff}}const Fh="v2";function kh(e){return new Promise((t=>{if(_r(or,an.content),!Nh())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openMailItem");t(oc(Qn(Fh,"mail.openMailItem"),"mail.openMailItem",e))}))}function Mh(e){return new Promise((t=>{if(_r(or,an.content),!Nh())throw new Error("Not supported");t(oc(Qn(Fh,"mail.composeMail"),"mail.composeMail",e))}))}function Nh(){return!(!_r(or)||!or.supports.mail)}var xh;!function(e){e.New="new",e.Reply="reply",e.ReplyAll="replyAll",e.Forward="forward"}(xh||(xh={}));const Dh="v2";function Uh(){if(!zn.printCapabilityEnabled){if(_r(or),!Wh())throw fn;zn.printCapabilityEnabled=!0,document.addEventListener("keydown",(e=>{(e.ctrlKey||e.metaKey)&&80===e.keyCode&&(Lh(),e.cancelBubble=!0,e.preventDefault(),e.stopImmediatePropagation())}))}}function Lh(){Fn().print()}function Hh(e){_h(Qn(Dh,"teamsAPIs_registerOnLoadHandler"),e,(()=>{if(!Yr(e)&&!Wh())throw fn}))}function _h(e,t,n){!Yr(t)&&_r(or),!Yr(t)&&n&&n(),Es(e,t)}function Vh(e){Bh(Qn(Dh,"teamsAPIs_registerBeforeUnloadHandler"),e,(()=>{if(!Yr(e)&&!Wh())throw fn}))}function Bh(e,t,n){!Yr(t)&&_r(or),!Yr(t)&&n&&n(),Ps(e,t)}function Wh(){return!(!_r(or)||!or.supports.teamsCore)}const jh="v1",zh="v2";function $h(e,t){let n,r;_r(or,an.content,an.task,an.settings);let o="";return"function"==typeof e?([n,r]=[e,t],o=Qn(jh,"people.selectPeople")):(r=e,o=Qn(zh,"people.selectPeople")),Sn(qh,n,o,r)}function qh(e,t){return new Promise((n=>{if(!Vr(Ke))throw{errorCode:Ne.OLD_PLATFORM};if(!Vg(t))throw{errorCode:Ne.INVALID_ARGUMENTS};if(!Gh())throw fn;n(ac(e,"people.selectPeople",t))}))}function Gh(){return!(!_r(or)||!or.supports.people)}function Jh(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?Kh(e.persona):[!1,"triggerType must be a valid string"]:[!1,"targetElementBoundingRect must be a DOMRect"]:[!1,"A request object is required"]}function Kh(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"]}const Qh="v2";function Zh(e){return _r(or,an.content),new Promise((t=>{const[n,r]=Jh(e);if(!n)throw{errorCode:Ne.INVALID_ARGUMENTS,message:r};const o={modality:e.modality,persona:e.persona,triggerType:e.triggerType,targetRectangle:{x:e.targetElementBoundingRect.x,y:e.targetElementBoundingRect.y,width:e.targetElementBoundingRect.width,height:e.targetElementBoundingRect.height}};t(ac(Qn(Qh,"profile.showProfile"),"profile.showProfile",o))}))}function Xh(){return!(!_r(or)||!or.supports.profile)}const Yh="v2",ev="search.queryChange",tv="search.queryClose",nv="search.queryExecute";function rv(e,t,n){if(_r(or,an.content),!iv())throw fn;ms(Qn(Yh,"search.registerOnClosedHandler"),tv,e),ms(Qn(Yh,"search.registerOnExecutedHandler"),nv,t),n&&ms(Qn(Yh,"search.registerOnChangeHandler"),ev,n)}function ov(){if(_r(or,an.content),!iv())throw fn;gc(Qn(Yh,"search.unregisterHandlers"),"search.unregister"),hs(ev),hs(tv),hs(nv)}function iv(){return!(!_r(or)||!or.supports.search)}function av(){return new Promise((e=>{if(_r(or,an.content),!iv())throw new Error("Not supported");e(oc(Qn(Yh,"search.closeSearch"),"search.closeSearch"))}))}var sv=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())}))};const cv="v2";function uv(){return sv(this,void 0,void 0,(function*(){if(_r(or,an.sidePanel,an.meetingStage),!lv())throw fn;return yield ac(Qn(cv,"sharing.history.getContent"),"sharing.history.getContent")}))}function lv(){var e;return _r(or)&&void 0!==(null===(e=or.supports.sharing)||void 0===e?void 0:e.history)}const dv="v1",fv="v2",pv={shareWebContent:"sharing.shareWebContent"};function gv(e,t){try{hv(e),vv(e),wv(e)}catch(e){return bn((()=>Promise.reject(e)),t)}_r(or,an.content,an.sidePanel,an.task,an.stage,an.meetingStage);return bn(mv,t,Qn(t?dv:fv,"sharing.shareWebContent"),e)}function mv(e,t){return new Promise((n=>{if(!Cv())throw fn;n(ac(e,pv.shareWebContent,t))}))}function hv(e){if(!(e&&e.content&&e.content.length)){throw{errorCode:Ne.INVALID_ARGUMENTS,message:"Shared content is missing"}}}function vv(e){let t;if(e.content.some((e=>!e.type)))throw t={errorCode:Ne.INVALID_ARGUMENTS,message:"Shared content type cannot be undefined"},t;if(e.content.some((t=>t.type!==e.content[0].type)))throw t={errorCode:Ne.INVALID_ARGUMENTS,message:"Shared content must be of the same type"},t}function wv(e){let t;if("URL"!==e.content[0].type)throw t={errorCode:Ne.INVALID_ARGUMENTS,message:"Content type is unsupported"},t;if(e.content.some((e=>!e.url)))throw t={errorCode:Ne.INVALID_ARGUMENTS,message:"URLs are required for URL content types"},t}function Cv(){return!(!_r(or)||!or.supports.sharing)}const yv="v2";function Sv(){return new Promise((e=>{if(_r(or,an.content),!bv())throw fn;e(ac(Qn(yv,"stageView.self.close"),"stageView.self.close"))}))}function bv(){var e;return _r(or)&&void 0!==(null===(e=or.supports.stageView)||void 0===e?void 0:e.self)}const Ev="v2";var Av;function Iv(e){return new Promise((t=>{if(_r(or,an.content),!Pv())throw fn;if(!e)throw new Error("[stageView.open] Stage view params cannot be null");t(ac(Qn(Ev,"stageView.open"),"stageView.open",e))}))}function Pv(){return!(!_r(or)||!or.supports.stageView)}!function(e){e.modal="modal",e.popout="popout",e.popoutWithChat="popoutWithChat"}(Av||(Av={}));const Tv=10;var Ov=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())}))};const Rv="v2";function Fv(e){return Ov(this,void 0,void 0,(function*(){_r(or,an.content,an.task),Nv(),xv(e);const t=yield ac(Qn(Rv,"visualMedia.image.captureImages"),"visualMedia.image.captureImages",e);return Dv(e.maxVisualMediaCount,t),t}))}function kv(e){return Ov(this,void 0,void 0,(function*(){_r(or,an.content,an.task),Nv(),xv(e);const t=yield ac(Qn(Rv,"visualMedia.image.retrieveImages"),"visualMedia.image.retrieveImages",e);return Dv(e.maxVisualMediaCount,t),t}))}function Mv(){return!!(_r(or)&&or.supports.visualMedia&&or.supports.visualMedia.image&&or.supports.permissions)}function Nv(){if(!Mv())throw fn}function xv(e){if(!e||e.maxVisualMediaCount>Tv||e.maxVisualMediaCount<1)throw mn}function Dv(e,t){if(t.length>e)throw hn}const Uv="v2";var Lv,Hv;function _v(){if(_r(or,an.content,an.task),!Mv())throw fn;const e=xe.Media;return ac(Qn(Uv,"visualMedia.hasPermission"),"permissions.has",e)}function Vv(){if(_r(or,an.content,an.task),!Mv())throw fn;const e=xe.Media;return ac(Qn(Uv,"visualMedia.requestPermission"),"permissions.request",e)}!function(e){e[e.FrontOrRear=1]="FrontOrRear",e[e.FrontOnly=2]="FrontOnly",e[e.RearOnly=3]="RearOnly"}(Lv||(Lv={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(Hv||(Hv={}));var Bv=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())}))};let Wv=null;function jv(){return Bv(this,void 0,void 0,(function*(){return null===Wv&&(Wv=(yield To()).app.host.name),Wv}))}var zv=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())}))};function $v(){return zv(this,void 0,void 0,(function*(){if(_r(or),!Gv())throw fn;return!(!or.isLegacyTeams||zn.hostClientType!==rn.android&&zn.hostClientType!==rn.ios&&zn.hostClientType!==rn.ipados&&zn.hostClientType!==rn.visionOS||(yield qv())!==on.teams)||(yield rc(Qn("v2","webStorage.isWebStorageClearedOnUserLogOut"),"webStorage.isWebStorageClearedOnUserLogOut"))}))}function qv(){return zv(this,void 0,void 0,(function*(){return jv()}))}function Gv(){return _r(or)&&void 0!==or.supports.webStorage}const Jv="v2";var Kv;function Qv(e){const t=Qn(Jv,"call.startCall");return new Promise((n=>{var r;if(_r(or,an.content,an.task),!Zv())throw fn;if(!or.isLegacyTeams)return gc(t,"call.startCall",[e],n);n(rc(t,"executeDeepLink",rg(e.targets,null===(r=e.requestedModalities)||void 0===r?void 0:r.includes(Kv.Video),e.source)).then((e=>{if(!e)throw new Error(ct);return e})))}))}function Zv(){return!(!_r(or)||!or.supports.call)}!function(e){e.Unknown="unknown",e.Audio="audio",e.Video="video",e.VideoBasedScreenSharing="videoBasedScreenSharing",e.Data="data"}(Kv||(Kv={}));const Xv="v1";function Yv(){Gi(Qn(Xv,"appInitialization.notifyAppLoaded"))}function ew(){gc(Qn(Xv,"appInitialization.notifySuccess"),Co.Success,[Cr])}function tw(e){Ki(Qn(Xv,"appInitialization.notifyFailure"),e)}function nw(e){Ji(Qn(Xv,"appInitialization.notifyExpectedFailure"),e)}const rw=Kn("thirdPartyCloudStorage"),ow="v2";class iw{constructor(e,t){this.fileType=e,this.assembleAttachment=t}}let aw=[],sw=null,cw=!0,uw=null;function lw(e,t){if(!t)throw new Error("[getDragAndDropFiles] Callback cannot be null");if(e&&""!==e){if(_r(or,an.content,an.task),!fw())throw fn;if(uw)throw uw=null,new Error("getDragAndDropFiles cannot be called twice");uw=t,cw=!0,gc(Qn(ow,"thirdPartyCloudStorage.getDragAndDropFiles"),"thirdPartyCloudStorage.getDragAndDropFiles",[e],dw)}else{t([],{errorCode:Ne.INVALID_ARGUMENTS})}}function dw(e){if(uw)if(e&&e.error)uw([],e.error),uw=null;else if(e&&e.fileChunk)try{cw||0!==e.fileChunk.chunkSequence||(rw("Last chunk is not received or 'endOfFile' value for previous chunk was not set to true"),cw=!0,uw([],{errorCode:Ne.INTERNAL_ERROR,message:"error occurred while receiving data"}),aw=[],uw=null);const t=Fg(e.fileChunk,e.fileType);if(t?(sw||(sw=new iw(e.fileType,[])),sw.assembleAttachment.push(t)):(rw(`Received a null assemble attachment for when decoding chunk sequence ${e.fileChunk.chunkSequence}; not including the chunk in the assembled file.`),uw?uw([],{errorCode:Ne.INTERNAL_ERROR,message:"error occurred while receiving data"}):uw=null,aw=[],uw=null,cw=!0),cw=e.fileChunk.endOfFile,e.fileChunk.endOfFile&&sw){const t=Rg(sw.assembleAttachment,sw.fileType);if(t){const n=new File([t],e.fileName,{type:t.type});aw.push(n)}e.isLastFile&&uw&&(uw(aw,e.error),aw=[],uw=null,cw=!0),sw=null}}catch(e){uw&&(uw([],{errorCode:Ne.INTERNAL_ERROR,message:e}),aw=[],uw=null,cw=!0)}else uw([],{errorCode:Ne.INTERNAL_ERROR,message:"data received is null"}),aw=[],uw=null,cw=!0}function fw(){return!(!_r(or)||!or.supports.thirdPartyCloudStorage)}const pw="v1";function gw(e,t){qi(Qn(pw,"initialize"),t).then((()=>{e&&e()}))}function mw(){Uh()}function hw(){Lh()}function vw(e){Hr(),gc(Qn(pw,"getContext"),"getContext",(t=>{t.frameContext||(t.frameContext=zn.frameContext),e(t)}))}function ww(e){ta(Qn(pw,"registerOnThemeChangeHandlerHelper"),e)}function Cw(e){ws(Qn(pw,"registerFullScreenHandler"),"fullScreenChange",e,[])}function yw(e){ws(Qn(pw,"registerAppButtonClickHandler"),"appButtonClick",e,[an.content])}function Sw(e){ws(Qn(pw,"registerAppButtonHoverEnterHandler"),"appButtonHoverEnter",e,[an.content])}function bw(e){ws(Qn(pw,"registerAppButtonHoverLeaveHandler"),"appButtonHoverLeave",e,[an.content])}function Ew(e){Ca(Qn(pw,"registerBackButtonHandler"),e)}function Aw(e){_h(Qn(pw,"registerOnLoadHandler"),e)}function Iw(e){Bh(Qn(pw,"registerBeforeUnloadHandler"),e)}function Pw(e){ws(Qn(pw,"registerFocusEnterHandler"),"focusEnter",e,[])}function Tw(e){ws(Qn(pw,"registerChangeSettingsHandler"),"changeSettings",e,[an.content])}function Ow(e,t){_r(or),Ja(Qn(pw,"getTabInstances"),t).then((t=>{e(t)}))}function Rw(e,t){_r(or),Ka(Qn(pw,"getMruTabInstances"),t).then((t=>{e(t)}))}function Fw(e){Qa(Qn(pw,"shareDeepLink"),{subPageId:e.subEntityId,subPageLabel:e.subEntityLabel,subPageWebUrl:e.subEntityWebUrl})}function kw(e,t){_r(or,an.content,an.sidePanel,an.settings,an.task,an.stage,an.meetingStage);const n=null!=t?t:vn();na(Qn(pw,"executeDeepLink"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function Mw(e){Za(Qn(pw,"setFrameContext"),e)}function Nw(e,t,n){qi(Qn(pw,"initializeWithFrameContext"),n).then((()=>t&&t())),Za(Qn(pw,"setFrameContext"),e)}const xw="v1";function Dw(e){Ga(Qn(xw,"navigation.returnFocus"),e)}function Uw(e,t){_r(or);const n=null!=t?t:vn();qa(Qn(xw,"navigation.navigateToTab"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function Lw(e,t){_r(or,an.content,an.sidePanel,an.settings,an.remove,an.task,an.stage,an.meetingStage);const n=null!=t?t:vn();za(Qn(xw,"navigation.navigateCrossDomain"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function Hw(e){_r(or);const t=null!=e?e:vn();$a(Qn(xw,"navigation.navigateBack")).then((()=>{t(!0)})).catch((e=>{t(!1,e.message)}))}const _w="v1";function Vw(e){Xa(Qn(_w,"settings.setValidityState"),e)}function Bw(e){_r(or,an.content,an.settings,an.remove,an.sidePanel),Ya(Qn(_w,"settings.getSettings")).then((t=>{e(t)}))}function Ww(e,t){_r(or,an.content,an.settings,an.sidePanel);const n=null!=t?t:vn();es(Qn(_w,"settings.setSettings"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function jw(e){Mi(Qn(_w,"settings.registerOnSaveHandler"),e)}function zw(e){xi(Qn(_w,"settings.registerOnRemoveHandler"),e)}var $w=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};const qw="v1";function Gw(e,t){const n=Qn(qw,"tasks.startTask"),r=t?e=>{var n,r;return t(null!==(n=e.err)&&void 0!==n?n:"",null!==(r=e.result)&&void 0!==r?r:"")}:void 0;return void 0===e.card&&void 0===e.url||e.card?(_r(or,an.content,an.sidePanel,an.meetingStage),gc(n,"tasks.startTask",[e],t)):void 0!==e.completionBotId?Yo(n,Zw(e),r):Xo(n,Qw(e),r),new Rm}function Jw(e){e=Xw(e);const{width:t,height:n}=e,r=$w(e,["width","height"]);if(Object.keys(r).length)throw new Error("resize requires a TaskInfo argument containing only width and height");Zo(Qn(qw,"tasks.updateTask"),e)}function Kw(e,t){ei(Qn(qw,"tasks.submitTask"),e,t)}function Qw(e){if(void 0===e.url)throw new Error("url property of taskInfo object can't be undefined");return{url:e.url,size:{height:e.height?e.height:ln.Small,width:e.width?e.width:ln.Small},title:e.title,fallbackUrl:e.fallbackUrl}}function Zw(e){if(void 0===e.url||void 0===e.completionBotId)throw new Error(`Both url ${e.url} and completionBotId ${e.completionBotId} are required for bot url dialog. At least one is undefined.`);return{url:e.url,size:{height:e.height?e.height:ln.Small,width:e.width?e.width:ln.Small},title:e.title,fallbackUrl:e.fallbackUrl,completionBotId:e.completionBotId}}function Xw(e){return e.height=e.height?e.height:ln.Small,e.width=e.width?e.width:ln.Small,e}const Yw="v2";var eC,tC;function nC(){return!(!_r(or,an.meetingStage,an.sidePanel,an.content)||!or.supports.interactive)}!function(e){e.guest="Guest",e.attendee="Attendee",e.presenter="Presenter",e.organizer="Organizer"}(eC||(eC={})),function(e){e.added="Added",e.alreadyExists="AlreadyExists",e.conflict="Conflict",e.notFound="NotFound"}(tC||(tC={}));class rC{getFluidTenantInfo(){return oC(),new Promise((e=>{e(ac(Qn(Yw,"interactive.getFluidTenantInfo"),"interactive.getFluidTenantInfo"))}))}getFluidToken(e){return oC(),new Promise((t=>{t(ac(Qn(Yw,"interactive.getFluidToken"),"interactive.getFluidToken",e))}))}getFluidContainerId(){return oC(),new Promise((e=>{e(ac(Qn(Yw,"interactive.getFluidContainerId"),"interactive.getFluidContainerId"))}))}setFluidContainerId(e){return oC(),new Promise((t=>{t(ac(Qn(Yw,"interactive.setFluidContainerId"),"interactive.setFluidContainerId",e))}))}getNtpTime(){return oC(),new Promise((e=>{e(ac(Qn(Yw,"interactive.getNtpTime"),"interactive.getNtpTime"))}))}registerClientId(e){return oC(),new Promise((t=>{t(ac(Qn(Yw,"interactive.registerClientId"),"interactive.registerClientId",e))}))}getClientRoles(e){return oC(),new Promise((t=>{t(ac(Qn(Yw,"interactive.getClientRoles"),"interactive.getClientRoles",e))}))}getClientInfo(e){return oC(),new Promise((t=>{t(ac(Qn(Yw,"interactive.getClientInfo"),"interactive.getClientInfo",e))}))}static create(){return oC(),new rC}}function oC(){if(!nC())throw new Error("LiveShareHost Not supported")}var iC=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 aC(e){try{return e.cartItems=sC(e.cartItems),e}catch(e){throw new Error("Error deserializing cart")}}function sC(e){return e.map((e=>{if(e.imageURL){const t=new URL(e.imageURL);e.imageURL=t}return e.accessories&&(e.accessories=sC(e.accessories)),e}))}const cC=e=>{try{return e.map((e=>{const{imageURL:t,accessories:n}=e,r=iC(e,["imageURL","accessories"]),o=Object.assign({},r);return t&&(o.imageURL=t.href),n&&(o.accessories=cC(n)),o}))}catch(e){throw new Error("Error serializing cart items")}};function uC(e){if(!Array.isArray(e)||0===e.length)throw new Error("cartItems must be a non-empty array");for(const t of e)dC(t),lC(t.accessories)}function lC(e){if(null!=e){if(!Array.isArray(e)||0===e.length)throw new Error("CartItem.accessories must be a non-empty array");for(const t of e){if(t.accessories)throw new Error("Item in CartItem.accessories cannot have accessories");dC(t)}}}function dC(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");pC(e.price),gC(e.quantity)}function fC(e){if(null!=e){if(!e)throw new Error("id must not be empty");if(!1===nn(e))throw new Error("id must be a valid UUID")}}function pC(e){if("number"!=typeof e||e<0)throw new Error(`price ${e} must be a number not less than 0`);if(parseFloat(e.toFixed(3))!==e)throw new Error(`price ${e} must have at most 3 decimal places`)}function gC(e){if("number"!=typeof e||e<=0||parseInt(e.toString())!==e)throw new Error(`quantity ${e} must be an integer greater than 0`)}function mC(e){if(!Object.values(CC).includes(e))throw new Error(`cartStatus ${e} is not valid`)}const hC="v2",vC={majorVersion:1,minorVersion:1};var wC,CC;function yC(){if(_r(or,an.content,an.task),!AC())throw fn;return ac(Qn(hC,"marketplace.getCart"),"marketplace.getCart",vC).then(aC)}function SC(e){if(_r(or,an.content,an.task),!AC())throw fn;if(!e)throw new Error("addOrUpdateCartItemsParams must be provided");return fC(null==e?void 0:e.cartId),uC(null==e?void 0:e.cartItems),ac(Qn(hC,"marketplace.addOrUpdateCartItems"),"marketplace.addOrUpdateCartItems",Object.assign(Object.assign({},e),{cartItems:cC(e.cartItems),cartVersion:vC})).then(aC)}function bC(e){if(_r(or,an.content,an.task),!AC())throw fn;if(!e)throw new Error("removeCartItemsParams must be provided");if(fC(null==e?void 0:e.cartId),!Array.isArray(null==e?void 0:e.cartItemIds)||0===(null==e?void 0:e.cartItemIds.length))throw new Error("cartItemIds must be a non-empty array");return ac(Qn(hC,"marketplace.removeCartItems"),"marketplace.removeCartItems",Object.assign(Object.assign({},e),{cartVersion:vC})).then(aC)}function EC(e){if(_r(or,an.content,an.task),!AC())throw fn;if(!e)throw new Error("updateCartStatusParams must be provided");return fC(null==e?void 0:e.cartId),mC(null==e?void 0:e.cartStatus),ac(Qn(hC,"marketplace.updateCartStatus"),"marketplace.updateCartStatus",Object.assign(Object.assign({},e),{cartVersion:vC})).then(aC)}function AC(){return!(!_r(or)||!or.supports.marketplace)}!function(e){e.TACAdminUser="TACAdminUser",e.TeamsAdminUser="TeamsAdminUser",e.TeamsEndUser="TeamsEndUser"}(wC||(wC={})),function(e){e.Open="Open",e.Processing="Processing",e.Processed="Processed",e.Closed="Closed",e.Error="Error"}(CC||(CC={}))})(),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={933:(e,t)=>{"use strict";t.byteLength=function(e){var t=s(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,i=s(e),a=i[0],u=i[1],l=new o(c(e,a,u)),d=0,f=u>0?a-4:a;for(n=0;n<f;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],l[d++]=t>>16&255,l[d++]=t>>8&255,l[d++]=255&t;2===u&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,l[d++]=255&t);1===u&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,l[d++]=t>>8&255,l[d++]=255&t);return l},t.fromByteArray=function(e){for(var t,r=e.length,o=r%3,i=[],a=16383,s=0,c=r-o;s<c;s+=a)i.push(l(e,s,s+a>c?c:s+a));1===o?(t=e[r-1],i.push(n[t>>2]+n[t<<4&63]+"==")):2===o&&(t=(e[r-2]<<8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return i.join("")};for(var n=[],r=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)n[a]=i[a],r[i.charCodeAt(a)]=a;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function c(e,t,n){return 3*(t+n)/4-n}function u(e){return n[e>>18&63]+n[e>>12&63]+n[e>>6&63]+n[63&e]}function l(e,t,n){for(var r,o=[],i=t;i<n;i+=3)r=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]),o.push(u(r));return o.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},815:(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(530)(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},530:(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(821),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}},821:e=>{var t=1e3,n=60*t,r=60*n,o=24*r,i=7*o;function a(e){if(!((e=String(e)).length>100)){var a=/^(-?(?:\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(a){var s=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return s*i;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*r;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}function s(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 c(e){var i=Math.abs(e);return i>=o?u(e,i,o,"day"):i>=r?u(e,i,r,"hour"):i>=n?u(e,i,n,"minute"):i>=t?u(e,i,t,"second"):e+" ms"}function u(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 a(e);if("number"===n&&isFinite(e))return t.long?c(e):s(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}(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;n.t=function(r,o){if(1&o&&(r=this(r)),8&o)return r;if("object"==typeof r&&r){if(4&o&&r.__esModule)return r;if(16&o&&"function"==typeof r.then)return r}var i=Object.create(null);n.r(i);var a={};e=e||[null,t({}),t([]),t(t)];for(var s=2&o&&r;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((e=>a[e]=()=>r[e]));return a.default=()=>r,n.d(i,a),i}})(),(()=>{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:()=>ke,AppId:()=>Xr,ChannelType:()=>dn,ChildAppWindow:()=>km,DialogDimension:()=>ln,EduType:()=>He,EmailAddress:()=>jp,ErrorCode:()=>Ne,FileOpenPreference:()=>Fe,FrameContexts:()=>an,HostClientType:()=>rn,HostName:()=>on,LiveShareHost:()=>iC,NotificationTypes:()=>qc,ParentAppWindow:()=>Mm,RenderingSurfaces:()=>sn,SecondaryM365ContentIdName:()=>Me,TaskModuleDimension:()=>ln,TeamType:()=>cn,UUID:()=>Wn,UserSettingTypes:()=>Jc,UserTeamRole:()=>un,ValidatedSafeString:()=>Zr,ViewerActionTypes:()=>Gc,activateChildProxyingCommunication:()=>Sr,app:()=>i,appEntity:()=>B,appInitialization:()=>Ie,appInstallDialog:()=>Z,authentication:()=>Q,barCode:()=>Y,calendar:()=>le,call:()=>Ae,chat:()=>ee,clipboard:()=>te,conversations:()=>b,copilot:()=>T,dialog:()=>f,enablePrintCapability:()=>vw,executeDeepLink:()=>Nw,externalAppAuthentication:()=>O,externalAppAuthenticationForCEA:()=>R,externalAppCardActions:()=>F,externalAppCardActionsForCEA:()=>k,externalAppCardActionsForDA:()=>M,externalAppCommands:()=>N,files:()=>x,geoLocation:()=>oe,getAdaptiveCardSchemaVersion:()=>Rm,getContext:()=>Cw,getCurrentFeatureFlagsState:()=>Ar,getMruTabInstances:()=>kw,getTabInstances:()=>Fw,hostEntity:()=>J,initialize:()=>hw,initializeWithFrameContext:()=>Dw,liveShare:()=>Re,location:()=>ae,logs:()=>S,mail:()=>fe,marketplace:()=>Ve,media:()=>X,meeting:()=>ce,meetingRoom:()=>D,menus:()=>p,messageChannels:()=>U,monetization:()=>ue,navigateBack:()=>Vw,navigateCrossDomain:()=>_w,navigateToTab:()=>Hw,nestedAppAuth:()=>ne,nestedAppAuthBridge:()=>L,notifications:()=>H,openFilePreview:()=>tu,otherAppStateChange:()=>_,overwriteFeatureFlagsState:()=>Pr,pages:()=>y,people:()=>ge,print:()=>ww,profile:()=>me,registerAppButtonClickHandler:()=>bw,registerAppButtonHoverEnterHandler:()=>Ew,registerAppButtonHoverLeaveHandler:()=>Aw,registerBackButtonHandler:()=>Iw,registerBeforeUnloadHandler:()=>Tw,registerChangeSettingsHandler:()=>Rw,registerCustomHandler:()=>Yc,registerFocusEnterHandler:()=>Ow,registerFullScreenHandler:()=>Sw,registerOnLoadHandler:()=>Pw,registerOnThemeChangeHandler:()=>yw,registerUserSettingsChangeHandler:()=>eu,remoteCamera:()=>V,returnFocus:()=>Lw,search:()=>he,secondaryBrowser:()=>ie,sendCustomEvent:()=>Xc,sendCustomMessage:()=>Zc,setFeatureFlagsState:()=>Ir,setFrameContext:()=>xw,settings:()=>Te,shareDeepLink:()=>Mw,sharing:()=>we,sidePanelInterfaces:()=>I,stageView:()=>ye,store:()=>K,tasks:()=>Oe,teams:()=>z,teamsCore:()=>pe,thirdPartyCloudStorage:()=>Pe,uploadCustomApp:()=>Qc,version:()=>Cr,videoEffects:()=>$,videoEffectsEx:()=>q,visualMedia:()=>be,webStorage:()=>Ee});var e={};n.r(e),n.d(e,{_clearTelemetryPort:()=>ao,getTelemetryPort:()=>oo,isSupported:()=>io});var t={};n.r(t),n.d(t,{_clearDataLayerPort:()=>go,getDataLayerPort:()=>fo,isSupported:()=>po});var o={};n.r(o),n.d(o,{registerBeforeSuspendOrTerminateHandler:()=>mo,registerOnResumeHandler:()=>ho});var i={};n.r(i),n.d(i,{ExpectedFailureReason:()=>So,FailedReason:()=>yo,Messages:()=>Co,_initialize:()=>Io,_uninitialize:()=>Po,getContext:()=>To,getFrameContext:()=>Eo,initialize:()=>Ao,isInitialized:()=>bo,lifecycle:()=>o,notifyAppLoaded:()=>Oo,notifyExpectedFailure:()=>ko,notifyFailure:()=>Fo,notifySuccess:()=>Ro,openLink:()=>xo,registerHostToAppPerformanceMetricsHandler:()=>No,registerOnThemeChangeHandler:()=>Mo});var a={};n.r(a),n.d(a,{isSupported:()=>Lo,resize:()=>Uo});var s={};n.r(s),n.d(s,{isSupported:()=>_o,open:()=>Ho});var c={};n.r(c),n.d(c,{isSupported:()=>jo,registerOnMessageFromParent:()=>Wo,sendMessageToDialog:()=>Bo,sendMessageToParentFromDialog:()=>Vo});var u={};n.r(u),n.d(u,{bot:()=>s,getDialogInfoFromBotUrlDialogInfo:()=>Jo,getDialogInfoFromUrlDialogInfo:()=>Go,isSupported:()=>qo,open:()=>zo,parentCommunication:()=>c,submit:()=>$o});var l={};n.r(l),n.d(l,{isSupported:()=>ai,open:()=>ii});var d={};n.r(d),n.d(d,{bot:()=>l,isSupported:()=>ci,open:()=>si});var f={};n.r(f),n.d(f,{adaptiveCard:()=>d,initialize:()=>ui,isSupported:()=>li,update:()=>a,url:()=>u});var p={};n.r(p),n.d(p,{DisplayMode:()=>fi,MenuItem:()=>gi,MenuListType:()=>pi,initialize:()=>yi,isSupported:()=>Ti,setNavBarMenu:()=>Ei,setUpViews:()=>Si,showActionMenu:()=>Ii});var g={};n.r(g),n.d(g,{initialize:()=>Oi,isSupported:()=>Vi,registerChangeConfigHandler:()=>Ui,registerOnRemoveHandler:()=>Ni,registerOnRemoveHandlerHelper:()=>xi,registerOnSaveHandler:()=>ki,registerOnSaveHandlerHelper:()=>Mi,setConfig:()=>Fi,setValidityState:()=>Ri});var m={};n.r(m),n.d(m,{isSupported:()=>va,onClick:()=>ga,onHoverEnter:()=>ma,onHoverLeave:()=>ha});var h={};n.r(h),n.d(h,{_initialize:()=>wa,isSupported:()=>ba,navigateBack:()=>Ca,registerBackButtonHandler:()=>ya,registerBackButtonHandlerHelper:()=>Sa});var v={};n.r(v),n.d(v,{isSupported:()=>Ia,navigateTo:()=>Ea,navigateToDefaultPage:()=>Aa});var w={};n.r(w),n.d(w,{enterFullscreen:()=>Pa,exitFullscreen:()=>Ta,isSupported:()=>Oa});var C={};n.r(C),n.d(C,{getMruTabInstances:()=>ka,getTabInstances:()=>Fa,isSupported:()=>Ma,navigateToTab:()=>Ra});var y={};n.r(y),n.d(y,{EnterFocusType:()=>Na,ReturnFocusType:()=>xa,appButton:()=>m,backStack:()=>h,config:()=>g,currentApp:()=>v,fullTrust:()=>w,getConfig:()=>_a,initializeWithFrameContext:()=>Ha,isSupported:()=>za,navigateCrossDomain:()=>Va,navigateToApp:()=>Ba,registerFocusEnterHandler:()=>Ua,registerFullScreenHandler:()=>ja,returnFocus:()=>Da,setCurrentFrame:()=>La,shareDeepLink:()=>Wa,tabs:()=>C});var S={};n.r(S),n.d(S,{isSupported:()=>$c,registerGetLogHandler:()=>zc});var b={};n.r(b),n.d(b,{closeConversation:()=>ou,getChatMembers:()=>iu,isSupported:()=>au,openConversation:()=>ru});var E={};n.r(E),n.d(E,{isSupported:()=>lu,sendCustomTelemetryData:()=>du});var A={};n.r(A),n.d(A,{getEligibilityInfo:()=>hu,isSupported:()=>mu});var I={};n.r(I),n.d(I,{ContentItemType:()=>wu,MediaSelectionType:()=>Cu,SidePanelErrorCode:()=>Su,SidePanelErrorImpl:()=>bu,UserConsent:()=>yu});var P={};n.r(P),n.d(P,{copilotSidePanelNotSupportedOnPlatformError:()=>Fu,getContent:()=>Tu,isResponseAReportableError:()=>Pu,isSupported:()=>Iu,preCheckUserConsent:()=>Ou,registerUserActionContentSelect:()=>Ru});var T={};n.r(T),n.d(T,{customTelemetry:()=>E,eligibility:()=>A,sidePanel:()=>P});var O={};n.r(O),n.d(O,{ActionExecuteInvokeRequestType:()=>Lu,ActionExecuteResponseHandler:()=>Bu,InvokeErrorCode:()=>Vu,InvokeResponseType:()=>_u,OriginalRequestType:()=>Hu,SerializableActionExecuteInvokeRequest:()=>Du,authenticateAndResendRequest:()=>qu,authenticateWithOauth2:()=>Ku,authenticateWithPowerPlatformConnectorPlugins:()=>Qu,authenticateWithSSO:()=>Gu,authenticateWithSSOAndResendRequest:()=>Ju,isActionExecuteResponse:()=>Uu,isInvokeError:()=>Wu,isSupported:()=>Zu,validateActionExecuteInvokeRequest:()=>zu});var R={};n.r(R),n.d(R,{authenticateAndResendRequest:()=>nl,authenticateWithOauth:()=>tl,authenticateWithSSO:()=>el,authenticateWithSSOAndResendRequest:()=>rl,isSupported:()=>ol,validateInput:()=>il});var F={};n.r(F),n.d(F,{ActionOpenUrlErrorCode:()=>cl,ActionOpenUrlType:()=>sl,isSupported:()=>dl,processActionOpenUrl:()=>ll,processActionSubmit:()=>ul});var k={};n.r(k),n.d(k,{isSupported:()=>hl,processActionOpenUrl:()=>gl,processActionSubmit:()=>ml});var M={};n.r(M),n.d(M,{SerializableActionOpenUrlDialogInfo:()=>Al,isSupported:()=>bl,processActionOpenUrlDialog:()=>Sl});var N={};n.r(N),n.d(N,{isSupported:()=>Ol,processActionCommand:()=>Tl});var x={};n.r(x),n.d(x,{CloudStorageProvider:()=>Fl,CloudStorageProviderFileAction:()=>Dl,CloudStorageProviderType:()=>kl,DocumentLibraryAccessType:()=>Nl,FileDownloadStatus:()=>xl,SpecialDocumentLibraryType:()=>Ml,addCloudStorageFolder:()=>Ll,addCloudStorageProvider:()=>$l,addCloudStorageProviderFile:()=>Gl,copyMoveFiles:()=>Wl,deleteCloudStorageFolder:()=>Hl,deleteCloudStorageProviderFile:()=>Kl,downloadCloudStorageProviderFile:()=>Ql,getCloudStorageFolderContents:()=>_l,getCloudStorageFolders:()=>Ul,getExternalProviders:()=>Bl,getFileDownloads:()=>jl,openCloudStorageFile:()=>Vl,openDownloadFolder:()=>zl,registerCloudStorageProviderContentChangeHandler:()=>Yl,registerCloudStorageProviderListChangeHandler:()=>Xl,removeCloudStorageProvider:()=>ql,renameCloudStorageProviderFile:()=>Jl,uploadCloudStorageProviderFile:()=>Zl});var D={};n.r(D),n.d(D,{getPairedMeetingRoomInfo:()=>nd,isSupported:()=>ad,registerMeetingRoomCapabilitiesUpdateHandler:()=>od,registerMeetingRoomStatesUpdateHandler:()=>id,sendCommandToPairedMeetingRoom:()=>rd});var U={};n.r(U),n.d(U,{dataLayer:()=>t,isSupported:()=>sd,telemetry:()=>e});var L={};n.r(L),n.d(L,{initialize:()=>fd,version:()=>cd});var H={};n.r(H),n.d(H,{isSupported:()=>Sd,showNotification:()=>yd});var _={};n.r(_),n.d(_,{isSupported:()=>Pd,notifyInstallCompleted:()=>Id,registerAppInstallationHandler:()=>Ed,unregisterAppInstallationHandler:()=>Ad});var V={};n.r(V),n.d(V,{ControlCommand:()=>Od,ErrorReason:()=>Rd,SessionTerminatedReason:()=>Fd,getCapableParticipants:()=>kd,isSupported:()=>_d,registerOnCapableParticipantsChangeHandler:()=>Dd,registerOnDeviceStateChangeHandler:()=>Ld,registerOnErrorHandler:()=>Ud,registerOnSessionStatusChangeHandler:()=>Hd,requestControl:()=>Md,sendControlCommand:()=>Nd,terminateSession:()=>xd});var B={};n.r(B),n.d(B,{isSupported:()=>Wd,selectAppEntity:()=>Bd});var W={};n.r(W),n.d(W,{getUserJoinedTeams:()=>zd,isSupported:()=>$d});var j={};n.r(j),n.d(j,{getConfigSetting:()=>Gd,isSupported:()=>Jd,joinedTeams:()=>W});var z={};n.r(z),n.d(z,{ChannelType:()=>Qd,fullTrust:()=>j,getTeamChannels:()=>Zd,isSupported:()=>Yd,refreshSiteUrl:()=>Xd});var $={};n.r($),n.d($,{EffectChangeType:()=>lf,EffectFailureReason:()=>df,VideoFrameFormat:()=>uf,isSupported:()=>vf,notifySelectedVideoEffectChanged:()=>pf,registerForVideoEffect:()=>gf,registerForVideoFrame:()=>ff});var q={};n.r(q),n.d(q,{ErrorLevel:()=>Bf,frameProcessingTimeoutInMs:()=>_f,isSupported:()=>Kf,notifyFatalError:()=>Xf,notifySelectedVideoEffectChanged:()=>qf,registerForVideoEffect:()=>Gf,registerForVideoFrame:()=>Wf,updatePersonalizedEffects:()=>Jf});var G={};n.r(G),n.d(G,{addAndConfigure:()=>ap,getAll:()=>sp,isSupported:()=>dp,reconfigure:()=>cp,remove:()=>lp,rename:()=>up});var J={};n.r(J),n.d(J,{AppTypes:()=>gp,isSupported:()=>mp,tab:()=>G});var K={};n.r(K),n.d(K,{isSupported:()=>Ip,openAppDetail:()=>bp,openFullStore:()=>Sp,openInContextStore:()=>Ep,openSpecificStore:()=>Ap});var Q={};n.r(Q),n.d(Q,{DataResidency:()=>Bp,authenticate:()=>Np,getAuthToken:()=>Dp,getUser:()=>Lp,notifyFailure:()=>Vp,notifySuccess:()=>_p,registerAuthenticationHandlers:()=>Mp});var Z={};n.r(Z),n.d(Z,{isSupported:()=>lg,openAppInstallDialog:()=>ug});var X={};n.r(X),n.d(X,{CameraStartMode:()=>mg,File:()=>yg,FileFormat:()=>pg,ImageOutputFormats:()=>Cg,ImageUriType:()=>wg,Media:()=>Ig,MediaControllerEvent:()=>gg,MediaType:()=>vg,Source:()=>hg,VideoController:()=>Tg,captureImage:()=>Sg,hasPermission:()=>bg,requestPermission:()=>Eg,scanBarCode:()=>Fg,selectMedia:()=>Og,viewImages:()=>Rg});var Y={};n.r(Y),n.d(Y,{hasPermission:()=>$g,isSupported:()=>Gg,requestPermission:()=>qg,scanBarCode:()=>zg});var ee={};n.r(ee),n.d(ee,{isSupported:()=>Xg,openChat:()=>Kg,openGroupChat:()=>Zg});var te={};n.r(te),n.d(te,{isSupported:()=>rm,read:()=>nm,write:()=>tm});var ne={};n.r(ne),n.d(ne,{addNAATrustedOrigins:()=>mm,canParentManageNAATrustedOrigins:()=>lm,deleteNAATrustedOrigins:()=>hm,getParentOrigin:()=>um,isDeeplyNestedAuthSupported:()=>dm,isNAAChannelRecommended:()=>cm});var re={};n.r(re),n.d(re,{chooseLocation:()=>Sm,isSupported:()=>Em,showLocation:()=>bm});var oe={};n.r(oe),n.d(oe,{getCurrentLocation:()=>Im,hasPermission:()=>Pm,isSupported:()=>Om,map:()=>re,requestPermission:()=>Tm});var ie={};n.r(ie),n.d(ie,{isSupported:()=>Dm,open:()=>xm});var ae={};n.r(ae),n.d(ae,{getLocation:()=>Lm,isSupported:()=>_m,showLocation:()=>Hm});var se={};n.r(se),n.d(se,{setOptions:()=>Bm});var ce={};n.r(ce),n.d(ce,{CallType:()=>Gm,EventActionSource:()=>Km,MeetingReactionType:()=>$m,MeetingType:()=>qm,SharingProtocol:()=>Jm,appShareButton:()=>se,getAppContentStageSharingCapabilities:()=>ah,getAppContentStageSharingState:()=>ch,getAuthenticationTokenForAnonymousUser:()=>eh,getIncomingClientAudioState:()=>Qm,getLiveStreamState:()=>th,getMeetingDetails:()=>Xm,getMeetingDetailsVerbose:()=>Ym,joinMeeting:()=>fh,registerLiveStreamChangedHandler:()=>oh,registerMeetingReactionReceivedHandler:()=>dh,registerRaiseHandStateChangedHandler:()=>lh,registerSpeakingStateChangeHandler:()=>uh,requestAppAudioHandling:()=>ph,requestStartLiveStreaming:()=>nh,requestStopLiveStreaming:()=>rh,shareAppContentToStage:()=>ih,stopSharingAppContentToStage:()=>sh,toggleIncomingClientAudio:()=>Zm,updateMicState:()=>hh});var ue={};n.r(ue),n.d(ue,{isSupported:()=>Sh,openPurchaseExperience:()=>yh});var le={};n.r(le),n.d(le,{composeMeeting:()=>Ah,isSupported:()=>Ih,openCalendarItem:()=>Eh});var de={};n.r(de),n.d(de,{composeMailWithHandoff:()=>Rh,isSupported:()=>Fh});var fe={};n.r(fe),n.d(fe,{ComposeMailType:()=>Uh,composeMail:()=>xh,handoff:()=>de,isSupported:()=>Dh,openMailItem:()=>Nh});var pe={};n.r(pe),n.d(pe,{enablePrintCapability:()=>Hh,isSupported:()=>zh,print:()=>_h,registerBeforeUnloadHandler:()=>Wh,registerBeforeUnloadHandlerHelper:()=>jh,registerOnLoadHandler:()=>Vh,registerOnLoadHandlerHelper:()=>Bh});var ge={};n.r(ge),n.d(ge,{isSupported:()=>Kh,selectPeople:()=>Gh});var me={};n.r(me),n.d(me,{isSupported:()=>ev,showProfile:()=>Yh});var he={};n.r(he),n.d(he,{closeSearch:()=>cv,isSupported:()=>sv,registerHandlers:()=>iv,unregisterHandlers:()=>av});var ve={};n.r(ve),n.d(ve,{getContent:()=>dv,isSupported:()=>fv});var we={};n.r(we),n.d(we,{SharingAPIMessages:()=>mv,history:()=>ve,isSupported:()=>Sv,shareWebContent:()=>hv});var Ce={};n.r(Ce),n.d(Ce,{close:()=>Ev,isSupported:()=>Av});var ye={};n.r(ye),n.d(ye,{StageViewOpenMode:()=>Pv,isSupported:()=>Ov,open:()=>Tv,self:()=>Ce});var Se={};n.r(Se),n.d(Se,{captureImages:()=>Mv,isSupported:()=>xv,retrieveImages:()=>Nv});var be={};n.r(be),n.d(be,{CameraRestriction:()=>_v,Source:()=>Vv,hasPermission:()=>Bv,image:()=>Se,requestPermission:()=>Wv});var Ee={};n.r(Ee),n.d(Ee,{isSupported:()=>Kv,isWebStorageClearedOnUserLogOut:()=>Gv});var Ae={};n.r(Ae),n.d(Ae,{CallModalities:()=>Zv,isSupported:()=>Yv,startCall:()=>Xv});var Ie={};n.r(Ie),n.d(Ie,{ExpectedFailureReason:()=>So,FailedReason:()=>yo,Messages:()=>Co,notifyAppLoaded:()=>tw,notifyExpectedFailure:()=>ow,notifyFailure:()=>rw,notifySuccess:()=>nw});var Pe={};n.r(Pe),n.d(Pe,{getDragAndDropFiles:()=>fw,isSupported:()=>gw});var Te={};n.r(Te),n.d(Te,{getSettings:()=>jw,registerOnRemoveHandler:()=>qw,registerOnSaveHandler:()=>$w,setSettings:()=>zw,setValidityState:()=>Ww});var Oe={};n.r(Oe),n.d(Oe,{getDefaultSizeIfNotProvided:()=>eC,startTask:()=>Kw,submitTask:()=>Zw,updateTask:()=>Qw});var Re={};n.r(Re),n.d(Re,{ContainerState:()=>rC,LiveShareHost:()=>iC,UserMeetingRole:()=>nC,isSupported:()=>oC});var Fe,ke,Me,Ne,xe,De,Ue,Le,He,_e,Ve={};function Be(e){return void 0!==(null==e?void 0:e.errorCode)}n.r(Ve),n.d(Ve,{CartStatus:()=>SC,Intent:()=>yC,addOrUpdateCartItems:()=>EC,cartVersion:()=>CC,getCart:()=>bC,isSupported:()=>PC,removeCartItems:()=>AC,updateCartStatus:()=>IC}),function(e){e.Inline="inline",e.Desktop="desktop",e.Web="web"}(Fe||(Fe={})),function(e){e.M365Content="m365content"}(ke||(ke={})),function(e){e.DriveId="driveId",e.GroupId="groupId",e.SiteId="siteId",e.UserId="userId"}(Me||(Me={})),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"}(Ne||(Ne={})),function(e){e.GeoLocation="geolocation",e.Media="media"}(xe||(xe={})),function(e){e.BCAIS="bcais",e.BCWAF="bcwaf",e.BCWBF="bcwbf"}(De||(De={})),function(e){e.Faculty="faculty",e.Student="student",e.Other="other"}(Ue||(Ue={})),function(e){e.Adult="adult",e.MinorNoParentalConsentRequired="minorNoParentalConsentRequired",e.MinorWithoutParentalConsent="minorWithoutParentalConsent",e.MinorWithParentalConsent="minorWithParentalConsent",e.NonAdult="nonAdult"}(Le||(Le={})),function(e){e.HigherEducation="higherEducation",e.K12="k12",e.Other="other"}(He||(He={})),function(e){e.TextPlain="text/plain",e.TextHtml="text/html",e.ImagePNG="image/png",e.ImageJPEG="image/jpeg"}(_e||(_e={}));const We=JSON.parse('{"validOrigins":["teams.microsoft.com","teams.microsoft.us","gov.teams.microsoft.us","dod.teams.microsoft.us","int.teams.microsoft.com","outlook.office.com","outlook-sdf.office.com","outlook.office365.com","outlook-sdf.office365.com","outlook.live.com","outlook-sdf.live.com","teams.live.com","local.teams.live.com","local.teams.live.com:8080","local.teams.office.com","local.teams.office.com:8080","devspaces.skype.com","*.www.office.com","www.office.com","word.office.com","excel.office.com","powerpoint.office.com","www.officeppe.com","*.www.microsoft365.com","www.microsoft365.com","bing.com","edgeservices.bing.com","work.bing.com","www.bing.com","www.staging-bing-int.com","*.cloud.microsoft","*.m365.cloud.microsoft","*.outlook.cloud.microsoft","chatuxmanager.svc.cloud.microsoft","copilot.microsoft.com","windows.msn.com","fa000000125.resources.office.net","fa000000129.resources.office.net","fa000000124.resources.office.net","fa000000128.resources.office.net","fa000000136.resources.office.net"]}');const je="2.0.1",ze="2.0.2",$e="2.0.3",qe="2.0.4",Ge="2.0.1",Je="1.9.0",Ke="2.0.0",Qe="1.7.0",Ze="1.8.0",Xe="1.9.0",Ye=n.t(We,2).validOrigins,et=1500,tt=new URL("https://res.cdn.office.net/teams-js/validDomains/json/validDomains.json"),nt=/^https:\/\//,rt="https",ot="teams.microsoft.com",it="The library has not yet been initialized",at="The runtime has not yet been initialized",st="The runtime version is not supported",ct="The call was not properly started";var ut=n(933);const lt=ft,dt=2147483647;function ft(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return gt(e)}return pt(e,t,n)}function pt(e,t,n){if("string"==typeof e)return wt(e,t);if(ArrayBuffer.isView(e))return It(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(yt(e,ArrayBuffer)||e&&yt(e.buffer,ArrayBuffer))return Pt(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(yt(e,SharedArrayBuffer)||e&&yt(e.buffer,SharedArrayBuffer)))return Pt(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return ft.from(r,t,n);const o=Gt(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return ft.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function gt(e){return mt(e),ht(e<0?0:0|vt(e))}function mt(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function ht(e){if(e>dt)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,ft.prototype),t}function vt(e){if(e>=dt)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+dt.toString(16)+" bytes");return 0|e}function wt(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!ft.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|Ct(e,t);let r=ht(n);const o=r.write(e,t);return o!==n&&(r=r.slice(0,o)),r}function Ct(e,t){if(ft.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||yt(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return St(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return bt(e).length;default:if(o)return r?-1:St(e).length;t=(""+t).toLowerCase(),o=!0}}function yt(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function St(e,t){let n;t=t||1/0;const r=e.length;let o=null;const i=[];for(let a=0;a<r;++a){if(n=e.charCodeAt(a),n>55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function bt(e){return ut.toByteArray(At(e))}ft.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),ft.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required"),ft.from=function(e,t,n){return pt(e,t,n)},Object.setPrototypeOf(ft.prototype,Uint8Array.prototype),Object.setPrototypeOf(ft,Uint8Array),ft.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},ft.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==ft.prototype};const Et=/[^+/0-9A-Za-z-_]/g;function At(e){if((e=(e=e.split("=")[0]).trim().replace(Et,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}function It(e){if(yt(e,Uint8Array)){const t=new Uint8Array(e);return Pt(t.buffer,t.byteOffset,t.byteLength)}return Tt(e)}function Pt(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');let r;return r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(r,ft.prototype),r}function Tt(e){const t=e.length<0?0:0|vt(e.length),n=ht(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function Ot(e,t,n){n=Math.min(e.length,n);const r=[];let o=t;for(;o<n;){const t=e[o];let i=null,a=t>239?4:t>223?3:t>191?2:1;if(o+a<=n){let n,r,s,c;switch(a){case 1:t<128&&(i=t);break;case 2:n=e[o+1],128==(192&n)&&(c=(31&t)<<6|63&n,c>127&&(i=c));break;case 3:n=e[o+1],r=e[o+2],128==(192&n)&&128==(192&r)&&(c=(15&t)<<12|(63&n)<<6|63&r,c>2047&&(c<55296||c>57343)&&(i=c));break;case 4:n=e[o+1],r=e[o+2],s=e[o+3],128==(192&n)&&128==(192&r)&&128==(192&s)&&(c=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&s,c>65535&&c<1114112&&(i=c))}}null===i?(i=65533,a=1):i>65535&&(i-=65536,r.push(i>>>10&1023|55296),i=56320|1023&i),r.push(i),o+=a}return kt(r)}function Rt(e,t,n){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return Mt(this,t,n);case"utf8":case"utf-8":return Ot(this,t,n);case"ascii":return Nt(this,t,n);case"latin1":case"binary":return xt(this,t,n);case"base64":return Dt(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ut(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}ft.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?Ot(this,0,e):Rt.apply(this,arguments)};const Ft=4096;function kt(e){const t=e.length;if(t<=Ft)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=Ft));return n}function Mt(e,t,n){const r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);let o="";for(let r=t;r<n;++r)o+=qt[e[r]];return o}function Nt(e,t,n){let r="";n=Math.min(e.length,n);for(let o=t;o<n;++o)r+=String.fromCharCode(127&e[o]);return r}function xt(e,t,n){let r="";n=Math.min(e.length,n);for(let o=t;o<n;++o)r+=String.fromCharCode(e[o]);return r}function Dt(e,t,n){return 0===t&&n===e.length?ut.fromByteArray(e):ut.fromByteArray(e.slice(t,n))}function Ut(e,t,n){const r=e.slice(t,n);let o="";for(let e=0;e<r.length-1;e+=2)o+=String.fromCharCode(r[e]+256*r[e+1]);return o}function Lt(e,t,n,r){n=Number(n)||0;const o=e.length-n;r?(r=Number(r))>o&&(r=o):r=o;const i=t.length;let a;for(r>i/2&&(r=i/2),a=0;a<r;++a){const r=parseInt(t.substr(2*a,2),16);if($t(r))return a;e[n+a]=r}return a}function Ht(e,t,n,r){return zt(St(t,e.length-n),e,n,r)}function _t(e,t,n,r){return zt(Wt(t),e,n,r)}function Vt(e,t,n,r){return zt(bt(t),e,n,r)}function Bt(e,t,n,r){return zt(jt(t,e.length-n),e,n,r)}function Wt(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}function jt(e,t){let n,r,o;const i=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,o=n%256,i.push(o),i.push(r);return i}function zt(e,t,n,r){let o;for(o=0;o<r&&!(o+n>=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function $t(e){return e!=e}ft.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let i=!1;for(;;)switch(r){case"hex":return Lt(this,e,t,n);case"utf8":case"utf-8":return Ht(this,e,t,n);case"ascii":case"latin1":case"binary":return _t(this,e,t,n);case"base64":return Vt(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Bt(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}};const qt=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let o=0;o<16;++o)t[r+o]=e[n]+e[o]}return t}();function Gt(e){if(ft.isBuffer(e)){const t=0|vt(e.length),n=ht(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||$t(e.length)?ht(0):Tt(e):"Buffer"===e.type&&Array.isArray(e.data)?Tt(e.data):void 0}const Jt={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Kt;const Qt=new Uint8Array(16);function Zt(){if(!Kt&&(Kt="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Kt))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Kt(Qt)}const Xt=[];for(let e=0;e<256;++e)Xt.push((e+256).toString(16).slice(1));function Yt(e,t=0){return Xt[e[t+0]]+Xt[e[t+1]]+Xt[e[t+2]]+Xt[e[t+3]]+"-"+Xt[e[t+4]]+Xt[e[t+5]]+"-"+Xt[e[t+6]]+Xt[e[t+7]]+"-"+Xt[e[t+8]]+Xt[e[t+9]]+"-"+Xt[e[t+10]]+Xt[e[t+11]]+Xt[e[t+12]]+Xt[e[t+13]]+Xt[e[t+14]]+Xt[e[t+15]]}const en=function(e,t,n){if(Jt.randomUUID&&!t&&!e)return Jt.randomUUID();const r=(e=e||{}).random||(e.rng||Zt)();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 Yt(r)},tn=/^(?:[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 nn=function(e){return"string"==typeof e&&tn.test(e)};var rn,on,an,sn,cn,un,ln,dn;!function(e){e.desktop="desktop",e.web="web",e.android="android",e.ios="ios",e.ipados="ipados",e.macos="macos",e.visionOS="visionOS",e.rigel="rigel",e.surfaceHub="surfaceHub",e.teamsRoomsWindows="teamsRoomsWindows",e.teamsRoomsAndroid="teamsRoomsAndroid",e.teamsPhones="teamsPhones",e.teamsDisplays="teamsDisplays"}(rn||(rn={})),function(e){e.office="Office",e.outlook="Outlook",e.outlookWin32="OutlookWin32",e.orange="Orange",e.places="Places",e.teams="Teams",e.teamsModern="TeamsModern"}(on||(on={})),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"}(an||(an={})),function(e){e.copilotSidePanel="copilotSidePanel"}(sn||(sn={})),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"}(cn||(cn={})),function(e){e[e.Admin=0]="Admin",e[e.User=1]="User",e[e.Guest=2]="Guest"}(un||(un={})),function(e){e.Large="large",e.Medium="medium",e.Small="small"}(ln||(ln={})),function(e){e.Regular="Regular",e.Private="Private",e.Shared="Shared"}(dn||(dn={}));const fn={errorCode:Ne.NOT_SUPPORTED_ON_PLATFORM},pn={majorVersion:1,minorVersion:5},gn={adaptiveCardSchemaVersion:{majorVersion:1,minorVersion:5}},mn=new Error("Invalid input count: Must supply a valid image count (limit of 10)."),hn=new Error("Invalid response: Received more images than the specified max limit in the response.");function vn(e){return(t,n)=>{if(!t)throw new Error(e||n)}}function wn(e,t){if("string"!=typeof e||"string"!=typeof t)return NaN;const 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(let e=0;e<n.length;++e)if(Number(n[e])!=Number(r[e]))return Number(n[e])>Number(r[e])?1:-1;return 0}function Cn(){return en()}function yn(e){return Object.keys(e).forEach((t=>{null!==e[t]&&void 0!==e[t]&&"object"==typeof e[t]&&yn(e[t])})),Object.freeze(e)}function Sn(e,t,...n){const r=e(...n);return r.then((e=>{t&&t(void 0,e)})).catch((e=>{t&&t(e)})),r}function bn(e,t,...n){const r=e(...n);return r.then((()=>{t&&t(null)})).catch((e=>{t&&t(e)})),r}function En(e,t,...n){const r=e(...n);return r.then((e=>{t&&t(null,e)})).catch((e=>{t&&t(e,null)})),r}function An(e,t,n){return new Promise(((r,o)=>{const i=setTimeout(o,t,n);e().then((e=>{clearTimeout(i),r(e)})).catch((e=>{clearTimeout(i),o(e)}))}))}function In(e){const t=new URL("https://teams.microsoft.com/l/entity/"+encodeURIComponent(e.appId.toString())+"/"+encodeURIComponent(e.pageId));return e.webUrl&&t.searchParams.append("webUrl",e.webUrl.toString()),(e.chatId||e.channelId||e.subPageId)&&t.searchParams.append("context",JSON.stringify({chatId:e.chatId,channelId:e.channelId,subEntityId:e.subPageId})),t.toString()}function Pn(e){return!(wn(`${e.majorVersion}.${e.minorVersion}`,`${pn.majorVersion}.${pn.minorVersion}`)>=0)}function Tn(e){return"https:"===e.protocol}function On(e,t){return new Promise(((n,r)=>{if(e||r("MimeType cannot be null or empty."),t||r("Base64 string cannot be null or empty."),e.startsWith("image/")){const r=atob(t),o=new Uint8Array(r.length);for(let e=0;e<r.length;e++)o[e]=r.charCodeAt(e);n(new Blob([o],{type:e}))}const o=lt.from(t,"base64").toString();n(new Blob([o],{type:e}))}))}function Rn(e){return new Promise(((t,n)=>{0===e.size&&n(new Error("Blob cannot be empty."));const r=new FileReader;r.onloadend=()=>{r.result?t(r.result.toString().split(",")[1]):n(new Error("Failed to read the blob"))},r.onerror=()=>{n(r.error)},r.readAsDataURL(e)}))}function Fn(){if(kn())throw new Error("window object undefined at SSR check");return window}function kn(){return"undefined"==typeof window}function Mn(e,t){if(Dn(e)||!Un(e)||!Ln(e))throw t||new Error("id is not valid.")}function Nn(e,t){const n=e.toString().toLocaleLowerCase();if(Dn(n))throw t||new Error("Invalid Url");if(n.length>2048)throw t||new Error("Url exceeds the maximum size of 2048 characters");if(!Tn(e))throw t||new Error("Url should be a valid https url")}function xn(e){const t=document.createElement("a");return t.href=e,new URL(t.href)}function Dn(e){return new RegExp(`${/<script[^>]*>|<script[^&]*>|%3Cscript[^%]*%3E/gi.source}|${/<\/script[^>]*>|<\/script[^&]*>|%3C\/script[^%]*%3E/gi.source}`,"gi").test(e)}function Un(e){return e.length<256&&e.length>4}function Ln(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n<32||n>126)return!1}return!0}function Hn(e){if(!e)throw new Error("id must not be empty");if(!1===nn(e))throw new Error("id must be a valid UUID")}const _n=!!performance&&"now"in performance;function Vn(){return _n?performance.now()+performance.timeOrigin:void 0}function Bn(e,t=0){if(t>1e3)return!1;if(void 0===e||"boolean"==typeof e||"number"==typeof e||"bigint"==typeof e||"string"==typeof e||null===e)return!0;if(Array.isArray(e))return e.every((e=>Bn(e,t+1)));return!("object"!=typeof e||"[object Object]"!==Object.prototype.toString.call(e)||Object.getPrototypeOf(e)!==Object.prototype&&null!==Object.getPrototypeOf(e))&&Object.keys(e).every((n=>Bn(e[n],t+1)))}class Wn{constructor(e=Cn()){this.uuid=e,Hn(e)}toString(){return this.uuid}serialize(){return this.toString()}}function jn(e){if(!(e instanceof Wn))throw new Error(`Potential id (${JSON.stringify(e)}) is invalid; it is not an instance of UUID class.`)}class zn{}zn.initializeCalled=!1,zn.initializeCompleted=!1,zn.additionalValidOrigins=[],zn.initializePromise=void 0,zn.isFramelessWindow=!1,zn.frameContext=void 0,zn.hostClientType=void 0,zn.printCapabilityEnabled=!1,zn.teamsJsInstanceId=(new Wn).toString();var $n=n(815);const qn=new Wn,Gn=$n.debug.formatArgs;$n.debug.formatArgs=function(e){e[0]=`(${(new Date).toISOString()}): ${e[0]} [${qn.toString()}]`,Gn.call(this,e)};const Jn=(0,$n.debug)("teamsJs");function Kn(e){return Jn.extend(e)}function Qn(e,t){return`${e}_${t}`}function Zn(e){return/^v\d+_[\w.]+$/.test(e)}var Xn=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};const Yn=Kn("runtime"),er=4;function tr(e){return e.apiVersion===er}const nr={apiVersion:-1,supports:{}};function rr(e){if(tr(e))return!0;throw-1===e.apiVersion?new Error(at):new Error(st)}let or=nr;const ir={apiVersion:4,isNAAChannelRecommended:!1,isDeeplyNestedAuthSupported:!1,hostVersionsInfo:gn,isLegacyTeams:!0,supports:{appInstallDialog:{},appEntity:{},call:{},chat:{},conversations:{},dialog:{card:{bot:{}},url:{bot:{},parentCommunication:{}},update:{}},interactive:{},logs:{},meetingRoom:{},menus:{},monetization:{},notifications:{},pages:{config:{},backStack:{},fullTrust:{}},remoteCamera:{},teams:{fullTrust:{}},teamsCore:{},video:{sharedFrame:{}}}},ar=[rn.desktop,rn.web,rn.rigel,rn.surfaceHub,rn.teamsRoomsWindows,rn.teamsRoomsAndroid,rn.teamsPhones,rn.teamsDisplays],sr=[rn.android,rn.ios,rn.ipados,rn.visionOS],cr=[...ar,...sr];function ur(e){let t=e;if(t.apiVersion<er&&lr.forEach((e=>{t.apiVersion===e.versionToUpgradeFrom&&(t=e.upgradeToNextVersion(t))})),tr(t))return t;throw new Error("Received a runtime that could not be upgraded to the latest version")}const lr=[{versionToUpgradeFrom:1,upgradeToNextVersion:e=>{var t;return{apiVersion:2,hostVersionsInfo:void 0,isLegacyTeams:e.isLegacyTeams,supports:Object.assign(Object.assign({},e.supports),{dialog:e.supports.dialog?{card:void 0,url:e.supports.dialog,update:null===(t=e.supports.dialog)||void 0===t?void 0:t.update}:void 0})}}},{versionToUpgradeFrom:2,upgradeToNextVersion:e=>{const t=e.supports,{appNotification:n}=t,r=Xn(t,["appNotification"]);return Object.assign(Object.assign({},e),{apiVersion:3,supports:r})}},{versionToUpgradeFrom:3,upgradeToNextVersion:e=>{var t,n,r,o,i;return{apiVersion:4,hostVersionsInfo:e.hostVersionsInfo,isNAAChannelRecommended:e.isNAAChannelRecommended,isLegacyTeams:e.isLegacyTeams,supports:Object.assign(Object.assign({},e.supports),{dialog:e.supports.dialog?{card:null===(t=e.supports.dialog)||void 0===t?void 0:t.card,url:{bot:null===(r=null===(n=e.supports.dialog)||void 0===n?void 0:n.url)||void 0===r?void 0:r.bot,parentCommunication:(null===(o=e.supports.dialog)||void 0===o?void 0:o.url)?{}:void 0},update:null===(i=e.supports.dialog)||void 0===i?void 0:i.update}:void 0})}}}],dr="2.1.2",fr={"1.0.0":[{capability:{pages:{appButton:{},tabs:{}},stageView:{}},hostClientTypes:ar}],"1.9.0":[{capability:{location:{}},hostClientTypes:cr}],"2.0.0":[{capability:{people:{}},hostClientTypes:cr},{capability:{sharing:{}},hostClientTypes:[rn.desktop,rn.web]}],"2.0.1":[{capability:{teams:{fullTrust:{joinedTeams:{}}}},hostClientTypes:[rn.android,rn.desktop,rn.ios,rn.teamsRoomsAndroid,rn.teamsPhones,rn.teamsDisplays,rn.web]},{capability:{webStorage:{}},hostClientTypes:[rn.desktop]}],"2.0.5":[{capability:{webStorage:{}},hostClientTypes:[rn.android,rn.ios]}],"2.0.8":[{capability:{sharing:{}},hostClientTypes:[rn.android,rn.ios]}],"2.1.1":[{capability:{nestedAppAuth:{}},hostClientTypes:[rn.android,rn.ios,rn.ipados,rn.visionOS]}],"2.1.2":[]},pr=Yn.extend("generateBackCompatRuntimeConfig");function gr(e,t){const n=Object.assign({},e);for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&("object"!=typeof t[r]||Array.isArray(t[r])?r in e||(n[r]=t[r]):n[r]=gr(e[r]||{},t[r]));return n}function mr(e,t,n){pr("generating back compat runtime config for %s",e);let r=Object.assign({},t.supports);pr("Supported capabilities in config before updating based on highestSupportedVersion: %o",r),Object.keys(n).forEach((t=>{wn(e,t)>=0&&n[t].forEach((e=>{void 0!==zn.hostClientType&&e.hostClientTypes.includes(zn.hostClientType)&&(r=gr(r,e.capability))}))}));const o={apiVersion:er,hostVersionsInfo:gn,isLegacyTeams:!0,supports:r};return pr("Runtime config after updating based on highestSupportedVersion: %o",o),o}const hr=Yn.extend("applyRuntimeConfig");function vr(e){"string"==typeof e.apiVersion&&(hr("Trying to apply runtime with string apiVersion, processing as v1: %o",e),e=Object.assign(Object.assign({},e),{apiVersion:1})),hr("Fast-forwarding runtime %o",e);const t=ur(e);hr("Applying runtime %o",t),or=yn(t)}function wr(e){return null!=e&&void 0!==e.serialize&&"function"==typeof e.serialize}const Cr="2.39.1",yr={childProxyingCommunication:!1};function Sr(){yr.childProxyingCommunication=!0}function br(){return yr.childProxyingCommunication}let Er={disableEnforceOriginMatchForChildResponses:!1};function Ar(){return Er}function Ir(e){Er=e}function Pr(e){return Ir(Object.assign(Object.assign({},Er),e)),Ar()}var Tr=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};const Or=e=>{const{uuid:t}=e,n=Tr(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})},Rr=e=>{const{uuidAsString:t}=e,n=Tr(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new Wn(t):void 0})},Fr=e=>{const{uuidAsString:t}=e,n=Tr(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new Wn(t):void 0})},kr=e=>{const{uuid:t}=e,n=Tr(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})};function Mr(e){return void 0!==e.uuidAsString?`${e.uuidAsString} (legacy id: ${e.id})`:void 0!==e.uuid?`${e.uuid.toString()} (legacy id: ${e.id})`:`legacy id: ${e.id} (no uuid)`}const Nr=Kn("flushMessageQueue");function xr(e,t,n,r){if(e&&t&&0!==n.length)for(;n.length>0;){const o=n.shift();if(o){const n=Or(o);Nr("Flushing message %s from %s message queue via postMessage.",Mr(n),r),e.postMessage(n,t)}}}const Dr=Kn("internal"),Ur=Dr.extend("ensureInitializeCalled"),Lr=Dr.extend("ensureInitialized");function Hr(){if(!zn.initializeCalled)throw Ur(it),new Error(it)}function _r(e,...t){if(!zn.initializeCompleted)throw Lr("%s. initializeCalled: %s",it,zn.initializeCalled.toString()),new Error(it);if(t&&t.length>0){let e=!1;for(let n=0;n<t.length;n++)if(t[n]===zn.frameContext){e=!0;break}if(!e)throw new Error(`This call is only allowed in following contexts: ${JSON.stringify(t)}. Current context: "${zn.frameContext}".`)}return rr(e)}function Vr(e=je){const t=wn(zn.clientSupportedSDKVersion,e);return!isNaN(t)&&t>=0}function Br(){return zn.hostClientType==rn.android||zn.hostClientType==rn.ios||zn.hostClientType==rn.ipados||zn.hostClientType==rn.visionOS}function Wr(e=je){if(!Br()){throw{errorCode:Ne.NOT_SUPPORTED_ON_PLATFORM}}if(!Vr(e)){throw{errorCode:Ne.OLD_PLATFORM}}}function jr(e){let t=zn.additionalValidOrigins.concat(e.filter((e=>"string"==typeof e&&nt.test(e))));const n={};t=t.filter((e=>!n[e]&&(n[e]=!0,!0))),zn.additionalValidOrigins=t}function zr(e){if(!Jr(e))throw new Error(`Potential app id (${e}) is invalid; its length ${e.length} is not within the length limits (${qr}-${Gr}).`)}function $r(e){if(Dn(e))throw new Error(`Potential app id (${e}) is invalid; it contains script tags.`);if(Kr(e))throw new Error(`Potential app id (${e}) is invalid; it contains non-printable characters.`)}const qr=4,Gr=256;function Jr(e){return e.length<Gr&&e.length>qr}function Kr(e){return[...e].some((e=>{const t=e.charCodeAt(0);return t<32||t>126}))}function Qr(e){if(!(e instanceof Xr))throw new Error(`Potential app id (${e}) is invalid; it is not an instance of AppId class.`)}class Zr{constructor(e){this.idAsString=e,$r(e)}serialize(){return this.toString()}toString(){return this.idAsString}}class Xr extends Zr{constructor(e){super(e),zr(e)}toJSON(){return{appIdAsString:this.toString()}}}function Yr(e){return null==e}var eo=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())}))};let to;const no="v1",ro=Kn("messageChannels.telemetry");function oo(){return eo(this,void 0,void 0,(function*(){if(to)return ro("Returning telemetry port from cache"),to;if(!io())throw fn;return to=yield pc(Qn(no,"messageChannels.telemetry.getTelemetryPort"),"messageChannels.telemetry.getTelemetryPort"),to}))}function io(){var e;return!(!_r(or)||!(null===(e=or.supports.messageChannels)||void 0===e?void 0:e.telemetry))}function ao(){to=void 0}var so=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())}))};let co;const uo="v1",lo=Kn("messageChannels.dataLayer");function fo(){return so(this,void 0,void 0,(function*(){if(co)return lo("Returning dataLayer port from cache"),co;if(!po())throw fn;return co=yield pc(Qn(uo,"messageChannels.dataLayer.getDataLayerPort"),"messageChannels.dataLayer.getDataLayerPort"),co}))}function po(){var e;return!(!_r(or)||!(null===(e=or.supports.messageChannels)||void 0===e?void 0:e.dataLayer))}function go(){co=void 0}function mo(e){if(!e)throw new Error("[app.lifecycle.registerBeforeSuspendOrTerminateHandler] Handler cannot be null");_r(or),Fs(e)}function ho(e){if(!e)throw new Error("[app.lifecycle.registerOnResumeHandler] Handler cannot be null");_r(or),ks(e)}const vo="v2",wo=Kn("app"),Co={AppLoaded:"appInitialization.appLoaded",Success:"appInitialization.success",Failure:"appInitialization.failure",ExpectedFailure:"appInitialization.expectedFailure"};var yo,So;function bo(){return zn.initializeCompleted}function Eo(){return zn.frameContext}function Ao(e){return qi(Qn(vo,"app.initialize"),e)}function Io(e){tc.currentWindow=e}function Po(){zn.initializeCalled&&(gs(),zn.initializeCalled=!1,zn.initializeCompleted=!1,zn.initializePromise=void 0,zn.additionalValidOrigins=[],zn.frameContext=void 0,zn.hostClientType=void 0,zn.isFramelessWindow=!1,ao(),go(),oc())}function To(){return new Promise((e=>{Hr(),e(ic(Qn(vo,"app.getContext"),"getContext"))})).then((e=>Do(e)))}function Oo(){Hr(),Gi(Qn(vo,"app.notifyAppLoaded"))}function Ro(){return Qi(Qn(vo,"app.notifySuccess"))}function Fo(e){Hr(),Ki(Qn(vo,"app.notifyFailure"),e)}function ko(e){Hr(),Ji(Qn(vo,"app.notifyExpectedFailure"),e)}function Mo(e){ta(Qn(vo,"app.registerOnThemeChangeHandler"),e)}function No(e){Es(e)}function xo(e){return na(Qn(vo,"app.openLink"),e)}function Do(e){var t;return{actionInfo:e.actionInfo,app:{locale:e.locale,sessionId:e.appSessionId?e.appSessionId:"",theme:e.theme?e.theme:"default",iconPositionVertical:e.appIconPosition,osLocaleInfo:e.osLocaleInfo,parentMessageId:e.parentMessageId,userClickTime:e.userClickTime,userClickTimeV2:e.userClickTimeV2,userFileOpenPreference:e.userFileOpenPreference,host:{name:e.hostName?e.hostName:on.teams,clientType:e.hostClientType?e.hostClientType:rn.web,sessionId:e.sessionId?e.sessionId:"",ringId:e.ringId},appLaunchId:e.appLaunchId,appId:e.appId?new Xr(e.appId):void 0,manifestVersion:e.manifestVersion},page:{id:e.entityId,frameContext:e.frameContext?e.frameContext:zn.frameContext,renderingSurface:e.renderingSurface?e.renderingSurface:void 0,subPageId:e.subEntityId,isFullScreen:e.isFullScreen,isMultiWindow:e.isMultiWindow,isBackgroundLoad:e.isBackgroundLoad,sourceOrigin:e.sourceOrigin},user:{id:null!==(t=e.userObjectId)&&void 0!==t?t:"",displayName:e.userDisplayName,isCallingAllowed:e.isCallingAllowed,isPSTNCallingAllowed:e.isPSTNCallingAllowed,licenseType:e.userLicenseType,loginHint:e.loginHint,userPrincipalName:e.userPrincipalName,tenant:e.tid?{id:e.tid,teamsSku:e.tenantSKU}:void 0},channel:e.channelId?{id:e.channelId,displayName:e.channelName,relativeUrl:e.channelRelativeUrl,membershipType:e.channelType,defaultOneNoteSectionId:e.defaultOneNoteSectionId,ownerGroupId:e.hostTeamGroupId,ownerTenantId:e.hostTeamTenantId}:void 0,chat:e.chatId?{id:e.chatId}:void 0,meeting:e.meetingId?{id:e.meetingId}:void 0,sharepoint:e.sharepoint,team:e.teamId?{internalId:e.teamId,displayName:e.teamName,type:e.teamType,groupId:e.groupId,templateId:e.teamTemplateId,isArchived:e.isTeamArchived,userRole:e.userTeamRole}:void 0,sharePointSite:e.teamSiteUrl||e.teamSiteDomain||e.teamSitePath||e.mySitePath||e.mySiteDomain?{teamSiteUrl:e.teamSiteUrl,teamSiteDomain:e.teamSiteDomain,teamSitePath:e.teamSitePath,teamSiteId:e.teamSiteId,mySitePath:e.mySitePath,mySiteDomain:e.mySiteDomain}:void 0,dialogParameters:e.dialogParameters||{}}}function Uo(e){Zo(Qn(Ko,"dialog.update.resize"),e)}function Lo(){return!(!_r(or)||!or.supports.dialog)&&!!or.supports.dialog.update}function Ho(e,t,n){Yo(Qn(Ko,"dialog.url.bot.open"),e,t,n)}function _o(){return _r(or)&&void 0!==(or.supports.dialog&&or.supports.dialog.url&&or.supports.dialog.url.bot)}function Vo(e){if(_r(or,an.task),!jo())throw fn;hc(Qn(Ko,"dialog.url.parentCommunication.sendMessageToParentFromDialog"),"messageForParent",[e])}function Bo(e){if(_r(or,an.content,an.sidePanel,an.meetingStage),!jo())throw fn;hc(Qn(Ko,"dialog.url.parentCommunication.sendMessageToDialog"),"messageForChild",[e])}function Wo(e){if(_r(or,an.task),!jo())throw fn;for(ws("messageForChild"),vs(Qn(Ko,"dialog.url.parentCommunication.registerMessageForChildHandler"),"messageForChild",e),ri.reverse();ri.length>0;){e(ri.pop())}}function jo(){var e,t;return _r(or)&&!!(null===(t=null===(e=or.supports.dialog)||void 0===e?void 0:e.url)||void 0===t?void 0:t.parentCommunication)}function zo(e,t,n){Xo(Qn(Ko,"dialog.url.open"),e,t,n)}function $o(e,t){ei(Qn(Ko,"dialog.url.submit"),e,t)}function qo(){return _r(or)&&void 0!==(or.supports.dialog&&or.supports.dialog.url)}function Go(e){return{url:e.url,height:e.size?e.size.height:ln.Small,width:e.size?e.size.width:ln.Small,title:e.title,fallbackUrl:e.fallbackUrl}}function Jo(e){const t=Go(e);return t.completionBotId=e.completionBotId,t}!function(e){e.AuthFailed="AuthFailed",e.Timeout="Timeout",e.Other="Other"}(yo||(yo={})),function(e){e.PermissionError="PermissionError",e.NotFound="NotFound",e.Throttling="Throttling",e.Offline="Offline",e.Other="Other"}(So||(So={})),wo("teamsjs instance is version %s, starting at %s UTC (%s local)",Cr,(new Date).toISOString(),(new Date).toLocaleString()),function(){if(kn())return;const e=document.getElementsByTagName("script"),t=e&&e[e.length-1]&&e[e.length-1].src,n="Today, teamsjs can only be used from a single script or you may see undefined behavior. This log line is used to help detect cases where teamsjs is loaded multiple times -- it is always written. The presence of the log itself does not indicate a multi-load situation, but multiples of these log lines will. If you would like to use teamjs from more than one script at the same time, please open an issue at https://github.com/OfficeDev/microsoft-teams-library-js/issues";t&&0!==t.length?wo("teamsjs is being used from %s. %s",t,n):wo("teamsjs is being used from a script tag embedded directly in your html. %s",n)}();const Ko="v2",Qo="dialog.submit should not be called from FrameContext.content.\nIf dialog.submit was called from inside the dialog, please disregard this message.\nThis issue occurs due to a bug in Teams mobile where the dialog is incorrectly identified as being in the content FrameContext.\nWe are working to resolve this.";function Zo(e,t){if(_r(or,an.content,an.sidePanel,an.task,an.meetingStage),!Lo())throw fn;hc(e,"tasks.updateTask",[t])}function Xo(e,t,n,r){if(_r(or,an.content,an.sidePanel,an.meetingStage),!qo())throw fn;r&&vs(Qn(Ko,"dialog.url.registerMessageForParentHandler"),"messageForParent",r);hc(e,"tasks.startTask",[Go(t)],((e,t)=>{null==n||n({err:e,result:t}),ws("messageForParent")}))}function Yo(e,t,n,r){if(_r(or,an.content,an.sidePanel,an.meetingStage),!_o())throw fn;r&&vs(Qn(Ko,"dialog.url.bot.registerMessageForParentHandler"),"messageForParent",r);hc(e,"tasks.startTask",[Jo(t)],((e,t)=>{null==n||n({err:e,result:t}),ws("messageForParent")}))}function ei(e,t,n){if(_r(or,an.content,an.task),!qo())throw fn;zn.frameContext===an.content&&console.warn(Qo),hc(e,"tasks.completeTask",[t,n?Array.isArray(n)?n:[n]:[]])}function ti(e){return{card:e.card,height:e.size?e.size.height:ln.Small,width:e.size?e.size.width:ln.Small,title:e.title}}function ni(e){const t=ti(e);return t.completionBotId=e.completionBotId,t}const ri=[];function oi(e){zn.frameContext&&(zn.frameContext===an.task?ri.push(e):ws("messageForChild"))}function ii(e,t){if(_r(or,an.content,an.sidePanel,an.meetingStage),!ai())throw fn;const n=ni(e);hc(Qn(Ko,"dialog.adaptiveCard.bot.open"),"tasks.startTask",[n],((e,n)=>{null==t||t({err:e,result:n})}))}function ai(){const e=or.hostVersionsInfo&&or.hostVersionsInfo.adaptiveCardSchemaVersion&&!Pn(or.hostVersionsInfo.adaptiveCardSchemaVersion);return _r(or)&&void 0!==(e&&or.supports.dialog&&or.supports.dialog.card&&or.supports.dialog.card.bot)}function si(e,t){if(_r(or,an.content,an.sidePanel,an.meetingStage),!ci())throw fn;const n=ti(e);hc(Qn(Ko,"dialog.adaptiveCard.open"),"tasks.startTask",[n],((e,n)=>{null==t||t({err:e,result:n})}))}function ci(){const e=or.hostVersionsInfo&&or.hostVersionsInfo.adaptiveCardSchemaVersion&&!Pn(or.hostVersionsInfo.adaptiveCardSchemaVersion);return _r(or)&&void 0!==(e&&or.supports.dialog&&or.supports.dialog.card)}function ui(){vs(Qn(Ko,"dialog.registerMessageForChildHandler"),"messageForChild",oi,!1)}function li(){return!(!_r(or)||!or.supports.dialog)}const di="v2";var fi,pi;!function(e){e[e.ifRoom=0]="ifRoom",e[e.overflowOnly=1]="overflowOnly"}(fi||(fi={}));class gi{constructor(){this.enabled=!0,this.selected=!1}}let mi,hi,vi,wi,Ci;function yi(){vs(Qn(di,"menus.registerNavBarMenuItemPressHandler"),"navBarMenuItemPress",Ai,!1),vs(Qn(di,"menus.registerActionMenuItemPressHandler"),"actionMenuItemPress",Pi,!1),vs(Qn(di,"menus.registerSetModuleViewHandler"),"setModuleView",bi,!1)}function Si(e,t){if(_r(or),!Ti())throw fn;vi=t,hc(Qn(di,"menus.setUpViews"),"setUpViews",[e])}function bi(e){vi&&vi(e)||(_r(or),hc(Qn(di,"menus.handleViewConfigItemPress"),"viewConfigItemPress",[e]))}function Ei(e,t){if(_r(or),!Ti())throw fn;mi=t,hc(Qn(di,"menus.setNavBarMenu"),"setNavBarMenu",[e])}function Ai(e){mi&&mi(e)||(_r(or),hc(Qn(di,"menus.handleNavBarMenuItemPress"),"handleNavBarMenuItemPress",[e]))}function Ii(e,t){if(_r(or),!Ti())throw fn;hi=t,hc(Qn(di,"menus.showActionMenu"),"showActionMenu",[e])}function Pi(e){hi&&hi(e)||(_r(or),hc(Qn(di,"menus.handleActionMenuItemPress"),"handleActionMenuItemPress",[e]))}function Ti(){return!(!_r(or)||!or.supports.menus)}function Oi(){vs(Qn($a,"pages.config.registerSettingsSaveHandler"),"settings.save",Di,!1),vs(Qn($a,"pages.config.registerSettingsRemoveHandler"),"settings.remove",Hi,!1)}function Ri(e){return es(Qn($a,"pages.config.setValidityState"),e)}function Fi(e){return ns(Qn($a,"pages.config.setConfig"),e)}function ki(e){Mi(Qn($a,"pages.config.registerOnSaveHandler"),e,(()=>{if(!Yr(e)&&!Vi())throw fn}))}function Mi(e,t,n){!Yr(t)&&_r(or,an.settings),n&&n(),wi=t,!Yr(t)&&hc(e,"registerHandler",["save"])}function Ni(e){xi(Qn($a,"pages.config.registerOnRemoveHandler"),e,(()=>{if(!Yr(e)&&!Vi())throw fn}))}function xi(e,t,n){!Yr(t)&&_r(or,an.remove,an.settings),n&&n(),Ci=t,!Yr(t)&&hc(e,"registerHandler",["remove"])}function Di(e){const t=new Li(e);wi?wi(t):Us()?js("settings.save",[e]):t.notifySuccess()}function Ui(e){ys(Qn($a,"pages.config.registerChangeConfigHandler"),"changeSettings",e,[an.content],(()=>{if(!Vi())throw fn}))}!function(e){e.dropDown="dropDown",e.popOver="popOver"}(pi||(pi={}));class Li{constructor(e){this.notified=!1,this.result=e||{}}notifySuccess(){this.ensureNotNotified(),hc(Qn($a,"pages.saveEvent.notifySuccess"),"settings.save.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),hc(Qn($a,"pages.saveEvent.notifyFailure"),"settings.save.failure",[e]),this.notified=!0}ensureNotNotified(){if(this.notified)throw new Error("The SaveEvent may only notify success or failure once.")}}function Hi(){const e=new _i;Ci?Ci(e):Us()?js("settings.remove",[]):e.notifySuccess()}class _i{constructor(){this.notified=!1}notifySuccess(){this.ensureNotNotified(),hc(Qn($a,"pages.removeEvent.notifySuccess"),"settings.remove.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),hc(Qn($a,"pages.removeEvent.notifyFailure"),"settings.remove.failure",[e]),this.notified=!0}ensureNotNotified(){if(this.notified)throw new Error("The removeEventType may only notify success or failure once.")}}function Vi(){return!(!_r(or)||!or.supports.pages)&&!!or.supports.pages.config}class Bi{}class Wi extends Bi{validate(e){return!0}deserialize(e){return e}}var ji=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())}))};const zi=6e4,$i=Kn("app");function qi(e,t){if(kn()){return $i.extend("initialize")("window object undefined at initialization"),Promise.resolve()}return An((()=>ea(e,t)),zi,new Error("SDK initialization timed out."))}function Gi(e){hc(e,Co.AppLoaded,[Cr])}function Ji(e,t){hc(e,Co.ExpectedFailure,[t.reason,t.message])}function Ki(e,t){hc(e,Co.Failure,[t.reason,t.message])}function Qi(e){return ji(this,void 0,void 0,(function*(){if(zn.initializeCompleted)return Xi(e);if(!zn.initializePromise)throw new Error(it);return zn.initializePromise.then((()=>Xi(e)))}))}function Zi(){var e;return _r(or)&&!!(null===(e=or.supports.app)||void 0===e?void 0:e.notifySuccessResponse)}function Xi(e){return ji(this,void 0,void 0,(function*(){return Zi()?dc(Co.Success,[Cr],new Wi,e).then((()=>({hasFinishedSuccessfully:!0}))):(hc(e,Co.Success,[Cr]),{hasFinishedSuccessfully:"unknown"})}))}const Yi=$i.extend("initializeHelper");function ea(e,t){return new Promise((n=>{zn.initializeCalled||(zn.initializeCalled=!0,ps(),zn.initializePromise=rc(t,e).then((({context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r=je})=>{zn.frameContext=e,zn.hostClientType=t,zn.clientSupportedSDKVersion=r;try{Yi("Parsing %s",n);const e=JSON.parse(n);if(Yi("Checking if %o is a valid runtime object",null!=e?e:"null"),!e||!e.apiVersion)throw new Error("Received runtime config is invalid");n&&vr(e)}catch(e){if(!(e instanceof SyntaxError))throw e;try{Yi("Attempting to parse %s as an SDK version",n),isNaN(wn(n,je))||(zn.clientSupportedSDKVersion=n);const e=JSON.parse(r);if(Yi("givenRuntimeConfig parsed to %o",null!=e?e:"null"),!e)throw new Error("givenRuntimeConfig string was successfully parsed. However, it parsed to value of null");vr(e)}catch(e){if(!(e instanceof SyntaxError))throw e;vr(mr(zn.clientSupportedSDKVersion,ir,fr))}}zn.initializeCompleted=!0})),yi(),Oi(),ui()),Array.isArray(t)&&jr(t),void 0!==zn.initializePromise?n(zn.initializePromise):Yi("GlobalVars.initializePromise is unexpectedly undefined")}))}function ta(e,t){!Yr(t)&&Hr(),Ss(e,t)}function na(e,t){return new Promise((n=>{_r(or,an.content,an.sidePanel,an.settings,an.task,an.stage,an.meetingStage),n(ac(e,"executeDeepLink",t))}))}var ra=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())}))};let oa=[];const ia=Kn("validateOrigin");let aa;function sa(){return ra(this,void 0,void 0,(function*(){aa||(yield ua())}))}function ca(){return 0===oa.length}function ua(e=!1){return ra(this,void 0,void 0,(function*(){if(!ca()&&!e)return oa;if(aa)return aa;if(kn())return oa=Ye,Ye;{ia("Initiating fetch call to acquire valid origins list from CDN");const e=new AbortController,t=setTimeout((()=>e.abort()),et);return aa=fetch(tt,{signal:e.signal}).then((e=>{if(clearTimeout(t),!e.ok)throw new Error("Invalid Response from Fetch Call");return ia("Fetch call completed and retrieved valid origins list from CDN"),e.json().then((e=>{if(la(JSON.stringify(e)))return oa=e.validOrigins,oa;throw new Error("Valid origins list retrieved from CDN is invalid")}))})).catch((e=>("AbortError"===e.name?ia(`validOrigins fetch call to CDN failed due to Timeout of ${et} ms. Defaulting to fallback list`):ia("validOrigins fetch call to CDN failed with error: %s. Defaulting to fallback list",e),oa=Ye,oa))),aa}}))}function la(e){let t=JSON.parse(e);try{t=JSON.parse(e)}catch(e){return!1}if(!t.validOrigins)return!1;for(const e of t.validOrigins)try{new URL("https://"+e)}catch(t){return ia("isValidOriginsFromCDN call failed to validate origin: %s",e),!1}return!0}function da(e,t){if("*."===e.substring(0,2)){const n=e.substring(1);if(t.length>n.length&&t.split(".").length===n.split(".").length&&t.substring(t.length-n.length)===n)return!0}else if(e===t)return!0;return!1}function fa(e,t){const n=t||ca()?Ye:oa;return pa(e,n)?Promise.resolve(!0):(ia("Origin %s is not in the local valid origins list, fetching from CDN",e),ua(t).then((t=>pa(e,t))))}function pa(e,t){if(!Tn(e))return ia("Origin %s is invalid because it is not using https protocol. Protocol being used: %s",e,e.protocol),!1;const n=e.host;if(t.some((e=>da(e,n))))return!0;for(const e of zn.additionalValidOrigins){if(da("https://"===e.substring(0,8)?e.substring(8):e,n))return!0}return ia("Origin %s is invalid because it is not an origin approved by this library or included in the call to app.initialize.\nOrigins approved by this library: %o\nOrigins included in app.initialize: %o",e,t,zn.additionalValidOrigins),!1}function ga(e){ys(Qn($a,"pages.appButton.onClick"),"appButtonClick",e,[an.content],(()=>{if(!va())throw fn}))}function ma(e){ys(Qn($a,"pages.appButton.onHoverEnter"),"appButtonHoverEnter",e,[an.content],(()=>{if(!va())throw fn}))}function ha(e){ys(Qn($a,"pages.appButton.onHoverLeave"),"appButtonHoverLeave",e,[an.content],(()=>{if(!va())throw fn}))}function va(){return!(!_r(or)||!or.supports.pages)&&!!or.supports.pages.appButton}function wa(){cs()}function Ca(){return Ga(Qn($a,"pages.backStack.navigateBack"))}function ya(e){Sa(Qn($a,"pages.backStack.registerBackButtonHandler"),e,(()=>{if(!Yr(e)&&!ba())throw fn}))}function Sa(e,t,n){!Yr(t)&&_r(or),n&&n(),ss(t),!Yr(t)&&hc(e,"registerHandler",["backButton"])}function ba(){return!(!_r(or)||!or.supports.pages)&&!!or.supports.pages.backStack}function Ea(e){return new Promise((t=>{if(_r(or,an.content,an.sidePanel,an.settings,an.task,an.stage,an.meetingStage),!Ia())throw fn;t(cc(Qn($a,"pages.currentApp.navigateTo"),"pages.currentApp.navigateTo",e))}))}function Aa(){return new Promise((e=>{if(_r(or,an.content,an.sidePanel,an.settings,an.task,an.stage,an.meetingStage),!Ia())throw fn;e(cc(Qn($a,"pages.currentApp.navigateToDefaultPage"),"pages.currentApp.navigateToDefaultPage"))}))}function Ia(){return!(!_r(or)||!or.supports.pages)&&!!or.supports.pages.currentApp}function Pa(){if(_r(or,an.content),!Oa())throw fn;hc(Qn($a,"pages.fullTrust.enterFullscreen"),"enterFullscreen",[])}function Ta(){if(_r(or,an.content),!Oa())throw fn;hc(Qn($a,"pages.fullTrust.exitFullscreen"),"exitFullscreen",[])}function Oa(){return!(!_r(or)||!or.supports.pages)&&!!or.supports.pages.fullTrust}function Ra(e){return Ja(Qn($a,"pages.tabs.navigateToTab"),e)}function Fa(e){return Qa(Qn($a,"pages.tabs.getTabInstances"),e)}function ka(e){return Za(Qn($a,"pages.tabs.getMruTabInstances"),e)}function Ma(){return!(!_r(or)||!or.supports.pages)&&!!or.supports.pages.tabs}var Na,xa;function Da(e){const t=Qn($a,"pages.returnFocus");if(_r(or),!za())throw fn;if(void 0===e&&hc(t,"returnFocus",[!1]),"boolean"==typeof e)hc(t,"returnFocus",[e]);else switch(e){case xa.PreviousLandmark:case xa.GoToActivityFeed:hc(t,"returnFocus",[!1,e]);break;case xa.NextLandmark:hc(t,"returnFocus",[!0,e])}}function Ua(e){ys(Qn($a,"pages.registerFocusEnterHandler"),"focusEnter",e,[],(()=>{if(!za())throw fn}))}function La(e){Ya(Qn($a,"pages.setCurrentFrame"),e)}function Ha(e,t,n){sa(),qi(Qn($a,"pages.initializeWithFrameContext"),n).then((()=>t&&t())),La(e)}function _a(){return ts(Qn($a,"pages.getConfig."))}function Va(e){return qa(Qn($a,"pages.navigateCrossDomain"),e)}function Ba(e){return new Promise((t=>{if(_r(or,an.content,an.sidePanel,an.settings,an.task,an.stage,an.meetingStage),!za())throw fn;const n=Qn($a,"pages.navigateToApp");if(or.isLegacyTeams){t(ac(n,"executeDeepLink",In(rs(e)?e:os(e))))}else{t(ac(n,"pages.navigateToApp",rs(e)?is(e):e))}}))}function Wa(e){return Xa(Qn($a,"pages.shareDeepLink"),e)}function ja(e){ys(Qn($a,"pages.registerFullScreenHandler"),"fullScreenChange",e,[],(()=>{if(!Yr(e)&&!za())throw fn}))}function za(){return!(!_r(or)||!or.supports.pages)}sa(),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.Read=2]="Read",e[e.Compose=3]="Compose"}(Na||(Na={})),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.GoToActivityFeed=2]="GoToActivityFeed"}(xa||(xa={}));const $a="v2";function qa(e,t){return new Promise((n=>{if(_r(or,an.content,an.sidePanel,an.settings,an.remove,an.task,an.stage,an.meetingStage),!za())throw fn;n(sc(e,"navigateCrossDomain","Cross-origin navigation is only supported for URLs matching the pattern registered in the manifest.",t))}))}function Ga(e){return new Promise((t=>{if(_r(or),!ba())throw fn;t(sc(e,"navigateBack","Back navigation is not supported in the current client or context."))}))}function Ja(e,t){return new Promise((n=>{if(_r(or),!Ma())throw fn;n(sc(e,"navigateToTab","Invalid internalTabInstanceId and/or channelId were/was provided",t))}))}function Ka(e,t){if(_r(or),!za())throw fn;hc(e,"returnFocus",[t])}function Qa(e,t){return new Promise((n=>{if(_r(or),!Ma())throw fn;n(ic(e,"getTabInstances",t))}))}function Za(e,t){return new Promise((n=>{if(_r(or),!Ma())throw fn;n(ic(e,"getMruTabInstances",t))}))}function Xa(e,t){if(_r(or,an.content,an.sidePanel,an.meetingStage),!za())throw fn;hc(e,"shareDeepLink",[t.subPageId,t.subPageLabel,t.subPageWebUrl])}function Ya(e,t){if(_r(or,an.content),!za())throw fn;hc(e,"setFrameContext",[t])}function es(e,t){if(_r(or,an.settings,an.remove),!Vi())throw fn;hc(e,"settings.setValidityState",[t])}function ts(e){return new Promise((t=>{if(_r(or,an.content,an.settings,an.remove,an.sidePanel),!za())throw fn;t(ic(e,"settings.getSettings"))}))}function ns(e,t){return new Promise((n=>{if(_r(or,an.content,an.settings,an.sidePanel),!Vi())throw fn;n(ac(e,"settings.setSettings",t))}))}function rs(e){return e.appId instanceof Xr}function os(e){return Object.assign(Object.assign({},e),{appId:new Xr(e.appId),webUrl:e.webUrl?new URL(e.webUrl):void 0})}function is(e){return Object.assign(Object.assign({},e),{appId:e.appId.toString(),webUrl:e.webUrl?e.webUrl.toString():void 0})}let as;function ss(e){as=e}function cs(){vs(Qn($a,"pages.backStack.registerBackButtonPressHandler"),"backButtonPress",us,!1)}function us(){as&&as()||(Us()?js("backButtonPress",[]):Ca())}var ls=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())}))};const ds=Kn("handlers");class fs{static initializeHandlers(){fs.handlers.themeChange=bs,fs.handlers.load=Ps,fs.handlers.beforeUnload=Rs,cs()}static uninitializeHandlers(){fs.handlers={},fs.themeChangeHandler=null,fs.loadHandler=null,fs.beforeUnloadHandler=null,fs.beforeSuspendOrTerminateHandler=null,fs.resumeHandler=null}}function ps(){fs.initializeHandlers()}function gs(){fs.uninitializeHandlers()}fs.handlers={},fs.themeChangeHandler=null,fs.loadHandler=null,fs.beforeUnloadHandler=null,fs.beforeSuspendOrTerminateHandler=null,fs.resumeHandler=null,fs.hostToAppPerformanceMetricsHandler=null;const ms=ds.extend("callHandler");function hs(e,t){const n=fs.handlers[e];if(n){ms("Invoking the registered handler for message %s with arguments %o",e,t);return[!0,n.apply(this,t)]}return Us()?(js(e,t),[!1,void 0]):(ms("Handler for action message %s not found.",e),[!1,void 0])}function vs(e,t,n,r=!0,o=[]){n?(fs.handlers[t]=n,r&&hc(e,"registerHandler",[t,...o])):delete fs.handlers[t]}function ws(e){delete fs.handlers[e]}function Cs(e){return null!=fs.handlers[e]}function ys(e,t,n,r,o){n&&_r(or,...r),o&&o(),vs(e,t,n)}function Ss(e,t){fs.themeChangeHandler=t,!Yr(t)&&hc(e,"registerHandler",["themeChange"])}function bs(e){fs.themeChangeHandler&&fs.themeChangeHandler(e),Us()&&js("themeChange",[e])}function Es(e){fs.hostToAppPerformanceMetricsHandler=e}function As(e){fs.hostToAppPerformanceMetricsHandler&&fs.hostToAppPerformanceMetricsHandler(e)}function Is(e,t){fs.loadHandler=t,!Yr(t)&&hc(e,"registerHandler",["load"])}function Ps(e){const t=Ts(e);fs.resumeHandler?(fs.resumeHandler(t),Us()&&js("load",[t])):fs.loadHandler&&(fs.loadHandler(e),Us()&&js("load",[e]))}function Ts(e){return{entityId:e.entityId,contentUrl:new URL(e.contentUrl)}}function Os(e,t){fs.beforeUnloadHandler=t,!Yr(t)&&hc(e,"registerHandler",["beforeUnload"])}function Rs(){return ls(this,void 0,void 0,(function*(){const e=()=>{hc(Qn("v2","handleBeforeUnload"),"readyToUnload",[])};fs.beforeSuspendOrTerminateHandler?(yield fs.beforeSuspendOrTerminateHandler(),Us()?js("beforeUnload"):e()):fs.beforeUnloadHandler&&fs.beforeUnloadHandler(e)||(Us()?js("beforeUnload"):e())}))}function Fs(e){fs.beforeSuspendOrTerminateHandler=e,!Yr(e)&&hc(Qn("v2","registerBeforeSuspendOrTerminateHandler"),"registerHandler",["beforeUnload"])}function ks(e){fs.resumeHandler=e,!Yr(e)&&hc(Qn("v2","registerOnResumeHandler"),"registerHandler",["load"])}var Ms=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())}))};const Ns=Kn("childProxyingCommunication");class xs{}function Ds(){xs.window=null,xs.origin=null,xs.messageQueue=[]}function Us(){return!!br()&&!!xs.window}function Ls(e,t){return!!br()&&(xs.window&&!xs.window.closed&&e!==xs.window||(xs.window=e,xs.origin=t),xs.window&&xs.window.closed?(xs.window=null,xs.origin=null,!1):xs.window===e)}function Hs(e,t,n,r){return Ms(this,void 0,void 0,(function*(){xs.window===t&&(xr(xs.window,xs.origin,xs.messageQueue,"child"),Vs(e,n,r))}))}xs.messageQueue=[];const _s=Ns.extend("handleIncomingMessageFromChild");function Vs(e,t,n){if(void 0===e.data.id||void 0===e.data.func)return;const r=Rr(e.data),[o,i]=hs(r.func,r.args);if(o&&void 0!==i)return _s("Handler called in response to message %s from child. Returning response from handler to child, action: %s.",Mr(r),r.func),void Ws(r.id,r.uuid,Array.isArray(i)?i:[i]);_s("No handler for message %s from child found; relaying message on to parent, action: %s. Relayed message will have a new id.",Mr(r),r.func),Bs(r,t,n)}function Bs(e,t,n){const r=t(Qn("v2","tasks.startTask"),e.func,e.args,!0,e.teamsJsInstanceId),o=xs.origin;n(r.uuid,((...t)=>{if(!xs.window)return;if(!Ar().disableEnforceOriginMatchForChildResponses&&o!==xs.origin)return void _s("Origin of child window has changed, not sending response back to child window");const n=t.pop();_s("Message from parent being relayed to child, id: %s",Mr(e)),Ws(e.id,e.uuid,t,n)}))}function Ws(e,t,n,r){const o=xs.window,i=zs(e,t,n,r),a=kr(i),s=xs.origin;o&&s&&(_s("Sending message %s to %s via postMessage, args = %o",Mr(a),"child",a.args),o.postMessage(a,s))}function js(e,t){const n=xs.window,r=$s(e,t),o=xs.origin;n&&o?n.postMessage(r,o):xs.messageQueue.push(r)}function zs(e,t,n,r){return{id:e,uuid:t,args:n||[],isPartialResponse:r}}function $s(e,t){return{func:e,args:t||[]}}class qs{static storeCallbackInformation(e,t){qs.callbackInformation.set(e,t)}static clearMessages(){qs.callbackInformation.clear()}static deleteMessageInformation(e){qs.callbackInformation.delete(e)}static handleOneWayPerformanceMetrics(e,t,n){const r=e.monotonicTimestamp;r&&n?As({actionName:e.func,messageDelay:n-r,requestStartedAt:r}):t("Unable to send performance metrics for event %s",e.func)}static handlePerformanceMetrics(e,t,n,r){const o=qs.callbackInformation.get(e);o&&t.monotonicTimestamp&&r?(As({actionName:o.name,messageDelay:r-t.monotonicTimestamp,requestStartedAt:o.calledAt}),qs.deleteMessageInformation(e)):n("Unable to send performance metrics for callback %s with arguments %o",e.toString(),t.args)}}qs.callbackInformation=new Map;const Gs=Kn("nestedAppAuthUtils"),Js=Gs.extend("tryPolyfillWithNestedAppAuthBridge"),Ks="v2";function Qs(e,t,n){var r;const o=Js;if(zn.isFramelessWindow)return void o("Cannot polyfill nestedAppAuthBridge as current window is frameless");if(!t)return void o("Cannot polyfill nestedAppAuthBridge as current window does not exist");if(t.parent!==t.top)return void o("Default NAA bridge injection not supported in nested iframe. Use standalone NAA bridge instead.");const i=(()=>{try{return JSON.parse(e)}catch(e){return null}})();if(!i||!(null===(r=i.supports)||void 0===r?void 0:r.nestedAppAuth))return void o("Cannot polyfill nestedAppAuthBridge as current hub does not support nested app auth");const a=t;if(a.nestedAppAuthBridge)return void o("nestedAppAuthBridge already exists on current window, skipping polyfill");const s=Xs(a,n);s&&(a.nestedAppAuthBridge=s)}const Zs=Gs.extend("createNestedAppAuthBridge");function Xs(e,t){const n=Zs;if(!e)return n("nestedAppAuthBridge cannot be created as current window does not exist"),null;const{onMessage:r,sendPostMessage:o}=t,i=e=>t=>r(t,e);return{addEventListener:(t,r)=>{"message"===t?e.addEventListener(t,i(r)):n(`Event ${t} is not supported by nestedAppAuthBridge`)},postMessage:e=>{const t=(()=>{try{return JSON.parse(e)}catch(e){return null}})();if(!t||"object"!=typeof t||"NestedAppAuthRequest"!==t.messageType)return void n("Unrecognized data format received by app, message being ignored. Message: %o",e);const r=Qn(Ks,"nestedAppAuth.execute");o(e,r)},removeEventListener:(t,n)=>{e.removeEventListener(t,i(n))}}}var Ys=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())}))};const ec=Kn("communication");class tc{}class nc{}function rc(e,t){if(nc.messageListener=e=>Ac(e),tc.currentWindow=tc.currentWindow||Fn(),tc.parentWindow=tc.currentWindow.parent!==tc.currentWindow.self?tc.currentWindow.parent:tc.currentWindow.opener,tc.topWindow=tc.currentWindow.top,(tc.parentWindow||e)&&tc.currentWindow.addEventListener("message",nc.messageListener,!1),!tc.parentWindow){const e=tc.currentWindow;if(!e.nativeInterface)return Promise.reject(new Error("Initialization Failed. No Parent window found."));zn.isFramelessWindow=!0,e.onNativeMessage=xc}try{return tc.parentOrigin="*",uc(t,"initialize",[Cr,er,e]).then((([e,t,n,r])=>(Qs(r,tc.currentWindow,{onMessage:Pc,sendPostMessage:wc}),{context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r})))}finally{tc.parentOrigin=null}}function oc(){tc.currentWindow&&tc.currentWindow.removeEventListener("message",nc.messageListener,!1),tc.currentWindow=null,tc.parentWindow=null,tc.parentOrigin=null,nc.parentMessageQueue=[],nc.nextMessageId=0,nc.callbacks.clear(),nc.promiseCallbacks.clear(),nc.portCallbacks.clear(),nc.legacyMessageIdsToUuidMap={},qs.clearMessages(),Ds()}function ic(e,t,...n){return uc(e,t,n).then((([e])=>e))}function ac(e,t,...n){return uc(e,t,n).then((([e,t])=>{if(!e)throw new Error(t)}))}function sc(e,t,n,...r){return uc(e,t,r).then((([e,t])=>{if(!e)throw new Error(t||n)}))}function cc(e,t,...n){return uc(e,t,n).then((([e,t])=>{if(e)throw e;return t}))}function uc(e,t,n=void 0){if(!Zn(e))throw Error(`apiVersionTag: ${e} passed in doesn't follow the pattern starting with 'v' followed by digits, then underscore with words, please check.`);return new Promise((r=>{r(mc(bc(e,t,n).uuid))}))}function lc(e){return e.map((e=>wr(e)?e.serialize():e))}function dc(e,t,n,r,o){var i;return Ys(this,void 0,void 0,(function*(){const a=lc(t),[s]=yield uc(r,e,a);if(o&&o(s)||!o&&Be(s))throw new Error(`${s.errorCode}, message: ${null!==(i=s.message)&&void 0!==i?i:"None"}`);if(n.validate(s))return n.deserialize(s);throw new Error(`${Ne.INTERNAL_ERROR}, message: Invalid response from host - ${JSON.stringify(s)}`)}))}function fc(e,t,n,r){var o;return Ys(this,void 0,void 0,(function*(){const i=lc(t),[a]=yield uc(n,e,i);if(r&&r(a)||!r&&Be(a))throw new Error(`${a.errorCode}, message: ${null!==(o=a.message)&&void 0!==o?o:"None"}`);if(void 0!==a)throw new Error(`${Ne.INTERNAL_ERROR}, message: Invalid response from host`)}))}function pc(e,t,n=void 0){if(!Zn(e))throw Error(`apiVersionTag: ${e} passed in doesn't follow the pattern starting with 'v' followed by digits, then underscore with words, please check.`);return gc(bc(e,t,n).uuid)}function gc(e){return new Promise(((t,n)=>{nc.portCallbacks.set(e,((e,r)=>{e instanceof MessagePort?t(e):n(r&&r.length>0?r[0]:new Error("Host responded without port or error details."))}))}))}function mc(e){return new Promise((t=>{nc.promiseCallbacks.set(e,t)}))}function hc(e,t,n,r){let o;if(n instanceof Function?r=n:n instanceof Array&&(o=n),!Zn(e))throw Error(`apiVersionTag: ${e} passed in doesn't follow the pattern starting with 'v' followed by digits, then underscore with words, please check.`);const i=bc(e,t,o);r&&nc.callbacks.set(i.uuid,r)}nc.parentMessageQueue=[],nc.topMessageQueue=[],nc.nextMessageId=0,nc.callbacks=new Map,nc.promiseCallbacks=new Map,nc.portCallbacks=new Map,nc.legacyMessageIdsToUuidMap={};const vc=ec.extend("sendNestedAuthRequestToTopWindow");function wc(e,t){const n=vc,r=tc.topWindow,o=Wc(e,t);return n("Message %s information: %o",Mr(o),{actionName:o.func}),yc(r,o)}const Cc=ec.extend("sendRequestToTargetWindowHelper");function yc(e,t){const n=Cc,r=_c(e),o=Or(t);if(zn.isFramelessWindow)tc.currentWindow&&tc.currentWindow.nativeInterface&&(n("Sending message %s to %s via framelessPostMessage interface",Mr(o),r),tc.currentWindow.nativeInterface.framelessPostMessage(JSON.stringify(o)));else{const i=Hc(e);e&&i?(n("Sending message %s to %s via postMessage",Mr(o),r),e.postMessage(o,i)):(n("Adding message %s to %s message queue",Mr(o),r),Lc(e).push(t))}return t}const Sc=ec.extend("sendMessageToParentHelper");function bc(e,t,n,r,o){const i=Sc,a=tc.parentWindow,s=Bc(e,t,n,r,o);return qs.storeCallbackInformation(s.uuid,{name:t,calledAt:s.timestamp}),i("Message %s information: %o",Mr(s),{actionName:t,args:n}),yc(a,s)}const Ec=ec.extend("processIncomingMessage");function Ac(e){return Ys(this,void 0,void 0,(function*(){if(!e||!e.data||"object"!=typeof e.data)return void Ec("Unrecognized message format received by app, message being ignored. Message: %o",e);const t=e.source||e.originalEvent&&e.originalEvent.source,n=e.origin||e.originalEvent&&e.originalEvent.origin;return Oc(t,n).then((r=>{r?(Rc(t,n),t!==tc.parentWindow?Ls(t,n)&&Hs(e,t,bc,((e,t)=>nc.callbacks.set(e,t))):xc(e)):Ec("Message being ignored by app because it is either coming from the current window or a different window with an invalid origin, message: %o, source: %o, origin: %o",e,t,n)}))}))}const Ic=ec.extend("processAuthBridgeMessage");function Pc(e,t){var n,r;const o=Ic;if(!e||!e.data||"object"!=typeof e.data)return void o("Unrecognized message format received by app, message being ignored. Message: %o",e);const{args:i}=e.data,[,a]=null!=i?i:[],s=(()=>{try{return JSON.parse(a)}catch(e){return null}})();if(!s||"object"!=typeof s||"NestedAppAuthResponse"!==s.messageType)return void o("Unrecognized data format received by app, message being ignored. Message: %o",e);const c=e.source||(null===(n=null==e?void 0:e.originalEvent)||void 0===n?void 0:n.source),u=e.origin||(null===(r=null==e?void 0:e.originalEvent)||void 0===r?void 0:r.origin);c?Oc(c,u)?(tc.topWindow&&!tc.topWindow.closed&&c!==tc.topWindow||(tc.topWindow=c,tc.topOrigin=u),tc.topWindow&&tc.topWindow.closed&&(tc.topWindow=null,tc.topOrigin=null),xr(tc.topWindow,tc.topOrigin,nc.topMessageQueue,"top"),t(a)):o("Message being ignored by app because it is either coming from the current window or a different window with an invalid origin"):o("Message being ignored by app because it is coming for a target that is null")}const Tc=ec.extend("shouldProcessIncomingMessage");function Oc(e,t){return Ys(this,void 0,void 0,(function*(){if(tc.currentWindow&&e===tc.currentWindow)return Tc("Should not process message because it is coming from the current window"),!1;if(tc.currentWindow&&tc.currentWindow.location&&t&&t===tc.currentWindow.location.origin)return!0;{let e;try{e=new URL(t)}catch(e){return Tc("Message has an invalid origin of %s",t),!1}const n=yield fa(e);return n||Tc("Message has an invalid origin of %s",t),n}}))}function Rc(e,t){zn.isFramelessWindow||tc.parentWindow&&!tc.parentWindow.closed&&e!==tc.parentWindow||(tc.parentWindow=e,tc.parentOrigin=t),tc.parentWindow&&tc.parentWindow.closed&&(tc.parentWindow=null,tc.parentOrigin=null),xr(tc.parentWindow,tc.parentOrigin,nc.parentMessageQueue,"parent")}const Fc=ec.extend("handleIncomingMessageFromParent");function kc(e){const t=Fc;if(!e.uuid)return nc.legacyMessageIdsToUuidMap[e.id];{const t=e.uuid,n=Mc(nc.callbacks,t);if(n)return n;const r=Mc(nc.promiseCallbacks,t);if(r)return r;const o=Mc(nc.portCallbacks,t);if(o)return o}t("Received message %s that failed to produce a callbackId",Mr(e))}function Mc(e,t){if(t){const n=[...e].find((([e,n])=>e.toString()===t.toString()));if(n)return n[0]}}function Nc(e,t){const n=Mc(t,e.uuid);n&&t.delete(n),e.uuid?nc.legacyMessageIdsToUuidMap={}:delete nc.legacyMessageIdsToUuidMap[e.id]}function xc(e){const t=Fc,n=Vn();if("id"in e.data&&"number"==typeof e.data.id){const r=e.data,o=Fr(r),i=kc(o);if(i){const r=nc.callbacks.get(i);t("Received a response from parent for message %s",i.toString()),qs.handlePerformanceMetrics(i,o,t,n),r&&(t("Invoking the registered callback for message %s with arguments %o",i.toString(),o.args),r.apply(null,[...o.args,o.isPartialResponse]),Dc(e)||(t("Removing registered callback for message %s",i.toString()),Nc(o,nc.callbacks)));const a=nc.promiseCallbacks.get(i);a&&(t("Invoking the registered promise callback for message %s with arguments %o",i.toString(),o.args),a(o.args),t("Removing registered promise callback for message %s",i.toString()),Nc(o,nc.promiseCallbacks));const s=nc.portCallbacks.get(i);if(s){let n;t("Invoking the registered port callback for message %s with arguments %o",i.toString(),o.args),e.ports&&e.ports[0]instanceof MessagePort&&(n=e.ports[0]),s(n,o.args),t("Removing registered port callback for message %s",i.toString()),Nc(o,nc.portCallbacks)}o.uuid&&(nc.legacyMessageIdsToUuidMap={})}}else if("func"in e.data&&"string"==typeof e.data.func){const r=e.data;qs.handleOneWayPerformanceMetrics(r,t,n),t('Received a message from parent %s, action: "%s"',Mr(r),r.func),hs(r.func,r.args)}else t("Received an unknown message: %O",e)}function Dc(e){return!0===e.data.isPartialResponse}function Uc(){return tc.topWindow!==tc.parentWindow}function Lc(e){return e===tc.topWindow&&Uc()?nc.topMessageQueue:e===tc.parentWindow?nc.parentMessageQueue:[]}function Hc(e){return e===tc.topWindow&&Uc()?tc.topOrigin:e===tc.parentWindow?tc.parentOrigin:null}function _c(e){return e===tc.topWindow&&Uc()?"top":e===tc.parentWindow?"parent":null}function Vc(e,t){let n;n=tc.currentWindow.setInterval((()=>{0===Lc(e).length&&(clearInterval(n),t())}),100)}function Bc(e,t,n,r,o){const i=nc.nextMessageId++,a=new Wn;nc.legacyMessageIdsToUuidMap[i]=a;const s=!0===r?o:zn.teamsJsInstanceId;return{id:i,uuid:a,func:t,timestamp:Date.now(),monotonicTimestamp:Vn(),args:n||[],apiVersionTag:e,isProxiedFromChild:null!=r&&r,teamsJsInstanceId:s}}function Wc(e,t){const n=nc.nextMessageId++,r=new Wn;return nc.legacyMessageIdsToUuidMap[n]=r,{id:n,uuid:r,func:"nestedAppAuth.execute",timestamp:Date.now(),monotonicTimestamp:Vn(),apiVersionTag:t,args:[],data:e}}const jc="v1";function zc(e){if(!Yr(e)&&_r(or),!Yr(e)&&!$c())throw fn;e?vs(Qn(jc,"log.request"),"log.request",(()=>{const t=e();hc(Qn(jc,"log.receive"),"log.receive",[t])})):ws("log.request")}function $c(){return!(!_r(or)||!or.supports.logs)}var qc,Gc,Jc;!function(e){e.fileDownloadStart="fileDownloadStart",e.fileDownloadComplete="fileDownloadComplete"}(qc||(qc={})),function(e){e.view="view",e.edit="edit",e.editNew="editNew"}(Gc||(Gc={})),function(e){e.fileOpenPreference="fileOpenPreference",e.theme="theme"}(Jc||(Jc={}));const Kc="v1";function Qc(e,t){_r(or),hc(Qn(Kc,"uploadCustomApp"),"uploadCustomApp",[e],t||vn())}function Zc(e,t,n){_r(or),hc(Qn(Kc,"sendCustomMessage"),e,t,n)}function Xc(e,t){if(_r(or),!Us())throw new Error("The child window has not yet been initialized or is not present");js(e,t)}function Yc(e,t){_r(or),vs(Qn(Kc,"registerCustomHandler"),e,((...e)=>t.apply(this,e)))}function eu(e,t){_r(or),vs(Qn(Kc,"registerUserSettingsChangeHandler"),"userSettingsChange",t,!0,[e])}function tu(e){_r(or,an.content,an.task);const t=[e.entityId,e.title,e.description,e.type,e.objectUrl,e.downloadUrl,e.webPreviewUrl,e.webEditUrl,e.baseUrl,e.editFile,e.subEntityId,e.viewerAction,e.fileOpenPreference,e.conversationId,e.sizeInBytes];hc(Qn(Kc,"openFilePreview"),"openFilePreview",t)}const nu="v1";function ru(e){return new Promise((t=>{if(_r(or,an.content),!au())throw fn;const n=ac(Qn(nu,"conversations.openConversation"),"conversations.openConversation",{title:e.title,subEntityId:e.subEntityId,conversationId:e.conversationId,channelId:e.channelId,entityId:e.entityId});e.onStartConversation&&vs(Qn(nu,"conversations.registerStartConversationHandler"),"startConversation",((t,n,r,o)=>{var i;return null===(i=e.onStartConversation)||void 0===i?void 0:i.call(e,{subEntityId:t,conversationId:n,channelId:r,entityId:o})})),e.onCloseConversation&&vs(Qn(nu,"conversations.registerCloseConversationHandler"),"closeConversation",((t,n,r,o)=>{var i;return null===(i=e.onCloseConversation)||void 0===i?void 0:i.call(e,{subEntityId:t,conversationId:n,channelId:r,entityId:o})})),t(n)}))}function ou(){if(_r(or,an.content),!au())throw fn;hc(Qn(nu,"conversations.closeConversation"),"conversations.closeConversation"),ws("startConversation"),ws("closeConversation")}function iu(){return new Promise((e=>{if(_r(or),!au())throw fn;e(ic(Qn(nu,"conversations.getChatMember"),"getChatMembers"))}))}function au(){return!(!_r(or)||!or.supports.conversations)}var su=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())}))};const cu="v2",uu=Kn("copilot");function lu(){var e;return _r(or)&&!!(null===(e=or.supports.copilot)||void 0===e?void 0:e.customTelemetry)}function du(e,t){var n;return void 0===t&&(t=null!==(n=Vn())&&void 0!==n?n:Date.now()),su(this,void 0,void 0,(function*(){return _r(or),uu("Sending custom telemetry data to host for stage: %s to record timestamp: %s",e,t),fc("copilot.customTelemetry.sendCustomTelemetryData",[e.toString(),t],Qn(cu,"copilot.customTelemetry.sendCustomTelemetryData"))}))}var fu=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())}))};const pu="v2",gu=Kn("copilot");function mu(){var e,t;return _r(or)&&(!!(null===(e=or.hostVersionsInfo)||void 0===e?void 0:e.appEligibilityInformation)||!!(null===(t=or.supports.copilot)||void 0===t?void 0:t.eligibility))}function hu(e){var t,n;return fu(this,void 0,void 0,(function*(){if(_r(or),!mu())throw new Error(`Error code: ${fn.errorCode}, message: Not supported on platform`);if((null===(t=or.hostVersionsInfo)||void 0===t?void 0:t.appEligibilityInformation)&&!e)return gu("Eligibility information is already available on runtime."),or.hostVersionsInfo.appEligibilityInformation;gu("Eligibility information is not available on runtime. Requesting from host.");const r=yield ic(Qn(pu,"copilot.eligibility.getEligibilityInfo"),"copilot.eligibility.getEligibilityInfo",e);if(Be(r))throw new Error(`Error code: ${r.errorCode}, message: ${null!==(n=r.message)&&void 0!==n?n:"Failed to get eligibility information from the host."}`);if(!vu(r))throw new Error("Error deserializing eligibility information");return r}))}function vu(e){return void 0!==e.ageGroup&&void 0!==e.cohort&&void 0!==e.userClassification&&void 0!==e.isCopilotEligible&&void 0!==e.isCopilotEnabledRegion&&void 0!==e.isOptedOutByAdmin&&(!e.featureSet||void 0!==e.featureSet.serverFeatures&&void 0!==e.featureSet.uxFeatures)}var wu,Cu,yu,Su;!function(e){e.EMAIL="email",e.TEXT="text",e.MEDIA="media",e.CALENDAR_INVITE="calendarInvite",e.WEB_PAGE="webPage",e.MIXED="mixed"}(wu||(wu={})),function(e){e.IMAGE="image",e.AUDIO="audio",e.VIDEO="video"}(Cu||(Cu={})),function(e){e.Accepted="accepted",e.NotAccepted="not_accepted"}(yu||(yu={})),function(e){e.ConsentNotAccepted="consent_not_accepted",e.PageContentBlockedPolicy="page_content_blocked_policy",e.PageContentBlockedDlp="page_content_blocked_dlp",e.PageContentTypeNotSupportedYet="page_content_type_not_supported_yet",e.PageContentSizeNotSupported="page_content_size_not_supported",e.PageContextChanged="page_context_changed",e.PageContentExtractionFailed="page_content_extraction_failed",e.PageContentSizeNotSupportedPDF="page_content_size_not_supported_pdf",e.NotSupportedOnPlatform="not_supported_on_platform",e.OtherError="other_error"}(Su||(Su={}));class bu extends Error{constructor(e,t){super(t),this.errorCode=e,this.name="SidePanelError"}}var Eu=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())}))};const Au="v2";function Iu(){var e;return _r(or)&&!!(null===(e=or.supports.copilot)||void 0===e?void 0:e.sidePanel)}function Pu(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(Su).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)||Be(e)}function Tu(e){return Eu(this,void 0,void 0,(function*(){_r(or);return dc("copilot.sidePanel.getContent",e?[new Nu(e)]:[],new ku,Qn(Au,"copilot.sidePanel.getContent"),Pu)}))}function Ou(){return Eu(this,void 0,void 0,(function*(){return _r(or),dc("copilot.sidePanel.preCheckUserConsent",[],new Mu,Qn(Au,"copilot.sidePanel.preCheckUserConsent"),Pu)}))}function Ru(e){ys(Qn(Au,"copilot.sidePanel.registerUserActionContentSelect"),"copilot.sidePanel.userActionContentSelect",e,[an.content],(()=>{if(!Iu())throw Fu}))}const Fu=new bu(Su.NotSupportedOnPlatform,"This API is not supported on the current platform.");class ku extends Bi{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class Mu extends Bi{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class Nu{constructor(e){this.contentRequest=e}serialize(){return this.contentRequest}}const xu="v2";class Du{constructor(e){this.invokeRequest=e}serialize(){return this.invokeRequest}}function Uu(e){const t=e;return t.responseType===_u.ActionExecuteInvokeResponse&&void 0!==t.value&&void 0!==t.statusCode&&void 0!==t.type}const Lu="Action.Execute";var Hu,_u,Vu;!function(e){e.ActionExecuteInvokeRequest="ActionExecuteInvokeRequest",e.QueryMessageExtensionRequest="QueryMessageExtensionRequest"}(Hu||(Hu={})),function(e){e.ActionExecuteInvokeResponse="ActionExecuteInvokeResponse",e.QueryMessageExtensionResponse="QueryMessageExtensionResponse"}(_u||(_u={}));class Bu extends Bi{validate(e){return Uu(e)}deserialize(e){return e}}function Wu(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(Vu).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)}function ju(e){e.requestType===Hu.ActionExecuteInvokeRequest?zu(e):e.requestType===Hu.QueryMessageExtensionRequest&&$u(e)}function zu(e){if(e.type!==Lu){throw{errorCode:Vu.INTERNAL_ERROR,message:`Invalid action type ${e.type}. Action type must be "${Lu}"`}}if(!Bn(e.data)){throw{errorCode:Vu.INTERNAL_ERROR,message:`Invalid data type ${typeof e.data}. Data must be a primitive or a plain object.`}}}function $u(e){if(e.commandId.length>64)throw new Error("originalRequestInfo.commandId exceeds the maximum size of 64 characters");if(e.parameters.length>5)throw new Error("originalRequestInfo.parameters exceeds the maximum size of 5");for(const t of e.parameters){if(t.name.length>64)throw new Error("originalRequestInfo.parameters.name exceeds the maximum size of 64 characters");if(t.value.length>512)throw new Error("originalRequestInfo.parameters.value exceeds the maximum size of 512 characters")}}function qu(e,t,n){if(_r(or,an.content),!Zu())throw fn;const r=new Xr(e);return ju(n),uc(Qn(xu,"externalAppAuthentication.authenticateAndResendRequest"),"externalAppAuthentication.authenticateAndResendRequest",[r.toString(),n,t.url.href,t.width,t.height,t.isExternal]).then((([e,t])=>{if(e&&null!=t.responseType)return t;throw t}))}function Gu(e,t){if(_r(or,an.content),!Zu())throw fn;const n=new Xr(e);return uc(Qn(xu,"externalAppAuthentication.authenticateWithSSO"),"externalAppAuthentication.authenticateWithSSO",[n.toString(),t.claims,t.silent]).then((([e,t])=>{if(!e)throw t}))}function Ju(e,t,n){if(_r(or,an.content),!Zu())throw fn;const r=new Xr(e);return ju(n),uc(Qn(xu,"externalAppAuthentication.authenticateWithSSOAndResendRequest"),"externalAppAuthentication.authenticateWithSSOAndResendRequest",[r.toString(),n,t.claims,t.silent]).then((([e,t])=>{if(e&&null!=t.responseType)return t;throw t}))}function Ku(e,t,n){if(_r(or,an.content),!Zu())throw fn;return Mn(e,new Error("titleId is Invalid.")),Mn(t,new Error("oauthConfigId is Invalid.")),uc(Qn(xu,"externalAppAuthentication.authenticateWithOauth2"),"externalAppAuthentication.authenticateWithOauth2",[e,t,n.width,n.height,n.isExternal]).then((([e,t])=>{if(!e)throw t}))}function Qu(e,t,n){if(_r(or,an.content),!Zu())throw fn;return Mn(e,new Error("titleId is Invalid.")),t&&Nn(t),uc(Qn(xu,"externalAppAuthentication.authenticateWithPowerPlatformConnectorPlugins"),"externalAppAuthentication.authenticateWithPowerPlatformConnectorPlugins",[e,null==t?void 0:t.toString(),null==n?void 0:n.width,null==n?void 0:n.height,null==n?void 0:n.isExternal]).then((([e,t])=>{if(!e)throw t}))}function Zu(){return!(!_r(or)||!or.supports.externalAppAuthentication)}!function(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}(Vu||(Vu={}));var Xu=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())}))};const Yu="v2";function el(e,t,n){return Xu(this,void 0,void 0,(function*(){if(_r(or,an.content),!ol())throw fn;return il(e,t),fc("externalAppAuthenticationForCEA.authenticateWithSSO",[e,t,n.authId,n.connectionName,n.claims,n.silent],Qn(Yu,"externalAppAuthenticationForCEA.authenticateWithSSO"),Wu)}))}function tl(e,t,n){return Xu(this,void 0,void 0,(function*(){if(_r(or,an.content),!ol())throw fn;return il(e,t),fc("externalAppAuthenticationForCEA.authenticateWithOauth",[e,t,n.url.href,n.width,n.height,n.isExternal],Qn(Yu,"externalAppAuthenticationForCEA.authenticateWithOauth"),Wu)}))}function nl(e,t,n,r){return Xu(this,void 0,void 0,(function*(){if(_r(or,an.content),!ol())throw fn;return il(e,t),zu(r),dc("externalAppAuthenticationForCEA.authenticateAndResendRequest",[e,t,new Du(r),n.url.href,n.width,n.height,n.isExternal],new Bu,Qn(Yu,"externalAppAuthenticationForCEA.authenticateAndResendRequest"),Wu)}))}function rl(e,t,n,r){return Xu(this,void 0,void 0,(function*(){if(_r(or,an.content),!ol())throw fn;return il(e,t),zu(r),dc("externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest",[e,t,new Du(r),n.authId,n.connectionName,n.claims,n.silent],new Bu,Qn(Yu,"externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest"),Wu)}))}function ol(){return!(!_r(or)||!or.supports.externalAppAuthenticationForCEA)}function il(e,t){Mn(t,new Error("conversation id is not valid.")),Qr(e)}const al="v2";var sl,cl;function ul(e,t){if(_r(or,an.content),!dl())throw fn;const n=new Xr(e);return uc(Qn(al,"externalAppCardActions.processActionSubmit"),"externalAppCardActions.processActionSubmit",[n.toString(),t]).then((([e,t])=>{if(!e)throw t}))}function ll(e,t,n){if(_r(or,an.content),!dl())throw fn;const r=new Xr(e);return uc(Qn(al,"externalAppCardActions.processActionOpenUrl"),"externalAppCardActions.processActionOpenUrl",[r.toString(),t.href,n]).then((([e,t])=>{if(e)throw e;return t}))}function dl(){return!(!_r(or)||!or.supports.externalAppCardActions)}!function(e){e.DeepLinkDialog="DeepLinkDialog",e.DeepLinkOther="DeepLinkOther",e.DeepLinkStageView="DeepLinkStageView",e.GenericUrl="GenericUrl"}(sl||(sl={})),function(e){e.INTERNAL_ERROR="INTERNAL_ERROR",e.INVALID_LINK="INVALID_LINK",e.NOT_SUPPORTED="NOT_SUPPORTED"}(cl||(cl={}));var fl=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())}))};const pl="v2";function gl(e,t,n){return fl(this,void 0,void 0,(function*(){if(_r(or,an.content),!hl())throw fn;il(e,t);const[r,o]=yield uc(Qn(pl,"externalAppCardActionsForCEA.processActionOpenUrl"),"externalAppCardActionsForCEA.processActionOpenUrl",[e.toString(),t,n.href]);if(r)throw r;return o}))}function ml(e,t,n){return fl(this,void 0,void 0,(function*(){if(_r(or,an.content),!hl())throw fn;il(e,t);const r=yield ic(Qn(pl,"externalAppCardActionsForCEA.processActionSubmit"),"externalAppCardActionsForCEA.processActionSubmit",e.toString(),t,n);if(r)throw r}))}function hl(){return!(!_r(or)||!or.supports.externalAppCardActionsForCEA)}var vl;function wl(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(vl).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)}!function(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}(vl||(vl={}));var Cl=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())}))};const yl="v2";function Sl(e,t,n){return Cl(this,void 0,void 0,(function*(){if(_r(or,an.content),!bl())throw fn;return El(e,n),fc("externalAppCardActionsForDA.processActionOpenUrlDialog",[e,new Al(t),n],Qn(yl,"externalAppCardActionsForDA.processActionOpenUrlDialog"),wl)}))}function bl(){return!(!_r(or)||!or.supports.externalAppCardActionsForDA)}function El(e,t){Qr(e),jn(t)}class Al{constructor(e){this.info=e}serialize(){const{url:e,title:t,size:n}=this.info;return{url:e.href,title:t,size:n}}}var Il=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())}))};const Pl="v2";function Tl(e,t,n){return Il(this,void 0,void 0,(function*(){if(_r(or,an.content),!Ol())throw fn;const r=new Xr(e),[o,i]=yield uc(Qn(Pl,"externalAppCommands.processActionCommand"),"externalAppCommands.processActionCommand",[r.toString(),t,n]);if(o)throw o;return i}))}function Ol(){return!(!_r(or)||!or.supports.externalAppCommands)}const Rl="v1";var Fl,kl,Ml,Nl,xl,Dl;function Ul(e,t){if(_r(or,an.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");hc(Qn(Rl,"files.getCloudStorageFolders"),"files.getCloudStorageFolders",[e],t)}function Ll(e,t){if(_r(or,an.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");hc(Qn(Rl,"files.addCloudStorageFolder"),"files.addCloudStorageFolder",[e],t)}function Hl(e,t,n){if(_r(or,an.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");hc(Qn(Rl,"files.deleteCloudStorageFolder"),"files.deleteCloudStorageFolder",[e,t],n)}function _l(e,t,n){if(_r(or,an.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");hc(Qn(Rl,"files.getCloudStorageFolderContents"),"files.getCloudStorageFolderContents",[e,t],n)}function Vl(e,t,n){if(_r(or,an.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");hc(Qn(Rl,"files.openCloudStorageFile"),"files.openCloudStorageFile",[e,t,n])}function Bl(e=!1,t){if(_r(or,an.content),!t)throw new Error("[files.getExternalProviders] Callback cannot be null");hc(Qn(Rl,"files.getExternalProviders"),"files.getExternalProviders",[e],t)}function Wl(e,t,n,r,o=!1,i){if(_r(or,an.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");hc(Qn(Rl,"files.copyMoveFiles"),"files.copyMoveFiles",[e,t,n,r,o],i)}function jl(e){if(_r(or,an.content),!e)throw new Error("[files.getFileDownloads] Callback cannot be null");hc(Qn(Rl,"files.getFileDownloads"),"files.getFileDownloads",[],e)}function zl(e=void 0,t){if(_r(or,an.content),!t)throw new Error("[files.openDownloadFolder] Callback cannot be null");hc(Qn(Rl,"files.openDownloadFolder"),"files.openDownloadFolder",[e],t)}function $l(e){if(_r(or,an.content),!e)throw ed(Ne.INVALID_ARGUMENTS,"[files.addCloudStorageProvider] callback cannot be null");hc(Qn(Rl,"files.addCloudStorageProvider"),"files.addCloudStorageProvider",[],e)}function ql(e,t){if(_r(or,an.content),!t)throw ed(Ne.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] callback cannot be null");if(!e||!e.content)throw ed(Ne.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] 3P cloud storage provider request content is missing");hc(Qn(Rl,"files.removeCloudStorageProvider"),"files.removeCloudStorageProvider",[e],t)}function Gl(e,t){if(_r(or,an.content),!t)throw ed(Ne.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw ed(Ne.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] 3P cloud storage provider request content is missing");hc(Qn(Rl,"files.addCloudStorageProviderFile"),"files.addCloudStorageProviderFile",[e],t)}function Jl(e,t){if(_r(or,an.content),!t)throw ed(Ne.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw ed(Ne.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] 3P cloud storage provider request content is missing");hc(Qn(Rl,"files.renameCloudStorageProviderFile"),"files.renameCloudStorageProviderFile",[e],t)}function Kl(e,t){if(_r(or,an.content),!t)throw ed(Ne.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw ed(Ne.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] 3P cloud storage provider request content details are missing");hc(Qn(Rl,"files.deleteCloudStorageProviderFile"),"files.deleteCloudStorageProviderFile",[e],t)}function Ql(e,t){if(_r(or,an.content),!t)throw ed(Ne.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw ed(Ne.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");hc(Qn(Rl,"files.downloadCloudStorageProviderFile"),"files.downloadCloudStorageProviderFile",[e],t)}function Zl(e,t){if(_r(or,an.content),!t)throw ed(Ne.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw ed(Ne.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");if(!e.content.destinationFolder)throw ed(Ne.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] Invalid destination folder details");hc(Qn(Rl,"files.uploadCloudStorageProviderFile"),"files.uploadCloudStorageProviderFile",[e],t)}function Xl(e){if(_r(or),!e)throw new Error("[registerCloudStorageProviderListChangeHandler] Handler cannot be null");vs(Qn(Rl,"files.registerCloudStorageProviderListChangeHandler"),"files.cloudStorageProviderListChange",e)}function Yl(e){if(_r(or),!e)throw new Error("[registerCloudStorageProviderContentChangeHandler] Handler cannot be null");vs(Qn(Rl,"files.registerCloudStorageProviderContentChangeHandler"),"files.cloudStorageProviderContentChange",e)}function ed(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"}(Fl||(Fl={})),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"}(kl||(kl={})),function(e){e.ClassMaterials="classMaterials"}(Ml||(Ml={})),function(e){e.Readonly="readonly"}(Nl||(Nl={})),function(e){e.Downloaded="Downloaded",e.Downloading="Downloading",e.Failed="Failed"}(xl||(xl={})),function(e){e.Download="DOWNLOAD",e.Upload="UPLOAD",e.Delete="DELETE"}(Dl||(Dl={}));const td="v1";function nd(){return new Promise((e=>{if(_r(or),!ad())throw fn;e(cc(Qn(td,"meetingRoom.getPairedMeetingRoomInfo"),"meetingRoom.getPairedMeetingRoomInfo"))}))}function rd(e){return new Promise((t=>{if(!e||0==e.length)throw new Error("[meetingRoom.sendCommandToPairedMeetingRoom] Command name cannot be null or empty");if(_r(or),!ad())throw fn;t(cc(Qn(td,"meetingRoom.sendCommandToPairedMeetingRoom"),"meetingRoom.sendCommandToPairedMeetingRoom",e))}))}function od(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler] Handler cannot be null");if(_r(or),!ad())throw fn;vs(Qn(td,"meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler"),"meetingRoom.meetingRoomCapabilitiesUpdate",(t=>{_r(or),e(t)}))}function id(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomStatesUpdateHandler] Handler cannot be null");if(_r(or),!ad())throw fn;vs(Qn(td,"meetingRoom.registerMeetingRoomStatesUpdateHandler"),"meetingRoom.meetingRoomStatesUpdate",(t=>{_r(or),e(t)}))}function ad(){return!(!_r(or)||!or.supports.meetingRoom)}function sd(){return!(!_r(or)||!or.supports.messageChannels)}const cd="1.0.1",ud={onMessage:function(e,t){if(!e||!e.data||"object"!=typeof e.data||null===e.data)return void vd("Invalid message format, ignoring. Message: %o",e);if(!gd(e.source,e.origin))return void vd("Message source/origin not allowed, ignoring.");const{args:n}=e.data,[,r]=null!=n?n:[],o=(()=>{try{return JSON.parse(r)}catch(e){return wd("Failed to parse response message:",e),null}})();if(!o||"NestedAppAuthResponse"!==o.messageType)return void vd("Invalid response format, ignoring. Message: %o",e);t(r)}};let ld=null,dd=!1;function fd(e,t,n=!1){if(dd=n,!e)throw new Error("Cannot polyfill nestedAppAuthBridge as the current window does not exist");if(!t)throw new Error("Top origin is required to initialize the Nested App Auth Bridge");try{const e=new URL(t);if("https:"!==e.protocol)throw new Error(`Invalid top origin: ${t}. Only HTTPS origins are allowed.`);ld=e.origin}catch(e){throw new Error(`Failed to initialize bridge: invalid top origin: ${t}`)}const r=e;if(r.nestedAppAuthBridge)return void vd("Nested App Auth Bridge is already present");const o=pd(r);o&&(r.nestedAppAuthBridge=o)}function pd(e){const t=new WeakMap,{onMessage:n}=ud,r=e=>t=>n(t,e);return{addEventListener:(n,o)=>{if("message"===n){const i=r(o);t.set(o,i),e.addEventListener(n,i)}else vd(`Event ${n} is not supported by nestedAppAuthBridge`)},postMessage:t=>{if(!e.top)throw new Error("window.top is not available for posting messages");try{const n=JSON.parse(t);if("object"==typeof n&&"NestedAppAuthRequest"===n.messageType){const n=md(t);if(e===e.top||!ld)return void wd("Not in an embedded iframe; skipping postMessage.");e.top.postMessage(n,ld)}}catch(e){return void wd("Failed to parse message:",e,"Original message:",t)}},removeEventListener:(n,r)=>{const o=t.get(r);o&&(e.removeEventListener(n,o),t.delete(r))}}}function gd(e,t){if(t===ld)try{return"https:"===new URL(t).protocol}catch(e){return wd("Invalid message origin URL:",e),!1}return!1}function md(e){const t=Date.now();return{id:hd(),uuid:en(),func:"nestedAppAuth.execute",timestamp:t,apiVersionTag:"v2_nestedAppAuth.execute",monotonicTimestamp:t,args:[],data:e}}function hd(){return"undefined"!=typeof crypto&&crypto.randomUUID?crypto.randomUUID():Math.random().toString(36).substring(2,11)}function vd(...e){dd&&console.log(...e)}function wd(...e){dd&&console.error(...e)}const Cd="v1";function yd(e){if(_r(or,an.content),!Sd())throw fn;hc(Qn(Cd,"notifications.showNotification"),"notifications.showNotification",[e])}function Sd(){return!(!_r(or)||!or.supports.notifications)}const bd="v2";function Ed(e){if(!Pd())throw new Error(Ne.NOT_SUPPORTED_ON_PLATFORM.toString());if(Yr(e))throw new Error(Ne.INVALID_ARGUMENTS.toString());vs(Qn(bd,"otherApp.install"),"otherApp.install",e)}function Ad(){if(!Pd())throw new Error(Ne.NOT_SUPPORTED_ON_PLATFORM.toString());hc(Qn(bd,"otherApp.unregisterInstall"),"otherApp.unregisterInstall"),ws("otherApp.install")}function Id(e){if(!Pd())throw new Error(Ne.NOT_SUPPORTED_ON_PLATFORM.toString());return fc("otherApp.notifyInstallCompleted",[e.toString()],Qn(bd,"otherApp.notifyInstallCompleted"))}function Pd(){return!(!_r(or)||!or.supports.otherAppStateChange)}const Td="v1";var Od,Rd,Fd;function kd(e){if(!e)throw new Error("[remoteCamera.getCapableParticipants] Callback cannot be null");if(_r(or,an.sidePanel),!_d())throw fn;hc(Qn(Td,"remoteCamera.getCapableParticipants"),"remoteCamera.getCapableParticipants",e)}function Md(e,t){if(!e)throw new Error("[remoteCamera.requestControl] Participant cannot be null");if(!t)throw new Error("[remoteCamera.requestControl] Callback cannot be null");if(_r(or,an.sidePanel),!_d())throw fn;hc(Qn(Td,"remoteCamera.requestControl"),"remoteCamera.requestControl",[e],t)}function Nd(e,t){if(!e)throw new Error("[remoteCamera.sendControlCommand] ControlCommand cannot be null");if(!t)throw new Error("[remoteCamera.sendControlCommand] Callback cannot be null");if(_r(or,an.sidePanel),!_d())throw fn;hc(Qn(Td,"remoteCamera.sendControlCommand"),"remoteCamera.sendControlCommand",[e],t)}function xd(e){if(!e)throw new Error("[remoteCamera.terminateSession] Callback cannot be null");if(_r(or,an.sidePanel),!_d())throw fn;hc(Qn(Td,"remoteCamera.terminateSession"),"remoteCamera.terminateSession",e)}function Dd(e){if(!e)throw new Error("[remoteCamera.registerOnCapableParticipantsChangeHandler] Handler cannot be null");if(_r(or,an.sidePanel),!_d())throw fn;vs(Qn(Td,"remoteCamera.registerOnCapableParticipantsChangeHandler"),"remoteCamera.capableParticipantsChange",e)}function Ud(e){if(!e)throw new Error("[remoteCamera.registerOnErrorHandler] Handler cannot be null");if(_r(or,an.sidePanel),!_d())throw fn;vs(Qn(Td,"remoteCamera.registerOnErrorHandler"),"remoteCamera.handlerError",e)}function Ld(e){if(!e)throw new Error("[remoteCamera.registerOnDeviceStateChangeHandler] Handler cannot be null");if(_r(or,an.sidePanel),!_d())throw fn;vs(Qn(Td,"remoteCamera.registerOnDeviceStateChangeHandler"),"remoteCamera.deviceStateChange",e)}function Hd(e){if(!e)throw new Error("[remoteCamera.registerOnSessionStatusChangeHandler] Handler cannot be null");if(_r(or,an.sidePanel),!_d())throw fn;vs(Qn(Td,"remoteCamera.registerOnSessionStatusChangeHandler"),"remoteCamera.sessionStatusChange",e)}function _d(){return!(!_r(or)||!or.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"}(Od||(Od={})),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"}(Rd||(Rd={})),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"}(Fd||(Fd={}));const Vd="v1";function Bd(e,t,n,r){if(_r(or,an.content),!Wd())throw fn;if(!e||0==e.length)throw new Error("[appEntity.selectAppEntity] threadId name cannot be null or empty");if(!r)throw new Error("[appEntity.selectAppEntity] Callback cannot be null");hc(Qn(Vd,"appEntity.selectAppEntity"),"appEntity.selectAppEntity",[e,t,n],r)}function Wd(){return!(!_r(or)||!or.supports.appEntity)}const jd="v1";function zd(e){return new Promise((t=>{if(_r(or),!$d())throw fn;if((zn.hostClientType===rn.android||zn.hostClientType===rn.teamsRoomsAndroid||zn.hostClientType===rn.teamsPhones||zn.hostClientType===rn.teamsDisplays)&&!Vr(Ge)){const e={errorCode:Ne.OLD_PLATFORM};throw new Error(JSON.stringify(e))}t(ic(Qn(jd,"teams.fullTrust.joinedTeams.getUserJoinedTeams"),"getUserJoinedTeams",e))}))}function $d(){return!(!_r(or)||!or.supports.teams)&&(!!or.supports.teams.fullTrust&&!!or.supports.teams.fullTrust.joinedTeams)}const qd="v1";function Gd(e){return new Promise((t=>{if(_r(or),!Jd())throw fn;t(ic(Qn(qd,"teams.fullTrust.getConfigSetting"),"getConfigSetting",e))}))}function Jd(){return!(!_r(or)||!or.supports.teams)&&!!or.supports.teams.fullTrust}const Kd="v1";var Qd;function Zd(e,t){if(_r(or,an.content),!Yd())throw fn;if(!e)throw new Error("[teams.getTeamChannels] groupId cannot be null or empty");if(!t)throw new Error("[teams.getTeamChannels] Callback cannot be null");hc(Qn(Kd,"teams.getTeamChannels"),"teams.getTeamChannels",[e],t)}function Xd(e,t){if(_r(or),!Yd())throw fn;if(!e)throw new Error("[teams.refreshSiteUrl] threadId cannot be null or empty");if(!t)throw new Error("[teams.refreshSiteUrl] Callback cannot be null");hc(Qn(Kd,"teams.refreshSiteUrl"),"teams.refreshSiteUrl",[e],t)}function Yd(){return!(!_r(or)||!or.supports.teams)}!function(e){e[e.Regular=0]="Regular",e[e.Private=1]="Private",e[e.Shared=2]="Shared"}(Qd||(Qd={}));class ef{static setTimeout(e,t){const n=performance.now(),r=Cn();return ef.setTimeoutCallbacks[r]={callback:e,timeoutInMs:t,startedAtInMs:n},r}static clearTimeout(e){delete ef.setTimeoutCallbacks[e]}static setInterval(e,t){ef.setTimeout((function n(){e(),ef.setTimeout(n,t)}),t)}static tick(){const e=performance.now(),t=[];for(const n in ef.setTimeoutCallbacks){const r=ef.setTimeoutCallbacks[n];e-r.startedAtInMs>=r.timeoutInMs&&t.push(n)}for(const e of t){ef.setTimeoutCallbacks[e].callback(),delete ef.setTimeoutCallbacks[e]}}}ef.setTimeoutCallbacks={};class tf{constructor(e,t){this.reportStatisticsResult=t,this.sampleCount=0,this.distributionBins=new Uint32Array(e)}processStarts(e,t,n,r){ef.tick(),this.suitableForThisSession(e,t,n,r)||this.reportAndResetSession(this.getStatistics(),e,r,t,n),this.start()}processEnds(){const e=performance.now()-this.frameProcessingStartedAt,t=Math.floor(Math.max(0,Math.min(this.distributionBins.length-1,e)));this.distributionBins[t]+=1,this.sampleCount+=1}getStatistics(){return this.currentSession?{effectId:this.currentSession.effectId,effectParam:this.currentSession.effectParam,frameHeight:this.currentSession.frameHeight,frameWidth:this.currentSession.frameWidth,duration:performance.now()-this.currentSession.startedAtInMs,sampleCount:this.sampleCount,distributionBins:this.distributionBins.slice()}:null}start(){this.frameProcessingStartedAt=performance.now()}suitableForThisSession(e,t,n,r){return this.currentSession&&this.currentSession.effectId===e&&this.currentSession.effectParam===r&&this.currentSession.frameWidth===t&&this.currentSession.frameHeight===n}reportAndResetSession(e,t,n,r,o){e&&this.reportStatisticsResult(e),this.resetCurrentSession(this.getNextTimeout(t,this.currentSession),t,n,r,o),this.timeoutId&&ef.clearTimeout(this.timeoutId),this.timeoutId=ef.setTimeout((()=>this.reportAndResetSession(this.getStatistics(),t,n,r,o)).bind(this),this.currentSession.timeoutInMs)}resetCurrentSession(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)}getNextTimeout(e,t){return t&&t.effectId===e?Math.min(tf.maxSessionTimeoutInMs,2*t.timeoutInMs):tf.initialSessionTimeoutInMs}}tf.initialSessionTimeoutInMs=1e3,tf.maxSessionTimeoutInMs=3e4;const nf="v2";class rf{constructor(e){this.reportPerformanceEvent=e,this.isFirstFrameProcessed=!1,this.frameProcessTimeLimit=100,this.frameProcessingStartedAt=0,this.frameProcessingTimeCost=0,this.processedFrameCount=0,this.performanceStatistics=new tf(rf.distributionBinSize,(e=>this.reportPerformanceEvent(Qn(nf,"videoPerformanceMonitor.performanceDataGenerated"),"video.performance.performanceDataGenerated",[e])))}startMonitorSlowFrameProcessing(){ef.setInterval((()=>{if(0===this.processedFrameCount)return;const e=this.frameProcessingTimeCost/this.processedFrameCount;e>this.frameProcessTimeLimit&&this.reportPerformanceEvent(Qn(nf,"videoPerformanceMonitor.startMonitorSlowFrameProcessing"),"video.performance.frameProcessingSlow",[e]),this.frameProcessingTimeCost=0,this.processedFrameCount=0}),rf.calculateFPSInterval)}setFrameProcessTimeLimit(e){this.frameProcessTimeLimit=e}reportApplyingVideoEffect(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)}reportVideoEffectChanged(e,t){void 0===this.applyingEffect||this.applyingEffect.effectId!==e&&this.applyingEffect.effectParam!==t||(this.appliedEffect={effectId:e,effectParam:t},this.applyingEffect=void 0,this.isFirstFrameProcessed=!1)}reportStartFrameProcessing(e,t){ef.tick(),this.appliedEffect&&(this.frameProcessingStartedAt=performance.now(),this.performanceStatistics.processStarts(this.appliedEffect.effectId,e,t,this.appliedEffect.effectParam))}reportFrameProcessed(){var e;this.appliedEffect&&(this.processedFrameCount++,this.frameProcessingTimeCost+=performance.now()-this.frameProcessingStartedAt,this.performanceStatistics.processEnds(),this.isFirstFrameProcessed||(this.isFirstFrameProcessed=!0,this.reportPerformanceEvent(Qn(nf,"videoPerformanceMonitor.reportFrameProcessed"),"video.performance.firstFrameProcessed",[Date.now(),this.appliedEffect.effectId,null===(e=this.appliedEffect)||void 0===e?void 0:e.effectParam])))}reportGettingTextureStream(e){this.gettingTextureStreamStartedAt=performance.now(),this.currentStreamId=e}reportTextureStreamAcquired(){if(void 0!==this.gettingTextureStreamStartedAt){const e=performance.now()-this.gettingTextureStreamStartedAt;this.reportPerformanceEvent(Qn(nf,"videoPerformanceMonitor.reportTextureStreamAcquired"),"video.performance.textureStreamAcquired",[this.currentStreamId,e])}}}rf.distributionBinSize=1e3,rf.calculateFPSInterval=1e3;var of=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())}))},af=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};const sf="v2",cf=kn()?void 0:new rf(hc);var uf,lf,df;function ff(e){if(_r(or,an.sidePanel),!vf())throw fn;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(vs(Qn(sf,"videoEffects.setFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==cf?void 0:cf.setFrameProcessTimeLimit(e.timeLimit)),!1),bf())wf(e.videoFrameHandler,e.config);else{if(!Af())throw fn;yf(e.videoBufferHandler,e.config)}null==cf||cf.startMonitorSlowFrameProcessing()}function pf(e,t){if(_r(or,an.sidePanel),!vf())throw fn;hc(Qn(sf,"videoEffects.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t])}function gf(e){if(_r(or,an.sidePanel),!vf())throw fn;vs(Qn(sf,"videoEffects.registerEffectParameterChangeHandler"),"video.effectParameterChange",Uf(e,cf),!1),hc(Qn(sf,"videoEffects.registerForVideoEffect"),"video.registerForVideoEffect")}function mf(e){hc(Qn(sf,"videoEffects.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function hf(e){hc(Qn(sf,"videoEffects.notifyError"),"video.notifyError",[e])}function vf(){return _r(or)&&!!or.supports.video&&(!!or.supports.video.mediaStream||!!or.supports.video.sharedFrame)}function wf(e,t){if(_r(or,an.sidePanel),!vf()||!bf())throw fn;vs(Qn(sf,"videoEffects.startVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(t=>of(this,void 0,void 0,(function*(){const{streamId:n}=t,r=Cf(e,cf);yield Tf(n,r,hf,cf)}))),!1),hc(Qn(sf,"videoEffects.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[t])}function Cf(e,t){return n=>of(this,void 0,void 0,(function*(){const r=n.videoFrame;null==t||t.reportStartFrameProcessing(r.codedWidth,r.codedHeight);const o=yield e(n);return null==t||t.reportFrameProcessed(),o}))}function yf(e,t){if(_r(or,an.sidePanel),!vf()||!Af())throw fn;vs(Qn(sf,"videoEffects.registerForVideoBufferHandler"),"video.newVideoFrame",(t=>{if(t){const n=t.timestamp;null==cf||cf.reportStartFrameProcessing(t.width,t.height),e(Sf(t),(()=>{null==cf||cf.reportFrameProcessed(),mf(n)}),hf)}}),!1),hc(Qn(sf,"videoEffects.registerForVideoFrame"),"video.registerForVideoFrame",[t])}function Sf(e){if("videoFrameBuffer"in e)return e;{const{data:t}=e,n=af(e,["data"]);return Object.assign(Object.assign({},n),{videoFrameBuffer:t})}}function bf(){var e;return _r(or,an.sidePanel)&&Ef()&&!!(null===(e=or.supports.video)||void 0===e?void 0:e.mediaStream)}function Ef(){var e,t,n,r;return!(!(null===(t=null===(e=Fn().chrome)||void 0===e?void 0:e.webview)||void 0===t?void 0:t.getTextureStream)||!(null===(r=null===(n=Fn().chrome)||void 0===n?void 0:n.webview)||void 0===r?void 0:r.registerTextureStream))}function Af(){var e;return _r(or,an.sidePanel)&&!!(null===(e=or.supports.video)||void 0===e?void 0:e.sharedFrame)}!function(e){e.NV12="NV12"}(uf||(uf={})),function(e){e.EffectChanged="EffectChanged",e.EffectDisabled="EffectDisabled"}(lf||(lf={})),function(e){e.InvalidEffectId="InvalidEffectId",e.InitializationFailure="InitializationFailure"}(df||(df={}));var If=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())}))};const Pf="v2";function Tf(e,t,n,r){var o,i;return If(this,void 0,void 0,(function*(){const a=Ff();!kn()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),kf(yield Rf(e,n,r),new Mf(n,t),a.writable)}))}function Of(e,t,n,r){var o,i;return If(this,void 0,void 0,(function*(){const a=Ff();!kn()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),kf(yield Rf(e,n,r),new Df(n,t),a.writable)}))}function Rf(e,t,n){return If(this,void 0,void 0,(function*(){if(kn())throw fn;const r=Fn().chrome;try{null==n||n.reportGettingTextureStream(e);const t=(yield r.webview.getTextureStream(e)).getVideoTracks();if(0===t.length)throw new Error(`No video track in stream ${e}`);return null==n||n.reportTextureStreamAcquired(),t[0]}catch(n){throw t(`Failed to get video track from stream ${e}, error: ${n}`),new Error(`Internal error: can't get video track from stream ${e}`)}}))}function Ff(){if(kn())throw fn;const e=window.MediaStreamTrackGenerator;if(!e)throw fn;return new e({kind:"video"})}function kf(e,t,n){new(0,Fn().MediaStreamTrackProcessor)({track:e}).readable.pipeThrough(new TransformStream(t)).pipeTo(n)}class Mf{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.transform=(e,t)=>If(this,void 0,void 0,(function*(){const n=e.timestamp;if(null!==n)try{const r=yield this.videoFrameHandler({videoFrame:e}),o=new VideoFrame(r,{timestamp:n});t.enqueue(o),e.close(),r.close()}catch(t){e.close(),this.notifyError(t)}else this.notifyError("timestamp of the original video frame is null")}))}}class Nf{constructor(e,t){if(this.headerBuffer=e,this.notifyError=t,this.ONE_TEXTURE_INPUT_ID=1869900081,this.INVALID_HEADER_ERROR="Invalid video frame header",this.UNSUPPORTED_LAYOUT_ERROR="Unsupported texture layout",this.headerDataView=new Uint32Array(e),this.headerDataView.length<8)throw this.notifyError(this.INVALID_HEADER_ERROR),new Error(this.INVALID_HEADER_ERROR);if(this.headerDataView[0]!==this.ONE_TEXTURE_INPUT_ID)throw this.notifyError(this.UNSUPPORTED_LAYOUT_ERROR),new Error(this.UNSUPPORTED_LAYOUT_ERROR)}get oneTextureLayoutId(){return this.headerDataView[0]}get version(){return this.headerDataView[1]}get frameRowOffset(){return this.headerDataView[2]}get frameFormat(){return this.headerDataView[3]}get frameWidth(){return this.headerDataView[4]}get frameHeight(){return this.headerDataView[5]}get multiStreamHeaderRowOffset(){return this.headerDataView[6]}get multiStreamCount(){return this.headerDataView[7]}}class xf{constructor(e,t){this.metadataMap=new Map,this.AUDIO_INFERENCE_RESULT_STREAM_ID=828664161,this.ATTRIBUTE_ID_MAP_STREAM_ID=1296320833;const n=new Uint32Array(e);for(let r=0,o=0;r<t;r++){const t=n[o++],r=n[o++],i=n[o++],a=new Uint8Array(e,r,i);this.metadataMap.set(t,a)}}get audioInferenceResult(){return this.metadataMap.get(this.AUDIO_INFERENCE_RESULT_STREAM_ID)}get attributes(){const e=this.metadataMap.get(this.ATTRIBUTE_ID_MAP_STREAM_ID);if(void 0===e)return;const t=new Map,n=new TextDecoder("utf-8");let r=0;const o=e[r]+(e[++r]<<8)+(e[++r]<<16)+(e[++r]<<24);for(let i=0;i<o&&r<e.length-1;i++){const o=e[++r]+(e[++r]<<8)+(e[++r]<<16)+(e[++r]<<24),i=e.findIndex(((e,t,n)=>0==e&&t>r)),a=n.decode(e.slice(++r,i)),s=this.metadataMap.get(o);void 0!==s&&t.set(a,s);r=i+(4-(i-r)%4-1)}return t}}class Df{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.shouldDiscardAudioInferenceResult=!1,this.transform=(e,t)=>If(this,void 0,void 0,(function*(){const n=e.timestamp;if(null!==n)try{const{videoFrame:r,metadata:{audioInferenceResult:o,attributes:i}={}}=yield this.extractVideoFrameAndMetadata(e),a=yield this.videoFrameHandler({videoFrame:r,audioInferenceResult:o,attributes:i}),s=new VideoFrame(a,{timestamp:n});t.enqueue(s),r.close(),e.close(),a.close()}catch(t){e.close(),this.notifyError(t)}else this.notifyError("timestamp of the original video frame is null")})),this.extractVideoFrameAndMetadata=e=>If(this,void 0,void 0,(function*(){if(kn())throw fn;if("NV12"!==e.format)throw this.notifyError("Unsupported video frame pixel format"),new Error("Unsupported video frame pixel format");const t={x:0,y:0,width:e.codedWidth,height:2},n=new ArrayBuffer(t.width*t.height*3/2);yield e.copyTo(n,{rect:t});const r=new Nf(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);yield e.copyTo(i,{rect:o});const a=new xf(i,r.multiStreamCount);return{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,attributes:a.attributes}}})),vs(Qn(Pf,"videoEffectsUtils.transformerWithMetadata.constructor"),"video.mediaStream.audioInferenceDiscardStatusChange",(({discardAudioInferenceResult:e})=>{this.shouldDiscardAudioInferenceResult=e}))}}function Uf(e,t){return(n,r)=>{null==t||t.reportApplyingVideoEffect(n||"",r),e(n,r).then((()=>{null==t||t.reportVideoEffectChanged(n||"",r),hc(Qn(Pf,"videoEffectsUtils.reportVideoEffectChanged"),"video.videoEffectReadiness",[!0,n,void 0,r])})).catch((e=>{const t=e in df?e:df.InitializationFailure;hc(Qn(Pf,"videoEffectsUtils.effectFailure"),"video.videoEffectReadiness",[!1,n,t,r])}))}}var Lf=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())}))};const Hf="v2",_f=2e3,Vf=kn()?void 0:new rf(hc);var Bf;function Wf(e){var t,n;if(!Kf())throw fn;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(_r(or,an.sidePanel)){if(vs(Qn(Hf,"videoEffectsEX.registerSetFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==Vf?void 0:Vf.setFrameProcessTimeLimit(e)),!1),null===(t=or.supports.video)||void 0===t?void 0:t.mediaStream)vs(Qn(Hf,"videoEffectsEX.registerStartVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(t=>Lf(this,void 0,void 0,(function*(){const{streamId:n,metadataInTexture:r}=t,o=Vf?zf(e.videoFrameHandler,Vf):e.videoFrameHandler;r?yield Of(n,o,Zf,Vf):yield Tf(n,o,Zf,Vf)}))),!1),hc(Qn(Hf,"videoEffectsEX.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[e.config]);else{if(!(null===(n=or.supports.video)||void 0===n?void 0:n.sharedFrame))throw fn;vs(Qn(Hf,"videoEffectsEx.registerNewVideoFrameHandler"),"video.newVideoFrame",(t=>{if(t){null==Vf||Vf.reportStartFrameProcessing(t.width,t.height);const n=jf(),r=t.timestamp;e.videoBufferHandler($f(t),(()=>{n(),null==Vf||Vf.reportFrameProcessed(),Qf(r)}),Zf)}}),!1),hc(Qn(Hf,"videoEffectsEx.registerForVideoFrame"),"video.registerForVideoFrame",[e.config])}null==Vf||Vf.startMonitorSlowFrameProcessing()}}function jf(){const e=setTimeout((()=>{Zf(`Frame not processed in ${_f}ms`,Bf.Warn)}),_f);return function(){clearTimeout(e)}}function zf(e,t){return n=>Lf(this,void 0,void 0,(function*(){const r=n.videoFrame;t.reportStartFrameProcessing(r.codedWidth,r.codedHeight);const o=jf(),i=yield e(n);return o(),t.reportFrameProcessed(),i}))}function $f(e){return e.videoFrameBuffer=e.videoFrameBuffer||e.data,delete e.data,e}function qf(e,t,n){if(_r(or,an.sidePanel),!Kf())throw fn;hc(Qn(Hf,"videoEffectsEx.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t,n])}function Gf(e){if(_r(or,an.sidePanel),!Kf())throw fn;vs(Qn(Hf,"videoEffectsEx.registerEffectParamterChangeHandler"),"video.effectParameterChange",Uf(e,Vf),!1),hc(Qn(Hf,"videoEffectsEx.registerForVideoEffect"),"video.registerForVideoEffect")}function Jf(e){if(_r(or,an.sidePanel),!vf())throw fn;hc(Qn(Hf,"videoEffectsEx.updatePersonalizedEffects"),"video.personalizedEffectsChanged",[e])}function Kf(){return _r(or),vf()}function Qf(e){hc(Qn(Hf,"videoEffectsEx.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function Zf(e,t=Bf.Warn){hc(Qn(Hf,"videoEffectsEx.notifyError"),"video.notifyError",[e,t])}function Xf(e){if(_r(or),!vf())throw fn;Zf(e,Bf.Fatal)}!function(e){e.Fatal="fatal",e.Warn="warn"}(Bf||(Bf={}));const Yf="v2";class ep extends Bi{validate(e){return"ConfigurableTab"===e.tabType}deserialize(e){return e}}class tp{constructor(e){this.configurableTabInstance=e}serialize(){return this.configurableTabInstance}}class np{constructor(e){this.hostEntityId=e}serialize(){return this.hostEntityId}}class rp extends Bi{validate(e){return"ConfigurableTab"===e.tabType||"StaticTab"===e.tabType}deserialize(e){return e}}class op{constructor(e){this.hostEntityTabInstance=e}serialize(){return this.hostEntityTabInstance}}class ip extends Bi{validate(e){const t=new rp;let n=!0;return e.allTabs&&e.allTabs.forEach((e=>{n||(n=t.validate(e))})),n}deserialize(e){return e}}function ap(e,t){if(_r(or),!dp())throw new Error(`Error code: ${Ne.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);if(fp(e.threadId),t&&0===t.length)throw new Error(`Error code: ${Ne.INVALID_ARGUMENTS}, message: App types cannot be an empty array`);return dc("hostEntity.tab.addAndConfigure",[new np(e),t],new rp,Qn(Yf,"hostEntity.tab.addAndConfigure"))}function sp(e){if(_r(or),!dp())throw new Error(`Error code: ${Ne.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return fp(e.threadId),dc("hostEntity.tab.getAll",[new np(e)],new ip,Qn(Yf,"hostEntity.tab.getAll"))}function cp(e,t){if(_r(or),!dp())throw new Error(`Error code: ${Ne.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return pp(e),fp(t.threadId),dc("hostEntity.tab.reconfigure",[new tp(e),new np(t)],new ep,Qn(Yf,"hostEntity.tab.reconfigure"))}function up(e,t){if(_r(or),!dp())throw new Error(`Error code: ${Ne.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return pp(e),fp(t.threadId),dc("hostEntity.tab.rename",[new tp(e),new np(t)],new ep,Qn(Yf,"hostEntity.tab.rename"))}function lp(e,t){if(_r(or),!dp())throw new Error(`Error code: ${Ne.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return fp(t.threadId),pp(e),dc("hostEntity.tab.remove",[new op(e),new np(t)],new Wi,Qn(Yf,"hostEntity.tab.remove"))}function dp(){var e;return!!(_r(or)&&mp()&&(null===(e=or.supports.hostEntity)||void 0===e?void 0:e.tab))}function fp(e){if(!e||0==e.length)throw new Error(`Error code: ${Ne.INVALID_ARGUMENTS}, message: ThreadId cannot be null or empty`)}function pp(e){if(!(null==e?void 0:e.internalTabInstanceId)||0===e.internalTabInstanceId.length)throw new Error(`Error code: ${Ne.INVALID_ARGUMENTS}, message: TabId cannot be null or empty`)}var gp;function mp(){return!(!_r(or)||!or.supports.hostEntity)}!function(e){e.edu="EDU",e.baseTownhall="BASE_TOWNHALL",e.streamingTownhall="STREAMING_TOWNHALL"}(gp||(gp={}));var hp=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())}))};const vp="v2",wp="Invalid store dialog size",Cp="No App Id present, but AppId needed to open AppDetail store",yp="No Collection Id present, but CollectionId needed to open a store specific to a collection";function Sp(e){return hp(this,void 0,void 0,(function*(){Pp();const{size:t}=null!=e?e:{};return fc("store.openFullStore",[Tp(t)],Qn(vp,"store.openFullStore"))}))}function bp(e){return hp(this,void 0,void 0,(function*(){Pp();const{size:t,appId:n}=e;if(!(n instanceof Xr))throw new Error(Cp);return fc("store.openAppDetail",[Tp(t),n],Qn(vp,"store.openAppDetail"))}))}function Ep(e){return hp(this,void 0,void 0,(function*(){Pp();const{size:t,appCapability:n,appMetaCapabilities:r,installationScope:o,filteredOutAppIds:i}=null!=e?e:{};return fc("store.openInContextStore",[Tp(t),n,r,o,null==i?void 0:i.map((e=>e.toString()))],Qn(vp,"store.openInContextStore"))}))}function Ap(e){return hp(this,void 0,void 0,(function*(){Pp();const{size:t,collectionId:n}=e;if(void 0===n)throw new Error(yp);return fc("store.openSpecificStore",[Tp(t),n],Qn(vp,"store.openSpecificStore"))}))}function Ip(){return _r(or)&&!!or.supports.store}function Pp(){if(_r(or,an.content,an.sidePanel,an.meetingStage),!Ip())throw fn}function Tp(e){if(void 0===e)return;const{width:t,height:n}=e;if(void 0!==t&&"number"==typeof t&&t<0)throw new Error(wp);if(void 0!==n&&"number"==typeof n&&n<0)throw new Error(wp);return JSON.stringify(e)}var Op=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())}))};const Rp="v1",Fp="v2";let kp;function Mp(e){kp=e}function Np(e){const t=void 0!==e,n=t?e:kp;if(!n)throw new Error("No parameters are provided for authentication");_r(or,an.content,an.sidePanel,an.settings,an.remove,an.task,an.stage,an.meetingStage);return xp(n.successCallback||n.failureCallback?Qn(Rp,"authentication.authenticate"):Qn(Fp,"authentication.authenticate"),n).then((e=>{try{return n&&n.successCallback?(n.successCallback(e),""):e}finally{t||(kp=void 0)}})).catch((e=>{try{if(n&&n.failureCallback)return n.failureCallback(e.message),"";throw e}finally{t||(kp=void 0)}}))}function xp(e,t){return Op(this,void 0,void 0,(function*(){const n=xn(t.url);return Nn(n),uc(e,"authentication.authenticate",[n.href,t.width,t.height,t.isExternal]).then((([e,t])=>{if(e)return t;throw new Error(t)}))}))}function Dp(e){Hr();return Up(e&&(e.successCallback||e.failureCallback)?Qn(Rp,"authentication.getAuthToken"):Qn(Fp,"authentication.getAuthToken"),e).then((t=>e&&e.successCallback?(e.successCallback(t),""):t)).catch((t=>{if(e&&e.failureCallback)return e.failureCallback(t.message),"";throw t}))}function Up(e,t){return new Promise((n=>{n(uc(e,"authentication.getAuthToken",[null==t?void 0:t.resources,null==t?void 0:t.claims,null==t?void 0:t.silent,null==t?void 0:t.tenantId]))})).then((([e,t])=>{if(e)return t;throw new Error(t)}))}function Lp(e){Hr();return Hp(e&&(e.successCallback||e.failureCallback)?Qn(Rp,"authentication.getUser"):Qn(Fp,"authentication.getUser")).then((t=>e&&e.successCallback?(e.successCallback(t),null):t)).catch((t=>{const n=`Error returned, code = ${t.errorCode}, message = ${t.message}`;if(e&&e.failureCallback)return e.failureCallback(n),null;throw new Error(n)}))}function Hp(e){return new Promise((t=>{t(uc(e,"authentication.getUser"))})).then((([e,t])=>{if(e)return t;throw t}))}function _p(e,t){_r(or,an.authentication);hc(Qn(t?Rp:Fp,"authentication.notifySuccess"),"authentication.authenticate.success",[e]),Vc(tc.parentWindow,(()=>setTimeout((()=>tc.currentWindow.close()),200)))}function Vp(e,t){_r(or,an.authentication);hc(Qn(t?Rp:Fp,"authentication.notifyFailure"),"authentication.authenticate.failure",[e]),Vc(tc.parentWindow,(()=>setTimeout((()=>tc.currentWindow.close()),200)))}var Bp;function Wp(e){const t=!e||e.length<=0,n=null==e?void 0:e.indexOf("@"),r=null==e?void 0:e.indexOf(".",n);if(t||-1===n||-1===r)throw new Error("Input email address does not have the correct format.")}!function(e){e.Public="public",e.EUDB="eudb",e.Other="other"}(Bp||(Bp={}));class jp{constructor(e){this.val=e,Wp(e)}toString(){return this.val}}const zp="/l/app/",$p="/l/meeting/new",qp="attendees",Gp="startTime",Jp="endTime",Kp="subject",Qp="content",Zp="/l/call/0/0",Xp="source",Yp="withVideo",eg="/l/chat/0/0",tg="users",ng="topicName",rg="message";function og(e,t,n){if(0===e.length)throw new Error("Must have at least one user when creating a chat deep link");const r=`${tg}=`+e.map((e=>encodeURIComponent(e))).join(","),o=void 0===t?"":`&${ng}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${rg}=${encodeURIComponent(n)}`;return`${rt}://${ot}${eg}?${r}${o}${i}`}function ig(e,t,n){if(0===e.length)throw new Error("Must have at least one target when creating a call deep link");const r=`${tg}=`+e.map((e=>encodeURIComponent(e))).join(","),o=void 0===t?"":`&${Yp}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${Xp}=${encodeURIComponent(n)}`;return`${rt}://${ot}${Zp}?${r}${o}${i}`}function ag(e,t,n,r,o){const i=void 0===e?"":`${qp}=`+e.map((e=>encodeURIComponent(e))).join(","),a=void 0===t?"":`&${Gp}=${encodeURIComponent(t)}`,s=void 0===n?"":`&${Jp}=${encodeURIComponent(n)}`,c=void 0===r?"":`&${Kp}=${encodeURIComponent(r)}`,u=void 0===o?"":`&${Qp}=${encodeURIComponent(o)}`;return`${rt}://${ot}${$p}?${i}${a}${s}${c}${u}`}function sg(e){if(!e)throw new Error("App ID must be set when creating an app install dialog deep link");return`${rt}://${ot}${zp}${encodeURIComponent(e)}`}const cg="v1";function ug(e){return new Promise((t=>{if(_r(or,an.content,an.sidePanel,an.settings,an.task,an.stage,an.meetingStage),!lg())throw new Error("Not supported");const n=Qn(cg,"appInstallDialog.openAppInstallDialog");or.isLegacyTeams?t(ac(n,"executeDeepLink",sg(e.appId))):(hc(n,"appInstallDialog.openAppInstallDialog",[e]),t())}))}function lg(){return!(!_r(or)||!or.supports.appInstallDialog)}const dg="v1",fg=Kn("media");var pg,gg,mg,hg,vg,wg,Cg;!function(e){e.Base64="base64",e.ID="id"}(pg||(pg={}));class yg{}function Sg(e){if(!e)throw new Error("[captureImage] Callback cannot be null");if(_r(or,an.content,an.task),zn.isFramelessWindow)if(Vr(Qe))hc(Qn(dg,"media.captureImage"),"captureImage",e);else{e({errorCode:Ne.OLD_PLATFORM},[])}else{e({errorCode:Ne.NOT_SUPPORTED_ON_PLATFORM},[])}}function bg(){if(_r(or,an.content,an.task),!Ag())throw fn;const e=xe.Media;return new Promise((t=>{t(cc(Qn(dg,"media.hasPermission"),"permissions.has",e))}))}function Eg(){if(_r(or,an.content,an.task),!Ag())throw fn;const e=xe.Media;return new Promise((t=>{t(cc(Qn(dg,"media.requestPermission"),"permissions.request",e))}))}function Ag(){return!(!_r(or)||!or.supports.permissions)}class Ig extends yg{constructor(e){super(),e&&(this.content=e.content,this.format=e.format,this.mimeType=e.mimeType,this.name=e.name,this.preview=e.preview,this.size=e.size)}getMedia(e){if(!e)throw new Error("[get Media] Callback cannot be null");if(_r(or,an.content,an.task),Vr(Ze))if(_g(this.mimeType,this.format,this.content))Vr("2.0.0")?this.getMediaViaCallback(e):this.getMediaViaHandler(e);else{e({errorCode:Ne.INVALID_ARGUMENTS},new Blob)}else{e({errorCode:Ne.OLD_PLATFORM},new Blob)}}getMediaViaCallback(e){const t={mediaMimeType:this.mimeType,assembleAttachment:[]},n=[this.content];hc(Qn(dg,"media.getMedia"),"getMedia",n,(function(n){if(e)if(n&&n.error)e(n.error,new Blob);else if(n&&n.mediaChunk)if(n.mediaChunk.chunkSequence<=0){const r=kg(t.assembleAttachment,t.mediaMimeType);e(n.error,null!=r?r:new Blob)}else{const e=Mg(n.mediaChunk,t.mediaMimeType);e?t.assembleAttachment.push(e):fg(`Received a null assemble attachment for when decoding chunk sequence ${n.mediaChunk.chunkSequence}; not including the chunk in the assembled file.`)}else e({errorCode:Ne.INTERNAL_ERROR,message:"data received is null"},new Blob)}))}getMediaViaHandler(e){const t=Cn(),n={mediaMimeType:this.mimeType,assembleAttachment:[]},r=[t,this.content];this.content&&!Yr(e)&&hc(Qn(dg,"media.getMedia"),"getMedia",r),vs(Qn(dg,"media.registerGetMediaRequestHandler"),"getMedia"+t,(function(r){if(e){const o=JSON.parse(r);if(o.error)e(o.error,new Blob),ws("getMedia"+t);else if(o.mediaChunk)if(o.mediaChunk.chunkSequence<=0){const r=kg(n.assembleAttachment,n.mediaMimeType);e(o.error,null!=r?r:new Blob),ws("getMedia"+t)}else{const e=Mg(o.mediaChunk,n.mediaMimeType);e&&n.assembleAttachment.push(e)}else e({errorCode:Ne.INTERNAL_ERROR,message:"data received is null"},new Blob),ws("getMedia"+t)}}))}}class Pg{constructor(e){this.controllerCallback=e}notifyEventToHost(e,t){_r(or,an.content,an.task);try{Wr($e)}catch(e){return void(t&&t(e))}const n={mediaType:this.getMediaType(),mediaControllerEvent:e};hc(Qn(dg,"media.controller"),"media.controller",[n],(e=>{t&&t(e)}))}stop(e){this.notifyEventToHost(gg.StopRecording,e)}}class Tg extends Pg{getMediaType(){return vg.Video}notifyEventToApp(e){if(this.controllerCallback)switch(e){case gg.StartRecording:if(this.controllerCallback.onRecordingStarted){this.controllerCallback.onRecordingStarted();break}}}}function Og(e,t){if(!t)throw new Error("[select Media] Callback cannot be null");if(_r(or,an.content,an.task),!Vr(Ze)){const e={errorCode:Ne.OLD_PLATFORM};return void t(e,[])}try{Ng(e)}catch(e){return void t(e,[])}if(!Dg(e)){const e={errorCode:Ne.INVALID_ARGUMENTS};return void t(e,[])}const n=[e];hc(Qn(dg,"media.selectMedia"),"selectMedia",n,((n,r,o)=>{var i,a;if(o)return void(xg(e)&&(null===(a=null===(i=null==e?void 0:e.videoProps)||void 0===i?void 0:i.videoController)||void 0===a||a.notifyEventToApp(o)));if(!r)return void t(n,[]);const s=[];for(const e of r)s.push(new Ig(e));t(n,s)}))}function Rg(e,t){if(!t)throw new Error("[view images] Callback cannot be null");if(_r(or,an.content,an.task),!Vr(Ze)){return void t({errorCode:Ne.OLD_PLATFORM})}if(!Vg(e)){return void t({errorCode:Ne.INVALID_ARGUMENTS})}const n=[e];hc(Qn(dg,"media.viewImages"),"viewImages",n,t)}function Fg(e,t){if(!e)throw new Error("[media.scanBarCode] Callback cannot be null");if(_r(or,an.content,an.task),zn.hostClientType!==rn.desktop&&zn.hostClientType!==rn.web&&zn.hostClientType!==rn.rigel&&zn.hostClientType!==rn.teamsRoomsWindows&&zn.hostClientType!==rn.teamsRoomsAndroid&&zn.hostClientType!==rn.teamsPhones&&zn.hostClientType!==rn.teamsDisplays)if(Vr(Xe))if(Bg(t))hc(Qn(dg,"media.scanBarCode"),"media.scanBarCode",[t],e);else{e({errorCode:Ne.INVALID_ARGUMENTS},"")}else{e({errorCode:Ne.OLD_PLATFORM},"")}else{e({errorCode:Ne.NOT_SUPPORTED_ON_PLATFORM},"")}}function kg(e,t){if(null==e||null==t||e.length<=0)return null;let n=null,r=1;return e.sort(((e,t)=>e.sequence>t.sequence?1:-1)),e.forEach((e=>{e.sequence==r&&(n=n?new Blob([n,e.file],{type:t}):new Blob([e.file],{type:t}),r++)})),n}function Mg(e,t){if(null==e||null==t)return null;const n=atob(e.chunk),r=new Array(n.length);for(let e=0;e<n.length;e++)r[e]=n.charCodeAt(e);const o=new Uint8Array(r),i=new Blob([o],{type:t});return{sequence:e.chunkSequence,file:i}}function Ng(e){Lg(e)?Wr(ze):Hg(e)?Wr($e):Ug(e)&&Wr(qe)}function xg(e){return!(e.mediaType!=vg.Video||!e.videoProps||!e.videoProps.videoController)}function Dg(e){return!(null==e||e.maxMediaCount>10)}function Ug(e){var t;return!((null==e?void 0:e.mediaType)!=vg.Image||!(null===(t=null==e?void 0:e.imageProps)||void 0===t?void 0:t.imageOutputFormats))}function Lg(e){return!(!e||e.mediaType!=vg.VideoAndImage&&!e.videoAndImageProps)}function Hg(e){return!(!e||e.mediaType!=vg.Video||!e.videoProps||e.videoProps.isFullScreenMode)}function _g(e,t,n){return null!=e&&null!=t&&t==pg.ID&&null!=n}function Vg(e){return!(null==e||e.length<=0||e.length>10)}function Bg(e){return!e||!(null===e.timeOutIntervalInSec||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec<=0||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec>60)}function Wg(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){e[e.StartRecording=1]="StartRecording",e[e.StopRecording=2]="StopRecording"}(gg||(gg={})),function(e){e[e.Photo=1]="Photo",e[e.Document=2]="Document",e[e.Whiteboard=3]="Whiteboard",e[e.BusinessCard=4]="BusinessCard"}(mg||(mg={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(hg||(hg={})),function(e){e[e.Image=1]="Image",e[e.Video=2]="Video",e[e.VideoAndImage=3]="VideoAndImage",e[e.Audio=4]="Audio"}(vg||(vg={})),function(e){e[e.ID=1]="ID",e[e.URL=2]="URL"}(wg||(wg={})),function(e){e[e.IMAGE=1]="IMAGE",e[e.PDF=2]="PDF"}(Cg||(Cg={}));const jg="v2";function zg(e){return new Promise((t=>{if(_r(or,an.content,an.task),!Gg())throw fn;if(!Bg(e))throw{errorCode:Ne.INVALID_ARGUMENTS};t(cc(Qn(jg,"barCode.scanBarCode"),"media.scanBarCode",e))}))}function $g(){if(_r(or,an.content,an.task),!Gg())throw fn;const e=xe.Media;return new Promise((t=>{t(cc(Qn(jg,"barCode.hasPermission"),"permissions.has",e))}))}function qg(){if(_r(or,an.content,an.task),!Gg())throw fn;const e=xe.Media;return new Promise((t=>{t(cc(Qn(jg,"barCode.requestPermission"),"permissions.request",e))}))}function Gg(){return!!(_r(or)&&or.supports.barCode&&or.supports.permissions)}const Jg="v2";function Kg(e){return Qg(Qn(Jg,"chat.openChat"),e)}function Qg(e,t){return new Promise((n=>{if(_r(or,an.content,an.task),!Xg())throw fn;if(or.isLegacyTeams)n(ac(e,"executeDeepLink",og([t.user],void 0,t.message)));else{n(ac(e,"chat.openChat",{members:[t.user],message:t.message}))}}))}function Zg(e){const t=Qn(Jg,"chat.openGroupChat");return new Promise((n=>{if(e.users.length<1)throw Error("OpenGroupChat Failed: No users specified");if(1===e.users.length){const r={user:e.users[0],message:e.message};n(Qg(t,r))}else{if(_r(or,an.content,an.task),!Xg())throw fn;if(or.isLegacyTeams)n(ac(t,"executeDeepLink",og(e.users,e.topic,e.message)));else{n(ac(t,"chat.openChat",{members:e.users,message:e.message,topic:e.topic}))}}}))}function Xg(){return!(!_r(or)||!or.supports.chat)}var Yg=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())}))};const em="v2";function tm(e){return Yg(this,void 0,void 0,(function*(){if(_r(or,an.content,an.meetingStage,an.task,an.settings,an.stage,an.sidePanel),!rm())throw fn;if(!e.type||!Object.values(_e).includes(e.type))throw new Error(`Blob type ${e.type} is not supported. Supported blob types are ${Object.values(_e)}`);const t=yield Rn(e),n={mimeType:e.type,content:t};return cc(Qn(em,"clipboard.write"),"clipboard.writeToClipboard",n)}))}function nm(){return Yg(this,void 0,void 0,(function*(){_r(or,an.content,an.meetingStage,an.task,an.settings,an.stage,an.sidePanel);const e=Qn(em,"clipboard.read");if(!rm())throw fn;const t=yield cc(e,"clipboard.readFromClipboard");if("string"==typeof t){const e=JSON.parse(t);return On(e.mimeType,e.content)}return t}))}function rm(){return zn.isFramelessWindow?!(!_r(or)||!or.supports.clipboard):!!(_r(or)&&navigator&&navigator.clipboard&&or.supports.clipboard)}var om=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())}))};const im="v2",am={validate:e=>Array.isArray(e)||"object"==typeof e,deserialize:e=>e};var sm;function cm(){var e;return null!==(e=_r(or)&&(or.isNAAChannelRecommended||pm()))&&void 0!==e&&e}function um(){return _r(or),tc.parentOrigin}function lm(){var e;return null!==(e=_r(or)&&or.canParentManageNAATrustedOrigins)&&void 0!==e&&e}function dm(){var e;return null!==(e=_r(or)&&(or.isDeeplyNestedAuthSupported||fm()))&&void 0!==e&&e}function fm(){return!!(_r(or)&&gm()&&or.isLegacyTeams&&Vr(dr))}function pm(){return!!(_r(or)&&gm()&&or.isLegacyTeams&&or.supports.nestedAppAuth)}function gm(){return zn.hostClientType===rn.android||zn.hostClientType===rn.ios||zn.hostClientType===rn.ipados||zn.hostClientType===rn.visionOS}function mm(e){return om(this,void 0,void 0,(function*(){if(!lm())throw fn;const t=e.map(wm);return vm(sm.ADD,t)}))}function hm(e){return om(this,void 0,void 0,(function*(){if(!lm())throw fn;const t=e.map(wm);return vm(sm.DELETE,t)}))}function vm(e,t){return om(this,void 0,void 0,(function*(){if(window.parent!==window.top)throw new Error("This API is only available in the top-level parent.");if(!Array.isArray(t)||0===t.length)throw new Error(`The '${t}' parameter is required and must be a non-empty array.`);return dc("nestedAppAuth.manageNAATrustedOrigins",[new Cm(e,t)],am,Qn(im,"nestedAppAuth.manageNAATrustedOrigins"))}))}function wm(e){try{return new URL(e).origin.toLowerCase()}catch(t){throw new Error(`Invalid origin provided: ${e}`)}}!function(e){e.ADD="ADD",e.DELETE="DELETE"}(sm||(sm={}));class Cm{constructor(e,t){this.action=e,this.appOrigins=t}serialize(){return{action:this.action,appOrigins:this.appOrigins}}}const ym="v2";function Sm(){if(_r(or,an.content,an.task),!Em())throw fn;return cc(Qn(ym,"geoLocation.map.chooseLocation"),"location.getLocation",{allowChooseLocation:!0,showMap:!0})}function bm(e){if(_r(or,an.content,an.task),!Em())throw fn;if(!e)throw{errorCode:Ne.INVALID_ARGUMENTS};return cc(Qn(ym,"geoLocation.showLocation"),"location.showLocation",e)}function Em(){return!!(_r(or)&&or.supports.geoLocation&&or.supports.geoLocation.map&&or.supports.permissions)}const Am="v2";function Im(){if(_r(or,an.content,an.task),!Om())throw fn;return cc(Qn(Am,"geoLocation.getCurrentLocation"),"location.getLocation",{allowChooseLocation:!1,showMap:!1})}function Pm(){if(_r(or,an.content,an.task),!Om())throw fn;const e=xe.GeoLocation;return new Promise((t=>{t(cc(Qn(Am,"geoLocation.hasPermission"),"permissions.has",e))}))}function Tm(){if(_r(or,an.content,an.task),!Om())throw fn;const e=xe.GeoLocation;return new Promise((t=>{t(cc(Qn(Am,"geoLocation.requestPermission"),"permissions.request",e))}))}function Om(){return!!(_r(or)&&or.supports.geoLocation&&or.supports.permissions)}function Rm(){return or.hostVersionsInfo?or.hostVersionsInfo.adaptiveCardSchemaVersion:void 0}const Fm="v1";class km{postMessage(e,t){_r(or),hc(Qn(Fm,"appWindow.childAppWindow.postMessage"),"messageForChild",[e],t||vn())}addEventListener(e,t){_r(or),"message"===e&&vs(Qn(Fm,"appWindow.childAppWindow.addEventListener"),"messageForParent",t)}}class Mm{static get Instance(){return this._instance||(this._instance=new this)}postMessage(e,t){_r(or,an.task),hc(Qn(Fm,"appWindow.parentAppWindow.postMessage"),"messageForParent",[e],t||vn())}addEventListener(e,t){_r(or,an.task),"message"===e&&vs(Qn(Fm,"appWindow.parentAppWindow.addEventListener"),"messageForChild",t)}}const Nm="v2";function xm(e){if(_r(or,an.content),!Dm())throw fn;if(!e||!Tn(e))throw{errorCode:Ne.INVALID_ARGUMENTS,message:"Invalid Url: Only https URL is allowed"};return cc(Qn(Nm,"secondaryBrowser.openUrl"),"secondaryBrowser.open",e.toString())}function Dm(){return!(!_r(or)||!or.supports.secondaryBrowser)}const Um="v1";function Lm(e,t){if(!t)throw new Error("[location.getLocation] Callback cannot be null");if(_r(or,an.content,an.task),!Vr(Je))throw{errorCode:Ne.OLD_PLATFORM};if(!e)throw{errorCode:Ne.INVALID_ARGUMENTS};if(!_m())throw fn;hc(Qn(Um,"location.getLocation"),"location.getLocation",[e],t)}function Hm(e,t){if(!t)throw new Error("[location.showLocation] Callback cannot be null");if(_r(or,an.content,an.task),!Vr(Je))throw{errorCode:Ne.OLD_PLATFORM};if(!e)throw{errorCode:Ne.INVALID_ARGUMENTS};if(!_m())throw fn;hc(Qn(Um,"location.showLocation"),"location.showLocation",[e],t)}function _m(){return!(!_r(or)||!or.supports.location)}const Vm="v1";function Bm(e){_r(or,an.sidePanel),e.contentUrl&&new URL(e.contentUrl),hc(Qn(Vm,"meeting.appShareButton.setOptions"),"meeting.appShareButton.setOptions",[e])}var Wm=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())}))};const jm="v1";var zm,$m,qm,Gm,Jm,Km;function Qm(e){if(!e)throw new Error("[get incoming client audio state] Callback cannot be null");_r(or,an.sidePanel,an.meetingStage),hc(Qn(jm,"meeting.getIncomingClientAudioState"),"getIncomingClientAudioState",e)}function Zm(e){if(!e)throw new Error("[toggle incoming client audio] Callback cannot be null");_r(or,an.sidePanel,an.meetingStage),hc(Qn(jm,"meeting.toggleIncomingClientAudio"),"toggleIncomingClientAudio",e)}function Xm(e){if(!e)throw new Error("[get meeting details] Callback cannot be null");_r(or,an.sidePanel,an.meetingStage,an.settings,an.content),hc(Qn(jm,"meeting.getMeetingDetails"),"meeting.getMeetingDetails",e)}function Ym(){var e,t,n;return Wm(this,void 0,void 0,(function*(){let r;_r(or,an.sidePanel,an.meetingStage,an.settings,an.content);try{const e=!0;r=yield cc(Qn("v2","meeting.getMeetingDetailsVerbose"),"meeting.getMeetingDetails",e)}catch(t){throw new Error(null===(e=null==t?void 0:t.errorCode)||void 0===e?void 0:e.toString())}if(((null===(t=r.details)||void 0===t?void 0:t.type)==Gm.GroupCall||(null===(n=r.details)||void 0===n?void 0:n.type)==Gm.OneOnOneCall)&&!r.details.originalCallerInfo)throw new Error(Ne.NOT_SUPPORTED_ON_PLATFORM.toString());return r}))}function eh(e){if(!e)throw new Error("[get Authentication Token For AnonymousUser] Callback cannot be null");_r(or,an.sidePanel,an.meetingStage,an.task),hc(Qn(jm,"meeting.getAuthenticationTokenForAnonymousUser"),"meeting.getAuthenticationTokenForAnonymousUser",e)}function th(e){if(!e)throw new Error("[get live stream state] Callback cannot be null");_r(or,an.sidePanel),hc(Qn(jm,"meeting.getLiveStreamState"),"meeting.getLiveStreamState",e)}function nh(e,t,n){if(!e)throw new Error("[request start live streaming] Callback cannot be null");_r(or,an.sidePanel),hc(Qn(jm,"meeting.requestStartLiveStreaming"),"meeting.requestStartLiveStreaming",[t,n],e)}function rh(e){if(!e)throw new Error("[request stop live streaming] Callback cannot be null");_r(or,an.sidePanel),hc(Qn(jm,"meeting.requestStopLiveStreaming"),"meeting.requestStopLiveStreaming",e)}function oh(e){if(!e)throw new Error("[register live stream changed handler] Handler cannot be null");_r(or,an.sidePanel),vs(Qn(jm,"meeting.registerLiveStreamChangedHandler"),"meeting.liveStreamChanged",e)}function ih(e,t,n={sharingProtocol:Jm.Collaborative}){if(!e)throw new Error("[share app content to stage] Callback cannot be null");_r(or,an.sidePanel,an.meetingStage),hc(Qn(jm,"meeting.shareAppContentToStage"),"meeting.shareAppContentToStage",[t,n],e)}function ah(e){if(!e)throw new Error("[get app content stage sharing capabilities] Callback cannot be null");_r(or,an.sidePanel,an.meetingStage),hc(Qn(jm,"meeting.getAppContentStageSharingCapabilities"),"meeting.getAppContentStageSharingCapabilities",e)}function sh(e){if(!e)throw new Error("[stop sharing app content to stage] Callback cannot be null");_r(or,an.sidePanel,an.meetingStage),hc(Qn(jm,"meeting.stopSharingAppContentToStage"),"meeting.stopSharingAppContentToStage",e)}function ch(e){if(!e)throw new Error("[get app content stage sharing state] Callback cannot be null");_r(or,an.sidePanel,an.meetingStage),hc(Qn(jm,"meeting.getAppContentStageSharingState"),"meeting.getAppContentStageSharingState",e)}function uh(e){if(!e)throw new Error("[registerSpeakingStateChangeHandler] Handler cannot be null");_r(or,an.sidePanel,an.meetingStage),vs(Qn(jm,"meeting.registerSpeakingStateChangeHandler"),"meeting.speakingStateChanged",e)}function lh(e){if(!e)throw new Error("[registerRaiseHandStateChangedHandler] Handler cannot be null");_r(or,an.sidePanel,an.meetingStage),vs(Qn(jm,"meeting.registerRaiseHandStateChangedHandler"),"meeting.raiseHandStateChanged",e)}function dh(e){if(!e)throw new Error("[registerMeetingReactionReceivedHandler] Handler cannot be null");_r(or,an.sidePanel,an.meetingStage),vs(Qn(jm,"meeting.registerMeetingReactionReceivedHandler"),"meeting.meetingReactionReceived",e)}function fh(e){if(void 0===(null==e?void 0:e.joinWebUrl)||null===(null==e?void 0:e.joinWebUrl))return Promise.reject(new Error("Invalid joinMeetingParams"));_r(or);const t={joinWebUrl:e.joinWebUrl.href,source:e.source||Km.Other};return cc(Qn("v2","meeting.joinMeeting"),"meeting.joinMeeting",t)}function ph(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");_r(or,an.sidePanel,an.meetingStage),e.isAppHandlingAudio?gh(e,t):mh(e,t)}function gh(e,t){hc(Qn(jm,"meeting.requestAppAudioHandling"),"meeting.requestAppAudioHandling",[e.isAppHandlingAudio],((n,r)=>{if(n&&null!=r)throw new Error("[requestAppAudioHandling] Callback response - both parameters cannot be set");if(n)throw new Error(`[requestAppAudioHandling] Callback response - SDK error ${n.errorCode} ${n.message}`);if("boolean"!=typeof r)throw new Error("[requestAppAudioHandling] Callback response - isHostAudioless must be a boolean");vs(Qn(jm,"meeting.registerMicStateChangeHandler"),"meeting.micStateChanged",(t=>Wm(this,void 0,void 0,(function*(){try{const n=yield e.micMuteStateChangedCallback(t);vh(n,n.isMicMuted===t.isMicMuted?zm.HostInitiated:zm.AppDeclinedToChange)}catch(e){vh(t,zm.AppFailedToChange)}}))));vs(Qn(jm,"meeting.registerAudioDeviceSelectionChangedHandler"),"meeting.audioDeviceSelectionChanged",(t=>{var n;null===(n=e.audioDeviceSelectionChangedCallback)||void 0===n||n.call(e,t)})),t(r)}))}function mh(e,t){hc(Qn(jm,"meeting.requestAppAudioHandling"),"meeting.requestAppAudioHandling",[e.isAppHandlingAudio],((e,n)=>{if(e&&null!=n)throw new Error("[requestAppAudioHandling] Callback response - both parameters cannot be set");if(e)throw new Error(`[requestAppAudioHandling] Callback response - SDK error ${e.errorCode} ${e.message}`);if("boolean"!=typeof n)throw new Error("[requestAppAudioHandling] Callback response - isHostAudioless must be a boolean");Cs("meeting.micStateChanged")&&ws("meeting.micStateChanged"),Cs("meeting.audioDeviceSelectionChanged")&&ws("meeting.audioDeviceSelectionChanged"),t(n)}))}function hh(e){vh(e,zm.AppInitiated)}function vh(e,t){_r(or,an.sidePanel,an.meetingStage),hc(Qn(jm,"meeting.setMicStateWithReason"),"meeting.updateMicState",[e,t])}!function(e){e[e.HostInitiated=0]="HostInitiated",e[e.AppInitiated=1]="AppInitiated",e[e.AppDeclinedToChange=2]="AppDeclinedToChange",e[e.AppFailedToChange=3]="AppFailedToChange"}(zm||(zm={})),function(e){e.like="like",e.heart="heart",e.laugh="laugh",e.surprised="surprised",e.applause="applause"}($m||($m={})),function(e){e.Unknown="Unknown",e.Adhoc="Adhoc",e.Scheduled="Scheduled",e.Recurring="Recurring",e.Broadcast="Broadcast",e.MeetNow="MeetNow"}(qm||(qm={})),function(e){e.OneOnOneCall="oneOnOneCall",e.GroupCall="groupCall"}(Gm||(Gm={})),function(e){e.Collaborative="Collaborative",e.ScreenShare="ScreenShare"}(Jm||(Jm={})),function(e){e.M365CalendarGridContextMenu="m365_calendar_grid_context_menu",e.M365CalendarGridPeek="m365_calendar_grid_peek",e.M365CalendarGridEventCardJoinButton="m365_calendar_grid_event_card_join_button",e.M365CalendarFormRibbonJoinButton="m365_calendar_form_ribbon_join_button",e.M365CalendarFormJoinTeamsMeetingButton="m365_calendar_form_join_teams_meeting_button",e.Other="other"}(Km||(Km={}));const wh="v1",Ch="v2";function yh(e,t){let n,r,o="";"function"==typeof e?(n=e,r=t,o=Qn(wh,"monetization.openPurchaseExperience")):(r=e,o=Qn(Ch,"monetization.openPurchaseExperience"));return _r(or,an.content),En((()=>new Promise((e=>{if(!Sh())throw fn;e(cc(o,"monetization.openPurchaseExperience",r))}))),n)}function Sh(){return!(!_r(or)||!or.supports.monetization)}const bh="v2";function Eh(e){return new Promise((t=>{if(_r(or,an.content),!Ih())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openCalendarItem");t(ac(Qn(bh,"calendar.openCalendarItem"),"calendar.openCalendarItem",e))}))}function Ah(e){return new Promise((t=>{if(_r(or,an.content),!Ih())throw new Error("Not supported");const n=Qn(bh,"calendar.composeMeeting");or.isLegacyTeams?t(ac(n,"executeDeepLink",ag(e.attendees,e.startTime,e.endTime,e.subject,e.content))):t(ac(n,"calendar.composeMeeting",e))}))}function Ih(){return!(!_r(or)||!or.supports.calendar)}const Ph="v2";function Th(e){e&&0!==e.length&&e.forEach((e=>{Wp(e)}))}function Oh(e){if(!e.handoffId||0==e.handoffId.trim().length||""===e.handoffId.trim())throw new Error("handoffId should not be null or empty string.");const t=e.composeMailParams;t.type===Uh.New&&(Th(t.toRecipients),Th(t.ccRecipients),Th(t.bccRecipients))}function Rh(e){if(_r(or,an.content),!Fh())throw new Error("Not supported");return Oh(e),fc("mail.handoff.composeMail",[new kh(e)],Qn(Ph,"mail.handoff.composeMail"))}function Fh(){return!!(_r(or)&&or.supports.mail&&or.supports.mail.handoff)}class kh{constructor(e){this.composeMailParamsWithHandoff=e}serialize(){return this.composeMailParamsWithHandoff}}const Mh="v2";function Nh(e){return new Promise((t=>{if(_r(or,an.content),!Dh())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openMailItem");t(ac(Qn(Mh,"mail.openMailItem"),"mail.openMailItem",e))}))}function xh(e){return new Promise((t=>{if(_r(or,an.content),!Dh())throw new Error("Not supported");t(ac(Qn(Mh,"mail.composeMail"),"mail.composeMail",e))}))}function Dh(){return!(!_r(or)||!or.supports.mail)}var Uh;!function(e){e.New="new",e.Reply="reply",e.ReplyAll="replyAll",e.Forward="forward"}(Uh||(Uh={}));const Lh="v2";function Hh(){if(!zn.printCapabilityEnabled){if(_r(or),!zh())throw fn;zn.printCapabilityEnabled=!0,document.addEventListener("keydown",(e=>{(e.ctrlKey||e.metaKey)&&80===e.keyCode&&(_h(),e.cancelBubble=!0,e.preventDefault(),e.stopImmediatePropagation())}))}}function _h(){Fn().print()}function Vh(e){Bh(Qn(Lh,"teamsAPIs_registerOnLoadHandler"),e,(()=>{if(!Yr(e)&&!zh())throw fn}))}function Bh(e,t,n){!Yr(t)&&_r(or),!Yr(t)&&n&&n(),Is(e,t)}function Wh(e){jh(Qn(Lh,"teamsAPIs_registerBeforeUnloadHandler"),e,(()=>{if(!Yr(e)&&!zh())throw fn}))}function jh(e,t,n){!Yr(t)&&_r(or),!Yr(t)&&n&&n(),Os(e,t)}function zh(){return!(!_r(or)||!or.supports.teamsCore)}const $h="v1",qh="v2";function Gh(e,t){let n,r;_r(or,an.content,an.task,an.settings);let o="";return"function"==typeof e?([n,r]=[e,t],o=Qn($h,"people.selectPeople")):(r=e,o=Qn(qh,"people.selectPeople")),Sn(Jh,n,o,r)}function Jh(e,t){return new Promise((n=>{if(!Vr(Ke))throw{errorCode:Ne.OLD_PLATFORM};if(!Wg(t))throw{errorCode:Ne.INVALID_ARGUMENTS};if(!Kh())throw fn;n(cc(e,"people.selectPeople",t))}))}function Kh(){return!(!_r(or)||!or.supports.people)}function Qh(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?Zh(e.persona):[!1,"triggerType must be a valid string"]:[!1,"targetElementBoundingRect must be a DOMRect"]:[!1,"A request object is required"]}function Zh(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"]}const Xh="v2";function Yh(e){return _r(or,an.content),new Promise((t=>{const[n,r]=Qh(e);if(!n)throw{errorCode:Ne.INVALID_ARGUMENTS,message:r};const o={modality:e.modality,persona:e.persona,triggerType:e.triggerType,targetRectangle:{x:e.targetElementBoundingRect.x,y:e.targetElementBoundingRect.y,width:e.targetElementBoundingRect.width,height:e.targetElementBoundingRect.height}};t(cc(Qn(Xh,"profile.showProfile"),"profile.showProfile",o))}))}function ev(){return!(!_r(or)||!or.supports.profile)}const tv="v2",nv="search.queryChange",rv="search.queryClose",ov="search.queryExecute";function iv(e,t,n){if(_r(or,an.content),!sv())throw fn;vs(Qn(tv,"search.registerOnClosedHandler"),rv,e),vs(Qn(tv,"search.registerOnExecutedHandler"),ov,t),n&&vs(Qn(tv,"search.registerOnChangeHandler"),nv,n)}function av(){if(_r(or,an.content),!sv())throw fn;hc(Qn(tv,"search.unregisterHandlers"),"search.unregister"),ws(nv),ws(rv),ws(ov)}function sv(){return!(!_r(or)||!or.supports.search)}function cv(){return new Promise((e=>{if(_r(or,an.content),!sv())throw new Error("Not supported");e(ac(Qn(tv,"search.closeSearch"),"search.closeSearch"))}))}var uv=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())}))};const lv="v2";function dv(){return uv(this,void 0,void 0,(function*(){if(_r(or,an.sidePanel,an.meetingStage),!fv())throw fn;return yield cc(Qn(lv,"sharing.history.getContent"),"sharing.history.getContent")}))}function fv(){var e;return _r(or)&&void 0!==(null===(e=or.supports.sharing)||void 0===e?void 0:e.history)}const pv="v1",gv="v2",mv={shareWebContent:"sharing.shareWebContent"};function hv(e,t){try{wv(e),Cv(e),yv(e)}catch(e){return bn((()=>Promise.reject(e)),t)}_r(or,an.content,an.sidePanel,an.task,an.stage,an.meetingStage);return bn(vv,t,Qn(t?pv:gv,"sharing.shareWebContent"),e)}function vv(e,t){return new Promise((n=>{if(!Sv())throw fn;n(cc(e,mv.shareWebContent,t))}))}function wv(e){if(!(e&&e.content&&e.content.length)){throw{errorCode:Ne.INVALID_ARGUMENTS,message:"Shared content is missing"}}}function Cv(e){let t;if(e.content.some((e=>!e.type)))throw t={errorCode:Ne.INVALID_ARGUMENTS,message:"Shared content type cannot be undefined"},t;if(e.content.some((t=>t.type!==e.content[0].type)))throw t={errorCode:Ne.INVALID_ARGUMENTS,message:"Shared content must be of the same type"},t}function yv(e){let t;if("URL"!==e.content[0].type)throw t={errorCode:Ne.INVALID_ARGUMENTS,message:"Content type is unsupported"},t;if(e.content.some((e=>!e.url)))throw t={errorCode:Ne.INVALID_ARGUMENTS,message:"URLs are required for URL content types"},t}function Sv(){return!(!_r(or)||!or.supports.sharing)}const bv="v2";function Ev(){return new Promise((e=>{if(_r(or,an.content),!Av())throw fn;e(cc(Qn(bv,"stageView.self.close"),"stageView.self.close"))}))}function Av(){var e;return _r(or)&&void 0!==(null===(e=or.supports.stageView)||void 0===e?void 0:e.self)}const Iv="v2";var Pv;function Tv(e){return new Promise((t=>{if(_r(or,an.content),!Ov())throw fn;if(!e)throw new Error("[stageView.open] Stage view params cannot be null");t(cc(Qn(Iv,"stageView.open"),"stageView.open",e))}))}function Ov(){return!(!_r(or)||!or.supports.stageView)}!function(e){e.modal="modal",e.popout="popout",e.popoutWithChat="popoutWithChat"}(Pv||(Pv={}));const Rv=10;var Fv=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())}))};const kv="v2";function Mv(e){return Fv(this,void 0,void 0,(function*(){_r(or,an.content,an.task),Dv(),Uv(e);const t=yield cc(Qn(kv,"visualMedia.image.captureImages"),"visualMedia.image.captureImages",e);return Lv(e.maxVisualMediaCount,t),t}))}function Nv(e){return Fv(this,void 0,void 0,(function*(){_r(or,an.content,an.task),Dv(),Uv(e);const t=yield cc(Qn(kv,"visualMedia.image.retrieveImages"),"visualMedia.image.retrieveImages",e);return Lv(e.maxVisualMediaCount,t),t}))}function xv(){return!!(_r(or)&&or.supports.visualMedia&&or.supports.visualMedia.image&&or.supports.permissions)}function Dv(){if(!xv())throw fn}function Uv(e){if(!e||e.maxVisualMediaCount>Rv||e.maxVisualMediaCount<1)throw mn}function Lv(e,t){if(t.length>e)throw hn}const Hv="v2";var _v,Vv;function Bv(){if(_r(or,an.content,an.task),!xv())throw fn;const e=xe.Media;return cc(Qn(Hv,"visualMedia.hasPermission"),"permissions.has",e)}function Wv(){if(_r(or,an.content,an.task),!xv())throw fn;const e=xe.Media;return cc(Qn(Hv,"visualMedia.requestPermission"),"permissions.request",e)}!function(e){e[e.FrontOrRear=1]="FrontOrRear",e[e.FrontOnly=2]="FrontOnly",e[e.RearOnly=3]="RearOnly"}(_v||(_v={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(Vv||(Vv={}));var jv=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())}))};let zv=null;function $v(){return jv(this,void 0,void 0,(function*(){return null===zv&&(zv=(yield To()).app.host.name),zv}))}var qv=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())}))};function Gv(){return qv(this,void 0,void 0,(function*(){if(_r(or),!Kv())throw fn;return!(!or.isLegacyTeams||zn.hostClientType!==rn.android&&zn.hostClientType!==rn.ios&&zn.hostClientType!==rn.ipados&&zn.hostClientType!==rn.visionOS||(yield Jv())!==on.teams)||(yield ic(Qn("v2","webStorage.isWebStorageClearedOnUserLogOut"),"webStorage.isWebStorageClearedOnUserLogOut"))}))}function Jv(){return qv(this,void 0,void 0,(function*(){return $v()}))}function Kv(){return _r(or)&&void 0!==or.supports.webStorage}const Qv="v2";var Zv;function Xv(e){const t=Qn(Qv,"call.startCall");return new Promise((n=>{var r;if(_r(or,an.content,an.task),!Yv())throw fn;if(!or.isLegacyTeams)return hc(t,"call.startCall",[e],n);n(ic(t,"executeDeepLink",ig(e.targets,null===(r=e.requestedModalities)||void 0===r?void 0:r.includes(Zv.Video),e.source)).then((e=>{if(!e)throw new Error(ct);return e})))}))}function Yv(){return!(!_r(or)||!or.supports.call)}!function(e){e.Unknown="unknown",e.Audio="audio",e.Video="video",e.VideoBasedScreenSharing="videoBasedScreenSharing",e.Data="data"}(Zv||(Zv={}));const ew="v1";function tw(){Gi(Qn(ew,"appInitialization.notifyAppLoaded"))}function nw(){hc(Qn(ew,"appInitialization.notifySuccess"),Co.Success,[Cr])}function rw(e){Ki(Qn(ew,"appInitialization.notifyFailure"),e)}function ow(e){Ji(Qn(ew,"appInitialization.notifyExpectedFailure"),e)}const iw=Kn("thirdPartyCloudStorage"),aw="v2";class sw{constructor(e,t){this.fileType=e,this.assembleAttachment=t}}let cw=[],uw=null,lw=!0,dw=null;function fw(e,t){if(!t)throw new Error("[getDragAndDropFiles] Callback cannot be null");if(e&&""!==e){if(_r(or,an.content,an.task),!gw())throw fn;if(dw)throw dw=null,new Error("getDragAndDropFiles cannot be called twice");dw=t,lw=!0,hc(Qn(aw,"thirdPartyCloudStorage.getDragAndDropFiles"),"thirdPartyCloudStorage.getDragAndDropFiles",[e],pw)}else{t([],{errorCode:Ne.INVALID_ARGUMENTS})}}function pw(e){if(dw)if(e&&e.error)dw([],e.error),dw=null;else if(e&&e.fileChunk)try{lw||0!==e.fileChunk.chunkSequence||(iw("Last chunk is not received or 'endOfFile' value for previous chunk was not set to true"),lw=!0,dw([],{errorCode:Ne.INTERNAL_ERROR,message:"error occurred while receiving data"}),cw=[],dw=null);const t=Mg(e.fileChunk,e.fileType);if(t?(uw||(uw=new sw(e.fileType,[])),uw.assembleAttachment.push(t)):(iw(`Received a null assemble attachment for when decoding chunk sequence ${e.fileChunk.chunkSequence}; not including the chunk in the assembled file.`),dw?dw([],{errorCode:Ne.INTERNAL_ERROR,message:"error occurred while receiving data"}):dw=null,cw=[],dw=null,lw=!0),lw=e.fileChunk.endOfFile,e.fileChunk.endOfFile&&uw){const t=kg(uw.assembleAttachment,uw.fileType);if(t){const n=new File([t],e.fileName,{type:t.type});cw.push(n)}e.isLastFile&&dw&&(dw(cw,e.error),cw=[],dw=null,lw=!0),uw=null}}catch(e){dw&&(dw([],{errorCode:Ne.INTERNAL_ERROR,message:e}),cw=[],dw=null,lw=!0)}else dw([],{errorCode:Ne.INTERNAL_ERROR,message:"data received is null"}),cw=[],dw=null,lw=!0}function gw(){return!(!_r(or)||!or.supports.thirdPartyCloudStorage)}const mw="v1";function hw(e,t){qi(Qn(mw,"initialize"),t).then((()=>{e&&e()}))}function vw(){Hh()}function ww(){_h()}function Cw(e){Hr(),hc(Qn(mw,"getContext"),"getContext",(t=>{t.frameContext||(t.frameContext=zn.frameContext),e(t)}))}function yw(e){ta(Qn(mw,"registerOnThemeChangeHandlerHelper"),e)}function Sw(e){ys(Qn(mw,"registerFullScreenHandler"),"fullScreenChange",e,[])}function bw(e){ys(Qn(mw,"registerAppButtonClickHandler"),"appButtonClick",e,[an.content])}function Ew(e){ys(Qn(mw,"registerAppButtonHoverEnterHandler"),"appButtonHoverEnter",e,[an.content])}function Aw(e){ys(Qn(mw,"registerAppButtonHoverLeaveHandler"),"appButtonHoverLeave",e,[an.content])}function Iw(e){Sa(Qn(mw,"registerBackButtonHandler"),e)}function Pw(e){Bh(Qn(mw,"registerOnLoadHandler"),e)}function Tw(e){jh(Qn(mw,"registerBeforeUnloadHandler"),e)}function Ow(e){ys(Qn(mw,"registerFocusEnterHandler"),"focusEnter",e,[])}function Rw(e){ys(Qn(mw,"registerChangeSettingsHandler"),"changeSettings",e,[an.content])}function Fw(e,t){_r(or),Qa(Qn(mw,"getTabInstances"),t).then((t=>{e(t)}))}function kw(e,t){_r(or),Za(Qn(mw,"getMruTabInstances"),t).then((t=>{e(t)}))}function Mw(e){Xa(Qn(mw,"shareDeepLink"),{subPageId:e.subEntityId,subPageLabel:e.subEntityLabel,subPageWebUrl:e.subEntityWebUrl})}function Nw(e,t){_r(or,an.content,an.sidePanel,an.settings,an.task,an.stage,an.meetingStage);const n=null!=t?t:vn();na(Qn(mw,"executeDeepLink"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function xw(e){Ya(Qn(mw,"setFrameContext"),e)}function Dw(e,t,n){qi(Qn(mw,"initializeWithFrameContext"),n).then((()=>t&&t())),Ya(Qn(mw,"setFrameContext"),e)}const Uw="v1";function Lw(e){Ka(Qn(Uw,"navigation.returnFocus"),e)}function Hw(e,t){_r(or);const n=null!=t?t:vn();Ja(Qn(Uw,"navigation.navigateToTab"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function _w(e,t){_r(or,an.content,an.sidePanel,an.settings,an.remove,an.task,an.stage,an.meetingStage);const n=null!=t?t:vn();qa(Qn(Uw,"navigation.navigateCrossDomain"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function Vw(e){_r(or);const t=null!=e?e:vn();Ga(Qn(Uw,"navigation.navigateBack")).then((()=>{t(!0)})).catch((e=>{t(!1,e.message)}))}const Bw="v1";function Ww(e){es(Qn(Bw,"settings.setValidityState"),e)}function jw(e){_r(or,an.content,an.settings,an.remove,an.sidePanel),ts(Qn(Bw,"settings.getSettings")).then((t=>{e(t)}))}function zw(e,t){_r(or,an.content,an.settings,an.sidePanel);const n=null!=t?t:vn();ns(Qn(Bw,"settings.setSettings"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function $w(e){Mi(Qn(Bw,"settings.registerOnSaveHandler"),e)}function qw(e){xi(Qn(Bw,"settings.registerOnRemoveHandler"),e)}var Gw=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};const Jw="v1";function Kw(e,t){const n=Qn(Jw,"tasks.startTask"),r=t?e=>{var n,r;return t(null!==(n=e.err)&&void 0!==n?n:"",null!==(r=e.result)&&void 0!==r?r:"")}:void 0;return void 0===e.card&&void 0===e.url||e.card?(_r(or,an.content,an.sidePanel,an.meetingStage),hc(n,"tasks.startTask",[e],t)):void 0!==e.completionBotId?Yo(n,Yw(e),r):Xo(n,Xw(e),r),new km}function Qw(e){e=eC(e);const{width:t,height:n}=e,r=Gw(e,["width","height"]);if(Object.keys(r).length)throw new Error("resize requires a TaskInfo argument containing only width and height");Zo(Qn(Jw,"tasks.updateTask"),e)}function Zw(e,t){ei(Qn(Jw,"tasks.submitTask"),e,t)}function Xw(e){if(void 0===e.url)throw new Error("url property of taskInfo object can't be undefined");return{url:e.url,size:{height:e.height?e.height:ln.Small,width:e.width?e.width:ln.Small},title:e.title,fallbackUrl:e.fallbackUrl}}function Yw(e){if(void 0===e.url||void 0===e.completionBotId)throw new Error(`Both url ${e.url} and completionBotId ${e.completionBotId} are required for bot url dialog. At least one is undefined.`);return{url:e.url,size:{height:e.height?e.height:ln.Small,width:e.width?e.width:ln.Small},title:e.title,fallbackUrl:e.fallbackUrl,completionBotId:e.completionBotId}}function eC(e){return e.height=e.height?e.height:ln.Small,e.width=e.width?e.width:ln.Small,e}const tC="v2";var nC,rC;function oC(){return!(!_r(or,an.meetingStage,an.sidePanel,an.content)||!or.supports.interactive)}!function(e){e.guest="Guest",e.attendee="Attendee",e.presenter="Presenter",e.organizer="Organizer"}(nC||(nC={})),function(e){e.added="Added",e.alreadyExists="AlreadyExists",e.conflict="Conflict",e.notFound="NotFound"}(rC||(rC={}));class iC{getFluidTenantInfo(){return aC(),new Promise((e=>{e(cc(Qn(tC,"interactive.getFluidTenantInfo"),"interactive.getFluidTenantInfo"))}))}getFluidToken(e){return aC(),new Promise((t=>{t(cc(Qn(tC,"interactive.getFluidToken"),"interactive.getFluidToken",e))}))}getFluidContainerId(){return aC(),new Promise((e=>{e(cc(Qn(tC,"interactive.getFluidContainerId"),"interactive.getFluidContainerId"))}))}setFluidContainerId(e){return aC(),new Promise((t=>{t(cc(Qn(tC,"interactive.setFluidContainerId"),"interactive.setFluidContainerId",e))}))}getNtpTime(){return aC(),new Promise((e=>{e(cc(Qn(tC,"interactive.getNtpTime"),"interactive.getNtpTime"))}))}registerClientId(e){return aC(),new Promise((t=>{t(cc(Qn(tC,"interactive.registerClientId"),"interactive.registerClientId",e))}))}getClientRoles(e){return aC(),new Promise((t=>{t(cc(Qn(tC,"interactive.getClientRoles"),"interactive.getClientRoles",e))}))}getClientInfo(e){return aC(),new Promise((t=>{t(cc(Qn(tC,"interactive.getClientInfo"),"interactive.getClientInfo",e))}))}static create(){return aC(),new iC}}function aC(){if(!oC())throw new Error("LiveShareHost Not supported")}var sC=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 cC(e){try{return e.cartItems=uC(e.cartItems),e}catch(e){throw new Error("Error deserializing cart")}}function uC(e){return e.map((e=>{if(e.imageURL){const t=new URL(e.imageURL);e.imageURL=t}return e.accessories&&(e.accessories=uC(e.accessories)),e}))}const lC=e=>{try{return e.map((e=>{const{imageURL:t,accessories:n}=e,r=sC(e,["imageURL","accessories"]),o=Object.assign({},r);return t&&(o.imageURL=t.href),n&&(o.accessories=lC(n)),o}))}catch(e){throw new Error("Error serializing cart items")}};function dC(e){if(!Array.isArray(e)||0===e.length)throw new Error("cartItems must be a non-empty array");for(const t of e)pC(t),fC(t.accessories)}function fC(e){if(null!=e){if(!Array.isArray(e)||0===e.length)throw new Error("CartItem.accessories must be a non-empty array");for(const t of e){if(t.accessories)throw new Error("Item in CartItem.accessories cannot have accessories");pC(t)}}}function pC(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");mC(e.price),hC(e.quantity)}function gC(e){if(null!=e){if(!e)throw new Error("id must not be empty");if(!1===nn(e))throw new Error("id must be a valid UUID")}}function mC(e){if("number"!=typeof e||e<0)throw new Error(`price ${e} must be a number not less than 0`);if(parseFloat(e.toFixed(3))!==e)throw new Error(`price ${e} must have at most 3 decimal places`)}function hC(e){if("number"!=typeof e||e<=0||parseInt(e.toString())!==e)throw new Error(`quantity ${e} must be an integer greater than 0`)}function vC(e){if(!Object.values(SC).includes(e))throw new Error(`cartStatus ${e} is not valid`)}const wC="v2",CC={majorVersion:1,minorVersion:1};var yC,SC;function bC(){if(_r(or,an.content,an.task),!PC())throw fn;return cc(Qn(wC,"marketplace.getCart"),"marketplace.getCart",CC).then(cC)}function EC(e){if(_r(or,an.content,an.task),!PC())throw fn;if(!e)throw new Error("addOrUpdateCartItemsParams must be provided");return gC(null==e?void 0:e.cartId),dC(null==e?void 0:e.cartItems),cc(Qn(wC,"marketplace.addOrUpdateCartItems"),"marketplace.addOrUpdateCartItems",Object.assign(Object.assign({},e),{cartItems:lC(e.cartItems),cartVersion:CC})).then(cC)}function AC(e){if(_r(or,an.content,an.task),!PC())throw fn;if(!e)throw new Error("removeCartItemsParams must be provided");if(gC(null==e?void 0:e.cartId),!Array.isArray(null==e?void 0:e.cartItemIds)||0===(null==e?void 0:e.cartItemIds.length))throw new Error("cartItemIds must be a non-empty array");return cc(Qn(wC,"marketplace.removeCartItems"),"marketplace.removeCartItems",Object.assign(Object.assign({},e),{cartVersion:CC})).then(cC)}function IC(e){if(_r(or,an.content,an.task),!PC())throw fn;if(!e)throw new Error("updateCartStatusParams must be provided");return gC(null==e?void 0:e.cartId),vC(null==e?void 0:e.cartStatus),cc(Qn(wC,"marketplace.updateCartStatus"),"marketplace.updateCartStatus",Object.assign(Object.assign({},e),{cartVersion:CC})).then(cC)}function PC(){return!(!_r(or)||!or.supports.marketplace)}!function(e){e.TACAdminUser="TACAdminUser",e.TeamsAdminUser="TeamsAdminUser",e.TeamsEndUser="TeamsEndUser"}(yC||(yC={})),function(e){e.Open="Open",e.Processing="Processing",e.Processed="Processed",e.Closed="Closed",e.Error="Error"}(SC||(SC={}))})(),r})()));
|
2
2
|
//# sourceMappingURL=MicrosoftTeams.min.js.map
|