@microsoft/teams-js 2.49.0-beta.0 → 2.50.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/urlPattern.d.ts +3 -0
- package/dist/esm/packages/teams-js/dts/private/interfaces.d.ts +24 -0
- package/dist/esm/packages/teams-js/src/internal/urlPattern.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/externalAppCardActions.js +1 -1
- package/dist/esm/packages/teams-js/src/private/externalAppCardActionsForCEA.js +1 -1
- package/dist/esm/packages/teams-js/src/private/externalAppCardActionsForDA.js +1 -1
- package/dist/esm/packages/teams-js/src/private/externalAppCommands.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 +46 -25
- 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 +53 -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()}(Object("undefined"!=typeof self?self:this),()=>(()=>{var e={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}},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}}},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))}},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}},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||"function"==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:()=>Ue,AppId:()=>so,ChannelType:()=>gn,ChildAppWindow:()=>xm,DialogDimension:()=>pn,EduType:()=>je,EmailAddress:()=>qg,ErrorCode:()=>Le,FileOpenPreference:()=>Ne,FrameContexts:()=>un,HostClientType:()=>sn,HostName:()=>cn,LiveShareHost:()=>sy,NotificationTypes:()=>iu,ParentAppWindow:()=>Nm,RenderingSurfaces:()=>ln,SecondaryM365ContentIdName:()=>De,TaskModuleDimension:()=>pn,TeamType:()=>dn,UUID:()=>$n,UserAuthenticationState:()=>dl,UserSettingTypes:()=>su,UserTeamRole:()=>fn,ValidatedSafeString:()=>ao,ViewerActionTypes:()=>au,activateChildProxyingCommunication:()=>Ir,app:()=>i,appEntity:()=>j,appInitialization:()=>Oe,appInstallDialog:()=>ee,appPerformanceMetrics:()=>Y,authentication:()=>X,barCode:()=>ne,calendar:()=>pe,call:()=>Te,chat:()=>re,clipboard:()=>oe,conversations:()=>b,copilot:()=>O,dialog:()=>f,enablePrintCapability:()=>CC,executeDeepLink:()=>UC,externalAppAuthentication:()=>R,externalAppAuthenticationForCEA:()=>F,externalAppCardActions:()=>k,externalAppCardActionsForCEA:()=>M,externalAppCardActionsForDA:()=>x,externalAppCommands:()=>N,files:()=>U,geoLocation:()=>se,getAdaptiveCardSchemaVersion:()=>km,getContext:()=>SC,getCurrentFeatureFlagsState:()=>Or,getMruTabInstances:()=>xC,getTabInstances:()=>MC,hostEntity:()=>K,initialize:()=>wC,initializeWithFrameContext:()=>LC,liveShare:()=>Me,location:()=>ue,logs:()=>S,mail:()=>he,marketplace:()=>xe,media:()=>te,meeting:()=>de,meetingRoom:()=>D,menus:()=>p,messageChannels:()=>L,monetization:()=>fe,navigateBack:()=>jC,navigateCrossDomain:()=>BC,navigateToTab:()=>VC,nestedAppAuth:()=>ie,nestedAppAuthBridge:()=>H,notifications:()=>_,openFilePreview:()=>gu,otherAppStateChange:()=>V,overwriteFeatureFlagsState:()=>Fr,pages:()=>y,people:()=>ve,print:()=>yC,profile:()=>we,registerAppButtonClickHandler:()=>EC,registerAppButtonHoverEnterHandler:()=>IC,registerAppButtonHoverLeaveHandler:()=>PC,registerBackButtonHandler:()=>TC,registerBeforeUnloadHandler:()=>RC,registerChangeSettingsHandler:()=>kC,registerCustomHandler:()=>fu,registerFocusEnterHandler:()=>FC,registerFullScreenHandler:()=>AC,registerOnLoadHandler:()=>OC,registerOnThemeChangeHandler:()=>bC,registerUserSettingsChangeHandler:()=>pu,remoteCamera:()=>B,returnFocus:()=>_C,search:()=>Ce,secondaryBrowser:()=>ce,sendCustomEvent:()=>du,sendCustomMessage:()=>lu,setFeatureFlagsState:()=>Rr,setFrameContext:()=>DC,settings:()=>Fe,shareDeepLink:()=>NC,sharing:()=>Se,shortcutRelay:()=>ze,sidePanelInterfaces:()=>I,stageView:()=>Ae,store:()=>Q,tasks:()=>ke,teams:()=>q,teamsCore:()=>me,thirdPartyCloudStorage:()=>Re,uploadCustomApp:()=>uu,version:()=>Ar,videoEffects:()=>$,videoEffectsEx:()=>G,visualMedia:()=>Ie,webStorage:()=>Pe,widgetHosting:()=>Z});var e={};n.r(e),n.d(e,{_clearTelemetryPort:()=>mo,getTelemetryPort:()=>go,isSupported:()=>ho});var t={};n.r(t),n.d(t,{_clearDataLayerPort:()=>Ao,getDataLayerPort:()=>So,isSupported:()=>bo});var o={};n.r(o),n.d(o,{registerBeforeSuspendOrTerminateHandler:()=>Eo,registerOnResumeHandler:()=>Io});var i={};n.r(i),n.d(i,{ExpectedFailureReason:()=>Fo,FailedReason:()=>Ro,Messages:()=>Oo,_initialize:()=>No,_uninitialize:()=>Uo,getContext:()=>Do,getFrameContext:()=>Mo,initialize:()=>xo,isInitialized:()=>ko,lifecycle:()=>o,notifyAppLoaded:()=>Lo,notifyExpectedFailure:()=>Vo,notifyFailure:()=>_o,notifySuccess:()=>Ho,openLink:()=>zo,registerHostToAppPerformanceMetricsHandler:()=>Wo,registerOnContextChangeHandler:()=>jo,registerOnThemeChangeHandler:()=>Bo});var a={};n.r(a),n.d(a,{isSupported:()=>Go,resize:()=>$o});var s={};n.r(s),n.d(s,{isSupported:()=>Ko,open:()=>Jo});var c={};n.r(c),n.d(c,{isSupported:()=>Yo,registerOnMessageFromParent:()=>Xo,sendMessageToDialog:()=>Zo,sendMessageToParentFromDialog:()=>Qo});var u={};n.r(u),n.d(u,{bot:()=>s,getDialogInfoFromBotUrlDialogInfo:()=>oi,getDialogInfoFromUrlDialogInfo:()=>ri,isSupported:()=>ni,open:()=>ei,parentCommunication:()=>c,submit:()=>ti});var l={};n.r(l),n.d(l,{isSupported:()=>mi,open:()=>hi});var d={};n.r(d),n.d(d,{bot:()=>l,isSupported:()=>wi,open:()=>vi});var f={};n.r(f),n.d(f,{adaptiveCard:()=>d,initialize:()=>Ci,isSupported:()=>yi,update:()=>a,url:()=>u});var p={};n.r(p),n.d(p,{DisplayMode:()=>bi,MenuItem:()=>Ei,MenuListType:()=>Ai,initialize:()=>Fi,isSupported:()=>Li,setNavBarMenu:()=>xi,setUpViews:()=>ki,showActionMenu:()=>Ui});var g={};n.r(g),n.d(g,{initialize:()=>Hi,isSupported:()=>Qi,registerChangeConfigHandler:()=>$i,registerOnRemoveHandler:()=>Wi,registerOnRemoveHandlerHelper:()=>zi,registerOnSaveHandler:()=>Bi,registerOnSaveHandlerHelper:()=>ji,setConfig:()=>Vi,setValidityState:()=>_i});var h={};n.r(h),n.d(h,{isSupported:()=>Oa,onClick:()=>Ia,onHoverEnter:()=>Pa,onHoverLeave:()=>Ta});var m={};n.r(m),n.d(m,{_initialize:()=>Ra,isSupported:()=>xa,navigateBack:()=>Fa,registerBackButtonHandler:()=>ka,registerBackButtonHandlerHelper:()=>Ma});var v={};n.r(v),n.d(v,{isSupported:()=>Da,navigateTo:()=>Na,navigateToDefaultPage:()=>Ua});var w={};n.r(w),n.d(w,{enterFullscreen:()=>La,exitFullscreen:()=>Ha,isSupported:()=>_a});var C={};n.r(C),n.d(C,{getMruTabInstances:()=>ja,getTabInstances:()=>Ba,isSupported:()=>Wa,navigateToTab:()=>Va});var y={};n.r(y),n.d(y,{EnterFocusType:()=>za,ReturnFocusType:()=>qa,appButton:()=>h,backStack:()=>m,config:()=>g,currentApp:()=>v,fullTrust:()=>w,getConfig:()=>Qa,initializeWithFrameContext:()=>Ka,isSupported:()=>ts,navigateCrossDomain:()=>Za,navigateToApp:()=>Xa,registerFocusEnterHandler:()=>Ga,registerFullScreenHandler:()=>es,returnFocus:()=>$a,setCurrentFrame:()=>Ja,shareDeepLink:()=>Ya,tabs:()=>C});var S={};n.r(S),n.d(S,{isSupported:()=>ou,registerGetLogHandler:()=>ru});var b={};n.r(b),n.d(b,{closeConversation:()=>vu,getChatMembers:()=>wu,isSupported:()=>Cu,openConversation:()=>mu});var A={};n.r(A),n.d(A,{isSupported:()=>Au,sendCustomTelemetryData:()=>Eu});var E={};n.r(E),n.d(E,{getEligibilityInfo:()=>Ru,isSupported:()=>Ou});var I={};n.r(I),n.d(I,{ContentItemType:()=>ku,CopilotMode:()=>Uu,MediaSelectionType:()=>Mu,SidePanelErrorCode:()=>_u,SidePanelErrorImpl:()=>Vu,TeamsContextType:()=>Lu,TeamsDimensionName:()=>Nu,TeamsSessionType:()=>xu,TranscriptState:()=>Du,UserConsent:()=>Hu});var P={};n.r(P),n.d(P,{copilotSidePanelNotSupportedOnPlatformError:()=>Ju,getContent:()=>qu,isResponseAReportableError:()=>zu,isSupported:()=>Wu,preCheckUserConsent:()=>$u,registerUserActionContentSelect:()=>Gu});var T={};n.r(T),n.d(T,{closeSidePanel:()=>nl,isSupported:()=>tl});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:()=>sl,ActionExecuteResponseHandler:()=>fl,InvokeErrorCode:()=>ll,InvokeResponseType:()=>ul,OriginalRequestType:()=>cl,SerializableActionExecuteInvokeRequest:()=>il,SerializableConnectorParameters:()=>bl,UserAuthenticationState:()=>dl,authenticateAndResendRequest:()=>vl,authenticateWithConnector:()=>Al,authenticateWithOauth2:()=>yl,authenticateWithPowerPlatformConnectorPlugins:()=>Sl,authenticateWithSSO:()=>wl,authenticateWithSSOAndResendRequest:()=>Cl,disconnectConnector:()=>Pl,getUserAuthenticationStateForConnector:()=>Il,isActionExecuteResponse:()=>al,isInvokeError:()=>pl,isSupported:()=>Tl,validateActionExecuteInvokeRequest:()=>hl});var F={};n.r(F),n.d(F,{authenticateAndResendRequest:()=>Ml,authenticateWithOauth:()=>kl,authenticateWithSSO:()=>Fl,authenticateWithSSOAndResendRequest:()=>xl,isSupported:()=>Nl,validateInput:()=>Ul});var k={};n.r(k),n.d(k,{ActionOpenUrlErrorCode:()=>Hl,ActionOpenUrlType:()=>Ll,isSupported:()=>Bl,processActionOpenUrl:()=>Vl,processActionSubmit:()=>_l});var M={};n.r(M),n.d(M,{isSupported:()=>$l,processActionOpenUrl:()=>zl,processActionSubmit:()=>ql});var x={};n.r(x),n.d(x,{SerializableActionOpenUrlDialogInfo:()=>ed,isSupported:()=>Xl,processActionOpenUrlDialog:()=>Zl});var N={};n.r(N),n.d(N,{isSupported:()=>od,processActionCommand:()=>rd});var U={};n.r(U),n.d(U,{CloudStorageProvider:()=>ad,CloudStorageProviderFileAction:()=>dd,CloudStorageProviderType:()=>sd,DocumentLibraryAccessType:()=>ud,FileDownloadStatus:()=>ld,SpecialDocumentLibraryType:()=>cd,addCloudStorageFolder:()=>pd,addCloudStorageProvider:()=>Sd,addCloudStorageProviderFile:()=>Ad,copyMoveFiles:()=>wd,deleteCloudStorageFolder:()=>gd,deleteCloudStorageProviderFile:()=>Id,downloadCloudStorageProviderFile:()=>Pd,getCloudStorageFolderContents:()=>hd,getCloudStorageFolders:()=>fd,getExternalProviders:()=>vd,getFileDownloads:()=>Cd,openCloudStorageFile:()=>md,openDownloadFolder:()=>yd,registerCloudStorageProviderContentChangeHandler:()=>Rd,registerCloudStorageProviderListChangeHandler:()=>Od,removeCloudStorageProvider:()=>bd,renameCloudStorageProviderFile:()=>Ed,uploadCloudStorageProviderFile:()=>Td});var D={};n.r(D),n.d(D,{getPairedMeetingRoomInfo:()=>Md,isSupported:()=>Dd,registerMeetingRoomCapabilitiesUpdateHandler:()=>Nd,registerMeetingRoomStatesUpdateHandler:()=>Ud,sendCommandToPairedMeetingRoom:()=>xd});var L={};n.r(L),n.d(L,{dataLayer:()=>t,isSupported:()=>Ld,telemetry:()=>e});var H={};n.r(H),n.d(H,{initialize:()=>jd,version:()=>Hd});var _={};n.r(_),n.d(_,{isSupported:()=>Zd,showNotification:()=>Qd});var V={};n.r(V),n.d(V,{isSupported:()=>nf,notifyInstallCompleted:()=>tf,registerAppInstallationHandler:()=>Yd,unregisterAppInstallationHandler:()=>ef});var B={};n.r(B),n.d(B,{ControlCommand:()=>of,ErrorReason:()=>af,SessionTerminatedReason:()=>sf,getCapableParticipants:()=>cf,isSupported:()=>mf,registerOnCapableParticipantsChangeHandler:()=>ff,registerOnDeviceStateChangeHandler:()=>gf,registerOnErrorHandler:()=>pf,registerOnSessionStatusChangeHandler:()=>hf,requestControl:()=>uf,sendControlCommand:()=>lf,terminateSession:()=>df});var j={};n.r(j),n.d(j,{isSupported:()=>Cf,selectAppEntity:()=>wf});var W={};n.r(W),n.d(W,{getUserJoinedTeams:()=>Sf,isSupported:()=>bf});var z={};n.r(z),n.d(z,{getConfigSetting:()=>If,isSupported:()=>Pf,joinedTeams:()=>W});var q={};n.r(q),n.d(q,{ChannelType:()=>Of,fullTrust:()=>z,getTeamChannels:()=>Rf,isSupported:()=>kf,refreshSiteUrl:()=>Ff});var $={};n.r($),n.d($,{EffectChangeType:()=>Bf,EffectFailureReason:()=>jf,VideoFrameFormat:()=>Vf,isSupported:()=>Jf,notifySelectedVideoEffectChanged:()=>zf,registerForVideoEffect:()=>qf,registerForVideoFrame:()=>Wf});var G={};n.r(G),n.d(G,{ErrorLevel:()=>wp,frameProcessingTimeoutInMs:()=>mp,isSupported:()=>Pp,notifyFatalError:()=>Rp,notifySelectedVideoEffectChanged:()=>Ap,registerForVideoEffect:()=>Ep,registerForVideoFrame:()=>Cp,updatePersonalizedEffects:()=>Ip});var J={};n.r(J),n.d(J,{addAndConfigure:()=>Lp,getAll:()=>Hp,isSupported:()=>jp,reconfigure:()=>_p,remove:()=>Bp,rename:()=>Vp});var K={};n.r(K),n.d(K,{AppTypes:()=>qp,isSupported:()=>$p,tab:()=>J});var Q={};n.r(Q),n.d(Q,{isSupported:()=>ng,openAppDetail:()=>Yp,openFullStore:()=>Xp,openInContextStore:()=>eg,openSpecificStore:()=>tg});var Z={};n.r(Z),n.d(Z,{callTool:()=>ug,contentSizeChanged:()=>gg,isSupported:()=>cg,notifyIntrinsicHeight:()=>pg,openExternal:()=>mg,registerModalCloseHandler:()=>vg,requestDisplayMode:()=>dg,requestModal:()=>fg,sendFollowUpMessage:()=>lg,setWidgetState:()=>hg});var X={};n.r(X),n.d(X,{DataResidency:()=>Bg,authenticate:()=>xg,getAuthToken:()=>Ug,getUser:()=>Lg,notifyFailure:()=>Vg,notifySuccess:()=>_g,registerAuthenticationHandlers:()=>Mg});var Y={};n.r(Y),n.d(Y,{isSupported:()=>jg,registerHostMemoryMetricsHandler:()=>Wg});var ee={};n.r(ee),n.d(ee,{isSupported:()=>fh,openAppInstallDialog:()=>dh});var te={};n.r(te),n.d(te,{CameraStartMode:()=>vh,File:()=>bh,FileFormat:()=>hh,ImageOutputFormats:()=>Sh,ImageUriType:()=>yh,Media:()=>Th,MediaControllerEvent:()=>mh,MediaType:()=>Ch,Source:()=>wh,VideoController:()=>Rh,captureImage:()=>Ah,hasPermission:()=>Eh,requestPermission:()=>Ih,scanBarCode:()=>Mh,selectMedia:()=>Fh,viewImages:()=>kh});var ne={};n.r(ne),n.d(ne,{hasPermission:()=>Gh,isSupported:()=>Kh,requestPermission:()=>Jh,scanBarCode:()=>$h});var re={};n.r(re),n.d(re,{isSupported:()=>em,openChat:()=>Zh,openGroupChat:()=>Yh});var oe={};n.r(oe),n.d(oe,{isSupported:()=>im,read:()=>om,write:()=>rm});var ie={};n.r(ie),n.d(ie,{addNAATrustedOrigins:()=>vm,canParentManageNAATrustedOrigins:()=>fm,deleteNAATrustedOrigins:()=>wm,getParentOrigin:()=>dm,isDeeplyNestedAuthSupported:()=>pm,isNAAChannelRecommended:()=>lm});var ae={};n.r(ae),n.d(ae,{chooseLocation:()=>Am,isSupported:()=>Im,showLocation:()=>Em});var se={};n.r(se),n.d(se,{getCurrentLocation:()=>Tm,hasPermission:()=>Om,isSupported:()=>Fm,map:()=>ae,requestPermission:()=>Rm});var ce={};n.r(ce),n.d(ce,{isSupported:()=>Lm,open:()=>Dm});var ue={};n.r(ue),n.d(ue,{getLocation:()=>_m,isSupported:()=>Bm,showLocation:()=>Vm});var le={};n.r(le),n.d(le,{setOptions:()=>Wm});var de={};n.r(de),n.d(de,{CallType:()=>Km,EventActionSource:()=>Zm,MeetingReactionType:()=>Gm,MeetingType:()=>Jm,SharingProtocol:()=>Qm,appShareButton:()=>le,getAppContentStageSharingCapabilities:()=>cv,getAppContentStageSharingState:()=>lv,getAuthenticationTokenForAnonymousUser:()=>nv,getIncomingClientAudioState:()=>Xm,getLiveStreamState:()=>rv,getMeetingDetails:()=>ev,getMeetingDetailsVerbose:()=>tv,joinMeeting:()=>gv,registerLiveStreamChangedHandler:()=>av,registerMeetingReactionReceivedHandler:()=>pv,registerRaiseHandStateChangedHandler:()=>fv,registerSpeakingStateChangeHandler:()=>dv,requestAppAudioHandling:()=>hv,requestStartLiveStreaming:()=>ov,requestStopLiveStreaming:()=>iv,shareAppContentToStage:()=>sv,stopSharingAppContentToStage:()=>uv,toggleIncomingClientAudio:()=>Ym,updateMicState:()=>wv});var fe={};n.r(fe),n.d(fe,{isSupported:()=>Av,openPurchaseExperience:()=>bv});var pe={};n.r(pe),n.d(pe,{composeMeeting:()=>Pv,isSupported:()=>Tv,openCalendarItem:()=>Iv});var ge={};n.r(ge),n.d(ge,{composeMailWithHandoff:()=>kv,isSupported:()=>Mv});var he={};n.r(he),n.d(he,{ComposeMailType:()=>Hv,composeMail:()=>Dv,handoff:()=>ge,isSupported:()=>Lv,openMailItem:()=>Uv});var me={};n.r(me),n.d(me,{enablePrintCapability:()=>Vv,isSupported:()=>$v,print:()=>Bv,registerBeforeUnloadHandler:()=>zv,registerBeforeUnloadHandlerHelper:()=>qv,registerOnLoadHandler:()=>jv,registerOnLoadHandlerHelper:()=>Wv});var ve={};n.r(ve),n.d(ve,{isSupported:()=>Zv,selectPeople:()=>Kv});var we={};n.r(we),n.d(we,{isSupported:()=>nw,showProfile:()=>tw});var Ce={};n.r(Ce),n.d(Ce,{closeSearch:()=>lw,isSupported:()=>uw,registerHandlers:()=>sw,unregisterHandlers:()=>cw});var ye={};n.r(ye),n.d(ye,{getContent:()=>pw,isSupported:()=>gw});var Se={};n.r(Se),n.d(Se,{SharingAPIMessages:()=>vw,history:()=>ye,isSupported:()=>Aw,shareWebContent:()=>ww});var be={};n.r(be),n.d(be,{close:()=>Iw,isSupported:()=>Pw});var Ae={};n.r(Ae),n.d(Ae,{StageViewOpenMode:()=>Ow,isSupported:()=>Fw,open:()=>Rw,self:()=>be});var Ee={};n.r(Ee),n.d(Ee,{captureImages:()=>Nw,isSupported:()=>Dw,retrieveImages:()=>Uw});var Ie={};n.r(Ie),n.d(Ie,{CameraRestriction:()=>Bw,Source:()=>jw,hasPermission:()=>Ww,image:()=>Ee,requestPermission:()=>zw});var Pe={};n.r(Pe),n.d(Pe,{isSupported:()=>Zw,isWebStorageClearedOnUserLogOut:()=>Kw});var Te={};n.r(Te),n.d(Te,{CallModalities:()=>Yw,isSupported:()=>tC,startCall:()=>eC});var Oe={};n.r(Oe),n.d(Oe,{ExpectedFailureReason:()=>Fo,FailedReason:()=>Ro,Messages:()=>Oo,notifyAppLoaded:()=>rC,notifyExpectedFailure:()=>aC,notifyFailure:()=>iC,notifySuccess:()=>oC});var Re={};n.r(Re),n.d(Re,{getDragAndDropFiles:()=>gC,isSupported:()=>mC});var Fe={};n.r(Fe),n.d(Fe,{getSettings:()=>qC,registerOnRemoveHandler:()=>JC,registerOnSaveHandler:()=>GC,setSettings:()=>$C,setValidityState:()=>zC});var ke={};n.r(ke),n.d(ke,{getDefaultSizeIfNotProvided:()=>ny,startTask:()=>ZC,submitTask:()=>YC,updateTask:()=>XC});var Me={};n.r(Me),n.d(Me,{ContainerState:()=>iy,LiveShareHost:()=>sy,UserMeetingRole:()=>oy,isSupported:()=>ay});var xe={};n.r(xe),n.d(xe,{CartStatus:()=>Ay,Intent:()=>by,addOrUpdateCartItems:()=>Iy,cartVersion:()=>Sy,getCart:()=>Ey,isSupported:()=>Oy,removeCartItems:()=>Py,updateCartStatus:()=>Ty});var Ne,Ue,De,Le,He,_e,Ve,Be,je,We,ze={};function qe(e){return void 0!==(null==e?void 0:e.errorCode)}n.r(ze),n.d(ze,{DISABLE_SHORTCUT_FORWARDING_ATTRIBUTE:()=>Gy,enableShortcutRelayCapability:()=>qy,isSupported:()=>$y,resetIsShortcutRelayCapabilityEnabled:()=>zy,setOverridableShortcutHandler:()=>Wy}),function(e){e.Inline="inline",e.Desktop="desktop",e.Web="web"}(Ne||(Ne={})),function(e){e.M365Content="m365content"}(Ue||(Ue={})),function(e){e.DriveId="driveId",e.GroupId="groupId",e.SiteId="siteId",e.UserId="userId"}(De||(De={})),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"}(Le||(Le={})),function(e){e.GeoLocation="geolocation",e.Media="media"}(He||(He={})),function(e){e.BCAIS="bcais",e.BCWAF="bcwaf",e.BCWBF="bcwbf"}(_e||(_e={})),function(e){e.Faculty="faculty",e.Student="student",e.Other="other"}(Ve||(Ve={})),function(e){e.Adult="adult",e.MinorNoParentalConsentRequired="minorNoParentalConsentRequired",e.MinorWithoutParentalConsent="minorWithoutParentalConsent",e.MinorWithParentalConsent="minorWithParentalConsent",e.NotAdult="notAdult",e.NonAdult="notAdult"}(Be||(Be={})),function(e){e.HigherEducation="higherEducation",e.K12="k12",e.Other="other"}(je||(je={})),function(e){e.TextPlain="text/plain",e.TextHtml="text/html",e.ImagePNG="image/png",e.ImageJPEG="image/jpeg"}(We||(We={}));const $e=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","fa000000136.mro1cdnstorage.public.cdn.office.net","fa000000136.mro1cdnstorage.public.onecdn.static.microsoft","substrate-msb-bizchatvnext-service.sdf01.substrate-msb-bingatwork.eastus2-sdf.cosmic-ppe.office.net","office-home-m365copilotapp.wus2sdf1.office-home-m365copilotapp.westus2-sdf.cosmic-ppe.office.net","office-home-m365copilotapp.wus2test1.office-home-m365copilotapp.westus2-test.cosmic-int.office.net","m365copilotapp.svc.cloud.microsoft","m365copilotapp.svc.cloud.dev.microsoft","ffc-copilot.officeapps.live.com","m365.cloud.dev.microsoft","m365.cloud.dev.microsoft:3001","portal.officeppe.com","ignite.m365.admin.cloud.microsoft","ignite.admin.cloud.microsoft","sdf.m365.admin.cloud.microsoft","admin-sdf.microsoft.com","canary.m365.admin.cloud.microsoft","ring0.m365.admin.cloud.microsoft","portal.office365.us","portal.apps.mil","www.ohome.apps.mil","www.office365.us"]}');const Ge="2.0.1",Je="2.0.2",Ke="2.0.3",Qe="2.0.4",Ze="2.0.1",Xe="1.9.0",Ye="2.0.0",et="1.7.0",tt="1.8.0",nt="1.9.0",rt=n.t($e,2).validOrigins,ot=1500,it=new URL("https://res.cdn.office.net/teams-js/validDomains/json/validDomains.json"),at="https",st="teams.microsoft.com",ct="The library has not yet been initialized",ut="The runtime has not yet been initialized",lt="The runtime version is not supported",dt="The call was not properly started";var ft=n(933);const pt=ht,gt=2147483647;function ht(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 vt(e)}return mt(e,t,n)}function mt(e,t,n){if("string"==typeof e)return St(e,t);if(ArrayBuffer.isView(e))return Ot(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(At(e,ArrayBuffer)||e&&At(e.buffer,ArrayBuffer))return Rt(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(At(e,SharedArrayBuffer)||e&&At(e.buffer,SharedArrayBuffer)))return Rt(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 ht.from(r,t,n);const o=Qt(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return ht.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 vt(e){return wt(e),Ct(e<0?0:0|yt(e))}function wt(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 Ct(e){if(e>gt)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,ht.prototype),t}function yt(e){if(e>=gt)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+gt.toString(16)+" bytes");return 0|e}function St(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!ht.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|bt(e,t);let r=Ct(n);const o=r.write(e,t);return o!==n&&(r=r.slice(0,o)),r}function bt(e,t){if(ht.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||At(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 It(e).length;default:if(o)return r?-1:Et(e).length;t=(""+t).toLowerCase(),o=!0}}function At(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 It(e){return ft.toByteArray(Tt(e))}ht.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}}(),ht.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required"),ht.from=function(e,t,n){return mt(e,t,n)},Object.setPrototypeOf(ht.prototype,Uint8Array.prototype),Object.setPrototypeOf(ht,Uint8Array),ht.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}},ht.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==ht.prototype};const Pt=/[^+/0-9A-Za-z-_]/g;function Tt(e){if((e=(e=e.split("=")[0]).trim().replace(Pt,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}function Ot(e){if(At(e,Uint8Array)){const t=new Uint8Array(e);return Rt(t.buffer,t.byteOffset,t.byteLength)}return Ft(e)}function Rt(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,ht.prototype),r}function Ft(e){const t=e.length<0?0:0|yt(e.length),n=Ct(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function kt(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 Mt(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 Ut(this,t,n);case"utf8":case"utf-8":return kt(this,t,n);case"ascii":return Dt(this,t,n);case"latin1":case"binary":return Lt(this,t,n);case"base64":return Ht(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _t(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}ht.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?kt(this,0,e):Mt.apply(this,arguments)};const xt=4096;function Nt(e){const t=e.length;if(t<=xt)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=xt));return n}function Ut(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+=Kt[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 Ht(e,t,n){return 0===t&&n===e.length?ft.fromByteArray(e):ft.fromByteArray(e.slice(t,n))}function _t(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 Vt(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(Jt(r))return a;e[n+a]=r}return a}function Bt(e,t,n,r){return Gt(Et(t,e.length-n),e,n,r)}function jt(e,t,n,r){return Gt(qt(t),e,n,r)}function Wt(e,t,n,r){return Gt(It(t),e,n,r)}function zt(e,t,n,r){return Gt($t(t,e.length-n),e,n,r)}function qt(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 Gt(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 Jt(e){return e!=e}ht.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 Vt(this,e,t,n);case"utf8":case"utf-8":return Bt(this,e,t,n);case"ascii":case"latin1":case"binary":return jt(this,e,t,n);case"base64":return Wt(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return zt(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}};const Kt=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 Qt(e){if(ht.isBuffer(e)){const t=0|yt(e.length),n=Ct(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||Jt(e.length)?Ct(0):Ft(e):"Buffer"===e.type&&Array.isArray(e.data)?Ft(e.data):void 0}const Zt={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Xt;const Yt=new Uint8Array(16);function en(){if(!Xt&&(Xt="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Xt))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Xt(Yt)}const tn=[];for(let e=0;e<256;++e)tn.push((e+256).toString(16).slice(1));function nn(e,t=0){return tn[e[t+0]]+tn[e[t+1]]+tn[e[t+2]]+tn[e[t+3]]+"-"+tn[e[t+4]]+tn[e[t+5]]+"-"+tn[e[t+6]]+tn[e[t+7]]+"-"+tn[e[t+8]]+tn[e[t+9]]+"-"+tn[e[t+10]]+tn[e[t+11]]+tn[e[t+12]]+tn[e[t+13]]+tn[e[t+14]]+tn[e[t+15]]}const rn=function(e,t,n){if(Zt.randomUUID&&!t&&!e)return Zt.randomUUID();const r=(e=e||{}).random||(e.rng||en)();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 nn(r)},on=/^(?:[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 an=function(e){return"string"==typeof e&&on.test(e)};var sn,cn,un,ln,dn,fn,pn,gn;!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"}(sn||(sn={})),function(e){e.office="Office",e.outlook="Outlook",e.outlookWin32="OutlookWin32",e.orange="Orange",e.places="Places",e.teams="Teams",e.teamsModern="TeamsModern"}(cn||(cn={})),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"}(un||(un={})),function(e){e.copilotSidePanel="copilotSidePanel",e.copilotMainPane="copilotMainPane",e.copilotFullScreen="copilotFullScreen"}(ln||(ln={})),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"}(dn||(dn={})),function(e){e[e.Admin=0]="Admin",e[e.User=1]="User",e[e.Guest=2]="Guest"}(fn||(fn={})),function(e){e.Large="large",e.Medium="medium",e.Small="small"}(pn||(pn={})),function(e){e.Regular="Regular",e.Private="Private",e.Shared="Shared"}(gn||(gn={}));const hn={errorCode:Le.NOT_SUPPORTED_ON_PLATFORM},mn={majorVersion:1,minorVersion:5},vn={adaptiveCardSchemaVersion:{majorVersion:1,minorVersion:5}},wn=new Error("Invalid input count: Must supply a valid image count (limit of 10)."),Cn=new Error("Invalid response: Received more images than the specified max limit in the response.");function yn(e){return(t,n)=>{if(!t)throw new Error(e||n)}}function Sn(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 bn(){return rn()}function An(e){return Object.keys(e).forEach(t=>{null!==e[t]&&void 0!==e[t]&&"object"==typeof e[t]&&An(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 In(e,t,...n){const r=e(...n);return r.then(()=>{t&&t(null)}).catch(e=>{t&&t(e)}),r}function Pn(e,t,...n){const r=e(...n);return r.then(e=>{t&&t(null,e)}).catch(e=>{t&&t(e,null)}),r}function Tn(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 On(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 Rn(e){return!(Sn(`${e.majorVersion}.${e.minorVersion}`,`${mn.majorVersion}.${mn.minorVersion}`)>=0)}function Fn(e){return"https:"===e.protocol}function kn(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=pt.from(t,"base64").toString();n(new Blob([o],{type:e}))})}function Mn(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 xn(){if(Nn())throw new Error("window object undefined at SSR check");return window}function Nn(){return"undefined"==typeof window}function Un(e,t){if(Hn(e)||!_n(e)||!Vn(e))throw t||new Error("id is not valid.")}function Dn(e,t){const n=e.toString().toLocaleLowerCase();if(Hn(n))throw t||new Error("Invalid Url");if(n.length>2048)throw t||new Error("Url exceeds the maximum size of 2048 characters");if(!Fn(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 Hn(e){return new RegExp(`${/<script[^>]*>|<script[^&]*>|%3Cscript[^%]*%3E/gi.source}|${/<\/script[^>]*>|<\/script[^&]*>|%3C\/script[^%]*%3E/gi.source}`,"gi").test(e)}function _n(e){return e.length<256&&e.length>4}function Vn(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n<32||n>126)return!1}return!0}function Bn(e){if(!e)throw new Error("id must not be empty");if(!1===an(e))throw new Error("id must be a valid UUID")}const jn=!!performance&&"now"in performance;function Wn(){return jn?performance.now()+performance.timeOrigin:void 0}function zn(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=>zn(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=>zn(e[n],t+1))}function qn(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:Be.NotAdult})})})}class $n{constructor(e=bn()){this.uuid=e,Bn(e)}toString(){return this.uuid}serialize(){return this.toString()}}function Gn(e){if(!(e instanceof $n))throw new Error(`Potential id (${JSON.stringify(e)}) is invalid; it is not an instance of UUID class.`)}class Jn{}Jn.initializeCalled=!1,Jn.initializeCompleted=!1,Jn.additionalValidOrigins=[],Jn.initializePromise=void 0,Jn.isFramelessWindow=!1,Jn.frameContext=void 0,Jn.hostClientType=void 0,Jn.printCapabilityEnabled=!1,Jn.teamsJsInstanceId=(new $n).toString();var Kn=n(815);const Qn=new $n,Zn=Kn.debug.formatArgs;Kn.debug.formatArgs=function(e){e[0]=`(${(new Date).toISOString()}): ${e[0]} [${Qn.toString()}]`,Zn.call(this,e)};const Xn=(0,Kn.debug)("teamsJs");function Yn(e){return Xn.extend(e)}function er(e,t){return`${e}_${t}`}function tr(e){return/^v\d+_[\w.]+$/.test(e)}var nr=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 rr=Yn("runtime"),or=4;function ir(e){return e.apiVersion===or}const ar={apiVersion:-1,supports:{}};function sr(e){if(ir(e))return!0;throw-1===e.apiVersion?new Error(ut):new Error(lt)}let cr=ar;const ur={apiVersion:4,isNAAChannelRecommended:!1,isDeeplyNestedAuthSupported:!1,hostVersionsInfo:vn,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:{}}}},lr=[sn.desktop,sn.web,sn.rigel,sn.surfaceHub,sn.teamsRoomsWindows,sn.teamsRoomsAndroid,sn.teamsPhones,sn.teamsDisplays],dr=[sn.android,sn.ios,sn.ipados,sn.visionOS],fr=[...lr,...dr];function pr(e){let t=e;if(t.apiVersion<or&&gr.forEach(e=>{t.apiVersion===e.versionToUpgradeFrom&&(t=e.upgradeToNextVersion(t))}),ir(t))return t;throw new Error("Received a runtime that could not be upgraded to the latest version")}const gr=[{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=nr(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})}}}],hr="2.1.2",mr={"1.0.0":[{capability:{pages:{appButton:{},tabs:{}},stageView:{}},hostClientTypes:lr}],"1.9.0":[{capability:{location:{}},hostClientTypes:fr}],"2.0.0":[{capability:{people:{}},hostClientTypes:fr},{capability:{sharing:{}},hostClientTypes:[sn.desktop,sn.web]}],"2.0.1":[{capability:{teams:{fullTrust:{joinedTeams:{}}}},hostClientTypes:[sn.android,sn.desktop,sn.ios,sn.teamsRoomsAndroid,sn.teamsPhones,sn.teamsDisplays,sn.web]},{capability:{webStorage:{}},hostClientTypes:[sn.desktop]}],"2.0.5":[{capability:{webStorage:{}},hostClientTypes:[sn.android,sn.ios]}],"2.0.8":[{capability:{sharing:{}},hostClientTypes:[sn.android,sn.ios]}],"2.1.1":[{capability:{nestedAppAuth:{}},hostClientTypes:[sn.android,sn.ios,sn.ipados,sn.visionOS]}],"2.1.2":[]},vr=rr.extend("generateBackCompatRuntimeConfig");function wr(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]=wr(e[r]||{},t[r]));return n}function Cr(e,t,n){vr("generating back compat runtime config for %s",e);let r=Object.assign({},t.supports);vr("Supported capabilities in config before updating based on highestSupportedVersion: %o",r),Object.keys(n).forEach(t=>{Sn(e,t)>=0&&n[t].forEach(e=>{void 0!==Jn.hostClientType&&e.hostClientTypes.includes(Jn.hostClientType)&&(r=wr(r,e.capability))})});const o={apiVersion:or,hostVersionsInfo:vn,isLegacyTeams:!0,supports:r};return vr("Runtime config after updating based on highestSupportedVersion: %o",o),o}const yr=rr.extend("applyRuntimeConfig");function Sr(e){"string"==typeof e.apiVersion&&(yr("Trying to apply runtime with string apiVersion, processing as v1: %o",e),e=Object.assign(Object.assign({},e),{apiVersion:1})),yr("Fast-forwarding runtime %o",e);const t=pr(e);yr("Applying runtime %o",t),cr=An(t)}function br(e){return null!=e&&void 0!==e.serialize&&"function"==typeof e.serialize}const Ar="2.49.0-beta.0",Er={childProxyingCommunication:!1};function Ir(){Er.childProxyingCommunication=!0}function Pr(){return Er.childProxyingCommunication}let Tr={disableEnforceOriginMatchForChildResponses:!1};function Or(){return Tr}function Rr(e){Tr=e}function Fr(e){return Rr(Object.assign(Object.assign({},Tr),e)),Or()}var kr=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const Mr=e=>{const{uuid:t}=e,n=kr(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})},xr=e=>{const{uuidAsString:t}=e,n=kr(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new $n(t):void 0})},Nr=e=>{const{uuidAsString:t}=e,n=kr(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new $n(t):void 0})},Ur=e=>{const{uuid:t}=e,n=kr(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=Yn("flushMessageQueue");function Hr(e,t,n,r){if(e&&t&&0!==n.length)for(;n.length>0;){const o=n.shift();if(o){const n=Mr(o);Lr("Flushing message %s from %s message queue via postMessage.",Dr(n),r),e.postMessage(n,t)}}}const _r=/^[A-Za-z][A-Za-z\d+.-]*:\/\//;function Vr(e,t){const n=e.substring(1);return e===t||"*."===e.substring(0,2)&&t.length>n.length&&t.split(".").length===n.split(".").length&&t.substring(t.length-n.length)===n}class Br{constructor(e,t,n){this.protocol=e,this.host=t,this.logger=n}static canUse(e){return _r.test(e)}static create(e,t){const n=e.split("://");return new Br(n[0],n[1],t.extend("InternalURLPattern"))}test(e){return this.logger("Testing URL %s against pattern protocol: %s, host: %s",e,this.protocol,this.host),e.protocol===`${this.protocol}:`&&(!e.host||Vr(this.host,e.host))}}function jr(e){return Br.canUse(e)}function Wr(e,t){if(Br.canUse(e))return Br.create(e,t);t("No URL verifier available for pattern: %s",e)}const zr=Yn("internal"),qr=zr.extend("ensureInitializeCalled"),$r=zr.extend("ensureInitialized");function Gr(){if(!Jn.initializeCalled)throw qr(ct),new Error(ct)}function Jr(e,...t){if(!Jn.initializeCompleted)throw $r("%s. initializeCalled: %s",ct,Jn.initializeCalled.toString()),new Error(ct);if(t&&t.length>0){let e=!1;for(let n=0;n<t.length;n++)if(t[n]===Jn.frameContext){e=!0;break}if(!e)throw new Error(`This call is only allowed in following contexts: ${JSON.stringify(t)}. Current context: "${Jn.frameContext}".`)}return sr(e)}function Kr(e=Ge){const t=Sn(Jn.clientSupportedSDKVersion,e);return!isNaN(t)&&t>=0}function Qr(){return Jn.hostClientType==sn.android||Jn.hostClientType==sn.ios||Jn.hostClientType==sn.ipados||Jn.hostClientType==sn.visionOS}function Zr(e=Ge){if(!Qr()){throw{errorCode:Le.NOT_SUPPORTED_ON_PLATFORM}}if(!Kr(e)){throw{errorCode:Le.OLD_PLATFORM}}}function Xr(e){let t=Jn.additionalValidOrigins.concat(e.filter(e=>"string"==typeof e&&jr(e)));const n={};t=t.filter(e=>!n[e]&&(n[e]=!0,!0)),Jn.additionalValidOrigins=t}function Yr(e){if(!ro(e))throw new Error(`Potential app id (${e}) is invalid; its length ${e.length} is not within the length limits (${to}-${no}).`)}function eo(e){if(Hn(e))throw new Error(`Potential app id (${e}) is invalid; it contains script tags.`);if(oo(e))throw new Error(`Potential app id (${e}) is invalid; it contains non-printable characters.`)}const to=4,no=256;function ro(e){return e.length<no&&e.length>to}function oo(e){return[...e].some(e=>{const t=e.charCodeAt(0);return t<32||t>126})}function io(e){if(!(e instanceof so))throw new Error(`Potential app id (${e}) is invalid; it is not an instance of AppId class.`)}class ao{constructor(e){this.idAsString=e,eo(e)}serialize(){return this.toString()}toString(){return this.idAsString}}class so extends ao{constructor(e){super(e),Yr(e)}toJSON(){return{appIdAsString:this.toString()}}}function co(e){return null==e}var uo=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 lo;const fo="v1",po=Yn("messageChannels.telemetry");function go(){return uo(this,void 0,void 0,function*(){if(lo)return po("Returning telemetry port from cache"),lo;if(!ho())throw hn;return lo=yield Pc(er(fo,"messageChannels.telemetry.getTelemetryPort"),"messageChannels.telemetry.getTelemetryPort"),lo})}function ho(){var e;return!(!Jr(cr)||!(null===(e=cr.supports.messageChannels)||void 0===e?void 0:e.telemetry))}function mo(){lo=void 0}var vo=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 wo;const Co="v1",yo=Yn("messageChannels.dataLayer");function So(){return vo(this,void 0,void 0,function*(){if(wo)return yo("Returning dataLayer port from cache"),wo;if(!bo())throw hn;return wo=yield Pc(er(Co,"messageChannels.dataLayer.getDataLayerPort"),"messageChannels.dataLayer.getDataLayerPort"),wo})}function bo(){var e;return!(!Jr(cr)||!(null===(e=cr.supports.messageChannels)||void 0===e?void 0:e.dataLayer))}function Ao(){wo=void 0}function Eo(e){if(!e)throw new Error("[app.lifecycle.registerBeforeSuspendOrTerminateHandler] Handler cannot be null");Jr(cr),Ws(e)}function Io(e){if(!e)throw new Error("[app.lifecycle.registerOnResumeHandler] Handler cannot be null");Jr(cr),zs(e)}const Po="v2",To=Yn("app"),Oo={AppLoaded:"appInitialization.appLoaded",Success:"appInitialization.success",Failure:"appInitialization.failure",ExpectedFailure:"appInitialization.expectedFailure"};var Ro,Fo;function ko(){return Jn.initializeCompleted}function Mo(){return Jn.frameContext}function xo(e){return na(er(Po,"app.initialize"),e)}function No(e){gc.currentWindow=e}function Uo(){Jn.initializeCalled&&(Is(),Jn.initializeCalled=!1,Jn.initializeCompleted=!1,Jn.initializePromise=void 0,Jn.additionalValidOrigins=[],Jn.frameContext=void 0,Jn.hostClientType=void 0,Jn.isFramelessWindow=!1,mo(),Ao(),vc())}function Do(){return new Promise(e=>{Gr(),e(wc(er(Po,"app.getContext"),"getContext"))}).then(e=>qo(e))}function Lo(){Gr(),ra(er(Po,"app.notifyAppLoaded"))}function Ho(){return aa(er(Po,"app.notifySuccess"))}function _o(e){Gr(),ia(er(Po,"app.notifyFailure"),e)}function Vo(e){Gr(),oa(er(Po,"app.notifyExpectedFailure"),e)}function Bo(e){da(er(Po,"app.registerOnThemeChangeHandler"),e)}function jo(e){fa(er(Po,"app.registerOnContextChangeHandler"),e)}function Wo(e){Ds(e)}function zo(e){return pa(er(Po,"app.openLink"),e)}function qo(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:cn.teams,clientType:e.hostClientType?e.hostClientType:sn.web,sessionId:e.sessionId?e.sessionId:"",ringId:e.ringId,ancestors:e.hostAncestors},appLaunchId:e.appLaunchId,appId:e.appId?new so(e.appId):void 0,manifestVersion:e.manifestVersion},page:{id:e.entityId,frameContext:e.frameContext?e.frameContext:Jn.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){si(er(ii,"dialog.update.resize"),e)}function Go(){return!(!Jr(cr)||!cr.supports.dialog)&&!!cr.supports.dialog.update}function Jo(e,t,n){ui(er(ii,"dialog.url.bot.open"),e,t,n)}function Ko(){return Jr(cr)&&void 0!==(cr.supports.dialog&&cr.supports.dialog.url&&cr.supports.dialog.url.bot)}function Qo(e){if(Jr(cr,un.task),!Yo())throw hn;Rc(er(ii,"dialog.url.parentCommunication.sendMessageToParentFromDialog"),"messageForParent",[e])}function Zo(e){if(Jr(cr,un.content,un.sidePanel,un.meetingStage),!Yo())throw hn;Rc(er(ii,"dialog.url.parentCommunication.sendMessageToDialog"),"messageForChild",[e])}function Xo(e){if(Jr(cr,un.task),!Yo())throw hn;for(Rs("messageForChild"),Os(er(ii,"dialog.url.parentCommunication.registerMessageForChildHandler"),"messageForChild",e),pi.reverse();pi.length>0;){e(pi.pop())}}function Yo(){var e,t;return Jr(cr)&&!!(null===(t=null===(e=cr.supports.dialog)||void 0===e?void 0:e.url)||void 0===t?void 0:t.parentCommunication)}function ei(e,t,n){ci(er(ii,"dialog.url.open"),e,t,n)}function ti(e,t){li(er(ii,"dialog.url.submit"),e,t)}function ni(){return Jr(cr)&&void 0!==(cr.supports.dialog&&cr.supports.dialog.url)}function ri(e){return{url:e.url,height:e.size?e.size.height:pn.Small,width:e.size?e.size.width:pn.Small,title:e.title,fallbackUrl:e.fallbackUrl}}function oi(e){const t=ri(e);return t.completionBotId=e.completionBotId,t}!function(e){e.AuthFailed="AuthFailed",e.Timeout="Timeout",e.Other="Other"}(Ro||(Ro={})),function(e){e.PermissionError="PermissionError",e.NotFound="NotFound",e.Throttling="Throttling",e.Offline="Offline",e.Other="Other"}(Fo||(Fo={})),To("teamsjs instance is version %s, starting at %s UTC (%s local)",Ar,(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?To("teamsjs is being used from %s. %s",t,n):To("teamsjs is being used from a script tag embedded directly in your html. %s",n)}();const ii="v2",ai="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 si(e,t){if(Jr(cr,un.content,un.sidePanel,un.task,un.meetingStage),!Go())throw hn;Rc(e,"tasks.updateTask",[t])}function ci(e,t,n,r){if(Jr(cr,un.content,un.sidePanel,un.meetingStage),!ni())throw hn;r&&Os(er(ii,"dialog.url.registerMessageForParentHandler"),"messageForParent",r);Rc(e,"tasks.startTask",[ri(t)],(e,t)=>{null==n||n({err:e,result:t}),Rs("messageForParent")})}function ui(e,t,n,r){if(Jr(cr,un.content,un.sidePanel,un.meetingStage),!Ko())throw hn;r&&Os(er(ii,"dialog.url.bot.registerMessageForParentHandler"),"messageForParent",r);Rc(e,"tasks.startTask",[oi(t)],(e,t)=>{null==n||n({err:e,result:t}),Rs("messageForParent")})}function li(e,t,n){if(Jr(cr,un.content,un.task),!ni())throw hn;Jn.frameContext===un.content&&console.warn(ai),Rc(e,"tasks.completeTask",[t,n?Array.isArray(n)?n:[n]:[]])}function di(e){return{card:e.card,height:e.size?e.size.height:pn.Small,width:e.size?e.size.width:pn.Small,title:e.title}}function fi(e){const t=di(e);return t.completionBotId=e.completionBotId,t}const pi=[];function gi(e){Jn.frameContext&&(Jn.frameContext===un.task?pi.push(e):Rs("messageForChild"))}function hi(e,t){if(Jr(cr,un.content,un.sidePanel,un.meetingStage),!mi())throw hn;const n=fi(e);Rc(er(ii,"dialog.adaptiveCard.bot.open"),"tasks.startTask",[n],(e,n)=>{null==t||t({err:e,result:n})})}function mi(){const e=cr.hostVersionsInfo&&cr.hostVersionsInfo.adaptiveCardSchemaVersion&&!Rn(cr.hostVersionsInfo.adaptiveCardSchemaVersion);return Jr(cr)&&void 0!==(e&&cr.supports.dialog&&cr.supports.dialog.card&&cr.supports.dialog.card.bot)}function vi(e,t){if(Jr(cr,un.content,un.sidePanel,un.meetingStage),!wi())throw hn;const n=di(e);Rc(er(ii,"dialog.adaptiveCard.open"),"tasks.startTask",[n],(e,n)=>{null==t||t({err:e,result:n})})}function wi(){const e=cr.hostVersionsInfo&&cr.hostVersionsInfo.adaptiveCardSchemaVersion&&!Rn(cr.hostVersionsInfo.adaptiveCardSchemaVersion);return Jr(cr)&&void 0!==(e&&cr.supports.dialog&&cr.supports.dialog.card)}function Ci(){Os(er(ii,"dialog.registerMessageForChildHandler"),"messageForChild",gi,!1)}function yi(){return!(!Jr(cr)||!cr.supports.dialog)}const Si="v2";var bi,Ai;!function(e){e[e.ifRoom=0]="ifRoom",e[e.overflowOnly=1]="overflowOnly"}(bi||(bi={}));class Ei{constructor(){this.enabled=!0,this.selected=!1}}let Ii,Pi,Ti,Oi,Ri;function Fi(){Os(er(Si,"menus.registerNavBarMenuItemPressHandler"),"navBarMenuItemPress",Ni,!1),Os(er(Si,"menus.registerActionMenuItemPressHandler"),"actionMenuItemPress",Di,!1),Os(er(Si,"menus.registerSetModuleViewHandler"),"setModuleView",Mi,!1)}function ki(e,t){if(Jr(cr),!Li())throw hn;Ti=t,Rc(er(Si,"menus.setUpViews"),"setUpViews",[e])}function Mi(e){Ti&&Ti(e)||(Jr(cr),Rc(er(Si,"menus.handleViewConfigItemPress"),"viewConfigItemPress",[e]))}function xi(e,t){if(Jr(cr),!Li())throw hn;Ii=t,Rc(er(Si,"menus.setNavBarMenu"),"setNavBarMenu",[e])}function Ni(e){Ii&&Ii(e)||(Jr(cr),Rc(er(Si,"menus.handleNavBarMenuItemPress"),"handleNavBarMenuItemPress",[e]))}function Ui(e,t){if(Jr(cr),!Li())throw hn;Pi=t,Rc(er(Si,"menus.showActionMenu"),"showActionMenu",[e])}function Di(e){Pi&&Pi(e)||(Jr(cr),Rc(er(Si,"menus.handleActionMenuItemPress"),"handleActionMenuItemPress",[e]))}function Li(){return!(!Jr(cr)||!cr.supports.menus)}function Hi(){Os(er(ns,"pages.config.registerSettingsSaveHandler"),"settings.save",qi,!1),Os(er(ns,"pages.config.registerSettingsRemoveHandler"),"settings.remove",Ji,!1)}function _i(e){return ds(er(ns,"pages.config.setValidityState"),e)}function Vi(e){return ps(er(ns,"pages.config.setConfig"),e)}function Bi(e){ji(er(ns,"pages.config.registerOnSaveHandler"),e,()=>{if(!co(e)&&!Qi())throw hn})}function ji(e,t,n){!co(t)&&Jr(cr,un.settings),n&&n(),Oi=t,!co(t)&&Rc(e,"registerHandler",["save"])}function Wi(e){zi(er(ns,"pages.config.registerOnRemoveHandler"),e,()=>{if(!co(e)&&!Qi())throw hn})}function zi(e,t,n){!co(t)&&Jr(cr,un.remove,un.settings),n&&n(),Ri=t,!co(t)&&Rc(e,"registerHandler",["remove"])}function qi(e){const t=new Gi(e);Oi?Oi(t):Ks()?nc("settings.save",[e]):t.notifySuccess()}function $i(e){ks(er(ns,"pages.config.registerChangeConfigHandler"),"changeSettings",e,[un.content],()=>{if(!Qi())throw hn})}!function(e){e.dropDown="dropDown",e.popOver="popOver"}(Ai||(Ai={}));class Gi{constructor(e){this.notified=!1,this.result=e||{}}notifySuccess(){this.ensureNotNotified(),Rc(er(ns,"pages.saveEvent.notifySuccess"),"settings.save.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),Rc(er(ns,"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 Ji(){const e=new Ki;Ri?Ri(e):Ks()?nc("settings.remove",[]):e.notifySuccess()}class Ki{constructor(){this.notified=!1}notifySuccess(){this.ensureNotNotified(),Rc(er(ns,"pages.removeEvent.notifySuccess"),"settings.remove.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),Rc(er(ns,"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 Qi(){return!(!Jr(cr)||!cr.supports.pages)&&!!cr.supports.pages.config}class Zi{}class Xi extends Zi{validate(e){return!0}deserialize(e){return e}}var Yi=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 ea=6e4,ta=Yn("app");function na(e,t){if(Nn()){return ta.extend("initialize")("window object undefined at initialization"),Promise.resolve()}return Tn(()=>la(e,t),ea,new Error("SDK initialization timed out."))}function ra(e){Rc(e,Oo.AppLoaded,[Ar])}function oa(e,t){Rc(e,Oo.ExpectedFailure,[t.reason,t.message])}function ia(e,t){Rc(e,Oo.Failure,[t.reason,t.message,t.authHeader])}function aa(e){return Yi(this,void 0,void 0,function*(){if(Jn.initializeCompleted)return ca(e);if(!Jn.initializePromise)throw new Error(ct);return Jn.initializePromise.then(()=>ca(e))})}function sa(){var e;return Jr(cr)&&!!(null===(e=cr.supports.app)||void 0===e?void 0:e.notifySuccessResponse)}function ca(e){return Yi(this,void 0,void 0,function*(){return sa()?Ec(Oo.Success,[Ar],new Xi,e).then(()=>({hasFinishedSuccessfully:!0})):(Rc(e,Oo.Success,[Ar]),{hasFinishedSuccessfully:"unknown"})})}const ua=ta.extend("initializeHelper");function la(e,t){return new Promise(n=>{Jn.initializeCalled||(Jn.initializeCalled=!0,Es(),Jn.initializePromise=mc(t,e).then(({context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r=Ge})=>{Jn.frameContext=e,Jn.hostClientType=t,Jn.clientSupportedSDKVersion=r;try{ua("Parsing %s",n);let e=JSON.parse(n);if(ua("Checking if %o is a valid runtime object",null!=e?e:"null"),!e||!e.apiVersion)throw new Error("Received runtime config is invalid");e=qn(e),n&&Sr(e)}catch(e){if(!(e instanceof SyntaxError))throw e;try{ua("Attempting to parse %s as an SDK version",n),isNaN(Sn(n,Ge))||(Jn.clientSupportedSDKVersion=n);let e=JSON.parse(r);if(ua("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=qn(e),Sr(e)}catch(e){if(!(e instanceof SyntaxError))throw e;Sr(Cr(Jn.clientSupportedSDKVersion,ur,mr))}}Jn.initializeCompleted=!0}),Fi(),Hi(),Ci()),Array.isArray(t)&&Xr(t),void 0!==Jn.initializePromise?n(Jn.initializePromise):ua("GlobalVars.initializePromise is unexpectedly undefined")})}function da(e,t){!co(t)&&Gr(),Ms(e,t)}function fa(e,t){!co(t)&&Gr(),xs(e,t)}function pa(e,t){return new Promise(n=>{Jr(cr,un.content,un.sidePanel,un.settings,un.task,un.stage,un.meetingStage),n(Cc(e,"executeDeepLink",t))})}var ga=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 ha=[];const ma=Yn("validateOrigin");let va;function wa(){return ga(this,void 0,void 0,function*(){va||(yield ya())})}function Ca(){return 0===ha.length}function ya(e=!1){return ga(this,void 0,void 0,function*(){if(!Ca()&&!e)return ha;if(va)return va;if(Nn())return ha=rt,rt;{ma("Initiating fetch call to acquire valid origins list from CDN");const e=new AbortController,t=setTimeout(()=>e.abort(),ot);return va=fetch(it,{signal:e.signal}).then(e=>{if(clearTimeout(t),!e.ok)throw new Error("Invalid Response from Fetch Call");return ma("Fetch call completed and retrieved valid origins list from CDN"),e.json().then(e=>{if(Sa(JSON.stringify(e)))return ha=e.validOrigins,ha;throw new Error("Valid origins list retrieved from CDN is invalid")})}).catch(e=>("AbortError"===e.name?ma(`validOrigins fetch call to CDN failed due to Timeout of ${ot} ms. Defaulting to fallback list`):ma("validOrigins fetch call to CDN failed with error: %s. Defaulting to fallback list",e),ha=rt,ha)),va}})}function Sa(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 ma("isValidOriginsFromCDN call failed to validate origin: %s",e),!1}return!0}function ba(e,t){let n;try{const t=Wr(e,ma);if(!t)return!1;n=t}catch(e){return!1}return n.test(t)}function Aa(e,t){const n=t||Ca()?rt:ha;return Ea(e,n)?Promise.resolve(!0):(ma("Origin %s is not in the local valid origins list, fetching from CDN",e),ya(t).then(t=>Ea(e,t)))}function Ea(e,t){for(const t of Jn.additionalValidOrigins)if(ba(t,e))return!0;const n=e.host;return Fn(e)?!!t.some(e=>Vr(e,n))||(ma("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,Jn.additionalValidOrigins),!1):(ma("Origin %s is invalid because it is not using https protocol. Protocol being used: %s",e,e.protocol),!1)}function Ia(e){ks(er(ns,"pages.appButton.onClick"),"appButtonClick",e,[un.content],()=>{if(!Oa())throw hn})}function Pa(e){ks(er(ns,"pages.appButton.onHoverEnter"),"appButtonHoverEnter",e,[un.content],()=>{if(!Oa())throw hn})}function Ta(e){ks(er(ns,"pages.appButton.onHoverLeave"),"appButtonHoverLeave",e,[un.content],()=>{if(!Oa())throw hn})}function Oa(){return!(!Jr(cr)||!cr.supports.pages)&&!!cr.supports.pages.appButton}function Ra(){Cs()}function Fa(){return os(er(ns,"pages.backStack.navigateBack"))}function ka(e){Ma(er(ns,"pages.backStack.registerBackButtonHandler"),e,()=>{if(!co(e)&&!xa())throw hn})}function Ma(e,t,n){!co(t)&&Jr(cr),n&&n(),ws(t),!co(t)&&Rc(e,"registerHandler",["backButton"])}function xa(){return!(!Jr(cr)||!cr.supports.pages)&&!!cr.supports.pages.backStack}function Na(e){return new Promise(t=>{if(Jr(cr,un.content,un.sidePanel,un.settings,un.task,un.stage,un.meetingStage),!Da())throw hn;t(Sc(er(ns,"pages.currentApp.navigateTo"),"pages.currentApp.navigateTo",e))})}function Ua(){return new Promise(e=>{if(Jr(cr,un.content,un.sidePanel,un.settings,un.task,un.stage,un.meetingStage),!Da())throw hn;e(Sc(er(ns,"pages.currentApp.navigateToDefaultPage"),"pages.currentApp.navigateToDefaultPage"))})}function Da(){return!(!Jr(cr)||!cr.supports.pages)&&!!cr.supports.pages.currentApp}function La(){if(Jr(cr,un.content),!_a())throw hn;Rc(er(ns,"pages.fullTrust.enterFullscreen"),"enterFullscreen",[])}function Ha(){if(Jr(cr,un.content),!_a())throw hn;Rc(er(ns,"pages.fullTrust.exitFullscreen"),"exitFullscreen",[])}function _a(){return!(!Jr(cr)||!cr.supports.pages)&&!!cr.supports.pages.fullTrust}function Va(e){return is(er(ns,"pages.tabs.navigateToTab"),e)}function Ba(e){return ss(er(ns,"pages.tabs.getTabInstances"),e)}function ja(e){return cs(er(ns,"pages.tabs.getMruTabInstances"),e)}function Wa(){return!(!Jr(cr)||!cr.supports.pages)&&!!cr.supports.pages.tabs}var za,qa;function $a(e){const t=er(ns,"pages.returnFocus");if(Jr(cr),!ts())throw hn;if(void 0===e&&Rc(t,"returnFocus",[!1]),"boolean"==typeof e)Rc(t,"returnFocus",[e]);else switch(e){case qa.PreviousLandmark:case qa.GoToActivityFeed:Rc(t,"returnFocus",[!1,e]);break;case qa.NextLandmark:Rc(t,"returnFocus",[!0,e])}}function Ga(e){ks(er(ns,"pages.registerFocusEnterHandler"),"focusEnter",e,[],()=>{if(!ts())throw hn})}function Ja(e){ls(er(ns,"pages.setCurrentFrame"),e)}function Ka(e,t,n){wa(),na(er(ns,"pages.initializeWithFrameContext"),n).then(()=>t&&t()),Ja(e)}function Qa(){return fs(er(ns,"pages.getConfig."))}function Za(e){return rs(er(ns,"pages.navigateCrossDomain"),e)}function Xa(e){return new Promise(t=>{if(Jr(cr,un.content,un.sidePanel,un.settings,un.task,un.stage,un.meetingStage),!ts())throw hn;const n=er(ns,"pages.navigateToApp");if(cr.isLegacyTeams){t(Cc(n,"executeDeepLink",On(gs(e)?e:hs(e))))}else{t(Cc(n,"pages.navigateToApp",gs(e)?ms(e):e))}})}function Ya(e){return us(er(ns,"pages.shareDeepLink"),e)}function es(e){ks(er(ns,"pages.registerFullScreenHandler"),"fullScreenChange",e,[],()=>{if(!co(e)&&!ts())throw hn})}function ts(){return!(!Jr(cr)||!cr.supports.pages)}wa(),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.Read=2]="Read",e[e.Compose=3]="Compose"}(za||(za={})),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.GoToActivityFeed=2]="GoToActivityFeed"}(qa||(qa={}));const ns="v2";function rs(e,t){return new Promise(n=>{if(Jr(cr,un.content,un.sidePanel,un.settings,un.remove,un.task,un.stage,un.meetingStage),!ts())throw hn;n(yc(e,"navigateCrossDomain","Cross-origin navigation is only supported for URLs matching the pattern registered in the manifest.",t))})}function os(e){return new Promise(t=>{if(Jr(cr),!xa())throw hn;t(yc(e,"navigateBack","Back navigation is not supported in the current client or context."))})}function is(e,t){return new Promise(n=>{if(Jr(cr),!Wa())throw hn;n(yc(e,"navigateToTab","Invalid internalTabInstanceId and/or channelId were/was provided",t))})}function as(e,t){if(Jr(cr),!ts())throw hn;Rc(e,"returnFocus",[t])}function ss(e,t){return new Promise(n=>{if(Jr(cr),!Wa())throw hn;n(wc(e,"getTabInstances",t))})}function cs(e,t){return new Promise(n=>{if(Jr(cr),!Wa())throw hn;n(wc(e,"getMruTabInstances",t))})}function us(e,t){if(Jr(cr,un.content,un.sidePanel,un.meetingStage),!ts())throw hn;Rc(e,"shareDeepLink",[t.subPageId,t.subPageLabel,t.subPageWebUrl])}function ls(e,t){if(Jr(cr,un.content),!ts())throw hn;Rc(e,"setFrameContext",[t])}function ds(e,t){if(Jr(cr,un.settings,un.remove),!Qi())throw hn;Rc(e,"settings.setValidityState",[t])}function fs(e){return new Promise(t=>{if(Jr(cr,un.content,un.settings,un.remove,un.sidePanel),!ts())throw hn;t(wc(e,"settings.getSettings"))})}function ps(e,t){return new Promise(n=>{if(Jr(cr,un.content,un.settings,un.sidePanel),!Qi())throw hn;n(Cc(e,"settings.setSettings",t))})}function gs(e){return e.appId instanceof so}function hs(e){return Object.assign(Object.assign({},e),{appId:new so(e.appId),webUrl:e.webUrl?new URL(e.webUrl):void 0})}function ms(e){return Object.assign(Object.assign({},e),{appId:e.appId.toString(),webUrl:e.webUrl?e.webUrl.toString():void 0})}let vs;function ws(e){vs=e}function Cs(){Os(er(ns,"pages.backStack.registerBackButtonPressHandler"),"backButtonPress",ys,!1)}function ys(){vs&&vs()||(Ks()?nc("backButtonPress",[]):Fa())}var Ss=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 bs=Yn("handlers");class As{static initializeHandlers(){As.handlers.themeChange=Ns,As.handlers.contextChange=Us,As.handlers.load=_s,As.handlers.beforeUnload=js,Cs()}static uninitializeHandlers(){As.handlers={},As.themeChangeHandler=null,As.beforeUnloadHandler=null,As.beforeSuspendOrTerminateHandler=null,As.resumeHandler=null,As.contextChangeHandler=null}}function Es(){As.initializeHandlers()}function Is(){As.uninitializeHandlers()}As.handlers={},As.themeChangeHandler=null,As.loadHandler=null,As.beforeUnloadHandler=null,As.beforeSuspendOrTerminateHandler=null,As.resumeHandler=null,As.hostToAppPerformanceMetricsHandler=null,As.contextChangeHandler=null;const Ps=bs.extend("callHandler");function Ts(e,t){const n=As.handlers[e];if(n){Ps("Invoking the registered handler for message %s with arguments %o",e,t);return[!0,n.apply(this,t)]}return Ks()?(nc(e,t),[!1,void 0]):(Ps("Handler for action message %s not found.",e),[!1,void 0])}function Os(e,t,n,r=!0,o=[]){n?(As.handlers[t]=n,r&&Rc(e,"registerHandler",[t,...o])):delete As.handlers[t]}function Rs(e){delete As.handlers[e]}function Fs(e){return null!=As.handlers[e]}function ks(e,t,n,r,o){n&&Jr(cr,...r),o&&o(),Os(e,t,n)}function Ms(e,t){As.themeChangeHandler=t,!co(t)&&Rc(e,"registerHandler",["themeChange"])}function xs(e,t){As.contextChangeHandler=t,!co(t)&&Rc(e,"registerHandler",["contextChange"])}function Ns(e){As.themeChangeHandler&&As.themeChangeHandler(e),Ks()&&nc("themeChange",[e])}function Us(e){As.contextChangeHandler&&As.contextChangeHandler(e),Ks()&&nc("contextChange",[e])}function Ds(e){As.hostToAppPerformanceMetricsHandler=e}function Ls(e){As.hostToAppPerformanceMetricsHandler&&As.hostToAppPerformanceMetricsHandler(e)}function Hs(e,t){As.loadHandler=t,!co(t)&&Rc(e,"registerHandler",["load"])}function _s(e){const t=Vs(e);As.resumeHandler?(As.resumeHandler(t),Ks()&&nc("load",[t])):As.loadHandler&&(As.loadHandler(e),Ks()&&nc("load",[e]))}function Vs(e){return{entityId:e.entityId,contentUrl:new URL(e.contentUrl)}}function Bs(e,t){As.beforeUnloadHandler=t,!co(t)&&Rc(e,"registerHandler",["beforeUnload"])}function js(){return Ss(this,void 0,void 0,function*(){const e=()=>{Rc(er("v2","handleBeforeUnload"),"readyToUnload",[])};As.beforeSuspendOrTerminateHandler?(yield As.beforeSuspendOrTerminateHandler(),Ks()?nc("beforeUnload"):e()):As.beforeUnloadHandler&&As.beforeUnloadHandler(e)||(Ks()?nc("beforeUnload"):e())})}function Ws(e){As.beforeSuspendOrTerminateHandler=e,!co(e)&&Rc(er("v2","registerBeforeSuspendOrTerminateHandler"),"registerHandler",["beforeUnload"])}function zs(e){As.resumeHandler=e,!co(e)&&Rc(er("v2","registerOnResumeHandler"),"registerHandler",["load"])}var qs=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 $s=Yn("childProxyingCommunication");class Gs{}function Js(){Gs.window=null,Gs.origin=null,Gs.messageQueue=[]}function Ks(){return!!Pr()&&!!Gs.window}function Qs(e,t){return!!Pr()&&(Gs.window&&!Gs.window.closed&&e!==Gs.window||(Gs.window=e,Gs.origin=t),Gs.window&&Gs.window.closed?(Gs.window=null,Gs.origin=null,!1):Gs.window===e)}function Zs(e,t,n,r){return qs(this,void 0,void 0,function*(){Gs.window===t&&(Hr(Gs.window,Gs.origin,Gs.messageQueue,"child"),Ys(e,n,r))})}Gs.messageQueue=[];const Xs=$s.extend("handleIncomingMessageFromChild");function Ys(e,t,n){if(void 0===e.data.id||void 0===e.data.func)return;const r=xr(e.data),[o,i]=Ts(r.func,r.args);if(o&&void 0!==i)return Xs("Handler called in response to message %s from child. Returning response from handler to child, action: %s.",Dr(r),r.func),void tc(r.id,r.uuid,Array.isArray(i)?i:[i]);Xs("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),ec(r,t,n)}function ec(e,t,n){const r=t(er("v2","tasks.startTask"),e.func,e.args,!0,e.teamsJsInstanceId),o=Gs.origin;n(r.uuid,(...t)=>{if(!Gs.window)return;if(!Or().disableEnforceOriginMatchForChildResponses&&o!==Gs.origin)return void Xs("Origin of child window has changed, not sending response back to child window");const n=t.pop();Xs("Message from parent being relayed to child, id: %s",Dr(e)),tc(e.id,e.uuid,t,n)})}function tc(e,t,n,r){const o=Gs.window,i=rc(e,t,n,r),a=Ur(i),s=Gs.origin;o&&s&&(Xs("Sending message %s to %s via postMessage, args = %o",Dr(a),"child",a.args),o.postMessage(a,s))}function nc(e,t){const n=Gs.window,r=oc(e,t),o=Gs.origin;n&&o?n.postMessage(r,o):Gs.messageQueue.push(r)}function rc(e,t,n,r){return{id:e,uuid:t,args:n||[],isPartialResponse:r}}function oc(e,t){return{func:e,args:t||[]}}class ic{static storeCallbackInformation(e,t){ic.callbackInformation.set(e,t)}static clearMessages(){ic.callbackInformation.clear()}static deleteMessageInformation(e){ic.callbackInformation.delete(e)}static handleOneWayPerformanceMetrics(e,t,n){const r=e.monotonicTimestamp;r&&n?Ls({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=ic.callbackInformation.get(e);o&&t.monotonicTimestamp&&r?(Ls({actionName:o.name,messageDelay:r-t.monotonicTimestamp,requestStartedAt:o.calledAt}),ic.deleteMessageInformation(e)):n("Unable to send performance metrics for callback %s with arguments %o",e.toString(),t.args)}}ic.callbackInformation=new Map;const ac=Yn("nestedAppAuthUtils"),sc=ac.extend("tryPolyfillWithNestedAppAuthBridge"),cc="v2";function uc(e,t,n){var r;const o=sc;if(Jn.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=dc(a,n);s&&(a.nestedAppAuthBridge=s)}const lc=ac.extend("createNestedAppAuthBridge");function dc(e,t){const n=lc;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=er(cc,"nestedAppAuth.execute");o(e,r)},removeEventListener:(t,n)=>{e.removeEventListener(t,i(n))}}}var fc=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 pc=Yn("communication");class gc{}class hc{}function mc(e,t){if(hc.messageListener=e=>Lc(e),gc.currentWindow=gc.currentWindow||xn(),gc.parentWindow=gc.currentWindow.parent!==gc.currentWindow.self?gc.currentWindow.parent:gc.currentWindow.opener,gc.topWindow=gc.currentWindow.top,(gc.parentWindow||e)&&gc.currentWindow.addEventListener("message",hc.messageListener,!1),!gc.parentWindow){const e=gc.currentWindow;if(!e.nativeInterface)return Promise.reject(new Error("Initialization Failed. No Parent window found."));Jn.isFramelessWindow=!0,e.onNativeMessage=Gc}try{return gc.parentOrigin="*",bc(t,"initialize",[Ar,or,e]).then(([e,t,n,r])=>(uc(r,gc.currentWindow,{onMessage:_c,sendPostMessage:kc}),{context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r}))}finally{gc.parentOrigin=null}}function vc(){gc.currentWindow&&gc.currentWindow.removeEventListener("message",hc.messageListener,!1),gc.currentWindow=null,gc.parentWindow=null,gc.parentOrigin=null,hc.parentMessageQueue=[],hc.nextMessageId=0,hc.callbacks.clear(),hc.promiseCallbacks.clear(),hc.portCallbacks.clear(),hc.legacyMessageIdsToUuidMap={},ic.clearMessages(),Js()}function wc(e,t,...n){return bc(e,t,n).then(([e])=>e)}function Cc(e,t,...n){return bc(e,t,n).then(([e,t])=>{if(!e)throw new Error(t)})}function yc(e,t,n,...r){return bc(e,t,r).then(([e,t])=>{if(!e)throw new Error(t||n)})}function Sc(e,t,...n){return bc(e,t,n).then(([e,t])=>{if(e)throw e;return t})}function bc(e,t,n=void 0){if(!tr(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(Oc(Uc(e,t,n).uuid))})}function Ac(e){return e.map(e=>br(e)?e.serialize():e)}function Ec(e,t,n,r,o){var i;return fc(this,void 0,void 0,function*(){const a=Ac(t),[s]=yield bc(r,e,a);if(o&&o(s)||!o&&qe(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(`${Le.INTERNAL_ERROR}, message: Invalid response from host - ${JSON.stringify(s)}`)})}function Ic(e,t,n,r){var o;return fc(this,void 0,void 0,function*(){const i=Ac(t),[a]=yield bc(n,e,i);if(r&&r(a)||!r&&qe(a))throw new Error(`${a.errorCode}, message: ${null!==(o=a.message)&&void 0!==o?o:"None"}`);if(void 0!==a)throw new Error(`${Le.INTERNAL_ERROR}, message: Invalid response from host`)})}function Pc(e,t,n=void 0){if(!tr(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 Tc(Uc(e,t,n).uuid)}function Tc(e){return new Promise((t,n)=>{hc.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 Oc(e){return new Promise(t=>{hc.promiseCallbacks.set(e,t)})}function Rc(e,t,n,r){let o;if(n instanceof Function?r=n:n instanceof Array&&(o=n),!tr(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=Uc(e,t,o);r&&hc.callbacks.set(i.uuid,r)}hc.parentMessageQueue=[],hc.topMessageQueue=[],hc.nextMessageId=0,hc.callbacks=new Map,hc.promiseCallbacks=new Map,hc.portCallbacks=new Map,hc.legacyMessageIdsToUuidMap={};const Fc=pc.extend("sendNestedAuthRequestToTopWindow");function kc(e,t){const n=Fc,r=gc.topWindow,o=tu(e,t);return n("Message %s information: %o",Dr(o),{actionName:o.func}),xc(r,o)}const Mc=pc.extend("sendRequestToTargetWindowHelper");function xc(e,t){const n=Mc,r=Xc(e),o=Mr(t);if(Jn.isFramelessWindow)gc.currentWindow&&gc.currentWindow.nativeInterface&&(n("Sending message %s to %s via framelessPostMessage interface",Dr(o),r),gc.currentWindow.nativeInterface.framelessPostMessage(JSON.stringify(o)));else{const i=Zc(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),Qc(e).push(t))}return t}const Nc=pc.extend("sendMessageToParentHelper");function Uc(e,t,n,r,o){const i=Nc,a=gc.parentWindow,s=eu(e,t,n,r,o);return ic.storeCallbackInformation(s.uuid,{name:t,calledAt:s.timestamp}),i("Message %s information: %o",Dr(s),{actionName:t,args:n}),xc(a,s)}const Dc=pc.extend("processIncomingMessage");function Lc(e){return fc(this,void 0,void 0,function*(){if(!e||!e.data||"object"!=typeof e.data)return void Dc("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 Bc(t,n).then(r=>{r?(jc(t,n),t!==gc.parentWindow?Qs(t,n)&&Zs(e,t,Uc,(e,t)=>hc.callbacks.set(e,t)):Gc(e)):Dc("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 Hc=pc.extend("processAuthBridgeMessage");function _c(e,t){var n,r;const o=Hc;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?Bc(c,u)?(gc.topWindow&&!gc.topWindow.closed&&c!==gc.topWindow||(gc.topWindow=c,gc.topOrigin=u),gc.topWindow&&gc.topWindow.closed&&(gc.topWindow=null,gc.topOrigin=null),Hr(gc.topWindow,gc.topOrigin,hc.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 Vc=pc.extend("shouldProcessIncomingMessage");function Bc(e,t){return fc(this,void 0,void 0,function*(){if(gc.currentWindow&&e===gc.currentWindow)return Vc("Should not process message because it is coming from the current window"),!1;if(gc.currentWindow&&gc.currentWindow.location&&t&&t===gc.currentWindow.location.origin)return!0;{let e;try{e=new URL(t)}catch(e){return Vc("Message has an invalid origin of %s",t),!1}const n=yield Aa(e);return n||Vc("Message has an invalid origin of %s",t),n}})}function jc(e,t){Jn.isFramelessWindow||gc.parentWindow&&!gc.parentWindow.closed&&e!==gc.parentWindow||(gc.parentWindow=e,gc.parentOrigin=t),gc.parentWindow&&gc.parentWindow.closed&&(gc.parentWindow=null,gc.parentOrigin=null),Hr(gc.parentWindow,gc.parentOrigin,hc.parentMessageQueue,"parent")}const Wc=pc.extend("handleIncomingMessageFromParent");function zc(e){const t=Wc;if(!e.uuid)return hc.legacyMessageIdsToUuidMap[e.id];{const t=e.uuid,n=qc(hc.callbacks,t);if(n)return n;const r=qc(hc.promiseCallbacks,t);if(r)return r;const o=qc(hc.portCallbacks,t);if(o)return o}t("Received message %s that failed to produce a callbackId",Dr(e))}function qc(e,t){if(t){const n=[...e].find(([e,n])=>e.toString()===t.toString());if(n)return n[0]}}function $c(e,t){const n=qc(t,e.uuid);n&&t.delete(n),e.uuid?hc.legacyMessageIdsToUuidMap={}:delete hc.legacyMessageIdsToUuidMap[e.id]}function Gc(e){const t=Wc,n=Wn();if("id"in e.data&&"number"==typeof e.data.id){const r=e.data,o=Nr(r),i=zc(o);if(i){const r=hc.callbacks.get(i);t("Received a response from parent for message %s",i.toString()),ic.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]),Jc(e)||(t("Removing registered callback for message %s",i.toString()),$c(o,hc.callbacks)));const a=hc.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()),$c(o,hc.promiseCallbacks));const s=hc.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()),$c(o,hc.portCallbacks)}o.uuid&&(hc.legacyMessageIdsToUuidMap={})}}else if("func"in e.data&&"string"==typeof e.data.func){const r=e.data;ic.handleOneWayPerformanceMetrics(r,t,n),t('Received a message from parent %s, action: "%s"',Dr(r),r.func),Ts(r.func,r.args)}else t("Received an unknown message: %O",e)}function Jc(e){return!0===e.data.isPartialResponse}function Kc(){return gc.topWindow!==gc.parentWindow}function Qc(e){return e===gc.topWindow&&Kc()?hc.topMessageQueue:e===gc.parentWindow?hc.parentMessageQueue:[]}function Zc(e){return e===gc.topWindow&&Kc()?gc.topOrigin:e===gc.parentWindow?gc.parentOrigin:null}function Xc(e){return e===gc.topWindow&&Kc()?"top":e===gc.parentWindow?"parent":null}function Yc(e,t){let n;n=gc.currentWindow.setInterval(()=>{0===Qc(e).length&&(clearInterval(n),t())},100)}function eu(e,t,n,r,o){const i=hc.nextMessageId++,a=new $n;hc.legacyMessageIdsToUuidMap[i]=a;const s=!0===r?o:Jn.teamsJsInstanceId;return{id:i,uuid:a,func:t,timestamp:Date.now(),monotonicTimestamp:Wn(),args:n||[],apiVersionTag:e,isProxiedFromChild:null!=r&&r,teamsJsInstanceId:s}}function tu(e,t){const n=hc.nextMessageId++,r=new $n;return hc.legacyMessageIdsToUuidMap[n]=r,{id:n,uuid:r,func:"nestedAppAuth.execute",timestamp:Date.now(),monotonicTimestamp:Wn(),apiVersionTag:t,args:[],data:e}}const nu="v1";function ru(e){if(!co(e)&&Jr(cr),!co(e)&&!ou())throw hn;e?Os(er(nu,"log.request"),"log.request",()=>{const t=e();Rc(er(nu,"log.receive"),"log.receive",[t])}):Rs("log.request")}function ou(){return!(!Jr(cr)||!cr.supports.logs)}var iu,au,su;!function(e){e.fileDownloadStart="fileDownloadStart",e.fileDownloadComplete="fileDownloadComplete"}(iu||(iu={})),function(e){e.view="view",e.edit="edit",e.editNew="editNew"}(au||(au={})),function(e){e.fileOpenPreference="fileOpenPreference",e.theme="theme"}(su||(su={}));const cu="v1";function uu(e,t){Jr(cr),Rc(er(cu,"uploadCustomApp"),"uploadCustomApp",[e],t||yn())}function lu(e,t,n){Jr(cr),Rc(er(cu,"sendCustomMessage"),e,t,n)}function du(e,t){if(Jr(cr),!Ks())throw new Error("The child window has not yet been initialized or is not present");nc(e,t)}function fu(e,t){Jr(cr),Os(er(cu,"registerCustomHandler"),e,(...e)=>t.apply(this,e))}function pu(e,t){Jr(cr),Os(er(cu,"registerUserSettingsChangeHandler"),"userSettingsChange",t,!0,[e])}function gu(e){Jr(cr,un.content,un.sidePanel,un.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];Rc(er(cu,"openFilePreview"),"openFilePreview",t)}const hu="v1";function mu(e){return new Promise(t=>{if(Jr(cr,un.content),!Cu())throw hn;const n=Cc(er(hu,"conversations.openConversation"),"conversations.openConversation",{title:e.title,subEntityId:e.subEntityId,conversationId:e.conversationId,channelId:e.channelId,entityId:e.entityId});e.onStartConversation&&Os(er(hu,"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&&Os(er(hu,"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 vu(){if(Jr(cr,un.content),!Cu())throw hn;Rc(er(hu,"conversations.closeConversation"),"conversations.closeConversation"),Rs("startConversation"),Rs("closeConversation")}function wu(){return new Promise(e=>{if(Jr(cr),!Cu())throw hn;e(wc(er(hu,"conversations.getChatMember"),"getChatMembers"))})}function Cu(){return!(!Jr(cr)||!cr.supports.conversations)}var yu=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 Su="v2",bu=Yn("copilot");function Au(){var e;return Jr(cr)&&!!(null===(e=cr.supports.copilot)||void 0===e?void 0:e.customTelemetry)}function Eu(e,t){var n;return void 0===t&&(t=null!==(n=Wn())&&void 0!==n?n:Date.now()),yu(this,void 0,void 0,function*(){return Jr(cr),bu("Sending custom telemetry data to host for stage: %s to record timestamp: %s",e,t),Ic("copilot.customTelemetry.sendCustomTelemetryData",[e.toString(),t],er(Su,"copilot.customTelemetry.sendCustomTelemetryData"))})}var Iu=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};const Pu="v2",Tu=Yn("copilot");function Ou(){var e,t;return Jr(cr)&&(!!(null===(e=cr.hostVersionsInfo)||void 0===e?void 0:e.appEligibilityInformation)||!!(null===(t=cr.supports.copilot)||void 0===t?void 0:t.eligibility))}function Ru(e){var t,n,r;return Iu(this,void 0,void 0,function*(){if(Jr(cr),!Ou())throw new Error(`Error code: ${hn.errorCode}, message: Not supported on platform`);if((null===(t=cr.hostVersionsInfo)||void 0===t?void 0:t.appEligibilityInformation)&&!e)return Tu("Eligibility information is already available on runtime."),cr.hostVersionsInfo.appEligibilityInformation;Tu("Eligibility information is not available on runtime. Requesting from host.");const o=yield wc(er(Pu,"copilot.eligibility.getEligibilityInfo"),"copilot.eligibility.getEligibilityInfo",e);if(qe(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(!Fu(o))throw new Error("Error deserializing eligibility information");return"nonadult"===(null===(r=o.ageGroup)||void 0===r?void 0:r.toLowerCase())&&(o.ageGroup=Be.NotAdult),o})}function Fu(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 ku,Mu,xu,Nu,Uu,Du,Lu,Hu,_u;!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"}(ku||(ku={})),function(e){e.IMAGE="image",e.AUDIO="audio",e.VIDEO="video"}(Mu||(Mu={})),function(e){e.Private="Private",e.Shared="Shared",e.Recap="Recap",e.RecapCall="RecapCall",e.PrivateViewCall="PrivateViewCall",e.Chat="Chat",e.Compose="Compose"}(xu||(xu={})),function(e){e.ClientDeviceType="ClientDeviceType",e.ClientRing="ClientRing",e.ClientScenarioName="ClientScenarioName"}(Nu||(Nu={})),function(e){e.Enabled="enabled",e.Disabled="disabled",e.EnabledWithTranscript="enabledWithTranscript"}(Uu||(Uu={})),function(e){e.NotStarted="notStarted",e.Active="active",e.Inactive="inactive",e.UnknownFutureValue="unknownFutureValue"}(Du||(Du={})),function(e){e.Chat="Chat",e.Channel="Channel",e.Meeting="Meeting",e.MeetingChat="MeetingChat"}(Lu||(Lu={})),function(e){e.Accepted="accepted",e.NotAccepted="not_accepted"}(Hu||(Hu={})),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"}(_u||(_u={}));class Vu extends Error{constructor(e,t){super(t),this.errorCode=e,this.name="SidePanelError"}}var Bu=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 ju="v2";function Wu(){var e;return Jr(cr)&&!!(null===(e=cr.supports.copilot)||void 0===e?void 0:e.sidePanel)}function zu(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(_u).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)||qe(e)}function qu(e){return Bu(this,void 0,void 0,function*(){Jr(cr);return Ec("copilot.sidePanel.getContent",e?[new Zu(e)]:[],new Ku,er(ju,"copilot.sidePanel.getContent"),zu)})}function $u(e){return Bu(this,void 0,void 0,function*(){Jr(cr);return Ec("copilot.sidePanel.preCheckUserConsent",e?[new Xu(e)]:[],new Qu,er(ju,"copilot.sidePanel.preCheckUserConsent"),zu)})}function Gu(e){ks(er(ju,"copilot.sidePanel.registerUserActionContentSelect"),"copilot.sidePanel.userActionContentSelect",e,[un.content],()=>{if(!Wu())throw Ju})}const Ju=new Vu(_u.NotSupportedOnPlatform,"This API is not supported on the current platform.");class Ku extends Zi{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class Qu extends Zi{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class Zu{constructor(e){this.contentRequest=e}serialize(){return this.contentRequest}}class Xu{constructor(e){this.userConsentRequest=e}serialize(){return this.userConsentRequest}}var Yu=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 el="v2";function tl(){var e;return Jr(cr)&&!!(null===(e=cr.supports.copilot)||void 0===e?void 0:e.view)}function nl(){return Yu(this,void 0,void 0,function*(){Jr(cr),yield Ec("copilot.view.closeSidePanel",[],new rl,er(el,"copilot.view.closeSidePanel"))})}class rl extends Zi{validate(e){return!0}deserialize(e){return e}}const ol="v2";class il{constructor(e){this.invokeRequest=e}serialize(){return this.invokeRequest}}function al(e){const t=e;return t.responseType===ul.ActionExecuteInvokeResponse&&void 0!==t.value&&void 0!==t.statusCode&&void 0!==t.type}const sl="Action.Execute";var cl,ul,ll,dl;!function(e){e.ActionExecuteInvokeRequest="ActionExecuteInvokeRequest",e.QueryMessageExtensionRequest="QueryMessageExtensionRequest"}(cl||(cl={})),function(e){e.ActionExecuteInvokeResponse="ActionExecuteInvokeResponse",e.QueryMessageExtensionResponse="QueryMessageExtensionResponse"}(ul||(ul={}));class fl extends Zi{validate(e){return al(e)}deserialize(e){return e}}function pl(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(ll).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)}function gl(e){e.requestType===cl.ActionExecuteInvokeRequest?hl(e):e.requestType===cl.QueryMessageExtensionRequest&&ml(e)}function hl(e){if(e.type!==sl){throw{errorCode:ll.INTERNAL_ERROR,message:`Invalid action type ${e.type}. Action type must be "${sl}"`}}if(!zn(e.data)){throw{errorCode:ll.INTERNAL_ERROR,message:`Invalid data type ${typeof e.data}. Data must be a primitive or a plain object.`}}}function ml(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 vl(e,t,n){if(Jr(cr,un.content),!Tl())throw hn;const r=new so(e);return gl(n),bc(er(ol,"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 wl(e,t){if(Jr(cr,un.content),!Tl())throw hn;const n=new so(e);return bc(er(ol,"externalAppAuthentication.authenticateWithSSO"),"externalAppAuthentication.authenticateWithSSO",[n.toString(),t.claims,t.silent]).then(([e,t])=>{if(!e)throw t})}function Cl(e,t,n){if(Jr(cr,un.content),!Tl())throw hn;const r=new so(e);return gl(n),bc(er(ol,"externalAppAuthentication.authenticateWithSSOAndResendRequest"),"externalAppAuthentication.authenticateWithSSOAndResendRequest",[r.toString(),n,t.claims,t.silent]).then(([e,t])=>{if(e&&null!=t.responseType)return t;throw t})}function yl(e,t,n){if(Jr(cr,un.content),!Tl())throw hn;return Un(e,new Error("titleId is Invalid.")),Un(t,new Error("oauthConfigId is Invalid.")),bc(er(ol,"externalAppAuthentication.authenticateWithOauth2"),"externalAppAuthentication.authenticateWithOauth2",[e,t,n.width,n.height,n.isExternal]).then(([e,t])=>{if(!e)throw t})}function Sl(e,t,n){if(Jr(cr,un.content),!Tl())throw hn;return Un(e,new Error("titleId is Invalid.")),t&&Dn(t),bc(er(ol,"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"}(ll||(ll={}));class bl{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 Al(e){if(Jr(cr,un.content),!Tl())throw hn;return Un(e.connectorId,new Error("connectorId is Invalid.")),Un(e.oAuthConfigId,new Error("oauthConfigId is Invalid.")),Ic("externalAppAuthentication.authenticateWithConnector",[new bl(e)],er(ol,"externalAppAuthentication.authenticateWithConnector"),pl)}!function(e){e.Invalid="Invalid",e.Valid="Valid",e.Expired="Expired"}(dl||(dl={}));class El extends Zi{validate(e){return"string"==typeof e&&e in dl}deserialize(e){return e}}function Il(e){if(Jr(cr,un.content),!Tl())throw hn;return Un(e.connectorId,new Error("connectorId is Invalid.")),Un(e.oAuthConfigId,new Error("oAuthConfigId is Invalid.")),Ec("externalAppAuthentication.getUserAuthenticationStateForConnector",[new bl(e)],new El,er(ol,"externalAppAuthentication.getUserAuthenticationStateForConnector"),pl)}function Pl(e){if(Jr(cr,un.content),!Tl())throw hn;return Un(e.connectorId,new Error("connectorId is Invalid.")),Un(e.oAuthConfigId,new Error("oauthConfigId is Invalid.")),Ic("externalAppAuthentication.disconnectConnector",[new bl(e)],er(ol,"externalAppAuthentication.disconnectConnector"),pl)}function Tl(){return!(!Jr(cr)||!cr.supports.externalAppAuthentication)}var Ol=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 Rl="v2";function Fl(e,t,n){return Ol(this,void 0,void 0,function*(){if(Jr(cr,un.content),!Nl())throw hn;return Ul(e,t),Ic("externalAppAuthenticationForCEA.authenticateWithSSO",[e,t,n.authId,n.connectionName,n.claims,n.silent],er(Rl,"externalAppAuthenticationForCEA.authenticateWithSSO"),pl)})}function kl(e,t,n){return Ol(this,void 0,void 0,function*(){if(Jr(cr,un.content),!Nl())throw hn;return Ul(e,t),Ic("externalAppAuthenticationForCEA.authenticateWithOauth",[e,t,n.url.href,n.width,n.height,n.isExternal],er(Rl,"externalAppAuthenticationForCEA.authenticateWithOauth"),pl)})}function Ml(e,t,n,r){return Ol(this,void 0,void 0,function*(){if(Jr(cr,un.content),!Nl())throw hn;return Ul(e,t),hl(r),Ec("externalAppAuthenticationForCEA.authenticateAndResendRequest",[e,t,new il(r),n.url.href,n.width,n.height,n.isExternal],new fl,er(Rl,"externalAppAuthenticationForCEA.authenticateAndResendRequest"),pl)})}function xl(e,t,n,r){return Ol(this,void 0,void 0,function*(){if(Jr(cr,un.content),!Nl())throw hn;return Ul(e,t),hl(r),Ec("externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest",[e,t,new il(r),n.authId,n.connectionName,n.claims,n.silent],new fl,er(Rl,"externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest"),pl)})}function Nl(){return!(!Jr(cr)||!cr.supports.externalAppAuthenticationForCEA)}function Ul(e,t){Un(t,new Error("conversation id is not valid.")),io(e)}const Dl="v2";var Ll,Hl;function _l(e,t){if(Jr(cr,un.content),!Bl())throw hn;const n=new so(e);return bc(er(Dl,"externalAppCardActions.processActionSubmit"),"externalAppCardActions.processActionSubmit",[n.toString(),t]).then(([e,t])=>{if(!e)throw t})}function Vl(e,t,n){if(Jr(cr,un.content),!Bl())throw hn;const r=new so(e);return bc(er(Dl,"externalAppCardActions.processActionOpenUrl"),"externalAppCardActions.processActionOpenUrl",[r.toString(),t.href,n]).then(([e,t])=>{if(e)throw e;return t})}function Bl(){return!(!Jr(cr)||!cr.supports.externalAppCardActions)}!function(e){e.DeepLinkDialog="DeepLinkDialog",e.DeepLinkOther="DeepLinkOther",e.DeepLinkStageView="DeepLinkStageView",e.GenericUrl="GenericUrl"}(Ll||(Ll={})),function(e){e.INTERNAL_ERROR="INTERNAL_ERROR",e.INVALID_LINK="INVALID_LINK",e.NOT_SUPPORTED="NOT_SUPPORTED"}(Hl||(Hl={}));var jl=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};const Wl="v2";function zl(e,t,n){return jl(this,void 0,void 0,function*(){if(Jr(cr,un.content),!$l())throw hn;Ul(e,t);const[r,o]=yield bc(er(Wl,"externalAppCardActionsForCEA.processActionOpenUrl"),"externalAppCardActionsForCEA.processActionOpenUrl",[e.toString(),t,n.href]);if(r)throw r;return o})}function ql(e,t,n){return jl(this,void 0,void 0,function*(){if(Jr(cr,un.content),!$l())throw hn;Ul(e,t);const r=yield wc(er(Wl,"externalAppCardActionsForCEA.processActionSubmit"),"externalAppCardActionsForCEA.processActionSubmit",e.toString(),t,n);if(r)throw r})}function $l(){return!(!Jr(cr)||!cr.supports.externalAppCardActionsForCEA)}var Gl;function Jl(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(Gl).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)}!function(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}(Gl||(Gl={}));var Kl=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 Ql="v2";function Zl(e,t,n){return Kl(this,void 0,void 0,function*(){if(Jr(cr,un.content),!Xl())throw hn;return Yl(e,n),Ic("externalAppCardActionsForDA.processActionOpenUrlDialog",[e,new ed(t),n],er(Ql,"externalAppCardActionsForDA.processActionOpenUrlDialog"),Jl)})}function Xl(){return!(!Jr(cr)||!cr.supports.externalAppCardActionsForDA)}function Yl(e,t){io(e),Gn(t)}class ed{constructor(e){this.info=e}serialize(){const{url:e,title:t,size:n}=this.info;return{url:e.href,title:t,size:n}}}var td=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 nd="v2";function rd(e,t,n){return td(this,void 0,void 0,function*(){if(Jr(cr,un.content),!od())throw hn;const r=new so(e),[o,i]=yield bc(er(nd,"externalAppCommands.processActionCommand"),"externalAppCommands.processActionCommand",[r.toString(),t,n]);if(o)throw o;return i})}function od(){return!(!Jr(cr)||!cr.supports.externalAppCommands)}const id="v1";var ad,sd,cd,ud,ld,dd;function fd(e,t){if(Jr(cr,un.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");Rc(er(id,"files.getCloudStorageFolders"),"files.getCloudStorageFolders",[e],t)}function pd(e,t){if(Jr(cr,un.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");Rc(er(id,"files.addCloudStorageFolder"),"files.addCloudStorageFolder",[e],t)}function gd(e,t,n){if(Jr(cr,un.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");Rc(er(id,"files.deleteCloudStorageFolder"),"files.deleteCloudStorageFolder",[e,t],n)}function hd(e,t,n){if(Jr(cr,un.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");Rc(er(id,"files.getCloudStorageFolderContents"),"files.getCloudStorageFolderContents",[e,t],n)}function md(e,t,n){if(Jr(cr,un.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");Rc(er(id,"files.openCloudStorageFile"),"files.openCloudStorageFile",[e,t,n])}function vd(e=!1,t){if(Jr(cr,un.content),!t)throw new Error("[files.getExternalProviders] Callback cannot be null");Rc(er(id,"files.getExternalProviders"),"files.getExternalProviders",[e],t)}function wd(e,t,n,r,o=!1,i){if(Jr(cr,un.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");Rc(er(id,"files.copyMoveFiles"),"files.copyMoveFiles",[e,t,n,r,o],i)}function Cd(e){if(Jr(cr,un.content),!e)throw new Error("[files.getFileDownloads] Callback cannot be null");Rc(er(id,"files.getFileDownloads"),"files.getFileDownloads",[],e)}function yd(e=void 0,t){if(Jr(cr,un.content),!t)throw new Error("[files.openDownloadFolder] Callback cannot be null");Rc(er(id,"files.openDownloadFolder"),"files.openDownloadFolder",[e],t)}function Sd(e){if(Jr(cr,un.content),!e)throw Fd(Le.INVALID_ARGUMENTS,"[files.addCloudStorageProvider] callback cannot be null");Rc(er(id,"files.addCloudStorageProvider"),"files.addCloudStorageProvider",[],e)}function bd(e,t){if(Jr(cr,un.content),!t)throw Fd(Le.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] callback cannot be null");if(!e||!e.content)throw Fd(Le.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] 3P cloud storage provider request content is missing");Rc(er(id,"files.removeCloudStorageProvider"),"files.removeCloudStorageProvider",[e],t)}function Ad(e,t){if(Jr(cr,un.content),!t)throw Fd(Le.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw Fd(Le.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] 3P cloud storage provider request content is missing");Rc(er(id,"files.addCloudStorageProviderFile"),"files.addCloudStorageProviderFile",[e],t)}function Ed(e,t){if(Jr(cr,un.content),!t)throw Fd(Le.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw Fd(Le.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] 3P cloud storage provider request content is missing");Rc(er(id,"files.renameCloudStorageProviderFile"),"files.renameCloudStorageProviderFile",[e],t)}function Id(e,t){if(Jr(cr,un.content),!t)throw Fd(Le.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw Fd(Le.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] 3P cloud storage provider request content details are missing");Rc(er(id,"files.deleteCloudStorageProviderFile"),"files.deleteCloudStorageProviderFile",[e],t)}function Pd(e,t){if(Jr(cr,un.content),!t)throw Fd(Le.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw Fd(Le.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");Rc(er(id,"files.downloadCloudStorageProviderFile"),"files.downloadCloudStorageProviderFile",[e],t)}function Td(e,t){if(Jr(cr,un.content),!t)throw Fd(Le.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw Fd(Le.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");if(!e.content.destinationFolder)throw Fd(Le.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] Invalid destination folder details");Rc(er(id,"files.uploadCloudStorageProviderFile"),"files.uploadCloudStorageProviderFile",[e],t)}function Od(e){if(Jr(cr),!e)throw new Error("[registerCloudStorageProviderListChangeHandler] Handler cannot be null");Os(er(id,"files.registerCloudStorageProviderListChangeHandler"),"files.cloudStorageProviderListChange",e)}function Rd(e){if(Jr(cr),!e)throw new Error("[registerCloudStorageProviderContentChangeHandler] Handler cannot be null");Os(er(id,"files.registerCloudStorageProviderContentChangeHandler"),"files.cloudStorageProviderContentChange",e)}function Fd(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"}(ad||(ad={})),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"}(sd||(sd={})),function(e){e.ClassMaterials="classMaterials"}(cd||(cd={})),function(e){e.Readonly="readonly"}(ud||(ud={})),function(e){e.Downloaded="Downloaded",e.Downloading="Downloading",e.Failed="Failed"}(ld||(ld={})),function(e){e.Download="DOWNLOAD",e.Upload="UPLOAD",e.Delete="DELETE"}(dd||(dd={}));const kd="v1";function Md(){return new Promise(e=>{if(Jr(cr),!Dd())throw hn;e(Sc(er(kd,"meetingRoom.getPairedMeetingRoomInfo"),"meetingRoom.getPairedMeetingRoomInfo"))})}function xd(e){return new Promise(t=>{if(!e||0==e.length)throw new Error("[meetingRoom.sendCommandToPairedMeetingRoom] Command name cannot be null or empty");if(Jr(cr),!Dd())throw hn;t(Sc(er(kd,"meetingRoom.sendCommandToPairedMeetingRoom"),"meetingRoom.sendCommandToPairedMeetingRoom",e))})}function Nd(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler] Handler cannot be null");if(Jr(cr),!Dd())throw hn;Os(er(kd,"meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler"),"meetingRoom.meetingRoomCapabilitiesUpdate",t=>{Jr(cr),e(t)})}function Ud(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomStatesUpdateHandler] Handler cannot be null");if(Jr(cr),!Dd())throw hn;Os(er(kd,"meetingRoom.registerMeetingRoomStatesUpdateHandler"),"meetingRoom.meetingRoomStatesUpdate",t=>{Jr(cr),e(t)})}function Dd(){return!(!Jr(cr)||!cr.supports.meetingRoom)}function Ld(){return!(!Jr(cr)||!cr.supports.messageChannels)}const Hd="1.0.1",_d={onMessage:function(e,t){if(!e||!e.data||"object"!=typeof e.data||null===e.data)return void Gd("Invalid message format, ignoring. Message: %o",e);if(!zd(e.source,e.origin))return void Gd("Message source/origin not allowed, ignoring.");const{args:n}=e.data,[,r]=null!=n?n:[],o=(()=>{try{return JSON.parse(r)}catch(e){return Jd("Failed to parse response message:",e),null}})();if(!o||"NestedAppAuthResponse"!==o.messageType)return void Gd("Invalid response format, ignoring. Message: %o",e);t(r)}};let Vd=null,Bd=!1;function jd(e,t,n=!1){if(Bd=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.`);Vd=e.origin}catch(e){throw new Error(`Failed to initialize bridge: invalid top origin: ${t}`)}const r=e;if(r.nestedAppAuthBridge)return void Gd("Nested App Auth Bridge is already present");const o=Wd(r);o&&(r.nestedAppAuthBridge=o)}function Wd(e){const t=new WeakMap,{onMessage:n}=_d,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 Gd(`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=qd(t);if(e===e.top||!Vd)return void Jd("Not in an embedded iframe; skipping postMessage.");e.top.postMessage(n,Vd)}}catch(e){return void Jd("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 zd(e,t){if(t===Vd)try{return"https:"===new URL(t).protocol}catch(e){return Jd("Invalid message origin URL:",e),!1}return!1}function qd(e){const t=Date.now();return{id:$d(),uuid:rn(),func:"nestedAppAuth.execute",timestamp:t,apiVersionTag:"v2_nestedAppAuth.execute",monotonicTimestamp:t,args:[],data:e}}function $d(){return"undefined"!=typeof crypto&&crypto.randomUUID?crypto.randomUUID():Math.random().toString(36).substring(2,11)}function Gd(...e){Bd&&console.log(...e)}function Jd(...e){Bd&&console.error(...e)}const Kd="v1";function Qd(e){if(Jr(cr,un.content),!Zd())throw hn;Rc(er(Kd,"notifications.showNotification"),"notifications.showNotification",[e])}function Zd(){return!(!Jr(cr)||!cr.supports.notifications)}const Xd="v2";function Yd(e){if(!nf())throw new Error(Le.NOT_SUPPORTED_ON_PLATFORM.toString());if(co(e))throw new Error(Le.INVALID_ARGUMENTS.toString());Os(er(Xd,"otherApp.install"),"otherApp.install",e)}function ef(){if(!nf())throw new Error(Le.NOT_SUPPORTED_ON_PLATFORM.toString());Rc(er(Xd,"otherApp.unregisterInstall"),"otherApp.unregisterInstall"),Rs("otherApp.install")}function tf(e){if(!nf())throw new Error(Le.NOT_SUPPORTED_ON_PLATFORM.toString());return Ic("otherApp.notifyInstallCompleted",[e.toString()],er(Xd,"otherApp.notifyInstallCompleted"))}function nf(){return!(!Jr(cr)||!cr.supports.otherAppStateChange)}const rf="v1";var of,af,sf;function cf(e){if(!e)throw new Error("[remoteCamera.getCapableParticipants] Callback cannot be null");if(Jr(cr,un.sidePanel),!mf())throw hn;Rc(er(rf,"remoteCamera.getCapableParticipants"),"remoteCamera.getCapableParticipants",e)}function uf(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(cr,un.sidePanel),!mf())throw hn;Rc(er(rf,"remoteCamera.requestControl"),"remoteCamera.requestControl",[e],t)}function lf(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(cr,un.sidePanel),!mf())throw hn;Rc(er(rf,"remoteCamera.sendControlCommand"),"remoteCamera.sendControlCommand",[e],t)}function df(e){if(!e)throw new Error("[remoteCamera.terminateSession] Callback cannot be null");if(Jr(cr,un.sidePanel),!mf())throw hn;Rc(er(rf,"remoteCamera.terminateSession"),"remoteCamera.terminateSession",e)}function ff(e){if(!e)throw new Error("[remoteCamera.registerOnCapableParticipantsChangeHandler] Handler cannot be null");if(Jr(cr,un.sidePanel),!mf())throw hn;Os(er(rf,"remoteCamera.registerOnCapableParticipantsChangeHandler"),"remoteCamera.capableParticipantsChange",e)}function pf(e){if(!e)throw new Error("[remoteCamera.registerOnErrorHandler] Handler cannot be null");if(Jr(cr,un.sidePanel),!mf())throw hn;Os(er(rf,"remoteCamera.registerOnErrorHandler"),"remoteCamera.handlerError",e)}function gf(e){if(!e)throw new Error("[remoteCamera.registerOnDeviceStateChangeHandler] Handler cannot be null");if(Jr(cr,un.sidePanel),!mf())throw hn;Os(er(rf,"remoteCamera.registerOnDeviceStateChangeHandler"),"remoteCamera.deviceStateChange",e)}function hf(e){if(!e)throw new Error("[remoteCamera.registerOnSessionStatusChangeHandler] Handler cannot be null");if(Jr(cr,un.sidePanel),!mf())throw hn;Os(er(rf,"remoteCamera.registerOnSessionStatusChangeHandler"),"remoteCamera.sessionStatusChange",e)}function mf(){return!(!Jr(cr)||!cr.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"}(of||(of={})),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"}(af||(af={})),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"}(sf||(sf={}));const vf="v1";function wf(e,t,n,r){if(Jr(cr,un.content),!Cf())throw hn;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");Rc(er(vf,"appEntity.selectAppEntity"),"appEntity.selectAppEntity",[e,t,n],r)}function Cf(){return!(!Jr(cr)||!cr.supports.appEntity)}const yf="v1";function Sf(e){return new Promise(t=>{if(Jr(cr),!bf())throw hn;if((Jn.hostClientType===sn.android||Jn.hostClientType===sn.teamsRoomsAndroid||Jn.hostClientType===sn.teamsPhones||Jn.hostClientType===sn.teamsDisplays)&&!Kr(Ze)){const e={errorCode:Le.OLD_PLATFORM};throw new Error(JSON.stringify(e))}t(wc(er(yf,"teams.fullTrust.joinedTeams.getUserJoinedTeams"),"getUserJoinedTeams",e))})}function bf(){return!(!Jr(cr)||!cr.supports.teams)&&(!!cr.supports.teams.fullTrust&&!!cr.supports.teams.fullTrust.joinedTeams)}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())})};const Ef="v1";function If(e){return Af(this,void 0,void 0,function*(){if(Jr(cr),!Pf())throw hn;return Ec("getConfigSetting",[e],new Xi,er(Ef,"teams.fullTrust.getConfigSetting"))})}function Pf(){return!(!Jr(cr)||!cr.supports.teams)&&!!cr.supports.teams.fullTrust}const Tf="v1";var Of;function Rf(e,t){if(Jr(cr,un.content),!kf())throw hn;if(!e)throw new Error("[teams.getTeamChannels] groupId cannot be null or empty");if(!t)throw new Error("[teams.getTeamChannels] Callback cannot be null");Rc(er(Tf,"teams.getTeamChannels"),"teams.getTeamChannels",[e],t)}function Ff(e,t){if(Jr(cr),!kf())throw hn;if(!e)throw new Error("[teams.refreshSiteUrl] threadId cannot be null or empty");if(!t)throw new Error("[teams.refreshSiteUrl] Callback cannot be null");Rc(er(Tf,"teams.refreshSiteUrl"),"teams.refreshSiteUrl",[e],t)}function kf(){return!(!Jr(cr)||!cr.supports.teams)}!function(e){e[e.Regular=0]="Regular",e[e.Private=1]="Private",e[e.Shared=2]="Shared"}(Of||(Of={}));class Mf{static setTimeout(e,t){const n=performance.now(),r=bn();return Mf.setTimeoutCallbacks[r]={callback:e,timeoutInMs:t,startedAtInMs:n},r}static clearTimeout(e){delete Mf.setTimeoutCallbacks[e]}static setInterval(e,t){Mf.setTimeout(function n(){e(),Mf.setTimeout(n,t)},t)}static tick(){const e=performance.now(),t=[];for(const n in Mf.setTimeoutCallbacks){const r=Mf.setTimeoutCallbacks[n];e-r.startedAtInMs>=r.timeoutInMs&&t.push(n)}for(const e of t){Mf.setTimeoutCallbacks[e].callback(),delete Mf.setTimeoutCallbacks[e]}}}Mf.setTimeoutCallbacks={};class xf{constructor(e,t){this.reportStatisticsResult=t,this.sampleCount=0,this.distributionBins=new Uint32Array(e)}processStarts(e,t,n,r){Mf.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&&Mf.clearTimeout(this.timeoutId),this.timeoutId=Mf.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(xf.maxSessionTimeoutInMs,2*t.timeoutInMs):xf.initialSessionTimeoutInMs}}xf.initialSessionTimeoutInMs=1e3,xf.maxSessionTimeoutInMs=3e4;const Nf="v2";class Uf{constructor(e){this.reportPerformanceEvent=e,this.isFirstFrameProcessed=!1,this.frameProcessTimeLimit=100,this.frameProcessingStartedAt=0,this.frameProcessingTimeCost=0,this.processedFrameCount=0,this.performanceStatistics=new xf(Uf.distributionBinSize,e=>this.reportPerformanceEvent(er(Nf,"videoPerformanceMonitor.performanceDataGenerated"),"video.performance.performanceDataGenerated",[e]))}startMonitorSlowFrameProcessing(){Mf.setInterval(()=>{if(0===this.processedFrameCount)return;const e=this.frameProcessingTimeCost/this.processedFrameCount;e>this.frameProcessTimeLimit&&this.reportPerformanceEvent(er(Nf,"videoPerformanceMonitor.startMonitorSlowFrameProcessing"),"video.performance.frameProcessingSlow",[e]),this.frameProcessingTimeCost=0,this.processedFrameCount=0},Uf.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){Mf.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(er(Nf,"videoPerformanceMonitor.reportFrameProcessed"),"video.performance.firstFrameProcessed",[Date.now(),this.appliedEffect.effectId,null===(e=this.appliedEffect)||void 0===e?void 0:e.effectParam])))}reportGettingTextureStream(e){this.gettingTextureStreamStartedAt=performance.now(),this.currentStreamId=e}reportTextureStreamAcquired(){if(void 0!==this.gettingTextureStreamStartedAt){const e=performance.now()-this.gettingTextureStreamStartedAt;this.reportPerformanceEvent(er(Nf,"videoPerformanceMonitor.reportTextureStreamAcquired"),"video.performance.textureStreamAcquired",[this.currentStreamId,e])}}}Uf.distributionBinSize=1e3,Uf.calculateFPSInterval=1e3;var Df=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})},Lf=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 Hf="v2",_f=Nn()?void 0:new Uf(Rc);var Vf,Bf,jf;function Wf(e){if(Jr(cr,un.sidePanel),!Jf())throw hn;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(Os(er(Hf,"videoEffects.setFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",e=>null==_f?void 0:_f.setFrameProcessTimeLimit(e.timeLimit),!1),Yf())Kf(e.videoFrameHandler,e.config);else{if(!tp())throw hn;Zf(e.videoBufferHandler,e.config)}null==_f||_f.startMonitorSlowFrameProcessing()}function zf(e,t){if(Jr(cr,un.sidePanel),!Jf())throw hn;Rc(er(Hf,"videoEffects.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t])}function qf(e){if(Jr(cr,un.sidePanel),!Jf())throw hn;Os(er(Hf,"videoEffects.registerEffectParameterChangeHandler"),"video.effectParameterChange",pp(e,_f),!1),Rc(er(Hf,"videoEffects.registerForVideoEffect"),"video.registerForVideoEffect")}function $f(e){Rc(er(Hf,"videoEffects.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function Gf(e){Rc(er(Hf,"videoEffects.notifyError"),"video.notifyError",[e])}function Jf(){return Jr(cr)&&!!cr.supports.video&&(!!cr.supports.video.mediaStream||!!cr.supports.video.sharedFrame)}function Kf(e,t){if(Jr(cr,un.sidePanel),!Jf()||!Yf())throw hn;Os(er(Hf,"videoEffects.startVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",t=>Df(this,void 0,void 0,function*(){const{streamId:n}=t,r=Qf(e,_f);yield op(n,r,Gf,_f)}),!1),Rc(er(Hf,"videoEffects.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[t])}function Qf(e,t){return n=>Df(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 Zf(e,t){if(Jr(cr,un.sidePanel),!Jf()||!tp())throw hn;Os(er(Hf,"videoEffects.registerForVideoBufferHandler"),"video.newVideoFrame",t=>{if(t){const n=t.timestamp;null==_f||_f.reportStartFrameProcessing(t.width,t.height),e(Xf(t),()=>{null==_f||_f.reportFrameProcessed(),$f(n)},Gf)}},!1),Rc(er(Hf,"videoEffects.registerForVideoFrame"),"video.registerForVideoFrame",[t])}function Xf(e){if("videoFrameBuffer"in e)return e;{const{data:t}=e,n=Lf(e,["data"]);return Object.assign(Object.assign({},n),{videoFrameBuffer:t})}}function Yf(){var e;return Jr(cr,un.sidePanel)&&ep()&&!!(null===(e=cr.supports.video)||void 0===e?void 0:e.mediaStream)}function ep(){var e,t,n,r;return!(!(null===(t=null===(e=xn().chrome)||void 0===e?void 0:e.webview)||void 0===t?void 0:t.getTextureStream)||!(null===(r=null===(n=xn().chrome)||void 0===n?void 0:n.webview)||void 0===r?void 0:r.registerTextureStream))}function tp(){var e;return Jr(cr,un.sidePanel)&&!!(null===(e=cr.supports.video)||void 0===e?void 0:e.sharedFrame)}!function(e){e.NV12="NV12"}(Vf||(Vf={})),function(e){e.EffectChanged="EffectChanged",e.EffectDisabled="EffectDisabled"}(Bf||(Bf={})),function(e){e.InvalidEffectId="InvalidEffectId",e.InitializationFailure="InitializationFailure"}(jf||(jf={}));var np=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};const rp="v2";function op(e,t,n,r){var o,i;return np(this,void 0,void 0,function*(){const a=sp();!Nn()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),cp(yield ap(e,n,r),new up(n,t),a.writable)})}function ip(e,t,n,r){var o,i;return np(this,void 0,void 0,function*(){const a=sp();!Nn()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),cp(yield ap(e,n,r),new fp(n,t),a.writable)})}function ap(e,t,n){return np(this,void 0,void 0,function*(){if(Nn())throw hn;const r=xn().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 sp(){if(Nn())throw hn;const e=window.MediaStreamTrackGenerator;if(!e)throw hn;return new e({kind:"video"})}function cp(e,t,n){new(0,xn().MediaStreamTrackProcessor)({track:e}).readable.pipeThrough(new TransformStream(t)).pipeTo(n)}class up{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.transform=(e,t)=>np(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 lp{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 dp{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 fp{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.shouldDiscardAudioInferenceResult=!1,this.transform=(e,t)=>np(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=>np(this,void 0,void 0,function*(){if(Nn())throw hn;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 lp(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 dp(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}}}),Os(er(rp,"videoEffectsUtils.transformerWithMetadata.constructor"),"video.mediaStream.audioInferenceDiscardStatusChange",({discardAudioInferenceResult:e})=>{this.shouldDiscardAudioInferenceResult=e})}}function pp(e,t){return(n,r)=>{null==t||t.reportApplyingVideoEffect(n||"",r),e(n,r).then(()=>{null==t||t.reportVideoEffectChanged(n||"",r),Rc(er(rp,"videoEffectsUtils.reportVideoEffectChanged"),"video.videoEffectReadiness",[!0,n,void 0,r])}).catch(e=>{const t=e in jf?e:jf.InitializationFailure;Rc(er(rp,"videoEffectsUtils.effectFailure"),"video.videoEffectReadiness",[!1,n,t,r])})}}var gp=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};const hp="v2",mp=2e3,vp=Nn()?void 0:new Uf(Rc);var wp;function Cp(e){var t,n;if(!Pp())throw hn;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(Jr(cr,un.sidePanel)){if(Os(er(hp,"videoEffectsEX.registerSetFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",e=>null==vp?void 0:vp.setFrameProcessTimeLimit(e),!1),null===(t=cr.supports.video)||void 0===t?void 0:t.mediaStream)Os(er(hp,"videoEffectsEX.registerStartVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",t=>gp(this,void 0,void 0,function*(){const{streamId:n,metadataInTexture:r}=t,o=vp?Sp(e.videoFrameHandler,vp):e.videoFrameHandler;r?yield ip(n,o,Op,vp):yield op(n,o,Op,vp)}),!1),Rc(er(hp,"videoEffectsEX.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[e.config]);else{if(!(null===(n=cr.supports.video)||void 0===n?void 0:n.sharedFrame))throw hn;Os(er(hp,"videoEffectsEx.registerNewVideoFrameHandler"),"video.newVideoFrame",t=>{if(t){null==vp||vp.reportStartFrameProcessing(t.width,t.height);const n=yp(),r=t.timestamp;e.videoBufferHandler(bp(t),()=>{n(),null==vp||vp.reportFrameProcessed(),Tp(r)},Op)}},!1),Rc(er(hp,"videoEffectsEx.registerForVideoFrame"),"video.registerForVideoFrame",[e.config])}null==vp||vp.startMonitorSlowFrameProcessing()}}function yp(){const e=setTimeout(()=>{Op(`Frame not processed in ${mp}ms`,wp.Warn)},mp);return function(){clearTimeout(e)}}function Sp(e,t){return n=>gp(this,void 0,void 0,function*(){const r=n.videoFrame;t.reportStartFrameProcessing(r.codedWidth,r.codedHeight);const o=yp(),i=yield e(n);return o(),t.reportFrameProcessed(),i})}function bp(e){return e.videoFrameBuffer=e.videoFrameBuffer||e.data,delete e.data,e}function Ap(e,t,n){if(Jr(cr,un.sidePanel),!Pp())throw hn;Rc(er(hp,"videoEffectsEx.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t,n])}function Ep(e){if(Jr(cr,un.sidePanel),!Pp())throw hn;Os(er(hp,"videoEffectsEx.registerEffectParamterChangeHandler"),"video.effectParameterChange",pp(e,vp),!1),Rc(er(hp,"videoEffectsEx.registerForVideoEffect"),"video.registerForVideoEffect")}function Ip(e){if(Jr(cr,un.sidePanel),!Jf())throw hn;Rc(er(hp,"videoEffectsEx.updatePersonalizedEffects"),"video.personalizedEffectsChanged",[e])}function Pp(){return Jr(cr),Jf()}function Tp(e){Rc(er(hp,"videoEffectsEx.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function Op(e,t=wp.Warn){Rc(er(hp,"videoEffectsEx.notifyError"),"video.notifyError",[e,t])}function Rp(e){if(Jr(cr),!Jf())throw hn;Op(e,wp.Fatal)}!function(e){e.Fatal="fatal",e.Warn="warn"}(wp||(wp={}));const Fp="v2";class kp extends Zi{validate(e){return"ConfigurableTab"===e.tabType}deserialize(e){return e}}class Mp{constructor(e){this.configurableTabInstance=e}serialize(){return this.configurableTabInstance}}class xp{constructor(e){this.hostEntityId=e}serialize(){return this.hostEntityId}}class Np extends Zi{validate(e){return"ConfigurableTab"===e.tabType||"StaticTab"===e.tabType}deserialize(e){return e}}class Up{constructor(e){this.hostEntityTabInstance=e}serialize(){return this.hostEntityTabInstance}}class Dp extends Zi{validate(e){const t=new Np;let n=!0;return e.allTabs&&e.allTabs.forEach(e=>{n||(n=t.validate(e))}),n}deserialize(e){return e}}function Lp(e,t){if(Jr(cr),!jp())throw new Error(`Error code: ${Le.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);if(Wp(e.threadId),t&&0===t.length)throw new Error(`Error code: ${Le.INVALID_ARGUMENTS}, message: App types cannot be an empty array`);return Ec("hostEntity.tab.addAndConfigure",[new xp(e),t],new Np,er(Fp,"hostEntity.tab.addAndConfigure"))}function Hp(e){if(Jr(cr),!jp())throw new Error(`Error code: ${Le.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return Wp(e.threadId),Ec("hostEntity.tab.getAll",[new xp(e)],new Dp,er(Fp,"hostEntity.tab.getAll"))}function _p(e,t){if(Jr(cr),!jp())throw new Error(`Error code: ${Le.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return zp(e),Wp(t.threadId),Ec("hostEntity.tab.reconfigure",[new Mp(e),new xp(t)],new kp,er(Fp,"hostEntity.tab.reconfigure"))}function Vp(e,t){if(Jr(cr),!jp())throw new Error(`Error code: ${Le.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return zp(e),Wp(t.threadId),Ec("hostEntity.tab.rename",[new Mp(e),new xp(t)],new kp,er(Fp,"hostEntity.tab.rename"))}function Bp(e,t){if(Jr(cr),!jp())throw new Error(`Error code: ${Le.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return Wp(t.threadId),zp(e),Ec("hostEntity.tab.remove",[new Up(e),new xp(t)],new Xi,er(Fp,"hostEntity.tab.remove"))}function jp(){var e;return!!(Jr(cr)&&$p()&&(null===(e=cr.supports.hostEntity)||void 0===e?void 0:e.tab))}function Wp(e){if(!e||0==e.length)throw new Error(`Error code: ${Le.INVALID_ARGUMENTS}, message: ThreadId cannot be null or empty`)}function zp(e){if(!(null==e?void 0:e.internalTabInstanceId)||0===e.internalTabInstanceId.length)throw new Error(`Error code: ${Le.INVALID_ARGUMENTS}, message: TabId cannot be null or empty`)}var qp;function $p(){return!(!Jr(cr)||!cr.supports.hostEntity)}!function(e){e.edu="EDU",e.baseTownhall="BASE_TOWNHALL",e.streamingTownhall="STREAMING_TOWNHALL"}(qp||(qp={}));var Gp=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};const Jp="v2",Kp="Invalid store dialog size",Qp="No App Id present, but AppId needed to open AppDetail store",Zp="No Collection Id present, but CollectionId needed to open a store specific to a collection";function Xp(e){return Gp(this,void 0,void 0,function*(){rg();const{size:t}=null!=e?e:{};return Ic("store.openFullStore",[og(t)],er(Jp,"store.openFullStore"))})}function Yp(e){return Gp(this,void 0,void 0,function*(){rg();const{size:t,appId:n}=e;if(!(n instanceof so))throw new Error(Qp);return Ic("store.openAppDetail",[og(t),n],er(Jp,"store.openAppDetail"))})}function eg(e){return Gp(this,void 0,void 0,function*(){rg();const{size:t,appCapability:n,appMetaCapabilities:r,installationScope:o,filteredOutAppIds:i}=null!=e?e:{};return Ic("store.openInContextStore",[og(t),n,r,o,null==i?void 0:i.map(e=>e.toString())],er(Jp,"store.openInContextStore"))})}function tg(e){return Gp(this,void 0,void 0,function*(){rg();const{size:t,collectionId:n}=e;if(void 0===n)throw new Error(Zp);return Ic("store.openSpecificStore",[og(t),n],er(Jp,"store.openSpecificStore"))})}function ng(){return Jr(cr)&&!!cr.supports.store}function rg(){if(Jr(cr,un.content,un.sidePanel,un.meetingStage),!ng())throw hn}function og(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 ig=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 ag="v1",sg=Yn("widgetHosting");function cg(){return Jr(cr)&&!!cr.supports.widgetHosting}function ug(e,t){return ig(this,void 0,void 0,function*(){return Gr(),sg("Calling tool with widgetId and input: ",{widgetId:e,input:t}),Ec("widgetHosting.callTool",[new yg(e,t)],new wg,er(ag,"widgetHosting.callTool"),qe)})}function lg(e,t){return ig(this,void 0,void 0,function*(){return Gr(),sg("Sending follow-up message with widgetId and prompt: ",{widgetId:e,prompt:t.prompt}),Ic("widgetHosting.sendFollowUpMessage",[new Sg(e,t)],er(ag,"widgetHosting.sendFollowUpMessage"))})}function dg(e,t){return ig(this,void 0,void 0,function*(){return Gr(),sg("Requesting display mode with widgetId: ",{widgetId:e,mode:t.mode}),Ic("widgetHosting.requestDisplayMode",[new bg(e,t)],er(ag,"widgetHosting.requestDisplayMode"))})}function fg(e,t){return ig(this,void 0,void 0,function*(){return Gr(),sg("Requesting modal with widgetId and options: ",{widgetId:e,options:t}),Ec("widgetHosting.requestModal",[new Pg(e,t)],new Cg,er(ag,"widgetHosting.requestModal"),qe)})}function pg(e,t){Gr(),sg("Notifying intrinsic height with widgetId: ",{widgetId:e,height:t}),Ic("widgetHosting.notifyIntrinsicHeight",[new Ig(e,t)],er(ag,"widgetHosting.notifyIntrinsicHeight"))}function gg(e,t,n){Gr(),sg("Content size changed with widgetId: ",{widgetId:e,width:t,height:n}),Ic("widgetHosting.contentSizeChanged",[new Tg(e,t,n)],er(ag,"widgetHosting.contentSizeChanged"))}function hg(e,t){return ig(this,void 0,void 0,function*(){return Gr(),sg("Setting widget state with widgetId: ",{widgetId:e,state:t}),Ic("widgetHosting.setWidgetState",[new Eg(e,t)],er(ag,"widgetHosting.setWidgetState"))})}function mg(e,t){Gr(),sg("Opening external URL with widgetId: ",{widgetId:e,href:t.href}),Ic("widgetHosting.openExternal",[new Ag(e,t)],er(ag,"widgetHosting.openExternal"))}function vg(e){ks(er(ag,"widgetHosting.registerModalCloseHandler"),"widgetHosting.closeWidgetModal",e,[],()=>{if(!cg())throw new Error("Widget Hosting is not supported on this platform")})}class wg extends Zi{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class Cg extends Zi{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class yg{constructor(e,t){this.widgetId=e,this.toolInput=t}serialize(){return{widgetId:this.widgetId,name:this.toolInput.name,arguments:this.toolInput.arguments}}}class Sg{constructor(e,t){this.widgetId=e,this.args=t}serialize(){return{widgetId:this.widgetId,prompt:this.args.prompt}}}class bg{constructor(e,t){this.widgetId=e,this.args=t}serialize(){return{widgetId:this.widgetId,mode:this.args.mode}}}class Ag{constructor(e,t){this.widgetId=e,this.payload=t}serialize(){return{widgetId:this.widgetId,href:this.payload.href}}}class Eg{constructor(e,t){this.widgetId=e,this.state=t}serialize(){return{widgetId:this.widgetId,state:this.state}}}class Ig{constructor(e,t){this.widgetId=e,this.height=t}serialize(){return{widgetId:this.widgetId,height:this.height}}}class Pg{constructor(e,t){this.widgetId=e,this.options=t}serialize(){return{widgetId:this.widgetId,id:this.options.id,title:this.options.title,content:this.options.content,width:this.options.width,height:this.options.height}}}class Tg{constructor(e,t,n){this.widgetId=e,this.width=t,this.height=n}serialize(){return{widgetId:this.widgetId,width:this.width,height:this.height}}}var Og=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 Rg="v1",Fg="v2";let kg;function Mg(e){kg=e}function xg(e){const t=void 0!==e,n=t?e:kg;if(!n)throw new Error("No parameters are provided for authentication");Jr(cr,un.content,un.sidePanel,un.settings,un.remove,un.task,un.stage,un.meetingStage);return Ng(n.successCallback||n.failureCallback?er(Rg,"authentication.authenticate"):er(Fg,"authentication.authenticate"),n).then(e=>{try{return n&&n.successCallback?(n.successCallback(e),""):e}finally{t||(kg=void 0)}}).catch(e=>{try{if(n&&n.failureCallback)return n.failureCallback(e.message),"";throw e}finally{t||(kg=void 0)}})}function Ng(e,t){return Og(this,void 0,void 0,function*(){const n=Ln(t.url);return Dn(n),bc(e,"authentication.authenticate",[n.href,t.width,t.height,t.isExternal]).then(([e,t])=>{if(e)return t;throw new Error(t)})})}function Ug(e){Gr();return Dg(e&&(e.successCallback||e.failureCallback)?er(Rg,"authentication.getAuthToken"):er(Fg,"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 Dg(e,t){return new Promise(n=>{n(bc(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 Lg(e){Gr();return Hg(e&&(e.successCallback||e.failureCallback)?er(Rg,"authentication.getUser"):er(Fg,"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 Hg(e){return new Promise(t=>{t(bc(e,"authentication.getUser"))}).then(([e,t])=>{if(e)return t;throw t})}function _g(e,t){Jr(cr,un.authentication);Rc(er(t?Rg:Fg,"authentication.notifySuccess"),"authentication.authenticate.success",[e]),Yc(gc.parentWindow,()=>setTimeout(()=>gc.currentWindow.close(),200))}function Vg(e,t){Jr(cr,un.authentication);Rc(er(t?Rg:Fg,"authentication.notifyFailure"),"authentication.authenticate.failure",[e]),Yc(gc.parentWindow,()=>setTimeout(()=>gc.currentWindow.close(),200))}var Bg;function jg(){return Jr(cr)&&!!cr.supports.appPerformanceMetrics}function Wg(e){Jr(cr),Os(er("v2","appPerformanceMetrics.memoryUsageHeartbeat"),"appPerformanceMetrics.memoryUsageHeartbeat",e)}function zg(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"}(Bg||(Bg={}));class qg{constructor(e){this.val=e,zg(e)}toString(){return this.val}}const $g="/l/app/",Gg="/l/meeting/new",Jg="attendees",Kg="startTime",Qg="endTime",Zg="subject",Xg="content",Yg="/l/call/0/0",eh="source",th="withVideo",nh="/l/chat/0/0",rh="users",oh="topicName",ih="message";function ah(e,t,n){if(0===e.length)throw new Error("Must have at least one user when creating a chat deep link");const r=`${rh}=`+e.map(e=>encodeURIComponent(e)).join(","),o=void 0===t?"":`&${oh}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${ih}=${encodeURIComponent(n)}`;return`${at}://${st}${nh}?${r}${o}${i}`}function sh(e,t,n){if(0===e.length)throw new Error("Must have at least one target when creating a call deep link");const r=`${rh}=`+e.map(e=>encodeURIComponent(e)).join(","),o=void 0===t?"":`&${th}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${eh}=${encodeURIComponent(n)}`;return`${at}://${st}${Yg}?${r}${o}${i}`}function ch(e,t,n,r,o){const i=void 0===e?"":`${Jg}=`+e.map(e=>encodeURIComponent(e)).join(","),a=void 0===t?"":`&${Kg}=${encodeURIComponent(t)}`,s=void 0===n?"":`&${Qg}=${encodeURIComponent(n)}`,c=void 0===r?"":`&${Zg}=${encodeURIComponent(r)}`,u=void 0===o?"":`&${Xg}=${encodeURIComponent(o)}`;return`${at}://${st}${Gg}?${i}${a}${s}${c}${u}`}function uh(e){if(!e)throw new Error("App ID must be set when creating an app install dialog deep link");return`${at}://${st}${$g}${encodeURIComponent(e)}`}const lh="v1";function dh(e){return new Promise(t=>{if(Jr(cr,un.content,un.sidePanel,un.settings,un.task,un.stage,un.meetingStage),!fh())throw new Error("Not supported");const n=er(lh,"appInstallDialog.openAppInstallDialog");cr.isLegacyTeams?t(Cc(n,"executeDeepLink",uh(e.appId))):(Rc(n,"appInstallDialog.openAppInstallDialog",[e]),t())})}function fh(){return!(!Jr(cr)||!cr.supports.appInstallDialog)}const ph="v1",gh=Yn("media");var hh,mh,vh,wh,Ch,yh,Sh;!function(e){e.Base64="base64",e.ID="id"}(hh||(hh={}));class bh{}function Ah(e){if(!e)throw new Error("[captureImage] Callback cannot be null");if(Jr(cr,un.content,un.task),!Jn.isFramelessWindow){return void e({errorCode:Le.NOT_SUPPORTED_ON_PLATFORM},[])}if(!Kr(et)){return void e({errorCode:Le.OLD_PLATFORM},[])}Rc(er(ph,"media.captureImage"),"captureImage",e)}function Eh(){if(Jr(cr,un.content,un.task),!Ph())throw hn;const e=He.Media;return new Promise(t=>{t(Sc(er(ph,"media.hasPermission"),"permissions.has",e))})}function Ih(){if(Jr(cr,un.content,un.task),!Ph())throw hn;const e=He.Media;return new Promise(t=>{t(Sc(er(ph,"media.requestPermission"),"permissions.request",e))})}function Ph(){return!(!Jr(cr)||!cr.supports.permissions)}class Th extends bh{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(cr,un.content,un.task),!Kr(tt)){return void e({errorCode:Le.OLD_PLATFORM},new Blob)}if(!Bh(this.mimeType,this.format,this.content)){return void e({errorCode:Le.INVALID_ARGUMENTS},new Blob)}Kr("2.0.0")?this.getMediaViaCallback(e):this.getMediaViaHandler(e)}getMediaViaCallback(e){const t={mediaMimeType:this.mimeType,assembleAttachment:[]},n=[this.content];Rc(er(ph,"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=xh(t.assembleAttachment,t.mediaMimeType);e(n.error,null!=r?r:new Blob)}else{const e=Nh(n.mediaChunk,t.mediaMimeType);e?t.assembleAttachment.push(e):gh(`Received a null assemble attachment for when decoding chunk sequence ${n.mediaChunk.chunkSequence}; not including the chunk in the assembled file.`)}else e({errorCode:Le.INTERNAL_ERROR,message:"data received is null"},new Blob)})}getMediaViaHandler(e){const t=bn(),n={mediaMimeType:this.mimeType,assembleAttachment:[]},r=[t,this.content];this.content&&!co(e)&&Rc(er(ph,"media.getMedia"),"getMedia",r),Os(er(ph,"media.registerGetMediaRequestHandler"),"getMedia"+t,function(r){if(e){const o=JSON.parse(r);if(o.error)e(o.error,new Blob),Rs("getMedia"+t);else if(o.mediaChunk)if(o.mediaChunk.chunkSequence<=0){const r=xh(n.assembleAttachment,n.mediaMimeType);e(o.error,null!=r?r:new Blob),Rs("getMedia"+t)}else{const e=Nh(o.mediaChunk,n.mediaMimeType);e&&n.assembleAttachment.push(e)}else e({errorCode:Le.INTERNAL_ERROR,message:"data received is null"},new Blob),Rs("getMedia"+t)}})}}class Oh{constructor(e){this.controllerCallback=e}notifyEventToHost(e,t){Jr(cr,un.content,un.task);try{Zr(Ke)}catch(e){return void(t&&t(e))}const n={mediaType:this.getMediaType(),mediaControllerEvent:e};Rc(er(ph,"media.controller"),"media.controller",[n],e=>{t&&t(e)})}stop(e){this.notifyEventToHost(mh.StopRecording,e)}}class Rh extends Oh{getMediaType(){return Ch.Video}notifyEventToApp(e){if(this.controllerCallback)switch(e){case mh.StartRecording:if(this.controllerCallback.onRecordingStarted){this.controllerCallback.onRecordingStarted();break}}}}function Fh(e,t){if(!t)throw new Error("[select Media] Callback cannot be null");if(Jr(cr,un.content,un.task),!Kr(tt)){const e={errorCode:Le.OLD_PLATFORM};return void t(e,[])}try{Uh(e)}catch(e){return void t(e,[])}if(!Lh(e)){const e={errorCode:Le.INVALID_ARGUMENTS};return void t(e,[])}const n=[e];Rc(er(ph,"media.selectMedia"),"selectMedia",n,(n,r,o)=>{var i,a;if(o)return void(Dh(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 Th(e));t(n,s)})}function kh(e,t){if(!t)throw new Error("[view images] Callback cannot be null");if(Jr(cr,un.content,un.task),!Kr(tt)){return void t({errorCode:Le.OLD_PLATFORM})}if(!jh(e)){return void t({errorCode:Le.INVALID_ARGUMENTS})}const n=[e];Rc(er(ph,"media.viewImages"),"viewImages",n,t)}function Mh(e,t){if(!e)throw new Error("[media.scanBarCode] Callback cannot be null");if(Jr(cr,un.content,un.task),Jn.hostClientType===sn.desktop||Jn.hostClientType===sn.web||Jn.hostClientType===sn.rigel||Jn.hostClientType===sn.teamsRoomsWindows||Jn.hostClientType===sn.teamsRoomsAndroid||Jn.hostClientType===sn.teamsPhones||Jn.hostClientType===sn.teamsDisplays){return void e({errorCode:Le.NOT_SUPPORTED_ON_PLATFORM},"")}if(!Kr(nt)){return void e({errorCode:Le.OLD_PLATFORM},"")}if(!Wh(t)){return void e({errorCode:Le.INVALID_ARGUMENTS},"")}Rc(er(ph,"media.scanBarCode"),"media.scanBarCode",[t],e)}function xh(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 Nh(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 Uh(e){_h(e)?Zr(Je):Vh(e)?Zr(Ke):Hh(e)&&Zr(Qe)}function Dh(e){return!(e.mediaType!=Ch.Video||!e.videoProps||!e.videoProps.videoController)}function Lh(e){return!(null==e||e.maxMediaCount>10)}function Hh(e){var t;return!((null==e?void 0:e.mediaType)!=Ch.Image||!(null===(t=null==e?void 0:e.imageProps)||void 0===t?void 0:t.imageOutputFormats))}function _h(e){return!(!e||e.mediaType!=Ch.VideoAndImage&&!e.videoAndImageProps)}function Vh(e){return!(!e||e.mediaType!=Ch.Video||!e.videoProps||e.videoProps.isFullScreenMode)}function Bh(e,t,n){return null!=e&&null!=t&&t==hh.ID&&null!=n}function jh(e){return!(null==e||e.length<=0||e.length>10)}function Wh(e){return!e||!(null===e.timeOutIntervalInSec||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec<=0||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec>60)}function zh(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"}(mh||(mh={})),function(e){e[e.Photo=1]="Photo",e[e.Document=2]="Document",e[e.Whiteboard=3]="Whiteboard",e[e.BusinessCard=4]="BusinessCard"}(vh||(vh={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(wh||(wh={})),function(e){e[e.Image=1]="Image",e[e.Video=2]="Video",e[e.VideoAndImage=3]="VideoAndImage",e[e.Audio=4]="Audio"}(Ch||(Ch={})),function(e){e[e.ID=1]="ID",e[e.URL=2]="URL"}(yh||(yh={})),function(e){e[e.IMAGE=1]="IMAGE",e[e.PDF=2]="PDF"}(Sh||(Sh={}));const qh="v2";function $h(e){return new Promise(t=>{if(Jr(cr,un.content,un.task),!Kh())throw hn;if(!Wh(e))throw{errorCode:Le.INVALID_ARGUMENTS};t(Sc(er(qh,"barCode.scanBarCode"),"media.scanBarCode",e))})}function Gh(){if(Jr(cr,un.content,un.task),!Kh())throw hn;const e=He.Media;return new Promise(t=>{t(Sc(er(qh,"barCode.hasPermission"),"permissions.has",e))})}function Jh(){if(Jr(cr,un.content,un.task),!Kh())throw hn;const e=He.Media;return new Promise(t=>{t(Sc(er(qh,"barCode.requestPermission"),"permissions.request",e))})}function Kh(){return!!(Jr(cr)&&cr.supports.barCode&&cr.supports.permissions)}const Qh="v2";function Zh(e){return Xh(er(Qh,"chat.openChat"),e)}function Xh(e,t){return new Promise(n=>{if(Jr(cr,un.content,un.task),!em())throw hn;if(cr.isLegacyTeams)n(Cc(e,"executeDeepLink",ah([t.user],void 0,t.message)));else{n(Cc(e,"chat.openChat",{members:[t.user],message:t.message}))}})}function Yh(e){const t=er(Qh,"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(Xh(t,r))}else{if(Jr(cr,un.content,un.task),!em())throw hn;if(cr.isLegacyTeams)n(Cc(t,"executeDeepLink",ah(e.users,e.topic,e.message)));else{n(Cc(t,"chat.openChat",{members:e.users,message:e.message,topic:e.topic}))}}})}function em(){return!(!Jr(cr)||!cr.supports.chat)}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="v2";function rm(e){return tm(this,void 0,void 0,function*(){if(Jr(cr,un.content,un.meetingStage,un.task,un.settings,un.stage,un.sidePanel),!im())throw hn;if(!e.type||!Object.values(We).includes(e.type))throw new Error(`Blob type ${e.type} is not supported. Supported blob types are ${Object.values(We)}`);const t=yield Mn(e),n={mimeType:e.type,content:t};return Sc(er(nm,"clipboard.write"),"clipboard.writeToClipboard",n)})}function om(){return tm(this,void 0,void 0,function*(){Jr(cr,un.content,un.meetingStage,un.task,un.settings,un.stage,un.sidePanel);const e=er(nm,"clipboard.read");if(!im())throw hn;const t=yield Sc(e,"clipboard.readFromClipboard");if("string"==typeof t){const e=JSON.parse(t);return kn(e.mimeType,e.content)}return t})}function im(){return Jn.isFramelessWindow?!(!Jr(cr)||!cr.supports.clipboard):!!(Jr(cr)&&navigator&&navigator.clipboard&&cr.supports.clipboard)}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="v2",cm={validate:e=>Array.isArray(e)||"object"==typeof e,deserialize:e=>e};var um;function lm(){var e;return null!==(e=Jr(cr)&&(cr.isNAAChannelRecommended||hm()))&&void 0!==e&&e}function dm(){return Jr(cr),gc.parentOrigin}function fm(){var e;return null!==(e=Jr(cr)&&cr.canParentManageNAATrustedOrigins)&&void 0!==e&&e}function pm(){var e;return null!==(e=Jr(cr)&&(cr.isDeeplyNestedAuthSupported||gm()))&&void 0!==e&&e}function gm(){return!!(Jr(cr)&&mm()&&cr.isLegacyTeams&&Kr(hr))}function hm(){return!!(Jr(cr)&&mm()&&cr.isLegacyTeams&&cr.supports.nestedAppAuth)}function mm(){return Jn.hostClientType===sn.android||Jn.hostClientType===sn.ios||Jn.hostClientType===sn.ipados||Jn.hostClientType===sn.visionOS}function vm(e){return am(this,void 0,void 0,function*(){if(!fm())throw hn;const t=e.map(ym);return Cm(um.ADD,t)})}function wm(e){return am(this,void 0,void 0,function*(){if(!fm())throw hn;const t=e.map(ym);return Cm(um.DELETE,t)})}function Cm(e,t){return am(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 Ec("nestedAppAuth.manageNAATrustedOrigins",[new Sm(e,t)],cm,er(sm,"nestedAppAuth.manageNAATrustedOrigins"))})}function ym(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"}(um||(um={}));class Sm{constructor(e,t){this.action=e,this.appOrigins=t}serialize(){return{action:this.action,appOrigins:this.appOrigins}}}const bm="v2";function Am(){if(Jr(cr,un.content,un.task),!Im())throw hn;return Sc(er(bm,"geoLocation.map.chooseLocation"),"location.getLocation",{allowChooseLocation:!0,showMap:!0})}function Em(e){if(Jr(cr,un.content,un.task),!Im())throw hn;if(!e)throw{errorCode:Le.INVALID_ARGUMENTS};return Sc(er(bm,"geoLocation.showLocation"),"location.showLocation",e)}function Im(){return!!(Jr(cr)&&cr.supports.geoLocation&&cr.supports.geoLocation.map&&cr.supports.permissions)}const Pm="v2";function Tm(){if(Jr(cr,un.content,un.task),!Fm())throw hn;return Sc(er(Pm,"geoLocation.getCurrentLocation"),"location.getLocation",{allowChooseLocation:!1,showMap:!1})}function Om(){if(Jr(cr,un.content,un.task),!Fm())throw hn;const e=He.GeoLocation;return new Promise(t=>{t(Sc(er(Pm,"geoLocation.hasPermission"),"permissions.has",e))})}function Rm(){if(Jr(cr,un.content,un.task),!Fm())throw hn;const e=He.GeoLocation;return new Promise(t=>{t(Sc(er(Pm,"geoLocation.requestPermission"),"permissions.request",e))})}function Fm(){return!!(Jr(cr)&&cr.supports.geoLocation&&cr.supports.permissions)}function km(){return cr.hostVersionsInfo?cr.hostVersionsInfo.adaptiveCardSchemaVersion:void 0}const Mm="v1";class xm{postMessage(e,t){Jr(cr),Rc(er(Mm,"appWindow.childAppWindow.postMessage"),"messageForChild",[e],t||yn())}addEventListener(e,t){Jr(cr),"message"===e&&Os(er(Mm,"appWindow.childAppWindow.addEventListener"),"messageForParent",t)}}class Nm{static get Instance(){return this._instance||(this._instance=new this)}postMessage(e,t){Jr(cr,un.task),Rc(er(Mm,"appWindow.parentAppWindow.postMessage"),"messageForParent",[e],t||yn())}addEventListener(e,t){Jr(cr,un.task),"message"===e&&Os(er(Mm,"appWindow.parentAppWindow.addEventListener"),"messageForChild",t)}}const Um="v2";function Dm(e){if(Jr(cr,un.content),!Lm())throw hn;if(!e||!Fn(e))throw{errorCode:Le.INVALID_ARGUMENTS,message:"Invalid Url: Only https URL is allowed"};return Sc(er(Um,"secondaryBrowser.openUrl"),"secondaryBrowser.open",e.toString())}function Lm(){return!(!Jr(cr)||!cr.supports.secondaryBrowser)}const Hm="v1";function _m(e,t){if(!t)throw new Error("[location.getLocation] Callback cannot be null");if(Jr(cr,un.content,un.task),!Kr(Xe))throw{errorCode:Le.OLD_PLATFORM};if(!e)throw{errorCode:Le.INVALID_ARGUMENTS};if(!Bm())throw hn;Rc(er(Hm,"location.getLocation"),"location.getLocation",[e],t)}function Vm(e,t){if(!t)throw new Error("[location.showLocation] Callback cannot be null");if(Jr(cr,un.content,un.task),!Kr(Xe))throw{errorCode:Le.OLD_PLATFORM};if(!e)throw{errorCode:Le.INVALID_ARGUMENTS};if(!Bm())throw hn;Rc(er(Hm,"location.showLocation"),"location.showLocation",[e],t)}function Bm(){return!(!Jr(cr)||!cr.supports.location)}const jm="v1";function Wm(e){Jr(cr,un.sidePanel),e.contentUrl&&new URL(e.contentUrl),Rc(er(jm,"meeting.appShareButton.setOptions"),"meeting.appShareButton.setOptions",[e])}var zm=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 qm="v1";var $m,Gm,Jm,Km,Qm,Zm;function Xm(e){if(!e)throw new Error("[get incoming client audio state] Callback cannot be null");Jr(cr,un.sidePanel,un.meetingStage),Rc(er(qm,"meeting.getIncomingClientAudioState"),"getIncomingClientAudioState",e)}function Ym(e){if(!e)throw new Error("[toggle incoming client audio] Callback cannot be null");Jr(cr,un.sidePanel,un.meetingStage),Rc(er(qm,"meeting.toggleIncomingClientAudio"),"toggleIncomingClientAudio",e)}function ev(e){if(!e)throw new Error("[get meeting details] Callback cannot be null");Jr(cr,un.sidePanel,un.meetingStage,un.settings,un.content),Rc(er(qm,"meeting.getMeetingDetails"),"meeting.getMeetingDetails",e)}function tv(){var e,t,n;return zm(this,void 0,void 0,function*(){let r;Jr(cr,un.sidePanel,un.meetingStage,un.settings,un.content);try{const e=!0;r=yield Sc(er("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)==Km.GroupCall||(null===(n=r.details)||void 0===n?void 0:n.type)==Km.OneOnOneCall)&&!r.details.originalCallerInfo)throw new Error(Le.NOT_SUPPORTED_ON_PLATFORM.toString());return r})}function nv(e){if(!e)throw new Error("[get Authentication Token For AnonymousUser] Callback cannot be null");Jr(cr,un.sidePanel,un.meetingStage,un.task),Rc(er(qm,"meeting.getAuthenticationTokenForAnonymousUser"),"meeting.getAuthenticationTokenForAnonymousUser",e)}function rv(e){if(!e)throw new Error("[get live stream state] Callback cannot be null");Jr(cr,un.sidePanel),Rc(er(qm,"meeting.getLiveStreamState"),"meeting.getLiveStreamState",e)}function ov(e,t,n){if(!e)throw new Error("[request start live streaming] Callback cannot be null");Jr(cr,un.sidePanel),Rc(er(qm,"meeting.requestStartLiveStreaming"),"meeting.requestStartLiveStreaming",[t,n],e)}function iv(e){if(!e)throw new Error("[request stop live streaming] Callback cannot be null");Jr(cr,un.sidePanel),Rc(er(qm,"meeting.requestStopLiveStreaming"),"meeting.requestStopLiveStreaming",e)}function av(e){if(!e)throw new Error("[register live stream changed handler] Handler cannot be null");Jr(cr,un.sidePanel),Os(er(qm,"meeting.registerLiveStreamChangedHandler"),"meeting.liveStreamChanged",e)}function sv(e,t,n={sharingProtocol:Qm.Collaborative}){if(!e)throw new Error("[share app content to stage] Callback cannot be null");Jr(cr,un.sidePanel,un.meetingStage),Rc(er(qm,"meeting.shareAppContentToStage"),"meeting.shareAppContentToStage",[t,n],e)}function cv(e){if(!e)throw new Error("[get app content stage sharing capabilities] Callback cannot be null");Jr(cr,un.sidePanel,un.meetingStage),Rc(er(qm,"meeting.getAppContentStageSharingCapabilities"),"meeting.getAppContentStageSharingCapabilities",e)}function uv(e){if(!e)throw new Error("[stop sharing app content to stage] Callback cannot be null");Jr(cr,un.sidePanel,un.meetingStage),Rc(er(qm,"meeting.stopSharingAppContentToStage"),"meeting.stopSharingAppContentToStage",e)}function lv(e){if(!e)throw new Error("[get app content stage sharing state] Callback cannot be null");Jr(cr,un.sidePanel,un.meetingStage),Rc(er(qm,"meeting.getAppContentStageSharingState"),"meeting.getAppContentStageSharingState",e)}function dv(e){if(!e)throw new Error("[registerSpeakingStateChangeHandler] Handler cannot be null");Jr(cr,un.sidePanel,un.meetingStage),Os(er(qm,"meeting.registerSpeakingStateChangeHandler"),"meeting.speakingStateChanged",e)}function fv(e){if(!e)throw new Error("[registerRaiseHandStateChangedHandler] Handler cannot be null");Jr(cr,un.sidePanel,un.meetingStage),Os(er(qm,"meeting.registerRaiseHandStateChangedHandler"),"meeting.raiseHandStateChanged",e)}function pv(e){if(!e)throw new Error("[registerMeetingReactionReceivedHandler] Handler cannot be null");Jr(cr,un.sidePanel,un.meetingStage),Os(er(qm,"meeting.registerMeetingReactionReceivedHandler"),"meeting.meetingReactionReceived",e)}function gv(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(cr);const t={joinWebUrl:e.joinWebUrl.href,source:e.source||Zm.Other};return Sc(er("v2","meeting.joinMeeting"),"meeting.joinMeeting",t)}function hv(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(cr,un.sidePanel,un.meetingStage),e.isAppHandlingAudio?mv(e,t):vv(e,t)}function mv(e,t){Rc(er(qm,"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");Os(er(qm,"meeting.registerMicStateChangeHandler"),"meeting.micStateChanged",t=>zm(this,void 0,void 0,function*(){try{const n=yield e.micMuteStateChangedCallback(t);Cv(n,n.isMicMuted===t.isMicMuted?$m.HostInitiated:$m.AppDeclinedToChange)}catch(e){Cv(t,$m.AppFailedToChange)}}));Os(er(qm,"meeting.registerAudioDeviceSelectionChangedHandler"),"meeting.audioDeviceSelectionChanged",t=>{var n;null===(n=e.audioDeviceSelectionChangedCallback)||void 0===n||n.call(e,t)}),t(r)})}function vv(e,t){Rc(er(qm,"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");Fs("meeting.micStateChanged")&&Rs("meeting.micStateChanged"),Fs("meeting.audioDeviceSelectionChanged")&&Rs("meeting.audioDeviceSelectionChanged"),t(n)})}function wv(e){Cv(e,$m.AppInitiated)}function Cv(e,t){Jr(cr,un.sidePanel,un.meetingStage),Rc(er(qm,"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"}($m||($m={})),function(e){e.like="like",e.heart="heart",e.laugh="laugh",e.surprised="surprised",e.applause="applause"}(Gm||(Gm={})),function(e){e.Unknown="Unknown",e.Adhoc="Adhoc",e.Scheduled="Scheduled",e.Recurring="Recurring",e.Broadcast="Broadcast",e.MeetNow="MeetNow"}(Jm||(Jm={})),function(e){e.OneOnOneCall="oneOnOneCall",e.GroupCall="groupCall"}(Km||(Km={})),function(e){e.Collaborative="Collaborative",e.ScreenShare="ScreenShare"}(Qm||(Qm={})),function(e){e.M365CalendarGridContextMenu="m365_calendar_grid_context_menu",e.M365CalendarGridPeek="m365_calendar_grid_peek",e.M365CalendarGridEventCardJoinButton="m365_calendar_grid_event_card_join_button",e.M365CalendarFormRibbonJoinButton="m365_calendar_form_ribbon_join_button",e.M365CalendarFormJoinTeamsMeetingButton="m365_calendar_form_join_teams_meeting_button",e.Other="other"}(Zm||(Zm={}));const yv="v1",Sv="v2";function bv(e,t){let n,r,o="";"function"==typeof e?(n=e,r=t,o=er(yv,"monetization.openPurchaseExperience")):(r=e,o=er(Sv,"monetization.openPurchaseExperience"));return Jr(cr,un.content),Pn(()=>new Promise(e=>{if(!Av())throw hn;e(Sc(o,"monetization.openPurchaseExperience",r))}),n)}function Av(){return!(!Jr(cr)||!cr.supports.monetization)}const Ev="v2";function Iv(e){return new Promise(t=>{if(Jr(cr,un.content),!Tv())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openCalendarItem");t(Cc(er(Ev,"calendar.openCalendarItem"),"calendar.openCalendarItem",e))})}function Pv(e){return new Promise(t=>{if(Jr(cr,un.content),!Tv())throw new Error("Not supported");const n=er(Ev,"calendar.composeMeeting");cr.isLegacyTeams?t(Cc(n,"executeDeepLink",ch(e.attendees,e.startTime,e.endTime,e.subject,e.content))):t(Cc(n,"calendar.composeMeeting",e))})}function Tv(){return!(!Jr(cr)||!cr.supports.calendar)}const Ov="v2";function Rv(e){e&&0!==e.length&&e.forEach(e=>{zg(e)})}function Fv(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===Hv.New&&(Rv(t.toRecipients),Rv(t.ccRecipients),Rv(t.bccRecipients))}function kv(e){if(Jr(cr,un.content),!Mv())throw new Error("Not supported");return Fv(e),Ic("mail.handoff.composeMail",[new xv(e)],er(Ov,"mail.handoff.composeMail"))}function Mv(){return!!(Jr(cr)&&cr.supports.mail&&cr.supports.mail.handoff)}class xv{constructor(e){this.composeMailParamsWithHandoff=e}serialize(){return this.composeMailParamsWithHandoff}}const Nv="v2";function Uv(e){return new Promise(t=>{if(Jr(cr,un.content),!Lv())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openMailItem");t(Cc(er(Nv,"mail.openMailItem"),"mail.openMailItem",e))})}function Dv(e){return new Promise(t=>{if(Jr(cr,un.content),!Lv())throw new Error("Not supported");t(Cc(er(Nv,"mail.composeMail"),"mail.composeMail",e))})}function Lv(){return!(!Jr(cr)||!cr.supports.mail)}var Hv;!function(e){e.New="new",e.Reply="reply",e.ReplyAll="replyAll",e.Forward="forward"}(Hv||(Hv={}));const _v="v2";function Vv(){if(!Jn.printCapabilityEnabled){if(Jr(cr),!$v())throw hn;Jn.printCapabilityEnabled=!0,document.addEventListener("keydown",e=>{(e.ctrlKey||e.metaKey)&&80===e.keyCode&&(Bv(),e.cancelBubble=!0,e.preventDefault(),e.stopImmediatePropagation())})}}function Bv(){xn().print()}function jv(e){Wv(er(_v,"teamsAPIs_registerOnLoadHandler"),e,()=>{if(!co(e)&&!$v())throw hn})}function Wv(e,t,n){!co(t)&&Jr(cr),!co(t)&&n&&n(),Hs(e,t)}function zv(e){qv(er(_v,"teamsAPIs_registerBeforeUnloadHandler"),e,()=>{if(!co(e)&&!$v())throw hn})}function qv(e,t,n){!co(t)&&Jr(cr),!co(t)&&n&&n(),Bs(e,t)}function $v(){return!(!Jr(cr)||!cr.supports.teamsCore)}const Gv="v1",Jv="v2";function Kv(e,t){let n,r;Jr(cr,un.content,un.task,un.settings);let o="";return"function"==typeof e?([n,r]=[e,t],o=er(Gv,"people.selectPeople")):(r=e,o=er(Jv,"people.selectPeople")),En(Qv,n,o,r)}function Qv(e,t){return new Promise(n=>{if(!Kr(Ye))throw{errorCode:Le.OLD_PLATFORM};if(!zh(t))throw{errorCode:Le.INVALID_ARGUMENTS};if(!Zv())throw hn;n(Sc(e,"people.selectPeople",t))})}function Zv(){return!(!Jr(cr)||!cr.supports.people)}function Xv(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?Yv(e.persona):[!1,"triggerType must be a valid string"]:[!1,"targetElementBoundingRect must be a DOMRect"]:[!1,"A request object is required"]}function Yv(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 ew="v2";function tw(e){return Jr(cr,un.content),new Promise(t=>{const[n,r]=Xv(e);if(!n)throw{errorCode:Le.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(Sc(er(ew,"profile.showProfile"),"profile.showProfile",o))})}function nw(){return!(!Jr(cr)||!cr.supports.profile)}const rw="v2",ow="search.queryChange",iw="search.queryClose",aw="search.queryExecute";function sw(e,t,n){if(Jr(cr,un.content),!uw())throw hn;Os(er(rw,"search.registerOnClosedHandler"),iw,e),Os(er(rw,"search.registerOnExecutedHandler"),aw,t),n&&Os(er(rw,"search.registerOnChangeHandler"),ow,n)}function cw(){if(Jr(cr,un.content),!uw())throw hn;Rc(er(rw,"search.unregisterHandlers"),"search.unregister"),Rs(ow),Rs(iw),Rs(aw)}function uw(){return!(!Jr(cr)||!cr.supports.search)}function lw(){return new Promise(e=>{if(Jr(cr,un.content),!uw())throw new Error("Not supported");e(Cc(er(rw,"search.closeSearch"),"search.closeSearch"))})}var dw=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 fw="v2";function pw(){return dw(this,void 0,void 0,function*(){if(Jr(cr,un.sidePanel,un.meetingStage),!gw())throw hn;return yield Sc(er(fw,"sharing.history.getContent"),"sharing.history.getContent")})}function gw(){var e;return Jr(cr)&&void 0!==(null===(e=cr.supports.sharing)||void 0===e?void 0:e.history)}const hw="v1",mw="v2",vw={shareWebContent:"sharing.shareWebContent"};function ww(e,t){try{yw(e),Sw(e),bw(e)}catch(e){return In(()=>Promise.reject(e),t)}Jr(cr,un.content,un.sidePanel,un.task,un.stage,un.meetingStage);return In(Cw,t,er(t?hw:mw,"sharing.shareWebContent"),e)}function Cw(e,t){return new Promise(n=>{if(!Aw())throw hn;n(Sc(e,vw.shareWebContent,t))})}function yw(e){if(!(e&&e.content&&e.content.length)){throw{errorCode:Le.INVALID_ARGUMENTS,message:"Shared content is missing"}}}function Sw(e){let t;if(e.content.some(e=>!e.type))throw t={errorCode:Le.INVALID_ARGUMENTS,message:"Shared content type cannot be undefined"},t;if(e.content.some(t=>t.type!==e.content[0].type))throw t={errorCode:Le.INVALID_ARGUMENTS,message:"Shared content must be of the same type"},t}function bw(e){let t;if("URL"!==e.content[0].type)throw t={errorCode:Le.INVALID_ARGUMENTS,message:"Content type is unsupported"},t;if(e.content.some(e=>!e.url))throw t={errorCode:Le.INVALID_ARGUMENTS,message:"URLs are required for URL content types"},t}function Aw(){return!(!Jr(cr)||!cr.supports.sharing)}const Ew="v2";function Iw(){return new Promise(e=>{if(Jr(cr,un.content),!Pw())throw hn;e(Sc(er(Ew,"stageView.self.close"),"stageView.self.close"))})}function Pw(){var e;return Jr(cr)&&void 0!==(null===(e=cr.supports.stageView)||void 0===e?void 0:e.self)}const Tw="v2";var Ow;function Rw(e){return new Promise(t=>{if(Jr(cr,un.content),!Fw())throw hn;if(!e)throw new Error("[stageView.open] Stage view params cannot be null");t(Sc(er(Tw,"stageView.open"),"stageView.open",e))})}function Fw(){return!(!Jr(cr)||!cr.supports.stageView)}!function(e){e.modal="modal",e.popout="popout",e.popoutWithChat="popoutWithChat"}(Ow||(Ow={}));const kw=10;var Mw=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 xw="v2";function Nw(e){return Mw(this,void 0,void 0,function*(){Jr(cr,un.content,un.task),Lw(),Hw(e);const t=yield Sc(er(xw,"visualMedia.image.captureImages"),"visualMedia.image.captureImages",e);return _w(e.maxVisualMediaCount,t),t})}function Uw(e){return Mw(this,void 0,void 0,function*(){Jr(cr,un.content,un.task),Lw(),Hw(e);const t=yield Sc(er(xw,"visualMedia.image.retrieveImages"),"visualMedia.image.retrieveImages",e);return _w(e.maxVisualMediaCount,t),t})}function Dw(){return!!(Jr(cr)&&cr.supports.visualMedia&&cr.supports.visualMedia.image&&cr.supports.permissions)}function Lw(){if(!Dw())throw hn}function Hw(e){if(!e||e.maxVisualMediaCount>kw||e.maxVisualMediaCount<1)throw wn}function _w(e,t){if(t.length>e)throw Cn}const Vw="v2";var Bw,jw;function Ww(){if(Jr(cr,un.content,un.task),!Dw())throw hn;const e=He.Media;return Sc(er(Vw,"visualMedia.hasPermission"),"permissions.has",e)}function zw(){if(Jr(cr,un.content,un.task),!Dw())throw hn;const e=He.Media;return Sc(er(Vw,"visualMedia.requestPermission"),"permissions.request",e)}!function(e){e[e.FrontOrRear=1]="FrontOrRear",e[e.FrontOnly=2]="FrontOnly",e[e.RearOnly=3]="RearOnly"}(Bw||(Bw={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(jw||(jw={}));var qw=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 $w=null;function Gw(){return qw(this,void 0,void 0,function*(){return null===$w&&($w=(yield Do()).app.host.name),$w})}var Jw=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 Kw(){return Jw(this,void 0,void 0,function*(){if(Jr(cr),!Zw())throw hn;return!(!cr.isLegacyTeams||Jn.hostClientType!==sn.android&&Jn.hostClientType!==sn.ios&&Jn.hostClientType!==sn.ipados&&Jn.hostClientType!==sn.visionOS||(yield Qw())!==cn.teams)||(yield wc(er("v2","webStorage.isWebStorageClearedOnUserLogOut"),"webStorage.isWebStorageClearedOnUserLogOut"))})}function Qw(){return Jw(this,void 0,void 0,function*(){return Gw()})}function Zw(){return Jr(cr)&&void 0!==cr.supports.webStorage}const Xw="v2";var Yw;function eC(e){const t=er(Xw,"call.startCall");return new Promise(n=>{var r;if(Jr(cr,un.content,un.task),!tC())throw hn;if(!cr.isLegacyTeams)return Rc(t,"call.startCall",[e],n);n(wc(t,"executeDeepLink",sh(e.targets,null===(r=e.requestedModalities)||void 0===r?void 0:r.includes(Yw.Video),e.source)).then(e=>{if(!e)throw new Error(dt);return e}))})}function tC(){return!(!Jr(cr)||!cr.supports.call)}!function(e){e.Unknown="unknown",e.Audio="audio",e.Video="video",e.VideoBasedScreenSharing="videoBasedScreenSharing",e.Data="data"}(Yw||(Yw={}));const nC="v1";function rC(){ra(er(nC,"appInitialization.notifyAppLoaded"))}function oC(){Rc(er(nC,"appInitialization.notifySuccess"),Oo.Success,[Ar])}function iC(e){ia(er(nC,"appInitialization.notifyFailure"),e)}function aC(e){oa(er(nC,"appInitialization.notifyExpectedFailure"),e)}const sC=Yn("thirdPartyCloudStorage"),cC="v2";class uC{constructor(e,t){this.fileType=e,this.assembleAttachment=t}}let lC=[],dC=null,fC=!0,pC=null;function gC(e,t){if(!t)throw new Error("[getDragAndDropFiles] Callback cannot be null");if(!e||""===e){return void t([],{errorCode:Le.INVALID_ARGUMENTS})}if(Jr(cr,un.content,un.task),!mC())throw hn;if(pC)throw pC=null,new Error("getDragAndDropFiles cannot be called twice");pC=t,fC=!0,Rc(er(cC,"thirdPartyCloudStorage.getDragAndDropFiles"),"thirdPartyCloudStorage.getDragAndDropFiles",[e],hC)}function hC(e){if(pC)if(e&&e.error)pC([],e.error),pC=null;else if(e&&e.fileChunk)try{fC||0!==e.fileChunk.chunkSequence||(sC("Last chunk is not received or 'endOfFile' value for previous chunk was not set to true"),fC=!0,pC([],{errorCode:Le.INTERNAL_ERROR,message:"error occurred while receiving data"}),lC=[],pC=null);const t=Nh(e.fileChunk,e.fileType);if(t?(dC||(dC=new uC(e.fileType,[])),dC.assembleAttachment.push(t)):(sC(`Received a null assemble attachment for when decoding chunk sequence ${e.fileChunk.chunkSequence}; not including the chunk in the assembled file.`),pC?pC([],{errorCode:Le.INTERNAL_ERROR,message:"error occurred while receiving data"}):pC=null,lC=[],pC=null,fC=!0),fC=e.fileChunk.endOfFile,e.fileChunk.endOfFile&&dC){const t=xh(dC.assembleAttachment,dC.fileType);if(t){const n=new File([t],e.fileName,{type:t.type});lC.push(n)}e.isLastFile&&pC&&(pC(lC,e.error),lC=[],pC=null,fC=!0),dC=null}}catch(e){pC&&(pC([],{errorCode:Le.INTERNAL_ERROR,message:e}),lC=[],pC=null,fC=!0)}else pC([],{errorCode:Le.INTERNAL_ERROR,message:"data received is null"}),lC=[],pC=null,fC=!0}function mC(){return!(!Jr(cr)||!cr.supports.thirdPartyCloudStorage)}const vC="v1";function wC(e,t){na(er(vC,"initialize"),t).then(()=>{e&&e()})}function CC(){Vv()}function yC(){Bv()}function SC(e){Gr(),Rc(er(vC,"getContext"),"getContext",t=>{t.frameContext||(t.frameContext=Jn.frameContext),e(t)})}function bC(e){da(er(vC,"registerOnThemeChangeHandlerHelper"),e)}function AC(e){ks(er(vC,"registerFullScreenHandler"),"fullScreenChange",e,[])}function EC(e){ks(er(vC,"registerAppButtonClickHandler"),"appButtonClick",e,[un.content])}function IC(e){ks(er(vC,"registerAppButtonHoverEnterHandler"),"appButtonHoverEnter",e,[un.content])}function PC(e){ks(er(vC,"registerAppButtonHoverLeaveHandler"),"appButtonHoverLeave",e,[un.content])}function TC(e){Ma(er(vC,"registerBackButtonHandler"),e)}function OC(e){Wv(er(vC,"registerOnLoadHandler"),e)}function RC(e){qv(er(vC,"registerBeforeUnloadHandler"),e)}function FC(e){ks(er(vC,"registerFocusEnterHandler"),"focusEnter",e,[])}function kC(e){ks(er(vC,"registerChangeSettingsHandler"),"changeSettings",e,[un.content])}function MC(e,t){Jr(cr),ss(er(vC,"getTabInstances"),t).then(t=>{e(t)})}function xC(e,t){Jr(cr),cs(er(vC,"getMruTabInstances"),t).then(t=>{e(t)})}function NC(e){us(er(vC,"shareDeepLink"),{subPageId:e.subEntityId,subPageLabel:e.subEntityLabel,subPageWebUrl:e.subEntityWebUrl})}function UC(e,t){Jr(cr,un.content,un.sidePanel,un.settings,un.task,un.stage,un.meetingStage);const n=null!=t?t:yn();pa(er(vC,"executeDeepLink"),e).then(()=>{n(!0)}).catch(e=>{n(!1,e.message)})}function DC(e){ls(er(vC,"setFrameContext"),e)}function LC(e,t,n){na(er(vC,"initializeWithFrameContext"),n).then(()=>t&&t()),ls(er(vC,"setFrameContext"),e)}const HC="v1";function _C(e){as(er(HC,"navigation.returnFocus"),e)}function VC(e,t){Jr(cr);const n=null!=t?t:yn();is(er(HC,"navigation.navigateToTab"),e).then(()=>{n(!0)}).catch(e=>{n(!1,e.message)})}function BC(e,t){Jr(cr,un.content,un.sidePanel,un.settings,un.remove,un.task,un.stage,un.meetingStage);const n=null!=t?t:yn();rs(er(HC,"navigation.navigateCrossDomain"),e).then(()=>{n(!0)}).catch(e=>{n(!1,e.message)})}function jC(e){Jr(cr);const t=null!=e?e:yn();os(er(HC,"navigation.navigateBack")).then(()=>{t(!0)}).catch(e=>{t(!1,e.message)})}const WC="v1";function zC(e){ds(er(WC,"settings.setValidityState"),e)}function qC(e){Jr(cr,un.content,un.settings,un.remove,un.sidePanel),fs(er(WC,"settings.getSettings")).then(t=>{e(t)})}function $C(e,t){Jr(cr,un.content,un.settings,un.sidePanel);const n=null!=t?t:yn();ps(er(WC,"settings.setSettings"),e).then(()=>{n(!0)}).catch(e=>{n(!1,e.message)})}function GC(e){ji(er(WC,"settings.registerOnSaveHandler"),e)}function JC(e){zi(er(WC,"settings.registerOnRemoveHandler"),e)}var KC=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 QC="v1";function ZC(e,t){const n=er(QC,"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(cr,un.content,un.sidePanel,un.meetingStage),Rc(n,"tasks.startTask",[e],t)):void 0!==e.completionBotId?ui(n,ty(e),r):ci(n,ey(e),r),new xm}function XC(e){e=ny(e);const{width:t,height:n}=e,r=KC(e,["width","height"]);if(Object.keys(r).length)throw new Error("resize requires a TaskInfo argument containing only width and height");si(er(QC,"tasks.updateTask"),e)}function YC(e,t){li(er(QC,"tasks.submitTask"),e,t)}function ey(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:pn.Small,width:e.width?e.width:pn.Small},title:e.title,fallbackUrl:e.fallbackUrl}}function ty(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:pn.Small,width:e.width?e.width:pn.Small},title:e.title,fallbackUrl:e.fallbackUrl,completionBotId:e.completionBotId}}function ny(e){return e.height=e.height?e.height:pn.Small,e.width=e.width?e.width:pn.Small,e}const ry="v2";var oy,iy;function ay(){return!(!Jr(cr,un.meetingStage,un.sidePanel,un.content)||!cr.supports.interactive)}!function(e){e.guest="Guest",e.attendee="Attendee",e.presenter="Presenter",e.organizer="Organizer"}(oy||(oy={})),function(e){e.added="Added",e.alreadyExists="AlreadyExists",e.conflict="Conflict",e.notFound="NotFound"}(iy||(iy={}));class sy{getFluidTenantInfo(){return cy(),new Promise(e=>{e(Sc(er(ry,"interactive.getFluidTenantInfo"),"interactive.getFluidTenantInfo"))})}getFluidToken(e){return cy(),new Promise(t=>{t(Sc(er(ry,"interactive.getFluidToken"),"interactive.getFluidToken",e))})}getFluidContainerId(){return cy(),new Promise(e=>{e(Sc(er(ry,"interactive.getFluidContainerId"),"interactive.getFluidContainerId"))})}setFluidContainerId(e){return cy(),new Promise(t=>{t(Sc(er(ry,"interactive.setFluidContainerId"),"interactive.setFluidContainerId",e))})}getNtpTime(){return cy(),new Promise(e=>{e(Sc(er(ry,"interactive.getNtpTime"),"interactive.getNtpTime"))})}registerClientId(e){return cy(),new Promise(t=>{t(Sc(er(ry,"interactive.registerClientId"),"interactive.registerClientId",e))})}getClientRoles(e){return cy(),new Promise(t=>{t(Sc(er(ry,"interactive.getClientRoles"),"interactive.getClientRoles",e))})}getClientInfo(e){return cy(),new Promise(t=>{t(Sc(er(ry,"interactive.getClientInfo"),"interactive.getClientInfo",e))})}static create(){return cy(),new sy}}function cy(){if(!ay())throw new Error("LiveShareHost Not supported")}var uy=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 ly(e){try{return e.cartItems=dy(e.cartItems),e}catch(e){throw new Error("Error deserializing cart")}}function dy(e){return e.map(e=>{if(e.imageURL){const t=new URL(e.imageURL);e.imageURL=t}return e.accessories&&(e.accessories=dy(e.accessories)),e})}const fy=e=>{try{return e.map(e=>{const{imageURL:t,accessories:n}=e,r=uy(e,["imageURL","accessories"]),o=Object.assign({},r);return t&&(o.imageURL=t.href),n&&(o.accessories=fy(n)),o})}catch(e){throw new Error("Error serializing cart items")}};function py(e){if(!Array.isArray(e)||0===e.length)throw new Error("cartItems must be a non-empty array");for(const t of e)hy(t),gy(t.accessories)}function gy(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");hy(t)}}}function hy(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");vy(e.price),wy(e.quantity)}function my(e){if(null!=e){if(!e)throw new Error("id must not be empty");if(!1===an(e))throw new Error("id must be a valid UUID")}}function vy(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 wy(e){if("number"!=typeof e||e<=0||parseInt(e.toString())!==e)throw new Error(`quantity ${e} must be an integer greater than 0`)}function Cy(e){if(!Object.values(Ay).includes(e))throw new Error(`cartStatus ${e} is not valid`)}const yy="v2",Sy={majorVersion:1,minorVersion:1};var by,Ay;function Ey(){if(Jr(cr,un.content,un.task),!Oy())throw hn;return Sc(er(yy,"marketplace.getCart"),"marketplace.getCart",Sy).then(ly)}function Iy(e){if(Jr(cr,un.content,un.task),!Oy())throw hn;if(!e)throw new Error("addOrUpdateCartItemsParams must be provided");return my(null==e?void 0:e.cartId),py(null==e?void 0:e.cartItems),Sc(er(yy,"marketplace.addOrUpdateCartItems"),"marketplace.addOrUpdateCartItems",Object.assign(Object.assign({},e),{cartItems:fy(e.cartItems),cartVersion:Sy})).then(ly)}function Py(e){if(Jr(cr,un.content,un.task),!Oy())throw hn;if(!e)throw new Error("removeCartItemsParams must be provided");if(my(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 Sc(er(yy,"marketplace.removeCartItems"),"marketplace.removeCartItems",Object.assign(Object.assign({},e),{cartVersion:Sy})).then(ly)}function Ty(e){if(Jr(cr,un.content,un.task),!Oy())throw hn;if(!e)throw new Error("updateCartStatusParams must be provided");return my(null==e?void 0:e.cartId),Cy(null==e?void 0:e.cartStatus),Sc(er(yy,"marketplace.updateCartStatus"),"marketplace.updateCartStatus",Object.assign(Object.assign({},e),{cartVersion:Sy})).then(ly)}function Oy(){return!(!Jr(cr)||!cr.supports.marketplace)}!function(e){e.TACAdminUser="TACAdminUser",e.TeamsAdminUser="TeamsAdminUser",e.TeamsEndUser="TeamsEndUser"}(by||(by={})),function(e){e.Open="Open",e.Processing="Processing",e.Processed="Processed",e.Closed="Closed",e.Error="Error"}(Ay||(Ay={}));var Ry=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 Fy{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 ky(e){return e.toLowerCase().split("+").sort().join("+")}function My(e){return[e.ctrlKey&&"ctrl",e.shiftKey&&"shift",e.altKey&&"alt",e.metaKey&&"meta",e.key.toLowerCase()].filter(Boolean).sort().join("+")}function xy(e){return e.ctrlKey||e.shiftKey||e.altKey||e.metaKey||!!e.key&&"escape"===e.key.toLowerCase()}function Ny(e,t){if(xy(t)){const n=My(t);if(e.has(n))return{matchedShortcut:n,isOverridable:_y.has(n)}}return{matchedShortcut:void 0,isOverridable:!1}}function Uy(e){Vy.clear(),e.shortcuts.forEach(e=>{Vy.add(ky(e))}),_y.clear(),e.overridableShortcuts.forEach(e=>{_y.add(ky(e))})}class Dy extends Zi{validate(e){return e&&Array.isArray(e.shortcuts)&&Array.isArray(e.overridableShortcuts)}deserialize(e){return e}}function Ly(e){Os(er("v2","shortcutRelay.hostShortcutChanged"),"shortcutRelay.hostShortcutChanged",e)}function Hy(e){if(e.target.closest(`[${Gy}]`))return;const{matchedShortcut:t,isOverridable:n}=Ny(Vy,e);if(!t)return;if(n&&By){if(By(e,{matchedShortcut:t}))return}Ic("shortcutRelay.forwardShortcutEvent",[new Fy(e)],er("v2","shortcutRelay.forwardShortcutEvent")),e.preventDefault(),e.stopImmediatePropagation()}const _y=new Set,Vy=new Set;let By,jy=!1;function Wy(e){if(!$y())throw hn;const t=By;return By=e,t}function zy(){if(!$y())throw hn;jy=!1,Vy.clear(),_y.clear(),By=void 0,document.removeEventListener("keydown",Hy,{capture:!0})}function qy(){return Ry(this,void 0,void 0,function*(){if(!$y())throw hn;Uy(yield Ec("shortcutRelay.getHostShortcuts",[],new Dy,er("v2","shortcutRelay.getHostShortcuts"))),jy||document.addEventListener("keydown",Hy,{capture:!0}),jy=!0,Ly(e=>{Uy(e)})})}function $y(){return!(!Jr(cr)||!cr.supports.shortcutRelay)}const Gy="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()}(Object("undefined"!=typeof self?self:this),()=>(()=>{var e={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}},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}}},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))}},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}},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||"function"==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:()=>De,AppId:()=>so,ChannelType:()=>gn,ChildAppWindow:()=>xm,DialogDimension:()=>pn,EduType:()=>je,EmailAddress:()=>qg,ErrorCode:()=>Le,FileOpenPreference:()=>Ne,FrameContexts:()=>un,HostClientType:()=>sn,HostName:()=>cn,LiveShareHost:()=>sy,NotificationTypes:()=>iu,ParentAppWindow:()=>Nm,RenderingSurfaces:()=>ln,SecondaryM365ContentIdName:()=>Ue,TaskModuleDimension:()=>pn,TeamType:()=>dn,UUID:()=>$n,UserAuthenticationState:()=>dl,UserSettingTypes:()=>su,UserTeamRole:()=>fn,ValidatedSafeString:()=>ao,ViewerActionTypes:()=>au,activateChildProxyingCommunication:()=>Ir,app:()=>i,appEntity:()=>j,appInitialization:()=>Oe,appInstallDialog:()=>ee,appPerformanceMetrics:()=>Y,authentication:()=>X,barCode:()=>ne,calendar:()=>pe,call:()=>Te,chat:()=>re,clipboard:()=>oe,conversations:()=>b,copilot:()=>O,dialog:()=>f,enablePrintCapability:()=>CC,executeDeepLink:()=>DC,externalAppAuthentication:()=>R,externalAppAuthenticationForCEA:()=>F,externalAppCardActions:()=>k,externalAppCardActionsForCEA:()=>M,externalAppCardActionsForDA:()=>x,externalAppCommands:()=>N,files:()=>D,geoLocation:()=>se,getAdaptiveCardSchemaVersion:()=>km,getContext:()=>SC,getCurrentFeatureFlagsState:()=>Or,getMruTabInstances:()=>xC,getTabInstances:()=>MC,hostEntity:()=>K,initialize:()=>wC,initializeWithFrameContext:()=>LC,liveShare:()=>Me,location:()=>ue,logs:()=>S,mail:()=>he,marketplace:()=>xe,media:()=>te,meeting:()=>de,meetingRoom:()=>U,menus:()=>p,messageChannels:()=>L,monetization:()=>fe,navigateBack:()=>jC,navigateCrossDomain:()=>BC,navigateToTab:()=>VC,nestedAppAuth:()=>ie,nestedAppAuthBridge:()=>H,notifications:()=>_,openFilePreview:()=>gu,otherAppStateChange:()=>V,overwriteFeatureFlagsState:()=>Fr,pages:()=>y,people:()=>ve,print:()=>yC,profile:()=>we,registerAppButtonClickHandler:()=>EC,registerAppButtonHoverEnterHandler:()=>IC,registerAppButtonHoverLeaveHandler:()=>PC,registerBackButtonHandler:()=>TC,registerBeforeUnloadHandler:()=>RC,registerChangeSettingsHandler:()=>kC,registerCustomHandler:()=>fu,registerFocusEnterHandler:()=>FC,registerFullScreenHandler:()=>AC,registerOnLoadHandler:()=>OC,registerOnThemeChangeHandler:()=>bC,registerUserSettingsChangeHandler:()=>pu,remoteCamera:()=>B,returnFocus:()=>_C,search:()=>Ce,secondaryBrowser:()=>ce,sendCustomEvent:()=>du,sendCustomMessage:()=>lu,setFeatureFlagsState:()=>Rr,setFrameContext:()=>UC,settings:()=>Fe,shareDeepLink:()=>NC,sharing:()=>Se,shortcutRelay:()=>ze,sidePanelInterfaces:()=>I,stageView:()=>Ae,store:()=>Q,tasks:()=>ke,teams:()=>q,teamsCore:()=>me,thirdPartyCloudStorage:()=>Re,uploadCustomApp:()=>uu,version:()=>Ar,videoEffects:()=>$,videoEffectsEx:()=>G,visualMedia:()=>Ie,webStorage:()=>Pe,widgetHosting:()=>Z});var e={};n.r(e),n.d(e,{_clearTelemetryPort:()=>mo,getTelemetryPort:()=>go,isSupported:()=>ho});var t={};n.r(t),n.d(t,{_clearDataLayerPort:()=>Ao,getDataLayerPort:()=>So,isSupported:()=>bo});var o={};n.r(o),n.d(o,{registerBeforeSuspendOrTerminateHandler:()=>Eo,registerOnResumeHandler:()=>Io});var i={};n.r(i),n.d(i,{ExpectedFailureReason:()=>Fo,FailedReason:()=>Ro,Messages:()=>Oo,_initialize:()=>No,_uninitialize:()=>Do,getContext:()=>Uo,getFrameContext:()=>Mo,initialize:()=>xo,isInitialized:()=>ko,lifecycle:()=>o,notifyAppLoaded:()=>Lo,notifyExpectedFailure:()=>Vo,notifyFailure:()=>_o,notifySuccess:()=>Ho,openLink:()=>zo,registerHostToAppPerformanceMetricsHandler:()=>Wo,registerOnContextChangeHandler:()=>jo,registerOnThemeChangeHandler:()=>Bo});var a={};n.r(a),n.d(a,{isSupported:()=>Go,resize:()=>$o});var s={};n.r(s),n.d(s,{isSupported:()=>Ko,open:()=>Jo});var c={};n.r(c),n.d(c,{isSupported:()=>Yo,registerOnMessageFromParent:()=>Xo,sendMessageToDialog:()=>Zo,sendMessageToParentFromDialog:()=>Qo});var u={};n.r(u),n.d(u,{bot:()=>s,getDialogInfoFromBotUrlDialogInfo:()=>oi,getDialogInfoFromUrlDialogInfo:()=>ri,isSupported:()=>ni,open:()=>ei,parentCommunication:()=>c,submit:()=>ti});var l={};n.r(l),n.d(l,{isSupported:()=>mi,open:()=>hi});var d={};n.r(d),n.d(d,{bot:()=>l,isSupported:()=>wi,open:()=>vi});var f={};n.r(f),n.d(f,{adaptiveCard:()=>d,initialize:()=>Ci,isSupported:()=>yi,update:()=>a,url:()=>u});var p={};n.r(p),n.d(p,{DisplayMode:()=>bi,MenuItem:()=>Ei,MenuListType:()=>Ai,initialize:()=>Fi,isSupported:()=>Li,setNavBarMenu:()=>xi,setUpViews:()=>ki,showActionMenu:()=>Di});var g={};n.r(g),n.d(g,{initialize:()=>Hi,isSupported:()=>Qi,registerChangeConfigHandler:()=>$i,registerOnRemoveHandler:()=>Wi,registerOnRemoveHandlerHelper:()=>zi,registerOnSaveHandler:()=>Bi,registerOnSaveHandlerHelper:()=>ji,setConfig:()=>Vi,setValidityState:()=>_i});var h={};n.r(h),n.d(h,{isSupported:()=>Oa,onClick:()=>Ia,onHoverEnter:()=>Pa,onHoverLeave:()=>Ta});var m={};n.r(m),n.d(m,{_initialize:()=>Ra,isSupported:()=>xa,navigateBack:()=>Fa,registerBackButtonHandler:()=>ka,registerBackButtonHandlerHelper:()=>Ma});var v={};n.r(v),n.d(v,{isSupported:()=>Ua,navigateTo:()=>Na,navigateToDefaultPage:()=>Da});var w={};n.r(w),n.d(w,{enterFullscreen:()=>La,exitFullscreen:()=>Ha,isSupported:()=>_a});var C={};n.r(C),n.d(C,{getMruTabInstances:()=>ja,getTabInstances:()=>Ba,isSupported:()=>Wa,navigateToTab:()=>Va});var y={};n.r(y),n.d(y,{EnterFocusType:()=>za,ReturnFocusType:()=>qa,appButton:()=>h,backStack:()=>m,config:()=>g,currentApp:()=>v,fullTrust:()=>w,getConfig:()=>Qa,initializeWithFrameContext:()=>Ka,isSupported:()=>ts,navigateCrossDomain:()=>Za,navigateToApp:()=>Xa,registerFocusEnterHandler:()=>Ga,registerFullScreenHandler:()=>es,returnFocus:()=>$a,setCurrentFrame:()=>Ja,shareDeepLink:()=>Ya,tabs:()=>C});var S={};n.r(S),n.d(S,{isSupported:()=>ou,registerGetLogHandler:()=>ru});var b={};n.r(b),n.d(b,{closeConversation:()=>vu,getChatMembers:()=>wu,isSupported:()=>Cu,openConversation:()=>mu});var A={};n.r(A),n.d(A,{isSupported:()=>Au,sendCustomTelemetryData:()=>Eu});var E={};n.r(E),n.d(E,{getEligibilityInfo:()=>Ru,isSupported:()=>Ou});var I={};n.r(I),n.d(I,{ContentItemType:()=>ku,CopilotMode:()=>Du,MediaSelectionType:()=>Mu,SidePanelErrorCode:()=>_u,SidePanelErrorImpl:()=>Vu,TeamsContextType:()=>Lu,TeamsDimensionName:()=>Nu,TeamsSessionType:()=>xu,TranscriptState:()=>Uu,UserConsent:()=>Hu});var P={};n.r(P),n.d(P,{copilotSidePanelNotSupportedOnPlatformError:()=>Ju,getContent:()=>qu,isResponseAReportableError:()=>zu,isSupported:()=>Wu,preCheckUserConsent:()=>$u,registerUserActionContentSelect:()=>Gu});var T={};n.r(T),n.d(T,{closeSidePanel:()=>nl,isSupported:()=>tl});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:()=>sl,ActionExecuteResponseHandler:()=>fl,InvokeErrorCode:()=>ll,InvokeResponseType:()=>ul,OriginalRequestType:()=>cl,SerializableActionExecuteInvokeRequest:()=>il,SerializableConnectorParameters:()=>bl,UserAuthenticationState:()=>dl,authenticateAndResendRequest:()=>vl,authenticateWithConnector:()=>Al,authenticateWithOauth2:()=>yl,authenticateWithPowerPlatformConnectorPlugins:()=>Sl,authenticateWithSSO:()=>wl,authenticateWithSSOAndResendRequest:()=>Cl,disconnectConnector:()=>Pl,getUserAuthenticationStateForConnector:()=>Il,isActionExecuteResponse:()=>al,isInvokeError:()=>pl,isSupported:()=>Tl,validateActionExecuteInvokeRequest:()=>hl});var F={};n.r(F),n.d(F,{authenticateAndResendRequest:()=>Ml,authenticateWithOauth:()=>kl,authenticateWithSSO:()=>Fl,authenticateWithSSOAndResendRequest:()=>xl,isSupported:()=>Nl,validateInput:()=>Dl});var k={};n.r(k),n.d(k,{ActionOpenUrlErrorCode:()=>Hl,ActionOpenUrlType:()=>Ll,isSupported:()=>Bl,processActionOpenUrl:()=>Vl,processActionSubmit:()=>_l});var M={};n.r(M),n.d(M,{isSupported:()=>$l,processActionOpenUrl:()=>zl,processActionSubmit:()=>ql});var x={};n.r(x),n.d(x,{SerializableActionOpenUrlDialogInfo:()=>ed,isSupported:()=>Xl,processActionOpenUrlDialog:()=>Zl});var N={};n.r(N),n.d(N,{isSupported:()=>od,processActionCommand:()=>rd});var D={};n.r(D),n.d(D,{CloudStorageProvider:()=>ad,CloudStorageProviderFileAction:()=>dd,CloudStorageProviderType:()=>sd,DocumentLibraryAccessType:()=>ud,FileDownloadStatus:()=>ld,SpecialDocumentLibraryType:()=>cd,addCloudStorageFolder:()=>pd,addCloudStorageProvider:()=>Sd,addCloudStorageProviderFile:()=>Ad,copyMoveFiles:()=>wd,deleteCloudStorageFolder:()=>gd,deleteCloudStorageProviderFile:()=>Id,downloadCloudStorageProviderFile:()=>Pd,getCloudStorageFolderContents:()=>hd,getCloudStorageFolders:()=>fd,getExternalProviders:()=>vd,getFileDownloads:()=>Cd,openCloudStorageFile:()=>md,openDownloadFolder:()=>yd,registerCloudStorageProviderContentChangeHandler:()=>Rd,registerCloudStorageProviderListChangeHandler:()=>Od,removeCloudStorageProvider:()=>bd,renameCloudStorageProviderFile:()=>Ed,uploadCloudStorageProviderFile:()=>Td});var U={};n.r(U),n.d(U,{getPairedMeetingRoomInfo:()=>Md,isSupported:()=>Ud,registerMeetingRoomCapabilitiesUpdateHandler:()=>Nd,registerMeetingRoomStatesUpdateHandler:()=>Dd,sendCommandToPairedMeetingRoom:()=>xd});var L={};n.r(L),n.d(L,{dataLayer:()=>t,isSupported:()=>Ld,telemetry:()=>e});var H={};n.r(H),n.d(H,{initialize:()=>jd,version:()=>Hd});var _={};n.r(_),n.d(_,{isSupported:()=>Zd,showNotification:()=>Qd});var V={};n.r(V),n.d(V,{isSupported:()=>nf,notifyInstallCompleted:()=>tf,registerAppInstallationHandler:()=>Yd,unregisterAppInstallationHandler:()=>ef});var B={};n.r(B),n.d(B,{ControlCommand:()=>of,ErrorReason:()=>af,SessionTerminatedReason:()=>sf,getCapableParticipants:()=>cf,isSupported:()=>mf,registerOnCapableParticipantsChangeHandler:()=>ff,registerOnDeviceStateChangeHandler:()=>gf,registerOnErrorHandler:()=>pf,registerOnSessionStatusChangeHandler:()=>hf,requestControl:()=>uf,sendControlCommand:()=>lf,terminateSession:()=>df});var j={};n.r(j),n.d(j,{isSupported:()=>Cf,selectAppEntity:()=>wf});var W={};n.r(W),n.d(W,{getUserJoinedTeams:()=>Sf,isSupported:()=>bf});var z={};n.r(z),n.d(z,{getConfigSetting:()=>If,isSupported:()=>Pf,joinedTeams:()=>W});var q={};n.r(q),n.d(q,{ChannelType:()=>Of,fullTrust:()=>z,getTeamChannels:()=>Rf,isSupported:()=>kf,refreshSiteUrl:()=>Ff});var $={};n.r($),n.d($,{EffectChangeType:()=>Bf,EffectFailureReason:()=>jf,VideoFrameFormat:()=>Vf,isSupported:()=>Jf,notifySelectedVideoEffectChanged:()=>zf,registerForVideoEffect:()=>qf,registerForVideoFrame:()=>Wf});var G={};n.r(G),n.d(G,{ErrorLevel:()=>wp,frameProcessingTimeoutInMs:()=>mp,isSupported:()=>Pp,notifyFatalError:()=>Rp,notifySelectedVideoEffectChanged:()=>Ap,registerForVideoEffect:()=>Ep,registerForVideoFrame:()=>Cp,updatePersonalizedEffects:()=>Ip});var J={};n.r(J),n.d(J,{addAndConfigure:()=>Lp,getAll:()=>Hp,isSupported:()=>jp,reconfigure:()=>_p,remove:()=>Bp,rename:()=>Vp});var K={};n.r(K),n.d(K,{AppTypes:()=>qp,isSupported:()=>$p,tab:()=>J});var Q={};n.r(Q),n.d(Q,{isSupported:()=>ng,openAppDetail:()=>Yp,openFullStore:()=>Xp,openInContextStore:()=>eg,openSpecificStore:()=>tg});var Z={};n.r(Z),n.d(Z,{callTool:()=>ug,contentSizeChanged:()=>gg,isSupported:()=>cg,notifyIntrinsicHeight:()=>pg,openExternal:()=>mg,registerModalCloseHandler:()=>vg,requestDisplayMode:()=>dg,requestModal:()=>fg,sendFollowUpMessage:()=>lg,setWidgetState:()=>hg});var X={};n.r(X),n.d(X,{DataResidency:()=>Bg,authenticate:()=>xg,getAuthToken:()=>Dg,getUser:()=>Lg,notifyFailure:()=>Vg,notifySuccess:()=>_g,registerAuthenticationHandlers:()=>Mg});var Y={};n.r(Y),n.d(Y,{isSupported:()=>jg,registerHostMemoryMetricsHandler:()=>Wg});var ee={};n.r(ee),n.d(ee,{isSupported:()=>fh,openAppInstallDialog:()=>dh});var te={};n.r(te),n.d(te,{CameraStartMode:()=>vh,File:()=>bh,FileFormat:()=>hh,ImageOutputFormats:()=>Sh,ImageUriType:()=>yh,Media:()=>Th,MediaControllerEvent:()=>mh,MediaType:()=>Ch,Source:()=>wh,VideoController:()=>Rh,captureImage:()=>Ah,hasPermission:()=>Eh,requestPermission:()=>Ih,scanBarCode:()=>Mh,selectMedia:()=>Fh,viewImages:()=>kh});var ne={};n.r(ne),n.d(ne,{hasPermission:()=>Gh,isSupported:()=>Kh,requestPermission:()=>Jh,scanBarCode:()=>$h});var re={};n.r(re),n.d(re,{isSupported:()=>em,openChat:()=>Zh,openGroupChat:()=>Yh});var oe={};n.r(oe),n.d(oe,{isSupported:()=>im,read:()=>om,write:()=>rm});var ie={};n.r(ie),n.d(ie,{addNAATrustedOrigins:()=>vm,canParentManageNAATrustedOrigins:()=>fm,deleteNAATrustedOrigins:()=>wm,getParentOrigin:()=>dm,isDeeplyNestedAuthSupported:()=>pm,isNAAChannelRecommended:()=>lm});var ae={};n.r(ae),n.d(ae,{chooseLocation:()=>Am,isSupported:()=>Im,showLocation:()=>Em});var se={};n.r(se),n.d(se,{getCurrentLocation:()=>Tm,hasPermission:()=>Om,isSupported:()=>Fm,map:()=>ae,requestPermission:()=>Rm});var ce={};n.r(ce),n.d(ce,{isSupported:()=>Lm,open:()=>Um});var ue={};n.r(ue),n.d(ue,{getLocation:()=>_m,isSupported:()=>Bm,showLocation:()=>Vm});var le={};n.r(le),n.d(le,{setOptions:()=>Wm});var de={};n.r(de),n.d(de,{CallType:()=>Km,EventActionSource:()=>Zm,MeetingReactionType:()=>Gm,MeetingType:()=>Jm,SharingProtocol:()=>Qm,appShareButton:()=>le,getAppContentStageSharingCapabilities:()=>cv,getAppContentStageSharingState:()=>lv,getAuthenticationTokenForAnonymousUser:()=>nv,getIncomingClientAudioState:()=>Xm,getLiveStreamState:()=>rv,getMeetingDetails:()=>ev,getMeetingDetailsVerbose:()=>tv,joinMeeting:()=>gv,registerLiveStreamChangedHandler:()=>av,registerMeetingReactionReceivedHandler:()=>pv,registerRaiseHandStateChangedHandler:()=>fv,registerSpeakingStateChangeHandler:()=>dv,requestAppAudioHandling:()=>hv,requestStartLiveStreaming:()=>ov,requestStopLiveStreaming:()=>iv,shareAppContentToStage:()=>sv,stopSharingAppContentToStage:()=>uv,toggleIncomingClientAudio:()=>Ym,updateMicState:()=>wv});var fe={};n.r(fe),n.d(fe,{isSupported:()=>Av,openPurchaseExperience:()=>bv});var pe={};n.r(pe),n.d(pe,{composeMeeting:()=>Pv,isSupported:()=>Tv,openCalendarItem:()=>Iv});var ge={};n.r(ge),n.d(ge,{composeMailWithHandoff:()=>kv,isSupported:()=>Mv});var he={};n.r(he),n.d(he,{ComposeMailType:()=>Hv,composeMail:()=>Uv,handoff:()=>ge,isSupported:()=>Lv,openMailItem:()=>Dv});var me={};n.r(me),n.d(me,{enablePrintCapability:()=>Vv,isSupported:()=>$v,print:()=>Bv,registerBeforeUnloadHandler:()=>zv,registerBeforeUnloadHandlerHelper:()=>qv,registerOnLoadHandler:()=>jv,registerOnLoadHandlerHelper:()=>Wv});var ve={};n.r(ve),n.d(ve,{isSupported:()=>Zv,selectPeople:()=>Kv});var we={};n.r(we),n.d(we,{isSupported:()=>nw,showProfile:()=>tw});var Ce={};n.r(Ce),n.d(Ce,{closeSearch:()=>lw,isSupported:()=>uw,registerHandlers:()=>sw,unregisterHandlers:()=>cw});var ye={};n.r(ye),n.d(ye,{getContent:()=>pw,isSupported:()=>gw});var Se={};n.r(Se),n.d(Se,{SharingAPIMessages:()=>vw,history:()=>ye,isSupported:()=>Aw,shareWebContent:()=>ww});var be={};n.r(be),n.d(be,{close:()=>Iw,isSupported:()=>Pw});var Ae={};n.r(Ae),n.d(Ae,{StageViewOpenMode:()=>Ow,isSupported:()=>Fw,open:()=>Rw,self:()=>be});var Ee={};n.r(Ee),n.d(Ee,{captureImages:()=>Nw,isSupported:()=>Uw,retrieveImages:()=>Dw});var Ie={};n.r(Ie),n.d(Ie,{CameraRestriction:()=>Bw,Source:()=>jw,hasPermission:()=>Ww,image:()=>Ee,requestPermission:()=>zw});var Pe={};n.r(Pe),n.d(Pe,{isSupported:()=>Zw,isWebStorageClearedOnUserLogOut:()=>Kw});var Te={};n.r(Te),n.d(Te,{CallModalities:()=>Yw,isSupported:()=>tC,startCall:()=>eC});var Oe={};n.r(Oe),n.d(Oe,{ExpectedFailureReason:()=>Fo,FailedReason:()=>Ro,Messages:()=>Oo,notifyAppLoaded:()=>rC,notifyExpectedFailure:()=>aC,notifyFailure:()=>iC,notifySuccess:()=>oC});var Re={};n.r(Re),n.d(Re,{getDragAndDropFiles:()=>gC,isSupported:()=>mC});var Fe={};n.r(Fe),n.d(Fe,{getSettings:()=>qC,registerOnRemoveHandler:()=>JC,registerOnSaveHandler:()=>GC,setSettings:()=>$C,setValidityState:()=>zC});var ke={};n.r(ke),n.d(ke,{getDefaultSizeIfNotProvided:()=>ny,startTask:()=>ZC,submitTask:()=>YC,updateTask:()=>XC});var Me={};n.r(Me),n.d(Me,{ContainerState:()=>iy,LiveShareHost:()=>sy,UserMeetingRole:()=>oy,isSupported:()=>ay});var xe={};n.r(xe),n.d(xe,{CartStatus:()=>Ay,Intent:()=>by,addOrUpdateCartItems:()=>Iy,cartVersion:()=>Sy,getCart:()=>Ey,isSupported:()=>Oy,removeCartItems:()=>Py,updateCartStatus:()=>Ty});var Ne,De,Ue,Le,He,_e,Ve,Be,je,We,ze={};function qe(e){return void 0!==(null==e?void 0:e.errorCode)}n.r(ze),n.d(ze,{DISABLE_SHORTCUT_FORWARDING_ATTRIBUTE:()=>Gy,enableShortcutRelayCapability:()=>qy,isSupported:()=>$y,resetIsShortcutRelayCapabilityEnabled:()=>zy,setOverridableShortcutHandler:()=>Wy}),function(e){e.Inline="inline",e.Desktop="desktop",e.Web="web"}(Ne||(Ne={})),function(e){e.M365Content="m365content"}(De||(De={})),function(e){e.DriveId="driveId",e.GroupId="groupId",e.SiteId="siteId",e.UserId="userId"}(Ue||(Ue={})),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"}(Le||(Le={})),function(e){e.GeoLocation="geolocation",e.Media="media"}(He||(He={})),function(e){e.BCAIS="bcais",e.BCWAF="bcwaf",e.BCWBF="bcwbf"}(_e||(_e={})),function(e){e.Faculty="faculty",e.Student="student",e.Other="other"}(Ve||(Ve={})),function(e){e.Adult="adult",e.MinorNoParentalConsentRequired="minorNoParentalConsentRequired",e.MinorWithoutParentalConsent="minorWithoutParentalConsent",e.MinorWithParentalConsent="minorWithParentalConsent",e.NotAdult="notAdult",e.NonAdult="notAdult"}(Be||(Be={})),function(e){e.HigherEducation="higherEducation",e.K12="k12",e.Other="other"}(je||(je={})),function(e){e.TextPlain="text/plain",e.TextHtml="text/html",e.ImagePNG="image/png",e.ImageJPEG="image/jpeg"}(We||(We={}));const $e=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","fa000000136.mro1cdnstorage.public.cdn.office.net","fa000000136.mro1cdnstorage.public.onecdn.static.microsoft","substrate-msb-bizchatvnext-service.sdf01.substrate-msb-bingatwork.eastus2-sdf.cosmic-ppe.office.net","office-home-m365copilotapp.wus2sdf1.office-home-m365copilotapp.westus2-sdf.cosmic-ppe.office.net","office-home-m365copilotapp.wus2test1.office-home-m365copilotapp.westus2-test.cosmic-int.office.net","m365copilotapp.svc.cloud.microsoft","m365copilotapp.svc.cloud.dev.microsoft","ffc-copilot.officeapps.live.com","m365.cloud.dev.microsoft","m365.cloud.dev.microsoft:3001","portal.officeppe.com","ignite.m365.admin.cloud.microsoft","ignite.admin.cloud.microsoft","sdf.m365.admin.cloud.microsoft","admin-sdf.microsoft.com","canary.m365.admin.cloud.microsoft","ring0.m365.admin.cloud.microsoft","portal.office365.us","portal.apps.mil","www.ohome.apps.mil","www.office365.us"]}');const Ge="2.0.1",Je="2.0.2",Ke="2.0.3",Qe="2.0.4",Ze="2.0.1",Xe="1.9.0",Ye="2.0.0",et="1.7.0",tt="1.8.0",nt="1.9.0",rt=n.t($e,2).validOrigins,ot=1500,it=new URL("https://res.cdn.office.net/teams-js/validDomains/json/validDomains.json"),at="https",st="teams.microsoft.com",ct="The library has not yet been initialized",ut="The runtime has not yet been initialized",lt="The runtime version is not supported",dt="The call was not properly started";var ft=n(933);const pt=ht,gt=2147483647;function ht(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 vt(e)}return mt(e,t,n)}function mt(e,t,n){if("string"==typeof e)return St(e,t);if(ArrayBuffer.isView(e))return Ot(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(At(e,ArrayBuffer)||e&&At(e.buffer,ArrayBuffer))return Rt(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(At(e,SharedArrayBuffer)||e&&At(e.buffer,SharedArrayBuffer)))return Rt(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 ht.from(r,t,n);const o=Qt(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return ht.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 vt(e){return wt(e),Ct(e<0?0:0|yt(e))}function wt(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 Ct(e){if(e>gt)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,ht.prototype),t}function yt(e){if(e>=gt)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+gt.toString(16)+" bytes");return 0|e}function St(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!ht.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|bt(e,t);let r=Ct(n);const o=r.write(e,t);return o!==n&&(r=r.slice(0,o)),r}function bt(e,t){if(ht.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||At(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 It(e).length;default:if(o)return r?-1:Et(e).length;t=(""+t).toLowerCase(),o=!0}}function At(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 It(e){return ft.toByteArray(Tt(e))}ht.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}}(),ht.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required"),ht.from=function(e,t,n){return mt(e,t,n)},Object.setPrototypeOf(ht.prototype,Uint8Array.prototype),Object.setPrototypeOf(ht,Uint8Array),ht.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}},ht.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==ht.prototype};const Pt=/[^+/0-9A-Za-z-_]/g;function Tt(e){if((e=(e=e.split("=")[0]).trim().replace(Pt,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}function Ot(e){if(At(e,Uint8Array)){const t=new Uint8Array(e);return Rt(t.buffer,t.byteOffset,t.byteLength)}return Ft(e)}function Rt(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,ht.prototype),r}function Ft(e){const t=e.length<0?0:0|yt(e.length),n=Ct(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function kt(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 Mt(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 Dt(this,t,n);case"utf8":case"utf-8":return kt(this,t,n);case"ascii":return Ut(this,t,n);case"latin1":case"binary":return Lt(this,t,n);case"base64":return Ht(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _t(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}ht.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?kt(this,0,e):Mt.apply(this,arguments)};const xt=4096;function Nt(e){const t=e.length;if(t<=xt)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=xt));return n}function Dt(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+=Kt[e[r]];return o}function Ut(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 Ht(e,t,n){return 0===t&&n===e.length?ft.fromByteArray(e):ft.fromByteArray(e.slice(t,n))}function _t(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 Vt(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(Jt(r))return a;e[n+a]=r}return a}function Bt(e,t,n,r){return Gt(Et(t,e.length-n),e,n,r)}function jt(e,t,n,r){return Gt(qt(t),e,n,r)}function Wt(e,t,n,r){return Gt(It(t),e,n,r)}function zt(e,t,n,r){return Gt($t(t,e.length-n),e,n,r)}function qt(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 Gt(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 Jt(e){return e!=e}ht.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 Vt(this,e,t,n);case"utf8":case"utf-8":return Bt(this,e,t,n);case"ascii":case"latin1":case"binary":return jt(this,e,t,n);case"base64":return Wt(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return zt(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}};const Kt=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 Qt(e){if(ht.isBuffer(e)){const t=0|yt(e.length),n=Ct(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||Jt(e.length)?Ct(0):Ft(e):"Buffer"===e.type&&Array.isArray(e.data)?Ft(e.data):void 0}const Zt={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Xt;const Yt=new Uint8Array(16);function en(){if(!Xt&&(Xt="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Xt))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Xt(Yt)}const tn=[];for(let e=0;e<256;++e)tn.push((e+256).toString(16).slice(1));function nn(e,t=0){return tn[e[t+0]]+tn[e[t+1]]+tn[e[t+2]]+tn[e[t+3]]+"-"+tn[e[t+4]]+tn[e[t+5]]+"-"+tn[e[t+6]]+tn[e[t+7]]+"-"+tn[e[t+8]]+tn[e[t+9]]+"-"+tn[e[t+10]]+tn[e[t+11]]+tn[e[t+12]]+tn[e[t+13]]+tn[e[t+14]]+tn[e[t+15]]}const rn=function(e,t,n){if(Zt.randomUUID&&!t&&!e)return Zt.randomUUID();const r=(e=e||{}).random||(e.rng||en)();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 nn(r)},on=/^(?:[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 an=function(e){return"string"==typeof e&&on.test(e)};var sn,cn,un,ln,dn,fn,pn,gn;!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"}(sn||(sn={})),function(e){e.office="Office",e.outlook="Outlook",e.outlookWin32="OutlookWin32",e.orange="Orange",e.places="Places",e.teams="Teams",e.teamsModern="TeamsModern"}(cn||(cn={})),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"}(un||(un={})),function(e){e.copilotSidePanel="copilotSidePanel",e.copilotMainPane="copilotMainPane",e.copilotFullScreen="copilotFullScreen"}(ln||(ln={})),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"}(dn||(dn={})),function(e){e[e.Admin=0]="Admin",e[e.User=1]="User",e[e.Guest=2]="Guest"}(fn||(fn={})),function(e){e.Large="large",e.Medium="medium",e.Small="small"}(pn||(pn={})),function(e){e.Regular="Regular",e.Private="Private",e.Shared="Shared"}(gn||(gn={}));const hn={errorCode:Le.NOT_SUPPORTED_ON_PLATFORM},mn={majorVersion:1,minorVersion:5},vn={adaptiveCardSchemaVersion:{majorVersion:1,minorVersion:5}},wn=new Error("Invalid input count: Must supply a valid image count (limit of 10)."),Cn=new Error("Invalid response: Received more images than the specified max limit in the response.");function yn(e){return(t,n)=>{if(!t)throw new Error(e||n)}}function Sn(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 bn(){return rn()}function An(e){return Object.keys(e).forEach(t=>{null!==e[t]&&void 0!==e[t]&&"object"==typeof e[t]&&An(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 In(e,t,...n){const r=e(...n);return r.then(()=>{t&&t(null)}).catch(e=>{t&&t(e)}),r}function Pn(e,t,...n){const r=e(...n);return r.then(e=>{t&&t(null,e)}).catch(e=>{t&&t(e,null)}),r}function Tn(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 On(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 Rn(e){return!(Sn(`${e.majorVersion}.${e.minorVersion}`,`${mn.majorVersion}.${mn.minorVersion}`)>=0)}function Fn(e){return"https:"===e.protocol}function kn(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=pt.from(t,"base64").toString();n(new Blob([o],{type:e}))})}function Mn(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 xn(){if(Nn())throw new Error("window object undefined at SSR check");return window}function Nn(){return"undefined"==typeof window}function Dn(e,t){if(Hn(e)||!_n(e)||!Vn(e))throw t||new Error("id is not valid.")}function Un(e,t){const n=e.toString().toLocaleLowerCase();if(Hn(n))throw t||new Error("Invalid Url");if(n.length>2048)throw t||new Error("Url exceeds the maximum size of 2048 characters");if(!Fn(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 Hn(e){return new RegExp(`${/<script[^>]*>|<script[^&]*>|%3Cscript[^%]*%3E/gi.source}|${/<\/script[^>]*>|<\/script[^&]*>|%3C\/script[^%]*%3E/gi.source}`,"gi").test(e)}function _n(e){return e.length<256&&e.length>4}function Vn(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n<32||n>126)return!1}return!0}function Bn(e){if(!e)throw new Error("id must not be empty");if(!1===an(e))throw new Error("id must be a valid UUID")}const jn=!!performance&&"now"in performance;function Wn(){return jn?performance.now()+performance.timeOrigin:void 0}function zn(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=>zn(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=>zn(e[n],t+1))}function qn(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:Be.NotAdult})})})}class $n{constructor(e=bn()){this.uuid=e,Bn(e)}toString(){return this.uuid}serialize(){return this.toString()}}function Gn(e){if(!(e instanceof $n))throw new Error(`Potential id (${JSON.stringify(e)}) is invalid; it is not an instance of UUID class.`)}class Jn{}Jn.initializeCalled=!1,Jn.initializeCompleted=!1,Jn.additionalValidOrigins=[],Jn.initializePromise=void 0,Jn.isFramelessWindow=!1,Jn.frameContext=void 0,Jn.hostClientType=void 0,Jn.printCapabilityEnabled=!1,Jn.teamsJsInstanceId=(new $n).toString();var Kn=n(815);const Qn=new $n,Zn=Kn.debug.formatArgs;Kn.debug.formatArgs=function(e){e[0]=`(${(new Date).toISOString()}): ${e[0]} [${Qn.toString()}]`,Zn.call(this,e)};const Xn=(0,Kn.debug)("teamsJs");function Yn(e){return Xn.extend(e)}function er(e,t){return`${e}_${t}`}function tr(e){return/^v\d+_[\w.]+$/.test(e)}var nr=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 rr=Yn("runtime"),or=4;function ir(e){return e.apiVersion===or}const ar={apiVersion:-1,supports:{}};function sr(e){if(ir(e))return!0;throw-1===e.apiVersion?new Error(ut):new Error(lt)}let cr=ar;const ur={apiVersion:4,isNAAChannelRecommended:!1,isDeeplyNestedAuthSupported:!1,hostVersionsInfo:vn,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:{}}}},lr=[sn.desktop,sn.web,sn.rigel,sn.surfaceHub,sn.teamsRoomsWindows,sn.teamsRoomsAndroid,sn.teamsPhones,sn.teamsDisplays],dr=[sn.android,sn.ios,sn.ipados,sn.visionOS],fr=[...lr,...dr];function pr(e){let t=e;if(t.apiVersion<or&&gr.forEach(e=>{t.apiVersion===e.versionToUpgradeFrom&&(t=e.upgradeToNextVersion(t))}),ir(t))return t;throw new Error("Received a runtime that could not be upgraded to the latest version")}const gr=[{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=nr(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})}}}],hr="2.1.2",mr={"1.0.0":[{capability:{pages:{appButton:{},tabs:{}},stageView:{}},hostClientTypes:lr}],"1.9.0":[{capability:{location:{}},hostClientTypes:fr}],"2.0.0":[{capability:{people:{}},hostClientTypes:fr},{capability:{sharing:{}},hostClientTypes:[sn.desktop,sn.web]}],"2.0.1":[{capability:{teams:{fullTrust:{joinedTeams:{}}}},hostClientTypes:[sn.android,sn.desktop,sn.ios,sn.teamsRoomsAndroid,sn.teamsPhones,sn.teamsDisplays,sn.web]},{capability:{webStorage:{}},hostClientTypes:[sn.desktop]}],"2.0.5":[{capability:{webStorage:{}},hostClientTypes:[sn.android,sn.ios]}],"2.0.8":[{capability:{sharing:{}},hostClientTypes:[sn.android,sn.ios]}],"2.1.1":[{capability:{nestedAppAuth:{}},hostClientTypes:[sn.android,sn.ios,sn.ipados,sn.visionOS]}],"2.1.2":[]},vr=rr.extend("generateBackCompatRuntimeConfig");function wr(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]=wr(e[r]||{},t[r]));return n}function Cr(e,t,n){vr("generating back compat runtime config for %s",e);let r=Object.assign({},t.supports);vr("Supported capabilities in config before updating based on highestSupportedVersion: %o",r),Object.keys(n).forEach(t=>{Sn(e,t)>=0&&n[t].forEach(e=>{void 0!==Jn.hostClientType&&e.hostClientTypes.includes(Jn.hostClientType)&&(r=wr(r,e.capability))})});const o={apiVersion:or,hostVersionsInfo:vn,isLegacyTeams:!0,supports:r};return vr("Runtime config after updating based on highestSupportedVersion: %o",o),o}const yr=rr.extend("applyRuntimeConfig");function Sr(e){"string"==typeof e.apiVersion&&(yr("Trying to apply runtime with string apiVersion, processing as v1: %o",e),e=Object.assign(Object.assign({},e),{apiVersion:1})),yr("Fast-forwarding runtime %o",e);const t=pr(e);yr("Applying runtime %o",t),cr=An(t)}function br(e){return null!=e&&void 0!==e.serialize&&"function"==typeof e.serialize}const Ar="2.50.0",Er={childProxyingCommunication:!1};function Ir(){Er.childProxyingCommunication=!0}function Pr(){return Er.childProxyingCommunication}let Tr={disableEnforceOriginMatchForChildResponses:!1};function Or(){return Tr}function Rr(e){Tr=e}function Fr(e){return Rr(Object.assign(Object.assign({},Tr),e)),Or()}var kr=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const Mr=e=>{const{uuid:t}=e,n=kr(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})},xr=e=>{const{uuidAsString:t}=e,n=kr(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new $n(t):void 0})},Nr=e=>{const{uuidAsString:t}=e,n=kr(e,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:t?new $n(t):void 0})},Dr=e=>{const{uuid:t}=e,n=kr(e,["uuid"]),r=null==t?void 0:t.toString();return Object.assign(Object.assign({},n),{uuidAsString:r})};function Ur(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=Yn("flushMessageQueue");function Hr(e,t,n,r){if(e&&t&&0!==n.length)for(;n.length>0;){const o=n.shift();if(o){const n=Mr(o);Lr("Flushing message %s from %s message queue via postMessage.",Ur(n),r),e.postMessage(n,t)}}}const _r=/^[A-Za-z][A-Za-z\d+.-]*:\/\//;function Vr(e,t){const n=e.split("."),r=t.split(".");if(r.length!==n.length)return!1;let o=!1;for(let e=0;e<n.length;e++)if(n[e]!==r[e]){if("*"!==n[e])return!1;if(e===n.length-1||o)return!1;o=!0}return!0}class Br{constructor(e,t,n){this.protocol=e,this.host=t,this.logger=n}static canUse(e){return _r.test(e)}static create(e,t){const n=e.split("://");return new Br(n[0],n[1],t.extend("InternalURLPattern"))}test(e){return this.logger("Testing URL %s against pattern protocol: %s, host: %s",e,this.protocol,this.host),e.protocol===`${this.protocol}:`&&(!e.host||Vr(this.host,e.host))}}function jr(e){return Br.canUse(e)}function Wr(e,t){if(Br.canUse(e))return Br.create(e,t);t("No URL verifier available for pattern: %s",e)}const zr=Yn("internal"),qr=zr.extend("ensureInitializeCalled"),$r=zr.extend("ensureInitialized");function Gr(){if(!Jn.initializeCalled)throw qr(ct),new Error(ct)}function Jr(e,...t){if(!Jn.initializeCompleted)throw $r("%s. initializeCalled: %s",ct,Jn.initializeCalled.toString()),new Error(ct);if(t&&t.length>0){let e=!1;for(let n=0;n<t.length;n++)if(t[n]===Jn.frameContext){e=!0;break}if(!e)throw new Error(`This call is only allowed in following contexts: ${JSON.stringify(t)}. Current context: "${Jn.frameContext}".`)}return sr(e)}function Kr(e=Ge){const t=Sn(Jn.clientSupportedSDKVersion,e);return!isNaN(t)&&t>=0}function Qr(){return Jn.hostClientType==sn.android||Jn.hostClientType==sn.ios||Jn.hostClientType==sn.ipados||Jn.hostClientType==sn.visionOS}function Zr(e=Ge){if(!Qr()){throw{errorCode:Le.NOT_SUPPORTED_ON_PLATFORM}}if(!Kr(e)){throw{errorCode:Le.OLD_PLATFORM}}}function Xr(e){let t=Jn.additionalValidOrigins.concat(e.filter(e=>"string"==typeof e&&jr(e)));const n={};t=t.filter(e=>!n[e]&&(n[e]=!0,!0)),Jn.additionalValidOrigins=t}function Yr(e){if(!ro(e))throw new Error(`Potential app id (${e}) is invalid; its length ${e.length} is not within the length limits (${to}-${no}).`)}function eo(e){if(Hn(e))throw new Error(`Potential app id (${e}) is invalid; it contains script tags.`);if(oo(e))throw new Error(`Potential app id (${e}) is invalid; it contains non-printable characters.`)}const to=4,no=256;function ro(e){return e.length<no&&e.length>to}function oo(e){return[...e].some(e=>{const t=e.charCodeAt(0);return t<32||t>126})}function io(e){if(!(e instanceof so))throw new Error(`Potential app id (${e}) is invalid; it is not an instance of AppId class.`)}class ao{constructor(e){this.idAsString=e,eo(e)}serialize(){return this.toString()}toString(){return this.idAsString}}class so extends ao{constructor(e){super(e),Yr(e)}toJSON(){return{appIdAsString:this.toString()}}}function co(e){return null==e}var uo=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 lo;const fo="v1",po=Yn("messageChannels.telemetry");function go(){return uo(this,void 0,void 0,function*(){if(lo)return po("Returning telemetry port from cache"),lo;if(!ho())throw hn;return lo=yield Pc(er(fo,"messageChannels.telemetry.getTelemetryPort"),"messageChannels.telemetry.getTelemetryPort"),lo})}function ho(){var e;return!(!Jr(cr)||!(null===(e=cr.supports.messageChannels)||void 0===e?void 0:e.telemetry))}function mo(){lo=void 0}var vo=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 wo;const Co="v1",yo=Yn("messageChannels.dataLayer");function So(){return vo(this,void 0,void 0,function*(){if(wo)return yo("Returning dataLayer port from cache"),wo;if(!bo())throw hn;return wo=yield Pc(er(Co,"messageChannels.dataLayer.getDataLayerPort"),"messageChannels.dataLayer.getDataLayerPort"),wo})}function bo(){var e;return!(!Jr(cr)||!(null===(e=cr.supports.messageChannels)||void 0===e?void 0:e.dataLayer))}function Ao(){wo=void 0}function Eo(e){if(!e)throw new Error("[app.lifecycle.registerBeforeSuspendOrTerminateHandler] Handler cannot be null");Jr(cr),Ws(e)}function Io(e){if(!e)throw new Error("[app.lifecycle.registerOnResumeHandler] Handler cannot be null");Jr(cr),zs(e)}const Po="v2",To=Yn("app"),Oo={AppLoaded:"appInitialization.appLoaded",Success:"appInitialization.success",Failure:"appInitialization.failure",ExpectedFailure:"appInitialization.expectedFailure"};var Ro,Fo;function ko(){return Jn.initializeCompleted}function Mo(){return Jn.frameContext}function xo(e){return na(er(Po,"app.initialize"),e)}function No(e){gc.currentWindow=e}function Do(){Jn.initializeCalled&&(Is(),Jn.initializeCalled=!1,Jn.initializeCompleted=!1,Jn.initializePromise=void 0,Jn.additionalValidOrigins=[],Jn.frameContext=void 0,Jn.hostClientType=void 0,Jn.isFramelessWindow=!1,mo(),Ao(),vc())}function Uo(){return new Promise(e=>{Gr(),e(wc(er(Po,"app.getContext"),"getContext"))}).then(e=>qo(e))}function Lo(){Gr(),ra(er(Po,"app.notifyAppLoaded"))}function Ho(){return aa(er(Po,"app.notifySuccess"))}function _o(e){Gr(),ia(er(Po,"app.notifyFailure"),e)}function Vo(e){Gr(),oa(er(Po,"app.notifyExpectedFailure"),e)}function Bo(e){da(er(Po,"app.registerOnThemeChangeHandler"),e)}function jo(e){fa(er(Po,"app.registerOnContextChangeHandler"),e)}function Wo(e){Us(e)}function zo(e){return pa(er(Po,"app.openLink"),e)}function qo(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:cn.teams,clientType:e.hostClientType?e.hostClientType:sn.web,sessionId:e.sessionId?e.sessionId:"",ringId:e.ringId,ancestors:e.hostAncestors},appLaunchId:e.appLaunchId,appId:e.appId?new so(e.appId):void 0,manifestVersion:e.manifestVersion},page:{id:e.entityId,frameContext:e.frameContext?e.frameContext:Jn.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){si(er(ii,"dialog.update.resize"),e)}function Go(){return!(!Jr(cr)||!cr.supports.dialog)&&!!cr.supports.dialog.update}function Jo(e,t,n){ui(er(ii,"dialog.url.bot.open"),e,t,n)}function Ko(){return Jr(cr)&&void 0!==(cr.supports.dialog&&cr.supports.dialog.url&&cr.supports.dialog.url.bot)}function Qo(e){if(Jr(cr,un.task),!Yo())throw hn;Rc(er(ii,"dialog.url.parentCommunication.sendMessageToParentFromDialog"),"messageForParent",[e])}function Zo(e){if(Jr(cr,un.content,un.sidePanel,un.meetingStage),!Yo())throw hn;Rc(er(ii,"dialog.url.parentCommunication.sendMessageToDialog"),"messageForChild",[e])}function Xo(e){if(Jr(cr,un.task),!Yo())throw hn;for(Rs("messageForChild"),Os(er(ii,"dialog.url.parentCommunication.registerMessageForChildHandler"),"messageForChild",e),pi.reverse();pi.length>0;){e(pi.pop())}}function Yo(){var e,t;return Jr(cr)&&!!(null===(t=null===(e=cr.supports.dialog)||void 0===e?void 0:e.url)||void 0===t?void 0:t.parentCommunication)}function ei(e,t,n){ci(er(ii,"dialog.url.open"),e,t,n)}function ti(e,t){li(er(ii,"dialog.url.submit"),e,t)}function ni(){return Jr(cr)&&void 0!==(cr.supports.dialog&&cr.supports.dialog.url)}function ri(e){return{url:e.url,height:e.size?e.size.height:pn.Small,width:e.size?e.size.width:pn.Small,title:e.title,fallbackUrl:e.fallbackUrl}}function oi(e){const t=ri(e);return t.completionBotId=e.completionBotId,t}!function(e){e.AuthFailed="AuthFailed",e.Timeout="Timeout",e.Other="Other"}(Ro||(Ro={})),function(e){e.PermissionError="PermissionError",e.NotFound="NotFound",e.Throttling="Throttling",e.Offline="Offline",e.Other="Other"}(Fo||(Fo={})),To("teamsjs instance is version %s, starting at %s UTC (%s local)",Ar,(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?To("teamsjs is being used from %s. %s",t,n):To("teamsjs is being used from a script tag embedded directly in your html. %s",n)}();const ii="v2",ai="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 si(e,t){if(Jr(cr,un.content,un.sidePanel,un.task,un.meetingStage),!Go())throw hn;Rc(e,"tasks.updateTask",[t])}function ci(e,t,n,r){if(Jr(cr,un.content,un.sidePanel,un.meetingStage),!ni())throw hn;r&&Os(er(ii,"dialog.url.registerMessageForParentHandler"),"messageForParent",r);Rc(e,"tasks.startTask",[ri(t)],(e,t)=>{null==n||n({err:e,result:t}),Rs("messageForParent")})}function ui(e,t,n,r){if(Jr(cr,un.content,un.sidePanel,un.meetingStage),!Ko())throw hn;r&&Os(er(ii,"dialog.url.bot.registerMessageForParentHandler"),"messageForParent",r);Rc(e,"tasks.startTask",[oi(t)],(e,t)=>{null==n||n({err:e,result:t}),Rs("messageForParent")})}function li(e,t,n){if(Jr(cr,un.content,un.task),!ni())throw hn;Jn.frameContext===un.content&&console.warn(ai),Rc(e,"tasks.completeTask",[t,n?Array.isArray(n)?n:[n]:[]])}function di(e){return{card:e.card,height:e.size?e.size.height:pn.Small,width:e.size?e.size.width:pn.Small,title:e.title}}function fi(e){const t=di(e);return t.completionBotId=e.completionBotId,t}const pi=[];function gi(e){Jn.frameContext&&(Jn.frameContext===un.task?pi.push(e):Rs("messageForChild"))}function hi(e,t){if(Jr(cr,un.content,un.sidePanel,un.meetingStage),!mi())throw hn;const n=fi(e);Rc(er(ii,"dialog.adaptiveCard.bot.open"),"tasks.startTask",[n],(e,n)=>{null==t||t({err:e,result:n})})}function mi(){const e=cr.hostVersionsInfo&&cr.hostVersionsInfo.adaptiveCardSchemaVersion&&!Rn(cr.hostVersionsInfo.adaptiveCardSchemaVersion);return Jr(cr)&&void 0!==(e&&cr.supports.dialog&&cr.supports.dialog.card&&cr.supports.dialog.card.bot)}function vi(e,t){if(Jr(cr,un.content,un.sidePanel,un.meetingStage),!wi())throw hn;const n=di(e);Rc(er(ii,"dialog.adaptiveCard.open"),"tasks.startTask",[n],(e,n)=>{null==t||t({err:e,result:n})})}function wi(){const e=cr.hostVersionsInfo&&cr.hostVersionsInfo.adaptiveCardSchemaVersion&&!Rn(cr.hostVersionsInfo.adaptiveCardSchemaVersion);return Jr(cr)&&void 0!==(e&&cr.supports.dialog&&cr.supports.dialog.card)}function Ci(){Os(er(ii,"dialog.registerMessageForChildHandler"),"messageForChild",gi,!1)}function yi(){return!(!Jr(cr)||!cr.supports.dialog)}const Si="v2";var bi,Ai;!function(e){e[e.ifRoom=0]="ifRoom",e[e.overflowOnly=1]="overflowOnly"}(bi||(bi={}));class Ei{constructor(){this.enabled=!0,this.selected=!1}}let Ii,Pi,Ti,Oi,Ri;function Fi(){Os(er(Si,"menus.registerNavBarMenuItemPressHandler"),"navBarMenuItemPress",Ni,!1),Os(er(Si,"menus.registerActionMenuItemPressHandler"),"actionMenuItemPress",Ui,!1),Os(er(Si,"menus.registerSetModuleViewHandler"),"setModuleView",Mi,!1)}function ki(e,t){if(Jr(cr),!Li())throw hn;Ti=t,Rc(er(Si,"menus.setUpViews"),"setUpViews",[e])}function Mi(e){Ti&&Ti(e)||(Jr(cr),Rc(er(Si,"menus.handleViewConfigItemPress"),"viewConfigItemPress",[e]))}function xi(e,t){if(Jr(cr),!Li())throw hn;Ii=t,Rc(er(Si,"menus.setNavBarMenu"),"setNavBarMenu",[e])}function Ni(e){Ii&&Ii(e)||(Jr(cr),Rc(er(Si,"menus.handleNavBarMenuItemPress"),"handleNavBarMenuItemPress",[e]))}function Di(e,t){if(Jr(cr),!Li())throw hn;Pi=t,Rc(er(Si,"menus.showActionMenu"),"showActionMenu",[e])}function Ui(e){Pi&&Pi(e)||(Jr(cr),Rc(er(Si,"menus.handleActionMenuItemPress"),"handleActionMenuItemPress",[e]))}function Li(){return!(!Jr(cr)||!cr.supports.menus)}function Hi(){Os(er(ns,"pages.config.registerSettingsSaveHandler"),"settings.save",qi,!1),Os(er(ns,"pages.config.registerSettingsRemoveHandler"),"settings.remove",Ji,!1)}function _i(e){return ds(er(ns,"pages.config.setValidityState"),e)}function Vi(e){return ps(er(ns,"pages.config.setConfig"),e)}function Bi(e){ji(er(ns,"pages.config.registerOnSaveHandler"),e,()=>{if(!co(e)&&!Qi())throw hn})}function ji(e,t,n){!co(t)&&Jr(cr,un.settings),n&&n(),Oi=t,!co(t)&&Rc(e,"registerHandler",["save"])}function Wi(e){zi(er(ns,"pages.config.registerOnRemoveHandler"),e,()=>{if(!co(e)&&!Qi())throw hn})}function zi(e,t,n){!co(t)&&Jr(cr,un.remove,un.settings),n&&n(),Ri=t,!co(t)&&Rc(e,"registerHandler",["remove"])}function qi(e){const t=new Gi(e);Oi?Oi(t):Ks()?nc("settings.save",[e]):t.notifySuccess()}function $i(e){ks(er(ns,"pages.config.registerChangeConfigHandler"),"changeSettings",e,[un.content],()=>{if(!Qi())throw hn})}!function(e){e.dropDown="dropDown",e.popOver="popOver"}(Ai||(Ai={}));class Gi{constructor(e){this.notified=!1,this.result=e||{}}notifySuccess(){this.ensureNotNotified(),Rc(er(ns,"pages.saveEvent.notifySuccess"),"settings.save.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),Rc(er(ns,"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 Ji(){const e=new Ki;Ri?Ri(e):Ks()?nc("settings.remove",[]):e.notifySuccess()}class Ki{constructor(){this.notified=!1}notifySuccess(){this.ensureNotNotified(),Rc(er(ns,"pages.removeEvent.notifySuccess"),"settings.remove.success"),this.notified=!0}notifyFailure(e){this.ensureNotNotified(),Rc(er(ns,"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 Qi(){return!(!Jr(cr)||!cr.supports.pages)&&!!cr.supports.pages.config}class Zi{}class Xi extends Zi{validate(e){return!0}deserialize(e){return e}}var Yi=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 ea=6e4,ta=Yn("app");function na(e,t){if(Nn()){return ta.extend("initialize")("window object undefined at initialization"),Promise.resolve()}return Tn(()=>la(e,t),ea,new Error("SDK initialization timed out."))}function ra(e){Rc(e,Oo.AppLoaded,[Ar])}function oa(e,t){Rc(e,Oo.ExpectedFailure,[t.reason,t.message])}function ia(e,t){Rc(e,Oo.Failure,[t.reason,t.message,t.authHeader])}function aa(e){return Yi(this,void 0,void 0,function*(){if(Jn.initializeCompleted)return ca(e);if(!Jn.initializePromise)throw new Error(ct);return Jn.initializePromise.then(()=>ca(e))})}function sa(){var e;return Jr(cr)&&!!(null===(e=cr.supports.app)||void 0===e?void 0:e.notifySuccessResponse)}function ca(e){return Yi(this,void 0,void 0,function*(){return sa()?Ec(Oo.Success,[Ar],new Xi,e).then(()=>({hasFinishedSuccessfully:!0})):(Rc(e,Oo.Success,[Ar]),{hasFinishedSuccessfully:"unknown"})})}const ua=ta.extend("initializeHelper");function la(e,t){return new Promise(n=>{Jn.initializeCalled||(Jn.initializeCalled=!0,Es(),Jn.initializePromise=mc(t,e).then(({context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r=Ge})=>{Jn.frameContext=e,Jn.hostClientType=t,Jn.clientSupportedSDKVersion=r;try{ua("Parsing %s",n);let e=JSON.parse(n);if(ua("Checking if %o is a valid runtime object",null!=e?e:"null"),!e||!e.apiVersion)throw new Error("Received runtime config is invalid");e=qn(e),n&&Sr(e)}catch(e){if(!(e instanceof SyntaxError))throw e;try{ua("Attempting to parse %s as an SDK version",n),isNaN(Sn(n,Ge))||(Jn.clientSupportedSDKVersion=n);let e=JSON.parse(r);if(ua("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=qn(e),Sr(e)}catch(e){if(!(e instanceof SyntaxError))throw e;Sr(Cr(Jn.clientSupportedSDKVersion,ur,mr))}}Jn.initializeCompleted=!0}),Fi(),Hi(),Ci()),Array.isArray(t)&&Xr(t),void 0!==Jn.initializePromise?n(Jn.initializePromise):ua("GlobalVars.initializePromise is unexpectedly undefined")})}function da(e,t){!co(t)&&Gr(),Ms(e,t)}function fa(e,t){!co(t)&&Gr(),xs(e,t)}function pa(e,t){return new Promise(n=>{Jr(cr,un.content,un.sidePanel,un.settings,un.task,un.stage,un.meetingStage),n(Cc(e,"executeDeepLink",t))})}var ga=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 ha=[];const ma=Yn("validateOrigin");let va;function wa(){return ga(this,void 0,void 0,function*(){va||(yield ya())})}function Ca(){return 0===ha.length}function ya(e=!1){return ga(this,void 0,void 0,function*(){if(!Ca()&&!e)return ha;if(va)return va;if(Nn())return ha=rt,rt;{ma("Initiating fetch call to acquire valid origins list from CDN");const e=new AbortController,t=setTimeout(()=>e.abort(),ot);return va=fetch(it,{signal:e.signal}).then(e=>{if(clearTimeout(t),!e.ok)throw new Error("Invalid Response from Fetch Call");return ma("Fetch call completed and retrieved valid origins list from CDN"),e.json().then(e=>{if(Sa(JSON.stringify(e)))return ha=e.validOrigins,ha;throw new Error("Valid origins list retrieved from CDN is invalid")})}).catch(e=>("AbortError"===e.name?ma(`validOrigins fetch call to CDN failed due to Timeout of ${ot} ms. Defaulting to fallback list`):ma("validOrigins fetch call to CDN failed with error: %s. Defaulting to fallback list",e),ha=rt,ha)),va}})}function Sa(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 ma("isValidOriginsFromCDN call failed to validate origin: %s",e),!1}return!0}function ba(e,t){let n;try{const t=Wr(e,ma);if(!t)return!1;n=t}catch(e){return!1}return n.test(t)}function Aa(e,t){const n=t||Ca()?rt:ha;return Ea(e,n)?Promise.resolve(!0):(ma("Origin %s is not in the local valid origins list, fetching from CDN",e),ya(t).then(t=>Ea(e,t)))}function Ea(e,t){for(const t of Jn.additionalValidOrigins)if(ba(t,e))return!0;const n=e.host;return Fn(e)?!!t.some(e=>Vr(e,n))||(ma("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,Jn.additionalValidOrigins),!1):(ma("Origin %s is invalid because it is not using https protocol. Protocol being used: %s",e,e.protocol),!1)}function Ia(e){ks(er(ns,"pages.appButton.onClick"),"appButtonClick",e,[un.content],()=>{if(!Oa())throw hn})}function Pa(e){ks(er(ns,"pages.appButton.onHoverEnter"),"appButtonHoverEnter",e,[un.content],()=>{if(!Oa())throw hn})}function Ta(e){ks(er(ns,"pages.appButton.onHoverLeave"),"appButtonHoverLeave",e,[un.content],()=>{if(!Oa())throw hn})}function Oa(){return!(!Jr(cr)||!cr.supports.pages)&&!!cr.supports.pages.appButton}function Ra(){Cs()}function Fa(){return os(er(ns,"pages.backStack.navigateBack"))}function ka(e){Ma(er(ns,"pages.backStack.registerBackButtonHandler"),e,()=>{if(!co(e)&&!xa())throw hn})}function Ma(e,t,n){!co(t)&&Jr(cr),n&&n(),ws(t),!co(t)&&Rc(e,"registerHandler",["backButton"])}function xa(){return!(!Jr(cr)||!cr.supports.pages)&&!!cr.supports.pages.backStack}function Na(e){return new Promise(t=>{if(Jr(cr,un.content,un.sidePanel,un.settings,un.task,un.stage,un.meetingStage),!Ua())throw hn;t(Sc(er(ns,"pages.currentApp.navigateTo"),"pages.currentApp.navigateTo",e))})}function Da(){return new Promise(e=>{if(Jr(cr,un.content,un.sidePanel,un.settings,un.task,un.stage,un.meetingStage),!Ua())throw hn;e(Sc(er(ns,"pages.currentApp.navigateToDefaultPage"),"pages.currentApp.navigateToDefaultPage"))})}function Ua(){return!(!Jr(cr)||!cr.supports.pages)&&!!cr.supports.pages.currentApp}function La(){if(Jr(cr,un.content),!_a())throw hn;Rc(er(ns,"pages.fullTrust.enterFullscreen"),"enterFullscreen",[])}function Ha(){if(Jr(cr,un.content),!_a())throw hn;Rc(er(ns,"pages.fullTrust.exitFullscreen"),"exitFullscreen",[])}function _a(){return!(!Jr(cr)||!cr.supports.pages)&&!!cr.supports.pages.fullTrust}function Va(e){return is(er(ns,"pages.tabs.navigateToTab"),e)}function Ba(e){return ss(er(ns,"pages.tabs.getTabInstances"),e)}function ja(e){return cs(er(ns,"pages.tabs.getMruTabInstances"),e)}function Wa(){return!(!Jr(cr)||!cr.supports.pages)&&!!cr.supports.pages.tabs}var za,qa;function $a(e){const t=er(ns,"pages.returnFocus");if(Jr(cr),!ts())throw hn;if(void 0===e&&Rc(t,"returnFocus",[!1]),"boolean"==typeof e)Rc(t,"returnFocus",[e]);else switch(e){case qa.PreviousLandmark:case qa.GoToActivityFeed:Rc(t,"returnFocus",[!1,e]);break;case qa.NextLandmark:Rc(t,"returnFocus",[!0,e])}}function Ga(e){ks(er(ns,"pages.registerFocusEnterHandler"),"focusEnter",e,[],()=>{if(!ts())throw hn})}function Ja(e){ls(er(ns,"pages.setCurrentFrame"),e)}function Ka(e,t,n){wa(),na(er(ns,"pages.initializeWithFrameContext"),n).then(()=>t&&t()),Ja(e)}function Qa(){return fs(er(ns,"pages.getConfig."))}function Za(e){return rs(er(ns,"pages.navigateCrossDomain"),e)}function Xa(e){return new Promise(t=>{if(Jr(cr,un.content,un.sidePanel,un.settings,un.task,un.stage,un.meetingStage),!ts())throw hn;const n=er(ns,"pages.navigateToApp");if(cr.isLegacyTeams){t(Cc(n,"executeDeepLink",On(gs(e)?e:hs(e))))}else{t(Cc(n,"pages.navigateToApp",gs(e)?ms(e):e))}})}function Ya(e){return us(er(ns,"pages.shareDeepLink"),e)}function es(e){ks(er(ns,"pages.registerFullScreenHandler"),"fullScreenChange",e,[],()=>{if(!co(e)&&!ts())throw hn})}function ts(){return!(!Jr(cr)||!cr.supports.pages)}wa(),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.Read=2]="Read",e[e.Compose=3]="Compose"}(za||(za={})),function(e){e[e.PreviousLandmark=0]="PreviousLandmark",e[e.NextLandmark=1]="NextLandmark",e[e.GoToActivityFeed=2]="GoToActivityFeed"}(qa||(qa={}));const ns="v2";function rs(e,t){return new Promise(n=>{if(Jr(cr,un.content,un.sidePanel,un.settings,un.remove,un.task,un.stage,un.meetingStage),!ts())throw hn;n(yc(e,"navigateCrossDomain","Cross-origin navigation is only supported for URLs matching the pattern registered in the manifest.",t))})}function os(e){return new Promise(t=>{if(Jr(cr),!xa())throw hn;t(yc(e,"navigateBack","Back navigation is not supported in the current client or context."))})}function is(e,t){return new Promise(n=>{if(Jr(cr),!Wa())throw hn;n(yc(e,"navigateToTab","Invalid internalTabInstanceId and/or channelId were/was provided",t))})}function as(e,t){if(Jr(cr),!ts())throw hn;Rc(e,"returnFocus",[t])}function ss(e,t){return new Promise(n=>{if(Jr(cr),!Wa())throw hn;n(wc(e,"getTabInstances",t))})}function cs(e,t){return new Promise(n=>{if(Jr(cr),!Wa())throw hn;n(wc(e,"getMruTabInstances",t))})}function us(e,t){if(Jr(cr,un.content,un.sidePanel,un.meetingStage),!ts())throw hn;Rc(e,"shareDeepLink",[t.subPageId,t.subPageLabel,t.subPageWebUrl])}function ls(e,t){if(Jr(cr,un.content),!ts())throw hn;Rc(e,"setFrameContext",[t])}function ds(e,t){if(Jr(cr,un.settings,un.remove),!Qi())throw hn;Rc(e,"settings.setValidityState",[t])}function fs(e){return new Promise(t=>{if(Jr(cr,un.content,un.settings,un.remove,un.sidePanel),!ts())throw hn;t(wc(e,"settings.getSettings"))})}function ps(e,t){return new Promise(n=>{if(Jr(cr,un.content,un.settings,un.sidePanel),!Qi())throw hn;n(Cc(e,"settings.setSettings",t))})}function gs(e){return e.appId instanceof so}function hs(e){return Object.assign(Object.assign({},e),{appId:new so(e.appId),webUrl:e.webUrl?new URL(e.webUrl):void 0})}function ms(e){return Object.assign(Object.assign({},e),{appId:e.appId.toString(),webUrl:e.webUrl?e.webUrl.toString():void 0})}let vs;function ws(e){vs=e}function Cs(){Os(er(ns,"pages.backStack.registerBackButtonPressHandler"),"backButtonPress",ys,!1)}function ys(){vs&&vs()||(Ks()?nc("backButtonPress",[]):Fa())}var Ss=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 bs=Yn("handlers");class As{static initializeHandlers(){As.handlers.themeChange=Ns,As.handlers.contextChange=Ds,As.handlers.load=_s,As.handlers.beforeUnload=js,Cs()}static uninitializeHandlers(){As.handlers={},As.themeChangeHandler=null,As.beforeUnloadHandler=null,As.beforeSuspendOrTerminateHandler=null,As.resumeHandler=null,As.contextChangeHandler=null}}function Es(){As.initializeHandlers()}function Is(){As.uninitializeHandlers()}As.handlers={},As.themeChangeHandler=null,As.loadHandler=null,As.beforeUnloadHandler=null,As.beforeSuspendOrTerminateHandler=null,As.resumeHandler=null,As.hostToAppPerformanceMetricsHandler=null,As.contextChangeHandler=null;const Ps=bs.extend("callHandler");function Ts(e,t){const n=As.handlers[e];if(n){Ps("Invoking the registered handler for message %s with arguments %o",e,t);return[!0,n.apply(this,t)]}return Ks()?(nc(e,t),[!1,void 0]):(Ps("Handler for action message %s not found.",e),[!1,void 0])}function Os(e,t,n,r=!0,o=[]){n?(As.handlers[t]=n,r&&Rc(e,"registerHandler",[t,...o])):delete As.handlers[t]}function Rs(e){delete As.handlers[e]}function Fs(e){return null!=As.handlers[e]}function ks(e,t,n,r,o){n&&Jr(cr,...r),o&&o(),Os(e,t,n)}function Ms(e,t){As.themeChangeHandler=t,!co(t)&&Rc(e,"registerHandler",["themeChange"])}function xs(e,t){As.contextChangeHandler=t,!co(t)&&Rc(e,"registerHandler",["contextChange"])}function Ns(e){As.themeChangeHandler&&As.themeChangeHandler(e),Ks()&&nc("themeChange",[e])}function Ds(e){As.contextChangeHandler&&As.contextChangeHandler(e),Ks()&&nc("contextChange",[e])}function Us(e){As.hostToAppPerformanceMetricsHandler=e}function Ls(e){As.hostToAppPerformanceMetricsHandler&&As.hostToAppPerformanceMetricsHandler(e)}function Hs(e,t){As.loadHandler=t,!co(t)&&Rc(e,"registerHandler",["load"])}function _s(e){const t=Vs(e);As.resumeHandler?(As.resumeHandler(t),Ks()&&nc("load",[t])):As.loadHandler&&(As.loadHandler(e),Ks()&&nc("load",[e]))}function Vs(e){return{entityId:e.entityId,contentUrl:new URL(e.contentUrl)}}function Bs(e,t){As.beforeUnloadHandler=t,!co(t)&&Rc(e,"registerHandler",["beforeUnload"])}function js(){return Ss(this,void 0,void 0,function*(){const e=()=>{Rc(er("v2","handleBeforeUnload"),"readyToUnload",[])};As.beforeSuspendOrTerminateHandler?(yield As.beforeSuspendOrTerminateHandler(),Ks()?nc("beforeUnload"):e()):As.beforeUnloadHandler&&As.beforeUnloadHandler(e)||(Ks()?nc("beforeUnload"):e())})}function Ws(e){As.beforeSuspendOrTerminateHandler=e,!co(e)&&Rc(er("v2","registerBeforeSuspendOrTerminateHandler"),"registerHandler",["beforeUnload"])}function zs(e){As.resumeHandler=e,!co(e)&&Rc(er("v2","registerOnResumeHandler"),"registerHandler",["load"])}var qs=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 $s=Yn("childProxyingCommunication");class Gs{}function Js(){Gs.window=null,Gs.origin=null,Gs.messageQueue=[]}function Ks(){return!!Pr()&&!!Gs.window}function Qs(e,t){return!!Pr()&&(Gs.window&&!Gs.window.closed&&e!==Gs.window||(Gs.window=e,Gs.origin=t),Gs.window&&Gs.window.closed?(Gs.window=null,Gs.origin=null,!1):Gs.window===e)}function Zs(e,t,n,r){return qs(this,void 0,void 0,function*(){Gs.window===t&&(Hr(Gs.window,Gs.origin,Gs.messageQueue,"child"),Ys(e,n,r))})}Gs.messageQueue=[];const Xs=$s.extend("handleIncomingMessageFromChild");function Ys(e,t,n){if(void 0===e.data.id||void 0===e.data.func)return;const r=xr(e.data),[o,i]=Ts(r.func,r.args);if(o&&void 0!==i)return Xs("Handler called in response to message %s from child. Returning response from handler to child, action: %s.",Ur(r),r.func),void tc(r.id,r.uuid,Array.isArray(i)?i:[i]);Xs("No handler for message %s from child found; relaying message on to parent, action: %s. Relayed message will have a new id.",Ur(r),r.func),ec(r,t,n)}function ec(e,t,n){const r=t(er("v2","tasks.startTask"),e.func,e.args,!0,e.teamsJsInstanceId),o=Gs.origin;n(r.uuid,(...t)=>{if(!Gs.window)return;if(!Or().disableEnforceOriginMatchForChildResponses&&o!==Gs.origin)return void Xs("Origin of child window has changed, not sending response back to child window");const n=t.pop();Xs("Message from parent being relayed to child, id: %s",Ur(e)),tc(e.id,e.uuid,t,n)})}function tc(e,t,n,r){const o=Gs.window,i=rc(e,t,n,r),a=Dr(i),s=Gs.origin;o&&s&&(Xs("Sending message %s to %s via postMessage, args = %o",Ur(a),"child",a.args),o.postMessage(a,s))}function nc(e,t){const n=Gs.window,r=oc(e,t),o=Gs.origin;n&&o?n.postMessage(r,o):Gs.messageQueue.push(r)}function rc(e,t,n,r){return{id:e,uuid:t,args:n||[],isPartialResponse:r}}function oc(e,t){return{func:e,args:t||[]}}class ic{static storeCallbackInformation(e,t){ic.callbackInformation.set(e,t)}static clearMessages(){ic.callbackInformation.clear()}static deleteMessageInformation(e){ic.callbackInformation.delete(e)}static handleOneWayPerformanceMetrics(e,t,n){const r=e.monotonicTimestamp;r&&n?Ls({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=ic.callbackInformation.get(e);o&&t.monotonicTimestamp&&r?(Ls({actionName:o.name,messageDelay:r-t.monotonicTimestamp,requestStartedAt:o.calledAt}),ic.deleteMessageInformation(e)):n("Unable to send performance metrics for callback %s with arguments %o",e.toString(),t.args)}}ic.callbackInformation=new Map;const ac=Yn("nestedAppAuthUtils"),sc=ac.extend("tryPolyfillWithNestedAppAuthBridge"),cc="v2";function uc(e,t,n){var r;const o=sc;if(Jn.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=dc(a,n);s&&(a.nestedAppAuthBridge=s)}const lc=ac.extend("createNestedAppAuthBridge");function dc(e,t){const n=lc;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=er(cc,"nestedAppAuth.execute");o(e,r)},removeEventListener:(t,n)=>{e.removeEventListener(t,i(n))}}}var fc=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 pc=Yn("communication");class gc{}class hc{}function mc(e,t){if(hc.messageListener=e=>Lc(e),gc.currentWindow=gc.currentWindow||xn(),gc.parentWindow=gc.currentWindow.parent!==gc.currentWindow.self?gc.currentWindow.parent:gc.currentWindow.opener,gc.topWindow=gc.currentWindow.top,(gc.parentWindow||e)&&gc.currentWindow.addEventListener("message",hc.messageListener,!1),!gc.parentWindow){const e=gc.currentWindow;if(!e.nativeInterface)return Promise.reject(new Error("Initialization Failed. No Parent window found."));Jn.isFramelessWindow=!0,e.onNativeMessage=Gc}try{return gc.parentOrigin="*",bc(t,"initialize",[Ar,or,e]).then(([e,t,n,r])=>(uc(r,gc.currentWindow,{onMessage:_c,sendPostMessage:kc}),{context:e,clientType:t,runtimeConfig:n,clientSupportedSDKVersion:r}))}finally{gc.parentOrigin=null}}function vc(){gc.currentWindow&&gc.currentWindow.removeEventListener("message",hc.messageListener,!1),gc.currentWindow=null,gc.parentWindow=null,gc.parentOrigin=null,hc.parentMessageQueue=[],hc.nextMessageId=0,hc.callbacks.clear(),hc.promiseCallbacks.clear(),hc.portCallbacks.clear(),hc.legacyMessageIdsToUuidMap={},ic.clearMessages(),Js()}function wc(e,t,...n){return bc(e,t,n).then(([e])=>e)}function Cc(e,t,...n){return bc(e,t,n).then(([e,t])=>{if(!e)throw new Error(t)})}function yc(e,t,n,...r){return bc(e,t,r).then(([e,t])=>{if(!e)throw new Error(t||n)})}function Sc(e,t,...n){return bc(e,t,n).then(([e,t])=>{if(e)throw e;return t})}function bc(e,t,n=void 0){if(!tr(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(Oc(Dc(e,t,n).uuid))})}function Ac(e){return e.map(e=>br(e)?e.serialize():e)}function Ec(e,t,n,r,o){var i;return fc(this,void 0,void 0,function*(){const a=Ac(t),[s]=yield bc(r,e,a);if(o&&o(s)||!o&&qe(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(`${Le.INTERNAL_ERROR}, message: Invalid response from host - ${JSON.stringify(s)}`)})}function Ic(e,t,n,r){var o;return fc(this,void 0,void 0,function*(){const i=Ac(t),[a]=yield bc(n,e,i);if(r&&r(a)||!r&&qe(a))throw new Error(`${a.errorCode}, message: ${null!==(o=a.message)&&void 0!==o?o:"None"}`);if(void 0!==a)throw new Error(`${Le.INTERNAL_ERROR}, message: Invalid response from host`)})}function Pc(e,t,n=void 0){if(!tr(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 Tc(Dc(e,t,n).uuid)}function Tc(e){return new Promise((t,n)=>{hc.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 Oc(e){return new Promise(t=>{hc.promiseCallbacks.set(e,t)})}function Rc(e,t,n,r){let o;if(n instanceof Function?r=n:n instanceof Array&&(o=n),!tr(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=Dc(e,t,o);r&&hc.callbacks.set(i.uuid,r)}hc.parentMessageQueue=[],hc.topMessageQueue=[],hc.nextMessageId=0,hc.callbacks=new Map,hc.promiseCallbacks=new Map,hc.portCallbacks=new Map,hc.legacyMessageIdsToUuidMap={};const Fc=pc.extend("sendNestedAuthRequestToTopWindow");function kc(e,t){const n=Fc,r=gc.topWindow,o=tu(e,t);return n("Message %s information: %o",Ur(o),{actionName:o.func}),xc(r,o)}const Mc=pc.extend("sendRequestToTargetWindowHelper");function xc(e,t){const n=Mc,r=Xc(e),o=Mr(t);if(Jn.isFramelessWindow)gc.currentWindow&&gc.currentWindow.nativeInterface&&(n("Sending message %s to %s via framelessPostMessage interface",Ur(o),r),gc.currentWindow.nativeInterface.framelessPostMessage(JSON.stringify(o)));else{const i=Zc(e);e&&i?(n("Sending message %s to %s via postMessage",Ur(o),r),e.postMessage(o,i)):(n("Adding message %s to %s message queue",Ur(o),r),Qc(e).push(t))}return t}const Nc=pc.extend("sendMessageToParentHelper");function Dc(e,t,n,r,o){const i=Nc,a=gc.parentWindow,s=eu(e,t,n,r,o);return ic.storeCallbackInformation(s.uuid,{name:t,calledAt:s.timestamp}),i("Message %s information: %o",Ur(s),{actionName:t,args:n}),xc(a,s)}const Uc=pc.extend("processIncomingMessage");function Lc(e){return fc(this,void 0,void 0,function*(){if(!e||!e.data||"object"!=typeof e.data)return void Uc("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 Bc(t,n).then(r=>{r?(jc(t,n),t!==gc.parentWindow?Qs(t,n)&&Zs(e,t,Dc,(e,t)=>hc.callbacks.set(e,t)):Gc(e)):Uc("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 Hc=pc.extend("processAuthBridgeMessage");function _c(e,t){var n,r;const o=Hc;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?Bc(c,u)?(gc.topWindow&&!gc.topWindow.closed&&c!==gc.topWindow||(gc.topWindow=c,gc.topOrigin=u),gc.topWindow&&gc.topWindow.closed&&(gc.topWindow=null,gc.topOrigin=null),Hr(gc.topWindow,gc.topOrigin,hc.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 Vc=pc.extend("shouldProcessIncomingMessage");function Bc(e,t){return fc(this,void 0,void 0,function*(){if(gc.currentWindow&&e===gc.currentWindow)return Vc("Should not process message because it is coming from the current window"),!1;if(gc.currentWindow&&gc.currentWindow.location&&t&&t===gc.currentWindow.location.origin)return!0;{let e;try{e=new URL(t)}catch(e){return Vc("Message has an invalid origin of %s",t),!1}const n=yield Aa(e);return n||Vc("Message has an invalid origin of %s",t),n}})}function jc(e,t){Jn.isFramelessWindow||gc.parentWindow&&!gc.parentWindow.closed&&e!==gc.parentWindow||(gc.parentWindow=e,gc.parentOrigin=t),gc.parentWindow&&gc.parentWindow.closed&&(gc.parentWindow=null,gc.parentOrigin=null),Hr(gc.parentWindow,gc.parentOrigin,hc.parentMessageQueue,"parent")}const Wc=pc.extend("handleIncomingMessageFromParent");function zc(e){const t=Wc;if(!e.uuid)return hc.legacyMessageIdsToUuidMap[e.id];{const t=e.uuid,n=qc(hc.callbacks,t);if(n)return n;const r=qc(hc.promiseCallbacks,t);if(r)return r;const o=qc(hc.portCallbacks,t);if(o)return o}t("Received message %s that failed to produce a callbackId",Ur(e))}function qc(e,t){if(t){const n=[...e].find(([e,n])=>e.toString()===t.toString());if(n)return n[0]}}function $c(e,t){const n=qc(t,e.uuid);n&&t.delete(n),e.uuid?hc.legacyMessageIdsToUuidMap={}:delete hc.legacyMessageIdsToUuidMap[e.id]}function Gc(e){const t=Wc,n=Wn();if("id"in e.data&&"number"==typeof e.data.id){const r=e.data,o=Nr(r),i=zc(o);if(i){const r=hc.callbacks.get(i);t("Received a response from parent for message %s",i.toString()),ic.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]),Jc(e)||(t("Removing registered callback for message %s",i.toString()),$c(o,hc.callbacks)));const a=hc.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()),$c(o,hc.promiseCallbacks));const s=hc.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()),$c(o,hc.portCallbacks)}o.uuid&&(hc.legacyMessageIdsToUuidMap={})}}else if("func"in e.data&&"string"==typeof e.data.func){const r=e.data;ic.handleOneWayPerformanceMetrics(r,t,n),t('Received a message from parent %s, action: "%s"',Ur(r),r.func),Ts(r.func,r.args)}else t("Received an unknown message: %O",e)}function Jc(e){return!0===e.data.isPartialResponse}function Kc(){return gc.topWindow!==gc.parentWindow}function Qc(e){return e===gc.topWindow&&Kc()?hc.topMessageQueue:e===gc.parentWindow?hc.parentMessageQueue:[]}function Zc(e){return e===gc.topWindow&&Kc()?gc.topOrigin:e===gc.parentWindow?gc.parentOrigin:null}function Xc(e){return e===gc.topWindow&&Kc()?"top":e===gc.parentWindow?"parent":null}function Yc(e,t){let n;n=gc.currentWindow.setInterval(()=>{0===Qc(e).length&&(clearInterval(n),t())},100)}function eu(e,t,n,r,o){const i=hc.nextMessageId++,a=new $n;hc.legacyMessageIdsToUuidMap[i]=a;const s=!0===r?o:Jn.teamsJsInstanceId;return{id:i,uuid:a,func:t,timestamp:Date.now(),monotonicTimestamp:Wn(),args:n||[],apiVersionTag:e,isProxiedFromChild:null!=r&&r,teamsJsInstanceId:s}}function tu(e,t){const n=hc.nextMessageId++,r=new $n;return hc.legacyMessageIdsToUuidMap[n]=r,{id:n,uuid:r,func:"nestedAppAuth.execute",timestamp:Date.now(),monotonicTimestamp:Wn(),apiVersionTag:t,args:[],data:e}}const nu="v1";function ru(e){if(!co(e)&&Jr(cr),!co(e)&&!ou())throw hn;e?Os(er(nu,"log.request"),"log.request",()=>{const t=e();Rc(er(nu,"log.receive"),"log.receive",[t])}):Rs("log.request")}function ou(){return!(!Jr(cr)||!cr.supports.logs)}var iu,au,su;!function(e){e.fileDownloadStart="fileDownloadStart",e.fileDownloadComplete="fileDownloadComplete"}(iu||(iu={})),function(e){e.view="view",e.edit="edit",e.editNew="editNew"}(au||(au={})),function(e){e.fileOpenPreference="fileOpenPreference",e.theme="theme"}(su||(su={}));const cu="v1";function uu(e,t){Jr(cr),Rc(er(cu,"uploadCustomApp"),"uploadCustomApp",[e],t||yn())}function lu(e,t,n){Jr(cr),Rc(er(cu,"sendCustomMessage"),e,t,n)}function du(e,t){if(Jr(cr),!Ks())throw new Error("The child window has not yet been initialized or is not present");nc(e,t)}function fu(e,t){Jr(cr),Os(er(cu,"registerCustomHandler"),e,(...e)=>t.apply(this,e))}function pu(e,t){Jr(cr),Os(er(cu,"registerUserSettingsChangeHandler"),"userSettingsChange",t,!0,[e])}function gu(e){Jr(cr,un.content,un.sidePanel,un.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,e.messageId,e.callerInfo,e.atpData];Rc(er(cu,"openFilePreview"),"openFilePreview",t)}const hu="v1";function mu(e){return new Promise(t=>{if(Jr(cr,un.content),!Cu())throw hn;const n=Cc(er(hu,"conversations.openConversation"),"conversations.openConversation",{title:e.title,subEntityId:e.subEntityId,conversationId:e.conversationId,channelId:e.channelId,entityId:e.entityId});e.onStartConversation&&Os(er(hu,"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&&Os(er(hu,"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 vu(){if(Jr(cr,un.content),!Cu())throw hn;Rc(er(hu,"conversations.closeConversation"),"conversations.closeConversation"),Rs("startConversation"),Rs("closeConversation")}function wu(){return new Promise(e=>{if(Jr(cr),!Cu())throw hn;e(wc(er(hu,"conversations.getChatMember"),"getChatMembers"))})}function Cu(){return!(!Jr(cr)||!cr.supports.conversations)}var yu=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 Su="v2",bu=Yn("copilot");function Au(){var e;return Jr(cr)&&!!(null===(e=cr.supports.copilot)||void 0===e?void 0:e.customTelemetry)}function Eu(e,t){var n;return void 0===t&&(t=null!==(n=Wn())&&void 0!==n?n:Date.now()),yu(this,void 0,void 0,function*(){return Jr(cr),bu("Sending custom telemetry data to host for stage: %s to record timestamp: %s",e,t),Ic("copilot.customTelemetry.sendCustomTelemetryData",[e.toString(),t],er(Su,"copilot.customTelemetry.sendCustomTelemetryData"))})}var Iu=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};const Pu="v2",Tu=Yn("copilot");function Ou(){var e,t;return Jr(cr)&&(!!(null===(e=cr.hostVersionsInfo)||void 0===e?void 0:e.appEligibilityInformation)||!!(null===(t=cr.supports.copilot)||void 0===t?void 0:t.eligibility))}function Ru(e){var t,n,r;return Iu(this,void 0,void 0,function*(){if(Jr(cr),!Ou())throw new Error(`Error code: ${hn.errorCode}, message: Not supported on platform`);if((null===(t=cr.hostVersionsInfo)||void 0===t?void 0:t.appEligibilityInformation)&&!e)return Tu("Eligibility information is already available on runtime."),cr.hostVersionsInfo.appEligibilityInformation;Tu("Eligibility information is not available on runtime. Requesting from host.");const o=yield wc(er(Pu,"copilot.eligibility.getEligibilityInfo"),"copilot.eligibility.getEligibilityInfo",e);if(qe(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(!Fu(o))throw new Error("Error deserializing eligibility information");return"nonadult"===(null===(r=o.ageGroup)||void 0===r?void 0:r.toLowerCase())&&(o.ageGroup=Be.NotAdult),o})}function Fu(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 ku,Mu,xu,Nu,Du,Uu,Lu,Hu,_u;!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"}(ku||(ku={})),function(e){e.IMAGE="image",e.AUDIO="audio",e.VIDEO="video"}(Mu||(Mu={})),function(e){e.Private="Private",e.Shared="Shared",e.Recap="Recap",e.RecapCall="RecapCall",e.PrivateViewCall="PrivateViewCall",e.Chat="Chat",e.Compose="Compose"}(xu||(xu={})),function(e){e.ClientDeviceType="ClientDeviceType",e.ClientRing="ClientRing",e.ClientScenarioName="ClientScenarioName"}(Nu||(Nu={})),function(e){e.Enabled="enabled",e.Disabled="disabled",e.EnabledWithTranscript="enabledWithTranscript"}(Du||(Du={})),function(e){e.NotStarted="notStarted",e.Active="active",e.Inactive="inactive",e.UnknownFutureValue="unknownFutureValue"}(Uu||(Uu={})),function(e){e.Chat="Chat",e.Channel="Channel",e.Meeting="Meeting",e.MeetingChat="MeetingChat"}(Lu||(Lu={})),function(e){e.Accepted="accepted",e.NotAccepted="not_accepted"}(Hu||(Hu={})),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"}(_u||(_u={}));class Vu extends Error{constructor(e,t){super(t),this.errorCode=e,this.name="SidePanelError"}}var Bu=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 ju="v2";function Wu(){var e;return Jr(cr)&&!!(null===(e=cr.supports.copilot)||void 0===e?void 0:e.sidePanel)}function zu(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(_u).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)||qe(e)}function qu(e){return Bu(this,void 0,void 0,function*(){Jr(cr);return Ec("copilot.sidePanel.getContent",e?[new Zu(e)]:[],new Ku,er(ju,"copilot.sidePanel.getContent"),zu)})}function $u(e){return Bu(this,void 0,void 0,function*(){Jr(cr);return Ec("copilot.sidePanel.preCheckUserConsent",e?[new Xu(e)]:[],new Qu,er(ju,"copilot.sidePanel.preCheckUserConsent"),zu)})}function Gu(e){ks(er(ju,"copilot.sidePanel.registerUserActionContentSelect"),"copilot.sidePanel.userActionContentSelect",e,[un.content],()=>{if(!Wu())throw Ju})}const Ju=new Vu(_u.NotSupportedOnPlatform,"This API is not supported on the current platform.");class Ku extends Zi{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class Qu extends Zi{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class Zu{constructor(e){this.contentRequest=e}serialize(){return this.contentRequest}}class Xu{constructor(e){this.userConsentRequest=e}serialize(){return this.userConsentRequest}}var Yu=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 el="v2";function tl(){var e;return Jr(cr)&&!!(null===(e=cr.supports.copilot)||void 0===e?void 0:e.view)}function nl(){return Yu(this,void 0,void 0,function*(){Jr(cr),yield Ec("copilot.view.closeSidePanel",[],new rl,er(el,"copilot.view.closeSidePanel"))})}class rl extends Zi{validate(e){return!0}deserialize(e){return e}}const ol="v2";class il{constructor(e){this.invokeRequest=e}serialize(){return this.invokeRequest}}function al(e){const t=e;return t.responseType===ul.ActionExecuteInvokeResponse&&void 0!==t.value&&void 0!==t.statusCode&&void 0!==t.type}const sl="Action.Execute";var cl,ul,ll,dl;!function(e){e.ActionExecuteInvokeRequest="ActionExecuteInvokeRequest",e.QueryMessageExtensionRequest="QueryMessageExtensionRequest"}(cl||(cl={})),function(e){e.ActionExecuteInvokeResponse="ActionExecuteInvokeResponse",e.QueryMessageExtensionResponse="QueryMessageExtensionResponse"}(ul||(ul={}));class fl extends Zi{validate(e){return al(e)}deserialize(e){return e}}function pl(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(ll).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)}function gl(e){e.requestType===cl.ActionExecuteInvokeRequest?hl(e):e.requestType===cl.QueryMessageExtensionRequest&&ml(e)}function hl(e){if(e.type!==sl){throw{errorCode:ll.INTERNAL_ERROR,message:`Invalid action type ${e.type}. Action type must be "${sl}"`}}if(!zn(e.data)){throw{errorCode:ll.INTERNAL_ERROR,message:`Invalid data type ${typeof e.data}. Data must be a primitive or a plain object.`}}}function ml(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 vl(e,t,n){if(Jr(cr,un.content,un.sidePanel),!Tl())throw hn;const r=new so(e);return gl(n),bc(er(ol,"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 wl(e,t){if(Jr(cr,un.content,un.sidePanel),!Tl())throw hn;const n=new so(e);return bc(er(ol,"externalAppAuthentication.authenticateWithSSO"),"externalAppAuthentication.authenticateWithSSO",[n.toString(),t.claims,t.silent]).then(([e,t])=>{if(!e)throw t})}function Cl(e,t,n){if(Jr(cr,un.content,un.sidePanel),!Tl())throw hn;const r=new so(e);return gl(n),bc(er(ol,"externalAppAuthentication.authenticateWithSSOAndResendRequest"),"externalAppAuthentication.authenticateWithSSOAndResendRequest",[r.toString(),n,t.claims,t.silent]).then(([e,t])=>{if(e&&null!=t.responseType)return t;throw t})}function yl(e,t,n){if(Jr(cr,un.content,un.sidePanel),!Tl())throw hn;return Dn(e,new Error("titleId is Invalid.")),Dn(t,new Error("oauthConfigId is Invalid.")),bc(er(ol,"externalAppAuthentication.authenticateWithOauth2"),"externalAppAuthentication.authenticateWithOauth2",[e,t,n.width,n.height,n.isExternal]).then(([e,t])=>{if(!e)throw t})}function Sl(e,t,n){if(Jr(cr,un.content,un.sidePanel),!Tl())throw hn;return Dn(e,new Error("titleId is Invalid.")),t&&Un(t),bc(er(ol,"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"}(ll||(ll={}));class bl{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 Al(e){if(Jr(cr,un.content,un.sidePanel),!Tl())throw hn;return Dn(e.connectorId,new Error("connectorId is Invalid.")),Dn(e.oAuthConfigId,new Error("oauthConfigId is Invalid.")),Ic("externalAppAuthentication.authenticateWithConnector",[new bl(e)],er(ol,"externalAppAuthentication.authenticateWithConnector"),pl)}!function(e){e.Invalid="Invalid",e.Valid="Valid",e.Expired="Expired"}(dl||(dl={}));class El extends Zi{validate(e){return"string"==typeof e&&e in dl}deserialize(e){return e}}function Il(e){if(Jr(cr,un.content,un.sidePanel),!Tl())throw hn;return Dn(e.connectorId,new Error("connectorId is Invalid.")),Dn(e.oAuthConfigId,new Error("oAuthConfigId is Invalid.")),Ec("externalAppAuthentication.getUserAuthenticationStateForConnector",[new bl(e)],new El,er(ol,"externalAppAuthentication.getUserAuthenticationStateForConnector"),pl)}function Pl(e){if(Jr(cr,un.content,un.sidePanel),!Tl())throw hn;return Dn(e.connectorId,new Error("connectorId is Invalid.")),Dn(e.oAuthConfigId,new Error("oauthConfigId is Invalid.")),Ic("externalAppAuthentication.disconnectConnector",[new bl(e)],er(ol,"externalAppAuthentication.disconnectConnector"),pl)}function Tl(){return!(!Jr(cr)||!cr.supports.externalAppAuthentication)}var Ol=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 Rl="v2";function Fl(e,t,n){return Ol(this,void 0,void 0,function*(){if(Jr(cr,un.content,un.sidePanel),!Nl())throw hn;return Dl(e,t),Ic("externalAppAuthenticationForCEA.authenticateWithSSO",[e,t,n.authId,n.connectionName,n.claims,n.silent],er(Rl,"externalAppAuthenticationForCEA.authenticateWithSSO"),pl)})}function kl(e,t,n){return Ol(this,void 0,void 0,function*(){if(Jr(cr,un.content,un.sidePanel),!Nl())throw hn;return Dl(e,t),Ic("externalAppAuthenticationForCEA.authenticateWithOauth",[e,t,n.url.href,n.width,n.height,n.isExternal],er(Rl,"externalAppAuthenticationForCEA.authenticateWithOauth"),pl)})}function Ml(e,t,n,r){return Ol(this,void 0,void 0,function*(){if(Jr(cr,un.content,un.sidePanel),!Nl())throw hn;return Dl(e,t),hl(r),Ec("externalAppAuthenticationForCEA.authenticateAndResendRequest",[e,t,new il(r),n.url.href,n.width,n.height,n.isExternal],new fl,er(Rl,"externalAppAuthenticationForCEA.authenticateAndResendRequest"),pl)})}function xl(e,t,n,r){return Ol(this,void 0,void 0,function*(){if(Jr(cr,un.content,un.sidePanel),!Nl())throw hn;return Dl(e,t),hl(r),Ec("externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest",[e,t,new il(r),n.authId,n.connectionName,n.claims,n.silent],new fl,er(Rl,"externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest"),pl)})}function Nl(){return!(!Jr(cr)||!cr.supports.externalAppAuthenticationForCEA)}function Dl(e,t){Dn(t,new Error("conversation id is not valid.")),io(e)}const Ul="v2";var Ll,Hl;function _l(e,t){if(Jr(cr,un.content,un.sidePanel),!Bl())throw hn;const n=new so(e);return bc(er(Ul,"externalAppCardActions.processActionSubmit"),"externalAppCardActions.processActionSubmit",[n.toString(),t]).then(([e,t])=>{if(!e)throw t})}function Vl(e,t,n){if(Jr(cr,un.content,un.sidePanel),!Bl())throw hn;const r=new so(e);return bc(er(Ul,"externalAppCardActions.processActionOpenUrl"),"externalAppCardActions.processActionOpenUrl",[r.toString(),t.href,n]).then(([e,t])=>{if(e)throw e;return t})}function Bl(){return!(!Jr(cr)||!cr.supports.externalAppCardActions)}!function(e){e.DeepLinkDialog="DeepLinkDialog",e.DeepLinkOther="DeepLinkOther",e.DeepLinkStageView="DeepLinkStageView",e.GenericUrl="GenericUrl"}(Ll||(Ll={})),function(e){e.INTERNAL_ERROR="INTERNAL_ERROR",e.INVALID_LINK="INVALID_LINK",e.NOT_SUPPORTED="NOT_SUPPORTED"}(Hl||(Hl={}));var jl=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};const Wl="v2";function zl(e,t,n){return jl(this,void 0,void 0,function*(){if(Jr(cr,un.content,un.sidePanel),!$l())throw hn;Dl(e,t);const[r,o]=yield bc(er(Wl,"externalAppCardActionsForCEA.processActionOpenUrl"),"externalAppCardActionsForCEA.processActionOpenUrl",[e.toString(),t,n.href]);if(r)throw r;return o})}function ql(e,t,n){return jl(this,void 0,void 0,function*(){if(Jr(cr,un.content,un.sidePanel),!$l())throw hn;Dl(e,t);const r=yield wc(er(Wl,"externalAppCardActionsForCEA.processActionSubmit"),"externalAppCardActionsForCEA.processActionSubmit",e.toString(),t,n);if(r)throw r})}function $l(){return!(!Jr(cr)||!cr.supports.externalAppCardActionsForCEA)}var Gl;function Jl(e){if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(Gl).includes(t.errorCode)&&(void 0===t.message||"string"==typeof t.message)}!function(e){e.INTERNAL_ERROR="INTERNAL_ERROR"}(Gl||(Gl={}));var Kl=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 Ql="v2";function Zl(e,t,n){return Kl(this,void 0,void 0,function*(){if(Jr(cr,un.content,un.sidePanel),!Xl())throw hn;return Yl(e,n),Ic("externalAppCardActionsForDA.processActionOpenUrlDialog",[e,new ed(t),n],er(Ql,"externalAppCardActionsForDA.processActionOpenUrlDialog"),Jl)})}function Xl(){return!(!Jr(cr)||!cr.supports.externalAppCardActionsForDA)}function Yl(e,t){io(e),Gn(t)}class ed{constructor(e){this.info=e}serialize(){const{url:e,title:t,size:n}=this.info;return{url:e.href,title:t,size:n}}}var td=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 nd="v2";function rd(e,t,n){return td(this,void 0,void 0,function*(){if(Jr(cr,un.content,un.sidePanel),!od())throw hn;const r=new so(e),[o,i]=yield bc(er(nd,"externalAppCommands.processActionCommand"),"externalAppCommands.processActionCommand",[r.toString(),t,n]);if(o)throw o;return i})}function od(){return!(!Jr(cr)||!cr.supports.externalAppCommands)}const id="v1";var ad,sd,cd,ud,ld,dd;function fd(e,t){if(Jr(cr,un.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");Rc(er(id,"files.getCloudStorageFolders"),"files.getCloudStorageFolders",[e],t)}function pd(e,t){if(Jr(cr,un.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");Rc(er(id,"files.addCloudStorageFolder"),"files.addCloudStorageFolder",[e],t)}function gd(e,t,n){if(Jr(cr,un.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");Rc(er(id,"files.deleteCloudStorageFolder"),"files.deleteCloudStorageFolder",[e,t],n)}function hd(e,t,n){if(Jr(cr,un.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");Rc(er(id,"files.getCloudStorageFolderContents"),"files.getCloudStorageFolderContents",[e,t],n)}function md(e,t,n){if(Jr(cr,un.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");Rc(er(id,"files.openCloudStorageFile"),"files.openCloudStorageFile",[e,t,n])}function vd(e=!1,t){if(Jr(cr,un.content),!t)throw new Error("[files.getExternalProviders] Callback cannot be null");Rc(er(id,"files.getExternalProviders"),"files.getExternalProviders",[e],t)}function wd(e,t,n,r,o=!1,i){if(Jr(cr,un.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");Rc(er(id,"files.copyMoveFiles"),"files.copyMoveFiles",[e,t,n,r,o],i)}function Cd(e){if(Jr(cr,un.content),!e)throw new Error("[files.getFileDownloads] Callback cannot be null");Rc(er(id,"files.getFileDownloads"),"files.getFileDownloads",[],e)}function yd(e=void 0,t){if(Jr(cr,un.content),!t)throw new Error("[files.openDownloadFolder] Callback cannot be null");Rc(er(id,"files.openDownloadFolder"),"files.openDownloadFolder",[e],t)}function Sd(e){if(Jr(cr,un.content),!e)throw Fd(Le.INVALID_ARGUMENTS,"[files.addCloudStorageProvider] callback cannot be null");Rc(er(id,"files.addCloudStorageProvider"),"files.addCloudStorageProvider",[],e)}function bd(e,t){if(Jr(cr,un.content),!t)throw Fd(Le.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] callback cannot be null");if(!e||!e.content)throw Fd(Le.INVALID_ARGUMENTS,"[files.removeCloudStorageProvider] 3P cloud storage provider request content is missing");Rc(er(id,"files.removeCloudStorageProvider"),"files.removeCloudStorageProvider",[e],t)}function Ad(e,t){if(Jr(cr,un.content),!t)throw Fd(Le.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw Fd(Le.INVALID_ARGUMENTS,"[files.addCloudStorageProviderFile] 3P cloud storage provider request content is missing");Rc(er(id,"files.addCloudStorageProviderFile"),"files.addCloudStorageProviderFile",[e],t)}function Ed(e,t){if(Jr(cr,un.content),!t)throw Fd(Le.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] callback cannot be null");if(!e||!e.content)throw Fd(Le.INVALID_ARGUMENTS,"[files.renameCloudStorageProviderFile] 3P cloud storage provider request content is missing");Rc(er(id,"files.renameCloudStorageProviderFile"),"files.renameCloudStorageProviderFile",[e],t)}function Id(e,t){if(Jr(cr,un.content),!t)throw Fd(Le.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw Fd(Le.INVALID_ARGUMENTS,"[files.deleteCloudStorageProviderFile] 3P cloud storage provider request content details are missing");Rc(er(id,"files.deleteCloudStorageProviderFile"),"files.deleteCloudStorageProviderFile",[e],t)}function Pd(e,t){if(Jr(cr,un.content),!t)throw Fd(Le.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw Fd(Le.INVALID_ARGUMENTS,"[files.downloadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");Rc(er(id,"files.downloadCloudStorageProviderFile"),"files.downloadCloudStorageProviderFile",[e],t)}function Td(e,t){if(Jr(cr,un.content),!t)throw Fd(Le.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] callback cannot be null");if(!(e&&e.content&&e.content.itemList&&e.content.itemList.length>0))throw Fd(Le.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] 3P cloud storage provider request content details are missing");if(!e.content.destinationFolder)throw Fd(Le.INVALID_ARGUMENTS,"[files.uploadCloudStorageProviderFile] Invalid destination folder details");Rc(er(id,"files.uploadCloudStorageProviderFile"),"files.uploadCloudStorageProviderFile",[e],t)}function Od(e){if(Jr(cr),!e)throw new Error("[registerCloudStorageProviderListChangeHandler] Handler cannot be null");Os(er(id,"files.registerCloudStorageProviderListChangeHandler"),"files.cloudStorageProviderListChange",e)}function Rd(e){if(Jr(cr),!e)throw new Error("[registerCloudStorageProviderContentChangeHandler] Handler cannot be null");Os(er(id,"files.registerCloudStorageProviderContentChangeHandler"),"files.cloudStorageProviderContentChange",e)}function Fd(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"}(ad||(ad={})),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"}(sd||(sd={})),function(e){e.ClassMaterials="classMaterials"}(cd||(cd={})),function(e){e.Readonly="readonly"}(ud||(ud={})),function(e){e.Downloaded="Downloaded",e.Downloading="Downloading",e.Failed="Failed"}(ld||(ld={})),function(e){e.Download="DOWNLOAD",e.Upload="UPLOAD",e.Delete="DELETE"}(dd||(dd={}));const kd="v1";function Md(){return new Promise(e=>{if(Jr(cr),!Ud())throw hn;e(Sc(er(kd,"meetingRoom.getPairedMeetingRoomInfo"),"meetingRoom.getPairedMeetingRoomInfo"))})}function xd(e){return new Promise(t=>{if(!e||0==e.length)throw new Error("[meetingRoom.sendCommandToPairedMeetingRoom] Command name cannot be null or empty");if(Jr(cr),!Ud())throw hn;t(Sc(er(kd,"meetingRoom.sendCommandToPairedMeetingRoom"),"meetingRoom.sendCommandToPairedMeetingRoom",e))})}function Nd(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler] Handler cannot be null");if(Jr(cr),!Ud())throw hn;Os(er(kd,"meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler"),"meetingRoom.meetingRoomCapabilitiesUpdate",t=>{Jr(cr),e(t)})}function Dd(e){if(!e)throw new Error("[meetingRoom.registerMeetingRoomStatesUpdateHandler] Handler cannot be null");if(Jr(cr),!Ud())throw hn;Os(er(kd,"meetingRoom.registerMeetingRoomStatesUpdateHandler"),"meetingRoom.meetingRoomStatesUpdate",t=>{Jr(cr),e(t)})}function Ud(){return!(!Jr(cr)||!cr.supports.meetingRoom)}function Ld(){return!(!Jr(cr)||!cr.supports.messageChannels)}const Hd="1.0.1",_d={onMessage:function(e,t){if(!e||!e.data||"object"!=typeof e.data||null===e.data)return void Gd("Invalid message format, ignoring. Message: %o",e);if(!zd(e.source,e.origin))return void Gd("Message source/origin not allowed, ignoring.");const{args:n}=e.data,[,r]=null!=n?n:[],o=(()=>{try{return JSON.parse(r)}catch(e){return Jd("Failed to parse response message:",e),null}})();if(!o||"NestedAppAuthResponse"!==o.messageType)return void Gd("Invalid response format, ignoring. Message: %o",e);t(r)}};let Vd=null,Bd=!1;function jd(e,t,n=!1){if(Bd=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.`);Vd=e.origin}catch(e){throw new Error(`Failed to initialize bridge: invalid top origin: ${t}`)}const r=e;if(r.nestedAppAuthBridge)return void Gd("Nested App Auth Bridge is already present");const o=Wd(r);o&&(r.nestedAppAuthBridge=o)}function Wd(e){const t=new WeakMap,{onMessage:n}=_d,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 Gd(`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=qd(t);if(e===e.top||!Vd)return void Jd("Not in an embedded iframe; skipping postMessage.");e.top.postMessage(n,Vd)}}catch(e){return void Jd("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 zd(e,t){if(t===Vd)try{return"https:"===new URL(t).protocol}catch(e){return Jd("Invalid message origin URL:",e),!1}return!1}function qd(e){const t=Date.now();return{id:$d(),uuid:rn(),func:"nestedAppAuth.execute",timestamp:t,apiVersionTag:"v2_nestedAppAuth.execute",monotonicTimestamp:t,args:[],data:e}}function $d(){return"undefined"!=typeof crypto&&crypto.randomUUID?crypto.randomUUID():Math.random().toString(36).substring(2,11)}function Gd(...e){Bd&&console.log(...e)}function Jd(...e){Bd&&console.error(...e)}const Kd="v1";function Qd(e){if(Jr(cr,un.content),!Zd())throw hn;Rc(er(Kd,"notifications.showNotification"),"notifications.showNotification",[e])}function Zd(){return!(!Jr(cr)||!cr.supports.notifications)}const Xd="v2";function Yd(e){if(!nf())throw new Error(Le.NOT_SUPPORTED_ON_PLATFORM.toString());if(co(e))throw new Error(Le.INVALID_ARGUMENTS.toString());Os(er(Xd,"otherApp.install"),"otherApp.install",e)}function ef(){if(!nf())throw new Error(Le.NOT_SUPPORTED_ON_PLATFORM.toString());Rc(er(Xd,"otherApp.unregisterInstall"),"otherApp.unregisterInstall"),Rs("otherApp.install")}function tf(e){if(!nf())throw new Error(Le.NOT_SUPPORTED_ON_PLATFORM.toString());return Ic("otherApp.notifyInstallCompleted",[e.toString()],er(Xd,"otherApp.notifyInstallCompleted"))}function nf(){return!(!Jr(cr)||!cr.supports.otherAppStateChange)}const rf="v1";var of,af,sf;function cf(e){if(!e)throw new Error("[remoteCamera.getCapableParticipants] Callback cannot be null");if(Jr(cr,un.sidePanel),!mf())throw hn;Rc(er(rf,"remoteCamera.getCapableParticipants"),"remoteCamera.getCapableParticipants",e)}function uf(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(cr,un.sidePanel),!mf())throw hn;Rc(er(rf,"remoteCamera.requestControl"),"remoteCamera.requestControl",[e],t)}function lf(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(cr,un.sidePanel),!mf())throw hn;Rc(er(rf,"remoteCamera.sendControlCommand"),"remoteCamera.sendControlCommand",[e],t)}function df(e){if(!e)throw new Error("[remoteCamera.terminateSession] Callback cannot be null");if(Jr(cr,un.sidePanel),!mf())throw hn;Rc(er(rf,"remoteCamera.terminateSession"),"remoteCamera.terminateSession",e)}function ff(e){if(!e)throw new Error("[remoteCamera.registerOnCapableParticipantsChangeHandler] Handler cannot be null");if(Jr(cr,un.sidePanel),!mf())throw hn;Os(er(rf,"remoteCamera.registerOnCapableParticipantsChangeHandler"),"remoteCamera.capableParticipantsChange",e)}function pf(e){if(!e)throw new Error("[remoteCamera.registerOnErrorHandler] Handler cannot be null");if(Jr(cr,un.sidePanel),!mf())throw hn;Os(er(rf,"remoteCamera.registerOnErrorHandler"),"remoteCamera.handlerError",e)}function gf(e){if(!e)throw new Error("[remoteCamera.registerOnDeviceStateChangeHandler] Handler cannot be null");if(Jr(cr,un.sidePanel),!mf())throw hn;Os(er(rf,"remoteCamera.registerOnDeviceStateChangeHandler"),"remoteCamera.deviceStateChange",e)}function hf(e){if(!e)throw new Error("[remoteCamera.registerOnSessionStatusChangeHandler] Handler cannot be null");if(Jr(cr,un.sidePanel),!mf())throw hn;Os(er(rf,"remoteCamera.registerOnSessionStatusChangeHandler"),"remoteCamera.sessionStatusChange",e)}function mf(){return!(!Jr(cr)||!cr.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"}(of||(of={})),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"}(af||(af={})),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"}(sf||(sf={}));const vf="v1";function wf(e,t,n,r){if(Jr(cr,un.content),!Cf())throw hn;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");Rc(er(vf,"appEntity.selectAppEntity"),"appEntity.selectAppEntity",[e,t,n],r)}function Cf(){return!(!Jr(cr)||!cr.supports.appEntity)}const yf="v1";function Sf(e){return new Promise(t=>{if(Jr(cr),!bf())throw hn;if((Jn.hostClientType===sn.android||Jn.hostClientType===sn.teamsRoomsAndroid||Jn.hostClientType===sn.teamsPhones||Jn.hostClientType===sn.teamsDisplays)&&!Kr(Ze)){const e={errorCode:Le.OLD_PLATFORM};throw new Error(JSON.stringify(e))}t(wc(er(yf,"teams.fullTrust.joinedTeams.getUserJoinedTeams"),"getUserJoinedTeams",e))})}function bf(){return!(!Jr(cr)||!cr.supports.teams)&&(!!cr.supports.teams.fullTrust&&!!cr.supports.teams.fullTrust.joinedTeams)}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())})};const Ef="v1";function If(e){return Af(this,void 0,void 0,function*(){if(Jr(cr),!Pf())throw hn;return Ec("getConfigSetting",[e],new Xi,er(Ef,"teams.fullTrust.getConfigSetting"))})}function Pf(){return!(!Jr(cr)||!cr.supports.teams)&&!!cr.supports.teams.fullTrust}const Tf="v1";var Of;function Rf(e,t){if(Jr(cr,un.content),!kf())throw hn;if(!e)throw new Error("[teams.getTeamChannels] groupId cannot be null or empty");if(!t)throw new Error("[teams.getTeamChannels] Callback cannot be null");Rc(er(Tf,"teams.getTeamChannels"),"teams.getTeamChannels",[e],t)}function Ff(e,t){if(Jr(cr),!kf())throw hn;if(!e)throw new Error("[teams.refreshSiteUrl] threadId cannot be null or empty");if(!t)throw new Error("[teams.refreshSiteUrl] Callback cannot be null");Rc(er(Tf,"teams.refreshSiteUrl"),"teams.refreshSiteUrl",[e],t)}function kf(){return!(!Jr(cr)||!cr.supports.teams)}!function(e){e[e.Regular=0]="Regular",e[e.Private=1]="Private",e[e.Shared=2]="Shared"}(Of||(Of={}));class Mf{static setTimeout(e,t){const n=performance.now(),r=bn();return Mf.setTimeoutCallbacks[r]={callback:e,timeoutInMs:t,startedAtInMs:n},r}static clearTimeout(e){delete Mf.setTimeoutCallbacks[e]}static setInterval(e,t){Mf.setTimeout(function n(){e(),Mf.setTimeout(n,t)},t)}static tick(){const e=performance.now(),t=[];for(const n in Mf.setTimeoutCallbacks){const r=Mf.setTimeoutCallbacks[n];e-r.startedAtInMs>=r.timeoutInMs&&t.push(n)}for(const e of t){Mf.setTimeoutCallbacks[e].callback(),delete Mf.setTimeoutCallbacks[e]}}}Mf.setTimeoutCallbacks={};class xf{constructor(e,t){this.reportStatisticsResult=t,this.sampleCount=0,this.distributionBins=new Uint32Array(e)}processStarts(e,t,n,r){Mf.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&&Mf.clearTimeout(this.timeoutId),this.timeoutId=Mf.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(xf.maxSessionTimeoutInMs,2*t.timeoutInMs):xf.initialSessionTimeoutInMs}}xf.initialSessionTimeoutInMs=1e3,xf.maxSessionTimeoutInMs=3e4;const Nf="v2";class Df{constructor(e){this.reportPerformanceEvent=e,this.isFirstFrameProcessed=!1,this.frameProcessTimeLimit=100,this.frameProcessingStartedAt=0,this.frameProcessingTimeCost=0,this.processedFrameCount=0,this.performanceStatistics=new xf(Df.distributionBinSize,e=>this.reportPerformanceEvent(er(Nf,"videoPerformanceMonitor.performanceDataGenerated"),"video.performance.performanceDataGenerated",[e]))}startMonitorSlowFrameProcessing(){Mf.setInterval(()=>{if(0===this.processedFrameCount)return;const e=this.frameProcessingTimeCost/this.processedFrameCount;e>this.frameProcessTimeLimit&&this.reportPerformanceEvent(er(Nf,"videoPerformanceMonitor.startMonitorSlowFrameProcessing"),"video.performance.frameProcessingSlow",[e]),this.frameProcessingTimeCost=0,this.processedFrameCount=0},Df.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){Mf.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(er(Nf,"videoPerformanceMonitor.reportFrameProcessed"),"video.performance.firstFrameProcessed",[Date.now(),this.appliedEffect.effectId,null===(e=this.appliedEffect)||void 0===e?void 0:e.effectParam])))}reportGettingTextureStream(e){this.gettingTextureStreamStartedAt=performance.now(),this.currentStreamId=e}reportTextureStreamAcquired(){if(void 0!==this.gettingTextureStreamStartedAt){const e=performance.now()-this.gettingTextureStreamStartedAt;this.reportPerformanceEvent(er(Nf,"videoPerformanceMonitor.reportTextureStreamAcquired"),"video.performance.textureStreamAcquired",[this.currentStreamId,e])}}}Df.distributionBinSize=1e3,Df.calculateFPSInterval=1e3;var Uf=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())})},Lf=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 Hf="v2",_f=Nn()?void 0:new Df(Rc);var Vf,Bf,jf;function Wf(e){if(Jr(cr,un.sidePanel),!Jf())throw hn;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(Os(er(Hf,"videoEffects.setFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",e=>null==_f?void 0:_f.setFrameProcessTimeLimit(e.timeLimit),!1),Yf())Kf(e.videoFrameHandler,e.config);else{if(!tp())throw hn;Zf(e.videoBufferHandler,e.config)}null==_f||_f.startMonitorSlowFrameProcessing()}function zf(e,t){if(Jr(cr,un.sidePanel),!Jf())throw hn;Rc(er(Hf,"videoEffects.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t])}function qf(e){if(Jr(cr,un.sidePanel),!Jf())throw hn;Os(er(Hf,"videoEffects.registerEffectParameterChangeHandler"),"video.effectParameterChange",pp(e,_f),!1),Rc(er(Hf,"videoEffects.registerForVideoEffect"),"video.registerForVideoEffect")}function $f(e){Rc(er(Hf,"videoEffects.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function Gf(e){Rc(er(Hf,"videoEffects.notifyError"),"video.notifyError",[e])}function Jf(){return Jr(cr)&&!!cr.supports.video&&(!!cr.supports.video.mediaStream||!!cr.supports.video.sharedFrame)}function Kf(e,t){if(Jr(cr,un.sidePanel),!Jf()||!Yf())throw hn;Os(er(Hf,"videoEffects.startVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",t=>Uf(this,void 0,void 0,function*(){const{streamId:n}=t,r=Qf(e,_f);yield op(n,r,Gf,_f)}),!1),Rc(er(Hf,"videoEffects.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[t])}function Qf(e,t){return n=>Uf(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 Zf(e,t){if(Jr(cr,un.sidePanel),!Jf()||!tp())throw hn;Os(er(Hf,"videoEffects.registerForVideoBufferHandler"),"video.newVideoFrame",t=>{if(t){const n=t.timestamp;null==_f||_f.reportStartFrameProcessing(t.width,t.height),e(Xf(t),()=>{null==_f||_f.reportFrameProcessed(),$f(n)},Gf)}},!1),Rc(er(Hf,"videoEffects.registerForVideoFrame"),"video.registerForVideoFrame",[t])}function Xf(e){if("videoFrameBuffer"in e)return e;{const{data:t}=e,n=Lf(e,["data"]);return Object.assign(Object.assign({},n),{videoFrameBuffer:t})}}function Yf(){var e;return Jr(cr,un.sidePanel)&&ep()&&!!(null===(e=cr.supports.video)||void 0===e?void 0:e.mediaStream)}function ep(){var e,t,n,r;return!(!(null===(t=null===(e=xn().chrome)||void 0===e?void 0:e.webview)||void 0===t?void 0:t.getTextureStream)||!(null===(r=null===(n=xn().chrome)||void 0===n?void 0:n.webview)||void 0===r?void 0:r.registerTextureStream))}function tp(){var e;return Jr(cr,un.sidePanel)&&!!(null===(e=cr.supports.video)||void 0===e?void 0:e.sharedFrame)}!function(e){e.NV12="NV12"}(Vf||(Vf={})),function(e){e.EffectChanged="EffectChanged",e.EffectDisabled="EffectDisabled"}(Bf||(Bf={})),function(e){e.InvalidEffectId="InvalidEffectId",e.InitializationFailure="InitializationFailure"}(jf||(jf={}));var np=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};const rp="v2";function op(e,t,n,r){var o,i;return np(this,void 0,void 0,function*(){const a=sp();!Nn()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),cp(yield ap(e,n,r),new up(n,t),a.writable)})}function ip(e,t,n,r){var o,i;return np(this,void 0,void 0,function*(){const a=sp();!Nn()&&(null===(i=null===(o=window.chrome)||void 0===o?void 0:o.webview)||void 0===i||i.registerTextureStream(e,a)),cp(yield ap(e,n,r),new fp(n,t),a.writable)})}function ap(e,t,n){return np(this,void 0,void 0,function*(){if(Nn())throw hn;const r=xn().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 sp(){if(Nn())throw hn;const e=window.MediaStreamTrackGenerator;if(!e)throw hn;return new e({kind:"video"})}function cp(e,t,n){new(0,xn().MediaStreamTrackProcessor)({track:e}).readable.pipeThrough(new TransformStream(t)).pipeTo(n)}class up{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.transform=(e,t)=>np(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 lp{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 dp{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 fp{constructor(e,t){this.notifyError=e,this.videoFrameHandler=t,this.shouldDiscardAudioInferenceResult=!1,this.transform=(e,t)=>np(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=>np(this,void 0,void 0,function*(){if(Nn())throw hn;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 lp(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 dp(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}}}),Os(er(rp,"videoEffectsUtils.transformerWithMetadata.constructor"),"video.mediaStream.audioInferenceDiscardStatusChange",({discardAudioInferenceResult:e})=>{this.shouldDiscardAudioInferenceResult=e})}}function pp(e,t){return(n,r)=>{null==t||t.reportApplyingVideoEffect(n||"",r),e(n,r).then(()=>{null==t||t.reportVideoEffectChanged(n||"",r),Rc(er(rp,"videoEffectsUtils.reportVideoEffectChanged"),"video.videoEffectReadiness",[!0,n,void 0,r])}).catch(e=>{const t=e in jf?e:jf.InitializationFailure;Rc(er(rp,"videoEffectsUtils.effectFailure"),"video.videoEffectReadiness",[!1,n,t,r])})}}var gp=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};const hp="v2",mp=2e3,vp=Nn()?void 0:new Df(Rc);var wp;function Cp(e){var t,n;if(!Pp())throw hn;if(!e.videoFrameHandler||!e.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(Jr(cr,un.sidePanel)){if(Os(er(hp,"videoEffectsEX.registerSetFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",e=>null==vp?void 0:vp.setFrameProcessTimeLimit(e),!1),null===(t=cr.supports.video)||void 0===t?void 0:t.mediaStream)Os(er(hp,"videoEffectsEX.registerStartVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",t=>gp(this,void 0,void 0,function*(){const{streamId:n,metadataInTexture:r}=t,o=vp?Sp(e.videoFrameHandler,vp):e.videoFrameHandler;r?yield ip(n,o,Op,vp):yield op(n,o,Op,vp)}),!1),Rc(er(hp,"videoEffectsEX.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[e.config]);else{if(!(null===(n=cr.supports.video)||void 0===n?void 0:n.sharedFrame))throw hn;Os(er(hp,"videoEffectsEx.registerNewVideoFrameHandler"),"video.newVideoFrame",t=>{if(t){null==vp||vp.reportStartFrameProcessing(t.width,t.height);const n=yp(),r=t.timestamp;e.videoBufferHandler(bp(t),()=>{n(),null==vp||vp.reportFrameProcessed(),Tp(r)},Op)}},!1),Rc(er(hp,"videoEffectsEx.registerForVideoFrame"),"video.registerForVideoFrame",[e.config])}null==vp||vp.startMonitorSlowFrameProcessing()}}function yp(){const e=setTimeout(()=>{Op(`Frame not processed in ${mp}ms`,wp.Warn)},mp);return function(){clearTimeout(e)}}function Sp(e,t){return n=>gp(this,void 0,void 0,function*(){const r=n.videoFrame;t.reportStartFrameProcessing(r.codedWidth,r.codedHeight);const o=yp(),i=yield e(n);return o(),t.reportFrameProcessed(),i})}function bp(e){return e.videoFrameBuffer=e.videoFrameBuffer||e.data,delete e.data,e}function Ap(e,t,n){if(Jr(cr,un.sidePanel),!Pp())throw hn;Rc(er(hp,"videoEffectsEx.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,t,n])}function Ep(e){if(Jr(cr,un.sidePanel),!Pp())throw hn;Os(er(hp,"videoEffectsEx.registerEffectParamterChangeHandler"),"video.effectParameterChange",pp(e,vp),!1),Rc(er(hp,"videoEffectsEx.registerForVideoEffect"),"video.registerForVideoEffect")}function Ip(e){if(Jr(cr,un.sidePanel),!Jf())throw hn;Rc(er(hp,"videoEffectsEx.updatePersonalizedEffects"),"video.personalizedEffectsChanged",[e])}function Pp(){return Jr(cr),Jf()}function Tp(e){Rc(er(hp,"videoEffectsEx.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}function Op(e,t=wp.Warn){Rc(er(hp,"videoEffectsEx.notifyError"),"video.notifyError",[e,t])}function Rp(e){if(Jr(cr),!Jf())throw hn;Op(e,wp.Fatal)}!function(e){e.Fatal="fatal",e.Warn="warn"}(wp||(wp={}));const Fp="v2";class kp extends Zi{validate(e){return"ConfigurableTab"===e.tabType}deserialize(e){return e}}class Mp{constructor(e){this.configurableTabInstance=e}serialize(){return this.configurableTabInstance}}class xp{constructor(e){this.hostEntityId=e}serialize(){return this.hostEntityId}}class Np extends Zi{validate(e){return"ConfigurableTab"===e.tabType||"StaticTab"===e.tabType}deserialize(e){return e}}class Dp{constructor(e){this.hostEntityTabInstance=e}serialize(){return this.hostEntityTabInstance}}class Up extends Zi{validate(e){const t=new Np;let n=!0;return e.allTabs&&e.allTabs.forEach(e=>{n||(n=t.validate(e))}),n}deserialize(e){return e}}function Lp(e,t){if(Jr(cr),!jp())throw new Error(`Error code: ${Le.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);if(Wp(e.threadId),t&&0===t.length)throw new Error(`Error code: ${Le.INVALID_ARGUMENTS}, message: App types cannot be an empty array`);return Ec("hostEntity.tab.addAndConfigure",[new xp(e),t],new Np,er(Fp,"hostEntity.tab.addAndConfigure"))}function Hp(e){if(Jr(cr),!jp())throw new Error(`Error code: ${Le.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return Wp(e.threadId),Ec("hostEntity.tab.getAll",[new xp(e)],new Up,er(Fp,"hostEntity.tab.getAll"))}function _p(e,t){if(Jr(cr),!jp())throw new Error(`Error code: ${Le.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return zp(e),Wp(t.threadId),Ec("hostEntity.tab.reconfigure",[new Mp(e),new xp(t)],new kp,er(Fp,"hostEntity.tab.reconfigure"))}function Vp(e,t){if(Jr(cr),!jp())throw new Error(`Error code: ${Le.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return zp(e),Wp(t.threadId),Ec("hostEntity.tab.rename",[new Mp(e),new xp(t)],new kp,er(Fp,"hostEntity.tab.rename"))}function Bp(e,t){if(Jr(cr),!jp())throw new Error(`Error code: ${Le.NOT_SUPPORTED_ON_PLATFORM}, message: Not supported on platform`);return Wp(t.threadId),zp(e),Ec("hostEntity.tab.remove",[new Dp(e),new xp(t)],new Xi,er(Fp,"hostEntity.tab.remove"))}function jp(){var e;return!!(Jr(cr)&&$p()&&(null===(e=cr.supports.hostEntity)||void 0===e?void 0:e.tab))}function Wp(e){if(!e||0==e.length)throw new Error(`Error code: ${Le.INVALID_ARGUMENTS}, message: ThreadId cannot be null or empty`)}function zp(e){if(!(null==e?void 0:e.internalTabInstanceId)||0===e.internalTabInstanceId.length)throw new Error(`Error code: ${Le.INVALID_ARGUMENTS}, message: TabId cannot be null or empty`)}var qp;function $p(){return!(!Jr(cr)||!cr.supports.hostEntity)}!function(e){e.edu="EDU",e.baseTownhall="BASE_TOWNHALL",e.streamingTownhall="STREAMING_TOWNHALL"}(qp||(qp={}));var Gp=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())})};const Jp="v2",Kp="Invalid store dialog size",Qp="No App Id present, but AppId needed to open AppDetail store",Zp="No Collection Id present, but CollectionId needed to open a store specific to a collection";function Xp(e){return Gp(this,void 0,void 0,function*(){rg();const{size:t}=null!=e?e:{};return Ic("store.openFullStore",[og(t)],er(Jp,"store.openFullStore"))})}function Yp(e){return Gp(this,void 0,void 0,function*(){rg();const{size:t,appId:n}=e;if(!(n instanceof so))throw new Error(Qp);return Ic("store.openAppDetail",[og(t),n],er(Jp,"store.openAppDetail"))})}function eg(e){return Gp(this,void 0,void 0,function*(){rg();const{size:t,appCapability:n,appMetaCapabilities:r,installationScope:o,filteredOutAppIds:i}=null!=e?e:{};return Ic("store.openInContextStore",[og(t),n,r,o,null==i?void 0:i.map(e=>e.toString())],er(Jp,"store.openInContextStore"))})}function tg(e){return Gp(this,void 0,void 0,function*(){rg();const{size:t,collectionId:n}=e;if(void 0===n)throw new Error(Zp);return Ic("store.openSpecificStore",[og(t),n],er(Jp,"store.openSpecificStore"))})}function ng(){return Jr(cr)&&!!cr.supports.store}function rg(){if(Jr(cr,un.content,un.sidePanel,un.meetingStage),!ng())throw hn}function og(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 ig=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 ag="v1",sg=Yn("widgetHosting");function cg(){return Jr(cr)&&!!cr.supports.widgetHosting}function ug(e,t){return ig(this,void 0,void 0,function*(){return Gr(),sg("Calling tool with widgetId and input: ",{widgetId:e,input:t}),Ec("widgetHosting.callTool",[new yg(e,t)],new wg,er(ag,"widgetHosting.callTool"),qe)})}function lg(e,t){return ig(this,void 0,void 0,function*(){return Gr(),sg("Sending follow-up message with widgetId and prompt: ",{widgetId:e,prompt:t.prompt}),Ic("widgetHosting.sendFollowUpMessage",[new Sg(e,t)],er(ag,"widgetHosting.sendFollowUpMessage"))})}function dg(e,t){return ig(this,void 0,void 0,function*(){return Gr(),sg("Requesting display mode with widgetId: ",{widgetId:e,mode:t.mode}),Ic("widgetHosting.requestDisplayMode",[new bg(e,t)],er(ag,"widgetHosting.requestDisplayMode"))})}function fg(e,t){return ig(this,void 0,void 0,function*(){return Gr(),sg("Requesting modal with widgetId and options: ",{widgetId:e,options:t}),Ec("widgetHosting.requestModal",[new Pg(e,t)],new Cg,er(ag,"widgetHosting.requestModal"),qe)})}function pg(e,t){Gr(),sg("Notifying intrinsic height with widgetId: ",{widgetId:e,height:t}),Ic("widgetHosting.notifyIntrinsicHeight",[new Ig(e,t)],er(ag,"widgetHosting.notifyIntrinsicHeight"))}function gg(e,t,n){Gr(),sg("Content size changed with widgetId: ",{widgetId:e,width:t,height:n}),Ic("widgetHosting.contentSizeChanged",[new Tg(e,t,n)],er(ag,"widgetHosting.contentSizeChanged"))}function hg(e,t){return ig(this,void 0,void 0,function*(){return Gr(),sg("Setting widget state with widgetId: ",{widgetId:e,state:t}),Ic("widgetHosting.setWidgetState",[new Eg(e,t)],er(ag,"widgetHosting.setWidgetState"))})}function mg(e,t){Gr(),sg("Opening external URL with widgetId: ",{widgetId:e,href:t.href}),Ic("widgetHosting.openExternal",[new Ag(e,t)],er(ag,"widgetHosting.openExternal"))}function vg(e){ks(er(ag,"widgetHosting.registerModalCloseHandler"),"widgetHosting.closeWidgetModal",e,[],()=>{if(!cg())throw new Error("Widget Hosting is not supported on this platform")})}class wg extends Zi{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class Cg extends Zi{validate(e){return null!==e&&"object"==typeof e}deserialize(e){return e}}class yg{constructor(e,t){this.widgetId=e,this.toolInput=t}serialize(){return{widgetId:this.widgetId,name:this.toolInput.name,arguments:this.toolInput.arguments}}}class Sg{constructor(e,t){this.widgetId=e,this.args=t}serialize(){return{widgetId:this.widgetId,prompt:this.args.prompt}}}class bg{constructor(e,t){this.widgetId=e,this.args=t}serialize(){return{widgetId:this.widgetId,mode:this.args.mode}}}class Ag{constructor(e,t){this.widgetId=e,this.payload=t}serialize(){return{widgetId:this.widgetId,href:this.payload.href}}}class Eg{constructor(e,t){this.widgetId=e,this.state=t}serialize(){return{widgetId:this.widgetId,state:this.state}}}class Ig{constructor(e,t){this.widgetId=e,this.height=t}serialize(){return{widgetId:this.widgetId,height:this.height}}}class Pg{constructor(e,t){this.widgetId=e,this.options=t}serialize(){return{widgetId:this.widgetId,id:this.options.id,title:this.options.title,content:this.options.content,width:this.options.width,height:this.options.height}}}class Tg{constructor(e,t,n){this.widgetId=e,this.width=t,this.height=n}serialize(){return{widgetId:this.widgetId,width:this.width,height:this.height}}}var Og=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 Rg="v1",Fg="v2";let kg;function Mg(e){kg=e}function xg(e){const t=void 0!==e,n=t?e:kg;if(!n)throw new Error("No parameters are provided for authentication");Jr(cr,un.content,un.sidePanel,un.settings,un.remove,un.task,un.stage,un.meetingStage);return Ng(n.successCallback||n.failureCallback?er(Rg,"authentication.authenticate"):er(Fg,"authentication.authenticate"),n).then(e=>{try{return n&&n.successCallback?(n.successCallback(e),""):e}finally{t||(kg=void 0)}}).catch(e=>{try{if(n&&n.failureCallback)return n.failureCallback(e.message),"";throw e}finally{t||(kg=void 0)}})}function Ng(e,t){return Og(this,void 0,void 0,function*(){const n=Ln(t.url);return Un(n),bc(e,"authentication.authenticate",[n.href,t.width,t.height,t.isExternal]).then(([e,t])=>{if(e)return t;throw new Error(t)})})}function Dg(e){Gr();return Ug(e&&(e.successCallback||e.failureCallback)?er(Rg,"authentication.getAuthToken"):er(Fg,"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 Ug(e,t){return new Promise(n=>{n(bc(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 Lg(e){Gr();return Hg(e&&(e.successCallback||e.failureCallback)?er(Rg,"authentication.getUser"):er(Fg,"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 Hg(e){return new Promise(t=>{t(bc(e,"authentication.getUser"))}).then(([e,t])=>{if(e)return t;throw t})}function _g(e,t){Jr(cr,un.authentication);Rc(er(t?Rg:Fg,"authentication.notifySuccess"),"authentication.authenticate.success",[e]),Yc(gc.parentWindow,()=>setTimeout(()=>gc.currentWindow.close(),200))}function Vg(e,t){Jr(cr,un.authentication);Rc(er(t?Rg:Fg,"authentication.notifyFailure"),"authentication.authenticate.failure",[e]),Yc(gc.parentWindow,()=>setTimeout(()=>gc.currentWindow.close(),200))}var Bg;function jg(){return Jr(cr)&&!!cr.supports.appPerformanceMetrics}function Wg(e){Jr(cr),Os(er("v2","appPerformanceMetrics.memoryUsageHeartbeat"),"appPerformanceMetrics.memoryUsageHeartbeat",e)}function zg(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"}(Bg||(Bg={}));class qg{constructor(e){this.val=e,zg(e)}toString(){return this.val}}const $g="/l/app/",Gg="/l/meeting/new",Jg="attendees",Kg="startTime",Qg="endTime",Zg="subject",Xg="content",Yg="/l/call/0/0",eh="source",th="withVideo",nh="/l/chat/0/0",rh="users",oh="topicName",ih="message";function ah(e,t,n){if(0===e.length)throw new Error("Must have at least one user when creating a chat deep link");const r=`${rh}=`+e.map(e=>encodeURIComponent(e)).join(","),o=void 0===t?"":`&${oh}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${ih}=${encodeURIComponent(n)}`;return`${at}://${st}${nh}?${r}${o}${i}`}function sh(e,t,n){if(0===e.length)throw new Error("Must have at least one target when creating a call deep link");const r=`${rh}=`+e.map(e=>encodeURIComponent(e)).join(","),o=void 0===t?"":`&${th}=${encodeURIComponent(t)}`,i=void 0===n?"":`&${eh}=${encodeURIComponent(n)}`;return`${at}://${st}${Yg}?${r}${o}${i}`}function ch(e,t,n,r,o){const i=void 0===e?"":`${Jg}=`+e.map(e=>encodeURIComponent(e)).join(","),a=void 0===t?"":`&${Kg}=${encodeURIComponent(t)}`,s=void 0===n?"":`&${Qg}=${encodeURIComponent(n)}`,c=void 0===r?"":`&${Zg}=${encodeURIComponent(r)}`,u=void 0===o?"":`&${Xg}=${encodeURIComponent(o)}`;return`${at}://${st}${Gg}?${i}${a}${s}${c}${u}`}function uh(e){if(!e)throw new Error("App ID must be set when creating an app install dialog deep link");return`${at}://${st}${$g}${encodeURIComponent(e)}`}const lh="v1";function dh(e){return new Promise(t=>{if(Jr(cr,un.content,un.sidePanel,un.settings,un.task,un.stage,un.meetingStage),!fh())throw new Error("Not supported");const n=er(lh,"appInstallDialog.openAppInstallDialog");cr.isLegacyTeams?t(Cc(n,"executeDeepLink",uh(e.appId))):(Rc(n,"appInstallDialog.openAppInstallDialog",[e]),t())})}function fh(){return!(!Jr(cr)||!cr.supports.appInstallDialog)}const ph="v1",gh=Yn("media");var hh,mh,vh,wh,Ch,yh,Sh;!function(e){e.Base64="base64",e.ID="id"}(hh||(hh={}));class bh{}function Ah(e){if(!e)throw new Error("[captureImage] Callback cannot be null");if(Jr(cr,un.content,un.task),!Jn.isFramelessWindow){return void e({errorCode:Le.NOT_SUPPORTED_ON_PLATFORM},[])}if(!Kr(et)){return void e({errorCode:Le.OLD_PLATFORM},[])}Rc(er(ph,"media.captureImage"),"captureImage",e)}function Eh(){if(Jr(cr,un.content,un.task),!Ph())throw hn;const e=He.Media;return new Promise(t=>{t(Sc(er(ph,"media.hasPermission"),"permissions.has",e))})}function Ih(){if(Jr(cr,un.content,un.task),!Ph())throw hn;const e=He.Media;return new Promise(t=>{t(Sc(er(ph,"media.requestPermission"),"permissions.request",e))})}function Ph(){return!(!Jr(cr)||!cr.supports.permissions)}class Th extends bh{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(cr,un.content,un.task),!Kr(tt)){return void e({errorCode:Le.OLD_PLATFORM},new Blob)}if(!Bh(this.mimeType,this.format,this.content)){return void e({errorCode:Le.INVALID_ARGUMENTS},new Blob)}Kr("2.0.0")?this.getMediaViaCallback(e):this.getMediaViaHandler(e)}getMediaViaCallback(e){const t={mediaMimeType:this.mimeType,assembleAttachment:[]},n=[this.content];Rc(er(ph,"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=xh(t.assembleAttachment,t.mediaMimeType);e(n.error,null!=r?r:new Blob)}else{const e=Nh(n.mediaChunk,t.mediaMimeType);e?t.assembleAttachment.push(e):gh(`Received a null assemble attachment for when decoding chunk sequence ${n.mediaChunk.chunkSequence}; not including the chunk in the assembled file.`)}else e({errorCode:Le.INTERNAL_ERROR,message:"data received is null"},new Blob)})}getMediaViaHandler(e){const t=bn(),n={mediaMimeType:this.mimeType,assembleAttachment:[]},r=[t,this.content];this.content&&!co(e)&&Rc(er(ph,"media.getMedia"),"getMedia",r),Os(er(ph,"media.registerGetMediaRequestHandler"),"getMedia"+t,function(r){if(e){const o=JSON.parse(r);if(o.error)e(o.error,new Blob),Rs("getMedia"+t);else if(o.mediaChunk)if(o.mediaChunk.chunkSequence<=0){const r=xh(n.assembleAttachment,n.mediaMimeType);e(o.error,null!=r?r:new Blob),Rs("getMedia"+t)}else{const e=Nh(o.mediaChunk,n.mediaMimeType);e&&n.assembleAttachment.push(e)}else e({errorCode:Le.INTERNAL_ERROR,message:"data received is null"},new Blob),Rs("getMedia"+t)}})}}class Oh{constructor(e){this.controllerCallback=e}notifyEventToHost(e,t){Jr(cr,un.content,un.task);try{Zr(Ke)}catch(e){return void(t&&t(e))}const n={mediaType:this.getMediaType(),mediaControllerEvent:e};Rc(er(ph,"media.controller"),"media.controller",[n],e=>{t&&t(e)})}stop(e){this.notifyEventToHost(mh.StopRecording,e)}}class Rh extends Oh{getMediaType(){return Ch.Video}notifyEventToApp(e){if(this.controllerCallback)switch(e){case mh.StartRecording:if(this.controllerCallback.onRecordingStarted){this.controllerCallback.onRecordingStarted();break}}}}function Fh(e,t){if(!t)throw new Error("[select Media] Callback cannot be null");if(Jr(cr,un.content,un.task),!Kr(tt)){const e={errorCode:Le.OLD_PLATFORM};return void t(e,[])}try{Dh(e)}catch(e){return void t(e,[])}if(!Lh(e)){const e={errorCode:Le.INVALID_ARGUMENTS};return void t(e,[])}const n=[e];Rc(er(ph,"media.selectMedia"),"selectMedia",n,(n,r,o)=>{var i,a;if(o)return void(Uh(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 Th(e));t(n,s)})}function kh(e,t){if(!t)throw new Error("[view images] Callback cannot be null");if(Jr(cr,un.content,un.task),!Kr(tt)){return void t({errorCode:Le.OLD_PLATFORM})}if(!jh(e)){return void t({errorCode:Le.INVALID_ARGUMENTS})}const n=[e];Rc(er(ph,"media.viewImages"),"viewImages",n,t)}function Mh(e,t){if(!e)throw new Error("[media.scanBarCode] Callback cannot be null");if(Jr(cr,un.content,un.task),Jn.hostClientType===sn.desktop||Jn.hostClientType===sn.web||Jn.hostClientType===sn.rigel||Jn.hostClientType===sn.teamsRoomsWindows||Jn.hostClientType===sn.teamsRoomsAndroid||Jn.hostClientType===sn.teamsPhones||Jn.hostClientType===sn.teamsDisplays){return void e({errorCode:Le.NOT_SUPPORTED_ON_PLATFORM},"")}if(!Kr(nt)){return void e({errorCode:Le.OLD_PLATFORM},"")}if(!Wh(t)){return void e({errorCode:Le.INVALID_ARGUMENTS},"")}Rc(er(ph,"media.scanBarCode"),"media.scanBarCode",[t],e)}function xh(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 Nh(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 Dh(e){_h(e)?Zr(Je):Vh(e)?Zr(Ke):Hh(e)&&Zr(Qe)}function Uh(e){return!(e.mediaType!=Ch.Video||!e.videoProps||!e.videoProps.videoController)}function Lh(e){return!(null==e||e.maxMediaCount>10)}function Hh(e){var t;return!((null==e?void 0:e.mediaType)!=Ch.Image||!(null===(t=null==e?void 0:e.imageProps)||void 0===t?void 0:t.imageOutputFormats))}function _h(e){return!(!e||e.mediaType!=Ch.VideoAndImage&&!e.videoAndImageProps)}function Vh(e){return!(!e||e.mediaType!=Ch.Video||!e.videoProps||e.videoProps.isFullScreenMode)}function Bh(e,t,n){return null!=e&&null!=t&&t==hh.ID&&null!=n}function jh(e){return!(null==e||e.length<=0||e.length>10)}function Wh(e){return!e||!(null===e.timeOutIntervalInSec||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec<=0||null!=e.timeOutIntervalInSec&&e.timeOutIntervalInSec>60)}function zh(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"}(mh||(mh={})),function(e){e[e.Photo=1]="Photo",e[e.Document=2]="Document",e[e.Whiteboard=3]="Whiteboard",e[e.BusinessCard=4]="BusinessCard"}(vh||(vh={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(wh||(wh={})),function(e){e[e.Image=1]="Image",e[e.Video=2]="Video",e[e.VideoAndImage=3]="VideoAndImage",e[e.Audio=4]="Audio"}(Ch||(Ch={})),function(e){e[e.ID=1]="ID",e[e.URL=2]="URL"}(yh||(yh={})),function(e){e[e.IMAGE=1]="IMAGE",e[e.PDF=2]="PDF"}(Sh||(Sh={}));const qh="v2";function $h(e){return new Promise(t=>{if(Jr(cr,un.content,un.task),!Kh())throw hn;if(!Wh(e))throw{errorCode:Le.INVALID_ARGUMENTS};t(Sc(er(qh,"barCode.scanBarCode"),"media.scanBarCode",e))})}function Gh(){if(Jr(cr,un.content,un.task),!Kh())throw hn;const e=He.Media;return new Promise(t=>{t(Sc(er(qh,"barCode.hasPermission"),"permissions.has",e))})}function Jh(){if(Jr(cr,un.content,un.task),!Kh())throw hn;const e=He.Media;return new Promise(t=>{t(Sc(er(qh,"barCode.requestPermission"),"permissions.request",e))})}function Kh(){return!!(Jr(cr)&&cr.supports.barCode&&cr.supports.permissions)}const Qh="v2";function Zh(e){return Xh(er(Qh,"chat.openChat"),e)}function Xh(e,t){return new Promise(n=>{if(Jr(cr,un.content,un.task),!em())throw hn;if(cr.isLegacyTeams)n(Cc(e,"executeDeepLink",ah([t.user],void 0,t.message)));else{n(Cc(e,"chat.openChat",{members:[t.user],message:t.message}))}})}function Yh(e){const t=er(Qh,"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(Xh(t,r))}else{if(Jr(cr,un.content,un.task),!em())throw hn;if(cr.isLegacyTeams)n(Cc(t,"executeDeepLink",ah(e.users,e.topic,e.message)));else{n(Cc(t,"chat.openChat",{members:e.users,message:e.message,topic:e.topic}))}}})}function em(){return!(!Jr(cr)||!cr.supports.chat)}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="v2";function rm(e){return tm(this,void 0,void 0,function*(){if(Jr(cr,un.content,un.meetingStage,un.task,un.settings,un.stage,un.sidePanel),!im())throw hn;if(!e.type||!Object.values(We).includes(e.type))throw new Error(`Blob type ${e.type} is not supported. Supported blob types are ${Object.values(We)}`);const t=yield Mn(e),n={mimeType:e.type,content:t};return Sc(er(nm,"clipboard.write"),"clipboard.writeToClipboard",n)})}function om(){return tm(this,void 0,void 0,function*(){Jr(cr,un.content,un.meetingStage,un.task,un.settings,un.stage,un.sidePanel);const e=er(nm,"clipboard.read");if(!im())throw hn;const t=yield Sc(e,"clipboard.readFromClipboard");if("string"==typeof t){const e=JSON.parse(t);return kn(e.mimeType,e.content)}return t})}function im(){return Jn.isFramelessWindow?!(!Jr(cr)||!cr.supports.clipboard):!!(Jr(cr)&&navigator&&navigator.clipboard&&cr.supports.clipboard)}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="v2",cm={validate:e=>Array.isArray(e)||"object"==typeof e,deserialize:e=>e};var um;function lm(){var e;return null!==(e=Jr(cr)&&(cr.isNAAChannelRecommended||hm()))&&void 0!==e&&e}function dm(){return Jr(cr),gc.parentOrigin}function fm(){var e;return null!==(e=Jr(cr)&&cr.canParentManageNAATrustedOrigins)&&void 0!==e&&e}function pm(){var e;return null!==(e=Jr(cr)&&(cr.isDeeplyNestedAuthSupported||gm()))&&void 0!==e&&e}function gm(){return!!(Jr(cr)&&mm()&&cr.isLegacyTeams&&Kr(hr))}function hm(){return!!(Jr(cr)&&mm()&&cr.isLegacyTeams&&cr.supports.nestedAppAuth)}function mm(){return Jn.hostClientType===sn.android||Jn.hostClientType===sn.ios||Jn.hostClientType===sn.ipados||Jn.hostClientType===sn.visionOS}function vm(e){return am(this,void 0,void 0,function*(){if(!fm())throw hn;const t=e.map(ym);return Cm(um.ADD,t)})}function wm(e){return am(this,void 0,void 0,function*(){if(!fm())throw hn;const t=e.map(ym);return Cm(um.DELETE,t)})}function Cm(e,t){return am(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 Ec("nestedAppAuth.manageNAATrustedOrigins",[new Sm(e,t)],cm,er(sm,"nestedAppAuth.manageNAATrustedOrigins"))})}function ym(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"}(um||(um={}));class Sm{constructor(e,t){this.action=e,this.appOrigins=t}serialize(){return{action:this.action,appOrigins:this.appOrigins}}}const bm="v2";function Am(){if(Jr(cr,un.content,un.task),!Im())throw hn;return Sc(er(bm,"geoLocation.map.chooseLocation"),"location.getLocation",{allowChooseLocation:!0,showMap:!0})}function Em(e){if(Jr(cr,un.content,un.task),!Im())throw hn;if(!e)throw{errorCode:Le.INVALID_ARGUMENTS};return Sc(er(bm,"geoLocation.showLocation"),"location.showLocation",e)}function Im(){return!!(Jr(cr)&&cr.supports.geoLocation&&cr.supports.geoLocation.map&&cr.supports.permissions)}const Pm="v2";function Tm(){if(Jr(cr,un.content,un.task),!Fm())throw hn;return Sc(er(Pm,"geoLocation.getCurrentLocation"),"location.getLocation",{allowChooseLocation:!1,showMap:!1})}function Om(){if(Jr(cr,un.content,un.task),!Fm())throw hn;const e=He.GeoLocation;return new Promise(t=>{t(Sc(er(Pm,"geoLocation.hasPermission"),"permissions.has",e))})}function Rm(){if(Jr(cr,un.content,un.task),!Fm())throw hn;const e=He.GeoLocation;return new Promise(t=>{t(Sc(er(Pm,"geoLocation.requestPermission"),"permissions.request",e))})}function Fm(){return!!(Jr(cr)&&cr.supports.geoLocation&&cr.supports.permissions)}function km(){return cr.hostVersionsInfo?cr.hostVersionsInfo.adaptiveCardSchemaVersion:void 0}const Mm="v1";class xm{postMessage(e,t){Jr(cr),Rc(er(Mm,"appWindow.childAppWindow.postMessage"),"messageForChild",[e],t||yn())}addEventListener(e,t){Jr(cr),"message"===e&&Os(er(Mm,"appWindow.childAppWindow.addEventListener"),"messageForParent",t)}}class Nm{static get Instance(){return this._instance||(this._instance=new this)}postMessage(e,t){Jr(cr,un.task),Rc(er(Mm,"appWindow.parentAppWindow.postMessage"),"messageForParent",[e],t||yn())}addEventListener(e,t){Jr(cr,un.task),"message"===e&&Os(er(Mm,"appWindow.parentAppWindow.addEventListener"),"messageForChild",t)}}const Dm="v2";function Um(e){if(Jr(cr,un.content),!Lm())throw hn;if(!e||!Fn(e))throw{errorCode:Le.INVALID_ARGUMENTS,message:"Invalid Url: Only https URL is allowed"};return Sc(er(Dm,"secondaryBrowser.openUrl"),"secondaryBrowser.open",e.toString())}function Lm(){return!(!Jr(cr)||!cr.supports.secondaryBrowser)}const Hm="v1";function _m(e,t){if(!t)throw new Error("[location.getLocation] Callback cannot be null");if(Jr(cr,un.content,un.task),!Kr(Xe))throw{errorCode:Le.OLD_PLATFORM};if(!e)throw{errorCode:Le.INVALID_ARGUMENTS};if(!Bm())throw hn;Rc(er(Hm,"location.getLocation"),"location.getLocation",[e],t)}function Vm(e,t){if(!t)throw new Error("[location.showLocation] Callback cannot be null");if(Jr(cr,un.content,un.task),!Kr(Xe))throw{errorCode:Le.OLD_PLATFORM};if(!e)throw{errorCode:Le.INVALID_ARGUMENTS};if(!Bm())throw hn;Rc(er(Hm,"location.showLocation"),"location.showLocation",[e],t)}function Bm(){return!(!Jr(cr)||!cr.supports.location)}const jm="v1";function Wm(e){Jr(cr,un.sidePanel),e.contentUrl&&new URL(e.contentUrl),Rc(er(jm,"meeting.appShareButton.setOptions"),"meeting.appShareButton.setOptions",[e])}var zm=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 qm="v1";var $m,Gm,Jm,Km,Qm,Zm;function Xm(e){if(!e)throw new Error("[get incoming client audio state] Callback cannot be null");Jr(cr,un.sidePanel,un.meetingStage),Rc(er(qm,"meeting.getIncomingClientAudioState"),"getIncomingClientAudioState",e)}function Ym(e){if(!e)throw new Error("[toggle incoming client audio] Callback cannot be null");Jr(cr,un.sidePanel,un.meetingStage),Rc(er(qm,"meeting.toggleIncomingClientAudio"),"toggleIncomingClientAudio",e)}function ev(e){if(!e)throw new Error("[get meeting details] Callback cannot be null");Jr(cr,un.sidePanel,un.meetingStage,un.settings,un.content),Rc(er(qm,"meeting.getMeetingDetails"),"meeting.getMeetingDetails",e)}function tv(){var e,t,n;return zm(this,void 0,void 0,function*(){let r;Jr(cr,un.sidePanel,un.meetingStage,un.settings,un.content);try{const e=!0;r=yield Sc(er("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)==Km.GroupCall||(null===(n=r.details)||void 0===n?void 0:n.type)==Km.OneOnOneCall)&&!r.details.originalCallerInfo)throw new Error(Le.NOT_SUPPORTED_ON_PLATFORM.toString());return r})}function nv(e){if(!e)throw new Error("[get Authentication Token For AnonymousUser] Callback cannot be null");Jr(cr,un.sidePanel,un.meetingStage,un.task),Rc(er(qm,"meeting.getAuthenticationTokenForAnonymousUser"),"meeting.getAuthenticationTokenForAnonymousUser",e)}function rv(e){if(!e)throw new Error("[get live stream state] Callback cannot be null");Jr(cr,un.sidePanel),Rc(er(qm,"meeting.getLiveStreamState"),"meeting.getLiveStreamState",e)}function ov(e,t,n){if(!e)throw new Error("[request start live streaming] Callback cannot be null");Jr(cr,un.sidePanel),Rc(er(qm,"meeting.requestStartLiveStreaming"),"meeting.requestStartLiveStreaming",[t,n],e)}function iv(e){if(!e)throw new Error("[request stop live streaming] Callback cannot be null");Jr(cr,un.sidePanel),Rc(er(qm,"meeting.requestStopLiveStreaming"),"meeting.requestStopLiveStreaming",e)}function av(e){if(!e)throw new Error("[register live stream changed handler] Handler cannot be null");Jr(cr,un.sidePanel),Os(er(qm,"meeting.registerLiveStreamChangedHandler"),"meeting.liveStreamChanged",e)}function sv(e,t,n={sharingProtocol:Qm.Collaborative}){if(!e)throw new Error("[share app content to stage] Callback cannot be null");Jr(cr,un.sidePanel,un.meetingStage),Rc(er(qm,"meeting.shareAppContentToStage"),"meeting.shareAppContentToStage",[t,n],e)}function cv(e){if(!e)throw new Error("[get app content stage sharing capabilities] Callback cannot be null");Jr(cr,un.sidePanel,un.meetingStage),Rc(er(qm,"meeting.getAppContentStageSharingCapabilities"),"meeting.getAppContentStageSharingCapabilities",e)}function uv(e){if(!e)throw new Error("[stop sharing app content to stage] Callback cannot be null");Jr(cr,un.sidePanel,un.meetingStage),Rc(er(qm,"meeting.stopSharingAppContentToStage"),"meeting.stopSharingAppContentToStage",e)}function lv(e){if(!e)throw new Error("[get app content stage sharing state] Callback cannot be null");Jr(cr,un.sidePanel,un.meetingStage),Rc(er(qm,"meeting.getAppContentStageSharingState"),"meeting.getAppContentStageSharingState",e)}function dv(e){if(!e)throw new Error("[registerSpeakingStateChangeHandler] Handler cannot be null");Jr(cr,un.sidePanel,un.meetingStage),Os(er(qm,"meeting.registerSpeakingStateChangeHandler"),"meeting.speakingStateChanged",e)}function fv(e){if(!e)throw new Error("[registerRaiseHandStateChangedHandler] Handler cannot be null");Jr(cr,un.sidePanel,un.meetingStage),Os(er(qm,"meeting.registerRaiseHandStateChangedHandler"),"meeting.raiseHandStateChanged",e)}function pv(e){if(!e)throw new Error("[registerMeetingReactionReceivedHandler] Handler cannot be null");Jr(cr,un.sidePanel,un.meetingStage),Os(er(qm,"meeting.registerMeetingReactionReceivedHandler"),"meeting.meetingReactionReceived",e)}function gv(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(cr);const t={joinWebUrl:e.joinWebUrl.href,source:e.source||Zm.Other};return Sc(er("v2","meeting.joinMeeting"),"meeting.joinMeeting",t)}function hv(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(cr,un.sidePanel,un.meetingStage),e.isAppHandlingAudio?mv(e,t):vv(e,t)}function mv(e,t){Rc(er(qm,"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");Os(er(qm,"meeting.registerMicStateChangeHandler"),"meeting.micStateChanged",t=>zm(this,void 0,void 0,function*(){try{const n=yield e.micMuteStateChangedCallback(t);Cv(n,n.isMicMuted===t.isMicMuted?$m.HostInitiated:$m.AppDeclinedToChange)}catch(e){Cv(t,$m.AppFailedToChange)}}));Os(er(qm,"meeting.registerAudioDeviceSelectionChangedHandler"),"meeting.audioDeviceSelectionChanged",t=>{var n;null===(n=e.audioDeviceSelectionChangedCallback)||void 0===n||n.call(e,t)}),t(r)})}function vv(e,t){Rc(er(qm,"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");Fs("meeting.micStateChanged")&&Rs("meeting.micStateChanged"),Fs("meeting.audioDeviceSelectionChanged")&&Rs("meeting.audioDeviceSelectionChanged"),t(n)})}function wv(e){Cv(e,$m.AppInitiated)}function Cv(e,t){Jr(cr,un.sidePanel,un.meetingStage),Rc(er(qm,"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"}($m||($m={})),function(e){e.like="like",e.heart="heart",e.laugh="laugh",e.surprised="surprised",e.applause="applause"}(Gm||(Gm={})),function(e){e.Unknown="Unknown",e.Adhoc="Adhoc",e.Scheduled="Scheduled",e.Recurring="Recurring",e.Broadcast="Broadcast",e.MeetNow="MeetNow"}(Jm||(Jm={})),function(e){e.OneOnOneCall="oneOnOneCall",e.GroupCall="groupCall"}(Km||(Km={})),function(e){e.Collaborative="Collaborative",e.ScreenShare="ScreenShare"}(Qm||(Qm={})),function(e){e.M365CalendarGridContextMenu="m365_calendar_grid_context_menu",e.M365CalendarGridPeek="m365_calendar_grid_peek",e.M365CalendarGridEventCardJoinButton="m365_calendar_grid_event_card_join_button",e.M365CalendarFormRibbonJoinButton="m365_calendar_form_ribbon_join_button",e.M365CalendarFormJoinTeamsMeetingButton="m365_calendar_form_join_teams_meeting_button",e.Other="other"}(Zm||(Zm={}));const yv="v1",Sv="v2";function bv(e,t){let n,r,o="";"function"==typeof e?(n=e,r=t,o=er(yv,"monetization.openPurchaseExperience")):(r=e,o=er(Sv,"monetization.openPurchaseExperience"));return Jr(cr,un.content),Pn(()=>new Promise(e=>{if(!Av())throw hn;e(Sc(o,"monetization.openPurchaseExperience",r))}),n)}function Av(){return!(!Jr(cr)||!cr.supports.monetization)}const Ev="v2";function Iv(e){return new Promise(t=>{if(Jr(cr,un.content),!Tv())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openCalendarItem");t(Cc(er(Ev,"calendar.openCalendarItem"),"calendar.openCalendarItem",e))})}function Pv(e){return new Promise(t=>{if(Jr(cr,un.content),!Tv())throw new Error("Not supported");const n=er(Ev,"calendar.composeMeeting");cr.isLegacyTeams?t(Cc(n,"executeDeepLink",ch(e.attendees,e.startTime,e.endTime,e.subject,e.content))):t(Cc(n,"calendar.composeMeeting",e))})}function Tv(){return!(!Jr(cr)||!cr.supports.calendar)}const Ov="v2";function Rv(e){e&&0!==e.length&&e.forEach(e=>{zg(e)})}function Fv(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===Hv.New&&(Rv(t.toRecipients),Rv(t.ccRecipients),Rv(t.bccRecipients))}function kv(e){if(Jr(cr,un.content),!Mv())throw new Error("Not supported");return Fv(e),Ic("mail.handoff.composeMail",[new xv(e)],er(Ov,"mail.handoff.composeMail"))}function Mv(){return!!(Jr(cr)&&cr.supports.mail&&cr.supports.mail.handoff)}class xv{constructor(e){this.composeMailParamsWithHandoff=e}serialize(){return this.composeMailParamsWithHandoff}}const Nv="v2";function Dv(e){return new Promise(t=>{if(Jr(cr,un.content),!Lv())throw new Error("Not supported");if(!e.itemId||!e.itemId.trim())throw new Error("Must supply an itemId to openMailItem");t(Cc(er(Nv,"mail.openMailItem"),"mail.openMailItem",e))})}function Uv(e){return new Promise(t=>{if(Jr(cr,un.content),!Lv())throw new Error("Not supported");t(Cc(er(Nv,"mail.composeMail"),"mail.composeMail",e))})}function Lv(){return!(!Jr(cr)||!cr.supports.mail)}var Hv;!function(e){e.New="new",e.Reply="reply",e.ReplyAll="replyAll",e.Forward="forward"}(Hv||(Hv={}));const _v="v2";function Vv(){if(!Jn.printCapabilityEnabled){if(Jr(cr),!$v())throw hn;Jn.printCapabilityEnabled=!0,document.addEventListener("keydown",e=>{(e.ctrlKey||e.metaKey)&&80===e.keyCode&&(Bv(),e.cancelBubble=!0,e.preventDefault(),e.stopImmediatePropagation())})}}function Bv(){xn().print()}function jv(e){Wv(er(_v,"teamsAPIs_registerOnLoadHandler"),e,()=>{if(!co(e)&&!$v())throw hn})}function Wv(e,t,n){!co(t)&&Jr(cr),!co(t)&&n&&n(),Hs(e,t)}function zv(e){qv(er(_v,"teamsAPIs_registerBeforeUnloadHandler"),e,()=>{if(!co(e)&&!$v())throw hn})}function qv(e,t,n){!co(t)&&Jr(cr),!co(t)&&n&&n(),Bs(e,t)}function $v(){return!(!Jr(cr)||!cr.supports.teamsCore)}const Gv="v1",Jv="v2";function Kv(e,t){let n,r;Jr(cr,un.content,un.task,un.settings);let o="";return"function"==typeof e?([n,r]=[e,t],o=er(Gv,"people.selectPeople")):(r=e,o=er(Jv,"people.selectPeople")),En(Qv,n,o,r)}function Qv(e,t){return new Promise(n=>{if(!Kr(Ye))throw{errorCode:Le.OLD_PLATFORM};if(!zh(t))throw{errorCode:Le.INVALID_ARGUMENTS};if(!Zv())throw hn;n(Sc(e,"people.selectPeople",t))})}function Zv(){return!(!Jr(cr)||!cr.supports.people)}function Xv(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?Yv(e.persona):[!1,"triggerType must be a valid string"]:[!1,"targetElementBoundingRect must be a DOMRect"]:[!1,"A request object is required"]}function Yv(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 ew="v2";function tw(e){return Jr(cr,un.content),new Promise(t=>{const[n,r]=Xv(e);if(!n)throw{errorCode:Le.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(Sc(er(ew,"profile.showProfile"),"profile.showProfile",o))})}function nw(){return!(!Jr(cr)||!cr.supports.profile)}const rw="v2",ow="search.queryChange",iw="search.queryClose",aw="search.queryExecute";function sw(e,t,n){if(Jr(cr,un.content),!uw())throw hn;Os(er(rw,"search.registerOnClosedHandler"),iw,e),Os(er(rw,"search.registerOnExecutedHandler"),aw,t),n&&Os(er(rw,"search.registerOnChangeHandler"),ow,n)}function cw(){if(Jr(cr,un.content),!uw())throw hn;Rc(er(rw,"search.unregisterHandlers"),"search.unregister"),Rs(ow),Rs(iw),Rs(aw)}function uw(){return!(!Jr(cr)||!cr.supports.search)}function lw(){return new Promise(e=>{if(Jr(cr,un.content),!uw())throw new Error("Not supported");e(Cc(er(rw,"search.closeSearch"),"search.closeSearch"))})}var dw=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 fw="v2";function pw(){return dw(this,void 0,void 0,function*(){if(Jr(cr,un.sidePanel,un.meetingStage),!gw())throw hn;return yield Sc(er(fw,"sharing.history.getContent"),"sharing.history.getContent")})}function gw(){var e;return Jr(cr)&&void 0!==(null===(e=cr.supports.sharing)||void 0===e?void 0:e.history)}const hw="v1",mw="v2",vw={shareWebContent:"sharing.shareWebContent"};function ww(e,t){try{yw(e),Sw(e),bw(e)}catch(e){return In(()=>Promise.reject(e),t)}Jr(cr,un.content,un.sidePanel,un.task,un.stage,un.meetingStage);return In(Cw,t,er(t?hw:mw,"sharing.shareWebContent"),e)}function Cw(e,t){return new Promise(n=>{if(!Aw())throw hn;n(Sc(e,vw.shareWebContent,t))})}function yw(e){if(!(e&&e.content&&e.content.length)){throw{errorCode:Le.INVALID_ARGUMENTS,message:"Shared content is missing"}}}function Sw(e){let t;if(e.content.some(e=>!e.type))throw t={errorCode:Le.INVALID_ARGUMENTS,message:"Shared content type cannot be undefined"},t;if(e.content.some(t=>t.type!==e.content[0].type))throw t={errorCode:Le.INVALID_ARGUMENTS,message:"Shared content must be of the same type"},t}function bw(e){let t;if("URL"!==e.content[0].type)throw t={errorCode:Le.INVALID_ARGUMENTS,message:"Content type is unsupported"},t;if(e.content.some(e=>!e.url))throw t={errorCode:Le.INVALID_ARGUMENTS,message:"URLs are required for URL content types"},t}function Aw(){return!(!Jr(cr)||!cr.supports.sharing)}const Ew="v2";function Iw(){return new Promise(e=>{if(Jr(cr,un.content),!Pw())throw hn;e(Sc(er(Ew,"stageView.self.close"),"stageView.self.close"))})}function Pw(){var e;return Jr(cr)&&void 0!==(null===(e=cr.supports.stageView)||void 0===e?void 0:e.self)}const Tw="v2";var Ow;function Rw(e){return new Promise(t=>{if(Jr(cr,un.content),!Fw())throw hn;if(!e)throw new Error("[stageView.open] Stage view params cannot be null");t(Sc(er(Tw,"stageView.open"),"stageView.open",e))})}function Fw(){return!(!Jr(cr)||!cr.supports.stageView)}!function(e){e.modal="modal",e.popout="popout",e.popoutWithChat="popoutWithChat"}(Ow||(Ow={}));const kw=10;var Mw=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 xw="v2";function Nw(e){return Mw(this,void 0,void 0,function*(){Jr(cr,un.content,un.task),Lw(),Hw(e);const t=yield Sc(er(xw,"visualMedia.image.captureImages"),"visualMedia.image.captureImages",e);return _w(e.maxVisualMediaCount,t),t})}function Dw(e){return Mw(this,void 0,void 0,function*(){Jr(cr,un.content,un.task),Lw(),Hw(e);const t=yield Sc(er(xw,"visualMedia.image.retrieveImages"),"visualMedia.image.retrieveImages",e);return _w(e.maxVisualMediaCount,t),t})}function Uw(){return!!(Jr(cr)&&cr.supports.visualMedia&&cr.supports.visualMedia.image&&cr.supports.permissions)}function Lw(){if(!Uw())throw hn}function Hw(e){if(!e||e.maxVisualMediaCount>kw||e.maxVisualMediaCount<1)throw wn}function _w(e,t){if(t.length>e)throw Cn}const Vw="v2";var Bw,jw;function Ww(){if(Jr(cr,un.content,un.task),!Uw())throw hn;const e=He.Media;return Sc(er(Vw,"visualMedia.hasPermission"),"permissions.has",e)}function zw(){if(Jr(cr,un.content,un.task),!Uw())throw hn;const e=He.Media;return Sc(er(Vw,"visualMedia.requestPermission"),"permissions.request",e)}!function(e){e[e.FrontOrRear=1]="FrontOrRear",e[e.FrontOnly=2]="FrontOnly",e[e.RearOnly=3]="RearOnly"}(Bw||(Bw={})),function(e){e[e.Camera=1]="Camera",e[e.Gallery=2]="Gallery"}(jw||(jw={}));var qw=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 $w=null;function Gw(){return qw(this,void 0,void 0,function*(){return null===$w&&($w=(yield Uo()).app.host.name),$w})}var Jw=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 Kw(){return Jw(this,void 0,void 0,function*(){if(Jr(cr),!Zw())throw hn;return!(!cr.isLegacyTeams||Jn.hostClientType!==sn.android&&Jn.hostClientType!==sn.ios&&Jn.hostClientType!==sn.ipados&&Jn.hostClientType!==sn.visionOS||(yield Qw())!==cn.teams)||(yield wc(er("v2","webStorage.isWebStorageClearedOnUserLogOut"),"webStorage.isWebStorageClearedOnUserLogOut"))})}function Qw(){return Jw(this,void 0,void 0,function*(){return Gw()})}function Zw(){return Jr(cr)&&void 0!==cr.supports.webStorage}const Xw="v2";var Yw;function eC(e){const t=er(Xw,"call.startCall");return new Promise(n=>{var r;if(Jr(cr,un.content,un.task),!tC())throw hn;if(!cr.isLegacyTeams)return Rc(t,"call.startCall",[e],n);n(wc(t,"executeDeepLink",sh(e.targets,null===(r=e.requestedModalities)||void 0===r?void 0:r.includes(Yw.Video),e.source)).then(e=>{if(!e)throw new Error(dt);return e}))})}function tC(){return!(!Jr(cr)||!cr.supports.call)}!function(e){e.Unknown="unknown",e.Audio="audio",e.Video="video",e.VideoBasedScreenSharing="videoBasedScreenSharing",e.Data="data"}(Yw||(Yw={}));const nC="v1";function rC(){ra(er(nC,"appInitialization.notifyAppLoaded"))}function oC(){Rc(er(nC,"appInitialization.notifySuccess"),Oo.Success,[Ar])}function iC(e){ia(er(nC,"appInitialization.notifyFailure"),e)}function aC(e){oa(er(nC,"appInitialization.notifyExpectedFailure"),e)}const sC=Yn("thirdPartyCloudStorage"),cC="v2";class uC{constructor(e,t){this.fileType=e,this.assembleAttachment=t}}let lC=[],dC=null,fC=!0,pC=null;function gC(e,t){if(!t)throw new Error("[getDragAndDropFiles] Callback cannot be null");if(!e||""===e){return void t([],{errorCode:Le.INVALID_ARGUMENTS})}if(Jr(cr,un.content,un.task),!mC())throw hn;if(pC)throw pC=null,new Error("getDragAndDropFiles cannot be called twice");pC=t,fC=!0,Rc(er(cC,"thirdPartyCloudStorage.getDragAndDropFiles"),"thirdPartyCloudStorage.getDragAndDropFiles",[e],hC)}function hC(e){if(pC)if(e&&e.error)pC([],e.error),pC=null;else if(e&&e.fileChunk)try{fC||0!==e.fileChunk.chunkSequence||(sC("Last chunk is not received or 'endOfFile' value for previous chunk was not set to true"),fC=!0,pC([],{errorCode:Le.INTERNAL_ERROR,message:"error occurred while receiving data"}),lC=[],pC=null);const t=Nh(e.fileChunk,e.fileType);if(t?(dC||(dC=new uC(e.fileType,[])),dC.assembleAttachment.push(t)):(sC(`Received a null assemble attachment for when decoding chunk sequence ${e.fileChunk.chunkSequence}; not including the chunk in the assembled file.`),pC?pC([],{errorCode:Le.INTERNAL_ERROR,message:"error occurred while receiving data"}):pC=null,lC=[],pC=null,fC=!0),fC=e.fileChunk.endOfFile,e.fileChunk.endOfFile&&dC){const t=xh(dC.assembleAttachment,dC.fileType);if(t){const n=new File([t],e.fileName,{type:t.type});lC.push(n)}e.isLastFile&&pC&&(pC(lC,e.error),lC=[],pC=null,fC=!0),dC=null}}catch(e){pC&&(pC([],{errorCode:Le.INTERNAL_ERROR,message:e}),lC=[],pC=null,fC=!0)}else pC([],{errorCode:Le.INTERNAL_ERROR,message:"data received is null"}),lC=[],pC=null,fC=!0}function mC(){return!(!Jr(cr)||!cr.supports.thirdPartyCloudStorage)}const vC="v1";function wC(e,t){na(er(vC,"initialize"),t).then(()=>{e&&e()})}function CC(){Vv()}function yC(){Bv()}function SC(e){Gr(),Rc(er(vC,"getContext"),"getContext",t=>{t.frameContext||(t.frameContext=Jn.frameContext),e(t)})}function bC(e){da(er(vC,"registerOnThemeChangeHandlerHelper"),e)}function AC(e){ks(er(vC,"registerFullScreenHandler"),"fullScreenChange",e,[])}function EC(e){ks(er(vC,"registerAppButtonClickHandler"),"appButtonClick",e,[un.content])}function IC(e){ks(er(vC,"registerAppButtonHoverEnterHandler"),"appButtonHoverEnter",e,[un.content])}function PC(e){ks(er(vC,"registerAppButtonHoverLeaveHandler"),"appButtonHoverLeave",e,[un.content])}function TC(e){Ma(er(vC,"registerBackButtonHandler"),e)}function OC(e){Wv(er(vC,"registerOnLoadHandler"),e)}function RC(e){qv(er(vC,"registerBeforeUnloadHandler"),e)}function FC(e){ks(er(vC,"registerFocusEnterHandler"),"focusEnter",e,[])}function kC(e){ks(er(vC,"registerChangeSettingsHandler"),"changeSettings",e,[un.content])}function MC(e,t){Jr(cr),ss(er(vC,"getTabInstances"),t).then(t=>{e(t)})}function xC(e,t){Jr(cr),cs(er(vC,"getMruTabInstances"),t).then(t=>{e(t)})}function NC(e){us(er(vC,"shareDeepLink"),{subPageId:e.subEntityId,subPageLabel:e.subEntityLabel,subPageWebUrl:e.subEntityWebUrl})}function DC(e,t){Jr(cr,un.content,un.sidePanel,un.settings,un.task,un.stage,un.meetingStage);const n=null!=t?t:yn();pa(er(vC,"executeDeepLink"),e).then(()=>{n(!0)}).catch(e=>{n(!1,e.message)})}function UC(e){ls(er(vC,"setFrameContext"),e)}function LC(e,t,n){na(er(vC,"initializeWithFrameContext"),n).then(()=>t&&t()),ls(er(vC,"setFrameContext"),e)}const HC="v1";function _C(e){as(er(HC,"navigation.returnFocus"),e)}function VC(e,t){Jr(cr);const n=null!=t?t:yn();is(er(HC,"navigation.navigateToTab"),e).then(()=>{n(!0)}).catch(e=>{n(!1,e.message)})}function BC(e,t){Jr(cr,un.content,un.sidePanel,un.settings,un.remove,un.task,un.stage,un.meetingStage);const n=null!=t?t:yn();rs(er(HC,"navigation.navigateCrossDomain"),e).then(()=>{n(!0)}).catch(e=>{n(!1,e.message)})}function jC(e){Jr(cr);const t=null!=e?e:yn();os(er(HC,"navigation.navigateBack")).then(()=>{t(!0)}).catch(e=>{t(!1,e.message)})}const WC="v1";function zC(e){ds(er(WC,"settings.setValidityState"),e)}function qC(e){Jr(cr,un.content,un.settings,un.remove,un.sidePanel),fs(er(WC,"settings.getSettings")).then(t=>{e(t)})}function $C(e,t){Jr(cr,un.content,un.settings,un.sidePanel);const n=null!=t?t:yn();ps(er(WC,"settings.setSettings"),e).then(()=>{n(!0)}).catch(e=>{n(!1,e.message)})}function GC(e){ji(er(WC,"settings.registerOnSaveHandler"),e)}function JC(e){zi(er(WC,"settings.registerOnRemoveHandler"),e)}var KC=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 QC="v1";function ZC(e,t){const n=er(QC,"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(cr,un.content,un.sidePanel,un.meetingStage),Rc(n,"tasks.startTask",[e],t)):void 0!==e.completionBotId?ui(n,ty(e),r):ci(n,ey(e),r),new xm}function XC(e){e=ny(e);const{width:t,height:n}=e,r=KC(e,["width","height"]);if(Object.keys(r).length)throw new Error("resize requires a TaskInfo argument containing only width and height");si(er(QC,"tasks.updateTask"),e)}function YC(e,t){li(er(QC,"tasks.submitTask"),e,t)}function ey(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:pn.Small,width:e.width?e.width:pn.Small},title:e.title,fallbackUrl:e.fallbackUrl}}function ty(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:pn.Small,width:e.width?e.width:pn.Small},title:e.title,fallbackUrl:e.fallbackUrl,completionBotId:e.completionBotId}}function ny(e){return e.height=e.height?e.height:pn.Small,e.width=e.width?e.width:pn.Small,e}const ry="v2";var oy,iy;function ay(){return!(!Jr(cr,un.meetingStage,un.sidePanel,un.content)||!cr.supports.interactive)}!function(e){e.guest="Guest",e.attendee="Attendee",e.presenter="Presenter",e.organizer="Organizer"}(oy||(oy={})),function(e){e.added="Added",e.alreadyExists="AlreadyExists",e.conflict="Conflict",e.notFound="NotFound"}(iy||(iy={}));class sy{getFluidTenantInfo(){return cy(),new Promise(e=>{e(Sc(er(ry,"interactive.getFluidTenantInfo"),"interactive.getFluidTenantInfo"))})}getFluidToken(e){return cy(),new Promise(t=>{t(Sc(er(ry,"interactive.getFluidToken"),"interactive.getFluidToken",e))})}getFluidContainerId(){return cy(),new Promise(e=>{e(Sc(er(ry,"interactive.getFluidContainerId"),"interactive.getFluidContainerId"))})}setFluidContainerId(e){return cy(),new Promise(t=>{t(Sc(er(ry,"interactive.setFluidContainerId"),"interactive.setFluidContainerId",e))})}getNtpTime(){return cy(),new Promise(e=>{e(Sc(er(ry,"interactive.getNtpTime"),"interactive.getNtpTime"))})}registerClientId(e){return cy(),new Promise(t=>{t(Sc(er(ry,"interactive.registerClientId"),"interactive.registerClientId",e))})}getClientRoles(e){return cy(),new Promise(t=>{t(Sc(er(ry,"interactive.getClientRoles"),"interactive.getClientRoles",e))})}getClientInfo(e){return cy(),new Promise(t=>{t(Sc(er(ry,"interactive.getClientInfo"),"interactive.getClientInfo",e))})}static create(){return cy(),new sy}}function cy(){if(!ay())throw new Error("LiveShareHost Not supported")}var uy=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 ly(e){try{return e.cartItems=dy(e.cartItems),e}catch(e){throw new Error("Error deserializing cart")}}function dy(e){return e.map(e=>{if(e.imageURL){const t=new URL(e.imageURL);e.imageURL=t}return e.accessories&&(e.accessories=dy(e.accessories)),e})}const fy=e=>{try{return e.map(e=>{const{imageURL:t,accessories:n}=e,r=uy(e,["imageURL","accessories"]),o=Object.assign({},r);return t&&(o.imageURL=t.href),n&&(o.accessories=fy(n)),o})}catch(e){throw new Error("Error serializing cart items")}};function py(e){if(!Array.isArray(e)||0===e.length)throw new Error("cartItems must be a non-empty array");for(const t of e)hy(t),gy(t.accessories)}function gy(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");hy(t)}}}function hy(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");vy(e.price),wy(e.quantity)}function my(e){if(null!=e){if(!e)throw new Error("id must not be empty");if(!1===an(e))throw new Error("id must be a valid UUID")}}function vy(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 wy(e){if("number"!=typeof e||e<=0||parseInt(e.toString())!==e)throw new Error(`quantity ${e} must be an integer greater than 0`)}function Cy(e){if(!Object.values(Ay).includes(e))throw new Error(`cartStatus ${e} is not valid`)}const yy="v2",Sy={majorVersion:1,minorVersion:1};var by,Ay;function Ey(){if(Jr(cr,un.content,un.task),!Oy())throw hn;return Sc(er(yy,"marketplace.getCart"),"marketplace.getCart",Sy).then(ly)}function Iy(e){if(Jr(cr,un.content,un.task),!Oy())throw hn;if(!e)throw new Error("addOrUpdateCartItemsParams must be provided");return my(null==e?void 0:e.cartId),py(null==e?void 0:e.cartItems),Sc(er(yy,"marketplace.addOrUpdateCartItems"),"marketplace.addOrUpdateCartItems",Object.assign(Object.assign({},e),{cartItems:fy(e.cartItems),cartVersion:Sy})).then(ly)}function Py(e){if(Jr(cr,un.content,un.task),!Oy())throw hn;if(!e)throw new Error("removeCartItemsParams must be provided");if(my(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 Sc(er(yy,"marketplace.removeCartItems"),"marketplace.removeCartItems",Object.assign(Object.assign({},e),{cartVersion:Sy})).then(ly)}function Ty(e){if(Jr(cr,un.content,un.task),!Oy())throw hn;if(!e)throw new Error("updateCartStatusParams must be provided");return my(null==e?void 0:e.cartId),Cy(null==e?void 0:e.cartStatus),Sc(er(yy,"marketplace.updateCartStatus"),"marketplace.updateCartStatus",Object.assign(Object.assign({},e),{cartVersion:Sy})).then(ly)}function Oy(){return!(!Jr(cr)||!cr.supports.marketplace)}!function(e){e.TACAdminUser="TACAdminUser",e.TeamsAdminUser="TeamsAdminUser",e.TeamsEndUser="TeamsEndUser"}(by||(by={})),function(e){e.Open="Open",e.Processing="Processing",e.Processed="Processed",e.Closed="Closed",e.Error="Error"}(Ay||(Ay={}));var Ry=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 Fy{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 ky(e){return e.toLowerCase().split("+").sort().join("+")}function My(e){return[e.ctrlKey&&"ctrl",e.shiftKey&&"shift",e.altKey&&"alt",e.metaKey&&"meta",e.key.toLowerCase()].filter(Boolean).sort().join("+")}function xy(e){return e.ctrlKey||e.shiftKey||e.altKey||e.metaKey||!!e.key&&"escape"===e.key.toLowerCase()}function Ny(e,t){if(xy(t)){const n=My(t);if(e.has(n))return{matchedShortcut:n,isOverridable:_y.has(n)}}return{matchedShortcut:void 0,isOverridable:!1}}function Dy(e){Vy.clear(),e.shortcuts.forEach(e=>{Vy.add(ky(e))}),_y.clear(),e.overridableShortcuts.forEach(e=>{_y.add(ky(e))})}class Uy extends Zi{validate(e){return e&&Array.isArray(e.shortcuts)&&Array.isArray(e.overridableShortcuts)}deserialize(e){return e}}function Ly(e){Os(er("v2","shortcutRelay.hostShortcutChanged"),"shortcutRelay.hostShortcutChanged",e)}function Hy(e){if(e.target.closest(`[${Gy}]`))return;const{matchedShortcut:t,isOverridable:n}=Ny(Vy,e);if(!t)return;if(n&&By){if(By(e,{matchedShortcut:t}))return}Ic("shortcutRelay.forwardShortcutEvent",[new Fy(e)],er("v2","shortcutRelay.forwardShortcutEvent")),e.preventDefault(),e.stopImmediatePropagation()}const _y=new Set,Vy=new Set;let By,jy=!1;function Wy(e){if(!$y())throw hn;const t=By;return By=e,t}function zy(){if(!$y())throw hn;jy=!1,Vy.clear(),_y.clear(),By=void 0,document.removeEventListener("keydown",Hy,{capture:!0})}function qy(){return Ry(this,void 0,void 0,function*(){if(!$y())throw hn;Dy(yield Ec("shortcutRelay.getHostShortcuts",[],new Uy,er("v2","shortcutRelay.getHostShortcuts"))),jy||document.addEventListener("keydown",Hy,{capture:!0}),jy=!0,Ly(e=>{Dy(e)})})}function $y(){return!(!Jr(cr)||!cr.supports.shortcutRelay)}const Gy="data-disable-shortcuts-forwarding"})(),r})());
|
|
2
2
|
//# sourceMappingURL=MicrosoftTeams.min.js.map
|