@microsoft/teams-js 2.44.0 → 2.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/esm/packages/teams-js/dts/internal/telemetry.d.ts +2 -0
- package/dist/esm/packages/teams-js/dts/private/externalAppAuthentication.d.ts +74 -0
- package/dist/esm/packages/teams-js/dts/private/index.d.ts +1 -0
- package/dist/esm/packages/teams-js/src/index.js +1 -1
- package/dist/esm/packages/teams-js/src/private/externalAppAuthentication.js +1 -1
- package/dist/esm/packages/teams-js/src/private/externalAppAuthenticationForCEA.js +1 -1
- package/dist/esm/packages/teams-js/src/private/privateAPIs.js +1 -1
- package/dist/esm/packages/teams-js/src/public/version.js +1 -1
- package/dist/umd/MicrosoftTeams.js +112 -2
- 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:()=>Ne,AppId:()=>to,ChannelType:()=>pn,ChildAppWindow:()=>zh,DialogDimension:()=>fn,EduType:()=>Ve,EmailAddress:()=>ng,ErrorCode:()=>De,FileOpenPreference:()=>Me,FrameContexts:()=>cn,HostClientType:()=>an,HostName:()=>sn,LiveShareHost:()=>wC,NotificationTypes:()=>Kc,ParentAppWindow:()=>$h,RenderingSurfaces:()=>un,SecondaryM365ContentIdName:()=>xe,TaskModuleDimension:()=>fn,TeamType:()=>ln,UUID:()=>$n,UserSettingTypes:()=>Zc,UserTeamRole:()=>dn,ValidatedSafeString:()=>eo,ViewerActionTypes:()=>Qc,activateChildProxyingCommunication:()=>Ar,app:()=>i,appEntity:()=>j,appInitialization:()=>Pe,appInstallDialog:()=>X,authentication:()=>Z,barCode:()=>ee,calendar:()=>de,call:()=>Ie,chat:()=>te,clipboard:()=>ne,conversations:()=>b,copilot:()=>O,dialog:()=>f,enablePrintCapability:()=>Fw,executeDeepLink:()=>qw,externalAppAuthentication:()=>R,externalAppAuthenticationForCEA:()=>F,externalAppCardActions:()=>k,externalAppCardActionsForCEA:()=>M,externalAppCardActionsForDA:()=>N,externalAppCommands:()=>x,files:()=>D,geoLocation:()=>ie,getAdaptiveCardSchemaVersion:()=>jh,getContext:()=>Mw,getCurrentFeatureFlagsState:()=>Tr,getMruTabInstances:()=>zw,getTabInstances:()=>Ww,hostEntity:()=>K,initialize:()=>Rw,initializeWithFrameContext:()=>Jw,liveShare:()=>Fe,location:()=>se,logs:()=>S,mail:()=>pe,marketplace:()=>ke,media:()=>Y,meeting:()=>ue,meetingRoom:()=>L,menus:()=>p,messageChannels:()=>U,monetization:()=>le,navigateBack:()=>Yw,navigateCrossDomain:()=>Xw,navigateToTab:()=>Zw,nestedAppAuth:()=>re,nestedAppAuthBridge:()=>H,notifications:()=>_,openFilePreview:()=>ou,otherAppStateChange:()=>V,overwriteFeatureFlagsState:()=>Rr,pages:()=>y,people:()=>he,print:()=>kw,profile:()=>me,registerAppButtonClickHandler:()=>Dw,registerAppButtonHoverEnterHandler:()=>Lw,registerAppButtonHoverLeaveHandler:()=>Uw,registerBackButtonHandler:()=>Hw,registerBeforeUnloadHandler:()=>Vw,registerChangeSettingsHandler:()=>jw,registerCustomHandler:()=>nu,registerFocusEnterHandler:()=>Bw,registerFullScreenHandler:()=>xw,registerOnLoadHandler:()=>_w,registerOnThemeChangeHandler:()=>Nw,registerUserSettingsChangeHandler:()=>ru,remoteCamera:()=>B,returnFocus:()=>Qw,search:()=>ve,secondaryBrowser:()=>ae,sendCustomEvent:()=>tu,sendCustomMessage:()=>eu,setFeatureFlagsState:()=>Or,setFrameContext:()=>Gw,settings:()=>Oe,shareDeepLink:()=>$w,sharing:()=>Ce,shortcutRelay:()=>je,sidePanelInterfaces:()=>I,stageView:()=>Se,store:()=>Q,tasks:()=>Re,teams:()=>$,teamsCore:()=>ge,thirdPartyCloudStorage:()=>Te,uploadCustomApp:()=>Yc,version:()=>br,videoEffects:()=>q,videoEffectsEx:()=>G,visualMedia:()=>Ee,webStorage:()=>Ae});var e={};n.r(e),n.d(e,{_clearTelemetryPort:()=>uo,getTelemetryPort:()=>so,isSupported:()=>co});var t={};n.r(t),n.d(t,{_clearDataLayerPort:()=>vo,getDataLayerPort:()=>ho,isSupported:()=>mo});var o={};n.r(o),n.d(o,{registerBeforeSuspendOrTerminateHandler:()=>wo,registerOnResumeHandler:()=>Co});var i={};n.r(i),n.d(i,{ExpectedFailureReason:()=>Ao,FailedReason:()=>Eo,Messages:()=>bo,_initialize:()=>Oo,_uninitialize:()=>Ro,getContext:()=>Fo,getFrameContext:()=>Po,initialize:()=>To,isInitialized:()=>Io,lifecycle:()=>o,notifyAppLoaded:()=>ko,notifyExpectedFailure:()=>xo,notifyFailure:()=>No,notifySuccess:()=>Mo,openLink:()=>Uo,registerHostToAppPerformanceMetricsHandler:()=>Lo,registerOnThemeChangeHandler:()=>Do});var a={};n.r(a),n.d(a,{isSupported:()=>Vo,resize:()=>_o});var s={};n.r(s),n.d(s,{isSupported:()=>jo,open:()=>Bo});var c={};n.r(c),n.d(c,{isSupported:()=>qo,registerOnMessageFromParent:()=>$o,sendMessageToDialog:()=>zo,sendMessageToParentFromDialog:()=>Wo});var u={};n.r(u),n.d(u,{bot:()=>s,getDialogInfoFromBotUrlDialogInfo:()=>Zo,getDialogInfoFromUrlDialogInfo:()=>Qo,isSupported:()=>Ko,open:()=>Go,parentCommunication:()=>c,submit:()=>Jo});var l={};n.r(l),n.d(l,{isSupported:()=>ui,open:()=>ci});var d={};n.r(d),n.d(d,{bot:()=>l,isSupported:()=>di,open:()=>li});var f={};n.r(f),n.d(f,{adaptiveCard:()=>d,initialize:()=>fi,isSupported:()=>pi,update:()=>a,url:()=>u});var p={};n.r(p),n.d(p,{DisplayMode:()=>hi,MenuItem:()=>vi,MenuListType:()=>mi,initialize:()=>Ei,isSupported:()=>Fi,setNavBarMenu:()=>Pi,setUpViews:()=>Ai,showActionMenu:()=>Oi});var g={};n.r(g),n.d(g,{initialize:()=>ki,isSupported:()=>Wi,registerChangeConfigHandler:()=>_i,registerOnRemoveHandler:()=>Li,registerOnRemoveHandlerHelper:()=>Ui,registerOnSaveHandler:()=>xi,registerOnSaveHandlerHelper:()=>Di,setConfig:()=>Ni,setValidityState:()=>Mi});var h={};n.r(h),n.d(h,{isSupported:()=>ya,onClick:()=>va,onHoverEnter:()=>wa,onHoverLeave:()=>Ca});var m={};n.r(m),n.d(m,{_initialize:()=>Sa,isSupported:()=>Ia,navigateBack:()=>ba,registerBackButtonHandler:()=>Ea,registerBackButtonHandlerHelper:()=>Aa});var v={};n.r(v),n.d(v,{isSupported:()=>Oa,navigateTo:()=>Pa,navigateToDefaultPage:()=>Ta});var w={};n.r(w),n.d(w,{enterFullscreen:()=>Ra,exitFullscreen:()=>Fa,isSupported:()=>ka});var C={};n.r(C),n.d(C,{getMruTabInstances:()=>xa,getTabInstances:()=>Na,isSupported:()=>Da,navigateToTab:()=>Ma});var y={};n.r(y),n.d(y,{EnterFocusType:()=>La,ReturnFocusType:()=>Ua,appButton:()=>h,backStack:()=>m,config:()=>g,currentApp:()=>v,fullTrust:()=>w,getConfig:()=>ja,initializeWithFrameContext:()=>Ba,isSupported:()=>Ga,navigateCrossDomain:()=>Wa,navigateToApp:()=>za,registerFocusEnterHandler:()=>_a,registerFullScreenHandler:()=>qa,returnFocus:()=>Ha,setCurrentFrame:()=>Va,shareDeepLink:()=>$a,tabs:()=>C});var S={};n.r(S),n.d(S,{isSupported:()=>Jc,registerGetLogHandler:()=>Gc});var b={};n.r(b),n.d(b,{closeConversation:()=>su,getChatMembers:()=>cu,isSupported:()=>uu,openConversation:()=>au});var E={};n.r(E),n.d(E,{isSupported:()=>pu,sendCustomTelemetryData:()=>gu});var A={};n.r(A),n.d(A,{getEligibilityInfo:()=>Cu,isSupported:()=>wu});var I={};n.r(I),n.d(I,{ContentItemType:()=>Su,CopilotMode:()=>Iu,MediaSelectionType:()=>bu,SidePanelErrorCode:()=>Ru,SidePanelErrorImpl:()=>Fu,TeamsContextType:()=>Tu,TeamsDimensionName:()=>Au,TeamsSessionType:()=>Eu,TranscriptState:()=>Pu,UserConsent:()=>Ou});var P={};n.r(P),n.d(P,{copilotSidePanelNotSupportedOnPlatformError:()=>Hu,getContent:()=>Du,isResponseAReportableError:()=>xu,isSupported:()=>Nu,preCheckUserConsent:()=>Lu,registerUserActionContentSelect:()=>Uu});var T={};n.r(T),n.d(T,{closeSidePanel:()=>$u,isSupported:()=>zu});var O={};n.r(O),n.d(O,{customTelemetry:()=>E,eligibility:()=>A,sidePanel:()=>P,view:()=>T});var R={};n.r(R),n.d(R,{ActionExecuteInvokeRequestType:()=>Qu,ActionExecuteResponseHandler:()=>el,InvokeErrorCode:()=>Yu,InvokeResponseType:()=>Xu,OriginalRequestType:()=>Zu,SerializableActionExecuteInvokeRequest:()=>Ju,authenticateAndResendRequest:()=>il,authenticateWithOauth2:()=>cl,authenticateWithPowerPlatformConnectorPlugins:()=>ul,authenticateWithSSO:()=>al,authenticateWithSSOAndResendRequest:()=>sl,isActionExecuteResponse:()=>Ku,isInvokeError:()=>tl,isSupported:()=>ll,validateActionExecuteInvokeRequest:()=>rl});var F={};n.r(F),n.d(F,{authenticateAndResendRequest:()=>hl,authenticateWithOauth:()=>gl,authenticateWithSSO:()=>pl,authenticateWithSSOAndResendRequest:()=>ml,isSupported:()=>vl,validateInput:()=>wl});var k={};n.r(k),n.d(k,{ActionOpenUrlErrorCode:()=>Sl,ActionOpenUrlType:()=>yl,isSupported:()=>Al,processActionOpenUrl:()=>El,processActionSubmit:()=>bl});var M={};n.r(M),n.d(M,{isSupported:()=>Rl,processActionOpenUrl:()=>Tl,processActionSubmit:()=>Ol});var N={};n.r(N),n.d(N,{SerializableActionOpenUrlDialogInfo:()=>Ul,isSupported:()=>Dl,processActionOpenUrlDialog:()=>xl});var x={};n.r(x),n.d(x,{isSupported:()=>Bl,processActionCommand:()=>Vl});var D={};n.r(D),n.d(D,{CloudStorageProvider:()=>Wl,CloudStorageProviderFileAction:()=>Jl,CloudStorageProviderType:()=>zl,DocumentLibraryAccessType:()=>ql,FileDownloadStatus:()=>Gl,SpecialDocumentLibraryType:()=>$l,addCloudStorageFolder:()=>Ql,addCloudStorageProvider:()=>od,addCloudStorageProviderFile:()=>ad,copyMoveFiles:()=>td,deleteCloudStorageFolder:()=>Zl,deleteCloudStorageProviderFile:()=>cd,downloadCloudStorageProviderFile:()=>ud,getCloudStorageFolderContents:()=>Xl,getCloudStorageFolders:()=>Kl,getExternalProviders:()=>ed,getFileDownloads:()=>nd,openCloudStorageFile:()=>Yl,openDownloadFolder:()=>rd,registerCloudStorageProviderContentChangeHandler:()=>fd,registerCloudStorageProviderListChangeHandler:()=>dd,removeCloudStorageProvider:()=>id,renameCloudStorageProviderFile:()=>sd,uploadCloudStorageProviderFile:()=>ld});var L={};n.r(L),n.d(L,{getPairedMeetingRoomInfo:()=>hd,isSupported:()=>Cd,registerMeetingRoomCapabilitiesUpdateHandler:()=>vd,registerMeetingRoomStatesUpdateHandler:()=>wd,sendCommandToPairedMeetingRoom:()=>md});var U={};n.r(U),n.d(U,{dataLayer:()=>t,isSupported:()=>yd,telemetry:()=>e});var H={};n.r(H),n.d(H,{initialize:()=>Id,version:()=>Sd});var _={};n.r(_),n.d(_,{isSupported:()=>xd,showNotification:()=>Nd});var V={};n.r(V),n.d(V,{isSupported:()=>_d,notifyInstallCompleted:()=>Hd,registerAppInstallationHandler:()=>Ld,unregisterAppInstallationHandler:()=>Ud});var B={};n.r(B),n.d(B,{ControlCommand:()=>Bd,ErrorReason:()=>jd,SessionTerminatedReason:()=>Wd,getCapableParticipants:()=>zd,isSupported:()=>Xd,registerOnCapableParticipantsChangeHandler:()=>Jd,registerOnDeviceStateChangeHandler:()=>Qd,registerOnErrorHandler:()=>Kd,registerOnSessionStatusChangeHandler:()=>Zd,requestControl:()=>$d,sendControlCommand:()=>qd,terminateSession:()=>Gd});var j={};n.r(j),n.d(j,{isSupported:()=>tf,selectAppEntity:()=>ef});var W={};n.r(W),n.d(W,{getUserJoinedTeams:()=>rf,isSupported:()=>of});var z={};n.r(z),n.d(z,{getConfigSetting:()=>sf,isSupported:()=>cf,joinedTeams:()=>W});var $={};n.r($),n.d($,{ChannelType:()=>lf,fullTrust:()=>z,getTeamChannels:()=>df,isSupported:()=>pf,refreshSiteUrl:()=>ff});var q={};n.r(q),n.d(q,{EffectChangeType:()=>Ef,EffectFailureReason:()=>Af,VideoFrameFormat:()=>bf,isSupported:()=>Ff,notifySelectedVideoEffectChanged:()=>Pf,registerForVideoEffect:()=>Tf,registerForVideoFrame:()=>If});var G={};n.r(G),n.d(G,{ErrorLevel:()=>ep,frameProcessingTimeoutInMs:()=>Xf,isSupported:()=>cp,notifyFatalError:()=>dp,notifySelectedVideoEffectChanged:()=>ip,registerForVideoEffect:()=>ap,registerForVideoFrame:()=>tp,updatePersonalizedEffects:()=>sp});var J={};n.r(J),n.d(J,{addAndConfigure:()=>Cp,getAll:()=>yp,isSupported:()=>Ap,reconfigure:()=>Sp,remove:()=>Ep,rename:()=>bp});var K={};n.r(K),n.d(K,{AppTypes:()=>Tp,isSupported:()=>Op,tab:()=>J});var Q={};n.r(Q),n.d(Q,{isSupported:()=>Hp,openAppDetail:()=>Dp,openFullStore:()=>xp,openInContextStore:()=>Lp,openSpecificStore:()=>Up});var Z={};n.r(Z),n.d(Z,{DataResidency:()=>eg,authenticate:()=>qp,getAuthToken:()=>Jp,getUser:()=>Qp,notifyFailure:()=>Yp,notifySuccess:()=>Xp,registerAuthenticationHandlers:()=>$p});var X={};n.r(X),n.d(X,{isSupported:()=>Eg,openAppInstallDialog:()=>bg});var Y={};n.r(Y),n.d(Y,{CameraStartMode:()=>Og,File:()=>Ng,FileFormat:()=>Pg,ImageOutputFormats:()=>Mg,ImageUriType:()=>kg,Media:()=>Hg,MediaControllerEvent:()=>Tg,MediaType:()=>Fg,Source:()=>Rg,VideoController:()=>Vg,captureImage:()=>xg,hasPermission:()=>Dg,requestPermission:()=>Lg,scanBarCode:()=>Wg,selectMedia:()=>Bg,viewImages:()=>jg});var ee={};n.r(ee),n.d(ee,{hasPermission:()=>oh,isSupported:()=>ah,requestPermission:()=>ih,scanBarCode:()=>rh});var te={};n.r(te),n.d(te,{isSupported:()=>dh,openChat:()=>ch,openGroupChat:()=>lh});var ne={};n.r(ne),n.d(ne,{isSupported:()=>mh,read:()=>hh,write:()=>gh});var re={};n.r(re),n.d(re,{addNAATrustedOrigins:()=>Oh,canParentManageNAATrustedOrigins:()=>Eh,deleteNAATrustedOrigins:()=>Rh,getParentOrigin:()=>bh,isDeeplyNestedAuthSupported:()=>Ah,isNAAChannelRecommended:()=>Sh});var oe={};n.r(oe),n.d(oe,{chooseLocation:()=>xh,isSupported:()=>Lh,showLocation:()=>Dh});var ie={};n.r(ie),n.d(ie,{getCurrentLocation:()=>Hh,hasPermission:()=>_h,isSupported:()=>Bh,map:()=>oe,requestPermission:()=>Vh});var ae={};n.r(ae),n.d(ae,{isSupported:()=>Jh,open:()=>Gh});var se={};n.r(se),n.d(se,{getLocation:()=>Qh,isSupported:()=>Xh,showLocation:()=>Zh});var ce={};n.r(ce),n.d(ce,{setOptions:()=>em});var ue={};n.r(ue),n.d(ue,{CallType:()=>am,EventActionSource:()=>cm,MeetingReactionType:()=>om,MeetingType:()=>im,SharingProtocol:()=>sm,appShareButton:()=>ce,getAppContentStageSharingCapabilities:()=>Cm,getAppContentStageSharingState:()=>Sm,getAuthenticationTokenForAnonymousUser:()=>pm,getIncomingClientAudioState:()=>um,getLiveStreamState:()=>gm,getMeetingDetails:()=>dm,getMeetingDetailsVerbose:()=>fm,joinMeeting:()=>Im,registerLiveStreamChangedHandler:()=>vm,registerMeetingReactionReceivedHandler:()=>Am,registerRaiseHandStateChangedHandler:()=>Em,registerSpeakingStateChangeHandler:()=>bm,requestAppAudioHandling:()=>Pm,requestStartLiveStreaming:()=>hm,requestStopLiveStreaming:()=>mm,shareAppContentToStage:()=>wm,stopSharingAppContentToStage:()=>ym,toggleIncomingClientAudio:()=>lm,updateMicState:()=>Rm});var le={};n.r(le),n.d(le,{isSupported:()=>xm,openPurchaseExperience:()=>Nm});var de={};n.r(de),n.d(de,{composeMeeting:()=>Um,isSupported:()=>Hm,openCalendarItem:()=>Lm});var fe={};n.r(fe),n.d(fe,{composeMailWithHandoff:()=>jm,isSupported:()=>Wm});var pe={};n.r(pe),n.d(pe,{ComposeMailType:()=>Km,composeMail:()=>Gm,handoff:()=>fe,isSupported:()=>Jm,openMailItem:()=>qm});var ge={};n.r(ge),n.d(ge,{enablePrintCapability:()=>Zm,isSupported:()=>rv,print:()=>Xm,registerBeforeUnloadHandler:()=>tv,registerBeforeUnloadHandlerHelper:()=>nv,registerOnLoadHandler:()=>Ym,registerOnLoadHandlerHelper:()=>ev});var he={};n.r(he),n.d(he,{isSupported:()=>cv,selectPeople:()=>av});var me={};n.r(me),n.d(me,{isSupported:()=>pv,showProfile:()=>fv});var ve={};n.r(ve),n.d(ve,{closeSearch:()=>Sv,isSupported:()=>yv,registerHandlers:()=>wv,unregisterHandlers:()=>Cv});var we={};n.r(we),n.d(we,{getContent:()=>Av,isSupported:()=>Iv});var Ce={};n.r(Ce),n.d(Ce,{SharingAPIMessages:()=>Ov,history:()=>we,isSupported:()=>xv,shareWebContent:()=>Rv});var ye={};n.r(ye),n.d(ye,{close:()=>Lv,isSupported:()=>Uv});var Se={};n.r(Se),n.d(Se,{StageViewOpenMode:()=>_v,isSupported:()=>Bv,open:()=>Vv,self:()=>ye});var be={};n.r(be),n.d(be,{captureImages:()=>$v,isSupported:()=>Gv,retrieveImages:()=>qv});var Ee={};n.r(Ee),n.d(Ee,{CameraRestriction:()=>Xv,Source:()=>Yv,hasPermission:()=>ew,image:()=>be,requestPermission:()=>tw});var Ae={};n.r(Ae),n.d(Ae,{isSupported:()=>cw,isWebStorageClearedOnUserLogOut:()=>aw});var Ie={};n.r(Ie),n.d(Ie,{CallModalities:()=>lw,isSupported:()=>fw,startCall:()=>dw});var Pe={};n.r(Pe),n.d(Pe,{ExpectedFailureReason:()=>Ao,FailedReason:()=>Eo,Messages:()=>bo,notifyAppLoaded:()=>gw,notifyExpectedFailure:()=>vw,notifyFailure:()=>mw,notifySuccess:()=>hw});var Te={};n.r(Te),n.d(Te,{getDragAndDropFiles:()=>Iw,isSupported:()=>Tw});var Oe={};n.r(Oe),n.d(Oe,{getSettings:()=>nC,registerOnRemoveHandler:()=>iC,registerOnSaveHandler:()=>oC,setSettings:()=>rC,setValidityState:()=>tC});var Re={};n.r(Re),n.d(Re,{getDefaultSizeIfNotProvided:()=>pC,startTask:()=>cC,submitTask:()=>lC,updateTask:()=>uC});var Fe={};n.r(Fe),n.d(Fe,{ContainerState:()=>mC,LiveShareHost:()=>wC,UserMeetingRole:()=>hC,isSupported:()=>vC});var ke={};n.r(ke),n.d(ke,{CartStatus:()=>xC,Intent:()=>NC,addOrUpdateCartItems:()=>LC,cartVersion:()=>MC,getCart:()=>DC,isSupported:()=>_C,removeCartItems:()=>UC,updateCartStatus:()=>HC});var Me,Ne,xe,De,Le,Ue,He,_e,Ve,Be,je={};function We(e){return void 0!==(null==e?void 0:e.errorCode)}n.r(je),n.d(je,{DISABLE_SHORTCUT_FORWARDING_ATTRIBUTE:()=>oy,enableShortcutRelayCapability:()=>ny,isSupported:()=>ry,resetIsShortcutRelayCapabilityEnabled:()=>ty,setOverridableShortcutHandler:()=>ey}),function(e){e.Inline="inline",e.Desktop="desktop",e.Web="web"}(Me||(Me={})),function(e){e.M365Content="m365content"}(Ne||(Ne={})),function(e){e.DriveId="driveId",e.GroupId="groupId",e.SiteId="siteId",e.UserId="userId"}(xe||(xe={})),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"}(De||(De={})),function(e){e.GeoLocation="geolocation",e.Media="media"}(Le||(Le={})),function(e){e.BCAIS="bcais",e.BCWAF="bcwaf",e.BCWBF="bcwbf"}(Ue||(Ue={})),function(e){e.Faculty="faculty",e.Student="student",e.Other="other"}(He||(He={})),function(e){e.Adult="adult",e.MinorNoParentalConsentRequired="minorNoParentalConsentRequired",e.MinorWithoutParentalConsent="minorWithoutParentalConsent",e.MinorWithParentalConsent="minorWithParentalConsent",e.NotAdult="notAdult",e.NonAdult="notAdult"}(_e||(_e={})),function(e){e.HigherEducation="higherEducation",e.K12="k12",e.Other="other"}(Ve||(Ve={})),function(e){e.TextPlain="text/plain",e.TextHtml="text/html",e.ImagePNG="image/png",e.ImageJPEG="image/jpeg"}(Be||(Be={}));const ze=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.office365.us","outlook-dod.office365.us","webmail.apps.mil","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","fa000000125.officeapps.live.com","fa000000129.officeapps.live.com","fa000000124.officeapps.live.com","fa000000128.officeapps.live.com"]}');const $e="2.0.1",qe="2.0.2",Ge="2.0.3",Je="2.0.4",Ke="2.0.1",Qe="1.9.0",Ze="2.0.0",Xe="1.7.0",Ye="1.8.0",et="1.9.0",tt=n.t(ze,2).validOrigins,nt=1500,rt=new URL("https://res.cdn.office.net/teams-js/validDomains/json/validDomains.json"),ot=/^https:\/\//,it="https",at="teams.microsoft.com",st="The library has not yet been initialized",ct="The runtime has not yet been initialized",ut="The runtime version is not supported",lt="The call was not properly started";var dt=n(933);const ft=gt,pt=2147483647;function gt(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 mt(e)}return ht(e,t,n)}function ht(e,t,n){if("string"==typeof e)return yt(e,t);if(ArrayBuffer.isView(e))return Tt(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(bt(e,ArrayBuffer)||e&&bt(e.buffer,ArrayBuffer))return Ot(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(bt(e,SharedArrayBuffer)||e&&bt(e.buffer,SharedArrayBuffer)))return Ot(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 gt.from(r,t,n);const o=Kt(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return gt.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 mt(e){return vt(e),wt(e<0?0:0|Ct(e))}function vt(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 wt(e){if(e>pt)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,gt.prototype),t}function Ct(e){if(e>=pt)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+pt.toString(16)+" bytes");return 0|e}function yt(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!gt.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|St(e,t);let r=wt(n);const o=r.write(e,t);return o!==n&&(r=r.slice(0,o)),r}function St(e,t){if(gt.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||bt(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 Et(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return At(e).length;default:if(o)return r?-1:Et(e).length;t=(""+t).toLowerCase(),o=!0}}function bt(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Et(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 At(e){return dt.toByteArray(Pt(e))}gt.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}}(),gt.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required"),gt.from=function(e,t,n){return ht(e,t,n)},Object.setPrototypeOf(gt.prototype,Uint8Array.prototype),Object.setPrototypeOf(gt,Uint8Array),gt.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}},gt.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==gt.prototype};const It=/[^+/0-9A-Za-z-_]/g;function Pt(e){if((e=(e=e.split("=")[0]).trim().replace(It,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}function Tt(e){if(bt(e,Uint8Array)){const t=new Uint8Array(e);return Ot(t.buffer,t.byteOffset,t.byteLength)}return Rt(e)}function Ot(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,gt.prototype),r}function Rt(e){const t=e.length<0?0:0|Ct(e.length),n=wt(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function Ft(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 Nt(r)}function kt(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 xt(this,t,n);case"utf8":case"utf-8":return Ft(this,t,n);case"ascii":return Dt(this,t,n);case"latin1":case"binary":return Lt(this,t,n);case"base64":return Ut(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ht(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}gt.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?Ft(this,0,e):kt.apply(this,arguments)};const Mt=4096;function Nt(e){const t=e.length;if(t<=Mt)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=Mt));return n}function xt(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+=Jt[e[r]];return o}function Dt(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 Lt(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 Ut(e,t,n){return 0===t&&n===e.length?dt.fromByteArray(e):dt.fromByteArray(e.slice(t,n))}function Ht(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 _t(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(Gt(r))return a;e[n+a]=r}return a}function Vt(e,t,n,r){return qt(Et(t,e.length-n),e,n,r)}function Bt(e,t,n,r){return qt(zt(t),e,n,r)}function jt(e,t,n,r){return qt(At(t),e,n,r)}function Wt(e,t,n,r){return qt($t(t,e.length-n),e,n,r)}function zt(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}function $t(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 qt(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 Gt(e){return e!=e}gt.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 _t(this,e,t,n);case"utf8":case"utf-8":return Vt(this,e,t,n);case"ascii":case"latin1":case"binary":return Bt(this,e,t,n);case"base64":return jt(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Wt(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}};const Jt=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 Kt(e){if(gt.isBuffer(e)){const t=0|Ct(e.length),n=wt(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||Gt(e.length)?wt(0):Rt(e):"Buffer"===e.type&&Array.isArray(e.data)?Rt(e.data):void 0}const Qt={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Zt;const Xt=new Uint8Array(16);function Yt(){if(!Zt&&(Zt="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Zt))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Zt(Xt)}const en=[];for(let e=0;e<256;++e)en.push((e+256).toString(16).slice(1));function tn(e,t=0){return en[e[t+0]]+en[e[t+1]]+en[e[t+2]]+en[e[t+3]]+"-"+en[e[t+4]]+en[e[t+5]]+"-"+en[e[t+6]]+en[e[t+7]]+"-"+en[e[t+8]]+en[e[t+9]]+"-"+en[e[t+10]]+en[e[t+11]]+en[e[t+12]]+en[e[t+13]]+en[e[t+14]]+en[e[t+15]]}const nn=function(e,t,n){if(Qt.randomUUID&&!t&&!e)return Qt.randomUUID();const r=(e=e||{}).random||(e.rng||Yt)();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 tn(r)},rn=/^(?:[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 on=function(e){return"string"==typeof e&&rn.test(e)};var an,sn,cn,un,ln,dn,fn,pn;!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"}(an||(an={})),function(e){e.office="Office",e.outlook="Outlook",e.outlookWin32="OutlookWin32",e.orange="Orange",e.places="Places",e.teams="Teams",e.teamsModern="TeamsModern"}(sn||(sn={})),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"}(cn||(cn={})),function(e){e.copilotSidePanel="copilotSidePanel",e.copilotMainPane="copilotMainPane",e.copilotFullScreen="copilotFullScreen"}(un||(un={})),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"}(ln||(ln={})),function(e){e[e.Admin=0]="Admin",e[e.User=1]="User",e[e.Guest=2]="Guest"}(dn||(dn={})),function(e){e.Large="large",e.Medium="medium",e.Small="small"}(fn||(fn={})),function(e){e.Regular="Regular",e.Private="Private",e.Shared="Shared"}(pn||(pn={}));const gn={errorCode:De.NOT_SUPPORTED_ON_PLATFORM},hn={majorVersion:1,minorVersion:5},mn={adaptiveCardSchemaVersion:{majorVersion:1,minorVersion:5}},vn=new Error("Invalid input count: Must supply a valid image count (limit of 10)."),wn=new Error("Invalid response: Received more images than the specified max limit in the response.");function Cn(e){return(t,n)=>{if(!t)throw new Error(e||n)}}function yn(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 Sn(){return nn()}function bn(e){return Object.keys(e).forEach((t=>{null!==e[t]&&void 0!==e[t]&&"object"==typeof e[t]&&bn(e[t])})),Object.freeze(e)}function En(e,t,...n){const r=e(...n);return r.then((e=>{t&&t(void 0,e)})).catch((e=>{t&&t(e)})),r}function An(e,t,...n){const r=e(...n);return r.then((()=>{t&&t(null)})).catch((e=>{t&&t(e)})),r}function In(e,t,...n){const r=e(...n);return r.then((e=>{t&&t(null,e)})).catch((e=>{t&&t(e,null)})),r}function Pn(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 Tn(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 On(e){return!(yn(`${e.majorVersion}.${e.minorVersion}`,`${hn.majorVersion}.${hn.minorVersion}`)>=0)}function Rn(e){return"https:"===e.protocol}function Fn(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=ft.from(t,"base64").toString();n(new Blob([o],{type:e}))}))}function kn(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 Mn(){if(Nn())throw new Error("window object undefined at SSR check");return window}function Nn(){return"undefined"==typeof window}function xn(e,t){if(Un(e)||!Hn(e)||!_n(e))throw t||new Error("id is not valid.")}function Dn(e,t){const n=e.toString().toLocaleLowerCase();if(Un(n))throw t||new Error("Invalid Url");if(n.length>2048)throw t||new Error("Url exceeds the maximum size of 2048 characters");if(!Rn(e))throw t||new Error("Url should be a valid https url")}function Ln(e){const t=document.createElement("a");return t.href=e,new URL(t.href)}function Un(e){return new RegExp(`${/<script[^>]*>|<script[^&]*>|%3Cscript[^%]*%3E/gi.source}|${/<\/script[^>]*>|<\/script[^&]*>|%3C\/script[^%]*%3E/gi.source}`,"gi").test(e)}function Hn(e){return e.length<256&&e.length>4}function _n(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n<32||n>126)return!1}return!0}function Vn(e){if(!e)throw new Error("id must not be empty");if(!1===on(e))throw new Error("id must be a valid UUID")}const Bn=!!performance&&"now"in performance;function jn(){return Bn?performance.now()+performance.timeOrigin:void 0}function Wn(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=>Wn(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=>Wn(e[n],t+1)))}function zn(e){var t,n;if(!(null===(n=null===(t=e.hostVersionsInfo)||void 0===t?void 0:t.appEligibilityInformation)||void 0===n?void 0:n.ageGroup))return e;const r=e.hostVersionsInfo.appEligibilityInformation.ageGroup;return"nonadult"!==(null==r?void 0:r.toLowerCase())?e:Object.assign(Object.assign({},e),{hostVersionsInfo:Object.assign(Object.assign({},e.hostVersionsInfo),{appEligibilityInformation:Object.assign(Object.assign({},e.hostVersionsInfo.appEligibilityInformation),{ageGroup:_e.NotAdult})})})}class $n{constructor(e=Sn()){this.uuid=e,Vn(e)}toString(){return this.uuid}serialize(){return this.toString()}}function qn(e){if(!(e instanceof $n))throw new Error(`Potential id (${JSON.stringify(e)}) is invalid; it is not an instance of UUID class.`)}class Gn{}Gn.initializeCalled=!1,Gn.initializeCompleted=!1,Gn.additionalValidOrigins=[],Gn.initializePromise=void 0,Gn.isFramelessWindow=!1,Gn.frameContext=void 0,Gn.hostClientType=void 0,Gn.printCapabilityEnabled=!1,Gn.teamsJsInstanceId=(new $n).toString();var Jn=n(815);const Kn=new $n,Qn=Jn.debug.formatArgs;Jn.debug.formatArgs=function(e){e[0]=`(${(new Date).toISOString()}): ${e[0]} [${Kn.toString()}]`,Qn.call(this,e)};const Zn=(0,Jn.debug)("teamsJs");function Xn(e){return Zn.extend(e)}function Yn(e,t){return`${e}_${t}`}function er(e){return/^v\d+_[\w.]+$/.test(e)}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 nr=Xn("runtime"),rr=4;function or(e){return e.apiVersion===rr}const ir={apiVersion:-1,supports:{}};function ar(e){if(or(e))return!0;throw-1===e.apiVersion?new Error(ct):new Error(ut)}let sr=ir;const cr={apiVersion:4,isNAAChannelRecommended:!1,isDeeplyNestedAuthSupported:!1,hostVersionsInfo:mn,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:{}}}},ur=[an.desktop,an.web,an.rigel,an.surfaceHub,an.teamsRoomsWindows,an.teamsRoomsAndroid,an.teamsPhones,an.teamsDisplays],lr=[an.android,an.ios,an.ipados,an.visionOS],dr=[...ur,...lr];function fr(e){let t=e;if(t.apiVersion<rr&&pr.forEach((e=>{t.apiVersion===e.versionToUpgradeFrom&&(t=e.upgradeToNextVersion(t))})),or(t))return t;throw new Error("Received a runtime that could not be upgraded to the latest version")}const pr=[{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=tr(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})}}}],gr="2.1.2",hr={"1.0.0":[{capability:{pages:{appButton:{},tabs:{}},stageView:{}},hostClientTypes:ur}],"1.9.0":[{capability:{location:{}},hostClientTypes:dr}],"2.0.0":[{capability:{people:{}},hostClientTypes:dr},{capability:{sharing:{}},hostClientTypes:[an.desktop,an.web]}],"2.0.1":[{capability:{teams:{fullTrust:{joinedTeams:{}}}},hostClientTypes:[an.android,an.desktop,an.ios,an.teamsRoomsAndroid,an.teamsPhones,an.teamsDisplays,an.web]},{capability:{webStorage:{}},hostClientTypes:[an.desktop]}],"2.0.5":[{capability:{webStorage:{}},hostClientTypes:[an.android,an.ios]}],"2.0.8":[{capability:{sharing:{}},hostClientTypes:[an.android,an.ios]}],"2.1.1":[{capability:{nestedAppAuth:{}},hostClientTypes:[an.android,an.ios,an.ipados,an.visionOS]}],"2.1.2":[]},mr=nr.extend("generateBackCompatRuntimeConfig");function vr(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]=vr(e[r]||{},t[r]));return n}function wr(e,t,n){mr("generating back compat runtime config for %s",e);let r=Object.assign({},t.supports);mr("Supported capabilities in config before updating based on highestSupportedVersion: %o",r),Object.keys(n).forEach((t=>{yn(e,t)>=0&&n[t].forEach((e=>{void 0!==Gn.hostClientType&&e.hostClientTypes.includes(Gn.hostClientType)&&(r=vr(r,e.capability))}))}));const o={apiVersion:rr,hostVersionsInfo:mn,isLegacyTeams:!0,supports:r};return mr("Runtime config after updating based on highestSupportedVersion: %o",o),o}const Cr=nr.extend("applyRuntimeConfig");function yr(e){"string"==typeof e.apiVersion&&(Cr("Trying to apply runtime with string apiVersion, processing as v1: %o",e),e=Object.assign(Object.assign({},e),{apiVersion:1})),Cr("Fast-forwarding runtime %o",e);const t=fr(e);Cr("Applying runtime %o",t),sr=bn(t)}function Sr(e){return null!=e&&void 0!==e.serialize&&"function"==typeof e.serialize}const br="2.44.0",Er={childProxyingCommunication:!1};function Ar(){Er.childProxyingCommunication=!0}function Ir(){return Er.childProxyingCommunication}let Pr={disableEnforceOriginMatchForChildResponses:!1};function Tr(){return Pr}function Or(e){Pr=e}function Rr(e){return Or(Object.assign(Object.assign({},Pr),e)),Tr()}var Fr=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 kr=e=>{const{uuid:t}=e,n=Fr(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})},Mr=e=>{const{uuidAsString:t}=e,n=Fr(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new $n(t):void 0})},Nr=e=>{const{uuidAsString:t}=e,n=Fr(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new $n(t):void 0})},xr=e=>{const{uuid:t}=e,n=Fr(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})};function Dr(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 Lr=Xn("flushMessageQueue");function Ur(e,t,n,r){if(e&&t&&0!==n.length)for(;n.length>0;){const o=n.shift();if(o){const n=kr(o);Lr("Flushing message %s from %s message queue via postMessage.",Dr(n),r),e.postMessage(n,t)}}}const Hr=Xn("internal"),_r=Hr.extend("ensureInitializeCalled"),Vr=Hr.extend("ensureInitialized");function Br(){if(!Gn.initializeCalled)throw _r(st),new Error(st)}function jr(e,...t){if(!Gn.initializeCompleted)throw Vr("%s. initializeCalled: %s",st,Gn.initializeCalled.toString()),new Error(st);if(t&&t.length>0){let e=!1;for(let n=0;n<t.length;n++)if(t[n]===Gn.frameContext){e=!0;break}if(!e)throw new Error(`This call is only allowed in following contexts: ${JSON.stringify(t)}. Current context: "${Gn.frameContext}".`)}return ar(e)}function Wr(e=$e){const t=yn(Gn.clientSupportedSDKVersion,e);return!isNaN(t)&&t>=0}function zr(){return Gn.hostClientType==an.android||Gn.hostClientType==an.ios||Gn.hostClientType==an.ipados||Gn.hostClientType==an.visionOS}function $r(e=$e){if(!zr()){throw{errorCode:De.NOT_SUPPORTED_ON_PLATFORM}}if(!Wr(e)){throw{errorCode:De.OLD_PLATFORM}}}function qr(e){let t=Gn.additionalValidOrigins.concat(e.filter((e=>"string"==typeof e&&ot.test(e))));const n={};t=t.filter((e=>!n[e]&&(n[e]=!0,!0))),Gn.additionalValidOrigins=t}function Gr(e){if(!Zr(e))throw new Error(`Potential app id (${e}) is invalid; its length ${e.length} is not within the length limits (${Kr}-${Qr}).`)}function Jr(e){if(Un(e))throw new Error(`Potential app id (${e}) is invalid; it contains script tags.`);if(Xr(e))throw new Error(`Potential app id (${e}) is invalid; it contains non-printable characters.`)}const Kr=4,Qr=256;function Zr(e){return e.length<Qr&&e.length>Kr}function Xr(e){return[...e].some((e=>{const t=e.charCodeAt(0);return t<32||t>126}))}function Yr(e){if(!(e instanceof to))throw new Error(`Potential app id (${e}) is invalid; it is not an instance of AppId class.`)}class eo{constructor(e){this.idAsString=e,Jr(e)}serialize(){return this.toString()}toString(){return this.idAsString}}class to extends eo{constructor(e){super(e),Gr(e)}toJSON(){return{appIdAsString:this.toString()}}}function no(e){return null==e}var ro=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 oo;const io="v1",ao=Xn("messageChannels.telemetry");function so(){return ro(this,void 0,void 0,(function*(){if(oo)return ao("Returning telemetry port from cache"),oo;if(!co())throw gn;return oo=yield mc(Yn(io,"messageChannels.telemetry.getTelemetryPort"),"messageChannels.telemetry.getTelemetryPort"),oo}))}function co(){var e;return!(!jr(sr)||!(null===(e=sr.supports.messageChannels)||void 0===e?void 0:e.telemetry))}function uo(){oo=void 0}var lo=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 fo;const po="v1",go=Xn("messageChannels.dataLayer");function ho(){return lo(this,void 0,void 0,(function*(){if(fo)return go("Returning dataLayer port from cache"),fo;if(!mo())throw gn;return fo=yield mc(Yn(po,"messageChannels.dataLayer.getDataLayerPort"),"messageChannels.dataLayer.getDataLayerPort"),fo}))}function mo(){var e;return!(!jr(sr)||!(null===(e=sr.supports.messageChannels)||void 0===e?void 0:e.dataLayer))}function vo(){fo=void 0}function wo(e){if(!e)throw new Error("[app.lifecycle.registerBeforeSuspendOrTerminateHandler] Handler cannot be null");jr(sr),Ns(e)}function Co(e){if(!e)throw new Error("[app.lifecycle.registerOnResumeHandler] Handler cannot be null");jr(sr),xs(e)}const yo="v2",So=Xn("app"),bo={AppLoaded:"appInitialization.appLoaded",Success:"appInitialization.success",Failure:"appInitialization.failure",ExpectedFailure:"appInitialization.expectedFailure"};var Eo,Ao;function Io(){return Gn.initializeCompleted}function Po(){return Gn.frameContext}function To(e){return Ki(Yn(yo,"app.initialize"),e)}function Oo(e){oc.currentWindow=e}function Ro(){Gn.initializeCalled&&(vs(),Gn.initializeCalled=!1,Gn.initializeCompleted=!1,Gn.initializePromise=void 0,Gn.additionalValidOrigins=[],Gn.frameContext=void 0,Gn.hostClientType=void 0,Gn.isFramelessWindow=!1,uo(),vo(),sc())}function Fo(){return new Promise((e=>{Br(),e(cc(Yn(yo,"app.getContext"),"getContext"))})).then((e=>Ho(e)))}function ko(){Br(),Qi(Yn(yo,"app.notifyAppLoaded"))}function Mo(){return Yi(Yn(yo,"app.notifySuccess"))}function No(e){Br(),Xi(Yn(yo,"app.notifyFailure"),e)}function xo(e){Br(),Zi(Yn(yo,"app.notifyExpectedFailure"),e)}function Do(e){oa(Yn(yo,"app.registerOnThemeChangeHandler"),e)}function Lo(e){Ps(e)}function Uo(e){return ia(Yn(yo,"app.openLink"),e)}function Ho(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,messageId:e.messageId,parentMessageId:e.parentMessageId,userClickTime:e.userClickTime,userClickTimeV2:e.userClickTimeV2,userFileOpenPreference:e.userFileOpenPreference,host:{name:e.hostName?e.hostName:sn.teams,clientType:e.hostClientType?e.hostClientType:an.web,sessionId:e.sessionId?e.sessionId:"",ringId:e.ringId},appLaunchId:e.appLaunchId,appId:e.appId?new to(e.appId):void 0,manifestVersion:e.manifestVersion},page:{id:e.entityId,frameContext:e.frameContext?e.frameContext:Gn.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 _o(e){ei(Yn(Xo,"dialog.update.resize"),e)}function Vo(){return!(!jr(sr)||!sr.supports.dialog)&&!!sr.supports.dialog.update}function Bo(e,t,n){ni(Yn(Xo,"dialog.url.bot.open"),e,t,n)}function jo(){return jr(sr)&&void 0!==(sr.supports.dialog&&sr.supports.dialog.url&&sr.supports.dialog.url.bot)}function Wo(e){if(jr(sr,cn.task),!qo())throw gn;Cc(Yn(Xo,"dialog.url.parentCommunication.sendMessageToParentFromDialog"),"messageForParent",[e])}function zo(e){if(jr(sr,cn.content,cn.sidePanel,cn.meetingStage),!qo())throw gn;Cc(Yn(Xo,"dialog.url.parentCommunication.sendMessageToDialog"),"messageForChild",[e])}function $o(e){if(jr(sr,cn.task),!qo())throw gn;for(Ss("messageForChild"),ys(Yn(Xo,"dialog.url.parentCommunication.registerMessageForChildHandler"),"messageForChild",e),ai.reverse();ai.length>0;){e(ai.pop())}}function qo(){var e,t;return jr(sr)&&!!(null===(t=null===(e=sr.supports.dialog)||void 0===e?void 0:e.url)||void 0===t?void 0:t.parentCommunication)}function Go(e,t,n){ti(Yn(Xo,"dialog.url.open"),e,t,n)}function Jo(e,t){ri(Yn(Xo,"dialog.url.submit"),e,t)}function Ko(){return jr(sr)&&void 0!==(sr.supports.dialog&&sr.supports.dialog.url)}function Qo(e){return{url:e.url,height:e.size?e.size.height:fn.Small,width:e.size?e.size.width:fn.Small,title:e.title,fallbackUrl:e.fallbackUrl}}function Zo(e){const t=Qo(e);return t.completionBotId=e.completionBotId,t}!function(e){e.AuthFailed="AuthFailed",e.Timeout="Timeout",e.Other="Other"}(Eo||(Eo={})),function(e){e.PermissionError="PermissionError",e.NotFound="NotFound",e.Throttling="Throttling",e.Offline="Offline",e.Other="Other"}(Ao||(Ao={})),So("teamsjs instance is version %s, starting at %s UTC (%s local)",br,(new Date).toISOString(),(new Date).toLocaleString()),function(){if(Nn())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?So("teamsjs is being used from %s. %s",t,n):So("teamsjs is being used from a script tag embedded directly in your html. %s",n)}();const Xo="v2",Yo="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 ei(e,t){if(jr(sr,cn.content,cn.sidePanel,cn.task,cn.meetingStage),!Vo())throw gn;Cc(e,"tasks.updateTask",[t])}function ti(e,t,n,r){if(jr(sr,cn.content,cn.sidePanel,cn.meetingStage),!Ko())throw gn;r&&ys(Yn(Xo,"dialog.url.registerMessageForParentHandler"),"messageForParent",r);Cc(e,"tasks.startTask",[Qo(t)],((e,t)=>{null==n||n({err:e,result:t}),Ss("messageForParent")}))}function ni(e,t,n,r){if(jr(sr,cn.content,cn.sidePanel,cn.meetingStage),!jo())throw gn;r&&ys(Yn(Xo,"dialog.url.bot.registerMessageForParentHandler"),"messageForParent",r);Cc(e,"tasks.startTask",[Zo(t)],((e,t)=>{null==n||n({err:e,result:t}),Ss("messageForParent")}))}function ri(e,t,n){if(jr(sr,cn.content,cn.task),!Ko())throw gn;Gn.frameContext===cn.content&&console.warn(Yo),Cc(e,"tasks.completeTask",[t,n?Array.isArray(n)?n:[n]:[]])}function oi(e){return{card:e.card,height:e.size?e.size.height:fn.Small,width:e.size?e.size.width:fn.Small,title:e.title}}function ii(e){const t=oi(e);return t.completionBotId=e.completionBotId,t}const ai=[];function si(e){Gn.frameContext&&(Gn.frameContext===cn.task?ai.push(e):Ss("messageForChild"))}function ci(e,t){if(jr(sr,cn.content,cn.sidePanel,cn.meetingStage),!ui())throw gn;const n=ii(e);Cc(Yn(Xo,"dialog.adaptiveCard.bot.open"),"tasks.startTask",[n],((e,n)=>{null==t||t({err:e,result:n})}))}function ui(){const e=sr.hostVersionsInfo&&sr.hostVersionsInfo.adaptiveCardSchemaVersion&&!On(sr.hostVersionsInfo.adaptiveCardSchemaVersion);return jr(sr)&&void 0!==(e&&sr.supports.dialog&&sr.supports.dialog.card&&sr.supports.dialog.card.bot)}function li(e,t){if(jr(sr,cn.content,cn.sidePanel,cn.meetingStage),!di())throw gn;const n=oi(e);Cc(Yn(Xo,"dialog.adaptiveCard.open"),"tasks.startTask",[n],((e,n)=>{null==t||t({err:e,result:n})}))}function di(){const e=sr.hostVersionsInfo&&sr.hostVersionsInfo.adaptiveCardSchemaVersion&&!On(sr.hostVersionsInfo.adaptiveCardSchemaVersion);return jr(sr)&&void 0!==(e&&sr.supports.dialog&&sr.supports.dialog.card)}function fi(){ys(Yn(Xo,"dialog.registerMessageForChildHandler"),"messageForChild",si,!1)}function pi(){return!(!jr(sr)||!sr.supports.dialog)}const gi="v2";var hi,mi;!function(e){e[e.ifRoom=0]="ifRoom",e[e.overflowOnly=1]="overflowOnly"}(hi||(hi={}));class vi{constructor(){this.enabled=!0,this.selected=!1}}let wi,Ci,yi,Si,bi;function Ei(){ys(Yn(gi,"menus.registerNavBarMenuItemPressHandler"),"navBarMenuItemPress",Ti,!1),ys(Yn(gi,"menus.registerActionMenuItemPressHandler"),"actionMenuItemPress",Ri,!1),ys(Yn(gi,"menus.registerSetModuleViewHandler"),"setModuleView",Ii,!1)}function Ai(e,t){if(jr(sr),!Fi())throw gn;yi=t,Cc(Yn(gi,"menus.setUpViews"),"setUpViews",[e])}function Ii(e){yi&&yi(e)||(jr(sr),Cc(Yn(gi,"menus.handleViewConfigItemPress"),"viewConfigItemPress",[e]))}function Pi(e,t){if(jr(sr),!Fi())throw gn;wi=t,Cc(Yn(gi,"menus.setNavBarMenu"),"setNavBarMenu",[e])}function Ti(e){wi&&wi(e)||(jr(sr),Cc(Yn(gi,"menus.handleNavBarMenuItemPress"),"handleNavBarMenuItemPress",[e]))}function Oi(e,t){if(jr(sr),!Fi())throw gn;Ci=t,Cc(Yn(gi,"menus.showActionMenu"),"showActionMenu",[e])}function Ri(e){Ci&&Ci(e)||(jr(sr),Cc(Yn(gi,"menus.handleActionMenuItemPress"),"handleActionMenuItemPress",[e]))}function Fi(){return!(!jr(sr)||!sr.supports.menus)}function ki(){ys(Yn(Ja,"pages.config.registerSettingsSaveHandler"),"settings.save",Hi,!1),ys(Yn(Ja,"pages.config.registerSettingsRemoveHandler"),"settings.remove",Bi,!1)}function Mi(e){return rs(Yn(Ja,"pages.config.setValidityState"),e)}function Ni(e){return is(Yn(Ja,"pages.config.setConfig"),e)}function xi(e){Di(Yn(Ja,"pages.config.registerOnSaveHandler"),e,(()=>{if(!no(e)&&!Wi())throw gn}))}function Di(e,t,n){!no(t)&&jr(sr,cn.settings),n&&n(),Si=t,!no(t)&&Cc(e,"registerHandler",["save"])}function Li(e){Ui(Yn(Ja,"pages.config.registerOnRemoveHandler"),e,(()=>{if(!no(e)&&!Wi())throw gn}))}function Ui(e,t,n){!no(t)&&jr(sr,cn.remove,cn.settings),n&&n(),bi=t,!no(t)&&Cc(e,"registerHandler",["remove"])}function Hi(e){const t=new Vi(e);Si?Si(t):_s()?qs("settings.save",[e]):t.notifySuccess()}function _i(e){Es(Yn(Ja,"pages.config.registerChangeConfigHandler"),"changeSettings",e,[cn.content],(()=>{if(!Wi())throw gn}))}!function(e){e.dropDown="dropDown",e.popOver="popOver"}(mi||(mi={}));class Vi{constructor(e){this.notified=!1,this.result=e||{}}notifySuccess(){this.ensureNotNotified(),Cc(Yn(Ja,"pages.saveEvent.notifySuccess"),"settings.save.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),Cc(Yn(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 Bi(){const e=new ji;bi?bi(e):_s()?qs("settings.remove",[]):e.notifySuccess()}class ji{constructor(){this.notified=!1}notifySuccess(){this.ensureNotNotified(),Cc(Yn(Ja,"pages.removeEvent.notifySuccess"),"settings.remove.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),Cc(Yn(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 Wi(){return!(!jr(sr)||!sr.supports.pages)&&!!sr.supports.pages.config}class zi{}class $i extends zi{validate(e){return!0}deserialize(e){return e}}var qi=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 Gi=6e4,Ji=Xn("app");function Ki(e,t){if(Nn()){return Ji.extend("initialize")("window object undefined at initialization"),Promise.resolve()}return Pn((()=>ra(e,t)),Gi,new Error("SDK initialization timed out."))}function Qi(e){Cc(e,bo.AppLoaded,[br])}function Zi(e,t){Cc(e,bo.ExpectedFailure,[t.reason,t.message])}function Xi(e,t){Cc(e,bo.Failure,[t.reason,t.message])}function Yi(e){return qi(this,void 0,void 0,(function*(){if(Gn.initializeCompleted)return ta(e);if(!Gn.initializePromise)throw new Error(st);return Gn.initializePromise.then((()=>ta(e)))}))}function ea(){var e;return jr(sr)&&!!(null===(e=sr.supports.app)||void 0===e?void 0:e.notifySuccessResponse)}function ta(e){return qi(this,void 0,void 0,(function*(){return ea()?gc(bo.Success,[br],new $i,e).then((()=>({hasFinishedSuccessfully:!0}))):(Cc(e,bo.Success,[br]),{hasFinishedSuccessfully:"unknown"})}))}const na=Ji.extend("initializeHelper");function ra(e,t){return new Promise((n=>{Gn.initializeCalled||(Gn.initializeCalled=!0,ms(),Gn.initializePromise=ac(t,e).then((({context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r=$e})=>{Gn.frameContext=e,Gn.hostClientType=t,Gn.clientSupportedSDKVersion=r;try{na("Parsing %s",n);let e=JSON.parse(n);if(na("Checking if %o is a valid runtime object",null!=e?e:"null"),!e||!e.apiVersion)throw new Error("Received runtime config is invalid");e=zn(e),n&&yr(e)}catch(e){if(!(e instanceof SyntaxError))throw e;try{na("Attempting to parse %s as an SDK version",n),isNaN(yn(n,$e))||(Gn.clientSupportedSDKVersion=n);let e=JSON.parse(r);if(na("givenRuntimeConfig parsed to %o",null!=e?e:"null"),!e)throw new Error("givenRuntimeConfig string was successfully parsed. However, it parsed to value of null");e=zn(e),yr(e)}catch(e){if(!(e instanceof SyntaxError))throw e;yr(wr(Gn.clientSupportedSDKVersion,cr,hr))}}Gn.initializeCompleted=!0})),Ei(),ki(),fi()),Array.isArray(t)&&qr(t),void 0!==Gn.initializePromise?n(Gn.initializePromise):na("GlobalVars.initializePromise is unexpectedly undefined")}))}function oa(e,t){!no(t)&&Br(),As(e,t)}function ia(e,t){return new Promise((n=>{jr(sr,cn.content,cn.sidePanel,cn.settings,cn.task,cn.stage,cn.meetingStage),n(uc(e,"executeDeepLink",t))}))}var aa=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 sa=[];const ca=Xn("validateOrigin");let ua;function la(){return aa(this,void 0,void 0,(function*(){ua||(yield fa())}))}function da(){return 0===sa.length}function fa(e=!1){return aa(this,void 0,void 0,(function*(){if(!da()&&!e)return sa;if(ua)return ua;if(Nn())return sa=tt,tt;{ca("Initiating fetch call to acquire valid origins list from CDN");const e=new AbortController,t=setTimeout((()=>e.abort()),nt);return ua=fetch(rt,{signal:e.signal}).then((e=>{if(clearTimeout(t),!e.ok)throw new Error("Invalid Response from Fetch Call");return ca("Fetch call completed and retrieved valid origins list from CDN"),e.json().then((e=>{if(pa(JSON.stringify(e)))return sa=e.validOrigins,sa;throw new Error("Valid origins list retrieved from CDN is invalid")}))})).catch((e=>("AbortError"===e.name?ca(`validOrigins fetch call to CDN failed due to Timeout of ${nt} ms. Defaulting to fallback list`):ca("validOrigins fetch call to CDN failed with error: %s. Defaulting to fallback list",e),sa=tt,sa))),ua}}))}function pa(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 ca("isValidOriginsFromCDN call failed to validate origin: %s",e),!1}return!0}function ga(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 ha(e,t){const n=t||da()?tt:sa;return ma(e,n)?Promise.resolve(!0):(ca("Origin %s is not in the local valid origins list, fetching from CDN",e),fa(t).then((t=>ma(e,t))))}function ma(e,t){if(!Rn(e))return ca("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=>ga(e,n))))return!0;for(const e of Gn.additionalValidOrigins){if(ga("https://"===e.substring(0,8)?e.substring(8):e,n))return!0}return ca("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,Gn.additionalValidOrigins),!1}function va(e){Es(Yn(Ja,"pages.appButton.onClick"),"appButtonClick",e,[cn.content],(()=>{if(!ya())throw gn}))}function wa(e){Es(Yn(Ja,"pages.appButton.onHoverEnter"),"appButtonHoverEnter",e,[cn.content],(()=>{if(!ya())throw gn}))}function Ca(e){Es(Yn(Ja,"pages.appButton.onHoverLeave"),"appButtonHoverLeave",e,[cn.content],(()=>{if(!ya())throw gn}))}function ya(){return!(!jr(sr)||!sr.supports.pages)&&!!sr.supports.pages.appButton}function Sa(){ds()}function ba(){return Qa(Yn(Ja,"pages.backStack.navigateBack"))}function Ea(e){Aa(Yn(Ja,"pages.backStack.registerBackButtonHandler"),e,(()=>{if(!no(e)&&!Ia())throw gn}))}function Aa(e,t,n){!no(t)&&jr(sr),n&&n(),ls(t),!no(t)&&Cc(e,"registerHandler",["backButton"])}function Ia(){return!(!jr(sr)||!sr.supports.pages)&&!!sr.supports.pages.backStack}function Pa(e){return new Promise((t=>{if(jr(sr,cn.content,cn.sidePanel,cn.settings,cn.task,cn.stage,cn.meetingStage),!Oa())throw gn;t(dc(Yn(Ja,"pages.currentApp.navigateTo"),"pages.currentApp.navigateTo",e))}))}function Ta(){return new Promise((e=>{if(jr(sr,cn.content,cn.sidePanel,cn.settings,cn.task,cn.stage,cn.meetingStage),!Oa())throw gn;e(dc(Yn(Ja,"pages.currentApp.navigateToDefaultPage"),"pages.currentApp.navigateToDefaultPage"))}))}function Oa(){return!(!jr(sr)||!sr.supports.pages)&&!!sr.supports.pages.currentApp}function Ra(){if(jr(sr,cn.content),!ka())throw gn;Cc(Yn(Ja,"pages.fullTrust.enterFullscreen"),"enterFullscreen",[])}function Fa(){if(jr(sr,cn.content),!ka())throw gn;Cc(Yn(Ja,"pages.fullTrust.exitFullscreen"),"exitFullscreen",[])}function ka(){return!(!jr(sr)||!sr.supports.pages)&&!!sr.supports.pages.fullTrust}function Ma(e){return Za(Yn(Ja,"pages.tabs.navigateToTab"),e)}function Na(e){return Ya(Yn(Ja,"pages.tabs.getTabInstances"),e)}function xa(e){return es(Yn(Ja,"pages.tabs.getMruTabInstances"),e)}function Da(){return!(!jr(sr)||!sr.supports.pages)&&!!sr.supports.pages.tabs}var La,Ua;function Ha(e){const t=Yn(Ja,"pages.returnFocus");if(jr(sr),!Ga())throw gn;if(void 0===e&&Cc(t,"returnFocus",[!1]),"boolean"==typeof e)Cc(t,"returnFocus",[e]);else switch(e){case Ua.PreviousLandmark:case Ua.GoToActivityFeed:Cc(t,"returnFocus",[!1,e]);break;case Ua.NextLandmark:Cc(t,"returnFocus",[!0,e])}}function _a(e){Es(Yn(Ja,"pages.registerFocusEnterHandler"),"focusEnter",e,[],(()=>{if(!Ga())throw gn}))}function Va(e){ns(Yn(Ja,"pages.setCurrentFrame"),e)}function Ba(e,t,n){la(),Ki(Yn(Ja,"pages.initializeWithFrameContext"),n).then((()=>t&&t())),Va(e)}function ja(){return os(Yn(Ja,"pages.getConfig."))}function Wa(e){return Ka(Yn(Ja,"pages.navigateCrossDomain"),e)}function za(e){return new Promise((t=>{if(jr(sr,cn.content,cn.sidePanel,cn.settings,cn.task,cn.stage,cn.meetingStage),!Ga())throw gn;const n=Yn(Ja,"pages.navigateToApp");if(sr.isLegacyTeams){t(uc(n,"executeDeepLink",Tn(as(e)?e:ss(e))))}else{t(uc(n,"pages.navigateToApp",as(e)?cs(e):e))}}))}function $a(e){return ts(Yn(Ja,"pages.shareDeepLink"),e)}function qa(e){Es(Yn(Ja,"pages.registerFullScreenHandler"),"fullScreenChange",e,[],(()=>{if(!no(e)&&!Ga())throw gn}))}function Ga(){return!(!jr(sr)||!sr.supports.pages)}la(),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.Read=2]="Read",e[e.Compose=3]="Compose"}(La||(La={})),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.GoToActivityFeed=2]="GoToActivityFeed"}(Ua||(Ua={}));const Ja="v2";function Ka(e,t){return new Promise((n=>{if(jr(sr,cn.content,cn.sidePanel,cn.settings,cn.remove,cn.task,cn.stage,cn.meetingStage),!Ga())throw gn;n(lc(e,"navigateCrossDomain","Cross-origin navigation is only supported for URLs matching the pattern registered in the manifest.",t))}))}function Qa(e){return new Promise((t=>{if(jr(sr),!Ia())throw gn;t(lc(e,"navigateBack","Back navigation is not supported in the current client or context."))}))}function Za(e,t){return new Promise((n=>{if(jr(sr),!Da())throw gn;n(lc(e,"navigateToTab","Invalid internalTabInstanceId and/or channelId were/was provided",t))}))}function Xa(e,t){if(jr(sr),!Ga())throw gn;Cc(e,"returnFocus",[t])}function Ya(e,t){return new Promise((n=>{if(jr(sr),!Da())throw gn;n(cc(e,"getTabInstances",t))}))}function es(e,t){return new Promise((n=>{if(jr(sr),!Da())throw gn;n(cc(e,"getMruTabInstances",t))}))}function ts(e,t){if(jr(sr,cn.content,cn.sidePanel,cn.meetingStage),!Ga())throw gn;Cc(e,"shareDeepLink",[t.subPageId,t.subPageLabel,t.subPageWebUrl])}function ns(e,t){if(jr(sr,cn.content),!Ga())throw gn;Cc(e,"setFrameContext",[t])}function rs(e,t){if(jr(sr,cn.settings,cn.remove),!Wi())throw gn;Cc(e,"settings.setValidityState",[t])}function os(e){return new Promise((t=>{if(jr(sr,cn.content,cn.settings,cn.remove,cn.sidePanel),!Ga())throw gn;t(cc(e,"settings.getSettings"))}))}function is(e,t){return new Promise((n=>{if(jr(sr,cn.content,cn.settings,cn.sidePanel),!Wi())throw gn;n(uc(e,"settings.setSettings",t))}))}function as(e){return e.appId instanceof to}function ss(e){return Object.assign(Object.assign({},e),{appId:new to(e.appId),webUrl:e.webUrl?new URL(e.webUrl):void 0})}function cs(e){return Object.assign(Object.assign({},e),{appId:e.appId.toString(),webUrl:e.webUrl?e.webUrl.toString():void 0})}let us;function ls(e){us=e}function ds(){ys(Yn(Ja,"pages.backStack.registerBackButtonPressHandler"),"backButtonPress",fs,!1)}function fs(){us&&us()||(_s()?qs("backButtonPress",[]):ba())}var ps=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 gs=Xn("handlers");class hs{static initializeHandlers(){hs.handlers.themeChange=Is,hs.handlers.load=Rs,hs.handlers.beforeUnload=Ms,ds()}static uninitializeHandlers(){hs.handlers={},hs.themeChangeHandler=null,hs.loadHandler=null,hs.beforeUnloadHandler=null,hs.beforeSuspendOrTerminateHandler=null,hs.resumeHandler=null}}function ms(){hs.initializeHandlers()}function vs(){hs.uninitializeHandlers()}hs.handlers={},hs.themeChangeHandler=null,hs.loadHandler=null,hs.beforeUnloadHandler=null,hs.beforeSuspendOrTerminateHandler=null,hs.resumeHandler=null,hs.hostToAppPerformanceMetricsHandler=null;const ws=gs.extend("callHandler");function Cs(e,t){const n=hs.handlers[e];if(n){ws("Invoking the registered handler for message %s with arguments %o",e,t);return[!0,n.apply(this,t)]}return _s()?(qs(e,t),[!1,void 0]):(ws("Handler for action message %s not found.",e),[!1,void 0])}function ys(e,t,n,r=!0,o=[]){n?(hs.handlers[t]=n,r&&Cc(e,"registerHandler",[t,...o])):delete hs.handlers[t]}function Ss(e){delete hs.handlers[e]}function bs(e){return null!=hs.handlers[e]}function Es(e,t,n,r,o){n&&jr(sr,...r),o&&o(),ys(e,t,n)}function As(e,t){hs.themeChangeHandler=t,!no(t)&&Cc(e,"registerHandler",["themeChange"])}function Is(e){hs.themeChangeHandler&&hs.themeChangeHandler(e),_s()&&qs("themeChange",[e])}function Ps(e){hs.hostToAppPerformanceMetricsHandler=e}function Ts(e){hs.hostToAppPerformanceMetricsHandler&&hs.hostToAppPerformanceMetricsHandler(e)}function Os(e,t){hs.loadHandler=t,!no(t)&&Cc(e,"registerHandler",["load"])}function Rs(e){const t=Fs(e);hs.resumeHandler?(hs.resumeHandler(t),_s()&&qs("load",[t])):hs.loadHandler&&(hs.loadHandler(e),_s()&&qs("load",[e]))}function Fs(e){return{entityId:e.entityId,contentUrl:new URL(e.contentUrl)}}function ks(e,t){hs.beforeUnloadHandler=t,!no(t)&&Cc(e,"registerHandler",["beforeUnload"])}function Ms(){return ps(this,void 0,void 0,(function*(){const e=()=>{Cc(Yn("v2","handleBeforeUnload"),"readyToUnload",[])};hs.beforeSuspendOrTerminateHandler?(yield hs.beforeSuspendOrTerminateHandler(),_s()?qs("beforeUnload"):e()):hs.beforeUnloadHandler&&hs.beforeUnloadHandler(e)||(_s()?qs("beforeUnload"):e())}))}function Ns(e){hs.beforeSuspendOrTerminateHandler=e,!no(e)&&Cc(Yn("v2","registerBeforeSuspendOrTerminateHandler"),"registerHandler",["beforeUnload"])}function xs(e){hs.resumeHandler=e,!no(e)&&Cc(Yn("v2","registerOnResumeHandler"),"registerHandler",["load"])}var Ds=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 Ls=Xn("childProxyingCommunication");class Us{}function Hs(){Us.window=null,Us.origin=null,Us.messageQueue=[]}function _s(){return!!Ir()&&!!Us.window}function Vs(e,t){return!!Ir()&&(Us.window&&!Us.window.closed&&e!==Us.window||(Us.window=e,Us.origin=t),Us.window&&Us.window.closed?(Us.window=null,Us.origin=null,!1):Us.window===e)}function Bs(e,t,n,r){return Ds(this,void 0,void 0,(function*(){Us.window===t&&(Ur(Us.window,Us.origin,Us.messageQueue,"child"),Ws(e,n,r))}))}Us.messageQueue=[];const js=Ls.extend("handleIncomingMessageFromChild");function Ws(e,t,n){if(void 0===e.data.id||void 0===e.data.func)return;const r=Mr(e.data),[o,i]=Cs(r.func,r.args);if(o&&void 0!==i)return js("Handler called in response to message %s from child. Returning response from handler to child, action: %s.",Dr(r),r.func),void $s(r.id,r.uuid,Array.isArray(i)?i:[i]);js("No handler for message %s from child found; relaying message on to parent, action: %s. Relayed message will have a new id.",Dr(r),r.func),zs(r,t,n)}function zs(e,t,n){const r=t(Yn("v2","tasks.startTask"),e.func,e.args,!0,e.teamsJsInstanceId),o=Us.origin;n(r.uuid,((...t)=>{if(!Us.window)return;if(!Tr().disableEnforceOriginMatchForChildResponses&&o!==Us.origin)return void js("Origin of child window has changed, not sending response back to child window");const n=t.pop();js("Message from parent being relayed to child, id: %s",Dr(e)),$s(e.id,e.uuid,t,n)}))}function $s(e,t,n,r){const o=Us.window,i=Gs(e,t,n,r),a=xr(i),s=Us.origin;o&&s&&(js("Sending message %s to %s via postMessage, args = %o",Dr(a),"child",a.args),o.postMessage(a,s))}function qs(e,t){const n=Us.window,r=Js(e,t),o=Us.origin;n&&o?n.postMessage(r,o):Us.messageQueue.push(r)}function Gs(e,t,n,r){return{id:e,uuid:t,args:n||[],isPartialResponse:r}}function Js(e,t){return{func:e,args:t||[]}}class Ks{static storeCallbackInformation(e,t){Ks.callbackInformation.set(e,t)}static clearMessages(){Ks.callbackInformation.clear()}static deleteMessageInformation(e){Ks.callbackInformation.delete(e)}static handleOneWayPerformanceMetrics(e,t,n){const r=e.monotonicTimestamp;r&&n?Ts({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=Ks.callbackInformation.get(e);o&&t.monotonicTimestamp&&r?(Ts({actionName:o.name,messageDelay:r-t.monotonicTimestamp,requestStartedAt:o.calledAt}),Ks.deleteMessageInformation(e)):n("Unable to send performance metrics for callback %s with arguments %o",e.toString(),t.args)}}Ks.callbackInformation=new Map;const Qs=Xn("nestedAppAuthUtils"),Zs=Qs.extend("tryPolyfillWithNestedAppAuthBridge"),Xs="v2";function Ys(e,t,n){var r;const o=Zs;if(Gn.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=tc(a,n);s&&(a.nestedAppAuthBridge=s)}const ec=Qs.extend("createNestedAppAuthBridge");function tc(e,t){const n=ec;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=Yn(Xs,"nestedAppAuth.execute");o(e,r)},removeEventListener:(t,n)=>{e.removeEventListener(t,i(n))}}}var nc=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 rc=Xn("communication");class oc{}class ic{}function ac(e,t){if(ic.messageListener=e=>Tc(e),oc.currentWindow=oc.currentWindow||Mn(),oc.parentWindow=oc.currentWindow.parent!==oc.currentWindow.self?oc.currentWindow.parent:oc.currentWindow.opener,oc.topWindow=oc.currentWindow.top,(oc.parentWindow||e)&&oc.currentWindow.addEventListener("message",ic.messageListener,!1),!oc.parentWindow){const e=oc.currentWindow;if(!e.nativeInterface)return Promise.reject(new Error("Initialization Failed. No Parent window found."));Gn.isFramelessWindow=!0,e.onNativeMessage=Uc}try{return oc.parentOrigin="*",fc(t,"initialize",[br,rr,e]).then((([e,t,n,r])=>(Ys(r,oc.currentWindow,{onMessage:Rc,sendPostMessage:Sc}),{context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r})))}finally{oc.parentOrigin=null}}function sc(){oc.currentWindow&&oc.currentWindow.removeEventListener("message",ic.messageListener,!1),oc.currentWindow=null,oc.parentWindow=null,oc.parentOrigin=null,ic.parentMessageQueue=[],ic.nextMessageId=0,ic.callbacks.clear(),ic.promiseCallbacks.clear(),ic.portCallbacks.clear(),ic.legacyMessageIdsToUuidMap={},Ks.clearMessages(),Hs()}function cc(e,t,...n){return fc(e,t,n).then((([e])=>e))}function uc(e,t,...n){return fc(e,t,n).then((([e,t])=>{if(!e)throw new Error(t)}))}function lc(e,t,n,...r){return fc(e,t,r).then((([e,t])=>{if(!e)throw new Error(t||n)}))}function dc(e,t,...n){return fc(e,t,n).then((([e,t])=>{if(e)throw e;return t}))}function fc(e,t,n=void 0){if(!er(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(wc(Ic(e,t,n).uuid))}))}function pc(e){return e.map((e=>Sr(e)?e.serialize():e))}function gc(e,t,n,r,o){var i;return nc(this,void 0,void 0,(function*(){const a=pc(t),[s]=yield fc(r,e,a);if(o&&o(s)||!o&&We(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(`${De.INTERNAL_ERROR}, message: Invalid response from host - ${JSON.stringify(s)}`)}))}function hc(e,t,n,r){var o;return nc(this,void 0,void 0,(function*(){const i=pc(t),[a]=yield fc(n,e,i);if(r&&r(a)||!r&&We(a))throw new Error(`${a.errorCode}, message: ${null!==(o=a.message)&&void 0!==o?o:"None"}`);if(void 0!==a)throw new Error(`${De.INTERNAL_ERROR}, message: Invalid response from host`)}))}function mc(e,t,n=void 0){if(!er(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 vc(Ic(e,t,n).uuid)}function vc(e){return new Promise(((t,n)=>{ic.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 wc(e){return new Promise((t=>{ic.promiseCallbacks.set(e,t)}))}function Cc(e,t,n,r){let o;if(n instanceof Function?r=n:n instanceof Array&&(o=n),!er(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=Ic(e,t,o);r&&ic.callbacks.set(i.uuid,r)}ic.parentMessageQueue=[],ic.topMessageQueue=[],ic.nextMessageId=0,ic.callbacks=new Map,ic.promiseCallbacks=new Map,ic.portCallbacks=new Map,ic.legacyMessageIdsToUuidMap={};const yc=rc.extend("sendNestedAuthRequestToTopWindow");function Sc(e,t){const n=yc,r=oc.topWindow,o=$c(e,t);return n("Message %s information: %o",Dr(o),{actionName:o.func}),Ec(r,o)}const bc=rc.extend("sendRequestToTargetWindowHelper");function Ec(e,t){const n=bc,r=jc(e),o=kr(t);if(Gn.isFramelessWindow)oc.currentWindow&&oc.currentWindow.nativeInterface&&(n("Sending message %s to %s via framelessPostMessage interface",Dr(o),r),oc.currentWindow.nativeInterface.framelessPostMessage(JSON.stringify(o)));else{const i=Bc(e);e&&i?(n("Sending message %s to %s via postMessage",Dr(o),r),e.postMessage(o,i)):(n("Adding message %s to %s message queue",Dr(o),r),Vc(e).push(t))}return t}const Ac=rc.extend("sendMessageToParentHelper");function Ic(e,t,n,r,o){const i=Ac,a=oc.parentWindow,s=zc(e,t,n,r,o);return Ks.storeCallbackInformation(s.uuid,{name:t,calledAt:s.timestamp}),i("Message %s information: %o",Dr(s),{actionName:t,args:n}),Ec(a,s)}const Pc=rc.extend("processIncomingMessage");function Tc(e){return nc(this,void 0,void 0,(function*(){if(!e||!e.data||"object"!=typeof e.data)return void Pc("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 kc(t,n).then((r=>{r?(Mc(t,n),t!==oc.parentWindow?Vs(t,n)&&Bs(e,t,Ic,((e,t)=>ic.callbacks.set(e,t))):Uc(e)):Pc("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 Oc=rc.extend("processAuthBridgeMessage");function Rc(e,t){var n,r;const o=Oc;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?kc(c,u)?(oc.topWindow&&!oc.topWindow.closed&&c!==oc.topWindow||(oc.topWindow=c,oc.topOrigin=u),oc.topWindow&&oc.topWindow.closed&&(oc.topWindow=null,oc.topOrigin=null),Ur(oc.topWindow,oc.topOrigin,ic.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 Fc=rc.extend("shouldProcessIncomingMessage");function kc(e,t){return nc(this,void 0,void 0,(function*(){if(oc.currentWindow&&e===oc.currentWindow)return Fc("Should not process message because it is coming from the current window"),!1;if(oc.currentWindow&&oc.currentWindow.location&&t&&t===oc.currentWindow.location.origin)return!0;{let e;try{e=new URL(t)}catch(e){return Fc("Message has an invalid origin of %s",t),!1}const n=yield ha(e);return n||Fc("Message has an invalid origin of %s",t),n}}))}function Mc(e,t){Gn.isFramelessWindow||oc.parentWindow&&!oc.parentWindow.closed&&e!==oc.parentWindow||(oc.parentWindow=e,oc.parentOrigin=t),oc.parentWindow&&oc.parentWindow.closed&&(oc.parentWindow=null,oc.parentOrigin=null),Ur(oc.parentWindow,oc.parentOrigin,ic.parentMessageQueue,"parent")}const Nc=rc.extend("handleIncomingMessageFromParent");function xc(e){const t=Nc;if(!e.uuid)return ic.legacyMessageIdsToUuidMap[e.id];{const t=e.uuid,n=Dc(ic.callbacks,t);if(n)return n;const r=Dc(ic.promiseCallbacks,t);if(r)return r;const o=Dc(ic.portCallbacks,t);if(o)return o}t("Received message %s that failed to produce a callbackId",Dr(e))}function Dc(e,t){if(t){const n=[...e].find((([e,n])=>e.toString()===t.toString()));if(n)return n[0]}}function Lc(e,t){const n=Dc(t,e.uuid);n&&t.delete(n),e.uuid?ic.legacyMessageIdsToUuidMap={}:delete ic.legacyMessageIdsToUuidMap[e.id]}function Uc(e){const t=Nc,n=jn();if("id"in e.data&&"number"==typeof e.data.id){const r=e.data,o=Nr(r),i=xc(o);if(i){const r=ic.callbacks.get(i);t("Received a response from parent for message %s",i.toString()),Ks.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]),Hc(e)||(t("Removing registered callback for message %s",i.toString()),Lc(o,ic.callbacks)));const a=ic.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()),Lc(o,ic.promiseCallbacks));const s=ic.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()),Lc(o,ic.portCallbacks)}o.uuid&&(ic.legacyMessageIdsToUuidMap={})}}else if("func"in e.data&&"string"==typeof e.data.func){const r=e.data;Ks.handleOneWayPerformanceMetrics(r,t,n),t('Received a message from parent %s, action: "%s"',Dr(r),r.func),Cs(r.func,r.args)}else t("Received an unknown message: %O",e)}function Hc(e){return!0===e.data.isPartialResponse}function _c(){return oc.topWindow!==oc.parentWindow}function Vc(e){return e===oc.topWindow&&_c()?ic.topMessageQueue:e===oc.parentWindow?ic.parentMessageQueue:[]}function Bc(e){return e===oc.topWindow&&_c()?oc.topOrigin:e===oc.parentWindow?oc.parentOrigin:null}function jc(e){return e===oc.topWindow&&_c()?"top":e===oc.parentWindow?"parent":null}function Wc(e,t){let n;n=oc.currentWindow.setInterval((()=>{0===Vc(e).length&&(clearInterval(n),t())}),100)}function zc(e,t,n,r,o){const i=ic.nextMessageId++,a=new $n;ic.legacyMessageIdsToUuidMap[i]=a;const s=!0===r?o:Gn.teamsJsInstanceId;return{id:i,uuid:a,func:t,timestamp:Date.now(),monotonicTimestamp:jn(),args:n||[],apiVersionTag:e,isProxiedFromChild:null!=r&&r,teamsJsInstanceId:s}}function $c(e,t){const n=ic.nextMessageId++,r=new $n;return ic.legacyMessageIdsToUuidMap[n]=r,{id:n,uuid:r,func:"nestedAppAuth.execute",timestamp:Date.now(),monotonicTimestamp:jn(),apiVersionTag:t,args:[],data:e}}const qc="v1";function Gc(e){if(!no(e)&&jr(sr),!no(e)&&!Jc())throw gn;e?ys(Yn(qc,"log.request"),"log.request",(()=>{const t=e();Cc(Yn(qc,"log.receive"),"log.receive",[t])})):Ss("log.request")}function Jc(){return!(!jr(sr)||!sr.supports.logs)}var Kc,Qc,Zc;!function(e){e.fileDownloadStart="fileDownloadStart",e.fileDownloadComplete="fileDownloadComplete"}(Kc||(Kc={})),function(e){e.view="view",e.edit="edit",e.editNew="editNew"}(Qc||(Qc={})),function(e){e.fileOpenPreference="fileOpenPreference",e.theme="theme"}(Zc||(Zc={}));const Xc="v1";function Yc(e,t){jr(sr),Cc(Yn(Xc,"uploadCustomApp"),"uploadCustomApp",[e],t||Cn())}function eu(e,t,n){jr(sr),Cc(Yn(Xc,"sendCustomMessage"),e,t,n)}function tu(e,t){if(jr(sr),!_s())throw new Error("The child window has not yet been initialized or is not present");qs(e,t)}function nu(e,t){jr(sr),ys(Yn(Xc,"registerCustomHandler"),e,((...e)=>t.apply(this,e)))}function ru(e,t){jr(sr),ys(Yn(Xc,"registerUserSettingsChangeHandler"),"userSettingsChange",t,!0,[e])}function ou(e){jr(sr,cn.content,cn.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];Cc(Yn(Xc,"openFilePreview"),"openFilePreview",t)}const iu="v1";function au(e){return new Promise((t=>{if(jr(sr,cn.content),!uu())throw gn;const n=uc(Yn(iu,"conversations.openConversation"),"conversations.openConversation",{title:e.title,subEntityId:e.subEntityId,conversationId:e.conversationId,channelId:e.channelId,entityId:e.entityId});e.onStartConversation&&ys(Yn(iu,"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&&ys(Yn(iu,"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 su(){if(jr(sr,cn.content),!uu())throw gn;Cc(Yn(iu,"conversations.closeConversation"),"conversations.closeConversation"),Ss("startConversation"),Ss("closeConversation")}function cu(){return new Promise((e=>{if(jr(sr),!uu())throw gn;e(cc(Yn(iu,"conversations.getChatMember"),"getChatMembers"))}))}function uu(){return!(!jr(sr)||!sr.supports.conversations)}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=Xn("copilot");function pu(){var e;return jr(sr)&&!!(null===(e=sr.supports.copilot)||void 0===e?void 0:e.customTelemetry)}function gu(e,t){var n;return void 0===t&&(t=null!==(n=jn())&&void 0!==n?n:Date.now()),lu(this,void 0,void 0,(function*(){return jr(sr),fu("Sending custom telemetry data to host for stage: %s to record timestamp: %s",e,t),hc("copilot.customTelemetry.sendCustomTelemetryData",[e.toString(),t],Yn(du,"copilot.customTelemetry.sendCustomTelemetryData"))}))}var hu=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 mu="v2",vu=Xn("copilot");function wu(){var e,t;return jr(sr)&&(!!(null===(e=sr.hostVersionsInfo)||void 0===e?void 0:e.appEligibilityInformation)||!!(null===(t=sr.supports.copilot)||void 0===t?void 0:t.eligibility))}function Cu(e){var t,n,r;return hu(this,void 0,void 0,(function*(){if(jr(sr),!wu())throw new Error(`Error code: ${gn.errorCode}, message: Not supported on platform`);if((null===(t=sr.hostVersionsInfo)||void 0===t?void 0:t.appEligibilityInformation)&&!e)return vu("Eligibility information is already available on runtime."),sr.hostVersionsInfo.appEligibilityInformation;vu("Eligibility information is not available on runtime. Requesting from host.");const o=yield cc(Yn(mu,"copilot.eligibility.getEligibilityInfo"),"copilot.eligibility.getEligibilityInfo",e);if(We(o))throw new Error(`Error code: ${o.errorCode}, message: ${null!==(n=o.message)&&void 0!==n?n:"Failed to get eligibility information from the host."}`);if(!yu(o))throw new Error("Error deserializing eligibility information");return"nonadult"===(null===(r=o.ageGroup)||void 0===r?void 0:r.toLowerCase())&&(o.ageGroup=_e.NotAdult),o}))}function yu(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 Su,bu,Eu,Au,Iu,Pu,Tu,Ou,Ru;!function(e){e.EMAIL="email",e.TEXT="text",e.MEDIA="media",e.CALENDAR_INVITE="calendarInvite",e.WEB_PAGE="webPage",e.MIXED="mixed",e.TEAMS="teams",e.FILE="file"}(Su||(Su={})),function(e){e.IMAGE="image",e.AUDIO="audio",e.VIDEO="video"}(bu||(bu={})),function(e){e.Private="Private",e.Shared="Shared",e.Recap="Recap",e.RecapCall="RecapCall",e.PrivateViewCall="PrivateViewCall",e.Chat="Chat",e.Compose="Compose"}(Eu||(Eu={})),function(e){e.ClientDeviceType="ClientDeviceType",e.ClientRing="ClientRing",e.ClientScenarioName="ClientScenarioName"}(Au||(Au={})),function(e){e.Enabled="enabled",e.Disabled="disabled",e.EnabledWithTranscript="enabledWithTranscript"}(Iu||(Iu={})),function(e){e.NotStarted="notStarted",e.Active="active",e.Inactive="inactive",e.UnknownFutureValue="unknownFutureValue"}(Pu||(Pu={})),function(e){e.Chat="Chat",e.Channel="Channel",e.Meeting="Meeting",e.MeetingChat="MeetingChat"}(Tu||(Tu={})),function(e){e.Accepted="accepted",e.NotAccepted="not_accepted"}(Ou||(Ou={})),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"}(Ru||(Ru={}));class Fu extends Error{constructor(e,t){super(t),this.errorCode=e,this.name="SidePanelError"}}var ku=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 Mu="v2";function Nu(){var e;return jr(sr)&&!!(null===(e=sr.supports.copilot)||void 0===e?void 0:e.sidePanel)}function xu(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(Ru).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)||We(e)}function Du(e){return ku(this,void 0,void 0,(function*(){jr(sr);return gc("copilot.sidePanel.getContent",e?[new Bu(e)]:[],new _u,Yn(Mu,"copilot.sidePanel.getContent"),xu)}))}function Lu(){return ku(this,void 0,void 0,(function*(){return jr(sr),gc("copilot.sidePanel.preCheckUserConsent",[],new Vu,Yn(Mu,"copilot.sidePanel.preCheckUserConsent"),xu)}))}function Uu(e){Es(Yn(Mu,"copilot.sidePanel.registerUserActionContentSelect"),"copilot.sidePanel.userActionContentSelect",e,[cn.content],(()=>{if(!Nu())throw Hu}))}const Hu=new Fu(Ru.NotSupportedOnPlatform,"This API is not supported on the current platform.");class _u extends zi{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class Vu extends zi{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class Bu{constructor(e){this.contentRequest=e}serialize(){return this.contentRequest}}var ju=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 Wu="v2";function zu(){var e;return jr(sr)&&!!(null===(e=sr.supports.copilot)||void 0===e?void 0:e.view)}function $u(){return ju(this,void 0,void 0,(function*(){jr(sr),yield gc("copilot.view.closeSidePanel",[],new qu,Yn(Wu,"copilot.view.closeSidePanel"))}))}class qu extends zi{validate(e){return!0}deserialize(e){return e}}const Gu="v2";class Ju{constructor(e){this.invokeRequest=e}serialize(){return this.invokeRequest}}function Ku(e){const t=e;return t.responseType===Xu.ActionExecuteInvokeResponse&&void 0!==t.value&&void 0!==t.statusCode&&void 0!==t.type}const Qu="Action.Execute";var Zu,Xu,Yu;!function(e){e.ActionExecuteInvokeRequest="ActionExecuteInvokeRequest",e.QueryMessageExtensionRequest="QueryMessageExtensionRequest"}(Zu||(Zu={})),function(e){e.ActionExecuteInvokeResponse="ActionExecuteInvokeResponse",e.QueryMessageExtensionResponse="QueryMessageExtensionResponse"}(Xu||(Xu={}));class el extends zi{validate(e){return Ku(e)}deserialize(e){return e}}function tl(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(Yu).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)}function nl(e){e.requestType===Zu.ActionExecuteInvokeRequest?rl(e):e.requestType===Zu.QueryMessageExtensionRequest&&ol(e)}function rl(e){if(e.type!==Qu){throw{errorCode:Yu.INTERNAL_ERROR,message:`Invalid action type ${e.type}. Action type must be "${Qu}"`}}if(!Wn(e.data)){throw{errorCode:Yu.INTERNAL_ERROR,message:`Invalid data type ${typeof e.data}. Data must be a primitive or a plain object.`}}}function ol(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 il(e,t,n){if(jr(sr,cn.content),!ll())throw gn;const r=new to(e);return nl(n),fc(Yn(Gu,"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 al(e,t){if(jr(sr,cn.content),!ll())throw gn;const n=new to(e);return fc(Yn(Gu,"externalAppAuthentication.authenticateWithSSO"),"externalAppAuthentication.authenticateWithSSO",[n.toString(),t.claims,t.silent]).then((([e,t])=>{if(!e)throw t}))}function sl(e,t,n){if(jr(sr,cn.content),!ll())throw gn;const r=new to(e);return nl(n),fc(Yn(Gu,"externalAppAuthentication.authenticateWithSSOAndResendRequest"),"externalAppAuthentication.authenticateWithSSOAndResendRequest",[r.toString(),n,t.claims,t.silent]).then((([e,t])=>{if(e&&null!=t.responseType)return t;throw t}))}function cl(e,t,n){if(jr(sr,cn.content),!ll())throw gn;return xn(e,new Error("titleId is Invalid.")),xn(t,new Error("oauthConfigId is Invalid.")),fc(Yn(Gu,"externalAppAuthentication.authenticateWithOauth2"),"externalAppAuthentication.authenticateWithOauth2",[e,t,n.width,n.height,n.isExternal]).then((([e,t])=>{if(!e)throw t}))}function ul(e,t,n){if(jr(sr,cn.content),!ll())throw gn;return xn(e,new Error("titleId is Invalid.")),t&&Dn(t),fc(Yn(Gu,"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 ll(){return!(!jr(sr)||!sr.supports.externalAppAuthentication)}!function(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}(Yu||(Yu={}));var dl=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 fl="v2";function pl(e,t,n){return dl(this,void 0,void 0,(function*(){if(jr(sr,cn.content),!vl())throw gn;return wl(e,t),hc("externalAppAuthenticationForCEA.authenticateWithSSO",[e,t,n.authId,n.connectionName,n.claims,n.silent],Yn(fl,"externalAppAuthenticationForCEA.authenticateWithSSO"),tl)}))}function gl(e,t,n){return dl(this,void 0,void 0,(function*(){if(jr(sr,cn.content),!vl())throw gn;return wl(e,t),hc("externalAppAuthenticationForCEA.authenticateWithOauth",[e,t,n.url.href,n.width,n.height,n.isExternal],Yn(fl,"externalAppAuthenticationForCEA.authenticateWithOauth"),tl)}))}function hl(e,t,n,r){return dl(this,void 0,void 0,(function*(){if(jr(sr,cn.content),!vl())throw gn;return wl(e,t),rl(r),gc("externalAppAuthenticationForCEA.authenticateAndResendRequest",[e,t,new Ju(r),n.url.href,n.width,n.height,n.isExternal],new el,Yn(fl,"externalAppAuthenticationForCEA.authenticateAndResendRequest"),tl)}))}function ml(e,t,n,r){return dl(this,void 0,void 0,(function*(){if(jr(sr,cn.content),!vl())throw gn;return wl(e,t),rl(r),gc("externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest",[e,t,new Ju(r),n.authId,n.connectionName,n.claims,n.silent],new el,Yn(fl,"externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest"),tl)}))}function vl(){return!(!jr(sr)||!sr.supports.externalAppAuthenticationForCEA)}function wl(e,t){xn(t,new Error("conversation id is not valid.")),Yr(e)}const Cl="v2";var yl,Sl;function bl(e,t){if(jr(sr,cn.content),!Al())throw gn;const n=new to(e);return fc(Yn(Cl,"externalAppCardActions.processActionSubmit"),"externalAppCardActions.processActionSubmit",[n.toString(),t]).then((([e,t])=>{if(!e)throw t}))}function El(e,t,n){if(jr(sr,cn.content),!Al())throw gn;const r=new to(e);return fc(Yn(Cl,"externalAppCardActions.processActionOpenUrl"),"externalAppCardActions.processActionOpenUrl",[r.toString(),t.href,n]).then((([e,t])=>{if(e)throw e;return t}))}function Al(){return!(!jr(sr)||!sr.supports.externalAppCardActions)}!function(e){e.DeepLinkDialog="DeepLinkDialog",e.DeepLinkOther="DeepLinkOther",e.DeepLinkStageView="DeepLinkStageView",e.GenericUrl="GenericUrl"}(yl||(yl={})),function(e){e.INTERNAL_ERROR="INTERNAL_ERROR",e.INVALID_LINK="INVALID_LINK",e.NOT_SUPPORTED="NOT_SUPPORTED"}(Sl||(Sl={}));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(jr(sr,cn.content),!Rl())throw gn;wl(e,t);const[r,o]=yield fc(Yn(Pl,"externalAppCardActionsForCEA.processActionOpenUrl"),"externalAppCardActionsForCEA.processActionOpenUrl",[e.toString(),t,n.href]);if(r)throw r;return o}))}function Ol(e,t,n){return Il(this,void 0,void 0,(function*(){if(jr(sr,cn.content),!Rl())throw gn;wl(e,t);const r=yield cc(Yn(Pl,"externalAppCardActionsForCEA.processActionSubmit"),"externalAppCardActionsForCEA.processActionSubmit",e.toString(),t,n);if(r)throw r}))}function Rl(){return!(!jr(sr)||!sr.supports.externalAppCardActionsForCEA)}var Fl;function kl(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(Fl).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)}!function(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}(Fl||(Fl={}));var Ml=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 Nl="v2";function xl(e,t,n){return Ml(this,void 0,void 0,(function*(){if(jr(sr,cn.content),!Dl())throw gn;return Ll(e,n),hc("externalAppCardActionsForDA.processActionOpenUrlDialog",[e,new Ul(t),n],Yn(Nl,"externalAppCardActionsForDA.processActionOpenUrlDialog"),kl)}))}function Dl(){return!(!jr(sr)||!sr.supports.externalAppCardActionsForDA)}function Ll(e,t){Yr(e),qn(t)}class Ul{constructor(e){this.info=e}serialize(){const{url:e,title:t,size:n}=this.info;return{url:e.href,title:t,size:n}}}var Hl=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 _l="v2";function Vl(e,t,n){return Hl(this,void 0,void 0,(function*(){if(jr(sr,cn.content),!Bl())throw gn;const r=new to(e),[o,i]=yield fc(Yn(_l,"externalAppCommands.processActionCommand"),"externalAppCommands.processActionCommand",[r.toString(),t,n]);if(o)throw o;return i}))}function Bl(){return!(!jr(sr)||!sr.supports.externalAppCommands)}const jl="v1";var Wl,zl,$l,ql,Gl,Jl;function Kl(e,t){if(jr(sr,cn.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");Cc(Yn(jl,"files.getCloudStorageFolders"),"files.getCloudStorageFolders",[e],t)}function Ql(e,t){if(jr(sr,cn.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");Cc(Yn(jl,"files.addCloudStorageFolder"),"files.addCloudStorageFolder",[e],t)}function Zl(e,t,n){if(jr(sr,cn.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");Cc(Yn(jl,"files.deleteCloudStorageFolder"),"files.deleteCloudStorageFolder",[e,t],n)}function Xl(e,t,n){if(jr(sr,cn.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");Cc(Yn(jl,"files.getCloudStorageFolderContents"),"files.getCloudStorageFolderContents",[e,t],n)}function Yl(e,t,n){if(jr(sr,cn.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");Cc(Yn(jl,"files.openCloudStorageFile"),"files.openCloudStorageFile",[e,t,n])}function ed(e=!1,t){if(jr(sr,cn.content),!t)throw new Error("[files.getExternalProviders] Callback cannot be null");Cc(Yn(jl,"files.getExternalProviders"),"files.getExternalProviders",[e],t)}function td(e,t,n,r,o=!1,i){if(jr(sr,cn.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");Cc(Yn(jl,"files.copyMoveFiles"),"files.copyMoveFiles",[e,t,n,r,o],i)}function nd(e){if(jr(sr,cn.content),!e)throw new Error("[files.getFileDownloads] Callback cannot be null");Cc(Yn(jl,"files.getFileDownloads"),"files.getFileDownloads",[],e)}function rd(e=void 0,t){if(jr(sr,cn.content),!t)throw new Error("[files.openDownloadFolder] Callback cannot be null");Cc(Yn(jl,"files.openDownloadFolder"),"files.openDownloadFolder",[e],t)}function od(e){if(jr(sr,cn.content),!e)throw pd(De.INVALID_ARGUMENTS,"[files.addCloudStorageProvider] callback cannot be null");Cc(Yn(jl,"files.addCloudStorageProvider"),"files.addCloudStorageProvider",[],e)}function id(e,t){if(jr(sr,cn.content),!t)throw pd(De.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] callback cannot be null");if(!e||!e.content)throw pd(De.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] 3P cloud storage provider request content is missing");Cc(Yn(jl,"files.removeCloudStorageProvider"),"files.removeCloudStorageProvider",[e],t)}function ad(e,t){if(jr(sr,cn.content),!t)throw pd(De.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw pd(De.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] 3P cloud storage provider request content is missing");Cc(Yn(jl,"files.addCloudStorageProviderFile"),"files.addCloudStorageProviderFile",[e],t)}function sd(e,t){if(jr(sr,cn.content),!t)throw pd(De.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw pd(De.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] 3P cloud storage provider request content is missing");Cc(Yn(jl,"files.renameCloudStorageProviderFile"),"files.renameCloudStorageProviderFile",[e],t)}function cd(e,t){if(jr(sr,cn.content),!t)throw pd(De.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw pd(De.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] 3P cloud storage provider request content details are missing");Cc(Yn(jl,"files.deleteCloudStorageProviderFile"),"files.deleteCloudStorageProviderFile",[e],t)}function ud(e,t){if(jr(sr,cn.content),!t)throw pd(De.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw pd(De.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");Cc(Yn(jl,"files.downloadCloudStorageProviderFile"),"files.downloadCloudStorageProviderFile",[e],t)}function ld(e,t){if(jr(sr,cn.content),!t)throw pd(De.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw pd(De.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");if(!e.content.destinationFolder)throw pd(De.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] Invalid destination folder details");Cc(Yn(jl,"files.uploadCloudStorageProviderFile"),"files.uploadCloudStorageProviderFile",[e],t)}function dd(e){if(jr(sr),!e)throw new Error("[registerCloudStorageProviderListChangeHandler] Handler cannot be null");ys(Yn(jl,"files.registerCloudStorageProviderListChangeHandler"),"files.cloudStorageProviderListChange",e)}function fd(e){if(jr(sr),!e)throw new Error("[registerCloudStorageProviderContentChangeHandler] Handler cannot be null");ys(Yn(jl,"files.registerCloudStorageProviderContentChangeHandler"),"files.cloudStorageProviderContentChange",e)}function pd(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"}(Wl||(Wl={})),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"}(zl||(zl={})),function(e){e.ClassMaterials="classMaterials"}($l||($l={})),function(e){e.Readonly="readonly"}(ql||(ql={})),function(e){e.Downloaded="Downloaded",e.Downloading="Downloading",e.Failed="Failed"}(Gl||(Gl={})),function(e){e.Download="DOWNLOAD",e.Upload="UPLOAD",e.Delete="DELETE"}(Jl||(Jl={}));const gd="v1";function hd(){return new Promise((e=>{if(jr(sr),!Cd())throw gn;e(dc(Yn(gd,"meetingRoom.getPairedMeetingRoomInfo"),"meetingRoom.getPairedMeetingRoomInfo"))}))}function md(e){return new Promise((t=>{if(!e||0==e.length)throw new Error("[meetingRoom.sendCommandToPairedMeetingRoom] Command name cannot be null or empty");if(jr(sr),!Cd())throw gn;t(dc(Yn(gd,"meetingRoom.sendCommandToPairedMeetingRoom"),"meetingRoom.sendCommandToPairedMeetingRoom",e))}))}function vd(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler] Handler cannot be null");if(jr(sr),!Cd())throw gn;ys(Yn(gd,"meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler"),"meetingRoom.meetingRoomCapabilitiesUpdate",(t=>{jr(sr),e(t)}))}function wd(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomStatesUpdateHandler] Handler cannot be null");if(jr(sr),!Cd())throw gn;ys(Yn(gd,"meetingRoom.registerMeetingRoomStatesUpdateHandler"),"meetingRoom.meetingRoomStatesUpdate",(t=>{jr(sr),e(t)}))}function Cd(){return!(!jr(sr)||!sr.supports.meetingRoom)}function yd(){return!(!jr(sr)||!sr.supports.messageChannels)}const Sd="1.0.1",bd={onMessage:function(e,t){if(!e||!e.data||"object"!=typeof e.data||null===e.data)return void Fd("Invalid message format, ignoring. Message: %o",e);if(!Td(e.source,e.origin))return void Fd("Message source/origin not allowed, ignoring.");const{args:n}=e.data,[,r]=null!=n?n:[],o=(()=>{try{return JSON.parse(r)}catch(e){return kd("Failed to parse response message:",e),null}})();if(!o||"NestedAppAuthResponse"!==o.messageType)return void Fd("Invalid response format, ignoring. Message: %o",e);t(r)}};let Ed=null,Ad=!1;function Id(e,t,n=!1){if(Ad=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.`);Ed=e.origin}catch(e){throw new Error(`Failed to initialize bridge: invalid top origin: ${t}`)}const r=e;if(r.nestedAppAuthBridge)return void Fd("Nested App Auth Bridge is already present");const o=Pd(r);o&&(r.nestedAppAuthBridge=o)}function Pd(e){const t=new WeakMap,{onMessage:n}=bd,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 Fd(`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=Od(t);if(e===e.top||!Ed)return void kd("Not in an embedded iframe; skipping postMessage.");e.top.postMessage(n,Ed)}}catch(e){return void kd("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 Td(e,t){if(t===Ed)try{return"https:"===new URL(t).protocol}catch(e){return kd("Invalid message origin URL:",e),!1}return!1}function Od(e){const t=Date.now();return{id:Rd(),uuid:nn(),func:"nestedAppAuth.execute",timestamp:t,apiVersionTag:"v2_nestedAppAuth.execute",monotonicTimestamp:t,args:[],data:e}}function Rd(){return"undefined"!=typeof crypto&&crypto.randomUUID?crypto.randomUUID():Math.random().toString(36).substring(2,11)}function Fd(...e){Ad&&console.log(...e)}function kd(...e){Ad&&console.error(...e)}const Md="v1";function Nd(e){if(jr(sr,cn.content),!xd())throw gn;Cc(Yn(Md,"notifications.showNotification"),"notifications.showNotification",[e])}function xd(){return!(!jr(sr)||!sr.supports.notifications)}const Dd="v2";function Ld(e){if(!_d())throw new Error(De.NOT_SUPPORTED_ON_PLATFORM.toString());if(no(e))throw new Error(De.INVALID_ARGUMENTS.toString());ys(Yn(Dd,"otherApp.install"),"otherApp.install",e)}function Ud(){if(!_d())throw new Error(De.NOT_SUPPORTED_ON_PLATFORM.toString());Cc(Yn(Dd,"otherApp.unregisterInstall"),"otherApp.unregisterInstall"),Ss("otherApp.install")}function Hd(e){if(!_d())throw new Error(De.NOT_SUPPORTED_ON_PLATFORM.toString());return hc("otherApp.notifyInstallCompleted",[e.toString()],Yn(Dd,"otherApp.notifyInstallCompleted"))}function _d(){return!(!jr(sr)||!sr.supports.otherAppStateChange)}const Vd="v1";var Bd,jd,Wd;function zd(e){if(!e)throw new Error("[remoteCamera.getCapableParticipants] Callback cannot be null");if(jr(sr,cn.sidePanel),!Xd())throw gn;Cc(Yn(Vd,"remoteCamera.getCapableParticipants"),"remoteCamera.getCapableParticipants",e)}function $d(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(jr(sr,cn.sidePanel),!Xd())throw gn;Cc(Yn(Vd,"remoteCamera.requestControl"),"remoteCamera.requestControl",[e],t)}function qd(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(jr(sr,cn.sidePanel),!Xd())throw gn;Cc(Yn(Vd,"remoteCamera.sendControlCommand"),"remoteCamera.sendControlCommand",[e],t)}function Gd(e){if(!e)throw new Error("[remoteCamera.terminateSession] Callback cannot be null");if(jr(sr,cn.sidePanel),!Xd())throw gn;Cc(Yn(Vd,"remoteCamera.terminateSession"),"remoteCamera.terminateSession",e)}function Jd(e){if(!e)throw new Error("[remoteCamera.registerOnCapableParticipantsChangeHandler] Handler cannot be null");if(jr(sr,cn.sidePanel),!Xd())throw gn;ys(Yn(Vd,"remoteCamera.registerOnCapableParticipantsChangeHandler"),"remoteCamera.capableParticipantsChange",e)}function Kd(e){if(!e)throw new Error("[remoteCamera.registerOnErrorHandler] Handler cannot be null");if(jr(sr,cn.sidePanel),!Xd())throw gn;ys(Yn(Vd,"remoteCamera.registerOnErrorHandler"),"remoteCamera.handlerError",e)}function Qd(e){if(!e)throw new Error("[remoteCamera.registerOnDeviceStateChangeHandler] Handler cannot be null");if(jr(sr,cn.sidePanel),!Xd())throw gn;ys(Yn(Vd,"remoteCamera.registerOnDeviceStateChangeHandler"),"remoteCamera.deviceStateChange",e)}function Zd(e){if(!e)throw new Error("[remoteCamera.registerOnSessionStatusChangeHandler] Handler cannot be null");if(jr(sr,cn.sidePanel),!Xd())throw gn;ys(Yn(Vd,"remoteCamera.registerOnSessionStatusChangeHandler"),"remoteCamera.sessionStatusChange",e)}function Xd(){return!(!jr(sr)||!sr.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"}(Bd||(Bd={})),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"}(jd||(jd={})),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"}(Wd||(Wd={}));const Yd="v1";function ef(e,t,n,r){if(jr(sr,cn.content),!tf())throw gn;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");Cc(Yn(Yd,"appEntity.selectAppEntity"),"appEntity.selectAppEntity",[e,t,n],r)}function tf(){return!(!jr(sr)||!sr.supports.appEntity)}const nf="v1";function rf(e){return new Promise((t=>{if(jr(sr),!of())throw gn;if((Gn.hostClientType===an.android||Gn.hostClientType===an.teamsRoomsAndroid||Gn.hostClientType===an.teamsPhones||Gn.hostClientType===an.teamsDisplays)&&!Wr(Ke)){const e={errorCode:De.OLD_PLATFORM};throw new Error(JSON.stringify(e))}t(cc(Yn(nf,"teams.fullTrust.joinedTeams.getUserJoinedTeams"),"getUserJoinedTeams",e))}))}function of(){return!(!jr(sr)||!sr.supports.teams)&&(!!sr.supports.teams.fullTrust&&!!sr.supports.teams.fullTrust.joinedTeams)}const af="v1";function sf(e){return new Promise((t=>{if(jr(sr),!cf())throw gn;t(cc(Yn(af,"teams.fullTrust.getConfigSetting"),"getConfigSetting",e))}))}function cf(){return!(!jr(sr)||!sr.supports.teams)&&!!sr.supports.teams.fullTrust}const uf="v1";var lf;function df(e,t){if(jr(sr,cn.content),!pf())throw gn;if(!e)throw new Error("[teams.getTeamChannels] groupId cannot be null or empty");if(!t)throw new Error("[teams.getTeamChannels] Callback cannot be null");Cc(Yn(uf,"teams.getTeamChannels"),"teams.getTeamChannels",[e],t)}function ff(e,t){if(jr(sr),!pf())throw gn;if(!e)throw new Error("[teams.refreshSiteUrl] threadId cannot be null or empty");if(!t)throw new Error("[teams.refreshSiteUrl] Callback cannot be null");Cc(Yn(uf,"teams.refreshSiteUrl"),"teams.refreshSiteUrl",[e],t)}function pf(){return!(!jr(sr)||!sr.supports.teams)}!function(e){e[e.Regular=0]="Regular",e[e.Private=1]="Private",e[e.Shared=2]="Shared"}(lf||(lf={}));class gf{static setTimeout(e,t){const n=performance.now(),r=Sn();return gf.setTimeoutCallbacks[r]={callback:e,timeoutInMs:t,startedAtInMs:n},r}static clearTimeout(e){delete gf.setTimeoutCallbacks[e]}static setInterval(e,t){gf.setTimeout((function n(){e(),gf.setTimeout(n,t)}),t)}static tick(){const e=performance.now(),t=[];for(const n in gf.setTimeoutCallbacks){const r=gf.setTimeoutCallbacks[n];e-r.startedAtInMs>=r.timeoutInMs&&t.push(n)}for(const e of t){gf.setTimeoutCallbacks[e].callback(),delete gf.setTimeoutCallbacks[e]}}}gf.setTimeoutCallbacks={};class hf{constructor(e,t){this.reportStatisticsResult=t,this.sampleCount=0,this.distributionBins=new Uint32Array(e)}processStarts(e,t,n,r){gf.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&&gf.clearTimeout(this.timeoutId),this.timeoutId=gf.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(hf.maxSessionTimeoutInMs,2*t.timeoutInMs):hf.initialSessionTimeoutInMs}}hf.initialSessionTimeoutInMs=1e3,hf.maxSessionTimeoutInMs=3e4;const mf="v2";class vf{constructor(e){this.reportPerformanceEvent=e,this.isFirstFrameProcessed=!1,this.frameProcessTimeLimit=100,this.frameProcessingStartedAt=0,this.frameProcessingTimeCost=0,this.processedFrameCount=0,this.performanceStatistics=new hf(vf.distributionBinSize,(e=>this.reportPerformanceEvent(Yn(mf,"videoPerformanceMonitor.performanceDataGenerated"),"video.performance.performanceDataGenerated",[e])))}startMonitorSlowFrameProcessing(){gf.setInterval((()=>{if(0===this.processedFrameCount)return;const e=this.frameProcessingTimeCost/this.processedFrameCount;e>this.frameProcessTimeLimit&&this.reportPerformanceEvent(Yn(mf,"videoPerformanceMonitor.startMonitorSlowFrameProcessing"),"video.performance.frameProcessingSlow",[e]),this.frameProcessingTimeCost=0,this.processedFrameCount=0}),vf.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){gf.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(Yn(mf,"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(Yn(mf,"videoPerformanceMonitor.reportTextureStreamAcquired"),"video.performance.textureStreamAcquired",[this.currentStreamId,e])}}}vf.distributionBinSize=1e3,vf.calculateFPSInterval=1e3;var wf=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())}))},Cf=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 yf="v2",Sf=Nn()?void 0:new vf(Cc);var bf,Ef,Af;function If(e){if(jr(sr,cn.sidePanel),!Ff())throw gn;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(ys(Yn(yf,"videoEffects.setFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==Sf?void 0:Sf.setFrameProcessTimeLimit(e.timeLimit)),!1),Df())kf(e.videoFrameHandler,e.config);else{if(!Uf())throw gn;Nf(e.videoBufferHandler,e.config)}null==Sf||Sf.startMonitorSlowFrameProcessing()}function Pf(e,t){if(jr(sr,cn.sidePanel),!Ff())throw gn;Cc(Yn(yf,"videoEffects.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t])}function Tf(e){if(jr(sr,cn.sidePanel),!Ff())throw gn;ys(Yn(yf,"videoEffects.registerEffectParameterChangeHandler"),"video.effectParameterChange",Kf(e,Sf),!1),Cc(Yn(yf,"videoEffects.registerForVideoEffect"),"video.registerForVideoEffect")}function Of(e){Cc(Yn(yf,"videoEffects.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function Rf(e){Cc(Yn(yf,"videoEffects.notifyError"),"video.notifyError",[e])}function Ff(){return jr(sr)&&!!sr.supports.video&&(!!sr.supports.video.mediaStream||!!sr.supports.video.sharedFrame)}function kf(e,t){if(jr(sr,cn.sidePanel),!Ff()||!Df())throw gn;ys(Yn(yf,"videoEffects.startVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(t=>wf(this,void 0,void 0,(function*(){const{streamId:n}=t,r=Mf(e,Sf);yield Vf(n,r,Rf,Sf)}))),!1),Cc(Yn(yf,"videoEffects.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[t])}function Mf(e,t){return n=>wf(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 Nf(e,t){if(jr(sr,cn.sidePanel),!Ff()||!Uf())throw gn;ys(Yn(yf,"videoEffects.registerForVideoBufferHandler"),"video.newVideoFrame",(t=>{if(t){const n=t.timestamp;null==Sf||Sf.reportStartFrameProcessing(t.width,t.height),e(xf(t),(()=>{null==Sf||Sf.reportFrameProcessed(),Of(n)}),Rf)}}),!1),Cc(Yn(yf,"videoEffects.registerForVideoFrame"),"video.registerForVideoFrame",[t])}function xf(e){if("videoFrameBuffer"in e)return e;{const{data:t}=e,n=Cf(e,["data"]);return Object.assign(Object.assign({},n),{videoFrameBuffer:t})}}function Df(){var e;return jr(sr,cn.sidePanel)&&Lf()&&!!(null===(e=sr.supports.video)||void 0===e?void 0:e.mediaStream)}function Lf(){var e,t,n,r;return!(!(null===(t=null===(e=Mn().chrome)||void 0===e?void 0:e.webview)||void 0===t?void 0:t.getTextureStream)||!(null===(r=null===(n=Mn().chrome)||void 0===n?void 0:n.webview)||void 0===r?void 0:r.registerTextureStream))}function Uf(){var e;return jr(sr,cn.sidePanel)&&!!(null===(e=sr.supports.video)||void 0===e?void 0:e.sharedFrame)}!function(e){e.NV12="NV12"}(bf||(bf={})),function(e){e.EffectChanged="EffectChanged",e.EffectDisabled="EffectDisabled"}(Ef||(Ef={})),function(e){e.InvalidEffectId="InvalidEffectId",e.InitializationFailure="InitializationFailure"}(Af||(Af={}));var Hf=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 _f="v2";function Vf(e,t,n,r){var o,i;return Hf(this,void 0,void 0,(function*(){const a=Wf();!Nn()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),zf(yield jf(e,n,r),new $f(n,t),a.writable)}))}function Bf(e,t,n,r){var o,i;return Hf(this,void 0,void 0,(function*(){const a=Wf();!Nn()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),zf(yield jf(e,n,r),new Jf(n,t),a.writable)}))}function jf(e,t,n){return Hf(this,void 0,void 0,(function*(){if(Nn())throw gn;const r=Mn().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 Wf(){if(Nn())throw gn;const e=window.MediaStreamTrackGenerator;if(!e)throw gn;return new e({kind:"video"})}function zf(e,t,n){new(0,Mn().MediaStreamTrackProcessor)({track:e}).readable.pipeThrough(new TransformStream(t)).pipeTo(n)}class $f{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.transform=(e,t)=>Hf(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 qf{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 Gf{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 Jf{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.shouldDiscardAudioInferenceResult=!1,this.transform=(e,t)=>Hf(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=>Hf(this,void 0,void 0,(function*(){if(Nn())throw gn;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 qf(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 Gf(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}}})),ys(Yn(_f,"videoEffectsUtils.transformerWithMetadata.constructor"),"video.mediaStream.audioInferenceDiscardStatusChange",(({discardAudioInferenceResult:e})=>{this.shouldDiscardAudioInferenceResult=e}))}}function Kf(e,t){return(n,r)=>{null==t||t.reportApplyingVideoEffect(n||"",r),e(n,r).then((()=>{null==t||t.reportVideoEffectChanged(n||"",r),Cc(Yn(_f,"videoEffectsUtils.reportVideoEffectChanged"),"video.videoEffectReadiness",[!0,n,void 0,r])})).catch((e=>{const t=e in Af?e:Af.InitializationFailure;Cc(Yn(_f,"videoEffectsUtils.effectFailure"),"video.videoEffectReadiness",[!1,n,t,r])}))}}var Qf=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 Zf="v2",Xf=2e3,Yf=Nn()?void 0:new vf(Cc);var ep;function tp(e){var t,n;if(!cp())throw gn;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(jr(sr,cn.sidePanel)){if(ys(Yn(Zf,"videoEffectsEX.registerSetFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==Yf?void 0:Yf.setFrameProcessTimeLimit(e)),!1),null===(t=sr.supports.video)||void 0===t?void 0:t.mediaStream)ys(Yn(Zf,"videoEffectsEX.registerStartVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(t=>Qf(this,void 0,void 0,(function*(){const{streamId:n,metadataInTexture:r}=t,o=Yf?rp(e.videoFrameHandler,Yf):e.videoFrameHandler;r?yield Bf(n,o,lp,Yf):yield Vf(n,o,lp,Yf)}))),!1),Cc(Yn(Zf,"videoEffectsEX.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[e.config]);else{if(!(null===(n=sr.supports.video)||void 0===n?void 0:n.sharedFrame))throw gn;ys(Yn(Zf,"videoEffectsEx.registerNewVideoFrameHandler"),"video.newVideoFrame",(t=>{if(t){null==Yf||Yf.reportStartFrameProcessing(t.width,t.height);const n=np(),r=t.timestamp;e.videoBufferHandler(op(t),(()=>{n(),null==Yf||Yf.reportFrameProcessed(),up(r)}),lp)}}),!1),Cc(Yn(Zf,"videoEffectsEx.registerForVideoFrame"),"video.registerForVideoFrame",[e.config])}null==Yf||Yf.startMonitorSlowFrameProcessing()}}function np(){const e=setTimeout((()=>{lp(`Frame not processed in ${Xf}ms`,ep.Warn)}),Xf);return function(){clearTimeout(e)}}function rp(e,t){return n=>Qf(this,void 0,void 0,(function*(){const r=n.videoFrame;t.reportStartFrameProcessing(r.codedWidth,r.codedHeight);const o=np(),i=yield e(n);return o(),t.reportFrameProcessed(),i}))}function op(e){return e.videoFrameBuffer=e.videoFrameBuffer||e.data,delete e.data,e}function ip(e,t,n){if(jr(sr,cn.sidePanel),!cp())throw gn;Cc(Yn(Zf,"videoEffectsEx.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t,n])}function ap(e){if(jr(sr,cn.sidePanel),!cp())throw gn;ys(Yn(Zf,"videoEffectsEx.registerEffectParamterChangeHandler"),"video.effectParameterChange",Kf(e,Yf),!1),Cc(Yn(Zf,"videoEffectsEx.registerForVideoEffect"),"video.registerForVideoEffect")}function sp(e){if(jr(sr,cn.sidePanel),!Ff())throw gn;Cc(Yn(Zf,"videoEffectsEx.updatePersonalizedEffects"),"video.personalizedEffectsChanged",[e])}function cp(){return jr(sr),Ff()}function up(e){Cc(Yn(Zf,"videoEffectsEx.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function lp(e,t=ep.Warn){Cc(Yn(Zf,"videoEffectsEx.notifyError"),"video.notifyError",[e,t])}function dp(e){if(jr(sr),!Ff())throw gn;lp(e,ep.Fatal)}!function(e){e.Fatal="fatal",e.Warn="warn"}(ep||(ep={}));const fp="v2";class pp extends zi{validate(e){return"ConfigurableTab"===e.tabType}deserialize(e){return e}}class gp{constructor(e){this.configurableTabInstance=e}serialize(){return this.configurableTabInstance}}class hp{constructor(e){this.hostEntityId=e}serialize(){return this.hostEntityId}}class mp extends zi{validate(e){return"ConfigurableTab"===e.tabType||"StaticTab"===e.tabType}deserialize(e){return e}}class vp{constructor(e){this.hostEntityTabInstance=e}serialize(){return this.hostEntityTabInstance}}class wp extends zi{validate(e){const t=new mp;let n=!0;return e.allTabs&&e.allTabs.forEach((e=>{n||(n=t.validate(e))})),n}deserialize(e){return e}}function Cp(e,t){if(jr(sr),!Ap())throw new Error(`Error code: ${De.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);if(Ip(e.threadId),t&&0===t.length)throw new Error(`Error code: ${De.INVALID_ARGUMENTS}, message: App types cannot be an empty array`);return gc("hostEntity.tab.addAndConfigure",[new hp(e),t],new mp,Yn(fp,"hostEntity.tab.addAndConfigure"))}function yp(e){if(jr(sr),!Ap())throw new Error(`Error code: ${De.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return Ip(e.threadId),gc("hostEntity.tab.getAll",[new hp(e)],new wp,Yn(fp,"hostEntity.tab.getAll"))}function Sp(e,t){if(jr(sr),!Ap())throw new Error(`Error code: ${De.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return Pp(e),Ip(t.threadId),gc("hostEntity.tab.reconfigure",[new gp(e),new hp(t)],new pp,Yn(fp,"hostEntity.tab.reconfigure"))}function bp(e,t){if(jr(sr),!Ap())throw new Error(`Error code: ${De.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return Pp(e),Ip(t.threadId),gc("hostEntity.tab.rename",[new gp(e),new hp(t)],new pp,Yn(fp,"hostEntity.tab.rename"))}function Ep(e,t){if(jr(sr),!Ap())throw new Error(`Error code: ${De.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return Ip(t.threadId),Pp(e),gc("hostEntity.tab.remove",[new vp(e),new hp(t)],new $i,Yn(fp,"hostEntity.tab.remove"))}function Ap(){var e;return!!(jr(sr)&&Op()&&(null===(e=sr.supports.hostEntity)||void 0===e?void 0:e.tab))}function Ip(e){if(!e||0==e.length)throw new Error(`Error code: ${De.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: ${De.INVALID_ARGUMENTS}, message: TabId cannot be null or empty`)}var Tp;function Op(){return!(!jr(sr)||!sr.supports.hostEntity)}!function(e){e.edu="EDU",e.baseTownhall="BASE_TOWNHALL",e.streamingTownhall="STREAMING_TOWNHALL"}(Tp||(Tp={}));var Rp=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 Fp="v2",kp="Invalid store dialog size",Mp="No App Id present, but AppId needed to open AppDetail store",Np="No Collection Id present, but CollectionId needed to open a store specific to a collection";function xp(e){return Rp(this,void 0,void 0,(function*(){_p();const{size:t}=null!=e?e:{};return hc("store.openFullStore",[Vp(t)],Yn(Fp,"store.openFullStore"))}))}function Dp(e){return Rp(this,void 0,void 0,(function*(){_p();const{size:t,appId:n}=e;if(!(n instanceof to))throw new Error(Mp);return hc("store.openAppDetail",[Vp(t),n],Yn(Fp,"store.openAppDetail"))}))}function Lp(e){return Rp(this,void 0,void 0,(function*(){_p();const{size:t,appCapability:n,appMetaCapabilities:r,installationScope:o,filteredOutAppIds:i}=null!=e?e:{};return hc("store.openInContextStore",[Vp(t),n,r,o,null==i?void 0:i.map((e=>e.toString()))],Yn(Fp,"store.openInContextStore"))}))}function Up(e){return Rp(this,void 0,void 0,(function*(){_p();const{size:t,collectionId:n}=e;if(void 0===n)throw new Error(Np);return hc("store.openSpecificStore",[Vp(t),n],Yn(Fp,"store.openSpecificStore"))}))}function Hp(){return jr(sr)&&!!sr.supports.store}function _p(){if(jr(sr,cn.content,cn.sidePanel,cn.meetingStage),!Hp())throw gn}function Vp(e){if(void 0===e)return;const{width:t,height:n}=e;if(void 0!==t&&"number"==typeof t&&t<0)throw new Error(kp);if(void 0!==n&&"number"==typeof n&&n<0)throw new Error(kp);return JSON.stringify(e)}var Bp=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 jp="v1",Wp="v2";let zp;function $p(e){zp=e}function qp(e){const t=void 0!==e,n=t?e:zp;if(!n)throw new Error("No parameters are provided for authentication");jr(sr,cn.content,cn.sidePanel,cn.settings,cn.remove,cn.task,cn.stage,cn.meetingStage);return Gp(n.successCallback||n.failureCallback?Yn(jp,"authentication.authenticate"):Yn(Wp,"authentication.authenticate"),n).then((e=>{try{return n&&n.successCallback?(n.successCallback(e),""):e}finally{t||(zp=void 0)}})).catch((e=>{try{if(n&&n.failureCallback)return n.failureCallback(e.message),"";throw e}finally{t||(zp=void 0)}}))}function Gp(e,t){return Bp(this,void 0,void 0,(function*(){const n=Ln(t.url);return Dn(n),fc(e,"authentication.authenticate",[n.href,t.width,t.height,t.isExternal]).then((([e,t])=>{if(e)return t;throw new Error(t)}))}))}function Jp(e){Br();return Kp(e&&(e.successCallback||e.failureCallback)?Yn(jp,"authentication.getAuthToken"):Yn(Wp,"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 Kp(e,t){return new Promise((n=>{n(fc(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 Qp(e){Br();return Zp(e&&(e.successCallback||e.failureCallback)?Yn(jp,"authentication.getUser"):Yn(Wp,"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 Zp(e){return new Promise((t=>{t(fc(e,"authentication.getUser"))})).then((([e,t])=>{if(e)return t;throw t}))}function Xp(e,t){jr(sr,cn.authentication);Cc(Yn(t?jp:Wp,"authentication.notifySuccess"),"authentication.authenticate.success",[e]),Wc(oc.parentWindow,(()=>setTimeout((()=>oc.currentWindow.close()),200)))}function Yp(e,t){jr(sr,cn.authentication);Cc(Yn(t?jp:Wp,"authentication.notifyFailure"),"authentication.authenticate.failure",[e]),Wc(oc.parentWindow,(()=>setTimeout((()=>oc.currentWindow.close()),200)))}var eg;function tg(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"}(eg||(eg={}));class ng{constructor(e){this.val=e,tg(e)}toString(){return this.val}}const rg="/l/app/",og="/l/meeting/new",ig="attendees",ag="startTime",sg="endTime",cg="subject",ug="content",lg="/l/call/0/0",dg="source",fg="withVideo",pg="/l/chat/0/0",gg="users",hg="topicName",mg="message";function vg(e,t,n){if(0===e.length)throw new Error("Must have at least one user when creating a chat deep link");const r=`${gg}=`+e.map((e=>encodeURIComponent(e))).join(","),o=void 0===t?"":`&${hg}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${mg}=${encodeURIComponent(n)}`;return`${it}://${at}${pg}?${r}${o}${i}`}function wg(e,t,n){if(0===e.length)throw new Error("Must have at least one target when creating a call deep link");const r=`${gg}=`+e.map((e=>encodeURIComponent(e))).join(","),o=void 0===t?"":`&${fg}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${dg}=${encodeURIComponent(n)}`;return`${it}://${at}${lg}?${r}${o}${i}`}function Cg(e,t,n,r,o){const i=void 0===e?"":`${ig}=`+e.map((e=>encodeURIComponent(e))).join(","),a=void 0===t?"":`&${ag}=${encodeURIComponent(t)}`,s=void 0===n?"":`&${sg}=${encodeURIComponent(n)}`,c=void 0===r?"":`&${cg}=${encodeURIComponent(r)}`,u=void 0===o?"":`&${ug}=${encodeURIComponent(o)}`;return`${it}://${at}${og}?${i}${a}${s}${c}${u}`}function yg(e){if(!e)throw new Error("App ID must be set when creating an app install dialog deep link");return`${it}://${at}${rg}${encodeURIComponent(e)}`}const Sg="v1";function bg(e){return new Promise((t=>{if(jr(sr,cn.content,cn.sidePanel,cn.settings,cn.task,cn.stage,cn.meetingStage),!Eg())throw new Error("Not supported");const n=Yn(Sg,"appInstallDialog.openAppInstallDialog");sr.isLegacyTeams?t(uc(n,"executeDeepLink",yg(e.appId))):(Cc(n,"appInstallDialog.openAppInstallDialog",[e]),t())}))}function Eg(){return!(!jr(sr)||!sr.supports.appInstallDialog)}const Ag="v1",Ig=Xn("media");var Pg,Tg,Og,Rg,Fg,kg,Mg;!function(e){e.Base64="base64",e.ID="id"}(Pg||(Pg={}));class Ng{}function xg(e){if(!e)throw new Error("[captureImage] Callback cannot be null");if(jr(sr,cn.content,cn.task),Gn.isFramelessWindow)if(Wr(Xe))Cc(Yn(Ag,"media.captureImage"),"captureImage",e);else{e({errorCode:De.OLD_PLATFORM},[])}else{e({errorCode:De.NOT_SUPPORTED_ON_PLATFORM},[])}}function Dg(){if(jr(sr,cn.content,cn.task),!Ug())throw gn;const e=Le.Media;return new Promise((t=>{t(dc(Yn(Ag,"media.hasPermission"),"permissions.has",e))}))}function Lg(){if(jr(sr,cn.content,cn.task),!Ug())throw gn;const e=Le.Media;return new Promise((t=>{t(dc(Yn(Ag,"media.requestPermission"),"permissions.request",e))}))}function Ug(){return!(!jr(sr)||!sr.supports.permissions)}class Hg extends Ng{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(jr(sr,cn.content,cn.task),Wr(Ye))if(Xg(this.mimeType,this.format,this.content))Wr("2.0.0")?this.getMediaViaCallback(e):this.getMediaViaHandler(e);else{e({errorCode:De.INVALID_ARGUMENTS},new Blob)}else{e({errorCode:De.OLD_PLATFORM},new Blob)}}getMediaViaCallback(e){const t={mediaMimeType:this.mimeType,assembleAttachment:[]},n=[this.content];Cc(Yn(Ag,"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=zg(t.assembleAttachment,t.mediaMimeType);e(n.error,null!=r?r:new Blob)}else{const e=$g(n.mediaChunk,t.mediaMimeType);e?t.assembleAttachment.push(e):Ig(`Received a null assemble attachment for when decoding chunk sequence ${n.mediaChunk.chunkSequence}; not including the chunk in the assembled file.`)}else e({errorCode:De.INTERNAL_ERROR,message:"data received is null"},new Blob)}))}getMediaViaHandler(e){const t=Sn(),n={mediaMimeType:this.mimeType,assembleAttachment:[]},r=[t,this.content];this.content&&!no(e)&&Cc(Yn(Ag,"media.getMedia"),"getMedia",r),ys(Yn(Ag,"media.registerGetMediaRequestHandler"),"getMedia"+t,(function(r){if(e){const o=JSON.parse(r);if(o.error)e(o.error,new Blob),Ss("getMedia"+t);else if(o.mediaChunk)if(o.mediaChunk.chunkSequence<=0){const r=zg(n.assembleAttachment,n.mediaMimeType);e(o.error,null!=r?r:new Blob),Ss("getMedia"+t)}else{const e=$g(o.mediaChunk,n.mediaMimeType);e&&n.assembleAttachment.push(e)}else e({errorCode:De.INTERNAL_ERROR,message:"data received is null"},new Blob),Ss("getMedia"+t)}}))}}class _g{constructor(e){this.controllerCallback=e}notifyEventToHost(e,t){jr(sr,cn.content,cn.task);try{$r(Ge)}catch(e){return void(t&&t(e))}const n={mediaType:this.getMediaType(),mediaControllerEvent:e};Cc(Yn(Ag,"media.controller"),"media.controller",[n],(e=>{t&&t(e)}))}stop(e){this.notifyEventToHost(Tg.StopRecording,e)}}class Vg extends _g{getMediaType(){return Fg.Video}notifyEventToApp(e){if(this.controllerCallback)switch(e){case Tg.StartRecording:if(this.controllerCallback.onRecordingStarted){this.controllerCallback.onRecordingStarted();break}}}}function Bg(e,t){if(!t)throw new Error("[select Media] Callback cannot be null");if(jr(sr,cn.content,cn.task),!Wr(Ye)){const e={errorCode:De.OLD_PLATFORM};return void t(e,[])}try{qg(e)}catch(e){return void t(e,[])}if(!Jg(e)){const e={errorCode:De.INVALID_ARGUMENTS};return void t(e,[])}const n=[e];Cc(Yn(Ag,"media.selectMedia"),"selectMedia",n,((n,r,o)=>{var i,a;if(o)return void(Gg(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 Hg(e));t(n,s)}))}function jg(e,t){if(!t)throw new Error("[view images] Callback cannot be null");if(jr(sr,cn.content,cn.task),!Wr(Ye)){return void t({errorCode:De.OLD_PLATFORM})}if(!Yg(e)){return void t({errorCode:De.INVALID_ARGUMENTS})}const n=[e];Cc(Yn(Ag,"media.viewImages"),"viewImages",n,t)}function Wg(e,t){if(!e)throw new Error("[media.scanBarCode] Callback cannot be null");if(jr(sr,cn.content,cn.task),Gn.hostClientType!==an.desktop&&Gn.hostClientType!==an.web&&Gn.hostClientType!==an.rigel&&Gn.hostClientType!==an.teamsRoomsWindows&&Gn.hostClientType!==an.teamsRoomsAndroid&&Gn.hostClientType!==an.teamsPhones&&Gn.hostClientType!==an.teamsDisplays)if(Wr(et))if(eh(t))Cc(Yn(Ag,"media.scanBarCode"),"media.scanBarCode",[t],e);else{e({errorCode:De.INVALID_ARGUMENTS},"")}else{e({errorCode:De.OLD_PLATFORM},"")}else{e({errorCode:De.NOT_SUPPORTED_ON_PLATFORM},"")}}function zg(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 $g(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 qg(e){Qg(e)?$r(qe):Zg(e)?$r(Ge):Kg(e)&&$r(Je)}function Gg(e){return!(e.mediaType!=Fg.Video||!e.videoProps||!e.videoProps.videoController)}function Jg(e){return!(null==e||e.maxMediaCount>10)}function Kg(e){var t;return!((null==e?void 0:e.mediaType)!=Fg.Image||!(null===(t=null==e?void 0:e.imageProps)||void 0===t?void 0:t.imageOutputFormats))}function Qg(e){return!(!e||e.mediaType!=Fg.VideoAndImage&&!e.videoAndImageProps)}function Zg(e){return!(!e||e.mediaType!=Fg.Video||!e.videoProps||e.videoProps.isFullScreenMode)}function Xg(e,t,n){return null!=e&&null!=t&&t==Pg.ID&&null!=n}function Yg(e){return!(null==e||e.length<=0||e.length>10)}function eh(e){return!e||!(null===e.timeOutIntervalInSec||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec<=0||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec>60)}function th(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"}(Tg||(Tg={})),function(e){e[e.Photo=1]="Photo",e[e.Document=2]="Document",e[e.Whiteboard=3]="Whiteboard",e[e.BusinessCard=4]="BusinessCard"}(Og||(Og={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(Rg||(Rg={})),function(e){e[e.Image=1]="Image",e[e.Video=2]="Video",e[e.VideoAndImage=3]="VideoAndImage",e[e.Audio=4]="Audio"}(Fg||(Fg={})),function(e){e[e.ID=1]="ID",e[e.URL=2]="URL"}(kg||(kg={})),function(e){e[e.IMAGE=1]="IMAGE",e[e.PDF=2]="PDF"}(Mg||(Mg={}));const nh="v2";function rh(e){return new Promise((t=>{if(jr(sr,cn.content,cn.task),!ah())throw gn;if(!eh(e))throw{errorCode:De.INVALID_ARGUMENTS};t(dc(Yn(nh,"barCode.scanBarCode"),"media.scanBarCode",e))}))}function oh(){if(jr(sr,cn.content,cn.task),!ah())throw gn;const e=Le.Media;return new Promise((t=>{t(dc(Yn(nh,"barCode.hasPermission"),"permissions.has",e))}))}function ih(){if(jr(sr,cn.content,cn.task),!ah())throw gn;const e=Le.Media;return new Promise((t=>{t(dc(Yn(nh,"barCode.requestPermission"),"permissions.request",e))}))}function ah(){return!!(jr(sr)&&sr.supports.barCode&&sr.supports.permissions)}const sh="v2";function ch(e){return uh(Yn(sh,"chat.openChat"),e)}function uh(e,t){return new Promise((n=>{if(jr(sr,cn.content,cn.task),!dh())throw gn;if(sr.isLegacyTeams)n(uc(e,"executeDeepLink",vg([t.user],void 0,t.message)));else{n(uc(e,"chat.openChat",{members:[t.user],message:t.message}))}}))}function lh(e){const t=Yn(sh,"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(uh(t,r))}else{if(jr(sr,cn.content,cn.task),!dh())throw gn;if(sr.isLegacyTeams)n(uc(t,"executeDeepLink",vg(e.users,e.topic,e.message)));else{n(uc(t,"chat.openChat",{members:e.users,message:e.message,topic:e.topic}))}}}))}function dh(){return!(!jr(sr)||!sr.supports.chat)}var fh=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 ph="v2";function gh(e){return fh(this,void 0,void 0,(function*(){if(jr(sr,cn.content,cn.meetingStage,cn.task,cn.settings,cn.stage,cn.sidePanel),!mh())throw gn;if(!e.type||!Object.values(Be).includes(e.type))throw new Error(`Blob type ${e.type} is not supported. Supported blob types are ${Object.values(Be)}`);const t=yield kn(e),n={mimeType:e.type,content:t};return dc(Yn(ph,"clipboard.write"),"clipboard.writeToClipboard",n)}))}function hh(){return fh(this,void 0,void 0,(function*(){jr(sr,cn.content,cn.meetingStage,cn.task,cn.settings,cn.stage,cn.sidePanel);const e=Yn(ph,"clipboard.read");if(!mh())throw gn;const t=yield dc(e,"clipboard.readFromClipboard");if("string"==typeof t){const e=JSON.parse(t);return Fn(e.mimeType,e.content)}return t}))}function mh(){return Gn.isFramelessWindow?!(!jr(sr)||!sr.supports.clipboard):!!(jr(sr)&&navigator&&navigator.clipboard&&sr.supports.clipboard)}var vh=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 wh="v2",Ch={validate:e=>Array.isArray(e)||"object"==typeof e,deserialize:e=>e};var yh;function Sh(){var e;return null!==(e=jr(sr)&&(sr.isNAAChannelRecommended||Ph()))&&void 0!==e&&e}function bh(){return jr(sr),oc.parentOrigin}function Eh(){var e;return null!==(e=jr(sr)&&sr.canParentManageNAATrustedOrigins)&&void 0!==e&&e}function Ah(){var e;return null!==(e=jr(sr)&&(sr.isDeeplyNestedAuthSupported||Ih()))&&void 0!==e&&e}function Ih(){return!!(jr(sr)&&Th()&&sr.isLegacyTeams&&Wr(gr))}function Ph(){return!!(jr(sr)&&Th()&&sr.isLegacyTeams&&sr.supports.nestedAppAuth)}function Th(){return Gn.hostClientType===an.android||Gn.hostClientType===an.ios||Gn.hostClientType===an.ipados||Gn.hostClientType===an.visionOS}function Oh(e){return vh(this,void 0,void 0,(function*(){if(!Eh())throw gn;const t=e.map(kh);return Fh(yh.ADD,t)}))}function Rh(e){return vh(this,void 0,void 0,(function*(){if(!Eh())throw gn;const t=e.map(kh);return Fh(yh.DELETE,t)}))}function Fh(e,t){return vh(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 gc("nestedAppAuth.manageNAATrustedOrigins",[new Mh(e,t)],Ch,Yn(wh,"nestedAppAuth.manageNAATrustedOrigins"))}))}function kh(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"}(yh||(yh={}));class Mh{constructor(e,t){this.action=e,this.appOrigins=t}serialize(){return{action:this.action,appOrigins:this.appOrigins}}}const Nh="v2";function xh(){if(jr(sr,cn.content,cn.task),!Lh())throw gn;return dc(Yn(Nh,"geoLocation.map.chooseLocation"),"location.getLocation",{allowChooseLocation:!0,showMap:!0})}function Dh(e){if(jr(sr,cn.content,cn.task),!Lh())throw gn;if(!e)throw{errorCode:De.INVALID_ARGUMENTS};return dc(Yn(Nh,"geoLocation.showLocation"),"location.showLocation",e)}function Lh(){return!!(jr(sr)&&sr.supports.geoLocation&&sr.supports.geoLocation.map&&sr.supports.permissions)}const Uh="v2";function Hh(){if(jr(sr,cn.content,cn.task),!Bh())throw gn;return dc(Yn(Uh,"geoLocation.getCurrentLocation"),"location.getLocation",{allowChooseLocation:!1,showMap:!1})}function _h(){if(jr(sr,cn.content,cn.task),!Bh())throw gn;const e=Le.GeoLocation;return new Promise((t=>{t(dc(Yn(Uh,"geoLocation.hasPermission"),"permissions.has",e))}))}function Vh(){if(jr(sr,cn.content,cn.task),!Bh())throw gn;const e=Le.GeoLocation;return new Promise((t=>{t(dc(Yn(Uh,"geoLocation.requestPermission"),"permissions.request",e))}))}function Bh(){return!!(jr(sr)&&sr.supports.geoLocation&&sr.supports.permissions)}function jh(){return sr.hostVersionsInfo?sr.hostVersionsInfo.adaptiveCardSchemaVersion:void 0}const Wh="v1";class zh{postMessage(e,t){jr(sr),Cc(Yn(Wh,"appWindow.childAppWindow.postMessage"),"messageForChild",[e],t||Cn())}addEventListener(e,t){jr(sr),"message"===e&&ys(Yn(Wh,"appWindow.childAppWindow.addEventListener"),"messageForParent",t)}}class $h{static get Instance(){return this._instance||(this._instance=new this)}postMessage(e,t){jr(sr,cn.task),Cc(Yn(Wh,"appWindow.parentAppWindow.postMessage"),"messageForParent",[e],t||Cn())}addEventListener(e,t){jr(sr,cn.task),"message"===e&&ys(Yn(Wh,"appWindow.parentAppWindow.addEventListener"),"messageForChild",t)}}const qh="v2";function Gh(e){if(jr(sr,cn.content),!Jh())throw gn;if(!e||!Rn(e))throw{errorCode:De.INVALID_ARGUMENTS,message:"Invalid Url: Only https URL is allowed"};return dc(Yn(qh,"secondaryBrowser.openUrl"),"secondaryBrowser.open",e.toString())}function Jh(){return!(!jr(sr)||!sr.supports.secondaryBrowser)}const Kh="v1";function Qh(e,t){if(!t)throw new Error("[location.getLocation] Callback cannot be null");if(jr(sr,cn.content,cn.task),!Wr(Qe))throw{errorCode:De.OLD_PLATFORM};if(!e)throw{errorCode:De.INVALID_ARGUMENTS};if(!Xh())throw gn;Cc(Yn(Kh,"location.getLocation"),"location.getLocation",[e],t)}function Zh(e,t){if(!t)throw new Error("[location.showLocation] Callback cannot be null");if(jr(sr,cn.content,cn.task),!Wr(Qe))throw{errorCode:De.OLD_PLATFORM};if(!e)throw{errorCode:De.INVALID_ARGUMENTS};if(!Xh())throw gn;Cc(Yn(Kh,"location.showLocation"),"location.showLocation",[e],t)}function Xh(){return!(!jr(sr)||!sr.supports.location)}const Yh="v1";function em(e){jr(sr,cn.sidePanel),e.contentUrl&&new URL(e.contentUrl),Cc(Yn(Yh,"meeting.appShareButton.setOptions"),"meeting.appShareButton.setOptions",[e])}var tm=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 nm="v1";var rm,om,im,am,sm,cm;function um(e){if(!e)throw new Error("[get incoming client audio state] Callback cannot be null");jr(sr,cn.sidePanel,cn.meetingStage),Cc(Yn(nm,"meeting.getIncomingClientAudioState"),"getIncomingClientAudioState",e)}function lm(e){if(!e)throw new Error("[toggle incoming client audio] Callback cannot be null");jr(sr,cn.sidePanel,cn.meetingStage),Cc(Yn(nm,"meeting.toggleIncomingClientAudio"),"toggleIncomingClientAudio",e)}function dm(e){if(!e)throw new Error("[get meeting details] Callback cannot be null");jr(sr,cn.sidePanel,cn.meetingStage,cn.settings,cn.content),Cc(Yn(nm,"meeting.getMeetingDetails"),"meeting.getMeetingDetails",e)}function fm(){var e,t,n;return tm(this,void 0,void 0,(function*(){let r;jr(sr,cn.sidePanel,cn.meetingStage,cn.settings,cn.content);try{const e=!0;r=yield dc(Yn("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)==am.GroupCall||(null===(n=r.details)||void 0===n?void 0:n.type)==am.OneOnOneCall)&&!r.details.originalCallerInfo)throw new Error(De.NOT_SUPPORTED_ON_PLATFORM.toString());return r}))}function pm(e){if(!e)throw new Error("[get Authentication Token For AnonymousUser] Callback cannot be null");jr(sr,cn.sidePanel,cn.meetingStage,cn.task),Cc(Yn(nm,"meeting.getAuthenticationTokenForAnonymousUser"),"meeting.getAuthenticationTokenForAnonymousUser",e)}function gm(e){if(!e)throw new Error("[get live stream state] Callback cannot be null");jr(sr,cn.sidePanel),Cc(Yn(nm,"meeting.getLiveStreamState"),"meeting.getLiveStreamState",e)}function hm(e,t,n){if(!e)throw new Error("[request start live streaming] Callback cannot be null");jr(sr,cn.sidePanel),Cc(Yn(nm,"meeting.requestStartLiveStreaming"),"meeting.requestStartLiveStreaming",[t,n],e)}function mm(e){if(!e)throw new Error("[request stop live streaming] Callback cannot be null");jr(sr,cn.sidePanel),Cc(Yn(nm,"meeting.requestStopLiveStreaming"),"meeting.requestStopLiveStreaming",e)}function vm(e){if(!e)throw new Error("[register live stream changed handler] Handler cannot be null");jr(sr,cn.sidePanel),ys(Yn(nm,"meeting.registerLiveStreamChangedHandler"),"meeting.liveStreamChanged",e)}function wm(e,t,n={sharingProtocol:sm.Collaborative}){if(!e)throw new Error("[share app content to stage] Callback cannot be null");jr(sr,cn.sidePanel,cn.meetingStage),Cc(Yn(nm,"meeting.shareAppContentToStage"),"meeting.shareAppContentToStage",[t,n],e)}function Cm(e){if(!e)throw new Error("[get app content stage sharing capabilities] Callback cannot be null");jr(sr,cn.sidePanel,cn.meetingStage),Cc(Yn(nm,"meeting.getAppContentStageSharingCapabilities"),"meeting.getAppContentStageSharingCapabilities",e)}function ym(e){if(!e)throw new Error("[stop sharing app content to stage] Callback cannot be null");jr(sr,cn.sidePanel,cn.meetingStage),Cc(Yn(nm,"meeting.stopSharingAppContentToStage"),"meeting.stopSharingAppContentToStage",e)}function Sm(e){if(!e)throw new Error("[get app content stage sharing state] Callback cannot be null");jr(sr,cn.sidePanel,cn.meetingStage),Cc(Yn(nm,"meeting.getAppContentStageSharingState"),"meeting.getAppContentStageSharingState",e)}function bm(e){if(!e)throw new Error("[registerSpeakingStateChangeHandler] Handler cannot be null");jr(sr,cn.sidePanel,cn.meetingStage),ys(Yn(nm,"meeting.registerSpeakingStateChangeHandler"),"meeting.speakingStateChanged",e)}function Em(e){if(!e)throw new Error("[registerRaiseHandStateChangedHandler] Handler cannot be null");jr(sr,cn.sidePanel,cn.meetingStage),ys(Yn(nm,"meeting.registerRaiseHandStateChangedHandler"),"meeting.raiseHandStateChanged",e)}function Am(e){if(!e)throw new Error("[registerMeetingReactionReceivedHandler] Handler cannot be null");jr(sr,cn.sidePanel,cn.meetingStage),ys(Yn(nm,"meeting.registerMeetingReactionReceivedHandler"),"meeting.meetingReactionReceived",e)}function Im(e){if(void 0===(null==e?void 0:e.joinWebUrl)||null===(null==e?void 0:e.joinWebUrl))return Promise.reject(new Error("Invalid joinMeetingParams"));jr(sr);const t={joinWebUrl:e.joinWebUrl.href,source:e.source||cm.Other};return dc(Yn("v2","meeting.joinMeeting"),"meeting.joinMeeting",t)}function Pm(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");jr(sr,cn.sidePanel,cn.meetingStage),e.isAppHandlingAudio?Tm(e,t):Om(e,t)}function Tm(e,t){Cc(Yn(nm,"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");ys(Yn(nm,"meeting.registerMicStateChangeHandler"),"meeting.micStateChanged",(t=>tm(this,void 0,void 0,(function*(){try{const n=yield e.micMuteStateChangedCallback(t);Fm(n,n.isMicMuted===t.isMicMuted?rm.HostInitiated:rm.AppDeclinedToChange)}catch(e){Fm(t,rm.AppFailedToChange)}}))));ys(Yn(nm,"meeting.registerAudioDeviceSelectionChangedHandler"),"meeting.audioDeviceSelectionChanged",(t=>{var n;null===(n=e.audioDeviceSelectionChangedCallback)||void 0===n||n.call(e,t)})),t(r)}))}function Om(e,t){Cc(Yn(nm,"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");bs("meeting.micStateChanged")&&Ss("meeting.micStateChanged"),bs("meeting.audioDeviceSelectionChanged")&&Ss("meeting.audioDeviceSelectionChanged"),t(n)}))}function Rm(e){Fm(e,rm.AppInitiated)}function Fm(e,t){jr(sr,cn.sidePanel,cn.meetingStage),Cc(Yn(nm,"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"}(rm||(rm={})),function(e){e.like="like",e.heart="heart",e.laugh="laugh",e.surprised="surprised",e.applause="applause"}(om||(om={})),function(e){e.Unknown="Unknown",e.Adhoc="Adhoc",e.Scheduled="Scheduled",e.Recurring="Recurring",e.Broadcast="Broadcast",e.MeetNow="MeetNow"}(im||(im={})),function(e){e.OneOnOneCall="oneOnOneCall",e.GroupCall="groupCall"}(am||(am={})),function(e){e.Collaborative="Collaborative",e.ScreenShare="ScreenShare"}(sm||(sm={})),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"}(cm||(cm={}));const km="v1",Mm="v2";function Nm(e,t){let n,r,o="";"function"==typeof e?(n=e,r=t,o=Yn(km,"monetization.openPurchaseExperience")):(r=e,o=Yn(Mm,"monetization.openPurchaseExperience"));return jr(sr,cn.content),In((()=>new Promise((e=>{if(!xm())throw gn;e(dc(o,"monetization.openPurchaseExperience",r))}))),n)}function xm(){return!(!jr(sr)||!sr.supports.monetization)}const Dm="v2";function Lm(e){return new Promise((t=>{if(jr(sr,cn.content),!Hm())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openCalendarItem");t(uc(Yn(Dm,"calendar.openCalendarItem"),"calendar.openCalendarItem",e))}))}function Um(e){return new Promise((t=>{if(jr(sr,cn.content),!Hm())throw new Error("Not supported");const n=Yn(Dm,"calendar.composeMeeting");sr.isLegacyTeams?t(uc(n,"executeDeepLink",Cg(e.attendees,e.startTime,e.endTime,e.subject,e.content))):t(uc(n,"calendar.composeMeeting",e))}))}function Hm(){return!(!jr(sr)||!sr.supports.calendar)}const _m="v2";function Vm(e){e&&0!==e.length&&e.forEach((e=>{tg(e)}))}function Bm(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===Km.New&&(Vm(t.toRecipients),Vm(t.ccRecipients),Vm(t.bccRecipients))}function jm(e){if(jr(sr,cn.content),!Wm())throw new Error("Not supported");return Bm(e),hc("mail.handoff.composeMail",[new zm(e)],Yn(_m,"mail.handoff.composeMail"))}function Wm(){return!!(jr(sr)&&sr.supports.mail&&sr.supports.mail.handoff)}class zm{constructor(e){this.composeMailParamsWithHandoff=e}serialize(){return this.composeMailParamsWithHandoff}}const $m="v2";function qm(e){return new Promise((t=>{if(jr(sr,cn.content),!Jm())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openMailItem");t(uc(Yn($m,"mail.openMailItem"),"mail.openMailItem",e))}))}function Gm(e){return new Promise((t=>{if(jr(sr,cn.content),!Jm())throw new Error("Not supported");t(uc(Yn($m,"mail.composeMail"),"mail.composeMail",e))}))}function Jm(){return!(!jr(sr)||!sr.supports.mail)}var Km;!function(e){e.New="new",e.Reply="reply",e.ReplyAll="replyAll",e.Forward="forward"}(Km||(Km={}));const Qm="v2";function Zm(){if(!Gn.printCapabilityEnabled){if(jr(sr),!rv())throw gn;Gn.printCapabilityEnabled=!0,document.addEventListener("keydown",(e=>{(e.ctrlKey||e.metaKey)&&80===e.keyCode&&(Xm(),e.cancelBubble=!0,e.preventDefault(),e.stopImmediatePropagation())}))}}function Xm(){Mn().print()}function Ym(e){ev(Yn(Qm,"teamsAPIs_registerOnLoadHandler"),e,(()=>{if(!no(e)&&!rv())throw gn}))}function ev(e,t,n){!no(t)&&jr(sr),!no(t)&&n&&n(),Os(e,t)}function tv(e){nv(Yn(Qm,"teamsAPIs_registerBeforeUnloadHandler"),e,(()=>{if(!no(e)&&!rv())throw gn}))}function nv(e,t,n){!no(t)&&jr(sr),!no(t)&&n&&n(),ks(e,t)}function rv(){return!(!jr(sr)||!sr.supports.teamsCore)}const ov="v1",iv="v2";function av(e,t){let n,r;jr(sr,cn.content,cn.task,cn.settings);let o="";return"function"==typeof e?([n,r]=[e,t],o=Yn(ov,"people.selectPeople")):(r=e,o=Yn(iv,"people.selectPeople")),En(sv,n,o,r)}function sv(e,t){return new Promise((n=>{if(!Wr(Ze))throw{errorCode:De.OLD_PLATFORM};if(!th(t))throw{errorCode:De.INVALID_ARGUMENTS};if(!cv())throw gn;n(dc(e,"people.selectPeople",t))}))}function cv(){return!(!jr(sr)||!sr.supports.people)}function uv(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?lv(e.persona):[!1,"triggerType must be a valid string"]:[!1,"targetElementBoundingRect must be a DOMRect"]:[!1,"A request object is required"]}function lv(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 dv="v2";function fv(e){return jr(sr,cn.content),new Promise((t=>{const[n,r]=uv(e);if(!n)throw{errorCode:De.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(dc(Yn(dv,"profile.showProfile"),"profile.showProfile",o))}))}function pv(){return!(!jr(sr)||!sr.supports.profile)}const gv="v2",hv="search.queryChange",mv="search.queryClose",vv="search.queryExecute";function wv(e,t,n){if(jr(sr,cn.content),!yv())throw gn;ys(Yn(gv,"search.registerOnClosedHandler"),mv,e),ys(Yn(gv,"search.registerOnExecutedHandler"),vv,t),n&&ys(Yn(gv,"search.registerOnChangeHandler"),hv,n)}function Cv(){if(jr(sr,cn.content),!yv())throw gn;Cc(Yn(gv,"search.unregisterHandlers"),"search.unregister"),Ss(hv),Ss(mv),Ss(vv)}function yv(){return!(!jr(sr)||!sr.supports.search)}function Sv(){return new Promise((e=>{if(jr(sr,cn.content),!yv())throw new Error("Not supported");e(uc(Yn(gv,"search.closeSearch"),"search.closeSearch"))}))}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())}))};const Ev="v2";function Av(){return bv(this,void 0,void 0,(function*(){if(jr(sr,cn.sidePanel,cn.meetingStage),!Iv())throw gn;return yield dc(Yn(Ev,"sharing.history.getContent"),"sharing.history.getContent")}))}function Iv(){var e;return jr(sr)&&void 0!==(null===(e=sr.supports.sharing)||void 0===e?void 0:e.history)}const Pv="v1",Tv="v2",Ov={shareWebContent:"sharing.shareWebContent"};function Rv(e,t){try{kv(e),Mv(e),Nv(e)}catch(e){return An((()=>Promise.reject(e)),t)}jr(sr,cn.content,cn.sidePanel,cn.task,cn.stage,cn.meetingStage);return An(Fv,t,Yn(t?Pv:Tv,"sharing.shareWebContent"),e)}function Fv(e,t){return new Promise((n=>{if(!xv())throw gn;n(dc(e,Ov.shareWebContent,t))}))}function kv(e){if(!(e&&e.content&&e.content.length)){throw{errorCode:De.INVALID_ARGUMENTS,message:"Shared content is missing"}}}function Mv(e){let t;if(e.content.some((e=>!e.type)))throw t={errorCode:De.INVALID_ARGUMENTS,message:"Shared content type cannot be undefined"},t;if(e.content.some((t=>t.type!==e.content[0].type)))throw t={errorCode:De.INVALID_ARGUMENTS,message:"Shared content must be of the same type"},t}function Nv(e){let t;if("URL"!==e.content[0].type)throw t={errorCode:De.INVALID_ARGUMENTS,message:"Content type is unsupported"},t;if(e.content.some((e=>!e.url)))throw t={errorCode:De.INVALID_ARGUMENTS,message:"URLs are required for URL content types"},t}function xv(){return!(!jr(sr)||!sr.supports.sharing)}const Dv="v2";function Lv(){return new Promise((e=>{if(jr(sr,cn.content),!Uv())throw gn;e(dc(Yn(Dv,"stageView.self.close"),"stageView.self.close"))}))}function Uv(){var e;return jr(sr)&&void 0!==(null===(e=sr.supports.stageView)||void 0===e?void 0:e.self)}const Hv="v2";var _v;function Vv(e){return new Promise((t=>{if(jr(sr,cn.content),!Bv())throw gn;if(!e)throw new Error("[stageView.open] Stage view params cannot be null");t(dc(Yn(Hv,"stageView.open"),"stageView.open",e))}))}function Bv(){return!(!jr(sr)||!sr.supports.stageView)}!function(e){e.modal="modal",e.popout="popout",e.popoutWithChat="popoutWithChat"}(_v||(_v={}));const jv=10;var Wv=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 zv="v2";function $v(e){return Wv(this,void 0,void 0,(function*(){jr(sr,cn.content,cn.task),Jv(),Kv(e);const t=yield dc(Yn(zv,"visualMedia.image.captureImages"),"visualMedia.image.captureImages",e);return Qv(e.maxVisualMediaCount,t),t}))}function qv(e){return Wv(this,void 0,void 0,(function*(){jr(sr,cn.content,cn.task),Jv(),Kv(e);const t=yield dc(Yn(zv,"visualMedia.image.retrieveImages"),"visualMedia.image.retrieveImages",e);return Qv(e.maxVisualMediaCount,t),t}))}function Gv(){return!!(jr(sr)&&sr.supports.visualMedia&&sr.supports.visualMedia.image&&sr.supports.permissions)}function Jv(){if(!Gv())throw gn}function Kv(e){if(!e||e.maxVisualMediaCount>jv||e.maxVisualMediaCount<1)throw vn}function Qv(e,t){if(t.length>e)throw wn}const Zv="v2";var Xv,Yv;function ew(){if(jr(sr,cn.content,cn.task),!Gv())throw gn;const e=Le.Media;return dc(Yn(Zv,"visualMedia.hasPermission"),"permissions.has",e)}function tw(){if(jr(sr,cn.content,cn.task),!Gv())throw gn;const e=Le.Media;return dc(Yn(Zv,"visualMedia.requestPermission"),"permissions.request",e)}!function(e){e[e.FrontOrRear=1]="FrontOrRear",e[e.FrontOnly=2]="FrontOnly",e[e.RearOnly=3]="RearOnly"}(Xv||(Xv={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(Yv||(Yv={}));var nw=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 rw=null;function ow(){return nw(this,void 0,void 0,(function*(){return null===rw&&(rw=(yield Fo()).app.host.name),rw}))}var iw=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 aw(){return iw(this,void 0,void 0,(function*(){if(jr(sr),!cw())throw gn;return!(!sr.isLegacyTeams||Gn.hostClientType!==an.android&&Gn.hostClientType!==an.ios&&Gn.hostClientType!==an.ipados&&Gn.hostClientType!==an.visionOS||(yield sw())!==sn.teams)||(yield cc(Yn("v2","webStorage.isWebStorageClearedOnUserLogOut"),"webStorage.isWebStorageClearedOnUserLogOut"))}))}function sw(){return iw(this,void 0,void 0,(function*(){return ow()}))}function cw(){return jr(sr)&&void 0!==sr.supports.webStorage}const uw="v2";var lw;function dw(e){const t=Yn(uw,"call.startCall");return new Promise((n=>{var r;if(jr(sr,cn.content,cn.task),!fw())throw gn;if(!sr.isLegacyTeams)return Cc(t,"call.startCall",[e],n);n(cc(t,"executeDeepLink",wg(e.targets,null===(r=e.requestedModalities)||void 0===r?void 0:r.includes(lw.Video),e.source)).then((e=>{if(!e)throw new Error(lt);return e})))}))}function fw(){return!(!jr(sr)||!sr.supports.call)}!function(e){e.Unknown="unknown",e.Audio="audio",e.Video="video",e.VideoBasedScreenSharing="videoBasedScreenSharing",e.Data="data"}(lw||(lw={}));const pw="v1";function gw(){Qi(Yn(pw,"appInitialization.notifyAppLoaded"))}function hw(){Cc(Yn(pw,"appInitialization.notifySuccess"),bo.Success,[br])}function mw(e){Xi(Yn(pw,"appInitialization.notifyFailure"),e)}function vw(e){Zi(Yn(pw,"appInitialization.notifyExpectedFailure"),e)}const ww=Xn("thirdPartyCloudStorage"),Cw="v2";class yw{constructor(e,t){this.fileType=e,this.assembleAttachment=t}}let Sw=[],bw=null,Ew=!0,Aw=null;function Iw(e,t){if(!t)throw new Error("[getDragAndDropFiles] Callback cannot be null");if(e&&""!==e){if(jr(sr,cn.content,cn.task),!Tw())throw gn;if(Aw)throw Aw=null,new Error("getDragAndDropFiles cannot be called twice");Aw=t,Ew=!0,Cc(Yn(Cw,"thirdPartyCloudStorage.getDragAndDropFiles"),"thirdPartyCloudStorage.getDragAndDropFiles",[e],Pw)}else{t([],{errorCode:De.INVALID_ARGUMENTS})}}function Pw(e){if(Aw)if(e&&e.error)Aw([],e.error),Aw=null;else if(e&&e.fileChunk)try{Ew||0!==e.fileChunk.chunkSequence||(ww("Last chunk is not received or 'endOfFile' value for previous chunk was not set to true"),Ew=!0,Aw([],{errorCode:De.INTERNAL_ERROR,message:"error occurred while receiving data"}),Sw=[],Aw=null);const t=$g(e.fileChunk,e.fileType);if(t?(bw||(bw=new yw(e.fileType,[])),bw.assembleAttachment.push(t)):(ww(`Received a null assemble attachment for when decoding chunk sequence ${e.fileChunk.chunkSequence}; not including the chunk in the assembled file.`),Aw?Aw([],{errorCode:De.INTERNAL_ERROR,message:"error occurred while receiving data"}):Aw=null,Sw=[],Aw=null,Ew=!0),Ew=e.fileChunk.endOfFile,e.fileChunk.endOfFile&&bw){const t=zg(bw.assembleAttachment,bw.fileType);if(t){const n=new File([t],e.fileName,{type:t.type});Sw.push(n)}e.isLastFile&&Aw&&(Aw(Sw,e.error),Sw=[],Aw=null,Ew=!0),bw=null}}catch(e){Aw&&(Aw([],{errorCode:De.INTERNAL_ERROR,message:e}),Sw=[],Aw=null,Ew=!0)}else Aw([],{errorCode:De.INTERNAL_ERROR,message:"data received is null"}),Sw=[],Aw=null,Ew=!0}function Tw(){return!(!jr(sr)||!sr.supports.thirdPartyCloudStorage)}const Ow="v1";function Rw(e,t){Ki(Yn(Ow,"initialize"),t).then((()=>{e&&e()}))}function Fw(){Zm()}function kw(){Xm()}function Mw(e){Br(),Cc(Yn(Ow,"getContext"),"getContext",(t=>{t.frameContext||(t.frameContext=Gn.frameContext),e(t)}))}function Nw(e){oa(Yn(Ow,"registerOnThemeChangeHandlerHelper"),e)}function xw(e){Es(Yn(Ow,"registerFullScreenHandler"),"fullScreenChange",e,[])}function Dw(e){Es(Yn(Ow,"registerAppButtonClickHandler"),"appButtonClick",e,[cn.content])}function Lw(e){Es(Yn(Ow,"registerAppButtonHoverEnterHandler"),"appButtonHoverEnter",e,[cn.content])}function Uw(e){Es(Yn(Ow,"registerAppButtonHoverLeaveHandler"),"appButtonHoverLeave",e,[cn.content])}function Hw(e){Aa(Yn(Ow,"registerBackButtonHandler"),e)}function _w(e){ev(Yn(Ow,"registerOnLoadHandler"),e)}function Vw(e){nv(Yn(Ow,"registerBeforeUnloadHandler"),e)}function Bw(e){Es(Yn(Ow,"registerFocusEnterHandler"),"focusEnter",e,[])}function jw(e){Es(Yn(Ow,"registerChangeSettingsHandler"),"changeSettings",e,[cn.content])}function Ww(e,t){jr(sr),Ya(Yn(Ow,"getTabInstances"),t).then((t=>{e(t)}))}function zw(e,t){jr(sr),es(Yn(Ow,"getMruTabInstances"),t).then((t=>{e(t)}))}function $w(e){ts(Yn(Ow,"shareDeepLink"),{subPageId:e.subEntityId,subPageLabel:e.subEntityLabel,subPageWebUrl:e.subEntityWebUrl})}function qw(e,t){jr(sr,cn.content,cn.sidePanel,cn.settings,cn.task,cn.stage,cn.meetingStage);const n=null!=t?t:Cn();ia(Yn(Ow,"executeDeepLink"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function Gw(e){ns(Yn(Ow,"setFrameContext"),e)}function Jw(e,t,n){Ki(Yn(Ow,"initializeWithFrameContext"),n).then((()=>t&&t())),ns(Yn(Ow,"setFrameContext"),e)}const Kw="v1";function Qw(e){Xa(Yn(Kw,"navigation.returnFocus"),e)}function Zw(e,t){jr(sr);const n=null!=t?t:Cn();Za(Yn(Kw,"navigation.navigateToTab"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function Xw(e,t){jr(sr,cn.content,cn.sidePanel,cn.settings,cn.remove,cn.task,cn.stage,cn.meetingStage);const n=null!=t?t:Cn();Ka(Yn(Kw,"navigation.navigateCrossDomain"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function Yw(e){jr(sr);const t=null!=e?e:Cn();Qa(Yn(Kw,"navigation.navigateBack")).then((()=>{t(!0)})).catch((e=>{t(!1,e.message)}))}const eC="v1";function tC(e){rs(Yn(eC,"settings.setValidityState"),e)}function nC(e){jr(sr,cn.content,cn.settings,cn.remove,cn.sidePanel),os(Yn(eC,"settings.getSettings")).then((t=>{e(t)}))}function rC(e,t){jr(sr,cn.content,cn.settings,cn.sidePanel);const n=null!=t?t:Cn();is(Yn(eC,"settings.setSettings"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function oC(e){Di(Yn(eC,"settings.registerOnSaveHandler"),e)}function iC(e){Ui(Yn(eC,"settings.registerOnRemoveHandler"),e)}var aC=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 sC="v1";function cC(e,t){const n=Yn(sC,"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?(jr(sr,cn.content,cn.sidePanel,cn.meetingStage),Cc(n,"tasks.startTask",[e],t)):void 0!==e.completionBotId?ni(n,fC(e),r):ti(n,dC(e),r),new zh}function uC(e){e=pC(e);const{width:t,height:n}=e,r=aC(e,["width","height"]);if(Object.keys(r).length)throw new Error("resize requires a TaskInfo argument containing only width and height");ei(Yn(sC,"tasks.updateTask"),e)}function lC(e,t){ri(Yn(sC,"tasks.submitTask"),e,t)}function dC(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:fn.Small,width:e.width?e.width:fn.Small},title:e.title,fallbackUrl:e.fallbackUrl}}function fC(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:fn.Small,width:e.width?e.width:fn.Small},title:e.title,fallbackUrl:e.fallbackUrl,completionBotId:e.completionBotId}}function pC(e){return e.height=e.height?e.height:fn.Small,e.width=e.width?e.width:fn.Small,e}const gC="v2";var hC,mC;function vC(){return!(!jr(sr,cn.meetingStage,cn.sidePanel,cn.content)||!sr.supports.interactive)}!function(e){e.guest="Guest",e.attendee="Attendee",e.presenter="Presenter",e.organizer="Organizer"}(hC||(hC={})),function(e){e.added="Added",e.alreadyExists="AlreadyExists",e.conflict="Conflict",e.notFound="NotFound"}(mC||(mC={}));class wC{getFluidTenantInfo(){return CC(),new Promise((e=>{e(dc(Yn(gC,"interactive.getFluidTenantInfo"),"interactive.getFluidTenantInfo"))}))}getFluidToken(e){return CC(),new Promise((t=>{t(dc(Yn(gC,"interactive.getFluidToken"),"interactive.getFluidToken",e))}))}getFluidContainerId(){return CC(),new Promise((e=>{e(dc(Yn(gC,"interactive.getFluidContainerId"),"interactive.getFluidContainerId"))}))}setFluidContainerId(e){return CC(),new Promise((t=>{t(dc(Yn(gC,"interactive.setFluidContainerId"),"interactive.setFluidContainerId",e))}))}getNtpTime(){return CC(),new Promise((e=>{e(dc(Yn(gC,"interactive.getNtpTime"),"interactive.getNtpTime"))}))}registerClientId(e){return CC(),new Promise((t=>{t(dc(Yn(gC,"interactive.registerClientId"),"interactive.registerClientId",e))}))}getClientRoles(e){return CC(),new Promise((t=>{t(dc(Yn(gC,"interactive.getClientRoles"),"interactive.getClientRoles",e))}))}getClientInfo(e){return CC(),new Promise((t=>{t(dc(Yn(gC,"interactive.getClientInfo"),"interactive.getClientInfo",e))}))}static create(){return CC(),new wC}}function CC(){if(!vC())throw new Error("LiveShareHost Not supported")}var yC=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 SC(e){try{return e.cartItems=bC(e.cartItems),e}catch(e){throw new Error("Error deserializing cart")}}function bC(e){return e.map((e=>{if(e.imageURL){const t=new URL(e.imageURL);e.imageURL=t}return e.accessories&&(e.accessories=bC(e.accessories)),e}))}const EC=e=>{try{return e.map((e=>{const{imageURL:t,accessories:n}=e,r=yC(e,["imageURL","accessories"]),o=Object.assign({},r);return t&&(o.imageURL=t.href),n&&(o.accessories=EC(n)),o}))}catch(e){throw new Error("Error serializing cart items")}};function AC(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),IC(t.accessories)}function IC(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");OC(e.price),RC(e.quantity)}function TC(e){if(null!=e){if(!e)throw new Error("id must not be empty");if(!1===on(e))throw new Error("id must be a valid UUID")}}function OC(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 RC(e){if("number"!=typeof e||e<=0||parseInt(e.toString())!==e)throw new Error(`quantity ${e} must be an integer greater than 0`)}function FC(e){if(!Object.values(xC).includes(e))throw new Error(`cartStatus ${e} is not valid`)}const kC="v2",MC={majorVersion:1,minorVersion:1};var NC,xC;function DC(){if(jr(sr,cn.content,cn.task),!_C())throw gn;return dc(Yn(kC,"marketplace.getCart"),"marketplace.getCart",MC).then(SC)}function LC(e){if(jr(sr,cn.content,cn.task),!_C())throw gn;if(!e)throw new Error("addOrUpdateCartItemsParams must be provided");return TC(null==e?void 0:e.cartId),AC(null==e?void 0:e.cartItems),dc(Yn(kC,"marketplace.addOrUpdateCartItems"),"marketplace.addOrUpdateCartItems",Object.assign(Object.assign({},e),{cartItems:EC(e.cartItems),cartVersion:MC})).then(SC)}function UC(e){if(jr(sr,cn.content,cn.task),!_C())throw gn;if(!e)throw new Error("removeCartItemsParams must be provided");if(TC(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 dc(Yn(kC,"marketplace.removeCartItems"),"marketplace.removeCartItems",Object.assign(Object.assign({},e),{cartVersion:MC})).then(SC)}function HC(e){if(jr(sr,cn.content,cn.task),!_C())throw gn;if(!e)throw new Error("updateCartStatusParams must be provided");return TC(null==e?void 0:e.cartId),FC(null==e?void 0:e.cartStatus),dc(Yn(kC,"marketplace.updateCartStatus"),"marketplace.updateCartStatus",Object.assign(Object.assign({},e),{cartVersion:MC})).then(SC)}function _C(){return!(!jr(sr)||!sr.supports.marketplace)}!function(e){e.TACAdminUser="TACAdminUser",e.TeamsAdminUser="TeamsAdminUser",e.TeamsEndUser="TeamsEndUser"}(NC||(NC={})),function(e){e.Open="Open",e.Processing="Processing",e.Processed="Processed",e.Closed="Closed",e.Error="Error"}(xC||(xC={}));var VC=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())}))};class BC{constructor(e){this.event=e}serialize(){return{altKey:this.event.altKey,bubbles:this.event.bubbles,cancelBubble:this.event.cancelBubble,charCode:this.event.charCode,code:this.event.code,composed:this.event.composed,ctrlKey:this.event.ctrlKey,defaultPrevented:this.event.defaultPrevented,detail:this.event.detail,eventPhase:this.event.eventPhase,isComposing:this.event.isComposing,isTrusted:this.event.isTrusted,key:this.event.key,keyCode:this.event.keyCode,location:this.event.location,metaKey:this.event.metaKey,repeat:this.event.repeat,returnValue:this.event.returnValue,shiftKey:this.event.shiftKey,timeStamp:this.event.timeStamp,type:this.event.type,which:this.event.which}}}function jC(e){return e.toLowerCase().split("+").sort().join("+")}function WC(e){return[e.ctrlKey&&"ctrl",e.shiftKey&&"shift",e.altKey&&"alt",e.metaKey&&"meta",e.key.toLowerCase()].filter(Boolean).sort().join("+")}function zC(e){return e.ctrlKey||e.shiftKey||e.altKey||e.metaKey||!!e.key&&"escape"===e.key.toLowerCase()}function $C(e,t){if(zC(t)){const n=WC(t);if(e.has(n))return{matchedShortcut:n,isOverridable:QC.has(n)}}return{matchedShortcut:void 0,isOverridable:!1}}function qC(e){ZC.clear(),e.shortcuts.forEach((e=>{ZC.add(jC(e))})),QC.clear(),e.overridableShortcuts.forEach((e=>{QC.add(jC(e))}))}class GC extends zi{validate(e){return e&&Array.isArray(e.shortcuts)&&Array.isArray(e.overridableShortcuts)}deserialize(e){return e}}function JC(e){ys(Yn("v2","shortcutRelay.hostShortcutChanged"),"shortcutRelay.hostShortcutChanged",e)}function KC(e){if(e.target.closest(`[${oy}]`))return;const{matchedShortcut:t,isOverridable:n}=$C(ZC,e);if(!t)return;if(n&&XC){if(XC(e,{matchedShortcut:t}))return}hc("shortcutRelay.forwardShortcutEvent",[new BC(e)],Yn("v2","shortcutRelay.forwardShortcutEvent")),e.preventDefault(),e.stopImmediatePropagation()}const QC=new Set,ZC=new Set;let XC,YC=!1;function ey(e){if(!ry())throw gn;const t=XC;return XC=e,t}function ty(){if(!ry())throw gn;YC=!1,ZC.clear(),QC.clear(),XC=void 0,document.removeEventListener("keydown",KC,{capture:!0})}function ny(){return VC(this,void 0,void 0,(function*(){if(!ry())throw gn;qC(yield gc("shortcutRelay.getHostShortcuts",[],new GC,Yn("v2","shortcutRelay.getHostShortcuts"))),YC||document.addEventListener("keydown",KC,{capture:!0}),YC=!0,JC((e=>{qC(e)}))}))}function ry(){return!(!jr(sr)||!sr.supports.shortcutRelay)}const oy="data-disable-shortcuts-forwarding"})(),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:()=>Ne,AppId:()=>to,ChannelType:()=>pn,ChildAppWindow:()=>Kh,DialogDimension:()=>fn,EduType:()=>Ve,EmailAddress:()=>sg,ErrorCode:()=>De,FileOpenPreference:()=>Me,FrameContexts:()=>cn,HostClientType:()=>an,HostName:()=>sn,LiveShareHost:()=>AC,NotificationTypes:()=>Kc,ParentAppWindow:()=>Qh,RenderingSurfaces:()=>un,SecondaryM365ContentIdName:()=>xe,TaskModuleDimension:()=>fn,TeamType:()=>ln,UUID:()=>$n,UserAuthenticationState:()=>el,UserSettingTypes:()=>Zc,UserTeamRole:()=>dn,ValidatedSafeString:()=>eo,ViewerActionTypes:()=>Qc,activateChildProxyingCommunication:()=>Er,app:()=>i,appEntity:()=>j,appInitialization:()=>Pe,appInstallDialog:()=>X,authentication:()=>Z,barCode:()=>ee,calendar:()=>de,call:()=>Ie,chat:()=>te,clipboard:()=>ne,conversations:()=>b,copilot:()=>O,dialog:()=>f,enablePrintCapability:()=>Dw,executeDeepLink:()=>Zw,externalAppAuthentication:()=>R,externalAppAuthenticationForCEA:()=>F,externalAppCardActions:()=>k,externalAppCardActionsForCEA:()=>M,externalAppCardActionsForDA:()=>N,externalAppCommands:()=>x,files:()=>D,geoLocation:()=>ie,getAdaptiveCardSchemaVersion:()=>Gh,getContext:()=>Lw,getCurrentFeatureFlagsState:()=>Tr,getMruTabInstances:()=>Kw,getTabInstances:()=>Jw,hostEntity:()=>K,initialize:()=>xw,initializeWithFrameContext:()=>Yw,liveShare:()=>Fe,location:()=>se,logs:()=>S,mail:()=>pe,marketplace:()=>ke,media:()=>Y,meeting:()=>ue,meetingRoom:()=>U,menus:()=>p,messageChannels:()=>L,monetization:()=>le,navigateBack:()=>oC,navigateCrossDomain:()=>rC,navigateToTab:()=>nC,nestedAppAuth:()=>re,nestedAppAuthBridge:()=>H,notifications:()=>_,openFilePreview:()=>ou,otherAppStateChange:()=>V,overwriteFeatureFlagsState:()=>Rr,pages:()=>y,people:()=>he,print:()=>Uw,profile:()=>me,registerAppButtonClickHandler:()=>Vw,registerAppButtonHoverEnterHandler:()=>Bw,registerAppButtonHoverLeaveHandler:()=>jw,registerBackButtonHandler:()=>Ww,registerBeforeUnloadHandler:()=>$w,registerChangeSettingsHandler:()=>Gw,registerCustomHandler:()=>nu,registerFocusEnterHandler:()=>qw,registerFullScreenHandler:()=>_w,registerOnLoadHandler:()=>zw,registerOnThemeChangeHandler:()=>Hw,registerUserSettingsChangeHandler:()=>ru,remoteCamera:()=>B,returnFocus:()=>tC,search:()=>ve,secondaryBrowser:()=>ae,sendCustomEvent:()=>tu,sendCustomMessage:()=>eu,setFeatureFlagsState:()=>Or,setFrameContext:()=>Xw,settings:()=>Oe,shareDeepLink:()=>Qw,sharing:()=>Ce,shortcutRelay:()=>je,sidePanelInterfaces:()=>I,stageView:()=>Se,store:()=>Q,tasks:()=>Re,teams:()=>$,teamsCore:()=>ge,thirdPartyCloudStorage:()=>Te,uploadCustomApp:()=>Yc,version:()=>br,videoEffects:()=>q,videoEffectsEx:()=>G,visualMedia:()=>Ae,webStorage:()=>Ee});var e={};n.r(e),n.d(e,{_clearTelemetryPort:()=>uo,getTelemetryPort:()=>so,isSupported:()=>co});var t={};n.r(t),n.d(t,{_clearDataLayerPort:()=>vo,getDataLayerPort:()=>ho,isSupported:()=>mo});var o={};n.r(o),n.d(o,{registerBeforeSuspendOrTerminateHandler:()=>wo,registerOnResumeHandler:()=>Co});var i={};n.r(i),n.d(i,{ExpectedFailureReason:()=>Eo,FailedReason:()=>Ao,Messages:()=>bo,_initialize:()=>Oo,_uninitialize:()=>Ro,getContext:()=>Fo,getFrameContext:()=>Po,initialize:()=>To,isInitialized:()=>Io,lifecycle:()=>o,notifyAppLoaded:()=>ko,notifyExpectedFailure:()=>xo,notifyFailure:()=>No,notifySuccess:()=>Mo,openLink:()=>Lo,registerHostToAppPerformanceMetricsHandler:()=>Uo,registerOnThemeChangeHandler:()=>Do});var a={};n.r(a),n.d(a,{isSupported:()=>Vo,resize:()=>_o});var s={};n.r(s),n.d(s,{isSupported:()=>jo,open:()=>Bo});var c={};n.r(c),n.d(c,{isSupported:()=>qo,registerOnMessageFromParent:()=>$o,sendMessageToDialog:()=>zo,sendMessageToParentFromDialog:()=>Wo});var u={};n.r(u),n.d(u,{bot:()=>s,getDialogInfoFromBotUrlDialogInfo:()=>Zo,getDialogInfoFromUrlDialogInfo:()=>Qo,isSupported:()=>Ko,open:()=>Go,parentCommunication:()=>c,submit:()=>Jo});var l={};n.r(l),n.d(l,{isSupported:()=>ui,open:()=>ci});var d={};n.r(d),n.d(d,{bot:()=>l,isSupported:()=>di,open:()=>li});var f={};n.r(f),n.d(f,{adaptiveCard:()=>d,initialize:()=>fi,isSupported:()=>pi,update:()=>a,url:()=>u});var p={};n.r(p),n.d(p,{DisplayMode:()=>hi,MenuItem:()=>vi,MenuListType:()=>mi,initialize:()=>Ai,isSupported:()=>Fi,setNavBarMenu:()=>Pi,setUpViews:()=>Ei,showActionMenu:()=>Oi});var g={};n.r(g),n.d(g,{initialize:()=>ki,isSupported:()=>Wi,registerChangeConfigHandler:()=>_i,registerOnRemoveHandler:()=>Ui,registerOnRemoveHandlerHelper:()=>Li,registerOnSaveHandler:()=>xi,registerOnSaveHandlerHelper:()=>Di,setConfig:()=>Ni,setValidityState:()=>Mi});var h={};n.r(h),n.d(h,{isSupported:()=>ya,onClick:()=>va,onHoverEnter:()=>wa,onHoverLeave:()=>Ca});var m={};n.r(m),n.d(m,{_initialize:()=>Sa,isSupported:()=>Ia,navigateBack:()=>ba,registerBackButtonHandler:()=>Aa,registerBackButtonHandlerHelper:()=>Ea});var v={};n.r(v),n.d(v,{isSupported:()=>Oa,navigateTo:()=>Pa,navigateToDefaultPage:()=>Ta});var w={};n.r(w),n.d(w,{enterFullscreen:()=>Ra,exitFullscreen:()=>Fa,isSupported:()=>ka});var C={};n.r(C),n.d(C,{getMruTabInstances:()=>xa,getTabInstances:()=>Na,isSupported:()=>Da,navigateToTab:()=>Ma});var y={};n.r(y),n.d(y,{EnterFocusType:()=>Ua,ReturnFocusType:()=>La,appButton:()=>h,backStack:()=>m,config:()=>g,currentApp:()=>v,fullTrust:()=>w,getConfig:()=>ja,initializeWithFrameContext:()=>Ba,isSupported:()=>Ga,navigateCrossDomain:()=>Wa,navigateToApp:()=>za,registerFocusEnterHandler:()=>_a,registerFullScreenHandler:()=>qa,returnFocus:()=>Ha,setCurrentFrame:()=>Va,shareDeepLink:()=>$a,tabs:()=>C});var S={};n.r(S),n.d(S,{isSupported:()=>Jc,registerGetLogHandler:()=>Gc});var b={};n.r(b),n.d(b,{closeConversation:()=>su,getChatMembers:()=>cu,isSupported:()=>uu,openConversation:()=>au});var A={};n.r(A),n.d(A,{isSupported:()=>pu,sendCustomTelemetryData:()=>gu});var E={};n.r(E),n.d(E,{getEligibilityInfo:()=>Cu,isSupported:()=>wu});var I={};n.r(I),n.d(I,{ContentItemType:()=>Su,CopilotMode:()=>Iu,MediaSelectionType:()=>bu,SidePanelErrorCode:()=>Ru,SidePanelErrorImpl:()=>Fu,TeamsContextType:()=>Tu,TeamsDimensionName:()=>Eu,TeamsSessionType:()=>Au,TranscriptState:()=>Pu,UserConsent:()=>Ou});var P={};n.r(P),n.d(P,{copilotSidePanelNotSupportedOnPlatformError:()=>Hu,getContent:()=>Du,isResponseAReportableError:()=>xu,isSupported:()=>Nu,preCheckUserConsent:()=>Uu,registerUserActionContentSelect:()=>Lu});var T={};n.r(T),n.d(T,{closeSidePanel:()=>$u,isSupported:()=>zu});var O={};n.r(O),n.d(O,{customTelemetry:()=>A,eligibility:()=>E,sidePanel:()=>P,view:()=>T});var R={};n.r(R),n.d(R,{ActionExecuteInvokeRequestType:()=>Qu,ActionExecuteResponseHandler:()=>tl,InvokeErrorCode:()=>Yu,InvokeResponseType:()=>Xu,OriginalRequestType:()=>Zu,SerializableActionExecuteInvokeRequest:()=>Ju,SerializableConnectorParameters:()=>dl,UserAuthenticationState:()=>el,authenticateAndResendRequest:()=>al,authenticateWithConnector:()=>fl,authenticateWithOauth2:()=>ul,authenticateWithPowerPlatformConnectorPlugins:()=>ll,authenticateWithSSO:()=>sl,authenticateWithSSOAndResendRequest:()=>cl,getUserAuthenticationStateForConnector:()=>gl,isActionExecuteResponse:()=>Ku,isInvokeError:()=>nl,isSupported:()=>hl,validateActionExecuteInvokeRequest:()=>ol});var F={};n.r(F),n.d(F,{authenticateAndResendRequest:()=>yl,authenticateWithOauth:()=>Cl,authenticateWithSSO:()=>wl,authenticateWithSSOAndResendRequest:()=>Sl,isSupported:()=>bl,validateInput:()=>Al});var k={};n.r(k),n.d(k,{ActionOpenUrlErrorCode:()=>Pl,ActionOpenUrlType:()=>Il,isSupported:()=>Rl,processActionOpenUrl:()=>Ol,processActionSubmit:()=>Tl});var M={};n.r(M),n.d(M,{isSupported:()=>xl,processActionOpenUrl:()=>Ml,processActionSubmit:()=>Nl});var N={};n.r(N),n.d(N,{SerializableActionOpenUrlDialogInfo:()=>jl,isSupported:()=>Vl,processActionOpenUrlDialog:()=>_l});var x={};n.r(x),n.d(x,{isSupported:()=>ql,processActionCommand:()=>$l});var D={};n.r(D),n.d(D,{CloudStorageProvider:()=>Jl,CloudStorageProviderFileAction:()=>Yl,CloudStorageProviderType:()=>Kl,DocumentLibraryAccessType:()=>Zl,FileDownloadStatus:()=>Xl,SpecialDocumentLibraryType:()=>Ql,addCloudStorageFolder:()=>td,addCloudStorageProvider:()=>ud,addCloudStorageProviderFile:()=>dd,copyMoveFiles:()=>ad,deleteCloudStorageFolder:()=>nd,deleteCloudStorageProviderFile:()=>pd,downloadCloudStorageProviderFile:()=>gd,getCloudStorageFolderContents:()=>rd,getCloudStorageFolders:()=>ed,getExternalProviders:()=>id,getFileDownloads:()=>sd,openCloudStorageFile:()=>od,openDownloadFolder:()=>cd,registerCloudStorageProviderContentChangeHandler:()=>vd,registerCloudStorageProviderListChangeHandler:()=>md,removeCloudStorageProvider:()=>ld,renameCloudStorageProviderFile:()=>fd,uploadCloudStorageProviderFile:()=>hd});var U={};n.r(U),n.d(U,{getPairedMeetingRoomInfo:()=>yd,isSupported:()=>Ed,registerMeetingRoomCapabilitiesUpdateHandler:()=>bd,registerMeetingRoomStatesUpdateHandler:()=>Ad,sendCommandToPairedMeetingRoom:()=>Sd});var L={};n.r(L),n.d(L,{dataLayer:()=>t,isSupported:()=>Id,telemetry:()=>e});var H={};n.r(H),n.d(H,{initialize:()=>Fd,version:()=>Pd});var _={};n.r(_),n.d(_,{isSupported:()=>_d,showNotification:()=>Hd});var V={};n.r(V),n.d(V,{isSupported:()=>zd,notifyInstallCompleted:()=>Wd,registerAppInstallationHandler:()=>Bd,unregisterAppInstallationHandler:()=>jd});var B={};n.r(B),n.d(B,{ControlCommand:()=>qd,ErrorReason:()=>Gd,SessionTerminatedReason:()=>Jd,getCapableParticipants:()=>Kd,isSupported:()=>rf,registerOnCapableParticipantsChangeHandler:()=>Yd,registerOnDeviceStateChangeHandler:()=>tf,registerOnErrorHandler:()=>ef,registerOnSessionStatusChangeHandler:()=>nf,requestControl:()=>Qd,sendControlCommand:()=>Zd,terminateSession:()=>Xd});var j={};n.r(j),n.d(j,{isSupported:()=>sf,selectAppEntity:()=>af});var W={};n.r(W),n.d(W,{getUserJoinedTeams:()=>uf,isSupported:()=>lf});var z={};n.r(z),n.d(z,{getConfigSetting:()=>ff,isSupported:()=>pf,joinedTeams:()=>W});var $={};n.r($),n.d($,{ChannelType:()=>hf,fullTrust:()=>z,getTeamChannels:()=>mf,isSupported:()=>wf,refreshSiteUrl:()=>vf});var q={};n.r(q),n.d(q,{EffectChangeType:()=>Of,EffectFailureReason:()=>Rf,VideoFrameFormat:()=>Tf,isSupported:()=>Df,notifySelectedVideoEffectChanged:()=>kf,registerForVideoEffect:()=>Mf,registerForVideoFrame:()=>Ff});var G={};n.r(G),n.d(G,{ErrorLevel:()=>ip,frameProcessingTimeoutInMs:()=>rp,isSupported:()=>pp,notifyFatalError:()=>mp,notifySelectedVideoEffectChanged:()=>lp,registerForVideoEffect:()=>dp,registerForVideoFrame:()=>ap,updatePersonalizedEffects:()=>fp});var J={};n.r(J),n.d(J,{addAndConfigure:()=>Ep,getAll:()=>Ip,isSupported:()=>Rp,reconfigure:()=>Pp,remove:()=>Op,rename:()=>Tp});var K={};n.r(K),n.d(K,{AppTypes:()=>Mp,isSupported:()=>Np,tab:()=>J});var Q={};n.r(Q),n.d(Q,{isSupported:()=>Wp,openAppDetail:()=>Vp,openFullStore:()=>_p,openInContextStore:()=>Bp,openSpecificStore:()=>jp});var Z={};n.r(Z),n.d(Z,{DataResidency:()=>ig,authenticate:()=>Zp,getAuthToken:()=>Yp,getUser:()=>tg,notifyFailure:()=>og,notifySuccess:()=>rg,registerAuthenticationHandlers:()=>Qp});var X={};n.r(X),n.d(X,{isSupported:()=>Og,openAppInstallDialog:()=>Tg});var Y={};n.r(Y),n.d(Y,{CameraStartMode:()=>Ng,File:()=>Hg,FileFormat:()=>kg,ImageOutputFormats:()=>Lg,ImageUriType:()=>Ug,Media:()=>Wg,MediaControllerEvent:()=>Mg,MediaType:()=>Dg,Source:()=>xg,VideoController:()=>$g,captureImage:()=>_g,hasPermission:()=>Vg,requestPermission:()=>Bg,scanBarCode:()=>Jg,selectMedia:()=>qg,viewImages:()=>Gg});var ee={};n.r(ee),n.d(ee,{hasPermission:()=>uh,isSupported:()=>dh,requestPermission:()=>lh,scanBarCode:()=>ch});var te={};n.r(te),n.d(te,{isSupported:()=>mh,openChat:()=>ph,openGroupChat:()=>hh});var ne={};n.r(ne),n.d(ne,{isSupported:()=>Sh,read:()=>yh,write:()=>Ch});var re={};n.r(re),n.d(re,{addNAATrustedOrigins:()=>Nh,canParentManageNAATrustedOrigins:()=>Oh,deleteNAATrustedOrigins:()=>xh,getParentOrigin:()=>Th,isDeeplyNestedAuthSupported:()=>Rh,isNAAChannelRecommended:()=>Ph});var oe={};n.r(oe),n.d(oe,{chooseLocation:()=>_h,isSupported:()=>Bh,showLocation:()=>Vh});var ie={};n.r(ie),n.d(ie,{getCurrentLocation:()=>Wh,hasPermission:()=>zh,isSupported:()=>qh,map:()=>oe,requestPermission:()=>$h});var ae={};n.r(ae),n.d(ae,{isSupported:()=>Yh,open:()=>Xh});var se={};n.r(se),n.d(se,{getLocation:()=>tm,isSupported:()=>rm,showLocation:()=>nm});var ce={};n.r(ce),n.d(ce,{setOptions:()=>im});var ue={};n.r(ue),n.d(ue,{CallType:()=>dm,EventActionSource:()=>pm,MeetingReactionType:()=>um,MeetingType:()=>lm,SharingProtocol:()=>fm,appShareButton:()=>ce,getAppContentStageSharingCapabilities:()=>Em,getAppContentStageSharingState:()=>Pm,getAuthenticationTokenForAnonymousUser:()=>wm,getIncomingClientAudioState:()=>gm,getLiveStreamState:()=>Cm,getMeetingDetails:()=>mm,getMeetingDetailsVerbose:()=>vm,joinMeeting:()=>Fm,registerLiveStreamChangedHandler:()=>bm,registerMeetingReactionReceivedHandler:()=>Rm,registerRaiseHandStateChangedHandler:()=>Om,registerSpeakingStateChangeHandler:()=>Tm,requestAppAudioHandling:()=>km,requestStartLiveStreaming:()=>ym,requestStopLiveStreaming:()=>Sm,shareAppContentToStage:()=>Am,stopSharingAppContentToStage:()=>Im,toggleIncomingClientAudio:()=>hm,updateMicState:()=>xm});var le={};n.r(le),n.d(le,{isSupported:()=>_m,openPurchaseExperience:()=>Hm});var de={};n.r(de),n.d(de,{composeMeeting:()=>jm,isSupported:()=>Wm,openCalendarItem:()=>Bm});var fe={};n.r(fe),n.d(fe,{composeMailWithHandoff:()=>Gm,isSupported:()=>Jm});var pe={};n.r(pe),n.d(pe,{ComposeMailType:()=>ev,composeMail:()=>Xm,handoff:()=>fe,isSupported:()=>Ym,openMailItem:()=>Zm});var ge={};n.r(ge),n.d(ge,{enablePrintCapability:()=>nv,isSupported:()=>cv,print:()=>rv,registerBeforeUnloadHandler:()=>av,registerBeforeUnloadHandlerHelper:()=>sv,registerOnLoadHandler:()=>ov,registerOnLoadHandlerHelper:()=>iv});var he={};n.r(he),n.d(he,{isSupported:()=>pv,selectPeople:()=>dv});var me={};n.r(me),n.d(me,{isSupported:()=>wv,showProfile:()=>vv});var ve={};n.r(ve),n.d(ve,{closeSearch:()=>Pv,isSupported:()=>Iv,registerHandlers:()=>Av,unregisterHandlers:()=>Ev});var we={};n.r(we),n.d(we,{getContent:()=>Rv,isSupported:()=>Fv});var Ce={};n.r(Ce),n.d(Ce,{SharingAPIMessages:()=>Nv,history:()=>we,isSupported:()=>_v,shareWebContent:()=>xv});var ye={};n.r(ye),n.d(ye,{close:()=>Bv,isSupported:()=>jv});var Se={};n.r(Se),n.d(Se,{StageViewOpenMode:()=>zv,isSupported:()=>qv,open:()=>$v,self:()=>ye});var be={};n.r(be),n.d(be,{captureImages:()=>Qv,isSupported:()=>Xv,retrieveImages:()=>Zv});var Ae={};n.r(Ae),n.d(Ae,{CameraRestriction:()=>rw,Source:()=>ow,hasPermission:()=>iw,image:()=>be,requestPermission:()=>aw});var Ee={};n.r(Ee),n.d(Ee,{isSupported:()=>pw,isWebStorageClearedOnUserLogOut:()=>dw});var Ie={};n.r(Ie),n.d(Ie,{CallModalities:()=>hw,isSupported:()=>vw,startCall:()=>mw});var Pe={};n.r(Pe),n.d(Pe,{ExpectedFailureReason:()=>Eo,FailedReason:()=>Ao,Messages:()=>bo,notifyAppLoaded:()=>Cw,notifyExpectedFailure:()=>bw,notifyFailure:()=>Sw,notifySuccess:()=>yw});var Te={};n.r(Te),n.d(Te,{getDragAndDropFiles:()=>Fw,isSupported:()=>Mw});var Oe={};n.r(Oe),n.d(Oe,{getSettings:()=>sC,registerOnRemoveHandler:()=>lC,registerOnSaveHandler:()=>uC,setSettings:()=>cC,setValidityState:()=>aC});var Re={};n.r(Re),n.d(Re,{getDefaultSizeIfNotProvided:()=>wC,startTask:()=>pC,submitTask:()=>hC,updateTask:()=>gC});var Fe={};n.r(Fe),n.d(Fe,{ContainerState:()=>SC,LiveShareHost:()=>AC,UserMeetingRole:()=>yC,isSupported:()=>bC});var ke={};n.r(ke),n.d(ke,{CartStatus:()=>_C,Intent:()=>HC,addOrUpdateCartItems:()=>BC,cartVersion:()=>LC,getCart:()=>VC,isSupported:()=>zC,removeCartItems:()=>jC,updateCartStatus:()=>WC});var Me,Ne,xe,De,Ue,Le,He,_e,Ve,Be,je={};function We(e){return void 0!==(null==e?void 0:e.errorCode)}n.r(je),n.d(je,{DISABLE_SHORTCUT_FORWARDING_ATTRIBUTE:()=>uy,enableShortcutRelayCapability:()=>sy,isSupported:()=>cy,resetIsShortcutRelayCapabilityEnabled:()=>ay,setOverridableShortcutHandler:()=>iy}),function(e){e.Inline="inline",e.Desktop="desktop",e.Web="web"}(Me||(Me={})),function(e){e.M365Content="m365content"}(Ne||(Ne={})),function(e){e.DriveId="driveId",e.GroupId="groupId",e.SiteId="siteId",e.UserId="userId"}(xe||(xe={})),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"}(De||(De={})),function(e){e.GeoLocation="geolocation",e.Media="media"}(Ue||(Ue={})),function(e){e.BCAIS="bcais",e.BCWAF="bcwaf",e.BCWBF="bcwbf"}(Le||(Le={})),function(e){e.Faculty="faculty",e.Student="student",e.Other="other"}(He||(He={})),function(e){e.Adult="adult",e.MinorNoParentalConsentRequired="minorNoParentalConsentRequired",e.MinorWithoutParentalConsent="minorWithoutParentalConsent",e.MinorWithParentalConsent="minorWithParentalConsent",e.NotAdult="notAdult",e.NonAdult="notAdult"}(_e||(_e={})),function(e){e.HigherEducation="higherEducation",e.K12="k12",e.Other="other"}(Ve||(Ve={})),function(e){e.TextPlain="text/plain",e.TextHtml="text/html",e.ImagePNG="image/png",e.ImageJPEG="image/jpeg"}(Be||(Be={}));const ze=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.office365.us","outlook-dod.office365.us","webmail.apps.mil","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","fa000000125.officeapps.live.com","fa000000129.officeapps.live.com","fa000000124.officeapps.live.com","fa000000128.officeapps.live.com"]}');const $e="2.0.1",qe="2.0.2",Ge="2.0.3",Je="2.0.4",Ke="2.0.1",Qe="1.9.0",Ze="2.0.0",Xe="1.7.0",Ye="1.8.0",et="1.9.0",tt=n.t(ze,2).validOrigins,nt=1500,rt=new URL("https://res.cdn.office.net/teams-js/validDomains/json/validDomains.json"),ot=/^https:\/\//,it="https",at="teams.microsoft.com",st="The library has not yet been initialized",ct="The runtime has not yet been initialized",ut="The runtime version is not supported",lt="The call was not properly started";var dt=n(933);const ft=gt,pt=2147483647;function gt(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 mt(e)}return ht(e,t,n)}function ht(e,t,n){if("string"==typeof e)return yt(e,t);if(ArrayBuffer.isView(e))return Tt(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(bt(e,ArrayBuffer)||e&&bt(e.buffer,ArrayBuffer))return Ot(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(bt(e,SharedArrayBuffer)||e&&bt(e.buffer,SharedArrayBuffer)))return Ot(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 gt.from(r,t,n);const o=Kt(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return gt.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 mt(e){return vt(e),wt(e<0?0:0|Ct(e))}function vt(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 wt(e){if(e>pt)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,gt.prototype),t}function Ct(e){if(e>=pt)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+pt.toString(16)+" bytes");return 0|e}function yt(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!gt.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|St(e,t);let r=wt(n);const o=r.write(e,t);return o!==n&&(r=r.slice(0,o)),r}function St(e,t){if(gt.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||bt(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 At(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Et(e).length;default:if(o)return r?-1:At(e).length;t=(""+t).toLowerCase(),o=!0}}function bt(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function At(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 Et(e){return dt.toByteArray(Pt(e))}gt.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}}(),gt.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required"),gt.from=function(e,t,n){return ht(e,t,n)},Object.setPrototypeOf(gt.prototype,Uint8Array.prototype),Object.setPrototypeOf(gt,Uint8Array),gt.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}},gt.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==gt.prototype};const It=/[^+/0-9A-Za-z-_]/g;function Pt(e){if((e=(e=e.split("=")[0]).trim().replace(It,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}function Tt(e){if(bt(e,Uint8Array)){const t=new Uint8Array(e);return Ot(t.buffer,t.byteOffset,t.byteLength)}return Rt(e)}function Ot(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,gt.prototype),r}function Rt(e){const t=e.length<0?0:0|Ct(e.length),n=wt(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function Ft(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 Nt(r)}function kt(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 xt(this,t,n);case"utf8":case"utf-8":return Ft(this,t,n);case"ascii":return Dt(this,t,n);case"latin1":case"binary":return Ut(this,t,n);case"base64":return Lt(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ht(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}gt.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?Ft(this,0,e):kt.apply(this,arguments)};const Mt=4096;function Nt(e){const t=e.length;if(t<=Mt)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=Mt));return n}function xt(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+=Jt[e[r]];return o}function Dt(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 Ut(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 Lt(e,t,n){return 0===t&&n===e.length?dt.fromByteArray(e):dt.fromByteArray(e.slice(t,n))}function Ht(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 _t(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(Gt(r))return a;e[n+a]=r}return a}function Vt(e,t,n,r){return qt(At(t,e.length-n),e,n,r)}function Bt(e,t,n,r){return qt(zt(t),e,n,r)}function jt(e,t,n,r){return qt(Et(t),e,n,r)}function Wt(e,t,n,r){return qt($t(t,e.length-n),e,n,r)}function zt(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}function $t(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 qt(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 Gt(e){return e!=e}gt.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 _t(this,e,t,n);case"utf8":case"utf-8":return Vt(this,e,t,n);case"ascii":case"latin1":case"binary":return Bt(this,e,t,n);case"base64":return jt(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Wt(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}};const Jt=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 Kt(e){if(gt.isBuffer(e)){const t=0|Ct(e.length),n=wt(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||Gt(e.length)?wt(0):Rt(e):"Buffer"===e.type&&Array.isArray(e.data)?Rt(e.data):void 0}const Qt={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Zt;const Xt=new Uint8Array(16);function Yt(){if(!Zt&&(Zt="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Zt))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Zt(Xt)}const en=[];for(let e=0;e<256;++e)en.push((e+256).toString(16).slice(1));function tn(e,t=0){return en[e[t+0]]+en[e[t+1]]+en[e[t+2]]+en[e[t+3]]+"-"+en[e[t+4]]+en[e[t+5]]+"-"+en[e[t+6]]+en[e[t+7]]+"-"+en[e[t+8]]+en[e[t+9]]+"-"+en[e[t+10]]+en[e[t+11]]+en[e[t+12]]+en[e[t+13]]+en[e[t+14]]+en[e[t+15]]}const nn=function(e,t,n){if(Qt.randomUUID&&!t&&!e)return Qt.randomUUID();const r=(e=e||{}).random||(e.rng||Yt)();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 tn(r)},rn=/^(?:[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 on=function(e){return"string"==typeof e&&rn.test(e)};var an,sn,cn,un,ln,dn,fn,pn;!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"}(an||(an={})),function(e){e.office="Office",e.outlook="Outlook",e.outlookWin32="OutlookWin32",e.orange="Orange",e.places="Places",e.teams="Teams",e.teamsModern="TeamsModern"}(sn||(sn={})),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"}(cn||(cn={})),function(e){e.copilotSidePanel="copilotSidePanel",e.copilotMainPane="copilotMainPane",e.copilotFullScreen="copilotFullScreen"}(un||(un={})),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"}(ln||(ln={})),function(e){e[e.Admin=0]="Admin",e[e.User=1]="User",e[e.Guest=2]="Guest"}(dn||(dn={})),function(e){e.Large="large",e.Medium="medium",e.Small="small"}(fn||(fn={})),function(e){e.Regular="Regular",e.Private="Private",e.Shared="Shared"}(pn||(pn={}));const gn={errorCode:De.NOT_SUPPORTED_ON_PLATFORM},hn={majorVersion:1,minorVersion:5},mn={adaptiveCardSchemaVersion:{majorVersion:1,minorVersion:5}},vn=new Error("Invalid input count: Must supply a valid image count (limit of 10)."),wn=new Error("Invalid response: Received more images than the specified max limit in the response.");function Cn(e){return(t,n)=>{if(!t)throw new Error(e||n)}}function yn(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 Sn(){return nn()}function bn(e){return Object.keys(e).forEach((t=>{null!==e[t]&&void 0!==e[t]&&"object"==typeof e[t]&&bn(e[t])})),Object.freeze(e)}function An(e,t,...n){const r=e(...n);return r.then((e=>{t&&t(void 0,e)})).catch((e=>{t&&t(e)})),r}function En(e,t,...n){const r=e(...n);return r.then((()=>{t&&t(null)})).catch((e=>{t&&t(e)})),r}function In(e,t,...n){const r=e(...n);return r.then((e=>{t&&t(null,e)})).catch((e=>{t&&t(e,null)})),r}function Pn(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 Tn(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 On(e){return!(yn(`${e.majorVersion}.${e.minorVersion}`,`${hn.majorVersion}.${hn.minorVersion}`)>=0)}function Rn(e){return"https:"===e.protocol}function Fn(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=ft.from(t,"base64").toString();n(new Blob([o],{type:e}))}))}function kn(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 Mn(){if(Nn())throw new Error("window object undefined at SSR check");return window}function Nn(){return"undefined"==typeof window}function xn(e,t){if(Ln(e)||!Hn(e)||!_n(e))throw t||new Error("id is not valid.")}function Dn(e,t){const n=e.toString().toLocaleLowerCase();if(Ln(n))throw t||new Error("Invalid Url");if(n.length>2048)throw t||new Error("Url exceeds the maximum size of 2048 characters");if(!Rn(e))throw t||new Error("Url should be a valid https url")}function Un(e){const t=document.createElement("a");return t.href=e,new URL(t.href)}function Ln(e){return new RegExp(`${/<script[^>]*>|<script[^&]*>|%3Cscript[^%]*%3E/gi.source}|${/<\/script[^>]*>|<\/script[^&]*>|%3C\/script[^%]*%3E/gi.source}`,"gi").test(e)}function Hn(e){return e.length<256&&e.length>4}function _n(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n<32||n>126)return!1}return!0}function Vn(e){if(!e)throw new Error("id must not be empty");if(!1===on(e))throw new Error("id must be a valid UUID")}const Bn=!!performance&&"now"in performance;function jn(){return Bn?performance.now()+performance.timeOrigin:void 0}function Wn(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=>Wn(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=>Wn(e[n],t+1)))}function zn(e){var t,n;if(!(null===(n=null===(t=e.hostVersionsInfo)||void 0===t?void 0:t.appEligibilityInformation)||void 0===n?void 0:n.ageGroup))return e;const r=e.hostVersionsInfo.appEligibilityInformation.ageGroup;return"nonadult"!==(null==r?void 0:r.toLowerCase())?e:Object.assign(Object.assign({},e),{hostVersionsInfo:Object.assign(Object.assign({},e.hostVersionsInfo),{appEligibilityInformation:Object.assign(Object.assign({},e.hostVersionsInfo.appEligibilityInformation),{ageGroup:_e.NotAdult})})})}class $n{constructor(e=Sn()){this.uuid=e,Vn(e)}toString(){return this.uuid}serialize(){return this.toString()}}function qn(e){if(!(e instanceof $n))throw new Error(`Potential id (${JSON.stringify(e)}) is invalid; it is not an instance of UUID class.`)}class Gn{}Gn.initializeCalled=!1,Gn.initializeCompleted=!1,Gn.additionalValidOrigins=[],Gn.initializePromise=void 0,Gn.isFramelessWindow=!1,Gn.frameContext=void 0,Gn.hostClientType=void 0,Gn.printCapabilityEnabled=!1,Gn.teamsJsInstanceId=(new $n).toString();var Jn=n(815);const Kn=new $n,Qn=Jn.debug.formatArgs;Jn.debug.formatArgs=function(e){e[0]=`(${(new Date).toISOString()}): ${e[0]} [${Kn.toString()}]`,Qn.call(this,e)};const Zn=(0,Jn.debug)("teamsJs");function Xn(e){return Zn.extend(e)}function Yn(e,t){return`${e}_${t}`}function er(e){return/^v\d+_[\w.]+$/.test(e)}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 nr=Xn("runtime"),rr=4;function or(e){return e.apiVersion===rr}const ir={apiVersion:-1,supports:{}};function ar(e){if(or(e))return!0;throw-1===e.apiVersion?new Error(ct):new Error(ut)}let sr=ir;const cr={apiVersion:4,isNAAChannelRecommended:!1,isDeeplyNestedAuthSupported:!1,hostVersionsInfo:mn,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:{}}}},ur=[an.desktop,an.web,an.rigel,an.surfaceHub,an.teamsRoomsWindows,an.teamsRoomsAndroid,an.teamsPhones,an.teamsDisplays],lr=[an.android,an.ios,an.ipados,an.visionOS],dr=[...ur,...lr];function fr(e){let t=e;if(t.apiVersion<rr&&pr.forEach((e=>{t.apiVersion===e.versionToUpgradeFrom&&(t=e.upgradeToNextVersion(t))})),or(t))return t;throw new Error("Received a runtime that could not be upgraded to the latest version")}const pr=[{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=tr(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})}}}],gr="2.1.2",hr={"1.0.0":[{capability:{pages:{appButton:{},tabs:{}},stageView:{}},hostClientTypes:ur}],"1.9.0":[{capability:{location:{}},hostClientTypes:dr}],"2.0.0":[{capability:{people:{}},hostClientTypes:dr},{capability:{sharing:{}},hostClientTypes:[an.desktop,an.web]}],"2.0.1":[{capability:{teams:{fullTrust:{joinedTeams:{}}}},hostClientTypes:[an.android,an.desktop,an.ios,an.teamsRoomsAndroid,an.teamsPhones,an.teamsDisplays,an.web]},{capability:{webStorage:{}},hostClientTypes:[an.desktop]}],"2.0.5":[{capability:{webStorage:{}},hostClientTypes:[an.android,an.ios]}],"2.0.8":[{capability:{sharing:{}},hostClientTypes:[an.android,an.ios]}],"2.1.1":[{capability:{nestedAppAuth:{}},hostClientTypes:[an.android,an.ios,an.ipados,an.visionOS]}],"2.1.2":[]},mr=nr.extend("generateBackCompatRuntimeConfig");function vr(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]=vr(e[r]||{},t[r]));return n}function wr(e,t,n){mr("generating back compat runtime config for %s",e);let r=Object.assign({},t.supports);mr("Supported capabilities in config before updating based on highestSupportedVersion: %o",r),Object.keys(n).forEach((t=>{yn(e,t)>=0&&n[t].forEach((e=>{void 0!==Gn.hostClientType&&e.hostClientTypes.includes(Gn.hostClientType)&&(r=vr(r,e.capability))}))}));const o={apiVersion:rr,hostVersionsInfo:mn,isLegacyTeams:!0,supports:r};return mr("Runtime config after updating based on highestSupportedVersion: %o",o),o}const Cr=nr.extend("applyRuntimeConfig");function yr(e){"string"==typeof e.apiVersion&&(Cr("Trying to apply runtime with string apiVersion, processing as v1: %o",e),e=Object.assign(Object.assign({},e),{apiVersion:1})),Cr("Fast-forwarding runtime %o",e);const t=fr(e);Cr("Applying runtime %o",t),sr=bn(t)}function Sr(e){return null!=e&&void 0!==e.serialize&&"function"==typeof e.serialize}const br="2.45.0",Ar={childProxyingCommunication:!1};function Er(){Ar.childProxyingCommunication=!0}function Ir(){return Ar.childProxyingCommunication}let Pr={disableEnforceOriginMatchForChildResponses:!1};function Tr(){return Pr}function Or(e){Pr=e}function Rr(e){return Or(Object.assign(Object.assign({},Pr),e)),Tr()}var Fr=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 kr=e=>{const{uuid:t}=e,n=Fr(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})},Mr=e=>{const{uuidAsString:t}=e,n=Fr(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new $n(t):void 0})},Nr=e=>{const{uuidAsString:t}=e,n=Fr(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new $n(t):void 0})},xr=e=>{const{uuid:t}=e,n=Fr(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})};function Dr(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 Ur=Xn("flushMessageQueue");function Lr(e,t,n,r){if(e&&t&&0!==n.length)for(;n.length>0;){const o=n.shift();if(o){const n=kr(o);Ur("Flushing message %s from %s message queue via postMessage.",Dr(n),r),e.postMessage(n,t)}}}const Hr=Xn("internal"),_r=Hr.extend("ensureInitializeCalled"),Vr=Hr.extend("ensureInitialized");function Br(){if(!Gn.initializeCalled)throw _r(st),new Error(st)}function jr(e,...t){if(!Gn.initializeCompleted)throw Vr("%s. initializeCalled: %s",st,Gn.initializeCalled.toString()),new Error(st);if(t&&t.length>0){let e=!1;for(let n=0;n<t.length;n++)if(t[n]===Gn.frameContext){e=!0;break}if(!e)throw new Error(`This call is only allowed in following contexts: ${JSON.stringify(t)}. Current context: "${Gn.frameContext}".`)}return ar(e)}function Wr(e=$e){const t=yn(Gn.clientSupportedSDKVersion,e);return!isNaN(t)&&t>=0}function zr(){return Gn.hostClientType==an.android||Gn.hostClientType==an.ios||Gn.hostClientType==an.ipados||Gn.hostClientType==an.visionOS}function $r(e=$e){if(!zr()){throw{errorCode:De.NOT_SUPPORTED_ON_PLATFORM}}if(!Wr(e)){throw{errorCode:De.OLD_PLATFORM}}}function qr(e){let t=Gn.additionalValidOrigins.concat(e.filter((e=>"string"==typeof e&&ot.test(e))));const n={};t=t.filter((e=>!n[e]&&(n[e]=!0,!0))),Gn.additionalValidOrigins=t}function Gr(e){if(!Zr(e))throw new Error(`Potential app id (${e}) is invalid; its length ${e.length} is not within the length limits (${Kr}-${Qr}).`)}function Jr(e){if(Ln(e))throw new Error(`Potential app id (${e}) is invalid; it contains script tags.`);if(Xr(e))throw new Error(`Potential app id (${e}) is invalid; it contains non-printable characters.`)}const Kr=4,Qr=256;function Zr(e){return e.length<Qr&&e.length>Kr}function Xr(e){return[...e].some((e=>{const t=e.charCodeAt(0);return t<32||t>126}))}function Yr(e){if(!(e instanceof to))throw new Error(`Potential app id (${e}) is invalid; it is not an instance of AppId class.`)}class eo{constructor(e){this.idAsString=e,Jr(e)}serialize(){return this.toString()}toString(){return this.idAsString}}class to extends eo{constructor(e){super(e),Gr(e)}toJSON(){return{appIdAsString:this.toString()}}}function no(e){return null==e}var ro=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 oo;const io="v1",ao=Xn("messageChannels.telemetry");function so(){return ro(this,void 0,void 0,(function*(){if(oo)return ao("Returning telemetry port from cache"),oo;if(!co())throw gn;return oo=yield mc(Yn(io,"messageChannels.telemetry.getTelemetryPort"),"messageChannels.telemetry.getTelemetryPort"),oo}))}function co(){var e;return!(!jr(sr)||!(null===(e=sr.supports.messageChannels)||void 0===e?void 0:e.telemetry))}function uo(){oo=void 0}var lo=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 fo;const po="v1",go=Xn("messageChannels.dataLayer");function ho(){return lo(this,void 0,void 0,(function*(){if(fo)return go("Returning dataLayer port from cache"),fo;if(!mo())throw gn;return fo=yield mc(Yn(po,"messageChannels.dataLayer.getDataLayerPort"),"messageChannels.dataLayer.getDataLayerPort"),fo}))}function mo(){var e;return!(!jr(sr)||!(null===(e=sr.supports.messageChannels)||void 0===e?void 0:e.dataLayer))}function vo(){fo=void 0}function wo(e){if(!e)throw new Error("[app.lifecycle.registerBeforeSuspendOrTerminateHandler] Handler cannot be null");jr(sr),Ns(e)}function Co(e){if(!e)throw new Error("[app.lifecycle.registerOnResumeHandler] Handler cannot be null");jr(sr),xs(e)}const yo="v2",So=Xn("app"),bo={AppLoaded:"appInitialization.appLoaded",Success:"appInitialization.success",Failure:"appInitialization.failure",ExpectedFailure:"appInitialization.expectedFailure"};var Ao,Eo;function Io(){return Gn.initializeCompleted}function Po(){return Gn.frameContext}function To(e){return Ki(Yn(yo,"app.initialize"),e)}function Oo(e){oc.currentWindow=e}function Ro(){Gn.initializeCalled&&(vs(),Gn.initializeCalled=!1,Gn.initializeCompleted=!1,Gn.initializePromise=void 0,Gn.additionalValidOrigins=[],Gn.frameContext=void 0,Gn.hostClientType=void 0,Gn.isFramelessWindow=!1,uo(),vo(),sc())}function Fo(){return new Promise((e=>{Br(),e(cc(Yn(yo,"app.getContext"),"getContext"))})).then((e=>Ho(e)))}function ko(){Br(),Qi(Yn(yo,"app.notifyAppLoaded"))}function Mo(){return Yi(Yn(yo,"app.notifySuccess"))}function No(e){Br(),Xi(Yn(yo,"app.notifyFailure"),e)}function xo(e){Br(),Zi(Yn(yo,"app.notifyExpectedFailure"),e)}function Do(e){oa(Yn(yo,"app.registerOnThemeChangeHandler"),e)}function Uo(e){Ps(e)}function Lo(e){return ia(Yn(yo,"app.openLink"),e)}function Ho(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,messageId:e.messageId,parentMessageId:e.parentMessageId,userClickTime:e.userClickTime,userClickTimeV2:e.userClickTimeV2,userFileOpenPreference:e.userFileOpenPreference,host:{name:e.hostName?e.hostName:sn.teams,clientType:e.hostClientType?e.hostClientType:an.web,sessionId:e.sessionId?e.sessionId:"",ringId:e.ringId},appLaunchId:e.appLaunchId,appId:e.appId?new to(e.appId):void 0,manifestVersion:e.manifestVersion},page:{id:e.entityId,frameContext:e.frameContext?e.frameContext:Gn.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 _o(e){ei(Yn(Xo,"dialog.update.resize"),e)}function Vo(){return!(!jr(sr)||!sr.supports.dialog)&&!!sr.supports.dialog.update}function Bo(e,t,n){ni(Yn(Xo,"dialog.url.bot.open"),e,t,n)}function jo(){return jr(sr)&&void 0!==(sr.supports.dialog&&sr.supports.dialog.url&&sr.supports.dialog.url.bot)}function Wo(e){if(jr(sr,cn.task),!qo())throw gn;Cc(Yn(Xo,"dialog.url.parentCommunication.sendMessageToParentFromDialog"),"messageForParent",[e])}function zo(e){if(jr(sr,cn.content,cn.sidePanel,cn.meetingStage),!qo())throw gn;Cc(Yn(Xo,"dialog.url.parentCommunication.sendMessageToDialog"),"messageForChild",[e])}function $o(e){if(jr(sr,cn.task),!qo())throw gn;for(Ss("messageForChild"),ys(Yn(Xo,"dialog.url.parentCommunication.registerMessageForChildHandler"),"messageForChild",e),ai.reverse();ai.length>0;){e(ai.pop())}}function qo(){var e,t;return jr(sr)&&!!(null===(t=null===(e=sr.supports.dialog)||void 0===e?void 0:e.url)||void 0===t?void 0:t.parentCommunication)}function Go(e,t,n){ti(Yn(Xo,"dialog.url.open"),e,t,n)}function Jo(e,t){ri(Yn(Xo,"dialog.url.submit"),e,t)}function Ko(){return jr(sr)&&void 0!==(sr.supports.dialog&&sr.supports.dialog.url)}function Qo(e){return{url:e.url,height:e.size?e.size.height:fn.Small,width:e.size?e.size.width:fn.Small,title:e.title,fallbackUrl:e.fallbackUrl}}function Zo(e){const t=Qo(e);return t.completionBotId=e.completionBotId,t}!function(e){e.AuthFailed="AuthFailed",e.Timeout="Timeout",e.Other="Other"}(Ao||(Ao={})),function(e){e.PermissionError="PermissionError",e.NotFound="NotFound",e.Throttling="Throttling",e.Offline="Offline",e.Other="Other"}(Eo||(Eo={})),So("teamsjs instance is version %s, starting at %s UTC (%s local)",br,(new Date).toISOString(),(new Date).toLocaleString()),function(){if(Nn())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?So("teamsjs is being used from %s. %s",t,n):So("teamsjs is being used from a script tag embedded directly in your html. %s",n)}();const Xo="v2",Yo="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 ei(e,t){if(jr(sr,cn.content,cn.sidePanel,cn.task,cn.meetingStage),!Vo())throw gn;Cc(e,"tasks.updateTask",[t])}function ti(e,t,n,r){if(jr(sr,cn.content,cn.sidePanel,cn.meetingStage),!Ko())throw gn;r&&ys(Yn(Xo,"dialog.url.registerMessageForParentHandler"),"messageForParent",r);Cc(e,"tasks.startTask",[Qo(t)],((e,t)=>{null==n||n({err:e,result:t}),Ss("messageForParent")}))}function ni(e,t,n,r){if(jr(sr,cn.content,cn.sidePanel,cn.meetingStage),!jo())throw gn;r&&ys(Yn(Xo,"dialog.url.bot.registerMessageForParentHandler"),"messageForParent",r);Cc(e,"tasks.startTask",[Zo(t)],((e,t)=>{null==n||n({err:e,result:t}),Ss("messageForParent")}))}function ri(e,t,n){if(jr(sr,cn.content,cn.task),!Ko())throw gn;Gn.frameContext===cn.content&&console.warn(Yo),Cc(e,"tasks.completeTask",[t,n?Array.isArray(n)?n:[n]:[]])}function oi(e){return{card:e.card,height:e.size?e.size.height:fn.Small,width:e.size?e.size.width:fn.Small,title:e.title}}function ii(e){const t=oi(e);return t.completionBotId=e.completionBotId,t}const ai=[];function si(e){Gn.frameContext&&(Gn.frameContext===cn.task?ai.push(e):Ss("messageForChild"))}function ci(e,t){if(jr(sr,cn.content,cn.sidePanel,cn.meetingStage),!ui())throw gn;const n=ii(e);Cc(Yn(Xo,"dialog.adaptiveCard.bot.open"),"tasks.startTask",[n],((e,n)=>{null==t||t({err:e,result:n})}))}function ui(){const e=sr.hostVersionsInfo&&sr.hostVersionsInfo.adaptiveCardSchemaVersion&&!On(sr.hostVersionsInfo.adaptiveCardSchemaVersion);return jr(sr)&&void 0!==(e&&sr.supports.dialog&&sr.supports.dialog.card&&sr.supports.dialog.card.bot)}function li(e,t){if(jr(sr,cn.content,cn.sidePanel,cn.meetingStage),!di())throw gn;const n=oi(e);Cc(Yn(Xo,"dialog.adaptiveCard.open"),"tasks.startTask",[n],((e,n)=>{null==t||t({err:e,result:n})}))}function di(){const e=sr.hostVersionsInfo&&sr.hostVersionsInfo.adaptiveCardSchemaVersion&&!On(sr.hostVersionsInfo.adaptiveCardSchemaVersion);return jr(sr)&&void 0!==(e&&sr.supports.dialog&&sr.supports.dialog.card)}function fi(){ys(Yn(Xo,"dialog.registerMessageForChildHandler"),"messageForChild",si,!1)}function pi(){return!(!jr(sr)||!sr.supports.dialog)}const gi="v2";var hi,mi;!function(e){e[e.ifRoom=0]="ifRoom",e[e.overflowOnly=1]="overflowOnly"}(hi||(hi={}));class vi{constructor(){this.enabled=!0,this.selected=!1}}let wi,Ci,yi,Si,bi;function Ai(){ys(Yn(gi,"menus.registerNavBarMenuItemPressHandler"),"navBarMenuItemPress",Ti,!1),ys(Yn(gi,"menus.registerActionMenuItemPressHandler"),"actionMenuItemPress",Ri,!1),ys(Yn(gi,"menus.registerSetModuleViewHandler"),"setModuleView",Ii,!1)}function Ei(e,t){if(jr(sr),!Fi())throw gn;yi=t,Cc(Yn(gi,"menus.setUpViews"),"setUpViews",[e])}function Ii(e){yi&&yi(e)||(jr(sr),Cc(Yn(gi,"menus.handleViewConfigItemPress"),"viewConfigItemPress",[e]))}function Pi(e,t){if(jr(sr),!Fi())throw gn;wi=t,Cc(Yn(gi,"menus.setNavBarMenu"),"setNavBarMenu",[e])}function Ti(e){wi&&wi(e)||(jr(sr),Cc(Yn(gi,"menus.handleNavBarMenuItemPress"),"handleNavBarMenuItemPress",[e]))}function Oi(e,t){if(jr(sr),!Fi())throw gn;Ci=t,Cc(Yn(gi,"menus.showActionMenu"),"showActionMenu",[e])}function Ri(e){Ci&&Ci(e)||(jr(sr),Cc(Yn(gi,"menus.handleActionMenuItemPress"),"handleActionMenuItemPress",[e]))}function Fi(){return!(!jr(sr)||!sr.supports.menus)}function ki(){ys(Yn(Ja,"pages.config.registerSettingsSaveHandler"),"settings.save",Hi,!1),ys(Yn(Ja,"pages.config.registerSettingsRemoveHandler"),"settings.remove",Bi,!1)}function Mi(e){return rs(Yn(Ja,"pages.config.setValidityState"),e)}function Ni(e){return is(Yn(Ja,"pages.config.setConfig"),e)}function xi(e){Di(Yn(Ja,"pages.config.registerOnSaveHandler"),e,(()=>{if(!no(e)&&!Wi())throw gn}))}function Di(e,t,n){!no(t)&&jr(sr,cn.settings),n&&n(),Si=t,!no(t)&&Cc(e,"registerHandler",["save"])}function Ui(e){Li(Yn(Ja,"pages.config.registerOnRemoveHandler"),e,(()=>{if(!no(e)&&!Wi())throw gn}))}function Li(e,t,n){!no(t)&&jr(sr,cn.remove,cn.settings),n&&n(),bi=t,!no(t)&&Cc(e,"registerHandler",["remove"])}function Hi(e){const t=new Vi(e);Si?Si(t):_s()?qs("settings.save",[e]):t.notifySuccess()}function _i(e){As(Yn(Ja,"pages.config.registerChangeConfigHandler"),"changeSettings",e,[cn.content],(()=>{if(!Wi())throw gn}))}!function(e){e.dropDown="dropDown",e.popOver="popOver"}(mi||(mi={}));class Vi{constructor(e){this.notified=!1,this.result=e||{}}notifySuccess(){this.ensureNotNotified(),Cc(Yn(Ja,"pages.saveEvent.notifySuccess"),"settings.save.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),Cc(Yn(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 Bi(){const e=new ji;bi?bi(e):_s()?qs("settings.remove",[]):e.notifySuccess()}class ji{constructor(){this.notified=!1}notifySuccess(){this.ensureNotNotified(),Cc(Yn(Ja,"pages.removeEvent.notifySuccess"),"settings.remove.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),Cc(Yn(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 Wi(){return!(!jr(sr)||!sr.supports.pages)&&!!sr.supports.pages.config}class zi{}class $i extends zi{validate(e){return!0}deserialize(e){return e}}var qi=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 Gi=6e4,Ji=Xn("app");function Ki(e,t){if(Nn()){return Ji.extend("initialize")("window object undefined at initialization"),Promise.resolve()}return Pn((()=>ra(e,t)),Gi,new Error("SDK initialization timed out."))}function Qi(e){Cc(e,bo.AppLoaded,[br])}function Zi(e,t){Cc(e,bo.ExpectedFailure,[t.reason,t.message])}function Xi(e,t){Cc(e,bo.Failure,[t.reason,t.message])}function Yi(e){return qi(this,void 0,void 0,(function*(){if(Gn.initializeCompleted)return ta(e);if(!Gn.initializePromise)throw new Error(st);return Gn.initializePromise.then((()=>ta(e)))}))}function ea(){var e;return jr(sr)&&!!(null===(e=sr.supports.app)||void 0===e?void 0:e.notifySuccessResponse)}function ta(e){return qi(this,void 0,void 0,(function*(){return ea()?gc(bo.Success,[br],new $i,e).then((()=>({hasFinishedSuccessfully:!0}))):(Cc(e,bo.Success,[br]),{hasFinishedSuccessfully:"unknown"})}))}const na=Ji.extend("initializeHelper");function ra(e,t){return new Promise((n=>{Gn.initializeCalled||(Gn.initializeCalled=!0,ms(),Gn.initializePromise=ac(t,e).then((({context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r=$e})=>{Gn.frameContext=e,Gn.hostClientType=t,Gn.clientSupportedSDKVersion=r;try{na("Parsing %s",n);let e=JSON.parse(n);if(na("Checking if %o is a valid runtime object",null!=e?e:"null"),!e||!e.apiVersion)throw new Error("Received runtime config is invalid");e=zn(e),n&&yr(e)}catch(e){if(!(e instanceof SyntaxError))throw e;try{na("Attempting to parse %s as an SDK version",n),isNaN(yn(n,$e))||(Gn.clientSupportedSDKVersion=n);let e=JSON.parse(r);if(na("givenRuntimeConfig parsed to %o",null!=e?e:"null"),!e)throw new Error("givenRuntimeConfig string was successfully parsed. However, it parsed to value of null");e=zn(e),yr(e)}catch(e){if(!(e instanceof SyntaxError))throw e;yr(wr(Gn.clientSupportedSDKVersion,cr,hr))}}Gn.initializeCompleted=!0})),Ai(),ki(),fi()),Array.isArray(t)&&qr(t),void 0!==Gn.initializePromise?n(Gn.initializePromise):na("GlobalVars.initializePromise is unexpectedly undefined")}))}function oa(e,t){!no(t)&&Br(),Es(e,t)}function ia(e,t){return new Promise((n=>{jr(sr,cn.content,cn.sidePanel,cn.settings,cn.task,cn.stage,cn.meetingStage),n(uc(e,"executeDeepLink",t))}))}var aa=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 sa=[];const ca=Xn("validateOrigin");let ua;function la(){return aa(this,void 0,void 0,(function*(){ua||(yield fa())}))}function da(){return 0===sa.length}function fa(e=!1){return aa(this,void 0,void 0,(function*(){if(!da()&&!e)return sa;if(ua)return ua;if(Nn())return sa=tt,tt;{ca("Initiating fetch call to acquire valid origins list from CDN");const e=new AbortController,t=setTimeout((()=>e.abort()),nt);return ua=fetch(rt,{signal:e.signal}).then((e=>{if(clearTimeout(t),!e.ok)throw new Error("Invalid Response from Fetch Call");return ca("Fetch call completed and retrieved valid origins list from CDN"),e.json().then((e=>{if(pa(JSON.stringify(e)))return sa=e.validOrigins,sa;throw new Error("Valid origins list retrieved from CDN is invalid")}))})).catch((e=>("AbortError"===e.name?ca(`validOrigins fetch call to CDN failed due to Timeout of ${nt} ms. Defaulting to fallback list`):ca("validOrigins fetch call to CDN failed with error: %s. Defaulting to fallback list",e),sa=tt,sa))),ua}}))}function pa(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 ca("isValidOriginsFromCDN call failed to validate origin: %s",e),!1}return!0}function ga(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 ha(e,t){const n=t||da()?tt:sa;return ma(e,n)?Promise.resolve(!0):(ca("Origin %s is not in the local valid origins list, fetching from CDN",e),fa(t).then((t=>ma(e,t))))}function ma(e,t){if(!Rn(e))return ca("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=>ga(e,n))))return!0;for(const e of Gn.additionalValidOrigins){if(ga("https://"===e.substring(0,8)?e.substring(8):e,n))return!0}return ca("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,Gn.additionalValidOrigins),!1}function va(e){As(Yn(Ja,"pages.appButton.onClick"),"appButtonClick",e,[cn.content],(()=>{if(!ya())throw gn}))}function wa(e){As(Yn(Ja,"pages.appButton.onHoverEnter"),"appButtonHoverEnter",e,[cn.content],(()=>{if(!ya())throw gn}))}function Ca(e){As(Yn(Ja,"pages.appButton.onHoverLeave"),"appButtonHoverLeave",e,[cn.content],(()=>{if(!ya())throw gn}))}function ya(){return!(!jr(sr)||!sr.supports.pages)&&!!sr.supports.pages.appButton}function Sa(){ds()}function ba(){return Qa(Yn(Ja,"pages.backStack.navigateBack"))}function Aa(e){Ea(Yn(Ja,"pages.backStack.registerBackButtonHandler"),e,(()=>{if(!no(e)&&!Ia())throw gn}))}function Ea(e,t,n){!no(t)&&jr(sr),n&&n(),ls(t),!no(t)&&Cc(e,"registerHandler",["backButton"])}function Ia(){return!(!jr(sr)||!sr.supports.pages)&&!!sr.supports.pages.backStack}function Pa(e){return new Promise((t=>{if(jr(sr,cn.content,cn.sidePanel,cn.settings,cn.task,cn.stage,cn.meetingStage),!Oa())throw gn;t(dc(Yn(Ja,"pages.currentApp.navigateTo"),"pages.currentApp.navigateTo",e))}))}function Ta(){return new Promise((e=>{if(jr(sr,cn.content,cn.sidePanel,cn.settings,cn.task,cn.stage,cn.meetingStage),!Oa())throw gn;e(dc(Yn(Ja,"pages.currentApp.navigateToDefaultPage"),"pages.currentApp.navigateToDefaultPage"))}))}function Oa(){return!(!jr(sr)||!sr.supports.pages)&&!!sr.supports.pages.currentApp}function Ra(){if(jr(sr,cn.content),!ka())throw gn;Cc(Yn(Ja,"pages.fullTrust.enterFullscreen"),"enterFullscreen",[])}function Fa(){if(jr(sr,cn.content),!ka())throw gn;Cc(Yn(Ja,"pages.fullTrust.exitFullscreen"),"exitFullscreen",[])}function ka(){return!(!jr(sr)||!sr.supports.pages)&&!!sr.supports.pages.fullTrust}function Ma(e){return Za(Yn(Ja,"pages.tabs.navigateToTab"),e)}function Na(e){return Ya(Yn(Ja,"pages.tabs.getTabInstances"),e)}function xa(e){return es(Yn(Ja,"pages.tabs.getMruTabInstances"),e)}function Da(){return!(!jr(sr)||!sr.supports.pages)&&!!sr.supports.pages.tabs}var Ua,La;function Ha(e){const t=Yn(Ja,"pages.returnFocus");if(jr(sr),!Ga())throw gn;if(void 0===e&&Cc(t,"returnFocus",[!1]),"boolean"==typeof e)Cc(t,"returnFocus",[e]);else switch(e){case La.PreviousLandmark:case La.GoToActivityFeed:Cc(t,"returnFocus",[!1,e]);break;case La.NextLandmark:Cc(t,"returnFocus",[!0,e])}}function _a(e){As(Yn(Ja,"pages.registerFocusEnterHandler"),"focusEnter",e,[],(()=>{if(!Ga())throw gn}))}function Va(e){ns(Yn(Ja,"pages.setCurrentFrame"),e)}function Ba(e,t,n){la(),Ki(Yn(Ja,"pages.initializeWithFrameContext"),n).then((()=>t&&t())),Va(e)}function ja(){return os(Yn(Ja,"pages.getConfig."))}function Wa(e){return Ka(Yn(Ja,"pages.navigateCrossDomain"),e)}function za(e){return new Promise((t=>{if(jr(sr,cn.content,cn.sidePanel,cn.settings,cn.task,cn.stage,cn.meetingStage),!Ga())throw gn;const n=Yn(Ja,"pages.navigateToApp");if(sr.isLegacyTeams){t(uc(n,"executeDeepLink",Tn(as(e)?e:ss(e))))}else{t(uc(n,"pages.navigateToApp",as(e)?cs(e):e))}}))}function $a(e){return ts(Yn(Ja,"pages.shareDeepLink"),e)}function qa(e){As(Yn(Ja,"pages.registerFullScreenHandler"),"fullScreenChange",e,[],(()=>{if(!no(e)&&!Ga())throw gn}))}function Ga(){return!(!jr(sr)||!sr.supports.pages)}la(),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.Read=2]="Read",e[e.Compose=3]="Compose"}(Ua||(Ua={})),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.GoToActivityFeed=2]="GoToActivityFeed"}(La||(La={}));const Ja="v2";function Ka(e,t){return new Promise((n=>{if(jr(sr,cn.content,cn.sidePanel,cn.settings,cn.remove,cn.task,cn.stage,cn.meetingStage),!Ga())throw gn;n(lc(e,"navigateCrossDomain","Cross-origin navigation is only supported for URLs matching the pattern registered in the manifest.",t))}))}function Qa(e){return new Promise((t=>{if(jr(sr),!Ia())throw gn;t(lc(e,"navigateBack","Back navigation is not supported in the current client or context."))}))}function Za(e,t){return new Promise((n=>{if(jr(sr),!Da())throw gn;n(lc(e,"navigateToTab","Invalid internalTabInstanceId and/or channelId were/was provided",t))}))}function Xa(e,t){if(jr(sr),!Ga())throw gn;Cc(e,"returnFocus",[t])}function Ya(e,t){return new Promise((n=>{if(jr(sr),!Da())throw gn;n(cc(e,"getTabInstances",t))}))}function es(e,t){return new Promise((n=>{if(jr(sr),!Da())throw gn;n(cc(e,"getMruTabInstances",t))}))}function ts(e,t){if(jr(sr,cn.content,cn.sidePanel,cn.meetingStage),!Ga())throw gn;Cc(e,"shareDeepLink",[t.subPageId,t.subPageLabel,t.subPageWebUrl])}function ns(e,t){if(jr(sr,cn.content),!Ga())throw gn;Cc(e,"setFrameContext",[t])}function rs(e,t){if(jr(sr,cn.settings,cn.remove),!Wi())throw gn;Cc(e,"settings.setValidityState",[t])}function os(e){return new Promise((t=>{if(jr(sr,cn.content,cn.settings,cn.remove,cn.sidePanel),!Ga())throw gn;t(cc(e,"settings.getSettings"))}))}function is(e,t){return new Promise((n=>{if(jr(sr,cn.content,cn.settings,cn.sidePanel),!Wi())throw gn;n(uc(e,"settings.setSettings",t))}))}function as(e){return e.appId instanceof to}function ss(e){return Object.assign(Object.assign({},e),{appId:new to(e.appId),webUrl:e.webUrl?new URL(e.webUrl):void 0})}function cs(e){return Object.assign(Object.assign({},e),{appId:e.appId.toString(),webUrl:e.webUrl?e.webUrl.toString():void 0})}let us;function ls(e){us=e}function ds(){ys(Yn(Ja,"pages.backStack.registerBackButtonPressHandler"),"backButtonPress",fs,!1)}function fs(){us&&us()||(_s()?qs("backButtonPress",[]):ba())}var ps=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 gs=Xn("handlers");class hs{static initializeHandlers(){hs.handlers.themeChange=Is,hs.handlers.load=Rs,hs.handlers.beforeUnload=Ms,ds()}static uninitializeHandlers(){hs.handlers={},hs.themeChangeHandler=null,hs.loadHandler=null,hs.beforeUnloadHandler=null,hs.beforeSuspendOrTerminateHandler=null,hs.resumeHandler=null}}function ms(){hs.initializeHandlers()}function vs(){hs.uninitializeHandlers()}hs.handlers={},hs.themeChangeHandler=null,hs.loadHandler=null,hs.beforeUnloadHandler=null,hs.beforeSuspendOrTerminateHandler=null,hs.resumeHandler=null,hs.hostToAppPerformanceMetricsHandler=null;const ws=gs.extend("callHandler");function Cs(e,t){const n=hs.handlers[e];if(n){ws("Invoking the registered handler for message %s with arguments %o",e,t);return[!0,n.apply(this,t)]}return _s()?(qs(e,t),[!1,void 0]):(ws("Handler for action message %s not found.",e),[!1,void 0])}function ys(e,t,n,r=!0,o=[]){n?(hs.handlers[t]=n,r&&Cc(e,"registerHandler",[t,...o])):delete hs.handlers[t]}function Ss(e){delete hs.handlers[e]}function bs(e){return null!=hs.handlers[e]}function As(e,t,n,r,o){n&&jr(sr,...r),o&&o(),ys(e,t,n)}function Es(e,t){hs.themeChangeHandler=t,!no(t)&&Cc(e,"registerHandler",["themeChange"])}function Is(e){hs.themeChangeHandler&&hs.themeChangeHandler(e),_s()&&qs("themeChange",[e])}function Ps(e){hs.hostToAppPerformanceMetricsHandler=e}function Ts(e){hs.hostToAppPerformanceMetricsHandler&&hs.hostToAppPerformanceMetricsHandler(e)}function Os(e,t){hs.loadHandler=t,!no(t)&&Cc(e,"registerHandler",["load"])}function Rs(e){const t=Fs(e);hs.resumeHandler?(hs.resumeHandler(t),_s()&&qs("load",[t])):hs.loadHandler&&(hs.loadHandler(e),_s()&&qs("load",[e]))}function Fs(e){return{entityId:e.entityId,contentUrl:new URL(e.contentUrl)}}function ks(e,t){hs.beforeUnloadHandler=t,!no(t)&&Cc(e,"registerHandler",["beforeUnload"])}function Ms(){return ps(this,void 0,void 0,(function*(){const e=()=>{Cc(Yn("v2","handleBeforeUnload"),"readyToUnload",[])};hs.beforeSuspendOrTerminateHandler?(yield hs.beforeSuspendOrTerminateHandler(),_s()?qs("beforeUnload"):e()):hs.beforeUnloadHandler&&hs.beforeUnloadHandler(e)||(_s()?qs("beforeUnload"):e())}))}function Ns(e){hs.beforeSuspendOrTerminateHandler=e,!no(e)&&Cc(Yn("v2","registerBeforeSuspendOrTerminateHandler"),"registerHandler",["beforeUnload"])}function xs(e){hs.resumeHandler=e,!no(e)&&Cc(Yn("v2","registerOnResumeHandler"),"registerHandler",["load"])}var Ds=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=Xn("childProxyingCommunication");class Ls{}function Hs(){Ls.window=null,Ls.origin=null,Ls.messageQueue=[]}function _s(){return!!Ir()&&!!Ls.window}function Vs(e,t){return!!Ir()&&(Ls.window&&!Ls.window.closed&&e!==Ls.window||(Ls.window=e,Ls.origin=t),Ls.window&&Ls.window.closed?(Ls.window=null,Ls.origin=null,!1):Ls.window===e)}function Bs(e,t,n,r){return Ds(this,void 0,void 0,(function*(){Ls.window===t&&(Lr(Ls.window,Ls.origin,Ls.messageQueue,"child"),Ws(e,n,r))}))}Ls.messageQueue=[];const js=Us.extend("handleIncomingMessageFromChild");function Ws(e,t,n){if(void 0===e.data.id||void 0===e.data.func)return;const r=Mr(e.data),[o,i]=Cs(r.func,r.args);if(o&&void 0!==i)return js("Handler called in response to message %s from child. Returning response from handler to child, action: %s.",Dr(r),r.func),void $s(r.id,r.uuid,Array.isArray(i)?i:[i]);js("No handler for message %s from child found; relaying message on to parent, action: %s. Relayed message will have a new id.",Dr(r),r.func),zs(r,t,n)}function zs(e,t,n){const r=t(Yn("v2","tasks.startTask"),e.func,e.args,!0,e.teamsJsInstanceId),o=Ls.origin;n(r.uuid,((...t)=>{if(!Ls.window)return;if(!Tr().disableEnforceOriginMatchForChildResponses&&o!==Ls.origin)return void js("Origin of child window has changed, not sending response back to child window");const n=t.pop();js("Message from parent being relayed to child, id: %s",Dr(e)),$s(e.id,e.uuid,t,n)}))}function $s(e,t,n,r){const o=Ls.window,i=Gs(e,t,n,r),a=xr(i),s=Ls.origin;o&&s&&(js("Sending message %s to %s via postMessage, args = %o",Dr(a),"child",a.args),o.postMessage(a,s))}function qs(e,t){const n=Ls.window,r=Js(e,t),o=Ls.origin;n&&o?n.postMessage(r,o):Ls.messageQueue.push(r)}function Gs(e,t,n,r){return{id:e,uuid:t,args:n||[],isPartialResponse:r}}function Js(e,t){return{func:e,args:t||[]}}class Ks{static storeCallbackInformation(e,t){Ks.callbackInformation.set(e,t)}static clearMessages(){Ks.callbackInformation.clear()}static deleteMessageInformation(e){Ks.callbackInformation.delete(e)}static handleOneWayPerformanceMetrics(e,t,n){const r=e.monotonicTimestamp;r&&n?Ts({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=Ks.callbackInformation.get(e);o&&t.monotonicTimestamp&&r?(Ts({actionName:o.name,messageDelay:r-t.monotonicTimestamp,requestStartedAt:o.calledAt}),Ks.deleteMessageInformation(e)):n("Unable to send performance metrics for callback %s with arguments %o",e.toString(),t.args)}}Ks.callbackInformation=new Map;const Qs=Xn("nestedAppAuthUtils"),Zs=Qs.extend("tryPolyfillWithNestedAppAuthBridge"),Xs="v2";function Ys(e,t,n){var r;const o=Zs;if(Gn.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=tc(a,n);s&&(a.nestedAppAuthBridge=s)}const ec=Qs.extend("createNestedAppAuthBridge");function tc(e,t){const n=ec;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=Yn(Xs,"nestedAppAuth.execute");o(e,r)},removeEventListener:(t,n)=>{e.removeEventListener(t,i(n))}}}var nc=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 rc=Xn("communication");class oc{}class ic{}function ac(e,t){if(ic.messageListener=e=>Tc(e),oc.currentWindow=oc.currentWindow||Mn(),oc.parentWindow=oc.currentWindow.parent!==oc.currentWindow.self?oc.currentWindow.parent:oc.currentWindow.opener,oc.topWindow=oc.currentWindow.top,(oc.parentWindow||e)&&oc.currentWindow.addEventListener("message",ic.messageListener,!1),!oc.parentWindow){const e=oc.currentWindow;if(!e.nativeInterface)return Promise.reject(new Error("Initialization Failed. No Parent window found."));Gn.isFramelessWindow=!0,e.onNativeMessage=Lc}try{return oc.parentOrigin="*",fc(t,"initialize",[br,rr,e]).then((([e,t,n,r])=>(Ys(r,oc.currentWindow,{onMessage:Rc,sendPostMessage:Sc}),{context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r})))}finally{oc.parentOrigin=null}}function sc(){oc.currentWindow&&oc.currentWindow.removeEventListener("message",ic.messageListener,!1),oc.currentWindow=null,oc.parentWindow=null,oc.parentOrigin=null,ic.parentMessageQueue=[],ic.nextMessageId=0,ic.callbacks.clear(),ic.promiseCallbacks.clear(),ic.portCallbacks.clear(),ic.legacyMessageIdsToUuidMap={},Ks.clearMessages(),Hs()}function cc(e,t,...n){return fc(e,t,n).then((([e])=>e))}function uc(e,t,...n){return fc(e,t,n).then((([e,t])=>{if(!e)throw new Error(t)}))}function lc(e,t,n,...r){return fc(e,t,r).then((([e,t])=>{if(!e)throw new Error(t||n)}))}function dc(e,t,...n){return fc(e,t,n).then((([e,t])=>{if(e)throw e;return t}))}function fc(e,t,n=void 0){if(!er(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(wc(Ic(e,t,n).uuid))}))}function pc(e){return e.map((e=>Sr(e)?e.serialize():e))}function gc(e,t,n,r,o){var i;return nc(this,void 0,void 0,(function*(){const a=pc(t),[s]=yield fc(r,e,a);if(o&&o(s)||!o&&We(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(`${De.INTERNAL_ERROR}, message: Invalid response from host - ${JSON.stringify(s)}`)}))}function hc(e,t,n,r){var o;return nc(this,void 0,void 0,(function*(){const i=pc(t),[a]=yield fc(n,e,i);if(r&&r(a)||!r&&We(a))throw new Error(`${a.errorCode}, message: ${null!==(o=a.message)&&void 0!==o?o:"None"}`);if(void 0!==a)throw new Error(`${De.INTERNAL_ERROR}, message: Invalid response from host`)}))}function mc(e,t,n=void 0){if(!er(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 vc(Ic(e,t,n).uuid)}function vc(e){return new Promise(((t,n)=>{ic.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 wc(e){return new Promise((t=>{ic.promiseCallbacks.set(e,t)}))}function Cc(e,t,n,r){let o;if(n instanceof Function?r=n:n instanceof Array&&(o=n),!er(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=Ic(e,t,o);r&&ic.callbacks.set(i.uuid,r)}ic.parentMessageQueue=[],ic.topMessageQueue=[],ic.nextMessageId=0,ic.callbacks=new Map,ic.promiseCallbacks=new Map,ic.portCallbacks=new Map,ic.legacyMessageIdsToUuidMap={};const yc=rc.extend("sendNestedAuthRequestToTopWindow");function Sc(e,t){const n=yc,r=oc.topWindow,o=$c(e,t);return n("Message %s information: %o",Dr(o),{actionName:o.func}),Ac(r,o)}const bc=rc.extend("sendRequestToTargetWindowHelper");function Ac(e,t){const n=bc,r=jc(e),o=kr(t);if(Gn.isFramelessWindow)oc.currentWindow&&oc.currentWindow.nativeInterface&&(n("Sending message %s to %s via framelessPostMessage interface",Dr(o),r),oc.currentWindow.nativeInterface.framelessPostMessage(JSON.stringify(o)));else{const i=Bc(e);e&&i?(n("Sending message %s to %s via postMessage",Dr(o),r),e.postMessage(o,i)):(n("Adding message %s to %s message queue",Dr(o),r),Vc(e).push(t))}return t}const Ec=rc.extend("sendMessageToParentHelper");function Ic(e,t,n,r,o){const i=Ec,a=oc.parentWindow,s=zc(e,t,n,r,o);return Ks.storeCallbackInformation(s.uuid,{name:t,calledAt:s.timestamp}),i("Message %s information: %o",Dr(s),{actionName:t,args:n}),Ac(a,s)}const Pc=rc.extend("processIncomingMessage");function Tc(e){return nc(this,void 0,void 0,(function*(){if(!e||!e.data||"object"!=typeof e.data)return void Pc("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 kc(t,n).then((r=>{r?(Mc(t,n),t!==oc.parentWindow?Vs(t,n)&&Bs(e,t,Ic,((e,t)=>ic.callbacks.set(e,t))):Lc(e)):Pc("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 Oc=rc.extend("processAuthBridgeMessage");function Rc(e,t){var n,r;const o=Oc;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?kc(c,u)?(oc.topWindow&&!oc.topWindow.closed&&c!==oc.topWindow||(oc.topWindow=c,oc.topOrigin=u),oc.topWindow&&oc.topWindow.closed&&(oc.topWindow=null,oc.topOrigin=null),Lr(oc.topWindow,oc.topOrigin,ic.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 Fc=rc.extend("shouldProcessIncomingMessage");function kc(e,t){return nc(this,void 0,void 0,(function*(){if(oc.currentWindow&&e===oc.currentWindow)return Fc("Should not process message because it is coming from the current window"),!1;if(oc.currentWindow&&oc.currentWindow.location&&t&&t===oc.currentWindow.location.origin)return!0;{let e;try{e=new URL(t)}catch(e){return Fc("Message has an invalid origin of %s",t),!1}const n=yield ha(e);return n||Fc("Message has an invalid origin of %s",t),n}}))}function Mc(e,t){Gn.isFramelessWindow||oc.parentWindow&&!oc.parentWindow.closed&&e!==oc.parentWindow||(oc.parentWindow=e,oc.parentOrigin=t),oc.parentWindow&&oc.parentWindow.closed&&(oc.parentWindow=null,oc.parentOrigin=null),Lr(oc.parentWindow,oc.parentOrigin,ic.parentMessageQueue,"parent")}const Nc=rc.extend("handleIncomingMessageFromParent");function xc(e){const t=Nc;if(!e.uuid)return ic.legacyMessageIdsToUuidMap[e.id];{const t=e.uuid,n=Dc(ic.callbacks,t);if(n)return n;const r=Dc(ic.promiseCallbacks,t);if(r)return r;const o=Dc(ic.portCallbacks,t);if(o)return o}t("Received message %s that failed to produce a callbackId",Dr(e))}function Dc(e,t){if(t){const n=[...e].find((([e,n])=>e.toString()===t.toString()));if(n)return n[0]}}function Uc(e,t){const n=Dc(t,e.uuid);n&&t.delete(n),e.uuid?ic.legacyMessageIdsToUuidMap={}:delete ic.legacyMessageIdsToUuidMap[e.id]}function Lc(e){const t=Nc,n=jn();if("id"in e.data&&"number"==typeof e.data.id){const r=e.data,o=Nr(r),i=xc(o);if(i){const r=ic.callbacks.get(i);t("Received a response from parent for message %s",i.toString()),Ks.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]),Hc(e)||(t("Removing registered callback for message %s",i.toString()),Uc(o,ic.callbacks)));const a=ic.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()),Uc(o,ic.promiseCallbacks));const s=ic.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()),Uc(o,ic.portCallbacks)}o.uuid&&(ic.legacyMessageIdsToUuidMap={})}}else if("func"in e.data&&"string"==typeof e.data.func){const r=e.data;Ks.handleOneWayPerformanceMetrics(r,t,n),t('Received a message from parent %s, action: "%s"',Dr(r),r.func),Cs(r.func,r.args)}else t("Received an unknown message: %O",e)}function Hc(e){return!0===e.data.isPartialResponse}function _c(){return oc.topWindow!==oc.parentWindow}function Vc(e){return e===oc.topWindow&&_c()?ic.topMessageQueue:e===oc.parentWindow?ic.parentMessageQueue:[]}function Bc(e){return e===oc.topWindow&&_c()?oc.topOrigin:e===oc.parentWindow?oc.parentOrigin:null}function jc(e){return e===oc.topWindow&&_c()?"top":e===oc.parentWindow?"parent":null}function Wc(e,t){let n;n=oc.currentWindow.setInterval((()=>{0===Vc(e).length&&(clearInterval(n),t())}),100)}function zc(e,t,n,r,o){const i=ic.nextMessageId++,a=new $n;ic.legacyMessageIdsToUuidMap[i]=a;const s=!0===r?o:Gn.teamsJsInstanceId;return{id:i,uuid:a,func:t,timestamp:Date.now(),monotonicTimestamp:jn(),args:n||[],apiVersionTag:e,isProxiedFromChild:null!=r&&r,teamsJsInstanceId:s}}function $c(e,t){const n=ic.nextMessageId++,r=new $n;return ic.legacyMessageIdsToUuidMap[n]=r,{id:n,uuid:r,func:"nestedAppAuth.execute",timestamp:Date.now(),monotonicTimestamp:jn(),apiVersionTag:t,args:[],data:e}}const qc="v1";function Gc(e){if(!no(e)&&jr(sr),!no(e)&&!Jc())throw gn;e?ys(Yn(qc,"log.request"),"log.request",(()=>{const t=e();Cc(Yn(qc,"log.receive"),"log.receive",[t])})):Ss("log.request")}function Jc(){return!(!jr(sr)||!sr.supports.logs)}var Kc,Qc,Zc;!function(e){e.fileDownloadStart="fileDownloadStart",e.fileDownloadComplete="fileDownloadComplete"}(Kc||(Kc={})),function(e){e.view="view",e.edit="edit",e.editNew="editNew"}(Qc||(Qc={})),function(e){e.fileOpenPreference="fileOpenPreference",e.theme="theme"}(Zc||(Zc={}));const Xc="v1";function Yc(e,t){jr(sr),Cc(Yn(Xc,"uploadCustomApp"),"uploadCustomApp",[e],t||Cn())}function eu(e,t,n){jr(sr),Cc(Yn(Xc,"sendCustomMessage"),e,t,n)}function tu(e,t){if(jr(sr),!_s())throw new Error("The child window has not yet been initialized or is not present");qs(e,t)}function nu(e,t){jr(sr),ys(Yn(Xc,"registerCustomHandler"),e,((...e)=>t.apply(this,e)))}function ru(e,t){jr(sr),ys(Yn(Xc,"registerUserSettingsChangeHandler"),"userSettingsChange",t,!0,[e])}function ou(e){jr(sr,cn.content,cn.sidePanel,cn.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];Cc(Yn(Xc,"openFilePreview"),"openFilePreview",t)}const iu="v1";function au(e){return new Promise((t=>{if(jr(sr,cn.content),!uu())throw gn;const n=uc(Yn(iu,"conversations.openConversation"),"conversations.openConversation",{title:e.title,subEntityId:e.subEntityId,conversationId:e.conversationId,channelId:e.channelId,entityId:e.entityId});e.onStartConversation&&ys(Yn(iu,"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&&ys(Yn(iu,"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 su(){if(jr(sr,cn.content),!uu())throw gn;Cc(Yn(iu,"conversations.closeConversation"),"conversations.closeConversation"),Ss("startConversation"),Ss("closeConversation")}function cu(){return new Promise((e=>{if(jr(sr),!uu())throw gn;e(cc(Yn(iu,"conversations.getChatMember"),"getChatMembers"))}))}function uu(){return!(!jr(sr)||!sr.supports.conversations)}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=Xn("copilot");function pu(){var e;return jr(sr)&&!!(null===(e=sr.supports.copilot)||void 0===e?void 0:e.customTelemetry)}function gu(e,t){var n;return void 0===t&&(t=null!==(n=jn())&&void 0!==n?n:Date.now()),lu(this,void 0,void 0,(function*(){return jr(sr),fu("Sending custom telemetry data to host for stage: %s to record timestamp: %s",e,t),hc("copilot.customTelemetry.sendCustomTelemetryData",[e.toString(),t],Yn(du,"copilot.customTelemetry.sendCustomTelemetryData"))}))}var hu=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 mu="v2",vu=Xn("copilot");function wu(){var e,t;return jr(sr)&&(!!(null===(e=sr.hostVersionsInfo)||void 0===e?void 0:e.appEligibilityInformation)||!!(null===(t=sr.supports.copilot)||void 0===t?void 0:t.eligibility))}function Cu(e){var t,n,r;return hu(this,void 0,void 0,(function*(){if(jr(sr),!wu())throw new Error(`Error code: ${gn.errorCode}, message: Not supported on platform`);if((null===(t=sr.hostVersionsInfo)||void 0===t?void 0:t.appEligibilityInformation)&&!e)return vu("Eligibility information is already available on runtime."),sr.hostVersionsInfo.appEligibilityInformation;vu("Eligibility information is not available on runtime. Requesting from host.");const o=yield cc(Yn(mu,"copilot.eligibility.getEligibilityInfo"),"copilot.eligibility.getEligibilityInfo",e);if(We(o))throw new Error(`Error code: ${o.errorCode}, message: ${null!==(n=o.message)&&void 0!==n?n:"Failed to get eligibility information from the host."}`);if(!yu(o))throw new Error("Error deserializing eligibility information");return"nonadult"===(null===(r=o.ageGroup)||void 0===r?void 0:r.toLowerCase())&&(o.ageGroup=_e.NotAdult),o}))}function yu(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 Su,bu,Au,Eu,Iu,Pu,Tu,Ou,Ru;!function(e){e.EMAIL="email",e.TEXT="text",e.MEDIA="media",e.CALENDAR_INVITE="calendarInvite",e.WEB_PAGE="webPage",e.MIXED="mixed",e.TEAMS="teams",e.FILE="file"}(Su||(Su={})),function(e){e.IMAGE="image",e.AUDIO="audio",e.VIDEO="video"}(bu||(bu={})),function(e){e.Private="Private",e.Shared="Shared",e.Recap="Recap",e.RecapCall="RecapCall",e.PrivateViewCall="PrivateViewCall",e.Chat="Chat",e.Compose="Compose"}(Au||(Au={})),function(e){e.ClientDeviceType="ClientDeviceType",e.ClientRing="ClientRing",e.ClientScenarioName="ClientScenarioName"}(Eu||(Eu={})),function(e){e.Enabled="enabled",e.Disabled="disabled",e.EnabledWithTranscript="enabledWithTranscript"}(Iu||(Iu={})),function(e){e.NotStarted="notStarted",e.Active="active",e.Inactive="inactive",e.UnknownFutureValue="unknownFutureValue"}(Pu||(Pu={})),function(e){e.Chat="Chat",e.Channel="Channel",e.Meeting="Meeting",e.MeetingChat="MeetingChat"}(Tu||(Tu={})),function(e){e.Accepted="accepted",e.NotAccepted="not_accepted"}(Ou||(Ou={})),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"}(Ru||(Ru={}));class Fu extends Error{constructor(e,t){super(t),this.errorCode=e,this.name="SidePanelError"}}var ku=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 Mu="v2";function Nu(){var e;return jr(sr)&&!!(null===(e=sr.supports.copilot)||void 0===e?void 0:e.sidePanel)}function xu(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(Ru).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)||We(e)}function Du(e){return ku(this,void 0,void 0,(function*(){jr(sr);return gc("copilot.sidePanel.getContent",e?[new Bu(e)]:[],new _u,Yn(Mu,"copilot.sidePanel.getContent"),xu)}))}function Uu(){return ku(this,void 0,void 0,(function*(){return jr(sr),gc("copilot.sidePanel.preCheckUserConsent",[],new Vu,Yn(Mu,"copilot.sidePanel.preCheckUserConsent"),xu)}))}function Lu(e){As(Yn(Mu,"copilot.sidePanel.registerUserActionContentSelect"),"copilot.sidePanel.userActionContentSelect",e,[cn.content],(()=>{if(!Nu())throw Hu}))}const Hu=new Fu(Ru.NotSupportedOnPlatform,"This API is not supported on the current platform.");class _u extends zi{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class Vu extends zi{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class Bu{constructor(e){this.contentRequest=e}serialize(){return this.contentRequest}}var ju=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 Wu="v2";function zu(){var e;return jr(sr)&&!!(null===(e=sr.supports.copilot)||void 0===e?void 0:e.view)}function $u(){return ju(this,void 0,void 0,(function*(){jr(sr),yield gc("copilot.view.closeSidePanel",[],new qu,Yn(Wu,"copilot.view.closeSidePanel"))}))}class qu extends zi{validate(e){return!0}deserialize(e){return e}}const Gu="v2";class Ju{constructor(e){this.invokeRequest=e}serialize(){return this.invokeRequest}}function Ku(e){const t=e;return t.responseType===Xu.ActionExecuteInvokeResponse&&void 0!==t.value&&void 0!==t.statusCode&&void 0!==t.type}const Qu="Action.Execute";var Zu,Xu,Yu,el;!function(e){e.ActionExecuteInvokeRequest="ActionExecuteInvokeRequest",e.QueryMessageExtensionRequest="QueryMessageExtensionRequest"}(Zu||(Zu={})),function(e){e.ActionExecuteInvokeResponse="ActionExecuteInvokeResponse",e.QueryMessageExtensionResponse="QueryMessageExtensionResponse"}(Xu||(Xu={}));class tl extends zi{validate(e){return Ku(e)}deserialize(e){return e}}function nl(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(Yu).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)}function rl(e){e.requestType===Zu.ActionExecuteInvokeRequest?ol(e):e.requestType===Zu.QueryMessageExtensionRequest&&il(e)}function ol(e){if(e.type!==Qu){throw{errorCode:Yu.INTERNAL_ERROR,message:`Invalid action type ${e.type}. Action type must be "${Qu}"`}}if(!Wn(e.data)){throw{errorCode:Yu.INTERNAL_ERROR,message:`Invalid data type ${typeof e.data}. Data must be a primitive or a plain object.`}}}function il(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 al(e,t,n){if(jr(sr,cn.content),!hl())throw gn;const r=new to(e);return rl(n),fc(Yn(Gu,"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 sl(e,t){if(jr(sr,cn.content),!hl())throw gn;const n=new to(e);return fc(Yn(Gu,"externalAppAuthentication.authenticateWithSSO"),"externalAppAuthentication.authenticateWithSSO",[n.toString(),t.claims,t.silent]).then((([e,t])=>{if(!e)throw t}))}function cl(e,t,n){if(jr(sr,cn.content),!hl())throw gn;const r=new to(e);return rl(n),fc(Yn(Gu,"externalAppAuthentication.authenticateWithSSOAndResendRequest"),"externalAppAuthentication.authenticateWithSSOAndResendRequest",[r.toString(),n,t.claims,t.silent]).then((([e,t])=>{if(e&&null!=t.responseType)return t;throw t}))}function ul(e,t,n){if(jr(sr,cn.content),!hl())throw gn;return xn(e,new Error("titleId is Invalid.")),xn(t,new Error("oauthConfigId is Invalid.")),fc(Yn(Gu,"externalAppAuthentication.authenticateWithOauth2"),"externalAppAuthentication.authenticateWithOauth2",[e,t,n.width,n.height,n.isExternal]).then((([e,t])=>{if(!e)throw t}))}function ll(e,t,n){if(jr(sr,cn.content),!hl())throw gn;return xn(e,new Error("titleId is Invalid.")),t&&Dn(t),fc(Yn(Gu,"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(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}(Yu||(Yu={}));class dl{constructor(e){this.param=e}serialize(){var e,t,n;return{connectorId:this.param.connectorId,oAuthConfigId:this.param.oAuthConfigId,traceId:null!==(n=null===(t=null===(e=this.param.traceId)||void 0===e?void 0:e.toString)||void 0===t?void 0:t.call(e))&&void 0!==n?n:this.param.traceId,windowParameters:this.param.windowParameters?Object.assign({},this.param.windowParameters):void 0}}}function fl(e){if(jr(sr,cn.content),!hl())throw gn;return xn(e.connectorId,new Error("connectorId is Invalid.")),xn(e.oAuthConfigId,new Error("oauthConfigId is Invalid.")),hc("externalAppAuthentication.authenticateWithConnector",[new dl(e)],Yn(Gu,"externalAppAuthentication.authenticateWithConnector"),nl)}!function(e){e.Invalid="Invalid",e.Valid="Valid",e.Expired="Expired"}(el||(el={}));class pl extends zi{validate(e){return"string"==typeof e&&e in el}deserialize(e){return e}}function gl(e){if(jr(sr,cn.content),!hl())throw gn;return xn(e.connectorId,new Error("connectorId is Invalid.")),xn(e.oAuthConfigId,new Error("oAuthConfigId is Invalid.")),gc("externalAppAuthentication.getUserAuthenticationStateForConnector",[new dl(e)],new pl,Yn(Gu,"externalAppAuthentication.getUserAuthenticationStateForConnector"),nl)}function hl(){return!(!jr(sr)||!sr.supports.externalAppAuthentication)}var ml=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 vl="v2";function wl(e,t,n){return ml(this,void 0,void 0,(function*(){if(jr(sr,cn.content),!bl())throw gn;return Al(e,t),hc("externalAppAuthenticationForCEA.authenticateWithSSO",[e,t,n.authId,n.connectionName,n.claims,n.silent],Yn(vl,"externalAppAuthenticationForCEA.authenticateWithSSO"),nl)}))}function Cl(e,t,n){return ml(this,void 0,void 0,(function*(){if(jr(sr,cn.content),!bl())throw gn;return Al(e,t),hc("externalAppAuthenticationForCEA.authenticateWithOauth",[e,t,n.url.href,n.width,n.height,n.isExternal],Yn(vl,"externalAppAuthenticationForCEA.authenticateWithOauth"),nl)}))}function yl(e,t,n,r){return ml(this,void 0,void 0,(function*(){if(jr(sr,cn.content),!bl())throw gn;return Al(e,t),ol(r),gc("externalAppAuthenticationForCEA.authenticateAndResendRequest",[e,t,new Ju(r),n.url.href,n.width,n.height,n.isExternal],new tl,Yn(vl,"externalAppAuthenticationForCEA.authenticateAndResendRequest"),nl)}))}function Sl(e,t,n,r){return ml(this,void 0,void 0,(function*(){if(jr(sr,cn.content),!bl())throw gn;return Al(e,t),ol(r),gc("externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest",[e,t,new Ju(r),n.authId,n.connectionName,n.claims,n.silent],new tl,Yn(vl,"externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest"),nl)}))}function bl(){return!(!jr(sr)||!sr.supports.externalAppAuthenticationForCEA)}function Al(e,t){xn(t,new Error("conversation id is not valid.")),Yr(e)}const El="v2";var Il,Pl;function Tl(e,t){if(jr(sr,cn.content),!Rl())throw gn;const n=new to(e);return fc(Yn(El,"externalAppCardActions.processActionSubmit"),"externalAppCardActions.processActionSubmit",[n.toString(),t]).then((([e,t])=>{if(!e)throw t}))}function Ol(e,t,n){if(jr(sr,cn.content),!Rl())throw gn;const r=new to(e);return fc(Yn(El,"externalAppCardActions.processActionOpenUrl"),"externalAppCardActions.processActionOpenUrl",[r.toString(),t.href,n]).then((([e,t])=>{if(e)throw e;return t}))}function Rl(){return!(!jr(sr)||!sr.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"}(Pl||(Pl={}));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 kl="v2";function Ml(e,t,n){return Fl(this,void 0,void 0,(function*(){if(jr(sr,cn.content),!xl())throw gn;Al(e,t);const[r,o]=yield fc(Yn(kl,"externalAppCardActionsForCEA.processActionOpenUrl"),"externalAppCardActionsForCEA.processActionOpenUrl",[e.toString(),t,n.href]);if(r)throw r;return o}))}function Nl(e,t,n){return Fl(this,void 0,void 0,(function*(){if(jr(sr,cn.content),!xl())throw gn;Al(e,t);const r=yield cc(Yn(kl,"externalAppCardActionsForCEA.processActionSubmit"),"externalAppCardActionsForCEA.processActionSubmit",e.toString(),t,n);if(r)throw r}))}function xl(){return!(!jr(sr)||!sr.supports.externalAppCardActionsForCEA)}var Dl;function Ul(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(Dl).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)}!function(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}(Dl||(Dl={}));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 Hl="v2";function _l(e,t,n){return Ll(this,void 0,void 0,(function*(){if(jr(sr,cn.content),!Vl())throw gn;return Bl(e,n),hc("externalAppCardActionsForDA.processActionOpenUrlDialog",[e,new jl(t),n],Yn(Hl,"externalAppCardActionsForDA.processActionOpenUrlDialog"),Ul)}))}function Vl(){return!(!jr(sr)||!sr.supports.externalAppCardActionsForDA)}function Bl(e,t){Yr(e),qn(t)}class jl{constructor(e){this.info=e}serialize(){const{url:e,title:t,size:n}=this.info;return{url:e.href,title:t,size:n}}}var Wl=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 zl="v2";function $l(e,t,n){return Wl(this,void 0,void 0,(function*(){if(jr(sr,cn.content),!ql())throw gn;const r=new to(e),[o,i]=yield fc(Yn(zl,"externalAppCommands.processActionCommand"),"externalAppCommands.processActionCommand",[r.toString(),t,n]);if(o)throw o;return i}))}function ql(){return!(!jr(sr)||!sr.supports.externalAppCommands)}const Gl="v1";var Jl,Kl,Ql,Zl,Xl,Yl;function ed(e,t){if(jr(sr,cn.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");Cc(Yn(Gl,"files.getCloudStorageFolders"),"files.getCloudStorageFolders",[e],t)}function td(e,t){if(jr(sr,cn.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");Cc(Yn(Gl,"files.addCloudStorageFolder"),"files.addCloudStorageFolder",[e],t)}function nd(e,t,n){if(jr(sr,cn.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");Cc(Yn(Gl,"files.deleteCloudStorageFolder"),"files.deleteCloudStorageFolder",[e,t],n)}function rd(e,t,n){if(jr(sr,cn.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");Cc(Yn(Gl,"files.getCloudStorageFolderContents"),"files.getCloudStorageFolderContents",[e,t],n)}function od(e,t,n){if(jr(sr,cn.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");Cc(Yn(Gl,"files.openCloudStorageFile"),"files.openCloudStorageFile",[e,t,n])}function id(e=!1,t){if(jr(sr,cn.content),!t)throw new Error("[files.getExternalProviders] Callback cannot be null");Cc(Yn(Gl,"files.getExternalProviders"),"files.getExternalProviders",[e],t)}function ad(e,t,n,r,o=!1,i){if(jr(sr,cn.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");Cc(Yn(Gl,"files.copyMoveFiles"),"files.copyMoveFiles",[e,t,n,r,o],i)}function sd(e){if(jr(sr,cn.content),!e)throw new Error("[files.getFileDownloads] Callback cannot be null");Cc(Yn(Gl,"files.getFileDownloads"),"files.getFileDownloads",[],e)}function cd(e=void 0,t){if(jr(sr,cn.content),!t)throw new Error("[files.openDownloadFolder] Callback cannot be null");Cc(Yn(Gl,"files.openDownloadFolder"),"files.openDownloadFolder",[e],t)}function ud(e){if(jr(sr,cn.content),!e)throw wd(De.INVALID_ARGUMENTS,"[files.addCloudStorageProvider] callback cannot be null");Cc(Yn(Gl,"files.addCloudStorageProvider"),"files.addCloudStorageProvider",[],e)}function ld(e,t){if(jr(sr,cn.content),!t)throw wd(De.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] callback cannot be null");if(!e||!e.content)throw wd(De.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] 3P cloud storage provider request content is missing");Cc(Yn(Gl,"files.removeCloudStorageProvider"),"files.removeCloudStorageProvider",[e],t)}function dd(e,t){if(jr(sr,cn.content),!t)throw wd(De.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw wd(De.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] 3P cloud storage provider request content is missing");Cc(Yn(Gl,"files.addCloudStorageProviderFile"),"files.addCloudStorageProviderFile",[e],t)}function fd(e,t){if(jr(sr,cn.content),!t)throw wd(De.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw wd(De.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] 3P cloud storage provider request content is missing");Cc(Yn(Gl,"files.renameCloudStorageProviderFile"),"files.renameCloudStorageProviderFile",[e],t)}function pd(e,t){if(jr(sr,cn.content),!t)throw wd(De.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw wd(De.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] 3P cloud storage provider request content details are missing");Cc(Yn(Gl,"files.deleteCloudStorageProviderFile"),"files.deleteCloudStorageProviderFile",[e],t)}function gd(e,t){if(jr(sr,cn.content),!t)throw wd(De.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw wd(De.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");Cc(Yn(Gl,"files.downloadCloudStorageProviderFile"),"files.downloadCloudStorageProviderFile",[e],t)}function hd(e,t){if(jr(sr,cn.content),!t)throw wd(De.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw wd(De.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");if(!e.content.destinationFolder)throw wd(De.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] Invalid destination folder details");Cc(Yn(Gl,"files.uploadCloudStorageProviderFile"),"files.uploadCloudStorageProviderFile",[e],t)}function md(e){if(jr(sr),!e)throw new Error("[registerCloudStorageProviderListChangeHandler] Handler cannot be null");ys(Yn(Gl,"files.registerCloudStorageProviderListChangeHandler"),"files.cloudStorageProviderListChange",e)}function vd(e){if(jr(sr),!e)throw new Error("[registerCloudStorageProviderContentChangeHandler] Handler cannot be null");ys(Yn(Gl,"files.registerCloudStorageProviderContentChangeHandler"),"files.cloudStorageProviderContentChange",e)}function wd(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"}(Jl||(Jl={})),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"}(Ql||(Ql={})),function(e){e.Readonly="readonly"}(Zl||(Zl={})),function(e){e.Downloaded="Downloaded",e.Downloading="Downloading",e.Failed="Failed"}(Xl||(Xl={})),function(e){e.Download="DOWNLOAD",e.Upload="UPLOAD",e.Delete="DELETE"}(Yl||(Yl={}));const Cd="v1";function yd(){return new Promise((e=>{if(jr(sr),!Ed())throw gn;e(dc(Yn(Cd,"meetingRoom.getPairedMeetingRoomInfo"),"meetingRoom.getPairedMeetingRoomInfo"))}))}function Sd(e){return new Promise((t=>{if(!e||0==e.length)throw new Error("[meetingRoom.sendCommandToPairedMeetingRoom] Command name cannot be null or empty");if(jr(sr),!Ed())throw gn;t(dc(Yn(Cd,"meetingRoom.sendCommandToPairedMeetingRoom"),"meetingRoom.sendCommandToPairedMeetingRoom",e))}))}function bd(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler] Handler cannot be null");if(jr(sr),!Ed())throw gn;ys(Yn(Cd,"meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler"),"meetingRoom.meetingRoomCapabilitiesUpdate",(t=>{jr(sr),e(t)}))}function Ad(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomStatesUpdateHandler] Handler cannot be null");if(jr(sr),!Ed())throw gn;ys(Yn(Cd,"meetingRoom.registerMeetingRoomStatesUpdateHandler"),"meetingRoom.meetingRoomStatesUpdate",(t=>{jr(sr),e(t)}))}function Ed(){return!(!jr(sr)||!sr.supports.meetingRoom)}function Id(){return!(!jr(sr)||!sr.supports.messageChannels)}const Pd="1.0.1",Td={onMessage:function(e,t){if(!e||!e.data||"object"!=typeof e.data||null===e.data)return void Dd("Invalid message format, ignoring. Message: %o",e);if(!Md(e.source,e.origin))return void Dd("Message source/origin not allowed, ignoring.");const{args:n}=e.data,[,r]=null!=n?n:[],o=(()=>{try{return JSON.parse(r)}catch(e){return Ud("Failed to parse response message:",e),null}})();if(!o||"NestedAppAuthResponse"!==o.messageType)return void Dd("Invalid response format, ignoring. Message: %o",e);t(r)}};let Od=null,Rd=!1;function Fd(e,t,n=!1){if(Rd=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.`);Od=e.origin}catch(e){throw new Error(`Failed to initialize bridge: invalid top origin: ${t}`)}const r=e;if(r.nestedAppAuthBridge)return void Dd("Nested App Auth Bridge is already present");const o=kd(r);o&&(r.nestedAppAuthBridge=o)}function kd(e){const t=new WeakMap,{onMessage:n}=Td,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 Dd(`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=Nd(t);if(e===e.top||!Od)return void Ud("Not in an embedded iframe; skipping postMessage.");e.top.postMessage(n,Od)}}catch(e){return void Ud("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 Md(e,t){if(t===Od)try{return"https:"===new URL(t).protocol}catch(e){return Ud("Invalid message origin URL:",e),!1}return!1}function Nd(e){const t=Date.now();return{id:xd(),uuid:nn(),func:"nestedAppAuth.execute",timestamp:t,apiVersionTag:"v2_nestedAppAuth.execute",monotonicTimestamp:t,args:[],data:e}}function xd(){return"undefined"!=typeof crypto&&crypto.randomUUID?crypto.randomUUID():Math.random().toString(36).substring(2,11)}function Dd(...e){Rd&&console.log(...e)}function Ud(...e){Rd&&console.error(...e)}const Ld="v1";function Hd(e){if(jr(sr,cn.content),!_d())throw gn;Cc(Yn(Ld,"notifications.showNotification"),"notifications.showNotification",[e])}function _d(){return!(!jr(sr)||!sr.supports.notifications)}const Vd="v2";function Bd(e){if(!zd())throw new Error(De.NOT_SUPPORTED_ON_PLATFORM.toString());if(no(e))throw new Error(De.INVALID_ARGUMENTS.toString());ys(Yn(Vd,"otherApp.install"),"otherApp.install",e)}function jd(){if(!zd())throw new Error(De.NOT_SUPPORTED_ON_PLATFORM.toString());Cc(Yn(Vd,"otherApp.unregisterInstall"),"otherApp.unregisterInstall"),Ss("otherApp.install")}function Wd(e){if(!zd())throw new Error(De.NOT_SUPPORTED_ON_PLATFORM.toString());return hc("otherApp.notifyInstallCompleted",[e.toString()],Yn(Vd,"otherApp.notifyInstallCompleted"))}function zd(){return!(!jr(sr)||!sr.supports.otherAppStateChange)}const $d="v1";var qd,Gd,Jd;function Kd(e){if(!e)throw new Error("[remoteCamera.getCapableParticipants] Callback cannot be null");if(jr(sr,cn.sidePanel),!rf())throw gn;Cc(Yn($d,"remoteCamera.getCapableParticipants"),"remoteCamera.getCapableParticipants",e)}function Qd(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(jr(sr,cn.sidePanel),!rf())throw gn;Cc(Yn($d,"remoteCamera.requestControl"),"remoteCamera.requestControl",[e],t)}function Zd(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(jr(sr,cn.sidePanel),!rf())throw gn;Cc(Yn($d,"remoteCamera.sendControlCommand"),"remoteCamera.sendControlCommand",[e],t)}function Xd(e){if(!e)throw new Error("[remoteCamera.terminateSession] Callback cannot be null");if(jr(sr,cn.sidePanel),!rf())throw gn;Cc(Yn($d,"remoteCamera.terminateSession"),"remoteCamera.terminateSession",e)}function Yd(e){if(!e)throw new Error("[remoteCamera.registerOnCapableParticipantsChangeHandler] Handler cannot be null");if(jr(sr,cn.sidePanel),!rf())throw gn;ys(Yn($d,"remoteCamera.registerOnCapableParticipantsChangeHandler"),"remoteCamera.capableParticipantsChange",e)}function ef(e){if(!e)throw new Error("[remoteCamera.registerOnErrorHandler] Handler cannot be null");if(jr(sr,cn.sidePanel),!rf())throw gn;ys(Yn($d,"remoteCamera.registerOnErrorHandler"),"remoteCamera.handlerError",e)}function tf(e){if(!e)throw new Error("[remoteCamera.registerOnDeviceStateChangeHandler] Handler cannot be null");if(jr(sr,cn.sidePanel),!rf())throw gn;ys(Yn($d,"remoteCamera.registerOnDeviceStateChangeHandler"),"remoteCamera.deviceStateChange",e)}function nf(e){if(!e)throw new Error("[remoteCamera.registerOnSessionStatusChangeHandler] Handler cannot be null");if(jr(sr,cn.sidePanel),!rf())throw gn;ys(Yn($d,"remoteCamera.registerOnSessionStatusChangeHandler"),"remoteCamera.sessionStatusChange",e)}function rf(){return!(!jr(sr)||!sr.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"}(qd||(qd={})),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"}(Gd||(Gd={})),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"}(Jd||(Jd={}));const of="v1";function af(e,t,n,r){if(jr(sr,cn.content),!sf())throw gn;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");Cc(Yn(of,"appEntity.selectAppEntity"),"appEntity.selectAppEntity",[e,t,n],r)}function sf(){return!(!jr(sr)||!sr.supports.appEntity)}const cf="v1";function uf(e){return new Promise((t=>{if(jr(sr),!lf())throw gn;if((Gn.hostClientType===an.android||Gn.hostClientType===an.teamsRoomsAndroid||Gn.hostClientType===an.teamsPhones||Gn.hostClientType===an.teamsDisplays)&&!Wr(Ke)){const e={errorCode:De.OLD_PLATFORM};throw new Error(JSON.stringify(e))}t(cc(Yn(cf,"teams.fullTrust.joinedTeams.getUserJoinedTeams"),"getUserJoinedTeams",e))}))}function lf(){return!(!jr(sr)||!sr.supports.teams)&&(!!sr.supports.teams.fullTrust&&!!sr.supports.teams.fullTrust.joinedTeams)}const df="v1";function ff(e){return new Promise((t=>{if(jr(sr),!pf())throw gn;t(cc(Yn(df,"teams.fullTrust.getConfigSetting"),"getConfigSetting",e))}))}function pf(){return!(!jr(sr)||!sr.supports.teams)&&!!sr.supports.teams.fullTrust}const gf="v1";var hf;function mf(e,t){if(jr(sr,cn.content),!wf())throw gn;if(!e)throw new Error("[teams.getTeamChannels] groupId cannot be null or empty");if(!t)throw new Error("[teams.getTeamChannels] Callback cannot be null");Cc(Yn(gf,"teams.getTeamChannels"),"teams.getTeamChannels",[e],t)}function vf(e,t){if(jr(sr),!wf())throw gn;if(!e)throw new Error("[teams.refreshSiteUrl] threadId cannot be null or empty");if(!t)throw new Error("[teams.refreshSiteUrl] Callback cannot be null");Cc(Yn(gf,"teams.refreshSiteUrl"),"teams.refreshSiteUrl",[e],t)}function wf(){return!(!jr(sr)||!sr.supports.teams)}!function(e){e[e.Regular=0]="Regular",e[e.Private=1]="Private",e[e.Shared=2]="Shared"}(hf||(hf={}));class Cf{static setTimeout(e,t){const n=performance.now(),r=Sn();return Cf.setTimeoutCallbacks[r]={callback:e,timeoutInMs:t,startedAtInMs:n},r}static clearTimeout(e){delete Cf.setTimeoutCallbacks[e]}static setInterval(e,t){Cf.setTimeout((function n(){e(),Cf.setTimeout(n,t)}),t)}static tick(){const e=performance.now(),t=[];for(const n in Cf.setTimeoutCallbacks){const r=Cf.setTimeoutCallbacks[n];e-r.startedAtInMs>=r.timeoutInMs&&t.push(n)}for(const e of t){Cf.setTimeoutCallbacks[e].callback(),delete Cf.setTimeoutCallbacks[e]}}}Cf.setTimeoutCallbacks={};class yf{constructor(e,t){this.reportStatisticsResult=t,this.sampleCount=0,this.distributionBins=new Uint32Array(e)}processStarts(e,t,n,r){Cf.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&&Cf.clearTimeout(this.timeoutId),this.timeoutId=Cf.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(yf.maxSessionTimeoutInMs,2*t.timeoutInMs):yf.initialSessionTimeoutInMs}}yf.initialSessionTimeoutInMs=1e3,yf.maxSessionTimeoutInMs=3e4;const Sf="v2";class bf{constructor(e){this.reportPerformanceEvent=e,this.isFirstFrameProcessed=!1,this.frameProcessTimeLimit=100,this.frameProcessingStartedAt=0,this.frameProcessingTimeCost=0,this.processedFrameCount=0,this.performanceStatistics=new yf(bf.distributionBinSize,(e=>this.reportPerformanceEvent(Yn(Sf,"videoPerformanceMonitor.performanceDataGenerated"),"video.performance.performanceDataGenerated",[e])))}startMonitorSlowFrameProcessing(){Cf.setInterval((()=>{if(0===this.processedFrameCount)return;const e=this.frameProcessingTimeCost/this.processedFrameCount;e>this.frameProcessTimeLimit&&this.reportPerformanceEvent(Yn(Sf,"videoPerformanceMonitor.startMonitorSlowFrameProcessing"),"video.performance.frameProcessingSlow",[e]),this.frameProcessingTimeCost=0,this.processedFrameCount=0}),bf.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){Cf.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(Yn(Sf,"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(Yn(Sf,"videoPerformanceMonitor.reportTextureStreamAcquired"),"video.performance.textureStreamAcquired",[this.currentStreamId,e])}}}bf.distributionBinSize=1e3,bf.calculateFPSInterval=1e3;var Af=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())}))},Ef=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 If="v2",Pf=Nn()?void 0:new bf(Cc);var Tf,Of,Rf;function Ff(e){if(jr(sr,cn.sidePanel),!Df())throw gn;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(ys(Yn(If,"videoEffects.setFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==Pf?void 0:Pf.setFrameProcessTimeLimit(e.timeLimit)),!1),Vf())Uf(e.videoFrameHandler,e.config);else{if(!jf())throw gn;Hf(e.videoBufferHandler,e.config)}null==Pf||Pf.startMonitorSlowFrameProcessing()}function kf(e,t){if(jr(sr,cn.sidePanel),!Df())throw gn;Cc(Yn(If,"videoEffects.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t])}function Mf(e){if(jr(sr,cn.sidePanel),!Df())throw gn;ys(Yn(If,"videoEffects.registerEffectParameterChangeHandler"),"video.effectParameterChange",ep(e,Pf),!1),Cc(Yn(If,"videoEffects.registerForVideoEffect"),"video.registerForVideoEffect")}function Nf(e){Cc(Yn(If,"videoEffects.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function xf(e){Cc(Yn(If,"videoEffects.notifyError"),"video.notifyError",[e])}function Df(){return jr(sr)&&!!sr.supports.video&&(!!sr.supports.video.mediaStream||!!sr.supports.video.sharedFrame)}function Uf(e,t){if(jr(sr,cn.sidePanel),!Df()||!Vf())throw gn;ys(Yn(If,"videoEffects.startVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(t=>Af(this,void 0,void 0,(function*(){const{streamId:n}=t,r=Lf(e,Pf);yield $f(n,r,xf,Pf)}))),!1),Cc(Yn(If,"videoEffects.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[t])}function Lf(e,t){return n=>Af(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 Hf(e,t){if(jr(sr,cn.sidePanel),!Df()||!jf())throw gn;ys(Yn(If,"videoEffects.registerForVideoBufferHandler"),"video.newVideoFrame",(t=>{if(t){const n=t.timestamp;null==Pf||Pf.reportStartFrameProcessing(t.width,t.height),e(_f(t),(()=>{null==Pf||Pf.reportFrameProcessed(),Nf(n)}),xf)}}),!1),Cc(Yn(If,"videoEffects.registerForVideoFrame"),"video.registerForVideoFrame",[t])}function _f(e){if("videoFrameBuffer"in e)return e;{const{data:t}=e,n=Ef(e,["data"]);return Object.assign(Object.assign({},n),{videoFrameBuffer:t})}}function Vf(){var e;return jr(sr,cn.sidePanel)&&Bf()&&!!(null===(e=sr.supports.video)||void 0===e?void 0:e.mediaStream)}function Bf(){var e,t,n,r;return!(!(null===(t=null===(e=Mn().chrome)||void 0===e?void 0:e.webview)||void 0===t?void 0:t.getTextureStream)||!(null===(r=null===(n=Mn().chrome)||void 0===n?void 0:n.webview)||void 0===r?void 0:r.registerTextureStream))}function jf(){var e;return jr(sr,cn.sidePanel)&&!!(null===(e=sr.supports.video)||void 0===e?void 0:e.sharedFrame)}!function(e){e.NV12="NV12"}(Tf||(Tf={})),function(e){e.EffectChanged="EffectChanged",e.EffectDisabled="EffectDisabled"}(Of||(Of={})),function(e){e.InvalidEffectId="InvalidEffectId",e.InitializationFailure="InitializationFailure"}(Rf||(Rf={}));var Wf=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 zf="v2";function $f(e,t,n,r){var o,i;return Wf(this,void 0,void 0,(function*(){const a=Jf();!Nn()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),Kf(yield Gf(e,n,r),new Qf(n,t),a.writable)}))}function qf(e,t,n,r){var o,i;return Wf(this,void 0,void 0,(function*(){const a=Jf();!Nn()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),Kf(yield Gf(e,n,r),new Yf(n,t),a.writable)}))}function Gf(e,t,n){return Wf(this,void 0,void 0,(function*(){if(Nn())throw gn;const r=Mn().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 Jf(){if(Nn())throw gn;const e=window.MediaStreamTrackGenerator;if(!e)throw gn;return new e({kind:"video"})}function Kf(e,t,n){new(0,Mn().MediaStreamTrackProcessor)({track:e}).readable.pipeThrough(new TransformStream(t)).pipeTo(n)}class Qf{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.transform=(e,t)=>Wf(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 Zf{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 Yf{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.shouldDiscardAudioInferenceResult=!1,this.transform=(e,t)=>Wf(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=>Wf(this,void 0,void 0,(function*(){if(Nn())throw gn;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 Zf(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}}})),ys(Yn(zf,"videoEffectsUtils.transformerWithMetadata.constructor"),"video.mediaStream.audioInferenceDiscardStatusChange",(({discardAudioInferenceResult:e})=>{this.shouldDiscardAudioInferenceResult=e}))}}function ep(e,t){return(n,r)=>{null==t||t.reportApplyingVideoEffect(n||"",r),e(n,r).then((()=>{null==t||t.reportVideoEffectChanged(n||"",r),Cc(Yn(zf,"videoEffectsUtils.reportVideoEffectChanged"),"video.videoEffectReadiness",[!0,n,void 0,r])})).catch((e=>{const t=e in Rf?e:Rf.InitializationFailure;Cc(Yn(zf,"videoEffectsUtils.effectFailure"),"video.videoEffectReadiness",[!1,n,t,r])}))}}var tp=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 np="v2",rp=2e3,op=Nn()?void 0:new bf(Cc);var ip;function ap(e){var t,n;if(!pp())throw gn;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(jr(sr,cn.sidePanel)){if(ys(Yn(np,"videoEffectsEX.registerSetFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==op?void 0:op.setFrameProcessTimeLimit(e)),!1),null===(t=sr.supports.video)||void 0===t?void 0:t.mediaStream)ys(Yn(np,"videoEffectsEX.registerStartVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(t=>tp(this,void 0,void 0,(function*(){const{streamId:n,metadataInTexture:r}=t,o=op?cp(e.videoFrameHandler,op):e.videoFrameHandler;r?yield qf(n,o,hp,op):yield $f(n,o,hp,op)}))),!1),Cc(Yn(np,"videoEffectsEX.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[e.config]);else{if(!(null===(n=sr.supports.video)||void 0===n?void 0:n.sharedFrame))throw gn;ys(Yn(np,"videoEffectsEx.registerNewVideoFrameHandler"),"video.newVideoFrame",(t=>{if(t){null==op||op.reportStartFrameProcessing(t.width,t.height);const n=sp(),r=t.timestamp;e.videoBufferHandler(up(t),(()=>{n(),null==op||op.reportFrameProcessed(),gp(r)}),hp)}}),!1),Cc(Yn(np,"videoEffectsEx.registerForVideoFrame"),"video.registerForVideoFrame",[e.config])}null==op||op.startMonitorSlowFrameProcessing()}}function sp(){const e=setTimeout((()=>{hp(`Frame not processed in ${rp}ms`,ip.Warn)}),rp);return function(){clearTimeout(e)}}function cp(e,t){return n=>tp(this,void 0,void 0,(function*(){const r=n.videoFrame;t.reportStartFrameProcessing(r.codedWidth,r.codedHeight);const o=sp(),i=yield e(n);return o(),t.reportFrameProcessed(),i}))}function up(e){return e.videoFrameBuffer=e.videoFrameBuffer||e.data,delete e.data,e}function lp(e,t,n){if(jr(sr,cn.sidePanel),!pp())throw gn;Cc(Yn(np,"videoEffectsEx.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t,n])}function dp(e){if(jr(sr,cn.sidePanel),!pp())throw gn;ys(Yn(np,"videoEffectsEx.registerEffectParamterChangeHandler"),"video.effectParameterChange",ep(e,op),!1),Cc(Yn(np,"videoEffectsEx.registerForVideoEffect"),"video.registerForVideoEffect")}function fp(e){if(jr(sr,cn.sidePanel),!Df())throw gn;Cc(Yn(np,"videoEffectsEx.updatePersonalizedEffects"),"video.personalizedEffectsChanged",[e])}function pp(){return jr(sr),Df()}function gp(e){Cc(Yn(np,"videoEffectsEx.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function hp(e,t=ip.Warn){Cc(Yn(np,"videoEffectsEx.notifyError"),"video.notifyError",[e,t])}function mp(e){if(jr(sr),!Df())throw gn;hp(e,ip.Fatal)}!function(e){e.Fatal="fatal",e.Warn="warn"}(ip||(ip={}));const vp="v2";class wp extends zi{validate(e){return"ConfigurableTab"===e.tabType}deserialize(e){return e}}class Cp{constructor(e){this.configurableTabInstance=e}serialize(){return this.configurableTabInstance}}class yp{constructor(e){this.hostEntityId=e}serialize(){return this.hostEntityId}}class Sp extends zi{validate(e){return"ConfigurableTab"===e.tabType||"StaticTab"===e.tabType}deserialize(e){return e}}class bp{constructor(e){this.hostEntityTabInstance=e}serialize(){return this.hostEntityTabInstance}}class Ap extends zi{validate(e){const t=new Sp;let n=!0;return e.allTabs&&e.allTabs.forEach((e=>{n||(n=t.validate(e))})),n}deserialize(e){return e}}function Ep(e,t){if(jr(sr),!Rp())throw new Error(`Error code: ${De.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);if(Fp(e.threadId),t&&0===t.length)throw new Error(`Error code: ${De.INVALID_ARGUMENTS}, message: App types cannot be an empty array`);return gc("hostEntity.tab.addAndConfigure",[new yp(e),t],new Sp,Yn(vp,"hostEntity.tab.addAndConfigure"))}function Ip(e){if(jr(sr),!Rp())throw new Error(`Error code: ${De.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return Fp(e.threadId),gc("hostEntity.tab.getAll",[new yp(e)],new Ap,Yn(vp,"hostEntity.tab.getAll"))}function Pp(e,t){if(jr(sr),!Rp())throw new Error(`Error code: ${De.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return kp(e),Fp(t.threadId),gc("hostEntity.tab.reconfigure",[new Cp(e),new yp(t)],new wp,Yn(vp,"hostEntity.tab.reconfigure"))}function Tp(e,t){if(jr(sr),!Rp())throw new Error(`Error code: ${De.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return kp(e),Fp(t.threadId),gc("hostEntity.tab.rename",[new Cp(e),new yp(t)],new wp,Yn(vp,"hostEntity.tab.rename"))}function Op(e,t){if(jr(sr),!Rp())throw new Error(`Error code: ${De.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return Fp(t.threadId),kp(e),gc("hostEntity.tab.remove",[new bp(e),new yp(t)],new $i,Yn(vp,"hostEntity.tab.remove"))}function Rp(){var e;return!!(jr(sr)&&Np()&&(null===(e=sr.supports.hostEntity)||void 0===e?void 0:e.tab))}function Fp(e){if(!e||0==e.length)throw new Error(`Error code: ${De.INVALID_ARGUMENTS}, message: ThreadId cannot be null or empty`)}function kp(e){if(!(null==e?void 0:e.internalTabInstanceId)||0===e.internalTabInstanceId.length)throw new Error(`Error code: ${De.INVALID_ARGUMENTS}, message: TabId cannot be null or empty`)}var Mp;function Np(){return!(!jr(sr)||!sr.supports.hostEntity)}!function(e){e.edu="EDU",e.baseTownhall="BASE_TOWNHALL",e.streamingTownhall="STREAMING_TOWNHALL"}(Mp||(Mp={}));var xp=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 Dp="v2",Up="Invalid store dialog size",Lp="No App Id present, but AppId needed to open AppDetail store",Hp="No Collection Id present, but CollectionId needed to open a store specific to a collection";function _p(e){return xp(this,void 0,void 0,(function*(){zp();const{size:t}=null!=e?e:{};return hc("store.openFullStore",[$p(t)],Yn(Dp,"store.openFullStore"))}))}function Vp(e){return xp(this,void 0,void 0,(function*(){zp();const{size:t,appId:n}=e;if(!(n instanceof to))throw new Error(Lp);return hc("store.openAppDetail",[$p(t),n],Yn(Dp,"store.openAppDetail"))}))}function Bp(e){return xp(this,void 0,void 0,(function*(){zp();const{size:t,appCapability:n,appMetaCapabilities:r,installationScope:o,filteredOutAppIds:i}=null!=e?e:{};return hc("store.openInContextStore",[$p(t),n,r,o,null==i?void 0:i.map((e=>e.toString()))],Yn(Dp,"store.openInContextStore"))}))}function jp(e){return xp(this,void 0,void 0,(function*(){zp();const{size:t,collectionId:n}=e;if(void 0===n)throw new Error(Hp);return hc("store.openSpecificStore",[$p(t),n],Yn(Dp,"store.openSpecificStore"))}))}function Wp(){return jr(sr)&&!!sr.supports.store}function zp(){if(jr(sr,cn.content,cn.sidePanel,cn.meetingStage),!Wp())throw gn}function $p(e){if(void 0===e)return;const{width:t,height:n}=e;if(void 0!==t&&"number"==typeof t&&t<0)throw new Error(Up);if(void 0!==n&&"number"==typeof n&&n<0)throw new Error(Up);return JSON.stringify(e)}var qp=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 Gp="v1",Jp="v2";let Kp;function Qp(e){Kp=e}function Zp(e){const t=void 0!==e,n=t?e:Kp;if(!n)throw new Error("No parameters are provided for authentication");jr(sr,cn.content,cn.sidePanel,cn.settings,cn.remove,cn.task,cn.stage,cn.meetingStage);return Xp(n.successCallback||n.failureCallback?Yn(Gp,"authentication.authenticate"):Yn(Jp,"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 qp(this,void 0,void 0,(function*(){const n=Un(t.url);return Dn(n),fc(e,"authentication.authenticate",[n.href,t.width,t.height,t.isExternal]).then((([e,t])=>{if(e)return t;throw new Error(t)}))}))}function Yp(e){Br();return eg(e&&(e.successCallback||e.failureCallback)?Yn(Gp,"authentication.getAuthToken"):Yn(Jp,"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 eg(e,t){return new Promise((n=>{n(fc(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 tg(e){Br();return ng(e&&(e.successCallback||e.failureCallback)?Yn(Gp,"authentication.getUser"):Yn(Jp,"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 ng(e){return new Promise((t=>{t(fc(e,"authentication.getUser"))})).then((([e,t])=>{if(e)return t;throw t}))}function rg(e,t){jr(sr,cn.authentication);Cc(Yn(t?Gp:Jp,"authentication.notifySuccess"),"authentication.authenticate.success",[e]),Wc(oc.parentWindow,(()=>setTimeout((()=>oc.currentWindow.close()),200)))}function og(e,t){jr(sr,cn.authentication);Cc(Yn(t?Gp:Jp,"authentication.notifyFailure"),"authentication.authenticate.failure",[e]),Wc(oc.parentWindow,(()=>setTimeout((()=>oc.currentWindow.close()),200)))}var ig;function ag(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"}(ig||(ig={}));class sg{constructor(e){this.val=e,ag(e)}toString(){return this.val}}const cg="/l/app/",ug="/l/meeting/new",lg="attendees",dg="startTime",fg="endTime",pg="subject",gg="content",hg="/l/call/0/0",mg="source",vg="withVideo",wg="/l/chat/0/0",Cg="users",yg="topicName",Sg="message";function bg(e,t,n){if(0===e.length)throw new Error("Must have at least one user when creating a chat deep link");const r=`${Cg}=`+e.map((e=>encodeURIComponent(e))).join(","),o=void 0===t?"":`&${yg}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${Sg}=${encodeURIComponent(n)}`;return`${it}://${at}${wg}?${r}${o}${i}`}function Ag(e,t,n){if(0===e.length)throw new Error("Must have at least one target when creating a call deep link");const r=`${Cg}=`+e.map((e=>encodeURIComponent(e))).join(","),o=void 0===t?"":`&${vg}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${mg}=${encodeURIComponent(n)}`;return`${it}://${at}${hg}?${r}${o}${i}`}function Eg(e,t,n,r,o){const i=void 0===e?"":`${lg}=`+e.map((e=>encodeURIComponent(e))).join(","),a=void 0===t?"":`&${dg}=${encodeURIComponent(t)}`,s=void 0===n?"":`&${fg}=${encodeURIComponent(n)}`,c=void 0===r?"":`&${pg}=${encodeURIComponent(r)}`,u=void 0===o?"":`&${gg}=${encodeURIComponent(o)}`;return`${it}://${at}${ug}?${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`${it}://${at}${cg}${encodeURIComponent(e)}`}const Pg="v1";function Tg(e){return new Promise((t=>{if(jr(sr,cn.content,cn.sidePanel,cn.settings,cn.task,cn.stage,cn.meetingStage),!Og())throw new Error("Not supported");const n=Yn(Pg,"appInstallDialog.openAppInstallDialog");sr.isLegacyTeams?t(uc(n,"executeDeepLink",Ig(e.appId))):(Cc(n,"appInstallDialog.openAppInstallDialog",[e]),t())}))}function Og(){return!(!jr(sr)||!sr.supports.appInstallDialog)}const Rg="v1",Fg=Xn("media");var kg,Mg,Ng,xg,Dg,Ug,Lg;!function(e){e.Base64="base64",e.ID="id"}(kg||(kg={}));class Hg{}function _g(e){if(!e)throw new Error("[captureImage] Callback cannot be null");if(jr(sr,cn.content,cn.task),Gn.isFramelessWindow)if(Wr(Xe))Cc(Yn(Rg,"media.captureImage"),"captureImage",e);else{e({errorCode:De.OLD_PLATFORM},[])}else{e({errorCode:De.NOT_SUPPORTED_ON_PLATFORM},[])}}function Vg(){if(jr(sr,cn.content,cn.task),!jg())throw gn;const e=Ue.Media;return new Promise((t=>{t(dc(Yn(Rg,"media.hasPermission"),"permissions.has",e))}))}function Bg(){if(jr(sr,cn.content,cn.task),!jg())throw gn;const e=Ue.Media;return new Promise((t=>{t(dc(Yn(Rg,"media.requestPermission"),"permissions.request",e))}))}function jg(){return!(!jr(sr)||!sr.supports.permissions)}class Wg extends Hg{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(jr(sr,cn.content,cn.task),Wr(Ye))if(rh(this.mimeType,this.format,this.content))Wr("2.0.0")?this.getMediaViaCallback(e):this.getMediaViaHandler(e);else{e({errorCode:De.INVALID_ARGUMENTS},new Blob)}else{e({errorCode:De.OLD_PLATFORM},new Blob)}}getMediaViaCallback(e){const t={mediaMimeType:this.mimeType,assembleAttachment:[]},n=[this.content];Cc(Yn(Rg,"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=Qg(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:De.INTERNAL_ERROR,message:"data received is null"},new Blob)}))}getMediaViaHandler(e){const t=Sn(),n={mediaMimeType:this.mimeType,assembleAttachment:[]},r=[t,this.content];this.content&&!no(e)&&Cc(Yn(Rg,"media.getMedia"),"getMedia",r),ys(Yn(Rg,"media.registerGetMediaRequestHandler"),"getMedia"+t,(function(r){if(e){const o=JSON.parse(r);if(o.error)e(o.error,new Blob),Ss("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),Ss("getMedia"+t)}else{const e=Qg(o.mediaChunk,n.mediaMimeType);e&&n.assembleAttachment.push(e)}else e({errorCode:De.INTERNAL_ERROR,message:"data received is null"},new Blob),Ss("getMedia"+t)}}))}}class zg{constructor(e){this.controllerCallback=e}notifyEventToHost(e,t){jr(sr,cn.content,cn.task);try{$r(Ge)}catch(e){return void(t&&t(e))}const n={mediaType:this.getMediaType(),mediaControllerEvent:e};Cc(Yn(Rg,"media.controller"),"media.controller",[n],(e=>{t&&t(e)}))}stop(e){this.notifyEventToHost(Mg.StopRecording,e)}}class $g extends zg{getMediaType(){return Dg.Video}notifyEventToApp(e){if(this.controllerCallback)switch(e){case Mg.StartRecording:if(this.controllerCallback.onRecordingStarted){this.controllerCallback.onRecordingStarted();break}}}}function qg(e,t){if(!t)throw new Error("[select Media] Callback cannot be null");if(jr(sr,cn.content,cn.task),!Wr(Ye)){const e={errorCode:De.OLD_PLATFORM};return void t(e,[])}try{Zg(e)}catch(e){return void t(e,[])}if(!Yg(e)){const e={errorCode:De.INVALID_ARGUMENTS};return void t(e,[])}const n=[e];Cc(Yn(Rg,"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 Wg(e));t(n,s)}))}function Gg(e,t){if(!t)throw new Error("[view images] Callback cannot be null");if(jr(sr,cn.content,cn.task),!Wr(Ye)){return void t({errorCode:De.OLD_PLATFORM})}if(!oh(e)){return void t({errorCode:De.INVALID_ARGUMENTS})}const n=[e];Cc(Yn(Rg,"media.viewImages"),"viewImages",n,t)}function Jg(e,t){if(!e)throw new Error("[media.scanBarCode] Callback cannot be null");if(jr(sr,cn.content,cn.task),Gn.hostClientType!==an.desktop&&Gn.hostClientType!==an.web&&Gn.hostClientType!==an.rigel&&Gn.hostClientType!==an.teamsRoomsWindows&&Gn.hostClientType!==an.teamsRoomsAndroid&&Gn.hostClientType!==an.teamsPhones&&Gn.hostClientType!==an.teamsDisplays)if(Wr(et))if(ih(t))Cc(Yn(Rg,"media.scanBarCode"),"media.scanBarCode",[t],e);else{e({errorCode:De.INVALID_ARGUMENTS},"")}else{e({errorCode:De.OLD_PLATFORM},"")}else{e({errorCode:De.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 Qg(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 Zg(e){th(e)?$r(qe):nh(e)?$r(Ge):eh(e)&&$r(Je)}function Xg(e){return!(e.mediaType!=Dg.Video||!e.videoProps||!e.videoProps.videoController)}function Yg(e){return!(null==e||e.maxMediaCount>10)}function eh(e){var t;return!((null==e?void 0:e.mediaType)!=Dg.Image||!(null===(t=null==e?void 0:e.imageProps)||void 0===t?void 0:t.imageOutputFormats))}function th(e){return!(!e||e.mediaType!=Dg.VideoAndImage&&!e.videoAndImageProps)}function nh(e){return!(!e||e.mediaType!=Dg.Video||!e.videoProps||e.videoProps.isFullScreenMode)}function rh(e,t,n){return null!=e&&null!=t&&t==kg.ID&&null!=n}function oh(e){return!(null==e||e.length<=0||e.length>10)}function ih(e){return!e||!(null===e.timeOutIntervalInSec||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec<=0||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec>60)}function ah(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"}(Mg||(Mg={})),function(e){e[e.Photo=1]="Photo",e[e.Document=2]="Document",e[e.Whiteboard=3]="Whiteboard",e[e.BusinessCard=4]="BusinessCard"}(Ng||(Ng={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(xg||(xg={})),function(e){e[e.Image=1]="Image",e[e.Video=2]="Video",e[e.VideoAndImage=3]="VideoAndImage",e[e.Audio=4]="Audio"}(Dg||(Dg={})),function(e){e[e.ID=1]="ID",e[e.URL=2]="URL"}(Ug||(Ug={})),function(e){e[e.IMAGE=1]="IMAGE",e[e.PDF=2]="PDF"}(Lg||(Lg={}));const sh="v2";function ch(e){return new Promise((t=>{if(jr(sr,cn.content,cn.task),!dh())throw gn;if(!ih(e))throw{errorCode:De.INVALID_ARGUMENTS};t(dc(Yn(sh,"barCode.scanBarCode"),"media.scanBarCode",e))}))}function uh(){if(jr(sr,cn.content,cn.task),!dh())throw gn;const e=Ue.Media;return new Promise((t=>{t(dc(Yn(sh,"barCode.hasPermission"),"permissions.has",e))}))}function lh(){if(jr(sr,cn.content,cn.task),!dh())throw gn;const e=Ue.Media;return new Promise((t=>{t(dc(Yn(sh,"barCode.requestPermission"),"permissions.request",e))}))}function dh(){return!!(jr(sr)&&sr.supports.barCode&&sr.supports.permissions)}const fh="v2";function ph(e){return gh(Yn(fh,"chat.openChat"),e)}function gh(e,t){return new Promise((n=>{if(jr(sr,cn.content,cn.task),!mh())throw gn;if(sr.isLegacyTeams)n(uc(e,"executeDeepLink",bg([t.user],void 0,t.message)));else{n(uc(e,"chat.openChat",{members:[t.user],message:t.message}))}}))}function hh(e){const t=Yn(fh,"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(gh(t,r))}else{if(jr(sr,cn.content,cn.task),!mh())throw gn;if(sr.isLegacyTeams)n(uc(t,"executeDeepLink",bg(e.users,e.topic,e.message)));else{n(uc(t,"chat.openChat",{members:e.users,message:e.message,topic:e.topic}))}}}))}function mh(){return!(!jr(sr)||!sr.supports.chat)}var vh=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 wh="v2";function Ch(e){return vh(this,void 0,void 0,(function*(){if(jr(sr,cn.content,cn.meetingStage,cn.task,cn.settings,cn.stage,cn.sidePanel),!Sh())throw gn;if(!e.type||!Object.values(Be).includes(e.type))throw new Error(`Blob type ${e.type} is not supported. Supported blob types are ${Object.values(Be)}`);const t=yield kn(e),n={mimeType:e.type,content:t};return dc(Yn(wh,"clipboard.write"),"clipboard.writeToClipboard",n)}))}function yh(){return vh(this,void 0,void 0,(function*(){jr(sr,cn.content,cn.meetingStage,cn.task,cn.settings,cn.stage,cn.sidePanel);const e=Yn(wh,"clipboard.read");if(!Sh())throw gn;const t=yield dc(e,"clipboard.readFromClipboard");if("string"==typeof t){const e=JSON.parse(t);return Fn(e.mimeType,e.content)}return t}))}function Sh(){return Gn.isFramelessWindow?!(!jr(sr)||!sr.supports.clipboard):!!(jr(sr)&&navigator&&navigator.clipboard&&sr.supports.clipboard)}var bh=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 Ah="v2",Eh={validate:e=>Array.isArray(e)||"object"==typeof e,deserialize:e=>e};var Ih;function Ph(){var e;return null!==(e=jr(sr)&&(sr.isNAAChannelRecommended||kh()))&&void 0!==e&&e}function Th(){return jr(sr),oc.parentOrigin}function Oh(){var e;return null!==(e=jr(sr)&&sr.canParentManageNAATrustedOrigins)&&void 0!==e&&e}function Rh(){var e;return null!==(e=jr(sr)&&(sr.isDeeplyNestedAuthSupported||Fh()))&&void 0!==e&&e}function Fh(){return!!(jr(sr)&&Mh()&&sr.isLegacyTeams&&Wr(gr))}function kh(){return!!(jr(sr)&&Mh()&&sr.isLegacyTeams&&sr.supports.nestedAppAuth)}function Mh(){return Gn.hostClientType===an.android||Gn.hostClientType===an.ios||Gn.hostClientType===an.ipados||Gn.hostClientType===an.visionOS}function Nh(e){return bh(this,void 0,void 0,(function*(){if(!Oh())throw gn;const t=e.map(Uh);return Dh(Ih.ADD,t)}))}function xh(e){return bh(this,void 0,void 0,(function*(){if(!Oh())throw gn;const t=e.map(Uh);return Dh(Ih.DELETE,t)}))}function Dh(e,t){return bh(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 gc("nestedAppAuth.manageNAATrustedOrigins",[new Lh(e,t)],Eh,Yn(Ah,"nestedAppAuth.manageNAATrustedOrigins"))}))}function Uh(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"}(Ih||(Ih={}));class Lh{constructor(e,t){this.action=e,this.appOrigins=t}serialize(){return{action:this.action,appOrigins:this.appOrigins}}}const Hh="v2";function _h(){if(jr(sr,cn.content,cn.task),!Bh())throw gn;return dc(Yn(Hh,"geoLocation.map.chooseLocation"),"location.getLocation",{allowChooseLocation:!0,showMap:!0})}function Vh(e){if(jr(sr,cn.content,cn.task),!Bh())throw gn;if(!e)throw{errorCode:De.INVALID_ARGUMENTS};return dc(Yn(Hh,"geoLocation.showLocation"),"location.showLocation",e)}function Bh(){return!!(jr(sr)&&sr.supports.geoLocation&&sr.supports.geoLocation.map&&sr.supports.permissions)}const jh="v2";function Wh(){if(jr(sr,cn.content,cn.task),!qh())throw gn;return dc(Yn(jh,"geoLocation.getCurrentLocation"),"location.getLocation",{allowChooseLocation:!1,showMap:!1})}function zh(){if(jr(sr,cn.content,cn.task),!qh())throw gn;const e=Ue.GeoLocation;return new Promise((t=>{t(dc(Yn(jh,"geoLocation.hasPermission"),"permissions.has",e))}))}function $h(){if(jr(sr,cn.content,cn.task),!qh())throw gn;const e=Ue.GeoLocation;return new Promise((t=>{t(dc(Yn(jh,"geoLocation.requestPermission"),"permissions.request",e))}))}function qh(){return!!(jr(sr)&&sr.supports.geoLocation&&sr.supports.permissions)}function Gh(){return sr.hostVersionsInfo?sr.hostVersionsInfo.adaptiveCardSchemaVersion:void 0}const Jh="v1";class Kh{postMessage(e,t){jr(sr),Cc(Yn(Jh,"appWindow.childAppWindow.postMessage"),"messageForChild",[e],t||Cn())}addEventListener(e,t){jr(sr),"message"===e&&ys(Yn(Jh,"appWindow.childAppWindow.addEventListener"),"messageForParent",t)}}class Qh{static get Instance(){return this._instance||(this._instance=new this)}postMessage(e,t){jr(sr,cn.task),Cc(Yn(Jh,"appWindow.parentAppWindow.postMessage"),"messageForParent",[e],t||Cn())}addEventListener(e,t){jr(sr,cn.task),"message"===e&&ys(Yn(Jh,"appWindow.parentAppWindow.addEventListener"),"messageForChild",t)}}const Zh="v2";function Xh(e){if(jr(sr,cn.content),!Yh())throw gn;if(!e||!Rn(e))throw{errorCode:De.INVALID_ARGUMENTS,message:"Invalid Url: Only https URL is allowed"};return dc(Yn(Zh,"secondaryBrowser.openUrl"),"secondaryBrowser.open",e.toString())}function Yh(){return!(!jr(sr)||!sr.supports.secondaryBrowser)}const em="v1";function tm(e,t){if(!t)throw new Error("[location.getLocation] Callback cannot be null");if(jr(sr,cn.content,cn.task),!Wr(Qe))throw{errorCode:De.OLD_PLATFORM};if(!e)throw{errorCode:De.INVALID_ARGUMENTS};if(!rm())throw gn;Cc(Yn(em,"location.getLocation"),"location.getLocation",[e],t)}function nm(e,t){if(!t)throw new Error("[location.showLocation] Callback cannot be null");if(jr(sr,cn.content,cn.task),!Wr(Qe))throw{errorCode:De.OLD_PLATFORM};if(!e)throw{errorCode:De.INVALID_ARGUMENTS};if(!rm())throw gn;Cc(Yn(em,"location.showLocation"),"location.showLocation",[e],t)}function rm(){return!(!jr(sr)||!sr.supports.location)}const om="v1";function im(e){jr(sr,cn.sidePanel),e.contentUrl&&new URL(e.contentUrl),Cc(Yn(om,"meeting.appShareButton.setOptions"),"meeting.appShareButton.setOptions",[e])}var am=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 sm="v1";var cm,um,lm,dm,fm,pm;function gm(e){if(!e)throw new Error("[get incoming client audio state] Callback cannot be null");jr(sr,cn.sidePanel,cn.meetingStage),Cc(Yn(sm,"meeting.getIncomingClientAudioState"),"getIncomingClientAudioState",e)}function hm(e){if(!e)throw new Error("[toggle incoming client audio] Callback cannot be null");jr(sr,cn.sidePanel,cn.meetingStage),Cc(Yn(sm,"meeting.toggleIncomingClientAudio"),"toggleIncomingClientAudio",e)}function mm(e){if(!e)throw new Error("[get meeting details] Callback cannot be null");jr(sr,cn.sidePanel,cn.meetingStage,cn.settings,cn.content),Cc(Yn(sm,"meeting.getMeetingDetails"),"meeting.getMeetingDetails",e)}function vm(){var e,t,n;return am(this,void 0,void 0,(function*(){let r;jr(sr,cn.sidePanel,cn.meetingStage,cn.settings,cn.content);try{const e=!0;r=yield dc(Yn("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)==dm.GroupCall||(null===(n=r.details)||void 0===n?void 0:n.type)==dm.OneOnOneCall)&&!r.details.originalCallerInfo)throw new Error(De.NOT_SUPPORTED_ON_PLATFORM.toString());return r}))}function wm(e){if(!e)throw new Error("[get Authentication Token For AnonymousUser] Callback cannot be null");jr(sr,cn.sidePanel,cn.meetingStage,cn.task),Cc(Yn(sm,"meeting.getAuthenticationTokenForAnonymousUser"),"meeting.getAuthenticationTokenForAnonymousUser",e)}function Cm(e){if(!e)throw new Error("[get live stream state] Callback cannot be null");jr(sr,cn.sidePanel),Cc(Yn(sm,"meeting.getLiveStreamState"),"meeting.getLiveStreamState",e)}function ym(e,t,n){if(!e)throw new Error("[request start live streaming] Callback cannot be null");jr(sr,cn.sidePanel),Cc(Yn(sm,"meeting.requestStartLiveStreaming"),"meeting.requestStartLiveStreaming",[t,n],e)}function Sm(e){if(!e)throw new Error("[request stop live streaming] Callback cannot be null");jr(sr,cn.sidePanel),Cc(Yn(sm,"meeting.requestStopLiveStreaming"),"meeting.requestStopLiveStreaming",e)}function bm(e){if(!e)throw new Error("[register live stream changed handler] Handler cannot be null");jr(sr,cn.sidePanel),ys(Yn(sm,"meeting.registerLiveStreamChangedHandler"),"meeting.liveStreamChanged",e)}function Am(e,t,n={sharingProtocol:fm.Collaborative}){if(!e)throw new Error("[share app content to stage] Callback cannot be null");jr(sr,cn.sidePanel,cn.meetingStage),Cc(Yn(sm,"meeting.shareAppContentToStage"),"meeting.shareAppContentToStage",[t,n],e)}function Em(e){if(!e)throw new Error("[get app content stage sharing capabilities] Callback cannot be null");jr(sr,cn.sidePanel,cn.meetingStage),Cc(Yn(sm,"meeting.getAppContentStageSharingCapabilities"),"meeting.getAppContentStageSharingCapabilities",e)}function Im(e){if(!e)throw new Error("[stop sharing app content to stage] Callback cannot be null");jr(sr,cn.sidePanel,cn.meetingStage),Cc(Yn(sm,"meeting.stopSharingAppContentToStage"),"meeting.stopSharingAppContentToStage",e)}function Pm(e){if(!e)throw new Error("[get app content stage sharing state] Callback cannot be null");jr(sr,cn.sidePanel,cn.meetingStage),Cc(Yn(sm,"meeting.getAppContentStageSharingState"),"meeting.getAppContentStageSharingState",e)}function Tm(e){if(!e)throw new Error("[registerSpeakingStateChangeHandler] Handler cannot be null");jr(sr,cn.sidePanel,cn.meetingStage),ys(Yn(sm,"meeting.registerSpeakingStateChangeHandler"),"meeting.speakingStateChanged",e)}function Om(e){if(!e)throw new Error("[registerRaiseHandStateChangedHandler] Handler cannot be null");jr(sr,cn.sidePanel,cn.meetingStage),ys(Yn(sm,"meeting.registerRaiseHandStateChangedHandler"),"meeting.raiseHandStateChanged",e)}function Rm(e){if(!e)throw new Error("[registerMeetingReactionReceivedHandler] Handler cannot be null");jr(sr,cn.sidePanel,cn.meetingStage),ys(Yn(sm,"meeting.registerMeetingReactionReceivedHandler"),"meeting.meetingReactionReceived",e)}function Fm(e){if(void 0===(null==e?void 0:e.joinWebUrl)||null===(null==e?void 0:e.joinWebUrl))return Promise.reject(new Error("Invalid joinMeetingParams"));jr(sr);const t={joinWebUrl:e.joinWebUrl.href,source:e.source||pm.Other};return dc(Yn("v2","meeting.joinMeeting"),"meeting.joinMeeting",t)}function km(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");jr(sr,cn.sidePanel,cn.meetingStage),e.isAppHandlingAudio?Mm(e,t):Nm(e,t)}function Mm(e,t){Cc(Yn(sm,"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");ys(Yn(sm,"meeting.registerMicStateChangeHandler"),"meeting.micStateChanged",(t=>am(this,void 0,void 0,(function*(){try{const n=yield e.micMuteStateChangedCallback(t);Dm(n,n.isMicMuted===t.isMicMuted?cm.HostInitiated:cm.AppDeclinedToChange)}catch(e){Dm(t,cm.AppFailedToChange)}}))));ys(Yn(sm,"meeting.registerAudioDeviceSelectionChangedHandler"),"meeting.audioDeviceSelectionChanged",(t=>{var n;null===(n=e.audioDeviceSelectionChangedCallback)||void 0===n||n.call(e,t)})),t(r)}))}function Nm(e,t){Cc(Yn(sm,"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");bs("meeting.micStateChanged")&&Ss("meeting.micStateChanged"),bs("meeting.audioDeviceSelectionChanged")&&Ss("meeting.audioDeviceSelectionChanged"),t(n)}))}function xm(e){Dm(e,cm.AppInitiated)}function Dm(e,t){jr(sr,cn.sidePanel,cn.meetingStage),Cc(Yn(sm,"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"}(cm||(cm={})),function(e){e.like="like",e.heart="heart",e.laugh="laugh",e.surprised="surprised",e.applause="applause"}(um||(um={})),function(e){e.Unknown="Unknown",e.Adhoc="Adhoc",e.Scheduled="Scheduled",e.Recurring="Recurring",e.Broadcast="Broadcast",e.MeetNow="MeetNow"}(lm||(lm={})),function(e){e.OneOnOneCall="oneOnOneCall",e.GroupCall="groupCall"}(dm||(dm={})),function(e){e.Collaborative="Collaborative",e.ScreenShare="ScreenShare"}(fm||(fm={})),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"}(pm||(pm={}));const Um="v1",Lm="v2";function Hm(e,t){let n,r,o="";"function"==typeof e?(n=e,r=t,o=Yn(Um,"monetization.openPurchaseExperience")):(r=e,o=Yn(Lm,"monetization.openPurchaseExperience"));return jr(sr,cn.content),In((()=>new Promise((e=>{if(!_m())throw gn;e(dc(o,"monetization.openPurchaseExperience",r))}))),n)}function _m(){return!(!jr(sr)||!sr.supports.monetization)}const Vm="v2";function Bm(e){return new Promise((t=>{if(jr(sr,cn.content),!Wm())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openCalendarItem");t(uc(Yn(Vm,"calendar.openCalendarItem"),"calendar.openCalendarItem",e))}))}function jm(e){return new Promise((t=>{if(jr(sr,cn.content),!Wm())throw new Error("Not supported");const n=Yn(Vm,"calendar.composeMeeting");sr.isLegacyTeams?t(uc(n,"executeDeepLink",Eg(e.attendees,e.startTime,e.endTime,e.subject,e.content))):t(uc(n,"calendar.composeMeeting",e))}))}function Wm(){return!(!jr(sr)||!sr.supports.calendar)}const zm="v2";function $m(e){e&&0!==e.length&&e.forEach((e=>{ag(e)}))}function qm(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===ev.New&&($m(t.toRecipients),$m(t.ccRecipients),$m(t.bccRecipients))}function Gm(e){if(jr(sr,cn.content),!Jm())throw new Error("Not supported");return qm(e),hc("mail.handoff.composeMail",[new Km(e)],Yn(zm,"mail.handoff.composeMail"))}function Jm(){return!!(jr(sr)&&sr.supports.mail&&sr.supports.mail.handoff)}class Km{constructor(e){this.composeMailParamsWithHandoff=e}serialize(){return this.composeMailParamsWithHandoff}}const Qm="v2";function Zm(e){return new Promise((t=>{if(jr(sr,cn.content),!Ym())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openMailItem");t(uc(Yn(Qm,"mail.openMailItem"),"mail.openMailItem",e))}))}function Xm(e){return new Promise((t=>{if(jr(sr,cn.content),!Ym())throw new Error("Not supported");t(uc(Yn(Qm,"mail.composeMail"),"mail.composeMail",e))}))}function Ym(){return!(!jr(sr)||!sr.supports.mail)}var ev;!function(e){e.New="new",e.Reply="reply",e.ReplyAll="replyAll",e.Forward="forward"}(ev||(ev={}));const tv="v2";function nv(){if(!Gn.printCapabilityEnabled){if(jr(sr),!cv())throw gn;Gn.printCapabilityEnabled=!0,document.addEventListener("keydown",(e=>{(e.ctrlKey||e.metaKey)&&80===e.keyCode&&(rv(),e.cancelBubble=!0,e.preventDefault(),e.stopImmediatePropagation())}))}}function rv(){Mn().print()}function ov(e){iv(Yn(tv,"teamsAPIs_registerOnLoadHandler"),e,(()=>{if(!no(e)&&!cv())throw gn}))}function iv(e,t,n){!no(t)&&jr(sr),!no(t)&&n&&n(),Os(e,t)}function av(e){sv(Yn(tv,"teamsAPIs_registerBeforeUnloadHandler"),e,(()=>{if(!no(e)&&!cv())throw gn}))}function sv(e,t,n){!no(t)&&jr(sr),!no(t)&&n&&n(),ks(e,t)}function cv(){return!(!jr(sr)||!sr.supports.teamsCore)}const uv="v1",lv="v2";function dv(e,t){let n,r;jr(sr,cn.content,cn.task,cn.settings);let o="";return"function"==typeof e?([n,r]=[e,t],o=Yn(uv,"people.selectPeople")):(r=e,o=Yn(lv,"people.selectPeople")),An(fv,n,o,r)}function fv(e,t){return new Promise((n=>{if(!Wr(Ze))throw{errorCode:De.OLD_PLATFORM};if(!ah(t))throw{errorCode:De.INVALID_ARGUMENTS};if(!pv())throw gn;n(dc(e,"people.selectPeople",t))}))}function pv(){return!(!jr(sr)||!sr.supports.people)}function gv(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?hv(e.persona):[!1,"triggerType must be a valid string"]:[!1,"targetElementBoundingRect must be a DOMRect"]:[!1,"A request object is required"]}function hv(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 mv="v2";function vv(e){return jr(sr,cn.content),new Promise((t=>{const[n,r]=gv(e);if(!n)throw{errorCode:De.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(dc(Yn(mv,"profile.showProfile"),"profile.showProfile",o))}))}function wv(){return!(!jr(sr)||!sr.supports.profile)}const Cv="v2",yv="search.queryChange",Sv="search.queryClose",bv="search.queryExecute";function Av(e,t,n){if(jr(sr,cn.content),!Iv())throw gn;ys(Yn(Cv,"search.registerOnClosedHandler"),Sv,e),ys(Yn(Cv,"search.registerOnExecutedHandler"),bv,t),n&&ys(Yn(Cv,"search.registerOnChangeHandler"),yv,n)}function Ev(){if(jr(sr,cn.content),!Iv())throw gn;Cc(Yn(Cv,"search.unregisterHandlers"),"search.unregister"),Ss(yv),Ss(Sv),Ss(bv)}function Iv(){return!(!jr(sr)||!sr.supports.search)}function Pv(){return new Promise((e=>{if(jr(sr,cn.content),!Iv())throw new Error("Not supported");e(uc(Yn(Cv,"search.closeSearch"),"search.closeSearch"))}))}var Tv=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 Ov="v2";function Rv(){return Tv(this,void 0,void 0,(function*(){if(jr(sr,cn.sidePanel,cn.meetingStage),!Fv())throw gn;return yield dc(Yn(Ov,"sharing.history.getContent"),"sharing.history.getContent")}))}function Fv(){var e;return jr(sr)&&void 0!==(null===(e=sr.supports.sharing)||void 0===e?void 0:e.history)}const kv="v1",Mv="v2",Nv={shareWebContent:"sharing.shareWebContent"};function xv(e,t){try{Uv(e),Lv(e),Hv(e)}catch(e){return En((()=>Promise.reject(e)),t)}jr(sr,cn.content,cn.sidePanel,cn.task,cn.stage,cn.meetingStage);return En(Dv,t,Yn(t?kv:Mv,"sharing.shareWebContent"),e)}function Dv(e,t){return new Promise((n=>{if(!_v())throw gn;n(dc(e,Nv.shareWebContent,t))}))}function Uv(e){if(!(e&&e.content&&e.content.length)){throw{errorCode:De.INVALID_ARGUMENTS,message:"Shared content is missing"}}}function Lv(e){let t;if(e.content.some((e=>!e.type)))throw t={errorCode:De.INVALID_ARGUMENTS,message:"Shared content type cannot be undefined"},t;if(e.content.some((t=>t.type!==e.content[0].type)))throw t={errorCode:De.INVALID_ARGUMENTS,message:"Shared content must be of the same type"},t}function Hv(e){let t;if("URL"!==e.content[0].type)throw t={errorCode:De.INVALID_ARGUMENTS,message:"Content type is unsupported"},t;if(e.content.some((e=>!e.url)))throw t={errorCode:De.INVALID_ARGUMENTS,message:"URLs are required for URL content types"},t}function _v(){return!(!jr(sr)||!sr.supports.sharing)}const Vv="v2";function Bv(){return new Promise((e=>{if(jr(sr,cn.content),!jv())throw gn;e(dc(Yn(Vv,"stageView.self.close"),"stageView.self.close"))}))}function jv(){var e;return jr(sr)&&void 0!==(null===(e=sr.supports.stageView)||void 0===e?void 0:e.self)}const Wv="v2";var zv;function $v(e){return new Promise((t=>{if(jr(sr,cn.content),!qv())throw gn;if(!e)throw new Error("[stageView.open] Stage view params cannot be null");t(dc(Yn(Wv,"stageView.open"),"stageView.open",e))}))}function qv(){return!(!jr(sr)||!sr.supports.stageView)}!function(e){e.modal="modal",e.popout="popout",e.popoutWithChat="popoutWithChat"}(zv||(zv={}));const Gv=10;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())}))};const Kv="v2";function Qv(e){return Jv(this,void 0,void 0,(function*(){jr(sr,cn.content,cn.task),Yv(),ew(e);const t=yield dc(Yn(Kv,"visualMedia.image.captureImages"),"visualMedia.image.captureImages",e);return tw(e.maxVisualMediaCount,t),t}))}function Zv(e){return Jv(this,void 0,void 0,(function*(){jr(sr,cn.content,cn.task),Yv(),ew(e);const t=yield dc(Yn(Kv,"visualMedia.image.retrieveImages"),"visualMedia.image.retrieveImages",e);return tw(e.maxVisualMediaCount,t),t}))}function Xv(){return!!(jr(sr)&&sr.supports.visualMedia&&sr.supports.visualMedia.image&&sr.supports.permissions)}function Yv(){if(!Xv())throw gn}function ew(e){if(!e||e.maxVisualMediaCount>Gv||e.maxVisualMediaCount<1)throw vn}function tw(e,t){if(t.length>e)throw wn}const nw="v2";var rw,ow;function iw(){if(jr(sr,cn.content,cn.task),!Xv())throw gn;const e=Ue.Media;return dc(Yn(nw,"visualMedia.hasPermission"),"permissions.has",e)}function aw(){if(jr(sr,cn.content,cn.task),!Xv())throw gn;const e=Ue.Media;return dc(Yn(nw,"visualMedia.requestPermission"),"permissions.request",e)}!function(e){e[e.FrontOrRear=1]="FrontOrRear",e[e.FrontOnly=2]="FrontOnly",e[e.RearOnly=3]="RearOnly"}(rw||(rw={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(ow||(ow={}));var sw=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 cw=null;function uw(){return sw(this,void 0,void 0,(function*(){return null===cw&&(cw=(yield Fo()).app.host.name),cw}))}var lw=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 dw(){return lw(this,void 0,void 0,(function*(){if(jr(sr),!pw())throw gn;return!(!sr.isLegacyTeams||Gn.hostClientType!==an.android&&Gn.hostClientType!==an.ios&&Gn.hostClientType!==an.ipados&&Gn.hostClientType!==an.visionOS||(yield fw())!==sn.teams)||(yield cc(Yn("v2","webStorage.isWebStorageClearedOnUserLogOut"),"webStorage.isWebStorageClearedOnUserLogOut"))}))}function fw(){return lw(this,void 0,void 0,(function*(){return uw()}))}function pw(){return jr(sr)&&void 0!==sr.supports.webStorage}const gw="v2";var hw;function mw(e){const t=Yn(gw,"call.startCall");return new Promise((n=>{var r;if(jr(sr,cn.content,cn.task),!vw())throw gn;if(!sr.isLegacyTeams)return Cc(t,"call.startCall",[e],n);n(cc(t,"executeDeepLink",Ag(e.targets,null===(r=e.requestedModalities)||void 0===r?void 0:r.includes(hw.Video),e.source)).then((e=>{if(!e)throw new Error(lt);return e})))}))}function vw(){return!(!jr(sr)||!sr.supports.call)}!function(e){e.Unknown="unknown",e.Audio="audio",e.Video="video",e.VideoBasedScreenSharing="videoBasedScreenSharing",e.Data="data"}(hw||(hw={}));const ww="v1";function Cw(){Qi(Yn(ww,"appInitialization.notifyAppLoaded"))}function yw(){Cc(Yn(ww,"appInitialization.notifySuccess"),bo.Success,[br])}function Sw(e){Xi(Yn(ww,"appInitialization.notifyFailure"),e)}function bw(e){Zi(Yn(ww,"appInitialization.notifyExpectedFailure"),e)}const Aw=Xn("thirdPartyCloudStorage"),Ew="v2";class Iw{constructor(e,t){this.fileType=e,this.assembleAttachment=t}}let Pw=[],Tw=null,Ow=!0,Rw=null;function Fw(e,t){if(!t)throw new Error("[getDragAndDropFiles] Callback cannot be null");if(e&&""!==e){if(jr(sr,cn.content,cn.task),!Mw())throw gn;if(Rw)throw Rw=null,new Error("getDragAndDropFiles cannot be called twice");Rw=t,Ow=!0,Cc(Yn(Ew,"thirdPartyCloudStorage.getDragAndDropFiles"),"thirdPartyCloudStorage.getDragAndDropFiles",[e],kw)}else{t([],{errorCode:De.INVALID_ARGUMENTS})}}function kw(e){if(Rw)if(e&&e.error)Rw([],e.error),Rw=null;else if(e&&e.fileChunk)try{Ow||0!==e.fileChunk.chunkSequence||(Aw("Last chunk is not received or 'endOfFile' value for previous chunk was not set to true"),Ow=!0,Rw([],{errorCode:De.INTERNAL_ERROR,message:"error occurred while receiving data"}),Pw=[],Rw=null);const t=Qg(e.fileChunk,e.fileType);if(t?(Tw||(Tw=new Iw(e.fileType,[])),Tw.assembleAttachment.push(t)):(Aw(`Received a null assemble attachment for when decoding chunk sequence ${e.fileChunk.chunkSequence}; not including the chunk in the assembled file.`),Rw?Rw([],{errorCode:De.INTERNAL_ERROR,message:"error occurred while receiving data"}):Rw=null,Pw=[],Rw=null,Ow=!0),Ow=e.fileChunk.endOfFile,e.fileChunk.endOfFile&&Tw){const t=Kg(Tw.assembleAttachment,Tw.fileType);if(t){const n=new File([t],e.fileName,{type:t.type});Pw.push(n)}e.isLastFile&&Rw&&(Rw(Pw,e.error),Pw=[],Rw=null,Ow=!0),Tw=null}}catch(e){Rw&&(Rw([],{errorCode:De.INTERNAL_ERROR,message:e}),Pw=[],Rw=null,Ow=!0)}else Rw([],{errorCode:De.INTERNAL_ERROR,message:"data received is null"}),Pw=[],Rw=null,Ow=!0}function Mw(){return!(!jr(sr)||!sr.supports.thirdPartyCloudStorage)}const Nw="v1";function xw(e,t){Ki(Yn(Nw,"initialize"),t).then((()=>{e&&e()}))}function Dw(){nv()}function Uw(){rv()}function Lw(e){Br(),Cc(Yn(Nw,"getContext"),"getContext",(t=>{t.frameContext||(t.frameContext=Gn.frameContext),e(t)}))}function Hw(e){oa(Yn(Nw,"registerOnThemeChangeHandlerHelper"),e)}function _w(e){As(Yn(Nw,"registerFullScreenHandler"),"fullScreenChange",e,[])}function Vw(e){As(Yn(Nw,"registerAppButtonClickHandler"),"appButtonClick",e,[cn.content])}function Bw(e){As(Yn(Nw,"registerAppButtonHoverEnterHandler"),"appButtonHoverEnter",e,[cn.content])}function jw(e){As(Yn(Nw,"registerAppButtonHoverLeaveHandler"),"appButtonHoverLeave",e,[cn.content])}function Ww(e){Ea(Yn(Nw,"registerBackButtonHandler"),e)}function zw(e){iv(Yn(Nw,"registerOnLoadHandler"),e)}function $w(e){sv(Yn(Nw,"registerBeforeUnloadHandler"),e)}function qw(e){As(Yn(Nw,"registerFocusEnterHandler"),"focusEnter",e,[])}function Gw(e){As(Yn(Nw,"registerChangeSettingsHandler"),"changeSettings",e,[cn.content])}function Jw(e,t){jr(sr),Ya(Yn(Nw,"getTabInstances"),t).then((t=>{e(t)}))}function Kw(e,t){jr(sr),es(Yn(Nw,"getMruTabInstances"),t).then((t=>{e(t)}))}function Qw(e){ts(Yn(Nw,"shareDeepLink"),{subPageId:e.subEntityId,subPageLabel:e.subEntityLabel,subPageWebUrl:e.subEntityWebUrl})}function Zw(e,t){jr(sr,cn.content,cn.sidePanel,cn.settings,cn.task,cn.stage,cn.meetingStage);const n=null!=t?t:Cn();ia(Yn(Nw,"executeDeepLink"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function Xw(e){ns(Yn(Nw,"setFrameContext"),e)}function Yw(e,t,n){Ki(Yn(Nw,"initializeWithFrameContext"),n).then((()=>t&&t())),ns(Yn(Nw,"setFrameContext"),e)}const eC="v1";function tC(e){Xa(Yn(eC,"navigation.returnFocus"),e)}function nC(e,t){jr(sr);const n=null!=t?t:Cn();Za(Yn(eC,"navigation.navigateToTab"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function rC(e,t){jr(sr,cn.content,cn.sidePanel,cn.settings,cn.remove,cn.task,cn.stage,cn.meetingStage);const n=null!=t?t:Cn();Ka(Yn(eC,"navigation.navigateCrossDomain"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function oC(e){jr(sr);const t=null!=e?e:Cn();Qa(Yn(eC,"navigation.navigateBack")).then((()=>{t(!0)})).catch((e=>{t(!1,e.message)}))}const iC="v1";function aC(e){rs(Yn(iC,"settings.setValidityState"),e)}function sC(e){jr(sr,cn.content,cn.settings,cn.remove,cn.sidePanel),os(Yn(iC,"settings.getSettings")).then((t=>{e(t)}))}function cC(e,t){jr(sr,cn.content,cn.settings,cn.sidePanel);const n=null!=t?t:Cn();is(Yn(iC,"settings.setSettings"),e).then((()=>{n(!0)})).catch((e=>{n(!1,e.message)}))}function uC(e){Di(Yn(iC,"settings.registerOnSaveHandler"),e)}function lC(e){Li(Yn(iC,"settings.registerOnRemoveHandler"),e)}var dC=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 fC="v1";function pC(e,t){const n=Yn(fC,"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?(jr(sr,cn.content,cn.sidePanel,cn.meetingStage),Cc(n,"tasks.startTask",[e],t)):void 0!==e.completionBotId?ni(n,vC(e),r):ti(n,mC(e),r),new Kh}function gC(e){e=wC(e);const{width:t,height:n}=e,r=dC(e,["width","height"]);if(Object.keys(r).length)throw new Error("resize requires a TaskInfo argument containing only width and height");ei(Yn(fC,"tasks.updateTask"),e)}function hC(e,t){ri(Yn(fC,"tasks.submitTask"),e,t)}function mC(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:fn.Small,width:e.width?e.width:fn.Small},title:e.title,fallbackUrl:e.fallbackUrl}}function vC(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:fn.Small,width:e.width?e.width:fn.Small},title:e.title,fallbackUrl:e.fallbackUrl,completionBotId:e.completionBotId}}function wC(e){return e.height=e.height?e.height:fn.Small,e.width=e.width?e.width:fn.Small,e}const CC="v2";var yC,SC;function bC(){return!(!jr(sr,cn.meetingStage,cn.sidePanel,cn.content)||!sr.supports.interactive)}!function(e){e.guest="Guest",e.attendee="Attendee",e.presenter="Presenter",e.organizer="Organizer"}(yC||(yC={})),function(e){e.added="Added",e.alreadyExists="AlreadyExists",e.conflict="Conflict",e.notFound="NotFound"}(SC||(SC={}));class AC{getFluidTenantInfo(){return EC(),new Promise((e=>{e(dc(Yn(CC,"interactive.getFluidTenantInfo"),"interactive.getFluidTenantInfo"))}))}getFluidToken(e){return EC(),new Promise((t=>{t(dc(Yn(CC,"interactive.getFluidToken"),"interactive.getFluidToken",e))}))}getFluidContainerId(){return EC(),new Promise((e=>{e(dc(Yn(CC,"interactive.getFluidContainerId"),"interactive.getFluidContainerId"))}))}setFluidContainerId(e){return EC(),new Promise((t=>{t(dc(Yn(CC,"interactive.setFluidContainerId"),"interactive.setFluidContainerId",e))}))}getNtpTime(){return EC(),new Promise((e=>{e(dc(Yn(CC,"interactive.getNtpTime"),"interactive.getNtpTime"))}))}registerClientId(e){return EC(),new Promise((t=>{t(dc(Yn(CC,"interactive.registerClientId"),"interactive.registerClientId",e))}))}getClientRoles(e){return EC(),new Promise((t=>{t(dc(Yn(CC,"interactive.getClientRoles"),"interactive.getClientRoles",e))}))}getClientInfo(e){return EC(),new Promise((t=>{t(dc(Yn(CC,"interactive.getClientInfo"),"interactive.getClientInfo",e))}))}static create(){return EC(),new AC}}function EC(){if(!bC())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 PC(e){try{return e.cartItems=TC(e.cartItems),e}catch(e){throw new Error("Error deserializing cart")}}function TC(e){return e.map((e=>{if(e.imageURL){const t=new URL(e.imageURL);e.imageURL=t}return e.accessories&&(e.accessories=TC(e.accessories)),e}))}const OC=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=OC(n)),o}))}catch(e){throw new Error("Error serializing cart items")}};function RC(e){if(!Array.isArray(e)||0===e.length)throw new Error("cartItems must be a non-empty array");for(const t of e)kC(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");kC(t)}}}function kC(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");NC(e.price),xC(e.quantity)}function MC(e){if(null!=e){if(!e)throw new Error("id must not be empty");if(!1===on(e))throw new Error("id must be a valid UUID")}}function NC(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 xC(e){if("number"!=typeof e||e<=0||parseInt(e.toString())!==e)throw new Error(`quantity ${e} must be an integer greater than 0`)}function DC(e){if(!Object.values(_C).includes(e))throw new Error(`cartStatus ${e} is not valid`)}const UC="v2",LC={majorVersion:1,minorVersion:1};var HC,_C;function VC(){if(jr(sr,cn.content,cn.task),!zC())throw gn;return dc(Yn(UC,"marketplace.getCart"),"marketplace.getCart",LC).then(PC)}function BC(e){if(jr(sr,cn.content,cn.task),!zC())throw gn;if(!e)throw new Error("addOrUpdateCartItemsParams must be provided");return MC(null==e?void 0:e.cartId),RC(null==e?void 0:e.cartItems),dc(Yn(UC,"marketplace.addOrUpdateCartItems"),"marketplace.addOrUpdateCartItems",Object.assign(Object.assign({},e),{cartItems:OC(e.cartItems),cartVersion:LC})).then(PC)}function jC(e){if(jr(sr,cn.content,cn.task),!zC())throw gn;if(!e)throw new Error("removeCartItemsParams must be provided");if(MC(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 dc(Yn(UC,"marketplace.removeCartItems"),"marketplace.removeCartItems",Object.assign(Object.assign({},e),{cartVersion:LC})).then(PC)}function WC(e){if(jr(sr,cn.content,cn.task),!zC())throw gn;if(!e)throw new Error("updateCartStatusParams must be provided");return MC(null==e?void 0:e.cartId),DC(null==e?void 0:e.cartStatus),dc(Yn(UC,"marketplace.updateCartStatus"),"marketplace.updateCartStatus",Object.assign(Object.assign({},e),{cartVersion:LC})).then(PC)}function zC(){return!(!jr(sr)||!sr.supports.marketplace)}!function(e){e.TACAdminUser="TACAdminUser",e.TeamsAdminUser="TeamsAdminUser",e.TeamsEndUser="TeamsEndUser"}(HC||(HC={})),function(e){e.Open="Open",e.Processing="Processing",e.Processed="Processed",e.Closed="Closed",e.Error="Error"}(_C||(_C={}));var $C=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())}))};class qC{constructor(e){this.event=e}serialize(){return{altKey:this.event.altKey,bubbles:this.event.bubbles,cancelBubble:this.event.cancelBubble,charCode:this.event.charCode,code:this.event.code,composed:this.event.composed,ctrlKey:this.event.ctrlKey,defaultPrevented:this.event.defaultPrevented,detail:this.event.detail,eventPhase:this.event.eventPhase,isComposing:this.event.isComposing,isTrusted:this.event.isTrusted,key:this.event.key,keyCode:this.event.keyCode,location:this.event.location,metaKey:this.event.metaKey,repeat:this.event.repeat,returnValue:this.event.returnValue,shiftKey:this.event.shiftKey,timeStamp:this.event.timeStamp,type:this.event.type,which:this.event.which}}}function GC(e){return e.toLowerCase().split("+").sort().join("+")}function JC(e){return[e.ctrlKey&&"ctrl",e.shiftKey&&"shift",e.altKey&&"alt",e.metaKey&&"meta",e.key.toLowerCase()].filter(Boolean).sort().join("+")}function KC(e){return e.ctrlKey||e.shiftKey||e.altKey||e.metaKey||!!e.key&&"escape"===e.key.toLowerCase()}function QC(e,t){if(KC(t)){const n=JC(t);if(e.has(n))return{matchedShortcut:n,isOverridable:ty.has(n)}}return{matchedShortcut:void 0,isOverridable:!1}}function ZC(e){ny.clear(),e.shortcuts.forEach((e=>{ny.add(GC(e))})),ty.clear(),e.overridableShortcuts.forEach((e=>{ty.add(GC(e))}))}class XC extends zi{validate(e){return e&&Array.isArray(e.shortcuts)&&Array.isArray(e.overridableShortcuts)}deserialize(e){return e}}function YC(e){ys(Yn("v2","shortcutRelay.hostShortcutChanged"),"shortcutRelay.hostShortcutChanged",e)}function ey(e){if(e.target.closest(`[${uy}]`))return;const{matchedShortcut:t,isOverridable:n}=QC(ny,e);if(!t)return;if(n&&ry){if(ry(e,{matchedShortcut:t}))return}hc("shortcutRelay.forwardShortcutEvent",[new qC(e)],Yn("v2","shortcutRelay.forwardShortcutEvent")),e.preventDefault(),e.stopImmediatePropagation()}const ty=new Set,ny=new Set;let ry,oy=!1;function iy(e){if(!cy())throw gn;const t=ry;return ry=e,t}function ay(){if(!cy())throw gn;oy=!1,ny.clear(),ty.clear(),ry=void 0,document.removeEventListener("keydown",ey,{capture:!0})}function sy(){return $C(this,void 0,void 0,(function*(){if(!cy())throw gn;ZC(yield gc("shortcutRelay.getHostShortcuts",[],new XC,Yn("v2","shortcutRelay.getHostShortcuts"))),oy||document.addEventListener("keydown",ey,{capture:!0}),oy=!0,YC((e=>{ZC(e)}))}))}function cy(){return!(!jr(sr)||!sr.supports.shortcutRelay)}const uy="data-disable-shortcuts-forwarding"})(),r})()));
|
2
2
|
//# sourceMappingURL=MicrosoftTeams.min.js.map
|